)]}' {"version":3,"file":"CadiaWEB_2_0_1301.js","sources":["../../../Users/Langwald/AppData/Local/tmssoftware/registered/TMS WEB Core RSXE15/Core Source/RTL/tms_2_0_1301.js","../../../Users/Langwald/AppData/Local/tmssoftware/registered/TMS WEB Core RSXE15/Core Source/RTL/rtl_2_0_1301.js","../../../Users/Langwald/AppData/Local/tmssoftware/registered/TMS WEB Core RSXE15/Core Source/RTL/system.pas","../../../Users/Langwald/AppData/Local/tmssoftware/registered/TMS WEB Core RSXE15/Core Source/RTL/rtlconsts.pas","../../../Users/Langwald/AppData/Local/tmssoftware/registered/TMS WEB Core RSXE15/Core Source/RTL/types.pas","../../../Users/Langwald/AppData/Local/tmssoftware/registered/TMS WEB Core RSXE15/Core Source/RTL/js.pas","../../../Users/Langwald/AppData/Local/tmssoftware/registered/TMS WEB Core RSXE15/Core Source/RTL/sysutils.pas","../../../Users/Langwald/AppData/Local/tmssoftware/registered/TMS WEB Core RSXE15/Core Source/RTL/typinfo.pas","../../../Users/Langwald/AppData/Local/tmssoftware/registered/TMS WEB Core RSXE15/Core Source/RTL/web.pas","../../../Users/Langwald/AppData/Local/tmssoftware/registered/TMS WEB Core RSXE15/Core Source/RTL/p2jsres.pas","../../../Users/Langwald/AppData/Local/tmssoftware/registered/TMS WEB Core RSXE15/Core Source/RTL/simplelinkedlist.pas","../../../Users/Langwald/AppData/Local/tmssoftware/registered/TMS WEB Core RSXE15/Core Source/RTL/classes.pas","../../../Users/Langwald/AppData/Local/tmssoftware/registered/TMS WEB Core RSXE15/Core Source/RTL/UITypes.pas","../../../Users/Langwald/AppData/Local/tmssoftware/registered/TMS WEB Core RSXE15/Core Source/WEBLib.Consts.pas","../../../Users/Langwald/AppData/Local/tmssoftware/registered/TMS WEB Core RSXE15/Core Source/WEBLib.Dialogs.pas","../../../Users/Langwald/AppData/Local/tmssoftware/registered/TMS WEB Core RSXE15/Core Source/WEBLib.Controls.pas","../../../Users/Langwald/AppData/Local/tmssoftware/registered/TMS WEB Core RSXE15/Core Source/WEBLib.Graphics.pas","../../../Users/Langwald/AppData/Local/tmssoftware/registered/TMS WEB Core RSXE15/Core Source/RTL/math.pas","../../../Users/Langwald/AppData/Local/tmssoftware/registered/TMS WEB Core RSXE15/Core Source/RTL/rtti.pas","../../../Users/Langwald/AppData/Local/tmssoftware/registered/TMS WEB Core RSXE15/Core Source/WEBLib.JSON.pas","../../../Users/Langwald/AppData/Local/tmssoftware/registered/TMS WEB Core RSXE15/Core Source/WEBLib.Storage.pas","../../../Users/Langwald/AppData/Local/tmssoftware/registered/TMS WEB Core RSXE15/Core Source/WEBLib.REST.pas","../../../Users/Langwald/AppData/Local/tmssoftware/registered/TMS WEB Core RSXE15/Core Source/WEBLib.Utils.pas","../../../Users/Langwald/AppData/Local/tmssoftware/registered/TMS WEB Core RSXE15/Core Source/WEBLib.WebTools.pas","../../../Users/Langwald/AppData/Local/tmssoftware/registered/TMS WEB Core RSXE15/Core Source/RTL/contnrs.pas","../../../Users/Langwald/AppData/Local/tmssoftware/registered/TMS WEB Core RSXE15/Core Source/WEBLib.Modules.pas","../../../Users/Langwald/AppData/Local/tmssoftware/registered/TMS WEB Core RSXE15/Core Source/WEBLib.Lang.pas","../../../Users/Langwald/AppData/Local/tmssoftware/registered/TMS WEB Core RSXE15/Core Source/WEBLib.Menus.pas","../../../Users/Langwald/AppData/Local/tmssoftware/registered/TMS WEB Core RSXE15/Core Source/WEBLib.ClientConnector.pas","../../../Users/Langwald/AppData/Local/tmssoftware/registered/TMS WEB Core RSXE15/Core Source/RTL/Rtl.BrowserLoadHelper.pas","../../../Users/Langwald/AppData/Local/tmssoftware/registered/TMS WEB Core RSXE15/Core Source/WEBLib.Forms.pas","../../../Users/Langwald/AppData/Local/tmssoftware/registered/TMS WEB Core RSXE15/Core Source/WEBLib.StdCtrls.pas","../../../Users/Langwald/AppData/Local/tmssoftware/registered/TMS WEB Core RSXE15/Core Source/WEBLib.ExtCtrls.pas","../../../Users/Langwald/AppData/Local/tmssoftware/registered/TMS WEB Core RSXE15/Core Source/WEBLib.TreeNodes.pas","../../../Users/Langwald/AppData/Local/tmssoftware/registered/TMS WEB Core RSXE15/Core Source/WEBLib.Buttons.pas","../../../Users/Langwald/AppData/Local/tmssoftware/registered/TMS WEB Core RSXE15/Core Source/WEBLib.ComCtrls.pas","../../../Users/Langwald/AppData/Local/tmssoftware/registered/TMS WEB Core RSXE15/Core Source/RTL/strutils.pas","../../../Users/Langwald/AppData/Local/tmssoftware/registered/TMS WEB Core RSXE15/Core Source/RTL/TimeSpan.pas","../../../Users/Langwald/AppData/Local/tmssoftware/registered/TMS WEB Core RSXE15/Core Source/RTL/generics.defaults.pas","../../../Users/Langwald/AppData/Local/tmssoftware/registered/TMS XData/source/core/common/XData.Model.Types.pas","../../../Users/Langwald/AppData/Local/tmssoftware/registered/TMS FNC Core/WEBLib.TMSFNCPersistence.pas","../../../Users/Langwald/AppData/Local/tmssoftware/registered/TMS FNC Core/WEBLib.TMSFNCWebBrowser.pas","../../../Users/Langwald/AppData/Local/tmssoftware/registered/TMS WEB Core RSXE15/Core Source/RTL/generics.strings.pas","../../../Users/Langwald/AppData/Local/tmssoftware/registered/TMS WEB Core RSXE15/Core Source/RTL/generics.collections.pas","../../../Users/Langwald/AppData/Local/tmssoftware/registered/TMS WEB Core RSXE15/Core Source/WEBLib.DesignIntf.pas","../../../Users/Langwald/AppData/Local/tmssoftware/registered/TMS WEB Core RSXE15/Core Source/RTL/dateutils.helper.pas","../../../Users/Langwald/AppData/Local/tmssoftware/registered/TMS WEB Core RSXE15/Core Source/RTL/dateutils.pas","../../../Users/Langwald/AppData/Local/tmssoftware/registered/TMS WEB Core RSXE15/Core Source/WEBLib.Login.pas","../../../Users/Langwald/AppData/Local/tmssoftware/registered/TMS WEB Core RSXE15/Core Source/RTL/dbconst.pas","../../../Users/Langwald/AppData/Local/tmssoftware/registered/TMS WEB Core RSXE15/Core Source/RTL/db.pas","../../../Users/Langwald/AppData/Local/tmssoftware/registered/TMS WEB Core RSXE15/Core Source/RTL/fpexprpars.pas","../../../Users/Langwald/AppData/Local/tmssoftware/registered/TMS WEB Core RSXE15/Core Source/RTL/jsondataset.pas","../../../Users/Langwald/AppData/Local/tmssoftware/registered/TMS BIZ Core Library/source/core/common/Bcl.Utils.pas","../../../Users/Langwald/AppData/Local/tmssoftware/registered/TMS XData/source/core/web/XData.Web.JsonDataset.pas","../../../Users/Langwald/AppData/Local/tmssoftware/registered/TMS BIZ Core Library/source/core/common/Bcl.Rtti.Common.pas","../../../Users/Langwald/AppData/Local/tmssoftware/registered/TMS BIZ Core Library/source/core/common/Bcl.Json.Common.pas","../../../Users/Langwald/AppData/Local/tmssoftware/registered/TMS BIZ Core Library/source/core/common/Bcl.Json.Attributes.pas","../../../Users/Langwald/AppData/Local/tmssoftware/registered/TMS BIZ Core Library/source/core/common/Bcl.Collections.Common.pas","../../../Users/Langwald/AppData/Local/tmssoftware/registered/TMS BIZ Core Library/source/core/common/Bcl.SysUtils.pas","../../../Users/Langwald/AppData/Local/tmssoftware/registered/TMS XData/source/core/common/XData.Types.Converters.pas","../../../Users/Langwald/AppData/Local/tmssoftware/registered/TMS XData/source/core/common/XData.Utils.pas","../../../Users/Langwald/AppData/Local/tmssoftware/registered/TMS XData/source/core/common/XData.Model.Classes.pas","../../../Users/Langwald/AppData/Local/tmssoftware/registered/TMS XData/source/core/web/XData.Web.Headers.pas","../../../Users/Langwald/AppData/Local/tmssoftware/registered/TMS XData/source/core/web/XData.Web.Request.pas","../../../Users/Langwald/AppData/Local/tmssoftware/registered/TMS XData/source/core/web/XData.Web.Response.pas","../../../Users/Langwald/AppData/Local/tmssoftware/registered/TMS BIZ Core Library/source/core/common/Bcl.TypInfo.Common.pas","../../../Users/Langwald/AppData/Local/tmssoftware/registered/TMS XData/source/core/common/XData.Model.Deserializer.pas","../../../Users/Langwald/AppData/Local/tmssoftware/registered/TMS XData/source/core/web/XData.Web.Connection.pas","../../../Users/Langwald/AppData/Local/tmssoftware/registered/TMS XData/source/core/web/XData.Bind.Converter.pas","../../../Users/Langwald/AppData/Local/tmssoftware/registered/TMS XData/source/core/web/XData.Web.Client.pas","../../../Users/Langwald/AppData/Local/tmssoftware/registered/TMS XData/source/core/common/XData.Web.DatasetCommon.pas","../../../Users/Langwald/AppData/Local/tmssoftware/registered/TMS XData/source/core/web/XData.Web.Dataset.pas","../../../Users/Langwald/AppData/Local/tmssoftware/registered/TMS WEB Core RSXE15/Core Source/WEBLib.DB.pas","../../../Users/Langwald/AppData/Local/tmssoftware/registered/TMS WEB Core RSXE15/Core Source/WEBLib.WebCtrls.pas","../../../Users/Langwald/AppData/Local/tmssoftware/registered/TMS WEB Core RSXE15/Core Source/jsdelphisystem.pas","../../../Users/Langwald/AppData/Local/tmssoftware/registered/TMS WEB Core RSXE15/Core Source/WEBLib.Mask.pas","../../../Users/Langwald/AppData/Local/tmssoftware/registered/TMS WEB Core RSXE15/Core Source/WEBLib.Ctrls.SVG.pas","../../../Users/Langwald/AppData/Local/tmssoftware/registered/TMS WEB Core RSXE15/Core Source/WEBLib.Grids.pas","../../../Users/Langwald/AppData/Local/tmssoftware/registered/TMS WEB Core RSXE15/Core Source/WEBLib.EditAutocomplete.pas","../../../Users/Langwald/AppData/Local/tmssoftware/registered/TMS WEB Core RSXE15/Core Source/WEBLib.Lists.pas","../../../Users/Langwald/AppData/Local/tmssoftware/registered/TMS WEB Core RSXE15/Core Source/WEBLib.DropDown.pas","../../../Users/Langwald/AppData/Local/tmssoftware/registered/TMS WEB Core RSXE15/Core Source/WEBLib.DBCtrls.pas","../../../Users/Langwald/AppData/Local/tmssoftware/registered/TMS WEB Core RSXE15/Core Source/WEBLib.RegularExpressions.pas","../../../Users/Langwald/AppData/Local/tmssoftware/registered/TMS WEB Core RSXE15/Core Source/WEBLib.CDS.pas","../../../Users/Langwald/AppData/Local/tmssoftware/registered/TMS FNC Core/WEBLib.TMSFNCUtils.pas","../../../Users/Langwald/AppData/Local/tmssoftware/registered/TMS WEB Core RSXE15/Core Source/RTL/variants.pas","../../../Users/Langwald/AppData/Local/tmssoftware/registered/TMS FNC Core/WEBLib.TMSFNCJSONReader.pas","../../../Users/Langwald/AppData/Local/tmssoftware/registered/TMS FNC Core/WEBLib.TMSFNCJSONWriter.pas","../../../Users/Langwald/AppData/Local/tmssoftware/registered/TMS FNC Core/WEBLib.TMSFNCTypes.pas","../../../Users/Langwald/AppData/Local/tmssoftware/registered/TMS FNC Core/WEBLib.TMSFNCGraphicsTypes.pas","../../../Users/Langwald/AppData/Local/tmssoftware/registered/TMS FNC Core/WEBLib.TMSFNCCustomComponent.pas","../../../Users/Langwald/AppData/Local/tmssoftware/registered/TMS FNC Core/WEBLib.TMSFNCGraphics.pas","../../../Users/Langwald/AppData/Local/tmssoftware/registered/TMS FNC Core/WEBLib.TMSFNCBitmapContainer.pas","../../../Users/Langwald/AppData/Local/tmssoftware/registered/TMS FNC Core/WEBLib.TMSFNCHTMLEngine.pas","../../../Users/Langwald/AppData/Local/tmssoftware/registered/TMS FNC Core/WEBLib.TMSFNCGraphics.General.pas","../../../Users/Langwald/AppData/Local/tmssoftware/registered/TMS FNC Core/WEBLib.TMSFNCGraphics.WEB.pas","../../../Users/Langwald/AppData/Local/tmssoftware/registered/TMS FNC Core/WEBLib.TMSFNCStyles.pas","../../../Users/Langwald/AppData/Local/tmssoftware/registered/TMS FNC Core/WEBLib.TMSFNCUndo.pas","../../../Users/Langwald/AppData/Local/tmssoftware/registered/TMS FNC Core/WEBLib.TMSFNCCustomControl.pas","../../../Users/Langwald/AppData/Local/tmssoftware/registered/TMS FNC Core/WEBLib.TMSFNCScrollBar.pas","../../../Users/Langwald/AppData/Local/tmssoftware/registered/TMS FNC UI Pack/WEBLib.TMSFNCTreeViewBase.pas","../../../Users/Langwald/AppData/Local/tmssoftware/registered/TMS FNC UI Pack/WEBLib.TMSFNCTreeViewData.pas","../../../Users/Langwald/AppData/Local/tmssoftware/registered/TMS FNC Core/WEBLib.TMSFNCPopup.pas","../../../Users/Langwald/AppData/Local/tmssoftware/registered/TMS FNC UI Pack/WEBLib.TMSFNCImage.pas","../../../Users/Langwald/AppData/Local/tmssoftware/registered/TMS FNC UI Pack/WEBLib.TMSFNCCustomTreeView.pas","../../../Users/Langwald/AppData/Local/tmssoftware/registered/TMS FNC UI Pack/WEBLib.TMSFNCCustomSelector.pas","../../../Users/Langwald/AppData/Local/tmssoftware/registered/TMS FNC UI Pack/WEBLib.TMSFNCCustomPicker.pas","../../../Users/Langwald/AppData/Local/tmssoftware/registered/TMS FNC UI Pack/WEBLib.TMSFNCControlPicker.pas","../../../Users/Langwald/AppData/Local/tmssoftware/registered/TMS FNC UI Pack/WEBLib.TMSFNCTreeView.pas","../../../Users/Langwald/AppData/Local/tmssoftware/registered/TMS FNC UI Pack/WEBLib.TMSFNCBitmapSelector.pas","../../../Users/Langwald/AppData/Local/tmssoftware/registered/TMS FNC UI Pack/WEBLib.TMSFNCColorWheelResources.pas","../../../Users/Langwald/AppData/Local/tmssoftware/registered/TMS FNC UI Pack/WEBLib.TMSFNCColorWheel.pas","../../../Users/Langwald/AppData/Local/tmssoftware/registered/TMS FNC UI Pack/WEBLib.TMSFNCColorSelector.pas","../../../Users/Langwald/AppData/Local/tmssoftware/registered/TMS FNC UI Pack/WEBLib.TMSFNCToolBarRes.pas","../../../Users/Langwald/AppData/Local/tmssoftware/registered/TMS FNC UI Pack/WEBLib.TMSFNCToolBar.pas","../../../Users/Langwald/AppData/Local/tmssoftware/registered/TMS FNC UI Pack/WEBLib.TMSFNCEdit.pas","../../../Users/Langwald/AppData/Local/tmssoftware/registered/TMS FNC UI Pack/WEBLib.TMSFNCTableView.pas","../../../Users/Langwald/AppData/Local/tmssoftware/registered/TMS FNC UI Pack/WEBLib.TMSFNCSignatureCapture.pas","../../../Users/Langwald/AppData/Local/tmssoftware/registered/TMS FNC UI Pack/WEBLib.TMSFNCCalendar.pas","../../../Users/Langwald/AppData/Local/tmssoftware/registered/TMS FNC UI Pack/WEBLib.TMSFNCDatePicker.pas","../../Unit_Artikel.pas","../../../Users/Langwald/AppData/Local/tmssoftware/registered/TMS WEB Core RSXE15/Core Source/RTL/libfilereader.pas","../../../Users/Langwald/AppData/Local/tmssoftware/registered/TMS WEB Core RSXE15/Core Source/RTL/libglmatrix.pas","../../../Users/Langwald/AppData/Local/tmssoftware/registered/TMS WEB Core RSXE15/Core Source/RTL/libmedia.pas","../../../Users/Langwald/AppData/Local/tmssoftware/registered/TMS WEB Core RSXE15/Core Source/WEBLib.Devices.pas","../../unit_BarcodeScan.pas","../../unit_Artikelsuche.pas","../../../Users/Langwald/AppData/Local/tmssoftware/registered/TMS WEB Core RSXE15/Core Source/WEBLib.SignatureCapture.pas","../../unit_AuftragUnterschriften.pas","../../../Users/Langwald/AppData/Local/tmssoftware/registered/TMS FNC UI Pack/WEBLib.TMSFNCDigitalTimeSelector.pas","../../../Users/Langwald/AppData/Local/tmssoftware/registered/TMS FNC UI Pack/WEBLib.TMSFNCDigitalTimePicker.pas","../../../Users/Langwald/AppData/Local/tmssoftware/registered/TMS FNC UI Pack/WEBLib.TMSFNCAnalogTimeSelector.pas","../../../Users/Langwald/AppData/Local/tmssoftware/registered/TMS FNC UI Pack/WEBLib.TMSFNCAnalogTimePicker.pas","../../../Users/Langwald/AppData/Local/tmssoftware/registered/TMS FNC UI Pack/WEBLib.TMSFNCDateTimePicker.pas","../../../Users/Langwald/AppData/Local/tmssoftware/registered/TMS FNC Core/WEBLib.TMSFNCWebBrowser.WEB.pas","../../../Users/Langwald/AppData/Local/tmssoftware/registered/TMS FNC Maps/WEBLib.TMSFNCMapsCommonTypes.pas","../../../Users/Langwald/AppData/Local/tmssoftware/registered/TMS FNC Core/WEBLib.TMSFNCCloudBase.WEB.pas","../../../Users/Langwald/AppData/Local/tmssoftware/registered/TMS FNC Core/WEBLib.TMSFNCCloudBase.pas","../../../Users/Langwald/AppData/Local/tmssoftware/registered/TMS FNC Maps/WEBLib.TMSFNCGeocoding.Google.pas","../../../Users/Langwald/AppData/Local/tmssoftware/registered/TMS FNC Maps/WEBLib.TMSFNCGeocoding.Here.pas","../../../Users/Langwald/AppData/Local/tmssoftware/registered/TMS FNC Maps/WEBLib.TMSFNCGeocoding.Bing.pas","../../../Users/Langwald/AppData/Local/tmssoftware/registered/TMS FNC Maps/WEBLib.TMSFNCGeocoding.Azure.pas","../../../Users/Langwald/AppData/Local/tmssoftware/registered/TMS FNC Maps/WEBLib.TMSFNCGeocoding.MapBox.pas","../../../Users/Langwald/AppData/Local/tmssoftware/registered/TMS FNC Maps/WEBLib.TMSFNCGeocoding.TomTom.pas","../../../Users/Langwald/AppData/Local/tmssoftware/registered/TMS FNC Maps/WEBLib.TMSFNCGeocoding.OpenStreetMap.pas","../../../Users/Langwald/AppData/Local/tmssoftware/registered/TMS FNC Maps/WEBLib.TMSFNCGeocoding.OpenRouteService.pas","../../../Users/Langwald/AppData/Local/tmssoftware/registered/TMS FNC Maps/WEBLib.TMSFNCGeocoding.GeoApify.pas","../../../Users/Langwald/AppData/Local/tmssoftware/registered/TMS FNC Maps/WEBLib.TMSFNCGeocoding.pas","../../../Users/Langwald/AppData/Local/tmssoftware/registered/TMS FNC Maps/WEBLib.TMSFNCDirections.Google.pas","../../../Users/Langwald/AppData/Local/tmssoftware/registered/TMS FNC Maps/WEBLib.TMSFNCGoogleRoutes.pas","../../../Users/Langwald/AppData/Local/tmssoftware/registered/TMS FNC Maps/WEBLib.TMSFNCDirections.pas","../../../Users/Langwald/AppData/Local/tmssoftware/registered/TMS FNC Maps/WEBLib.TMSFNCDirections.GoogleRoutes.pas","../../../Users/Langwald/AppData/Local/tmssoftware/registered/TMS FNC Maps/WEBLib.TMSFNCDirections.Here.pas","../../../Users/Langwald/AppData/Local/tmssoftware/registered/TMS FNC Maps/WEBLib.TMSFNCDirections.Bing.pas","../../../Users/Langwald/AppData/Local/tmssoftware/registered/TMS FNC Maps/WEBLib.TMSFNCDirections.Azure.pas","../../../Users/Langwald/AppData/Local/tmssoftware/registered/TMS FNC Maps/WEBLib.TMSFNCDirections.MapBox.pas","../../../Users/Langwald/AppData/Local/tmssoftware/registered/TMS FNC Maps/WEBLib.TMSFNCDirections.TomTom.pas","../../../Users/Langwald/AppData/Local/tmssoftware/registered/TMS FNC Maps/WEBLib.TMSFNCDirections.OpenRouteService.pas","../../../Users/Langwald/AppData/Local/tmssoftware/registered/TMS FNC Maps/WEBLib.TMSFNCDirections.GeoApify.pas","../../../Users/Langwald/AppData/Local/tmssoftware/registered/TMS FNC Maps/WEBLib.TMSFNCLocation.IPStack.pas","../../../Users/Langwald/AppData/Local/tmssoftware/registered/TMS FNC Maps/WEBLib.TMSFNCLocation.Google.pas","../../../Users/Langwald/AppData/Local/tmssoftware/registered/TMS FNC Maps/WEBLib.TMSFNCLocation.pas","../../../Users/Langwald/AppData/Local/tmssoftware/registered/TMS FNC Maps/WEBLib.TMSFNCRouteCalculator.pas","../../../Users/Langwald/AppData/Local/tmssoftware/registered/TMS FNC Maps/WEBLib.TMSFNCMaps.GoogleMaps.pas","../../../Users/Langwald/AppData/Local/tmssoftware/registered/TMS FNC Maps/WEBLib.TMSFNCMaps.pas","../../../Users/Langwald/AppData/Local/tmssoftware/registered/TMS FNC Maps/WEBLib.TMSFNCMaps.Here.pas","../../../Users/Langwald/AppData/Local/tmssoftware/registered/TMS FNC Maps/WEBLib.TMSFNCMaps.BingMaps.pas","../../../Users/Langwald/AppData/Local/tmssoftware/registered/TMS FNC Maps/WEBLib.TMSFNCMaps.TomTom.pas","../../../Users/Langwald/AppData/Local/tmssoftware/registered/TMS FNC Maps/WEBLib.TMSFNCMaps.AzureMaps.pas","../../../Users/Langwald/AppData/Local/tmssoftware/registered/TMS FNC Maps/WEBLib.TMSFNCMaps.OpenLayers.pas","../../../Users/Langwald/AppData/Local/tmssoftware/registered/TMS FNC Maps/WEBLib.TMSFNCMaps.Leaflet.pas","../../../Users/Langwald/AppData/Local/tmssoftware/registered/TMS FNC Maps/WEBLib.TMSFNCMaps.MapBox.pas","../../../Users/Langwald/AppData/Local/tmssoftware/registered/TMS FNC Maps/WEBLib.TMSFNCMaps.MapKit.pas","../../../Users/Langwald/AppData/Local/tmssoftware/registered/TMS FNC Maps/WEBLib.TMSFNCOpenLayers.pas","../../unit_Karte.pas","../../unit_EinzelBeleg.pas","../../unit_BelegeUndPositionen.pas","../../unit_Preise.pas","../../unit_EinzelAnsprechpartner.pas","../../unit_ListeAnsprechpartner.pas","../../unit_GetPhoto.pas","../../unit_EinzelDatei.pas","../../unit_Dateien.pas","../../unit_TicketNeu.pas","../../unit_KontaktAenderung.pas","../../unit_EinzelKontakt.pas","../../unit_Kontaktsuche.pas","../../unit_Objektsuche.pas","../../unit_Einzeltermin.pas","../../unit_AuftragTermine.pas","../../unit_AuftragPosEinzel.pas","../../unit_AuftragSuche.pas","../../unit_ProduktionSuche.pas","../../unit_Kontaktnummersuche.pas","../../unit_PZE.pas","../../unit_EinzelAuftrag.pas","../../Unit2.pas","../../../Users/Langwald/AppData/Local/tmssoftware/registered/TMS WEB Core RSXE15/Core Source/WEBLib.FlexControls.pas","../../unit_EinzelAnruf.pas","../../unit_Anrufe.pas","../../unit_Terminkalender.pas","../../unit_ListeAuftrag.pas","../../Unit_AngebotPosEinzel.pas","../../unit_EinzelAngebot.pas","../../unit_ListeAngebot.pas","../../unit_EinzelEmail.pas","../../unit_EmailEingang.pas","../../unit_LieferscheinUnterschrift.pas","../../unit_EinzelLieferschein.pas","../../unit_ListeLieferschein.pas","../../unit_Bestellvormerkung.pas","../../unit_TelefonSuche.pas","../../unit_EinzelMitteilung.pas","../../unit_NeueMitteilung.pas","../../unit_Mitteilungen.pas","../../unit_EinzelTicket.pas","../../unit_ListeTickets.pas","../../unit_Logbuch.pas","../../unit_Inventur.pas","../../Unit1.pas","../../CadiaWEB.dpr"],"sourcesContent":["//***********************************************************************************\r\n// TMS WEB CORE framework code is copyright (c) 2018 - 2021 by tmssoftware.com bvba\r\n// The code or parts of the code cannot be used in any way outside \r\n// a TMS WEB Core application generated by a licensed user or company.\r\n//***********************************************************************************\r\n","var pas = { $libimports: {}};\r\n\r\nvar rtl = {\r\n\r\n version: 30101,\r\n\r\n quiet: false,\r\n debug_load_units: false,\r\n debug_rtti: false,\r\n\r\n $res : {},\r\n\r\n debug: function(){\r\n if (rtl.quiet || !console || !console.log) return;\r\n console.log(arguments);\r\n },\r\n\r\n error: function(s){\r\n rtl.debug('Error: ',s);\r\n throw s;\r\n },\r\n\r\n warn: function(s){\r\n rtl.debug('Warn: ',s);\r\n },\r\n\r\n checkVersion: function(v){\r\n if (rtl.version != v) throw \"expected rtl version \"+v+\", but found \"+rtl.version;\r\n },\r\n\r\n hiInt: Math.pow(2,53),\r\n\r\n hasString: function(s){\r\n return rtl.isString(s) && (s.length>0);\r\n },\r\n\r\n isArray: function(a) {\r\n return Array.isArray(a);\r\n },\r\n\r\n isFunction: function(f){\r\n return typeof(f)===\"function\";\r\n },\r\n\r\n isModule: function(m){\r\n return rtl.isObject(m) && rtl.hasString(m.$name) && (pas[m.$name]===m);\r\n },\r\n\r\n isImplementation: function(m){\r\n return rtl.isObject(m) && rtl.isModule(m.$module) && (m.$module.$impl===m);\r\n },\r\n\r\n isNumber: function(n){\r\n return typeof(n)===\"number\";\r\n },\r\n\r\n isObject: function(o){\r\n var s=typeof(o);\r\n return (typeof(o)===\"object\") && (o!=null);\r\n },\r\n\r\n isString: function(s){\r\n return typeof(s)===\"string\";\r\n },\r\n\r\n getNumber: function(n){\r\n return typeof(n)===\"number\"?n:NaN;\r\n },\r\n\r\n getChar: function(c){\r\n return ((typeof(c)===\"string\") && (c.length===1)) ? c : \"\";\r\n },\r\n\r\n getObject: function(o){\r\n return ((typeof(o)===\"object\") || (typeof(o)==='function')) ? o : null;\r\n },\r\n\r\n isTRecord: function(type){\r\n return (rtl.isObject(type) && type.hasOwnProperty('$new') && (typeof(type.$new)==='function'));\r\n },\r\n\r\n isPasClass: function(type){\r\n return (rtl.isObject(type) && type.hasOwnProperty('$classname') && rtl.isObject(type.$module));\r\n },\r\n\r\n isPasClassInstance: function(type){\r\n return (rtl.isObject(type) && rtl.isPasClass(type.$class));\r\n },\r\n\r\n hexStr: function(n,digits){\r\n return (\"000000000000000\"+n.toString(16).toUpperCase()).slice(-digits);\r\n },\r\n\r\n m_loading: 0,\r\n m_loading_intf: 1,\r\n m_intf_loaded: 2,\r\n m_loading_impl: 3, // loading all used unit\r\n m_initializing: 4, // running initialization\r\n m_initialized: 5,\r\n\r\n module: function(module_name, intfuseslist, intfcode, impluseslist){\r\n var lModule = pas[module_name];\r\n if (lModule) {\r\n lModule.$intfcode = intfcode;\r\n } \r\n else {\r\n rtl.modulenew(module_name, intfuseslist, intfcode, impluseslist);\r\n }\r\n },\r\n\r\n modulenew: function(module_name, intfuseslist, intfcode, impluseslist){\r\n if (rtl.debug_load_units) rtl.debug('rtl.module name=\"'+module_name+'\" intfuses='+intfuseslist+' impluses='+impluseslist);\r\n if (!rtl.hasString(module_name)) rtl.error('invalid module name \"'+module_name+'\"');\r\n if (!rtl.isArray(intfuseslist)) rtl.error('invalid interface useslist of \"'+module_name+'\"');\r\n if (!rtl.isFunction(intfcode)) rtl.error('invalid interface code of \"'+module_name+'\"');\r\n if (!(impluseslist==undefined) && !rtl.isArray(impluseslist)) rtl.error('invalid implementation useslist of \"'+module_name+'\"');\r\n\r\n if (pas[module_name])\r\n rtl.error('module \"'+module_name+'\" is already registered');\r\n\r\n var r = Object.create(rtl.tSectionRTTI);\r\n var module = r.$module = pas[module_name] = {\r\n $name: module_name,\r\n $intfuseslist: intfuseslist,\r\n $impluseslist: impluseslist,\r\n $state: rtl.m_loading,\r\n $intfcode: intfcode,\r\n $implcode: null,\r\n $impl: null,\r\n $rtti: r\r\n };\r\n if (impluseslist) module.$impl = {\r\n $module: module,\r\n $rtti: r\r\n };\r\n },\r\n\r\n exitcode: 0,\r\n\r\n run: function(module_name){\r\n try {\r\n if (!rtl.hasString(module_name)) module_name='program';\r\n if (rtl.debug_load_units) rtl.debug('rtl.run module=\"'+module_name+'\"');\r\n rtl.initRTTI();\r\n var module = pas[module_name];\r\n if (!module) rtl.error('rtl.run module \"'+module_name+'\" missing');\r\n rtl.loadintf(module);\r\n rtl.loadimpl(module);\r\n if ((module_name=='program') || (module_name=='library')){\r\n if (rtl.debug_load_units) rtl.debug('running $main');\r\n var r = pas[module_name].$main();\r\n if (rtl.isNumber(r)) rtl.exitcode = r;\r\n }\r\n } catch(re) {\r\n if (!rtl.showUncaughtExceptions) {\r\n throw re\r\n } else { \r\n if (!rtl.handleUncaughtException(re)) {\r\n rtl.showException(re);\r\n rtl.exitcode = 216;\r\n } \r\n }\r\n } \r\n return rtl.exitcode;\r\n },\r\n \r\n showException : function (re) {\r\n var errStack = (re.hasOwnProperty('stack')) ? re.stack : re;\r\n var errMsg = rtl.hasString(re.$classname) ? re.$classname : '';\r\n errMsg += ((errMsg) ? ': ' : '') + (re.hasOwnProperty('fMessage') ? re.fMessage : '');\r\n errMsg += ((errMsg) ? \"\\n\" : '') + errStack;\r\n errMsg = \"Uncaught Exception:\\n\" + errMsg;\r\n console.log(errMsg);\r\n alert(errMsg);\r\n },\r\n\r\n handleUncaughtException: function (e) {\r\n if (rtl.onUncaughtException) {\r\n try {\r\n rtl.onUncaughtException(e);\r\n return true;\r\n } catch (ee) {\r\n return false; \r\n }\r\n } else {\r\n return false;\r\n }\r\n },\r\n\r\n loadintf: function(module){\r\n if (module.$state>rtl.m_loading_intf) return; // already finished\r\n if (rtl.debug_load_units) rtl.debug('loadintf: \"'+module.$name+'\"');\r\n if (module.$state===rtl.m_loading_intf)\r\n rtl.error('unit cycle detected \"'+module.$name+'\"');\r\n module.$state=rtl.m_loading_intf;\r\n // load interfaces of interface useslist\r\n rtl.loaduseslist(module,module.$intfuseslist,rtl.loadintf);\r\n // run interface\r\n if (rtl.debug_load_units) rtl.debug('loadintf: run intf of \"'+module.$name+'\"');\r\n module.$intfcode(module.$intfuseslist);\r\n // success\r\n module.$state=rtl.m_intf_loaded;\r\n // Note: units only used in implementations are not yet loaded (not even their interfaces)\r\n },\r\n\r\n loaduseslist: function(module,useslist,f){\r\n if (useslist==undefined) return;\r\n var len = useslist.length;\r\n for (var i = 0; i=rtl.m_loading_impl) return; // already processing\r\n if (module.$state0){\r\n o = this[newinstancefnname](fn,args);\r\n } else if(isFunc) {\r\n o = new this.$func(args);\r\n } else {\r\n o = Object.create(c);\r\n }\r\n if (o.$init) o.$init();\r\n try{\r\n if (typeof(fn)===\"string\"){\r\n this[fn].apply(o,args);\r\n } else {\r\n fn.apply(o,args);\r\n };\r\n if (o.AfterConstruction) o.AfterConstruction();\r\n } catch($e){\r\n // do not call BeforeDestruction\r\n if (o.Destroy) o.Destroy();\r\n if (o.$final) o.$final();\r\n throw $e;\r\n }\r\n return o;\r\n };\r\n c.$destroy = function(fnname){\r\n if (this.BeforeDestruction) this.BeforeDestruction();\r\n if (this[fnname]) this[fnname]();\r\n if (this.$final) this.$final();\r\n };\r\n rtl.initClass(c,parent,name,initfn,rttiname);\r\n if (isFunc){\r\n function f(){}\r\n f.prototype = c;\r\n c.$func = f;\r\n }\r\n },\r\n\r\n createHelper: function(parent,name,ancestor,initfn,rttiname){\r\n // create a helper,\r\n // ancestor must be null or a helper,\r\n var c = null;\r\n if (ancestor != null){\r\n c = Object.create(ancestor);\r\n c.$ancestor = ancestor;\r\n // c.$ancestor === Object.getPrototypeOf(c)\r\n } else {\r\n c = { $ancestor: null };\r\n };\r\n parent[name] = c;\r\n c.$class = c; // Note: o.$class === Object.getPrototypeOf(o)\r\n c.$classname = rttiname?rttiname:name;\r\n parent = rtl.initStruct(c,parent,name);\r\n c.$fullname = parent.$name+'.'+name;\r\n // rtti\r\n var t = c.$module.$rtti.$Helper(c.$classname,{ \"helper\": c });\r\n c.$rtti = t;\r\n if (rtl.isObject(ancestor)) t.ancestor = ancestor.$rtti;\r\n if (!t.ancestor) t.ancestor = null;\r\n // init members\r\n initfn.call(c);\r\n },\r\n\r\n tObjectDestroy: \"Destroy\",\r\n\r\n free: function(obj,name){\r\n if (obj[name]==null) return null;\r\n obj[name].$destroy(rtl.tObjectDestroy);\r\n obj[name]=null;\r\n },\r\n\r\n freeLoc: function(obj){\r\n if (obj==null) return null;\r\n obj.$destroy(rtl.tObjectDestroy);\r\n return null;\r\n },\r\n\r\n hideProp: function(o,p,v){\r\n Object.defineProperty(o,p, {\r\n enumerable: false,\r\n configurable: true,\r\n writable: true\r\n });\r\n if(arguments.length>2){ o[p]=v; }\r\n },\r\n\r\n recNewT: function(parent,name,initfn,full){\r\n if (parent) {\r\n var lRec = parent[name];\r\n if (lRec) {\r\n return lRec;\r\n }\r\n } \r\n\r\n // create new record type\r\n var t = {};\r\n if (parent) parent[name] = t;\r\n var h = rtl.hideProp;\r\n if (full){\r\n rtl.initStruct(t,parent,name);\r\n t.$record = t;\r\n h(t,'$record');\r\n h(t,'$name');\r\n h(t,'$parent');\r\n h(t,'$module');\r\n h(t,'$initSpec');\r\n }\r\n initfn.call(t);\r\n if (!t.$new){\r\n t.$new = function(){ return Object.create(t); };\r\n }\r\n t.$clone = function(r){ return t.$new().$assign(r); };\r\n h(t,'$new');\r\n h(t,'$clone');\r\n h(t,'$eq');\r\n h(t,'$assign');\r\n return t;\r\n },\r\n\r\n is: function(instance,type){\r\n return type.isPrototypeOf(instance) || (instance===type);\r\n },\r\n\r\n isExt: function(instance,type,mode){\r\n // mode===1 means instance must be a Pascal class instance\r\n // mode===2 means instance must be a Pascal class\r\n // Notes:\r\n // isPrototypeOf and instanceof return false on equal\r\n // isPrototypeOf does not work for Date.isPrototypeOf(new Date())\r\n // so if isPrototypeOf is false test with instanceof\r\n // instanceof needs a function on right side\r\n if (instance == null) return false; // Note: ==null checks for undefined too\r\n if ((typeof(type) !== 'object') && (typeof(type) !== 'function')) return false;\r\n if (instance === type){\r\n if (mode===1) return false;\r\n if (mode===2) return rtl.isPasClass(instance);\r\n return true;\r\n }\r\n if (type.isPrototypeOf && type.isPrototypeOf(instance)){\r\n if (mode===1) return rtl.isPasClassInstance(instance);\r\n if (mode===2) return rtl.isPasClass(instance);\r\n return true;\r\n }\r\n if ((typeof type == 'function') && (instance instanceof type)) return true;\r\n return false;\r\n },\r\n\r\n Exception: null,\r\n EInvalidCast: null,\r\n EAbstractError: null,\r\n ERangeError: null,\r\n EIntOverflow: null,\r\n EPropWriteOnly: null,\r\n\r\n raiseE: function(typename){\r\n var t = rtl[typename];\r\n if (t==null){\r\n var mod = pas.SysUtils;\r\n if (!mod) mod = pas.sysutils;\r\n if (!mod) mod = pas[\"System.SysUtils\"];\r\n if (mod){\r\n t = mod[typename];\r\n if (!t) t = mod[typename.toLowerCase()];\r\n if (!t) t = mod['Exception'];\r\n if (!t) t = mod['exception'];\r\n }\r\n }\r\n if (t){\r\n if (t.Create){\r\n throw t.$create(\"Create\");\r\n } else if (t.create){\r\n throw t.$create(\"create\");\r\n }\r\n }\r\n if (typename === \"EInvalidCast\") throw \"invalid type cast\";\r\n if (typename === \"EAbstractError\") throw \"Abstract method called\";\r\n if (typename === \"ERangeError\") throw \"range error\";\r\n throw typename;\r\n },\r\n\r\n as: function(instance,type){\r\n if((instance === null) || rtl.is(instance,type)) return instance;\r\n rtl.raiseE(\"EInvalidCast\");\r\n },\r\n\r\n asExt: function(instance,type,mode){\r\n if((instance === null) || rtl.isExt(instance,type,mode)) return instance;\r\n rtl.raiseE(\"EInvalidCast\");\r\n },\r\n\r\n createInterface: function(module, name, guid, fnnames, ancestor, initfn, rttiname){\r\n //console.log('createInterface name=\"'+name+'\" guid=\"'+guid+'\" names='+fnnames);\r\n var lInterface = module[name];\r\n if (lInterface) {\r\n return lInterface; \r\n }\r\n\r\n var i = ancestor?Object.create(ancestor):{};\r\n module[name] = i;\r\n i.$module = module;\r\n i.$name = rttiname?rttiname:name;\r\n i.$fullname = module.$name+'.'+i.$name;\r\n i.$guid = guid;\r\n i.$guidr = null;\r\n i.$names = fnnames?fnnames:[];\r\n if (rtl.isFunction(initfn)){\r\n // rtti\r\n if (rtl.debug_rtti) rtl.debug('createInterface '+i.$fullname);\r\n var t = i.$module.$rtti.$Interface(i.$name,{ \"interface\": i, module: module });\r\n i.$rtti = t;\r\n if (ancestor) t.ancestor = ancestor.$rtti;\r\n if (!t.ancestor) t.ancestor = null;\r\n initfn.call(i);\r\n }\r\n return i;\r\n },\r\n\r\n strToGUIDR: function(s,g){\r\n var p = 0;\r\n function n(l){\r\n var h = s.substr(p,l);\r\n p+=l;\r\n return parseInt(h,16);\r\n }\r\n p+=1; // skip {\r\n g.D1 = n(8);\r\n p+=1; // skip -\r\n g.D2 = n(4);\r\n p+=1; // skip -\r\n g.D3 = n(4);\r\n p+=1; // skip -\r\n if (!g.D4) g.D4=[];\r\n g.D4[0] = n(2);\r\n g.D4[1] = n(2);\r\n p+=1; // skip -\r\n for(var i=2; i<8; i++) g.D4[i] = n(2);\r\n return g;\r\n },\r\n\r\n guidrToStr: function(g){\r\n if (g.$intf) return g.$intf.$guid;\r\n var h = rtl.hexStr;\r\n var s='{'+h(g.D1,8)+'-'+h(g.D2,4)+'-'+h(g.D3,4)+'-'+h(g.D4[0],2)+h(g.D4[1],2)+'-';\r\n for (var i=2; i<8; i++) s+=h(g.D4[i],2);\r\n s+='}';\r\n return s;\r\n },\r\n\r\n createTGUID: function(guid){\r\n var TGuid = (pas.System)?pas.System.TGuid:pas.system.tguid;\r\n var g = rtl.strToGUIDR(guid,TGuid.$new());\r\n return g;\r\n },\r\n\r\n getIntfGUIDR: function(intfTypeOrVar){\r\n if (!intfTypeOrVar) return null;\r\n if (!intfTypeOrVar.$guidr){\r\n var g = rtl.createTGUID(intfTypeOrVar.$guid);\r\n if (!intfTypeOrVar.hasOwnProperty('$guid')) intfTypeOrVar = Object.getPrototypeOf(intfTypeOrVar);\r\n g.$intf = intfTypeOrVar;\r\n intfTypeOrVar.$guidr = g;\r\n }\r\n return intfTypeOrVar.$guidr;\r\n },\r\n\r\n addIntf: function (aclass, intf, map){\r\n function jmp(fn){\r\n if (typeof(fn)===\"function\"){\r\n return function(){ return fn.apply(this.$o,arguments); };\r\n } else {\r\n return function(){ rtl.raiseE('EAbstractError'); };\r\n }\r\n }\r\n if(!map) map = {};\r\n var t = intf;\r\n var item = Object.create(t);\r\n if (!aclass.hasOwnProperty('$intfmaps')) aclass.$intfmaps = {};\r\n aclass.$intfmaps[intf.$guid] = item;\r\n do{\r\n var names = t.$names;\r\n if (!names) break;\r\n for (var i=0; i=-0x1fffffffffffff) && (i<=0x1fffffffffffff)) return i;\r\n rtl.raiseE('EIntOverflow');\r\n },\r\n\r\n rc: function(i,minval,maxval){\r\n // range check integer\r\n if ((Math.floor(i)===i) && (i>=minval) && (i<=maxval)) return i;\r\n rtl.raiseE('ERangeError');\r\n },\r\n\r\n rcc: function(c,minval,maxval){\r\n // range check char\r\n if ((typeof(c)==='string') && (c.length===1)){\r\n var i = c.charCodeAt(0);\r\n if ((i>=minval) && (i<=maxval)) return c;\r\n }\r\n rtl.raiseE('ERangeError');\r\n },\r\n\r\n rcSetCharAt: function(s,index,c){\r\n // range check setCharAt\r\n if ((typeof(s)!=='string') || (index<0) || (index>=s.length)) rtl.raiseE('ERangeError');\r\n return rtl.setCharAt(s,index,c);\r\n },\r\n\r\n rcCharAt: function(s,index){\r\n // range check charAt\r\n if ((typeof(s)!=='string') || (index<0) || (index>=s.length)) rtl.raiseE('ERangeError');\r\n return s.charAt(index);\r\n },\r\n\r\n rcArrR: function(arr,index){\r\n // range check read array\r\n if (Array.isArray(arr) && (typeof(index)==='number') && (index>=0) && (index2){\r\n // arr,index1,index2,...\r\n arr=arr[index];\r\n for (var i=2; i=0) && (index0){\r\n item=stack[depth-1];\r\n src = (item.src && item.src.length>item.i)?item.src[item.i]:null;\r\n }\r\n if (!src){\r\n a = [];\r\n srclen = 0;\r\n oldlen = 0;\r\n } else if (src.$pas2jsrefcnt>0 || depth>=s){\r\n a = [];\r\n srclen = src.length;\r\n oldlen = srclen;\r\n } else {\r\n a = src;\r\n srclen = 0;\r\n oldlen = a.length;\r\n }\r\n lastlen = stack[depth].dim;\r\n a.length = lastlen;\r\n if (depth>0){\r\n item.a[item.i]=a;\r\n item.i++;\r\n if ((lastlen===0) && (item.i0){\r\n if (depthlastlen) srclen=lastlen;\r\n if (rtl.isArray(defaultvalue)){\r\n // array of dyn array\r\n for (var i=0; i0) && (stack[depth-1].i>=stack[depth-1].dim)){\r\n depth--;\r\n };\r\n if (depth===0){\r\n if (dimmax===0) return a;\r\n return stack[0].a;\r\n }\r\n }while (true);\r\n },\r\n\r\n arrayEq: function(a,b){\r\n if (a===null) return b===null;\r\n if (b===null) return false;\r\n if (a.length!==b.length) return false;\r\n for (var i=0; isrcarray.length) end = srcarray.length;\r\n if (index>=end) return [];\r\n if (type===0){\r\n return srcarray.slice(index,end);\r\n } else {\r\n var a = [];\r\n a.length = end-index;\r\n rtl.arrayClone(type,srcarray,index,end,a,0);\r\n return a;\r\n }\r\n },\r\n\r\n arrayInsert: function(item, arr, index){\r\n if (arr){\r\n arr.splice(index,0,item);\r\n return arr;\r\n } else {\r\n return [item];\r\n }\r\n },\r\n\r\n setCharAt: function(s,index,c){\r\n return s.substr(0,index)+c+s.substr(index+1);\r\n },\r\n\r\n getResStr: function(mod,name){\r\n var rs = mod.$resourcestrings[name];\r\n return rs.current?rs.current:rs.org;\r\n },\r\n\r\n createSet: function(){\r\n var s = {};\r\n for (var i=0; i newlen){\r\n return s.substring(0,newlen);\r\n } else if (s.repeat){\r\n // Note: repeat needs ECMAScript6!\r\n return s+' '.repeat(newlen-oldlen);\r\n } else {\r\n while (oldlen=width) return s;\r\n if (s.repeat){\r\n // Note: repeat needs ECMAScript6!\r\n return ' '.repeat(width-l) + s;\r\n } else {\r\n while (l2){\r\n return rtl.spaceLeft(d.toFixed(p),w);\r\n } else {\r\n\t // exponent width\r\n\t var pad = \"\";\r\n\t var ad = Math.abs(d);\r\n\t if (((ad>1) && (ad<1.0e+10)) || ((ad>1.e-10) && (ad<1))) {\r\n\t\tpad='00';\r\n\t } else if ((ad>1) && (ad<1.0e+100) || (ad<1.e-10)) {\r\n\t\tpad='0';\r\n } \t\r\n\t if (arguments.length<2) {\r\n\t w=24;\t\t\r\n } else if (w<9) {\r\n\t\tw=9;\r\n }\t\t \r\n var p = w-8;\r\n var s=(d>0 ? \" \" : \"\" ) + d.toExponential(p);\r\n s=s.replace(/e(.)/,'E$1'+pad);\r\n return rtl.spaceLeft(s,w);\r\n }\r\n },\r\n\r\n valEnum: function(s, enumType, setCodeFn){\r\n s = s.toLowerCase();\r\n for (var key in enumType){\r\n if((typeof(key)==='string') && (key.toLowerCase()===s)){\r\n setCodeFn(0);\r\n return enumType[key];\r\n }\r\n }\r\n setCodeFn(1);\r\n return 0;\r\n },\r\n\r\n lw: function(l){\r\n // fix longword bitwise operation\r\n return l<0?l+0x100000000:l;\r\n },\r\n\r\n and: function(a,b){\r\n var hi = 0x80000000;\r\n var low = 0x7fffffff;\r\n var h = (a / hi) & (b / hi);\r\n var l = (a & low) & (b & low);\r\n return h*hi + l;\r\n },\r\n\r\n or: function(a,b){\r\n var hi = 0x80000000;\r\n var low = 0x7fffffff;\r\n var h = (a / hi) | (b / hi);\r\n var l = (a & low) | (b & low);\r\n return h*hi + l;\r\n },\r\n\r\n xor: function(a,b){\r\n var hi = 0x80000000;\r\n var low = 0x7fffffff;\r\n var h = (a / hi) ^ (b / hi);\r\n var l = (a & low) ^ (b & low);\r\n return h*hi + l;\r\n },\r\n\r\n shr: function(a,b){\r\n if (a<0) a += rtl.hiInt;\r\n if (a<0x80000000) return a >> b;\r\n if (b<=0) return a;\r\n if (b>54) return 0;\r\n return Math.floor(a / Math.pow(2,b));\r\n },\r\n\r\n shl: function(a,b){\r\n if (a<0) a += rtl.hiInt;\r\n if (b<=0) return a;\r\n if (b>54) return 0;\r\n var r = a * Math.pow(2,b);\r\n if (r <= rtl.hiInt) return r;\r\n return r % rtl.hiInt;\r\n },\r\n\r\n initRTTI: function(){\r\n if (rtl.debug_rtti) rtl.debug('initRTTI');\r\n\r\n // base types\r\n rtl.tTypeInfo = { name: \"tTypeInfo\", kind: 0, $module: null, attr: null };\r\n function newBaseTI(name,kind,ancestor){\r\n if (!ancestor) ancestor = rtl.tTypeInfo;\r\n if (rtl.debug_rtti) rtl.debug('initRTTI.newBaseTI \"'+name+'\" '+kind+' (\"'+ancestor.name+'\")');\r\n var t = Object.create(ancestor);\r\n t.name = name;\r\n t.kind = kind;\r\n rtl[name] = t;\r\n return t;\r\n };\r\n function newBaseInt(name,minvalue,maxvalue,ordtype){\r\n var t = newBaseTI(name,1 /* tkInteger */,rtl.tTypeInfoInteger);\r\n t.minvalue = minvalue;\r\n t.maxvalue = maxvalue;\r\n t.ordtype = ordtype;\r\n return t;\r\n };\r\n newBaseTI(\"tTypeInfoInteger\",1 /* tkInteger */);\r\n newBaseInt(\"shortint\",-0x80,0x7f,0);\r\n newBaseInt(\"byte\",0,0xff,1);\r\n newBaseInt(\"smallint\",-0x8000,0x7fff,2);\r\n newBaseInt(\"word\",0,0xffff,3);\r\n newBaseInt(\"longint\",-0x80000000,0x7fffffff,4);\r\n newBaseInt(\"longword\",0,0xffffffff,5);\r\n newBaseInt(\"nativeint\",-0x10000000000000,0xfffffffffffff,6);\r\n newBaseInt(\"nativeuint\",0,0xfffffffffffff,7);\r\n newBaseTI(\"char\",2 /* tkChar */);\r\n newBaseTI(\"string\",3 /* tkString */);\r\n newBaseTI(\"tTypeInfoEnum\",4 /* tkEnumeration */,rtl.tTypeInfoInteger);\r\n newBaseTI(\"tTypeInfoSet\",5 /* tkSet */);\r\n newBaseTI(\"double\",6 /* tkDouble */);\r\n newBaseTI(\"boolean\",7 /* tkBool */);\r\n newBaseTI(\"tTypeInfoProcVar\",8 /* tkProcVar */);\r\n newBaseTI(\"tTypeInfoMethodVar\",9 /* tkMethod */,rtl.tTypeInfoProcVar);\r\n newBaseTI(\"tTypeInfoArray\",10 /* tkArray */);\r\n newBaseTI(\"tTypeInfoDynArray\",11 /* tkDynArray */);\r\n newBaseTI(\"tTypeInfoPointer\",15 /* tkPointer */);\r\n var t = newBaseTI(\"pointer\",15 /* tkPointer */,rtl.tTypeInfoPointer);\r\n t.reftype = null;\r\n newBaseTI(\"jsvalue\",16 /* tkJSValue */);\r\n newBaseTI(\"tTypeInfoRefToProcVar\",17 /* tkRefToProcVar */,rtl.tTypeInfoProcVar);\r\n\r\n // member kinds\r\n rtl.tTypeMember = { attr: null };\r\n function newMember(name,kind){\r\n var m = Object.create(rtl.tTypeMember);\r\n m.name = name;\r\n m.kind = kind;\r\n rtl[name] = m;\r\n };\r\n newMember(\"tTypeMemberField\",1); // tmkField\r\n newMember(\"tTypeMemberMethod\",2); // tmkMethod\r\n newMember(\"tTypeMemberProperty\",3); // tmkProperty\r\n\r\n // base object for storing members: a simple object\r\n rtl.tTypeMembers = {};\r\n\r\n // tTypeInfoStruct - base object for tTypeInfoClass, tTypeInfoRecord, tTypeInfoInterface\r\n var tis = newBaseTI(\"tTypeInfoStruct\",0);\r\n tis.$addMember = function(name,ancestor,options){\r\n if (rtl.debug_rtti){\r\n if (!rtl.hasString(name) || (name.charAt()==='$')) throw 'invalid member \"'+name+'\", this=\"'+this.name+'\"';\r\n if (!rtl.is(ancestor,rtl.tTypeMember)) throw 'invalid ancestor \"'+ancestor+':'+ancestor.name+'\", \"'+this.name+'.'+name+'\"';\r\n if ((options!=undefined) && (typeof(options)!='object')) throw 'invalid options \"'+options+'\", \"'+this.name+'.'+name+'\"';\r\n };\r\n var t = Object.create(ancestor);\r\n t.name = name;\r\n this.members[name] = t;\r\n this.names.push(name);\r\n if (rtl.isObject(options)){\r\n for (var key in options) if (options.hasOwnProperty(key)) t[key] = options[key];\r\n };\r\n return t;\r\n };\r\n tis.addField = function(name,type,options){\r\n var t = this.$addMember(name,rtl.tTypeMemberField,options);\r\n if (rtl.debug_rtti){\r\n if (!rtl.is(type,rtl.tTypeInfo)) throw 'invalid type \"'+type+'\", \"'+this.name+'.'+name+'\"';\r\n };\r\n t.typeinfo = type;\r\n this.fields.push(name);\r\n return t;\r\n };\r\n tis.addFields = function(){\r\n var i=0;\r\n while(i = array of T;\r\n\r\n{*****************************************************************************\r\n TObject, TClass, IUnknown, IInterface, TInterfacedObject\r\n*****************************************************************************}\r\ntype\r\n TGuid = record\r\n D1: DWord;\r\n D2: word;\r\n D3: word;\r\n D4: array[0..7] of byte;\r\n end;\r\n TGUIDString = type string;\r\n\r\n PMethod = ^TMethod;\r\n TMethod = record\r\n Code : CodePointer;\r\n Data : Pointer;\r\n end;\r\n\r\n TClass = class of TObject;\r\n\r\n { TObject }\r\n\r\n {$DispatchField Msg} // enable checking message methods for record field name \"Msg\"\r\n {$DispatchStrField MsgStr}\r\n TObject = class\r\n private\r\n class var FClassName: String; external name '$classname';\r\n class var FClassParent: TClass; external name '$ancestor';\r\n class var FUnitName: String; external name '$module.$name';\r\n public\r\n constructor Create;\r\n destructor Destroy; virtual;\r\n\r\n // Free is using compiler magic.\r\n // Reasons:\r\n // 1. In JS calling obj.Free when obj=nil would crash.\r\n // 2. In JS freeing memory requires to set all references to nil.\r\n // Therefore any obj.free call is replaced by the compiler with some rtl magic.\r\n procedure Free;\r\n\r\n class function ClassType: TClass; assembler;\r\n class property ClassName: String read FClassName;\r\n class function ClassNameIs(const Name: string): boolean;\r\n class property ClassParent: TClass read FClassParent;\r\n class function InheritsFrom(aClass: TClass): boolean; assembler;\r\n class property UnitName: String read FUnitName;\r\n Class function MethodName(aCode : Pointer) : String;\r\n Class function MethodAddress(aName : String) : Pointer;\r\n Class Function FieldAddress(aName : String) : Pointer;\r\n Class Function ClassInfo : Pointer;\r\n class function QualifiedClassName: String;\r\n\r\n procedure AfterConstruction; virtual;\r\n procedure BeforeDestruction; virtual;\r\n\r\n // message handling routines\r\n procedure Dispatch(var aMessage); virtual;\r\n procedure DispatchStr(var aMessage); virtual;\r\n procedure DefaultHandler(var aMessage); virtual;\r\n procedure DefaultHandlerStr(var aMessage); virtual;\r\n\r\n function GetInterface(const iid: TGuid; out obj): boolean;\r\n function GetInterface(const iidstr: String; out obj): boolean; inline;\r\n function GetInterfaceByStr(const iidstr: String; out obj): boolean;\r\n function GetInterfaceWeak(const iid: TGuid; out obj): boolean; // equal to GetInterface but the interface returned is not referenced\r\n\r\n function Equals(Obj: TObject): boolean; virtual;\r\n function ToString: String; virtual;\r\n end;\r\n\r\n { TCustomAttribute - base class of all user defined attributes. }\r\n\r\n TCustomAttribute = class\r\n end;\r\n TCustomAttributeArray = array of TCustomAttribute;\r\n TCustomAttributeClass = class of TCustomAttribute;\r\n\r\n\r\nconst\r\n { IInterface }\r\n S_OK = 0;\r\n S_FALSE = 1;\r\n E_NOINTERFACE = -2147467262; // FPC: longint($80004002)\r\n E_UNEXPECTED = -2147418113; // FPC: longint($8000FFFF)\r\n E_NOTIMPL = -2147467263; // FPC: longint($80004001)\r\n\r\ntype\r\n {$Interfaces COM}\r\n IUnknown = interface\r\n ['{00000000-0000-0000-C000-000000000046}']\r\n function QueryInterface(const iid: TGuid; out obj): Integer;\r\n function _AddRef: Integer;\r\n function _Release: Integer;\r\n end;\r\n IInterface = IUnknown;\r\n\r\n {$M+}\r\n IInvokable = interface(IInterface)\r\n end;\r\n {$M-}\r\n\r\n { Enumerator support }\r\n IEnumerator = interface(IInterface)\r\n function GetCurrent: TObject;\r\n function MoveNext: Boolean;\r\n procedure Reset;\r\n property Current: TObject read GetCurrent;\r\n end;\r\n\r\n IEnumerable = interface(IInterface)\r\n function GetEnumerator: IEnumerator;\r\n end;\r\n\r\n { TInterfacedObject }\r\n\r\n TInterfacedObject = class(TObject,IUnknown)\r\n protected\r\n fRefCount: Integer;\r\n { implement methods of IUnknown }\r\n function QueryInterface(const iid: TGuid; out obj): Integer; virtual;\r\n function _AddRef: Integer; virtual;\r\n function _Release: Integer; virtual;\r\n public\r\n procedure BeforeDestruction; override;\r\n property RefCount: Integer read fRefCount;\r\n end;\r\n TInterfacedClass = class of TInterfacedObject;\r\n\r\n { TAggregatedObject - sub or satellite object using same interface as controller }\r\n\r\n TAggregatedObject = class(TObject)\r\n private\r\n fController: Pointer;\r\n function GetController: IUnknown;\r\n protected\r\n { implement methods of IUnknown }\r\n function QueryInterface(const iid: TGuid; out obj): Integer; virtual;\r\n function _AddRef: Integer; virtual;\r\n function _Release: Integer; virtual;\r\n public\r\n constructor Create(const aController: IUnknown); reintroduce;\r\n property Controller: IUnknown read GetController;\r\n end;\r\n\r\n { TContainedObject }\r\n\r\n TContainedObject = class(TAggregatedObject,IInterface)\r\n protected\r\n function QueryInterface(const iid: TGuid; out obj): Integer; override;\r\n end;\r\n\r\nconst\r\n { for safe as operator support }\r\n IObjectInstance: TGuid = '{D91C9AF4-3C93-420F-A303-BF5BA82BFD23}';\r\n\r\nfunction GUIDToString(const GUID: TGUID): string; external name 'rtl.guidrToStr';\r\n\r\n{*****************************************************************************\r\n RTTI support\r\n*****************************************************************************}\r\ntype\r\n // if you change the following enumeration type in any way\r\n // you also have to change the rtl.js in an appropriate way !\r\n TTypeKind = (\r\n tkUnknown, // 0\r\n tkInteger, // 1\r\n tkChar, // 2 in Delphi/FPC tkWChar, tkUChar\r\n tkString, // 3 in Delphi/FPC tkSString, tkWString or tkUString\r\n tkEnumeration, // 4\r\n tkSet, // 5\r\n tkDouble, // 6\r\n tkBool, // 7\r\n tkProcVar, // 8 function or procedure\r\n tkMethod, // 9 proc var of object\r\n tkArray, // 10 static array\r\n tkDynArray, // 11\r\n tkRecord, // 12\r\n tkClass, // 13\r\n tkClassRef, // 14\r\n tkPointer, // 15\r\n tkJSValue, // 16\r\n tkRefToProcVar, // 17 variable of procedure type\r\n tkInterface, // 18\r\n //tkObject,\r\n //tkSString,tkLString,tkAString,tkWString,\r\n //tkVariant,\r\n //tkWChar,\r\n //tkInt64,\r\n //tkQWord,\r\n //tkInterfaceRaw,\r\n //tkUString,tkUChar,\r\n tkHelper, // 19\r\n //tkFile,\r\n tkExtClass // 20\r\n );\r\n TTypeKinds = set of TTypeKind;\r\n\r\nconst\r\n tkFloat = tkDouble; // for compatibility with Delphi/FPC\r\n tkProcedure = tkProcVar; // for compatibility with Delphi\r\n tkAny = [Low(TTypeKind)..High(TTypeKind)];\r\n tkMethods = [tkMethod];\r\n tkProperties = tkAny-tkMethods-[tkUnknown];\r\n\r\n{*****************************************************************************\r\n Array of const support\r\n*****************************************************************************}\r\n\r\nconst\r\n vtInteger = 0;\r\n vtBoolean = 1;\r\n //vtChar = 2; // Delphi/FPC: ansichar\r\n vtExtended = 3; // Note: double in pas2js, PExtended in Delphi/FPC\r\n //vtString = 4; // Delphi/FPC: PShortString\r\n vtPointer = 5;\r\n //vtPChar = 6;\r\n vtObject = 7;\r\n vtClass = 8;\r\n vtWideChar = 9;\r\n //vtPWideChar = 10;\r\n //vtAnsiString = 11;\r\n vtCurrency = 12; // Note: currency in pas2js, PCurrency in Delphi/FPC\r\n //vtVariant = 13;\r\n vtInterface = 14;\r\n //vtWideString = 15;\r\n //vtInt64 = 16;\r\n //vtQWord = 17;\r\n vtUnicodeString = 18;\r\n // only pas2js, not in Delphi/FPC:\r\n vtNativeInt = 19;\r\n vtJSValue = 20;\r\n\r\ntype\r\n PVarRec = ^TVarRec;\r\n TVarRec = record\r\n VType: byte;\r\n VJSValue: JSValue;\r\n VInteger: LongInt external name 'VJSValue';\r\n VBoolean: Boolean external name 'VJSValue';\r\n VExtended: Double external name 'VJSValue';\r\n VPointer: Pointer external name 'VJSValue';\r\n VObject: TObject external name 'VJSValue';\r\n VClass: TClass external name 'VJSValue';\r\n VWideChar: WideChar external name 'VJSValue';\r\n VCurrency: Currency external name 'VJSValue';\r\n VInterface: Pointer external name 'VJSValue';\r\n VUnicodeString: UnicodeString external name 'VJSValue';\r\n VNativeInt: NativeInt external name 'VJSValue';\r\n end;\r\n TVarRecArray = array of TVarRec;\r\n\r\nfunction VarRecs: TVarRecArray; varargs;\r\n\r\n{*****************************************************************************\r\n Init / Exit / ExitProc\r\n*****************************************************************************}\r\nvar\r\n ExitCode: Integer; external name 'rtl.exitcode';\r\n IsConsole: Boolean = {$IFDEF NodeJS}true{$ELSE}false{$ENDIF};\r\n FirstDotAtFileNameStartIsExtension : Boolean = False;\r\n\r\ntype\r\n TOnParamCount = function: Longint;\r\n TOnParamStr = function(Index: Longint): String;\r\nvar\r\n OnParamCount: TOnParamCount;\r\n OnParamStr: TOnParamStr;\r\n\r\nfunction ParamCount: Longint;\r\nfunction ParamStr(Index: Longint): String;\r\n\r\n{*****************************************************************************\r\n Math\r\n*****************************************************************************}\r\nconst\r\n PI: Double; external name 'Math.PI';\r\n MathE: Double; external name 'Math.E'; // Euler's number\r\n MathLN10: Double; external name 'Math.LN10'; // ln(10)\r\n MathLN2: Double; external name 'Math.LN2'; // ln(2)\r\n MathLog10E: Double; external name 'Math.Log10E'; // log10(e)\r\n MathLog2E: Double; external name 'Math.LOG2E'; // log2(e)\r\n MathSQRT1_2: Double; external name 'Math.SQRT1_2'; // sqrt(0.5)\r\n MathSQRT2: Double; external name 'Math.SQRT2'; // sqrt(2)\r\n\r\nfunction Abs(const A: integer): integer; overload; external name 'Math.abs';\r\nfunction Abs(const A: NativeInt): integer; overload; external name 'Math.abs';\r\nfunction Abs(const A: Double): Double; overload; external name 'Math.abs';\r\nfunction ArcTan(const A: Double): Double; external name 'Math.atan';\r\nfunction ArcTan2(const A,B: Double): Double; external name 'Math.atan2';\r\nfunction Cos(const A: Double): Double; external name 'Math.cos';\r\nfunction Exp(const A: Double): Double; external name 'Math.exp';\r\nfunction Frac(const A: Double): Double; assembler;\r\nfunction Ln(const A: Double): Double; external name 'Math.log';\r\nfunction Odd(const A: Integer): Boolean; assembler;\r\nfunction Random(const Range: Integer): Integer; overload; assembler;\r\nfunction Random: Double; overload; external name 'Math.random';\r\nfunction Round(const A: Double): NativeInt; external name 'Math.round';\r\nfunction Sin(const A: Double): Double; external name 'Math.sin';\r\nfunction Tan(const A: Double): Double; external name 'Math.tan';\r\nfunction Sqr(const A: Integer): Integer; assembler; overload;\r\nfunction Sqr(const A: Double): Double; assembler; overload;\r\nfunction sqrt(const A: Double): Double; external name 'Math.sqrt';\r\nfunction Trunc(const A: Double): NativeInt;\r\n\r\n{*****************************************************************************\r\n String functions\r\n*****************************************************************************}\r\nconst\r\n DefaultTextLineBreakStyle : TTextLineBreakStyle = tlbsLF;\r\n\r\nfunction Int(const A: Double): double;\r\nfunction Copy(const S: string; Index, Size: Integer): String; assembler; overload;\r\nfunction Copy(const S: string; Index: Integer): String; assembler; overload;\r\nprocedure Delete(var S: String; Index, Size: Integer); overload;\r\nfunction Pos(const Search, InString: String): Integer; assembler; overload;\r\nfunction Pos(const Search, InString: String; StartAt : Integer): Integer; assembler; overload;\r\nprocedure Insert(const Insertion: String; var Target: String; Index: Integer); overload;\r\nfunction upcase(c : char) : char; assembler;\r\nfunction HexStr(Val: NativeInt; cnt: byte): string; external name 'rtl.hexStr'; overload;\r\nfunction binstr(val : NativeUInt; cnt : byte) : string;\r\n\r\nprocedure val(const S: String; out NI : NativeInt; out Code: Integer); overload;\r\nprocedure val(const S: String; out NI : NativeUInt; out Code: Integer); overload;\r\nprocedure val(const S: String; out SI : ShortInt; out Code: Integer); overload;\r\nprocedure val(const S: String; out B : Byte; out Code: Integer); overload;\r\nprocedure val(const S: String; out SI : smallint; out Code: Integer); overload;\r\nprocedure val(const S: String; out W : word; out Code : Integer); overload;\r\nprocedure val(const S: String; out I : integer; out Code : Integer); overload;\r\nprocedure val(const S: String; out C : Cardinal; out Code: Integer); overload;\r\nprocedure val(const S: String; out d : double; out Code : Integer); overload;\r\nprocedure val(const S: String; out b : boolean; out Code: Integer); overload;\r\nfunction StringOfChar(c: Char; l: NativeInt): String;\r\n\r\n{*****************************************************************************\r\n Other functions\r\n*****************************************************************************}\r\nprocedure Write; varargs; // ToDo: should be compiler built-in function\r\nprocedure Writeln; varargs; // ToDo: should be compiler built-in function\r\n\r\nType\r\n TConsoleHandler = Procedure (S : JSValue; NewLine : Boolean);\r\nFunction SetWriteCallBack(H : TConsoleHandler) : TConsoleHandler;\r\n\r\nfunction Assigned(const V: JSValue): boolean; assembler; overload;\r\nfunction StrictEqual(const A: JSValue; const B): boolean; assembler;\r\nfunction StrictInequal(const A: JSValue; const B): boolean; assembler;\r\n\r\nimplementation\r\n\r\ntype\r\n\r\n { TJSObj - simple access to JS Object }\r\n\r\n TJSObj = class external name 'Object'\r\n private\r\n function GetProperties(Name: String): JSValue; external name '[]';\r\n procedure SetProperties(Name: String; const AValue: JSValue); external name '[]';\r\n public\r\n //constructor new;\r\n //function hasOwnProperty(prop: String): boolean;\r\n property Properties[Name: String]: JSValue read GetProperties write SetProperties; default;\r\n end;\r\n\r\n TJSArray = class external name 'Array'\r\n public\r\n //length: nativeint;\r\n //constructor new; overload;\r\n function push(aElement : JSValue) : NativeInt; varargs;\r\n end;\r\n\r\n TJSArguments = class external name 'arguments'\r\n private\r\n FLength: NativeInt; external name 'length';\r\n function GetElements(Index: NativeInt): JSValue; external name '[]';\r\n public\r\n property Length: NativeInt read FLength;\r\n property Elements[Index: NativeInt]: JSValue read GetElements; default;\r\n end;\r\nvar\r\n JSArguments: TJSArguments; external name 'arguments';\r\n\r\nfunction isNumber(const v: JSValue): boolean; external name 'rtl.isNumber';\r\nfunction isObject(const v: JSValue): boolean; external name 'rtl.isObject'; // true if not null and a JS Object\r\nfunction isString(const v: JSValue): boolean; external name 'rtl.isString';\r\nfunction isNaN(i: JSValue): boolean; external name 'isNaN'; // may result NaN\r\n\r\n// needed by ClassNameIs, the real SameText is in SysUtils\r\nfunction SameText(const s1, s2: String): Boolean; assembler;\r\nasm\r\n return s1.toLowerCase() == s2.toLowerCase();\r\nend;\r\n\r\nfunction VarRecs: TVarRecArray;\r\nvar\r\n i: nativeint;\r\n v: PVarRec;\r\nbegin\r\n Result:=nil;\r\n while i0) ? S.substring(Index-1,Index+Size-1) : \"\";\r\nend;\r\n\r\nfunction Copy(const S: string; Index: Integer): String; assembler;\r\nasm\r\n if (Index<1) Index = 1;\r\n return S.substr(Index-1);\r\nend;\r\n\r\nprocedure Delete(var S: String; Index, Size: Integer);\r\nvar\r\n h: String;\r\nbegin\r\n if (Index<1) or (Index>length(S)) or (Size<=0) then exit;\r\n h:=S;\r\n S:=copy(h,1,Index-1)+copy(h,Index+Size);\r\nend;\r\n\r\nfunction Pos(const Search, InString: String): Integer; assembler;\r\nasm\r\n return InString.indexOf(Search)+1;\r\nend;\r\n\r\nfunction Pos(const Search, InString: String; StartAt : Integer): Integer; assembler; overload;\r\nasm\r\n return InString.indexOf(Search,StartAt-1)+1;\r\nend;\r\n\r\nprocedure Insert(const Insertion: String; var Target: String; Index: Integer);\r\nvar\r\n t: String;\r\nbegin\r\n if Insertion='' then exit;\r\n t:=Target;\r\n if Index<1 then\r\n Target:=Insertion+t\r\n else if Index>length(t) then\r\n Target:=t+Insertion\r\n else\r\n Target:=copy(t,1,Index-1)+Insertion+copy(t,Index,length(t));\r\nend;\r\n\r\nvar\r\n WriteBuf: String;\r\n WriteCallBack : TConsoleHandler;\r\n\r\nFunction SetWriteCallBack(H : TConsoleHandler) : TConsoleHandler;\r\n\r\nbegin\r\n Result:=WriteCallBack;\r\n WriteCallBack:=H;\r\nend;\r\n\r\nprocedure Write;\r\nvar\r\n i: Integer;\r\nbegin\r\n for i:=0 to JSArguments.Length-1 do\r\n if Assigned(WriteCallBack) then\r\n WriteCallBack(JSArguments[i],False)\r\n else\r\n WriteBuf:=WriteBuf+String(JSArguments[i]);\r\nend;\r\n\r\nprocedure Writeln;\r\n\r\nvar\r\n i,l: Integer;\r\n s: String;\r\n\r\nbegin\r\n L:=JSArguments.Length-1;\r\n if Assigned(WriteCallBack) then\r\n begin\r\n for i:=0 to L do\r\n WriteCallBack(JSArguments[i],I=L);\r\n end\r\n else\r\n begin\r\n s:=WriteBuf;\r\n for i:=0 to L do\r\n s:=s+String(JSArguments[i]);\r\n asm\r\n console.log(s);\r\n end;\r\n WriteBuf:='';\r\n end;\r\nend;\r\n\r\nfunction Int(const A: Double): double;\r\n\r\nbegin\r\n // trunc contains fix for missing Math.trunc in IE\r\n Result:=Trunc(A);\r\nend;\r\n\r\nfunction Number(S: String): Double; external name 'Number';\r\n\r\nfunction valint(const S: String; MinVal, MaxVal: NativeInt; out Code: Integer): NativeInt;\r\nvar\r\n x: double;\r\nbegin\r\n if S='' then\r\n begin\r\n code:=1;\r\n exit;\r\n end;\r\n x:=Number(S);\r\n if isNaN(x) then\r\n case copy(s,1,1) of\r\n '$': x:=Number('0x'+copy(S,2));\r\n '&': x:=Number('0o'+copy(S,2));\r\n '%': x:=Number('0b'+copy(S,2));\r\n else\r\n Code:=1;\r\n exit;\r\n end;\r\n if isNaN(x) or (X<>Int(X)) then\r\n Code:=1\r\n else if (xMaxVal) then\r\n Code:=2\r\n else\r\n begin\r\n Result:=Trunc(x);\r\n Code:=0;\r\n end;\r\nend;\r\n\r\nprocedure val(const S: String; out NI : NativeInt; out Code: Integer);\r\nbegin\r\n NI:=valint(S,low(NI),high(NI),Code);\r\nend;\r\n\r\nprocedure val(const S: String; out NI: NativeUInt; out Code: Integer);\r\nvar\r\n x : double;\r\nbegin\r\n if S='' then\r\n begin\r\n code:=1;\r\n exit;\r\n end;\r\n x:=Number(S);\r\n if isNaN(x) or (X<>Int(X)) or (X<0) then\r\n Code:=1\r\n else\r\n begin\r\n Code:=0;\r\n NI:=Trunc(x);\r\n end;\r\nend;\r\n\r\nprocedure val(const S: String; out SI : ShortInt; out Code: Integer);\r\nbegin\r\n SI:=valint(S,low(SI),high(SI),Code);\r\nend;\r\n\r\nprocedure val(const S: String; out SI: smallint; out Code: Integer);\r\nbegin\r\n SI:=valint(S,low(SI),high(SI),Code);\r\nend;\r\n\r\nprocedure val(const S: String; out C: Cardinal; out Code: Integer);\r\nbegin\r\n C:=valint(S,low(C),high(C),Code);\r\nend;\r\n\r\nprocedure val(const S: String; out B: Byte; out Code: Integer);\r\nbegin\r\n B:=valint(S,low(B),high(B),Code);\r\nend;\r\n\r\nprocedure val(const S: String; out W: word; out Code: Integer);\r\nbegin\r\n W:=valint(S,low(W),high(W),Code);\r\nend;\r\n\r\nprocedure val(const S : String; out I : integer; out Code : Integer);\r\nbegin\r\n I:=valint(S,low(I),high(I),Code);\r\nend;\r\n\r\nprocedure val(const S : String; out d : double; out Code : Integer);\r\nVar\r\n x: double;\r\nbegin\r\n if S='' then\r\n begin\r\n code:=1;\r\n exit;\r\n end;\r\n x:=Number(S);\r\n if isNaN(x) then\r\n Code:=1\r\n else\r\n begin\r\n Code:=0;\r\n d:=x;\r\n end;\r\nend;\r\n\r\nprocedure val(const S: String; out b: boolean; out Code: Integer);\r\nbegin\r\n if SameText(S,'true') then\r\n begin\r\n Code:=0;\r\n b:=true;\r\n end\r\n else if SameText(S,'false') then\r\n begin\r\n Code:=0;\r\n b:=false;\r\n end\r\n else\r\n Code:=1;\r\nend;\r\n\r\nfunction binstr(val : NativeUInt;cnt : byte) : string;\r\nvar\r\n i : Integer;\r\nbegin\r\n SetLength(Result,cnt);\r\n for i:=cnt downto 1 do\r\n begin\r\n Result[i]:=char(48+val and 1);\r\n val:=val shr 1;\r\n end;\r\nend;\r\n\r\nfunction upcase(c : char) : char; assembler;\r\nasm\r\n return c.toUpperCase();\r\nend;\r\n\r\nfunction StringOfChar(c: Char; l: NativeInt): String;\r\nvar\r\n i: Integer;\r\nbegin\r\n asm\r\n if ((l>0) && c.repeat) return c.repeat(l);\r\n end;\r\n Result:='';\r\n for i:=1 to l do Result:=Result+c;\r\nend;\r\n\r\nfunction Assigned(const V: JSValue): boolean; assembler;\r\nasm\r\n return (V!=undefined) && (V!=null) && (!rtl.isArray(V) || (V.length > 0));\r\nend;\r\n\r\nfunction StrictEqual(const A: JSValue; const B): boolean; assembler;\r\nasm\r\n return A === B;\r\nend;\r\n\r\nfunction StrictInequal(const A: JSValue; const B): boolean; assembler;\r\nasm\r\n return A !== B;\r\nend;\r\n\r\n{ TContainedObject }\r\n\r\nfunction TContainedObject.QueryInterface(const iid: TGuid; out obj): Integer;\r\nbegin\r\n if GetInterface(iid,obj) then\r\n Result:=S_OK\r\n else\r\n Result:=Integer(E_NOINTERFACE);\r\nend;\r\n\r\n{ TAggregatedObject }\r\n\r\nfunction TAggregatedObject.GetController: IUnknown;\r\nbegin\r\n Result := IUnknown(fController);\r\nend;\r\n\r\nfunction TAggregatedObject.QueryInterface(const iid: TGuid; out obj): Integer;\r\nbegin\r\n Result := IUnknown(fController).QueryInterface(iid, obj);\r\nend;\r\n\r\nfunction TAggregatedObject._AddRef: Integer;\r\nbegin\r\n Result := IUnknown(fController)._AddRef;\r\nend;\r\n\r\nfunction TAggregatedObject._Release: Integer;\r\nbegin\r\n Result := IUnknown(fController)._Release;\r\nend;\r\n\r\nconstructor TAggregatedObject.Create(const aController: IUnknown);\r\nbegin\r\n inherited Create;\r\n { do not keep a counted reference to the controller! }\r\n fController := Pointer(aController);\r\nend;\r\n\r\n{ TInterfacedObject }\r\n\r\nfunction TInterfacedObject.QueryInterface(const iid: TGuid; out obj): Integer;\r\nbegin\r\n if GetInterface(iid,obj) then\r\n Result:=S_OK\r\n else\r\n Result:=Integer(E_NOINTERFACE);\r\nend;\r\n\r\nfunction TInterfacedObject._AddRef: Integer;\r\nbegin\r\n inc(fRefCount);\r\n Result:=fRefCount;\r\nend;\r\n\r\nfunction TInterfacedObject._Release: Integer;\r\nbegin\r\n dec(fRefCount);\r\n Result:=fRefCount;\r\n if fRefCount=0 then\r\n Destroy;\r\nend;\r\n\r\nprocedure TInterfacedObject.BeforeDestruction;\r\nbegin\r\n if fRefCount<>0 then\r\n asm\r\n rtl.raiseE('EHeapMemoryError');\r\n end;\r\nend;\r\n\r\n{ TObject }\r\n\r\nconstructor TObject.Create;\r\nbegin\r\n\r\nend;\r\n\r\ndestructor TObject.Destroy;\r\nbegin\r\n\r\nend;\r\n\r\nprocedure TObject.Free;\r\nbegin\r\n Destroy;\r\nend;\r\n\r\nclass function TObject.ClassType: TClass; assembler;\r\nasm\r\n return this;\r\nend;\r\n\r\nclass function TObject.ClassNameIs(const Name: string): boolean;\r\nbegin\r\n Result:=SameText(Name,ClassName);\r\nend;\r\n\r\nclass function TObject.InheritsFrom(aClass: TClass): boolean; assembler;\r\nasm\r\n return (aClass!=null) && ((this==aClass) || aClass.isPrototypeOf(this));\r\nend;\r\n\r\nClass function TObject.MethodName(aCode : Pointer) : String;\r\n\r\nbegin\r\n Result:='';\r\n if aCode=Nil then\r\n exit;\r\nasm\r\n if (typeof(aCode)!=='function') return \"\";\r\n var i = 0;\r\n var TI = this.$rtti;\r\n if (rtl.isObject(aCode.scope)){\r\n // callback\r\n if (typeof aCode.fn === \"string\") return aCode.fn;\r\n aCode = aCode.fn;\r\n }\r\n // Not a callback, check rtti\r\n while ((Result === \"\") && (TI != null)) {\r\n i = 0;\r\n while ((Result === \"\") && (i < TI.methods.length)) {\r\n if (this[TI.getMethod(i).name] === aCode)\r\n Result=TI.getMethod(i).name;\r\n i += 1;\r\n };\r\n if (Result === \"\") TI = TI.ancestor;\r\n };\r\n // return Result;\r\nend;\r\nend;\r\n\r\nClass function TObject.MethodAddress(aName : String) : Pointer;\r\n\r\n// We must do this in asm, because the typinfo unit is not available.\r\nbegin\r\n Result:=Nil;\r\n if AName='' then\r\n exit;\r\nasm\r\n var i = 0;\r\n var TI = this.$rtti;\r\n var N = \"\";\r\n var MN = \"\";\r\n N = aName.toLowerCase();\r\n while ((MN === \"\") && (TI != null)) {\r\n i = 0;\r\n while ((MN === \"\") && (i < TI.methods.length)) {\r\n if (TI.getMethod(i).name.toLowerCase() === N) MN = TI.getMethod(i).name;\r\n i += 1;\r\n };\r\n if (MN === \"\") TI = TI.ancestor;\r\n };\r\n if (MN !== \"\") Result = this[MN];\r\n// return Result;\r\nend;\r\nend;\r\n\r\nclass function TObject.FieldAddress(aName: String): Pointer;\r\n\r\nbegin\r\n Result:=Nil;\r\n if aName='' then exit;\r\n asm\r\n var aClass = this.$class;\r\n var ClassTI = null;\r\n var myName = aName.toLowerCase();\r\n var MemberTI = null;\r\n while (aClass !== null) {\r\n ClassTI = aClass.$rtti;\r\n for (var i = 0, $end2 = ClassTI.fields.length - 1; i <= $end2; i++) {\r\n MemberTI = ClassTI.getField(i);\r\n if (MemberTI.name.toLowerCase() === myName) {\r\n return MemberTI;\r\n };\r\n };\r\n aClass = aClass.$ancestor ? aClass.$ancestor : null;\r\n };\r\n end;\r\nend;\r\n\r\nClass Function TObject.ClassInfo : Pointer;\r\n\r\nbegin\r\n // This works different from FPC/Delphi.\r\n // We get the actual type info.\r\n Result:=TypeInfo(Self);\r\nend;\r\n\r\nprocedure TObject.AfterConstruction;\r\nbegin\r\n\r\nend;\r\n\r\nprocedure TObject.BeforeDestruction;\r\nbegin\r\n\r\nend;\r\n\r\nprocedure TObject.Dispatch(var aMessage);\r\n// aMessage is a record with an integer field 'Msg'\r\nvar\r\n aClass: TClass;\r\n Msg: TJSObj absolute aMessage;\r\n Id: jsvalue;\r\nbegin\r\n if not isObject(Msg) then exit;\r\n Id:=Msg['Msg'];\r\n if not isNumber(Id) then exit;\r\n aClass:=ClassType;\r\n while aClass<>nil do\r\n begin\r\n asm\r\n var Handlers = aClass.$msgint;\r\n if (rtl.isObject(Handlers) && Handlers.hasOwnProperty(Id)){\r\n this[Handlers[Id]](aMessage);\r\n return;\r\n }\r\n end;\r\n aClass:=aClass.ClassParent;\r\n end;\r\n DefaultHandler(aMessage);\r\nend;\r\n\r\nprocedure TObject.DispatchStr(var aMessage);\r\n// aMessage is a record with a string field 'MsgStr'\r\nvar\r\n aClass: TClass;\r\n Msg: TJSObj absolute aMessage;\r\n Id: jsvalue;\r\nbegin\r\n if not isObject(Msg) then exit;\r\n Id:=Msg['MsgStr'];\r\n if not isString(Id) then exit;\r\n aClass:=ClassType;\r\n while (aClass<>Nil) do\r\n begin\r\n asm\r\n var Handlers = aClass.$msgstr;\r\n if (rtl.isObject(Handlers) && Handlers.hasOwnProperty(Id)){\r\n this[Handlers[Id]](aMessage);\r\n return;\r\n }\r\n end;\r\n aClass:=aClass.ClassParent;\r\n end;\r\n DefaultHandlerStr(aMessage);\r\nend;\r\n\r\nprocedure TObject.DefaultHandler(var aMessage);\r\nbegin\r\n if jsvalue(TMethod(aMessage)) then ;\r\nend;\r\n\r\nprocedure TObject.DefaultHandlerStr(var aMessage);\r\nbegin\r\n if jsvalue(TMethod(aMessage)) then ;\r\nend;\r\n\r\nfunction TObject.GetInterface(const iid: TGuid; out obj): boolean;\r\nbegin\r\n asm\r\n var i = iid.$intf;\r\n if (i){\r\n // iid is the private TGuid of an interface\r\n i = rtl.getIntfG(this,i.$guid,2);\r\n if (i){\r\n obj.set(i);\r\n return true;\r\n }\r\n }\r\n end;\r\n Result := GetInterfaceByStr(GUIDToString(iid),obj);\r\nend;\r\n\r\nfunction TObject.GetInterface(const iidstr: String; out obj): boolean;\r\nbegin\r\n Result := GetInterfaceByStr(iidstr,obj);\r\nend;\r\n\r\nfunction TObject.GetInterfaceByStr(const iidstr: String; out obj): boolean;\r\nbegin\r\n Result:=false;\r\n if not TJSObj(IObjectInstance)['$str'] then\r\n TJSObj(IObjectInstance)['$str']:=GUIDToString(IObjectInstance);\r\n if iidstr = TJSObj(IObjectInstance)['$str'] then\r\n begin\r\n obj:=Self;\r\n exit(true);\r\n end;\r\n asm\r\n var i = rtl.getIntfG(this,iidstr,2);\r\n obj.set(i);\r\n Result=(i!==null);\r\n end;\r\nend;\r\n\r\nfunction TObject.GetInterfaceWeak(const iid: TGuid; out obj): boolean;\r\nbegin\r\n Result:=GetInterface(iid,obj);\r\n asm\r\n if (Result){\r\n var o = obj.get();\r\n if (o.$kind==='com'){\r\n o._Release();\r\n }\r\n }\r\n end;\r\nend;\r\n\r\nfunction TObject.Equals(Obj: TObject): boolean;\r\nbegin\r\n Result:=Obj=Self;\r\nend;\r\n\r\nfunction TObject.ToString: String;\r\nbegin\r\n Result:=ClassName;\r\nend;\r\n\r\nclass function TObject.QualifiedClassName: String;\r\nbegin\r\n Result := UnitName + '.' + ClassName;\r\nend;\r\n\r\ninitialization\r\n ExitCode:=0; // set it here, so that WPO does not remove it\r\n\r\nend.\r\n\r\n","{\r\n This file is part of the Pas2JS run time library.\r\n Copyright (c) 2017 by Mattias Gaertner\r\n\r\n See the file COPYING.FPC, included in this distribution,\r\n for details about the copyright.\r\n\r\n This program is distributed in the hope that it will be useful,\r\n but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\r\n\r\n **********************************************************************}\r\nunit RTLConsts;\r\n\r\ninterface\r\n\r\nResourcestring\r\n SArgumentMissing = 'Missing argument in format \"%s\"';\r\n SInvalidFormat = 'Invalid format specifier : \"%s\"';\r\n SInvalidArgIndex = 'Invalid argument index in format: \"%s\"';\r\n SListCapacityError = 'List capacity (%s) exceeded.';\r\n SListCountError = 'List count (%s) out of bounds.';\r\n SMapKeyError = 'Key not found : %s';\r\n SListIndexError = 'List index (%s) out of bounds';\r\n SSortedListError = 'Operation not allowed on sorted list';\r\n SDuplicateString = 'String list does not allow duplicates';\r\n SDuplicateItem = 'ThreadList does not allow duplicates';\r\n SErrFindNeedsSortedList = 'Cannot use find on unsorted list';\r\n\r\n SInvalidName = 'Invalid component name: \"%s\"';\r\n SInvalidBoolean = '\"%s\" is not a valid boolean.';\r\n SDuplicateName = 'Duplicate component name: \"%s\"';\r\n\r\n SErrInvalidDate = 'Invalid date: \"%s\"';\r\n SErrInvalidTimeFormat = 'Invalid time format: \"%s\"';\r\n SInvalidDateFormat = 'Invalid date format: \"%s\"';\r\n\r\n SCantReadPropertyS = 'Cannot read property \"%s\"';\r\n SCantWritePropertyS = 'Cannot write property \"%s\"';\r\n SErrPropertyNotFound = 'Unknown property: \"%s\"';\r\n SIndexedPropertyNeedsParams = 'Indexed property \"%s\" needs parameters';\r\n SErrInvalidTypecast = 'Invalid class typecast';\r\n\r\n SErrInvalidInteger = 'Invalid integer value: \"%s\"';\r\n SErrInvalidFloat = 'Invalid floating-point value: \"%s\"';\r\n SInvalidDateTime = 'Invalid date-time value: %s';\r\n SInvalidCurrency = 'Invalid currency value: %s';\r\n SErrInvalidDayOfWeek = '%d is not a valid day of the week';\r\n SErrInvalidTimeStamp = 'Invalid date/timestamp : \"%s\"';\r\n SErrInvalidDateWeek = '%d %d %d is not a valid dateweek';\r\n SErrInvalidDayOfYear = 'Year %d does not have a day number %d';\r\n SErrInvalidDateMonthWeek = 'Year %d, month %d, Week %d and day %d is not a valid date.';\r\n SErrInvalidDayOfWeekInMonth = 'Year %d Month %d NDow %d DOW %d is not a valid date';\r\n SInvalidJulianDate = '%f Julian cannot be represented as a DateTime';\r\n SErrInvalidHourMinuteSecMsec = '%d:%d:%d.%d is not a valid time specification';\r\n\r\n SInvalidGUID = '\"%s\" is not a valid GUID value';\r\n\r\n SEmptyStreamIllegalReader = 'Illegal Nil stream for TReader constructor';\r\n SInvalidPropertyValue = 'Invalid value for property';\r\n SInvalidImage = 'Invalid stream format';\r\n SUnknownProperty = 'Unknown property: \"%s\"';\r\n SUnknownPropertyType = 'Unknown property type %s';\r\n SAncestorNotFound = 'Ancestor class for \"%s\" not found.';\r\n SUnsupportedPropertyVariantType = 'Unsupported property variant type %d';\r\n SPropertyException = 'Error reading %s%s%s: %s';\r\n SInvalidPropertyPath = 'Invalid property path';\r\n SReadOnlyProperty = 'Property is read-only';\r\n SClassNotFound = 'Class \"%s\" not found';\r\n\r\n SEmptyStreamIllegalWriter = 'Illegal Nil stream for TWriter constructor';\r\n SErrInvalidPropertyType = 'Invalid property type from streamed property: %d';\r\n SParserExpected = 'Wrong token type: %s expected';\r\n SParserInvalidFloat = 'Invalid floating point number: %s';\r\n SParserInvalidInteger = 'Invalid integer number: %s';\r\n SParserUnterminatedString = 'Unterminated string';\r\n SParserWrongTokenType = 'Wrong token type: %s expected but %s found';\r\n SParserWrongTokenSymbol = 'Wrong token symbol: %s expected but %s found';\r\n SParserLocInfo = ' (at %d,%d, stream offset %.8x)';\r\n SParserUnterminatedBinValue = 'Unterminated byte value';\r\n SParserInvalidProperty = 'Invalid property';\r\n SRangeError = 'Range error';\r\n\r\n SParamIsNegative = 'Parameter \"%s\" cannot be negative.';\r\n\r\n SErrNoStreaming = 'Failed to initialize component class \"%s\": No streaming method available.';\r\n SResNotFound = 'Resource %s not found';\r\n SErrResourceStreamNoWrite = 'Cannot write to resource stream';\r\n SErrResourceNotBase64 = 'Resource %s is not base64 encoded';\r\n SErrUnknownResourceEncoding = 'Unknown encoding for resource: \"%s\"';\r\n\r\nimplementation\r\n\r\nend.\r\n\r\n","{\r\n This file is part of the Pas2JS run time library.\r\n Copyright (c) 2018 by Mattias Gaertner\r\n\r\n See the file COPYING.FPC, included in this distribution,\r\n for details about the copyright.\r\n\r\n This program is distributed in the hope that it will be useful,\r\n but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\r\n\r\n **********************************************************************}\r\nunit Types;\r\n\r\n{$mode objfpc}\r\n\r\ninterface\r\n\r\ntype\r\n THandle = NativeInt;\r\n TDirection = (FromBeginning, FromEnd);\r\n\r\n TBooleanDynArray = array of Boolean;\r\n TWordDynArray = array of Word;\r\n TIntegerDynArray = array of Integer;\r\n TNativeIntDynArray = array of NativeInt;\r\n TStringDynArray = array of String;\r\n TDoubleDynArray = array of Double;\r\n TJSValueDynArray = array of JSValue;\r\n TObjectDynArray = array of TObject;\r\n TByteDynArray = array of Byte;\r\n\r\n TDuplicates = (dupIgnore, dupAccept, dupError);\r\n TProc = Reference to Procedure;\r\n TProcString = Reference to Procedure(Const aString : String);\r\n\r\n TListCallback = procedure(data, arg: JSValue) of object;\r\n TListStaticCallback = procedure(data, arg: JSValue);\r\n\r\n TSize = record\r\n cx, cy: integer;\r\n end;\r\n\r\n TPoint = record\r\n x, y: integer;\r\n end;\r\n\r\n TRect = record\r\n Left, Top, Right, Bottom: Integer;\r\n end;\r\n \r\nfunction EqualRect(const r1,r2 : TRect) : Boolean;\r\nfunction Rect(Left, Top, Right, Bottom : Integer) : TRect;\r\nfunction Bounds(ALeft, ATop, AWidth, AHeight : Integer) : TRect;\r\nfunction Point(x,y : Integer): TPoint; {$IFDEF Has_Inline}inline;{$ENDIF}\r\nfunction PtInRect(const aRect: TRect; const p: TPoint) : Boolean;\r\nfunction IntersectRect(out aRect: TRect; const R1,R2: TRect) : Boolean;\r\nfunction UnionRect(out aRect: TRect; const R1,R2: TRect) : Boolean;\r\nfunction IsRectEmpty(const aRect: TRect) : Boolean;\r\nfunction OffsetRect(var aRect: TRect; DX, DY: Integer) : Boolean;\r\nfunction CenterPoint(const aRect: TRect): TPoint;\r\nfunction InflateRect(var aRect: TRect; dx, dy: Integer): Boolean;\r\nfunction Size(AWidth, AHeight: Integer): TSize;\r\nfunction Size(const aRect: TRect): TSize;\r\n\r\nimplementation\r\n\r\nfunction EqualRect(const r1, r2: TRect): Boolean;\r\nbegin\r\n Result:=(r1.left=r2.left) and (r1.right=r2.right) and (r1.top=r2.top) and (r1.bottom=r2.bottom);\r\nend;\r\n\r\nfunction Rect(Left, Top, Right, Bottom: Integer): TRect;\r\nbegin\r\n Result.Left:=Left;\r\n Result.Top:=Top;\r\n Result.Right:=Right;\r\n Result.Bottom:=Bottom;\r\nend;\r\n\r\nfunction Bounds(ALeft, ATop, AWidth, AHeight: Integer): TRect;\r\nbegin\r\n Result.Left:=ALeft;\r\n Result.Top:=ATop;\r\n Result.Right:=ALeft+AWidth;\r\n Result.Bottom:=ATop+AHeight;\r\nend;\r\n\r\nfunction Point(x, y: Integer): TPoint;\r\nbegin\r\n Result.x:=x;\r\n Result.y:=y;\r\nend;\r\n\r\nfunction PtInRect(const aRect: TRect; const p: TPoint): Boolean;\r\nbegin\r\n Result:=(p.y>=aRect.Top) and\r\n (p.y=aRect.Left) and\r\n (p.x R1.Left then\r\n lRect.Left := R2.Left;\r\n if R2.Top > R1.Top then\r\n lRect.Top := R2.Top;\r\n if R2.Right < R1.Right then\r\n lRect.Right := R2.Right;\r\n if R2.Bottom < R1.Bottom then\r\n lRect.Bottom := R2.Bottom;\r\n\r\n // The var parameter is only assigned in the end to avoid problems\r\n // when passing the same rectangle in the var and const parameters.\r\n if IsRectEmpty(lRect) then\r\n begin\r\n aRect:=Rect(0,0,0,0);\r\n Result:=false;\r\n end\r\n else\r\n begin\r\n Result:=true;\r\n aRect := lRect;\r\n end;\r\nend;\r\n\r\nfunction UnionRect(out aRect: TRect; const R1, R2: TRect): Boolean;\r\nvar\r\n lRect: TRect;\r\nbegin\r\n lRect:=R1;\r\n if R2.LeftR1.Right then\r\n lRect.Right:=R2.Right;\r\n if R2.Bottom>R1.Bottom then\r\n lRect.Bottom:=R2.Bottom;\r\n\r\n if IsRectEmpty(lRect) then\r\n begin\r\n aRect:=Rect(0,0,0,0);\r\n Result:=false;\r\n end\r\n else\r\n begin\r\n aRect:=lRect;\r\n Result:=true;\r\n end;\r\nend;\r\n\r\nfunction IsRectEmpty(const aRect: TRect): Boolean;\r\nbegin\r\n Result:=(aRect.Right<=aRect.Left) or (aRect.Bottom<=aRect.Top);\r\nend;\r\n\r\nfunction OffsetRect(var aRect: TRect; DX, DY: Integer): Boolean;\r\nbegin\r\n with aRect do\r\n begin\r\n inc(Left,dx);\r\n inc(Top,dy);\r\n inc(Right,dx);\r\n inc(Bottom,dy);\r\n end;\r\n Result:=true;\r\nend;\r\n\r\nfunction CenterPoint(const aRect: TRect): TPoint;\r\n\r\n function Avg(a, b: Longint): Longint;\r\n begin\r\n if a < b then\r\n Result := a + ((b - a) shr 1)\r\n else\r\n Result := b + ((a - b) shr 1);\r\n end;\r\n\r\nbegin\r\n with aRect do\r\n begin\r\n Result.X := Avg(Left, Right);\r\n Result.Y := Avg(Top, Bottom);\r\n end;\r\nend;\r\n\r\nfunction InflateRect(var aRect: TRect; dx, dy: Integer): Boolean;\r\nbegin\r\n with aRect do\r\n begin\r\n dec(Left, dx);\r\n dec(Top, dy);\r\n inc(Right, dx);\r\n inc(Bottom, dy);\r\n end;\r\n Result := True;\r\nend;\r\n\r\nfunction Size(AWidth, AHeight: Integer): TSize;\r\nbegin\r\n Result.cx := AWidth;\r\n Result.cy := AHeight;\r\nend;\r\n\r\nfunction Size(const aRect: TRect): TSize;\r\nbegin\r\n Result.cx := aRect.Right - aRect.Left;\r\n Result.cy := aRect.Bottom - aRect.Top;\r\nend;\r\n\r\nend.\r\n\r\n","{\r\n This file is part of the Pas2JS run time library.\r\n Copyright (c) 2017-2020 by the Pas2JS development team.\r\n\r\n See the file COPYING.FPC, included in this distribution,\r\n for details about the copyright.\r\n\r\n This program is distributed in the hope that it will be useful,\r\n but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\r\n\r\n **********************************************************************}\r\nunit JS;\r\n\r\n{$mode objfpc}\r\n{$modeswitch externalclass}\r\n\r\ninterface\r\n\r\nuses\r\n Types;\r\n\r\ntype\r\n // We cannot use EConvertError or Exception, this would result in a circular dependency.\r\n\r\n AsyncAttribute = class(TCustomAttribute);\r\n\r\n ExternalJSAttribute = class(TCustomAttribute)\r\n strict private\r\n FName: string;\r\n public\r\n constructor Create(const AName: string);\r\n property Name: string read FName;\r\n end;\r\n\r\n { EJS }\r\n\r\n EJS = class(TObject)\r\n private\r\n FMessage: string;\r\n Public\r\n constructor Create(const Msg: String); reintroduce;\r\n property Message : string Read FMessage Write FMessage;\r\n end;\r\n\r\n TJSObjectPropertyDescriptor = JSValue;\r\n Float32 = Double;\r\n Float64 = Double;\r\n\r\n { TJSObject }\r\n\r\n TJSObject = class external name 'Object'\r\n private\r\n function GetProperties(Name: String): JSValue; external name '[]';\r\n procedure SetProperties(Name: String; const AValue: JSValue); external name '[]';\r\n public\r\n constructor new;\r\n class function create(const proto: TJSObject): TJSObject;\r\n class function create(const proto, propertiesObject: TJSObject): TJSObject;\r\n class function assign(const Target, Source1: TJSObject): TJSObject; {$ifdef pas2js} varargs; {$endif}\r\n class procedure defineProperty(const obj: TJSObject; propname: String; const descriptor: TJSObjectPropertyDescriptor);\r\n //class procedure defineProperties\r\n class function freeze(const obj: TJSObject): TJSObject;\r\n class function getOwnPropertyDescriptor(const obj: TJSObject; propname: String): TJSObjectPropertyDescriptor;\r\n //class function getOwnPropertyDescriptors\r\n class function getOwnPropertyNames(const obj: TJSObject): TStringDynArray;\r\n class function values(const obj: JSValue): TJSObject;\r\n {$IFDEF FIREFOX}\r\n class function getOwnPropertySymbols(const obj: TJSObject): TJSValueDynArray;\r\n {$ENDIF}\r\n class function getPrototypeOf(const obj: TJSObject): TJSObject;\r\n {$IFDEF FIREFOX}\r\n class function _is(const value1, value2: JSValue): boolean;\r\n {$ENDIF}\r\n class function isExtensible(const obj: TJSObject): boolean;\r\n class function isFrozen(const obj: TJSObject): boolean;\r\n class function isSealed(const obj: TJSObject): boolean;\r\n class function keys(const obj: TJSObject): TStringDynArray;\r\n class function preventExtensions(const obj: TJSObject): TJSObject;\r\n class function seal(const obj: TJSObject): TJSObject;\r\n class function setPrototypeOf(const obj, prototype: TJSObject): TJSObject;\r\n function hasOwnProperty(prop: String): boolean;\r\n function isPrototypeOf(const obj: TJSObject): boolean;\r\n function propertyIsEnumerable(propname: String): boolean;\r\n function toLocaleString: String;\r\n function toString: String;\r\n function valueOf: JSValue;\r\n property Properties[Name: String]: JSValue read GetProperties write SetProperties; default;\r\n end;\r\n\r\n TJSObjectDynArray = Array of TJSObject;\r\n TJSObjectDynArrayArray = Array of TJSObjectDynArray;\r\n TJSStringDynArray = Array of String;\r\n\r\n\r\n { TJSIteratorValue }\r\n TJSIteratorValue = class external name 'IteratorValue'\r\n public\r\n value : JSValue; external name 'value';\r\n done : boolean; external name 'done';\r\n end;\r\n\r\n { TJSIterator }\r\n TJSIterator = class external name 'Iterator'\r\n Public\r\n function next: TJSIteratorValue;\r\n end;\r\n\r\n\r\n TJSSet = class;\r\n\r\n TJSSetEventProc = reference to procedure(value : JSValue; key: NativeInt; set_: TJSSet);\r\n TJSSetProcCallBack = reference to procedure(value: JSValue; key: JSValue);\r\n\r\n { TJSSet }\r\n TJSSet = class external name 'Set'\r\n private\r\n FSize : NativeInt; external name 'size';\r\n public\r\n constructor new; overload;\r\n constructor new(aElement1 : JSValue); {$ifdef pas2js} varargs; {$endif} overload;\r\n function add(value: JSValue): TJSSet;\r\n function has(value: JSValue): Boolean;\r\n function delete(value: JSValue): Boolean;\r\n procedure clear;\r\n function values: TJSIterator;\r\n procedure forEach(const aCallBack: TJSSetEventProc); overload;\r\n procedure forEach(const aCallBack: TJSSetProcCallBack); overload;\r\n procedure forEach(const aCallBack: TJSSetEventProc; thisArg: JSValue); overload;\r\n function entries: TJSIterator;\r\n function keys: TJSIterator;\r\n Property size : NativeInt Read FSize;\r\n end;\r\n\r\n TJSMapFunctionCallBack = reference to function(arg : JSValue): JSValue;\r\n TJSMapProcCallBack = reference to procedure(value: JSValue; key: JSValue);\r\n\r\n { TJSMap }\r\n TJSMap = class external name 'Map'\r\n Private\r\n FSize : NativeInt; external name 'size';\r\n public\r\n constructor new; {$ifdef pas2js} varargs; {$endif} overload;\r\n constructor new(aElement1 : JSValue); {$ifdef pas2js} varargs; {$endif} overload;\r\n function &set(key: JSValue; value: JSValue) :TJSMap;\r\n function get(key : JSValue): JSValue;\r\n function has(key: JSValue): Boolean;\r\n function delete(key: JSValue): Boolean;\r\n procedure clear;\r\n function entries: TJSIterator;\r\n procedure forEach(const aCallBack: TJSMapFunctionCallBack); overload;\r\n procedure forEach(const aCallBack: TJSMapFunctionCallBack; thisArg: JSValue); overload;\r\n procedure forEach(const aCallBack: TJSMapProcCallBack); overload;\r\n function keys: TJSIterator;\r\n function values: TJSIterator;\r\n property size : NativeInt Read FSize;\r\n end;\r\n\r\n { TJSFunction }\r\n\r\n TJSFunction = class {$IFDEF PAS2JS} external name 'Function' {$ENDIF}(TJSObject)\r\n private\r\n Flength: NativeInt external name 'length';\r\n Fprototyp: TJSFunction external name 'prototyp';\r\n public\r\n name: String;\r\n property prototyp: TJSFunction read Fprototyp;\r\n property length: NativeInt read Flength;\r\n function apply(thisArg: TJSObject; const ArgArray: TJSValueDynArray): JSValue; {$ifdef pas2js} varargs; {$endif}\r\n function bind(thisArg: TJSObject): JSValue; {$ifdef pas2js} varargs; {$endif}\r\n function call(thisArg: TJSObject): JSValue; {$ifdef pas2js} varargs; {$endif}\r\n end;\r\n\r\n { TJSDate - wrapper for JavaScript Date }\r\n\r\n TJSDate = class {$IFDEF PAS2JS} external name 'Date' {$ENDIF}(TJSFunction)\r\n private\r\n function getDate: NativeInt;\r\n function getFullYear: NativeInt;\r\n function getHours: NativeInt;\r\n function getMilliseconds: NativeInt;\r\n function getMinutes: NativeInt;\r\n function getMonth: NativeInt;\r\n function getSeconds: NativeInt;\r\n function getYear: NativeInt;\r\n function getTime: NativeInt;\r\n function getUTCDate: NativeInt;\r\n function getUTCFullYear: NativeInt;\r\n function getUTCHours: NativeInt;\r\n function getUTCMilliseconds: NativeInt;\r\n function getUTCMinutes: NativeInt;\r\n function getUTCMonth: NativeInt;\r\n function getUTCSeconds: NativeInt;\r\n procedure setDate(const AValue: NativeInt);\r\n procedure setFullYear(const AValue: NativeInt);\r\n procedure setHours(const AValue: NativeInt);\r\n procedure setMilliseconds(const AValue: NativeInt);\r\n procedure setMinutes(const AValue: NativeInt);\r\n procedure setMonth(const AValue: NativeInt);\r\n procedure setSeconds(const AValue: NativeInt);\r\n procedure setYear(const AValue: NativeInt);\r\n procedure setTime(const AValue: NativeInt);\r\n procedure setUTCDate(const AValue: NativeInt);\r\n procedure setUTCFullYear(const AValue: NativeInt);\r\n procedure setUTCHours(const AValue: NativeInt);\r\n procedure setUTCMilliseconds(const AValue: NativeInt);\r\n procedure setUTCMinutes(const AValue: NativeInt);\r\n procedure setUTCMonth(const AValue: NativeInt);\r\n procedure setUTCSeconds(const AValue: NativeInt);\r\n public\r\n constructor New; reintroduce;\r\n constructor New(const MilliSecsSince1970: NativeInt); // milliseconds since 1 January 1970 00:00:00 UTC, with leap seconds ignored\r\n constructor New(const aDateString: String); // RFC 2822, ISO8601\r\n constructor New(aYear: NativeInt; aMonth: NativeInt; aDayOfMonth: NativeInt = 1;\r\n TheHours: NativeInt = 0; TheMinutes: NativeInt = 0; TheSeconds: NativeInt = 0;\r\n TheMilliseconds: NativeInt = 0);\r\n class function now: NativeInt; // current date and time in milliseconds since 1 January 1970 00:00:00 UTC, with leap seconds ignored\r\n class function parse(const aDateString: string): NativeInt; // format depends on browser\r\n class function UTC(aYear: NativeInt; aMonth: NativeInt = 0; aDayOfMonth: NativeInt = 1;\r\n TheHours: NativeInt = 0; TheMinutes: NativeInt = 0; TheSeconds: NativeInt = 0;\r\n TheMilliseconds: NativeInt = 0): NativeInt;\r\n function getDay: NativeInt;\r\n function getTimezoneOffset: NativeInt;\r\n function getUTCDay: NativeInt; // day of the week\r\n function toDateString: string; // human readable date, without time\r\n function toISOString: string; // ISO 8601 Extended Format\r\n function toJSON: string;\r\n function toGMTString: string; // in GMT timezone\r\n function toLocaleDateString: string; overload; // date in locale timezone, no time\r\n function toLocaleDateString(const aLocale : string) : string; overload; // date in locale timezone, no time\r\n function toLocaleDateString(const aLocale : string; aOptions : TJSObject) : string; overload; // date in locale timezone, no time\r\n function toLocaleString: string; reintroduce; // date and time in locale timezone\r\n function toLocaleTimeString: string; // time in locale timezone, no date\r\n function toTimeString: string; // time human readable, no date\r\n function toUTCString: string; // date and time using UTC timezone\r\n property Year: NativeInt read getYear write setYear;\r\n property Time: NativeInt read getTime write setTime; // milliseconds since 1 January 1970 00:00:00 UTC, with leap seconds ignored\r\n property FullYear: NativeInt read getFullYear write setFullYear;\r\n property UTCDate: NativeInt read getUTCDate write setUTCDate; // day of month\r\n property UTCFullYear: NativeInt read getUTCFullYear write setUTCFullYear;\r\n property UTCHours: NativeInt read getUTCHours write setUTCHours;\r\n property UTCMilliseconds: NativeInt read getUTCMilliseconds write setUTCMilliseconds;\r\n property UTCMinutes: NativeInt read getUTCMinutes write setUTCMinutes;\r\n property UTCMonth: NativeInt read getUTCMonth write setUTCMonth;\r\n property UTCSeconds: NativeInt read getUTCSeconds write setUTCSeconds;\r\n property Month: NativeInt read getMonth write setMonth;\r\n property Date: NativeInt read getDate write setDate; // day of the month, starting at 1\r\n property Hours: NativeInt read getHours write setHours;\r\n property Minutes: NativeInt read getMinutes write setMinutes;\r\n property Seconds: NativeInt read getSeconds write setSeconds;\r\n property Milliseconds: NativeInt read getMilliseconds write setMilliseconds;\r\n end;\r\n\r\n TLocaleCompareOptions = record\r\n localematched : string; external name 'localeMatcher';\r\n usage: string; external name 'usage';\r\n sensitivity : string; external name 'sensitivity';\r\n ignorePunctuation : Boolean; external name 'ignorePunctuation';\r\n numeric : boolean; external name 'numeric';\r\n caseFirst : string; external name 'caseFirst';\r\n end;\r\n\r\n TJSRegexp = class external name 'RegExp'\r\n private\r\n {$IFDEF FIREFOX}\r\n // not on all browsers:\r\n FFlags : string; external name 'flags';\r\n FSticky : boolean; external name 'sticky';\r\n {$endif}\r\n fglobal: boolean; external name 'global';\r\n fignoreCase : boolean; external name 'ignoreCase';\r\n fmultiline : boolean; external name 'multiline';\r\n fsource : string; external name 'source';\r\n funicode : boolean; external name 'unicode';\r\n public\r\n Constructor New(Pattern : string);\r\n Constructor New(Pattern, Flags : string);\r\n lastIndex: NativeInt;\r\n function exec(aString : string): TStringDynArray;\r\n function test(aString : string) : boolean;\r\n function toString : String;\r\n property Global : boolean read fglobal;\r\n property IgnoreCase : Boolean read FIgnoreCase;\r\n property Multiline : Boolean Read FMultiLine;\r\n Property Source : string Read FSource;\r\n Property Unicode : boolean Read FUnicode;\r\n {$IFDEF FIREFOX}\r\n // not on all browsers:\r\n property Flags : string read FFlags;\r\n property Sticky : boolean read FSticky;\r\n {$endif}\r\n end;\r\n\r\n\r\n TReplaceCallBack = reference to Function (Const match : string) : string; {$ifdef pas2js} varargs; {$endif}\r\n TReplaceCallBack0 = reference to Function (Const match : string; offset : Integer; AString : String) : string;\r\n TReplaceCallBack1 = reference to Function (Const match,p1 : string; offset : Integer; AString : String) : string;\r\n TReplaceCallBack2 = reference to Function (Const match,p1,p2 : string; offset : Integer; AString : String) : string;\r\n\r\n TJSString = class external name 'String'\r\n private\r\n flength : NativeInt; external name 'length';\r\n public \r\n constructor New(Const S : String);\r\n constructor New(Const I : NativeInt);\r\n constructor New(Const D : double);\r\n property length : NativeInt read flength; \r\n class function fromCharCode() : string; {$ifdef pas2js} varargs; {$endif}\r\n class function fromCodePoint() : string; {$ifdef pas2js} varargs; {$endif}\r\n function anchor(const aName : string) : string;\r\n function charAt(aIndex : NativeInt) : string;\r\n function charCodeAt(aIndex : NativeInt) : NativeInt;\r\n function codePointAt(aIndex : NativeInt) : NativeInt;\r\n function concat(s : string) : string; {$ifdef pas2js} varargs; {$endif}\r\n function endsWith(aSearchString : string) : boolean; overload;\r\n function endsWith(aSearchString : string; Pos : NativeInt) : boolean; overload;\r\n function includes(aSearchString : string; Pos : NativeInt = 0) : boolean;\r\n function indexOf(aSearchString : String; Pos : NativeInt = 0) : Integer;\r\n function lastIndexOf(aSearchString : String) : NativeInt;overload;\r\n function lastIndexOf(aSearchString : String; Pos : NativeInt) : Integer;overload;\r\n function link(aUrl : string) : String;\r\n function localeCompare(aCompareString : string) : NativeInt; overload;\r\n function localeCompare(aCompareString : string; aLocales: string) : integer; overload;\r\n function localeCompare(compareString : string; locales: string; Options : TlocaleCompareOptions) : integer; overload;\r\n function match(aRegexp : TJSRegexp) : TStringDynArray; overload;\r\n function match(aRegexp : String) : TStringDynArray;overload;\r\n {$IFDEF ECMAScript6}\r\n function normalize : string;\r\n function normalize(aForm : string) : string;\r\n {$ENDIF}\r\n function _repeat(aCount : NativeInt) : Integer; external name 'repeat';\r\n function replace(aRegexp : String; NewString : String) : String; overload;\r\n function replace(aRegexp : TJSRegexp; NewString : String) : String; overload;\r\n function replace(Regexp : String; aCallback : TReplaceCallBack) : String; overload;\r\n function replace(Regexp : TJSRegexp; aCallback : TReplaceCallBack) : String; overload;\r\n function replace(Regexp : String; aCallback : TReplaceCallBack0) : String; overload;\r\n function replace(Regexp : TJSRegexp; aCallback : TReplaceCallBack0) : String; overload;\r\n function replace(Regexp : String; aCallback : TReplaceCallBack1) : String; overload;\r\n function replace(Regexp : TJSRegexp; aCallback : TReplaceCallBack1) : String; overload;\r\n function replace(Regexp : String; aCallback : TReplaceCallBack2) : String; overload;\r\n function replace(Regexp : TJSRegexp; aCallback : TReplaceCallBack2) : String; overload;\r\n function search(Regexp : TJSRegexp) : NativeInt; overload;\r\n function search(Regexp : JSValue) : NativeInt; overload;\r\n function slice(aBeginIndex : NativeInt) : String; overload;\r\n function slice(aBeginIndex, aEndIndex : NativeInt) : String; overload;\r\n function split : TStringDynArray; overload;\r\n function split(aRegexp : TJSRegexp) : TStringDynArray; overload;\r\n function split(aSeparator : string) : TStringDynArray; overload;\r\n function split(aSeparator : string; aLimit : NativeInt) : TStringDynArray; overload;\r\n function split(aSeparator : array of string) : TStringDynArray; overload;\r\n function split(aSeparator : array of string; aLimit : NativeInt) : TStringDynArray; overload;\r\n function startsWith(aSearchString : String) : Boolean; overload;\r\n function startsWith(aSearchString : String; aPosition : NativeInt) : Boolean; overload;\r\n function substr(aStartIndex : NativeInt) : String; overload;\r\n function substr(aStartIndex,aLength : NativeInt) : String; overload;\r\n function substring(aStartIndex : NativeInt) : String; overload;\r\n function substring(aStartIndex,aEndIndex : NativeInt) : String; overload;\r\n function toLocaleLowerCase : String;\r\n function toLocaleUpperCase : String;\r\n function toLowerCase : String;\r\n function toString : string;\r\n function toUpperCase : String;\r\n function trim : string;\r\n function valueOf : string;\r\n end;\r\n\r\n TJSArray = Class;\r\n \r\n TJSArrayEventProc = reference to procedure(element : JSValue; index: NativeInt; anArray : TJSArray);\r\n TJSArrayEvent = reference to function (element : JSValue; index: NativeInt; anArray : TJSArray) : Boolean;\r\n TJSArrayMapEvent = reference to function (element : JSValue; index: NativeInt; anArray : TJSArray) : JSValue;\r\n TJSArrayReduceEvent = reference to function (accumulator, currentValue : JSValue; currentIndex : NativeInt; anArray : TJSArray) : JSValue;\r\n TJSArrayCompareEvent = reference to function (a,b : JSValue) : NativeInt;\r\n TJSArrayCallback = TJSArrayEvent;\r\n TJSArrayMapCallback = TJSArrayMapEvent;\r\n TJSArrayReduceCallBack = TJSArrayReduceEvent;\r\n TJSArrayCompareCallBack = TJSArrayCompareEvent;\r\n\r\n { TJSArray }\r\n\r\n TJSArray = Class external name 'Array'\r\n private\r\n function GetElements(Index: NativeInt): JSValue; external name '[]';\r\n procedure SetElements(Index: NativeInt; const AValue: JSValue); external name '[]';\r\n public\r\n FLength : NativeInt; external name 'length';\r\n constructor new; overload;\r\n constructor new(aLength : NativeInt); overload;\r\n constructor new(aElement1 : JSValue); {$ifdef pas2js} varargs; {$endif} overload;\r\n class function _of() : TJSArray; {$ifdef pas2js} varargs; {$endif} external name 'of'; \r\n class function isArray(a: JSValue) : Boolean;\r\n{$IFDEF JAVASCRIPT2015} \r\n class function from(a : JSValue) : TJSArray;\r\n class function from(arrayLike : JSValue; mapFunction : TJSMapFunctionCallBack): TJSArray; overload;\r\n class function from(arrayLike : JSValue; mapFunction : TJSMapFunctionCallBack; thisArg : JSValue): TJSArray; overload;\r\n{$ENDIF}\r\n function concat(el : JSValue) : TJSArray; {$ifdef pas2js} varargs; {$endif}\r\n function copyWithin(aTarget : NativeInt) : TJSarray;overload; // not in IE\r\n function copyWithin(aTarget, aStart : NativeInt) : TJSarray;overload; // not in IE\r\n function copyWithin(aTarget, aStart, aEnd : NativeInt) : TJSarray;overload; // not in IE\r\n function entries: TJSIterator;\r\n Function every(const aCallback : TJSArrayCallBack) : boolean;overload;\r\n Function every(const aCallback : TJSArrayEvent; aThis : TObject) : boolean;overload;\r\n Function filter(const aCallBack : TJSArrayCallBack) : TJSArray; overload;\r\n Function filter(const aCallBack : TJSArrayEvent; aThis : TObject) : TJSArray;overload;\r\n Function fill(aValue : JSValue) : TJSArray; overload;\r\n Function fill(aValue : JSValue; aStartIndex : NativeInt) : TJSArray; overload;\r\n Function fill(aValue : JSValue; aStartIndex,aEndIndex : NativeInt) : TJSArray; overload;\r\n Function find(const aCallBack : TJSArrayCallBack) : JSValue; overload;\r\n Function find(const aCallBack : TJSArrayEvent; aThis : TObject) : JSValue; overload;\r\n Function findIndex(const aCallBack : TJSArrayCallBack) : NativeInt; overload;\r\n Function findIndex(const aCallBack : TJSArrayEvent; aThis : TObject) : NativeInt; overload;\r\n procedure forEach(const aCallBack : TJSArrayEventProc); overload;\r\n procedure forEach(const aCallBack : TJSArrayEvent); overload;\r\n procedure forEach(const aCallBack : TJSArrayEvent; aThis : TObject); overload;\r\n function includes(aElement : JSValue) : Boolean; overload;\r\n function includes(aElement : JSValue; FromIndex : NativeInt) : Boolean; overload;\r\n function indexOf(aElement : JSValue) : NativeInt; overload;\r\n function indexOf(aElement : JSValue; FromIndex : NativeInt) : NativeInt; overload;\r\n function join : String; overload;\r\n function join (aSeparator : string) : String; overload;\r\n function keys: TJSIterator;\r\n function lastIndexOf(aElement : JSValue) : NativeInt; overload;\r\n function lastIndexOf(aElement : JSValue; FromIndex : NativeInt) : NativeInt; overload;\r\n// Function map(const aCallBack : TJSArrayMapEventArray) : JSValue; overload;\r\n Function map(const aCallBack : TJSArrayMapCallBack) : TJSArray; overload;\r\n Function map(const aCallBack : TJSArrayMapEvent; aThis : TObject) : TJSArray; overload;\r\n function pop : JSValue; \r\n function push(aElement : JSValue) : NativeInt; {$ifdef pas2js} varargs; {$endif}\r\n function reduce(const aCallBack : TJSArrayReduceCallBack) : JSValue; overload;\r\n function reduce(const aCallBack : TJSArrayReduceCallBack; initialValue : JSValue) : JSValue; overload;\r\n function reduceRight(const aCallBack : TJSArrayReduceCallBack) : JSValue; overload;\r\n function reduceRight(const aCallBack : TJSArrayReduceCallBack; initialValue : JSValue) : JSValue; overload;\r\n Function reverse : TJSArray;\r\n Function shift : JSValue;\r\n Function slice : TJSArray; overload;\r\n function slice(aBegin : NativeInt) : TJSArray; overload;\r\n function slice(aBegin,aEnd : NativeInt) : TJSArray; overload;\r\n Function some(const aCallback : TJSArrayCallBack) : boolean; overload;\r\n Function some(const aCallback : TJSArrayEvent; aThis : TObject) : boolean; overload;\r\n Function sort(const aCallback : TJSArrayCompareCallBack) : TJSArray; overload;\r\n Function sort() : TJSArray; overload;\r\n function splice(aStart : NativeInt) : TJSArray; overload;\r\n function splice(aStart,aDeleteCount : NativeInt) : TJSArray; {$ifdef pas2js} varargs; {$endif} overload;\r\n function toLocaleString: String; overload;\r\n function toLocaleString(locales : string) : String; overload;\r\n function toLocaleString(locales : string; const Options : TLocaleCompareOptions) : String; overload;\r\n function toString : String;\r\n function unshift : NativeInt; {$ifdef pas2js} varargs; {$endif}\r\n function values: TJSIterator;\r\n Property Length : NativeInt Read FLength Write FLength;\r\n property Elements[Index: NativeInt]: JSValue read GetElements write SetElements; default;\r\n end;\r\n\r\n TJSArrayBuffer = class {$IFDEF PAS2JS} external name 'ArrayBuffer' {$ENDIF}(TJSObject)\r\n private\r\n fLength : NativeInt; external name 'byteLength';\r\n public\r\n constructor new(aByteLength : NativeInt);\r\n class function isView(aValue : JSValue) : Boolean; \r\n function slice(aBegin : NativeInt) : TJSArrayBuffer; overload;\r\n function slice(aBegin,aEnd : NativeInt) : TJSArrayBuffer; overload;\r\n Property byteLength : NativeInt Read fLength;\r\n end;\r\n\r\n TJSBufferSource = class external name 'BufferSource'\r\n end;\r\n\r\n { TJSTypedArray }\r\n TJSTypedArray = Class;\r\n\r\n TJSTypedArrayCallBack = function (element : JSValue; index: NativeInt; anArray : TJSTypedArray) : Boolean;\r\n TJSTypedArrayEvent = function (element : JSValue; index: NativeInt; anArray : TJSTypedArray) : Boolean of object;\r\n TJSTypedArrayMapCallBack = function (element : JSValue; index: NativeInt; anArray : TJSTypedArray) : JSValue;\r\n TJSTypedArrayMapEvent = function (element : JSValue; index: NativeInt; anArray : TJSTypedArray) : JSValue of object;\r\n TJSTypedArrayReduceCallBack = function (accumulator, currentValue : JSValue; currentIndex : NativeInt; anArray : TJSTypedArray) : JSValue;\r\n TJSTypedArrayCompareCallBack = function (a,b : JSValue) : NativeInt;\r\n\r\n TJSTypedArray = class {$IFDEF PAS2JS} external name 'TypedArray' {$ENDIF}(TJSBufferSource)\r\n Private\r\n FBuffer: TJSArrayBuffer; external name 'buffer';\r\n FByteLength: NativeInt; external name 'byteLength';\r\n FLength: NativeInt; external name 'length';\r\n FByteOffset: NativeInt; external name 'byteOffset';\r\n FBytesPerElement : NativeInt; external name 'BYTES_PER_ELEMENT';\r\n function getValue(Index : NativeInt) : JSValue; external name '[]';\r\n procedure setValue(Index : NativeInt;AValue : JSValue); external name '[]';\r\n Public\r\n property BYTES_PER_ELEMENT : NativeInt Read FBytesPerElement;\r\n class var name : string;\r\n// class function from(aValue : jsValue) : TJSTypedArray;\r\n// class function from(aValue : jsValue; Map : TJSTypedArrayMapCallBack) : TJSTypedArray;\r\n// class function from(aValue : jsValue; aMap : TJSTypedArrayMapEvent) : TJSTypedArray;\r\n class function _of(aValue : jsValue) : TJSTypedArray; {$ifdef pas2js} varargs; {$endif} external name 'of';\r\n function copyWithin(aTarget : NativeInt) : TJSTypedArray;overload;\r\n function copyWithin(aTarget, aStart : NativeInt) : TJSTypedArray;overload;\r\n function copyWithin(aTarget, aStart, aEnd : NativeInt) : TJSTypedArray;overload;\r\n Function every(const aCallback : TJSTypedArrayCallBack) : boolean;overload;\r\n Function every(const aCallback : TJSTypedArrayEvent; aThis : TObject) : boolean;overload;\r\n Function fill(aValue : JSValue) : TJSTypedArray; overload;\r\n Function fill(aValue : JSValue; aStartIndex : NativeInt) : TJSTypedArray; overload;\r\n Function fill(aValue : JSValue; aStartIndex,aEndIndex : NativeInt) : TJSTypedArray; overload;\r\n Function filter(const aCallBack : TJSTypedArrayCallBack) : TJSTypedArray; overload;\r\n Function filter(const aCallBack : TJSTypedArrayEvent; aThis : TObject) : TJSTypedArray;overload;\r\n Function find(const aCallBack : TJSTypedArrayCallBack) : JSValue; overload;\r\n Function find(const aCallBack : TJSTypedArrayEvent; aThis : TObject) : JSValue; overload;\r\n Function findIndex(const aCallBack : TJSTypedArrayCallBack) : NativeInt; overload;\r\n Function findIndex(const aCallBack : TJSTypedArrayEvent; aThis : TObject) : NativeInt; overload;\r\n procedure forEach(const aCallBack : TJSTypedArrayCallBack); overload;\r\n procedure forEach(const aCallBack : TJSTypedArrayEvent; aThis : TObject); overload;\r\n function includes(aElement : JSValue) : Boolean; overload;\r\n function includes(aElement : JSValue; FromIndex : NativeInt) : Boolean; overload;\r\n function indexOf(aElement : JSValue) : NativeInt; overload;\r\n function indexOf(aElement : JSValue; FromIndex : NativeInt) : NativeInt; overload;\r\n function join : String; overload;\r\n function join (aSeparator : string) : String; overload;\r\n function lastIndexOf(aElement : JSValue) : NativeInt; overload;\r\n function lastIndexOf(aElement : JSValue; FromIndex : NativeInt) : NativeInt; overload;\r\n Function map(const aCallBack : TJSTypedArrayCallBack) : TJSTypedArray; overload;\r\n Function map(const aCallBack : TJSTypedArrayEvent; aThis : TObject) : TJSTypedArray; overload;\r\n function reduce(const aCallBack : TJSTypedArrayReduceCallBack) : JSValue; overload;\r\n function reduce(const aCallBack : TJSTypedArrayReduceCallBack; initialValue : JSValue) : JSValue; overload;\r\n function reduceRight(const aCallBack : TJSTypedArrayReduceCallBack) : JSValue; overload;\r\n function reduceRight(const aCallBack : TJSTypedArrayReduceCallBack; initialValue : JSValue) : JSValue; overload;\r\n Function reverse : TJSTypedArray;\r\n procedure _set(anArray : TJSArray); external name 'set';\r\n procedure _set(anArray : TJSArray; anOffset : NativeInt); external name 'set';\r\n procedure _set(anArray : TJSTypedArray); external name 'set';\r\n procedure _set(anArray : TJSTypedArray; anOffset : NativeInt); external name 'set';\r\n Function slice : TJSTypedArray; overload;\r\n function slice(aBegin : NativeInt) : TJSTypedArray; overload;\r\n function slice(aBegin,aEnd : NativeInt) : TJSTypedArray; overload;\r\n Function some(const aCallback : TJSTypedArrayCallBack) : boolean; overload;\r\n Function some(const aCallback : TJSTypedArrayEvent; aThis : TObject) : boolean; overload;\r\n Function sort(const aCallback : TJSTypedArrayCompareCallBack) : TJSTypedArray; overload;\r\n Function sort() : TJSTypedArray; overload;\r\n function splice(aStart : NativeInt) : TJSTypedArray; overload;\r\n function splice(aStart,aDeleteCount : NativeInt) : TJSTypedArray; {$ifdef pas2js} varargs; {$endif} overload;\r\n function toLocaleString: String; overload;\r\n function toLocaleString(locales : string) : String; overload;\r\n function toLocaleString(locales : string; const Options : TLocaleCompareOptions) : String; overload;\r\n function toString : String;\r\n function unshift : NativeInt; {$ifdef pas2js} varargs; {$endif}\r\n property buffer : TJSArrayBuffer read FBuffer;\r\n property byteLength : NativeInt Read FByteLength;\r\n property byteOffset : NativeInt Read FByteOffset;\r\n property length : NativeInt Read FLength;\r\n property values[Index : NativeInt] : JSValue Read getValue Write SetValue; default;\r\n end;\r\n\r\n { TJSInt8Array }\r\n\r\n TJSInt8Array = class {$IFDEF PAS2JS} external name 'Int8Array' {$ENDIF}(TJSTypedArray)\r\n private\r\n function getTypedValue(Index : NativeInt): Shortint; external name '[]';\r\n procedure setTypedValue(Index : NativeInt; AValue: Shortint);external name '[]';\r\n public\r\n{$IFDEF JAVASCRIPT2017}\r\n constructor new; // new in ES2017\r\n{$ENDIF}\r\n constructor new (length : NativeInt);\r\n constructor new (atypedArray : TJSTypedArray);\r\n constructor new (aObject : TJSObject);\r\n constructor new (buffer : TJSArrayBuffer);\r\n constructor new (buffer : TJSArrayBuffer; aByteOffset: NativeInt);\r\n constructor new (buffer : TJSArrayBuffer; aByteOffset, aLength: NativeInt);\r\n class function from(aValue : jsValue) : TJSInt8Array; reintroduce;\r\n class function from(aValue : jsValue; Map : TJSTypedArrayMapCallBack) : TJSInt8Array; reintroduce;\r\n class function from(aValue : jsValue; aMap : TJSTypedArrayMapEvent) : TJSInt8Array; reintroduce;\r\n class function _of(aValue : jsValue) : TJSInt8Array; {$ifdef pas2js} varargs; {$endif} external name 'of'; reintroduce;overload;\r\n class function _of(aValue : TJSValueDynArray) : TJSInt8Array; {$ifdef pas2js} varargs; {$endif} external name 'of'; reintroduce; overload;\r\n function subarray(aBegin, aEnd: Integer): TJSInt8Array; overload;\r\n function subarray(aBegin: Integer): TJSInt8Array; overload;\r\n procedure _set(anArray : Array of ShortInt); external name 'set'; reintroduce; overload;\r\n procedure _set(anArray : Array of ShortInt; anOffset : NativeInt); external name 'set';\r\n property values[Index : NativeInt] : Shortint Read getTypedValue Write setTypedValue; default;\r\n end;\r\n\r\n TJSUint8Array = class {$IFDEF PAS2JS} external name 'Uint8Array' {$ENDIF}(TJSTypedArray)\r\n private\r\n function getTypedValue(Index : NativeInt): Byte; external name '[]';\r\n procedure setTypedValue(Index : NativeInt; AValue: Byte);external name '[]';\r\n public\r\n constructor new (length : NativeInt);\r\n constructor new (atypedArray : TJSTypedArray);\r\n constructor new (aObject : TJSObject);\r\n constructor new (buffer : TJSArrayBuffer);\r\n constructor new (buffer : TJSArrayBuffer; aByteOffset: NativeInt);\r\n constructor new (buffer : TJSArrayBuffer; aByteOffset, aLength: NativeInt);\r\n class function from(aValue : jsValue) : TJSUInt8Array; reintroduce; overload;\r\n class function from(aValue : jsValue; Map : TJSTypedArrayMapCallBack) : TJSUInt8Array; reintroduce;overload;\r\n class function from(aValue : jsValue; aMap : TJSTypedArrayMapEvent) : TJSUInt8Array; reintroduce;overload;\r\n class function _of(aValue : jsValue) : TJSUInt8Array; {$ifdef pas2js} varargs; {$endif} external name 'of'; reintroduce; overload;\r\n function subarray(aBegin, aEnd: Integer): TJSUInt8Array; overload;\r\n function subarray(aBegin: Integer): TJSUInt8Array; overload;\r\n procedure _set(anArray : Array of Byte); external name 'set'; reintroduce; overload;\r\n procedure _set(anArray : Array of Byte; anOffset : NativeInt); external name 'set'; overload;\r\n Property values[Index : NativeInt] : Byte Read getTypedValue Write setTypedValue; default;\r\n end;\r\n\r\n TJSUint8ClampedArray = class {$IFDEF PAS2JS} external name 'Uint8ClampedArray' {$ENDIF}(TJSTypedArray)\r\n private\r\n function getTypedValue(Index : NativeInt): Byte; external name '[]';\r\n procedure setTypedValue(Index : NativeInt; AValue: Byte);external name '[]';\r\n public\r\n constructor new (length : NativeInt);\r\n constructor new (atypedArray : TJSTypedArray);\r\n constructor new (aObject : TJSObject);\r\n constructor new (buffer : TJSArrayBuffer);\r\n constructor new (buffer : TJSArrayBuffer; aByteOffset: NativeInt);\r\n constructor new (buffer : TJSArrayBuffer; aByteOffset, aLength: NativeInt);\r\n class function from(aValue : jsValue) : TJSUInt8ClampedArray; reintroduce;\r\n class function from(aValue : jsValue; Map : TJSTypedArrayMapCallBack) : TJSUInt8ClampedArray; reintroduce;overload;\r\n class function from(aValue : jsValue; aMap : TJSTypedArrayMapEvent) : TJSUInt8ClampedArray; reintroduce;overload;\r\n class function _of(aValue : jsValue) : TJSUInt8ClampedArray; {$ifdef pas2js} varargs; {$endif} external name 'of'; reintroduce;\r\n procedure _set(anArray : Array of Byte); external name 'set'; reintroduce;overload;\r\n procedure _set(anArray : Array of Byte; anOffset : NativeInt); external name 'set';overload;\r\n function subarray(aBegin, aEnd: Integer): TJSUInt8ClampedArray; overload;\r\n function subarray(aBegin: Integer): TJSUInt8ClampedArray; overload;\r\n Property values[Index : NativeInt] : Byte Read getTypedValue Write setTypedValue; default;\r\n end;\r\n\r\n TJSInt16Array = class {$IFDEF PAS2JS} external name 'Int16Array' {$ENDIF}(TJSTypedArray)\r\n private\r\n function getTypedValue(Index : NativeInt): smallint; external name '[]';\r\n procedure setTypedValue(Index : NativeInt; AValue: Smallint);external name '[]';\r\n public\r\n constructor new (length : NativeInt);\r\n constructor new (atypedArray : TJSTypedArray);\r\n constructor new (aObject : TJSObject);\r\n constructor new (buffer : TJSArrayBuffer);\r\n constructor new (buffer : TJSArrayBuffer; aByteOffset: NativeInt);\r\n constructor new (buffer : TJSArrayBuffer; aByteOffset, aLength: NativeInt);\r\n class function from(aValue : jsValue) : TJSInt16Array; reintroduce;\r\n class function from(aValue : jsValue; Map : TJSTypedArrayMapCallBack) : TJSInt16Array; reintroduce;overload;\r\n class function from(aValue : jsValue; aMap : TJSTypedArrayMapEvent) : TJSInt16Array; reintroduce;overload;\r\n class function _of(aValue : jsValue) : TJSInt16Array; {$ifdef pas2js} varargs; {$endif} external name 'of'; reintroduce;overload;\r\n procedure _set(anArray : Array of SmallInt); external name 'set'; reintroduce;overload;\r\n procedure _set(anArray : Array of SmallInt; anOffset : NativeInt); external name 'set';overload;\r\n function subarray(aBegin, aEnd: Integer): TJSInt16Array; overload;\r\n function subarray(aBegin: Integer): TJSInt16Array; overload;\r\n Property values[Index : NativeInt] : SmallInt Read getTypedValue Write setTypedValue; default;\r\n end;\r\n\r\n TJSUint16Array = class {$IFDEF PAS2JS} external name 'Uint16Array' {$ENDIF}(TJSTypedArray)\r\n private\r\n function getTypedValue(Index : NativeInt): Word; external name '[]';\r\n procedure setTypedValue(Index : NativeInt; AValue: Word);external name '[]';\r\n public\r\n constructor new (length : NativeInt);\r\n constructor new (atypedArray : TJSTypedArray);\r\n constructor new (aObject : TJSObject);\r\n constructor new (buffer : TJSArrayBuffer);\r\n constructor new (buffer : TJSArrayBuffer; aByteOffset: NativeInt);\r\n constructor new (buffer : TJSArrayBuffer; aByteOffset, aLength: NativeInt);\r\n class function from(aValue : jsValue) : TJSUInt16Array; reintroduce;\r\n class function from(aValue : jsValue; Map : TJSTypedArrayMapCallBack) : TJSUInt16Array; reintroduce;\r\n class function from(aValue : jsValue; aMap : TJSTypedArrayMapEvent) : TJSUInt16Array; reintroduce;\r\n class function _of(aValue : jsValue) : TJSUInt16Array; {$ifdef pas2js} varargs; {$endif} external name 'of'; reintroduce;\r\n procedure _set(anArray : Array of Word); external name 'set'; reintroduce; overload;\r\n procedure _set(anArray : Array of Word; anOffset : NativeInt); external name 'set'; overload;\r\n function subarray(aBegin, aEnd: Integer): TJSUInt16Array; overload;\r\n function subarray(aBegin: Integer): TJSUInt16Array; overload;\r\n Property values[Index : NativeInt] : Word Read getTypedValue Write setTypedValue; default;\r\n end;\r\n\r\n TJSInt32Array = class {$IFDEF PAS2JS} external name 'Int32Array' {$ENDIF}(TJSTypedArray)\r\n private\r\n function getTypedValue(Index : NativeInt): longint; external name '[]';\r\n procedure setTypedValue(Index : NativeInt; AValue: longint);external name '[]';\r\n public\r\n constructor new (length : NativeInt);\r\n constructor new (atypedArray : TJSTypedArray);\r\n constructor new (aObject : TJSObject);\r\n constructor new (buffer : TJSArrayBuffer);\r\n constructor new (buffer : TJSArrayBuffer; aByteOffset: NativeInt);\r\n constructor new (buffer : TJSArrayBuffer; aByteOffset, aLength: NativeInt);\r\n class function from(aValue : jsValue) : TJSInt32Array; reintroduce;\r\n class function from(aValue : jsValue; Map : TJSTypedArrayMapCallBack) : TJSInt32Array; reintroduce;\r\n class function from(aValue : jsValue; aMap : TJSTypedArrayMapEvent) : TJSInt32Array; reintroduce;\r\n class function _of(aValue : jsValue) : TJSInt32Array; {$ifdef pas2js} varargs; {$endif}external name 'of'; reintroduce;\r\n procedure _set(anArray : Array of LongInt); external name 'set'; reintroduce; overload;\r\n procedure _set(anArray : Array of LongInt; anOffset : NativeInt); external name 'set'; overload;\r\n function subarray(aBegin, aEnd: Integer): TJSInt32Array; overload;\r\n function subarray(aBegin: Integer): TJSInt32Array; overload;\r\n Property values[Index : NativeInt] : longint Read getTypedValue Write setTypedValue; default;\r\n end;\r\n\r\n TJSUint32Array = class {$IFDEF PAS2JS} external name 'Uint32Array' {$ENDIF}(TJSTypedArray)\r\n private\r\n function getTypedValue(Index : NativeInt): LongWord; external name '[]';\r\n procedure setTypedValue(Index : NativeInt; AValue: LongWord);external name '[]';\r\n public\r\n constructor new (length : NativeInt);\r\n constructor new (atypedArray : TJSTypedArray);\r\n constructor new (aObject : TJSObject);\r\n constructor new (buffer : TJSArrayBuffer);\r\n constructor new (buffer : TJSArrayBuffer; aByteOffset: NativeInt);\r\n constructor new (buffer : TJSArrayBuffer; aByteOffset, aLength: NativeInt);\r\n class function from(aValue : jsValue) : TJSUInt32Array; reintroduce;\r\n class function from(aValue : jsValue; Map : TJSTypedArrayMapCallBack) : TJSUInt32Array; reintroduce;\r\n class function from(aValue : jsValue; aMap : TJSTypedArrayMapEvent) : TJSUInt32Array; reintroduce;\r\n class function _of(aValue : jsValue) : TJSUInt32Array; {$ifdef pas2js} varargs; {$endif} external name 'of'; reintroduce;\r\n procedure _set(anArray : Array of Cardinal); external name 'set'; reintroduce; overload;\r\n procedure _set(anArray : Array of Cardinal; anOffset : NativeInt); external name 'set'; overload;\r\n function subarray(aBegin, aEnd: Integer): TJSUInt32Array; overload;\r\n function subarray(aBegin: Integer): TJSUInt32Array; overload;\r\n Property values[Index : NativeInt] : LongWord Read getTypedValue Write setTypedValue; default;\r\n end;\r\n\r\n TJSFloat32Array = class {$IFDEF PAS2JS} external name 'Float32Array' {$ENDIF}(TJSTypedArray)\r\n private\r\n function getTypedValue(Index : NativeInt): Float32; external name '[]';\r\n procedure setTypedValue(Index : NativeInt; AValue: Float32);external name '[]';\r\n public\r\n constructor new (length : NativeInt);\r\n constructor new (atypedArray : TJSTypedArray);\r\n constructor new (aObject : TJSObject);\r\n constructor new (buffer : TJSArrayBuffer);\r\n constructor new (buffer : TJSArrayBuffer; aByteOffset: NativeInt);\r\n constructor new (buffer : TJSArrayBuffer; aByteOffset, aLength: NativeInt);\r\n class function from(aValue : jsValue) : TJSFloat32Array; reintroduce;\r\n class function from(aValue : jsValue; Map : TJSTypedArrayMapCallBack) : TJSFloat32Array; reintroduce;\r\n class function from(aValue : jsValue; aMap : TJSTypedArrayMapEvent) : TJSFloat32Array; reintroduce;\r\n class function _of(aValue : jsValue) : TJSFloat32Array; {$ifdef pas2js} varargs; {$endif} reintroduce;\r\n procedure _set(anArray : Array of Double); external name 'set'; reintroduce; overload;\r\n procedure _set(anArray : Array of Double; anOffset : NativeInt); external name 'set'; reintroduce; overload;\r\n function subarray(aBegin, aEnd: Integer): TJSFloat32Array; overload;\r\n function subarray(aBegin: Integer): TJSFloat32Array; overload;\r\n Property values[Index : NativeInt] : Float32 Read getTypedValue Write setTypedValue; default;\r\n end;\r\n\r\n TJSFloat64Array = class {$IFDEF PAS2JS} external name 'Float64Array' {$ENDIF}(TJSTypedArray)\r\n private\r\n function getTypedValue(Index : NativeInt): Float64; external name '[]';\r\n procedure setTypedValue(Index : NativeInt; AValue: Float64);external name '[]';\r\n public\r\n constructor new (length : NativeInt);\r\n constructor new (atypedArray : TJSTypedArray);\r\n constructor new (aObject : TJSObject);\r\n constructor new (buffer : TJSArrayBuffer);\r\n constructor new (buffer : TJSArrayBuffer; aByteOffset: NativeInt);\r\n constructor new (buffer : TJSArrayBuffer; aByteOffset, aLength: NativeInt);\r\n class function from(aValue : jsValue) : TJSFloat64Array; reintroduce;\r\n class function from(aValue : jsValue; Map : TJSTypedArrayMapCallBack) : TJSFloat64Array; reintroduce;\r\n class function from(aValue : jsValue; aMap : TJSTypedArrayMapEvent) : TJSFloat64Array; reintroduce;\r\n class function _of(aValue : jsValue) : TJSFloat64Array; {$ifdef pas2js} varargs; {$endif} reintroduce;\r\n procedure _set(anArray : Array of Double); external name 'set'; reintroduce; overload;\r\n procedure _set(anArray : Array of Double; anOffset : NativeInt); external name 'set'; reintroduce; overload;\r\n function subarray(aBegin, aEnd: Integer): TJSFloat64Array; overload;\r\n function subarray(aBegin: Integer): TJSFloat64Array; overload;\r\n Property values[Index : NativeInt] : Float64 Read getTypedValue Write setTypedValue; default;\r\n end;\r\n\r\n TJSDataView = class {$IFDEF PAS2JS} external name 'DataView' {$ENDIF}(TJSBufferSource)\r\n private\r\n fBuffer : TJSArrayBuffer; external name 'buffer';\r\n fLength : NativeInt; external name 'byteLength';\r\n fOffset : NativeInt; external name 'byteOffset';\r\n public\r\n constructor new(aBuffer : TJSArrayBuffer); overload;\r\n constructor new(aBuffer : TJSArrayBuffer; aOffset : NativeInt); overload;\r\n constructor new(aBuffer : TJSArrayBuffer; aOffset,aByteLength : NativeInt); overload;\r\n function getFloat32(aByteOffset : NativeInt) : double; overload;\r\n function getFloat32(aByteOffset : NativeInt; aLittleEndian: Boolean) : double; overload;\r\n function getFloat64(aByteOffset : NativeInt) : double; overload;\r\n function getFloat64(aByteOffset : NativeInt; aLittleEndian: Boolean) : double; overload;\r\n function getInt8(aByteOffset : NativeInt) : ShortInt; \r\n function getInt16(aByteOffset : NativeInt) : SmallInt; overload;\r\n function getInt16(aByteOffset : NativeInt; aLittleEndian : Boolean) : SmallInt; overload;\r\n function getInt32(aByteOffset : NativeInt) : Longint; overload;\r\n function getInt32(aByteOffset : NativeInt; aLittleEndian : Boolean) : Longint; overload;\r\n function getUint8(aByteOffset : NativeInt) : Byte; overload;\r\n function getUint16(aByteOffset : NativeInt) : Word; overload;\r\n function getUint16(aByteOffset : NativeInt; aLittleEndian : Boolean) : Word; overload;\r\n function getUint32(aByteOffset : NativeInt) : LongWord; overload;\r\n function getUint32(aByteOffset : NativeInt; aLittleEndian : Boolean) : LongWord; overload;\r\n\r\n procedure setFloat32(aByteOffset : NativeInt; aValue : double); overload;\r\n procedure setFloat32(aByteOffset : NativeInt; aValue : double; aLittleEndian: Boolean); overload;\r\n procedure setFloat64(aByteOffset : NativeInt; aValue : double); overload;\r\n procedure setFloat64(aByteOffset : NativeInt; aValue : double; aLittleEndian: Boolean); overload;\r\n procedure setInt8(aByteOffset : NativeInt; aValue : ShortInt); \r\n procedure setInt16(aByteOffset : NativeInt; aValue : SmallInt); overload;\r\n procedure setInt16(aByteOffset : NativeInt; aValue : SmallInt; aLittleEndian : Boolean); overload;\r\n procedure setInt32(aByteOffset : NativeInt; aValue : Longint); overload;\r\n procedure setInt32(aByteOffset : NativeInt; aValue : Longint; aLittleEndian : Boolean); overload;\r\n procedure setUint8(aByteOffset : NativeInt; aValue : Byte); overload;\r\n procedure setUint16(aByteOffset : NativeInt; aValue : Word); overload;\r\n procedure setUint16(aByteOffset : NativeInt; aValue : Word; aLittleEndian : Boolean); overload;\r\n procedure setUint32(aByteOffset : NativeInt; aValue : LongWord); overload;\r\n procedure setUint32(aByteOffset : NativeInt; aValue: LongWord; aLittleEndian : Boolean); overload;\r\n Property byteLength : NativeInt Read fLength;\r\n Property byteOffset : NativeInt read fOffset;\r\n property buffer : TJSArrayBuffer Read fBuffer;\r\n end;\r\n\r\n TJSJSON = class {$IFDEF PAS2JS} external name 'JSON' {$ENDIF}(TJSObject)\r\n Public\r\n class function parse(aJSON : String) : JSValue;\r\n // Use this only when you are sure you will get an object, no checking is done.\r\n class function parseObject(aJSON : String) : TJSObject; external name 'parse';\r\n class function stringify(aValue : JSValue) : string;\r\n class function stringify(aValue,aReplacer : JSValue) : string;\r\n class function stringify(aValue,aReplacer : JSValue; space: NativeInt) : string;\r\n class function stringify(aValue,aReplacer : JSValue; space: String) : string;\r\n end;\r\n\r\n { TJSError }\r\n\r\n TJSError = class {$IFDEF PAS2JS} external name 'Error' {$ENDIF}(TJSObject)\r\n private\r\n FMessage: String; external name 'message';\r\n FStack: JSValue; external name 'stack';\r\n Public\r\n Constructor new;\r\n Constructor new(Const aMessage : string);\r\n Constructor new(Const aMessage,aFileName : string);\r\n Constructor new(Const aMessage,aFileName : string; aLineNumber : NativeInt);\r\n Property Message : String Read FMessage;\r\n Property Stack: JSValue read FStack;\r\n end;\r\n\r\n\r\n TJSPromiseResolver = reference to function (aValue : JSValue) : JSValue;\r\n TJSPromiseExecutor = reference to procedure (resolve,reject : TJSPromiseResolver);\r\n TJSPromiseFinallyHandler = reference to procedure;\r\n TJSPromise = Class;\r\n TJSPromiseArray = array of TJSPromise;\r\n\r\n TJSPromise = class external name 'Promise'\r\n constructor new(Executor : TJSPromiseExecutor);\r\n class function all(arg : Array of JSValue) : TJSPromise; overload;\r\n class function all(arg : JSValue) : TJSPromise; overload;\r\n class function all(arg : TJSPromiseArray) : TJSPromise; overload;\r\n class function allSettled(arg : Array of JSValue) : TJSPromise; overload;\r\n class function allSettled(arg : JSValue) : TJSPromise; overload;\r\n class function allSettled(arg : TJSPromiseArray) : TJSPromise; overload;\r\n class function race(arg : Array of JSValue) : TJSPromise; overload;\r\n class function race(arg : JSValue) : TJSPromise; overload;\r\n class function race(arg : TJSPromiseArray) : TJSPromise; overload;\r\n class function reject(reason : JSValue) : TJSPromise;\r\n class function resolve(value : JSValue): TJSPromise; overload;\r\n class function resolve : TJSPromise; overload;\r\n function _then (onAccepted : TJSPromiseResolver) : TJSPromise; external name 'then';\r\n function _then (onAccepted,OnRejected: TJSPromiseResolver) : TJSPromise; external name 'then';\r\n function catch (onRejected : TJSPromiseResolver) : TJSPromise;\r\n function _finally(value : TJSPromiseFinallyHandler): TJSPromise; external name 'finally';\r\n end;\r\n\r\n TJSPromiseHelper = class helper for TJSPromise\r\n public\r\n class function From(const AValue: TJSPromise): TJSPromise; static;\r\n end;\r\n\r\n TJSFunctionArguments = class external name 'arguments'\r\n private\r\n FLength: NativeInt; external name 'length';\r\n function GetElements(Index: NativeInt): JSValue; external name '[]';\r\n procedure SetElements(Index: NativeInt; const AValue: JSValue); external name '[]';\r\n public\r\n property Length: NativeInt read FLength;\r\n property Elements[Index: NativeInt]: JSValue read GetElements write SetElements; default;\r\n end;\r\n\r\n TJSIteratorResult = class {$IFDEF PAS2JS} external name 'IteratorResult' {$ENDIF}(TJSObject)\r\n Private\r\n fDone : Boolean; external name 'done';\r\n fValue : JSValue; external name 'value';\r\n Public\r\n property done : boolean Read FDone;\r\n property value : JSValue read FValue;\r\n end;\r\n\r\n TJSAsyncIterator = class {$IFDEF PAS2JS} external name 'AsyncIterator' {$ENDIF}(TJSObject)\r\n function next: TJSIteratorResult;\r\n end;\r\n\r\n TJSSyntaxError = class {$IFDEF PAS2JS} external name 'SyntaxError' {$ENDIF}(TJSError);\r\n\r\n TJSTextDecoderOptions = class {$IFDEF PAS2JS} external name 'Object' {$ENDIF}(TJSObject)\r\n fatal : Boolean;\r\n ignoreBOM : Boolean;\r\n end;\r\n\r\n TJSTextDecodeOptions = class {$IFDEF PAS2JS} external name 'Object' {$ENDIF}(TJSObject)\r\n stream : Boolean;\r\n end;\r\n\r\n TJSTextDecoder = class {$IFDEF PAS2JS} external name 'TextDecoder' {$ENDIF}(TJSObject)\r\n Private\r\n FEncoding : String; external name 'encoding';\r\n FFatal : Boolean; external name 'fatal';\r\n FIgnoreBOM : Boolean; external name 'ignoreBOM';\r\n Public\r\n Constructor New; overload;\r\n Constructor New(utfLabel : String); overload;\r\n Constructor New(utfLabel : String; Options : TJSTextDecoderOptions); overload;\r\n Function decode(arr : TJSTypedArray) : String; overload;\r\n Function decode(arr : TJSArrayBuffer) : String; overload;\r\n Function decode(arr : TJSTypedArray; opts : TJSTextDecodeOptions) : String; overload;\r\n Function decode(arr : TJSArrayBuffer; opts : TJSTextDecodeOptions) : String; overload;\r\n property Encoding : string Read FEncoding;\r\n Property Fatal : Boolean Read FFatal;\r\n Property IgnoreBOM : Boolean Read FIgnoreBOM;\r\n end;\r\n\r\n TJSTextEncoderEncodeIntoResult = class {$IFDEF PAS2JS} external name 'Object' {$ENDIF}(TJSObject)\r\n read : Nativeint;\r\n written : NativeInt;\r\n end;\r\n\r\n TJSTextEncoder = class {$IFDEF PAS2JS} external name 'TextEncoder' {$ENDIF}(TJSObject)\r\n Private\r\n FEncoding : String; external name 'encoding';\r\n Public\r\n Constructor New;\r\n function encode(aString : String) : TJSUInt8Array;\r\n Function encodeInto(aString : String; aArray : TJSUInt8Array) : TJSTextEncoderEncodeIntoResult;\r\n Property Encoding : string Read FEncoding;\r\n end;\r\n\r\nvar\r\n // JSArguments can be used in procedures/functions to provide access to the 'arguments' array.\r\n JSArguments: TJSFunctionArguments; external name 'arguments';\r\n // JSThis can be used in all code to access the javascript 'this' object.\r\n JSThis: TJSObject; external name 'this';\r\n // JSExceptValue can be used in catch blocks to access the JS throw value\r\n JSExceptValue: JSValue; external name '$e';\r\n\r\nfunction new(aElements: TJSValueDynArray) : TJSObject; overload;\r\nfunction JSDelete(const Obj: JSValue; const PropName: string): boolean; {$IFDEF PAS2JS} assembler; {$ENDIF} overload;\r\n\r\nfunction decodeURIComponent(encodedURI : String) : String; external name 'decodeURIComponent';\r\nfunction encodeURIComponent(str : String) : String; external name 'encodeURIComponent';\r\n\r\nfunction parseInt(s: String; Radix: NativeInt): NativeInt; overload; external name 'parseInt'; // may result NaN\r\nfunction parseInt(s: String): NativeInt; overload; external name 'parseInt'; // may result NaN\r\nfunction parseFloat(s: String): double; overload; external name 'parseFloat'; // may result NaN\r\n\r\nfunction hasString(const v: JSValue): boolean; external name 'rtl.hasString';// isString(v) and v<>''\r\nfunction hasValue(const v: JSValue): boolean; {$IFDEF PAS2JS} assembler; {$ENDIF} // returns the JS definition of if(v): v is not false, undefined, null, 0, NaN, or the empty string. Note: JS if(new Boolean(false)) returns true.\r\nfunction isArray(const v: JSValue): boolean; external name 'rtl.isArray';\r\nfunction isBoolean(const v: JSValue): boolean; {$IFDEF PAS2JS} assembler; {$ENDIF}\r\nfunction isDate(const v: JSValue): boolean; {$IFDEF PAS2JS} assembler; {$ENDIF}\r\nfunction isCallback(const v: JSValue): boolean; {$IFDEF PAS2JS} assembler; {$ENDIF}\r\nfunction isChar(const v: JSValue): boolean; {$IFDEF PAS2JS} assembler; {$ENDIF}\r\nfunction isClass(const v: JSValue): boolean; {$IFDEF PAS2JS} assembler; {$ENDIF} // is a Pascal class, e.g. a TClass\r\nfunction isClassInstance(const v: JSValue): boolean; {$IFDEF PAS2JS} assembler; {$ENDIF}// is a Pascal class instance, e.g. a TObject\r\nfunction isFunction(const v: JSValue): boolean; external name 'rtl.isFunction';\r\nfunction isInteger(const v: JSValue): boolean; {$IFDEF PAS2JS} assembler; {$ENDIF}\r\nfunction isModule(const v: JSValue): boolean; external name 'rtl.isModule';\r\nfunction isNull(const v: JSValue): boolean; {$IFDEF PAS2JS} assembler; {$ENDIF}\r\nfunction isNumber(const v: JSValue): boolean; external name 'rtl.isNumber';\r\nfunction isObject(const v: JSValue): boolean; external name 'rtl.isObject'; // true if not null and a JS Object\r\nfunction isRecord(const v: JSValue): boolean; {$IFDEF PAS2JS} assembler; {$ENDIF}\r\nfunction isString(const v: JSValue): boolean; external name 'rtl.isString';\r\nfunction isUndefined(const v: JSValue): boolean; {$IFDEF PAS2JS} assembler; {$ENDIF}\r\nfunction isDefined(const v: JSValue): boolean; {$IFDEF PAS2JS} assembler; {$ENDIF}\r\nfunction isUTF16Char(const v: JSValue): boolean; {$IFDEF PAS2JS} assembler; {$ENDIF}\r\nfunction isExt(const InstanceOrClass, aClass: JSValue): boolean; external name 'rtl.isExt'; // aClass can be a JS object or function\r\nfunction jsInstanceOf(const aFunction, aFunctionWithPrototype: JSValue): Boolean; {$IFDEF PAS2JS} assembler; {$ENDIF}\r\nfunction jsTypeOf(const v: JSValue): String; external name 'typeof';\r\nfunction jsIsNaN(const v: JSValue): boolean; external name 'isNaN';// true if value cannot be converted to a number. e.g. True on NaN, undefined, {}, '123'. False on true, null, '', ' ', '1A'\r\nfunction jsIsFinite(const v: JSValue): boolean; external name 'isFinite';// true if value is a Finite number\r\nfunction toNumber(const v: JSValue): double; {$IFDEF PAS2JS} assembler; {$ENDIF} // if not possible, returns NaN\r\nfunction toInteger(const v: JSValue): NativeInt; // if v is not an integer, returns 0\r\nfunction toObject(Value: JSValue): TJSObject; // If Value is not a Javascript object, returns Nil\r\nfunction toArray(Value: JSValue): TJSArray; // If Value is not a Javascript array, returns Nil\r\nfunction toBoolean(Value: JSValue): Boolean; // If Value is not a Boolean, returns False\r\nfunction toString(Value: JSValue): String; // If Value is not a string, returns ''\r\n\r\nType\r\n TJSValueType = (jvtNull,jvtBoolean,jvtInteger,jvtFloat,jvtString,jvtObject,jvtArray);\r\n\r\nFunction GetValueType(JS : JSValue) : TJSValueType;\r\n\r\nConst\r\n Null : JSValue; external name 'null';\r\n Undefined : JSValue; external name 'undefined';\r\n\r\nimplementation\r\n\r\nfunction new(aElements: TJSValueDynArray): TJSObject;\r\n\r\n function toString(I : Integer): string; external name 'String';\r\n\r\nVar\r\n L,I : integer;\r\n S : String;\r\n\r\nbegin\r\n L:=length(aElements);\r\n if (L mod 2)=1 then\r\n raise EJS.Create('Number of arguments must be even');\r\n I:=0;\r\n // Check all arguments;\r\n While (i2)) return false;\r\n var code = v.charCodeAt(0);\r\n if (code < 0xD800){\r\n if (v.length == 1) return true;\r\n } else if (code <= 0xDBFF){\r\n if (v.length==2){\r\n code = v.charCodeAt(1);\r\n if (code >= 0xDC00 && code <= 0xDFFF) return true;\r\n };\r\n };\r\n return false;\r\nend;\r\n\r\nfunction jsInstanceOf(const aFunction, aFunctionWithPrototype: JSValue\r\n ): Boolean; {$IFDEF PAS2JS} assembler; {$ENDIF}\r\nasm\r\n return aFunction instanceof aFunctionWithPrototype;\r\nend;\r\n\r\nfunction toNumber(const v: JSValue): double; {$IFDEF PAS2JS} assembler; {$ENDIF}\r\nasm\r\n return v-0;\r\nend;\r\n\r\nfunction toInteger(const v: JSValue): NativeInt;\r\nbegin\r\n if IsInteger(v) then\r\n Result:=NativeInt(v)\r\n else\r\n Result:=0;\r\nend;\r\n\r\nfunction toObject(Value: JSValue): TJSObject;\r\n\r\nbegin\r\n if IsObject(Value) then\r\n Result:=TJSObject(Value)\r\n else\r\n Result:=Nil;\r\nend;\r\n\r\nfunction toArray(Value: JSValue): TJSArray; // If not possible, returns Nil\r\n\r\nbegin\r\n if IsArray(Value) then\r\n Result:=TJSArray(Value)\r\n else\r\n Result:=Nil;\r\nend;\r\n\r\nfunction toBoolean(Value: JSValue): Boolean; // If not possible, returns False\r\n\r\nbegin\r\n if isBoolean(Value) then\r\n Result:=Boolean(Value)\r\n else\r\n Result:=False;\r\nend;\r\n\r\nfunction toString(Value: JSValue): String; // If not possible, returns ''\r\n\r\nbegin\r\n if IsString(Value) then\r\n Result:=String(Value)\r\n else\r\n Result:='';\r\nend;\r\n\r\n{ EJS }\r\n\r\nconstructor EJS.Create(const Msg: String);\r\nbegin\r\n FMessage:=Msg;\r\nend;\r\n\r\n\r\nfunction GetValueType(JS: JSValue): TJSValueType;\r\n\r\nVar\r\n t : string;\r\n\r\nbegin\r\n if isNull(js) then // null reported as object\r\n result:=jvtNull\r\n else\r\n begin\r\n t:=jsTypeOf(js);\r\n if (t='string') then\r\n Result:=jvtString\r\n else if (t='boolean') then\r\n Result:=jvtBoolean\r\n else if (t='object') then\r\n begin\r\n if IsArray(JS) then\r\n Result:=jvtArray\r\n else\r\n Result:=jvtObject;\r\n end\r\n else if (t='number') then\r\n if isInteger(JS) then\r\n result:=jvtInteger\r\n else\r\n result:=jvtFloat\r\n end;\r\nend;\r\n\r\n{ ExternalJSAttribute }\r\n\r\nconstructor ExternalJSAttribute.Create(const AName: string);\r\nbegin\r\n inherited Create;\r\n FName := AName;\r\nend;\r\n\r\n{ TJSPromiseHelper }\r\n\r\nclass function TJSPromiseHelper.From(const AValue: TJSPromise): TJSPromise;\r\nbegin\r\n Result := AValue;\r\nend;\r\n\r\nend.\r\n\r\n","{\r\n This file is part of the Pas2JS run time library.\r\n Copyright (c) 2017 by Mattias Gaertner\r\n\r\n See the file COPYING.FPC, included in this distribution,\r\n for details about the copyright.\r\n\r\n This program is distributed in the hope that it will be useful,\r\n but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\r\n\r\n **********************************************************************}\r\nunit SysUtils;\r\n\r\n{$mode objfpc}\r\n{$MODE DELPHI}\r\n{$modeswitch typehelpers}\r\n{$modeswitch advancedrecords}\r\n{$WARN 5078 off}\r\n\r\ninterface\r\n\r\nuses\r\n RTLConsts, js;\r\n\r\nprocedure FreeAndNil(var Obj);\r\n\r\ntype\r\n TProcedure = procedure;\r\n\r\n {*****************************************************************************\r\n Various types\r\n *****************************************************************************}\r\nConst\r\n FloatRecDigits = 19;\r\n\r\ntype\r\n TSysCharSet = Set of Char;\r\n\r\n { TFloatRec }\r\n TFloatRec = Record\r\n Exponent: Integer;\r\n Negative: Boolean;\r\n Digits: Array[0..FloatRecDigits-1] of Char;\r\n End;\r\n TEndian = (Little,Big);\r\n TFileName = String;\r\n TByteArray = array [0..32767] of Byte;\r\n TWordArray = array [0..16383] of Word;\r\n TBytes = Array of byte;\r\n TStringArray = array of string;\r\n\r\n TMonthNameArray = array [1..12] of string;\r\n TDayTable = array [1..12] of Word;\r\n TWeekNameArray = array [1..7] of string;\r\n TMonthNames = TMonthNameArray;\r\n TDayNames = array[1..7] of string;\r\n\r\ntype\r\n\r\n { TFormatSettings }\r\n\r\n TFormatSettings = record\r\n strict private\r\n class function GetBrowserLocale: string; assembler; static;\r\n class function GetJSLocale: string; assembler; static;\r\n class function GetLocaleDecimalSeparator(const ALocale: string): string; assembler; static;\r\n class function GetLocaleLongDayName(const ADayOfWeek: Integer; const ALocale: string): string; assembler; static;\r\n class function GetLocaleLongMonthName(const AMonth: Integer; const ALocale: string): string; assembler; static;\r\n class function GetLocaleLongTimeFormat(ALocale: string): string; static;\r\n class function GetLocaleShortDateFormat(ALocale: string): string; static;\r\n class function GetLocaleShortDayName(const ADayOfWeek: Integer; const ALocale: string): string; assembler; static;\r\n class function GetLocaleShortMonthName(const AMonth: Integer; const ALocale: string): string; assembler; static;\r\n class function GetLocaleShortTimeFormat(ALocale: string): string; static;\r\n public\r\n CurrencyDecimals: Byte;\r\n CurrencyFormat: Byte;\r\n CurrencyString: string;\r\n DateSeparator: Char;\r\n DateTimeToStrFormat: array[Boolean] of string;\r\n DecimalSeparator: string;\r\n LongDateFormat: string;\r\n LongDayNames: TDayNames;\r\n LongMonthNames: TMonthNames;\r\n LongTimeFormat: string;\r\n NegCurrFormat: Byte;\r\n ShortDateFormat: string;\r\n ShortDayNames: TDayNames;\r\n ShortMonthNames: TMonthNames;\r\n ShortTimeFormat: string;\r\n ThousandSeparator: string;\r\n TimeAMString: string;\r\n TimePMString: string;\r\n TimeSeparator: Char;\r\n TwoDigitYearCenturyWindow: Word;\r\n public\r\n Type\r\n TLocaleInitCallback = Procedure(const aLocale : String; aInstance : TFormatSettings);\r\n class var InitLocaleHandler : TLocaleInitCallback;\r\n class function Create: TFormatSettings; overload; static;\r\n class function Create(const ALocale: string): TFormatSettings; overload; static;\r\n class function Invariant: TFormatSettings; static;\r\n class constructor Init;\r\n end;\r\n\r\n\r\n{*****************************************************************************\r\n Exception handling\r\n*****************************************************************************}\r\n\r\n { Exception }\r\n\r\n Exception = class(TObject)\r\n private\r\n FMessage: String;\r\n FHelpContext: Integer;\r\n FJSError: TJSError;\r\n FStack: JSValue;\r\n public\r\n class var\r\n LogMessageOnCreate : Boolean;\r\n Public\r\n constructor Create(const Msg: String); reintroduce;\r\n constructor CreateFmt(const Msg: string; const Args: array of const);\r\n constructor CreateHelp(const Msg: String; AHelpContext: Integer);\r\n constructor CreateFmtHelp(const Msg: string; const Args: array of const; AHelpContext: Integer);\r\n function ToString: String; override;\r\n property HelpContext: Integer read FHelpContext write FHelpContext;\r\n property Message: String read FMessage write FMessage;\r\n property JSError: TJSError read FJSError;\r\n property Stack: JSValue read FStack;\r\n end;\r\n\r\n ExceptClass = class of Exception;\r\n\r\n EExternal = class(Exception);\r\n\r\n { General math errors }\r\n EMathError = class(EExternal);\r\n EInvalidOp = class(EMathError);\r\n EZeroDivide = class(EMathError);\r\n EOverflow = class(EMathError);\r\n EUnderflow = class(EMathError);\r\n\r\n EAbort = class(Exception);\r\n EInvalidCast = class(Exception);\r\n EAssertionFailed = class(Exception);\r\n EObjectCheck = class(Exception);\r\n\r\n { String conversion errors }\r\n EConvertError = class(Exception);\r\n EFormatError = class(Exception);\r\n\r\n\r\n { integer math exceptions }\r\n EIntError = Class(EExternal);\r\n EDivByZero = Class(EIntError);\r\n ERangeError = Class(EIntError);\r\n EIntOverflow = Class(EIntError);\r\n\r\n { General math errors }\r\n\r\n { Run-time and I/O Errors }\r\n EInOutError = class(Exception)\r\n public\r\n ErrorCode : Integer;\r\n end;\r\n\r\n EHeapMemoryError = class(Exception);\r\n EHeapException = EHeapMemoryError;\r\n\r\n EExternalException = class(EExternal);\r\n EInvalidPointer = Class(EHeapMemoryError);\r\n EOutOfMemory = Class(EHeapMemoryError);\r\n\r\n { EVariantError }\r\n\r\n EVariantError = Class(Exception)\r\n ErrCode : longint;\r\n Constructor CreateCode(Code : Longint);\r\n end;\r\n\r\n EAccessViolation = Class(EExternal);\r\n EBusError = Class(EAccessViolation);\r\n EPrivilege = class(EExternal);\r\n EStackOverflow = class(EExternal);\r\n EControlC = class(EExternal);\r\n\r\n { String conversion errors }\r\n\r\n { Other errors }\r\n EAbstractError = Class(Exception);\r\n\r\n EPropReadOnly = class(Exception);\r\n EPropWriteOnly = class(Exception);\r\n\r\n EIntfCastError = class(Exception);\r\n EInvalidContainer = class(Exception);\r\n EInvalidInsert = class(Exception);\r\n\r\n EPackageError = class(Exception);\r\n\r\n EOSError = class(Exception)\r\n public\r\n ErrorCode: Longint;\r\n end;\r\n\r\n ESafecallException = class(Exception);\r\n ENoThreadSupport = Class(Exception);\r\n ENoWideStringSupport = Class(Exception);\r\n ENotImplemented = class(Exception);\r\n\r\n EArgumentException = class(Exception);\r\n EArgumentOutOfRangeException = class(EArgumentException);\r\n EArgumentNilException = class(EArgumentException);\r\n\r\n EPathTooLongException = class(Exception);\r\n ENotSupportedException = class(Exception);\r\n EDirectoryNotFoundException = class(Exception);\r\n EFileNotFoundException = class(Exception);\r\n EPathNotFoundException = class(Exception);\r\n\r\n ENoConstructException = class(Exception);\r\n\r\n//function GetTickCount: Integer;\r\n\r\n\r\n{*****************************************************************************\r\n String function\r\n*****************************************************************************}\r\n\r\nConst\r\n EmptyStr = '';\r\n EmptyWideStr = ''; // No difference here.\r\n HexDisplayPrefix: string = '$';\r\n LeadBytes = [] unimplemented;\r\n\r\nFunction CharInSet(Ch: Char;Const CSet : array of char) : Boolean; overload;\r\nFunction CharInSet(Ch: Char;Const CSet : TSysCharSet) : Boolean; overload;\r\n\r\nfunction LeftStr(const S: string; Count: Integer): String; assembler;\r\nfunction RightStr(const S: string; Count: Integer): String; assembler;\r\n\r\nfunction Trim(const S: String): String; assembler;\r\nfunction TrimLeft(const S: String): String; assembler;\r\nfunction TrimRight(const S: String): String; assembler;\r\n\r\nfunction UpperCase(const s: String): String; assembler; overload;\r\nfunction LowerCase(const s: String): String; assembler; overload;\r\n\r\nfunction CompareStr(const s1, s2: String): Integer; assembler;\r\nfunction SameStr(const s1, s2: String): Boolean; assembler;\r\nfunction CompareText(const s1, s2: String): Integer; assembler;\r\nfunction SameText(const s1, s2: String): Boolean; assembler;\r\nfunction AnsiCompareText(const s1, s2: String): Integer; assembler;\r\nfunction AnsiSameText(const s1, s2: String): Boolean; assembler;\r\nfunction AnsiCompareStr(const s1, s2: String): Integer;\r\nprocedure AppendStr(var Dest: String; const S: string);\r\n\r\nfunction Format(const Fmt: String; const Args: array of const): String; overload;\r\nfunction Format(const Fmt: String; const Args: array of const; const aSettings : TFormatSettings): String; overload;\r\n\r\nfunction BytesOf(const AVal: string): TBytes;\r\nfunction StringOf(const ABytes: TBytes): string;\r\n\r\n// JavaScript built-in functions\r\nfunction LocaleCompare(const s1, s2, locales: String): Boolean; assembler; overload;\r\nfunction NormalizeStr(const S: String; const Norm: String = 'NFC'): String; assembler; overload; // not in IE\r\n\r\nfunction IsValidIdent(const Ident: string; AllowDots: Boolean = False; StrictDots: Boolean = False): Boolean;\r\n\r\nType\r\n TStringReplaceFlag = (rfReplaceAll, rfIgnoreCase);\r\n TReplaceFlag = TStringReplaceFlag;\r\n TStringReplaceFlags = set of TStringReplaceFlag;\r\n TReplaceFlags = TStringReplaceFlags;\r\n\r\nprocedure Randomize;\r\n\r\nfunction StringReplace(aOriginal, aSearch, aReplace: string; Flags: TStringReplaceFlags): String;\r\nfunction QuoteString(aOriginal: String; AQuote: Char): String;\r\nfunction QuotedStr(const s: string; QuoteChar: Char = ''''): string;\r\nfunction DeQuoteString(aQuoted: String; AQuote: Char): String;\r\nFunction LastDelimiter(const Delimiters, S: string): SizeInt;\r\nfunction IsDelimiter(const Delimiters, S: string; Index: Integer): Boolean;\r\nfunction AdjustLineBreaks(const S: string): string; overload;\r\nfunction AdjustLineBreaks(const S: string; Style: TTextLineBreakStyle): string; overload;\r\nfunction WrapText(const Line, BreakStr: string; const BreakChars: Array of char; MaxCol: Integer): string; overload;\r\nfunction WrapText(const Line: string; MaxCol: Integer): string; overload;\r\n\r\n{ *****************************************************************************\r\n Integer conversions\r\n *****************************************************************************}\r\n\r\nFunction SwapEndian(W : Word) : Word; overload;\r\nFunction SwapEndian(C : Cardinal) : Cardinal; overload;\r\nfunction IntToStr(const Value: Integer): string;\r\nFunction TryStrToInt(const S : String; Out res : Integer) : Boolean; overload;\r\nFunction TryStrToInt(const S : String; Out res: Integer; Const aSettings : TFormatSettings): Boolean; overload;\r\nFunction TryStrToInt(const S : String; Out res : NativeInt) : Boolean; overload;\r\nfunction TryStrToInt(const S: String; out res: NativeInt; Const aSettings : TFormatSettings): Boolean; overload;\r\nFunction StrToIntDef(const S : String; Const aDef : Integer) : Integer; overload;\r\nFunction StrToIntDef(const S : String; Const aDef : NativeInt) : NativeInt; overload;\r\nFunction StrToInt(const S : String) : Integer;\r\nFunction StrToNativeInt(const S : String) : NativeInt;\r\nfunction StrToUInt(const s: string): Cardinal;\r\nfunction StrToUIntDef(const s: string; aDef : Cardinal): Cardinal;\r\nfunction UIntToStr(Value: Cardinal): string;\r\nfunction TryStrToUInt(const s: string; out C: Cardinal): Boolean;\r\n// For compatibility\r\nFunction StrToInt64(const S : String) : NativeLargeInt;\r\nFunction StrToInt64Def(const S : String; ADefault : NativeLargeInt) : NativeLargeInt;\r\nFunction TryStrToInt64(const S : String; Out res : NativeLargeInt) : Boolean; overload;\r\nfunction TryStrToInt64(const S : String; Out res : NativeLargeInt; const ASettings: TFormatSettings): Boolean; overload;\r\nFunction StrToQWord(const S : String) : NativeLargeUInt;\r\nFunction StrToQWordDef(const S : String; ADefault : NativeLargeUInt) : NativeLargeUInt;\r\nFunction TryStrToQWord(const S : String; Out res : NativeLargeUInt) : Boolean; overload;\r\nFunction TryStrToQWord(const S : String; Out res : QWord) : Boolean; unimplemented; overload; // only 52 bits\r\nFunction StrToUInt64(const S : String) : NativeLargeUInt;\r\nFunction StrToUInt64Def(const S : String; ADefault : NativeLargeUInt) : NativeLargeUInt;\r\nFunction TryStrToUInt64(const S : String; Out res : NativeLargeUInt) : Boolean; overload;\r\nFunction TryStrToUInt64(const S : String; Out res : UInt64) : Boolean; unimplemented; overload; // only 52 bits\r\nFunction StrToDWord(const S : String) : DWord;\r\nFunction StrToDWordDef(const S : String; ADefault : DWord) : DWord;\r\nFunction TryStrToDWord(const S : String; Out res : DWord) : Boolean;\r\n\r\nfunction IntToHex(Value: NativeInt; Digits: Integer): string; overload;\r\n\r\n{ *****************************************************************************\r\n Float conversions\r\n *****************************************************************************}\r\n\r\nconst\r\n // Note: Currency is internally a double, multiplied by 10000 and truncated.\r\n // The below values are the safe limits, within every step exists.\r\n // Since currency is a double it can take much larger values, but the result\r\n // may differ from Delphi/FPC\r\n MaxCurrency: Currency = 900719925474.0991; // fpc: 922337203685477.5807;\r\n MinCurrency: Currency = -900719925474.0991; // fpc: -922337203685477.5808;\r\n\r\nType\r\n TFloatFormat = (ffFixed,ffGeneral,ffExponent,ffNumber,ffCurrency);\r\n\r\nFunction FloatToDecimal(Value : double; Precision, Decimals : integer) : TFloatRec;\r\nFunction FloatToStr(Value: Double): String; overload;\r\nFunction FloatToStr(Value: Double; const aSettings : TFormatSettings): String; overload;\r\nFunction FloatToStrF(const Value : double; format: TFloatFormat; Precision, Digits: Integer): String; overload;\r\nFunction FloatToStrF(const Value : double; format: TFloatFormat; Precision, Digits: Integer;const aSettings : TFormatSettings): String; overload;\r\nFunction TryStrToFloat(const S : String; Out res : Extended) : Boolean; overload;\r\nFunction TryStrToFloat(const S : String; Out res : Extended; const aSettings : TFormatSettings) : Boolean; overload;\r\nFunction TryStrToFloat(const S : String; Out res : Double) : Boolean; overload;\r\nFunction TryStrToFloat(const S : String; Out res : Double; const aSettings : TFormatSettings) : Boolean; overload;\r\nFunction StrToFloatDef(const S : String; Const aDef : Double) : Double; overload;\r\nfunction StrToFloatDef(const S: String; const aDef: Double; const aSettings : TFormatSettings): Double; overload;\r\nFunction StrToFloat(const S : String) : Double; overload;\r\nFunction StrToFloat(const S : String; const aSettings : TFormatSettings) : Double; overload;\r\nFunction FormatFloat (Fmt : String; aValue : Double) : String; overload;\r\nFunction FormatFloat (Fmt : String; aValue : Double; aSettings : TFormatSettings) : String; overload;\r\n\r\n\r\n{ *****************************************************************************\r\n Boolean conversions\r\n *****************************************************************************}\r\n\r\nVar\r\n TrueBoolStrs, FalseBoolStrs : Array of String;\r\n\r\nfunction StrToBool(const S: String): Boolean;\r\nfunction BoolToStr(B: Boolean; UseBoolStrs:Boolean=False): string; overload;\r\nfunction BoolToStr(B: Boolean; const TrueS, FalseS: String): string; overload;\r\nfunction StrToBoolDef(const S: String; Default: Boolean): Boolean;\r\nfunction TryStrToBool(const S: String; out Value: Boolean): Boolean;\r\n\r\n\r\n{*****************************************************************************\r\n OS/Environment\r\n*****************************************************************************}\r\n\r\nConst\r\n ConfigExtension : String = '.cfg';\r\n SysConfigDir : String = '';\r\n\r\ntype\r\n TOnGetEnvironmentVariable = function(Const EnvVar: String): String;\r\n TOnGetEnvironmentString = function(Index: Integer): String;\r\n TOnGetEnvironmentVariableCount = function: Integer;\r\n TShowExceptionHandler = Procedure (Const Msg : String);\r\n TUncaughtPascalExceptionHandler = reference to Procedure(aObject : TObject);\r\n TUncaughtJSExceptionHandler = reference to Procedure(aObject : TJSObject);\r\n\r\nvar\r\n OnGetEnvironmentVariable: TOnGetEnvironmentVariable;\r\n OnGetEnvironmentString: TOnGetEnvironmentString;\r\n OnGetEnvironmentVariableCount: TOnGetEnvironmentVariableCount;\r\n // Handler to show an exception (used when showexception is called)\r\n OnShowException : TShowExceptionHandler = nil;\r\n\r\n// Set handlers for uncaught exceptions. These will call HookUncaughtExceptions\r\n// They return the old exception handler, if there was any.\r\nFunction SetOnUnCaughtExceptionHandler(aValue : TUncaughtPascalExceptionHandler) : TUncaughtPascalExceptionHandler; overload;\r\nFunction SetOnUnCaughtExceptionHandler(aValue : TUncaughtJSExceptionHandler) : TUncaughtJSExceptionHandler; overload;\r\n// Hook the rtl handler for uncaught exceptions. If any exception handlers were set, they will be called.\r\n// If none were set, the exceptions will be displayed using ShowException.\r\nProcedure HookUncaughtExceptions;\r\n\r\nfunction GetEnvironmentVariable(Const EnvVar: String): String;\r\nfunction GetEnvironmentVariableCount: Integer;\r\nfunction GetEnvironmentString(Index: Integer): String;\r\n\r\n\r\nprocedure ShowException(ExceptObject: TObject; ExceptAddr: Pointer = Nil);\r\nProcedure Abort;\r\n\r\n\r\n{*****************************************************************************\r\n Events\r\n*****************************************************************************}\r\nType\r\n TEventType = (etCustom,etInfo,etWarning,etError,etDebug);\r\n TEventTypes = Set of TEventType;\r\n\r\n{*****************************************************************************\r\n Date and time\r\n*****************************************************************************}\r\nType\r\n \r\n TSystemTime = record\r\n Year, Month, Day, DayOfWeek: word;\r\n Hour, Minute, Second, MilliSecond: word;\r\n end ;\r\n TTimeStamp = record\r\n Time: longint; { Number of milliseconds since midnight }\r\n Date: longint; { One plus number of days since 1/1/0001 }\r\n end ;\r\n\r\n\r\nVar\r\n TimeSeparator : char deprecated;\r\n DateSeparator : char deprecated;\r\n ShortDateFormat : string deprecated;\r\n LongDateFormat : string deprecated;\r\n ShortTimeFormat : string deprecated;\r\n LongTimeFormat : string deprecated;\r\n DecimalSeparator : string deprecated;\r\n ThousandSeparator : string deprecated;\r\n TimeAMString : string deprecated;\r\n TimePMString : string deprecated;\r\n\r\nconst\r\n\r\n HoursPerDay = 24;\r\n MinsPerHour = 60;\r\n SecsPerMin = 60;\r\n MSecsPerSec = 1000;\r\n MinsPerDay = HoursPerDay * MinsPerHour;\r\n SecsPerHour = SecsPerMin * MinsPerHour;\r\n SecsPerDay = MinsPerDay * SecsPerMin;\r\n MSecsPerDay = SecsPerDay * MSecsPerSec;\r\n MaxDateTime: TDateTime = 2958465.99999999;\r\n MinDateTime: TDateTime = -693593.99999999;\r\n\r\n JulianEpoch = TDateTime(-2415018.5);\r\n UnixEpoch = JulianEpoch + TDateTime(2440587.5);\r\n\r\n DateDelta = 693594; // Days between 1/1/0001 and 12/31/1899\r\n UnixDateDelta = 25569;\r\n\r\n { True=Leapyear }\r\n\r\nVar\r\n MonthDays : array [Boolean] of TDayTable =\r\n ((31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31),\r\n (31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31));\r\n\r\nVar\r\n ShortMonthNames : TMonthNames deprecated;\r\n LongMonthNames : TMonthNames deprecated;\r\n ShortDayNames : TDayNames deprecated;\r\n LongDayNames : TDayNames deprecated;\r\n\r\n\r\nVar\r\n FormatSettings: TFormatSettings;\r\n TwoDigitYearCenturyWindow : word = 50;\r\n { Threshold to be subtracted from year before age-detection.}\r\n\r\n\r\n// Various conversions\r\n\r\nfunction DateTimeToJSDate(aDateTime : TDateTime) : TJSDate;\r\nfunction JSDateToDateTime(aDate : TJSDate) : TDateTime;\r\nfunction DateTimeToTimeStamp(DateTime: TDateTime): TTimeStamp;\r\nfunction TimeStampToDateTime(const TimeStamp: TTimeStamp): TDateTime;\r\nfunction MSecsToTimeStamp(MSecs: NativeInt): TTimeStamp;\r\nfunction TimeStampToMSecs(const TimeStamp: TTimeStamp): NativeInt;\r\nprocedure DateTimeToSystemTime(DateTime: TDateTime; out SystemTime: TSystemTime);\r\nfunction SystemTimeToDateTime(const SystemTime: TSystemTime): TDateTime;\r\nFunction FloatToDateTime (Const Value : Extended) : TDateTime;\r\n\r\n// Encode/Decode\r\nfunction TryEncodeDate(Year, Month, Day: Word; out Date: TDateTime): Boolean; overload;\r\nfunction TryEncodeTime(Hour, Min, Sec, MSec: Word; out Time: TDateTime): Boolean;\r\nfunction EncodeDate(Year, Month, Day :word): TDateTime;\r\nfunction EncodeTime(Hour, Minute, Second, MilliSecond:word): TDateTime;\r\nprocedure DecodeDate(Date: TDateTime; out Year, Month, Day: word);\r\nprocedure DecodeTime(Time: TDateTime; out Hour, Minute, Second, MilliSecond: word);\r\nfunction DecodeDateFully(const DateTime: TDateTime; out Year, Month, Day, DOW: Word): Boolean;\r\nfunction ComposeDateTime(Date,Time : TDateTime) : TDateTime;\r\nprocedure ReplaceTime(var dati: TDateTime; NewTime : TDateTime);\r\nprocedure ReplaceDate(var DateTime: TDateTime; const NewDate: TDateTime);\r\n\r\nfunction Date: TDateTime;\r\nfunction Time: TDateTime;\r\nfunction Now: TDateTime;\r\nfunction DayOfWeek(DateTime: TDateTime): integer;\r\nfunction IncMonth(const DateTime: TDateTime; NumberOfMonths: integer = 1 ): TDateTime;\r\nprocedure IncAMonth(var Year, Month, Day: Word; NumberOfMonths: Integer = 1);\r\nfunction IsLeapYear(Year: Word): boolean;\r\nfunction CurrentYear:Word;\r\n\r\n// Date <-> String conversion\r\n\r\nfunction DateToStr(Date: TDateTime): string; overload;\r\nfunction DateToStr(Date: TDateTime; const aSettings: TFormatSettings): string; overload;\r\nfunction StrToDate(const S: String): TDateTime; overload;\r\nfunction StrToDate(const S: String; separator : char): TDateTime; overload;\r\nfunction StrToDate(const S: String; const useformat : string; separator : char): TDateTime; overload;\r\nfunction StrToDate(const S: string; const aSettings : TFormatSettings): TDateTime; overload;\r\nfunction TryStrToDate(const S: String; out Value: TDateTime): Boolean; overload;\r\nfunction TryStrToDate(const S: String; out Value: TDateTime; const aSettings : TFormatSettings): Boolean; overload;\r\nfunction TryStrToDate(const S: String; out Value: TDateTime; separator : char): Boolean; overload;\r\nfunction TryStrToDate(const S: String; out Value: TDateTime; const useformat : string; separator : char): Boolean; overload;\r\nfunction StrToDateDef(const S: String; const Defvalue : TDateTime): TDateTime; overload;\r\nfunction StrToDateDef(const S: String; const Defvalue : TDateTime; separator : char): TDateTime; overload;\r\nfunction StrToDateDef(const S: string; const Defvalue: TDateTime; const aSettings: TFormatSettings): TDateTime; overload;\r\n\r\n// Time <-> String conversion\r\n\r\nfunction TimeToStr(Time: TDateTime): string;overload;\r\nfunction TimeToStr(Time: TDateTime; const aSettings: TFormatSettings): string;overload;\r\nfunction StrToTime(const S: String): TDateTime;overload;\r\nfunction StrToTime(const S: String; separator : char): TDateTime;overload;\r\nfunction StrToTime(const S: string; const aSettings : TFormatSettings): TDateTime;overload;\r\nfunction TryStrToTime(const S: String; out Value: TDateTime): Boolean;overload;\r\nfunction TryStrToTime(const S: String; out Value: TDateTime; aSettings : TFormatSettings): Boolean;overload;\r\nfunction TryStrToTime(const S: String; out Value: TDateTime; separator : char): Boolean; overload;\r\nfunction StrToTimeDef(const S: String; const Defvalue : TDateTime): TDateTime;overload;\r\nfunction StrToTimeDef(const S: String; const Defvalue : TDateTime; separator : char): TDateTime;overload;\r\nfunction StrToTimeDef(const AString: string; const ADefault: TDateTime; const aSettings: TFormatSettings): TDateTime; overload;\r\n\r\n// DateTime <-> String conversion\r\n\r\nfunction DateTimeToStr(DateTime: TDateTime; ForceTimeIfZero : Boolean = False): string;overload;\r\nfunction DateTimeToStr(DateTime: TDateTime; const aSettings: TFormatSettings; ForceTimeIfZero : Boolean = False): string;overload;\r\nfunction StrToDateTime(const S: String): TDateTime;overload;\r\nfunction StrToDateTime(const s: String; const aSettings : TFormatSettings): TDateTime;overload;\r\nfunction TryStrToDateTime(const S: String; out Value: TDateTime): Boolean; overload;\r\nfunction TryStrToDateTime(const S: string; out Value: TDateTime; const aSettings: TFormatSettings): Boolean; overload;\r\nfunction StrToDateTimeDef(const S: String; const Defvalue : TDateTime): TDateTime; overload;\r\nfunction StrToDateTimeDef(const S: String; const Defvalue : TDateTime; aSettings : TFormatSettings): TDateTime; overload;\r\nfunction FormatDateTime(const FormatStr: string; const DateTime: TDateTime): string; overload;\r\nfunction FormatDateTime(const FormatStr: string; const DateTime: TDateTime; const aSettings: TFormatSettings): string; overload;\r\n\r\n\r\n{ *****************************************************************************\r\n Currency support\r\n *****************************************************************************}\r\n\r\n\r\nVar\r\n CurrencyFormat : Byte deprecated;\r\n NegCurrFormat : Byte deprecated;\r\n CurrencyDecimals : Byte deprecated;\r\n CurrencyString : String deprecated;\r\n\r\nFunction FloattoCurr (Const Value : Extended) : Currency;\r\nfunction TryFloatToCurr(const Value: Extended; var AResult: Currency): Boolean;\r\nFunction CurrToStr(Value: Currency): string; overload;\r\nFunction CurrToStr(Value: Currency; Const aSettings: TFormatSettings): string; overload;\r\nfunction StrToCurr(const S: string): Currency; overload;\r\nfunction StrToCurr(const S: string; Const aSettings: TFormatSettings): Currency; overload;\r\nfunction TryStrToCurr(const S: string;Out Value : Currency): Boolean; overload;\r\nfunction TryStrToCurr(const S: string;Out Value : Currency; Const aSettings: TFormatSettings): Boolean; overload;\r\nfunction StrToCurrDef(const S: string; Default : Currency): Currency; overload;\r\nfunction StrToCurrDef(const S: string; Default : Currency; Const aSettings: TFormatSettings): Currency; overload;\r\n\r\n{*****************************************************************************\r\n File Paths\r\n*****************************************************************************}\r\ntype\r\n PathStr = String;\r\n TPathStrArray = Array of PathStr;\r\n\r\nfunction ChangeFileExt(const FileName, Extension: PathStr): PathStr;\r\nfunction ExtractFilePath(const FileName: PathStr): PathStr;\r\nfunction ExtractFileDrive(const FileName: PathStr): PathStr;\r\nfunction ExtractFileName(const FileName: PathStr): PathStr;\r\nfunction ExtractFileExt(const FileName: PathStr): PathStr;\r\nfunction ExtractFileDir(Const FileName : PathStr): PathStr;\r\nfunction ExtractRelativepath (Const BaseName,DestName : PathStr): PathStr;\r\nfunction IncludeTrailingPathDelimiter(Const Path : PathStr) : PathStr;\r\nfunction ExcludeTrailingPathDelimiter(Const Path: PathStr): PathStr;\r\nfunction IncludeLeadingPathDelimiter(Const Path : PathStr) : PathStr;\r\nfunction ExcludeLeadingPathDelimiter(Const Path: PathStr): PathStr;\r\nfunction IsPathDelimiter(Const Path: PathStr; Index: Integer): Boolean;\r\nFunction SetDirSeparators (Const FileName : PathStr) : PathStr;\r\nFunction GetDirs (DirName : PathStr) : TPathStrArray;\r\nfunction ConcatPaths(const Paths: array of PathStr): PathStr;\r\n\r\n\r\n{*****************************************************************************\r\n Interfaces\r\n*****************************************************************************}\r\n\r\nconst\r\n GUID_NULL: TGuid = '{00000000-0000-0000-0000-000000000000}';\r\n\r\nfunction Supports(const Instance: IInterface; const AClass: TClass; out Obj): Boolean; overload;\r\nfunction Supports(const Instance: IInterface; const IID: TGuid; out Intf): Boolean; overload;\r\nfunction Supports(const Instance: TObject; const IID: TGuid; out Intf): Boolean; overload;\r\nfunction Supports(const Instance: TObject; const IID: TGuidString; out Intf): Boolean; overload;\r\n\r\nfunction Supports(const Instance: IInterface; const AClass: TClass): Boolean; overload;\r\nfunction Supports(const Instance: IInterface; const IID: TGuid): Boolean; overload;\r\nfunction Supports(const Instance: TObject; const IID: TGuid): Boolean; overload;\r\nfunction Supports(const Instance: TObject; const IID: TGuidString): Boolean; overload;\r\n\r\nfunction Supports(const AClass: TClass; const IID: TGuid): Boolean; overload;\r\nfunction Supports(const AClass: TClass; const IID: TGuidString): Boolean; overload;\r\n\r\nfunction TryStringToGUID(const s: string; out Guid: TGuid): Boolean;\r\nfunction StringToGUID(const S: string): TGuid;\r\nfunction GUIDToString(const guid: TGuid): string;\r\nfunction IsEqualGUID(const guid1, guid2: TGuid): Boolean;\r\nfunction GuidCase(const guid: TGuid; const List: array of TGuid): Integer;\r\nFunction CreateGUID(out GUID : TGUID) : Integer;\r\n\r\nFunction EncodeHTMLEntities (S : String) : String;\r\n\r\n{ ---------------------------------------------------------------------\r\n Type Helpers\r\n ---------------------------------------------------------------------}\r\n\r\nType\r\n TCharArray = Array of char;\r\n\r\n TByteBitIndex = 0..7;\r\n TShortIntBitIndex = 0..7;\r\n TWordBitIndex = 0..15;\r\n TSmallIntBitIndex = 0..15;\r\n TCardinalBitIndex = 0..31;\r\n TIntegerBitIndex = 0..31;\r\n TLongIntBitIndex = TIntegerBitIndex;\r\n TQwordBitIndex = 0..52;\r\n TInt64BitIndex = 0..52;\r\n TNativeIntBitIndex = 0..52;\r\n TNativeUIntBitIndex = 0..52;\r\n\r\nConst\r\n CPUEndian = {$IFNDEF FPC_LITTLE_ENDIAN}TEndian.Big{$ELSE}TEndian.Little{$ENDIF};\r\n\r\nType\r\n\r\n { TGuidHelper }\r\n\r\n TGuidHelper = record helper for TGUID\r\n class function Create(Src : TGUID; BigEndian: Boolean): TGUID; overload; static;\r\n class function Create(const Buf : TJSArrayBuffer; AStartIndex: Cardinal; BigEndian: Boolean): TGUID; overload; static;\r\n class function Create(const Data: array of Byte; AStartIndex: Cardinal; BigEndian: Boolean): TGUID; overload; static;\r\n Class Function Create(const B: TBytes; DataEndian: TEndian = CPUEndian): TGUID; overload; static; inline;\r\n Class Function Create(const B: TBytes; AStartIndex: Cardinal; DataEndian: TEndian = CPUEndian): TGUID; overload; static;\r\n Class Function Create(const S: string): TGUID; overload; static;\r\n Class Function Create(A: Integer; B: SmallInt; C: SmallInt; const D: TBytes): TGUID; overload; static;\r\n// Class Function Create(A: Integer; B: SmallInt; C: SmallInt; D, E, F, G, H, I, J, K: Byte): TGUID; overload; static;\r\n Class Function Create(A: Cardinal; B: Word; C: Word; D, E, F, G, H, I, J, K: Byte): TGUID; overload; static;\r\n Class Function NewGuid: TGUID; static;\r\n Class Function Empty: TGUID; static;\r\n Function ToByteArray(DataEndian: TEndian = CPUEndian): TBytes;\r\n Function ToString(SkipBrackets: Boolean = False): string;\r\n end;\r\n\r\n\r\n{$SCOPEDENUMS ON}\r\n TStringSplitOptions = (None, ExcludeEmpty);\r\n{$SCOPEDENUMS OFF}\r\n\r\n { TStringHelper }\r\n\r\n TStringHelper = Type Helper for String\r\n Private\r\n function GetChar(AIndex : SizeInt) : Char;\r\n function GetLength : SizeInt;\r\n procedure Set_Length(const AValue: SizeInt);\r\n public\r\n const Empty = '';\r\n // Methods\r\n Class Function Compare(const A: string; const B: string): Integer; overload; static; //inline;\r\n Class Function Compare(const A: string; const B: string; IgnoreCase: Boolean): Integer; overload; static; //inline; //deprecated 'Use same with TCompareOptions';\r\n Class Function Compare(const A: string; const B: string; Options: TCompareOptions): Integer; overload; static; // inline;\r\n Class Function Compare(const A: string; IndexA: SizeInt; const B: string; IndexB: SizeInt; ALen: SizeInt): Integer; overload; static; // inline;\r\n Class Function Compare(const A: string; IndexA: SizeInt; const B: string; IndexB: SizeInt; ALen: SizeInt; IgnoreCase: Boolean): Integer; overload; static; // inline; //deprecated 'Use same with TCompareOptions';\r\n Class Function Compare(const A: string; IndexA: SizeInt; const B: string; IndexB: SizeInt; ALen: SizeInt; Options: TCompareOptions): Integer; overload; static;// inline;\r\n Class Function CompareOrdinal(const A: string; const B: string): Integer; overload; static;\r\n Class Function CompareOrdinal(const A: string; IndexA: SizeInt; const B: string; IndexB: SizeInt; ALen: SizeInt): Integer; overload; static;\r\n Class Function CompareText(const A: string; const B: string): Integer; static; inline;\r\n Class Function Copy(const Str: string): string; inline; static;\r\n Class Function Create(AChar: Char; ACount: SizeInt): string; overload; inline; static;\r\n Class Function Create(const AValue: array of Char): string; overload; static;\r\n Class Function Create(const AValue: array of Char; StartIndex: SizeInt; ALen: SizeInt): string; overload; static;\r\n Class Function EndsText(const ASubText, AText: string): Boolean; static;\r\n Class Function Equals(const a: string; const b: string): Boolean; overload; static;\r\n Class Function Format(const AFormat: string; const args: array of const): string; overload; static;\r\n Class Function IsNullOrEmpty(const AValue: string): Boolean; static;\r\n Class Function IsNullOrWhiteSpace(const AValue: string): Boolean; static;\r\n Class Function Join(const Separator: string; const Values: array of const): string; overload; static;\r\n Class Function Join(const Separator: string; const Values: array of string): string; overload; static;\r\n Class Function Join(const Separator: string; const Values: array of string; StartIndex: SizeInt; ACount: SizeInt): string; overload; static;\r\n Class Function LowerCase(const S: string): string; overload; static; inline;\r\n Class Function Parse(const AValue: Boolean): string; overload; static; inline;\r\n Class Function Parse(const AValue: Extended): string; overload; static;inline;\r\n Class Function Parse(const AValue: NativeInt): string; overload; static; inline;\r\n Class Function Parse(const AValue: Integer): string; overload; static; inline;\r\n Class Function ToBoolean(const S: string): Boolean; overload; static; inline;\r\n Class Function ToDouble(const S: string): Double; overload; static; inline;\r\n Class Function ToExtended(const S: string): Extended; overload; static; inline;\r\n Class Function ToNativeInt(const S: string): NativeInt; overload; static; inline;\r\n Class Function ToInteger(const S: string): Integer; overload; static; inline;\r\n Class Function UpperCase(const S: string): string; overload; static; inline;\r\n Class Function ToCharArray(const S : String) : TCharArray; static; overload;\r\n Function CompareTo(const B: string): Integer;\r\n Function Contains(const AValue: string): Boolean;\r\n Function CountChar(const C: Char): SizeInt;\r\n Function DeQuotedString: string; overload;\r\n Function DeQuotedString(const AQuoteChar: Char): string; overload;\r\n Function EndsWith(const AValue: string): Boolean; overload; inline;\r\n Function EndsWith(const AValue: string; IgnoreCase: Boolean): Boolean; overload;\r\n Function Equals(const AValue: string): Boolean; overload;\r\n Function Format(const args: array of const): string; overload;\r\n Function GetHashCode: Integer;\r\n Function IndexOf(AValue: Char): SizeInt; overload; inline;\r\n Function IndexOf(const AValue: string): SizeInt; overload; inline;\r\n Function IndexOf(AValue: Char; StartIndex: SizeInt): SizeInt; overload;\r\n Function IndexOf(const AValue: string; StartIndex: SizeInt): SizeInt; overload;\r\n Function IndexOf(AValue: Char; StartIndex: SizeInt; ACount: SizeInt): SizeInt; overload;\r\n Function IndexOf(const AValue: string; StartIndex: SizeInt; ACount: SizeInt): SizeInt; overload;\r\n Function IndexOfUnQuoted(const AValue: string; StartQuote, EndQuote: Char; StartIndex: SizeInt = 0): SizeInt; overload;\r\n Function IndexOfAny(const AnyOf: string): SizeInt; overload;\r\n Function IndexOfAny(const AnyOf: array of Char): SizeInt; overload;\r\n Function IndexOfAny(const AnyOf: String; StartIndex: SizeInt): SizeInt; overload;\r\n Function IndexOfAny(const AnyOf: array of Char; StartIndex: SizeInt): SizeInt; overload;\r\n Function IndexOfAny(const AnyOf: String; StartIndex: SizeInt; ACount: SizeInt): SizeInt; overload;\r\n Function IndexOfAny(const AnyOf: array of Char; StartIndex: SizeInt; ACount: SizeInt): SizeInt; overload;\r\n Function IndexOfAny(const AnyOf: array of String): SizeInt; overload;\r\n Function IndexOfAny(const AnyOf: array of String; StartIndex: SizeInt): SizeInt; overload;\r\n Function IndexOfAny(const AnyOf: array of String; StartIndex: SizeInt; ACount: SizeInt): SizeInt; overload;\r\n Function IndexOfAny(const AnyOf: array of String; StartIndex: SizeInt; ACount: SizeInt; Out AMatch : SizeInt): SizeInt; overload;\r\n Function IndexOfAnyUnquoted(const AnyOf: array of Char; StartQuote, EndQuote: Char): SizeInt; overload;\r\n Function IndexOfAnyUnquoted(const AnyOf: array of Char; StartQuote, EndQuote: Char; StartIndex: SizeInt): SizeInt; overload;\r\n Function IndexOfAnyUnquoted(const AnyOf: array of Char; StartQuote, EndQuote: Char; StartIndex: SizeInt; ACount: SizeInt): SizeInt; overload;\r\n function IndexOfAnyUnquoted(const AnyOf: array of string; StartQuote, EndQuote: Char; StartIndex: SizeInt; Out Matched: SizeInt): SizeInt; overload;\r\n Function Insert(StartIndex: SizeInt; const AValue: string): string;\r\n Function IsDelimiter(const Delimiters: string; Index: SizeInt): Boolean;\r\n Function IsEmpty: Boolean;\r\n Function IsNumber: Boolean;\r\n Function LastDelimiter(const Delims: string): SizeInt;\r\n Function LastIndexOf(AValue: Char): SizeInt; overload;\r\n Function LastIndexOf(const AValue: string): SizeInt; overload;\r\n Function LastIndexOf(AValue: Char; AStartIndex: SizeInt): SizeInt; overload;\r\n Function LastIndexOf(const AValue: string; AStartIndex: SizeInt): SizeInt; overload;\r\n Function LastIndexOf(AValue: Char; AStartIndex: SizeInt; ACount: SizeInt): SizeInt; overload;\r\n Function LastIndexOf(const AValue: string; AStartIndex: SizeInt; ACount: SizeInt): SizeInt; overload;\r\n Function LastIndexOfAny(const AnyOf: array of Char): SizeInt; overload;\r\n Function LastIndexOfAny(const AnyOf: array of Char; AStartIndex: SizeInt): SizeInt; overload;\r\n Function LastIndexOfAny(const AnyOf: array of Char; AStartIndex: SizeInt; ACount: SizeInt): SizeInt; overload;\r\n Function PadLeft(ATotalWidth: SizeInt): string; overload; inline;\r\n Function PadLeft(ATotalWidth: SizeInt; PaddingChar: Char): string; overload; inline;\r\n Function PadRight(ATotalWidth: SizeInt): string; overload; inline;\r\n Function PadRight(ATotalWidth: SizeInt; PaddingChar: Char): string; overload; inline;\r\n Function QuotedString: string; overload;\r\n Function QuotedString(const AQuoteChar: Char): string; overload;\r\n Function Remove(StartIndex: SizeInt): string; overload; inline;\r\n Function Remove(StartIndex: SizeInt; ACount: SizeInt): string; overload; inline;\r\n Function Replace(OldChar: Char; NewChar: Char): string; overload;\r\n Function Replace(OldChar: Char; NewChar: Char; ReplaceFlags: TReplaceFlags): string; overload;\r\n Function Replace(const OldValue: string; const NewValue: string): string; overload;\r\n Function Replace(const OldValue: string; const NewValue: string; ReplaceFlags: TReplaceFlags): string; overload;\r\n Function Split(const Separators: String): TStringArray; overload;\r\n Function Split(const Separators: array of Char): TStringArray; overload;\r\n Function Split(const Separators: string; ACount: SizeInt): TStringArray; overload;\r\n Function Split(const Separators: array of Char; ACount: SizeInt): TStringArray; overload;\r\n Function Split(const Separators: string; Options: TStringSplitOptions): TStringArray; overload;\r\n Function Split(const Separators: array of Char; Options: TStringSplitOptions): TStringArray; overload;\r\n Function Split(const Separators: string; ACount: SizeInt; Options: TStringSplitOptions): TStringArray; overload;\r\n Function Split(const Separators: array of Char; ACount: SizeInt; Options: TStringSplitOptions): TStringArray; overload;\r\n Function Split(const Separators: array of string): TStringArray; overload;\r\n Function Split(const Separators: array of string; ACount: SizeInt): TStringArray; overload;\r\n Function Split(const Separators: array of string; Options: TStringSplitOptions): TStringArray; overload;\r\n Function Split(const Separators: array of string; ACount: SizeInt; Options: TStringSplitOptions): TStringArray; overload;\r\n Function Split(const Separators: String; AQuote: Char): TStringArray; overload;\r\n Function Split(const Separators: array of Char; AQuote: Char): TStringArray; overload;\r\n Function Split(const Separators: String; AQuoteStart, AQuoteEnd: Char): TStringArray; overload;\r\n Function Split(const Separators: array of Char; AQuoteStart, AQuoteEnd: Char): TStringArray; overload;\r\n Function Split(const Separators: string; AQuoteStart, AQuoteEnd: Char; Options: TStringSplitOptions): TStringArray; overload;\r\n Function Split(const Separators: array of Char; AQuoteStart, AQuoteEnd: Char; Options: TStringSplitOptions): TStringArray; overload;\r\n Function Split(const Separators: string; AQuoteStart, AQuoteEnd: Char; ACount: SizeInt): TStringArray; overload;\r\n Function Split(const Separators: array of Char; AQuoteStart, AQuoteEnd: Char; ACount: SizeInt): TStringArray; overload;\r\n Function Split(const Separators: string; AQuoteStart, AQuoteEnd: Char; ACount: SizeInt; Options: TStringSplitOptions): TStringArray; overload;\r\n Function Split(const Separators: array of Char; AQuoteStart, AQuoteEnd: Char; ACount: SizeInt; Options: TStringSplitOptions): TStringArray; overload;\r\n Function Split(const Separators: array of string; AQuote: Char): TStringArray; overload;\r\n Function Split(const Separators: array of string; AQuoteStart, AQuoteEnd: Char): TStringArray; overload;\r\n Function Split(const Separators: array of string; AQuoteStart, AQuoteEnd: Char; Options: TStringSplitOptions): TStringArray; overload;\r\n Function Split(const Separators: array of string; AQuoteStart, AQuoteEnd: Char; ACount: SizeInt): TStringArray; overload;\r\n Function Split(const Separators: array of string; AQuoteStart, AQuoteEnd: Char; ACount: SizeInt; Options: TStringSplitOptions): TStringArray; overload;\r\n Function StartsWith(const AValue: string): Boolean; overload; inline;\r\n Function StartsWith(const AValue: string; IgnoreCase: Boolean): Boolean; overload;\r\n Function Substring(AStartIndex: SizeInt): string; overload;\r\n Function Substring(AStartIndex: SizeInt; ALen: SizeInt): string; overload;\r\n Function ToBoolean: Boolean; overload; inline;\r\n Function ToInteger: Integer; overload; inline;\r\n Function ToNativeInt: NativeInt; overload; inline;\r\n Function ToDouble: Double; overload; inline;\r\n Function ToExtended: Extended; overload; inline;\r\n Function ToCharArray: TCharArray; overload;\r\n Function ToCharArray(AStartIndex: SizeInt; ALen: SizeInt): TCharArray; overload;\r\n Function ToLower: string; overload; inline;\r\n Function ToLowerInvariant: string;\r\n Function ToUpper: string; overload; inline;\r\n Function ToUpperInvariant: string; inline;\r\n Function Trim: string; overload;\r\n Function TrimLeft: string; overload;\r\n Function TrimRight: string; overload;\r\n Function Trim(const ATrimChars: array of Char): string; overload;\r\n Function TrimLeft(const ATrimChars: array of Char): string; overload;\r\n Function TrimRight(const ATrimChars: array of Char): string; overload;\r\n Function TrimEnd(const ATrimChars: array of Char): string; deprecated 'Use TrimRight';\r\n Function TrimStart(const ATrimChars: array of Char): string; deprecated 'Use TrimLeft';\r\n property Chars[AIndex: SizeInt]: Char read GetChar;\r\n property Length: SizeInt read GetLength write Set_Length;\r\n end;\r\n\r\n TDoubleHelper = Type Helper for Double\r\n private\r\n Function GetB(AIndex: Cardinal): Byte;\r\n Function GetW(AIndex: Cardinal): Word;\r\n Function GetE: NativeUInt; inline;\r\n Function GetF: NativeUInt; inline;\r\n Function GetS: Boolean; inline;\r\n Procedure SetS(aValue : Boolean); inline;\r\n procedure SetB(AIndex: Cardinal; const AValue: Byte);\r\n procedure SetW(AIndex: Cardinal; const AValue: Word);\r\n public\r\n const\r\n {$push}\r\n {$R-}\r\n {$Q-}\r\n Epsilon : Double = 4.9406564584124654418e-324;\r\n MaxValue : Double = 1.7976931348623157081e+308;\r\n MinValue : Double = -1.7976931348623157081e+308;\r\n // PositiveInfinity : Double = 1.0/0.0;\r\n // NegativeInfinity : Double = -1.0/0.0;\r\n // NaN : Double = 0.0/0.0;\r\n {$POP}\r\n Class Function IsInfinity(const AValue: Double): Boolean; overload; inline; static;\r\n Class Function IsNan(const AValue: Double): Boolean; overload; inline; static;\r\n Class Function IsNegativeInfinity(const AValue: Double): Boolean; overload; inline; static;\r\n Class Function IsPositiveInfinity(const AValue: Double): Boolean; overload; inline; static;\r\n Class Function Parse(const AString: string): Double; overload; inline; static;\r\n Class Function ToString(const AValue: Double): string; overload; inline; static;\r\n Class Function ToString(const AValue: Double; const AFormat: TFloatFormat; const APrecision, ADigits: Integer): string; overload; inline; static;\r\n Class Function TryParse(const AString: string; out AValue: Double): Boolean; overload; inline; static;\r\n\r\n Procedure BuildUp(const ASignFlag: Boolean; const AMantissa: NativeUInt; const AExponent: Integer);\r\n Function Exponent: Integer;\r\n Function Fraction: Extended;\r\n Function IsInfinity: Boolean; overload; inline;\r\n Function IsNan: Boolean; overload; inline;\r\n Function IsNegativeInfinity: Boolean; overload; inline;\r\n Function IsPositiveInfinity: Boolean; overload; inline;\r\n Function Mantissa: NativeUInt;\r\n\r\n Function ToString(const AFormat: TFloatFormat; const APrecision, ADigits: Integer): string; overload; inline;\r\n Function ToString: string; overload; inline;\r\n\r\n property Bytes[AIndex: Cardinal]: Byte read GetB write SetB; // 0..7\r\n property Words[AIndex: Cardinal]: Word read GetW write SetW; // 0..3\r\n property Sign: Boolean read GetS Write SetS;\r\n property Exp: NativeUInt read GetE;\r\n property Frac: NativeUInt read GetF;\r\n end;\r\n\r\n TByteHelper = Type Helper for Byte\r\n public\r\n const\r\n MaxValue = 255;\r\n MinValue = 0;\r\n public\r\n Class Function Parse(const AString: string): Byte; inline; static;\r\n Class Function Size: Integer; inline; static;\r\n Class Function ToString(const AValue: Byte): string; overload; inline; static;\r\n Class Function TryParse(const AString: string; out AValue: Byte): Boolean; inline; static;\r\n Public\r\n Function ToBoolean: Boolean; inline;\r\n Function ToDouble: Double; inline;\r\n Function ToExtended: Extended; inline;\r\n Function ToBinString:string; inline;\r\n Function ToHexString(const AMinDigits: Integer): string; overload; inline;\r\n Function ToHexString: string; overload; inline;\r\n Function ToString: string; overload; inline;\r\n Function SetBit(const Index: TByteBitIndex) : Byte; inline;\r\n Function ClearBit(const Index: TByteBitIndex) : Byte; inline;\r\n Function ToggleBit(const Index: TByteBitIndex) : Byte; inline;\r\n Function TestBit(const Index:TByteBitIndex):Boolean; inline;\r\n end;\r\n\r\n TShortIntHelper = Type Helper for ShortInt\r\n public\r\n const\r\n MaxValue = 127;\r\n MinValue = -128;\r\n public\r\n Class Function Parse(const AString: string): ShortInt; inline; static;\r\n Class Function Size: Integer; inline; static;\r\n Class Function ToString(const AValue: ShortInt): string; overload; inline; static;\r\n Class Function TryParse(const AString: string; out AValue: ShortInt): Boolean; inline; static;\r\n public\r\n Function ToBoolean: Boolean; inline;\r\n Function ToDouble: Double; inline;\r\n Function ToExtended: Extended; inline;\r\n Function ToBinString:string; inline;\r\n Function ToHexString(const AMinDigits: Integer): string; overload; inline;\r\n Function ToHexString: string; overload; inline;\r\n Function ToString: string; overload; inline;\r\n Function SetBit(const Index: TShortIntBitIndex): Shortint; inline;\r\n Function ClearBit(const Index: TShortIntBitIndex): Shortint; inline;\r\n Function ToggleBit(const Index: TShortIntBitIndex): Shortint; inline;\r\n Function TestBit(const Index:TShortIntBitIndex):Boolean; inline;\r\n end;\r\n\r\n TSmallIntHelper = Type Helper for SmallInt\r\n public\r\n const\r\n MaxValue = 32767;\r\n MinValue = -32768;\r\n public\r\n Class Function Parse(const AString: string): SmallInt; inline; static;\r\n Class Function Size: Integer; inline; static;\r\n Class Function ToString(const AValue: SmallInt): string; overload; inline; static;\r\n Class Function TryParse(const AString: string; out AValue: SmallInt): Boolean; inline; static;\r\n public\r\n Function ToString: string; overload; inline;\r\n Function ToBoolean: Boolean; inline;\r\n Function ToBinString:string; inline;\r\n Function ToHexString: string; overload; inline;\r\n Function ToHexString(const AMinDigits: Integer): string; overload; inline;\r\n Function ToDouble: Double; inline;\r\n Function ToExtended: Extended; inline;\r\n Function SetBit(const Index: TSmallIntBitIndex) : Smallint; inline;\r\n Function ClearBit(const Index: TSmallIntBitIndex) : Smallint; inline;\r\n Function ToggleBit(const Index: TSmallIntBitIndex) : Smallint; inline;\r\n Function TestBit(const Index:TSmallIntBitIndex):Boolean; inline;\r\n end;\r\n\r\n TWordHelper = Type Helper for Word\r\n public\r\n const\r\n MaxValue = 65535;\r\n MinValue = 0;\r\n Public\r\n class function FromBytes(const ALow, AHigh: Byte): Word; inline; static;\r\n Class Function Parse(const AString: string): Word; inline; static;\r\n Class Function Size: Integer; inline; static;\r\n procedure ToBytes(out ALow, AHigh: Byte);\r\n Class Function ToString(const AValue: Word): string; overload; inline; static;\r\n Class Function TryParse(const AString: string; out AValue: Word): Boolean; inline; static;\r\n Public\r\n Function ToBoolean: Boolean; inline;\r\n Function ToDouble: Double; inline;\r\n Function ToExtended: Extended; inline;\r\n Function ToBinString:string; inline;\r\n Function ToHexString(const AMinDigits: Integer): string; overload; inline;\r\n Function ToHexString: string; overload; inline;\r\n Function ToString: string; overload; inline;\r\n Function SetBit(const Index: TWordBitIndex) : Word; inline;\r\n Function ClearBit(const Index: TWordBitIndex) : Word; inline;\r\n Function ToggleBit(const Index: TWordBitIndex) : Word; inline;\r\n Function TestBit(const Index:TWordBitIndex):Boolean; inline;\r\n end;\r\n\r\n TCardinalHelper = Type Helper for Cardinal { for LongWord Type too }\r\n public\r\n const\r\n MaxValue = 4294967295;\r\n MinValue = 0;\r\n Public\r\n Class Function Parse(const AString: string): Cardinal; inline; static;\r\n Class Function Size: Integer; inline; static;\r\n Class Function ToString(const AValue: Cardinal): string; overload; inline; static;\r\n Class Function TryParse(const AString: string; out AValue: Cardinal): Boolean; inline; static;\r\n Public\r\n Function ToBoolean: Boolean; inline;\r\n Function ToDouble: Double; inline;\r\n Function ToExtended: Extended; inline;\r\n Function ToBinString:string; inline;\r\n Function ToHexString(const AMinDigits: Integer): string; overload; inline;\r\n Function ToHexString: string; overload; inline;\r\n Function ToString: string; overload; inline;\r\n Function SetBit(const Index: TCardinalBitIndex) : Cardinal; inline;\r\n Function ClearBit(const Index: TCardinalBitIndex) : Cardinal; inline;\r\n Function ToggleBit(const Index: TCardinalBitIndex) : Cardinal; inline;\r\n Function TestBit(const Index:TCardinalBitIndex):Boolean; inline;\r\n end;\r\n\r\n TIntegerHelper = Type Helper for Integer { for LongInt Type too }\r\n public\r\n const\r\n MaxValue = 2147483647;\r\n MinValue = -2147483648;\r\n Public\r\n Class Function Size: Integer; inline; static;\r\n Class Function ToString(const AValue: Integer): string; overload; inline; static;\r\n Class Function Parse(const AString: string): Integer; inline; static;\r\n Class Function TryParse(const AString: string; out AValue: Integer): Boolean; inline; static;\r\n Public\r\n Function ToBoolean: Boolean; inline;\r\n Function ToDouble: Double; inline;\r\n Function ToExtended: Extended; inline;\r\n Function ToBinString:string; inline;\r\n Function ToHexString(const AMinDigits: Integer): string; overload; inline;\r\n Function ToHexString: string; overload; inline;\r\n Function ToString: string; overload; inline;\r\n Function SetBit(const Index: TIntegerBitIndex) : Integer; inline;\r\n Function ClearBit(const Index: TIntegerBitIndex) : Integer; inline;\r\n Function ToggleBit(const Index: TIntegerBitIndex) : Integer; inline;\r\n Function TestBit(const Index:TIntegerBitIndex):Boolean; inline;\r\n end;\r\n\r\n TUInt64Helper = Type Helper for UInt64\r\n public\r\n class Function ToString(const AValue: UInt64): string; overload; inline; static;\r\n public\r\n Function ToString: string; overload; inline;\r\n end;\r\n\r\n TNativeIntHelper = Type Helper for NativeInt\r\n public\r\n const\r\n MaxValue = High(NativeInt);\r\n MinValue = Low(NativeInt);\r\n Public\r\n Class Function Parse(const AString: string): NativeInt; inline; static;\r\n Class Function Size: Integer; inline; static;\r\n Class Function ToString(const AValue: NativeInt): string; overload; inline; static;\r\n Class Function TryParse(const AString: string; out AValue: NativeInt): Boolean; inline; static;\r\n Public\r\n Function ToBoolean: Boolean; inline;\r\n Function ToDouble: Double; inline;\r\n Function ToExtended: Extended; inline;\r\n Function ToBinString:string; inline;\r\n Function ToHexString(const AMinDigits: Integer): string; overload; inline;\r\n Function ToHexString: string; overload; inline;\r\n Function ToString: string; overload; inline;\r\n Function SetBit(const Index: TNativeIntBitIndex) : NativeInt; inline;\r\n Function ClearBit(const Index: TNativeIntBitIndex) : NativeInt; inline;\r\n Function ToggleBit(const Index: TNativeIntBitIndex) : NativeInt; inline;\r\n Function TestBit(const Index:TNativeIntBitIndex):Boolean; inline;\r\n end;\r\n\r\n TNativeUIntHelper = Type Helper for NativeUInt\r\n public\r\n const\r\n MaxValue = High(NativeUInt);\r\n MinValue = 0;\r\n Public\r\n Class Function Parse(const AString: string): NativeUInt; inline; static;\r\n Class Function Size: Integer; inline; static;\r\n Class Function ToString(const AValue: NativeUInt): string; overload; inline; static;\r\n Class Function TryParse(const AString: string; out AValue: NativeUInt): Boolean; inline; static;\r\n Public\r\n Function ToBoolean: Boolean; inline;\r\n Function ToDouble: Double; inline;\r\n Function ToExtended: Extended; inline;\r\n Function ToBinString:string; inline;\r\n Function ToHexString(const AMinDigits: Integer): string; overload; inline;\r\n Function ToHexString: string; overload; inline;\r\n Function ToSingle: Single; inline;\r\n Function ToString: string; overload; inline;\r\n Function SetBit(const Index: TNativeUIntBitIndex) : NativeUint; inline;\r\n Function ClearBit(const Index: TNativeUIntBitIndex): NativeUint; inline;\r\n Function ToggleBit(const Index: TNativeUIntBitIndex) : NativeUint; inline;\r\n Function TestBit(const Index:TNativeUIntBitIndex) :Boolean; inline;\r\n end;\r\n\r\n{$SCOPEDENUMS ON}\r\n TUseBoolStrs = (False,True);\r\n{$SCOPEDENUMS OFF}\r\n\r\n TBooleanHelper = Type Helper for Boolean\r\n public\r\n Class Function Parse(const S: string): Boolean; inline; static;\r\n Class Function Size: Integer; inline; static;\r\n Class Function ToString(const AValue: Boolean; UseBoolStrs: TUseBoolStrs = TUseBoolStrs.false): string; overload; inline; static;\r\n Class Function TryToParse(const S: string; out AValue: Boolean): Boolean; inline; static;\r\n Public\r\n Function ToInteger: Integer; inline;\r\n Function ToString(UseBoolStrs: TUseBoolStrs = TUseBoolStrs.False): string; overload; inline;\r\n end;\r\n\r\n TByteBoolHelper = Type Helper for ByteBool\r\n public\r\n Class Function Parse(const S: string): Boolean; inline; static;\r\n Class Function Size: Integer; inline; static;\r\n Class Function ToString(const AValue: Boolean; UseBoolStrs : Boolean = False): string; overload; inline; static;\r\n Class Function TryToParse(const S: string; out AValue: Boolean): Boolean; inline; static;\r\n Public\r\n Function ToInteger: Integer; inline;\r\n Function ToString(UseBoolStrs: Boolean = False): string; overload; inline;\r\n end;\r\n\r\n TWordBoolHelper = Type Helper for WordBool\r\n public\r\n Class Function Parse(const S: string): Boolean; inline; static;\r\n Class Function Size: Integer; inline; static;\r\n Class Function ToString(const AValue: Boolean; UseBoolStrs: Boolean = False): string; overload; inline; static;\r\n Class Function TryToParse(const S: string; out AValue: Boolean): Boolean; inline; static;\r\n Public\r\n Function ToInteger: Integer; inline;\r\n Function ToString(UseBoolStrs: boolean = False): string; overload; inline;\r\n end;\r\n\r\n TLongBoolHelper = Type Helper for LongBool\r\n public\r\n Class Function Parse(const S: string): Boolean; inline; static;\r\n Class Function Size: Integer; inline; static;\r\n Class Function ToString(const AValue: Boolean; UseBoolStrs: Boolean= False): string; overload; inline; static;\r\n Class Function TryToParse(const S: string; out AValue: Boolean): Boolean; inline; static;\r\n public\r\n Function ToInteger: Integer; inline;\r\n Function ToString(UseBoolStrs: Boolean = False): string; overload; inline;\r\n end;\r\n\r\n { TStringBuilder }\r\n\r\n TStringBuilder = class\r\n private\r\n const\r\n DefaultCapacity = 64;\r\n private\r\n Function GetCapacity: Integer;\r\n Procedure SetCapacity(AValue: Integer);\r\n Function GetC(Index: Integer): Char;\r\n Procedure SetC(Index: Integer; AValue: Char);\r\n Function GetLength: Integer; inline;\r\n Procedure SetLength(AValue: Integer);\r\n protected\r\n FData: String;\r\n FMaxCapacity: Integer;\r\n // Raise error on range check.\r\n Procedure CheckRange(Idx,Count,MaxLen : Integer);inline;\r\n Procedure CheckNegative(Const AValue : Integer; Const AName: String); inline;\r\n // All appends/inserts pass through here.\r\n\r\n Procedure DoAppend(Const S : String);virtual; overload;\r\n Procedure DoAppend(const AValue: Array of char; Idx, aCount: Integer); virtual; overload;\r\n Procedure DoInsert(Index: Integer; const AValue: String); virtual; overload;\r\n Procedure DoInsert(Index: Integer; const AValue: Array of char; StartIndex, aCharCount: Integer); virtual; overload;\r\n Procedure DoReplace(Index: Integer; const Old, New: String); virtual;\r\n Procedure Grow;\r\n Procedure Shrink;\r\n public\r\n Constructor Create; overload;\r\n Constructor Create(aCapacity: Integer); overload;\r\n Constructor Create(const AValue: String); overload;\r\n Constructor Create(aCapacity: Integer; aMaxCapacity: Integer); overload;\r\n Constructor Create(const AValue: String; aCapacity: Integer); overload;\r\n Constructor Create(const AValue: String; StartIndex: Integer; aLength: Integer; aCapacity: Integer); overload;\r\n\r\n Function Append(const AValue: Boolean): TStringBuilder; overload;\r\n Function Append(const AValue: Byte): TStringBuilder; overload;\r\n Function Append(const AValue: Char): TStringBuilder; overload;\r\n Function Append(const AValue: Currency): TStringBuilder; overload;\r\n Function Append(const AValue: Double): TStringBuilder; overload;\r\n Function Append(const AValue: Smallint): TStringBuilder; overload;\r\n Function Append(const AValue: LongInt): TStringBuilder; overload;\r\n Function Append(const AValue: Int64): TStringBuilder; overload;\r\n Function Append(const AValue: TObject): TStringBuilder; overload;\r\n Function Append(const AValue: Shortint): TStringBuilder; overload;\r\n Function Append(const AValue: UInt64): TStringBuilder; overload;\r\n Function Append(const AValue: Array of char): TStringBuilder; overload;\r\n Function Append(const AValue: Word): TStringBuilder; overload;\r\n Function Append(const AValue: Cardinal): TStringBuilder; overload;\r\n Function Append(const AValue: String): TStringBuilder; overload;\r\n Function Append(const AValue: Char; RepeatCount: Integer): TStringBuilder; overload;\r\n Function Append(const AValue: Array of char; StartIndex: Integer; SBCharCount: Integer): TStringBuilder; overload;\r\n Function Append(const AValue: String; StartIndex: Integer; Count: Integer): TStringBuilder; overload;\r\n\r\n Function Append(const Fmt: String; const Args: array of const): TStringBuilder; overload;\r\n Function AppendFormat(const Fmt: String; const Args: array of const): TStringBuilder;\r\n Function AppendLine: TStringBuilder; overload;\r\n Function AppendLine(const AValue: String): TStringBuilder; overload;\r\n\r\n Procedure Clear;\r\n Procedure CopyTo(SourceIndex: Integer; Var Destination: Array of char; DestinationIndex: Integer; Count: Integer);\r\n Function EnsureCapacity(aCapacity: Integer): Integer;\r\n Function Equals(StringBuilder: TStringBuilder): Boolean; reintroduce;\r\n\r\n Function Insert(Index: Integer; const AValue: Boolean): TStringBuilder; overload;\r\n Function Insert(Index: Integer; const AValue: Byte): TStringBuilder; overload;\r\n Function Insert(Index: Integer; const AValue: Char): TStringBuilder; overload;\r\n Function Insert(Index: Integer; const AValue: Currency): TStringBuilder; overload;\r\n Function Insert(Index: Integer; const AValue: Double): TStringBuilder; overload;\r\n Function Insert(Index: Integer; const AValue: Smallint): TStringBuilder; overload;\r\n Function Insert(Index: Integer; const AValue: LongInt): TStringBuilder; overload;\r\n Function Insert(Index: Integer; const AValue: Array of char): TStringBuilder; overload;\r\n Function Insert(Index: Integer; const AValue: Int64): TStringBuilder; overload;\r\n Function Insert(Index: Integer; const AValue: TObject): TStringBuilder; overload;\r\n Function Insert(Index: Integer; const AValue: Shortint): TStringBuilder; overload;\r\n Function Insert(Index: Integer; const AValue: String): TStringBuilder; overload;\r\n Function Insert(Index: Integer; const AValue: Word): TStringBuilder; overload;\r\n Function Insert(Index: Integer; const AValue: Cardinal): TStringBuilder; overload;\r\n Function Insert(Index: Integer; const AValue: UInt64): TStringBuilder; overload;\r\n Function Insert(Index: Integer; const AValue: String; const aRepeatCount: Integer): TStringBuilder; overload;\r\n Function Insert(Index: Integer; const AValue: Array of char; startIndex: Integer; SBCharCount: Integer): TStringBuilder; overload;\r\n\r\n Function Remove(StartIndex: Integer; RemLength: Integer): TStringBuilder;\r\n\r\n Function Replace(const OldValue, NewValue: String): TStringBuilder; overload;\r\n Function Replace(const OldValue, NewValue: String; StartIndex: Integer; Count: Integer): TStringBuilder; overload;\r\n Function ToString: String; override; overload;\r\n Function ToString(aStartIndex: Integer; aLength: Integer): String; reintroduce; overload;\r\n property Chars[index: Integer]: Char read GetC write SetC; default;\r\n property Length: Integer read GetLength write SetLength;\r\n property Capacity: Integer read GetCapacity write SetCapacity;\r\n property MaxCapacity: Integer read FMaxCapacity;\r\n end;\r\n\r\n TEncoding = class(TObject)\r\n strict private class var\r\n FANSI: TEncoding;\r\n FASCII: TEncoding;\r\n FUnicode: TEncoding;\r\n FUTF7: TEncoding;\r\n FUTF8: TEncoding;\r\n strict private\r\n class function GetANSI: TEncoding;\r\n class function GetASCII: TEncoding;\r\n class function GetDefault: TEncoding;\r\n class function GetUnicode: TEncoding;\r\n class function GetUTF7: TEncoding;\r\n class function GetUTF8: TEncoding;\r\n strict protected\r\n function GetEncoding: string; virtual;\r\n public\r\n class function IsStandardEncoding(AEncoding: TEncoding): Boolean;\r\n function GetByteCount(const AChars: string): Integer; overload; virtual; abstract;\r\n function GetByteCount(const AChars: string; const ACharCount: Integer): Integer; overload;\r\n function GetByteCount(const AChars: string; const ACharIndex, ACharCount: Integer): Integer; overload; inline;\r\n function GetBytes(const AChars: string): TBytes; overload; virtual; abstract;\r\n function GetBytes(const AChars: string; const ACharCount: Integer): TBytes; overload;\r\n function GetBytes(const AChars: string; const ACharIndex, ACharCount: Integer): TBytes; overload; inline;\r\n function GetString(const ABytes: TBytes): string; overload; virtual; abstract;\r\n function GetString(const ABytes: TBytes; const ACharCount: Integer): string; overload;\r\n function GetString(const ABytes: TBytes; const ACharIndex, ACharCount: Integer): string; overload; inline;\r\n class property ANSI: TEncoding read GetANSI;\r\n class property ASCII: TEncoding read GetASCII;\r\n class property Default: TEncoding read GetDefault;\r\n property Encoding: string read GetEncoding;\r\n class property Unicode: TEncoding read GetUnicode;\r\n class property UTF7: TEncoding read GetUTF7;\r\n class property UTF8: TEncoding read GetUTF8;\r\n end;\r\n\r\n TANSIEncoding = class(TEncoding)\r\n strict protected\r\n function GetEncoding: string; override;\r\n public\r\n function GetByteCount(const AChars: string): Integer; overload; override;\r\n function GetBytes(const AChars: string): TBytes; overload; override;\r\n function GetString(const ABytes: TBytes): string; overload; override;\r\n end;\r\n\r\n TASCIIEncoding = class(TANSIEncoding)\r\n strict protected\r\n function GetEncoding: string; override;\r\n end;\r\n\r\n TUnicodeEncoding = class(TEncoding)\r\n strict private\r\n procedure InternalGetBytes(const AChars: string; out ABytes: TBytes);\r\n strict protected\r\n function GetEncoding: string; override;\r\n public\r\n function GetByteCount(const AChars: string): Integer; overload; override;\r\n function GetBytes(const AChars: string): TBytes; overload; override;\r\n function GetString(const ABytes: TBytes): string; overload; override;\r\n end;\r\n\r\n TUTF8Encoding = class(TEncoding)\r\n strict private\r\n class function BytesToMemory(ABytes: TBytes): TJSArrayBuffer;\r\n class function MemoryToBytes(AMem: TJSUInt8Array): TBytes; overload;\r\n strict protected\r\n function GetEncoding: string; override;\r\n public\r\n function GetByteCount(const AChars: string): Integer; overload; override;\r\n function GetBytes(const AChars: string): TBytes; overload; override;\r\n function GetString(const ABytes: TBytes): string; overload; override;\r\n end;\r\n\r\n TUTF7Encoding = class(TUTF8Encoding)\r\n strict protected\r\n function GetEncoding: string; override;\r\n end;\r\n\r\ntype\r\n TCmdLineSwitchType = (clstValueNextParam, clstValueAppended, clstValueInternalUse);\r\n TCmdLineSwitchTypes = set of TCmdLineSwitchType;\r\nconst\r\n clstValueNextParamForce: TCmdLineSwitchType = clstValueInternalUse;\r\n SwitchChars: TSysCharSet = ['-'];\r\n\r\nfunction FindCmdLineSwitch(const ASwitch: string): Boolean; overload;\r\nfunction FindCmdLineSwitch(const ASwitch: string; AIgnoreCase: Boolean): Boolean; overload;\r\nfunction FindCmdLineSwitch(const ASwitch: string; const AChars: TSysCharSet; AIgnoreCase: Boolean): Boolean; overload;\r\nfunction FindCmdLineSwitch(const ASwitch: string; var AValue: string; AIgnoreCase: Boolean = True; const ASwitchTypes: TCmdLineSwitchTypes = [clstValueNextParam, clstValueAppended]): Boolean; overload;\r\n\r\ntype\r\n TProc = reference to procedure;\r\n TProc = reference to procedure(AArg1: T);\r\n TProc = reference to procedure(AArg1: T1; AArg2: T2);\r\n TProc = reference to procedure(AArg1: T1; AArg2: T2; AArg3: T3);\r\n TProc = reference to procedure(AArg1: T1; AArg2: T2; AArg3: T3; AArg4: T4);\r\n\r\n TFunc = reference to function: TResult;\r\n TFunc = reference to function(AArg1: T): TResult;\r\n TFunc = reference to function(AArg1: T1; AArg2: T2): TResult;\r\n TFunc = reference to function(AArg1: T1; AArg2: T2; AArg3: T3): TResult;\r\n TFunc = reference to function(AArg1: T1; AArg2: T2; AArg3: T3; Arg4: T4): TResult;\r\n\r\n TPredicate = reference to function(AArg1: T): Boolean;\r\n\r\nimplementation\r\n\r\ntype\r\n TBytesHelper = record helper for TBytes\r\n strict private\r\n function GetLength: Integer;\r\n procedure SetLength(const AValue: Integer);\r\n public\r\n function High: Integer;\r\n function Low: Integer;\r\n function SubBytes(const AStartIndex, ALength: Integer): TBytes; overload; inline;\r\n property Length: Integer read GetLength write SetLength;\r\n end;\r\n\r\n TWords = array of Word;\r\n TWordsHelper = record helper for TWords\r\n strict private\r\n function GetLength: Integer;\r\n procedure SetLength(const AValue: Integer);\r\n public\r\n class function FromBytes(const ABytes: TBytes): TWords; static;\r\n function High: Integer;\r\n function Low: Integer;\r\n function ToBytes: TBytes;\r\n property Length: Integer read GetLength write SetLength;\r\n end;\r\n\r\nConst\r\n DefaultShortMonthNames : TMonthNames = (\r\n 'Jan',\r\n 'Feb',\r\n 'Mar',\r\n 'Apr',\r\n 'May',\r\n 'Jun',\r\n 'Jul',\r\n 'Aug',\r\n 'Sep',\r\n 'Oct',\r\n 'Nov',\r\n 'Dec');\r\n DefaultLongMonthNames : TMonthNames = (\r\n 'January',\r\n 'February',\r\n 'March',\r\n 'April',\r\n 'May',\r\n 'June',\r\n 'July',\r\n 'August',\r\n 'September',\r\n 'October',\r\n 'November',\r\n 'December');\r\n DefaultShortDayNames : TDayNames = (\r\n 'Sun',\r\n 'Mon',\r\n 'Tue',\r\n 'Wed',\r\n 'Thu',\r\n 'Fri',\r\n 'Sat');\r\n\r\n DefaultLongDayNames : TDayNames = (\r\n 'Sunday',\r\n 'Monday',\r\n 'Tuesday',\r\n 'Wednesday',\r\n 'Thursday',\r\n 'Friday',\r\n 'Saturday');\r\n\r\nvar\r\n FInvariant: TFormatSettings;\r\n FInvariantCreated: Boolean;\r\n\r\n{ ---------------------------------------------------------------------\r\n Exception handling\r\n ---------------------------------------------------------------------}\r\nResourcestring\r\n SAbortError = 'Operation aborted';\r\n SApplicationException = 'Application raised an exception: ';\r\n SErrUnknownExceptionType = 'Caught unknown exception type : ';\r\n\r\nprocedure Randomize;\r\nbegin\r\n\r\nend;\r\n\r\nprocedure DoShowException(S : String);\r\n\r\nbegin\r\n if Assigned(OnShowException) then\r\n OnShowException(S)\r\n else\r\n begin\r\n {$IFDEF BROWSER}\r\n asm\r\n window.alert(S);\r\n end;\r\n {$ENDIF}\r\n {$IFDEF NODEJS}\r\n Writeln(S);\r\n {$ENDIF}\r\n end;\r\nend;\r\n\r\nprocedure ShowException(ExceptObject: TObject; ExceptAddr: Pointer = Nil);\r\n\r\nVar\r\n S : String;\r\n\r\nbegin\r\n S:=SApplicationException+ExceptObject.ClassName;\r\n if ExceptObject is Exception then\r\n S:=S+' : '+Exception(ExceptObject).Message;\r\n DoShowException(S);\r\n if ExceptAddr=nil then;\r\nend;\r\n\r\nType\r\n TRTLExceptionHandler = procedure (aError : JSValue);\r\n\r\nVar\r\n rtlExceptionHandler : TRTLExceptionHandler; External name 'rtl.onUncaughtException';\r\n rtlShowUncaughtExceptions : Boolean; External name 'rtl.showUncaughtExceptions';\r\n OnPascalException : TUncaughtPascalExceptionHandler;\r\n OnJSException : TUncaughtJSExceptionHandler;\r\n\r\nProcedure RTLExceptionHook(aError : JSValue);\r\n\r\nVar\r\n S : String;\r\n\r\nbegin\r\n if isClassInstance(aError) then\r\n begin\r\n if Assigned(OnPascalException) then\r\n OnPascalException(TObject(aError))\r\n else\r\n ShowException(TObject(aError),Nil);\r\n end\r\n else if isObject(aError) then\r\n begin\r\n if Assigned(OnJSException) then\r\n OnJSException(TJSObject(aError))\r\n else\r\n begin\r\n if TJSObject(aError).hasOwnProperty('message') then\r\n S:=SErrUnknownExceptionType+String(TJSObject(aError).Properties['message'])\r\n else\r\n S:=SErrUnknownExceptionType+TJSObject(aError).toString;\r\n DoShowException(S);\r\n end\r\n end\r\n else\r\n begin\r\n S:=SErrUnknownExceptionType+String(aError);\r\n DoShowException(S);\r\n end;\r\nend;\r\n\r\n\r\n\r\nFunction SetOnUnCaughtExceptionHandler(aValue : TUncaughtPascalExceptionHandler) : TUncaughtPascalExceptionHandler;\r\n\r\nbegin\r\n Result:=OnPascalException;\r\n OnPascalException:=aValue;\r\n HookUncaughtExceptions;\r\nend;\r\n\r\nFunction SetOnUnCaughtExceptionHandler(aValue : TUncaughtJSExceptionHandler) : TUncaughtJSExceptionHandler;\r\n\r\nbegin\r\n Result:=OnJSException;\r\n OnJSException:=aValue;\r\n HookUncaughtExceptions;\r\nend;\r\n\r\nProcedure HookUncaughtExceptions;\r\n\r\nbegin\r\n rtlExceptionHandler:=@RTLExceptionHook;\r\n rtlShowUncaughtExceptions:=True;\r\nend;\r\n\r\nprocedure Abort;\r\nbegin\r\n Raise EAbort.Create(SAbortError);\r\nend;\r\n\r\nFunction CharInSet(Ch: Char;Const CSet : TSysCharSet) : Boolean; overload;\r\nbegin\r\n Result:=Ch in CSet;\r\nend;\r\n\r\nfunction CharInSet(Ch: Char; const CSet: array of char): Boolean; overload;\r\n\r\nVar\r\n I : integer;\r\n\r\nbegin\r\n Result:=False;\r\n I:=Length(CSet)-1;\r\n While (Not Result) and (I>=0) do\r\n begin\r\n Result:=(Ch=CSet[i]);\r\n Dec(I);\r\n end;\r\nend;\r\n\r\nfunction LeftStr(const S: string; Count: Integer): String; assembler;\r\nasm\r\n return (Count>0) ? S.substr(0,Count) : \"\";\r\nend;\r\n\r\nfunction RightStr(const S: string; Count: Integer): String; assembler;\r\nasm\r\n var l = S.length;\r\n return (Count<1) ? \"\" : ( Count>=l ? S : S.substr(l-Count));\r\nend;\r\n\r\nfunction Trim(const S: String): String; assembler;\r\nasm\r\n return S.replace(/^[\\s\\uFEFF\\xA0\\x00-\\x1f]+/,'').replace(/[\\s\\uFEFF\\xA0\\x00-\\x1f]+$/,'');\r\nend;\r\n\r\nfunction TrimLeft(const S: String): String; assembler;\r\nasm\r\n return S.replace(/^[\\s\\uFEFF\\xA0\\x00-\\x1f]+/,'');\r\nend;\r\n\r\nfunction TrimRight(const S: String): String; assembler;\r\nasm\r\n return S.replace(/[\\s\\uFEFF\\xA0\\x00-\\x1f]+$/,'');\r\nend;\r\n\r\nfunction IntToStr(const Value: Integer): string;\r\nbegin\r\n Result:=str(Value);\r\nend;\r\n\r\nfunction FloatToDecimal(Value: double; Precision, Decimals: integer): TFloatRec;\r\n\r\n {$ifdef DEBUGFLOATTODECIMAL}\r\n Procedure dump;\r\n \r\n var\r\n I : Integer;\r\n S : String;\r\n begin\r\n for I:=0 to FloatRecDigits do\r\n begin\r\n if I>0 then S:=S+',';\r\n if Result.Digits[i]=#0 then\r\n S:=S+'_'\r\n else \r\n S:=S+Result.Digits[i];\r\n end;\r\n Writeln('Digits : (',S,') Exp: ',Result.Exponent,', Neg: ',Result.Negative); \r\n end;\r\n {$endif}\r\n\r\nConst\r\n Rounds = '123456789:';\r\n\r\nvar\r\n Buffer: String; //Though str func returns only 25 chars, this might change in the future\r\n InfNan: string;\r\n OutPos,Error, N, L, C: Integer;\r\n GotNonZeroBeforeDot, BeforeDot : boolean;\r\n\r\n \r\n\r\nbegin\r\n {$ifdef DEBUGFLOATTODECIMAL}\r\n Writeln('Precision ',Precision,' decimals: ',Decimals);\r\n {$ENDIF}\r\n Result.Negative:=False;\r\n Result.Exponent:=0;\r\n For C:=0 to FloatRecDigits do\r\n Result.Digits[C]:='0';\r\n if Value=0 then\r\n exit;\r\n Str(Value:24,Buffer); // Double precision\r\n {$ifdef DEBUGFLOATTODECIMAL}\r\n writeln('12345678901234567890123456789012345678901234567890');\r\n Writeln('Buffer :',Buffer);\r\n {$ENDIF}\r\n N := 1;\r\n L := Length(Buffer);\r\n while Buffer[N]=' ' do\r\n Inc(N);\r\n Result.Negative := (Buffer[N] = '-');\r\n if Result.Negative then\r\n Inc(N)\r\n else if (Buffer[N] = '+') then\r\n inc(N);\r\n { special cases for Inf and Nan }\r\n if (L>=N+2) then\r\n begin\r\n InfNan:=copy(Buffer,N,3);\r\n if (InfNan='Inf') then\r\n begin\r\n Result.Digits[0]:=#0;\r\n Result.Exponent:=32767;\r\n exit\r\n end;\r\n if (InfNan='Nan') then\r\n begin\r\n Result.Digits[0]:=#0;\r\n Result.Exponent:=-32768;\r\n exit\r\n end;\r\n end;\r\n //Start := N; //Start of digits\r\n Outpos:=0;\r\n Result.Exponent := 0; BeforeDot := true;\r\n GotNonZeroBeforeDot := false;\r\n while (L>=N) and (Buffer[N]<>'E') do\r\n begin\r\n {$ifdef DEBUGFLOATTODECIMAL}\r\n Writeln('Examining : ',Buffer[N],' (output pos: ',outPos,')');\r\n {$ENDIF}\r\n if Buffer[N]='.' then\r\n BeforeDot := false\r\n else\r\n begin\r\n if BeforeDot then\r\n begin // Currently this is always 1 char\r\n Inc(Result.Exponent);\r\n Result.Digits[Outpos] := Buffer[N];\r\n if Buffer[N] <> '0' then\r\n GotNonZeroBeforeDot := true;\r\n end\r\n else\r\n Result.Digits[Outpos] := Buffer[N];\r\n {$ifdef DEBUGFLOATTODECIMAL}\r\n Dump;\r\n {$ENDIF}\r\n Inc(outpos);\r\n end;\r\n Inc(N);\r\n end;\r\n {$ifdef DEBUGFLOATTODECIMAL}\r\n Dump; \r\n {$ENDIF}\r\n Inc(N); // Pass through 'E'\r\n if N<=L then\r\n begin\r\n Val(Copy(Buffer, N, L-N+1), C, Error); // Get exponent after 'E'\r\n Inc(Result.Exponent, C);\r\n end;\r\n // Calculate number of digits we have from str\r\n N:=OutPos;\r\n {$ifdef DEBUGFLOATTODECIMAL}\r\n Writeln('Number of digits: ',N,' requested precision : ',Precision);\r\n {$ENDIF}\r\n L:=Length(Result.Digits);\r\n While N= L Then\r\n N := L-1;\r\n {$ifdef DEBUGFLOATTODECIMAL}\r\n Writeln('Rounding on digit : ',N);\r\n {$ENDIF}\r\n if N = 0 Then\r\n begin\r\n if Result.Digits[0] >= '5' Then\r\n begin\r\n Result.Digits[0] := '1';\r\n Result.Digits[1] := #0;\r\n Inc(Result.Exponent);\r\n end\r\n Else\r\n Result.Digits[0] := #0;\r\n end //N=0\r\n Else if N > 0 Then\r\n begin\r\n if Result.Digits[N] >= '5' Then\r\n begin\r\n Repeat\r\n Result.Digits[N] := #0;\r\n Dec(N);\r\n {$ifdef DEBUGFLOATTODECIMAL}\r\n Writeln(N,': ',Result.Digits[N],', Rounding to : ',Rounds[StrToInt(Result.Digits[N])]);\r\n {$ENDIF}\r\n Result.Digits[N]:=Rounds[StrToInt(Result.Digits[N])+1];\r\n Until (N = 0) Or (Result.Digits[N] < ':');\r\n If Result.Digits[0] = ':' Then\r\n begin\r\n Result.Digits[0] := '1';\r\n Inc(Result.Exponent);\r\n end;\r\n end\r\n Else\r\n begin\r\n Result.Digits[N] := '0';\r\n While (N > -1) And (Result.Digits[N] = '0') Do\r\n begin\r\n Result.Digits[N] := #0;\r\n Dec(N);\r\n end;\r\n end;\r\n end //N>0\r\n Else\r\n Result.Digits[0] := #0;\r\n if (Result.Digits[0] = #0) and\r\n not GotNonZeroBeforeDot then\r\n begin\r\n Result.Exponent := 0;\r\n Result.Negative := False;\r\n end;\r\n {$ifdef DEBUGFLOATTODECIMAL}\r\n Dump;\r\n {$ENDIF}\r\nend;\r\n\r\n\r\nFunction FloatToStr(Value: Double; const aSettings : TFormatSettings): String; overload;\r\n\r\nbegin\r\n Result:=FloatToStrF(Value,ffGeneral,15,0,aSettings);\r\nend;\r\n\r\nfunction FloatToStr(Value: Double): String;\r\nbegin\r\n Result:=FloatToStr(Value,FormatSettings);\r\nend;\r\n\r\nfunction TryStrToFloat(const S: String; out res: Extended): Boolean;\r\nbegin\r\n Result:=TryStrToFloat(S,double(res));\r\nend;\r\n\r\nfunction TryStrToFloat(const S: String; out res: Double): Boolean;\r\n\r\nbegin\r\n Result:=TryStrToFloat(S,Res,FormatSettings);\r\nend;\r\n\r\nfunction TryStrToFloat(const S: String; out res: Extended; const aSettings : TFormatSettings): Boolean;\r\n\r\nbegin\r\n Result:=TryStrToFloat(S,double(res),aSettings);\r\nend;\r\n\r\nfunction TryStrToFloat(const S: String; out res: Double; const aSettings : TFormatSettings): Boolean;\r\n\r\nType\r\n TDecimalPart = (dpDigit,dpSignificand,dpExp);\r\n\r\nVar\r\n J : JSValue;\r\n I,aStart,Len : integer;\r\n N : String;\r\n p : TDecimalPart;\r\n\r\n\r\nbegin\r\n Result:=False;\r\n N:=S;\r\n // Delocalize\r\n if (aSettings.ThousandSeparator <>'') then\r\n N:=StringReplace(N,aSettings.ThousandSeparator,'',[rfReplaceAll]);\r\n if (aSettings.DecimalSeparator<>'.') then\r\n N:=StringReplace(N,aSettings.DecimalSeparator,'.',[]);\r\n p:=dpDigit;\r\n I:=1;\r\n aStart:=1;\r\n Len:=Length(N);\r\n While (I<=Len) do\r\n begin\r\n Case N[i] of\r\n '+','-' :\r\n Case p of\r\n dpSignificand:\r\n Exit;\r\n dpDigit :\r\n if I>aStart then\r\n Exit;\r\n dpExp :\r\n if( I>aStart+1) then\r\n Exit;\r\n end;\r\n '0'..'9' : ;\r\n '.' :\r\n begin\r\n if (p<>dpDigit) then\r\n Exit;\r\n p:=dpSignificand;\r\n aStart:=I;\r\n end;\r\n 'E','e':\r\n begin\r\n if p=dpExp then\r\n Exit\r\n else\r\n begin\r\n p:=dpExp;\r\n aStart:=I;\r\n end;\r\n end;\r\n Else\r\n Exit;\r\n end;\r\n inc(I);\r\n end;\r\n J:=parseFloat(N);\r\n Result:=Not jsIsNaN(J);\r\n if Result then\r\n Res:=Double(J);\r\nend;\r\n\r\nfunction StrToFloatDef(const S: String; const aDef: Double; const aSettings : TFormatSettings): Double;\r\nbegin\r\n if not TryStrToFloat(S,Result,aSettings) then\r\n Result:=aDef;\r\nend;\r\n\r\nfunction StrToFloatDef(const S: String; const aDef: Double): Double;\r\nbegin\r\n if not TryStrToFloat(S,Result,FormatSettings) then\r\n Result:=aDef;\r\nend;\r\n\r\nfunction StrToFloat(const S: String): Double;\r\nbegin\r\n Result:=StrToFloat(S,FormatSettings);\r\nend;\r\n\r\nfunction StrToFloat(const S: String; const aSettings : TFormatSettings): Double;\r\nbegin\r\n if not TryStrToFloat(S,Result,aSettings) then\r\n Raise EConvertError.CreateFmt(SErrInvalidFloat,[S]);\r\nend;\r\n\r\nFunction FormatFloat (Fmt : String; aValue : Double) : String;\r\nbegin\r\n Result:=FormatFloat(Fmt,aValue,FormatSettings);\r\nend;\r\n\r\nfunction FormatFloat(Fmt: String; aValue: Double; aSettings : TFormatSettings): String;\r\n\r\nType\r\n TPosArray = Array of Integer;\r\n\r\nconst\r\n MaxPrecision = 18; // Extended precision\r\n\r\nvar\r\n // Input in usable format\r\n E : Extended; // Value as extended.\r\n FV: TFloatRec; // Value as floatrec.\r\n Section : String; // Format can contain 3 sections, semicolon separated: Pos;Neg;Zero. This is the one to use.\r\n SectionLength : Integer; // Length of section.\r\n // Calculated based on section. Static during output\r\n ThousandSep: Boolean; // Thousands separator detected in format ?\r\n IsScientific: Boolean; // Use Scientific notation ? (E detected in format)\r\n DecimalPos: Integer; // Position of decimal point in pattern.\r\n FirstDigit: Integer; // First actual digit in input (# or 0), relative to decimal point\r\n LastDigit: Integer; // Last required (0) digit, relative to decimal point\r\n RequestedDigits: Integer; // Number of requested digits, # and 0 alike\r\n ExpSize : Integer; // Number of digits in exponent\r\n Available: Integer; // Available digits in FV.\r\n // These change during output loop\r\n Current: Integer; // Current digit in available digits\r\n PadZeroes: Integer; // Difference in requested digits before comma and exponent, needs to be padded with zeroes.\r\n DistToDecimal: Integer; // Place of current digit, relative to decimal point taking in account PadZeroes!\r\n\r\n Procedure InitVars;\r\n\r\n begin\r\n E:=aValue;\r\n Section:='';\r\n SectionLength:=0;\r\n ThousandSep:=false;\r\n IsScientific:=false;\r\n DecimalPos:=0;\r\n FirstDigit:=MaxInt;\r\n LastDigit:=0;\r\n RequestedDigits:=0;\r\n ExpSize:=0;\r\n Available:=-1;\r\n end;\r\n\r\n procedure ToResult(const AChar: Char);\r\n begin\r\n Result:=Result+AChar;\r\n end;\r\n\r\n procedure AddToResult(const AStr: String);\r\n\r\n begin\r\n Result:=Result+AStr;\r\n end;\r\n\r\n procedure WriteDigit(ADigit: Char);\r\n\r\n // Write a digit to result, prepend with decimalseparator or append with 1000 separator\r\n\r\n begin\r\n if ADigit=#0 then exit;\r\n // Writeln('WriteDigit: ',ADigit,', DistToDecimal: ',DistToDecimal);\r\n Dec(DistToDecimal);\r\n // -1 -> we've arrived behind the decimal\r\n if (DistToDecimal=-1) then\r\n begin\r\n AddToResult(aSettings.DecimalSeparator);\r\n ToResult(ADigit);\r\n end\r\n else\r\n begin\r\n // We're still before the decimal.\r\n ToResult(ADigit);\r\n if ThousandSep and ((DistToDecimal mod 3)=0) and (DistToDecimal>1) then\r\n AddToResult(aSettings.ThousandSeparator);\r\n end;\r\n end;\r\n\r\n Function GetDigit : Char;\r\n\r\n // Return next digit from available digits.\r\n // May return #0 if none available.\r\n // Will return '0' if applicable.\r\n\r\n begin\r\n // Writeln(' DistToDecimal <= LastDigit : ',DistToDecimal,' <= ',LastDigit,' have digit: ',Current<=Available, ' (',Current,')');\r\n Result:=#0;\r\n if (Current<=Available) then\r\n begin\r\n Result:=FV.Digits[Current];\r\n Inc(Current);\r\n end\r\n else if (DistToDecimal <= LastDigit) then\r\n Dec(DistToDecimal)\r\n else\r\n Result:='0';\r\n // Writeln('GetDigit ->: ',Result);\r\n end;\r\n\r\n procedure CopyDigit;\r\n\r\n // Copy a digit (#, 0) to the output with the correct value\r\n\r\n begin\r\n // Writeln('CopyDigit: Padzeroes: ',PadZeroes,', DistToDecimal: ',DistToDecimal);\r\n if (PadZeroes=0) then\r\n WriteDigit(GetDigit) // No shift needed, just copy what is available.\r\n else if (PadZeroes<0) then\r\n begin\r\n // We must prepend zeroes\r\n Inc(PadZeroes);\r\n if (DistToDecimal<=FirstDigit) then\r\n WriteDigit('0')\r\n else\r\n Dec(DistToDecimal);\r\n end\r\n else\r\n begin\r\n // We must append zeroes\r\n while PadZeroes > 0 do\r\n begin\r\n WriteDigit(GetDigit);\r\n Dec(PadZeroes);\r\n end;\r\n WriteDigit(GetDigit);\r\n end;\r\n end;\r\n\r\n Function GetSections(Var SP : TPosArray) : Integer;\r\n\r\n var\r\n FL : Integer;\r\n i : Integer;\r\n C,Q : Char;\r\n inQuote : Boolean;\r\n\r\n begin\r\n Result:=1;\r\n SP[1]:=-1;\r\n SP[2]:=-1;\r\n SP[3]:=-1;\r\n inQuote:=False;\r\n Q:=#0;\r\n I:=1;\r\n FL:=Length(Fmt);\r\n while (I<=FL) do\r\n begin\r\n C:=Fmt[I];\r\n case C of\r\n ';':\r\n begin\r\n if not InQuote then\r\n begin\r\n if Result>3 then\r\n Raise Exception.Create('Invalid float format');\r\n SP[Result]:=I;\r\n Inc(Result);\r\n end;\r\n end;\r\n '\"','''':\r\n begin\r\n if InQuote then\r\n InQuote:=C<>Q\r\n else\r\n begin\r\n InQuote:=True;\r\n Q:=C;\r\n end;\r\n end;\r\n end;\r\n Inc(I);\r\n end;\r\n if SP[Result]=-1 then\r\n SP[Result]:=FL+1;\r\n end;\r\n\r\n Procedure AnalyzeFormat;\r\n\r\n var\r\n I,Len: Integer;\r\n Q,C: Char;\r\n InQuote : Boolean;\r\n\r\n begin\r\n Len:=Length(Section);\r\n // writeln(len);\r\n I:=1;\r\n InQuote:=False;\r\n Q:=#0;\r\n while (I<=Len) do\r\n begin\r\n C:=Section[i];\r\n if C in ['\"',''''] then\r\n begin\r\n if InQuote then\r\n InQuote:=C<>Q\r\n else\r\n begin\r\n InQuote:=True;\r\n Q:=C;\r\n end;\r\n end\r\n else if not InQuote then\r\n case C of\r\n '.':\r\n if (DecimalPos=0) then\r\n DecimalPos:=RequestedDigits+1;\r\n ',':\r\n ThousandSep:=aSettings.ThousandSeparator<>#0;\r\n 'e', 'E':\r\n begin\r\n Inc(I);\r\n if (I4 then\r\n ExpSize:=4;\r\n end;\r\n end;\r\n '#':\r\n Inc(RequestedDigits);\r\n '0':\r\n begin\r\n if RequestedDigits0 then\r\n LastDigit:=0;\r\n // Writeln('FirstDigit: ',DecimalPos,'-',FirstDigit);\r\n FirstDigit:=DecimalPos-FirstDigit;\r\n if FirstDigit<0 then\r\n FirstDigit:=0;\r\n end;\r\n\r\n Function ValueOutSideScope : Boolean;\r\n begin\r\n With FV do\r\n Result:=((Exponent >= 18) and (not IsScientific)) or (Exponent = $7FF) or (Exponent = $800)\r\n end;\r\n\r\n Procedure CalcRunVars;\r\n\r\n Var\r\n D,P: Integer;\r\n\r\n begin\r\n if IsScientific then\r\n begin\r\n P:=RequestedDigits;\r\n D:=9999;\r\n end\r\n else\r\n begin\r\n P:=MaxPrecision;\r\n // Writeln(RequestedDigits,'-',DecimalPos,'+1');\r\n D:=RequestedDigits-DecimalPos+1;\r\n end;\r\n FV:=FloatToDecimal(aValue,P,D);\r\n // Writeln('Number of digits available : ',Length(FV.Digits));\r\n // For p:=0 to Length(FV.Digits)-1 do\r\n // Writeln(P,': ',FV.Digits[p]);\r\n DistToDecimal:=DecimalPos-1;\r\n // Writeln('DistToDecimal : ',DistToDecimal);\r\n if IsScientific then\r\n PadZeroes:=0 // No padding.\r\n else\r\n begin\r\n PadZeroes:=FV.Exponent-(DecimalPos-1);\r\n if (PadZeroes>=0) then\r\n DistToDecimal:=FV.Exponent\r\n end;\r\n // Writeln('PadZeroes : ',PadZeroes, ', DistToDecimal : ',DistToDecimal);\r\n Available:=-1;\r\n while (Available#0) do\r\n Inc(Available);\r\n // Writeln('Available: ',Available);\r\n end;\r\n\r\n Function FormatExponent(ASign: Char; aExponent: Integer) : String;\r\n\r\n begin\r\n Result:=IntToStr(aExponent);\r\n Result:=StringOfChar('0',ExpSize-Length(Result))+Result;\r\n if (aExponent<0) then\r\n Result:='-'+Result\r\n else if (aExponent>0) and (aSign='+') then\r\n Result:=aSign+Result;\r\n end;\r\n\r\nvar\r\n I,S : Integer;\r\n C,Q : Char;\r\n PA : TPosArray;\r\n InLiteral : Boolean;\r\n\r\nbegin\r\n SetLength(PA,4);\r\n Result:='';\r\n Initvars;\r\n // What section to use ?\r\n if (E>0) then\r\n S:=1\r\n else if (E<0) then\r\n S:=2\r\n else\r\n S:=3;\r\n PA[0]:=0;\r\n I:=GetSections(PA);\r\n if (IQ\r\n else\r\n begin\r\n inLiteral:=True;\r\n Q:=C;\r\n end;\r\n end\r\n else if InLiteral then\r\n ToResult(C)\r\n else\r\n case C of\r\n '0', '#':\r\n CopyDigit;\r\n '.', ',':\r\n ; // Do nothing, handled by CopyDigit\r\n 'e', 'E':\r\n begin\r\n ToResult(C); // Always needed\r\n Inc(I);\r\n if I<=Length(Section) then\r\n begin\r\n C:=Section[I];\r\n if (C in ['+','-']) then\r\n begin\r\n AddToResult(FormatExponent(C,FV.Exponent-DecimalPos+1));\r\n // Skip rest\r\n while (I0.0)\r\n else\r\n begin\r\n CheckBoolStrs;\r\n for I:=low(TrueBoolStrs) to High(TrueBoolStrs) do\r\n if Temp=uppercase(TrueBoolStrs[I]) then\r\n begin\r\n Value:=true;\r\n exit;\r\n end;\r\n for I:=low(FalseBoolStrs) to High(FalseBoolStrs) do\r\n if Temp=uppercase(FalseBoolStrs[I]) then\r\n begin\r\n Value:=false;\r\n exit;\r\n end;\r\n Result:=false;\r\n end;\r\nend;\r\n\r\nfunction UpperCase(const s: String): String; assembler;\r\nasm\r\n return s.toUpperCase();\r\nend;\r\n\r\nfunction LowerCase(const s: String): String; assembler;\r\nasm\r\n return s.toLowerCase();\r\nend;\r\n\r\nfunction CompareStr(const s1, s2: String): Integer; assembler;\r\nasm\r\n var l1 = s1.length;\r\n var l2 = s2.length;\r\n if (l1<=l2){\r\n var s = s2.substr(0,l1);\r\n if (s1s){ return 1;\r\n } else { return l1l2){ return 1;\r\n } else if (l10 then\r\n Result:=Copy(S,1,P-1)+DS+Copy(S,P+1,Length(S)-P)\r\n else\r\n Result:=S;\r\nend;\r\n\r\nfunction FormatGeneralFloat(Value : double; Precision : Integer; DS : String) : string;\r\n\r\nVar\r\n P, PE, Q, Exponent: Integer;\r\n\r\nBegin\r\n If (Precision = -1) Or (Precision > maxdigits) Then\r\n Precision := maxdigits;\r\n { First convert to scientific format, with correct precision }\r\n Str(Value:precision+7, Result);\r\n { Delete leading spaces }\r\n Result:=TrimLeft(Result);\r\n P:=Pos('.',Result);\r\n if P=0 then\r\n exit;\r\n { Consider removing exponent }\r\n PE:=Pos('E',Result);\r\n if PE=0 then\r\n begin\r\n Result:=ReplaceDecimalSep(Result,DS);\r\n exit;\r\n end;\r\n { Read exponent }\r\n Q:=PE+2;\r\n Exponent := 0;\r\n while (Q <= Length(Result)) do\r\n begin\r\n Exponent := Exponent*10 + Ord(Result[Q])-Ord('0');\r\n Inc(Q);\r\n end;\r\n if Result[PE+1] = '-' then\r\n Exponent := -Exponent;\r\n if (P+Exponent < PE) and (Exponent > -6) then\r\n begin\r\n { OK to remove exponent }\r\n SetLength(Result,PE-1); { Trim exponent }\r\n if Exponent >= 0 then\r\n begin\r\n { Shift point to right }\r\n for Q := 0 to Exponent-1 do\r\n begin\r\n Result[P] := Result[P+1];\r\n Inc(P);\r\n end;\r\n Result[P] := '.';\r\n P := 1;\r\n if Result[P] = '-' then\r\n Inc(P);\r\n while (Result[P] = '0') and (P < Length(Result)) and (Copy(Result,P+1,Length(DS))<>DS) do\r\n { Trim leading zeros; conversion above should not give any, but occasionally does\r\n because of rounding }\r\n System.Delete(Result,P,1);\r\n end\r\n else\r\n begin\r\n { Add zeros at start }\r\n Insert(Copy('00000',1,-Exponent),Result,P-1);\r\n Result[P-Exponent] := Result[P-Exponent-1]; { Copy leading digit }\r\n Result[P] := '.';\r\n if Exponent <> -1 then\r\n Result[P-Exponent-1] := '0';\r\n end;\r\n { Remove trailing zeros }\r\n Q := Length(Result);\r\n while (Q > 0) and (Result[Q] = '0') do\r\n Dec(Q);\r\n if Result[Q] = '.' then\r\n Dec(Q); { Remove trailing decimal point }\r\n if (Q = 0) or ((Q=1) and (Result[1] = '-')) then\r\n Result := '0'\r\n else\r\n SetLength(Result,Q);\r\n end\r\n else\r\n begin\r\n { Need exponent, but remove superfluous characters }\r\n { Delete trailing zeros }\r\n while Result[PE-1] = '0' do\r\n begin\r\n System.Delete(Result,PE-1,1);\r\n Dec(PE);\r\n end;\r\n { If number ends in decimal point, remove it }\r\n if Result[PE-1] = DS then\r\n begin\r\n System.Delete(Result,PE-1,1);\r\n Dec(PE);\r\n end;\r\n { delete superfluous + in exponent }\r\n if Result[PE+1]='+' then\r\n System.Delete(Result,PE+1,1)\r\n else\r\n Inc(PE);\r\n while Result[PE+1] = '0' do\r\n { Delete leading zeros in exponent }\r\n System.Delete(Result,PE+1,1)\r\n end;\r\n Result:=ReplaceDecimalSep(Result,DS)\r\nend;\r\n\r\n\r\nfunction FormatExponentFloat(Value : double; Precision,Digits : Integer;DS : String) : string;\r\n\r\nVar\r\n P: Integer;\r\nBegin\r\n DS:=FormatSettings.DecimalSeparator;\r\n If (Precision = -1) Or (Precision > maxdigits) Then\r\n Precision := maxdigits;\r\n Str(Value:Precision+7, Result);\r\n { Delete leading spaces }\r\n while Result[1] = ' ' do\r\n System.Delete(Result, 1, 1);\r\n P:=Pos('E',Result);\r\n if P=0 then\r\n begin\r\n Result:=ReplaceDecimalSep(Result,DS);\r\n exit;\r\n end;\r\n Inc(P, 2);\r\n if Digits > 4 then\r\n Digits:=4;\r\n Digits:=Length(Result) - P - Digits + 1;\r\n if Digits < 0 then\r\n insert(copy('0000',1,-Digits),Result,P)\r\n else\r\n while (Digits > 0) and (Result[P] = '0') do\r\n begin\r\n System.Delete(Result, P, 1);\r\n if P > Length(Result) then\r\n begin\r\n System.Delete(Result, P - 2, 2);\r\n break;\r\n end;\r\n Dec(Digits);\r\n end;\r\n Result:=ReplaceDecimalSep(Result,DS);\r\nEnd;\r\n\r\nfunction FormatFixedFloat(Value : double; Digits : Integer; DS : String) : string;\r\n\r\nBegin\r\n If Digits = -1 Then\r\n Digits := 2\r\n Else If Digits > 18 Then\r\n Digits := 18;\r\n Str(Value:0:Digits, Result);\r\n if (Result<>'') and (Result[1]=' ') then\r\n Delete(Result,1,1);\r\n Result:=ReplaceDecimalSep(Result,DS);\r\nend;\r\n\r\n\r\nfunction FormatNumberFloat(Value : double; Digits : Integer; DS,TS : String) : string;\r\n\r\nVar\r\n P : integer;\r\n\r\nBegin\r\n If Digits = -1 Then\r\n Digits := 2\r\n else If Digits > maxdigits Then\r\n Digits := maxdigits;\r\n Str(Value:0:Digits, Result);\r\n if (Result<>'') and (Result[1]=' ') then\r\n Delete(Result,1,1);\r\n P:=Pos('.',Result);\r\n if (P<=0) then\r\n P:=Length(Result)+1;\r\n Result:=ReplaceDecimalSep(Result,DS);\r\n Dec(P,3);\r\n if (TS<>'') and (TS<>#0) then\r\n While (P>1) Do\r\n Begin\r\n If (Result[P-1] <> '-') Then\r\n Insert(TS, Result, P);\r\n Dec(P, 3);\r\n End;\r\nEnd;\r\n\r\nfunction RemoveLeadingNegativeSign(var AValue: String; DS : String; aThousandSeparator : String): Boolean;\r\n\r\n// removes negative sign in case when result is zero eg. -0.00\r\n\r\nvar\r\n i: PtrInt;\r\n TS: String;\r\n StartPos: PtrInt;\r\n\r\nbegin\r\n Result:=False;\r\n StartPos := 2;\r\n TS := aThousandSeparator;\r\n for i :=StartPos to length(AValue) do\r\n begin\r\n Result := (AValue[i] in ['0', DS, 'E', '+']) or (aValue[i]=TS);\r\n if not Result then\r\n break;\r\n end;\r\n if (Result) and (AValue[1]='-') then\r\n Delete(AValue, 1, 1);\r\nend;\r\n\r\nFunction FormatNumberCurrency(const Value : Currency; Digits : Integer; const aSettings: TFormatSettings) : string;\r\n\r\nVar\r\n Negative: Boolean;\r\n P : Integer;\r\n CS,DS,TS : String;\r\n\r\nBegin\r\n DS:=aSettings.DecimalSeparator;\r\n TS:=aSettings.ThousandSeparator;\r\n CS:=aSettings.CurrencyString;\r\n // Writeln('Value ',D);\r\n If Digits = -1 Then\r\n Digits := aSettings.CurrencyDecimals\r\n Else If Digits > 18 Then\r\n Digits := 18;\r\n Str(Value:0:Digits, Result);\r\n // Writeln('1. Result ',Result,' currencystring : ',CS);\r\n Negative:=Result[1] = '-';\r\n if Negative then\r\n System.Delete(Result, 1, 1);\r\n P := Pos('.', Result);\r\n // Writeln('2. Result ',Result,' currencystring : ',CurrencyString);\r\n If TS<>'' Then\r\n begin\r\n If P <> 0 Then\r\n Result:=ReplaceDecimalSep(Result,DS)\r\n else\r\n P := Length(Result)+1;\r\n Dec(P, 3);\r\n While (P > 1) Do\r\n Begin\r\n Insert(TS, Result, P);\r\n Dec(P, 3);\r\n End;\r\n end;\r\n // Writeln('3. Result ',Result,' currencystring : ',CS);\r\n if Negative then\r\n RemoveLeadingNegativeSign(Result,DS,TS);\r\n // Writeln('4. Result ',Result,' currencystring : ',CurrencyString);\r\n // Writeln('CurrencyFormat: ',CurrencyFormat,'NegcurrencyFormat: ',NegCurrFormat);\r\n If Not Negative Then\r\n Case aSettings.CurrencyFormat Of\r\n 0: Result := CS + Result;\r\n 1: Result := Result + CS;\r\n 2: Result := CS + ' ' + Result;\r\n 3: Result := Result + ' ' + CS;\r\n end\r\n else\r\n Case aSettings.NegCurrFormat Of\r\n 0: Result := '(' + CS + Result + ')';\r\n 1: Result := '-' + CS + Result;\r\n 2: Result := CS + '-' + Result;\r\n 3: Result := CS + Result + '-';\r\n 4: Result := '(' + Result + CS + ')';\r\n 5: Result := '-' + Result + CS;\r\n 6: Result := Result + '-' + CS;\r\n 7: Result := Result + CS + '-';\r\n 8: Result := '-' + Result + ' ' + CS;\r\n 9: Result := '-' + CS + ' ' + Result;\r\n 10: Result := Result + ' ' + CS + '-';\r\n 11: Result := CS + ' ' + Result + '-';\r\n 12: Result := CS + ' ' + '-' + Result;\r\n 13: Result := Result + '-' + ' ' + CS;\r\n 14: Result := '(' + CS + ' ' + Result + ')';\r\n 15: Result := '(' + Result + ' ' + CS + ')';\r\n end;\r\nend;\r\n\r\n\r\nfunction FloatToStrF(const Value: double; format: TFloatFormat; Precision,\r\n Digits: Integer): String;\r\nbegin\r\n Result:=FloatToStrF(Value,Format,Precision,Digits,Formatsettings);\r\nend;\r\n\r\nfunction FloatToStrF(const Value: double; format: TFloatFormat; Precision,\r\n Digits: Integer ;const aSettings : TFormatSettings): String;\r\n\r\nVar\r\n TS,DS: string;\r\n\r\nBegin\r\n DS:=aSettings.DecimalSeparator;\r\n TS:=aSettings.ThousandSeparator;\r\n Case format Of\r\n ffGeneral:\r\n Result:=FormatGeneralFloat(Value,Precision,DS);\r\n ffExponent:\r\n Result:=FormatExponentFloat(Value,Precision,Digits,DS);\r\n ffFixed:\r\n Result:=FormatFixedFloat(Value,Digits,DS);\r\n ffNumber:\r\n Result:=FormatNumberFloat(Value,Digits,DS,TS);\r\n ffCurrency:\r\n Result:=FormatNumberCurrency(Value,Digits,aSettings);\r\n end;\r\n if (Format<>ffCurrency) and (length(Result)>1) and (Result[1]='-') then\r\n RemoveLeadingNegativeSign(Result,DS,TS);\r\nend;\r\n\r\nfunction Format(const Fmt: String; const Args: array of const): String;\r\n\r\nbegin\r\n Result:=Format(Fmt,Args,FormatSettings)\r\nend;\r\n\r\nfunction Format(const Fmt: String; const Args: array of Const; const aSettings : TFormatSettings): String;\r\n\r\nVar ChPos,OldPos,ArgPos,DoArg,Len : SizeInt;\r\n Hs,ToAdd : String;\r\n Index : Byte;\r\n Width,Prec : Longint;\r\n Left : Boolean;\r\n Fchar : char;\r\n vq : nativeint;\r\n\r\n {\r\n ReadFormat reads the format string. It returns the type character in\r\n uppercase, and sets index, Width, Prec to their correct values,\r\n or -1 if not set. It sets Left to true if left alignment was requested.\r\n In case of an error, DoFormatError is called.\r\n }\r\n\r\n Function ReadFormat : Char;\r\n\r\n Var Value : NativeInt;\r\n\r\n Procedure ReadInteger;\r\n\r\n var\r\n Code: integer;\r\n ArgN: SizeInt;\r\n begin\r\n If Value<>-1 then exit; // Was already read.\r\n OldPos:=ChPos;\r\n While (ChPos<=Len) and\r\n (Fmt[ChPos]<='9') and (Fmt[ChPos]>='0') do inc(ChPos);\r\n If ChPos>len then\r\n DoFormatError(feInvalidFormat,Fmt);\r\n If Fmt[ChPos]='*' then\r\n begin\r\n\r\n if Index=High(byte) then\r\n ArgN:=Argpos\r\n else\r\n begin\r\n ArgN:=Index;\r\n Inc(Index);\r\n end;\r\n\r\n If (ChPos>OldPos) or (ArgN>High(Args)) then\r\n DoFormatError(feInvalidFormat,Fmt);\r\n\r\n ArgPos:=ArgN+1;\r\n\r\n case Args[ArgN].Vtype of\r\n vtInteger: Value := Args[ArgN].VInteger;\r\n vtNativeInt: Value := Args[ArgN].VNativeInt;\r\n else\r\n DoFormatError(feInvalidFormat,Fmt);\r\n end;\r\n Inc(ChPos);\r\n end\r\n else\r\n begin\r\n If (OldPos0 then DoFormatError (feInvalidFormat,Fmt);\r\n end\r\n else\r\n Value:=-1;\r\n end;\r\n end;\r\n\r\n Procedure ReadIndex;\r\n\r\n begin\r\n If Fmt[ChPos]<>':' then\r\n ReadInteger\r\n else\r\n value:=0; // Delphi undocumented behaviour, assume 0, #11099\r\n If Fmt[ChPos]=':' then\r\n begin\r\n If Value=-1 then DoFormatError(feMissingArgument,Fmt);\r\n Index:=Value;\r\n Value:=-1;\r\n Inc(ChPos);\r\n end;\r\n end;\r\n\r\n Procedure ReadLeft;\r\n\r\n begin\r\n If Fmt[ChPos]='-' then\r\n begin\r\n left:=True;\r\n Inc(ChPos);\r\n end\r\n else\r\n Left:=False;\r\n end;\r\n\r\n Procedure ReadWidth;\r\n\r\n begin\r\n ReadInteger;\r\n If Value<>-1 then\r\n begin\r\n Width:=Value;\r\n Value:=-1;\r\n end;\r\n end;\r\n\r\n Procedure ReadPrec;\r\n\r\n begin\r\n If Fmt[ChPos]='.' then\r\n begin\r\n inc(ChPos);\r\n ReadInteger;\r\n If Value=-1 then\r\n Value:=0;\r\n prec:=Value;\r\n end;\r\n end;\r\n\r\n\r\n begin\r\n Index:=High(byte);\r\n Width:=-1;\r\n Prec:=-1;\r\n Value:=-1;\r\n inc(ChPos);\r\n If Fmt[ChPos]='%' then\r\n begin\r\n Result:='%';\r\n exit; // VP fix\r\n end;\r\n ReadIndex;\r\n ReadLeft;\r\n ReadWidth;\r\n ReadPrec;\r\n Result:=Upcase(Fmt[ChPos]);\r\n end;\r\n\r\n\r\n function Checkarg (AT : Integer; err:boolean):boolean;\r\n {\r\n Check if argument INDEX is of correct type (AT)\r\n If Index=-1, ArgPos is used, and argpos is augmented with 1\r\n DoArg is set to the argument that must be used.\r\n }\r\n begin\r\n result:=false;\r\n if Index=High(Byte) then\r\n DoArg:=Argpos\r\n else\r\n DoArg:=Index;\r\n ArgPos:=DoArg+1;\r\n If (Doarg>High(Args)) or (Args[Doarg].VType<>AT) then\r\n begin\r\n if err then\r\n DoFormatError(feInvalidArgindex,Fmt);\r\n dec(ArgPos);\r\n exit;\r\n end;\r\n result:=true;\r\n end;\r\n\r\nbegin\r\n Result:='';\r\n Len:=Length(Fmt);\r\n ChPos:=1;\r\n OldPos:=1;\r\n ArgPos:=0;\r\n While ChPos<=len do\r\n begin\r\n While (ChPos<=Len) and (Fmt[ChPos]<>'%') do\r\n inc(ChPos);\r\n If ChPos>OldPos Then\r\n Result:=Result+Copy(Fmt,OldPos,ChPos-Oldpos);\r\n If ChPos'-' then\r\n ToAdd:=StringOfChar('0',Index)+ToAdd\r\n else\r\n // + 1 to accomodate for - sign in length !!\r\n Insert(StringOfChar('0',Index+1),toadd,2);\r\n end;\r\n 'U' : begin\r\n if Checkarg(vtinteger,false) then\r\n toAdd:=IntToStr(Cardinal(Args[DoArg].VInteger))\r\n else if CheckArg(vtNativeInt,True) then\r\n toAdd:=IntToStr(NativeUInt(Args[DoArg].VNativeInt));\r\n Width:=Abs(width);\r\n Index:=Prec-Length(ToAdd);\r\n ToAdd:=StringOfChar('0',Index)+ToAdd\r\n end;\r\n 'E' : begin\r\n if CheckArg(vtCurrency,false) then\r\n ToAdd:=FloatToStrF(Args[doarg].VCurrency,ffExponent,3,Prec,aSettings)\r\n else if CheckArg(vtExtended,True) then\r\n ToAdd:=FloatToStrF(Args[doarg].VExtended,ffExponent,3,Prec,aSettings);\r\n end;\r\n 'F' : begin\r\n if CheckArg(vtCurrency,false) then\r\n ToAdd:=FloatToStrF(Args[doarg].VCurrency,ffFixed,9999,Prec,aSettings)\r\n else if CheckArg(vtInteger,false) then\r\n ToAdd:=FloatToStrF(Args[doarg].VExtended,ffFixed,9999,Prec,aSettings)\r\n else if CheckArg(vtExtended,True) then\r\n ToAdd:=FloatToStrF(Args[doarg].VExtended,ffFixed,9999,Prec,aSettings);\r\n end;\r\n 'G' : begin\r\n if CheckArg(vtCurrency,false) then\r\n ToAdd:=FloatToStrF(Args[doarg].VCurrency,ffGeneral,Prec,3,aSettings)\r\n else if CheckArg(vtExtended,True) then\r\n ToAdd:=FloatToStrF(Args[doarg].VExtended,ffGeneral,Prec,3,aSettings);\r\n end;\r\n 'N' : begin\r\n if CheckArg(vtCurrency,false) then\r\n ToAdd:=FloatToStrF(Args[doarg].VCurrency,ffNumber,9999,Prec,aSettings)\r\n else if CheckArg(vtExtended,True) then\r\n ToAdd:=FloatToStrF(Args[doarg].VExtended,ffNumber,9999,Prec,aSettings);\r\n end;\r\n 'M' : begin\r\n if CheckArg(vtCurrency,false) then\r\n ToAdd:=FloatToStrF(Args[doarg].VCurrency,ffCurrency,9999,Prec,aSettings)\r\n else if CheckArg(vtExtended,True) then\r\n ToAdd:=FloatToStrF(Args[doarg].VExtended,ffCurrency,9999,Prec,aSettings);\r\n end;\r\n 'S' : begin\r\n if CheckArg(vtUnicodeString,false) then\r\n hs:=Args[doarg].VUnicodeString\r\n else if CheckArg(vtWideChar,True) then\r\n hs:=Args[doarg].VWideChar;\r\n Index:=Length(hs);\r\n If (Prec<>-1) and (Index>Prec) then\r\n Index:=Prec;\r\n ToAdd:=Copy(hs,1,Index);\r\n end;\r\n 'P' : Begin\r\n if CheckArg(vtInteger,false) then\r\n ToAdd:=IntToHex(Args[DoArg].VInteger,8)\r\n else if CheckArg(vtInteger,true) then\r\n ToAdd:=IntToHex(Args[DoArg].VNativeInt,16);\r\n end;\r\n 'X' : begin\r\n if Checkarg(vtinteger,false) then\r\n begin\r\n vq:=Args[Doarg].VInteger;\r\n Index:=16;\r\n end\r\n else if Checkarg(vtNativeint,True) then\r\n begin\r\n vq:=Args[Doarg].VNativeInt;\r\n index:=31; // May need to adjust to NativeInt\r\n end;\r\n If Prec>index then\r\n ToAdd:=IntToHex(vq,index)\r\n else\r\n begin\r\n // determine minimum needed number of hex digits.\r\n Index:=1;\r\n While (NativeInt(1) shl (Index*4)<=vq) and (index<16) do\r\n inc(Index);\r\n If Index>Prec then\r\n Prec:=Index;\r\n ToAdd:=IntToHex(vq,Prec);\r\n end;\r\n end;\r\n '%': ToAdd:='%';\r\n end;\r\n If Width<>-1 then\r\n If Length(ToAdd)= Len then exit;\r\n First := True;\r\n end;\r\n end\r\n else\r\n if not (Ident[I] in AlphaNum) then exit;\r\n I:=I+1;\r\n end;\r\n Result:=true;\r\nend;\r\n\r\nprocedure FreeAndNil(var Obj);\r\nvar\r\n o: TObject;\r\nbegin\r\n o:=TObject(Obj);\r\n if o=nil then exit;\r\n TObject(Obj):=nil;\r\n o.Destroy;\r\nend;\r\n\r\n{ EVariantError }\r\n\r\nconstructor EVariantError.CreateCode(Code: Longint);\r\nbegin\r\n ErrCode:=Code;\r\nend;\r\n\r\n{ Exception }\r\n\r\nconstructor Exception.Create(const Msg: String);\r\nbegin\r\n FMessage := Msg;\r\n FJSError := TJSError.new(Msg);\r\n FStack := FJSError.Stack;\r\n if LogMessageOnCreate then\r\n Writeln('Created exception ', ClassName, ' with message: ', Msg);\r\nend;\r\n\r\nconstructor Exception.CreateFmt(const Msg: string; const Args: array of Const\r\n );\r\nbegin\r\n //writeln('Exception.CreateFmt START ',ClassName,' \"',Msg,'\" Args=',Args);\r\n Create(Format(Msg,Args));\r\n //writeln('Exception.CreateFmt END ',ClassName,' \"',Msg,'\" fMessage=',fMessage);\r\nend;\r\n\r\nconstructor Exception.CreateHelp(const Msg: String; AHelpContext: Integer);\r\nbegin\r\n Create(Msg);\r\n fHelpContext:=AHelpContext;\r\nend;\r\n\r\nconstructor Exception.CreateFmtHelp(const Msg: string;\r\n const Args: array of Const; AHelpContext: Integer);\r\nbegin\r\n Create(Format(Msg,Args));\r\n fHelpContext:=AHelpContext;\r\nend;\r\n\r\nfunction Exception.ToString: String;\r\nbegin\r\n Result:=ClassName+': '+Message;\r\nend;\r\n\r\nConst\r\n RESpecials = '([\\$\\+\\[\\]\\(\\)\\\\\\.\\*\\^\\?\\|])';\r\n\r\nfunction StringReplace(aOriginal, aSearch, aReplace: string;\r\n Flags: TStringReplaceFlags): String;\r\n\r\nVar\r\n REFlags : String;\r\n REString : String;\r\n\r\nbegin\r\n REFlags:='';\r\n if rfReplaceAll in flags then\r\n ReFlags:='g';\r\n if rfIgnoreCase in flags then\r\n ReFlags:=ReFlags+'i';\r\n REString:=TJSString(aSearch).replace(TJSRegexp.new(RESpecials,'g'),'\\$1');\r\n Result:=TJSString(aOriginal).replace(TJSRegexp.new(REString,REFlags),aReplace);\r\nend;\r\n\r\nfunction QuoteString(aOriginal: String; AQuote: Char): String;\r\n\r\nbegin\r\n Result:=AQuote+StringReplace(aOriginal,aQuote,aQuote+aQuote,[rfReplaceAll])+AQuote;\r\nend;\r\n\r\nfunction QuotedStr(const s: string; QuoteChar : Char = ''''): string;\r\n\r\nbegin\r\n Result:=QuoteString(S,QuoteChar);\r\nend;\r\n\r\nfunction DeQuoteString(aQuoted: String; AQuote: Char): String;\r\nvar\r\n i: Integer;\r\nbegin\r\n Result:=aQuoted;\r\n if TJSString(Result).substr(0,1)<>AQuote then exit;\r\n Result:=TJSString(Result).slice(1);\r\n i:=1;\r\n while i<=length(Result) do\r\n begin\r\n if Result[i]=AQuote then\r\n begin\r\n if (i=length(Result)) or (Result[i+1]<>AQuote) then\r\n begin\r\n Result:=TJSString(Result).slice(0,i-1);\r\n exit;\r\n end\r\n else\r\n Result:=TJSString(Result).slice(0,i-1)+TJSString(Result).slice(i);\r\n end\r\n else\r\n inc(i);\r\n end;\r\nend;\r\n\r\nfunction IsDelimiter(const Delimiters, S: string; Index: Integer): Boolean;\r\nbegin\r\n Result:=False;\r\n if (Index>0) and (Index<=Length(S)) then\r\n Result:=Pos(S[Index],Delimiters)<>0; // Note we don't do MBCS yet\r\nend;\r\n\r\nFunction LastDelimiter(const Delimiters, S: string): SizeInt;\r\n\r\nbegin\r\n Result:=Length(S);\r\n While (Result>0) and (Pos(S[Result],Delimiters)=0) do\r\n Dec(Result);\r\nend;\r\n\r\n\r\nfunction AdjustLineBreaks(const S: string): string;\r\n\r\nbegin\r\n Result:=AdjustLineBreaks(S,DefaultTextLineBreakStyle);\r\nend;\r\n\r\nfunction AdjustLineBreaks(const S: string; Style: TTextLineBreakStyle): string;\r\n\r\nvar\r\n I,L: Longint;\r\n Res : String;\r\n\r\n Procedure Add(C : Char);\r\n begin\r\n Res:=Res+C;\r\n end;\r\n\r\nbegin\r\n I:=0;\r\n L:=Length(S);\r\n Result:='';\r\n While (I<=L) do\r\n case S[I] of\r\n #10: begin\r\n if Style in [tlbsCRLF,tlbsCR] then\r\n Add(#13);\r\n if Style=tlbsCRLF then\r\n Add(#10);\r\n Inc(I);\r\n end;\r\n #13: begin\r\n if Style=tlbsCRLF then\r\n Add(#13);\r\n Add(#10);\r\n Inc(I);\r\n if S[I]=#10 then\r\n Inc(I);\r\n end;\r\n else\r\n Add(S[i]);\r\n Inc(I);\r\n end;\r\n Result:=Res;\r\nend;\r\n\r\nfunction WrapText(const Line, BreakStr: string;\r\n const BreakChars: array of char; MaxCol: Integer): string;\r\n\r\nconst\r\n Quotes = ['''', '\"'];\r\n\r\nVar\r\n L : String;\r\n C,LQ,BC : Char;\r\n P,BLen,Len : Integer;\r\n HB,IBC : Boolean;\r\n\r\nbegin\r\n Result:='';\r\n L:=Line;\r\n Blen:=Length(BreakStr);\r\n If (BLen>0) then\r\n BC:=BreakStr[1]\r\n else\r\n BC:=#0;\r\n Len:=Length(L);\r\n While (Len>0) do\r\n begin\r\n P:=1;\r\n LQ:=#0;\r\n HB:=False;\r\n IBC:=False;\r\n While ((P<=Len) and ((P<=MaxCol) or not IBC)) and ((LQ<>#0) or Not HB) do\r\n begin\r\n C:=L[P];\r\n If (C=LQ) then\r\n LQ:=#0\r\n else If (C in Quotes) then\r\n LQ:=C;\r\n If (LQ<>#0) then\r\n Inc(P)\r\n else\r\n begin\r\n HB:=((C=BC) and (BreakStr=Copy(L,P,BLen)));\r\n If HB then\r\n Inc(P,Blen)\r\n else\r\n begin\r\n If (P>=MaxCol) then\r\n IBC:=CharInSet(C,BreakChars);\r\n Inc(P);\r\n end;\r\n end;\r\n// Writeln('\"',C,'\" : IBC : ',IBC,' HB : ',HB,' LQ : ',LQ,' P>MaxCol : ',P>MaxCol);\r\n end;\r\n Result:=Result+Copy(L,1,P-1);\r\n Delete(L,1,P-1);\r\n Len:=Length(L);\r\n If (Len>0) and Not HB then\r\n Result:=Result+BreakStr;\r\n end;\r\nend;\r\n\r\nfunction WrapText(const Line: string; MaxCol: Integer): string;\r\n\r\nbegin\r\n Result:=WrapText(Line,sLineBreak, [' ', '-', #9], MaxCol);\r\nend;\r\n\r\n\r\nfunction GetEnvironmentVariable(const EnvVar: String): String;\r\nbegin\r\n if Assigned(OnGetEnvironmentVariable) then\r\n Result:=OnGetEnvironmentVariable(EnvVar)\r\n else\r\n Result:='';\r\nend;\r\n\r\nfunction GetEnvironmentVariableCount: Integer;\r\nbegin\r\n if Assigned(OnGetEnvironmentVariableCount) then\r\n Result:=OnGetEnvironmentVariableCount()\r\n else\r\n Result:=0;\r\nend;\r\n\r\nfunction GetEnvironmentString(Index: Integer): String;\r\nbegin\r\n if Assigned(OnGetEnvironmentString) then\r\n Result:=OnGetEnvironmentString(Index)\r\n else\r\n Result:='';\r\nend;\r\n\r\n{ Date/Time routines}\r\n\r\nFunction DoEncodeDate(Year, Month, Day: Word): longint;\r\n\r\nVar\r\n D : TDateTime;\r\n\r\nbegin\r\n If TryEncodeDate(Year,Month,Day,D) then\r\n Result:=Trunc(D)\r\n else\r\n Result:=0;\r\nend;\r\n\r\nfunction DoEncodeTime(Hour, Minute, Second, MilliSecond: word): TDateTime;\r\n\r\nbegin\r\n If not TryEncodeTime(Hour,Minute,Second,MilliSecond,Result) then\r\n Result:=0;\r\nend;\r\n\r\nfunction DateTimeToJSDate(aDateTime: TDateTime): TJSDate;\r\n\r\nVar\r\n Y,M,D,h,n,s,z : Word;\r\n\r\nbegin\r\n DecodeDate(Trunc(aDateTime),Y,M,D);\r\n DecodeTime(Frac(aDateTime),H,N,S,Z);\r\n Result:=TJSDate.New(Y,M-1,D,h,n,s,z);\r\nend;\r\n\r\nfunction JSDateToDateTime(aDate: TJSDate): TDateTime;\r\n\r\nbegin\r\n Result:=EncodeDate(ADate.FullYear,ADate.Month+1,ADate.Date) +\r\n EncodeTime(ADate.Hours,ADate.Minutes,ADate.Seconds,ADate.Milliseconds);\r\nend;\r\n\r\n\r\n{ ComposeDateTime converts a Date and a Time into one TDateTime }\r\nfunction ComposeDateTime(Date,Time : TDateTime) : TDateTime;\r\n\r\nbegin\r\n if Date < 0 then\r\n Result := trunc(Date) - Abs(frac(Time))\r\n else\r\n Result := trunc(Date) + Abs(frac(Time));\r\nend;\r\n\r\n\r\nfunction TryEncodeDate(Year, Month, Day: Word; out Date: TDateTime): Boolean;\r\n\r\nvar\r\n c, ya: LongWord;\r\nbegin\r\n Result:=(Year>0) and (Year<10000) and\r\n (Month >= 1) and (Month<=12) and\r\n (Day>0) and (Day<=MonthDays[IsleapYear(Year),Month]);\r\n If Result then\r\n begin\r\n if month > 2 then\r\n Dec(Month,3)\r\n else\r\n begin\r\n Inc(Month,9);\r\n Dec(Year);\r\n end;\r\n c:= Year DIV 100;\r\n ya:= Year - 100*c;\r\n Date := (146097*c) SHR 2 + (1461*ya) SHR 2 + (153*LongWord(Month)+2) DIV 5 + LongWord(Day);\r\n // Note that this line can't be part of the line above, since TDateTime is\r\n // signed and c and ya are not\r\n Date := Date - 693900;\r\n end\r\nend;\r\n\r\nfunction TryEncodeTime(Hour, Min, Sec, MSec: Word; out Time: TDateTime\r\n ): Boolean;\r\n\r\nbegin\r\n Result:=(Hour<24) and (Min<60) and (Sec<60) and (MSec<1000);\r\n If Result then\r\n Time:=TDateTime(LongWord(Hour)*3600000+LongWord(Min)*60000+LongWord(Sec)*1000+MSec)/MSecsPerDay;\r\nend;\r\n\r\n{ EncodeDate packs three variables Year, Month and Day into a\r\n TDateTime value the result is the number of days since 12/30/1899 }\r\n\r\nfunction EncodeDate(Year, Month, Day: word): TDateTime;\r\n\r\nbegin\r\n If Not TryEncodeDate(Year,Month,Day,Result) then\r\n Raise EConvertError.CreateFmt('%s-%s-%s is not a valid date specification',\r\n [IntToStr(Year),IntToStr(Month),IntToStr(Day)]);\r\nend;\r\n\r\n{ EncodeTime packs four variables Hour, Minute, Second and MilliSecond into\r\n a TDateTime value }\r\n\r\nfunction EncodeTime(Hour, Minute, Second, MilliSecond:word):TDateTime;\r\n\r\nbegin\r\n If not TryEncodeTime(Hour,Minute,Second,MilliSecond,Result) then\r\n Raise EConvertError.CreateFmt('%s:%s:%s.%s is not a valid time specification',\r\n [IntToStr(Hour),IntToStr(Minute),IntToStr(Second),IntToStr(MilliSecond)]);\r\nend;\r\n\r\n\r\n{ DecodeDate unpacks the value Date into three values:\r\n Year, Month and Day }\r\n\r\nprocedure DecodeDate(Date: TDateTime; out Year, Month, Day: word);\r\nvar\r\n ly,ld,lm,j : LongWord;\r\nbegin\r\n if Date <= -datedelta then // If Date is before 1-1-1 then return 0-0-0\r\n begin\r\n Year := 0;\r\n Month := 0;\r\n Day := 0;\r\n end\r\n else\r\n begin\r\n if Date>0 then\r\n Date:=(Date+(1/(msecsperday*2)))\r\n else\r\n Date:=Date-(1/(msecsperday*2));\r\n if Date>MaxDateTime then\r\n Date:=MaxDateTime;\r\n// Raise EConvertError.CreateFmt('%f is not a valid TDatetime encoding, maximum value is %f.',[Date,MaxDateTime]);\r\n j := ((Trunc(Date) + 693900) SHL 2)-1;\r\n ly:= j DIV 146097;\r\n j:= j - 146097 * LongWord(ly);\r\n ld := j SHR 2;\r\n j:=(ld SHL 2 + 3) DIV 1461;\r\n ld:= ((ld SHL 2) + 7 - 1461*j) SHR 2;\r\n lm:=(5 * ld-3) DIV 153;\r\n ld:= (5 * ld +2 - 153*lm) DIV 5;\r\n ly:= 100 * LongWord(ly) + j;\r\n if lm < 10 then\r\n inc(lm,3)\r\n else\r\n begin\r\n dec(lm,9);\r\n inc(ly);\r\n end;\r\n year:=ly;\r\n month:=lm;\r\n day:=ld;\r\n end;\r\nend;\r\n\r\n\r\nfunction DecodeDateFully(const DateTime: TDateTime; out Year, Month, Day, DOW: Word): Boolean;\r\nbegin\r\n DecodeDate(DateTime,Year,Month,Day);\r\n DOW:=DayOfWeek(DateTime);\r\n Result:=IsLeapYear(Year);\r\nend;\r\n { DateTimeToTimeStamp converts DateTime to a TTimeStamp }\r\n\r\nfunction DateTimeToTimeStamp(DateTime: TDateTime): TTimeStamp;\r\n\r\nVar\r\n D : Double;\r\nbegin\r\n D:=DateTime * Double(MSecsPerDay);\r\n if D<0 then\r\n D:=D-0.5\r\n else\r\n D:=D+0.5;\r\n result.Time := Trunc(Abs(Trunc(D)) Mod MSecsPerDay);\r\n result.Date := DateDelta + (Trunc(D) div MSecsPerDay);\r\nend;\r\n\r\n{ TimeStampToDateTime converts TimeStamp to a TDateTime value }\r\n\r\nfunction TimeStampToDateTime(const TimeStamp: TTimeStamp): TDateTime;\r\nbegin\r\n Result := ComposeDateTime(TimeStamp.Date - DateDelta,TimeStamp.Time/MSecsPerDay)\r\nend;\r\n\r\n{ MSecsToTimeStamp }\r\n\r\nfunction MSecsToTimeStamp(MSecs: NativeInt): TTimeStamp;\r\nbegin\r\n result.Date := Trunc(msecs/msecsperday);\r\n msecs:= msecs-NativeInt(result.date)*msecsperday;\r\n result.Time := Round(MSecs);\r\nend;\r\n\r\nfunction TimeStampToMSecs(const TimeStamp: TTimeStamp): NativeInt;\r\nbegin\r\n result := TimeStamp.Time + (timestamp.date*msecsperday);\r\nend ;\r\n\r\n\r\n\r\n{ DecodeTime unpacks Time into four values:\r\n Hour, Minute, Second and MilliSecond }\r\n\r\nprocedure DecodeTime(Time: TDateTime; out Hour, Minute, Second, MilliSecond: word);\r\nVar\r\n l : LongWord;\r\nbegin\r\n l := DateTimeToTimeStamp(Time).Time;\r\n Hour := l div 3600000;\r\n l := l mod 3600000;\r\n Minute := l div 60000;\r\n l := l mod 60000;\r\n Second := l div 1000;\r\n l := l mod 1000;\r\n MilliSecond := l;\r\nend;\r\n\r\n{ DateTimeToSystemTime converts DateTime value to SystemTime }\r\n\r\nprocedure DateTimeToSystemTime(DateTime: TDateTime; out SystemTime: TSystemTime);\r\nbegin\r\n DecodeDateFully(DateTime, SystemTime.Year, SystemTime.Month, SystemTime.Day,SystemTime.DayOfWeek);\r\n DecodeTime(DateTime, SystemTime.Hour, SystemTime.Minute, SystemTime.Second, SystemTime.MilliSecond);\r\n Dec(SystemTime.DayOfWeek);\r\nend ;\r\n\r\n{ SystemTimeToDateTime converts SystemTime to a TDateTime value }\r\n\r\nfunction SystemTimeToDateTime(const SystemTime: TSystemTime): TDateTime;\r\nbegin\r\n result := ComposeDateTime(DoEncodeDate(SystemTime.Year, SystemTime.Month, SystemTime.Day),\r\n DoEncodeTime(SystemTime.Hour, SystemTime.Minute, SystemTime.Second, SystemTime.MilliSecond));\r\nend ;\r\n\r\nfunction DayOfWeek(DateTime: TDateTime): integer;\r\nbegin\r\n Result:= 1+((Trunc(DateTime) - 1) mod 7);\r\n If (Result<=0) then\r\n Inc(Result,7);\r\nend;\r\n\r\n\r\n\r\nfunction Now: TDateTime;\r\nbegin\r\n Result:=JSDateToDateTime(TJSDate.New());\r\nend;\r\n\r\nfunction Date: TDateTime;\r\n\r\nbegin\r\n Result:=Trunc(Now);\r\nend;\r\n\r\nfunction Time: TDateTime;\r\nbegin\r\n Result:=Now-Date;\r\nend ;\r\n\r\n{ IncMonth increments DateTime with NumberOfMonths months,\r\n NumberOfMonths can be less than zero }\r\n\r\nfunction IncMonth(const DateTime: TDateTime; NumberOfMonths: integer = 1 ): TDateTime;\r\nvar\r\n Year, Month, Day : word;\r\nbegin\r\n DecodeDate(DateTime, Year, Month, Day);\r\n IncAMonth(Year, Month, Day, NumberOfMonths);\r\n result := ComposeDateTime(DoEncodeDate(Year, Month, Day), DateTime);\r\nend ;\r\n\r\n{ IncAMonth is the same as IncMonth, but operates on decoded date }\r\n\r\nprocedure IncAMonth(var Year, Month, Day: Word; NumberOfMonths: Integer = 1);\r\nvar\r\n TempMonth, S: Integer;\r\nbegin\r\n If NumberOfMonths>=0 then\r\n s:=1\r\n else\r\n s:=-1;\r\n inc(Year,(NumberOfMonths div 12));\r\n TempMonth:=Month+(NumberOfMonths mod 12)-1;\r\n if (TempMonth>11) or\r\n (TempMonth<0) then\r\n begin\r\n Dec(TempMonth, S*12);\r\n Inc(Year, S);\r\n end;\r\n Month:=TempMonth+1; { Months from 1 to 12 }\r\n If (Day>MonthDays[IsLeapYear(Year)][Month]) then\r\n Day:=MonthDays[IsLeapYear(Year)][Month];\r\nend;\r\n\r\n{ IsLeapYear returns true if Year is a leap year }\r\n\r\nfunction IsLeapYear(Year: Word): boolean;\r\nbegin\r\n Result := (Year mod 4 = 0) and ((Year mod 100 <> 0) or (Year mod 400 = 0));\r\nend;\r\n\r\n{ DateToStr returns a string representation of Date using ShortDateFormat }\r\n\r\nfunction DateToStr(Date: TDateTime): string;\r\nbegin\r\n Result:=DateToStr(Date,FormatSettings);\r\nend;\r\n\r\nfunction DateToStr(Date: TDateTime; const aSettings : TFormatSettings): string;\r\nbegin\r\n Result:=FormatDateTime('ddddd', Date, aSettings);\r\nend ;\r\n\r\n{ TimeToStr returns a string representation of Time using LongTimeFormat }\r\n\r\nfunction TimeToStr(Time: TDateTime): string;\r\nbegin\r\n Result:=TimeToStr(Time,FormatSettings);\r\nend;\r\n\r\nfunction TimeToStr(Time: TDateTime; const aSettings : TFormatSettings): string;\r\nbegin\r\n Result:=FormatDateTime('tt',Time,aSettings);\r\nend ;\r\n\r\n\r\n{ DateTimeToStr returns a string representation of DateTime using LongDateTimeFormat }\r\n\r\nVar\r\n DateTimeToStrFormat : Array[Boolean] of string = ('c','f');\r\n\r\n\r\nfunction DateTimeToStr(DateTime: TDateTime; ForceTimeIfZero : Boolean = False): string;\r\n\r\nbegin\r\n Result:=DateTimeToStr(DateTime,FormatSettings,ForceTimeIfZero);\r\nend;\r\n\r\nfunction DateTimeToStr(DateTime: TDateTime; Const aSettings : TFormatSettings; ForceTimeIfZero : Boolean = False): string;\r\n\r\n\r\nbegin\r\n Result:=FormatDateTime(DateTimeToStrFormat[ForceTimeIfZero], DateTime,aSettings)\r\nend ;\r\n\r\n\r\n{ StrToDate converts the string S to a TDateTime value\r\n if S does not represent a valid date value\r\n an EConvertError will be raised }\r\n\r\nfunction IntStrToDate(Out ErrorMsg : String; const S: String; const useformat : string; separator : char): TDateTime;\r\n\r\nConst\r\n WhiteSpace = ' '#8#9#10#12#13;\r\n Digits = '0123456789';\r\n\r\n procedure FixErrorMsg(const errmarg : String);\r\n\r\n begin\r\n ErrorMsg:=Format(SInvalidDateFormat,[errmarg]);\r\n end;\r\n\r\nvar\r\n df:string;\r\n d,m,y,ly,ld,lm:word;\r\n n,i,len:longint;\r\n c: integer;\r\n dp,mp,yp,which : Byte;\r\n s1:string;\r\n values: array of integer;\r\n YearMoreThenTwoDigits : boolean;\r\n\r\nbegin\r\n SetLength(values,4);\r\n Result:=0;\r\n Len:=Length(S);\r\n ErrorMsg:='';\r\n While (Len>0) and (Pos(S[Len],WhiteSpace)>0) do\r\n Dec(len);\r\n if (Len=0) then\r\n begin\r\n FixErrorMsg(S);\r\n exit;\r\n end;\r\n YearMoreThenTwoDigits := False;\r\n if separator = #0 then\r\n if (FormatSettings.DateSeparator<>#0) then\r\n separator := FormatSettings.DateSeparator\r\n else\r\n separator:='-';\r\n // Writeln('Separator: ',Separator);\r\n df := UpperCase(useFormat);\r\n { Determine order of D,M,Y }\r\n yp:=0;\r\n mp:=0;\r\n dp:=0;\r\n Which:=0;\r\n i:=0;\r\n while (i0 then\r\n s1 := s1 + s[i];\r\n { space can be part of the shortdateformat, and is defaultly in slovak\r\n windows, therefor it shouldn't be taken as separator (unless so specified)\r\n and ignored }\r\n if (Separator <> ' ') and (s[i] = ' ') then\r\n Continue;\r\n if (s[i] = separator) or ((i = len) and (Pos(s[i],Digits)>0)) then\r\n begin\r\n inc(n);\r\n if n>3 then\r\n begin\r\n// Writeln('More than 3 separators');\r\n FixErrorMsg(S);\r\n exit;\r\n end;\r\n // Check if the year has more then two digits (if n=yp, then we are evaluating the year.)\r\n if (n=yp) and (length(s1)>2) then YearMoreThenTwoDigits := True;\r\n val(s1, values[n], c);\r\n if c<>0 then\r\n begin\r\n// Writeln('S1 not a number ',S1);\r\n FixErrorMsg(s);\r\n Exit;\r\n end;\r\n s1 := '';\r\n end\r\n else if (Pos(s[i],Digits)=0) then\r\n begin\r\n// Writeln('Not a number at pos ',I,' ',S[i]);\r\n FixErrorMsg(s);\r\n Exit;\r\n end;\r\n end ;\r\n// Writeln('Which : ',Which,' N : ',N);\r\n if (Which<3) and (N>Which) then\r\n begin\r\n FixErrorMsg(s);\r\n Exit;\r\n end;\r\n // Fill in values.\r\n DecodeDate(Date,Ly,LM,LD);\r\n If N=3 then\r\n begin\r\n y:=values[yp];\r\n m:=values[mp];\r\n d:=values[dp];\r\n end\r\n Else\r\n begin\r\n Y:=ly;\r\n If n<2 then\r\n begin\r\n d:=values[1];\r\n m := LM;\r\n end\r\n else\r\n If dp= 0) and (y < 100) and not YearMoreThenTwoDigits then\r\n begin\r\n ly := ly - TwoDigitYearCenturyWindow;\r\n Inc(Y, ly div 100 * 100);\r\n if (TwoDigitYearCenturyWindow > 0) and (Y < ly) then\r\n Inc(Y, 100);\r\n end;\r\n if not TryEncodeDate(y, m, d, result) then\r\n errormsg:=SErrInvalidDate;\r\nend;\r\n\r\nfunction StrToDate(const S: String; const useformat : string; separator : char): TDateTime;\r\nVar\r\n MSg : String;\r\nbegin\r\n Result:=IntStrToDate(Msg,S,useFormat,Separator);\r\n If (Msg<>'') then\r\n Raise EConvertError.Create(Msg);\r\nend;\r\n\r\nfunction StrToDate(const S: String; const aSettings : TFormatSettings): TDateTime;\r\n\r\nbegin\r\n Result:=StrToDate(S,aSettings.ShortDateFormat,aSettings.DateSeparator);\r\nend;\r\n\r\nfunction StrToDate(const S: String): TDateTime;\r\nbegin\r\n result:=StrToDate(S,FormatSettings);\r\nend;\r\n\r\nfunction StrToDate(const S: String; separator : char): TDateTime;\r\nbegin\r\n result := StrToDate(S,FormatSettings.ShortDateFormat,separator)\r\nend;\r\n\r\n\r\n{ StrToTime converts the string S to a TDateTime value\r\n if S does not represent a valid time value an\r\n EConvertError will be raised }\r\n\r\n\r\nfunction IntStrToTime(Out ErrorMsg : String; const S: String; Len : integer; Const aSettings : TFormatSettings): TDateTime;\r\n\r\nconst\r\n AMPM_None = 0;\r\n AMPM_AM = 1;\r\n AMPM_PM = 2;\r\n tiHour = 0;\r\n tiMin = 1;\r\n tiSec = 2;\r\n tiMSec = 3;\r\n\r\ntype\r\n TTimeValues = array of Word;\r\n\r\nvar\r\n AmPm: integer;\r\n TimeValues: TTimeValues;\r\n\r\n\r\n function SplitElements(out TimeValues: TTimeValues; out AmPm: Integer): Boolean;\r\n //Strict version. It does not allow #32 as Separator, it will treat it as whitespace always\r\n const\r\n Digits = '0123456789';\r\n var\r\n Cur, Offset, ElemLen, Err, TimeIndex, FirstSignificantDigit: Integer;\r\n Value: Integer;\r\n DigitPending, MSecPending: Boolean;\r\n AmPmStr: String;\r\n CurChar: Char;\r\n I : Integer;\r\n allowedchars : string;\r\n\r\n begin\r\n Result := False;\r\n AmPm := AMPM_None; //No Am or PM in string found yet\r\n MSecPending := False;\r\n TimeIndex := 0; //indicating which TTimeValue must be filled next\r\n For I:=tiHour to tiMSec do\r\n TimeValues[i]:=0;\r\n Cur := 1;\r\n //skip leading blanks\r\n While (Cur < Len) and (S[Cur] =#32) do Inc(Cur);\r\n Offset := Cur;\r\n //First non-blank cannot be Separator or DecimalSeparator\r\n if (Cur > Len - 1) or (S[Cur] = aSettings.TimeSeparator) or (S[Cur] = aSettings.Decimalseparator) then\r\n begin\r\n // Writeln('Error in sep S[Cur]',S[Cur],' ',separator,' ',GetDecimalSeparator);\r\n Exit;\r\n end;\r\n DigitPending := (Pos(S[Cur],Digits)>0);\r\n While (Cur <= Len) do\r\n begin\r\n //writeln;\r\n // writeln('Main While loop: Cur = ',Cur,' S[Cur] = \"',S[Cur],'\" Len = ',Len,' separator : ',Separator);\r\n CurChar := S[Cur];\r\n if Pos(CurChar,Digits)>0 then\r\n begin//Digits\r\n //HH, MM, SS, or Msec?\r\n // writeln('Digit: ', CurChar);\r\n //Digits are only allowed after starting Am/PM or at beginning of string or after Separator\r\n //and TimeIndex must be <= tiMSec\r\n //Uncomment \"or (#32 = Separator)\" and it will allllow #32 as separator\r\n if (not (DigitPending {or (#32 = Separator)})) or (TimeIndex > tiMSec) then\r\n begin\r\n // Writeln('DigitPending',ElemLen);\r\n Exit;\r\n end;\r\n OffSet := Cur;\r\n if (CurChar <> '0') then FirstSignificantDigit := OffSet else FirstSignificantDigit := -1;\r\n while (Cur < Len) and (Pos(S[Cur + 1],Digits)>0) do\r\n begin\r\n //Mark first Digit that is not '0'\r\n if (FirstSignificantDigit = -1) and (S[Cur] <> '0') then FirstSignificantDigit := Cur;\r\n Inc(Cur);\r\n end;\r\n if (FirstSignificantDigit = -1) then FirstSignificantDigit := Cur;\r\n ElemLen := 1+ Cur - FirstSignificantDigit;\r\n // writeln(' S[FirstSignificantDigit] = ',S[FirstSignificantDigit], ' S[Cur] = ',S[Cur],' ElemLen = ',ElemLen,' -> ', S[Offset], ElemLen);\r\n // writeln(' Cur = ',Cur);\r\n //this way we know that Val() will never overflow Value !\r\n if (ElemLen <= 2) or ((ElemLen <= 3) and (TimeIndex = tiMSec) ) then\r\n begin\r\n Val(Copy(S,FirstSignificantDigit, ElemLen), Value, Err);\r\n // writeln(' Value = ',Value,' HH = ',TimeValues[0],' MM = ',TimeValues[1],' SS = ',TimeValues[2],' MSec = ',Timevalues[3]);\r\n //This is safe now, because we know Value < High(Word)\r\n TimeValues[TimeIndex] := Value;\r\n Inc(TimeIndex);\r\n DigitPending := False;\r\n end\r\n else\r\n begin\r\n // Writeln('Wrong elemlen: ',ElemLen, ' timeIndex: ',timeindex);\r\n Exit; //Value to big, so it must be a wrong timestring\r\n end;\r\n end//Digits\r\n else if (CurChar = #32) then\r\n begin\r\n //writeln('#32');\r\n //just skip, but we must adress this, or it will be parsed by either AM/PM or Separator\r\n end\r\n else if (CurChar = aSettings.TimeSeparator) then\r\n begin\r\n // writeln('Separator ',Separator);\r\n if DigitPending or (TimeIndex > tiSec) then\r\n begin\r\n // Writeln ('DigitPending ',DigitPending,' or (TimeIndex',Timeindex,' > tiSec,', tiSec,')');\r\n Exit;\r\n end;\r\n DigitPending := True;\r\n MSecPending := False;\r\n end\r\n else if (CurChar = aSettings.DecimalSeparator) then\r\n begin\r\n //writeln('DecimalSeparator');\r\n if DigitPending or MSecPending or (TimeIndex <> tiMSec) then\r\n begin\r\n // Writeln('DigitPending ',DigitPending,' or MSecPending ',MSecPending,' (',TimeIndex,',Timeindex, >', tiMSec,' tiSec)');\r\n Exit;\r\n end;\r\n DigitPending := True;\r\n MSecPending := True;\r\n end\r\n else\r\n begin//AM/PM?\r\n //None of the above, so this char _must_ be the start of AM/PM string\r\n //If we already have found AM/PM or we expect a digit then then timestring must be wrong at this point\r\n //writeln('AM/PM?');\r\n if (AmPm <> AMPM_None) or DigitPending then\r\n begin\r\n // Writeln('AmPm <> AMPM_None) or DigitPending');\r\n Exit;\r\n end;\r\n OffSet := Cur;\r\n allowedchars:=aSettings.DecimalSeparator+' ';\r\n if aSettings.TimeSeparator<>#0 then\r\n allowedchars:=allowedchars+aSettings.TimeSeparator;\r\n while (Cur < Len) and (Pos(S[Cur + 1],AllowedChars)=0)\r\n and (Pos(S[Cur + 1],Digits)=0) do Inc(Cur);\r\n ElemLen := 1 + Cur - OffSet;\r\n// writeln(' S[Offset] = ',S[Offset], ' S[Cur] = ',S[Cur],' ElemLen = ',ElemLen,' -> ', S[1+Offset], ElemLen);\r\n// writeln(' Cur = ',Cur, ', S =',S);\r\n AmPmStr := Copy(S,OffSet, ElemLen);\r\n\r\n // writeln('AmPmStr = ',ampmstr,' (',length(ampmstr),')');\r\n //We must compare to TimeAMString before hardcoded 'AM' for delphi compatibility\r\n //Also it is perfectly legal, though insane to have TimeAMString = 'PM' and vice versa\r\n if (CompareText(AmPmStr, aSettings.TimeAMString) = 0) then AmPm := AMPM_AM\r\n else if (CompareText(AmPmStr, aSettings.TimePMString) = 0) then AmPm := AMPM_PM\r\n else if (CompareText(AmPmStr, 'AM') = 0) then AmPm := AMPM_AM\r\n else if (CompareText(AmPmStr, 'PM') = 0) then AmPm := AMPM_PM\r\n else\r\n begin\r\n // Writeln('No timestring ',AmPmStr);\r\n Exit; //If text does not match any of these, timestring must be wrong;\r\n end;\r\n //if AM/PM is at beginning of string, then a digit is mandatory after it\r\n if (TimeIndex = tiHour) then\r\n begin\r\n DigitPending := True;\r\n end\r\n //otherwise, no more TimeValues allowed after this\r\n else\r\n begin\r\n TimeIndex := tiMSec + 1;\r\n DigitPending := False;\r\n end;\r\n end;//AM/PM\r\n Inc(Cur)\r\n end;//while\r\n\r\n //If we arrive here, parsing the elements has been successfull\r\n //if not at least Hours specified then input is not valid\r\n //when am/pm is specified Hour must be <= 12 and not 0\r\n if (TimeIndex = tiHour) or ((AmPm <> AMPM_None) and ((TimeValues[tiHour] > 12) or (TimeValues[tiHour] = 0))) or DigitPending then\r\n Exit;\r\n Result := True;\r\n end;\r\n\r\nbegin\r\n setlength(timevalues,4);\r\n AmPm := AMPM_None;\r\n if not SplitElements(TimeValues, AmPm) then\r\n begin\r\n ErrorMsg:=Format(SErrInvalidTimeFormat,[S]);\r\n Exit;\r\n end;\r\n if (AmPm=AMPM_PM) and (TimeValues[tiHour]<>12) then Inc(TimeValues[tiHour], 12)\r\n else if (AmPm=AMPM_AM) and (TimeValues[tiHour]=12) then TimeValues[tiHour]:=0;\r\n // Writeln( TimeValues[tiHour], TimeValues[tiMin], TimeValues[tiSec], TimeValues[tiMSec]);\r\n if not TryEncodeTime(TimeValues[tiHour], TimeValues[tiMin], TimeValues[tiSec], TimeValues[tiMSec], result) Then\r\n\r\n ErrorMsg:=Format(SErrInvalidTimeFormat,[S]);\r\nend ;\r\n\r\nfunction StrToTime(const S: String; const aSettings : TFormatSettings): TDateTime;\r\n\r\nVar\r\n Msg : String;\r\n\r\nbegin\r\n Result:=IntStrToTime(Msg,S,Length(S),aSettings);\r\n If (Msg<>'') then\r\n Raise EConvertError.Create(Msg);\r\nend;\r\n\r\nfunction StrToTime(const S: String): TDateTime;\r\nbegin\r\n result:=StrToTime(S, FormatSettings);\r\nend;\r\n\r\n\r\nfunction StrToTime(const S: String; separator: char): TDateTime;\r\n\r\nVar\r\n aSettings : TFormatSettings;\r\n\r\nbegin\r\n aSettings:=TFormatSettings.Create;\r\n aSettings.TimeSeparator:=Separator;\r\n Result:=StrToTime(S,aSettings);\r\nend;\r\n\r\n\r\n{ StrToDateTime converts the string S to a TDateTime value\r\n if S does not represent a valid date and/or time value\r\n an EConvertError will be raised }\r\n\r\nfunction SplitDateTimeStr(DateTimeStr: String; out DateStr, TimeStr: String; Const aSettings : TFormatSettings): Integer;\r\n\r\n{ Helper function for StrToDateTime\r\n Pre-condition\r\n Date is before Time\r\n If either Date or Time is omitted then see what fits best, a time or a date (issue #0020522)\r\n Date and Time are separated by whitespace (space Tab, Linefeed or carriage return)\r\n FS.DateSeparator can be the same as FS.TimeSeparator (issue #0020522)\r\n If they are both #32 and TrimWhite(DateTimeStr) contains a #32 a date is assumed.\r\n Post-condition\r\n DateStr holds date as string or is empty\r\n TimeStr holds time as string or is empty\r\n Result = number of strings returned, 0 = error\r\n}\r\nconst\r\n WhiteSpace = #9#10#13#32;\r\n\r\nvar\r\n p: Integer;\r\n DummyDT: TDateTime;\r\nbegin\r\n Result := 0;\r\n DateStr := '';\r\n TimeStr := '';\r\n DateTimeStr := Trim(DateTimeStr);\r\n if Length(DateTimeStr) = 0 then exit;\r\n if (aSettings.DateSeparator = #32) and (aSettings.TimeSeparator = #32) and (Pos(#32, DateTimeStr) > 0) then\r\n begin\r\n DateStr:=DateTimeStr;\r\n {\r\n Assume a date: dd [mm [yy]].\r\n Really fancy would be counting the number of whitespace occurrences and decide\r\n and split accordingly\r\n }\r\n Exit(1);\r\n end;\r\n p:=1;\r\n //find separator\r\n if (aSettings.DateSeparator<>#32) then\r\n begin\r\n while (p0)) do\r\n Inc(p);\r\n end\r\n else\r\n begin\r\n p:=Pos(aSettings.TimeSeparator, DateTimeStr);\r\n if (p<>0) then\r\n repeat\r\n Dec(p);\r\n until (p=0) or (Pos(DateTimeStr[p],WhiteSpace)>0);\r\n end;\r\n //Always fill DateStr, it eases the algorithm later\r\n if (p=0) then\r\n p:=Length(DateTimeStr);\r\n DateStr:=Copy(DateTimeStr,1,p);\r\n TimeStr:=Trim(Copy(DateTimeStr,p+1,100));\r\n if (Length(TimeStr)<>0) then\r\n Result:=2\r\n else\r\n begin\r\n Result:=1; //found 1 string\r\n // 2 cases when DateTimeStr only contains a time:\r\n // Date/time separator differ, and string contains a timeseparator\r\n // Date/time separators are equal, but transformation to date fails.\r\n if ((aSettings.DateSeparator<>aSettings.TimeSeparator) and (Pos(aSettings.TimeSeparator,DateStr) > 0))\r\n or ((aSettings.DateSeparator=aSettings.TimeSeparator) and (not TryStrToDate(DateStr, DummyDT))) then\r\n begin\r\n TimeStr := DateStr;\r\n DateStr := '';\r\n end;\r\n end;\r\nend;\r\n\r\nfunction StrToDateTime(const S: String): TDateTime;\r\n\r\nbegin\r\n Result:=StrToDateTime(S,FormatSettings);\r\nend;\r\n\r\nfunction StrToDateTime(const S: String; Const aSettings : TFormatSettings): TDateTime;\r\n\r\nvar\r\n TimeStr, DateStr: String;\r\n PartsFound: Integer;\r\nbegin\r\n PartsFound := SplitDateTimeStr(S, DateStr, TimeStr,aSettings);\r\n case PartsFound of\r\n 0: Result:=StrToDate('');\r\n 1: if (Length(DateStr) > 0) then\r\n Result := StrToDate(DateStr,aSettings.ShortDateFormat,aSettings.DateSeparator)\r\n else\r\n Result := StrToTime(TimeStr);\r\n 2: Result := ComposeDateTime(StrTodate(DateStr,aSettings.ShortDateFormat,aSettings.DateSeparator),\r\n StrToTime(TimeStr));\r\n end;\r\nend;\r\n\r\nfunction FormatDateTime(const FormatStr: string; const DateTime: TDateTime): string;\r\n\r\nbegin\r\n Result:=FormatDateTime(FormatStr,DateTime,FormatSettings);\r\nend;\r\n\r\nfunction FormatDateTime(const FormatStr: string; const DateTime: TDateTime; const aSettings : TFormatSettings): string;\r\n\r\n procedure StoreStr(const FormatStr: string; APos,Len: Integer);\r\n begin\r\n// Writeln('StoreStr: ',Result,'+',Copy(FormatStr,APos,Len));\r\n Result:=Result+Copy(FormatStr,APos,Len);\r\n end;\r\n\r\n procedure StoreString(const AStr: string);\r\n\r\n begin\r\n// Writeln('StoreString: ',Result,'+',AStr);\r\n Result:=Result+AStr;\r\n end;\r\n\r\n procedure StoreInt(Value, Digits: Integer);\r\n var\r\n S: string;\r\n\r\n begin\r\n S:=IntToStr(Value);\r\n While (Length(S) 1 then // 0 is original string, 1 is included FormatString\r\n Exit;\r\n FormatCurrent := 1;\r\n FormatEnd := Length(FormatStr);\r\n Clock12 := false;\r\n isInterval := false;\r\n // look for unquoted 12-hour clock token\r\n P:=1;\r\n while P<=FormatEnd do\r\n begin\r\n Token := FormatStr[P];\r\n case Token of\r\n '''', '\"':\r\n begin\r\n Inc(P);\r\n while (P < FormatEnd) and (FormatStr[P]<>Token) do\r\n Inc(P);\r\n end;\r\n 'A', 'a':\r\n begin\r\n if (CompareText(Copy(FormatStr,P,3),'A/P')=0) or\r\n (CompareText(Copy(FormatStr,P,4),'AMPM')=0) or\r\n (CompareText(Copy(FormatStr,P,5),'AM/PM')=0) then\r\n begin\r\n Clock12 := true;\r\n break;\r\n end;\r\n end;\r\n end; // case\r\n Inc(P);\r\n end ;\r\n token := #255;\r\n lastformattoken := ' ';\r\n prevlasttoken := 'H';\r\n while FormatCurrent <= FormatEnd do\r\n begin\r\n Token := UpperCase(FormatStr[FormatCurrent])[1];\r\n // Writeln('Treating token at pos ',FormatCurrent,', : ',Token,' (',FormatStr,')');\r\n Count := 1;\r\n P := FormatCurrent + 1;\r\n case Token of\r\n '''', '\"':\r\n begin\r\n while (P < FormatEnd) and (FormatStr[P]<>Token) do\r\n Inc(P);\r\n Inc(P);\r\n Count := P - FormatCurrent;\r\n StoreStr(FormatStr, FormatCurrent + 1, Count - 2);\r\n end ;\r\n 'A':\r\n begin\r\n if CompareText(Copy(FormatStr,FormatCurrent,4), 'AMPM') = 0 then\r\n begin\r\n Count := 4;\r\n if Hour < 12 then\r\n StoreString(aSettings.TimeAMString)\r\n else\r\n StoreString(aSettings.TimePMString);\r\n end\r\n else if CompareText(Copy(FormatStr,FormatCurrent,5), 'AM/PM') = 0 then\r\n begin\r\n Count := 5;\r\n if Hour < 12 then StoreStr(FormatStr, FormatCurrent, 2)\r\n else StoreStr(FormatStr, FormatCurrent+3, 2);\r\n end\r\n else if CompareText(Copy(FormatStr,FormatCurrent,3), 'A/P') = 0 then\r\n begin\r\n Count := 3;\r\n if Hour < 12 then StoreStr(FormatStr, FormatCurrent, 1)\r\n else StoreStr(FormatStr, FormatCurrent+2, 1);\r\n end\r\n else\r\n raise EConvertError.Create('Illegal character in format string');\r\n end ;\r\n '/':\r\n begin\r\n // Writeln('Detected date separator');\r\n StoreString(aSettings.DateSeparator);\r\n end;\r\n ':': StoreString(aSettings.TimeSeparator);\r\n ' ', 'C', 'D', 'H', 'M', 'N', 'S', 'T', 'Y', 'Z', 'F' :\r\n begin\r\n // Writeln(FormatCurrent,' Special Token: ',Token,', Count: ',Count,', P: ',P);\r\n while (P <= FormatEnd) and (UpperCase(FormatStr[P]) = Token) do\r\n Inc(P);\r\n Count := P - FormatCurrent;\r\n // Writeln(FormatCurrent,' Special Token: ',Token,', Count: ',Count,', P: ',P);\r\n case Token of\r\n ' ': StoreStr(FormatStr, FormatCurrent, Count);\r\n 'Y': begin\r\n if Count > 2 then\r\n StoreInt(Year, 4)\r\n else\r\n StoreInt(Year mod 100, 2);\r\n end;\r\n 'M': begin\r\n\t if isInterval and ((prevlasttoken = 'H') or TimeFlag) then\r\n\t StoreInt(Minute + (Hour + trunc(abs(DateTime))*24)*60, 0)\r\n\t else\r\n if (lastformattoken = 'H') or TimeFlag then\r\n begin\r\n if Count = 1 then\r\n StoreInt(Minute, 0)\r\n else\r\n StoreInt(Minute, 2);\r\n end\r\n else\r\n begin\r\n case Count of\r\n 1: StoreInt(Month, 0);\r\n 2: StoreInt(Month, 2);\r\n 3: StoreString(aSettings.ShortMonthNames[Month]);\r\n else\r\n StoreString(aSettings.LongMonthNames[Month]);\r\n end;\r\n end;\r\n end;\r\n 'D': begin\r\n case Count of\r\n 1: StoreInt(Day, 0);\r\n 2: StoreInt(Day, 2);\r\n 3: StoreString(aSettings.ShortDayNames[DayOfWeek]);\r\n 4: StoreString(aSettings.LongDayNames[DayOfWeek]);\r\n 5: StoreFormat(aSettings.ShortDateFormat, Nesting+1, False);\r\n else\r\n StoreFormat(aSettings.LongDateFormat, Nesting+1, False);\r\n end ;\r\n end ;\r\n 'H':\r\n\t if isInterval then\r\n\t StoreInt(Hour + trunc(abs(DateTime))*24, 0)\r\n\t else\r\n\t if Clock12 then\r\n begin\r\n tmp := hour mod 12;\r\n if tmp=0 then tmp:=12;\r\n if Count = 1 then\r\n StoreInt(tmp, 0)\r\n else\r\n StoreInt(tmp, 2);\r\n end\r\n else begin\r\n if Count = 1 then\r\n\t\t StoreInt(Hour, 0)\r\n else\r\n StoreInt(Hour, 2);\r\n end;\r\n 'N': if isInterval then\r\n\t StoreInt(Minute + (Hour + trunc(abs(DateTime))*24)*60, 0)\r\n\t\t else\r\n\t\t if Count = 1 then\r\n StoreInt(Minute, 0)\r\n else\r\n StoreInt(Minute, 2);\r\n 'S': if isInterval then\r\n\t StoreInt(Second + (Minute + (Hour + trunc(abs(DateTime))*24)*60)*60, 0)\r\n\t else\r\n\t if Count = 1 then\r\n StoreInt(Second, 0)\r\n else\r\n StoreInt(Second, 2);\r\n 'Z': if Count = 1 then\r\n StoreInt(MilliSecond, 0)\r\n else\r\n\t\t StoreInt(MilliSecond, 3);\r\n 'T': if Count = 1 then\r\n\t\t StoreFormat(aSettings.ShortTimeFormat, Nesting+1, True)\r\n else\r\n\t StoreFormat(aSettings.LongTimeFormat, Nesting+1, True);\r\n 'C': begin\r\n StoreFormat(aSettings.ShortDateFormat, Nesting+1, False);\r\n if (Hour<>0) or (Minute<>0) or (Second<>0) then\r\n begin\r\n StoreString(' ');\r\n StoreFormat(aSettings.LongTimeFormat, Nesting+1, True);\r\n end;\r\n end;\r\n 'F': begin\r\n StoreFormat(aSettings.ShortDateFormat, Nesting+1, False);\r\n StoreString(' ');\r\n StoreFormat(aSettings.LongTimeFormat, Nesting+1, True);\r\n end;\r\n end;\r\n\t prevlasttoken := lastformattoken;\r\n lastformattoken := token;\r\n end;\r\n else\r\n StoreString(Token);\r\n end ;\r\n Inc(FormatCurrent, Count);\r\n end;\r\n end;\r\n\r\nbegin\r\n DecodeDateFully(DateTime, Year, Month, Day, DayOfWeek);\r\n DecodeTime(DateTime, Hour, Minute, Second, MilliSecond);\r\n // Writeln(DateTime,'->',Year,',', Month, ',',Day, ',',DayOfWeek,',',Hour, ',',Minute, ',',Second, ',',MilliSecond);\r\n if FormatStr <> '' then\r\n StoreFormat(FormatStr, 0, False)\r\n else\r\n StoreFormat('C', 0, False);\r\nend ;\r\n\r\n\r\nfunction CurrentYear: Word;\r\n\r\nbegin\r\n Result:=TJSDate.New().FullYear;\r\nend;\r\n\r\nfunction TryStrToDate(const S: String; out Value: TDateTime): Boolean;\r\nbegin\r\n Result:=TryStrToDate(S,Value,FormatSettings);\r\nend;\r\n\r\nfunction TryStrToDate(const S: String; out Value: TDateTime; separator : char): Boolean;\r\n\r\nbegin\r\n Result:=TryStrToDate(S,Value,FormatSettings.ShortDateFormat,Separator);\r\nend;\r\n\r\nfunction TryStrToDate(const S: String; out Value: TDateTime; const useformat : string; separator : char): Boolean;\r\n\r\nVar\r\n Msg : String;\r\n\r\nbegin\r\n Result:=Length(S)<>0;\r\n If Result then\r\n begin\r\n Value:=IntStrToDate(Msg,S,useformat,Separator);\r\n Result:=(Msg='');\r\n end;\r\nend;\r\n\r\nfunction TryStrToDate(const S: String; out Value: TDateTime; const aSettings : TFormatSettings): Boolean;\r\n\r\nbegin\r\n Result:=TryStrToDate(S,Value,aSettings.ShortDateFormat,aSettings.DateSeparator);\r\nend;\r\n\r\nfunction TryStrToTime(const S: String; out Value: TDateTime; aSettings : TFormatSettings): Boolean;\r\n\r\nVar\r\n Msg : String;\r\n\r\nbegin\r\n Result:=Length(S)<>0;\r\n If Result then\r\n begin\r\n Value:=IntStrToTime(Msg,S,Length(S),aSettings);\r\n Result:=(Msg='');\r\n end;\r\nend;\r\n\r\nfunction TryStrToTime(const S: String; out Value: TDateTime; separator : char): Boolean;\r\n\r\nVar\r\n Fmt : TFormatSettings;\r\n\r\nbegin\r\n fmt:=TFormatSettings.Create;\r\n fmt.TimeSeparator:=Separator;\r\n Result:=TryStrToTime(S,Value,Fmt);\r\nend;\r\n\r\nfunction TryStrToTime(const S: String; out Value: TDateTime): Boolean;\r\nbegin\r\n result:=TryStrToTime(S,Value,FormatSettings);\r\nend;\r\n\r\nfunction TryStrToDateTime(const S: String; out Value: TDateTime): Boolean;\r\n\r\nbegin\r\n Result:=TryStrToDateTime(S,Value,FormatSettings);\r\nend;\r\n\r\nfunction TryStrToDateTime(const S: String; out Value: TDateTime; Const aSettings : TFormatSettings): Boolean;\r\n\r\nvar\r\n I: integer;\r\n dtdate, dttime :TDateTime;\r\nbegin\r\n result:=false;\r\n I:=Pos(aSettings.TimeSeparator,S);\r\n If (I>0) then\r\n begin\r\n While (I>0) and (S[I]<>' ') do\r\n Dec(I);\r\n If I>0 then\r\n begin\r\n if not TryStrToDate(Copy(S,1,I-1),dtdate, aSettings) then \r\n exit;\r\n if not TryStrToTime(Copy(S,i+1, Length(S)-i),dttime, aSettings) then\r\n exit;\r\n Value:=ComposeDateTime(dtdate,dttime);\r\n result:=true;\r\n end\r\n else\r\n result:=TryStrToTime(s,Value,aSettings);\r\n end\r\n else\r\n result:=TryStrToDate(s,Value,aSettings);\r\nend;\r\n\r\n\r\n\r\nfunction StrToDateDef(const S: String; const Defvalue : TDateTime): TDateTime;\r\nbegin\r\n result := StrToDateDef(S,DefValue,#0);\r\nend;\r\n\r\nfunction StrToDateDef(const S: string; const Defvalue: TDateTime; const aSettings: TFormatSettings): TDateTime;\r\nbegin\r\n if not TryStrToDate(S, Result, aSettings) Then\r\n Result := Defvalue;\r\nend;\r\n\r\nfunction StrToTimeDef(const S: String; const Defvalue : TDateTime): TDateTime;\r\nbegin\r\n result := StrToTimeDef(S,DefValue,#0);\r\nend;\r\n\r\nfunction StrToDateTimeDef(const S: String; const Defvalue : TDateTime; aSettings : TFormatSettings): TDateTime; overload;\r\nbegin\r\n if not TryStrToDateTime(s,Result,aSettings) Then\r\n result:=defvalue;\r\nend;\r\n\r\nfunction StrToDateTimeDef(const S: String; const Defvalue : TDateTime): TDateTime;\r\nbegin\r\n Result:=StrToDateTimeDef(s,DefValue,FormatSettings);\r\nend;\r\n\r\nfunction StrToDateDef(const S: String; const Defvalue : TDateTime; separator : char): TDateTime;\r\nbegin\r\n if not TryStrToDate(s,Result, separator) Then\r\n result:=defvalue;\r\nend;\r\n\r\nfunction StrToTimeDef(const S: String; const Defvalue : TDateTime; separator : char): TDateTime;\r\nbegin\r\n if not TryStrToTime(s,Result, separator) Then\r\n result:=defvalue;\r\nend;\r\n\r\nfunction StrToTimeDef(const AString: string; const ADefault: TDateTime;\r\n const aSettings: TFormatSettings): TDateTime;\r\nbegin\r\n if not TryStrToTime(AString, Result, aSettings) Then\r\n Result := ADefault;\r\nend;\r\n\r\nprocedure ReplaceTime(var dati:TDateTime; NewTime : TDateTime);\r\nbegin\r\n dati:= ComposeDateTime(dati, newtime);\r\nend;\r\n\r\nprocedure ReplaceDate(var DateTime: TDateTime; const NewDate: TDateTime);\r\nvar\r\n tmp : TDateTime;\r\nbegin\r\n tmp:=NewDate;\r\n ReplaceTime(tmp,DateTime);\r\n DateTime:=tmp;\r\nend;\r\n\r\nfunction FloatToDateTime(const Value: Extended): TDateTime;\r\nbegin\r\n If (ValueMaxDateTime) then\r\n Raise EConvertError.CreateFmt (SInvalidDateTime,[FloatToStr(Value)]);\r\n Result:=Value;\r\nend;\r\n\r\nfunction FloattoCurr(const Value: Extended): Currency;\r\nbegin\r\n if not TryFloatToCurr(Value, Result) then\r\n Raise EConvertError.CreateFmt(SInvalidCurrency, [FloatToStr(Value)]);\r\nend;\r\n\r\nfunction TryFloatToCurr(const Value: Extended; var AResult: Currency): Boolean;\r\nbegin\r\n Result:=(Value>=MinCurrency) and (Value<=MaxCurrency);\r\n if Result then\r\n AResult := Value;\r\nend;\r\n\r\nfunction CurrToStr(Value: Currency): string;\r\nbegin\r\n Result:=FloatToStrF(Value,ffGeneral,-1,0,FormatSettings);\r\nend;\r\n\r\n\r\nfunction CurrToStr(Value: Currency; const aSettings: TFormatSettings): string;\r\nbegin\r\n Result:=FloatToStrF(Value,ffGeneral,-1,0,aSettings);\r\nend;\r\n\r\n\r\nfunction StrToCurr(const S: string): Currency;\r\n\r\nbegin\r\n if not TryStrToCurr(S,Result) then\r\n Raise EConvertError.createfmt(SInvalidCurrency,[S]);\r\nend;\r\n\r\nfunction StrToCurr(const S: string; const aSettings: TFormatSettings): Currency;\r\nbegin\r\n if not TryStrToCurr(S,Result,aSettings) then\r\n Raise EConvertError.createfmt(SInvalidCurrency,[S]);\r\nend;\r\n\r\nfunction TryStrToCurr(const S: string; out Value: Currency): Boolean;\r\n\r\nVar\r\n D : Double;\r\n\r\nbegin\r\n Result:=TryStrToFloat(S,D,FormatSettings);\r\n if Result then\r\n Value:=D;\r\nend;\r\n\r\n\r\nfunction TryStrToCurr(const S: string; out Value: Currency; const aSettings: TFormatSettings): Boolean;\r\nVar\r\n D : Double;\r\n\r\nbegin\r\n Result:=TryStrToFloat(S,D,aSettings);\r\n if Result then\r\n Value:=D;\r\nend;\r\n\r\n\r\nfunction StrToCurrDef(const S: string; Default: Currency): Currency;\r\n\r\nVar\r\n R : Currency;\r\n\r\nbegin\r\n if TryStrToCurr(S,R,FormatSettings) then\r\n Result:=R\r\n else\r\n Result:=Default;\r\nend;\r\n\r\n\r\nfunction StrToCurrDef(const S: string; Default: Currency; const aSettings: TFormatSettings): Currency;\r\nVar\r\n R : Currency;\r\n\r\nbegin\r\n if TryStrToCurr(S,R,aSettings) then\r\n Result:=R\r\n else\r\n Result:=Default;\r\nend;\r\n\r\n\r\n{ ---------------------------------------------------------------------\r\n Interface related\r\n ---------------------------------------------------------------------}\r\nfunction Supports(const Instance: IInterface; const AClass: TClass; out Obj\r\n ): Boolean;\r\nbegin\r\n Result := (Instance<>nil) and (Instance.QueryInterface(IObjectInstance,Obj)=S_OK)\r\n and (TObject(Obj).InheritsFrom(AClass));\r\nend;\r\n\r\nfunction Supports(const Instance: IInterface; const IID: TGuid; out Intf\r\n ): Boolean;\r\nbegin\r\n Result:=(Instance<>nil) and (Instance.QueryInterface(IID,Intf)=S_OK);\r\nend;\r\n\r\nfunction Supports(const Instance: TObject; const IID: TGuid; out Intf): Boolean;\r\nbegin\r\n Result:=(Instance<>nil) and Instance.GetInterface(IID,Intf);\r\nend;\r\n\r\nfunction Supports(const Instance: TObject; const IID: TGuidString; out Intf\r\n ): Boolean;\r\nbegin\r\n Result:=(Instance<>nil) and Instance.GetInterfaceByStr(IID,Intf);\r\nend;\r\n\r\nfunction Supports(const Instance: IInterface; const AClass: TClass): Boolean;\r\nvar\r\n Temp: TObject;\r\nbegin\r\n Result:=Supports(Instance,AClass,Temp);\r\nend;\r\n\r\nfunction Supports(const Instance: IInterface; const IID: TGuid): Boolean;\r\nvar\r\n Temp: IInterface;\r\nbegin\r\n Result:=Supports(Instance,IID,Temp);\r\nend;\r\n\r\nfunction Supports(const Instance: TObject; const IID: TGuid): Boolean;\r\nvar\r\n Temp: TJSObject;\r\nbegin\r\n Result:=Supports(Instance,IID,Temp);\r\n asm\r\n if (Temp && Temp.$kind==='com') Temp._Release();\r\n end;\r\nend;\r\n\r\nfunction Supports(const Instance: TObject; const IID: TGuidString): Boolean;\r\nvar\r\n Temp: TJSObject;\r\nbegin\r\n Result:=Supports(Instance,IID,Temp);\r\n asm\r\n if (Temp && Temp.$kind==='com') Temp._Release();\r\n end;\r\nend;\r\n\r\nfunction Supports(const AClass: TClass; const IID: TGuid): Boolean;\r\nvar\r\n maps: JSValue;\r\nbegin\r\n if AClass=nil then exit(false);\r\n maps := TJSObject(AClass)['$intfmaps'];\r\n if not maps then exit(false);\r\n if TJSObject(maps)[GUIDToString(IID)] then exit(true);\r\n Result:=false;\r\nend;\r\n\r\nfunction Supports(const AClass: TClass; const IID: TGuidString): Boolean;\r\nvar\r\n maps: JSValue;\r\nbegin\r\n if AClass=nil then exit(false);\r\n maps := TJSObject(AClass)['$intfmaps'];\r\n if not maps then exit(false);\r\n if TJSObject(maps)[uppercase(IID)] then exit(true);\r\n Result:=false;\r\nend;\r\n\r\nfunction TryStringToGUID(const s: string; out Guid: TGuid): Boolean;\r\nvar\r\n re: TJSRegexp;\r\nbegin\r\n if Length(s)<>38 then Exit(False);\r\n re:=TJSRegexp.new('^\\{[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}\\}$');\r\n Result:=re.test(s);\r\n if not Result then\r\n begin\r\n Guid.D1:=0;\r\n exit;\r\n end;\r\n asm\r\n rtl.strToGUIDR(s,Guid);\r\n end;\r\n Result:=true;\r\nend;\r\n\r\nfunction StringToGUID(const S: string): TGuid;\r\nbegin\r\n if not TryStringToGUID(S, Result) then\r\n raise EConvertError.CreateFmt(SInvalidGUID, [S]);\r\nend;\r\n\r\nfunction GUIDToString(const guid: TGuid): string;\r\nbegin\r\n Result:=System.GUIDToString(guid);\r\nend;\r\n\r\nfunction IsEqualGUID(const guid1, guid2: TGuid): Boolean;\r\nvar\r\n i: integer;\r\nbegin\r\n if (guid1.D1<>guid2.D1) or (guid1.D2<>guid2.D2) or (guid1.D3<>guid2.D3) then\r\n exit(false);\r\n for i:=0 to 7 do if guid1.D4[i]<>guid2.D4[i] then exit(false);\r\n Result:=true;\r\nend;\r\n\r\nfunction GuidCase(const guid: TGuid; const List: array of TGuid): Integer;\r\nbegin\r\n for Result := High(List) downto 0 do\r\n if IsEqualGUID(guid, List[Result]) then\r\n Exit;\r\n Result := -1;\r\nend;\r\n\r\nfunction CreateGUID(out GUID: TGUID): Integer;\r\n\r\n Function R(B: Integer) : NativeInt;\r\n\r\n Var\r\n v : NativeInt;\r\n begin\r\n v:=Random(256);\r\n While B>1 do\r\n begin\r\n v:=v*256+Random(256);\r\n Dec(B);\r\n end;\r\n Result:=V;\r\n end;\r\n\r\nVar\r\n I : Integer;\r\n\r\nbegin\r\n Result:=0;\r\n GUID.D1:= R(4);\r\n GUID.D2:= R(2);\r\n GUID.D3:= R(2);\r\n For I:=0 to 7 do\r\n GUID.D4[I]:=R(1);\r\nend;\r\n\r\n{ ---------------------------------------------------------------------\r\n Integer/Ordinal related\r\n ---------------------------------------------------------------------}\r\n\r\nfunction TryStrToInt(const S: String; out res: Integer): Boolean;\r\nbegin\r\n Result:=TryStrToInt(S,res, FormatSettings);\r\nend;\r\n\r\nFunction TryStrToInt(const S : String; Out res: Integer; Const aSettings : TFormatSettings): Boolean;\r\nVar\r\n NI : NativeInt;\r\nbegin\r\n Result:=TryStrToInt(S,NI, aSettings);\r\n Result:=Result and (-2147483648<=NI) and (NI<=2147483647);\r\n if Result then\r\n res:=NI;\r\nend;\r\n\r\nfunction IntTryStrToInt(const S: String; out res: NativeInt; Const aSep : string): Boolean;\r\n\r\nVar\r\n Radix : Integer = 10;\r\n N : String;\r\n J : JSValue;\r\n\r\nbegin\r\n N:=S;\r\n // Javascript Parseint allows 1.0 or 1E0 to be an integer, so we must check for this to get the same behaviour as FPC/Delphi.\r\n if (Pos(aSep,N)<>0) or (Pos('.',N)<>0) or (Pos(':',N)<>0) or (Pos('-', N) > 1) then\r\n exit(False);\r\n case Copy(N,1,1) of\r\n '$': Radix:=16;\r\n '&': Radix:=8;\r\n '%': Radix:=2;\r\n end;\r\n // Check for E after we know radix\r\n if (Radix<>16) and (Pos('e',LowerCase(N))<>0) then\r\n exit(False);\r\n If Radix<>10 then\r\n Delete(N,1,1);\r\n\r\n J:=parseInt(N,Radix);\r\n Result:=Not jsIsNan(j);\r\n if Result then\r\n res:=NativeInt(J);\r\nend;\r\n\r\nfunction TryStrToInt(const S: String; out res: NativeInt): Boolean;\r\n\r\nbegin\r\n Result:=IntTryStrToInt(S,res,FormatSettings.DecimalSeparator);\r\nend;\r\n\r\nfunction TryStrToInt(const S: String; out res: NativeInt; Const aSettings : TFormatSettings): Boolean;\r\n\r\nbegin\r\n Result:=IntTryStrToInt(S,res,aSettings.DecimalSeparator);\r\nend;\r\n\r\nfunction StrToIntDef(const S: String; const aDef: Integer): Integer;\r\n\r\nVar\r\n R : NativeInt;\r\n\r\nbegin\r\n if TryStrToInt(S,R) then\r\n Result:=R\r\n else\r\n Result:=aDef;\r\nend;\r\n\r\nfunction StrToIntDef(const S: String; const aDef: NativeInt): NativeInt;\r\n\r\nVar\r\n R : NativeInt;\r\n\r\nbegin\r\n if TryStrToInt(S,R) then\r\n Result:=R\r\n else\r\n Result:=aDef;\r\nend;\r\n\r\nfunction StrToInt(const S: String): Integer;\r\n\r\nVar\r\n R : NativeInt;\r\n\r\nbegin\r\n if not TryStrToInt(S,R) then\r\n Raise EConvertError.CreateFmt(SErrInvalidInteger,[S]);\r\n Result:=R;\r\nend;\r\n\r\nfunction StrToNativeInt(const S: String): NativeInt;\r\n\r\nbegin\r\n if not TryStrToInt(S,Result) then\r\n Raise EConvertError.CreateFmt(SErrInvalidInteger,[S]);\r\nend;\r\n\r\nfunction StrToUInt(const s: string): Cardinal;\r\n\r\nbegin\r\n If not TryStrToUint(S,Result) then\r\n Raise EConvertError.CreateFmt(SErrInvalidInteger,[S])\r\nend;\r\n\r\nfunction StrToUIntDef(const s: string; aDef : Cardinal): Cardinal;\r\n\r\nbegin\r\n If not TryStrToUint(S,Result) then\r\n Result:=aDef;\r\nend;\r\n\r\nfunction UIntToStr(Value: Cardinal): string; \r\n\r\nbegin\r\n Result:=IntToStr(Value);\r\nend;\r\n\r\nfunction TryStrToUInt(const s: string; out C: Cardinal): Boolean;\r\nVar\r\n N : NativeInt;\r\nbegin\r\n Result:=TryStrToInt(S,N);\r\n Result:=(N>=0) and (N<=high(longword));\r\n If Result then \r\n C:=N;\r\nend;\r\n\r\nfunction StrToInt64(const S: String): NativeLargeInt;\r\n\r\nVar\r\n N : NativeInt;\r\n\r\nbegin\r\n if not TryStrToInt(S,N) then\r\n Raise EConvertError.CreateFmt(SErrInvalidInteger,[S]);\r\n Result:=N;\r\nend;\r\n\r\nfunction TryStrToInt64(const S: String; out res: NativeLargeInt): Boolean;\r\nbegin\r\n Result := TryStrToInt64(S, res, FormatSettings);\r\nend;\r\n\r\nfunction TryStrToInt64(const S : String; Out res : NativeLargeInt; const ASettings: TFormatSettings): Boolean;\r\nVar\r\n R: nativeint;\r\nbegin\r\n Result := TryStrToInt(S, R, ASettings);\r\n If Result then\r\n Res := R;\r\nend;\r\n\r\nfunction StrToInt64Def(const S: String; ADefault: NativeLargeInt\r\n ): NativeLargeInt;\r\n\r\n\r\nbegin\r\n if not TryStrToInt64(S,Result) then\r\n Result:=ADefault;\r\nend;\r\n\r\nfunction StrToQWord(const S: String): NativeLargeUInt;\r\n\r\nVar\r\n N : NativeInt;\r\n\r\nbegin\r\n if (not TryStrToInt(S,N)) or (N<0) then\r\n Raise EConvertError.CreateFmt(SErrInvalidInteger,[S]);\r\n Result:=N;\r\nend;\r\n\r\nfunction TryStrToQWord(const S: String; out res: NativeLargeUInt): Boolean;\r\n\r\nVar\r\n R : nativeint;\r\n\r\nbegin\r\n Result:=TryStrToInt(S,R) and (R>=0);\r\n If Result then\r\n Res:=R;\r\nend;\r\n\r\nfunction TryStrToQWord(const S: String; out res: QWord): Boolean;\r\nbegin\r\n Result:=TryStrToQWord(S,NativeLargeUInt(res));\r\nend;\r\n\r\nfunction StrToQWordDef(const S: String; ADefault: NativeLargeUInt\r\n ): NativeLargeUInt;\r\n\r\nbegin\r\n if Not TryStrToQword(S,Result) then\r\n Result:=ADefault;\r\nend;\r\n\r\nfunction StrToUInt64(const S: String): NativeLargeUInt;\r\n\r\nVar\r\n N : NativeInt;\r\n\r\nbegin\r\n if (not TryStrToInt(S,N)) or (N<0) then\r\n Raise EConvertError.CreateFmt(SErrInvalidInteger,[S]);\r\n Result:=N;\r\nend;\r\n\r\nfunction TryStrToUInt64(const S: String; out res: NativeLargeUInt): Boolean;\r\n\r\nVar\r\n R : nativeint;\r\n\r\nbegin\r\n Result:=TryStrToInt(S,R) and (R>=0);\r\n If Result then\r\n Res:=R;\r\nend;\r\n\r\nfunction TryStrToUInt64(const S: String; out res: UInt64): Boolean;\r\nbegin\r\n Result:=TryStrToUInt64(S,NativeLargeUInt(res));\r\nend;\r\n\r\nfunction StrToUInt64Def(const S: String; ADefault: NativeLargeUInt\r\n ): NativeLargeUInt;\r\n\r\n\r\nbegin\r\n if Not TryStrToUInt64(S,Result) then\r\n Result:=ADefault;\r\nend;\r\n\r\nfunction TryStrToDWord(const S: String; out res: DWord): Boolean;\r\n\r\nVar\r\n R : nativeint;\r\n\r\nbegin\r\n Result:=TryStrToInt(S,R) and (R>=0) and (R<=DWord($FFFFFFFF));\r\n If Result then\r\n Res:=R;\r\nend;\r\n\r\nfunction StrToDWord(const S: String): DWord;\r\n\r\nbegin\r\n if not TryStrToDWord(S,Result) then\r\n Raise EConvertError.CreateFmt(SErrInvalidInteger,[S]);\r\nend;\r\n\r\n\r\nfunction StrToDWordDef(const S: String; ADefault: DWord): DWord;\r\n\r\nbegin\r\n if Not TryStrToDWord(S,Result) then\r\n Result:=ADefault;\r\nend;\r\n\r\n\r\nfunction IntToHex(Value: NativeInt; Digits: integer): string;\r\n\r\nbegin\r\n// Result:=HexStr(Value,Digits); // TestNegLongintHelper Failed: \"ToHexString\" expected: but was: <00-20000> !\r\n Result:='';\r\n if Value<0 then\r\n asm\r\n if (Value<0) Value = 0xFFFFFFFF + Value + 1;\r\n end;\r\n asm\r\n Result=Value.toString(16);\r\n end;\r\n Result:=UpperCase(Result);\r\n while (Length(Result)= 0 then\r\n Result.DateSeparator := cDateSeps[lCount];\r\n end;\r\n\r\n asm\r\n var lEvent = new Date('Jan 1, 1980 06:07:08 GMT+00:00');\r\n var lLoc = \"\";\r\n if (ALocale == \"\")\r\n lLoc = navigator.language;\r\n else\r\n lLoc = ALocale;\r\n lTimeStr = lEvent.toLocaleTimeString(lLoc);\r\n end;\r\n\r\n for lCount := Low(cTimeSeps) to High(cTimeSeps) do\r\n begin\r\n if lTimeStr.IndexOf(cTimeSeps[lCount]) >= 0 then\r\n Result.TimeSeparator := cTimeSeps[lCount];\r\n end;\r\n\r\n for lCount := Low(Result.ShortDayNames) to High(Result.ShortDayNames) do\r\n Result.ShortDayNames[lCount] := GetLocaleShortDayName(lCount, ALocale);\r\n for lCount := Low(Result.LongDayNames) to High(Result.LongDayNames) do\r\n Result.LongDayNames[lCount] := GetLocaleLongDayName(lCount, ALocale);\r\n\r\n for lCount := Low(Result.ShortMonthNames) to High(Result.ShortMonthNames) do\r\n Result.ShortMonthNames[lCount] := GetLocaleShortMonthName(lCount, ALocale);\r\n for lCount := Low(Result.LongMonthNames) to High(Result.LongMonthNames) do\r\n Result.LongMonthNames[lCount] := GetLocaleLongMonthName(lCount, ALocale);\r\n\r\n Result.DecimalSeparator := GetLocaleDecimalSeparator(ALocale);\r\n\r\n for lCount := Low(cDecSeps) to High(cDecSeps) do\r\n begin\r\n if Result.DecimalSeparator = cDecSeps[lCount] then\r\n begin\r\n Result.ThousandSeparator := cThousandSeps[lCount];\r\n Break;\r\n end;\r\n end;\r\n\r\n if Assigned(TFormatSettings.InitLocaleHandler) then\r\n TFormatSettings.InitLocaleHandler(UpperCase(aLocale),Result);\r\nend;\r\n\r\nclass function TFormatSettings.GetBrowserLocale: string;\r\nasm\r\n return navigator.language;\r\nend;\r\n\r\nclass function TFormatSettings.GetLocaleDecimalSeparator(const ALocale: string): string; assembler;\r\nasm\r\n var lNumber = 1.1;\r\n lNumber = lNumber.toLocaleString(ALocale).substring(1, 2);\r\n return lNumber;\r\nend;\r\n\r\nclass function TFormatSettings.GetLocaleLongDayName(const ADayOfWeek: Integer; const ALocale: string): string; assembler;\r\nasm\r\n var lBaseDate = new Date(2017, 0, 1); // Sunday\r\n lBaseDate.setDate(lBaseDate.getDate() + ADayOfWeek - 1);\r\n return lBaseDate.toLocaleDateString(ALocale, { weekday: 'long' });\r\nend;\r\n\r\nclass function TFormatSettings.GetLocaleLongMonthName(const AMonth: Integer; const ALocale: string): string; assembler;\r\nasm\r\n var lBaseDate = new Date(2017, AMonth - 1, 1);\r\n return lBaseDate.toLocaleDateString(ALocale, { month: 'long' });\r\nend;\r\n\r\nclass function TFormatSettings.GetLocaleLongTimeFormat(ALocale: string): string;\r\nbegin\r\n Result := 'hh:nn:ss';\r\n\r\n if Uppercase(ALocale) = 'EN-US' then\r\n Result := 'hh:nn:ss AMPM';\r\nend;\r\n\r\nclass function TFormatSettings.GetLocaleShortDateFormat(ALocale: string): string;\r\nconst\r\n cDeli = '-';\r\n cShortLength = 2;\r\nvar\r\n lIndex: Integer;\r\n res: string;\r\nbegin\r\n res := string.Empty;\r\n\r\n ALocale := ALocale.ToLower;\r\n\r\n lIndex := ALocale.IndexOf(cDeli);\r\n\r\n if lIndex >= 0 then\r\n // ensure the first part is lowercase, second part is uppercase\r\n ALocale := ALocale.SubString(0, lIndex) + ALocale.SubString(lIndex).ToUpper\r\n else\r\n begin\r\n // when the locale is the main locale specifier only without country\r\n if ALocale.Length = cShortLength then\r\n ALocale := ALocale + cDeli + ALocale.ToUpper;\r\n end;\r\n\r\n asm\r\n var lFormats = {\r\n \"ar-SA\" : \"dd/MM/yy\",\r\n \"bg-BG\" : \"dd.M.yyyy\",\r\n \"ca-ES\" : \"dd/MM/yyyy\",\r\n \"zh-TW\" : \"yyyy/M/d\",\r\n \"cs-CZ\" : \"d.M.yyyy\",\r\n \"da-DK\" : \"dd-MM-yyyy\",\r\n \"de-DE\" : \"dd.MM.yyyy\",\r\n \"el-GR\" : \"d/M/yyyy\",\r\n \"en-US\" : \"M/d/yyyy\",\r\n \"fi-FI\" : \"d.M.yyyy\",\r\n \"fr-FR\" : \"dd/MM/yyyy\",\r\n \"he-IL\" : \"dd/MM/yyyy\",\r\n \"hu-HU\" : \"yyyy. MM. dd.\",\r\n \"is-IS\" : \"d.M.yyyy\",\r\n \"it-IT\" : \"dd/MM/yyyy\",\r\n \"ja-JP\" : \"yyyy/MM/dd\",\r\n \"ko-KR\" : \"yyyy-MM-dd\",\r\n \"nl-NL\" : \"d-M-yyyy\",\r\n \"nb-NO\" : \"dd.MM.yyyy\",\r\n \"pl-PL\" : \"yyyy-MM-dd\",\r\n \"pt-BR\" : \"d/M/yyyy\",\r\n \"ro-RO\" : \"dd.MM.yyyy\",\r\n \"ru-RU\" : \"dd.MM.yyyy\",\r\n \"hr-HR\" : \"d.M.yyyy\",\r\n \"sk-SK\" : \"d. M. yyyy\",\r\n \"sq-AL\" : \"yyyy-MM-dd\",\r\n \"sv-SE\" : \"yyyy-MM-dd\",\r\n \"th-TH\" : \"d/M/yyyy\",\r\n \"tr-TR\" : \"dd.MM.yyyy\",\r\n \"ur-PK\" : \"dd/MM/yyyy\",\r\n \"id-ID\" : \"dd/MM/yyyy\",\r\n \"uk-UA\" : \"dd.MM.yyyy\",\r\n \"be-BY\" : \"dd.MM.yyyy\",\r\n \"sl-SI\" : \"d.M.yyyy\",\r\n \"et-EE\" : \"d.MM.yyyy\",\r\n \"lv-LV\" : \"yyyy.MM.dd.\",\r\n \"lt-LT\" : \"yyyy.MM.dd\",\r\n \"fa-IR\" : \"MM/dd/yyyy\",\r\n \"vi-VN\" : \"dd/MM/yyyy\",\r\n \"hy-AM\" : \"dd.MM.yyyy\",\r\n \"az-Latn-AZ\" : \"dd.MM.yyyy\",\r\n \"eu-ES\" : \"yyyy/MM/dd\",\r\n \"mk-MK\" : \"dd.MM.yyyy\",\r\n \"af-ZA\" : \"yyyy/MM/dd\",\r\n \"ka-GE\" : \"dd.MM.yyyy\",\r\n \"fo-FO\" : \"dd-MM-yyyy\",\r\n \"hi-IN\" : \"dd-MM-yyyy\",\r\n \"ms-MY\" : \"dd/MM/yyyy\",\r\n \"kk-KZ\" : \"dd.MM.yyyy\",\r\n \"ky-KG\" : \"dd.MM.yy\",\r\n \"sw-KE\" : \"M/d/yyyy\",\r\n \"uz-Latn-UZ\" : \"dd/MM yyyy\",\r\n \"tt-RU\" : \"dd.MM.yyyy\",\r\n \"pa-IN\" : \"dd-MM-yy\",\r\n \"gu-IN\" : \"dd-MM-yy\",\r\n \"ta-IN\" : \"dd-MM-yyyy\",\r\n \"te-IN\" : \"dd-MM-yy\",\r\n \"kn-IN\" : \"dd-MM-yy\",\r\n \"mr-IN\" : \"dd-MM-yyyy\",\r\n \"sa-IN\" : \"dd-MM-yyyy\",\r\n \"mn-MN\" : \"yy.MM.dd\",\r\n \"gl-ES\" : \"dd/MM/yy\",\r\n \"kok-IN\" : \"dd-MM-yyyy\",\r\n \"syr-SY\" : \"dd/MM/yyyy\",\r\n \"dv-MV\" : \"dd/MM/yy\",\r\n \"ar-IQ\" : \"dd/MM/yyyy\",\r\n \"zh-CN\" : \"yyyy/M/d\",\r\n \"de-CH\" : \"dd.MM.yyyy\",\r\n \"en-GB\" : \"dd/MM/yyyy\",\r\n \"es-MX\" : \"dd/MM/yyyy\",\r\n \"fr-BE\" : \"d/MM/yyyy\",\r\n \"it-CH\" : \"dd.MM.yyyy\",\r\n \"nl-BE\" : \"d/MM/yyyy\",\r\n \"nn-NO\" : \"dd.MM.yyyy\",\r\n \"pt-PT\" : \"dd-MM-yyyy\",\r\n \"sr-Latn-CS\" : \"d.M.yyyy\",\r\n \"sv-FI\" : \"d.M.yyyy\",\r\n \"az-Cyrl-AZ\" : \"dd.MM.yyyy\",\r\n \"ms-BN\" : \"dd/MM/yyyy\",\r\n \"uz-Cyrl-UZ\" : \"dd.MM.yyyy\",\r\n \"ar-EG\" : \"dd/MM/yyyy\",\r\n \"zh-HK\" : \"d/M/yyyy\",\r\n \"de-AT\" : \"dd.MM.yyyy\",\r\n \"en-AU\" : \"d/MM/yyyy\",\r\n \"es-ES\" : \"dd/MM/yyyy\",\r\n \"fr-CA\" : \"yyyy-MM-dd\",\r\n \"sr-Cyrl-CS\" : \"d.M.yyyy\",\r\n \"ar-LY\" : \"dd/MM/yyyy\",\r\n \"zh-SG\" : \"d/M/yyyy\",\r\n \"de-LU\" : \"dd.MM.yyyy\",\r\n \"en-CA\" : \"dd/MM/yyyy\",\r\n \"es-GT\" : \"dd/MM/yyyy\",\r\n \"fr-CH\" : \"dd.MM.yyyy\",\r\n \"ar-DZ\" : \"dd-MM-yyyy\",\r\n \"zh-MO\" : \"d/M/yyyy\",\r\n \"de-LI\" : \"dd.MM.yyyy\",\r\n \"en-NZ\" : \"d/MM/yyyy\",\r\n \"es-CR\" : \"dd/MM/yyyy\",\r\n \"fr-LU\" : \"dd/MM/yyyy\",\r\n \"ar-MA\" : \"dd-MM-yyyy\",\r\n \"en-IE\" : \"dd/MM/yyyy\",\r\n \"es-PA\" : \"MM/dd/yyyy\",\r\n \"fr-MC\" : \"dd/MM/yyyy\",\r\n \"ar-TN\" : \"dd-MM-yyyy\",\r\n \"en-ZA\" : \"yyyy/MM/dd\",\r\n \"es-DO\" : \"dd/MM/yyyy\",\r\n \"ar-OM\" : \"dd/MM/yyyy\",\r\n \"en-JM\" : \"dd/MM/yyyy\",\r\n \"es-VE\" : \"dd/MM/yyyy\",\r\n \"ar-YE\" : \"dd/MM/yyyy\",\r\n \"en-029\" : \"MM/dd/yyyy\",\r\n \"es-CO\" : \"dd/MM/yyyy\",\r\n \"ar-SY\" : \"dd/MM/yyyy\",\r\n \"en-BZ\" : \"dd/MM/yyyy\",\r\n \"es-PE\" : \"dd/MM/yyyy\",\r\n \"ar-JO\" : \"dd/MM/yyyy\",\r\n \"en-TT\" : \"dd/MM/yyyy\",\r\n \"es-AR\" : \"dd/MM/yyyy\",\r\n \"ar-LB\" : \"dd/MM/yyyy\",\r\n \"en-ZW\" : \"M/d/yyyy\",\r\n \"es-EC\" : \"dd/MM/yyyy\",\r\n \"ar-KW\" : \"dd/MM/yyyy\",\r\n \"en-PH\" : \"M/d/yyyy\",\r\n \"es-CL\" : \"dd-MM-yyyy\",\r\n \"ar-AE\" : \"dd/MM/yyyy\",\r\n \"es-UY\" : \"dd/MM/yyyy\",\r\n \"ar-BH\" : \"dd/MM/yyyy\",\r\n \"es-PY\" : \"dd/MM/yyyy\",\r\n \"ar-QA\" : \"dd/MM/yyyy\",\r\n \"es-BO\" : \"dd/MM/yyyy\",\r\n \"es-SV\" : \"dd/MM/yyyy\",\r\n \"es-HN\" : \"dd/MM/yyyy\",\r\n \"es-NI\" : \"dd/MM/yyyy\",\r\n \"es-PR\" : \"dd/MM/yyyy\",\r\n \"am-ET\" : \"d/M/yyyy\",\r\n \"tzm-Latn-DZ\" : \"dd-MM-yyyy\",\r\n \"iu-Latn-CA\" : \"d/MM/yyyy\",\r\n \"sma-NO\" : \"dd.MM.yyyy\",\r\n \"mn-Mong-CN\" : \"yyyy/M/d\",\r\n \"gd-GB\" : \"dd/MM/yyyy\",\r\n \"en-MY\" : \"d/M/yyyy\",\r\n \"prs-AF\" : \"dd/MM/yy\",\r\n \"bn-BD\" : \"dd-MM-yy\",\r\n \"wo-SN\" : \"dd/MM/yyyy\",\r\n \"rw-RW\" : \"M/d/yyyy\",\r\n \"qut-GT\" : \"dd/MM/yyyy\",\r\n \"sah-RU\" : \"MM.dd.yyyy\",\r\n \"gsw-FR\" : \"dd/MM/yyyy\",\r\n \"co-FR\" : \"dd/MM/yyyy\",\r\n \"oc-FR\" : \"dd/MM/yyyy\",\r\n \"mi-NZ\" : \"dd/MM/yyyy\",\r\n \"ga-IE\" : \"dd/MM/yyyy\",\r\n \"se-SE\" : \"yyyy-MM-dd\",\r\n \"br-FR\" : \"dd/MM/yyyy\",\r\n \"smn-FI\" : \"d.M.yyyy\",\r\n \"moh-CA\" : \"M/d/yyyy\",\r\n \"arn-CL\" : \"dd-MM-yyyy\",\r\n \"ii-CN\" : \"yyyy/M/d\",\r\n \"dsb-DE\" : \"d. M. yyyy\",\r\n \"ig-NG\" : \"d/M/yyyy\",\r\n \"kl-GL\" : \"dd-MM-yyyy\",\r\n \"lb-LU\" : \"dd/MM/yyyy\",\r\n \"ba-RU\" : \"dd.MM.yy\",\r\n \"nso-ZA\" : \"yyyy/MM/dd\",\r\n \"quz-BO\" : \"dd/MM/yyyy\",\r\n \"yo-NG\" : \"d/M/yyyy\",\r\n \"ha-Latn-NG\" : \"d/M/yyyy\",\r\n \"fil-PH\" : \"M/d/yyyy\",\r\n \"ps-AF\" : \"dd/MM/yy\",\r\n \"fy-NL\" : \"d-M-yyyy\",\r\n \"ne-NP\" : \"M/d/yyyy\",\r\n \"se-NO\" : \"dd.MM.yyyy\",\r\n \"iu-Cans-CA\" : \"d/M/yyyy\",\r\n \"sr-Latn-RS\" : \"d.M.yyyy\",\r\n \"si-LK\" : \"yyyy-MM-dd\",\r\n \"sr-Cyrl-RS\" : \"d.M.yyyy\",\r\n \"lo-LA\" : \"dd/MM/yyyy\",\r\n \"km-KH\" : \"yyyy-MM-dd\",\r\n \"cy-GB\" : \"dd/MM/yyyy\",\r\n \"bo-CN\" : \"yyyy/M/d\",\r\n \"sms-FI\" : \"d.M.yyyy\",\r\n \"as-IN\" : \"dd-MM-yyyy\",\r\n \"ml-IN\" : \"dd-MM-yy\",\r\n \"en-IN\" : \"dd-MM-yyyy\",\r\n \"or-IN\" : \"dd-MM-yy\",\r\n \"bn-IN\" : \"dd-MM-yy\",\r\n \"tk-TM\" : \"dd.MM.yy\",\r\n \"bs-Latn-BA\" : \"d.M.yyyy\",\r\n \"mt-MT\" : \"dd/MM/yyyy\",\r\n \"sr-Cyrl-ME\" : \"d.M.yyyy\",\r\n \"se-FI\" : \"d.M.yyyy\",\r\n \"zu-ZA\" : \"yyyy/MM/dd\",\r\n \"xh-ZA\" : \"yyyy/MM/dd\",\r\n \"tn-ZA\" : \"yyyy/MM/dd\",\r\n \"hsb-DE\" : \"d. M. yyyy\",\r\n \"bs-Cyrl-BA\" : \"d.M.yyyy\",\r\n \"tg-Cyrl-TJ\" : \"dd.MM.yy\",\r\n \"sr-Latn-BA\" : \"d.M.yyyy\",\r\n \"smj-NO\" : \"dd.MM.yyyy\",\r\n \"rm-CH\" : \"dd/MM/yyyy\",\r\n \"smj-SE\" : \"yyyy-MM-dd\",\r\n \"quz-EC\" : \"dd/MM/yyyy\",\r\n \"quz-PE\" : \"dd/MM/yyyy\",\r\n \"hr-BA\" : \"d.M.yyyy.\",\r\n \"sr-Latn-ME\" : \"d.M.yyyy\",\r\n \"sma-SE\" : \"yyyy-MM-dd\",\r\n \"en-SG\" : \"d/M/yyyy\",\r\n \"ug-CN\" : \"yyyy-M-d\",\r\n \"sr-Cyrl-BA\" : \"d.M.yyyy\",\r\n \"es-US\" : \"M/d/yyyy\"};\r\n res = lFormats[ALocale] || 'dd/MM/yyyy';\r\n end;\r\n\r\n Result := res;\r\nend;\r\n\r\nclass function TFormatSettings.GetLocaleShortDayName(const ADayOfWeek: Integer; const ALocale: string): string; assembler;\r\nasm\r\n var lBaseDate = new Date(2017, 0, 1); // Sunday\r\n lBaseDate.setDate(lBaseDate.getDate() + ADayOfWeek - 1);\r\n\r\n var lLoc = \"\";\r\n if (ALocale == '')\r\n lLoc = navigator.language\r\n else\r\n lLoc = ALocale;\r\n\r\n return lBaseDate.toLocaleDateString(lLoc, { weekday: 'short' });\r\nend;\r\n\r\nclass function TFormatSettings.GetLocaleShortMonthName(const AMonth: Integer; const ALocale: string): string; assembler;\r\nasm\r\n var lBaseDate = new Date(2017, AMonth - 1, 1);\r\n var lLoc = \"\";\r\n if (ALocale == '')\r\n lLoc = navigator.language\r\n else\r\n lLoc = ALocale;\r\n return lBaseDate.toLocaleDateString(lLoc, { month: 'short' });\r\nend;\r\n\r\nclass function TFormatSettings.GetLocaleShortTimeFormat(\r\n ALocale: string): string;\r\nbegin\r\n Result := 'hh:nn';\r\n\r\n if Uppercase(ALocale) = 'EN-US' then\r\n Result := 'h:nn AMPM';\r\nend;\r\n\r\nclass function TFormatSettings.Invariant: TFormatSettings;\r\nbegin\r\n if not FInvariantCreated then\r\n begin\r\n FInvariant := Create('EN-US');\r\n FInvariant.CurrencyString := #$00A4;\r\n FInvariant.CurrencyFormat := 0;\r\n FInvariant.CurrencyDecimals := 2;\r\n FInvariant.DateSeparator := '/';\r\n FInvariant.TimeSeparator := ':';\r\n FInvariant.ShortDateFormat := 'MM/dd/yyyy';\r\n FInvariant.LongDateFormat := 'dddd, dd MMMMM yyyy HH:mm:ss';\r\n FInvariant.TimeAMString := 'AM';\r\n FInvariant.TimePMString := 'PM';\r\n FInvariant.ShortTimeFormat := 'HH:mm';\r\n FInvariant.LongTimeFormat := 'HH:mm:ss';\r\n FInvariant.ShortMonthNames := DefaultShortMonthNames;\r\n FInvariant.LongMonthNames := DefaultLongMonthNames;\r\n FInvariant.ShortDayNames := DefaultShortDayNames;\r\n FInvariant.LongDayNames := DefaultLongDayNames;\r\n FInvariant.ThousandSeparator := ',';\r\n FInvariant.DecimalSeparator := '.';\r\n FInvariant.TwoDigitYearCenturyWindow := 50;\r\n FInvariant.NegCurrFormat := 0;\r\n FInvariantCreated := True;\r\n end;\r\n Result := FInvariant;\r\nend;\r\n\r\nclass constructor TFormatSettings.Init;\r\nbegin\r\n InitGlobalFormatSettings;\r\nend;\r\n\r\nclass function TFormatSettings.GetJSLocale: string; assembler;\r\nasm\r\n return Intl.DateTimeFormat().resolvedOptions().locale\r\nend;\r\n\r\n{ ---------------------------------------------------------------------\r\n FileNames\r\n ---------------------------------------------------------------------}\r\n\r\nfunction ChangeFileExt(const FileName, Extension: PathStr): PathStr;\r\nvar\r\n i : longint;\r\n EndSep : Set of Char;\r\n SOF : Boolean;\r\n\r\nbegin\r\n i := Length(FileName);\r\n EndSep:=AllowDirectorySeparators+AllowDriveSeparators+[ExtensionSeparator];\r\n while (I > 0) and not(FileName[I] in EndSep) do\r\n Dec(I);\r\n if (I = 0) or (FileName[I] <> ExtensionSeparator) then\r\n I := Length(FileName)+1\r\n else\r\n begin\r\n SOF:=(I=1) or (FileName[i-1] in AllowDirectorySeparators);\r\n if (SOF) and not FirstDotAtFileNameStartIsExtension then\r\n I:=Length(FileName)+1;\r\n end;\r\n Result := Copy(FileName, 1, I - 1) + Extension;\r\nend;\r\n\r\nfunction ExtractFilePath(const FileName: PathStr): PathStr;\r\nvar\r\n i : longint;\r\n EndSep : Set of Char;\r\nbegin\r\n i := Length(FileName);\r\n EndSep:=AllowDirectorySeparators+AllowDriveSeparators;\r\n while (i > 0) and not CharInSet(FileName[i],EndSep) do\r\n Dec(i);\r\n If I>0 then\r\n Result := Copy(FileName, 1, i)\r\n else\r\n Result:='';\r\nend;\r\n\r\nfunction ExtractFileDir(const FileName: PathStr): PathStr;\r\nvar\r\n i : longint;\r\n EndSep : Set of Char;\r\nbegin\r\n I := Length(FileName);\r\n EndSep:=AllowDirectorySeparators+AllowDriveSeparators;\r\n while (I > 0) and not CharInSet(FileName[I],EndSep) do\r\n Dec(I);\r\n if (I > 1) and CharInSet(FileName[I],AllowDirectorySeparators) and\r\n not CharInSet(FileName[I - 1],EndSep) then\r\n Dec(I);\r\n Result := Copy(FileName, 1, I);\r\nend;\r\n\r\nfunction ExtractFileDrive(const FileName: PathStr): PathStr;\r\nvar\r\n i,l: longint;\r\nbegin\r\n Result := '';\r\n l:=Length(FileName);\r\n if (l<2) then\r\n exit;\r\n If CharInSet(FileName[2],AllowDriveSeparators) then\r\n result:=Copy(FileName,1,2)\r\n else if CharInSet(FileName[1],AllowDirectorySeparators) and\r\n CharInSet(FileName[2],AllowDirectorySeparators) then\r\n begin\r\n i := 2;\r\n\r\n { skip share }\r\n While (i 0) and not CharInSet(FileName[I],EndSep) do\r\n Dec(I);\r\n Result := Copy(FileName, I + 1, MaxInt);\r\nend;\r\n\r\nfunction ExtractFileExt(const FileName: PathStr): PathStr;\r\nvar\r\n i : longint;\r\n EndSep : Set of Char;\r\n SOF : Boolean; // Dot at Start of filename ?\r\n\r\nbegin\r\n Result:='';\r\n I := Length(FileName);\r\n EndSep:=AllowDirectorySeparators+AllowDriveSeparators+[ExtensionSeparator];\r\n while (I > 0) and not CharInSet(FileName[I],EndSep) do\r\n Dec(I);\r\n if (I > 0) and (FileName[I] = ExtensionSeparator) then\r\n begin\r\n SOF:=(I=1) or (FileName[i-1] in AllowDirectorySeparators);\r\n if (Not SOF) or FirstDotAtFileNameStartIsExtension then\r\n Result := Copy(FileName, I, MaxInt);\r\n end\r\n else\r\n Result := '';\r\nend;\r\n\r\nfunction ExtractRelativepath(const BaseName, DestName: PathStr): PathStr;\r\n\r\nVar\r\n OneLevelBack,Source, Dest : PathStr;\r\n Sc,Dc,I,J : Longint;\r\n SD,DD : TPathStrArray;\r\n\r\n\r\nbegin\r\n OneLevelBack := '..'+PathDelim;\r\n If Uppercase(ExtractFileDrive(BaseName))<>Uppercase(ExtractFileDrive(DestName)) Then\r\n begin\r\n Result:=DestName;\r\n exit;\r\n end;\r\n Source:=ExcludeTrailingPathDelimiter(ExtractFilePath(BaseName));\r\n Dest:=ExcludeTrailingPathDelimiter(ExtractFilePath(DestName));\r\n SD:=GetDirs (Source);\r\n SC:=Length(SD);\r\n DD:=GetDirs (Dest);\r\n DC:=Length(SD);\r\n I:=0;\r\n While (I'') then\r\n begin\r\n Result[L]:=D;\r\n Inc(L);\r\n end;\r\n J:=I;\r\n end;\r\n Inc(I);\r\n end;\r\n SetLength(Result,L);\r\nend;\r\n\r\nfunction IncludeTrailingPathDelimiter(const Path: PathStr): PathStr;\r\n\r\nVar\r\n l : Integer;\r\n\r\nbegin\r\n Result:=Path;\r\n l:=Length(Result);\r\n If (L=0) or not CharInSet(Result[l],AllowDirectorySeparators) then\r\n Result:=Result+PathDelim;\r\nend;\r\n\r\nfunction ExcludeTrailingPathDelimiter(const Path: PathStr): PathStr;\r\n\r\nVar\r\n L : Integer;\r\n\r\nbegin\r\n L:=Length(Path);\r\n If (L>0) and CharInSet(Path[L],AllowDirectorySeparators) then\r\n Dec(L);\r\n Result:=Copy(Path,1,L);\r\nend;\r\n\r\nfunction IncludeLeadingPathDelimiter(const Path: PathStr): PathStr;\r\n\r\nVar\r\n l : Integer;\r\n\r\nbegin\r\n Result:=Path;\r\n l:=Length(Result);\r\n If (L=0) or not CharInSet(Result[1],AllowDirectorySeparators) then\r\n Result:=PathDelim+Result;\r\nend;\r\n\r\nfunction ExcludeLeadingPathDelimiter(const Path: PathStr): PathStr;\r\n\r\nVar\r\n L : Integer;\r\n\r\nbegin\r\n Result:=Path;\r\n L:=Length(Result);\r\n If (L>0) and CharInSet(Result[1],AllowDirectorySeparators) then\r\n Delete(Result,1,1);\r\nend;\r\n\r\nfunction IsPathDelimiter(const Path: PathStr; Index: Integer): Boolean;\r\n\r\nbegin\r\n Result:=(Index>0) and (Index<=Length(Path)) and CharInSet(Path[Index],AllowDirectorySeparators);\r\nend;\r\n\r\nfunction ConcatPaths(const Paths: array of PathStr): PathStr;\r\nvar\r\n I: Integer;\r\nbegin\r\n if Length(Paths) > 0 then\r\n begin\r\n Result := Paths[0];\r\n for I := 1 to Length(Paths) - 1 do\r\n Result := IncludeTrailingPathDelimiter(Result) + ExcludeLeadingPathDelimiter(Paths[I]);\r\n end else\r\n Result := '';\r\nend;\r\n\r\nFunction EncodeHTMLEntities (S : String) : String;\r\n\r\nbegin\r\n Result:='';\r\n if S='' then exit;\r\n asm\r\n return S.replace(/[\\u00A0-\\u9999<>\\&]/gim, function(i) {\r\n return '&#'+i.charCodeAt(0)+';';\r\n });\r\n end;\r\nend;\r\n\r\n{ ---------------------------------------------------------------------\r\n Type helpers implementation\r\n ---------------------------------------------------------------------}\r\n\r\n{ ---------------------------------------------------------------------\r\n TGUIDHelper\r\n ---------------------------------------------------------------------}\r\n\r\nProcedure NotImplemented(S : String);\r\n\r\nbegin\r\n Raise Exception.Create('Not yet implemented : '+S);\r\nend;\r\n\r\nclass function TGuidHelper.Create(Src: TGUID; BigEndian: Boolean): TGUID;\r\nbegin\r\n Result:=Src;\r\n if Not Bigendian then\r\n begin\r\n Result.D1:=SwapEndian(Result.D1);\r\n Result.D2:=SwapEndian(Result.D2);\r\n Result.D3:=SwapEndian(Result.D3);\r\n end;\r\nend;\r\n\r\nclass function TGuidHelper.Create(const Buf: TJSArrayBuffer; AStartIndex: Cardinal; BigEndian: Boolean): TGUID;\r\n\r\nVar\r\n A : Cardinal;\r\n B,C : Word;\r\n V : TJSDataView;\r\n\r\nbegin\r\n V:=TJSDataView.New(Buf);\r\n // The get functions return by default correct endianness.\r\n if BigEndian then\r\n begin\r\n A:=V.getUint32(aStartIndex);\r\n B:=V.getUint16(AStartIndex+4);\r\n C:=V.getUint16(AStartIndex+6);\r\n end\r\n else\r\n begin\r\n A:=SwapEndian(V.getUint32(aStartIndex));\r\n B:=SwapEndian(V.getUint16(AStartIndex+4));\r\n C:=SwapEndian(V.getUint16(AStartIndex+6));\r\n end;\r\n Result:=Create(A,B,C,V.GetUint8(AStartIndex+8),V.GetUint8(AStartIndex+9),V.GetUint8(AStartIndex+10),V.GetUint8(AStartIndex+11),V.GetUint8(AStartIndex+12),V.GetUint8(AStartIndex+13),V.GetUint8(AStartIndex+14),V.GetUint8(AStartIndex+15));\r\nend;\r\n\r\n\r\nclass function TGuidHelper.Create(const Data: array of Byte; AStartIndex: Cardinal; BigEndian: Boolean): TGUID;\r\n\r\nVar\r\n D : TJSUint8Array;\r\n\r\nbegin\r\n if ((System.Length(Data)-AStartIndex)<16) then\r\n raise EArgumentException.CreateFmt('The length of a GUID array must be at least %d',[]);\r\n D:=TJSUint8Array.From(Data);\r\n Result:=Create(D.buffer,aStartIndex,BigEndian);\r\nend;\r\n\r\n\r\nclass function TGuidHelper.Create(const B: TBytes; DataEndian: TEndian): TGUID;\r\n\r\nbegin\r\n Result:=Create(B,0,DataEndian);\r\nend;\r\n\r\nclass function TGuidHelper.Create(const B: TBytes; AStartIndex: Cardinal; DataEndian: TEndian): TGUID;\r\n\r\nbegin\r\n if ((System.Length(B)-AStartIndex)<16) then\r\n raise EArgumentException.CreateFmt('The length of a GUID array must be at least %d',[]);\r\n Result:=Create(B,AStartIndex,DataEndian=TEndian.Big);\r\nend;\r\n\r\nclass function TGuidHelper.Create(const S: string): TGUID;\r\n\r\nbegin\r\n Result:=StringToGUID(S);\r\nend;\r\n\r\nclass function TGuidHelper.Create(A: Integer; B: SmallInt; C: SmallInt; const D: TBytes): TGUID;\r\n\r\nbegin\r\n if (System.Length(D)<>8) then\r\n raise EArgumentException.CreateFmt('The length of a GUID array must be %d',[]);\r\n Result:=Create(Cardinal(A),Word(B),Word(C),D[0],D[1],D[2],D[3],D[4],D[5],D[6],D[7]);\r\nend;\r\n\r\n(*\r\nclass function TGuidHelper.Create(A: Integer; B: SmallInt; C: SmallInt; D, E, F, G, H, I, J, K: Byte): TGUID;\r\n\r\nbegin\r\n Result:=Create(Cardinal(A),Word(B),Word(C),D,E,F,G,H,I,J,K);\r\nend;\r\n*)\r\nclass function TGuidHelper.Create(A: Cardinal; B: Word; C: Word; D, E, F, G, H, I, J, K: Byte): TGUID;\r\n\r\nbegin\r\n Result.D1 := Cardinal(A);\r\n Result.D2 := Word(B);\r\n Result.D3 := Word(C);\r\n Result.D4[0] := D;\r\n Result.D4[1] := E;\r\n Result.D4[2] := F;\r\n Result.D4[3] := G;\r\n Result.D4[4] := H;\r\n Result.D4[5] := I;\r\n Result.D4[6] := J;\r\n Result.D4[7] := K;\r\nend;\r\n\r\nclass function TGuidHelper.NewGuid: TGUID;\r\n\r\nbegin\r\n CreateGUID(Result)\r\nend;\r\n\r\nclass function TGuidHelper.Empty: TGUID;\r\nbegin\r\n Result:=Default(TGUID);\r\nend;\r\n\r\nfunction TGuidHelper.ToByteArray(DataEndian: TEndian): TBytes;\r\n\r\nVar\r\n D : TJSUint8Array;\r\n V : TJSDataView;\r\n I : Integer;\r\n\r\nbegin\r\n D:=TJSUint8array.New(16);\r\n V:=TJSDataView.New(D.buffer);\r\n V.setUint32(0,D1,DataEndian=TEndian.Little);\r\n V.setUint16(4,D2,DataEndian=TEndian.Little);\r\n V.setUint16(6,D3,DataEndian=TEndian.Little);\r\n for I:=0 to 7 do\r\n V.setUint8(8+I,D4[i]);\r\n SetLength(Result, 16);\r\n for I:=0 to 15 do\r\n Result[i]:=V.getUint8(I);\r\nend;\r\n\r\nfunction TGuidHelper.ToString(SkipBrackets: Boolean): string;\r\n\r\nbegin\r\n Result:=GuidToString(Self);\r\n If SkipBrackets then\r\n Result:=Copy(Result,2,Length(Result)-2);\r\nend;\r\n\r\n{ ---------------------------------------------------------------------\r\n TStringHelper\r\n ---------------------------------------------------------------------}\r\n\r\nFunction HaveChar(AChar : Char; const AList: array of Char) : Boolean;\r\n\r\nVar\r\n I : SizeInt;\r\n\r\nbegin\r\n I:=0;\r\n Result:=False;\r\n While (Not Result) and (ISystem.Length(A) then\r\n L:=System.Length(A);\r\n Result:=CompareOrdinal(A,0,B,0,L);\r\nend;\r\n\r\n\r\nclass function TStringHelper.CompareOrdinal(const A: string; IndexA: SizeInt;\r\n const B: string; IndexB: SizeInt; ALen: SizeInt): Integer;\r\n\r\nVar\r\n I,M : integer;\r\n\r\nbegin\r\n M:=System.Length(A)-IndexA;\r\n If M>(System.Length(B)-IndexB) then\r\n M:=(System.Length(B)-IndexB);\r\n if M>aLen then\r\n M:=aLen;\r\n I:=0;\r\n Result:=0;\r\n While (Result=0) and (I'') and (SysUtils.CompareText(System.Copy(AText,System.Length(AText)-System.Length(ASubText)+1,System.Length(ASubText)),ASubText)=0);\r\nend;\r\n\r\n\r\nclass function TStringHelper.Equals(const a: string; const b: string): Boolean;\r\nbegin\r\n Result:=A=B;\r\nend;\r\n\r\n\r\nclass function TStringHelper.Format(const AFormat: string; const args: array of const): string;\r\nbegin\r\n Result:=SysUtils.Format(AFormat,Args);\r\nend;\r\n\r\n\r\nclass function TStringHelper.IsNullOrEmpty(const AValue: string): Boolean;\r\nbegin\r\n Result:=system.Length(AValue)=0;\r\nend;\r\n\r\n\r\nclass function TStringHelper.IsNullOrWhiteSpace(const AValue: string): Boolean;\r\nbegin\r\n Result:=system.Length(SysUtils.Trim(AValue))=0;\r\nend;\r\n\r\n\r\nclass function TStringHelper.Join(const Separator: string; const Values: array of const): string;\r\n\r\nbegin\r\n Result:=TJSArray(Values).Join(Separator);\r\nend;\r\n\r\nclass function TStringHelper.Join(const Separator: string;\r\n const Values: array of string): string;\r\nbegin\r\n Result:=TJSArray(Values).Join(Separator);\r\nend;\r\n\r\n\r\nclass function TStringHelper.Join(const Separator: string;\r\n const Values: array of string; StartIndex: SizeInt; ACount: SizeInt): string;\r\n\r\nVar\r\n VLen : SizeInt;\r\n\r\nbegin\r\n VLen:=High(Values);\r\n If (ACount<0) or ((StartIndex>0) and (StartIndex>VLen)) then\r\n raise ERangeError.Create(SRangeError);\r\n If (ACount=0) or (VLen<0) then\r\n Result:=''\r\n else\r\n Result:=TJSArray(Values).Slice(StartIndex,StartIndex+aCount).Join(Separator);\r\nend;\r\n\r\n\r\nclass function TStringHelper.LowerCase(const S: string): string;\r\nbegin\r\n Result:=SysUtils.Lowercase(S);\r\nend;\r\n\r\n\r\nclass function TStringHelper.Parse(const AValue: Boolean): string;\r\nbegin\r\n Result:=BoolToStr(AValue);\r\nend;\r\n\r\n\r\nclass function TStringHelper.Parse(const AValue: Extended): string;\r\nbegin\r\n Result:=FloatToStr(AValue);\r\nend;\r\n\r\n\r\nclass function TStringHelper.Parse(const AValue: NativeInt): string;\r\nbegin\r\n Result:=IntToStr(AValue);\r\nend;\r\n\r\n\r\nclass function TStringHelper.Parse(const AValue: Integer): string;\r\nbegin\r\n Result:=IntToStr(AValue);\r\nend;\r\n\r\n\r\nclass function TStringHelper.ToBoolean(const S: string): Boolean;\r\nbegin\r\n Result:=StrToBool(S);\r\nend;\r\n\r\n\r\nclass function TStringHelper.ToDouble(const S: string): Double;\r\nbegin\r\n Result:=StrToFloat(S);\r\nend;\r\n\r\n\r\nclass function TStringHelper.ToExtended(const S: string): Extended;\r\nbegin\r\n Result:=StrToFloat(S);\r\nend;\r\n\r\n\r\nclass function TStringHelper.ToNativeInt(const S: string): NativeInt;\r\nbegin\r\n Result:=StrToInt64(S);\r\nend;\r\n\r\n\r\nclass function TStringHelper.ToInteger(const S: string): Integer;\r\nbegin\r\n Result:=StrToInt(S);\r\nend;\r\n\r\n\r\nclass function TStringHelper.UpperCase(const S: string): string;\r\nbegin\r\n Result:=SysUtils.Uppercase(S);\r\nend;\r\n\r\nclass function TStringHelper.ToCharArray(const S: String): TCharArray;\r\n\r\nVar\r\n I,Len: integer;\r\n\r\nbegin\r\n Len:=System.Length(S);\r\n SetLength(Result,Len);\r\n For I:=1 to Len do\r\n Result[I-1]:=S[I];\r\nend;\r\n\r\nfunction TStringHelper.CompareTo(const B: string): Integer;\r\nbegin\r\n // Order is important\r\n Result:=Compare(Self,B);\r\nend;\r\n\r\n\r\nfunction TStringHelper.Contains(const AValue: string): Boolean;\r\nbegin\r\n Result:=(AValue<>'') and (Pos(AValue,Self)>0);\r\nend;\r\n\r\n\r\nfunction TStringHelper.CountChar(const C: Char): SizeInt;\r\n\r\nVar\r\n S : Char;\r\nbegin\r\n Result:=0;\r\n For S in Self do\r\n if (S=C) then\r\n Inc(Result);\r\nend;\r\n\r\n\r\nfunction TStringHelper.DeQuotedString: string;\r\nbegin\r\n Result:=DeQuotedString('''');\r\nend;\r\n\r\n\r\nfunction TStringHelper.DeQuotedString(const AQuoteChar: Char): string;\r\n\r\nvar\r\n L,I : SizeInt;\r\n Res : Array of Char;\r\n PS,PD : SizeInt;\r\n IsQuote : Boolean;\r\n\r\nbegin\r\n L:=System.Length(Self);\r\n if (L<2) or Not ((Self[1]=AQuoteChar) and (Self[L]=AQuoteChar)) then\r\n Exit(Self);\r\n SetLength(Res,L);\r\n IsQuote:=False;\r\n PS:=2;\r\n PD:=1;\r\n For I:=2 to L-1 do\r\n begin\r\n if (Self[PS]=AQuoteChar) then\r\n begin\r\n IsQuote:=Not IsQuote;\r\n if Not IsQuote then\r\n begin\r\n Result[PD]:=Self[PS];\r\n Inc(PD);\r\n end;\r\n end\r\n else\r\n begin\r\n if IsQuote then\r\n IsQuote:=false;\r\n Result[PD]:=Self[PS];\r\n Inc(PD);\r\n end;\r\n Inc(PS);\r\n end;\r\n SetLength(Result,PD-1);\r\nend;\r\n\r\n\r\nfunction TStringHelper.EndsWith(const AValue: string): Boolean;\r\nbegin\r\n Result:=EndsWith(AValue,False);\r\nend;\r\n\r\n\r\nfunction TStringHelper.EndsWith(const AValue: string; IgnoreCase: Boolean): Boolean;\r\n\r\nVar\r\n L : SizeInt;\r\n S : String;\r\n\r\nbegin\r\n L:=system.Length(AVAlue);\r\n Result:=L=0;\r\n if Not Result then\r\n begin\r\n S:=system.Copy(Self,Length-L+1,L);\r\n Result:=system.Length(S)=L;\r\n if Result then\r\n if IgnoreCase then\r\n Result:=CompareText(S,AValue)=0\r\n else\r\n Result:=S=AValue;\r\n end;\r\nend;\r\n\r\n\r\nfunction TStringHelper.Equals(const AValue: string): Boolean;\r\n\r\nbegin\r\n Result:=(Self=AValue);\r\nend;\r\n\r\n\r\nfunction TStringHelper.Format(const args: array of const): string;\r\n\r\nbegin\r\n Result:=SysUtils.Format(Self,Args);\r\nend;\r\n\r\n\r\nfunction TStringHelper.GetHashCode: Integer;\r\n\r\n// Taken from contnrs, fphash\r\nvar\r\n P,pmax : Integer;\r\n L : TJSString;\r\n\r\nbegin\r\n{$push}\r\n{$Q-}\r\n L:=TJSString(Self);\r\n Result:=0;\r\n\r\n P:=1;\r\n pmax:=length+1;\r\n while (p-1 then\r\n Result:=Result+StartIndex;\r\nend;\r\n\r\n\r\nfunction TStringHelper.IndexOf(const AValue: string; StartIndex: SizeInt;\r\n ACount: SizeInt): SizeInt;\r\n\r\nVar\r\n S : String;\r\n\r\nbegin\r\n S:=System.Copy(Self,StartIndex+1,ACount);\r\n Result:=Pos(AValue,S)-1;\r\n if Result<>-1 then\r\n Result:=Result+StartIndex;\r\nend;\r\n\r\nfunction TStringHelper.IndexOfUnQuoted(const AValue: string; StartQuote,\r\n EndQuote: Char; StartIndex: SizeInt = 0): SizeInt;\r\n\r\nVar\r\n LV : SizeInt;\r\n S : String;\r\n\r\n Function MatchAt(I : SizeInt) : Boolean ; Inline;\r\n\r\n Var\r\n J : SizeInt;\r\n\r\n begin\r\n J:=1;\r\n Repeat\r\n Result:=(S[I+J-1]=AValue[j]);\r\n Inc(J);\r\n Until (Not Result) or (J>LV);\r\n end;\r\n\r\nVar\r\n I,L,Q: SizeInt;\r\n\r\nbegin\r\n S:=Self;\r\n Result:=-1;\r\n LV:=system.Length(AValue);\r\n L:=Length-LV+1;\r\n if L<0 then\r\n L:=0;\r\n I:=StartIndex+1;\r\n Q:=0;\r\n if StartQuote=EndQuote then\r\n begin\r\n While (Result=-1) and (I<=L) do\r\n begin\r\n if (S[I]=StartQuote) then\r\n Q:=1-Q;\r\n if (Q=0) and MatchAt(i) then\r\n Result:=I-1;\r\n Inc(I);\r\n end;\r\n end\r\n else\r\n begin\r\n While (Result=-1) and (I<=L) do\r\n begin\r\n if S[I]=StartQuote then\r\n Inc(Q)\r\n else if (S[I]=EndQuote) and (Q>0) then\r\n Dec(Q);\r\n if (Q=0) and MatchAt(i) then\r\n Result:=I-1;\r\n Inc(I);\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TStringHelper.IndexOfAny(const AnyOf: string): SizeInt;\r\nbegin\r\n Result:=IndexOfAny(AnyOf.ToCharArray);\r\nend;\r\n\r\n\r\nfunction TStringHelper.IndexOfAny(const AnyOf: array of Char): SizeInt;\r\nbegin\r\n Result:=IndexOfAny(AnyOf,0,Length);\r\nend;\r\n\r\nfunction TStringHelper.IndexOfAny(const AnyOf: String; StartIndex: SizeInt): SizeInt;\r\nbegin\r\n Result:=IndexOfAny(AnyOf.ToCharArray,StartIndex);\r\nend;\r\n\r\n\r\nfunction TStringHelper.IndexOfAny(const AnyOf: array of Char;\r\n StartIndex: SizeInt): SizeInt;\r\nbegin\r\n Result:=IndexOfAny(AnyOf,StartIndex,Length);\r\nend;\r\n\r\nfunction TStringHelper.IndexOfAny(const AnyOf: String; StartIndex: SizeInt; ACount: SizeInt): SizeInt;\r\nbegin\r\n Result:=IndexOfAny(AnyOf.ToCharArray,StartIndex,aCount);\r\nend;\r\n\r\nfunction TStringHelper.IndexOfAny(const AnyOf: array of Char;\r\n StartIndex: SizeInt; ACount: SizeInt): SizeInt;\r\n\r\nVar\r\n i,L : SizeInt;\r\n\r\nbegin\r\n I:=StartIndex+1;\r\n L:=I+ACount-1;\r\n If L>Length then\r\n L:=Length;\r\n Result:=-1;\r\n While (Result=-1) and (I<=L) do\r\n begin\r\n if HaveChar(Self[i],AnyOf) then\r\n Result:=I-1;\r\n Inc(I);\r\n end;\r\nend;\r\n\r\nfunction TStringHelper.IndexOfAny(const AnyOf: array of String): SizeInt;\r\nbegin\r\n Result:=IndexOfAny(AnyOf,0,Length);\r\nend;\r\n\r\nfunction TStringHelper.IndexOfAny(const AnyOf: array of String;\r\n StartIndex: SizeInt): SizeInt;\r\nbegin\r\n Result:=IndexOfAny(AnyOf,StartIndex,Length-StartIndex);\r\nend;\r\n\r\nfunction TStringHelper.IndexOfAny(const AnyOf: array of String;\r\n StartIndex: SizeInt; ACount: SizeInt): SizeInt;\r\n\r\nVar\r\n M : SizeInt;\r\n\r\nbegin\r\n Result:=IndexOfAny(AnyOf,StartIndex,ACount,M);\r\nend;\r\n\r\nfunction TStringHelper.IndexOfAny(const AnyOf: array of String;\r\n StartIndex: SizeInt; ACount: SizeInt; out AMatch: SizeInt): SizeInt;\r\n\r\nVar\r\n L,I : SizeInt;\r\n\r\nbegin\r\n Result:=-1;\r\n For I:=0 to System.Length(AnyOf)-1 do\r\n begin\r\n L:=IndexOf(AnyOf[i],StartIndex,ACount);\r\n If (L>=0) and ((Result=-1) or (LLength then\r\n L:=Length;\r\n I:=StartIndex+1;\r\n Q:=0;\r\n if StartQuote=EndQuote then\r\n begin\r\n While (Result=-1) and (I<=L) do\r\n begin\r\n if (Self[I]=StartQuote) then\r\n Q:=1-Q;\r\n if (Q=0) and HaveChar(Self[i],AnyOf) then\r\n Result:=I-1;\r\n Inc(I);\r\n end;\r\n end\r\n else\r\n begin\r\n While (Result=-1) and (I<=L) do\r\n begin\r\n if Self[I]=StartQuote then\r\n Inc(Q)\r\n else if (Self[I]=EndQuote) and (Q>0) then\r\n Dec(Q);\r\n if (Q=0) and HaveChar(Self[i],AnyOf) then\r\n Result:=I-1;\r\n Inc(I);\r\n end;\r\n end;\r\n\r\nend;\r\n\r\nfunction TStringHelper.IndexOfAnyUnquoted(const AnyOf: array of string;\r\n StartQuote, EndQuote: Char; StartIndex: SizeInt; out Matched: SizeInt\r\n ): SizeInt;\r\n\r\nVar\r\n L,I : SizeInt;\r\n\r\nbegin\r\n Result:=-1;\r\n For I:=0 to System.Length(AnyOf)-1 do\r\n begin\r\n L:=IndexOfUnquoted(AnyOf[i],StartQuote,EndQuote,StartIndex);\r\n If (L>=0) and ((Result=-1) or (L=Min) and (Self[Result]<>AValue) do\r\n Dec(Result);\r\n if ResultaCount then\r\n Result:=-1;\r\nend;\r\n\r\n\r\nfunction TStringHelper.LastIndexOfAny(const AnyOf: array of Char): SizeInt;\r\nbegin\r\n Result:=LastIndexOfAny(AnyOf,Length-1,Length);\r\nend;\r\n\r\n\r\nfunction TStringHelper.LastIndexOfAny(const AnyOf: array of Char;\r\n AStartIndex: SizeInt): SizeInt;\r\nbegin\r\n Result:=LastIndexOfAny(AnyOf,AStartIndex,Length);\r\nend;\r\n\r\n\r\nfunction TStringHelper.LastIndexOfAny(const AnyOf: array of Char;\r\n AStartIndex: SizeInt; ACount: SizeInt): SizeInt;\r\n\r\nVar\r\n Min : SizeInt;\r\n\r\nbegin\r\n Result:=AStartIndex+1;\r\n Min:=Result-ACount+1;\r\n If Min<1 then\r\n Min:=1;\r\n While (Result>=Min) and Not HaveChar(Self[Result],AnyOf) do\r\n Dec(Result);\r\n if Result0 then\r\n Result:=StringOfChar(PaddingChar,L)+Result;\r\nend;\r\n\r\n\r\nfunction TStringHelper.PadRight(ATotalWidth: SizeInt): string;\r\nbegin\r\n Result:=PadRight(ATotalWidth,' ');\r\nend;\r\n\r\n\r\nfunction TStringHelper.PadRight(ATotalWidth: SizeInt; PaddingChar: Char\r\n ): string;\r\n\r\nVar\r\n L : SizeInt;\r\n\r\nbegin\r\n Result:=Self;\r\n L:=ATotalWidth-Length;\r\n If L>0 then\r\n Result:=Result+StringOfChar(PaddingChar,L);\r\nend;\r\n\r\n\r\nfunction TStringHelper.QuotedString: string;\r\nbegin\r\n Result:=QuotedStr(Self);\r\nend;\r\n\r\n\r\nfunction TStringHelper.QuotedString(const AQuoteChar: Char): string;\r\nbegin\r\n Result:=QuotedStr(Self,AQuoteChar);\r\nend;\r\n\r\n\r\nfunction TStringHelper.Remove(StartIndex: SizeInt): string;\r\nbegin\r\n Result:=Remove(StartIndex,Self.Length-StartIndex);\r\nend;\r\n\r\n\r\nfunction TStringHelper.Remove(StartIndex: SizeInt; ACount: SizeInt): string;\r\nbegin\r\n Result:=Self;\r\n System.Delete(Result,StartIndex+1,ACount);\r\nend;\r\n\r\n\r\nfunction TStringHelper.Replace(OldChar: Char; NewChar: Char): string;\r\nbegin\r\n Result:=Replace(OldChar,NewChar,[rfReplaceAll]);\r\nend;\r\n\r\n\r\nfunction TStringHelper.Replace(OldChar: Char; NewChar: Char;\r\n ReplaceFlags: TReplaceFlags): string;\r\nbegin\r\n Result:=StringReplace(Self,OldChar,NewChar,ReplaceFlags);\r\nend;\r\n\r\n\r\nfunction TStringHelper.Replace(const OldValue: string; const NewValue: string\r\n ): string;\r\nbegin\r\n Result:=Replace(OldValue,NewValue,[rfReplaceAll]);\r\nend;\r\n\r\n\r\nfunction TStringHelper.Replace(const OldValue: string; const NewValue: string;\r\n ReplaceFlags: TReplaceFlags): string;\r\nbegin\r\n Result:=StringReplace(Self,OldValue,NewValue,ReplaceFlags);\r\nend;\r\n\r\n\r\n\r\nfunction TStringHelper.Split(const Separators: String): TStringArray;\r\nbegin\r\n Result:=Split(Separators.ToCharArray);\r\nend;\r\n\r\n\r\nfunction TStringHelper.Split(const Separators: array of Char): TStringArray;\r\nbegin\r\n Result:=Split(Separators,#0,#0,Length+1,TStringSplitOptions.None);\r\nend;\r\n\r\nfunction TStringHelper.Split(const Separators: string; ACount: SizeInt): TStringArray;\r\nbegin\r\n Result:=Split(Separators.ToCharArray,aCount);\r\nend;\r\n\r\n\r\nfunction TStringHelper.Split(const Separators: array of Char; ACount: SizeInt\r\n ): TStringArray;\r\nbegin\r\n Result:=Split(Separators,#0,#0,ACount,TStringSplitOptions.None);\r\nend;\r\n\r\nfunction TStringHelper.Split(const Separators: string; Options: TStringSplitOptions): TStringArray;\r\nbegin\r\n Result:=Split(Separators.ToCharArray,Options);\r\nend;\r\n\r\n\r\nfunction TStringHelper.Split(const Separators: array of Char;\r\n Options: TStringSplitOptions): TStringArray;\r\nbegin\r\n Result:=Split(Separators,Length+1,Options);\r\nend;\r\n\r\nfunction TStringHelper.Split(const Separators: string; ACount: SizeInt; Options: TStringSplitOptions): TStringArray;\r\nbegin\r\n Result:=Split(Separators.ToCharArray,aCount,Options);\r\nend;\r\n\r\n\r\nfunction TStringHelper.Split(const Separators: array of Char; ACount: SizeInt;\r\n Options: TStringSplitOptions): TStringArray;\r\nbegin\r\n Result:=Split(Separators,#0,#0,ACount,Options);\r\nend;\r\n\r\n\r\nfunction TStringHelper.Split(const Separators: array of string): TStringArray;\r\nbegin\r\n Result:=Split(Separators,Length+1);\r\nend;\r\n\r\n\r\nfunction TStringHelper.Split(const Separators: array of string; ACount: SizeInt\r\n ): TStringArray;\r\nbegin\r\n Result:=Split(Separators,ACount,TStringSplitOptions.None);\r\nend;\r\n\r\n\r\nfunction TStringHelper.Split(const Separators: array of string;\r\n Options: TStringSplitOptions): TStringArray;\r\nbegin\r\n Result:=Split(Separators,Length+1,Options);\r\nend;\r\n\r\n\r\nfunction TStringHelper.Split(const Separators: array of string;\r\n ACount: SizeInt; Options: TStringSplitOptions): TStringArray;\r\nbegin\r\n Result:=Split(Separators,#0,#0,ACount,Options);\r\nend;\r\n\r\nfunction TStringHelper.Split(const Separators: String; AQuote: Char): TStringArray;\r\nbegin\r\n Result:=Split(Separators.ToCharArray,aQuote);\r\nend;\r\n\r\n\r\nfunction TStringHelper.Split(const Separators: array of Char; AQuote: Char\r\n ): TStringArray;\r\nbegin\r\n Result:=Split(Separators,AQuote,AQuote);\r\nend;\r\n\r\nfunction TStringHelper.Split(const Separators: String; AQuoteStart, AQuoteEnd: Char): TStringArray;\r\nbegin\r\n Result:=Split(Separators.ToCharArray,aQuoteStart,aQuoteEnd);\r\nend;\r\n\r\n\r\nfunction TStringHelper.Split(const Separators: array of Char; AQuoteStart,\r\n AQuoteEnd: Char): TStringArray;\r\nbegin\r\n Result:=Split(Separators,AQuoteStart,AQuoteEnd,TStringSplitOptions.None);\r\nend;\r\n\r\nfunction TStringHelper.Split(const Separators: string; AQuoteStart, AQuoteEnd: Char; Options: TStringSplitOptions): TStringArray;\r\nbegin\r\n Result:=Split(Separators.ToCharArray,aQuoteStart,aQuoteEnd,Options);\r\nend;\r\n\r\n\r\nfunction TStringHelper.Split(const Separators: array of Char; AQuoteStart,\r\n AQuoteEnd: Char; Options: TStringSplitOptions): TStringArray;\r\nbegin\r\n Result:=Split(Separators,AQuoteStart,AQuoteEnd,Length+1,Options);\r\nend;\r\n\r\nfunction TStringHelper.Split(const Separators: string; AQuoteStart, AQuoteEnd: Char; ACount: SizeInt): TStringArray;\r\nbegin\r\n Result:=Split(Separators.ToCharArray,aQuoteStart,aQuoteEnd,aCount);\r\nend;\r\n\r\n\r\nfunction TStringHelper.Split(const Separators: array of Char; AQuoteStart,\r\n AQuoteEnd: Char; ACount: SizeInt): TStringArray;\r\nbegin\r\n Result:=Split(Separators,AQuoteStart,AQuoteEnd,ACount,TStringSplitOptions.None);\r\nend;\r\n\r\nfunction TStringHelper.Split(const Separators: string; AQuoteStart, AQuoteEnd: Char; ACount: SizeInt; Options: TStringSplitOptions\r\n ): TStringArray;\r\nbegin\r\n Result:=Split(Separators.ToCharArray,aQuoteStart,aQuoteEnd,aCount,Options);\r\nend;\r\n\r\n\r\nfunction TStringHelper.Split(const Separators: array of Char; AQuoteStart,\r\n AQuoteEnd: Char; ACount: SizeInt; Options: TStringSplitOptions): TStringArray;\r\n\r\n\r\nConst\r\n BlockSize = 10;\r\n\r\nVar\r\n S : String;\r\n\r\n Function NextSep(StartIndex : SizeInt) : SizeInt;\r\n\r\n begin\r\n if (AQuoteStart<>#0) then\r\n Result:=S.IndexOfAnyUnQuoted(Separators,AQuoteStart,AQuoteEnd,StartIndex)\r\n else\r\n Result:=S.IndexOfAny(Separators,StartIndex);\r\n end;\r\n\r\n Procedure MaybeGrow(Curlen : SizeInt);\r\n\r\n begin\r\n if System.Length(Result)<=CurLen then\r\n SetLength(Result,System.Length(Result)+BlockSize);\r\n end;\r\n\r\nVar\r\n Sep,LastSep,Len : SizeInt;\r\n T : String;\r\n\r\nbegin\r\n\r\n S:=Self;\r\n SetLength(Result,BlockSize);\r\n Len:=0;\r\n LastSep:=0;\r\n Sep:=NextSep(0);\r\n While (Sep<>-1) and ((ACount=0) or (Len',T,'< at pos ',LastSep,', till pos ',Sep);\r\n If (T<>'') or (not (TStringSplitOptions.ExcludeEmpty=Options)) then\r\n begin\r\n MaybeGrow(Len);\r\n Result[Len]:=T;\r\n Inc(Len);\r\n end;\r\n LastSep:=Sep+1;\r\n Sep:=NextSep(LastSep);\r\n end;\r\n if (LastSep<=Length) and ((ACount=0) or (Len',T,'< at pos,',LastSep,' till pos ',Sep);\r\n If (T<>'') or (not (TStringSplitOptions.ExcludeEmpty=Options)) then\r\n begin\r\n MaybeGrow(Len);\r\n Result[Len]:=T;\r\n Inc(Len);\r\n end;\r\n end;\r\n SetLength(Result,Len);\r\n\r\nend;\r\n\r\n\r\nfunction TStringHelper.Split(const Separators: array of string; AQuote: Char\r\n ): TStringArray;\r\nbegin\r\n Result:=SPlit(Separators,AQuote,AQuote);\r\nend;\r\n\r\n\r\nfunction TStringHelper.Split(const Separators: array of string; AQuoteStart,\r\n AQuoteEnd: Char): TStringArray;\r\nbegin\r\n Result:=SPlit(Separators,AQuoteStart,AQuoteEnd,Length+1,TStringSplitOptions.None);\r\nend;\r\n\r\n\r\nfunction TStringHelper.Split(const Separators: array of string; AQuoteStart,\r\n AQuoteEnd: Char; Options: TStringSplitOptions): TStringArray;\r\nbegin\r\n Result:=SPlit(Separators,AQuoteStart,AQuoteEnd,Length+1,Options);\r\nend;\r\n\r\n\r\nfunction TStringHelper.Split(const Separators: array of string; AQuoteStart,\r\n AQuoteEnd: Char; ACount: SizeInt): TStringArray;\r\nbegin\r\n Result:=SPlit(Separators,AQuoteStart,AQuoteEnd,ACount,TStringSplitOptions.None);\r\nend;\r\n\r\n\r\nfunction TStringHelper.Split(const Separators: array of string; AQuoteStart,\r\n AQuoteEnd: Char; ACount: SizeInt; Options: TStringSplitOptions): TStringArray;\r\n\r\nConst\r\n BlockSize = 10;\r\n\r\nVar\r\n S : String;\r\n\r\n Function NextSep(StartIndex : SizeInt; out Match : SizeInt) : SizeInt;\r\n\r\n begin\r\n if (AQuoteStart<>#0) then\r\n Result:=S.IndexOfAnyUnQuoted(Separators,AQuoteStart,AQuoteEnd,StartIndex,Match)\r\n else\r\n Result:=S.IndexOfAny(Separators,StartIndex,Length,Match);\r\n end;\r\n\r\n Procedure MaybeGrow(Curlen : SizeInt);\r\n\r\n begin\r\n if System.Length(Result)<=CurLen then\r\n SetLength(Result,System.Length(Result)+BlockSize);\r\n end;\r\n\r\nVar\r\n Sep,LastSep,Len,Match : SizeInt;\r\n T : String;\r\n\r\nbegin\r\n S:=Self;\r\n SetLength(Result,BlockSize);\r\n Len:=0;\r\n LastSep:=0;\r\n Sep:=NextSep(0,Match);\r\n While (Sep<>-1) and ((ACount=0) or (Len'') or (not (TStringSplitOptions.ExcludeEmpty=Options)) then\r\n begin\r\n MaybeGrow(Len);\r\n Result[Len]:=T;\r\n Inc(Len);\r\n end;\r\n LastSep:=Sep+System.Length(Separators[Match]);\r\n Sep:=NextSep(LastSep,Match);\r\n end;\r\n if (LastSep<=Length) and ((ACount=0) or (Len',T,'< at pos,',LastSep,' till pos ',Sep);\r\n If (T<>'') or (not (TStringSplitOptions.ExcludeEmpty=Options)) then\r\n begin\r\n MaybeGrow(Len);\r\n Result[Len]:=T;\r\n Inc(Len);\r\n end;\r\n end;\r\n SetLength(Result,Len);\r\n\r\nend;\r\n\r\n\r\nfunction TStringHelper.StartsWith(const AValue: string): Boolean;\r\nbegin\r\n Result:=StartsWith(AValue,False);\r\nend;\r\n\r\n\r\nfunction TStringHelper.StartsWith(const AValue: string; IgnoreCase: Boolean\r\n ): Boolean;\r\nVar\r\n L : SizeInt;\r\n S : String;\r\n\r\nbegin\r\n L:=System.Length(AValue);\r\n Result:=L<=0;\r\n if not Result then\r\n begin\r\n S:=System.Copy(Self,1,L);\r\n Result:=(System.Length(S)=L);\r\n if Result then\r\n if IgnoreCase then\r\n Result:=SameText(S,aValue)\r\n else\r\n Result:=SameStr(S,AValue);\r\n end;\r\nend;\r\n\r\n\r\nfunction TStringHelper.Substring(AStartIndex: SizeInt): string;\r\nbegin\r\n Result:=Self.SubString(AStartIndex,Self.Length-AStartIndex);\r\nend;\r\n\r\n\r\nfunction TStringHelper.Substring(AStartIndex: SizeInt; ALen: SizeInt): string;\r\nbegin\r\n Result:=system.Copy(Self,AStartIndex+1,ALen);\r\nend;\r\n\r\n\r\nfunction TStringHelper.ToBoolean: Boolean;\r\nbegin\r\n Result:=StrToBool(Self);\r\nend;\r\n\r\n\r\nfunction TStringHelper.ToInteger: Integer;\r\nbegin\r\n Result:=StrToInt(Self);\r\nend;\r\n\r\n\r\nfunction TStringHelper.ToNativeInt: NativeInt;\r\nbegin\r\n Result:=StrToNativeInt(Self);\r\nend;\r\n\r\nfunction TStringHelper.ToDouble: Double;\r\nbegin\r\n Result:=StrToFLoat(Self);\r\nend;\r\n\r\n\r\nfunction TStringHelper.ToExtended: Extended;\r\nbegin\r\n Result:=StrToFLoat(Self);\r\nend;\r\n\r\n\r\nfunction TStringHelper.ToCharArray: TCharArray;\r\n\r\nbegin\r\n Result:=ToCharArray(0,Self.Length);\r\nend;\r\n\r\n\r\nfunction TStringHelper.ToCharArray(AStartIndex: SizeInt; ALen: SizeInt\r\n ): TCharArray;\r\n\r\nVar\r\n I : SizeInt;\r\n\r\nbegin\r\n SetLength(Result,ALen);\r\n For I:=0 to ALen-1 do\r\n Result[I]:=Self[AStartIndex+I+1];\r\nend;\r\n\r\n\r\nfunction TStringHelper.ToLower: string;\r\nbegin\r\n Result:=LowerCase(Self);\r\nend;\r\n\r\n\r\nfunction TStringHelper.ToLowerInvariant: string;\r\nbegin\r\n Result:=LowerCase(Self);\r\nend;\r\n\r\n\r\nfunction TStringHelper.ToUpper: string;\r\nbegin\r\n Result:=UpperCase(Self);\r\nend;\r\n\r\n\r\nfunction TStringHelper.ToUpperInvariant: string;\r\nbegin\r\n Result:=UpperCase(Self);\r\nend;\r\n\r\n\r\nfunction TStringHelper.Trim: string;\r\nbegin\r\n Result:=SysUtils.Trim(self);\r\nend;\r\n\r\n\r\nfunction TStringHelper.TrimLeft: string;\r\nbegin\r\n Result:=SysUtils.TrimLeft(Self);\r\nend;\r\n\r\n\r\nfunction TStringHelper.TrimRight: string;\r\nbegin\r\n Result:=SysUtils.TrimRight(Self);\r\nend;\r\n\r\n\r\nfunction TStringHelper.Trim(const ATrimChars: array of Char): string;\r\nbegin\r\n Result:=Self.TrimLeft(ATrimChars).TrimRight(ATrimChars);\r\nend;\r\n\r\n\r\nfunction TStringHelper.TrimLeft(const ATrimChars: array of Char): string;\r\n\r\nVar\r\n I,Len : SizeInt;\r\n\r\nbegin\r\n I:=1;\r\n Len:=Self.Length;\r\n While (I<=Len) and HaveChar(Self[i],ATrimChars) do Inc(I);\r\n if I=1 then\r\n Result:=Self\r\n else if I>Len then\r\n Result:=''\r\n else\r\n Result:=system.Copy(Self,I,Len-I+1);\r\nend;\r\n\r\n\r\nfunction TStringHelper.TrimRight(const ATrimChars: array of Char): string;\r\n\r\nVar\r\n I,Len : SizeInt;\r\n\r\nbegin\r\n Len:=Self.Length;\r\n I:=Len;\r\n While (I>=1) and HaveChar(Self[i],ATrimChars) do Dec(I);\r\n if I<1 then\r\n Result:=''\r\n else if I=Len then\r\n Result:=Self\r\n else\r\n Result:=system.Copy(Self,1,I);\r\nend;\r\n\r\n\r\nfunction TStringHelper.TrimEnd(const ATrimChars: array of Char): string;\r\nbegin\r\n Result:=TrimRight(ATrimChars);\r\nend;\r\n\r\n\r\nfunction TStringHelper.TrimStart(const ATrimChars: array of Char): string;\r\nbegin\r\n Result:=TrimLeft(ATrimChars);\r\nend;\r\n\r\n{ ---------------------------------------------------------------------\r\n TDoubleHelper\r\n ---------------------------------------------------------------------}\r\n\r\nClass Function TDoubleHelper.IsNan(const AValue: Double): Boolean; overload; inline;\r\n\r\nbegin\r\n Result:=JS.jsIsNaN(AValue);\r\nend;\r\n\r\nClass Function TDoubleHelper.IsInfinity(const AValue: Double): Boolean; overload; inline;\r\n\r\nbegin\r\n Result:=Not jsIsFinite(aValue);\r\nend;\r\n\r\nClass Function TDoubleHelper.IsNegativeInfinity(const AValue: Double): Boolean; overload; inline;\r\n\r\nbegin\r\n asm\r\n return (AValue=Number.NEGATIVE_INFINITY);\r\n end;\r\n Result:=aValue=0; // Fool compiler\r\nend;\r\n\r\nClass Function TDoubleHelper.IsPositiveInfinity(const AValue: Double): Boolean; overload; inline;\r\n\r\nbegin\r\n asm\r\n return (AValue=Number.POSITIVE_INFINITY);\r\n end;\r\n Result:=aValue=0; // Fool compiler.\r\nend;\r\n\r\nClass Function TDoubleHelper.Parse(const AString: string): Double; overload; inline;\r\n\r\nbegin\r\n Result:=StrToFloat(AString);\r\nend;\r\n\r\n\r\nClass Function TDoubleHelper.ToString(const AValue: Double): string; overload; inline;\r\n\r\nbegin\r\n Result:=FloatToStr(AValue);\r\nend;\r\n\r\n\r\nClass Function TDoubleHelper.ToString(const AValue: Double; const AFormat: TFloatFormat; const APrecision, ADigits: Integer): string; overload; inline;\r\n\r\nbegin\r\n Result:=FloatToStrF(AValue,AFormat,APrecision,ADigits);\r\nend;\r\n\r\n\r\nClass Function TDoubleHelper.TryParse(const AString: string; out AValue: Double): Boolean; overload; inline;\r\n\r\nbegin\r\n Result:=TryStrToFloat(AString,AValue);\r\nend;\r\n\r\n\r\n\r\nFunction TDoubleHelper.GetB(AIndex: Cardinal): Byte;\r\n\r\nvar\r\n F : TJSFloat64Array;\r\n B : TJSUInt8array;\r\n\r\nbegin\r\n F:=TJSFloat64Array.New(1);\r\n B:=TJSUInt8array.New(F.Buffer);\r\n F[0]:=Self;\r\n Result:=B[AIndex];\r\nend;\r\n\r\nFunction TDoubleHelper.GetW(AIndex: Cardinal): Word;\r\n\r\nvar\r\n F : TJSFloat64Array;\r\n W : TJSUInt16array;\r\n\r\nbegin\r\n F:=TJSFloat64Array.New(1);\r\n W:=TJSUInt16array.New(F.Buffer);\r\n F[0]:=Self;\r\n Result:=W[AIndex];\r\nend;\r\n\r\nType\r\n TFloatParts = Record\r\n sign : boolean;\r\n exp : integer;\r\n mantissa : double;\r\n end;\r\n\r\n// See https://stackoverflow.com/questions/9383593/extracting-the-exponent-and-mantissa-of-a-javascript-number\r\n\r\nFunction FloatToParts(aValue : Double) : TFloatParts;\r\n\r\nvar\r\n F : TJSFloat64Array;\r\n B : TJSUInt8array;\r\n\r\nbegin\r\n F:=TJSFloat64Array.New(1);\r\n B:=TJSUInt8array.New(F.Buffer);\r\n F[0]:=aValue;\r\n Result.Sign:=(B[7] shr 7)=0;\r\n Result.exp:=(((B[7] and $7f) shl 4) or (B[6] shr 4))- $3ff;\r\n B[3]:=$3F;\r\n B[6]:=B[6] or $F0;\r\n Result.Mantissa:=F[0];\r\nend;\r\n\r\nFunction TDoubleHelper.GetE: NativeUInt; inline;\r\n\r\nbegin\r\n Result:=FloatToParts(Self).Exp;\r\nend;\r\n\r\nFunction TDoubleHelper.GetF: NativeUInt; inline;\r\n\r\nbegin\r\n Result:=0;\r\n NotImplemented('GetF');\r\nend;\r\n\r\nFunction TDoubleHelper.GetS: Boolean; inline;\r\n\r\nbegin\r\n Result:=FloatToParts(Self).Sign;\r\nend;\r\n\r\nprocedure TDoubleHelper.SetB(AIndex: Cardinal; const AValue: Byte);\r\n\r\nvar\r\n F : TJSFloat64Array;\r\n B : TJSUInt8array;\r\n\r\nbegin\r\n if (AIndex>=8) then\r\n raise ERangeError.Create(SRangeError);\r\n F:=TJSFloat64Array.New(1);\r\n B:=TJSUInt8array.New(F.Buffer);\r\n F[0]:=Self;\r\n B[AIndex]:=aValue;\r\n Self:=F[0];\r\nend;\r\n\r\nprocedure TDoubleHelper.SetW(AIndex: Cardinal; const AValue: Word);\r\n\r\nVar\r\n F : TJSFloat64Array;\r\n W : TJSUInt16array;\r\n\r\nbegin\r\n if (AIndex>=4) then\r\n raise ERangeError.Create(SRangeError);\r\n F:=TJSFloat64Array.New(1);\r\n W:=TJSUInt16array.New(F.Buffer);\r\n F[0]:=Self;\r\n W[AIndex]:=aValue;\r\n Self:=F[0];\r\nend;\r\n\r\n\r\n\r\nprocedure TDoubleHelper.SetS(AValue: Boolean);\r\n\r\n\r\nVar\r\n F : TJSFloat64Array;\r\n B : TJSUInt8array;\r\n\r\nbegin\r\n F:=TJSFloat64Array.New(1);\r\n B:=TJSUInt8array.New(F.Buffer);\r\n F[0]:=Self;\r\n if aValue then\r\n B[7]:=B[7] or (1 shr 7)\r\n else\r\n B[7]:=B[7] and not (1 shr 7);\r\n Self:=F[0];\r\nend;\r\n\r\n\r\nProcedure TDoubleHelper.BuildUp(const ASignFlag: Boolean; const AMantissa: NativeUInt; const AExponent: Integer);\r\n\r\nbegin\r\n NotImplemented('BuildUp');\r\n // Following statement is just to fool the compiler\r\n if ASignFlag and (AMantissa>0) and (AExponent<0) then exit;\r\n// TFloatRec(Self).BuildUp(ASignFlag, AMantissa, AExponent);\r\nend;\r\n\r\nFunction TDoubleHelper.Exponent: Integer;\r\n\r\nbegin\r\n Result:=FloatToParts(Self).Exp;\r\nend;\r\n\r\nFunction TDoubleHelper.Fraction: Extended;\r\n\r\nbegin\r\n Result:=system.Frac(Self);\r\nend;\r\n\r\nFunction TDoubleHelper.IsInfinity: Boolean; overload; inline;\r\n\r\nbegin\r\n Result:=Double.IsInfinity(Self);\r\nend;\r\n\r\nFunction TDoubleHelper.IsNan: Boolean; overload; inline;\r\n\r\nbegin\r\n Result:=Double.IsNan(Self);\r\nend;\r\n\r\nFunction TDoubleHelper.IsNegativeInfinity: Boolean; overload; inline;\r\n\r\nbegin\r\n Result:=Double.IsNegativeInfinity(Self);\r\nend;\r\n\r\nFunction TDoubleHelper.IsPositiveInfinity: Boolean; overload; inline;\r\n\r\nbegin\r\n Result:=Double.IsPositiveInfinity(Self);\r\nend;\r\n\r\nFunction TDoubleHelper.Mantissa: NativeUInt;\r\n\r\nbegin\r\n Result:=Trunc(FloatToParts(Self).mantissa);\r\nend;\r\n\r\nFunction TDoubleHelper.ToString(const AFormat: TFloatFormat; const APrecision, ADigits: Integer): string; overload; inline;\r\n\r\nbegin\r\n Result:=FloatToStrF(Self,AFormat,APrecision,ADigits);\r\nend;\r\n\r\nFunction TDoubleHelper.ToString: string; overload; inline;\r\n\r\nbegin\r\n Result:=FloatToStr(Self);\r\nend;\r\n\r\n{ ---------------------------------------------------------------------\r\n TByteHelper\r\n ---------------------------------------------------------------------}\r\n\r\nClass Function TByteHelper.Parse(const AString: string): Byte; inline;\r\n\r\nbegin\r\n Result:=StrToInt(AString);\r\nend;\r\n\r\nClass Function TByteHelper.Size: Integer; inline;\r\n\r\nbegin\r\n Result:=1;\r\nend;\r\n\r\nClass Function TByteHelper.ToString(const AValue: Byte): string; overload; inline;\r\n\r\nbegin\r\n Result:=IntToStr(AValue);\r\nend;\r\n\r\nClass Function TByteHelper.TryParse(const AString: string; out AValue: Byte): Boolean; inline;\r\n\r\nVar\r\n C : Integer;\r\n\r\nbegin\r\n Val(AString,AValue,C);\r\n Result:=(C=0);\r\nend;\r\n\r\nFunction TByteHelper.ToBoolean: Boolean; inline;\r\n\r\nbegin\r\n Result:=(Self<>0);\r\nend;\r\n\r\nFunction TByteHelper.ToDouble: Double; inline;\r\n\r\nbegin\r\n Result:=Self;\r\nend;\r\n\r\nFunction TByteHelper.ToExtended: Extended; inline;\r\n\r\nbegin\r\n Result:=Self;\r\nend;\r\n\r\nFunction TByteHelper.ToBinString: string; inline;\r\n\r\nbegin\r\n Result:=BinStr(Self,Size*8);\r\nend;\r\n\r\nFunction TByteHelper.ToHexString(const AMinDigits: Integer): string;\r\noverload; inline;\r\n\r\nbegin\r\n Result:=IntToHex(Self,AMinDigits);\r\nend;\r\n\r\nFunction TByteHelper.ToHexString: string; overload; inline;\r\n\r\nbegin\r\n Result:=IntToHex(Self,Size*2);\r\nend;\r\n\r\nFunction TByteHelper.ToString: string; overload; inline;\r\n\r\nbegin\r\n Result:=IntToStr(Self);\r\nend;\r\n\r\nFunction TByteHelper.SetBit(const index: TByteBitIndex) : Byte; inline;\r\n\r\nbegin\r\n Self := Self or (Byte(1) shl index);\r\n Result:=Self;\r\nend;\r\n\r\nFunction TByteHelper.ClearBit(const index: TByteBitIndex) : Byte; inline;\r\n\r\nbegin\r\n Self:=Self and not Byte((Byte(1) shl index));\r\n Result:=Self;\r\nend;\r\n\r\nFunction TByteHelper.ToggleBit(const index: TByteBitIndex) : Byte; inline;\r\n\r\nbegin\r\n Self := Self xor Byte((Byte(1) shl index));\r\n Result:=Self;\r\nend;\r\n\r\nFunction TByteHelper.TestBit(const Index: TByteBitIndex):Boolean; inline;\r\n\r\nbegin\r\n Result := (Self and Byte((Byte(1) shl index)))<>0;\r\nend;\r\n\r\n{ ---------------------------------------------------------------------\r\n TShortintHelper\r\n ---------------------------------------------------------------------}\r\n\r\nClass Function TShortIntHelper.Parse(const AString: string): ShortInt; inline;\r\n\r\nbegin\r\n Result:=StrToInt(AString);\r\nend;\r\n\r\nClass Function TShortIntHelper.Size: Integer; inline;\r\n\r\nbegin\r\n Result:=1;\r\nend;\r\n\r\nClass Function TShortIntHelper.ToString(const AValue: ShortInt): string; overload; inline;\r\n\r\nbegin\r\n Result:=IntToStr(AValue);\r\nend;\r\n\r\nClass Function TShortIntHelper.TryParse(const AString: string; out AValue: ShortInt): Boolean; inline;\r\n\r\nVar\r\n C : Integer;\r\n\r\nbegin\r\n Val(AString,AValue,C);\r\n Result:=(C=0);\r\nend;\r\n\r\nFunction TShortIntHelper.ToBoolean: Boolean; inline;\r\n\r\nbegin\r\n Result:=(Self<>0);\r\nend;\r\n\r\nFunction TShortIntHelper.ToDouble: Double; inline;\r\n\r\nbegin\r\n Result:=Self;\r\nend;\r\n\r\nFunction TShortIntHelper.ToExtended: Extended; inline;\r\n\r\nbegin\r\n Result:=Self;\r\nend;\r\n\r\nFunction TShortIntHelper.ToBinString: string; inline;\r\n\r\nbegin\r\n Result:=BinStr(Self,Size*8);\r\nend;\r\n\r\nFunction TShortIntHelper.ToHexString(const AMinDigits: Integer): string; overload; inline;\r\n\r\nVar\r\n B : Word;\r\n U : TJSUInt8Array;\r\n S : TJSInt8array;\r\n\r\nbegin\r\n if Self>=0 then\r\n B:=Self\r\n else\r\n begin\r\n S:=TJSInt8Array.New(1);\r\n S[0]:=Self;\r\n U:=TJSUInt8Array.New(S);\r\n B:=U[0];\r\n if AMinDigits>2 then\r\n B:=$FF00+B;\r\n end;\r\n Result:=IntToHex(B,AMinDigits);\r\nend;\r\n\r\nFunction TShortIntHelper.ToHexString: string; overload; inline;\r\n\r\nbegin\r\n Result:=ToHexString(Size*2);\r\nend;\r\n\r\nFunction TShortIntHelper.ToString: string; overload; inline;\r\n\r\nbegin\r\n Result:=IntToStr(Self);\r\nend;\r\n\r\nFunction TShortIntHelper.SetBit(const index: TShortIntBitIndex) : ShortInt; inline;\r\n\r\nbegin\r\n Self := Self or (ShortInt(1) shl index);\r\n Result:=Self;\r\nend;\r\n\r\nFunction TShortIntHelper.ClearBit(const index: TShortIntBitIndex) : ShortInt; inline;\r\n\r\nbegin\r\n Self:=Self and not ShortInt((ShortInt(1) shl index));\r\n Result:=Self;\r\nend;\r\n\r\nFunction TShortIntHelper.ToggleBit(const index: TShortIntBitIndex) : ShortInt; inline;\r\n\r\nbegin\r\n Self := Self xor ShortInt((ShortInt(1) shl index));\r\n Result:=Self;\r\nend;\r\n\r\nFunction TShortIntHelper.TestBit(const Index: TShortIntBitIndex):Boolean; inline;\r\n\r\nbegin\r\n Result := (Self and ShortInt((ShortInt(1) shl index)))<>0;\r\nend;\r\n\r\n{ ---------------------------------------------------------------------\r\n TSmallintHelper\r\n ---------------------------------------------------------------------}\r\n\r\nClass Function TSmallIntHelper.Parse(const AString: string): SmallInt; inline;\r\n\r\nbegin\r\n Result:=StrToInt(AString);\r\nend;\r\n\r\nClass Function TSmallIntHelper.Size: Integer; inline;\r\n\r\nbegin\r\n Result:=2;\r\nend;\r\n\r\nClass Function TSmallIntHelper.ToString(const AValue: SmallInt): string; overload; inline;\r\n\r\nbegin\r\n Result:=IntToStr(AValue);\r\nend;\r\n\r\nClass Function TSmallIntHelper.TryParse(const AString: string; out AValue: SmallInt): Boolean; inline;\r\n\r\nVar\r\n C : Integer;\r\n\r\nbegin\r\n Val(AString,AValue,C);\r\n Result:=(C=0);\r\nend;\r\n\r\nFunction TSmallIntHelper.ToBoolean: Boolean; inline;\r\n\r\nbegin\r\n Result:=(Self<>0);\r\nend;\r\n\r\nFunction TSmallIntHelper.ToDouble: Double; inline;\r\n\r\nbegin\r\n Result:=Self;\r\nend;\r\n\r\nFunction TSmallIntHelper.ToExtended: Extended; inline;\r\n\r\nbegin\r\n Result:=Self;\r\nend;\r\n\r\nFunction TSmallIntHelper.ToBinString: string; inline;\r\n\r\nbegin\r\n Result:=BinStr(Self,Size*8);\r\nend;\r\n\r\nFunction TSmallIntHelper.ToHexString(const AMinDigits: Integer): string; overload; inline;\r\n\r\nVar\r\n B : Cardinal;\r\n U : TJSUInt16Array;\r\n S : TJSInt16array;\r\n\r\n\r\nbegin\r\n if Self>=0 then\r\n B:=Self\r\n else\r\n begin\r\n S:=TJSInt16Array.New(1);\r\n S[0]:=Self;\r\n U:=TJSUInt16Array.New(S);\r\n B:=U[0];\r\n if AMinDigits>6 then\r\n B:=$FFFF0000+B\r\n else if AMinDigits>4 then\r\n B:=$FF0000+B;\r\n end;\r\n Result:=IntToHex(B,AMinDigits);\r\nend;\r\n\r\nFunction TSmallIntHelper.ToHexString: string; overload; inline;\r\n\r\nbegin\r\n Result:=ToHexString(Size*2);\r\nend;\r\n\r\n\r\nFunction TSmallIntHelper.ToString: string; overload; inline;\r\n\r\nbegin\r\n Result:=IntToStr(Self);\r\nend;\r\n\r\nFunction TSmallIntHelper.SetBit(const index: TSmallIntBitIndex) : SmallInt; inline;\r\n\r\nbegin\r\n Self := Self or (SmallInt(1) shl index);\r\n Result:=Self;\r\nend;\r\n\r\nFunction TSmallIntHelper.ClearBit(const index: TSmallIntBitIndex) : SmallInt; inline;\r\n\r\nbegin\r\n Self:=Self and not SmallInt((SmallInt(1) shl index));\r\n Result:=Self;\r\nend;\r\n\r\nFunction TSmallIntHelper.ToggleBit(const index: TSmallIntBitIndex) : SmallInt; inline;\r\n\r\nbegin\r\n Self := Self xor SmallInt((SmallInt(1) shl index));\r\n Result:=Self;\r\nend;\r\n\r\nFunction TSmallIntHelper.TestBit(const Index: TSmallIntBitIndex):Boolean; inline;\r\n\r\nbegin\r\n Result := (Self and SmallInt((SmallInt(1) shl index)))<>0;\r\nend;\r\n\r\n{ ---------------------------------------------------------------------\r\n TWordHelper\r\n ---------------------------------------------------------------------}\r\n\r\nclass function TWordHelper.FromBytes(const ALow, AHigh: Byte): Word;\r\nconst\r\n cBitPerByte = 8;\r\nbegin\r\n Result := ALow + (AHigh shl cBitPerByte);\r\nend;\r\n\r\nClass Function TWordHelper.Parse(const AString: string): Word; inline;\r\n\r\nbegin\r\n Result:=StrToInt(AString);\r\nend;\r\n\r\nClass Function TWordHelper.Size: Integer; inline;\r\n\r\nbegin\r\n Result:=2;\r\nend;\r\n\r\nprocedure TWordHelper.ToBytes(out ALow, AHigh: Byte);\r\nconst\r\n cMask: Byte = $FF;\r\n cBitPerByte = 8;\r\nbegin\r\n ALow := Self and cMask;\r\n AHigh := (Self and (cMask shl cBitPerByte)) shr cBitPerByte;\r\nend;\r\n\r\nClass Function TWordHelper.ToString(const AValue: Word): string; overload; inline;\r\n\r\nbegin\r\n Result:=IntToStr(AValue);\r\nend;\r\n\r\nClass Function TWordHelper.TryParse(const AString: string; out AValue: Word): Boolean; inline;\r\n\r\nVar\r\n C : Integer;\r\n\r\nbegin\r\n Val(AString,AValue,C);\r\n Result:=(C=0);\r\nend;\r\n\r\nFunction TWordHelper.ToBoolean: Boolean; inline;\r\n\r\nbegin\r\n Result:=(Self<>0);\r\nend;\r\n\r\nFunction TWordHelper.ToDouble: Double; inline;\r\n\r\nbegin\r\n Result:=Self;\r\nend;\r\n\r\nFunction TWordHelper.ToExtended: Extended; inline;\r\n\r\nbegin\r\n Result:=Self;\r\nend;\r\n\r\nFunction TWordHelper.ToBinString: string; inline;\r\n\r\nbegin\r\n Result:=BinStr(Self,Size*8);\r\nend;\r\n\r\nFunction TWordHelper.ToHexString(const AMinDigits: Integer): string;\r\noverload; inline;\r\n\r\nbegin\r\n Result:=IntToHex(Self,AMinDigits);\r\nend;\r\n\r\nFunction TWordHelper.ToHexString: string; overload; inline;\r\n\r\nbegin\r\n Result:=IntToHex(Self,Size*2);\r\nend;\r\n\r\n\r\nFunction TWordHelper.ToString: string; overload; inline;\r\n\r\nbegin\r\n Result:=IntToStr(Self);\r\nend;\r\n\r\nFunction TWordHelper.SetBit(const index: TWordBitIndex) : Word; inline;\r\n\r\nbegin\r\n Self := Self or (Word(1) shl index);\r\n Result:=Self;\r\nend;\r\n\r\nFunction TWordHelper.ClearBit(const index: TWordBitIndex) : Word; inline;\r\n\r\nbegin\r\n Self:=Self and not Word((Word(1) shl index));\r\n Result:=Self;\r\nend;\r\n\r\nFunction TWordHelper.ToggleBit(const index: TWordBitIndex) : Word; inline;\r\n\r\nbegin\r\n Self := Self xor Word((Word(1) shl index));\r\n Result:=Self;\r\nend;\r\n\r\nFunction TWordHelper.TestBit(const Index: TWordBitIndex):Boolean; inline;\r\n\r\nbegin\r\n Result := (Self and Word((Word(1) shl index)))<>0;\r\nend;\r\n\r\n{ ---------------------------------------------------------------------\r\n TCardinalHelper\r\n ---------------------------------------------------------------------}\r\n\r\nClass Function TCardinalHelper.Parse(const AString: string): Cardinal; inline;\r\n\r\nbegin\r\n Result:=StrToInt(AString);\r\nend;\r\n\r\nClass Function TCardinalHelper.Size: Integer; inline;\r\n\r\nbegin\r\n Result:=4;\r\nend;\r\n\r\nClass Function TCardinalHelper.ToString(const AValue: Cardinal): string; overload; inline;\r\n\r\nbegin\r\n Result:=IntToStr(AValue);\r\nend;\r\n\r\nClass Function TCardinalHelper.TryParse(const AString: string; out AValue: Cardinal): Boolean; inline;\r\n\r\nVar\r\n C : Integer;\r\n\r\nbegin\r\n Val(AString,AValue,C);\r\n Result:=(C=0);\r\nend;\r\n\r\nFunction TCardinalHelper.ToBoolean: Boolean; inline;\r\n\r\nbegin\r\n Result:=(Self<>0);\r\nend;\r\n\r\nFunction TCardinalHelper.ToDouble: Double; inline;\r\n\r\nbegin\r\n Result:=Self;\r\nend;\r\n\r\nFunction TCardinalHelper.ToExtended: Extended; inline;\r\n\r\nbegin\r\n Result:=Self;\r\nend;\r\n\r\nFunction TCardinalHelper.ToBinString: string; inline;\r\n\r\nbegin\r\n Result:=BinStr(Self,Size*8);\r\nend;\r\n\r\nFunction TCardinalHelper.ToHexString(const AMinDigits: Integer): string;\r\noverload; inline;\r\n\r\nbegin\r\n Result:=IntToHex(Self,AMinDigits);\r\nend;\r\n\r\nFunction TCardinalHelper.ToHexString: string; overload; inline;\r\n\r\nbegin\r\n Result:=ToHexString(Size*2);\r\nend;\r\n\r\nFunction TCardinalHelper.ToString: string; overload; inline;\r\n\r\nbegin\r\n Result:=IntToStr(Self);\r\nend;\r\n\r\nFunction TCardinalHelper.SetBit(const index: TCardinalBitIndex) : Cardinal; inline;\r\n\r\nbegin\r\n Self := Self or (Cardinal(1) shl index);\r\n Result:=Self;\r\nend;\r\n\r\nFunction TCardinalHelper.ClearBit(const index: TCardinalBitIndex) : Cardinal; inline;\r\n\r\nbegin\r\n Self:=Self and not Cardinal((Cardinal(1) shl index));\r\n Result:=Self;\r\nend;\r\n\r\nFunction TCardinalHelper.ToggleBit(const index: TCardinalBitIndex) : Cardinal; inline;\r\n\r\nbegin\r\n Self := Self xor Cardinal((Cardinal(1) shl index));\r\n Result:=Self;\r\nend;\r\n\r\nFunction TCardinalHelper.TestBit(const Index: TCardinalBitIndex):Boolean; inline;\r\n\r\nbegin\r\n Result := (Self and Cardinal((Cardinal(1) shl index)))<>0;\r\nend;\r\n\r\n\r\n{ ---------------------------------------------------------------------\r\n TIntegerHelper\r\n ---------------------------------------------------------------------}\r\n\r\nClass Function TIntegerHelper.Parse(const AString: string): Integer; inline;\r\n\r\nbegin\r\n Result:=StrToInt(AString);\r\nend;\r\n\r\nClass Function TIntegerHelper.Size: Integer; inline;\r\n\r\nbegin\r\n Result:=4;\r\nend;\r\n\r\nClass Function TIntegerHelper.ToString(const AValue: Integer): string; overload; inline;\r\n\r\nbegin\r\n Result:=IntToStr(AValue);\r\nend;\r\n\r\nClass Function TIntegerHelper.TryParse(const AString: string; out AValue: Integer): Boolean; inline;\r\n\r\nVar\r\n C : Integer;\r\n\r\nbegin\r\n Val(AString,AValue,C);\r\n Result:=(C=0);\r\nend;\r\n\r\nFunction TIntegerHelper.ToBoolean: Boolean; inline;\r\n\r\nbegin\r\n Result:=(Self<>0);\r\nend;\r\n\r\nFunction TIntegerHelper.ToDouble: Double; inline;\r\n\r\nbegin\r\n Result:=Self;\r\nend;\r\n\r\nFunction TIntegerHelper.ToExtended: Extended; inline;\r\n\r\nbegin\r\n Result:=Self;\r\nend;\r\n\r\nFunction TIntegerHelper.ToBinString: string; inline;\r\n\r\nbegin\r\n Result:=BinStr(Self,Size*8);\r\nend;\r\n\r\nFunction TIntegerHelper.ToHexString(const AMinDigits: Integer): string;\r\noverload; inline;\r\n\r\n\r\nVar\r\n B : Word;\r\n U : TJSUInt32Array;\r\n S : TJSInt32array;\r\n\r\nbegin\r\n if Self>=0 then\r\n B:=Self\r\n else\r\n begin\r\n S:=TJSInt32Array.New(1);\r\n S[0]:=Self;\r\n U:=TJSUInt32Array.New(S);\r\n B:=U[0];\r\n end;\r\n Result:=IntToHex(B,AMinDigits);\r\nend;\r\n\r\nFunction TIntegerHelper.ToHexString: string; overload; inline;\r\n\r\nbegin\r\n Result:=ToHexString(Size*2);\r\nend;\r\n\r\n\r\nFunction TIntegerHelper.ToString: string; overload; inline;\r\n\r\nbegin\r\n Result:=IntToStr(Self);\r\nend;\r\n\r\nFunction TIntegerHelper.SetBit(const index: TIntegerBitIndex) : Integer; inline;\r\n\r\nbegin\r\n Self := Self or (Integer(1) shl index);\r\n Result:=Self;\r\nend;\r\n\r\nFunction TIntegerHelper.ClearBit(const index: TIntegerBitIndex) : Integer; inline;\r\n\r\nbegin\r\n Self:=Self and not Integer((Integer(1) shl index));\r\n Result:=Self;\r\nend;\r\n\r\nFunction TIntegerHelper.ToggleBit(const index: TIntegerBitIndex) : Integer; inline;\r\n\r\nbegin\r\n Self := Self xor Integer((Integer(1) shl index));\r\n Result:=Self;\r\nend;\r\n\r\nFunction TIntegerHelper.TestBit(const Index: TIntegerBitIndex):Boolean; inline;\r\n\r\nbegin\r\n Result := (Self and Integer((Integer(1) shl index)))<>0;\r\nend;\r\n\r\n{ ---------------------------------------------------------------------\r\n TUInt64Helper\r\n ---------------------------------------------------------------------}\r\n\r\nClass Function TUInt64Helper.ToString(const AValue: UInt64): string; overload; inline;\r\nbegin\r\n Result:=IntToStr(AValue);\r\nend;\r\n\r\nFunction TUInt64Helper.ToString: string; overload; inline;\r\nbegin\r\n Result:=IntToStr(Self);\r\nend;\r\n\r\n\r\n{ ---------------------------------------------------------------------\r\n TNativeIntHelper\r\n ---------------------------------------------------------------------}\r\n\r\nClass Function TNativeIntHelper.Parse(const AString: string): NativeInt; inline;\r\n\r\nbegin\r\n Result:=StrToInt(AString);\r\nend;\r\n\r\nClass Function TNativeIntHelper.Size: Integer; inline;\r\n\r\nbegin\r\n Result:=7;\r\nend;\r\n\r\nClass Function TNativeIntHelper.ToString(const AValue: NativeInt): string; overload; inline;\r\n\r\nbegin\r\n Result:=IntToStr(AValue);\r\nend;\r\n\r\nClass Function TNativeIntHelper.TryParse(const AString: string; out AValue: NativeInt): Boolean; inline;\r\n\r\nVar\r\n C : Integer;\r\n\r\nbegin\r\n Val(AString,AValue,C);\r\n Result:=(C=0);\r\nend;\r\n\r\nFunction TNativeIntHelper.ToBoolean: Boolean; inline;\r\n\r\nbegin\r\n Result:=(Self<>0);\r\nend;\r\n\r\nFunction TNativeIntHelper.ToDouble: Double; inline;\r\n\r\nbegin\r\n Result:=Self;\r\nend;\r\n\r\nFunction TNativeIntHelper.ToExtended: Extended; inline;\r\n\r\nbegin\r\n Result:=Self;\r\nend;\r\n\r\nFunction TNativeIntHelper.ToBinString: string; inline;\r\n\r\nbegin\r\n Result:=BinStr(Self,Size*8);\r\nend;\r\n\r\nFunction TNativeIntHelper.ToHexString(const AMinDigits: Integer): string;\r\noverload; inline;\r\n\r\nbegin\r\n Result:=IntToHex(Self,AMinDigits);\r\nend;\r\n\r\nFunction TNativeIntHelper.ToHexString: string; overload; inline;\r\n\r\nbegin\r\n Result:=IntToHex(Self,Size*2);\r\nend;\r\n\r\nFunction TNativeIntHelper.ToString: string; overload; inline;\r\n\r\nbegin\r\n Result:=IntToStr(Self);\r\nend;\r\n\r\nFunction TNativeIntHelper.SetBit(const index: TNativeIntBitIndex) : NativeInt; inline;\r\n\r\nbegin\r\n Self := Self or (NativeInt(1) shl index);\r\n Result:=Self;\r\nend;\r\n\r\nFunction TNativeIntHelper.ClearBit(const index: TNativeIntBitIndex) : NativeInt; inline;\r\n\r\nbegin\r\n Self:=Self and not NativeInt((NativeInt(1) shl index));\r\n Result:=Self;\r\nend;\r\n\r\nFunction TNativeIntHelper.ToggleBit(const index: TNativeIntBitIndex) : NativeInt; inline;\r\n\r\nbegin\r\n Self := Self xor NativeInt((NativeInt(1) shl index));\r\n Result:=Self;\r\nend;\r\n\r\nFunction TNativeIntHelper.TestBit(const Index: TNativeIntBitIndex):Boolean; inline;\r\n\r\nbegin\r\n Result := (Self and NativeInt((NativeInt(1) shl index)))<>0;\r\nend;\r\n\r\n\r\n{ ---------------------------------------------------------------------\r\n TNativeUIntHelper\r\n ---------------------------------------------------------------------}\r\n\r\nClass Function TNativeUIntHelper.Parse(const AString: string): NativeUInt; inline;\r\n\r\nbegin\r\n Result:=StrToInt(AString);\r\nend;\r\n\r\nClass Function TNativeUIntHelper.Size: Integer; inline;\r\n\r\nbegin\r\n Result:=7;\r\nend;\r\n\r\nClass Function TNativeUIntHelper.ToString(const AValue: NativeUInt): string; overload; inline;\r\n\r\nbegin\r\n Result:=IntToStr(AValue);\r\nend;\r\n\r\nClass Function TNativeUIntHelper.TryParse(const AString: string; out AValue: NativeUInt): Boolean; inline;\r\n\r\nVar\r\n C : Integer;\r\n\r\nbegin\r\n Val(AString,AValue,C);\r\n Result:=(C=0);\r\nend;\r\n\r\nFunction TNativeUIntHelper.ToBoolean: Boolean; inline;\r\n\r\nbegin\r\n Result:=(Self<>0);\r\nend;\r\n\r\nFunction TNativeUIntHelper.ToDouble: Double; inline;\r\n\r\nbegin\r\n Result:=Self;\r\nend;\r\n\r\nFunction TNativeUIntHelper.ToExtended: Extended; inline;\r\n\r\nbegin\r\n Result:=Self;\r\nend;\r\n\r\nFunction TNativeUIntHelper.ToBinString: string; inline;\r\n\r\nbegin\r\n Result:=BinStr(Self,Size*8);\r\nend;\r\n\r\nFunction TNativeUIntHelper.ToHexString(const AMinDigits: Integer): string;\r\noverload; inline;\r\n\r\nbegin\r\n Result:=IntToHex(Self,AMinDigits);\r\nend;\r\n\r\nFunction TNativeUIntHelper.ToHexString: string; overload; inline;\r\n\r\nbegin\r\n Result:=IntToHex(Self,Size*2);\r\nend;\r\n\r\nFunction TNativeUIntHelper.ToSingle: Single; inline;\r\n\r\nbegin\r\n Result:=Self;\r\nend;\r\n\r\nFunction TNativeUIntHelper.ToString: string; overload; inline;\r\n\r\nbegin\r\n Result:=IntToStr(Self);\r\nend;\r\n\r\nFunction TNativeUIntHelper.SetBit(const index: TNativeUIntBitIndex) : NativeUInt; inline;\r\n\r\nbegin\r\n Self := Self or (NativeUInt(1) shl index);\r\n Result:=Self;\r\nend;\r\n\r\nFunction TNativeUIntHelper.ClearBit(const index: TNativeUIntBitIndex) : NativeUInt; inline;\r\n\r\nbegin\r\n Self:=Self and not NativeUInt((NativeUInt(1) shl index));\r\n Result:=Self;\r\nend;\r\n\r\nFunction TNativeUIntHelper.ToggleBit(const index: TNativeUIntBitIndex) : NativeUInt; inline;\r\n\r\nbegin\r\n Self := Self xor NativeUInt((NativeUInt(1) shl index));\r\n Result:=Self;\r\nend;\r\n\r\nFunction TNativeUIntHelper.TestBit(const Index: TNativeUIntBitIndex):Boolean; inline;\r\n\r\nbegin\r\n Result := (Self and NativeUInt((NativeUInt(1) shl index)))<>0;\r\nend;\r\n\r\n{ ---------------------------------------------------------------------\r\n TBooleanHelper\r\n ---------------------------------------------------------------------}\r\n\r\nClass Function TBooleanHelper.Parse(const S: string): Boolean; inline;\r\n\r\nbegin\r\n Result:=StrToBool(S);\r\nend;\r\n\r\nClass Function TBooleanHelper.Size: Integer; inline;\r\n\r\nbegin\r\n Result:=1;\r\nend;\r\n\r\nClass Function TBooleanHelper.ToString(const AValue: Boolean; UseBoolStrs: TUseBoolStrs = TUseBoolStrs.False): string; overload; inline;\r\n\r\nbegin\r\n Result:=BoolToStr(AValue,UseBoolStrs=TUseBoolStrs.True);\r\nend;\r\n\r\nClass Function TBooleanHelper.TryToParse(const S: string; out AValue: Boolean): Boolean; inline;\r\n\r\nbegin\r\n Result:=TryStrToBool(S,AValue);\r\nend;\r\n\r\nFunction TBooleanHelper.ToInteger: Integer; inline;\r\n\r\nbegin\r\n Result:=Integer(Self);\r\nend;\r\n\r\nFunction TBooleanHelper.ToString(UseBoolStrs: TUseBoolStrs = TUseBoolStrs.False): string; overload; inline;\r\n\r\nbegin\r\n Result:=BoolToStr(Self,UseBoolStrs=TUseBoolStrs.True);\r\nend;\r\n\r\n{ ---------------------------------------------------------------------\r\n TByteBoolHelper\r\n ---------------------------------------------------------------------}\r\n\r\nClass Function TByteBoolHelper.Parse(const S: string): Boolean; inline;\r\n\r\nbegin\r\n Result:=StrToBool(S);\r\nend;\r\n\r\nClass Function TByteBoolHelper.Size: Integer; inline;\r\n\r\nbegin\r\n Result:=1;\r\nend;\r\n\r\nClass Function TByteBoolHelper.ToString(const AValue: Boolean; UseBoolStrs: Boolean = False): string; overload; inline;\r\n\r\nbegin\r\n Result:=BoolToStr(AValue,UseBoolStrs);\r\nend;\r\n\r\nClass Function TByteBoolHelper.TryToParse(const S: string; out AValue: Boolean): Boolean; inline;\r\n\r\nbegin\r\n Result:=TryStrToBool(S,AValue);\r\nend;\r\n\r\nFunction TByteBoolHelper.ToInteger: Integer; inline;\r\n\r\nbegin\r\n Result:=Integer(Self);\r\nend;\r\n\r\nFunction TByteBoolHelper.ToString(UseBoolStrs: Boolean = False): string; overload; inline;\r\n\r\nbegin\r\n Result:=BoolToStr(Self,UseBoolStrs);\r\nend;\r\n\r\n{ ---------------------------------------------------------------------\r\n TWordBoolHelper\r\n ---------------------------------------------------------------------}\r\n\r\nClass Function TWordBoolHelper.Parse(const S: string): Boolean; inline;\r\n\r\nbegin\r\n Result:=StrToBool(S);\r\nend;\r\n\r\nClass Function TWordBoolHelper.Size: Integer; inline;\r\n\r\nbegin\r\n Result:=2;\r\nend;\r\n\r\nClass Function TWordBoolHelper.ToString(const AValue: Boolean; UseBoolStrs: boolean = False): string; overload; inline;\r\n\r\nbegin\r\n Result:=BoolToStr(AValue,UseBoolStrs);\r\nend;\r\n\r\nClass Function TWordBoolHelper.TryToParse(const S: string; out AValue: Boolean): Boolean; inline;\r\n\r\nbegin\r\n Result:=TryStrToBool(S,AValue);\r\nend;\r\n\r\nFunction TWordBoolHelper.ToInteger: Integer; inline;\r\n\r\nbegin\r\n Result:=Integer(Self);\r\nend;\r\n\r\nFunction TWordBoolHelper.ToString(UseBoolStrs: Boolean = False): string; overload; inline;\r\n\r\nbegin\r\n Result:=BoolToStr(Self,UseBoolStrs);\r\nend;\r\n\r\n{ ---------------------------------------------------------------------\r\n TLongBoolHelper\r\n ---------------------------------------------------------------------}\r\n\r\n\r\nClass Function TLongBoolHelper.Parse(const S: string): Boolean; inline;\r\n\r\nbegin\r\n Result:=StrToBool(S);\r\nend;\r\n\r\nClass Function TLongBoolHelper.Size: Integer; inline;\r\n\r\nbegin\r\n Result:=4;\r\nend;\r\n\r\nClass Function TLongBoolHelper.ToString(const AValue: Boolean; UseBoolStrs: Boolean = False): string; overload; inline;\r\n\r\nbegin\r\n Result:=BoolToStr(AValue,UseBoolStrs);\r\nend;\r\n\r\nClass Function TLongBoolHelper.TryToParse(const S: string; out AValue: Boolean): Boolean; inline;\r\n\r\nbegin\r\n Result:=TryStrToBool(S,AValue);\r\nend;\r\n\r\nFunction TLongBoolHelper.ToInteger: Integer; inline;\r\n\r\nbegin\r\n Result:=Integer(Self);\r\nend;\r\n\r\nFunction TLongBoolHelper.ToString(UseBoolStrs: Boolean = False): string; overload; inline;\r\n\r\nbegin\r\n Result:=BoolToStr(Self,UseBoolStrs);\r\nend;\r\n\r\n{ TStringBuilder }\r\n\r\nconstructor TStringBuilder.Create;\r\nbegin\r\n Create(DefaultCapacity,Maxint);\r\nend;\r\n\r\nconstructor TStringBuilder.Create(const AValue: String; aCapacity: Integer);\r\nbegin\r\n Create(aCapacity,Maxint);\r\n if (system.Length(AValue)>0) then\r\n Append(AValue);\r\nend;\r\n\r\n\r\nconstructor TStringBuilder.Create(const AValue: String; StartIndex, Alength,\r\n aCapacity: Integer);\r\nbegin\r\n Create(Copy(AValue,StartIndex+1,Alength), aCapacity);\r\nend;\r\n\r\nconstructor TStringBuilder.Create(aCapacity, aMaxCapacity: Integer);\r\nbegin\r\n FMaxCapacity:=aMaxCapacity;\r\n Capacity:=aCapacity;\r\nend;\r\n\r\nconstructor TStringBuilder.Create(aCapacity: Integer);\r\nbegin\r\n Create(aCapacity,MaxInt);\r\nend;\r\n\r\nconstructor TStringBuilder.Create(const AValue: String);\r\nbegin\r\n Create(aValue,DefaultCapacity);\r\nend;\r\n\r\n\r\n{ Property getter/setter }\r\n\r\nfunction TStringBuilder.GetLength: Integer;\r\nbegin\r\n Result:=System.Length(FData);\r\nend;\r\n\r\nfunction TStringBuilder.GetCapacity: Integer;\r\nbegin\r\n Result:=System.Length(FData);\r\nend;\r\n\r\nfunction TStringBuilder.GetC(Index: Integer): Char;\r\nbegin\r\n CheckNegative(Index + 1,'Index');\r\n CheckRange(Index + 1, 0, Length);\r\n Result:=FData[Index + 1];\r\nend;\r\n\r\nprocedure TStringBuilder.SetC(Index: Integer; AValue: Char);\r\nbegin\r\n CheckNegative(Index + 1, 'Index');\r\n CheckRange(Index + 1, 0, Length);\r\n FData[Index + 1] := AValue;\r\nend;\r\n\r\nprocedure TStringBuilder.SetLength(AValue: Integer);\r\n\r\nbegin\r\n CheckNegative(AValue,'AValue');\r\n CheckRange(AValue,0,MaxCapacity);\r\n System.SetLength(FData,aValue);\r\nend;\r\n\r\n{ Check functions }\r\n\r\n\r\n\r\nprocedure TStringBuilder.CheckRange(Idx, Count, MaxLen: Integer);\r\n\r\nbegin\r\n if (Idx<0) or (Idx+Count>MaxLen) then\r\n Raise ERangeError.CreateFmt(SListIndexError,[Idx]);\r\nend;\r\n\r\n\r\nprocedure TStringBuilder.CheckNegative(const AValue: Integer;\r\n const AName: String);\r\n\r\nbegin\r\n if (AValue<0) then\r\n Raise ERangeError.CreateFmt(SParamIsNegative,[AName])\r\nend;\r\n\r\n{ These do the actual Appending/Inserting }\r\n\r\nprocedure TStringBuilder.DoAppend(const S: String);\r\n\r\nbegin\r\n FData:=FData+S;\r\nend;\r\n\r\nprocedure TStringBuilder.DoAppend(const AValue: Array of Char; Idx, aCount: Integer\r\n );\r\n\r\nVar\r\n S : String;\r\n I : Integer;\r\n\r\nbegin\r\n S:='';\r\n CheckRange(Idx,aCount,System.Length(AValue));\r\n for I:=Idx to Idx+aCount-1 do\r\n S:=S+aValue[I];\r\n DoAppend(S);\r\nend;\r\n\r\nprocedure TStringBuilder.DoInsert(Index: Integer; const AValue: String);\r\n\r\nbegin\r\n CheckRange(Index,0,Length-1);\r\n System.Insert(aValue,FData,Index+1);\r\nend;\r\n\r\nprocedure TStringBuilder.DoInsert(Index: Integer; const AValue: Array of Char;\r\n StartIndex, aCharCount: Integer);\r\n\r\nVar\r\n I : Integer;\r\n S : String;\r\n\r\nbegin\r\n CheckRange(Index,0,Length-1);\r\n CheckNegative(StartIndex,'StartIndex');\r\n CheckNegative(aCharCount,'SBCharCount');\r\n CheckRange(StartIndex,aCharCount,System.Length(AValue));\r\n S:='';\r\n for I:=StartIndex to StartIndex+aCharCount-1 do\r\n S:=S+aValue[I];\r\n DoInsert(Index,S);\r\nend;\r\n\r\n{ Public routines for appending }\r\n\r\nfunction TStringBuilder.Append(const AValue: UInt64): TStringBuilder;\r\nbegin\r\n DoAppend(IntToStr(AValue));\r\n Result:=self;\r\nend;\r\n\r\nfunction TStringBuilder.Append(const AValue: Array of Char): TStringBuilder;\r\n\r\nvar\r\n I,L: Integer;\r\n\r\nbegin\r\n I:=-1;\r\n L:=System.Length(AValue);\r\n If L=0 then\r\n Exit(Self);\r\n Repeat\r\n Inc(I);\r\n Until (I>=L) or (AValue[I]=#0);\r\n DoAppend(AValue,0,I);\r\n Result:=Self;\r\nend;\r\n\r\nfunction TStringBuilder.Append(const AValue: Single): TStringBuilder;\r\nbegin\r\n DoAppend(FloatToStr(AValue));\r\n Result:=self;\r\nend;\r\n\r\nfunction TStringBuilder.Append(const AValue: Word): TStringBuilder;\r\nbegin\r\n Append(IntToStr(AValue));\r\n Result:=self;\r\nend;\r\n\r\nfunction TStringBuilder.Append(const AValue: Cardinal): TStringBuilder;\r\nbegin\r\n DoAppend(IntToStr(AValue));\r\n Result:=self;\r\nend;\r\n\r\nfunction TStringBuilder.Append(const AValue: Char; RepeatCount: Integer\r\n ): TStringBuilder;\r\nbegin\r\n DoAppend(StringOfChar(AValue,RepeatCount));\r\n Result:=Self;\r\nend;\r\n\r\n\r\nfunction TStringBuilder.Append(const AValue: Shortint): TStringBuilder;\r\nbegin\r\n DoAppend(IntToStr(AValue));\r\n Result:=Self;\r\nend;\r\n\r\nfunction TStringBuilder.Append(const AValue: Char): TStringBuilder;\r\nbegin\r\n DoAppend(AValue);\r\n Result:=Self;\r\nend;\r\n\r\nfunction TStringBuilder.Append(const AValue: Currency): TStringBuilder;\r\nbegin\r\n DoAppend(CurrToStr(AValue));\r\n Result:=Self;\r\nend;\r\n\r\nfunction TStringBuilder.Append(const AValue: Boolean): TStringBuilder;\r\nbegin\r\n DoAppend(BoolToStr(AValue, True));\r\n Result:=Self;\r\nend;\r\n\r\nfunction TStringBuilder.Append(const AValue: Byte): TStringBuilder;\r\nbegin\r\n DoAppend(IntToStr(AValue));\r\n Result:=Self;\r\nend;\r\n\r\nfunction TStringBuilder.Append(const AValue: Int64): TStringBuilder;\r\nbegin\r\n DoAppend(IntToStr(AValue));\r\n Result:=Self;\r\nend;\r\n\r\nfunction TStringBuilder.Append(const AValue: TObject): TStringBuilder;\r\nbegin\r\n DoAppend(AValue.ToString);\r\n Result:=Self;\r\nend;\r\n\r\nfunction TStringBuilder.Append(const AValue: Smallint): TStringBuilder;\r\nbegin\r\n DoAppend(IntToStr(AValue));\r\n Result:=Self;\r\nend;\r\n\r\nfunction TStringBuilder.Append(const AValue: LongInt): TStringBuilder;\r\nbegin\r\n DoAppend(IntToStr(AValue));\r\n Result:=Self;\r\nend;\r\n\r\nFunction TStringBuilder.Append(const AValue: Array of Char; StartIndex, SBCharCount: Integer): TStringBuilder;\r\n\r\nbegin\r\n DoAppend(AValue,StartIndex,SBCharCount);\r\n Result:=Self;\r\nend;\r\n\r\nFunction TStringBuilder.Append(const AValue: String; StartIndex, Count: Integer): TStringBuilder;\r\n\r\nbegin\r\n CheckRange(StartIndex,Count,System.Length(AValue));\r\n DoAppend(Copy(AValue,StartIndex+1,Count));\r\n Result:=Self;\r\nend;\r\n\r\n\r\nfunction TStringBuilder.Append(const AValue: String): TStringBuilder;\r\nbegin\r\n DoAppend(AValue);\r\n Result:=Self;\r\nend;\r\n\r\n\r\nfunction TStringBuilder.AppendFormat(const Fmt: String;\r\n const Args: array of const): TStringBuilder;\r\nbegin\r\n DoAppend(Format(Fmt,Args));\r\n Result:=Self;\r\nend;\r\n\r\nfunction TStringBuilder.Append(const Fmt: String;\r\n const Args: array of const): TStringBuilder;\r\nbegin\r\n DoAppend(Format(Fmt,Args));\r\n Result:=Self;\r\nend;\r\n\r\nfunction TStringBuilder.AppendLine: TStringBuilder;\r\nbegin\r\n DoAppend(sLineBreak);\r\n Result:=Self;\r\nend;\r\n\r\nfunction TStringBuilder.AppendLine(const AValue: String): TStringBuilder;\r\nbegin\r\n DoAppend(AValue);\r\n Result:=AppendLine();\r\nend;\r\n\r\nprocedure TStringBuilder.Clear;\r\nbegin\r\n Length:=0;\r\n Capacity:=DefaultCapacity;\r\nend;\r\n\r\n\r\nprocedure TStringBuilder.CopyTo(SourceIndex: Integer;\r\n Var Destination: Array of Char; DestinationIndex: Integer; Count: Integer);\r\n\r\nVar\r\n I : Integer;\r\n\r\nbegin\r\n CheckNegative(Count,'Count');\r\n CheckNegative(DestinationIndex,'DestinationIndex');\r\n CheckRange(DestinationIndex,Count,System.Length(Destination));\r\n if Count>0 then\r\n begin\r\n CheckRange(SourceIndex,Count,Length);\r\n For I:=SourceIndex+1 to SourceIndex+Count do\r\n Destination[DestinationIndex]:=FData[I];\r\n end;\r\nend;\r\n\r\n\r\nfunction TStringBuilder.EnsureCapacity(aCapacity: Integer): Integer;\r\nbegin\r\n CheckRange(aCapacity,0,MaxCapacity);\r\n if Capacitynil);\r\n if Result then\r\n Result:=(Length=StringBuilder.Length)\r\n and (MaxCapacity=StringBuilder.MaxCapacity)\r\n and (FData=StringBuilder.FData[0]);\r\nend;\r\n\r\nprocedure TStringBuilder.Grow;\r\n\r\nvar\r\n NewCapacity: SizeInt;\r\n\r\nbegin\r\n NewCapacity:=Capacity*2;\r\n if NewCapacity>MaxCapacity then\r\n NewCapacity:=MaxCapacity;\r\n Capacity:=NewCapacity;\r\nend;\r\n\r\nfunction TStringBuilder.Insert(Index: Integer; const AValue: TObject\r\n ): TStringBuilder;\r\nbegin\r\n DoInsert(Index,AValue.ToString());\r\n Result:=Self;\r\nend;\r\n\r\nfunction TStringBuilder.Insert(Index: Integer; const AValue: Int64\r\n ): TStringBuilder;\r\nbegin\r\n DoInsert(Index,IntToStr(AValue));\r\n Result:=Self;\r\nend;\r\n\r\nfunction TStringBuilder.Insert(Index: Integer; const AValue: Single\r\n ): TStringBuilder;\r\nbegin\r\n DoInsert(Index,FloatToStr(AValue));\r\n Result:=Self;\r\nend;\r\n\r\nfunction TStringBuilder.Insert(Index: Integer; const AValue: String\r\n ): TStringBuilder;\r\n\r\nbegin\r\n DoInsert(Index,AValue);\r\n Result:=Self;\r\nend;\r\n\r\nfunction TStringBuilder.Insert(Index: Integer; const AValue: Word\r\n ): TStringBuilder;\r\nbegin\r\n DoInsert(Index,IntToStr(AValue));\r\n Result:=Self;\r\nend;\r\n\r\nfunction TStringBuilder.Insert(Index: Integer; const AValue: Shortint\r\n ): TStringBuilder;\r\nbegin\r\n DoInsert(Index, IntToStr(AValue));\r\n Result:=Self;\r\nend;\r\n\r\n\r\nfunction TStringBuilder.Insert(Index: Integer; const AValue: Currency\r\n ): TStringBuilder;\r\nbegin\r\n DoInsert(Index,CurrToStr(AValue));\r\n Result:=Self;\r\nend;\r\n\r\nfunction TStringBuilder.Insert(Index: Integer; const AValue: Char\r\n ): TStringBuilder;\r\nbegin\r\n DoInsert(Index,AValue);\r\n Result:=Self;\r\nend;\r\n\r\nfunction TStringBuilder.Insert(Index: Integer; const AValue: Byte\r\n ): TStringBuilder;\r\nbegin\r\n DoInsert(Index,IntToStr(AValue));\r\n Result:=Self;\r\nend;\r\n\r\nfunction TStringBuilder.Insert(Index: Integer; const AValue: LongInt\r\n ): TStringBuilder;\r\nbegin\r\n DoInsert(Index,IntToStr(AValue));\r\n Result:=Self;\r\nend;\r\n\r\nfunction TStringBuilder.Insert(Index: Integer; const AValue: Smallint\r\n ): TStringBuilder;\r\nbegin\r\n DoInsert(Index,IntToStr(AValue));\r\n Result:=Self;\r\nend;\r\n\r\nfunction TStringBuilder.Insert(Index: Integer; const AValue: Boolean\r\n ): TStringBuilder;\r\nbegin\r\n DoInsert(Index,BoolToStr(AValue,True));\r\n Result:=Self;\r\nend;\r\n\r\nfunction TStringBuilder.Insert(Index: Integer; const AValue: String;\r\n const aRepeatCount: Integer): TStringBuilder;\r\nvar\r\n I: Integer;\r\nbegin\r\n for I:=0 to aRepeatCount-1 do\r\n DoInsert(Index,AValue);\r\n Result:=Self;\r\nend;\r\n\r\nfunction TStringBuilder.Insert(Index: Integer; const AValue: Array of Char\r\n ): TStringBuilder;\r\nbegin\r\n DoInsert(Index,AValue,0,System.Length(AValue));\r\n Result:=Self;\r\nend;\r\n\r\nfunction TStringBuilder.Insert(Index: Integer; const AValue: Array of Char;\r\n startIndex: Integer; SBCharCount: Integer): TStringBuilder;\r\nbegin\r\n DoInsert(Index,AValue,StartIndex,SBCharCount);\r\n Result:=Self;\r\nend;\r\n\r\nfunction TStringBuilder.Insert(Index: Integer; const AValue: Cardinal\r\n ): TStringBuilder;\r\nbegin\r\n DoInsert(Index,IntToStr(AValue));\r\n Result:=self;\r\nend;\r\n\r\nfunction TStringBuilder.Insert(Index: Integer; const AValue: UInt64\r\n ): TStringBuilder;\r\nbegin\r\n DoInsert(Index,IntToStr(AValue));\r\n Result:=self;\r\nend;\r\n\r\nprocedure TStringBuilder.Shrink;\r\n\r\nbegin\r\n if (Capacity div 4)>=Length then\r\n Capacity:=Capacity div 2;\r\nend;\r\n\r\nfunction TStringBuilder.Remove(StartIndex: Integer; RemLength: Integer\r\n ): TStringBuilder;\r\n\r\nVar\r\n MoveIndex : Integer;\r\n\r\nbegin\r\n if (RemLength=0) then\r\n exit(Self);\r\n CheckNegative(RemLength,'RemLength');\r\n CheckRange(StartIndex,0,Length);\r\n MoveIndex:=StartIndex+RemLength;\r\n CheckRange(MoveIndex,0,Length);\r\n Delete(FData,StartIndex+1,RemLength);\r\n Shrink;\r\n Result:=Self;\r\nend;\r\n\r\nFunction TStringBuilder.Replace(const OldValue, NewValue: String; StartIndex, Count: Integer): TStringBuilder;\r\n\r\nvar\r\n I : Integer;\r\n Start : String;\r\n\r\nbegin\r\n if Count=0 then\r\n Exit(Self);\r\n // Some checks.\r\n CheckNegative(StartIndex,'StartIndex');\r\n CheckNegative(Count,'Count');\r\n CheckRange(Startindex,Count,Length);\r\n // Init\r\n Start:=Copy(FData,1,StartIndex);\r\n FData:=Copy(FData,StartIndex+1);\r\n For I:=1 to Count do\r\n FData:=StringReplace(FData,OldValue,NewValue,[]);\r\n FData:=Start+FData;\r\n Result:=Self;\r\nend;\r\n\r\nFunction TStringBuilder.Replace(const OldValue, NewValue: String): TStringBuilder;\r\nbegin\r\n Result:=Replace(OldValue,NewValue,0,Length);\r\nend;\r\n\r\nprocedure TStringBuilder.SetCapacity(AValue: Integer);\r\nbegin\r\n if (AValue>FMaxCapacity) then\r\n Raise ERangeError.CreateFmt(SListCapacityError,[AValue]);\r\n if (AValue= 0 then\r\n begin\r\n lExtraParam := lParam.Substring(lIndex + 1).TrimLeft;\r\n lParam := lParam.Substring(0, lIndex + 1).TrimRight;\r\n Break;\r\n end;\r\n\r\n end;\r\n SetLength(Result, Length(Result) + 1);\r\n Result[High(Result)] := lParam;\r\n if not lExtraParam.IsEmpty then\r\n begin\r\n SetLength(Result, Length(Result) + 1);\r\n Result[High(Result)] := lExtraParam;\r\n end;\r\n end;\r\nend;\r\n\r\nfunction FindCmdLineSwitch(const ASwitch: string): Boolean;\r\nbegin\r\n Result := FindCmdLineSwitch(ASwitch, SwitchChars, True);\r\nend;\r\n\r\nfunction FindCmdLineSwitch(const ASwitch: string; AIgnoreCase: Boolean): Boolean;\r\nbegin\r\n Result := FindCmdLineSwitch(ASwitch, SwitchChars, AIgnoreCase);\r\nend;\r\n\r\nfunction FindCmdLineSwitch(const ASwitch: string; const AChars: TSysCharSet; AIgnoreCase: Boolean): Boolean;\r\ntype\r\n TCompareProc = function(const AS1, AS2: string): Boolean;\r\nvar\r\n lSameSwitch: TCompareProc;\r\n lSwitch: string;\r\n lSwitches: TStringArray;\r\n lValue: string;\r\nbegin\r\n if AIgnoreCase then\r\n lSameSwitch := AnsiSameText\r\n else\r\n lSameSwitch := EqualsStr;\r\n\r\n lSwitches := ParseCmdLine;\r\n for lValue in lSwitches do\r\n begin\r\n if (AChars = []) or CharInSet(lValue[Low(string)], AChars) then\r\n begin\r\n lSwitch := lValue.SubString(1);\r\n if lSameSwitch(lSwitch, ASwitch) then\r\n Exit(True);\r\n end;\r\n end;\r\n Result := False;\r\nend;\r\n\r\nfunction FindCmdLineSwitch(const ASwitch: string; var AValue: string; AIgnoreCase: Boolean = True; const ASwitchTypes: TCmdLineSwitchTypes = [clstValueNextParam, clstValueAppended]): Boolean; overload;\r\nconst\r\n cDeli = ':';\r\ntype\r\n TCompareProc = function(const AS1, AS2: string): Boolean;\r\nvar\r\n lCompare: TCompareProc;\r\n lCount: Integer;\r\n lParam: string;\r\n lSwitches: TStringArray;\r\n lSwitchLen: Integer;\r\n lValueOfs: Integer;\r\nbegin\r\n Result := False;\r\n AValue := string.Empty;\r\n if AIgnoreCase then\r\n lCompare := SameText\r\n else\r\n lCompare := SameStr;\r\n lSwitchLen := ASwitch.Length;\r\n\r\n lSwitches := ParseCmdLine;\r\n for lCount := Low(lSwitches) to High(lSwitches) do\r\n begin\r\n lParam := lSwitches[lCount];\r\n if not CharInSet(lParam.Chars[0], SwitchChars) then\r\n Continue;\r\n\r\n if not lCompare(lParam.SubString(1, lSwitchLen), ASwitch) then\r\n Continue;\r\n\r\n if lParam.Length > lSwitchLen + 1 then\r\n begin\r\n if not (clstValueAppended in ASwitchTypes) then\r\n Continue;\r\n lValueOfs := lSwitchLen + 1;\r\n if lParam.Chars[lValueOfs] = cDeli then\r\n Inc(lValueOfs);\r\n AValue := lParam.SubString(lValueOfs, MaxInt);\r\n end\r\n else if (clstValueNextParam in ASwitchTypes) and (lCount < High(lSwitches)) and (not CharInSet(lSwitches[lCount + 1].Chars[0], SwitchChars)) then\r\n AValue := lSwitches[lCount + 1];\r\n Result := True;\r\n Break;\r\n end;\r\nend;\r\n\r\n{ TEncoding }\r\n\r\nclass function TEncoding.GetANSI: TEncoding;\r\nbegin\r\n if not Assigned(FANSI) then\r\n FANSI := TANSIEncoding.Create;\r\n Result := FANSI;\r\nend;\r\n\r\nclass function TEncoding.GetASCII: TEncoding;\r\nbegin\r\n if not Assigned(FASCII) then\r\n FASCII := TASCIIEncoding.Create;\r\n Result := FASCII;\r\nend;\r\n\r\nclass function TEncoding.GetDefault: TEncoding;\r\nbegin\r\n Result := ANSI;\r\nend;\r\n\r\nclass function TEncoding.GetUnicode: TEncoding;\r\nbegin\r\n if not Assigned(FUnicode) then\r\n FUnicode := TUnicodeEncoding.Create;\r\n Result := FUnicode;\r\nend;\r\n\r\nclass function TEncoding.GetUTF7: TEncoding;\r\nbegin\r\n if not Assigned(FUTF7) then\r\n FUTF7 := TUTF7Encoding.Create;\r\n Result := FUTF7;\r\nend;\r\n\r\nclass function TEncoding.GetUTF8: TEncoding;\r\nbegin\r\n if not Assigned(FUTF8) then\r\n FUTF8 := TUTF8Encoding.Create;\r\n Result := FUTF8;\r\nend;\r\n\r\nclass function TEncoding.IsStandardEncoding(AEncoding: TEncoding): Boolean;\r\nbegin\r\n Result := (AEncoding <> nil) and ((AEncoding = ANSI) or (AEncoding = Unicode));\r\nend;\r\n\r\nfunction TEncoding.GetByteCount(const AChars: string; const ACharCount: Integer): Integer;\r\nbegin\r\n Result := GetByteCount(AChars.Substring(0, ACharCount));\r\nend;\r\n\r\nfunction TEncoding.GetByteCount(const AChars: string; const ACharIndex, ACharCount: Integer): Integer;\r\nbegin\r\n Result := GetByteCount(AChars.Substring(ACharIndex, ACharCount));\r\nend;\r\n\r\nfunction TEncoding.GetBytes(const AChars: string; const ACharCount: Integer): TBytes;\r\nbegin\r\n Result := GetBytes(AChars.Substring(0, ACharCount));\r\nend;\r\n\r\nfunction TEncoding.GetBytes(const AChars: string; const ACharIndex, ACharCount: Integer): TBytes;\r\nbegin\r\n Result := GetBytes(AChars.Substring(ACharIndex, ACharCount));\r\nend;\r\n\r\nfunction TEncoding.GetEncoding: string;\r\nconst\r\n cEncoding = 'utf-8';\r\nbegin\r\n Result := cEncoding;\r\nend;\r\n\r\nfunction TEncoding.GetString(const ABytes: TBytes; const ACharCount: Integer): string;\r\nbegin\r\n Result := GetString(ABytes.SubBytes(0, ACharCount));\r\nend;\r\n\r\nfunction TEncoding.GetString(const ABytes: TBytes; const ACharIndex, ACharCount: Integer): string;\r\nbegin\r\n Result := GetString(ABytes.SubBytes(ACharIndex, ACharCount));\r\nend;\r\n\r\n{ TANSIEncoding }\r\n\r\nfunction TANSIEncoding.GetByteCount(const AChars: string): Integer;\r\nbegin\r\n Result := AChars.Length;\r\nend;\r\n\r\nfunction TANSIEncoding.GetBytes(const AChars: string): TBytes;\r\nbegin\r\n Result := BytesOf(AChars);\r\nend;\r\n\r\nfunction TANSIEncoding.GetEncoding: string;\r\nconst\r\n cEncoding = 'windows-1252';\r\nbegin\r\n Result := cEncoding;\r\nend;\r\n\r\nfunction TANSIEncoding.GetString(const ABytes: TBytes): string;\r\nbegin\r\n Result := StringOf(ABytes);\r\nend;\r\n\r\n{ TASCIIEncoding }\r\n\r\nfunction TASCIIEncoding.GetEncoding: string;\r\nconst\r\n cEncoding = 'ISO-8859-2';\r\nbegin\r\n Result := cEncoding;\r\nend;\r\n\r\n{ TUnicodeEncoding }\r\n\r\nfunction TUnicodeEncoding.GetByteCount(const AChars: string): Integer;\r\nconst\r\n cCharSize = 2;\r\nbegin\r\n Result := cCharSize * AChars.Length;\r\nend;\r\n\r\nfunction TUnicodeEncoding.GetBytes(const AChars: string): TBytes;\r\nbegin\r\n InternalGetBytes(AChars, Result);\r\nend;\r\n\r\nfunction TUnicodeEncoding.GetEncoding: string;\r\nconst\r\n cEncoding = 'unicode';\r\nbegin\r\n Result := cEncoding;\r\nend;\r\n\r\nfunction TUnicodeEncoding.GetString(const ABytes: TBytes): string;\r\nvar\r\n lWords: TWords;\r\n lBuffer: string;\r\nbegin\r\n lBuffer := string.Empty;\r\n lWords := TWords.FromBytes(ABytes);\r\n if lWords <> nil then\r\n begin\r\n asm\r\n for (var lCount = 0; lCount < lWords.length; lCount++)\r\n lBuffer += string.fromCharCode(lWords[lCount]);\r\n end;\r\n end;\r\n Result := lBuffer;\r\nend;\r\n\r\nprocedure TUnicodeEncoding.InternalGetBytes(const AChars: string; out ABytes: TBytes);\r\nvar\r\n lWords: TWords;\r\nbegin\r\n lWords := nil;\r\n asm\r\n for (var lCount = 0; lCount < AChars.length; lCount++)\r\n lWords.push(AChars.charCodeAt(lCount));\r\n end;\r\n ABytes := lWords.ToBytes;\r\nend;\r\n\r\nclass function TUTF8Encoding.BytesToMemory(ABytes: TBytes): TJSArrayBuffer;\r\nvar\r\n lArray: TJSUint8Array;\r\nbegin\r\n Result := TJSArrayBuffer.new(ABytes.Length);\r\n lArray := TJSUint8Array.New(Result);\r\n lArray._set(ABytes);\r\nend;\r\n\r\n{ TUTF8Encoding }\r\n\r\nfunction TUTF8Encoding.GetByteCount(const AChars: string): Integer;\r\nbegin\r\n Result := GetBytes(AChars).Length;\r\nend;\r\n\r\nfunction TUTF8Encoding.GetBytes(const AChars: string): TBytes;\r\nvar\r\n lArray: TJSUInt8Array;\r\n lEncoder: TJSTextEncoder;\r\nbegin\r\n lEncoder := TJSTextEncoder.New;\r\n lArray := lEncoder.encode(AChars);\r\n Result := MemoryToBytes(lArray);\r\nend;\r\n\r\nfunction TUTF8Encoding.GetEncoding: string;\r\nconst\r\n cEncoding = 'utf-8';\r\nbegin\r\n Result := cEncoding;\r\nend;\r\n\r\nfunction TUTF8Encoding.GetString(const ABytes: TBytes): string;\r\nvar\r\n lArray: TJSArrayBuffer;\r\n lDecoder: TJSTextDecoder;\r\nbegin\r\n lDecoder := TJSTextDecoder.New;\r\n lArray := BytesToMemory(ABytes);\r\n Result := lDecoder.decode(lArray);\r\nend;\r\n\r\nclass function TUTF8Encoding.MemoryToBytes(AMem: TJSUInt8Array): TBytes;\r\nvar\r\n lCount: Integer;\r\nbegin\r\n for lCount := 0 to AMem.length - 1 do\r\n Result[lCount]:= AMem[lCount];\r\nend;\r\n\r\nfunction TUTF7Encoding.GetEncoding: string;\r\nconst\r\n cEncoding = 'utf-7';\r\nbegin\r\n Result := cEncoding;\r\nend;\r\n\r\n{ TBytesHelper }\r\n\r\nfunction TBytesHelper.GetLength: Integer;\r\nbegin\r\n Result := System.Length(Self);\r\nend;\r\n\r\nfunction TBytesHelper.High: Integer;\r\nbegin\r\n Result := System.High(Self);\r\nend;\r\n\r\nfunction TBytesHelper.Low: Integer;\r\nbegin\r\n Result := System.Low(Self);\r\nend;\r\n\r\nprocedure TBytesHelper.SetLength(const AValue: Integer);\r\nbegin\r\n System.SetLength(Self, AValue);\r\nend;\r\n\r\nfunction TBytesHelper.SubBytes(const AStartIndex, ALength: Integer): TBytes;\r\nbegin\r\n Result := System.Copy(Self, AStartIndex, ALength);\r\nend;\r\n\r\n{ TWordsHelper }\r\n\r\nclass function TWordsHelper.FromBytes(const ABytes: TBytes): TWords;\r\nconst\r\n cBytesPerWord = 2;\r\nvar\r\n lCount: Integer;\r\n lLow: Byte;\r\n lHigh: Byte;\r\nbegin\r\n lCount := ABytes.Length;\r\n if Odd(lCount) then\r\n Inc(lCount);\r\n Result.Length := lCount div cBytesPerWord;\r\n\r\n lCount := ABytes.Low;\r\n while lCount <= ABytes.High do\r\n begin\r\n lLow := ABytes[lCount];\r\n if lCount + 1 <= ABytes.High then\r\n lHigh := ABytes[lCount + 1]\r\n else\r\n lHigh := 0;\r\n\r\n Result[lCount div cBytesPerWord] := Word.FromBytes(lLow, lHigh);\r\n Inc(lCount, cBytesPerWord);\r\n end;\r\nend;\r\n\r\nfunction TWordsHelper.GetLength: Integer;\r\nbegin\r\n Result := System.Length(Self);\r\nend;\r\n\r\nfunction TWordsHelper.High: Integer;\r\nbegin\r\n Result := System.High(Self);\r\nend;\r\n\r\nfunction TWordsHelper.Low: Integer;\r\nbegin\r\n Result := System.Low(Self);\r\nend;\r\n\r\nprocedure TWordsHelper.SetLength(const AValue: Integer);\r\nbegin\r\n System.SetLength(Self, AValue);\r\nend;\r\n\r\nfunction TWordsHelper.ToBytes: TBytes;\r\nconst\r\n cBytesPerWord = 2;\r\nvar\r\n lLow: Byte;\r\n lHigh: Byte;\r\n lCount: Integer;\r\n lNewIndex: Integer;\r\nbegin\r\n Result.Length := Length * cBytesPerWord;\r\n for lCount := Low to High do\r\n begin\r\n Self[lCount].ToBytes(lLow, lHigh);\r\n lNewIndex := lCount * cBytesPerWord;\r\n Result[lNewIndex] := lLow;\r\n Result[lNewIndex + 1] := lHigh;\r\n end;\r\nend;\r\n\r\ninitialization\r\n ShortMonthNames:=DefaultShortMonthNames;\r\n LongMonthNames:=DefaultLongMonthNames;\r\n ShortDayNames:=DefaultShortDayNames;\r\n LongDayNames:=DefaultLongDayNames;\r\n\r\nend.\r\n\r\n","{\r\n This file is part of the Pas2JS run time library.\r\n Copyright (c) 2018 by Mattias Gaertner\r\n\r\n See the file COPYING.FPC, included in this distribution,\r\n for details about the copyright.\r\n\r\n This program is distributed in the hope that it will be useful,\r\n but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\r\n\r\n **********************************************************************}\r\nunit TypInfo;\r\n\r\n{$mode objfpc}\r\n{$modeswitch externalclass}\r\n\r\ninterface\r\n\r\nuses\r\n SysUtils, Types, RTLConsts, JS;\r\n\r\ntype\r\n // TCallConv for compatibility with Delphi/FPC, ignored under pas2js\r\n TCallConv = (ccReg, ccCdecl, ccPascal, ccStdCall, ccSafeCall, ccCppdecl,\r\n ccFar16, ccOldFPCCall, ccInternProc, ccSysCall, ccSoftFloat, ccMWPascal);\r\n\r\n\r\n { TSectionRTTI }\r\n TSectionRTTI = class external name 'rtl.tSectionRTTI'(TJSObject)\r\n end;\r\n\r\n { TTypeInfoModule }\r\n\r\n TTypeInfoModule = class external name 'pasmodule'(TJSObject)\r\n public\r\n Name: String external name '$name';\r\n RTTI: TSectionRTTI external name '$rtti';\r\n end;\r\n\r\n TTypeInfoAttributes = type TJSValueDynArray;\r\n\r\n { TTypeInfo }\r\n\r\n TTypeInfo = class external name 'rtl.tTypeInfo'\r\n public\r\n Name: String external name 'name';\r\n Kind: TTypeKind external name 'kind';\r\n Attributes: TTypeInfoAttributes external name 'attr'; // can be nil\r\n Module: TTypeInfoModule external name '$module'; // can be nil\r\n end;\r\n TTypeInfoClassOf = class of TTypeInfo;\r\n\r\n PTypeInfo = Pointer; // for compatibility with Delphi/FPC, under pas2js it is a TTypeInfo\r\n\r\n TOrdType = (\r\n otSByte, // 0\r\n otUByte, // 1\r\n otSWord, // 2\r\n otUWord, // 3\r\n otSLong, // 4\r\n otULong, // 5\r\n otSIntDouble, // 6 NativeInt\r\n otUIntDouble // 7 NativeUInt\r\n );\r\n\r\n { TTypeInfoInteger - Kind = tkInteger }\r\n\r\n TTypeInfoInteger = class external name 'rtl.tTypeInfoInteger'(TTypeInfo)\r\n public\r\n MinValue: NativeInt external name 'minvalue';\r\n MaxValue: NativeInt external name 'maxvalue';\r\n OrdType : TOrdType external name 'ordtype';\r\n end;\r\n\r\n { TEnumType }\r\n\r\n TEnumType = class external name 'anonymous'\r\n private\r\n function GetIntToName(Index: NativeInt): String; external name '[]';\r\n function GetNameToInt(Name: String): NativeInt; external name '[]';\r\n public\r\n property IntToName[Index: NativeInt]: String read GetIntToName;\r\n property NameToInt[Name: String]: NativeInt read GetNameToInt;\r\n end;\r\n\r\n { TTypeInfoEnum - Kind = tkEnumeration }\r\n\r\n TTypeInfoEnum = class external name 'rtl.tTypeInfoEnum'(TTypeInfoInteger)\r\n public\r\n // not supported: BaseType: TTypeInfo\r\n EnumType: TEnumType external name 'enumtype';\r\n end;\r\n\r\n { TTypeInfoSet - Kind = tkSet }\r\n\r\n TTypeInfoSet = class external name 'rtl.tTypeInfoSet'(TTypeInfo)\r\n public\r\n // not supported: BaseType: TTypeInfo\r\n CompType: TTypeInfo external name 'comptype';\r\n end;\r\n\r\n { TTypeInfoStaticArray - Kind = tkArray }\r\n\r\n TTypeInfoStaticArray = class external name 'rtl.tTypeInfoStaticArray'(TTypeInfo)\r\n public\r\n Dims: TIntegerDynArray external name 'dims';\r\n ElType: TTypeInfo external name 'eltype';\r\n end;\r\n\r\n { TTypeInfoDynArray - Kind = tkDynArray }\r\n\r\n TTypeInfoDynArray = class external name 'rtl.tTypeInfoDynArray'(TTypeInfo)\r\n public\r\n ElType: TTypeInfo external name 'eltype';\r\n end;\r\n\r\n TParamFlag = (\r\n pfVar, // 2^0 = 1\r\n pfConst, // 2^1 = 2\r\n pfOut, // 2^2 = 4\r\n pfArray, // 2^3 = 8\r\n pfAddress, // 2^4 = 16\r\n pfReference // 2^5 = 32\r\n );\r\n TParamFlags = set of TParamFlag;\r\n\r\n { TProcedureParam }\r\n\r\n TProcedureParam = class external name 'anonymous'\r\n public\r\n Name: String external name 'name';\r\n TypeInfo: TTypeInfo external name 'typeinfo';\r\n Flags: NativeInt external name 'flags'; // TParamFlags as bit vector\r\n end;\r\n\r\n TProcedureParams = array of TProcedureParam;\r\n\r\n TProcedureFlag = (\r\n pfStatic, // 2^0 = 1\r\n pfVarargs, // 2^1 = 2\r\n pfExternal, // 2^2 = 4 name may be an expression\r\n pfSafeCall, // 2^3 = 8\r\n pfAsync // 2^4 = 16\r\n );\r\n TProcedureFlags = set of TProcedureFlag;\r\n\r\n { TProcedureSignature }\r\n\r\n TProcedureSignature = class external name 'anonymous'\r\n public\r\n Params: TProcedureParams external name 'params'; // can be nil\r\n ResultType: TTypeInfo external name 'resulttype'; // can be nil\r\n Flags: NativeInt external name 'flags'; // TProcedureFlags as bit vector\r\n end;\r\n\r\n { TTypeInfoProcVar - Kind = tkProcVar }\r\n\r\n TTypeInfoProcVar = class external name 'rtl.tTypeInfoProcVar'(TTypeInfo)\r\n public\r\n ProcSig: TProcedureSignature external name 'procsig';\r\n end;\r\n\r\n { TTypeInfoRefToProcVar - Kind = tkRefToProcVar }\r\n\r\n TTypeInfoRefToProcVar = class external name 'rtl.tTypeInfoRefToProcVar'(TTypeInfoProcVar)\r\n end;\r\n\r\n TMethodKind = (\r\n mkProcedure, // 0 default\r\n mkFunction, // 1\r\n mkConstructor, // 2\r\n mkDestructor, // 3\r\n mkClassProcedure,// 4\r\n mkClassFunction // 5\r\n //mkClassConstructor,mkClassDestructor,mkOperatorOverload\r\n );\r\n TMethodKinds = set of TMethodKind;\r\n\r\n { TTypeInfoMethodVar - Kind = tkMethod }\r\n\r\n TTypeInfoMethodVar = class external name 'rtl.tTypeInfoMethodVar'(TTypeInfoProcVar)\r\n public\r\n MethodKind: TMethodKind external name 'methodkind';\r\n end;\r\n\r\n TTypeMemberKind = (\r\n tmkUnknown, // 0\r\n tmkField, // 1\r\n tmkMethod, // 2\r\n tmkProperty // 3\r\n );\r\n TTypeMemberKinds = set of TTypeMemberKind;\r\n\r\n { TTypeMember }\r\n\r\n TTypeMember = class external name 'rtl.tTypeMember'\r\n public\r\n Name: String external name 'name';\r\n Kind: TTypeMemberKind external name 'kind';\r\n Attributes: TTypeInfoAttributes external name 'attr'; // can be nil\r\n end;\r\n TTypeMemberDynArray = array of TTypeMember;\r\n\r\n { TTypeMemberField - Kind = tmkField }\r\n\r\n TTypeMemberField = class external name 'rtl.tTypeMemberField'(TTypeMember)\r\n public\r\n TypeInfo: TTypeInfo external name 'typeinfo';\r\n end;\r\n\r\n { TTypeMemberMethod - Kind = tmkMethod }\r\n\r\n TTypeMemberMethod = class external name 'rtl.tTypeMemberMethod'(TTypeMember)\r\n public\r\n MethodKind: TMethodKind external name 'methodkind';\r\n ProcSig: TProcedureSignature external name 'procsig';\r\n end;\r\n TTypeMemberMethodDynArray = array of TTypeMemberMethod;\r\n\r\nconst\r\n pfGetFunction = 1; // getter is a function\r\n pfSetProcedure = 2; // setter is a procedure\r\n // stored is a 2-bit vector:\r\n pfStoredFalse = 4; // stored false, never\r\n pfStoredField = 8; // stored field, field name is in Stored\r\n pfStoredFunction = 12; // stored function, function name is in Stored\r\n pfHasIndex = 16; { if getter is function, append Index as last param\r\n if setter is function, append Index as second last param }\r\ntype\r\n { TTypeMemberProperty - Kind = tmkProperty }\r\n\r\n TTypeMemberProperty = class external name 'rtl.tTypeMemberProperty'(TTypeMember)\r\n public\r\n TypeInfo: TTypeInfo external name 'typeinfo';\r\n Flags: NativeInt external name 'flags'; // bit vector, see pf constants above\r\n Params: TProcedureParams external name 'params'; // can be nil\r\n Index: JSValue external name 'index'; // can be undefined\r\n Getter: String external name 'getter'; // name of field or function\r\n Setter: String external name 'setter'; // name of field or function\r\n Stored: String external name 'stored'; // name of field or function, can be undefined\r\n Default: JSValue external name 'Default'; // can be undefined\r\n end;\r\n TTypeMemberPropertyDynArray = array of TTypeMemberProperty;\r\n\r\n { TTypeMembers }\r\n\r\n TTypeMembers = class external name 'rtl.tTypeMembers'\r\n private\r\n function GetItems(Name: String): TTypeMember; external name '[]';\r\n procedure SetItems(Name: String; const AValue: TTypeMember); external name '[]';\r\n public\r\n property Members[Name: String]: TTypeMember read GetItems write SetItems; default;\r\n end;\r\n\r\n { TTypeInfoStruct }\r\n\r\n TTypeInfoStruct = class external name 'rtl.tTypeInfoStruct'(TTypeInfo)\r\n private\r\n FFieldCount: NativeInt external name 'fields.length';\r\n FMethodCount: NativeInt external name 'methods.length';\r\n FPropCount: NativeInt external name 'properties.length';\r\n public\r\n Members: TTypeMembers external name 'members';\r\n Names: TStringDynArray external name 'names'; // all member names with TTypeInfo\r\n Fields: TStringDynArray external name 'fields';\r\n Methods: TStringDynArray external name 'methods';\r\n Properties: TStringDynArray external name 'properties';\r\n property FieldCount: NativeInt read FFieldCount;\r\n function GetField(Index: NativeInt): TTypeMemberField; external name 'getField';\r\n function AddField(aName: String; aType: TTypeInfo; Options: TJSObject = nil\r\n ): TTypeMemberField; external name 'addField';\r\n property MethodCount: NativeInt read FMethodCount;\r\n function GetMethod(Index: NativeInt): TTypeMemberMethod; external name 'getMethod';\r\n function AddMethod(aName: String; MethodKind: TMethodKind = mkProcedure;\r\n Params: TJSArray = nil; ResultType: TTypeInfo = nil;\r\n Options: TJSObject = nil): TTypeMemberMethod; external name 'addMethod';\r\n property PropCount: NativeInt read FPropCount;\r\n function GetProp(Index: NativeInt): TTypeMemberProperty; external name 'getProperty';\r\n function AddProperty(aName: String; Flags: NativeInt; ResultType: TTypeInfo;\r\n Getter, Setter: String; Options: TJSObject = nil): TTypeMemberProperty; external name 'addProperty';\r\n end;\r\n\r\n { TTypeInfoRecord - Kind = tkRecord }\r\n\r\n TTypeInfoRecord = class external name 'rtl.tTypeInfoRecord'(TTypeInfoStruct)\r\n public\r\n RecordType: TJSObject external name '$record'; // only records with class vars, else jsundefined\r\n end;\r\n\r\n { TTypeInfoClass - Kind = tkClass }\r\n\r\n TTypeInfoClass = class external name 'rtl.tTypeInfoClass'(TTypeInfoStruct)\r\n public\r\n ClassType: TClass external name 'class';\r\n Ancestor: TTypeInfoClass external name 'ancestor';\r\n end;\r\n\r\n { TTypeInfoExtClass - Kind = tkExtClass }\r\n\r\n TTypeInfoExtClass = class external name 'rtl.tTypeInfoExtClass'(TTypeInfo)\r\n public\r\n Ancestor: TTypeInfoExtClass external name 'ancestor';\r\n JSClassName: String external name 'jsclass';\r\n end;\r\n\r\n { TTypeInfoClassRef - class-of, Kind = tkClassRef }\r\n\r\n TTypeInfoClassRef = class external name 'rtl.tTypeInfoClassRef'(TTypeInfo)\r\n public\r\n InstanceType: TTypeInfo external name 'instancetype';\r\n end;\r\n\r\n { TTypeInfoPointer - Kind = tkPointer }\r\n\r\n TTypeInfoPointer = class external name 'rtl.tTypeInfoPointer'(TTypeInfo)\r\n public\r\n RefType: TTypeInfo external name 'reftype'; // can be null\r\n end;\r\n\r\n TInterfaceInfo = class external name 'Object'(TJSObject)\r\n FullName: String external name '$FullName';\r\n GUID: String external name '$guid';\r\n GUIDR: String external name '$guidr';\r\n Kind: String external name '$kind';\r\n Module: TTypeInfoModule external name '$module'; // can be nil\r\n Name: String external name '$name';\r\n Names: TStringArray external name '$names';\r\n RTTI: TSectionRTTI external name '$rtti';\r\n end;\r\n\r\n { TTypeInfoInterface - Kind = tkInterface }\r\n\r\n TTypeInfoInterface = class external name 'rtl.tTypeInfoInterface'(TTypeInfoStruct)\r\n public\r\n InterfaceInfo: TInterfaceInfo external name 'interface';\r\n Ancestor: TTypeInfoInterface external name 'ancestor';\r\n end;\r\n\r\n { TTypeInfoHelper - Kind = tkHelper }\r\n\r\n TTypeInfoHelper = class external name 'rtl.tTypeInfoHelper'(TTypeInfoStruct)\r\n public\r\n HelperType: TJSObject external name 'helper';\r\n Ancestor: TTypeInfoHelper external name 'ancestor';\r\n HelperFor: TTypeInfo external name 'helperfor';\r\n end;\r\n\r\n TReferenceVariable = class external name 'Object'\r\n public\r\n function get: JSValue;\r\n procedure &set(const value: JSValue);\r\n end;\r\n\r\n TInterfaceObject = class external name 'Object' (TJSObject)\r\n public\r\n InterfaceMaps: TJSObject external name '$intfmaps';\r\n Interfaces: TJSObject external name '$interfaces';\r\n Obj: TInterfacedObject external name '$o';\r\n end;\r\n\r\n EPropertyError = class(Exception);\r\n\r\nfunction GetTypeName(TypeInfo: TTypeInfo): string;\r\n\r\nfunction GetClassMembers(aTIStruct: TTypeInfoStruct): TTypeMemberDynArray;\r\nfunction GetClassMember(aTIStruct: TTypeInfoStruct; const aName: String): TTypeMember;\r\nfunction GetInstanceMethod(Instance: TObject; const aName: String): Pointer;\r\nfunction GetClassMethods(aTIStruct: TTypeInfoStruct): TTypeMemberMethodDynArray;\r\nfunction CreateMethod(Instance: TObject; FuncName: String): Pointer; external name 'rtl.createCallback';\r\n\r\nfunction GetInterfaceMembers(aTIInterface: TTypeInfoInterface): TTypeMemberDynArray;\r\nfunction GetInterfaceMember(aTIInterface: TTypeInfoInterface; const aName: String): TTypeMember;\r\nfunction GetInterfaceMethods(aTIInterface: TTypeInfoInterface): TTypeMemberMethodDynArray;\r\n\r\nfunction GetRTTIAttributes(const Attributes: TTypeInfoAttributes): TCustomAttributeArray;\r\n\r\nfunction GetPropInfos(aTIStruct: TTypeInfoStruct): TTypeMemberPropertyDynArray;\r\nfunction GetPropList(aTIStruct: TTypeInfoStruct; TypeKinds: TTypeKinds; Sorted: boolean = true): TTypeMemberPropertyDynArray;\r\nfunction GetPropList(aTIStruct: TTypeInfoStruct): TTypeMemberPropertyDynArray;\r\nfunction GetPropList(AClass: TClass): TTypeMemberPropertyDynArray;\r\nfunction GetPropList(Instance: TObject): TTypeMemberPropertyDynArray;\r\n\r\nfunction GetPropInfo(TI: TTypeInfoStruct; const PropName: String): TTypeMemberProperty;\r\nfunction GetPropInfo(TI: TTypeInfoStruct; const PropName: String; const Kinds: TTypeKinds): TTypeMemberProperty;\r\nfunction GetPropInfo(Instance: TObject; const PropName: String): TTypeMemberProperty;\r\nfunction GetPropInfo(Instance: TObject; const PropName: String; const Kinds: TTypeKinds): TTypeMemberProperty;\r\nfunction GetPropInfo(aClass: TClass; const PropName: String): TTypeMemberProperty;\r\nfunction GetPropInfo(aClass: TClass; const PropName: String; const Kinds: TTypeKinds): TTypeMemberProperty;\r\n\r\nfunction FindPropInfo(Instance: TObject; const PropName: String): TTypeMemberProperty;\r\nfunction FindPropInfo(Instance: TObject; const PropName: String; const Kinds: TTypeKinds): TTypeMemberProperty;\r\nfunction FindPropInfo(aClass: TClass; const PropName: String): TTypeMemberProperty;\r\nfunction FindPropInfo(aClass: TClass; const PropName: String; const Kinds: TTypeKinds): TTypeMemberProperty;\r\n\r\n// Property information routines.\r\nFunction IsStoredProp(Instance: TObject; const PropInfo: TTypeMemberProperty): Boolean;\r\nFunction IsStoredProp(Instance: TObject; const PropName: string): Boolean;\r\nfunction IsPublishedProp(Instance: TObject; const PropName: String): Boolean;\r\nfunction IsPublishedProp(aClass: TClass; const PropName: String): Boolean;\r\nfunction PropType(Instance: TObject; const PropName: string): TTypeKind;\r\nfunction PropType(aClass: TClass; const PropName: string): TTypeKind;\r\nfunction PropIsType(Instance: TObject; const PropName: string; const TypeKind: TTypeKind): Boolean;\r\nfunction PropIsType(aClass: TClass; const PropName: string; const TypeKind: TTypeKind): Boolean;\r\n\r\nfunction GetJSValueProp(Instance: TJSObject; TI: TTypeInfoStruct; const PropName: String): JSValue;\r\nfunction GetJSValueProp(Instance: TJSObject; const PropInfo: TTypeMemberProperty): JSValue;\r\nfunction GetJSValueProp(Instance: TObject; const PropName: String): JSValue;\r\nfunction GetJSValueProp(Instance: TObject; const PropInfo: TTypeMemberProperty): JSValue;\r\nprocedure SetJSValueProp(Instance: TJSObject; TI: TTypeInfoStruct; const PropName: String; Value: JSValue);\r\nprocedure SetJSValueProp(Instance: TJSObject; const PropInfo: TTypeMemberProperty; Value: JSValue);\r\nprocedure SetJSValueProp(Instance: TObject; const PropName: String; Value: JSValue);\r\nprocedure SetJSValueProp(Instance: TObject; const PropInfo: TTypeMemberProperty; Value: JSValue);\r\n\r\nfunction GetNativeIntProp(Instance: TObject; const PropName: String): NativeInt;\r\nfunction GetNativeIntProp(Instance: TObject; const PropInfo: TTypeMemberProperty): NativeInt;\r\nprocedure SetNativeIntProp(Instance: TObject; const PropName: String; Value: NativeInt);\r\nprocedure SetNativeIntProp(Instance: TObject; const PropInfo: TTypeMemberProperty; Value: NativeInt);\r\n\r\nfunction GetOrdProp(Instance: TObject; const PropName: String): longint;\r\nfunction GetOrdProp(Instance: TObject; const PropInfo: TTypeMemberProperty): longint;\r\nprocedure SetOrdProp(Instance: TObject; const PropName: String; Value: longint);\r\nprocedure SetOrdProp(Instance: TObject; const PropInfo: TTypeMemberProperty; Value: longint);\r\n\r\nfunction GetEnumProp(Instance: TObject; const PropName: String): String;\r\nfunction GetEnumProp(Instance: TObject; const PropInfo: TTypeMemberProperty): String;\r\nprocedure SetEnumProp(Instance: TObject; const PropName: String; const Value: String);\r\nprocedure SetEnumProp(Instance: TObject; const PropInfo: TTypeMemberProperty; const Value: String);\r\n// Auxiliary routines, which may be useful\r\nfunction GetEnumName(TypeInfo: TTypeInfoEnum; Value: Integer): String;\r\nfunction GetEnumValue(TypeInfo: TTypeInfoEnum; const Name: string): Longint;\r\nfunction GetEnumNameCount(TypeInfo: TTypeInfoEnum): Longint;\r\n\r\nfunction GetSetProp(Instance: TObject; const PropName: String): String; overload;\r\nfunction GetSetProp(Instance: TObject; const PropInfo: TTypeMemberProperty): String; overload;\r\nfunction GetSetPropArray(Instance: TObject; const PropName: String): TIntegerDynArray; overload;\r\nfunction GetSetPropArray(Instance: TObject; const PropInfo: TTypeMemberProperty): TIntegerDynArray; overload;\r\nprocedure SetSetPropArray(Instance: TObject; const PropName: String; const Arr: TIntegerDynArray); overload;\r\nprocedure SetSetPropArray(Instance: TObject; const PropInfo: TTypeMemberProperty; const Arr: TIntegerDynArray); overload;\r\n\r\nfunction GetBoolProp(Instance: TObject; const PropName: String): boolean;\r\nfunction GetBoolProp(Instance: TObject; const PropInfo: TTypeMemberProperty): boolean;\r\nprocedure SetBoolProp(Instance: TObject; const PropName: String; Value: boolean);\r\nprocedure SetBoolProp(Instance: TObject; const PropInfo: TTypeMemberProperty; Value: boolean);\r\n\r\nfunction GetStrProp(Instance: TObject; const PropName: String): String;\r\nfunction GetStrProp(Instance: TObject; const PropInfo: TTypeMemberProperty): String;\r\nprocedure SetStrProp(Instance: TObject; const PropName: String; Value: String);\r\nprocedure SetStrProp(Instance: TObject; const PropInfo: TTypeMemberProperty; Value: String);\r\n\r\nfunction GetStringProp(Instance: TObject; const PropName: String): String; deprecated; // use GetStrProp\r\nfunction GetStringProp(Instance: TObject; const PropInfo: TTypeMemberProperty): String; deprecated; // use GetStrProp\r\nprocedure SetStringProp(Instance: TObject; const PropName: String; Value: String); deprecated; // use GetStrProp\r\nprocedure SetStringProp(Instance: TObject; const PropInfo: TTypeMemberProperty; Value: String); deprecated; // use GetStrProp\r\n\r\nfunction GetFloatProp(Instance: TObject; const PropName: string): Double;\r\nfunction GetFloatProp(Instance: TObject; PropInfo : TTypeMemberProperty) : Double;\r\nprocedure SetFloatProp(Instance: TObject; const PropName: string; Value: Double);\r\nprocedure SetFloatProp(Instance: TObject; PropInfo : TTypeMemberProperty; Value : Double);\r\n\r\nfunction GetObjectProp(Instance: TObject; const PropName: String): TObject;\r\nfunction GetObjectProp(Instance: TObject; const PropName: String; MinClass: TClass): TObject;\r\nfunction GetObjectProp(Instance: TObject; const PropInfo: TTypeMemberProperty): TObject;\r\nfunction GetObjectProp(Instance: TObject; const PropInfo: TTypeMemberProperty; MinClass: TClass): TObject;\r\nprocedure SetObjectProp(Instance: TObject; const PropName: String; Value: TObject) ;\r\nprocedure SetObjectProp(Instance: TObject; const PropInfo: TTypeMemberProperty; Value: TObject);\r\n\r\nfunction GetMethodProp(Instance: TObject; PropInfo: TTypeMemberProperty): TMethod;\r\nfunction GetMethodProp(Instance: TObject; const PropName: string): TMethod;\r\nprocedure SetMethodProp(Instance: TObject; PropInfo: TTypeMemberProperty; const Value : TMethod);\r\nprocedure SetMethodProp(Instance: TObject; const PropName: string; const Value: TMethod);\r\n\r\nfunction GetInterfaceProp(Instance: TObject; const PropName: string): IInterface;\r\nfunction GetInterfaceProp(Instance: TObject; PropInfo: TTypeMemberProperty): IInterface;\r\nprocedure SetInterfaceProp(Instance: TObject; const PropName: string; const Value: IInterface);\r\nprocedure SetInterfaceProp(Instance: TObject; PropInfo: TTypeMemberProperty; const Value: IInterface);\r\n\r\nfunction GetRawInterfaceProp(Instance: TObject; const PropName: string): Pointer;\r\nfunction GetRawInterfaceProp(Instance: TObject; PropInfo: TTypeMemberProperty): Pointer;\r\nprocedure SetRawInterfaceProp(Instance: TObject; const PropName: string; const Value: Pointer);\r\nprocedure SetRawInterfaceProp(Instance: TObject; PropInfo: TTypeMemberProperty; const Value: Pointer);\r\n\r\nimplementation\r\n\r\nfunction GetTypeName(TypeInfo: TTypeInfo): string;\r\nbegin\r\n Result := TypeInfo.Name;\r\nend;\r\n\r\nfunction GetClassMembers(aTIStruct: TTypeInfoStruct): TTypeMemberDynArray;\r\nvar\r\n C: TTypeInfoStruct;\r\n i: Integer;\r\n PropName: String;\r\n Names: TJSObject;\r\nbegin\r\n Result:=nil;\r\n Names:=TJSObject.new;\r\n C:=aTIStruct;\r\n while C<>nil do\r\n begin\r\n for i:=0 to length(C.Names)-1 do\r\n begin\r\n PropName:=C.Names[i];\r\n if Names.hasOwnProperty(PropName) then continue;\r\n TJSArray(Result).push(C.Members[PropName]);\r\n Names[PropName]:=true;\r\n end;\r\n if not (C is TTypeInfoClass) then break;\r\n C:=TTypeInfoClass(C).Ancestor;\r\n end;\r\nend;\r\n\r\nfunction GetClassMember(aTIStruct: TTypeInfoStruct; const aName: String): TTypeMember;\r\nvar\r\n C: TTypeInfoStruct;\r\n i: Integer;\r\nbegin\r\n // quick search: case sensitive\r\n C:=aTIStruct;\r\n while C<>nil do\r\n begin\r\n if TJSObject(C.Members).hasOwnProperty(aName) then\r\n exit(C.Members[aName]);\r\n if not (C is TTypeInfoClass) then break;\r\n C:=TTypeInfoClass(C).Ancestor;\r\n end;\r\n // slow search: case insensitive\r\n C:=aTIStruct;\r\n while C<>nil do\r\n begin\r\n for i:=0 to length(C.Names)-1 do\r\n if CompareText(C.Names[i],aName)=0 then\r\n exit(C.Members[C.Names[i]]);\r\n if not (C is TTypeInfoClass) then break;\r\n C:=TTypeInfoClass(C).Ancestor;\r\n end;\r\n Result:=nil;\r\nend;\r\n\r\nfunction GetInstanceMethod(Instance: TObject; const aName: String): Pointer;\r\nvar\r\n TI: TTypeMember;\r\nbegin\r\n if Instance=nil then exit(nil);\r\n TI:=GetClassMember(TypeInfo(Instance),aName);\r\n if not (TI is TTypeMemberMethod) then exit(nil);\r\n Result:=CreateMethod(Instance,TI.Name); // Note: use TI.Name for the correct case!\r\nend;\r\n\r\nfunction GetClassMethods(aTIStruct: TTypeInfoStruct): TTypeMemberMethodDynArray;\r\nvar\r\n C: TTypeInfoStruct;\r\n i, Cnt, j: Integer;\r\nbegin\r\n Cnt:=0;\r\n C:=aTIStruct;\r\n while C<>nil do\r\n begin\r\n inc(Cnt,C.MethodCount);\r\n if not (C is TTypeInfoClass) then break;\r\n C:=TTypeInfoClass(C).Ancestor;\r\n end;\r\n SetLength(Result,Cnt);\r\n C:=aTIStruct;\r\n i:=0;\r\n while C<>nil do\r\n begin\r\n for j:=0 to C.MethodCount-1 do\r\n begin\r\n Result[i]:=TTypeMemberMethod(C.Members[C.Methods[j]]);\r\n inc(i);\r\n end;\r\n if not (C is TTypeInfoClass) then break;\r\n C:=TTypeInfoClass(C).Ancestor;\r\n end;\r\nend;\r\n\r\nfunction GetInterfaceMembers(aTIInterface: TTypeInfoInterface\r\n ): TTypeMemberDynArray;\r\nvar\r\n Intf: TTypeInfoInterface;\r\n i, Cnt, j: Integer;\r\nbegin\r\n Cnt:=0;\r\n Intf:=aTIInterface;\r\n while Intf<>nil do\r\n begin\r\n inc(Cnt,length(Intf.Names));\r\n Intf:=Intf.Ancestor;\r\n end;\r\n SetLength(Result,Cnt);\r\n Intf:=aTIInterface;\r\n i:=0;\r\n while Intf<>nil do\r\n begin\r\n for j:=0 to length(Intf.Names)-1 do\r\n begin\r\n Result[i]:=Intf.Members[Intf.Names[j]];\r\n inc(i);\r\n end;\r\n Intf:=Intf.Ancestor;\r\n end;\r\nend;\r\n\r\nfunction GetInterfaceMember(aTIInterface: TTypeInfoInterface;\r\n const aName: String): TTypeMember;\r\nvar\r\n Intf: TTypeInfoInterface;\r\n i: Integer;\r\nbegin\r\n // quick search: case sensitive\r\n Intf:=aTIInterface;\r\n while Intf<>nil do\r\n begin\r\n if TJSObject(Intf.Members).hasOwnProperty(aName) then\r\n exit(Intf.Members[aName]);\r\n Intf:=Intf.Ancestor;\r\n end;\r\n // slow search: case insensitive\r\n Intf:=aTIInterface;\r\n while Intf<>nil do\r\n begin\r\n for i:=0 to length(Intf.Names)-1 do\r\n if CompareText(Intf.Names[i],aName)=0 then\r\n exit(Intf.Members[Intf.Names[i]]);\r\n Intf:=Intf.Ancestor;\r\n end;\r\n Result:=nil;\r\nend;\r\n\r\nfunction GetInterfaceMethods(aTIInterface: TTypeInfoInterface\r\n ): TTypeMemberMethodDynArray;\r\nvar\r\n Intf: TTypeInfoInterface;\r\n i, Cnt, j: Integer;\r\nbegin\r\n Cnt:=0;\r\n Intf:=aTIInterface;\r\n while Intf<>nil do\r\n begin\r\n inc(Cnt,Intf.MethodCount);\r\n Intf:=Intf.Ancestor;\r\n end;\r\n SetLength(Result,Cnt);\r\n Intf:=aTIInterface;\r\n i:=0;\r\n while Intf<>nil do\r\n begin\r\n for j:=0 to Intf.MethodCount-1 do\r\n begin\r\n Result[i]:=TTypeMemberMethod(Intf.Members[Intf.Methods[j]]);\r\n inc(i);\r\n end;\r\n Intf:=Intf.Ancestor;\r\n end;\r\nend;\r\n\r\ntype\r\n TCreatorAttribute = class external name 'attr'\r\n class function Create(const ProcName: string): TCustomAttribute; overload; external name '$create';\r\n class function Create(const ProcName: string; Params: jsvalue): TCustomAttribute; overload; external name '$create';\r\n end;\r\n TCreatorAttributeClass = class of TCreatorAttribute;\r\n\r\nfunction GetRTTIAttributes(const Attributes: TTypeInfoAttributes\r\n ): TCustomAttributeArray;\r\nvar\r\n i, len: Integer;\r\n AttrClass: TCreatorAttributeClass;\r\n ProcName: String;\r\n Attr: TCustomAttribute;\r\nbegin\r\n Result:=nil;\r\n if Attributes=Undefined then exit;\r\n i:=0;\r\n len:=length(Attributes);\r\n while inil do\r\n begin\r\n for i:=0 to C.PropCount-1 do\r\n begin\r\n PropName:=C.Properties[i];\r\n if Names.hasOwnProperty(PropName) then continue;\r\n TJSArray(Result).push(TTypeMemberProperty(C.Members[PropName]));\r\n Names[PropName]:=true;\r\n end;\r\n if not (C is TTypeInfoClass) then\r\n break;\r\n C:=TTypeInfoClass(C).Ancestor;\r\n end;\r\nend;\r\n\r\nfunction GetPropList(aTIStruct: TTypeInfoStruct; TypeKinds: TTypeKinds;\r\n Sorted: boolean): TTypeMemberPropertyDynArray;\r\n\r\n function NameSort(a,b: JSValue): NativeInt;\r\n begin\r\n if TTypeMemberProperty(a).NameTTypeMemberProperty(b).Name then\r\n Result:=1\r\n else\r\n Result:=0;\r\n end;\r\n\r\nvar\r\n C: TTypeInfoStruct;\r\n i: Integer;\r\n Names: TJSObject;\r\n PropName: String;\r\n Prop: TTypeMemberProperty;\r\nbegin\r\n Result:=nil;\r\n C:=aTIStruct;\r\n Names:=TJSObject.new;\r\n while C<>nil do\r\n begin\r\n for i:=0 to C.PropCount-1 do\r\n begin\r\n PropName:=C.Properties[i];\r\n if Names.hasOwnProperty(PropName) then continue;\r\n Prop:=TTypeMemberProperty(C.Members[PropName]);\r\n if not (Prop.TypeInfo.Kind in TypeKinds) then continue;\r\n TJSArray(Result).push(Prop);\r\n Names[PropName]:=true;\r\n end;\r\n if not (C is TTypeInfoClass) then\r\n break;\r\n C:=TTypeInfoClass(C).Ancestor;\r\n end;\r\n if Sorted then\r\n TJSArray(Result).sort(@NameSort);\r\nend;\r\n\r\nfunction GetPropList(aTIStruct: TTypeInfoStruct): TTypeMemberPropertyDynArray;\r\nbegin\r\n Result:=GetPropInfos(aTIStruct);\r\nend;\r\n\r\nfunction GetPropList(AClass: TClass): TTypeMemberPropertyDynArray;\r\nbegin\r\n Result:=GetPropInfos(TypeInfo(AClass));\r\nend;\r\n\r\nfunction GetPropList(Instance: TObject): TTypeMemberPropertyDynArray;\r\nbegin\r\n Result:=GetPropList(Instance.ClassType);\r\nend;\r\n\r\nfunction GetPropInfo(TI: TTypeInfoStruct; const PropName: String\r\n ): TTypeMemberProperty;\r\nvar\r\n m: TTypeMember;\r\n i: Integer;\r\n C: TTypeInfoStruct;\r\nbegin\r\n // quick search case sensitive\r\n C:=TI;\r\n while C<>nil do\r\n begin\r\n m:=C.Members[PropName];\r\n if m is TTypeMemberProperty then\r\n exit(TTypeMemberProperty(m));\r\n if not (C is TTypeInfoClass) then\r\n break;\r\n C:=TTypeInfoClass(C).Ancestor;\r\n end;\r\n\r\n // slow search case insensitive\r\n Result:=nil;\r\n repeat\r\n for i:=0 to TI.PropCount-1 do\r\n if CompareText(PropName,TI.Properties[i])=0 then\r\n begin\r\n m:=TI.Members[TI.Properties[i]];\r\n if m is TTypeMemberProperty then\r\n Result:=TTypeMemberProperty(m);\r\n exit;\r\n end;\r\n if not (TI is TTypeInfoClass) then\r\n break;\r\n TI:=TTypeInfoClass(TI).Ancestor;\r\n until TI=nil;\r\nend;\r\n\r\nfunction GetPropInfo(TI: TTypeInfoStruct; const PropName: String;\r\n const Kinds: TTypeKinds): TTypeMemberProperty;\r\nbegin\r\n Result:=GetPropInfo(TI,PropName);\r\n if (Kinds<>[]) and (Result<>nil) and not (Result.TypeInfo.Kind in Kinds) then\r\n Result:=nil;\r\nend;\r\n\r\nfunction GetPropInfo(Instance: TObject; const PropName: String\r\n ): TTypeMemberProperty;\r\nbegin\r\n Result:=GetPropInfo(TypeInfo(Instance),PropName,[]);\r\nend;\r\n\r\nfunction GetPropInfo(Instance: TObject; const PropName: String;\r\n const Kinds: TTypeKinds): TTypeMemberProperty;\r\nbegin\r\n Result:=GetPropInfo(TypeInfo(Instance),PropName,Kinds);\r\nend;\r\n\r\nfunction GetPropInfo(aClass: TClass; const PropName: String\r\n ): TTypeMemberProperty;\r\nbegin\r\n Result:=GetPropInfo(TypeInfo(AClass),PropName,[]);\r\nend;\r\n\r\nfunction GetPropInfo(aClass: TClass; const PropName: String;\r\n const Kinds: TTypeKinds): TTypeMemberProperty;\r\nbegin\r\n Result:=GetPropInfo(TypeInfo(AClass),PropName,Kinds);\r\nend;\r\n\r\nfunction FindPropInfo(Instance: TObject; const PropName: String\r\n ): TTypeMemberProperty;\r\nbegin\r\n Result:=GetPropInfo(TypeInfo(Instance), PropName);\r\n if Result=nil then\r\n raise EPropertyError.CreateFmt(SErrPropertyNotFound, [PropName]);\r\nend;\r\n\r\nfunction FindPropInfo(Instance: TObject; const PropName: String;\r\n const Kinds: TTypeKinds): TTypeMemberProperty;\r\nbegin\r\n Result:=GetPropInfo(TypeInfo(Instance), PropName, Kinds);\r\n if Result=nil then\r\n raise EPropertyError.CreateFmt(SErrPropertyNotFound, [PropName]);\r\nend;\r\n\r\nfunction FindPropInfo(aClass: TClass; const PropName: String\r\n ): TTypeMemberProperty;\r\nbegin\r\n Result:=GetPropInfo(TypeInfo(aClass), PropName);\r\n if Result=nil then\r\n raise EPropertyError.CreateFmt(SErrPropertyNotFound, [PropName]);\r\nend;\r\n\r\nfunction FindPropInfo(aClass: TClass; const PropName: String;\r\n const Kinds: TTypeKinds): TTypeMemberProperty;\r\nbegin\r\n Result:=GetPropInfo(TypeInfo(aClass), PropName, Kinds);\r\n if Result=nil then\r\n raise EPropertyError.CreateFmt(SErrPropertyNotFound, [PropName]);\r\nend;\r\n\r\nfunction IsStoredProp(Instance: TObject; const PropInfo: TTypeMemberProperty\r\n ): Boolean;\r\ntype\r\n TIsStored = function: Boolean of object;\r\nbegin\r\n case PropInfo.Flags and 12 of\r\n 0: Result:=true;\r\n 4: Result:=false;\r\n 8: Result:=Boolean(TJSObject(Instance)[PropInfo.Stored]);\r\n else Result:=TIsStored(TJSObject(Instance)[PropInfo.Stored])();\r\n end;\r\nend;\r\n\r\nfunction IsStoredProp(Instance: TObject; const PropName: string): Boolean;\r\nbegin\r\n Result:=IsStoredProp(Instance,FindPropInfo(Instance,PropName));\r\nend;\r\n\r\nfunction IsPublishedProp(Instance: TObject; const PropName: String): Boolean;\r\nbegin\r\n Result:=GetPropInfo(Instance,PropName)<>nil;\r\nend;\r\n\r\nfunction IsPublishedProp(aClass: TClass; const PropName: String): Boolean;\r\nbegin\r\n Result:=GetPropInfo(aClass,PropName)<>nil;\r\nend;\r\n\r\nfunction PropType(Instance: TObject; const PropName: string): TTypeKind;\r\nbegin\r\n Result:=FindPropInfo(Instance,PropName).TypeInfo.Kind;\r\nend;\r\n\r\nfunction PropType(aClass: TClass; const PropName: string): TTypeKind;\r\nbegin\r\n Result:=FindPropInfo(aClass,PropName).TypeInfo.Kind;\r\nend;\r\n\r\nfunction PropIsType(Instance: TObject; const PropName: string;\r\n const TypeKind: TTypeKind): Boolean;\r\nbegin\r\n Result:=PropType(Instance,PropName)=TypeKind;\r\nend;\r\n\r\nfunction PropIsType(aClass: TClass; const PropName: string;\r\n const TypeKind: TTypeKind): Boolean;\r\nbegin\r\n Result:=PropType(aClass,PropName)=TypeKind;\r\nend;\r\n\r\ntype\r\n TGetterKind = (\r\n gkNone,\r\n gkField,\r\n gkFunction,\r\n gkFunctionWithParams\r\n );\r\n\r\nfunction GetPropGetterKind(const PropInfo: TTypeMemberProperty): TGetterKind;\r\nbegin\r\n if PropInfo.Getter='' then\r\n Result:=gkNone\r\n else if (pfGetFunction and PropInfo.Flags)>0 then\r\n begin\r\n if length(PropInfo.Params)>0 then\r\n // array property\r\n Result:=gkFunctionWithParams\r\n else\r\n Result:=gkFunction;\r\n end\r\n else\r\n Result:=gkField;\r\nend;\r\n\r\ntype\r\n TSetterKind = (\r\n skNone,\r\n skField,\r\n skProcedure,\r\n skProcedureWithParams\r\n );\r\n\r\nfunction GetPropSetterKind(const PropInfo: TTypeMemberProperty): TSetterKind;\r\nbegin\r\n if PropInfo.Setter='' then\r\n Result:=skNone\r\n else if (pfSetProcedure and PropInfo.Flags)>0 then\r\n begin\r\n if length(PropInfo.Params)>0 then\r\n // array property\r\n Result:=skProcedureWithParams\r\n else\r\n Result:=skProcedure;\r\n end\r\n else\r\n Result:=skField;\r\nend;\r\n\r\nfunction GetJSValueProp(Instance: TJSObject; TI: TTypeInfoStruct;\r\n const PropName: String): JSValue;\r\nvar\r\n PropInfo: TTypeMemberProperty;\r\nbegin\r\n PropInfo:=GetPropInfo(TI,PropName);\r\n if PropInfo=nil then\r\n raise EPropertyError.CreateFmt(SErrPropertyNotFound, [PropName]);\r\n Result:=GetJSValueProp(Instance,PropInfo);\r\nend;\r\n\r\nfunction GetJSValueProp(Instance: TJSObject;\r\n const PropInfo: TTypeMemberProperty): JSValue;\r\ntype\r\n TGetter = function: JSValue of object;\r\n TGetterWithIndex = function(Index: JSValue): JSValue of object;\r\nvar\r\n gk: TGetterKind;\r\nbegin\r\n gk:=GetPropGetterKind(PropInfo);\r\n case gk of\r\n gkNone:\r\n raise EPropertyError.CreateFmt(SCantReadPropertyS, [PropInfo.Name]);\r\n gkField:\r\n Result:=Instance[PropInfo.Getter];\r\n gkFunction:\r\n if (pfHasIndex and PropInfo.Flags)>0 then\r\n Result:=TGetterWithIndex(Instance[PropInfo.Getter])(PropInfo.Index)\r\n else\r\n Result:=TGetter(Instance[PropInfo.Getter])();\r\n gkFunctionWithParams:\r\n raise EPropertyError.CreateFmt(SIndexedPropertyNeedsParams, [PropInfo.Name]);\r\n end;\r\nend;\r\n\r\nfunction GetJSValueProp(Instance: TObject; const PropName: String): JSValue;\r\nbegin\r\n Result:=GetJSValueProp(Instance,FindPropInfo(Instance,PropName));\r\nend;\r\n\r\nfunction GetJSValueProp(Instance: TObject; const PropInfo: TTypeMemberProperty\r\n ): JSValue;\r\nbegin\r\n Result:=GetJSValueProp(TJSObject(Instance),PropInfo);\r\nend;\r\n\r\nprocedure SetJSValueProp(Instance: TJSObject; TI: TTypeInfoStruct;\r\n const PropName: String; Value: JSValue);\r\nvar\r\n PropInfo: TTypeMemberProperty;\r\nbegin\r\n PropInfo:=GetPropInfo(TI,PropName);\r\n if PropInfo=nil then\r\n raise EPropertyError.CreateFmt(SErrPropertyNotFound, [PropName]);\r\n SetJSValueProp(Instance,PropInfo,Value);\r\nend;\r\n\r\nprocedure SetJSValueProp(Instance: TJSObject;\r\n const PropInfo: TTypeMemberProperty; Value: JSValue);\r\ntype\r\n TSetter = procedure(Value: JSValue) of object;\r\n TSetterWithIndex = procedure(Index, Value: JSValue) of object;\r\nvar\r\n sk: TSetterKind;\r\nbegin\r\n sk:=GetPropSetterKind(PropInfo);\r\n case sk of\r\n skNone:\r\n raise EPropertyError.CreateFmt(SCantWritePropertyS, [PropInfo.Name]);\r\n skField:\r\n Instance[PropInfo.Setter]:=Value;\r\n skProcedure:\r\n if (pfHasIndex and PropInfo.Flags)>0 then\r\n TSetterWithIndex(Instance[PropInfo.Setter])(PropInfo.Index,Value)\r\n else\r\n TSetter(Instance[PropInfo.Setter])(Value);\r\n skProcedureWithParams:\r\n raise EPropertyError.CreateFmt(SIndexedPropertyNeedsParams, [PropInfo.Name]);\r\n end;\r\nend;\r\n\r\nprocedure SetJSValueProp(Instance: TObject; const PropName: String;\r\n Value: JSValue);\r\nbegin\r\n SetJSValueProp(Instance,FindPropInfo(Instance,PropName),Value);\r\nend;\r\n\r\nprocedure SetJSValueProp(Instance: TObject;\r\n const PropInfo: TTypeMemberProperty; Value: JSValue);\r\nbegin\r\n SetJSValueProp(TJSObject(Instance),PropInfo,Value);\r\nend;\r\n\r\nfunction GetNativeIntProp(Instance: TObject; const PropName: String): NativeInt;\r\nbegin\r\n Result:=GetNativeIntProp(Instance,FindPropInfo(Instance,PropName));\r\nend;\r\n\r\nfunction GetNativeIntProp(Instance: TObject; const PropInfo: TTypeMemberProperty\r\n ): NativeInt;\r\nbegin\r\n Result:=NativeInt(GetJSValueProp(Instance,PropInfo));\r\nend;\r\n\r\nprocedure SetNativeIntProp(Instance: TObject; const PropName: String;\r\n Value: NativeInt);\r\nbegin\r\n SetJSValueProp(Instance,FindPropInfo(Instance,PropName),Value);\r\nend;\r\n\r\nprocedure SetNativeIntProp(Instance: TObject;\r\n const PropInfo: TTypeMemberProperty; Value: NativeInt);\r\nbegin\r\n SetJSValueProp(Instance,PropInfo,Value);\r\nend;\r\n\r\nfunction GetOrdProp(Instance: TObject; const PropName: String): longint;\r\nbegin\r\n Result:=GetOrdProp(Instance,FindPropInfo(Instance,PropName));\r\nend;\r\n\r\nfunction GetOrdProp(Instance: TObject; const PropInfo: TTypeMemberProperty\r\n ): longint;\r\nvar\r\n o: TJSObject;\r\n Key: String;\r\n n: NativeInt;\r\n v : JSValue;\r\n vs : TJSString absolute key;\r\n\r\nbegin\r\n if PropInfo.TypeInfo.Kind=tkSet then\r\n begin\r\n // a set is a JS object, with the following property: o[ElementDecimal]=true\r\n o:=TJSObject(GetJSValueProp(Instance,PropInfo));\r\n Result:=0;\r\n for Key in o do\r\n begin\r\n n:=parseInt(Key,10);\r\n if n<32 then\r\n Result:=Result+(1 shl n);\r\n end;\r\n end else if PropInfo.TypeInfo.Kind=tkChar then\r\n begin\r\n v:=GetJSValueProp(Instance,PropInfo);\r\n if isNumber(v) then\r\n Result:=Longint(V)\r\n else\r\n begin\r\n Key:=String(v);\r\n If Key='' then\r\n Result:=0\r\n else\r\n Result:=vs.CharCodeAt(0);\r\n end\r\n end else\r\n Result:=longint(GetJSValueProp(Instance,PropInfo));\r\nend;\r\n\r\nprocedure SetOrdProp(Instance: TObject; const PropName: String; Value: longint);\r\nbegin\r\n SetOrdProp(Instance,FindPropInfo(Instance,PropName),Value);\r\nend;\r\n\r\nprocedure SetOrdProp(Instance: TObject; const PropInfo: TTypeMemberProperty;\r\n Value: longint);\r\nvar\r\n o: TJSObject;\r\n i: Integer;\r\nbegin\r\n if PropInfo.TypeInfo.Kind=tkSet then\r\n begin\r\n o:=TJSObject.new;\r\n for i:=0 to 31 do\r\n if (1 shl i) and Value>0 then\r\n o[str(i)]:=true;\r\n SetJSValueProp(Instance,PropInfo,o);\r\n end else if PropInfo.TypeInfo.Kind=tkChar then\r\n SetJSValueProp(Instance,PropInfo,TJSString.fromCharCode(Value))\r\n else\r\n SetJSValueProp(Instance,PropInfo,Value);\r\nend;\r\n\r\nfunction GetEnumProp(Instance: TObject; const PropName: String): String;\r\nbegin\r\n Result:=GetEnumProp(Instance,FindPropInfo(Instance,PropName));\r\nend;\r\n\r\nfunction GetEnumProp(Instance: TObject; const PropInfo: TTypeMemberProperty): String;\r\nvar\r\n n: NativeInt;\r\n TIEnum: TTypeInfoEnum;\r\nbegin\r\n TIEnum:=PropInfo.TypeInfo as TTypeInfoEnum;\r\n n:=NativeInt(GetJSValueProp(Instance,PropInfo));\r\n if (n>=TIEnum.MinValue) and (n<=TIEnum.MaxValue) then\r\n Result:=TIEnum.EnumType.IntToName[n]\r\n else\r\n Result:=str(n);\r\nend;\r\n\r\nprocedure SetEnumProp(Instance: TObject; const PropName: String;\r\n const Value: String);\r\nbegin\r\n SetEnumProp(Instance,FindPropInfo(Instance,PropName),Value);\r\nend;\r\n\r\nprocedure SetEnumProp(Instance: TObject; const PropInfo: TTypeMemberProperty;\r\n const Value: String);\r\nvar\r\n TIEnum: TTypeInfoEnum;\r\n n: NativeInt;\r\nbegin\r\n TIEnum:=PropInfo.TypeInfo as TTypeInfoEnum;\r\n n:=TIEnum.EnumType.NameToInt[Value];\r\n if not isUndefined(n) then\r\n SetJSValueProp(Instance,PropInfo,n);\r\nend;\r\n\r\nfunction GetEnumName(TypeInfo: TTypeInfoEnum; Value: Integer): String;\r\nbegin\r\n Result:=TypeInfo.EnumType.IntToName[Value];\r\nend;\r\n\r\nfunction GetEnumValue(TypeInfo: TTypeInfoEnum; const Name: string): Longint;\r\nbegin\r\n Result:=TypeInfo.EnumType.NameToInt[Name];\r\nend;\r\n\r\nfunction GetEnumNameCount(TypeInfo: TTypeInfoEnum): Longint;\r\nvar\r\n o: TJSObject;\r\n l, r: LongInt;\r\nbegin\r\n o:=TJSObject(TypeInfo.EnumType);\r\n // as of pas2js 1.0 the RTTI does not contain a min/max value\r\n // -> use exponential search\r\n // ToDo: adapt this once enums with gaps are supported\r\n Result:=1;\r\n while o.hasOwnProperty(String(JSValue(Result))) do\r\n Result:=Result*2;\r\n l:=Result div 2;\r\n r:=Result;\r\n while l<=r do\r\n begin\r\n Result:=(l+r) div 2;\r\n if o.hasOwnProperty(String(JSValue(Result))) then\r\n l:=Result+1\r\n else\r\n r:=Result-1;\r\n end;\r\n if o.hasOwnProperty(String(JSValue(Result))) then\r\n inc(Result);\r\nend;\r\n\r\nfunction GetSetProp(Instance: TObject; const PropName: String): String;\r\nbegin\r\n Result:=GetSetProp(Instance,FindPropInfo(Instance,PropName));\r\nend;\r\n\r\nfunction GetSetProp(Instance: TObject; const PropInfo: TTypeMemberProperty\r\n ): String;\r\nvar\r\n o: TJSObject;\r\n key, Value: String;\r\n n: NativeInt;\r\n TIEnum: TTypeInfoEnum;\r\n TISet: TTypeInfoSet;\r\nbegin\r\n Result:='';\r\n // get enum type if available\r\n TISet:=PropInfo.TypeInfo as TTypeInfoSet;\r\n TIEnum:=nil;\r\n if TISet.CompType is TTypeInfoEnum then\r\n TIEnum:=TTypeInfoEnum(TISet.CompType);\r\n // read value\r\n o:=TJSObject(GetJSValueProp(Instance,PropInfo));\r\n // a set is a JS object, where included element is stored as: o[ElementDecimal]=true\r\n for Key in o do\r\n begin\r\n n:=parseInt(Key,10);\r\n if (TIEnum<>nil) and (n>=TIEnum.MinValue) and (n<=TIEnum.MaxValue) then\r\n Value:=TIEnum.EnumType.IntToName[n]\r\n else\r\n Value:=str(n);\r\n if Result<>'' then Result:=Result+',';\r\n Result:=Result+Value;\r\n end;\r\n Result:='['+Result+']';\r\nend;\r\n\r\nfunction GetSetPropArray(Instance: TObject; const PropName: String\r\n ): TIntegerDynArray;\r\nbegin\r\n Result:=GetSetPropArray(Instance,FindPropInfo(Instance,PropName));\r\nend;\r\n\r\nfunction GetSetPropArray(Instance: TObject; const PropInfo: TTypeMemberProperty\r\n ): TIntegerDynArray;\r\nvar\r\n o: TJSObject;\r\n Key: string;\r\nbegin\r\n Result:=[];\r\n // read value\r\n o:=TJSObject(GetJSValueProp(Instance,PropInfo));\r\n // a set is a JS object, where included element is stored as: o[ElementDecimal]=true\r\n for Key in o do\r\n TJSArray(Result).push(parseInt(Key,10));\r\nend;\r\n\r\nprocedure SetSetPropArray(Instance: TObject; const PropName: String;\r\n const Arr: TIntegerDynArray);\r\nbegin\r\n SetSetPropArray(Instance,FindPropInfo(Instance,PropName),Arr);\r\nend;\r\n\r\nprocedure SetSetPropArray(Instance: TObject;\r\n const PropInfo: TTypeMemberProperty; const Arr: TIntegerDynArray);\r\nvar\r\n o: TJSObject;\r\n i: integer;\r\nbegin\r\n o:=TJSObject.new;\r\n for i in Arr do\r\n o[str(i)]:=true;\r\n SetJSValueProp(Instance,PropInfo,o);\r\nend;\r\n\r\nfunction GetStrProp(Instance: TObject; const PropName: String): String;\r\nbegin\r\n Result:=GetStrProp(Instance,FindPropInfo(Instance,PropName));\r\nend;\r\n\r\nfunction GetStrProp(Instance: TObject; const PropInfo: TTypeMemberProperty\r\n ): String;\r\nbegin\r\n Result:=String(GetJSValueProp(Instance,PropInfo));\r\nend;\r\n\r\nprocedure SetStrProp(Instance: TObject; const PropName: String; Value: String\r\n );\r\nbegin\r\n SetStrProp(Instance,FindPropInfo(Instance,PropName),Value);\r\nend;\r\n\r\nprocedure SetStrProp(Instance: TObject; const PropInfo: TTypeMemberProperty;\r\n Value: String);\r\nbegin\r\n SetJSValueProp(Instance,PropInfo,Value);\r\nend;\r\n\r\nfunction GetStringProp(Instance: TObject; const PropName: String): String;\r\nbegin\r\n Result:=GetStrProp(Instance,PropName);\r\nend;\r\n\r\nfunction GetStringProp(Instance: TObject; const PropInfo: TTypeMemberProperty\r\n ): String;\r\nbegin\r\n Result:=GetStrProp(Instance,PropInfo);\r\nend;\r\n\r\nprocedure SetStringProp(Instance: TObject; const PropName: String; Value: String\r\n );\r\nbegin\r\n SetStrProp(Instance,PropName,Value);\r\nend;\r\n\r\nprocedure SetStringProp(Instance: TObject; const PropInfo: TTypeMemberProperty;\r\n Value: String);\r\nbegin\r\n SetStrProp(Instance,PropInfo,Value);\r\nend;\r\n\r\nfunction GetBoolProp(Instance: TObject; const PropName: String): boolean;\r\nbegin\r\n Result:=GetBoolProp(Instance,FindPropInfo(Instance,PropName));\r\nend;\r\n\r\nfunction GetBoolProp(Instance: TObject; const PropInfo: TTypeMemberProperty\r\n ): boolean;\r\nbegin\r\n Result:=Boolean(GetJSValueProp(Instance,PropInfo));\r\nend;\r\n\r\nprocedure SetBoolProp(Instance: TObject; const PropName: String; Value: boolean\r\n );\r\nbegin\r\n SetBoolProp(Instance,FindPropInfo(Instance,PropName),Value);\r\nend;\r\n\r\nprocedure SetBoolProp(Instance: TObject; const PropInfo: TTypeMemberProperty;\r\n Value: boolean);\r\nbegin\r\n SetJSValueProp(Instance,PropInfo,Value);\r\nend;\r\n\r\nfunction GetObjectProp(Instance: TObject; const PropName: String): TObject;\r\nbegin\r\n Result:=GetObjectProp(Instance,FindPropInfo(Instance,PropName));\r\nend;\r\n\r\nfunction GetObjectProp(Instance: TObject; const PropName: String; MinClass : TClass): TObject;\r\nbegin\r\n Result:=GetObjectProp(Instance,FindPropInfo(Instance,PropName));\r\n if (MinClass<>Nil) and (Result<>Nil) Then\r\n if not Result.InheritsFrom(MinClass) then\r\n Result:=Nil;\r\nend;\r\n\r\nfunction GetObjectProp(Instance: TObject; const PropInfo: TTypeMemberProperty): TObject;\r\n\r\nbegin\r\n Result:=GetObjectProp(Instance,PropInfo,Nil);\r\nend;\r\n\r\nfunction GetObjectProp(Instance: TObject; const PropInfo: TTypeMemberProperty; MinClass : TClass): TObject;\r\n\r\nVar\r\n O : TObject;\r\n\r\nbegin\r\n O:=TObject(GetJSValueProp(Instance,PropInfo));\r\n if (MinClass<>Nil) and not O.InheritsFrom(MinClass) then\r\n Result:=Nil\r\n else\r\n Result:=O;\r\nend;\r\n\r\nprocedure SetObjectProp(Instance: TObject; const PropName: String; Value: TObject) ;\r\n\r\nbegin\r\n SetObjectProp(Instance,FindPropInfo(Instance,PropName),Value);\r\nend;\r\n\r\nprocedure SetObjectProp(Instance: TObject; const PropInfo: TTypeMemberProperty; Value: TObject);\r\n\r\nbegin\r\n SetJSValueProp(Instance,PropInfo,Value);\r\nend;\r\n\r\nfunction GetMethodProp(Instance: TObject; PropInfo: TTypeMemberProperty\r\n ): TMethod;\r\nvar\r\n v, fn: JSValue;\r\nbegin\r\n Result.Code:=nil;\r\n Result.Data:=nil;\r\n v:=GetJSValueProp(Instance,PropInfo);\r\n if not isFunction(v) then exit;\r\n Result.Data:=Pointer(TJSObject(v)['scope']);\r\n fn:=TJSObject(v)['fn'];\r\n if isString(fn) then\r\n begin\r\n if Result.Data<>nil then\r\n // named callback\r\n Result.Code:=CodePointer(TJSObject(Result.Data)[String(fn)])\r\n else\r\n // this is not an rtl callback, return the value\r\n Result.Code:=CodePointer(v);\r\n end\r\n else\r\n // anonymous callback\r\n Result.Code:=CodePointer(fn);\r\nend;\r\n\r\nfunction GetMethodProp(Instance: TObject; const PropName: string): TMethod;\r\nbegin\r\n Result:=GetMethodProp(Instance,FindPropInfo(Instance,PropName));\r\nend;\r\n\r\nfunction createCallbackPtr(scope: Pointer; fn: CodePointer): TJSFunction; external name 'rtl.createCallback';\r\nfunction createCallbackStr(scope: Pointer; fn: string): TJSFunction; external name 'rtl.createCallback';\r\n\r\nprocedure SetMethodProp(Instance: TObject; PropInfo: TTypeMemberProperty;\r\n const Value: TMethod);\r\nvar\r\n cb: TJSFunction;\r\n Code: Pointer;\r\nbegin\r\n // Note: Value.Data=nil is allowed and can be used by designer code\r\n Code:=Value.Code;\r\n if Code=nil then\r\n cb:=nil\r\n else if isFunction(Code) then\r\n begin\r\n if (TJSObject(Code)['scope']=Value.Data)\r\n and (isFunction(TJSObject(Code)['fn']) or isString(TJSObject(Code)['fn']))\r\n then\r\n begin\r\n // Value.Code is already the needed callback\r\n cb:=TJSFunction(Code);\r\n end\r\n else if isString(TJSObject(Code)['fn']) then\r\n // named callback, different scope\r\n cb:=createCallbackStr(Value.Data,string(TJSObject(Code)['fn']))\r\n else\r\n // normal function\r\n cb:=createCallbackPtr(Value.Data,Code);\r\n end\r\n else\r\n // not a valid value -> for compatibility set it anyway\r\n cb:=createCallbackPtr(Value.Data,Code);\r\n SetJSValueProp(Instance,PropInfo,cb);\r\nend;\r\n\r\nprocedure SetMethodProp(Instance: TObject; const PropName: string;\r\n const Value: TMethod);\r\nbegin\r\n SetMethodProp(Instance,FindPropInfo(Instance,PropName),Value);\r\nend;\r\n\r\nfunction GetInterfaceProp(Instance: TObject; const PropName: string\r\n ): IInterface;\r\nbegin\r\n Result:=GetInterfaceProp(Instance,FindPropInfo(Instance,PropName));\r\nend;\r\n\r\nfunction GetInterfaceProp(Instance: TObject; PropInfo: TTypeMemberProperty\r\n ): IInterface;\r\ntype\r\n TGetter = function: IInterface of object;\r\n TGetterWithIndex = function(Index: JSValue): IInterface of object;\r\nvar\r\n gk: TGetterKind;\r\nbegin\r\n if Propinfo.TypeInfo.Kind<>tkInterface then\r\n raise Exception.Create('Cannot get RAW interface from IInterface interface');\r\n gk:=GetPropGetterKind(PropInfo);\r\n case gk of\r\n gkNone:\r\n raise EPropertyError.CreateFmt(SCantReadPropertyS, [PropInfo.Name]);\r\n gkField:\r\n Result:=IInterface(TJSObject(Instance)[PropInfo.Getter]);\r\n gkFunction:\r\n if (pfHasIndex and PropInfo.Flags)>0 then\r\n Result:=TGetterWithIndex(TJSObject(Instance)[PropInfo.Getter])(PropInfo.Index)\r\n else\r\n Result:=TGetter(TJSObject(Instance)[PropInfo.Getter])();\r\n gkFunctionWithParams:\r\n raise EPropertyError.CreateFmt(SIndexedPropertyNeedsParams, [PropInfo.Name]);\r\n end;\r\nend;\r\n\r\nprocedure SetInterfaceProp(Instance: TObject; const PropName: string;\r\n const Value: IInterface);\r\nbegin\r\n SetInterfaceProp(Instance,FindPropInfo(Instance,PropName),Value);\r\nend;\r\n\r\nprocedure SetInterfaceProp(Instance: TObject; PropInfo: TTypeMemberProperty;\r\n const Value: IInterface);\r\ntype\r\n TSetter = procedure(Value: IInterface) of object;\r\n TSetterWithIndex = procedure(Index: JSValue; Value: IInterface) of object;\r\nprocedure setIntfP(Instance: TObject; const PropName: string; value: jsvalue); external name 'rtl.setIntfP';\r\nvar\r\n sk: TSetterKind;\r\n Setter: String;\r\nbegin\r\n if Propinfo.TypeInfo.Kind<>tkInterface then\r\n raise Exception.Create('Cannot set RAW interface from IInterface interface');\r\n sk:=GetPropSetterKind(PropInfo);\r\n Setter:=PropInfo.Setter;\r\n case sk of\r\n skNone:\r\n raise EPropertyError.CreateFmt(SCantWritePropertyS, [PropInfo.Name]);\r\n skField:\r\n setIntfP(Instance,Setter,Value);\r\n skProcedure:\r\n if (pfHasIndex and PropInfo.Flags)>0 then\r\n TSetterWithIndex(TJSObject(Instance)[Setter])(PropInfo.Index,Value)\r\n else\r\n TSetter(TJSObject(Instance)[Setter])(Value);\r\n skProcedureWithParams:\r\n raise EPropertyError.CreateFmt(SIndexedPropertyNeedsParams, [PropInfo.Name]);\r\n end;\r\nend;\r\n\r\nfunction GetRawInterfaceProp(Instance: TObject; const PropName: string\r\n ): Pointer;\r\nbegin\r\n Result:=GetRawInterfaceProp(Instance,FindPropInfo(Instance,PropName));\r\nend;\r\n\r\nfunction GetRawInterfaceProp(Instance: TObject; PropInfo: TTypeMemberProperty\r\n ): Pointer;\r\nbegin\r\n Result:=Pointer(GetJSValueProp(Instance,PropInfo));\r\nend;\r\n\r\nprocedure SetRawInterfaceProp(Instance: TObject; const PropName: string;\r\n const Value: Pointer);\r\nbegin\r\n SetRawInterfaceProp(Instance,FindPropInfo(Instance,PropName),Value);\r\nend;\r\n\r\nprocedure SetRawInterfaceProp(Instance: TObject; PropInfo: TTypeMemberProperty;\r\n const Value: Pointer);\r\nbegin\r\n SetJSValueProp(Instance,PropInfo,Value);\r\nend;\r\n\r\nfunction GetFloatProp(Instance: TObject; PropInfo: TTypeMemberProperty): Double;\r\nbegin\r\n Result:=Double(GetJSValueProp(Instance,PropInfo));\r\nend;\r\n\r\nfunction GetFloatProp(Instance: TObject; const PropName: string): Double;\r\nbegin\r\n Result:=GetFloatProp(Instance,FindPropInfo(Instance,PropName));\r\nend;\r\n\r\nprocedure SetFloatProp(Instance: TObject; const PropName: string; Value: Double\r\n );\r\nbegin\r\n SetFloatProp(Instance,FindPropInfo(Instance,PropName),Value);\r\nend;\r\n\r\nprocedure SetFloatProp(Instance: TObject; PropInfo: TTypeMemberProperty;\r\n Value: Double);\r\nbegin\r\n SetJSValueProp(Instance,PropInfo,Value);\r\nend;\r\n\r\nend.\r\n\r\n","{\r\n This file is part of the Pas2JS run time library.\r\n Copyright (c) 2017-2020 by the Pas2JS development team.\r\n\r\n See the file COPYING.FPC, included in this distribution,\r\n for details about the copyright.\r\n\r\n This program is distributed in the hope that it will be useful,\r\n but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\r\n\r\n **********************************************************************}\r\n\r\n{$mode objfpc}\r\n{$modeswitch externalclass}\r\n\r\nunit Web;\r\n\r\ninterface\r\n\r\nuses Types, JS;\r\n\r\nType\r\n TJSEvent = Class;\r\n // Forward definitions\r\n TJSHTMLElement = Class;\r\n TJSWindow = class;\r\n TJSDOMTokenList = class;\r\n TJSXPathResult = CLass;\r\n TJSNodeList = class;\r\n TJSDocument = class;\r\n TJSElement = class;\r\n TJSCSSStyleSheet = Class;\r\n TJSNodeFilter = Class;\r\n TJSIDBObjectStore = Class;\r\n TIDBDatabase = class;\r\n TJSIDBRequest = class;\r\n TJSEventTarget = class;\r\n TJSMouseEvent = Class;\r\n TJSWheelEvent = Class;\r\n TJSKeyBoardEvent = class;\r\n TJSPointerEvent = Class;\r\n TJSUIEvent = class;\r\n TJSTouchEvent = Class;\r\n TJSInputEvent = class;\r\n TJSBlob = class;\r\n TJSPermissions = class;\r\n TJSFileSystemFileHandle = class;\r\n TJSFileSystemFileHandleArray = array of TJSFileSystemFileHandle;\r\n TJSFileSystemDirectoryHandle = class;\r\n TJSFileSystemDirectoryHandleArray = array of TJSFileSystemDirectoryHandle;\r\n TJSShowOpenFilePickerOptions = class;\r\n TJSShowSaveFilePickerOptions = class;\r\n TJSServiceWorker = class;\r\n TJSClient = class;\r\n TJSRequest = Class;\r\n TJSResponse = Class;\r\n TJSServiceWorkerRegistration = class;\r\n TJSResizeObserver = class;\r\n\r\n { TEventListenerEvent }\r\n\r\n(*\r\nTEventListenerEvent = class {$IFDEF PAS2JS} external name 'EventListener_Event' {$ENDIF}(TJSObject)\r\n private\r\n FTarget: TJSEventTarget; external name 'target';\r\n public\r\n Property target: TJSEventTarget Read FTarget;\r\n end;\r\n*)\r\n TEventListenerEvent = TJSEvent;\r\n\r\n TJSEventHandler = reference to function(Event: TEventListenerEvent): boolean; {$IFDEF PAS2JS} safecall; {$ENDIF}\r\n TJSRawEventHandler = reference to Procedure(Event: TJSEvent); {$IFDEF PAS2JS} safecall; {$ENDIF}\r\n\r\n TJSEventTarget = class {$IFDEF PAS2JS} external name 'EventTarget' {$ENDIF}(TJSObject)\r\n public\r\n procedure addEventListener(aname : string; aListener : TJSEventHandler);\r\n procedure addEventListener(aname : string; aListener : TJSRawEventHandler);\r\n procedure addEventListener(aname : string; aListener : JSValue);\r\n function dispatchEvent(event : JSValue) : Boolean;\r\n procedure removeEventListener(aname : string; aListener : TJSEventHandler);\r\n procedure removeEventListener(aname : string; aListener : TJSRawEventHandler);\r\n procedure removeEventListener(aname : string; aListener : JSValue);\r\n end;\r\n\r\n TJSNode = class {$IFDEF PAS2JS} external name 'Node' {$ENDIF}(TJSEventTarget)\r\n Private\r\n FBaseURI : String; external name 'baseURI';\r\n FChildNodes: TJSNodeList; external name 'childNodes';\r\n FFirstChild : TJSNode; external name 'firstChild';\r\n FLastChild : TJSNode; external name 'lastChild';\r\n FNextSibling : TJSNode; external name 'nextSibling';\r\n FNodeName : String; external name 'nodeName';\r\n FNodeType : NativeInt; external name 'nodeType';\r\n FOwnerDocument : TJSDocument; external name 'ownerDocument';\r\n FParentElement : TJSElement; external name 'parentElement';\r\n FParentNode : TJSNode; external name 'parentNode';\r\n FPreviousSibling : TJSNode; external name 'previousSibling';\r\n Public \r\n Const\r\n ELEMENT_NODE \t=1;\r\n TEXT_NODE \t=3;\r\n PROCESSING_INSTRUCTION_NODE = \t7;\r\n COMMENT_NODE \t=8;\r\n DOCUMENT_NODE \t=9;\r\n DOCUMENT_TYPE_NODE \t= 10;\r\n DOCUMENT_FRAGMENT_NODE = 11;\r\n\r\n DOCUMENT_POSITION_DISCONNECTED \t= 1;\r\n DOCUMENT_POSITION_PRECEDING \t= 2;\r\n DOCUMENT_POSITION_FOLLOWING \t= 4;\r\n DOCUMENT_POSITION_CONTAINS \t= 8;\r\n DOCUMENT_POSITION_CONTAINED_BY \t= 16;\r\n DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC = 32;\r\n Public \r\n nodeValue: string;\r\n innerText : string;\r\n textContent : string;\r\n function appendChild(aChild : TJSNode) : TJSNode;\r\n function cloneNode(deep: boolean): TJSNode;\r\n function compareDocumentPosition(aNode : TJSNode) : NativeInt;\r\n function contains(aNode : TJSNode) : boolean;\r\n function hasChildNodes : boolean;\r\n function insertBefore(newNode, referenceNode : TJSNode) : TJSNode;\r\n function isDefaultNameSpace(aNameSpaceURI : String) : Boolean;\r\n function isEqualNode(aNode : TJSNode) : boolean;\r\n function isSameNode(aNode : TJSNode) : boolean;\r\n function lookupNamespaceURI(aPrefix : string) : string;\r\n function lookupPrefix(aPrefix : string) : string;\r\n procedure normalize;\r\n function removeChild(aChild: TJSNode) : TJSNode;\r\n function replaceChild(aNewChild, aOldChild : TJSNode) : TJSNode;\r\n property baseURI : string read FBaseURI;\r\n property childNodes : TJSNodeList read FChildNodes;\r\n property firstChild : TJSNode read FFirstChild;\r\n property lastChild: TJSNode read FLastChild;\r\n property nextSibling : TJSNode read FNextSibling;\r\n property nodeName : String Read FNodeName;\r\n property nodeType : NativeInt Read FNodeType;\r\n property ownerDocument : TJSDocument read FOwnerDocument; \r\n property parentElement : TJSElement read FParentElement;\r\n property parentNode : TJSNode read FParentNode;\r\n property previousSibling : TJSNode Read FPreviousSibling;\r\n end;\r\n\r\n\r\n TJSNodeListCallBack = reference to procedure (currentValue : TJSNode; currentIndex: NativeInt; list : TJSNodeList);\r\n TJSNodeListEvent = procedure (currentValue : TJSNode; currentIndex: NativeInt; list : TJSNodeList) of object;\r\n \r\n TJSNodeList = class {$IFDEF PAS2JS} external name 'NodeList' {$ENDIF}(TJSObject)\r\n Private\r\n FLength : NativeInt; external name 'length';\r\n Public\r\n procedure forEach(const aCallBack : TJSNodeListCallBack);\r\n procedure forEach(const aCallBack : TJSNodeListEvent);\r\n function item(aIndex : NativeInt) : TJSNode;\r\n Property length : NativeInt Read FLength;\r\n Property Nodes [aIndex : NativeInt] : TJSNode Read item; default;\r\n end;\r\n\r\n TJSAttr = class {$IFDEF PAS2JS} external name 'Attr' {$ENDIF}(TJSNode)\r\n Private\r\n fLocalName : String; external name 'localName';\r\n fNameSpaceURI : String external name 'namespaceURI';\r\n fPrefix : string; external name 'prefix';\r\n fName : string; external name 'name';\r\n fSpecified : Boolean; external name 'specified';\r\n public\r\n value : JSValue;\r\n property localName : String Read fLocalName;\r\n property namespaceURI : string Read fNameSpaceURI;\r\n property prefix : string read fPrefix;\r\n property name : string Read fName;\r\n property specified : boolean Read fSpecified; // Useless, always true\r\n end;\r\n\r\n\r\n TJSNamedNodeMap = class {$IFDEF PAS2JS} external name 'NamedNodeMap' {$ENDIF}(TJSObject)\r\n Public\r\n function getNamedItem(aName : string) : TJSAttr;\r\n Property Attrs[aIndex : String] : TJSattr Read getNamedItem; default;\r\n end;\r\n \r\n TJSHTMLCollection = class {$IFDEF PAS2JS} external name 'HTMLCollection' {$ENDIF}(TJSObject)\r\n Private\r\n FLength : NativeInt; external name 'length';\r\n public\r\n Function item(aIndex : Integer) : TJSNode;\r\n Function namedItem(aName : string) : TJSNode;\r\n property Items[aIndex : Integer] : TJSNode Read item; default;\r\n property NamedItems[aName : String] : TJSNode Read namedItem; \r\n Property length : NativeInt Read FLength;\r\n end; \r\n \r\n TJSDOMString = String;\r\n\r\n TDOMTokenlistCallBack = Procedure (Current : JSValue; currentIndex : NativeInt; list : TJSDOMTokenList);\r\n \r\n // Interface\r\n TJSDOMTokenList = class {$IFDEF PAS2JS} external name 'DOMTokenList' {$ENDIF}(TJSObject)\r\n Private\r\n FLength : NativeInt; external name 'length';\r\n public\r\n Procedure add(aToken : TJSDOMString); varargs;\r\n Procedure remove(aToken : TJSDOMString); varargs;\r\n function item(aIndex : NativeInt) : String;\r\n function contains(aToken : TJSDOMString) : Boolean;\r\n Procedure replace(aOldToken, ANewToken : TJSDOMString);\r\n function supports(aToken : TJSDOMString) : Boolean;\r\n function toggle(aToken : TJSDOMString) : Boolean;\r\n // entries,keys, values\r\n procedure forEach(const callback: TDOMTokenlistCallBack);\r\n property length : NativeInt read FLength;\r\n end;\r\n\r\n TJSDOMRect = class {$IFDEF PAS2JS} external name 'DOMRect' {$ENDIF}(TJSObject)\r\n public\r\n left,top,right,bottom,x,y,width,height : double;\r\n {$IFDEF FIREFOX}\r\n constructor New;\r\n {$ENDIF}\r\n end;\r\n TJSClientRect = record\r\n left,top,right,bottom : double;\r\n {$IFDEF FIREFOX}\r\n width, height: double;\r\n {$ENDIF}\r\n end;\r\n \r\n TJSClientRectArray = array of TJSClientRect;\r\n \r\n TJSElement = class {$IFDEF PAS2JS} external name 'Element' {$ENDIF}(TJSNode)\r\n Private\r\n FAttributes : TJSNamedNodeMap; external name 'attributes';\r\n FChildElementCount : NativeInt; external name 'childElementCount';\r\n FChildren : TJSHTMLCollection; external name 'children';\r\n FClassList : TJSDOMTokenList; external name 'classList';\r\n FCLientHeight : NativeInt; external name 'clientHeight';\r\n FCLientLeft : NativeInt; external name 'clientLeft';\r\n FCLientTop : NativeInt; external name 'clientTop';\r\n FCLientWidth : NativeInt; external name 'clientWidth';\r\n FFirstElementChild : TJSElement; external name 'firstElementChild';\r\n FLastElementChild : TJSElement; external name 'lastElementChild';\r\n FLocalName : string; external name 'localName';\r\n FNameSpaceURI : String; external name 'namespaceURI';\r\n FNextElementSibling : TJSElement; external name 'nextElementSibling';\r\n FPreviousElementSibling : TJSElement; external name 'previousElementSibling';\r\n FPrefix : String; external name 'prefix';\r\n FScrollHeight : NativeInt; external name 'scrollHeight';\r\n{$IFDEF FIREFOX}\r\n FScrollLeftMax : NativeInt; external name 'scrollLeftMax';\r\n FScrollTopMax : NativeInt; external name 'scrollTopMax';\r\n{$endif}\r\n FScrollWidth : NativeInt; external name 'scrollWidth';\r\n FTagName : string; external name 'tagName';\r\n Public\r\n name : string;\r\n className : string;\r\n id : string;\r\n innerHTML : String;\r\n outerHTML : string;\r\n scrollLeft : NativeInt;\r\n scrollTop : NativeInt;\r\n procedure append(aText : String); overload;\r\n procedure append(aNode : TJSElement); overload;\r\n procedure append(aText : String; aNode : TJSElement); varargs; overload;\r\n procedure append(aNode1,aNode2: TJSElement); varargs; overload;\r\n function getAttribute(aName : string) : string;\r\n function getAttributeNode(aName : string) : TJSAttr;\r\n function getAttributeNodeNS(aNameSpace, aName : string) : TJSAttr;\r\n function getAttributeNS(aNameSpace, aName : string) : string;\r\n function getBoundingClientRect : TJSDOMRect;\r\n function getClientRects : TJSClientRectArray;\r\n function getElementsByClassName(aClassName: string) : TJSHTMLCollection;\r\n function getElementsByTagNameNS(aNameSpace, aTagName : String): TJSHTMLCollection;\r\n function getElementsByTagName(aTagName : String): TJSHTMLCollection;\r\n function hasAttribute(aName : String) : Boolean;\r\n function hasAttributeNS(aNameSpace,aName : String) : Boolean;\r\n function hasAttributes : Boolean;\r\n function insertAdjacentElement(aPosition : string; aElement : TJSElement) : TJSElement;\r\n procedure insertAdjacentHTML(aPosition,aHTML : string);\r\n procedure insertAdjacentText(aPosition,aText : string);\r\n function matches(aSelectorString : String) : Boolean;\r\n function querySelector(aSelectors : String) : TJSElement;\r\n function querySelectorAll(aSelectors : String) : TJSNodeList;\r\n function closest(aSelectors : String) : TJSElement;\r\n procedure remove; overload;\r\n procedure releasePointerCapture(evID : JSValue);\r\n procedure removeAttribute(aName: string);\r\n procedure removeAttributeNS(aNameSpace,aName: string);\r\n function removeAttributeNode(aAttr : TJSAttr) : TJSAttr;\r\n procedure replaceChildren; overload;\r\n procedure replaceChildren(newChildren: JSValue); overload;\r\n procedure setAttribute(aName : string; AValue : String);\r\n function setAttributeNode(aNode: TJSAttr) : TJSAttr;\r\n function setAttributeNodeNS(aNode: TJSAttr) : TJSAttr;\r\n procedure setAttributeNS(aNameSpace,aName : string; AValue : String);\r\n procedure setCapture(retargetToElement : Boolean);\r\n procedure setPointerCapture(pointerID : JSValue);\r\n procedure requestFullscreen;\r\n Property attributes : TJSNamedNodeMap read FAttributes;\r\n Property childElementCount : NativeInt Read FChildElementCount;\r\n Property children : TJSHTMLCollection Read FChildren;\r\n Property classList : TJSDOMTokenList read FClassList;\r\n property clientHeight : NativeInt read FClientHeight;\r\n property clientLeft : NativeInt read FClientLeft;\r\n property clientTop : NativeInt read FClientTop;\r\n property clientWidth : NativeInt read FClientWidth;\r\n property firstElementChild : TJSElement Read FFirstElementChild;\r\n property lastElementChild : TJSElement Read FLastElementChild;\r\n property localName : string Read FLocalName;\r\n property namespaceURI : String read FNameSpaceURI;\r\n property nextElementSibling : TJSElement Read FNextElementSibling;\r\n property previousElementSibling : TJSElement Read FPreviousElementSibling;\r\n property prefix : String read FPrefix;\r\n property scrollHeight : NativeInt Read FScrollHeight;\r\n{$IFDEF FIREFOX}\r\n property scrollLeftMax : NativeInt Read FScrollLeftMax;\r\n property scrollTopMax : NativeInt Read FScrollTopMax;\r\n{$ENDIF}\r\n property scrollWidth : NativeInt Read FScrollWidth;\r\n property tagName : String read FTagName;\r\n Property Attrs[aName : string] : String read getAttribute write setAttribute; default;\r\n end;\r\n \r\n TJSElementCreationOptions = record\r\n named : string;\r\n end;\r\n \r\n TJSDocumentType = class {$IFDEF PAS2JS} external name 'DocumentType' {$ENDIF}(TJSNode)\r\n private\r\n FName : String; external name 'name';\r\n FPublicID : String; external name 'publicId';\r\n FSystemID : String; external name 'systemId';\r\n public\r\n property name : String read FName;\r\n property publicId : String Read FPublicID;\r\n property systemId : String read FSystemID;\r\n end;\r\n\r\n TJSDOMImplementation = class {$IFDEF PAS2JS} external name 'DocumentImplementation' {$ENDIF}(TJSObject)\r\n Public \r\n function createDocument(aNamespaceURI, aQualifiedNameStr : String; aDocumentType : TJSDocumentType) : TJSDocument;\r\n function createDocumentType(aQualifiedNameStr,aPublicId,aSystemId : String) : TJSDocumentType;\r\n function createHTMLDocument(aTitle : String) : TJSDocument;\r\n end;\r\n\r\n TJSLocation = class {$IFDEF PAS2JS} external name 'Location' {$ENDIF}(TJSObject)\r\n Private\r\n FOrigin : string; external name 'origin';\r\n Public\r\n hash : string;\r\n host : string;\r\n hostname : string;\r\n href : string;\r\n password : string;\r\n pathname : string;\r\n port : string;\r\n protocol : string;\r\n search : string;\r\n username : string;\r\n procedure assign(aURL : String); overload;\r\n procedure reload(aForce : Boolean);\r\n procedure replace(aURL : String);\r\n property origin : string read FOrigin;\r\n end;\r\n \r\n TJSCSSStyleDeclaration = class; // forward\r\n\r\n TJSStyleSheet = class {$IFDEF PAS2JS} external name 'StyleSheet' {$ENDIF}(TJSEventTarget)\r\n Private\r\n FHRef : String; external name 'href';\r\n FOwnerNode : TJSNode; external name 'ownerNode';\r\n FParentStyleSheet : TJSStyleSheet; external name 'parentStyleSheet';\r\n FTitle : String; external name 'title';\r\n FType : String; external name 'type';\r\n Public\r\n disabled : String;\r\n Property href : String read FHRef;\r\n property ownerNode : TJSNode Read FOwnerNode;\r\n property parentStyleSheet : TJSStyleSheet read FParentStyleSheet;\r\n property title : string Read FTitle;\r\n property _type : String read FType;\r\n end;\r\n\r\n TJSCSSRule = class {$IFDEF PAS2JS} external name 'CSSRule' {$ENDIF}(TJSObject)\r\n Private\r\n FCSSText : String; external name 'cssText';\r\n FParentStyleSheet : TJSCSSStyleSheet; external name 'parentStyleSheet';\r\n FparentRule : TJSCSSRule; external name 'parentRule';\r\n Public\r\n property cssText : String Read FCSSText;\r\n property parentRule : TJSCSSRule read FparentRule;\r\n property parentStyleSheet : TJSCSSStyleSheet Read FParentStyleSheet;\r\n end;\r\n\r\n TJSCSSStyleRule = class {$IFDEF PAS2JS} external name 'CSSStyleRule' {$ENDIF}(TJSCSSRule)\r\n private\r\n FStyle: TJSCSSStyleDeclaration; external name 'style';\r\n public\r\n selectorText: String;\r\n property style: TJSCSSStyleDeclaration read FStyle;\r\n end;\r\n \r\n TJSCSSRuleList = class {$IFDEF PAS2JS} external name 'CSSRuleList' {$ENDIF}(TJSObject)\r\n Private\r\n FLength : NativeInt; external name 'length';\r\n Public\r\n function item(index : NativeInt) : TJSCSSRule;\r\n property length : NativeInt Read FLength;\r\n Property items[aIndex : NativeInt] : TJSCSSRule read item; default;\r\n end;\r\n \r\n \r\n TJSCSSStyleSheet = class {$IFDEF PAS2JS} external name 'CSSStyleSheet' {$ENDIF}(TJSStyleSheet)\r\n Private\r\n FCSSRules : TJSCSSRuleList; external name 'cssRules';\r\n Public\r\n procedure deleteRule(aIndex : NativeInt);\r\n function insertRule(aRule : String; aIndex : NativeInt) : NativeInt;\r\n Property cssRules : TJSCSSRuleList read FCSSRules;\r\n end;\r\n\r\n TJSStyleSheetList = class {$IFDEF PAS2JS} external name 'StyleSheetList' {$ENDIF}(TJSObject)\r\n Private\r\n FLength : NativeInt; external name 'length';\r\n Public\r\n function item(index : NativeInt) : TJSStyleSheet;\r\n property length : NativeInt Read FLength;\r\n Property items[aIndex : NativeInt] : TJSStyleSheet read item; default;\r\n end;\r\n\r\n { TJSDocumentFragment }\r\n\r\n TJSDocumentFragment = class {$IFDEF PAS2JS} external name 'DocumentFragment' {$ENDIF}(TJSNode)\r\n private\r\n FchildElementCount: Integer; external name 'childElementCount';\r\n Fchildren: TJSHTMLCollection; external name 'children';\r\n FfirstElementChild: TJSElement; external name 'firstElementChild';\r\n FlastElementChild: TJSElement; external name 'lastElementChild';\r\n public\r\n constructor new;\r\n function querySelector(aSelector : String) : TJSElement;\r\n function querySelectorAll(aSelector : String) : TJSNodeList;\r\n property childElementCount : Integer read FchildElementCount;\r\n property children : TJSHTMLCollection read Fchildren;\r\n property firstElementChild : TJSElement read FfirstElementChild;\r\n property lastElementChild : TJSElement read FlastElementChild;\r\n end;\r\n\r\n TJSEventInit = record\r\n bubbles : boolean;\r\n cancelable : boolean;\r\n scoped : boolean;\r\n composed : boolean;\r\n end;\r\n\r\n TJSEvent = class {$IFDEF PAS2JS} external name 'Event' {$ENDIF}(TJSObject)\r\n Private\r\n FBubbles : Boolean; external name 'bubbles';\r\n FCancelable : Boolean; external name 'cancelable';\r\n FComposed : Boolean; external name 'composed';\r\n FCurrentTarget : TJSEventTarget; external name 'currentTarget';\r\n FCurrentTargetElement : TJSElement; external name 'currentTarget';\r\n FdefaultPrevented : Boolean; external name 'defaultPrevented';\r\n FEventPhase : NativeInt; external name 'eventPhase';\r\n FTarget : TJSEventTarget; external name 'target';\r\n FTargetElement : TJSElement; external name 'target';\r\n FTimeStamp : NativeInt; external name 'timestamp';\r\n FType : String; external name 'type';\r\n FIsTrusted : Boolean; external name 'isTrusted';\r\n Public\r\n Const\r\n NONE = 0;\r\n CAPTURING_PHASE = 1;\r\n AT_TARGET = 2;\r\n BUBBLING_PHASE = 3;\r\n public \r\n cancelBubble : Boolean;\r\n constructor new (aType : String; const aInit : TJSEventInit); overload;\r\n constructor new (aType : String); overload;\r\n procedure preventDefault;\r\n procedure stopImmediatePropagation;\r\n procedure stopPropagation;\r\n Property bubbles : Boolean Read FBubbles;\r\n Property cancelable : Boolean Read FCancelable;\r\n Property composed : Boolean Read FComposed;\r\n property currentTarget : TJSEventTarget Read FCurrentTarget;\r\n property currentTargetElement : TJSElement Read FCurrentTargetElement;\r\n property defaultPrevented : Boolean Read FdefaultPrevented;\r\n property eventPhase : NativeInt Read FEventPhase;\r\n property target : TJSEventTarget Read FTarget;\r\n property targetElement : TJSElement Read FTargetElement;\r\n Property timestamp : NativeInt Read FTimeStamp;\r\n property _type : string read FType;\r\n property isTrusted : Boolean Read FIsTrusted;\r\n end;\r\n\r\n\r\n TJSXPathExpression = class {$IFDEF PAS2JS} external name 'XPathExpression' {$ENDIF}(TJSObject)\r\n Public\r\n function evaluate(contextNode : TJSNode; aType : NativeInt; aResult : TJSXPathResult) : TJSXPathResult;\r\n function evaluateWithContext(contextNode : TJSNode; aPosition, aSize, aType : NativeInt; aResult : TJSXPathResult) : TJSXPathResult;\r\n end;\r\n\r\n TJSXPathNSResolver = class {$IFDEF PAS2JS} external name 'XPathNSResolver' {$ENDIF}(TJSObject)\r\n Public\r\n function lookupNamespaceURI(prefix : string) : string;\r\n end;\r\n\r\n { TJSCharacterData }\r\n\r\n TJSCharacterData = class {$IFDEF PAS2JS} external name 'CharacterData' {$ENDIF}(TJSNode)\r\n private\r\n FnextElementSibling: TJSElement; external name 'nextElementSibling';\r\n FpreviousElementSibling: TJSElement; external name 'previousElementSibling';\r\n public\r\n property nextElementSibling : TJSElement read FnextElementSibling;\r\n property previousElementSibling : TJSElement read FpreviousElementSibling;\r\n end;\r\n\r\n\r\n TJSProcessingInstruction = class {$IFDEF PAS2JS} external name 'ProcessingInstruction' {$ENDIF}(TJSCharacterData);\r\n\r\n { TJSRange }\r\n\r\n TJSRange = class {$IFDEF PAS2JS} external name 'Range' {$ENDIF}(TJSObject)\r\n private\r\n FCollapsed: boolean; external name 'collapsed';\r\n FcommonAncestorContainer: TJSNode; external name 'commonAncestorContainer';\r\n FendContainer: TJSNode; external name 'endContainer';\r\n FEndOffset: NativeInt; external name 'endOffset';\r\n FstartContainer: TJSNode; external name 'startContainer';\r\n FstartOffset: NativeInt; external name 'startOffset';\r\n Public\r\n const\r\n END_TO_END = 0;\r\n END_TO_START = 1;\r\n START_TO_END = 2;\r\n START_TO_START = 3;\r\n Public\r\n constructor new;\r\n function cloneContents : TJSDocumentFragment;\r\n function cloneRange : TJSRange;\r\n procedure collapse;\r\n function compareBoundaryPoints(aHow : NativeInt) : NativeInt;\r\n function createContextualFragment(aTagstring : String) : TJSDocumentFragment;\r\n procedure deleteContents;\r\n procedure detach;\r\n function extractContents : TJSDocumentFragment;\r\n procedure insertNode(aNode : TJSNode);\r\n procedure selectNode(aNode : TJSNode);\r\n procedure selectNodeContents(aNode : TJSNode);\r\n procedure setEnd(aEndNode : TJSNode; aEndOffset : NativeInt); \r\n procedure setEndAfter(aEndNode : TJSNode);\r\n procedure setEndBefore(aEndNode : TJSNode);\r\n procedure setStart(aStartNode : TJSNode; aStartOffset : NativeInt); \r\n procedure setStartAfter(aStartNode : TJSNode);\r\n procedure setStartBefore(aStartNode : TJSNode);\r\n procedure surroundContents(aNode : TJSNode);\r\n property collapsed : boolean read FCollapsed;\r\n property commonAncestorContainer : TJSNode read FcommonAncestorContainer ;\r\n property endContainer : TJSNode read FendContainer;\r\n property endOffset : NativeInt Read FEndOffset;\r\n property startContainer : TJSNode read FstartContainer;\r\n property startOffset : NativeInt Read FstartOffset;\r\n end;\r\n\r\n\r\n { TJSTreeWalker }\r\n\r\n TJSTreeWalker = class {$IFDEF PAS2JS} external name 'TreeWalker' {$ENDIF}(TJSObject)\r\n private\r\n FCurrentNode: TJSNode; external name 'currentNode';\r\n FexpandEntityReference: Boolean; external name 'expandEntityReference';\r\n FFilter: TJSNodeFilter; external name 'filter';\r\n FRoot: TJSNode; external name 'root';\r\n FWhatToShow: NativeInt; external name 'whatToShow';\r\n Public\r\n function firstChild : TJSNode;\r\n function lastChild : TJSNode;\r\n function nextNode : TJSNode;\r\n function nextSibling : TJSNode;\r\n function parentNode : TJSNode;\r\n function previousNode : TJSNode;\r\n function previousSibling : TJSNode;\r\n\r\n property root : TJSNode read FRoot;\r\n property whatToShow : NativeInt read FWhatToShow;\r\n property filter : TJSNodeFilter Read FFilter;\r\n property expandEntityReference : Boolean Read FexpandEntityReference;\r\n property currentNode : TJSNode Read FCurrentNode;\r\n end;\r\n\r\n TJSNodeFilter = class {$IFDEF PAS2JS} external name 'NodeFilter' {$ENDIF}(TJSObject)\r\n const\r\n SHOW_ALL = -1;\r\n SHOW_ATTRIBUTE = 2;\r\n SHOW_CDATA_SECTION = 8;\r\n SHOW_COMMENT = 128;\r\n SHOW_DOCUMENT = 256;\r\n SHOW_DOCUMENT_FRAGMENT = 1024;\r\n SHOW_DOCUMENT_TYPE = 512;\r\n SHOW_ELEMENT = 1;\r\n SHOW_ENTITY = 32;\r\n SHOW_ENTITY_REFERENCE = 16;\r\n SHOW_NOTATION = 2048;\r\n SHOW_PROCESSING_INSTRUCTION = 64;\r\n SHOW_TEXT = 4;\r\n function acceptNode (aNode : TJSNode) : NativeInt;\r\n end;\r\n\r\n TJSXPathResult = class {$IFDEF PAS2JS} external name 'XPathResult' {$ENDIF}(TJSObject)\r\n private\r\n FBooleanValue : Boolean; external name 'booleanValue';\r\n FNumberValue : Double; external name 'numberValue';\r\n FResultType : NativeInt; external name 'resultType';\r\n FSingleNodeValue : TJSNode; external name 'singleNodeValue';\r\n FSnaphotLength : NativeInt; external name 'snapshotLength';\r\n FStringValue : String; external name 'stringValue';\r\n public \r\n Function iterateNext : TJSNode;\r\n Function snapshotItem(Index: NativeInt) : TJSNode;\r\n Property booleanValue : Boolean Read FBooleanValue;\r\n Property numberValue : Double Read FNumberValue;\r\n property resultType : NativeInt Read FResultType;\r\n Property singleNodeValue : TJSNode Read FSingleNodeValue;\r\n property snapshotLength : NativeInt read FSnaphotLength;\r\n property stringValue : String Read FStringValue;\r\n end;\r\n\r\n TJSSelection = class {$IFDEF PAS2JS} external name 'Selection' {$ENDIF}(TJSObject)\r\n Private\r\n FanchorNode : TJSNode ; external name 'anchorNode';\r\n FanchorOffset : NativeInt ; external name 'anchorOffset';\r\n FfocusNode : TJSNode ; external name 'focusNode';\r\n FfocusOffset : NativeInt ; external name 'focusOffset';\r\n FisCollapsed : Boolean ; external name 'isCollapsed';\r\n FrangeCount : NativeInt ; external name 'rangeCount';\r\n Ftype : String ; external name 'type';\r\n Public\r\n function getRangeAt(aIndex : NativeInt) : TJSRange;\r\n procedure collapse(aParentNode : TJSNode; Offset : NativeInt);\r\n procedure extend(aParentNode : TJSNode; Offset : NativeInt);\r\n procedure collapseToStart;\r\n procedure collapseToEnd;\r\n procedure selectAllChildren(aParentNode : TJSNode);\r\n procedure addRange(aRange : TJSRange);\r\n procedure removeRange(aRange : TJSRange);\r\n procedure removeAllRanges;\r\n procedure deleteFromDocument;\r\n function containsNode(aNode : TJSNode; aPartlyContained : Boolean) : Boolean;\r\n procedure setBaseAndExtent(aAnchorNode : TJSNode; aAnchorOffset : NativeInt; aFocusNode : TJSNode; aFocusOffset : NativeInt);\r\n property anchorNode : TJSNode read FAnchorNode;\r\n property anchorOffset : NativeInt read FAnchorOffset;\r\n property focusNode : TJSNode read FFocusNode;\r\n property focusOffset : NativeInt read FFocusOffset;\r\n property isCollapsed : Boolean read FIsCollapsed;\r\n property rangeCount : NativeInt read FRangeCount;\r\n property _type : String Read FType;\r\n end;\r\n TJSNameSpaceMapperCallback = function (aNameSpace : string ) : String;\r\n\r\n TJSHTMLFile = class;\r\n TJSHTMLFileList = Class;\r\n\r\n { TJSDataTransferItem }\r\n\r\n TJSDataTransferItemCallBack = reference to Procedure(aData : String); {$IFDEF PAS2JS} safecall; {$ENDIF}\r\n\r\n TJSDataTransferItem = class {$IFDEF PAS2JS} external name 'DataTransferItem' {$ENDIF}(TJSObject)\r\n private\r\n FKind: String; external name 'kind';\r\n FType: string; external name 'type';\r\n Public\r\n function getAsFile : TJSHTMLFile;\r\n Procedure getAsString(aCallBack : TJSDataTransferItemCallBack);\r\n property Kind : String read FKind;\r\n property _Type : string read FType;\r\n end;\r\n\r\n TJSDataTransferItemList = class {$IFDEF PAS2JS} external name 'DataTransferItemList' {$ENDIF}(TJSObject)\r\n private\r\n FLength: NativeInt; external name 'length';\r\n function getitem(aIndex : nativeInt) : TJSDataTransferItem ; external name '[]';\r\n Public\r\n Function add(aData : string; AType: string) : TJSDataTransferItem; overload;\r\n Function add(aFile : TJSHTMLFile) : TJSDataTransferItem; overload;\r\n Procedure clear;\r\n procedure remove(aIndex : integer);\r\n property length : NativeInt read FLength;\r\n property Items[aIndex : NativeInt] : TJSDataTransferItem Read getitem; default;\r\n end;\r\n\r\n { TJSDataTransfer }\r\n\r\n TJSDataTransfer = class {$IFDEF PAS2JS} external name 'DataTransfer' {$ENDIF}(TJSObject)\r\n private\r\n FFiles: TJSHTMLFileList; external name 'files';\r\n FItems: TJSDataTransferItemList; external name 'items';\r\n FTypes: TJSStringDynArray; external name 'types';\r\n Public\r\n dropEffect : string;\r\n effectAllowed : string;\r\n Procedure clearData; overload;\r\n Procedure clearData(aFormat : string); overload;\r\n function getData(aFormat : string) : String;\r\n procedure setData(aFormat : String; aData : String);\r\n procedure setDragImage(aImage: TJSElement; xOffset,yOffset : integer);\r\n property files : TJSHTMLFileList Read FFiles;\r\n property items : TJSDataTransferItemList read FItems;\r\n property types : TJSStringDynArray read FTypes;\r\n end;\r\n\r\n { TJSDragEvent }\r\n\r\n TJSDragEvent = class {$IFDEF PAS2JS} external name 'DragEvent' {$ENDIF}(TJSEvent)\r\n Private\r\n FDataTransfer: TJSDataTransfer; external name 'dataTransfer';\r\n FrelatedTarget : TJSEventTarget external name 'relatedTarget';\r\n FscreenX : NativeInt external name 'screenX';\r\n FscreenY : NativeInt external name 'screenY';\r\n FclientX : NativeInt external name 'clientX';\r\n FclientY : NativeInt external name 'clientY';\r\n Fbutton : NativeInt external name 'button';\r\n Fbuttons : NativeInt external name 'buttons';\r\n FctrlKey : Boolean external name 'ctrlKey';\r\n FshiftKey : Boolean external name 'shiftKey';\r\n FaltKey : Boolean external name 'altKey';\r\n FmetaKey : Boolean external name 'metaKey';\r\n Public\r\n Property relatedTarget : TJSEventTarget Read FRelatedTarget;\r\n Property screenX : NativeInt Read FScreenX;\r\n Property screenY : NativeInt Read FScreenY;\r\n Property clientX : NativeInt Read FClientX;\r\n Property clientY : NativeInt Read FClientY;\r\n Property button : NativeInt Read FButton;\r\n Property buttons : NativeInt Read FButtons;\r\n Property ctrlKey : Boolean Read FctrlKey;\r\n Property shiftKey : Boolean Read FshiftKey;\r\n Property altKey : Boolean Read FaltKey;\r\n Property metaKey : Boolean Read FmetaKey;\r\n property dataTransfer : TJSDataTransfer Read FDataTransfer;\r\n end;\r\n TJSDragDropEventHandler = reference to function(aEvent: TJSDragEvent) : Boolean; {$IFDEF PAS2JS} safecall; {$ENDIF}\r\n THTMLClickEventHandler = reference to function(aEvent : TJSMouseEvent) : boolean; {$IFDEF PAS2JS} safecall; {$ENDIF}\r\n\r\n TJSClipBoardEvent = class {$IFDEF PAS2JS} external name 'ClipboardEvent' {$ENDIF}(TJSEvent)\r\n Private\r\n FClipboardData: TJSDataTransfer external name 'clipboardData';\r\n Public\r\n Property ClipBoardData : TJSDataTransfer Read FClipBoardData;\r\n end;\r\n\r\n { Various events }\r\n\r\n TJSFocusEvent = Class(TJSEvent)\r\n private\r\n FrelatedTarget : TJSElement external name 'relatedTarget';\r\n public\r\n property relatedTarget : TJSElement Read FrelatedTarget;\r\n end;\r\n\r\n TJSAnimationEvent = Class(TJSEvent);\r\n TJSLoadEvent = Class(TJSEvent);\r\n\r\n TJSErrorEvent = class {$IFDEF PAS2JS} external name 'ErrorEvent' {$ENDIF}(TJSEvent)\r\n Private\r\n Fmessage : String external name 'message';\r\n Ffilename : string external name 'filename';\r\n Flineno : integer external name 'lineno';\r\n Fcolno : integer external name 'colno';\r\n Ferror : TJSObject external name 'error';\r\n Public\r\n Property message : String read FMessage;\r\n property filename : string Read FFileName;\r\n property lineno : integer read FLineNo;\r\n Property colno : integer read FColNo;\r\n Property error : TJSObject read FError;\r\n end;\r\n\r\n TJSPromiseRejectionEvent = class {$IFDEF PAS2JS} external name 'PromiseRejectionEvent' {$ENDIF}(TJSEvent)\r\n Private\r\n Fpromise : TJSPromise external name 'promise';\r\n Freason : JSValue external name 'reason';\r\n Public\r\n Property promise : TJSPromise read Fpromise;\r\n Property reason : JSValue read Freason;\r\n end;\r\n\r\n TJSPageTransitionEvent = class(TJSEvent)\r\n end;\r\n\r\n TJSHashChangeEvent = class {$IFDEF PAS2JS} external name 'HashChangeEvent' {$ENDIF}(TJSEvent)\r\n Private\r\n FnewURL : String external name 'newURL';\r\n FoldURL : String external name 'oldURL';\r\n public\r\n property newURL : String Read FNewURL;\r\n property oldURL : String Read FOldURL;\r\n end;\r\n\r\n TJSPopStateEvent = class {$IFDEF PAS2JS} external name 'PopStateEvent' {$ENDIF}(TJSEvent)\r\n Private\r\n FState : JSValue; external name 'state';\r\n Public\r\n property state : JSValue read FState;\r\n end;\r\n\r\n TJSStorageEvent = class {$IFDEF PAS2JS} external name 'StorageEvent' {$ENDIF}(TJSEvent)\r\n private\r\n Fkey : String external name 'key';\r\n FoldValue : String external name 'oldValue';\r\n FnewValue : String external name 'newValue';\r\n Furl : String external name 'url';\r\n FstorageArea : String external name 'storageArea';\r\n public\r\n Property key : String Read FKey;\r\n Property oldValue : String Read FOldValue;\r\n Property newValue : String Read FNewValue;\r\n Property url : String Read FURL;\r\n Property storageArea : String Read FstorageArea;\r\n end;\r\n\r\n { TJSProgressEvent }\r\n\r\n TJSProgressEvent = class {$IFDEF PAS2JS} external name 'ProgressEvent' {$ENDIF}(TJSEvent)\r\n Private\r\n FlengthComputable : Boolean external name 'lengthComputable';\r\n Floaded : NativeUINT external name 'loaded';\r\n FTotal : NativeUINT external name 'Total';\r\n Public\r\n property lengthComputable : Boolean Read FlengthComputable;\r\n property loaded : NativeUINT Read FLoaded;\r\n property Total : NativeUINT Read FTotal;\r\n end;\r\n\r\n TJSCloseEvent = class {$IFDEF PAS2JS} external name 'CloseEvent' {$ENDIF}(TJSEvent)\r\n private\r\n fcode: Word; external name 'code';\r\n freason: TJSDOMString; external name 'reason';\r\n fwasClean: Boolean; external name 'wasClean';\r\n public\r\n property code: Word read fcode;\r\n property reason: TJSDOMString read freason;\r\n property wasClean: Boolean read fwasClean;\r\n end; \r\n\r\n TJSPageTransitionEventHandler = reference to function(aEvent : TJsPageTransitionEvent) : boolean; {$IFDEF PAS2JS} safecall; {$ENDIF}\r\n TJSHashChangeEventhandler = reference to function(aEvent : TJSHashChangeEvent) : boolean; {$IFDEF PAS2JS} safecall; {$ENDIF}\r\n TJSMouseWheelEventHandler = reference to function(aEvent : TJSWheelEvent) : boolean; {$IFDEF PAS2JS} safecall; {$ENDIF}\r\n TJSMouseEventHandler = reference to function(aEvent : TJSMouseEvent) : boolean; {$IFDEF PAS2JS} safecall; {$ENDIF}\r\n THTMLAnimationEventHandler = reference to function(aEvent : TJSAnimationEvent) : boolean; {$IFDEF PAS2JS} safecall; {$ENDIF}\r\n TJSErrorEventHandler = reference to function(aEvent : TJSErrorEvent) : boolean; {$IFDEF PAS2JS} safecall; {$ENDIF}\r\n TJSPromiseRejectionEventHandler = reference to function(aEvent : TJSPromiseRejectionEvent) : boolean; {$IFDEF PAS2JS} safecall; {$ENDIF}\r\n TJSFocusEventHandler = reference to function(aEvent : TJSFocusEvent) : boolean; {$IFDEF PAS2JS} safecall; {$ENDIF}\r\n TJSKeyEventhandler = reference to function (aEvent : TJSKeyBoardEvent) : boolean; {$IFDEF PAS2JS} safecall; {$ENDIF}\r\n TJSLoadEventhandler = reference to function (aEvent : TJSLoadEvent) : boolean; {$IFDEF PAS2JS} safecall; {$ENDIF}\r\n TJSPointerEventHandler = reference to function(aEvent : TJSPointerEvent) : boolean; {$IFDEF PAS2JS} safecall; {$ENDIF}\r\n TJSUIEventHandler = reference to function(aEvent : TJSUIEvent) : Boolean; {$IFDEF PAS2JS} safecall; {$ENDIF}\r\n TJSPopStateEventHandler = reference to function(aEvent : TJSPopStateEvent) : Boolean; {$IFDEF PAS2JS} safecall; {$ENDIF}\r\n TJSStorageEventHandler = reference to function(aEvent : TJSStorageEvent) : Boolean; {$IFDEF PAS2JS} safecall; {$ENDIF}\r\n TJSProgressEventhandler = reference to function(aEvent : TJSProgressEvent) : Boolean; {$IFDEF PAS2JS} safecall; {$ENDIF}\r\n TJSTouchEventHandler = reference to function(aEvent : TJSTouchEvent) : boolean; {$IFDEF PAS2JS} safecall; {$ENDIF}\r\n\r\n TJSDocument = class {$IFDEF PAS2JS} external name 'Document' {$ENDIF}(TJSNode)\r\n Private\r\n fActiveElement : TJSElement; external name 'activeElement';\r\n FCharacterSet: String; external name 'characterSet';\r\n FChildElementCount: NativeInt; external name 'childElementCount';\r\n FCompatMode: String; external name 'compatMode';\r\n FCurrentScript: TJSElement; external name 'currentScript';\r\n FDefaultView: TJSWindow; external name 'defaultView';\r\n FDocType: TJSDocumentType; external name 'docrype';\r\n FDocumentElement: TJSElement; external name 'documentElement';\r\n FDocumentURI: String; external name 'documentURI';\r\n FEmbeds: TJSHTMLCollection; external name 'embeds';\r\n FFirstElementChild : TJSElement; external name 'firstElementChild';\r\n FForms: TJSHTMLCollection; external name 'forms';\r\n FFullScreenElement: TJSElement; external name 'fullscreenElement';\r\n FFullscreenEnabled: Boolean; external name 'fullscreenEnabled';\r\n FHead: TJSElement; external name 'head';\r\n FHidden: Boolean; external name 'hidden';\r\n FImages: TJSHTMLCollection; external name 'images';\r\n FImplementation: TJSDOMImplementation; external name 'implementation';\r\n FLastElementChild : TJSElement; external name 'lastElementChild';\r\n FLastModified: String; external name 'lastModified';\r\n FLastStyleSheetSet: String; external name 'lastStyleSheetSet';\r\n FLinks: TJSHTMLCollection; external name 'links';\r\n FLocation: TJSLocation; external name 'location';\r\n FLocationString: String; external name 'location';\r\n FPlugins: TJSHTMLCollection; external name 'plugins';\r\n FPointerLockElement: TJSElement; external name 'pointerLockElement';\r\n FPreferredStyleSheetSet: String; external name 'preferredStyleSheetSet';\r\n FReadyState: String; external name 'readyState';\r\n FReferrer: String; external name 'referrer';\r\n FScripts: TJSHTMLCollection; external name 'scripts';\r\n FStyleSheets: TJSStyleSheetList; external name 'styleSheets';\r\n FStyleSheetSets: TJSValueDynArray; external name 'styleSheetSets';\r\n FURL: String; external name 'URL';\r\n FVisibilityState: string; external name 'visibilityState';\r\n Public\r\n function adoptNode(aExternalNode : TJSNode) : TJSNode;\r\n procedure close;\r\n function createAttribute(aName : string) : TJSAttr;\r\n function createCDATASection(S : String) : TJSNode;\r\n function createComment(S : String) : TJSNode;\r\n function createDocumentFragment : TJSDocumentFragment;\r\n function createElement(tagName : string) : TJSElement; overload;\r\n function createHTMLElement(tagName : string) : TJSHTMLElement; external name 'createElement';\r\n function createElement(tagName : string; const options : TJSElementCreationOptions) : TJSElement; overload;\r\n function createElementNS(aNameSpace,tagName : string) : TJSElement; overload;\r\n function createElementNS(aNameSpace,tagName : string; const options : TJSElementCreationOptions) : TJSElement; overload;\r\n function createEvent(aType : string) : TJSEvent;\r\n function createExpression(xPathText : String; aNameSpaceMapper: TJSNameSpaceMapperCallback) : TJSXPathExpression;\r\n function createNSResolver(aNode : TJSNode) : TJSXPathNSResolver;\r\n function createProcessingInstruction(target, data : String) : TJSProcessingInstruction;\r\n function createRange : TJSRange;\r\n function createTextNode(S : String) : TJSNode;\r\n function createTreeWalker(root : TJSNode; whatToShow : NativeInt; filter : TJSNodeFilter) : TJSTreeWalker;\r\n function elementFromPoint(x,y : integer) : TJSElement;\r\n procedure enableStyleSheetsForSet(aSet : String);\r\n function evaluate(xpathExpression : String; ContextNode : TJSNode; NameSpaceResolver : TJSNamespaceMapperCallBack; resultType : NativeInt; aResult : TJSXPathResult) : TJSXPathResult;\r\n function execCommand(aCommandName : String; aShowDefaultUI : Boolean; AValueArgument : String) : boolean; overload;\r\n function execCommand(aCommandName : String; aShowDefaultUI : Boolean) : boolean; overload;\r\n Procedure exitFullscreen;\r\n function getElementById(aID : String) : TJSElement;\r\n function getHTMLElementById(aID : String) : TJSHTMLElement; external name 'getElementById';\r\n function getElementsByClassName(aNames : string) : TJSHTMLCollection;\r\n function getElementsByName(aName : String) : TJSNodeList;\r\n function getElementsByTagName(aName : String) : TJSHTMLCollection;\r\n function getElementsByTagNameNS(aNameSpace,aName : String) : TJSHTMLCollection;\r\n function getSelection : TJSSelection;\r\n function hasFocus : boolean;\r\n function importNode(aExternalNode : TJSNode; Deep: boolean) : TJSNode;\r\n function querySelector(aSelectors : String) : TJSElement;\r\n function querySelectorAll(aSelectors : String) : TJSNodeList;\r\n procedure open;\r\n procedure releaseCapture;\r\n procedure write(aLine : string);\r\n procedure writeln(aLine : String);\r\n Public\r\n body : TJSElement;\r\n cookie: TJSString;\r\n designMode : string;\r\n dir : string;\r\n domain : string;\r\n selectedStyleSheetSet : string;\r\n title : string;\r\n onabort : TJSEventHandler;\r\n onblur : TJSEventHandler;\r\n oncancel : TJSEventHandler;\r\n oncanplay : TJSEventHandler;\r\n oncanplaythrough : TJSEventHandler;\r\n onchange : TJSEventHandler;\r\n onclick: THTMLClickEventHandler;\r\n onclose : TJSEventHandler;\r\n oncontextmenu : TJSEventHandler;\r\n oncuechange : TJSEventHandler;\r\n ondblclick : THTMLClickEventHandler;\r\n ondrag : TJSDragDropEventHandler;\r\n ondragend : TJSDragDropEventHandler;\r\n ondragenter : TJSDragDropEventHandler;\r\n ondragexit : TJSDragDropEventHandler;\r\n ondragover : TJSDragDropEventHandler;\r\n ondragleave : TJSDragDropEventHandler;\r\n ondragstart: TJSDragDropEventHandler;\r\n ondrop : TJSDragDropEventHandler;\r\n ondurationchange : TJSEventHandler;\r\n onemptied : TJSEventHandler;\r\n onended : TJSEventHandler;\r\n onerror : TJSErrorEventHandler;\r\n onfocus : TJSFocusEventhandler;\r\n ongotpointercapture : TJSPointerEventHandler;\r\n oninput : TJSEventhandler;\r\n oninvalid : TJSEventhandler;\r\n onkeydown : TJSKeyEventhandler;\r\n onkeypress : TJSKeyEventhandler;\r\n onkeyup : TJSKeyEventhandler;\r\n onload : TJSEventhandler;\r\n onloadeddata : TJSEventhandler;\r\n onloadedmetadata : TJSEventhandler;\r\n onloadend : TJSProgressEventhandler;\r\n onloadstart : TJSProgressEventhandler;\r\n onlostpointercapture : TJSPointerEventHandler;\r\n onmessage : TJSEventHandler;\r\n onmousedown : TJSMouseEventHandler;\r\n onmouseenter : TJSMouseEventHandler;\r\n onmouseleave : TJSMouseEventHandler;\r\n onmousemove : TJSMouseEventHandler;\r\n onmouseout : TJSMouseEventHandler;\r\n onmouseover : TJSMouseEventHandler;\r\n onmouseup : TJSMouseEventHandler;\r\n onmousewheel : TJSMouseEventHandler;\r\n onpause : TJSEventHandler;\r\n onplay : TJSEventHandler;\r\n onplaying : TJSEventHandler;\r\n onpointercancel : TJSPointerEventHandler;\r\n onpointerdown : TJSPointerEventHandler;\r\n onpointerenter : TJSPointerEventHandler;\r\n onpointerleave : TJSPointerEventHandler;\r\n onpointermove : TJSPointerEventHandler;\r\n onpointerout : TJSPointerEventHandler;\r\n onpointerover : TJSPointerEventHandler;\r\n onpointerup : TJSPointerEventHandler;\r\n onpointerlockchange : TJSPointerEventHandler;\r\n onprogress : TJSProgressEventhandler;\r\n onreset : TJSUIEventHandler;\r\n onratechange : TJSEventHandler;\r\n onscroll : TJSUIEventHandler;\r\n onseekend : TJSEventHandler;\r\n onseeking : TJSEventHandler;\r\n onselect : TJSEventHandler;\r\n onselectionchange : TJSEventHandler;\r\n onsshow : TJSEventHandler;\r\n onsubmit : TJSEventHandler;\r\n onunload : TJSUIEventHandler;\r\n onwaiting : TJSEventHandler;\r\n touchstart : TJSTouchEventHandler;\r\n touchend : TJSTouchEventHandler;\r\n touchmove : TJSTouchEventHandler;\r\n touchcancel : TJSTouchEventHandler;\r\n Property activeElement : TJSElement Read FActiveElement;\r\n Property characterSet : String Read FCharacterSet;\r\n property childElementCount : NativeInt Read FChildElementCount;\r\n property compatMode : String Read FCompatMode;\r\n property currentScript : TJSElement Read FCurrentScript;\r\n property defaultView : TJSWindow Read FDefaultView;\r\n property doctype : TJSDocumentType read FDocType;\r\n property documentElement : TJSElement read FDocumentElement;\r\n property documentURI : String Read FDocumentURI;\r\n property embeds : TJSHTMLCollection Read FEmbeds;\r\n property firstElementChild : TJSElement Read FFirstElementChild;\r\n property lastElementChild : TJSElement Read FLastElementChild;\r\n property Forms : TJSHTMLCollection Read FForms;\r\n property fullscreenElement : TJSElement Read FFullScreenElement;\r\n property fullscreenEnabled : Boolean Read FFullscreenEnabled;\r\n property head : TJSElement read FHead;\r\n Property hidden : Boolean read FHidden;\r\n property images : TJSHTMLCollection Read FImages;\r\n property _implementation : TJSDOMImplementation Read FImplementation;\r\n property lastModified : String Read FLastModified;\r\n property lastStyleSheetSet : String read FLastStyleSheetSet;\r\n property links : TJSHTMLCollection Read FLinks;\r\n property location : TJSLocation read FLocation;\r\n Property LocationString : String Read FURL Write FLocationString; // On purpose\r\n property plugins : TJSHTMLCollection Read FPlugins;\r\n property pointerLockElement : TJSElement Read FPointerLockElement;\r\n property preferredStyleSheetSet : String Read FPreferredStyleSheetSet;\r\n Property readyState : String Read FReadyState;\r\n Property referrer : String Read FReferrer;\r\n property scripts : TJSHTMLCollection Read FScripts;\r\n property styleSheets : TJSStyleSheetList Read FStyleSheets;\r\n property styleSheetSets : TJSValueDynArray Read FStyleSheetSets; // No type documented ?\r\n Property URL : String Read FURL;\r\n property visibilityState : string read FVisibilityState;\r\n end;\r\n\r\n TJSConsole = class {$IFDEF PAS2JS} external name 'Console' {$ENDIF}(TJSObject)\r\n Public\r\n procedure assert(anAssertion : string; Obj1 : JSValue); varargs;\r\n Procedure clear; \r\n procedure count; overload;\r\n procedure count(aCounter : String);\r\n procedure debug(Obj1 : JSValue); {$IFDEF PAS2JS} varargs of JSValue; {$ENDIF}\r\n procedure error(Obj1 : JSValue); {$IFDEF PAS2JS} varargs of JSValue; {$ENDIF}\r\n procedure group; overload;\r\n procedure group(aLabel : String); overload;\r\n procedure groupCollapsed; overload;\r\n procedure groupCollapsed(aLabel : String);overload;\r\n procedure groupEnd;\r\n procedure info(Obj1 : JSValue); {$IFDEF PAS2JS} varargs of JSValue; {$ENDIF}\r\n procedure log(Obj1 : JSValue); {$IFDEF PAS2JS} varargs of JSValue; {$ENDIF}\r\n procedure table(args: array of JSValue); overload;\r\n procedure table(args: array of JSValue; Columns : Array of string);\r\n procedure table(args: TJSObject); overload;\r\n procedure table(args: TJSObject; Columns : Array of string); overload;\r\n procedure time(aName : string);\r\n procedure timeEnd(aName : string);\r\n procedure timeLog(aName : string);\r\n procedure trace;\r\n procedure warn(Obj1 : JSValue); {$IFDEF PAS2JS} varargs of JSValue; {$ENDIF}\r\n end;\r\n\r\n// TJSBufferSource = class external name 'BufferSource' end;\r\n// TJSTypedArray = class external name 'TypedArray' end;\r\n\r\n // Forward class definitions\r\n TJSCryptoKey = Class;\r\n TJSSubtleCrypto = Class;\r\n KeyType = String;\r\n KeyUsage = String;\r\n NamedCurve = String;\r\n BigInteger = TJSUint8Array;\r\n KeyFormat = String;\r\n // Union of object, DOMString\r\n AlgorithmIdentifier = JSValue; \r\n \r\n { --------------------------------------------------------------------\r\n Algorithm\r\n --------------------------------------------------------------------}\r\n \r\n Algorithm = record\r\n name : String;\r\n end;\r\n \r\n { --------------------------------------------------------------------\r\n AesCbcParams\r\n --------------------------------------------------------------------}\r\n \r\n AesCbcParams = record\r\n iv : TJSBufferSource;\r\n end;\r\n \r\n { --------------------------------------------------------------------\r\n AesCtrParams\r\n --------------------------------------------------------------------}\r\n \r\n AesCtrParams = record\r\n counter : TJSBufferSource;\r\n length_ : Byte;external name 'length';\r\n end;\r\n \r\n { --------------------------------------------------------------------\r\n AesGcmParams\r\n --------------------------------------------------------------------}\r\n \r\n AesGcmParams = record\r\n iv : TJSBufferSource;\r\n additionalData : TJSBufferSource;\r\n tagLength : Byte;\r\n end;\r\n \r\n { --------------------------------------------------------------------\r\n HmacImportParams\r\n --------------------------------------------------------------------}\r\n \r\n HmacImportParams = record\r\n hash : AlgorithmIdentifier;\r\n end;\r\n \r\n { --------------------------------------------------------------------\r\n Pbkdf2Params\r\n --------------------------------------------------------------------}\r\n \r\n Pbkdf2Params = record\r\n salt : TJSBufferSource;\r\n iterations : NativeInt;\r\n hash : AlgorithmIdentifier;\r\n end;\r\n \r\n { --------------------------------------------------------------------\r\n RsaHashedImportParams\r\n --------------------------------------------------------------------}\r\n \r\n RsaHashedImportParams = record\r\n hash : AlgorithmIdentifier;\r\n end;\r\n \r\n { --------------------------------------------------------------------\r\n AesKeyGenParams\r\n --------------------------------------------------------------------}\r\n \r\n AesKeyGenParams = record\r\n length_ : Integer;external name 'length';\r\n end;\r\n \r\n { --------------------------------------------------------------------\r\n HmacKeyGenParams\r\n --------------------------------------------------------------------}\r\n \r\n HmacKeyGenParams = record\r\n hash : AlgorithmIdentifier;\r\n length_ : Integer;external name 'length';\r\n end;\r\n \r\n { --------------------------------------------------------------------\r\n RsaHashedKeyGenParams\r\n --------------------------------------------------------------------}\r\n \r\n RsaHashedKeyGenParams = record\r\n modulusLength : Integer;\r\n publicExponent : BigInteger;\r\n hash : AlgorithmIdentifier;\r\n end;\r\n \r\n { --------------------------------------------------------------------\r\n RsaOaepParams\r\n --------------------------------------------------------------------}\r\n \r\n RsaOaepParams = record\r\n label_ : TJSBufferSource;external name 'label';\r\n end;\r\n \r\n { --------------------------------------------------------------------\r\n RsaPssParams\r\n --------------------------------------------------------------------}\r\n \r\n RsaPssParams = record\r\n saltLength : Integer;\r\n end;\r\n \r\n { --------------------------------------------------------------------\r\n DhKeyGenParams\r\n --------------------------------------------------------------------}\r\n \r\n DhKeyGenParams = record\r\n prime : BigInteger;\r\n generator : BigInteger;\r\n end;\r\n \r\n { --------------------------------------------------------------------\r\n EcKeyGenParams\r\n --------------------------------------------------------------------}\r\n \r\n EcKeyGenParams = record\r\n _namedCurve : NamedCurve;external name 'namedCurve';\r\n end;\r\n \r\n { --------------------------------------------------------------------\r\n AesDerivedKeyParams\r\n --------------------------------------------------------------------}\r\n \r\n AesDerivedKeyParams = record\r\n length_ : Integer;external name 'length';\r\n end;\r\n \r\n { --------------------------------------------------------------------\r\n HmacDerivedKeyParams\r\n --------------------------------------------------------------------}\r\n \r\n HmacDerivedKeyParams = record\r\n length_ : Integer;external name 'length';\r\n end;\r\n \r\n { --------------------------------------------------------------------\r\n EcdhKeyDeriveParams\r\n --------------------------------------------------------------------}\r\n \r\n EcdhKeyDeriveParams = record\r\n public_ : TJSCryptoKey; external name 'public';\r\n end;\r\n \r\n { --------------------------------------------------------------------\r\n DhKeyDeriveParams\r\n --------------------------------------------------------------------}\r\n \r\n DhKeyDeriveParams = record\r\n public_ : TJSCryptoKey; external name 'public';\r\n end;\r\n \r\n { --------------------------------------------------------------------\r\n DhImportKeyParams\r\n --------------------------------------------------------------------}\r\n \r\n DhImportKeyParams = record\r\n prime : BigInteger;\r\n generator : BigInteger;\r\n end;\r\n \r\n { --------------------------------------------------------------------\r\n EcdsaParams\r\n --------------------------------------------------------------------}\r\n \r\n EcdsaParams = record\r\n hash : AlgorithmIdentifier;\r\n end;\r\n \r\n { --------------------------------------------------------------------\r\n EcKeyImportParams\r\n --------------------------------------------------------------------}\r\n \r\n EcKeyImportParams = record\r\n _namedCurve : NamedCurve;external name 'namedCurve';\r\n end;\r\n \r\n { --------------------------------------------------------------------\r\n HkdfParams\r\n --------------------------------------------------------------------}\r\n \r\n HkdfParams = record\r\n hash : AlgorithmIdentifier;\r\n salt : TJSBufferSource;\r\n info : TJSBufferSource;\r\n end;\r\n \r\n { --------------------------------------------------------------------\r\n RsaOtherPrimesInfo\r\n --------------------------------------------------------------------}\r\n \r\n RsaOtherPrimesInfo = record\r\n r : String;\r\n d : String;\r\n t : String;\r\n end;\r\n \r\n { --------------------------------------------------------------------\r\n JsonWebKey\r\n --------------------------------------------------------------------}\r\n \r\n TRsaOtherPrimesInfoDynArray = Array of RsaOtherPrimesInfo;\r\n JsonWebKey = record\r\n kty : String;\r\n use : String;\r\n key_ops : TStringDynArray;\r\n alg : String;\r\n ext : boolean;\r\n crv : String;\r\n x : String;\r\n y : String;\r\n d : String;\r\n n : String;\r\n e : String;\r\n p : String;\r\n q : String;\r\n dp : String;\r\n dq : String;\r\n qi : String;\r\n oth : TRsaOtherPrimesInfoDynArray;\r\n k : String;\r\n end;\r\n \r\n { --------------------------------------------------------------------\r\n CryptoKeyPair\r\n --------------------------------------------------------------------}\r\n \r\n CryptoKeyPair = record\r\n publicKey : TJSCryptoKey;\r\n privateKey : TJSCryptoKey;\r\n end;\r\n \r\n { --------------------------------------------------------------------\r\n TJSCryptoKey\r\n --------------------------------------------------------------------}\r\n \r\n TKeyUsageDynArray = Array of KeyUsage;\r\n TJSCryptoKey = class external name 'CryptoKey' \r\n Private\r\n Ftype_ : KeyType; external name 'type'; \r\n Fextractable : boolean; external name 'extractable'; \r\n Falgorithm : TJSObject; external name 'algorithm'; \r\n Fusages : TKeyUsageDynArray; external name 'usages'; \r\n Public\r\n \r\n Property type_ : KeyType Read Ftype_; \r\n Property extractable : boolean Read Fextractable; \r\n Property algorithm : TJSObject Read Falgorithm; \r\n Property usages : TKeyUsageDynArray Read Fusages; \r\n end;\r\n \r\n { --------------------------------------------------------------------\r\n TJSSubtleCrypto\r\n --------------------------------------------------------------------}\r\n \r\n TJSSubtleCrypto = class external name 'SubtleCrypto' \r\n Private\r\n Public\r\n function encrypt(algorithm : AlgorithmIdentifier; key : TJSCryptoKey; data : TJSBufferSource): TJSPromise;\r\n function decrypt(algorithm : AlgorithmIdentifier; key : TJSCryptoKey; data : TJSBufferSource): TJSPromise;\r\n function sign(algorithm : AlgorithmIdentifier; key : TJSCryptoKey; data : TJSBufferSource): TJSPromise;\r\n function verify(algorithm : AlgorithmIdentifier; key : TJSCryptoKey; signature : TJSBufferSource; data : TJSBufferSource): TJSPromise;\r\n function digest(algorithm : AlgorithmIdentifier; data : TJSBufferSource): TJSPromise;\r\n function generateKey(algorithm : AlgorithmIdentifier; extractable : boolean; keyUsages : TKeyUsageDynArray): TJSPromise;\r\n function deriveKey(algorithm : AlgorithmIdentifier; baseKey : TJSCryptoKey; derivedKeyType : AlgorithmIdentifier; extractable : boolean; keyUsages : TKeyUsageDynArray): TJSPromise;\r\n function deriveBits(algorithm : AlgorithmIdentifier; baseKey : TJSCryptoKey; length_ : NativeInt): TJSPromise;\r\n function importKey(format : KeyFormat; keyData : TJSObject; algorithm : AlgorithmIdentifier; extractable : boolean; keyUsages : TKeyUsageDynArray): TJSPromise;\r\n function exportKey(format : KeyFormat; key : TJSCryptoKey): TJSPromise;\r\n function wrapKey(format : KeyFormat; key : TJSCryptoKey; wrappingKey : TJSCryptoKey; wrapAlgorithm : AlgorithmIdentifier): TJSPromise;\r\n function unwrapKey(format : KeyFormat; wrappedKey : TJSBufferSource; unwrappingKey : TJSCryptoKey; unwrapAlgorithm : AlgorithmIdentifier; unwrappedKeyAlgorithm : AlgorithmIdentifier; extractable : boolean; keyUsages : TKeyUsageDynArray): TJSPromise;\r\n end;\r\n { TJSCrypto }\r\n\r\n TJSCrypto = class {$IFDEF PAS2JS} external name 'Crypto' {$ENDIF}(TJSObject)\r\n private\r\n Fsubtle: TJSSubtleCrypto; external name 'subtle';\r\n Public\r\n procedure getRandomValues (anArray : TJSTypedArray);\r\n property subtle : TJSSubtleCrypto Read Fsubtle;\r\n end;\r\n \r\n { TJSHistory }\r\n\r\n TJSHistory = class {$IFDEF PAS2JS} external name 'History' {$ENDIF}(TJSObject)\r\n private\r\n FLength: NativeInt; external name 'length';\r\n{$IFDEF FIREFOX}\r\n FState : JSValue; external name 'state';\r\n{$ENDIF}\r\n Public\r\n procedure back;\r\n procedure forward;\r\n procedure go(aIndex : NativeInt);\r\n procedure go;\r\n procedure pushState(aState : jsValue; aTitle : String; AURL : String);\r\n procedure pushState(aState : jsValue; aTitle : String);\r\n procedure replaceState(aState : jsValue; aTitle : String; AURL : String);\r\n procedure replaceState(aState : jsValue; aTitle : String);\r\n procedure replaceState(aState : jsValue);\r\n{$IFDEF FIREFOX}\r\n property state : JSValue read FState;\r\n{$ENDIF}\r\n property length: NativeInt read FLength;\r\n end;\r\n\r\n TJSIDBTransactionMode = class\r\n const\r\n readonly = 'readonly';\r\n readwrite = 'readwrite';\r\n versionchange = 'versionchange';\r\n end;\r\n\r\n\r\n { TJSIDBTransaction }\r\n\r\n TJSIDBTransaction = class {$IFDEF PAS2JS} external name 'IDBTransaction' {$ENDIF}(TJSEventTarget)\r\n private\r\n FDB : TIDBDatabase; external name 'db';\r\n FError: JSValue; external name 'error';\r\n FMode: String; external name 'mode';\r\n FObjectStoreNames: TStringDynArray; external name 'objectStoreNames';\r\n public\r\n procedure abort;\r\n function objectStore(aName : String) : TJSIDBObjectStore;\r\n property db : TIDBDatabase read FDB;\r\n property mode : String read FMode;\r\n property objectStoreNames : TStringDynArray read FObjectStoreNames;\r\n property error : JSValue read FError;\r\n end;\r\n\r\n\r\n { TJSIDBKeyRange }\r\n\r\n TJSIDBKeyRange = class {$IFDEF PAS2JS} external name 'IDBKeyRange' {$ENDIF}(TJSObject)\r\n private\r\n FLower: JSValue;\r\n FLowerOpen: Boolean;\r\n FUpper: JSValue;\r\n FUpperOpen: Boolean;\r\n Public\r\n Class Function bound(aLower,aUpper : JSValue) : TJSIDBKeyRange; overload;\r\n Class Function bound(aLower,aUpper : JSValue; aLowerOpen : Boolean) : TJSIDBKeyRange; overload;\r\n Class Function bound(aLower,aUpper : JSValue; aLowerOpen,aUpperOpen : Boolean) : TJSIDBKeyRange; overload;\r\n Class Function lowerBound(aLower : JSValue) : TJSIDBKeyRange; overload;\r\n Class Function lowerBound(aLower : JSValue; aOpen: Boolean) : TJSIDBKeyRange; overload;\r\n Class Function only(aValue : JSValue) : TJSIDBKeyRange;\r\n Class Function upperBound(aUpper : JSValue) : TJSIDBKeyRange; overload;\r\n Class Function upperBound(aUpper : JSValue; aOpen: Boolean) : TJSIDBKeyRange; overload;\r\n function includes (aValue : JSValue) : Boolean;\r\n property lower : JSValue read FLower;\r\n property lowerOpen : Boolean read FLowerOpen;\r\n property upper : JSValue read FUpper;\r\n property upperOpen : Boolean read FUpperOpen;\r\n end;\r\n\r\n TJSIDBIndexParameters = record\r\n unique : boolean;\r\n multiEntry : boolean;\r\n locale : string;\r\n end;\r\n\r\n\r\n { TJSIDBIndex }\r\n\r\n TJSIDBIndex = class {$IFDEF PAS2JS} external name 'IDBIndex' {$ENDIF}(TJSObject)\r\n private\r\n FKeyPath: JSValue; external name 'keyPath';\r\n FMultiEntry: Boolean; external name 'multiEntry';\r\n FObjectStore: TJSIDBObjectStore; external name 'objectStore';\r\n FUnique: boolean; external name 'unique';\r\n public\r\n name : string;\r\n function count : TJSIDBRequest;\r\n function get(aKey : jsValue) : TJSIDBRequest; overload;\r\n function get(aKey : TJSIDBKeyRange) : TJSIDBRequest; overload;\r\n function getAll(aKey : jsValue) : TJSIDBRequest; overload;\r\n function getAll(aKey : TJSIDBKeyRange) : TJSIDBRequest; overload;\r\n function getAll(aKey : jsValue; ACount : NativeInt) : TJSIDBRequest; overload;\r\n function getAll(aKey : TJSIDBKeyRange; ACount : NativeInt) : TJSIDBRequest; overload;\r\n function getAllKeys(aKey : jsValue) : TJSIDBRequest; overload;\r\n function getAllKeys(aKey : TJSIDBKeyRange) : TJSIDBRequest; overload;\r\n function getAllKeys(aKey : jsValue; ACount : NativeInt) : TJSIDBRequest; overload;\r\n function getAllKeys(aKey : TJSIDBKeyRange; ACount : NativeInt) : TJSIDBRequest; overload;\r\n function getKey(aKey : jsValue) : TJSIDBRequest;\r\n function openCursor : TJSIDBRequest; overload;\r\n function openCursor(aKeyRange : TJSIDBKeyRange) : TJSIDBRequest; overload;\r\n function openCursor(aKeyRange : TJSIDBKeyRange; ADirection : String) : TJSIDBRequest;overload;\r\n function openKeyCursor : TJSIDBRequest;overload;\r\n function openKeyCursor(aKeyRange : TJSIDBKeyRange) : TJSIDBRequest;overload;\r\n function openKeyCursor(aKeyRange : TJSIDBKeyRange; ADirection : String) : TJSIDBRequest;overload;\r\n Property keyPath : JSValue Read FKeyPath;\r\n property multiEntry : Boolean read FMultiEntry;\r\n property objectStore : TJSIDBObjectStore read FObjectStore;\r\n property unique : boolean read FUnique;\r\n end;\r\n\r\n TJSIDBCursorDirection = class {$IFDEF PAS2JS} external name 'IDBCursorDirection' {$ENDIF}(TJSObject)\r\n Const\r\n next = 'next';\r\n nextUnique = 'nextUnique';\r\n prev = 'prev';\r\n prevUnique = 'prevUnique';\r\n end;\r\n\r\n\r\n { TJSIDBCursor }\r\n\r\n TJSIDBCursor = class {$IFDEF PAS2JS} external name 'IDBCursor' {$ENDIF}(TJSObject)\r\n private\r\n FDirection: string; external name 'direction';\r\n FKey: JSValue; external name 'key';\r\n FValue : JSValue; external name 'value';\r\n FPrimaryKey: JSValue; external name 'primaryKey';\r\n FSource: JSValue; external name 'source';\r\n FSourceAsIndex: TJSIDBIndex; external name 'source';\r\n FSourceAsStore: TJSIDBObjectStore; external name 'source';\r\n Public\r\n procedure advance(aCount : NativeInt); overload;\r\n procedure advance(aKey : JSValue); overload;\r\n procedure continue(aKey : JSValue); overload;\r\n procedure continue; overload;\r\n procedure continuePrimaryKey(aKey : JSValue); overload;\r\n procedure continuePrimaryKey(aKey,aPrimaryKey : JSValue); overload;\r\n procedure delete;\r\n procedure update(aValue : JSValue);\r\n property source : JSValue read FSource;\r\n property sourceAsStore : TJSIDBObjectStore read FSourceAsStore;\r\n property sourceAsIndex : TJSIDBIndex read FSourceAsIndex;\r\n property key : JSValue read FKey;\r\n Property Value : JSValue Read FValue;\r\n property primaryKey : JSValue read FPrimaryKey;\r\n property direction : string read FDirection;\r\n end;\r\n\r\n TJSIDBObjectStore = class {$IFDEF PAS2JS} external name 'IDBObjectStore' {$ENDIF}(TJSEventTarget)\r\n public\r\n function add(aValue : JSValue; aKey : String) : TJSIDBRequest;\r\n function add(aValue : JSValue) : TJSIDBRequest;\r\n function clear : TJSIDBRequest;\r\n function delete(aKey : string) : TJSIDBRequest;\r\n function delete(aKeyRange : TJSIDBKeyRange) : TJSIDBRequest;\r\n function get(aKey : string) : TJSIDBRequest; overload;\r\n function get(aKeyRange : TJSIDBKeyRange) : TJSIDBRequest; overload;\r\n function getKey(aKey : string) : TJSIDBRequest; overload;\r\n function getKey(aKeyRange : TJSIDBKeyRange) : TJSIDBRequest; overload;\r\n function getAll : TJSIDBRequest; overload;\r\n function getAll(aKey : String) : TJSIDBRequest; overload;\r\n function getAll(aKeyRange : TJSIDBKeyRange) : TJSIDBRequest; overload;\r\n function getAll(aKey : String; aCount: NativeInt) : TJSIDBRequest; overload;\r\n function getAll(aKeyRange : TJSIDBKeyRange; aCount: NativeInt) : TJSIDBRequest; overload;\r\n function getAllKeys(aKey : String) : TJSIDBRequest; overload;\r\n function getAllKeys(aKeyRange : TJSIDBKeyRange) : TJSIDBRequest; overload;\r\n function getAllKeys(aKey : String; aCount: NativeInt) : TJSIDBRequest; overload;\r\n function getAllKeys(aKeyRange : TJSIDBKeyRange; aCount: NativeInt) : TJSIDBRequest; overload;\r\n function createIndex (aIndexName : String; KeyPath : String) : TJSIDBIndex; overload;\r\n function createIndex (aIndexName : String; KeyPath : String; Options : TJSIDBIndexParameters) : TJSIDBIndex; overload;\r\n function createIndex (aIndexName : String; KeyPath : Array of String) : TJSIDBIndex; overload;\r\n function createIndex (aIndexName : String; KeyPath : Array of String; Options : TJSIDBIndexParameters) : TJSIDBIndex; overload;\r\n Procedure deleteIndex (aIndexName : String);\r\n function index (aIndexName : String) : TJSIDBIndex;\r\n function put(aValue : JSValue; aKey : String) : TJSIDBRequest; overload;\r\n function put(aValue : JSValue) : TJSIDBRequest; overload;\r\n function openCursor : TJSIDBRequest; overload;\r\n function openCursor(aKey : String) : TJSIDBRequest; overload;\r\n function openCursor(aKeyRange : TJSIDBKeyRange) : TJSIDBRequest; overload;\r\n function openCursor(aKey : String; aDirection : string) : TJSIDBRequest; overload;\r\n function openCursor(aKeyRange : TJSIDBKeyRange; aDirection : string) : TJSIDBRequest; overload;\r\n function openKeyCursor : TJSIDBRequest; overload;\r\n function openKeyCursor(aKey : String) : TJSIDBRequest; overload;\r\n function openKeyCursor(aKeyRange : TJSIDBKeyRange) : TJSIDBRequest; overload;\r\n function openKeyCursor(aKey : String; aDirection : string) : TJSIDBRequest; overload;\r\n function openKeyCursor(aKeyRange : TJSIDBKeyRange; aDirection : string) : TJSIDBRequest; overload;\r\n function count : TJSIDBRequest; overload;\r\n function count(aKey : String) : TJSIDBRequest; overload;\r\n function count(aKeyRange : TJSIDBKeyRange) : TJSIDBRequest; overload;\r\n property Indexes [aIndexName : String] : TJSIDBIndex read index;\r\n end;\r\n\r\n { TJSIDBRequest }\r\n\r\n TJSIDBRequest = class {$IFDEF PAS2JS} external name 'IDBRequest' {$ENDIF}(TJSEventTarget)\r\n private\r\n Ferror : JSValue; external name 'error'; // standards are not quite clear on this one\r\n FReadyState: string; external name 'readyState';\r\n FResult: JSValue; external name 'result';\r\n FResultDatabase: TIDBDatabase; external name 'result';\r\n FResultIndex: TJSIDBIndex; external name 'result';\r\n FResultObjectStore : TJSIDBObjectStore; external name 'result';\r\n FResultCursor : TJSIDBCursor; external name 'result';\r\n FSourceDatabase: TIDBDatabase; external name 'source';\r\n FSourceIndex: TJSIDBIndex; external name 'source';\r\n FSourceObjectStore : TJSIDBObjectStore; external name 'source';\r\n FSourceCursor : TJSIDBCursor; external name 'source';\r\n FSource: JSValue; external name 'source';\r\n FTransaction: TJSIDBTransaction; external name 'transaction';\r\n Public\r\n onerror : TJSEventHandler;\r\n onsuccess : TJSEventHandler;\r\n Property error : JSValue read FError;\r\n property readyState : string read FReadyState;\r\n\r\n property result : JSValue read FResult;\r\n property resultAsObjectStore : TJSIDBObjectStore read FResultObjectStore;\r\n property resultAsCursor : TJSIDBCursor read FResultCursor;\r\n property resultAsIndex : TJSIDBIndex read FResultIndex;\r\n property resultAsDatabase : TIDBDatabase read FResultDatabase;\r\n\r\n property source : JSValue read FSource;\r\n property sourceAsObjectStore : TJSIDBObjectStore read FSourceObjectStore;\r\n property sourceAsCursor : TJSIDBCursor read FSourceCursor;\r\n property sourceAsIndex : TJSIDBIndex read FSourceIndex;\r\n property sourceAsDatabase : TIDBDatabase read FSourceDatabase;\r\n\r\n property transaction : TJSIDBTransaction read FTransaction;\r\n end;\r\n\r\n TJSIDBOpenDBRequest = class {$IFDEF PAS2JS} external name 'IDBOpenDBRequest' {$ENDIF}(TJSIDBRequest)\r\n Public\r\n onblocked : TJSEventHandler;\r\n onupgradeneeded : TJSEventHandler;\r\n end;\r\n\r\n TJSCreateObjectStoreOptions = record\r\n keyPath : jsValue;\r\n autoIncrement : boolean;\r\n end;\r\n\r\n { TIDBDatabase }\r\n\r\n TIDBDatabase = class {$IFDEF PAS2JS} external name 'IDBDatabase' {$ENDIF}(TJSEventTarget)\r\n private\r\n FName: string; external name 'name';\r\n FobjectStoreNames: TStringDynArray; external name 'objectStoreNames';\r\n FVersion: integer; external name 'version';\r\n public\r\n procedure close;\r\n function createObjectStore(aName : string) : TJSIDBObjectStore; overload;\r\n function createObjectStore(aName : string; Options: TJSCreateObjectStoreOptions) : TJSIDBObjectStore; overload;\r\n procedure deleteObjectStore(aName : string);\r\n function transaction(aStoreNames : array of string) : TJSIDBTransaction; overload;\r\n function transaction(aStoreNames : array of string; aMode : string) : TJSIDBTransaction; overload;\r\n property name : string read FName;\r\n property version : integer read FVersion;\r\n property objectStoreNames : TStringDynArray read FobjectStoreNames;\r\n end;\r\n\r\n TJSIDBFactory = class {$IFDEF PAS2JS} external name 'IDBFactory' {$ENDIF}(TJSEventTarget)\r\n public\r\n function open(aName : string) : TJSIDBOpenDBRequest;\r\n function open(aName : string; aVersion : Integer) : TJSIDBOpenDBRequest;\r\n function deleteDatabase(aName : string) : TJSIDBOpenDBRequest;\r\n function cmp (a,b : jsValue) : NativeInt;\r\n end;\r\n \r\n { TJSStorage }\r\n\r\n TJSStorage = class {$IFDEF PAS2JS} external name 'Storage' {$ENDIF}(TJSEventTarget)\r\n private\r\n FLength: NativeInt; external name 'length';\r\n public\r\n function key(aIndex : Integer) : String;\r\n function getItem(aKeyName : string) : string;\r\n procedure setItem(aKeyName : string; aValue : string);\r\n procedure removeItem(aKeyName : string);\r\n procedure clear;\r\n property Keys[AIndex : Integer] : String read key;\r\n property Items[aKeyName: String] : String read getItem write setItem; default;\r\n property length : NativeInt Read FLength;\r\n end;\r\n\r\n // Fake object, used for objects whose visible can be checked\r\n TJSVisibleItem = class {$IFDEF PAS2JS} external name 'IVisible' {$ENDIF}(TJSObject)\r\n Private\r\n FVisible : boolean; external name 'visible';\r\n Public\r\n Property visible : boolean read FVisible;\r\n end;\r\n \r\n TJSLocationBar = class {$IFDEF PAS2JS} external name 'LocationBar' {$ENDIF}(TJSVisibleItem);\r\n TJSMenuBar = class {$IFDEF PAS2JS} external name 'MenuBar' {$ENDIF}(TJSVisibleItem);\r\n TJSToolBar = class {$IFDEF PAS2JS} external name 'ToolBar' {$ENDIF}(TJSVisibleItem);\r\n TJSPersonalBar = class {$IFDEF PAS2JS} external name 'PersonalBar' {$ENDIF}(TJSVisibleItem);\r\n TJSScrollBars = class {$IFDEF PAS2JS} external name 'ScrollBars' {$ENDIF}(TJSVisibleItem);\r\n\r\n TJSPositionError = record\r\n code : integer;\r\n message : string;\r\n end;\r\n\r\n TJSPositionOptions = record\r\n enableHighAccuracy : boolean;\r\n timeout : integer;\r\n maximumAge : integer;\r\n end;\r\n\r\n TJSCoordinates = record\r\n latitude : double;\r\n longitude : double;\r\n altitude : double;\r\n accuracy : double;\r\n altitudeAccuracy : double;\r\n heading : double;\r\n speed : double;\r\n end;\r\n\r\n TJSPosition = record\r\n coords : TJSCoordinates;\r\n timestamp : String;\r\n end;\r\n\r\n TJSGeoLocationCallback = procedure (aPosition : TJSPosition);\r\n TJSGeoLocationEvent = procedure (aPosition : TJSPosition) of object;\r\n TJSGeoLocationErrorCallback = procedure (aValue : TJSPositionError);\r\n TJSGeoLocationErrorEvent = procedure (aValue : TJSPositionError) of object;\r\n\r\n TJSGeoLocation = class {$IFDEF PAS2JS} external name 'GeoLocation' {$ENDIF}(TJSObject)\r\n Public\r\n Procedure getCurrentPosition(ASuccess : TJSGeoLocationCallback); overload;\r\n Procedure getCurrentPosition(ASuccess : TJSGeoLocationCallback;aError : TJSGeoLocationErrorCallback); overload;\r\n Procedure getCurrentPosition(ASuccess : TJSGeoLocationCallback;aError : TJSGeoLocationErrorCallback; AOptions : TJSPositionOptions); overload;\r\n Function watchPosition(ASuccess : TJSGeoLocationCallback) : NativeInt; overload;\r\n Function watchPosition(ASuccess : TJSGeoLocationCallback;aError : TJSGeoLocationErrorCallback) : NativeInt; overload;\r\n Function watchPosition(ASuccess : TJSGeoLocationCallback;aError : TJSGeoLocationErrorCallback; AOptions : TJSPositionOptions) : NativeInt; overload;\r\n procedure clearWatch(AID : NativeInt);\r\n end;\r\n\r\n TJSMediaStreamTrack = class {$IFDEF PAS2JS} external name 'MediaStreamTrack' {$ENDIF}(TJSEventTarget)\r\n end;\r\n\r\n TJSMediaDevices = class {$IFDEF PAS2JS} external name 'MediaDevices' {$ENDIF}(TJSEventTarget)\r\n end;\r\n\r\n TJSWorker = class {$IFDEF PAS2JS} external name 'Worker' {$ENDIF}(TJSEventTarget)\r\n public\r\n constructor new(aURL : string);\r\n procedure postMessage(aValue : JSValue);\r\n procedure postMessage(aValue : JSValue; aList : TJSValueDynArray);\r\n procedure terminate;\r\n end;\r\n\r\n TJSMessagePort = class {$IFDEF PAS2JS} external name 'MessagePort' {$ENDIF}(TJSEventTarget)\r\n Public\r\n procedure close;\r\n procedure postMessage(aValue : JSValue);\r\n procedure postMessage(aValue : JSValue; aList : TJSValueDynArray);\r\n procedure start;\r\n end;\r\n TJSMessagePortDynArray = Array of TJSMessagePort;\r\n\r\n { TJSSharedWorker }\r\n\r\n TJSSharedWorker = class {$IFDEF PAS2JS} external name 'SharedWorker' {$ENDIF}(TJSEventTarget)\r\n private\r\n FPort: TJSMessagePort; external name 'port';\r\n Public\r\n constructor new(aURL : String); overload;\r\n constructor new(aURL : String; aName : string); overload;\r\n property port : TJSMessagePort Read FPort;\r\n end;\r\n\r\n TJSExtendableEvent = class {$IFDEF PAS2JS} external name 'ExtendableEvent' {$ENDIF}(TJSEvent)\r\n Procedure waitUntil(aPromise : TJSPromise);\r\n end;\r\n\r\n { TJSExtendableMessageEvent }\r\n\r\n TJSExtendableMessageEvent = class {$IFDEF PAS2JS} external name 'ExtendableMessageEvent' {$ENDIF}(TJSExtendableEvent)\r\n private\r\n FData: JSValue; external name 'data';\r\n FLastEventID: String; external name 'lastEventId';\r\n FOrigin: String; external name 'origin';\r\n FPorts: TJSMessagePortDynArray; external name 'ports';\r\n FSource: TJSObject; external name 'source';\r\n FSourceClient: TJSClient; external name 'source';\r\n FSourcePort: TJSMessagePort; external name 'source';\r\n FSourceServiceWorker: TJSServiceWorker; external name 'source';\r\n Public\r\n Property Data : JSValue Read FData;\r\n Property LastEventID : String Read FLastEventID;\r\n Property Origin : String Read FOrigin;\r\n Property Ports : TJSMessagePortDynArray Read FPorts;\r\n Property Source : TJSObject Read FSource;\r\n // Possible types for Source\r\n Property SourceServiceWorker : TJSServiceWorker Read FSourceServiceWorker;\r\n Property SourcePort : TJSMessagePort Read FSourcePort;\r\n Property SourceClient : TJSClient Read FSourceClient;\r\n end;\r\n\r\n { TJSFetchEvent }\r\n\r\n TJSFetchEvent = class {$IFDEF PAS2JS} external name 'FetchEvent' {$ENDIF}(TJSExtendableEvent)\r\n private\r\n FClientID: String; external name 'clientId';\r\n FReplacesClientID: String; external name 'replacesClientId';\r\n FRequest: TJSRequest; external name 'request';\r\n FResultingClientID: String; external name 'resultingClientId';\r\n FPreloadResponse: TJSPromise; external name 'preloadResponse';\r\n Public\r\n Procedure respondWith(aPromise : TJSPromise);\r\n Procedure respondWith(aResponse : TJSResponse);\r\n Property ClientId : String Read FClientID;\r\n Property PreloadResponse : TJSPromise Read FPreloadResponse;\r\n Property ReplacesClientID : String Read FReplacesClientID;\r\n Property ResultingClientID : String Read FResultingClientID;\r\n Property request : TJSRequest Read FRequest;\r\n end;\r\n\r\n { TJSClient }\r\n\r\n TJSClient = class {$IFDEF PAS2JS} external name 'Client' {$ENDIF}(TJSObject)\r\n private\r\n FFrameType: String; external name 'frameType';\r\n FID: String; external name 'id';\r\n FType: String; external name 'type';\r\n FURL: String; external name 'url';\r\n Public\r\n procedure postMessage(aValue : JSValue);\r\n procedure postMessage(aValue : JSValue; aList : TJSValueDynArray);\r\n Property Id : String Read FID;\r\n Property Type_ : String Read FType;\r\n Property FrameType : String Read FFrameType;\r\n Property URL : String Read FURL;\r\n end;\r\n\r\n { TJSServiceWorker }\r\n\r\n TJSServiceWorker = class {$IFDEF PAS2JS} external name 'ServiceWorker' {$ENDIF}(TJSWorker)\r\n private\r\n FRegistration: TJSServiceWorkerRegistration; external name 'registration';\r\n FScriptURL: String; external name 'scriptURL';\r\n FState: string; external name 'state';\r\n Public\r\n property State : string read FState;\r\n property ScriptURL : String Read FscriptURL;\r\n property Registration: TJSServiceWorkerRegistration read FRegistration;\r\n end;\r\n\r\n { TJSNavigationPreloadState }\r\n\r\n TJSNavigationPreloadState = class external name 'navigationPreloadState'\r\n public\r\n enabled: boolean;\r\n headerValue: string;\r\n end;\r\n\r\n { TJSNavigationPreload }\r\n\r\n TJSNavigationPreload = class {$IFDEF PAS2JS} external name 'navigationPreload' {$ENDIF}(TJSObject)\r\n public\r\n function enable: boolean; {$IFDEF PAS2JS} async; {$ENDIF}\r\n function disable: boolean; {$IFDEF PAS2JS} async; {$ENDIF}\r\n function setHeaderValue(Value: string): TJSPromise;\r\n function getState: TJSNavigationPreloadState; {$IFDEF PAS2JS} async; {$ENDIF}\r\n end;\r\n\r\n { TJSServiceWorkerRegistration }\r\n\r\n TJSServiceWorkerRegistration = class {$IFDEF PAS2JS} external name 'ServiceWorkerRegistration' {$ENDIF}(TJSObject)\r\n private\r\n FActive: TJSServiceWorker; external name 'active';\r\n FInstalling: TJSServiceWorker; external name 'installing';\r\n FScope: string; external name 'scope';\r\n FWaiting: TJSServiceWorker; external name 'waiting';\r\n FNavigationPreload: TJSNavigationPreload; external name 'navigationPreload';\r\n public\r\n function unregister : TJSPromise;\r\n procedure update;\r\n property Active : TJSServiceWorker read FActive;\r\n property Scope : string read FScope;\r\n property Waiting : TJSServiceWorker read FWaiting;\r\n property Installing : TJSServiceWorker read FInstalling;\r\n property NavigationPreload: TJSNavigationPreload read FNavigationPreload;\r\n end;\r\n\r\n TJSServiceWorkerContainerOptions = record\r\n scope : string;\r\n end;\r\n\r\n { TJSServiceWorkerContainer }\r\n\r\n TJSServiceWorkerContainer = class {$IFDEF PAS2JS} external name 'ServiceWorkerContainer' {$ENDIF}(TJSObject)\r\n private\r\n FController: TJSServiceWorker; external name 'controller';\r\n FReady: TJSPromise; external name 'ready';\r\n Public\r\n function register(aURL : String) : TJSPromise; overload;\r\n function register(aURL : String; aOptions : TJSServiceWorkerContainerOptions) : TJSPromise; overload;\r\n function getRegistration(aURL : String) : TJSPromise; overload;\r\n function getRegistration : TJSPromise; overload;\r\n function getRegistrations : TJSPromise;\r\n property controller : TJSServiceWorker read FController;\r\n property ready : TJSPromise read FReady;\r\n end;\r\n\r\n TJSClipboardItemOptions = class {$IFDEF PAS2JS} external name 'Object' {$ENDIF}(TJSObject)\r\n presentationStyle : String;\r\n end;\r\n\r\n TJSClipBoardItem = class {$IFDEF PAS2JS} external name 'ClipboardItem' {$ENDIF}(TJSObject)\r\n constructor new(aData : TJSObject; aOptions : TJSOBject); overload;\r\n constructor new(aData : TJSObject; aOptions : TJSClipboardItemOptions); overload;\r\n constructor new(aData : TJSObject); overload;\r\n end;\r\n\r\n TJSClipBoard = class {$IFDEF PAS2JS} external name 'Clipboard' {$ENDIF}(TJSEventTarget)\r\n Function read : TJSPromise;\r\n Function readText : TJSPromise;\r\n Function write(Data : Array of TJSClipBoardItem) : TJSPromise;\r\n Function writeText(aText : String) : TJSPromise;\r\n end;\r\n\r\n { TJSNavigator }\r\n\r\n TJSNavigator = class {$IFDEF PAS2JS} external name 'Navigator' {$ENDIF}(TJSObject)\r\n{$IFDEF FIREFOX}\r\n FbuildID : String ; external name 'buildID';\r\n FOSCPU : String ; external name 'oscpu';\r\n FproductSub : string; external name 'productSub';\r\n FVendor : string; external name 'vendor';\r\n{$ENDIF}\r\n private\r\n FCookieEnabled: Boolean; external name 'cookieEnabled';\r\n FGeoLocation: TJSGeoLocation; external name 'geolocation';\r\n FLanguage: String; external name 'language';\r\n FMaxTouchPoints: NativeInt; external name 'maxTouchPoints';\r\n FMediaDevices: TJSMediaDevices; external name 'mediaDevices';\r\n FOnline: boolean; external name 'onLine';\r\n FPlatform: string; external name 'platform';\r\n FServiceWorker: TJSServiceWorkerContainer; external name 'serviceWorker';\r\n FUserAgent: string; external name 'userAgent';\r\n fClipBoard : TJSClipBoard; external name 'clipboard';\r\n FPermissions: TJSPermissions; external name 'permissions';\r\n public\r\n function getBattery : TJSPromise;\r\n function requestMediaKeySystemAccess(aKeySystem : String; supportedConfigurations : TJSValueDynArray) : TJSPromise;\r\n Procedure registerContentHandler(aMimeType,aURI,aTitle : string);\r\n Procedure registerProtocolHandler(aProtocol,aURI,aTitle : string);\r\n Procedure vibrate(aPattern : NativeInt);\r\n Procedure vibrate(aPattern : Array of NativeInt);\r\n{$IFDEF FIREFOX}\r\n property buildID : String read FBuildID;\r\n property oscpu : string read FOSCPU;\r\n property productSub: string read FproductSub;\r\n property vendor : string read Fvendor;\r\n{$ENDIF}\r\n property cookieEnabled : Boolean read FCookieEnabled;\r\n property geoLocation : TJSGeoLocation Read FGeoLocation;\r\n property language : String read FLanguage;\r\n property maxTouchPoints : NativeInt read FMaxTouchPoints;\r\n property mediaDevices : TJSMediaDevices read FMediaDevices;\r\n property onLine : boolean read FOnline;\r\n property platform : string read FPlatform;\r\n property userAgent : string read FUserAgent;\r\n property serviceWorker : TJSServiceWorkerContainer read FServiceWorker;\r\n property ClipBoard : TJSClipBoard Read FCLipboard;\r\n property permissions: TJSPermissions read FPermissions;\r\n end;\r\n\r\n { TJSTouchEvent }\r\n TTouchCoord = longint;\r\n\r\n TJSTouch = class {$IFDEF PAS2JS} external name 'Touch' {$ENDIF}(TJSObject)\r\n private\r\n FClientX: TTouchCoord; external name 'clientX';\r\n FClientY: TTouchCoord; external name 'clientY';\r\n FIDentifier: longint; external name 'identifier';\r\n FPageX: TTouchCoord; external name 'pageX';\r\n FPageY: TTouchCoord; external name 'pageY';\r\n FScreenX: TTouchCoord; external name 'screenX';\r\n FScreenY: TTouchCoord; external name 'screenY';\r\n FTarget: TJSElement; external name 'target';\r\n Public\r\n Property identifier : longint read FIDentifier;\r\n Property ScreenX : TTouchCoord Read FScreenX;\r\n Property ScreenY : TTouchCoord Read FScreenY;\r\n Property ClientX : TTouchCoord Read FClientX;\r\n Property ClientY : TTouchCoord Read FClientY;\r\n Property PageX : TTouchCoord Read FPageX;\r\n Property PageY : TTouchCoord Read FPageY;\r\n Property Target : TJSElement Read FTarget;\r\n end;\r\n\r\n { TJSTouchList }\r\n\r\n TJSTouchList = class {$IFDEF PAS2JS} external name 'TouchList' {$ENDIF}(TJSObject)\r\n private\r\n FLength: NativeInt; external name 'length';\r\n Public\r\n function item (aIndex : Integer) : TJSTouch;\r\n property length : NativeInt Read FLength;\r\n Property Touches[AIndex : Integer] : TJSTouch Read item; default;\r\n end;\r\n\r\n\r\n TJSPerformance = class {$IFDEF PAS2JS} external name 'Performance' {$ENDIF}(TJSObject);\r\n\r\n TJSScreen = class {$IFDEF PAS2JS} external name 'Screen' {$ENDIF}(TJSObject)\r\n private\r\n FavailHeight: Integer; external name 'availHeight';\r\n FavailWidth: Integer; external name 'availWidth';\r\n FcolorDepth: Integer; external name 'colorDepth';\r\n FPixelDepth: Integer; external name 'pixelDepth';\r\n Fheight: Integer; external name 'height';\r\n Fwidth: Integer; external name 'width';\r\n public\r\n { Properties declarations }\r\n property availHeight: Integer read FavailHeight;\r\n property availWidth: Integer read FavailWidth;\r\n property colorDepth: Integer read FcolorDepth;\r\n property pixelDepth: Integer read FPixelDepth;\r\n property height: Integer read Fheight;\r\n property width: Integer read Fwidth;\r\n end;\r\n\r\n\r\n TJSParamEnumCallBack = reference to procedure (const aKey,aValue : string);\r\n TJSURLSearchParams = class {$IFDEF PAS2JS} external name 'URLSearchParams' {$ENDIF}(TJSObject)\r\n Public\r\n constructor new(aQuery : String);\r\n Procedure append(const aName,aValue : string);\r\n Procedure delete(const aName : string);\r\n Function entries : TJSIterator;\r\n Procedure foreach(aEnumCallBack : TJSParamEnumCallBack);\r\n function get(const aName : string) : JSValue;\r\n // If you're sure the value exists...\r\n function getString(const aName : string) : string; external name 'get';\r\n function getAll(const aName : string) : TStringDynArray;\r\n function has(const aName : string) : Boolean;\r\n Function keys : TJSIterator; reintroduce;\r\n Procedure set_(const aName,aValue : string); external name 'set';\r\n Procedure sort;\r\n Function values : TJSIterator; reintroduce;\r\n end;\r\n\r\n TJSURL = class {$IFDEF PAS2JS} external name 'URL' {$ENDIF}(TJSObject)\r\n Private\r\n FOrigin : String; external name 'origin';\r\n FSearchParams : TJSURLSearchParams; external name 'searchParams';\r\n public\r\n hash : string;\r\n host : string;\r\n hostname : string;\r\n href : string;\r\n password : string;\r\n pathname : string;\r\n port : string;\r\n protocol : string;\r\n search : string;\r\n username : string;\r\n constructor new(aURL : String);\r\n constructor new(aURL,aBase : String);\r\n class function createObjectURL(const v: JSValue): string;\r\n class function revokeObjectURL(const S : String): string;\r\n function toJSON : String;\r\n Property Origin : String Read FOrigin;\r\n property SearchParams : TJSURLSearchParams read FSearchParams;\r\n end;\r\n TJSURLDynArray = array of TJSURL;\r\n\r\n TJSTimerCallBack = reference to procedure; {$IFDEF PAS2JS} safecall; {$ENDIF}\r\n Theader = Array [0..1] of String;\r\n THeaderArray = Array of Theader;\r\n\r\n TJSHTMLHeaders = class {$IFDEF PAS2JS} external name 'Headers' {$ENDIF}(TJSObject)\r\n Public\r\n constructor new(values : THeaderArray); overload;\r\n procedure append(aName, aValue : String);\r\n procedure delete(aName : String);\r\n function entries : TJSIterator;\r\n Function get(aName: String): string;\r\n Function has(aName: String): Boolean;\r\n function keys : TJSIterator; reintroduce;\r\n function values : TJSIterator; reintroduce;\r\n procedure set_(aName, aValue : String);\r\n Property Headers[aName : string] : string Read Get Write Set_;\r\n end;\r\n\r\n\r\n { TJSMediaQueryList }\r\n\r\n TJSMediaQueryList = class {$IFDEF PAS2JS} external name 'MediaQueryList' {$ENDIF}(TJSObject)\r\n private\r\n FMatches: Boolean; external name 'matches';\r\n FMedia: String; external name 'media';\r\n Public\r\n Property matches : Boolean Read FMatches;\r\n Property media : String Read FMedia;\r\n end;\r\n\r\n TJSReadableStream = class {$IFDEF PAS2JS} external name 'ReadableStream' {$ENDIF}(TJSObject)\r\n private\r\n flocked: Boolean; external name 'locked';\r\n public\r\n property locked: Boolean read flocked;\r\n constructor new(underlyingSource: TJSObject);\r\n constructor new(underlyingSource, queueingStrategy: TJSObject);\r\n function cancel(reason: TJSDOMString): TJSPromise;\r\n function getReader(): TJSObject; overload;\r\n function getReader(mode: TJSObject): TJSObject; overload;\r\n function pipeThrough(transformStream: TJSObject): TJSReadableStream; overload;\r\n function pipeThrough(transformStream, options: TJSObject): TJSReadableStream; overload;\r\n function pipeTo(destination: TJSObject): TJSPromise; overload;\r\n function pipeTo(destination, options: TJSObject): TJSPromise; overload;\r\n function tee(): TJSArray; // array containing two TJSReadableStream instances\r\n end;\r\n\r\n TJSWritableStream = class {$IFDEF PAS2JS} external name 'WritableStream' {$ENDIF}(TJSObject)\r\n private\r\n FLocked: Boolean; external name 'locked';\r\n public\r\n function abort(reason: String): TJSPromise;\r\n function close: TJSPromise;\r\n function getWriter: TJSObject;\r\n property locked: Boolean read FLocked;\r\n end;\r\n\r\n TJSBody = class {$IFDEF PAS2JS} external name 'Body' {$ENDIF}(TJSObject)\r\n private\r\n fbody: TJSReadableStream; external name 'body';\r\n fbodyUsed: Boolean; external name 'bodyUsed';\r\n public\r\n property body: TJSReadableStream read fbody;\r\n property bodyUsed: Boolean read fbodyUsed;\r\n function arrayBuffer(): TJSPromise; // resolves to TJSArrayBuffer\r\n //function blob(): TJSPromise; // resolves to TJSBlob\r\n function blob: TJSBlob; {$IFNDEF SkipAsync}{$IFDEF PAS2JS} async;{$ENDIF}{$ENDIF}\r\n function json(): TJSPromise; // resolves to JSON / TJSValue\r\n //function text(): TJSPromise; // resolves to USVString, always decoded using UTF-8\r\n function text(): string; {$IFNDEF SkipAsync}{$IFDEF PAS2JS}async;{$ENDIF}{$ENDIF}\r\n end;\r\n\r\n TJSResponse = class {$IFDEF PAS2JS} external name 'Response' {$ENDIF}(TJSBody)\r\n private\r\n fheaders: TJSObject;external name 'headers';\r\n fok: Boolean; external name 'ok';\r\n fredirected: Boolean; external name 'redirected';\r\n fstatus: NativeInt; external name 'status';\r\n fstatusText: String; external name 'statusText';\r\n ftype: String; external name 'type';\r\n furl: String; external name 'url';\r\n fuseFinalUrl: Boolean; external name 'useFinalUrl';\r\n public\r\n property headers: TJSObject read fheaders; //\r\n property ok: Boolean read fok;\r\n property redirected: Boolean read fredirected;\r\n property status: NativeInt read fstatus;\r\n property statusText: String read fstatusText; //\r\n property type_: String read ftype; //\r\n property url: String read furl; //\r\n property useFinalUrl: Boolean read fuseFinalUrl write fuseFinalUrl;\r\n constructor new(body: TJSObject; init: TJSObject); overload; varargs; external name 'new';\r\n constructor new(Msg: string; init: TJSObject); overload; varargs; external name 'new';\r\n function clone(): TJSResponse;\r\n function error(): TJSResponse;\r\n function redirect(url: String; Status: NativeInt): TJSResponse;\r\n end;\r\n\r\n TJSDOMHighResTimeStamp = Double;\r\n TFrameRequestCallback = reference to procedure (aTime: TJSDOMHighResTimeStamp);\r\n\r\n TJSPostMessageOptions = class {$IFDEF PAS2JS} external name 'Object' {$ENDIF}(TJSObject)\r\n targetOrigin : string;\r\n transfer : TJSValueDynArray;\r\n end;\r\n\r\n TJSIdleCallbackOptions = class\r\n public\r\n timeout: Cardinal;\r\n end;\r\n\r\n TJSIdleDeadline = class external name 'IdleDeadline'\r\n private\r\n FDidTimeout: Boolean; external name 'didTimeout';\r\n public\r\n function timeRemaining: TJSDOMHighResTimeStamp;\r\n\r\n property didTimeout: Boolean read FDidTimeout;\r\n end;\r\n\r\n TJSCacheDeleteOptions = class {$IFDEF PAS2JS} external name 'Object' {$ENDIF}(TJSObject)\r\n ignoreSearch : Boolean;\r\n ignoreMethod : Boolean;\r\n ignoreVary : Boolean;\r\n cacheName : string;\r\n end;\r\n\r\n { TJSRequest }\r\n\r\n TJSRequest = class {$IFDEF PAS2JS} external name 'Request' {$ENDIF}(TJSObject)\r\n private\r\n FBody: TJSReadableStream; external name 'body';\r\n FBodyUsed: Boolean; external name 'bodyUsed';\r\n FCache: String; external name 'cache';\r\n FCredentials: TJSObject; external name 'credentials';\r\n FDestination: String; external name 'destination';\r\n FHeaders: TJSObject; external name 'headers';\r\n FIntegrity: String; external name 'integrity';\r\n FMethod: String; external name 'method';\r\n FMode: String; external name 'mode';\r\n FReferrer: string; external name 'referrer';\r\n FReferrerPolicy: string; external name 'referrerPolicy';\r\n FURL: String;external name 'url';\r\n Public\r\n Property body : TJSReadableStream Read FBody;\r\n property bodyUsed : Boolean Read FBodyUsed;\r\n Property Cache : String Read FCache;\r\n Property Credentials : TJSObject Read FCredentials;\r\n Property Destination : String Read FDestination;\r\n // TODO : actually Headers object\r\n Property Headers : TJSObject Read FHeaders;\r\n Property Integrity : String Read FIntegrity;\r\n Property Method : String Read FMethod;\r\n Property Mode : String Read FMode;\r\n Property Referrer : string Read FReferrer;\r\n Property ReferrerPolicy : string Read FReferrerPolicy;\r\n Property URL : String Read FURL;\r\n end;\r\n TJSRequestDynArray = array of TJSRequest;\r\n\r\n TJSCache = class {$IFDEF PAS2JS} external name 'Cache' {$ENDIF}(TJSObject)\r\n Public\r\n Function add(aRequest : String) : TJSPromise;\r\n Function add(aRequest : TJSURL) : TJSPromise;\r\n Function addAll(aRequests : TJSStringDynArray) : TJSPromise;\r\n Function addAll(aRequests : TJSURLDynArray) : TJSPromise;\r\n Function addAll(aRequests : TJSValueDynArray) : TJSPromise;\r\n Function put(aRequest : String; aResponse : TJSResponse) : TJSPromise;\r\n Function put(aRequest : TJSRequest; aResponse : TJSResponse) : TJSPromise;\r\n Function delete(aRequest : String) : TJSPromise;\r\n Function delete(aRequest : TJSRequest) : TJSPromise;\r\n Function delete(aRequest : String; aOptions : TJSObject) : TJSPromise;\r\n Function delete(aRequest : TJSRequest; aOptions : TJSObject) : TJSPromise;\r\n Function delete(aRequest : String; aOptions : TJSCacheDeleteOptions) : TJSPromise;\r\n Function delete(aRequest : TJSRequest; aOptions : TJSCacheDeleteOptions) : TJSPromise;\r\n Function keys : TJSPromise; reintroduce;\r\n Function match(aRequest : String): TJSPromise;\r\n Function match(aRequest : TJSRequest): TJSPromise;\r\n Function matchAll(aRequest : TJSStringDynArray): TJSPromise;\r\n Function matchAll(aRequest : TJSRequestDynArray): TJSPromise;\r\n Function matchAll(aRequests : TJSValueDynArray) : TJSPromise;\r\n end;\r\n\r\n TJSCacheStorage = class {$IFDEF PAS2JS} external name 'CacheStorage' {$ENDIF}(TJSObject)\r\n Public\r\n function delete(aName : string) : TJSPromise; // resolves to boolean\r\n function has(aName : string) : TJSPromise;\r\n Function keys : TJSPromise; reintroduce;\r\n Function match(aRequest : String): TJSPromise;\r\n Function match(aRequest : TJSRequest): TJSPromise;\r\n function open(aName : string) : TJSPromise;\r\n end;\r\n\r\n TJSWindowArray = Array of TJSWindow;\r\n TIdleCallbackProc = reference to procedure(idleDeadline: TJSIdleDeadline);\r\n\r\n { TJSWindow }\r\n\r\n TJSWindow = class {$IFDEF PAS2JS} external name 'Window' {$ENDIF}(TJSEventTarget)\r\n Private\r\n FClosed: boolean; external name 'closed';\r\n FConsole : TJSConsole; external name 'console';\r\n FCrypto: TJSCrypto; external name 'crypto';\r\n FDevicePixelRatio: Double; external name 'devicePixelRatio';\r\n FDocument: TJSDocument; external name 'document';\r\n FFrameElement: TJSElement; external name 'frameElement';\r\n FFrames: TJSWindowArray; external name 'frames';\r\n FHistory: TJSHistory; external name 'history';\r\n FIndexedDB: TJSIDBFactory; external name 'indexedDB';\r\n FInnerheight: NativeInt; external name 'innerHeight';\r\n FInnerWidth: NativeInt; external name 'innerWidth';\r\n FLength: NativeInt; external name 'length';\r\n FLocalStorage: TJSStorage; external name 'localStorage';\r\n FLocation: TJSLocation; external name 'location';\r\n FLocationBar: TJSLocationBar; external name 'locationbar';\r\n FLocationString: string; external name 'location';\r\n FMenuBar: TJSMenuBar; external name 'menubar';\r\n FNavigator: TJSNavigator; external name 'navigator';\r\n FOpener: TJSWindow; external name 'opener';\r\n FOuterheight: NativeInt; external name 'outerHeight';\r\n FOuterWidth: NativeInt; external name 'outerWidth';\r\n FParent: TJSWindow; external name 'parent';\r\n FPerformance: TJSPerformance; external name 'Performance';\r\n FPersonalBar: TJSPersonalBar; external name 'personalbar';\r\n FScreen: TJSScreen; external name 'screen';\r\n FScreenX: NativeInt; external name 'screenX';\r\n FScreenY: NativeInt; external name 'screenY';\r\n FScrollbar: TJSScrollBars; external name 'scrollbar';\r\n FScrollX: NativeInt; external name 'scrollX';\r\n FScrollY: NativeInt; external name 'scrollY';\r\n FSelf: TJSWindow; external name 'self';\r\n FSessionStorage: TJSStorage; external name 'sessionStorage';\r\n FToolBar: TJSToolBar; external name 'toolbar';\r\n FTop: TJSWindow; external name 'top';\r\n FURL: TJSURL; external name 'URL';\r\n Public\r\n fullSreen : Boolean; \r\n name : string;\r\n status : string;\r\n onabort : TJSEventHandler;\r\n onafterprint : TJSEventHandler;\r\n onbeforeprint : TJSEventHandler;\r\n onbeforeinstallprompt : TJSEventHandler;\r\n onbeforeunloadprompt : TJSEventHandler;\r\n onblur : TJSEventHandler;\r\n onchange : TJSEventHandler;\r\n onclick: THTMLClickEventHandler;\r\n onclose : TJSEventHandler;\r\n oncontextmenu : TJSEventHandler;\r\n ondblclick : THTMLClickEventHandler;\r\n onerror : TJSErrorEventHandler;\r\n onfocus : TJSFocusEventhandler;\r\n onhashchange : TJSHashChangeEventhandler;\r\n oninput : TJSEventhandler;\r\n onkeydown : TJSKeyEventhandler;\r\n onkeypress : TJSKeyEventhandler;\r\n onkeyup : TJSKeyEventhandler;\r\n onlanguagechange : TJSEventhandler;\r\n onload : TJSEventhandler;\r\n onloadend : TJSLoadEventhandler;\r\n onloadstart : TJSLoadEventhandler;\r\n onmessage : TJSEventHandler;\r\n onmousedown : TJSMouseEventHandler;\r\n onmouseenter : TJSMouseEventHandler;\r\n onmouseleave : TJSMouseEventHandler;\r\n onmousemove : TJSMouseEventHandler;\r\n onmouseout : TJSMouseEventHandler;\r\n onmouseover : TJSMouseEventHandler;\r\n onmouseup : TJSMouseEventHandler;\r\n onmousewheel : TJSMouseEventHandler;\r\n onoffline : TJSEventHandler;\r\n ononline : TJSEventHandler;\r\n onpagehide : TJSPageTransitionEventHandler;\r\n onpageshow : TJSPageTransitionEventHandler;\r\n onpaint : TJSEventHandler;\r\n onpointercancel : TJSPointerEventHandler;\r\n onpointerdown : TJSPointerEventHandler;\r\n onpointerenter : TJSPointerEventHandler;\r\n onpointerleave : TJSPointerEventHandler;\r\n onpointermove : TJSPointerEventHandler;\r\n onpointerout : TJSPointerEventHandler;\r\n onpointerover : TJSPointerEventHandler;\r\n onpointerup : TJSPointerEventHandler;\r\n onpointerlockchange : TJSPointerEventHandler;\r\n onprogress : TJSProgressEventhandler;\r\n onpopstate : TJSPopStateEventHandler;\r\n onreset : TJSUIEventHandler;\r\n onresize : TJSUIEventHandler;\r\n onscroll : TJSUIEventHandler;\r\n onselect : TJSEventHandler;\r\n onselectionchange : TJSEventHandler;\r\n onstorage : TJSStorageEventHandler;\r\n onsubmit : TJSEventHandler;\r\n onunhandledrejection: TJSPromiseRejectionEventHandler;\r\n onunload : TJSUIEventHandler;\r\n touchstart : TJSTouchEventHandler;\r\n touchend : TJSTouchEventHandler;\r\n touchmove : TJSTouchEventHandler;\r\n touchcancel : TJSTouchEventHandler;\r\n Procedure alert(Const Msg : String);\r\n Function atob(Const aValue : string) : string;\r\n procedure blur;\r\n Procedure clearInterval(aID: NativeInt);\r\n Procedure clearTimeout(aID: NativeInt);\r\n Function btoa(Const aValue : string) : string;\r\n procedure cancelAnimationFrame(aHandle: Integer);\r\n Procedure close;\r\n Function confirm(Const aMsg : String) : boolean;\r\n function fetch(resource: String; init: TJSObject): TJSPromise; overload; external name 'fetch';\r\n //function fetch(resource: String): TJSPromise; overload; external name 'fetch';\r\n function fetch(resource: String): TJSResponse; {$IFNDEF SkipAsync}{$IFDEF PAS2JS}async;{$ENDIF}{$ENDIF} overload; external name 'fetch';\r\n function fetch(resource: TJSObject; init: TJSObject): TJSPromise; overload; external name 'fetch';\r\n function fetch(resource: TJSObject): TJSPromise; overload; external name 'fetch';\r\n function asyncfetch(resource: String): TJSResponse; {$IFNDEF SkipAsync}{$IFDEF PAS2JS}async;{$ENDIF}{$ENDIF} overload; external name 'fetch';\r\n function asyncfetch(resource: TJSObject; init: TJSObject): TJSResponse; {$IFNDEF SkipAsync}{$IFDEF PAS2JS}async;{$ENDIF}{$ENDIF} overload; external name 'fetch';\r\n function asyncfetch(resource: TJSObject): TJSResponse; {$IFNDEF SkipAsync}{$IFDEF PAS2JS}async;{$ENDIF}{$ENDIF} overload;external name 'fetch';\r\n procedure focus;\r\n Function getComputedStyle(aElement : TJSElement) : TJSCSSStyleDeclaration; overload;\r\n Function getComputedStyle(aElement,aPseudoElement : TJSElement) : TJSCSSStyleDeclaration; overload;\r\n function matchMedia(aQuery : String) : TJSMediaQueryList;\r\n procedure moveBy(x,y : NativeInt);\r\n procedure moveTo(x,y : NativeInt);\r\n function open : TJSWindow;\r\n function open(Const aURL : String) : TJSWindow; overload;\r\n function open(Const aURL,aTarget : String) : TJSWindow; overload;\r\n function open(Const aURL,aTarget : String; AOptions : TJSObject) : TJSWindow; overload;\r\n procedure postMessage(aMessage : JSValue);\r\n procedure postMessage(aMessage : JSValue; aOptions : TJSPostMessageOptions);\r\n procedure postMessage(aMessage : JSValue; aTransfer : TJSValueDynArray);\r\n procedure postMessage(aMessage : JSValue; aTarget : string);\r\n procedure postMessage(aMessage : JSValue; aTarget : string; aTransfer : TJSValueDynArray);\r\n procedure print;\r\n function prompt(const aMessage : String) : String; overload;\r\n function prompt(const aMessage,aDefault : String) : String; overload;\r\n function requestAnimationFrame(aCallback: TFrameRequestCallback): Integer;\r\n procedure resizeBy(aWidth,aHeight : NativeInt);\r\n procedure resizeTo(aWidth,aHeight : NativeInt);\r\n procedure scrollBy(x,y : NativeInt);\r\n procedure scrollTo(x,y : NativeInt);\r\n Function setInterval(ahandler : TJSTimerCallBack; aInterval : NativeUInt) : NativeInt; varargs;\r\n Function setTimeout(ahandler : TJSTimerCallBack; aTimeout : NativeUInt) : NativeInt; varargs;\r\n Function setTimeout(ahandler : TJSTimerCallBack) : NativeInt;\r\n procedure stop;\r\n procedure cancelIdleCallback(handle: NativeInt);\r\n function requestIdleCallback(handler: TIdleCallbackProc): NativeInt; overload;\r\n function requestIdleCallback(handler: TIdleCallbackProc; options: TJSIdleCallbackOptions): NativeInt; overload;\r\n function showOpenFilePicker: TJSFileSystemFileHandleArray; {$IFDEF PAS2JS} async; {$ENDIF} overload;\r\n function showOpenFilePicker(options: TJSShowOpenFilePickerOptions): TJSFileSystemFileHandleArray; {$IFDEF PAS2JS} async; {$ENDIF} overload;\r\n function showSaveFilePicker: TJSFileSystemFileHandle; {$IFDEF PAS2JS} async; {$ENDIF} overload;\r\n function showSaveFilePicker(options: TJSShowSaveFilePickerOptions): TJSFileSystemFileHandle; {$IFDEF PAS2JS} async; {$ENDIF} overload;\r\n function FileSystemDirectoryHandle: TJSFileSystemDirectoryHandleArray; {$IFDEF PAS2JS} async; {$ENDIF}\r\n { public properties }\r\n property console : TJSConsole Read FConsole;\r\n property closed : boolean read FClosed;\r\n property crypto : TJSCrypto Read FCrypto;\r\n property devicePixelRatio : Double read FDevicePixelRatio;\r\n property document : TJSDocument read FDocument;\r\n property frameElement : TJSElement Read FFrameElement;\r\n Property frames : TJSWindowArray read FFrames;\r\n Property history : TJSHistory read FHistory;\r\n Property indexedDB : TJSIDBFactory read FIndexedDB;\r\n Property innerHeight : NativeInt Read FInnerheight;\r\n Property innerWidth : NativeInt Read FInnerWidth;\r\n Property length : NativeInt Read FLength;\r\n Property localStorage : TJSStorage Read FLocalStorage;\r\n property location : TJSLocation Read FLocation;\r\n Property locationString : String read FLocationString write FLocationString;\r\n property locationbar : TJSLocationBar Read FLocationBar;\r\n property menubar : TJSMenuBar Read FMenuBar;\r\n property navigator : TJSNavigator Read FNavigator;\r\n property opener : TJSWindow read FOpener;\r\n Property outerHeight : NativeInt Read FOuterheight;\r\n Property outerWidth : NativeInt Read FOuterWidth;\r\n Property parent : TJSWindow Read FParent;\r\n Property Performance : TJSPerformance Read FPerformance;\r\n property personalbar : TJSPersonalBar Read FPersonalBar;\r\n property screen : TJSScreen read FScreen;\r\n property screenX : NativeInt read FScreenX;\r\n Property screenY : NativeInt read FScreenY;\r\n Property scrollbar : TJSScrollBars Read FScrollbar;\r\n property scrollX : NativeInt read FScrollX;\r\n Property scrollY : NativeInt read FScrollY;\r\n Property _Self : TJSWindow read FSelf;\r\n Property sessionStorage : TJSStorage Read FSessionStorage;\r\n property toolbar : TJSToolBar Read FToolBar;\r\n property top : TJSWindow Read FTop;\r\n property URL : TJSURL Read FURL;\r\n end;\r\n\r\n { TJSCSSStyleDeclaration }\r\n\r\n TJSCSSStyleDeclaration = class {$IFDEF PAS2JS} external name 'CSSStyleDeclaration' {$ENDIF}(TJSObject)\r\n private\r\n FLength: NativeInt; external name 'length';\r\n FParentRule: TJSCSSRule; external name 'parentRule';\r\n public\r\n cssText : string;\r\n function item(aIndex : Integer) : string;\r\n function removeProperty(const aProperty : String) : string;\r\n function getPropertyPriority(const aProperty : String) : string;\r\n function getPropertyValue(const aProperty : String) : string;\r\n procedure setProperty(const aProperty,aValue : String);overload;\r\n procedure setProperty(const aProperty,aValue,aPriority : string); overload;\r\n property length : NativeInt read FLength;\r\n property parentRule : TJSCSSRule read FParentRule;\r\n end;\r\n\r\n TJSScrollIntoViewOptions = class {$IFDEF PAS2JS} external name 'Object' {$ENDIF}(TJSObject)\r\n behaviour : string;\r\n block : string;\r\n inline_ : string; external name 'inline';\r\n end;\r\n\r\n\r\n { TJSHTMLElement }\r\n\r\n TJSHTMLElement = class {$IFDEF PAS2JS} external name 'HTMLElement' {$ENDIF}(TJSElement)\r\n private\r\n FDataset: TJSObject ; external name 'dataset';\r\n FIsContentEditable: Boolean ; external name 'isContentEditable';\r\n FOffsetHeight: Double; external name 'offsetHeight';\r\n FOffsetLeft: Double; external name 'offsetLeft';\r\n FOffsetParent: TJSElement; external name 'offsetParent';\r\n FOffsetTop: Double; external name 'offsetTop';\r\n FOffsetWidth: Double; external name 'offsetWidth';\r\n Public\r\n accessKey : string;\r\n contentEditable : string;\r\n dir : string;\r\n draggable : boolean;\r\n hidden : boolean;\r\n lang : string;\r\n spellcheck : boolean;\r\n style : TJSCSSStyleDeclaration;\r\n tabIndex : Integer;\r\n title: string;\r\n onabort : TJSEventHandler;\r\n onanimationcancel: THTMLAnimationEventHandler;\r\n onanimationend: THTMLAnimationEventHandler;\r\n onblur : TJSEventHandler;\r\n oncancel : TJSEventHandler;\r\n oncanplay : TJSEventHandler;\r\n oncanplaythrough : TJSEventHandler;\r\n onchange : TJSEventHandler;\r\n onclick: THTMLClickEventHandler;\r\n onclose : TJSEventHandler;\r\n oncontextmenu : TJSEventHandler;\r\n ondblclick : THTMLClickEventHandler;\r\n ondrag : TJSDragDropEventHandler;\r\n ondragend : TJSDragDropEventHandler;\r\n ondragenter : TJSDragDropEventHandler;\r\n ondragexit : TJSDragDropEventHandler;\r\n ondragover : TJSDragDropEventHandler;\r\n ondragleave : TJSDragDropEventHandler;\r\n ondragstart: TJSDragDropEventHandler;\r\n ondrop : TJSDragDropEventHandler;\r\n onerror : TJSErrorEventHandler;\r\n onfocus : TJSFocusEventhandler;\r\n ondurationchange : TJSEventHandler;\r\n onemptied : TJSEventHandler;\r\n onended : TJSEventHandler;\r\n ongotpointercapture : TJSPointerEventHandler;\r\n oninput : TJSEventhandler;\r\n oninvalid : TJSEventhandler;\r\n onkeydown : TJSKeyEventhandler;\r\n onkeypress : TJSKeyEventhandler;\r\n onkeyup : TJSKeyEventhandler;\r\n onload : TJSEventhandler;\r\n onloadeddata : TJSEventhandler;\r\n onloadedmetadata : TJSEventhandler;\r\n onloadend : TJSLoadEventhandler;\r\n onloadstart : TJSLoadEventhandler;\r\n onlostpointercapture : TJSPointerEventHandler;\r\n onmousedown : TJSMouseEventHandler;\r\n onmouseenter : TJSMouseEventHandler;\r\n onmouseleave : TJSMouseEventHandler;\r\n onmousemove : TJSMouseEventHandler;\r\n onmouseout : TJSMouseEventHandler;\r\n onmouseover : TJSMouseEventHandler;\r\n onmouseup : TJSMouseEventHandler;\r\n onmousewheel : TJSMouseEventHandler;\r\n onpause : TJSPointerEventHandler;\r\n onplay : TJSPointerEventHandler;\r\n onplaying : TJSPointerEventHandler;\r\n onpointercancel : TJSPointerEventHandler;\r\n onpointerdown : TJSPointerEventHandler;\r\n onpointerenter : TJSPointerEventHandler;\r\n onpointerleave : TJSPointerEventHandler;\r\n onpointermove : TJSPointerEventHandler;\r\n onpointerout : TJSPointerEventHandler;\r\n onpointerover : TJSPointerEventHandler;\r\n onpointerup : TJSPointerEventHandler;\r\n onpointerlockchange : TJSPointerEventHandler;\r\n onprogress : TJSProgressEventhandler;\r\n onseeked : TJSEventHandler;\r\n onseeking : TJSEventHandler;\r\n onreset : TJSUIEventHandler;\r\n onscroll : TJSUIEventHandler;\r\n onselect : TJSEventHandler;\r\n onselectstart : TJSEventHandler;\r\n onselectionchange : TJSEventHandler;\r\n onshow : TJSEventHandler;\r\n onstalled : TJSEventHandler;\r\n ontimeupdate : TJSEventHandler;\r\n ontransitioncancel : TJSEventHandler;\r\n ontransitionend : TJSEventHandler;\r\n onvolumechange : TJSEventHandler;\r\n onsubmit : TJSEventHandler;\r\n onwheel : TJSMouseWheelEventHandler;\r\n onwaiting : TJSEventHandler;\r\n touchstart : TJSTouchEventHandler;\r\n touchend : TJSTouchEventHandler;\r\n touchmove : TJSTouchEventHandler;\r\n touchcancel : TJSTouchEventHandler;\r\n Procedure blur;\r\n Procedure focus;\r\n Procedure click;\r\n procedure scrollIntoView; overload;\r\n procedure scrollIntoView(alignToTop : Boolean);\r\n procedure scrollIntoView(aObj : TJSObject);\r\n procedure scrollIntoView(Opts: TJSScrollIntoViewOptions);\r\n property dataset : TJSObject read FDataset;\r\n property isContentEditable : Boolean read FIsContentEditable;\r\n property offsetHeight : Double Read FOffsetHeight;\r\n property offsetLeft : Double Read FOffsetLeft;\r\n property offsetTop : Double Read FOffsetTop;\r\n property offsetWidth : Double Read FOffsetWidth;\r\n property offsetParent : TJSElement Read FOffsetParent;\r\n end;\r\n TJSHTMLElementArray = Array of TJSHTMLElement;\r\n\r\n TJSHTMLDivElement = class {$IFDEF PAS2JS} external name 'HTMLDivElement' {$ENDIF}(TJSHTMLElement)\r\n end;\r\n\r\n TJSHTMLFormControlsCollection = class {$IFDEF PAS2JS} external name 'HTMLFormControlsCollection' {$ENDIF}(TJSHTMLCollection)\r\n Public\r\n function namedItem(S : String) : TJSElement; reintroduce; external name 'namedItem';\r\n property Items[S : String] : TJSElement read namedItem; default;\r\n end;\r\n\r\n { TJSHTMLFormElement }\r\n\r\n TJSHTMLFormElement = class {$IFDEF PAS2JS} external name 'HTMLFormElement' {$ENDIF}(TJSHTMLElement)\r\n private\r\n FElements: TJSHTMLFormControlsCollection; external name 'elements';\r\n FLength: NativeInt; external name 'length';\r\n Public\r\n Procedure reset;\r\n function reportValidity : Boolean;\r\n function checkValidity : Boolean;\r\n procedure submit;\r\n method : string;\r\n target : string;\r\n action : string;\r\n encoding : string;\r\n enctype : string;\r\n acceptCharset : string;\r\n autocomplete : string;\r\n noValidate : boolean;\r\n property elements : TJSHTMLFormControlsCollection read FElements;\r\n Property length : NativeInt Read FLength;\r\n end;\r\n\r\n { TJSValidityState }\r\n\r\n TJSValidityState = class {$IFDEF PAS2JS} external name 'ValidityState' {$ENDIF}(TJSObject)\r\n private\r\n FBadInput: Boolean; external name 'badInput';\r\n FCustomError: Boolean; external name 'customError';\r\n FPatternMismatch: Boolean; external name 'patternMisMatch';\r\n FRangeOverflow: Boolean; external name 'rangeOverflow';\r\n FRangeUnderflow: Boolean; external name 'rangeUnderflow';\r\n FStepMismatch: Boolean; external name 'stepMismatch';\r\n FTooLong: Boolean; external name 'tooLong';\r\n FTooShort: Boolean; external name 'tooShort';\r\n FTypeMismatch: Boolean; external name 'typeMisMatch';\r\n FValid: Boolean; external name 'valid';\r\n FValueMissing: Boolean; external name 'valueMissing';\r\n public\r\n property badInput : Boolean read FBadInput;\r\n property customError : Boolean read FCustomError;\r\n property patternMisMatch : Boolean read FPatternMismatch;\r\n property rangeOverflow : Boolean read FRangeOverflow;\r\n property rangeUnderflow : Boolean read FRangeUnderflow;\r\n property stepMismatch : Boolean read FStepMismatch;\r\n property tooLong : Boolean read FTooLong;\r\n property tooShort : Boolean read FTooShort;\r\n property typeMisMatch : Boolean read FTypeMismatch;\r\n property valid : Boolean Read FValid;\r\n property valueMissing : Boolean read FValueMissing;\r\n end;\r\n\r\n { TJSBlobPropertyBag }\r\n\r\n TJSBlobPropertyBag = class(TJSObject)\r\n private\r\n FEndings: string; external name 'endings';\r\n FType: string; external name 'type';\r\n public\r\n constructor Create(aType: string); overload;\r\n constructor Create(aType, aEndings: string); overload;\r\n property endings: string read FEndings write FEndings;\r\n property &type: string read FType write FType;\r\n end;\r\n\r\n { TJSBlob }\r\n\r\n TJSBlob = class {$IFDEF PAS2JS} external name 'Blob' {$ENDIF}(TJSEventTarget)\r\n private\r\n FSize: NativeInt; external name 'size';\r\n FType: string; external name 'type';\r\n Public\r\n constructor new(aBlobParts: array of JSValue); overload;\r\n constructor new(aBlobParts: array of JSValue; aOptions: TJSBlobPropertyBag); overload;\r\n procedure close;\r\n function slice : TJSBlob; overload;\r\n function slice(aStart : NativeInt) : TJSBlob; overload;\r\n function slice(aStart,aEnd : NativeInt) : TJSBlob; overload;\r\n function slice(aStart,aEnd : NativeInt; AContentType : String) : TJSBlob; overload;\r\n function arrayBuffer : TJSPromise;\r\n property size : NativeInt read FSize;\r\n property _type : string read FType; deprecated;\r\n property type_ : string read FType;\r\n end;\r\n\r\n { TJSHTMLFile }\r\n\r\n TJSHTMLFile = class {$IFDEF PAS2JS} external name 'File' {$ENDIF}(TJSBlob)\r\n private\r\n FLastModified: NativeInt; external name 'lastModified';\r\n FLastModifiedDate: TJSDate; external name 'lastModifiedDate';\r\n FName: string; external name 'name';\r\n public\r\n property lastModified: NativeInt read FLastModified;\r\n property lastModifiedDate : TJSDate read FLastModifiedDate; deprecated;\r\n property name: String read FName;\r\n end;\r\n\r\n { TJSHTMLFileList }\r\n\r\n TJSHTMLFileList = class {$IFDEF PAS2JS} external name 'FileList' {$ENDIF}(TJSEventTarget)\r\n private\r\n FLength: NativeInt; external name 'length';\r\n Public\r\n function item(aIndex : NativeInt) : TJSHTMLFile;\r\n property length : NativeInt read FLength;\r\n property Files[aIndex : NativeInt] : TJSHTMLFile Read item; default;\r\n end;\r\n\r\n { TJSHTMLInputElement }\r\n // https://html.spec.whatwg.org/multipage/forms.html#the-input-element\r\n\r\n TJSHTMLInputElement = class {$IFDEF PAS2JS} external name 'HTMLInputElement' {$ENDIF}(TJSHTMLElement)\r\n private\r\n FFiles: TJSHTMLFileList; external name 'files';\r\n FForm: TJSHTMLFormElement; external name 'form';\r\n FLabels: TJSNodeList; external name 'labels';\r\n FList: TJSHTMLElement; external name 'list';\r\n FValidationmMessage: string; external name 'validationMessage';\r\n FValidity: TJSValidityState; external name 'validity';\r\n FWillValidate: boolean; external name 'willValidate';\r\n Public\r\n procedure select;\r\n procedure setCustomValidity(aText : string);\r\n procedure stepUp; overload;\r\n procedure stepUp(n : Integer); overload;\r\n function checkValidity : Boolean;\r\n function reportValidity : Boolean;\r\n procedure setSelectionRange(selectionStart, selectionEnd: NativeInt) ; overload;\r\n procedure setSelectionRange(selectionStart, selectionEnd: NativeInt; Direction : string) ; overload;\r\n procedure setRangeText(aText : string; selectionStart, selectionEnd: NativeInt) ; overload;\r\n procedure setRangeText(aText : string; selectionStart, selectionEnd: NativeInt; Direction : string) ; overload;\r\n Public\r\n accept : string;\r\n allowDirs : boolean;\r\n align : string;\r\n alt : string;\r\n autofocus : boolean;\r\n autocapitalize : string;\r\n autocomplete : string;\r\n defaultValue : string;\r\n defaultChecked : string;\r\n checked : boolean;\r\n dirName : string;\r\n disabled : boolean;\r\n formAction : string;\r\n formEncType : string;\r\n formMethod : string;\r\n formNoValidate : Boolean;\r\n formTarget : string;\r\n height : string;\r\n indeterminate : boolean;\r\n inputMode : string;\r\n max : string;\r\n maxLength : NativeInt;\r\n min : string;\r\n minLength : NativeInt;\r\n multiple : boolean;\r\n pattern : string;\r\n placeholder : string;\r\n readOnly : boolean;\r\n required : boolean;\r\n size : NativeInt;\r\n src : string;\r\n step : string;\r\n _type : string; external name 'type';\r\n selectionStart : NativeInt;\r\n selectionEnd : NativeInt;\r\n selectionDirection : string;\r\n useMap : string;\r\n value : string;\r\n width : string;\r\n property files : TJSHTMLFileList Read FFiles;\r\n property form : TJSHTMLFormElement read FForm;\r\n property labels : TJSNodeList read FLabels;\r\n property list : TJSHTMLElement Read FList;\r\n property validationMessage : string read FValidationmMessage;\r\n property willValidate : boolean read FWillValidate;\r\n property validity : TJSValidityState read FValidity;\r\n end;\r\n\r\n TJSDOMSettableTokenList = class {$IFDEF PAS2JS} external name 'DOMSettableTokenList' {$ENDIF}(TJSDOMTokenList)\r\n private\r\n fvalue: TJSDOMString; external name 'value';\r\n public\r\n property value: TJSDOMString read fvalue; // readonly\r\n end;\r\n\r\n TJSHTMLOutputElement = class {$IFDEF PAS2JS} external name 'HTMLOutputElement' {$ENDIF}(TJSHTMLElement)\r\n private\r\n flabels: TJSNodeList; external name 'labels';\r\n fform: TJSHTMLFormElement; external name 'form';\r\n ftype: TJSDOMString; external name 'type';\r\n fdefaultValue: TJSDOMString; external name 'defaultValue';\r\n fvalue: TJSDOMString; external name 'value';\r\n fwillValidate: Boolean; external name 'willValidate';\r\n fvalidity: TJSValidityState; external name 'validity';\r\n fvalidationMessage: TJSDOMString; external name 'validationMessage';\r\n public\r\n htmlFor: TJSDOMSettableTokenList;\r\n function checkValidity: Boolean;\r\n function reportValidity: Boolean;\r\n procedure setCustomValidity(error: TJSDOMString);\r\n public\r\n property labels: TJSNodeList read flabels;\r\n property form: TJSHTMLFormElement read fform;\r\n property type_: TJSDOMString read ftype;\r\n property defaultValue: TJSDOMString read fdefaultValue;\r\n property value: TJSDOMString read fvalue write fvalue;\r\n property willValidate: Boolean read fwillValidate;\r\n property validity: TJSValidityState read fvalidity;\r\n property validationMessage: TJSDOMString read fvalidationMessage;\r\n end;\r\n\r\n { TJSHTMLImageElement }\r\n\r\n TJSHTMLImageElement = class {$IFDEF PAS2JS} external name 'Image' {$ENDIF}(TJSHTMLElement)\r\n Private\r\n FComplete: boolean; external name 'complete';\r\n FCurrentSrc: String; external name 'currentSrc';\r\n FNaturalHeight: NativeUInt; external name 'naturalHeight';\r\n FNaturalWidth: NativeUInt; external name 'naturalWidth';\r\n FX: NativeInt; external name 'x';\r\n FY: NativeInt; external name 'y';\r\n Public\r\n constructor New(x,y : Cardinal); overload;\r\n alt: String;\r\n crossOrigin: String;\r\n decoding: String;\r\n height: NativeUInt;\r\n isMap: boolean;\r\n referrerPolicy: String;\r\n src: String;\r\n sizes: String;\r\n srcset: String;\r\n useMap: String;\r\n width: NativeUInt;\r\n function decode : TJSPromise;\r\n property complete: boolean read FComplete;\r\n property currentSrc: String read FCurrentSrc;\r\n property naturalHeight: NativeUInt read FNaturalHeight;\r\n property naturalWidth: NativeUInt read FNaturalWidth;\r\n property x: NativeInt read FX;\r\n property y: NativeInt read FY;\r\n end;\r\n\r\n TJSHTMLLinkElement = class {$IFDEF PAS2JS} external name 'HTMLLinkElement' {$ENDIF}(TJSHTMLElement)\r\n Private\r\n frelList: TJSDOMTokenList; external name 'relList';\r\n fsizes: TJSDOMSettableTokenList {TJSDOMTokenList}; external name 'sizes';\r\n Public\r\n href: string;\r\n crossOrigin: string;\r\n rel: string;\r\n as_: string; external name 'as';\r\n media: string;\r\n integrity: string;\r\n hreflang: string;\r\n type_: string external name 'type';\r\n imageSrcset: string;\r\n imageSizes: string;\r\n referrerPolicy: string;\r\n disabled: string;\r\n charset: string deprecated; // obsolete\r\n rev: string deprecated; // obsolete property\r\n target: string deprecated; // obsolete property\r\n Property relList: TJSDOMTokenList read frelList;\r\n Property sizes: TJSDOMSettableTokenList{TJSDOMTokenList} read fsizes;\r\n end;\r\n\r\n { TJSHTMLAnchorElement }\r\n\r\n TJSHTMLAnchorElement = class {$IFDEF PAS2JS} external name 'HTMLAnchorElement' {$ENDIF}(TJSHTMLElement)\r\n Private\r\n FOrigin: string;external name 'origin';\r\n frelList: TJSDOMTokenList; external name 'relList';\r\n Public\r\n href: string;\r\n download: string;\r\n hash: string;\r\n host: string;\r\n hostname: string;\r\n hreflang: string;\r\n media: string ;\r\n password: string;\r\n Protocol: string;\r\n referrerPolicy : string;\r\n rel: string ;\r\n rev: string deprecated; // obsolete property\r\n target: string ;\r\n text : string;\r\n type_ : string external name 'type';\r\n username : string;\r\n Property relList: TJSDOMTokenList read frelList;\r\n Property origin: string Read FOrigin;\r\n end;\r\n\r\n { TJSHTMLMenuElement }\r\n\r\n TJSHTMLMenuElement = class {$IFDEF PAS2JS} external name 'HTMLMenuElement' {$ENDIF}(TJSHTMLElement) // uhm... should it be declared? it is experimental at Mozilla docs...\r\n end;\r\n\r\n { TJSHTMLButtonElement }\r\n\r\n TJSHTMLButtonElement = class {$IFDEF PAS2JS} external name 'HTMLButtonElement' {$ENDIF}(TJSHTMLElement)\r\n private\r\n FForm: TJSHTMLFormElement; external name 'form';\r\n FLabels: TJSNodeList; external name 'labels';\r\n FValidationmMessage: String; external name 'validationMessage';\r\n FValidity: TJSValidityState; external name 'validity';\r\n FWillValidate: boolean; external name 'willValidate';\r\n Public\r\n autofocus : boolean;\r\n disabled : boolean;\r\n formAction : String;\r\n formEnctype : String;\r\n formMethod : String;\r\n formNoValidate : Boolean;\r\n formTarget : String;\r\n menu: TJSHTMLMenuElement;\r\n _type : String; external name 'type';\r\n value : string;\r\n Public\r\n property form : TJSHTMLFormElement Read FForm;\r\n property labels : TJSNodeList Read FLabels;\r\n property validationMessage : String Read FValidationmMessage;\r\n property validity : TJSValidityState Read FValidity;\r\n property willValidate : boolean read FWillValidate;\r\n end;\r\n\r\n TJSHTMLLabelElement = class {$IFDEF PAS2JS} external name 'HTMLLabelElement' {$ENDIF}(TJSHTMLElement)\r\n Private\r\n FForm: TJSHTMLFormElement; external name 'form';\r\n FControl : TJSHTMLElement; external name 'control';\r\n Public\r\n For_ : String; external name 'htmlFor';\r\n property Control : TJSHTMLElement Read FControl;\r\n property Form : TJSHTMLFormElement read FForm;\r\n end;\r\n\r\n { TJSHTMLTextAreaElement }\r\n\r\n TJSHTMLTextAreaElement = class {$IFDEF PAS2JS} external name 'HTMLTextAreaElement' {$ENDIF}(TJSHTMLElement)\r\n private\r\n FForm: TJSHTMLFormElement; external name 'form';\r\n FTextLength: NativeInt; external name 'textKength';\r\n FType: String; external name 'type';\r\n FValidationMessage: String; external name 'validationMessage';\r\n FValidity: TJSValidityState; external name 'validity';\r\n FWillValidate: boolean; external name 'willValidate';\r\n Public\r\n defaultValue : string;\r\n value : string;\r\n rows : cardinal;\r\n cols : cardinal;\r\n autofocus : boolean;\r\n disabled : boolean;\r\n maxLength : nativeInt;\r\n readOnly : Boolean;\r\n required : Boolean;\r\n selectionStart : Cardinal;\r\n selectionEnd : Cardinal;\r\n selectionDirection : String;\r\n wrap : string;\r\n Property Form : TJSHTMLFormElement Read FForm;\r\n Property Type_: String Read FType;\r\n Property textLength : NativeInt Read FTextLength;\r\n Property validity : TJSValidityState Read FValidity;\r\n property willValidate : boolean read FWillValidate;\r\n property validationMessage : String Read FValidationMessage;\r\n end;\r\n\r\n { TJSHTMLEmbedElement }\r\n\r\n TJSHTMLEmbedElement = class {$IFDEF PAS2JS} external name 'HTMLEmbedElement' {$ENDIF}(TJSHTMLElement)\r\n Public\r\n height: String;\r\n src: String;\r\n _type : String; external name 'type';\r\n width: String;\r\n end;\r\n\r\n { TJSHTMLOptionElement }\r\n\r\n TJSHTMLOptionElement = class {$IFDEF PAS2JS} external name 'Option' {$ENDIF}(TJSHTMLElement)\r\n private\r\n FForm: TJSHTMLFormElement; external name 'form';\r\n FIndex: NativeInt; external name 'index';\r\n Public\r\n Constructor New; overload;\r\n Constructor New(aText : String); overload;\r\n Constructor New(aText,aValue : String); overload;\r\n Constructor New(aText,aValue : String; aDefaultSelected : Boolean); overload;\r\n Constructor New(aText,aValue : String; aDefaultSelected,Selected : Boolean); overload;\r\n Public\r\n defaultSelected : boolean;\r\n disabled : boolean;\r\n _label : string ; external name 'label';\r\n selected : boolean;\r\n text : string;\r\n value : string;\r\n property index : NativeInt Read FIndex;\r\n property form : TJSHTMLFormElement Read FForm;\r\n end;\r\n\r\n TJSHTMLOptGroupElement = class {$IFDEF PAS2JS} external name 'HTMLOptGroupElement' {$ENDIF}(TJSHTMLElement)\r\n end;\r\n\r\n TJSHTMLOptionsCollection = class {$IFDEF PAS2JS} external name 'HTMLOptionsCollection' {$ENDIF}(TJSHTMLCollection)\r\n end;\r\n\r\n { TJSHTMLSelectElement }\r\n\r\n TJSHTMLSelectElement = class {$IFDEF PAS2JS} external name 'HTMLSelectElement' {$ENDIF}(TJSHTMLElement)\r\n private\r\n FForm: TJSHTMLFormElement; external name 'form';\r\n FLabels: TJSNodeList; external name 'labels';\r\n FLength: NativeInt; external name 'length';\r\n FOptions: TJSHTMLOptionsCollection; external name 'options';\r\n FSelectedOptions: TJSHTMLCollection; external name 'selectedOptions';\r\n FType: String; external name 'type';\r\n FValue: String; external name 'value';\r\n FValidationMessage: string; external name 'validationMessage';\r\n FValidity: TJSValidityState; external name 'validity';\r\n fwillValidate: Boolean; external name 'willValidate';\r\n Public\r\n Procedure add(anItem : TJSHTMLOptionElement); overload;\r\n Procedure add(anItem, before : TJSHTMLOptionElement); overload;\r\n function item(aIndex : NativeInt): TJSHTMLOptionElement;\r\n function namedItem(aName : String): TJSHTMLOptionElement;\r\n procedure remove(aIndex : NativeInt); overload;\r\n procedure checkValidity;\r\n procedure setCustomValidity(aMessage : String);\r\n Public\r\n autofocus : Boolean;\r\n disabled : Boolean;\r\n multiple : boolean;\r\n required: boolean;\r\n selectedIndex : NativeInt;\r\n size : NativeInt;\r\n property length : NativeInt read FLength;\r\n Property options : TJSHTMLOptionsCollection read FOptions;\r\n Property selectedOptions : TJSHTMLCollection read FSelectedOptions;\r\n Property form : TJSHTMLFormElement read FForm;\r\n property labels : TJSNodeList Read FLabels;\r\n property _type : String Read FType;\r\n property validity : TJSValidityState Read FValidity;\r\n property validationMessage : string Read FValidationMessage;\r\n property willValidate : Boolean read fwillValidate;\r\n property value: string read FValue write FValue;\r\n end;\r\n\r\n { TJSHTMLTableElement }\r\n\r\n TJSHTMLTableSectionElement = class;\r\n TJSHTMLTableRowElement = class;\r\n\r\n TJSHTMLTableElement = class {$IFDEF PAS2JS} external name 'HTMLTableElement' {$ENDIF}(TJSHTMLElement)\r\n private\r\n FAlign: String; external name 'align';\r\n FBGColor: String; external name 'bgColor';\r\n FBorder: String; external name 'border';\r\n FCaption: TJSHTMLElement; external name 'caption';\r\n FCellPadding: String; external name 'cellPadding';\r\n FCellSpacing: String; external name 'cellSpacing';\r\n FFrame: String; external name 'frame';\r\n FRows: TJSHTMLCollection; external name 'rows';\r\n FRules: String; external name 'rules';\r\n FSummary: String; external name 'summary';\r\n FTBodies: TJSHTMLCollection; external name 'tBodies';\r\n FTfoot: TJSHTMLTableSectionElement; external name 'tfoot';\r\n FTHead: TJSHTMLTableSectionElement; external name 'tHead';\r\n FWidth: String; external name 'width';\r\n public\r\n { Methods }\r\n function createCaption: TJSHTMLElement;\r\n function createTFoot: TJSHTMLTableSectionElement;\r\n function createTHead: TJSHTMLTableSectionElement;\r\n function createTBody: TJSHTMLTableSectionElement;\r\n procedure deleteCaption;\r\n procedure deleteRow(index: Integer);\r\n procedure deleteTFoot;\r\n procedure deleteTHead;\r\n function insertRow(index: Integer): TJSHTMLTableRowElement;\r\n { Properties }\r\n property align: String read FAlign write FAlign;\r\n property bgColor: String read FBGColor write FBGColor;\r\n property border: String read FBorder write FBorder;\r\n property caption: TJSHTMLElement read FCaption;\r\n property cellPadding: String read FCellPadding write FCellPadding;\r\n property cellSpacing: String read FCellSpacing write FCellSpacing;\r\n property frame: String read FFrame write FFrame;\r\n property rows: TJSHTMLCollection read FRows;\r\n property rules: String read FRules write FRules;\r\n property summary: String read FSummary write FSummary;\r\n property tBodies: TJSHTMLCollection read FTBodies;\r\n property tfoot: TJSHTMLTableSectionElement read FTfoot;\r\n property tHead: TJSHTMLTableSectionElement read FTHead;\r\n property width: String read FWidth write FWidth;\r\n end;\r\n\r\n { TJSHTMLTableSectionElement }\r\n\r\n TJSHTMLTableSectionElement = class {$IFDEF PAS2JS} external name 'HTMLTableSectionElement' {$ENDIF}(TJSHTMLElement)\r\n private\r\n Falign: String; external name 'align';\r\n Frows: TJSHTMLCollection external name 'rows';\r\n Fch: String; external name 'ch';\r\n FchOff: String; external name 'chOff';\r\n FvAlign: String; external name 'vAlign';\r\n public\r\n { Methods }\r\n procedure deleteRow(index: Integer);\r\n function insertRow(index: Integer): TJSHTMLTableRowElement;\r\n { Properties }\r\n property align: String read Falign write Falign;\r\n property rows: TJSHTMLCollection read Frows;\r\n property ch: String read Fch write Fch;\r\n property chOff: String read FchOff write FchOff;\r\n property vAlign: String read FvAlign write FvAlign;\r\n end;\r\n\r\n { TJSHTMLTableCellElement }\r\n\r\n TJSHTMLTableCellElement = class {$IFDEF PAS2JS} external name 'HTMLTableCellElement' {$ENDIF}(TJSHTMLElement)\r\n private\r\n Fabbr: String; external name 'abbr';\r\n Falign: String; external name 'align';\r\n Faxis: String; external name 'axis';\r\n FbgColor: String; external name 'bgColor';\r\n FcellIndex: Integer; external name 'cellIndex';\r\n Fch: String; external name 'ch';\r\n FchOff: String; external name 'chOff';\r\n FcolSpan: Integer; external name 'colSpan';\r\n Fheaders: String; external name 'headers';\r\n Fheight: String; external name 'height';\r\n FnoWrap: Boolean; external name 'noWrap';\r\n FrowSpan: Integer; external name 'rowSpan';\r\n Fscope: String; external name 'scope';\r\n FvAlign: String; external name 'vAlign';\r\n Fwidth: String; external name 'width';\r\n public\r\n { Properties }\r\n property abbr: String read Fabbr write Fabbr;\r\n property align: String read Falign write Falign;\r\n property axis: String read Faxis write Faxis;\r\n property bgColor: String read FbgColor write FbgColor;\r\n property cellIndex: Integer read FcellIndex;\r\n property ch: String read Fch write Fch;\r\n property chOff: String read FchOff write FchOff;\r\n property colSpan: Integer read FcolSpan write FcolSpan;\r\n property headers: String read Fheaders;\r\n property height: String read Fheight write Fheight;\r\n property noWrap: Boolean read FnoWrap write FnoWrap;\r\n property rowSpan: Integer read FrowSpan write FrowSpan;\r\n property scope: String read Fscope write Fscope;\r\n property vAlign: String read FvAlign write FvAlign;\r\n property width: String read Fwidth write Fwidth;\r\n end;\r\n\r\n { TJSHTMLTableRowElement }\r\n\r\n TJSHTMLTableRowElement = class {$IFDEF PAS2JS} external name 'HTMLTableRowElement' {$ENDIF}(TJSHTMLElement)\r\n private\r\n Falign: String; external name 'align';\r\n FbgColor: String; external name 'bgColor';\r\n Fcells: TJSHTMLCollection; external name 'cells';\r\n Fch: String; external name 'ch';\r\n FchOff: String; external name 'chOff';\r\n FrowIndex: Integer; external name 'rowIndex';\r\n FsectionRowIndex: Integer; external name 'sectionRowIndex';\r\n FvAlign: String; external name 'vAlign';\r\n public\r\n { Methods }\r\n procedure deleteCell(index: Integer);\r\n function insertCell(index: Integer): TJSHTMLTableCellElement;\r\n { Properties }\r\n property align: String read Falign write Falign;\r\n property bgColor: String read FbgColor write FbgColor;\r\n property cells: TJSHTMLCollection read Fcells;\r\n property ch: String read Fch write Fch;\r\n property chOff: String read FchOff write FchOff;\r\n property rowIndex: Integer read FrowIndex;\r\n property sectionRowIndex: Integer read FsectionRowIndex;\r\n property vAlign: String read FvAlign write FvAlign;\r\n end;\r\n\r\n { TJSHTMLTableDataCellElement }\r\n\r\n TJSHTMLTableDataCellElement = class {$IFDEF PAS2JS} external name 'HTMLTableDataCellElement' {$ENDIF}(TJSHTMLElement)\r\n private\r\n Fabbr: String; external name 'abbr';\r\n public\r\n { Properties }\r\n property abbr: String read Fabbr write Fabbr;\r\n end;\r\n\r\n\r\n TJSCanvasRenderingContext2D = Class;\r\n\r\n THTMLCanvasToBlobCallback = Reference to function (aBlob : TJSBlob) : boolean; {$IFDEF PAS2JS} safecall; {$ENDIF}\r\n\r\n TJSHTMLCanvasElement = class {$IFDEF PAS2JS} external name 'HTMLCanvasElement' {$ENDIF}(TJSHTMLElement)\r\n Public\r\n height : integer;\r\n width : integer;\r\n Function getContext(contextType : string) : TJSObject;\r\n Function getContext(contextType : string; contextAttributes : TJSObject) : TJSObject;\r\n Function getContextAs2DContext(contextType : string; contextAttributes : TJSObject) : TJSCanvasRenderingContext2D; external name 'getContext';\r\n Function getContextAs2DContext(contextType : string) : TJSCanvasRenderingContext2D; external name 'getContext';\r\n Procedure toBlob (aCallBack : THTMLCanvasToBlobCallback; aMimeType : String); overload;\r\n Procedure toBlob (aCallBack : THTMLCanvasToBlobCallback; aMimeType : String; aQuality : Double); overload;\r\n Function toDataURL : String; overload;\r\n Function toDataURL(aMimeType : String) : String; overload;\r\n Function toDataURL(aMimeType : String; aQuality : Double) : String; overload;\r\n end;\r\n\r\n TJSHTMLProgressElement = class {$IFDEF PAS2JS} external name 'HTMLProgressElement' {$ENDIF}(TJSHTMLElement)\r\n private\r\n Fposition: Double; external name 'position';\r\n Flabels: TJSNodeList; external name 'labels';\r\n public\r\n max: Double;\r\n value: Double;\r\n property position: Double read Fposition;\r\n property labels: TJSNodeList read Flabels;\r\n end;\r\n Type\r\n\r\n { TJSDOMException }\r\n\r\n TJSDOMException = class {$IFDEF PAS2JS} external name 'DOMException' {$ENDIF}(TJSObject)\r\n private\r\n FCode: Integer; external name 'code';\r\n FMessage: String; external name 'message';\r\n FName: string; external name 'name';\r\n Public\r\n Property code : Integer Read FCode;\r\n Property Message : String Read FMessage;\r\n Property name : string Read FName;\r\n end;\r\n\r\n { TJSFileReader }\r\n\r\n TJSFileReader = class {$IFDEF PAS2JS} external name 'FileReader' {$ENDIF}(TJSEventTarget)\r\n private\r\n FError: TJSDOMException; external name 'error';\r\n fReadyState: Integer; external name 'readyState';\r\n FResult: JSValue; external name 'result';\r\n Public\r\n {$IFDEF PAS2JS}Const{$ENDIF} EMPTY : Integer;\r\n {$IFDEF PAS2JS}Const{$ENDIF} LOADING : Integer;\r\n {$IFDEF PAS2JS} Const{$ENDIF} DONE : Integer;\r\n Public\r\n onabort : TJSEventHandler;\r\n onerror : TJSEventHandler;\r\n onload : TJSEventHandler;\r\n onloadstart : TJSEventHandler;\r\n onloadend : TJSEventHandler;\r\n onprogress : TJSEventHandler;\r\n Public\r\n constructor new;\r\n Procedure abort;\r\n procedure readAsArrayBuffer(Blob: TJSBlob);\r\n procedure readAsBinaryString(Blob: TJSBlob);\r\n procedure readAsDataURL(Blob: TJSBlob);\r\n procedure readAsText(Blob: TJSBlob; encoding : string);\r\n procedure readAsText(Blob: TJSBlob);\r\n property Error : TJSDOMException read FError;\r\n Property readyState : Integer Read fReadyState;\r\n property Result : JSValue Read FResult;\r\n end;\r\n\r\n TCanvasCoordType = double; // Is in fact a number.\r\n\r\n // Opaque objects\r\n TJSCanvasGradient = class {$IFDEF PAS2JS} external name 'CanvasGradient' {$ENDIF}(TJSObject)\r\n end;\r\n\r\n TJSCanvasPattern = class {$IFDEF PAS2JS} external name 'CanvasPattern' {$ENDIF}(TJSObject)\r\n end;\r\n\r\n TJSPath2D = class {$IFDEF PAS2JS} external name 'Path2D' {$ENDIF}(TJSObject)\r\n Public\r\n constructor new; overload;\r\n constructor new(aPath : TJSPath2D); overload;\r\n constructor new(SVGPath : String); overload;\r\n Procedure addPath(aPath : TJSPath2D);\r\n procedure arc(x,y, radius,startAngle,endAngle : TCanvasCoordType); overload;\r\n procedure arc(x,y, radius,startAngle,endAngle : TCanvasCoordType; antiClockWise : boolean); overload;\r\n procedure arcTo(x1,y1,x2,y2,radius : TCanvasCoordType); overload;\r\n procedure bezierCurveTo(cp1x,cp1y,cp2x,cp2y,x,y : TCanvasCoordType); overload;\r\n Procedure closePath;\r\n procedure ellipse(x, y, radiusX, radiusY : TCanvasCoordType; rotation, startAngle, endAngle : Double); overload;\r\n procedure ellipse(x, y, radiusX, radiusY : TCanvasCoordType; rotation, startAngle, endAngle : Double; anticlockwise : Boolean); overload;\r\n Procedure lineTo(X,Y : TCanvasCoordType);\r\n Procedure moveTo(X,Y : TCanvasCoordType);\r\n procedure quadraticCurveTo(cpx,cpy,x,y : TCanvasCoordType);\r\n procedure rect(x,y,awidth,aheight: TCanvasCoordType); overload;\r\n end;\r\n\r\n { TJSImageData }\r\n\r\n TJSImageData = class {$IFDEF PAS2JS} external name 'ImageData' {$ENDIF}(TJSObject)\r\n private\r\n FData: TJSUint8ClampedArray; external name 'data';\r\n FHeight: Integer; external name 'height';\r\n FWidth: Integer; external name 'width';\r\n Public\r\n constructor new(awidth,aheight : integer); overload;\r\n constructor new(anArray :TJSUint8ClampedArray; awidth,aheight : integer); overload;\r\n property data : TJSUint8ClampedArray read FData;\r\n property height : Integer Read FHeight;\r\n property width : Integer Read FWidth;\r\n end;\r\n\r\n\r\n TJSTextMetrics = class {$IFDEF PAS2JS} external name 'TextMetrics' {$ENDIF}(TJSObject)\r\n width : TCanvasCoordType;\r\n actualBoundingBoxLeft : TCanvasCoordType;\r\n actualBoundingBoxRight : TCanvasCoordType;\r\n fontBoundingBoxAscent : TCanvasCoordType;\r\n fontBoundingBoxDescent : TCanvasCoordType;\r\n actualBoundingBoxAscent : TCanvasCoordType;\r\n actualBoundingBoxDescent : TCanvasCoordType;\r\n emHeightAscent : TCanvasCoordType;\r\n emHeightDescent : TCanvasCoordType;\r\n hangingBaseline : TCanvasCoordType;\r\n alphabeticBaseline : TCanvasCoordType;\r\n ideographicBaseline : TCanvasCoordType;\r\n end;\r\n\r\n { TJSCanvasRenderingContext2D }\r\n TJSCanvasRenderingContext2D = class {$IFDEF PAS2JS} external name 'CanvasRenderingContext2D' {$ENDIF}(TJSObject)\r\n private\r\n FCanvas: TJSHTMLCanvasElement; external name 'canvas';\r\n FfillStyleColor: String; external name 'fillStyle';\r\n FfillStyleGradient: TJSCanvasGradient; external name 'fillStyle';\r\n FfillStylePattern: TJSCanvasPattern; external name 'fillStyle';\r\n FimageSmoothingEnabled: Boolean; external name 'imageSmoothingEnabled';\r\n FstrokeStyleColor: String; external name 'strokeStyle';\r\n FstrokeStyleGradient: TJSCanvasGradient; external name 'strokeStyle';\r\n FstrokeStylePattern: TJSCanvasPattern; external name 'strokeStyle';\r\n Public\r\n fillStyle : JSValue;\r\n font : string;\r\n globalAlpha : double;\r\n globalCompositeOperation : String;\r\n lineCap : string;\r\n lineDashOffset : Double;\r\n lineJoin : String;\r\n lineWidth : Double;\r\n miterLimit : Double;\r\n shadowBlur : Double;\r\n shadowColor : String;\r\n shadowOffsetX : Double;\r\n shadowOffsetY : Double;\r\n strokeStyle : JSValue;\r\n textAlign : String;\r\n textBaseline : String;\r\n procedure arc(x,y, radius,startAngle,endAngle : TCanvasCoordType); overload;\r\n procedure arc(x,y, radius,startAngle,endAngle : TCanvasCoordType; antiClockWise : boolean); overload;\r\n procedure arcTo(x1,y1,x2,y2,radius : TCanvasCoordType); overload;\r\n procedure beginPath;\r\n procedure bezierCurveTo(cp1x,cp1y,cp2x,cp2y,x,y : TCanvasCoordType); overload;\r\n procedure clearRect(x,y,width,height : TCanvasCoordType);\r\n procedure clip; overload;\r\n procedure clip(aFillRule : String); overload;\r\n procedure clip(aPath : TJSPath2D); overload;\r\n procedure closePath;\r\n function createImageData(aWidth,aHeight : Integer) : TJSImageData; overload;\r\n function createImageData(aImage : TJSImageData) : TJSImageData; overload;\r\n function createLinearGradient(x0,y0,x1,y1 : TCanvasCoordType) : TJSCanvasGradient;\r\n function createPattern(aImage : TJSObject; repetition : string) : TJSCanvasPattern;\r\n function createRadialGradient(x0,y0,r0,x1,y1,r1 : TCanvasCoordType) : TJSCanvasGradient;\r\n procedure drawFocusIfNeeded(aElement : TJSElement); overload;\r\n procedure drawFocusIfNeeded(aPath : TJSPath2D; aElement : TJSElement); overload;\r\n procedure drawImage(image : TJSObject; dx,dy : TCanvasCoordType); overload;\r\n procedure drawImage(image : TJSObject; dx,dy,dwidth,dheight : TCanvasCoordType); overload;\r\n procedure drawImage(image : TJSObject; sx,sy,sWidth,sHeight,dx,dy,dwidth,dheight : TCanvasCoordType); overload;\r\n procedure ellipse(x, y, radiusX, radiusY : TCanvasCoordType; rotation, startAngle, endAngle : Double); overload;\r\n procedure ellipse(x, y, radiusX, radiusY : TCanvasCoordType; rotation, startAngle, endAngle : Double; anticlockwise : Boolean); overload;\r\n procedure fill; overload;\r\n procedure fill(aRule : String); overload;\r\n procedure fill(aPath : TJSPath2D); overload;\r\n procedure fill(aPath : TJSPath2D;aRule : String); overload;\r\n procedure fillRect(x,y,awidth,aheight: TCanvasCoordType); overload;\r\n procedure fillText(aText : string; x,y : TCanvasCoordType); overload;\r\n procedure fillText(aText : string; x,y, aMaxWidth : TCanvasCoordType); overload;\r\n function getImageData(x,y,awidth,aheight: TCanvasCoordType) : TJSImageData; overload;\r\n function getLineDash : TJSArray;\r\n function isPointInPath(x,y : TCanvasCoordType) : Boolean; overload;\r\n function isPointInPath(x,y : TCanvasCoordType; aFillRule : String) : Boolean; overload;\r\n function isPointInPath(aPath : TJSPath2D; x,y : TCanvasCoordType) : Boolean; overload;\r\n function isPointInPath(aPath : TJSPath2D; x,y : TCanvasCoordType; aFillRule : String) : Boolean; overload;\r\n function isPointInStroke(x,y : TCanvasCoordType) : Boolean; overload;\r\n function isPointInStroke(aPath : TJSPath2D; x,y : TCanvasCoordType) : Boolean; overload;\r\n procedure lineTo(x,y : TCanvasCoordType);\r\n function measureText(S : String) : TJSTextMetrics;\r\n procedure moveTo(x,y : TCanvasCoordType);\r\n procedure putImageData(aData : TJSImageData; x,y: TCanvasCoordType) ; overload;\r\n procedure putImageData(aData : TJSImageData; x,y,dityX,dirtyY,dirtyWidth,dirtyHeight: TCanvasCoordType) ; overload;\r\n procedure quadraticCurveTo(cpx,cpy,x,y : TCanvasCoordType);\r\n procedure rect(x,y,awidth,aheight: TCanvasCoordType); overload;\r\n procedure restore;\r\n procedure rotate(anAngle : double);\r\n procedure save;\r\n procedure scale(x,y : double);\r\n procedure setLineDash(segments : TJSArray); overload;\r\n procedure setLineDash(segments : array of integer); overload;\r\n procedure setTransform(a,b,c,d,e,f : double);\r\n procedure stroke; overload;\r\n procedure stroke(aPath : TJSPath2D); overload;\r\n procedure strokeRect(x,y,awidth,aheight: TCanvasCoordType);\r\n procedure strokeText(aText : string; x,y : TCanvasCoordType); overload;\r\n procedure strokeText(aText : string; x,y, aMaxWidth : TCanvasCoordType); overload;\r\n procedure transform(a,b,c,d,e,f : double);\r\n procedure translate(x,y : TCanvasCoordType);\r\n\r\n property canvas : TJSHTMLCanvasElement Read FCanvas;\r\n property fillStyleAsColor : String Read FfillStyleColor Write FfillStyleColor;\r\n property fillStyleAsGradient : TJSCanvasGradient Read FfillStyleGradient Write FfillStyleGradient;\r\n property fillStyleAsPattern : TJSCanvasPattern Read FfillStylePattern Write FfillStylePattern;\r\n property imageSmoothingEnabled : Boolean Read FimageSmoothingEnabled Write FimageSmoothingEnabled;\r\n property strokeStyleAsColor : String Read FstrokeStyleColor Write FstrokeStyleColor;\r\n property strokeStyleAsGradient : TJSCanvasGradient Read FstrokeStyleGradient Write FstrokeStyleGradient;\r\n property strokeStyleAsPattern : TJSCanvasPattern Read FstrokeStylePattern Write FstrokeStylePattern;\r\n end;\r\n\r\n { TJSHTMLIFrameElement }\r\n\r\n TJSHTMLIFrameElement = class {$IFDEF PAS2JS} external name 'HTMLIFrameElement' {$ENDIF}(TJSHTMLElement)\r\n private\r\n FAllowPaymentRequest: Boolean; external name 'allowPaymentRequest';\r\n FContentDocument: TJSDocument; external name 'contentDocument';\r\n FContentWindow: TJSWindow; external name 'contentWindow';\r\n FSandbox: string; external name 'sandbox';\r\n Public\r\n height : string;\r\n src : string;\r\n srcdoc : string;\r\n width : string;\r\n Property allowPaymentRequest : Boolean Read FAllowPaymentRequest;\r\n property contentWindow : TJSWindow Read FContentWindow;\r\n property contentDocument : TJSDocument Read FContentDocument;\r\n property sandbox : string read FSandbox;\r\n end;\r\n\r\n TJSHTMLScriptElement = class {$IFDEF PAS2JS} external name 'HTMLScriptElement' {$ENDIF}(TJSHTMLElement)\r\n Public\r\n type_ : String external name 'type';\r\n src : String;\r\n charset : string;\r\n integrity : string;\r\n async : boolean;\r\n defer : boolean;\r\n text : string;\r\n crossOrigin : string;\r\n referrerPolicy : string;\r\n noModule : boolean;\r\n end;\r\n\r\n\r\n\r\n\r\n TJSXMLHttpRequestEventTarget = class {$IFDEF PAS2JS} external name 'XMLHttpRequestEventTarget' {$ENDIF}(TJSEventTarget)\r\n end;\r\n\r\n TJSXMLHttpRequestUpload = class {$IFDEF PAS2JS} external name 'XMLHttpRequestUpload' {$ENDIF}(TJSXMLHttpRequestEventTarget)\r\n end;\r\n\r\n { TJSXMLHttpRequest }\r\n TJSOnReadyStateChangeHandler = reference to procedure; {$IFDEF PAS2JS} safecall; {$ENDIF}\r\n\r\n TJSXMLHttpRequest = class {$IFDEF PAS2JS} external name 'XMLHttpRequest' {$ENDIF}(TJSXMLHttpRequestEventTarget)\r\n private\r\n FReadyState: NativeInt; external name 'readyState';\r\n FResponse: JSValue; external name 'response';\r\n FResponseText: string; external name 'responseText';\r\n FResponseType: string; external name 'responseType';\r\n FresponseURL: string; external name 'responseURL';\r\n FresponseXML: TJSDocument; external name 'responseXML';\r\n FUpload: TJSXMLHttpRequestUpload; external name 'upload';\r\n FStatus : integer; external name 'status';\r\n FStatusText : string; external name 'statusText';\r\n public\r\n const\r\n UNSENT = 0;\r\n OPENED = 1;\r\n HEADERS_RECEIVED = 2;\r\n LOADING = 3;\r\n DONE = 4;\r\n public\r\n timeout : LongWord;\r\n withCredentials : Boolean;\r\n onreadystatechange : TJSOnReadyStateChangeHandler;\r\n constructor new;\r\n procedure abort;\r\n function getResponseHeader(aName : string) : String;\r\n function getAllResponseHeaders : String;\r\n procedure open(aMethod,aURL : String); overload;\r\n procedure open(aMethod,aURL : String; Async : Boolean); overload;\r\n procedure open(aMethod,aURL : String; Async : Boolean; AUserame : String); overload;\r\n procedure open(aMethod,aURL : String; Async : Boolean; AUserame,APassword : String); overload;\r\n procedure overrideMimeType(aType : String);\r\n procedure send(aBody : jsValue);overload;\r\n procedure send;overload;\r\n procedure setRequestHeader(aName, AValue : string);\r\n\r\n property readyState : NativeInt read FReadyState;\r\n property ResponseHeaders[aName : string] : string Read getResponseHeader;\r\n property responseXML : TJSDocument read FresponseXML;\r\n property responseURL : string read FresponseURL;\r\n property responseType : string read FResponseType Write FResponseType;\r\n property response : JSValue Read FResponse;\r\n property responseText : string read FResponseText;\r\n property Status : integer read FStatus;\r\n property StatusText : string read FStatusText;\r\n property upload : TJSXMLHttpRequestUpload read FUpload;\r\n\r\n end;\r\n\r\n { TJSUIEvent }\r\n\r\n TJSUIEvent = class {$IFDEF PAS2JS} external name 'UIEvent' {$ENDIF}(TJSEvent)\r\n private\r\n FDetail: NativeInt; external name 'detail';\r\n FView: TJSWindow; external name 'view';\r\n Public\r\n property detail : NativeInt read FDetail;\r\n property view : TJSWindow read FView;\r\n end;\r\n\r\n { TJSMouseEvent }\r\n\r\n TJSMouseEvent = class {$IFDEF PAS2JS} external name 'MouseEvent' {$ENDIF}(TJSUIevent)\r\n private\r\n FAltKey: Boolean; external name 'altKey';\r\n FBUtton: NativeInt; external name 'button';\r\n FBUttons: NativeInt; external name 'buttons';\r\n FClientX: Double; external name 'clientX';\r\n FClientY: Double; external name 'clientY';\r\n FCtrlKey: Boolean; external name 'ctrlKey';\r\n FMetaKey: Boolean; external name 'metaKey';\r\n FmovementX: Double; external name 'movementX';\r\n FmovementY: Double; external name 'movementY';\r\n FoffsetX: Double; external name 'offsetX';\r\n FoffsetY: Double; external name 'offsetY';\r\n FRegion: String; external name 'region';\r\n FRelatedTarget: TJSEventTarget; external name 'relatedTarget';\r\n FscreenX: Double; external name 'screenX';\r\n FscreenY: Double; external name 'screenY';\r\n FShiftKey: Boolean; external name 'shiftKey';\r\n Public\r\n function getModifierState(keyArg: String): boolean;\r\n Property altKey : Boolean read FAltKey;\r\n Property button: NativeInt read FBUtton;\r\n Property buttons: NativeInt read FBUttons;\r\n property clientX : Double read FClientX;\r\n property clientY : Double read FClientY;\r\n property ctrlKey : Boolean read FCtrlKey;\r\n property metaKey : Boolean read FMetaKey;\r\n property movementX : Double read FmovementX;\r\n property movementY : Double read FmovementY;\r\n property offsetX : Double read FoffsetX;\r\n property offsetY : Double read FoffsetY;\r\n{$IFDEF FIREFOX}\r\n property pageX : Double read FpageX;\r\n property pageY : Double read FpageY;\r\n{$ENDIF}\r\n property region : String read FRegion;\r\n property relatedTarget : TJSEventTarget read FRelatedTarget;\r\n property screenX : Double read FscreenX;\r\n property screenY : Double read FscreenY;\r\n property shiftKey : Boolean read FShiftKey;\r\n property x : Double read FClientX;\r\n property y : Double read FClientY;\r\n end;\r\n\r\n { TJSWheelEvent }\r\n TJSWheelEventInit = record\r\n deltaX : Double;\r\n deltaY : Double;\r\n deltaZ : Double;\r\n deltaMode : NativeInt;\r\n end;\r\n\r\n TJSWheelEvent = class {$IFDEF PAS2JS} external name 'WheelEvent' {$ENDIF}(TJSMouseEvent)\r\n private\r\n FDeltaMode: NativeInt; external name 'deltaMode';\r\n FDeltaX: Double; external name 'deltaX';\r\n FDeltaY: Double; external name 'deltaY';\r\n FDeltaZ: Double; external name 'deltaZ';\r\n Public\r\n constructor new(atype : String); overload;\r\n constructor new(atype : String; aInit : TJSWheelEventInit); overload;\r\n Property deltaX : Double Read FDeltaX;\r\n Property deltaY : Double Read FDeltaY;\r\n Property deltaZ : Double Read FDeltaZ;\r\n Property deltaMode : NativeInt Read FDeltaMode;\r\n end;\r\n\r\n TJSPointerEvent = class {$IFDEF PAS2JS} external name 'PointerEvent' {$ENDIF}(TJSMouseEvent);\r\n\r\n TJSTouchEvent = class {$IFDEF PAS2JS} external name 'TouchEvent' {$ENDIF}(TJSUIEvent)\r\n private\r\n FAltKey: Boolean; external name 'altKey';\r\n FChangedTouches: TJSTouchList; external name 'changedTouches';\r\n FCtrlKey: Boolean; external name 'ctrlKey';\r\n FMetaKey: Boolean; external name 'metaKey';\r\n FShiftKey: Boolean; external name 'shiftKey';\r\n FTargetTouches: TJSTouchList; external name 'targetTouches';\r\n FTouches: TJSTouchList; external name 'touches';\r\n Public\r\n Property altKey : Boolean Read FAltKey;\r\n Property ctrlKey : Boolean Read FCtrlKey;\r\n Property metaKey : Boolean Read FMetaKey;\r\n Property shiftKey : Boolean Read FShiftKey;\r\n property changedTouches : TJSTouchList Read FChangedTouches;\r\n property touches : TJSTouchList Read FTouches;\r\n property targetTouches : TJSTouchList Read FTargetTouches;\r\n end;\r\n\r\n\r\n // Namespace for standard key names.\r\n // See list at https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key/Key_Values\r\n TJSKeyNames = Class\r\n Const\r\n Alt = 'Alt';\r\n AltGraph = 'AltGraph';\r\n CapsLock = 'CapsLock';\r\n Control = 'Control';\r\n Fn = 'Fn';\r\n FnLock = 'FnLock';\r\n Hyper = 'Hyper';\r\n Meta = 'Meta';\r\n NumLock = 'NumLock';\r\n ScrollLock = 'ScrollLock';\r\n Shift = 'Shift';\r\n Super = 'Super';\r\n Symbol = 'Symbol';\r\n SymbolLock = 'SymbolLock';\r\n Enter = 'Enter';\r\n Tab = 'Tab';\r\n Space = 'Space';\r\n ArrowDown = 'ArrowDown';\r\n ArrowLeft = 'ArrowLeft';\r\n ArrowRight = 'ArrowRight';\r\n ArrowUp = 'ArrowUp';\r\n _End = 'End';\r\n Home = 'Home';\r\n PageDown = 'PageDown';\r\n PageUp = 'PageUp';\r\n BackSpace = 'Backspace';\r\n Clear = 'Clear';\r\n Copy = 'Copy';\r\n CrSel = 'CrSel';\r\n Cut = 'Cut';\r\n Delete = 'Delete';\r\n EraseEof = 'EraseEof';\r\n ExSel = 'ExSel';\r\n Insert = 'Insert';\r\n Paste = 'Paste';\r\n Redo = 'Redo';\r\n Undo = 'Undo';\r\n Accept = 'Accept';\r\n Again = 'Again';\r\n Attn = 'Attn';\r\n Cancel = 'Cancel';\r\n ContextMenu = 'Contextmenu';\r\n Escape = 'Escape';\r\n Execute = 'Execute';\r\n Find = 'Find';\r\n Finish = 'Finish';\r\n Help = 'Help';\r\n Pause = 'Pause';\r\n Play = 'Play';\r\n Props = 'Props';\r\n Select = 'Select';\r\n ZoomIn = 'ZoomIn';\r\n ZoomOut = 'ZoomOut';\r\n BrightnessDown = 'BrightnessDown';\r\n BrightnessUp = 'BrightnessUp';\r\n Eject = 'Eject';\r\n LogOff = 'LogOff';\r\n Power = 'Power';\r\n PowerOff = 'PowerOff';\r\n PrintScreen = 'PrintScreen';\r\n Hibernate = 'Hibernate';\r\n Standby = 'Standby';\r\n WakeUp = 'WakeUp';\r\n AllCandidates = 'AllCandidates';\r\n Alphanumeric = 'Alphanumeric';\r\n CodeInput = 'CodeInput';\r\n Compose = 'Compose';\r\n Convert = 'Convert';\r\n Dead = 'Dead';\r\n FinalMode = 'FinalMode';\r\n GroupFirst = 'GroupFirst';\r\n GroupLast = 'GroupLast';\r\n GroupNext = 'GroupNext';\r\n GroupPrevious = 'GroupPrevious';\r\n ModelChange = 'ModelChange';\r\n NextCandidate = 'NextCandidate';\r\n NonConvert = 'NonConvert';\r\n PreviousCandidate = 'PreviousCandidate';\r\n Process = 'Process';\r\n SingleCandidate = 'SingleCandidate';\r\n HangulMode = 'HangulMode';\r\n HanjaMode = 'HanjaMode';\r\n JunjaMode = 'JunjaMode';\r\n Eisu = 'Eisu';\r\n Hankaku = 'Hankaku';\r\n Hiranga = 'Hiranga';\r\n HirangaKatakana = 'HirangaKatakana';\r\n KanaMode = 'KanaMode';\r\n Katakana = 'Katakana';\r\n Romaji = 'Romaji';\r\n Zenkaku = 'Zenkaku';\r\n ZenkakuHanaku = 'ZenkakuHanaku';\r\n F1 = 'F1';\r\n F2 = 'F2';\r\n F3 = 'F3';\r\n F4 = 'F4';\r\n F5 = 'F5';\r\n F6 = 'F6';\r\n F7 = 'F7';\r\n F8 = 'F8';\r\n F9 = 'F9';\r\n F10 = 'F10';\r\n F11 = 'F11';\r\n F12 = 'F12';\r\n F13 = 'F13';\r\n F14 = 'F14';\r\n F15 = 'F15';\r\n F16 = 'F16';\r\n F17 = 'F17';\r\n F18 = 'F18';\r\n F19 = 'F19';\r\n F20 = 'F20';\r\n Soft1 = 'Soft1';\r\n Soft2 = 'Soft2';\r\n Soft3 = 'Soft3';\r\n Soft4 = 'Soft4';\r\n Decimal = 'Decimal';\r\n Key11 = 'Key11';\r\n Key12 = 'Key12';\r\n Multiply = 'Multiply';\r\n Add = 'Add';\r\n NumClear = 'Clear';\r\n Divide = 'Divide';\r\n Subtract = 'Subtract';\r\n Separator = 'Separator';\r\n AppSwitch = 'AppSwitch';\r\n Call = 'Call';\r\n Camera = 'Camera';\r\n CameraFocus = 'CameraFocus';\r\n EndCall = 'EndCall';\r\n GoBack = 'GoBack';\r\n GoHome = 'GoHome';\r\n HeadsetHook = 'HeadsetHook';\r\n LastNumberRedial = 'LastNumberRedial';\r\n Notification = 'Notification';\r\n MannerMode = 'MannerMode';\r\n VoiceDial = 'VoiceDial';\r\n // TODO : Multimedia keys\r\n // TODO : Audio control keys\r\n // TODO : TV control keys\r\n // TODO : Media controller keys\r\n // TODO : Speech recognition keys\r\n // TODO : Document keys\r\n // TODO : Application selector keys\r\n // TODO : Browser Control keys\r\n end;\r\n\r\n\r\n { TJSKeyboardEvent }\r\n\r\n TJSKeyboardEvent = class {$IFDEF PAS2JS} external name 'KeyboardEvent' {$ENDIF}(TJSUIEvent)\r\n private\r\n FAltKey: Boolean; external name 'altKey';\r\n FCode: string; external name 'code';\r\n FCtrlKey: Boolean; external name 'ctrlKey';\r\n FIsComposing: Boolean; external name 'isComposing';\r\n FKey: String; external name 'key';\r\n FLocale: string; external name 'locale';\r\n FLocation: NativeInt; external name 'location';\r\n FMetaKey: Boolean; external name 'metaKey';\r\n FRepeat: Boolean; external name 'repeat';\r\n FShiftKey: Boolean; external name 'shiftKey';\r\n Public\r\n function getModifierState(aKey : string) : Boolean;\r\n property code : string read FCode;\r\n Property altKey : Boolean read FAltKey;\r\n property ctrlKey : Boolean read FCtrlKey;\r\n property isComposing : Boolean read FIsComposing;\r\n property Key : String read FKey;\r\n property locale : string read FLocale;\r\n property location : NativeInt read FLocation;\r\n property metaKey : Boolean read FMetaKey;\r\n property _repeat : Boolean read FRepeat;\r\n property shiftKey : Boolean read FShiftKey;\r\n end;\r\n\r\n { MutationObserver }\r\n\r\n TJSMutationObserver = Class;\r\n\r\n TJSMutationRecord = record\r\n type_ : string;\r\n target : TJSNode;\r\n addedNodes : TJSNodeList;\r\n removedNodes : TJSNodeList;\r\n previousSibling : TJSNode;\r\n nextSibling : TJSNode;\r\n attributeName : String;\r\n attributeNamespace : String;\r\n oldValue : String;\r\n end;\r\n\r\n TJSMutationRecordArray = array of TJSMutationRecord;\r\n TJSMutationCallback = reference to procedure(mutations: TJSMutationRecordArray; observer: TJSMutationObserver); {$IFDEF PAS2JS} safecall; {$ENDIF}\r\n\r\n TJSMutationObserverInit = record\r\n attributes: boolean;\r\n attributeOldValue: boolean;\r\n characterData: boolean;\r\n characterDataOldValue: boolean;\r\n childList: boolean;\r\n subTree: boolean;\r\n attributeFilter: TJSArray;\r\n end;\r\n\r\n TJSMutationObserver = class {$IFDEF PAS2JS} external name 'MutationObserver' {$ENDIF}(TJSObject)\r\n public\r\n { constructor }\r\n constructor new(mutationCallback: TJSMutationCallback); overload;\r\n { public methods }\r\n procedure observe(target: TJSNode); overload;\r\n procedure observe(target: TJSNode; options: TJSMutationObserverInit); overload;\r\n procedure observe(target: TJSNode; options: TJSObject); overload;\r\n procedure disconnect;\r\n function takeRecords: TJSMutationRecordArray;\r\n end;\r\n\r\n { --------------------------------------------------------------------\r\n TJSWebSocket\r\n --------------------------------------------------------------------}\r\n\r\n TJSMessagePortArray = Array of TJSMessagePort;\r\n\r\n { TJSInputEvent }\r\n\r\n TJSInputEvent = class {$IFDEF PAS2JS} external name 'InputEvent' {$ENDIF}(TJSUIEvent)\r\n private\r\n FData: TJSDOMString; external name 'data';\r\n FDataTransfer: TJSObject; external name 'dataTransfer';\r\n FInputType: TJSDOMString; external name 'inputType';\r\n FIsComposing: Boolean; external name 'isComposing';\r\n public\r\n property data: TJSDOMString read FData;\r\n property dataTransfer: TJSObject read FDataTransfer;\r\n property inputType: TJSDOMString read FInputType;\r\n property isComposing: Boolean read FIsComposing;\r\n end;\r\n\r\n { TJSMessageEvent }\r\n\r\n TJSMessageEvent = class {$IFDEF PAS2JS} external name 'MessageEvent' {$ENDIF}(TEventListenerEvent)\r\n private\r\n FData: JSValue; external name 'data';\r\n FLastEventID: String; external name 'lastEventID';\r\n FOrigin: String; external name 'origin';\r\n FPorts: TJSMessagePortArray; external name 'ports';\r\n Public\r\n Property Data : JSValue Read FData;\r\n Property LastEventID : String Read FLastEventID;\r\n Property Origin : String Read FOrigin;\r\n Property Ports : TJSMessagePortArray Read FPorts;\r\n end;\r\n\r\n TJSWebSocket = class {$IFDEF PAS2JS} external name 'WebSocket' {$ENDIF}(TJSEventTarget)\r\n Private\r\n Furl : String; external name 'url';\r\n FreadyState : Cardinal; external name 'readyState';\r\n FbufferedAmount : NativeInt; external name 'bufferedAmount';\r\n Fextensions : String; external name 'extensions';\r\n Fprotocol : String; external name 'protocol';\r\n Public\r\n Const\r\n CONNECTING = 0;\r\n OPEN = 1;\r\n CLOSING = 2;\r\n CLOSED = 3;\r\n Public\r\n onopen : TJSEventHandler;\r\n onerror : TJSEventHandler;\r\n onclose : TJSEventHandler;\r\n onmessage : TJSEventHandler;\r\n binaryType : String;\r\n constructor new(url : String); overload;\r\n constructor new(url : String; protocol: String); overload;\r\n constructor new(url : String; protocols: array of String); overload;\r\n Procedure close; overload;\r\n Procedure close(code : Cardinal); overload;\r\n Procedure close(code : Cardinal; reason : String); overload;\r\n Procedure send(data : String);\r\n Procedure send(data : TJSBlob);\r\n Procedure send(data : TJSArrayBuffer);\r\n Procedure send(data : TJSTypedArray);\r\n Property url : String Read Furl;\r\n Property readyState : Cardinal Read FreadyState;\r\n Property bufferedAmount : NativeInt Read FbufferedAmount;\r\n Property extensions : String Read Fextensions;\r\n Property protocol : String Read Fprotocol;\r\n end;\r\n\r\n TJSHTMLAudioTrack = class {$IFDEF PAS2JS} external name 'AudioTrack' {$ENDIF}(TJSObject)\r\n end;\r\n\r\n TJSHTMLAudioTrackList = class {$IFDEF PAS2JS} external name 'AudioTrackList' {$ENDIF}(TJSObject)\r\n FLength : Integer; external name 'length';\r\n function getitem(aIndex : nativeInt) : TJSHTMLAudioTrack ; external name '[]';\r\n Public\r\n onaddtrack : TJSEventHandler;\r\n onchange : TJSEventHandler;\r\n onremovetrack : TJSEventHandler;\r\n Property Length : Integer Read FLength;\r\n Property tracks [aIndex : NativeInt] : TJSHTMLAudioTrack read Getitem;\r\n end;\r\n\r\n TJSHTMLVideoTrack = class {$IFDEF PAS2JS} external name 'VideoTrack' {$ENDIF}(TJSObject)\r\n end;\r\n\r\n TJSHTMLVideoTrackList = class {$IFDEF PAS2JS} external name 'VideoTrackList' {$ENDIF}(TJSObject)\r\n FLength : Integer; external name 'length';\r\n function getitem(aIndex : nativeInt) : TJSHTMLVideoTrack ; external name '[]';\r\n Public\r\n onaddtrack : TJSEventHandler;\r\n onchange : TJSEventHandler;\r\n onremovetrack : TJSEventHandler;\r\n Property Length : Integer Read FLength;\r\n Property tracks [aIndex : NativeInt] : TJSHTMLVideoTrack read Getitem;\r\n end;\r\n\r\n TJSHTMLTextTrack = class {$IFDEF PAS2JS} external name 'TextTrack' {$ENDIF}(TJSObject)\r\n end;\r\n\r\n TJSHTMLTextTrackList = class {$IFDEF PAS2JS} external name 'TextTrackList' {$ENDIF}(TJSObject)\r\n FLength : Integer; external name 'length';\r\n function getitem(aIndex : nativeInt) : TJSHTMLTextTrack ; external name '[]';\r\n Public\r\n onaddtrack : TJSEventHandler;\r\n onchange : TJSEventHandler;\r\n onremovetrack : TJSEventHandler;\r\n Property Length : Integer Read FLength;\r\n Property tracks [aIndex : NativeInt] : TJSHTMLTextTrack read Getitem;\r\n end;\r\n\r\n\r\n { TJSHTMLMediaElement }\r\n TJSMEdiaError = class {$IFDEF PAS2JS} external name 'MediaError' {$ENDIF}(TJSObject)\r\n code : NativeInt;\r\n message : string;\r\n end;\r\n\r\n TJSHTMLMediaStream = class {$IFDEF PAS2JS} external name 'MediaStream' {$ENDIF}(TJSObject);\r\n\r\n TJSHTMLMediaController = class {$IFDEF PAS2JS} external name 'MediaController' {$ENDIF}(TJSObject);\r\n\r\n TJSHTMLMediaElement = class {$IFDEF PAS2JS} external name 'HTMLMediaElement' {$ENDIF}(TJSHTMLElement)\r\n private\r\n FAudioTracks: TJSHTMLAudioTrackList; external name 'audioTracks';\r\n FVideoTracks: TJSHTMLVideoTrackList; external name 'videoTracks';\r\n FTextTracks: TJSHTMLTextTrackList; external name 'textTracks';\r\n FControlsList: TJSDOMTokenList; external name 'controlslist';\r\n FCurrentSrc: String; external name 'currentSrc';\r\n FDuration: Double; external name 'duration';\r\n FEnded: Boolean;external name 'ended';\r\n FError: TJSMEdiaError; external name 'error';\r\n FNetworkState: NativeInt; external name 'networkState';\r\n FPaused: boolean; external name 'paused';\r\n FReadyState: NativeInt; external name 'readyState';\r\n FSeeking: boolean; external name 'seeking';\r\n FSinkID: string; external name 'sinkId';\r\n Public\r\n autoplay : Boolean;\r\n buffered : Boolean;\r\n controls : Boolean;\r\n controller : TJSHTMLMediaController;\r\n crossOrigin : String;\r\n currentTime : Double;\r\n defaultMuted : boolean;\r\n defaultPlaybackRate : Double;\r\n disableRemotePlayback : Boolean;\r\n loop : boolean;\r\n mediaGroup : string;\r\n muted : boolean;\r\n preload : string;\r\n preservesPitch : boolean;\r\n src : string;\r\n srcObject : TJSHTMLMediaStream;\r\n volume : double;\r\n onencrypted : TJSEventHandler;\r\n onwaitingforkey : TJSEventHandler;\r\n function canPlayType(aType : String) : String;\r\n Function captureStream : TJSHTMLMediaStream;\r\n Procedure play;\r\n Procedure load;\r\n Procedure pause;\r\n\r\n Property AudioTracks : TJSHTMLAudioTrackList Read FAudioTracks;\r\n Property Controlslist : TJSDOMTokenList Read FControlsList;\r\n Property CurrentSrc : String Read FCurrentSrc;\r\n Property Duration : Double read FDuration;\r\n Property Ended : Boolean read FEnded;\r\n Property Error : TJSMEdiaError read FError;\r\n property networkState : NativeInt read FNetworkState;\r\n property paused : boolean read FPaused;\r\n property readyState : NativeInt read FReadyState;\r\n property seeking : boolean read FSeeking;\r\n property sinkID : string read FSinkID;\r\n Property TextTracks : TJSHTMLTextTrackList Read FTextTracks;\r\n Property VideoTracks : TJSHTMLVideoTrackList Read FVideoTracks;\r\n end;\r\n\r\n TJSHTMLAudioElement = class {$IFDEF PAS2JS} external name 'HTMLAudioElement' {$ENDIF}(TJSHTMLMediaElement)\r\n\r\n end;\r\n\r\n TJSHTMLVideoElement = class {$IFDEF PAS2JS} external name 'HTMLVideoElement' {$ENDIF}(TJSHTMLMediaElement)\r\n end;\r\n\r\n { TJSHTMLStyleElement }\r\n\r\n TJSHTMLStyleElement = class {$IFDEF PAS2JS} external name 'HTMLStyleElement' {$ENDIF}(TJSHTMLElement)\r\n private\r\n FSheet: TJSStyleSheet; external name 'sheet';\r\n public\r\n media : string;\r\n type_ : string; external name 'style';\r\n disabled : boolean;\r\n property sheet : TJSStyleSheet read FSheet;\r\n end;\r\n\r\n\r\n TJSHTMLDetailsElement = class {$IFDEF PAS2JS} external name 'HTMLDetailsElement' {$ENDIF}(TJSHTMLElement)\r\n strict private\r\n FOpen: Boolean; external name 'open';\r\n public\r\n property Open: Boolean read FOpen write FOpen;\r\n end;\r\n \r\n TJSResizeObserverEntry = class {$IFDEF PAS2JS} external name 'ResizeObserverEntry' {$ENDIF}(TJSObject)\r\n public\r\n contentRect: TJSDOMRect;\r\n end;\r\n TJSResizeObserverEntries = array of TJSResizeObserverEntry;\r\n\r\n TJSResizeObserverCallback = procedure(AEntries: TJSResizeObserverEntries; AObserver: TJSResizeObserver);\r\n TJSResizeObserverCallbackObj = procedure(AEntries: TJSResizeObserverEntries; AObserver: TJSResizeObserver) of object;\r\n\r\n TJSResizeObserver = class {$IFDEF PAS2JS} external name 'ResizeObserver' {$ENDIF}(TJSObject)\r\n public\r\n constructor new(ACallback: TJSResizeObserverCallback);\r\n constructor new(ACallback: TJSResizeObserverCallbackObj);\r\n procedure disconnect;\r\n procedure observe(ATarget: TJSHTMLElement);\r\n procedure unobserve(ATarget: TJSHTMLElement);\r\n end;\r\n\r\n TJSFormDataEntryValue = String;\r\n TJSFormDataEntryValueArray = Array of TJSFormDataEntryValue;\r\n\r\n TJSFormData = class {$IFDEF PAS2JS} external name 'FormData' {$ENDIF}(TJSObject)\r\n constructor new;\r\n constructor new(aForm : TJSHTMLElement);\r\n Procedure append(const aName,aValue : String);\r\n Procedure append(const aName : String; aBlob : TJSBlob);\r\n Procedure delete(const aName : String);\r\n Function entries : TJSFormDataEntryValueArray;\r\n Function get(const aName : String): TJSFormDataEntryValue;\r\n function has(const aName : String): Boolean;\r\n Function keys : TStringDynArray; reintroduce;\r\n Procedure set_(const aName,aValue : String); external name 'set';\r\n Procedure set_(const aName : String; aBlob : TJSBlob); external name 'set';\r\n Function getAll(const aName : String) : TJSFormDataEntryValueArray;\r\n Function values : TJSValueDynArray; reintroduce;\r\n Property Entry[const aIndex : String] : TJSFormDataEntryValue read Get;\r\n end;\r\n\r\n TJSHTMLTemplateElement = class {$IFDEF PAS2JS} external name 'HTMLTemplateElement' {$ENDIF}(TJSHTMLElement)\r\n content : TJSHTMLElement;\r\n end;\r\n\r\n TJSHTMLOrXMLDocument = class {$IFDEF PAS2JS} external name 'Document' {$ENDIF}(TJSDocument)\r\n end;\r\n\r\n TJSHTMLDocument = class {$IFDEF PAS2JS} external name 'HTMLDocument' {$ENDIF}(TJSHTMLOrXMLDocument)\r\n end;\r\n\r\n TJSXMLDocument = class {$IFDEF PAS2JS} external name 'HTMLDocument' {$ENDIF}(TJSHTMLOrXMLDocument)\r\n end;\r\n\r\n TDOMParser = class {$IFDEF PAS2JS} external name 'DOMParser' {$ENDIF}(TJSObject)\r\n Public\r\n Function parseFromString (aString,aMimetype : String): TJSHTMLOrXMLDocument;\r\n end;\r\n\r\n\r\n TOnChangeProcedure = reference to procedure;\r\n\r\n TJSPermissionDescriptor = class {$IFDEF PAS2JS} external name 'Object' {$ENDIF}(TJSObject)\r\n public\r\n name: String;\r\n userVisibleOnly: Boolean;\r\n sysex: Boolean;\r\n end;\r\n\r\n TJSPermissionStatus = class {$IFDEF PAS2JS} external name 'PermissionStatus' {$ENDIF}(TJSObject)\r\n private\r\n FState: String; external name 'state';\r\n public\r\n onchange: TOnChangeProcedure;\r\n property state: String read FState;\r\n end;\r\n\r\n TJSPermissions = class {$IFDEF PAS2JS} external name 'Permissions' {$ENDIF}(TJSObject)\r\n public\r\n function query(descriptor: TJSPermissionDescriptor): TJSPermissionStatus; {$IFDEF PAS2JS} async; {$ENDIF}\r\n end;\r\n\r\n TJSFileSystemHandlePermissionDescriptor = class {$IFDEF PAS2JS} external name 'Object' {$ENDIF}(TJSObject)\r\n public\r\n mode: String;\r\n end;\r\n\r\n TJSFileSystemCreateWritableOptions = class {$IFDEF PAS2JS} external name 'Object' {$ENDIF}(TJSObject)\r\n public\r\n keepExistingData: Boolean;\r\n end;\r\n\r\n TJSFileSystemWritableFileStream = class;\r\n\r\n TJSFileSystemHandle = class {$IFDEF PAS2JS} external name 'FileSystemHandle' {$ENDIF}(TJSObject)\r\n private\r\n FKind: String; external name 'kind';\r\n FName: String; external name 'name';\r\n public\r\n function isSameEntry(const Handle: TJSFileSystemHandle): Boolean;\r\n function queryPermission(descriptor: TJSFileSystemHandlePermissionDescriptor): String;\r\n function requestPermission(descriptor: TJSFileSystemHandlePermissionDescriptor): String;\r\n\r\n property kind: String read FKind;\r\n property name: String read FName;\r\n end;\r\n\r\n TJSFileSystemFileHandle = class {$IFDEF PAS2JS} external name 'FileSystemFileHandle' {$ENDIF}(TJSFileSystemHandle)\r\n public\r\n function getFile: TJSHTMLFile; {$IFDEF PAS2JS} async; {$ENDIF}\r\n function createWritable: TJSFileSystemWritableFileStream; overload;\r\n function createWritable(options: TJSFileSystemCreateWritableOptions): TJSFileSystemWritableFileStream; overload;\r\n end;\r\n\r\n TJSGetFileHandleOptions = class external name 'Object'\r\n public\r\n create: Boolean;\r\n\r\n constructor new;\r\n end;\r\n\r\n TJSRemoveEntryOptions = class {$IFDEF PAS2JS} external name 'Object' {$ENDIF}(TJSObject)\r\n recursive: Boolean;\r\n end;\r\n\r\n TJSFileSystemDirectoryHandle = class {$IFDEF PAS2JS} external name 'FileSystemDirectoryHandle' {$ENDIF}(TJSFileSystemHandle)\r\n public\r\n function entries: TJSObject;\r\n function getDirectoryHandle(name: String): TJSFileSystemDirectoryHandle; {$IFDEF PAS2JS} async; {$ENDIF} overload;\r\n function getDirectoryHandle(name: String; options: TJSGetFileHandleOptions): TJSFileSystemDirectoryHandle; {$IFDEF PAS2JS} async; {$ENDIF} overload;\r\n function getFileHandle(name: String): TJSFileSystemFileHandle; {$IFDEF PAS2JS} async; {$ENDIF} overload;\r\n function getFileHandle(name: String; options: TJSGetFileHandleOptions): TJSFileSystemFileHandle; {$IFDEF PAS2JS} async; {$ENDIF} overload;\r\n function keys: TJSFileSystemDirectoryHandleArray; reintroduce;\r\n function removeEntry(name: String): TJSPromise;\r\n function removeEntry(name: String; options: TJSRemoveEntryOptions): TJSPromise;\r\n function resolve(possibleDescendant: String): TStringDynArray; {$IFDEF PAS2JS} async; {$ENDIF}\r\n function values(possibleDescendant: String): TJSFileSystemDirectoryHandleArray; reintroduce; {$IFDEF PAS2JS} async; {$ENDIF}\r\n end;\r\n\r\n TJSFileSystemWritableFileStream = class {$IFDEF PAS2JS} external name 'FileSystemWritableFileStream' {$ENDIF}(TJSWritableStream)\r\n public\r\n function seek(position: NativeInt): TJSPromise;\r\n function write(data: JSValue): TJSPromise;\r\n function truncate(size: NativeInt): TJSPromise;\r\n end;\r\n\r\n TJSShowOpenFilePickerTypeOptions = class {$IFDEF PAS2JS} external name 'Object' {$ENDIF}(TJSObject)\r\n public\r\n description: String;\r\n accept: TJSObject;\r\n end;\r\n\r\n TJSShowOpenFilePickerOptions = class {$IFDEF PAS2JS} external name 'Object' {$ENDIF}(TJSObject)\r\n public\r\n multiple: Boolean;\r\n excludeAcceptAllOption: Boolean;\r\n types: array of TJSShowOpenFilePickerTypeOptions;\r\n end;\r\n\r\n TJSShowSaveFilePickerOptionsAccept = class {$IFDEF PAS2JS} external name 'Object' {$ENDIF}(TJSObject)\r\n public\r\n description: String;\r\n accept: TStringDynArray;\r\n end;\r\n\r\n TJSShowSaveFilePickerOptions = class {$IFDEF PAS2JS} external name 'Object' {$ENDIF}(TJSObject)\r\n public\r\n excludeAcceptAllOption: Boolean;\r\n accept: array of TJSShowSaveFilePickerOptionsAccept;\r\n end;\r\n\r\nvar\r\n document : TJSDocument; external name 'document';\r\n window : TJSWindow; external name 'window';\r\n console : TJSConsole; external name 'window.console';\r\n caches : TJSCacheStorage; external name 'caches';\r\n serviceWorker : TJSServiceWorker; external name 'self';\r\n\r\nFunction HasServiceWorker : Boolean;\r\n\r\nimplementation\r\n\r\nFunction HasServiceWorker : Boolean;\r\nbegin\r\n if jsvalue(window.navigator.serviceWorker) then\r\n exit(true)\r\n else\r\n exit(false);\r\nend;\r\n\r\n{ TJSBlobPropertyBag }\r\n\r\nconstructor TJSBlobPropertyBag.Create(aType: string); overload;\r\nbegin\r\n FType := aType;\r\nend;\r\n\r\nconstructor TJSBlobPropertyBag.Create(aType, aEndings: string); overload;\r\nbegin\r\n FType := aType;\r\n FEndings := aEndings;\r\nend;\r\n\r\nend.\r\n","unit p2jsres;\r\n\r\n{$mode objfpc}\r\n{$h+}\r\n{$modeswitch externalclass}\r\n\r\ninterface\r\n\r\nuses types;\r\n\r\nType\r\n TResourceSource = (rsJS,rsHTML);\r\n TResourceInfo = record\r\n name : string;\r\n encoding : string;\r\n resourceunit : string;\r\n format : string;\r\n data : string;\r\n end;\r\n TResourceEnumCallBack = Reference to function(const resName : string) : boolean;\r\n TResourcesLoadedEnumCallBack = Reference to Procedure(const LoadedResources : Array of String);\r\n TResourcesLoadErrorCallBack = Reference to Procedure(const aError : string);\r\n\r\nFunction SetResourceSource(aSource : TResourceSource) : TResourceSource;\r\n\r\nFunction GetResourceNames : TStringDynArray;\r\nFunction GetResourceNames(aSource : TResourceSource) : TStringDynArray;\r\n\r\nFunction EnumResources(aCallback : TResourceEnumCallBack) : Integer;\r\nFunction EnumResources(aSource : TResourceSource; aCallback : TResourceEnumCallBack) : Integer;\r\n\r\nFunction GetResourceInfo(Const aName : String; var aInfo : TResourceInfo) : Boolean;\r\nFunction GetResourceInfo(aSource : TResourceSource; Const aName : String; var aInfo : TResourceInfo) : Boolean;\r\n\r\nProcedure LoadHTMLLinkResources(const aURL : String; OnLoad : TResourcesLoadedEnumCallBack = Nil; OnError : TResourcesLoadErrorCallBack = Nil);\r\n\r\nimplementation\r\n\r\nuses sysutils, js, web;\r\n\r\nvar\r\n gMode: TResourceSource;\r\n\r\n{ ---------------------------------------------------------------------\r\n Global entry points\r\n ---------------------------------------------------------------------}\r\n\r\nFunction SeTResourceSource(aSource : TResourceSource) : TResourceSource;\r\nbegin\r\n Result:=gMode;\r\n gMode:=aSource;\r\nend;\r\n\r\nFunction GetResourceNames : TStringDynArray;\r\nbegin\r\n Result:=GetResourceNames(gMode);\r\nend;\r\n\r\nFunction EnumResources(aCallback : TResourceEnumCallBack) : Integer;\r\n\r\nbegin\r\n Result:=EnumResources(gMode,aCallback);\r\nend;\r\n\r\nFunction GetResourceInfo(Const aName : String; var aInfo : TResourceInfo) : Boolean;\r\n\r\nbegin\r\n Result:=GetResourceInfo(gMode,aName,aInfo);\r\nend;\r\n\r\n{ ---------------------------------------------------------------------\r\n JS resources\r\n ---------------------------------------------------------------------}\r\n\r\nType\r\n TRTLResourceInfo = class external name 'Object' (TJSObject)\r\n name : string;\r\n encoding : string;\r\n resourceunit : string; external name 'unit';\r\n format : string;\r\n data : string;\r\n end;\r\n\r\nfunction rtlGetResourceList : TStringDynArray; external name 'rtl.getResourceList';\r\nfunction rtlGetResource(const aName : string) : TRTLResourceInfo; external name 'rtl.getResource';\r\n\r\nFunction GetRTLResourceInfo(Const aName : String; var aInfo : TResourceInfo) : Boolean;\r\n\r\nVar\r\n RTLInfo : TRTLResourceInfo;\r\n\r\nbegin\r\n RTLInfo:=rtlGetResource(lowercase(aName));\r\n Result:=Assigned(RTLInfo);\r\n if Result then\r\n begin\r\n aInfo.name:=RTLinfo.name;\r\n aInfo.encoding:=RTLinfo.encoding;\r\n aInfo.format:=RTLinfo.format;\r\n aInfo.resourceunit:=RTLinfo.resourceunit;\r\n aInfo.data:=RTLinfo.data;\r\n end;\r\nend;\r\n\r\n{ ---------------------------------------------------------------------\r\n HTML resources\r\n ---------------------------------------------------------------------}\r\n\r\nConst\r\n IDPrefix = 'resource-';\r\n\r\nFunction IsResourceLink(L : TJSHTMLLinkElement) : Boolean;\r\n\r\nbegin\r\n Result:=(Copy(L.id,1,Length(IDPrefix))=IDPrefix) and (isDefined(L.Dataset['unit'])) and (Copy(L.href,1,4)='data')\r\nend;\r\n\r\nFunction GetHTMLResources : TStringDynArray;\r\n\r\n\r\nVar\r\n LC : TJSHTMLCollection;\r\n L : TJSHTMLLinkElement;\r\n I : Integer;\r\n ID : String;\r\n\r\nbegin\r\n SetLength(Result,0);\r\n if not isDefined(document) then // If called in Node...\r\n exit;\r\n // No cache, we do this dynamically: it's possible to add link nodes at runtime.\r\n LC:=document.getElementsByTagName('link');\r\n For I:=0 to LC.length-1 do\r\n begin\r\n L:=TJSHTMLLinkElement(LC[i]);\r\n ID:=L.ID;\r\n if IsResourceLink(L) then\r\n begin\r\n Delete(ID,1,Length(IDPrefix));\r\n if (ID<>'') then\r\n TJSArray(Result).Push(ID);\r\n end;\r\n end;\r\nend;\r\n\r\nFunction GetHTMLResourceInfo(Const aName : String; var aInfo : TResourceInfo) : Boolean;\r\n\r\nVar\r\n el : TJSElement;\r\n L : TJSHTMLLinkElement absolute el;\r\n S : String;\r\n I : Integer;\r\n\r\nbegin\r\n Result:=False;\r\n if not isDefined(document) then // If called in Node...\r\n exit;\r\n El:=document.getElementByID(IDPrefix+lowercase(aName));\r\n Result:=assigned(el) and SameText(el.tagName,'link');\r\n if not Result then\r\n exit;\r\n ainfo.name:=lowercase(aName);\r\n ainfo.Resourceunit:=String(L.Dataset['unit']);\r\n S:=L.href;\r\n S:=Copy(S,6,Length(S)-5); // strip data;\r\n I:=Pos(',',S);\r\n aInfo.data:=Copy(S,I+1,Length(S)-1);\r\n S:=copy(S,1,I-1);\r\n I:=Pos(';',S);\r\n if I=0 then\r\n aInfo.encoding:=''\r\n else\r\n begin\r\n aInfo.encoding:=Copy(S,I+1,Length(S)-1);\r\n S:=Copy(S,1,I-1);\r\n end;\r\n aInfo.Format:=S;\r\nend;\r\n\r\nFunction HasTemplate : Boolean;\r\n\r\nbegin\r\n asm\r\n return ('content' in document.createElement('template'))\r\n end;\r\n Result:=false;\r\nend;\r\n\r\n\r\nProcedure LoadHTMLLinkResources(const aURL : String; OnLoad : TResourcesLoadedEnumCallBack = Nil; OnError : TResourcesLoadErrorCallBack = Nil);\r\n\r\n function FetchOK(Res : JSValue) : JSValue;\r\n var\r\n Response : TJSResponse absolute res;\r\n begin\r\n Result:=Nil;\r\n if not Response.ok then\r\n begin\r\n if Assigned(OnError) then\r\n Raise TJSError.New('HTTP Error for URL aURL, status = '+IntToStr(Response.status)+' : '+Response.statusText)\r\n end\r\n else\r\n Result:=Response.Text();\r\n end;\r\n\r\n function BlobOK(Res : JSValue) : JSValue;\r\n\r\n Var\r\n aText : String absolute res;\r\n ID : String;\r\n Tmpl : TJSHTMLTemplateElement;\r\n El : TJSHTMLElement;\r\n L : TJSHTMLLinkElement absolute El;\r\n Arr : TStringDynArray;\r\n aParent : TJSHTMLElement;\r\n\r\n begin\r\n Result:=Nil;\r\n aParent:=TJSHTMLElement(document.head);\r\n if aParent=Nil then\r\n aParent:=TJSHTMLElement(document.body);\r\n SetLength(Arr,0);\r\n Tmpl:=TJSHTMLTemplateElement(Document.createElement('template'));\r\n Tmpl.innerhtml:=TJSString(aText).trim;\r\n el:=TJSHTMLElement(Tmpl.Content.firstElementChild);\r\n While El<>Nil do\r\n begin\r\n if SameText(El.tagName,'link') and IsResourceLink(L) then\r\n begin\r\n aParent.Append(TJSHTMLElement(document.importNode(l,true)));\r\n ID:=L.ID;\r\n Delete(ID,1,Length(IDPrefix));\r\n if (ID<>'') then\r\n TJSArray(Arr).Push(ID);\r\n end;\r\n el:=TJSHTMLElement(el.nextElementSibling);\r\n end;\r\n if Assigned(OnLoad) then\r\n OnLoad(Arr);\r\n end;\r\n\r\n function DoError (aValue : JSValue) : JSValue;\r\n\r\n Var\r\n aErr : TJSError absolute aValue;\r\n\r\n begin\r\n Result:=Nil;\r\n if Assigned(OnError) then\r\n if aErr=Nil then\r\n OnError('Error: ' + aErr.message)\r\n end;\r\n\r\nbegin\r\n if not HasTemplate then\r\n begin\r\n if Assigned(OnError) then\r\n OnError('No template support in this browser')\r\n end\r\n else\r\n window.fetch(aURL)._then(@FetchOK)._then(@BlobOK).catch(@doError);\r\nend;\r\n\r\n\r\n{ ---------------------------------------------------------------------\r\n Global entries, specifying resource mode\r\n ---------------------------------------------------------------------}\r\n\r\nFunction GetResourceNames(aSource : TResourceSource) : TStringDynArray;\r\n\r\nbegin\r\n case aSource of\r\n rsJS : Result:=rtlGetResourceList;\r\n rsHTML : Result:=GetHTMLResources;\r\n end;\r\nend;\r\n\r\nFunction EnumResources(aSource : TResourceSource; aCallback : TResourceEnumCallBack) : Integer;\r\n\r\nVar\r\n RL : TStringDynArray;\r\n I : Integer;\r\n ContinueEnum : Boolean;\r\n\r\nbegin\r\n Result:=0;\r\n RL:=GetResourceNames(aSource);\r\n I:=0;\r\n Result:=Length(RL);\r\n ContinueEnum:=True;\r\n While (INil do\r\n begin\r\n I:=I.Next;\r\n Inc(Result);\r\n end;\r\nend;\r\n\r\nconstructor TLinkedList.Create(AnItemClass: TLinkedListItemClass);\r\nbegin\r\n FItemClass:=AnItemClass;\r\nend;\r\n\r\ndestructor TLinkedList.Destroy;\r\nbegin\r\n Clear;\r\n inherited Destroy;\r\nend;\r\n\r\nprocedure TLinkedList.Clear;\r\n\r\nVar\r\n I : TLinkedListItem;\r\n\r\nbegin\r\n // Can't use visitor, because it'd kill the next pointer...\r\n I:=FRoot;\r\n While I<>Nil do\r\n begin\r\n FRoot:=I;\r\n I:=I.Next;\r\n FRoot.Next:=Nil;\r\n FreeAndNil(FRoot);\r\n end;\r\nend;\r\n\r\nfunction TLinkedList.Add: TLinkedListItem;\r\nbegin\r\n Result:=FItemClass.Create;\r\n Result.Next:=FRoot;\r\n FRoot:=Result;\r\nend;\r\n\r\nprocedure TLinkedList.ForEach(Visitor : TLinkedListVisitor);\r\n\r\nVar\r\n I : TLinkedListItem;\r\n\r\nbegin\r\n I:=FRoot;\r\n While (I<>Nil) and Visitor.Visit(I) do\r\n I:=I.Next;\r\nend;\r\n\r\nprocedure TLinkedList.RemoveItem(Item: TLinkedListItem; FreeItem : Boolean = False);\r\n\r\nVar\r\n I : TLinkedListItem;\r\n\r\nbegin\r\n If (Item<>Nil) and (FRoot<>Nil) then\r\n begin\r\n If (Item=FRoot) then\r\n FRoot:=Item.Next\r\n else\r\n begin\r\n I:=FRoot;\r\n While (I.Next<>Nil) and (I.Next<>Item) do\r\n I:=I.Next;\r\n If (I.Next=Item) then\r\n I.Next:=Item.Next;\r\n end;\r\n If FreeItem Then\r\n Item.Free;\r\n end;\r\nend;\r\n\r\n\r\n\r\nend.\r\n\r\n","{\r\n This file is part of the Pas2JS run time library.\r\n Copyright (c) 2017 by Mattias Gaertner\r\n\r\n See the file COPYING.FPC, included in this distribution,\r\n for details about the copyright.\r\n\r\n This program is distributed in the hope that it will be useful,\r\n but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\r\n\r\n **********************************************************************}\r\nunit Classes;\r\n\r\n{$mode objfpc}\r\n\r\ninterface\r\n\r\nuses\r\n RTLConsts, Types, SysUtils, JS, TypInfo, p2jsres;\r\n\r\ntype\r\n TNotifyEvent = procedure(Sender: TObject) of object;\r\n TNotifyEventRef = reference to procedure(Sender: TObject);\r\n TStringNotifyEventRef = Reference to Procedure(Sender: TObject; Const aString : String);\r\n\r\n // Notification operations :\r\n // Observer has changed, is freed, item added to/deleted from list, custom event.\r\n TFPObservedOperation = (ooChange,ooFree,ooAddItem,ooDeleteItem,ooCustom);\r\n\r\n EStreamError = class(Exception);\r\n EFCreateError = class(EStreamError);\r\n EFOpenError = class(EStreamError);\r\n EFilerError = class(EStreamError);\r\n EReadError = class(EFilerError);\r\n EWriteError = class(EFilerError);\r\n EClassNotFound = class(EFilerError);\r\n EMethodNotFound = class(EFilerError);\r\n EInvalidImage = class(EFilerError);\r\n EResNotFound = class(Exception);\r\n EListError = class(Exception);\r\n EBitsError = class(Exception);\r\n EStringListError = class(EListError);\r\n EComponentError = class(Exception);\r\n EParserError = class(Exception);\r\n EOutOfResources = class(EOutOfMemory);\r\n EInvalidOperation = class(Exception);\r\n\r\n TListAssignOp = (laCopy, laAnd, laOr, laXor, laSrcUnique, laDestUnique);\r\n TListSortCompare = function(Item1, Item2: JSValue): Integer;\r\n TListSortCompareFunc = reference to function (Item1, Item2: JSValue): Integer;\r\n TListCallback = Types.TListCallback;\r\n TListStaticCallback = Types.TListStaticCallback;\r\n TAlignment = (taLeftJustify, taRightJustify, taCenter);\r\n\r\n // Forward class definitions\r\n TFPList = Class;\r\n TReader = Class;\r\n TWriter = Class;\r\n TFiler = Class;\r\n\r\n { TFPListEnumerator }\r\n TFPListEnumerator = class\r\n private\r\n FList: TFPList;\r\n FPosition: Integer;\r\n public\r\n constructor Create(AList: TFPList); reintroduce;\r\n function GetCurrent: JSValue;\r\n function MoveNext: Boolean;\r\n property Current: JSValue read GetCurrent;\r\n end;\r\n\r\n { TFPList }\r\n\r\n TFPList = class(TObject)\r\n private\r\n FList: TJSValueDynArray;\r\n FCount: Integer;\r\n FCapacity: Integer;\r\n procedure CopyMove(aList: TFPList);\r\n procedure MergeMove(aList: TFPList);\r\n procedure DoCopy(ListA, ListB: TFPList);\r\n procedure DoSrcUnique(ListA, ListB: TFPList);\r\n procedure DoAnd(ListA, ListB: TFPList);\r\n procedure DoDestUnique(ListA, ListB: TFPList);\r\n procedure DoOr(ListA, ListB: TFPList);\r\n procedure DoXOr(ListA, ListB: TFPList);\r\n protected\r\n function Get(Index: Integer): JSValue; {$ifdef CLASSESINLINE} inline; {$endif CLASSESINLINE}\r\n procedure Put(Index: Integer; Item: JSValue); {$ifdef CLASSESINLINE} inline; {$endif CLASSESINLINE}\r\n procedure SetCapacity(NewCapacity: Integer);\r\n procedure SetCount(NewCount: Integer);\r\n Procedure RaiseIndexError(Index: Integer);\r\n public\r\n //Type\r\n // TDirection = (FromBeginning, FromEnd);\r\n destructor Destroy; override;\r\n procedure AddList(AList: TFPList);\r\n function Add(Item: JSValue): Integer; {$ifdef CLASSESINLINE} inline; {$endif CLASSESINLINE}\r\n procedure Clear;\r\n procedure Delete(Index: Integer); {$ifdef CLASSESINLINE} inline; {$endif CLASSESINLINE}\r\n class procedure Error(const Msg: string; const Data: String);\r\n procedure Exchange(Index1, Index2: Integer);\r\n function Expand: TFPList; {$ifdef CLASSESINLINE} inline; {$endif CLASSESINLINE}\r\n function Extract(Item: JSValue): JSValue;\r\n function First: JSValue;\r\n function GetEnumerator: TFPListEnumerator;\r\n function IndexOf(Item: JSValue): Integer;\r\n function IndexOfItem(Item: JSValue; Direction: TDirection): Integer;\r\n procedure Insert(Index: Integer; Item: JSValue); {$ifdef CLASSESINLINE} inline; {$endif CLASSESINLINE}\r\n function Last: JSValue;\r\n procedure Move(CurIndex, NewIndex: Integer);\r\n procedure Assign (ListA: TFPList; AOperator: TListAssignOp=laCopy; ListB: TFPList=nil);\r\n function Remove(Item: JSValue): Integer;\r\n procedure Pack;\r\n procedure Sort(const Compare: TListSortCompare);\r\n procedure SortList(const Compare: TListSortCompareFunc);\r\n procedure ForEachCall(const proc2call: TListCallback; const arg: JSValue);\r\n procedure ForEachCall(const proc2call: TListStaticCallback; const arg: JSValue);\r\n property Capacity: Integer read FCapacity write SetCapacity;\r\n property Count: Integer read FCount write SetCount;\r\n property Items[Index: Integer]: JSValue read Get write Put; default;\r\n property List: TJSValueDynArray read FList;\r\n end;\r\n\r\n TListNotification = (lnAdded, lnExtracted, lnDeleted);\r\n TList = class;\r\n\r\n { TListEnumerator }\r\n\r\n TListEnumerator = class\r\n private\r\n FList: TList;\r\n FPosition: Integer;\r\n public\r\n constructor Create(AList: TList); reintroduce;\r\n function GetCurrent: JSValue;\r\n function MoveNext: Boolean;\r\n property Current: JSValue read GetCurrent;\r\n end;\r\n\r\n { TList }\r\n\r\n TList = class(TObject)\r\n private\r\n FList: TFPList;\r\n procedure CopyMove (aList : TList);\r\n procedure MergeMove (aList : TList);\r\n procedure DoCopy(ListA, ListB : TList);\r\n procedure DoSrcUnique(ListA, ListB : TList);\r\n procedure DoAnd(ListA, ListB : TList);\r\n procedure DoDestUnique(ListA, ListB : TList);\r\n procedure DoOr(ListA, ListB : TList);\r\n procedure DoXOr(ListA, ListB : TList);\r\n protected\r\n function Get(Index: Integer): JSValue;\r\n procedure Put(Index: Integer; Item: JSValue);\r\n procedure Notify(aValue: JSValue; Action: TListNotification); virtual;\r\n procedure SetCapacity(NewCapacity: Integer);\r\n function GetCapacity: integer;\r\n procedure SetCount(NewCount: Integer);\r\n function GetCount: integer;\r\n function GetList: TJSValueDynArray;\r\n property FPList : TFPList Read FList;\r\n public\r\n constructor Create; reintroduce;\r\n destructor Destroy; override;\r\n Procedure AddList(AList : TList);\r\n function Add(Item: JSValue): Integer;\r\n procedure Clear; virtual;\r\n procedure Delete(Index: Integer);\r\n class procedure Error(const Msg: string; Data: String); virtual;\r\n procedure Exchange(Index1, Index2: Integer);\r\n function Expand: TList;\r\n function Extract(Item: JSValue): JSValue;\r\n function First: JSValue;\r\n function GetEnumerator: TListEnumerator;\r\n function IndexOf(Item: JSValue): Integer;\r\n procedure Insert(Index: Integer; Item: JSValue);\r\n function Last: JSValue;\r\n procedure Move(CurIndex, NewIndex: Integer);\r\n procedure Assign (ListA: TList; AOperator: TListAssignOp=laCopy; ListB: TList=nil);\r\n function Remove(Item: JSValue): Integer;\r\n procedure Pack;\r\n procedure Sort(const Compare: TListSortCompare);\r\n procedure SortList(const Compare: TListSortCompareFunc);\r\n property Capacity: Integer read GetCapacity write SetCapacity;\r\n property Count: Integer read GetCount write SetCount;\r\n property Items[Index: Integer]: JSValue read Get write Put; default;\r\n property List: TJSValueDynArray read GetList;\r\n end;\r\n\r\n { TPersistent }\r\n \r\n{$M+}\r\n\r\n TPersistent = class(TObject)\r\n private\r\n //FObservers : TFPList;\r\n procedure AssignError(Source: TPersistent);\r\n protected\r\n procedure DefineProperties(Filer: TFiler); virtual;\r\n procedure AssignTo(Dest: TPersistent); virtual;\r\n function GetOwner: TPersistent; virtual;\r\n public\r\n procedure Assign(Source: TPersistent); virtual;\r\n //procedure FPOAttachObserver(AObserver : TObject);\r\n //procedure FPODetachObserver(AObserver : TObject);\r\n //procedure FPONotifyObservers(ASender : TObject; AOperation: TFPObservedOperation; Data: TObject);\r\n function GetNamePath: string; virtual;\r\n procedure SetEvent(const ALookupRoot: TPersistent; const APropName, AMethodName: string); overload;\r\n procedure SetEvent(const AInstance: TPersistent; const ALookupRoot: TPersistent; const APropName, AMethodName: string); overload;\r\n end;\r\n TPersistentClass = Class of TPersistent;\r\n\r\n { TInterfacedPersistent }\r\n\r\n TInterfacedPersistent = class(TPersistent, IInterface)\r\n private\r\n FOwnerInterface: IInterface;\r\n protected\r\n function _AddRef: Integer; {$IFDEF MAKESTUB}stdcall;{$ENDIF}\r\n function _Release: Integer; {$IFDEF MAKESTUB}stdcall;{$ENDIF}\r\n public\r\n function QueryInterface(const IID: TGUID; out Obj): HRESULT; virtual;{$IFDEF MAKESTUB} stdcall;{$ENDIF}\r\n procedure AfterConstruction; override;\r\n end;\r\n\r\n\r\n TStrings = Class;\r\n { TStringsEnumerator class }\r\n\r\n TStringsEnumerator = class\r\n private\r\n FStrings: TStrings;\r\n FPosition: Integer;\r\n public\r\n constructor Create(AStrings: TStrings); reintroduce;\r\n function GetCurrent: String;\r\n function MoveNext: Boolean;\r\n property Current: String read GetCurrent;\r\n end;\r\n\r\n\r\n { TStrings class }\r\n TStrings = class(TPersistent)\r\n private\r\n FSpecialCharsInited : boolean;\r\n FAlwaysQuote: Boolean;\r\n FQuoteChar : Char;\r\n FDelimiter : Char;\r\n FNameValueSeparator : Char;\r\n FUpdateCount: Integer;\r\n FLBS : TTextLineBreakStyle;\r\n FSkipLastLineBreak : Boolean;\r\n FStrictDelimiter : Boolean;\r\n FLineBreak : String;\r\n function GetCommaText: string;\r\n function GetName(Index: Integer): string;\r\n function GetValue(const Name: string): string;\r\n Function GetLBS : TTextLineBreakStyle;\r\n Procedure SetLBS (AValue : TTextLineBreakStyle);\r\n procedure SetCommaText(const Value: string);\r\n procedure SetValue(const Name : String; Const Value: string);\r\n procedure SetDelimiter(c:Char);\r\n procedure SetQuoteChar(c:Char);\r\n procedure SetNameValueSeparator(c:Char);\r\n procedure DoSetTextStr(const Value: string; DoClear : Boolean);\r\n Function GetDelimiter : Char;\r\n Function GetNameValueSeparator : Char;\r\n Function GetQuoteChar: Char;\r\n Function GetLineBreak : String;\r\n procedure SetLineBreak(const S : String);\r\n Function GetSkipLastLineBreak : Boolean;\r\n procedure SetSkipLastLineBreak(const AValue : Boolean);\r\n procedure ReadData(Reader: TReader);\r\n procedure WriteData(Writer: TWriter);\r\n protected\r\n procedure DefineProperties(Filer: TFiler); override;\r\n procedure Error(const Msg: string; Data: Integer);\r\n function Get(Index: Integer): string; virtual; abstract;\r\n function GetCapacity: Integer; virtual;\r\n function GetCount: Integer; virtual; abstract;\r\n function GetObject(Index: Integer): TObject; virtual;\r\n function GetTextStr: string; virtual;\r\n procedure Put(Index: Integer; const S: string); virtual;\r\n procedure PutObject(Index: Integer; AObject: TObject); virtual;\r\n procedure SetCapacity(NewCapacity: Integer); virtual;\r\n procedure SetTextStr(const Value: string); virtual;\r\n procedure SetUpdateState(Updating: Boolean); virtual;\r\n property UpdateCount: Integer read FUpdateCount;\r\n Function DoCompareText(const s1,s2 : string) : PtrInt; virtual;\r\n Function GetDelimitedText: string;\r\n Procedure SetDelimitedText(Const AValue: string);\r\n Function GetValueFromIndex(Index: Integer): string;\r\n Procedure SetValueFromIndex(Index: Integer; const Value: string);\r\n Procedure CheckSpecialChars;\r\n// Class Function GetNextLine (Const Value : String; Var S : String; Var P : Integer) : Boolean;\r\n Function GetNextLinebreak (Const Value : String; Out S : String; Var P : Integer) : Boolean;\r\n public\r\n constructor Create; reintroduce;\r\n destructor Destroy; override;\r\n function ToObjectArray: TObjectDynArray; overload;\r\n function ToObjectArray(aStart,aEnd : Integer): TObjectDynArray; overload;\r\n function ToStringArray: TStringDynArray; overload;\r\n function ToStringArray(aStart,aEnd : Integer): TStringDynArray; overload;\r\n function Add(const S: string): Integer; virtual; overload;\r\n function Add(const Fmt : string; const Args : Array of const): Integer; overload;\r\n function AddFmt(const Fmt : string; const Args : Array of const): Integer;\r\n function AddObject(const S: string; AObject: TObject): Integer; virtual; overload;\r\n function AddObject(const Fmt: string; Args : Array of const; AObject: TObject): Integer; overload;\r\n procedure Append(const S: string);\r\n procedure AddStrings(TheStrings: TStrings); overload; virtual;\r\n procedure AddStrings(TheStrings: TStrings; ClearFirst : Boolean); overload;\r\n procedure AddStrings(const TheStrings: array of string); overload; virtual;\r\n procedure AddStrings(const TheStrings: array of string; ClearFirst : Boolean); overload;\r\n function AddPair(const AName, AValue: string): TStrings; overload;\r\n function AddPair(const AName, AValue: string; AObject: TObject): TStrings; overload;\r\n Procedure AddText(Const S : String); virtual;\r\n procedure Assign(Source: TPersistent); override;\r\n procedure BeginUpdate;\r\n procedure Clear; virtual; abstract;\r\n procedure Delete(Index: Integer); virtual; abstract;\r\n procedure EndUpdate;\r\n function Equals(Obj: TObject): Boolean; override; overload;\r\n function Equals(TheStrings: TStrings): Boolean; overload;\r\n procedure Exchange(Index1, Index2: Integer); virtual;\r\n function GetEnumerator: TStringsEnumerator;\r\n function IndexOf(const S: string): Integer; virtual;\r\n function IndexOfName(const Name: string): Integer; virtual;\r\n function IndexOfObject(AObject: TObject): Integer; virtual;\r\n procedure Insert(Index: Integer; const S: string); virtual; abstract;\r\n procedure InsertObject(Index: Integer; const S: string; AObject: TObject);\r\n procedure Move(CurIndex, NewIndex: Integer); virtual;\r\n procedure GetNameValue(Index : Integer; Out AName,AValue : String);\r\n Procedure LoadFromURL(Const aURL : String; Async : Boolean = True; OnLoaded : TNotifyEventRef = Nil; OnError: TStringNotifyEventRef = Nil); virtual;\r\n // Delphi compatibility. Must be an URL\r\n Procedure LoadFromFile(Const aFileName : String); overload;\r\n Procedure LoadFromFile(Const aFileName : String; const OnLoaded: TProc; const AError: TProcString); overload;\r\n function LoadFromFileAsync(const aFileName: string): TJSPromise;\r\n function ExtractName(Const S:String):String;\r\n procedure SaveToFile(const FileName: string); overload; virtual;\r\n Property TextLineBreakStyle : TTextLineBreakStyle Read GetLBS Write SetLBS;\r\n property Delimiter: Char read GetDelimiter write SetDelimiter;\r\n property DelimitedText: string read GetDelimitedText write SetDelimitedText;\r\n property LineBreak : string Read GetLineBreak write SetLineBreak;\r\n Property StrictDelimiter : Boolean Read FStrictDelimiter Write FStrictDelimiter;\r\n property AlwaysQuote: Boolean read FAlwaysQuote write FAlwaysQuote;\r\n property QuoteChar: Char read GetQuoteChar write SetQuoteChar;\r\n Property NameValueSeparator : Char Read GetNameValueSeparator Write SetNameValueSeparator;\r\n property ValueFromIndex[Index: Integer]: string read GetValueFromIndex write SetValueFromIndex;\r\n property Capacity: Integer read GetCapacity write SetCapacity;\r\n property CommaText: string read GetCommaText write SetCommaText;\r\n property Count: Integer read GetCount;\r\n property Names[Index: Integer]: string read GetName;\r\n property Objects[Index: Integer]: TObject read GetObject write PutObject;\r\n property Values[const Name: string]: string read GetValue write SetValue;\r\n property Strings[Index: Integer]: string read Get write Put; default;\r\n property Text: string read GetTextStr write SetTextStr;\r\n Property SkipLastLineBreak : Boolean Read GetSkipLastLineBreak Write SetSkipLastLineBreak;\r\n end;\r\n\r\n { TStringList}\r\n TStringItem = record\r\n FString: string;\r\n FObject: TObject;\r\n end;\r\n\r\n TStringsOption = (soStrictDelimiter, soWriteBOM, soTrailingLineBreak,\r\n soUseLocale);\r\n TStringsOptions = set of TStringsOption;\r\n\r\n TStringItemArray = Array of TStringItem;\r\n\r\n TStringList = class;\r\n TStringListSortCompare = function(List: TStringList; Index1, Index2: Integer): Integer;\r\n\r\n TStringsSortStyle = (sslNone,sslUser,sslAuto);\r\n TStringsSortStyles = Set of TStringsSortStyle;\r\n\r\n TStringList = class(TStrings)\r\n private\r\n FList: TStringItemArray;\r\n FCount: Integer;\r\n FOnChange: TNotifyEvent;\r\n FOnChanging: TNotifyEvent;\r\n FDuplicates: TDuplicates;\r\n FCaseSensitive : Boolean;\r\n FForceSort : Boolean;\r\n FOwnsObjects : Boolean;\r\n FSortStyle: TStringsSortStyle;\r\n procedure ExchangeItemsInt(Index1, Index2: Integer);\r\n function GetSorted: Boolean;\r\n procedure Grow;\r\n procedure InternalClear(FromIndex : Integer = 0; ClearOnly : Boolean = False);\r\n procedure QuickSort(L, R: Integer; CompareFn: TStringListSortCompare);\r\n procedure SetSorted(Value: Boolean);\r\n procedure SetCaseSensitive(b : boolean);\r\n procedure SetSortStyle(AValue: TStringsSortStyle);\r\n function GetTrailingLineBreak: boolean;\r\n procedure SetTrailingLineBreak(const Value: boolean);\r\n protected\r\n Procedure CheckIndex(AIndex : Integer);\r\n procedure ExchangeItems(Index1, Index2: Integer); virtual;\r\n procedure Changed; virtual;\r\n procedure Changing; virtual;\r\n function Get(Index: Integer): string; override;\r\n function GetCapacity: Integer; override;\r\n function GetCount: Integer; override;\r\n function GetObject(Index: Integer): TObject; override;\r\n procedure Put(Index: Integer; const S: string); override;\r\n procedure PutObject(Index: Integer; AObject: TObject); override;\r\n procedure SetCapacity(NewCapacity: Integer); override;\r\n procedure SetUpdateState(Updating: Boolean); override;\r\n procedure InsertItem(Index: Integer; const S: string); virtual;\r\n procedure InsertItem(Index: Integer; const S: string; O: TObject); virtual;\r\n Function DoCompareText(const s1,s2 : string) : PtrInt; override;\r\n function CompareStrings(const s1,s2 : string) : Integer; virtual;\r\n public\r\n constructor Create(AOwnsObjects: Boolean); overload;\r\n constructor Create(AQuoteChar, ADelimiter: Char); overload;\r\n constructor Create(AQuoteChar, ADelimiter: Char; AOptions: TStringsOptions); overload;\r\n constructor Create(ADuplicates: TDuplicates; ASorted: Boolean; ACaseSensitive: Boolean); overload;\r\n\r\n destructor Destroy; override;\r\n function Add(const S: string): Integer; override;\r\n procedure Clear; override;\r\n procedure Delete(Index: Integer); override;\r\n procedure Exchange(Index1, Index2: Integer); override;\r\n function Find(const S: string; Out Index: Integer): Boolean; virtual;\r\n function IndexOf(const S: string): Integer; override;\r\n procedure Insert(Index: Integer; const S: string); override;\r\n procedure Sort; virtual;\r\n procedure CustomSort(CompareFn: TStringListSortCompare); virtual;\r\n property Duplicates: TDuplicates read FDuplicates write FDuplicates;\r\n property Sorted: Boolean read GetSorted write SetSorted;\r\n property CaseSensitive: Boolean read FCaseSensitive write SetCaseSensitive;\r\n property OnChange: TNotifyEvent read FOnChange write FOnChange;\r\n property OnChanging: TNotifyEvent read FOnChanging write FOnChanging;\r\n property OwnsObjects : boolean read FOwnsObjects write FOwnsObjects;\r\n property SortStyle : TStringsSortStyle Read FSortStyle Write SetSortStyle;\r\n property TrailingLineBreak: boolean read GetTrailingLineBreak write SetTrailingLineBreak;\r\n end;\r\n\r\n TCollection = class;\r\n\r\n { TCollectionItem }\r\n\r\n TCollectionItem = class(TPersistent)\r\n private\r\n FCollection: TCollection;\r\n FID: Integer;\r\n FUpdateCount: Integer;\r\n function GetIndex: Integer;\r\n protected\r\n procedure SetCollection(Value: TCollection);virtual;\r\n procedure Changed(AllItems: Boolean);\r\n function GetOwner: TPersistent; override;\r\n function GetDisplayName: string; virtual;\r\n procedure SetIndex(Value: Integer); virtual;\r\n procedure SetDisplayName(const Value: string); virtual;\r\n property UpdateCount: Integer read FUpdateCount;\r\n public\r\n constructor Create(ACollection: TCollection); virtual; reintroduce;\r\n destructor Destroy; override;\r\n function GetNamePath: string; override;\r\n property Collection: TCollection read FCollection write SetCollection;\r\n property ID: Integer read FID;\r\n property Index: Integer read GetIndex write SetIndex;\r\n property DisplayName: string read GetDisplayName write SetDisplayName;\r\n end;\r\n\r\n TCollectionEnumerator = class\r\n private\r\n FCollection: TCollection;\r\n FPosition: Integer;\r\n public\r\n constructor Create(ACollection: TCollection); reintroduce;\r\n function GetCurrent: TCollectionItem;\r\n function MoveNext: Boolean;\r\n property Current: TCollectionItem read GetCurrent;\r\n end;\r\n\r\n TCollectionItemClass = class of TCollectionItem;\r\n TCollectionNotification = (cnAdded, cnExtracting, cnDeleting);\r\n TCollectionSortCompare = function (Item1, Item2: TCollectionItem): Integer;\r\n TCollectionSortCompareFunc = reference to function (Item1, Item2: TCollectionItem): Integer;\r\n\r\n TCollection = class(TPersistent)\r\n private\r\n FItemClass: TCollectionItemClass;\r\n FItems: TFpList;\r\n FUpdateCount: Integer;\r\n FNextID: Integer;\r\n FPropName: string;\r\n function GetCount: Integer;\r\n function GetPropName: string;\r\n procedure InsertItem(Item: TCollectionItem);\r\n procedure RemoveItem(Item: TCollectionItem);\r\n procedure DoClear;\r\n protected\r\n { Design-time editor support }\r\n function GetAttrCount: Integer; virtual;\r\n function GetAttr(Index: Integer): string; virtual;\r\n function GetItemAttr(Index, ItemIndex: Integer): string; virtual;\r\n procedure Changed;\r\n function GetItem(Index: Integer): TCollectionItem;\r\n procedure SetItem(Index: Integer; Value: TCollectionItem);\r\n procedure SetItemName(Item: TCollectionItem); virtual;\r\n procedure SetPropName; virtual;\r\n procedure Update(Item: TCollectionItem); virtual;\r\n procedure Notify(Item: TCollectionItem;Action: TCollectionNotification); virtual;\r\n property PropName: string read GetPropName write FPropName;\r\n property UpdateCount: Integer read FUpdateCount;\r\n property FPList : TFPList Read FItems;\r\n public\r\n constructor Create(AItemClass: TCollectionItemClass); reintroduce;\r\n destructor Destroy; override;\r\n function Owner: TPersistent;\r\n function Add: TCollectionItem;\r\n procedure Assign(Source: TPersistent); override;\r\n procedure BeginUpdate; virtual;\r\n procedure Clear;\r\n procedure EndUpdate; virtual;\r\n procedure Delete(Index: Integer);\r\n function GetEnumerator: TCollectionEnumerator;\r\n function GetNamePath: string; override;\r\n function Insert(Index: Integer): TCollectionItem;\r\n function FindItemID(ID: Integer): TCollectionItem;\r\n procedure Exchange(Const Index1, index2: integer);\r\n procedure Sort(Const Compare : TCollectionSortCompare);\r\n procedure SortList(Const Compare : TCollectionSortCompareFunc);\r\n property Count: Integer read GetCount;\r\n property ItemClass: TCollectionItemClass read FItemClass;\r\n property Items[Index: Integer]: TCollectionItem read GetItem write SetItem;\r\n end;\r\n\r\n TOwnedCollection = class(TCollection)\r\n private\r\n FOwner: TPersistent;\r\n protected\r\n Function GetOwner: TPersistent; override;\r\n public\r\n Constructor Create(AOwner: TPersistent; AItemClass: TCollectionItemClass); reintroduce;\r\n end;\r\n\r\n TComponent = Class;\r\n\r\n TOperation = (opInsert, opRemove);\r\n\r\n TComponentStateItem = ( csLoading, csReading, csWriting, csDestroying,\r\n csDesigning, csAncestor, csUpdating, csFixups, csFreeNotification,\r\n csInline, csDesignInstance);\r\n TComponentState = set of TComponentStateItem;\r\n TComponentStyleItem = (csInheritable, csCheckPropAvail, csSubComponent, csTransient);\r\n TComponentStyle = set of TComponentStyleItem;\r\n\r\n TGetChildProc = procedure (Child: TComponent) of object;\r\n\r\n TComponentName = type string;\r\n\r\n { TComponentEnumerator }\r\n\r\n TComponentEnumerator = class\r\n private\r\n FComponent: TComponent;\r\n FPosition: Integer;\r\n public\r\n constructor Create(AComponent: TComponent); reintroduce;\r\n function GetCurrent: TComponent;\r\n function MoveNext: Boolean;\r\n property Current: TComponent read GetCurrent;\r\n end;\r\n\r\n TComponent = class(TPersistent, IInterface)\r\n private\r\n FOwner: TComponent;\r\n FName: TComponentName;\r\n FTag: Ptrint;\r\n FComponents: TFpList;\r\n FFreeNotifies: TFpList;\r\n FDesignInfo: Longint;\r\n FComponentState: TComponentState;\r\n function GetComponent(AIndex: Integer): TComponent;\r\n function GetComponentCount: Integer;\r\n function GetComponentIndex: Integer;\r\n procedure Insert(AComponent: TComponent);\r\n procedure ReadLeft(AReader: TReader);\r\n procedure ReadTop(AReader: TReader);\r\n procedure Remove(AComponent: TComponent);\r\n procedure RemoveNotification(AComponent: TComponent);\r\n procedure SetComponentIndex(Value: Integer);\r\n procedure SetReference(Enable: Boolean);\r\n procedure WriteLeft(AWriter: TWriter);\r\n procedure WriteTop(AWriter: TWriter);\r\n protected\r\n FComponentStyle: TComponentStyle;\r\n procedure ChangeName(const NewName: TComponentName);\r\n procedure DefineProperties(Filer: TFiler); override;\r\n procedure GetChildren(Proc: TGetChildProc; Root: TComponent); virtual;\r\n function GetChildOwner: TComponent; virtual;\r\n function GetChildParent: TComponent; virtual;\r\n function GetOwner: TPersistent; override;\r\n procedure Loaded; virtual;\r\n procedure Loading; virtual;\r\n procedure SetWriting(Value: Boolean); virtual;\r\n procedure SetReading(Value: Boolean); virtual;\r\n procedure Notification(AComponent: TComponent; Operation: TOperation); virtual;\r\n procedure PaletteCreated; virtual;\r\n procedure ReadState(Reader: TReader); virtual;\r\n procedure SetAncestor(Value: Boolean);\r\n procedure SetDesigning(Value: Boolean; SetChildren : Boolean = True);\r\n procedure SetDesignInstance(Value: Boolean);\r\n procedure SetInline(Value: Boolean);\r\n procedure SetName(const NewName: TComponentName); virtual;\r\n procedure SetChildOrder(Child: TComponent; Order: Integer); virtual;\r\n procedure SetParentComponent(Value: TComponent); virtual;\r\n procedure Updating; virtual;\r\n procedure Updated; virtual;\r\n procedure ValidateRename(AComponent: TComponent; const CurName, NewName: string); virtual;\r\n procedure ValidateContainer(AComponent: TComponent); virtual;\r\n procedure ValidateInsert(AComponent: TComponent); virtual;\r\n protected\r\n function _AddRef: Integer; {$IFDEF MAKESTUB}stdcall;{$ENDIF}\r\n FLeft: Integer;\r\n FTop: Integer;\r\n function GetLeft: Integer; virtual;\r\n function GetTop: Integer; virtual;\r\n procedure SetLeft(AValue: Integer); virtual;\r\n procedure SetTop(AValue: Integer); virtual;\r\n function _Release: Integer; {$IFDEF MAKESTUB}stdcall;{$ENDIF}\r\n public\r\n constructor Create(AOwner: TComponent); virtual; reintroduce;\r\n destructor Destroy; override;\r\n procedure BeforeDestruction; override;\r\n procedure DestroyComponents;\r\n procedure Destroying;\r\n function QueryInterface(const IID: TGUID; out Obj): HRESULT; virtual; {$IFDEF MAKESTUB} stdcall;{$ENDIF}\r\n procedure AfterLoadDFMValues; virtual;\r\n procedure BeforeLoadDFMValues; virtual;\r\n procedure BeginUpdate; virtual;\r\n procedure EndUpdate; virtual;\r\n procedure WriteState(Writer: TWriter); virtual;\r\n// function ExecuteAction(Action: TBasicAction): Boolean; virtual;\r\n function FindComponent(const AName: string): TComponent;\r\n procedure FreeNotification(AComponent: TComponent);\r\n procedure RemoveFreeNotification(AComponent: TComponent);\r\n function GetNamePath: string; override;\r\n function GetParentComponent: TComponent; virtual;\r\n function HasParent: Boolean; virtual;\r\n procedure InsertComponent(AComponent: TComponent);\r\n procedure RemoveComponent(AComponent: TComponent);\r\n procedure SetSubComponent(ASubComponent: Boolean);\r\n function GetEnumerator: TComponentEnumerator;\r\n// function UpdateAction(Action: TBasicAction): Boolean; dynamic;\r\n property Components[Index: Integer]: TComponent read GetComponent;\r\n property ComponentCount: Integer read GetComponentCount;\r\n property ComponentIndex: Integer read GetComponentIndex write SetComponentIndex;\r\n property ComponentState: TComponentState read FComponentState;\r\n property ComponentStyle: TComponentStyle read FComponentStyle;\r\n property DesignInfo: Longint read FDesignInfo write FDesignInfo;\r\n property Left: Integer read GetLeft write SetLeft;\r\n property Owner: TComponent read FOwner;\r\n property Top: Integer read GetTop write SetTop;\r\n published\r\n property Name: TComponentName read FName write SetName stored False;\r\n property Tag: PtrInt read FTag write FTag default 0;\r\n end;\r\n TComponentClass = Class of TComponent;\r\n\r\n TSeekOrigin = (soBeginning, soCurrent, soEnd);\r\n\r\n { TStream }\r\n\r\n TStream = class(TObject)\r\n private\r\n FEndian: TEndian;\r\n function MakeInt(B: TBytes; aSize: Integer; Signed: Boolean): NativeInt;\r\n function MakeBytes(B: NativeInt; aSize: Integer; Signed: Boolean): TBytes;\r\n protected\r\n procedure InvalidSeek; virtual;\r\n procedure Discard(const Count: NativeInt);\r\n procedure DiscardLarge(Count: NativeInt; const MaxBufferSize: Longint);\r\n procedure FakeSeekForward(Offset: NativeInt; const Origin: TSeekOrigin; const Pos: NativeInt);\r\n function GetPosition: NativeInt; virtual;\r\n procedure SetPosition(const Pos: NativeInt); virtual;\r\n function GetSize: NativeInt; virtual;\r\n procedure SetSize(const NewSize: NativeInt); virtual;\r\n procedure SetSize64(const NewSize: NativeInt); virtual;\r\n procedure ReadNotImplemented;\r\n procedure WriteNotImplemented;\r\n function ReadMaxSizeData(Buffer : TBytes; aSize,aCount : NativeInt) : NativeInt;\r\n Procedure ReadExactSizeData(Buffer : TBytes; aSize,aCount : NativeInt);\r\n function WriteMaxSizeData(Const Buffer : TBytes; aSize,aCount : NativeInt) : NativeInt;\r\n Procedure WriteExactSizeData(Const Buffer : TBytes; aSize,aCount : NativeInt);\r\n public\r\n function Read(var Buffer: TBytes; Count: Longint): Longint; overload;\r\n function Read(Buffer : TBytes; aOffset, Count: Longint): Longint; virtual; abstract; overload;\r\n\r\n function Write(const Buffer: TBytes; Count: Longint): Longint; virtual; overload;\r\n function Write(const Buffer: TBytes; Offset, Count: Longint): Longint; virtual; abstract; overload;\r\n\r\n function Seek(const Offset: NativeInt; Origin: TSeekOrigin): NativeInt; virtual; abstract; overload;\r\n\r\n function ReadData(Buffer: TBytes; Count: NativeInt): NativeInt; overload;\r\n function ReadData(var Buffer: Boolean): NativeInt; overload;\r\n function ReadData(var Buffer: Boolean; Count: NativeInt): NativeInt; overload;\r\n function ReadData(var Buffer: WideChar): NativeInt; overload;\r\n function ReadData(var Buffer: WideChar; Count: NativeInt): NativeInt; overload;\r\n function ReadData(var Buffer: Int8): NativeInt; overload;\r\n function ReadData(var Buffer: Int8; Count: NativeInt): NativeInt; overload;\r\n function ReadData(var Buffer: UInt8): NativeInt; overload;\r\n function ReadData(var Buffer: UInt8; Count: NativeInt): NativeInt; overload;\r\n function ReadData(var Buffer: Int16): NativeInt; overload;\r\n function ReadData(var Buffer: Int16; Count: NativeInt): NativeInt; overload;\r\n function ReadData(var Buffer: UInt16): NativeInt; overload;\r\n function ReadData(var Buffer: UInt16; Count: NativeInt): NativeInt; overload;\r\n function ReadData(var Buffer: Int32): NativeInt; overload;\r\n function ReadData(var Buffer: Int32; Count: NativeInt): NativeInt; overload;\r\n function ReadData(var Buffer: UInt32): NativeInt; overload;\r\n function ReadData(var Buffer: UInt32; Count: NativeInt): NativeInt; overload;\r\n // NativeLargeint. Stored as a float64, Read as float64.\r\n function ReadData(var Buffer: NativeLargeInt): NativeInt; overload;\r\n function ReadData(var Buffer: NativeLargeInt; Count: NativeInt): NativeInt; overload;\r\n function ReadData(var Buffer: NativeLargeUInt): NativeInt; overload;\r\n function ReadData(var Buffer: NativeLargeUInt; Count: NativeInt): NativeInt; overload;\r\n // Note: a ReadData with Int64 would be Delphi/FPC incompatible\r\n function ReadData(var Buffer: Double): NativeInt; overload;\r\n function ReadData(var Buffer: Double; Count: NativeInt): NativeInt; overload;\r\n procedure ReadBuffer(var Buffer: TBytes; Count: NativeInt); overload;\r\n procedure ReadBuffer(var Buffer: TBytes; Offset, Count: NativeInt); overload;\r\n\r\n procedure ReadBufferData(var Buffer: Boolean); overload;\r\n procedure ReadBufferData(var Buffer: Boolean; Count: NativeInt); overload;\r\n procedure ReadBufferData(var Buffer: WideChar); overload;\r\n procedure ReadBufferData(var Buffer: WideChar; Count: NativeInt); overload;\r\n procedure ReadBufferData(var Buffer: Int8); overload;\r\n procedure ReadBufferData(var Buffer: Int8; Count: NativeInt); overload;\r\n procedure ReadBufferData(var Buffer: UInt8); overload;\r\n procedure ReadBufferData(var Buffer: UInt8; Count: NativeInt); overload;\r\n procedure ReadBufferData(var Buffer: Int16); overload;\r\n procedure ReadBufferData(var Buffer: Int16; Count: NativeInt); overload;\r\n procedure ReadBufferData(var Buffer: UInt16); overload;\r\n procedure ReadBufferData(var Buffer: UInt16; Count: NativeInt); overload;\r\n procedure ReadBufferData(var Buffer: Int32); overload;\r\n procedure ReadBufferData(var Buffer: Int32; Count: NativeInt); overload;\r\n procedure ReadBufferData(var Buffer: UInt32); overload;\r\n procedure ReadBufferData(var Buffer: UInt32; Count: NativeInt); overload;\r\n // NativeLargeint. Stored as a float64, Read as float64.\r\n procedure ReadBufferData(var Buffer: NativeLargeInt); overload;\r\n procedure ReadBufferData(var Buffer: NativeLargeInt; Count: NativeInt); overload;\r\n procedure ReadBufferData(var Buffer: NativeLargeUInt); overload;\r\n procedure ReadBufferData(var Buffer: NativeLargeUInt; Count: NativeInt); overload;\r\n procedure ReadBufferData(var Buffer: Double); overload;\r\n procedure ReadBufferData(var Buffer: Double; Count: NativeInt); overload;\r\n procedure WriteBuffer(const Buffer: TBytes; Count: NativeInt); overload;\r\n procedure WriteBuffer(const Buffer: TBytes; Offset, Count: NativeInt); overload;\r\n\r\n function WriteData(const Buffer: TBytes; Count: NativeInt): NativeInt; overload;\r\n function WriteData(const Buffer: Boolean): NativeInt; overload;\r\n function WriteData(const Buffer: Boolean; Count: NativeInt): NativeInt; overload;\r\n function WriteData(const Buffer: WideChar): NativeInt; overload;\r\n function WriteData(const Buffer: WideChar; Count: NativeInt): NativeInt; overload;\r\n function WriteData(const Buffer: Int8): NativeInt; overload;\r\n function WriteData(const Buffer: Int8; Count: NativeInt): NativeInt; overload;\r\n function WriteData(const Buffer: UInt8): NativeInt; overload;\r\n function WriteData(const Buffer: UInt8; Count: NativeInt): NativeInt; overload;\r\n function WriteData(const Buffer: Int16): NativeInt; overload;\r\n function WriteData(const Buffer: Int16; Count: NativeInt): NativeInt; overload;\r\n function WriteData(const Buffer: UInt16): NativeInt; overload;\r\n function WriteData(const Buffer: UInt16; Count: NativeInt): NativeInt; overload;\r\n function WriteData(const Buffer: Int32): NativeInt; overload;\r\n function WriteData(const Buffer: Int32; Count: NativeInt): NativeInt; overload;\r\n function WriteData(const Buffer: UInt32): NativeInt; overload;\r\n function WriteData(const Buffer: UInt32; Count: NativeInt): NativeInt; overload;\r\n // NativeLargeint. Stored as a float64, Read as float64.\r\n function WriteData(const Buffer: NativeLargeInt): NativeInt; overload;\r\n function WriteData(const Buffer: NativeLargeInt; Count: NativeInt): NativeInt; overload;\r\n function WriteData(const Buffer: NativeLargeUInt): NativeInt; overload;\r\n function WriteData(const Buffer: NativeLargeUInt; Count: NativeInt): NativeInt; overload;\r\n function WriteData(const Buffer: Double): NativeInt; overload;\r\n function WriteData(const Buffer: Double; Count: NativeInt): NativeInt; overload;\r\n{$IFDEF FPC_HAS_TYPE_EXTENDED}\r\n function WriteData(const Buffer: Extended): NativeInt; overload;\r\n function WriteData(const Buffer: Extended; Count: NativeInt): NativeInt; overload;\r\n function WriteData(const Buffer: TExtended80Rec): NativeInt; overload;\r\n function WriteData(const Buffer: TExtended80Rec; Count: NativeInt): NativeInt; overload;\r\n{$ENDIF}\r\n procedure WriteBufferData(Buffer: Int32); overload;\r\n procedure WriteBufferData(Buffer: Int32; Count: NativeInt); overload;\r\n procedure WriteBufferData(Buffer: Boolean); overload;\r\n procedure WriteBufferData(Buffer: Boolean; Count: NativeInt); overload;\r\n procedure WriteBufferData(Buffer: WideChar); overload;\r\n procedure WriteBufferData(Buffer: WideChar; Count: NativeInt); overload;\r\n procedure WriteBufferData(Buffer: Int8); overload;\r\n procedure WriteBufferData(Buffer: Int8; Count: NativeInt); overload;\r\n procedure WriteBufferData(Buffer: UInt8); overload;\r\n procedure WriteBufferData(Buffer: UInt8; Count: NativeInt); overload;\r\n procedure WriteBufferData(Buffer: Int16); overload;\r\n procedure WriteBufferData(Buffer: Int16; Count: NativeInt); overload;\r\n procedure WriteBufferData(Buffer: UInt16); overload;\r\n procedure WriteBufferData(Buffer: UInt16; Count: NativeInt); overload;\r\n procedure WriteBufferData(Buffer: UInt32); overload;\r\n procedure WriteBufferData(Buffer: UInt32; Count: NativeInt); overload;\r\n // NativeLargeint. Stored as a float64, Read as float64.\r\n procedure WriteBufferData(Buffer: NativeLargeInt); overload;\r\n procedure WriteBufferData(Buffer: NativeLargeInt; Count: NativeInt); overload;\r\n procedure WriteBufferData(Buffer: NativeLargeUInt); overload;\r\n procedure WriteBufferData(Buffer: NativeLargeUInt; Count: NativeInt); overload;\r\n procedure WriteBufferData(Buffer: Double); overload;\r\n procedure WriteBufferData(Buffer: Double; Count: NativeInt); overload;\r\n function CopyFrom(Source: TStream; Count: NativeInt): NativeInt;\r\n function ReadComponent(Instance: TComponent): TComponent;\r\n function ReadComponentRes(Instance: TComponent): TComponent;\r\n procedure WriteComponent(Instance: TComponent);\r\n procedure WriteComponentRes(const ResName: string; Instance: TComponent);\r\n procedure WriteDescendent(Instance, Ancestor: TComponent);\r\n procedure WriteDescendentRes(const ResName: string; Instance, Ancestor: TComponent);\r\n procedure WriteResourceHeader(const ResName: string; {!!!:out} var FixupInfo: Longint);\r\n procedure FixupResourceHeader(FixupInfo: Longint);\r\n procedure ReadResHeader;\r\n function ReadByte : Byte;\r\n function ReadWord : Word;\r\n function ReadDWord : Cardinal;\r\n function ReadQWord : NativeLargeUInt;\r\n procedure WriteByte(b : Byte);\r\n procedure WriteWord(w : Word);\r\n procedure WriteDWord(d : Cardinal);\r\n procedure WriteQWord(q : NativeLargeUInt);\r\n property Position: NativeInt read GetPosition write SetPosition;\r\n property Size: NativeInt read GetSize write SetSize64;\r\n Property Endian: TEndian Read FEndian Write FEndian;\r\n end;\r\n\r\n { TCustomMemoryStream abstract class }\r\n\r\n TCustomMemoryStream = class(TStream)\r\n private\r\n FMemory: TJSArrayBuffer;\r\n FDataView : TJSDataView;\r\n FDataArray : TJSUint8Array;\r\n FSize, FPosition: PtrInt;\r\n FSizeBoundsSeek : Boolean;\r\n function GetDataArray: TJSUint8Array;\r\n function GetDataView: TJSDataview;\r\n protected\r\n Function GetSize : NativeInt; Override;\r\n function GetPosition: NativeInt; Override;\r\n procedure SetPointer(Ptr: TJSArrayBuffer; ASize: PtrInt);\r\n Property DataView : TJSDataview Read GetDataView;\r\n Property DataArray : TJSUint8Array Read GetDataArray;\r\n public\r\n Class Function MemoryToBytes(Mem : TJSArrayBuffer) : TBytes; overload;\r\n Class Function MemoryToBytes(Mem : TJSUint8Array) : TBytes; overload;\r\n Class Function BytesToMemory(aBytes : TBytes) : TJSArrayBuffer;\r\n function Read(Buffer : TBytes; Offset, Count: LongInt): LongInt; override;\r\n function Seek(const Offset: NativeInt; Origin: TSeekOrigin): NativeInt; override;\r\n procedure SaveToStream(Stream: TStream);\r\n Procedure LoadFromURL(Const aURL : String; Async : Boolean = True; OnLoaded : TNotifyEventRef = Nil; OnError: TStringNotifyEventRef = Nil); virtual;\r\n // Delphi compatibility. Must be an URL\r\n Procedure LoadFromFile(Const aFileName : String; const OnLoaded : TProc = Nil; const AError: TProcString = Nil);\r\n property Memory: TJSArrayBuffer read FMemory;\r\n Property SizeBoundsSeek : Boolean Read FSizeBoundsSeek Write FSizeBoundsSeek;\r\n end;\r\n\r\n { TMemoryStream }\r\n\r\n TMemoryStream = class(TCustomMemoryStream)\r\n private\r\n FCapacity: PtrInt;\r\n procedure SetCapacity(NewCapacity: PtrInt);\r\n protected\r\n function Realloc(var NewCapacity: PtrInt): TJSArrayBuffer; virtual;\r\n property Capacity: PtrInt read FCapacity write SetCapacity;\r\n public\r\n destructor Destroy; override;\r\n procedure Clear;\r\n procedure LoadFromStream(Stream: TStream);\r\n procedure SetSize(const NewSize: NativeInt); override;\r\n function Write(const Buffer: TBytes; Offset, Count: LongInt): LongInt; override;\r\n function Write(const Buffer: TBytes; Count: LongInt): LongInt; override;\r\n end;\r\n\r\n{ TBytesStream }\r\n\r\n TBytesStream = class(TMemoryStream)\r\n private\r\n function GetBytes: TBytes;\r\n public\r\n constructor Create(const ABytes: TBytes); virtual; overload;\r\n property Bytes: TBytes read GetBytes;\r\n end;\r\n\r\n { TStringStream }\r\n\r\n TStringStream = class(TMemoryStream)\r\n private\r\n FEncoding: TEncoding;\r\n FOwnsEncoding: Boolean;\r\n function GetDataString : String;\r\n public\r\n constructor Create; reintroduce; overload;\r\n constructor Create(const aString: String); virtual; overload;\r\n constructor Create(const AString: string; AEncoding: TEncoding; AOwnsEncoding: Boolean = True); overload;\r\n destructor Destroy; override;\r\n function ReadString(Count: Integer): string;\r\n procedure WriteString(const AString: string);\r\n property DataString: String read GetDataString;\r\n property Encoding: TEncoding read FEncoding;\r\n end;\r\n\r\n TFPResourceHMODULE = THandle;\r\n\r\n { TResourceStream }\r\n\r\n TResourceStream = class(TCustomMemoryStream)\r\n private\r\n procedure Initialize(aInfo : TResourceInfo);\r\n procedure Initialize(Instance{%H-}: TFPResourceHMODULE; Name, ResType{%H-}: String);\r\n public\r\n constructor Create(aInfo: TResourceInfo);\r\n constructor Create(Instance: TFPResourceHMODULE; const ResName, ResType : String);\r\n constructor CreateFromID(Instance: TFPResourceHMODULE; ResID: Integer; ResType: String);\r\n function Write(const Buffer{%H-}: TBytes; Offset{%H-}, Count{%H-}: LongInt): LongInt; override;\r\n destructor Destroy; override;\r\n end;\r\n\r\n\r\n TFilerFlag = (ffInherited, ffChildPos, ffInline);\r\n TFilerFlags = set of TFilerFlag;\r\n\r\n TReaderProc = procedure(Reader: TReader) of object;\r\n TWriterProc = procedure(Writer: TWriter) of object;\r\n TStreamProc = procedure(Stream: TStream) of object;\r\n\r\n TFiler = class(TObject)\r\n private\r\n FRoot: TComponent;\r\n FLookupRoot: TComponent;\r\n FAncestor: TPersistent;\r\n FIgnoreChildren: Boolean;\r\n protected\r\n procedure SetRoot(ARoot: TComponent); virtual;\r\n public\r\n procedure DefineProperty(const Name: string;\r\n ReadData: TReaderProc; WriteData: TWriterProc;\r\n HasData: Boolean); virtual; abstract;\r\n procedure DefineBinaryProperty(const Name: string;\r\n ReadData, WriteData: TStreamProc;\r\n HasData: Boolean); virtual; abstract;\r\n Procedure FlushBuffer; virtual; abstract;\r\n property Root: TComponent read FRoot write SetRoot;\r\n property LookupRoot: TComponent read FLookupRoot;\r\n property Ancestor: TPersistent read FAncestor write FAncestor;\r\n property IgnoreChildren: Boolean read FIgnoreChildren write FIgnoreChildren;\r\n end;\r\n\r\n\r\n TValueType = (\r\n vaNull, vaList, vaInt8, vaInt16, vaInt32, vaDouble,\r\n vaString, vaIdent, vaFalse, vaTrue, vaBinary, vaSet,\r\n vaNil, vaCollection, vaCurrency, vaDate, vaNativeInt\r\n );\r\n\r\n { TAbstractObjectReader }\r\n\r\n TAbstractObjectReader = class\r\n public\r\n Procedure FlushBuffer; virtual;\r\n function NextValue: TValueType; virtual; abstract;\r\n function ReadValue: TValueType; virtual; abstract;\r\n procedure BeginRootComponent; virtual; abstract;\r\n procedure BeginComponent(var Flags: TFilerFlags; var AChildPos: Integer;\r\n var CompClassName, CompName: String); virtual; abstract;\r\n function BeginProperty: String; virtual; abstract;\r\n\r\n //Please don't use read, better use ReadBinary whenever possible\r\n procedure Read(var Buffer : TBytes; Count: Longint); virtual;abstract;\r\n\r\n { All ReadXXX methods are called _after_ the value type has been read! }\r\n procedure ReadBinary(const DestData: TMemoryStream); virtual; abstract;\r\n function ReadFloat: Extended; virtual; abstract;\r\n function ReadCurrency: Currency; virtual; abstract;\r\n function ReadIdent(ValueType: TValueType): String; virtual; abstract;\r\n function ReadInt8: ShortInt; virtual; abstract;\r\n function ReadInt16: SmallInt; virtual; abstract;\r\n function ReadInt32: LongInt; virtual; abstract;\r\n function ReadNativeInt: NativeInt; virtual; abstract;\r\n function ReadSet(EnumType: TTypeInfoEnum): Integer; virtual; abstract;\r\n procedure ReadSignature; virtual; abstract;\r\n function ReadStr: String; virtual; abstract;\r\n function ReadString(StringType: TValueType): String; virtual; abstract;\r\n function ReadWideString: WideString;virtual;abstract;\r\n function ReadUnicodeString: UnicodeString;virtual;abstract;\r\n procedure SkipComponent(SkipComponentInfos: Boolean); virtual; abstract;\r\n procedure SkipValue; virtual; abstract;\r\n end;\r\n\r\n { TBinaryObjectReader }\r\n\r\n TBinaryObjectReader = class(TAbstractObjectReader)\r\n protected\r\n FStream: TStream;\r\n function ReadWord : word;\r\n function ReadDWord : longword;\r\n procedure SkipProperty;\r\n procedure SkipSetBody;\r\n public\r\n constructor Create(Stream: TStream);\r\n function NextValue: TValueType; override;\r\n function ReadValue: TValueType; override;\r\n procedure BeginRootComponent; override;\r\n procedure BeginComponent(var Flags: TFilerFlags; var AChildPos: Integer;\r\n var CompClassName, CompName: String); override;\r\n function BeginProperty: String; override;\r\n //Please don't use read, better use ReadBinary whenever possible\r\n procedure Read(var Buffer : TBytes; Count: Longint); override;\r\n procedure ReadBinary(const DestData: TMemoryStream); override;\r\n function ReadFloat: Extended; override;\r\n function ReadCurrency: Currency; override;\r\n function ReadIdent(ValueType: TValueType): String; override;\r\n function ReadInt8: ShortInt; override;\r\n function ReadInt16: SmallInt; override;\r\n function ReadInt32: LongInt; override;\r\n function ReadNativeInt: NativeInt; override;\r\n function ReadSet(EnumType: TTypeInfoEnum): Integer; override;\r\n procedure ReadSignature; override;\r\n function ReadStr: String; override;\r\n function ReadString(StringType: TValueType): String; override;\r\n function ReadWideString: WideString;override;\r\n function ReadUnicodeString: UnicodeString;override;\r\n procedure SkipComponent(SkipComponentInfos: Boolean); override;\r\n procedure SkipValue; override;\r\n end;\r\n\r\n\r\n TFindMethodEvent = procedure(Reader: TReader; const MethodName: string; var Address: CodePointer; var Error: Boolean) of object;\r\n TSetNameEvent = procedure(Reader: TReader; Component: TComponent; var Name: string) of object;\r\n TReferenceNameEvent = procedure(Reader: TReader; var Name: string) of object;\r\n TAncestorNotFoundEvent = procedure(Reader: TReader; const ComponentName: string; ComponentClass: TPersistentClass; var Component: TComponent) of object;\r\n TReadComponentsProc = procedure(Component: TComponent) of object;\r\n TReaderError = procedure(Reader: TReader; const Message: string; var Handled: Boolean) of object;\r\n TPropertyNotFoundEvent = procedure(Reader: TReader; Instance: TPersistent; var PropName: string; IsPath: boolean; var Handled, Skip: Boolean) of object;\r\n TFindComponentClassEvent = procedure(Reader: TReader; const ClassName: string; var ComponentClass: TComponentClass) of object;\r\n TCreateComponentEvent = procedure(Reader: TReader; ComponentClass: TComponentClass; var Component: TComponent) of object;\r\n\r\n TSetMethodPropertyEvent = procedure(Reader: TReader; Instance: TPersistent; PropInfo: TTypeMemberProperty; const TheMethodName: string;\r\n var Handled: boolean) of object;\r\n TReadWriteStringPropertyEvent = procedure(Sender:TObject; const Instance: TPersistent; PropInfo: TTypeMemberProperty; var Content:string) of object;\r\n\r\n\r\n { TReader }\r\n\r\n TReader = class(TFiler)\r\n private\r\n FDriver: TAbstractObjectReader;\r\n FOwner: TComponent;\r\n FParent: TComponent;\r\n FFixups: TObject;\r\n FLoaded: TFpList;\r\n FOnFindMethod: TFindMethodEvent;\r\n FOnSetMethodProperty: TSetMethodPropertyEvent;\r\n FOnSetName: TSetNameEvent;\r\n FOnReferenceName: TReferenceNameEvent;\r\n FOnAncestorNotFound: TAncestorNotFoundEvent;\r\n FOnError: TReaderError;\r\n FOnPropertyNotFound: TPropertyNotFoundEvent;\r\n FOnFindComponentClass: TFindComponentClassEvent;\r\n FOnCreateComponent: TCreateComponentEvent;\r\n FPropName: string;\r\n FCanHandleExcepts: Boolean;\r\n FOnReadStringProperty:TReadWriteStringPropertyEvent;\r\n procedure DoFixupReferences;\r\n function FindComponentClass(const AClassName: string): TComponentClass;\r\n protected\r\n function Error(const Message: string): Boolean; virtual;\r\n function FindMethod(ARoot: TComponent; const AMethodName: string): CodePointer; virtual;\r\n procedure ReadProperty(AInstance: TPersistent);\r\n procedure ReadPropValue(Instance: TPersistent; PropInfo: TTypeMemberProperty);\r\n procedure PropertyError;\r\n procedure ReadData(Instance: TComponent);\r\n property PropName: string read FPropName;\r\n property CanHandleExceptions: Boolean read FCanHandleExcepts;\r\n function CreateDriver(Stream: TStream): TAbstractObjectReader; virtual;\r\n public\r\n constructor Create(Stream: TStream);\r\n destructor Destroy; override;\r\n Procedure FlushBuffer; override;\r\n procedure BeginReferences;\r\n procedure CheckValue(Value: TValueType);\r\n procedure DefineProperty(const Name: string;\r\n AReadData: TReaderProc; WriteData: TWriterProc;\r\n HasData: Boolean); override;\r\n procedure DefineBinaryProperty(const Name: string;\r\n AReadData, WriteData: TStreamProc;\r\n HasData: Boolean); override;\r\n function EndOfList: Boolean;\r\n procedure EndReferences;\r\n procedure FixupReferences;\r\n function NextValue: TValueType;\r\n //Please don't use read, better use ReadBinary whenever possible\r\n //uuups, ReadBinary is protected ..\r\n procedure Read(var Buffer : TBytes; Count: LongInt); virtual;\r\n\r\n function ReadBoolean: Boolean;\r\n function ReadChar: Char;\r\n function ReadWideChar: WideChar;\r\n function ReadUnicodeChar: UnicodeChar;\r\n procedure ReadCollection(Collection: TCollection);\r\n function ReadComponent(Component: TComponent): TComponent;\r\n procedure ReadComponents(AOwner, AParent: TComponent;\r\n Proc: TReadComponentsProc);\r\n function ReadFloat: Extended;\r\n function ReadCurrency: Currency;\r\n function ReadIdent: string;\r\n function ReadInteger: Longint;\r\n function ReadNativeInt: NativeInt;\r\n function ReadSet(EnumType: Pointer): Integer;\r\n procedure ReadListBegin;\r\n procedure ReadListEnd;\r\n function ReadRootComponent(ARoot: TComponent): TComponent;\r\n function ReadVariant: JSValue;\r\n procedure ReadSignature;\r\n function ReadString: string;\r\n function ReadWideString: WideString;\r\n function ReadUnicodeString: UnicodeString;\r\n function ReadValue: TValueType;\r\n procedure CopyValue(Writer: TWriter);\r\n property Driver: TAbstractObjectReader read FDriver;\r\n property Owner: TComponent read FOwner write FOwner;\r\n property Parent: TComponent read FParent write FParent;\r\n property OnError: TReaderError read FOnError write FOnError;\r\n property OnPropertyNotFound: TPropertyNotFoundEvent read FOnPropertyNotFound write FOnPropertyNotFound;\r\n property OnFindMethod: TFindMethodEvent read FOnFindMethod write FOnFindMethod;\r\n property OnSetMethodProperty: TSetMethodPropertyEvent read FOnSetMethodProperty write FOnSetMethodProperty;\r\n property OnSetName: TSetNameEvent read FOnSetName write FOnSetName;\r\n property OnReferenceName: TReferenceNameEvent read FOnReferenceName write FOnReferenceName;\r\n property OnAncestorNotFound: TAncestorNotFoundEvent read FOnAncestorNotFound write FOnAncestorNotFound;\r\n property OnCreateComponent: TCreateComponentEvent read FOnCreateComponent write FOnCreateComponent;\r\n property OnFindComponentClass: TFindComponentClassEvent read FOnFindComponentClass write FOnFindComponentClass;\r\n property OnReadStringProperty: TReadWriteStringPropertyEvent read FOnReadStringProperty write FOnReadStringProperty;\r\n end;\r\n\r\n\r\n { TAbstractObjectWriter }\r\n\r\n TAbstractObjectWriter = class\r\n public\r\n { Begin/End markers. Those ones who don't have an end indicator, use\r\n \"EndList\", after the occurrence named in the comment. Note that this\r\n only counts for \"EndList\" calls on the same level; each BeginXXX call\r\n increases the current level. }\r\n procedure BeginCollection; virtual; abstract; { Ends with the next \"EndList\" }\r\n procedure BeginComponent(Component: TComponent; Flags: TFilerFlags;\r\n ChildPos: Integer); virtual; abstract; { Ends after the second \"EndList\" }\r\n procedure WriteSignature; virtual; abstract;\r\n procedure BeginList; virtual; abstract;\r\n procedure EndList; virtual; abstract;\r\n procedure BeginProperty(const PropName: String); virtual; abstract;\r\n procedure EndProperty; virtual; abstract;\r\n //Please don't use write, better use WriteBinary whenever possible\r\n procedure Write(const Buffer : TBytes; Count: Longint); virtual;abstract;\r\n Procedure FlushBuffer; virtual; abstract;\r\n\r\n procedure WriteBinary(const Buffer : TBytes; Count: Longint); virtual; abstract;\r\n procedure WriteBoolean(Value: Boolean); virtual; abstract;\r\n // procedure WriteChar(Value: Char);\r\n procedure WriteFloat(const Value: Extended); virtual; abstract;\r\n procedure WriteCurrency(const Value: Currency); virtual; abstract;\r\n procedure WriteIdent(const Ident: string); virtual; abstract;\r\n procedure WriteInteger(Value: NativeInt); virtual; abstract;\r\n procedure WriteNativeInt(Value: NativeInt); virtual; abstract;\r\n procedure WriteVariant(const Value: JSValue); virtual; abstract;\r\n procedure WriteMethodName(const Name: String); virtual; abstract;\r\n procedure WriteSet(Value: LongInt; SetType: Pointer); virtual; abstract;\r\n procedure WriteString(const Value: String); virtual; abstract;\r\n procedure WriteWideString(const Value: WideString);virtual;abstract;\r\n procedure WriteUnicodeString(const Value: UnicodeString);virtual;abstract;\r\n end;\r\n\r\n { TBinaryObjectWriter }\r\n\r\n TBinaryObjectWriter = class(TAbstractObjectWriter)\r\n protected\r\n FStream: TStream;\r\n FBuffer: Pointer;\r\n FBufSize: Integer;\r\n FBufPos: Integer;\r\n FBufEnd: Integer;\r\n procedure WriteWord(w : word);\r\n procedure WriteDWord(lw : longword);\r\n procedure WriteValue(Value: TValueType);\r\n public\r\n constructor Create(Stream: TStream);\r\n procedure WriteSignature; override;\r\n procedure BeginCollection; override;\r\n procedure BeginComponent(Component: TComponent; Flags: TFilerFlags;\r\n ChildPos: Integer); override;\r\n procedure BeginList; override;\r\n procedure EndList; override;\r\n procedure BeginProperty(const PropName: String); override;\r\n procedure EndProperty; override;\r\n Procedure FlushBuffer; override;\r\n\r\n //Please don't use write, better use WriteBinary whenever possible\r\n procedure Write(const Buffer : TBytes; Count: Longint); override;\r\n procedure WriteBinary(const Buffer : TBytes; Count: LongInt); override;\r\n procedure WriteBoolean(Value: Boolean); override;\r\n procedure WriteFloat(const Value: Extended); override;\r\n procedure WriteCurrency(const Value: Currency); override;\r\n procedure WriteIdent(const Ident: string); override;\r\n procedure WriteInteger(Value: NativeInt); override;\r\n procedure WriteNativeInt(Value: NativeInt); override;\r\n procedure WriteMethodName(const Name: String); override;\r\n procedure WriteSet(Value: LongInt; SetType: Pointer); override;\r\n procedure WriteStr(const Value: String);\r\n procedure WriteString(const Value: String); override;\r\n procedure WriteWideString(const Value: WideString); override;\r\n procedure WriteUnicodeString(const Value: UnicodeString); override;\r\n procedure WriteVariant(const VarValue: JSValue);override;\r\n end;\r\n\r\n TFindAncestorEvent = procedure (Writer: TWriter; Component: TComponent;\r\n const Name: string; var Ancestor, RootAncestor: TComponent) of object;\r\n TWriteMethodPropertyEvent = procedure (Writer: TWriter; Instance: TPersistent;\r\n PropInfo: TTypeMemberProperty;\r\n const MethodValue, DefMethodValue: TMethod;\r\n var Handled: boolean) of object;\r\n\r\n { TWriter }\r\n\r\n TWriter = class(TFiler)\r\n private\r\n FDriver: TAbstractObjectWriter;\r\n FDestroyDriver: Boolean;\r\n FRootAncestor: TComponent;\r\n FPropPath: String;\r\n FAncestors: TStringList;\r\n FAncestorPos: Integer;\r\n FCurrentPos: Integer;\r\n FOnFindAncestor: TFindAncestorEvent;\r\n FOnWriteMethodProperty: TWriteMethodPropertyEvent;\r\n FOnWriteStringProperty:TReadWriteStringPropertyEvent;\r\n procedure AddToAncestorList(Component: TComponent);\r\n procedure WriteComponentData(Instance: TComponent);\r\n Procedure DetermineAncestor(Component: TComponent);\r\n procedure DoFindAncestor(Component : TComponent);\r\n protected\r\n procedure SetRoot(ARoot: TComponent); override;\r\n procedure WriteBinary(AWriteData: TStreamProc);\r\n procedure WriteProperty(Instance: TPersistent; PropInfo: TTypeMemberProperty);\r\n procedure WriteProperties(Instance: TPersistent);\r\n procedure WriteChildren(Component: TComponent);\r\n function CreateDriver(Stream: TStream): TAbstractObjectWriter; virtual;\r\n public\r\n constructor Create(ADriver: TAbstractObjectWriter);\r\n constructor Create(Stream: TStream);\r\n destructor Destroy; override;\r\n procedure DefineProperty(const Name: string;\r\n ReadData: TReaderProc; AWriteData: TWriterProc;\r\n HasData: Boolean); override;\r\n procedure DefineBinaryProperty(const Name: string;\r\n ReadData, AWriteData: TStreamProc;\r\n HasData: Boolean); override;\r\n Procedure FlushBuffer; override;\r\n procedure Write(const Buffer : TBytes; Count: Longint); virtual;\r\n procedure WriteBoolean(Value: Boolean);\r\n procedure WriteCollection(Value: TCollection);\r\n procedure WriteComponent(Component: TComponent);\r\n procedure WriteChar(Value: Char);\r\n procedure WriteWideChar(Value: WideChar);\r\n procedure WriteDescendent(ARoot: TComponent; AAncestor: TComponent);\r\n procedure WriteFloat(const Value: Extended);\r\n procedure WriteCurrency(const Value: Currency);\r\n procedure WriteIdent(const Ident: string);\r\n procedure WriteInteger(Value: Longint); overload;\r\n procedure WriteInteger(Value: NativeInt); overload;\r\n procedure WriteSet(Value: LongInt; SetType: Pointer);\r\n procedure WriteListBegin;\r\n procedure WriteListEnd;\r\n Procedure WriteSignature;\r\n procedure WriteRootComponent(ARoot: TComponent);\r\n procedure WriteString(const Value: string);\r\n procedure WriteWideString(const Value: WideString);\r\n procedure WriteUnicodeString(const Value: UnicodeString);\r\n procedure WriteVariant(const VarValue: JSValue);\r\n property RootAncestor: TComponent read FRootAncestor write FRootAncestor;\r\n property OnFindAncestor: TFindAncestorEvent read FOnFindAncestor write FOnFindAncestor;\r\n property OnWriteMethodProperty: TWriteMethodPropertyEvent read FOnWriteMethodProperty write FOnWriteMethodProperty;\r\n property OnWriteStringProperty: TReadWriteStringPropertyEvent read FOnWriteStringProperty write FOnWriteStringProperty;\r\n\r\n property Driver: TAbstractObjectWriter read FDriver;\r\n property PropertyPath: string read FPropPath;\r\n end;\r\n\r\n TParserToken = (toUnknown, // everything else\r\n toEOF, // EOF\r\n toSymbol, // Symbol (identifier)\r\n toString, // ''string''\r\n toInteger, // 123\r\n toFloat, // 12.3\r\n toMinus, // -\r\n toSetStart, // [\r\n toListStart, // (\r\n toCollectionStart, // <\r\n toBinaryStart, // {\r\n toSetEnd, // ]\r\n toListEnd, // )\r\n toCollectionEnd, // >\r\n toBinaryEnd, // }\r\n toComma, // ,\r\n toDot, // .\r\n toEqual, // =\r\n toColon, // :\r\n toPlus // +\r\n );\r\n\r\n TParser = class(TObject)\r\n private\r\n fStream : TStream;\r\n fBuf : Array of Char;\r\n FBufLen : integer;\r\n fPos : integer;\r\n fDeltaPos : integer;\r\n fFloatType : char;\r\n fSourceLine : integer;\r\n fToken : TParserToken;\r\n fEofReached : boolean;\r\n fLastTokenStr : string;\r\n function GetTokenName(aTok : TParserToken) : string;\r\n procedure LoadBuffer;\r\n procedure CheckLoadBuffer; {$ifdef CLASSESINLINE} inline; {$endif CLASSESINLINE}\r\n procedure ProcessChar; {$ifdef CLASSESINLINE} inline; {$endif CLASSESINLINE}\r\n function IsNumber : boolean; {$ifdef CLASSESINLINE} inline; {$endif CLASSESINLINE}\r\n function IsHexNum : boolean; {$ifdef CLASSESINLINE} inline; {$endif CLASSESINLINE}\r\n function IsAlpha : boolean; {$ifdef CLASSESINLINE} inline; {$endif CLASSESINLINE}\r\n function IsAlphaNum : boolean; {$ifdef CLASSESINLINE} inline; {$endif CLASSESINLINE}\r\n function GetHexValue(c : char) : byte; {$ifdef CLASSESINLINE} inline; {$endif CLASSESINLINE}\r\n function GetAlphaNum : string;\r\n procedure HandleNewLine;\r\n procedure SkipBOM;\r\n procedure SkipSpaces;\r\n procedure SkipWhitespace;\r\n procedure HandleEof;\r\n procedure HandleAlphaNum;\r\n procedure HandleNumber;\r\n procedure HandleHexNumber;\r\n function HandleQuotedString : string;\r\n Function HandleDecimalCharacter: char;\r\n procedure HandleString;\r\n procedure HandleMinus;\r\n procedure HandleUnknown;\r\n procedure GotoToNextChar;\r\n public\r\n // Input stream is expected to be UTF16 !\r\n constructor Create(Stream: TStream);\r\n destructor Destroy; override;\r\n procedure CheckToken(T: TParserToken);\r\n procedure CheckTokenSymbol(const S: string);\r\n procedure Error(const Ident: string);\r\n procedure ErrorFmt(const Ident: string; const Args: array of const);\r\n procedure ErrorStr(const Message: string);\r\n procedure HexToBinary(Stream: TStream);\r\n function NextToken: TParserToken;\r\n function SourcePos: Longint;\r\n function TokenComponentIdent: string;\r\n function TokenFloat: Double;\r\n function TokenInt: NativeInt;\r\n function TokenString: string;\r\n function TokenSymbolIs(const S: string): Boolean;\r\n property FloatType: Char read fFloatType;\r\n property SourceLine: Integer read fSourceLine;\r\n property Token: TParserToken read fToken;\r\n end;\r\n\r\n\r\n { TObjectStreamConverter }\r\n\r\n TObjectTextEncoding = (oteDFM,oteLFM);\r\n\r\n TObjectStreamConverter = Class\r\n private\r\n FIndent: String;\r\n FInput : TStream;\r\n FOutput : TStream;\r\n FEncoding : TObjectTextEncoding;\r\n Private\r\n FPlainStrings: Boolean;\r\n // Low level writing\r\n procedure Outchars(S : String); virtual;\r\n procedure OutLn(s: String); virtual;\r\n procedure OutStr(s: String); virtual;\r\n procedure OutString(s: String); virtual;\r\n // Low level reading\r\n function ReadWord: word;\r\n function ReadDWord: longword;\r\n function ReadDouble: Double;\r\n function ReadInt(ValueType: TValueType): NativeInt;\r\n function ReadInt: NativeInt;\r\n function ReadNativeInt: NativeInt;\r\n function ReadStr: String;\r\n function ReadString(StringType: TValueType): String; virtual;\r\n // High-level\r\n procedure ProcessBinary; virtual;\r\n procedure ProcessValue(ValueType: TValueType; Indent: String); virtual;\r\n procedure ReadObject(indent: String); virtual;\r\n procedure ReadPropList(indent: String); virtual;\r\n Public\r\n procedure ObjectBinaryToText(aInput, aOutput: TStream);\r\n procedure ObjectBinaryToText(aInput, aOutput: TStream; aEncoding: TObjectTextEncoding);\r\n Procedure Execute;\r\n // use this to get previous streaming behavour: strings written as-is\r\n Property PlainStrings : Boolean Read FPlainStrings Write FPlainStrings;\r\n Property Input : TStream Read FInput Write FInput;\r\n Property Output : TStream Read Foutput Write FOutput;\r\n Property Encoding : TObjectTextEncoding Read FEncoding Write FEncoding;\r\n Property Indent : String Read FIndent Write Findent;\r\n end;\r\n\r\n { TObjectTextConverter }\r\n\r\n TObjectTextConverter = Class\r\n private\r\n FParser: TParser;\r\n private\r\n FInput: TStream;\r\n Foutput: TStream;\r\n procedure WriteDouble(e: double);\r\n procedure WriteDWord(lw: longword);\r\n procedure WriteInteger(value: nativeInt);\r\n //procedure WriteLString(const s: String);\r\n procedure WriteQWord(q: nativeint);\r\n procedure WriteString(s: String);\r\n procedure WriteWord(w: word);\r\n procedure WriteWString(const s: WideString);\r\n procedure ProcessObject; virtual;\r\n procedure ProcessProperty; virtual;\r\n procedure ProcessValue; virtual;\r\n procedure ProcessWideString(const left: string);\r\n Property Parser : TParser Read FParser;\r\n Public\r\n // Input stream must be UTF16 !\r\n procedure ObjectTextToBinary(aInput, aOutput: TStream);\r\n Procedure Execute; virtual;\r\n Property Input : TStream Read FInput Write FInput;\r\n Property Output: TStream Read Foutput Write Foutput;\r\n end;\r\n\r\n TLoadHelper = Class (TObject)\r\n Public\r\n Type\r\n TTextLoadedCallBack = reference to procedure (const aText : String);\r\n TBytesLoadedCallBack = reference to procedure (const aBuffer : TJSArrayBuffer);\r\n TErrorCallBack = reference to procedure (const aError : String);\r\n Class Procedure LoadText(aURL : String; aSync : Boolean; OnLoaded : TTextLoadedCallBack; OnError : TErrorCallBack); virtual; abstract;\r\n Class Procedure LoadBytes(aURL : String; aSync : Boolean; OnLoaded : TBytesLoadedCallBack; OnError : TErrorCallBack); virtual; abstract;\r\n end;\r\n\r\n TLoadHelperClass = Class of TLoadHelper;\r\n\r\n { ---------------------------------------------------------------------\r\n TDatamodule support\r\n ---------------------------------------------------------------------}\r\n\r\n { TDataModule }\r\n\r\n TDataModule = class(TComponent)\r\n private\r\n FDPos: TPoint;\r\n FDSize: TPoint;\r\n FDPPI: Integer;\r\n FOnCreate: TNotifyEvent;\r\n FOnDestroy: TNotifyEvent;\r\n FOldOrder : Boolean;\r\n Procedure ReadP(Reader: TReader);\r\n Procedure WriteP(Writer: TWriter);\r\n Procedure ReadT(Reader: TReader);\r\n Procedure WriteT(Writer: TWriter);\r\n Procedure ReadL(Reader: TReader);\r\n Procedure WriteL(Writer: TWriter);\r\n Procedure ReadW(Reader: TReader);\r\n Procedure WriteW(Writer: TWriter);\r\n Procedure ReadH(Reader: TReader);\r\n Procedure WriteH(Writer: TWriter);\r\n protected\r\n Procedure DoCreate; virtual;\r\n Procedure DoDestroy; virtual;\r\n Procedure DefineProperties(Filer: TFiler); override;\r\n Procedure GetChildren(Proc: TGetChildProc; Root: TComponent); override;\r\n Function HandleCreateException: Boolean; virtual;\r\n Procedure ReadState(Reader: TReader); override;\r\n public\r\n constructor Create(AOwner: TComponent); override;\r\n Constructor CreateNew(AOwner: TComponent);\r\n Constructor CreateNew(AOwner: TComponent; CreateMode: Integer); virtual;\r\n class constructor ClassCreate;\r\n destructor Destroy; override;\r\n Procedure AfterConstruction; override;\r\n Procedure BeforeDestruction; override;\r\n property DesignOffset: TPoint read FDPos write FDPos;\r\n property DesignSize: TPoint read FDSize write FDSize;\r\n property DesignPPI: Integer read FDPPI write FDPPI;\r\n published\r\n property OnCreate: TNotifyEvent read FOnCreate write FOnCreate;\r\n property OnDestroy: TNotifyEvent read FOnDestroy write FOnDestroy;\r\n property OldCreateOrder: Boolean read FOldOrder write FOldOrder;\r\n end;\r\n TDataModuleClass = Class of TDataModule;\r\n\r\n\r\ntype\r\n TIdentMapEntry = record\r\n Value: Integer;\r\n Name: String;\r\n end;\r\n\r\n TIdentToInt = function(const Ident: string; var Int: Longint): Boolean;\r\n TIntToIdent = function(Int: Longint; var Ident: string): Boolean;\r\n TFindGlobalComponent = function(const Name: string): TComponent;\r\n TInitComponentHandler = function(Instance: TComponent; RootAncestor : TClass): boolean;\r\n\r\n// Start TMS extension----------------------------------------------------------\r\n\r\n TStringsHelper = class helper for TStrings\r\n public\r\n procedure LoadFromStream(Stream: TStream); overload;\r\n procedure LoadFromStream(Stream: TStream; Encoding: TEncoding); overload;\r\n procedure SaveToStream(Stream: TStream); overload;\r\n procedure SaveToStream(Stream: TStream; Encoding: TEncoding); overload;\r\n function IndexOfValue(const Value: string): Integer;\r\n end;\r\n\r\n TPlatformIds = UInt32;\r\n\r\nconst\r\n TMSPlatformsWeb = 1;\r\n\r\ntype\r\n ComponentPlatformsAttribute = class(TCustomAttribute)\r\n private\r\n FPlatforms: TPlatformIds;\r\n public\r\n constructor Create(const Platforms: TPlatformIds);\r\n property Platforms: TPlatformIds read FPlatforms write FPlatforms;\r\n end;\r\n\r\n TShiftState = set of (ssShift, ssAlt, ssCtrl,\r\n ssLeft, ssRight, ssMIDdle, ssDouble, ssTouch, ssPen, ssCommand);\r\n\r\n// End TMS extension------------------------------------------------------------\r\n\r\n\r\nprocedure RegisterInitComponentHandler(ComponentClass: TComponentClass; Handler: TInitComponentHandler);\r\nProcedure RegisterClass(AClass : TPersistentClass);\r\nProcedure RegisterClasses(AClasses : specialize TArray);\r\nFunction GetClass(AClassName : string) : TPersistentClass;\r\nprocedure RegisterFindGlobalComponentProc(AFindGlobalComponent: TFindGlobalComponent);\r\nprocedure UnregisterFindGlobalComponentProc(AFindGlobalComponent: TFindGlobalComponent);\r\nfunction FindGlobalComponent(const Name: string): TComponent;\r\nFunction FindNestedComponent(Root : TComponent; APath : String; CStyle : Boolean = True) : TComponent;\r\nfunction InitInheritedComponent(Instance: TComponent; RootAncestor: TClass): Boolean;\r\n\r\nprocedure RedirectFixupReferences(Root: TComponent; const OldRootName, NewRootName: string);\r\nprocedure RemoveFixupReferences(Root: TComponent; const RootName: string);\r\nprocedure RegisterIntegerConsts(IntegerType: Pointer; IdentToIntFn: TIdentToInt; IntToIdentFn: TIntToIdent);\r\nfunction ExtractStrings(Separators, WhiteSpace: TSysCharSet; Content: String; Strings: TStrings; AddEmptyStrings : Boolean = False): Integer;\r\nfunction IdentToInt(const Ident: string; out Int: Longint; const Map: array of TIdentMapEntry): Boolean;\r\nfunction IntToIdent(Int: Longint; var Ident: string; const Map: array of TIdentMapEntry): Boolean;\r\nfunction FindIntToIdent(AIntegerType: Pointer): TIntToIdent;\r\nfunction FindIdentToInt(AIntegerType: Pointer): TIdentToInt;\r\nfunction FindClass(const AClassName: string): TPersistentClass;\r\nfunction CollectionsEqual(C1, C2: TCollection): Boolean;\r\nfunction CollectionsEqual(C1, C2: TCollection; Owner1, Owner2: TComponent): Boolean;\r\nprocedure GetFixupReferenceNames(Root: TComponent; Names: TStrings);\r\nprocedure GetFixupInstanceNames(Root: TComponent; const ReferenceRootName: string; Names: TStrings);\r\nprocedure ObjectBinaryToText(aInput, aOutput: TStream);\r\nprocedure ObjectBinaryToText(aInput, aOutput: TStream; aEncoding: TObjectTextEncoding);\r\nprocedure ObjectTextToBinary(aInput, aOutput: TStream);\r\nFunction SetLoadHelperClass(aClass : TLoadHelperClass) : TLoadHelperClass;\r\n// Create buffer from string. aLen in bytes, not in characters\r\nFunction StringToBuffer(aString : String; aLen : Integer) : TJSArrayBuffer;\r\nFunction StringToBuffer(aString : String; aLen : Integer; AEncoding: TEncoding) : TJSArrayBuffer;\r\n// Create buffer from string. aPos,aLen are in bytes, not in characters.\r\nFunction BufferToString(aBuffer : TJSArrayBuffer; aPos,aLen : Integer) : String;\r\nFunction BufferToString(aBuffer : TJSArrayBuffer; aPos,aLen : Integer; AEncoding: TEncoding) : String;\r\n\r\nprocedure BeginGlobalLoading;\r\nprocedure NotifyGlobalLoading;\r\nprocedure EndGlobalLoading;\r\n\r\nType\r\n TDataModuleNotifyEvent = procedure (DataModule: TDataModule) of object;\r\n TExceptionNotifyEvent = procedure (E: Exception) of object;\r\n\r\nvar\r\n // IDE hooks for TDatamodule support.\r\n AddDataModule : TDataModuleNotifyEvent;\r\n RemoveDataModule : TDataModuleNotifyEvent;\r\n ApplicationHandleException : TNotifyEvent;\r\n ApplicationShowException : TExceptionNotifyEvent;\r\n FormResourceIsText : Boolean = True;\r\n\r\nConst\r\n // Some aliases\r\n vaSingle = vaDouble;\r\n vaExtended = vaDouble;\r\n vaLString = vaString;\r\n vaUTF8String = vaString;\r\n vaUString = vaString;\r\n vaWString = vaString;\r\n vaQWord = vaNativeInt;\r\n vaInt64 = vaNativeInt;\r\n toWString = toString;\r\n\r\nimplementation\r\n\r\nuses web, simplelinkedlist;\r\n\r\ntype\r\n TReqLoadProc = reference to procedure(AResponse: string);\r\n TReqErrorProc = reference to procedure;\r\n\r\nvar\r\n GlobalLoaded,\r\n IntConstList: TFPList;\r\n GlobalLoadHelper : TLoadHelperClass;\r\n\r\nprocedure BeginGlobalLoading;\r\nbegin\r\n GlobalLoaded := TFPList.Create;\r\nend;\r\n\r\nprocedure NotifyGlobalLoading;\r\nvar\r\n I: Integer;\r\n G: TFPList;\r\nbegin\r\n G := GlobalLoaded;\r\n for I := 0 to G.Count - 1 do\r\n TComponent(G[I]).Loaded;\r\nend;\r\n\r\nprocedure EndGlobalLoading;\r\nbegin\r\n GlobalLoaded.Free;\r\nend;\r\n\r\nFunction SetLoadHelperClass(aClass : TLoadHelperClass) : TLoadHelperClass;\r\n\r\nbegin\r\n Result:=GlobalLoadHelper;\r\n GlobalLoadHelper:=aClass;\r\nend;\r\n\r\nProcedure CheckLoadHelper;\r\n\r\nbegin\r\n If (GlobalLoadHelper=Nil) then\r\n Raise EInOutError.Create('No support for loading URLS. Include Rtl.BrowserLoadHelper in your project uses clause');\r\nend;\r\n\r\nFunction StringToBuffer(aString : String; aLen : Integer) : TJSArrayBuffer;\r\nbegin\r\n Result := StringToBuffer(aString, aLen, TEncoding.UTF8);\r\nend;\r\n\r\nFunction StringToBuffer(aString : String; aLen : Integer; AEncoding: TEncoding) : TJSArrayBuffer;\r\n\r\nvar\r\n I : Integer;\r\n\r\nbegin\r\n if AEncoding = TEncoding.Unicode then\r\n begin\r\n Result:=TJSArrayBuffer.new(aLen*2);// 2 bytes for each char\r\n\r\n With TJSUint16Array.new(Result) do\r\n for i:=0 to aLen-1 do\r\n values[i] := TJSString(aString).charCodeAt(i);\r\n end\r\n else\r\n begin\r\n Result:=TJSArrayBuffer.new(aLen);// 1 bytes for each char\r\n\r\n With TJSUint8Array.new(Result) do\r\n for i:=0 to aLen-1 do\r\n values[i] := TJSString(aString).charCodeAt(i);\r\n end;\r\nend;\r\n\r\nfunction BufferToString(aBuffer: TJSArrayBuffer; aPos, aLen: Integer): String;\r\nbegin\r\n Result := BufferToString(aBuffer, aPos, aLen, TEncoding.UTF8);\r\nend;\r\n\r\nfunction BufferToString(aBuffer: TJSArrayBuffer; aPos, aLen: Integer; AEncoding: TEncoding): String;\r\nvar\r\n ua16 : TJSUint16Array;\r\n ua8: TJSUint8Array;\r\n\r\nbegin\r\n Result:=''; // Silence warning\r\n if AEncoding = TEncoding.Unicode then\r\n begin\r\n ua16:=TJSUint16Array.New(aBuffer.slice(aPos,aLen));\r\n if ua16<>nil then\r\n Result:=String(TJSFunction(@TJSString.fromCharCode).apply(nil,TJSValueDynArray(JSValue(ua16))));\r\n end\r\n else\r\n begin\r\n ua8:=TJSUint8Array.New(aBuffer.slice(aPos,aLen));\r\n if ua8<>nil then\r\n Result:=String(TJSFunction(@TJSString.fromCharCode).apply(nil,TJSValueDynArray(JSValue(ua8))));\r\n end;\r\n\r\nend;\r\n\r\nfunction CreateComponentfromRes(const res : string; Inst : THandle; var Component : TComponent) : Boolean;\r\n\r\nvar\r\n ResStream : TResourceStream;\r\n\r\n Src : TStream;\r\n aInfo : TResourceInfo;\r\n\r\nbegin\r\n if Inst=0 then ;\r\n result:=GetResourceInfo(Res,aInfo);\r\n if Result then\r\n begin\r\n ResStream:=TResourceStream.Create(aInfo);\r\n try\r\n if Not FormResourceIsText then\r\n Src:=ResStream\r\n else\r\n begin\r\n Src:=TMemoryStream.Create;\r\n ObjectTextToBinary(ResStream,Src);\r\n Src.Position:=0;\r\n end;\r\n Component:=Src.ReadComponent(Component);\r\n finally\r\n if Src<>ResStream then\r\n Src.Free;\r\n ResStream.Free;\r\n end;\r\n end;\r\nend;\r\n\r\nfunction DefaultInitHandler(Instance: TComponent; RootAncestor: TClass): Boolean;\r\n\r\n function doinit(_class : TClass) : boolean;\r\n begin\r\n result:=false;\r\n if (_class.ClassType=TComponent) or (_class.ClassType=RootAncestor) then\r\n exit;\r\n result:=doinit(_class.ClassParent);\r\n // Resources are written with their unit name\r\n result:=CreateComponentfromRes(_class.UnitName,0,Instance) or result;\r\n end;\r\n\r\nbegin\r\n result:=doinit(Instance.ClassType);\r\nend;\r\n\r\n{ TResourceStream }\r\n\r\n// We need a polyfill for nodejs.\r\nFunction atob (s : String) : string; external name 'atob';\r\n\r\nprocedure TResourceStream.Initialize(aInfo: TResourceInfo);\r\n\r\nvar\r\n Ptr : TJSArrayBuffer;\r\n S : String;\r\n\r\nbegin\r\n if aInfo.encoding='base64' then\r\n S:=atob(aInfo.Data)\r\n else if (aInfo.Encoding='text') then\r\n s:=aInfo.Data\r\n else\r\n Raise ENotSupportedException.CreateFmt(SErrResourceNotBase64,[aInfo.name]);\r\n Ptr:=StringToBuffer(S, length(S));\r\n SetPointer(Ptr,Ptr.byteLength);\r\nend;\r\n\r\nprocedure TResourceStream.Initialize(Instance: TFPResourceHMODULE; Name, ResType: String);\r\n\r\nVar\r\n aInfo : TResourceInfo;\r\n\r\nbegin\r\n if not GetResourceInfo(Name, aInfo) then\r\n raise EResNotFound.CreateFmt(SResNotFound,[Name]);\r\n Initialize(aInfo);\r\nend;\r\n\r\nconstructor TResourceStream.Create(aInfo: TResourceInfo);\r\nbegin\r\n inherited create;\r\n Initialize(aInfo);\r\nend;\r\n\r\nconstructor TResourceStream.Create(Instance: TFPResourceHMODULE; const ResName, ResType: String);\r\nbegin\r\n inherited create;\r\n Initialize(Instance,ResName,ResType);\r\nend;\r\n\r\nconstructor TResourceStream.CreateFromID(Instance: TFPResourceHMODULE;\r\n ResID: Integer; ResType: String);\r\nbegin\r\n inherited create;\r\n Initialize(Instance,IntToStr(ResID),ResType);\r\nend;\r\n\r\nfunction TResourceStream.Write(const Buffer: TBytes; Offset, Count: LongInt\r\n ): LongInt;\r\nbegin\r\n Raise ENotSupportedException.Create(SErrResourceStreamNoWrite);\r\n Result:=0;\r\nend;\r\n\r\ndestructor TResourceStream.Destroy;\r\nbegin\r\n inherited Destroy;\r\nend;\r\n\r\n{ TStringStream }\r\n\r\nfunction TStringStream.GetDataString: String;\r\nconst\r\n Chunk = 8*1024;\r\nvar\r\n ua16 : TJSUint16Array;\r\n ua8: TJSUint8Array;\r\n Len,I : Integer;\r\n\r\nbegin\r\n Result:=''; // Silence warning\r\n if FEncoding = TEncoding.Unicode then\r\n begin\r\n ua16:=TJSUint16Array.New(Memory.slice(0,Size));\r\n if ua16<>nil then\r\n begin\r\n Len := (ua16.length div chunk);\r\n for I := 0 to Len do\r\n begin\r\n asm\r\n Result+=String.fromCharCode.apply(null,ua16.slice(I * Chunk, (I + 1) * Chunk));\r\n end;\r\n end;\r\n // Result=String.fromCharCode.apply(null, ua16);\r\n end;\r\n end\r\n else\r\n begin\r\n ua8:=TJSUint8Array.New(Memory.slice(0,Size));\r\n if ua8<>nil then\r\n asm\r\n return ua8.reduce(function (data, byte) {\r\n return data + String.fromCharCode(byte);\r\n }, '');\r\n end;\r\n end;\r\nend;\r\n\r\nconstructor TStringStream.Create(const AString: string; AEncoding: TEncoding; AOwnsEncoding: Boolean = True); overload;\r\nvar\r\n Len : Integer;\r\n\r\nbegin\r\n inherited Create;\r\n FEncoding := AEncoding;\r\n Len:=Length(aString);\r\n if FEncoding = TEncoding.Unicode then\r\n begin\r\n SetPointer(StringToBuffer(aString,Len, FEncoding),Len*2);\r\n FCapacity:=Len*2;\r\n end\r\n else\r\n begin\r\n SetPointer(StringToBuffer(aString,Len, FEncoding),Len);\r\n FCapacity:=Len;\r\n end;\r\nend;\r\n\r\nconstructor TStringStream.Create;\r\nbegin\r\n Create('', TEncoding.Unicode);\r\nend;\r\n\r\nconstructor TStringStream.Create(const aString: String);\r\nbegin\r\n Create(aString, TEncoding.Unicode);\r\nend;\r\n\r\ndestructor TStringStream.Destroy;\r\nbegin\r\n if FOwnsEncoding then\r\n FEncoding.Free;\r\n inherited Destroy;\r\nend;\r\n\r\nfunction TStringStream.ReadString(Count: Integer): string;\r\n\r\n\r\nVar\r\n B : TBytes;\r\n Buf : TJSArrayBuffer;\r\n BytesLeft : Integer;\r\n\r\nbegin\r\n // Top off\r\n BytesLeft:=(Size-Position);\r\n if FEncoding = TEncoding.Unicode then\r\n begin\r\n if BytesLeft 0) or AddEmptyStrings then\r\n begin\r\n if assigned(Strings) then\r\n begin\r\n if l>0 then\r\n Strings.Add (Copy(Content,B,L))\r\n else\r\n Strings.Add('');\r\n end;\r\n inc (result);\r\n end;\r\n end;\r\n\r\nvar\r\n cc,quoted : char;\r\n aLen : Integer;\r\nbegin\r\n result := 0;\r\n c := 1;\r\n Quoted := #0;\r\n Separators := Separators + [#13, #10] - ['''','\"'];\r\n SkipWhitespace;\r\n b := c;\r\n aLen:=Length(Content);\r\n while C<=aLen do\r\n begin\r\n CC:=Content[c];\r\n if (CC = Quoted) then\r\n begin\r\n if (C b) then\r\n AddString;\r\nend;\r\n\r\n\r\nfunction FindIntToIdent(AIntegerType: Pointer): TIntToIdent;\r\n\r\nvar\r\n i: Integer;\r\n\r\nbegin\r\n Result := nil;\r\n if Not Assigned(IntConstList) then\r\n exit;\r\n with IntConstList do\r\n for i := 0 to Count - 1 do\r\n if TIntConst(Items[i]).IntegerType = AIntegerType then\r\n exit(TIntConst(Items[i]).IntToIdentFn);\r\nend;\r\n\r\nfunction FindIdentToInt(AIntegerType: Pointer): TIdentToInt;\r\nvar\r\n i: Integer;\r\nbegin\r\n Result := nil;\r\n if Not Assigned(IntConstList) then\r\n exit;\r\n with IntConstList do\r\n for i := 0 to Count - 1 do\r\n with TIntConst(Items[I]) do\r\n if TIntConst(Items[I]).IntegerType = AIntegerType then\r\n exit(IdentToIntFn);\r\nend;\r\n\r\nfunction IdentToInt(const Ident: String; out Int: LongInt;\r\n const Map: array of TIdentMapEntry): Boolean;\r\nvar\r\n i: Integer;\r\nbegin\r\n for i := Low(Map) to High(Map) do\r\n if CompareText(Map[i].Name, Ident) = 0 then\r\n begin\r\n Int := Map[i].Value;\r\n exit(True);\r\n end;\r\n Result := False;\r\nend;\r\n\r\nfunction IntToIdent(Int: LongInt; var Ident: String;\r\n const Map: array of TIdentMapEntry): Boolean;\r\nvar\r\n i: Integer;\r\nbegin\r\n for i := Low(Map) to High(Map) do\r\n if Map[i].Value = Int then\r\n begin\r\n Ident := Map[i].Name;\r\n exit(True);\r\n end;\r\n Result := False;\r\nend;\r\n\r\nfunction GlobalIdentToInt(const Ident: String; var Int: LongInt):boolean;\r\nvar\r\n i : Integer;\r\nbegin\r\n Result := false;\r\n if Not Assigned(IntConstList) then\r\n exit;\r\n with IntConstList do\r\n for i := 0 to Count - 1 do\r\n if TIntConst(Items[I]).IdentToIntFn(Ident, Int) then\r\n Exit(True);\r\nend;\r\n\r\nfunction FindClass(const AClassName: string): TPersistentClass;\r\n\r\nbegin\r\n Result := GetClass(AClassName);\r\n if not Assigned(Result) then\r\n raise EClassNotFound.CreateFmt(SClassNotFound, [AClassName]);\r\nend;\r\n\r\n\r\nfunction CollectionsEqual(C1, C2: TCollection): Boolean;\r\n\r\nVar\r\n Comp1,Comp2 : TComponent;\r\n\r\nbegin\r\n Comp2:=Nil;\r\n Comp1:=TComponent.Create;\r\n try\r\n Result:=CollectionsEqual(C1,C2,Comp1,Comp2);\r\n finally\r\n Comp1.Free;\r\n Comp2.Free;\r\n end;\r\nend;\r\n\r\nfunction CollectionsEqual(C1, C2: TCollection; Owner1, Owner2: TComponent): Boolean;\r\n\r\n procedure stream_collection(s : tstream;c : tcollection;o : tcomponent);\r\n var\r\n w : twriter;\r\n begin\r\n w:=twriter.create(s);\r\n try\r\n w.root:=o;\r\n w.flookuproot:=o;\r\n w.writecollection(c);\r\n finally\r\n w.free;\r\n end;\r\n end;\r\n\r\n var\r\n s1,s2 : tbytesstream;\r\n b1,b2 : TBytes;\r\n I,Len : Integer;\r\n begin\r\n result:=false;\r\n if (c1.classtype<>c2.classtype) or\r\n (c1.count<>c2.count) then\r\n exit;\r\n if c1.count = 0 then\r\n begin\r\n result:= true;\r\n exit;\r\n end;\r\n s2:=Nil;\r\n s1:=tbytesstream.create;\r\n try\r\n s2:=tbytesstream.create;\r\n stream_collection(s1,c1,owner1);\r\n stream_collection(s2,c2,owner2);\r\n result:=(s1.size=s2.size);\r\n if Result then\r\n begin\r\n b1:=S1.Bytes;\r\n b2:=S2.Bytes;\r\n I:=0;\r\n Len:=S1.Size; // Not length of B\r\n While Result and (Inil) then\r\n GetOwner.GetInterface(IInterface, FOwnerInterface);\r\nend;\r\n\r\n{ TComponentEnumerator }\r\n\r\nconstructor TComponentEnumerator.Create(AComponent: TComponent);\r\nbegin\r\n inherited Create;\r\n FComponent := AComponent;\r\n FPosition := -1;\r\nend;\r\n\r\nfunction TComponentEnumerator.GetCurrent: TComponent;\r\nbegin\r\n Result := FComponent.Components[FPosition];\r\nend;\r\n\r\nfunction TComponentEnumerator.MoveNext: Boolean;\r\nbegin\r\n Inc(FPosition);\r\n Result := FPosition < FComponent.ComponentCount;\r\nend;\r\n\r\n{ TListEnumerator }\r\n\r\nconstructor TListEnumerator.Create(AList: TList);\r\nbegin\r\n inherited Create;\r\n FList := AList;\r\n FPosition := -1;\r\nend;\r\n\r\nfunction TListEnumerator.GetCurrent: JSValue;\r\nbegin\r\n Result := FList[FPosition];\r\nend;\r\n\r\nfunction TListEnumerator.MoveNext: Boolean;\r\nbegin\r\n Inc(FPosition);\r\n Result := FPosition < FList.Count;\r\nend;\r\n\r\n{ TFPListEnumerator }\r\n\r\nconstructor TFPListEnumerator.Create(AList: TFPList);\r\nbegin\r\n inherited Create;\r\n FList := AList;\r\n FPosition := -1;\r\nend;\r\n\r\nfunction TFPListEnumerator.GetCurrent: JSValue;\r\nbegin\r\n Result := FList[FPosition];\r\nend;\r\n\r\nfunction TFPListEnumerator.MoveNext: Boolean;\r\nbegin\r\n Inc(FPosition);\r\n Result := FPosition < FList.Count;\r\nend;\r\n\r\n{ TFPList }\r\n\r\nprocedure TFPList.CopyMove(aList: TFPList);\r\nvar r : integer;\r\nbegin\r\n Clear;\r\n for r := 0 to aList.count-1 do\r\n Add(aList[r]);\r\nend;\r\n\r\nprocedure TFPList.MergeMove(aList: TFPList);\r\nvar r : integer;\r\nbegin\r\n For r := 0 to aList.count-1 do\r\n if IndexOf(aList[r]) < 0 then\r\n Add(aList[r]);\r\nend;\r\n\r\nprocedure TFPList.DoCopy(ListA, ListB: TFPList);\r\nbegin\r\n if Assigned(ListB) then\r\n CopyMove(ListB)\r\n else\r\n CopyMove(ListA);\r\nend;\r\n\r\nprocedure TFPList.DoSrcUnique(ListA, ListB: TFPList);\r\nvar r : integer;\r\nbegin\r\n if Assigned(ListB) then\r\n begin\r\n Clear;\r\n for r := 0 to ListA.Count-1 do\r\n if ListB.IndexOf(ListA[r]) < 0 then\r\n Add(ListA[r]);\r\n end\r\n else\r\n begin\r\n for r := Count-1 downto 0 do\r\n if ListA.IndexOf(Self[r]) >= 0 then\r\n Delete(r);\r\n end;\r\nend;\r\n\r\nprocedure TFPList.DoAnd(ListA, ListB: TFPList);\r\nvar r : integer;\r\nbegin\r\n if Assigned(ListB) then\r\n begin\r\n Clear;\r\n for r := 0 to ListA.count-1 do\r\n if ListB.IndexOf(ListA[r]) >= 0 then\r\n Add(ListA[r]);\r\n end\r\n else\r\n begin\r\n for r := Count-1 downto 0 do\r\n if ListA.IndexOf(Self[r]) < 0 then\r\n Delete(r);\r\n end;\r\nend;\r\n\r\nprocedure TFPList.DoDestUnique(ListA, ListB: TFPList);\r\n\r\n procedure MoveElements(Src, Dest: TFPList);\r\n var r : integer;\r\n begin\r\n Clear;\r\n for r := 0 to Src.count-1 do\r\n if Dest.IndexOf(Src[r]) < 0 then\r\n self.Add(Src[r]);\r\n end;\r\n\r\nvar Dest : TFPList;\r\nbegin\r\n if Assigned(ListB) then\r\n MoveElements(ListB, ListA)\r\n else\r\n Dest := TFPList.Create;\r\n try\r\n Dest.CopyMove(Self);\r\n MoveElements(ListA, Dest)\r\n finally\r\n Dest.Destroy;\r\n end;\r\nend;\r\n\r\nprocedure TFPList.DoOr(ListA, ListB: TFPList);\r\nbegin\r\n if Assigned(ListB) then\r\n begin\r\n CopyMove(ListA);\r\n MergeMove(ListB);\r\n end\r\n else\r\n MergeMove(ListA);\r\nend;\r\n\r\nprocedure TFPList.DoXOr(ListA, ListB: TFPList);\r\nvar\r\n r : integer;\r\n l : TFPList;\r\nbegin\r\n if Assigned(ListB) then\r\n begin\r\n Clear;\r\n for r := 0 to ListA.Count-1 do\r\n if ListB.IndexOf(ListA[r]) < 0 then\r\n Add(ListA[r]);\r\n for r := 0 to ListB.Count-1 do\r\n if ListA.IndexOf(ListB[r]) < 0 then\r\n Add(ListB[r]);\r\n end\r\n else\r\n begin\r\n l := TFPList.Create;\r\n try\r\n l.CopyMove(Self);\r\n for r := Count-1 downto 0 do\r\n if listA.IndexOf(Self[r]) >= 0 then\r\n Delete(r);\r\n for r := 0 to ListA.Count-1 do\r\n if l.IndexOf(ListA[r]) < 0 then\r\n Add(ListA[r]);\r\n finally\r\n l.Destroy;\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TFPList.Get(Index: Integer): JSValue;\r\nbegin\r\n If (Index < 0) or (Index >= FCount) then\r\n RaiseIndexError(Index);\r\n Result:=FList[Index];\r\nend;\r\n\r\nprocedure TFPList.Put(Index: Integer; Item: JSValue);\r\nbegin\r\n if (Index < 0) or (Index >= FCount) then\r\n RaiseIndexError(Index);\r\n FList[Index] := Item;\r\nend;\r\n\r\nprocedure TFPList.SetCapacity(NewCapacity: Integer);\r\nbegin\r\n If (NewCapacity < FCount) then\r\n Error (SListCapacityError, str(NewCapacity));\r\n if NewCapacity = FCapacity then\r\n exit;\r\n SetLength(FList,NewCapacity);\r\n FCapacity := NewCapacity;\r\nend;\r\n\r\nprocedure TFPList.SetCount(NewCount: Integer);\r\nbegin\r\n if (NewCount < 0) then\r\n Error(SListCountError, str(NewCount));\r\n If NewCount > FCount then\r\n begin\r\n If NewCount > FCapacity then\r\n SetCapacity(NewCount);\r\n end;\r\n FCount := NewCount;\r\nend;\r\n\r\nprocedure TFPList.RaiseIndexError(Index: Integer);\r\nbegin\r\n Error(SListIndexError, str(Index));\r\nend;\r\n\r\ndestructor TFPList.Destroy;\r\nbegin\r\n Clear;\r\n inherited Destroy;\r\nend;\r\n\r\nprocedure TFPList.AddList(AList: TFPList);\r\n\r\nVar\r\n I : Integer;\r\n\r\nbegin\r\n If (Capacity=FCount) then\r\n Error (SListIndexError, str(Index));\r\n FCount := FCount-1;\r\n System.Delete(FList,Index,1);\r\n Dec(FCapacity);\r\nend;\r\n\r\nclass procedure TFPList.Error(const Msg: string; const Data: String);\r\nbegin\r\n Raise EListError.CreateFmt(Msg,[Data]);\r\nend;\r\n\r\nprocedure TFPList.Exchange(Index1, Index2: Integer);\r\nvar\r\n Temp : JSValue;\r\nbegin\r\n If (Index1 >= FCount) or (Index1 < 0) then\r\n Error(SListIndexError, str(Index1));\r\n If (Index2 >= FCount) or (Index2 < 0) then\r\n Error(SListIndexError, str(Index2));\r\n Temp := FList[Index1];\r\n FList[Index1] := FList[Index2];\r\n FList[Index2] := Temp;\r\nend;\r\n\r\nfunction TFPList.Expand: TFPList;\r\nvar\r\n IncSize : Integer;\r\nbegin\r\n if FCount < FCapacity then exit(self);\r\n IncSize := 4;\r\n if FCapacity > 3 then IncSize := IncSize + 4;\r\n if FCapacity > 8 then IncSize := IncSize+8;\r\n if FCapacity > 127 then Inc(IncSize, FCapacity shr 2);\r\n SetCapacity(FCapacity + IncSize);\r\n Result := Self;\r\nend;\r\n\r\nfunction TFPList.Extract(Item: JSValue): JSValue;\r\nvar\r\n i : Integer;\r\nbegin\r\n i := IndexOf(Item);\r\n if i >= 0 then\r\n begin\r\n Result := Item;\r\n Delete(i);\r\n end\r\n else\r\n Result := nil;\r\nend;\r\n\r\nfunction TFPList.First: JSValue;\r\nbegin\r\n If FCount = 0 then\r\n Result := Nil\r\n else\r\n Result := Items[0];\r\nend;\r\n\r\nfunction TFPList.GetEnumerator: TFPListEnumerator;\r\nbegin\r\n Result:=TFPListEnumerator.Create(Self);\r\nend;\r\n\r\nfunction TFPList.IndexOf(Item: JSValue): Integer;\r\n\r\nVar\r\n C : Integer;\r\n\r\nbegin\r\n Result:=0;\r\n C:=Count;\r\n while (ResultItem) do\r\n Inc(Result);\r\n If Result>=C then\r\n Result:=-1;\r\n\r\nend;\r\n\r\nfunction TFPList.IndexOfItem(Item: JSValue; Direction: TDirection): Integer;\r\n\r\nbegin\r\n if Direction=fromBeginning then\r\n Result:=IndexOf(Item)\r\n else\r\n begin\r\n Result:=Count-1;\r\n while (Result >=0) and (Flist[Result]<>Item) do\r\n Result:=Result - 1;\r\n end;\r\nend;\r\n\r\n\r\nprocedure TFPList.Insert(Index: Integer; Item: JSValue);\r\nbegin\r\n if (Index < 0) or (Index > FCount )then\r\n Error(SlistIndexError, str(Index));\r\n TJSArray(FList).splice(Index, 0, Item);\r\n inc(FCapacity);\r\n inc(FCount);\r\nend;\r\n\r\nfunction TFPList.Last: JSValue;\r\nbegin\r\n If FCount = 0 then\r\n Result := nil\r\n else\r\n Result := Items[FCount - 1];\r\nend;\r\n\r\nprocedure TFPList.Move(CurIndex, NewIndex: Integer);\r\nvar\r\n Temp: JSValue;\r\nbegin\r\n if (CurIndex < 0) or (CurIndex > Count - 1) then\r\n Error(SListIndexError, str(CurIndex));\r\n if (NewIndex < 0) or (NewIndex > Count -1) then\r\n Error(SlistIndexError, str(NewIndex));\r\n if CurIndex=NewIndex then exit;\r\n Temp:=FList[CurIndex];\r\n // ToDo: use TJSArray.copyWithin if available\r\n TJSArray(FList).splice(CurIndex,1);\r\n TJSArray(FList).splice(NewIndex,0,Temp);\r\nend;\r\n\r\nprocedure TFPList.Assign(ListA: TFPList; AOperator: TListAssignOp;\r\n ListB: TFPList);\r\nbegin\r\n case AOperator of\r\n laCopy : DoCopy (ListA, ListB); // replace dest with src\r\n laSrcUnique : DoSrcUnique (ListA, ListB); // replace dest with src that are not in dest\r\n laAnd : DoAnd (ListA, ListB); // remove from dest that are not in src\r\n laDestUnique: DoDestUnique (ListA, ListB);// remove from dest that are in src\r\n laOr : DoOr (ListA, ListB); // add to dest from src and not in dest\r\n laXOr : DoXOr (ListA, ListB); // add to dest from src and not in dest, remove from dest that are in src\r\n end;\r\nend;\r\n\r\nfunction TFPList.Remove(Item: JSValue): Integer;\r\nbegin\r\n Result := IndexOf(Item);\r\n If Result <> -1 then\r\n Delete(Result);\r\nend;\r\n\r\nprocedure TFPList.Pack;\r\nvar\r\n Dst, i: Integer;\r\n V: JSValue;\r\nbegin\r\n Dst:=0;\r\n for i:=0 to Count-1 do\r\n begin\r\n V:=FList[i];\r\n if not Assigned(V) then continue;\r\n FList[Dst]:=V;\r\n inc(Dst);\r\n end;\r\nend;\r\n\r\n// Needed by Sort method.\r\n\r\nProcedure QuickSort(aList: TJSValueDynArray; L, R : Longint;\r\n const Compare: TListSortCompareFunc\r\n );\r\nvar\r\n I, J, PivotIdx : SizeUInt;\r\n P, Q : JSValue;\r\nbegin\r\n repeat\r\n I := L;\r\n J := R;\r\n PivotIdx := L + ((R - L) shr 1); { same as ((L + R) div 2), but without the possibility of overflow }\r\n P := aList[PivotIdx];\r\n repeat\r\n while (I < PivotIdx) and (Compare(P, aList[i]) > 0) do\r\n Inc(I);\r\n while (J > PivotIdx) and (Compare(P, aList[J]) < 0) do\r\n Dec(J);\r\n if I < J then\r\n begin\r\n Q := aList[I];\r\n aList[I] := aList[J];\r\n aList[J] := Q;\r\n if PivotIdx = I then\r\n begin\r\n PivotIdx := J;\r\n Inc(I);\r\n end\r\n else if PivotIdx = J then\r\n begin\r\n PivotIdx := I;\r\n Dec(J);\r\n end\r\n else\r\n begin\r\n Inc(I);\r\n Dec(J);\r\n end;\r\n end;\r\n until I >= J;\r\n // sort the smaller range recursively\r\n // sort the bigger range via the loop\r\n // Reasons: memory usage is O(log(n)) instead of O(n) and loop is faster than recursion\r\n if (PivotIdx - L) < (R - PivotIdx) then\r\n begin\r\n if (L + 1) < PivotIdx then\r\n QuickSort(aList, L, PivotIdx - 1, Compare);\r\n L := PivotIdx + 1;\r\n end\r\n else\r\n begin\r\n if (PivotIdx + 1) < R then\r\n QuickSort(aList, PivotIdx + 1, R, Compare);\r\n if (L + 1) < PivotIdx then\r\n R := PivotIdx - 1\r\n else\r\n exit;\r\n end;\r\n until L >= R;\r\nend;\r\n\r\n(*\r\nProcedure QuickSort(aList: TJSValueDynArray; L, R : Longint;\r\n const Compare: TListSortCompareFunc);\r\nvar\r\n I, J : Longint;\r\n P, Q : JSValue;\r\nbegin\r\n repeat\r\n I := L;\r\n J := R;\r\n P := aList[ (L + R) div 2 ];\r\n repeat\r\n while Compare(P, aList[i]) > 0 do\r\n I := I + 1;\r\n while Compare(P, aList[J]) < 0 do\r\n J := J - 1;\r\n If I <= J then\r\n begin\r\n Q := aList[I];\r\n aList[I] := aList[J];\r\n aList[J] := Q;\r\n I := I + 1;\r\n J := J - 1;\r\n end;\r\n until I > J;\r\n // sort the smaller range recursively\r\n // sort the bigger range via the loop\r\n // Reasons: memory usage is O(log(n)) instead of O(n) and loop is faster than recursion\r\n if J - L < R - I then\r\n begin\r\n if L < J then\r\n QuickSort(aList, L, J, Compare);\r\n L := I;\r\n end\r\n else\r\n begin\r\n if I < R then\r\n QuickSort(aList, I, R, Compare);\r\n R := J;\r\n end;\r\n until L >= R;\r\nend;\r\n*)\r\n\r\nprocedure TFPList.Sort(const Compare: TListSortCompare);\r\nbegin\r\n if Not Assigned(FList) or (FCount < 2) then exit;\r\n QuickSort(Flist, 0, FCount-1,\r\n function(Item1, Item2: JSValue): Integer\r\n begin\r\n Result := Compare(Item1, Item2);\r\n end);\r\nend;\r\n\r\nprocedure TFPList.SortList(const Compare: TListSortCompareFunc);\r\nbegin\r\n if Not Assigned(FList) or (FCount < 2) then exit;\r\n QuickSort(Flist, 0, FCount-1, Compare);\r\nend;\r\n\r\nprocedure TFPList.ForEachCall(const proc2call: TListCallback; const arg: JSValue\r\n );\r\nvar\r\n i : integer;\r\n v : JSValue;\r\nbegin\r\n For I:=0 To Count-1 Do\r\n begin\r\n v:=FList[i];\r\n if Assigned(v) then\r\n proc2call(v,arg);\r\n end;\r\nend;\r\n\r\nprocedure TFPList.ForEachCall(const proc2call: TListStaticCallback;\r\n const arg: JSValue);\r\nvar\r\n i : integer;\r\n v : JSValue;\r\nbegin\r\n For I:=0 To Count-1 Do\r\n begin\r\n v:=FList[i];\r\n if Assigned(v) then\r\n proc2call(v,arg);\r\n end;\r\nend;\r\n\r\n{ TList }\r\n\r\nprocedure TList.CopyMove(aList: TList);\r\nvar\r\n r : integer;\r\nbegin\r\n Clear;\r\n for r := 0 to aList.count-1 do\r\n Add(aList[r]);\r\nend;\r\n\r\nprocedure TList.MergeMove(aList: TList);\r\nvar r : integer;\r\nbegin\r\n For r := 0 to aList.count-1 do\r\n if IndexOf(aList[r]) < 0 then\r\n Add(aList[r]);\r\nend;\r\n\r\nprocedure TList.DoCopy(ListA, ListB: TList);\r\nbegin\r\n if Assigned(ListB) then\r\n CopyMove(ListB)\r\n else\r\n CopyMove(ListA);\r\nend;\r\n\r\nprocedure TList.DoSrcUnique(ListA, ListB: TList);\r\nvar r : integer;\r\nbegin\r\n if Assigned(ListB) then\r\n begin\r\n Clear;\r\n for r := 0 to ListA.Count-1 do\r\n if ListB.IndexOf(ListA[r]) < 0 then\r\n Add(ListA[r]);\r\n end\r\n else\r\n begin\r\n for r := Count-1 downto 0 do\r\n if ListA.IndexOf(Self[r]) >= 0 then\r\n Delete(r);\r\n end;\r\nend;\r\n\r\nprocedure TList.DoAnd(ListA, ListB: TList);\r\nvar r : integer;\r\nbegin\r\n if Assigned(ListB) then\r\n begin\r\n Clear;\r\n for r := 0 to ListA.Count-1 do\r\n if ListB.IndexOf(ListA[r]) >= 0 then\r\n Add(ListA[r]);\r\n end\r\n else\r\n begin\r\n for r := Count-1 downto 0 do\r\n if ListA.IndexOf(Self[r]) < 0 then\r\n Delete(r);\r\n end;\r\nend;\r\n\r\nprocedure TList.DoDestUnique(ListA, ListB: TList);\r\n\r\n procedure MoveElements(Src, Dest : TList);\r\n var r : integer;\r\n begin\r\n Clear;\r\n for r := 0 to Src.Count-1 do\r\n if Dest.IndexOf(Src[r]) < 0 then\r\n Add(Src[r]);\r\n end;\r\n\r\nvar Dest : TList;\r\nbegin\r\n if Assigned(ListB) then\r\n MoveElements(ListB, ListA)\r\n else\r\n try\r\n Dest := TList.Create;\r\n Dest.CopyMove(Self);\r\n MoveElements(ListA, Dest)\r\n finally\r\n Dest.Destroy;\r\n end;\r\nend;\r\n\r\nprocedure TList.DoOr(ListA, ListB: TList);\r\nbegin\r\n if Assigned(ListB) then\r\n begin\r\n CopyMove(ListA);\r\n MergeMove(ListB);\r\n end\r\n else\r\n MergeMove(ListA);\r\nend;\r\n\r\nprocedure TList.DoXOr(ListA, ListB: TList);\r\nvar\r\n r : integer;\r\n l : TList;\r\nbegin\r\n if Assigned(ListB) then\r\n begin\r\n Clear;\r\n for r := 0 to ListA.Count-1 do\r\n if ListB.IndexOf(ListA[r]) < 0 then\r\n Add(ListA[r]);\r\n for r := 0 to ListB.Count-1 do\r\n if ListA.IndexOf(ListB[r]) < 0 then\r\n Add(ListB[r]);\r\n end\r\n else\r\n try\r\n l := TList.Create;\r\n l.CopyMove (Self);\r\n for r := Count-1 downto 0 do\r\n if listA.IndexOf(Self[r]) >= 0 then\r\n Delete(r);\r\n for r := 0 to ListA.Count-1 do\r\n if l.IndexOf(ListA[r]) < 0 then\r\n Add(ListA[r]);\r\n finally\r\n l.Destroy;\r\n end;\r\nend;\r\n\r\nfunction TList.Get(Index: Integer): JSValue;\r\nbegin\r\n Result := FList.Get(Index);\r\nend;\r\n\r\nprocedure TList.Put(Index: Integer; Item: JSValue);\r\nvar V : JSValue;\r\nbegin\r\n V := Get(Index);\r\n FList.Put(Index, Item);\r\n if Assigned(V) then\r\n Notify(V, lnDeleted);\r\n if Assigned(Item) then\r\n Notify(Item, lnAdded);\r\nend;\r\n\r\nprocedure TList.Notify(aValue: JSValue; Action: TListNotification);\r\nbegin\r\n if Assigned(aValue) then ;\r\n if Action=lnExtracted then ;\r\nend;\r\n\r\nprocedure TList.SetCapacity(NewCapacity: Integer);\r\nbegin\r\n FList.SetCapacity(NewCapacity);\r\nend;\r\n\r\nfunction TList.GetCapacity: integer;\r\nbegin\r\n Result := FList.Capacity;\r\nend;\r\n\r\nprocedure TList.SetCount(NewCount: Integer);\r\nbegin\r\n if NewCount < FList.Count then\r\n while FList.Count > NewCount do\r\n Delete(FList.Count - 1)\r\n else\r\n FList.SetCount(NewCount);\r\nend;\r\n\r\nfunction TList.GetCount: integer;\r\nbegin\r\n Result := FList.Count;\r\nend;\r\n\r\nfunction TList.GetList: TJSValueDynArray;\r\nbegin\r\n Result := FList.List;\r\nend;\r\n\r\nconstructor TList.Create;\r\nbegin\r\n inherited Create;\r\n FList := TFPList.Create;\r\nend;\r\n\r\ndestructor TList.Destroy;\r\nbegin\r\n if Assigned(FList) then\r\n Clear;\r\n FreeAndNil(FList);\r\nend;\r\n\r\nprocedure TList.AddList(AList: TList);\r\nvar\r\n I: Integer;\r\nbegin\r\n { this only does FList.AddList(AList.FList), avoiding notifications }\r\n FList.AddList(AList.FList);\r\n\r\n { make lnAdded notifications }\r\n for I := 0 to AList.Count - 1 do\r\n if Assigned(AList[I]) then\r\n Notify(AList[I], lnAdded);\r\nend;\r\n\r\nfunction TList.Add(Item: JSValue): Integer;\r\nbegin\r\n Result := FList.Add(Item);\r\n if Assigned(Item) then\r\n Notify(Item, lnAdded);\r\nend;\r\n\r\nprocedure TList.Clear;\r\nbegin\r\n While (FList.Count>0) do\r\n Delete(Count-1);\r\nend;\r\n\r\nprocedure TList.Delete(Index: Integer);\r\n\r\nvar V : JSValue;\r\n\r\nbegin\r\n V:=FList.Get(Index);\r\n FList.Delete(Index);\r\n if assigned(V) then\r\n Notify(V, lnDeleted);\r\nend;\r\n\r\nclass procedure TList.Error(const Msg: string; Data: String);\r\nbegin\r\n Raise EListError.CreateFmt(Msg,[Data]);\r\nend;\r\n\r\nprocedure TList.Exchange(Index1, Index2: Integer);\r\nbegin\r\n FList.Exchange(Index1, Index2);\r\nend;\r\n\r\nfunction TList.Expand: TList;\r\nbegin\r\n FList.Expand;\r\n Result:=Self;\r\nend;\r\n\r\nfunction TList.Extract(Item: JSValue): JSValue;\r\nvar c : integer;\r\nbegin\r\n c := FList.Count;\r\n Result := FList.Extract(Item);\r\n if c <> FList.Count then\r\n Notify (Result, lnExtracted);\r\nend;\r\n\r\nfunction TList.First: JSValue;\r\nbegin\r\n Result := FList.First;\r\nend;\r\n\r\nfunction TList.GetEnumerator: TListEnumerator;\r\nbegin\r\n Result:=TListEnumerator.Create(Self);\r\nend;\r\n\r\nfunction TList.IndexOf(Item: JSValue): Integer;\r\nbegin\r\n Result := FList.IndexOf(Item);\r\nend;\r\n\r\nprocedure TList.Insert(Index: Integer; Item: JSValue);\r\nbegin\r\n FList.Insert(Index, Item);\r\n if Assigned(Item) then\r\n Notify(Item,lnAdded);\r\nend;\r\n\r\nfunction TList.Last: JSValue;\r\nbegin\r\n Result := FList.Last;\r\nend;\r\n\r\nprocedure TList.Move(CurIndex, NewIndex: Integer);\r\nbegin\r\n FList.Move(CurIndex, NewIndex);\r\nend;\r\n\r\nprocedure TList.Assign(ListA: TList; AOperator: TListAssignOp; ListB: TList);\r\nbegin\r\n case AOperator of\r\n laCopy : DoCopy (ListA, ListB); // replace dest with src\r\n laSrcUnique : DoSrcUnique (ListA, ListB); // replace dest with src that are not in dest\r\n laAnd : DoAnd (ListA, ListB); // remove from dest that are not in src\r\n laDestUnique: DoDestUnique (ListA, ListB);// remove from dest that are in src\r\n laOr : DoOr (ListA, ListB); // add to dest from src and not in dest\r\n laXOr : DoXOr (ListA, ListB); // add to dest from src and not in dest, remove from dest that are in src\r\n end;\r\nend;\r\n\r\nfunction TList.Remove(Item: JSValue): Integer;\r\nbegin\r\n Result := IndexOf(Item);\r\n if Result <> -1 then\r\n Self.Delete(Result);\r\nend;\r\n\r\nprocedure TList.Pack;\r\nbegin\r\n FList.Pack;\r\nend;\r\n\r\nprocedure TList.Sort(const Compare: TListSortCompare);\r\nbegin\r\n FList.Sort(Compare);\r\nend;\r\n\r\nprocedure TList.SortList(const Compare: TListSortCompareFunc);\r\nbegin\r\n FList.SortList(Compare);\r\nend;\r\n\r\n{ TPersistent }\r\n\r\nprocedure TPersistent.AssignError(Source: TPersistent);\r\nvar\r\n SourceName: String;\r\nbegin\r\n if Source<>Nil then\r\n SourceName:=Source.ClassName\r\n else\r\n SourceName:='Nil';\r\n raise EConvertError.Create('Cannot assign a '+SourceName+' to a '+ClassName+'.');\r\nend;\r\n\r\nprocedure TPersistent.DefineProperties(Filer: TFiler);\r\nbegin\r\n if Filer=Nil then exit;\r\n // Do nothing\r\nend;\r\n\r\nprocedure TPersistent.AssignTo(Dest: TPersistent);\r\nbegin\r\n Dest.AssignError(Self);\r\nend;\r\n\r\nfunction TPersistent.GetOwner: TPersistent;\r\nbegin\r\n Result:=nil;\r\nend;\r\n\r\nprocedure TPersistent.Assign(Source: TPersistent);\r\nbegin\r\n If Source<>Nil then\r\n Source.AssignTo(Self)\r\n else\r\n AssignError(Nil);\r\nend;\r\n\r\nfunction TPersistent.GetNamePath: string;\r\nvar\r\n OwnerName: String;\r\n TheOwner: TPersistent;\r\nbegin\r\n Result:=ClassName;\r\n TheOwner:=GetOwner;\r\n if TheOwner<>Nil then\r\n begin\r\n OwnerName:=TheOwner.GetNamePath;\r\n if OwnerName<>'' then Result:=OwnerName+'.'+Result;\r\n end;\r\nend;\r\n\r\nprocedure TPersistent.SetEvent(const ALookupRoot: TPersistent; const APropName, AMethodName: string);\r\nbegin\r\n SetEvent(Self, ALookupRoot, APropName, AMethodName);\r\nend;\r\n\r\nprocedure TPersistent.SetEvent(const AInstance, ALookupRoot: TPersistent; const APropName, AMethodName: string);\r\nvar\r\n lMethod: TMethod;\r\nbegin\r\n lMethod.Code := ALookupRoot.MethodAddress(AMethodName);\r\n if Assigned(lMethod.Code) then\r\n begin\r\n lMethod.Data := ALookupRoot;\r\n SetMethodProp(AInstance, APropName, lMethod);\r\n end;\r\nend;\r\n\r\n{\r\n This file is part of the Free Component Library (FCL)\r\n Copyright (c) 1999-2000 by the Free Pascal development team\r\n\r\n See the file COPYING.FPC, included in this distribution,\r\n for details about the copyright.\r\n\r\n This program is distributed in the hope that it will be useful,\r\n but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\r\n\r\n **********************************************************************}\r\n\r\n{****************************************************************************}\r\n{* TStringsEnumerator *}\r\n{****************************************************************************}\r\n\r\nconstructor TStringsEnumerator.Create(AStrings: TStrings);\r\nbegin\r\n inherited Create;\r\n FStrings := AStrings;\r\n FPosition := -1;\r\nend;\r\n\r\nfunction TStringsEnumerator.GetCurrent: String;\r\nbegin\r\n Result := FStrings[FPosition];\r\nend;\r\n\r\nfunction TStringsEnumerator.MoveNext: Boolean;\r\nbegin\r\n Inc(FPosition);\r\n Result := FPosition < FStrings.Count;\r\nend;\r\n\r\n{****************************************************************************}\r\n{* TStrings *}\r\n{****************************************************************************}\r\n\r\n// Function to quote text. Should move maybe to sysutils !!\r\n// Also, it is not clear at this point what exactly should be done.\r\n\r\n{ //!! is used to mark unsupported things. }\r\n\r\n{\r\n For compatibility we can't add a Constructor to TSTrings to initialize\r\n the special characters. Therefore we add a routine which is called whenever\r\n the special chars are needed.\r\n}\r\n\r\nprocedure TStrings.CheckSpecialChars;\r\n\r\nbegin\r\n If Not FSpecialCharsInited then\r\n begin\r\n FQuoteChar:='\"';\r\n FDelimiter:=',';\r\n FNameValueSeparator:='=';\r\n FLBS:=DefaultTextLineBreakStyle;\r\n FSpecialCharsInited:=true;\r\n FLineBreak:=sLineBreak;\r\n end;\r\nend;\r\n\r\nfunction TStrings.GetSkipLastLineBreak: Boolean;\r\n\r\nbegin\r\n CheckSpecialChars;\r\n Result:=FSkipLastLineBreak;\r\nend;\r\n\r\nprocedure TStrings.SetSkipLastLineBreak(const AValue : Boolean);\r\n\r\nbegin\r\n CheckSpecialChars;\r\n FSkipLastLineBreak:=AValue;\r\nend;\r\n\r\nprocedure TStrings.ReadData(Reader: TReader);\r\nbegin\r\n Reader.ReadListBegin;\r\n BeginUpdate;\r\n try\r\n Clear;\r\n while not Reader.EndOfList do\r\n Add(Reader.ReadString);\r\n finally\r\n EndUpdate;\r\n end;\r\n Reader.ReadListEnd;\r\nend;\r\n\r\nprocedure TStrings.WriteData(Writer: TWriter);\r\nvar\r\n i: Integer;\r\nbegin\r\n Writer.WriteListBegin;\r\n for i := 0 to Count - 1 do\r\n Writer.WriteString(Strings[i]);\r\n Writer.WriteListEnd;\r\nend;\r\n\r\nprocedure TStrings.DefineProperties(Filer: TFiler);\r\nvar\r\n HasData: Boolean;\r\nbegin\r\n if Assigned(Filer.Ancestor) then\r\n // Only serialize if string list is different from ancestor\r\n if Filer.Ancestor.InheritsFrom(TStrings) then\r\n HasData := not Equals(TStrings(Filer.Ancestor))\r\n else\r\n HasData := True\r\n else\r\n HasData := Count > 0;\r\n Filer.DefineProperty('Strings', @ReadData, @WriteData, HasData);\r\nend;\r\n\r\nfunction TStrings.GetLBS: TTextLineBreakStyle;\r\nbegin\r\n CheckSpecialChars;\r\n Result:=FLBS;\r\nend;\r\n\r\nprocedure TStrings.SetLBS(AValue: TTextLineBreakStyle);\r\nbegin\r\n CheckSpecialChars;\r\n FLBS:=AValue;\r\nend;\r\n\r\nprocedure TStrings.SetDelimiter(c:Char);\r\nbegin\r\n CheckSpecialChars;\r\n FDelimiter:=c;\r\nend;\r\n\r\nfunction TStrings.GetDelimiter: Char;\r\nbegin\r\n CheckSpecialChars;\r\n Result:=FDelimiter;\r\nend;\r\n\r\nprocedure TStrings.SetLineBreak(const S: String);\r\nbegin\r\n CheckSpecialChars;\r\n FLineBreak:=S;\r\nend;\r\n\r\nfunction TStrings.GetLineBreak: String;\r\nbegin\r\n CheckSpecialChars;\r\n Result:=FLineBreak;\r\nend;\r\n\r\n\r\nprocedure TStrings.SetQuoteChar(c:Char);\r\nbegin\r\n CheckSpecialChars;\r\n FQuoteChar:=c;\r\nend;\r\n\r\nfunction TStrings.GetQuoteChar: Char;\r\nbegin\r\n CheckSpecialChars;\r\n Result:=FQuoteChar;\r\nend;\r\n\r\nprocedure TStrings.SetNameValueSeparator(c:Char);\r\nbegin\r\n CheckSpecialChars;\r\n FNameValueSeparator:=c;\r\nend;\r\n\r\nfunction TStrings.GetNameValueSeparator: Char;\r\nbegin\r\n CheckSpecialChars;\r\n Result:=FNameValueSeparator;\r\nend;\r\n\r\n\r\nfunction TStrings.GetCommaText: string;\r\n\r\nVar\r\n C1,C2 : Char;\r\n FSD : Boolean;\r\n\r\nbegin\r\n CheckSpecialChars;\r\n FSD:=StrictDelimiter;\r\n C1:=Delimiter;\r\n C2:=QuoteChar;\r\n Delimiter:=',';\r\n QuoteChar:='\"';\r\n StrictDelimiter:=False;\r\n Try\r\n Result:=GetDelimitedText;\r\n Finally\r\n Delimiter:=C1;\r\n QuoteChar:=C2;\r\n StrictDelimiter:=FSD;\r\n end;\r\nend;\r\n\r\n\r\nfunction TStrings.GetDelimitedText: string;\r\n\r\nVar\r\n I: integer;\r\n RE : string;\r\n S : String;\r\n doQuote : Boolean;\r\n\r\nbegin\r\n CheckSpecialChars;\r\n result:='';\r\n RE:=QuoteChar+'|'+Delimiter;\r\n if not StrictDelimiter then\r\n RE:=' |'+RE;\r\n RE:='/'+RE+'/';\r\n // Check for break characters and quote if required.\r\n For i:=0 to count-1 do\r\n begin\r\n S:=Strings[i];\r\n doQuote:=FAlwaysQuote or (TJSString(s).search(RE)<>-1);\r\n if DoQuote then\r\n Result:=Result+QuoteString(S,QuoteChar)\r\n else\r\n Result:=Result+S;\r\n if I0 then\r\n begin\r\n AName:=Copy(AValue,1,L-1);\r\n // System.Delete(AValue,1,L);\r\n AValue:=Copy(AValue,L+1,length(AValue)-L);\r\n end\r\n else\r\n AName:='';\r\nend;\r\n\r\nprocedure TStrings.LoadFromURL(const aURL: String; Async: Boolean; OnLoaded: TNotifyEventRef; OnError: TStringNotifyEventRef);\r\n\r\n procedure DoLoaded(const aString : String);\r\n begin\r\n Text:=aString;\r\n if Assigned(OnLoaded) then\r\n OnLoaded(Self);\r\n end;\r\n\r\n procedure DoError(const AError : String);\r\n begin\r\n if Assigned(OnError) then\r\n OnError(Self,aError)\r\n else\r\n Raise EInOutError.Create('Failed to load from URL:'+aError);\r\n end;\r\n\r\nbegin\r\n CheckLoadHelper;\r\n GlobalLoadHelper.LoadText(aURL,aSync,@DoLoaded,@DoError);\r\nend;\r\n\r\n{$HINTS OFF}\r\nfunction URLToArrayOfString(URL: string): TJSStringDynArray;\r\nvar\r\n a: TJSStringDynArray;\r\n cors_api_url: string;\r\nbegin\r\n cors_api_url := '';//'https://cors-anywhere.herokuapp.com/';\r\n asm\r\n var xhr = new XMLHttpRequest();\r\n xhr.open(\"GET\", cors_api_url + URL, false);\r\n xhr.send();\r\n\r\n if (xhr.status==200)\r\n {\r\n var obj = xhr.responseText.split(/\\r\\n|\\n/);\r\n for (var i = 0; i < obj.length; i++) {\r\n a.push(obj[i]);\r\n }\r\n }\r\n end;\r\n\r\n Result := a;\r\nend;\r\n{$HINTS ON}\r\n\r\nprocedure TStrings.LoadFromFile(const aFileName: String);\r\nvar\r\n a: TJSStringDynArray;\r\nbegin\r\n a := URLToArrayOfString(aFileName);\r\n AddStrings(a, True);\r\nend;\r\n\r\nprocedure TStrings.LoadFromFile(const aFileName: String; const OnLoaded: TProc; const AError: TProcString);\r\n\r\nbegin\r\n LoadFromURL(aFileName,False,\r\n Procedure (Sender : TObject)\r\n begin\r\n If Assigned(OnLoaded) then\r\n OnLoaded\r\n end,\r\n Procedure (Sender : TObject; Const ErrorMsg : String)\r\n begin\r\n if Assigned(aError) then\r\n aError(ErrorMsg)\r\n end);\r\nend;\r\n\r\nprocedure ReqAsync(AURL: string; LoadProc: TReqLoadProc; ErrorProc: TReqErrorProc);\r\nvar\r\n req: TJSXMLHttpRequest;\r\n\r\n function HandleResponse(Event: TEventListenerEvent): boolean;\r\n var\r\n s:string;\r\n status: integer;\r\n begin\r\n asm\r\n status = Event.target.status;\r\n s = Event.target.responseText;\r\n end;\r\n\r\n if status div 100 = 2 then\r\n LoadProc(s)\r\n else\r\n ErrorProc();\r\n Result := true;\r\n end;\r\n\r\n function HandleError(Event: TEventListenerEvent): boolean;\r\n begin\r\n ErrorProc();\r\n Result := true;\r\n end;\r\n\r\nbegin\r\n req := TJSXMLHttpRequest.new;\r\n req.addEventListener('load', @HandleResponse);\r\n req.addEventListener('abort',@HandleError);\r\n req.addEventListener('timeout',@HandleError);\r\n req.addEventListener('error',@HandleError);\r\n req.open('GET', AURL);\r\n req.send;\r\nend;\r\n\r\nfunction TStrings.LoadFromFileAsync(const aFileName: string): TJSPromise;\r\nbegin\r\n Result := TJSPromise.new(\r\n procedure(ASuccess, AFailed: TJSPromiseResolver)\r\n begin\r\n ReqAsync(aFileName,\r\n procedure(AResponse: string)\r\n begin\r\n ASuccess(True);\r\n Text := AResponse;\r\n end,\r\n procedure()\r\n begin\r\n ASuccess(False);\r\n end);\r\n end);\r\n\r\nend;\r\n\r\nfunction TStrings.ExtractName(const S: String): String;\r\nvar\r\n L: Longint;\r\nbegin\r\n CheckSpecialChars;\r\n L:=Pos(FNameValueSeparator,S);\r\n If L<>0 then\r\n Result:=Copy(S,1,L-1)\r\n else\r\n Result:='';\r\nend;\r\n\r\nfunction TStrings.GetName(Index: Integer): string;\r\n\r\nVar\r\n V : String;\r\n\r\nbegin\r\n GetNameValue(Index,Result,V);\r\nend;\r\n\r\nfunction TStrings.GetValue(const Name: string): string;\r\n\r\nVar\r\n L : longint;\r\n N : String;\r\n\r\nbegin\r\n Result:='';\r\n L:=IndexOfName(Name);\r\n If L<>-1 then\r\n GetNameValue(L,N,Result);\r\nend;\r\n\r\nfunction TStrings.GetValueFromIndex(Index: Integer): string;\r\n\r\nVar\r\n N : String;\r\n\r\nbegin\r\n GetNameValue(Index,N,Result);\r\nend;\r\n\r\nprocedure TStrings.SetValueFromIndex(Index: Integer; const Value: string);\r\n\r\nbegin\r\n If (Value='') then\r\n Delete(Index)\r\n else\r\n begin\r\n If (Index<0) then\r\n Index:=Add('');\r\n CheckSpecialChars;\r\n Strings[Index]:=GetName(Index)+FNameValueSeparator+Value;\r\n end;\r\nend;\r\n\r\nprocedure TStrings.SetDelimitedText(const AValue: string);\r\nvar i,j:integer;\r\n aNotFirst:boolean;\r\nbegin\r\n CheckSpecialChars;\r\n BeginUpdate;\r\n\r\n i:=1;\r\n j:=1;\r\n aNotFirst:=false;\r\n\r\n { Paraphrased from Delphi XE2 help:\r\n Strings must be separated by Delimiter characters or spaces.\r\n They may be enclosed in QuoteChars.\r\n QuoteChars in the string must be repeated to distinguish them from the QuoteChars enclosing the string.\r\n }\r\n try\r\n Clear;\r\n If StrictDelimiter then\r\n begin\r\n while i<=length(AValue) do begin\r\n // skip delimiter\r\n if aNotFirst and (i<=length(AValue)) and (AValue[i]=FDelimiter) then inc(i);\r\n\r\n // read next string\r\n if i<=length(AValue) then begin\r\n if AValue[i]=FQuoteChar then begin\r\n // next string is quoted\r\n j:=i+1;\r\n while (j<=length(AValue)) and\r\n ( (AValue[j]<>FQuoteChar) or\r\n ( (j+1<=length(AValue)) and (AValue[j+1]=FQuoteChar) ) ) do begin\r\n if (j<=length(AValue)) and (AValue[j]=FQuoteChar) then inc(j,2)\r\n else inc(j);\r\n end;\r\n // j is position of closing quote\r\n Add( StringReplace (Copy(AValue,i+1,j-i-1),\r\n FQuoteChar+FQuoteChar,FQuoteChar, [rfReplaceAll]));\r\n i:=j+1;\r\n end else begin\r\n // next string is not quoted; read until delimiter\r\n j:=i;\r\n while (j<=length(AValue)) and\r\n (AValue[j]<>FDelimiter) do inc(j);\r\n Add( Copy(AValue,i,j-i));\r\n i:=j;\r\n end;\r\n end else begin\r\n if aNotFirst then Add('');\r\n end;\r\n\r\n aNotFirst:=true;\r\n end;\r\n end\r\n else\r\n begin\r\n while i<=length(AValue) do begin\r\n // skip delimiter\r\n if aNotFirst and (i<=length(AValue)) and (AValue[i]=FDelimiter) then inc(i);\r\n\r\n // skip spaces\r\n while (i<=length(AValue)) and (Ord(AValue[i])<=Ord(' ')) do inc(i);\r\n\r\n // read next string\r\n if i<=length(AValue) then begin\r\n if AValue[i]=FQuoteChar then begin\r\n // next string is quoted\r\n j:=i+1;\r\n while (j<=length(AValue)) and\r\n ( (AValue[j]<>FQuoteChar) or\r\n ( (j+1<=length(AValue)) and (AValue[j+1]=FQuoteChar) ) ) do begin\r\n if (j<=length(AValue)) and (AValue[j]=FQuoteChar) then inc(j,2)\r\n else inc(j);\r\n end;\r\n // j is position of closing quote\r\n Add( StringReplace (Copy(AValue,i+1,j-i-1),\r\n FQuoteChar+FQuoteChar,FQuoteChar, [rfReplaceAll]));\r\n i:=j+1;\r\n end else begin\r\n // next string is not quoted; read until control character/space/delimiter\r\n j:=i;\r\n while (j<=length(AValue)) and\r\n (Ord(AValue[j])>Ord(' ')) and\r\n (AValue[j]<>FDelimiter) do inc(j);\r\n Add( Copy(AValue,i,j-i));\r\n i:=j;\r\n end;\r\n end else begin\r\n if aNotFirst then Add('');\r\n end;\r\n\r\n // skip spaces\r\n while (i<=length(AValue)) and (Ord(AValue[i])<=Ord(' ')) do inc(i);\r\n\r\n aNotFirst:=true;\r\n end;\r\n end;\r\n finally\r\n EndUpdate;\r\n end;\r\nend;\r\n\r\nprocedure TStrings.SetCommaText(const Value: string);\r\n\r\nVar\r\n C1,C2 : Char;\r\n\r\nbegin\r\n CheckSpecialChars;\r\n C1:=Delimiter;\r\n C2:=QuoteChar;\r\n Delimiter:=',';\r\n QuoteChar:='\"';\r\n Try\r\n SetDelimitedText(Value);\r\n Finally\r\n Delimiter:=C1;\r\n QuoteChar:=C2;\r\n end;\r\nend;\r\n\r\nprocedure TStrings.SetValue(const Name: String; const Value: string);\r\n\r\nVar L : longint;\r\n\r\nbegin\r\n CheckSpecialChars;\r\n L:=IndexOfName(Name);\r\n if L=-1 then\r\n Add (Name+FNameValueSeparator+Value)\r\n else\r\n Strings[L]:=Name+FNameValueSeparator+value;\r\nend;\r\n\r\n\r\nprocedure TStrings.Error(const Msg: string; Data: Integer);\r\nbegin\r\n Raise EStringListError.CreateFmt(Msg,[IntToStr(Data)]);\r\nend;\r\n\r\nfunction TStrings.GetCapacity: Integer;\r\n\r\nbegin\r\n Result:=Count;\r\nend;\r\n\r\n\r\n\r\nfunction TStrings.GetObject(Index: Integer): TObject;\r\n\r\nbegin\r\n if Index=0 then ;\r\n Result:=Nil;\r\nend;\r\n\r\nfunction TStrings.GetTextStr: string;\r\n\r\nVar\r\n I : Longint;\r\n S,NL : String;\r\n\r\nbegin\r\n CheckSpecialChars;\r\n // Determine needed place\r\n if FLineBreak<>sLineBreak then\r\n NL:=FLineBreak\r\n else\r\n Case FLBS of\r\n tlbsLF : NL:=#10;\r\n tlbsCRLF : NL:=#13#10;\r\n tlbsCR : NL:=#13;\r\n end;\r\n Result:='';\r\n For i:=0 To count-1 do\r\n begin\r\n S:=Strings[I];\r\n Result:=Result+S;\r\n if (I0) and (PPCR>0) then\r\n begin\r\n if (PPLF-PPCR)=1 then \r\n PL:=2;\r\n if PPLF0) and (PPCR<1) then\r\n PP:=PPLF\r\n else if (PPCR > 0) and (PPLF<1) then\r\n PP:=PPCR\r\n else \r\n PP:=Length(Value)+1;\r\n S:=Copy(Value,P,PP-P);\r\n P:=PP+PL;\r\n Result:=True;\r\nend;\r\n\r\nprocedure TStrings.DoSetTextStr(const Value: string; DoClear: Boolean);\r\n\r\nVar\r\n S : String;\r\n P : Integer;\r\n\r\nbegin\r\n Try\r\n BeginUpdate;\r\n if DoClear then\r\n Clear;\r\n P:=1;\r\n While GetNextLineBreak (Value,S,P) do\r\n Add(S);\r\n finally\r\n EndUpdate;\r\n end;\r\nend;\r\n\r\nprocedure TStrings.SetTextStr(const Value: string);\r\n\r\nbegin\r\n CheckSpecialChars;\r\n DoSetTextStr(Value,True);\r\nend;\r\n\r\nprocedure TStrings.AddText(const S: String);\r\n\r\nbegin\r\n CheckSpecialChars;\r\n DoSetTextStr(S,False);\r\nend;\r\n\r\nprocedure TStrings.SetUpdateState(Updating: Boolean);\r\n\r\nbegin\r\n // FPONotifyObservers(Self,ooChange,Nil);\r\n if Updating then ;\r\nend;\r\n\r\ndestructor TStrings.Destroy;\r\n\r\nbegin\r\n inherited destroy;\r\nend;\r\n\r\nconstructor TStrings.Create;\r\nbegin\r\n inherited Create;\r\n FAlwaysQuote:=False;\r\nend;\r\n\r\nfunction TStrings.ToObjectArray: TObjectDynArray;\r\n\r\nbegin\r\n Result:=ToObjectArray(0,Count-1);\r\nend;\r\n\r\nfunction TStrings.ToObjectArray(aStart,aEnd : Integer): TObjectDynArray;\r\nVar\r\n I : Integer;\r\n\r\nbegin\r\n Result:=Nil;\r\n if aStart>aEnd then exit;\r\n SetLength(Result,aEnd-aStart+1);\r\n For I:=aStart to aEnd do\r\n Result[i-aStart]:=Objects[i];\r\nend;\r\n\r\nfunction TStrings.ToStringArray: TStringDynArray;\r\n\r\nbegin\r\n Result:=ToStringArray(0,Count-1);\r\nend;\r\n\r\nfunction TStrings.ToStringArray(aStart,aEnd : Integer): TStringDynArray;\r\n\r\nVar\r\n I : Integer;\r\n\r\nbegin\r\n Result:=Nil;\r\n if aStart>aEnd then exit;\r\n SetLength(Result,aEnd-aStart+1);\r\n For I:=aStart to aEnd do\r\n Result[i-aStart]:=Strings[i];\r\nend;\r\n\r\nfunction TStrings.Add(const S: string): Integer;\r\n\r\nbegin\r\n Result:=Count;\r\n Insert (Count,S);\r\nend;\r\n\r\n\r\nfunction TStrings.Add(const Fmt: string; const Args: array of const): Integer;\r\n\r\nbegin\r\n Result:=Add(Format(Fmt,Args));\r\nend;\r\n\r\nfunction TStrings.AddFmt(const Fmt: string; const Args: array of const): Integer;\r\n\r\nbegin\r\n Result:=Add(Format(Fmt,Args));\r\nend;\r\n\r\n\r\nfunction TStrings.AddObject(const S: string; AObject: TObject): Integer;\r\n\r\nbegin\r\n Result:=Add(S);\r\n Objects[result]:=AObject;\r\nend;\r\n\r\nfunction TStrings.AddObject(const Fmt: string; Args: array of const; AObject: TObject): Integer;\r\n\r\nbegin\r\n Result:=AddObject(Format(Fmt,Args),AObject);\r\nend;\r\n\r\nprocedure TStrings.Append(const S: string);\r\n\r\nbegin\r\n Add (S);\r\nend;\r\n\r\n\r\n\r\nprocedure TStrings.AddStrings(TheStrings: TStrings; ClearFirst: Boolean);\r\n\r\n\r\nbegin\r\n beginupdate;\r\n try\r\n if ClearFirst then\r\n Clear;\r\n AddStrings(TheStrings);\r\n finally\r\n EndUpdate;\r\n end;\r\nend;\r\n\r\nprocedure TStrings.AddStrings(TheStrings: TStrings);\r\n\r\nVar Runner : longint;\r\nbegin\r\n For Runner:=0 to TheStrings.Count-1 do\r\n self.AddObject (Thestrings[Runner],TheStrings.Objects[Runner]);\r\nend;\r\n\r\nprocedure TStrings.AddStrings(const TheStrings: array of string);\r\n\r\nVar Runner : longint;\r\nbegin\r\n if Count + High(TheStrings)+1 > Capacity then\r\n Capacity := Count + High(TheStrings)+1;\r\n For Runner:=Low(TheStrings) to High(TheStrings) do\r\n self.Add(Thestrings[Runner]);\r\nend;\r\n\r\n\r\nprocedure TStrings.AddStrings(const TheStrings: array of string; ClearFirst: Boolean);\r\n\r\nbegin\r\n beginupdate;\r\n try\r\n if ClearFirst then\r\n Clear;\r\n AddStrings(TheStrings);\r\n finally\r\n EndUpdate;\r\n end;\r\nend;\r\n\r\n\r\nfunction TStrings.AddPair(const AName, AValue: string): TStrings;\r\n\r\nbegin\r\n Result:=AddPair(AName,AValue,Nil);\r\nend;\r\n\r\nfunction TStrings.AddPair(const AName, AValue: string; AObject: TObject): TStrings;\r\n\r\nbegin\r\n Result := Self;\r\n AddObject(AName+NameValueSeparator+AValue, AObject);\r\nend;\r\n\r\n\r\nprocedure TStrings.Assign(Source: TPersistent);\r\n\r\nVar\r\n S : TStrings;\r\n\r\nbegin\r\n If Source is TStrings then\r\n begin\r\n S:=TStrings(Source);\r\n BeginUpdate;\r\n Try\r\n clear;\r\n FSpecialCharsInited:=S.FSpecialCharsInited;\r\n FQuoteChar:=S.FQuoteChar;\r\n FDelimiter:=S.FDelimiter;\r\n FNameValueSeparator:=S.FNameValueSeparator;\r\n FLBS:=S.FLBS;\r\n FLineBreak:=S.FLineBreak;\r\n AddStrings(S);\r\n finally\r\n EndUpdate;\r\n end;\r\n end\r\n else\r\n Inherited Assign(Source);\r\nend;\r\n\r\n\r\n\r\nprocedure TStrings.BeginUpdate;\r\n\r\nbegin\r\n if FUpdateCount = 0 then SetUpdateState(true);\r\n inc(FUpdateCount);\r\nend;\r\n\r\n\r\n\r\nprocedure TStrings.EndUpdate;\r\n\r\nbegin\r\n If FUpdateCount>0 then\r\n Dec(FUpdateCount);\r\n if FUpdateCount=0 then\r\n SetUpdateState(False);\r\nend;\r\n\r\n\r\n\r\nfunction TStrings.Equals(Obj: TObject): Boolean;\r\n\r\nbegin\r\n if Obj is TStrings then\r\n Result := Equals(TStrings(Obj))\r\n else\r\n Result := inherited Equals(Obj);\r\nend;\r\n\r\n\r\n\r\nfunction TStrings.Equals(TheStrings: TStrings): Boolean;\r\n\r\nVar Runner,Nr : Longint;\r\n\r\nbegin\r\n Result:=False;\r\n Nr:=Self.Count;\r\n if Nr<>TheStrings.Count then exit;\r\n For Runner:=0 to Nr-1 do\r\n If Strings[Runner]<>TheStrings[Runner] then exit;\r\n Result:=True;\r\nend;\r\n\r\n\r\n\r\nprocedure TStrings.Exchange(Index1, Index2: Integer);\r\n\r\nVar\r\n Obj : TObject;\r\n Str : String;\r\n\r\nbegin\r\n beginUpdate;\r\n Try\r\n Obj:=Objects[Index1];\r\n Str:=Strings[Index1];\r\n Objects[Index1]:=Objects[Index2];\r\n Strings[Index1]:=Strings[Index2];\r\n Objects[Index2]:=Obj;\r\n Strings[Index2]:=Str;\r\n finally\r\n EndUpdate;\r\n end;\r\nend;\r\n\r\n\r\nfunction TStrings.GetEnumerator: TStringsEnumerator;\r\nbegin\r\n Result:=TStringsEnumerator.Create(Self);\r\nend;\r\n\r\n\r\nfunction TStrings.DoCompareText(const s1, s2: string): PtrInt;\r\nbegin\r\n result:=CompareText(s1,s2);\r\nend;\r\n\r\n\r\nfunction TStrings.IndexOf(const S: string): Integer;\r\nbegin\r\n Result:=0;\r\n While (Result0) do Result:=Result+1;\r\n if Result=Count then Result:=-1;\r\nend;\r\n\r\n\r\nfunction TStrings.IndexOfName(const Name: string): Integer;\r\nVar\r\n len : longint;\r\n S : String;\r\nbegin\r\n CheckSpecialChars;\r\n Result:=0;\r\n while (Result=0) and (DoCompareText(Name,Copy(S,1,Len))=0) then\r\n exit;\r\n inc(result);\r\n end;\r\n result:=-1;\r\nend;\r\n\r\n\r\nfunction TStrings.IndexOfObject(AObject: TObject): Integer;\r\nbegin\r\n Result:=0;\r\n While (ResultAObject) do Result:=Result+1;\r\n If Result=Count then Result:=-1;\r\nend;\r\n\r\n\r\nprocedure TStrings.InsertObject(Index: Integer; const S: string; AObject: TObject);\r\n\r\nbegin\r\n Insert (Index,S);\r\n Objects[Index]:=AObject;\r\nend;\r\n\r\nprocedure TStrings.Move(CurIndex, NewIndex: Integer);\r\nVar\r\n Obj : TObject;\r\n Str : String;\r\nbegin\r\n BeginUpdate;\r\n Try\r\n Obj:=Objects[CurIndex];\r\n Str:=Strings[CurIndex];\r\n Objects[CurIndex]:=Nil; // Prevent Delete from freeing.\r\n Delete(Curindex);\r\n InsertObject(NewIndex,Str,Obj);\r\n finally\r\n EndUpdate;\r\n end;\r\nend;\r\n\r\n{$HINTS OFF}\r\nprocedure TStrings.SaveToFile(const FileName: string);\r\nvar\r\n AText: string;\r\nbegin\r\n AText := self.Text;\r\n asm\r\n var element = document.createElement('a');\r\n element.setAttribute('href', 'data:text/plain;charset=utf-8,' + encodeURIComponent(AText));\r\n if (FileName != ''){\r\n element.setAttribute('download', FileName);\r\n }\r\n element.style.display = 'none';\r\n document.body.appendChild(element);\r\n element.click();\r\n document.body.removeChild(element);\r\n end;\r\nend;\r\n{$HINTS ON}\r\n\r\n\r\n{****************************************************************************}\r\n{* TStringList *}\r\n{****************************************************************************}\r\n\r\n\r\nprocedure TStringList.ExchangeItemsInt(Index1, Index2: Integer);\r\n\r\nVar\r\n S : String;\r\n O : TObject;\r\n\r\nbegin\r\n S:=Flist[Index1].FString;\r\n O:=Flist[Index1].FObject;\r\n Flist[Index1].Fstring:=Flist[Index2].Fstring;\r\n Flist[Index1].FObject:=Flist[Index2].FObject;\r\n Flist[Index2].Fstring:=S;\r\n Flist[Index2].FObject:=O;\r\nend;\r\n\r\nfunction TStringList.GetSorted: Boolean;\r\nbegin\r\n Result:=FSortStyle in [sslUser,sslAuto];\r\nend;\r\n\r\n\r\nprocedure TStringList.ExchangeItems(Index1, Index2: Integer);\r\nbegin\r\n ExchangeItemsInt(Index1, Index2);\r\nend;\r\n\r\n\r\nprocedure TStringList.Grow;\r\n\r\nVar\r\n NC : Integer;\r\n\r\nbegin\r\n NC:=Capacity;\r\n If NC>=256 then\r\n NC:=NC+(NC Div 4)\r\n else if NC=0 then\r\n NC:=4\r\n else\r\n NC:=NC*4;\r\n SetCapacity(NC);\r\nend;\r\n\r\nprocedure TStringList.InternalClear(FromIndex: Integer; ClearOnly: Boolean);\r\n\r\nVar\r\n I: Integer;\r\n\r\nbegin\r\n if FromIndex < FCount then\r\n begin\r\n if FOwnsObjects then\r\n begin\r\n For I:=FromIndex to FCount-1 do\r\n begin\r\n Flist[I].FString:='';\r\n freeandnil(Flist[i].FObject);\r\n end;\r\n end\r\n else\r\n begin\r\n For I:=FromIndex to FCount-1 do\r\n Flist[I].FString:='';\r\n end;\r\n FCount:=FromIndex;\r\n end;\r\n if Not ClearOnly then\r\n SetCapacity(0);\r\nend;\r\n\r\n\r\nprocedure TStringList.QuickSort(L, R: Integer; CompareFn: TStringListSortCompare\r\n );\r\n\r\n\r\nvar\r\n Pivot, vL, vR: Integer;\r\n\r\nbegin\r\n //if ExchangeItems is override call that, else call (faster) ExchangeItemsInt\r\n\r\n if R - L <= 1 then begin // a little bit of time saver\r\n if L < R then\r\n if CompareFn(Self, L, R) > 0 then\r\n ExchangeItems(L, R);\r\n\r\n Exit;\r\n end;\r\n\r\n vL := L;\r\n vR := R;\r\n\r\n Pivot := L + Random(R - L); // they say random is best\r\n\r\n while vL < vR do begin\r\n while (vL < Pivot) and (CompareFn(Self, vL, Pivot) <= 0) do\r\n Inc(vL);\r\n\r\n while (vR > Pivot) and (CompareFn(Self, vR, Pivot) > 0) do\r\n Dec(vR);\r\n\r\n ExchangeItems(vL, vR);\r\n\r\n if Pivot = vL then // swap pivot if we just hit it from one side\r\n Pivot := vR\r\n else if Pivot = vR then\r\n Pivot := vL;\r\n end;\r\n\r\n if Pivot - 1 >= L then\r\n QuickSort(L, Pivot - 1, CompareFn);\r\n if Pivot + 1 <= R then\r\n QuickSort(Pivot + 1, R, CompareFn);\r\nend;\r\n\r\n\r\nprocedure TStringList.InsertItem(Index: Integer; const S: string);\r\nbegin\r\n InsertItem(Index, S, nil);\r\nend;\r\n\r\n\r\nprocedure TStringList.InsertItem(Index: Integer; const S: string; O: TObject);\r\n\r\nVar\r\n It : TStringItem;\r\n \r\nbegin\r\n Changing;\r\n If FCount=Capacity then Grow;\r\n it.FString:=S;\r\n it.FObject:=O;\r\n TJSArray(FList).Splice(Index,0,It);\r\n Inc(FCount);\r\n Changed;\r\nend;\r\n\r\n\r\nprocedure TStringList.SetSorted(Value: Boolean);\r\n\r\nbegin\r\n If Value then\r\n SortStyle:=sslAuto\r\n else\r\n SortStyle:=sslNone\r\nend;\r\n\r\n\r\nfunction TStringList.GetTrailingLineBreak: boolean;\r\nbegin\r\n Result := not SkipLastLineBreak;\r\nend;\r\n\r\nprocedure TStringList.SetTrailingLineBreak(const Value: boolean);\r\nbegin\r\n SkipLastLineBreak := not Value;\r\nend;\r\n\r\nprocedure TStringList.Changed;\r\n\r\nbegin\r\n If (FUpdateCount=0) Then\r\n begin\r\n If Assigned(FOnChange) then\r\n FOnchange(Self);\r\n end;\r\nend;\r\n\r\n\r\n\r\nprocedure TStringList.Changing;\r\n\r\nbegin\r\n If FUpdateCount=0 then\r\n if Assigned(FOnChanging) then\r\n FOnchanging(Self);\r\nend;\r\n\r\n\r\n\r\nfunction TStringList.Get(Index: Integer): string;\r\n\r\nbegin\r\n CheckIndex(Index);\r\n Result:=Flist[Index].FString;\r\nend;\r\n\r\n\r\n\r\nfunction TStringList.GetCapacity: Integer;\r\n\r\nbegin\r\n Result:=Length(FList);\r\nend;\r\n\r\n\r\n\r\nfunction TStringList.GetCount: Integer;\r\n\r\nbegin\r\n Result:=FCount;\r\nend;\r\n\r\n\r\n\r\nfunction TStringList.GetObject(Index: Integer): TObject;\r\n\r\nbegin\r\n CheckIndex(Index);\r\n Result:=Flist[Index].FObject;\r\nend;\r\n\r\n\r\n\r\nprocedure TStringList.Put(Index: Integer; const S: string);\r\n\r\nbegin\r\n If Sorted then\r\n Error(SSortedListError,0);\r\n CheckIndex(Index);\r\n Changing;\r\n Flist[Index].FString:=S;\r\n Changed;\r\nend;\r\n\r\n\r\n\r\nprocedure TStringList.PutObject(Index: Integer; AObject: TObject);\r\n\r\nbegin\r\n CheckIndex(Index);\r\n Changing;\r\n Flist[Index].FObject:=AObject;\r\n Changed;\r\nend;\r\n\r\n\r\n\r\nprocedure TStringList.SetCapacity(NewCapacity: Integer);\r\n\r\nbegin\r\n If (NewCapacity<0) then\r\n Error (SListCapacityError,NewCapacity);\r\n If NewCapacity<>Capacity then\r\n SetLength(FList,NewCapacity)\r\nend;\r\n\r\n\r\n\r\nprocedure TStringList.SetUpdateState(Updating: Boolean);\r\n\r\nbegin\r\n If Updating then\r\n Changing\r\n else\r\n Changed\r\nend;\r\n\r\n\r\n\r\nconstructor TStringList.Create(AOwnsObjects: Boolean);\r\nbegin\r\n inherited Create;\r\n OwnsObjects := AOwnsObjects;\r\nend;\r\n\r\nconstructor TStringList.Create(AQuoteChar, ADelimiter: Char);\r\nbegin\r\n inherited Create;\r\n QuoteChar := AQuoteChar;\r\n Delimiter := ADelimiter;\r\nend;\r\n\r\nconstructor TStringList.Create(AQuoteChar, ADelimiter: Char; AOptions: TStringsOptions);\r\nbegin\r\n inherited Create;\r\n QuoteChar := AQuoteChar;\r\n Delimiter := ADelimiter;\r\n StrictDelimiter := (soStrictDelimiter in AOptions);\r\nend;\r\n\r\nconstructor TStringList.Create(ADuplicates: TDuplicates; ASorted: Boolean; ACaseSensitive: Boolean);\r\nbegin\r\n inherited Create;\r\n Duplicates := ADuplicates;\r\n Sorted := ASorted;\r\n CaseSensitive := ACaseSensitive;\r\nend;\r\n\r\ndestructor TStringList.Destroy;\r\nbegin\r\n InternalClear;\r\n Inherited destroy;\r\nend;\r\n\r\nfunction TStringList.Add(const S: string): Integer;\r\n\r\nbegin\r\n If Not (SortStyle=sslAuto) then\r\n Result:=FCount\r\n else\r\n If Find (S,Result) then\r\n Case DUplicates of\r\n DupIgnore : Exit;\r\n DupError : Error(SDuplicateString,0)\r\n end;\r\n InsertItem (Result,S);\r\nend;\r\n\r\nprocedure TStringList.Clear;\r\n\r\nbegin\r\n if FCount = 0 then Exit;\r\n Changing;\r\n InternalClear;\r\n Changed;\r\nend;\r\n\r\nprocedure TStringList.Delete(Index: Integer);\r\n\r\nbegin\r\n CheckIndex(Index);\r\n Changing;\r\n if FOwnsObjects then\r\n FreeAndNil(Flist[Index].FObject);\r\n TJSArray(FList).splice(Index,1); \r\n FList[Count-1].FString:='';\r\n Flist[Count-1].FObject:=Nil;\r\n Dec(FCount);\r\n Changed;\r\nend;\r\n\r\nprocedure TStringList.Exchange(Index1, Index2: Integer);\r\n\r\nbegin\r\n CheckIndex(Index1);\r\n CheckIndex(Index2);\r\n Changing;\r\n ExchangeItemsInt(Index1,Index2);\r\n changed;\r\nend;\r\n\r\nprocedure TStringList.SetCaseSensitive(b : boolean);\r\nbegin\r\n if b=FCaseSensitive then\r\n Exit;\r\n FCaseSensitive:=b;\r\n if FSortStyle=sslAuto then\r\n begin\r\n FForceSort:=True;\r\n try\r\n Sort;\r\n finally\r\n FForceSort:=False;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TStringList.SetSortStyle(AValue: TStringsSortStyle);\r\nbegin\r\n if FSortStyle=AValue then Exit;\r\n if (AValue=sslAuto) then\r\n Sort;\r\n FSortStyle:=AValue;\r\nend;\r\n\r\nprocedure TStringList.CheckIndex(AIndex: Integer);\r\nbegin\r\n If (AIndex<0) or (AIndex>=FCount) then\r\n Error(SListIndexError,AIndex);\r\nend;\r\n\r\n\r\nfunction TStringList.DoCompareText(const s1, s2: string): PtrInt;\r\nbegin\r\n if FCaseSensitive then\r\n result:=CompareStr(s1,s2)\r\n else\r\n result:=CompareText(s1,s2);\r\nend;\r\n\r\n\r\nfunction TStringList.CompareStrings(const s1,s2 : string) : Integer;\r\nbegin\r\n Result := DoCompareText(s1, s2);\r\nend;\r\n\r\n\r\nfunction TStringList.Find(const S: string; out Index: Integer): Boolean;\r\n\r\nvar\r\n L, R, I: Integer;\r\n CompareRes: PtrInt;\r\nbegin\r\n Result := false;\r\n Index:=-1;\r\n if Not Sorted then\r\n Raise EListError.Create(SErrFindNeedsSortedList);\r\n // Use binary search.\r\n L := 0;\r\n R := Count - 1;\r\n while (L<=R) do\r\n begin\r\n I := L + (R - L) div 2;\r\n CompareRes := DoCompareText(S, Flist[I].FString);\r\n if (CompareRes>0) then\r\n L := I+1\r\n else begin\r\n R := I-1;\r\n if (CompareRes=0) then begin\r\n Result := true;\r\n if (Duplicates<>dupAccept) then\r\n L := I; // forces end of while loop\r\n end;\r\n end;\r\n end;\r\n Index := L;\r\nend;\r\n\r\n\r\n\r\nfunction TStringList.IndexOf(const S: string): Integer;\r\n\r\nbegin\r\n If Not Sorted then\r\n Result:=Inherited indexOf(S)\r\n else\r\n // faster using binary search...\r\n If Not Find (S,Result) then\r\n Result:=-1;\r\nend;\r\n\r\n\r\n\r\nprocedure TStringList.Insert(Index: Integer; const S: string);\r\n\r\nbegin\r\n If SortStyle=sslAuto then\r\n Error (SSortedListError,0)\r\n else\r\n begin\r\n If (Index<0) or (Index>FCount) then\r\n Error(SListIndexError,Index); // Cannot use CheckIndex, because there >= FCount...\r\n InsertItem (Index,S);\r\n end;\r\nend;\r\n\r\n\r\nprocedure TStringList.CustomSort(CompareFn: TStringListSortCompare);\r\n\r\nbegin\r\n If (FForceSort or (Not (FSortStyle=sslAuto))) and (FCount>1) then\r\n begin\r\n Changing;\r\n QuickSort(0,FCount-1, CompareFn);\r\n Changed;\r\n end;\r\nend;\r\n\r\nfunction StringListAnsiCompare(List: TStringList; Index1, Index: Integer): Integer;\r\n\r\nbegin\r\n Result := List.DoCompareText(List.FList[Index1].FString,\r\n List.FList[Index].FString);\r\nend;\r\n\r\nprocedure TStringList.Sort;\r\n\r\nbegin\r\n CustomSort(@StringListAnsiCompare);\r\nend;\r\n\r\n{****************************************************************************}\r\n{* TCollectionItem *}\r\n{****************************************************************************}\r\n\r\n\r\nfunction TCollectionItem.GetIndex: Integer;\r\n\r\nbegin\r\n if Assigned(FCollection) then\r\n Result:=FCollection.FItems.IndexOf(Self)\r\n else\r\n Result:=-1;\r\nend;\r\n\r\n\r\n\r\nprocedure TCollectionItem.SetCollection(Value: TCollection);\r\n\r\nbegin\r\n IF Value<>FCollection then\r\n begin\r\n if Assigned(FCollection) then FCollection.RemoveItem(Self);\r\n if Assigned(Value) then Value.InsertItem(Self);\r\n end;\r\nend;\r\n\r\n\r\n\r\nprocedure TCollectionItem.Changed(AllItems: Boolean);\r\n\r\nbegin\r\n If (FCollection<>Nil) and (FCollection.UpdateCount=0) then\r\n begin\r\n If AllItems then\r\n FCollection.Update(Nil)\r\n else\r\n FCollection.Update(Self);\r\n end;\r\nend;\r\n\r\n\r\n\r\nfunction TCollectionItem.GetNamePath: string;\r\n\r\nbegin\r\n If FCollection<>Nil then\r\n Result:=FCollection.GetNamePath+'['+IntToStr(Index)+']'\r\n else\r\n Result:=ClassName;\r\nend;\r\n\r\n\r\nfunction TCollectionItem.GetOwner: TPersistent;\r\n\r\nbegin\r\n Result:=FCollection;\r\nend;\r\n\r\n\r\n\r\nfunction TCollectionItem.GetDisplayName: string;\r\n\r\nbegin\r\n Result:=ClassName;\r\nend;\r\n\r\n\r\n\r\nprocedure TCollectionItem.SetIndex(Value: Integer);\r\n\r\nVar Temp : Longint;\r\n\r\nbegin\r\n Temp:=GetIndex;\r\n If (Temp>-1) and (Temp<>Value) then\r\n begin\r\n FCollection.FItems.Move(Temp,Value);\r\n Changed(True);\r\n end;\r\nend;\r\n\r\n\r\nprocedure TCollectionItem.SetDisplayName(const Value: string);\r\n\r\nbegin\r\n Changed(False);\r\n if Value='' then ;\r\nend;\r\n\r\n\r\n\r\nconstructor TCollectionItem.Create(ACollection: TCollection);\r\n\r\nbegin\r\n Inherited Create;\r\n SetCollection(ACollection);\r\nend;\r\n\r\n\r\n\r\ndestructor TCollectionItem.Destroy;\r\n\r\nbegin\r\n SetCollection(Nil);\r\n Inherited Destroy;\r\nend;\r\n\r\n{****************************************************************************}\r\n{* TCollectionEnumerator *}\r\n{****************************************************************************}\r\n\r\nconstructor TCollectionEnumerator.Create(ACollection: TCollection);\r\nbegin\r\n inherited Create;\r\n FCollection := ACollection;\r\n FPosition := -1;\r\nend;\r\n\r\nfunction TCollectionEnumerator.GetCurrent: TCollectionItem;\r\nbegin\r\n Result := FCollection.Items[FPosition];\r\nend;\r\n\r\nfunction TCollectionEnumerator.MoveNext: Boolean;\r\nbegin\r\n Inc(FPosition);\r\n Result := FPosition < FCollection.Count;\r\nend;\r\n\r\n\r\n{****************************************************************************}\r\n{* TCollection *}\r\n{****************************************************************************}\r\n\r\nfunction TCollection.Owner: TPersistent;\r\nbegin\r\n result:=getowner;\r\nend;\r\n\r\n\r\nfunction TCollection.GetCount: Integer;\r\n\r\nbegin\r\n Result:=FItems.Count;\r\nend;\r\n\r\n\r\nProcedure TCollection.SetPropName;\r\n\r\n{\r\nVar\r\n TheOwner : TPersistent;\r\n PropList : PPropList;\r\n I, PropCount : Integer;\r\n}\r\nbegin\r\n FPropName:='';\r\n{\r\n TheOwner:=GetOwner;\r\n // TODO: This needs to wait till Mattias finishes typeinfo.\r\n // It's normally only used in the designer so should not be a problem currently.\r\n if (TheOwner=Nil) Or (TheOwner.Classinfo=Nil) Then Exit;\r\n // get information from the owner RTTI\r\n PropCount:=GetPropList(TheOwner, PropList);\r\n Try\r\n For I:=0 To PropCount-1 Do\r\n If (PropList^[i]^.PropType^.Kind=tkClass) And\r\n (GetObjectProp(TheOwner, PropList^[i], ClassType)=Self) Then\r\n Begin\r\n FPropName:=PropList^[i]^.Name;\r\n Exit;\r\n End;\r\n Finally\r\n FreeMem(PropList);\r\n End;\r\n}\r\nend;\r\n\r\n\r\nfunction TCollection.GetPropName: string;\r\n\r\n{Var\r\n TheOwner : TPersistent;}\r\n\r\nbegin\r\n Result:=FPropNAme;\r\n// TheOwner:=GetOwner;\r\n// If (Result<>'') or (TheOwner=Nil) Or (TheOwner.Classinfo=Nil) then exit;\r\n SetPropName;\r\n Result:=FPropName;\r\nend;\r\n\r\n\r\nprocedure TCollection.InsertItem(Item: TCollectionItem);\r\nbegin\r\n If Not(Item Is FitemClass) then\r\n exit;\r\n FItems.add(Item);\r\n Item.FCollection:=Self;\r\n Item.FID:=FNextID;\r\n inc(FNextID);\r\n SetItemName(Item);\r\n Notify(Item,cnAdded);\r\n Changed;\r\nend;\r\n\r\n\r\nprocedure TCollection.RemoveItem(Item: TCollectionItem);\r\n\r\nVar\r\n I : Integer;\r\n\r\nbegin\r\n Notify(Item,cnExtracting);\r\n I:=FItems.IndexOfItem(Item,fromEnd);\r\n If (I<>-1) then\r\n FItems.Delete(I);\r\n Item.FCollection:=Nil;\r\n Changed;\r\nend;\r\n\r\n\r\nfunction TCollection.GetAttrCount: Integer;\r\nbegin\r\n Result:=0;\r\nend;\r\n\r\n\r\nfunction TCollection.GetAttr(Index: Integer): string;\r\nbegin\r\n Result:='';\r\n if Index=0 then ;\r\nend;\r\n\r\n\r\nfunction TCollection.GetItemAttr(Index, ItemIndex: Integer): string;\r\nbegin\r\n Result:=TCollectionItem(FItems.Items[ItemIndex]).DisplayName;\r\n if Index=0 then ;\r\nend;\r\n\r\n\r\nfunction TCollection.GetEnumerator: TCollectionEnumerator;\r\nbegin\r\n Result := TCollectionEnumerator.Create(Self);\r\nend;\r\n\r\n\r\nfunction TCollection.GetNamePath: string;\r\nvar o : TPersistent;\r\nbegin\r\n o:=getowner;\r\n if assigned(o) and (propname<>'') then\r\n result:=o.getnamepath+'.'+propname\r\n else\r\n result:=classname;\r\nend;\r\n\r\n\r\nprocedure TCollection.Changed;\r\nbegin\r\n if FUpdateCount=0 then\r\n Update(Nil);\r\nend;\r\n\r\n\r\nfunction TCollection.GetItem(Index: Integer): TCollectionItem;\r\nbegin\r\n Result:=TCollectionItem(FItems.Items[Index]);\r\nend;\r\n\r\n\r\nprocedure TCollection.SetItem(Index: Integer; Value: TCollectionItem);\r\nbegin\r\n TCollectionItem(FItems.items[Index]).Assign(Value);\r\nend;\r\n\r\n\r\nprocedure TCollection.SetItemName(Item: TCollectionItem);\r\nbegin\r\n if Item=nil then ;\r\nend;\r\n\r\nprocedure TCollection.Update(Item: TCollectionItem);\r\nbegin\r\n if Item=nil then ;\r\nend;\r\n\r\n\r\nconstructor TCollection.Create(AItemClass: TCollectionItemClass);\r\nbegin\r\n inherited create;\r\n FItemClass:=AItemClass;\r\n FItems:=TFpList.Create;\r\nend;\r\n\r\n\r\ndestructor TCollection.Destroy;\r\nbegin\r\n FUpdateCount:=1; // Prevent OnChange\r\n try\r\n DoClear;\r\n Finally\r\n FUpdateCount:=0;\r\n end;\r\n if assigned(FItems) then\r\n FItems.Destroy;\r\n Inherited Destroy;\r\nend;\r\n\r\n\r\nfunction TCollection.Add: TCollectionItem;\r\nbegin\r\n Result:=FItemClass.Create(Self);\r\nend;\r\n\r\n\r\nprocedure TCollection.Assign(Source: TPersistent);\r\nVar I : Longint;\r\nbegin\r\n If Source is TCollection then\r\n begin\r\n Clear;\r\n For I:=0 To TCollection(Source).Count-1 do\r\n Add.Assign(TCollection(Source).Items[I]);\r\n exit;\r\n end\r\n else\r\n Inherited Assign(Source);\r\nend;\r\n\r\n\r\nprocedure TCollection.BeginUpdate;\r\nbegin\r\n inc(FUpdateCount);\r\nend;\r\n\r\n\r\nprocedure TCollection.Clear;\r\nbegin\r\n if FItems.Count=0 then\r\n exit; // Prevent Changed\r\n BeginUpdate;\r\n try\r\n DoClear;\r\n finally\r\n EndUpdate;\r\n end;\r\nend;\r\n\r\n\r\nprocedure TCollection.DoClear;\r\nvar\r\n Item: TCollectionItem;\r\nbegin\r\n While FItems.Count>0 do\r\n begin\r\n Item:=TCollectionItem(FItems.Last);\r\n if Assigned(Item) then\r\n Item.Destroy;\r\n end;\r\nend;\r\n\r\n\r\nprocedure TCollection.EndUpdate;\r\nbegin\r\n if FUpdateCount>0 then\r\n dec(FUpdateCount);\r\n if FUpdateCount=0 then\r\n Changed;\r\nend;\r\n\r\n\r\nfunction TCollection.FindItemID(ID: Integer): TCollectionItem;\r\nVar\r\n I : Longint;\r\nbegin\r\n For I:=0 to Fitems.Count-1 do\r\n begin\r\n Result:=TCollectionItem(FItems.items[I]);\r\n If Result.Id=Id then\r\n exit;\r\n end;\r\n Result:=Nil;\r\nend;\r\n\r\n\r\nprocedure TCollection.Delete(Index: Integer);\r\nVar\r\n Item : TCollectionItem;\r\nbegin\r\n Item:=TCollectionItem(FItems[Index]);\r\n Notify(Item,cnDeleting);\r\n If assigned(Item) then\r\n Item.Destroy;\r\nend;\r\n\r\n\r\nfunction TCollection.Insert(Index: Integer): TCollectionItem;\r\nbegin\r\n Result:=Add;\r\n Result.Index:=Index;\r\nend;\r\n\r\n\r\nprocedure TCollection.Notify(Item: TCollectionItem;Action: TCollectionNotification);\r\nbegin\r\n if Item=nil then ;\r\n if Action=cnAdded then ;\r\nend;\r\n\r\nprocedure TCollection.Sort(Const Compare : TCollectionSortCompare);\r\n\r\nbegin\r\n BeginUpdate;\r\n try\r\n FItems.Sort(TListSortCompare(Compare));\r\n Finally\r\n EndUpdate;\r\n end;\r\nend;\r\n\r\nprocedure TCollection.SortList(const Compare: TCollectionSortCompareFunc);\r\n\r\nbegin\r\n BeginUpdate;\r\n try\r\n FItems.SortList(TListSortCompareFunc(Compare));\r\n Finally\r\n EndUpdate;\r\n end;\r\nend;\r\n\r\nprocedure TCollection.Exchange(Const Index1, index2: integer);\r\n\r\nbegin\r\n FItems.Exchange(Index1,Index2);\r\nend;\r\n\r\n\r\n{****************************************************************************}\r\n{* TOwnedCollection *}\r\n{****************************************************************************}\r\n\r\n\r\n\r\nConstructor TOwnedCollection.Create(AOwner: TPersistent; AItemClass: TCollectionItemClass);\r\n\r\nBegin\r\n FOwner := AOwner;\r\n inherited Create(AItemClass);\r\nend;\r\n\r\nFunction TOwnedCollection.GetOwner: TPersistent;\r\n\r\nbegin\r\n Result:=FOwner;\r\nend;\r\n\r\n{****************************************************************************}\r\n{* TComponent *}\r\n{****************************************************************************}\r\n\r\n\r\nfunction TComponent.GetComponent(AIndex: Integer): TComponent;\r\n\r\nbegin\r\n If not assigned(FComponents) then\r\n Result:=Nil\r\n else\r\n Result:=TComponent(FComponents.Items[Aindex]);\r\nend;\r\n\r\nfunction TComponent.GetComponentCount: Integer;\r\n\r\nbegin\r\n If not assigned(FComponents) then\r\n result:=0\r\n else\r\n Result:=FComponents.Count;\r\nend;\r\n\r\n\r\nfunction TComponent.GetComponentIndex: Integer;\r\n\r\nbegin\r\n If Assigned(FOwner) and Assigned(FOwner.FComponents) then\r\n Result:=FOWner.FComponents.IndexOf(Self)\r\n else\r\n Result:=-1;\r\nend;\r\n\r\n\r\nprocedure TComponent.Insert(AComponent: TComponent);\r\n\r\nbegin\r\n If not assigned(FComponents) then\r\n FComponents:=TFpList.Create;\r\n FComponents.Add(AComponent);\r\n AComponent.FOwner:=Self;\r\nend;\r\n\r\n\r\nprocedure TComponent.ReadLeft(AReader: TReader);\r\n\r\nbegin\r\n FDesignInfo := (FDesignInfo and $ffff0000) or (AReader.ReadInteger and $ffff);\r\nend;\r\n\r\n\r\nprocedure TComponent.ReadTop(AReader: TReader);\r\n\r\nbegin\r\n FDesignInfo := ((AReader.ReadInteger and $ffff) shl 16) or (FDesignInfo and $ffff);\r\nend;\r\n\r\n\r\nprocedure TComponent.Remove(AComponent: TComponent);\r\n\r\nbegin\r\n AComponent.FOwner:=Nil;\r\n If assigned(FCOmponents) then\r\n begin\r\n FComponents.Remove(AComponent);\r\n IF FComponents.Count=0 then\r\n begin\r\n FComponents.Destroy;\r\n FComponents:=Nil;\r\n end;\r\n end;\r\nend;\r\n\r\n\r\nprocedure TComponent.RemoveNotification(AComponent: TComponent);\r\n\r\nbegin\r\n if FFreeNotifies<>nil then\r\n begin\r\n FFreeNotifies.Remove(AComponent);\r\n if FFreeNotifies.Count=0 then\r\n begin\r\n FFreeNotifies.Destroy;\r\n FFreeNotifies:=nil;\r\n Exclude(FComponentState,csFreeNotification);\r\n end;\r\n end;\r\nend;\r\n\r\n\r\nprocedure TComponent.SetComponentIndex(Value: Integer);\r\n\r\nVar Temp,Count : longint;\r\n\r\nbegin\r\n If Not assigned(Fowner) then exit;\r\n Temp:=getcomponentindex;\r\n If temp<0 then exit;\r\n If value<0 then value:=0;\r\n Count:=Fowner.FComponents.Count;\r\n If Value>=Count then value:=count-1;\r\n If Value<>Temp then\r\n begin\r\n FOWner.FComponents.Delete(Temp);\r\n FOwner.FComponents.Insert(Value,Self);\r\n end;\r\nend;\r\n\r\n\r\nprocedure TComponent.ChangeName(const NewName: TComponentName);\r\n\r\nbegin\r\n FName:=NewName;\r\nend;\r\n\r\n\r\nprocedure TComponent.DefineProperties(Filer: TFiler);\r\n\r\nvar\r\n Temp: LongInt;\r\n Ancestor: TComponent;\r\nbegin\r\n Ancestor := TComponent(Filer.Ancestor);\r\n if Assigned(Ancestor) then\r\n Temp := Ancestor.FDesignInfo\r\n else\r\n Temp := 0;\r\n Filer.DefineProperty('Left', @ReadLeft, @WriteLeft, (FDesignInfo and $ffff) <> (Temp and $ffff));\r\n Filer.DefineProperty('Top', @ReadTop, @WriteTop, (FDesignInfo and $ffff0000) <> (Temp and $ffff0000));\r\nend;\r\n\r\n\r\nprocedure TComponent.GetChildren(Proc: TGetChildProc; Root: TComponent);\r\n\r\nbegin\r\n // Does nothing.\r\n if Proc=nil then ;\r\n if Root=nil then ;\r\nend;\r\n\r\n\r\nfunction TComponent.GetChildOwner: TComponent;\r\n\r\nbegin\r\n Result:=Nil;\r\nend;\r\n\r\n\r\nfunction TComponent.GetChildParent: TComponent;\r\n\r\nbegin\r\n Result:=Self;\r\nend;\r\n\r\n\r\nfunction TComponent.GetNamePath: string;\r\n\r\nbegin\r\n Result:=FName;\r\nend;\r\n\r\n\r\nfunction TComponent.GetOwner: TPersistent;\r\n\r\nbegin\r\n Result:=FOwner;\r\nend;\r\n\r\n\r\nprocedure TComponent.Loaded;\r\n\r\nbegin\r\n Exclude(FComponentState,csLoading);\r\nend;\r\n\r\nprocedure TComponent.Loading;\r\n\r\nbegin\r\n Include(FComponentState,csLoading);\r\nend;\r\n\r\nprocedure TComponent.SetWriting(Value: Boolean);\r\nbegin\r\n If Value then\r\n Include(FComponentState,csWriting)\r\n else\r\n Exclude(FComponentState,csWriting);\r\nend;\r\n\r\nprocedure TComponent.SetReading(Value: Boolean);\r\nbegin\r\n If Value then\r\n Include(FComponentState,csReading)\r\n else\r\n Exclude(FComponentState,csReading);\r\nend;\r\n\r\n\r\nprocedure TComponent.Notification(AComponent: TComponent; Operation: TOperation);\r\n\r\nVar\r\n C : Longint;\r\n\r\nbegin\r\n If (Operation=opRemove) then\r\n RemoveFreeNotification(AComponent);\r\n If Not assigned(FComponents) then\r\n exit;\r\n C:=FComponents.Count-1;\r\n While (C>=0) do\r\n begin\r\n TComponent(FComponents.Items[C]).Notification(AComponent,Operation);\r\n Dec(C);\r\n if C>=FComponents.Count then\r\n C:=FComponents.Count-1;\r\n end;\r\nend;\r\n\r\n\r\nprocedure TComponent.PaletteCreated;\r\nbegin\r\nend;\r\n\r\nprocedure TComponent.ReadState(Reader: TReader);\r\n\r\nbegin\r\n Reader.ReadData(Self);\r\nend;\r\n\r\n\r\nprocedure TComponent.SetAncestor(Value: Boolean);\r\n\r\nVar Runner : Longint;\r\n\r\nbegin\r\n If Value then\r\n Include(FComponentState,csAncestor)\r\n else\r\n Exclude(FCOmponentState,csAncestor);\r\n if Assigned(FComponents) then\r\n For Runner:=0 To FComponents.Count-1 do\r\n TComponent(FComponents.Items[Runner]).SetAncestor(Value);\r\nend;\r\n\r\n\r\nprocedure TComponent.SetDesigning(Value: Boolean; SetChildren: Boolean);\r\n\r\nVar Runner : Longint;\r\n\r\nbegin\r\n If Value then\r\n Include(FComponentState,csDesigning)\r\n else\r\n Exclude(FComponentState,csDesigning);\r\n if Assigned(FComponents) and SetChildren then\r\n For Runner:=0 To FComponents.Count - 1 do\r\n TComponent(FComponents.items[Runner]).SetDesigning(Value);\r\nend;\r\n\r\nprocedure TComponent.SetDesignInstance(Value: Boolean);\r\n\r\nbegin\r\n If Value then\r\n Include(FComponentState,csDesignInstance)\r\n else\r\n Exclude(FComponentState,csDesignInstance);\r\nend;\r\n\r\nprocedure TComponent.SetInline(Value: Boolean);\r\n\r\nbegin\r\n If Value then\r\n Include(FComponentState,csInline)\r\n else\r\n Exclude(FComponentState,csInline);\r\nend;\r\n\r\n\r\nprocedure TComponent.SetName(const NewName: TComponentName);\r\n\r\nbegin\r\n If FName=NewName then exit;\r\n If (NewName<>'') and not IsValidIdent(NewName) then\r\n Raise EComponentError.CreateFmt(SInvalidName,[NewName]);\r\n If Assigned(FOwner) Then\r\n FOwner.ValidateRename(Self,FName,NewName)\r\n else\r\n ValidateRename(Nil,FName,NewName);\r\n SetReference(False);\r\n ChangeName(NewName);\r\n SetReference(True);\r\nend;\r\n\r\n\r\nprocedure TComponent.SetChildOrder(Child: TComponent; Order: Integer);\r\n\r\nbegin\r\n // does nothing\r\n if Child=nil then ;\r\n if Order=0 then ;\r\nend;\r\n\r\n\r\nprocedure TComponent.SetParentComponent(Value: TComponent);\r\n\r\nbegin\r\n // Does nothing\r\n if Value=nil then ;\r\nend;\r\n\r\n\r\nprocedure TComponent.Updating;\r\n\r\nbegin\r\n Include (FComponentState,csUpdating);\r\nend;\r\n\r\n\r\nprocedure TComponent.Updated;\r\n\r\nbegin\r\n Exclude(FComponentState,csUpdating);\r\nend;\r\n\r\n\r\nprocedure TComponent.ValidateRename(AComponent: TComponent; const CurName, NewName: string);\r\n\r\nbegin\r\n//!! This contradicts the Delphi manual.\r\n If (AComponent<>Nil) and (CompareText(CurName,NewName)<>0) and (AComponent.Owner = Self) and\r\n (FindComponent(NewName)<>Nil) then\r\n raise EComponentError.Createfmt(SDuplicateName,[newname]);\r\n If (csDesigning in FComponentState) and (FOwner<>Nil) then\r\n FOwner.ValidateRename(AComponent,Curname,Newname);\r\nend;\r\n\r\nProcedure TComponent.SetReference(Enable: Boolean);\r\n\r\nvar\r\n aField, aValue, aOwner : Pointer;\r\n\r\nbegin\r\n if Name='' then\r\n exit;\r\n if Assigned(Owner) then\r\n begin\r\n aOwner:=Owner; // so as not to depend on low-level names\r\n aField := Owner.FieldAddress(Name);\r\n if Assigned(aField) then\r\n begin\r\n if Enable then\r\n aValue:= Self\r\n else\r\n aValue := nil;\r\n TJSObject(aOwner)[String(TJSObject(aField)['name'])]:=aValue;\r\n end;\r\n end;\r\nend;\r\n\r\n\r\nprocedure TComponent.WriteLeft(AWriter: TWriter);\r\n\r\nbegin\r\n AWriter.WriteInteger(FDesignInfo and $ffff);\r\nend;\r\n\r\n\r\nprocedure TComponent.WriteTop(AWriter: TWriter);\r\n\r\nbegin\r\n AWriter.WriteInteger((FDesignInfo shr 16) and $ffff);\r\nend;\r\n\r\n\r\nprocedure TComponent.ValidateContainer(AComponent: TComponent);\r\n\r\nbegin\r\n AComponent.ValidateInsert(Self);\r\nend;\r\n\r\n\r\nprocedure TComponent.ValidateInsert(AComponent: TComponent);\r\n\r\nbegin\r\n // Does nothing.\r\n if AComponent=nil then ;\r\nend;\r\n\r\nfunction TComponent._AddRef: Integer;\r\nbegin\r\n Result:=-1;\r\nend;\r\n\r\nfunction TComponent._Release: Integer;\r\nbegin\r\n Result:=-1;\r\nend;\r\n\r\n\r\nconstructor TComponent.Create(AOwner: TComponent);\r\n\r\nbegin\r\n FComponentStyle:=[csInheritable];\r\n If Assigned(AOwner) then AOwner.InsertComponent(Self);\r\nend;\r\n\r\n\r\ndestructor TComponent.Destroy;\r\n\r\nVar\r\n I : Integer;\r\n C : TComponent;\r\n\r\nbegin\r\n Destroying;\r\n If Assigned(FFreeNotifies) then\r\n begin\r\n I:=FFreeNotifies.Count-1;\r\n While (I>=0) do\r\n begin\r\n C:=TComponent(FFreeNotifies.Items[I]);\r\n // Delete, so one component is not notified twice, if it is owned.\r\n FFreeNotifies.Delete(I);\r\n C.Notification (self,opRemove);\r\n If (FFreeNotifies=Nil) then\r\n I:=0\r\n else if (I>FFreeNotifies.Count) then\r\n I:=FFreeNotifies.Count;\r\n dec(i);\r\n end;\r\n FreeAndNil(FFreeNotifies);\r\n end;\r\n DestroyComponents;\r\n If FOwner<>Nil Then FOwner.RemoveComponent(Self);\r\n inherited destroy;\r\nend;\r\n\r\nprocedure TComponent.AfterLoadDFMValues;\r\nbegin\r\n EndUpdate;\r\n Loaded;\r\nend;\r\n\r\n\r\nprocedure TComponent.BeforeDestruction;\r\nbegin\r\n if not(csDestroying in FComponentstate) then\r\n Destroying;\r\nend;\r\n\r\nprocedure TComponent.BeforeLoadDFMValues;\r\nbegin\r\n if not(csDesigning in ComponentState) then\r\n Loading;\r\n BeginUpdate;\r\nend;\r\n\r\nprocedure TComponent.BeginUpdate;\r\nbegin\r\nend;\r\n\r\nprocedure TComponent.DestroyComponents;\r\n\r\nVar acomponent: TComponent;\r\n\r\nbegin\r\n While assigned(FComponents) do\r\n begin\r\n aComponent:=TComponent(FComponents.Last);\r\n Remove(aComponent);\r\n Acomponent.Destroy;\r\n end;\r\nend;\r\n\r\n\r\nprocedure TComponent.Destroying;\r\n\r\nVar Runner : longint;\r\n\r\nbegin\r\n If csDestroying in FComponentstate Then Exit;\r\n include (FComponentState,csDestroying);\r\n If Assigned(FComponents) then\r\n for Runner:=0 to FComponents.Count-1 do\r\n TComponent(FComponents.Items[Runner]).Destroying;\r\nend;\r\n\r\nprocedure TComponent.EndUpdate;\r\nbegin\r\nend;\r\n\r\nfunction TComponent.QueryInterface(const IID: TGUID; out Obj): HRESULT;\r\nbegin\r\n if GetInterface(IID, Obj) then\r\n Result := S_OK\r\n else\r\n Result := E_NOINTERFACE;\r\n\r\nend;\r\n\r\nprocedure TComponent.WriteState(Writer: TWriter);\r\nbegin\r\n Writer.WriteComponentData(Self);\r\nend;\r\n\r\n\r\nfunction TComponent.FindComponent(const AName: string): TComponent;\r\n\r\nVar I : longint;\r\n\r\nbegin\r\n Result:=Nil;\r\n If (AName='') or Not assigned(FComponents) then exit;\r\n For i:=0 to FComponents.Count-1 do\r\n if (CompareText(TComponent(FComponents[I]).Name,AName)=0) then\r\n begin\r\n Result:=TComponent(FComponents.Items[I]);\r\n exit;\r\n end;\r\nend;\r\n\r\n\r\nprocedure TComponent.FreeNotification(AComponent: TComponent);\r\n\r\nbegin\r\n If (Owner<>Nil) and (AComponent=Owner) then exit;\r\n If not (Assigned(FFreeNotifies)) then\r\n FFreeNotifies:=TFpList.Create;\r\n If FFreeNotifies.IndexOf(AComponent)=-1 then\r\n begin\r\n FFreeNotifies.Add(AComponent);\r\n AComponent.FreeNotification (self);\r\n end;\r\nend;\r\n\r\n\r\nprocedure TComponent.RemoveFreeNotification(AComponent: TComponent);\r\nbegin\r\n RemoveNotification(AComponent);\r\n AComponent.RemoveNotification (self);\r\nend;\r\n\r\n\r\nfunction TComponent.GetParentComponent: TComponent;\r\n\r\nbegin\r\n Result:=Nil;\r\nend;\r\n\r\n\r\nfunction TComponent.HasParent: Boolean;\r\n\r\nbegin\r\n Result:=False;\r\nend;\r\n\r\n\r\nprocedure TComponent.InsertComponent(AComponent: TComponent);\r\n\r\nbegin\r\n AComponent.ValidateContainer(Self);\r\n ValidateRename(AComponent,'',AComponent.FName);\r\n if AComponent.FOwner <> nil then\r\n AComponent.FOwner.RemoveComponent(AComponent);\r\n Insert(AComponent);\r\n If csDesigning in FComponentState then\r\n AComponent.SetDesigning(true);\r\n Notification(AComponent,opInsert);\r\nend;\r\n\r\n\r\nprocedure TComponent.RemoveComponent(AComponent: TComponent);\r\n\r\nbegin\r\n Notification(AComponent,opRemove);\r\n Remove(AComponent);\r\n Acomponent.Setdesigning(False);\r\n ValidateRename(AComponent,AComponent.FName,'');\r\nend;\r\n\r\nprocedure TComponent.SetSubComponent(ASubComponent: Boolean);\r\nbegin\r\n if ASubComponent then\r\n Include(FComponentStyle, csSubComponent)\r\n else\r\n Exclude(FComponentStyle, csSubComponent);\r\nend;\r\n\r\nfunction TComponent.GetEnumerator: TComponentEnumerator;\r\nbegin\r\n Result:=TComponentEnumerator.Create(Self);\r\nend;\r\n\r\nfunction TComponent.GetLeft: Integer;\r\nbegin\r\n Result := FLeft;\r\nend;\r\n\r\nfunction TComponent.GetTop: Integer;\r\nbegin\r\n Result := FTop;\r\nend;\r\n\r\nprocedure TComponent.SetLeft(AValue: Integer);\r\nbegin\r\n FLeft := AValue;\r\nend;\r\n\r\nprocedure TComponent.SetTop(AValue: Integer);\r\nbegin\r\n FTop := AValue;\r\nend;\r\n\r\n{ ---------------------------------------------------------------------\r\n TStream\r\n ---------------------------------------------------------------------}\r\n\r\nResourcestring\r\n SStreamInvalidSeek = 'Seek is not implemented for class %s';\r\n SStreamNoReading = 'Stream reading is not implemented for class %s';\r\n SStreamNoWriting = 'Stream writing is not implemented for class %s';\r\n SReadError = 'Could not read data from stream';\r\n SWriteError = 'Could not write data to stream';\r\n SMemoryStreamError = 'Could not allocate memory';\r\n SerrInvalidStreamSize = 'Invalid Stream size';\r\n\r\nprocedure TStream.ReadNotImplemented;\r\nbegin\r\n raise EStreamError.CreateFmt(SStreamNoReading, [ClassName]);\r\nend;\r\n\r\nprocedure TStream.WriteNotImplemented;\r\nbegin\r\n raise EStreamError.CreateFmt(SStreamNoWriting, [ClassName]);\r\nend;\r\n\r\nfunction TStream.Read(var Buffer: TBytes; Count: Longint): Longint;\r\nbegin\r\n Result:=Read(Buffer,0,Count);\r\nend;\r\n\r\n\r\n\r\nfunction TStream.Write(const Buffer: TBytes; Count: Longint): Longint;\r\nbegin\r\n Result:=Self.Write(Buffer,0,Count);\r\nend;\r\n\r\n\r\n\r\nfunction TStream.GetPosition: NativeInt;\r\n\r\nbegin\r\n Result:=Seek(0,soCurrent);\r\nend;\r\n\r\nprocedure TStream.SetPosition(const Pos: NativeInt);\r\n\r\nbegin\r\n Seek(pos,soBeginning);\r\nend;\r\n\r\nprocedure TStream.SetSize64(const NewSize: NativeInt);\r\n\r\nbegin\r\n // Required because can't use overloaded functions in properties\r\n SetSize(NewSize);\r\nend;\r\n\r\nfunction TStream.GetSize: NativeInt;\r\n\r\nvar\r\n p : NativeInt;\r\n\r\nbegin\r\n p:=Seek(0,soCurrent);\r\n GetSize:=Seek(0,soEnd);\r\n Seek(p,soBeginning);\r\nend;\r\n\r\nprocedure TStream.SetSize(const NewSize: NativeInt);\r\n\r\nbegin\r\n if NewSize<0 then\r\n Raise EStreamError.Create(SerrInvalidStreamSize);\r\nend;\r\n\r\nprocedure TStream.Discard(const Count: NativeInt);\r\n\r\nconst\r\n CSmallSize =255;\r\n CLargeMaxBuffer =32*1024; // 32 KiB\r\n\r\nvar\r\n Buffer: TBytes;\r\n\r\nbegin\r\n if Count=0 then\r\n Exit;\r\n if (Count<=CSmallSize) then\r\n begin\r\n SetLength(Buffer,CSmallSize);\r\n ReadBuffer(Buffer,Count)\r\n end\r\n else\r\n DiscardLarge(Count,CLargeMaxBuffer);\r\nend;\r\n\r\nprocedure TStream.DiscardLarge(Count: NativeInt; const MaxBufferSize: Longint);\r\n\r\nvar\r\n Buffer: TBytes;\r\n\r\nbegin\r\n if Count=0 then\r\n Exit;\r\n if Count>MaxBufferSize then\r\n SetLength(Buffer,MaxBufferSize)\r\n else\r\n SetLength(Buffer,Count);\r\n while (Count>=Length(Buffer)) do\r\n begin\r\n ReadBuffer(Buffer,Length(Buffer));\r\n Dec(Count,Length(Buffer));\r\n end;\r\n if Count>0 then\r\n ReadBuffer(Buffer,Count);\r\nend;\r\n\r\nprocedure TStream.InvalidSeek;\r\n\r\nbegin\r\n raise EStreamError.CreateFmt(SStreamInvalidSeek, [ClassName]);\r\nend;\r\n\r\nprocedure TStream.FakeSeekForward(Offset: NativeInt; const Origin: TSeekOrigin; const Pos: NativeInt);\r\n\r\nbegin\r\n if Origin=soBeginning then\r\n Dec(Offset,Pos);\r\n if (Offset<0) or (Origin=soEnd) then\r\n InvalidSeek;\r\n if Offset>0 then\r\n Discard(Offset);\r\n end;\r\n\r\nfunction TStream.ReadData({var} Buffer: TBytes; Count: NativeInt): NativeInt;\r\nbegin\r\n Result:=Read(Buffer,0,Count);\r\nend;\r\n\r\n\r\nfunction TStream.ReadMaxSizeData(Buffer : TBytes; aSize,aCount : NativeInt) : NativeInt;\r\n\r\nVar\r\n CP : NativeInt;\r\n\r\nbegin\r\n if aCount<=aSize then\r\n Result:=read(Buffer,aCount)\r\n else\r\n begin\r\n Result:=Read(Buffer,aSize);\r\n CP:=Position;\r\n Result:=Result+Seek(aCount-aSize,soCurrent)-CP;\r\n end\r\nend;\r\n\r\nfunction TStream.WriteMaxSizeData(const Buffer : TBytes; aSize,aCount : NativeInt) : NativeInt;\r\nVar\r\n CP : NativeInt;\r\n\r\nbegin\r\n if aCount<=aSize then\r\n Result:=Self.Write(Buffer,aCount)\r\n else\r\n begin\r\n Result:=Self.Write(Buffer,aSize);\r\n CP:=Position;\r\n Result:=Result+Seek(aCount-aSize,soCurrent)-CP;\r\n end\r\nend;\r\n\r\nprocedure TStream.WriteExactSizeData(const Buffer : TBytes; aSize, aCount: NativeInt);\r\nbegin\r\n // Embarcadero docs mentions no exception. Does not seem very logical\r\n WriteMaxSizeData(Buffer,aSize,ACount);\r\nend;\r\n\r\nprocedure TStream.ReadExactSizeData(Buffer : TBytes; aSize, aCount: NativeInt);\r\nbegin\r\n if ReadMaxSizeData(Buffer,aSize,ACount)<>aCount then\r\n Raise EReadError.Create(SReadError);\r\nend;\r\n\r\n\r\nfunction TStream.ReadData(var Buffer: Boolean): NativeInt;\r\n\r\nVar\r\n B : Byte;\r\n\r\nbegin\r\n Result:=ReadData(B,1);\r\n if Result=1 then\r\n Buffer:=B<>0;\r\nend;\r\n\r\nfunction TStream.ReadData(var Buffer: Boolean; Count: NativeInt): NativeInt;\r\n\r\nVar\r\n B : TBytes;\r\n\r\nbegin\r\n SetLength(B,Count);\r\n Result:=ReadMaxSizeData(B,1,Count);\r\n if Result>0 then\r\n Buffer:=B[0]<>0\r\nend;\r\n\r\n\r\nfunction TStream.ReadData(var Buffer: WideChar): NativeInt;\r\nbegin\r\n Result:=ReadData(Buffer,2);\r\nend;\r\n\r\nfunction TStream.ReadData(var Buffer: WideChar; Count: NativeInt): NativeInt;\r\n\r\nVar\r\n W : Word;\r\n\r\nbegin\r\n Result:=ReadData(W,Count);\r\n if Result=2 then\r\n Buffer:=WideChar(W);\r\nend;\r\n\r\nfunction TStream.ReadData(var Buffer: Int8): NativeInt;\r\nbegin\r\n Result:=ReadData(Buffer,1);\r\nend;\r\n\r\nFunction TStream.MakeInt(B : TBytes; aSize : Integer; Signed : Boolean) : NativeInt;\r\n\r\nVar\r\n Mem : TJSArrayBuffer;\r\n A : TJSUInt8Array;\r\n D : TJSDataView;\r\n isLittle : Boolean;\r\n\r\nbegin\r\n IsLittle:=(Endian=TEndian.Little);\r\n Mem:=TJSArrayBuffer.New(Length(B));\r\n A:=TJSUInt8Array.new(Mem);\r\n A._set(B);\r\n D:=TJSDataView.New(Mem);\r\n if Signed then\r\n case aSize of\r\n 1 : Result:=D.getInt8(0);\r\n 2 : Result:=D.getInt16(0,IsLittle);\r\n 4 : Result:=D.getInt32(0,IsLittle);\r\n // Todo : fix sign\r\n 8 : Result:=Round(D.getFloat64(0,IsLittle));\r\n end\r\n else\r\n case aSize of\r\n 1 : Result:=D.getUInt8(0);\r\n 2 : Result:=D.getUInt16(0,IsLittle);\r\n 4 : Result:=D.getUInt32(0,IsLittle);\r\n 8 : Result:=Round(D.getFloat64(0,IsLittle));\r\n end\r\nend;\r\n\r\nfunction TStream.MakeBytes(B: NativeInt; aSize: Integer; Signed: Boolean): TBytes;\r\n\r\n\r\nVar\r\n Mem : TJSArrayBuffer;\r\n A : TJSUInt8Array;\r\n D : TJSDataView;\r\n isLittle : Boolean;\r\n\r\nbegin\r\n IsLittle:=(Endian=TEndian.Little);\r\n Mem:=TJSArrayBuffer.New(aSize);\r\n D:=TJSDataView.New(Mem);\r\n if Signed then\r\n case aSize of\r\n 1 : D.setInt8(0,B);\r\n 2 : D.setInt16(0,B,IsLittle);\r\n 4 : D.setInt32(0,B,IsLittle);\r\n 8 : D.setFloat64(0,B,IsLittle);\r\n end\r\n else\r\n case aSize of\r\n 1 : D.SetUInt8(0,B);\r\n 2 : D.SetUInt16(0,B,IsLittle);\r\n 4 : D.SetUInt32(0,B,IsLittle);\r\n 8 : D.setFloat64(0,B,IsLittle);\r\n end;\r\n SetLength(Result,aSize);\r\n A:=TJSUInt8Array.new(Mem);\r\n Result:=TMemoryStream.MemoryToBytes(A);\r\nend;\r\n\r\n\r\nfunction TStream.ReadData(var Buffer: Int8; Count: NativeInt): NativeInt;\r\n\r\nVar\r\n B : TBytes;\r\nbegin\r\n SetLength(B,Count);\r\n Result:=ReadMaxSizeData(B,1,Count);\r\n if Result>=1 then\r\n Buffer:=MakeInt(B,1,True);\r\nend;\r\n\r\nfunction TStream.ReadData(var Buffer: UInt8): NativeInt;\r\nbegin\r\n Result:=ReadData(Buffer,1);\r\nend;\r\n\r\nfunction TStream.ReadData(var Buffer: UInt8; Count: NativeInt): NativeInt;\r\nVar\r\n B : TBytes;\r\nbegin\r\n SetLength(B,Count);\r\n Result:=ReadMaxSizeData(B,1,Count);\r\n if Result>=1 then\r\n Buffer:=MakeInt(B,1,False);\r\nend;\r\n\r\nfunction TStream.ReadData(var Buffer: Int16): NativeInt;\r\nbegin\r\n Result:=ReadData(Buffer,2);\r\nend;\r\n\r\nfunction TStream.ReadData(var Buffer: Int16; Count: NativeInt): NativeInt;\r\nVar\r\n B : TBytes;\r\nbegin\r\n SetLength(B,Count);\r\n Result:=ReadMaxSizeData(B,2,Count);\r\n if Result>=2 then\r\n Buffer:=MakeInt(B,2,True);\r\nend;\r\n\r\nfunction TStream.ReadData(var Buffer: UInt16): NativeInt;\r\nbegin\r\n Result:=ReadData(Buffer,2);\r\nend;\r\n\r\nfunction TStream.ReadData(var Buffer: UInt16; Count: NativeInt): NativeInt;\r\nVar\r\n B : TBytes;\r\nbegin\r\n SetLength(B,Count);\r\n Result:=ReadMaxSizeData(B,2,Count);\r\n if Result>=2 then\r\n Buffer:=MakeInt(B,2,False);\r\nend;\r\n\r\nfunction TStream.ReadData(var Buffer: Int32): NativeInt;\r\nbegin\r\n Result:=ReadData(Buffer,4);\r\nend;\r\n\r\nfunction TStream.ReadData(var Buffer: Int32; Count: NativeInt): NativeInt;\r\nVar\r\n B : TBytes;\r\nbegin\r\n SetLength(B,Count);\r\n Result:=ReadMaxSizeData(B,4,Count);\r\n if Result>=4 then\r\n Buffer:=MakeInt(B,4,True);\r\nend;\r\n\r\nfunction TStream.ReadData(var Buffer: UInt32): NativeInt;\r\nbegin\r\n Result:=ReadData(Buffer,4);\r\nend;\r\n\r\nfunction TStream.ReadData(var Buffer: UInt32; Count: NativeInt): NativeInt;\r\n\r\nVar\r\n B : TBytes;\r\nbegin\r\n SetLength(B,Count);\r\n Result:=ReadMaxSizeData(B,4,Count);\r\n if Result>=4 then\r\n Buffer:=MakeInt(B,4,False);\r\nend;\r\n\r\n\r\nfunction TStream.ReadData(var Buffer: NativeInt): NativeInt;\r\n\r\nbegin\r\n Result:=ReadData(Buffer,8);\r\nend;\r\n\r\nfunction TStream.ReadData(var Buffer: NativeInt; Count: NativeInt): NativeInt;\r\n\r\nVar\r\n B : TBytes;\r\n\r\nbegin\r\n SetLength(B,Count);\r\n Result:=ReadMaxSizeData(B,8,8);\r\n if Result>=8 then\r\n Buffer:=MakeInt(B,8,True);\r\nend;\r\n\r\nfunction TStream.ReadData(var Buffer: NativeLargeUInt): NativeInt;\r\nbegin\r\n Result:=ReadData(Buffer,8);\r\nend;\r\n\r\nfunction TStream.ReadData(var Buffer: NativeLargeUInt; Count: NativeInt): NativeInt;\r\n\r\nVar\r\n B : TBytes;\r\n B1 : Integer;\r\nbegin\r\n SetLength(B,Count);\r\n Result:=ReadMaxSizeData(B,4,4);\r\n if Result>=4 then\r\n begin\r\n B1:=MakeInt(B,4,False);\r\n Result:=Result+ReadMaxSizeData(B,4,4);\r\n Buffer:=MakeInt(B,4,False);\r\n Buffer:=(Buffer shl 32) or B1;\r\n end;\r\nend;\r\n\r\nfunction TStream.ReadData(var Buffer: Double): NativeInt;\r\nbegin\r\n Result:=ReadData(Buffer,8);\r\nend;\r\n\r\nfunction TStream.ReadData(var Buffer: Double; Count: NativeInt): NativeInt;\r\n\r\nVar\r\n B : TBytes;\r\n Mem : TJSArrayBuffer;\r\n A : TJSUInt8Array;\r\n D : TJSDataView;\r\n\r\nbegin\r\n SetLength(B,Count);\r\n Result:=ReadMaxSizeData(B,8,Count);\r\n if Result>=8 then\r\n begin\r\n Mem:=TJSArrayBuffer.New(8);\r\n A:=TJSUInt8Array.new(Mem);\r\n A._set(B);\r\n D:=TJSDataView.New(Mem);\r\n Buffer:=D.getFloat64(0);\r\n end;\r\nend;\r\n\r\nprocedure TStream.ReadBuffer(var Buffer: TBytes; Count: NativeInt);\r\nbegin\r\n ReadBuffer(Buffer,0,Count);\r\nend;\r\n\r\nprocedure TStream.ReadBuffer(var Buffer: TBytes; Offset, Count: NativeInt);\r\nbegin\r\n if Read(Buffer,OffSet,Count)<>Count then\r\n Raise EStreamError.Create(SReadError);\r\nend;\r\n\r\nprocedure TStream.ReadBufferData(var Buffer: Boolean);\r\nbegin\r\n ReadBufferData(Buffer,1);\r\nend;\r\n\r\nprocedure TStream.ReadBufferData(var Buffer: Boolean; Count: NativeInt);\r\nbegin\r\n if (ReadData(Buffer,Count)<>Count) then\r\n Raise EStreamError.Create(SReadError);\r\nend;\r\n\r\nprocedure TStream.ReadBufferData(var Buffer: WideChar);\r\nbegin\r\n ReadBufferData(Buffer,2);\r\nend;\r\n\r\nprocedure TStream.ReadBufferData(var Buffer: WideChar; Count: NativeInt);\r\nbegin\r\n if (ReadData(Buffer,Count)<>Count) then\r\n Raise EStreamError.Create(SReadError);\r\nend;\r\n\r\nprocedure TStream.ReadBufferData(var Buffer: Int8);\r\nbegin\r\n ReadBufferData(Buffer,1);\r\nend;\r\n\r\nprocedure TStream.ReadBufferData(var Buffer: Int8; Count: NativeInt);\r\nbegin\r\n if (ReadData(Buffer,Count)<>Count) then\r\n Raise EStreamError.Create(SReadError);\r\nend;\r\n\r\nprocedure TStream.ReadBufferData(var Buffer: UInt8);\r\nbegin\r\n ReadBufferData(Buffer,1);\r\nend;\r\n\r\nprocedure TStream.ReadBufferData(var Buffer: UInt8; Count: NativeInt);\r\nbegin\r\n if (ReadData(Buffer,Count)<>Count) then\r\n Raise EStreamError.Create(SReadError);\r\nend;\r\n\r\nprocedure TStream.ReadBufferData(var Buffer: Int16);\r\nbegin\r\n ReadBufferData(Buffer,2);\r\nend;\r\n\r\nprocedure TStream.ReadBufferData(var Buffer: Int16; Count: NativeInt);\r\nbegin\r\n if (ReadData(Buffer,Count)<>Count) then\r\n Raise EStreamError.Create(SReadError);\r\nend;\r\n\r\nprocedure TStream.ReadBufferData(var Buffer: UInt16);\r\nbegin\r\n ReadBufferData(Buffer,2);\r\nend;\r\n\r\nprocedure TStream.ReadBufferData(var Buffer: UInt16; Count: NativeInt);\r\nbegin\r\n if (ReadData(Buffer,Count)<>Count) then\r\n Raise EStreamError.Create(SReadError);\r\nend;\r\n\r\nprocedure TStream.ReadBufferData(var Buffer: Int32);\r\nbegin\r\n ReadBufferData(Buffer,4);\r\nend;\r\n\r\nprocedure TStream.ReadBufferData(var Buffer: Int32; Count: NativeInt);\r\nbegin\r\n if (ReadData(Buffer,Count)<>Count) then\r\n Raise EStreamError.Create(SReadError);\r\nend;\r\n\r\nprocedure TStream.ReadBufferData(var Buffer: UInt32);\r\nbegin\r\n ReadBufferData(Buffer,4);\r\nend;\r\n\r\nprocedure TStream.ReadBufferData(var Buffer: UInt32; Count: NativeInt);\r\nbegin\r\n if (ReadData(Buffer,Count)<>Count) then\r\n Raise EStreamError.Create(SReadError);\r\nend;\r\n\r\nprocedure TStream.ReadBufferData(var Buffer: NativeLargeInt);\r\nbegin\r\n ReadBufferData(Buffer,8)\r\nend;\r\n\r\nprocedure TStream.ReadBufferData(var Buffer: NativeLargeInt; Count: NativeInt);\r\nbegin\r\n if (ReadData(Buffer,Count)<>Count) then\r\n Raise EStreamError.Create(SReadError);\r\nend;\r\n\r\nprocedure TStream.ReadBufferData(var Buffer: NativeLargeUInt);\r\nbegin\r\n ReadBufferData(Buffer,8);\r\nend;\r\n\r\nprocedure TStream.ReadBufferData(var Buffer: NativeLargeUInt; Count: NativeInt);\r\nbegin\r\n if (ReadData(Buffer,Count)<>Count) then\r\n Raise EStreamError.Create(SReadError);\r\nend;\r\n\r\n\r\nprocedure TStream.ReadBufferData(var Buffer: Double);\r\nbegin\r\n ReadBufferData(Buffer,8);\r\nend;\r\n\r\nprocedure TStream.ReadBufferData(var Buffer: Double; Count: NativeInt);\r\nbegin\r\n if (ReadData(Buffer,Count)<>Count) then\r\n Raise EStreamError.Create(SReadError);\r\nend;\r\n\r\nprocedure TStream.WriteBuffer(const Buffer: TBytes; Count: NativeInt);\r\nbegin\r\n WriteBuffer(Buffer,0,Count);\r\nend;\r\n\r\nprocedure TStream.WriteBuffer(const Buffer: TBytes; Offset, Count: NativeInt);\r\nbegin\r\n if Self.Write(Buffer,Offset,Count)<>Count then\r\n Raise EStreamError.Create(SWriteError);\r\nend;\r\n\r\nfunction TStream.WriteData(const Buffer: TBytes; Count: NativeInt): NativeInt;\r\nbegin\r\n Result:=Self.Write(Buffer, 0, Count);\r\nend;\r\n\r\nfunction TStream.WriteData(const Buffer: Boolean): NativeInt;\r\nbegin\r\n Result:=WriteData(Buffer,1);\r\nend;\r\n\r\nfunction TStream.WriteData(const Buffer: Boolean; Count: NativeInt): NativeInt;\r\n\r\nVar\r\n B : Int8;\r\n\r\nbegin\r\n B:=Ord(Buffer);\r\n Result:=WriteData(B,Count);\r\nend;\r\n\r\nfunction TStream.WriteData(const Buffer: WideChar): NativeInt;\r\n\r\nbegin\r\n Result:=WriteData(Buffer,2);\r\nend;\r\n\r\nfunction TStream.WriteData(const Buffer: WideChar; Count: NativeInt): NativeInt;\r\nVar\r\n U : UInt16;\r\nbegin\r\n U:=Ord(Buffer);\r\n Result:=WriteData(U,Count);\r\nend;\r\n\r\nfunction TStream.WriteData(const Buffer: Int8): NativeInt;\r\n\r\nbegin\r\n Result:=WriteData(Buffer,1);\r\nend;\r\n\r\nfunction TStream.WriteData(const Buffer: Int8; Count: NativeInt): NativeInt;\r\nbegin\r\n Result:=WriteMaxSizeData(MakeBytes(Buffer,1,True),1,Count);\r\nend;\r\n\r\nfunction TStream.WriteData(const Buffer: UInt8): NativeInt;\r\nbegin\r\n Result:=WriteData(Buffer,1);\r\nend;\r\n\r\nfunction TStream.WriteData(const Buffer: UInt8; Count: NativeInt): NativeInt;\r\nbegin\r\n Result:=WriteMaxSizeData(MakeBytes(Buffer,1,False),1,Count);\r\nend;\r\n\r\nfunction TStream.WriteData(const Buffer: Int16): NativeInt;\r\nbegin\r\n Result:=WriteData(Buffer,2);\r\nend;\r\n\r\nfunction TStream.WriteData(const Buffer: Int16; Count: NativeInt): NativeInt;\r\nbegin\r\n Result:=WriteMaxSizeData(MakeBytes(Buffer,2,True),2,Count);\r\nend;\r\n\r\nfunction TStream.WriteData(const Buffer: UInt16): NativeInt;\r\nbegin\r\n Result:=WriteData(Buffer,2);\r\nend;\r\n\r\nfunction TStream.WriteData(const Buffer: UInt16; Count: NativeInt): NativeInt;\r\nbegin\r\n Result:=WriteMaxSizeData(MakeBytes(Buffer,2,True),2,Count);\r\nend;\r\n\r\nfunction TStream.WriteData(const Buffer: Int32): NativeInt;\r\nbegin\r\n Result:=WriteData(Buffer,4);\r\nend;\r\n\r\nfunction TStream.WriteData(const Buffer: Int32; Count: NativeInt): NativeInt;\r\nbegin\r\n Result:=WriteMaxSizeData(MakeBytes(Buffer,4,True),4,Count);\r\nend;\r\n\r\nfunction TStream.WriteData(const Buffer: UInt32): NativeInt;\r\nbegin\r\n Result:=WriteData(Buffer,4);\r\nend;\r\n\r\nfunction TStream.WriteData(const Buffer: UInt32; Count: NativeInt): NativeInt;\r\nbegin\r\n Result:=WriteMaxSizeData(MakeBytes(Buffer,4,False),4,Count);\r\nend;\r\n\r\nfunction TStream.WriteData(const Buffer: NativeLargeInt): NativeInt;\r\nbegin\r\n Result:=WriteData(Buffer,8);\r\nend;\r\n\r\nfunction TStream.WriteData(const Buffer: NativeLargeInt; Count: NativeInt): NativeInt;\r\nbegin\r\n Result:=WriteMaxSizeData(MakeBytes(Buffer,8,True),8,Count);\r\nend;\r\n\r\nfunction TStream.WriteData(const Buffer: NativeLargeUInt): NativeInt;\r\nbegin\r\n Result:=WriteData(Buffer,8);\r\nend;\r\n\r\nfunction TStream.WriteData(const Buffer: NativeLargeUInt; Count: NativeInt): NativeInt;\r\nbegin\r\n Result:=WriteMaxSizeData(MakeBytes(Buffer,8,False),8,Count);\r\nend;\r\n\r\nfunction TStream.WriteData(const Buffer: Double): NativeInt;\r\nbegin\r\n Result:=WriteData(Buffer,8);\r\nend;\r\n\r\nfunction TStream.WriteData(const Buffer: Double; Count: NativeInt): NativeInt;\r\n\r\nVar\r\n Mem : TJSArrayBuffer;\r\n A : TJSUint8array;\r\n D : TJSDataview;\r\n B : TBytes;\r\n I : Integer;\r\n\r\nbegin\r\n Mem:=TJSArrayBuffer.New(8);\r\n D:=TJSDataView.new(Mem);\r\n D.setFloat64(0,Buffer);\r\n SetLength(B,8);\r\n A:=TJSUint8array.New(Mem);\r\n For I:=0 to 7 do\r\n B[i]:=A[i];\r\n Result:=WriteMaxSizeData(B,8,Count);\r\nend;\r\n\r\n\r\nprocedure TStream.WriteBufferData(Buffer: Int32);\r\nbegin\r\n WriteBufferData(Buffer,4);\r\nend;\r\n\r\nprocedure TStream.WriteBufferData(Buffer: Int32; Count: NativeInt);\r\nbegin\r\n if (WriteData(Buffer,Count)<>Count) then\r\n Raise EStreamError.Create(SWriteError);\r\nend;\r\n\r\nprocedure TStream.WriteBufferData(Buffer: Boolean);\r\nbegin\r\n WriteBufferData(Buffer,1);\r\nend;\r\n\r\nprocedure TStream.WriteBufferData(Buffer: Boolean; Count: NativeInt);\r\nbegin\r\n if (WriteData(Buffer,Count)<>Count) then\r\n Raise EStreamError.Create(SWriteError);\r\nend;\r\n\r\nprocedure TStream.WriteBufferData(Buffer: WideChar);\r\nbegin\r\n WriteBufferData(Buffer,2);\r\nend;\r\n\r\nprocedure TStream.WriteBufferData(Buffer: WideChar; Count: NativeInt);\r\nbegin\r\n if (WriteData(Buffer,Count)<>Count) then\r\n Raise EStreamError.Create(SWriteError);\r\nend;\r\n\r\nprocedure TStream.WriteBufferData(Buffer: Int8);\r\nbegin\r\n WriteBufferData(Buffer,1);\r\nend;\r\n\r\nprocedure TStream.WriteBufferData(Buffer: Int8; Count: NativeInt);\r\nbegin\r\n if (WriteData(Buffer,Count)<>Count) then\r\n Raise EStreamError.Create(SWriteError);\r\nend;\r\n\r\nprocedure TStream.WriteBufferData(Buffer: UInt8);\r\nbegin\r\n WriteBufferData(Buffer,1);\r\nend;\r\n\r\nprocedure TStream.WriteBufferData(Buffer: UInt8; Count: NativeInt);\r\nbegin\r\n if (WriteData(Buffer,Count)<>Count) then\r\n Raise EStreamError.Create(SWriteError);\r\nend;\r\n\r\nprocedure TStream.WriteBufferData(Buffer: Int16);\r\nbegin\r\n WriteBufferData(Buffer,2);\r\nend;\r\n\r\nprocedure TStream.WriteBufferData(Buffer: Int16; Count: NativeInt);\r\nbegin\r\n if (WriteData(Buffer,Count)<>Count) then\r\n Raise EStreamError.Create(SWriteError);\r\nend;\r\n\r\nprocedure TStream.WriteBufferData(Buffer: UInt16);\r\nbegin\r\n WriteBufferData(Buffer,2);\r\nend;\r\n\r\nprocedure TStream.WriteBufferData(Buffer: UInt16; Count: NativeInt);\r\nbegin\r\n if (WriteData(Buffer,Count)<>Count) then\r\n Raise EStreamError.Create(SWriteError);\r\nend;\r\n\r\nprocedure TStream.WriteBufferData(Buffer: UInt32);\r\nbegin\r\n WriteBufferData(Buffer,4);\r\nend;\r\n\r\nprocedure TStream.WriteBufferData(Buffer: UInt32; Count: NativeInt);\r\nbegin\r\n if (WriteData(Buffer,Count)<>Count) then\r\n Raise EStreamError.Create(SWriteError);\r\nend;\r\n\r\nprocedure TStream.WriteBufferData(Buffer: NativeInt);\r\nbegin\r\n WriteBufferData(Buffer,8);\r\nend;\r\n\r\nprocedure TStream.WriteBufferData(Buffer: NativeInt; Count: NativeInt);\r\nbegin\r\n if (WriteData(Buffer,Count)<>Count) then\r\n Raise EStreamError.Create(SWriteError);\r\nend;\r\n\r\nprocedure TStream.WriteBufferData(Buffer: NativeLargeUInt);\r\nbegin\r\n WriteBufferData(Buffer,8);\r\nend;\r\n\r\nprocedure TStream.WriteBufferData(Buffer: NativeLargeUInt; Count: NativeInt);\r\nbegin\r\n if (WriteData(Buffer,Count)<>Count) then\r\n Raise EStreamError.Create(SWriteError);\r\nend;\r\n\r\nprocedure TStream.WriteBufferData(Buffer: Double);\r\nbegin\r\n WriteBufferData(Buffer,8);\r\nend;\r\n\r\nprocedure TStream.WriteBufferData(Buffer: Double; Count: NativeInt);\r\nbegin\r\n if (WriteData(Buffer,Count)<>Count) then\r\n Raise EStreamError.Create(SWriteError);\r\nend;\r\n\r\n\r\n\r\nfunction TStream.CopyFrom(Source: TStream; Count: NativeInt): NativeInt;\r\n\r\nvar\r\n Buffer: TBytes;\r\n BufferSize, i: LongInt;\r\n\r\nconst\r\n MaxSize = $20000;\r\nbegin\r\n Result:=0;\r\n if Count=0 then\r\n Source.Position:=0; // This WILL fail for non-seekable streams...\r\n BufferSize:=MaxSize;\r\n if (Count>0) and (Count0 then\r\n WriteBuffer(Buffer,i);\r\n Inc(Result,i);\r\n until i0 do\r\n begin\r\n if Count>BufferSize then\r\n i:=BufferSize\r\n else\r\n i:=Count;\r\n Source.ReadBuffer(Buffer,i);\r\n WriteBuffer(Buffer,i);\r\n Dec(count,i);\r\n Inc(Result,i);\r\n end;\r\nend;\r\n\r\nfunction TStream.ReadComponent(Instance: TComponent): TComponent;\r\n\r\nvar\r\n Reader: TReader;\r\n\r\nbegin\r\n Reader := TReader.Create(Self);\r\n try\r\n Result := Reader.ReadRootComponent(Instance);\r\n finally\r\n Reader.Free;\r\n end;\r\nend;\r\n\r\nfunction TStream.ReadComponentRes(Instance: TComponent): TComponent;\r\n\r\nbegin\r\n ReadResHeader;\r\n Result := ReadComponent(Instance);\r\nend;\r\n\r\nprocedure TStream.WriteComponent(Instance: TComponent);\r\n\r\nbegin\r\n WriteDescendent(Instance, nil);\r\nend;\r\n\r\nprocedure TStream.WriteComponentRes(const ResName: string; Instance: TComponent);\r\n\r\nbegin\r\n WriteDescendentRes(ResName, Instance, nil);\r\nend;\r\n\r\nprocedure TStream.WriteDescendent(Instance, Ancestor: TComponent);\r\n\r\nvar\r\n Driver : TAbstractObjectWriter;\r\n Writer : TWriter;\r\n\r\nbegin\r\n Driver := TBinaryObjectWriter.Create(Self);\r\n Try\r\n Writer := TWriter.Create(Driver);\r\n Try\r\n Writer.WriteDescendent(Instance, Ancestor);\r\n Finally\r\n Writer.Destroy;\r\n end;\r\n Finally\r\n Driver.Free;\r\n end;\r\nend;\r\n\r\nprocedure TStream.WriteDescendentRes(const ResName: string; Instance, Ancestor: TComponent);\r\n\r\nvar\r\n FixupInfo: Longint;\r\n\r\nbegin\r\n { Write a resource header }\r\n WriteResourceHeader(ResName, FixupInfo);\r\n { Write the instance itself }\r\n WriteDescendent(Instance, Ancestor);\r\n { Insert the correct resource size into the resource header }\r\n FixupResourceHeader(FixupInfo);\r\nend;\r\n\r\n\r\nprocedure TStream.WriteResourceHeader(const ResName: string; {!!!: out} var FixupInfo: Longint);\r\n var\r\n ResType, Flags : word;\r\n B : Byte;\r\n I : Integer;\r\n\r\n begin\r\n ResType:=Word($000A);\r\n Flags:=Word($1030);\r\n { Note: This is a Windows 16 bit resource }\r\n { Numeric resource type }\r\n WriteByte($ff);\r\n { Application defined data }\r\n WriteWord(ResType);\r\n { write the name as asciiz }\r\n For I:=1 to Length(ResName) do\r\n begin\r\n B:=Ord(ResName[i]);\r\n WriteByte(B);\r\n end;\r\n WriteByte(0);\r\n { Movable, Pure and Discardable }\r\n WriteWord(Flags);\r\n { Placeholder for the resource size }\r\n WriteDWord(0);\r\n { Return current stream position so that the resource size can be\r\n inserted later }\r\n FixupInfo := Position;\r\n end;\r\n\r\nprocedure TStream.FixupResourceHeader(FixupInfo: Longint);\r\n\r\nvar\r\n ResSize,TmpResSize : Longint;\r\n\r\nbegin\r\n\r\n ResSize := Position - FixupInfo;\r\n TmpResSize := longword(ResSize);\r\n\r\n { Insert the correct resource size into the placeholder written by\r\n WriteResourceHeader }\r\n Position := FixupInfo - 4;\r\n WriteDWord(TmpResSize);\r\n { Seek back to the end of the resource }\r\n Position := FixupInfo + ResSize;\r\n\r\nend;\r\n\r\nprocedure TStream.ReadResHeader;\r\n var\r\n ResType, Flags : word;\r\n begin\r\n try\r\n { Note: This is a Windows 16 bit resource }\r\n { application specific resource ? }\r\n if ReadByte<>$ff then\r\n raise EInvalidImage.Create(SInvalidImage);\r\n ResType:=ReadWord;\r\n if ResType<>$000a then\r\n raise EInvalidImage.Create(SInvalidImage);\r\n { read name }\r\n while ReadByte<>0 do\r\n ;\r\n { check the access specifier }\r\n Flags:=ReadWord;\r\n if Flags<>$1030 then\r\n raise EInvalidImage.Create(SInvalidImage);\r\n { ignore the size }\r\n ReadDWord;\r\n except\r\n on EInvalidImage do\r\n raise;\r\n else\r\n raise EInvalidImage.create(SInvalidImage);\r\n end;\r\n end;\r\n\r\n\r\nfunction TStream.ReadByte : Byte;\r\n\r\nbegin\r\n ReadBufferData(Result,1);\r\nend;\r\n\r\nfunction TStream.ReadWord : Word;\r\n\r\nbegin\r\n ReadBufferData(Result,2);\r\nend;\r\n\r\nfunction TStream.ReadDWord : Cardinal;\r\n\r\nbegin\r\n ReadBufferData(Result,4);\r\nend;\r\n\r\nfunction TStream.ReadQWord: NativeLargeUInt;\r\n\r\nbegin\r\n ReadBufferData(Result,8);\r\nend;\r\n\r\n\r\nprocedure TStream.WriteByte(b : Byte);\r\n\r\nbegin\r\n WriteBufferData(b,1);\r\nend;\r\n\r\nprocedure TStream.WriteWord(w : Word);\r\n\r\nbegin\r\n WriteBufferData(W,2);\r\nend;\r\n\r\nprocedure TStream.WriteDWord(d : Cardinal);\r\n\r\nbegin\r\n WriteBufferData(d,4);\r\nend;\r\n\r\nprocedure TStream.WriteQWord(q: NativeLargeUInt);\r\nbegin\r\n WriteBufferData(q,8);\r\nend;\r\n\r\n{****************************************************************************}\r\n{* TCustomMemoryStream *}\r\n{****************************************************************************}\r\n\r\nprocedure TCustomMemoryStream.SetPointer(Ptr: TJSArrayBuffer; ASize: PtrInt);\r\n\r\nbegin\r\n FMemory:=Ptr;\r\n FSize:=ASize;\r\n FDataView:=Nil;\r\n FDataArray:=Nil;\r\nend;\r\n\r\n\r\nclass function TCustomMemoryStream.MemoryToBytes(Mem: TJSArrayBuffer): TBytes;\r\n\r\nbegin\r\n Result:=MemoryToBytes(TJSUint8Array.New(Mem));\r\nend;\r\n\r\nclass function TCustomMemoryStream.MemoryToBytes(Mem: TJSUint8Array): TBytes;\r\n\r\nVar\r\n I : Integer;\r\n\r\nbegin\r\n // This must be improved, but needs some asm or TJSFunction.call() to implement answers in\r\n // https://stackoverflow.com/questions/29676635/convert-uint8array-to-array-in-javascript\r\n for i:=0 to mem.length-1 do\r\n Result[i]:=Mem[i];\r\nend;\r\n\r\nclass function TCustomMemoryStream.BytesToMemory(aBytes: TBytes): TJSArrayBuffer;\r\n\r\nVar\r\n a : TJSUint8Array;\r\n\r\nbegin\r\n Result:=TJSArrayBuffer.new(Length(aBytes));\r\n A:=TJSUint8Array.New(Result);\r\n A._set(aBytes);\r\nend;\r\n\r\nfunction TCustomMemoryStream.GetDataArray: TJSUint8Array;\r\nbegin\r\n if FDataArray=Nil then\r\n FDataArray:=TJSUint8Array.new(Memory);\r\n Result:=FDataArray;\r\nend;\r\n\r\nfunction TCustomMemoryStream.GetDataView: TJSDataview;\r\nbegin\r\n if FDataView=Nil then\r\n FDataView:=TJSDataView.New(Memory);\r\n Result:=FDataView;\r\nend;\r\n\r\nfunction TCustomMemoryStream.GetSize: NativeInt;\r\n\r\nbegin\r\n Result:=FSize;\r\nend;\r\n\r\nfunction TCustomMemoryStream.GetPosition: NativeInt;\r\nbegin\r\n Result:=FPosition;\r\nend;\r\n\r\n\r\nfunction TCustomMemoryStream.Read(Buffer: TBytes; Offset, Count: LongInt): LongInt;\r\n\r\nVar\r\n I,Src,Dest : Integer;\r\n\r\nbegin\r\n Result:=0;\r\n If (FSize>0) and (FPosition=0) then\r\n begin\r\n Result:=Count;\r\n If (Result>(FSize-FPosition)) then\r\n Result:=(FSize-FPosition);\r\n Src:=FPosition;\r\n Dest:=Offset;\r\n I:=0;\r\n While IFSize) then\r\n FPosition:=FSize;\r\n Result:=FPosition;\r\n {$IFDEF DEBUG}\r\n if Result < 0 then\r\n raise Exception.Create('TCustomMemoryStream');\r\n {$ENDIF}\r\nend;\r\n\r\n\r\nprocedure TCustomMemoryStream.SaveToStream(Stream: TStream);\r\n\r\nbegin\r\n if FSize>0 then\r\n Stream.WriteBuffer(TMemoryStream.MemoryToBytes(Memory),FSize);\r\nend;\r\n\r\nprocedure TCustomMemoryStream.LoadFromURL(const aURL: String; Async: Boolean; OnLoaded: TNotifyEventRef; OnError: TStringNotifyEventRef = Nil);\r\n\r\n procedure DoLoaded(const abytes : TJSArrayBuffer);\r\n begin\r\n SetPointer(aBytes,aBytes.byteLength);\r\n if Assigned(OnLoaded) then\r\n OnLoaded(Self);\r\n end;\r\n\r\n procedure DoError(const AError : String);\r\n begin\r\n if Assigned(OnError) then\r\n OnError(Self,aError)\r\n else\r\n Raise EInOutError.Create('Failed to load from URL:'+aError);\r\n end;\r\n\r\nbegin\r\n CheckLoadHelper;\r\n GlobalLoadHelper.LoadBytes(aURL,aSync,@DoLoaded,@DoError);\r\nend;\r\n\r\nprocedure TCustomMemoryStream.LoadFromFile(const aFileName: String; const OnLoaded: TProc; const AError: TProcString);\r\n\r\nbegin\r\n LoadFromURL(aFileName,False,\r\n Procedure (Sender : TObject)\r\n begin\r\n If Assigned(OnLoaded) then\r\n OnLoaded\r\n end,\r\n Procedure (Sender : TObject; Const ErrorMsg : String)\r\n begin\r\n if Assigned(aError) then\r\n aError(ErrorMsg)\r\n end);\r\nend;\r\n\r\n\r\n\r\n{****************************************************************************}\r\n{* TMemoryStream *}\r\n{****************************************************************************}\r\n\r\n\r\nConst TMSGrow = 4096; { Use 4k blocks. }\r\n\r\nprocedure TMemoryStream.SetCapacity(NewCapacity: PtrInt);\r\n\r\nbegin\r\n SetPointer (Realloc(NewCapacity),Fsize);\r\n FCapacity:=NewCapacity;\r\nend;\r\n\r\n\r\nfunction TMemoryStream.Realloc(var NewCapacity: PtrInt): TJSArrayBuffer;\r\n\r\nVar\r\n GC : PtrInt;\r\n DestView : TJSUInt8array;\r\n\r\nbegin\r\n If NewCapacity<0 Then\r\n NewCapacity:=0\r\n else\r\n begin\r\n GC:=FCapacity + (FCapacity div 4);\r\n // if growing, grow at least a quarter\r\n if (NewCapacity>FCapacity) and (NewCapacity < GC) then\r\n NewCapacity := GC;\r\n // round off to block size.\r\n NewCapacity := (NewCapacity + (TMSGrow-1)) and not (TMSGROW-1);\r\n end;\r\n // Only now check !\r\n If NewCapacity=FCapacity then\r\n Result:=FMemory\r\n else if NewCapacity=0 then\r\n Result:=Nil\r\n else\r\n begin\r\n // New buffer\r\n Result:=TJSArrayBuffer.New(NewCapacity);\r\n If (Result=Nil) then\r\n Raise EStreamError.Create(SMemoryStreamError);\r\n // Transfer\r\n DestView:=TJSUInt8array.New(Result);\r\n Destview._Set(Self.DataArray);\r\n end;\r\nend;\r\n\r\n\r\ndestructor TMemoryStream.Destroy;\r\n\r\nbegin\r\n Clear;\r\n Inherited Destroy;\r\nend;\r\n\r\n\r\nprocedure TMemoryStream.Clear;\r\n\r\nbegin\r\n FSize:=0;\r\n FPosition:=0;\r\n SetCapacity (0);\r\nend;\r\n\r\n\r\nprocedure TMemoryStream.LoadFromStream(Stream: TStream);\r\n\r\nbegin\r\n Position:=0;\r\n Stream.Position:=0;\r\n SetSize(Stream.Size);\r\n If (Size>0) then\r\n CopyFrom(Stream,0);\r\nend;\r\n\r\nprocedure TMemoryStream.SetSize(const NewSize: NativeInt);\r\n\r\nbegin\r\n SetCapacity (NewSize);\r\n FSize:=NewSize;\r\n IF FPosition>FSize then\r\n FPosition:=FSize;\r\nend;\r\n\r\nfunction TMemoryStream.Write(Const Buffer : TBytes; Count: LongInt): LongInt;\r\nbegin\r\n Result := Write(Buffer, 0, Count);\r\nend;\r\n\r\nfunction TMemoryStream.Write(Const Buffer : TBytes; OffSet, Count: LongInt): LongInt;\r\n\r\nVar NewPos : PtrInt;\r\n\r\nbegin\r\n If (Count=0) or (FPosition<0) then\r\n exit(0);\r\n NewPos:=FPosition+Count;\r\n If NewPos>Fsize then\r\n begin\r\n IF NewPos>FCapacity then\r\n SetCapacity (NewPos);\r\n FSize:=Newpos;\r\n end;\r\n DataArray._set(Copy(Buffer,Offset,Count),FPosition);\r\n FPosition:=NewPos;\r\n Result:=Count;\r\nend;\r\n\r\n{****************************************************************************}\r\n{* TBytesStream *}\r\n{****************************************************************************}\r\n\r\nconstructor TBytesStream.Create(const ABytes: TBytes);\r\nbegin\r\n inherited Create;\r\n SetPointer(TMemoryStream.BytesToMemory(aBytes),Length(ABytes));\r\n FCapacity:=Length(ABytes);\r\nend;\r\n\r\nfunction TBytesStream.GetBytes: TBytes;\r\nbegin\r\n Result:=TMemoryStream.MemoryToBytes(Memory);\r\nend;\r\n\r\n{ *********************************************************************\r\n * TFiler *\r\n *********************************************************************}\r\n\r\nprocedure TFiler.SetRoot(ARoot: TComponent);\r\nbegin\r\n FRoot := ARoot;\r\nend;\r\n\r\n\r\n{\r\n This file is part of the Free Component Library (FCL)\r\n Copyright (c) 1999-2000 by the Free Pascal development team\r\n\r\n See the file COPYING.FPC, included in this distribution,\r\n for details about the copyright.\r\n\r\n This program is distributed in the hope that it will be useful,\r\n but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\r\n\r\n **********************************************************************}\r\n\r\n{****************************************************************************}\r\n{* TBinaryObjectReader *}\r\n{****************************************************************************}\r\n\r\n\r\nfunction TBinaryObjectReader.ReadWord : word;\r\nbegin\r\n FStream.ReadBufferData(Result);\r\nend;\r\n\r\nfunction TBinaryObjectReader.ReadDWord : longword;\r\nbegin\r\n FStream.ReadBufferData(Result);\r\nend;\r\n\r\n\r\nconstructor TBinaryObjectReader.Create(Stream: TStream);\r\nbegin\r\n inherited Create;\r\n If (Stream=Nil) then\r\n Raise EReadError.Create(SEmptyStreamIllegalReader);\r\n FStream := Stream;\r\nend;\r\n\r\nfunction TBinaryObjectReader.ReadValue: TValueType;\r\nvar\r\n b: byte;\r\nbegin\r\n FStream.ReadBufferData(b);\r\n Result := TValueType(b);\r\nend;\r\n\r\nfunction TBinaryObjectReader.NextValue: TValueType;\r\nbegin\r\n Result := ReadValue;\r\n { We only 'peek' at the next value, so seek back to unget the read value: }\r\n FStream.Seek(-1,soCurrent);\r\nend;\r\n\r\nprocedure TBinaryObjectReader.BeginRootComponent;\r\nbegin\r\n { Read filer signature }\r\n ReadSignature;\r\nend;\r\n\r\nprocedure TBinaryObjectReader.BeginComponent(var Flags: TFilerFlags;\r\n var AChildPos: Integer; var CompClassName, CompName: String);\r\nvar\r\n Prefix: Byte;\r\n ValueType: TValueType;\r\nbegin\r\n { Every component can start with a special prefix: }\r\n Flags := [];\r\n if (Byte(NextValue) and $f0) = $f0 then\r\n begin\r\n Prefix := Byte(ReadValue);\r\n Flags:=[];\r\n if (Prefix and $01)<>0 then\r\n Include(Flags,ffInherited);\r\n if (Prefix and $02)<>0 then\r\n Include(Flags,ffChildPos);\r\n if (Prefix and $04)<>0 then\r\n Include(Flags,ffInline);\r\n if ffChildPos in Flags then\r\n begin\r\n ValueType := ReadValue;\r\n case ValueType of\r\n vaInt8:\r\n AChildPos := ReadInt8;\r\n vaInt16:\r\n AChildPos := ReadInt16;\r\n vaInt32:\r\n AChildPos := ReadInt32;\r\n vaNativeInt:\r\n AChildPos := ReadNativeInt;\r\n else\r\n raise EReadError.Create(SInvalidPropertyValue);\r\n end;\r\n end;\r\n end;\r\n\r\n CompClassName := ReadStr;\r\n CompName := ReadStr;\r\nend;\r\n\r\nfunction TBinaryObjectReader.BeginProperty: String;\r\nbegin\r\n Result := ReadStr;\r\nend;\r\n\r\nprocedure TBinaryObjectReader.Read(var Buffer: TBytes; Count: Longint);\r\nbegin\r\n FStream.Read(Buffer,Count);\r\nend;\r\n\r\nprocedure TBinaryObjectReader.ReadBinary(const DestData: TMemoryStream);\r\nvar\r\n BinSize: LongInt;\r\nbegin\r\n BinSize:=LongInt(ReadDWord);\r\n DestData.Size := BinSize;\r\n DestData.CopyFrom(FStream,BinSize);\r\nend;\r\n\r\nfunction TBinaryObjectReader.ReadFloat: Extended;\r\nbegin\r\n FStream.ReadBufferData(Result);\r\nend;\r\n\r\nfunction TBinaryObjectReader.ReadCurrency: Currency;\r\n\r\nbegin\r\n Result:=ReadFloat;\r\nend;\r\n\r\nfunction TBinaryObjectReader.ReadIdent(ValueType: TValueType): String;\r\nvar\r\n i: Byte;\r\n c : Char;\r\nbegin\r\n case ValueType of\r\n vaIdent:\r\n begin\r\n FStream.ReadBufferData(i);\r\n SetLength(Result,i);\r\n For I:=1 to Length(Result) do\r\n begin\r\n FStream.ReadBufferData(C);\r\n Result[I]:=C;\r\n end;\r\n end;\r\n vaNil:\r\n Result := 'nil';\r\n vaFalse:\r\n Result := 'False';\r\n vaTrue:\r\n Result := 'True';\r\n vaNull:\r\n Result := 'Null';\r\n end;\r\nend;\r\n\r\nfunction TBinaryObjectReader.ReadInt8: ShortInt;\r\nbegin\r\n FStream.ReadBufferData(Result);\r\nend;\r\n\r\nfunction TBinaryObjectReader.ReadInt16: SmallInt;\r\nbegin\r\n FStream.ReadBufferData(Result);\r\nend;\r\n\r\nfunction TBinaryObjectReader.ReadInt32: LongInt;\r\nbegin\r\n FStream.ReadBufferData(Result);\r\nend;\r\n\r\nfunction TBinaryObjectReader.ReadNativeInt : NativeInt;\r\nbegin\r\n FStream.ReadBufferData(Result);\r\nend;\r\n\r\n\r\nfunction TBinaryObjectReader.ReadSet(EnumType: TTypeInfoEnum): Integer;\r\n\r\nvar\r\n Name: String;\r\n Value: Integer;\r\n\r\nbegin\r\n try\r\n Result := 0;\r\n while True do\r\n begin\r\n Name := ReadStr;\r\n if Length(Name) = 0 then\r\n break;\r\n Value:=EnumType.EnumType.NameToInt[Name];\r\n if Value=-1 then\r\n raise EReadError.Create(SInvalidPropertyValue);\r\n Result:=Result or (1 shl Value);\r\n end;\r\n except\r\n SkipSetBody;\r\n raise;\r\n end;\r\nend;\r\n\r\n\r\nConst\r\n // Integer version of 4 chars 'TPF0'\r\n FilerSignatureInt = 809914452;\r\n\r\nprocedure TBinaryObjectReader.ReadSignature;\r\n\r\nvar\r\n Signature: LongInt;\r\n\r\nbegin\r\n FStream.ReadBufferData(Signature);\r\n if Signature <> FilerSignatureInt then\r\n raise EReadError.Create(SInvalidImage);\r\nend;\r\n\r\nfunction TBinaryObjectReader.ReadStr: String;\r\nvar\r\n l,i: Byte;\r\n c : Char;\r\nbegin\r\n FStream.ReadBufferData(L);\r\n SetLength(Result,L);\r\n For I:=1 to L do\r\n begin\r\n FStream.ReadBufferData(C);\r\n Result[i]:=C;\r\n end;\r\nend;\r\n\r\nfunction TBinaryObjectReader.ReadString(StringType: TValueType): String;\r\nvar\r\n i: Integer;\r\n C : Char;\r\n\r\nbegin\r\n Result:='';\r\n if StringType<>vaString then\r\n Raise EFilerError.Create('Invalid string type passed to ReadString');\r\n i:=ReadDWord;\r\n SetLength(Result, i);\r\n for I:=1 to Length(Result) do\r\n begin\r\n FStream.ReadbufferData(C);\r\n Result[i]:=C;\r\n end;\r\nend;\r\n\r\n\r\nfunction TBinaryObjectReader.ReadWideString: WideString;\r\nbegin\r\n Result:=ReadString(vaWString);\r\nend;\r\n\r\nfunction TBinaryObjectReader.ReadUnicodeString: UnicodeString;\r\n\r\nbegin\r\n Result:=ReadString(vaWString);\r\nend;\r\n\r\nprocedure TBinaryObjectReader.SkipComponent(SkipComponentInfos: Boolean);\r\nvar\r\n Flags: TFilerFlags;\r\n Dummy: Integer;\r\n CompClassName, CompName: String;\r\nbegin\r\n if SkipComponentInfos then\r\n { Skip prefix, component class name and component object name }\r\n BeginComponent(Flags, Dummy, CompClassName, CompName);\r\n\r\n { Skip properties }\r\n while NextValue <> vaNull do\r\n SkipProperty;\r\n ReadValue;\r\n\r\n { Skip children }\r\n while NextValue <> vaNull do\r\n SkipComponent(True);\r\n ReadValue;\r\nend;\r\n\r\nprocedure TBinaryObjectReader.SkipValue;\r\n\r\n procedure SkipBytes(Count: LongInt);\r\n var\r\n Dummy: TBytes;\r\n SkipNow: Integer;\r\n begin\r\n while Count > 0 do\r\n begin\r\n if Count > 1024 then\r\n SkipNow := 1024\r\n else\r\n SkipNow := Count;\r\n SetLength(Dummy,SkipNow);\r\n Read(Dummy, SkipNow);\r\n Dec(Count, SkipNow);\r\n end;\r\n end;\r\n\r\nvar\r\n Count: LongInt;\r\nbegin\r\n case ReadValue of\r\n vaNull, vaFalse, vaTrue, vaNil: ;\r\n vaList:\r\n begin\r\n while NextValue <> vaNull do\r\n SkipValue;\r\n ReadValue;\r\n end;\r\n vaInt8:\r\n SkipBytes(1);\r\n vaInt16:\r\n SkipBytes(2);\r\n vaInt32:\r\n SkipBytes(4);\r\n vaInt64,\r\n vaDouble:\r\n SkipBytes(8);\r\n vaIdent:\r\n ReadStr;\r\n vaString:\r\n ReadString(vaString);\r\n vaBinary:\r\n begin\r\n Count:=LongInt(ReadDWord);\r\n SkipBytes(Count);\r\n end;\r\n vaSet:\r\n SkipSetBody;\r\n vaCollection:\r\n begin\r\n while NextValue <> vaNull do\r\n begin\r\n { Skip the order value if present }\r\n if NextValue in [vaInt8, vaInt16, vaInt32] then\r\n SkipValue;\r\n SkipBytes(1);\r\n while NextValue <> vaNull do\r\n SkipProperty;\r\n ReadValue;\r\n end;\r\n ReadValue;\r\n end;\r\n end;\r\nend;\r\n\r\n{ private methods }\r\n\r\n\r\nprocedure TBinaryObjectReader.SkipProperty;\r\nbegin\r\n { Skip property name, then the property value }\r\n ReadStr;\r\n SkipValue;\r\nend;\r\n\r\nprocedure TBinaryObjectReader.SkipSetBody;\r\nbegin\r\n while Length(ReadStr) > 0 do;\r\nend;\r\n\r\n\r\n // Quadruple representing an unresolved component property.\r\nType\r\n { TUnresolvedReference }\r\n\r\n TUnresolvedReference = class(TlinkedListItem)\r\n Private\r\n FRoot: TComponent; // Root component when streaming\r\n FPropInfo: TTypeMemberProperty; // Property to set.\r\n FGlobal, // Global component.\r\n FRelative : string; // Path relative to global component.\r\n Function Resolve(Instance : TPersistent) : Boolean; // Resolve this reference\r\n Function RootMatches(ARoot : TComponent) : Boolean; {$ifdef CLASSESINLINE} inline; {$endif CLASSESINLINE} // True if Froot matches or ARoot is nil.\r\n Function NextRef : TUnresolvedReference; {$ifdef CLASSESINLINE} inline; {$endif CLASSESINLINE}\r\n end;\r\n\r\n TLocalUnResolvedReference = class(TUnresolvedReference)\r\n Finstance : TPersistent;\r\n end;\r\n\r\n // Linked list of TPersistent items that have unresolved properties.\r\n\r\n { TUnResolvedInstance }\r\n\r\n TUnResolvedInstance = Class(TLinkedListItem)\r\n Public\r\n Instance : TPersistent; // Instance we're handling unresolveds for\r\n FUnresolved : TLinkedList; // The list\r\n Destructor Destroy; override;\r\n Function AddReference(ARoot : TComponent; APropInfo : TTypeMemberProperty; AGlobal,ARelative : String) : TUnresolvedReference;\r\n Function RootUnresolved : TUnresolvedReference; {$ifdef CLASSESINLINE} inline; {$endif CLASSESINLINE} // Return root element in list.\r\n Function ResolveReferences : Boolean; // Return true if all unresolveds were resolved.\r\n end;\r\n\r\n // Builds a list of TUnResolvedInstances, removes them from global list on free.\r\n TBuildListVisitor = Class(TLinkedListVisitor)\r\n Private\r\n List : TFPList;\r\n Public\r\n Procedure Add(Item : TlinkedListItem); // Add TUnResolvedInstance item to list. Create list if needed\r\n Destructor Destroy; override; // All elements in list (if any) are removed from the global list.\r\n end;\r\n\r\n // Visitor used to try and resolve instances in the global list\r\n TResolveReferenceVisitor = Class(TBuildListVisitor)\r\n Function Visit(Item : TLinkedListItem) : Boolean; override;\r\n end;\r\n\r\n // Visitor used to remove all references to a certain component.\r\n TRemoveReferenceVisitor = Class(TBuildListVisitor)\r\n Private\r\n FRef : String;\r\n FRoot : TComponent;\r\n Public\r\n Constructor Create(ARoot : TComponent;Const ARef : String);\r\n Function Visit(Item : TLinkedListItem) : Boolean; override;\r\n end;\r\n\r\n // Visitor used to collect reference names.\r\n TReferenceNamesVisitor = Class(TLinkedListVisitor)\r\n Private\r\n FList : TStrings;\r\n FRoot : TComponent;\r\n Public\r\n Function Visit(Item : TLinkedListItem) : Boolean; override;\r\n Constructor Create(ARoot : TComponent;AList : TStrings);\r\n end;\r\n\r\n // Visitor used to collect instance names.\r\n TReferenceInstancesVisitor = Class(TLinkedListVisitor)\r\n Private\r\n FList : TStrings;\r\n FRef : String;\r\n FRoot : TComponent;\r\n Public\r\n Function Visit(Item : TLinkedListItem) : Boolean; override;\r\n Constructor Create(ARoot : TComponent;Const ARef : String; AList : TStrings);\r\n end;\r\n\r\n // Visitor used to redirect links to another root component.\r\n TRedirectReferenceVisitor = Class(TLinkedListVisitor)\r\n Private\r\n FOld,\r\n FNew : String;\r\n FRoot : TComponent;\r\n Public\r\n Function Visit(Item : TLinkedListItem) : Boolean; override;\r\n Constructor Create(ARoot : TComponent;Const AOld,ANew : String);\r\n end;\r\n\r\nvar\r\n NeedResolving : TLinkedList;\r\n\r\n// Add an instance to the global list of instances which need resolving.\r\nFunction FindUnresolvedInstance(AInstance: TPersistent) : TUnResolvedInstance;\r\n\r\nbegin\r\n Result:=Nil;\r\n{$ifdef FPC_HAS_FEATURE_THREADING}\r\n EnterCriticalSection(ResolveSection);\r\n Try\r\n{$endif}\r\n If Assigned(NeedResolving) then\r\n begin\r\n Result:=TUnResolvedInstance(NeedResolving.Root);\r\n While (Result<>Nil) and (Result.Instance<>AInstance) do\r\n Result:=TUnResolvedInstance(Result.Next);\r\n end;\r\n{$ifdef FPC_HAS_FEATURE_THREADING}\r\n finally\r\n LeaveCriticalSection(ResolveSection);\r\n end;\r\n{$endif}\r\nend;\r\n\r\nFunction AddtoResolveList(AInstance: TPersistent) : TUnResolvedInstance;\r\n\r\nbegin\r\n Result:=FindUnresolvedInstance(AInstance);\r\n If (Result=Nil) then\r\n begin\r\n{$ifdef FPC_HAS_FEATURE_THREADING}\r\n EnterCriticalSection(ResolveSection);\r\n Try\r\n{$endif}\r\n If not Assigned(NeedResolving) then\r\n NeedResolving:=TLinkedList.Create(TUnResolvedInstance);\r\n Result:=NeedResolving.Add as TUnResolvedInstance;\r\n Result.Instance:=AInstance;\r\n{$ifdef FPC_HAS_FEATURE_THREADING}\r\n finally\r\n LeaveCriticalSection(ResolveSection);\r\n end;\r\n{$endif}\r\n end;\r\nend;\r\n\r\n// Walk through the global list of instances to be resolved.\r\n\r\nProcedure VisitResolveList(V : TLinkedListVisitor);\r\n\r\nbegin\r\n{$ifdef FPC_HAS_FEATURE_THREADING}\r\n EnterCriticalSection(ResolveSection);\r\n Try\r\n{$endif}\r\n try\r\n NeedResolving.Foreach(V);\r\n Finally\r\n FreeAndNil(V);\r\n end;\r\n{$ifdef FPC_HAS_FEATURE_THREADING}\r\n Finally\r\n LeaveCriticalSection(ResolveSection);\r\n end;\r\n{$endif}\r\nend;\r\n\r\nprocedure GlobalFixupReferences;\r\n\r\nbegin\r\n If (NeedResolving=Nil) then\r\n Exit;\r\n{$ifdef FPC_HAS_FEATURE_THREADING}\r\n GlobalNameSpace.BeginWrite;\r\n try\r\n{$endif}\r\n VisitResolveList(TResolveReferenceVisitor.Create);\r\n{$ifdef FPC_HAS_FEATURE_THREADING}\r\n finally\r\n GlobalNameSpace.EndWrite;\r\n end;\r\n{$endif}\r\nend;\r\n\r\n\r\nprocedure GetFixupReferenceNames(Root: TComponent; Names: TStrings);\r\n\r\nbegin\r\n If (NeedResolving=Nil) then\r\n Exit;\r\n VisitResolveList(TReferenceNamesVisitor.Create(Root,Names));\r\nend;\r\n\r\nprocedure GetFixupInstanceNames(Root: TComponent; const ReferenceRootName: string; Names: TStrings);\r\n\r\nbegin\r\n If (NeedResolving=Nil) then\r\n Exit;\r\n VisitResolveList(TReferenceInstancesVisitor.Create(Root,ReferenceRootName,Names));\r\nend;\r\n\r\nprocedure ObjectBinaryToText(aInput, aOutput: TStream);\r\nbegin\r\n ObjectBinaryToText(aInput,aOutput,oteLFM);\r\nend;\r\n\r\nprocedure ObjectBinaryToText(aInput, aOutput: TStream; aEncoding: TObjectTextEncoding);\r\n\r\nvar\r\n Conv : TObjectStreamConverter;\r\n\r\nbegin\r\n Conv:=TObjectStreamConverter.Create;\r\n try\r\n Conv.ObjectBinaryToText(aInput,aOutput,aEncoding);\r\n finally\r\n Conv.Free;\r\n end;\r\nend;\r\n\r\nprocedure RedirectFixupReferences(Root: TComponent; const OldRootName, NewRootName: string);\r\n\r\nbegin\r\n If (NeedResolving=Nil) then\r\n Exit;\r\n VisitResolveList(TRedirectReferenceVisitor.Create(Root,OldRootName,NewRootName));\r\nend;\r\n\r\nprocedure RemoveFixupReferences(Root: TComponent; const RootName: string);\r\n\r\nbegin\r\n If (NeedResolving=Nil) then\r\n Exit;\r\n VisitResolveList(TRemoveReferenceVisitor.Create(Root,RootName));\r\nend;\r\n\r\n\r\n{ TUnresolvedReference }\r\n\r\nFunction TUnresolvedReference.Resolve(Instance : TPersistent) : Boolean;\r\n\r\nVar\r\n C : TComponent;\r\n\r\nbegin\r\n C:=FindGlobalComponent(FGlobal);\r\n Result:=(C<>Nil);\r\n If Result then\r\n begin\r\n C:=FindNestedComponent(C,FRelative);\r\n Result:=C<>Nil;\r\n If Result then\r\n SetObjectProp(Instance, FPropInfo,C);\r\n end;\r\nend;\r\n\r\nFunction TUnresolvedReference.RootMatches(ARoot : TComponent) : Boolean; {$ifdef CLASSESINLINE} inline; {$endif CLASSESINLINE}\r\n\r\nbegin\r\n Result:=(ARoot=Nil) or (ARoot=FRoot);\r\nend;\r\n\r\nFunction TUnResolvedReference.NextRef : TUnresolvedReference;\r\n\r\nbegin\r\n Result:=TUnresolvedReference(Next);\r\nend;\r\n\r\n{ TUnResolvedInstance }\r\n\r\ndestructor TUnResolvedInstance.Destroy;\r\nbegin\r\n FUnresolved.Free;\r\n inherited Destroy;\r\nend;\r\n\r\nfunction TUnResolvedInstance.AddReference(ARoot: TComponent; APropInfo : TTypeMemberProperty; AGlobal, ARelative: String): TUnresolvedReference;\r\nbegin\r\n If (FUnResolved=Nil) then\r\n FUnResolved:=TLinkedList.Create(TUnresolvedReference);\r\n Result:=FUnResolved.Add as TUnresolvedReference;\r\n Result.FGlobal:=AGLobal;\r\n Result.FRelative:=ARelative;\r\n Result.FPropInfo:=APropInfo;\r\n Result.FRoot:=ARoot;\r\nend;\r\n\r\nFunction TUnResolvedInstance.RootUnresolved : TUnresolvedReference;\r\n\r\nbegin\r\n Result:=Nil;\r\n If Assigned(FUnResolved) then\r\n Result:=TUnresolvedReference(FUnResolved.Root);\r\nend;\r\n\r\nFunction TUnResolvedInstance.ResolveReferences:Boolean;\r\n\r\nVar\r\n R,RN : TUnresolvedReference;\r\n\r\nbegin\r\n R:=RootUnResolved;\r\n While (R<>Nil) do\r\n begin\r\n RN:=R.NextRef;\r\n If R.Resolve(Self.Instance) then\r\n FUnresolved.RemoveItem(R,True);\r\n R:=RN;\r\n end;\r\n Result:=RootUnResolved=Nil;\r\nend;\r\n\r\n{ TReferenceNamesVisitor }\r\n\r\nConstructor TReferenceNamesVisitor.Create(ARoot : TComponent;AList : TStrings);\r\n\r\nbegin\r\n FRoot:=ARoot;\r\n FList:=AList;\r\nend;\r\n\r\nFunction TReferenceNamesVisitor.Visit(Item : TLinkedListItem) : Boolean;\r\n\r\nVar\r\n R : TUnresolvedReference;\r\n\r\nbegin\r\n R:=TUnResolvedInstance(Item).RootUnresolved;\r\n While (R<>Nil) do\r\n begin\r\n If R.RootMatches(FRoot) then\r\n If (FList.IndexOf(R.FGlobal)=-1) then\r\n FList.Add(R.FGlobal);\r\n R:=R.NextRef;\r\n end;\r\n Result:=True;\r\nend;\r\n\r\n{ TReferenceInstancesVisitor }\r\n\r\nConstructor TReferenceInstancesVisitor.Create(ARoot : TComponent; Const ARef : String;AList : TStrings);\r\n\r\nbegin\r\n FRoot:=ARoot;\r\n FRef:=UpperCase(ARef);\r\n FList:=AList;\r\nend;\r\n\r\nFunction TReferenceInstancesVisitor.Visit(Item : TLinkedListItem) : Boolean;\r\n\r\nVar\r\n R : TUnresolvedReference;\r\n\r\nbegin\r\n R:=TUnResolvedInstance(Item).RootUnresolved;\r\n While (R<>Nil) do\r\n begin\r\n If (FRoot=R.FRoot) and (FRef=UpperCase(R.FGLobal)) Then\r\n If Flist.IndexOf(R.FRelative)=-1 then\r\n Flist.Add(R.FRelative);\r\n R:=R.NextRef;\r\n end;\r\n Result:=True;\r\nend;\r\n\r\n{ TRedirectReferenceVisitor }\r\n\r\nConstructor TRedirectReferenceVisitor.Create(ARoot : TComponent; Const AOld,ANew : String);\r\n\r\nbegin\r\n FRoot:=ARoot;\r\n FOld:=UpperCase(AOld);\r\n FNew:=ANew;\r\nend;\r\n\r\nFunction TRedirectReferenceVisitor.Visit(Item : TLinkedListItem) : Boolean;\r\n\r\nVar\r\n R : TUnresolvedReference;\r\n\r\nbegin\r\n R:=TUnResolvedInstance(Item).RootUnresolved;\r\n While (R<>Nil) do\r\n begin\r\n If R.RootMatches(FRoot) and (FOld=UpperCase(R.FGLobal)) Then\r\n R.FGlobal:=FNew;\r\n R:=R.NextRef;\r\n end;\r\n Result:=True;\r\nend;\r\n\r\n{ TRemoveReferenceVisitor }\r\n\r\nConstructor TRemoveReferenceVisitor.Create(ARoot : TComponent; Const ARef : String);\r\n\r\nbegin\r\n FRoot:=ARoot;\r\n FRef:=UpperCase(ARef);\r\nend;\r\n\r\nFunction TRemoveReferenceVisitor.Visit(Item : TLinkedListItem) : Boolean;\r\n\r\nVar\r\n I : Integer;\r\n UI : TUnResolvedInstance;\r\n R : TUnresolvedReference;\r\n L : TFPList;\r\n\r\nbegin\r\n UI:=TUnResolvedInstance(Item);\r\n R:=UI.RootUnresolved;\r\n L:=Nil;\r\n Try\r\n // Collect all matches.\r\n While (R<>Nil) do\r\n begin\r\n If R.RootMatches(FRoot) and ((FRef = '') or (FRef=UpperCase(R.FGLobal))) Then\r\n begin\r\n If Not Assigned(L) then\r\n L:=TFPList.Create;\r\n L.Add(R);\r\n end;\r\n R:=R.NextRef;\r\n end;\r\n // Remove all matches.\r\n IF Assigned(L) then\r\n begin\r\n For I:=0 to L.Count-1 do\r\n UI.FUnresolved.RemoveItem(TLinkedListitem(L[i]),True);\r\n end;\r\n // If any references are left, leave them.\r\n If UI.FUnResolved.Root=Nil then\r\n begin\r\n If List=Nil then\r\n List:=TFPList.Create;\r\n List.Add(UI);\r\n end;\r\n Finally\r\n L.Free;\r\n end;\r\n Result:=True;\r\nend;\r\n\r\n{ TBuildListVisitor }\r\n\r\nProcedure TBuildListVisitor.Add(Item : TlinkedListItem);\r\n\r\nbegin\r\n If (List=Nil) then\r\n List:=TFPList.Create;\r\n List.Add(Item);\r\nend;\r\n\r\nDestructor TBuildListVisitor.Destroy;\r\n\r\nVar\r\n I : Integer;\r\n\r\nbegin\r\n If Assigned(List) then\r\n For I:=0 to List.Count-1 do\r\n NeedResolving.RemoveItem(TLinkedListItem(List[I]),True);\r\n FreeAndNil(List);\r\n Inherited;\r\nend;\r\n\r\n{ TResolveReferenceVisitor }\r\n\r\nFunction TResolveReferenceVisitor.Visit(Item : TLinkedListItem) : Boolean;\r\n\r\nbegin\r\n If TUnResolvedInstance(Item).ResolveReferences then\r\n Add(Item);\r\n Result:=True;\r\nend;\r\n\r\n\r\n\r\n{****************************************************************************}\r\n{* TREADER *}\r\n{****************************************************************************}\r\n\r\n\r\nconstructor TReader.Create(Stream: TStream);\r\nbegin\r\n inherited Create;\r\n If (Stream=Nil) then\r\n Raise EReadError.Create(SEmptyStreamIllegalReader);\r\n FDriver := CreateDriver(Stream);\r\nend;\r\n\r\ndestructor TReader.Destroy;\r\nbegin\r\n FDriver.Free;\r\n inherited Destroy;\r\nend;\r\n\r\n\r\nprocedure TReader.FlushBuffer;\r\nbegin\r\n Driver.FlushBuffer;\r\nend;\r\n\r\nfunction TReader.CreateDriver(Stream: TStream): TAbstractObjectReader;\r\nbegin\r\n Result := TBinaryObjectReader.Create(Stream);\r\nend;\r\n\r\nprocedure TReader.BeginReferences;\r\nbegin\r\n FLoaded := TFpList.Create;\r\nend;\r\n\r\nprocedure TReader.CheckValue(Value: TValueType);\r\nbegin\r\n if FDriver.NextValue <> Value then\r\n raise EReadError.Create(SInvalidPropertyValue)\r\n else\r\n FDriver.ReadValue;\r\nend;\r\n\r\nprocedure TReader.DefineProperty(const Name: String; AReadData: TReaderProc;\r\n WriteData: TWriterProc; HasData: Boolean);\r\nbegin\r\n if Assigned(AReadData) and SameText(Name,FPropName) then\r\n begin\r\n AReadData(Self);\r\n SetLength(FPropName, 0);\r\n end else if assigned(WriteData) and HasData then\r\n ;\r\nend;\r\n\r\nprocedure TReader.DefineBinaryProperty(const Name: String;\r\n AReadData, WriteData: TStreamProc; HasData: Boolean);\r\nvar\r\n MemBuffer: TMemoryStream;\r\nbegin\r\n if Assigned(AReadData) and SameText(Name,FPropName) then\r\n begin\r\n { Check if the next property really is a binary property}\r\n if FDriver.NextValue <> vaBinary then\r\n begin\r\n FDriver.SkipValue;\r\n FCanHandleExcepts := True;\r\n raise EReadError.Create(SInvalidPropertyValue);\r\n end else\r\n FDriver.ReadValue;\r\n\r\n MemBuffer := TMemoryStream.Create;\r\n try\r\n FDriver.ReadBinary(MemBuffer);\r\n FCanHandleExcepts := True;\r\n AReadData(MemBuffer);\r\n finally\r\n MemBuffer.Free;\r\n end;\r\n SetLength(FPropName, 0);\r\n end else if assigned(WriteData) and HasData then ;\r\nend;\r\n\r\nfunction TReader.EndOfList: Boolean;\r\nbegin\r\n Result := FDriver.NextValue = vaNull;\r\nend;\r\n\r\nprocedure TReader.EndReferences;\r\nbegin\r\n FLoaded.Free;\r\n FLoaded := nil;\r\nend;\r\n\r\nfunction TReader.Error(const Message: String): Boolean;\r\nbegin\r\n Result := False;\r\n if Assigned(FOnError) then\r\n FOnError(Self, Message, Result);\r\nend;\r\n\r\nfunction TReader.FindMethod(ARoot: TComponent; const AMethodName: String): CodePointer;\r\nvar\r\n ErrorResult: Boolean;\r\nbegin\r\n Result:=nil;\r\n if (ARoot=Nil) or (aMethodName='') then\r\n exit;\r\n Result := ARoot.MethodAddress(AMethodName);\r\n ErrorResult := Result = nil;\r\n\r\n { always give the OnFindMethod callback a chance to locate the method }\r\n if Assigned(FOnFindMethod) then\r\n FOnFindMethod(Self, AMethodName, Result, ErrorResult);\r\n\r\n if ErrorResult then\r\n raise EReadError.Create(SInvalidPropertyValue);\r\nend;\r\n\r\nprocedure TReader.DoFixupReferences;\r\n\r\nVar\r\n R,RN : TLocalUnresolvedReference;\r\n G : TUnresolvedInstance;\r\n Ref : String;\r\n C : TComponent;\r\n P : integer;\r\n L : TLinkedList;\r\n\r\nbegin\r\n If Assigned(FFixups) then\r\n begin\r\n L:=TLinkedList(FFixups);\r\n R:=TLocalUnresolvedReference(L.Root);\r\n While (R<>Nil) do\r\n begin\r\n RN:=TLocalUnresolvedReference(R.Next);\r\n Ref:=R.FRelative;\r\n If Assigned(FOnReferenceName) then\r\n FOnReferenceName(Self,Ref);\r\n C:=FindNestedComponent(R.FRoot,Ref);\r\n If Assigned(C) then\r\n if R.FPropInfo.TypeInfo.Kind = tkInterface then\r\n SetInterfaceProp(R.FInstance,R.FPropInfo,C)\r\n else\r\n SetObjectProp(R.FInstance,R.FPropInfo,C)\r\n else\r\n begin\r\n P:=Pos('.',R.FRelative);\r\n If (P<>0) then\r\n begin\r\n G:=AddToResolveList(R.FInstance);\r\n G.Addreference(R.FRoot,R.FPropInfo,Copy(R.FRelative,1,P-1),Copy(R.FRelative,P+1,Length(R.FRelative)-P));\r\n end;\r\n end;\r\n L.RemoveItem(R,True);\r\n R:=RN;\r\n end;\r\n FreeAndNil(FFixups);\r\n end;\r\nend;\r\n\r\nprocedure TReader.FixupReferences;\r\nvar\r\n i: Integer;\r\nbegin\r\n DoFixupReferences;\r\n GlobalFixupReferences;\r\n for i := 0 to FLoaded.Count - 1 do\r\n TComponent(FLoaded[I]).Loaded;\r\nend;\r\n\r\n\r\nfunction TReader.NextValue: TValueType;\r\nbegin\r\n Result := FDriver.NextValue;\r\nend;\r\n\r\nprocedure TReader.Read(var Buffer : TBytes; Count: LongInt);\r\nbegin\r\n //This should give an exception if read is not implemented (i.e. TTextObjectReader)\r\n //but should work with TBinaryObjectReader.\r\n Driver.Read(Buffer, Count);\r\nend;\r\n\r\nprocedure TReader.PropertyError;\r\nbegin\r\n FDriver.SkipValue;\r\n raise EReadError.CreateFmt(SUnknownProperty,[FPropName]);\r\nend;\r\n\r\nfunction TReader.ReadBoolean: Boolean;\r\nvar\r\n ValueType: TValueType;\r\nbegin\r\n ValueType := FDriver.ReadValue;\r\n if ValueType = vaTrue then\r\n Result := True\r\n else if ValueType = vaFalse then\r\n Result := False\r\n else\r\n raise EReadError.Create(SInvalidPropertyValue);\r\nend;\r\n\r\nfunction TReader.ReadChar: Char;\r\nvar\r\n s: String;\r\nbegin\r\n s := ReadString;\r\n if Length(s) = 1 then\r\n Result := s[1]\r\n else\r\n raise EReadError.Create(SInvalidPropertyValue);\r\nend;\r\n\r\nfunction TReader.ReadWideChar: WideChar;\r\n\r\nvar\r\n W: WideString;\r\n\r\nbegin\r\n W := ReadWideString;\r\n if Length(W) = 1 then\r\n Result := W[1]\r\n else\r\n raise EReadError.Create(SInvalidPropertyValue);\r\nend;\r\n\r\nfunction TReader.ReadUnicodeChar: UnicodeChar;\r\n\r\nvar\r\n U: UnicodeString;\r\n\r\nbegin\r\n U := ReadUnicodeString;\r\n if Length(U) = 1 then\r\n Result := U[1]\r\n else\r\n raise EReadError.Create(SInvalidPropertyValue);\r\nend;\r\n\r\nprocedure TReader.ReadCollection(Collection: TCollection);\r\nvar\r\n Item: TCollectionItem;\r\nbegin\r\n Collection.BeginUpdate;\r\n if not EndOfList then\r\n Collection.Clear;\r\n while not EndOfList do begin\r\n ReadListBegin;\r\n Item := Collection.Add;\r\n while NextValue<>vaNull do\r\n ReadProperty(Item);\r\n ReadListEnd;\r\n end;\r\n Collection.EndUpdate;\r\n ReadListEnd;\r\nend;\r\n\r\nfunction TReader.ReadComponent(Component: TComponent): TComponent;\r\nvar\r\n Flags: TFilerFlags;\r\n\r\n function Recover(E : Exception; var aComponent: TComponent): Boolean;\r\n begin\r\n Result := False;\r\n if not ((ffInherited in Flags) or Assigned(Component)) then\r\n aComponent.Free;\r\n aComponent := nil;\r\n FDriver.SkipComponent(False);\r\n Result := Error(E.Message);\r\n end;\r\n\r\nvar\r\n CompClassName, Name: String;\r\n n, ChildPos: Integer;\r\n SavedParent, SavedLookupRoot: TComponent;\r\n ComponentClass: TComponentClass;\r\n C, NewComponent: TComponent;\r\n SubComponents: TList;\r\nbegin\r\n FDriver.BeginComponent(Flags, ChildPos, CompClassName, Name);\r\n SavedParent := Parent;\r\n SavedLookupRoot := FLookupRoot;\r\n SubComponents := nil;\r\n try\r\n Result := Component;\r\n if not Assigned(Result) then\r\n try\r\n if ffInherited in Flags then\r\n begin\r\n { Try to locate the existing ancestor component }\r\n\r\n if Assigned(FLookupRoot) then\r\n Result := FLookupRoot.FindComponent(Name)\r\n else\r\n Result := nil;\r\n\r\n if not Assigned(Result) then\r\n begin\r\n if Assigned(FOnAncestorNotFound) then\r\n FOnAncestorNotFound(Self, Name,\r\n FindComponentClass(CompClassName), Result);\r\n if not Assigned(Result) then\r\n raise EReadError.CreateFmt(SAncestorNotFound, [Name]);\r\n end;\r\n\r\n Parent := Result.GetParentComponent;\r\n if not Assigned(Parent) then\r\n Parent := Root;\r\n end else\r\n begin\r\n Result := nil;\r\n ComponentClass := FindComponentClass(CompClassName);\r\n if Assigned(FOnCreateComponent) then\r\n FOnCreateComponent(Self, ComponentClass, Result);\r\n if not Assigned(Result) then\r\n begin\r\n asm\r\n NewComponent = Object.create(ComponentClass);\r\n NewComponent.$init();\r\n end;\r\n if ffInline in Flags then\r\n NewComponent.FComponentState :=\r\n NewComponent.FComponentState + [csLoading, csInline];\r\n NewComponent.Create(Owner);\r\n NewComponent.AfterConstruction;\r\n\r\n { Don't set Result earlier because else we would come in trouble\r\n with the exception recover mechanism! (Result should be NIL if\r\n an error occurred) }\r\n Result := NewComponent;\r\n end;\r\n Include(Result.FComponentState, csLoading);\r\n end;\r\n except\r\n On E: Exception do\r\n if not Recover(E,Result) then\r\n raise;\r\n end;\r\n\r\n if Assigned(Result) then\r\n try\r\n Include(Result.FComponentState, csLoading);\r\n\r\n { create list of subcomponents and set loading}\r\n SubComponents := TList.Create;\r\n for n := 0 to Result.ComponentCount - 1 do\r\n begin\r\n C := Result.Components[n];\r\n if csSubcomponent in C.ComponentStyle\r\n then begin\r\n SubComponents.Add(C);\r\n Include(C.FComponentState, csLoading);\r\n end;\r\n end;\r\n\r\n if not (ffInherited in Flags) then\r\n try\r\n Result.SetParentComponent(Parent);\r\n if Assigned(FOnSetName) then\r\n FOnSetName(Self, Result, Name);\r\n Result.Name := Name;\r\n if FindGlobalComponent(Name) = Result then\r\n Include(Result.FComponentState, csInline);\r\n except\r\n On E : Exception do\r\n if not Recover(E,Result) then\r\n raise;\r\n end;\r\n if not Assigned(Result) then\r\n exit;\r\n if csInline in Result.ComponentState then\r\n FLookupRoot := Result;\r\n\r\n { Read the component state }\r\n Include(Result.FComponentState, csReading);\r\n for n := 0 to Subcomponents.Count - 1 do\r\n Include(TComponent(Subcomponents[n]).FComponentState, csReading);\r\n\r\n Result.ReadState(Self);\r\n\r\n Exclude(Result.FComponentState, csReading);\r\n for n := 0 to Subcomponents.Count - 1 do\r\n Exclude(TComponent(Subcomponents[n]).FComponentState, csReading);\r\n\r\n if ffChildPos in Flags then\r\n Parent.SetChildOrder(Result, ChildPos);\r\n\r\n { Add component to list of loaded components, if necessary }\r\n if (not ((ffInherited in Flags) or (csInline in Result.ComponentState))) or\r\n (FLoaded.IndexOf(Result) < 0)\r\n then begin\r\n for n := 0 to Subcomponents.Count - 1 do\r\n FLoaded.Add(Subcomponents[n]);\r\n FLoaded.Add(Result);\r\n end;\r\n except\r\n if ((ffInherited in Flags) or Assigned(Component)) then\r\n Result.Free;\r\n raise;\r\n end;\r\n finally\r\n Parent := SavedParent;\r\n FLookupRoot := SavedLookupRoot;\r\n Subcomponents.Free;\r\n end;\r\nend;\r\n\r\nprocedure TReader.ReadData(Instance: TComponent);\r\nvar\r\n SavedOwner, SavedParent: TComponent;\r\n\r\nbegin\r\n { Read properties }\r\n while not EndOfList do\r\n ReadProperty(Instance);\r\n ReadListEnd;\r\n\r\n { Read children }\r\n SavedOwner := Owner;\r\n SavedParent := Parent;\r\n try\r\n Owner := Instance.GetChildOwner;\r\n if not Assigned(Owner) then\r\n Owner := Root;\r\n Parent := Instance.GetChildParent;\r\n\r\n while not EndOfList do\r\n ReadComponent(nil);\r\n ReadListEnd;\r\n finally\r\n Owner := SavedOwner;\r\n Parent := SavedParent;\r\n end;\r\n\r\n { Fixup references if necessary (normally only if this is the root) }\r\n If (Instance=FRoot) then\r\n DoFixupReferences;\r\nend;\r\n\r\nfunction TReader.ReadFloat: Extended;\r\nbegin\r\n if FDriver.NextValue = vaExtended then\r\n begin\r\n ReadValue;\r\n Result := FDriver.ReadFloat\r\n end else\r\n Result := ReadNativeInt;\r\nend;\r\n\r\nprocedure TReader.ReadSignature;\r\nbegin\r\n FDriver.ReadSignature;\r\nend;\r\n\r\n\r\nfunction TReader.ReadCurrency: Currency;\r\nbegin\r\n if FDriver.NextValue = vaCurrency then\r\n begin\r\n FDriver.ReadValue;\r\n Result := FDriver.ReadCurrency;\r\n end else\r\n Result := ReadInteger;\r\nend;\r\n\r\n\r\nfunction TReader.ReadIdent: String;\r\nvar\r\n ValueType: TValueType;\r\nbegin\r\n ValueType := FDriver.ReadValue;\r\n if ValueType in [vaIdent, vaNil, vaFalse, vaTrue, vaNull] then\r\n Result := FDriver.ReadIdent(ValueType)\r\n else\r\n raise EReadError.Create(SInvalidPropertyValue);\r\nend;\r\n\r\n\r\nfunction TReader.ReadInteger: LongInt;\r\nbegin\r\n case FDriver.ReadValue of\r\n vaInt8:\r\n Result := FDriver.ReadInt8;\r\n vaInt16:\r\n Result := FDriver.ReadInt16;\r\n vaInt32:\r\n Result := FDriver.ReadInt32;\r\n else\r\n raise EReadError.Create(SInvalidPropertyValue);\r\n end;\r\nend;\r\n\r\nfunction TReader.ReadNativeInt: NativeInt;\r\nbegin\r\n if FDriver.NextValue = vaInt64 then\r\n begin\r\n FDriver.ReadValue;\r\n Result := FDriver.ReadNativeInt;\r\n end else\r\n Result := ReadInteger;\r\nend;\r\n\r\nfunction TReader.ReadSet(EnumType: Pointer): Integer;\r\nbegin\r\n if FDriver.NextValue = vaSet then\r\n begin\r\n FDriver.ReadValue;\r\n Result := FDriver.ReadSet(enumtype);\r\n end\r\n else\r\n Result := ReadInteger;\r\nend;\r\n\r\nprocedure TReader.ReadListBegin;\r\nbegin\r\n CheckValue(vaList);\r\nend;\r\n\r\nprocedure TReader.ReadListEnd;\r\nbegin\r\n CheckValue(vaNull);\r\nend;\r\n\r\nfunction TReader.ReadVariant: JSValue;\r\nvar\r\n nv: TValueType;\r\nbegin\r\n nv:=NextValue;\r\n case nv of\r\n vaNil:\r\n begin\r\n Result:=Undefined;\r\n readvalue;\r\n end;\r\n vaNull:\r\n begin\r\n Result:=Nil;\r\n readvalue;\r\n end;\r\n { all integer sizes must be split for big endian systems }\r\n vaInt8,vaInt16,vaInt32:\r\n begin\r\n Result:=ReadInteger;\r\n end;\r\n vaInt64:\r\n begin\r\n Result:=ReadNativeInt;\r\n end;\r\n{\r\n vaQWord:\r\n begin\r\n Result:=QWord(ReadInt64);\r\n end;\r\n} vaFalse,vaTrue:\r\n begin\r\n Result:=(nv<>vaFalse);\r\n readValue;\r\n end;\r\n vaCurrency:\r\n begin\r\n Result:=ReadCurrency;\r\n end;\r\n vaDouble:\r\n begin\r\n Result:=ReadFloat;\r\n end;\r\n vaString:\r\n begin\r\n Result:=ReadString;\r\n end;\r\n else\r\n raise EReadError.CreateFmt(SUnsupportedPropertyVariantType, [Ord(nv)]);\r\n end;\r\nend;\r\n\r\nprocedure TReader.ReadProperty(AInstance: TPersistent);\r\nvar\r\n Path: String;\r\n Instance: TPersistent;\r\n PropInfo: TTypeMemberProperty;\r\n Obj: TObject;\r\n Name: String;\r\n Skip: Boolean;\r\n Handled: Boolean;\r\n OldPropName: String;\r\n DotPos : String;\r\n NextPos: Integer;\r\n\r\n function HandleMissingProperty(IsPath: Boolean): boolean;\r\n begin\r\n Result:=true;\r\n if Assigned(OnPropertyNotFound) then begin\r\n // user defined property error handling\r\n OldPropName:=FPropName;\r\n Handled:=false;\r\n Skip:=false;\r\n OnPropertyNotFound(Self,Instance,FPropName,IsPath,Handled,Skip);\r\n if Handled and (not Skip) and (OldPropName<>FPropName) then\r\n // try alias property\r\n PropInfo := GetPropInfo(Instance.ClassType, FPropName);\r\n if Skip then begin\r\n FDriver.SkipValue;\r\n Result:=false;\r\n exit;\r\n end;\r\n end;\r\n end;\r\n\r\nbegin\r\n try\r\n Path := FDriver.BeginProperty;\r\n try\r\n Instance := AInstance;\r\n FCanHandleExcepts := True;\r\n DotPos := Path;\r\n while True do\r\n begin\r\n NextPos := Pos('.',DotPos);\r\n if NextPos>0 then\r\n FPropName := Copy(DotPos, 1, NextPos-1)\r\n else\r\n begin\r\n FPropName := DotPos;\r\n break;\r\n end;\r\n Delete(DotPos,1,NextPos);\r\n\r\n PropInfo := GetPropInfo(Instance.ClassType, FPropName);\r\n if not Assigned(PropInfo) then begin\r\n if not HandleMissingProperty(true) then exit;\r\n if not Assigned(PropInfo) then\r\n PropertyError;\r\n end;\r\n\r\n if PropInfo.TypeInfo.Kind = tkClass then\r\n Obj := TObject(GetObjectProp(Instance, PropInfo))\r\n //else if PropInfo^.PropType^.Kind = tkInterface then\r\n // Obj := TObject(GetInterfaceProp(Instance, PropInfo))\r\n else\r\n Obj := nil;\r\n\r\n if not (Obj is TPersistent) then\r\n begin\r\n { All path elements must be persistent objects! }\r\n FDriver.SkipValue;\r\n raise EReadError.Create(SInvalidPropertyPath);\r\n end;\r\n Instance := TPersistent(Obj);\r\n end;\r\n\r\n PropInfo := GetPropInfo(Instance.ClassType, FPropName);\r\n if Assigned(PropInfo) then\r\n ReadPropValue(Instance, PropInfo)\r\n else\r\n begin\r\n FCanHandleExcepts := False;\r\n Instance.DefineProperties(Self);\r\n FCanHandleExcepts := True;\r\n if Length(FPropName) > 0 then begin\r\n if not HandleMissingProperty(false) then exit;\r\n if not Assigned(PropInfo) then\r\n PropertyError;\r\n end;\r\n end;\r\n except\r\n on e: Exception do\r\n begin\r\n SetLength(Name, 0);\r\n if AInstance.InheritsFrom(TComponent) then\r\n Name := TComponent(AInstance).Name;\r\n if Length(Name) = 0 then\r\n Name := AInstance.ClassName;\r\n raise EReadError.CreateFmt(SPropertyException, [Name, '.', Path, e.Message]);\r\n end;\r\n end;\r\n except\r\n on e: Exception do\r\n if not FCanHandleExcepts or not Error(E.Message) then\r\n raise;\r\n end;\r\nend;\r\n\r\nprocedure TReader.ReadPropValue(Instance: TPersistent; PropInfo: TTypeMemberProperty);\r\nconst\r\n NullMethod: TMethod = (Code: nil; Data: nil);\r\nvar\r\n PropType: TTypeInfo;\r\n Value: LongInt;\r\n{ IdentToIntFn: TIdentToInt; }\r\n Ident: String;\r\n Method: TMethod;\r\n Handled: Boolean;\r\n TmpStr: String;\r\nbegin\r\n if (PropInfo.Setter='') then\r\n raise EReadError.Create(SReadOnlyProperty);\r\n\r\n PropType := PropInfo.TypeInfo;\r\n case PropType.Kind of\r\n tkInteger:\r\n case FDriver.NextValue of\r\n vaIdent :\r\n begin\r\n Ident := ReadIdent;\r\n if GlobalIdentToInt(Ident,Value) then\r\n SetOrdProp(Instance, PropInfo, Value)\r\n else\r\n raise EReadError.Create(SInvalidPropertyValue);\r\n end;\r\n vaNativeInt :\r\n SetOrdProp(Instance, PropInfo, ReadNativeInt);\r\n vaCurrency:\r\n SetFloatProp(Instance, PropInfo, ReadCurrency);\r\n else\r\n SetOrdProp(Instance, PropInfo, ReadInteger);\r\n end;\r\n tkBool:\r\n SetBoolProp(Instance, PropInfo, ReadBoolean);\r\n tkChar:\r\n SetOrdProp(Instance, PropInfo, Ord(ReadChar));\r\n tkEnumeration:\r\n begin\r\n Value := GetEnumValue(TTypeInfoEnum(PropType), ReadIdent);\r\n if Value = -1 then\r\n raise EReadError.Create(SInvalidPropertyValue);\r\n SetOrdProp(Instance, PropInfo, Value);\r\n end;\r\n{$ifndef FPUNONE}\r\n tkFloat:\r\n SetFloatProp(Instance, PropInfo, ReadFloat);\r\n{$endif}\r\n tkSet:\r\n begin\r\n CheckValue(vaSet);\r\n if TTypeInfoSet(PropType).CompType.Kind=tkEnumeration then\r\n SetOrdProp(Instance, PropInfo, FDriver.ReadSet(TTypeInfoEnum(TTypeInfoSet(PropType).CompType)));\r\n end;\r\n tkMethod, tkRefToProcVar:\r\n if FDriver.NextValue = vaNil then\r\n begin\r\n FDriver.ReadValue;\r\n SetMethodProp(Instance, PropInfo, NullMethod);\r\n end else\r\n begin\r\n Handled:=false;\r\n Ident:=ReadIdent;\r\n if Assigned(OnSetMethodProperty) then\r\n OnSetMethodProperty(Self,Instance,PropInfo,Ident,Handled);\r\n if not Handled then begin\r\n Method.Code := FindMethod(Root, Ident);\r\n Method.Data := Root;\r\n if Assigned(Method.Code) then\r\n SetMethodProp(Instance, PropInfo, Method);\r\n end;\r\n end;\r\n tkString:\r\n begin\r\n TmpStr:=ReadString;\r\n if Assigned(FOnReadStringProperty) then\r\n FOnReadStringProperty(Self,Instance,PropInfo,TmpStr);\r\n SetStrProp(Instance, PropInfo, TmpStr);\r\n end;\r\n tkJSValue:\r\n begin\r\n SetJSValueProp(Instance,PropInfo,ReadVariant);\r\n end;\r\n tkClass, tkInterface:\r\n case FDriver.NextValue of\r\n vaNil:\r\n begin\r\n FDriver.ReadValue;\r\n SetOrdProp(Instance, PropInfo, 0)\r\n end;\r\n vaCollection:\r\n begin\r\n FDriver.ReadValue;\r\n ReadCollection(TCollection(GetObjectProp(Instance, PropInfo)));\r\n end\r\n else\r\n begin\r\n If Not Assigned(FFixups) then\r\n FFixups:=TLinkedList.Create(TLocalUnresolvedReference);\r\n With TLocalUnresolvedReference(TLinkedList(FFixups).Add) do\r\n begin\r\n FInstance:=Instance;\r\n FRoot:=Root;\r\n FPropInfo:=PropInfo;\r\n FRelative:=ReadIdent;\r\n end;\r\n end;\r\n end;\r\n {tkint64:\r\n SetInt64Prop(Instance, PropInfo, ReadInt64);}\r\n else\r\n raise EReadError.CreateFmt(SUnknownPropertyType, [Str(PropType.Kind)]);\r\n end;\r\nend;\r\n\r\nfunction TReader.ReadRootComponent(ARoot: TComponent): TComponent;\r\nvar\r\n Dummy, i: Integer;\r\n Flags: TFilerFlags;\r\n CompClassName, CompName, ResultName: String;\r\nbegin\r\n FDriver.BeginRootComponent;\r\n Result := nil;\r\n {!!!: GlobalNameSpace.BeginWrite; // Loading from stream adds to name space\r\n try}\r\n try\r\n FDriver.BeginComponent(Flags, Dummy, CompClassName, CompName);\r\n if not Assigned(ARoot) then\r\n begin\r\n { Read the class name and the object name and create a new object: }\r\n Result := TComponentClass(FindClass(CompClassName)).Create(nil);\r\n Result.Name := CompName;\r\n end else\r\n begin\r\n Result := ARoot;\r\n\r\n if not (csDesigning in Result.ComponentState) then\r\n begin\r\n Result.FComponentState :=\r\n Result.FComponentState + [csLoading, csReading];\r\n\r\n { We need an unique name }\r\n i := 0;\r\n { Don't use Result.Name directly, as this would influence\r\n FindGlobalComponent in successive loop runs }\r\n ResultName := CompName;\r\n while Assigned(FindGlobalComponent(ResultName)) do\r\n begin\r\n Inc(i);\r\n ResultName := CompName + '_' + IntToStr(i);\r\n end;\r\n Result.Name := ResultName;\r\n end;\r\n end;\r\n\r\n FRoot := Result;\r\n FLookupRoot := Result;\r\n if Assigned(GlobalLoaded) then\r\n FLoaded := GlobalLoaded\r\n else\r\n FLoaded := TFpList.Create;\r\n\r\n try\r\n if FLoaded.IndexOf(FRoot) < 0 then\r\n FLoaded.Add(FRoot);\r\n FOwner := FRoot;\r\n FRoot.FComponentState := FRoot.FComponentState + [csLoading, csReading];\r\n FRoot.ReadState(Self);\r\n Exclude(FRoot.FComponentState, csReading);\r\n\r\n if not Assigned(GlobalLoaded) then\r\n for i := 0 to FLoaded.Count - 1 do\r\n TComponent(FLoaded[i]).Loaded;\r\n\r\n finally\r\n if not Assigned(GlobalLoaded) then\r\n FLoaded.Free;\r\n FLoaded := nil;\r\n end;\r\n GlobalFixupReferences;\r\n except\r\n RemoveFixupReferences(ARoot, '');\r\n if not Assigned(ARoot) then\r\n Result.Free;\r\n raise;\r\n end;\r\n {finally\r\n GlobalNameSpace.EndWrite;\r\n end;}\r\nend;\r\n\r\nprocedure TReader.ReadComponents(AOwner, AParent: TComponent;\r\n Proc: TReadComponentsProc);\r\nvar\r\n Component: TComponent;\r\nbegin\r\n Root := AOwner;\r\n Owner := AOwner;\r\n Parent := AParent;\r\n BeginReferences;\r\n try\r\n while not EndOfList do\r\n begin\r\n FDriver.BeginRootComponent;\r\n Component := ReadComponent(nil);\r\n if Assigned(Proc) then\r\n Proc(Component);\r\n end;\r\n ReadListEnd;\r\n FixupReferences;\r\n finally\r\n EndReferences;\r\n end;\r\nend;\r\n\r\n\r\nfunction TReader.ReadString: String;\r\nvar\r\n StringType: TValueType;\r\nbegin\r\n StringType := FDriver.ReadValue;\r\n if StringType=vaString then\r\n Result := FDriver.ReadString(StringType)\r\n else\r\n raise EReadError.Create(SInvalidPropertyValue);\r\nend;\r\n\r\n\r\nfunction TReader.ReadWideString: WideString;\r\n\r\nbegin\r\n Result:=ReadString;\r\nend;\r\n\r\nfunction TReader.ReadUnicodeString: UnicodeString;\r\n\r\nbegin\r\n Result:=ReadString;\r\nend;\r\n\r\nfunction TReader.ReadValue: TValueType;\r\nbegin\r\n Result := FDriver.ReadValue;\r\nend;\r\n\r\nprocedure TReader.CopyValue(Writer: TWriter);\r\n\r\n(*\r\nprocedure CopyBytes(Count: Integer);\r\n{ var\r\n Buffer: array[0..1023] of Byte; }\r\n begin\r\n{!!!: while Count > 1024 do\r\n begin\r\n FDriver.Read(Buffer, 1024);\r\n Writer.Driver.Write(Buffer, 1024);\r\n Dec(Count, 1024);\r\n end;\r\n if Count > 0 then\r\n begin\r\n FDriver.Read(Buffer, Count);\r\n Writer.Driver.Write(Buffer, Count);\r\n end;}\r\n end;\r\n*)\r\n\r\n{var\r\n s: String;\r\n Count: LongInt; }\r\nbegin\r\n case FDriver.NextValue of\r\n vaNull:\r\n Writer.WriteIdent('NULL');\r\n vaFalse:\r\n Writer.WriteIdent('FALSE');\r\n vaTrue:\r\n Writer.WriteIdent('TRUE');\r\n vaNil:\r\n Writer.WriteIdent('NIL');\r\n {!!!: vaList, vaCollection:\r\n begin\r\n Writer.WriteValue(FDriver.ReadValue);\r\n while not EndOfList do\r\n CopyValue(Writer);\r\n ReadListEnd;\r\n Writer.WriteListEnd;\r\n end;}\r\n vaInt8, vaInt16, vaInt32:\r\n Writer.WriteInteger(ReadInteger);\r\n{$ifndef FPUNONE}\r\n vaExtended:\r\n Writer.WriteFloat(ReadFloat);\r\n{$endif}\r\n vaString:\r\n Writer.WriteString(ReadString);\r\n vaIdent:\r\n Writer.WriteIdent(ReadIdent);\r\n {!!!: vaBinary, vaLString, vaWString:\r\n begin\r\n Writer.WriteValue(FDriver.ReadValue);\r\n FDriver.Read(Count, SizeOf(Count));\r\n Writer.Driver.Write(Count, SizeOf(Count));\r\n CopyBytes(Count);\r\n end;}\r\n {!!!: vaSet:\r\n Writer.WriteSet(ReadSet);}\r\n {!!!: vaCurrency:\r\n Writer.WriteCurrency(ReadCurrency);}\r\n vaInt64:\r\n Writer.WriteInteger(ReadNativeInt);\r\n end;\r\nend;\r\n\r\nfunction TReader.FindComponentClass(const AClassName: String): TComponentClass;\r\n\r\nvar\r\n PersistentClass: TPersistentClass;\r\n\r\n function FindClassInFieldTable(Instance: TComponent): TComponentClass;\r\n var\r\n aClass: TClass;\r\n i: longint;\r\n ClassTI, MemberClassTI: TTypeInfoClass;\r\n MemberTI: TTypeInfo;\r\n begin\r\n aClass:=Instance.ClassType;\r\n while aClass<>nil do\r\n begin\r\n ClassTI:=typeinfo(aClass);\r\n for i:=0 to ClassTI.FieldCount-1 do\r\n begin\r\n MemberTI:=ClassTI.GetField(i).TypeInfo;\r\n if MemberTI.Kind=tkClass then\r\n begin\r\n MemberClassTI:=TTypeInfoClass(MemberTI);\r\n if SameText(MemberClassTI.Name,aClassName)\r\n and (MemberClassTI.ClassType is TComponent) then\r\n exit(TComponentClass(MemberClassTI.ClassType));\r\n end;\r\n end;\r\n aClass:=aClass.ClassParent;\r\n end;\r\n end;\r\n\r\nbegin\r\n Result := nil;\r\n Result:=FindClassInFieldTable(Root);\r\n\r\n if (Result=nil) and assigned(LookupRoot) and (LookupRoot<>Root) then\r\n Result:=FindClassInFieldTable(LookupRoot);\r\n\r\n if (Result=nil) then begin\r\n PersistentClass := GetClass(AClassName);\r\n if Assigned(PersistentClass) and PersistentClass.InheritsFrom(TComponent) then\r\n Result := TComponentClass(PersistentClass);\r\n end;\r\n\r\n if (Result=nil) and assigned(OnFindComponentClass) then\r\n OnFindComponentClass(Self, AClassName, Result);\r\n\r\n if (Result=nil) or (not Result.InheritsFrom(TComponent)) then\r\n raise EClassNotFound.CreateFmt(SClassNotFound, [AClassName]);\r\nend;\r\n\r\n\r\n{ TAbstractObjectReader }\r\n\r\nprocedure TAbstractObjectReader.FlushBuffer;\r\nbegin\r\n // Do nothing\r\nend;\r\n\r\n\r\n{\r\n This file is part of the Free Component Library (FCL)\r\n Copyright (c) 1999-2000 by the Free Pascal development team\r\n\r\n See the file COPYING.FPC, included in this distribution,\r\n for details about the copyright.\r\n\r\n This program is distributed in the hope that it will be useful,\r\n but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\r\n\r\n **********************************************************************}\r\n\r\n\r\n{****************************************************************************}\r\n{* TBinaryObjectWriter *}\r\n{****************************************************************************}\r\n\r\n\r\nprocedure TBinaryObjectWriter.WriteWord(w : word);\r\nbegin\r\n FStream.WriteBufferData(w);\r\nend;\r\n\r\nprocedure TBinaryObjectWriter.WriteDWord(lw : longword);\r\nbegin\r\n FStream.WriteBufferData(lw);\r\nend;\r\n\r\nconstructor TBinaryObjectWriter.Create(Stream: TStream);\r\nbegin\r\n inherited Create;\r\n If (Stream=Nil) then\r\n Raise EWriteError.Create(SEmptyStreamIllegalWriter);\r\n FStream := Stream;\r\nend;\r\n\r\nprocedure TBinaryObjectWriter.BeginCollection;\r\nbegin\r\n WriteValue(vaCollection);\r\nend;\r\n\r\nprocedure TBinaryObjectWriter.WriteSignature;\r\n\r\nbegin\r\n FStream.WriteBufferData(FilerSignatureInt);\r\nend;\r\n\r\nprocedure TBinaryObjectWriter.BeginComponent(Component: TComponent;\r\n Flags: TFilerFlags; ChildPos: Integer);\r\nvar\r\n Prefix: Byte;\r\nbegin\r\n\r\n { Only write the flags if they are needed! }\r\n if Flags <> [] then\r\n begin\r\n Prefix:=0;\r\n if ffInherited in Flags then\r\n Prefix:=Prefix or $01;\r\n if ffChildPos in Flags then\r\n Prefix:=Prefix or $02;\r\n if ffInline in Flags then\r\n Prefix:=Prefix or $04;\r\n Prefix := Prefix or $f0;\r\n FStream.WriteBufferData(Prefix);\r\n if ffChildPos in Flags then\r\n WriteInteger(ChildPos);\r\n end;\r\n\r\n WriteStr(Component.ClassName);\r\n WriteStr(Component.Name);\r\nend;\r\n\r\nprocedure TBinaryObjectWriter.BeginList;\r\nbegin\r\n WriteValue(vaList);\r\nend;\r\n\r\nprocedure TBinaryObjectWriter.EndList;\r\nbegin\r\n WriteValue(vaNull);\r\nend;\r\n\r\nprocedure TBinaryObjectWriter.BeginProperty(const PropName: String);\r\nbegin\r\n WriteStr(PropName);\r\nend;\r\n\r\nprocedure TBinaryObjectWriter.EndProperty;\r\nbegin\r\nend;\r\n\r\nprocedure TBinaryObjectWriter.FlushBuffer;\r\nbegin\r\n // Do nothing;\r\nend;\r\n\r\nprocedure TBinaryObjectWriter.WriteBinary(const Buffer : TBytes; Count: LongInt);\r\nbegin\r\n WriteValue(vaBinary);\r\n WriteDWord(longword(Count));\r\n FStream.Write(Buffer, Count);\r\nend;\r\n\r\nprocedure TBinaryObjectWriter.WriteBoolean(Value: Boolean);\r\nbegin\r\n if Value then\r\n WriteValue(vaTrue)\r\n else\r\n WriteValue(vaFalse);\r\nend;\r\n\r\nprocedure TBinaryObjectWriter.WriteFloat(const Value: Extended);\r\nbegin\r\n WriteValue(vaDouble);\r\n FStream.WriteBufferData(Value);\r\nend;\r\n\r\n\r\nprocedure TBinaryObjectWriter.WriteCurrency(const Value: Currency);\r\n\r\nVar\r\n F : Double;\r\nbegin\r\n WriteValue(vaCurrency);\r\n F:=Value;\r\n FStream.WriteBufferData(F);\r\nend;\r\n\r\nprocedure TBinaryObjectWriter.WriteIdent(const Ident: string);\r\nbegin\r\n { Check if Ident is a special identifier before trying to just write\r\n Ident directly }\r\n if UpperCase(Ident) = 'NIL' then\r\n WriteValue(vaNil)\r\n else if UpperCase(Ident) = 'FALSE' then\r\n WriteValue(vaFalse)\r\n else if UpperCase(Ident) = 'TRUE' then\r\n WriteValue(vaTrue)\r\n else if UpperCase(Ident) = 'NULL' then\r\n WriteValue(vaNull) else\r\n begin\r\n WriteValue(vaIdent);\r\n WriteStr(Ident);\r\n end;\r\nend;\r\n\r\nprocedure TBinaryObjectWriter.WriteInteger(Value: NativeInt);\r\nvar\r\n s: ShortInt;\r\n i: SmallInt;\r\n l: Longint;\r\nbegin\r\n { Use the smallest possible integer type for the given value: }\r\n if (Value >= -128) and (Value <= 127) then\r\n begin\r\n WriteValue(vaInt8);\r\n s := Value;\r\n FStream.WriteBufferData(s);\r\n end else if (Value >= -32768) and (Value <= 32767) then\r\n begin\r\n WriteValue(vaInt16);\r\n i := Value;\r\n WriteWord(word(i));\r\n end else if (Value >= -$80000000) and (Value <= $7fffffff) then\r\n begin\r\n WriteValue(vaInt32);\r\n l := Value;\r\n WriteDWord(longword(l));\r\n end else\r\n begin\r\n WriteValue(vaInt64);\r\n FStream.WriteBufferData(Value);\r\n end;\r\nend;\r\n\r\nprocedure TBinaryObjectWriter.WriteNativeInt(Value: NativeInt);\r\nvar\r\n s: Int8;\r\n i: Int16;\r\n l: Int32;\r\nbegin\r\n { Use the smallest possible integer type for the given value: }\r\n if (Value <= 127) then\r\n begin\r\n WriteValue(vaInt8);\r\n s := Value;\r\n FStream.WriteBufferData(s);\r\n end else if (Value <= 32767) then\r\n begin\r\n WriteValue(vaInt16);\r\n i := Value;\r\n WriteWord(word(i));\r\n end else if (Value <= $7fffffff) then\r\n begin\r\n WriteValue(vaInt32);\r\n l := Value;\r\n WriteDWord(longword(l));\r\n end else\r\n begin\r\n WriteValue(vaQWord);\r\n FStream.WriteBufferData(Value);\r\n end;\r\nend;\r\n\r\n\r\nprocedure TBinaryObjectWriter.WriteMethodName(const Name: String);\r\nbegin\r\n if Length(Name) > 0 then\r\n begin\r\n WriteValue(vaIdent);\r\n WriteStr(Name);\r\n end else\r\n WriteValue(vaNil);\r\nend;\r\n\r\nprocedure TBinaryObjectWriter.WriteSet(Value: LongInt; SetType: Pointer);\r\nvar\r\n i: Integer;\r\n b : Integer;\r\nbegin\r\n WriteValue(vaSet);\r\n B:=1;\r\n for i:=0 to 31 do\r\n begin\r\n if (Value and b) <>0 then\r\n begin\r\n WriteStr(GetEnumName(PTypeInfo(SetType), i));\r\n end;\r\n b:=b shl 1;\r\n end;\r\n WriteStr('');\r\nend;\r\n\r\nprocedure TBinaryObjectWriter.WriteString(const Value: String);\r\n\r\nvar\r\n i, len: Integer;\r\nbegin\r\n len := Length(Value);\r\n WriteValue(vaString);\r\n WriteDWord(len);\r\n For I:=1 to len do\r\n FStream.WriteBufferData(Value[i]);\r\nend;\r\n\r\nprocedure TBinaryObjectWriter.WriteWideString(const Value: WideString);\r\n\r\nbegin\r\n WriteString(Value);\r\nend;\r\n\r\nprocedure TBinaryObjectWriter.WriteUnicodeString(const Value: UnicodeString);\r\n\r\nbegin\r\n WriteString(Value);\r\nend;\r\n\r\nprocedure TBinaryObjectWriter.WriteVariant(const VarValue: JSValue);\r\nbegin\r\n if isUndefined(varValue) then\r\n WriteValue(vaNil)\r\n else if IsNull(VarValue) then\r\n WriteValue(vaNull)\r\n else if IsNumber(VarValue) then\r\n begin\r\n if Frac(Double(varValue))=0 then\r\n WriteInteger(NativeInt(VarValue))\r\n else\r\n WriteFloat(Double(varValue))\r\n end\r\n else if isBoolean(varValue) then\r\n WriteBoolean(Boolean(VarValue))\r\n else if isString(varValue) then\r\n WriteString(String(VarValue))\r\n else\r\n raise EWriteError.Create(SUnsupportedPropertyVariantType);\r\nend;\r\n\r\n\r\nprocedure TBinaryObjectWriter.Write(const Buffer : TBytes; Count: LongInt);\r\n\r\nbegin\r\n FStream.Write(Buffer,Count);\r\nend;\r\n\r\nprocedure TBinaryObjectWriter.WriteValue(Value: TValueType);\r\nvar\r\n b: uint8;\r\nbegin\r\n b := uint8(Value);\r\n FStream.WriteBufferData(b);\r\nend;\r\n\r\nprocedure TBinaryObjectWriter.WriteStr(const Value: String);\r\nvar\r\n len,i: integer;\r\n b: uint8;\r\nbegin\r\n len:= Length(Value);\r\n if len > 255 then\r\n len := 255;\r\n b := len;\r\n FStream.WriteBufferData(b);\r\n For I:=1 to len do\r\n FStream.WriteBufferData(Value[i]);\r\nend;\r\n\r\n\r\n\r\n{****************************************************************************}\r\n{* TWriter *}\r\n{****************************************************************************}\r\n\r\n\r\nconstructor TWriter.Create(ADriver: TAbstractObjectWriter);\r\nbegin\r\n inherited Create;\r\n FDriver := ADriver;\r\nend;\r\n\r\nconstructor TWriter.Create(Stream: TStream);\r\nbegin\r\n inherited Create;\r\n If (Stream=Nil) then\r\n Raise EWriteError.Create(SEmptyStreamIllegalWriter);\r\n FDriver := CreateDriver(Stream);\r\n FDestroyDriver := True;\r\nend;\r\n\r\ndestructor TWriter.Destroy;\r\nbegin\r\n if FDestroyDriver then\r\n FDriver.Free;\r\n inherited Destroy;\r\nend;\r\n\r\nfunction TWriter.CreateDriver(Stream: TStream): TAbstractObjectWriter;\r\nbegin\r\n Result := TBinaryObjectWriter.Create(Stream);\r\nend;\r\n\r\nType\r\n TPosComponent = Class(TObject)\r\n Private\r\n FPos : Integer;\r\n FComponent : TComponent;\r\n Public\r\n Constructor Create(APos : Integer; AComponent : TComponent);\r\n end;\r\n\r\nConstructor TPosComponent.Create(APos : Integer; AComponent : TComponent);\r\n\r\nbegin\r\n FPos:=APos;\r\n FComponent:=AComponent;\r\nend;\r\n\r\n// Used as argument for calls to TComponent.GetChildren:\r\nprocedure TWriter.AddToAncestorList(Component: TComponent);\r\nbegin\r\n FAncestors.AddObject(Component.Name,TPosComponent.Create(FAncestors.Count,Component));\r\nend;\r\n\r\nprocedure TWriter.DefineProperty(const Name: String;\r\n ReadData: TReaderProc; AWriteData: TWriterProc; HasData: Boolean);\r\nbegin\r\n if HasData and Assigned(AWriteData) then\r\n begin\r\n // Write the property name and then the data itself\r\n Driver.BeginProperty(FPropPath + Name);\r\n AWriteData(Self);\r\n Driver.EndProperty;\r\n end else if assigned(ReadData) then ;\r\nend;\r\n\r\nprocedure TWriter.DefineBinaryProperty(const Name: String;\r\n ReadData, AWriteData: TStreamProc; HasData: Boolean);\r\nbegin\r\n if HasData and Assigned(AWriteData) then\r\n begin\r\n // Write the property name and then the data itself\r\n Driver.BeginProperty(FPropPath + Name);\r\n WriteBinary(AWriteData);\r\n Driver.EndProperty;\r\n end else if assigned(ReadData) then ;\r\nend;\r\n\r\nprocedure TWriter.FlushBuffer;\r\nbegin\r\n Driver.FlushBuffer;\r\nend;\r\n\r\nprocedure TWriter.Write(const Buffer : TBytes; Count: Longint);\r\nbegin\r\n //This should give an exception if write is not implemented (i.e. TTextObjectWriter)\r\n //but should work with TBinaryObjectWriter.\r\n Driver.Write(Buffer, Count);\r\nend;\r\n\r\nprocedure TWriter.SetRoot(ARoot: TComponent);\r\nbegin\r\n inherited SetRoot(ARoot);\r\n // Use the new root as lookup root too\r\n FLookupRoot := ARoot;\r\nend;\r\n\r\nprocedure TWriter.WriteSignature;\r\n\r\nbegin\r\n FDriver.WriteSignature;\r\nend;\r\n\r\nprocedure TWriter.WriteBinary(AWriteData: TStreamProc);\r\nvar\r\n MemBuffer: TBytesStream;\r\nbegin\r\n { First write the binary data into a memory stream, then copy this buffered\r\n stream into the writing destination. This is necessary as we have to know\r\n the size of the binary data in advance (we're assuming that seeking within\r\n the writer stream is not possible) }\r\n MemBuffer := TBytesStream.Create;\r\n try\r\n AWriteData(MemBuffer);\r\n Driver.WriteBinary(MemBuffer.Bytes, MemBuffer.Size);\r\n finally\r\n MemBuffer.Free;\r\n end;\r\nend;\r\n\r\nprocedure TWriter.WriteBoolean(Value: Boolean);\r\nbegin\r\n Driver.WriteBoolean(Value);\r\nend;\r\n\r\nprocedure TWriter.WriteChar(Value: Char);\r\nbegin\r\n WriteString(Value);\r\nend;\r\n\r\nprocedure TWriter.WriteWideChar(Value: WideChar);\r\nbegin\r\n WriteWideString(Value);\r\nend;\r\n\r\nprocedure TWriter.WriteCollection(Value: TCollection);\r\nvar\r\n i: Integer;\r\nbegin\r\n Driver.BeginCollection;\r\n if Assigned(Value) then\r\n for i := 0 to Value.Count - 1 do\r\n begin\r\n { Each collection item needs its own ListBegin/ListEnd tag, or else the\r\n reader wouldn't be able to know where an item ends and where the next\r\n one starts }\r\n WriteListBegin;\r\n WriteProperties(Value.Items[i]);\r\n WriteListEnd;\r\n end;\r\n WriteListEnd;\r\nend;\r\n\r\nprocedure TWriter.DetermineAncestor(Component : TComponent);\r\n\r\nVar\r\n I : Integer;\r\n\r\nbegin\r\n // Should be set only when we write an inherited with children.\r\n if Not Assigned(FAncestors) then\r\n exit;\r\n I:=FAncestors.IndexOf(Component.Name);\r\n If (I=-1) then\r\n begin\r\n FAncestor:=Nil;\r\n FAncestorPos:=-1;\r\n end\r\n else\r\n With TPosComponent(FAncestors.Objects[i]) do\r\n begin\r\n FAncestor:=FComponent;\r\n FAncestorPos:=FPos;\r\n end;\r\nend;\r\n\r\nprocedure TWriter.DoFindAncestor(Component : TComponent);\r\n\r\nVar\r\n C : TComponent;\r\n\r\nbegin\r\n if Assigned(FOnFindAncestor) then\r\n if (Ancestor=Nil) or (Ancestor is TComponent) then\r\n begin\r\n C:=TComponent(Ancestor);\r\n FOnFindAncestor(Self,Component,Component.Name,C,FRootAncestor);\r\n Ancestor:=C;\r\n end;\r\nend;\r\n\r\nprocedure TWriter.WriteComponent(Component: TComponent);\r\n\r\nvar\r\n SA : TPersistent;\r\n SR, SRA : TComponent;\r\nbegin\r\n SR:=FRoot;\r\n SA:=FAncestor;\r\n SRA:=FRootAncestor;\r\n Try\r\n Component.FComponentState:=Component.FComponentState+[csWriting];\r\n Try\r\n // Possibly set ancestor.\r\n DetermineAncestor(Component);\r\n DoFindAncestor(Component); // Mainly for IDE when a parent form had an ancestor renamed...\r\n // Will call WriteComponentData.\r\n Component.WriteState(Self);\r\n FDriver.EndList;\r\n Finally\r\n Component.FComponentState:=Component.FComponentState-[csWriting];\r\n end;\r\n Finally\r\n FAncestor:=SA;\r\n FRoot:=SR;\r\n FRootAncestor:=SRA;\r\n end;\r\nend;\r\n\r\nprocedure TWriter.WriteChildren(Component : TComponent);\r\n\r\nVar\r\n SRoot, SRootA : TComponent;\r\n SList : TStringList;\r\n SPos, I , SAncestorPos: Integer;\r\n O : TObject;\r\n\r\nbegin\r\n // Write children list.\r\n // While writing children, the ancestor environment must be saved\r\n // This is recursive...\r\n SRoot:=FRoot;\r\n SRootA:=FRootAncestor;\r\n SList:=FAncestors;\r\n SPos:=FCurrentPos;\r\n SAncestorPos:=FAncestorPos;\r\n try\r\n FAncestors:=Nil;\r\n FCurrentPos:=0;\r\n FAncestorPos:=-1;\r\n if csInline in Component.ComponentState then\r\n FRoot:=Component;\r\n if (FAncestor is TComponent) then\r\n begin\r\n FAncestors:=TStringList.Create;\r\n if csInline in TComponent(FAncestor).ComponentState then\r\n FRootAncestor := TComponent(FAncestor);\r\n TComponent(FAncestor).GetChildren(@AddToAncestorList,FRootAncestor);\r\n FAncestors.Sorted:=True;\r\n end;\r\n try\r\n Component.GetChildren(@WriteComponent, FRoot);\r\n Finally\r\n If Assigned(Fancestors) then\r\n For I:=0 to FAncestors.Count-1 do\r\n begin\r\n O:=FAncestors.Objects[i];\r\n FAncestors.Objects[i]:=Nil;\r\n O.Free;\r\n end;\r\n FreeAndNil(FAncestors);\r\n end;\r\n finally\r\n FAncestors:=Slist;\r\n FRoot:=SRoot;\r\n FRootAncestor:=SRootA;\r\n FCurrentPos:=SPos;\r\n FAncestorPos:=SAncestorPos;\r\n end;\r\nend;\r\n\r\nprocedure TWriter.WriteComponentData(Instance: TComponent);\r\nvar\r\n Flags: TFilerFlags;\r\nbegin\r\n Flags := [];\r\n If (Assigned(FAncestor)) and //has ancestor\r\n (not (csInline in Instance.ComponentState) or // no inline component\r\n // .. or the inline component is inherited\r\n (csAncestor in Instance.Componentstate) and (FAncestors <> nil)) then\r\n Flags:=[ffInherited]\r\n else If csInline in Instance.ComponentState then\r\n Flags:=[ffInline];\r\n If (FAncestors<>Nil) and ((FCurrentPos<>FAncestorPos) or (FAncestor=Nil)) then\r\n Include(Flags,ffChildPos);\r\n FDriver.BeginComponent(Instance,Flags,FCurrentPos);\r\n If (FAncestors<>Nil) then\r\n Inc(FCurrentPos);\r\n WriteProperties(Instance);\r\n WriteListEnd;\r\n // Needs special handling of ancestor.\r\n If not IgnoreChildren then\r\n WriteChildren(Instance);\r\nend;\r\n\r\nprocedure TWriter.WriteDescendent(ARoot: TComponent; AAncestor: TComponent);\r\nbegin\r\n FRoot := ARoot;\r\n FAncestor := AAncestor;\r\n FRootAncestor := AAncestor;\r\n FLookupRoot := ARoot;\r\n WriteSignature;\r\n WriteComponent(ARoot);\r\nend;\r\n\r\nprocedure TWriter.WriteFloat(const Value: Extended);\r\nbegin\r\n Driver.WriteFloat(Value);\r\nend;\r\n\r\n\r\nprocedure TWriter.WriteCurrency(const Value: Currency);\r\nbegin\r\n Driver.WriteCurrency(Value);\r\nend;\r\n\r\n\r\nprocedure TWriter.WriteIdent(const Ident: string);\r\nbegin\r\n Driver.WriteIdent(Ident);\r\nend;\r\n\r\nprocedure TWriter.WriteInteger(Value: LongInt);\r\nbegin\r\n Driver.WriteInteger(Value);\r\nend;\r\n\r\nprocedure TWriter.WriteInteger(Value: NativeInt);\r\nbegin\r\n Driver.WriteInteger(Value);\r\nend;\r\n\r\nprocedure TWriter.WriteSet(Value: LongInt; SetType: Pointer);\r\n\r\nbegin\r\n Driver.WriteSet(Value,SetType);\r\nend;\r\n\r\nprocedure TWriter.WriteVariant(const VarValue: JSValue);\r\nbegin\r\n Driver.WriteVariant(VarValue);\r\nend;\r\n\r\nprocedure TWriter.WriteListBegin;\r\nbegin\r\n Driver.BeginList;\r\nend;\r\n\r\nprocedure TWriter.WriteListEnd;\r\nbegin\r\n Driver.EndList;\r\nend;\r\n\r\nprocedure TWriter.WriteProperties(Instance: TPersistent);\r\n\r\nvar\r\n PropCount,i : integer;\r\n PropList : TTypeMemberPropertyDynArray;\r\n\r\nbegin\r\n PropList:=GetPropList(Instance);\r\n PropCount:=Length(PropList);\r\n if PropCount>0 then\r\n for i := 0 to PropCount-1 do\r\n if IsStoredProp(Instance,PropList[i]) then\r\n WriteProperty(Instance,PropList[i]);\r\n Instance.DefineProperties(Self);\r\nend;\r\n\r\n\r\nprocedure TWriter.WriteProperty(Instance: TPersistent; PropInfo: TTypeMemberProperty);\r\nvar\r\n HasAncestor: Boolean;\r\n PropType: TTypeInfo;\r\n N,Value, DefValue: LongInt;\r\n Ident: String;\r\n IntToIdentFn: TIntToIdent;\r\n{$ifndef FPUNONE}\r\n FloatValue, DefFloatValue: Extended;\r\n{$endif}\r\n MethodValue: TMethod;\r\n DefMethodValue: TMethod;\r\n StrValue, DefStrValue: String;\r\n AncestorObj: TObject;\r\n C,Component: TComponent;\r\n ObjValue: TObject;\r\n SavedAncestor: TPersistent;\r\n Key, SavedPropPath, Name, lMethodName: String;\r\n VarValue, DefVarValue : JSValue;\r\n BoolValue, DefBoolValue: boolean;\r\n Handled: Boolean;\r\n O : TJSObject;\r\nbegin\r\n // do not stream properties without getter\r\n if PropInfo.Getter='' then\r\n exit;\r\n // properties without setter are only allowed, if they are subcomponents\r\n PropType := PropInfo.TypeInfo;\r\n if (PropInfo.Setter='') then\r\n begin\r\n if PropType.Kind<>tkClass then\r\n exit;\r\n ObjValue := TObject(GetObjectProp(Instance, PropInfo));\r\n if not ObjValue.InheritsFrom(TComponent) or\r\n not (csSubComponent in TComponent(ObjValue).ComponentStyle) then\r\n exit;\r\n end;\r\n\r\n { Check if the ancestor can be used }\r\n HasAncestor := Assigned(Ancestor) and ((Instance = Root) or\r\n (Instance.ClassType = Ancestor.ClassType));\r\n //writeln('TWriter.WriteProperty Name=',PropType^.Name,' Kind=',GetEnumName(TypeInfo(TTypeKind),ord(PropType^.Kind)),' HasAncestor=',HasAncestor);\r\n\r\n case PropType.Kind of\r\n tkInteger, tkChar, tkEnumeration, tkSet:\r\n begin\r\n Value := GetOrdProp(Instance, PropInfo);\r\n if HasAncestor then\r\n DefValue := GetOrdProp(Ancestor, PropInfo)\r\n else\r\n begin\r\n if PropType.Kind<>tkSet then\r\n DefValue := Longint(PropInfo.Default)\r\n else\r\n begin\r\n o:=TJSObject(PropInfo.Default);\r\n DefValue:=0;\r\n for Key in o do\r\n begin\r\n n:=parseInt(Key,10);\r\n if n<32 then\r\n DefValue:=DefValue+(1 shl n);\r\n end;\r\n end;\r\n end;\r\n // writeln(PPropInfo(PropInfo)^.Name, ', HasAncestor=', ord(HasAncestor), ', Value=', Value, ', Default=', DefValue);\r\n if (Value <> DefValue) or (DefValue=longint($80000000)) then\r\n begin\r\n Driver.BeginProperty(FPropPath + PropInfo.Name);\r\n case PropType.Kind of\r\n tkInteger:\r\n begin\r\n // Check if this integer has a string identifier\r\n IntToIdentFn := FindIntToIdent(PropInfo.TypeInfo);\r\n if Assigned(IntToIdentFn) and IntToIdentFn(Value, Ident) then\r\n // Integer can be written a human-readable identifier\r\n WriteIdent(Ident)\r\n else\r\n // Integer has to be written just as number\r\n WriteInteger(Value);\r\n end;\r\n tkChar:\r\n WriteChar(Chr(Value));\r\n tkSet:\r\n begin\r\n Driver.WriteSet(Value, TTypeInfoSet(PropType).CompType);\r\n end;\r\n tkEnumeration:\r\n WriteIdent(GetEnumName(TTypeInfoEnum(PropType), Value));\r\n end;\r\n Driver.EndProperty;\r\n end;\r\n end;\r\n{$ifndef FPUNONE}\r\n tkFloat:\r\n begin\r\n FloatValue := GetFloatProp(Instance, PropInfo);\r\n if HasAncestor then\r\n DefFloatValue := GetFloatProp(Ancestor, PropInfo)\r\n else\r\n begin\r\n // This is really ugly..\r\n DefFloatValue:=Double(PropInfo.Default);\r\n end;\r\n if (FloatValue<>DefFloatValue) or (not HasAncestor and (int(DefFloatValue)=longint($80000000))) then\r\n begin\r\n Driver.BeginProperty(FPropPath + PropInfo.Name);\r\n WriteFloat(FloatValue);\r\n Driver.EndProperty;\r\n end;\r\n end;\r\n{$endif}\r\n tkMethod:\r\n begin\r\n MethodValue := GetMethodProp(Instance, PropInfo);\r\n if HasAncestor then\r\n DefMethodValue := GetMethodProp(Ancestor, PropInfo)\r\n else begin\r\n DefMethodValue.Data := nil;\r\n DefMethodValue.Code := nil;\r\n end;\r\n\r\n Handled:=false;\r\n if Assigned(OnWriteMethodProperty) then\r\n OnWriteMethodProperty(Self,Instance,PropInfo,MethodValue,\r\n DefMethodValue,Handled);\r\n if isString(MethodValue.Code) then\r\n lMethodName:=String(MethodValue.Code)\r\n else\r\n lMethodName:=FLookupRoot.MethodName(MethodValue.Code);\r\n //Writeln('Writeln A: ',lMethodName);\r\n if (not Handled) and\r\n (MethodValue.Code <> DefMethodValue.Code) and\r\n ((not Assigned(MethodValue.Code)) or\r\n ((Length(lMethodName) > 0))) then\r\n begin\r\n //Writeln('Writeln B',FPropPath + PropInfo.Name);\r\n Driver.BeginProperty(FPropPath + PropInfo.Name);\r\n if Assigned(MethodValue.Code) then\r\n Driver.WriteMethodName(lMethodName)\r\n else\r\n Driver.WriteMethodName('');\r\n Driver.EndProperty;\r\n end;\r\n end;\r\n tkString: // tkSString, tkLString, tkAString are not supported\r\n begin\r\n StrValue := GetStrProp(Instance, PropInfo);\r\n if HasAncestor then\r\n DefStrValue := GetStrProp(Ancestor, PropInfo)\r\n else\r\n begin\r\n DefValue :=Longint(PropInfo.Default);\r\n SetLength(DefStrValue, 0);\r\n end;\r\n\r\n if (StrValue<>DefStrValue) or (not HasAncestor and (DefValue=longint($80000000))) then\r\n begin\r\n Driver.BeginProperty(FPropPath + PropInfo.Name);\r\n if Assigned(FOnWriteStringProperty) then\r\n FOnWriteStringProperty(Self,Instance,PropInfo,StrValue);\r\n WriteString(StrValue);\r\n Driver.EndProperty;\r\n end;\r\n end;\r\n tkJSValue:\r\n begin\r\n { Ensure that a Variant manager is installed }\r\n VarValue := GetJSValueProp(Instance, PropInfo);\r\n if HasAncestor then\r\n DefVarValue := GetJSValueProp(Ancestor, PropInfo)\r\n else\r\n DefVarValue:=null;\r\n\r\n if (VarValue<>DefVarValue) then\r\n begin\r\n Driver.BeginProperty(FPropPath + PropInfo.Name);\r\n { can't use variant() typecast, pulls in variants unit }\r\n WriteVariant(VarValue);\r\n Driver.EndProperty;\r\n end;\r\n end;\r\n tkClass:\r\n begin\r\n ObjValue := TObject(GetObjectProp(Instance, PropInfo));\r\n if HasAncestor then\r\n begin\r\n AncestorObj := TObject(GetObjectProp(Ancestor, PropInfo));\r\n if (AncestorObj is TComponent) and\r\n (ObjValue is TComponent) then\r\n begin\r\n //writeln('TWriter.WriteProperty AncestorObj=',TComponent(AncestorObj).Name,' OwnerFit=',TComponent(AncestorObj).Owner = FRootAncestor,' ',TComponent(ObjValue).Name,' OwnerFit=',TComponent(ObjValue).Owner = Root);\r\n if (AncestorObj<> ObjValue) and\r\n (TComponent(AncestorObj).Owner = FRootAncestor) and\r\n (TComponent(ObjValue).Owner = Root) and\r\n (UpperCase(TComponent(AncestorObj).Name) = UpperCase(TComponent(ObjValue).Name)) then\r\n begin\r\n // different components, but with the same name\r\n // treat it like an override\r\n AncestorObj := ObjValue;\r\n end;\r\n end;\r\n end else\r\n AncestorObj := nil;\r\n\r\n if not Assigned(ObjValue) then\r\n begin\r\n if ObjValue <> AncestorObj then\r\n begin\r\n Driver.BeginProperty(FPropPath + PropInfo.Name);\r\n Driver.WriteIdent('NIL');\r\n Driver.EndProperty;\r\n end\r\n end\r\n else if ObjValue.InheritsFrom(TPersistent) then\r\n begin\r\n { Subcomponents are streamed the same way as persistents }\r\n if ObjValue.InheritsFrom(TComponent)\r\n and ((not (csSubComponent in TComponent(ObjValue).ComponentStyle))\r\n or ((TComponent(ObjValue).Owner<>Instance) and (TComponent(ObjValue).Owner<>Nil))) then\r\n begin\r\n Component := TComponent(ObjValue);\r\n if (ObjValue <> AncestorObj)\r\n and not (csTransient in Component.ComponentStyle) then\r\n begin\r\n Name:= '';\r\n C:= Component;\r\n While (C<>Nil) and (C.Name<>'') do\r\n begin\r\n If (Name<>'') Then\r\n Name:='.'+Name;\r\n if C.Owner = LookupRoot then\r\n begin\r\n Name := C.Name+Name;\r\n break;\r\n end\r\n else if C = LookupRoot then\r\n begin\r\n Name := 'Owner' + Name;\r\n break;\r\n end;\r\n Name:=C.Name + Name;\r\n C:= C.Owner;\r\n end;\r\n if (C=nil) and (Component.Owner=nil) then\r\n if (Name<>'') then //foreign root\r\n Name:=Name+'.Owner';\r\n if Length(Name) > 0 then\r\n begin\r\n Driver.BeginProperty(FPropPath + PropInfo.Name);\r\n WriteIdent(Name);\r\n Driver.EndProperty;\r\n end; // length Name>0\r\n end; //(ObjValue <> AncestorObj)\r\n end // ObjValue.InheritsFrom(TComponent)\r\n else\r\n begin\r\n SavedAncestor := Ancestor;\r\n SavedPropPath := FPropPath;\r\n try\r\n FPropPath := FPropPath + PropInfo.Name + '.';\r\n if HasAncestor then\r\n Ancestor := TPersistent(GetObjectProp(Ancestor, PropInfo));\r\n WriteProperties(TPersistent(ObjValue));\r\n finally\r\n Ancestor := SavedAncestor;\r\n FPropPath := SavedPropPath;\r\n end;\r\n if ObjValue.InheritsFrom(TCollection) then\r\n begin\r\n if (not HasAncestor) or (not CollectionsEqual(TCollection(ObjValue),\r\n TCollection(GetObjectProp(Ancestor, PropInfo)),root,rootancestor)) then\r\n begin\r\n Driver.BeginProperty(FPropPath + PropInfo.Name);\r\n SavedPropPath := FPropPath;\r\n try\r\n SetLength(FPropPath, 0);\r\n WriteCollection(TCollection(ObjValue));\r\n finally\r\n FPropPath := SavedPropPath;\r\n Driver.EndProperty;\r\n end;\r\n end;\r\n end // Tcollection\r\n end;\r\n end; // Inheritsfrom(TPersistent)\r\n end;\r\n{ tkInt64, tkQWord:\r\n begin\r\n Int64Value := GetInt64Prop(Instance, PropInfo);\r\n if HasAncestor then\r\n DefInt64Value := GetInt64Prop(Ancestor, PropInfo)\r\n else\r\n DefInt64Value := 0;\r\n if Int64Value <> DefInt64Value then\r\n begin\r\n Driver.BeginProperty(FPropPath + PPropInfo(PropInfo)^.Name);\r\n WriteInteger(Int64Value);\r\n Driver.EndProperty;\r\n end;\r\n end;}\r\n tkBool:\r\n begin\r\n BoolValue := GetOrdProp(Instance, PropInfo)<>0;\r\n if HasAncestor then\r\n DefBoolValue := GetOrdProp(Ancestor, PropInfo)<>0\r\n else\r\n begin\r\n DefBoolValue := PropInfo.Default<>0;\r\n DefValue:=Longint(PropInfo.Default);\r\n end;\r\n // writeln(PropInfo.Name, ', HasAncestor=', ord(HasAncestor), ', Value=', Value, ', Default=', DefBoolValue);\r\n if (BoolValue<>DefBoolValue) or (DefValue=longint($80000000)) then\r\n begin\r\n Driver.BeginProperty(FPropPath + PropInfo.Name);\r\n WriteBoolean(BoolValue);\r\n Driver.EndProperty;\r\n end;\r\n end;\r\n tkInterface:\r\n begin\r\n{ IntfValue := GetInterfaceProp(Instance, PropInfo);\r\n if Assigned(IntfValue) and Supports(IntfValue, IInterfaceComponentReference, CompRef) then\r\n begin\r\n Component := CompRef.GetComponent;\r\n if HasAncestor then\r\n begin\r\n AncestorObj := TObject(GetObjectProp(Ancestor, PropInfo));\r\n if (AncestorObj is TComponent) then\r\n begin\r\n //writeln('TWriter.WriteProperty AncestorObj=',TComponent(AncestorObj).Name,' OwnerFit=',TComponent(AncestorObj).Owner = FRootAncestor,' ',TComponent(ObjValue).Name,' OwnerFit=',TComponent(ObjValue).Owner = Root);\r\n if (AncestorObj<> Component) and\r\n (TComponent(AncestorObj).Owner = FRootAncestor) and\r\n (Component.Owner = Root) and\r\n (UpperCase(TComponent(AncestorObj).Name) = UpperCase(Component.Name)) then\r\n begin\r\n // different components, but with the same name\r\n // treat it like an override\r\n AncestorObj := Component;\r\n end;\r\n end;\r\n end else\r\n AncestorObj := nil;\r\n\r\n if not Assigned(Component) then\r\n begin\r\n if Component <> AncestorObj then\r\n begin\r\n Driver.BeginProperty(FPropPath + PropInfo.Name);\r\n Driver.WriteIdent('NIL');\r\n Driver.EndProperty;\r\n end\r\n end\r\n else if ((not (csSubComponent in Component.ComponentStyle))\r\n or ((Component.Owner<>Instance) and (Component.Owner<>Nil))) then\r\n begin\r\n if (Component <> AncestorObj)\r\n and not (csTransient in Component.ComponentStyle) then\r\n begin\r\n Name:= '';\r\n C:= Component;\r\n While (C<>Nil) and (C.Name<>'') do\r\n begin\r\n If (Name<>'') Then\r\n Name:='.'+Name;\r\n if C.Owner = LookupRoot then\r\n begin\r\n Name := C.Name+Name;\r\n break;\r\n end\r\n else if C = LookupRoot then\r\n begin\r\n Name := 'Owner' + Name;\r\n break;\r\n end;\r\n Name:=C.Name + Name;\r\n C:= C.Owner;\r\n end;\r\n if (C=nil) and (Component.Owner=nil) then\r\n if (Name<>'') then //foreign root\r\n Name:=Name+'.Owner';\r\n if Length(Name) > 0 then\r\n begin\r\n Driver.BeginProperty(FPropPath + PropInfo.Name);\r\n WriteIdent(Name);\r\n Driver.EndProperty;\r\n end; // length Name>0\r\n end; //(Component <> AncestorObj)\r\n end;\r\n end; //Assigned(IntfValue) and Supports(IntfValue,..\r\n //else write NIL ?\r\n} end;\r\n end;\r\nend;\r\n\r\nprocedure TWriter.WriteRootComponent(ARoot: TComponent);\r\nbegin\r\n WriteDescendent(ARoot, nil);\r\nend;\r\n\r\nprocedure TWriter.WriteString(const Value: String);\r\nbegin\r\n Driver.WriteString(Value);\r\nend;\r\n\r\nprocedure TWriter.WriteWideString(const Value: WideString);\r\nbegin\r\n Driver.WriteWideString(Value);\r\nend;\r\n\r\nprocedure TWriter.WriteUnicodeString(const Value: UnicodeString);\r\nbegin\r\n Driver.WriteUnicodeString(Value);\r\nend;\r\n\r\n{ TAbstractObjectWriter }\r\n\r\n\r\n{ ---------------------------------------------------------------------\r\n Global routines\r\n ---------------------------------------------------------------------}\r\nType\r\n TInitHandler = Class(TObject)\r\n AHandler : TInitComponentHandler;\r\n AClass : TComponentClass;\r\n end;\r\n\r\nvar\r\n ClassList : TJSObject;\r\n InitHandlerList : TList;\r\n FindGlobalComponentList : TFPList;\r\n\r\nProcedure RegisterClass(AClass : TPersistentClass);\r\n\r\nbegin\r\n ClassList[AClass.ClassName]:=AClass;\r\nend;\r\n\r\nProcedure RegisterClasses(AClasses : specialize TArray);\r\nvar\r\n AClass : TPersistentClass;\r\n\r\nbegin\r\n for AClass in AClasses do\r\n RegisterClass(AClass);\r\nend;\r\n\r\nFunction GetClass(AClassName : string) : TPersistentClass;\r\n\r\nbegin\r\n Result:=nil;\r\n if AClassName='' then exit;\r\n if not ClassList.hasOwnProperty(AClassName) then exit;\r\n Result:=TPersistentClass(ClassList[AClassName]);\r\nend;\r\n\r\n\r\nprocedure RegisterFindGlobalComponentProc(AFindGlobalComponent: TFindGlobalComponent);\r\n begin\r\n if not(assigned(FindGlobalComponentList)) then\r\n FindGlobalComponentList:=TFPList.Create;\r\n if FindGlobalComponentList.IndexOf(CodePointer(AFindGlobalComponent))<0 then\r\n FindGlobalComponentList.Add(CodePointer(AFindGlobalComponent));\r\n end;\r\n\r\n\r\nprocedure UnregisterFindGlobalComponentProc(AFindGlobalComponent: TFindGlobalComponent);\r\n begin\r\n if assigned(FindGlobalComponentList) then\r\n FindGlobalComponentList.Remove(CodePointer(AFindGlobalComponent));\r\n end;\r\n\r\n\r\nfunction FindGlobalComponent(const Name: string): TComponent;\r\n\r\nvar\r\n i : sizeint;\r\nbegin\r\n Result:=nil;\r\n if assigned(FindGlobalComponentList) then\r\n begin\r\n for i:=FindGlobalComponentList.Count-1 downto 0 do\r\n \tbegin\r\n \t FindGlobalComponent:=TFindGlobalComponent(FindGlobalComponentList[i])(name);\r\n \t if assigned(Result) then\r\n \t break;\r\n \tend;\r\n end;\r\nend;\r\n\r\nFunction FindNestedComponent(Root : TComponent; APath : String; CStyle : Boolean = True) : TComponent;\r\n\r\n Function GetNextName : String; {$ifdef CLASSESINLINE} inline; {$endif CLASSESINLINE}\r\n\r\n Var\r\n P : Integer;\r\n CM : Boolean;\r\n\r\n begin\r\n P:=Pos('.',APath);\r\n CM:=False;\r\n If (P=0) then\r\n begin\r\n If CStyle then\r\n begin\r\n P:=Pos('->',APath);\r\n CM:=P<>0;\r\n end;\r\n If (P=0) Then\r\n P:=Length(APath)+1;\r\n end;\r\n Result:=Copy(APath,1,P-1);\r\n Delete(APath,1,P+Ord(CM));\r\n end;\r\n\r\nVar\r\n C : TComponent;\r\n S : String;\r\nbegin\r\n If (APath='') then\r\n Result:=Nil\r\n else\r\n begin\r\n Result:=Root;\r\n While (APath<>'') And (Result<>Nil) do\r\n begin\r\n C:=Result;\r\n S:=Uppercase(GetNextName);\r\n Result:=C.FindComponent(S);\r\n If (Result=Nil) And (S='OWNER') then\r\n Result:=C;\r\n end;\r\n end;\r\nend;\r\n\r\nfunction InitInheritedComponent(Instance: TComponent; RootAncestor: TClass): Boolean;\r\nVar\r\n I : Integer;\r\nbegin\r\n I:=0;\r\n if not Assigned(InitHandlerList) then begin\r\n Result := True;\r\n Exit;\r\n end;\r\n Result:=False;\r\n With InitHandlerList do\r\n begin\r\n I:=0;\r\n // Instance is the normally the lowest one, so that one should be used when searching.\r\n While Not result and (I= 32) and (w < 127) then\r\n begin //printable ascii or bytes\r\n if not InString then\r\n NewInString := True;\r\n NewStr := TJSString.FromCharCode(w);\r\n end\r\n else\r\n begin //ascii control chars, non ascii\r\n if InString then\r\n NewInString := False;\r\n NewStr := '#' + IntToStr(w);\r\n end;\r\n if NewInString <> InString then\r\n begin\r\n NewStr := '''' + NewStr;\r\n InString := NewInString;\r\n end;\r\n res := res + NewStr;\r\n Inc(i);\r\n end;\r\n if InString then\r\n res := res + '''';\r\n end;\r\n OutStr(res);\r\nend;\r\n\r\n\r\nprocedure TObjectStreamConverter.OutString(s: String);\r\nbegin\r\n OutChars(S);\r\nend;\r\n\r\n\r\n(*\r\nprocedure TObjectStreamConverter.OutUtf8Str(s: String);\r\nbegin\r\n if Encoding=oteLFM then\r\n OutChars(Pointer(S),PChar(S)+Length(S),@CharToOrd)\r\n else\r\n OutChars(Pointer(S),PChar(S)+Length(S),@Utf8ToOrd);\r\nend;\r\n*)\r\n\r\nfunction TObjectStreamConverter.ReadWord : word; {$ifdef CLASSESINLINE}inline;{$endif CLASSESINLINE}\r\nbegin\r\n Input.ReadBufferData(Result);\r\nend;\r\n\r\nfunction TObjectStreamConverter.ReadDWord : longword; {$ifdef CLASSESINLINE}inline;{$endif CLASSESINLINE}\r\nbegin\r\n Input.ReadBufferData(Result);\r\nend;\r\n\r\nfunction TObjectStreamConverter.ReadNativeInt : NativeInt; {$ifdef CLASSESINLINE}inline;{$endif CLASSESINLINE}\r\nbegin\r\n Input.ReadBufferData(Result);\r\nend;\r\n\r\nfunction TObjectStreamConverter.ReadInt(ValueType: TValueType): NativeInt;\r\nbegin\r\n case ValueType of\r\n vaInt8: Result := ShortInt(Input.ReadByte);\r\n vaInt16: Result := SmallInt(ReadWord);\r\n vaInt32: Result := LongInt(ReadDWord);\r\n vaNativeInt: Result := ReadNativeInt;\r\n end;\r\nend;\r\n\r\nfunction TObjectStreamConverter.ReadInt: NativeInt;\r\nbegin\r\n Result := ReadInt(TValueType(Input.ReadByte));\r\nend;\r\n\r\n\r\nfunction TObjectStreamConverter.ReadDouble : Double;\r\n\r\nbegin\r\n Input.ReadBufferData(Result);\r\nend;\r\n\r\nfunction TObjectStreamConverter.ReadStr: String;\r\n\r\nvar\r\n l,i: Byte;\r\n c : Char;\r\n\r\nbegin\r\n Input.ReadBufferData(L);\r\n SetLength(Result,L);\r\n For I:=1 to L do\r\n begin\r\n Input.ReadBufferData(C);\r\n Result[i]:=C;\r\n end;\r\nend;\r\n\r\nfunction TObjectStreamConverter.ReadString(StringType: TValueType): String;\r\n\r\nvar\r\n i: Integer;\r\n C : Char;\r\n\r\nbegin\r\n Result:='';\r\n if StringType<>vaString then\r\n Raise EFilerError.Create('Invalid string type passed to ReadString');\r\n i:=ReadDWord;\r\n SetLength(Result, i);\r\n for I:=1 to Length(Result) do\r\n begin\r\n Input.ReadbufferData(C);\r\n Result[i]:=C;\r\n end;\r\nend;\r\n\r\nprocedure TObjectStreamConverter.ProcessBinary;\r\n\r\nvar\r\n ToDo, DoNow, i: LongInt;\r\n lbuf: TBytes;\r\n s: String;\r\n\r\nbegin\r\n ToDo := ReadDWord;\r\n SetLength(lBuf,32);\r\n OutLn('{');\r\n while ToDo > 0 do\r\n begin\r\n DoNow := ToDo;\r\n if DoNow > 32 then\r\n DoNow := 32;\r\n Dec(ToDo, DoNow);\r\n s := Indent + ' ';\r\n Input.ReadBuffer(lbuf, DoNow);\r\n for i := 0 to DoNow - 1 do\r\n s := s + IntToHex(lbuf[i], 2);\r\n OutLn(s);\r\n end;\r\n OutLn(indent + '}');\r\nend;\r\n\r\nprocedure TObjectStreamConverter.ProcessValue(ValueType: TValueType; Indent: String);\r\n\r\n\r\nvar\r\n s: String;\r\n{ len: LongInt; }\r\n IsFirst: Boolean;\r\n{$ifndef FPUNONE}\r\n ext: Extended;\r\n{$endif}\r\n\r\nbegin\r\n case ValueType of\r\n vaList: begin\r\n OutStr('(');\r\n IsFirst := True;\r\n while True do begin\r\n ValueType := TValueType(Input.ReadByte);\r\n if ValueType = vaNull then break;\r\n if IsFirst then begin\r\n OutLn('');\r\n IsFirst := False;\r\n end;\r\n OutStr(Indent + ' ');\r\n ProcessValue(ValueType, Indent + ' ');\r\n end;\r\n OutLn(Indent + ')');\r\n end;\r\n vaInt8: OutLn(IntToStr(ShortInt(Input.ReadByte)));\r\n vaInt16: OutLn( IntToStr(SmallInt(ReadWord)));\r\n vaInt32: OutLn(IntToStr(LongInt(ReadDWord)));\r\n vaNativeInt: OutLn(IntToStr(ReadNativeInt));\r\n vaDouble: begin\r\n ext:=ReadDouble;\r\n Str(ext,S);// Do not use localized strings.\r\n OutLn(S);\r\n end;\r\n vaString: begin\r\n if PlainStrings then\r\n OutStr( ''''+StringReplace(ReadString(vaString),'''','''''',[rfReplaceAll])+'''')\r\n else\r\n OutString(ReadString(vaString) {''''+StringReplace(ReadString(vaString),'''','''''',[rfReplaceAll])+''''});\r\n OutLn('');\r\n end;\r\n vaIdent: OutLn(ReadStr);\r\n vaFalse: OutLn('False');\r\n vaTrue: OutLn('True');\r\n vaBinary: ProcessBinary;\r\n vaSet: begin\r\n OutStr('[');\r\n IsFirst := True;\r\n while True do begin\r\n s := ReadStr;\r\n if Length(s) = 0 then break;\r\n if not IsFirst then OutStr(', ');\r\n IsFirst := False;\r\n OutStr(s);\r\n end;\r\n OutLn(']');\r\n end;\r\n vaNil:\r\n OutLn('nil');\r\n vaCollection: begin\r\n OutStr('<');\r\n while Input.ReadByte <> 0 do begin\r\n OutLn(Indent);\r\n Input.Seek(-1, soCurrent);\r\n OutStr(indent + ' item');\r\n ValueType := TValueType(Input.ReadByte);\r\n if ValueType <> vaList then\r\n OutStr('[' + IntToStr(ReadInt(ValueType)) + ']');\r\n OutLn('');\r\n ReadPropList(indent + ' ');\r\n OutStr(indent + ' end');\r\n end;\r\n OutLn('>');\r\n end;\r\n {vaSingle: begin OutLn('!!Single!!'); exit end;\r\n vaCurrency: begin OutLn('!!Currency!!'); exit end;\r\n vaDate: begin OutLn('!!Date!!'); exit end;}\r\n else\r\n Raise EReadError.CreateFmt(SErrInvalidPropertyType,[Ord(ValueType)]);\r\n end;\r\nend;\r\n\r\n\r\nprocedure TObjectStreamConverter.ReadPropList(indent: String);\r\n\r\n\r\nbegin\r\n while Input.ReadByte <> 0 do begin\r\n Input.Seek(-1, soCurrent);\r\n OutStr(indent + ReadStr + ' = ');\r\n ProcessValue(TValueType(Input.ReadByte), Indent);\r\n end;\r\nend;\r\n\r\nprocedure TObjectStreamConverter.ReadObject(indent: String);\r\n\r\nvar\r\n b: Byte;\r\n ObjClassName, ObjName: String;\r\n ChildPos: LongInt;\r\n\r\nbegin\r\n // Check for FilerFlags\r\n b := Input.ReadByte;\r\n if (b and $f0) = $f0 then begin\r\n if (b and 2) <> 0 then ChildPos := ReadInt;\r\n end else begin\r\n b := 0;\r\n Input.Seek(-1, soCurrent);\r\n end;\r\n\r\n ObjClassName := ReadStr;\r\n ObjName := ReadStr;\r\n\r\n OutStr(Indent);\r\n if (b and 1) <> 0 then OutStr('inherited')\r\n else\r\n if (b and 4) <> 0 then OutStr('inline')\r\n else OutStr('object');\r\n OutStr(' ');\r\n if ObjName <> '' then\r\n OutStr(ObjName + ': ');\r\n OutStr(ObjClassName);\r\n if (b and 2) <> 0 then OutStr('[' + IntToStr(ChildPos) + ']');\r\n OutLn('');\r\n\r\n ReadPropList(indent + ' ');\r\n\r\n while Input.ReadByte <> 0 do begin\r\n Input.Seek(-1, soCurrent);\r\n ReadObject(indent + ' ');\r\n end;\r\n OutLn(indent + 'end');\r\nend;\r\n\r\nprocedure TObjectStreamConverter.ObjectBinaryToText(aInput, aOutput: TStream; aEncoding: TObjectTextEncoding);\r\n\r\nbegin\r\n FInput:=aInput;\r\n FOutput:=aOutput;\r\n FEncoding:=aEncoding;\r\n Execute;\r\nend;\r\n\r\nprocedure TObjectStreamConverter.Execute;\r\n\r\nvar\r\n Signature: LongInt;\r\n\r\nbegin\r\n if FIndent = '' then FInDent:=' ';\r\n If Not Assigned(Input) then\r\n raise EReadError.Create('Missing input stream');\r\n If Not Assigned(Output) then\r\n raise EReadError.Create('Missing output stream');\r\n FInput.ReadBufferData(Signature);\r\n if Signature <> FilerSignatureInt then\r\n raise EReadError.Create(SInvalidImage);\r\n ReadObject('');\r\nend;\r\n\r\nprocedure TObjectStreamConverter.ObjectBinaryToText(aInput, aOutput: TStream);\r\nbegin\r\n ObjectBinaryToText(aInput,aOutput,oteDFM);\r\nend;\r\n\r\n{\r\n This file is part of the Free Component Library (FCL)\r\n Copyright (c) 1999-2007 by the Free Pascal development team\r\n\r\n See the file COPYING.FPC, included in this distribution,\r\n for details about the copyright.\r\n\r\n This program is distributed in the hope that it will be useful,\r\n but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\r\n\r\n **********************************************************************}\r\n\r\n{****************************************************************************}\r\n{* TParser *}\r\n{****************************************************************************}\r\n\r\nconst\r\n{$ifdef CPU16}\r\n { Avoid too big local stack use for\r\n MSDOS tiny memory model that uses less than 4096\r\n bytes for total stack by default. }\r\n ParseBufSize = 512;\r\n{$else not CPU16}\r\n ParseBufSize = 4096;\r\n{$endif not CPU16}\r\n\r\n TokNames : array[TParserToken] of string = (\r\n '?',\r\n 'EOF',\r\n 'Symbol',\r\n 'String',\r\n 'Integer',\r\n 'Float',\r\n '-',\r\n '[',\r\n '(',\r\n '<',\r\n '{',\r\n ']',\r\n ')',\r\n '>',\r\n '}',\r\n ',',\r\n '.',\r\n '=',\r\n ':',\r\n '+'\r\n );\r\n\r\nfunction TParser.GetTokenName(aTok: TParserToken): string;\r\nbegin\r\n Result:=TokNames[aTok]\r\nend;\r\n\r\nprocedure TParser.LoadBuffer;\r\n\r\nvar\r\n CharsRead,i: integer;\r\n\r\nbegin\r\n CharsRead:=0;\r\n for I:=0 to ParseBufSize-1 do\r\n begin\r\n if FStream.ReadData(FBuf[i])<>2 then\r\n Break;\r\n Inc(CharsRead);\r\n end;\r\n Inc(FDeltaPos, CharsRead);\r\n FPos := 0;\r\n FBufLen := CharsRead;\r\n FEofReached:=CharsRead = 0;\r\nend;\r\n\r\nprocedure TParser.CheckLoadBuffer; {$ifdef CLASSESINLINE} inline; {$endif CLASSESINLINE}\r\nbegin\r\n if fPos>=FBufLen then\r\n LoadBuffer;\r\nend;\r\n\r\nprocedure TParser.ProcessChar; {$ifdef CLASSESINLINE} inline; {$endif CLASSESINLINE}\r\nbegin\r\n fLastTokenStr:=fLastTokenStr+fBuf[fPos];\r\n\r\n GotoToNextChar;\r\nend;\r\n\r\nfunction TParser.IsNumber: boolean; {$ifdef CLASSESINLINE} inline; {$endif CLASSESINLINE}\r\nbegin\r\n Result:=fBuf[fPos] in ['0'..'9'];\r\nend;\r\n\r\nfunction TParser.IsHexNum: boolean; {$ifdef CLASSESINLINE} inline; {$endif CLASSESINLINE}\r\nbegin\r\n Result:=fBuf[fPos] in ['0'..'9','A'..'F','a'..'f'];\r\nend;\r\n\r\nfunction TParser.IsAlpha: boolean; {$ifdef CLASSESINLINE} inline; {$endif CLASSESINLINE}\r\nbegin\r\n Result:=fBuf[fPos] in ['_','A'..'Z','a'..'z'];\r\nend;\r\n\r\nfunction TParser.IsAlphaNum: boolean; {$ifdef CLASSESINLINE} inline; {$endif CLASSESINLINE}\r\nbegin\r\n Result:=IsAlpha or IsNumber;\r\nend;\r\n\r\nfunction TParser.GetHexValue(c: char): byte; {$ifdef CLASSESINLINE} inline; {$endif CLASSESINLINE}\r\nbegin\r\n case c of\r\n '0'..'9' : Result:=ord(c)-$30;\r\n 'A'..'F' : Result:=ord(c)-$37; //-$41+$0A\r\n 'a'..'f' : Result:=ord(c)-$57; //-$61+$0A\r\n end;\r\nend;\r\n\r\nfunction TParser.GetAlphaNum: string;\r\nbegin\r\n if not IsAlpha then\r\n ErrorFmt(SParserExpected,[GetTokenName(toSymbol)]);\r\n Result:='';\r\n while (not fEofReached) and IsAlphaNum do\r\n begin\r\n Result:=Result+fBuf[fPos];\r\n GotoToNextChar;\r\n end;\r\nend;\r\n\r\nprocedure TParser.HandleNewLine;\r\nbegin\r\n if fBuf[fPos]=#13 then //CR\r\n GotoToNextChar;\r\n\r\n if (not fEOFReached) and (fBuf[fPos]=#10) then //LF\r\n GotoToNextChar;\r\n\r\n inc(fSourceLine);\r\n fDeltaPos:=-(fPos-1);\r\nend;\r\n\r\nprocedure TParser.SkipBOM;\r\n\r\nbegin\r\n // No BOM support\r\nend;\r\n\r\nprocedure TParser.SkipSpaces;\r\nbegin\r\n while not FEofReached and (fBuf[fPos] in [' ',#9]) do GotoToNextChar;\r\nend;\r\n\r\nprocedure TParser.SkipWhitespace;\r\nbegin\r\n while not FEofReached do\r\n begin\r\n case fBuf[fPos] of\r\n ' ',#9 : SkipSpaces;\r\n #10,#13 : HandleNewLine\r\n else break;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TParser.HandleEof;\r\nbegin\r\n fToken:=toEOF;\r\n fLastTokenStr:='';\r\nend;\r\n\r\nprocedure TParser.HandleAlphaNum;\r\nbegin\r\n fLastTokenStr:=GetAlphaNum;\r\n fToken:=toSymbol;\r\nend;\r\n\r\nprocedure TParser.HandleNumber;\r\ntype\r\n floatPunct = (fpDot,fpE);\r\n floatPuncts = set of floatPunct;\r\nvar\r\n allowed : floatPuncts;\r\nbegin\r\n fLastTokenStr:='';\r\n while IsNumber do\r\n ProcessChar;\r\n fToken:=toInteger;\r\n if (fBuf[fPos] in ['.','e','E']) then\r\n begin\r\n fToken:=toFloat;\r\n allowed:=[fpDot,fpE];\r\n while (fBuf[fPos] in ['.','e','E','0'..'9']) do\r\n begin\r\n case fBuf[fPos] of\r\n '.' : if fpDot in allowed then Exclude(allowed,fpDot) else break;\r\n 'E','e' : if fpE in allowed then\r\n begin\r\n allowed:=[];\r\n ProcessChar;\r\n if (fBuf[fPos] in ['+','-']) then ProcessChar;\r\n if not (fBuf[fPos] in ['0'..'9']) then\r\n ErrorFmt(SParserInvalidFloat,[fLastTokenStr+fBuf[fPos]]);\r\n end\r\n else break;\r\n end;\r\n ProcessChar;\r\n end;\r\n end;\r\n if (fBuf[fPos] in ['s','S','d','D','c','C']) then //single, date, currency\r\n begin\r\n fFloatType:=fBuf[fPos];\r\n\r\n GotoToNextChar;\r\n\r\n fToken:=toFloat;\r\n end\r\n else fFloatType:=#0;\r\nend;\r\n\r\nprocedure TParser.HandleHexNumber;\r\nvar valid : boolean;\r\nbegin\r\n fLastTokenStr:='$';\r\n GotoToNextChar;\r\n valid:=false;\r\n while IsHexNum do\r\n begin\r\n valid:=true;\r\n ProcessChar;\r\n end;\r\n if not valid then\r\n ErrorFmt(SParserInvalidInteger,[fLastTokenStr]);\r\n fToken:=toInteger;\r\nend;\r\n\r\nfunction TParser.HandleQuotedString: string;\r\nbegin\r\n Result:='';\r\n GotoToNextChar;\r\n\r\n while true do\r\n begin\r\n case fBuf[fPos] of\r\n #0 : ErrorStr(SParserUnterminatedString);\r\n #13,#10 : ErrorStr(SParserUnterminatedString);\r\n '''' : begin\r\n GotoToNextChar;\r\n if fBuf[fPos]<>'''' then exit;\r\n end;\r\n end;\r\n Result:=Result+fBuf[fPos];\r\n GotoToNextChar;\r\n end;\r\nend;\r\n\r\nFunction TParser.HandleDecimalCharacter : Char;\r\n\r\nvar\r\n i : integer;\r\n\r\nbegin\r\n GotoToNextChar;\r\n // read a word number\r\n i:=0;\r\n while IsNumber and (ihigh(word) then i:=0;\r\n Result:=Char(i);\r\nend;\r\n\r\nprocedure TParser.HandleString;\r\n\r\nvar\r\n s: string;\r\n\r\nbegin\r\n fLastTokenStr:='';\r\n while true do\r\n begin\r\n case fBuf[fPos] of\r\n '''' :\r\n begin\r\n s:=HandleQuotedString;\r\n fLastTokenStr:=fLastTokenStr+s;\r\n end;\r\n '#' :\r\n begin\r\n fLastTokenStr:=fLastTokenStr+HandleDecimalCharacter;\r\n end;\r\n else break;\r\n end;\r\n end;\r\n fToken:=Classes.toString\r\nend;\r\n\r\nprocedure TParser.HandleMinus;\r\nbegin\r\n GotoToNextChar;\r\n if IsNumber then\r\n begin\r\n HandleNumber;\r\n fLastTokenStr:='-'+fLastTokenStr;\r\n end\r\n else\r\n begin\r\n fToken:=toMinus;\r\n fLastTokenStr:='-';\r\n end;\r\nend;\r\n\r\nprocedure TParser.HandleUnknown;\r\nbegin\r\n fToken:=toUnknown;\r\n fLastTokenStr:=fBuf[fPos];\r\n GotoToNextChar;\r\nend;\r\n\r\nconstructor TParser.Create(Stream: TStream);\r\nbegin\r\n fStream:=Stream;\r\n SetLength(fBuf,ParseBufSize);\r\n fBufLen:=0;\r\n fPos:=0;\r\n fDeltaPos:=1;\r\n fSourceLine:=1;\r\n fEofReached:=false;\r\n fLastTokenStr:='';\r\n fFloatType:=#0;\r\n fToken:=toEOF;\r\n LoadBuffer;\r\n SkipBom;\r\n NextToken;\r\nend;\r\n\r\nprocedure TParser.GotoToNextChar;\r\nbegin\r\n Inc(FPos);\r\n\r\n CheckLoadBuffer;\r\nend;\r\n\r\ndestructor TParser.Destroy;\r\n\r\nVar\r\n aCount : Integer;\r\n\r\nbegin\r\n aCount:=Length(fLastTokenStr)*2;\r\n fStream.Position:=SourcePos-aCount;\r\nend;\r\n\r\nprocedure TParser.CheckToken(T: tParserToken);\r\nbegin\r\n if fToken<>T then\r\n ErrorFmt(SParserWrongTokenType,[GetTokenName(T),GetTokenName(fToken)]);\r\nend;\r\n\r\nprocedure TParser.CheckTokenSymbol(const S: string);\r\nbegin\r\n CheckToken(toSymbol);\r\n if CompareText(fLastTokenStr,S)<>0 then\r\n ErrorFmt(SParserWrongTokenSymbol,[s,fLastTokenStr]);\r\nend;\r\n\r\nprocedure TParser.Error(const Ident: string);\r\nbegin\r\n ErrorStr(Ident);\r\nend;\r\n\r\nprocedure TParser.ErrorFmt(const Ident: string; const Args: array of const);\r\nbegin\r\n ErrorStr(Format(Ident,Args));\r\nend;\r\n\r\nprocedure TParser.ErrorStr(const Message: string);\r\nbegin\r\n raise EParserError.CreateFmt(Message+SParserLocInfo,[SourceLine,fPos+fDeltaPos,SourcePos]);\r\nend;\r\n\r\nprocedure TParser.HexToBinary(Stream: TStream);\r\n\r\nvar\r\n outbuf : TBytes;\r\n b : byte;\r\n i : integer;\r\n\r\nbegin\r\n SetLength(OutBuf,ParseBufSize);\r\n i:=0;\r\n SkipWhitespace;\r\n while IsHexNum do\r\n begin\r\n b:=(GetHexValue(fBuf[fPos]) shl 4);\r\n GotoToNextChar;\r\n if not IsHexNum then\r\n Error(SParserUnterminatedBinValue);\r\n b:=b or GetHexValue(fBuf[fPos]);\r\n GotoToNextChar;\r\n outbuf[i]:=b;\r\n inc(i);\r\n if i>=ParseBufSize then\r\n begin\r\n Stream.WriteBuffer(outbuf,i);\r\n i:=0;\r\n end;\r\n SkipWhitespace;\r\n end;\r\n if i>0 then\r\n Stream.WriteBuffer(outbuf,i);\r\n NextToken;\r\nend;\r\n\r\nfunction TParser.NextToken: TParserToken;\r\n\r\n Procedure SetToken(aToken : TParserToken);\r\n begin\r\n FToken:=aToken;\r\n GotoToNextChar;\r\n end;\r\n\r\nbegin\r\n SkipWhiteSpace;\r\n if fEofReached then\r\n HandleEof\r\n else\r\n case fBuf[fPos] of\r\n '_','A'..'Z','a'..'z' : HandleAlphaNum;\r\n '$' : HandleHexNumber;\r\n '-' : HandleMinus;\r\n '0'..'9' : HandleNumber;\r\n '''','#' : HandleString;\r\n '[' : SetToken(toSetStart);\r\n '(' : SetToken(toListStart);\r\n '<' : SetToken(toCollectionStart);\r\n '{' : SetToken(toBinaryStart);\r\n ']' : SetToken(toSetEnd);\r\n ')' : SetToken(toListEnd);\r\n '>' : SetToken(toCollectionEnd);\r\n '}' : SetToken(toBinaryEnd);\r\n ',' : SetToken(toComma);\r\n '.' : SetToken(toDot);\r\n '=' : SetToken(toEqual);\r\n ':' : SetToken(toColon);\r\n '+' : SetToken(toPlus);\r\n else\r\n HandleUnknown;\r\n end;\r\n Result:=fToken;\r\nend;\r\n\r\nfunction TParser.SourcePos: Longint;\r\nbegin\r\n Result:=fStream.Position-fBufLen+fPos;\r\nend;\r\n\r\nfunction TParser.TokenComponentIdent: string;\r\nbegin\r\n if fToken<>toSymbol then\r\n ErrorFmt(SParserExpected,[GetTokenName(toSymbol)]);\r\n CheckLoadBuffer;\r\n while fBuf[fPos]='.' do\r\n begin\r\n ProcessChar;\r\n fLastTokenStr:=fLastTokenStr+GetAlphaNum;\r\n end;\r\n Result:=fLastTokenStr;\r\nend;\r\n\r\nFunction TParser.TokenFloat: double;\r\n\r\nvar\r\n errcode : integer;\r\n\r\nbegin\r\n Val(fLastTokenStr,Result,errcode);\r\n if errcode<>0 then\r\n ErrorFmt(SParserInvalidFloat,[fLastTokenStr]);\r\nend;\r\n\r\nFunction TParser.TokenInt: NativeInt;\r\nbegin\r\n if not TryStrToInt64(fLastTokenStr,Result) then\r\n Result:=StrToQWord(fLastTokenStr); //second chance for malformed files\r\nend;\r\n\r\nfunction TParser.TokenString: string;\r\nbegin\r\n case fToken of\r\n toFloat : if fFloatType<>#0 then\r\n Result:=fLastTokenStr+fFloatType\r\n else Result:=fLastTokenStr;\r\n else\r\n Result:=fLastTokenStr;\r\n end;\r\nend;\r\n\r\n\r\nfunction TParser.TokenSymbolIs(const S: string): Boolean;\r\nbegin\r\n Result:=(fToken=toSymbol) and (CompareText(fLastTokenStr,S)=0);\r\nend;\r\n\r\n\r\nprocedure TObjectTextConverter.WriteWord(w : word); {$ifdef CLASSESINLINE}inline;{$endif CLASSESINLINE}\r\nbegin\r\n Output.WriteBufferData(w);\r\nend;\r\n\r\nprocedure TObjectTextConverter.WriteDWord(lw : longword); {$ifdef CLASSESINLINE}inline;{$endif CLASSESINLINE}\r\nbegin\r\n Output.WriteBufferData(lw);\r\nend;\r\n\r\nprocedure TObjectTextConverter.WriteQWord(q : NativeInt); {$ifdef CLASSESINLINE}inline;{$endif CLASSESINLINE}\r\nbegin\r\n Output.WriteBufferData(q);\r\nend;\r\n\r\nprocedure TObjectTextConverter.WriteDouble(e : double);\r\nbegin\r\n Output.WriteBufferData(e);\r\nend;\r\n\r\nprocedure TObjectTextConverter.WriteString(s: String);\r\n\r\nvar\r\n i,size : byte;\r\n\r\nbegin\r\n if length(s)>255 then\r\n size:=255\r\n else\r\n size:=length(s);\r\n Output.WriteByte(size);\r\n For I:=1 to Length(S) do\r\n Output.WriteBufferData(s[i]);\r\nend;\r\n\r\nprocedure TObjectTextConverter.WriteWString(Const s: WideString);\r\n\r\nvar\r\n i : Integer;\r\nbegin\r\n WriteDWord(Length(s));\r\n For I:=1 to Length(S) do\r\n Output.WriteBufferData(s[i]);\r\nend;\r\n\r\nprocedure TObjectTextConverter.WriteInteger(value: NativeInt);\r\n\r\nbegin\r\n if (value >= -128) and (value <= 127) then begin\r\n Output.WriteByte(Ord(vaInt8));\r\n Output.WriteByte(byte(value));\r\n end else if (value >= -32768) and (value <= 32767) then begin\r\n Output.WriteByte(Ord(vaInt16));\r\n WriteWord(word(value));\r\n end else if (value >= -2147483648) and (value <= 2147483647) then begin\r\n Output.WriteByte(Ord(vaInt32));\r\n WriteDWord(longword(value));\r\n end else begin\r\n Output.WriteByte(ord(vaInt64));\r\n WriteQWord(NativeUInt(value));\r\n end;\r\nend;\r\n\r\nprocedure TObjectTextConverter.ProcessWideString(const left : string);\r\n\r\nvar\r\n ws : string;\r\nbegin\r\n ws:=left+parser.TokenString;\r\n while parser.NextToken = toPlus do\r\n begin\r\n parser.NextToken; // Get next string fragment\r\n if not (parser.Token=Classes.toString) then\r\n parser.CheckToken(Classes.toString);\r\n ws:=ws+parser.TokenString;\r\n end;\r\n Output.WriteByte(Ord(vaWstring));\r\n WriteWString(ws);\r\nend;\r\n\r\n\r\nprocedure TObjectTextConverter.ProcessValue;\r\nvar\r\n flt: double;\r\n stream: TBytesStream;\r\nbegin\r\n case parser.Token of\r\n toInteger:\r\n begin\r\n WriteInteger(parser.TokenInt);\r\n parser.NextToken;\r\n end;\r\n toFloat:\r\n begin\r\n Output.WriteByte(Ord(vaExtended));\r\n flt := Parser.TokenFloat;\r\n WriteDouble(flt);\r\n parser.NextToken;\r\n end;\r\n classes.toString:\r\n ProcessWideString('');\r\n toSymbol:\r\n begin\r\n if CompareText(parser.TokenString, 'True') = 0 then\r\n Output.WriteByte(Ord(vaTrue))\r\n else if CompareText(parser.TokenString, 'False') = 0 then\r\n Output.WriteByte(Ord(vaFalse))\r\n else if CompareText(parser.TokenString, 'nil') = 0 then\r\n Output.WriteByte(Ord(vaNil))\r\n else\r\n begin\r\n Output.WriteByte(Ord(vaIdent));\r\n WriteString(parser.TokenComponentIdent);\r\n end;\r\n Parser.NextToken;\r\n end;\r\n // Set\r\n toSetStart:\r\n begin\r\n parser.NextToken;\r\n Output.WriteByte(Ord(vaSet));\r\n if parser.Token <> toSetEnd then\r\n while True do\r\n begin\r\n parser.CheckToken(toSymbol);\r\n WriteString(parser.TokenString);\r\n parser.NextToken;\r\n if parser.Token = toSetEnd then\r\n break;\r\n parser.CheckToken(toComma);\r\n parser.NextToken;\r\n end;\r\n Output.WriteByte(0);\r\n parser.NextToken;\r\n end;\r\n // List\r\n toListStart:\r\n begin\r\n parser.NextToken;\r\n Output.WriteByte(Ord(vaList));\r\n while parser.Token <> toListEnd do\r\n ProcessValue;\r\n Output.WriteByte(0);\r\n parser.NextToken;\r\n end;\r\n // Collection\r\n toCollectionStart:\r\n begin\r\n parser.NextToken;\r\n Output.WriteByte(Ord(vaCollection));\r\n while parser.Token <> toCollectionEnd do\r\n begin\r\n parser.CheckTokenSymbol('item');\r\n parser.NextToken;\r\n // ConvertOrder\r\n Output.WriteByte(Ord(vaList));\r\n while not parser.TokenSymbolIs('end') do\r\n ProcessProperty;\r\n parser.NextToken; // Skip 'end'\r\n Output.WriteByte(0);\r\n end;\r\n Output.WriteByte(0);\r\n parser.NextToken;\r\n end;\r\n // Binary data\r\n toBinaryStart:\r\n begin\r\n Output.WriteByte(Ord(vaBinary));\r\n stream := TBytesStream.Create;\r\n try\r\n parser.HexToBinary(stream);\r\n WriteDWord(stream.Size);\r\n Output.WriteBuffer(Stream.Bytes,Stream.Size);\r\n finally\r\n stream.Free;\r\n end;\r\n parser.NextToken;\r\n end;\r\n else\r\n parser.Error(SParserInvalidProperty);\r\n end;\r\nend;\r\n\r\nprocedure TObjectTextConverter.ProcessProperty;\r\nvar\r\n name: String;\r\nbegin\r\n // Get name of property\r\n parser.CheckToken(toSymbol);\r\n name := parser.TokenString;\r\n while True do begin\r\n parser.NextToken;\r\n if parser.Token <> toDot then break;\r\n parser.NextToken;\r\n parser.CheckToken(toSymbol);\r\n name := name + '.' + parser.TokenString;\r\n end;\r\n WriteString(name);\r\n parser.CheckToken(toEqual);\r\n parser.NextToken;\r\n ProcessValue;\r\nend;\r\n\r\nprocedure TObjectTextConverter.ProcessObject;\r\nvar\r\n Flags: Byte;\r\n ObjectName, ObjectType: String;\r\n ChildPos: Integer;\r\nbegin\r\n if parser.TokenSymbolIs('OBJECT') then\r\n Flags :=0 { IsInherited := False }\r\n else begin\r\n if parser.TokenSymbolIs('INHERITED') then\r\n Flags := 1 { IsInherited := True; }\r\n else begin\r\n parser.CheckTokenSymbol('INLINE');\r\n Flags := 4;\r\n end;\r\n end;\r\n parser.NextToken;\r\n parser.CheckToken(toSymbol);\r\n ObjectName := '';\r\n ObjectType := parser.TokenString;\r\n parser.NextToken;\r\n if parser.Token = toColon then begin\r\n parser.NextToken;\r\n parser.CheckToken(toSymbol);\r\n ObjectName := ObjectType;\r\n ObjectType := parser.TokenString;\r\n parser.NextToken;\r\n if parser.Token = toSetStart then begin\r\n parser.NextToken;\r\n ChildPos := parser.TokenInt;\r\n parser.NextToken;\r\n parser.CheckToken(toSetEnd);\r\n parser.NextToken;\r\n Flags := Flags or 2;\r\n end;\r\n end;\r\n if Flags <> 0 then begin\r\n Output.WriteByte($f0 or Flags);\r\n if (Flags and 2) <> 0 then\r\n WriteInteger(ChildPos);\r\n end;\r\n WriteString(ObjectType);\r\n WriteString(ObjectName);\r\n\r\n // Convert property list\r\n while not (parser.TokenSymbolIs('END') or\r\n parser.TokenSymbolIs('OBJECT') or\r\n parser.TokenSymbolIs('INHERITED') or\r\n parser.TokenSymbolIs('INLINE')) do\r\n ProcessProperty;\r\n Output.WriteByte(0); // Terminate property list\r\n\r\n // Convert child objects\r\n while not parser.TokenSymbolIs('END') do ProcessObject;\r\n parser.NextToken; // Skip end token\r\n Output.WriteByte(0); // Terminate property list\r\nend;\r\n\r\nprocedure TObjectTextConverter.ObjectTextToBinary(aInput, aOutput: TStream);\r\n\r\nbegin\r\n FinPut:=aInput;\r\n FOutput:=aOutput;\r\n Execute;\r\nend;\r\n\r\nprocedure TObjectTextConverter.Execute;\r\nbegin\r\n If Not Assigned(Input) then\r\n raise EReadError.Create('Missing input stream');\r\n If Not Assigned(Output) then\r\n raise EReadError.Create('Missing output stream');\r\n FParser := TParser.Create(Input);\r\n try\r\n Output.WriteBufferData(FilerSignatureInt);\r\n ProcessObject;\r\n finally\r\n FParser.Free;\r\n end;\r\nend;\r\n\r\nprocedure ObjectTextToBinary(aInput, aOutput: TStream);\r\n\r\nvar\r\n Conv : TObjectTextConverter;\r\n\r\nbegin\r\n Conv:=TObjectTextConverter.Create;\r\n try\r\n Conv.ObjectTextToBinary(aInput, aOutput);\r\n finally\r\n Conv.free;\r\n end;\r\nend;\r\n\r\n\r\n{ ----------------------------------------------------------------------\r\n TDatamodule\r\n ----------------------------------------------------------------------}\r\n\r\nconstructor TDataModule.Create(AOwner: TComponent);\r\nbegin\r\n CreateNew(AOwner);\r\n if (ClassType <> TDataModule) and\r\n not (csDesigning in ComponentState) then\r\n begin\r\n if not InitInheritedComponent(Self, TDataModule) then\r\n raise EStreamError.CreateFmt(SErrNoSTreaming, [ClassName]);\r\n if OldCreateOrder then\r\n DoCreate;\r\n end;\r\nend;\r\n\r\nconstructor TDataModule.CreateNew(AOwner: TComponent);\r\n\r\nbegin\r\n CreateNew(AOwner,0);\r\nend;\r\n\r\nconstructor TDataModule.CreateNew(AOwner: TComponent; CreateMode: Integer);\r\nbegin\r\n inherited Create(AOwner);\r\n FDPPI := 96;\r\n if Assigned(AddDataModule) and (CreateMode>=0) then\r\n AddDataModule(Self);\r\nend;\r\n\r\nclass constructor TDataModule.ClassCreate;\r\nbegin\r\n RegisterInitComponentHandler(TDataModule,@DefaultInitHandler);\r\nend;\r\n\r\nprocedure TDataModule.AfterConstruction;\r\nbegin\r\n If not OldCreateOrder then\r\n DoCreate;\r\nend;\r\n\r\nprocedure TDataModule.BeforeDestruction;\r\nbegin\r\n Destroying;\r\n RemoveFixupReferences(Self, '');\r\n if not OldCreateOrder then\r\n DoDestroy;\r\nend;\r\n\r\ndestructor TDataModule.Destroy;\r\nbegin\r\n if OldCreateOrder then\r\n DoDestroy;\r\n if Assigned(RemoveDataModule) then\r\n RemoveDataModule(Self);\r\n inherited Destroy;\r\nend;\r\n\r\nprocedure TDataModule.DoCreate;\r\nbegin\r\n if Assigned(FOnCreate) then\r\n try\r\n FOnCreate(Self);\r\n except\r\n if not HandleCreateException then\r\n raise;\r\n end;\r\nend;\r\n\r\nprocedure TDataModule.DoDestroy;\r\nbegin\r\n if Assigned(FOnDestroy) then\r\n try\r\n FOnDestroy(Self);\r\n except\r\n if Assigned(ApplicationHandleException) then\r\n ApplicationHandleException(Self);\r\n end;\r\nend;\r\n\r\nprocedure TDataModule.DefineProperties(Filer: TFiler);\r\n\r\nvar\r\n Ancestor : TDataModule;\r\n HaveData,\r\n HavePPIData: Boolean;\r\n\r\nbegin\r\n inherited DefineProperties(Filer);\r\n Ancestor := TDataModule(Filer.Ancestor);\r\n HaveData:=(Ancestor=Nil) or\r\n (FDSize.X<>Ancestor.FDSize.X) or\r\n (FDSize.Y<>Ancestor.FDSize.Y) or\r\n (FDPos.Y<>Ancestor.FDPos.Y) or\r\n (FDPos.X<>Ancestor.FDPos.X);\r\n HavePPIData:=(Assigned(Ancestor) and (FDPPI<>Ancestor.FDPPI)) or\r\n (not Assigned(Ancestor) and (FDPPI<>96));\r\n Filer.DefineProperty('Height', @ReadH, @WriteH, HaveData);\r\n Filer.DefineProperty('HorizontalOffset', @ReadL, @WriteL, HaveData);\r\n Filer.DefineProperty('VerticalOffset', @ReadT,@WriteT, HaveData);\r\n Filer.DefineProperty('Width', @ReadW, @WriteW, HaveData);\r\n Filer.DefineProperty('PPI', @ReadP, @WriteP,HavePPIData);\r\nend;\r\n\r\nprocedure TDataModule.GetChildren(Proc: TGetChildProc; Root: TComponent);\r\n\r\nvar\r\n I : Integer;\r\n\r\nbegin\r\n inherited GetChildren(Proc, Root);\r\n if (Root=Self) then\r\n for I:=0 to ComponentCount-1 do\r\n If Not Components[I].HasParent then\r\n Proc(Components[i]);\r\nend;\r\n\r\n\r\nfunction TDataModule.HandleCreateException: Boolean;\r\nbegin\r\n Result:=Assigned(ApplicationHandleException);\r\n if Result then\r\n ApplicationHandleException(Self);\r\nend;\r\n\r\nprocedure TDataModule.ReadP(Reader: TReader);\r\nbegin\r\n FDPPI := Reader.ReadInteger;\r\nend;\r\n\r\nprocedure TDataModule.ReadState(Reader: TReader);\r\nbegin\r\n FOldOrder := false;\r\n inherited ReadState(Reader);\r\nend;\r\n\r\nprocedure TDataModule.ReadT(Reader: TReader);\r\nbegin\r\n FDPos.Y := Reader.ReadInteger;\r\nend;\r\n\r\nprocedure TDataModule.WriteT(Writer: TWriter);\r\nbegin\r\n Writer.WriteInteger(FDPos.Y);\r\nend;\r\n\r\nprocedure TDataModule.ReadL(Reader: TReader);\r\nbegin\r\n FDPos.X := Reader.ReadInteger;\r\nend;\r\n\r\nprocedure TDataModule.WriteL(Writer: TWriter);\r\nbegin\r\n Writer.WriteInteger(FDPos.X);\r\nend;\r\n\r\nprocedure TDataModule.ReadW(Reader: TReader);\r\nbegin\r\n FDSIze.X := Reader.ReadInteger;\r\nend;\r\n\r\nprocedure TDataModule.WriteP(Writer: TWriter);\r\nbegin\r\n Writer.WriteInteger(FDPPI);\r\nend;\r\n\r\nprocedure TDataModule.WriteW(Writer: TWriter);\r\nbegin\r\n Writer.WriteInteger(FDSIze.X);\r\nend;\r\n\r\nprocedure TDataModule.ReadH(Reader: TReader);\r\nbegin\r\n FDSIze.Y := Reader.ReadInteger;\r\nend;\r\n\r\nprocedure TDataModule.WriteH(Writer: TWriter);\r\nbegin\r\n Writer.WriteInteger(FDSIze.Y);\r\nend;\r\n\r\n{********************************************************************}\r\n{ }\r\n{ written by TMS Software }\r\n{ Copyright (c) 2019 - 2022 }\r\n{ Email : info@tmssoftware.com }\r\n{ Web : http://www.tmssoftware.com }\r\n{ }\r\n{ The source code is given as is. The author is not responsible }\r\n{ for any possible damage done due to the use of this code. }\r\n{ The complete source code remains property of the author and may }\r\n{ not be distributed, published, given or sold in any form as such. }\r\n{ No parts of the source code can be included in any other component }\r\n{ or application without written authorization of the author. }\r\n{********************************************************************}\r\n\r\n{ TStringsHelper }\r\n\r\nprocedure TStringsHelper.LoadFromStream(Stream: TStream);\r\nbegin\r\n LoadFromStream(Stream, TEncoding.UTF8);\r\nend;\r\n\r\n// possible encoding formats: https://encoding.spec.whatwg.org/\r\n{$HINTS OFF}\r\nprocedure TStringsHelper.LoadFromStream(Stream: TStream; Encoding: TEncoding);\r\nvar\r\n arr: TJSArrayBuffer;\r\n s: string;\r\n buf: TBytes;\r\nbegin\r\n Stream.Read(buf, Stream.Size);\r\n arr := TMemoryStream.BytesToMemory(buf);\r\n\r\n if Assigned(Encoding) and (Encoding <> Encoding.UTF8) then\r\n begin\r\n s := Encoding.Encoding;\r\n asm\r\n var enc = new TextDecoder(s);\r\n s = enc.decode(arr);\r\n end;\r\n end\r\n else\r\n begin\r\n asm\r\n s = String.fromCharCode.apply(null, new Uint16Array(arr));\r\n end;\r\n end;\r\n\r\n (*\r\n s := 'utf-8';\r\n if Assigned(Encoding) then\r\n begin\r\n s := Encoding.GetEncoding;\r\n end;\r\n\r\n asm\r\n var enc = new TextDecoder(s);\r\n s = enc.decode(arr);\r\n end;\r\n *)\r\n\r\n Text := s;\r\nend;\r\n\r\nprocedure TStringsHelper.SaveToStream(Stream: TStream);\r\nbegin\r\n SaveToStream(Stream, TEncoding.UTF8);\r\nend;\r\n\r\nprocedure TStringsHelper.SaveToStream(Stream: TStream; Encoding: TEncoding);\r\nvar\r\n s,txt: string;\r\n arr: TJSArrayBuffer;\r\n b: TBytes;\r\n l: longint;\r\nbegin\r\n s := 'utf-8';\r\n if Assigned(Encoding) then\r\n begin\r\n s := Encoding.Encoding;\r\n end;\r\n\r\n txt := Text;\r\n\r\n asm\r\n var enc = new TextEncoder(s);\r\n arr = enc.encode(txt);\r\n end;\r\n\r\n b := TMemoryStream.MemoryToBytes(arr);\r\n l := arr.bytelength;\r\n\r\n Stream.Write(b, l);\r\n Stream.Position := 0;\r\nend;\r\n\r\n\r\nfunction TStringsHelper.IndexOfValue(const Value: string): Integer;\r\nVar\r\n len : longint;\r\n S : String;\r\nbegin\r\n CheckSpecialChars;\r\n Result:=0;\r\n while (Result=0) and (DoCompareText(Value,Copy(S,Len,Length(S)))=0) then\r\n exit;\r\n inc(result);\r\n end;\r\n result:=-1;\r\nend;\r\n\r\n{$HINTS ON}\r\n\r\n\r\n{ ComponentPlatforms }\r\n\r\nconstructor ComponentPlatformsAttribute.Create(const Platforms: TPlatformIds);\r\nbegin\r\n FPlatforms := Platforms;\r\nend;\r\n\r\n\r\ninitialization\r\n ClassList:=TJSObject.New;\r\nend.\r\n\r\n","unit UITypes;\r\n\r\ninterface\r\n\r\ntype\r\n TFontName = type string;\r\n\r\nimplementation\r\n\r\nend.","unit WEBLib.Consts;\r\n\r\ninterface\r\n\r\nresourcestring\r\n SWarning = 'Warning';\r\n SError = 'Error';\r\n SInformation = 'Information';\r\n SConfirm = 'Confirm';\r\n SOK = 'OK';\r\n SCancel = 'Cancel';\r\n SYes = 'Yes';\r\n SNo = 'No';\r\n SAbort = 'Abort';\r\n SRetry = 'Retry';\r\n SIgnore = 'Ignore';\r\n SHelp = 'Help';\r\n SClose = 'Close';\r\n SAll = 'All';\r\n SYesToAll = 'Yes to all';\r\n SNoToAll = 'No to all';\r\n\r\n SReadError = 'Stream read error';\r\n SWriteError = 'Stream write error';\r\n SCannotGetFile = 'Cannot get the file from the URL %s because of the error %d!';\r\n\r\n SErrorLoadFromFile = 'There was an error during the download of the file %s!';\r\n SLoadFromFileAborted = 'The download of the file %s was aborted!';\r\n\r\n\r\nresourcestring\r\n SWarningFR = 'Avertissement';\r\n SErrorFR = 'Erreur';\r\n SInformationFR = 'Information';\r\n SConfirmFR = 'Confirmer';\r\n SOKFR = 'OK';\r\n SCancelFR = 'Annuler';\r\n SYesFR = 'Oui';\r\n SNoFR = 'Non';\r\n SAbortFR = 'Interrompre';\r\n SRetryFR = 'Réessayer';\r\n SIgnoreFR = 'Ignorer';\r\n SHelpFR = 'Aide';\r\n SCloseFR = 'Fermer';\r\n SAllFR = 'Tout';\r\n SYesToAllFR = 'Oui à tout';\r\n SNoToAllFR = 'Non à tout';\r\n\r\nresourcestring\r\n SWarningDE = 'Warnung';\r\n SErrorDE = 'Fehler';\r\n SInformationDE = 'Information';\r\n SConfirmDE = 'Bestätigen';\r\n SOKDE = 'OK';\r\n SCancelDE = 'Abbrechen';\r\n SYesDE = 'Ja';\r\n SNoDE = 'Nein';\r\n SAbortDE = 'Abbrechen';\r\n SRetryDE = 'Wiederholen';\r\n SIgnoreDE = 'Ignorieren';\r\n SHelpDE = 'Hilfe';\r\n SCloseDE = 'Schließen';\r\n SAllDE = 'Alles';\r\n SYesToAllDE = 'Ja auf Alles';\r\n SNoToAllDE = 'Nein auf Alles';\r\n\r\nresourcestring\r\n SWarningES = 'Advertencia';\r\n SErrorES = 'Error';\r\n SInformationES = 'Información';\r\n SConfirmES = 'Confirmado';\r\n SOKES = 'OK';\r\n SCancelES = 'Cancelar';\r\n SYesES = 'Sí';\r\n SNoES = 'No';\r\n SAbortES = 'Abortar';\r\n SRetryES = 'Rever';\r\n SIgnoreES = 'Ignorar';\r\n SHelpES = 'Ayudar';\r\n SCloseES = 'Cerrar';\r\n SAllES = 'Todos';\r\n SYesToAllES = 'Sí a todo';\r\n SNoToAllES = 'No a todo';\r\n\r\nresourcestring\r\n SWarningNL = 'Waarschuwing';\r\n SErrorNL = 'Fout';\r\n SInformationNL = 'Informatie';\r\n SConfirmNL = 'Bevestiging';\r\n SOKNL = 'OK';\r\n SCancelNL = 'Afbreken';\r\n SYesNL = 'Ja';\r\n SNoNL = 'Nee';\r\n SAbortNL = 'Afbreken';\r\n SRetryNL = 'Opnieuw';\r\n SIgnoreNL = 'Negeren';\r\n SHelpNL = 'Hulp';\r\n SCloseNL = 'Sluiten';\r\n SAllNL = 'Alles';\r\n SYesToAllNL = 'Ja op alles';\r\n SNoToAllNL = 'Nee op alles';\r\n\r\nimplementation\r\n\r\nend.","{********************************************************************}\r\n{ }\r\n{ written by TMS Software }\r\n{ copyright (c) 2018 - 2025 }\r\n{ Email : info@tmssoftware.com }\r\n{ Web : http://www.tmssoftware.com }\r\n{ }\r\n{ The source code is given as is. The author is not responsible }\r\n{ for any possible damage done due to the use of this code. }\r\n{ The complete source code remains property of the author and may }\r\n{ not be distributed, published, given or sold in any form as such. }\r\n{ No parts of the source code can be included in any other component }\r\n{ or application without written authorization of the author. }\r\n{********************************************************************}\r\n\r\nunit WEBLib.Dialogs;\r\n\r\n{$DEFINE NOPP}\r\n\r\ninterface\r\n\r\nuses\r\n Classes, WEBLib.Controls, Web, JS, SysUtils, WEBLib.Graphics;\r\n\r\ntype\r\n TMsgDlgType = (mtWarning, mtError, mtInformation, mtConfirmation, mtCustom);\r\n TMsgDlgBtn = (mbYes, mbNo, mbOK, mbCancel, mbAbort, mbRetry, mbIgnore,\r\n mbAll, mbNoToAll, mbYesToAll, mbHelp, mbClose);\r\n TMsgDlgButtons = set of TMsgDlgBtn;\r\n\r\n TDialogResult = Integer;\r\n TDialogResultProc = reference to procedure(AValue: TDialogResult);\r\n\r\n TCustomDialogButton = class(TCollectionItem)\r\n private\r\n FCaption: string;\r\n FTag: integer;\r\n FElementClassName: TElementClassName;\r\n published\r\n property Caption: string read FCaption write FCaption;\r\n property ElementClassName: TElementClassName read FElementClassName write FElementClassName;\r\n property Tag: integer read FTag write FTag default 0;\r\n end;\r\n\r\n TCustomDialogButtons = class(TOwnedCollection)\r\n private\r\n function GetItem(AIndex: integer): TCustomDialogButton; reintroduce;\r\n procedure SetItem(AIndex: integer; const Value: TCustomDialogButton); reintroduce;\r\n public\r\n function Add: TCustomDialogButton; reintroduce;\r\n function Insert(AIndex: integer): TCustomDialogButton; reintroduce;\r\n property Items[AIndex: integer]: TCustomDialogButton read GetItem write SetItem; default;\r\n end;\r\n\r\n TMessageDlg = class(TCustomControl)\r\n private\r\n FOpacity: double;\r\n FLayer: TJSElement;\r\n FDlg: TJSElement;\r\n FCancel: TJSElement;\r\n FMessage: string;\r\n FTitle: string;\r\n FMsgDlgType: TMSgDlgType;\r\n FOnButtonClick: TNotifyEvent;\r\n FOnClose: TNotifyEvent;\r\n FButtons: TMsgDlgButtons;\r\n FDialogProc: TDialogResultProc;\r\n FDialogResult: TDialogResult;\r\n FMdx, FMdy: integer;\r\n FDlgX, FDlgY: integer;\r\n FCaptured: boolean;\r\n FDown: boolean;\r\n FElementTitleClassName: TElementClassName;\r\n FElementButtonClassName: TElementClassName;\r\n FElementContentClassName: TElementClassName;\r\n FDialogText: TStringList;\r\n FCustomButtons: TCustomDialogButtons;\r\n FElementDialogClassName: TElementClassName;\r\n FAutoLanguage: boolean;\r\n procedure SetDialogText(const Value: TStringList);\r\n procedure SetCustomButtons(const Value: TCustomDialogButtons);\r\n protected\r\n function CreateElement: TJSElement; override;\r\n function GetDialogText(Index: integer): string; virtual;\r\n procedure BindEvents; override;\r\n procedure SetDialogResult(const Value: TDialogResult);\r\n function CreateButton(Caption: string; var DoFocus: boolean; AClass: string = ''): TJSHTMLElement;\r\n function HandleDocMouseMove(Event: TJSMouseEvent): Boolean; virtual;\r\n function HandleDocMouseUp(Event: TJSMouseEvent): Boolean; virtual;\r\n function HandleMouseDown(Event: TJSMouseEvent): Boolean; virtual;\r\n function HandleButtonClick(Event: TJSMouseEvent): Boolean; virtual;\r\n function HandleKeyDown(Event: TJSKeyBoardEvent): Boolean; virtual;\r\n procedure InitBootstrapStyle;\r\n procedure InsertInputElement(AElement: TJSHTMLElement; var DoFocus: boolean); virtual;\r\n public\r\n procedure CreateInitialize; override;\r\n destructor Destroy; override;\r\n procedure Close;\r\n property DialogResult: TDialogResult read FDialogResult write SetDialogResult;\r\n procedure Show; reintroduce;\r\n function ShowDialog: Integer; overload; virtual;\r\n function ShowDialog(Msg: string; DlgType: TMsgDlgType; Buttons: TMsgDlgButtons; AProc: TDialogResultProc): TDialogResult; overload; virtual;\r\n [async]\r\n function ShowDialog(Msg: string; DlgType: TMsgDlgType; Buttons: TMsgDlgButtons): TJSPromise; overload; virtual;\r\n [async]\r\n function ShowAsync: TJSPromise; virtual;\r\n published\r\n property AutoLanguage: boolean read FAutoLanguage write FAutoLanguage default true;\r\n property Buttons: TMsgDlgButtons read FButtons write FButtons default [];\r\n property CustomButtons: TCustomDialogButtons read FCustomButtons write SetCustomButtons;\r\n property DialogText: TStringList read FDialogText write SetDialogText;\r\n property DialogType: TMSgDlgType read FMsgDlgType write FMsgDlgType default mtCustom;\r\n property &Message: string read FMessage write FMessage;\r\n property Opacity: double read FOpacity write FOpacity;\r\n property ElementButtonClassName: TElementClassName read FElementButtonClassName write FElementButtonClassName;\r\n property ElementDialogClassName: TElementClassName read FElementDialogClassName write FElementDialogClassName;\r\n property ElementTitleClassName: TElementClassName read FElementTitleClassName write FElementTitleClassName;\r\n property ElementContentClassName: TElementClassName read FElementContentClassName write FElementContentClassName;\r\n property Title: string read FTitle write FTitle;\r\n property OnButtonClick: TNotifyEvent read FOnButtonClick write FOnButtonClick;\r\n property OnClose: TNotifyEvent read FOnClose write FOnClose;\r\n end;\r\n\r\n TWebMessageDlg = class(TMessageDlg);\r\n\r\n TInputMessageDlg = class(TMessageDlg)\r\n var\r\n FInputElement: TJSHTMLElement;\r\n FInputValue: string;\r\n FKeydownHandler: pointer;\r\n FKeypressHandler: pointer;\r\n private\r\n FInputType: TInputType;\r\n public\r\n [async]\r\n function ShowAsync: TJSPromise; override;\r\n protected\r\n function HandleInputKeydown(Event: TJSKeyBoardEvent): Boolean; virtual;\r\n function HandleInputKeypress(Event: TJSKeyBoardEvent): Boolean; virtual;\r\n procedure InsertInputElement(AElement: TJSHTMLElement; var DoFocus: boolean); override;\r\n function GetInputElementValue: string; virtual;\r\n procedure SetInputElementValue(AValue: string); virtual;\r\n published\r\n property InputValue: string read GetInputElementValue write FInputValue;\r\n property InputType: TInputType read FInputType write FInputType default itText;\r\n end;\r\n\r\n TWebInputMessageDlg = class(TInputMessageDlg);\r\n\r\n\r\n TWaitMessage = class(TCustomControl)\r\n private\r\n FLayer: TJSElement;\r\n FPicture: TURLPicture;\r\n FOpacity: double;\r\n FOnShow: TNotifyEvent;\r\n FOnHide: TNotifyEvent;\r\n FIsWaiting: boolean;\r\n FPictureURL: string;\r\n FTimeOut: integer;\r\n FShowID: nativeint;\r\n FHideID: nativeint;\r\n procedure SetPicture(const Value: TURLPicture);\r\n procedure SetPictureURL(const Value: string);\r\n protected\r\n procedure WaitDisplayed;\r\n procedure WaitHide;\r\n function CreateElement: TJSElement; override;\r\n public\r\n procedure CreateInitialize; override;\r\n destructor Destroy; override;\r\n procedure Show; reintroduce;\r\n procedure Hide; reintroduce;\r\n property IsWaiting: boolean read FIsWaiting write FIsWaiting;\r\n property Showing: boolean read FIsWaiting;\r\n published\r\n property Opacity: double read FOpacity write FOpacity;\r\n property Picture: TURLPicture read FPicture write SetPicture;\r\n property PictureURL: string read FPictureURL write SetPictureURL;\r\n property TimeOut: integer read FTimeOut write FTimeOut;\r\n property OnHide: TNotifyEvent read FOnHide write FOnHide;\r\n property OnShow: TNotifyEvent read FOnShow write FOnShow;\r\n end;\r\n\r\n TWebWaitMessage = class(TWaitMessage);\r\n\r\n TFilesDroppedEvent = procedure(Sender: TObject; AFileList: TStringList) of object;\r\n\r\n TFileAsTextEvent = procedure(Sender: TObject; AFileIndex: integer; AText: string) of object;\r\n\r\n TFileAsBase64Event = procedure(Sender: TObject; AFileIndex: integer; ABase64: string) of object;\r\n\r\n TFileAsDataURLEvent = procedure(Sender: TObject; AFileIndex: integer; AURL: string) of object;\r\n\r\n TFileAsArrayBufferEvent = procedure(Sender: TObject; AFileIndex: integer; ABuffer: TJSArrayBufferRecord) of object;\r\n\r\n TFileAsStreamEvent = procedure(Sender: TObject; AFileIndex: integer; AStream: TStream) of object;\r\n\r\n TFileUploadEvent = procedure(Sender: TObject; AFileIndex: integer) of object;\r\n\r\n TFileUploadResponseEvent = procedure(Sender: TObject; AFileIndex: integer; ARequest:TJSXMLHttpRequestRecord; AResponse: string) of object;\r\n\r\n TFileUploadErrorEvent = procedure(Sender: TObject; AFileIndex: integer; AError: string) of object;\r\n\r\n TFileUploadProgressEvent = procedure(Sender: TObject; AFileIndex: integer; APosition, ATotalSize: longint) of object;\r\n\r\n TFileGetAsBase64 = procedure(Sender: TObject; ABase64: string) of object;\r\n\r\n TFileGetAsText = procedure(Sender: TObject; AText: string) of object;\r\n\r\n TFileGetAsURL = procedure(Sender: TObject; AURL: string) of object;\r\n\r\n TFileGetAsArrayBuffer = procedure(Sender: TObject; ABuffer: TJSArrayBufferRecord) of object;\r\n\r\n TFileGetAsStream = procedure(Sender: TObject; AStream: TStream) of object;\r\n\r\n TGetAsStringProc = reference to procedure(AValue: string);\r\n\r\n TGetAsArrayBufferProc = reference to procedure(AValue: TJSArrayBuffer);\r\n\r\n TGetAsStreamProc = reference to procedure(AStream: TStream);\r\n\r\n TFile = class(TCollectionItem)\r\n private\r\n FReq: TJSXMLHttpRequest;\r\n FModified: TDateTime;\r\n FName: string;\r\n FMimeType: string;\r\n FSize: integer;\r\n FFileObject: TJSHTMLFile;\r\n FTag: integer;\r\n FObject: TObject;\r\n FOnGetFileAsBase64: TFileGetAsBase64;\r\n FOnGetFileAsArrayBuffer: TFileGetAsArrayBuffer;\r\n FOnGetFileAsText: TFileGetAsText;\r\n FOnGetFileAsURL: TFileGetAsURL;\r\n FOnGetFileAsStream: TFileGetAsStream;\r\n FGetAsString: TGetAsStringProc;\r\n FGetAsStream: TGetAsStreamProc;\r\n FGetAsArrayBuffer: TGetAsArrayBufferProc;\r\n protected\r\n function HandleFileLoadAsText(Event: TJSEvent): boolean;\r\n function HandleFileLoadAsBase64(Event: TJSEvent): boolean;\r\n function HandleFileLoadAsArrayBuffer(Event: TJSEvent): boolean;\r\n function HandleFileLoadAsDataURL(Event: TJSEvent): boolean;\r\n function HandleFileLoadAsStream(Event: TJSEvent): boolean;\r\n function HandleFileUploadProgress(Event: TJSEvent): boolean;\r\n function HandleFileUploadComplete(Event: TJSEvent): boolean;\r\n function HandleFileUploadError(Event: TJSEvent): boolean;\r\n function HandleFileUploadAbort(Event: TJSEvent): boolean;\r\n function GetControl: TComponent;\r\n public\r\n property FileObject: TJSHTMLFile read FFileObject write FFileObject;\r\n property Name: string read FName write FName;\r\n property MimeType: string read FMimeType write FMimeType;\r\n property Modified: TDateTime read FModified write FModified;\r\n property &Object: TObject read FObject write FObject;\r\n property Size: integer read FSize write FSize;\r\n property Tag: integer read FTag write FTag;\r\n\r\n [async]\r\n function FileAsText: TJSPromise; overload;\r\n [async]\r\n function FileAsText(AEncoding: string): TJSPromise; overload;\r\n [async]\r\n function FileAsBase64: TJSPromise;\r\n [async]\r\n function FileAsStream: TJSPromise;\r\n [async]\r\n function FileAsDataURL: TJSPromise;\r\n [async]\r\n function FileAsArrayBuffer: TJSPromise;\r\n\r\n procedure GetFileAsText; overload;\r\n procedure GetFileAsText(GetAsString: TGetAsStringProc); overload;\r\n procedure GetFileAsText(AEncoding: string); overload;\r\n procedure GetFileAsBase64; overload;\r\n procedure GetFileAsBase64(GetAsString: TGetAsStringProc); overload;\r\n procedure GetFileAsArrayBuffer; overload;\r\n procedure GetFileAsArrayBuffer(GetAsArrayBuffer: TGetAsArrayBufferProc); overload;\r\n procedure GetFileAsStream; overload;\r\n procedure GetFileAsStream(GetAsStream: TGetAsStreamProc); overload;\r\n procedure GetFileAsDataURL; overload;\r\n procedure GetFileAsDataURL(GetAsString: TGetAsStringProc); overload;\r\n procedure Upload(AAction: string);\r\n function AbortUpload: boolean;\r\n property OnGetFileAsText: TFileGetAsText read FOnGetFileAsText write FOnGetFileAsText;\r\n property OnGetFileAsBase64: TFileGetAsBase64 read FOnGetFileAsBase64 write FOnGetFileAsBase64;\r\n property OnGetFileAsURL: TFileGetAsURL read FOnGetFileAsURL write FOnGetFileAsURL;\r\n property OnGetFileAsArrayBuffer: TFileGetAsArrayBuffer read FOnGetFileAsArrayBuffer write FOnGetFileAsArrayBuffer;\r\n property OnGetFileAsStream: TFileGetAsStream read FOnGetFileAsStream write FOnGetFileAsStream;\r\n end;\r\n\r\n TFilePicker = class;\r\n\r\n TFiles = class(TCollection)\r\n private\r\n FOwner: TCustomControl;\r\n function GetItem(Index: integer): TFile; reintroduce;\r\n procedure SetItem(Index: integer; const Value: TFile);\r\n public\r\n constructor Create(AOwner: TComponent); reintroduce;\r\n function Owner: TPersistent; reintroduce;\r\n property Items[Index: integer]: TFile read GetItem write SetItem; default;\r\n function Add: TFile; reintroduce;\r\n function Insert(Index: integer): TFile; reintroduce;\r\n procedure Clear; reintroduce;\r\n end;\r\n\r\n\r\n TFileUpload = class(TCustomControl)\r\n private\r\n FAccept: string;\r\n FCreateRef: string;\r\n FEventInit: boolean;\r\n FFiles: TFiles;\r\n FFileList: TStringList;\r\n FOnDroppedFiles: TFilesDroppedEvent;\r\n FMultiFile: boolean;\r\n FShowFiles: boolean;\r\n FDragCaption: string;\r\n FOnGetFileAsArrayBuffer: TFileAsArrayBufferEvent;\r\n FOnFileAsText: TFileAsTextEvent;\r\n FOnFileAsBase64: TFileAsBase64Event;\r\n FOnFileAsDataURL: TFileAsDataURLEvent;\r\n FOnUploadFileAbort: TFileUploadEvent;\r\n FOnUploadFileComplete: TFileUploadEvent;\r\n FOnUploadFileProgress: TFileUploadProgressEvent;\r\n FOnUploadFileError: TFileUploadErrorEvent;\r\n FOnUploadFileResponseComplete: TFileUploadResponseEvent;\r\n FOnGetFileAsStream: TFileAsStreamEvent;\r\n FFontHoverColor: TColor;\r\n FShowPicture: boolean;\r\n FDragColor: TColor;\r\n procedure SetDragCaption(const Value: string);\r\n procedure SetAccept(const Value: string);\r\n procedure SetShowPicture(const Value: boolean);\r\n protected\r\n procedure SetCaption(const AValue: string); override;\r\n function HandleFiles(files: TJSHTMLFileList): string;\r\n function DoHandleChange(e: TJSEvent): boolean;\r\n function HandleDroppedFiles(Event: TJSDragEvent): boolean;\r\n function HandleDragOver(Event: TJSDragEvent): boolean;\r\n function HandleDragEnd(Event: TJSDragEvent): boolean;\r\n function CreateElement: TJSElement; override;\r\n procedure UpdateElement; override;\r\n procedure ColorChanging; override;\r\n procedure CreateCSS;\r\n public\r\n constructor Create(AOwner: TComponent); overload; override;\r\n destructor Destroy; override;\r\n procedure CreateInitialize; override;\r\n property Files: TFiles read FFiles;\r\n procedure Clear;\r\n published\r\n property Accept: string read FAccept write SetAccept;\r\n property Caption;\r\n property ChildOrder;\r\n property Color default $dfdac8;\r\n property DragCaption: string read FDragCaption write SetDragCaption;\r\n property DragColor: TColor read FDragColor write FDragColor default clNone;\r\n property ElementFont;\r\n property Font;\r\n property FontHoverColor: TColor read FFontHoverColor write FFontHoverColor default $00d3bf39;\r\n property HeightPercent;\r\n property HeightStyle;\r\n property Multifile: boolean read FMultiFile write FMultiFile default false;\r\n property ParentFont;\r\n property ShowFiles: boolean read FShowFiles write FShowFiles default false;\r\n property ShowPicture: boolean read FShowPicture write SetShowPicture default true;\r\n property WidthPercent;\r\n property WidthStyle;\r\n property OnDroppedFiles: TFilesDroppedEvent read FOnDroppedFiles write FOnDroppedFiles;\r\n property OnGetFileAsText: TFileAsTextEvent read FOnFileAsText write FOnFileAsText;\r\n property OnGetFileAsArrayBuffer: TFileAsArrayBufferEvent read FOnGetFileAsArrayBuffer write FOnGetFileAsArrayBuffer;\r\n property OnGetFileAsStream: TFileAsStreamEvent read FOnGetFileAsStream write FOnGetFileAsStream;\r\n property OnGetFileAsBase64: TFileAsBase64Event read FOnFileAsBase64 write FOnFileAsBase64;\r\n property OnGetFileAsDataURL: TFileAsDataURLEvent read FOnFileAsDataURL write FOnFileAsDataURL;\r\n property OnUploadFileComplete: TFileUploadEvent read FOnUploadFileComplete write FOnUploadFileComplete;\r\n property OnUploadFileResponseComplete: TFileUploadResponseEvent read FOnUploadFileResponseComplete write FOnUploadFileResponseComplete;\r\n property OnUploadFileAbort: TFileUploadEvent read FOnUploadFileAbort write FOnUploadFileAbort;\r\n property OnUploadFileError: TFileUploadErrorEvent read FOnUploadFileError write FOnUploadFileError;\r\n property OnUploadFileProgress: TFileUploadProgressEvent read FOnUploadFileProgress write FOnUploadFileProgress;\r\n end;\r\n\r\n TWebFileUpload = class(TFileUpload);\r\n\r\n TFilePicker = class(TCustomControl)\r\n private\r\n FOnChange: TNotifyEvent;\r\n FMultiFile: boolean;\r\n FFiles: TFiles;\r\n FOnFileAsText: TFileAsTextEvent;\r\n FOnGetFileAsArrayBuffer: TFileAsArrayBufferEvent;\r\n FAccept: string;\r\n FOnFileAsBase64: TFileAsBase64Event;\r\n FChangePtr: pointer;\r\n FOnFileAsDataURL: TFileAsDataURLEvent;\r\n FOnUploadFileAbort: TFileUploadEvent;\r\n FOnUploadFileComplete: TFileUploadEvent;\r\n FOnUploadFileProgress: TFileUploadProgressEvent;\r\n FOnUploadFileError: TFileUploadErrorEvent;\r\n FOnUploadFileResponseComplete: TFileUploadResponseEvent;\r\n FOnGetFileAsStream: TFileAsStreamEvent;\r\n procedure SetMultiFile(const Value: boolean);\r\n function DoHandleChange(e: TJSEvent): boolean;\r\n procedure SetAccept(const Value: string);\r\n protected\r\n procedure UpdateElement; override;\r\n function CreateElement: TJSElement; override;\r\n procedure GetMethodPointers; override;\r\n procedure BindEvents; override;\r\n public\r\n procedure CreateInitialize; override;\r\n destructor Destroy; override;\r\n property Files: TFiles read FFiles;\r\n procedure Clear;\r\n published\r\n property Accept: string read FAccept write SetAccept;\r\n property ChildOrder;\r\n property ElementClassName;\r\n property ElementFont;\r\n property ElementID;\r\n property ElementPosition;\r\n property HeightPercent;\r\n property HeightStyle;\r\n property Multifile: boolean read FMultiFile write SetMultiFile;\r\n property WidthPercent;\r\n property WidthStyle;\r\n property OnChange: TNotifyEvent read FOnChange write FOnChange;\r\n property OnGetFileAsText: TFileAsTextEvent read FOnFileAsText write FOnFileAsText;\r\n property OnGetFileAsArrayBuffer: TFileAsArrayBufferEvent read FOnGetFileAsArrayBuffer write FOnGetFileAsArrayBuffer;\r\n property OnGetFileAsBase64: TFileAsBase64Event read FOnFileAsBase64 write FOnFileAsBase64;\r\n property OnGetFileAsDataURL: TFileAsDataURLEvent read FOnFileAsDataURL write FOnFileAsDataURL;\r\n property OnGetFileAsStream: TFileAsStreamEvent read FOnGetFileAsStream write FOnGetFileAsStream;\r\n property OnUploadFileComplete: TFileUploadEvent read FOnUploadFileComplete write FOnUploadFileComplete;\r\n property OnUploadFileResponseComplete: TFileUploadResponseEvent read FOnUploadFileResponseComplete write FOnUploadFileResponseComplete;\r\n property OnUploadFileAbort: TFileUploadEvent read FOnUploadFileAbort write FOnUploadFileAbort;\r\n property OnUploadFileError: TFileUploadErrorEvent read FOnUploadFileError write FOnUploadFileError;\r\n property OnUploadFileProgress: TFileUploadProgressEvent read FOnUploadFileProgress write FOnUploadFileProgress;\r\n end;\r\n\r\n TWebFilePicker = class(TFilePicker);\r\n\r\n TOpenDialogProc = reference to procedure(AFileName: string);\r\n\r\n TOpenOption = (ofReadOnly, ofOverwritePrompt, ofHideReadOnly,\r\n ofNoChangeDir, ofShowHelp, ofNoValidate, ofAllowMultiSelect,\r\n ofExtensionDifferent, ofPathMustExist, ofFileMustExist, ofCreatePrompt,\r\n ofShareAware, ofNoReadOnlyReturn, ofNoTestFileCreate, ofNoNetworkButton,\r\n ofNoLongNames, ofOldStyleDialog, ofNoDereferenceLinks, ofEnableIncludeNotify,\r\n ofEnableSizing, ofDontAddToRecent, ofForceShowHidden);\r\n TOpenOptions = set of TOpenOption;\r\n\r\n TOpenDialog = class(TComponent)\r\n private\r\n FFiles: TFiles;\r\n FOnChange: TNotifyEvent;\r\n FFileName: string;\r\n FMultiFile: boolean;\r\n FFilter: string;\r\n FAccept: string;\r\n FOpenDialogProc: TOpenDialogProc;\r\n FOptions: TOpenOptions;\r\n FFilterIndex: Integer;\r\n FOnFileAsBase64: TFileAsBase64Event;\r\n FOnGetFileAsArrayBuffer: TFileAsArrayBufferEvent;\r\n FOnFileAsDataURL: TFileAsDataURLEvent;\r\n FOnFileAsText: TFileAsTextEvent;\r\n FOnGetFileAsStream: TFileAsStreamEvent;\r\n protected\r\n procedure HandleInputChange(Event: TJSEvent); virtual;\r\n public\r\n constructor Create(AOwner: TComponent); overload; override;\r\n constructor Create; overload;\r\n destructor Destroy; override;\r\n procedure Execute; overload;\r\n procedure Execute(AProc: TOpenDialogProc); overload;\r\n [async]\r\n function Perform: TJSPromise;\r\n property FileName: string read FFileName;\r\n property Files: TFiles read FFiles;\r\n property Filter: string read FFilter write FFilter;\r\n property Options: TOpenOptions read FOptions write FOptions;\r\n property FilterIndex: Integer read FFilterIndex write FFilterIndex;\r\n published\r\n property Accept: string read FAccept write FAccept;\r\n property MultiFile: boolean read FMultiFile write FMultiFile default false;\r\n property OnChange: TNotifyEvent read FOnChange write FOnChange;\r\n property OnGetFileAsText: TFileAsTextEvent read FOnFileAsText write FOnFileAsText;\r\n property OnGetFileAsArrayBuffer: TFileAsArrayBufferEvent read FOnGetFileAsArrayBuffer write FOnGetFileAsArrayBuffer;\r\n property OnGetFileAsStream: TFileAsStreamEvent read FOnGetFileAsStream write FOnGetFileAsStream;\r\n property OnGetFileAsBase64: TFileAsBase64Event read FOnFileAsBase64 write FOnFileAsBase64;\r\n property OnGetFileAsDataURL: TFileAsDataURLEvent read FOnFileAsDataURL write FOnFileAsDataURL;\r\n end;\r\n\r\n TWebOpenDialog = class(TOpenDialog);\r\n\r\n\r\n\r\nprocedure MessageDlg(const Msg: string; DlgType: TMsgDlgType; Buttons: TMsgDlgButtons; AResultProc: TDialogResultProc = nil);\r\nprocedure ShowMessage(AMsg: string);\r\n\r\nfunction MessageDlgAsync(const Msg: string; DlgType: TMsgDlgType; Buttons: TMsgDlgButtons): integer; overload; async;\r\n\r\nfunction InputBox(const ACaption, APrompt, ADefault: string): string;\r\nfunction InputQuery(const ACaption, APrompt: string; var Value: string): Boolean; overload;\r\nfunction Confirm(const Value: string): boolean;\r\n\r\nprocedure InputMessageDlg(const Msg: string; DlgType: TMsgDlgType; Buttons: TMsgDlgButtons; var AResult: string; AInputType: TInputType = itText; AResultProc: TDialogResultProc = nil);\r\nfunction InputMessageDlgAsync(const Msg: string; DlgType: TMsgDlgType; Buttons: TMsgDlgButtons; var AResult: string; AInputType: TInputType = itText): integer; async;\r\n\r\nimplementation\r\n\r\nuses\r\n WEBLib.Forms, WebLib.Consts, WEBLib.WebTools;\r\n\r\nconst\r\n lMaterial = 'https://fonts.googleapis.com/icon?family=Material+Icons';\r\n\r\n lWaitCursor =\r\n '0954474946496D61676547494638396190012C01A20000FFFFFFDDDDDDBBBBBB999999FFFFFFFFFFFFFFFFFFFFFFFF21FF0B4E45545343415045322E30030100000021F90405050004002C0000000090012C0182FFFFFFDDDDD'+\r\n 'DBBBBBB999999FFFFFFFFFFFFFFFFFFFFFFFF03FF48BADCFE30CA49ABBD38EBCDBBFF60288E64699E68AAAE6CEBBE702CCF746DDF78AEEF7CEFFFC0A070482C1A8FC8A472C96C3A9FD0A8744AAD5AAFD8AC76CBED7ABFE0B078'+\r\n '4C2E9BCFE8B47ACD6EBBDFF0B87C4EAFDBEFF8BC7ECFEFFBFF808182838485868788898A8B8C8D8E8F909192939495969798999A9B9C9D9E9FA0A1A2A3A4A5A6A7A8A9AAABACADAEAFB0B1B2B3B4B5B6B7B8B9BABBBCBDBEBFC'+\r\n '0C1C2C3C4C5C6C7C8C9CACBCCCDCECFD0D1D2D3D4D5D6D7D8D9DADBDCDDDEDFE0E1E2E3E4E5E6E7E8E9EAEBECEDEEEFF0F1F2F3F4F5F6F7F8F9FAFBFCFDFEFF00030A1C48B0A0C18308132A5CC8B0A1C3871023861A407180C4'+\r\n '44152B5E349431FFE346421D357E141492E24892254F062A6951E51F962EC978F400D383809B02621E09493365079C387512A9B981A806A040850A319A812906A441950261D95283530B50A34AF541B52A86AB14B26ADDDA836'+\r\n 'A519F19C4E6243B15AC04B711D4B20D62B629DA0B72E7B6BD5B01EE83BC7A7F74FDCA7782DAB58105FB6DB09801E0C45CEBF62D1CF731E4B28D15642660F93266CA0F3277F6CC43F204D162492F6DDC78B4EA1D834F8376ECFA'+\r\n 'B50ED31016D7B69D237604BF8779AF9EBD80A7E1D4C24BCCFC803BB44809BB2F04981E20B9F19EC48F22F7409D3AEFE676AF87D8CEA1BB79DB5DBD86EF48827C06F3F0D1A7577F41BC08A8E5E1C77F3DDFE459FFFF2624B5817'+\r\n 'EFA7DD71F7D4E1058A0700702D884820B26474083081601E17E1216D7A012179E97A103141AD161771FBEB56110237A57A26C070291E2742B5A70220F2FC6B81E78378C682307E9F970E18ED865370384408220240D111669E4'+\r\n '733F90A8E493504629E594545669E5955866A9A54014FA960400608629E698648EB955973D7E59E69A6C86A9149AF321D1E69C6C0A05679A46D0A9A7993ADDE925117B060A809D7E6E9683A07BBE59287B6A225AA7548B3229A'+\r\n '7A3656E69E9A59866AAE9A69C76EAE9A7A086AAC5728A39E8E99133A06AE59FBDE198259EB0B18A657F91C1BA6A8B9FC5596588A5D22A25AF7BF9AA24B04310BBA2B145206BDD8CFF4928CB1FB34C387B19B44F503BADB0EBA1'+\r\n '402A61BAAA862DB79286605F7DDD92662BB8DB32A72A88B226E6AA8CEB5260A873F1129AAE55F3B2382EBEF77AD6EF8DFF6A682ABDFBF25BE1AC8B15CCC0BBA2FEC6B05FED36ECB09009E71B6AC402336AA2C59F32ACD9911E4'+\r\n 'B3C61662473CC69C8232BCC98C99AA29CB2C6F2B27C29C62BAB5C73BD2D1BAAB3CC5AD27C73C0ECF28C70BCF3BA9C73BDF91A8DA9D22F034D30CC0D33DD74B893E13C34CE16FBBC34C75C0B1DA5C9605B7DABCD1B438D2ED5A7'+\r\n '9A7DF6C0678BFC31DB6B1F0C2FDC6E77E075DDCA898D770A77EF2D42DF7E2F4976E02F004E7890741F9E2ADA8A37EEF8E390472EF9E494576EF9E5649867AEF9E69C77EEF9E7A0872EFAE8A4976EFAE9A8A7AEFAEAACB7EEFAE'+\r\n 'BB0C72EFBECB4D76EFBEDB8E7AEFBEEBCF7EEFBEFC0072FFCF0C4176FFCF1C827AFFCF2CC37EFFCF3D0472FFDF4D4576FFDF5D867AFFDF6DC77EFFDF7E0872FFEF8E497DF7D020021F90405050007002CD60060003000570082'+\r\n 'FFFFFFDDDDDDBBBBBB999999FFFFFFFFFFFFFFFFFFFFFFFF03EC78BABCF3A3C9492B85D0EA7D71E6E0E67D61298DA4A9A2A95AB291BBB2B20BD7E68D8770BC73BA9F2828B4108B1D1472A85C568E4E462F9A1C5127D36B037AE'+\r\n '5AA04608191B60B879FCD9A795DC5A8D7ECB6CF04AF8F1FB2BA9DAADF3BFB7E4880707C83665186877F8960858C8E865A895A0A83940B80970C819A95679DA0A1A2A3A4A5A6A7A8A9AA2A01ADAEAFB0B1B035B2B5B6AF2EB7BA'+\r\n 'B6ACBBBEB826BFC201BDC3BBB9C6B7B4C9B2ABCECFD0D1D2D3D4D53200D800A5D9DCA2DCDFDA9DE0DFE2E3E494E6E3E8E9E05AECEDEEEFDDF1F2D8F4F5EBF5E157FAFBFCF8F9D8954B178AA0B773A3E65148000021F90405050'+\r\n '007002CD60075003000570082FFFFFFDDDDDDBBBBBB999999FFFFFFFFFFFFFFFFFFFFFFFF03E978BADCFE6EC801ABBD6D4ECCFBD1A0274660388E657A8AA9BA62ADFB56B13C93B576D3B9BEE33DCA2F13940C81BD2331A844B6'+\r\n '9A8F1C14529BF24CD6AB30CBED7ABFE0B0784C2E9BCF5C817ACD6EBBDBB3B77CCE5ED1EFF3137E0F1FF1FF027A807B76837471866F688B8C8D8E8F909192930A01960166979A639A9D98609E9DA0A1A25DA4A1A6A79E5CAAABA'+\r\n 'CAD9BAFB096B2B3A9B39F59B8B91000BE002FB815BFBFC1B0BDC4C5C6A7C8C9C037CC0FCECAD0A5D2D3CF3BB1C3D862D8BEDEDD61DFD95FDF63E7E3E2EAD3E1EBE6EF5EE4EECEE8F15DE9ECF5FAFB60F9FEEDE81123D3CF1EB8'+\r\n '2909000021F90405050007002CC40092004200420082FFFFFFDDDDDDBBBBBB999999FFFFFFFFFFFFFFFFFFFFFFFF03F978BADCFE508D49ABBD36EA1DB1FF15277260F98DE863AE59EA4A6CFCBEB13CBBB579CFF9B9FFC0A0704'+\r\n '82C1A8FC8A472C96C3A9FD0A8747A105805D4D7759B1D6DBFD8AE06FC1547C860B3034D5633D86D77155E96CFE957FB1D1F76F3F3767F567A8246018701377F4488888A78438D8D3B74919287406C96978999751100A1001C9C'+\r\n '98415C1AA2A2A4A54FAAAA1BA5A64CAFABB1AD4DB5A1ACB84BBAA3BC97B9BA23B2B4C422C6BEC8C9BD48BF28B29DCFCCCD9C4AD0D1CA47D9DAD7D4B52FDB45DDDEC2DCD5E692E8E1E2E342E529EF41F1F2DF44F5EA8EE4E92EE'+\r\n '7FCED764C62F74A8F837C7610CA51E886A11A870F0B1A7C006B6283040021F90405050007002CA700A4005700300082FFFFFFDDDDDDBBBBBB999999FFFFFFFFFFFFFFFFFFFFFFFF03FF78BADCFE30CA37EA9838EBCD8FFD5D28'+\r\n '8ECD675E64AA4AA7B9BEB0D7BA711DCEADAD6B78BEFF90DE0948740869C5E411942C2E2D4DE51315054E35802CE027E80A464F8C56ABF37AC1C7C9785C339B4942F53ADB76775538C99C1CB39FF148107B7413018601187E772'+\r\n 'B4C11835B858786898A518F90119292138A8B458F189A87947E4997A1A2889C9D9F8319A9AAABA540A0AFA91AAC3FB5A8A2B8953BBBBC9A1BB935A71AB0C4C530C1C29BCAB3CCCD91BDD0D12BD3D4C31CCB29D9DACFDCBF2ADF'+\r\n '12C91DDD22E5E6B721E91CC71DE7E8EF58AE22F3F4D71DF7F8ED22E342F40B914F9F1B6F6B521434E889041B85FF46BCA9E26C14C5280B2FFEC8A8511307C78E353E82842172E48B6A2689844BA920010021F90405050007002'+\r\n 'C9200A4005700300082FFFFFFDDDDDDBBBBBB999999FFFFFFFFFFFFFFFFFFFFFFFF03FF78BADC0E10B849ABBD38B7C8B5FFE0C78D52689E2139A26C4BA9A42BB7B03ADF606DE33CA6C7BDE0E4B7121A17C4CE71998C2C8F4DC8'+\r\n '13DA9C5289A78036201C7807996476ABED7DBF3E1D8A4CC69DCF975A8BBD75BFBD69258B5EBFDDD1714E2E7C6517028702187F785607845C8688878A8B568F90159292178B8C4B8F189A88947F4F97A1A2899C9D9F8419A9AAA'+\r\n 'BA546A0AFA91AAC42B5A8A2B89541BBBC9A1EB938A71AB0C4C533C1C29BCAB3CCCD91BDD0D183AE1FC91FCB7BD9DAB720DD637C21DBDCBFDEE5E6E1E2E926C720E7E8EF20D3C8EDEED7F6EB26F3FA6FD6F46357CD443D7E6D50'+\r\n 'FC03E849602185F90C026A446D18452B0B2F0AC9A8B11207C78E383E829C2172A48C82268D3CE391000021F90405050007002C8A0092004200420082FFFFFFDDDDDDBBBBBB999999FFFFFFFFFFFFFFFFFFFFFFFF03F57807DCF'+\r\n 'EF0A949ABBD98C6CD5DFEE0D58D5C6882642A9DACA5BE402B4FB03ADFF578EFF9B6FFC0A070482C1A8FC8A472C96C3A9FD0A8744A3D05AE81AA0CCBD59AB8E0AC3713068F2FE5F099922EAF0F6DF73AAE3ED3CDF63BF6ADDFE7'+\r\n 'FB7C8081773B028602467A85878645743F8C8C446D4191878E784096979857439B8D2003A30352A088A2A4A350A7A819AAAA4FA721B0A44EADB4B5A54DB3B9B5BCA027BABB4BBDBEB04CC6C7B14AB8C2BAC5C12CC3CDCACBB64'+\r\n '9D6D7AB48DADBC446DEA9BF47E2E3C8E1E61FD4E99B3BEC45D237F044F233F4F59140F8F9A13FFC6F26000C78606040836F10AE5178866143740431304B000021F90405050007002C8A0075003000570082FFFFFFDDDDDDBBBB'+\r\n 'BB999999FFFFFFFFFFFFFFFFFFFFFFFF03E778BA0C0E2CCA496B7BCEEA4DB1E7E0E68D61298DA8A9A2A95AB2ADCBC1B1ACD1A47DE3982EF20FDF0E0811768845E304A9AC009B161C340A9B0E7BD65F26CBED7ABFE0B0784C2E9'+\r\n 'BCFA1807ACD6EBBDBB6B77CCE76D1EF73157E0F37F1FF017A807B76837471866F688B8C8D8E8F909192936802960266979A639A9D98609E9D5FA19E5DA4A159A7A856AAA553ADA2AFB097A9B396ACB69FB2B35CB63203C00316'+\r\n 'BC2EC1C115AD36C6C614A73ECBC7CDB13AD0D1D2B742D5C062DAC261DDDE60DDDCE3DFDAE4D563E5E2E7E6EDECE9EEF1F0D0E8F5F6CBF8CCF2F7F4F9FADBD4CDD377669F86040021F90405050007002C8A0060003000570082F'+\r\n 'FFFFFDDDDDDBBBBBB999999FFFFFFFFFFFFFFFFFFFFFFFF03EB78BADCFE0B4800ABBD6D4ECCBBD29A2756E0369E4C69A2A7BAB2A24BC1AD4B8FF28DDB7A27CF3D4C2E281C122DC62389A784249B8E2734229D1EAAD39F35CA84'+\r\n '04BE811EF60006EBB0E5F4ADCB48BB61EC857BCE2A55E67454C882CF4FFB7E50806F7F83655B8687568966858C888F90835B7280949578976D849A9B5F9DA0A1A2A3A4A5A6A7A8A93A02ACADAEAFB0AF30B1B4B5AE28B6B9B52'+\r\n '7BABDB223BEC102BCC2BDB8C5B6B3C8B1AACDCECFD0D1D2D3D4CF03D703A3D8DBA0DBDED997DFDE94E2DF56E5E250E8E94DEBE64AEEE3F0F1D8EAF4D7EDF7E0F3F453F75BFD00AED3842ED43B51DCAC24000021F90405050007'+\r\n '002C8A0058004200420082FFFFFFDDDDDDBBBBBB999999FFFFFFFFFFFFFFFFFFFFFFFF03FD78BADCFE30CA062A9838EB69EDFE20D77961698EA4A96E68B5BE597BC13424D738D5E64BE007AF1BEFF75B097144A2EA584B164FB'+\r\n 'B9CF31962D2A6D48FF58A2D6DB9D36A74D8057DC14EF3985CD69CD149ED9A1D76CFE9713B8AE7C0026377784A807B7C0D7E842386878822858B3D6D116F528D93818696971D13029E027083129C129F9F309A2BA6AB2F92AAAB'+\r\n 'AC26AE2AB0B5B27934B5B625A235BABB9020BFC0C11BC3B0C51FC7B1C91ACBA6CDC6CF9ED119D3D4D518D7D9D6CBDCCEC3DFE0BAE2D2CCE5E3A0E8EBECEDEEEFF0F1F2F3F4F5F68603F9FAFBFCFDFCD5FE020ADCD76CA04181C'+\r\n '90E2AFC576CA1C301091F2A2C287120C08AFEA225000021F90405050007002C920058005700300082FFFFFFDDDDDDBBBBBB999999FFFFFFFFFFFFFFFFFFFFFFFF03FF78BADCFE30BE4083BC38EB3D2BE560284A9E379E285756'+\r\n '69EB76EB2BBFEB37DF676DE13CA8F723815090FAA10048406B38441947C9248AC9CCD54ED1E889DA1C3D435969902BF45E4561B188DCF59D4169F59A2DFA6EE2CA149BE88EC1E32E7B217619782F822A6F1A8687881A8412787'+\r\n '98D64897E8B80337B7C19901092388E189E0F8CA1749D8A91993CA224AA11A6ADA817A40CB2B3B411B60AA0400AAE302518B83D9BB5B00DBEBFC0BA1097B1AC1003D40381CEC2C4D20FD5D54BD847DB0DDDE47A9532E2E3E4E5'+\r\n '635C33E90CEBF2ED6DE85918F2F373653C5A19F9FA9809041850E02F82EB0C3243C84E211086DD1C1E84484D620F8A152DF2C0A8F11322C38E0F09820C996FE4C48626495A4BA921010021F90401050007002CA700580057003'+\r\n '00082FFFFFFDDDDDDBBBBBB999999FFFFFFFFFFFFFFFFFFFFFFFF03FF78BADCFE4B4801ABBD38EB36E7FE60A8759D689E22E9A16C5BA9922BCF074CD1F869E77CB8F7A28170C0FA9D02C8406B38441945C9248AC9D4C18E51A9'+\r\n '89DA343D41596D902BF45EA161E489DC057D3569F1989C3A83E34BB6CFBE892BF3746E7C70782E6C441F6F177E33878823838B8C8D7A1B8A1593949519970F7E7F34879691988539A29CA49EA6A79B179D0D993CA8AFAAB1ACB'+\r\n '3B42FB60B9F400BBA10B00AB2408EB52A92B8C6AEC22418C5BF07C10F25CA612E00DA0018D428D121DBDBDD8132CB20E2E917CD2CE71AE9F0E45538D822F0F719F3395126F7F8D2D2FCFD03D843E04082380CC643C843A13A86'+\r\n '091D8E834843E2448A332C6AC358D11422C7880A3FE6082972A4C0920517A24CB9D14402003B';\r\n\r\nvar\r\n WebLibDlg: TMessageDlg;\r\n WebLibInputDlg: TInputMessageDlg;\r\n\r\n\r\n{$HINTS OFF}\r\nfunction EventResult(Event: TEventListenerEvent): string;\r\nbegin\r\n asm\r\n Result = Event.target.result;\r\n end;\r\nend;\r\n{$HINTS ON}\r\n\r\nfunction StringToHTML(AValue: string): string;\r\nbegin\r\n Result := StringReplace(AValue,#13,'
',[rfReplaceAll]);\r\n Result := StringReplace(Result,#10,'',[rfReplaceAll]);\r\nend;\r\n\r\nprocedure ShowMessage(AMsg: string);\r\nbegin\r\n if (Application <> nil) and (Application.MainForm <> nil) and (Application.MainForm.CSSLibrary = cssBootstrap) then\r\n begin\r\n MessageDlg(AMsg, mtInformation, [mbOK]);\r\n end\r\n else\r\n begin\r\n asm\r\n alert(AMsg);\r\n end;\r\n end;\r\nend;\r\n\r\nfunction InputBox(const ACaption, APrompt, ADefault: string): string;\r\nvar\r\n retvalue: string;\r\nbegin\r\n//\r\n asm\r\n retvalue = prompt(APrompt, ADefault);\r\n if (retvalue == null) {\r\n retvalue = \"\";\r\n }\r\n end;\r\n\r\n Result := retvalue;\r\nend;\r\n\r\nfunction InputQuery(const ACaption, APrompt: string; var Value: string): Boolean; overload;\r\nvar\r\n retvalue: boolean;\r\n s: string;\r\nbegin\r\n retvalue := true;\r\n s := Value;\r\n\r\n asm\r\n var text = s;\r\n s = prompt(APrompt, text);\r\n if (s == null) {\r\n retvalue = false;\r\n }\r\n end;\r\n\r\n if retvalue then\r\n Value := s;\r\n\r\n Result := retvalue;\r\nend;\r\n\r\nfunction Confirm(const Value: string): boolean;\r\nvar\r\n res: boolean;\r\nbegin\r\n asm\r\n res = confirm(Value);\r\n end;\r\n Result := res;\r\nend;\r\n\r\nfunction MessageDlgAsync(const Msg: string; DlgType: TMsgDlgType; Buttons: TMsgDlgButtons): integer; async;\r\nbegin\r\n if not Assigned(WebLibDlg) then\r\n begin\r\n WebLibDlg := TMessageDlg.Create(nil);\r\n if Application.MainForm.CSSLibrary = cssBootstrap then\r\n begin\r\n TMessageDlg(WebLibDlg).InitBootstrapStyle;\r\n end;\r\n end;\r\n\r\n Result := await(integer, WebLibDlg.ShowDialog(Msg, DlgType, Buttons));\r\nend;\r\n\r\nprocedure MessageDlg(const Msg: string; DlgType: TMsgDlgType; Buttons: TMsgDlgButtons; AResultProc: TDialogResultProc = nil);\r\nbegin\r\n if not Assigned(WebLibDlg) then\r\n begin\r\n WebLibDlg := TMessageDlg.Create(nil);\r\n if Application.MainForm.CSSLibrary = cssBootstrap then\r\n begin\r\n TMessageDlg(WebLibDlg).InitBootstrapStyle;\r\n end;\r\n end;\r\n\r\n WebLibDlg.ShowDialog(Msg, DlgType, Buttons, AResultProc);\r\nend;\r\n\r\nprocedure InputMessageDlg(const Msg: string; DlgType: TMsgDlgType; Buttons: TMsgDlgButtons; var AResult: string; AInputType: TInputType = itText; AResultProc: TDialogResultProc = nil);\r\n\r\n procedure ResultHandler(AModalResult: TModalResult);\r\n begin\r\n if AModalResult <> mrCancel then\r\n AResult := WebLibInputDlg.GetInputElementValue;\r\n\r\n if Assigned(AResultProc) then\r\n AResultProc(AModalResult);\r\n end;\r\n\r\nbegin\r\n if not Assigned(WebLibInputDlg) then\r\n begin\r\n WebLibInputDlg := TInputMessageDlg.Create(nil);\r\n\r\n if Application.MainForm.CSSLibrary = cssBootstrap then\r\n begin\r\n TInputMessageDlg(WebLibInputDlg).InitBootstrapStyle;\r\n end;\r\n end;\r\n\r\n WebLibInputDlg.InputValue := AResult;\r\n WebLibInputDlg.InputType := AInputType;\r\n\r\n WebLibInputDlg.ShowDialog(Msg, DlgType, Buttons, @ResultHandler);\r\nend;\r\n\r\nfunction InputMessageDlgAsync(const Msg: string; DlgType: TMsgDlgType; Buttons: TMsgDlgButtons; var AResult: string; AInputType: TInputType = itText): integer; async;\r\nbegin\r\n\r\n if not Assigned(WebLibInputDlg) then\r\n begin\r\n WebLibInputDlg := TInputMessageDlg.Create(nil);\r\n\r\n if Application.MainForm.CSSLibrary = cssBootstrap then\r\n begin\r\n TInputMessageDlg(WebLibInputDlg).InitBootstrapStyle;\r\n end;\r\n end;\r\n\r\n WebLibInputDlg.InputValue := AResult;\r\n WebLibInputDlg.InputType := AInputType;\r\n\r\n Result := await(integer, WebLibInputDlg.ShowDialog(Msg, DlgType, Buttons));\r\n AResult := WebLibInputDlg.GetInputElementValue;\r\nend;\r\n\r\n{ TMessageDlg }\r\n\r\nprocedure TMessageDlg.CreateInitialize;\r\nbegin\r\n inherited;\r\n FOpacity := 0.2;\r\n FMessage := '';\r\n FAutoLanguage := true;\r\n FMsgDlgType := mtInformation;\r\n FDialogText := TStringList.Create;\r\n FDialogText.SkipLastLinebreak := true;\r\n FDialogText.Add(SWarning); // 0\r\n FDialogText.Add(SError); // 1\r\n FDialogText.Add(SInformation); // 2\r\n FDialogText.Add(SConfirm); // 3\r\n FDialogText.Add('Custom'); // 4\r\n FDialogText.Add(SOK); // 5\r\n FDialogText.Add(SCancel); // 6\r\n FDialogText.Add(SYes); // 7\r\n FDialogText.Add(SNo); // 8\r\n FDialogText.Add(SAbort); // 9\r\n FDialogText.Add(SRetry); // 10\r\n FDialogText.Add(SIgnore); // 11\r\n FDialogText.Add(SAll); // 12\r\n FDialogText.Add(SYestoAll); // 13\r\n FDialogText.Add(SNotoAll); // 14\r\n FDialogText.Add(SHelp); // 15\r\n FDialogText.Add(SClose); // 16\r\n\r\n FMsgDlgType := mtCustom;\r\n\r\n FCustomButtons := TCustomDialogButtons.Create(Self, TCustomDialogButton);\r\n FCustomButtons.PropName := 'CustomButtons';\r\nend;\r\n\r\ndestructor TMessageDlg.Destroy;\r\nbegin\r\n FDialogText.Free;\r\n FCustomButtons.Free;\r\n inherited;\r\nend;\r\n\r\nfunction TMessageDlg.GetDialogText(Index: integer): string;\r\ntype\r\n TLang = (lEN, lFR, lDE, lES, lNL);\r\nvar\r\n locl: string;\r\n l: TLang;\r\nbegin\r\n Result := 'Undefined';\r\n\r\n if Index < FDialogText.Count then\r\n Result := FDialogText.Strings[Index];\r\n\r\n if AutoLanguage then\r\n begin\r\n locl := GetBrowserLocale;\r\n\r\n l := lEN;\r\n if pos('es', locl) = 1 then\r\n l := lES;\r\n if pos('fr', locl) = 1 then\r\n l := lFR;\r\n if pos('de', locl) = 1 then\r\n l := lDE;\r\n if pos('nl', locl) = 1 then\r\n l := lNL;\r\n\r\n// FDialogText.Add(SWarning); // 0\r\n// FDialogText.Add(SError); // 1\r\n// FDialogText.Add(SInformation); // 2\r\n// FDialogText.Add(SConfirm); // 3\r\n// FDialogText.Add('Custom'); // 4\r\n// FDialogText.Add(SOK); // 5\r\n// FDialogText.Add(SCancel); // 6\r\n// FDialogText.Add(SYes); // 7\r\n// FDialogText.Add(SNo); // 8\r\n// FDialogText.Add(SAbort); // 9\r\n// FDialogText.Add(SRetry); // 10\r\n// FDialogText.Add(SIgnore); // 11\r\n// FDialogText.Add(SAll); // 12\r\n// FDialogText.Add(SYestoAll); // 13\r\n// FDialogText.Add(SNotoAll); // 14\r\n// FDialogText.Add(SHelp); // 15\r\n// FDialogText.Add(SClose); // 16\r\n\r\n case l of\r\n lES:\r\n begin\r\n case Index of\r\n 0: Result := SWarningES;\r\n 1: Result := SErrorES;\r\n 2: Result := SInformationES;\r\n 3: Result := SConfirmES;\r\n// 4: Result :=\r\n 5: Result := SOKES;\r\n 6: Result := SCancelES;\r\n 7: Result := SYesES;\r\n 8: Result := SNoES;\r\n 9: Result := SAbortES;\r\n 10: Result := SRetryES;\r\n 11: Result := SIgnoreES;\r\n 12: Result := SAllES;\r\n 13: Result := SYesToAllES;\r\n 14: Result := SNoToAllES;\r\n 15: Result := SHelpES;\r\n 16: Result := SCloseES;\r\n end;\r\n end;\r\n lFR:\r\n begin\r\n case Index of\r\n 0: Result := SWarningFR;\r\n 1: Result := SErrorFR;\r\n 2: Result := SInformationFR;\r\n 3: Result := SConfirmFR;\r\n// 4: Result :=\r\n 5: Result := SOKFR;\r\n 6: Result := SCancelFR;\r\n 7: Result := SYesFR;\r\n 8: Result := SNoFR;\r\n 9: Result := SAbortFR;\r\n 10: Result := SRetryFR;\r\n 11: Result := SIgnoreFR;\r\n 12: Result := SAllFR;\r\n 13: Result := SYesToAllFR;\r\n 14: Result := SNoToAllFR;\r\n 15: Result := SHelpFR;\r\n 16: Result := SCloseFR;\r\n end;\r\n end;\r\n lDE:\r\n begin\r\n case Index of\r\n 0: Result := SWarningDE;\r\n 1: Result := SErrorDE;\r\n 2: Result := SInformationDE;\r\n 3: Result := SConfirmDE;\r\n// 4: Result :=\r\n 5: Result := SOKDE;\r\n 6: Result := SCancelDE;\r\n 7: Result := SYesDE;\r\n 8: Result := SNoDE;\r\n 9: Result := SAbortDE;\r\n 10: Result := SRetryDE;\r\n 11: Result := SIgnoreDE;\r\n 12: Result := SAllDE;\r\n 13: Result := SYesToAllDE;\r\n 14: Result := SNoToAllDE;\r\n 15: Result := SHelpDE;\r\n 16: Result := SCloseDE;\r\n end;\r\n end;\r\n lNL:\r\n begin\r\n case Index of\r\n 0: Result := SWarningNL;\r\n 1: Result := SErrorNL;\r\n 2: Result := SInformationNL;\r\n 3: Result := SConfirmNL;\r\n// 4: Result :=\r\n 5: Result := SOKNL;\r\n 6: Result := SCancelNL;\r\n 7: Result := SYesNL;\r\n 8: Result := SNoNL;\r\n 9: Result := SAbortNL;\r\n 10: Result := SRetryNL;\r\n 11: Result := SIgnoreNL;\r\n 12: Result := SAllNL;\r\n 13: Result := SYesToAllNL;\r\n 14: Result := SNoToAllNL;\r\n 15: Result := SHelpNL;\r\n 16: Result := SCloseNL;\r\n end;\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TMessageDlg.BindEvents;\r\nbegin\r\n//\r\nend;\r\n\r\nfunction TMessageDlg.ShowDialog: integer;\r\nbegin\r\n Result := mrNone;\r\n Show;\r\nend;\r\n\r\nfunction TMessageDlg.ShowDialog(Msg: string; DlgType: TMsgDlgType; Buttons: TMsgDlgButtons; AProc: TDialogResultProc = nil): TDialogResult;\r\nbegin\r\n Result := mrNone;\r\n FButtons := Buttons;\r\n FMessage := Msg;\r\n FMsgDlgType := DlgType;\r\n FDialogProc := AProc;\r\n DialogResult := mrNone;\r\n Show;\r\nend;\r\n\r\nfunction TMessageDlg.CreateButton(Caption: string; var DoFocus: boolean; AClass: string = ''): TJSHTMLElement;\r\nbegin\r\n Result := TJSHTMLElement(document.createElement('BUTTON'));\r\n Result.innerHTML := Caption;\r\n\r\n if Application.MainForm.CSSLibrary = cssBootstrap then\r\n begin\r\n Result['type'] := 'BUTTON';\r\n Result['class'] := 'btn ' + AClass;\r\n Result['data-dismiss'] := 'modal-dialog';\r\n end\r\n else\r\n begin\r\n Result.style.setProperty('width', '100px');\r\n Result.style.setProperty('margin-left', '5px');\r\n if ElementButtonClassName <> '' then\r\n Result['class'] := ElementButtonClassName + ' ' + AClass\r\n else\r\n if Application.ThemeButtonClassName <> '' then\r\n Result['class'] := Application.ThemeButtonClassName + ' ' + AClass;\r\n end;\r\n\r\n Result.id := Caption;\r\n Result.addEventListener('click', @HandleButtonClick);\r\n Result.addEventListener('keydown', @HandleKeyDown);\r\n\r\n if DoFocus then\r\n begin\r\n asm\r\n setTimeout(function() {Result.focus();}, 1);\r\n end;\r\n DoFocus := false;\r\n end;\r\nend;\r\n\r\nfunction TMessageDlg.CreateElement: TJSElement;\r\nbegin\r\n if (csDesigning in ComponentState) then\r\n Result := nil\r\n else\r\n inherited;\r\nend;\r\n\r\nprocedure TMessageDlg.Show;\r\nvar\r\n title, msg, icon, content, contentdiv, bar, edlg, eh, cancel: TJSHTMLElement;\r\n adiv,ldiv,cdiv: TJSElement;\r\n MsgSymbol, MsgColor, MsgTitle, BorderColor, BarBGColor, BarHeight, Padding: string;\r\n btnFocus: boolean;\r\n i: Integer;\r\n\r\nbegin\r\n if (Application = nil) or (Application.MainForm = nil) then\r\n Exit;\r\n\r\n // verify material icons\r\n if not Application.HasCSS(lMaterial) then\r\n AddControlLink('material',lMaterial);\r\n\r\n Application.LockForm(Application.MainForm);\r\n\r\n FLayer := document.createElement('SPAN');\r\n document.body.appendChild(FLayer);\r\n FLayer['tabindex'] := '0';\r\n FLayer.addEventListener('keydown', @HandleKeyDown);\r\n\r\n btnFocus := true;\r\n FMessage := StringToHTML(FMessage);\r\n\r\n case FMsgDlgType of\r\n mtWarning: begin MsgSymbol := 'warning'; MsgColor := 'orange'; MsgTitle := GetDialogText(0); end;\r\n mtError: begin MsgSymbol := 'cancel'; MsgColor := 'red'; MsgTitle := GetDialogText(1); end;\r\n mtInformation: begin MsgSymbol := 'info'; MsgColor := 'blue'; MsgTitle := GetDialogText(2); end;\r\n mtConfirmation: begin MsgSymbol := 'help'; MsgColor := 'blue'; MsgTitle := GetDialogText(3); end;\r\n mtCustom: begin MsgSymbol := ''; MsgColor := ''; MsgTitle := GetDialogText(4); end;\r\n end;\r\n\r\n if FTitle <> '' then\r\n MsgTitle := FTitle;\r\n\r\n if Application.MainForm.CSSLibrary = cssBootstrap then\r\n begin\r\n FDlg := document.createElement('DIV');\r\n FDlg['class'] := 'modal-dialog'; // modal-dialog-centered';\r\n FDlg['role'] := 'document';\r\n\r\n // app wide highest z-index\r\n TJSHTMLElement(FDlg).style.setProperty('z-index', '1999998');\r\n\r\n // insert opaque background on entire window\r\n eh := TJSHTMLElement(document.createElement('DIV'));\r\n// eh.style.setProperty('position', 'absolute');\r\n eh.style.setProperty('top', '0');\r\n eh.style.setProperty('left', '0');\r\n eh.style.setProperty('right', '0');\r\n eh.style.setProperty('bottom', '0');\r\n eh.style.setProperty('z-index', '1999997');\r\n eh.style.setProperty('display', 'block');\r\n eh['class'] := 'modal show fade';\r\n document.body.appendChild(eh);\r\n eh.appendChild(FDlg);\r\n\r\n ldiv := FDlg;\r\n\r\n adiv := document.createElement('DIV');\r\n adiv['class'] := 'modal-content ' + ElementDialogClassName;\r\n ldiv.appendChild(adiv);\r\n\r\n cdiv := adiv;\r\n ldiv := adiv;\r\n\r\n adiv := document.createElement('DIV');\r\n adiv['class'] := 'modal-header';\r\n cdiv.appendChild(adiv);\r\n\r\n ldiv := adiv;\r\n\r\n adiv := document.createElement('H5');\r\n adiv['class'] := 'modal-title';\r\n adiv.innerHTML := MsgTitle;\r\n\r\n ldiv.appendChild(adiv);\r\n\r\n if (mbCancel in Buttons) then\r\n begin\r\n adiv := document.createElement('BUTTON');\r\n adiv['type'] := 'button';\r\n adiv['class'] := 'close btn btn-danger';\r\n adiv['data-dismiss'] := 'modal-dialog';\r\n adiv['aria-label'] := 'Close';\r\n adiv['id'] := GetDialogText(6);\r\n adiv.addEventListener('click', @HandleButtonClick);\r\n\r\n ldiv.appendChild(adiv);\r\n ldiv := adiv;\r\n\r\n adiv := document.createElement('SPAN');\r\n adiv['aria-hidden'] := 'true';\r\n adiv['id'] := GetDialogText(6);\r\n adiv.innerHTML := '×';\r\n\r\n ldiv.appendChild(adiv);\r\n end;\r\n\r\n adiv := document.createElement('DIV');\r\n adiv['class'] := 'modal-body';\r\n cdiv.appendChild(adiv);\r\n\r\n ldiv := adiv;\r\n\r\n if FMsgDlgType <> mtCustom then\r\n begin\r\n icon := TJSHTMLElement(document.createElement('SPAN'));\r\n icon.innerHTML := '' + MsgSymbol + '';\r\n icon.style.setProperty('display', 'inline-block');\r\n icon.style.setProperty('float', 'left');\r\n icon.style.setProperty('padding-right', '15px');\r\n ldiv.appendChild(icon);\r\n end;\r\n\r\n adiv := document.createElement('H6');\r\n adiv.innerHTML := FMessage;\r\n\r\n ldiv.appendChild(adiv);\r\n\r\n InsertInputElement(TJSHTMLElement(ldiv), btnFocus);\r\n\r\n adiv := document.createElement('DIV');\r\n adiv['class'] := 'modal-footer';\r\n cdiv.appendChild(adiv);\r\n\r\n ldiv := adiv;\r\n\r\n bar := TJSHTMLElement(ldiv);\r\n\r\n FDlg := eh;\r\n end\r\n else\r\n begin\r\n Padding := '5';\r\n BarHeight := '26';\r\n BarBGColor := '#f1f1f1';\r\n BorderColor := '#ababab';\r\n\r\n FDlg := document.createElement('DIV');\r\n document.body.appendChild(FDlg);\r\n\r\n edlg := TJSHTMLElement(FDlg);\r\n\r\n if ElementDialogClassName <> '' then\r\n edlg['class'] := ElementDialogClassName\r\n else\r\n begin\r\n edlg.style.setProperty('background-color', 'white');\r\n edlg.style.setProperty('border', '1px solid ' + BorderColor);\r\n edlg.style.setProperty('font-family', 'Arial');\r\n edlg.style.setProperty('font-size', '10pt');\r\n end;\r\n\r\n edlg.style.setProperty('cursor', 'default');\r\n edlg.style.setProperty('position', 'fixed');\r\n edlg.style.setProperty('min-width', '300px');\r\n edlg.style.setProperty('min-height', '125px');\r\n edlg.style.setProperty('max-width', '100%');\r\n edlg.style.setProperty('max-height', '100%');\r\n edlg.style.setProperty('top', '50%');\r\n edlg.style.setProperty('left', '50%');\r\n edlg.style.setProperty('transform', 'translate(-50%, -50%)');\r\n edlg.style.setProperty('z-index', '1999998');\r\n edlg.style.setProperty('box-shadow','5px 5px 5px gray');\r\n\r\n cancel := TJSHTMLElement(document.createElement('DIV'));\r\n FCancel := cancel;\r\n cancel.innerHTML := 'clear';\r\n cancel.id := 'Cancel';\r\n cancel.style.setProperty('color', ColorToHTML(Application.ThemeTextColor));\r\n cancel.style.setProperty('position', 'fixed');\r\n cancel.style.setProperty('top', '0');\r\n cancel.style.setProperty('right', '0');\r\n cancel.style.setProperty('padding', Padding + 'px');\r\n cancel.style.setProperty('height', BarHeight + 'px');\r\n cancel.style.setProperty('line-height', BarHeight + 'px');\r\n cancel.addEventListener('click', @HandleButtonClick);\r\n edlg.appendChild(cancel);\r\n\r\n title := TJSHTMLElement(document.createElement('DIV'));\r\n title.innerHTML := MsgTitle;\r\n\r\n if FElementTitleClassName <> '' then\r\n begin\r\n title['class'] := FElementTitleClassName;\r\n end\r\n else\r\n begin\r\n title.style.setProperty('background-color', ColorToHTML(Application.ThemeColor));\r\n title.style.setProperty('color', ColorToHTML(Application.ThemeTextColor));\r\n end;\r\n\r\n title.style.setProperty('cursor', 'move');\r\n title.style.setProperty('padding-left', Padding + 'px');\r\n title.style.setProperty('height', BarHeight + 'px');\r\n title.style.setProperty('vertical-align','middle');\r\n title.style.setProperty('line-height', BarHeight + 'px');\r\n title.style.setProperty('border-bottom', '1px solid ' + BorderColor);\r\n\r\n title.style.setProperty('-moz-user-select','none');\r\n title.style.setProperty('-webkit-user-select','none');\r\n title.style.setProperty('-ms-user-select','none');\r\n title.style.setProperty('user-select','none');\r\n title.style.setProperty('-o-user-select','none');\r\n\r\n title.addEventListener('mousedown',@HandleMouseDown);\r\n\r\n edlg.appendChild(title);\r\n\r\n msg := TJSHTMLElement(document.createElement('DIV'));\r\n\r\n msg.style.setProperty('padding', Padding + 'px');\r\n msg.style.setProperty('height', 'auto');\r\n msg.style.setProperty('min-height', '50px');\r\n msg.style.setProperty('border-bottom', '1px solid ' + BorderColor);\r\n\r\n if FMsgDlgType <> mtCustom then\r\n begin\r\n icon := TJSHTMLElement(document.createElement('DIV'));\r\n icon.innerHTML := '' + MsgSymbol + '';\r\n icon.style.setProperty('display', 'inline-block');\r\n icon.style.setProperty('float', 'left');\r\n icon.style.setProperty('padding-right', '15px');\r\n msg.appendChild(icon);\r\n end;\r\n\r\n FMessage := StringReplace(FMessage, sLineBreak, '
', [rfReplaceAll]);\r\n\r\n contentdiv := TJSHTMLElement(document.createElement('DIV'));\r\n contentdiv.innerHTML := FMessage;\r\n contentdiv.style.setProperty('height','auto');\r\n contentdiv.style.setProperty('min-height','50px');\r\n contentdiv.style.setProperty('white-space','pre-wrap');\r\n\r\n content := TJSHTMLElement(document.createElement('LABEL'));\r\n content.innerHTML := FMessage;\r\n\r\n if FElementTitleClassName <> '' then\r\n begin\r\n content['class'] := FElementContentClassName;\r\n end;\r\n\r\n contentdiv.appendChild(content);\r\n\r\n msg.appendChild(content);\r\n\r\n InsertInputElement(msg, btnFocus);\r\n\r\n edlg.appendChild(msg);\r\n\r\n bar := TJSHTMLElement(document.createElement('DIV'));\r\n bar.style.setProperty('background-color', BarBGColor);\r\n bar.style.setProperty('padding', Padding + 'px');\r\n bar.style.setProperty('min-height', BarHeight + 'px');\r\n bar.style.setProperty('height', 'auto');\r\n bar.style.setProperty('line-height', BarHeight + 'px');\r\n bar.style.setProperty('text-align', 'right');\r\n edlg.appendChild(bar);\r\n end;\r\n\r\n if (FButtons = []) and (CustomButtons.Count = 0) then\r\n bar.appendChild(CreateButton(GetDialogText(5), btnFocus))\r\n else\r\n begin\r\n if mbYes in FButtons then\r\n bar.appendChild(CreateButton(GetDialogText(7), btnFocus));\r\n\r\n if mbNo in FButtons then\r\n bar.appendChild(CreateButton(GetDialogText(8), btnFocus));\r\n\r\n if mbOK in FButtons then\r\n bar.appendChild(CreateButton(GetDialogText(5), btnFocus));\r\n\r\n if mbCancel in FButtons then\r\n bar.appendChild(CreateButton(GetDialogText(6), btnFocus));\r\n\r\n if mbAbort in FButtons then\r\n bar.appendChild(CreateButton(GetDialogText(9), btnFocus));\r\n\r\n if mbRetry in FButtons then\r\n bar.appendChild(CreateButton(GetDialogText(10), btnFocus));\r\n\r\n if mbIgnore in FButtons then\r\n bar.appendChild(CreateButton(GetDialogText(11), btnFocus));\r\n\r\n if mbAll in FButtons then\r\n bar.appendChild(CreateButton(GetDialogText(12), btnFocus));\r\n\r\n if mbYesToAll in FButtons then\r\n bar.appendChild(CreateButton(GetDialogText(13), btnFocus));\r\n\r\n if mbNoToAll in FButtons then\r\n bar.appendChild(CreateButton(GetDialogText(14), btnFocus));\r\n\r\n if mbHelp in FButtons then\r\n bar.appendChild(CreateButton(GetDialogText(15), btnFocus));\r\n\r\n if mbClose in FButtons then\r\n bar.appendChild(CreateButton(GetDialogText(16), btnFocus));\r\n end;\r\n\r\n for i := 0 to FCustomButtons.Count - 1 do\r\n begin\r\n bar.appendChild(CreateButton(FCustomButtons[i].Caption, btnFocus, FCustomButtons[i].ElementClassName));\r\n end;\r\n\r\n eh := TJSHTMLElement(FLayer);\r\n eh.style.setProperty('background-color', 'black');\r\n eh.style.setProperty('opacity', DoubleToHTML(Opacity));\r\n eh.style.setProperty('top', '0');\r\n eh.style.setProperty('left', '0');\r\n eh.style.setProperty('right', '0');\r\n eh.style.setProperty('bottom', '0');\r\n eh.style.setProperty('z-index', Application.MaxZIndexStr);\r\n\r\n eh.style.setProperty('webkit-user-select', 'none');\r\n eh.style.setProperty('moz-user-select', 'none');\r\n eh.style.setProperty('khtml-user-select', 'none');\r\n eh.style.setProperty('ms-user-select', 'none');\r\n eh.style.setProperty('user-select', 'none');\r\n eh.style.SetProperty('position','fixed');\r\nend;\r\n\r\nfunction TMessageDlg.ShowAsync: TJSPromise;\r\nbegin\r\n Result := TJSPromise.new(\r\n\r\n procedure(ASuccess, AFailed: TJSPromiseResolver)\r\n begin\r\n ShowDialog(Message, DialogType, Buttons, procedure(AResult: TModalResult)\r\n begin\r\n ASuccess(AResult);\r\n end);\r\n end\r\n\r\n );\r\nend;\r\n\r\nfunction TMessageDlg.ShowDialog(Msg: string; DlgType: TMsgDlgType;\r\n Buttons: TMsgDlgButtons): TJSPromise;\r\nbegin\r\n Result := TJSPromise.new(\r\n\r\n procedure(ASuccess, AFailed: TJSPromiseResolver)\r\n begin\r\n ShowDialog(Msg, DlgType, Buttons, procedure(AResult: TModalResult)\r\n begin\r\n ASuccess(AResult);\r\n end);\r\n end\r\n\r\n );\r\nend;\r\n\r\nprocedure TMessageDlg.SetCustomButtons(const Value: TCustomDialogButtons);\r\nbegin\r\n FCustomButtons.Assign(Value);\r\nend;\r\n\r\nprocedure TMessageDlg.SetDialogResult(const Value: TDialogResult);\r\nbegin\r\n FDialogResult := Value;\r\n if (FDialogResult <> mrNone) then\r\n Close;\r\nend;\r\n\r\nprocedure TMessageDlg.SetDialogText(const Value: TStringList);\r\nbegin\r\n FDialogText.Assign(Value);\r\nend;\r\n\r\nprocedure TMessageDlg.Close;\r\nbegin\r\n Application.UnlockForm(Application.MainForm);\r\n\r\n document.body.removeChild(FLayer);\r\n document.body.removeChild(FDlg);\r\n\r\n FDown := false;\r\n FCaptured := false;\r\n\r\n if Assigned(OnClose) then\r\n OnClose(Self);\r\n\r\n if Assigned(FDialogProc) then\r\n FDialogProc(FDialogResult);\r\nend;\r\n\r\nfunction TMessageDlg.HandleButtonClick(Event: TJSMouseEvent): Boolean;\r\nvar\r\n id: string;\r\n i: integer;\r\nbegin\r\n DialogResult := mrNone;\r\n\r\n id := Event.targetElement['id'];\r\n\r\n if id = GetDialogText(7) then\r\n DialogResult := mrYes\r\n else if id = GetDialogText(8) then\r\n DialogResult := mrNo\r\n else if id = GetDialogText(5) then\r\n DialogResult := mrOK\r\n else if id = GetDialogText(6) then\r\n DialogResult := mrCancel\r\n else if id = GetDialogText(9) then\r\n DialogResult := mrAbort\r\n else if id = GetDialogText(10) then\r\n DialogResult := mrRetry\r\n else if id = GetDialogText(11) then\r\n DialogResult := mrIgnore\r\n else if id = GetDialogText(12) then\r\n DialogResult := mrAll\r\n else if id = GetDialogText(13) then\r\n DialogResult := mrNoToAll\r\n else if id = GetDialogText(14) then\r\n DialogResult := mrYesToAll\r\n else if id = GetDialogText(15) then\r\n DialogResult := mrHelp\r\n else if id = GetDialogText(16) then\r\n DialogResult := mrClose;\r\n\r\n if (DialogResult = mrNone) and (CustomButtons.Count > 0) then\r\n begin\r\n for i := 0 to CustomButtons.Count - 1 do\r\n begin\r\n if id = CustomButtons[i].Caption then\r\n begin\r\n DialogResult := 100 + i;\r\n break;\r\n end;\r\n\r\n end;\r\n end;\r\n\r\n if Assigned(OnButtonClick) then\r\n OnButtonClick(Self);\r\n\r\n Result := true;\r\nend;\r\n\r\nfunction TMessageDlg.HandleDocMouseMove(Event: TJSMouseEvent): Boolean;\r\nvar\r\n deltax,deltay: double;\r\n el: TJSHTMLElement;\r\nbegin\r\n if FDown then\r\n begin\r\n deltax := Event.screenX - FMdx;\r\n deltay := Event.screenY - FMdy;\r\n\r\n el := TJSHTMLElement(FDlg);\r\n\r\n el.style.setProperty('transform','');\r\n el.style.setProperty('position','absolute');\r\n el.style.setProperty('left', inttostr(round(FDlgX + deltax))+'px');\r\n el.style.setProperty('top', inttostr(round(FDlgY + deltay))+'px');\r\n\r\n el := TJSHTMLElement(FCancel);\r\n el.style.setProperty('position', 'absolute');\r\n el.style.setProperty('top', '0');\r\n el.style.setProperty('right', '0');\r\n end;\r\n\r\n Result := true;\r\nend;\r\n\r\nfunction TMessageDlg.HandleDocMouseUp(Event: TJSMouseEvent): Boolean;\r\nbegin\r\n FDown := false;\r\n document.body.removeEventListener('mousemove', @HandleDocMouseMove);\r\n document.body.removeEventListener('mouseup', @HandleDocMouseUp);\r\n\r\n Result := true;\r\nend;\r\n\r\nfunction TMessageDlg.HandleMouseDown(Event: TJSMouseEvent): Boolean;\r\nvar\r\n r: TJSDOMRect;\r\nbegin\r\n FMdx := Round(Event.screenX);\r\n FMdy := Round(Event.screenY);\r\n\r\n r := FDlg.getBoundingClientRect();\r\n\r\n FDlgX := Round(int(r.left));\r\n FDlgY := Round(int(r.top));\r\n\r\n FDown := true;\r\n\r\n if not FCaptured then\r\n begin\r\n FCaptured := true;\r\n document.body.addEventListener('mousemove', @HandleDocMouseMove);\r\n document.body.addEventListener('mouseup', @HandleDocMouseUp);\r\n end;\r\n\r\n Result := true;\r\nend;\r\n\r\nprocedure TMessageDlg.InitBootstrapStyle;\r\nbegin\r\n FElementButtonClassName := 'btn';\r\n FElementContentClassName := 'text-body';\r\n FElementTitleClassName := 'text-body';\r\n FElementDialogClassName := 'shadow-lg p-3 mb-5 bg-white rounded';\r\nend;\r\n\r\nprocedure TMessageDlg.InsertInputElement(AElement: TJSHTMLElement; var DoFocus: boolean);\r\nbegin\r\n //\r\nend;\r\n\r\nfunction TMessageDlg.HandleKeyDown(Event: TJSKeyBoardEvent): Boolean;\r\nvar\r\n k: Word;\r\nbegin\r\n k := GetKeyCode(Event.Key);\r\n if not Assigned(k) then\r\n Exit;\r\n if k = VK_ESCAPE then\r\n DialogResult := mrCancel;\r\n Result := true;\r\nend;\r\n\r\n{ TWaitMessage }\r\n\r\nfunction TWaitMessage.CreateElement: TJSElement;\r\nbegin\r\n if (csDesigning in ComponentState) then\r\n Result := nil\r\n else\r\n inherited;\r\nend;\r\n\r\nprocedure TWaitMessage.CreateInitialize;\r\nbegin\r\n inherited;\r\n FOpacity := 0.2;\r\n FPicture := TURLPicture.Create;\r\n FIsWaiting := false;\r\n FPicture.Data := lWaitCursor;\r\n FShowId := 0;\r\n FHideId := 0;\r\n\r\nend;\r\n\r\ndestructor TWaitMessage.Destroy;\r\nbegin\r\n FPicture.Free;\r\n inherited;\r\nend;\r\n\r\nprocedure TWaitMessage.Hide;\r\nbegin\r\n if FIsWaiting then\r\n document.body.removeChild(FLayer);\r\n FIsWaiting := false;\r\n\r\n if FShowId > 0 then\r\n window.clearTimeout(FShowId);\r\n if FHideId > 0 then\r\n window.clearTimeout(FHideId);\r\n\r\n FShowId := 0;\r\n FHideId := 0;\r\nend;\r\n\r\nprocedure TWaitMessage.SetPicture(const Value: TURLPicture);\r\nbegin\r\n FPicture.Assign(Value);\r\nend;\r\n\r\nprocedure TWaitMessage.SetPictureURL(const Value: string);\r\nbegin\r\n FPictureURL := Value;\r\nend;\r\n\r\nprocedure TWaitMessage.Show;\r\nvar\r\n eh,img,dv: TJSHTMLElement;\r\n el: TJSElement;\r\nbegin\r\n FLayer := document.createElement('SPAN');\r\n\r\n eh := TJSHTMLElement(FLayer);\r\n eh.style.setProperty('background-color', 'black');\r\n eh.style.setProperty('opacity', DoubleToHTML(Opacity));\r\n eh.style.setProperty('top', '0');\r\n eh.style.setProperty('left', '0');\r\n eh.style.setProperty('right', '0');\r\n eh.style.setProperty('bottom', '0');\r\n\r\n eh.style.setProperty('z-index', '9999999');\r\n\r\n eh.style.setProperty('webkit-user-select', 'none');\r\n eh.style.setProperty('moz-user-select', 'none');\r\n eh.style.setProperty('khtml-user-select', 'none');\r\n eh.style.setProperty('ms-user-select', 'none');\r\n eh.style.setProperty('user-select', 'none');\r\n eh.style.SetProperty('position','fixed');\r\n\r\n document.body.appendChild(FLayer);\r\n FLayer['tabindex'] := '0';\r\n\r\n el := document.createElement('DIV');\r\n dv := TJSHTMLElement(el);\r\n FLayer.appendChild(el);\r\n dv.style.SetProperty('position','relative');\r\n dv.style.SetProperty('width','100%');\r\n dv.style.SetProperty('height','100%');\r\n\r\n el := document.createElement('IMG');\r\n img := TJSHTMLElement(el);\r\n dv.appendChild(img);\r\n if FPictureURL <> '' then\r\n img['src'] := FPictureURL\r\n else\r\n img['src'] := FPicture.FileName;\r\n img.style.setProperty('position','absolute');\r\n img.style.setProperty('top', '0');\r\n img.style.setProperty('left', '0');\r\n img.style.setProperty('right', '0');\r\n img.style.setProperty('bottom', '0');\r\n img.style.setProperty('margin', 'auto');\r\n\r\n FIsWaiting := true;\r\n\r\n if Assigned(OnShow) then\r\n begin\r\n FShowID := window.setTimeout(@WaitDisplayed, 100);\r\n end;\r\n\r\n if FTimeOut > 0 then\r\n begin\r\n FHideID := window.setTimeout(@WaitHide, FTimeOut);\r\n end;\r\nend;\r\n\r\nprocedure TWaitMessage.WaitDisplayed;\r\nbegin\r\n if Assigned(OnShow) then\r\n OnShow(Self);\r\nend;\r\n\r\nprocedure TWaitMessage.WaitHide;\r\nbegin\r\n if Assigned(OnHide) then\r\n OnHide(Self);\r\n\r\n Hide;\r\nend;\r\n\r\n{ TCustomDialogButtons }\r\n\r\nfunction TCustomDialogButtons.Add: TCustomDialogButton;\r\nbegin\r\n Result := TCustomDialogButton(inherited Add);\r\nend;\r\n\r\nfunction TCustomDialogButtons.GetItem(AIndex: integer): TCustomDialogButton;\r\nbegin\r\n Result := TCustomDialogButton(inherited Items[AIndex]);\r\nend;\r\n\r\nfunction TCustomDialogButtons.Insert(AIndex: integer): TCustomDialogButton;\r\nbegin\r\n Result := TCustomDialogButton(inherited Insert(AIndex));\r\nend;\r\n\r\nprocedure TCustomDialogButtons.SetItem(AIndex: integer;\r\n const Value: TCustomDialogButton);\r\nbegin\r\n inherited Items[AIndex] := Value;\r\nend;\r\n\r\n{ TOpenDialog }\r\n\r\nconstructor TOpenDialog.Create(AOwner: TComponent);\r\nbegin\r\n inherited Create(AOwner);\r\n FFiles := TFiles.Create(Self);\r\nend;\r\n\r\nconstructor TOpenDialog.Create;\r\nbegin\r\n inherited Create;\r\n FFiles := TFiles.Create(Self);\r\nend;\r\n\r\n\r\ndestructor TOpenDialog.Destroy;\r\nbegin\r\n FFiles.Free;\r\n inherited;\r\nend;\r\n\r\nprocedure TOpenDialog.Execute(AProc: TOpenDialogProc);\r\nbegin\r\n FOpenDialogProc := AProc;\r\n Execute;\r\nend;\r\n\r\n{$HINTS OFF}\r\nprocedure TOpenDialog.Execute;\r\nvar\r\n ic: pointer;\r\n fp: TJSHTMLElement;\r\nbegin\r\n ic := @HandleInputChange;\r\n fp := TJSHTMLElement(document.createElement('input'));\r\n fp.setAttribute('type','file');\r\n if FMultiFile or (ofAllowMultiSelect in Options) then\r\n fp.setAttribute('multiple','');\r\n\r\n if FAccept <> '' then\r\n fp.SetAttribute('accept',FAccept);\r\n\r\n fp.addEventListener('change', ic);\r\n\r\n asm\r\n fp.click();\r\n end;\r\nend;\r\n{$HINTS ON}\r\n\r\nprocedure TOpenDialog.HandleInputChange(Event: TJSEvent);\r\nvar\r\n i,l,sz: integer;\r\n s,m: string;\r\n f: TFile;\r\n d: TJSDate;\r\n jsfile: TJSHTMLFile;\r\n\r\nbegin\r\n // clear existing collection\r\n while FFiles.Count > 0 do\r\n FFiles.Delete(0);\r\n\r\n asm\r\n var curFiles = Event.target.files;\r\n l = curFiles.length;\r\n end;\r\n\r\n for i := 0 to l - 1 do\r\n begin\r\n f := FFiles.Add;\r\n\r\n asm\r\n jsfile = curFiles[i];\r\n s = curFiles[i].name;\r\n m = curFiles[i].type;\r\n sz = curFiles[i].size;\r\n d = new Date(curFiles[i].lastModified);\r\n end;\r\n\r\n // get the first file\r\n if (i = 0) then\r\n FFileName := s;\r\n\r\n f.FileObject := jsfile;\r\n f.Name := s;\r\n f.MimeType := m;\r\n f.Size := sz;\r\n f.Modified := EncodeDate(d.Year + 1900, d.Month + 1, d.Date)+EncodeTime(d.Hours, d.Minutes, d.Seconds, d.Milliseconds);\r\n end;\r\n\r\n if Assigned(FOpenDialogProc) then\r\n FOpenDialogProc(FFileName);\r\n\r\n FOpenDialogProc := nil;\r\n\r\n if Assigned(OnChange) then\r\n OnChange(Self);\r\nend;\r\n\r\nfunction TOpenDialog.Perform: TJSPromise;\r\nbegin\r\n Result := TJSPromise.new(\r\n procedure(ASuccess, AFailed: TJSPromiseResolver)\r\n begin\r\n Execute(procedure(AFileName: string)\r\n begin\r\n ASuccess(AFileName);\r\n end);\r\n end\r\n\r\n );\r\nend;\r\n\r\n{ TInputMessageDlg }\r\n\r\nfunction TInputMessageDlg.GetInputElementValue: string;\r\nbegin\r\n Result := '';\r\n if Assigned(FInputElement) then\r\n begin\r\n FInputValue := TJSHTMLInputElement(FInputElement).Value;\r\n Result := FInputValue;\r\n end;\r\nend;\r\n\r\n\r\nfunction TInputMessageDlg.HandleInputKeydown(Event: TJSKeyBoardEvent): Boolean;\r\nbegin\r\n Result := true;\r\n if Event.key = 'Enter' then\r\n begin\r\n event.preventDefault();\r\n Event.stopPropagation;\r\n DialogResult := mrOK;\r\n Result := false;\r\n end;\r\n\r\n if Event.key = 'Escape' then\r\n begin\r\n event.preventDefault();\r\n Event.stopPropagation;\r\n DialogResult := mrCancel;\r\n Result := false;\r\n end;\r\nend;\r\n\r\nfunction TInputMessageDlg.HandleInputKeypress(Event: TJSKeyBoardEvent): Boolean;\r\nbegin\r\n Result := true;\r\n Event.stopPropagation;\r\n inherited;\r\nend;\r\n\r\nprocedure TInputMessageDlg.InsertInputElement(AElement: TJSHTMLElement; var DoFocus: boolean);\r\nvar\r\n divel,inputel: TJSElement;\r\nbegin\r\n inherited;\r\n\r\n if FKeydownHandler = nil then\r\n FKeydownHandler := @HandleInputKeyDown;\r\n\r\n if FKeypressHandler = nil then\r\n FKeypressHandler := @HandleInputKeypress;\r\n\r\n divel := document.createElement('DIV');\r\n\r\n inputel := document.createElement('INPUT');\r\n\r\n inputel.addEventListener('keydown', FKeydownHandler);\r\n inputel.addEventListener('keypress', FKeypressHandler);\r\n\r\n divel.appendChild(inputel);\r\n\r\n AElement.appendChild(divel);\r\n\r\n FInputElement := TJSHTMLElement(inputel);\r\n\r\n FInputElement['type'] := InputTypeString(InputType);\r\n\r\n TJSHTMLElement(divel).style.setProperty('margin-top','10px');\r\n\r\n FInputElement.style.setProperty('padding','4px');\r\n\r\n SetInputElementValue(FInputValue);\r\n\r\n FInputElement.style.setProperty('width','calc(100% - 80px)');\r\n\r\n if DoFocus then\r\n begin\r\n asm\r\n setTimeout(function() {inputel.focus(); inputel.select()}, 1);\r\n end;\r\n DoFocus := false;\r\n end;\r\nend;\r\n\r\nprocedure TInputMessageDlg.SetInputElementValue(AValue: string);\r\nbegin\r\n TJSHTMLInputElement(FInputElement).Value := AValue;\r\nend;\r\n\r\nfunction TInputMessageDlg.ShowAsync: TJSPromise;\r\nbegin\r\n Result := TJSPromise.new(\r\n\r\n procedure(ASuccess, AFailed: TJSPromiseResolver)\r\n begin\r\n ShowDialog(Message, DialogType, Buttons, procedure(AResult: TModalResult)\r\n begin\r\n InputValue := GetInputElementValue;\r\n ASuccess(AResult);\r\n end);\r\n end\r\n\r\n );\r\n\r\nend;\r\n\r\n{ TFileUpload }\r\n\r\n// https://css-tricks.com/drag-and-drop-file-uploading/\r\n// https://html5demos.com/dnd-upload/\r\n\r\nfunction isAdvancedUpload: boolean; assembler;\r\nasm\r\n var div = document.createElement('div');\r\n return (('draggable' in div) || ('ondragstart' in div && 'ondrop' in div)) && 'FormData' in window && 'FileReader' in window;\r\nend;\r\n\r\n\r\nprocedure TFileUpload.Clear;\r\nvar\r\n el: TJSElement;\r\nbegin\r\n el := document.getElementByID('FP'+ElementId);\r\n if Assigned(el) then\r\n begin\r\n el['type'] := '';\r\n el['type'] := 'file';\r\n end;\r\n\r\n el := document.getElementById(ElementID+'fileslist');\r\n if Assigned(el) then\r\n begin\r\n el.innerHTML := '';\r\n end;\r\n\r\n while Files.Count > 0 do\r\n Files.Delete(0);\r\nend;\r\n\r\nprocedure TFileUpload.ColorChanging;\r\nbegin\r\n inherited;\r\n UpdateElement;\r\nend;\r\n\r\nconstructor TFileUpload.Create(AOwner: TComponent);\r\nbegin\r\n inherited;\r\n\r\n Color := $00DFDAC8;\r\n FontHoverColor := $00d3bf39;\r\n Caption := 'Choose a file';\r\n FDragCaption := 'or drag it here';\r\n FDragColor := clNone;\r\n\r\n FShowPicture := true;\r\n FFiles := TFiles.Create(Self);\r\n\r\n FFileList := TStringList.Create;\r\n FFileList.SkipLastLineBreak := true;\r\nend;\r\n\r\nprocedure TFileUpload.CreateCSS;\r\nbegin\r\n AddControlStyle(\r\n ' \t.box'+\r\n\t'\t\t\t{'+\r\n//\t'\t\t\t\tfont-size: 1.25rem; /* 20 */'+\r\n//\t'\t\t\t\tbackground-color: #c8dadf;'+\r\n\t' \t\t\tposition: relative;'+\r\n\t'\t \tpadding: 2px 2px;'+\r\n\t'\t\t}'+\r\n\t'\t\t.box.has-advanced-upload'+\r\n\t'\t\t{'+\r\n\t'\t\t\toutline: 2px dashed #92b0b3;'+\r\n\t'\t\t\toutline-offset: -10px;'+\r\n\t'\t\t\t-webkit-transition: outline-offset .15s ease-in-out, background-color .15s linear;'+\r\n\t'\t\t\ttransition: outline-offset .15s ease-in-out, background-color .15s linear;'+\r\n\t'\t\t}'+\r\n\t'\t\t.box.is-dragover'+\r\n\t'\t\t{'+\r\n\t'\t\t\toutline-offset: -20px;'+\r\n\t'\t\t\toutline-color: #c8dadf;'+\r\n\t'\t\t\tbackground-color: #fff;'+\r\n\t'\t\t}'+\r\n\t'\t\t\t.box__dragndrop,'+\r\n\t'\t\t\t.box__icon'+\r\n\t'\t\t\t{'+\r\n\t'\t\t\t\tdisplay: none;'+\r\n\t'\t\t\t}'+\r\n\t'\t\t\t.box.has-advanced-upload .box__dragndrop'+\r\n\t'\t\t\t{'+\r\n\t'\t\t\t\tdisplay: inline;'+\r\n\t'\t\t\t}'+\r\n\t'\t\t\t.box.has-advanced-upload .box__icon'+\r\n\t'\t\t\t{'+\r\n\t'\t\t\t\twidth: 100%;'+\r\n\t'\t\t\t\theight: 80px;'+\r\n\t'\t\t\t\tfill: #92b0b3;'+\r\n '\t\t\t\tdisplay: block;'+\r\n\t'\t\t\t\tmargin-bottom: 40px;'+\r\n\t'\t\t\t}'+\r\n\t'\t\t\t.box.is-uploading .box__input,'+\r\n\t'\t\t\t.box.is-success .box__input,'+\r\n\t'\t\t\t.box.is-error .box__input'+\r\n\t'\t\t\t{'+\r\n\t'\t\t\t\tvisibility: hidden;'+\r\n\t'\t\t\t}'+\r\n\t'\t\t\t.box__uploading,'+\r\n\t'\t\t\t.box__success,'+\r\n\t'\t\t\t.box__error'+\r\n\t'\t\t\t{'+\r\n\t'\t\t\tdisplay: none;'+\r\n\t'\t\t\t}'+\r\n\t'\t\t\t.box.is-uploading .box__uploading,'+\r\n\t'\t\t\t.box.is-success .box__success,'+\r\n\t'\t\t\t.box.is-error .box__error'+\r\n\t'\t\t\t{'+\r\n\t'\t\t\t\tdisplay: block;'+\r\n\t'\t\t\t\tposition: absolute;'+\r\n\t'\t\t\t\ttop: 50%;'+\r\n\t' right: 0;'+\r\n '\t\t\t\tleft: 0;'+\r\n\t'\t \t\t-webkit-transform: translateY( -50% );'+\r\n\t'\t\t\t\t\ttransform: translateY( -50% );'+\r\n\t'\t\t\t\t}'+\r\n\t'\t\t\t\t.box__uploading'+\r\n\t'\t\t\t\t{'+\r\n\t'\t\t\t\t\tfont-style: italic;'+\r\n\t'\t\t\t\t}'+\r\n\t'\t\t\t\t.box__success'+\r\n\t'\t\t\t\t{'+\r\n\t'\t\t\t\t\t-webkit-animation: appear-from-inside .25s ease-in-out;'+\r\n\t'\t\t\t\t\tanimation: appear-from-inside .25s ease-in-out;'+\r\n\t'\t\t\t\t}'+\r\n\t'\t\t\t\t\t@-webkit-keyframes appear-from-inside'+\r\n\t'\t\t\t\t\t{'+\r\n\t'\t\t\t\t\t\tfrom\t{ -webkit-transform: translateY( -50% ) scale( 0 ); }'+\r\n\t'\t\t\t\t\t\t75%\t\t{ -webkit-transform: translateY( -50% ) scale( 1.1 ); }'+\r\n\t'\t\t\t\t\t\tto\t\t{ -webkit-transform: translateY( -50% ) scale( 1 ); }'+\r\n\t'\t\t\t\t\t}'+\r\n\t'\t\t\t\t\t@keyframes appear-from-inside'+\r\n\t'\t\t\t\t\t{'+\r\n\t'\t\t\t\t\t\tfrom\t{ transform: translateY( -50% ) scale( 0 ); }'+\r\n\t'\t\t\t\t\t\t75%\t\t{ transform: translateY( -50% ) scale( 1.1 ); }'+\r\n\t'\t\t\t\t\t\tto\t\t{ transform: translateY( -50% ) scale( 1 ); }'+\r\n\t'\t\t\t\t\t}'+\r\n\t'\t\t\t\t.box__restart'+\r\n\t'\t\t\t\t{'+\r\n\t'\t\t\t\t\tfont-weight: 700;'+\r\n\t'\t\t\t\t}'+\r\n\t'\t\t\t\t.box__restart:focus,'+\r\n\t'\t\t\t\t.box__restart:hover'+\r\n\t'\t\t\t\t{'+\r\n\t'\t\t\t\t\tcolor: '+ ColorToHTML(FontHoverColor)+';'+\r\n\t'\t\t\t\t}'+\r\n\t'\t\t\t\t.box__file'+\r\n\t'\t\t\t\t{'+\r\n\t'\t\t\t\t\twidth: 0.1px;'+\r\n\t'\t\t\t\t\theight: 0.1px;'+\r\n\t'\t\t\t\t\topacity: 0;'+\r\n\t'\t\t\t\t\toverflow: hidden;'+\r\n\t'\t\t\t\t\tposition: absolute;'+\r\n\t'\t\t\t\t\tz-index: -1;'+\r\n\t'\t\t\t\t}'+\r\n\t'\t\t\t\t.box__file + label'+\r\n\t'\t\t\t\t{'+\r\n//\t'\t\t\t\t\tmax-width: 80%;'+\r\n\t'\t\t\t\t\ttext-overflow: ellipsis;'+\r\n\t'\t\t\t\t\twhite-space: nowrap;'+\r\n\t'\t\t\t\t\tcursor: pointer;'+\r\n\t'\t\t\t\t\tdisplay: inline-block;'+\r\n\t'\t\t\t\t\toverflow: hidden;'+\r\n\t'\t\t\t\t}'+\r\n\t'\t\t\t\t.box__file + label:hover strong,'+\r\n\t'\t\t\t\t.box__file:focus + label strong,'+\r\n\t'\t\t\t\t.box__file.has-focus + label strong'+\r\n\t'\t\t\t\t{'+\r\n\t'\t\t\t\t\tcolor: '+ColorToHTML(FontHoverColor)+';' +\r\n\t'\t\t\t\t}'+\r\n\t'\t\t\t\t.box__file:focus + label,'+\r\n\t'\t\t\t\t.box__file.has-focus + label'+\r\n\t'\t\t\t\t{'+\r\n\t' \t\t\t\toutline: 1px dotted #000;'+\r\n\t'\t\t\t\t\toutline: -webkit-focus-ring-color auto 5px;'+\r\n\t'\t\t\t\t}'+\r\n\t'\t\t\t\t.box__button'+\r\n\t'\t\t\t\t{'+\r\n\t'\t\t\t\t\tfont-weight: 700;'+\r\n\t'\t\t\t\t\tcolor: #e5edf1;'+\r\n\t'\t\t\t\t\tbackground-color: #39bfd3;'+\r\n\t'\t\t\t\t\tdisplay: none;'+\r\n\t'\t\t\t\t\tpadding: 8px 16px;'+\r\n\t'\t\t\t\t\tmargin: 10px auto 0;'+\r\n\t'\t\t\t\t}'+\r\n\t'\t\t\t\t\t.box__button:hover,'+\r\n\t'\t\t\t\t\t.box__button:focus'+\r\n\t'\t\t\t\t\t{'+\r\n\t'\t\t\t\t\t\tbackground-color: #0f3c4b;'+\r\n\t'\t\t\t\t\t}'\r\n );\r\n\r\nend;\r\n\r\nfunction TFileUpload.CreateElement: TJSElement;\r\nbegin\r\n CreateCSS;\r\n FCreateRef := Name;\r\n Result := document.createElement('FORM');\r\n Result.setAttribute('method','post');\r\n Result.setAttribute('class','box');\r\n Result.setAttribute('enctype','multipart/form-data');\r\n //display:flex;justify-content:center;align-items:center\"\r\n TJSHTMLElement(Result).style.setProperty('display','flex');\r\n TJSHTMLElement(Result).style.setProperty('justify-content','center');\r\n TJSHTMLElement(Result).style.setProperty('align-items','center');\r\n\r\n// \r\n Result.innerHTML :=\r\n '
' +\r\n ''+\r\n ''+\r\n '' +\r\n '' +\r\n '' +\r\n '
' +\r\n '
Uploading…
';\r\n\r\n Result.addEventListener('drop', @HandleDroppedFiles);\r\n Result.addEventListener('dragenter', @HandleDragOver);\r\n Result.addEventListener('dragover', @HandleDragOver);\r\n Result.addEventListener('dragend', @HandleDragEnd);\r\n Result.addEventListener('dragleave', @HandleDragEnd);\r\n\r\n if isAdvancedUpload then\r\n Result.classList.add( 'has-advanced-upload' );\r\nend;\r\n\r\nprocedure TFileUpload.CreateInitialize;\r\nbegin\r\n inherited;\r\n FMultifile := false;\r\n FShowFiles := false;\r\n FEventInit := false;\r\n Width := 170;\r\n Height := 190;\r\nend;\r\n\r\ndestructor TFileUpload.Destroy;\r\nbegin\r\n FFiles.Free;\r\n FFilelist.Free;\r\n inherited;\r\nend;\r\n\r\nfunction TFileUpload.DoHandleChange(e: TJSEvent): boolean;\r\nvar\r\n el,span: TJSHTMLElement;\r\n curfiles: TJSHTMLFileList;\r\n szfiles: string;\r\nbegin\r\n Result := true;\r\n if Assigned(ElementHandle) then\r\n begin\r\n el := TJSHTMLElement(e.target);\r\n if Assigned(el) then\r\n begin\r\n asm\r\n curfiles = el.files;\r\n end;\r\n\r\n szfiles := HandleFiles(curfiles);\r\n\r\n if ShowFiles then\r\n begin\r\n span := TJSHTMLElement(document.getElementById(ElementID+'fileslist'));\r\n span.innerHTML := szFiles;\r\n end;\r\n\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TFileUpload.HandleDragEnd(Event: TJSDragEvent): boolean;\r\nbegin\r\n Result := true;\r\n Event.preventDefault();\r\n Event.stopPropagation();\r\n\r\n if Assigned(Container) then\r\n Container.setAttribute('class','box has-advanced-upload');\r\n\r\n if Assigned(ElementHandle) then\r\n begin\r\n if (Color <> clNone) and (DragColor <> clNone) then\r\n ElementHandle.style.setProperty('background-color',ColorToHTML(Color))\r\n else\r\n ElementHandle.style.removeProperty('background-color');\r\n end;\r\nend;\r\n\r\nfunction TFileUpload.HandleDragOver(Event: TJSDragEvent): boolean;\r\nbegin\r\n Result := true;\r\n Event.preventDefault();\r\n Event.stopPropagation();\r\n\r\n if Assigned(Container) then\r\n Container.setAttribute('class','box has-advanced-upload is-dragover');\r\n\r\n if Assigned(ElementHandle) and (DragColor <> clNone) then\r\n ElementHandle.style.setProperty('background-color',ColorToHTML(DragColor));\r\nend;\r\n\r\nfunction TFileUpload.HandleDroppedFiles(Event: TJSDragEvent): boolean;\r\nvar\r\n droppedfiles: TJSHTMLFileList;\r\n span: TJSHTMLElement;\r\n szFiles: string;\r\n\r\nbegin\r\n Result := true;\r\n Event.preventDefault();\r\n Event.stopPropagation();\r\n\r\n droppedFiles := Event.dataTransfer.files;\r\n szFiles := HandleFiles(droppedfiles);\r\n\r\n if ShowFiles then\r\n begin\r\n span := TJSHTMLElement(document.getElementById(ElementID+'fileslist'));\r\n span.innerHTML := szFiles;\r\n end;\r\n\r\n Container.setAttribute('class','box has-advanced-upload');\r\nend;\r\n\r\nfunction TFileUpload.HandleFiles(files: TJSHTMLFileList): string;\r\nvar\r\n i,sz: integer;\r\n afile: TJSHTMLFile;\r\n szFiles, m: string;\r\n d: TJSDate;\r\nbegin\r\n szFiles := '';\r\n\r\n while FFiles.Count > 0 do\r\n FFiles.Delete(0);\r\n while FFileList.Count > 0 do\r\n FFileList.Delete(0);\r\n\r\n for i := 0 to files.length - 1 do\r\n begin\r\n afile := files.item(i);\r\n\r\n asm\r\n d = new Date(afile.lastModified);\r\n m = afile.type;\r\n sz = afile.size;\r\n end;\r\n\r\n with FFiles.Add do\r\n begin\r\n FileObject := afile;\r\n Name := afile.Name;\r\n MimeType := m;\r\n Size := sz;\r\n Modified := EncodeDate(d.Year + 1900, d.Month + 1, d.Date)+EncodeTime(d.Hours, d.Minutes, d.Seconds, d.Milliseconds);\r\n end;\r\n\r\n if Assigned(FFileList) then\r\n FFileList.Add(afile.name);\r\n\r\n if ShowFiles then\r\n begin\r\n if i > 0 then\r\n szFiles := szFiles + '
';\r\n\r\n szFiles := szFiles + afile.name;\r\n end;\r\n\r\n if not MultiFile then\r\n break;\r\n end;\r\n\r\n Result := szFiles;\r\n\r\n if Assigned(OnDroppedFiles) then\r\n OnDroppedFiles(Self, FFileList);\r\nend;\r\n\r\nprocedure TFileUpload.SetAccept(const Value: string);\r\nbegin\r\n if FAccept <> Value then\r\n begin\r\n FAccept := Value;\r\n UpdateElement;\r\n end;\r\nend;\r\n\r\nprocedure TFileUpload.SetCaption(const AValue: string);\r\nbegin\r\n if (Caption <> AValue) then\r\n begin\r\n inherited SetCaption(AValue);\r\n UpdateElement;\r\n end;\r\nend;\r\n\r\nprocedure TFileUpload.SetDragCaption(const Value: string);\r\nbegin\r\n FDragCaption := Value;\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TFileUpload.SetShowPicture(const Value: boolean);\r\nbegin\r\n if (FShowPicture <> Value) then\r\n begin\r\n FShowPicture := Value;\r\n UpdateElement;\r\n end;\r\nend;\r\n\r\nprocedure TFileUpload.UpdateElement;\r\nvar\r\n el:TJSHTMLElement;\r\nbegin\r\n inherited;\r\n\r\n CreateCSS;\r\n\r\n if Assigned(ElementHandle) then\r\n begin\r\n ElementHandle.style.setProperty('display','flex');\r\n\r\n el := TJSHTMLElement(ElementHandle.children[0]);\r\n el := TJSHTMLElement(el.children[0]);\r\n\r\n if not ShowPicture then\r\n el.style.setProperty('display','none')\r\n else\r\n el.style.removeProperty('display');\r\n\r\n if ElementFont <> efCSS then\r\n el.style.setProperty('color',ColorToHTML(Font.Color))\r\n else\r\n el.style.removeProperty('color');\r\n\r\n el := TJSHTMLElement(document.getElementById('FP'+FCreateRef));\r\n\r\n if Assigned(el) then\r\n begin\r\n if not FEventInit then\r\n begin\r\n FEventInit := true;\r\n el.addEventListener('change', @DoHandleChange);\r\n end;\r\n\r\n if MultiFile then\r\n el.SetAttribute('multiple','')\r\n else\r\n el.RemoveAttribute('multiple');\r\n\r\n if FAccept <> '' then\r\n el.SetAttribute('accept',FAccept)\r\n else\r\n el.RemoveAttribute('accept');\r\n end;\r\n\r\n el := TJSHTMLElement(document.getElementById(FCreateRef+'lbl'));\r\n if Assigned(el) then\r\n begin\r\n el.innerHTML := Caption;\r\n end;\r\n\r\n el := TJSHTMLElement(document.getElementById(FCreateRef+'drag'));\r\n if Assigned(el) then\r\n begin\r\n el.innerHTML := FDragCaption;\r\n end;\r\n end;\r\nend;\r\n\r\n\r\n{ TFilePicker }\r\n\r\nprocedure TFilePicker.BindEvents;\r\nvar\r\n eh: TJSEventTarget;\r\nbegin\r\n inherited;\r\n if Assigned(ElementBindHandle) then\r\n begin\r\n eh := ElementBindHandle;\r\n eh.addEventListener('change',@DoHandleChange);\r\n end;\r\nend;\r\n\r\nprocedure TFilePicker.Clear;\r\nbegin\r\n ElementHandle['type'] := '';\r\n ElementHandle['type'] := 'file';\r\n\r\n while Files.Count > 0 do\r\n Files.Delete(0);\r\nend;\r\n\r\nfunction TFilePicker.CreateElement: TJSElement;\r\nbegin\r\n Result := document.createElement('INPUT');\r\n Result.setAttribute('type','file');\r\nend;\r\n\r\nprocedure TFilePicker.CreateInitialize;\r\nbegin\r\n inherited;\r\n FFiles := TFiles.Create(Self);\r\n begin\r\n Width := 160;\r\n Height := 40;\r\n end;\r\nend;\r\n\r\ndestructor TFilePicker.Destroy;\r\nbegin\r\n FFiles.Free;\r\n inherited;\r\nend;\r\n\r\n{$HINTS OFF}\r\nfunction TFilePicker.DoHandleChange(e: TJSEvent): boolean;\r\nvar\r\n i,l,sz: integer;\r\n eh: TJSElement;\r\n s,m: string;\r\n f: TFile;\r\n d: TJSDate;\r\n jsfile: TJSHTMLFile;\r\nbegin\r\n Result := true;\r\n\r\n // clear existing collection\r\n while FFiles.Count > 0 do\r\n FFiles.Delete(0);\r\n\r\n eh := ElementHandle;\r\n\r\n asm\r\n var curFiles = eh.files;\r\n l = curFiles.length;\r\n end;\r\n\r\n for i := 0 to l - 1 do\r\n begin\r\n f := FFiles.Add;\r\n\r\n asm\r\n jsfile = curFiles[i];\r\n s = curFiles[i].name;\r\n m = curFiles[i].type;\r\n sz = curFiles[i].size;\r\n d = new Date(curFiles[i].lastModified);\r\n end;\r\n\r\n f.FileObject := jsfile;\r\n f.Name := s;\r\n f.MimeType := m;\r\n f.Size := sz;\r\n f.Modified := EncodeDate(d.Year + 1900, d.Month + 1, d.Date)+EncodeTime(d.Hours, d.Minutes, d.Seconds, d.Milliseconds);\r\n end;\r\n\r\n if Assigned(OnChange) then\r\n OnChange(Self);\r\nend;\r\n\r\nprocedure TFilePicker.GetMethodPointers;\r\nbegin\r\n if FChangePtr = nil then\r\n begin\r\n FChangePtr := @DoHandleChange;\r\n inherited;\r\n end;\r\nend;\r\n\r\n{$HINTS ON}\r\n\r\nprocedure TFilePicker.SetAccept(const Value: string);\r\nbegin\r\n if (FAccept <> Value) then\r\n begin\r\n FAccept := Value;\r\n UpdateElement;\r\n end;\r\nend;\r\n\r\nprocedure TFilePicker.SetMultiFile(const Value: boolean);\r\nbegin\r\n if (FMultiFile <> Value) then\r\n begin\r\n FMultiFile := Value;\r\n UpdateElement;\r\n end;\r\nend;\r\n\r\nprocedure TFilePicker.UpdateElement;\r\nbegin\r\n inherited;\r\n\r\n if Assigned(ElementHandle) then\r\n begin\r\n if MultiFile then\r\n ElementHandle.SetAttribute('multiple','')\r\n else\r\n ElementHandle.RemoveAttribute('multiple');\r\n\r\n if FAccept <> '' then\r\n ElementHandle.SetAttribute('accept',FAccept)\r\n else\r\n ElementHandle.RemoveAttribute('accept');\r\n end;\r\nend;\r\n\r\n{ TFiles }\r\n\r\nfunction TFiles.Add: TFile;\r\nbegin\r\n Result := TFile(inherited Add);\r\nend;\r\n\r\nprocedure TFiles.Clear;\r\nvar\r\n fc: integer;\r\nbegin\r\n fc := Count;\r\n inherited Clear;\r\n\r\n if fc > 0 then\r\n begin\r\n if (FOwner is TFilePicker) then\r\n (FOwner as TFilePicker).Clear;\r\n if (FOwner is TFileUpload) then\r\n (FOwner as TFileUpload).Clear;\r\n end;\r\nend;\r\n\r\nconstructor TFiles.Create(AOwner: TComponent);\r\nbegin\r\n inherited Create(TFile);\r\n FOwner := TFilePicker(AOwner);\r\nend;\r\n\r\nfunction TFiles.GetItem(Index: integer): TFile;\r\nbegin\r\n Result := TFile(inherited Items[Index]);\r\nend;\r\n\r\nfunction TFiles.Insert(Index: integer): TFile;\r\nbegin\r\n Result := TFile(inherited Insert(Index));\r\nend;\r\n\r\nfunction TFiles.Owner: TPersistent;\r\nbegin\r\n Result := FOwner;\r\nend;\r\n\r\nprocedure TFiles.SetItem(Index: integer; const Value: TFile);\r\nbegin\r\n inherited Items[Index] := Value;\r\nend;\r\n\r\n{ TFile }\r\n\r\n{$HINTS OFF}\r\nfunction TFile.GetControl: TComponent;\r\nbegin\r\n Result := nil;\r\n\r\n if Assigned(Collection) and Assigned((Collection as TFiles).Owner) then\r\n begin\r\n if (Collection as TFiles).Owner is TComponent then\r\n Result := (Collection as TFiles).Owner as TComponent;\r\n end;\r\nend;\r\n\r\nprocedure TFile.GetFileAsArrayBuffer;\r\nvar\r\n ptr: pointer;\r\n f: TJSHTMLFile;\r\nbegin\r\n ptr := @HandleFileLoadAsArrayBuffer;\r\n f := FileObject;\r\n\r\n asm\r\n var reader = new FileReader();\r\n reader.addEventListener('load',ptr);\r\n reader.readAsArrayBuffer(f);\r\n end;\r\nend;\r\n\r\nprocedure TFile.GetFileAsArrayBuffer(GetAsArrayBuffer: TGetAsArrayBufferProc);\r\nbegin\r\n FGetAsArrayBuffer := GetAsArrayBuffer;\r\n GetFileAsArrayBuffer;\r\nend;\r\n\r\nprocedure TFile.GetFileAsBase64(GetAsString: TGetAsStringProc);\r\nbegin\r\n FGetAsString := GetAsString;\r\n GetFileAsBase64;\r\nend;\r\n\r\nprocedure TFile.GetFileAsDataURL(GetAsString: TGetAsStringProc);\r\nbegin\r\n FGetAsString := GetAsString;\r\n GetFileAsDataURL;\r\nend;\r\n\r\nprocedure TFile.GetFileAsStream;\r\nvar\r\n ptr: pointer;\r\n f: TJSHTMLFile;\r\nbegin\r\n ptr := @HandleFileLoadAsStream;\r\n f := FileObject;\r\n\r\n asm\r\n var reader = new FileReader();\r\n reader.addEventListener('load',ptr);\r\n reader.readAsArrayBuffer(f);\r\n end;\r\nend;\r\n\r\nprocedure TFile.GetFileAsStream(GetAsStream: TGetAsStreamProc);\r\nbegin\r\n FGetAsStream := GetAsStream;\r\n GetFileAsStream;\r\nend;\r\n\r\nfunction TFile.FileAsText: TJSPromise;\r\nbegin\r\n Result := FileAsText('utf-8');\r\nend;\r\n\r\nfunction TFile.FileAsText(AEncoding: string): TJSPromise;\r\nvar\r\n reader: TJSFileReader;\r\n\r\nbegin\r\n Result := TJSPromise.new(\r\n procedure(ASuccess, AFailed: TJSPromiseResolver)\r\n\r\n function Loader(Event: TEventListenerEvent): boolean;\r\n begin\r\n ASuccess(EventResult(Event));\r\n end;\r\n\r\n begin\r\n reader := TJSFileReader.new;\r\n reader.onload := @Loader;\r\n reader.readAsText(FileObject, AEncoding);\r\n end);\r\nend;\r\n\r\nfunction TFile.FileAsBase64: TJSPromise;\r\nvar\r\n reader: TJSFileReader;\r\n\r\nbegin\r\n Result := TJSPromise.new(\r\n procedure(ASuccess, AFailed: TJSPromiseResolver)\r\n\r\n function Loader(Event: TEventListenerEvent): boolean;\r\n var\r\n s: string;\r\n begin\r\n asm\r\n function _arrayBufferToBase64( buffer ) {\r\n var binary = '';\r\n var bytes = new Uint8Array( buffer );\r\n var len = bytes.byteLength;\r\n for (var i = 0; i < len; i++) {\r\n binary += String.fromCharCode( bytes[ i ] );\r\n }\r\n return window.btoa( binary );\r\n }\r\n s = _arrayBufferToBase64(Event.target.result);\r\n end;\r\n\r\n ASuccess(s);\r\n end;\r\n\r\n begin\r\n reader := TJSFileReader.new;\r\n reader.onload := @Loader;\r\n reader.readAsArrayBuffer(FileObject);\r\n end);\r\nend;\r\n\r\nfunction TFile.FileAsStream: TJSPromise;\r\nvar\r\n reader: TJSFileReader;\r\n\r\nbegin\r\n Result := TJSPromise.new(\r\n procedure(ASuccess, AFailed: TJSPromiseResolver)\r\n\r\n function Loader(Event: TEventListenerEvent): boolean;\r\n var\r\n ms: TMemoryStream;\r\n ja: TJSArrayBuffer;\r\n b: TBytes;\r\n l: longint;\r\n begin\r\n asm\r\n ja = Event.target.result;\r\n end;\r\n\r\n b := TMemoryStream.MemoryToBytes(ja);\r\n l := ja.byteLength;\r\n\r\n ms := TMemoryStream.Create;\r\n ms.Write(b,0, l);\r\n ms.Position := 0;\r\n\r\n ASuccess(ms);\r\n end;\r\n\r\n begin\r\n reader := TJSFileReader.new;\r\n reader.onload := @Loader;\r\n reader.readAsArrayBuffer(FileObject);\r\n end);\r\nend;\r\n\r\nfunction TFile.FileAsArrayBuffer: TJSPromise;\r\nvar\r\n reader: TJSFileReader;\r\n\r\nbegin\r\n Result := TJSPromise.new(\r\n procedure(ASuccess, AFailed: TJSPromiseResolver)\r\n\r\n function Loader(Event: TEventListenerEvent): boolean;\r\n var\r\n arr: TJSArrayBuffer;\r\n begin\r\n asm\r\n arr = Event.target.result;\r\n end;\r\n\r\n ASuccess(arr);\r\n end;\r\n\r\n begin\r\n reader := TJSFileReader.new;\r\n reader.onload := @Loader;\r\n reader.readAsArrayBuffer(FileObject);\r\n end);\r\nend;\r\n\r\nfunction TFile.FileAsDataURL: TJSPromise;\r\nvar\r\n reader: TJSFileReader;\r\n\r\nbegin\r\n Result := TJSPromise.new(\r\n procedure(ASuccess, AFailed: TJSPromiseResolver)\r\n\r\n function Loader(Event: TEventListenerEvent): boolean;\r\n var\r\n s: string;\r\n begin\r\n asm\r\n s = Event.target.result;\r\n end;\r\n\r\n ASuccess(s);\r\n end;\r\n\r\n begin\r\n reader := TJSFileReader.new;\r\n reader.onload := @Loader;\r\n reader.readAsDataURL(FileObject);\r\n end);\r\nend;\r\n\r\n\r\nprocedure TFile.GetFileAsText;\r\nvar\r\n ptr: pointer;\r\n f: TJSHTMLFile;\r\nbegin\r\n ptr := @HandleFileLoadAsText;\r\n f := FileObject;\r\n\r\n asm\r\n var reader = new FileReader();\r\n reader.addEventListener('load',ptr);\r\n reader.readAsText(f);\r\n end;\r\nend;\r\n\r\nprocedure TFile.GetFileAsText(AEncoding: string);\r\nvar\r\n ptr: pointer;\r\n f: TJSHTMLFile;\r\nbegin\r\n ptr := @HandleFileLoadAsText;\r\n f := FileObject;\r\n\r\n asm\r\n var reader = new FileReader();\r\n reader.addEventListener('load',ptr);\r\n reader.readAsText(f, AEncoding);\r\n end;\r\n\r\nend;\r\n\r\n\r\nprocedure TFile.GetFileAsBase64;\r\nvar\r\n ptr: pointer;\r\n f: TJSHTMLFile;\r\nbegin\r\n ptr := @HandleFileLoadAsBase64;\r\n f := FileObject;\r\n\r\n asm\r\n var reader = new FileReader();\r\n reader.addEventListener('load',ptr);\r\n reader.readAsArrayBuffer(f);\r\n end;\r\nend;\r\n\r\nprocedure TFile.GetFileAsDataURL;\r\nvar\r\n ptr: pointer;\r\n f: TJSHTMLFile;\r\nbegin\r\n ptr := @HandleFileLoadAsDataURL;\r\n f := FileObject;\r\n\r\n asm\r\n var reader = new FileReader();\r\n reader.addEventListener('load',ptr);\r\n reader.readAsDataURL(f);\r\n end;\r\nend;\r\n\r\nprocedure TFile.GetFileAsText(GetAsString: TGetAsStringProc);\r\nbegin\r\n FGetAsString := GetAsString;\r\n GetFileAsText;\r\nend;\r\n\r\nprocedure TFile.Upload(AAction: string);\r\nvar\r\n f: TJSHTMLFile;\r\n fd: TJSFormData;\r\n ptrProgress, ptrComplete, ptrError, ptrAbort: pointer;\r\nbegin\r\n f := FileObject;\r\n\r\n fd := TJSFormData.new;\r\n fd.Append('file1',f);\r\n\r\n FReq := TJSXMLHttpRequest.new;\r\n\r\n ptrProgress := @HandleFileUploadProgress;\r\n ptrComplete := @HandleFileUploadComplete;\r\n ptrError := @HandleFileUploadError;\r\n ptrAbort := @HandleFileUploadAbort;\r\n\r\n FReq.addEventListener('load', ptrComplete);\r\n FReq.addEventListener('error', ptrError);\r\n FReq.addEventListener('abort', ptrAbort);\r\n FReq.upload.addEventListener('progress', ptrProgress);\r\n\r\n FReq.Open('POST',AAction, true);\r\n FReq.Send(fd);\r\nend;\r\n\r\nfunction TFile.AbortUpload: boolean;\r\nbegin\r\n Result := false;\r\n if Assigned(FReq) then\r\n begin\r\n FReq.Abort();\r\n Result := true;\r\n end;\r\nend;\r\n\r\n{$HINTS ON}\r\n\r\nfunction TFile.HandleFileLoadAsArrayBuffer(Event: TJSEvent): boolean;\r\nvar\r\n ja: TJSArrayBuffer;\r\n LJARec: TJSArrayBufferRecord;\r\n ctrl: TComponent;\r\nbegin\r\n\r\n Result := true;\r\n asm\r\n ja = Event.target.result;\r\n end;\r\n\r\n if Assigned(FGetAsArrayBuffer) then\r\n begin\r\n FGetAsArrayBuffer(ja);\r\n end;\r\n\r\n FGetAsArrayBuffer := nil;\r\n\r\n if Assigned(OnGetFileAsArrayBuffer) then\r\n begin\r\n LJARec.jsarraybuffer := ja;\r\n OnGetFileAsArrayBuffer(Self, LJARec);\r\n end;\r\n\r\n ctrl := GetControl;\r\n\r\n if Assigned(ctrl) then\r\n begin\r\n LJARec.jsarraybuffer := ja;\r\n\r\n if (ctrl is TFilePicker) and Assigned( (ctrl as TFilePicker).OnGetFileAsArrayBuffer) then\r\n (ctrl as TFilePicker).OnGetFileAsArrayBuffer(ctrl, Index, LJARec);\r\n\r\n if (ctrl is TFileUpload) and Assigned( (ctrl as TFileUpload).OnGetFileAsArrayBuffer) then\r\n (ctrl as TFileUpload).OnGetFileAsArrayBuffer(ctrl, Index, LJARec);\r\n\r\n if (ctrl is TOpenDialog) and Assigned( (ctrl as TOpenDialog).OnGetFileAsArrayBuffer) then\r\n (ctrl as TOpenDialog).OnGetFileAsArrayBuffer(ctrl, Index, LJARec);\r\n end;\r\nend;\r\n\r\n\r\nfunction TFile.HandleFileLoadAsBase64(Event: TJSEvent): boolean;\r\nvar\r\n s: string;\r\n ctrl: TComponent;\r\nbegin\r\n Result := true;\r\n\r\n asm\r\n function _arrayBufferToBase64( buffer ) {\r\n var binary = '';\r\n var bytes = new Uint8Array( buffer );\r\n var len = bytes.byteLength;\r\n for (var i = 0; i < len; i++) {\r\n binary += String.fromCharCode( bytes[ i ] );\r\n }\r\n return window.btoa( binary );\r\n }\r\n s = _arrayBufferToBase64(Event.target.result);\r\n end;\r\n\r\n if Assigned(FGetAsString) then\r\n FGetAsString(s);\r\n\r\n FGetAsString := nil;\r\n\r\n if Assigned(OnGetFileAsBase64) then\r\n OnGetFileAsBase64(Self, s);\r\n\r\n ctrl := GetControl;\r\n\r\n if Assigned(ctrl) then\r\n begin\r\n if (ctrl is TFilePicker) and Assigned( (ctrl as TFilePicker).OnGetFileAsBase64) then\r\n (ctrl as TFilePicker).OnGetFileAsBase64(ctrl, Index, s);\r\n\r\n if (ctrl is TFileUpload) and Assigned( (ctrl as TFileUpload).OnGetFileAsBase64) then\r\n (ctrl as TFileUpload).OnGetFileAsBase64(ctrl, Index, s);\r\n\r\n if (ctrl is TOpenDialog) and Assigned( (ctrl as TOpenDialog).OnGetFileAsBase64) then\r\n (ctrl as TOpenDialog).OnGetFileAsBase64(ctrl, Index, s);\r\n end;\r\nend;\r\n\r\n\r\nfunction TFile.HandleFileLoadAsDataURL(Event: TJSEvent): boolean;\r\nvar\r\n s: string;\r\n ctrl: TComponent;\r\nbegin\r\n Result := true;\r\n asm\r\n s = Event.target.result;\r\n end;\r\n\r\n if Assigned(FGetAsString) then\r\n FGetAsString(s);\r\n\r\n FGetAsString := nil;\r\n\r\n if Assigned(OnGetFileAsURL) then\r\n OnGetFileAsURL(Self, s);\r\n\r\n ctrl := GetControl;\r\n\r\n if Assigned(ctrl) then\r\n begin\r\n if (ctrl is TFilePicker) and Assigned( (ctrl as TFilePicker).OnGetFileAsDataURL) then\r\n (ctrl as TFilePicker).OnGetFileAsDataURL(ctrl, Index, s);\r\n\r\n if (ctrl is TFileUpload) and Assigned( (ctrl as TFileUpload).OnGetFileAsDataURL) then\r\n (ctrl as TFileUpload).OnGetFileAsDataURL(ctrl, Index, s);\r\n\r\n if (ctrl is TWebOpenDialog) and Assigned( (ctrl as TWebOpenDialog).OnGetFileAsDataURL) then\r\n (ctrl as TWebOpenDialog).OnGetFileAsDataURL(ctrl, Index, s);\r\n end;\r\nend;\r\n\r\nfunction TFile.HandleFileLoadAsStream(Event: TJSEvent): boolean;\r\nvar\r\n ctrl: TComponent;\r\n b: TBytes;\r\n l: longint;\r\n ms: TMemoryStream;\r\n ja: TJSArrayBuffer;\r\nbegin\r\n\r\n Result := true;\r\n asm\r\n ja = Event.target.result;\r\n end;\r\n\r\n b := TMemoryStream.MemoryToBytes(ja);\r\n l := ja.byteLength;\r\n\r\n ms := TMemoryStream.Create;\r\n ms.Write(b,0, l);\r\n ms.Position := 0;\r\n\r\n if Assigned(FGetAsStream) then\r\n begin\r\n FGetAsStream(ms);\r\n end;\r\n\r\n FGetAsStream := nil;\r\n\r\n if Assigned(OnGetFileAsStream) then\r\n begin\r\n OnGetFileAsStream(Self, ms);\r\n end;\r\n\r\n ctrl := GetControl;\r\n\r\n if Assigned(ctrl) then\r\n begin\r\n if (ctrl is TFilePicker) and Assigned( (ctrl as TFilePicker).OnGetFileAsStream) then\r\n (ctrl as TFilePicker).OnGetFileAsStream(ctrl, Index, ms);\r\n\r\n if (ctrl is TFileUpload) and Assigned( (ctrl as TFileUpload).OnGetFileAsStream) then\r\n (ctrl as TFileUpload).OnGetFileAsStream(ctrl, Index, ms);\r\n\r\n if (ctrl is TOpenDialog) and Assigned( (ctrl as TOpenDialog).OnGetFileAsStream) then\r\n (ctrl as TOpenDialog).OnGetFileAsStream(ctrl, Index, ms);\r\n end;\r\n\r\n ms.Free;\r\nend;\r\n\r\nfunction TFile.HandleFileLoadAsText(Event: TJSEvent): boolean;\r\nvar\r\n s: string;\r\n ctrl: TComponent;\r\n\r\nbegin\r\n Result := true;\r\n asm\r\n s = Event.target.result;\r\n end;\r\n\r\n if Assigned(FGetAsString) then\r\n FGetAsString(s);\r\n\r\n FGetAsString := nil;\r\n\r\n if Assigned(OnGetFileAsText) then\r\n OnGetFileAsText(Self, s);\r\n\r\n ctrl := GetControl;\r\n\r\n if Assigned(ctrl) then\r\n begin\r\n if (ctrl is TFilePicker) and Assigned( (ctrl as TFilePicker).OnGetFileAsText) then\r\n (ctrl as TFilePicker).OnGetFileAsText(ctrl, Index, s);\r\n\r\n if (ctrl is TFileUpload) and Assigned( (ctrl as TFileUpload).OnGetFileAsText) then\r\n (ctrl as TFileUpload).OnGetFileAsText(ctrl, Index, s);\r\n\r\n if (ctrl is TOpenDialog) and Assigned( (ctrl as TOpenDialog).OnGetFileAsText) then\r\n (ctrl as TOpenDialog).OnGetFileAsText(ctrl, Index, s);\r\n end;\r\nend;\r\n\r\nfunction TFile.HandleFileUploadAbort(Event: TJSEvent): boolean;\r\nvar\r\n ctrl: TComponent;\r\nbegin\r\n Result := true;\r\n\r\n ctrl := GetControl;\r\n\r\n if Assigned(ctrl) then\r\n begin\r\n if (ctrl is TFilePicker) and Assigned( (ctrl as TFilePicker).OnUploadFileAbort) then\r\n (ctrl as TFilePicker).OnUploadFileAbort(ctrl, Index);\r\n\r\n if (ctrl is TFileUpload) and Assigned( (ctrl as TFileUpload).OnUploadFileAbort) then\r\n (ctrl as TFileUpload).OnUploadFileAbort(ctrl, Index);\r\n end;\r\nend;\r\n\r\nfunction TFile.HandleFileUploadComplete(Event: TJSEvent): boolean;\r\nvar\r\n ctrl: TComponent;\r\n LRequestRec: TJSXMLHttpRequestRecord;\r\n AResponse: string;\r\nbegin\r\n Result := true;\r\n\r\n ctrl := GetControl;\r\n\r\n if Assigned(ctrl) then\r\n begin\r\n if (ctrl is TFilePicker) and Assigned( (ctrl as TFilePicker).OnUploadFileComplete) then\r\n (ctrl as TFilePicker).OnUploadFileComplete(ctrl, Index);\r\n\r\n if (ctrl is TFilePicker) and Assigned( (ctrl as TFilePicker).OnUploadFileResponseComplete) then\r\n begin\r\n LRequestRec.req := TJSXMLHttpRequest(Event.Target);\r\n asm\r\n AResponse = Event.target.responseText;\r\n end;\r\n\r\n (ctrl as TFilePicker).OnUploadFileResponseComplete(ctrl, Index, LRequestRec, AResponse);\r\n end;\r\n\r\n if (ctrl is TFileUpload) and Assigned( (ctrl as TFileUpload).OnUploadFileComplete) then\r\n (ctrl as TFileUpload).OnUploadFileComplete(ctrl, Index);\r\n\r\n if (ctrl is TFileUpload) and Assigned( (ctrl as TFileUpload).OnUploadFileResponseComplete) then\r\n begin\r\n LRequestRec.req := TJSXMLHttpRequest(Event.Target);\r\n asm\r\n AResponse = Event.target.responseText;\r\n end;\r\n\r\n (ctrl as TFileUpload).OnUploadFileResponseComplete(ctrl, Index, LRequestRec, AResponse);\r\n end;\r\n end;\r\n FReq := nil;\r\nend;\r\n\r\nfunction TFile.HandleFileUploadError(Event: TJSEvent): boolean;\r\nvar\r\n err: string;\r\n ctrl: TComponent;\r\nbegin\r\n asm\r\n err = Event.target.status;\r\n end;\r\n Result := true;\r\n\r\n ctrl := GetControl;\r\n\r\n if Assigned(ctrl) then\r\n begin\r\n if (ctrl is TFilePicker) and Assigned( (ctrl as TFilePicker).OnUploadFileError) then\r\n (ctrl as TFilePicker).OnUploadFileError(ctrl, Index, err);\r\n\r\n if (ctrl is TFileUpload) and Assigned( (ctrl as TFileUpload).OnUploadFileError) then\r\n (ctrl as TFileUpload).OnUploadFileError(ctrl, Index, err);\r\n end;\r\nend;\r\n\r\nfunction TFile.HandleFileUploadProgress(Event: TJSEvent): boolean;\r\nvar\r\n Lloaded, Ltotal: longint;\r\n ctrl: TComponent;\r\nbegin\r\n Lloaded := 0;\r\n LTotal := 0;\r\n\r\n asm\r\n if (Event.lengthComputable) {\r\n Lloaded = Event.loaded;\r\n Ltotal = Event.total;\r\n //console.log(Event.loaded + \" bytes of \" + Event.total); } else { console.log('no calc');\r\n }\r\n end;\r\n\r\n ctrl := GetControl;\r\n\r\n if Assigned(ctrl) then\r\n begin\r\n if (ctrl is TFilePicker) and Assigned( (GetControl as TFilePicker).OnUploadFileProgress) then\r\n (ctrl as TFilePicker).OnUploadFileProgress(ctrl, Index, Lloaded, Ltotal);\r\n\r\n if (ctrl is TFileUpload) and Assigned( (GetControl as TFileUpload).OnUploadFileProgress) then\r\n (ctrl as TFileUpload).OnUploadFileProgress(ctrl, Index, Lloaded, Ltotal);\r\n end;\r\n\r\n Result := true;\r\nend;\r\n\r\n\r\ninitialization\r\n WebLibDlg := nil;\r\n\r\nend.","{********************************************************************}\r\n{ }\r\n{ written by TMS Software }\r\n{ copyright (c) 2018 - 2025 }\r\n{ Email : info@tmssoftware.com }\r\n{ Web : http://www.tmssoftware.com }\r\n{ }\r\n{ The source code is given as is. The author is not responsible }\r\n{ for any possible damage done due to the use of this code. }\r\n{ The complete source code remains property of the author and may }\r\n{ not be distributed, published, given or sold in any form as such. }\r\n{ No parts of the source code can be included in any other component }\r\n{ or application without written authorization of the author. }\r\n{********************************************************************}\r\n\r\nunit WEBLib.Controls;\r\n\r\ninterface\r\n\r\nuses\r\n Classes, WEBLib.Graphics, Types, SysUtils, Web, JS;\r\n\r\nconst\r\n VK_CANCEL = 3;\r\n VK_BACK = 8;\r\n VK_TAB = 9;\r\n VK_RETURN = 13;\r\n VK_SHIFT = 16;\r\n VK_CONTROL = 17;\r\n VK_MENU = 18;\r\n VK_PAUSE = 19;\r\n VK_CAPITAL = 20;\r\n VK_ESCAPE = 27;\r\n VK_SPACE = 32;\r\n VK_PRIOR = 33;\r\n VK_NEXT = 34;\r\n VK_END = 35;\r\n VK_HOME = 36;\r\n VK_LEFT = 37;\r\n VK_UP = 38;\r\n VK_RIGHT = 39;\r\n VK_DOWN = 40;\r\n VK_PRINT = 42;\r\n VK_SNAPSHOT = 44;\r\n VK_INSERT = 45;\r\n VK_DELETE = 46;\r\n VK_HELP = 47;\r\n VK_LWIN = 91;\r\n VK_RWIN = 92;\r\n VK_NUMPAD0 = 96;\r\n VK_NUMPAD1 = 97;\r\n VK_NUMPAD2 = 98;\r\n VK_NUMPAD3 = 99;\r\n VK_NUMPAD4 = 100;\r\n VK_NUMPAD5 = 101;\r\n VK_NUMPAD6 = 102;\r\n VK_NUMPAD7 = 103;\r\n VK_NUMPAD8 = 104;\r\n VK_NUMPAD9 = 105;\r\n VK_MULTIPLY = 106;\r\n VK_ADD = 107;\r\n VK_SEPARATOR = 108;\r\n VK_SUBTRACT = 109;\r\n VK_DECIMAL = 110;\r\n VK_DIVIDE = 111;\r\n VK_F1 = 112;\r\n VK_F2 = 113;\r\n VK_F3 = 114;\r\n VK_F4 = 115;\r\n VK_F5 = 116;\r\n VK_F6 = 117;\r\n VK_F7 = 118;\r\n VK_F8 = 119;\r\n VK_F9 = 120;\r\n VK_F10 = 121;\r\n VK_F11 = 122;\r\n VK_F12 = 123;\r\n VK_F13 = 124;\r\n VK_F14 = 125;\r\n VK_F15 = 126;\r\n VK_F16 = 127;\r\n VK_F17 = 128;\r\n VK_F18 = 129;\r\n VK_F19 = 130;\r\n VK_F20 = 131;\r\n VK_F21 = 132;\r\n VK_F22 = 133;\r\n VK_F23 = 134;\r\n VK_F24 = 135;\r\n VK_NUMLOCK = 144;\r\n\r\n WHEEL_DELTA = 120;\r\n\r\ntype\r\n TCursor = type Integer;\r\n\r\nconst\r\n crDefault = 0;\r\n crNone = 1;\r\n crArrow = 2;\r\n crCross = 3;\r\n crIBeam = 4;\r\n crSize = 5;\r\n crSizeNESW = 6;\r\n crSizeNS = 7;\r\n crSizeNWSE = 8;\r\n crSizeWE = 9;\r\n crUpArrow = 10;\r\n crHourGlass = 11;\r\n crDrag = 12;\r\n crNoDrop = 13;\r\n crHSplit = 14;\r\n crVSplit = 15;\r\n crMultIDrag = 16;\r\n crSQLWait = 17;\r\n crNo = 18;\r\n crAppStart = 19;\r\n crHelp = 20;\r\n crHandPoint = 21;\r\n crSizeAll = 22;\r\n\r\n CSSBackground = 'background-color';\r\n CSSZIndex = 'z-index';\r\n\r\ntype\r\n TCSSCodeManager = class;\r\n TCSSLibrary = (cssNone, cssBootstrap);\r\n\r\n Single = Double;\r\n TDragState = (dsDragEnter, dsDragLeave, dsDragMove);\r\n TDragMode = (dmManual, dmAutomatic);\r\n TDragKind = (dkDrag, dkDock);\r\n TDragObject = class(TObject);\r\n\r\n TAlign = (alNone, alTop, alBottom, alLeft, alRight, alClient, alCustom);\r\n TMouseButton = (mbLeft, mbRight, mbMiddle);\r\n TBorderStyle = (bsNone, bsSingle);\r\n TSizeStyle = (ssPercent, ssAbsolute, ssAuto);\r\n TScrollStyle = (ssNone, ssHorizontal, ssVertical, ssBoth);\r\n TStyleElements = set of (seFont, seClient, seBorder);\r\n\r\n TAnchorKind = (akLeft, akTop, akRight, akBottom);\r\n TAnchors = set of TAnchorKind;\r\n\r\n TMaterialGlyph = string;\r\n\r\n TElementClassName = type string;\r\n TElementID = type string;\r\n TElementFont = (efProperty, efCSS);\r\n TElementPosition = (epAbsolute, epRelative, epIgnore);\r\n\r\n TElementEvent = (eeClick, eeMouseDown, eeMouseUp, eeMouseMove, eeDblClick, eeKeyPress, eeKeyDown, eeKeyUp);\r\n TEventPropagation = set of TElementEvent;\r\n\r\n TTextDirection = (tdDefault, tdLeftToRight, tdRightToLeft, tdInherit);\r\n\r\n TBevelCut = (bvNone, bvLowered, bvRaised, bvSpace);\r\n TBevelEdge = (beLeft, beTop, beRight, beBottom);\r\n TBevelEdges = set of TBevelEdge;\r\n TBevelKind = (bkNone, bkTile, bkSoft, bkFlat);\r\n\r\n TInputType = (itText, itEmail, itDate, itDateTime, itFile, itMonth, itNumber, itPassword, itSearch, itTime, itURL, itWeek);\r\n\r\n TMaterialGlyphType = (mgNormal, mgOutlined, mgTwoTone, mgRound, mgSharp);\r\n\r\n TJSXMLHttpRequestRecord = record\r\n req: TJSXMLHttpRequest;\r\n end;\r\n\r\n TJSEventRecord = record\r\n event: TEventListenerEvent;\r\n end;\r\n\r\n THTTPResponseEvent = procedure(Sender: TObject; AResponse: string) of object;\r\n THTTPRequestResponseEvent = procedure(Sender: TObject; ARequest: TJSXMLHttpRequestRecord; AResponse: string) of object;\r\n THTTPAbortEvent = procedure(Sender: TObject) of object;\r\n THTTPErrorEvent = procedure(Sender: TObject; ARequest: TJSXMLHttpRequestRecord; Event: TJSEventRecord; var Handled: boolean) of object;\r\n\r\n TJSHTMLElementRecord = record\r\n element: TJSHTMLElement;\r\n end;\r\n\r\n TJSObjectRecord = record\r\n jsobject: TJSObject;\r\n end;\r\n\r\n TJSArrayRecord = record\r\n jsarray: TJSArray;\r\n end;\r\n\r\n TJSArrayBufferRecord = record\r\n jsarraybuffer: TJSArrayBuffer;\r\n end;\r\n\r\n TDragSourceObject = class(TObject)\r\n private\r\n FJSEvent: TJSEvent;\r\n FObject: TObject;\r\n public\r\n property Event: TJSEvent read FJSEvent write FJSEvent;\r\n property &Object: TObject read FObject write FObject;\r\n end;\r\n\r\n TNotifyEvent = procedure(Sender: TObject) of object;\r\n TMouseEvent = procedure(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X,Y: Integer) of object;\r\n TMouseWheelEvent = procedure(Sender: TObject; Shift: TShiftState; WheelDelta: Integer; MousePos: TPoint; var Handled: Boolean) of object;\r\n TMouseWheelUpDownEvent = procedure(Sender: TObject; Shift: TShiftState;\r\n MousePos: TPoint; var Handled: Boolean) of object;\r\n TMouseMoveEvent = procedure(Sender: TObject; Shift: TShiftState; X,Y: Integer) of object;\r\n TKeyEvent = procedure(Sender: TObject; var AKey: Word; Shift: TShiftState) of object;\r\n TKeyPressEvent = procedure(Sender: TObject; var AChar: Char) of object;\r\n TTouchEvent = procedure(Sender: TObject; X,Y: integer) of object;\r\n TBiDiMode = (bdLeftToRight, bdRightToLeft, bdRightToLeftNoAlign, bdRightToLeftReadingOnly);\r\n\r\n TDragOverEvent = procedure(Sender, Source: TObject; X, Y: Integer; State: TDragState; var Accept: Boolean) of object;\r\n TDragDropEvent = procedure(Sender, Source: TObject; X, Y: Integer) of object;\r\n TStartDragEvent = procedure(Sender: TObject; var DragObject: TDragObject) of object;\r\n TEndDragEvent = procedure(Sender, Target: TObject; X, Y: Integer) of object;\r\n TScreenshotEvent = procedure(Sender: TObject; ABitmap: TBitmap) of object;\r\n\r\n TControlStyleValue = (csAcceptsControls, csSetCaption);\r\n TControlStyle = set of TControlStyleValue;\r\n\r\n TMargins = class(TPersistent)\r\n private\r\n FOnChange: TNotifyEvent;\r\n FLeft, FTop, FRight, FBottom: Integer;\r\n protected\r\n procedure SetLeft(const Value: integer);\r\n procedure SetTop(const Value: integer);\r\n procedure SetRight(const Value: integer);\r\n procedure SetBottom(const Value: integer);\r\n procedure DoChange; virtual;\r\n public\r\n constructor Create; reintroduce;\r\n property OnChange: TNotifyEvent read FOnChange write FOnChange;\r\n procedure Assign(Source: TPersistent); override;\r\n published\r\n property Left: Integer read FLeft write SetLeft default 3;\r\n property Top: Integer read FTop write SetTop default 3;\r\n property Right: Integer read FRight write SetRight default 3;\r\n property Bottom: Integer read FBottom write SetBottom default 3;\r\n end;\r\n\r\n TCenter = class(TPersistent)\r\n private\r\n FHorizontal: boolean;\r\n FVertical: boolean;\r\n FOnChange: TNotifyEvent;\r\n protected\r\n procedure SetHorizontal(const Value: boolean);\r\n procedure SetVertical(const Value: boolean);\r\n procedure DoChange; virtual;\r\n public\r\n procedure Assign(Source: TPersistent); override;\r\n property OnChange: TNotifyEvent read FOnChange write FOnChange;\r\n published\r\n property Horizontal: boolean read FHorizontal write SetHorizontal default false;\r\n property Vertical: boolean read FVertical write SetVertical default false;\r\n end;\r\n\r\n TPadding = class(TPersistent)\r\n private\r\n FOnChange: TNotifyEvent;\r\n FLeft, FTop, FRight, FBottom: Integer;\r\n protected\r\n procedure SetLeft(const Value: integer);\r\n procedure SetTop(const Value: integer);\r\n procedure SetRight(const Value: integer);\r\n procedure SetBottom(const Value: integer);\r\n procedure DoChange; virtual;\r\n public\r\n constructor Create; reintroduce;\r\n property OnChange: TNotifyEvent read FOnChange write FOnChange;\r\n procedure Assign(Source: TPersistent); override;\r\n published\r\n property Left: Integer read FLeft write SetLeft default 0;\r\n property Top: Integer read FTop write SetTop default 0;\r\n property Right: Integer read FRight write SetRight default 0;\r\n property Bottom: Integer read FBottom write SetBottom default 0;\r\n end;\r\n\r\n\r\n TPercentSize = single;\r\n\r\n IControl = interface\r\n function EnterChildren(AObject: IControl): Boolean;\r\n function ExitChildren(AObject: IControl): Boolean;\r\n end;\r\n\r\n TControl = class(TComponent, IControl)\r\n private\r\n FGotFocus: Boolean;\r\n FAcceptDrag: Boolean;\r\n FCaptureDown: Boolean;\r\n FMouseInsideLayer: Boolean;\r\n FLayer: TJSElement;\r\n FCaptured: Boolean;\r\n FControlCreated: Boolean;\r\n FUpdateCount: integer;\r\n FBlockUpdateElement: Boolean;\r\n FElement: TJSElement;\r\n FID: string;\r\n FNew: Boolean;\r\n FContainer: TJSElement;\r\n FElementEvent, FLastElementEvent: TJSEvent;\r\n FElementClassName: string;\r\n FFont: TFont;\r\n FParent, FPrevParent: TControl;\r\n FControls: array of TControl;\r\n FOnDragOver: TDragOverEvent;\r\n FOnDragDrop: TDragDropEvent;\r\n FOnStartDrag: TStartDragEvent;\r\n FonEndDrag: TEndDragEvent;\r\n FOnClick: TNotifyEvent;\r\n FOnDblClick: TNotifyEvent;\r\n FOnMouseDown: TMouseEvent;\r\n FOnMouseUp: TMouseEvent;\r\n FOnMouseMove: TMouseMoveEvent;\r\n FOnKeyDown: TKeyEvent;\r\n FOnKeyUp: TKeyEvent;\r\n FOnKeyPress: TKeyPressEvent;\r\n FOnEnter: TNotifyEvent;\r\n FOnExit: TNotifyEvent;\r\n FEnabled: Boolean;\r\n FHint: string;\r\n FRole: string;\r\n FShowHint: Boolean;\r\n FTabOrder: Integer;\r\n FTabStop: Boolean;\r\n FVisible: Boolean;\r\n FWidth: Integer;\r\n FHeight: Integer;\r\n FTag: Integer;\r\n FAlign: TAlign;\r\n FAnchors: TAnchors;\r\n FAlignWithMargins: boolean;\r\n FIsAligning: boolean;\r\n FOnMouseEnter: TNotifyEvent;\r\n FOnMouseLeave: TNotifyEvent;\r\n FCursor: TCursor;\r\n FDoubleBuffered: Boolean;\r\n FControlStyle: TControlStyle;\r\n FMargins: TMargins;\r\n FCenter: TCenter;\r\n FOnMouseWheel: TMouseWheelEvent;\r\n FParentDoubleBuffered: Boolean;\r\n FParentColor: Boolean;\r\n FParentFont: Boolean;\r\n FParentBiDiMode: Boolean;\r\n FOnTouchMove: TTouchEvent;\r\n FOnTouchStart: TTouchEvent;\r\n FOnTouchEnd: TTouchEvent;\r\n FOnTouchCancel: TTouchEvent;\r\n FLinkTouchEvents: Boolean;\r\n FWidthStyle: TSizeStyle;\r\n FHeightStyle: TSizeStyle;\r\n FWidthPercent: TPercentSize;\r\n FHeightPercent: TPercentSize;\r\n FOrigRect: TRect;\r\n FOrigParentRect: TRect;\r\n FIsResizing: boolean;\r\n FShowFocus: boolean;\r\n FBorderWidth: integer;\r\n FOrigTop: integer;\r\n FOrigLeft: integer;\r\n FUpdateTopLeft: boolean;\r\n FEnablePropagation: Boolean;\r\n FParentShowHint: Boolean;\r\n FScriptLoaded: Boolean;\r\n FControlScriptCount: Integer;\r\n FControlScriptCountLoaded: Integer;\r\n FRequiredScripts: TStringList;\r\n FElementFont: TElementFont;\r\n FElementPosition: TElementPosition;\r\n FParentElement: TJSHTMLElement;\r\n FTagObject: TObject;\r\n FClipChildren: Boolean;\r\n FTextDirection: TTextDirection;\r\n FEventStopPropagation: TEventPropagation;\r\n FParentElementID: string;\r\n FOnResize: TNotifyEvent;\r\n FMouseMovePtr: pointer;\r\n FMouseDownPtr: pointer;\r\n FMouseUpPtr: pointer;\r\n FMouseEnterPtr: pointer;\r\n FMouseLeavePtr: pointer;\r\n FClickPtr: pointer;\r\n FDblClickPtr: pointer;\r\n FKeyDownPtr: pointer;\r\n FKeyUpPtr: pointer;\r\n FKeyPressPtr: pointer;\r\n FInputPtr: pointer;\r\n FTouchStartPtr: pointer;\r\n FTouchEndPtr: pointer;\r\n FTouchMovePtr: pointer;\r\n FTouchCancelPtr: pointer;\r\n FContextMenuPtr: pointer;\r\n FExitPtr: pointer;\r\n FEnterPtr: pointer;\r\n FWheelPtr: pointer;\r\n FLayerMouseEnterPtr: pointer;\r\n FLayerMouseLeavePtr: pointer;\r\n FScriptLoadedPtr: pointer;\r\n FDragStartPtr: pointer;\r\n FDragOverPtr: pointer;\r\n FDragEnterPtr: pointer;\r\n FDragLeavePtr: pointer;\r\n FDragEndPtr: pointer;\r\n FDragDropPtr: pointer;\r\n FChildOrder: integer;\r\n FAllowTouch: boolean;\r\n FCtl3D: boolean;\r\n FParentCtl3D: boolean;\r\n FWheelAccumulator: integer;\r\n FWheelMousePos: TPoint;\r\n FBiDiMode: TBiDiMode;\r\n FOnMouseWheelDown: TMouseWheelUpDownEvent;\r\n FOnMouseWheelUp: TMouseWheelUpDownEvent;\r\n FNoUserSelect: boolean;\r\n FEventsBound: boolean;\r\n FDragMode: TDragMode;\r\n FToolTip: JSValue;\r\n FDesignTime: boolean;\r\n function GetControlsCount: Integer;\r\n function GetControls(Index: Integer): TControl;\r\n procedure SetVisible(AValue: Boolean);\r\n procedure SetHint(AValue: string);\r\n procedure SetShowHint(AValue: Boolean);\r\n procedure SetTabOrder(AValue: Integer);\r\n procedure SetTabStop(AValue: Boolean);\r\n procedure SetAlign(const Value: TAlign);\r\n procedure SetAlignWithMargins(const Value: boolean);\r\n function GetBoundsRect: TRect;\r\n procedure SetBoundsRect(const Value: TRect);\r\n procedure SetID(const Value: string);\r\n procedure SetMargins(const Value: TMargins);\r\n procedure SetAnchors(const Value: TAnchors);\r\n function GetElementEvent: TJSEvent;\r\n function GetClientOrigin: TPoint;\r\n procedure SetHeightStyle(const Value: TSizeStyle);\r\n procedure SetWidthStyle(const Value: TSizeStyle);\r\n procedure SetHeightPercent(const Value: TPercentSize);\r\n procedure SetWidthPercent(const Value: TPercentSize);\r\n procedure SetShowFocus(const Value: boolean);\r\n procedure SetBorderWidth(const Value: integer); virtual;\r\n function GetIsLinked: boolean;\r\n procedure SetScriptLoaded(const Value: boolean);\r\n procedure SetRequiredScripts(const Value: TStringList);\r\n procedure SetElementFont(const Value: TElementFont);\r\n procedure SetElementPosition(const Value: TElementPosition);\r\n procedure SetParentElement(const Value: TJSHTMLElement);\r\n procedure SetClipChildren(const Value: Boolean);\r\n function GetClientHeight: Integer; virtual;\r\n function GetClientWidth: Integer; virtual;\r\n procedure SetClientHeight(const Value: Integer); virtual;\r\n procedure SetClientWidth(const Value: Integer); virtual;\r\n procedure SetParentElementID(const Value: string);\r\n procedure SetChildOrderEx(const Value: integer);\r\n function GetRole: string;\r\n procedure SetRole(const Value: string);\r\n function GetContainer: TJSElement; virtual;\r\n function GetChildContainer: TJSElement; virtual;\r\n procedure SetParentFont(const Value: boolean);\r\n procedure SetParentColor(const Value: boolean);\r\n procedure SetDragMode(const Value: TDragMode);\r\n protected\r\n FColor: TColor;\r\n procedure SetWidth(AValue: Integer); virtual;\r\n procedure SetHeight(AValue: Integer); virtual;\r\n procedure SetWidthInt(AValue: Integer); virtual;\r\n procedure SetHeightInt(AValue: Integer); virtual;\r\n procedure SetEnabled(Value: Boolean); virtual;\r\n procedure RecreateCanvas; virtual;\r\n procedure VisibleChanging; virtual;\r\n procedure VisibleChanged; virtual;\r\n procedure ColorChanging; virtual;\r\n procedure IncUpdateCount;\r\n procedure DecUpdateCount;\r\n procedure FocusedControlEntered;\r\n procedure FocusedControlExited;\r\n function EnterChildren(AObject: IControl): Boolean; virtual;\r\n function ExitChildren(AObject: IControl): Boolean; virtual;\r\n function GetWidth: Integer; virtual;\r\n function GetHeight: Integer; virtual;\r\n function GetOuterWidth: integer; virtual;\r\n function GetOuterHeight: integer; virtual;\r\n function GetDesignWidth: integer; virtual;\r\n function GetDesignHeight: integer; virtual;\r\n function GetDesignLeft: integer; virtual;\r\n function GetDesignTop: integer; virtual;\r\n function GetLeft: Integer; override;\r\n function GetTop: Integer; override;\r\n function HandleAllocated: Boolean; virtual;\r\n function CreateElement: TJSElement; virtual;\r\n procedure CreateChildElements(AContainer: TJSElement); virtual;\r\n function ContainerElement: TJSElement; virtual;\r\n function IsStructuralElement: boolean; virtual;\r\n function IsEnabled: boolean; virtual;\r\n function GetNewName: string; virtual;\r\n function IsInputControl: boolean; virtual;\r\n function UseCSSFont: boolean; virtual;\r\n function UseCSSFontColor: boolean; virtual;\r\n procedure RecreateElement; virtual;\r\n procedure BindElement; virtual;\r\n procedure CreateInitialize; virtual;\r\n procedure DestroyControls; virtual;\r\n procedure ClearControls; virtual;\r\n function GetElementStyle: TJSCSSStyleDeclaration; virtual;\r\n procedure InitCSSLibrary(ALibrary: TCSSLibrary); virtual;\r\n procedure SetControlCursor(const Value: TCursor); virtual;\r\n procedure SetBiDiMode(const Value: TBiDiMode); virtual;\r\n function GetMouseEventButton(Event: TJSMouseEvent): TMouseButton; virtual;\r\n function GetMouseEventShiftState(Event: TJSMouseEvent): TShiftState; virtual;\r\n function GetKeyBoardEventShiftState(Event: TJSKeyBoardEvent): TShiftState; virtual;\r\n function GetMouseWheelEventShiftState(Event: TJSWheelEvent): TShiftState; virtual;\r\n function GetTouchEventShiftState(Event: TJSTouchEvent): TShiftState; virtual;\r\n function HandleDoClick(Event: TJSMouseEvent): Boolean; virtual;\r\n function HandleDoWheel(Event: TJSWheelEvent): Boolean; virtual;\r\n function HandleDoDblClick(Event: TJSMouseEvent): Boolean; virtual;\r\n function HandleDoMouseDown(Event: TJSMouseEvent): Boolean; virtual;\r\n function HandleDoMouseUp(Event: TJSMouseEvent): Boolean; virtual;\r\n function HandleDoMouseMove(Event: TJSMouseEvent): Boolean; virtual;\r\n function HandleDoMouseLeave(Event: TJSMouseEvent): Boolean; virtual;\r\n function HandleDoContextMenu(Event: TJSMouseEvent): Boolean; virtual;\r\n function LayerHandleDoMouseEnter(Event: TJSMouseEvent): Boolean; virtual;\r\n function LayerHandleDoMouseLeave(Event: TJSMouseEvent): Boolean; virtual;\r\n function HandleDoMouseEnter(Event: TJSMouseEvent): Boolean; virtual;\r\n function HandleDoKeyDown(Event: TJSKeyBoardEvent): Boolean; virtual;\r\n function HandleDoKeyUp(Event: TJSKeyBoardEvent): Boolean; virtual;\r\n function HandleDoKeyPress(Event: TJSKeyBoardEvent): Boolean; virtual;\r\n function HandleDoInput(Event: TJSInputEvent): Boolean; virtual;\r\n function HandleDoExit(Event: TEventListenerEvent): Boolean; virtual;\r\n function HandleDoEnter(Event: TJSFocusEvent): Boolean; virtual;\r\n function HandleDoTouchStart(Event: TJSTouchEvent): Boolean; virtual;\r\n function HandleDoTouchMove(Event: TJSTouchEvent): Boolean; virtual;\r\n function HandleDoTouchEnd(Event: TJSTouchEvent): Boolean; virtual;\r\n function HandleDoTouchCancel(Event: TJSTouchEvent): Boolean; virtual;\r\n function HandleDoDragStart(Event: TJSDragEvent): Boolean; virtual;\r\n function HandleDoDragOver(Event: TJSDragEvent): Boolean; virtual;\r\n function HandleDoDragEnter(Event: TJSDragEvent): Boolean; virtual;\r\n function HandledoDragLeave(Event: TJSDragEvent): Boolean; virtual;\r\n function HandleDoDragEnd(Event: TJSDragEvent): Boolean; virtual;\r\n function HandleDoDragDrop(Event: TJSDragEvent): Boolean; virtual;\r\n procedure HandleKeyPreview(Key: Word); virtual;\r\n procedure HandleFontChanged(Sender: TObject); virtual;\r\n procedure ParentFontChanged;\r\n procedure DoExit; virtual;\r\n procedure DoEnter; virtual;\r\n procedure Click; virtual;\r\n procedure UpdateElement; virtual;\r\n procedure UpdateElementSize; virtual;\r\n procedure UpdateElementVisual; virtual;\r\n procedure UpdateElementData; virtual;\r\n procedure UpdateParent; virtual;\r\n procedure UpdateControlSize(AWidth, AHeight: integer); virtual;\r\n procedure InternalUpdateParent; virtual;\r\n procedure UpdateChildren(AControl: TControl); virtual;\r\n procedure PersistinHTML; virtual;\r\n procedure LoadFromHTML(const HTML: string); virtual;\r\n procedure InitFromHTML; virtual;\r\n function SaveState: string; virtual;\r\n procedure LoadState(AState: string); virtual;\r\n procedure DisableTab; virtual;\r\n procedure EnableTab; virtual;\r\n\r\n procedure SetElementClassName(AValue: string); virtual;\r\n procedure SetColor(AValue: TColor); virtual;\r\n procedure SetFont(AValue: TFont); virtual;\r\n procedure SetParent(AValue: TControl); virtual;\r\n procedure RegisterParent(AValue: TControl); virtual;\r\n procedure UnRegisterParent(AValue: TControl); virtual;\r\n function CanAcceptChild(AValue: TControl): TControl; virtual;\r\n\r\n procedure SetLeft(AValue: Integer); override;\r\n procedure SetTop(AValue: Integer); override;\r\n\r\n procedure MouseUp(Button: TMouseButton; Shift: TShiftState; X,Y: Integer); virtual;\r\n procedure MouseDown(Button: TMouseButton; Shift: TShiftState; X,Y: Integer); virtual;\r\n procedure MouseMove(Shift: TShiftState; X,Y: Integer); virtual;\r\n\r\n procedure TouchStart(X,Y: Integer); virtual;\r\n procedure TouchMove(X,Y: Integer); virtual;\r\n procedure TouchEnd(X,Y: Integer); virtual;\r\n procedure TouchCancel(X,Y: Integer); virtual;\r\n\r\n procedure DoMouseEnter; virtual;\r\n procedure DoMouseLeave; virtual;\r\n procedure MouseWheel(Shift: TShiftState; WheelDelta: Integer; var Handled: Boolean); virtual;\r\n function DoMouseWheelDown(Shift: TShiftState; MousePos: TPoint): Boolean; virtual;\r\n function DoMouseWheelUp(Shift: TShiftState; MousePos: TPoint): Boolean; virtual;\r\n procedure DblClick; virtual;\r\n procedure KeyDown(var Key: Word; Shift: TShiftState); virtual;\r\n procedure KeyPreview(var Key: Word; Shift: TShiftState); virtual;\r\n procedure KeyPress(var Key: Char); virtual;\r\n procedure KeyUp(var Key: Word; Shift: TShiftState); virtual;\r\n procedure SetFocus; virtual;\r\n procedure DoMarginsChanged(Sender: TObject); virtual;\r\n procedure DoCenterChanged(Sender: TObject); virtual;\r\n procedure DoRealign; virtual;\r\n procedure DoBoundsChange; virtual;\r\n procedure DoEndDrag(Target: TObject; X, Y: Integer); virtual;\r\n procedure DoStartDrag(var DragObject: TDragObject); virtual;\r\n procedure DragOver(Source: TObject; X, Y: Integer; State: TDragState;\r\n var Accept: Boolean); virtual;\r\n function IsFocused: Boolean; virtual;\r\n function Focused: Boolean; virtual;\r\n function GetID: string; virtual;\r\n function GetElementHandle: TJSHTMLElement; virtual;\r\n function GetElementBindHandle: TJSEventTarget; virtual;\r\n function GetElement: TJSElement;\r\n function GetKeyCode(AValue: string; IgnoreCase: boolean = true): Integer;\r\n function GetKeyChar(AValue: string): Char;\r\n function IsKeyCharacter(AValue: string): Boolean;\r\n function GetClientRect: TRect; virtual;\r\n property ChildContainer: TJSElement read GetChildContainer;\r\n property ElementBindHandle: TJSEventTarget read GetElementBindHandle;\r\n property Element: TJSElement read GetElement;\r\n\r\n procedure CreateControl; virtual;\r\n procedure ClearMethodPointers; virtual;\r\n procedure GetMethodPointers; virtual;\r\n function EventsBound: boolean;\r\n procedure BindEvents; virtual;\r\n procedure UnbindEvents; virtual;\r\n procedure UpdatePadding(var ARect: TRect); virtual;\r\n procedure AlignControls(AControl: TControl; var ARect: TRect); virtual;\r\n procedure AlignControl(AControl: TControl); virtual;\r\n procedure InitAnchoring; virtual;\r\n function AnchoringInitialized: boolean;\r\n procedure InitScript; virtual;\r\n procedure Realign; virtual;\r\n procedure Loaded; override;\r\n procedure InternalResize; virtual;\r\n procedure FontChanged; virtual;\r\n procedure DisposeOf;\r\n procedure ClearChildElements; virtual;\r\n\r\n property Color: TColor read FColor write SetColor;\r\n property ControlCreated: boolean read FControlCreated;\r\n property Font: TFont read FFont write SetFont;\r\n property ClientOrigin: TPoint read GetClientOrigin;\r\n property OrigRect: TRect read FOrigRect;\r\n property DragMode: TDragMode read FDragMode write SetDragMode default dmManual;\r\n\r\n property OnClick: TNotifyEvent read FOnClick write FOnClick;\r\n property OnResize: TNotifyEvent read FOnResize write FOnResize;\r\n property OnDblClick: TNotifyEvent read FOnDblClick write FOnDblClick;\r\n property ControlStyle: TControlStyle read FControlStyle write FControlStyle;\r\n procedure HookElement;\r\n procedure SetElementColor(AElement: TJSHTMLElement; AColor: TColor);\r\n class procedure MoveElements(FromElement,ToElement: TJSElement); virtual;\r\n procedure MoveElementsAndFree(FromElement,ToElement: TJSElement); virtual;\r\n procedure CreateWithID(AID: string); virtual;\r\n procedure AddInstanceStyle(const css: string); virtual; overload;\r\n class procedure AddInstanceStyle(const id: string; const css: string); virtual; overload;\r\n procedure AddControlStyle(const css: string); virtual;\r\n procedure AddControlLink(const linkid, link: string); virtual;\r\n procedure AddControlScriptLink(const link: string); virtual;\r\n procedure AddControlScriptSource(const source: string); virtual;\r\n function AddRequiredScripts: boolean;\r\n procedure AddRequiredScript(const link: string); virtual;\r\n procedure ResetAnchoring; virtual;\r\n procedure UpdateSize; virtual;\r\n procedure UpdateAnchoring; virtual;\r\n procedure UpdateChildAnchoring; virtual;\r\n procedure SetElementPointer(AElement: TJSHTMLElement; ACursor: TCursor);\r\n function GetWebClassName: string; virtual;\r\n function GetCSSManager: TCSSCodeManager; virtual;\r\n function IsUpdating: boolean;\r\n function CanShowFocus: boolean; virtual;\r\n procedure RequiredScriptLoaded(Event: TJSEvent); virtual;\r\n procedure InjectCSS; virtual;\r\n procedure StartCapture; virtual;\r\n property LinkTouchEvents: Boolean read FLinkTouchEvents write FLinkTouchEvents;\r\n property OnTouchStart: TTouchEvent read FOnTouchStart write FOnTouchStart;\r\n property OnTouchMove: TTouchEvent read FOnTouchMove write FOnTouchMove;\r\n property OnTouchEnd: TTouchEvent read FOnTouchEnd write FOnTouchEnd;\r\n property OnTouchCancel: TTouchEvent read FOnTouchCancel write FOnTouchCancel;\r\n property ShowFocus: boolean read FShowFocus write SetShowFocus default false;\r\n property BorderWidth: integer read FBorderWidth write SetBorderWidth default 0;\r\n property ControlScriptCount: integer read FControlScriptCount write FControlScriptCount;\r\n property ControlScriptCountLoaded: integer read FControlScriptCountLoaded write FControlScriptCountLoaded;\r\n property RequiredScripts: TStringList read FRequiredScripts write SetRequiredScripts;\r\n property Role: string read GetRole write SetRole;\r\n property TextDirection: TTextDirection read FTextDirection write FTextDirection default tdDefault;\r\n function RequiredBaseURL: string; virtual;\r\n function GetStyle(css: string): string;\r\n procedure SetBoundsInt(X, Y, AWidth, AHeight: Integer); virtual;\r\n procedure MoveFirst(AControl: TControl); virtual;\r\n procedure MoveLast(AControl: TControl); virtual;\r\n property ParentElementHandle: TJSHTMLElement read FParentElement write FParentElement;\r\n property NoUserSelect: boolean read FNoUserSelect write FNoUserSelect;\r\n procedure EnableDrag; virtual;\r\n procedure DisableDrag; virtual;\r\n property OnDragOver: TDragOverEvent read FOnDragOver write FOnDragOver;\r\n property OnDragDrop: TDragDropEvent read FOnDragDrop write FOnDragDrop;\r\n property OnStartDrag: TStartDragEvent read FOnStartDrag write FOnStartDrag;\r\n property OnEndDrag: TEndDragEvent read FOnEndDrag write FOnEndDrag;\r\n public\r\n constructor Create(ID: string); virtual; overload;\r\n constructor Create(AOwner: TComponent); overload; override;\r\n destructor Destroy; override;\r\n procedure Assign(Source: TPersistent); override;\r\n procedure DragDrop(Source: TObject; X, Y: Integer); virtual;\r\n procedure Resize; virtual;\r\n procedure Capture;\r\n procedure ApplyName;\r\n procedure ReleaseCapture;\r\n procedure BringToFront;\r\n procedure SendToBack;\r\n procedure Show;\r\n procedure Hide;\r\n procedure PreventDefault;\r\n procedure StopPropagation;\r\n procedure BeginDrag;\r\n procedure BeginUpdate; override;\r\n procedure EndUpdate; override;\r\n property Container: TJSElement read GetContainer write FContainer;\r\n property DesignTime: boolean read FDesignTime;\r\n procedure Invalidate; virtual;\r\n procedure SetParentComponent(Value: TComponent); override;\r\n procedure SetBounds(X, Y, AWidth, AHeight: Integer); virtual;\r\n procedure XYToClient(X,Y: single; var AClientX, AClientY: single); virtual;\r\n procedure ClientToXY(AClientX, AClientY: single; var X,Y: single); virtual;\r\n procedure GetChildren(Proc: TGetChildProc; Root: TComponent); override;\r\n function Captured: Boolean; virtual;\r\n function MakeScreenshot: TBitmap; virtual;\r\n function ClientToScreen(const Point: TPoint): TPoint; virtual;\r\n function ScreenToClient(const Point: TPoint): TPoint; virtual;\r\n function CanFocus: Boolean; virtual;\r\n function HasHorzScrollBar: Boolean; virtual;\r\n function HasVertScrollBar: Boolean; virtual;\r\n property BiDiMode: TBiDiMode read FBiDiMode write SetBiDiMode default bdLeftToRight;\r\n property Ctl3D: boolean read FCtl3D write FCtl3D;\r\n property ParentCtl3D: boolean read FParentCtl3D write FParentCtl3D;\r\n property AllowTouch: boolean read FAllowTouch write FAllowTouch;\r\n property EventStopPropagation: TEventPropagation read FEventStopPropagation write FEventStopPropagation;\r\n property Center: TCenter read FCenter;\r\n property ChildOrder: integer read FChildOrder write SetChildOrderEx default 0;\r\n property Controls[Index: Integer]: TControl read GetControls;\r\n property ControlCount: Integer read GetControlsCount;\r\n property Parent: TControl read FParent write SetParent;\r\n property ParentElement: TJSHTMLElement read FParentElement write SetParentElement;\r\n property ParentElementID: string read FParentElementID write SetParentElementID;\r\n property BoundsRect: TRect read GetBoundsRect write SetBoundsRect;\r\n property DoubleBuffered: Boolean read FDoubleBuffered write FDoubleBuffered default false;\r\n property ParentDoubleBuffered: Boolean read FParentDoubleBuffered write FParentDoubleBuffered default true;\r\n property ParentColor: boolean read FParentColor write SetParentColor default false;\r\n property ParentFont: boolean read FParentFont write SetParentFont default true;\r\n property ParentBiDiMode: boolean read FParentBiDiMode write FParentBiDiMode default true;\r\n property Align: TAlign read FAlign write SetAlign default alNone;\r\n property AlignWithMargins: boolean read FAlignWithMargins write SetAlignWithMargins default false;\r\n property ElementEvent: TJSEvent read GetElementEvent write FElementEvent;\r\n property ElementHandle: TJSHTMLElement read GetElementHandle;\r\n property ElementClassName: TElementClassName read FElementClassName write SetElementClassName;\r\n property ElementFont: TElementFont read FElementFont write SetElementFont default efProperty;\r\n property ElementPosition: TElementPosition read FElementPosition write SetElementPosition default epAbsolute;\r\n property ElementID: TElementID read GetID write SetID;\r\n property Margins: TMargins read FMargins write SetMargins;\r\n property ClientRect: TRect read GetClientRect;\r\n property EnablePropagation: Boolean read FEnablePropagation write FEnablePropagation default False;\r\n property ScriptLoaded: boolean read FScriptLoaded write SetScriptLoaded;\r\n property ClipChildren: Boolean read FClipChildren write SetClipChildren default True;\r\n\r\n property Anchors: TAnchors read FAnchors write SetAnchors default [akLeft, akTop];\r\n property Cursor: TCursor read FCursor write SetControlCursor default crDefault;\r\n property Enabled: Boolean read FEnabled write SetEnabled default true;\r\n property HeightStyle: TSizeStyle read FHeightStyle write SetHeightStyle default ssAbsolute;\r\n property Height: Integer read GetHeight write SetHeight;\r\n property HeightPercent: TPercentSize read FHeightPercent write SetHeightPercent default 100;\r\n property Hint: string read FHint write SetHint;\r\n property IsLinked: boolean read GetIsLinked;\r\n property ShowHint: Boolean read FShowHint write SetShowHint default false;\r\n property ParentShowHint: Boolean read FParentShowHint write FParentShowHint;\r\n property TabOrder: Integer read FTabOrder write SetTabOrder;\r\n property TabStop: Boolean read FTabStop write SetTabStop default true;\r\n property Tag: Integer read FTag write FTag default 0;\r\n property TagObject: TObject read FTagObject write FTagObject;\r\n property Visible: Boolean read FVisible write SetVisible default true;\r\n property WidthStyle: TSizeStyle read FWidthStyle write SetWidthStyle default ssAbsolute;\r\n property ClientHeight: Integer read GetClientHeight write SetClientHeight;\r\n property ClientWidth: Integer read GetClientWidth write SetClientWidth;\r\n property Width: Integer read GetWidth write SetWidth;\r\n property WidthPercent: TPercentSize read FWidthPercent write SetWidthPercent default 100;\r\n\r\n property OnMouseWheel: TMouseWheelEvent read FOnMouseWheel write FOnMouseWheel;\r\n property OnMouseWheelDown: TMouseWheelUpDownEvent read FOnMouseWheelDown write FOnMouseWheelDown;\r\n property OnMouseWheelUp: TMouseWheelUpDownEvent read FOnMouseWheelUp write FOnMouseWheelUp;\r\n\r\n property OnMouseDown: TMouseEvent read FOnMouseDown write FOnMouseDown;\r\n property OnMouseUp: TMouseEvent read FOnMouseUp write FOnMouseUp;\r\n property OnMouseMove: TMouseMoveEvent read FOnMouseMove write FOnMouseMove;\r\n property OnMouseEnter: TNotifyEvent read FOnMouseEnter write FOnMouseEnter;\r\n property OnMouseLeave: TNotifyEvent read FOnMouseLeave write FOnMouseLeave;\r\n //Note: On Android the OnKeyUp and OnKeyDown events do not return the correct KeyCode.\r\n //This is a known issue:\r\n //https://bugs.chromium.org/p/chromium/issues/detail?id=118639\r\n //https://stackoverflow.com/questions/36753548/keycode-on-android-is-always-229\r\n //Workaround: Use the Char parameter of the OnKeyPress event instead\r\n property OnKeyUp: TKeyEvent read FOnKeyUp write FOnKeyUp;\r\n property OnKeyDown: TKeyEvent read FOnKeyDown write FOnKeyDown;\r\n //\r\n //Note: On Android the OnKeyPress event is not triggered.\r\n //The OnInput event is used instead to trigger the OnKeyPress event.\r\n property OnKeyPress: TKeyPressEvent read FOnKeyPress write FOnKeyPress;\r\n //\r\n property OnEnter: TNotifyEvent read FOnEnter write FOnEnter;\r\n property OnExit: TNotifyEvent read FOnExit write FOnExit;\r\n published\r\n// property DesignSize: TPoint read FDesignSize write FDesignSize stored false;\r\n// property ExplicitLeft: integer read FExplicitLeft write FExplicitLeft stored false;\r\n// property ExplicitTop: integer read FExplicitTop write FExplicitTop stored false;\r\n// property ExplicitWidth: integer read FExplicitWidth write FExplicitWidth stored false;\r\n// property ExplicitHeight: integer read FExplicitHeight write FExplicitHeight stored false;\r\n end;\r\n\r\n TScrollBarKind = (sbHorizontal, sbVertical);\r\n\r\n TControlScrollBar = class(TPersistent)\r\n private\r\n FKind: TScrollBarKind;\r\n FControl: TControl;\r\n public\r\n constructor Create(AControl: TControl; AKind: TScrollBarKind);\r\n property Kind: TScrollBarKind read FKind;\r\n function IsScrollBarVisible: boolean;\r\n function ScrollPos: integer;\r\n function Range: integer;\r\n end;\r\n\r\n TWinControlClass = class of TWinControl;\r\n TWinControl = class(TControl)\r\n published\r\n property Cursor;\r\n property ElementClassName;\r\n property Enabled;\r\n property Height;\r\n property Hint;\r\n property Left;\r\n property ShowHint;\r\n property Tag;\r\n property Top;\r\n property Visible;\r\n property Width;\r\n\r\n property OnMouseDown;\r\n property OnMouseUp;\r\n property OnMouseMove;\r\n property OnMouseEnter;\r\n property OnMouseLeave;\r\n property OnKeyUp;\r\n property OnKeyDown;\r\n property OnKeyPress;\r\n property OnEnter;\r\n property OnExit;\r\n end;\r\n\r\n TCustomControlClass = class of TCustomControl;\r\n TCustomControl = class(TWinControl)\r\n private\r\n FCaption: string;\r\n FPixelRatio: Single;\r\n FPainting: boolean;\r\n FCanvas: TCanvas;\r\n FElementCanvas: TJSHTMLCanvasElement;\r\n FBorderStyle: TBorderStyle;\r\n FBorderColor: TColor;\r\n FCustomBorder: boolean;\r\n FOnScreenShot: TScreenshotEvent;\r\n FBevelOuter: TBevelCut;\r\n FBevelWidth: Integer;\r\n FBevelCut: TBevelCut;\r\n FBevelEdges: TBevelEdges;\r\n FBevelKind: TBevelKind;\r\n function GetCanvas: TCanvas;\r\n protected\r\n procedure RenderDesigning(ACaption: string; AElement: TJSElement; AControl: TCustomControl; ADisplay: Boolean; AImage: string = '');\r\n function GetPixelRatio: Single;\r\n function GetContext: TJSCanvasRenderingContext2D; virtual;\r\n procedure RecreateCanvas; override;\r\n procedure SetBorderStyle(const AValue: TBorderStyle); virtual;\r\n procedure SetBorderColor(const AValue: TColor); virtual;\r\n procedure SetName(const NewName: TComponentName); override;\r\n procedure SetCaption(const AValue: string); virtual;\r\n procedure CreateControl; override;\r\n procedure Loaded; override;\r\n procedure UpdateElementVisual; override;\r\n function CreateElement: TJSElement; override;\r\n function GetCanvasHeightOffset: Integer; virtual;\r\n function GetCanvasWidthOffset: Integer; virtual;\r\n property BorderStyle: TBorderStyle read FBorderStyle write SetBorderStyle default bsSingle;\r\n property BorderColor: TColor read FBorderColor write SetBorderColor default clSilver;\r\n procedure BindElement; override;\r\n procedure BindEvents; override;\r\n procedure HandleScreenShot(Sender: TObject); virtual;\r\n procedure Paint; virtual;\r\n property CustomBorder: boolean read FCustomBorder write FCustomBorder;\r\n property Caption: string read FCaption write SetCaption;\r\n public\r\n procedure CreateInitialize; override;\r\n destructor Destroy; override;\r\n function MakeScreenShot: TBitmap; override;\r\n procedure Resize; override;\r\n procedure Invalidate; override;\r\n procedure SetFocus; override;\r\n function Focused: boolean; override;\r\n procedure EndUpdate; override;\r\n property Canvas: TCanvas read GetCanvas;\r\n property GraphicsContext: TJSCanvasRenderingContext2D read GetContext;\r\n property ElementCanvas: TJSHTMLCanvasElement read FElementCanvas;\r\n property OnScreenshot: TScreenshotEvent read FOnScreenshot write FOnScreenshot;\r\n //dummy properties for FNC\r\n property BevelEdges: TBevelEdges read FBevelEdges write FBevelEdges;\r\n property BevelInner: TBevelCut read FBevelCut write FBevelCut;\r\n property BevelKind: TBevelKind read FBevelKind write FBevelKind;\r\n property BevelOuter: TBevelCut read FBevelOuter write FBevelOuter;\r\n property BevelWidth: Integer read FBevelWidth write FBevelWidth;\r\n end;\r\n\r\n TjQueryCustomControl = class(TWinControl)\r\n private\r\n FIsInitialized: boolean;\r\n procedure InitJQueryOnce;\r\n protected\r\n function CreateElement: TJSElement; override;\r\n procedure Loaded; override;\r\n procedure SetParent(AValue: TControl); override;\r\n function GetJQID: string;\r\n procedure InitJQuery; virtual;\r\n public\r\n procedure CreateInitialize; override;\r\n published\r\n property ElementPosition;\r\n end;\r\n\r\n TGraphicControl = class(TCustomControl);\r\n\r\n TScrollingGraphicControl = class(TCustomControl)\r\n protected\r\n function CreateElement: TJSElement; override;\r\n public\r\n procedure UpdateElement; override;\r\n end;\r\n\r\n TCustomHTMLDiv = class(TCustomControl)\r\n protected\r\n function CreateElement: TJSElement; override;\r\n end;\r\n\r\n TControlManager = class(TComponent)\r\n private\r\n FInstanceCount: integer;\r\n public\r\n constructor Create(AOwner: TComponent); override;\r\n function GetInstanceNumber: integer;\r\n procedure Reset;\r\n end;\r\n\r\n TCSSCodeFragment = class(TCollectionItem)\r\n private\r\n FControlClassname: string;\r\n FCSS: TStringList;\r\n procedure SetCSS(const Value: TStringList);\r\n public\r\n constructor Create(Collection: TCollection); override;\r\n destructor Destroy; override;\r\n published\r\n property ControlClassname: string read FControlClassname write FControlClassname;\r\n property CSS: TStringList read FCSS write SetCSS;\r\n end;\r\n\r\n TCSSCodeFragments = class(TOwnedCollection)\r\n private\r\n function GetItemEx(Index: integer): TCSSCodeFragment;\r\n procedure SetItemEx(Index: integer; const Value: TCSSCodeFragment);\r\n public\r\n constructor Create(AOwner: TComponent); reintroduce;\r\n function Add: TCSSCodeFragment; reintroduce;\r\n function Insert(Index: integer): TCSSCodeFragment; reintroduce;\r\n property Items[Index: integer]: TCSSCodeFragment read GetItemEx write SetItemEx;\r\n end;\r\n\r\n TCSSCodeManager = class(TComponent)\r\n private\r\n FCSSFragments: TCSSCodeFragments;\r\n procedure SetCSSFragments(const Value: TCSSCodeFragments);\r\n public\r\n constructor Create(AOwner: TComponent); override;\r\n destructor Destroy; override;\r\n function GetClassFragment(AClassname: string): TCSSCodeFragment;\r\n function GetClassCSS(AClassname: string): string;\r\n published\r\n property CSSFragments: TCSSCodeFragments read FCSSFragments write SetCSSFragments;\r\n end;\r\n\r\n ITMSFNCDataBinderBase = interface\r\n ['{778B63C9-34E3-4B65-A6B8-85E3EB1D17C3}']\r\n procedure DataBeginUpdate;\r\n procedure DataEndUpdate;\r\n end;\r\n\r\n ITMSFNCDataBinderGrid = interface(ITMSFNCDataBinderBase)\r\n ['{D23BDEAA-49B1-451A-9401-0D0D11A9957A}']\r\n procedure SetDataColumnCount(AValue: Integer);\r\n procedure SetDataRowCount(AValue: Integer);\r\n procedure ClearData;\r\n function GetDataRowCount: Integer;\r\n procedure SetDataValue(AColumn, ARow: Integer; AValue: string);\r\n procedure SetDataHeader(AColumn: Integer; AValue: string);\r\n procedure DataInsertRow(AInsertPosition: Integer);\r\n end;\r\n\r\n TStringListHelper = class helper for TStringList\r\n procedure LoadFromJSONArray(ja: string);\r\n function LoadFromJSONArrayURL(URL: string): TJSPromise;\r\n end;\r\n\r\n\r\nfunction FindGlobalComponent(const Name: string): TComponent;\r\nfunction GetMousePos: TPoint;\r\nprocedure GetCursorPos(var pt: TPoint);\r\nfunction FindUniqueName(const Name: string): string;\r\nfunction GetScrollBarHeight: integer;\r\nfunction GetScrollBarWidth: integer;\r\nprocedure SetHTMLElementFont(AElement: TJSHTMLElement; AFont: TFont; UseCSS: boolean);\r\nprocedure SetHTMLElementColor(AElement: TJSHTMLElement; AColor: TColor; UseCSS: boolean);\r\nfunction GetHTMLCursorName(ACursor: TCursor): string;\r\nfunction GetHTMLElementAbsoluteRect(AElement: TJSHTMLElement): TRect;\r\n\r\nfunction CursorToString(ACursor: TCursor): string;\r\nfunction StringToCursor(const S: string): TCursor;\r\nfunction IsAndroid: Boolean;\r\nfunction GetMaterialClass(mg: TMaterialGlyphType): string;\r\nfunction InputTypeString(AInputType: TInputType): string;\r\n\r\nimplementation\r\n\r\nuses\r\n WEBLib.Dialogs, WEBLib.Forms, Math, TypInfo, WEBLib.WebTools, WEBLib.Utils;\r\n\r\nvar\r\n ControlManager: TControlManager;\r\n FMouseX, FMouseY: Integer;\r\n FCursorX, FCursorY: Integer;\r\n ScrollBW, ScrollBH: Integer;\r\n DragObject: TObject;\r\n\r\n\r\nconst\r\n cStyleBkgColor = 'background-color';\r\n\r\nfunction InputTypeString(AInputType: TInputType): string;\r\nbegin\r\n case AInputType of\r\n itText: Result := 'text';\r\n itEmail: Result := 'email';\r\n itDate: Result := 'date';\r\n itDateTime: Result := 'datetime-local';\r\n itFile: Result := 'file';\r\n itMonth: Result := 'month';\r\n itNumber: Result := 'number';\r\n itPassword: Result := 'password';\r\n itSearch: Result := 'search';\r\n itTime: Result := 'time';\r\n itURL: Result := 'url';\r\n itWeek: Result := 'week';\r\n end;\r\nend;\r\n\r\nfunction GetMaterialClass(mg: TMaterialGlyphType): string;\r\nbegin\r\n Result := 'material-icons';\r\n case mg of\r\n mgOutlined: Result := 'material-icons-outlined';\r\n mgTwoTone: Result := 'material-icons-two-tone';\r\n mgRound: Result := 'material-icons-round';\r\n mgSharp: Result := 'material-icons-sharp';\r\n end;\r\nend;\r\n\r\nprocedure SetHTMLElementFont(AElement: TJSHTMLElement; AFont: TFont; UseCSS: boolean);\r\nvar\r\n s: string;\r\nbegin\r\n if UseCSS then\r\n begin\r\n AElement.style.removeProperty('font-family');\r\n AElement.style.removeProperty('font-style');\r\n AElement.style.removeProperty('font-weight');\r\n AElement.style.removeProperty('font-size');\r\n AElement.style.removeProperty('text-decoration');\r\n end\r\n else\r\n begin\r\n AElement.style.setProperty('font-family', AFont.Name);\r\n\r\n AElement.style.setProperty('font-style', 'normal');\r\n\r\n if fsBold in AFont.Style then\r\n AElement.style.setProperty('font-weight', 'bold')\r\n else\r\n AElement.style.setProperty('font-weight', '');\r\n\r\n if fsItalic in AFont.Style then\r\n AElement.style.setProperty('font-style', 'italic');\r\n\r\n s := '';\r\n\r\n if fsUnderline in AFont.Style then\r\n s := 'underline';\r\n\r\n if fsStrikeOut in AFont.Style then\r\n begin\r\n if s <> '' then\r\n s := s + ' ';\r\n s:= s + 'line-through';\r\n end;\r\n\r\n if (s <> '') then\r\n AElement.style.setProperty('text-decoration', s)\r\n else\r\n AElement.style.removeProperty('text-decoration');\r\n\r\n if (AFont.Size <> 0) then\r\n AElement.style.setProperty('font-size', IntToStr(AFont.Size) + 'pt');\r\n end;\r\nend;\r\n\r\nprocedure SetHTMLElementColor(AElement: TJSHTMLElement; AColor: TColor; UseCSS: boolean);\r\nbegin\r\n if UseCSS or (AColor = clNone) or (AColor = clWindow) then\r\n AElement.style.removeProperty(cStyleBkgColor)\r\n else\r\n AElement.style.setProperty(cStyleBkgColor, ColorToHTML(AColor));\r\nend;\r\n\r\nfunction GetHTMLCursorName(ACursor: TCursor): string;\r\nbegin\r\n Result := 'default';\r\n case ACursor of\r\n crDefault: Result :='default';\r\n crArrow: Result :='auto';\r\n crNone: Result :='none';\r\n crCross: Result :='crosshair';\r\n crIBeam: Result :='text';\r\n crSizeNESW: Result :='nesw-resize';\r\n crSizeNS: Result :='ns-resize';\r\n crSizeNWSE: Result :='nwse-resize';\r\n crSizeWE: Result :='ew-resize';\r\n crUpArrow: Result :='n-resize';\r\n crHourGlass: Result :='wait';\r\n crDrag: Result :='copy';\r\n crNoDrop: Result :='no-drop';\r\n crHSplit: Result :='col-resize';\r\n crVSplit: Result :='row-resize';\r\n crMultiDrag: Result :='copy';\r\n crSQLWait: Result :='progress';\r\n crNo: Result :='not-allowed';\r\n crAppStart: Result :='progress';\r\n crHelp: Result :='help';\r\n crHandPoint: Result :='pointer';\r\n crSizeAll,crSize: Result :='move';\r\n end;\r\nend;\r\n\r\nfunction CursorToString(ACursor: TCursor): string;\r\nbegin\r\n Result := 'crDefault';\r\n case ACursor of\r\n crDefault: Result :='crDefault';\r\n crArrow: Result :='crArrow';\r\n crNone: Result :='crNone';\r\n crCross: Result :='crCross';\r\n crSize: Result := 'ctSize';\r\n crIBeam: Result :='crIBeam';\r\n crSizeNESW: Result :='crSizeNESW';\r\n crSizeNS: Result :='crSizeNS';\r\n crSizeNWSE: Result :='crSizeNWSE';\r\n crSizeWE: Result :='crSizeWE';\r\n crUpArrow: Result :='crUpArrow';\r\n crHourGlass: Result :='crHourGlass';\r\n crDrag: Result :='crDrag';\r\n crNoDrop: Result :='crNoDrop';\r\n crHSplit: Result :='crHSplit';\r\n crVSplit: Result :='crVSplit';\r\n crMultiDrag: Result :='crMultiDrag';\r\n crSQLWait: Result :='crSQLWait';\r\n crNo: Result :='crNo';\r\n crAppStart: Result :='crAppStart';\r\n crHelp: Result :='crHelp';\r\n crHandPoint: Result :='crHandpoint';\r\n crSizeAll: Result :='crSizeAll';\r\n end;\r\nend;\r\n\r\nfunction StringToCursor(const S: string): TCursor;\r\nvar\r\n us: string;\r\nbegin\r\n Result := crDefault;\r\n us := Uppercase(s);\r\n if (us = 'CRDEFAULT') then Result := crDefault else\r\n if (us = 'CRARROW') then Result := crArrow else\r\n if (us = 'CRNONE') then Result := crNone else\r\n if (us = 'CRCROSS') then Result := crCross else\r\n if (us = 'CRSIZE') then Result := crSize else\r\n if (us = 'CRIBEAM') then Result := crIBeam else\r\n if (us = 'CRSIZENESW') then Result := crSizeNESW else\r\n if (us = 'CRSIZENS') then Result := crSizeNS else\r\n if (us = 'CRSIZENWSE') then Result := crSizeNWSE else\r\n if (us = 'CRSIZEWE') then Result := crSizeWE else\r\n if (us = 'CRUPARROW') then Result := crUpArrow else\r\n if (us = 'CRHOURGLASS') then Result := crHourGlass else\r\n if (us = 'CRDRAG') then Result := crDrag else\r\n if (us = 'CRNODROP') then Result := crNoDrop else\r\n if (us = 'CRHSPLIT') then Result := crHSplit else\r\n if (us = 'CRVSPLIT') then Result := crVSplit else\r\n if (us = 'CRMULTIDRAG') then Result := crMultiDrag else\r\n if (us = 'CRSQLWAIT') then Result := crSQLWait else\r\n if (us = 'CRNO') then Result := crNo else\r\n if (us = 'CRAPPSTART') then Result := crAppStart else\r\n if (us = 'CRHELP') then Result := crHelp else\r\n if (us = 'CRHANDPOINT') then Result := crHandpoint else\r\n if (us = 'CRSIZEALL') then Result := crSizeAll;\r\nend;\r\n\r\n\r\nfunction IsAndroid: Boolean;\r\nvar\r\n sagent: string;\r\nbegin\r\n {$IFDEF PAS2JS}\r\n asm\r\n sagent = navigator.userAgent;\r\n end;\r\n {$ENDIF}\r\n Result := (pos('Android', sagent) > 0);\r\nend;\r\n\r\nfunction GetMousePos: TPoint;\r\nbegin\r\n Result := Point(FMouseX, FMouseY);\r\nend;\r\n\r\nprocedure GetCursorPos(var pt: TPoint);\r\nbegin\r\n pt.x := FCursorX;\r\n pt.y := FCursorY;\r\nend;\r\n\r\nfunction GetHTMLElementAbsoluteRect(AElement: TJSHTMLElement): TRect;\r\nvar\r\n s: string;\r\n\r\n function GetInt(AValue: string): integer;\r\n var\r\n e: integer;\r\n begin\r\n AValue := StringReplace(AValue, 'px','', [rfReplaceAll]);\r\n val(AValue, Result, e);\r\n end;\r\n\r\nbegin\r\n s := AElement.style.getPropertyValue('left');\r\n Result.left := GetInt(s);\r\n s := AElement.style.getPropertyValue('top');\r\n Result.top := GetInt(s);\r\n s := AElement.style.getPropertyValue('width');\r\n Result.right := Result.Left + GetInt(s);\r\n s := AElement.style.getPropertyValue('height');\r\n Result.bottom := Result.top + GetInt(s);\r\nend;\r\n\r\nfunction GetScrollBarWidth: integer;\r\nvar\r\n res: integer;\r\nbegin\r\n res := ScrollBW;\r\n\r\n if res = 0 then\r\n begin\r\n {$IFDEF PAS2JS}\r\n asm\r\n var outer = document.createElement(\"div\");\r\n outer.style.visibility = \"hidden\";\r\n outer.style.width = \"100px\";\r\n outer.style.msOverflowStyle = \"scrollbar\"; // needed for WinJS apps\r\n\r\n document.body.appendChild(outer);\r\n\r\n var widthNoScroll = outer.offsetWidth;\r\n // force scrollbars\r\n outer.style.overflow = \"scroll\";\r\n\r\n // add innerdiv\r\n var inner = document.createElement(\"div\");\r\n inner.style.width = \"100%\";\r\n outer.appendChild(inner);\r\n\r\n var widthWithScroll = inner.offsetWidth;\r\n\r\n // remove divs\r\n outer.parentNode.removeChild(outer);\r\n\r\n res = widthNoScroll - widthWithScroll;\r\n end;\r\n {$ENDIF}\r\n ScrollBW := res;\r\n end;\r\n\r\n Result := res;\r\nend;\r\n\r\nfunction GetScrollBarHeight: integer;\r\nvar\r\n res: integer;\r\nbegin\r\n res := ScrollBH;\r\n\r\n if res = 0 then\r\n begin\r\n {$IFDEF PAS2JS}\r\n asm\r\n var outer = document.createElement(\"div\");\r\n outer.style.visibility = \"hidden\";\r\n outer.style.height = \"100px\";\r\n outer.style.msOverflowStyle = \"scrollbar\"; // needed for WinJS apps\r\n\r\n document.body.appendChild(outer);\r\n\r\n var HeightNoScroll = outer.offsetHeight;\r\n // force scrollbars\r\n outer.style.overflow = \"scroll\";\r\n\r\n // add innerdiv\r\n var inner = document.createElement(\"div\");\r\n inner.style.height = \"100%\";\r\n outer.appendChild(inner);\r\n\r\n var HeightWithScroll = inner.offsetHeight;\r\n\r\n // remove divs\r\n outer.parentNode.removeChild(outer);\r\n\r\n res = HeightNoScroll - HeightWithScroll;\r\n\r\n //res = 0;\r\n end;\r\n {$ENDIF}\r\n ScrollBH := res;\r\n end;\r\n\r\n Result := res;\r\nend;\r\n\r\n\r\nfunction FindGlobalComponent(const Name: string): TComponent;\r\nbegin\r\n Result := nil;\r\nend;\r\n\r\nfunction FindUniqueName(const Name: string): string;\r\nbegin\r\n Result := Name + IntToStr(ControlManager.GetInstanceNumber);\r\nend;\r\n\r\n{ TMargins }\r\n\r\nprocedure TMargins.SetLeft(const Value: integer);\r\nbegin\r\n if (Value <> FLeft) then\r\n begin\r\n FLeft := Value;\r\n DoChange;\r\n end;\r\nend;\r\n\r\nprocedure TMargins.SetTop(const Value: integer);\r\nbegin\r\n if (Value <> FTop) then\r\n begin\r\n FTop := Value;\r\n DoChange;\r\n end;\r\nend;\r\n\r\nprocedure TMargins.SetRight(const Value: integer);\r\nbegin\r\n if (Value <> FRight) then\r\n begin\r\n FRight := Value;\r\n DoChange;\r\n end;\r\nend;\r\n\r\nprocedure TMargins.SetBottom(const Value: integer);\r\nbegin\r\n if (Value <> FBottom) then\r\n begin\r\n FBottom := Value;\r\n DoChange;\r\n end;\r\nend;\r\n\r\nprocedure TMargins.DoChange; \r\nbegin\r\n if Assigned(OnChange) then\r\n OnChange(Self);\r\nend;\r\n\r\n{ TControl }\r\n\r\nfunction TControl.MakeScreenshot: TBitmap;\r\nbegin\r\n Result := nil;\r\nend;\r\n\r\nprocedure TControl.MouseDown(Button: TMouseButton; Shift: TShiftState; X,\r\n Y: Integer);\r\nbegin\r\n if not Enabled then\r\n Exit;\r\n\r\n if Assigned(OnMouseDown) then\r\n OnMouseDown(Self, Button, Shift, X, Y);\r\nend;\r\n\r\nprocedure TControl.MouseMove(Shift: TShiftState; X, Y: Integer);\r\nbegin\r\n if not Enabled then\r\n Exit;\r\n\r\n if Assigned(OnMouseMove) then\r\n OnMouseMove(Self, Shift, X, Y);\r\nend;\r\n\r\nprocedure TControl.MouseUp(Button: TMouseButton; Shift: TShiftState; X,\r\n Y: Integer);\r\nbegin\r\n if not Enabled then\r\n Exit;\r\n\r\n if Assigned(OnMouseUp) then\r\n OnMouseUp(Self, Button, Shift, X, Y);\r\nend;\r\n\r\nprocedure TControl.MouseWheel(Shift: TShiftState; WheelDelta: Integer;\r\n var Handled: Boolean);\r\nvar\r\n IsNeg: Boolean;\r\nbegin\r\n if Assigned(OnMouseWheel) then\r\n OnMouseWheel(Self, Shift, WheelDelta, Point(0, 0), Handled);\r\n\r\n Inc(FWheelAccumulator, WheelDelta);\r\n while Abs(FWheelAccumulator) >= WHEEL_DELTA do\r\n begin\r\n IsNeg := FWheelAccumulator < 0;\r\n FWheelAccumulator := Abs(FWheelAccumulator) - WHEEL_DELTA;\r\n if IsNeg then\r\n begin\r\n if FWheelAccumulator <> 0 then FWheelAccumulator := -FWheelAccumulator;\r\n DoMouseWheelDown(Shift, FWheelMousePos);\r\n end\r\n else\r\n DoMouseWheelUp(Shift, FWheelMousePos);\r\n end;\r\nend;\r\n\r\nprocedure TControl.IncUpdateCount;\r\nbegin\r\n Inc(FUpdateCount);\r\nend;\r\n\r\nprocedure TControl.DecUpdateCount;\r\nbegin\r\n Dec(FUpdateCount);\r\nend;\r\n\r\nclass procedure TControl.MoveElements(FromElement, ToElement: TJSElement);\r\nbegin\r\n //\r\n {$IFDEF PAS2JS}\r\n asm\r\n if (FromElement && ToElement) {\r\n while (FromElement.childNodes.length) { ToElement.appendChild(FromElement.firstChild); }\r\n }\r\n end;\r\n {$ENDIF}\r\nend;\r\n\r\nprocedure TControl.MoveElementsAndFree(FromElement, ToElement: TJSElement);\r\nbegin\r\n //\r\n {$IFDEF PAS2JS}\r\n asm\r\n if (FromElement && ToElement){\r\n while (FromElement.childNodes.length) { ToElement.appendChild(FromElement.firstChild); }\r\n FromElement.remove();\r\n }\r\n end;\r\n {$ENDIF}\r\nend;\r\n\r\nprocedure TControl.MoveFirst(AControl: TControl);\r\nvar\r\n i: integer;\r\n fnd: boolean;\r\nbegin\r\n fnd := false;\r\n for i := ControlCount - 1 downto 0 do\r\n begin\r\n if FControls[i] = AControl then\r\n fnd := true;\r\n\r\n if fnd then\r\n begin\r\n if (i > 0) then\r\n FControls[i] := FControls[i - 1]\r\n else\r\n FControls[i] := AControl;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TControl.MoveLast(AControl: TControl);\r\nvar\r\n i: integer;\r\n fnd: boolean;\r\nbegin\r\n fnd := false;\r\n for i := 0 to ControlCount - 1 do\r\n begin\r\n if FControls[i] = AControl then\r\n fnd := true;\r\n\r\n if fnd then\r\n begin\r\n if (i < ControlCount - 1) then\r\n FControls[i] := FControls[i + 1]\r\n else\r\n FControls[i] := AControl;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TControl.DoMouseLeave;\r\nbegin\r\n if Assigned(OnMouseLeave) then\r\n OnMouseLeave(Self);\r\nend;\r\n\r\nfunction TControl.DoMouseWheelDown(Shift: TShiftState;\r\n MousePos: TPoint): Boolean;\r\nbegin\r\n Result := False;\r\n if Assigned(FOnMouseWheelDown) then\r\n FOnMouseWheelDown(Self, Shift, MousePos, Result);\r\nend;\r\n\r\nfunction TControl.DoMouseWheelUp(Shift: TShiftState; MousePos: TPoint): Boolean;\r\nbegin\r\n Result := False;\r\n if Assigned(FOnMouseWheelUp) then\r\n FOnMouseWheelUp(Self, Shift, MousePos, Result);\r\nend;\r\n\r\nprocedure TControl.DoMouseEnter;\r\nbegin\r\n if Assigned(OnMouseEnter) then\r\n OnMouseEnter(Self);\r\nend;\r\n\r\nprocedure TControl.UpdatePadding(var ARect: TRect);\r\nbegin\r\nend;\r\n\r\nprocedure TControl.AlignControls(AControl: TControl; var ARect: TRect);\r\nvar\r\n j: Integer;\r\n\r\n procedure DoPosition(Control: TControl; AAlign: TAlign);\r\n var\r\n dl, dt, dr, db: integer;\r\n begin\r\n if not Control.AnchoringInitialized then\r\n InitAnchoring;\r\n\r\n Control.FUpdateTopLeft := true;\r\n\r\n if Control.AlignWithMargins then\r\n begin\r\n dl := Control.Margins.Left;\r\n dt := Control.Margins.Top;\r\n db := Control.Margins.Bottom;\r\n dr := Control.Margins.Right;\r\n end\r\n else\r\n begin\r\n dl := 0;\r\n dt := 0;\r\n db := 0;\r\n dr := 0;\r\n end;\r\n\r\n case AAlign of\r\n alTop:\r\n begin\r\n Control.SetBoundsInt(ARect.Left + dl, ARect.Top + dt, ARect.Right - ARect.Left - dl - dr, Control.Height);\r\n ARect.Top := ARect.Top + Control.Height + dt + db;\r\n end;\r\n alBottom:\r\n begin\r\n Control.SetBoundsInt(ARect.Left + dl, ARect.Bottom - Control.Height - db - 1, ARect.Right - ARect.Left - dl - dr - 1, Control.Height);\r\n ARect.Bottom := ARect.Bottom - Control.Height - dt - db;\r\n end;\r\n alLeft:\r\n begin\r\n Control.SetBoundsInt(ARect.Left + dl, ARect.Top + dt, Control.Width, ARect.Bottom - ARect.Top - dt - db);\r\n ARect.Left := ARect.Left + Control.Width + dl + dr;\r\n end;\r\n alRight:\r\n begin\r\n Control.SetBoundsInt(ARect.Right - Control.Width - dr, ARect.Top + dt, Control.Width, ARect.Bottom - ARect.Top - db - dt);\r\n ARect.Right := ARect.Right - Control.Width - dr - dl;\r\n end;\r\n alClient:\r\n begin\r\n Control.SetBoundsInt(ARect.Left + dl, ARect.Top + dt, ARect.Right - ARect.Left - dl - dr, ARect.Bottom - ARect.Top - db - dt);\r\n // just in case there are multiple controls with client alignment\r\n// ARect.Left := 0;\r\n// ARect.Top := 0;\r\n// ARect.Right := 0;\r\n// ARect.Bottom := 0;\r\n end;\r\n alCustom:\r\n begin\r\n dl := Control.Left;\r\n dt := Control.Top;\r\n dr := 0;\r\n db := 0;\r\n\r\n if Control.Center.Vertical or Control.Center.Horizontal then\r\n begin\r\n if Control.Center.Horizontal then\r\n begin\r\n dl := ARect.Left;\r\n dr := (ARect.Right - ARect.Left - Control.Width) div 2;\r\n end;\r\n if Control.Center.Vertical then\r\n begin\r\n dt := ARect.Top;\r\n db := (ARect.Bottom - ARect.Top - Control.Height) div 2;\r\n end;\r\n Control.SetBoundsInt(dl + dr, dt + db, Control.Width, Control.Height);\r\n end;\r\n end;\r\n end;\r\n\r\n Control.FUpdateTopLeft := false;\r\n end;\r\n\r\n procedure DoAlign(AAlign: TAlign);\r\n var\r\n i,j,ins: Integer;\r\n il: TList;\r\n b: boolean;\r\n begin\r\n il := TList.Create;\r\n\r\n for i := 0 to ControlCount - 1 do\r\n begin\r\n b := (Controls[i].Center.Vertical or Controls[i].Center.Horizontal) and (AAlign = alCustom);\r\n\r\n if b or ((Controls[i].Align = AAlign) and ((Controls[i].Visible) or (csDesigning in ComponentState))) then\r\n begin\r\n ins := il.Count;\r\n\r\n for j := il.Count - 1 downto 0 do\r\n begin\r\n case AAlign of\r\n alTop:\r\n if Controls[i].FOrigTop < TControl(il.Items[j]).FOrigTop then\r\n ins := j;\r\n alLeft:\r\n if Controls[i].FOrigLeft < TControl(il.Items[j]).FOrigLeft then\r\n ins := j;\r\n alRight:\r\n if Controls[i].FOrigLeft + Controls[i].Width > TControl(il.Items[j]).FOrigLeft + TControl(il.Items[j]).Width then\r\n ins := j;\r\n alBottom:\r\n if Controls[i].FOrigTop + Controls[i].Height > TControl(il.Items[j]).FOrigTop + TControl(il.Items[j]).Height then\r\n ins := j;\r\n end;\r\n end;\r\n il.Insert(ins, Controls[i]);\r\n end;\r\n end;\r\n\r\n for i := 0 to il.Count - 1 do\r\n begin\r\n DoPosition(TControl(il.Items[i]), AAlign);\r\n end;\r\n\r\n il.Free;\r\n end;\r\n\r\nbegin\r\n UpdatePadding(ARect);\r\n DoAlign(alTop);\r\n DoAlign(alBottom);\r\n DoAlign(alLeft);\r\n DoAlign(alRight);\r\n DoAlign(alClient);\r\n DoAlign(alCustom);\r\n\r\n for j := 0 to ControlCount - 1 do\r\n begin\r\n Controls[j].AlignControl(Controls[j]);\r\n end;\r\nend;\r\n\r\nprocedure TControl.ApplyName;\r\nvar\r\n s, prefix: String;\r\n frm: TCustomForm;\r\nbegin\r\n s := ClassName;\r\n Delete(s, 1, 1);\r\n\r\n prefix := '';\r\n frm := GetParentForm(Self);\r\n if Assigned(frm) then\r\n prefix := frm.ClassName;\r\n\r\n SetID(prefix+'_'+FindUniqueName(s));\r\nend;\r\n\r\nconstructor TControl.Create(ID: string);\r\nbegin\r\n FGotFocus := false;\r\n FTabStop := true;\r\n FAllowTouch := true;\r\n CreateWithID(ID);\r\nend;\r\n\r\nprocedure TControl.HookElement;\r\nvar\r\n el: TJSElement;\r\n i: integer;\r\nbegin\r\n el := document.getElementByID(FID);\r\n Container := el;\r\n BindElement;\r\n BindEvents;\r\n\r\n for i := 0 to ControlCount - 1 do\r\n Controls[i].HookElement;\r\nend;\r\n\r\nfunction TControl.CanAcceptChild(AValue: TControl): TControl;\r\nbegin\r\n Result := Self;\r\nend;\r\n\r\nfunction TControl.CanFocus: Boolean;\r\nbegin\r\n Result := True;\r\nend;\r\n\r\nfunction TControl.CanShowFocus: boolean;\r\nbegin\r\n Result := FShowFocus;\r\nend;\r\n\r\nprocedure TControl.Capture;\r\nbegin\r\n FCaptureDown := True;\r\n window.setTimeout(@StartCapture, 100);\r\nend;\r\n\r\nprocedure TControl.StartCapture;\r\nvar\r\n eh: TJSHTMLElement;\r\nbegin\r\n if not FCaptureDown then\r\n Exit;\r\n\r\n if Captured then\r\n ReleaseCapture;\r\n\r\n FMouseInsideLayer := true;\r\n\r\n FLayer := document.createElement('SPAN');\r\n document.body.appendChild(FLayer);\r\n\r\n eh := TJSHTMLElement(FLayer);\r\n eh.addEventListener('mouseenter', FLayerMouseEnterPtr);\r\n eh.addEventListener('mouseleave', FLayerMouseLeavePtr);\r\n eh.addEventListener('mousedown', FMouseDownPtr);\r\n eh.addEventListener('mouseup', FMouseUpPtr);\r\n eh.addEventListener('mousemove', FMouseMovePtr);\r\n eh.addEventListener('touchstart', FTouchStartPtr);\r\n eh.addEventListener('touchmove', FTouchMovePtr);\r\n eh.addEventListener('touchend', FTouchEndPtr);\r\n eh.addEventListener('touchcancel', FTouchCancelPtr);\r\n\r\n eh.style.setProperty('top', '0');\r\n eh.style.setProperty('left', '0');\r\n eh.style.setProperty('right', '0');\r\n eh.style.setProperty('bottom', '0');\r\n\r\n eh.style.setProperty('webkit-user-select', 'none');\r\n eh.style.setProperty('moz-user-select', 'none');\r\n eh.style.setProperty('khtml-user-select', 'none');\r\n eh.style.setProperty('ms-user-select', 'none');\r\n eh.style.setProperty('user-select', 'none');\r\n eh.style.setProperty('position', 'absolute');\r\n\r\n eh.style.setProperty(CSSZIndex, '999999');\r\n\r\n FCaptured := True;\r\n UpdateElement;\r\nend;\r\n\r\nfunction TControl.Captured: Boolean;\r\nbegin\r\n Result := FCaptured and Assigned(FLayer);\r\nend;\r\n\r\nprocedure TControl.ClearChildElements;\r\nvar\r\n el: TJSElement;\r\nbegin\r\n if not Assigned(ElementHandle) then\r\n Exit;\r\n\r\n while ElementHandle.childElementCount > 0 do\r\n begin\r\n el := TJSElement(ElementHandle.firstChild);\r\n ElementHandle.removeChild(el);\r\n end;\r\nend;\r\n\r\nprocedure TControl.ClearControls;\r\nbegin\r\n SetLength(FControls, 0);\r\nend;\r\n\r\nprocedure TControl.Click;\r\nbegin\r\n if Assigned(OnClick) and IsEnabled then\r\n OnClick(Self);\r\nend;\r\n\r\nfunction TControl.ClientToScreen(const Point: TPoint): TPoint;\r\nvar\r\n Origin: TPoint;\r\nbegin\r\n Origin := ClientOrigin;\r\n Result.X := Point.X + Origin.X;\r\n Result.Y := Point.Y + Origin.Y;\r\nend;\r\n\r\nprocedure TControl.ColorChanging;\r\nbegin\r\n\r\nend;\r\n\r\nfunction TControl.ContainerElement: TJSElement;\r\nbegin\r\n Result := document.body;\r\nend;\r\n\r\nfunction TControl.RequiredBaseURL: string;\r\nbegin\r\n Result := '';\r\nend;\r\n\r\nprocedure TControl.RequiredScriptLoaded(Event: TJSEvent);\r\nbegin\r\n (Event.Target as TJSHTMLScriptElement).Title := 'tmswebloaded';\r\n inc(FControlScriptCountLoaded);\r\nend;\r\n\r\nconstructor TControl.Create(AOwner: TComponent);\r\nvar\r\n lName: string;\r\n frm: TCustomForm;\r\n lDesign: boolean;\r\n\r\nbegin\r\n FGotFocus := false;\r\n FEventsBound := false;\r\n FTabStop := true;\r\n FAllowTouch := true;\r\n FNoUserSelect := true;\r\n ClearMethodPointers;\r\n\r\n inherited Create(AOwner);\r\n\r\n EventStopPropagation := [eeClick, eeDblClick, eeMouseUp, eeMouseMove, eeMouseDown, eeKeypress, eeKeyDown, eeKeyUp];\r\n\r\n FScriptLoaded := false;\r\n FElementFont := efProperty;\r\n FElementPosition := epAbsolute;\r\n FParentElement := nil;\r\n FTextDirection := tdDefault;\r\n\r\n lDesign := false;\r\n\r\n frm := GetParentForm(Self);\r\n if Assigned(frm) then\r\n begin\r\n lDesign := (csDesigning in frm.ComponentState);\r\n end;\r\n\r\n lName := GetNewName;\r\n\r\n // for VSC, when creating control, initialize without ID\r\n if lDesign then\r\n CreateWithID('')\r\n else\r\n CreateWithID(lName);\r\n\r\n if Assigned(AOwner) and not (csDesigning in AOwner.ComponentState) then\r\n Name := lName;\r\nend;\r\n\r\n\r\nprocedure TControl.CreateControl;\r\nbegin\r\n if not Assigned(FElement) then\r\n begin\r\n FElement := CreateElement;\r\n\r\n if Assigned(FElement) then\r\n begin\r\n FControlCreated := True;\r\n Container := FElement;\r\n if not (ElementID = 'body') then\r\n Container['id'] := ElementID;\r\n Container['zindex'] := '0';\r\n if FElementClassName <> '' then\r\n Container['class'] := FElementClassName;\r\n CreateChildElements(FElement);\r\n\r\n BindEvents;\r\n UpdateElement;\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TControl.CreateElement: TJSElement;\r\nbegin\r\n Result := nil;\r\nend;\r\n\r\nprocedure TControl.CreateChildElements(AContainer: TJSElement);\r\nbegin\r\nend;\r\n\r\nprocedure TControl.CreateInitialize;\r\nvar\r\n frm: TCustomForm;\r\nbegin\r\n FDesignTime := (csDesigning in ComponentState) and not\r\n ((csReading in Owner.ComponentState) or (csLoading in Owner.ComponentState));\r\n\r\n FRequiredScripts := TStringList.Create;\r\n FOrigRect := Rect(-1,-1,-1,-1);\r\n FClipChildren := True;\r\n\r\n if FDesignTime then\r\n begin\r\n frm := GetParentForm(Self);\r\n if Assigned(frm) and (frm is TWebForm) and ((frm as TWebForm).CSSLibrary <> cssNone) then\r\n begin\r\n InitCSSLibrary((frm as TWebForm).CSSLibrary);\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TControl.InitCSSLibrary(ALibrary: TCSSLibrary);\r\nbegin\r\n //\r\nend;\r\n\r\nprocedure TControl.CreateWithID(AID: string);\r\nvar\r\n el: TJSElement;\r\nbegin\r\n ClearMethodPointers;\r\n\r\n FUpdateCount := 0;\r\n\r\n FControlCreated := False;\r\n FLinkTouchEvents := True;\r\n FIsResizing := false;\r\n\r\n if (Assigned(Owner) and (csLoading in Owner.ComponentState)) or not Assigned(Owner) then\r\n begin\r\n if not (Assigned(Owner) and (csDesigning in Owner.ComponentState)) then\r\n Loading;\r\n end;\r\n\r\n FElementPosition := epAbsolute;\r\n FWidthStyle := ssAbsolute;\r\n FHeightStyle := ssAbsolute;\r\n\r\n el := document.getElementByID(AID);\r\n\r\n FNew := not Assigned(el);\r\n\r\n FFont := TFont.Create;\r\n FFont.OnChange := HandleFontChanged;\r\n\r\n // the HTML element is not found\r\n if FNew then\r\n begin\r\n Container := nil;\r\n end\r\n else\r\n begin\r\n Container := el;\r\n FControlCreated := true;\r\n FElementPosition := epRelative;\r\n CreateChildElements(el);\r\n BindElement;\r\n BindEvents;\r\n end;\r\n\r\n FID := AID;\r\n FEnabled := True;\r\n FVisible := True;\r\n FLeft := 0;\r\n FTop := 0;\r\n FAlign := alNone;\r\n FAlignWithMargins := false;\r\n FIsAligning := false;\r\n FParentFont := true;\r\n FParentBiDiMode := true;\r\n FParentColor := false;\r\n FAnchors := [akLeft, akTop];\r\n FShowFocus := false;\r\n FBorderWidth := 0;\r\n FEnablePropagation := False;\r\n FToolTip := nil;\r\n\r\n FColor := clWindow;\r\n\r\n FMargins := TMargins.Create;\r\n FMargins.OnChange := DoMarginsChanged;\r\n FCenter := TCenter.Create;\r\n FCenter.OnChange := DoCenterChanged;\r\n\r\n FParent := nil;\r\n FPrevParent := nil;\r\n\r\n // Issue with Visual Studio Code design-time assigning ElementID for conntrols with childs\r\n if not (csAcceptsControls in ControlStyle) then\r\n ClearControls;\r\n\r\n CreateInitialize;\r\nend;\r\n\r\nprocedure TControl.BindElement;\r\nbegin\r\nend;\r\n\r\nprocedure TControl.AddControlLink(const linkid, link: string);\r\nbegin\r\n {$IFDEF PAS2JS}\r\n asm\r\n function writeLinkOnce(linkName, linkText) {\r\n var linkElement = document.getElementById(linkName);\r\n if (linkElement)\r\n return;\r\n linkElement = document.createElement('link');\r\n linkElement.id = linkName;\r\n linkElement.setAttribute('rel', 'stylesheet');\r\n linkElement.setAttribute('type', 'text/css');\r\n linkElement.setAttribute('href', linkText);\r\n document.getElementsByTagName('head')[0].appendChild(linkElement);\r\n }\r\n writeLinkOnce(linkid,link);\r\n end;\r\n {$ENDIF}\r\nend;\r\n\r\n\r\n{$HINTS OFF}\r\nprocedure TControl.AddControlScriptLink(const link: string);\r\nvar\r\n id: string;\r\n script: TJSHTMLScriptElement;\r\n\r\nbegin\r\n id := ClassName;\r\n\r\n if not Assigned(document.getElementById(id)) then\r\n begin\r\n script := TJSHTMLScriptElement(document.createElement('script'));\r\n script.id := id;\r\n script.src := link;\r\n script.type_ := 'text/javascript';\r\n document.head.appendChild(script);\r\n end;\r\nend;\r\n\r\nprocedure TControl.AddControlScriptSource(const source: string);\r\nvar\r\n id: string;\r\n script: TJSHTMLScriptElement;\r\n\r\nbegin\r\n id := ClassName+'SRC';\r\n\r\n if not Assigned(document.getElementById(id)) then\r\n begin\r\n script := TJSHTMLScriptElement(document.createElement('script'));\r\n script.id := id;\r\n script.innerHTML := source;\r\n script.type_ := 'text/javascript';\r\n document.head.appendChild(script);\r\n end;\r\nend;\r\n\r\n\r\nprocedure TControl.AddControlStyle(const css: string);\r\nvar\r\n cssname: string;\r\nbegin\r\n cssname := ClassName;\r\n {$IFDEF PAS2JS}\r\n asm\r\n function writeStylesOnce(styleName, cssText) {\r\n var styleElement = document.getElementById(styleName);\r\n if (styleElement) {\r\n styleElement.innerHTML = cssText;\r\n return;\r\n }\r\n styleElement = document.createElement('style');\r\n styleElement.type = 'text/css';\r\n styleElement.id = styleName;\r\n styleElement.innerHTML = cssText;\r\n document.getElementsByTagName('head')[0].appendChild(styleElement);\r\n }\r\n writeStylesOnce(cssname,css);\r\n end;\r\n {$ENDIF}\r\nend;\r\n\r\nclass procedure TControl.AddInstanceStyle(const id: string; const css: string);\r\nbegin\r\n {$IFDEF PAS2JS}\r\n asm\r\n function writeStylesOnce(styleName, cssText) {\r\n var styleElement = document.getElementById(styleName);\r\n if (styleElement) {\r\n styleElement.innerHTML = cssText;\r\n return;\r\n }\r\n styleElement = document.createElement('style');\r\n styleElement.type = 'text/css';\r\n styleElement.id = styleName;\r\n styleElement.innerHTML = cssText;\r\n document.getElementsByTagName('head')[0].appendChild(styleElement);\r\n }\r\n writeStylesOnce(id,css);\r\n end;\r\n {$ENDIF}\r\nend;\r\n\r\nprocedure TControl.AddInstanceStyle(const css: string);\r\nvar\r\n cssname: string;\r\nbegin\r\n cssname := Name + '_style';\r\n AddInstanceStyle(cssname, css);\r\nend;\r\n\r\nprocedure TControl.AddRequiredScript(const link: string);\r\nvar\r\n id: string;\r\n script: TJSHTMLScriptElement;\r\n\r\nbegin\r\n script := TJSHTMLScriptElement(document.createElement('script'));\r\n script.src := link;\r\n script.type_ := 'text/javascript';\r\n script.title := 'tmswebloading';\r\n\r\n if not Assigned(FScriptLoadedPtr) then\r\n FScriptLoadedPtr := @RequiredScriptLoaded;\r\n\r\n script.addEventListener('load', FScriptLoadedPtr);\r\n document.head.appendChild(script);\r\nend;\r\n\r\nfunction TControl.AddRequiredScripts: boolean;\r\nvar\r\n i,j: integer;\r\n el: TJSElement;\r\n scr: TJSHTMLScriptElement;\r\n found, loading: boolean;\r\nbegin\r\n FControlScriptCount := 0;\r\n\r\n for j := 0 to RequiredScripts.Count - 1 do\r\n begin\r\n found := false;\r\n loading := false;\r\n\r\n for i := 0 to document.head.children.length - 1 do\r\n begin\r\n el := TJSElement(document.head.children[i]);\r\n if (el.tagName = 'SCRIPT') then\r\n begin\r\n scr := TJSHTMLScriptElement(el);\r\n if (pos(RequiredScripts[j], scr.src) > 0) then\r\n begin\r\n found := true;\r\n\r\n if scr.title = 'tmswebloading' then\r\n begin\r\n loading := true;\r\n if not Assigned(FScriptLoadedPtr) then\r\n FScriptLoadedPtr := @RequiredScriptLoaded;\r\n scr.addEventListener('load', FScriptLoadedPtr);\r\n end;\r\n\r\n break;\r\n end;\r\n end;\r\n end;\r\n\r\n if not found then\r\n begin\r\n inc(FControlScriptCount);\r\n AddRequiredScript( RequiredBaseURL + RequiredScripts[j]);\r\n end;\r\n\r\n if found and loading then\r\n inc(FControlScriptCount);\r\n end;\r\n\r\n Result := (FControlScriptCount > 0);\r\nend;\r\n\r\n{$HINTS ON}\r\n\r\nprocedure TControl.AlignControl(AControl: TControl);\r\nvar\r\n r: TRect;\r\n cr: TJSDOMRect;\r\n ovf, ovfx, ovfy: string;\r\n eh: TJSHTMLElement;\r\n el: TJSElement;\r\n frm: TCustomForm;\r\n ctop: integer;\r\n vscrl: integer;\r\n\r\nbegin\r\n if FIsAligning then\r\n Exit;\r\n\r\n if IsUpdating then\r\n Exit;\r\n\r\n if csLoading in ComponentState then\r\n Exit;\r\n\r\n// if not Visible then\r\n// Exit;\r\n\r\n if Assigned(Parent) and not Parent.Visible then\r\n Exit;\r\n\r\n frm := GetParentForm(Self);\r\n\r\n if Assigned(frm) and frm.IsUpdating then\r\n Exit;\r\n\r\n ctop := 0;\r\n\r\n if Assigned(frm) and (frm.FormContainer <> '') and (AControl is TCustomForm) then\r\n begin\r\n el := document.getElementById(frm.FormContainer);\r\n if Assigned(el) then\r\n begin\r\n cr := el.getBoundingClientRect;\r\n ctop := Round(cr.Top + 1);\r\n end;\r\n end;\r\n\r\n FIsAligning := true;\r\n\r\n if not Assigned(AControl) then\r\n Exit;\r\n\r\n eh := AControl.ElementHandle;\r\n\r\n if Assigned(eh) then\r\n begin\r\n ovf := AControl.GetElementStyle.getPropertyValue('overflow');\r\n ovfx := AControl.GetElementStyle.getPropertyValue('overflow-x');\r\n ovfy := AControl.GetElementStyle.getPropertyValue('overflow-y');\r\n\r\n if ClipChildren and (LowerCase(eh.tagName) <> cBodyTag) then\r\n AControl.GetElementStyle.setProperty('overflow', 'hidden')\r\n else\r\n AControl.GetElementStyle.setProperty('overflow', '');\r\n end;\r\n\r\n r := GetClientRect;\r\n r.Bottom := r.Bottom - ctop;\r\n\r\n // when it concerns a control linked to an element, need to get the element bounding rect here\r\n if IsLinked then\r\n begin\r\n cr := ElementHandle.getBoundingClientRect;\r\n // get the real dimensions of the control, it will be absolutely positioned taking the elements\r\n // real top,left in account in SetBoundsInt()\r\n r := Rect(0, 0, Round(cr.Right - cr.Left), Round(cr.Bottom - cr.Top));\r\n end;\r\n\r\n // limit size except when it is absolute positioned & has fixed height\r\n if (r.Bottom + ctop > WinHeight) and (HeightStyle <> ssAbsolute) and not (ElementPosition = epAbsolute) and not IsLinked and not Assigned(VSIDE) then\r\n begin\r\n if (Assigned(Parent) and (Parent is TCustomForm)) or (Self is TCustomForm) then\r\n begin\r\n r.Bottom := WinHeight - ctop;\r\n end;\r\n end;\r\n\r\n if Assigned(eh) and (eh.tagName = 'BODY') then\r\n begin\r\n vscrl := 0;\r\n\r\n if (document.body.scrollHeight > document.body.clientHeight) and not (csDesigning in ComponentState) then\r\n vscrl := 16;\r\n\r\n if frm.FormContainer <> '' then\r\n begin\r\n r.Bottom := Round(Min(r.Bottom , WinHeight));\r\n r.Right := Round(Min(r.Right - vscrl, WinWidth));\r\n end\r\n else\r\n begin\r\n r.Bottom := frm.Height;\r\n r.Right := frm.Width;\r\n end;\r\n end;\r\n\r\n // limit size to browser window size anyway\r\n if (AControl is TCustomForm) and not Assigned(VSIDE) then\r\n begin\r\n if r.Bottom > WinHeight then\r\n r.Bottom := WinHeight;\r\n\r\n if r.Right > WinWidth then\r\n r.Right := WinWidth;\r\n end;\r\n\r\n if AControl.IsStructuralElement then\r\n begin\r\n r := Parent.GetClientRect;\r\n end;\r\n\r\n // in case custom CSS for setting scrollbar width is used\r\n if (Application.CalcScrollBarWidth < 16) and not (AControl is TCustomForm) then\r\n begin\r\n\r\n if Assigned(AControl.Parent) and Assigned(AControl.ElementHandle) then\r\n begin\r\n if (AControl.ElementHandle.scrollHeight > AControl.ElementHandle.clientHeight) then\r\n r.Right := r.Right + (17 - Application.CalcScrollBarWidth);\r\n end;\r\n end;\r\n\r\n AlignControls(AControl, r);\r\n\r\n if Assigned(eh) then\r\n begin\r\n AControl.GetElementStyle.setProperty('overflow', ovf);\r\n AControl.GetElementStyle.setProperty('overflow-x', ovfx);\r\n AControl.GetElementStyle.setProperty('overflow-y', ovfy);\r\n end;\r\n\r\n FIsAligning := false;\r\nend;\r\n\r\nprocedure TControl.DblClick;\r\nbegin\r\n if Assigned(OnDblClick) then\r\n OnDblClick(Self);\r\nend;\r\n\r\ndestructor TControl.Destroy;\r\nbegin\r\n UnbindEvents;\r\n DestroyControls;\r\n\r\n if Assigned(Container) and Assigned(Parent) and Assigned(Parent.GetChildContainer) then\r\n begin\r\n if Parent.GetChildContainer = Container.parentNode then\r\n begin\r\n Parent.GetChildContainer.removeChild(Container);\r\n end;\r\n\r\n Container := nil;\r\n Parent := nil;\r\n FControlCreated := False;\r\n end;\r\n\r\n FRequiredScripts.Free;\r\n FMargins.Free;\r\n FCenter.Free;\r\n FFont.Free;\r\n\r\n if Assigned(FToolTip) then\r\n begin\r\n {$IFDEF PAS2JS}\r\n asm\r\n this.FToolTip.dispose();\r\n end;\r\n {$ENDIF}\r\n FToolTip := nil;\r\n end;\r\n\r\n inherited;\r\nend;\r\n\r\nprocedure TControl.DestroyControls;\r\nvar\r\n i: integer;\r\n ctrl: TControl;\r\nbegin\r\n for i := ControlCount - 1 downto 0 do\r\n begin\r\n ctrl := Controls[i];\r\n ctrl.Free;\r\n end;\r\nend;\r\n\r\nprocedure TControl.DisableDrag;\r\nbegin\r\n if Assigned(Container) and (Container['draggable'] = 'true') then\r\n Container['draggable'] := 'false';\r\nend;\r\n\r\nprocedure TControl.DisableTab;\r\nvar\r\n i: integer;\r\nbegin\r\n if not (TabStop and CanFocus) then\r\n begin\r\n if Assigned(Container) then\r\n Container.setAttribute('tabindex','-1');\r\n end;\r\n\r\n for i := 0 to ControlCount - 1 do\r\n begin\r\n Controls[i].DisableTab;\r\n end;\r\nend;\r\n\r\nprocedure TControl.DisposeOf;\r\nvar\r\n t: TControl;\r\nbegin\r\n t := Self;\r\n t.Free;\r\nend;\r\n\r\nprocedure TControl.Assign(Source: TPersistent);\r\nbegin\r\n\r\nend;\r\n\r\nfunction TControl.GetElement: TJSElement;\r\nbegin\r\n Result := document.getElementByID(GetID);\r\nend;\r\n\r\nfunction TControl.GetElementBindHandle: TJSEventTarget;\r\nbegin\r\n Result := TJSEventTarget(GetElementHandle);\r\nend;\r\n\r\nfunction TControl.GetElementEvent: TJSEvent;\r\nbegin\r\n Result := FElementEvent;\r\nend;\r\n\r\nprocedure TControl.SetEnabled(Value: Boolean);\r\nbegin\r\n if (FEnabled <> Value) then\r\n begin\r\n FEnabled := Value;\r\n UpdateElementData;\r\n end;\r\nend;\r\n\r\nprocedure TControl.SetVisible(AValue: Boolean);\r\nbegin\r\n if (FVisible <> AValue) then\r\n begin\r\n VisibleChanging;\r\n FVisible := AValue;\r\n UpdateElement;\r\n DoRealign;\r\n AlignControl(Self);\r\n VisibleChanged;\r\n end;\r\nend;\r\n\r\nprocedure TControl.SetWidth(AValue: Integer);\r\nbegin\r\n if (FWidth <> AValue) then\r\n begin\r\n FWidth := AValue;\r\n\r\n ResetAnchoring;\r\n DoBoundsChange;\r\n\r\n // still do element width updating at runtime\r\n if (IsLinked and (WidthStyle = ssAbsolute) and not (csLoading in ComponentState)) and not IsUpdating and Assigned(ElementHandle) then\r\n begin\r\n if AValue >= 0 then\r\n GetElementStyle.setProperty('width',IntTostr(AValue)+'px')\r\n else\r\n GetElementStyle.removeProperty('width');\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TControl.SetWidthInt(AValue: Integer);\r\nbegin\r\n FWidth := AValue;\r\nend;\r\n\r\nprocedure TControl.SetWidthPercent(const Value: TPercentSize);\r\nbegin\r\n if (FWidthPercent <> Value) then\r\n begin\r\n FWidthPercent := Value;\r\n UpdateElementSize;\r\n ResetAnchoring;\r\n DoBoundsChange;\r\n end;\r\nend;\r\n\r\nprocedure TControl.SetWidthStyle(const Value: TSizeStyle);\r\nbegin\r\n if (FWidthStyle <> Value) then\r\n begin\r\n FWidthStyle := Value;\r\n\r\n if (FWidthStyle = ssAuto) and Assigned(ElementHandle) and not IsLinked then\r\n GetElementStyle.removeProperty('width');\r\n\r\n UpdateElementSize;\r\n ResetAnchoring;\r\n DoBoundsChange;\r\n end;\r\nend;\r\n\r\nprocedure TControl.Show;\r\nbegin\r\n Visible := true;\r\nend;\r\n\r\nprocedure TControl.StopPropagation;\r\nbegin\r\n if Assigned(ElementEvent) and not EnablePropagation then\r\n ElementEvent.stopPropagation;\r\nend;\r\n\r\nprocedure TControl.TouchCancel(X, Y: Integer);\r\nbegin\r\n if Assigned(OnTouchCancel) then\r\n OnTouchCancel(Self, X, Y);\r\nend;\r\n\r\nprocedure TControl.TouchEnd(X, Y: Integer);\r\nbegin\r\n if Assigned(OnTouchEnd) then\r\n OnTouchEnd(Self, X, Y);\r\nend;\r\n\r\nprocedure TControl.TouchMove(X, Y: Integer);\r\nbegin\r\n if Assigned(OnTouchMove) then\r\n OnTouchMove(Self, X, Y);\r\nend;\r\n\r\nprocedure TControl.TouchStart(X, Y: Integer);\r\nbegin\r\n if Assigned(OnTouchStart) then\r\n OnTouchStart(Self, X, Y);\r\nend;\r\n\r\nprocedure TControl.SetHeight(AValue: Integer);\r\nvar\r\n dr: TJSDOMRect;\r\nbegin\r\n if FHeight <> AValue then\r\n begin\r\n if (Align in [alLeft, alRight, alClient]) and Assigned(ElementHandle) then\r\n begin\r\n dr := ElementHandle.getBoundingClientRect;\r\n if dr.top + AValue >= WinHeight then\r\n begin\r\n AValue := Round(WinHeight - dr.top);\r\n end;\r\n end;\r\n\r\n FHeight := AValue;\r\n\r\n ResetAnchoring;\r\n DoBoundsChange;\r\n\r\n // still do element height updating at runtime\r\n if (IsLinked and (HeightStyle = ssAbsolute) and not (csLoading in ComponentState)) and not IsUpdating and Assigned(ElementHandle) then\r\n begin\r\n if AValue >= 0 then\r\n GetElementStyle.setProperty('height',IntTostr(AValue)+'px')\r\n else\r\n GetElementStyle.removeProperty('height');\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TControl.SetHeightInt(AValue: Integer);\r\nbegin\r\n FHeight := AValue;\r\nend;\r\n\r\nprocedure TControl.SetHeightPercent(const Value: TPercentSize);\r\nbegin\r\n if (FHeightPercent <> Value) then\r\n begin\r\n FHeightPercent := Value;\r\n UpdateElementSize;\r\n ResetAnchoring;\r\n DoBoundsChange;\r\n end;\r\nend;\r\n\r\nprocedure TControl.SetHeightStyle(const Value: TSizeStyle);\r\nbegin\r\n if (FHeightStyle <> Value) then\r\n begin\r\n FHeightStyle := Value;\r\n\r\n if (FHeightStyle = ssAuto) and Assigned(ElementHandle) and not IsLinked then\r\n GetElementStyle.removeProperty('height');\r\n\r\n UpdateElementSize;\r\n ResetAnchoring;\r\n DoBoundsChange;\r\n end;\r\nend;\r\n\r\nprocedure TControl.SetLeft(AValue: Integer);\r\nbegin\r\n if FLeft <> AValue then\r\n begin\r\n FLeft := AValue;\r\n\r\n ResetAnchoring;\r\n\r\n if not FUpdateTopLeft then\r\n FOrigLeft := AValue;\r\n\r\n UpdateElementSize;\r\n RecreateCanvas;\r\n InternalResize;\r\n\r\n if not (csLoading in ComponentState) and (Align <> alNone) and Assigned(Parent) then\r\n begin\r\n DoRealign;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TControl.SetMargins(const Value: TMargins);\r\nbegin\r\n FMargins.Assign(Value);\r\nend;\r\n\r\nprocedure TControl.SetTop(AValue: Integer);\r\nbegin\r\n if FTop <> AValue then\r\n begin\r\n FTop := AValue;\r\n\r\n ResetAnchoring;\r\n\r\n if not FUpdateTopLeft then\r\n FOrigTop := AValue;\r\n\r\n UpdateElementSize;\r\n RecreateCanvas;\r\n InternalResize;\r\n\r\n if not (csLoading in ComponentState) and (Align <> alNone) and Assigned(Parent) then\r\n begin\r\n DoRealign;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TControl.SetScriptLoaded(const Value: boolean);\r\nbegin\r\n FScriptLoaded := Value;\r\nend;\r\n\r\nprocedure TControl.SetShowFocus(const Value: boolean);\r\nbegin\r\n if (FShowFocus <> Value) then\r\n begin\r\n FShowFocus := Value;\r\n UpdateElement;\r\n end;\r\nend;\r\n\r\nprocedure TControl.SetShowHint(AValue: Boolean);\r\nbegin\r\n if FShowHint <> AValue then\r\n begin\r\n FShowHint := AValue;\r\n UpdateElement;\r\n end;\r\nend;\r\n\r\nprocedure TControl.SetHint(AValue: string);\r\nbegin\r\n if FHint <> AValue then\r\n begin\r\n FHint := AValue;\r\n UpdateElement;\r\n end;\r\nend;\r\n\r\n{$HINTS OFF}\r\nprocedure TControl.SetID(const Value: string);\r\nvar\r\n eh,el,tmp: TJSElement;\r\n frm: TCustomForm;\r\n p: TComponent;\r\n l,t,w,h: integer;\r\n\r\nbegin\r\n // it was a new created control and now going to be a HTML element wrapper\r\n\r\n if FNew and (FID <> Value) then\r\n begin\r\n // switch to template element - so find it\r\n eh := document.getElementById(Value);\r\n if Assigned(eh) then\r\n begin\r\n l := FLeft;\r\n t := FTop;\r\n w := FWidth;\r\n h := FHeight;\r\n tmp := nil;\r\n\r\n // unbind event handlers from created control\r\n UnbindEvents;\r\n\r\n if Assigned(FContainer) then\r\n begin\r\n // remember previous HTML parent element\r\n FParentElement := TJSHTMLElement(FContainer.parentElement);\r\n\r\n // move child elements from current control to HTML element\r\n tmp := document.createElement('SPAN');\r\n MoveElements(FContainer, tmp);\r\n end;\r\n\r\n p := Parent;\r\n\r\n // remove created control\r\n Parent := nil;\r\n\r\n // create wrapper for HTML element\r\n CreateWithID(Value);\r\n\r\n // add it back as child\r\n SetParentComponent(p);\r\n\r\n FID := Value;\r\n\r\n FWidth := w;\r\n FHeight := h;\r\n\r\n // perform update to set wrapper properties to HTML element\r\n UpdateElement;\r\n\r\n // keep Left,Top at design-time for Delphi compatibility\r\n if (csDesigning in ComponentState) then\r\n begin\r\n FLeft := l;\r\n FTop := t;\r\n end;\r\n\r\n if Assigned(tmp) then\r\n begin\r\n // as this appends childs, make sure initial set childs are not duplicated\r\n ElementHandle.textContent := '';\r\n MoveElementsAndFree(tmp, ElementHandle);\r\n end;\r\n\r\n Exit;\r\n end;\r\n end;\r\n\r\n // it is a wrapped control and now going to be a new created control\r\n if not FNew and (FID <> Value) then\r\n begin\r\n w := FWidth;\r\n h := FHeight;\r\n // unbind event handlers from wrapped HTML element\r\n eh := document.getElementById(FID);\r\n if Assigned(eh) then\r\n begin\r\n // move child elements to temp SPAN\r\n tmp := document.createElement('SPAN');\r\n MoveElements(eh, tmp);\r\n UnbindEvents;\r\n //DestroyControls;\r\n end;\r\n\r\n if (Value <> '') then\r\n begin\r\n eh := document.getElementById(Value);\r\n // wrap another HTML element\r\n if Assigned(eh) then\r\n begin\r\n CreateWithID(Value);\r\n FID := Value;\r\n FWidth := w;\r\n FHeight := h;\r\n UpdateElement;\r\n\r\n MoveElementsAndFree(tmp, FContainer);\r\n\r\n Exit;\r\n end;\r\n end;\r\n\r\n // create new control\r\n FNew := true;\r\n FElement := nil;\r\n\r\n CreateControl;\r\n\r\n if Value = '' then\r\n begin\r\n CreateInitialize;\r\n FWidth := w;\r\n FHeight := h;\r\n end;\r\n\r\n if Assigned(FParentElement) then\r\n begin\r\n FParentElement.appendChild(Container);\r\n end\r\n else\r\n document.body.appendChild(Container);\r\n\r\n frm := GetParentForm(Self); //Application.ActiveForm;\r\n if Assigned(frm) then\r\n begin\r\n Parent := frm;\r\n ElementPosition := epAbsolute;\r\n Left := 0;\r\n Top := 0;\r\n end;\r\n\r\n // move child elements from temp SPAN to new control\r\n if Assigned(tmp) then\r\n MoveElementsAndFree(tmp, FContainer);\r\n\r\n // perform update to set instance properties to control\r\n UpdateElement;\r\n UpdateElementSize;\r\n end;\r\n\r\n FID := Value;\r\n if Assigned(FContainer) then\r\n FContainer['id'] := Value;\r\nend;\r\n{$HINTS ON}\r\n\r\nprocedure TControl.SetTabOrder(AValue: Integer);\r\nbegin\r\n if FTabOrder <> AValue then\r\n begin\r\n FTabOrder := AValue;\r\n UpdateElement;\r\n end;\r\nend;\r\n\r\nprocedure TControl.SetTabStop(AValue: Boolean);\r\nbegin\r\n if FTabStop <> AValue then\r\n begin\r\n FTabStop := AValue;\r\n UpdateElement;\r\n end;\r\nend;\r\n\r\nfunction TControl.SaveState: string;\r\nbegin\r\n Result := '';\r\nend;\r\n\r\nfunction TControl.ScreenToClient(const Point: TPoint): TPoint;\r\nvar\r\n Origin: TPoint;\r\nbegin\r\n Origin := ClientOrigin;\r\n Result.X := Point.X - Origin.X;\r\n Result.Y := Point.Y - Origin.Y;\r\nend;\r\n\r\nprocedure TControl.SendToBack;\r\nbegin\r\n if Assigned(ElementHandle) and Assigned(ElementHandle.parentElement) then\r\n begin\r\n ElementHandle.parentElement.insertBefore(ElementHandle, ElementHandle.parentElement.firstElementChild);\r\n //if not ((ElementPosition <> epAbsolute) or IsLinked) then\r\n // ElementHandle.style.setProperty(CSSZIndex, '0');\r\n\r\n if Assigned(Parent) then\r\n Parent.MoveFirst(Self);\r\n end\r\nend;\r\n\r\n\r\nprocedure TControl.BeginDrag;\r\nbegin\r\n EnableDrag;\r\nend;\r\n\r\nprocedure TControl.BeginUpdate;\r\nbegin\r\n inc(FUpdateCount);\r\nend;\r\n\r\nprocedure TControl.Invalidate;\r\nbegin\r\n\r\nend;\r\n\r\nprocedure TControl.EnableDrag;\r\nbegin\r\n if Assigned(Container) then\r\n Container['draggable'] := 'true';\r\nend;\r\n\r\nprocedure TControl.EnableTab;\r\nvar\r\n i: integer;\r\nbegin\r\n if Assigned(FContainer) and not IsLinked then\r\n begin\r\n if TabStop and CanFocus then\r\n begin\r\n FContainer['tabindex'] := IntToStr(TabOrder + 1)\r\n end\r\n else\r\n begin\r\n FContainer['tabindex'] := '-1';\r\n end;\r\n end;\r\n\r\n for i := 0 to ControlCount - 1 do\r\n begin\r\n Controls[i].EnableTab;\r\n end;\r\nend;\r\n\r\nprocedure TControl.EndUpdate;\r\nbegin\r\n if (FUpdateCount > 0) then\r\n begin\r\n dec(FUpdateCount);\r\n\r\n if FUpdateCount = 0 then\r\n UpdateElement;\r\n end;\r\nend;\r\n\r\nfunction TControl.EventsBound: boolean;\r\nbegin\r\n Result := FEventsBound;\r\nend;\r\n\r\nfunction TControl.IsUpdating: boolean;\r\nbegin\r\n Result := FUpdateCount > 0;\r\nend;\r\n\r\nprocedure TControl.SetAlign(const Value: TAlign);\r\nbegin\r\n if FAlign <> Value then\r\n begin\r\n FAlign := Value;\r\n DoRealign;\r\n end;\r\nend;\r\n\r\nprocedure TControl.SetAlignWithMargins(const Value: boolean);\r\nbegin\r\n if FAlignWithMargins <> Value then\r\n begin\r\n FAlignWithMargins := Value;\r\n DoRealign;\r\n end;\r\nend;\r\n\r\nprocedure TControl.SetBiDiMode(const Value: TBiDiMode);\r\nbegin\r\n if Assigned(ElementHandle) then\r\n begin\r\n if (Value = bdLeftToRight) then\r\n ElementHandle.removeAttribute('dir')\r\n else\r\n ElementHandle.setAttribute('dir','rtl');\r\n end;\r\nend;\r\n\r\nprocedure TControl.DoMarginsChanged(Sender: TObject);\r\nbegin\r\n DoRealign;\r\nend;\r\n\r\nprocedure TControl.DoCenterChanged(Sender: TObject);\r\nbegin\r\n DoRealign;\r\nend;\r\n\r\nprocedure TControl.DoRealign;\r\nbegin\r\n if Assigned(Parent) and not Parent.IsUpdating then\r\n begin\r\n Parent.AlignControl(Parent);\r\n end;\r\nend;\r\n\r\nprocedure TControl.SetAnchors(const Value: TAnchors);\r\nbegin\r\n if (FAnchors <> Value) then\r\n begin\r\n FAnchors := Value;\r\n if not (csLoading in ComponentState) then\r\n begin\r\n UpdateAnchoring;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TControl.SetBorderWidth(const Value: integer);\r\nbegin\r\n if (FBorderWidth <> Value) then\r\n begin\r\n FBorderWidth := Value;\r\n UpdateElement;\r\n end;\r\nend;\r\n\r\nprocedure TControl.SetBoundsInt(X, Y, AWidth, AHeight: Integer);\r\nbegin\r\n if (X <> Left) or (Y <> Top) or ((AWidth <> Width) and (WidthStyle = ssAbsolute)) or ((AHeight <> Height) and (HeightStyle = ssAbsolute)) or\r\n (Assigned(Parent) and Parent.isLinked) then\r\n begin\r\n FBlockUpdateElement := True;\r\n FLeft := X;\r\n FTop := Y;\r\n\r\n FWidth := AWidth;\r\n FHeight := AHeight;\r\n\r\n FBlockUpdateElement := False;\r\n\r\n UpdateElementSize;\r\n\r\n if Align <> alNone then\r\n DoRealign\r\n else\r\n Realign;\r\n\r\n RecreateCanvas;\r\n\r\n DoBoundsChange;\r\n Invalidate;\r\n UpdateChildAnchoring;\r\n end;\r\nend;\r\n\r\nprocedure TControl.SetBounds(X, Y, AWidth, AHeight: Integer);\r\nbegin\r\n SetBoundsInt(X, Y, AWidth, AHeight);\r\n FWidth := AWidth;\r\n FHeight := AHeight;\r\n\r\n if not FUpdateTopLeft then\r\n begin\r\n FOrigTop := Y;\r\n FOrigLeft := X;\r\n end;\r\n\r\n ResetAnchoring;\r\n\r\n if not (csLoading in ComponentState) and (Align <> alNone) and Assigned(Parent) then\r\n begin\r\n DoRealign;\r\n end;\r\nend;\r\n\r\nprocedure TControl.SetBoundsRect(const Value: TRect);\r\nbegin\r\n SetBoundsInt(Value.Left, Value.Top, Value.Right - Value.Left, Value.Bottom - Value.Top);\r\nend;\r\n\r\nprocedure TControl.SetElementClassName(AValue: string);\r\nbegin\r\n if (FElementClassName <> AValue) then\r\n begin\r\n FElementClassName := AValue;\r\n if Assigned(FContainer) then\r\n FContainer['class'] := AValue;\r\n UpdateElement;\r\n end;\r\nend;\r\n\r\nprocedure TControl.SetElementColor(AElement: TJSHTMLElement; AColor: TColor);\r\nvar\r\n noCSS: boolean;\r\nbegin\r\n noCSS := (not Application.Themed and not (ElementClassName <> ''));\r\n\r\n if not IsLinked then\r\n SetHTMLElementColor(AElement, AColor, not noCSS);\r\nend;\r\n\r\nprocedure TControl.SetElementFont(const Value: TElementFont);\r\nbegin\r\n if (FElementFont <> Value) then\r\n begin\r\n FElementFont := Value;\r\n UpdateElementVisual;\r\n end;\r\nend;\r\n\r\nprocedure TControl.SetElementPointer(AElement: TJSHTMLElement;\r\n ACursor: TCursor);\r\nbegin\r\n if ACursor <> crDefault then\r\n AElement.style.setProperty('cursor', GetHTMLCursorName(ACursor))\r\n else\r\n AElement.style.removeProperty('cursor');\r\nend;\r\n\r\nprocedure TControl.SetElementPosition(const Value: TElementPosition);\r\nbegin\r\n if (FElementPosition <> Value) then\r\n begin\r\n FElementPosition := Value;\r\n if Assigned(ElementHandle) then\r\n begin\r\n UpdateElementSize;\r\n RecreateCanvas;\r\n InternalResize;\r\n end;\r\n end;\r\nend;\r\n\r\n\r\n{$HINTS OFF}\r\nprocedure TControl.SetFocus;\r\nvar\r\n e: TJSHTMLElement;\r\nbegin\r\n if not CanFocus then\r\n Exit;\r\n\r\n if Assigned(ElementHandle) then\r\n begin\r\n e := ElementHandle;\r\n if FGotFocus then\r\n begin\r\n {$IFDEF PAS2JS}\r\n asm\r\n e.focus();\r\n end;\r\n {$ENDIF}\r\n end\r\n else\r\n begin\r\n {$IFDEF PAS2JS}\r\n asm\r\n setTimeout(function() {e.focus();}, 1);\r\n end;\r\n {$ENDIF}\r\n end;\r\n end;\r\nend;\r\n{$HINTS ON}\r\n\r\nprocedure TControl.SetFont(AValue: TFont);\r\nbegin\r\n FFont.Name := AValue.Name;\r\n FFont.Size := AValue.Size;\r\n FFont.Style := AValue.Style;\r\n FFont.Color := AValue.Color;\r\nend;\r\n\r\nprocedure TControl.SetChildOrderEx(const Value: integer);\r\nbegin\r\n FChildOrder := Value;\r\nend;\r\n\r\nprocedure TControl.SetClientHeight(const Value: Integer);\r\nbegin\r\n Height := Value;\r\nend;\r\n\r\nprocedure TControl.SetClientWidth(const Value: Integer);\r\nbegin\r\n Width := Value;\r\nend;\r\n\r\nprocedure TControl.SetClipChildren(const Value: Boolean);\r\nbegin\r\n FClipChildren := Value;\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TControl.SetColor(AValue: TColor);\r\nbegin\r\n FColor := AValue;\r\n UpdateElementVisual;\r\n ColorChanging;\r\nend;\r\n\r\nprocedure TControl.SetControlCursor(const Value: TCursor);\r\nbegin\r\n FCursor := Value;\r\n\r\n if (ElementClassName = '') and Assigned(ElementHandle) then\r\n begin\r\n SetElementPointer(ElementHandle, Value);\r\n end;\r\nend;\r\n\r\nprocedure TControl.SetDragMode(const Value: TDragMode);\r\nbegin\r\n FDragMode := Value;\r\n if Value = dmAutomatic then\r\n BeginDrag\r\n else\r\n DisableDrag;\r\nend;\r\n\r\nfunction TControl.GetID: string;\r\nbegin\r\n Result := FID;\r\nend;\r\n\r\nfunction TControl.GetIsLinked: boolean;\r\nbegin\r\n Result := not FNew;\r\nend;\r\n\r\nfunction TControl.GetElementHandle: TJSHTMLElement;\r\nbegin\r\n Result := nil;\r\n if Assigned(FContainer) and FControlCreated then\r\n Result := TJSHTMLElement(FContainer);\r\nend;\r\n\r\nfunction TControl.GetMouseEventButton(Event: TJSMouseEvent): TMouseButton;\r\nbegin\r\n Result := mbLeft;\r\n case Event.button of\r\n 0: Result := mbLeft;\r\n 1: Result := mbMiddle;\r\n 2: Result := mbRight;\r\n end;\r\nend;\r\n\r\nfunction TControl.GetMouseEventShiftState(Event: TJSMouseEvent): TShiftState;\r\nbegin\r\n Result := [];\r\n if Event.shiftKey then\r\n Result := Result + [ssShift];\r\n\r\n if Event.ctrlKey then\r\n Result := Result + [ssCtrl];\r\n\r\n if Event.altKey then\r\n Result := Result + [ssAlt];\r\n\r\n if Event.buttons and 1 = 1 then\r\n Result := Result + [ssLeft];\r\n\r\n if Event.buttons and 2 = 2 then\r\n Result := Result + [ssRight];\r\n\r\n if Event.buttons and 4 = 4 then\r\n Result := Result + [ssMiddle];\r\nend;\r\n\r\nfunction TControl.GetMouseWheelEventShiftState(\r\n Event: TJSWheelEvent): TShiftState;\r\nbegin\r\n Result := [];\r\n if Event.shiftKey then\r\n Result := Result + [ssShift];\r\n if Event.ctrlKey then\r\n Result := Result + [ssCtrl];\r\n if Event.altKey then\r\n Result := Result + [ssAlt];\r\nend;\r\n\r\nfunction TControl.GetNewName: string;\r\nvar\r\n s: string;\r\n lPrefix: string;\r\n frm: TCustomForm;\r\nbegin\r\n s := ClassName;\r\n Delete(s, 1, 1);\r\n\r\n lPrefix := '';\r\n\r\n frm := GetParentForm(Self);\r\n if Assigned(frm) then\r\n lPrefix := frm.ClassName;\r\n\r\n Result := lPrefix+'_'+FindUniqueName(s);\r\nend;\r\n\r\nfunction TControl.GetOuterHeight: integer;\r\nbegin\r\n Result := FHeight - FBorderWidth;\r\nend;\r\n\r\nfunction TControl.GetOuterWidth: integer;\r\nbegin\r\n Result := FWidth - FBorderWidth;\r\nend;\r\n\r\nfunction TControl.GetRole: string;\r\nbegin\r\n Result := FRole;\r\n if Assigned(ElementHandle) then\r\n Result := ElementHandle.getAttribute('role');\r\nend;\r\n\r\nfunction TControl.GetElementStyle: TJSCSSStyleDeclaration;\r\nbegin\r\n Result := ElementHandle.style;\r\nend;\r\n\r\nfunction TControl.GetStyle(css: string): string;\r\nvar\r\n res: string;\r\n el: TJSElement;\r\nbegin\r\n el := ElementHandle;\r\n res := '';\r\n\r\n if not Assigned(el) then\r\n Exit;\r\n {$IFDEF PAS2JS}\r\n asm\r\n if (window.getComputedStyle) res = getComputedStyle(el, '')[css];\r\n if(el.currentStyle) res = el.currentStyle[css];\r\n\r\n end;\r\n {$ENDIF}\r\n Result := res;\r\nend;\r\n\r\nfunction TControl.GetKeyboardEventShiftState(Event: TJSKeyboardEvent): TShiftState;\r\nbegin\r\n Result := [];\r\n if Event.shiftKey then\r\n Result := Result + [ssShift];\r\n if Event.ctrlKey then\r\n Result := Result + [ssCtrl];\r\n if Event.altKey then\r\n Result := Result + [ssAlt];\r\nend;\r\n\r\nprocedure TControl.ClearMethodPointers;\r\nbegin\r\n FWheelPtr := nil;\r\n FClickPtr := nil;\r\n FDblClickPtr := nil;\r\n FMouseDownPtr := nil;\r\n FMouseUpPtr := nil;\r\n FMouseMovePtr := nil;\r\n FMouseLeavePtr := nil;\r\n FMouseEnterPtr := nil;\r\n FKeyDownPtr := nil;\r\n FKeyUpPtr := nil;\r\n FKeypressPtr := nil;\r\n FInputPtr := nil;\r\n FEnterPtr := nil;\r\n FExitPtr := nil;\r\n FTouchStartPtr := nil;\r\n FTouchEndPtr := nil;\r\n FTouchMovePtr := nil;\r\n FTouchCancelPtr := nil;\r\n FLayerMouseLeavePtr := nil;\r\n FLayerMouseEnterPtr := nil;\r\n FScriptLoadedPtr := nil;\r\n FContextMenuPtr := nil;\r\nend;\r\n\r\nprocedure TControl.GetMethodPointers;\r\nbegin\r\n if FWheelPtr = nil then\r\n begin\r\n FWheelPtr := @HandleDoWheel;\r\n FClickPtr := @HandleDoClick;\r\n FDblClickPtr := @HandleDoDblClick;\r\n FMouseDownPtr := @HandleDoMouseDown;\r\n FMouseUpPtr := @HandleDoMouseUp;\r\n FMouseMovePtr := @HandleDoMouseMove;\r\n FMouseLeavePtr := @HandleDoMouseLeave;\r\n FMouseEnterPtr := @HandleDoMouseEnter;\r\n FKeyDownPtr := @HandleDoKeyDown;\r\n FKeyUpPtr := @HandleDoKeyUp;\r\n FKeypressPtr := @HandleDoKeyPress;\r\n FInputPtr := @HandleDoInput;\r\n FEnterPtr := @HandleDoEnter;\r\n FExitPtr := @HandleDoExit;\r\n FTouchStartPtr := @HandleDoTouchStart;\r\n FTouchEndPtr := @HandleDoTouchEnd;\r\n FTouchMovePtr := @HandleDoTouchMove;\r\n FTouchCancelPtr := @HandleDoTouchCancel;\r\n FLayerMouseLeavePtr := @LayerHandleDoMouseLeave;\r\n FLayerMouseEnterPtr := @LayerHandleDoMouseEnter;\r\n FScriptLoadedPtr := @RequiredScriptLoaded;\r\n FDragStartPtr := @HandleDoDragStart;\r\n FDragOverPtr := @HandleDoDragOver;\r\n FDragEnterPtr := @HandleDoDragEnter;\r\n FDragLeavePtr := @HandledoDragLeave;\r\n FDragEndPtr := @HandleDoDragEnd;\r\n FDragDropPtr := @HandleDoDragDrop;\r\n FContextMenuPtr := @HandleDoContextMenu;\r\n end;\r\nend;\r\n\r\n{$HINTS OFF}\r\nprocedure TControl.BindEvents;\r\nvar\r\n eh: TJSEventTarget;\r\n wp: Pointer;\r\nbegin\r\n if Assigned(ElementBindHandle) then\r\n begin\r\n GetMethodPointers;\r\n FEventsBound := true;\r\n eh := ElementBindHandle;\r\n wp := FWheelPtr;\r\n asm\r\n eh.addEventListener('wheel', wp, { passive:true});\r\n end;\r\n eh.addEventListener('click', FClickPtr);\r\n eh.addEventListener('dblclick', FDblClickPtr);\r\n eh.addEventListener('mousedown', FMouseDownPtr);\r\n eh.addEventListener('mouseup', FMouseUpPtr);\r\n eh.addEventListener('mousemove', FMouseMovePtr);\r\n eh.addEventListener('mouseleave', FMouseLeavePtr);\r\n eh.addEventListener('mouseenter', FMouseEnterPtr);\r\n eh.addEventListener('keydown', FKeyDownPtr);\r\n eh.addEventListener('keyup', FKeyUpPtr);\r\n eh.addEventListener('keypress', FKeyPressPtr);\r\n eh.addEventListener('input', FInputPtr);\r\n eh.addEventListener('focus', FEnterPtr);\r\n eh.addEventListener('blur', FExitPtr);\r\n\r\n wp := FTouchStartPtr;\r\n asm\r\n eh.addEventListener('touchstart', wp, {passive: true});\r\n end;\r\n wp := FTouchMovePtr;\r\n asm\r\n eh.addEventListener('touchmove', wp, {passive:true});\r\n end;\r\n eh.addEventListener('touchend', FTouchEndPtr);\r\n eh.addEventListener('touchcancel', FTouchCancelPtr);\r\n\r\n eh.addEventListener('contextmenu', FContextMenuPtr);\r\n\r\n eh.addEventListener('dragstart', FDragStartPtr);\r\n eh.addEventListener('dragover', FDragOverPtr);\r\n eh.addEventListener('dragenter', FDragEnterPtr);\r\n eh.addEventListener('dragleave', FDragLeavePtr);\r\n eh.addEventListener('dragend', FDragEndPtr);\r\n eh.addEventListener('drop', FDragDropPtr);\r\n end;\r\nend;\r\n{$HINTS ON}\r\n\r\nprocedure TControl.BringToFront;\r\nbegin\r\n if Assigned(ElementHandle) and Assigned(ElementHandle.parentElement) then\r\n begin\r\n try\r\n ElementHandle.parentElement.appendChild(ElementHandle);\r\n if Assigned(Parent) then\r\n Parent.MoveLast(Self);\r\n except\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TControl.GetChildContainer: TJSElement;\r\nbegin\r\n Result := FContainer;\r\nend;\r\n\r\nprocedure TControl.GetChildren(Proc: TGetChildProc; Root: TComponent);\r\nvar\r\n I: Integer;\r\n Control: TControl;\r\nbegin\r\n for I := 0 to ControlCount - 1 do\r\n begin\r\n Control := Controls[I];\r\n if (Control.Owner = Root) or (Root = nil) then\r\n Proc(Control);\r\n end;\r\nend;\r\n\r\nfunction TControl.GetClientHeight: Integer;\r\nbegin\r\n Result := Height;\r\nend;\r\n\r\nfunction TControl.GetClientOrigin: TPoint;\r\nvar\r\n r: TJSDomRect;\r\nbegin\r\n Result := Point(0, 0);\r\n if Assigned(ElementHandle) then\r\n begin\r\n r := ElementHandle.getBoundingClientRect;\r\n Result := Point(Round(r.Left), Round(r.Top));\r\n end;\r\nend;\r\n\r\nfunction TControl.GetClientRect: TRect;\r\nvar\r\n css: string;\r\n p,brdr: integer;\r\nbegin\r\n css := Uppercase(GetStyle('border-width'));\r\n brdr := 0;\r\n\r\n p := pos('PX',css);\r\n if p > 0 then\r\n begin\r\n delete(css,p,2);\r\n val(css, brdr, p);\r\n end;\r\n\r\n Result := Rect(0, 0, GetWidth - 2* brdr, GetHeight - 2*brdr);\r\nend;\r\n\r\nfunction TControl.GetClientWidth: Integer;\r\nbegin\r\n Result := Width;\r\nend;\r\n\r\nfunction TControl.GetKeyChar(AValue: string): char;\r\nvar\r\n i: integer;\r\nbegin\r\n i := -1;\r\n Result := #0;\r\n\r\n case AValue of\r\n TJSKeyNames.BackSpace: i := 8;\r\n TJSKeyNames.Tab: i := 9;\r\n TJSKeyNames.Enter: i := 13;\r\n TJSKeyNames.Shift: i := 16;\r\n TJSKeyNames.Control: i := 17;\r\n TJSKeyNames.Alt: i := 18;\r\n TJSKeyNames.Pause: i := 19;\r\n TJSKeyNames.CapsLock: i := 20;\r\n TJSKeyNames.Escape: i := 27;\r\n TJSKeyNames.PageUp: i := 33;\r\n TJSKeyNames.PageDown: i := 34;\r\n TJSKeyNames._End: i := 35;\r\n TJSKeyNames.Home: i := 36;\r\n TJSKeyNames.ArrowLeft: i := 37;\r\n TJSKeyNames.ArrowUp: i := 38;\r\n TJSKeyNames.ArrowRight: i := 39;\r\n TJSKeyNames.ArrowDown: i := 40;\r\n TJSKeyNames.Insert: i := 45;\r\n TJSKeyNames.Delete: i := 46;\r\n\r\n TJSKeyNames.F1: i := 112;\r\n TJSKeyNames.F2: i := 113;\r\n TJSKeyNames.F3: i := 114;\r\n TJSKeyNames.F4: i := 115;\r\n TJSKeyNames.F5: i := 116;\r\n TJSKeyNames.F6: i := 117;\r\n TJSKeyNames.F7: i := 118;\r\n TJSKeyNames.F8: i := 119;\r\n TJSKeyNames.F9: i := 120;\r\n TJSKeyNames.F10: i := 121;\r\n TJSKeyNames.F11: i := 122;\r\n TJSKeyNames.F12: i := 123;\r\n TJSKeyNames.F13: i := 124;\r\n TJSKeyNames.F14: i := 125;\r\n TJSKeyNames.F15: i := 126;\r\n TJSKeyNames.F16: i := 127;\r\n TJSKeyNames.F17: i := 128;\r\n TJSKeyNames.F18: i := 129;\r\n TJSKeyNames.F19: i := 130;\r\n TJSKeyNames.F20: i := 131;\r\n else\r\n begin\r\n Result := AValue[1];\r\n end;\r\n end;\r\n\r\n if i <> -1 then\r\n Result := chr(i);\r\nend;\r\n\r\nfunction TControl.GetKeyCode(AValue: string; IgnoreCase: boolean = true): Integer;\r\nvar\r\n i: Integer;\r\nbegin\r\n i := -1;\r\n case AValue of\r\n 'Up': i := 38;\r\n 'Down': i := 40;\r\n 'Left': i := 37;\r\n 'Right': i := 39;\r\n '!': i := 56;\r\n '\"': i := 51;\r\n '#': i := 51;\r\n '$': i := 186;\r\n '%': i := 192;\r\n '''': i := 52;\r\n '(': i := 53;\r\n ')': i := 219;\r\n '*': i := 106;\r\n '+': i := 107;\r\n '-': i := 109;\r\n ',': i := 44;\r\n '.': i := 46;\r\n '/': i := 111;\r\n '\\': i := 226;\r\n '=': i := 187;\r\n '<': i := 226;\r\n '>': i := 226;\r\n TJSKeyNames.BackSpace: i := 8;\r\n TJSKeyNames.Tab: i := 9;\r\n TJSKeyNames.Enter: i := 13;\r\n TJSKeyNames.Shift: i := 16;\r\n TJSKeyNames.Control: i := 17;\r\n TJSKeyNames.Alt: i := 18;\r\n TJSKeyNames.Pause: i := 19;\r\n TJSKeyNames.CapsLock: i := 20;\r\n TJSKeyNames.Escape: i := 27;\r\n TJSKeyNames.PageUp: i := 33;\r\n TJSKeyNames.PageDown: i := 34;\r\n TJSKeyNames._End: i := 35;\r\n TJSKeyNames.Home: i := 36;\r\n TJSKeyNames.ArrowLeft: i := 37;\r\n TJSKeyNames.ArrowUp: i := 38;\r\n TJSKeyNames.ArrowRight: i := 39;\r\n TJSKeyNames.ArrowDown: i := 40;\r\n TJSKeyNames.Insert: i := 45;\r\n TJSKeyNames.Delete: i := 46;\r\n\r\n TJSKeyNames.F1: i := 112;\r\n TJSKeyNames.F2: i := 113;\r\n TJSKeyNames.F3: i := 114;\r\n TJSKeyNames.F4: i := 115;\r\n TJSKeyNames.F5: i := 116;\r\n TJSKeyNames.F6: i := 117;\r\n TJSKeyNames.F7: i := 118;\r\n TJSKeyNames.F8: i := 119;\r\n TJSKeyNames.F9: i := 120;\r\n TJSKeyNames.F10: i := 121;\r\n TJSKeyNames.F11: i := 122;\r\n TJSKeyNames.F12: i := 123;\r\n TJSKeyNames.F13: i := 124;\r\n TJSKeyNames.F14: i := 125;\r\n TJSKeyNames.F15: i := 126;\r\n TJSKeyNames.F16: i := 127;\r\n TJSKeyNames.F17: i := 128;\r\n TJSKeyNames.F18: i := 129;\r\n TJSKeyNames.F19: i := 130;\r\n TJSKeyNames.F20: i := 131;\r\n else\r\n begin\r\n if Assigned(AValue) and (Length(AValue) > 0) then\r\n begin\r\n i := Ord(AValue[1]);\r\n if IgnoreCase and (i >= 97) and (i <= 122) then\r\n i := i and $DF\r\n else\r\n if (i >= 65) and (i <= 90) then\r\n i := i or $40\r\n else\r\n if i > 122 then\r\n i := i or $80;\r\n end;\r\n end;\r\n end;\r\n\r\n Result := i;\r\nend;\r\n\r\nfunction TControl.GetLeft: Integer;\r\nbegin\r\n Result := FLeft;\r\n if (Result = -1) and Assigned(ElementHandle) and not (csLoading in ComponentState) then\r\n Result := Round(ElementHandle.offsetLeft);\r\nend;\r\n\r\nfunction TControl.GetTop: Integer;\r\nbegin\r\n Result := FTop;\r\n if (Result = -1) and Assigned(ElementHandle) and not (csLoading in ComponentState) then\r\n Result := Round(ElementHandle.offsetTop);\r\nend;\r\n\r\nfunction TControl.GetTouchEventShiftState(Event: TJSTouchEvent): TShiftState;\r\nbegin\r\n Result := [];\r\n if Event.shiftKey then\r\n Result := Result + [ssShift];\r\n if Event.ctrlKey then\r\n Result := Result + [ssCtrl];\r\n if Event.altKey then\r\n Result := Result + [ssAlt];\r\nend;\r\n\r\nfunction TControl.GetWebClassName: string;\r\nbegin\r\n Result := ClassName;\r\n Delete(Result, 1, 1);\r\n Result := 'TWeb' + Result;\r\nend;\r\n\r\nfunction TControl.GetWidth: Integer;\r\nvar\r\n cr: TJSDOMRect;\r\nbegin\r\n Result := FWidth;\r\n\r\n if Assigned(ElementHandle) and not (csLoading in ComponentState) then\r\n begin\r\n if (Result = -1) then\r\n begin\r\n Result := Round(Int(ElementHandle.offsetWidth));\r\n end;\r\n\r\n if (WidthStyle <> ssAbsolute) then\r\n begin\r\n cr := ElementHandle.getBoundingClientRect;\r\n Result := Round(Int(cr.Right - cr.Left));\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TControl.GetHeight: Integer;\r\nvar\r\n cr: TJSDOMRect;\r\nbegin\r\n Result := FHeight;\r\n\r\n if Assigned(ElementHandle) and not (csLoading in ComponentState) then\r\n begin\r\n if (Result = -1) then\r\n begin\r\n Result := Round(Int(ElementHandle.offsetHeight));\r\n end;\r\n\r\n if (HeightStyle <> ssAbsolute) then\r\n begin\r\n cr := ElementHandle.getBoundingClientRect;\r\n Result := Round(Int(cr.Bottom - cr.Top));\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TControl.KeyPreview(var Key: Word; Shift: TShiftState);\r\nbegin\r\n if Assigned(Owner) and (Owner is TControl) then\r\n begin\r\n (Owner as TControl).KeyPreview(Key, Shift);\r\n end;\r\nend;\r\n\r\nprocedure TControl.KeyDown(var Key: Word; Shift: TShiftState);\r\nbegin\r\n if Assigned(OnKeyDown) then\r\n OnKeyDown(Self, Key, Shift);\r\nend;\r\n\r\nprocedure TControl.KeyPress(var Key: Char);\r\nbegin\r\n if Assigned(OnKeyPress) then\r\n OnKeyPress(Self, Key);\r\nend;\r\n\r\nprocedure TControl.KeyUp(var Key: Word; Shift: TShiftState);\r\nbegin\r\n if Assigned(OnKeyUp) then\r\n OnKeyUp(Self, Key, Shift);\r\nend;\r\n\r\nfunction TControl.LayerHandleDoMouseEnter(Event: TJSMouseEvent): Boolean;\r\nbegin\r\n if (Event.buttons = 0) and Captured and not FMouseInsideLayer then\r\n begin\r\n ReleaseCapture;\r\n HandleDoMouseUp(Event);\r\n HandleDoMouseLeave(Event);\r\n end;\r\n FMouseInsideLayer := True;\r\n Result := true;\r\nend;\r\n\r\nfunction TControl.LayerHandleDoMouseLeave(Event: TJSMouseEvent): Boolean;\r\nbegin\r\n FMouseInsideLayer := False;\r\n Result := true;\r\nend;\r\n\r\nprocedure TControl.Loaded;\r\nvar\r\n i: integer;\r\nbegin\r\n if not (csLoading in ComponentState) then\r\n Exit;\r\n\r\n inherited;\r\n\r\n for i := 0 to ControlCount - 1 do\r\n begin\r\n // handle relative child positions\r\n if (Controls[i].ElementPosition in [epRelative, epIgnore]) and not (Controls[i].IsLinked) and (Controls[i].ChildOrder >= 0) then\r\n begin\r\n if (Controls[i].ChildOrder < ChildContainer.childNodes.Length) then\r\n begin\r\n ChildContainer.insertBefore(Controls[i].Container, ChildContainer.childNodes[Controls[i].ChildOrder]);\r\n end;\r\n end;\r\n Controls[i].Loaded;\r\n end;\r\n\r\n // all remaining child controls set to Loaded\r\n for i := 0 to ComponentCount - 1 do\r\n begin\r\n if (csLoading in Components[i].ComponentState) then\r\n Components[i].Loaded;\r\n end;\r\n\r\n case Align of\r\n alClient:\r\n begin\r\n if Assigned(Parent) then\r\n SetBoundsInt(0, 0, Parent.FWidth, Parent.FHeight);\r\n end;\r\n end;\r\n\r\n Resize;\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TControl.LoadFromHTML(const HTML: string);\r\nbegin\r\n if Assigned(ElementHandle) then\r\n ElementHandle.outerHTML := HTML;\r\nend;\r\n\r\nprocedure TControl.LoadState(AState: string);\r\nbegin\r\n\r\nend;\r\n\r\nfunction TControl.UseCSSFont: boolean;\r\nbegin\r\n Result := not ((ElementClassName = '') and (ElementFont = efProperty) and not IsLinked);\r\nend;\r\n\r\nfunction TControl.UseCSSFontColor: boolean;\r\nbegin\r\n Result := not (Application.Themed and (ColorToRGB(Font.Color) = RGB(0,0,0)));\r\nend;\r\n\r\nfunction TControl.HandleAllocated: boolean;\r\nbegin\r\n Result := True;\r\nend;\r\n\r\nfunction TControl.HandleDoClick(Event: TJSMouseEvent): Boolean;\r\nbegin\r\n FElementEvent := Event;\r\n if (eeClick in EventStopPropagation) then\r\n StopPropagation;\r\n if Enabled then\r\n Click;\r\n Result := True;\r\n FElementEvent := nil;\r\nend;\r\n\r\nfunction TControl.HandleDoContextMenu(Event: TJSMouseEvent): Boolean;\r\nbegin\r\n Result := true;\r\nend;\r\n\r\nfunction TControl.HandleDoDblClick(Event: TJSMouseEvent): Boolean;\r\nbegin\r\n FCaptureDown := False;\r\n FElementEvent := Event;\r\n if (eeDblClick in EventStopPropagation) then\r\n StopPropagation;\r\n if Enabled then\r\n DblClick;\r\n Result := True;\r\n FElementEvent := nil;\r\nend;\r\n\r\nfunction TControl.HandleDoDragDrop(Event: TJSDragEvent): Boolean;\r\nbegin\r\n FElementEvent := Event;\r\n Event.stopPropagation;\r\n if not FAcceptDrag then\r\n Event.preventDefault\r\n else\r\n begin\r\n if not IsInputControl then\r\n Event.preventDefault;\r\n DragDrop(DragObject, Event.clientX, Event.clientY);\r\n end;\r\n Result := FAcceptDrag;\r\n FElementEvent := nil;\r\nend;\r\n\r\nfunction TControl.HandleDoDragEnd(Event: TJSDragEvent): Boolean;\r\nbegin\r\n FElementEvent := Event;\r\n Event.stopPropagation;\r\n DoEndDrag(DragObject, Event.clientX, Event.clientY);\r\n Result := True;\r\n if (DragMode = dmManual) then\r\n DisableDrag;\r\n FElementEvent := nil;\r\nend;\r\n\r\nfunction TControl.HandleDoDragEnter(Event: TJSDragEvent): Boolean;\r\nbegin\r\n FElementEvent := Event;\r\n Event.stopPropagation;\r\n FAcceptDrag := IsInputControl;\r\n DragOver(DragObject, Event.clientX, Event.clientY, dsDragEnter, FAcceptDrag);\r\n if FAcceptDrag then\r\n Event.preventDefault;\r\n Result := not FAcceptDrag;\r\n FElementEvent := nil;\r\nend;\r\n\r\nfunction TControl.HandledoDragLeave(Event: TJSDragEvent): Boolean;\r\nbegin\r\n FElementEvent := Event;\r\n Event.stopPropagation;\r\n DragOver(DragObject, Event.clientX, Event.clientY, dsDragLeave, FAcceptDrag);\r\n Result := True;\r\n FElementEvent := nil;\r\nend;\r\n\r\nfunction TControl.HandleDoDragOver(Event: TJSDragEvent): Boolean;\r\nbegin\r\n FElementEvent := Event;\r\n Event.stopPropagation;\r\n DragOver(DragObject, Event.clientX, Event.clientY, dsDragMove, FAcceptDrag);\r\n if FAcceptDrag and (not IsInputControl or (Event.dataTransfer.items.length = 0)) then\r\n Event.preventDefault;\r\n Result := not FAcceptDrag;\r\n FElementEvent := nil;\r\nend;\r\n\r\nfunction TControl.HandleDoDragStart(Event: TJSDragEvent): Boolean;\r\nvar\r\n obj: TDragObject;\r\nbegin\r\n FElementEvent := Event;\r\n Event.stopPropagation;\r\n obj := nil;\r\n DoStartDrag(obj);\r\n if Assigned(obj) then\r\n DragObject := obj\r\n else\r\n DragObject := Self;\r\n Result := True;\r\nend;\r\n\r\n{$HINTS OFF}\r\n\r\nprocedure TControl.XYToClient(X,Y: single; var AClientX, AClientY: single);\r\nvar\r\n p: TControl;\r\n cr: TJSDOMRect;\r\n el: TJSHTMLElement;\r\n OrigX,OrigY: single;\r\n norel, formcont: boolean;\r\n r: TRect;\r\n cs: TJSCSSStyleDeclaration;\r\n csx, csy: integer;\r\n scrollx, scrolly: integer;\r\nbegin\r\n norel := True;\r\n formcont := False;\r\n\r\n scrollx := 0;\r\n scrolly := 0;\r\n\r\n if (ElementPosition = epAbsolute) then\r\n begin\r\n scrollx := document.body.scrollLeft + document.documentElement.scrollLeft;\r\n scrolly := document.body.scrollTop + document.documentElement.scrollTop;\r\n OrigX := X - Left;\r\n OrigY := Y - Top;\r\n end\r\n else\r\n begin\r\n norel := false;\r\n cr := ElementHandle.getBoundingClientRect;\r\n OrigX := X - cr.Left;\r\n OrigY := Y - cr.Top;\r\n AClientX := OrigX;\r\n AClientY := OrigY;\r\n Exit;\r\n end;\r\n\r\n AClientX := OrigX;\r\n AClientY := OrigY;\r\n\r\n p := Parent;\r\n\r\n if (Self is TCustomForm) and not Assigned(p) and Assigned(Container) then\r\n begin\r\n cr := Container.getBoundingClientRect;\r\n AClientX := AClientX - cr.Left;\r\n AClientY := AClientY - cr.Top;\r\n end;\r\n\r\n while Assigned(p) do\r\n begin\r\n if (p.IsLinked) then\r\n begin\r\n\r\n if (p is TCustomForm) then\r\n begin\r\n // is a form hosted in another HTML element\r\n cr := p.Container.getBoundingClientRect;\r\n end\r\n else\r\n begin\r\n // is control linked to HTML element\r\n cr := p.ElementHandle.getBoundingClientRect;\r\n end;\r\n\r\n // subtract the calculated position\r\n AClientX := AClientX - cr.Left;\r\n AClientY := AClientY - cr.Top;\r\n\r\n // if container happens to be a scrollable element\r\n AClientX := AClientX + p.ElementHandle.scrollLeft;\r\n AClientY := AClientY + p.ElementHandle.scrollTop;\r\n\r\n scrollx := 0;\r\n scrolly := 0;\r\n break;\r\n end\r\n else\r\n if (p is TCustomForm) then\r\n begin\r\n if ((p as TCustomForm).FormContainer <> '') then\r\n begin\r\n el := TJSHTMLElement(document.getElementById((p as TCustomForm).FormContainer));\r\n\r\n if Assigned(el) then\r\n begin\r\n formcont := true;\r\n cr := el.getBoundingClientRect;\r\n AClientX := AClientX - cr.Left;\r\n AClientY := AClientY - cr.Top;\r\n end;\r\n end;\r\n\r\n if Assigned((p as TCustomForm).Container) and ((p as TCustomForm).FormContainer = '') and {((p as TCustomForm).FormFileName <> '') and} ((p as TCustomForm).Popup) then\r\n begin\r\n cr := (p as TCustomForm).Container.getBoundingClientRect;\r\n AClientX := AClientX - cr.Left;\r\n AClientY := AClientY - cr.Top;\r\n r := (p as TCustomForm).ClientRect;\r\n AClientY := AClientY + r.Top;\r\n\r\n scrollx := 0;\r\n scrolly := 0;\r\n end;\r\n end\r\n else\r\n // restart calculation from bounding rectangle in case it is relative positioned\r\n if (p.ElementPosition in [epRelative, epIgnore]) then\r\n begin\r\n if Assigned(p.ElementHandle) then\r\n begin\r\n cr := p.ElementHandle.getBoundingClientRect;\r\n AClientX := OrigX - cr.Left;\r\n AClientY := OrigY - cr.Top;\r\n scrollx := 0;\r\n scrolly := 0;\r\n\r\n // as first relative element, take the BODY margins in account\r\n if norel then\r\n begin\r\n cs := window.getComputedStyle(document.documentElement);\r\n {$IFDEF PAS2JS}\r\n asm\r\n csx = parseInt(cs.marginLeft,10);\r\n csy = parseInt(cs.marginTop,10)\r\n end;\r\n {$ENDIF}\r\n\r\n AClientX := AClientX + csx;\r\n AClientY := AClientY + csy;\r\n end;\r\n norel := false;\r\n break;\r\n end;\r\n end\r\n else\r\n // only subtract for absolute positioned elements\r\n if (p.ElementPosition = epAbsolute) and norel then\r\n begin\r\n AClientX := AClientX - p.Left;\r\n AClientY := AClientY - p.Top;\r\n if Assigned(p.ElementHandle) then\r\n begin\r\n AClientX := AClientX + p.ElementHandle.scrollLeft;\r\n AClientY := AClientY + p.ElementHandle.scrollTop;\r\n end;\r\n\r\n OrigX := AClientX;\r\n OrigY := AClientY;\r\n end;\r\n p := p.Parent;\r\n end;\r\n\r\n // take scroll in account when there was no relative element involved\r\n if (ElementPosition = epAbsolute) and not formcont then\r\n begin\r\n AClientX := AClientX + scrollx;\r\n AClientY := AClientY + scrolly;\r\n end;\r\nend;\r\n\r\n{$HINTS ON}\r\n\r\nprocedure TControl.ClientToXY(AClientX, AClientY: single; var X,Y: single);\r\nvar\r\n p: TControl;\r\n cr: TJSDOMRect;\r\nbegin\r\n X := AClientX + Left - document.body.scrollLeft - document.documentElement.scrollLeft;\r\n Y := AClientY + Top - document.body.scrollTop - document.documentElement.scrollTop;\r\n\r\n p := Parent;\r\n while Assigned(p) do\r\n begin\r\n if (p.IsLinked) then\r\n begin\r\n\r\n if (p is TCustomForm) then\r\n // is a form hosted in another HTML element\r\n cr := p.Container.getBoundingClientRect\r\n else\r\n // is control linked to HTML element\r\n cr := p.ElementHandle.getBoundingClientRect;\r\n\r\n // subtract the calculated position\r\n X := X + cr.Left;\r\n Y := Y + cr.Top;\r\n end;\r\n\r\n if (p is TCustomForm) then\r\n begin\r\n\r\n if Assigned((p as TCustomForm).Container) and ((p as TCustomForm).FormContainer = '') and ((p as TCustomForm).FormFileName <> '') and ((p as TCustomForm).Popup) then\r\n begin\r\n cr := (p as TCustomForm).Container.getBoundingClientRect;\r\n X := X + cr.Left;\r\n Y := Y + cr.Top;\r\n end;\r\n end;\r\n\r\n // only add for absolute positioned elements\r\n if (p.ElementPosition = epAbsolute) then\r\n begin\r\n X := X + p.Left;\r\n Y := Y + p.Top;\r\n end;\r\n\r\n p := p.Parent;\r\n end;\r\nend;\r\n\r\nfunction TControl.HandleDoMouseDown(Event: TJSMouseEvent): Boolean;\r\nvar\r\n l, t: Single;\r\n ss: TShiftState;\r\n mb: TMouseButton;\r\nbegin\r\n FElementEvent := Event;\r\n if (eeMouseDown in EventStopPropagation) then\r\n StopPropagation;\r\n\r\n if not CanFocus then\r\n PreventDefault;\r\n\r\n FMouseX := Round(Event.clientX);\r\n FMouseY := Round(Event.clientY);\r\n\r\n XYToClient(Event.clientX, Event.clientY, l, t);\r\n\r\n // click outside scroll area should not trigger mousedown\r\n if HasVertScrollBar and (l > Width - GetScrollBarWidth) then\r\n Exit;\r\n\r\n if HasHorzScrollBar and (t > Height - GetScrollBarHeight) then\r\n Exit;\r\n\r\n ss := GetMouseEventShiftState(Event);\r\n mb := GetMouseEventButton(Event);\r\n\r\n MouseDown(mb, ss, Trunc(l), Trunc(t));\r\n Result := True;\r\n FElementEvent := nil;\r\nend;\r\n\r\nfunction TControl.HandleDoMouseUp(Event: TJSMouseEvent): Boolean;\r\nvar\r\n l, t: Single;\r\n ss: TShiftState;\r\n mb: TMouseButton;\r\nbegin\r\n FElementEvent := Event;\r\n if (eeMouseUp in EventStopPropagation) then\r\n StopPropagation;\r\n\r\n XYToClient(Event.clientX, Event.clientY, l, t);\r\n\r\n // click outside scroll area should not trigger mousedown\r\n if HasVertScrollBar and (l > Width - GetScrollBarWidth) then\r\n begin\r\n FElementEvent := nil;\r\n Exit;\r\n end;\r\n\r\n if HasHorzScrollBar and (t > Height - GetScrollBarHeight) then\r\n begin\r\n FElementEvent := nil;\r\n Exit;\r\n end;\r\n\r\n ss := GetMouseEventShiftState(Event);\r\n mb := GetMouseEventButton(Event);\r\n\r\n if (DragMode = dmManual) then\r\n DisableDrag;\r\n\r\n MouseUp(mb, ss, Trunc(l), Trunc(t));\r\n Result := True;\r\n FElementEvent := nil;\r\nend;\r\n\r\nfunction TControl.HandleDoWheel(Event: TJSWheelEvent): Boolean;\r\nvar\r\n ss: TShiftState;\r\n h: Boolean;\r\n l,t: single;\r\nbegin\r\n FElementEvent := Event;\r\n StopPropagation;\r\n\r\n XYToClient(Event.clientX, Event.clientY, l, t);\r\n\r\n FWheelMousePos.X := round(l);\r\n FWheelMousePos.Y := round(t);\r\n\r\n ss := GetMouseWheelEventShiftState(Event);\r\n\r\n h := False;\r\n MouseWheel(ss, Trunc(-Event.deltay), h);\r\n\r\n Result := true;\r\n FElementEvent := nil;\r\nend;\r\n\r\nprocedure TControl.ParentFontChanged;\r\nvar\r\n i: integer;\r\nbegin\r\n for i := 0 to ControlCount - 1 do\r\n begin\r\n if Controls[i].ParentFont then\r\n begin\r\n Controls[i].Font.Assign(Font);\r\n Controls[i].FontChanged;\r\n Controls[i].FParentFont := true;\r\n Controls[i].ParentFontChanged;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TControl.HandleKeyPreview(Key: Word);\r\nbegin\r\n //\r\nend;\r\n\r\nprocedure TControl.HandleFontChanged(Sender: TObject);\r\nbegin\r\n if (FUpdateCount = 0) then\r\n begin\r\n ParentFont := false;\r\n ParentFontChanged;\r\n end;\r\n\r\n FontChanged;\r\nend;\r\n\r\nfunction TControl.HasHorzScrollBar: Boolean;\r\nbegin\r\n Result := False;\r\n\r\n if Assigned(ElementHandle) then\r\n Result := ElementHandle.clientWidth < ElementHandle.scrollWidth;\r\nend;\r\n\r\nfunction TControl.HasVertScrollBar: Boolean;\r\nbegin\r\n Result := False;\r\n\r\n if Assigned(ElementHandle) then\r\n Result := ElementHandle.clientHeight < ElementHandle.scrollHeight;\r\nend;\r\n\r\nprocedure TControl.Hide;\r\nbegin\r\n Visible := false;\r\nend;\r\n\r\nfunction TControl.HandleDoTouchStart(Event: TJSTouchEvent): Boolean;\r\nvar\r\n l,t: single;\r\n touch: TJSTouch;\r\n ss: TShiftState;\r\nbegin\r\n FElementEvent := Event;\r\n FLastElementEvent := Event;\r\n\r\n StopPropagation;\r\n\r\n if not FAllowTouch then\r\n PreventDefault;\r\n\r\n if Event.Touches.length > 0 then\r\n begin\r\n touch := Event.touches.Touches[0];\r\n\r\n XYToClient(touch.clientX, touch.clientY, l, t);\r\n\r\n ss := GetTouchEventShiftState(Event);\r\n\r\n if LinkTouchEvents then\r\n begin\r\n MouseDown(mbLeft, ss, Trunc(l), Trunc(t));\r\n end;\r\n\r\n TouchStart(Trunc(l), Trunc(t));\r\n end;\r\n Result := True;\r\n FElementEvent := nil;\r\nend;\r\n\r\nfunction TControl.HandleDoTouchMove(Event: TJSTouchEvent): Boolean;\r\nvar\r\n l,t: single;\r\n touch: TJSTouch;\r\n ss: TShiftState;\r\nbegin\r\n FElementEvent := Event;\r\n FLastElementEvent := Event;\r\n\r\n StopPropagation;\r\n\r\n if not FAllowTouch then\r\n PreventDefault;\r\n\r\n if Captured then\r\n PreventDefault;\r\n\r\n if Event.Touches.length > 0 then\r\n begin\r\n touch := Event.touches.Touches[0];\r\n\r\n XYToClient(touch.clientX, touch.clientY, l, t);\r\n\r\n ss := GetTouchEventShiftState(Event);\r\n\r\n if LinkTouchEvents then\r\n MouseMove(ss, Trunc(l), Trunc(t));\r\n\r\n TouchMove(Trunc(l), Trunc(t));\r\n end;\r\n FElementEvent := nil;\r\n Result := True;\r\nend;\r\n\r\nfunction TControl.HandleDoTouchEnd(Event: TJSTouchEvent): Boolean;\r\nvar\r\n l,t: single;\r\n touch: TJSTouch;\r\n ss: TShiftState;\r\nbegin\r\n FElementEvent := Event;\r\n\r\n if not FAllowTouch then\r\n PreventDefault;\r\n\r\n ReleaseCapture;\r\n StopPropagation;\r\n\r\n if Assigned(FLastElementEvent) and (TJSTouchEvent(FLastElementEvent).Touches.length > 0) then\r\n begin\r\n touch := TJSTouchEvent(FLastElementEvent).touches.Touches[0];\r\n\r\n XYToClient(touch.clientX, touch.clientY, l, t);\r\n\r\n ss := GetTouchEventShiftState(Event);\r\n\r\n if LinkTouchEvents then\r\n begin\r\n MouseUp(mbLeft, ss, Trunc(l), Trunc(t));\r\n if Enabled and not AllowTouch then\r\n Click;\r\n end;\r\n\r\n TouchEnd(Trunc(l), Trunc(t));\r\n end;\r\n FElementEvent := nil;\r\n Result := True;\r\nend;\r\n\r\nfunction TControl.HandleDoTouchCancel(Event: TJSTouchEvent): Boolean;\r\nvar\r\n l,t: single;\r\n touch: TJSTouch;\r\n ss: TShiftState;\r\nbegin\r\n FElementEvent := Event;\r\n ReleaseCapture;\r\n StopPropagation;\r\n\r\n if Event.Touches.length > 0 then\r\n begin\r\n touch := Event.touches.Touches[0];\r\n\r\n XYToClient(touch.clientX, touch.clientY, l, t);\r\n\r\n ss := GetTouchEventShiftState(Event);\r\n\r\n if LinkTouchEvents then\r\n begin\r\n MouseUp(mbLeft, ss, Trunc(l), Trunc(t));\r\n end;\r\n\r\n TouchCancel(Trunc(l), Trunc(t));\r\n end;\r\n FElementEvent := nil;\r\n Result := True;\r\nend;\r\n\r\nprocedure TControl.DragDrop(Source: TObject; X, Y: Integer);\r\nbegin\r\n if Assigned(OnDragDrop) then\r\n OnDragDrop(Self, Source, X, Y);\r\nend;\r\n\r\nprocedure TControl.DragOver(Source: TObject; X, Y: Integer;\r\n State: TDragState; var Accept: Boolean);\r\nbegin\r\n if Assigned(OnDragOver) then\r\n OnDragOver(Self, Source, X, Y, State, Accept);\r\nend;\r\n\r\nprocedure TControl.DoBoundsChange;\r\nvar\r\n b: boolean;\r\n frm: TCustomForm;\r\nbegin\r\n UpdateElementSize;\r\n RecreateCanvas;\r\n\r\n if FIsResizing then\r\n Exit;\r\n\r\n FIsResizing := true;\r\n\r\n InternalResize;\r\n\r\n DoRealign;\r\n\r\n b := false;\r\n\r\n frm := GetParentForm(Self);\r\n if Assigned(frm) then\r\n begin\r\n b := frm.IsResizing;\r\n b := b or (TControl(frm).FUpdateCount > 0);\r\n end;\r\n\r\n b := b or (FUpdateCount > 0);\r\n b := b or FIsAligning;\r\n\r\n if not b then\r\n begin\r\n UpdateChildAnchoring;\r\n end;\r\n\r\n FIsResizing := false;\r\nend;\r\n\r\nprocedure TControl.DoEndDrag(Target: TObject; X, Y: Integer);\r\nbegin\r\n if Assigned(OnEndDrag) then\r\n OnEndDrag(Self, Target, X, Y);\r\nend;\r\n\r\nprocedure TControl.DoStartDrag(var DragObject: TDragObject);\r\nbegin\r\n if Assigned(OnStartDrag) then\r\n OnStartDrag(Self, DragObject);\r\nend;\r\n\r\nfunction TControl.Focused: Boolean;\r\nbegin\r\n Result := FContainer = document.activeElement;\r\nend;\r\n\r\n\r\nprocedure TControl.FontChanged;\r\nbegin\r\n UpdateElementVisual;\r\nend;\r\n\r\nfunction TControl.HandleDoMouseLeave(Event: TJSMouseEvent): Boolean;\r\nbegin\r\n if Captured then\r\n Exit;\r\n\r\n Event.stopPropagation;\r\n DoMouseLeave;\r\n Result := true;\r\nend;\r\n\r\nfunction TControl.HandleDoMouseEnter(Event: TJSMouseEvent): Boolean;\r\nbegin\r\n if Captured then\r\n Exit;\r\n\r\n Event.stopPropagation;\r\n DoMouseEnter;\r\n Result := true;\r\nend;\r\n\r\nfunction TControl.HandleDoMouseMove(Event: TJSMouseEvent): Boolean;\r\nvar\r\n l, t: Single;\r\n ss: TShiftState;\r\nbegin\r\n FElementEvent := Event;\r\n FCursorX := round(Event.clientX);\r\n FCursorY := round(Event.clientY);\r\n\r\n if (eeMouseMove in EventStopPropagation) then\r\n StopPropagation;\r\n\r\n XYToClient(Event.clientX, Event.clientY, l, t);\r\n\r\n ss := GetMouseEventShiftState(Event);\r\n\r\n MouseMove(ss, Trunc(l), Trunc(t));\r\n Result := True;\r\n FElementEvent := nil;\r\nend;\r\n\r\nfunction TControl.HandleDoKeyDown(Event: TJSKeyBoardEvent): Boolean;\r\nvar\r\n k: Word;\r\n ss: TShiftState;\r\n undef: boolean;\r\n\r\nbegin\r\n FElementEvent := Event;\r\n if (eeKeyDown in EventStopPropagation) then\r\n StopPropagation;\r\n\r\n {$IFDEF PAS2JS}\r\n asm\r\n undef = (Event.key == undefined);\r\n end;\r\n {$ENDIF}\r\n\r\n if not undef then\r\n begin\r\n k := GetKeyCode(Event.Key, true);\r\n ss := GetKeyboardEventShiftState(Event);\r\n KeyDown(k, ss);\r\n\r\n if (k in [VK_RETURN, VK_ESCAPE, VK_TAB]) then\r\n begin\r\n KeyPreview(k, ss);\r\n end;\r\n end;\r\n\r\n Result := True;\r\n if k = 0 then\r\n PreventDefault;\r\n\r\n FElementEvent := nil;\r\nend;\r\n\r\nfunction TControl.HandleDoKeyUp(Event: TJSKeyBoardEvent): Boolean;\r\nvar\r\n k: Word;\r\n ss: TShiftState;\r\n c: Char;\r\n undef: boolean;\r\nbegin\r\n FElementEvent := Event;\r\n if (eeKeyUp in EventStopPropagation) then\r\n StopPropagation;\r\n {$IFDEF PAS2JS}\r\n asm\r\n undef = (Event.key == undefined);\r\n end;\r\n {$ENDIF}\r\n\r\n if not undef then\r\n begin\r\n k := GetKeyCode(Event.Key, true);\r\n\r\n ss := GetKeyboardEventShiftState(Event);\r\n\r\n // #27 is not send as char in the browser\r\n if (k = 27) then\r\n begin\r\n c := #27;\r\n KeyPress(c);\r\n end;\r\n\r\n KeyUp(k, ss);\r\n end;\r\n\r\n Result := True;\r\n if k = 0 then\r\n PreventDefault;\r\n FelementEvent := nil;\r\nend;\r\n\r\nfunction TControl.HandleDoKeyPress(Event: TJSKeyBoardEvent): Boolean;\r\nvar\r\n c: Char;\r\nbegin\r\n FElementEvent := Event;\r\n if (eeKeyPress in EventStopPropagation) then\r\n StopPropagation;\r\n\r\n if IsKeyCharacter(Event.Key) then\r\n begin\r\n c := GetKeyChar(Event.Key);\r\n KeyPress(c);\r\n end;\r\n\r\n Result := True;\r\n if c = #0 then\r\n PreventDefault;\r\n FElementEvent := nil;\r\nend;\r\n\r\nfunction TControl.HandleDoInput(Event: TJSInputEvent): Boolean;\r\nvar\r\n c: Char;\r\n stemp: string;\r\nbegin\r\n //Note: On Android the OnKeyPress event is not triggered.\r\n //The OnInput event is used instead to trigger the OnKeyPress event.\r\n if IsAndroid then\r\n begin\r\n FElementEvent := Event;\r\n if (eeKeyPress in EventStopPropagation) then\r\n StopPropagation;\r\n\r\n c := #0;\r\n if Event.Data <> '' then\r\n begin\r\n stemp := Event.Data;\r\n\r\n if Assigned(stemp) then\r\n c := stemp[Length(stemp)]\r\n else\r\n c := #8;\r\n\r\n KeyPress(c);\r\n end;\r\n\r\n Result := True;\r\n if c = #0 then\r\n PreventDefault;\r\n FElementEvent := nil;\r\n end;\r\nend;\r\n\r\nfunction TControl.HandleDoEnter(Event: TJSFocusEvent): Boolean;\r\nbegin\r\n FElementEvent := Event;\r\n StopPropagation;\r\n DoEnter;\r\n Result := True;\r\n FElementEvent := nil;\r\n FGotFocus := True;\r\n FocusedControlEntered;\r\nend;\r\n\r\nfunction TControl.HandleDoExit(Event: TEventListenerEvent): Boolean;\r\nbegin\r\n DoExit;\r\n Result := True;\r\n FocusedControlExited;\r\nend;\r\n\r\nprocedure TControl.SetParent(AValue: TControl);\r\nvar\r\n isNew: boolean;\r\nbegin\r\n if Assigned(AValue) then\r\n AValue := AValue.CanAcceptChild(Self);\r\n\r\n isNew := FNew;\r\n\r\n if (FParent <> AValue) then\r\n begin\r\n if Assigned(FParent) then\r\n FParent.UnRegisterParent(Self);\r\n\r\n FPrevParent := FParent;\r\n FParent := AValue;\r\n FGotFocus := False;\r\n\r\n UpdateParent;\r\n\r\n if not (csDestroying in ComponentState) then\r\n begin\r\n if not isNew then\r\n UpdateElement;\r\n InitScript;\r\n end;\r\n\r\n if Assigned(FParent) then\r\n FParent.RegisterParent(Self);\r\n\r\n if (csLoading in ComponentState) and Assigned(Parent) and not (csLoading in Parent.ComponentState) then\r\n Loaded;\r\n\r\n if Assigned(AValue) and Assigned(Parent) and not Parent.IsUpdating then\r\n begin\r\n if Align <> alNone then\r\n DoRealign\r\n else\r\n Realign;\r\n end;\r\n\r\n if not (csDestroying in ComponentState) then\r\n Invalidate;\r\n end;\r\nend;\r\n\r\nprocedure TControl.SetParentColor(const Value: boolean);\r\nbegin\r\n if (FParentColor <> Value) and Value and Assigned(Parent) then\r\n begin\r\n Color := Parent.Color;\r\n end;\r\n\r\n FParentColor := Value;\r\nend;\r\n\r\nprocedure TControl.SetParentComponent(Value: TComponent);\r\nbegin\r\n if (Parent <> Value) and (Value is TControl) then\r\n SetParent(TControl(Value));\r\nend;\r\n\r\nprocedure TControl.SetParentElement(const Value: TJSHTMLElement);\r\nbegin\r\n if FNew then\r\n begin\r\n FElementPosition := epRelative;\r\n CreateControl;\r\n FParentElement := Value;\r\n\r\n if Assigned(FParentElement) then\r\n begin\r\n FParentElement.appendChild(Container);\r\n end;\r\n end\r\n else\r\n begin\r\n if Assigned(FParentElement) then\r\n FParentElement.removeChild(Container);\r\n\r\n FParentElement := Value;\r\n\r\n if Assigned(FParentElement) then\r\n FParentElement.appendChild(Container);\r\n\r\n UpdateElement;\r\n end;\r\n\r\n InitScript;\r\n Invalidate;\r\nend;\r\n\r\nprocedure TControl.SetParentElementID(const Value: string);\r\nvar\r\n el: TJSHTMLElement;\r\nbegin\r\n FParentElementID := Value;\r\n\r\n el := TJSHTMLElement(document.getElementById(FParentElementID));\r\n\r\n if Assigned(el) then\r\n SetParentElement(el);\r\nend;\r\n\r\nprocedure TControl.SetParentFont(const Value: boolean);\r\nbegin\r\n if (Value <> FParentFont) and (Value) and Assigned(Parent) then\r\n begin\r\n BeginUpdate;\r\n Font.Assign(Parent.Font);\r\n EndUpdate;\r\n UpdateElement;\r\n end;\r\n\r\n FParentFont := Value;\r\nend;\r\n\r\nprocedure TControl.SetRequiredScripts(const Value: TStringList);\r\nbegin\r\n FRequiredScripts.Assign(Value);\r\nend;\r\n\r\nprocedure TControl.SetRole(const Value: string);\r\nbegin\r\n FRole := Value;\r\n if Assigned(ElementHandle) then\r\n begin\r\n if Value = '' then\r\n ElementHandle.removeAttribute('role')\r\n else\r\n ElementHandle.setAttribute('role', Value);\r\n end;\r\nend;\r\n\r\nprocedure TControl.Realign;\r\nbegin\r\n AlignControl(Self);\r\nend;\r\n\r\nprocedure TControl.RecreateCanvas;\r\nbegin\r\nend;\r\n\r\nprocedure TControl.RecreateElement;\r\nbegin\r\n if Assigned(Container) then\r\n begin\r\n UnbindEvents;\r\n Container.parentNode.removeChild(Container);\r\n FElement := nil;\r\n CreateControl;\r\n\r\n if Assigned(Parent) and Assigned(Parent.Container) then\r\n Parent.ChildContainer.appendChild(Container);\r\n end;\r\nend;\r\n\r\nprocedure TControl.RegisterParent(AValue: TControl);\r\nbegin\r\n SetLength(FControls, Length(FControls) + 1);\r\n FControls[Length(FControls) - 1] := AValue;\r\nend;\r\n\r\nprocedure TControl.ReleaseCapture;\r\nvar\r\n eh: TJSHTMLElement;\r\nbegin\r\n FCaptureDown := False;\r\n\r\n if FCaptured and Assigned(FLayer) then\r\n begin\r\n eh := TJSHTMLElement(FLayer);\r\n eh.removeEventListener('mouseenter', FLayerMouseEnterPtr);\r\n eh.removeEventListener('mouseleave', FLayerMouseLeavePtr);\r\n eh.removeEventListener('mousedown', FMouseDownPtr);\r\n eh.removeEventListener('mouseup', FMouseUpPtr);\r\n eh.removeEventListener('mousemove', FMouseMovePtr);\r\n eh.removeEventListener('touchstart', FTouchStartPtr);\r\n eh.removeEventListener('touchmove', FTouchMovePtr);\r\n eh.removeEventListener('touchend', FTouchEndPtr);\r\n eh.removeEventListener('touchcancel', FTouchEndPtr);\r\n\r\n document.body.removeChild(eh);\r\n FCaptured := False;\r\n FLayer := nil;\r\n UpdateElement;\r\n end;\r\nend;\r\n\r\nprocedure TControl.ResetAnchoring;\r\nbegin\r\n FOrigRect := Rect(-1,-1,-1,-1);\r\n InitAnchoring;\r\nend;\r\n\r\nprocedure TControl.Resize;\r\nbegin\r\n if Assigned(FOnResize) then\r\n FOnResize(Self);\r\nend;\r\n\r\nfunction TControl.AnchoringInitialized: boolean;\r\nbegin\r\n Result := (OrigRect.Left <> -1) or (OrigRect.Top <> -1);\r\nend;\r\n\r\nprocedure TControl.InitAnchoring;\r\nvar\r\n i,dx,dy: integer;\r\n\r\n procedure SizeBorderOffset(AObject: TObject; var ax,ay: integer);\r\n var\r\n prop: TTypeMemberProperty;\r\n begin\r\n ax := 0;\r\n ay := 0;\r\n prop := GetPropInfo(AObject.ClassInfo, 'BorderStyle');\r\n if Assigned(prop) then\r\n begin\r\n i := GetOrdProp(AObject, prop);\r\n if i in [1,4,5] then\r\n begin\r\n ax := 4;\r\n ay := 4;\r\n end;\r\n if i in [2,3] then\r\n begin\r\n ax := 16;\r\n ay := 16;\r\n end;\r\n end;\r\n end;\r\n\r\nbegin\r\n if AnchoringInitialized then\r\n Exit;\r\n\r\n dx := 0;\r\n dy := 0;\r\n\r\n if (Self is TForm) then\r\n begin\r\n if (self as TForm).IsMiletus then\r\n SizeBorderOffset(Self, dx,dy);\r\n\r\n FOrigRect := Rect(0, 0, GetDesignWidth - dx, GetDesignHeight - dy);\r\n end\r\n else\r\n begin\r\n FOrigRect := Rect(GetDesignLeft, GetDesignTop, GetDesignLeft + GetDesignWidth, GetDesignTop + GetDesignHeight);\r\n end;\r\n\r\n if Assigned(Parent) then\r\n begin\r\n if (Parent is TForm) then\r\n begin\r\n if (Parent as TForm).IsMiletus then\r\n begin\r\n SizeBorderOffset(Parent, dx,dy);\r\n end;\r\n FOrigParentRect := Rect(0, 0, Parent.GetDesignWidth - dx, Parent.GetDesignHeight - dy)\r\n end\r\n else\r\n begin\r\n //InitAnchoring;\r\n if not Parent.AnchoringInitialized then\r\n Parent.InitAnchoring;\r\n\r\n FOrigParentRect := Rect(Parent.GetDesignLeft, Parent.GetDesignTop, Parent.GetDesignLeft + Parent.GetDesignWidth, Parent.GetDesignTop + Parent.GetDesignHeight);\r\n end;\r\n end;\r\n\r\n for i := 0 to ControlCount - 1 do\r\n Controls[i].InitAnchoring;\r\nend;\r\n\r\nprocedure TControl.InjectCSS;\r\nvar\r\n cssname,css: string;\r\n cssmgr: TCSSCodeManager;\r\nbegin\r\n cssname := GetWebClassname;\r\n\r\n css := '';\r\n\r\n cssmgr := GetCSSManager;\r\n\r\n if Assigned(cssmgr) then\r\n css := cssmgr.GetClassCSS(cssname);\r\n\r\n if (css <> '') then\r\n AddControlStyle(css);\r\nend;\r\n\r\nprocedure TControl.InternalResize;\r\nbegin\r\n if (csLoading in ComponentState) then\r\n Exit;\r\n\r\n Resize;\r\nend;\r\n\r\nprocedure TControl.InternalUpdateParent;\r\nvar\r\n p: TControl;\r\nbegin\r\n p := FPrevParent;\r\n if FNew then\r\n begin\r\n CreateControl;\r\n\r\n if Assigned(Container) then\r\n begin\r\n if Assigned(Parent) and not Assigned(Parent.Container) then\r\n Parent.CreateControl;\r\n\r\n if (Parent <> p) and Assigned(p) and Assigned(p.Container) then\r\n begin\r\n if Container.parentNode = p.ChildContainer then\r\n p.ChildContainer.removeChild(Container);\r\n end;\r\n\r\n if Assigned(Parent) and Assigned(Parent.Container) then\r\n begin\r\n Parent.ChildContainer.appendChild(Container);\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TControl.IsEnabled: boolean;\r\nbegin\r\n Result := FEnabled;\r\nend;\r\n\r\nfunction TControl.IsFocused: Boolean;\r\nbegin\r\n Result := FContainer = document.activeElement;\r\nend;\r\n\r\nfunction TControl.IsInputControl: Boolean;\r\nbegin\r\n Result := False;\r\nend;\r\n\r\nfunction TControl.IsKeyCharacter(AValue: string): Boolean;\r\nbegin\r\n case AValue of\r\n 'Up',\r\n 'Down',\r\n 'Left',\r\n 'Right',\r\n TJSKeyNames.Shift,\r\n TJSKeyNames.Control,\r\n TJSKeyNames.Alt,\r\n TJSKeyNames.Pause,\r\n TJSKeyNames.CapsLock,\r\n TJSKeyNames.PageUp,\r\n TJSKeyNames.PageDown,\r\n TJSKeyNames._End,\r\n TJSKeyNames.Home,\r\n TJSKeyNames.ArrowLeft,\r\n TJSKeyNames.ArrowUp,\r\n TJSKeyNames.ArrowRight,\r\n TJSKeyNames.ArrowDown,\r\n TJSKeyNames.Insert,\r\n TJSKeyNames.Delete,\r\n TJSKeyNames.F1,\r\n TJSKeyNames.F2,\r\n TJSKeyNames.F3,\r\n TJSKeyNames.F4,\r\n TJSKeyNames.F5,\r\n TJSKeyNames.F6,\r\n TJSKeyNames.F7,\r\n TJSKeyNames.F8,\r\n TJSKeyNames.F9,\r\n TJSKeyNames.F10,\r\n TJSKeyNames.F11,\r\n TJSKeyNames.F12,\r\n TJSKeyNames.F13,\r\n TJSKeyNames.F14,\r\n TJSKeyNames.F15,\r\n TJSKeyNames.F16,\r\n TJSKeyNames.F17,\r\n TJSKeyNames.F18,\r\n TJSKeyNames.F19,\r\n TJSKeyNames.F20: Result := False;\r\n else\r\n Result := True;\r\n end;\r\nend;\r\n\r\nfunction TControl.IsStructuralElement: boolean;\r\nbegin\r\n Result := false;\r\nend;\r\n\r\nprocedure TControl.UnbindEvents;\r\nvar\r\n eh: TJSEventTarget;\r\nbegin\r\n ReleaseCapture;\r\n\r\n if Assigned(ElementBindHandle) then\r\n begin\r\n eh := ElementBindHandle;\r\n\r\n eh.removeEventListener('wheel', FWheelPtr);\r\n eh.removeEventListener('click', FClickPtr);\r\n eh.removeEventListener('dblclick', FDblClickPtr);\r\n eh.removeEventListener('mousedown', FMouseDownPtr);\r\n eh.removeEventListener('mouseup', FMouseUpPtr);\r\n eh.removeEventListener('mousemove', FMouseMovePtr);\r\n eh.removeEventListener('mouseleave', FMouseLeavePtr);\r\n eh.removeEventListener('mouseenter', FMouseEnterPtr);\r\n eh.removeEventListener('keydown', FKeyDownPtr);\r\n eh.removeEventListener('keyup', FKeyUpPtr);\r\n eh.removeEventListener('keypress', FKeyPressPtr);\r\n eh.removeEventListener('focus', FEnterPtr);\r\n eh.removeEventListener('blur', FExitPtr);\r\n eh.removeEventListener('input', FInputPtr);\r\n\r\n eh.removeEventListener('touchstart', FTouchStartPtr);\r\n eh.removeEventListener('touchmove', FTouchMovePtr);\r\n eh.removeEventListener('touchend', FTouchEndPtr);\r\n eh.removeEventListener('touchcancel', FTouchEndPtr);\r\n\r\n eh.removeEventListener('contextmenu', FContextMenuPtr);\r\n end;\r\nend;\r\n\r\nprocedure TControl.UnRegisterParent(AValue: TControl);\r\nvar\r\n i: Integer;\r\n flg: Boolean;\r\nbegin\r\n flg := false;\r\n\r\n for i := 0 to Length(FControls) - 1 do\r\n begin\r\n if (FControls[i] = AValue) then\r\n begin\r\n flg := True;\r\n end;\r\n\r\n if (flg) and (i < Length(FControls) - 1) then\r\n FControls[i] := FControls[i + 1];\r\n end;\r\n\r\n if flg then\r\n SetLength(FControls, Length(FControls) - 1);\r\nend;\r\n\r\nprocedure TControl.UpdateAnchoring;\r\nvar\r\n dxr,dyr: integer;\r\n dxo,dyo: integer;\r\n dxw,dyw: integer;\r\n br,r: TRect;\r\nbegin\r\n if (csLoading in ComponentState) then\r\n Exit;\r\n\r\n if not FControlCreated then\r\n Exit;\r\n\r\n if (OrigRect.Left = -1) and (OrigRect.Top = -1) then\r\n InitAnchoring;\r\n\r\n if Assigned(Parent) and not Parent.AnchoringInitialized then\r\n Exit;\r\n\r\n if (Align <> alClient) then\r\n begin\r\n if Assigned(Parent) and not (Self is TForm) then\r\n begin\r\n r := Parent.BoundsRect;\r\n\r\n dxr := (r.Right - r.Left) - (FOrigParentRect.Right - FOrigParentRect.Left);\r\n dyr := (r.Bottom - r.Top) - (FOrigParentRect.Bottom - FOrigParentRect.Top);\r\n\r\n br := FOrigRect;\r\n\r\n dxo := 0;\r\n dyo := 0;\r\n dxw := 0;\r\n dyw := 0;\r\n\r\n if (akRight in Anchors) then\r\n begin\r\n if (akLeft in Anchors) then\r\n dxw := dxr\r\n else\r\n dxo := dxr;\r\n end;\r\n\r\n if (akBottom in Anchors) then\r\n begin\r\n if (akTop in Anchors) then\r\n dyw := dyr\r\n else\r\n dyo := dyr;\r\n end;\r\n\r\n if (akBottom in Anchors) or (akRight in Anchors) then\r\n begin\r\n SetBoundsInt(br.Left + dxo, br.Top + dyo, br.Right - br.Left + dxw, br.Bottom - br.Top + dyw);\r\n end;\r\n end;\r\n end;\r\n\r\n UpdateChildAnchoring;\r\nend;\r\n\r\nprocedure TControl.UpdateChildAnchoring;\r\nvar\r\n i: integer;\r\nbegin\r\n for i := 0 to ControlCount - 1 do\r\n begin\r\n Controls[i].UpdateAnchoring;\r\n end;\r\nend;\r\n\r\nprocedure TControl.UpdateChildren(AControl: TControl);\r\nvar\r\n I: Integer;\r\n c: TControl;\r\nbegin\r\n if Assigned(AControl) and not (csDestroying in ComponentState) then\r\n begin\r\n if (AControl.Align <> alNone) then\r\n AControl.DoRealign;\r\n\r\n if (AControl is TCustomControl) then\r\n begin\r\n (AControl as TCustomControl).RecreateCanvas;\r\n (AControl as TCustomControl).Invalidate;\r\n end;\r\n\r\n for I := 0 to AControl.ControlCount - 1 do\r\n begin\r\n c := AControl.Controls[I];\r\n UpdateChildren(c);\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TControl.PersistinHTML;\r\nvar\r\n i: integer;\r\nbegin\r\n for i := 0 to ControlCount - 1 do\r\n Controls[i].PersistinHTML;\r\nend;\r\n\r\nprocedure TControl.InitFromHTML;\r\nvar\r\n i: integer;\r\nbegin\r\n for i := 0 to ControlCount - 1 do\r\n Controls[i].InitFromHTML;\r\nend;\r\n\r\nprocedure TControl.InitScript;\r\nbegin\r\n // script to initialize any javascript control\r\nend;\r\n\r\nprocedure TControl.PreventDefault;\r\nbegin\r\n if Assigned(ElementEvent) then\r\n ElementEvent.preventDefault;\r\nend;\r\n\r\nprocedure TControl.UpdateElement;\r\nbegin\r\n if FBlockUpdateElement or (FUpdateCount > 0) then\r\n Exit;\r\n\r\n if Assigned(ElementHandle) and (ElementHandle <> ContainerElement) and not IsUpdating then\r\n begin\r\n UpdateElementData;\r\n\r\n if not IsLinked then\r\n begin\r\n UpdateElementVisual;\r\n end;\r\n end;\r\nend;\r\n\r\n{$HINTS OFF}\r\nprocedure TControl.UpdateElementData;\r\nvar\r\n frm: TCustomForm;\r\n el: TJSHTMLElement;\r\n AToolTip, ToolTipClass, ToolTipPos: string;\r\n ToolTipPause, ToolTipHidePause: integer;\r\n tt: JSValue;\r\n isBootstrap: boolean;\r\nbegin\r\n\r\n if Assigned(ElementHandle) then\r\n begin\r\n if not (csDesigning in ComponentState) then\r\n begin\r\n if Visible then\r\n GetElementStyle.setProperty('display', '')\r\n else\r\n GetElementStyle.setProperty('display', 'none');\r\n end;\r\n\r\n EnableTab;\r\n\r\n if Assigned(FContainer) then\r\n begin\r\n if IsEnabled then\r\n FContainer.removeAttribute('disabled')\r\n else\r\n FContainer.setAttribute('disabled','');\r\n end;\r\n\r\n if IsLinked and (Hint = '') then\r\n Exit;\r\n\r\n if Assigned(FContainer) and (Role <> '') then\r\n FContainer['role'] := FRole;\r\n\r\n frm := GetParentForm(Self);\r\n\r\n isBootstrap := Assigned(frm) and (frm.CSSLibrary = cssBootstrap);\r\n if isBootstrap and ShowHint and (Hint <> '') then\r\n begin\r\n el := ElementHandle;\r\n AToolTip := Hint;\r\n case Application.HintPosition of\r\n hpLeft: ToolTipPos := 'left';\r\n hpRight: ToolTipPos := 'right';\r\n hpTop: ToolTipPos := 'top';\r\n hpBottom: ToolTipPos := 'bottom';\r\n end;\r\n ToolTipClass := Application.HintClassName;\r\n ToolTipPause := Application.HintPause;\r\n ToolTipHidePause := Application.HintHidePause;\r\n tt := FToolTip;\r\n asm\r\n if (tt) { tt.dispose(); }\r\n el.setAttribute('title',AToolTip);\r\n tt = new bootstrap.Tooltip(el, {\r\n title: AToolTip,\r\n trigger: 'hover',\r\n placement: ToolTipPos,\r\n customClass: ToolTipClass,\r\n delay: { \"show\": ToolTipPause, \"hide\": ToolTipHidePause }\r\n });\r\n end;\r\n FToolTip := tt;\r\n end\r\n else\r\n begin\r\n if Assigned(FContainer) then\r\n begin\r\n if ShowHint and (Hint <> '') then\r\n begin\r\n if isBootstrap then\r\n FContainer['data-title'] := Hint\r\n else\r\n FContainer['title'] := Hint;\r\n end\r\n else\r\n begin\r\n if isBootstrap then\r\n FContainer.removeAttribute('data-title')\r\n else\r\n FContainer.removeAttribute('title');\r\n end;\r\n end;\r\n end;\r\n\r\n if not IsEnabled or (ElementFont = efCSS) then\r\n GetElementStyle.removeProperty('color')\r\n else // restore color when font color is used\r\n if UseCSSFontColor then\r\n GetElementStyle.setProperty('color',ColorToHTML(Font.Color));\r\n end;\r\nend;\r\n{$HINTS ON}\r\n\r\nprocedure TControl.UpdateElementSize;\r\nvar\r\n es: TJSCSSStyleDeclaration;\r\n offsLeft,offsTop,ow: integer;\r\n ctrl: TControl;\r\n cr: TJSDOMRect;\r\n\r\nbegin\r\n if FBlockUpdateElement or (FUpdateCount > 0) then\r\n Exit;\r\n\r\n if IsLinked then\r\n Exit;\r\n\r\n if Assigned(ElementHandle) and (ElementHandle <> ContainerElement) then\r\n begin\r\n es := GetElementStyle;\r\n\r\n offsLeft := 0;\r\n offsTop := 0;\r\n\r\n ctrl := Parent;\r\n while Assigned(ctrl) and (ElementPosition = epAbsolute) and (ctrl.ElementPosition <> epAbsolute) and not (ctrl is TCustomForm) do\r\n begin\r\n // found in the hierarchy a free floating control, so take its position in account\r\n if ctrl.IsLinked and Assigned(ctrl.ElementHandle) and (ctrl.ElementHandle.style.getPropertyValue('position') <> 'absolute') then\r\n begin\r\n cr := ctrl.ElementHandle.getBoundingClientRect;\r\n offsLeft := Round(cr.Left);\r\n offsTop := Round(cr.Top);\r\n // the relative control sits in an absolute positioned control\r\n if Assigned(ctrl.Parent) and Assigned(ctrl.Parent.ElementHandle) and (ctrl.Parent.ElementHandle.style.getPropertyValue('position') = 'absolute') then\r\n begin\r\n cr := ctrl.parent.ElementHandle.getBoundingClientRect;\r\n offsLeft := offsLeft - Round(cr.left);\r\n offsTop := offsTop - Round(cr.Top);\r\n end;\r\n\r\n break;\r\n end;\r\n ctrl := ctrl.Parent;\r\n end;\r\n\r\n if Assigned(Parent) and (Parent.IsStructuralElement) then\r\n begin\r\n offsLeft := Parent.Left;\r\n offsTop := Parent.Top;\r\n end;\r\n\r\n if (ElementPosition = epAbsolute) then\r\n begin\r\n if FTop <> -1 then\r\n es.setProperty('top', IntToStr(FTop + offsTop) + 'px')\r\n else\r\n es.setProperty('top', '');\r\n\r\n if FLeft <> -1 then\r\n es.setProperty('left', IntToStr(FLeft + offsLeft) + 'px')\r\n else\r\n es.setProperty('left', '');\r\n end\r\n else\r\n begin\r\n es.removeProperty('top');\r\n es.removeProperty('left');\r\n end;\r\n\r\n if (FWidthStyle = ssAbsolute) then\r\n begin\r\n ow := GetOuterWidth;\r\n if FWidth <> -1 then\r\n es.setProperty('width', IntToStr(ow) + 'px')\r\n else\r\n es.removeProperty('width');\r\n end;\r\n\r\n if (FWidthStyle = ssAuto) then\r\n begin\r\n es.removeProperty('width');\r\n end;\r\n\r\n if (FHeightStyle = ssAbsolute) then\r\n begin\r\n if FHeight <> -1 then\r\n es.setProperty('height', IntToStr(GetOuterHeight) + 'px')\r\n else\r\n es.removeProperty('height');\r\n end;\r\n\r\n if (FHeightStyle = ssAuto) then\r\n begin\r\n es.removeProperty('height');\r\n end;\r\n\r\n if (FWidthStyle = ssPercent) then\r\n begin\r\n if FWidth <> -1 then\r\n es.setProperty('width', FormatProp('%.2f%%',[FWidthPercent]))\r\n else\r\n es.removeProperty('width');\r\n end;\r\n\r\n if (FHeightStyle = ssPercent) then\r\n begin\r\n if FHeight <> -1 then\r\n es.setProperty('height', FormatProp('%.2f%%',[FHeightPercent]))\r\n else\r\n es.removeProperty('height');\r\n end;\r\n\r\n if FElementPosition = epAbsolute then\r\n es.setProperty('position', 'absolute')\r\n else if FElementPosition = epRelative then\r\n es.setProperty('position', 'relative')\r\n else\r\n es.removeProperty('position');\r\n\r\n es.setProperty('box-sizing','border-box');\r\n end;\r\nend;\r\n\r\nprocedure TControl.UpdateElementVisual;\r\nvar\r\n eh: TJSHTMLElement;\r\n es: TJSCSSStyleDeclaration;\r\n useCSS: boolean;\r\nbegin\r\n eh := ElementHandle;\r\n\r\n if not Assigned(eh) then\r\n Exit;\r\n\r\n if IsUpdating then\r\n Exit;\r\n\r\n es := GetElementStyle;\r\n\r\n// if (csLoading in ComponentState) then\r\n// Exit;\r\n\r\n if ParentFont and Assigned(Parent) then\r\n begin\r\n Font.OnChange := nil;\r\n Font.Assign(Parent.Font);\r\n Font.OnChange := HandleFontChanged;\r\n end;\r\n\r\n if (ElementClassName = '') then\r\n begin\r\n if not isLinked then\r\n begin\r\n if ClipChildren and (LowerCase(eh.tagName) <> cBodyTag) then\r\n es.setProperty('overflow', 'hidden')\r\n else\r\n es.setProperty('overflow', '');\r\n end;\r\n\r\n SetElementPointer(eh, Cursor);\r\n end;\r\n\r\n if Captured then\r\n TJSHTMLElement(FLayer).style.setProperty('cursor', es.getPropertyValue('cursor'));\r\n\r\n if (ElementClassName <> '') or CanShowFocus then\r\n es.setProperty('outline', '')\r\n else\r\n es.setProperty('outline', 'none');\r\n\r\n UpdateElementSize;\r\n\r\n case FTextDirection of\r\n tdDefault: es.removeProperty('direction');\r\n tdRightToLeft: es.setProperty('direction','rtl');\r\n tdLeftToRight: es.setProperty('direction','ltr');\r\n tdInherit: es.setProperty('direction','inherit');\r\n end;\r\n\r\n if (ElementClassName = '') and FNoUserSelect then\r\n begin\r\n es.setProperty('webkit-user-select', 'none');\r\n es.setProperty('moz-user-select', 'none');\r\n es.setProperty('khtml-user-select', 'none');\r\n es.setProperty('ms-user-select', 'none');\r\n es.setProperty('user-select', 'none');\r\n es.setProperty('-webkit-tap-highlight-color', 'transparent');\r\n end;\r\n\r\n SetElementColor(eh, Color);\r\n\r\n useCSS := UseCSSFont;\r\n\r\n if not isLinked then\r\n SetHTMLElementFont(eh, Font, useCSS);\r\n\r\n if not useCSS then\r\n begin\r\n if IsEnabled and UseCSSFontColor then\r\n es.setProperty('color', ColorToHtml(Font.Color));\r\n end\r\n else\r\n begin\r\n es.removeProperty('color');\r\n end;\r\nend;\r\n\r\nprocedure TControl.UpdateParent;\r\nbegin\r\n InternalUpdateParent;\r\n UpdateChildren(FPrevParent);\r\n UpdateChildren(Parent);\r\nend;\r\n\r\nprocedure TControl.UpdateSize;\r\nvar\r\n i: integer;\r\nbegin\r\n UpdateElementSize;\r\n for i := 0 to ControlCount - 1 do\r\n Controls[i].UpdateSize;\r\nend;\r\n\r\nprocedure TControl.UpdateControlSize(AWidth, AHeight: integer);\r\nbegin\r\n FWidth := AWidth;\r\n FHeight := AHeight;\r\nend;\r\n\r\nprocedure TControl.VisibleChanged;\r\nvar\r\n i: integer;\r\nbegin\r\n for i := 0 to ControlCount - 1 do\r\n begin\r\n Controls[i].VisibleChanged;\r\n end;\r\nend;\r\n\r\nfunction TControl.EnterChildren(AObject: IControl): Boolean;\r\nbegin\r\n Result := False;\r\nend;\r\n\r\nfunction TControl.ExitChildren(AObject: IControl): Boolean;\r\nbegin\r\n Result := False;\r\nend;\r\n\r\nprocedure TControl.FocusedControlEntered;\r\nvar\r\n p: TControl;\r\n c: IControl;\r\nbegin\r\n P := Parent;\r\n while p <> nil do\r\n if Supports(p, IControl, c) and c.EnterChildren(Self) then\r\n Break\r\n else\r\n p := p.Parent;\r\nend;\r\n\r\nprocedure TControl.FocusedControlExited;\r\nvar\r\n p: TControl;\r\n c: IControl;\r\nbegin\r\n p := Parent;\r\n while p <> nil do\r\n if Supports(p, IControl, c) and c.ExitChildren(Self) then\r\n Break\r\n else\r\n p := p.Parent;\r\nend;\r\n\r\nprocedure TControl.VisibleChanging;\r\nbegin\r\n\r\nend;\r\n\r\nfunction TControl.GetBoundsRect: TRect;\r\nbegin\r\n Result.Left := Left;\r\n Result.Top := Top;\r\n Result.Right := Left + Width;\r\n Result.Bottom := Top + Height;\r\nend;\r\n\r\nfunction TControl.GetControlsCount: Integer;\r\nbegin\r\n Result := Length(FControls);\r\nend;\r\n\r\nfunction TControl.GetCSSManager: TCSSCodeManager;\r\nvar\r\n frm: TCustomForm;\r\n i: integer;\r\nbegin\r\n Result := nil;\r\n\r\n frm := GetParentForm(Self);\r\n\r\n if Assigned(frm) then\r\n begin\r\n for i := 0 to frm.ComponentCount - 1 do\r\n begin\r\n if frm.Components[i] is TCSSCodeManager then\r\n begin\r\n Result := frm.Components[i] as TCSSCodeManager;\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TControl.GetDesignHeight: integer;\r\nbegin\r\n Result := FHeight;\r\nend;\r\n\r\nfunction TControl.GetDesignLeft: integer;\r\nbegin\r\n Result := FLeft;\r\nend;\r\n\r\nfunction TControl.GetDesignTop: integer;\r\nbegin\r\n Result := FTop;\r\nend;\r\n\r\nfunction TControl.GetDesignWidth: integer;\r\nbegin\r\n Result := FWidth;\r\nend;\r\n\r\nfunction TControl.GetContainer: TJSElement;\r\nbegin\r\n Result := FContainer;\r\nend;\r\n\r\nfunction TControl.GetControls(Index: Integer): TControl;\r\nbegin\r\n Result := FControls[Index];\r\nend;\r\n\r\nprocedure TControl.DoEnter;\r\nbegin\r\n if Assigned(OnEnter) then\r\n OnEnter(Self);\r\nend;\r\n\r\nprocedure TControl.DoExit;\r\nbegin\r\n if Assigned(OnExit) then\r\n OnExit(Self);\r\nend;\r\n\r\n{ TCustomControl }\r\n\r\nprocedure TCustomControl.CreateInitialize;\r\nbegin\r\n inherited;\r\n ControlStyle := ControlStyle + [csSetCaption];\r\n FBorderStyle := bsSingle;\r\n FBorderColor := clSilver;\r\n FPainting := false;\r\n FWidth := 100;\r\n FHeight := 25;\r\n FWidthPercent := 100;\r\n FHeightPercent := 100;\r\n FCustomBorder := false;\r\nend;\r\n\r\nprocedure TCustomControl.BindElement;\r\nbegin\r\n if (Container.TagName <> 'CANVAS') and not FControlCreated then\r\n begin\r\n FElementCanvas := TJSHTMLCanvasElement(document.createElement('CANVAS'));\r\n Container.appendChild(FElementCanvas);\r\n end;\r\nend;\r\n\r\nprocedure TCustomControl.BindEvents;\r\nbegin\r\n inherited;\r\nend;\r\n\r\nprocedure TCustomControl.CreateControl;\r\nbegin\r\n inherited;\r\n RecreateCanvas;\r\nend;\r\n\r\nfunction TCustomControl.CreateElement: TJSElement;\r\nbegin\r\n FElementCanvas := TJSHTMLCanvasElement(document.createElement('CANVAS'));\r\n if csAcceptsControls in ControlStyle then\r\n begin\r\n Result := document.createElement('SPAN');\r\n Result.appendChild(FElementCanvas);\r\n if ElementID <> '' then\r\n FElementCanvas['id'] := ElementID + '_Canvas';\r\n FElementCanvas['zindex'] := '-1';\r\n end\r\n else\r\n Result := FElementCanvas;\r\nend;\r\n\r\ndestructor TCustomControl.Destroy;\r\nbegin\r\n if Assigned(FCanvas) then\r\n FCanvas.Free;\r\n inherited;\r\nend;\r\n\r\nprocedure TCustomControl.EndUpdate;\r\nbegin\r\n inherited;\r\n if FUpdateCount = 0 then\r\n Invalidate;\r\nend;\r\n\r\nfunction TCustomControl.Focused: boolean;\r\nbegin\r\n Result := inherited Focused;\r\nend;\r\n\r\nfunction TCustomControl.GetCanvas: TCanvas;\r\nbegin\r\n if not Assigned(FCanvas) then\r\n begin\r\n if not IsLinked then\r\n CreateControl\r\n else\r\n begin\r\n if not Assigned(FElementCanvas) then\r\n FElementCanvas := TJSHTMLCanvasElement(document.getElementById(ElementID));\r\n RecreateCanvas;\r\n end;\r\n\r\n end;\r\n Result := FCanvas;\r\nend;\r\n\r\nfunction TCustomControl.GetCanvasHeightOffset: Integer;\r\nbegin\r\n Result := 0;\r\nend;\r\n\r\nfunction TCustomControl.GetCanvasWidthOffset: Integer;\r\nbegin\r\n Result := 0;\r\nend;\r\n\r\nfunction TCustomControl.GetContext: TJSCanvasRenderingContext2D;\r\nvar\r\n ctx: TJSCanvasRenderingContext2D;\r\nbegin\r\n {$IFDEF PAS2JS}\r\n asm\r\n ctx = this.FElementCanvas.getContext(\"2d\");\r\n end;\r\n {$ENDIF}\r\n\r\n Result := ctx;\r\nend;\r\n\r\nfunction TCustomControl.GetPixelRatio: Single;\r\nvar\r\n res: single;\r\nbegin\r\n {$IFDEF PAS2JS}\r\n asm\r\n var ctx = document.createElement(\"canvas\").getContext(\"2d\"),\r\n dpr = window.devicePixelRatio || 1,\r\n bsr = ctx.webkitBackingStorePixelRatio ||\r\n ctx.mozBackingStorePixelRatio ||\r\n ctx.msBackingStorePixelRatio ||\r\n ctx.oBackingStorePixelRatio ||\r\n ctx.backingStorePixelRatio || 1;\r\n res = dpr / bsr\r\n end;\r\n {$ENDIF}\r\n\r\n Result := res;\r\nend;\r\n\r\nprocedure TCustomControl.Invalidate;\r\nvar\r\n px: Single;\r\n frm: TCustomForm;\r\nbegin\r\n inherited;\r\n\r\n if (Parent = nil) or (csDestroying in ComponentState) then\r\n Exit;\r\n\r\n if not Visible then\r\n Exit;\r\n\r\n if FUpdateCount > 0 then\r\n Exit;\r\n\r\n frm := GetParentForm(Self);\r\n if Assigned(frm) then\r\n if frm.IsUpdating then\r\n Exit;\r\n\r\n px := GetPixelRatio;\r\n if (px <> FPixelRatio) then\r\n RecreateCanvas;\r\n\r\n FPixelRatio := GetPixelRatio;\r\n\r\n FPainting := true;\r\n\r\n if Assigned(FCanvas) then\r\n FCanvas.Clear;\r\n\r\n Paint;\r\n FPainting := false;\r\nend;\r\n\r\nprocedure TCustomControl.Loaded;\r\nbegin\r\n inherited;\r\n Invalidate;\r\nend;\r\n\r\nfunction TCustomControl.MakeScreenShot: TBitmap;\r\nbegin\r\n Result := TBitmap.Create;\r\n Result.OnChange := HandleScreenshot;\r\n Result.LoadFromCanvas(Canvas);\r\nend;\r\n\r\nprocedure TCustomControl.HandleScreenShot(Sender: TObject);\r\nbegin\r\n if Assigned(OnScreenshot) then\r\n OnScreenshot(Self, TBitmap(Sender));\r\nend;\r\n\r\nprocedure TCustomControl.Paint;\r\nbegin\r\n \r\nend;\r\n\r\nprocedure TCustomControl.RecreateCanvas;\r\nvar\r\n px: Single;\r\n el: TJSHTMLCanvasElement;\r\n h, w: Integer;\r\nbegin\r\n if Assigned(FElementCanvas) then\r\n begin\r\n if not FPainting then\r\n begin\r\n if IsLinked then\r\n begin\r\n el := TJSHTMLCanvasElement(ElementHandle);\r\n end\r\n else\r\n el := TJSHTMLCanvasElement(document.getElementByID(GetID+'_Canvas'));\r\n\r\n // it is already found\r\n if Assigned(el) then\r\n begin\r\n FElementCanvas := el;\r\n FCanvas.Free;\r\n FCanvas := nil;\r\n end;\r\n\r\n px := GetPixelRatio;\r\n h := Height - GetCanvasHeightOffset;\r\n w := Width - GetCanvasWidthOffset;\r\n\r\n if ElementPosition = epRelative then\r\n FElementCanvas.style.setProperty('position', 'relative')\r\n else\r\n FElementCanvas.style.setProperty('position', 'absolute');\r\n\r\n FElementCanvas.style.setProperty('height', IntToStr(h) + 'px');\r\n FElementCanvas.style.setProperty('width', IntToStr(w) + 'px');\r\n FElementCanvas.height := Round(h * px);\r\n FElementCanvas.width := Round(w * px);\r\n end;\r\n\r\n if not Assigned(FCanvas) then\r\n begin\r\n FCanvas := TCanvas.Create(FElementCanvas);\r\n end;\r\n\r\n FCanvas.ApplyPixelRatio := True;\r\n FCanvas.SetTransform(1, 0, 0, 1, 0, 0);\r\n end;\r\nend;\r\n\r\nprocedure TCustomControl.RenderDesigning(ACaption: string; AElement: TJSElement;\r\n AControl: TCustomControl; ADisplay: Boolean; AImage: string);\r\nvar\r\n LContainer, LLabel, LDiv: TJSHTMLElement;\r\n LHasLabel: boolean;\r\nbegin\r\n LContainer := TJSHTMLElement(AElement);\r\n LLabel := TJSHTMLElement(LContainer.firstChild);\r\n LHasLabel := Assigned(LLabel) and (LLabel.tagName = 'DIV') and (LLabel.getAttribute('data-design') = '1');\r\n\r\n if (csDesigning in AControl.ComponentState) and (ADisplay) and (ElementClassName = '') then\r\n begin\r\n LContainer.style.setProperty('border','1px solid gray');\r\n\r\n if AImage = '' then\r\n LContainer.style.setProperty('background-color','#F0F0F0')\r\n else\r\n LContainer.style.setProperty('background-color','white');\r\n\r\n if LHasLabel then\r\n Exit;\r\n\r\n LContainer.innerHTML := '';\r\n\r\n if AImage <> '' then\r\n begin\r\n LDiv := TJSHTMLElement(document.createElement('DIV'));\r\n LDiv.style.setProperty('background-color','white');\r\n LDiv.style.setProperty('background-repeat','no-repeat');\r\n LDiv.style.setProperty('background-position-y','center');\r\n LDiv.style.setProperty('background-image', 'url('+AImage+')');\r\n LDiv.style.setProperty('background-position-x','center');\r\n LDiv.style.setProperty('background-size','128px');\r\n LDiv.style.setProperty('top','50%');\r\n LDiv.style.setProperty('left','50%');\r\n LDiv.style.setProperty('height','70%');\r\n LContainer.appendChild(LDiv);\r\n end;\r\n\r\n LLabel := TJSHTMLElement(document.createElement('DIV'));\r\n LLabel.setAttribute('data-design','1');\r\n LLabel.innerHTML := ACaption;\r\n LLabel.style.setProperty('position','relative');\r\n LLabel.style.setProperty('top','50%');\r\n LLabel.style.setProperty('left','50%');\r\n LLabel.style.setProperty('display','inline-block');\r\n LLabel.style.setProperty('transform','translateX(-50%)');\r\n\r\n CustomBorder := True;\r\n LContainer.appendChild(LLabel);\r\n end\r\n else\r\n begin\r\n if LHasLabel then\r\n begin\r\n while Assigned(LContainer.firstChild) do\r\n LContainer.removeChild(LContainer.firstChild);\r\n\r\n LContainer.style.removeProperty('border');\r\n LContainer.style.removeProperty('background-color');\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TCustomControl.Resize;\r\nbegin\r\n inherited;\r\n Invalidate;\r\nend;\r\n\r\nprocedure TCustomControl.SetBorderColor(const AValue: TColor);\r\nbegin\r\n if (FBorderColor <> AValue) then\r\n begin\r\n FBorderColor := AValue;\r\n UpdateElement;\r\n end;\r\nend;\r\n\r\nprocedure TCustomControl.SetBorderStyle(const AValue: TBorderStyle);\r\nbegin\r\n if FBorderStyle <> AValue then\r\n begin\r\n FBorderStyle := AValue;\r\n UpdateElement;\r\n end;\r\nend;\r\n\r\nprocedure TCustomControl.SetCaption(const AValue: string);\r\nbegin\r\n FCaption := AValue;\r\n ControlStyle := ControlStyle - [csSetCaption];\r\nend;\r\n\r\nprocedure TCustomControl.SetFocus;\r\nbegin\r\n inherited;\r\nend;\r\n\r\nprocedure TCustomControl.SetName(const NewName: TComponentName);\r\nvar\r\n cs: TControlStyle;\r\n ownername: string;\r\nbegin\r\n ownername := '';\r\n\r\n if not (Assigned(VSIDE) and (csDesigning in ComponentState)) then\r\n begin\r\n if (Self is TFrame) then\r\n begin\r\n ownername := 'F' + FindUniqueName(Name) + '_';\r\n end;\r\n end;\r\n\r\n inherited SetName(ownername + NewName);\r\n\r\n if (csSetCaption in ControlStyle) and (csDesigning in ComponentState) and not (csLoading in ComponentState) then\r\n begin\r\n if Assigned(Owner) and (csLoading in Owner.ComponentState) then\r\n Exit;\r\n\r\n cs := ControlStyle;\r\n SetCaption(NewName);\r\n ControlStyle := cs;\r\n end;\r\nend;\r\n\r\nprocedure TCustomControl.UpdateElementVisual;\r\nbegin\r\n inherited;\r\n\r\n if Assigned(ElementHandle) then\r\n begin\r\n if not IsLinked and (ElementClassName = '') then\r\n begin\r\n if BorderStyle = bsSingle then // default border style\r\n begin\r\n if CustomBorder then\r\n begin\r\n GetElementStyle.setProperty('border-style', 'solid');\r\n GetElementStyle.setProperty('border-width', '1px');\r\n GetElementStyle.setProperty('border-color', ColorToHTML(BorderColor));\r\n end\r\n else\r\n GetElementStyle.setProperty('border-style', '')\r\n end\r\n else\r\n begin\r\n GetElementStyle.setProperty('border-style', 'none');\r\n end;\r\n end;\r\n\r\n if (ElementClassName <> '') then\r\n begin\r\n GetElementStyle.removeProperty('border-style');\r\n GetElementStyle.removeProperty('border-width');\r\n GetElementStyle.removeProperty('border-color');\r\n end;\r\n end;\r\nend;\r\n\r\n{ TScrollingGraphicControl }\r\n\r\nprocedure TScrollingGraphicControl.UpdateElement;\r\nbegin\r\n inherited;\r\n if Assigned(ElementHandle) then\r\n ElementHandle.style.setProperty('overflow', 'auto');\r\nend;\r\n\r\n\r\nfunction TScrollingGraphicControl.CreateElement: TJSElement;\r\nbegin\r\n Result := document.createElement('DIV');\r\nend;\r\n\r\n{ TMargins }\r\n\r\nprocedure TMargins.Assign(Source: TPersistent);\r\nbegin\r\n if Source is TMargins then\r\n begin\r\n FLeft := (Source as TMargins).Left;\r\n FTop := (Source as TMargins).Top;\r\n FBottom := (Source as TMargins).Bottom;\r\n FRight := (Source as TMargins).Right;\r\n end\r\n else\r\n inherited;\r\nend;\r\n\r\nconstructor TMargins.Create;\r\nbegin\r\n FLeft := 3;\r\n FTop := 3;\r\n FBottom := 3;\r\n FRight := 3;\r\nend;\r\n\r\n{ TCenter }\r\n\r\nprocedure TCenter.Assign(Source: TPersistent);\r\nbegin\r\n if (Source is TCenter) then\r\n begin\r\n FHorizontal := (Source as TCenter).Horizontal;\r\n FVertical := (Source as TCenter).Vertical;\r\n end;\r\nend;\r\n\r\nprocedure TCenter.SetHorizontal(const Value: boolean);\r\nbegin\r\n if (FHorizontal <> Value) then\r\n begin\r\n FHorizontal := Value;\r\n DoChange;\r\n end;\r\nend;\r\n\r\nprocedure TCenter.SetVertical(const Value: boolean);\r\nbegin\r\n if (FVertical <> Value) then\r\n begin\r\n FVertical := Value;\r\n DoChange;\r\n end;\r\nend;\r\n\r\nprocedure TCenter.DoChange;\r\nbegin\r\n if Assigned(OnChange) then\r\n OnChange(Self);\r\nend;\r\n\r\n{ TControlManager }\r\n\r\nconstructor TControlManager.Create(AOwner: TComponent);\r\nbegin\r\n inherited;\r\n FInstanceCount := 0;\r\nend;\r\n\r\nfunction TControlManager.GetInstanceNumber: integer;\r\nbegin\r\n Inc(FInstanceCount);\r\n Result := FInstanceCount;\r\nend;\r\n\r\nprocedure TControlManager.Reset;\r\nbegin\r\n FInstanceCount := 0;\r\nend;\r\n\r\n{ TCSSCodeFragment }\r\n\r\nconstructor TCSSCodeFragment.Create(Collection: TCollection);\r\nbegin\r\n inherited;\r\n FCSS := TStringList.Create;\r\nend;\r\n\r\ndestructor TCSSCodeFragment.Destroy;\r\nbegin\r\n FCSS.Free;\r\n inherited;\r\nend;\r\n\r\nprocedure TCSSCodeFragment.SetCSS(const Value: TStringList);\r\nbegin\r\n FCSS.Assign(Value);\r\nend;\r\n\r\n{ TCSSCodeFragments }\r\n\r\nfunction TCSSCodeFragments.Add: TCSSCodeFragment;\r\nbegin\r\n Result := TCSSCodeFragment(inherited Add);\r\nend;\r\n\r\nconstructor TCSSCodeFragments.Create(AOwner: TComponent);\r\nbegin\r\n inherited Create(AOwner, TCSSCodeFragment);\r\nend;\r\n\r\nfunction TCSSCodeFragments.GetItemEx(Index: integer): TCSSCodeFragment;\r\nbegin\r\n Result := TCSSCodeFragment(inherited Items[Index]);\r\nend;\r\n\r\nfunction TCSSCodeFragments.Insert(Index: integer): TCSSCodeFragment;\r\nbegin\r\n Result := TCSSCodeFragment(inherited Insert(Index));\r\nend;\r\n\r\nprocedure TCSSCodeFragments.SetItemEx(Index: integer;\r\n const Value: TCSSCodeFragment);\r\nbegin\r\n inherited Items[Index] := Value;\r\nend;\r\n\r\n{ TCSSCodeManager }\r\n\r\nconstructor TCSSCodeManager.Create(AOwner: TComponent);\r\nbegin\r\n inherited;\r\n FCSSFragments := TCSSCodeFragments.Create(Self);\r\n FCSSFragments.PropName := 'CSSFragments';\r\nend;\r\n\r\ndestructor TCSSCodeManager.Destroy;\r\nbegin\r\n FCSSFragments.Free;\r\n inherited;\r\nend;\r\n\r\nfunction TCSSCodeManager.GetClassCSS(AClassname: string): string;\r\nvar\r\n CSSCodeFragment: TCSSCodeFragment;\r\nbegin\r\n Result := '';\r\n\r\n CSSCodeFragment := GetClassFragment(AClassName);\r\n\r\n if Assigned(CSSCodeFragment) then\r\n Result := CSSCodeFragment.CSS.Text;\r\nend;\r\n\r\nfunction TCSSCodeManager.GetClassFragment(AClassname: string): TCSSCodeFragment;\r\nvar\r\n i: integer;\r\nbegin\r\n Result := nil;\r\n for i := 0 to CSSFragments.Count - 1 do\r\n begin\r\n if CSSFragments.Items[i].ControlClassName = AClassname then\r\n Result := CSSFragments.Items[i];\r\n end;\r\nend;\r\n\r\nprocedure TCSSCodeManager.SetCSSFragments(const Value: TCSSCodeFragments);\r\nbegin\r\n FCSSFragments.Assign(Value);\r\nend;\r\n\r\n{ TjQueryCustomContol }\r\n\r\nfunction TjQueryCustomControl.CreateElement: TJSElement;\r\nbegin\r\n Result := document.createElement('DIV');\r\nend;\r\n\r\nprocedure TjQueryCustomControl.CreateInitialize;\r\nbegin\r\n inherited;\r\n FIsInitialized := false;\r\nend;\r\n\r\nfunction TjQueryCustomControl.GetJQID: string;\r\nbegin\r\n Result := '#' + GetID;\r\nend;\r\n\r\nprocedure TjQueryCustomControl.InitJQuery;\r\nbegin\r\n //\r\nend;\r\n\r\nprocedure TjQueryCustomControl.InitJQueryOnce;\r\nbegin\r\n if IsUpdating then\r\n Exit;\r\n\r\n if FIsInitialized then\r\n Exit;\r\n\r\n FIsInitialized := true;\r\n InitJQuery;\r\nend;\r\n\r\nprocedure TjQueryCustomControl.Loaded;\r\nbegin\r\n inherited;\r\n InitJQueryOnce;\r\nend;\r\n\r\nprocedure TjQueryCustomControl.SetParent(AValue: TControl);\r\nbegin\r\n inherited;\r\n InitJQueryOnce;\r\nend;\r\n\r\n{ TPadding }\r\n\r\nprocedure TPadding.Assign(Source: TPersistent);\r\nbegin\r\n if (Source is TPadding) then\r\n begin\r\n FLeft := (Source as TPadding).Left;\r\n FRight := (Source as TPadding).Right;\r\n FTop := (Source as TPadding).Top;\r\n FBottom := (Source as TPadding).Bottom;\r\n end;\r\nend;\r\n\r\nconstructor TPadding.Create;\r\nbegin\r\n inherited;\r\n FLeft := 0;\r\n FTop := 0;\r\n FRight := 0;\r\n FBottom := 0;\r\nend;\r\n\r\nprocedure TPadding.DoChange;\r\nbegin\r\n if Assigned(OnChange) then\r\n OnChange(Self);\r\nend;\r\n\r\nprocedure TPadding.SetBottom(const Value: integer);\r\nbegin\r\n if (FBottom <> Value) then\r\n begin\r\n FBottom := Value;\r\n DoChange;\r\n end;\r\nend;\r\n\r\nprocedure TPadding.SetLeft(const Value: integer);\r\nbegin\r\n if (FLeft <> Value) then\r\n begin\r\n FLeft := Value;\r\n DoChange;\r\n end;\r\nend;\r\n\r\nprocedure TPadding.SetRight(const Value: integer);\r\nbegin\r\n if (FRight <> Value) then\r\n begin\r\n FRight := Value;\r\n DoChange;\r\n end;\r\nend;\r\n\r\nprocedure TPadding.SetTop(const Value: integer);\r\nbegin\r\n if (FTop <> Value) then\r\n begin\r\n FTop := Value;\r\n DoChange;\r\n end;\r\nend;\r\n\r\n{ TCustomHTMLDiv }\r\n\r\nfunction TCustomHTMLDiv.CreateElement: TJSElement;\r\nbegin\r\n Result := document.createElement('DIV');\r\nend;\r\n\r\n{ TControlScrollBar }\r\n\r\nconstructor TControlScrollBar.Create(AControl: TControl; AKind: TScrollBarKind);\r\nbegin\r\n inherited;\r\n FControl := AControl;\r\n FKind := AKind;\r\nend;\r\n\r\nfunction TControlScrollBar.IsScrollBarVisible: boolean;\r\nbegin\r\n Result := false;\r\n\r\n if Assigned(FControl.ELementHandle) then\r\n begin\r\n if Kind = sbVertical then\r\n Result := TJSHTMLElement(FControl.ElementHandle).ScrollHeight > TJSHTMLElement(FControl.ElementHandle).ClientHeight\r\n else\r\n Result := TJSHTMLElement(FControl.ElementHandle).ScrollWidth > TJSHTMLElement(FControl.ElementHandle).ClientWidth;\r\n end;\r\nend;\r\n\r\nfunction TControlScrollBar.Range: integer;\r\nbegin\r\n Result := 0;\r\n if Assigned(FControl.ELementHandle) then\r\n begin\r\n if Kind = sbVertical then\r\n Result := TJSHTMLElement(FControl.ElementHandle).ScrollHeight\r\n else\r\n Result := TJSHTMLElement(FControl.ElementHandle).ScrollWidth;\r\n end;\r\nend;\r\n\r\nfunction TControlScrollBar.ScrollPos: integer;\r\nbegin\r\n Result := 0;\r\n if Assigned(FControl.ELementHandle) then\r\n begin\r\n if Kind = sbVertical then\r\n Result := FControl.ElementHandle.scrollTop\r\n else\r\n Result := FControl.ElementHandle.scrollLeft;\r\n end;\r\nend;\r\n\r\nprocedure TStringListHelper.LoadFromJSONArray(ja: string);\r\nvar\r\n jsa: TJSArray;\r\n i: integer;\r\nbegin\r\n asm\r\n jsa = JSON.parse(ja);\r\n end;\r\n for i := 0 to jsa.length - 1 do\r\n begin\r\n Add(string(jsa[i]));\r\n end;\r\n\r\nend;\r\n\r\n{$HINTS OFF}\r\nfunction TStringListHelper.LoadFromJSONArrayURL(URL: string): TJSPromise;\r\nvar\r\n req: TJSXMLHttpRequest;\r\n\r\n procedure ResultHandler(response: string);\r\n var\r\n jsa: TJSArray;\r\n i: integer;\r\n begin\r\n asm\r\n jsa = JSON.parse(response);\r\n end;\r\n for i := 0 to jsa.length - 1 do\r\n begin\r\n Add(string(jsa[i]));\r\n end;\r\n end;\r\n\r\nbegin\r\n\r\n Result := TJSPromise.new(\r\n procedure(ASuccess, AFailed: TJSPromiseResolver)\r\n begin\r\n\r\n req := TJSXMLHttpRequest.new;\r\n req.open('GET',URL);\r\n\r\n asm\r\n req.onload = function() {\r\n if (req.status != 200) {\r\n AFailed(false); }\r\n else {\r\n\r\n ResultHandler(req.response);\r\n ASuccess(true);\r\n }\r\n }\r\n end;\r\n\r\n req.send();\r\n\r\n end);\r\nend;\r\n{$HINTS ON}\r\n\r\ninitialization\r\n ScrollBW := 0;\r\n ScrollBH := 0;\r\n DragObject := nil;\r\n ControlManager := TControlManager.Create(nil);\r\n\r\nend.\r\n","{********************************************************************}\r\n{ }\r\n{ written by TMS Software }\r\n{ copyright (c) 2018 - 2024 }\r\n{ Email : info@tmssoftware.com }\r\n{ Web : http://www.tmssoftware.com }\r\n{ }\r\n{ The source code is given as is. The author is not responsible }\r\n{ for any possible damage done due to the use of this code. }\r\n{ The complete source code remains property of the author and may }\r\n{ not be distributed, published, given or sold in any form as such. }\r\n{ No parts of the source code can be included in any other component }\r\n{ or application without written authorization of the author. }\r\n{********************************************************************}\r\n\r\nunit WEBLib.Graphics;\r\n\r\n{$modeswitch externalclass}\r\n\r\ninterface\r\n\r\nuses\r\n Classes, Types, UITypes, Web, JS;\r\n\r\nconst\r\n WEBDEFAULTFONT = 'Arial';\r\n SysDefault = $20000000;\r\n\r\n clNone = -1;\r\n clBlack = $000000;\r\n clMaroon = $000080;\r\n clGreen = $008000;\r\n clOlive = $008080;\r\n clNavy = $800000;\r\n clPurple = $800080;\r\n clTeal = $808000;\r\n clGray = $808080;\r\n clSilver = $C0C0C0;\r\n clRed = $0000FF;\r\n clLime = $00FF00;\r\n clYellow = $00FFFF;\r\n clBlue = $FF0000;\r\n clFuchsia = $FF00FF;\r\n clAqua = $FFFF00;\r\n clLtGray = $C1C1C1;\r\n clDkGray = $818181;\r\n clWhite = $FFFFFF;\r\n clMoneyGreen = $C0DCC0;\r\n clSkyBlue = $F0CAA6;\r\n clCream = $F0FBFF;\r\n clMedGray = $A0A0A0;\r\n\r\n clDefault = SysDefault;\r\n clBtnFace = $F0F0F0;\r\n clWindowText = $010101;\r\n clWindow = $FEFEFE;\r\n clHighlight = $D77800;\r\n clHighlightText = $030303;\r\n clInfoText = $020202;\r\n clInfoBk = $E1FFFF;\r\n clActiveCaption = $D1B499;\r\n clInactiveCaption = $DBCDBF;\r\n clInactiveCaptionText = $000000;\r\n clHotLight = $CC6600;\r\n\r\n clScrollBar = $C8C8C8;\r\n clBackground = clBtnFace;\r\n clMenu = clBtnFace;\r\n clWindowFrame = $646464;\r\n clMenuText = clBlack;\r\n clCaptionText = clWhite;\r\n clActiveBorder = $B4B4B4;\r\n clAppWorkSpace = $ABABAB;\r\n clBtnShadow = $A0A0A0;\r\n clGrayText = $6D6D6D;\r\n clBtnText = clBlack;\r\n clBtnHighlight = clWhite;\r\n cl3DDkShadow = $696969;\r\n cl3DLight = $E3E3E3;\r\n clMenuHighlight = $D77800;\r\n clMenuBar = $F0F0F0;\r\n\r\n\r\n clWebAliceblue = $FFF8F0;\r\n clWebAntiquewhite = $D7EBFA;\r\n clWebAqua = $FFFF00;\r\n clWebAquamarine = $D4FF7F;\r\n clWebAzure = $FFFFF0;\r\n clWebBeige = $DCF5F5;\r\n clWebBisque = $C4E4FF;\r\n clWebBlack = $000000;\r\n clWebBlanchedalmond = $CDEBFF;\r\n clWebBlue = $FF0000;\r\n clWebBlueviolet = $E22B8A;\r\n clWebBrown = $2A2AA5;\r\n clWebBurlywood = $87B8DE;\r\n clWebCadetblue = $A09E5F;\r\n clWebChartreuse = $00FF7F;\r\n clWebChocolate = $1E69D2;\r\n clWebCoral = $507FFF;\r\n clWebCornflowerblue = $ED9564;\r\n clWebCornsilk = $DCF8FF;\r\n clWebCrimson = $3C14DC;\r\n clWebCyan = $FFFF00;\r\n clWebDarkblue = $8B0000;\r\n clWebDarkcyan = $8B8B00;\r\n clWebDarkgoldenrod = $0B86B8;\r\n clWebDarkgray = $A9A9A9;\r\n clWebDarkgreen = $006400;\r\n clWebDarkgrey = $A9A9A9;\r\n clWebDarkkhaki = $6BB7BD;\r\n clWebDarkmagenta = $8B008B;\r\n clWebDarkolivegreen = $2F6B55;\r\n clWebDarkorange = $008CFF;\r\n clWebDarkorchid = $CC3299;\r\n clWebDarkred = $00008B;\r\n clWebDarksalmon = $7A96E9;\r\n clWebDarkseagreen = $8FBC8F;\r\n clWebDarkslateblue = $8B3D48;\r\n clWebDarkslategray = $4F4F2F;\r\n clWebDarkslategrey = $4F4F2F;\r\n clWebDarkturquoise = $D1CE00;\r\n clWebDarkviolet = $D30094;\r\n clWebDeeppink = $9314FF;\r\n clWebDeepskyblue = $FFBF00;\r\n clWebDimgray = $696969;\r\n clWebDimgrey = $696969;\r\n clWebDodgerblue = $FF901E;\r\n clWebFirebrick = $2222B2;\r\n clWebFloralwhite = $F0FAFF;\r\n clWebForestgreen = $228B22;\r\n clWebFuchsia = $FF00FF;\r\n clWebGainsboro = $DCDCDC;\r\n clWebGhostwhite = $FFF8F8;\r\n clWebGold = $00D7FF;\r\n clWebGoldenrod = $20A5DA;\r\n clWebGray = $808080;\r\n clWebGreen = $008000;\r\n clWebGreenyellow = $2FFFAD;\r\n clWebGrey = $808080;\r\n clWebHoneydew = $F0FFF0;\r\n clWebHotpink = $B469FF;\r\n clWebIndianred = $5C5CCD;\r\n clWebIndigo = $82004B;\r\n clWebIvory = $F0FFFF;\r\n clWebKhaki = $8CE6F0;\r\n clWebLavender = $FAE6E6;\r\n clWebLavenderblush = $F5F0FF;\r\n clWebLawngreen = $00FC7C;\r\n clWebLemonchiffon = $CDFAFF;\r\n clWebLightblue = $E6D8AD;\r\n clWebLightcoral = $8080F0;\r\n clWebLightcyan = $FFFFE0;\r\n clWebLightgoldenrodyellow = $D2FAFA;\r\n clWebLightgray = $D3D3D3;\r\n clWebLightgreen = $90EE90;\r\n clWebLightgrey = $D3D3D3;\r\n clWebLightpink = $C1B6FF;\r\n clWebLightsalmon = $7AA0FF;\r\n clWebLightseagreen = $AAB220;\r\n clWebLightskyblue = $FACE87;\r\n clWebLightslategray = $998877;\r\n clWebLightslategrey = $998877;\r\n clWebLightsteelblue = $DEC4B0;\r\n clWebLightyellow = $E0FFFF;\r\n clWebLtGray = $C0C0C0;\r\n clWebMedGray = $A4A0A0;\r\n clWebDkGray = $808080;\r\n clWebMoneyGreen = $C0DCC0;\r\n clWebLegacySkyBlue = $F0CAA6;\r\n clWebCream = $F0FBFF;\r\n clWebLime = $00FF00;\r\n clWebLimegreen = $32CD32;\r\n clWebLinen = $E6F0FA;\r\n clWebMagenta = $FF00FF;\r\n clWebMaroon = $000080;\r\n clWebMediumaquamarine = $AACD66;\r\n clWebMediumblue = $CD0000;\r\n clWebMediumorchid = $D355BA;\r\n clWebMediumpurple = $DB7093;\r\n clWebMediumseagreen = $71B33C;\r\n clWebMediumslateblue = $EE687B;\r\n clWebMediumspringgreen = $9AFA00;\r\n clWebMediumturquoise = $CCD148;\r\n clWebMediumvioletred = $8515C7;\r\n clWebMidnightblue = $701919;\r\n clWebMintcream = $FAFFF5;\r\n clWebMistyrose = $E1E4FF;\r\n clWebMoccasin = $B5E4FF;\r\n clWebNavajowhite = $ADDEFF;\r\n clWebNavy = $800000;\r\n clWebOldlace = $E6F5FD;\r\n clWebOlive = $008080;\r\n clWebOlivedrab = $238E6B;\r\n clWebOrange = $00A5FF;\r\n clWebOrangered = $0045FF;\r\n clWebOrchid = $D670DA;\r\n clWebPalegoldenrod = $AAE8EE;\r\n clWebPalegreen = $98FB98;\r\n clWebPaleturquoise = $EEEEAF;\r\n clWebPalevioletred = $9370DB;\r\n clWebPapayawhip = $D5EFFF;\r\n clWebPeachpuff = $B9DAFF;\r\n clWebPeru = $3F85CD;\r\n clWebPink = $CBC0FF;\r\n clWebPlum = $DDA0DD;\r\n clWebPowderblue = $E6E0B0;\r\n clWebPurple = $800080;\r\n clWebRed = $0000FF;\r\n clWebRosybrown = $8F8FBC;\r\n clWebRoyalblue = $E16941;\r\n clWebSaddlebrown = $13458B;\r\n clWebSalmon = $7280FA;\r\n clWebSandybrown = $60A4F4;\r\n clWebSeagreen = $578B2E;\r\n clWebSeashell = $EEF5FF;\r\n clWebSienna = $2D52A0;\r\n clWebSilver = $C0C0C0;\r\n clWebSkyblue = $EBCE87;\r\n clWebSlateblue = $CD5A6A;\r\n clWebSlategray = $908070;\r\n clWebSlategrey = $908070;\r\n clWebSnow = $FAFAFF;\r\n clWebSpringgreen = $7FFF00;\r\n clWebSteelblue = $B48246;\r\n clWebTan = $8CB4D2;\r\n clWebTeal = $808000;\r\n clWebThistle = $D8BFD8;\r\n clWebTomato = $4763FF;\r\n clWebTurquoise = $D0E040;\r\n clWebViolet = $EE82EE;\r\n clWebWheat = $B3DEF5;\r\n clWebWhite = $FFFFFF;\r\n clWebWhitesmoke = $F5F5F5;\r\n clWebYellow = $00FFFF;\r\n clWebYellowgreen = $32CD9A;\r\n\r\n clAliceblue = $FFF8F0;\r\n clAntiquewhite = $D7EBFA;\r\n clAquamarine = $D4FF7F;\r\n clAzure = $FFFFF0;\r\n clBeige = $DCF5F5;\r\n clBisque = $C4E4FF;\r\n clBlanchedalmond = $CDEBFF;\r\n clBlueviolet = $E22B8A;\r\n clBrown = $2A2AA5;\r\n clBurlywood = $87B8DE;\r\n clCadetblue = $A09E5F;\r\n clChartreuse = $00FF7F;\r\n clChocolate = $1E69D2;\r\n clCoral = $507FFF;\r\n clCornflowerblue = $ED9564;\r\n clCornsilk = $DCF8FF;\r\n clCrimson = $3C14DC;\r\n clCyan = $FFFF00;\r\n clDarkblue = $8B0000;\r\n clDarkcyan = $8B8B00;\r\n clDarkgoldenrod = $0B86B8;\r\n clDarkgray = $A9A9A9;\r\n clDarkgreen = $006400;\r\n clDarkgrey = $A9A9A9;\r\n clDarkkhaki = $6BB7BD;\r\n clDarkmagenta = $8B008B;\r\n clDarkolivegreen = $2F6B55;\r\n clDarkorange = $008CFF;\r\n clDarkorchid = $CC3299;\r\n clDarkred = $00008B;\r\n clDarksalmon = $7A96E9;\r\n clDarkseagreen = $8FBC8F;\r\n clDarkslateblue = $8B3D48;\r\n clDarkslategray = $4F4F2F;\r\n clDarkslategrey = $4F4F2F;\r\n clDarkturquoise = $D1CE00;\r\n clDarkviolet = $D30094;\r\n clDeeppink = $9314FF;\r\n clDeepskyblue = $FFBF00;\r\n clDimgray = $696969;\r\n clDimgrey = $696969;\r\n clDodgerblue = $FF901E;\r\n clFirebrick = $2222B2;\r\n clFloralwhite = $F0FAFF;\r\n clForestgreen = $228B22;\r\n clGainsboro = $DCDCDC;\r\n clGhostwhite = $FFF8F8;\r\n clGold = $00D7FF;\r\n clGoldenrod = $20A5DA;\r\n clGreenyellow = $2FFFAD;\r\n clGrey = $808080;\r\n clHoneydew = $F0FFF0;\r\n clHotpink = $B469FF;\r\n clIndianred = $5C5CCD;\r\n clIndigo = $82004B;\r\n clIvory = $F0FFFF;\r\n clKhaki = $8CE6F0;\r\n clLavender = $FAE6E6;\r\n clLavenderblush = $F5F0FF;\r\n clLawngreen = $00FC7C;\r\n clLemonchiffon = $CDFAFF;\r\n clLightblue = $E6D8AD;\r\n clLightcoral = $8080F0;\r\n clLightcyan = $FFFFE0;\r\n clLightgoldenrodyellow = $D2FAFA;\r\n clLightgray = $D3D3D3;\r\n clLightgreen = $90EE90;\r\n clLightgrey = $D3D3D3;\r\n clLightpink = $C1B6FF;\r\n clLightsalmon = $7AA0FF;\r\n clLightseagreen = $AAB220;\r\n clLightskyblue = $FACE87;\r\n clLightslategray = $998877;\r\n clLightslategrey = $998877;\r\n clLightsteelblue = $DEC4B0;\r\n clLightyellow = $E0FFFF;\r\n clLegacySkyBlue = $F0CAA6;\r\n clLimegreen = $32CD32;\r\n clLinen = $E6F0FA;\r\n clMagenta = $FF00FF;\r\n clMediumaquamarine = $AACD66;\r\n clMediumblue = $CD0000;\r\n clMediumorchid = $D355BA;\r\n clMediumpurple = $DB7093;\r\n clMediumseagreen = $71B33C;\r\n clMediumslateblue = $EE687B;\r\n clMediumspringgreen = $9AFA00;\r\n clMediumturquoise = $CCD148;\r\n clMediumvioletred = $8515C7;\r\n clMidnightblue = $701919;\r\n clMintcream = $FAFFF5;\r\n clMistyrose = $E1E4FF;\r\n clMoccasin = $B5E4FF;\r\n clNavajowhite = $ADDEFF;\r\n clOldlace = $E6F5FD;\r\n clOlivedrab = $238E6B;\r\n clOrange = $00A5FF;\r\n clOrangered = $0045FF;\r\n clOrchid = $D670DA;\r\n clPalegoldenrod = $AAE8EE;\r\n clPalegreen = $98FB98;\r\n clPaleturquoise = $EEEEAF;\r\n clPalevioletred = $9370DB;\r\n clPapayawhip = $D5EFFF;\r\n clPeachpuff = $B9DAFF;\r\n clPeru = $3F85CD;\r\n clPink = $CBC0FF;\r\n clPlum = $DDA0DD;\r\n clPowderblue = $E6E0B0;\r\n clRosybrown = $8F8FBC;\r\n clRoyalblue = $E16941;\r\n clSaddlebrown = $13458B;\r\n clSalmon = $7280FA;\r\n clSandybrown = $60A4F4;\r\n clSeagreen = $578B2E;\r\n clSeashell = $EEF5FF;\r\n clSienna = $2D52A0;\r\n clSlateblue = $CD5A6A;\r\n clSlategray = $908070;\r\n clSlategrey = $908070;\r\n clSnow = $FAFAFF;\r\n clSpringgreen = $7FFF00;\r\n clSteelblue = $B48246;\r\n clTan = $8CB4D2;\r\n clThistle = $D8BFD8;\r\n clTomato = $4763FF;\r\n clTurquoise = $D0E040;\r\n clViolet = $EE82EE;\r\n clWheat = $B3DEF5;\r\n clWhitesmoke = $F5F5F5;\r\n clYellowgreen = $32CD9A;\r\n\r\n\r\n clInactiveBorder = $FCF7F4;\r\n\r\n ANSI_CHARSET = 0;\r\n DEFAULT_CHARSET = 1;\r\n SYMBOL_CHARSET = 2;\r\n MAC_CHARSET = 77;\r\n SHIFTJIS_CHARSET = 128;\r\n HANGEUL_CHARSET = 129;\r\n JOHAB_CHARSET = 130;\r\n GB2312_CHARSET = 134;\r\n CHINESEBIG5_CHARSET = 136;\r\n GREEK_CHARSET = 161;\r\n TURKISH_CHARSET = 162;\r\n HEBREW_CHARSET = 177;\r\n ARABIC_CHARSET = 178;\r\n BALTIC_CHARSET = 186;\r\n RUSSIAN_CHARSET = 204;\r\n THAI_CHARSET = 222;\r\n EASTEUROPE_CHARSET = 238;\r\n OEM_CHARSET = 255;\r\n\r\ntype\r\n TColor = type NativeInt;\r\n\r\n TFontName = UITypes.TFontName;\r\n\r\n TVerticalAlignment = (taAlignTop, taAlignBottom, taVerticalCenter);\r\n\r\n TPenStyle = (psSolid, psDash, psDot, psDashDot, psDashDotDot, psClear,\r\n psInsideFrame, psUserStyle, psAlternate);\r\n\r\n TPenMode = (pmBlack, pmWhite, pmNop, pmNot, pmCopy, pmNotCopy,\r\n pmMergePenNot, pmMaskPenNot, pmMergeNotPen, pmMaskNotPen, pmMerge,\r\n pmNotMerge, pmMask, pmNotMask, pmXor, pmNotXor);\r\n\r\n TBrushStyle = (bsSolid, bsClear, bsHorizontal, bsVertical,\r\n bsFDiagonal, bsBDiagonal, bsCross, bsDiagCross);\r\n\r\n TBrushGradient = (bgNone, bgLinearVert, bgLinearHorz, bgRadial);\r\n\r\n TFontStyle = (fsBold, fsItalic, fsStrikeOut, fsUnderline);\r\n\r\n TFontStyles = set of TFontStyle;\r\n\r\n TFontCharset = 0..255;\r\n\r\n TTextFormats = (tfBottom, tfCalcRect, tfCenter, tfEditControl, tfEndEllipsis,\r\n tfPathEllipsis, tfExpandTabs, tfExternalLeading, tfLeft, tfModifyString,\r\n tfNoClip, tfNoPrefix, tfRight, tfRtlReading, tfSingleLine, tfTop,\r\n tfVerticalCenter, tfWordBreak, tfHidePrefix, tfNoFullWidthCharBreak,\r\n tfPrefixOnly, tfTabStop, tfWordEllipsis, tfComposited);\r\n TTextFormat = set of TTextFormats;\r\n\r\n\r\n TBinaryString = type string;\r\n\r\n TCanvasPointF = record\r\n X: Double;\r\n Y: Double;\r\n end;\r\n\r\n TCanvasRectF = record\r\n Left, Top, Right, Bottom: Double;\r\n end;\r\n\r\n TCanvasSizeF = record\r\n cx: Double;\r\n cy: Double;\r\n end;\r\n\r\n TPen = class(TPersistent)\r\n private\r\n FWidth: Integer;\r\n FColor: TColor;\r\n FStyle: TPenStyle;\r\n FMode: TPenMode;\r\n procedure SetColor(const Value: TColor);\r\n public\r\n constructor Create; reintroduce;\r\n procedure Assign(Source: TPersistent); override;\r\n published\r\n property Color: TColor read FColor write SetColor;\r\n property Mode: TPenMode read FMode write FMode default pmCopy;\r\n property Width: Integer read FWidth write FWidth default 1;\r\n property Style: TPenStyle read FStyle write FStyle default psSolid;\r\n end;\r\n\r\n TGradientColor = class(TPersistent)\r\n private\r\n FColor: TColor;\r\n FStop: single;\r\n public\r\n procedure Assign(Source: TPersistent); override;\r\n constructor Create; reintroduce;\r\n published\r\n property Stop: single read FStop write FStop;\r\n property Color: TColor read FColor write FColor default clNone;\r\n end;\r\n\r\n TBrush = class(TPersistent)\r\n private\r\n FColor: TColor;\r\n FStyle: TBrushStyle;\r\n FGradientColors: TList;\r\n FGradient: TBrushGradient;\r\n public\r\n constructor Create; reintroduce;\r\n destructor Destroy; override;\r\n procedure Assign(Source: TPersistent); override;\r\n procedure AddGradientColor(AColor: TColor; AStop: single);\r\n procedure GetGradientColor(AIndex: integer; var AColor: TColor; var AStop: single);\r\n function GradientCount: integer;\r\n procedure ClearGradient;\r\n published\r\n property Gradient: TBrushGradient read FGradient write FGradient;\r\n property Color: TColor read FColor write FColor;\r\n property Style: TBrushStyle read FStyle write FStyle;\r\n end;\r\n\r\n TFont = class(TPersistent)\r\n private\r\n FName: TFontName;\r\n FSize: Integer;\r\n FColor: TColor;\r\n FStyle: TFontStyles;\r\n FOnChange: TNotifyEvent;\r\n FHeight: Integer;\r\n FCharset: TFontCharset;\r\n FOrientation: integer;\r\n procedure SetHeight(const Value: Integer);\r\n protected\r\n procedure SetName(const AName: TFontName);\r\n procedure SetSize(const ASize: Integer);\r\n procedure SetColor(const AColor: TColor);\r\n procedure SetStyle(const AStyle: TFontStyles);\r\n procedure DoChange; virtual;\r\n public\r\n procedure Assign(Source: TPersistent); override;\r\n constructor Create; reintroduce;\r\n function ToString: string; override;\r\n property Orientation: integer read FOrientation write FOrientation;\r\n property OnChange: TNotifyEvent read FOnChange write FOnChange;\r\n published\r\n property Charset: TFontCharset read FCharset write FCharset;\r\n property Name: TFontName read FName write SetName;\r\n property Height: Integer read FHeight write SetHeight;\r\n property Style: TFontStyles read FStyle write SetStyle;\r\n property Color: TColor read FColor write SetColor;\r\n property Size: Integer read FSize write SetSize;\r\n end;\r\n\r\n TImageType = (itBase64, itBMP, itPNG, itJPEG, itGIF, itSVG);\r\n\r\n TCanvas = class;\r\n\r\n TBitmap = class;\r\n\r\n TBitmapLoadedProc = reference to procedure;\r\n\r\n TGraphic = class(TPersistent)\r\n private\r\n FAddToQueue: Boolean;\r\n FCanvasElement: TJSHTMLCanvasElement;\r\n FEmpty: Boolean;\r\n FData: string;\r\n FDataBin: TBinaryString;\r\n FCanvas: TCanvas;\r\n FOnChange: TNotifyEvent;\r\n FImage: TJSObject;\r\n FBitmap: TBitmap;\r\n FURL: string;\r\n FLoaded: TBitmapLoadedProc;\r\n FUsedCanvas: boolean;\r\n procedure SetHeight(const Value: Integer);\r\n procedure SetWidth(const Value: Integer);\r\n function GetCanvas: TCanvas;\r\n function GetData: TBinaryString;\r\n procedure SetData(const Value: TBinaryString);\r\n protected\r\n procedure DoChange;\r\n procedure SetURL(const URL: string);\r\n function GetWidth: Integer;\r\n function GetHeight: Integer;\r\n procedure RecreateCanvas;\r\n procedure DoBeginScene(Sender: TObject);\r\n procedure DoEndScene(Sender: TObject);\r\n procedure AssignEvents;\r\n procedure CreateImage;\r\n procedure LoadFromCache(AData: String; ALoaded: TBitmapLoadedProc = nil);\r\n public\r\n class function CreateFromResource(AResource: String): TGraphic; overload;\r\n class function CreateFromResource(AResource: String; AInstance: NativeUInt): TGraphic; overload;\r\n class function CreateFromURL(AURL: String): TGraphic; overload;\r\n class function CreateFromURL(AURL: String; AInstance: NativeUInt): TGraphic; overload;\r\n function Image: TJSObject;\r\n function Empty: Boolean;\r\n function GetBase64Image: string;\r\n function GetAsImage(AType: TImageType = itBase64): string;\r\n constructor Create(URL: string); overload;\r\n constructor Create(Img: TJSObject); overload;\r\n constructor Create; overload; reintroduce;\r\n property Width: Integer read GetWidth write SetWidth;\r\n property Height: Integer read GetHeight write SetHeight;\r\n procedure CaptureCanvas; virtual;\r\n procedure LoadFromCanvas(ACanvas: TCanvas); virtual;\r\n procedure SetSize(AWidth, AHeight: Integer);\r\n procedure Assign(Source: TPersistent); override;\r\n procedure LoadFromURL(AURL: string; ALoaded: TBitmapLoadedProc = nil); virtual; overload;\r\n procedure LoadFromURL(AURL: string; AHInstance: Integer; ALoaded: TBitmapLoadedProc = nil); virtual; overload;\r\n procedure LoadFromFile(AFileName: string; ALoaded: TBitmapLoadedProc = nil); virtual;\r\n procedure LoadFromResource(AResource: string); virtual; overload;\r\n procedure LoadFromResource(AResource: string; AHInstance: Integer); virtual; overload;\r\n procedure LoadFromStream(AStream: TStream);\r\n procedure SaveToStream(AStream: TStream);\r\n property Canvas: TCanvas read GetCanvas;\r\n property Bitmap: TBitmap read FBitmap;\r\n published\r\n property OnChange: TNotifyEvent read FOnChange write FOnChange;\r\n property URL: string read FURL write SetURL;\r\n property Data: TBinaryString read GetData write SetData;\r\n end;\r\n\r\n TBitmap = class(TGraphic)\r\n public\r\n procedure Assign(Source: TPersistent); override;\r\n end;\r\n\r\n TMatrix = record\r\n m11, m12, m13: Single;\r\n m21, m22, m23: Single;\r\n m31, m32, m33: Single;\r\n end;\r\n\r\n TCanvas = class(TObject)\r\n private\r\n FElementCanvas: TJSHTMLCanvasElement;\r\n FContext: TJSCanvasRenderingContext2D;\r\n FPen: TPen;\r\n FBrush: TBrush;\r\n FFont: TFont;\r\n FPathOpen: boolean;\r\n FPathX, FPathY: Double;\r\n FClipRect: TCanvasRectF;\r\n FOnEndScene: TNotifyEvent;\r\n FOnBeginScene: TNotifyEvent;\r\n FApplyPixelRatio: Boolean;\r\n procedure SetClipRect(const Value: TCanvasRectF);\r\n protected\r\n procedure GetAccuOffset(X,Y: double; var dx,dy: single);\r\n function GetPixel(X,Y: Single): TColor;\r\n procedure SetPixel(X,Y: Single; Clr: TColor);\r\n procedure ApplyStroke;\r\n procedure ApplyFill;\r\n procedure ApplyBrush(X1,Y1,X2,Y2: single);\r\n property OnBeginScene: TNotifyEvent read FOnBeginScene write FOnBeginScene;\r\n property OnEndScene: TNotifyEvent read FOnEndScene write FOnEndScene;\r\n public\r\n constructor Create(AControl: TJSHTMLCanvasElement); overload; virtual;\r\n constructor Create; overload; reintroduce;\r\n destructor Destroy; override;\r\n procedure SetTransform(m11, m12, m21, m22, dx, dy: Double);\r\n procedure Transform(m11, m12, m21, m22, dx, dy: Double);\r\n procedure Rotate(Angle: Double);\r\n procedure Translate(X, Y: Double);\r\n procedure AngleArc(X, Y: Integer; Radius: Cardinal; StartAngle, SweepAngle: Double); overload;\r\n procedure AngleArc(X, Y: Double; Radius: Double; StartAngle, SweepAngle: Double); overload;\r\n procedure CopyRect(const DestRect: TRect; Canvas: TCanvas; SourceRect: TRect);\r\n procedure MoveTo(X, Y: Integer); overload;\r\n procedure MoveTo(X, Y: Double); overload;\r\n procedure LineTo(X, Y: Integer); overload;\r\n procedure LineTo(X, Y: Double); overload;\r\n procedure Rectangle(X1, Y1, X2, Y2: Double); overload;\r\n procedure Rectangle(X1, Y1, X2, Y2: Integer); overload;\r\n procedure Rectangle(const Rect: TRect); overload;\r\n procedure Rectangle(const Rect: TCanvasRectF); overload;\r\n procedure RoundRect(X1, Y1, X2, Y2, X3, Y3: Integer); overload;\r\n procedure RoundRect(X1, Y1, X2, Y2, X3, Y3: Double); overload;\r\n procedure RoundRect(const Rect: TRect; CX, CY: Integer); overload;\r\n procedure RoundRect(const Rect: TCanvasRectF; CX, CY: Double); overload;\r\n procedure FillRect(const Rect: TRect); overload;\r\n procedure FillRect(const Rect: TCanvasRectF); overload;\r\n procedure Arc(X1, Y1, X2, Y2, X3, Y3, X4, Y4: Integer);\r\n procedure Ellipse(X1, Y1, X2, Y2: Integer); overload;\r\n procedure Ellipse(X1, Y1, X2, Y2: Double); overload;\r\n procedure Ellipse(const Rect: TRect); overload;\r\n procedure Ellipse(const Rect: TCanvasRectF); overload;\r\n procedure Polyline(const Points: array of TPoint); overload;\r\n procedure Polyline(const Points: array of TCanvasPointF); overload;\r\n procedure Polygon(const Points: array of TPoint); overload;\r\n procedure Polygon(const Points: array of TCanvasPointF); overload;\r\n procedure TextOut(X, Y: Integer; const Text: string); overload;\r\n procedure TextOut(X, Y: Double; const Text: string); overload;\r\n procedure Draw(X, Y: Integer; Graphic: TGraphic); overload;\r\n procedure Draw(X, Y: Double; Graphic: TGraphic); overload;\r\n procedure StretchDraw(Rect: TRect; Graphic: TGraphic); overload;\r\n procedure StretchDraw(Rect: TCanvasRectF; Graphic: TGraphic); overload;\r\n procedure DrawFocusRect(const Rect: TRect); overload;\r\n procedure DrawFocusRect(const Rect: TCanvasRectF); overload;\r\n procedure BeginScene;\r\n procedure EndScene;\r\n procedure PathBegin;\r\n procedure PathClose;\r\n procedure PathStroke;\r\n procedure PathFill;\r\n procedure PathMoveTo(X, Y: Integer); overload;\r\n procedure PathMoveTo(X, Y: Double); overload;\r\n procedure PathLineTo(X, Y: Integer); overload;\r\n procedure PathLineTo(X, Y: Double); overload;\r\n procedure Save;\r\n procedure Clip;\r\n procedure Restore;\r\n procedure Refresh;\r\n procedure Clear; overload;\r\n procedure Clear(AColor: TColor); overload;\r\n function TextExtent(const Text: string): TCanvasSizeF;\r\n function TextRect(ARect: TRect; const Text: String; const WordWrap: Boolean = False; const Calculate: Boolean = False; const AHorizontalAlignment: TAlignment = taLeftJustify; const AVerticalAlignment: TVerticalAlignment = taAlignTop): TRect; overload;\r\n function TextRect(ARect: TCanvasRectF; const Text: String; const WordWrap: Boolean = False; const Calculate: Boolean = False; const AHorizontalAlignment: TAlignment = taLeftJustify; const AVerticalAlignment: TVerticalAlignment = taAlignTop): TCanvasRectF; overload;\r\n function TextRect(ARect: TCanvasRectF; const Text: String; TextFormat: TTextFormat): TCanvasRectF; overload;\r\n function TextWidth(const Text: string): Double; overload;\r\n function TextHeight(const Text: string): Double; overload;\r\n function GetBase64Image: string;\r\n function GetAsImage(AType: TImageType = itBase64): string;\r\n procedure DownloadImage(AFileName: string; AType: TImageType = itPNG);\r\n property Element: TJSHTMLCanvasElement read FElementCanvas;\r\n property Pen: TPen read FPen;\r\n property Brush: TBrush read FBrush;\r\n property Font: TFont read FFont;\r\n property Pixels[X, Y: Single]: TColor read GetPixel write SetPixel;\r\n property ClipRect: TCanvasRectF read FClipRect write SetClipRect;\r\n property Context: TJSCanvasRenderingContext2D read FContext;\r\n property ApplyPixelRatio: Boolean read FApplyPixelRatio write FApplyPixelRatio default False;\r\n end;\r\n\r\n TJSCSSStyleDeclarationEx = class(TJSCSSStyleDeclaration)\r\n public\r\n filter: string;\r\n end;\r\n\r\n TJSHTMLElementEx = class(TJSHTMLElement)\r\n private\r\n FStyle: TJSCSSStyleDeclarationEx; external name 'style';\r\n public\r\n property style: TJSCSSStyleDeclarationEx read FStyle write FStyle;\r\n end;\r\n\r\n TJSCanvasRenderingContext2DEx = class(TJSCanvasRenderingContext2D)\r\n private\r\n FFilter: string; external name 'filter';\r\n public\r\n property filter: string read FFilter write FFilter;\r\n end;\r\n\r\n\r\n TURLPicture = class(TPersistent)\r\n private\r\n FOnChange: TNotifyEvent;\r\n FFilename: string;\r\n FData: TBinaryString;\r\n FOnDataChange: TNotifyEvent;\r\n FWidth: integer;\r\n FHeight: integer;\r\n procedure SetData(const Value: TBinaryString);\r\n function GetData: TBinaryString;\r\n protected\r\n procedure Changed; virtual;\r\n procedure DataChanged; virtual;\r\n public\r\n procedure LoadFromFile(AFileName: string);\r\n property Filename: string read FFilename;\r\n procedure Assign(Source: TPersistent); override;\r\n property OnDataChange: TNotifyEvent read FOnDataChange write FOnDataChange;\r\n property Width: integer read FWidth write FWidth;\r\n property Height: integer read FHeight write FHeight;\r\n published\r\n property OnChange: TNotifyEvent read FOnChange write FOnChange;\r\n property Data: TBinaryString read GetData write SetData;\r\n end;\r\n\r\n\r\n TThumbnailCreatedProc = reference to procedure(ADataURL: string);\r\n\r\nfunction ColorToRGB(Color: TColor): Longint;\r\nfunction ColorToHex(c: TColor): string;\r\nfunction ColorToHTML(c: TColor): string;\r\nfunction HTMLToColor(s: string): TColor;\r\n\r\nfunction ColorToString(Color: TColor): string;\r\nfunction StringToColor(const S: string): TColor;\r\nfunction CharsetToIdent(ACharSet: TFontCharSet): string;\r\nfunction IdentToCharset(const S: string): TFontCharSet;\r\n\r\nfunction FontSizeToHTML(sz: Double): string;\r\nfunction HTMLChar(h: string): integer;\r\nfunction HexToColor(h: string): TColor;\r\nfunction RGBToColor(argb: string): TColor;\r\nfunction FontSizeToPx(sz: Double): Double;\r\nfunction GetRValue(rgb: NativeInt): Byte;\r\nfunction GetGValue(rgb: NativeInt): Byte;\r\nfunction GetBValue(rgb: NativeInt): Byte;\r\nfunction CreateCanvasRectF(Left, Top, Right, Bottom: Double): TCanvasRectF;\r\nfunction CreateCanvasPointF(X, Y: Double): TCanvasPointF;\r\nfunction CreateCanvasSizeF(cx, cy: Double): TCanvasSizeF;\r\n\r\nfunction CanvasRectF(Left, Top, Right, Bottom: Double): TCanvasRectF;\r\nfunction CanvasPointF(X, Y: Double): TCanvasPointF;\r\nfunction CanvasSizeF(cx, cy: Double): TCanvasSizeF;\r\n\r\nfunction RGB(r, g, b: Byte): TColor;\r\nfunction RGBA(r, g, b, a: Byte): TColor;\r\nfunction CSSFont(Font: TFont): string;\r\nprocedure CreateThumbnail(ADataURL: string; AWidth, AHeight: integer; UseAspectRatio: boolean; ThumbnailReady: TThumbnailCreatedProc);\r\n\r\nimplementation\r\n\r\nuses\r\n WEBLib.Forms, WEBLib.WEBTools, Math, SysUtils, Contnrs;\r\n\r\ntype\r\n TGraphicCache = class\r\n private\r\n FImage: TJSObject;\r\n FID: string;\r\n public\r\n constructor Create(AImage: TJSObject; AID: string); reintroduce;\r\n property Image: TJSObject read FImage;\r\n property ID: string read FID;\r\n end;\r\n\r\n TGraphicCacheList = class(TObjectList)\r\n public\r\n function Find(AID: string; var FImage: TJSObject): Boolean; virtual;\r\n function Exists(AID: string): Boolean; virtual;\r\n end;\r\n\r\nvar\r\n FCache: TGraphicCacheList;\r\n FQueue: TStringList;\r\n FCacheCount: Integer = 0;\r\n\r\nfunction RGB(r, g, b: Byte): TColor;\r\nbegin\r\n Result := (r or (g shl 8) or (b shl 16));\r\nend;\r\n\r\nfunction RGBA(r, g, b, a: Byte): TColor;\r\nbegin\r\n Result := (r or (g shl 8) or (b shl 16)) or (a shl 24);\r\nend;\r\n\r\nfunction MatrixIdentity: TMatrix;\r\nbegin\r\n Result.m11 := 1;\r\n Result.m12 := 0;\r\n Result.m13 := 0;\r\n Result.m21 := 0;\r\n Result.m22 := 1;\r\n Result.m23 := 0;\r\n Result.m31 := 0;\r\n Result.m32 := 0;\r\n Result.m33 := 1;\r\nend;\r\n\r\n{$HINTS OFF}\r\nfunction GetPixelRatio(ACanvas: TCanvas): Single;\r\nvar\r\n res: single;\r\n ca: TCanvas;\r\nbegin\r\n ca := ACanvas;\r\n asm\r\n var ctx = ca.FContext,\r\n dpr = window.devicePixelRatio || 1,\r\n bsr = ctx.webkitBackingStorePixelRatio ||\r\n ctx.mozBackingStorePixelRatio ||\r\n ctx.msBackingStorePixelRatio ||\r\n ctx.oBackingStorePixelRatio ||\r\n ctx.backingStorePixelRatio || 1;\r\n res = dpr / bsr\r\n end;\r\n Result := res;\r\nend;\r\n{$HINTS ON}\r\n\r\nfunction MatrixCreateScaling(const AScaleX, AScaleY: Single): TMatrix;\r\nbegin\r\n Result := MatrixIdentity;\r\n Result.m11 := AScaleX;\r\n Result.m22 := AScaleY;\r\nend;\r\n\r\nfunction MatrixMultiply(const AMatrix1, AMatrix2: TMatrix): TMatrix;\r\nbegin\r\n Result.m11 := AMatrix1.m11 * AMatrix2.m11 + AMatrix1.m12 * AMatrix2.m21 + AMatrix1.m13 * AMatrix2.m31;\r\n Result.m12 := AMatrix1.m11 * AMatrix2.m12 + AMatrix1.m12 * AMatrix2.m22 + AMatrix1.m13 * AMatrix2.m32;\r\n Result.m13 := AMatrix1.m11 * AMatrix2.m13 + AMatrix1.m12 * AMatrix2.m23 + AMatrix1.m13 * AMatrix2.m33;\r\n Result.m21 := AMatrix1.m21 * AMatrix2.m11 + AMatrix1.m22 * AMatrix2.m21 + AMatrix1.m23 * AMatrix2.m31;\r\n Result.m22 := AMatrix1.m21 * AMatrix2.m12 + AMatrix1.m22 * AMatrix2.m22 + AMatrix1.m23 * AMatrix2.m32;\r\n Result.m23 := AMatrix1.m21 * AMatrix2.m13 + AMatrix1.m22 * AMatrix2.m23 + AMatrix1.m23 * AMatrix2.m33;\r\n Result.m31 := AMatrix1.m31 * AMatrix2.m11 + AMatrix1.m32 * AMatrix2.m21 + AMatrix1.m33 * AMatrix2.m31;\r\n Result.m32 := AMatrix1.m31 * AMatrix2.m12 + AMatrix1.m32 * AMatrix2.m22 + AMatrix1.m33 * AMatrix2.m32;\r\n Result.m33 := AMatrix1.m31 * AMatrix2.m13 + AMatrix1.m32 * AMatrix2.m23 + AMatrix1.m33 * AMatrix2.m33;\r\nend;\r\n\r\nprocedure CreateThumbnail(ADataURL: string; AWidth, AHeight: integer; UseAspectRatio: boolean; ThumbnailReady: TThumbnailCreatedProc);\r\nvar\r\n LImg: TJSElement;\r\n\r\nbegin\r\n if (AWidth <=0) or (AHeight <= 0) then\r\n Exit;\r\n\r\n LImg := document.createElement('IMG');\r\n\r\n asm\r\n LImg.onload = function() {\r\n\r\n var w = LImg.width;\r\n var h = LImg.height;\r\n\r\n var neww = AWidth;\r\n var newh = AHeight;\r\n\r\n if (UseAspectRatio) {\r\n if ((w/neww) > (h/newh))\r\n {\r\n newh = h / (w/neww);\r\n }\r\n else\r\n {\r\n neww = w / (h/newh);\r\n }\r\n }\r\n var LCanvas = document.createElement('CANVAS');\r\n var ctx = LCanvas.getContext(\"2d\");\r\n ctx.drawImage(LImg, 0, 0, neww, newh);\r\n var res = LCanvas.toDataURL(\"image/png\");\r\n ThumbnailReady(res);\r\n }\r\n end;\r\n\r\n LImg['src'] := ADataURL;\r\nend;\r\n\r\nfunction CSSFont(Font: TFont): string;\r\nvar\r\n res,fs: string;\r\nbegin\r\n res := 'font-family:'+ Font.Name+';';\r\n res := res + 'font-style: normal;';\r\n\r\n if fsBold in Font.Style then\r\n res := res + 'font-weight: bold;';\r\n\r\n if fsItalic in Font.Style then\r\n res := res + 'font-style: italic;';\r\n\r\n fs := '';\r\n\r\n if fsUnderline in Font.Style then\r\n fs := fs + ' underline';\r\n\r\n if fsStrikeOut in Font.Style then\r\n fs:= fs + ' line-through';\r\n\r\n if (fs <> '') then\r\n res := res + 'text-decoration:' + fs+';';\r\n\r\n res := res + 'font-size:'+ IntToStr(Font.Size) + 'pt;';\r\n\r\n Result := res;\r\nend;\r\n\r\n\r\nfunction CreateCanvasRectF(Left, Top, Right, Bottom: Double): TCanvasRectF;\r\nbegin\r\n Result.Left := Left;\r\n Result.Top := Top;\r\n Result.Right := Right;\r\n Result.Bottom := Bottom;\r\nend;\r\n\r\nfunction CreateCanvasPointF(X, Y: Double): TCanvasPointF;\r\nbegin\r\n Result.X := X;\r\n Result.Y := Y;\r\nend;\r\n\r\nfunction CreateCanvasSizeF(cx, cy: Double): TCanvasSizeF;\r\nbegin\r\n Result.cx := cx;\r\n Result.cy := cy;\r\nend;\r\n\r\nfunction CanvasRectF(Left, Top, Right, Bottom: Double): TCanvasRectF;\r\nbegin\r\n Result := CreateCanvasRectF(Left, Top, Right, Bottom);\r\nend;\r\n\r\nfunction CanvasPointF(X, Y: Double): TCanvasPointF;\r\nbegin\r\n Result := CreateCanvasPointF(X,Y);\r\nend;\r\n\r\nfunction CanvasSizeF(cx, cy: Double): TCanvasSizeF;\r\nbegin\r\n Result := CreateCanvasSizeF(cx, cy);\r\nend;\r\n\r\n\r\nfunction GetRValue(rgb: NativeInt): Byte;\r\nbegin\r\n Result := Byte(rgb and $FF);\r\nend;\r\n\r\nfunction GetGValue(rgb: NativeInt): Byte;\r\nbegin\r\n Result := Byte((rgb shr 8) and $FF);\r\nend;\r\n\r\nfunction GetBValue(rgb: NativeInt): Byte;\r\nbegin\r\n Result := Byte((rgb shr 16) and $FF);\r\nend;\r\n\r\nfunction ColorToRGB(Color: TColor): Longint;\r\nbegin\r\n Result := Color;\r\nend;\r\n\r\nfunction ColorToHex(c: TColor): string;\r\nvar\r\n s: string;\r\nbegin\r\n asm\r\n s = c.toString(16);\r\n\r\n while (s.length < 6)\r\n {\r\n s = \"0\" + s;\r\n }\r\n end;\r\n\r\n Result := Copy(s,5,2) + Copy(s,3,2) + Copy(s,1,2);\r\nend;\r\n\r\nfunction ColorToHTML(c: TColor): string;\r\nbegin\r\n if (integer(c) = -1) then // Handle clNone to render as fully transparent color\r\n Result := '#00000000'\r\n else\r\n if c and $FF000000 <> 0 then // it contains alpha part\r\n begin\r\n Result := '#' + ColorToHex(c and $FFFFFF) + IntToHex(((c and $FF000000) shr 24) and $FF,2);\r\n end\r\n else\r\n Result := '#' + ColorToHex(c);\r\nend;\r\n\r\nfunction HTMLToColor(s: string): TColor;\r\nbegin\r\n if pos('#',s) = 1 then\r\n Delete(s,1,1);\r\n\r\n Result := HexToColor(s);\r\nend;\r\n\r\nfunction ColorToVCL(c: TColor): string;\r\nvar\r\n s: string;\r\nbegin\r\n asm\r\n s = c.toString(16);\r\n while (s.length < 6)\r\n {\r\n s = \"0\" + s;\r\n }\r\n end;\r\n Result := Copy(s,1,2) + Copy(s,3,2) + Copy(s,5,2);\r\nend;\r\n\r\n\r\nfunction ColorToString(Color: TColor): string;\r\nbegin\r\n case Color of\r\n clNone: Result := 'clNone';\r\n clBlack: Result := 'clBlack';\r\n clMaroon: Result := 'clMaroon';\r\n clGreen: Result := 'clGreen';\r\n clOlive: Result := 'clOlive';\r\n clNavy: Result := 'clNavy';\r\n clPurple: Result := 'clPurple';\r\n clTeal: Result := 'clTeal';\r\n clGray: Result := 'clGray';\r\n clSilver: Result := 'clSilver';\r\n clRed: Result := 'clRed';\r\n clLime: Result := 'clLime';\r\n clYellow: Result := 'clYellow';\r\n clBlue: Result := 'clBlue';\r\n clFuchsia: Result := 'clFuchsia';\r\n clAqua: Result := 'clAqua';\r\n clWhite: Result := 'clWhite';\r\n clLtGray: Result := 'clLtGray';\r\n clDkGray: Result := 'clDkGray';\r\n clDefault: Result := 'clDefault';\r\n clBtnFace: Result := 'clBtnFace';\r\n clWindowText: Result := 'clWindowText';\r\n clWindow: Result := 'clWindow';\r\n clHighlight: Result := 'clHighlight';\r\n clHighlightText: Result :='clHighlightText';\r\n clInfoText: Result :='clInfoText';\r\n clInfoBk: Result := 'clInfoBk';\r\n clActiveCaption: Result := 'clActiveCaption';\r\n clInactiveCaption: Result := 'clInactiveCaption';\r\n clHotLight: Result := 'clHotLight'\r\n else\r\n Result := '$' + ColorToVCL(Color);\r\n end;\r\nend;\r\n\r\nfunction StringToColor(const S: string): TColor;\r\nvar\r\n us: string;\r\n clr: integer;\r\nbegin\r\n us := Uppercase(s);\r\n if (us = 'CLNONE') then Result := clNone else\r\n if (us = 'CLBLACK') then Result := clBlack else\r\n if (us = 'CLMAROON') then Result := clMaroon else\r\n if (us = 'CLGREEN') then Result := clGreen else\r\n if (us = 'CLOLIVE') then Result := clOlive else\r\n if (us = 'CLNAVY') then Result := clNavy else\r\n if (us = 'CLPURPLE') then Result := clPurple else\r\n if (us = 'CLTEAL') then Result := clTeal else\r\n if (us = 'CLGRAY') then Result := clGray else\r\n if (us = 'CLSILVER') then Result := clSilver else\r\n if (us = 'CLRED') then Result := clRed else\r\n if (us = 'CLLIME') then Result := clLime else\r\n if (us = 'CLYELLOW') then Result := clYellow else\r\n if (us = 'CLBLUE') then Result := clBlue else\r\n if (us = 'CLFUCHSIA') then Result := clFuchsia else\r\n if (us = 'CLAQUA') then Result := clAqua else\r\n if (us = 'CLWHITE') then Result := clWhite else\r\n if (us = 'CLLTGRAY') then Result := clLtGray else\r\n if (us = 'CLDKGRAY') then Result := clDkGray else\r\n if (us = 'CLDEFAULT') then Result := clDefault else\r\n if (us = 'CLBTNFACE') then Result := clBtnFace else\r\n if (us = 'CLWINDOWTEXT') then Result := clWindowText else\r\n if (us = 'CLWINDOW') then Result := clWindow else\r\n if (us = 'CLHIGHLIGHT') then Result := clHighlight else\r\n if (us = 'CLHIGHLIGHTTEXT') then Result := clWhite else\r\n if (us = 'CLINFOTEXT') then Result := clInfoText else\r\n if (us = 'CLINFOBK') then Result := clInfoBk else\r\n if (us = 'CLACTIVECAPTION') then Result := clActiveCaption else\r\n if (us = 'CLINACTIVECAPTION') then Result := clInactiveCaption else\r\n if (us = 'CLHOTLIGHT') then Result := clHotLight else\r\n begin\r\n clr := HexToColor(us);\r\n\r\n Result := ((clr and $FF) shl 16) or (clr and $FF00) or ((clr and $FF0000) shr 16) or (clr and $FF000000);\r\n end;\r\nend;\r\n\r\n\r\nfunction RGBToColor(argb: string): TColor;\r\nvar\r\n r,g,b: string;\r\n ri,gi,bi: byte;\r\n e: integer;\r\nbegin\r\n Result := clNone;\r\n\r\n argb := Trim(argb);\r\n\r\n if pos('RGB', uppercase(argb)) > 0 then\r\n begin\r\n delete(argb,1,4);\r\n\r\n r := copy(argb,1, pos(',', argb) -1);\r\n delete(argb, 1, pos(',', argb) + 1);\r\n\r\n g := copy(argb,1, pos(',', argb) -1);\r\n delete(argb, 1, pos(',', argb) + 1);\r\n\r\n b := copy(argb,1, pos(')', argb) -1);\r\n\r\n val(r, ri, e);\r\n val(g, gi, e);\r\n val(b, bi, e);\r\n\r\n Result := RGB(ri,gi,bi);\r\n end;\r\nend;\r\n\r\nfunction HexToColor(h: string): TColor;\r\nvar\r\n s: string;\r\n i: integer;\r\nbegin\r\n s := '';\r\n for i := 1 to Length(h) do\r\n begin\r\n // accept hex chars\r\n if ((h[i] >='0') and (h[i] <= '9')) or ((h[i] >='A') and (h[i] <= 'F') or ((h[i] >='a') and (h[i] <= 'f'))) then\r\n s := s + h[i];\r\n end;\r\n\r\n if length(s) > 6 then\r\n s := '$' + Copy(s,1,2) + Copy(s,7,2) + Copy(s,5,2) + Copy(s,3,2)\r\n else if length(s) = 3 then\r\n s := '$' + Copy(s,3,1) + Copy(s,3,1) + Copy(s,2,1) + Copy(s,2,1) + Copy(s,1,1) + Copy(s,1,1)\r\n else\r\n s := '$' + Copy(s,5,2) + Copy(s,3,2) + Copy(s,1,2);\r\n\r\n Result := StrToInt64(s);\r\nend;\r\n\r\nfunction HTMLChar(h: string): integer;\r\nbegin\r\n // fmt ꯍ\r\n Delete(h,1,3);\r\n Delete(h,Length(h) - 1, 1);\r\n Result := StrToInt('0x' + h);\r\nend;\r\n\r\nfunction FontSizeToHTML(sz: Double): string;\r\nbegin\r\n Result := FloatToStr(sz)+'px';\r\n Result := StringReplace(Result, ',', '.', [rfReplaceAll]);\r\nend;\r\n\r\n\r\nfunction CharSetToIdent(ACharSet: TFontCharSet): string;\r\nbegin\r\n case ACharSet of\r\n ANSI_CHARSET: Result := 'ANSI_CHARSET';\r\n DEFAULT_CHARSET: Result := 'DEFAULT_CHARSET';\r\n SYMBOL_CHARSET: Result := 'SYMBOL_CHARSET';\r\n MAC_CHARSET: Result := 'MAC_CHARSET';\r\n SHIFTJIS_CHARSET: Result := 'SHIFTJIS_CHARSET';\r\n HANGEUL_CHARSET: Result := 'HANGEUL_CHARSET';\r\n JOHAB_CHARSET: Result := 'JOHAB_CHARSET';\r\n GB2312_CHARSET: Result := 'GB2312_CHARSET';\r\n CHINESEBIG5_CHARSET: Result := 'CHINESEBIG5_CHARSET';\r\n GREEK_CHARSET: Result := 'GREEK_CHARSET';\r\n TURKISH_CHARSET: Result := 'TURKISH_CHARSET';\r\n HEBREW_CHARSET: Result := 'HEBREW_CHARSET';\r\n ARABIC_CHARSET: Result := 'ARABIC_CHARSET';\r\n BALTIC_CHARSET: Result := 'BALTIC_CHARSET';\r\n RUSSIAN_CHARSET: Result := 'RUSSIAN_CHARSET';\r\n THAI_CHARSET: Result := 'THAI_CHARSET';\r\n EASTEUROPE_CHARSET: Result := 'EASTEUROPE_CHARSET';\r\n OEM_CHARSET: Result := 'OEM_CHARSET';\r\n end;\r\nend;\r\n\r\nfunction IdentToCharSet(const S: string): TFontCharSet;\r\nbegin\r\n if S = 'ANSI_CHARSET' then Result := ANSI_CHARSET;\r\n if S = 'DEFAULT_CHARSET' then Result := DEFAULT_CHARSET;\r\n if S = 'SYMBOL_CHARSET' then Result := SYMBOL_CHARSET;\r\n if S = 'MAC_CHARSET' then Result := MAC_CHARSET;\r\n if S = 'SHIFTJIS_CHARSET' then Result := SHIFTJIS_CHARSET;\r\n if S = 'HANGEUL_CHARSET' then Result := HANGEUL_CHARSET;\r\n if S = 'JOHAB_CHARSET' then Result := JOHAB_CHARSET;\r\n if S = 'GB2312_CHARSET' then Result := GB2312_CHARSET;\r\n if S = 'CHINESEBIG5_CHARSET' then Result := CHINESEBIG5_CHARSET;\r\n if S = 'GREEK_CHARSET' then Result := GREEK_CHARSET;\r\n if S = 'TURKISH_CHARSET' then Result := TURKISH_CHARSET;\r\n if S = 'HEBREW_CHARSET' then Result := HEBREW_CHARSET;\r\n if S = 'ARABIC_CHARSET' then Result := ARABIC_CHARSET;\r\n if S = 'BALTIC_CHARSET' then Result := BALTIC_CHARSET;\r\n if S = 'RUSSIAN_CHARSET' then Result := RUSSIAN_CHARSET;\r\n if S = 'THAI_CHARSET' then Result := THAI_CHARSET;\r\n if S = 'EASTEUROPE_CHARSET' then Result := EASTEUROPE_CHARSET;\r\n if S = 'OEM_CHARSET' then Result := OEM_CHARSET;\r\nend;\r\n\r\n{ TPen }\r\n\r\nprocedure TPen.Assign(Source: TPersistent);\r\nbegin\r\n if (Source is TPen) then\r\n begin\r\n FColor := (Source as TPen).Color;\r\n FStyle := (Source as TPen).Style;\r\n FWidth := (Source as TPen).Width;\r\n end\r\n else\r\n inherited;\r\nend;\r\n\r\nconstructor TPen.Create;\r\nbegin\r\n FColor := clBlack;\r\n FWidth := 1;\r\n FStyle := psSolid;\r\n FMode := pmCopy;\r\nend;\r\n\r\nprocedure TPen.SetColor(const Value: TColor);\r\nbegin\r\n FColor := Value;\r\nend;\r\n\r\n{ TBrush }\r\n\r\nprocedure TBrush.AddGradientColor(AColor: TColor; AStop: single);\r\nvar\r\n gr: TGradientColor;\r\nbegin\r\n gr := TGradientColor.Create;\r\n gr.Color := AColor;\r\n gr.Stop := AStop;\r\n FGradientColors.Add(gr);\r\nend;\r\n\r\nprocedure TBrush.Assign(Source: TPersistent);\r\nbegin\r\n if (Source is TBrush) then\r\n begin\r\n FColor := (Source as TBrush).Color;\r\n FStyle := (Source as TBrush).Style;\r\n end\r\n else\r\n inherited;\r\nend;\r\n\r\nfunction FontSizeToPx(sz: Double): Double;\r\nbegin\r\n Result := sz * 96 / 72;\r\nend;\r\n\r\nprocedure TBrush.ClearGradient;\r\nvar\r\n i: integer;\r\n gr: TGradientColor;\r\nbegin\r\n for i := FGradientColors.Count - 1 downto 0 do\r\n begin\r\n gr := TGradientColor(FGradientColors[i]);\r\n gr.Free;\r\n FGradientColors.Delete(i);\r\n end;\r\nend;\r\n\r\nconstructor TBrush.Create;\r\nbegin\r\n FColor := clWhite;\r\n FStyle := bsSolid;\r\n FGradient := bgNone;\r\n FGradientColors := TList.Create;\r\nend;\r\n\r\ndestructor TBrush.Destroy;\r\nbegin\r\n FGradientColors.Free;\r\n inherited;\r\nend;\r\n\r\nprocedure TBrush.GetGradientColor(AIndex: integer; var AColor: TColor;\r\n var AStop: single);\r\nbegin\r\n if AIndex < FGradientColors.Count then\r\n begin\r\n AColor := TGradientColor(FGradientColors[AIndex]).Color;\r\n AStop := TGradientColor(FGradientColors[AIndex]).Stop;\r\n end\r\n else\r\n raise Exception.Create('Invalid gradient color index');\r\nend;\r\n\r\nfunction TBrush.GradientCount: integer;\r\nbegin\r\n Result := FGradientColors.Count;\r\nend;\r\n\r\n{ TFont }\r\n\r\nprocedure TFont.Assign(Source: TPersistent);\r\nbegin\r\n if (Source is TFont) then\r\n begin\r\n FName := (Source as TFont).Name;\r\n FColor := (Source as TFont).Color;\r\n FSize := (Source as TFont).Size;\r\n FStyle := (Source as TFont).Style;\r\n DoChange;\r\n end\r\n else\r\n inherited;\r\nend;\r\n\r\nfunction TFont.ToString: string;\r\nvar\r\n s: string;\r\nbegin\r\n s := '';\r\n if (TFontStyle.fsBold in Style) and (TFontStyle.fsItalic in Style) then\r\n s := s + 'bold italic'\r\n else if TFontStyle.fsBold in Style then\r\n s := s + 'bold'\r\n else if TFontStyle.fsItalic in Style then\r\n s := s + 'italic';\r\n\r\n if Size <> 0 then\r\n Result := s + ' ' + FontSizeToHTML(FontSizeToPx(Size)) + ' ' + Name\r\n else\r\n Result := s + ' ' + FontSizeToHTML(FontSizeToPx(12)) + ' ' + Name\r\nend;\r\n\r\nprocedure TFont.SetName(const AName: TFontName);\r\nbegin\r\n if (FName <> AName) then\r\n begin\r\n FName := AName;\r\n DoChange;\r\n end;\r\nend;\r\n\r\nprocedure TFont.SetSize(const ASize: Integer);\r\nbegin\r\n if (FSize <> ASize) then\r\n begin\r\n FSize := ASize;\r\n DoChange;\r\n end;\r\nend;\r\n\r\nprocedure TFont.SetColor(const AColor: TColor);\r\nbegin\r\n if (FColor <> AColor) then\r\n begin\r\n FColor := AColor;\r\n DoChange;\r\n end;\r\nend;\r\n\r\nprocedure TFont.SetHeight(const Value: Integer);\r\nvar\r\n d: double;\r\nbegin\r\n d := -Value * 72/96;\r\n FSize := Round(d);\r\n\r\n if (FHeight <> Value) then\r\n begin\r\n FHeight := Value;\r\n DoChange;\r\n end;\r\nend;\r\n\r\nprocedure TFont.SetStyle(const AStyle: TFontStyles);\r\nbegin\r\n if (FStyle <> AStyle) then\r\n begin\r\n FStyle := AStyle;\r\n DoChange;\r\n end;\r\nend;\r\n\r\nconstructor TFont.Create;\r\nbegin\r\n inherited;\r\n FName := WEBDEFAULTFONT;\r\n FSize := 8;\r\n FHeight := -11;\r\n FStyle := [];\r\n FColor := clBlack;\r\nend;\r\n\r\nprocedure TFont.DoChange;\r\nbegin\r\n if Assigned(OnChange) then\r\n OnChange(Self);\r\nend;\r\n\r\n{ TCanvas }\r\n\r\nprocedure TCanvas.AngleArc(X, Y, Radius: Double; StartAngle,\r\n SweepAngle: Double);\r\nbegin\r\n if Assigned(FContext) then\r\n begin\r\n FContext.beginPath();\r\n ApplyStroke;\r\n FContext.arc(X, Y, Radius, StartAngle, StartAngle + SweepAngle);\r\n FContext.stroke();\r\n end;\r\nend;\r\n\r\nprocedure TCanvas.ApplyFill;\r\nbegin\r\n if Assigned(FContext) then\r\n FContext.fillStyle := ColorToHtml(Brush.Color);\r\nend;\r\n\r\nprocedure TCanvas.ApplyStroke;\r\nbegin\r\n if Assigned(FContext) then\r\n begin\r\n FContext.lineWidth := Pen.Width;\r\n FContext.strokeStyleAsColor := ColorToHtml(Pen.Color);\r\n case Pen.Style of\r\n psSolid: FContext.setlinedash([]);\r\n psDot: FContext.setlinedash([1,2]);\r\n psDash: FContext.setlinedash([8,2]);\r\n psDashDot: FContext.setlinedash([6,2,2,2]);\r\n psDashDotDot: FContext.setlinedash([6,2,2,2,2,2]);\r\n psClear: FContext.setlinedash([0, $FFFF]);\r\n end;\r\n end;\r\nend;\r\n\r\nfunction AngleOfPoints(x1,y1,x2,y2:double):double;\r\nvar\r\n part1, part2:double;\r\n angle:double;\r\nbegin\r\n if (x1=x2) and (y1=y2) then\r\n begin\r\n Result:=0.0;\r\n Exit;\r\n end;\r\n\r\n part1 := abs(y2 - y1);\r\n if (part1=0) then\r\n begin\r\n part1:=0.0000001;\r\n y1 := y1+0.0000001;\r\n end;\r\n\r\n part2 := abs(x2- x1);\r\n if (part2=0) then\r\n begin\r\n part2:=0.0000001;\r\n x1 := x1 + 0.0000001;\r\n end;\r\n\r\n angle := arctan(part1/part2);\r\n\r\n if ((x1>x2) and (y1x2) and (y1>y2)) then angle:=angle +PI;\r\n if ((x1y2)) then angle:=2*PI-angle;\r\n\r\n while angle>= 2*PI do\r\n angle := angle - 2*PI;\r\n while angle < 0 do\r\n angle := angle + 2*PI;\r\n Result := angle;\r\nend;\r\n\r\nprocedure TCanvas.Arc(X1, Y1, X2, Y2, X3, Y3, X4, Y4: Integer);\r\nvar\r\n rx,ry: integer;\r\n angleStart,angleEnd: double;\r\nbegin\r\n if Assigned(FContext) then\r\n begin\r\n rx := (X2-X1) div 2;\r\n ry := (Y2-Y1) div 2;\r\n\r\n angleStart := AngleOfPoints(X1+rx,Y1+ry,X4,Y4);\r\n angleEnd := AngleOfPoints(X1+rx,Y1+ry,X3,Y3);\r\n\r\n FContext.beginPath();\r\n ApplyStroke;\r\n FContext.ellipse(X1+rx,Y1+ry,rx,ry,0,angleStart,angleEnd);\r\n FContext.stroke();\r\n end;\r\nend;\r\n\r\nprocedure TCanvas.PathBegin;\r\nbegin\r\n if Assigned(FContext) then\r\n FContext.beginPath();\r\nend;\r\n\r\nprocedure TCanvas.BeginScene;\r\nbegin\r\n if Assigned(OnBeginScene) then\r\n OnBeginScene(Self);\r\nend;\r\n\r\nprocedure TCanvas.Clear;\r\nbegin\r\n if Assigned(FContext) and Assigned(FElementCanvas) then\r\n FContext.clearRect(0, 0, FElementCanvas.width, FElementCanvas.height);\r\nend;\r\n\r\nprocedure TCanvas.Clear(AColor: TColor);\r\nvar\r\n c: TColor;\r\n s: TBrushStyle;\r\nbegin\r\n Clear;\r\n if Assigned(FElementCanvas) then\r\n begin\r\n c := Brush.Color;\r\n s := Brush.Style;\r\n Brush.Color := AColor;\r\n Brush.Style := bsSolid;\r\n FillRect(Rect(0, 0, FElementCanvas.width, FElementCanvas.height));\r\n Brush.Color := c;\r\n Brush.Style := s;\r\n end;\r\nend;\r\n\r\nprocedure TCanvas.Clip;\r\nbegin\r\n if Assigned(FContext) then\r\n FContext.clip;\r\nend;\r\n\r\nprocedure TCanvas.CopyRect(const DestRect: TRect; Canvas: TCanvas;\r\n SourceRect: TRect);\r\nvar\r\n sw,sh: integer;\r\n dw,dh: integer;\r\n imgData: TJSImageData;\r\n ACanvas: TCanvas;\r\nbegin\r\n if Assigned(FContext) then\r\n begin\r\n sw := SourceRect.Right - SourceRect.Left;\r\n sh := SourceRect.Bottom - SourceRect.Top;\r\n\r\n dw := DestRect.Right - DestRect.Left;\r\n dh := DestRect.Bottom - DestRect.Top;\r\n\r\n imgData := FContext.getImageData(SourceRect.Left, SourceRect.Top, sw, sh);\r\n\r\n ACanvas := TCanvas.Create;\r\n try\r\n ACanvas.FElementCanvas.width := sw;\r\n ACanvas.FElementCanvas.height := sh;\r\n\r\n ACanvas.FContext.putImageData(imgData, 0,0);\r\n Canvas.FContext.drawImage(ACanvas.FElementCanvas, DestRect.Left, DestRect.Top, dw, dh);\r\n finally\r\n ACanvas.Free;\r\n end;\r\n end;\r\nend;\r\n\r\nconstructor TCanvas.Create;\r\nbegin\r\n FElementCanvas := TJSHTMLCanvasElement(document.createElement('CANVAS'));\r\n Create(FElementCanvas);\r\nend;\r\n\r\nconstructor TCanvas.Create(AControl: TJSHTMLCanvasElement);\r\nbegin\r\n FElementCanvas := AControl;\r\n\r\n //FContext := AControl.getContextAs2DContext('2d');\r\n asm\r\n if (navigator.userAgent.indexOf('Safari') !== -1 && navigator.userAgent.indexOf('Chrome') === -1) {\r\n this.FContext = AControl.getContext('2d');\r\n } else {\r\n this.FContext = AControl.getContext('2d',{ willReadFrequently: true});\r\n }\r\n end;\r\n\r\n FPen := TPen.Create;\r\n FBrush := TBrush.Create;\r\n FPathOpen := false;\r\n FFont := TFont.Create;\r\n FApplyPixelRatio := False;\r\nend;\r\n\r\nprocedure TCanvas.AngleArc(X, Y: Integer; Radius: Cardinal; StartAngle, SweepAngle: Double);\r\nbegin\r\n AngleArc(Double(X), Double(Y), Double(Radius), Double(StartAngle), Double(SweepAngle));\r\nend;\r\n\r\nprocedure TCanvas.MoveTo(X,Y: Integer);\r\nbegin\r\n MoveTo(Double(X), Double(Y));\r\nend;\r\n\r\nprocedure TCanvas.LineTo(X,Y: Integer);\r\nbegin\r\n LineTo(Double(X), Double(Y));\r\nend;\r\n\r\nprocedure TCanvas.Rectangle(const Rect: TRect);\r\nbegin\r\n Rectangle(Rect.Left, Rect.Top, Rect.Right, Rect.Bottom);\r\nend;\r\n\r\n{$HINTS OFF}\r\nprocedure TCanvas.ApplyBrush(X1, Y1, X2, Y2: Double);\r\nvar\r\n dx,dy,p: single;\r\n gr: TJSCanvasGradient;\r\n i: integer;\r\n clr: string;\r\n AColor: TColor;\r\n AStop: single;\r\nbegin\r\n GetAccuOffset(X1,Y1,dx,dy);\r\n\r\n if Brush.Style in [bsHorizontal, bsCross] then\r\n begin\r\n p := Y1 + dy;\r\n FContext.lineWidth := 1;\r\n FContext.strokeStyleAsColor := ColorToHtml(Brush.Color);\r\n while p < Y2 do\r\n begin\r\n FContext.moveTo(x1,p);\r\n FContext.lineTo(x2,p);\r\n p := p + 8;\r\n end;\r\n end;\r\n\r\n if Brush.Style in [bsVertical, bsCross] then\r\n begin\r\n p := X1 + dx;\r\n FContext.lineWidth := 1;\r\n FContext.strokeStyleAsColor := ColorToHtml(Brush.Color);\r\n while p < X2 do\r\n begin\r\n FContext.moveTo(p,y1);\r\n FContext.lineTo(p,y2);\r\n p := p + 8;\r\n end;\r\n end;\r\n\r\n if Brush.Style in [bsFDiagonal, bsDiagCross] then\r\n begin\r\n p := X1 + dx - (X2 - X1);\r\n FContext.lineWidth := 1;\r\n FContext.strokeStyleAsColor := ColorToHtml(Brush.Color);\r\n while p < X2 do\r\n begin\r\n FContext.moveTo(p,y1);\r\n FContext.lineTo(p + (y2-y1),y2);\r\n p := p + 8;\r\n end;\r\n end;\r\n\r\n if Brush.Style in [bsBDiagonal, bsDiagCross] then\r\n begin\r\n p := X1 + dx;\r\n FContext.lineWidth := 1;\r\n FContext.strokeStyleAsColor := ColorToHtml(Brush.Color);\r\n while p < X2 + (X2 - X1) do\r\n begin\r\n FContext.moveTo(p,y1);\r\n FContext.lineTo(p - (y2-y1),y2);\r\n p := p + 8;\r\n end;\r\n end;\r\n\r\n if Brush.Gradient <> bgNone then\r\n begin\r\n case Brush.Gradient of\r\n bgLinearHorz: gr := FContext.createLinearGradient(X1, Y1, X2, Y1);\r\n bgLinearVert: gr := FContext.createLinearGradient(X1, Y1, X1, Y2);\r\n bgRadial: gr := FContext.createRadialGradient(X1 + (X2-X1)/2, Y1+ (Y2 - Y1)/2, 0, X1 + (X2-X1)/2, Y1+ (Y2 - Y1)/2, (X2-X1)/2);\r\n end;\r\n\r\n clr := ColorToHtml(ColorToRGB(Brush.Color));\r\n asm\r\n gr.addColorStop(0,clr);\r\n end;\r\n\r\n for i := 0 to Brush.GradientCount - 1 do\r\n begin\r\n Brush.GetGradientColor(i, AColor, AStop);\r\n clr := ColorToHtml(ColorToRGB(AColor));\r\n asm\r\n gr.addColorStop(AStop,clr);\r\n end;\r\n end;\r\n\r\n FContext.fillStyle := gr;\r\n Exit;\r\n end;\r\n\r\n FContext.stroke();\r\nend;\r\n{$HINTS ON}\r\n\r\nprocedure TCanvas.Rectangle(X1, Y1, X2, Y2: Double);\r\nvar\r\n dx,dy: single;\r\nbegin\r\n if Assigned(FContext) then\r\n begin\r\n FContext.save;\r\n FContext.beginPath();\r\n ApplyStroke;\r\n ApplyFill;\r\n\r\n GetAccuOffset(X1,Y1,dx,dy);\r\n\r\n asm\r\n let region = new Path2D();\r\n region.rect(X1, Y1, X2- X1 + 1, Y2 - Y1 + 1);\r\n this.FContext.clip(region, \"evenodd\");\r\n end;\r\n\r\n ApplyBrush(X1,Y1,X2,Y2);\r\n\r\n if not (Brush.Style in [bsClear, bsHorizontal, bsVertical, bsCross, bsFDiagonal, bsBDiagonal, bsDiagCross]) then\r\n begin\r\n FContext.rect(X1+dx, Y1+dy, X2 - X1, Y2 - Y1);\r\n FContext.fill();\r\n end;\r\n\r\n if Pen.Style <> psClear then\r\n begin\r\n ApplyStroke;\r\n FContext.beginPath;\r\n FContext.rect(X1+dx, Y1+dy, X2 - X1, Y2 - Y1);\r\n FContext.stroke();\r\n end;\r\n\r\n FContext.restore;\r\n end;\r\nend;\r\n\r\nprocedure TCanvas.Rectangle(const Rect: TCanvasRectF);\r\nbegin\r\n Rectangle(Rect.Left, Rect.Top, Rect.Right, Rect.Bottom);\r\nend;\r\n\r\nprocedure TCanvas.Refresh;\r\nbegin\r\nend;\r\n\r\nprocedure TCanvas.Restore;\r\nbegin\r\n if Assigned(FContext) then\r\n FContext.restore();\r\nend;\r\n\r\nprocedure TCanvas.Rectangle(X1, Y1, X2, Y2: Integer);\r\nbegin\r\n Rectangle(Double(X1), Double(Y1), Double(X2), Double(Y2));\r\nend;\r\n\r\nprocedure TCanvas.FillRect(const Rect: TRect);\r\nbegin\r\n Rectangle(Rect.Left, Rect.Top, Rect.Right, Rect.Bottom);\r\nend;\r\n\r\nprocedure TCanvas.RoundRect(X1,Y1,X2,Y2,X3,Y3: Integer);\r\nbegin\r\n RoundRect(Double(X1), Double(Y1), Double(X2), Double(Y2), Double(X3), Double(Y3));\r\nend;\r\n\r\nprocedure TCanvas.RoundRect(const Rect: TRect; CX, CY: Integer);\r\nbegin\r\n RoundRect(Rect.Left, Rect.Top, Rect.Right, Rect.Bottom, CX, CY);\r\nend;\r\n\r\nprocedure TCanvas.RoundRect(X1, Y1, X2, Y2, X3, Y3: Double);\r\nvar\r\n dx,dy: single;\r\nbegin\r\n if Assigned(FContext) then\r\n begin\r\n if (x2 < x1) then\r\n Exit;\r\n if (y2 < y1) then\r\n Exit;\r\n\r\n FContext.beginPath();\r\n ApplyStroke;\r\n ApplyFill;\r\n\r\n GetAccuOffset(X1, Y1, dx, dy);\r\n\r\n FContext.moveTo(X1 + X3/2, Y1 + dy);\r\n FContext.lineTo(X2 - X3/2, Y1 + dy);\r\n FContext.ellipse(X2 - dx - X3 / 2, Y1 + dy + Y3/2, X3 / 2, Y3 / 2, 0, Pi * 1.5, 0);\r\n\r\n FContext.lineTo(X2 - dx, Y2 - Y3/2);\r\n FContext.ellipse(X2 - dx - X3 / 2, Y2 - dy - Y3/2, X3 / 2, Y3 / 2, 0, 0, Pi * 0.5);\r\n FContext.lineTo(X1 + X3/2, Y2 - dy);\r\n FContext.ellipse(X1 + dx + X3 / 2, Y2 - dy - Y3/2, X3 / 2, Y3 / 2, 0, Pi * 0.5, Pi);\r\n FContext.lineTo(X1 + dx, Y1 + Y3/2 + dy);\r\n FContext.ellipse(X1 + dx + X3 / 2, Y1 + dy + Y3/2, X3 / 2, Y3 / 2, 0, Pi, Pi * 1.5);\r\n\r\n if Brush.Style = bsSolid then\r\n FContext.fill();\r\n\r\n if Pen.Style <> psClear then\r\n FContext.stroke();\r\n\r\n FContext.save;\r\n\r\n asm\r\n let region = new Path2D();\r\n region.moveTo(X1 + X3/2, Y1 + dy);\r\n region.lineTo(X2 - X3/2, Y1 + dy);\r\n region.ellipse(X2 - dx - X3 / 2, Y1 + dy + Y3/2, X3 / 2, Y3 / 2, 0, Math.PI * 1.5, 0);\r\n region.lineTo(X2 + dx, Y2 - Y3/2 );\r\n region.ellipse(X2 - dx - X3 / 2, Y2 - dy - Y3/2, X3 / 2, Y3 / 2, 0, 0, Math.PI * 0.5);\r\n region.lineTo(X1 + X3/2, Y2 + dy);\r\n region.ellipse(X1 + dx + X3 / 2, Y2 - dy - Y3/2, X3 / 2, Y3 / 2, 0, Math.PI * 0.5, Math.PI);\r\n region.lineTo(X1 + dx, Y1 + Y3/2 + dy);\r\n region.ellipse(X1 + dx + X3 / 2, Y1 + dy + Y3/2, X3 / 2, Y3 / 2, 0, Math.PI, Math.PI * 1.5);\r\n this.FContext.clip(region, \"evenodd\");\r\n end;\r\n\r\n ApplyBrush(X1,Y1,X2,Y2);\r\n\r\n FContext.restore;\r\n end;\r\nend;\r\n\r\nprocedure TCanvas.Ellipse(X1, Y1, X2, Y2: Integer);\r\nbegin\r\n Ellipse(Double(X1), Double(Y1), Double(X2), Double(Y2));\r\nend;\r\n\r\nprocedure TCanvas.Ellipse(const Rect: TRect);\r\nbegin\r\n Ellipse(Rect.Left, Rect.Top, Rect.Right, Rect.Bottom);\r\nend;\r\n\r\nprocedure TCanvas.Polyline(const Points: array of TPoint);\r\nvar\r\n l, i: Integer;\r\nbegin\r\n if Assigned(FContext) then\r\n begin\r\n l := Length(Points);\r\n\r\n if l = 0 then\r\n Exit;\r\n\r\n FContext.beginPath();\r\n ApplyStroke;\r\n i := 0;\r\n FContext.moveTo(Points[i].X, Points[i].Y);\r\n\r\n while (i < l - 1) do\r\n begin\r\n inc(i);\r\n FContext.lineTo(Points[i].X, Points[i].Y);\r\n end;\r\n\r\n if Pen.Style <> psClear then\r\n FContext.stroke();\r\n end;\r\nend;\r\n\r\nprocedure TCanvas.Polygon(const Points: array of TPoint);\r\nvar\r\n l, i: Integer;\r\n x1,y1,x2,y2: integer;\r\n\r\nbegin\r\n if Assigned(FContext) then\r\n begin\r\n l := Length(Points);\r\n\r\n if l = 0 then\r\n Exit;\r\n\r\n FContext.beginPath();\r\n ApplyStroke;\r\n\r\n x1 := $FFFF;\r\n y1 := $FFFF;\r\n x2 := 0;\r\n y2 := 0;\r\n for i := 0 to Length(Points) - 1 do\r\n begin\r\n if Points[i].X < x1 then\r\n x1 := Points[i].X;\r\n if Points[i].Y < y1 then\r\n y1 := Points[i].Y;\r\n\r\n if Points[i].X > x2 then\r\n x2 := Points[i].X;\r\n if Points[i].Y > y2 then\r\n y2 := Points[i].Y;\r\n end;\r\n\r\n if Brush.Gradient <> bgNone then\r\n begin\r\n ApplyBrush(x1,y1,x2,y2);\r\n end\r\n else\r\n ApplyFill;\r\n\r\n i := 0;\r\n FContext.moveTo(Points[i].X, Points[i].Y);\r\n\r\n while (i < l - 1) do\r\n begin\r\n inc(i);\r\n FContext.lineTo(Points[i].X, Points[i].Y);\r\n end;\r\n\r\n FContext.closePath();\r\n\r\n if Brush.Style <> bsClear then\r\n FContext.fill();\r\n\r\n if Pen.Style <> psClear then\r\n FContext.stroke();\r\n end;\r\nend;\r\n\r\nfunction TCanvas.TextExtent(const Text: string): TCanvasSizeF;\r\nbegin\r\n Result.cx := TextWidth(Text);\r\n Result.cy := TextHeight(Text);\r\nend;\r\n\r\nfunction TCanvas.TextHeight(const Text: string): Double;\r\nbegin\r\n Result := FontSizeToPx(Font.Size);\r\nend;\r\n\r\nprocedure TCanvas.MoveTo(X, Y: Double);\r\nvar\r\n dx,dy: single;\r\nbegin\r\n if Assigned(FContext) then\r\n begin\r\n FPathOpen := true;\r\n FContext.beginPath();\r\n ApplyStroke;\r\n dx := 0;\r\n dy := 0;\r\n GetAccuOffset(X, Y, dx, dy);\r\n FContext.moveTo(X + dx,Y + dy);\r\n end;\r\nend;\r\n\r\nprocedure TCanvas.TextOut(X, Y: Double; const Text: string);\r\nvar\r\n tm: TJSTextMetrics;\r\n DrwText: string;\r\nbegin\r\n if Assigned(FContext) then\r\n begin\r\n // remove #0 chars\r\n asm\r\n DrwText = Text.replace('\\0','');\r\n end;\r\n\r\n FContext.fillStyle := ColorToHtml(Font.Color);\r\n FContext.font := Font.ToString;\r\n FContext.textBaseline := 'top';\r\n FContext.fillText(DrwText, X, Y);\r\n\r\n if fsUnderline in Font.Style then\r\n begin\r\n tm := FContext.measureText(DrwText);\r\n FContext.fillRect(X, Y + Font.Size *1.4, tm.width, 1);\r\n end;\r\n\r\n if fsStrikeOut in Font.Style then\r\n begin\r\n tm := FContext.measureText(DrwText);\r\n FContext.fillRect(X, Y + Font.Size *0.7, tm.width, 1);\r\n end;\r\n\r\n end;\r\nend;\r\n\r\nfunction TCanvas.TextRect(ARect: TCanvasRectF; const Text: String; TextFormat: TTextFormat): TCanvasRectF;\r\nvar\r\n ha: TAlignment;\r\n va: TVerticalAlignment;\r\nbegin\r\n ha := taLeftJustify;\r\n va := taAlignTop;\r\n\r\n if tfCenter in TextFormat then\r\n ha := taCenter\r\n else\r\n if tfRight in TextFormat then\r\n ha := taRightJustify;\r\n\r\n if tfVerticalCenter in TextFormat then\r\n va := taVerticalCenter\r\n else\r\n if tfBottom in TextFormat then\r\n va := taAlignBottom;\r\n\r\n\r\n// (tfBottom, tfCalcRect, tfCenter, tfEditControl, tfEndEllipsis,\r\n// tfPathEllipsis, tfExpandTabs, tfExternalLeading, tfLeft, tfModifyString,\r\n// tfNoClip, tfNoPrefix, tfRight, tfRtlReading, tfSingleLine, tfTop,\r\n// tfVerticalCenter, tfWordBreak, tfHidePrefix, tfNoFullWidthCharBreak,\r\n// tfPrefixOnly, tfTabStop, tfWordEllipsis, tfComposited);\r\n\r\n Result := TextRect(ARect, Text, tfWordBreak in TextFormat, tfCalcRect in TextFormat, ha, va);\r\nend;\r\n\r\nfunction TCanvas.TextRect(ARect: TCanvasRectF; const Text: String; const WordWrap: Boolean = False; const Calculate: Boolean = False; const AHorizontalAlignment: TAlignment = taLeftJustify; const AVerticalAlignment: TVerticalAlignment = taAlignTop): TCanvasRectF;\r\nvar\r\n i: Integer;\r\n s, sn, st: string;\r\n l: Integer;\r\n w, mw: Double;\r\n f: Boolean;\r\n p: Integer;\r\n tw: Double;\r\n th: Double;\r\n lcnt: Integer;\r\n rs: TCanvasRectF;\r\n fws: Double;\r\n ths: Double;\r\n ww, wwx, fx: Boolean;\r\n\r\n procedure DrawText(AText: string; AWidth, AHeight: Single);\r\n begin\r\n if ww then\r\n begin\r\n case AHorizontalAlignment of\r\n taCenter: TextOut(ARect.Left + (ARect.Right - ARect.Left - AWidth) / 2, ARect.Top, AText);\r\n taLeftJustify: TextOut(ARect.Left, ARect.Top, AText);\r\n taRightJustify: TextOut(ARect.Right - AWidth, ARect.Top, AText);\r\n end;\r\n end\r\n else\r\n begin\r\n case AHorizontalAlignment of\r\n taCenter:\r\n begin\r\n case AVerticalAlignment of\r\n taAlignTop: TextOut(ARect.Left + (ARect.Right - ARect.Left - AWidth) / 2, ARect.Top, AText);\r\n taVerticalCenter: TextOut(ARect.Left + (ARect.Right - ARect.Left - AWidth) / 2, ARect.Top + (ARect.Bottom - ARect.Top - AHeight) / 2, AText);\r\n taAlignBottom: TextOut(ARect.Left + (ARect.Right - ARect.Left - AWidth) / 2, ARect.Bottom - AHeight, AText);\r\n end;\r\n end;\r\n taLeftJustify:\r\n begin\r\n case AVerticalAlignment of\r\n taAlignTop: TextOut(ARect.Left, ARect.Top, AText);\r\n taVerticalCenter: TextOut(ARect.Left, ARect.Top + (ARect.Bottom - ARect.Top - AHeight) / 2, AText);\r\n taAlignBottom: TextOut(ARect.Left, ARect.Bottom - AHeight, AText);\r\n end;\r\n end;\r\n taRightJustify:\r\n begin\r\n case AVerticalAlignment of\r\n taAlignTop: TextOut(ARect.Right - AWidth, ARect.Top, AText);\r\n taVerticalCenter: TextOut(ARect.Right - AWidth, ARect.Top + (ARect.Bottom - ARect.Top - AHeight) / 2, AText);\r\n taAlignBottom: TextOut(ARect.Right - AWidth, ARect.Bottom - AHeight, AText);\r\n end;\r\n end;\r\n end;\r\n end;\r\n end;\r\n\r\n function FindNextWord(Text: String; var APos: Integer): String;\r\n var\r\n l: Integer;\r\n i: Integer;\r\n begin\r\n Result := '';\r\n\r\n l := Length(Text);\r\n if APos > l then\r\n Exit;\r\n\r\n i := APos;\r\n while True do\r\n begin\r\n if ((Text[i] = #10) and (Text[i - 1] = #13)) or ((Text[i] = #13) and (Text[i - 1] = #10)) or (Text[i] = ' ') then\r\n begin\r\n if Text[i] = ' ' then\r\n Result := Copy(Text, APos, i - (APos - 1))\r\n else\r\n Result := Copy(Text, APos, i - APos);\r\n\r\n Break;\r\n end\r\n else if (Text[i] = #10) or (Text[i] = #13) or (Text[i] = ' ') then\r\n begin\r\n result := Copy(Text, APos, i - (APos - 1));\r\n Break;\r\n end\r\n else if i >= l then\r\n begin\r\n result := Copy(Text, APos, i - (APos - 1));\r\n Break;\r\n end\r\n else\r\n inc(i);\r\n end;\r\n\r\n APos := i + 1;\r\n end;\r\nbegin\r\n ww := WordWrap or (Pos(#13, Text) > 0) or (Pos(#10, Text) > 0);\r\n wwx := not WordWrap and ((Pos(#13, Text) > 0) or (Pos(#10, Text) > 0));\r\n\r\n if not ww then\r\n begin\r\n w := TextWidth(Text);\r\n th := TextHeight(Text);\r\n if not Calculate then\r\n DrawText(Text, w, th);\r\n\r\n Result := CreateCanvasRectF(ARect.Left, ARect.Top, ARect.Left + w, ARect.Top + th);\r\n end\r\n else\r\n begin\r\n rs := ARect;\r\n\r\n mw := 0;\r\n i := 1;\r\n ths := FFont.Size * 0.5;\r\n lcnt := 0;\r\n fws := 0;\r\n tw := 0;\r\n s := FindNextWord(Text, i);\r\n w := TextWidth(s);\r\n th := TextHeight(s) + ths;\r\n\r\n mw := mw + w;\r\n if (Length(s) > 0) and (s[Length(s)] = ' ') then\r\n mw := mw + fws;\r\n\r\n fx := False;\r\n while i <= Length(Text) do\r\n begin\r\n l := Length(s);\r\n if (l >= 2) and (((s[l] = #10) and (s[l - 1] = #13)) or ((s[l] = #13) and (s[l - 1] = #10))) then\r\n begin\r\n s := Copy(s, 1, l - 2);\r\n f := True;\r\n end\r\n else if (l >= 1) and ((s[l] = #10) or (s[l] = #13)) then\r\n begin\r\n s := Copy(s, 1, l - 1);\r\n f := True;\r\n end\r\n else\r\n f := False;\r\n\r\n sn := FindNextWord(Text, i);\r\n w := TextWidth(sn);\r\n th := Max(th, TextHeight(sn) + ths);\r\n\r\n if (ARect.Left + mw + w > ARect.Right) or f then\r\n begin\r\n if (s <> '') and not fx then\r\n begin\r\n p := Length(s);\r\n\r\n st := Copy(s, 1, p);\r\n\r\n Inc(lcnt);\r\n if mw > tw then\r\n tw := mw;\r\n\r\n if not Calculate then\r\n DrawText(st, mw, th);\r\n\r\n mw := 0;\r\n end;\r\n\r\n s := '';\r\n\r\n fx := False;\r\n if (wwx and f) or not wwx then\r\n ARect.Top := ARect.Top + th\r\n else if (wwx and not f) then\r\n fx := True;\r\n\r\n if (Trunc(ARect.Top) > Trunc(ARect.Bottom - th + ths)) and not Calculate then\r\n Break;\r\n end;\r\n\r\n mw := mw + w;\r\n if (Length(sn) > 0) and (sn[Length(sn)] = ' ') then\r\n mw := mw + fws;\r\n s := s + sn;\r\n end;\r\n\r\n if s <> '' then\r\n begin\r\n p := Length(s);\r\n st := Copy(s, 1, p);\r\n Inc(lcnt);\r\n if mw > tw then\r\n tw := mw;\r\n\r\n if not Calculate then\r\n DrawText(st, mw, th);\r\n end;\r\n\r\n Result := CreateCanvasRectF(rs.Left, rs.Top, rs.Left + tw, rs.Top + lcnt * th);\r\n end;\r\nend;\r\n\r\nprocedure TCanvas.TextOut(X,Y: Integer; const Text: string);\r\nbegin\r\n TextOut(Double(X), Double(Y), Text);\r\nend;\r\n\r\nfunction TCanvas.TextRect(ARect: TRect; const Text: String; const WordWrap: Boolean = False; const Calculate: Boolean = False; const AHorizontalAlignment: TAlignment = taLeftJustify; const AVerticalAlignment: TVerticalAlignment = taAlignTop): TRect;\r\nvar\r\n r: TCanvasRectF;\r\nbegin\r\n r := TextRect(CreateCanvasRectF(ARect.Left, ARect.Top, ARect.Right, ARect.Bottom), Text, WordWrap, Calculate, AHorizontalAlignment, AVerticalAlignment);\r\n Result := Rect(Round(r.Left), Round(r.Top), Round(r.Right), Round(r.Bottom));\r\nend;\r\n\r\nfunction TCanvas.TextWidth(const Text: string): Double;\r\nvar\r\n f: string;\r\n tm: TJSTextMetrics;\r\nbegin\r\n if Assigned(FContext) then\r\n begin\r\n f := Font.ToString;\r\n FContext.font := f;\r\n tm := FContext.measureText(Text);\r\n Result := tm.width;\r\n end;\r\nend;\r\n\r\nprocedure TCanvas.Transform(m11, m12, m21, m22, dx, dy: Double);\r\nbegin\r\n if Assigned(FContext) then\r\n FContext.transform(m11, m12, m21, m22, dx, dy);\r\nend;\r\n\r\nprocedure TCanvas.Translate(X, Y: Double);\r\nbegin\r\n if Assigned(FContext) then\r\n FContext.translate(X, Y);\r\nend;\r\n\r\nprocedure TCanvas.Draw(X, Y: Integer; Graphic: TGraphic);\r\nbegin\r\n Draw(Double(X), Double(Y), Graphic);\r\nend;\r\n\r\ndestructor TCanvas.Destroy;\r\nbegin\r\n inherited;\r\nend;\r\n\r\nprocedure TCanvas.Draw(X, Y: Double; Graphic: TGraphic);\r\nvar\r\n img: TJSObject;\r\nbegin\r\n if Assigned(FContext) then\r\n begin\r\n img := Graphic.Image;\r\n\r\n if Assigned(img) then\r\n begin\r\n if Graphic.FUsedCanvas then\r\n FContext.drawImage(TJSObject(Graphic.FCanvasElement), X, Y)\r\n else\r\n FContext.drawImage(img, X, Y);\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TCanvas.DrawFocusRect(const Rect: TCanvasRectF);\r\nvar\r\n ps: TPenStyle;\r\nbegin\r\n ps := Pen.Style;\r\n Pen.Style := psDot;\r\n Pen.Width := 1;\r\n Pen.Color := clBlack;\r\n\r\n MoveTo(Rect.Left, Rect.Top);\r\n LineTo(Rect.Right, Rect.Top);\r\n LineTo(Rect.Right, Rect.Bottom);\r\n LineTo(Rect.Left, Rect.Bottom);\r\n LineTo(Rect.Left, Rect.Top);\r\n\r\n Pen.Style := ps;\r\nend;\r\n\r\nprocedure TCanvas.DrawFocusRect(const Rect: TRect);\r\nbegin\r\n DrawFocusRect(CreateCanvasRectF(Rect.Left, Rect.Top, Rect.Right, Rect.Bottom));\r\nend;\r\n\r\nprocedure TCanvas.Ellipse(X1, Y1, X2, Y2: Double);\r\nvar\r\n w, h: Double;\r\n kappa: Double;\r\n ox, oy, xe, ye, xm, ym: Double;\r\nbegin\r\n if Assigned(FContext) then\r\n begin\r\n w := x2 - x1;\r\n h := y2 - y1;\r\n\r\n kappa := 0.5522848;\r\n\r\n ox := (w / 2) * kappa;\r\n oy := (h / 2) * kappa;\r\n xe := x1 + w;\r\n ye := y1 + h;\r\n xm := x1 + w / 2;\r\n ym := y1 + h / 2;\r\n\r\n FContext.save;\r\n asm\r\n let region = new Path2D();\r\n region.moveTo(X1, ym);\r\n region.bezierCurveTo(X1, ym - oy, xm - ox, Y1, xm, Y1);\r\n region.bezierCurveTo(xm + ox, Y1, xe, ym - oy, xe, ym);\r\n region.bezierCurveTo(xe, ym + oy, xm + ox, ye, xm, ye);\r\n region.bezierCurveTo(xm - ox, ye, X1, ym + oy, X1, ym);\r\n region.closePath();\r\n this.FContext.clip(region, \"evenodd\");\r\n end;\r\n\r\n if not (Brush.Style in [bsSolid,bsClear]) and (Brush.Gradient = bgNone) then\r\n ApplyBrush(X1,Y1,X2,Y2);\r\n\r\n FContext.restore;\r\n\r\n FContext.beginPath();\r\n ApplyStroke;\r\n\r\n if Brush.Gradient <> bgNone then\r\n begin\r\n ApplyBrush(x1,y1,x2,y2);\r\n end\r\n else\r\n ApplyFill;\r\n\r\n FContext.moveTo(X1, ym);\r\n FContext.bezierCurveTo(X1, ym - oy, xm - ox, Y1, xm, Y1);\r\n FContext.bezierCurveTo(xm + ox, Y1, xe, ym - oy, xe, ym);\r\n FContext.bezierCurveTo(xe, ym + oy, xm + ox, ye, xm, ye);\r\n FContext.bezierCurveTo(xm - ox, ye, X1, ym + oy, X1, ym);\r\n FContext.closePath();\r\n\r\n if (Brush.Style = bsSolid) or (Brush.Gradient <> bgNone) then\r\n FContext.fill();\r\n\r\n if Pen.Style <> psClear then\r\n FContext.stroke();\r\n end;\r\nend;\r\n\r\nprocedure TCanvas.GetAccuOffset(X,Y: double; var dx, dy: single);\r\nbegin\r\n dx := 0;\r\n dy := 0;\r\n\r\n if (Pen.Width = 1) and (Pen.Style <> psClear) and (Frac(X) = 0) then\r\n dx := 0.5;\r\n\r\n if (Pen.Width = 1) and (Pen.Style <> psClear) and (Frac(Y) = 0) then\r\n dy := 0.5;\r\nend;\r\n\r\nfunction TCanvas.GetBase64Image: string;\r\nbegin\r\n Result := '';\r\n if Assigned(Element) then\r\n Result := Element.toDataURL();\r\nend;\r\n\r\nfunction TCanvas.GetPixel(X,Y: Single): TColor;\r\nvar\r\n imgd: TJSImageData;\r\nbegin\r\n Result := clNone;\r\n if Assigned(FContext) then\r\n begin\r\n imgd := FContext.getImageData(x, y, 1, 1);\r\n Result := RGBA(imgd.data[0], imgd.data[1], imgd.data[2], imgd.data[3]);\r\n end;\r\nend;\r\n\r\nfunction TCanvas.GetAsImage(AType: TImageType): string;\r\nbegin\r\n Result := '';\r\n if Assigned(Element) then\r\n begin\r\n case AType of\r\n itBase64: Result := Element.toDataURL();\r\n itPNG: Result := Element.toDataURL('image/png');\r\n itJPEG: Result := Element.toDataURL('image/jpeg',1.0);\r\n itBMP: Result := Element.toDataURL('image/bmp');\r\n itGIF: Result := Element.toDataURL('image/gif');\r\n itSVG: Result := Element.toDataURL('image/svg+xml');\r\n end;\r\n end;\r\nend;\r\n\r\n{$HINTS OFF}\r\nprocedure TCanvas.DownloadImage( AFileName: string; AType: TImageType = itPNG);\r\nvar\r\n s: string;\r\n el: TJSHTMLElement;\r\nbegin\r\n if Assigned(Element) then\r\n begin\r\n s := GetAsImage(AType);\r\n\r\n el := TJSHTMLElement(document.createElement('a'));\r\n el['href'] := s;\r\n if (AFileName <> '') then\r\n el['download'] := AFileName;\r\n el.style.setProperty('display','none');\r\n document.body.appendChild(el);\r\n el.click();\r\n document.body.removeChild(el);\r\n end;\r\nend;\r\n{$HINTS ON}\r\n\r\nprocedure TCanvas.LineTo(X, Y: Double);\r\nvar\r\n dx,dy: single;\r\n clr: TColor;\r\nbegin\r\n if Assigned(FContext) then\r\n begin\r\n dx := 0;\r\n dy := 0;\r\n GetAccuOffset(X,Y,dx,dy);\r\n\r\n case Pen.Mode of\r\n pmBlack: FContext.strokeStyleAsColor := ColorToHtml(clBlack);\r\n pmWhite: FContext.strokeStyleAsColor := ColorToHtml(clWhite);\r\n pmXor: FContext.globalCompositeOperation := 'xor';\r\n pmMask: FContext.globalCompositeOperation := 'source-atop';\r\n pmNotCopy:\r\n begin\r\n clr := ColorToRGB(Pen.Color) xor $FFFFFFFF;\r\n FContext.strokeStyleAsColor := ColorToHtml(clr);\r\n end;\r\n pmNotXor:\r\n begin\r\n clr := ColorToRGB(Pen.Color) xor $FFFFFFFF;\r\n FContext.strokeStyleAsColor := ColorToHtml(clr);\r\n FContext.globalCompositeOperation := 'xor';\r\n end;\r\n end;\r\n\r\n\r\n if not FPathOpen then\r\n begin\r\n FContext.beginPath();\r\n ApplyStroke;\r\n FContext.moveTo(FPathX + dx, FPathY + dy);\r\n end;\r\n\r\n FContext.lineTo(X + dx, Y + dy);\r\n FContext.stroke();\r\n FPathX := X;\r\n FPathY := Y;\r\n\r\n FPathOpen := false;\r\n\r\n FContext.globalCompositeOperation := 'source-over';\r\n end;\r\nend;\r\n\r\nprocedure TCanvas.Save;\r\nbegin\r\n if Assigned(FContext) then\r\n FContext.save();\r\nend;\r\n\r\nprocedure TCanvas.SetClipRect(const Value: TCanvasRectF);\r\nbegin\r\n FClipRect := Value;\r\n if Assigned(FContext) then\r\n begin\r\n FContext.beginPath;\r\n FContext.rect(FClipRect.Left, FClipRect.Top, FClipRect.Right - FClipRect.Left, FClipRect.Bottom - FClipRect.Top);\r\n FContext.clip;\r\n end;\r\nend;\r\n\r\nprocedure TCanvas.SetPixel(X,Y: Single; Clr: TColor);\r\nbegin\r\n if Assigned(FContext) then\r\n begin\r\n FContext.fillStyle := ColorToHtml(Clr);\r\n FContext.fillRect(x,y, 1, 1);\r\n end;\r\nend;\r\n\r\nprocedure TCanvas.SetTransform(m11, m12, m21, m22, dx, dy: Double);\r\nvar\r\n m: TMatrix;\r\n px: Single;\r\nbegin\r\n if Assigned(FContext) then\r\n begin\r\n m := MatrixIdentity;\r\n m.m11 := m11;\r\n m.m12 := m12;\r\n m.m21 := m21;\r\n m.m22 := m22;\r\n m.m31 := dx;\r\n m.m32 := dy;\r\n\r\n if ApplyPixelRatio then\r\n begin\r\n px := GetPixelRatio(Self);\r\n m := MatrixMultiply(m, MatrixCreateScaling(px, px));\r\n end;\r\n\r\n FContext.setTransform(m.m11, m.m12, m.m21, m.m22, m.m31, m.m32);\r\n end;\r\nend;\r\n\r\nprocedure TCanvas.StretchDraw(Rect: TCanvasRectF; Graphic: TGraphic);\r\nvar\r\n img: TJSObject;\r\nbegin\r\n if Assigned(FContext) then\r\n begin\r\n img := Graphic.Image;\r\n if Assigned(img) then\r\n begin\r\n if Graphic.FUsedCanvas then\r\n FContext.drawImage(TJSObject(Graphic.FCanvasElement), 0, 0, Graphic.width, Graphic.height, Rect.Left, Rect.Top, Rect.Right - Rect.Left, Rect.Bottom - Rect.Top)\r\n else\r\n FContext.drawImage(img, 0, 0, Graphic.width, Graphic.height, Rect.Left, Rect.Top, Rect.Right - Rect.Left, Rect.Bottom - Rect.Top);\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TCanvas.StretchDraw(Rect: TRect; Graphic: TGraphic);\r\nbegin\r\n StretchDraw(CreateCanvasRectF(Rect.Left, Rect.Top, Rect.Right, Rect.Bottom), Graphic);\r\nend;\r\n\r\nprocedure TCanvas.PathLineTo(X, Y: Integer);\r\nbegin\r\n PathLineTo(Double(X), Double(Y));\r\nend;\r\n\r\nprocedure TCanvas.PathLineTo(X, Y: Double);\r\nvar\r\n dx, dy: Double;\r\nbegin\r\n if Assigned(FContext) then\r\n begin\r\n dx := 0;\r\n dy := 0;\r\n GetAccuOffset(X, Y, dx, dy);\r\n FContext.lineTo(X + dx, Y + dy);\r\n end;\r\nend;\r\n\r\nprocedure TCanvas.PathFill;\r\nbegin\r\n if Assigned(FContext) then\r\n begin\r\n ApplyFill;\r\n\r\n ApplyBrush(10,10,50,50);\r\n\r\n FContext.fill();\r\n end;\r\nend;\r\n\r\nprocedure TCanvas.PathStroke;\r\nbegin\r\n if Assigned(FContext) then\r\n begin\r\n ApplyStroke;\r\n FContext.stroke();\r\n end;\r\nend;\r\n\r\nprocedure TCanvas.PathMoveTo(X, Y: Integer);\r\nbegin\r\n PathMoveTo(Double(X), Double(Y));\r\nend;\r\n\r\nprocedure TCanvas.PathMoveTo(X, Y: Double);\r\nvar\r\n dx, dy: Double;\r\nbegin\r\n if Assigned(FContext) then\r\n begin\r\n dx := 0;\r\n dy := 0;\r\n GetAccuOffset(X, Y, dx, dy);\r\n FContext.moveTo(X + dx, Y + dy);\r\n end;\r\nend;\r\n\r\nprocedure TCanvas.Polygon(const Points: array of TCanvasPointF);\r\nvar\r\n l, i: Integer;\r\n x1,y1,x2,y2: Double;\r\n\r\nbegin\r\n if Assigned(FContext) then\r\n begin\r\n l := Length(Points);\r\n\r\n if l = 0 then\r\n Exit;\r\n\r\n FContext.beginPath();\r\n ApplyStroke;\r\n\r\n x1 := $FFFF;\r\n y1 := $FFFF;\r\n x2 := 0;\r\n y2 := 0;\r\n for i := 0 to Length(Points) - 1 do\r\n begin\r\n if Points[i].X < x1 then\r\n x1 := Points[i].X;\r\n if Points[i].Y < y1 then\r\n y1 := Points[i].Y;\r\n\r\n if Points[i].X > x2 then\r\n x2 := Points[i].X;\r\n if Points[i].Y > y2 then\r\n y2 := Points[i].Y;\r\n end;\r\n\r\n if Brush.Gradient <> bgNone then\r\n ApplyBrush(x1,y1,x2,y2)\r\n else\r\n ApplyFill;\r\n\r\n i := 0;\r\n FContext.moveTo(Points[i].X, Points[i].Y);\r\n\r\n while (i < l - 1) do\r\n begin\r\n inc(i);\r\n FContext.lineTo(Points[i].X, Points[i].Y);\r\n end;\r\n\r\n FContext.closePath();\r\n\r\n if Brush.Style <> bsClear then\r\n FContext.fill();\r\n\r\n if Pen.Style <> psClear then\r\n FContext.stroke();\r\n end;\r\nend;\r\n\r\nprocedure TCanvas.Polyline(const Points: array of TCanvasPointF);\r\nvar\r\n l, i: Integer;\r\nbegin\r\n if Assigned(FContext) then\r\n begin\r\n l := Length(Points);\r\n\r\n if l = 0 then\r\n Exit;\r\n\r\n FContext.beginPath();\r\n ApplyStroke;\r\n i := 0;\r\n FContext.moveTo(Points[i].X, Points[i].Y);\r\n\r\n while (i < l - 1) do\r\n begin\r\n inc(i);\r\n FContext.lineTo(Points[i].X, Points[i].Y);\r\n end;\r\n\r\n if Pen.Style <> psClear then\r\n FContext.stroke();\r\n end;\r\nend;\r\n\r\nprocedure TCanvas.Ellipse(const Rect: TCanvasRectF);\r\nbegin\r\n Ellipse(Rect.Left, Rect.Top, Rect.Right, Rect.Bottom);\r\nend;\r\n\r\nprocedure TCanvas.PathClose;\r\nbegin\r\n if Assigned(FContext) then\r\n FContext.closePath();\r\nend;\r\n\r\nprocedure TCanvas.EndScene;\r\nbegin\r\n if Assigned(OnEndScene) then\r\n OnEndScene(Self);\r\nend;\r\n\r\nprocedure TCanvas.FillRect(const Rect: TCanvasRectF);\r\nbegin\r\n Rectangle(Rect.Left, Rect.Top, Rect.Right, Rect.Bottom);\r\nend;\r\n\r\nprocedure TCanvas.Rotate(Angle: Double);\r\nbegin\r\n if Assigned(FContext) then\r\n FContext.rotate(Angle);\r\nend;\r\n\r\nprocedure TCanvas.RoundRect(const Rect: TCanvasRectF; CX, CY: Double);\r\nbegin\r\n RoundRect(Rect.Left, Rect.Top, Rect.Right, Rect.Bottom, CX, CY);\r\nend;\r\n\r\n{ TGraphic }\r\n\r\nconstructor TGraphic.Create(Img: TJSObject);\r\nbegin\r\n FAddToQueue := True;\r\n FEmpty := True;\r\n FData := '';\r\n FDataBin := '';\r\n FURL := '';\r\n FImage := Img;\r\n FLoaded := nil;\r\nend;\r\n\r\nprocedure TGraphic.AssignEvents;\r\nbegin\r\n asm\r\n var me = this;\r\n this.FImage.onload = function() {\r\n me.DoChange();\r\n };\r\n end;\r\nend;\r\n\r\nprocedure TGraphic.CaptureCanvas;\r\nbegin\r\n if Assigned(FCanvas) and Assigned(FCanvas.Element) then\r\n LoadFromResource(FCanvas.Element.toDataURL());\r\nend;\r\n\r\nconstructor TGraphic.Create;\r\nbegin\r\n FAddToQueue := True;\r\n FEmpty := True;\r\n FData := '';\r\n FDataBin := '';\r\n FUsedCanvas := False;\r\n CreateImage;\r\n AssignEvents;\r\nend;\r\n\r\nconstructor TGraphic.Create(URL: string);\r\nbegin\r\n FAddToQueue := True;\r\n FEmpty := True;\r\n FData := '';\r\n FDataBin := '';\r\n Create;\r\n LoadFromURL(URL);\r\nend;\r\n\r\nprocedure TGraphic.Assign(Source: TPersistent);\r\nvar\r\n s: string;\r\nbegin\r\n if Assigned(Source) and (Source is TGraphic) and Assigned((Source as TGraphic).FCanvas) then\r\n LoadFromCanvas((Source as TGraphic).FCanvas)\r\n else if Assigned(Source) and (Source is TGraphic) and Assigned((Source as TGraphic).FImage) and not (Source as TGraphic).Empty then\r\n begin\r\n asm\r\n s = Source.FImage.src;\r\n end;\r\n\r\n LoadFromURL(s);\r\n end\r\n else if not Assigned(Source) then\r\n begin\r\n CreateImage;\r\n DoChange;\r\n end;\r\nend;\r\n\r\nfunction TGraphic.Image: TJSObject;\r\nbegin\r\n Result := FImage;\r\nend;\r\n\r\nprocedure TGraphic.LoadFromCache(AData: String; ALoaded: TBitmapLoadedProc = nil);\r\nvar\r\n dt: string;\r\n o: TJSObject;\r\n b: Boolean;\r\n s: string;\r\n l: Boolean;\r\nbegin\r\n FData := AData;\r\n if Pos('DATA:', UpperCase(AData)) > 0 then\r\n begin\r\n FDataBin := HexImageEncodeFromBase64(AData);\r\n end;\r\n\r\n dt := AData;\r\n if dt = '' then\r\n Exit;\r\n\r\n FLoaded := ALoaded;\r\n FUsedCanvas := false;\r\n\r\n if not FCache.Find(dt, o) then\r\n begin\r\n b := False;\r\n s := '';\r\n asm\r\n s = this.FImage.src;\r\n b = (s != '');\r\n end;\r\n\r\n l := b and (dt <> s);\r\n if l then\r\n begin\r\n CreateImage;\r\n AssignEvents;\r\n end;\r\n\r\n if (not l and (FQueue.IndexOf(dt) = -1)) or l then\r\n begin\r\n asm\r\n this.FImage.src = dt;\r\n dt = this.FImage.src;\r\n end;\r\n\r\n FData := dt;\r\n if Pos('DATA:', UpperCase(dt)) > 0 then\r\n FDataBin := HexImageEncodeFromBase64(dt);\r\n\r\n Inc(FCacheCount);\r\n if FAddToQueue then\r\n FQueue.Add(dt);\r\n end\r\n else if (not l and (FQueue.IndexOf(dt) <> -1)) then\r\n begin\r\n asm\r\n this.FImage.src = dt;\r\n end;\r\n end;\r\n end\r\n else\r\n begin\r\n FImage := o;\r\n DoChange;\r\n end;\r\n\r\n asm\r\n if (this.FImage) {\r\n this.FEmpty = (this.FImage.src == '');\r\n }\r\n end;\r\nend;\r\n\r\nprocedure TGraphic.LoadFromCanvas(ACanvas: TCanvas);\r\nbegin\r\n if Assigned(ACanvas) and Assigned(ACanvas.Element) then\r\n LoadFromResource(ACanvas.Element.toDataURL());\r\nend;\r\n\r\nprocedure TGraphic.LoadFromFile(AFileName: string; ALoaded: TBitmapLoadedProc);\r\nbegin\r\n LoadFromURL(AFileName, 0, ALoaded);\r\nend;\r\n\r\nfunction TGraphic.GetAsImage(AType: TImageType): string;\r\nbegin\r\n Result := '';\r\n if Assigned(FCanvas) then\r\n Result := FCanvas.GetAsImage(AType);\r\nend;\r\n\r\nfunction TGraphic.GetBase64Image: string;\r\nbegin\r\n Result := '';\r\n if Assigned(FCanvas) then\r\n Result := FCanvas.GetBase64Image;\r\nend;\r\n\r\nprocedure TGraphic.LoadFromResource(AResource: string; AHInstance: Integer);\r\nbegin\r\n FEmpty := True;\r\n LoadFromCache(AResource);\r\nend;\r\n\r\nprocedure TGraphic.LoadFromResource(AResource: string);\r\nbegin\r\n LoadFromResource(AResource, 0);\r\nend;\r\n\r\nprocedure TGraphic.LoadFromStream(AStream: TStream);\r\nbegin\r\n DoChange;\r\nend;\r\n\r\nprocedure TGraphic.LoadFromURL(AURL: string; AHInstance: Integer; ALoaded: TBitmapLoadedProc);\r\nbegin\r\n FEmpty := True;\r\n LoadFromCache(AURL, ALoaded);\r\nend;\r\n\r\nprocedure TGraphic.LoadFromURL(AURL: string; ALoaded: TBitmapLoadedProc);\r\nbegin\r\n LoadFromURL(AURL, 0, ALoaded);\r\nend;\r\n\r\nprocedure TGraphic.RecreateCanvas;\r\nbegin\r\n if not Assigned(FCanvasElement) then\r\n FCanvasElement := TJSHTMLCanvasElement(document.createElement('CANVAS'));\r\n\r\n if Assigned(FCanvasElement) then\r\n begin\r\n FCanvasElement.height := Height;\r\n FCanvasElement.width := Width;\r\n if not Assigned(FCanvas) then\r\n begin\r\n FCanvas := TCanvas.Create(FCanvasElement);\r\n FCanvas.OnBeginScene := DoBeginScene;\r\n FCanvas.OnEndScene := DoEndScene;\r\n end;\r\n end;\r\nend;\r\n\r\nclass function TGraphic.CreateFromResource(AResource: String;\r\n AInstance: NativeUInt): TGraphic;\r\nbegin\r\n Result := TGraphic.Create;\r\n Result.LoadFromResource(AResource);\r\nend;\r\n\r\nclass function TGraphic.CreateFromURL(AURL: String): TGraphic;\r\nbegin\r\n Result := CreateFromURL(AURL, 0);\r\nend;\r\n\r\nclass function TGraphic.CreateFromURL(AURL: String;\r\n AInstance: NativeUInt): TGraphic;\r\nbegin\r\n Result := TGraphic.Create;\r\n Result.LoadFromURL(AURL);\r\nend;\r\n\r\nclass function TGraphic.CreateFromResource(AResource: string): TGraphic;\r\nbegin\r\n Result := CreateFromResource(AResource, 0);\r\nend;\r\n\r\nprocedure TGraphic.CreateImage;\r\nbegin\r\n asm\r\n this.FImage = new Image();\r\n end;\r\nend;\r\n\r\nprocedure TGraphic.DoBeginScene(Sender: TObject);\r\nbegin\r\n FCanvas.Clear;\r\nend;\r\n\r\nprocedure TGraphic.DoChange;\r\nvar\r\n i: Integer;\r\nbegin\r\n FEmpty := (Width = 0) and (Height = 0);\r\n if not FEmpty and (FData <> '') and not FCache.Exists(FData) then\r\n begin\r\n FCache.Add(TGraphicCache.Create(FImage, FData));\r\n i := FQueue.IndexOf(FData);\r\n if (i >= 0) and (i <= FQueue.Count - 1) then\r\n FQueue.Delete(i);\r\n\r\n Dec(FCacheCount);\r\n if FCacheCount = 0 then\r\n begin\r\n if Assigned(Application.OnImageCacheReady) then\r\n Application.OnImageCacheReady(Application);\r\n end;\r\n end;\r\n\r\n if Assigned(FOnChange) then\r\n begin\r\n FOnChange(Self);\r\n end;\r\n\r\n if Assigned(FLoaded) then\r\n begin\r\n FLoaded;\r\n FLoaded := nil;\r\n end;\r\nend;\r\n\r\nprocedure TGraphic.DoEndScene(Sender: TObject);\r\nbegin\r\n FAddToQueue := False;\r\n CaptureCanvas;\r\n FAddToQueue := True;\r\nend;\r\n\r\nfunction TGraphic.Empty: Boolean;\r\nbegin\r\n Result := FEmpty;\r\nend;\r\n\r\n{$HINTS OFF}\r\nprocedure TGraphic.SaveToStream(AStream: TStream);\r\nvar\r\n s: string;\r\n ms: TStream;\r\nbegin\r\n s := GetAsImage(itBase64);\r\n ms := AStream;\r\n asm\r\n s = s.replace(/^data:image\\/(png|jpg|jpeg);base64,/, \"\");\r\n\r\n var base64regex = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/;\r\n if (base64regex.test(s)) {\r\n var binary_string = window.atob(s);\r\n var len = binary_string.length;\r\n var bytes = new Uint8Array( len );\r\n for (var i = 0; i < len; i++) {\r\n bytes[i] = binary_string.charCodeAt(i);\r\n }\r\n ms.Write(bytes, bytes.length);\r\n }\r\n end;\r\nend;\r\n{$HINTS ON}\r\n\r\nprocedure TGraphic.SetData(const Value: TBinaryString);\r\nvar\r\n hx: string;\r\nbegin\r\n if (FDataBin <> Value) then\r\n begin\r\n FDataBin := Value;\r\n hx := HexImageDecodeAsBase64(FDataBin);\r\n if Pos('PHN2ZyB', hx) > 0 then\r\n LoadFromResource('data:image/svg+xml;base64,' + hx)\r\n else\r\n LoadFromResource('data:image/png;base64,' + hx);\r\n end;\r\nend;\r\n\r\nprocedure TGraphic.SetHeight(const Value: Integer);\r\nbegin\r\n asm\r\n this.FImage.height = Value;\r\n end;\r\n RecreateCanvas;\r\n DoChange;\r\nend;\r\n\r\nprocedure TGraphic.SetSize(AWidth, AHeight: Integer);\r\nbegin\r\n Width := AWidth;\r\n Height := AHeight;\r\nend;\r\n\r\nprocedure TGraphic.SetURL(const URL: string);\r\nbegin\r\n FURL := URL;\r\n LoadFromURL(URL);\r\nend;\r\n\r\nprocedure TGraphic.SetWidth(const Value: Integer);\r\nbegin\r\n asm\r\n this.FImage.width = Value;\r\n end;\r\n RecreateCanvas;\r\n DoChange;\r\nend;\r\n\r\nfunction TGraphic.GetWidth: Integer;\r\nvar\r\n w: integer;\r\nbegin\r\n w := 0;\r\n if Assigned(FImage) then\r\n begin\r\n asm\r\n w = this.FImage.width;\r\n end;\r\n end;\r\n Result := w;\r\nend;\r\n\r\nfunction TGraphic.GetCanvas: TCanvas;\r\nbegin\r\n if not Assigned(FCanvas) then\r\n RecreateCanvas;\r\n\r\n Result := FCanvas;\r\n FUsedCanvas := True;\r\nend;\r\n\r\nfunction TGraphic.GetData: TBinaryString;\r\nbegin\r\n Result := FDataBin;\r\nend;\r\n\r\nfunction TGraphic.GetHeight: Integer;\r\nvar\r\n h: integer;\r\nbegin\r\n h := 0;\r\n if Assigned(FImage) then\r\n begin\r\n asm\r\n h = this.FImage.height;\r\n end;\r\n end;\r\n Result := h;\r\nend;\r\n\r\n{ TGraphicCache }\r\n\r\nconstructor TGraphicCache.Create(AImage: TJSObject; AID: string);\r\nbegin\r\n FImage := AImage;\r\n FID := AID;\r\nend;\r\n\r\n{ TGraphicCacheList }\r\n\r\nfunction TGraphicCacheList.Exists(AID: string): Boolean;\r\nvar\r\n I: Integer;\r\n it: TGraphicCache;\r\nbegin\r\n Result := False;\r\n for I := 0 to Count - 1 do\r\n begin\r\n it := Items[I] as TGraphicCache;\r\n if (it.ID = AID) and Assigned(it.Image) then\r\n begin\r\n Result := True;\r\n Break;\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TGraphicCacheList.Find(AID: string; var FImage: TJSObject): Boolean;\r\nvar\r\n I: Integer;\r\n it: TGraphicCache;\r\nbegin\r\n Result := False;\r\n for I := 0 to Count - 1 do\r\n begin\r\n it := Items[I] as TGraphicCache;\r\n if (it.ID = AID) and Assigned(it.Image) then\r\n begin\r\n FImage := it.Image;\r\n Result := True;\r\n Break;\r\n end;\r\n end;\r\nend;\r\n\r\n//{$HINTS OFF}\r\nprocedure TBitmap.Assign(Source: TPersistent);\r\n//var\r\n// src,dest: TJSHTMLCanvasElement;\r\nbegin\r\n// if (Source is TBitmap)then\r\n// begin\r\n// Width := (Source as TBitmap).Width;\r\n// Height := (Source as TBitmap).Height;\r\n//\r\n// src := (Self as TBitmap).FCanvasElement;\r\n// dest := (Source as TBitmap).FCanvasElement;\r\n//\r\n// if not Assigned(dest) then\r\n// Exit;\r\n// if not Assigned(src) then\r\n// Exit;\r\n// if (Width = 0) or (Height = 0) then\r\n// Exit;\r\n//\r\n// asm\r\n// const sourceCtx = src.getContext('2d');\r\n// const destCtx = dest.getContext('2d');\r\n// destCtx.drawImage(src, 0, 0);\r\n// end;\r\n// end\r\n// else\r\n inherited Assign(Source);\r\nend;\r\n//{$HINTS ON}\r\n\r\n{ TURLPicture }\r\n\r\nprocedure TURLPicture.Assign(Source: TPersistent);\r\nbegin\r\n if (Source is TURLPicture) then\r\n begin\r\n FFileName := (Source as TURLPicture).FileName;\r\n Changed;\r\n end\r\n else\r\n inherited;\r\nend;\r\n\r\nprocedure TURLPicture.Changed;\r\nbegin\r\n if Assigned(OnChange) then\r\n OnChange(Self);\r\nend;\r\n\r\nprocedure TURLPicture.DataChanged;\r\nbegin\r\n if Assigned(OnDataChange) then\r\n OnDataChange(Self);\r\nend;\r\n\r\nfunction TURLPicture.GetData: TBinaryString;\r\nbegin\r\n Result := FData;\r\nend;\r\n\r\nprocedure TURLPicture.LoadFromFile(AFileName: string);\r\nbegin\r\n FFilename := AFileName;\r\n Changed;\r\nend;\r\n\r\nprocedure TURLPicture.SetData(const Value: TBinaryString);\r\nbegin\r\n if (FData <> Value) then\r\n begin\r\n FData := Value;\r\n DataChanged;\r\n end;\r\nend;\r\n\r\n{ TGradientColor }\r\n\r\nprocedure TGradientColor.Assign(Source: TPersistent);\r\nbegin\r\n if (Source is TGradientColor) then\r\n begin\r\n FColor := (Source as TGradientColor).Color;\r\n FStop := (Source as TGradientColor).Stop;\r\n end;\r\nend;\r\n\r\nconstructor TGradientColor.Create;\r\nbegin\r\n FColor := clNone;\r\n FStop := 0;\r\nend;\r\n\r\ninitialization\r\nbegin\r\n FCache := TGraphicCacheList.Create;\r\n FQueue := TStringList.Create;\r\nend;\r\n\r\nend.\r\n","{\r\n This file is part of the Pas2JS run time library.\r\n Copyright (c) 2017 by Mattias Gaertner\r\n\r\n See the file COPYING.FPC, included in this distribution,\r\n for details about the copyright.\r\n\r\n This program is distributed in the hope that it will be useful,\r\n but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\r\n\r\n **********************************************************************}\r\nunit Math;\r\n\r\n{$mode objfpc}\r\n\r\ninterface\r\n\r\nconst\r\n MinInteger = -$fffffffffffff-1;\r\n MaxInteger = $fffffffffffff;\r\n MinDouble = 5.0e-324;\r\n MaxDouble = 1.7e+308;\r\n\r\nconst\r\n NaN: Double; external name 'NaN';\r\n Infinity: Double; external name 'Infinity';\r\n NegInfinity: Double; external name '-Infinity';\r\n\r\ntype\r\n float = double;\r\n\r\n //EInvalidArgument = class(EMathError);\r\n\r\nfunction Min(const a, b: Double): Double; varargs; external name 'Math.min'; overload;\r\nfunction Max(const a, b: Double): Double; varargs; external name 'Math.max'; overload;\r\nfunction Min(const a, b: NativeLargeUInt): NativeLargeUInt; varargs; external name 'Math.min'; overload;\r\nfunction Max(const a, b: NativeLargeUInt): NativeLargeUInt; varargs; external name 'Math.max'; overload;\r\nfunction Min(const a, b: NativeLargeInt): NativeLargeInt; varargs; external name 'Math.min'; overload;\r\nfunction Max(const a, b: NativeLargeInt): NativeLargeInt; varargs; external name 'Math.max'; overload;\r\nfunction Min(const a, b: Integer): Integer; varargs; external name 'Math.min'; overload;\r\nfunction Max(const a, b: Integer): Integer; varargs; external name 'Math.max'; overload;\r\n\r\nfunction InRange(const AValue, AMin, AMax: Integer): Boolean; assembler; overload;\r\nfunction InRange(const AValue, AMin, AMax: Double): Boolean; assembler; overload;\r\n\r\nfunction EnsureRange(const AValue, AMin, AMax: Integer): Integer; assembler; overload;\r\nfunction EnsureRange(const AValue, AMin, AMax: Double): Double; assembler; overload;\r\n\r\ntype\r\n TRoundToRange = -37..37;\r\n\r\nfunction RoundTo(const AValue: Double; const Digits: TRoundToRange): Double;\r\nfunction SimpleRoundTo(const AValue: Double; const Digits: TRoundToRange = -2): Double;\r\n\r\nfunction randg(mean,stddev : float) : float;\r\nfunction RandomRange(const aFrom, aTo: Integer): Integer;\r\nfunction RandomRange(const aFrom, aTo: NativeLargeInt): NativeLargeInt;\r\n\r\nType\r\n TValueSign = -1..1;\r\n\r\nconst\r\n NegativeValue = -1;\r\n ZeroValue = 0;\r\n PositiveValue = 1;\r\n\r\nfunction Sign(const AValue: NativeInt): TValueSign; external name 'Math.sign'; overload;\r\nfunction Sign(const AValue: Double): TValueSign; external name 'Math.sign'; overload;\r\n\r\nfunction IsZero(const d: Double; Epsilon: Double): Boolean; overload;\r\nfunction IsZero(const d: Double): Boolean; overload;\r\n\r\nfunction IsNaN(const v: JSValue): boolean; external name {$IFDEF ECMAScript5}'isNaN'{$ELSE}'Number.isNaN'{$ENDIF}; overload;\r\nfunction IsFinite(const d: JSValue): Boolean; external name 'isFinite'; overload;// false if NaN, positive or negative infinity\r\nfunction IsInfinite(const d: JSValue): Boolean; assembler; overload; // negative or positive infinity\r\n{$IFDEF ECMAScript6}\r\nfunction IsInteger(const d: JSValue): Boolean; external name 'Number.isInteger'; // any integer representable by a double\r\nfunction IsSafeInteger(const d: JSValue): Boolean; external name 'Number.isSafeInteger'; // an integer between MinInteger and MaxInteger, inclusive\r\n{$ENDIF}\r\n\r\nfunction SameValue(const A, B: Double; Epsilon: Double = 0.0): Boolean; overload;\r\n\r\n// function Abs is in System.pas\r\nfunction ArcCos(const A : Double): Double; external name 'Math.acos';\r\nfunction ArcCosH(const A: Double): Double; external name 'Math.acosh'; // not on IE\r\nfunction ArcSin(const A : Double): Double; external name 'Math.asin';\r\nfunction ArcSinH(const A : Double): Double; external name 'Math.asinh'; // not on IE\r\nfunction ArcTanH(const A: Double): Double; external name 'Math.atanh'; // not on IE\r\nfunction CosH(const A: Double): Double; external name 'Math.cosh'; // not on IE\r\nprocedure SinCos(const A: Double; var B: Double; var C: Double);\r\nfunction ExpM1(const A: Double): Double; external name 'Math.expm1'; // not on IE\r\nfunction FRound(const A: Double): Double; overload; external name 'Math.fround'; // not on IE\r\nfunction FTrunc(const A: Double): double; overload; external name 'Math.trunc'; // not on IE\r\nfunction Hypot(const A : Double): Double; varargs; external name 'Math.hypot'; // not on IE\r\nfunction IMul(const A, B: Integer): Integer; external name 'Math.imul'; // not on IE\r\nfunction Log10(const A: Double): Double; external name 'Math.log10';\r\nfunction Log1p(const A: Double): Double; external name 'Math.log1p'; // not on IE\r\nfunction Log2(const A: Double): Double; external name 'Math.log2'; // not on IE\r\nfunction LogN(const Base, A: Double): Double;\r\nfunction Power(const Base, Exponent: Double): Double; external name 'Math.pow';\r\n// ln, round, sqrt, trunc, cos, sin, arctan, round, exp are in unit system\r\nfunction Ceil(const A: Double): Integer;\r\nfunction Floor(const A: Double): Integer;\r\nfunction Ceil64(const A: Double): NativeLargeInt;\r\nfunction Floor64(const A: Double): NativeLargeInt;\r\nfunction ldexp(x : double;const p : Integer) : double;\r\nprocedure Frexp(X: double; out Mantissa: double; out Exponent: integer);\r\nfunction lnxp1(x : double) : double;\r\n\r\nfunction IntPower(base : float;const exponent : Integer) : double;\r\n\r\nprocedure DivMod(Dividend: LongInt; Divisor: Word; out Result, Remainder: Word);\r\nprocedure DivMod(Dividend: LongInt; Divisor: Word; out Result, Remainder: SmallInt);\r\nprocedure DivMod(Dividend: DWord; Divisor: DWord; out Result, Remainder: DWord);\r\nprocedure DivMod(Dividend: LongInt; Divisor: LongInt; out Result, Remainder: LongInt);\r\n\r\n{ Angle conversion }\r\nfunction DegToRad(deg : double) : double;\r\nfunction RadToDeg(rad : double) : double;\r\nfunction GradToRad(grad : double) : double;\r\nfunction RadToGrad(rad : double) : double;\r\nfunction DegToGrad(deg : double) : double;\r\nfunction GradToDeg(grad : double) : double;\r\n{ one cycle are 2*Pi rad }\r\nfunction CycleToRad(cycle : double) : double;\r\nfunction RadToCycle(rad : double) : double;\r\nFunction DegNormalize(deg : double) : double;\r\n\r\nfunction Norm(const data : array of double) : double;\r\n\r\n// Statistical functions\r\nfunction Mean(const data : array of double) : double;\r\nfunction Sum(const data : array of double) : double;\r\nprocedure SumsAndSquares(const data : Array of Double; out Sum,SumOfSquares : double);\r\n\r\nfunction StdDev(const data : array of Double) : float;\r\nprocedure MeanAndStdDev(const data : array of Double; out Mean,StdDev : double);\r\nfunction Variance(const data : array of Double) : double;\r\nfunction TotalVariance(const data : array of Double) : double;\r\nfunction PopNStdDev(const data : array of Double) : double;\r\nfunction PopNVariance(const data : array of Double) : double;\r\nprocedure MomentSkewKurtosis(const data : array of Double; out m1,m2,m3,m4,skew,kurtosis : double);\r\n\r\n// Financial functions\r\n\r\nType\r\n TPaymentTime = (ptEndOfPeriod,ptStartOfPeriod);\r\n\r\nfunction FutureValue(ARate: double; NPeriods: Integer;\r\n APayment, APresentValue: double; APaymentTime: TPaymentTime): double;\r\n\r\nfunction InterestRate(NPeriods: Integer; APayment, APresentValue, AFutureValue: double;\r\n APaymentTime: TPaymentTime): double;\r\n\r\nfunction NumberOfPeriods(ARate, APayment, APresentValue, AFutureValue: double;\r\n APaymentTime: TPaymentTime): double;\r\n\r\nfunction Payment(ARate: double; NPeriods: Integer;\r\n APresentValue, AFutureValue: double; APaymentTime: TPaymentTime): double;\r\n\r\nfunction PresentValue(ARate: double; NPeriods: Integer;\r\n APayment, AFutureValue: double; APaymentTime: TPaymentTime): double;\r\n\r\n// Miscellaneous\r\n\r\nfunction IfThen(val:boolean;const ifTrue:integer; const ifFalse:integer= 0) :integer; overload;\r\nfunction IfThen(val:boolean;const ifTrue:double ; const ifFalse:double =0.0):double; overload;\r\n\r\nType\r\n TValueRelationship = -1..1;\r\n\r\nconst\r\n EqualsValue = 0;\r\n LessThanValue = Low(TValueRelationship);\r\n GreaterThanValue = High(TValueRelationship);\r\n\r\nfunction CompareValue ( const A, B : Integer) : TValueRelationship;\r\nfunction CompareValue ( const A, B : NativeLargeInt) : TValueRelationship;\r\nfunction CompareValue ( const A, B : NativeLargeUInt) : TValueRelationship;\r\nfunction CompareValue ( const A, B : Double; delta : Double = 0.0) : TValueRelationship;\r\n\r\nfunction MinValue(const Data: array of Double): Double;\r\nfunction MaxValue(const Data: array of Double): Double; overload;\r\nfunction MaxIntValue(const AData: array of Integer): Integer;\r\n\r\nimplementation\r\n\r\nfunction MinValue(const Data: array of Double): Double;\r\nvar\r\n I: Integer;\r\nbegin\r\n Result := Data[Low(Data)];\r\n for I := Low(Data) + 1 to High(Data) do\r\n if Result > Data[I] then\r\n Result := Data[I];\r\nend;\r\n\r\nfunction MaxValue(const Data: array of Double): Double;\r\nvar\r\n I: Integer;\r\nbegin\r\n Result := Data[Low(Data)];\r\n for I := Low(Data) + 1 to High(Data) do\r\n if Result < Data[I] then\r\n Result := Data[I];\r\nend;\r\n\r\nfunction MaxIntValue(const AData: array of Integer): Integer;\r\nvar\r\n lCount: Integer;\r\nbegin\r\n Result := AData[Low(AData)];\r\n for lCount := Low(AData) + 1 to High(AData) do\r\n begin\r\n if Result < AData[lCount] then\r\n Result := AData[lCount];\r\n end;\r\nend;\r\n\r\nfunction InRange(const AValue, AMin, AMax: Integer): Boolean; assembler;\r\nasm\r\n return (AValue >= AMin) && (AValue <= AMax);\r\nend;\r\n\r\nfunction InRange(const AValue, AMin, AMax: Double): Boolean; assembler;\r\nasm\r\n return (AValue >= AMin) && (AValue <= AMax);\r\nend;\r\n\r\nfunction EnsureRange(const AValue, AMin, AMax: Integer): Integer; assembler;\r\nasm\r\n if (AValueAMax){ return AMax;\r\n } else return AValue;\r\nend;\r\n\r\nfunction EnsureRange(const AValue, AMin, AMax: Double): Double; assembler;\r\nasm\r\n if (AValueAMax){ return AMax;\r\n } else return AValue;\r\nend;\r\n\r\nfunction RoundTo(const AValue: Double; const Digits: TRoundToRange): Double;\r\nvar\r\n RV : Double;\r\n\r\nbegin\r\n RV:=IntPower(10,Digits);\r\n Result:=Round(AValue/RV)*RV;\r\nend;\r\n\r\nfunction SimpleRoundTo(const AValue: Double; const Digits: TRoundToRange): Double;\r\nvar\r\n RV : Double;\r\n\r\nbegin\r\n RV := IntPower(10, -Digits);\r\n if AValue < 0 then\r\n Result := Int((AValue*RV) - 0.5)/RV\r\n else\r\n Result := Int((AValue*RV) + 0.5)/RV;\r\nend;\r\n\r\nfunction randg(mean,stddev : float) : float;\r\n\r\nVar\r\n U1,S2 : Float;\r\n\r\nbegin\r\n repeat\r\n u1:= 2*random-1;\r\n S2:=Sqr(U1)+sqr(2*random-1);\r\n until s2<1;\r\n Result:=Sqrt(-2*ln(S2)/S2)*u1*stddev+Mean;\r\nend;\r\n\r\n\r\nfunction RandomRange(const aFrom, aTo: Integer): Integer;\r\nbegin\r\n Result:=Random(Abs(aFrom-aTo))+Min(aTo,AFrom);\r\nend;\r\n\r\n\r\nfunction RandomRange(const aFrom, aTo: NativeLargeInt): NativeLargeInt;\r\n\r\nVar\r\n m : NativeLargeInt;\r\nbegin\r\n if aFromB) then\r\n Result:=((A-B)<=Epsilon)\r\n else\r\n Result:=((B-A)<=Epsilon);\r\nend;\r\n\r\nfunction JSFloor(const A: Double): Double; external name 'Math.floor';\r\nfunction JSCeil(const A: Double): Double; external name 'Math.ceil';\r\n\r\nfunction Ceil(const A: Double): Integer;\r\n\r\nbegin\r\n // TODO: add Range check ?\r\n Result:=trunc(JSCeil(a));\r\nend;\r\n\r\nfunction Floor(const A: Double): Integer;\r\n\r\nbegin\r\n // TODO: add Range check ?\r\n Result:=trunc(JSFloor(a));\r\nend;\r\n\r\nfunction Ceil64(const A: Double): NativeLargeInt;\r\n\r\nbegin\r\n Result:=trunc(JSCeil(a));\r\nend;\r\n\r\nfunction Floor64(const A: Double): NativeLargeInt;\r\n\r\nbegin\r\n Result:=trunc(JSCeil(a));\r\nend;\r\n\r\nprocedure Frexp(X: double; out Mantissa: double; out Exponent: integer);\r\n\r\nbegin\r\n Exponent:=0;\r\n if (X<>0) then\r\n if (abs(X)<0.5) then\r\n repeat\r\n X:=X*2;\r\n Dec(Exponent);\r\n until (abs(X)>=0.5)\r\n else\r\n while (abs(X)>=1) do\r\n begin\r\n X:=X/2;\r\n Inc(Exponent);\r\n end;\r\n Mantissa:=X;\r\nend;\r\n\r\nprocedure SinCos(const A: Double; var B: Double; var C: Double);\r\nbegin\r\n B:=Sin(A);\r\n C:=Cos(A);\r\nend;\r\n\r\nfunction LogN(const Base, A: Double): Double;\r\n\r\nbegin\r\n Result:=Ln(A)/Ln(Base);\r\nend;\r\n\r\nfunction lnxp1(x: double): double;\r\n\r\nvar\r\n y: float;\r\n\r\nbegin\r\n if (x>=4.0) then\r\n result:=ln(1.0+x)\r\n else\r\n begin\r\n y:=1.0+x;\r\n if (y=1.0) then\r\n result:=x\r\n else\r\n begin\r\n result:=ln(y); { lnxp1(-1) = ln(0) = -Inf }\r\n if y>0.0 then\r\n result:=result+(x-(y-1.0))/y;\r\n end;\r\n end;\r\nend;\r\n\r\nfunction ldexp(x : double;const p : Integer) : double;\r\n\r\nbegin\r\n result:=x*intpower(2.0,p);\r\nend;\r\n\r\n\r\nfunction IntPower(base: float; const exponent: Integer): double;\r\n\r\nvar\r\n i : longint;\r\n\r\nbegin\r\n if (base = 0.0) and (exponent = 0) then\r\n result:=1\r\n else\r\n begin\r\n i:=abs(exponent);\r\n Result:=1.0;\r\n while i>0 do\r\n begin\r\n while (i and 1)=0 do\r\n begin\r\n i:=i shr 1;\r\n base:=sqr(base);\r\n end;\r\n i:=i-1;\r\n Result:=Result*base;\r\n end;\r\n if exponent<0 then\r\n Result:=1.0/Result;\r\n end;\r\nend;\r\n\r\nprocedure DivMod(Dividend: LongInt; Divisor: Word; out Result, Remainder: Word);\r\nbegin\r\n if Dividend < 0 then\r\n begin\r\n Dividend:=-Dividend;\r\n Result:=-(Dividend Div Divisor);\r\n Remainder:=-(Dividend+(Result*Divisor));\r\n end\r\n else\r\n begin\r\n Result:=Dividend Div Divisor;\r\n Remainder:=Dividend-(Result*Divisor);\r\n end;\r\nend;\r\n\r\n\r\nprocedure DivMod(Dividend: LongInt; Divisor: Word; out Result,\r\n Remainder: SmallInt);\r\nbegin\r\n if Dividend < 0 then\r\n begin\r\n Dividend:=-Dividend;\r\n Result:=-(Dividend Div Divisor);\r\n Remainder:=-(Dividend+(Result*Divisor));\r\n end\r\n else\r\n begin\r\n Result:=Dividend Div Divisor;\r\n Remainder:=Dividend-(Result*Divisor);\r\n end;\r\nend;\r\n\r\n\r\nprocedure DivMod(Dividend: DWord; Divisor: DWord; out Result, Remainder: DWord);\r\nbegin\r\n Result:=Dividend Div Divisor;\r\n Remainder:=Dividend-(Result*Divisor);\r\nend;\r\n\r\n\r\nprocedure DivMod(Dividend: LongInt; Divisor: LongInt; out Result,\r\n Remainder: LongInt);\r\n\r\nbegin\r\n if Dividend < 0 then\r\n begin\r\n Dividend:=-Dividend;\r\n Result:=-(Dividend Div Divisor);\r\n Remainder:=-(Dividend+(Result*Divisor));\r\n end\r\n else\r\n begin\r\n Result:=Dividend Div Divisor;\r\n Remainder:=Dividend-(Result*Divisor);\r\n end;\r\nend;\r\n\r\n{ ---------------------------------------------------------------------\r\n Angle conversion\r\n ---------------------------------------------------------------------}\r\nfunction DegToRad(deg: double): double;\r\n\r\nbegin\r\n Result:=deg*(pi/180.0);\r\nend;\r\n\r\n\r\nfunction RadToDeg(rad: double): double;\r\n\r\nbegin\r\n Result:=rad*(180.0/pi);\r\nend;\r\n\r\n\r\nfunction GradToRad(grad: double): double;\r\n\r\nbegin\r\n Result:=grad*(pi/200.0);\r\nend;\r\n\r\n\r\nfunction RadToGrad(rad: double): double;\r\n\r\nbegin\r\n Result:=rad*(200.0/pi);\r\nend;\r\n\r\n\r\nfunction DegToGrad(deg: double): double;\r\n\r\nbegin\r\n Result:=deg*(200.0/180.0);\r\nend;\r\n\r\n\r\nfunction GradToDeg(grad: double): double;\r\n\r\nbegin\r\n Result:=grad*(180.0/200.0);\r\nend;\r\n\r\n\r\nfunction CycleToRad(cycle: double): double;\r\n\r\nbegin\r\n Result:=(2*pi)*cycle;\r\nend;\r\n\r\n\r\nfunction RadToCycle(rad: double): double;\r\n\r\nbegin\r\n Result:=rad*(1/(2*pi));\r\nend;\r\n\r\n\r\nfunction DegNormalize(deg: double): double;\r\n\r\nbegin\r\n Result:=Deg-Int(Deg/360)*360;\r\n If (Result<0) then Result:=Result+360;\r\nend;\r\n\r\nfunction sumofsquares(const data : array of double) : double;\r\nvar\r\n i,N : longint;\r\n\r\nbegin\r\n N:=Length(Data);\r\n Result:=0.0;\r\n for i:=0 to N-1 do\r\n Result:=Result+sqr(data[i]);\r\nend;\r\n\r\nfunction Norm(const data: array of double): double;\r\nbegin\r\n Result:=sqrt(sumofsquares(data));\r\nend;\r\n\r\n{ ---------------------------------------------------------------------\r\n Statistical functions\r\n ---------------------------------------------------------------------}\r\n\r\nfunction Sum(const data: array of double): double;\r\n\r\nvar\r\n i,N : longint;\r\n\r\nbegin\r\n N:=Length(Data);\r\n Result:=0.0;\r\n for i:=0 to N-1 do\r\n Result:=Result+data[i];\r\nend;\r\n\r\nfunction Mean(const data: array of double): double;\r\n\r\nVar\r\n N : integer;\r\n\r\nbegin\r\n N:=Length(Data);\r\n if N=0 then\r\n Result:=0\r\n else\r\n Result:=Sum(Data)/N;\r\nend;\r\nprocedure SumsAndSquares(const data: array of Double; out Sum,\r\n SumOfSquares: double);\r\n\r\nvar\r\n i,n : Integer;\r\n t,s,ss: double;\r\n\r\nbegin\r\n n:=length(Data);\r\n ss:=0.0; // Use local vars, var is very inefficient in js\r\n s:=0.0;\r\n for i:=0 to N-1 do\r\n begin\r\n t:=data[i];\r\n ss:=ss+sqr(t);\r\n s:=s+t;\r\n end;\r\n Sum:=s;\r\n SumOfSquares:=ss;\r\nend;\r\n\r\nfunction StdDev(const data: array of Double): float;\r\n\r\nbegin\r\n Result:=Sqrt(Variance(Data));\r\nend;\r\n\r\nfunction Variance(const data: array of Double): double;\r\n\r\nvar\r\n n : integer;\r\n\r\nbegin\r\n N:=Length(Data);\r\n If N=1 then\r\n Result:=0\r\n else\r\n Result:=TotalVariance(Data)/(N-1);\r\nend;\r\n\r\nfunction TotalVariance(const data: array of Double): double;\r\n\r\nvar\r\n S,SS : Float;\r\n N : integer;\r\nbegin\r\n N:=Length(Data);\r\n If Length(Data)=1 then\r\n Result:=0\r\n else\r\n begin\r\n SumsAndSquares(Data,S,SS);\r\n Result := SS-Sqr(S)/N;\r\n end;\r\nend;\r\n\r\nprocedure MeanAndStdDev(const data: array of Double; out Mean, StdDev: double);\r\n\r\nVar\r\n I,N : longint;\r\n M,S : Double;\r\n\r\nbegin\r\n N:=Length(Data);\r\n M:=0;\r\n S:=0;\r\n For I:=0 to N-1 do\r\n begin\r\n M:=M+Data[i];\r\n S:=S+Sqr(Data[i]);\r\n end;\r\n M:=M/N;\r\n S:=(S-N*Sqr(M));\r\n If N>1 then\r\n S:=Sqrt(S/(N-1))\r\n else\r\n S:=0;\r\n Mean:=M;\r\n StdDev:=S;\r\nend;\r\n\r\nfunction PopNStdDev(const data : array of Double) : double;\r\n\r\nbegin\r\n Result:=Sqrt(PopnVariance(Data));\r\nend;\r\n\r\nfunction PopNVariance(const data : array of Double) : double;\r\n\r\nVar\r\n N : integer;\r\n\r\nbegin\r\n N:=Length(Data);\r\n if N=0 then\r\n Result:=0\r\n else\r\n Result:=TotalVariance(Data)/N;\r\nend;\r\n\r\nprocedure MomentSkewKurtosis(const data: array of Double; out m1, m2, m3, m4, skew, kurtosis: double);\r\n\r\nvar\r\n i,N: integer;\r\n deviation, deviation2: double;\r\n reciprocalN: float;\r\n // Use local vars for all calculations, var is very slow\r\n lm1, lm2, lm3, lm4, lskew, lkurtosis: double;\r\n\r\nbegin\r\n N:=length(Data);\r\n lm1 := 0;\r\n reciprocalN := 1/N;\r\n for i := 0 to N-1 do\r\n lm1 := lm1 + data[i];\r\n lm1 := reciprocalN * lm1;\r\n\r\n lm2 := 0;\r\n lm3 := 0;\r\n lm4 := 0;\r\n for i := 0 to N-1 do\r\n begin\r\n deviation := (data[i]-lm1);\r\n deviation2 := deviation * deviation;\r\n lm2 := lm2 + deviation2;\r\n lm3 := lm3 + deviation2 * deviation;\r\n lm4 := lm4 + deviation2 * deviation2;\r\n end;\r\n lm2 := reciprocalN * lm2;\r\n lm3 := reciprocalN * lm3;\r\n lm4 := reciprocalN * lm4;\r\n\r\n lskew := lm3 / (sqrt(lm2)*lm2);\r\n lkurtosis := lm4 / (lm2 * lm2);\r\n\r\n m1:=lm1;\r\n m2:=lm2;\r\n m3:=lm3;\r\n m4:=lm4;\r\n skew:=lskew;\r\n kurtosis:=lkurtosis;\r\nend;\r\n\r\n{ ---------------------------------------------------------------------\r\n Financial functions\r\n ---------------------------------------------------------------------}\r\n\r\nfunction FutureValue(ARate: double; NPeriods: Integer;\r\n APayment, APresentValue: double; APaymentTime: TPaymentTime): double;\r\nvar\r\n q, qn, factor: double;\r\nbegin\r\n if ARate = 0 then\r\n Result := -APresentValue - APayment * NPeriods\r\n else begin\r\n q := 1.0 + ARate;\r\n qn := power(q, NPeriods);\r\n factor := (qn - 1) / (q - 1);\r\n if APaymentTime = ptStartOfPeriod then\r\n factor := factor * q;\r\n Result := -(APresentValue * qn + APayment*factor);\r\n end;\r\nend;\r\n\r\nfunction InterestRate(NPeriods: Integer; APayment, APresentValue, AFutureValue: double;\r\n APaymentTime: TPaymentTime): double;\r\n{ The interest rate cannot be calculated analytically. We solve the equation\r\n numerically by means of the Newton method:\r\n - guess value for the interest reate\r\n - calculate at which interest rate the tangent of the curve fv(rate)\r\n (straight line!) has the requested future vale.\r\n - use this rate for the next iteration. }\r\nconst\r\n DELTA = 0.001;\r\n EPS = 1E-9; // required precision of interest rate (after typ. 6 iterations)\r\n MAXIT = 20; // max iteration count to protect agains non-convergence\r\nvar\r\n r1, r2, dr: double;\r\n fv1, fv2: double;\r\n iteration: Integer;\r\nbegin\r\n iteration := 0;\r\n r1 := 0.05; // inital guess\r\n repeat\r\n r2 := r1 + DELTA;\r\n fv1 := FutureValue(r1, NPeriods, APayment, APresentValue, APaymentTime);\r\n fv2 := FutureValue(r2, NPeriods, APayment, APresentValue, APaymentTime);\r\n dr := (AFutureValue - fv1) / (fv2 - fv1) * delta; // tangent at fv(r)\r\n r1 := r1 + dr; // next guess\r\n inc(iteration);\r\n until (abs(dr) < EPS) or (iteration >= MAXIT);\r\n Result := r1;\r\nend;\r\n\r\nfunction NumberOfPeriods(ARate, APayment, APresentValue, AFutureValue: double;\r\n APaymentTime: TPaymentTime): double;\r\n{ Solve the cash flow equation (1) for q^n and take the logarithm }\r\nvar\r\n q, x1, x2: double;\r\nbegin\r\n if ARate = 0 then\r\n Result := -(APresentValue + AFutureValue) / APayment\r\n else begin\r\n q := 1.0 + ARate;\r\n if APaymentTime = ptStartOfPeriod then\r\n APayment := APayment * q;\r\n x1 := APayment - AFutureValue * ARate;\r\n x2 := APayment + APresentValue * ARate;\r\n if (x2 = 0) // we have to divide by x2\r\n or (sign(x1) * sign(x2) < 0) // the argument of the log is negative\r\n then\r\n Result := Infinity\r\n else begin\r\n Result := ln(x1/x2) / ln(q);\r\n end;\r\n end;\r\nend;\r\n\r\nfunction Payment(ARate: double; NPeriods: Integer;\r\n APresentValue, AFutureValue: double; APaymentTime: TPaymentTime): double;\r\nvar\r\n q, qn, factor: double;\r\nbegin\r\n if ARate = 0 then\r\n Result := -(AFutureValue + APresentValue) / NPeriods\r\n else begin\r\n q := 1.0 + ARate;\r\n qn := power(q, NPeriods);\r\n factor := (qn - 1) / (q - 1);\r\n if APaymentTime = ptStartOfPeriod then\r\n factor := factor * q;\r\n Result := -(AFutureValue + APresentValue * qn) / factor;\r\n end;\r\nend;\r\n\r\nfunction PresentValue(ARate: double; NPeriods: Integer;\r\n APayment, AFutureValue: double; APaymentTime: TPaymentTime): double;\r\nvar\r\n q, qn, factor: double;\r\nbegin\r\n if ARate = 0.0 then\r\n Result := -AFutureValue - APayment * NPeriods\r\n else begin\r\n q := 1.0 + ARate;\r\n qn := power(q, NPeriods);\r\n factor := (qn - 1) / (q - 1);\r\n if APaymentTime = ptStartOfPeriod then\r\n factor := factor * q;\r\n Result := -(AFutureValue + APayment*factor) / qn;\r\n end;\r\nend;\r\n\r\n{ ---------------------------------------------------------------------\r\n Miscellaneous\r\n ---------------------------------------------------------------------}\r\n\r\nfunction IfThen(val: boolean; const ifTrue: integer; const ifFalse: integer): integer;\r\n\r\nbegin\r\n if val then result:=iftrue else result:=iffalse;\r\nend;\r\n\r\nfunction IfThen(val: boolean; const ifTrue: double; const ifFalse: double): double;\r\n\r\nbegin\r\n if val then result:=iftrue else result:=iffalse;\r\nend;\r\n\r\nfunction CompareValue(const A, B : Integer): TValueRelationship;\r\n\r\nbegin\r\n result:=GreaterThanValue;\r\n if a=b then\r\n result:=EqualsValue\r\n else\r\n if a(const Value: T): TValue; static;\r\n class function FromArray(TypeInfo: TTypeInfo; const Values: specialize TArray): TValue; static;\r\n class function FromJSValue(v: JSValue): TValue; static;\r\n class function FromOrdinal(ATypeInfo: TTypeInfo; AValue: JSValue): TValue; static;\r\n class procedure Make(const ABuffer: JSValue; const ATypeInfo: PTypeInfo; var Result: TValue); overload; static;\r\n generic class procedure Make(const Value: T; var Result: TValue); overload; static;\r\n\r\n function AsBoolean: boolean;\r\n function AsClass: TClass;\r\n //ToDo: function AsCurrency: Currency;\r\n function AsExtended: Extended;\r\n function AsInteger: Integer;\r\n function AsInterface: IInterface;\r\n function AsJSValue: JSValue;\r\n function AsNativeInt: NativeInt;\r\n function AsObject: TObject;\r\n function AsOrdinal: NativeInt;\r\n function AsString: string;\r\n generic function AsType: T;\r\n function AsUnicodeString: UnicodeString;\r\n function Cast(ATypeInfo: TTypeInfo; const EmptyAsAnyType: Boolean = True): TValue; overload;\r\n generic function Cast(const EmptyAsAnyType: Boolean = True): TValue; overload;\r\n function IsType(ATypeInfo: TTypeInfo; const EmptyAsAnyType: Boolean = True): Boolean; overload;\r\n generic function IsType(const EmptyAsAnyType: Boolean = True): Boolean; overload;\r\n generic function TryAsType(var AResult: T; const EmptyAsAnyType: Boolean = True): Boolean;\r\n\r\n function GetArrayElement(aIndex: SizeInt): TValue;\r\n function GetArrayLength: SizeInt;\r\n function IsArray: boolean;\r\n function IsClass: boolean;\r\n function IsObject: boolean;\r\n function IsObjectInstance: boolean;\r\n function IsOrdinal: boolean;\r\n function IsType(ATypeInfo: TTypeInfo): boolean;\r\n function ToString: String;\r\n function TryCast(ATypeInfo: TTypeInfo; out AResult: TValue; const EmptyAsAnyType: Boolean = True): Boolean;\r\n\r\n procedure SetArrayElement(aIndex: SizeInt; const AValue: TValue);\r\n procedure SetArrayLength(const Size: SizeInt);\r\n\r\n property IsEmpty: boolean read GetIsEmpty; // check if nil or undefined\r\n property Kind: TTypeKind read GetTypeKind;\r\n property TypeInfo: TTypeInfo read FTypeInfo;\r\n end;\r\n\r\n TRttiType = class;\r\n TRttiInstanceType = class;\r\n TRttiInstanceExternalType = class;\r\n\r\n { TRTTIContext }\r\n\r\n TRTTIContext = record\r\n public\r\n class function Create: TRTTIContext; static;\r\n procedure Free;\r\n\r\n function FindType(const AQualifiedName: String): TRttiType;\r\n function GetType(aTypeInfo: PTypeInfo): TRTTIType; overload;\r\n function GetType(aClass: TClass): TRTTIType; overload;\r\n function GetTypes: specialize TArray;\r\n\r\n class procedure KeepContext; static;\r\n class procedure DropContext; static;\r\n end;\r\n\r\n { TRttiObject }\r\n\r\n TRttiObject = class abstract\r\n private\r\n FAttributesLoaded: Boolean;\r\n FAttributes: TCustomAttributeArray;\r\n FParent: TRttiObject;\r\n FHandle: Pointer;\r\n protected\r\n function LoadCustomAttributes: TCustomAttributeArray; virtual;\r\n public\r\n constructor Create(AParent: TRttiObject; AHandle: Pointer); virtual;\r\n\r\n destructor Destroy; override;\r\n\r\n function GetAttributes: TCustomAttributeArray;\r\n generic function GetAttribute: T;\r\n function GetAttribute(const Attribute: TCustomAttributeClass): TCustomAttribute;\r\n generic function HasAttribute: Boolean;\r\n function HasAttribute(const Attribute: TCustomAttributeClass): Boolean;\r\n\r\n property Attributes: TCustomAttributeArray read GetAttributes;\r\n property Handle: Pointer read FHandle;\r\n property Parent: TRttiObject read FParent;\r\n end;\r\n\r\n { TRttiNamedObject }\r\n\r\n TRttiNamedObject = class(TRttiObject)\r\n protected\r\n function GetName: string; virtual;\r\n public\r\n property Name: string read GetName;\r\n end;\r\n\r\n { TRttiMember }\r\n\r\n TMemberVisibility=(\r\n mvPrivate,\r\n mvProtected,\r\n mvPublic,\r\n mvPublished);\r\n\r\n TRttiMember = class(TRttiNamedObject)\r\n protected\r\n function GetMemberTypeInfo: TTypeMember;\r\n function GetName: String; override;\r\n function GetParent: TRttiType;\r\n function GetVisibility: TMemberVisibility; virtual;\r\n function LoadCustomAttributes: TCustomAttributeArray; override;\r\n public\r\n constructor Create(AParent: TRttiType; ATypeInfo: TTypeMember); reintroduce;\r\n\r\n property MemberTypeInfo: TTypeMember read GetMemberTypeInfo;\r\n property Parent: TRttiType read GetParent;\r\n property Visibility: TMemberVisibility read GetVisibility;\r\n end;\r\n\r\n { TRttiField }\r\n\r\n TRttiField = class(TRttiMember)\r\n private\r\n function GetFieldType: TRttiType;\r\n function GetFieldTypeInfo: TTypeMemberField;\r\n public\r\n constructor Create(AParent: TRttiType; ATypeInfo: TTypeMember);\r\n function GetValue(Instance: JSValue): TValue;\r\n procedure SetValue(Instance: JSValue; const AValue: TValue);\r\n property FieldType: TRttiType read GetFieldType;\r\n property FieldTypeInfo: TTypeMemberField read GetFieldTypeInfo;\r\n end;\r\n\r\n TRttiFieldArray = specialize TArray;\r\n\r\n { TRttiParameter }\r\n\r\n TRttiParameter = class(TRttiNamedObject)\r\n private\r\n FParamType: TRttiType;\r\n FFlags: TParamFlags;\r\n FName: String;\r\n protected\r\n function GetName: string; override;\r\n public\r\n property Flags: TParamFlags read FFlags;\r\n property ParamType: TRttiType read FParamType;\r\n end;\r\n\r\n TRttiParameterArray = specialize TArray;\r\n\r\n { TRttiMethod }\r\n\r\n TRttiMethod = class(TRttiMember)\r\n private\r\n FParameters: TRttiParameterArray;\r\n FParametersLoaded: Boolean;\r\n\r\n function GetIsAsyncCall: Boolean;\r\n function GetIsClassMethod: Boolean;\r\n function GetIsConstructor: Boolean;\r\n function GetIsDestructor: Boolean;\r\n function GetIsExternal: Boolean;\r\n function GetIsSafeCall: Boolean;\r\n function GetIsStatic: Boolean;\r\n function GetMethodKind: TMethodKind;\r\n function GetMethodTypeInfo: TTypeMemberMethod;\r\n function GetProcedureFlags: TProcedureFlags;\r\n function GetReturnType: TRttiType;\r\n\r\n procedure LoadParameters;\r\n protected\r\n function GetIsVarArgs: Boolean;\r\n public\r\n function GetParameters: TRttiParameterArray;\r\n function Invoke(const Instance: TValue; const Args: array of TValue): TValue;\r\n function Invoke(const Instance: TObject; const Args: array of TValue): TValue;\r\n function Invoke(const aClass: TClass; const Args: array of TValue): TValue;\r\n\r\n property IsAsyncCall: Boolean read GetIsAsyncCall;\r\n property IsClassMethod: Boolean read GetIsClassMethod;\r\n property IsConstructor: Boolean read GetIsConstructor;\r\n property IsDestructor: Boolean read GetIsDestructor;\r\n property IsExternal: Boolean read GetIsExternal;\r\n property IsSafeCall: Boolean read GetIsSafeCall;\r\n property IsStatic: Boolean read GetIsStatic;\r\n property MethodKind: TMethodKind read GetMethodKind;\r\n property MethodTypeInfo: TTypeMemberMethod read GetMethodTypeInfo;\r\n property ReturnType: TRttiType read GetReturnType;\r\n end;\r\n\r\n TRttiMethodArray = specialize TArray;\r\n\r\n { TRttiProperty }\r\n\r\n TRttiProperty = class(TRttiMember)\r\n private\r\n function GetPropertyTypeInfo: TTypeMemberProperty;\r\n function GetPropertyType: TRttiType;\r\n function GetIsWritable: boolean;\r\n function GetIsReadable: boolean;\r\n protected\r\n function GetVisibility: TMemberVisibility; override;\r\n public\r\n constructor Create(AParent: TRttiType; ATypeInfo: TTypeMember);\r\n\r\n function GetValue(Instance: JSValue): TValue;\r\n\r\n procedure SetValue(Instance: JSValue; const AValue: TValue);\r\n\r\n property PropertyTypeInfo: TTypeMemberProperty read GetPropertyTypeInfo;\r\n property PropertyType: TRttiType read GetPropertyType;\r\n property IsReadable: boolean read GetIsReadable;\r\n property IsWritable: boolean read GetIsWritable;\r\n property Visibility: TMemberVisibility read GetVisibility;\r\n end;\r\n\r\n TRttiInstanceProperty = class(TRttiProperty)\r\n end;\r\n\r\n TRttiPropertyArray = specialize TArray;\r\n\r\n { TRttiType }\r\n\r\n TRttiType = class(TRttiNamedObject)\r\n private\r\n //FMethods: specialize TArray;\r\n function GetAsInstance: TRttiInstanceType;\r\n function GetAsInstanceExternal: TRttiInstanceExternalType;\r\n function GetHandle: TTypeInfo;\r\n function GetQualifiedName: String;\r\n protected\r\n function GetName: string; override;\r\n //function GetHandle: Pointer; override;\r\n function GetIsInstance: Boolean;\r\n function GetIsInstanceExternal: Boolean;\r\n //function GetIsManaged: Boolean; virtual;\r\n function GetIsOrdinal: Boolean; virtual;\r\n function GetIsRecord: Boolean; virtual;\r\n function GetIsSet: Boolean; virtual;\r\n function GetTypeKind: TTypeKind; virtual;\r\n //function GetTypeSize: integer; virtual;\r\n function GetBaseType: TRttiType; virtual;\r\n function LoadCustomAttributes: TCustomAttributeArray; override;\r\n public\r\n function GetField(const AName: string): TRttiField; virtual;\r\n function GetFields: TRttiFieldArray; virtual;\r\n function GetMethods: TRttiMethodArray; virtual;\r\n function GetMethods(const aName: String): TRttiMethodArray; virtual;\r\n function GetMethod(const aName: String): TRttiMethod; virtual;\r\n function GetProperty(const AName: string): TRttiProperty; virtual;\r\n //function GetIndexedProperty(const AName: string): TRttiIndexedProperty; virtual;\r\n function GetProperties: TRttiPropertyArray; virtual;\r\n function GetDeclaredProperties: TRttiPropertyArray; virtual;\r\n //function GetDeclaredIndexedProperties: TRttiIndexedPropertyArray; virtual;\r\n function GetDeclaredMethods: TRttiMethodArray; virtual;\r\n function GetDeclaredFields: TRttiFieldArray; virtual;\r\n\r\n property Handle: TTypeInfo read GetHandle;\r\n property IsInstance: Boolean read GetIsInstance;\r\n property IsInstanceExternal: Boolean read GetIsInstanceExternal;\r\n //property isManaged: Boolean read GetIsManaged;\r\n property IsOrdinal: Boolean read GetIsOrdinal;\r\n property IsRecord: Boolean read GetIsRecord;\r\n property IsSet: Boolean read GetIsSet;\r\n property BaseType: TRttiType read GetBaseType;\r\n property AsInstance: TRttiInstanceType read GetAsInstance;\r\n property AsInstanceExternal: TRttiInstanceExternalType read GetAsInstanceExternal;\r\n property TypeKind: TTypeKind read GetTypeKind;\r\n //property TypeSize: integer read GetTypeSize;\r\n property QualifiedName: String read GetQualifiedName;\r\n end;\r\n\r\n TRttiTypeClass = class of TRttiType;\r\n\r\n { TRttiStructuredType }\r\n\r\n TRttiStructuredType = class abstract(TRttiType)\r\n private\r\n FFields: TRttiFieldArray;\r\n FMethods: TRttiMethodArray;\r\n FProperties: TRttiPropertyArray;\r\n protected\r\n function GetAncestor: TRttiStructuredType; virtual;\r\n function GetStructTypeInfo: TTypeInfoStruct;\r\n public\r\n constructor Create(AParent: TRttiObject; ATypeInfo: PTypeInfo); override;\r\n\r\n destructor Destroy; override;\r\n\r\n function GetDeclaredFields: TRttiFieldArray; override;\r\n function GetDeclaredMethods: TRttiMethodArray; override;\r\n function GetDeclaredProperties: TRttiPropertyArray; override;\r\n function GetFields: TRttiFieldArray; override;\r\n function GetMethod(const aName: String): TRttiMethod; override;\r\n function GetMethods: TRttiMethodArray; override;\r\n function GetMethods(const aName: String): TRttiMethodArray; override;\r\n function GetProperties: TRttiPropertyArray; override;\r\n function GetProperty(const AName: string): TRttiProperty; override;\r\n\r\n property StructTypeInfo: TTypeInfoStruct read GetStructTypeInfo;\r\n end;\r\n\r\n { TRttiInstanceType }\r\n\r\n TRttiInstanceType = class(TRttiStructuredType)\r\n private\r\n function GetAncestorType: TRttiInstanceType;\r\n function GetClassTypeInfo: TTypeInfoClass;\r\n function GetMetaClassType: TClass;\r\n protected\r\n function GetAncestor: TRttiStructuredType; override;\r\n function GetBaseType : TRttiType; override;\r\n public\r\n constructor Create(AParent: TRttiObject; ATypeInfo: PTypeInfo); override;\r\n property BaseType : TRttiInstanceType read GetAncestorType;\r\n property Ancestor: TRttiInstanceType read GetAncestorType;\r\n property ClassTypeInfo: TTypeInfoClass read GetClassTypeInfo;\r\n property MetaClassType: TClass read GetMetaClassType;\r\n end;\r\n\r\n { TRttiInterfaceType }\r\n\r\n TRttiInterfaceType = class(TRttiStructuredType)\r\n private\r\n function GetAncestorType: TRttiInterfaceType;\r\n function GetGUID: TGUID;\r\n function GetInterfaceTypeInfo: TTypeInfoInterface;\r\n protected\r\n function GetAncestor: TRttiStructuredType; override;\r\n function GetBaseType : TRttiType; override;\r\n public\r\n constructor Create(AParent: TRttiObject; ATypeInfo: PTypeInfo); override;\r\n\r\n property BaseType : TRttiInterfaceType read GetAncestorType;\r\n property Ancestor: TRttiInterfaceType read GetAncestorType;\r\n property GUID: TGUID read GetGUID;\r\n property InterfaceTypeInfo: TTypeInfoInterface read GetInterfaceTypeInfo;\r\n end;\r\n\r\n { TRttiRecordType }\r\n\r\n TRttiRecordType = class(TRttiStructuredType)\r\n private\r\n function GetRecordTypeInfo: TTypeInfoRecord;\r\n protected\r\n function GetIsRecord: Boolean; override;\r\n public\r\n constructor Create(AParent: TRttiObject; ATypeInfo: PTypeInfo); override;\r\n\r\n property RecordTypeInfo: TTypeInfoRecord read GetRecordTypeInfo;\r\n end;\r\n\r\n { TRttiClassRefType }\r\n TRttiClassRefType = class(TRttiType)\r\n private\r\n function GetClassRefTypeInfo: TTypeInfoClassRef;\r\n function GetInstanceType: TRttiInstanceType;\r\n function GetMetaclassType: TClass;\r\n public\r\n constructor Create(AParent: TRttiObject; ATypeInfo: PTypeInfo); override;\r\n\r\n property ClassRefTypeInfo: TTypeInfoClassRef read GetClassRefTypeInfo;\r\n property InstanceType: TRttiInstanceType read GetInstanceType;\r\n property MetaclassType: TClass read GetMetaclassType;\r\n end;\r\n\r\n { TRttiInstanceExternalType }\r\n\r\n TRttiInstanceExternalType = class(TRttiType)\r\n private\r\n function GetAncestor: TRttiInstanceExternalType;\r\n function GetExternalName: String;\r\n function GetExternalClassTypeInfo: TTypeInfoExtClass;\r\n public\r\n constructor Create(AParent: TRttiObject; ATypeInfo: PTypeInfo); override;\r\n\r\n property Ancestor: TRttiInstanceExternalType read GetAncestor;\r\n property ExternalClassTypeInfo: TTypeInfoExtClass read GetExternalClassTypeInfo;\r\n property ExternalName: String read GetExternalName;\r\n end;\r\n\r\n { TRttiOrdinalType }\r\n\r\n TRttiOrdinalType = class(TRttiType)\r\n private\r\n function GetMaxValue: Integer; virtual;\r\n function GetMinValue: Integer; virtual;\r\n function GetOrdType: TOrdType;\r\n function GetOrdinalTypeInfo: TTypeInfoInteger;\r\n public\r\n constructor Create(AParent: TRttiObject; ATypeInfo: PTypeInfo); override;\r\n\r\n property OrdType: TOrdType read GetOrdType;\r\n property MinValue: Integer read GetMinValue;\r\n property MaxValue: Integer read GetMaxValue;\r\n property OrdinalTypeInfo: TTypeInfoInteger read GetOrdinalTypeInfo;\r\n end;\r\n\r\n { TRttiEnumerationType }\r\n\r\n TRttiEnumerationType = class(TRttiOrdinalType)\r\n private\r\n function GetEnumerationTypeInfo: TTypeInfoEnum;\r\n public\r\n constructor Create(AParent: TRttiObject; ATypeInfo: PTypeInfo); override;\r\n\r\n property EnumerationTypeInfo: TTypeInfoEnum read GetEnumerationTypeInfo;\r\n\r\n function GetNames: TStringArray;\r\n generic class function GetName(AValue: T): String; reintroduce;\r\n generic class function GetValue(const AValue: String): T;\r\n end;\r\n\r\n { TRttiDynamicArrayType }\r\n\r\n TRttiDynamicArrayType = class(TRttiType)\r\n private\r\n function GetDynArrayTypeInfo: TTypeInfoDynArray;\r\n function GetElementType: TRttiType;\r\n public\r\n constructor Create(AParent: TRttiObject; ATypeInfo: PTypeInfo); override;\r\n\r\n property DynArrayTypeInfo: TTypeInfoDynArray read GetDynArrayTypeInfo;\r\n property ElementType: TRttiType read GetElementType;\r\n end;\r\n\r\n EInvoke = EJS;\r\n\r\n TVirtualInterfaceInvokeEvent = reference to procedure(Method: TRttiMethod; const Args: specialize TArray; out Result: TValue);\r\n TVirtualInterfaceInvokeEventJS = reference to function(const aMethodName: String; const Args: TJSValueDynArray): JSValue;\r\n\r\n { TVirtualInterface: A class that can implement any IInterface. Any method\r\n call is handled by the OnInvoke event. }\r\n TVirtualInterface = class(TInterfacedObject, IInterface)\r\n private\r\n FContext: TRttiContext;\r\n FInterfaceType: TRttiInterfaceType;\r\n FOnInvoke: TVirtualInterfaceInvokeEvent;\r\n FOnInvokeJS: TVirtualInterfaceInvokeEventJS;\r\n\r\n function Invoke(const MethodName: String; const Args: TJSValueDynArray): JSValue;\r\n public\r\n constructor Create(InterfaceTypeInfo: TTypeInfoInterface); overload;\r\n constructor Create(InterfaceTypeInfo: TTypeInfoInterface; const InvokeEvent: TVirtualInterfaceInvokeEvent); overload;\r\n constructor Create(InterfaceTypeInfo: TTypeInfoInterface; const InvokeEvent: TVirtualInterfaceInvokeEventJS); overload;\r\n\r\n destructor Destroy; override;\r\n\r\n function QueryInterface(const iid: TGuid; out obj): Integer; override;\r\n\r\n property OnInvoke: TVirtualInterfaceInvokeEvent read FOnInvoke write FOnInvoke;\r\n property OnInvokeJS: TVirtualInterfaceInvokeEventJS read FOnInvokeJS write FOnInvokeJS;\r\n end;\r\n\r\nprocedure CreateVirtualCorbaInterface(InterfaceTypeInfo: Pointer;\r\n const MethodImplementation: TVirtualInterfaceInvokeEvent; out IntfVar); assembler;\r\n\r\nfunction Invoke(ACodeAddress: Pointer; const AArgs: TJSValueDynArray;\r\n ACallConv: TCallConv; AResultType: PTypeInfo; AIsStatic: Boolean;\r\n AIsConstructor: Boolean): TValue;\r\n\r\nimplementation\r\n\r\ntype\r\n TRttiPoolTypes = class\r\n private\r\n FReferenceCount: Integer;\r\n FTypes: TJSObject; // maps 'modulename.typename' to TRTTIType\r\n public\r\n constructor Create;\r\n\r\n destructor Destroy; override;\r\n\r\n function FindType(const AQualifiedName: String): TRttiType;\r\n function GetType(const ATypeInfo: PTypeInfo): TRTTIType; overload;\r\n function GetType(const AClass: TClass): TRTTIType; overload;\r\n\r\n class function AcquireContext: TJSObject; static;\r\n\r\n class procedure ReleaseContext; static;\r\n end;\r\n\r\nvar\r\n Pool: TRttiPoolTypes;\r\n pas: TJSObject; external name 'pas';\r\n\r\nprocedure CreateVirtualCorbaInterface(InterfaceTypeInfo: Pointer;\r\n const MethodImplementation: TVirtualInterfaceInvokeEvent; out IntfVar); assembler;\r\nasm\r\n var IntfType = InterfaceTypeInfo.interface;\r\n var i = Object.create(IntfType);\r\n var o = { $name: \"virtual\", $fullname: \"virtual\" };\r\n i.$o = o;\r\n do {\r\n var names = IntfType.$names;\r\n if (!names) break;\r\n for (var j=0; j(AValue: T): String;\r\n\r\nVar\r\n P : PTypeInfo;\r\n\r\nbegin\r\n P:=TypeInfo(T);\r\n if not (TTypeInfo(P).kind=tkEnumeration) then\r\n raise EInvalidCast.CreateFmt(SErrTypeIsNotEnumerated,[TTypeInfo(P).Name]);\r\n Result := GetEnumName(TTypeInfoEnum(P), Integer(JSValue(AValue)));\r\nend;\r\n\r\ngeneric class function TRttiEnumerationType.GetValue(const AValue: String): T;\r\n\r\nVar\r\n P : PTypeInfo;\r\n\r\nbegin\r\n P:=TypeInfo(T);\r\n if not (TTypeInfo(P).kind=tkEnumeration) then\r\n raise EInvalidCast.CreateFmt(SErrTypeIsNotEnumerated,[TTypeInfo(P).Name]);\r\n Result := T(JSValue(GetEnumValue(TTypeInfoEnum(TypeInfo(T)), AValue)));\r\nend;\r\n\r\nconstructor TRttiEnumerationType.Create(AParent: TRttiObject; ATypeInfo: PTypeInfo);\r\nbegin\r\n if not (TTypeInfo(ATypeInfo) is TTypeInfoEnum) then\r\n raise EInvalidCast.Create('');\r\n\r\n inherited;\r\nend;\r\n\r\n{ TValue }\r\n\r\nfunction TValue.GetTypeKind: TTypeKind;\r\nbegin\r\n if TypeInfo=nil then\r\n Result:=tkUnknown\r\n else\r\n Result:=FTypeInfo.Kind;\r\nend;\r\n\r\ngeneric function TValue.AsType: T;\r\nbegin\r\n if IsEmpty then\r\n Result := Default(T)\r\n else\r\n Result := T(AsJSValue)\r\nend;\r\n\r\ngeneric class function TValue.From(const Value: T): TValue;\r\nbegin\r\n Make(Value, System.TypeInfo(T), Result);\r\nend;\r\n\r\nclass procedure TValue.Make(const ABuffer: JSValue; const ATypeInfo: PTypeInfo; var Result: TValue);\r\nbegin\r\n Result.FData := ABuffer;\r\n Result.FTypeInfo := ATypeInfo;\r\nend;\r\n\r\ngeneric class procedure TValue.Make(const Value: T; var Result: TValue);\r\nbegin\r\n TValue.Make(Value, System.TypeInfo(T), Result);\r\nend;\r\n\r\nfunction TValue.Cast(ATypeInfo: TTypeInfo; const EmptyAsAnyType: Boolean): TValue;\r\nbegin\r\n if not TryCast(ATypeInfo, Result, EmptyAsAnyType) then\r\n raise EInvalidCast.Create('');\r\nend;\r\n\r\ngeneric function TValue.Cast(const EmptyAsAnyType: Boolean): TValue;\r\nbegin\r\n Result := Cast(System.TypeInfo(T), EmptyAsAnyType);\r\nend;\r\n\r\nfunction TValue.IsType(ATypeInfo: TTypeInfo; const EmptyAsAnyType: Boolean): Boolean;\r\nvar\r\n AnyValue: TValue;\r\n\r\nbegin\r\n Result := TryCast(ATypeInfo, AnyValue, EmptyAsAnyType);\r\nend;\r\n\r\ngeneric function TValue.TryAsType(var AResult: T; const EmptyAsAnyType: Boolean): Boolean;\r\nvar\r\n val: TValue;\r\nbegin\r\n Result := TryCast(System.TypeInfo(T), val, EmptyAsAnyType);\r\n if Result then\r\n begin\r\n if val.IsEmpty then\r\n AResult := Default(T)\r\n else\r\n AResult := T(val.AsJSValue)\r\n end;\r\nend;\r\n\r\ngeneric function TValue.IsType(const EmptyAsAnyType: Boolean): Boolean;\r\nbegin\r\n Result := IsType(System.TypeInfo(T), EmptyAsAnyType);\r\nend;\r\n\r\nfunction TValue.TryCast(ATypeInfo: TTypeInfo; out AResult: TValue; const EmptyAsAnyType: Boolean): Boolean;\r\n\r\n function ConversionAccepted: TTypeKinds;\r\n begin\r\n case ATypeInfo.Kind of\r\n tkString: Exit([tkChar, tkString]);\r\n\r\n tkDouble: Exit([tkInteger, tkDouble]);\r\n\r\n tkEnumeration: Exit([tkInteger, tkEnumeration]);\r\n\r\n else Exit([ATypeInfo.Kind]);\r\n end;\r\n end;\r\n\r\nbegin\r\n if EmptyAsAnyType and IsEmpty then\r\n begin\r\n AResult := TValue.Empty;\r\n\r\n if ATypeInfo <> nil then\r\n begin\r\n AResult.FTypeInfo := ATypeInfo;\r\n\r\n case ATypeInfo.Kind of\r\n tkBool: AResult.SetData(False);\r\n tkChar: AResult.SetData(#0);\r\n tkString: AResult.SetData(EmptyStr);\r\n tkDouble,\r\n tkEnumeration,\r\n tkInteger: AResult.SetData(0);\r\n end;\r\n\r\n Exit(True);\r\n end;\r\n end;\r\n\r\n if not EmptyAsAnyType and (FTypeInfo = nil) then\r\n Exit(False);\r\n\r\n if FTypeInfo = ATypeInfo then\r\n begin\r\n AResult := Self;\r\n Exit(True);\r\n end;\r\n\r\n if ATypeInfo = nil then\r\n Exit(False);\r\n\r\n if ATypeInfo = System.TypeInfo(TValue) then\r\n begin\r\n TValue.Make(Self, System.TypeInfo(TValue), AResult);\r\n Exit(True);\r\n end;\r\n\r\n Result := TypeInfo.Kind in ConversionAccepted;\r\n\r\n if Result then\r\n begin\r\n AResult.SetData(FData);\r\n AResult.FTypeInfo := ATypeInfo;\r\n end;\r\nend;\r\n\r\nclass function TValue.FromJSValue(v: JSValue): TValue;\r\nvar\r\n i: NativeInt;\r\n TypeOfValue: TTypeInfo;\r\n\r\nbegin\r\n case jsTypeOf(v) of\r\n 'number':\r\n if JS.isInteger(v) then\r\n begin\r\n i:=NativeInt(v);\r\n if (i>=low(integer)) and (i<=high(integer)) then\r\n TypeOfValue:=System.TypeInfo(Integer)\r\n else\r\n TypeOfValue:=System.TypeInfo(NativeInt);\r\n end\r\n else\r\n TypeOfValue:=system.TypeInfo(Double);\r\n 'string': TypeOfValue:=System.TypeInfo(String);\r\n 'boolean': TypeOfValue:=System.TypeInfo(Boolean);\r\n 'object':\r\n if v=nil then\r\n Exit(TValue.Empty)\r\n else if JS.isClass(v) and JS.isExt(v,TObject) then\r\n TypeOfValue:=System.TypeInfo(TClass(v))\r\n else if JS.isObject(v) and JS.isExt(v,TObject) then\r\n TypeOfValue:=System.TypeInfo(TObject(v))\r\n else if isRecord(v) then\r\n TypeOfValue:=System.TypeInfo(TObject(v))\r\n else if TJSArray.IsArray(V) then\r\n TypeOfValue:=System.TypeInfo(TObject(v))\r\n else\r\n raise EInvalidCast.Create('Type not recognized in FromJSValue!');\r\n else\r\n TypeOfValue:=System.TypeInfo(JSValue);\r\n end;\r\n\r\n Make(v, TypeOfValue, Result);\r\nend;\r\n\r\nclass function TValue.FromArray(TypeInfo: TTypeInfo; const Values: specialize TArray): TValue;\r\nvar\r\n A: Integer;\r\n\r\n DynTypeInfo: TTypeInfoDynArray absolute TypeInfo;\r\n\r\n NewArray: TJSArray;\r\n\r\n ElementType: TTypeInfo;\r\n\r\nbegin\r\n if TypeInfo.Kind <> tkDynArray then\r\n raise EInvalidCast.Create('Type not an array in FromArray!');\r\n\r\n ElementType := DynTypeInfo.ElType;\r\n NewArray := TJSArray.new;\r\n NewArray.Length := Length(Values);\r\n\r\n for A := 0 to High(Values) do\r\n NewArray[A] := Values[A].Cast(ElementType).AsJSValue;\r\n\r\n Result.SetData(NewArray);\r\n Result.FTypeInfo := TypeInfo;\r\nend;\r\n\r\nclass function TValue.FromOrdinal(ATypeInfo: TTypeInfo; AValue: JSValue): TValue;\r\nbegin\r\n if (ATypeInfo = nil) or not (ATypeInfo.Kind in [tkBool, tkEnumeration, tkInteger]) then\r\n raise EInvalidCast.Create('Invalid type in FromOrdinal');\r\n\r\n if ATypeInfo.Kind = tkBool then\r\n TValue.Make(AValue = True, ATypeInfo, Result)\r\n else\r\n TValue.Make(NativeInt(AValue), ATypeInfo, Result);\r\nend;\r\n\r\nfunction TValue.IsObject: boolean;\r\nbegin\r\n Result:=IsEmpty or (TypeInfo.Kind=tkClass);\r\nend;\r\n\r\nfunction TValue.AsObject: TObject;\r\nbegin\r\n if IsObject or (IsClass and not JS.IsObject(GetData)) then\r\n Result := TObject(GetData)\r\n else\r\n raise EInvalidCast.Create(SErrInvalidTypecast);\r\nend;\r\n\r\nfunction TValue.IsObjectInstance: boolean;\r\nbegin\r\n Result:=(TypeInfo<>nil) and (TypeInfo.Kind=tkClass);\r\nend;\r\n\r\nfunction TValue.IsArray: boolean;\r\nbegin\r\n case Kind of\r\n tkDynArray: Exit(True);\r\n tkArray: Exit(Length(TTypeInfoStaticArray(FTypeInfo).Dims) = 1);\r\n else Result := False;\r\n end;\r\nend;\r\n\r\nfunction TValue.IsClass: boolean;\r\nvar\r\n k: TTypeKind;\r\nbegin\r\n k:=Kind;\r\n Result := (k = tkClassRef) or ((k in [tkClass,tkUnknown]) and not JS.IsObject(GetData));\r\nend;\r\n\r\nfunction TValue.AsClass: TClass;\r\nbegin\r\n if IsClass then\r\n Result := TClass(GetData)\r\n else\r\n raise EInvalidCast.Create(SErrInvalidTypecast);\r\nend;\r\n\r\nfunction TValue.IsOrdinal: boolean;\r\nbegin\r\n Result := IsEmpty or (Kind in [tkBool, tkInteger, tkChar, tkEnumeration]);\r\nend;\r\n\r\nfunction TValue.AsOrdinal: NativeInt;\r\nbegin\r\n if IsOrdinal then\r\n Result:=NativeInt(GetData)\r\n else\r\n raise EInvalidCast.Create(SErrInvalidTypecast);\r\nend;\r\n\r\nfunction TValue.AsBoolean: boolean;\r\nbegin\r\n if (Kind = tkBool) then\r\n Result:=boolean(GetData)\r\n else\r\n raise EInvalidCast.Create(SErrInvalidTypecast);\r\nend;\r\n\r\nfunction TValue.AsInteger: Integer;\r\nbegin\r\n if JS.isInteger(GetData) then\r\n Result:=NativeInt(GetData)\r\n else\r\n raise EInvalidCast.Create(SErrInvalidTypecast);\r\nend;\r\n\r\nfunction TValue.AsNativeInt: NativeInt;\r\nbegin\r\n if JS.isInteger(GetData) then\r\n Result:=NativeInt(GetData)\r\n else\r\n raise EInvalidCast.Create(SErrInvalidTypecast);\r\nend;\r\n\r\nfunction TValue.AsInterface: IInterface;\r\nvar\r\n k: TTypeKind;\r\nbegin\r\n k:=Kind;\r\n if k = tkInterface then\r\n Result := IInterface(GetData)// ToDo\r\n else if (k in [tkClass, tkClassRef, tkUnknown]) and not JS.isObject(GetData) then\r\n Result := Nil\r\n else\r\n raise EInvalidCast.Create(SErrInvalidTypecast);\r\nend;\r\n\r\nfunction TValue.AsString: string;\r\nbegin\r\n if js.isString(GetData) then\r\n Result:=String(GetData)\r\n else\r\n raise EInvalidCast.Create(SErrInvalidTypecast);\r\nend;\r\n\r\nfunction TValue.AsUnicodeString: UnicodeString;\r\nbegin\r\n Result:=AsString;\r\nend;\r\n\r\nfunction TValue.AsExtended: Extended;\r\nbegin\r\n if js.isNumber(GetData) then\r\n Result:=Double(GetData)\r\n else\r\n raise EInvalidCast.Create(SErrInvalidTypecast);\r\nend;\r\n\r\nfunction TValue.ToString: String;\r\nbegin\r\n case Kind of\r\n tkString: Result := AsString;\r\n tkInteger: Result := IntToStr(AsNativeInt);\r\n tkBool: Result := BoolToStr(AsBoolean, True);\r\n tkFloat: Result := FloatToStr(AsExtended);\r\n else\r\n Result := '';\r\n end;\r\nend;\r\n\r\nfunction TValue.GetArrayLength: SizeInt;\r\nbegin\r\n if IsArray then\r\n Exit(Length(TJSValueDynArray(GetData)));\r\n\r\n raise EInvalidCast.Create(SErrInvalidTypecast);\r\nend;\r\n\r\nfunction TValue.GetArrayElement(aIndex: SizeInt): TValue;\r\nbegin\r\n if IsArray then\r\n begin\r\n case Kind of\r\n tkArray: Result.FTypeInfo:=TTypeInfoStaticArray(FTypeInfo).ElType;\r\n tkDynArray: Result.FTypeInfo:=TTypeInfoDynArray(FTypeInfo).ElType;\r\n end;\r\n\r\n Result.SetData(TJSValueDynArray(GetData)[aIndex]);\r\n end\r\n else\r\n raise EInvalidCast.Create(SErrInvalidTypecast);\r\nend;\r\n\r\nprocedure TValue.SetArrayLength(const Size: SizeInt);\r\nvar\r\n NewArray: TJSValueDynArray;\r\n\r\nbegin\r\n NewArray := TJSValueDynArray(GetData);\r\n\r\n SetLength(NewArray, Size);\r\n\r\n SetData(NewArray);\r\nend;\r\n\r\nprocedure TValue.SetArrayElement(aIndex: SizeInt; const AValue: TValue);\r\n\r\nbegin\r\n if IsArray then\r\n TJSValueDynArray(GetData)[aIndex] := AValue.AsJSValue\r\n else\r\n raise EInvalidCast.Create(SErrInvalidTypecast);\r\nend;\r\n\r\nfunction TValue.IsType(ATypeInfo: TTypeInfo): boolean;\r\nbegin\r\n Result := ATypeInfo = TypeInfo;\r\nend;\r\n\r\nfunction TValue.GetData: JSValue;\r\nbegin\r\n if FReferenceVariableData then\r\n Result := TReferenceVariable(FData).Get\r\n else\r\n Result := FData;\r\nend;\r\n\r\nprocedure TValue.SetData(const Value: JSValue);\r\nbegin\r\n if FReferenceVariableData then\r\n TReferenceVariable(FData).&Set(Value)\r\n else\r\n FData := Value;\r\nend;\r\n\r\nfunction TValue.GetIsEmpty: boolean;\r\nbegin\r\n if (TypeInfo=nil) or (GetData=Undefined) or (GetData=nil) then\r\n exit(true);\r\n case TypeInfo.Kind of\r\n tkDynArray:\r\n Result:=GetArrayLength=0;\r\n else\r\n Result:=false;\r\n end;\r\nend;\r\n\r\nfunction TValue.AsJSValue: JSValue;\r\nbegin\r\n Result := GetData;\r\nend;\r\n\r\nclass function TValue.Empty: TValue;\r\nbegin\r\n Result.SetData(nil);\r\n Result.FTypeInfo := nil;\r\nend;\r\n\r\n{ TRttiStructuredType }\r\n\r\nfunction TRttiStructuredType.GetMethods: TRttiMethodArray;\r\nvar\r\n A, Start: Integer;\r\n\r\n BaseClass: TRttiStructuredType;\r\n\r\n Declared: TRttiMethodArray;\r\n\r\nbegin\r\n BaseClass := Self;\r\n Result := nil;\r\n while Assigned(BaseClass) do\r\n begin\r\n Declared := BaseClass.GetDeclaredMethods;\r\n Start := Length(Result);\r\n SetLength(Result, Start + Length(Declared));\r\n for A := Low(Declared) to High(Declared) do\r\n Result[Start + A] := Declared[A];\r\n BaseClass := BaseClass.GetAncestor;\r\n end;\r\nend;\r\n\r\nfunction TRttiStructuredType.GetMethods(const aName: String): TRttiMethodArray;\r\nvar\r\n Method: TRttiMethod;\r\n MethodCount: Integer;\r\n\r\nbegin\r\n MethodCount := 0;\r\n for Method in GetMethods do\r\n if aName = Method.Name then\r\n Inc(MethodCount);\r\n SetLength(Result, MethodCount);\r\n for Method in GetMethods do\r\n if aName = Method.Name then\r\n begin\r\n Dec(MethodCount);\r\n Result[MethodCount] := Method;\r\n end;\r\nend;\r\n\r\nfunction TRttiStructuredType.GetProperties: TRttiPropertyArray;\r\nvar\r\n A, Start: Integer;\r\n\r\n BaseClass: TRttiStructuredType;\r\n\r\n Declared: TRttiPropertyArray;\r\n\r\nbegin\r\n BaseClass := Self;\r\n Result := nil;\r\n\r\n while Assigned(BaseClass) do\r\n begin\r\n Declared := BaseClass.GetDeclaredProperties;\r\n Start := Length(Result);\r\n\r\n SetLength(Result, Start + Length(Declared));\r\n\r\n for A := Low(Declared) to High(Declared) do\r\n Result[Start + A] := Declared[A];\r\n\r\n BaseClass := BaseClass.GetAncestor;\r\n end;\r\nend;\r\n\r\nfunction TRttiStructuredType.GetMethod(const aName: String): TRttiMethod;\r\nvar\r\n Method: TRttiMethod;\r\n\r\nbegin\r\n for Method in GetMethods do\r\n if aName = Method.Name then\r\n Exit(Method);\r\nend;\r\n\r\nfunction TRttiStructuredType.GetProperty(const AName: string): TRttiProperty;\r\nvar\r\n Prop: TRttiProperty;\r\n lName: String;\r\n\r\nbegin\r\n lName := LowerCase(AName);\r\n for Prop in GetProperties do\r\n if lowercase(Prop.Name) = lName then\r\n Exit(Prop);\r\n Result:=nil;\r\nend;\r\n\r\nfunction TRttiStructuredType.GetDeclaredProperties: TRttiPropertyArray;\r\nvar\r\n A, PropCount: Integer;\r\n\r\nbegin\r\n if not Assigned(FProperties) then\r\n begin\r\n PropCount := StructTypeInfo.PropCount;\r\n\r\n SetLength(FProperties, PropCount);\r\n\r\n for A := 0 to Pred(PropCount) do\r\n FProperties[A] := TRttiProperty.Create(Self, StructTypeInfo.GetProp(A));\r\n end;\r\n\r\n Result := FProperties;\r\nend;\r\n\r\nfunction TRttiStructuredType.GetAncestor: TRttiStructuredType;\r\nbegin\r\n Result := nil;\r\nend;\r\n\r\nfunction TRttiStructuredType.GetStructTypeInfo: TTypeInfoStruct;\r\nbegin\r\n Result:=TTypeInfoStruct(inherited Handle);\r\nend;\r\n\r\nconstructor TRttiStructuredType.Create(AParent: TRttiObject; ATypeInfo: PTypeInfo);\r\nbegin\r\n if not (TTypeInfo(ATypeInfo) is TTypeInfoStruct) then\r\n raise EInvalidCast.Create('');\r\n\r\n inherited;\r\nend;\r\n\r\ndestructor TRttiStructuredType.Destroy;\r\nvar\r\n Method: TRttiMethod;\r\n\r\n Prop: TRttiProperty;\r\n\r\nbegin\r\n for Method in FMethods do\r\n Method.Free;\r\n\r\n for Prop in FProperties do\r\n Prop.Free;\r\n\r\n inherited Destroy;\r\nend;\r\n\r\nfunction TRttiStructuredType.GetDeclaredMethods: TRttiMethodArray;\r\nvar\r\n A, MethodCount: Integer;\r\n\r\nbegin\r\n if not Assigned(FMethods) then\r\n begin\r\n MethodCount := StructTypeInfo.MethodCount;\r\n SetLength(FMethods, MethodCount);\r\n\r\n for A := 0 to Pred(MethodCount) do\r\n FMethods[A] := TRttiMethod.Create(Self, StructTypeInfo.GetMethod(A));\r\n end;\r\n\r\n Result := FMethods;\r\nend;\r\n\r\nfunction TRttiStructuredType.GetDeclaredFields: TRttiFieldArray;\r\nvar\r\n A, FieldCount: Integer;\r\n\r\nbegin\r\n if not Assigned(FFields) then\r\n begin\r\n FieldCount := StructTypeInfo.FieldCount;\r\n\r\n SetLength(FFields, FieldCount);\r\n\r\n for A := 0 to Pred(FieldCount) do\r\n FFields[A] := TRttiField.Create(Self, StructTypeInfo.GetField(A));\r\n end;\r\n\r\n Result := FFields;\r\nend;\r\n\r\nfunction TRttiStructuredType.GetFields: TRttiFieldArray;\r\nvar\r\n A, Start: Integer;\r\n\r\n BaseClass: TRttiStructuredType;\r\n\r\n Declared: TRttiFieldArray;\r\n\r\nbegin\r\n BaseClass := Self;\r\n Result := nil;\r\n\r\n while Assigned(BaseClass) do\r\n begin\r\n Declared := BaseClass.GetDeclaredFields;\r\n Start := Length(Result);\r\n\r\n SetLength(Result, Start + Length(Declared));\r\n\r\n for A := Low(Declared) to High(Declared) do\r\n Result[Start + A] := Declared[A];\r\n\r\n BaseClass := BaseClass.GetAncestor;\r\n end;\r\nend;\r\n\r\n{ TRttiInstanceType }\r\n\r\nfunction TRttiInstanceType.GetClassTypeInfo: TTypeInfoClass;\r\nbegin\r\n Result:=TTypeInfoClass(inherited Handle);\r\nend;\r\n\r\nfunction TRttiInstanceType.GetMetaClassType: TClass;\r\nbegin\r\n Result:=ClassTypeInfo.ClassType;\r\nend;\r\n\r\nfunction TRttiInstanceType.GetAncestor: TRttiStructuredType;\r\nbegin\r\n Result := GetAncestorType;\r\nend;\r\n\r\nfunction TRttiInstanceType.GetBaseType: TRttiType;\r\nbegin\r\n Result:=GetAncestorType;\r\nend;\r\n\r\nfunction TRttiInstanceType.GetAncestorType: TRttiInstanceType;\r\nbegin\r\n Result := inherited Parent as TRttiInstanceType;\r\nend;\r\n\r\nconstructor TRttiInstanceType.Create(AParent: TRttiObject; ATypeInfo: PTypeInfo);\r\nbegin\r\n if not (TTypeInfo(ATypeInfo) is TTypeInfoClass) then\r\n raise EInvalidCast.Create('');\r\n\r\n inherited;\r\nend;\r\n\r\n{ TRttiInterfaceType }\r\n\r\nconstructor TRttiInterfaceType.Create(AParent: TRttiObject; ATypeInfo: PTypeInfo);\r\nbegin\r\n if not (TTypeInfo(ATypeInfo) is TTypeInfoInterface) then\r\n raise EInvalidCast.Create('');\r\n\r\n inherited;\r\nend;\r\n\r\nfunction TRttiInterfaceType.GetGUID: TGUID;\r\nvar\r\n GUID: String;\r\n\r\nbegin\r\n GUID := InterfaceTypeInfo.InterfaceInfo.GUID;\r\n\r\n TryStringToGUID(GUID, Result);\r\nend;\r\n\r\nfunction TRttiInterfaceType.GetInterfaceTypeInfo: TTypeInfoInterface;\r\nbegin\r\n Result := TTypeInfoInterface(inherited Handle);\r\nend;\r\n\r\nfunction TRttiInterfaceType.GetAncestor: TRttiStructuredType;\r\nbegin\r\n Result := GetAncestorType;\r\nend;\r\n\r\nfunction TRttiInterfaceType.GetBaseType: TRttiType;\r\nbegin\r\n Result := GetAncestorType;\r\nend;\r\n\r\nfunction TRttiInterfaceType.GetAncestorType: TRttiInterfaceType;\r\nbegin\r\n Result := Pool.GetType(InterfaceTypeInfo.Ancestor) as TRttiInterfaceType;\r\nend;\r\n\r\n{ TRttiRecordType }\r\n\r\nfunction TRttiRecordType.GetRecordTypeInfo: TTypeInfoRecord;\r\nbegin\r\n Result := TTypeInfoRecord(inherited Handle);\r\nend;\r\n\r\nfunction TRttiRecordType.GetIsRecord: Boolean;\r\nbegin\r\n Result := True;\r\nend;\r\n\r\nconstructor TRttiRecordType.Create(AParent: TRttiObject; ATypeInfo: PTypeInfo);\r\nbegin\r\n if not (TTypeInfo(ATypeInfo) is TTypeInfoRecord) then\r\n raise EInvalidCast.Create('');\r\n\r\n inherited;\r\nend;\r\n\r\n{ TRttiClassRefType }\r\n\r\nconstructor TRttiClassRefType.Create(AParent: TRttiObject; ATypeInfo: PTypeInfo);\r\nbegin\r\n if not (TTypeInfo(ATypeInfo) is TTypeInfoClassRef) then\r\n raise EInvalidCast.Create('');\r\n\r\n inherited;\r\nend;\r\n\r\nfunction TRttiClassRefType.GetClassRefTypeInfo: TTypeInfoClassRef;\r\nbegin\r\n Result := TTypeInfoClassRef(inherited Handle);\r\nend;\r\n\r\nfunction TRttiClassRefType.GetInstanceType: TRttiInstanceType;\r\nbegin\r\n Result := Pool.GetType(ClassRefTypeInfo.InstanceType) as TRttiInstanceType;\r\nend;\r\n\r\nfunction TRttiClassRefType.GetMetaclassType: TClass;\r\nbegin\r\n Result := InstanceType.MetaClassType;\r\nend;\r\n\r\n{ TRttiInstanceExternalType }\r\n\r\nfunction TRttiInstanceExternalType.GetAncestor: TRttiInstanceExternalType;\r\nbegin\r\n Result := Pool.GetType(ExternalClassTypeInfo.Ancestor) as TRttiInstanceExternalType;\r\nend;\r\n\r\nfunction TRttiInstanceExternalType.GetExternalClassTypeInfo: TTypeInfoExtClass;\r\nbegin\r\n Result := TTypeInfoExtClass(inherited Handle);\r\nend;\r\n\r\nfunction TRttiInstanceExternalType.GetExternalName: String;\r\nbegin\r\n Result := ExternalClassTypeInfo.JSClassName;\r\nend;\r\n\r\nconstructor TRttiInstanceExternalType.Create(AParent: TRttiObject; ATypeInfo: PTypeInfo);\r\nbegin\r\n if not (TTypeInfo(ATypeInfo) is TTypeInfoExtClass) then\r\n raise EInvalidCast.Create('');\r\n\r\n inherited;\r\nend;\r\n\r\n{ TRTTIContext }\r\n\r\nclass function TRTTIContext.Create: TRTTIContext;\r\nbegin\r\n Pool.AcquireContext;\r\nend;\r\n\r\nprocedure TRTTIContext.Free;\r\nbegin\r\n Pool.ReleaseContext;\r\nend;\r\n\r\nfunction TRTTIContext.GetType(aTypeInfo: PTypeInfo): TRttiType;\r\nbegin\r\n Result := Pool.GetType(aTypeInfo);\r\nend;\r\n\r\nfunction TRTTIContext.GetType(aClass: TClass): TRTTIType;\r\nbegin\r\n Result := Pool.GetType(aClass);\r\nend;\r\n\r\nfunction TRTTIContext.FindType(const AQualifiedName: String): TRttiType;\r\nbegin\r\n Result := Pool.FindType(AQualifiedName);\r\nend;\r\n\r\nfunction TRTTIContext.GetTypes: specialize TArray;\r\nvar\r\n ModuleName, ClassName: String;\r\n\r\n ModuleTypes: TJSObject;\r\n\r\nbegin\r\n for ModuleName in TJSObject.Keys(pas) do\r\n begin\r\n ModuleTypes := TTypeInfoModule(pas[ModuleName]).RTTI;\r\n\r\n for ClassName in ModuleTypes do\r\n if TJSObject(ModuleTypes[ClassName]).HasOwnProperty('name') and (ClassName[1] <> '$') then\r\n GetType(PTypeInfo(ModuleTypes[ClassName]));\r\n end;\r\n\r\n Result := specialize TArray(TJSObject.Values(Pool.FTypes));\r\nend;\r\n\r\nclass procedure TRTTIContext.KeepContext;\r\nbegin\r\n Pool.AcquireContext;\r\nend;\r\n\r\nclass procedure TRTTIContext.DropContext;\r\nbegin\r\n Pool.ReleaseContext;\r\nend;\r\n\r\n{ TRttiObject }\r\n\r\nconstructor TRttiObject.Create(AParent: TRttiObject; AHandle: Pointer);\r\nbegin\r\n FParent := AParent;\r\n FHandle := AHandle;\r\nend;\r\n\r\ndestructor TRttiObject.Destroy;\r\nvar\r\n Attribute: TCustomAttribute;\r\nbegin\r\n for Attribute in FAttributes do\r\n Attribute.Free;\r\n\r\n FAttributes := nil;\r\n\r\n inherited Destroy;\r\nend;\r\n\r\nfunction TRttiObject.LoadCustomAttributes: TCustomAttributeArray;\r\nbegin\r\n Result := nil;\r\nend;\r\n\r\nfunction TRttiObject.GetAttributes: TCustomAttributeArray;\r\nbegin\r\n if not FAttributesLoaded then\r\n begin\r\n FAttributes := LoadCustomAttributes;\r\n FAttributesLoaded := True;\r\n end;\r\n\r\n Result := FAttributes;\r\nend;\r\n\r\nfunction TRttiObject.GetAttribute(const Attribute: TCustomAttributeClass): TCustomAttribute;\r\nvar\r\n CustomAttribute: TCustomAttribute;\r\n\r\nbegin\r\n Result := nil;\r\n\r\n for CustomAttribute in GetAttributes do\r\n if CustomAttribute is Attribute then\r\n Exit(CustomAttribute);\r\nend;\r\n\r\ngeneric function TRttiObject.GetAttribute: T;\r\n\r\nbegin\r\n Result := T(GetAttribute(TCustomAttributeClass(T.ClassType)));\r\nend;\r\n\r\nfunction TRttiObject.HasAttribute(const Attribute: TCustomAttributeClass): Boolean;\r\nbegin\r\n Result := GetAttribute(Attribute) <> nil;\r\nend;\r\n\r\ngeneric function TRttiObject.HasAttribute: Boolean;\r\nbegin\r\n Result := HasAttribute(TCustomAttributeClass(T.ClassType));\r\nend;\r\n\r\n{ TRttiNamedObject }\r\n\r\nfunction TRttiNamedObject.GetName: string;\r\nbegin\r\n Result:='';\r\nend;\r\n\r\n{ TRttiMember }\r\n\r\nfunction TRttiMember.GetName: string;\r\nbegin\r\n Result := MemberTypeInfo.Name;\r\nend;\r\n\r\nfunction TRttiMember.GetParent: TRttiType;\r\nbegin\r\n Result := TRttiType(inherited Parent);\r\nend;\r\n\r\nfunction TRttiMember.GetVisibility: TMemberVisibility;\r\nbegin\r\n Result := mvPublished;\r\nend;\r\n\r\nconstructor TRttiMember.Create(AParent: TRttiType; ATypeInfo: TTypeMember);\r\nbegin\r\n if not (ATypeInfo is TTypeMember) then\r\n raise EInvalidCast.Create('');\r\n\r\n inherited Create(AParent, ATypeInfo);\r\nend;\r\n\r\nfunction TRttiMember.LoadCustomAttributes: TCustomAttributeArray;\r\nbegin\r\n Result := GetRTTIAttributes(MemberTypeInfo.Attributes);\r\nend;\r\n\r\nfunction TRttiMember.GetMemberTypeInfo: TTypeMember;\r\nbegin\r\n Result := TTypeMember(inherited Handle);\r\nend;\r\n\r\n{ TRttiField }\r\n\r\nconstructor TRttiField.Create(AParent: TRttiType; ATypeInfo: TTypeMember);\r\nbegin\r\n if not (ATypeInfo is TTypeMemberField) then\r\n raise EInvalidCast.Create('');\r\n\r\n inherited;\r\nend;\r\n\r\nfunction TRttiField.GetFieldType: TRttiType;\r\nbegin\r\n Result := Pool.GetType(FieldTypeInfo.TypeInfo);\r\nend;\r\n\r\nfunction TRttiField.GetFieldTypeInfo: TTypeMemberField;\r\nbegin\r\n Result := TTypeMemberField(inherited Handle);\r\nend;\r\n\r\nfunction TRttiField.GetValue(Instance: JSValue): TValue;\r\nvar\r\n JSInstance: TJSObject absolute Instance;\r\n\r\nbegin\r\n Result := TValue.FromJSValue(JSInstance[Name]);\r\nend;\r\n\r\nprocedure TRttiField.SetValue(Instance: JSValue; const AValue: TValue);\r\nvar\r\n JSInstance: TJSObject absolute Instance;\r\n\r\nbegin\r\n JSInstance[Name] := AValue.Cast(FieldType.Handle, True).ASJSValue;\r\nend;\r\n\r\n{ TRttiParameter }\r\n\r\nfunction TRttiParameter.GetName: String;\r\nbegin\r\n Result := FName;\r\nend;\r\n\r\n{ TRttiMethod }\r\n\r\nfunction TRttiMethod.GetMethodTypeInfo: TTypeMemberMethod;\r\nbegin\r\n Result := TTypeMemberMethod(inherited Handle);\r\nend;\r\n\r\nfunction TRttiMethod.GetIsClassMethod: Boolean;\r\nbegin\r\n Result:=MethodTypeInfo.MethodKind in [mkClassFunction,mkClassProcedure];\r\nend;\r\n\r\nfunction TRttiMethod.GetIsConstructor: Boolean;\r\nbegin\r\n Result:=MethodTypeInfo.MethodKind=mkConstructor;\r\nend;\r\n\r\nfunction TRttiMethod.GetIsDestructor: Boolean;\r\nbegin\r\n Result:=MethodTypeInfo.MethodKind=mkDestructor;\r\nend;\r\n\r\nfunction TRttiMethod.GetIsExternal: Boolean;\r\nbegin\r\n Result := pfExternal in GetProcedureFlags;\r\nend;\r\n\r\nfunction TRttiMethod.GetIsStatic: Boolean;\r\nbegin\r\n Result := pfStatic in GetProcedureFlags;\r\nend;\r\n\r\nfunction TRttiMethod.GetIsVarArgs: Boolean;\r\nbegin\r\n Result := pfVarargs in GetProcedureFlags;\r\nend;\r\n\r\nfunction TRttiMethod.GetIsAsyncCall: Boolean;\r\nbegin\r\n Result := (pfAsync in GetProcedureFlags) or Assigned(ReturnType) and ReturnType.IsInstanceExternal and (ReturnType.AsInstanceExternal.ExternalName = 'Promise');\r\nend;\r\n\r\nfunction TRttiMethod.GetIsSafeCall: Boolean;\r\nbegin\r\n Result := pfSafeCall in GetProcedureFlags;\r\nend;\r\n\r\nfunction TRttiMethod.GetMethodKind: TMethodKind;\r\nbegin\r\n Result:=MethodTypeInfo.MethodKind;;\r\nend;\r\n\r\nfunction TRttiMethod.GetProcedureFlags: TProcedureFlags;\r\nconst\r\n PROCEDURE_FLAGS: array[TProcedureFlag] of NativeInt = (1, 2, 4, 8, 16);\r\n\r\nvar\r\n Flag: TProcedureFlag;\r\n\r\n ProcedureFlags: NativeInt;\r\n\r\nbegin\r\n ProcedureFlags := MethodTypeInfo.ProcSig.Flags;\r\n Result := [];\r\n\r\n for Flag := Low(PROCEDURE_FLAGS) to High(PROCEDURE_FLAGS) do\r\n if PROCEDURE_FLAGS[Flag] and ProcedureFlags > 0 then\r\n Result := Result + [Flag];\r\nend;\r\n\r\nfunction TRttiMethod.GetReturnType: TRttiType;\r\nbegin\r\n Result := Pool.GetType(MethodTypeInfo.ProcSig.ResultType);\r\nend;\r\n\r\nprocedure TRttiMethod.LoadParameters;\r\nconst\r\n FLAGS_CONVERSION: array[TParamFlag] of NativeInt = (1, 2, 4, 8, 16, 32);\r\n\r\nvar\r\n A: Integer;\r\n\r\n Flag: TParamFlag;\r\n\r\n Param: TProcedureParam;\r\n\r\n RttiParam: TRttiParameter;\r\n\r\n MethodParams: TProcedureParams;\r\n\r\nbegin\r\n FParametersLoaded := True;\r\n MethodParams := MethodTypeInfo.ProcSig.Params;\r\n\r\n SetLength(FParameters, Length(MethodParams));\r\n\r\n for A := Low(FParameters) to High(FParameters) do\r\n begin\r\n Param := MethodParams[A];\r\n RttiParam := TRttiParameter.Create(Self, Param);\r\n RttiParam.FName := Param.Name;\r\n RttiParam.FParamType := Pool.GetType(Param.TypeInfo);\r\n\r\n for Flag := Low(FLAGS_CONVERSION) to High(FLAGS_CONVERSION) do\r\n if FLAGS_CONVERSION[Flag] and Param.Flags > 0 then\r\n RttiParam.FFlags := RttiParam.FFlags + [Flag];\r\n\r\n FParameters[A] := RttiParam;\r\n end;\r\nend;\r\n\r\nfunction TRttiMethod.GetParameters: TRttiParameterArray;\r\nbegin\r\n if not FParametersLoaded then\r\n LoadParameters;\r\n\r\n Result := FParameters;\r\nend;\r\n\r\nfunction TRttiMethod.Invoke(const Instance: TValue; const Args: array of TValue): TValue;\r\nvar\r\n A: Integer;\r\n AArgs: TJSValueDynArray;\r\n\r\nbegin\r\n if Assigned(ReturnType) then\r\n Result.FTypeInfo := ReturnType.Handle;\r\n\r\n SetLength(AArgs, Length(Args));\r\n\r\n for A := Low(Args) to High(Args) do\r\n AArgs[A] := Args[A].AsJSValue;\r\n\r\n Result.SetData(TJSFunction(TJSObject(Instance.AsJSValue)[Name]).apply(TJSObject(Instance.AsJSValue), AArgs));\r\nend;\r\n\r\nfunction TRttiMethod.Invoke(const Instance: TObject; const Args: array of TValue): TValue;\r\n\r\nvar\r\n v : TValue;\r\n\r\nbegin\r\n TValue.make(Instance,Instance.ClassInfo,v);\r\n Result:=Invoke(v,Args);\r\nend;\r\n\r\nfunction TRttiMethod.Invoke(const aClass: TClass; const Args: array of TValue\r\n ): TValue;\r\nvar\r\n v : TValue;\r\n\r\nbegin\r\n TValue.make(aClass,aClass.ClassInfo,v);\r\n Result:=Invoke(V,Args);\r\nend;\r\n\r\n{ TRttiProperty }\r\n\r\nconstructor TRttiProperty.Create(AParent: TRttiType; ATypeInfo: TTypeMember);\r\nbegin\r\n if not (ATypeInfo is TTypeMemberProperty) then\r\n raise EInvalidCast.Create('');\r\n\r\n inherited;\r\nend;\r\n\r\nfunction TRttiProperty.GetPropertyTypeInfo: TTypeMemberProperty;\r\nbegin\r\n Result := TTypeMemberProperty(inherited Handle);\r\nend;\r\n\r\nfunction TRttiProperty.GetValue(Instance: JSValue): TValue;\r\nvar\r\n JSObject: TJSObject absolute Instance;\r\n\r\nbegin\r\n TValue.Make(GetJSValueProp(JSObject, PropertyTypeInfo), PropertyType.Handle, Result);\r\nend;\r\n\r\nprocedure TRttiProperty.SetValue(Instance: JSValue; const AValue: TValue);\r\nvar\r\n JSInstance: TJSObject absolute Instance;\r\n\r\nbegin\r\n SetJSValueProp(JSInstance, PropertyTypeInfo, AValue.Cast(PropertyType.Handle, True).AsJSValue);\r\nend;\r\n\r\nfunction TRttiProperty.GetPropertyType: TRttiType;\r\nbegin\r\n Result := Pool.GetType(PropertyTypeInfo.TypeInfo);\r\nend;\r\n\r\nfunction TRttiProperty.GetIsWritable: boolean;\r\nbegin\r\n Result := PropertyTypeInfo.Setter<>'';\r\nend;\r\n\r\nfunction TRttiProperty.GetIsReadable: boolean;\r\nbegin\r\n Result := PropertyTypeInfo.Getter<>'';\r\nend;\r\n\r\nfunction TRttiProperty.GetVisibility: TMemberVisibility;\r\nbegin\r\n // At this moment only published rtti-property-info is supported by pas2js\r\n Result := mvPublished;\r\nend;\r\n\r\n{ TRttiType }\r\n\r\nfunction TRttiType.GetName: string;\r\nbegin\r\n Result := Handle.Name;\r\nend;\r\n\r\nfunction TRttiType.GetIsInstance: boolean;\r\nbegin\r\n Result:=Self is TRttiInstanceType;\r\nend;\r\n\r\nfunction TRttiType.GetIsInstanceExternal: boolean;\r\nbegin\r\n Result:=Self is TRttiInstanceExternalType;\r\nend;\r\n\r\nfunction TRttiType.GetIsOrdinal: boolean;\r\nbegin\r\n Result:=false;\r\nend;\r\n\r\nfunction TRttiType.GetIsRecord: boolean;\r\nbegin\r\n Result:=false;\r\nend;\r\n\r\nfunction TRttiType.GetIsSet: boolean;\r\nbegin\r\n Result:=false;\r\nend;\r\n\r\nfunction TRttiType.GetTypeKind: TTypeKind;\r\nbegin\r\n Result:=Handle.Kind;\r\nend;\r\n\r\nfunction TRttiType.GetHandle: TTypeInfo;\r\nbegin\r\n Result := TTypeInfo(inherited Handle);\r\nend;\r\n\r\nfunction TRttiType.GetBaseType: TRttiType;\r\nbegin\r\n Result:=Nil;\r\nend;\r\n\r\nfunction TRttiType.GetAsInstance: TRttiInstanceType;\r\nbegin\r\n Result := Self as TRttiInstanceType;\r\nend;\r\n\r\nfunction TRttiType.GetAsInstanceExternal: TRttiInstanceExternalType;\r\nbegin\r\n Result := Self as TRttiInstanceExternalType;\r\nend;\r\n\r\nfunction TRttiType.LoadCustomAttributes: TCustomAttributeArray;\r\nbegin\r\n Result:=GetRTTIAttributes(Handle.Attributes);\r\nend;\r\n\r\nfunction TRttiType.GetDeclaredProperties: TRttiPropertyArray;\r\nbegin\r\n Result:=nil;\r\nend;\r\n\r\nfunction TRttiType.GetProperties: TRttiPropertyArray;\r\nbegin\r\n Result:=nil;\r\nend;\r\n\r\nfunction TRttiType.GetProperty(const AName: string): TRttiProperty;\r\nbegin\r\n Result:=nil;\r\n if AName='' then ;\r\nend;\r\n\r\nfunction TRttiType.GetMethods: TRttiMethodArray;\r\nbegin\r\n Result:=nil;\r\nend;\r\n\r\nfunction TRttiType.GetMethods(const aName: String): TRttiMethodArray;\r\nbegin\r\n Result:=nil;\r\nend;\r\n\r\nfunction TRttiType.GetMethod(const aName: String): TRttiMethod;\r\nbegin\r\n Result:=nil;\r\n if aName='' then ;\r\nend;\r\n\r\nfunction TRttiType.GetDeclaredMethods: TRttiMethodArray;\r\nbegin\r\n Result:=nil;\r\nend;\r\n\r\nfunction TRttiType.GetDeclaredFields: TRttiFieldArray;\r\nbegin\r\n Result:=nil;\r\nend;\r\n\r\nfunction TRttiType.GetField(const AName: string): TRttiField;\r\nvar\r\n AField: TRttiField;\r\n\r\nbegin\r\n Result:=nil;\r\n for AField in GetFields do\r\n if AField.Name = AName then\r\n Exit(AField);\r\nend;\r\n\r\nfunction TRttiType.GetFields: TRttiFieldArray;\r\nbegin\r\n Result := nil;\r\nend;\r\n\r\nfunction TRttiType.GetQualifiedName: String;\r\nbegin\r\n Result := Format('%s.%s', [Handle.Module.Name, Name]);\r\nend;\r\n\r\n{ TVirtualInterface }\r\n\r\n{$WARNINGS OFF}\r\nconstructor TVirtualInterface.Create(InterfaceTypeInfo: TTypeInfoInterface);\r\nvar\r\n SelfInterfaceObject, InterfaceObject: TInterfaceObject;\r\n\r\n Method: TRttiMethod;\r\n\r\n MethodName: String;\r\n\r\nbegin\r\n FContext := TRttiContext.Create;\r\n FInterfaceType := FContext.GetType(InterfaceTypeInfo) as TRttiInterfaceType;\r\n\r\n if FInterfaceType.InterfaceTypeInfo.InterfaceInfo.kind <> 'com' then\r\n raise EInvalidCast.Create;\r\n\r\n InterfaceObject := TInterfaceObject(TJSObject.Create(FInterfaceType.InterfaceTypeInfo.InterfaceInfo));\r\n InterfaceObject.Obj := Self;\r\n\r\n for Method in FInterfaceType.GetMethods do\r\n begin\r\n asm\r\n let MethodName = Method.GetName();\r\n end;\r\n\r\n InterfaceObject[MethodName] :=\r\n function: JSValue\r\n begin\r\n Result := TVirtualInterface(TInterfaceObject(JSThis).Obj).Invoke(MethodName, TJSValueDynArray(JSValue(JSArguments)));\r\n end;\r\n end;\r\n\r\n InterfaceObject['_AddRef'] := @_AddRef;\r\n InterfaceObject['_Release'] := @_Release;\r\n InterfaceObject['QueryInterface'] := @QueryInterface;\r\n\r\n SelfInterfaceObject := TInterfaceObject(Self);\r\n SelfInterfaceObject.InterfaceMaps := TJSObject.New;\r\n SelfInterfaceObject.InterfaceMaps[GUIDToString(IInterface)] := InterfaceObject;\r\n SelfInterfaceObject.InterfaceMaps[FInterfaceType.Guid.ToString] := TJSObject.New;\r\n SelfInterfaceObject.Interfaces := TJSObject.New;\r\n SelfInterfaceObject.Interfaces[FInterfaceType.Guid.ToString] := InterfaceObject;\r\nend;\r\n{$WARNINGS ON}\r\n\r\nconstructor TVirtualInterface.Create(InterfaceTypeInfo: TTypeInfoInterface; const InvokeEvent: TVirtualInterfaceInvokeEvent);\r\nbegin\r\n Create(InterfaceTypeInfo);\r\n\r\n OnInvoke := InvokeEvent;\r\nend;\r\n\r\nconstructor TVirtualInterface.Create(InterfaceTypeInfo: TTypeInfoInterface; const InvokeEvent: TVirtualInterfaceInvokeEventJS);\r\nbegin\r\n Create(InterfaceTypeInfo);\r\n\r\n OnInvokeJS := InvokeEvent;\r\nend;\r\n\r\ndestructor TVirtualInterface.Destroy;\r\nbegin\r\n FContext.Free;\r\n\r\n inherited;\r\nend;\r\n\r\nfunction TVirtualInterface.QueryInterface(const iid: TGuid; out obj): Integer;\r\nbegin\r\n Result := inherited QueryInterface(iid, obj);\r\nend;\r\n\r\nfunction TVirtualInterface.Invoke(const MethodName: String; const Args: TJSValueDynArray): JSValue;\r\nvar\r\n Method: TRttiMethod;\r\n\r\n Return: TValue;\r\n\r\n function GenerateParams: specialize TArray;\r\n var\r\n A: Integer;\r\n\r\n Param: TRttiParameter;\r\n\r\n Parameters: specialize TArray;\r\n\r\n begin\r\n Parameters := Method.GetParameters;\r\n\r\n SetLength(Result, Length(Parameters));\r\n\r\n for A := Low(Parameters) to High(Parameters) do\r\n begin\r\n Param := Parameters[A];\r\n\r\n TValue.Make(Args[A], Param.ParamType.Handle, Result[A]);\r\n\r\n Result[A].FReferenceVariableData := (pfVar in Param.Flags) or (pfOut in Param.Flags);\r\n end;\r\n end;\r\n\r\nbegin\r\n if Assigned(FOnInvokeJS) then\r\n Result := FOnInvokeJS(MethodName, Args)\r\n else\r\n begin\r\n Method := FInterfaceType.GetMethod(MethodName);\r\n\r\n FOnInvoke(Method, GenerateParams, Return);\r\n\r\n Result := Return.AsJSValue;\r\n end;\r\nend;\r\n\r\nfunction Invoke(ACodeAddress: Pointer; const AArgs: TJSValueDynArray;\r\n ACallConv: TCallConv; AResultType: PTypeInfo; AIsStatic: Boolean;\r\n AIsConstructor: Boolean): TValue;\r\nbegin\r\n if ACallConv=ccReg then ;\r\n if AIsStatic then ;\r\n if AIsConstructor then\r\n raise EInvoke.Create('not supported');\r\n if isFunction(ACodeAddress) then\r\n begin\r\n Result.FData := TJSFunction(ACodeAddress).apply(nil, AArgs);\r\n if AResultType<>nil then\r\n Result.FTypeInfo:=AResultType\r\n else\r\n Result.FTypeInfo:=TypeInfo(JSValue);\r\n end\r\n else\r\n raise EInvoke.Create(SErrInvokeInvalidCodeAddr);\r\nend;\r\n\r\nend.\r\n\r\n","{********************************************************************}\r\n{ }\r\n{ written by TMS Software }\r\n{ copyright (c) 2018 - 2025 }\r\n{ Email : info@tmssoftware.com }\r\n{ Web : http://www.tmssoftware.com }\r\n{ }\r\n{ The source code is given as is. The author is not responsible }\r\n{ for any possible damage done due to the use of this code. }\r\n{ The complete source code remains property of the author and may }\r\n{ not be distributed, published, given or sold in any form as such. }\r\n{ No parts of the source code can be included in any other component }\r\n{ or application without written authorization of the author. }\r\n{********************************************************************}\r\n\r\nunit WEBLib.JSON;\r\n\r\ninterface\r\n\r\nuses\r\n Classes, Web, JS, SysUtils;\r\n\r\ntype\r\n TJSONObject = class;\r\n TJSONString = class;\r\n\r\n TJSONAncestor = class(TObject)\r\n private\r\n protected\r\n function GetStrValue: string; virtual;\r\n procedure SetStrValue(const Value: string); virtual;\r\n public\r\n property Value: string read GetStrValue write SetStrValue;\r\n end;\r\n\r\n TJSONValue = class(TJSONAncestor)\r\n private\r\n fjv: JSValue;\r\n fjo: JSValue;\r\n protected\r\n function GetStrValue: string; override;\r\n property jv: JSValue read fjv write fjv;\r\n class function JSONValueFromJS(const AJSValue: JSValue): TJSONValue;\r\n public\r\n constructor Create(AJSValue: JSValue); overload;\r\n function ToString: string; override;\r\n function GetValue(const APath: string = ''): T;\r\n function GetJSValue: JSValue;\r\n end;\r\n\r\n TJSONPair = class(TObject)\r\n private\r\n fjo: JSValue;\r\n fjv: TJSONValue;\r\n fjs: TJSONString;\r\n public\r\n constructor Create; overload;\r\n constructor Create(const Str: string; const Value: TJSONValue); overload;\r\n constructor Create(const Str: string; const Value: string); overload;\r\n destructor Destroy; override;\r\n property JsonValue: TJSONValue read fjv write fjv;\r\n property JsonString: TJSONString read fjs write fjs;\r\n function ToString: string; override;\r\n end;\r\n\r\n TJSONPairList = class(TList);\r\n\r\n TJSONObject = class(TJSONValue)\r\n private\r\n fjo: TJSObject;\r\n FMembers: TJSONPairList;\r\n function GetPair(const I: Integer): TJSONPair;\r\n function GetCount: Integer;\r\n function GetItem(const Index: Integer): TJSONValue;\r\n procedure SetValues(const Name: string; const Value: TJSONValue);\r\n protected\r\n property jo: TJSObject read fjo write fjo;\r\n procedure AddDescendant(const Descendent: TJSONPair); virtual;\r\n public\r\n constructor Create; overload;\r\n constructor Create(AObject: TJSObject); overload;\r\n destructor Destroy; override;\r\n property JSObject: TJSObject read fjo;\r\n class function ParseJSONValue(const data: string): TJSONValue;\r\n function GetJSONValue(Name: string): string;\r\n function Get(Name: string): TJSONPair; overload;\r\n function Get(Index: Integer): TJSONPair; overload;\r\n function GetValue(const Name: string): TJSONValue;\r\n procedure SetValue(const Name: string; AValue: string); overload;\r\n procedure SetValue(const Name: string; AValue: integer); overload;\r\n procedure SetValue(const Name: string; AValue: double); overload;\r\n property Items[const Index: Integer]: TJSONValue read GetItem;\r\n property Values[const Name: string]: TJSONValue read GetValue write SetValues;\r\n property Pairs[const Index: Integer]: TJSONPair read GetPair;\r\n property Count: Integer read GetCount;\r\n function AddPair(const Pair: TJSONPair): TJSONObject; overload;\r\n function AddPair(const Str: string; const Val: TJSONValue): TJSONObject; overload;\r\n function AddPair(const Str: string; const Val: string): TJSONObject; overload;\r\n function AddPair(const Str: string; const Val: Integer): TJSONObject; overload;\r\n function AddPair(const Str: string; const Val: Int64): TJSONObject; overload;\r\n function AddPair(const Str: string; const Val: Double): TJSONObject; overload;\r\n function RemovePair(const PairName: string): TJSONPair;\r\n\r\n function ToJSON: string;\r\n function ToString: string; override;\r\n end;\r\n\r\n TJSONString = class(TJSONValue)\r\n private\r\n FValue: string;\r\n protected\r\n function GetStrValue: string; override;\r\n procedure SetStrValue(const Value: string); override;\r\n public\r\n constructor Create(AString: string); overload;\r\n end;\r\n\r\n TJSONNumber = class(TJSONString)\r\n private\r\n FInt: Integer;\r\n FInt64: Int64;\r\n FDouble: Double;\r\n protected\r\n function GetStrValue: string; override;\r\n procedure SetStrValue(const Value: string); override;\r\n public\r\n constructor Create(ANumber: integer); overload;\r\n constructor Create(ANumber: Int64); overload;\r\n constructor Create(ANumber: double); overload;\r\n\r\n property AsInt: integer read FInt write FInt;\r\n property AsInt64: Int64 read FInt64 write FInt64;\r\n property AsDouble: Double read FDouble write FDouble;\r\n property AsFloat: Double read FDouble write FDouble;\r\n end;\r\n\r\n TJSONBool = class(TJSONValue)\r\n private\r\n FBool: boolean;\r\n protected\r\n procedure SetStrValue(const Value: string); override;\r\n public\r\n constructor Create(const AValue: Boolean); overload;\r\n property AsBoolean: boolean read FBool write FBool;\r\n end;\r\n\r\n TJSONTrue = class(TJSONBool)\r\n protected\r\n function GetStrValue: string; override;\r\n public\r\n constructor Create;\r\n function ToString: string; override;\r\n end;\r\n\r\n TJSONFalse = class(TJSONBool)\r\n protected\r\n function GetStrValue: string; override;\r\n public\r\n constructor Create;\r\n function ToString: string; override;\r\n end;\r\n\r\n TJSONNull = class(TJSONValue)\r\n protected\r\n function GetStrValue: string; override;\r\n public\r\n function ToString: string; override;\r\n end;\r\n\r\n TJSONArray = class;\r\n\r\n TJSONArrayEnumerator = class\r\n private\r\n FJSONArray: TJSONArray;\r\n FPosition: Integer;\r\n public\r\n constructor Create(AJSONArray: TJSONArray); reintroduce;\r\n function GetCurrent: TJSONValue;\r\n function MoveNext: Boolean;\r\n property Current: TJSONValue read GetCurrent;\r\n end;\r\n\r\n TJSONArray = class(TJSONValue)\r\n private\r\n fja: TJSArray;\r\n function GetItem(index: integer): TJSONValue;\r\n procedure SetItem(index: integer; const Value: TJSONValue);\r\n function GetCount: integer; reintroduce;\r\n function GetJA: TJSArray;\r\n public\r\n constructor Create(AArray: TJSArray); overload;\r\n property ja: TJSArray read GetJA write fja;\r\n property Count: integer read GetCount;\r\n property Items[index: integer]: TJSONValue read GetItem write SetItem; default;\r\n function GetEnumerator: TJSONArrayEnumerator;\r\n procedure Add(const Element: string); overload;\r\n procedure Add(const Element: boolean); overload;\r\n procedure Add(const Element: integer); overload;\r\n procedure Add(const Element: double); overload;\r\n procedure Add(const Element: TJSONObject); overload;\r\n procedure Add(const Element: TJSONPair); overload;\r\n procedure Add(const Element: TJSONArray); overload;\r\n procedure AddElement(const Element: TJSONValue);\r\n\r\n function ToJSON: string;\r\n function ToString: string; override;\r\n end;\r\n\r\n TJSON = class(TObject)\r\n function Parse(s: string): TJSONValue;\r\n end;\r\n\r\nimplementation\r\n\r\nfunction JSONObjectToString(const v: JSValue): string; assembler;\r\nasm\r\n return v+\"\";\r\nend;\r\n\r\n{ TJSON }\r\n\r\nfunction TJSON.Parse(s: string): TJSONValue;\r\nvar\r\n O: TJSObject;\r\nbegin\r\n O := TJSJSON.parseObject(s);\r\n\r\n if isArray(O) then\r\n begin\r\n Result := TJSONArray.Create(TJSArray(O));\r\n end\r\n else\r\n begin\r\n Result := TJSONObject.Create(O);\r\n end;\r\nend;\r\n\r\n{ TJSONArray }\r\n\r\nprocedure TJSONArray.Add(const Element: string);\r\nbegin\r\n ja.push(Element);\r\nend;\r\n\r\nprocedure TJSONArray.Add(const Element: integer);\r\nbegin\r\n ja.push(Element);\r\nend;\r\n\r\nprocedure TJSONArray.Add(const Element: boolean);\r\nbegin\r\n ja.push(Element);\r\nend;\r\n\r\nprocedure TJSONArray.Add(const Element: TJSONObject);\r\nbegin\r\n ja.push(Element);\r\nend;\r\n\r\nprocedure TJSONArray.Add(const Element: double);\r\nbegin\r\n ja.push(Element);\r\nend;\r\n\r\nprocedure TJSONArray.Add(const Element: TJSONPair);\r\nbegin\r\n ja.push(Element);\r\nend;\r\n\r\nprocedure TJSONArray.AddElement(const Element: TJSONValue);\r\nbegin\r\n ja.push(Element);\r\nend;\r\n\r\nconstructor TJSONArray.Create(AArray: TJSArray);\r\nbegin\r\n inherited Create;\r\n ja := AArray;\r\nend;\r\n\r\nfunction TJSONArray.GetCount: integer;\r\nbegin\r\n Result := ja.Length;\r\nend;\r\n\r\nfunction TJSONArray.GetEnumerator: TJSONArrayEnumerator;\r\nbegin\r\n Result := TJSONArrayEnumerator.Create(Self);\r\nend;\r\n\r\nfunction TJSONArray.GetItem(index: integer): TJSONValue;\r\nvar\r\n jv: JSValue;\r\nbegin\r\n jv := ja[Index];\r\n if (jv is TJSONObject) or (jv is TJSONArray) then\r\n Result := TJSONValue(jv)\r\n else\r\n Result := JSONValueFromJS(jv);\r\nend;\r\n\r\nfunction TJSONArray.GetJA: TJSArray;\r\nbegin\r\n if not Assigned(fja) then\r\n fja := TJSArray.new;\r\n\r\n Result := fja;\r\nend;\r\n\r\nprocedure TJSONArray.SetItem(index: integer; const Value: TJSONValue);\r\nbegin\r\n if Value is TJSONObject then\r\n ja[index] := TJSONObject(Value).jo;\r\nend;\r\n\r\nfunction TJSONArray.ToJSON: string;\r\nbegin\r\n Result := ToString;\r\nend;\r\n\r\nfunction TJSONArray.ToString: string;\r\nvar\r\n i: integer;\r\n jv: TJSONValue;\r\n comma: string;\r\nbegin\r\n Result := '[';\r\n comma := '';\r\n\r\n for i := 0 to Count - 1 do\r\n begin\r\n jv := Items[i];\r\n\r\n if Assigned(jv) then\r\n begin\r\n if (jv is TJSONObject) then\r\n begin\r\n Result := Result + comma + (jv as TJSONObject).ToString;\r\n end\r\n else\r\n Result := Result + comma + jv.ToString;\r\n\r\n comma := ',';\r\n end;\r\n end;\r\n\r\n Result := Result + ']';\r\nend;\r\n\r\nprocedure TJSONArray.Add(const Element: TJSONArray);\r\nbegin\r\n ja.push(Element);\r\nend;\r\n\r\n{ TJSONObject }\r\n\r\nconstructor TJSONObject.Create;\r\nbegin\r\n inherited Create;\r\n FMembers := TJSONPairList.Create;\r\n fjo := nil;\r\nend;\r\n\r\n{$HINTS OFF}\r\nfunction TJSONObject.RemovePair(const PairName: string): TJSONPair;\r\nvar\r\n o: TJSObject;\r\n p: TJSONPair;\r\n i: integer;\r\nbegin\r\n Result := nil;\r\n if Assigned(fjo) then\r\n begin\r\n o := fjo;\r\n asm\r\n delete o[PairName];\r\n end;\r\n end\r\n else\r\n begin\r\n for i := 0 to FMembers.Count - 1 do\r\n begin\r\n p := TJSONPair(FMembers.Items[i]);\r\n if (p.fjs.ToString = '\"'+PairName+'\"') then\r\n begin\r\n Result := p;\r\n FMembers.Delete(i);\r\n break;\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TJSONObject.AddPair(const Pair: TJSONPair): TJSONObject;\r\nvar\r\n o: TJSObject;\r\nbegin\r\n if Assigned(Pair) then\r\n begin\r\n AddDescendant(Pair);\r\n if Assigned(fjo) then\r\n begin\r\n o := fjo;\r\n\r\n if Pair.fjv is TJSONArray then\r\n begin\r\n asm\r\n o[Pair.fjs.FValue] = Pair.fjv.fja;\r\n end;\r\n end\r\n else\r\n begin\r\n asm\r\n o[Pair.fjs.FValue] = Pair.fjv.fjv;\r\n end;\r\n end;\r\n end;\r\n end;\r\n Result := Self;\r\nend;\r\n{$HINTS ON}\r\n\r\nfunction TJSONObject.AddPair(const Str: string;\r\n const Val: TJSONValue): TJSONObject;\r\nbegin\r\n AddPair(TJSONPair.Create(Str, Val));\r\n Result := Self;\r\nend;\r\n\r\nprocedure TJSONObject.AddDescendant(const Descendent: TJSONPair);\r\nbegin\r\n FMembers.Add(Descendent);\r\nend;\r\n\r\nfunction TJSONObject.AddPair(const Str, Val: string): TJSONObject;\r\nbegin\r\n AddPair(TJSONPair.Create(Str, Val));\r\n Result := Self;\r\nend;\r\n\r\nfunction TJSONObject.AddPair(const Str: string; const Val: Integer): TJSONObject;\r\nbegin\r\n AddPair(TJSONPair.Create(Str, TJSONNumber.Create(Val)));\r\n Result := Self;\r\nend;\r\n\r\nfunction TJSONObject.AddPair(const Str: string; const Val: Int64): TJSONObject;\r\nbegin\r\n AddPair(TJSONPair.Create(Str, TJSONNumber.Create(Val)));\r\n Result := Self;\r\nend;\r\n\r\nfunction TJSONObject.AddPair(const Str: string; const Val: Double): TJSONObject;\r\nbegin\r\n AddPair(TJSONPair.Create(Str, TJSONNumber.Create(Val)));\r\n Result := Self;\r\nend;\r\n\r\nconstructor TJSONObject.Create(AObject: TJSObject);\r\nbegin\r\n inherited Create;\r\n FMembers := TJSONPairList.Create;\r\n jo := AObject;\r\nend;\r\n\r\ndestructor TJSONObject.Destroy;\r\nbegin\r\n FMembers.Free;\r\n inherited Destroy;\r\nend;\r\n\r\nfunction TJSONObject.Get(Index: Integer): TJSONPair;\r\nbegin\r\n Result := Get(TJSObject.keys(jo)[Index]);\r\nend;\r\n\r\nfunction TJSONObject.Get(Name: string): TJSONPair;\r\nvar\r\n jv: JSValue;\r\n jsv: TJSONValue;\r\n i: integer;\r\n p: TJSONPair;\r\nbegin\r\n Result := nil;\r\n\r\n if Assigned(jo) then\r\n begin\r\n jv := jo.Properties[Name];\r\n if (jv <> Undefined) or (TJSObject(jv) = nil) then \r\n begin\r\n Result := TJSONPair.Create;\r\n jsv := JSONValueFromJS(jv);\r\n Result.fjo := jo;\r\n Result.JsonString.Value := Name;\r\n Result.JsonValue := jsv;\r\n end;\r\n end\r\n else\r\n begin\r\n for i := 0 to FMembers.Count - 1 do\r\n begin\r\n p := TJSONPair(FMembers.Items[i]);\r\n if (p.fjs.ToString = '\"'+Name+'\"') then\r\n Result := p;\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TJSONObject.GetCount: Integer;\r\nbegin\r\n if Assigned(jo) then\r\n Result := Length(TJSObject.keys(jo))\r\n else\r\n if Assigned(FMembers) then\r\n Result := FMembers.Count\r\n else\r\n Result := 0;\r\nend;\r\n\r\nfunction TJSONObject.GetItem(const Index: Integer): TJSONValue;\r\nvar\r\n jv: JSValue;\r\nbegin\r\n jv := jo[TJSObject.keys(jo)[Index]];\r\n Result := JSONValueFromJS(jv);\r\nend;\r\n\r\nfunction TJSONObject.GetJSONValue(Name: string): string;\r\nvar\r\n jv: JSValue;\r\nbegin\r\n jv := jo.Properties[Name];\r\n Result := JSONObjectToString(jv);\r\nend;\r\n\r\nfunction TJSONObject.GetPair(const I: Integer): TJSONPair;\r\nvar\r\n v: TJSONValue;\r\n l: integer;\r\n s: string;\r\n jv: JSValue;\r\nbegin\r\n if (FMembers.Count = 0) and Assigned(jo) and (length(TJSObject.keys(jo)) > 0) then\r\n begin\r\n l := length(TJSObject.keys(jo));\r\n if I < l then\r\n begin\r\n jv := jo[TJSObject.keys(jo)[I]];\r\n v := JSONValueFromJS(jv);\r\n s := TJSObject.keys(jo)[I];\r\n Result := TJSONPair.Create(s,v);\r\n Exit;\r\n end;\r\n end;\r\n\r\n if (I >= 0) and (I < FMembers.Count) then\r\n Result := TJSONPair(FMembers[I])\r\n else\r\n Result := nil;\r\nend;\r\n\r\nfunction TJSONObject.GetValue(const Name: string): TJSONValue;\r\nvar\r\n jp: TJSONPair;\r\nbegin\r\n Result := nil;\r\n\r\n jp := Get(Name);\r\n\r\n if Assigned(jp) then\r\n begin\r\n Result := jp.JsonValue;\r\n Result.fjo := jp.fjo;\r\n end;\r\nend;\r\n\r\nclass function TJSONValue.JSONValueFromJS(const AJSValue: JSValue): TJSONValue;\r\nvar\r\n d: double;\r\nbegin\r\n Result := nil;\r\n\r\n if isArray(AJSValue) then\r\n begin\r\n Result := TJSONArray.Create;\r\n (Result as TJSONArray).ja := TJSArray(AJSValue);\r\n end\r\n else\r\n if isObject(AJSValue) then\r\n begin\r\n Result := TJSONObject.Create;\r\n (Result as TJSONObject).jo := TJSObject(AJSValue);\r\n end\r\n else\r\n if isString(AJSValue) then\r\n begin\r\n Result := TJSONString.Create;\r\n (Result as TJSONString).Value := string(AJSValue);\r\n end\r\n else\r\n if isNumber(AJSValue) then\r\n begin\r\n Result := TJSONNumber.Create;\r\n (Result as TJSONNumber).Value := string(AJSValue);\r\n d := double(AJSValue);\r\n (Result as TJSONNumber).AsDouble := d;\r\n if Frac(d) = 0 then\r\n (Result as TJSONNumber).AsInt := integer(AJSValue);\r\n end\r\n else\r\n if isNull(AJSValue) then\r\n Result := TJSONNull.Create\r\n else\r\n if isBoolean(AJSValue) then\r\n begin\r\n if toBoolean(AJSValue) then\r\n Result := TJSONTrue.Create\r\n else\r\n Result := TJSONFalse.Create;\r\n end;\r\n\r\n if not Assigned(Result) then\r\n Result := TJSONNull.Create;\r\n\r\n Result.jv := AJSValue;\r\nend;\r\n\r\nclass function TJSONObject.ParseJSONValue(const data: string): TJSONValue;\r\nvar\r\n O: TJSObject;\r\nbegin\r\n O := TJSJSON.parseObject(data);\r\n Result := JSONValueFromJS(O);\r\nend;\r\n\r\n{$HINTS OFF}\r\nprocedure TJSONObject.SetValue(const Name: string; AValue: string);\r\nvar\r\n O: TJSObject;\r\nbegin\r\n O := JSObject;\r\n asm\r\n O[Name] = AValue;\r\n end;\r\nend;\r\n\r\nprocedure TJSONObject.SetValue(const Name: string; AValue: integer);\r\nvar\r\n O: TJSObject;\r\nbegin\r\n O := JSObject;\r\n asm\r\n O[Name] = AValue;\r\n end;\r\nend;\r\n\r\nprocedure TJSONObject.SetValue(const Name: string; AValue: double);\r\nvar\r\n O: TJSObject;\r\nbegin\r\n O := JSObject;\r\n asm\r\n O[Name] = AValue;\r\n end;\r\nend;\r\n\r\nprocedure TJSONObject.SetValues(const Name: string; const Value: TJSONValue);\r\nvar\r\n O: TJSObject;\r\nbegin\r\n O := JSObject;\r\n asm\r\n O[Name] = Value;\r\n end;\r\nend;\r\n{$HINTS ON}\r\n\r\nfunction TJSONObject.ToJSON: string;\r\nvar\r\n s: string;\r\n Size: Integer;\r\n I: Integer;\r\n jp: TJSONPair;\r\nbegin\r\n if Assigned(jo) then\r\n Size := Count\r\n else\r\n Size := FMembers.Count;\r\n\r\n s := '{';\r\n if Size > 0 then\r\n begin\r\n if Assigned(jo) then\r\n begin\r\n jp := TJSONPair(Get(0));\r\n if Assigned(jp) then\r\n s := s + jp.ToString\r\n else\r\n s := s + '\"' + TJSObject.keys(jo)[0] +'\":null';\r\n end\r\n else\r\n s := s + TJSONPair(FMembers[0]).ToString;\r\n end;\r\n\r\n for I := 1 to Size - 1 do\r\n begin\r\n if Assigned(jo) then\r\n begin\r\n jp := TJSONPair(Get(I));\r\n if Assigned(jp) then\r\n s := s + ',' + jp.ToString\r\n else\r\n s := s + ',' + '\"' + TJSObject.keys(jo)[I] +'\":null';\r\n end\r\n else\r\n s := s + ',' + TJSONPair(FMembers[I]).ToString;\r\n end;\r\n s := s + '}';\r\n Result := s;\r\nend;\r\n\r\nfunction TJSONObject.ToString: string;\r\nbegin\r\n Result := ToJSON;\r\nend;\r\n\r\n{ TJSONPair }\r\n\r\nconstructor TJSONPair.Create;\r\nbegin\r\n inherited;\r\n fjs := TJSONString.Create;\r\nend;\r\n\r\nconstructor TJSONPair.Create(const Str: string; const Value: TJSONValue);\r\nbegin\r\n inherited Create;\r\n JsonString := TJSONString.Create(Str);\r\n JsonValue := Value;\r\nend;\r\n\r\nconstructor TJSONPair.Create(const Str, Value: string);\r\nbegin\r\n inherited Create;\r\n JsonString := TJSONString.Create(Str);\r\n JsonValue := TJSONString.Create(Value);\r\nend;\r\n\r\ndestructor TJSONPair.Destroy;\r\nbegin\r\n fjs.Free;\r\n inherited;\r\nend;\r\n\r\nfunction TJSONPair.ToString: string;\r\nbegin\r\n if (JsonValue is TJSONObject) then\r\n Result := '\"' + JsonString.GetStrValue + '\":' + (JsonValue as TJSONObject).ToJSON\r\n else\r\n begin\r\n if (JsonString <> nil) and (JsonValue <> nil) then\r\n Result := '\"' + JsonString.GetStrValue + '\":' + JsonValue.ToString\r\n else\r\n Result := '';\r\n end;\r\nend;\r\n\r\n{ TJSONAncestor }\r\n\r\nfunction TJSONAncestor.GetStrValue: string;\r\nbegin\r\n Result := '';\r\nend;\r\n\r\nprocedure TJSONAncestor.SetStrValue(const Value: string);\r\nbegin\r\n //\r\nend;\r\n\r\n{ TJSONString }\r\n\r\nconstructor TJSONString.Create(AString: string);\r\nbegin\r\n inherited Create;\r\n jv := AString;\r\n FValue := AString;\r\nend;\r\n\r\nfunction TJSONString.GetStrValue: string;\r\nbegin\r\n Result := FValue;\r\nend;\r\n\r\nprocedure TJSONString.SetStrValue(const Value: string);\r\nbegin\r\n FValue := Value;\r\n jv := Value;\r\n\r\n if Assigned(fjo) then\r\n begin\r\n asm\r\n var s = Object.keys(this.fjo)[0];\r\n this.fjo[s] = Value;\r\n end;\r\n end;\r\nend;\r\n\r\n{ TJSONNumber }\r\n\r\nconstructor TJSONNumber.Create(ANumber: integer);\r\nbegin\r\n inherited Create;\r\n jv := ANumber;\r\n FInt := ANumber;\r\n FInt64 := ANumber;\r\n FDouble := ANumber;\r\nend;\r\n\r\nconstructor TJSONNumber.Create(ANumber: Int64);\r\nbegin\r\n inherited Create;\r\n jv := ANumber;\r\n FInt := Integer(ANumber);\r\n FInt64 := ANumber;\r\n FDouble := ANumber;\r\nend;\r\n\r\nconstructor TJSONNumber.Create(ANumber: double);\r\nbegin\r\n inherited Create;\r\n jv := ANumber;\r\n FInt := Trunc(ANumber);\r\n FInt64 := Trunc(ANumber);\r\n FDouble := ANumber;\r\nend;\r\n\r\nfunction TJSONNumber.GetStrValue: string;\r\nbegin\r\n Result := FloatToStr(FDouble, TFormatSettings.Invariant);\r\nend;\r\n\r\nprocedure TJSONNumber.SetStrValue(const Value: string);\r\nbegin\r\n FDouble := StrToFloat(Value, TFormatSettings.Invariant);\r\n if Frac(FDouble) = 0 then\r\n begin\r\n if not TryStrToInt64(Value, FInt64, TFormatSettings.Invariant) then\r\n FInt64 := 0;\r\n FInt := FInt64;\r\n jv := FInt64;\r\n end\r\n else\r\n jv := FDouble;\r\nend;\r\n\r\n{ TJSONTrue }\r\n\r\nconstructor TJSONTrue.Create;\r\nbegin\r\n inherited Create(True);\r\nend;\r\n\r\nfunction TJSONTrue.GetStrValue: string;\r\nbegin\r\n Result := 'true';\r\nend;\r\n\r\n\r\nfunction TJSONTrue.ToString: string;\r\nbegin\r\n Result := GetStrValue;\r\nend;\r\n\r\n{ TJSONBool }\r\n\r\nconstructor TJSONBool.Create(const AValue: Boolean);\r\nbegin\r\n inherited Create(AValue);\r\n FBool := AValue;\r\nend;\r\n\r\nprocedure TJSONBool.SetStrValue(const Value: string);\r\nvar\r\n s: string;\r\nbegin\r\n s := Uppercase(Value);\r\n FBool := (s = 'TRUE');\r\nend;\r\n\r\n\r\n{ TJSONFalse }\r\n\r\nconstructor TJSONFalse.Create;\r\nbegin\r\n inherited Create(False);\r\nend;\r\n\r\nfunction TJSONFalse.GetStrValue: string;\r\nbegin\r\n Result := 'false';\r\nend;\r\n\r\nfunction TJSONFalse.ToString: string;\r\nbegin\r\n Result := GetStrValue;\r\nend;\r\n\r\n{ TJSONNull }\r\n\r\nfunction TJSONNull.GetStrValue: string;\r\nbegin\r\n Result := 'null';\r\nend;\r\n\r\n\r\nfunction TJSONNull.ToString: string;\r\nbegin\r\n Result := GetStrValue;\r\nend;\r\n\r\n{ TJSONValue }\r\n\r\nconstructor TJSONValue.Create(AJSValue: JSValue);\r\nbegin\r\n inherited Create;\r\n jv := AJSValue;\r\nend;\r\n\r\nfunction TJSONValue.ToString: string;\r\nbegin\r\n Result := TJSJSON.stringify(jv);\r\nend;\r\n\r\nfunction TJSONValue.GetStrValue: string;\r\nbegin\r\n Result := string(jv);\r\nend;\r\n\r\n\r\nfunction TJSONValue.GetValue(const APath: string = ''): T;\r\nbegin\r\n Result := nil;\r\nend;\r\n\r\nfunction TJSONValue.GetJSValue: JSValue;\r\nbegin\r\n Result := jv;\r\nend;\r\n\r\n\r\n{ TJSONArrayEnumerator }\r\n\r\nconstructor TJSONArrayEnumerator.Create(AJSONArray: TJSONArray);\r\nbegin\r\n inherited Create;\r\n FJSONArray := AJSONArray;\r\n FPosition := -1;\r\nend;\r\n\r\nfunction TJSONArrayEnumerator.GetCurrent: TJSONValue;\r\nbegin\r\n Result := FJSONArray[FPosition];\r\nend;\r\n\r\nfunction TJSONArrayEnumerator.MoveNext: Boolean;\r\nbegin\r\n Inc(FPosition);\r\n Result := FPosition < FJSONArray.Count;\r\nend;\r\n\r\n\r\nend.\r\n","{********************************************************************}\r\n{ }\r\n{ written by TMS Software }\r\n{ copyright (c) 2018 - 2024 }\r\n{ Email : info@tmssoftware.com }\r\n{ Web : http://www.tmssoftware.com }\r\n{ }\r\n{ The source code is given as is. The author is not responsible }\r\n{ for any possible damage done due to the use of this code. }\r\n{ The complete source code remains property of the author and may }\r\n{ not be distributed, published, given or sold in any form as such. }\r\n{ No parts of the source code can be included in any other component }\r\n{ or application without written authorization of the author. }\r\n{********************************************************************}\r\n\r\nunit WEBLib.Storage;\r\n\r\n{$DEFINE NOPP}\r\n\r\ninterface\r\n\r\nuses\r\n Web, Classes;\r\n\r\ntype\r\n TStorageChangeEvent = procedure(Sender: TObject; AKey: string; AOldValue: string; ANewValue: string; AURL: string) of object;\r\n\r\n TLocalStorage = class(TComponent)\r\n private\r\n FChangePtr: pointer;\r\n FOnChange: TStorageChangeEvent;\r\n protected\r\n procedure SetValues(AKey, AValue: string);\r\n function GetValues(AKey: string): string;\r\n function GetKey(AIndex: integer): string;\r\n function GetCount: integer;\r\n procedure StorageChanged(AEvent:TJSStorageEvent);\r\n public\r\n constructor Create(AOwner: TComponent); override;\r\n destructor Destroy; override;\r\n class procedure Clear;\r\n property Keys[AIndex: integer]: string read GetKey;\r\n property Count: integer read GetCount;\r\n property Values[Key: string]: string read GetValues write SetValues;\r\n class procedure SetValue(AKey, AValue: string);\r\n class function GetValue(AKey: string): string;\r\n class procedure RemoveKey(AKey: string);\r\n published\r\n property OnChange: TStorageChangeEvent read FOnChange write FOnChange;\r\n end;\r\n\r\n TWebLocalStorage = class(TLocalStorage);\r\n\r\n TSessionStorage = class(TComponent)\r\n private\r\n FChangePtr: pointer;\r\n FOnChange: TStorageChangeEvent;\r\n protected\r\n procedure SetValues(AKey, AValue: string);\r\n function GetValues(AKey: string): string;\r\n function GetKey(AIndex: integer): string;\r\n function GetCount: integer;\r\n procedure StorageChanged(AEvent:TJSStorageEvent);\r\n public\r\n constructor Create(AOwner: TComponent); override;\r\n destructor Destroy; override;\r\n class procedure Clear;\r\n property Keys[AIndex: integer]: string read GetKey;\r\n property Count: integer read GetCount;\r\n property Values[key: string]: string read GetValues write SetValues;\r\n class procedure SetValue(AKey, AValue: string);\r\n class function GetValue(AKey: string): string;\r\n class procedure RemoveKey(AKey: string);\r\n published\r\n property OnChange: TStorageChangeEvent read FOnChange write FOnChange;\r\n end;\r\n\r\n TWebSessionStorage = class(TSessionStorage);\r\n\r\nimplementation\r\n\r\nuses\r\n SysUtils;\r\n\r\n{ TLocalStorage }\r\n\r\nclass procedure TLocalStorage.SetValue(AKey, AValue: string);\r\nbegin\r\n window.localStorage.setItem(AKey, AValue);\r\nend;\r\n\r\nprocedure TLocalStorage.SetValues(AKey, AValue: string);\r\nbegin\r\n window.localStorage.setItem(AKey, AValue);\r\nend;\r\n\r\nprocedure TLocalStorage.StorageChanged(AEvent: TJSStorageEvent);\r\nvar\r\n s:string;\r\nbegin\r\n s := AEvent.storageArea+' ';\r\n if Assigned(OnChange) and (pos('OBJECT', UpperCase(s)) > 0) then\r\n OnChange(Self, AEvent.key, AEvent.oldValue, AEvent.newValue, AEVent.url);\r\nend;\r\n\r\nclass function TLocalStorage.GetValue(AKey: string): string;\r\nvar\r\n s: string;\r\nbegin\r\n s := window.localStorage.getItem(AKey);\r\n if not Assigned(s) then\r\n Result := ''\r\n else\r\n Result := s;\r\nend;\r\n\r\nfunction TLocalStorage.GetValues(AKey: string): string;\r\nvar\r\n s: string;\r\nbegin\r\n s := window.localStorage.getItem(AKey);\r\n if not Assigned(s) then\r\n Result := ''\r\n else\r\n Result := s;\r\nend;\r\n\r\nclass procedure TLocalStorage.RemoveKey(AKey: string);\r\nbegin\r\n window.localStorage.removeItem(AKey);\r\nend;\r\n\r\nfunction TLocalStorage.GetKey(AIndex: integer): string;\r\nbegin\r\n Result := window.localStorage.Keys[AIndex];\r\nend;\r\n\r\nclass procedure TLocalStorage.Clear;\r\nbegin\r\n window.sessionStorage.clear;\r\nend;\r\n\r\nconstructor TLocalStorage.Create(AOwner: TComponent);\r\nbegin\r\n FChangePtr := @StorageChanged;\r\n inherited;\r\n\r\n window.addEventListener('storage', FChangePtr);\r\nend;\r\n\r\ndestructor TLocalStorage.Destroy;\r\nbegin\r\n window.removeEventListener('storage',FChangePtr);\r\n inherited;\r\nend;\r\n\r\nfunction TLocalStorage.GetCount: integer;\r\nbegin\r\n Result := window.localStorage.length;\r\nend;\r\n\r\n{ TSessionStorage }\r\n\r\nclass procedure TSessionStorage.SetValue(AKey, AValue: string);\r\nbegin\r\n window.sessionStorage.setItem(AKey, AValue);\r\nend;\r\n\r\nprocedure TSessionStorage.SetValues(AKey, AValue: string);\r\nbegin\r\n window.sessionStorage.setItem(AKey, AValue);\r\nend;\r\n\r\nprocedure TSessionStorage.StorageChanged(AEvent: TJSStorageEvent);\r\nvar\r\n s:string;\r\nbegin\r\n s := AEvent.storageArea+' ';\r\n if Assigned(OnChange) and (pos('OBJECT', Uppercase(s)) = 0) then\r\n OnChange(Self, AEvent.key, AEvent.oldValue, AEvent.newValue, AEVent.url);\r\nend;\r\n\r\nclass function TSessionStorage.GetValue(AKey: string): string;\r\nvar\r\n s: string;\r\nbegin\r\n s := window.sessionStorage.getItem(AKey);\r\n if not Assigned(s) then\r\n Result := ''\r\n else\r\n Result := s;\r\nend;\r\n\r\nfunction TSessionStorage.GetValues(AKey: string): string;\r\nvar\r\n s: string;\r\nbegin\r\n s := window.sessionStorage.getItem(AKey);\r\n if not Assigned(s) then\r\n Result := ''\r\n else\r\n Result := s;\r\nend;\r\n\r\nclass procedure TSessionStorage.RemoveKey(AKey: string);\r\nbegin\r\n window.sessionStorage.removeItem(AKey);\r\nend;\r\n\r\n\r\nfunction TSessionStorage.GetKey(AIndex: integer): string;\r\nbegin\r\n Result := window.sessionStorage.Keys[AIndex];\r\nend;\r\n\r\nclass procedure TSessionStorage.Clear;\r\nbegin\r\n window.sessionStorage.clear;\r\nend;\r\n\r\nconstructor TSessionStorage.Create(AOwner: TComponent);\r\nbegin\r\n FChangePtr := @StorageChanged;\r\n\r\n inherited;\r\n\r\n window.addEventListener('storage', FChangePtr);\r\nend;\r\n\r\ndestructor TSessionStorage.Destroy;\r\nbegin\r\n window.removeEventListener('storage', FChangePtr);\r\n inherited;\r\nend;\r\n\r\nfunction TSessionStorage.GetCount: integer;\r\nbegin\r\n Result := window.sessionStorage.length;\r\nend;\r\n\r\n\r\n\r\nend.","{********************************************************************}\r\n{ }\r\n{ written by TMS Software }\r\n{ copyright (c) 2018 - 2024 }\r\n{ Email : info@tmssoftware.com }\r\n{ Web : http://www.tmssoftware.com }\r\n{ }\r\n{ The source code is given as is. The author is not responsible }\r\n{ for any possible damage done due to the use of this code. }\r\n{ The complete source code remains property of the author and may }\r\n{ not be distributed, published, given or sold in any form as such. }\r\n{ No parts of the source code can be included in any other component }\r\n{ or application without written authorization of the author. }\r\n{********************************************************************}\r\n\r\nunit WEBLib.REST;\r\n\r\n{$DEFINE NOPP}\r\n\r\ninterface\r\n\r\nuses\r\n Classes, Web, JS, SysUtils, WEBLib.Controls, WEBLib.JSON;\r\n\r\nconst\r\n ContentTypeJSON = 'application/json;charset=UTF-8';\r\n ContentTypeForm = 'application/x-www-form-urlencoded';\r\n\r\ntype\r\n THTTPCommand = (httpGET, httpPOST, httpPUT, httpDELETE, httpHEAD, httpPATCH, httpCUSTOM);\r\n\r\n THTTPRequestResponseType = (rtDefault, rtText, rtBlob, rtJSON, rtDocument, rtArrayBuffer);\r\n\r\n THTTPResponseProc = reference to procedure(AResponse: string; ARequest: TJSXMLHttpRequest);\r\n THTTPErrorProc = reference to procedure(ARequest: TJSXMLHttpRequest);\r\n\r\n THTTPRequestHandler = reference to procedure(Event: TEventListenerEvent);\r\n\r\n THTTPProgressEvent = procedure(Sender: TObject; Position, Total: int64) of object;\r\n\r\n THttpRequest = class(TComponent)\r\n private\r\n FURL: string;\r\n FOnResponse: THTTPResponseEvent;\r\n FOnAbort: THTTPAbortEvent;\r\n FHeaders: TStringList;\r\n FCommand: THTTPCommand;\r\n FCustomCommand: string;\r\n FPostData: string;\r\n FOnRequestResponse: THTTPRequestResponseEvent;\r\n FPassword: string;\r\n FUser: string;\r\n FTimeout: integer;\r\n FOnTimeout: TNotifyEvent;\r\n FOnError: THTTPErrorEvent;\r\n FResponse: THttpResponseProc;\r\n FErrorProc: THttpErrorProc;\r\n FTimeOutProc: THttpErrorProc;\r\n FResponseType: THTTPRequestResponseType;\r\n FOnProgress: THTTPProgressEvent;\r\n protected\r\n function HandleResponse(Event: TEventListenerEvent): boolean;\r\n function HandleAbort(Event: TEventListenerEvent): boolean;\r\n function HandleTimeout(Event: TEventListenerEvent): boolean;\r\n function HandleError(Event: TEventListenerEvent): boolean;\r\n function HandleProgress(Event: TEventListenerEvent): boolean;\r\n function HandleReadyStateChange(Event: TEventListenerEvent): boolean;\r\n procedure SetHeaders(const AValue: TStringList);\r\n public\r\n constructor Create(AOwner: TComponent); override;\r\n destructor Destroy; override;\r\n procedure Loaded; override;\r\n class function GetResponseType(AResponseType: THTTPRequestResponseType): string;\r\n procedure ExecuteSizeRequest(AResponse: THTTPResponseProc; AError: THTTPErrorProc; ATimeOut: THTTPErrorProc);\r\n procedure Execute(AResponse: THTTPResponseProc = nil); overload;\r\n procedure Execute(AResponse: THTTPResponseProc; AError: THTTPErrorProc); overload;\r\n procedure Execute(AResponse: THTTPResponseProc; AError: THTTPErrorProc; ATimeOut: THTTPErrorProc); overload;\r\n [async]\r\n function GetSize: TJSPromise;\r\n [async]\r\n function Perform: TJSPromise;\r\n published\r\n property Command: THTTPCommand read FCommand write FCommand;\r\n property CustomCommand: string read FCustomCommand write FCustomCommand;\r\n property Headers: TStringList read FHeaders write SetHeaders;\r\n property Password: string read FPassword write FPassword;\r\n property PostData: string read FPostData write FPostData;\r\n property ResponseType: THTTPRequestResponseType read FResponseType write FResponseType default rtDefault;\r\n property Timeout: integer read FTimeout write FTimeout default 0;\r\n property URL: string read FURL write FURL;\r\n property User: string read FUser write FUser;\r\n property OnError: THTTPErrorEvent read FOnError write FOnError;\r\n property OnAbort: THTTPAbortEvent read FOnAbort write FOnAbort;\r\n property OnProgress: THTTPProgressEvent read FOnProgress write FOnProgress;\r\n property OnRequestResponse: THTTPRequestResponseEvent read FOnRequestResponse write FOnRequestResponse;\r\n property OnResponse: THTTPResponseEvent read FOnResponse write FOnResponse;\r\n property OnTimeout: TNotifyEvent read FOnTimeout write FOnTimeout;\r\n end;\r\n\r\n TWebHTTPRequest = class(THTTPRequest);\r\n\r\n THttpResponse = procedure(Sender: TObject; AResponse: string) of object;\r\n TInternalHttpResponse = procedure(Sender: TObject; AResponse: string; var Handled: boolean) of object;\r\n\r\n TPersistTokens = class(TPersistent)\r\n private\r\n FKey: string;\r\n FEnabled: boolean;\r\n public\r\n constructor Create; reintroduce;\r\n procedure Assign(Source: TPersistent); override;\r\n published\r\n property Key: string read FKey write FKey;\r\n property Enabled: boolean read FEnabled write FEnabled default false;\r\n end;\r\n\r\n TRESTApp = class(TPersistent)\r\n private\r\n FKey: string;\r\n FCallbackURL: string;\r\n FSecret: string;\r\n FAuthURL: string;\r\n FClientID: string;\r\n public\r\n function GetKey: string;\r\n procedure Assign(Source: TPersistent); override;\r\n published\r\n property AuthURL: string read FAuthURL write FAuthURL;\r\n property ClientID: string read FClientID write FClientID;\r\n property Key: string read FKey write FKey;\r\n property CallbackURL: string read FCallbackURL write FCallbackURL;\r\n property Secret: string read FSecret write FSecret;\r\n end;\r\n\r\n TAuthLocale = (lcDefault, lcEnglish, lcDutch, lcGerman, lcFrench, lcSpanish, lcItalian,\r\n lcPortuguese, lcGreek, lcDanish, lcRussian, lcRomanian, lcSwedish, lcFinnish, lcTurkish,\r\n lcJapanese);\r\n\r\n TCoreCloudHeader = record\r\n header: String;\r\n value: String;\r\n end;\r\n\r\n TCoreCloudHeaders = array of TCoreCloudHeader;\r\n\r\n TRESTClient = class(TComponent)\r\n private\r\n FAPIBase: string;\r\n FAccessToken: string;\r\n FRefreshToken: string;\r\n FAccessExpiry: TDateTime;\r\n FRefreshExpiry: TDateTime;\r\n FOnAccessToken: TNotifyEvent;\r\n FOnAuthFailed: TNotifyEvent;\r\n FEventRegistered: boolean;\r\n FOnResponse: THttpResponse;\r\n FPersistTokens: TPersistTokens;\r\n FOnHttpResponse: TInternalHttpResponse;\r\n FApp: TRESTApp;\r\n FScopes: TStrings;\r\n FLocale: TAuthLocale;\r\n FOnRequestResponse: THTTPRequestResponseEvent;\r\n FOnError: THttpErrorEvent;\r\n FResponseType: THTTPRequestResponseType;\r\n FLoginWidth: integer;\r\n FLoginHeight: integer;\r\n FHandleAccessTokenPtr: pointer;\r\n FHandleAuthClosePtr: pointer;\r\n FOpenResolver: TJSPromiseResolver;\r\n procedure SetPersistTokens(const Value: TPersistTokens);\r\n procedure SetApp(const Value: TRESTApp);\r\n procedure SetScopes(const Value: TStrings);\r\n procedure AuthWinClosed;\r\n protected\r\n class function InstallCallback: boolean;\r\n procedure RemoveOAuthHandler; virtual;\r\n procedure DoAuthFailed; virtual;\r\n procedure DoAuthSuccess; virtual;\r\n function HandleAccessToken(const s: TJSObject): boolean; virtual;\r\n function HandleResponse(Event: TEventListenerEvent): boolean;\r\n function GetAuthURL: string; virtual;\r\n function ScopeParamText(Delimiter: string; Encode: boolean = false): string;\r\n function GetLocaleParam: string; virtual;\r\n function GetJSONValue(o: TJSONObject; ID: string): TJSONValue;\r\n function GetJSONObject(o: TJSONObject; ID: string): TJSONValue;\r\n property APIBase: string read FAPIBase write FAPIBase;\r\n property Locale: TAuthLocale read FLocale write FLocale;\r\n property Token_Access: string read FAccessToken;\r\n function TMSUTF8Encode(s: string): string;\r\n procedure HttpRequestEvent(Command, URL: string; Data: string = ''; ContentType: string = ''; headers: TCoreCloudHeaders = nil; AResponse: THTTPRequestHandler = nil; AError: THTTPRequestHandler = nil; ATimeOut: THTTPRequestHandler = nil);\r\n public\r\n constructor Create(AOwner: TComponent); override;\r\n destructor Destroy; override;\r\n procedure HttpsCommand(Command, URL, Data, ContentType: string; headers: TCoreCloudHeaders); virtual;\r\n procedure HttpsDelete(URL: string); overload; virtual;\r\n procedure HttpsDelete(URL: string; headers: TCoreCloudHeaders); overload; virtual;\r\n procedure HttpsGet(URL: string); overload; virtual;\r\n procedure HttpsGet(URL: string; headers: TCoreCloudHeaders); overload; virtual;\r\n procedure HttpsPost(URL: string; Data: string); overload; virtual;\r\n procedure HttpsPost(URL: string; ContentType, Data: string); overload; virtual;\r\n procedure HttpsPost(URL: string; ContentType, Data: string; headers: TCoreCloudHeaders); overload; virtual;\r\n procedure HttpsPost(URL: string; headers: TCoreCloudHeaders; Data: string); overload; virtual;\r\n procedure HttpsUpdate(URL: string; headers: TCoreCloudHeaders; Data: string); virtual;\r\n procedure HttpsPut(URL: string; ContentType, Data: string); virtual;\r\n\r\n function HttpRequest(Command, URL: string; Data: string = ''; ContentType: string = ''; headers: TCoreCloudHeaders = nil): TJSPromise;\r\n\r\n property AccessToken: string read FAccessToken write FAccessToken;\r\n property RefreshToken: string read FRefreshToken write FRefreshToken;\r\n property AccessExpiry: TDateTime read FAccessExpiry write FAccessExpiry;\r\n property RefreshExpiry: TDateTime read FRefreshExpiry write FRefreshExpiry;\r\n class function URLEncode(URI: string): string;\r\n class function JSONEscape(s: string): string;\r\n class function IsoToDateTime(const s: string): TDateTime; overload;\r\n class function IsoToDateTime(const s: string; IsUTC: Boolean): TDateTime; overload;\r\n class function IsoToDate(const s: string): TDate;\r\n class function IsoToTime(const s: string): TTime;\r\n class function IsIsoDateTime(const s: string): boolean;\r\n class function GetUTCDateTime: TDateTime;\r\n class function DateTimeToWL(dt: TDateTime): string;\r\n class function DateToWL(dt: TDate): string;\r\n class function TimeToWL(dt: TTime): string;\r\n class function DateTimeToDaylightSavings(dt: TDateTime): TDateTime;\r\n class function GetJSONProp(O: TJSONOBject; ID: string): string; overload;\r\n class function GetJSONInt(O: TJSONOBject; ID: string): integer; overload;\r\n procedure DoAuth; virtual;\r\n procedure Connect;\r\n function Open: TJSPromise;\r\n function Authenticate: TJSPromise; {$IFDEF PAS2JS} async; {$ENDIF}\r\n procedure ReadTokens; virtual;\r\n procedure WriteTokens; virtual;\r\n\r\n procedure TestTokens; virtual; {$IFDEF PAS2JS} async; {$ENDIF}\r\n procedure ClearTokens; virtual;\r\n property OnHttpResponse: TInternalHttpResponse read FOnHttpResponse write FOnHttpResponse;\r\n published\r\n property App: TRESTApp read FApp write SetApp;\r\n property LoginHeight: integer read FLoginHeight write FLoginHeight default 600;\r\n property LoginWidth: integer read FLoginWidth write FLoginWidth default 800;\r\n property PersistTokens: TPersistTokens read FPersistTokens write SetPersistTokens;\r\n property ResponseType: THTTPRequestResponseType read FResponseType write FResponseType default rtDefault;\r\n property Scopes: TStrings read FScopes write SetScopes;\r\n property OnAccessToken: TNotifyEvent read FOnAccessToken write FOnAccessToken;\r\n property OnAuthFailed: TNotifyEvent read FOnAuthFailed write FOnAuthFailed;\r\n property OnRequestResponse: THTTPRequestResponseEvent read FOnRequestResponse write FOnRequestResponse;\r\n property OnResponse: THttpResponse read FOnResponse write FOnResponse;\r\n property OnError: THttpErrorEvent read FOnError write FOnError;\r\n end;\r\n\r\n TWebRESTClient = class(TRESTClient);\r\n\r\n TJSValue = JSValue;\r\n\r\nprocedure AddHeader(var AHeaders: TCoreCloudHeaders; Header: string; Value: string);\r\nfunction GetArraySize(ja: TJSONArray): integer;\r\nfunction GetArrayItem(ja: TJSONArray; Index: integer): TJSONObject;\r\nfunction HTTPCommand(ACommand: THTTPCommand; ACustomCommand: string): string;\r\n\r\nimplementation\r\n\r\nuses\r\n WEBLib.Storage, WEBLib.Utils;\r\n\r\nfunction HTTPCommand(ACommand: THTTPCommand; ACustomCommand: string): string;\r\nvar\r\n cmd: string;\r\nbegin\r\n case ACommand of\r\n httpGET: cmd := 'GET';\r\n httpPOST: cmd := 'POST';\r\n httpPUT: cmd := 'PUT';\r\n httpDELETE: cmd := 'DELETE';\r\n httpHEAD: cmd := 'HEAD';\r\n httpPATCH: cmd := 'PATCH';\r\n httpCUSTOM: cmd := ACustomCommand;\r\n end;\r\n Result := cmd;\r\nend;\r\n\r\nfunction GetArraySize(ja: TJSONArray): integer;\r\nbegin\r\n Result := ja.Count;\r\nend;\r\n\r\nfunction GetArrayItem(ja: TJSONArray; Index: integer): TJSONObject;\r\nbegin\r\n Result := TJSONObject(ja.Items[Index]);\r\nend;\r\n\r\n\r\nprocedure AddHeader(var AHeaders: TCoreCloudHeaders; Header: String; Value: String);\r\nbegin\r\n SetLength(AHeaders, Length(AHeaders) + 1);\r\n AHeaders[Length(AHeaders) - 1].header := Header;\r\n AHeaders[Length(AHeaders) - 1].value := Value;\r\nend;\r\n\r\n{ THttpRequest }\r\n\r\nconstructor THttpRequest.Create(AOwner: TComponent);\r\nbegin\r\n inherited;\r\n FHeaders := TStringList.Create;\r\n FResponseType := rtDefault;\r\n FCommand := httpGET;\r\n FTimeout := 0;\r\n FResponse := nil;\r\nend;\r\n\r\ndestructor THttpRequest.Destroy;\r\nbegin\r\n FHeaders.Free;\r\n inherited;\r\nend;\r\n\r\nprocedure THttpRequest.Loaded;\r\nvar\r\n i,j: integer;\r\n s: string;\r\n flg: boolean;\r\nbegin\r\n inherited;\r\n for i := 0 to FHeaders.Count - 1 do\r\n begin\r\n s := FHeaders[i];\r\n flg := false;\r\n for j := 1 to length(s) do\r\n begin\r\n if (s[j] = ':') and not flg then\r\n begin\r\n s[j] := '=';\r\n flg := true;\r\n end\r\n else\r\n if (s[j] = '=') and flg then\r\n begin\r\n s[j] := ':';\r\n end;\r\n end;\r\n FHeaders[i] := s;\r\n end;\r\nend;\r\n\r\nfunction THttpRequest.Perform: TJSPromise;\r\nbegin\r\n Result := TJSPromise.new(\r\n procedure(ASuccess, AFailed: TJSPromiseResolver)\r\n begin\r\n Execute(\r\n procedure(AResponse: string; ARequest: TJSXMLHttpRequest)\r\n begin\r\n ASuccess(ARequest);\r\n end,\r\n procedure(ARequest: TJSXMLHttpRequest)\r\n begin\r\n AFailed(ARequest);\r\n end,\r\n procedure(ARequest: TJSXMLHttpRequest)\r\n begin\r\n AFailed(ARequest);\r\n end);\r\n end);\r\nend;\r\n\r\nprocedure THttpRequest.Execute(AResponse: THttpResponseProc = nil);\r\nbegin\r\n Execute(AResponse, nil, nil);\r\nend;\r\n\r\nprocedure THttpRequest.Execute(AResponse: THTTPResponseProc; AError: THTTPErrorProc);\r\nbegin\r\n Execute(AResponse, AError, nil);\r\nend;\r\n\r\n\r\nprocedure THttpRequest.Execute(AResponse: THTTPResponseProc; AError: THTTPErrorProc; ATimeOut: THTTPErrorProc);\r\nvar\r\n i: integer;\r\n cmd: string;\r\n req: TJSXMLHttpRequest;\r\n headname,headvalue: string;\r\nbegin\r\n FResponse := AResponse;\r\n FErrorProc := AError;\r\n FTimeOutProc := ATimeOut;\r\n\r\n req := TJSXMLHttpRequest.new;\r\n req.addEventListener('load', @HandleResponse);\r\n req.addEventListener('abort',@HandleAbort);\r\n req.addEventListener('timeout',@HandleTimeout);\r\n req.addEventListener('error',@HandleError);\r\n req.addEventListener('progress',@HandleProgress);\r\n req.responseType := THTTPRequest.GetResponseType(FResponseType);\r\n\r\n cmd := HTTPCommand(Command, CustomCommand);\r\n\r\n if FTimeout <> 0 then\r\n req.timeout := FTimeout;\r\n\r\n if (FUser <> '') then\r\n begin\r\n req.open(cmd, FURL, true);\r\n req.setRequestHeader('X-Requested-With', 'XMLHttpRequest');\r\n end\r\n else\r\n req.open(cmd, FURL);\r\n\r\n for i := 0 to FHeaders.Count - 1 do\r\n begin\r\n FHeaders.GetNameValue(i, headname, headvalue);\r\n req.setRequestHeader(headname, headvalue);\r\n end;\r\n\r\n if (FUser <> '') then\r\n req.setRequestHeader('Authorization', 'Basic '+window.btoa(User+':'+Password));\r\n\r\n if PostData <> '' then\r\n req.send(PostData)\r\n else\r\n req.send;\r\nend;\r\n\r\nprocedure THttpRequest.ExecuteSizeRequest(AResponse: THTTPResponseProc; AError: THTTPErrorProc; ATimeOut: THTTPErrorProc);\r\nvar\r\n i: integer;\r\n req: TJSXMLHttpRequest;\r\n headname,headvalue: string;\r\nbegin\r\n FResponse := AResponse;\r\n FErrorProc := AError;\r\n FTimeOutProc := ATimeOut;\r\n\r\n req := TJSXMLHttpRequest.new;\r\n req.addEventListener('readystatechange', @HandleReadyStateChange);\r\n req.addEventListener('timeout',@HandleTimeout);\r\n req.addEventListener('error',@HandleError);\r\n\r\n if FTimeout <> 0 then\r\n req.timeout := FTimeout;\r\n\r\n if (FUser <> '') then\r\n begin\r\n req.open('HEAD', FURL, true, FUser, FPassword);\r\n req.setRequestHeader('X-Requested-With', 'XMLHttpRequest');\r\n end\r\n else\r\n req.open('HEAD', FURL);\r\n\r\n for i := 0 to FHeaders.Count - 1 do\r\n begin\r\n FHeaders.GetNameValue(i, headname, headvalue);\r\n req.setRequestHeader(headname, headvalue);\r\n end;\r\n\r\n if (FUser <> '') then\r\n req.setRequestHeader('Authorization', 'Basic '+window.btoa(User+':'+Password));\r\n\r\n req.send;\r\nend;\r\n\r\nclass function THttpRequest.GetResponseType(AResponseType: THTTPRequestResponseType): string;\r\nbegin\r\n Result := '';\r\n case AResponseType of\r\n rtText: Result := 'text';\r\n rtBlob: Result := 'blob';\r\n rtDocument: Result := 'document';\r\n rtJSON: Result := 'json';\r\n rtArrayBuffer: Result := 'arraybuffer';\r\n end;\r\nend;\r\n\r\nfunction THttpRequest.GetSize: TJSPromise;\r\nvar\r\n sz: int64;\r\n e: integer;\r\nbegin\r\n Result := TJSPromise.new(\r\n procedure(ASuccess, AFailed: TJSPromiseResolver)\r\n begin\r\n ExecuteSizeRequest(\r\n procedure(AResponse: string; ARequest: TJSXMLHttpRequest)\r\n begin\r\n val(AResponse, sz, e);\r\n ASuccess(sz);\r\n end,\r\n procedure(ARequest: TJSXMLHttpRequest)\r\n begin\r\n AFailed(0);\r\n end,\r\n procedure(ARequest: TJSXMLHttpRequest)\r\n begin\r\n AFailed(ARequest);\r\n end)\r\n end);\r\nend;\r\n\r\nfunction THttpRequest.HandleAbort(Event: TEventListenerEvent): boolean;\r\nbegin\r\n if Assigned(OnAbort) then\r\n OnAbort(Self);\r\n Result := true;\r\nend;\r\n\r\nfunction THttpRequest.HandleError(Event: TEventListenerEvent): boolean;\r\nvar\r\n Handled: boolean;\r\n LEventRec: TJSEventRecord;\r\n LRequestRec: TJSXMLHttpRequestRecord;\r\nbegin\r\n Result := true;\r\n Handled := false;\r\n\r\n if Assigned(FOnError) then\r\n begin\r\n LEventRec.event := Event;\r\n LRequestRec.req := TJSXMLHttpRequest(Event.Target);\r\n FOnError(Self, LRequestRec, LEventRec, Handled);\r\n end;\r\n\r\n if Assigned(FErrorProc) then\r\n FErrorProc(LRequestRec.req);\r\n\r\n if not Handled then\r\n raise Exception.Create('HTTP request error @' + URL);\r\nend;\r\n\r\nfunction THttpRequest.HandleProgress(Event: TEventListenerEvent): boolean;\r\nvar\r\n position, total: int64;\r\nbegin\r\n Result := true;\r\n\r\n asm\r\n position = Event.loaded;\r\n total = Event.total;\r\n end;\r\n\r\n if Assigned(OnProgress) then\r\n OnProgress(Self, position, total);\r\nend;\r\n\r\nfunction THttpRequest.HandleReadyStateChange(\r\n Event: TEventListenerEvent): boolean;\r\nvar\r\n LRequestRec: TJSXMLHttpRequestRecord;\r\n sz: string;\r\nbegin\r\n Result := true;\r\n LRequestRec.req := TJSXMLHttpRequest(Event.target);\r\n\r\n if (LRequestRec.req.readyState = 4) then\r\n begin\r\n if (LRequestRec.req.status >= 200) and (LRequestRec.req.status < 300) then\r\n begin\r\n sz := LRequestRec.req.getResponseHeader('Content-Length');\r\n\r\n if Assigned(FResponse) then\r\n begin\r\n FResponse(sz, LRequestRec.req);\r\n end;\r\n end\r\n else\r\n if Assigned(FErrorProc) then\r\n FErrorProc(LRequestRec.req);\r\n end;\r\nend;\r\n\r\nfunction THttpRequest.HandleResponse(Event: TEventListenerEvent): boolean;\r\nvar\r\n s: string;\r\n LRequestRec: TJSXMLHttpRequestRecord;\r\n\r\nbegin\r\n LRequestRec.req := TJSXMLHttpRequest(Event.target);\r\n\r\n s := '';\r\n if ResponseType in [rtText, rtDefault] then\r\n begin\r\n asm\r\n s = Event.target.responseText;\r\n end;\r\n end;\r\n\r\n if Assigned(OnRequestResponse) then\r\n begin\r\n OnRequestResponse(Self, LRequestRec, s);\r\n end;\r\n\r\n if Assigned(OnResponse) then\r\n OnResponse(Self, s);\r\n\r\n if Assigned(FResponse) then\r\n begin\r\n FResponse(s, LRequestRec.req);\r\n end;\r\n\r\n Result := true;\r\nend;\r\n\r\nfunction THttpRequest.HandleTimeout(Event: TEventListenerEvent): boolean;\r\nbegin\r\n if Assigned(OnTimeout) then\r\n OnTimeout(Self);\r\n\r\n if Assigned(FTimeOutProc) then\r\n FTimeOutProc(TJSXMLHttpRequest(Event.Target));\r\n\r\n Result := true;\r\nend;\r\n\r\nprocedure THttpRequest.SetHeaders(const AValue: TStringList);\r\nbegin\r\n FHeaders.Assign(AValue);\r\nend;\r\n\r\n{ TRESTClient }\r\n\r\nfunction TRESTClient.Authenticate: TJSPromise;\r\nbegin\r\n Result := TJSPromise.new(\r\n procedure(ASuccess, AFailed: TJSPromiseResolver)\r\n var\r\n ptr: pointer;\r\n\r\n function HandleOAuthCallBack(const s: TJSObject): boolean;\r\n var\r\n token: string;\r\n begin\r\n document.removeEventListener('oauthcallback', ptr);\r\n\r\n asm\r\n token = s.detail.message;\r\n end;\r\n\r\n FAccessToken := token;\r\n WriteTokens;\r\n ASuccess(FAccessToken);\r\n end;\r\n\r\n begin\r\n ptr := @HandleOAuthCallBack;\r\n document.addEventListener('oauthcallback', ptr);\r\n DoAuth;\r\n end);\r\nend;\r\n\r\nprocedure TRESTClient.AuthWinClosed;\r\nbegin\r\n if FEventRegistered then // only fail when auth window was not auto closed\r\n DoAuthFailed;\r\nend;\r\n\r\nprocedure TRESTClient.ClearTokens;\r\nbegin\r\n AccessToken := '';\r\n WriteTokens;\r\nend;\r\n\r\nprocedure TRESTClient.Connect;\r\nbegin\r\n if FPersistTokens.Enabled then\r\n begin\r\n ReadTokens;\r\n end;\r\n\r\n if (AccessToken <> '') then\r\n begin\r\n TestTokens;\r\n end\r\n else\r\n begin\r\n DoAuth;\r\n end;\r\nend;\r\n\r\nfunction TRESTClient.Open: TJSPromise;\r\nbegin\r\n Result := TJSPromise.new(\r\n procedure(ASuccess, AFailed: TJSPromiseResolver)\r\n begin\r\n FOpenResolver := ASuccess;\r\n Connect;\r\n end\r\n )\r\nend;\r\n\r\nconstructor TRESTClient.Create(AOwner: TComponent);\r\nbegin\r\n inherited;\r\n FPersistTokens := TPersistTokens.Create;\r\n FApp := TRESTApp.Create;\r\n FScopes := TStringList.Create;\r\n FLocale := lcDefault;\r\n FResponseType := rtDefault;\r\n FLoginWidth := 800;\r\n FLoginHeight := 600;\r\n FHandleAccessTokenPtr := @HandleAccessToken;\r\nend;\r\n\r\nfunction IntToZStr(i,l: Integer): string;\r\nvar\r\n Res: string;\r\nbegin\r\n Res := IntToStr(i);\r\n while Length(Res) '' then\r\n req.setRequestHeader('Content-Type', ContentType);\r\n\r\n if FAccessToken <> '' then\r\n req.setRequestHeader('Authorization', 'Bearer ' + FAccessToken);\r\n\r\n if Assigned(headers) then\r\n begin\r\n for i := 0 to Length(headers) - 1 do\r\n req.setRequestHeader(headers[i].header, headers[i].value);\r\n end;\r\n\r\n if Data = '' then\r\n req.send(nil)\r\n else\r\n req.send(Data);\r\nend;\r\n\r\nfunction TRESTClient.HttpRequest(Command, URL: string; Data: string = ''; ContentType: string = ''; headers: TCoreCloudHeaders = nil): TJSPromise;\r\nbegin\r\n Result := TJSPromise.new(\r\n procedure(ASuccess, AFailed: TJSPromiseResolver)\r\n var\r\n i: integer;\r\n req: TJSXMLHttpRequest;\r\n FRequestResponse: THTTPRequestResponseEvent;\r\n FResponse: THttpResponse;\r\n FHttpResponse: TInternalHttpResponse;\r\n\r\n function ResponseHandler(Event: TEventListenerEvent): boolean;\r\n begin\r\n ASuccess(Event.target);\r\n end;\r\n\r\n function ErrorHandler(Event: TEventListenerEvent): boolean;\r\n begin\r\n AFailed(Event.target);\r\n end;\r\n\r\n begin\r\n req := TJSXMLHttpRequest.new;\r\n req.addEventListener('load', @ResponseHandler);\r\n req.addEventListener('error', @ErrorHandler);\r\n\r\n req.responseType := THTTPRequest.GetResponseType(FResponseType);\r\n\r\n req.open(Command, URL, true);\r\n\r\n if ContentType <> '' then\r\n req.setRequestHeader('Content-Type', ContentType);\r\n\r\n //console.log('request with access token', FAccessToken);\r\n\r\n if FAccessToken <> '' then\r\n req.setRequestHeader('Authorization', 'Bearer ' + FAccessToken);\r\n\r\n if Assigned(headers) then\r\n begin\r\n for i := 0 to Length(headers) - 1 do\r\n req.setRequestHeader(headers[i].header, headers[i].value);\r\n end;\r\n\r\n if Data = '' then\r\n req.send(nil)\r\n else\r\n req.send(Data);\r\n end);\r\nend;\r\n\r\nprocedure TRESTClient.HttpsCommand(Command, URL, Data, ContentType: string; headers: TCoreCloudHeaders);\r\nvar\r\n i: integer;\r\n req: TJSXMLHttpRequest;\r\n FRequestResponse: THTTPRequestResponseEvent;\r\n FResponse: THttpResponse;\r\n FHttpResponse: TInternalHttpResponse;\r\n\r\n function ResponseHandler(Event: TEventListenerEvent): boolean;\r\n var\r\n Response: string;\r\n Handled: boolean;\r\n LRequestRec: TJSXMLHttpRequestRecord;\r\n\r\n begin\r\n LRequestRec.req := TJSXMLHttpRequest(Event.target);\r\n\r\n asm\r\n Response = Event.target.responseText;\r\n end;\r\n\r\n Handled := false;\r\n\r\n if Assigned(FHttpResponse) then\r\n FHttpResponse(Self, Response, Handled);\r\n\r\n if Assigned(FRequestResponse) and not Handled then\r\n begin\r\n FRequestResponse(Self, LRequestRec, Response);\r\n end;\r\n\r\n if Assigned(FResponse) and not Handled then\r\n begin\r\n FResponse(Self, Response);\r\n end;\r\n\r\n Result := true;\r\n end;\r\n\r\n function ErrorHandler(Event: TEventListenerEvent): boolean;\r\n var\r\n Handled: boolean;\r\n LEventRec: TJSEventRecord;\r\n LRequestRec: TJSXMLHttpRequestRecord;\r\n begin\r\n Handled := false;\r\n if Assigned(FOnError) then\r\n begin\r\n LRequestRec.req := TJSXMLHttpRequest(Event.target);\r\n LEventRec.event := Event;\r\n FOnError(Self, LRequestRec, LEventRec, Handled);\r\n end;\r\n\r\n if not Handled then\r\n raise Exception.Create('HTTP request error @' + URL);\r\n\r\n Result := true;\r\n end;\r\n\r\nbegin\r\n FRequestResponse := OnRequestResponse;\r\n FResponse := OnResponse;\r\n FHttpResponse := OnHttpResponse;\r\n\r\n req := TJSXMLHttpRequest.new;\r\n //req.addEventListener('load', @HandleResponse);\r\n req.addEventListener('load', @ResponseHandler);\r\n req.addEventListener('error', @ErrorHandler);\r\n\r\n req.responseType := THTTPRequest.GetResponseType(FResponseType);\r\n\r\n req.open(Command, URL, true);\r\n\r\n if ContentType <> '' then\r\n req.setRequestHeader('Content-Type', ContentType);\r\n\r\n if FAccessToken <> '' then\r\n req.setRequestHeader('Authorization', 'Bearer ' + FAccessToken);\r\n\r\n if Assigned(headers) then\r\n begin\r\n for i := 0 to Length(headers) - 1 do\r\n req.setRequestHeader(headers[i].header, headers[i].value);\r\n end;\r\n\r\n if Data = '' then\r\n req.send(nil)\r\n else\r\n req.send(Data);\r\nend;\r\n\r\nprocedure TRESTClient.HttpsDelete(URL: string);\r\nbegin\r\n HttpsCommand('DELETE', URL, '','', nil);\r\nend;\r\n\r\nprocedure TRESTClient.HttpsDelete(URL: string; headers: TCoreCloudHeaders);\r\nbegin\r\n HttpsCommand('DELETE', URL,'','', headers);\r\nend;\r\n\r\nprocedure TRESTClient.HttpsGet(URL: string; headers: TCoreCloudHeaders);\r\nbegin\r\n HttpsCommand('GET', URL,'','', headers);\r\nend;\r\n\r\nprocedure TRESTClient.HttpsGet(URL: string);\r\nbegin\r\n HttpsCommand('GET', URL,'','', nil);\r\nend;\r\n\r\nprocedure TRESTClient.HttpsPost(URL, ContentType, Data: string);\r\nbegin\r\n HttpsCommand('POST',URL,Data,ContentType,nil);\r\nend;\r\n\r\nprocedure TRESTClient.HttpsPost(URL: string; headers: TCoreCloudHeaders;\r\n Data: string);\r\nbegin\r\n HttpsCommand('POST', URL, Data, '', headers);\r\nend;\r\n\r\nprocedure TRESTClient.HttpsPost(URL, ContentType, Data: string;\r\n headers: TCoreCloudHeaders);\r\nbegin\r\n HttpsCommand('POST', URL, Data, ContentType, headers);\r\nend;\r\n\r\nprocedure TRESTClient.HttpsPut(URL, ContentType, Data: string);\r\nbegin\r\n HttpsCommand('PUT', URL, Data, ContentType, nil);\r\nend;\r\n\r\nprocedure TRESTClient.HttpsUpdate(URL: string; headers: TCoreCloudHeaders;\r\n Data: string);\r\nbegin\r\n HttpsCommand('PUT', URL, Data, '', headers);\r\nend;\r\n\r\nprocedure TRESTClient.HttpsPost(URL, Data: string);\r\nbegin\r\n HttpsPost(URL, '', Data);\r\nend;\r\n\r\n{$HINTS OFF}\r\nclass function TRESTClient.InstallCallback: boolean;\r\nvar\r\n scriptsrc: string;\r\nbegin\r\n scriptsrc :=\r\n ' function processAuthData(access_token) {'\r\n +'var event = new CustomEvent(\"oauthcallback\", {'#13\r\n\t\t\t+' detail: {'#13\r\n\t\t\t+' message: access_token'#13\r\n\t\t\t+' },'#13\r\n\t\t\t+' bubbles: true,'#13\r\n\t\t\t+' cancelable: true});'#13\r\n +' document.dispatchEvent(event);'\r\n +'}';\r\n\r\n asm\r\n var script = document.createElement(\"script\");\r\n script.innerHTML = scriptsrc;\r\n document.head.appendChild(script);\r\n\r\n var scr = document.createElement('script');\r\n scr.async = true;\r\n scr.defer = true;\r\n scr.type = 'text/javascript';\r\n document.body.appendChild(scr);\r\n end;\r\n\r\n Result := true;\r\nend;\r\n\r\nclass function TRESTClient.GetUTCDateTime: TDateTime;\r\nvar\r\n s: string;\r\nbegin\r\n asm\r\n const nowt = new Date();\r\n s = nowt.toISOString();\r\n end;\r\n\r\n Result := IsoToDateTime(s);\r\nend;\r\n\r\n{$HINTS ON}\r\nclass function TRESTClient.IsoToDate(const s: string): TDate;\r\nvar\r\n da,mo,ye: Word;\r\n err: Integer;\r\nbegin\r\n Val(Copy(s,1,4),ye,err);\r\n Val(Copy(s,6,2),mo,err);\r\n Val(Copy(s,9,2),da,err);\r\n\r\n if ye < 1 then\r\n ye := 1;\r\n if mo < 1 then\r\n mo := 1;\r\n if da < 1 then\r\n da := 1;\r\n\r\n Result := EncodeDate(ye,mo,da) + EncodeTime(0,0,0,0);\r\nend;\r\n\r\nclass function TRESTClient.IsoToTime(const s: string): TTime;\r\nvar\r\n ho,mi,se,ms: Word;\r\n err: Integer;\r\nbegin\r\n ms := 0;\r\n\r\n Val(Copy(s,1,2),ho,err);\r\n Val(Copy(s,4,2),mi,err);\r\n Val(Copy(s,7,2),se,err);\r\n if Length(s) > 10 then\r\n Val(Copy(s,10,4),ms,err);\r\n\r\n if (ho < 0) or (ho > 23) then\r\n ho := 0;\r\n if (mi < 0) or (mi > 59) then\r\n mi := 0;\r\n if (se < 0) or (se > 59) then\r\n se := 0;\r\n if ms < 0 then\r\n ms := 0;\r\n\r\n Result := EncodeTime(ho,mi,se,ms);\r\nend;\r\n\r\n\r\nclass function TRESTClient.IsIsoDateTime(const s: string): boolean;\r\nvar\r\n da,mo,ye,ho,mi,se: Word;\r\n err: Integer;\r\nbegin\r\n Result := true;\r\n\r\n Val(Copy(s,1,4),ye,err);\r\n if err <> 0 then\r\n exit(False);\r\n if not (copy(s,5,1) = '-') then\r\n exit(False);\r\n\r\n Val(Copy(s,6,2),mo,err);\r\n if err <> 0 then\r\n exit(False);\r\n\r\n if not (copy(s,8,1) = '-') then\r\n exit(False);\r\n\r\n Val(Copy(s,9,2),da,err);\r\n if err <> 0 then\r\n exit(False);\r\n\r\n Val(Copy(s,12,2),ho,err);\r\n if err = 0 then\r\n begin\r\n if not (copy(s,14,1) = ':') then\r\n exit(False);\r\n\r\n Val(Copy(s,15,2),mi,err);\r\n if err <> 0 then\r\n exit(False);\r\n\r\n if not (copy(s,17,1) = ':') then\r\n exit(False);\r\n\r\n Val(Copy(s,18,2),se,err);\r\n if err <> 0 then\r\n exit(False);\r\n end;\r\nend;\r\n\r\n\r\nclass function TRESTClient.IsoToDateTime(const s: string;\r\n IsUTC: Boolean): TDateTime;\r\nvar\r\n da,mo,ye,ho,mi,se,ms: Word;\r\n HourOffset, MinuteOffset: Integer;\r\n err,delta: Integer;\r\n sign: string;\r\nbegin\r\n HourOffset := 0;\r\n MinuteOffset := 0;\r\n ms := 0;\r\n delta := 0;\r\n\r\n Val(Copy(s,1,4),ye,err);\r\n Val(Copy(s,6,2),mo,err);\r\n Val(Copy(s,9,2),da,err);\r\n Val(Copy(s,12,2),ho,err);\r\n Val(Copy(s,15,2),mi,err);\r\n Val(Copy(s,18,2),se,err);\r\n\r\n if (length(s) >= 20) and (s[20] = '.') then\r\n begin\r\n Val(Copy(s,21,3),ms,err);\r\n delta := 4;\r\n end;\r\n\r\n if ye < 1 then\r\n ye := 1;\r\n if mo < 1 then\r\n mo := 1;\r\n if da < 1 then\r\n da := 1;\r\n\r\n //Get TimeOffset from ISO string\r\n if Length(s) > 20 + delta then\r\n begin\r\n sign := Copy(s,20 + delta,1);\r\n Val(Copy(s,22 + delta,2), HourOffset, err);\r\n Val(Copy(s,25 + delta,2), MinuteOffset, err);\r\n\r\n if sign = '-' then\r\n begin\r\n HourOffset := HourOffset * -1;\r\n MinuteOffset := MinuteOffset * -1;\r\n end;\r\n end;\r\n\r\n Result := EncodeDate(ye,mo,da) + EncodeTime(ho,mi,se,ms);\r\n// Result := AdjustDateTime(Result, HourOffset, MinuteOffset, IsUTC);\r\nend;\r\n\r\nclass function TRESTClient.IsoToDateTime(const s: string): TDateTime;\r\nvar\r\n da,mo,ye,ho,mi,se,ms: Word;\r\n err: Integer;\r\nbegin\r\n ms := 0;\r\n\r\n Val(Copy(s,1,4),ye,err);\r\n Val(Copy(s,6,2),mo,err);\r\n Val(Copy(s,9,2),da,err);\r\n Val(Copy(s,12,2),ho,err);\r\n Val(Copy(s,15,2),mi,err);\r\n Val(Copy(s,18,2),se,err);\r\n\r\n if (length(s) >= 20) and (s[20] = '.') then\r\n begin\r\n Val(Copy(s,21,3),ms,err);\r\n end;\r\n\r\n\r\n if ye < 1 then\r\n ye := 1;\r\n if mo < 1 then\r\n mo := 1;\r\n if da < 1 then\r\n da := 1;\r\n\r\n Result := EncodeDate(ye,mo,da) + EncodeTime(ho,mi,se,ms);\r\nend;\r\n\r\nclass function TRESTClient.JSONEscape(s: string): string;\r\nbegin\r\n Result := encodeURIComponent(s);\r\nend;\r\n\r\nprocedure TRESTClient.ReadTokens;\r\nvar\r\n ls: TLocalStorage;\r\nbegin\r\n // retrieve the token from local storage\r\n if FPersistTokens.Enabled and (FPersistTokens.Key <> '') then\r\n begin\r\n ls := TLocalStorage.Create;\r\n FAccessToken := ls.Values[FPersistTokens.Key];\r\n FRefreshToken := ls.Values[FPersistTokens.Key+'refresh'];\r\n FAccessExpiry := IsoToDateTime(ls.Values[FPersistTokens.Key+'accessexpiry']);\r\n FRefreshExpiry := IsoToDateTime(ls.Values[FPersistTokens.Key+'refreshexpiry']);\r\n ls.Free;\r\n end;\r\n\r\nend;\r\n\r\nfunction TRESTClient.ScopeParamText(Delimiter: string; Encode: boolean): string;\r\nvar\r\n i: integer;\r\n scopestr: string;\r\nbegin\r\n Result := '';\r\n for i := 0 to Scopes.Count - 1 do\r\n begin\r\n if Encode then\r\n scopestr := encodeURIComponent(Scopes[i])\r\n else\r\n scopestr := Scopes[i];\r\n\r\n if Result = '' then\r\n Result := scopestr\r\n else\r\n Result := Result + Delimiter + scopestr;\r\n end;\r\nend;\r\n\r\nprocedure TRESTClient.SetApp(const Value: TRESTApp);\r\nbegin\r\n FApp.Assign(Value);\r\nend;\r\n\r\nprocedure TRESTClient.SetPersistTokens(const Value: TPersistTokens);\r\nbegin\r\n FPersistTokens.Assign(Value);\r\nend;\r\n\r\nprocedure TRESTClient.SetScopes(const Value: TStrings);\r\nbegin\r\n FScopes.Assign(Value);\r\nend;\r\n\r\nprocedure TRESTClient.TestTokens;\r\nbegin\r\n if Assigned(OnAccessToken) then\r\n OnAccessToken(Self);\r\nend;\r\n\r\nfunction TRESTClient.TMSUTF8Encode(s: string): string;\r\nbegin\r\n Result := s;\r\nend;\r\n\r\nclass function TRESTClient.URLEncode(URI: string): string;\r\nbegin\r\n Result := encodeURIComponent(URI);\r\nend;\r\n\r\nprocedure TRESTClient.WriteTokens;\r\nvar\r\n ls: TLocalStorage;\r\nbegin\r\n if FPersistTokens.Enabled and (FPersistTokens.Key <> '') then\r\n begin\r\n ls := TLocalStorage.Create;\r\n ls.Values[FPersistTokens.Key] := FAccessToken;\r\n ls.Values[FPersistTokens.Key+'refresh'] := FRefreshToken;\r\n ls.Values[FPersistTokens.Key+'accessexpiry'] := FAccessExpiry.ToIsoString(true);\r\n ls.Values[FPersistTokens.Key+'refreshexpiry'] := FRefreshExpiry.ToIsoString(true);\r\n ls.Free;\r\n end;\r\nend;\r\n\r\n{ TPersistTokens }\r\n\r\nprocedure TPersistTokens.Assign(Source: TPersistent);\r\nbegin\r\n if (Source is TPersistTokens) then\r\n begin\r\n FKey := (Source as TPersistTokens).Key;\r\n FEnabled := (Source as TPersistTokens).Enabled;\r\n end;\r\nend;\r\n\r\nconstructor TPersistTokens.Create;\r\nbegin\r\n FEnabled := false;\r\n FKey := '';\r\nend;\r\n\r\n{ TRESTApp }\r\n\r\nfunction TRESTApp.GetKey: string;\r\nbegin\r\n if (Key <> '') and (ClientID = '') then\r\n Result := Key\r\n else\r\n Result := ClientID;\r\nend;\r\n\r\nprocedure TRESTApp.Assign(Source: TPersistent);\r\nbegin\r\n if (Source is TRESTApp) then\r\n begin\r\n FKey := (Source as TRESTApp).Key;\r\n FClientID := (Source as TRESTApp).ClientID;\r\n FCallbackURL := (Source as TRESTApp).CallbackURL;\r\n FSecret := (Source as TRESTApp).Secret;\r\n FAuthURL := (Source as TRESTApp).AuthURL;\r\n end;\r\nend;\r\n\r\n\r\nbegin\r\n TRESTClient.InstallCallback;\r\n\r\nend.\r\n","{********************************************************************}\r\n{ }\r\n{ written by TMS Software }\r\n{ Copyright (c) 2019 - 2024 }\r\n{ Email : info@tmssoftware.com }\r\n{ Web : http://www.tmssoftware.com }\r\n{ }\r\n{ The source code is given as is. The author is not responsible }\r\n{ for any possible damage done due to the use of this code. }\r\n{ The complete source code remains property of the author and may }\r\n{ not be distributed, published, given or sold in any form as such. }\r\n{ No parts of the source code can be included in any other component }\r\n{ or application without written authorization of the author. }\r\n{********************************************************************}\r\n\r\nunit WEBLib.Utils;\r\n\r\ninterface\r\n\r\nuses\r\n Types, Web, SysUtils, Math, Classes, JS;\r\n\r\nconst\r\n DayMonday = 1;\r\n DayTuesday = 2;\r\n DayWednesday = 3;\r\n DayThursday = 4;\r\n DayFriday = 5;\r\n DaySaturday = 6;\r\n DaySunday = 7;\r\n\r\n MonthJanuary = 1;\r\n MonthFebruary = 2;\r\n MonthMarch = 3;\r\n MonthApril = 4;\r\n MonthMay = 5;\r\n MonthJune = 6;\r\n MonthJuly = 7;\r\n MonthAugust = 8;\r\n MonthSeptember = 9;\r\n MonthOctober = 10;\r\n MonthNovember = 11;\r\n MonthDecember = 12;\r\n\r\ntype\r\n TInterfaceList = class;\r\n\r\n TProc = Types.TProc;\r\n TProcBoolean = SysUtils.TProc;\r\n TProcInteger = SysUtils.TProc;\r\n TProcString = Types.TProcString;\r\n\r\n EConvertError = SysUtils.EConvertError;\r\n\r\n EEncodingError = class(Exception);\r\n\r\n EStreamError = Classes.EStreamError;\r\n EStringStreamError = class(EStreamError);\r\n EFilerError = Classes.EFilerError;\r\n EReadError = Classes.EReadError;\r\n EWriteError = Classes.EWriteError;\r\n\r\n TBytesHelper = record helper for TBytes\r\n strict private\r\n function get_Length: Integer;\r\n procedure set_Length(const AValue: Integer);\r\n public\r\n function Compare(const ARight: TBytes): Integer;\r\n function High: Integer;\r\n function Low: Integer;\r\n function SubBytes(const AStartIndex: Integer): TBytes; overload; inline;\r\n function SubBytes(const AStartIndex, ALength: Integer): TBytes; overload; inline;\r\n property Length: Integer read get_Length write set_Length;\r\n end;\r\n\r\n TWords = array of Word;\r\n TWordsHelper = record helper for TWords\r\n strict private\r\n function get_Length: Integer;\r\n procedure set_Length(const AValue: Integer);\r\n public\r\n class function FromBytes(const ABytes: TBytes): TWords; static;\r\n function High: Integer;\r\n function Low: Integer;\r\n function ToBytes: TBytes;\r\n property Length: Integer read get_Length write set_Length;\r\n end;\r\n\r\n TCharHelper = record helper for Char\r\n public const\r\n Length = 1;\r\n Size = 2;\r\n public\r\n function IsDigit: Boolean; deprecated;\r\n function ToOrd: Integer; deprecated;\r\n function ToUpper: Char; overload; deprecated;\r\n class function ToUpper(const AValue: Char): Char; overload; assembler; static; //deprecated;\r\n end;\r\n\r\n (*\r\n TIntegerHelper = record helper for Integer\r\n public\r\n function Equals(const AValue: Integer): Boolean; inline;\r\n function NotEquals(const AValue: Integer): Boolean; inline;\r\n class function Parse(const AValue: string): Integer; static;\r\n function ToString: string; overload;\r\n class function ToString(const AValue: Integer): string; overload; assembler; static;\r\n class function TryParse(const AString: string; out AValue: Integer): Boolean; static; inline;\r\n end;\r\n *)\r\n\r\n TLongIntHelper = record helper for LongInt\r\n public\r\n function Equals(const AValue: LongInt): Boolean; inline;\r\n function NotEquals(const AValue: LongInt): Boolean; inline;\r\n class function Parse(const AValue: string): Integer; static;\r\n function ToString: string; overload;\r\n class function ToString(const AValue: LongInt): string; overload; assembler; static;\r\n class function TryParse(const AString: string; out AValue: Integer): Boolean; static; inline;\r\n end;\r\n\r\n (*\r\n TWordHelper = record helper for Word\r\n public\r\n class function FromBytes(const ALow, AHigh: Byte): Word; static;\r\n procedure ToBytes(out ALow, AHigh: Byte);\r\n end;\r\n\r\n TStringHelper = record helper for string\r\n strict private\r\n function get_Chars(const AIndex: Integer): Char; inline;\r\n function get_Length: Integer; inline;\r\n function Pos(const ASubStr, AStr: string; const AOffset: Integer): Integer;\r\n function Reverse: string;\r\n procedure set_Chars(const AIndex: Integer; const AValue: Char); inline;\r\n procedure set_Length(const AValue: Integer); inline;\r\n public const\r\n Empty = '';\r\n public\r\n function CompareTo(const AValue: string): Integer; overload;\r\n class function CompareTo(const ALeft, ARight: string): Integer; overload; assembler; static;\r\n function Contains(const AValue: string): Boolean;\r\n function EndsWith(const AValue: string): Boolean; overload;\r\n function EndsWith(const AValue: string; IgnoreCase: Boolean): Boolean; overload;\r\n function Equals(const AValue: string): Boolean;\r\n function FirstChar: Char;\r\n function Format(const AArgs: array of const): string; overload;\r\n class function Format(const AValue: string; const AArgs: array of const): string; overload; static;\r\n function High: Integer; overload; inline;\r\n function IndexOf(const AValue: Char): Integer; overload; inline;\r\n function IndexOf(const AValue: string; const AStartIndex, ACount: Integer): Integer; overload;\r\n function IndexOf(const AValue: string): Integer; overload; inline;\r\n function Insert(const AStartIndex: Integer; const AValue: string): string;\r\n function IsEmpty: Boolean; inline;\r\n function IsNumber: Boolean;\r\n function LastIndexOf(const AValue: Char): Integer; overload; inline;\r\n class function Low: Integer; static; inline;\r\n function NotEquals(const AValue: string): Boolean;\r\n function NotIsEmpty: Boolean; inline;\r\n function PadLeft(const ATotalWidth: Integer): string; overload; inline;\r\n function PadLeft(ATotalWidth: Integer; const APaddingChar: Char): string; overload; inline;\r\n function Remove(const AStartIndex: Integer): string; overload; inline;\r\n function Remove(const AStartIndex, ACount: Integer): string; overload; inline;\r\n function Replace(const AOldValue: string; const ANewValue: string): string; overload;\r\n function Same(const AValue: string): Boolean; inline;\r\n class function StartsText(const ASubText, AText: string): Boolean; static;\r\n function StartsWith(const AValue: string): Boolean; overload; inline;\r\n function StartsWith(const AValue: string; AIgnoreCase: Boolean): Boolean; overload;\r\n function Substring(const AStartIndex: Integer): string; overload; inline;\r\n function Substring(const AStartIndex, ALength: Integer): string; overload; inline;\r\n function ToLower: string;\r\n function ToUpper: string;\r\n function Trim: string;\r\n property Chars[const AIndex: Integer]: Char read get_Chars write set_Chars;\r\n property Length: Integer read get_Length write set_Length;\r\n end;\r\n *)\r\n\r\n TDateTimeHelper = record helper for TDateTime\r\n public\r\n function Equals(const AValue: TDateTime): Boolean; inline;\r\n function NotEquals(const AValue: TDateTime): Boolean; inline;\r\n function ToString: string; inline;\r\n function ToIsoString(AAddDelimiters: Boolean = False; AAddMilliSeconds: Boolean = False): string;\r\n end;\r\n\r\n TMonthNameArray = SysUtils.TMonthNameArray;\r\n TMonthNames = SysUtils.TMonthNames;\r\n TDayNames = SysUtils.TDayNames;\r\n\r\n TFormatSettings = SysUtils.TFormatSettings;\r\n\r\n TTMSEncoding = SysUtils.TEncoding;\r\n\r\n TStreamHelper = class helper for TStream\r\n public\r\n function CopyFrom(const ASource: TStream; ACount: Int64): Int64;\r\n end;\r\n\r\n TTMSStringStream = class(TBytesStream)\r\n private\r\n FEncoding: TEncoding;\r\n FFileName: string;\r\n FOwnsEncoding: Boolean;\r\n FError: TProcString;\r\n FLoaded: TProc;\r\n FRequest: TJSXMLHTTPRequest;\r\n function GetDataString: string;\r\n function InternalLoadFromFileP(const AFileName: string): TJSPromise;\r\n function OnAbort(AEvent: TEventListenerEvent): Boolean;\r\n function OnError(AEvent: TEventListenerEvent): Boolean;\r\n function OnLoad(AEvent: TEventListenerEvent): Boolean;\r\n public\r\n constructor Create; overload;\r\n constructor Create(const AString: string); overload;\r\n constructor Create(const AString: string; AEncoding: TEncoding; AOwnsEncoding: Boolean = True); overload;\r\n destructor Destroy; override;\r\n procedure LoadFromFile(const AFileName: string); overload;\r\n procedure LoadFromFile(const AFileName: string; const ALoaded: TProc); overload;\r\n procedure LoadFromFile(const AFileName: string; const ALoaded: TProc; const AError: TProcString); overload; reintroduce;\r\n function LoadFromFileP(const AFileName: string): Boolean; async;\r\n function ReadString(ACount: Integer): string;\r\n procedure WriteString(const AString: string);\r\n property DataString: string read GetDataString;\r\n end;\r\n\r\n IInterfaceList = interface\r\n ['{285DEA8A-B865-11D1-AAA7-00C04FB17A72}']\r\n function Add(const AItem: IInterface): Integer;\r\n procedure Clear;\r\n procedure Delete(const AIndex: Integer);\r\n procedure Exchange(const AIndex1, AIndex2: Integer);\r\n function Expand: TInterfaceList;\r\n function First: IInterface;\r\n function get_Capacity: Integer;\r\n function get_Count: Integer;\r\n function get_Items(const AIndex: Integer): IInterface;\r\n function IndexOf(const AItem: IInterface): Integer;\r\n function IndexOfItem(const AItem: IInterface; const ADirection: TDirection): Integer;\r\n procedure Insert(const AIndex: Integer; const AItem: IInterface);\r\n function Last: IInterface;\r\n procedure Lock;\r\n function Remove(const AItem: IInterface): Integer;\r\n function RemoveItem(const AItem: IInterface; const ADirection: TDirection): Integer;\r\n procedure set_Capacity(const AValue: Integer);\r\n procedure set_Count(const AValue: Integer);\r\n procedure set_Items(const AIndex: Integer; const AItem: IInterface);\r\n procedure Unlock;\r\n property Count: Integer read get_Count write set_Count;\r\n property Items[const AIndex: Integer]: IInterface read get_Items write set_Items; default;\r\n end;\r\n\r\n TInterfaceListEnumerator = class(TObject)\r\n strict private\r\n FIndex: Integer;\r\n FInterfaceList: TInterfaceList;\r\n function get_Current: IInterface; inline;\r\n public\r\n constructor Create(const AInterfaceList: TInterfaceList);\r\n function MoveNext: Boolean;\r\n property Current: IInterface read get_Current;\r\n end;\r\n\r\n IInterfaceListEx = interface(IInterfaceList)\r\n ['{FDB39D70-65B9-4995-9436-6084ACA05DB3}']\r\n function GetEnumerator: TInterfaceListEnumerator;\r\n end;\r\n\r\n TCompareItems = reference to function(const ALeft, ARight: IInterface): TValueRelationship;\r\n\r\n IInterfaceListEx2 = interface(IInterfaceList)\r\n ['{4FE71218-0F8F-4027-B050-5E84E2202604}']\r\n procedure Sort(const ACompare: TCompareItems);\r\n end;\r\n\r\n TInterfaceList = class(TInterfacedObject, IInterfaceList, IInterfaceListEx, IInterfaceListEx2)\r\n strict private\r\n FList: TFPList;\r\n strict protected\r\n function Add(const AItem: IInterface): Integer;\r\n procedure Clear;\r\n procedure Delete(const AIndex: Integer);\r\n procedure Exchange(const AIndex1, AIndex2: Integer);\r\n function Expand: TInterfaceList;\r\n function First: IInterface;\r\n function GetEnumerator: TInterfaceListEnumerator;\r\n function get_Capacity: Integer;\r\n function get_Count: Integer;\r\n function get_Items(const AIndex: Integer): IInterface;\r\n function IndexOf(const AItem: IInterface): Integer;\r\n function IndexOfItem(const AItem: IInterface; const ADirection: TDirection): Integer;\r\n procedure Insert(const AIndex: Integer; const AItem: IInterface);\r\n function Last: IInterface;\r\n procedure Lock;\r\n function Remove(const AItem: IInterface): Integer;\r\n function RemoveItem(const AItem: IInterface; const ADirection: TDirection): Integer;\r\n procedure set_Capacity(const AValue: Integer);\r\n procedure set_Count(const AValue: Integer);\r\n procedure set_Items(const AIndex: Integer; const AItem: IInterface);\r\n procedure Sort(const ACompare: TCompareItems);\r\n procedure Unlock;\r\n property Capacity: Integer read get_Capacity write set_Capacity;\r\n property Items[const AIndex: Integer]: IInterface read get_Items write set_Items; default;\r\n protected\r\n property Count: Integer read get_Count write set_Count;\r\n public\r\n constructor Create;\r\n destructor Destroy; override;\r\n end;\r\n\r\n TStringBuilder = class(TObject)\r\n strict private\r\n FData: string;\r\n function get_Length: Integer;\r\n procedure set_Length(const AValue: Integer);\r\n public\r\n constructor Create(const AValue: string); overload;\r\n function Append(const AValue: Integer): TStringBuilder; overload;\r\n function Append(const AValue: string): TStringBuilder; overload;\r\n function Insert(const AIndex: Integer; const AValue: Integer): TStringBuilder; overload;\r\n function Insert(const AIndex: Integer; const AValue: string): TStringBuilder; overload;\r\n function ToString: string; overload; override;\r\n property Length: Integer read get_Length write set_Length;\r\n end;\r\n\r\n TSysInfo = record\r\n screenSize: string;\r\n browser: string;\r\n browserversion: string;\r\n browsermajorVersion: string;\r\n mobile: boolean;\r\n os: string;\r\n osVersion: string;\r\n cookieEnabled: boolean;\r\n flashVersion: string;\r\n end;\r\n\r\n TJsonToObjectHelper = class helper for TObject\r\n public\r\n procedure FromJSON(JSONValue: JSValue); overload;\r\n procedure FromJSON(JSONValue: string); overload;\r\n function ToJSON: JSValue;\r\n end;\r\n\r\n\r\nprocedure UseVariable(const AValue: IInterface); overload;\r\nprocedure UseVariable(const AValue: Integer); overload;\r\nprocedure UseVariable(const AValue: string); overload;\r\n\r\nfunction ArrayBufferToBase64(Buffer: TJSArrayBuffer): string;\r\nfunction Base64ToArrayBuffer(Base64: string): TJSArrayBuffer;\r\nfunction StringToBase64(AValue: string): string;\r\nfunction Base64ToString(AValue: string): string;\r\n\r\nfunction SizeOf(const AValue: Double): Integer; overload;\r\nfunction SizeOf(const AValue: Integer): Integer; overload;\r\n\r\nprocedure InsertAfter(newNode, referenceNode: TJSElement);\r\n\r\nfunction MatchStrEx(AValue1, AValue2: string; ACaseSensitive: Boolean = true): Boolean;\r\nfunction MatchStr(AValue1, AValue2:string; ACaseSensitive:Boolean = true):Boolean;\r\n\r\nprocedure SelectElementContents(AElement: TJSElement);\r\n\r\nfunction FormatProp(const AFmt: string; const AArgs: array of const): string;\r\n\r\nfunction StringIsFloat(N: string): boolean;\r\nfunction StringIsInteger(N: string): boolean;\r\n\r\nfunction MD5Hash(N: string): string;\r\n\r\nfunction GetSysInfo: TSysInfo;\r\n\r\nimplementation\r\n\r\nuses\r\n RTLConsts, WEBLib.Consts, RTTI, WEBLib.REST;\r\n\r\nvar\r\n FCompare: TCompareItems;\r\n\r\nprocedure UseVariable(const AValue: IInterface);\r\nbegin\r\nend;\r\n\r\nprocedure UseVariable(const AValue: Integer);\r\nbegin\r\nend;\r\n\r\nprocedure UseVariable(const AValue: string);\r\nbegin\r\nend;\r\n\r\n{ TBytesHelper }\r\n\r\nfunction TBytesHelper.Compare(const ARight: TBytes): Integer;\r\nvar\r\n lCount: Integer;\r\nbegin\r\n if Length > ARight.Length then\r\n Exit(GreaterThanValue);\r\n\r\n if Length < ARight.Length then\r\n Exit(LessThanValue);\r\n\r\n Result := EqualsValue;\r\n for lCount := Low to High do\r\n begin\r\n if Self[lCount] > ARight[lCount] then\r\n Exit(GreaterThanValue);\r\n if Self[lCount] < ARight[lCount] then\r\n Exit(LessThanValue);\r\n end;\r\nend;\r\n\r\nfunction TBytesHelper.get_Length: Integer;\r\nbegin\r\n Result := System.Length(Self);\r\nend;\r\n\r\nfunction TBytesHelper.High: Integer;\r\nbegin\r\n Result := System.High(Self);\r\nend;\r\n\r\nfunction TBytesHelper.Low: Integer;\r\nbegin\r\n Result := System.Low(Self);\r\nend;\r\n\r\nprocedure TBytesHelper.set_Length(const AValue: Integer);\r\nbegin\r\n System.SetLength(Self, AValue);\r\nend;\r\n\r\nfunction TBytesHelper.SubBytes(const AStartIndex: Integer): TBytes;\r\nbegin\r\n Result := System.Copy(Self, AStartIndex, Length);\r\nend;\r\n\r\nfunction TBytesHelper.SubBytes(const AStartIndex, ALength: Integer): TBytes;\r\nbegin\r\n Result := System.Copy(Self, AStartIndex, ALength);\r\nend;\r\n\r\n{ TWordsHelper }\r\n\r\nclass function TWordsHelper.FromBytes(const ABytes: TBytes): TWords;\r\nconst\r\n cBytesPerWord = 2;\r\nvar\r\n lCount: Integer;\r\n lLow: Byte;\r\n lHigh: Byte;\r\nbegin\r\n lCount := ABytes.Length;\r\n if Odd(lCount) then\r\n Inc(lCount);\r\n Result.Length := lCount div cBytesPerWord;\r\n\r\n lCount := ABytes.Low;\r\n while lCount <= ABytes.High do\r\n begin\r\n lLow := ABytes[lCount];\r\n if lCount + 1 <= ABytes.High then\r\n lHigh := ABytes[lCount + 1]\r\n else\r\n lHigh := 0;\r\n\r\n Result[lCount div cBytesPerWord] := Word.FromBytes(lLow, lHigh);\r\n Inc(lCount, cBytesPerWord);\r\n end;\r\n\r\nend;\r\n\r\nfunction TWordsHelper.get_Length: Integer;\r\nbegin\r\n Result := System.Length(Self);\r\nend;\r\n\r\nfunction TWordsHelper.High: Integer;\r\nbegin\r\n Result := System.High(Self);\r\nend;\r\n\r\nfunction TWordsHelper.Low: Integer;\r\nbegin\r\n Result := System.Low(Self);\r\nend;\r\n\r\nprocedure TWordsHelper.set_Length(const AValue: Integer);\r\nbegin\r\n System.SetLength(Self, AValue);\r\nend;\r\n\r\nfunction TWordsHelper.ToBytes: TBytes;\r\nconst\r\n cBytesPerWord = 2;\r\nvar\r\n lLow: Byte;\r\n lHigh: Byte;\r\n lCount: Integer;\r\n lNewIndex: Integer;\r\nbegin\r\n Result.Length := Length * cBytesPerWord;\r\n for lCount := Low to High do\r\n begin\r\n Self[lCount].ToBytes(lLow, lHigh);\r\n lNewIndex := lCount * cBytesPerWord;\r\n Result[lNewIndex] := lLow;\r\n Result[lNewIndex + 1] := lHigh;\r\n end;\r\nend;\r\n\r\n{ TCharHelper }\r\n\r\nfunction TCharHelper.IsDigit: Boolean;\r\nconst\r\n cNumChars = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9'];\r\nbegin\r\n Result := Self in cNumChars;\r\nend;\r\n\r\nfunction TCharHelper.ToOrd: Integer;\r\nbegin\r\n Result := Ord(Self);\r\nend;\r\n\r\nfunction TCharHelper.ToUpper: Char;\r\nbegin\r\n Result := ToUpper(Self);\r\nend;\r\n\r\nclass function TCharHelper.ToUpper(const AValue: Char): Char; assembler;\r\nasm\r\n return AValue.toUpperCase();\r\nend;\r\n\r\n{ TIntegerHelper }\r\n\r\n(*\r\n\r\nfunction TIntegerHelper.Equals(const AValue: Integer): Boolean;\r\nbegin\r\n Result := Self = AValue;\r\nend;\r\n\r\nfunction TIntegerHelper.NotEquals(const AValue: Integer): Boolean;\r\nbegin\r\n Result := not Equals(AValue);\r\nend;\r\n\r\nclass function TIntegerHelper.Parse(const AValue: string): Integer;\r\nbegin\r\n Result := StrToInt(AValue);\r\nend;\r\n\r\nfunction TIntegerHelper.ToString: string;\r\nbegin\r\n Result := ToString(Self);\r\nend;\r\n\r\nclass function TIntegerHelper.ToString(const AValue: Integer): string; assembler;\r\nasm\r\n return AValue.toString();\r\nend;\r\n\r\nclass function TIntegerHelper.TryParse(const AString: string; out AValue: Integer): Boolean;\r\nbegin\r\n Result := TryStrToInt(AString, AValue);\r\nend;\r\n\r\n*)\r\n\r\n{ TLongIntHelper }\r\n\r\nfunction TLongIntHelper.Equals(const AValue: LongInt): Boolean;\r\nbegin\r\n Result := Self = AValue;\r\nend;\r\n\r\nfunction TLongIntHelper.NotEquals(const AValue: LongInt): Boolean;\r\nbegin\r\n Result := not Equals(AValue);\r\nend;\r\n\r\nclass function TLongIntHelper.Parse(const AValue: string): Integer;\r\nbegin\r\n Result := StrToInt(AValue);\r\nend;\r\n\r\nfunction TLongIntHelper.ToString: string;\r\nbegin\r\n Result := ToString(Self);\r\nend;\r\n\r\nclass function TLongIntHelper.ToString(const AValue: LongInt): string;\r\nasm\r\n return AValue.toString();\r\nend;\r\n\r\nclass function TLongIntHelper.TryParse(const AString: string; out AValue: Integer): Boolean;\r\nbegin\r\n Result := TryStrToInt(AString, AValue);\r\nend;\r\n\r\n{ TWordHelper }\r\n\r\n(*\r\n\r\nclass function TWordHelper.FromBytes(const ALow, AHigh: Byte): Word;\r\nconst\r\n cBitPerByte = 8;\r\nbegin\r\n Result := ALow + (AHigh shl cBitPerByte);\r\nend;\r\n\r\nprocedure TWordHelper.ToBytes(out ALow, AHigh: Byte);\r\nconst\r\n cMask: Byte = $FF;\r\n cBitPerByte = 8;\r\nbegin\r\n ALow := Self and cMask;\r\n AHigh := (Self and (cMask shl cBitPerByte)) shr cBitPerByte;\r\nend;\r\n\r\n*)\r\n\r\n{ TStringHelper }\r\n\r\n(*\r\n\r\nfunction TStringHelper.CompareTo(const AValue: string): Integer;\r\nbegin\r\n Result := CompareTo(Self, AValue);\r\nend;\r\n\r\nclass function TStringHelper.CompareTo(const ALeft, ARight: string): Integer; assembler;\r\nasm\r\n return ALeft.localeCompare(ARight);\r\nend;\r\n\r\nfunction TStringHelper.Contains(const AValue: string): Boolean;\r\nbegin\r\n Result := IndexOf(AValue) >= 0;\r\nend;\r\n\r\nfunction TStringHelper.EndsWith(const AValue: string): Boolean;\r\nbegin\r\n Result := EndsWith(AValue,False);\r\nend;\r\n\r\nfunction TStringHelper.EndsWith(const AValue: string; IgnoreCase: Boolean): Boolean;\r\nvar\r\n L: SizeInt;\r\n S: String;\r\n\r\nbegin\r\n L := System.Length(AVAlue);\r\n Result := L = 0;\r\n if not Result then\r\n begin\r\n S := System.Copy(Self, Length - L + 1,L);\r\n Result := System.Length(S) = L;\r\n if Result then\r\n if IgnoreCase then\r\n Result := CompareText(S,AValue) = 0\r\n else\r\n Result := S = AValue;\r\n end;\r\nend;\r\n\r\n\r\nfunction TStringHelper.Equals(const AValue: string): Boolean;\r\nbegin\r\n Result := Self = AValue;\r\nend;\r\n\r\nfunction TStringHelper.FirstChar: Char;\r\nbegin\r\n if NotIsEmpty then\r\n Result := Chars[0]\r\n else\r\n Result := #0;\r\nend;\r\n\r\nfunction TStringHelper.Format(const AArgs: array of const): string;\r\nbegin\r\n Result := SysUtils.Format(Self, AArgs);\r\nend;\r\n\r\nclass function TStringHelper.Format(const AValue: string; const AArgs: array of const): string;\r\nbegin\r\n Result := SysUtils.Format(AValue, AArgs);\r\nend;\r\n\r\nfunction TStringHelper.get_Chars(const AIndex: Integer): Char;\r\nbegin\r\n Result := Self[AIndex + 1];\r\nend;\r\n\r\nfunction TStringHelper.get_Length: Integer;\r\nbegin\r\n Result := System.Length(Self);\r\nend;\r\n\r\nfunction TStringHelper.High: Integer;\r\nbegin\r\n Result := Length - 1;\r\nend;\r\n\r\nfunction TStringHelper.IndexOf(const AValue: Char): Integer;\r\nbegin\r\n Result := Pos(AValue, Self, 1) - 1;\r\nend;\r\n\r\nfunction TStringHelper.IndexOf(const AValue: string; const AStartIndex, ACount: Integer): Integer;\r\nbegin\r\n Result := Pos(AValue, Self, AStartIndex + 1) - 1;\r\n if (Result + AValue.Length) > (AStartIndex + ACount) then\r\n Result := -1;\r\nend;\r\n\r\nfunction TStringHelper.IndexOf(const AValue: string): Integer;\r\nbegin\r\n Result := System.Pos(AValue, Self) - 1;\r\nend;\r\n\r\nfunction TStringHelper.Insert(const AStartIndex: Integer; const AValue: string): string;\r\nbegin\r\n System.Insert(AValue, Self, AStartIndex + 1);\r\n Result := Self;\r\nend;\r\n\r\nfunction TStringHelper.IsEmpty: Boolean;\r\nbegin\r\n Result := Self = Empty;\r\nend;\r\n\r\nfunction TStringHelper.IsNumber: Boolean;\r\nconst\r\n cNumbers = ['0'..'9'];\r\nvar\r\n lCount: Integer;\r\nbegin\r\n if IsEmpty then\r\n Exit(False);\r\n\r\n for lCount := 0 to Length - 1 do\r\n begin\r\n if not (Chars[lCount] in cNumbers) then\r\n Exit(False);\r\n end;\r\n Result := True;\r\nend;\r\n\r\nfunction TStringHelper.LastIndexOf(const AValue: Char): Integer;\r\nbegin\r\n Result := Reverse.IndexOf(AValue);\r\n if Result >= 0 then\r\n Result := Length - Result - 1;\r\nend;\r\n\r\nclass function TStringHelper.Low: Integer;\r\nbegin\r\n Result := 0;\r\nend;\r\n\r\nfunction TStringHelper.NotEquals(const AValue: string): Boolean;\r\nbegin\r\n Result := not Equals(AValue);\r\nend;\r\n\r\nfunction TStringHelper.NotIsEmpty: Boolean;\r\nbegin\r\n Result := Self <> Empty;\r\nend;\r\n\r\nfunction TStringHelper.PadLeft(const ATotalWidth: Integer): string;\r\nconst\r\n cDefPadChar = ' ';\r\nbegin\r\n Result := PadLeft(ATotalWidth, cDefPadChar);\r\nend;\r\n\r\nfunction TStringHelper.PadLeft(ATotalWidth: Integer; const APaddingChar: Char): string;\r\nbegin\r\n ATotalWidth := ATotalWidth - Length;\r\n if ATotalWidth > 0 then\r\n Result := System.StringOfChar(APaddingChar, ATotalWidth) + Self\r\n else\r\n Result := Self;\r\nend;\r\n\r\nfunction TStringHelper.Pos(const ASubStr, AStr: string; const AOffset: Integer): Integer;\r\nasm\r\n return AStr.indexOf(ASubStr, AOffset - 1) + 1;\r\nend;\r\n\r\nfunction TStringHelper.Remove(const AStartIndex: Integer): string;\r\nbegin\r\n Result := Remove(AStartIndex, 1);\r\nend;\r\n\r\nfunction TStringHelper.Remove(const AStartIndex, ACount: Integer): string;\r\nbegin\r\n Result := SubString(0, AStartIndex - 1) + SubString(AStartIndex + ACount);\r\nend;\r\n\r\nfunction TStringHelper.Replace(const AOldValue, ANewValue: string): string;\r\nbegin\r\n Result := SysUtils.StringReplace(Self, AOldValue, ANewValue, [rfReplaceAll]);\r\nend;\r\n\r\nfunction TStringHelper.Reverse: string;\r\nvar\r\n lCount: Integer;\r\nbegin\r\n Result := Empty;\r\n Result.Length := Length;\r\n for lCount := 0 to Length - 1 do\r\n Result.Chars[Length - lCount - 1] := Self.Chars[lCount];\r\nend;\r\n\r\nfunction TStringHelper.Same(const AValue: string): Boolean;\r\nbegin\r\n Result := SysUtils.SameText(Self, AValue);\r\nend;\r\n\r\nprocedure TStringHelper.set_Chars(const AIndex: Integer; const AValue: Char);\r\nbegin\r\n Self[AIndex + 1] := AValue;\r\nend;\r\n\r\nprocedure TStringHelper.set_Length(const AValue: Integer);\r\nbegin\r\n System.SetLength(Self, AValue);\r\nend;\r\n\r\nclass function TStringHelper.StartsText(const ASubText, AText: string): Boolean;\r\nbegin\r\n if ASubText.IsEmpty then\r\n Result := True\r\n else\r\n begin\r\n if AText.Length >= ASubText.Length then\r\n Result := SysUtils.SameText(AText.Substring(0, ASubText.Length), ASubText)\r\n else\r\n Result := False;\r\n end;\r\nend;\r\n\r\nfunction TStringHelper.StartsWith(const AValue: string): Boolean;\r\nbegin\r\n Result := StartsWith(AValue, False);\r\nend;\r\n\r\nfunction TStringHelper.StartsWith(const AValue: string; AIgnoreCase: Boolean): Boolean;\r\nbegin\r\n if AIgnoreCase then\r\n Result := StartsText(AValue, Self)\r\n else\r\n if AValue = Empty then\r\n Result := True\r\n else\r\n begin\r\n if (Self.Length >= AValue.Length) then\r\n Result := Substring(0, AValue.Length).Equals(AValue)\r\n else\r\n Result := False;\r\n end;\r\nend;\r\n\r\nfunction TStringHelper.Substring(const AStartIndex: Integer): string;\r\nbegin\r\n Result := System.Copy(Self, AStartIndex + 1, Self.Length);\r\nend;\r\n\r\nfunction TStringHelper.Substring(const AStartIndex, ALength: Integer): string;\r\nbegin\r\n Result := System.Copy(Self, AStartIndex + 1, ALength);\r\nend;\r\n\r\nfunction TStringHelper.ToLower: string;\r\nvar\r\n lValue: string;\r\nbegin\r\n lValue := Self;\r\n asm\r\n lValue = lValue.toLowerCase();\r\n end;\r\n Result := lValue;\r\nend;\r\n\r\nfunction TStringHelper.ToUpper: string;\r\nvar\r\n lValue: string;\r\nbegin\r\n lValue := Self;\r\n asm\r\n lValue = lValue.toUpperCase();\r\n end;\r\n Result := lValue;\r\nend;\r\n\r\nfunction TStringHelper.Trim: string;\r\nbegin\r\n Result := SysUtils.Trim(Self);\r\nend;\r\n\r\n*)\r\n\r\n{ TDateTimeHelper }\r\n\r\nfunction TDateTimeHelper.Equals(const AValue: TDateTime): Boolean;\r\nbegin\r\n Result := SameValue(Self, AValue);\r\nend;\r\n\r\nfunction TDateTimeHelper.NotEquals(const AValue: TDateTime): Boolean;\r\nbegin\r\n Result := not SameValue(Self, AValue);\r\nend;\r\n\r\nfunction TDateTimeHelper.ToString: string;\r\nbegin\r\n Result := SysUtils.DateTimeToStr(Self, FormatSettings);\r\nend;\r\n\r\nfunction TDateTimeHelper.ToISOString(AAddDelimiters: Boolean = False; AAddMilliSeconds: Boolean = False): string;\r\nvar\r\n da, mo, ye, ho, mi, se, ms: Word;\r\n dd, td, msec: string;\r\n\r\n function IntToZStr(i, l: Integer): string;\r\n var\r\n Res: string;\r\n begin\r\n Res := IntToStr(i);\r\n while Length(Res) < l do\r\n Res := '0' + Res;\r\n\r\n Result := Res;\r\n end;\r\nbegin\r\n if AAddDelimiters then\r\n begin\r\n dd := '-';\r\n td := ':';\r\n end;\r\n\r\n DecodeDate(Self, ye, mo, da);\r\n DecodeTime(Self, ho, mi, se, ms);\r\n\r\n if AAddMilliSeconds then\r\n msec := '.' + IntToZStr(ms, 3) + 'Z';\r\n\r\n Result := IntToZStr(ye,4) + dd + IntToZStr(mo,2) + dd + IntToZStr(da,2) + 'T' +\r\n IntToZStr(ho,2) + td + IntToZStr(mi,2) + td + IntToZStr(se,2) + msec;\r\nend;\r\n\r\n{ TStreamHelper }\r\n\r\nfunction TStreamHelper.CopyFrom(const ASource: TStream; ACount: Int64): Int64;\r\nconst\r\n MaxBufSize = $F000;\r\nvar\r\n lBufSize: Integer;\r\n lCount: Integer;\r\n lBuffer: TBytes;\r\nbegin\r\n if ACount <= 0 then\r\n begin\r\n ASource.Position := 0;\r\n ACount := ASource.Size;\r\n end;\r\n Result := ACount;\r\n if ACount > MaxBufSize then\r\n lBufSize := MaxBufSize\r\n else\r\n lBufSize := ACount;\r\n lBuffer.Length := lBufSize;\r\n try\r\n while ACount <> 0 do\r\n begin\r\n if ACount > lBufSize then\r\n lCount := lBufSize\r\n else\r\n lCount := ACount;\r\n ASource.ReadBuffer(lBuffer, lCount);\r\n WriteBuffer(lBuffer, lCount);\r\n Dec(ACount, lCount);\r\n end;\r\n finally\r\n lBuffer.Length := 0;\r\n end;\r\nend;\r\n\r\n{ TTMSStringStream }\r\n\r\nconstructor TTMSStringStream.Create;\r\nbegin\r\n Create(string.Empty, TEncoding.Default, False);\r\nend;\r\n\r\nconstructor TTMSStringStream.Create(const AString: string);\r\nbegin\r\n Create(AString, TEncoding.Default, False);\r\nend;\r\n\r\nconstructor TTMSStringStream.Create(const AString: string; AEncoding: TEncoding; AOwnsEncoding: Boolean);\r\nvar\r\n lBytes: TBytes;\r\nbegin\r\n inherited Create;\r\n FEncoding := AEncoding;\r\n FOwnsEncoding := AOwnsEncoding and not TEncoding.IsStandardEncoding(AEncoding);\r\n lBytes := FEncoding.GetBytes(AString);\r\n SetPointer(BytesToMemory(lBytes), lBytes.Length);\r\nend;\r\n\r\ndestructor TTMSStringStream.Destroy;\r\nbegin\r\n if FOwnsEncoding then\r\n FEncoding.Free;\r\n inherited Destroy;\r\nend;\r\n\r\nfunction TTMSStringStream.GetDataString: string;\r\nbegin\r\n Result := FEncoding.GetString(Copy(Bytes, 0, Size));\r\nend;\r\n\r\nprocedure TTMSStringStream.LoadFromFile(const AFileName: string);\r\nconst\r\n cStatusOK = 200;\r\nvar\r\n lStatus: Integer;\r\n lResponse: string;\r\nbegin\r\n lResponse := string.Empty;\r\n lStatus := cStatusOK;\r\n asm\r\n var lRequest = new XMLHttpRequest();\r\n lRequest.open(\"GET\", AFileName, false);\r\n lRequest.send();\r\n\r\n if (lRequest.status == cStatusOK)\r\n lResponse = lRequest.responseText\r\n else\r\n lStatus = lRequest.status;\r\n end;\r\n\r\n if lStatus <> cStatusOK then\r\n raise EStringStreamError.CreateFmt(SCannotGetFile, [AFileName, lStatus]);\r\n WriteString(lResponse);\r\nend;\r\n\r\nprocedure TTMSStringStream.LoadFromFile(const AFileName: string; const ALoaded: TProc);\r\nbegin\r\n LoadFromFile(AFileName, ALoaded, nil);\r\nend;\r\n\r\nprocedure TTMSStringStream.LoadFromFile(const AFileName: string; const ALoaded: TProc; const AError: TProcString);\r\nconst\r\n cAbortMethod = 'abort';\r\n cErrorMethod = 'error';\r\n cGetMethod = 'GET';\r\n cLoadMethod = 'load';\r\nbegin\r\n FLoaded := ALoaded;\r\n FError := AError;\r\n FFileName := AFileName;\r\n FRequest := TJSXMLHttpRequest.New;\r\n FRequest.AddEventListener(cAbortMethod, @OnAbort);\r\n FRequest.AddEventListener(cErrorMethod, @OnError);\r\n FRequest.AddEventListener(cLoadMethod, @OnLoad);\r\n try\r\n FRequest.Open(cGetMethod, AFileName, True);\r\n FRequest.Send;\r\n except\r\n on E: Exception do\r\n begin\r\n if Assigned(AError) then\r\n AError(E.Message)\r\n else\r\n raise;\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TTMSStringStream.InternalLoadFromFileP(const AFileName: string): TJSPromise;\r\nbegin\r\n Result := TJSPromise.New(\r\n procedure(AResolve, AReject : TJSPromiseResolver)\r\n begin\r\n LoadFromFile(AFileName,\r\n procedure()\r\n begin\r\n AResolve(True);\r\n end,\r\n procedure(const AError: string)\r\n begin\r\n AReject(AError);\r\n end);\r\n end);\r\nend;\r\n\r\nfunction TTMSStringStream.LoadFromFileP(const AFileName: string): Boolean; async;\r\nbegin\r\n Result := await(Boolean, InternalLoadFromFileP(AFileName));\r\nend;\r\n\r\nfunction TTMSStringStream.OnAbort(AEvent: TEventListenerEvent): Boolean;\r\nbegin\r\n Result := True;\r\n if Assigned(FError) then\r\n FError(Format(SLoadFromFileAborted, [FFileName]));\r\nend;\r\n\r\nfunction TTMSStringStream.OnError(AEvent: TEventListenerEvent): Boolean;\r\nbegin\r\n Result := True;\r\n if Assigned(FError) then\r\n FError(Format(SErrorLoadFromFile, [FFileName]));\r\nend;\r\n\r\nfunction TTMSStringStream.OnLoad(AEvent: TEventListenerEvent): Boolean;\r\nconst\r\n cStatusOK = 200;\r\n cStatusLastOK = 208;\r\nvar\r\n lReq: TJSXMLHttpRequest;\r\nbegin\r\n lReq := TJSXMLHttpRequest(AEvent.target);\r\n\r\n if (lReq.Status < cStatusOK) or (lReq.Status > cStatusLastOK) then\r\n begin\r\n if Assigned(FError) then\r\n begin\r\n FError(Format(SCannotGetFile, [FFileName, FRequest.Status]));\r\n Exit;\r\n end\r\n else\r\n raise EStringStreamError.CreateFmt(SCannotGetFile, [FFileName, lReq.Status]);\r\n end;\r\n WriteString(lReq.ResponseText);\r\n Result := True;\r\n if Assigned(FLoaded) then\r\n FLoaded();\r\nend;\r\n\r\nfunction TTMSStringStream.ReadString(ACount: Integer): string;\r\nvar\r\n lBytes: TBytes;\r\n lDest: TBytes;\r\n lCount: Integer;\r\nbegin\r\n if ACount > Size - Position then\r\n ACount := Size - Position;\r\n\r\n lDest.Length := ACount;\r\n lBytes := Bytes;\r\n for lCount := Position to ACount + Position - 1 do\r\n lDest[lCount - Position] := lBytes[lCount];\r\n\r\n Result := FEncoding.GetString(lDest);\r\n Position := Position + ACount;\r\nend;\r\n\r\nprocedure TTMSStringStream.WriteString(const AString: string);\r\nvar\r\n lBytes: TBytes;\r\n lData: string;\r\nbegin\r\n lBytes := FEncoding.GetBytes(AString);\r\n Write(lBytes, 0, lBytes.Length);\r\n\r\n lData := DataString;\r\n if lData <> AString then\r\n WriteString(''); \r\nend;\r\n\r\n{ TInterfaceList }\r\n\r\nconstructor TInterfaceList.Create;\r\nbegin\r\n inherited Create;\r\n FList := TFPList.Create;\r\nend;\r\n\r\ndestructor TInterfaceList.Destroy;\r\nbegin\r\n Clear;\r\n FList.Free;\r\n inherited Destroy;\r\nend;\r\n\r\nfunction TInterfaceList.Add(const AItem: IInterface): Integer;\r\nbegin\r\n Result := FList.Add(nil);\r\n Items[Result] := AItem;\r\nend;\r\n\r\nprocedure TInterfaceList.Clear;\r\nvar\r\n lCount: Integer;\r\nbegin\r\n for lCount := 0 to FList.Count - 1 do\r\n Items[lCount] := nil;\r\n FList.Clear;\r\nend;\r\n\r\nprocedure TInterfaceList.Delete(const AIndex: Integer);\r\nbegin\r\n Items[AIndex] := nil;\r\n FList.Delete(AIndex);\r\nend;\r\n\r\nprocedure TInterfaceList.Exchange(const AIndex1, AIndex2: Integer);\r\nbegin\r\n FList.Exchange(AIndex1, AIndex2);\r\nend;\r\n\r\nfunction TInterfaceList.Expand: TInterfaceList;\r\nbegin\r\n FList.Expand;\r\n Result := Self;\r\nend;\r\n\r\nfunction TInterfaceList.First: IInterface;\r\nbegin\r\n if Count > 0 then\r\n Result := Items[0]\r\n else\r\n Result := nil;\r\nend;\r\n\r\nfunction TInterfaceList.GetEnumerator: TInterfaceListEnumerator;\r\nbegin\r\n Result := TInterfaceListEnumerator.Create(Self);\r\nend;\r\n\r\nfunction TInterfaceList.get_Capacity: Integer;\r\nbegin\r\n Result := FList.Capacity;\r\nend;\r\n\r\nfunction TInterfaceList.get_Count: Integer;\r\nbegin\r\n Result := FList.Count;\r\nend;\r\n\r\nfunction TInterfaceList.get_Items(const AIndex: Integer): IInterface;\r\nbegin\r\n Result := IInterface(FList[AIndex]);\r\nend;\r\n\r\nfunction TInterfaceList.IndexOf(const AItem: IInterface): Integer;\r\nbegin\r\n Result := IndexOfItem(AItem, TDirection.FromBeginning);\r\nend;\r\n\r\nfunction TInterfaceList.IndexOfItem(const AItem: IInterface; const ADirection: TDirection): Integer;\r\nbegin\r\n Result := FList.IndexOfItem(AItem, ADirection);\r\nend;\r\n\r\nprocedure TInterfaceList.Insert(const AIndex: Integer; const AItem: IInterface);\r\nbegin\r\n FList.Insert(AIndex, nil);\r\n Items[AIndex] := AItem;\r\nend;\r\n\r\nfunction TInterfaceList.Last: IInterface;\r\nbegin\r\n Result := Items[Count - 1];\r\nend;\r\n\r\nprocedure TInterfaceList.Lock;\r\nbegin\r\nend;\r\n\r\nfunction TInterfaceList.Remove(const AItem: IInterface): Integer;\r\nbegin\r\n Result := RemoveItem(AItem, TDirection.FromBeginning);\r\nend;\r\n\r\nfunction TInterfaceList.RemoveItem(const AItem: IInterface; const ADirection: TDirection): Integer;\r\nbegin\r\n Result := FList.IndexOfItem(AItem, ADirection);\r\n if Result > -1 then\r\n Delete(Result);\r\nend;\r\n\r\nprocedure TInterfaceList.set_Capacity(const AValue: Integer);\r\nbegin\r\n FList.Capacity := AValue;\r\nend;\r\n\r\nprocedure TInterfaceList.set_Count(const AValue: Integer);\r\nbegin\r\n FList.Count := AValue;\r\nend;\r\n\r\nprocedure TInterfaceList.set_Items(const AIndex: Integer; const AItem: IInterface);\r\nbegin\r\n if FList[AIndex] <> nil then\r\n IInterface(FList[AIndex])._Release;\r\n FList[AIndex] := AItem;\r\n if AItem <> nil then\r\n AItem._AddRef;\r\nend;\r\n\r\nfunction InternalCompare(AItem1, AItem2: JSValue): Integer;\r\nbegin\r\n Result := FCompare(IInterface(AItem1), IInterface(AItem2));\r\nend;\r\n\r\nprocedure TInterfaceList.Sort(const ACompare: TCompareItems);\r\nbegin\r\n FCompare := ACompare;\r\n try\r\n FList.Sort(@InternalCompare);\r\n finally\r\n FCompare := nil;\r\n end;\r\nend;\r\n\r\nprocedure TInterfaceList.Unlock;\r\nbegin\r\nend;\r\n\r\n{ TInterfaceListEnumerator }\r\n\r\nconstructor TInterfaceListEnumerator.Create(const AInterfaceList: TInterfaceList);\r\nbegin\r\n inherited Create;\r\n FIndex := -1;\r\n FInterfaceList := AInterfaceList;\r\nend;\r\n\r\nfunction TInterfaceListEnumerator.get_Current: IInterface;\r\nbegin\r\n Result := FInterfaceList[FIndex];\r\nend;\r\n\r\nfunction TInterfaceListEnumerator.MoveNext: Boolean;\r\nbegin\r\n Result := FIndex < FInterfaceList.Count - 1;\r\n if Result then\r\n Inc(FIndex);\r\nend;\r\n\r\n{ TStringBuilder }\r\n\r\nconstructor TStringBuilder.Create(const AValue: string);\r\nbegin\r\n inherited Create;\r\n FData := AValue;\r\nend;\r\n\r\nfunction TStringBuilder.Append(const AValue: Integer): TStringBuilder;\r\nbegin\r\n Result := Append(AValue.ToString);\r\nend;\r\n\r\nfunction TStringBuilder.Append(const AValue: string): TStringBuilder;\r\nbegin\r\n FData := FData + AValue;\r\n Result := Self;\r\nend;\r\n\r\nfunction TStringBuilder.get_Length: Integer;\r\nbegin\r\n Result := FData.Length;\r\nend;\r\n\r\nfunction TStringBuilder.Insert(const AIndex, AValue: Integer): TStringBuilder;\r\nbegin\r\n Result := Insert(AIndex, AValue.ToString);\r\nend;\r\n\r\nfunction TStringBuilder.Insert(const AIndex: Integer; const AValue: string): TStringBuilder;\r\nbegin\r\n FData.Insert(AIndex, AValue);\r\n Result := Self;\r\nend;\r\n\r\nprocedure TStringBuilder.set_Length(const AValue: Integer);\r\nbegin\r\n FData.Length := AValue;\r\nend;\r\n\r\nfunction TStringBuilder.ToString: string;\r\nbegin\r\n Result := FData;\r\nend;\r\n\r\n{$HINTS OFF}\r\n\r\nfunction StringToBase64(AValue: string): string;\r\nvar\r\n res: string;\r\nbegin\r\n asm\r\n res = window.btoa(AValue);\r\n end;\r\n Result := res;\r\nend;\r\n\r\nfunction Base64ToString(AValue: string): string;\r\nvar\r\n res: string;\r\nbegin\r\n asm\r\n res = window.atob(AValue);\r\n end;\r\n Result := res;\r\nend;\r\n\r\nfunction ArrayBufferToBase64(Buffer: TJSArrayBuffer): string;\r\nbegin\r\n asm\r\n function _arrayBufferToBase64(buf) {\r\n var binary = '';\r\n var bytes = new Uint8Array(buf);\r\n var len = bytes.byteLength;\r\n for (var i = 0; i < len; i++) {\r\n binary += String.fromCharCode( bytes[i] );\r\n }\r\n return window.btoa(binary);\r\n }\r\n Result = _arrayBufferToBase64(Buffer);\r\n end;\r\nend;\r\n\r\nfunction Base64ToArrayBuffer(Base64: string): TJSArrayBuffer;\r\nbegin\r\n asm\r\n function _base64ToArrayBuffer(data) {\r\n var binary_string = window.atob(data);\r\n var len = binary_string.length;\r\n var bytes = new Uint8Array(len);\r\n for (var i = 0; i < len; i++) {\r\n bytes[i] = binary_string.charCodeAt(i);\r\n }\r\n return bytes.buffer;\r\n }\r\n\r\n Result = _base64ToArrayBuffer(Base64);\r\n end;\r\nend;\r\n\r\nfunction SizeOf(const AValue: Double): Integer; overload;\r\nconst\r\n cSizeOfDouble = 8;\r\nbegin\r\n Result := cSizeOfDouble;\r\nend;\r\n\r\nfunction SizeOf(const AValue: Integer): Integer; overload;\r\nconst\r\n cSizeOfInteger = 4;\r\nbegin\r\n Result := cSizeOfInteger;\r\nend;\r\n\r\nprocedure InsertAfter(newNode, referenceNode: TJSElement);\r\nbegin\r\n referenceNode.parentNode.insertBefore(newNode, referenceNode.nextSibling);\r\nend;\r\n\r\nfunction StripThousandSep(ps: string): string;\r\nbegin\r\n while (Pos(FormatSettings.ThousandSeparator, ps) > 0) do\r\n Delete(ps, Pos(FormatSettings.ThousandSeparator, ps), 1);\r\n Result := ps;\r\nend;\r\n\r\nfunction VarPos(ASubValue, AValue: string; var AResult: Integer): Integer;\r\nbegin\r\n AResult := Pos(ASubValue, AValue);\r\n Result := AResult;\r\nend;\r\n\r\nfunction IsDate(AValue: string; var ADate: TDateTime): boolean;\r\nvar\r\n su, ts: string;\r\n da,mo,ye,ho,mi,se: Word;\r\n err: Integer;\r\n dp,mp,yp,vp: Integer;\r\nbegin\r\n Result := False;\r\n ts := '';\r\n su := UpperCase(FormatSettings.ShortDateFormat);\r\n dp := pos('D',su);\r\n mp := pos('M',su);\r\n yp := pos('Y',su);\r\n\r\n da := 0;\r\n mo := 0;\r\n ye := 0;\r\n ho := 0;\r\n mi := 0;\r\n se := 0;\r\n\r\n vp := -1;\r\n if VarPos(FormatSettings.DateSeparator,AValue,vp)>0 then\r\n begin\r\n su := Copy(AValue,1,vp - 1);\r\n\r\n if (dp0 then Exit;\r\n Delete(AValue,1,vp);\r\n\r\n if VarPos(FormatSettings.DateSeparator,AValue,vp)>0 then\r\n begin\r\n su := Copy(AValue,1,vp - 1);\r\n\r\n if ((dp>mp) and (dpyp) and (dpdp) and (mpyp) and (mpmp) and (ypdp) and (yp0 then Exit;\r\n Delete(AValue,1,vp);\r\n\r\n AValue := Trim(AValue);\r\n\r\n if VarPos(' ',AValue, vp) > 0 then // there is space to separate date & time\r\n begin\r\n ts := copy(AValue, vp, length(AValue));\r\n AValue := copy(AValue, 1, vp - 1);\r\n end;\r\n\r\n if (dp>mp) and\r\n (dp>yp) then\r\n val(AValue,da,err)\r\n else\r\n if (mp>dp) and\r\n (mp>yp) then\r\n val(AValue,mo,err)\r\n else\r\n if (yp>mp) and\r\n (yp>dp) then\r\n val(AValue,ye,err);\r\n\r\n if err<>0 then Exit;\r\n if (da>31) then Exit;\r\n if (mo>12) then Exit;\r\n\r\n if (ts <> '') then // there is a time part\r\n begin\r\n if VarPos(FormatSettings.TimeSeparator,ts,vp)>0 then\r\n begin\r\n su := Copy(ts,1,vp - 1); // hour part\r\n val(su,ho,err);\r\n\r\n if (err <> 0) then Exit;\r\n if (ho > 23) then Exit;\r\n\r\n Delete(ts,1,vp);\r\n\r\n if VarPos(FormatSettings.TimeSeparator,ts,vp)>0 then // there is a second part\r\n begin\r\n su := Copy(ts,1,vp - 1); // minute part\r\n val(su,mi,err);\r\n\r\n if err <> 0 then Exit;\r\n Delete(ts,1,vp);\r\n\r\n val(ts,se,err); // second part\r\n if (err <> 0) then Exit;\r\n if (se > 60) then Exit;\r\n end\r\n else\r\n begin\r\n val(su,mi,err); // minute part\r\n if (err <> 0) then Exit;\r\n end;\r\n\r\n if (mi > 59) then Exit;\r\n\r\n Result := true;\r\n end;\r\n end\r\n else\r\n Result := True;\r\n\r\n try\r\n ADate := EncodeDate(ye,mo,da) + EncodeTime(ho,mi,se,0);\r\n except\r\n Result := False;\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\nfunction Matches(s0a, s1a: string): Boolean;\r\nconst\r\n larger = '>';\r\n smaller = '<';\r\n logand = '&';\r\n logor = '^';\r\n asterix = '*';\r\n qmark = '?';\r\n negation = '!';\r\n\r\nvar\r\n matching: boolean;\r\n done: boolean;\r\n len: longint;\r\n lastchar: char;\r\n s0,s1,s2,s3: integer;\r\n oksmaller,oklarger,negflag: boolean;\r\n compstr: string;\r\n flag1,flag2,flag3: boolean;\r\n equal: boolean;\r\n n1,n2: double;\r\n code1, code2: Integer;\r\n dt1,dt2: TDateTime;\r\n q, i: integer;\r\nbegin\r\n i := 0;\r\n\r\n oksmaller := True;\r\n oklarger := True;\r\n flag1 := False;\r\n flag2 := False;\r\n flag3 := False;\r\n negflag := False;\r\n equal := False;\r\n\r\n { [<>] string [&|] [<>] string }\r\n\r\n // do larger than or larger than or equal\r\n\r\n s2 := Pos(larger,s0a);\r\n\r\n if s2 <> 0 then\r\n begin\r\n inc(s2);\r\n if (s0a[s2 - i] = '=') then\r\n begin\r\n Equal := True;\r\n inc(s2);\r\n end;\r\n\r\n while (s0a[s2 - i] = ' ') do\r\n inc(s2);\r\n\r\n s3 := s2;\r\n len := 0;\r\n\r\n lastchar := #0;\r\n\r\n q := 0;\r\n\r\n while ((s2 - i <= Length(s0a)) and (s0a[s2 - i] <> ' ')) and (s2 <= Length(s0a)) and (odd(q) or ((s0a[s2 - i] <> '&') and (s0a[s2 - i] <> '|'))) do\r\n begin\r\n if (s0a[s2 - i] = '\"') then\r\n inc(q);\r\n\r\n if (len = 0) and (s0a[s2 - i] = '\"') then\r\n inc(s3)\r\n else\r\n inc(len);\r\n\r\n lastchar := s0a[s2 - i];\r\n inc(s2);\r\n\r\n if (s2 - i <= Length(s0a)) and (s0a[s2 - i] = ' ') and odd(q) then // skip space if between quotes\r\n begin\r\n lastchar := s0a[s2 - i];\r\n inc(s2);\r\n end;\r\n end;\r\n\r\n if (len > 0) and (lastchar = '\"') then\r\n dec(len);\r\n\r\n compstr := Copy(s0a,s3,len);\r\n\r\n //StrLCopy(compstr,s3,len);\r\n\r\n Val(StripThousandSep(s1a),n1,code1);\r\n Val(StripThousandSep(compstr),n2,code2);\r\n\r\n dt2 := 0;\r\n if IsDate(compstr,dt2) then\r\n code2 := 1;\r\n\r\n dt1 := 0;\r\n if IsDate(s1a,dt1) then\r\n code1 := 1;\r\n\r\n if (code1 = 0) and (code2 = 0) then {both are numeric types}\r\n begin\r\n if equal then\r\n oklarger := n1 >= n2\r\n else\r\n oklarger := n1 > n2;\r\n end\r\n else\r\n begin\r\n if IsDate(compstr,dt2) and IsDate(s1a,dt1) then\r\n begin\r\n if equal then\r\n oklarger := dt1 >= dt2\r\n else\r\n oklarger := dt1 > dt2;\r\n end\r\n else\r\n begin\r\n if equal then\r\n oklarger := (CompareStr(compstr,s1a)<=0)\r\n else\r\n oklarger := (CompareStr(compstr,s1a)<0);\r\n end;\r\n end;\r\n flag1 := True;\r\n end;\r\n\r\n equal := False;\r\n\r\n // do smaller than or smaller than or equal\r\n s2 := Pos(smaller, s0a);\r\n if (s2 <> 0) then\r\n begin\r\n inc(s2);\r\n if (s0a[s2 - i] = '=') then\r\n begin\r\n equal := True;\r\n inc(s2);\r\n end;\r\n\r\n lastchar := #0;\r\n\r\n while (s2 - i <= Length(s0a)) and (s0a[s2 - i] =' ') do inc(s2);\r\n s3 := s2;\r\n len := 0;\r\n q := 0;\r\n\r\n while (s2 - i <= Length(s0a)) and (s0a[s2 - i] <> ' ') and (s2 <= Length(s0a)) and (odd(q) or ((s0a[s2 - i] <> '&') and (s0a[s2 - i] <> '|'))) do\r\n begin\r\n if s0a[s2 - i] = '\"' then\r\n inc(q);\r\n\r\n if (len = 0) and (s0a[s2 - i] = '\"') then\r\n inc(s3)\r\n else\r\n inc(len);\r\n\r\n lastchar := s0a[s2 - i];\r\n inc(s2);\r\n end;\r\n\r\n if (len > 0) and (lastchar = '\"') then\r\n dec(len);\r\n\r\n compstr := copy(s0a, s3, len);\r\n\r\n Val(StripThousandSep(s1a),n1,code1);\r\n Val(StripThousandSep(compstr),n2,code2);\r\n if IsDate(compstr,dt2) then code2 := 1;\r\n if IsDate(s1a,dt1) then code1 := 1;\r\n\r\n if (code1 = 0) and (code2 = 0) then // both are numeric types\r\n begin\r\n if equal then\r\n oksmaller := n1 <= n2\r\n else\r\n oksmaller := n1 < n2;\r\n end\r\n else\r\n begin\r\n // check for dates here ?\r\n if IsDate(compstr, dt2) and IsDate(s1a, dt1) then\r\n begin\r\n if equal then\r\n oksmaller := dt1 <= dt2\r\n else\r\n oksmaller := dt1 < dt2;\r\n end\r\n else\r\n begin\r\n if equal then\r\n oksmaller := (CompareStr(compstr,s1a)>=0)\r\n else\r\n oksmaller := (CompareStr(compstr,s1a)>0);\r\n end;\r\n end;\r\n\r\n flag2 := True;\r\n end;\r\n\r\n s2 := Pos(negation, s0a);\r\n\r\n if (s2 <> 0) then\r\n begin\r\n inc(s2);\r\n while (s0a[s2 - i] = ' ') do\r\n inc(s2);\r\n s3 := s2;\r\n len := 0;\r\n\r\n lastchar := #0;\r\n q := 0;\r\n\r\n while (s0a[s2 - i] <> ' ') and (s2 <= length(s0a)) and (odd(q) or ((s0a[s2 - i] <> '&') and (s0a[s2 - i] <> '|'))) do\r\n begin\r\n if (s0a[s2 - i] = '\"') then\r\n inc(q);\r\n\r\n if (len = 0) and (s0a[s2 - i] = '\"') then\r\n inc(s3)\r\n else\r\n inc(len);\r\n\r\n lastchar := s0a[s2 - i];\r\n inc(s2);\r\n end;\r\n\r\n if (len > 0) and (lastchar = '\"') then\r\n dec(len);\r\n\r\n compstr := copy(s0a, s3, len);\r\n flag3 := True;\r\n end;\r\n\r\n if (flag3) then\r\n begin\r\n if Pos(larger, s0a) = 0 then\r\n flag1 := flag3;\r\n if Pos(smaller, s0a) = 0 then\r\n flag2 := flag3;\r\n end;\r\n\r\n if (Pos(logor, s0a) <> 0) then\r\n if flag1 or flag2 then\r\n begin\r\n matches := oksmaller or oklarger;\r\n Exit;\r\n end;\r\n\r\n if (Pos(logand, s0a) <> 0) then\r\n if flag1 and flag2 then\r\n begin\r\n matches := oksmaller and oklarger;\r\n Exit;\r\n end;\r\n\r\n if ((Pos(larger, s0a) <> 0) and (oklarger)) or\r\n ((Pos(smaller, s0a) <> 0) and (oksmaller)) then\r\n begin\r\n matches := True;\r\n Exit;\r\n end;\r\n\r\n s0 := 1;\r\n s1 := 1;\r\n\r\n done := (s0a = '') or (s1a = '');\r\n\r\n Matching := True;\r\n\r\n while not done and matching do\r\n begin\r\n case s0a[s0 - i] of\r\n qmark:\r\n begin\r\n matching := s1 <= Length(s1a);\r\n if matching then\r\n begin\r\n inc(s0);\r\n inc(s1);\r\n end;\r\n end;\r\n negation:\r\n begin\r\n negflag:=True;\r\n inc(s0);\r\n end;\r\n '\"':\r\n begin\r\n inc(s0);\r\n end;\r\n asterix:\r\n begin\r\n repeat\r\n inc(s0)\r\n until (s0 - i > Length(s0a)) or (s0a[s0 - i] <> asterix);\r\n len := Length(s1a) - s1;\r\n inc(s1,len);\r\n matching := matches(copy(s0a,s0,Length(s0a)),Copy(s1a, s1, Length(s1a)));\r\n\r\n while (len >= 0) and not matching do\r\n begin\r\n dec(s1);\r\n dec(len);\r\n matching := matches(copy(s0a,s0,Length(s0a)),Copy(s1a, s1, Length(s1a)));\r\n end;\r\n if matching then\r\n begin\r\n s0 := Length(s0a) + 1;\r\n s1 := Length(s1a) + 1;\r\n end;\r\n end;\r\n else\r\n begin\r\n if (s0 <= Length(s0a)) and (s1 <= Length(s1a)) then\r\n matching := s0a[s0 - i] = s1a[s1 - i]\r\n else\r\n matching := false;\r\n\r\n if matching then\r\n begin\r\n inc(s0);\r\n inc(s1);\r\n end;\r\n end;\r\n end;\r\n\r\n Done := (s0 > Length(s0a)) and (s1 > Length(s1a));\r\n end;\r\n\r\n if negflag then\r\n Matches := not matching\r\n else\r\n Matches := matching;\r\nend;\r\n\r\nfunction MatchStr(AValue1, AValue2:string; ACaseSensitive:Boolean = true):Boolean;\r\nbegin\r\n if ACaseSensitive then\r\n Result := Matches(AValue1,AValue2)\r\n else\r\n Result := Matches(UpperCase(AValue1),UpperCase(AValue2));\r\nend;\r\n\r\nfunction StripLogicSpaces(AValue: string): string;\r\nvar\r\n i, k: integer;\r\n q: integer;\r\nbegin\r\n q := 0;\r\n i := 1;\r\n k := length(AValue);\r\n Result := '';\r\n\r\n while (i <= k) do\r\n begin\r\n if AValue[i] = '\"' then\r\n inc(q);\r\n\r\n if (AValue[i] = ' ') then\r\n begin\r\n if Odd(q) then\r\n Result := Result + AValue[i];\r\n end\r\n else\r\n Result := Result + AValue[i];\r\n\r\n inc(i);\r\n end;\r\nend;\r\n\r\nfunction FirstChar(ACharset: array of char; AValue: string; var spos: Integer): char;\r\nvar\r\n i:Integer;\r\n q: Integer;\r\n j: Integer;\r\nbegin\r\n j := 1;\r\n i := 1;\r\n q := 0;\r\n spos := -1;\r\n Result := #0;\r\n\r\n while i <= Length(AValue) do\r\n begin\r\n if AValue[i - j] = '\"' then\r\n inc(q);\r\n\r\n if (CharInSet(AValue[i - j], ACharSet)) and not Odd(q) then\r\n begin\r\n spos := i;\r\n Result := AValue[i - j];\r\n Break;\r\n end;\r\n Inc(i);\r\n end;\r\nend;\r\n\r\nfunction ClosingParenthesis(s1: string): integer;\r\nvar\r\n i,j,k,r: integer;\r\nbegin\r\n r := 0;\r\n j := 0;\r\n k := 0;\r\n i := 1;\r\n\r\n while (i <= length(s1)) do\r\n begin\r\n if (s1[i] = ')') then\r\n inc(k);\r\n\r\n if (s1[i] = '(') then\r\n inc(j);\r\n\r\n if (s1[i] = ')') and (j = k) then\r\n begin\r\n r := i;\r\n break;\r\n end;\r\n\r\n inc(i);\r\n end;\r\n\r\n Result := r;\r\nend;\r\n\r\n\r\n\r\nfunction MatchStrEx(AValue1, AValue2: string; ACaseSensitive: Boolean = true): Boolean;\r\nvar\r\n ch,lastop: Char;\r\n sep,cp: Integer;\r\n res,newres: Boolean;\r\n CharArray: array of char;\r\nbegin\r\n AValue1 := Trim(AValue1);\r\n AValue1 := StripLogicSpaces(AValue1);\r\n\r\n sep := -1;\r\n if VarPos('=', AValue1, sep) = 1 then\r\n Delete(AValue1, sep, 1);\r\n\r\n LastOp := #0;\r\n Res := True;\r\n\r\n SetLength(CharArray,5);\r\n CharArray[0] := '(';\r\n CharArray[1] := ';';\r\n CharArray[2] := '^';\r\n CharArray[3] := '&';\r\n CharArray[4] := '|';\r\n\r\n if (AValue1 = '') then\r\n begin\r\n Result := (AValue2 = '');\r\n Exit;\r\n end;\r\n\r\n if (AValue1 <> '*') and (AValue2 = '') then\r\n begin\r\n Result := False;\r\n Exit;\r\n end;\r\n\r\n repeat\r\n ch := FirstChar(CharArray, AValue1, sep);\r\n if ch <> #0 then\r\n begin\r\n if (length(AValue1) > 0) and (AValue1[1] = '(') and (pos('(',AValue1) > 0) then\r\n begin\r\n cp := ClosingParenthesis(AValue1);\r\n NewRes := MatchStrEx(copy(AValue1,2,cp - 2),AValue2,ACaseSensitive);\r\n delete(AValue1,1,cp);\r\n end\r\n else\r\n begin\r\n NewRes := MatchStr(Copy(AValue1,1,sep - 1),AValue2,ACaseSensitive);\r\n Delete(AValue1,1,sep);\r\n end;\r\n\r\n if LastOp = #0 then\r\n Res := NewRes\r\n else\r\n case LastOp of\r\n ';','^','|':Res := Res or NewRes;\r\n '&':Res := Res and NewRes;\r\n end;\r\n\r\n LastOp := ch;\r\n end;\r\n\r\n until (ch = #0);\r\n\r\n NewRes := MatchStr(AValue1, AValue2, ACaseSensitive);\r\n\r\n if LastOp = #0 then\r\n Res := NewRes\r\n else\r\n case LastOp of\r\n ';','^','|':Res := Res or NewRes;\r\n '&':Res := Res and NewRes;\r\n end;\r\n\r\n Result := Res;\r\nend;\r\n\r\n\r\nprocedure SelectElementContents(AElement: TJSElement);\r\nbegin\r\n asm\r\n if (window.getSelection && document.createRange) {\r\n var sel = window.getSelection();\r\n var range = document.createRange();\r\n range.selectNodeContents(AElement);\r\n sel.removeAllRanges();\r\n sel.addRange(range);\r\n } else if (document.selection && document.body.createTextRange) {\r\n var textRange = document.body.createTextRange();\r\n textRange.moveToElementText(AElement);\r\n textRange.select();\r\n }\r\n end;\r\nend;\r\n\r\nfunction FormatProp(const AFmt: string; const AArgs: array of const): string;\r\nbegin\r\n Result := Format(AFmt, AArgs, TFormatSettings.Invariant);\r\nend;\r\n\r\nfunction StringIsFloat(N: string): boolean;\r\nvar\r\n f: double;\r\nbegin\r\n Result := TryStrToFloat(N,F);\r\nend;\r\n\r\nfunction StringIsInteger(N: string): boolean;\r\nvar\r\n I: Integer;\r\nbegin\r\n Result := True;\r\n if Trim(N) = '' then\r\n Exit(False);\r\n\r\n if (Length(Trim(N)) > 1) and (Trim(N)[1] = '0') then\r\n Exit(False);\r\n\r\n if not (N[I] in ['0'..'9','-']) then\r\n Exit(False);\r\n\r\n for I := 2 to Length(N) do\r\n begin\r\n if not (N[I] in ['0'..'9']) then\r\n begin\r\n Result := False;\r\n Break;\r\n end;\r\n end;\r\nend;\r\n\r\nfunction MD5Hash(N: String): string;\r\nvar\r\n h: string;\r\nbegin\r\n asm\r\n function md5(inputString) {\r\n var hc=\"0123456789abcdef\";\r\n function rh(n) {var j,s=\"\";for(j=0;j<=3;j++) s+=hc.charAt((n>>(j*8+4))&0x0F)+hc.charAt((n>>(j*8))&0x0F);return s;}\r\n function ad(x,y) {var l=(x&0xFFFF)+(y&0xFFFF);var m=(x>>16)+(y>>16)+(l>>16);return (m<<16)|(l&0xFFFF);}\r\n function rl(n,c) {return (n<>>(32-c));}\r\n function cm(q,a,b,x,s,t) {return ad(rl(ad(ad(a,q),ad(x,t)),s),b);}\r\n function ff(a,b,c,d,x,s,t) {return cm((b&c)|((~b)&d),a,b,x,s,t);}\r\n function gg(a,b,c,d,x,s,t) {return cm((b&d)|(c&(~d)),a,b,x,s,t);}\r\n function hh(a,b,c,d,x,s,t) {return cm(b^c^d,a,b,x,s,t);}\r\n function ii(a,b,c,d,x,s,t) {return cm(c^(b|(~d)),a,b,x,s,t);}\r\n function sb(x) {\r\n var i;var nblk=((x.length+8)>>6)+1;var blks=new Array(nblk*16);for(i=0;i>2]|=x.charCodeAt(i)<<((i%4)*8);\r\n blks[i>>2]|=0x80<<((i%4)*8);blks[nblk*16-2]=x.length*8;return blks;\r\n }\r\n var i,x=sb(inputString),a=1732584193,b=-271733879,c=-1732584194,d=271733878,olda,oldb,oldc,oldd;\r\n for(i=0;i 0) {\r\n flashVersion = fv.major + '.' + fv.minor + ' r' + fv.release;\r\n }\r\n else {\r\n flashVersion = unknown;\r\n }\r\n }\r\n Result.screenSize = screenSize;\r\n Result.browser = browser;\r\n Result.browserversion = version;\r\n Result.browsermajorVersion = majorVersion;\r\n Result.mobile = mobile;\r\n Result.os = os;\r\n Result.osVersion = osVersion;\r\n Result.cookieEnabled = cookieEnabled;\r\n }\r\n GetInfo(window);\r\n end;\r\nend;\r\n\r\n\r\n{ TJsonToObjectHelper }\r\n\r\nprocedure TJsonToObjectHelper.FromJSON(JSONValue: JSValue);\r\nvar\r\n Context: TRttiContext;\r\n TypeInfo: TRttiType;\r\n v: TValue;\r\n\r\n procedure ListProperties(AObject: TObject; jsv: JSValue);\r\n begin\r\n asm\r\n for (var key in jsv) {\r\n if (jsv.hasOwnProperty(key)) {\r\n //console.log(key + \" / \" + jsv[key]);\r\n SetProperty(AObject, key, jsv[key]);\r\n }\r\n }\r\n end;\r\n end;\r\n\r\n procedure SetProperty(AObject: TObject; Name: string; AValue: JSValue);\r\n var\r\n pn: string;\r\n Prop: TRttiProperty;\r\n PropTypeInfo: TRttiType;\r\n begin\r\n if Name = '' then\r\n Exit;\r\n\r\n TypeInfo := Context.GetTYpe(AObject.ClassType);\r\n\r\n Prop := TypeInfo.GetProperty(Name);\r\n\r\n if Assigned(Prop) then\r\n begin\r\n pn := Prop.PropertyType.Name;\r\n\r\n PropTypeInfo := Prop.PropertyType;\r\n\r\n if (PropTypeInfo.TypeKind = tkClass) and Prop.GetValue(AObject).IsObject then\r\n begin\r\n ListProperties(Prop.GetValue(AObject).AsObject, AValue);\r\n end;\r\n\r\n if pn = 'string' then\r\n begin\r\n v := TValue.From(string(AValue));\r\n Prop.SetValue(AObject, v);\r\n end;\r\n\r\n if pn = 'longint' then\r\n begin\r\n v := TValue.From(integer(AValue));\r\n Prop.SetValue(AObject, v);\r\n end;\r\n\r\n if pn = 'boolean' then\r\n begin\r\n v := TValue.From(string(AValue)='true');\r\n Prop.SetValue(AObject, v);\r\n end;\r\n\r\n if pn = 'double' then\r\n begin\r\n v := TValue.From(double(AValue));\r\n Prop.SetValue(AObject, v);\r\n end;\r\n\r\n if pn = 'TDateTime' then\r\n begin\r\n v := TValue.From(TRESTClient.IsoToDateTime(string(AValue), true));\r\n Prop.SetValue(AObject, v);\r\n end;\r\n\r\n if pn = 'TDate' then\r\n begin\r\n v := TValue.From(TRESTClient.IsoToDate(string(AValue)));\r\n Prop.SetValue(AObject, v);\r\n end;\r\n\r\n if pn = 'TTime' then\r\n begin\r\n v := TValue.From(TRESTClient.IsoToTime(string(AValue)));\r\n Prop.SetValue(AObject, v);\r\n end;\r\n\r\n end;\r\n end;\r\n\r\nbegin\r\n Context := TRttiContext.Create;\r\n SetProperty(Self,'',nil); // for sake of warnings\r\n ListProperties(Self, JSONValue);\r\n Context.Free;\r\nend;\r\n\r\nprocedure TJsonToObjectHelper.FromJSON(JSONValue: string);\r\nvar\r\n jsv: JSValue;\r\nbegin\r\n jsv := nil;\r\n asm\r\n jsv = JSON.parse(JSONValue);\r\n end;\r\n FromJSON(jsv);\r\nend;\r\n\r\nfunction TJSonToObjectHelper.ToJSON: JSValue;\r\nvar\r\n Context: TRttiContext;\r\n TypeInfo: TRttiType;\r\n Prop: TRttiProperty;\r\n jsonstr,pn: string;\r\n res: JSValue;\r\n PropTypeInfo: TRttiType;\r\n\r\n procedure ListProperties(AObject: TObject; ATypeInfo: TRttiType;var js: string);\r\n var\r\n sub,sep, subn: string;\r\n begin\r\n for Prop in ATypeInfo.GetProperties do\r\n begin\r\n PropTypeInfo := Prop.PropertyType;\r\n\r\n sep := '';\r\n if Length(js) > 1 then\r\n sep := ',';\r\n\r\n subn := Prop.Name;\r\n\r\n// js := js + sep + '\"' + Prop.Name + '\":';\r\n\r\n pn := Prop.PropertyType.Name;\r\n\r\n if (PropTypeInfo.TypeKind = tkClass) and Prop.GetValue(AObject).IsObject then\r\n begin\r\n sub := '{';\r\n\r\n ListProperties(Prop.GetValue(AObject).AsObject, Prop.PropertyType, sub);\r\n\r\n sub := sub + '}';\r\n\r\n js := js + sep + '\"' + subn + '\":' + sub;\r\n\r\n Continue;\r\n end;\r\n\r\n if pn = 'string' then\r\n begin\r\n js := js + sep + '\"' + Prop.Name + '\":' + '\"' + Prop.GetValue(AObject).ToString +'\"';\r\n end;\r\n\r\n if pn = 'longint' then\r\n begin\r\n js := js + sep + '\"' + Prop.Name + '\":' + IntToStr(Prop.GetValue(AObject).AsInteger);\r\n end;\r\n\r\n if pn = 'boolean' then\r\n begin\r\n if Prop.GetValue(AObject).AsBoolean then\r\n js := js + sep + '\"' + Prop.Name + '\":' + 'true'\r\n else\r\n js := js + sep + '\"' + Prop.Name + '\":' + 'false';\r\n end;\r\n\r\n if pn = 'double' then\r\n begin\r\n js := js + sep + '\"' + Prop.Name + '\":' + floattostr(Prop.GetValue(AObject).AsExtended);\r\n end;\r\n\r\n if pn = 'TDateTime' then\r\n begin\r\n js := js + sep + '\"' + Prop.Name + '\":' + '\"' + TRESTClient.DateTimeToWL(Prop.GetValue(AObject).AsExtended)+'\"';\r\n end;\r\n\r\n if pn = 'TDate' then\r\n begin\r\n js := js + sep + '\"' + Prop.Name + '\":' + '\"' + TRESTClient.DateToWL(Prop.GetValue(AObject).AsExtended)+'\"';\r\n end;\r\n\r\n if pn = 'TTime' then\r\n begin\r\n js := js + sep + '\"' + Prop.Name + '\":' + '\"' + TRESTClient.TimeToWL(Prop.GetValue(AObject).AsExtended)+'\"';\r\n end;\r\n\r\n end;\r\n\r\n end;\r\n\r\n\r\nbegin\r\n Context := TRttiContext.Create;\r\n TypeInfo := Context.GetType(Self.ClassType);\r\n\r\n jsonstr := '{';\r\n\r\n ListProperties(Self, TypeInfo, jsonstr);\r\n\r\n jsonstr := jsonstr + '}';\r\n\r\n asm\r\n res = JSON.parse(jsonstr);\r\n end;\r\n\r\n Result := res;\r\n\r\n Context.Free;\r\nend;\r\n\r\n\r\n\r\nend.\r\n","{********************************************************************}\r\n{ }\r\n{ written by TMS Software }\r\n{ copyright (c) 2018 - 2024 }\r\n{ Email : info@tmssoftware.com }\r\n{ Web : http://www.tmssoftware.com }\r\n{ }\r\n{ The source code is given as is. The author is not responsible }\r\n{ for any possible damage done due to the use of this code. }\r\n{ The complete source code remains property of the author and may }\r\n{ not be distributed, published, given or sold in any form as such. }\r\n{ No parts of the source code can be included in any other component }\r\n{ or application without written authorization of the author. }\r\n{********************************************************************}\r\n\r\nunit WEBLib.WebTools;\r\n\r\ninterface\r\n\r\nuses\r\n Classes, Web, JS, WEBLib.Controls, WEBLib.Graphics;\r\n\r\nconst\r\n CRLF = #13#10;\r\n LNBR = '
';\r\n cBodyTag = 'body';\r\n cHTMLExt = '.html';\r\n\r\n\r\ntype\r\n TOperatingSystem = (osUnknown, osWindows, osmacOS, osLinux, osAndroid, osiOS);\r\n\r\nfunction DoubleToHTML(d: double): string;\r\n\r\nprocedure MessageBeep(AType: integer);\r\nprocedure OutputDebugString(const s: string);\r\nfunction GetTickCount: longint;\r\nfunction GetQueryParam(AName: string): string;\r\nfunction HasQueryParam(AName: string; var AValue: string; CaseSensitive: boolean = true): boolean;\r\nfunction EscapeHTML(AValue: string): string;\r\n\r\nfunction GetLocaleShortDateFormat(ALocale: string = ''): string;\r\nfunction GetLocaleLongDayName(DayOfWeek: integer; ALocale: string = ''): string;\r\nfunction GetLocaleShortDayName(DayOfWeek: integer; ALocale: string = ''): string;\r\nfunction GetLocaleLongMonthName(Month: integer; ALocale: string = ''): string;\r\nfunction GetLocaleShortMonthName(Month: integer; ALocale: string = ''): string;\r\nfunction GetLocaleDecimalSeparator(ALocale: string = ''): string;\r\nfunction GetLocaleThousandSeparator(ALocale: string = ''): string;\r\nfunction LocaleFormatCurrency(Value: double; ACurrency: string; ALocale: string = ''): string;\r\nfunction GetLocaleCurrency(ALocale: string = ''): string;\r\nfunction GetBrowserLocale: string;\r\nfunction GetOperatingSystem: TOperatingSystem;\r\nfunction ProcessAccelerator(AValue: string; var Accelerator: string): string;\r\nfunction GetBase64Image(AImage: TJSHTMLElement; AWidth: integer = 0; AHeight: integer = 0): string;\r\nprocedure DebugBreak;\r\nfunction HexImageDecode(s: string): TJSUint8Array;\r\nfunction HexImageEncodeFromBase64(s: string): string;\r\nfunction HexImageEncode(a: TJSUint8Array): string;\r\nfunction HexImageDecodeAsBase64(s: string): string;\r\nfunction EmptyImage: string;\r\nfunction NumAttribute(s: single): string;\r\nfunction DataURLToFile(AURL: string; FileName: string): TJSHTMLFile;\r\nprocedure DownloadFile(AFile: TJSHTMLFile);\r\nfunction PickerDateToDate(s: string): TDateTime;\r\nfunction PickerTimeToTime(s: string): TDateTime;\r\nfunction URLString(s: string): string;\r\nfunction IsURl(s: string): Boolean;\r\nfunction EmojiString(s: string): string;\r\nfunction HTMLToString(s: string): string;\r\nfunction FileSizeFmt(Size: int64): string;\r\nfunction FileSizeFmtSpeed(Size: int64): string;\r\nfunction ElementVisible(el: TJSHTMLElement): boolean;\r\nfunction GetMaterialGlyph(AGlyph: string; ASize: integer = 0; AColor: TColor = clNone; AType: TMaterialGlyphType = mgNormal): string;\r\n\r\nimplementation\r\n\r\nuses\r\n SysUtils, WEBLib.Utils;\r\n\r\nfunction EmptyImage: string;\r\nbegin\r\n Result := 'data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==';\r\nend;\r\n\r\n\r\nfunction DataURLToFile(AURL: string; FileName: string): TJSHTMLFile;\r\nvar\r\n afile: TJSHTMLFile;\r\nbegin\r\n asm\r\n var arr = AURL.split(','),\r\n mime = arr[0].match(/:(.*?);/)[1],\r\n bstr = atob(arr[1]),\r\n n = bstr.length,\r\n u8arr = new Uint8Array(n);\r\n while(n--){\r\n u8arr[n] = bstr.charCodeAt(n);\r\n }\r\n afile = new File([u8arr], FileName, {type:mime});\r\n end;\r\n Result := afile;\r\nend;\r\n\r\nprocedure DownloadFile(AFile: TJSHTMLFile);\r\nvar\r\n a: TJSHTMLLinkElement;\r\nbegin\r\n a := TJSHTMLLinkElement(document.createElement('a'));\r\n asm\r\n a.href = window.URL.createObjectURL(AFile);\r\n a.download = AFile.name;\r\n end;\r\n a.click;\r\nend;\r\n\r\nfunction HexImageDecode(s: string): TJSUint8Array;\r\nvar\r\n i,j,l: integer;\r\n res: TJSUint8Array;\r\n c1,c2: byte;\r\n hdr: byte;\r\nbegin\r\n l := Length(s) div 2;\r\n j := 0;\r\n\r\n c1 := ord(s[1]) - 48;\r\n if c1 >= 10 then\r\n c1 := c1 - 7;\r\n\r\n c2 := ord(s[2]) -48;\r\n if c2 >= 10 then\r\n c2 := c2 - 7;\r\n\r\n hdr := 1 + (c2 + (c1 shl 4));\r\n\r\n i := pos('4A5045474',s);\r\n // possible extra 4 bytes when TJPEGImage?\r\n if (i > 1) and (i < 10) then\r\n inc(hdr,4);\r\n\r\n i := pos('4269746D6',s);\r\n // possible extra 4 bytes when TBitmap?\r\n if (i > 1) and (i < 10) then\r\n inc(hdr,4);\r\n\r\n res := TJSUint8Array.new(l - hdr);\r\n\r\n for i := hdr + 1 to l do\r\n begin\r\n c1 := ord(s[i*2 - 1]) - 48;\r\n if c1 >= 10 then\r\n c1 := c1 - 7;\r\n\r\n c2 := ord(s[i*2]) -48;\r\n if c2 >= 10 then\r\n c2 := c2 - 7;\r\n\r\n c2 := c2 + (c1 shl 4);\r\n\r\n res[j] := c2;\r\n inc(j);\r\n end;\r\n\r\n Result := res;\r\nend;\r\n\r\n\r\nfunction HexImageEncode(a: TJSUint8Array): string;\r\nvar\r\n i,l: integer;\r\n b: byte;\r\n s,ls: string;\r\nbegin\r\n Result := '';\r\n\r\n l := a.length;\r\n\r\n if l = 0 then\r\n Exit;\r\n\r\n l := (l and $FF) shl 24 + (l and $FF00) shl 8 + (l and $FF0000) shr 8 + (l and $FF000000) shr 24;\r\n\r\n ls := '';\r\n\r\n if (a[0] = 137) and (a[1] = 80) then\r\n begin\r\n s := 'TPngImage';\r\n b := Length(s);\r\n end;\r\n\r\n if (a[0] = $FF) and (a[1] = $D8) then\r\n begin\r\n s := 'TJPEGImage';\r\n b := Length(s);\r\n ls := inttohex(l,8);\r\n end;\r\n\r\n if (a[0] = 66) and (a[1] = 77) then\r\n begin\r\n s := 'TBitmap';\r\n b := Length(s);\r\n ls := inttohex(l,8);\r\n end;\r\n\r\n if (a[0] = 71) and (a[1] = 73) then\r\n begin\r\n s := 'TGIFImage';\r\n b := Length(s);\r\n end;\r\n\r\n Result := inttohex(b,2);\r\n\r\n for i := 1 to length(s) do\r\n begin\r\n b := ord(s[i]);\r\n Result := Result + inttohex(b,2);\r\n end;\r\n\r\n Result := Result + ls;\r\n\r\n for i := 0 to a.length - 1 do\r\n begin\r\n b := a[i];\r\n Result := Result + inttohex(b,2);\r\n end;\r\nend;\r\n\r\nfunction PickerDateToDate(s: string): TDateTime;\r\nvar\r\n ye,mo,da: string;\r\n yei,moi,dai: word;\r\n e: integer;\r\n\r\nbegin\r\n Result := 0;\r\n\r\n ye := copy(s,1,4);\r\n mo := copy(s,6,2);\r\n da := copy(s,9,2);\r\n\r\n val(ye, yei, e);\r\n val(mo, moi, e);\r\n val(da, dai, e);\r\n\r\n if (yei <> 0) and (moi <> 0) and (dai <> 0) then\r\n Result := EncodeDate(yei, moi, dai)\r\nend;\r\n\r\nfunction PickerTimeToTime(s: string): TDateTime;\r\nvar\r\n ho,mi,se: string;\r\n hoi,mii,sei: word;\r\n e: integer;\r\n\r\nbegin\r\n Result := 0;\r\n\r\n ho := copy(s,1,2);\r\n mi := copy(s,4,2);\r\n se := copy(s,7,2);\r\n\r\n val(ho, hoi, e);\r\n val(mi, mii, e);\r\n val(se, sei, e);\r\n\r\n if (hoi >= 0) and (mii >= 0) and (sei >= 0) then\r\n Result := EncodeTime(hoi, mii, sei, 0);\r\nend;\r\n\r\nfunction URLString(s: string): string;\r\nvar\r\n res: string;\r\nbegin\r\n asm\r\n function linkify(inputText) {\r\n var replacedText, replacePattern1, replacePattern2, replacePattern3;\r\n\r\n //URLs starting with http://, https://, or ftp://\r\n replacePattern1 = /(\\b(https?|ftp):\\/\\/[-A-Z0-9+&@#\\/%?=~_|!:,.;]*[-A-Z0-9+&@#\\/%=~_|])/gim;\r\n replacedText = inputText.replace(replacePattern1, '$1');\r\n\r\n //URLs starting with \"www.\" (without // before it, or it'd re-link the ones done above).\r\n replacePattern2 = /(^|[^\\/])(www\\.[\\S]+(\\b|$))/gim;\r\n replacedText = replacedText.replace(replacePattern2, '$1$2');\r\n\r\n //Change email addresses to mailto:: links.\r\n replacePattern3 = /(([a-zA-Z0-9\\-\\_\\.])+@[a-zA-Z\\_]+?(\\.[a-zA-Z]{2,6})+)/gim;\r\n replacedText = replacedText.replace(replacePattern3, '$1');\r\n\r\n return replacedText;\r\n }\r\n res = linkify(s);\r\n end;\r\n Result := res;\r\nend;\r\n\r\nfunction IsURl(s: string): Boolean;\r\nvar\r\n res: Boolean;\r\nbegin\r\n asm\r\n function CheckIsUrl(inputText) {\r\n if(new RegExp(\"([a-zA-Z0-9]+://)?([a-zA-Z0-9_]+:[a-zA-Z0-9_]+@)?([a-zA-Z0-9.-]+\\\\.[A-Za-z]{2,4})(:[0-9]+)?(/.*)?\").test(inputText)) {\r\n return true;\r\n }\r\n return false;\r\n }\r\n res = CheckIsUrl(s);\r\n end; \r\n Result := res; \r\nend;\r\n\r\nfunction HTMLToString(s: string): string;\r\nbegin\r\n s := StringReplace(s,'<','<',[rfReplaceAll]);\r\n Result := StringReplace(s,'>','>',[rfReplaceAll]);\r\nend;\r\n\r\n// info\r\n// https://unicode.org/emoji/charts/full-emoji-list.html\r\n// https://en.wikipedia.org/wiki/List_of_emoticons\r\n\r\nfunction Emojistring(s: string): string;\r\nvar\r\n ls: TStringList;\r\n i: integer;\r\n v,k: string;\r\nbegin\r\n for i := 1 to Length(s) do\r\n if s[i] = '|' then\r\n s[i] := '¦';\r\n\r\n ls := TStringList.Create;\r\n ls.AddPair(':)','😀');\r\n ls.AddPair(':D','😁');\r\n ls.AddPair(';)','😉');\r\n ls.AddPair(':O','😮');\r\n ls.AddPair(':*','😗');\r\n ls.AddPair(':P','😜');\r\n ls.AddPair(':(','🙁');\r\n ls.AddPair(':¦','😐');\r\n ls.AddPair(':X','🤐');\r\n ls.AddPair('¦;)','😎');\r\n ls.AddPair(':<','😡');\r\n\r\n for i := 0 to ls.Count - 1 do\r\n begin\r\n v := ls.Names[i];\r\n k := ls.Values[v];\r\n s := StringReplace(s,v,k,[rfReplaceAll]);\r\n end;\r\n\r\n ls.Free;\r\n\r\n Result := s;\r\nend;\r\n\r\n{$HINTS OFF}\r\n\r\nfunction HexImageEncodeFromBase64(s: string): string;\r\nvar\r\n ja: TJSUint8Array;\r\nbegin\r\n asm\r\n s = s.replace(/^data:image\\/\\S+;base64,/, \"\");\r\n //ja = Uint8Array.from(atob(s), c => c.charCodeAt(0))\r\n ja = Uint8Array.from(atob(s), function(c) { return c.charCodeAt(0);} )\r\n end;\r\n\r\n Result := HexImageEncode(ja);\r\nend;\r\n\r\nfunction HexImageDecodeAsBase64(s: string): string;\r\nvar\r\n ja: TJSUint8Array;\r\nbegin\r\n ja := HexImageDecode(s);\r\n asm\r\n s = btoa(new Uint8Array(ja).reduce(function (data, byte) {\r\n return data + String.fromCharCode(byte);\r\n }, ''));\r\n end;\r\n Result := s;\r\nend;\r\n\r\nfunction GetBase64Image(AImage: TJSHTMLElement; AWidth: integer = 0; AHeight: integer = 0): string;\r\nvar\r\n s: string;\r\n m: TJSHTMLElement;\r\nbegin\r\n s := '';\r\n m := AImage;\r\n asm\r\n function getBase64Image(img) {\r\n var canvas = document.createElement(\"canvas\");\r\n if (AWidth == 0) {\r\n canvas.width = img.width; }\r\n else {\r\n canvas.width = AWidth; }\r\n if (AHeight == 0) {\r\n canvas.height = img.height; }\r\n else {\r\n canvas.height = AHeight; }\r\n var ctx = canvas.getContext(\"2d\");\r\n if ((AWidth == 0) || (AHeight == 0)) {\r\n ctx.drawImage(img, 0, 0); }\r\n else {\r\n ctx.drawImage(img, 0, 0, AWidth, AHeight); }\r\n var dataURL = canvas.toDataURL(\"image/png\");\r\n return dataURL.replace(/^data:image\\/(png|jpg);base64,/, \"\");\r\n }\r\n s = getBase64Image(m);\r\n end;\r\n Result := s;\r\nend;\r\n{$HINTS ON}\r\n\r\nprocedure DebugBreak;\r\n asm\r\n debugger;\r\n end;\r\n\r\nfunction DoubleToHTML(d: double): string;\r\nbegin\r\n Result := Format('%g',[d], TFormatSettings.Invariant);\r\nend;\r\n\r\nprocedure OutputDebugString(const s: string);\r\nbegin\r\n asm\r\n console.log(s);\r\n end;\r\nend;\r\n\r\nfunction GetTickCount: longint;\r\nvar\r\n n: longint;\r\nbegin\r\n asm\r\n var d = new Date();\r\n n = d.getTime();\r\n end;\r\n\r\n Result := n;\r\nend;\r\n\r\nfunction HasQueryParam(AName: string; var AValue: string; CaseSensitive: boolean = true): boolean;\r\nvar\r\n found: boolean;\r\n s: string;\r\nbegin\r\n s := '';\r\n if not CaseSensitive then\r\n AName := Uppercase(AName);\r\n\r\n asm\r\n var query = window.location.search.substring(1);\r\n var res = \"\";\r\n var key = \"\";\r\n found = false;\r\n var vars = query.split('&');\r\n for (var i = 0; i < vars.length; i++) {\r\n var pair = vars[i].split('=');\r\n\r\n key = decodeURIComponent(pair[0]);\r\n if (CaseSensitive == false)\r\n {\r\n key = key.toUpperCase();\r\n }\r\n\r\n if (key == AName) {\r\n res = decodeURIComponent(pair[1]);\r\n found = true;\r\n }\r\n }\r\n s = res;\r\n end;\r\n\r\n AValue := s;\r\n Result := found;\r\nend;\r\n\r\nfunction GetQueryParam(AName: string): string;\r\nvar\r\n res: string;\r\nbegin\r\n HasQueryParam(AName,res);\r\n Result := res;\r\nend;\r\n\r\n\r\nfunction GetLocaleShortDateFormat(ALocale: string = ''): string;\r\nbegin\r\n Result := TFormatSettings.Create(ALocale).ShortDateFormat;\r\nend;\r\n\r\nfunction GetLocaleLongDayName(DayOfWeek: integer; ALocale: string = ''): string;\r\nvar\r\n res: string;\r\nbegin\r\n asm\r\n var baseDate = new Date(2017, 0, 1); // Sunday\r\n baseDate.setDate(baseDate.getDate() + DayOfWeek - 1);\r\n\r\n var loc = \"\";\r\n if (ALocale == '') { loc = navigator.language; }\r\n else { loc = ALocale; }\r\n\r\n res = baseDate.toLocaleDateString(loc, { weekday: 'long' });\r\n end;\r\n Result := res;\r\nend;\r\n\r\nfunction GetLocaleShortDayName(DayOfWeek: integer; ALocale: string = ''): string;\r\nvar\r\n res: string;\r\nbegin\r\n asm\r\n var baseDate = new Date(2017, 0, 1); // Sunday\r\n baseDate.setDate(baseDate.getDate() + DayOfWeek - 1);\r\n\r\n var loc = \"\";\r\n if (ALocale == '') { loc = navigator.language; }\r\n else { loc = ALocale; }\r\n\r\n res = baseDate.toLocaleDateString(loc, { weekday: 'short' });\r\n end;\r\n Result := res;\r\nend;\r\n\r\nfunction GetLocaleLongMonthName(Month: integer; ALocale: string = ''): string;\r\nvar\r\n res: string;\r\nbegin\r\n asm\r\n var baseDate = new Date(2017, Month - 1, 1);\r\n\r\n var loc = \"\";\r\n if (ALocale == '') { loc = navigator.language; }\r\n else { loc = ALocale; }\r\n\r\n res = baseDate.toLocaleDateString(loc, { month: 'long' });\r\n end;\r\n\r\n Result := res;\r\nend;\r\n\r\nfunction GetLocaleShortMonthName(Month: integer; ALocale: string = ''): string;\r\nvar\r\n res: string;\r\nbegin\r\n asm\r\n var baseDate = new Date(2017, Month - 1, 1);\r\n\r\n var loc = \"\";\r\n if (ALocale == '') { loc = navigator.language; }\r\n else { loc = ALocale; }\r\n\r\n res = baseDate.toLocaleDateString(loc, { month: 'short' });\r\n end;\r\n\r\n Result := res;\r\nend;\r\n\r\nfunction GetLocaleDecimalSeparator(ALocale: string = ''): string;\r\nvar\r\n res: string;\r\nbegin\r\n asm\r\n var n = 1.1;\r\n var loc = \"\";\r\n if (ALocale == '') { loc = navigator.language; }\r\n else { loc = ALocale; }\r\n\r\n n = n.toLocaleString(loc).substring(1, 2);\r\n res = n;\r\n end;\r\n Result := res;\r\nend;\r\n\r\nfunction GetLocaleThousandSeparator(ALocale: string = ''): string;\r\nvar\r\n res: string;\r\nbegin\r\n asm\r\n var n = 1000.1;\r\n var loc = \"\";\r\n if (ALocale == '') { loc = navigator.language; }\r\n else { loc = ALocale; }\r\n n = n.toLocaleString(loc).substring(1, 2);\r\n res = n;\r\n end;\r\n Result := res;\r\nend;\r\n\r\nfunction LocaleFormatCurrency(Value: double; ACurrency: string; ALocale: string = ''): string;\r\nvar\r\n res: string;\r\nbegin\r\n\r\n asm\r\n var loc = \"\";\r\n if (ALocale == '') { loc = navigator.language; }\r\n else { loc = ALocale; }\r\n var number = Value;\r\n res = number.toLocaleString(loc, { style: 'currency', currency: ACurrency });\r\n end;\r\n Result := res;\r\nend;\r\n\r\nfunction GetLocaleCurrency(ALocale: string = ''): string;\r\nvar\r\n res: string;\r\nbegin\r\n asm\r\n var curr =\r\n {\"BD\": \"BDT\", \"BE\": \"EUR\", \"BF\": \"XOF\", \"BG\": \"BGN\", \"BA\": \"BAM\", \"BB\": \"BBD\", \"WF\": \"XPF\",\r\n \"BL\": \"EUR\", \"BM\": \"BMD\", \"BN\": \"BND\", \"BO\": \"BOB\", \"BH\": \"BHD\", \"BI\": \"BIF\", \"BJ\": \"XOF\",\r\n \"BT\": \"BTN\", \"JM\": \"JMD\", \"BV\": \"NOK\", \"BW\": \"BWP\", \"WS\": \"WST\", \"BQ\": \"USD\", \"BR\": \"BRL\",\r\n \"BS\": \"BSD\", \"JE\": \"GBP\", \"BY\": \"BYR\", \"BZ\": \"BZD\", \"RU\": \"RUB\", \"RW\": \"RWF\", \"RS\": \"RSD\",\r\n \"TL\": \"USD\", \"RE\": \"EUR\", \"TM\": \"TMT\", \"TJ\": \"TJS\", \"RO\": \"RON\", \"TK\": \"NZD\", \"GW\": \"XOF\",\r\n \"GU\": \"USD\", \"GT\": \"GTQ\", \"GS\": \"GBP\", \"GR\": \"EUR\", \"GQ\": \"XAF\", \"GP\": \"EUR\", \"JP\": \"JPY\",\r\n \"GY\": \"GYD\", \"GG\": \"GBP\", \"GF\": \"EUR\", \"GE\": \"GEL\", \"GD\": \"XCD\", \"GB\": \"GBP\", \"GA\": \"XAF\",\r\n \"SV\": \"USD\", \"GN\": \"GNF\", \"GM\": \"GMD\", \"GL\": \"DKK\", \"GI\": \"GIP\", \"GH\": \"GHS\", \"OM\": \"OMR\",\r\n \"TN\": \"TND\", \"JO\": \"JOD\", \"HR\": \"HRK\", \"HT\": \"HTG\", \"HU\": \"HUF\", \"HK\": \"HKD\", \"HN\": \"HNL\",\r\n \"HM\": \"AUD\", \"VE\": \"VEF\", \"PR\": \"USD\", \"PS\": \"ILS\", \"PW\": \"USD\", \"PT\": \"EUR\", \"SJ\": \"NOK\",\r\n \"PY\": \"PYG\", \"IQ\": \"IQD\", \"PA\": \"PAB\", \"PF\": \"XPF\", \"PG\": \"PGK\", \"PE\": \"PEN\", \"PK\": \"PKR\",\r\n \"PH\": \"PHP\", \"PN\": \"NZD\", \"PL\": \"PLN\", \"PM\": \"EUR\", \"ZM\": \"ZMK\", \"EH\": \"MAD\", \"EE\": \"EUR\",\r\n \"EG\": \"EGP\", \"ZA\": \"ZAR\", \"EC\": \"USD\", \"IT\": \"EUR\", \"VN\": \"VND\", \"SB\": \"SBD\", \"ET\": \"ETB\",\r\n \"SO\": \"SOS\", \"ZW\": \"ZWL\", \"SA\": \"SAR\", \"ES\": \"EUR\", \"ER\": \"ERN\", \"ME\": \"EUR\", \"MD\": \"MDL\",\r\n \"MG\": \"MGA\", \"MF\": \"EUR\", \"MA\": \"MAD\", \"MC\": \"EUR\", \"UZ\": \"UZS\", \"MM\": \"MMK\", \"ML\": \"XOF\",\r\n \"MO\": \"MOP\", \"MN\": \"MNT\", \"MH\": \"USD\", \"MK\": \"MKD\", \"MU\": \"MUR\", \"MT\": \"EUR\", \"MW\": \"MWK\",\r\n \"MV\": \"MVR\", \"MQ\": \"EUR\", \"MP\": \"USD\", \"MS\": \"XCD\", \"MR\": \"MRO\", \"IM\": \"GBP\", \"UG\": \"UGX\",\r\n \"TZ\": \"TZS\", \"MY\": \"MYR\", \"MX\": \"MXN\", \"IL\": \"ILS\", \"FR\": \"EUR\", \"IO\": \"USD\", \"SH\": \"SHP\",\r\n \"FI\": \"EUR\", \"FJ\": \"FJD\", \"FK\": \"FKP\", \"FM\": \"USD\", \"FO\": \"DKK\", \"NI\": \"NIO\", \"NL\": \"EUR\",\r\n \"NO\": \"NOK\", \"NA\": \"NAD\", \"VU\": \"VUV\", \"NC\": \"XPF\", \"NE\": \"XOF\", \"NF\": \"AUD\", \"NG\": \"NGN\",\r\n \"NZ\": \"NZD\", \"NP\": \"NPR\", \"NR\": \"AUD\", \"NU\": \"NZD\", \"CK\": \"NZD\", \"XK\": \"EUR\", \"CI\": \"XOF\",\r\n \"CH\": \"CHF\", \"CO\": \"COP\", \"CN\": \"CNY\", \"CM\": \"XAF\", \"CL\": \"CLP\", \"CC\": \"AUD\", \"CA\": \"CAD\",\r\n \"CG\": \"XAF\", \"CF\": \"XAF\", \"CD\": \"CDF\", \"CZ\": \"CZK\", \"CY\": \"EUR\", \"CX\": \"AUD\", \"CR\": \"CRC\",\r\n \"CW\": \"ANG\", \"CV\": \"CVE\", \"CU\": \"CUP\", \"SZ\": \"SZL\", \"SY\": \"SYP\", \"SX\": \"ANG\", \"KG\": \"KGS\",\r\n \"KE\": \"KES\", \"SS\": \"SSP\", \"SR\": \"SRD\", \"KI\": \"AUD\", \"KH\": \"KHR\", \"KN\": \"XCD\", \"KM\": \"KMF\",\r\n \"ST\": \"STD\", \"SK\": \"EUR\", \"KR\": \"KRW\", \"SI\": \"EUR\", \"KP\": \"KPW\", \"KW\": \"KWD\", \"SN\": \"XOF\",\r\n \"SM\": \"EUR\", \"SL\": \"SLL\", \"SC\": \"SCR\", \"KZ\": \"KZT\", \"KY\": \"KYD\", \"SG\": \"SGD\", \"SE\": \"SEK\",\r\n \"SD\": \"SDG\", \"DO\": \"DOP\", \"DM\": \"XCD\", \"DJ\": \"DJF\", \"DK\": \"DKK\", \"VG\": \"USD\", \"DE\": \"EUR\",\r\n \"YE\": \"YER\", \"DZ\": \"DZD\", \"US\": \"USD\", \"UY\": \"UYU\", \"YT\": \"EUR\", \"UM\": \"USD\", \"LB\": \"LBP\",\r\n \"LC\": \"XCD\", \"LA\": \"LAK\", \"TV\": \"AUD\", \"TW\": \"TWD\", \"TT\": \"TTD\", \"TR\": \"TRY\", \"LK\": \"LKR\",\r\n \"LI\": \"CHF\", \"LV\": \"EUR\", \"TO\": \"TOP\", \"LT\": \"LTL\", \"LU\": \"EUR\", \"LR\": \"LRD\", \"LS\": \"LSL\",\r\n \"TH\": \"THB\", \"TF\": \"EUR\", \"TG\": \"XOF\", \"TD\": \"XAF\", \"TC\": \"USD\", \"LY\": \"LYD\", \"VA\": \"EUR\",\r\n \"VC\": \"XCD\", \"AE\": \"AED\", \"AD\": \"EUR\", \"AG\": \"XCD\", \"AF\": \"AFN\", \"AI\": \"XCD\", \"VI\": \"USD\",\r\n \"IS\": \"ISK\", \"IR\": \"IRR\", \"AM\": \"AMD\", \"AL\": \"ALL\", \"AO\": \"AOA\", \"AQ\": \"\", \"AS\": \"USD\",\r\n \"AR\": \"ARS\", \"AU\": \"AUD\", \"AT\": \"EUR\", \"AW\": \"AWG\", \"IN\": \"INR\", \"AX\": \"EUR\", \"AZ\": \"AZN\",\r\n \"IE\": \"EUR\", \"ID\": \"IDR\", \"UA\": \"UAH\", \"QA\": \"QAR\", \"MZ\": \"MZN\"}\r\n\r\n var loc = \"\";\r\n if (ALocale == '') { loc = navigator.language; }\r\n else { loc = ALocale; }\r\n loc = loc.substring(3,5);\r\n loc = loc.toUpperCase();\r\n res = curr[loc] || '';\r\n end;\r\n Result := res;\r\nend;\r\n\r\n\r\n\r\nfunction GetBrowserLocale: string;\r\nvar\r\n res: string;\r\nbegin\r\n asm\r\n res = navigator.language\r\n end;\r\n Result := res;\r\nend;\r\n\r\n\r\nfunction ProcessAccelerator(AValue: string; var Accelerator: string): string;\r\nvar\r\n i,l: integer;\r\n res: string;\r\nbegin\r\n l := Length(AValue);\r\n\r\n Accelerator := '';\r\n\r\n res := '';\r\n\r\n i := 1;\r\n while (i <= l) do\r\n begin\r\n if (AValue[i] = '&') then\r\n begin\r\n if (i + 1 <= l) and (AValue[i + 1] <> '&') then\r\n begin\r\n res := res + '' + AValue[i + 1] + '';\r\n Accelerator := AValue[i + 1];\r\n end\r\n else\r\n if (i + 1 <= l) and (AValue[i + 1] = '&') then\r\n res := res + '&';\r\n inc(i, 2);\r\n end\r\n else\r\n begin\r\n res := res + AValue[i];\r\n inc(i);\r\n end;\r\n\r\n end;\r\n\r\n Result := res;\r\nend;\r\n\r\nfunction EscapeHTML(AValue: string): string;\r\nvar\r\n s: string;\r\nbegin\r\n s := AValue;\r\n asm\r\n function escapeHTML(AString) {\r\n return AString.replace(/&/g,'&').replace(//g,'>');\r\n }\r\n s = escapeHTML(s);\r\n end;\r\n Result := s;\r\nend;\r\n\r\nfunction NumAttribute(s: single): string;\r\nvar\r\n res: string;\r\nbegin\r\n res := s.ToString;\r\n Result := StringReplace(res, ',','.',[rfReplaceAll]);\r\nend;\r\n\r\nfunction FileSizeFmt(Size: int64): string;\r\nbegin\r\n if Size < 1000 then\r\n Result := IntToStr(Size) + ' bytes';\r\n if (Size >= 1000) and (Size < 1000000) then\r\n Result := Format('%.2f',[Size/1000])+' Kb';\r\n if (Size >= 1000000) and (Size < 1000000000) then\r\n Result := Format('%.2f',[Size/1000000])+' Mb';\r\n if Size >= 1000000000 then\r\n Result := Format('%.2f',[Size/1000000000])+' Gb'\r\nend;\r\n\r\nfunction FileSizeFmtSpeed(Size: int64): string;\r\nbegin\r\n if Size < 1000 then\r\n Result := IntToStr(Size)+' bytes/sec';\r\n if (Size >= 1000) and (Size < 1000000) then\r\n Result := Format('%.2f',[Size/1000])+' Kb/sec';\r\n if (Size >= 1000000) and (Size < 1000000000) then\r\n Result := Format('%.2f',[Size/1000000])+' Mb/sec';\r\n if (Size >= 1000000000) then\r\n Result := Format('%.2f',[Size/1000000000])+' Gb/sec';\r\nend;\r\n\r\nfunction GetOperatingSystem: TOperatingSystem;\r\nvar\r\n ag: string;\r\n res: boolean;\r\nbegin\r\n Result := osUnknown;\r\n\r\n asm\r\n ag = navigator.userAgent;\r\n end;\r\n\r\n if pos('Win',ag) > 0 then\r\n Result := osWindows;\r\n\r\n if pos('Mac',ag) > 0 then\r\n Result := osmacOS;\r\n\r\n if pos('Linux',ag) > 0 then\r\n Result := osLinux;\r\n\r\n if pos('Android',ag) > 0 then\r\n Result := osAndroid;\r\n\r\n if pos('Linux',ag) > 0 then\r\n Result := osLinux;\r\n\r\n asm\r\n res = ag.match(/(iPod|iPhone|iPad)/) &&\r\n ag.match(/AppleWebKit/);\r\n end;\r\n\r\n if res then\r\n Result := osiOS;\r\nend;\r\n\r\n{$HINTS OFF}\r\n\r\nfunction ElementVisible(el: TJSHTMLElement): boolean;\r\nvar\r\n p: TJSElement;\r\nbegin\r\n Result := false;\r\n\r\n p := el;\r\n while Assigned(p) do\r\n begin\r\n if (lowercase(p.tagName) = cBodyTag) then\r\n Result := true;\r\n p := p.parentElement;\r\n end;\r\n\r\n if not Result then\r\n // element is not in the DOM, so not visible\r\n Exit;\r\n\r\n while Assigned(el) do\r\n begin\r\n if el.style.getPropertyValue('display') = 'none' then\r\n begin\r\n Result := false;\r\n exit;\r\n end;\r\n p := el.parentElement;\r\n if not (p is TJSHTMLElement) then\r\n Exit;\r\n el := TJSHTMLElement(p);\r\n end;\r\nend;\r\n\r\nfunction GetMaterialGlyph(AGlyph: string; ASize: integer = 0; AColor: TColor = clNone; AType: TMaterialGlyphType = mgNormal): string;\r\nvar\r\n s: string;\r\n matclr, matsize: string;\r\nbegin\r\n s := ' clNone then\r\n matclr := 'color:'+ColorToHTML(AColor)+';';\r\n\r\n matsize := '';\r\n\r\n if ASize <> 0 then\r\n matsize := 'font-size:'+IntToStr(ASize)+'px;';\r\n\r\n s := s + ' style=\"pointer-events:none;' + matclr + matsize +'\"';\r\n\r\n Result := s + '>' + AGlyph + '';\r\nend;\r\n\r\n\r\nprocedure MessageBeep(AType: integer);\r\nbegin\r\n asm\r\n var snd = new Audio(\"data:audio/wav;base64,//uQRAAAAWMSLwUIYAAsYkXgoQwAEaYLWfkWgAI0wWs/ItAAAGDgYtAgAyN+QWaAAihwMWm4G8QQRDiMcCBcH3Cc+CDv/7xA4Tvh9Rz/y8QADBwMWgQAZG/ILNAARQ4GLTcDeI\"+\r\n \"IIhxGOBAuD7hOfBB3/94gcJ3w+o5/5eIAIAAAVwWgQAVQ2ORaIQwEMAJiDg95G4nQL7mQVWI6GwRcfsZAcsKkJvxgxEjzFUgfHoSQ9Qq7KNwqHwuB13MA4a1q/DmBrHgPcmjiGoh//EwC5nGPEmS4RcfkVK\"+\r\n\t\"OhJf+WOgoxJclFz3kgn//dBA+ya1GhurNn8zb//9NNutNuhz31f////9vt///z+IdAEAAAK4LQIAKobHItEIYCGAExBwe8jcToF9zIKrEdDYIuP2MgOWFSE34wYiR5iqQPj0JIeoVdlG4VD4XA67mAcNa1f\"+\r\n\t\"hzA1jwHuTRxDUQ//iYBczjHiTJcIuPyKlHQkv/LHQUYkuSi57yQT//uggfZNajQ3Vmz+Zt//+mm3Wm3Q576v////+32///5/EOgAAADVghQAAAAA//uQZAUAB1WI0PZugAAAAAoQwAAAEk3nRd2qAAAAACi\"+\r\n\t\"DgAAAAAAABCqEEQRLCgwpBGMlJkIz8jKhGvj4k6jzRnqasNKIeoh5gI7BJaC1A1AoNBjJgbyApVS4IDlZgDU5WUAxEKDNmmALHzZp0Fkz1FMTmGFl1FMEyodIavcCAUHDWrKAIA4aa2oCgILEBupZgHvAhE\"+\r\n\t\"BcZ6joQBxS76AgccrFlczBvKLC0QI2cBoCFvfTDAo7eoOQInqDPBtvrDEZBNYN5xwNwxQRfw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wLhMDmAYWMgVEG1U0FIGCBgXBXAtfMH10000EEEEEECUBYln03TTTdNBDZopopYvrTTdNa325mImNg3TTPV9q3pmY0xoO6bv3r00y+IDGid/9aaaZ\"+\r\n\t\"TGMuj9mpu9Mpio1dXrr5HERTZSmqU36A3CumzN/9Robv/Xx4v9ijkSRSNLQhAWumap82WRSBUqXStV/YcS+XVLnSS+WLDroqArFkMEsAS+eWmrUzrO0oEmE40RlMZ5+ODIkAyKAGUwZ3mVKmcamcJnMW26MRP\"+\r\n\t\"gUw6j+LkhyHGVGYjSUUKNpuJUQoOIAyDvEyG8S5yfK6dhZc0Tx1KI/gviKL6qvvFs1+bWtaz58uUNnryq6kt5RzOCkPWlVqVX2a/EEBUdU1KrXLf40GoiiFXK///qpoiDXrOgqDR38JB0bw7SoL+ZB9o1RCk\"+\r\n\t\"QjQ2CBYZKd/+VJxZRRZlqSkKiws0WFxUyCwsKiMy7hUVFhIaCrNQsKkTIsLivwKKigsj8XYlwt/WKi2N4d//uQRCSAAjURNIHpMZBGYiaQPSYyAAABLAAAAAAAACWAAAAApUF/Mg+0aohSIRobBAsMlO//Kk\"+\r\n\t\"4soosy1JSFRYWaLC4qZBYWFRGZdwqKiwkNBVmoWFSJkWFxX4FFRQWR+LsS4W/rFRb////////////////////////////////////////////////////////////////////////////////////////////\"+\r\n\t\"////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\"+\r\n\t\"////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\"+\r\n\t\"/////////////VEFHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAU291bmRib3kuZGUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMjAwNGh0dHA6Ly93d3cuc291bmRib3kuZGUAAAAAAAAAACU=\");\r\n snd.play();\r\n end;\r\nend;\r\n\r\n{$HINTS ON}\r\n\r\nend.\r\n\r\n","{\r\n This file is part of the Free Component Library (FCL)\r\n Copyright (c) 2002 by Florian Klaempfl\r\n\r\n See the file COPYING.FPC, included in this distribution,\r\n for details about the copyright.\r\n\r\n This program is distributed in the hope that it will be useful,\r\n but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\r\n\r\n **********************************************************************}\r\n{$mode objfpc}\r\n\r\nunit contnrs;\r\n\r\ninterface\r\n\r\nuses\r\n SysUtils, Classes;\r\n\r\n\r\nType\r\n TObjectListCallback = Reference to Procedure(data:TObject;arg:JSValue);\r\n\r\n TFPObjectList = class(TObject)\r\n private\r\n FFreeObjects : Boolean;\r\n FList: TFPList;\r\n Function GetCount: integer;\r\n Procedure SetCount(const AValue: integer);\r\n protected\r\n Function GetItem(Index: Integer): TObject;\r\n Procedure SetItem(Index: Integer; AObject: TObject);\r\n Procedure SetCapacity(NewCapacity: Integer);\r\n Function GetCapacity: integer;\r\n public\r\n constructor Create; reintroduce;\r\n constructor Create(FreeObjects : Boolean);\r\n destructor Destroy; override;\r\n Procedure Clear;\r\n Function Add(AObject: TObject): Integer;\r\n Procedure Delete(Index: Integer);\r\n Procedure Exchange(Index1, Index2: Integer);\r\n Function Expand: TFPObjectList;\r\n Function Extract(Item: TObject): TObject;\r\n Function Remove(AObject: TObject): Integer;\r\n Function IndexOf(AObject: TObject): Integer;\r\n Function FindInstanceOf(AClass: TClass; AExact: Boolean; AStartAt: Integer): Integer;\r\n Procedure Insert(Index: Integer; AObject: TObject);\r\n Function First: TObject;\r\n Function Last: TObject;\r\n Procedure Move(CurIndex, NewIndex: Integer);\r\n Procedure Assign(Obj:TFPObjectList);\r\n Procedure Pack;\r\n Procedure Sort(Compare: TListSortCompare);\r\n Procedure ForEachCall(proc2call:TObjectListCallback;arg:JSValue);\r\n property Capacity: Integer read GetCapacity write SetCapacity;\r\n property Count: Integer read GetCount write SetCount;\r\n property OwnsObjects: Boolean read FFreeObjects write FFreeObjects;\r\n property Items[Index: Integer]: TObject read GetItem write SetItem; default;\r\n property List: TFPList read FList;\r\n end;\r\n\r\n\r\n { TObjectList }\r\n\r\n TObjectList = class(TList)\r\n private\r\n FFreeObjects : Boolean;\r\n Protected\r\n Procedure Notify(Ptr: JSValue; Action: TListNotification); override;\r\n Function GetItem(Index: Integer): TObject;\r\n Procedure SetItem(Index: Integer; AObject: TObject);\r\n public\r\n constructor Create; reintroduce;\r\n constructor Create(FreeObjects : boolean);\r\n Function Add(AObject: TObject): Integer; reintroduce;\r\n Function Extract(Item: TObject): TObject; reintroduce;\r\n Function Remove(AObject: TObject): Integer; reintroduce;\r\n Function IndexOf(AObject: TObject): Integer; reintroduce;\r\n Function FindInstanceOf(AClass: TClass; AExact: Boolean; AStartAt: Integer): Integer;\r\n Procedure Insert(Index: Integer; AObject: TObject); reintroduce;\r\n Function First: TObject; reintroduce;\r\n Function Last: TObject; reintroduce;\r\n property OwnsObjects: Boolean read FFreeObjects write FFreeObjects;\r\n property Items[Index: Integer]: TObject read GetItem write SetItem; default;\r\n end;\r\n\r\n TComponentList = class(TObjectList)\r\n Private\r\n FNotifier : TComponent;\r\n Protected\r\n Procedure Notify(Ptr: JSValue; Action: TListNotification); override;\r\n Function GetItems(Index: Integer): TComponent;\r\n Procedure SetItems(Index: Integer; AComponent: TComponent);\r\n Procedure HandleFreeNotify(Sender: TObject; AComponent: TComponent);\r\n public\r\n destructor Destroy; override;\r\n Function Add(AComponent: TComponent): Integer; reintroduce;\r\n Function Extract(Item: TComponent): TComponent; reintroduce;\r\n Function Remove(AComponent: TComponent): Integer; reintroduce;\r\n Function IndexOf(AComponent: TComponent): Integer; reintroduce;\r\n Function First: TComponent; reintroduce;\r\n Function Last: TComponent; reintroduce;\r\n Procedure Insert(Index: Integer; AComponent: TComponent); reintroduce;\r\n property Items[Index: Integer]: TComponent read GetItems write SetItems; default;\r\n end;\r\n\r\n TClassList = class(TList)\r\n protected\r\n Function GetItems(Index: Integer): TClass;\r\n Procedure SetItems(Index: Integer; AClass: TClass);\r\n public\r\n Function Add(AClass: TClass): Integer; reintroduce;\r\n Function Extract(Item: TClass): TClass; reintroduce;\r\n Function Remove(AClass: TClass): Integer; reintroduce;\r\n Function IndexOf(AClass: TClass): Integer; reintroduce;\r\n Function First: TClass; reintroduce;\r\n Function Last: TClass; reintroduce;\r\n Procedure Insert(Index: Integer; AClass: TClass); reintroduce;\r\n property Items[Index: Integer]: TClass read GetItems write SetItems; default;\r\n end;\r\n\r\n TOrderedList = class(TObject)\r\n private\r\n FList: TList;\r\n protected\r\n Procedure PushItem(AItem: JSValue); virtual; abstract;\r\n Function PopItem: JSValue; virtual;\r\n Function PeekItem: JSValue; virtual;\r\n property List: TList read FList;\r\n public\r\n constructor Create; reintroduce;\r\n destructor Destroy; override;\r\n Function Count: Integer;\r\n Function AtLeast(ACount: Integer): Boolean;\r\n Function Push(AItem: JSValue): JSValue;\r\n Function Pop: JSValue;\r\n Function Peek: JSValue;\r\n end;\r\n\r\n{ TStack class }\r\n\r\n TStack = class(TOrderedList)\r\n protected\r\n Procedure PushItem(AItem: JSValue); override;\r\n end;\r\n\r\n{ TObjectStack class }\r\n\r\n TObjectStack = class(TStack)\r\n public\r\n Function Push(AObject: TObject): TObject; reintroduce;\r\n Function Pop: TObject; reintroduce;\r\n Function Peek: TObject; reintroduce;\r\n end;\r\n\r\n{ TQueue class }\r\n\r\n TQueue = class(TOrderedList)\r\n protected\r\n Procedure PushItem(AItem: JSValue); override;\r\n end;\r\n\r\n{ TObjectQueue class }\r\n\r\n TObjectQueue = class(TQueue)\r\n public\r\n Function Push(AObject: TObject): TObject; reintroduce;\r\n Function Pop: TObject; reintroduce;\r\n Function Peek: TObject; reintroduce;\r\n end;\r\n\r\n{ ---------------------------------------------------------------------\r\n Hash support, implemented by Dean Zobec\r\n ---------------------------------------------------------------------}\r\n\r\n\r\n { Must return a Longword value in the range 0..TableSize,\r\n usually via a mod operator; }\r\n THashFunction = Function(const S: string; const TableSize: Longword): Longword;\r\n\r\n\r\n { THTNode }\r\n\r\n THTCustomNode = class(TObject)\r\n private\r\n FKey: string;\r\n public\r\n constructor CreateWith(const AString: String);\r\n Function HasKey(const AKey: string): boolean;\r\n property Key: string read FKey;\r\n end;\r\n THTCustomNodeClass = Class of THTCustomNode;\r\n\r\n\r\n { TFPCustomHashTable }\r\n\r\n TFPCustomHashTable = class(TObject)\r\n private\r\n FHashTable: TFPObjectList;\r\n FHashFunction: THashFunction;\r\n FCount: Longword;\r\n Function GetDensity: Longword;\r\n Function GetNumberOfCollisions: Longword;\r\n Procedure SetHashTableSize(const Value: Longword);\r\n Procedure InitializeHashTable;\r\n Function GetVoidSlots: Longword;\r\n Function GetLoadFactor: double;\r\n Function GetAVGChainLen: double;\r\n Function GetMaxChainLength: Longword;\r\n protected\r\n FHashTableSize: Longword;\r\n Function Chain(const index: Longword):TFPObjectList;\r\n Function CreateNewNode(const aKey : string) : THTCustomNode; virtual; abstract;\r\n Procedure AddNode(ANode : THTCustomNode); virtual; abstract;\r\n Function ChainLength(const ChainIndex: Longword): Longword; virtual;\r\n Function FindOrCreateNew(const aKey: string): THTCustomNode; virtual;\r\n Procedure SetHashFunction(AHashFunction: THashFunction); virtual;\r\n Function FindChainForAdd(Const aKey : String) : TFPObjectList;\r\n public\r\n constructor Create; reintroduce;\r\n constructor CreateWith(AHashTableSize: Longword; aHashFunc: THashFunction);\r\n destructor Destroy; override;\r\n Procedure ChangeTableSize(const ANewSize: Longword); virtual;\r\n Procedure Clear; virtual;\r\n Procedure Delete(const aKey: string); virtual;\r\n Function Find(const aKey: string): THTCustomNode;\r\n Function IsEmpty: boolean;\r\n property HashFunction: THashFunction read FHashFunction write SetHashFunction;\r\n property Count: Longword read FCount;\r\n property HashTableSize: Longword read FHashTableSize write SetHashTableSize;\r\n property HashTable: TFPObjectList read FHashTable;\r\n property VoidSlots: Longword read GetVoidSlots;\r\n property LoadFactor: double read GetLoadFactor;\r\n property AVGChainLen: double read GetAVGChainLen;\r\n property MaxChainLength: Longword read GetMaxChainLength;\r\n property NumberOfCollisions: Longword read GetNumberOfCollisions;\r\n property Density: Longword read GetDensity;\r\n end;\r\n\r\n { TFPDataHashTable : Hash table with simple data JSValues }\r\n\r\n THTDataNode = Class(THTCustomNode)\r\n Private\r\n FData: JSValue;\r\n public\r\n property Data: JSValue read FData write FData;\r\n end;\r\n // For compatibility\r\n THTNode = THTDataNode;\r\n\r\n TDataIteratorMethod = Procedure(Item: JSValue; const Key: string; var Continue: Boolean) of object;\r\n TDataIteratorCallBack = Procedure(Item: JSValue; const Key: string; var Continue: Boolean);\r\n\r\n // For compatibility\r\n TIteratorMethod = TDataIteratorMethod;\r\n\r\n TFPDataHashTable = Class(TFPCustomHashTable)\r\n Private\r\n FIteratorCallBack: TDataIteratorCallBack;\r\n Procedure CallbackIterator(Item: JSValue; const Key: string; var Continue: Boolean);\r\n Protected\r\n Function CreateNewNode(const aKey : String) : THTCustomNode; override;\r\n Procedure AddNode(ANode : THTCustomNode); override;\r\n Procedure SetData(const index: string; const AValue: JSValue); virtual;\r\n Function GetData(const index: string):JSValue; virtual;\r\n Function ForEachCall(aMethod: TDataIteratorMethod): THTDataNode; virtual;\r\n Public\r\n Function Iterate(aMethod: TDataIteratorMethod): JSValue; virtual;\r\n Function Iterate(aMethod: TDataIteratorCallBack): JSValue; virtual;\r\n Procedure Add(const aKey: string; AItem: JSValue); virtual;\r\n property Items[const index: string]: JSValue read GetData write SetData; default;\r\n end;\r\n\r\n { TFPStringHashTable : Hash table with simple strings as data }\r\n THTStringNode = Class(THTCustomNode)\r\n Private\r\n FData : String;\r\n public\r\n property Data: String read FData write FData;\r\n end;\r\n \r\n TStringIteratorMethod = Procedure(Item: String; const Key: string; var Continue: Boolean) of object;\r\n TStringIteratorCallback = Procedure(Item: String; const Key: string; var Continue: Boolean);\r\n\r\n TFPStringHashTable = Class(TFPCustomHashTable)\r\n Private\r\n FIteratorCallBack: TStringIteratorCallback;\r\n Procedure CallbackIterator(Item: String; const Key: string; var Continue: Boolean);\r\n Protected\r\n Function CreateNewNode(const aKey : String) : THTCustomNode; override;\r\n Procedure AddNode(ANode : THTCustomNode); override;\r\n Procedure SetData(const Index, AValue: string); virtual;\r\n Function GetData(const index: string): String; virtual;\r\n Function ForEachCall(aMethod: TStringIteratorMethod): THTStringNode; virtual;\r\n Public\r\n Function Iterate(aMethod: TStringIteratorMethod): String; virtual;\r\n Function Iterate(aMethod: TStringIteratorCallback): String; virtual;\r\n Procedure Add(const aKey,aItem: string); virtual;\r\n property Items[const index: string]: String read GetData write SetData; default;\r\n end;\r\n\r\n { TFPStringHashTable : Hash table with simple strings as data }\r\n\r\n\r\n THTObjectNode = Class(THTCustomNode)\r\n Private\r\n FData : TObject;\r\n public\r\n property Data: TObject read FData write FData;\r\n end;\r\n\r\n THTOwnedObjectNode = Class(THTObjectNode)\r\n public\r\n destructor Destroy; override;\r\n end;\r\n\r\n TObjectIteratorMethod = Procedure(Item: TObject; const Key: string; var Continue: Boolean) of object;\r\n TObjectIteratorCallback = Procedure(Item: TObject; const Key: string; var Continue: Boolean);\r\n\r\n TFPObjectHashTable = Class(TFPCustomHashTable)\r\n Private\r\n FOwnsObjects : Boolean;\r\n FIteratorCallBack: TObjectIteratorCallback;\r\n procedure CallbackIterator(Item: TObject; const Key: string; var Continue: Boolean);\r\n Protected\r\n Function CreateNewNode(const aKey : String) : THTCustomNode; override;\r\n Procedure AddNode(ANode : THTCustomNode); override;\r\n Procedure SetData(const Index: string; AObject : TObject); virtual;\r\n Function GetData(const index: string): TObject; virtual;\r\n Function ForEachCall(aMethod: TObjectIteratorMethod): THTObjectNode; virtual;\r\n Public\r\n constructor Create(AOwnsObjects : Boolean = True); reintroduce;\r\n constructor CreateWith(AHashTableSize: Longword; aHashFunc: THashFunction; AOwnsObjects : Boolean = True); reintroduce;\r\n Function Iterate(aMethod: TObjectIteratorMethod): TObject; virtual;\r\n Function Iterate(aMethod: TObjectIteratorCallback): TObject; virtual;\r\n Procedure Add(const aKey: string; AItem : TObject); virtual;\r\n property Items[const index: string]: TObject read GetData write SetData; default;\r\n Property OwnsObjects : Boolean Read FOwnsObjects;\r\n end;\r\n\r\n EDuplicate = class(Exception);\r\n EKeyNotFound = class(Exception);\r\n\r\n Function RSHash(const S: string; const TableSize: Longword): Longword;\r\n\r\n{ ---------------------------------------------------------------------\r\n Bucket lists as in Delphi\r\n ---------------------------------------------------------------------}\r\n\r\n\r\nType\r\n TBucketItem = record\r\n Item, Data: JSValue;\r\n end;\r\n TBucketItemArray = array of TBucketItem;\r\n\r\n TBucket = record\r\n Count : Integer;\r\n Items : TBucketItemArray;\r\n end;\r\n TBucketArray = array of TBucket;\r\n\r\n TBucketProc = Reference to Procedure(AInfo, AItem, AData: JSValue; out AContinue: Boolean);\r\n\r\n{ ---------------------------------------------------------------------\r\n TCustomBucketList\r\n ---------------------------------------------------------------------}\r\n\r\n { TCustomBucketList }\r\n\r\n TCustomBucketList = class(TObject)\r\n private\r\n FBuckets: TBucketArray;\r\n Function GetBucketCount: Integer;\r\n Function GetData(AItem: JSValue): JSValue;\r\n Procedure SetData(AItem: JSValue; const AData: JSValue);\r\n Procedure SetBucketCount(const Value: Integer);\r\n protected\r\n Procedure GetBucketItem(AItem: JSValue; out ABucket, AIndex: Integer);\r\n Function AddItem(ABucket: Integer; AItem, AData: JSValue): JSValue; virtual;\r\n Function BucketFor(AItem: JSValue): Integer; virtual; abstract;\r\n Function DeleteItem(ABucket: Integer; AIndex: Integer): JSValue; virtual;\r\n Procedure Error(Msg : String; Args : Array of Const);\r\n Function FindItem(AItem: JSValue; out ABucket, AIndex: Integer): Boolean; virtual;\r\n property Buckets: TBucketArray read FBuckets;\r\n property BucketCount: Integer read GetBucketCount write SetBucketCount;\r\n public\r\n destructor Destroy; override;\r\n Procedure Clear;\r\n Function Add(AItem, AData: JSValue): JSValue;\r\n Procedure Assign(AList: TCustomBucketList);\r\n Function Exists(AItem: JSValue): Boolean;\r\n Function Find(AItem: JSValue; out AData: JSValue): Boolean;\r\n Function ForEach(AProc: TBucketProc; AInfo: JSValue): Boolean;\r\n Function ForEach(AProc: TBucketProc): Boolean;\r\n Function Remove(AItem: JSValue): JSValue;\r\n property Data[AItem: JSValue]: JSValue read GetData write SetData; default;\r\n end;\r\n\r\n{ ---------------------------------------------------------------------\r\n TBucketList\r\n ---------------------------------------------------------------------}\r\n\r\n\r\n TBucketListSizes = (bl2, bl4, bl8, bl16, bl32, bl64, bl128, bl256);\r\n\r\n { TBucketList }\r\n\r\n TBucketList = class(TCustomBucketList)\r\n private\r\n FBucketMask: Byte;\r\n protected\r\n Function BucketFor(AItem: JSValue): Integer; override;\r\n public\r\n constructor Create(ABuckets: TBucketListSizes = bl16); reintroduce;\r\n end;\r\n\r\n{ ---------------------------------------------------------------------\r\n TObjectBucketList\r\n ---------------------------------------------------------------------}\r\n\r\n { TObjectBucketList }\r\n\r\n TObjectBucketList = class(TBucketList)\r\n protected\r\n Function GetData(AItem: TObject): TObject; reintroduce;\r\n Procedure SetData(AItem: TObject; const AData: TObject); reintroduce;\r\n public\r\n Function Add(AItem, AData: TObject): TObject; reintroduce;\r\n Function Remove(AItem: TObject): TObject; reintroduce;\r\n property Data[AItem: TObject]: TObject read GetData write SetData; default;\r\n end;\r\n\r\n\r\nimplementation\r\n\r\nuses\r\n js;\r\n\r\nResourceString\r\n DuplicateMsg = 'An item with key %0:s already exists';\r\n //KeyNotFoundMsg = 'Method: %0:s key [''%1:s''] not found in container';\r\n NotEmptyMsg = 'Hash table not empty.';\r\n SErrNoSuchItem = 'No item in list for %p';\r\n SDuplicateItem = 'Item already exists in list: %p';\r\n\r\nconst\r\n NPRIMES = 28;\r\n\r\n PRIMELIST: array[0 .. NPRIMES-1] of Longword =\r\n ( 53, 97, 193, 389, 769,\r\n 1543, 3079, 6151, 12289, 24593,\r\n 49157, 98317, 196613, 393241, 786433,\r\n 1572869, 3145739, 6291469, 12582917, 25165843,\r\n 50331653, 100663319, 201326611, 402653189, 805306457,\r\n 1610612741, 3221225473, 4294967291 );\r\n\r\nconstructor TFPObjectList.Create(FreeObjects : boolean);\r\nbegin\r\n Create;\r\n FFreeObjects:=Freeobjects;\r\nend;\r\n\r\ndestructor TFPObjectList.Destroy;\r\nbegin\r\n if (FList <> nil) then\r\n begin\r\n Clear;\r\n FList.Destroy;\r\n end;\r\n inherited Destroy;\r\nend;\r\n\r\nProcedure TFPObjectList.Clear;\r\nvar\r\n i: integer;\r\n O : TObject;\r\nbegin\r\n if FFreeObjects then\r\n for i:=FList.Count-1 downto 0 do\r\n begin\r\n O:=TObject(FList[i]);\r\n FList[i]:=Nil;\r\n O.Free;\r\n end;\r\n FList.Clear;\r\nend;\r\n\r\nconstructor TFPObjectList.Create;\r\nbegin\r\n inherited Create;\r\n FList:=TFPList.Create;\r\n FFreeObjects:=True;\r\nend;\r\n\r\nFunction TFPObjectList.GetCount: integer;\r\nbegin\r\n Result:=FList.Count;\r\nend;\r\n\r\nProcedure TFPObjectList.SetCount(const AValue: integer);\r\nbegin\r\n if FList.Count <> AValue then\r\n FList.Count:=AValue;\r\nend;\r\n\r\nFunction TFPObjectList.GetItem(Index: Integer): TObject;\r\nbegin\r\n Result:=TObject(FList[Index]);\r\nend;\r\n\r\nProcedure TFPObjectList.SetItem(Index: Integer; AObject: TObject);\r\n\r\nVar\r\n O : TObject;\r\n\r\nbegin\r\n if OwnsObjects then\r\n begin\r\n O:=TObject(FList[Index]);\r\n FList[Index]:=AObject;\r\n O.Free;\r\n end\r\n else\r\n FList[index]:=AObject;\r\nend;\r\n\r\nProcedure TFPObjectList.SetCapacity(NewCapacity: Integer);\r\nbegin\r\n FList.Capacity:=NewCapacity;\r\nend;\r\n\r\nFunction TFPObjectList.GetCapacity: integer;\r\nbegin\r\n Result:=FList.Capacity;\r\nend;\r\n\r\nFunction TFPObjectList.Add(AObject: TObject): Integer;\r\nbegin\r\n Result:=FList.Add(AObject);\r\nend;\r\n\r\nProcedure TFPObjectList.Delete(Index: Integer);\r\n\r\nVar\r\n O : TObject;\r\n\r\nbegin\r\n if OwnsObjects then\r\n begin\r\n O:=TObject(FList[Index]);\r\n FList[Index]:=Nil;\r\n O.Free;\r\n end;\r\n FList.Delete(Index);\r\nend;\r\n\r\nProcedure TFPObjectList.Exchange(Index1, Index2: Integer);\r\nbegin\r\n FList.Exchange(Index1, Index2);\r\nend;\r\n\r\nFunction TFPObjectList.Expand: TFPObjectList;\r\nbegin\r\n FList.Expand;\r\n Result:=Self;\r\nend;\r\n\r\nFunction TFPObjectList.Extract(Item: TObject): TObject;\r\nbegin\r\n Result:=TObject(FList.Extract(Item));\r\nend;\r\n\r\nFunction TFPObjectList.Remove(AObject: TObject): Integer;\r\n\r\nVar\r\n O : TObject;\r\n\r\nbegin\r\n Result:=IndexOf(AObject);\r\n if (Result <> -1) then\r\n begin\r\n if OwnsObjects then\r\n begin\r\n O:=TObject(FList[Result]);\r\n FList[Result]:=Nil;\r\n O.Free;\r\n end;\r\n FList.Delete(Result);\r\n end;\r\nend;\r\n\r\nFunction TFPObjectList.IndexOf(AObject: TObject): Integer;\r\nbegin\r\n Result:=FList.IndexOf(JSValue(AObject));\r\nend;\r\n\r\nFunction TFPObjectList.FindInstanceOf(AClass: TClass; AExact: Boolean; AStartAt : Integer): Integer;\r\nvar\r\n I : Integer;\r\nbegin\r\n I:=AStartAt;\r\n Result:=-1;\r\n if AExact then\r\n while (I=Acount)\r\nend;\r\n\r\nFunction TOrderedList.Count: Integer;\r\nbegin\r\n Result:=FList.Count;\r\nend;\r\n\r\nconstructor TOrderedList.Create;\r\nbegin\r\n FList:=Tlist.Create;\r\nend;\r\n\r\ndestructor TOrderedList.Destroy;\r\nbegin\r\n FList.Free;\r\nend;\r\n\r\nFunction TOrderedList.Peek: JSValue;\r\nbegin\r\n if AtLeast(1) then\r\n Result:=PeekItem\r\n else\r\n Result:=nil;\r\nend;\r\n\r\nFunction TOrderedList.PeekItem: JSValue;\r\n\r\nbegin\r\n with Flist do\r\n Result:=Items[Count-1]\r\nend;\r\n\r\nFunction TOrderedList.Pop: JSValue;\r\nbegin\r\n If Atleast(1) then\r\n Result:=PopItem\r\n else\r\n Result:=nil;\r\nend;\r\n\r\nFunction TOrderedList.PopItem: JSValue;\r\nbegin\r\n with FList do\r\n if Count>0 then\r\n begin\r\n Result:=Items[Count-1];\r\n Delete(Count-1);\r\n end\r\n else\r\n Result:=nil;\r\nend;\r\n\r\nFunction TOrderedList.Push(AItem: JSValue): JSValue;\r\nbegin\r\n PushItem(AItem);\r\n Result:=AItem;\r\nend;\r\n\r\n{ TStack }\r\n\r\nProcedure TStack.PushItem(AItem: JSValue);\r\nbegin\r\n FList.Add(AItem);\r\nend;\r\n\r\n{ TObjectStack }\r\n\r\nFunction TObjectStack.Peek: TObject;\r\nbegin\r\n Result:=TObject(inherited Peek);\r\nend;\r\n\r\nFunction TObjectStack.Pop: TObject;\r\nbegin\r\n Result:=TObject(Inherited Pop);\r\nend;\r\n\r\nFunction TObjectStack.Push(AObject: TObject): TObject;\r\nbegin\r\n Result:=TObject(inherited Push(JSValue(AObject)));\r\nend;\r\n\r\n{ TQueue }\r\n\r\nProcedure TQueue.PushItem(AItem: JSValue);\r\nbegin\r\n with FList Do\r\n Insert(0,AItem);\r\nend;\r\n\r\n{ TObjectQueue }\r\n\r\nFunction TObjectQueue.Peek: TObject;\r\nbegin\r\n Result:=TObject(inherited Peek);\r\nend;\r\n\r\nFunction TObjectQueue.Pop: TObject;\r\nbegin\r\n Result:=TObject(inherited Pop);\r\nend;\r\n\r\nFunction TObjectQueue.Push(AObject: TObject): TObject;\r\nbegin\r\n Result:=TObject(inherited Push(JSValue(AObject)));\r\nend;\r\n\r\n\r\n{*****************************************************************************\r\n TFPHashList\r\n*****************************************************************************}\r\n(*\r\n Function FPHash(const s:shortstring):LongWord;\r\n var\r\n p,pmax : PChar;\r\n begin\r\n{$push}\r\n{$Q-}\r\n Result:=0;\r\n p:=@s[1];\r\n pmax:=@s[length(s)+1];\r\n while (p0 then\r\n for i:=1 to Length(S) do\r\n begin\r\n Result:=Result * a + Ord(S[i]);\r\n a:=a * b;\r\n end;\r\n Result:=(Result and $7FFFFFFF) mod TableSize;\r\nend;\r\n\r\n{ THTNode }\r\n\r\nconstructor THTCustomNode.CreateWith(const AString: string);\r\nbegin\r\n inherited Create;\r\n FKey:=AString;\r\nend;\r\n\r\nFunction THTCustomNode.HasKey(const AKey: string): boolean;\r\nbegin\r\n Result:=(AKey=FKey);\r\nend;\r\n\r\n{ TFPCustomHashTable }\r\n\r\nconstructor TFPCustomHashTable.Create;\r\nbegin\r\n CreateWith(196613,@RSHash);\r\nend;\r\n\r\nconstructor TFPCustomHashTable.CreateWith(AHashTableSize: Longword;\r\n aHashFunc: THashFunction);\r\nbegin\r\n inherited Create;\r\n FHashTable:=TFPObjectList.Create(True);\r\n HashTableSize:=AHashTableSize;\r\n FHashFunction:=aHashFunc;\r\nend;\r\n\r\ndestructor TFPCustomHashTable.Destroy;\r\nbegin\r\n FHashTable.Free;\r\n inherited Destroy;\r\nend;\r\n\r\nFunction TFPCustomHashTable.GetDensity: Longword;\r\nbegin\r\n Result:=FHashTableSize - VoidSlots\r\nend;\r\n\r\nFunction TFPCustomHashTable.GetNumberOfCollisions: Longword;\r\nbegin\r\n Result:=FCount -(FHashTableSize - VoidSlots)\r\nend;\r\n\r\nProcedure TFPCustomHashTable.SetHashTableSize(const Value: Longword);\r\nvar\r\n i: Longword;\r\n newSize: Longword;\r\nbegin\r\n if Value <> FHashTableSize then\r\n begin\r\n i:=0;\r\n while (PRIMELIST[i] < Value) and (i < 27) do\r\n Inc(i);\r\n newSize:=PRIMELIST[i];\r\n if Count = 0 then\r\n begin\r\n FHashTableSize:=newSize;\r\n InitializeHashTable;\r\n end\r\n else\r\n ChangeTableSize(newSize);\r\n end;\r\nend;\r\n\r\nProcedure TFPCustomHashTable.InitializeHashTable;\r\nvar\r\n i: LongWord;\r\nbegin\r\n if FHashTableSize>0 Then\r\n for i:=0 to FHashTableSize-1 do\r\n FHashTable.Add(nil);\r\n FCount:=0;\r\nend;\r\n\r\nProcedure TFPCustomHashTable.ChangeTableSize(const ANewSize: Longword);\r\nvar\r\n SavedTable, List: TFPObjectList;\r\n SavedTableSize: Longword;\r\n i, j: Longword;\r\n temp: THTCustomNode;\r\nbegin\r\n SavedTable:=FHashTable;\r\n SavedTableSize:=FHashTableSize;\r\n FHashTableSize:=ANewSize;\r\n FHashTable:=TFPObjectList.Create(True);\r\n InitializeHashTable;\r\n if SavedTableSize>0 Then\r\n for i:=0 to SavedTableSize-1 do\r\n begin\r\n List:=TFPObjectList(SavedTable[i]);\r\n if Assigned(List) then\r\n for j:=0 to List.Count -1 do\r\n begin\r\n temp:=THTCustomNode(List[j]);\r\n AddNode(temp);\r\n end;\r\n end;\r\n SavedTable.Free;\r\nend;\r\n\r\nProcedure TFPCustomHashTable.SetHashFunction(AHashFunction: THashFunction);\r\nbegin\r\n if IsEmpty then\r\n FHashFunction:=AHashFunction\r\n else\r\n raise Exception.Create(NotEmptyMsg);\r\nend;\r\n\r\nFunction TFPCustomHashTable.Find(const aKey: string): THTCustomNode;\r\nvar\r\n hashCode: Longword;\r\n chn: TFPObjectList;\r\n i: Longword;\r\nbegin\r\n hashCode:=FHashFunction(aKey, FHashTableSize);\r\n chn:=Chain(hashCode);\r\n if Assigned(chn) then\r\n if chn.count>0 then\r\n for i:=0 to chn.Count - 1 do\r\n if THTCustomNode(chn[i]).Key=aKey then\r\n Exit(THTCustomNode(chn[i]));\r\n Result:=nil;\r\nend;\r\n\r\nFunction TFPCustomHashTable.FindChainForAdd(Const aKey : String) : TFPObjectList;\r\nvar\r\n hashCode: Longword;\r\n i: Longword;\r\nbegin\r\n hashCode:=FHashFunction(aKey, FHashTableSize);\r\n Result:=Chain(hashCode);\r\n if Assigned(Result) then\r\n begin\r\n if Result.count>0 then\r\n for i:=0 to Result.Count - 1 do\r\n if (THTCustomNode(Result[i]).Key=aKey) then\r\n raise EDuplicate.CreateFmt(DuplicateMsg, [aKey]);\r\n end\r\n else\r\n begin\r\n FHashTable[hashcode]:=TFPObjectList.Create(True);\r\n Result:=Chain(hashCode);\r\n end;\r\n Inc(FCount);\r\nend;\r\n\r\n\r\nProcedure TFPCustomHashTable.Delete(const aKey: string);\r\nvar\r\n hashCode: Longword;\r\n chn: TFPObjectList;\r\n i: Longword;\r\nbegin\r\n hashCode:=FHashFunction(aKey, FHashTableSize);\r\n chn:=Chain(hashCode);\r\n if Assigned(chn) then\r\n if chn.count>0 then\r\n for i:=0 to chn.Count - 1 do\r\n if THTCustomNode(chn[i]).Key=aKey then\r\n begin\r\n chn.Delete(i);\r\n dec(FCount);\r\n Exit;\r\n end;\r\nend;\r\n\r\nFunction TFPCustomHashTable.IsEmpty: boolean;\r\nbegin\r\n Result:=(FCount = 0);\r\nend;\r\n\r\nFunction TFPCustomHashTable.Chain(const index: Longword): TFPObjectList;\r\nbegin\r\n Result:=TFPObjectList(FHashTable[index]);\r\nend;\r\n\r\nFunction TFPCustomHashTable.GetVoidSlots: Longword;\r\nvar\r\n i: Longword;\r\n num: Longword;\r\nbegin\r\n num:=0;\r\n if FHashTableSize>0 then\r\n for i:= 0 to FHashTableSize-1 do\r\n if not Assigned(Chain(i)) then\r\n Inc(num);\r\n Result:=num;\r\nend;\r\n\r\nFunction TFPCustomHashTable.GetLoadFactor: double;\r\nbegin\r\n Result:=Count / FHashTableSize;\r\nend;\r\n\r\nFunction TFPCustomHashTable.GetAVGChainLen: double;\r\nbegin\r\n Result:=Count / (FHashTableSize - VoidSlots);\r\nend;\r\n\r\nFunction TFPCustomHashTable.GetMaxChainLength: Longword;\r\nvar\r\n i: Longword;\r\nbegin\r\n Result:=0;\r\n if FHashTableSize>0 Then\r\n for i:=0 to FHashTableSize-1 do\r\n if ChainLength(i) > Result then\r\n Result:=ChainLength(i);\r\nend;\r\n\r\nFunction TFPCustomHashTable.FindOrCreateNew(const aKey: string): THTCustomNode;\r\nvar\r\n hashCode: Longword;\r\n chn: TFPObjectList;\r\n i: Longword;\r\nbegin\r\n hashCode:=FHashFunction(aKey, FHashTableSize);\r\n chn:=Chain(hashCode);\r\n if Assigned(chn) then\r\n begin\r\n if chn.count>0 then\r\n for i:=0 to chn.Count - 1 do\r\n if (THTCustomNode(chn[i]).Key=aKey) then\r\n Exit(THTNode(chn[i]));\r\n end\r\n else\r\n begin\r\n FHashTable[hashcode]:=TFPObjectList.Create(true);\r\n chn:=Chain(hashcode);\r\n end;\r\n Inc(FCount);\r\n Result:=CreateNewNode(aKey);\r\n chn.Add(Result);\r\nend;\r\n\r\nFunction TFPCustomHashTable.ChainLength(const ChainIndex: Longword): Longword;\r\nbegin\r\n if Assigned(Chain(ChainIndex)) then\r\n Result:=Chain(ChainIndex).Count\r\n else\r\n Result:=0;\r\nend;\r\n\r\nProcedure TFPCustomHashTable.Clear;\r\nvar\r\n i: Longword;\r\nbegin\r\n if FHashTableSize>0 then\r\n for i:=0 to FHashTableSize - 1 do\r\n if Assigned(Chain(i)) then\r\n Chain(i).Clear;\r\n FCount:=0;\r\nend;\r\n\r\n\r\n\r\n{ TFPDataHashTable }\r\n\r\nProcedure TFPDataHashTable.Add(const aKey: string; aItem: JSValue);\r\nvar\r\n chn: TFPObjectList;\r\n NewNode: THtDataNode;\r\nbegin\r\n chn:=FindChainForAdd(akey);\r\n NewNode:=THtDataNode(CreateNewNode(aKey));\r\n NewNode.Data:=aItem;\r\n chn.Add(NewNode);\r\nend;\r\n\r\nFunction TFPDataHashTable.GetData(const Index: string): JSValue;\r\nvar\r\n node: THTDataNode;\r\nbegin\r\n node:=THTDataNode(Find(Index));\r\n if Assigned(node) then\r\n Result:=node.Data\r\n else\r\n Result:=nil;\r\nend;\r\n\r\nProcedure TFPDataHashTable.SetData(const index: string; const AValue: JSValue);\r\nbegin\r\n THTDataNode(FindOrCreateNew(index)).Data:=AValue;\r\nend;\r\n\r\nFunction TFPDataHashTable.CreateNewNode(const aKey : string) : THTCustomNode;\r\n\r\nbegin\r\n Result:=THTDataNode.CreateWith(aKey);\r\nend;\r\n\r\nFunction TFPDataHashTable.Iterate(aMethod: TDataIteratorMethod): JSValue;\r\nvar\r\n N : THTDataNode;\r\nbegin\r\n N:=ForEachCall(AMethod);\r\n if Assigned(N) then\r\n Result:=N.Data\r\n else\r\n Result:=nil;\r\nend;\r\n\r\nProcedure TFPDataHashTable.CallbackIterator(Item: JSValue; const Key: string; var Continue: Boolean);\r\nbegin\r\n FIteratorCallBack(Item, Key, Continue);\r\nend;\r\n\r\nFunction TFPDataHashTable.Iterate(aMethod: TDataIteratorCallBack): JSValue;\r\nbegin\r\n FIteratorCallBack := aMethod;\r\n Result := Iterate(@CallbackIterator);\r\nend;\r\n\r\nFunction TFPDataHashTable.ForEachCall(aMethod: TDataIteratorMethod): THTDataNode;\r\nvar\r\n i, j: Longword;\r\n continue: Boolean;\r\nbegin\r\n Result:=nil;\r\n continue:=true;\r\n if FHashTableSize>0 then\r\n for i:=0 to FHashTableSize-1 do\r\n if Assigned(Chain(i)) then\r\n if chain(i).count>0 then\r\n for j:=0 to Chain(i).Count-1 do\r\n begin\r\n aMethod(THTDataNode(Chain(i)[j]).Data, THTDataNode(Chain(i)[j]).Key, continue);\r\n if not continue then\r\n begin\r\n Result:=THTDataNode(Chain(i)[j]);\r\n Exit;\r\n end;\r\n end;\r\nend;\r\n\r\nProcedure TFPDataHashTable.AddNode(ANode : THTCustomNode);\r\nbegin\r\n with THTDataNode(ANode) do\r\n Add(Key,Data);\r\nend;\r\n\r\n{ TFPStringHashTable }\r\n\r\nProcedure TFPStringHashTable.AddNode(ANode : THTCustomNode);\r\nbegin\r\n with THTStringNode(ANode) do\r\n Add(Key,Data);\r\nend;\r\n\r\nFunction TFPStringHashTable.GetData(const Index: string): String;\r\nvar\r\n node: THTStringNode;\r\nbegin\r\n node:=THTStringNode(Find(Index));\r\n if Assigned(node) then\r\n Result:=node.Data\r\n else\r\n Result:='';\r\nend;\r\n\r\nProcedure TFPStringHashTable.SetData(const index, AValue: string);\r\nbegin\r\n THTStringNode(FindOrCreateNew(index)).Data:=AValue;\r\nend;\r\n\r\nProcedure TFPStringHashTable.Add(const aKey, aItem: string);\r\nvar\r\n chn: TFPObjectList;\r\n NewNode: THtStringNode;\r\nbegin\r\n chn:=FindChainForAdd(akey);\r\n NewNode:=THtStringNode(CreateNewNode(aKey));\r\n NewNode.Data:=aItem;\r\n chn.Add(NewNode);\r\nend;\r\n\r\nFunction TFPStringHashTable.CreateNewNode(const aKey : string) : THTCustomNode;\r\nbegin\r\n Result:=THTStringNode.CreateWith(aKey);\r\nend;\r\n\r\nFunction TFPStringHashTable.Iterate(aMethod: TStringIteratorMethod): String;\r\nvar\r\n N : THTStringNode;\r\nbegin\r\n N:=ForEachCall(AMethod);\r\n if Assigned(N) then\r\n Result:=N.Data\r\n else\r\n Result:='';\r\nend;\r\n\r\nProcedure TFPStringHashTable.CallbackIterator(Item: String; const Key: string; var Continue: Boolean);\r\nbegin\r\n FIteratorCallBack(Item, Key, Continue);\r\nend;\r\n\r\nFunction TFPStringHashTable.Iterate(aMethod: TStringIteratorCallback): String;\r\nbegin\r\n FIteratorCallBack := aMethod;\r\n Result := Iterate(@CallbackIterator);\r\nend;\r\n\r\nFunction TFPStringHashTable.ForEachCall(aMethod: TStringIteratorMethod): THTStringNode;\r\nvar\r\n i, j: Longword;\r\n continue: boolean;\r\nbegin\r\n Result:=nil;\r\n continue:=True;\r\n if FHashTableSize>0 then\r\n for i:=0 to FHashTableSize-1 do\r\n if Assigned(Chain(i)) then\r\n if chain(i).Count>0 then\r\n for j:=0 to Chain(i).Count-1 do\r\n begin\r\n aMethod(THTStringNode(Chain(i)[j]).Data, THTStringNode(Chain(i)[j]).Key, continue);\r\n if not continue then\r\n begin\r\n Result:=THTStringNode(Chain(i)[j]);\r\n Exit;\r\n end;\r\n end;\r\nend;\r\n\r\n{ TFPObjectHashTable }\r\n\r\nProcedure TFPObjectHashTable.AddNode(ANode : THTCustomNode);\r\nbegin\r\n With THTObjectNode(ANode) do\r\n Add(Key,Data);\r\nend;\r\n\r\nFunction TFPObjectHashTable.GetData(const Index: string): TObject;\r\nvar\r\n node: THTObjectNode;\r\nbegin\r\n node:=THTObjectNode(Find(Index));\r\n if Assigned(node) then\r\n Result:=node.Data\r\n else\r\n Result:=nil;\r\nend;\r\n\r\nProcedure TFPObjectHashTable.SetData(const index : string; AObject : TObject);\r\nbegin\r\n THTObjectNode(FindOrCreateNew(index)).Data:=AObject;\r\nend;\r\n\r\nProcedure TFPObjectHashTable.Add(const aKey: string; AItem : TObject);\r\nvar\r\n chn: TFPObjectList;\r\n NewNode: THTObjectNode;\r\nbegin\r\n chn:=FindChainForAdd(akey);\r\n NewNode:=THTObjectNode(CreateNewNode(aKey));\r\n NewNode.Data:=aItem;\r\n chn.Add(NewNode);\r\nend;\r\n\r\nFunction TFPObjectHashTable.CreateNewNode(const aKey : string) : THTCustomNode;\r\nbegin\r\n if OwnsObjects then\r\n Result:=THTOwnedObjectNode.CreateWith(aKey)\r\n else\r\n Result:=THTObjectNode.CreateWith(aKey);\r\nend;\r\n\r\n\r\nFunction TFPObjectHashTable.Iterate(aMethod: TObjectIteratorMethod): TObject;\r\nvar\r\n N : THTObjectNode;\r\nbegin\r\n N:=ForEachCall(AMethod);\r\n if Assigned(N) then\r\n Result:=N.Data\r\n else\r\n Result:=nil;\r\nend;\r\n\r\nProcedure TFPObjectHashTable.CallbackIterator(Item: TObject; const Key: string; var Continue: Boolean);\r\nbegin\r\n FIteratorCallBack(Item, Key, Continue);\r\nend;\r\n\r\nFunction TFPObjectHashTable.Iterate(aMethod: TObjectIteratorCallback): TObject;\r\nbegin\r\n FIteratorCallBack := aMethod;\r\n Result := Iterate(@CallbackIterator);\r\nend;\r\n\r\nFunction TFPObjectHashTable.ForEachCall(aMethod: TObjectIteratorMethod): THTObjectNode;\r\nvar\r\n i, j: Longword;\r\n continue: boolean;\r\nbegin\r\n Result:=nil;\r\n continue:=true;\r\n if FHashTableSize>0 then\r\n for i:=0 to FHashTableSize-1 do\r\n if Assigned(Chain(i)) then\r\n if Chain(i).Count>0 then\r\n for j:=0 to Chain(i).Count-1 do\r\n begin\r\n aMethod(THTObjectNode(Chain(i)[j]).Data, THTObjectNode(Chain(i)[j]).Key, continue);\r\n if not continue then\r\n begin\r\n Result:=THTObjectNode(Chain(i)[j]);\r\n Exit;\r\n end;\r\n end;\r\nend;\r\n\r\nconstructor TFPObjectHashTable.Create(AOwnsObjects : Boolean = True);\r\nbegin\r\n inherited Create;\r\n FOwnsObjects:=AOwnsObjects;\r\nend;\r\n\r\nconstructor TFPObjectHashTable.CreateWith(AHashTableSize: Longword; aHashFunc: THashFunction; AOwnsObjects : Boolean = True);\r\nbegin\r\n inherited CreateWith(AHashTableSize,AHashFunc);\r\n FOwnsObjects:=AOwnsObjects;\r\nend;\r\n\r\ndestructor THTOwnedObjectNode.Destroy;\r\nbegin\r\n FreeAndNil(FData);\r\n inherited;\r\nend;\r\n\r\n{ TCustomBucketList }\r\n\r\nFunction TCustomBucketList.GetData(AItem: JSValue): JSValue;\r\nvar\r\n B,I : Integer;\r\nbegin\r\n GetBucketItem(AItem,B,I);\r\n Result:=FBuckets[B].Items[I].Data;\r\nend;\r\n\r\nFunction TCustomBucketList.GetBucketCount: Integer;\r\nbegin\r\n Result:=Length(FBuckets);\r\nend;\r\n\r\nProcedure TCustomBucketList.SetData(AItem: JSValue; const AData: JSValue);\r\nvar\r\n B,I : Integer;\r\nbegin\r\n GetBucketItem(AItem,B,I);\r\n FBuckets[B].Items[I].Data:=AData;\r\nend;\r\n\r\nProcedure TCustomBucketList.SetBucketCount(const Value: Integer);\r\nbegin\r\n if (Value<>GetBucketCount) then\r\n SetLength(FBuckets,Value);\r\nend;\r\n\r\nProcedure TCustomBucketList.GetBucketItem(AItem: JSValue; out ABucket,\r\n AIndex: Integer);\r\nbegin\r\n if not FindItem(AItem,ABucket,AIndex) then\r\n Error(SErrNoSuchItem,[AItem]);\r\nend;\r\n\r\nFunction TCustomBucketList.AddItem(ABucket: Integer; AItem, AData: JSValue\r\n ): JSValue;\r\nvar\r\n L : Integer;\r\nbegin\r\n L:=Length(FBuckets[ABucket].Items);\r\n if (FBuckets[ABucket].Count=L) then\r\n begin\r\n if L<8 then\r\n L:=8\r\n else\r\n L:=L+L div 2;\r\n SetLength(FBuckets[ABucket].Items,L);\r\n end;\r\n with FBuckets[ABucket] do\r\n begin\r\n Items[Count].Item:=AItem;\r\n Items[Count].Data:=AData;\r\n Result:=AData;\r\n Inc(Count);\r\n end;\r\nend;\r\n\r\nFunction TCustomBucketList.DeleteItem(ABucket: Integer; AIndex: Integer): JSValue;\r\nvar\r\n I,L : Integer;\r\nbegin\r\n Result:=FBuckets[ABucket].Items[AIndex].Data;\r\n if FBuckets[ABucket].Count=1 then\r\n SetLength(FBuckets[ABucket].Items,0)\r\n else\r\n begin\r\n L:=(FBuckets[ABucket].Count-AIndex-1);// No point in moving if last one...\r\n For I:=0 to L-1 do\r\n FBuckets[ABucket].Items[AIndex+I]:=FBuckets[ABucket].Items[AIndex+I+1];\r\n end;\r\n Dec(FBuckets[ABucket].Count);\r\nend;\r\n\r\nProcedure TCustomBucketList.Error(Msg: String; Args: array of Const);\r\nbegin\r\n raise ElistError.CreateFmt(Msg,Args);\r\nend;\r\n\r\nFunction TCustomBucketList.FindItem(AItem: JSValue; out ABucket, AIndex: Integer\r\n ): Boolean;\r\nvar\r\n I : Integer;\r\n B : TBucket;\r\nbegin\r\n ABucket:=BucketFor(AItem);\r\n B:=FBuckets[ABucket];\r\n I:=B.Count-1;\r\n while (I>=0) and (B.Items[I].Item<>AItem) do\r\n Dec(I);\r\n Result:=I>=0;\r\n if Result then\r\n AIndex:=I;\r\nend;\r\n\r\ndestructor TCustomBucketList.Destroy;\r\nbegin\r\n Clear;\r\n inherited Destroy;\r\nend;\r\n\r\nProcedure TCustomBucketList.Clear;\r\nvar\r\n B : TBucket;\r\n I,J : Integer;\r\nbegin\r\n for I:=0 to Length(FBuckets)-1 do\r\n begin\r\n B:=FBuckets[I];\r\n for J:=B.Count-1 downto 0 do\r\n DeleteItem(I,J);\r\n end;\r\n SetLength(FBuckets,0);\r\nend;\r\n\r\nFunction TCustomBucketList.Add(AItem, AData: JSValue): JSValue;\r\nvar\r\n B,I : Integer;\r\nbegin\r\n if FindItem(AItem,B,I) then\r\n Error(SDuplicateItem,[AItem]);\r\n Result:=AddItem(B,AItem,AData);\r\nend;\r\n\r\nProcedure TCustomBucketList.Assign(AList: TCustomBucketList);\r\nvar\r\n I,J : Integer;\r\nbegin\r\n Clear;\r\n SetLength(FBuckets,Length(Alist.FBuckets));\r\n for I:=0 to BucketCount-1 do\r\n begin\r\n SetLength(FBuckets[i].Items,Length(AList.Fbuckets[I].Items));\r\n for J:=0 to AList.Fbuckets[I].Count-1 do\r\n with AList.Fbuckets[I].Items[J] do\r\n AddItem(I,Item,Data);\r\n end;\r\nend;\r\n\r\nFunction TCustomBucketList.Exists(AItem: JSValue): Boolean;\r\nvar\r\n B,I : Integer;\r\nbegin\r\n Result:=FindItem(AItem,B,I);\r\nend;\r\n\r\nFunction TCustomBucketList.Find(AItem: JSValue; out AData: JSValue): Boolean;\r\nvar\r\n B,I : integer;\r\nbegin\r\n Result:=FindItem(AItem,B,I);\r\n if Result then\r\n AData:=FBuckets[B].Items[I].Data;\r\nend;\r\n\r\nFunction TCustomBucketList.ForEach(AProc: TBucketProc): Boolean;\r\nbegin\r\n Result:=Foreach(aProc,Null);\r\nend;\r\n\r\nFunction TCustomBucketList.ForEach(AProc: TBucketProc; AInfo: JSValue): Boolean;\r\nvar\r\n I,J,S : Integer;\r\n Bu : TBucket;\r\nbegin\r\n I:=0;\r\n Result:=True;\r\n S:=GetBucketCount;\r\n while Result and (I= 0) and (Order < FItems.Items.Count) then\r\n begin\r\n FItems.Items.Move(idx, Order);\r\n end;\r\nend;\r\n\r\nprocedure TCustomMainMenu.SetName(const NewName: TComponentName);\r\nbegin\r\n inherited;\r\n\r\n if IsUpdating then\r\n Exit;\r\n if (csLoading in ComponentState) then\r\n Exit;\r\n\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TCustomMainMenu.UpdateElement;\r\nbegin\r\n inherited;\r\n if IsUpdating then\r\n Exit;\r\nend;\r\n\r\n{ TMainMenu }\r\n\r\nfunction TMainMenu.GetMenuSource(Item: TMenuItem): TJSHTMLElement;\r\nvar\r\n I: Integer;\r\n it: TMenuItem;\r\n MenuClass: string;\r\n ElListItem, ElLabel, ElCheckBox, ElSymbol: TJSHTMLElement;\r\n id: Integer;\r\n caption: string;\r\nbegin\r\n Result := nil;\r\n\r\n if Assigned(Item.Items) and (Item.Items.Count > 0) then\r\n begin\r\n Result := TJSHTMLElement(document.createElement('UL'));\r\n if FMainMenu then\r\n begin\r\n FMainMenu := False;\r\n if FIsPopupMenu then\r\n MenuClass := 'popup-menu'\r\n else\r\n MenuClass := 'main-menu';\r\n end\r\n else\r\n MenuClass := 'sub-menu';\r\n\r\n FMenuIndex := FMenuIndex + 1;\r\n\r\n Result.setAttribute('class', MenuClass);\r\n\r\n for I := 0 to Item.Items.Count - 1 do\r\n begin\r\n it := TMenuItem(Item.Items[I]);\r\n\r\n id := id + 1;\r\n\r\n if it.Name = '' then\r\n begin\r\n caption := StringReplace(it.Caption, ' ', '', [rfReplaceAll]);\r\n caption := MakeValidName(caption);\r\n if caption = '' then\r\n caption := 'MenuItem' + IntToStr(id);\r\n it.Name := caption + IntToStr(id);\r\n end;\r\n\r\n if it.Visible then\r\n begin\r\n ElListItem := TJSHTMLElement(document.createElement('LI'));\r\n\r\n if it.Caption <> '-' then\r\n begin\r\n ElLabel := TJSHTMLElement(document.createElement('LABEL'));\r\n if ElementItemClassName <> '' then\r\n ElLabel.setAttribute('class', FElementItemClassName)\r\n else\r\n ElLabel.setAttribute('class', 'drop-label');\r\n ElLabel.setAttribute('title', it.Hint);\r\n if (it.ImageIndex >= 0) and (Appearance.ImageURLs.Count > it.ImageIndex) then\r\n ElLabel.innerHTML := ''\r\n else\r\n if it.Checked then\r\n begin\r\n if it.RadioItem then\r\n ElLabel.innerHTML := ''\r\n else\r\n ElLabel.innerHTML := '';\r\n end;\r\n ElLabel.innerHTML := ElLabel.innerHTML + it.Caption;\r\n end\r\n else\r\n begin\r\n ElLabel := TJSHTMLElement(document.createElement('SPAN'));\r\n ElLabel.setAttribute('class', 'menu-separator');\r\n ElLabel.innerHTML := '';\r\n end;\r\n\r\n if Assigned(it.Items) and (it.Items.Count > 0) then\r\n begin\r\n ElSymbol := TJSHTMLElement(document.createElement('SPAN'));\r\n ElSymbol.setAttribute('class', 'drop-icon');\r\n// ElSymbol.innerHTML := '>';\r\n// ElSymbol.innerHTML := '►';\r\n// ElSymbol.innerHTML := '▼';\r\n ElSymbol.innerHTML := Appearance.SubmenuIndicator;\r\n\r\n ElLabel.setAttribute('for', 'sm' + IntToStr(FMenuIndex));\r\n ElLabel.appendChild(ElSymbol);\r\n\r\n if not it.Enabled then\r\n ElLabel.style.setProperty('color', 'gray');\r\n\r\n ElCheckBox := TJSHTMLElement(document.createElement('INPUT'));\r\n ElCheckBox.setAttribute('type', 'checkbox');\r\n ElCheckBox.setAttribute('id', 'sm' + IntToStr(FMenuIndex));\r\n\r\n ElListItem.appendChild(ElLabel);\r\n ElListItem.appendChild(ElCheckBox);\r\n if it.Enabled then\r\n ElListItem.appendChild(GetMenuSource(it));\r\n end\r\n else\r\n begin\r\n ElLabel.setAttribute('for', GetID + 'tm');\r\n ElLabel.setAttribute('id', it.Name);\r\n if it.Enabled then\r\n begin\r\n if (MenuClass = 'sub-menu') then\r\n begin\r\n //Hide the sub-menu onclick and then revert to the initial state to\r\n //make it re-appear when hovering\r\n if it.Enabled then\r\n ElLabel.setAttribute('onMouseUp', GetID + 'MenuClick(this);');\r\n end;\r\n ElLabel.addEventListener('click', @HandleChange);\r\n end\r\n else\r\n ElLabel.style.setProperty('color', 'gray');\r\n\r\n ElListItem.appendChild(ElLabel);\r\n end;\r\n\r\n Result.appendChild(ElListItem);\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TMainMenu.GetItemByName(AMenu: TMenuItem; Name: string): TMenuItem;\r\nvar\r\n I: Integer;\r\n it: TMenuItem;\r\nbegin\r\n Result := nil;\r\n\r\n if Assigned(AMenu.Items) then\r\n begin\r\n for I := 0 to AMenu.Items.Count - 1 do\r\n begin\r\n it := TMenuItem(AMenu.Items.Items[I]);\r\n\r\n if it.Name = Name then\r\n begin\r\n Result := it;\r\n if Assigned(it.OnClick) then\r\n Result.OnClick := it.OnClick;\r\n Exit;\r\n end;\r\n\r\n if not Assigned(Result) then\r\n Result := GetItemByName(it, Name);\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TMainMenu.HandleChange(Event: TJSEvent): Boolean;\r\nvar\r\n h: TJSHTMLElement;\r\n it: TMenuItem;\r\nbegin\r\n Result := True;\r\n\r\n if FIsPopupMenu then\r\n begin\r\n FShowPopup := False;\r\n UpdateElement;\r\n end;\r\n\r\n h := TJSHTMLElement(Event.target);\r\n\r\n // click on child element in menu item\r\n if not h.hasAttribute('id') then\r\n h := TJSHTMLElement(h.parentElement);\r\n\r\n it := GetItemByName(Items, h.id);\r\n\r\n if Assigned(it) then\r\n begin\r\n if it.AutoCheck then\r\n it.Checked := not it.Checked;\r\n\r\n if Assigned(OnChange) then\r\n OnChange(Self, it, False);\r\n\r\n it.Click;\r\n end;\r\nend;\r\n\r\nfunction TMainMenu.CreateElement: TJSElement;\r\nvar\r\n LLabel: TJSHTMLElement;\r\nbegin\r\n if (csDesigning in ComponentState) then\r\n begin\r\n Result := document.createElement('DIV');\r\n LLabel := TJSHTMLElement(document.createElement('DIV'));\r\n LLabel.innerHTML := 'TWebMainMenu';\r\n BorderStyle := bsSingle;\r\n LLabel['align'] := 'center';\r\n LLabel.style.setProperty('border','1px solid gray');\r\n LLabel.style.setProperty('vertical-align','middle');\r\n LLabel.style.setProperty('display','table-cell');\r\n Result.appendChild(LLabel);\r\n end\r\n else\r\n begin\r\n Result := document.createElement('DIV');\r\n if FIsPopupMenu then\r\n Result.setAttribute('onMouseLeave', GetID + 'MenuOut(this);');\r\n end;\r\nend;\r\n\r\nprocedure TMainMenu.CreateInitialize;\r\nbegin\r\n inherited;\r\n FAppearance := TMainMenuAppearance.Create(Self);\r\n FContainer := nil;\r\n FMainMenu := True;\r\n FMenuIndex := 0;\r\n FIsPopupMenu := False;\r\n FShowPopup := False;\r\n\r\n Top := 0;\r\n Left := 0;\r\n Width := 100;\r\n if (csDesigning in ComponentState) then\r\n begin\r\n ElementPosition := epRelative;\r\n WidthPercent := 100;\r\n WidthStyle := ssPercent;\r\n end;\r\nend;\r\n\r\ndestructor TMainMenu.Destroy;\r\nbegin\r\n FAppearance.Free;\r\n inherited;\r\nend;\r\n\r\nprocedure TMainMenu.Loaded;\r\nbegin\r\n inherited;\r\n\r\n if IsUpdating then\r\n Exit;\r\n\r\n if not Assigned(Container) and (Parent is TCustomForm) and ((Parent as TCustomForm).Menu = Self) then\r\n begin\r\n FContainer := Parent;\r\n end;\r\n\r\n if Assigned(ElementHandle) then\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TMainMenu.UpdateElement;\r\nvar\r\n MenuStyle, MenuColorStyle, MenuResponsiveStyle, MenuImageSize, ShowPopup: string;\r\n ElHandle, ElLabel, ElSpan, ElIcon, ElCheckBox, ElStyle, ElScript, ElItems: TJSHTMLElement;\r\nbegin\r\n inherited;\r\n\r\n if IsUpdating then\r\n Exit;\r\n\r\n if not Assigned(ElementHandle) and not Assigned(Container) then\r\n Exit;\r\n\r\n if Assigned(Container) then\r\n begin\r\n ElHandle := Container.ElementHandle;\r\n Visible := False;\r\n end\r\n else\r\n begin\r\n ElHandle := ElementHandle;\r\n ElHandle.style.setProperty('top', IntToStr(Top)+'px');\r\n ElHandle.style.setProperty('left', IntToStr(Left)+'px');\r\n if (csDesigning in ComponentState) and not Assigned(Container) then\r\n TJSHTMLElement(ElementHandle).style.setProperty('background-color','silver');\r\n end;\r\n\r\n FMenu := TJSHTMLElement(ElHandle.firstChild);\r\n if Assigned(FMenu) then\r\n FMenu.parentElement.removeChild(FMenu);\r\n\r\n if (csDestroying in ComponentState) then\r\n Exit;\r\n\r\n FMenu := TJSHTMLElement(document.createElement('NAV'));\r\n FMenu.setAttribute('id', GetID + 'menu');\r\n FMenu.innerHTML := '';\r\n\r\n if Assigned(Container) then\r\n begin\r\n FMenu.style.setProperty('top', '0');\r\n FMenu.style.setProperty('left', '0');\r\n FMenu.style.setProperty('position', 'absolute');\r\n FMenu.style.setProperty('width', '100%');\r\n FMenu.style.setProperty('z-index', '999997');\r\n end;\r\n\r\n //if not Assigned(Container) then\r\n begin\r\n //ElHandle.innerHTML := '';\r\n ElHandle.style.setProperty('overflow', 'visible');\r\n end;\r\n\r\n if Appearance.HamburgerMenu.Visible <> hmAlways then\r\n begin\r\n if FShowPopup then\r\n ShowPopup := 'block'\r\n else\r\n ShowPopup := 'none';\r\n\r\n MenuResponsiveStyle :=\r\n ' #' + GetID + 'menu .main-menu {'#13\r\n + ' display: block;'#13\r\n + ' }'#13\r\n\r\n + ' #' + GetID + 'menu #toggle-menu {'#13\r\n + ' display: none;'#13\r\n + ' }'#13\r\n\r\n + ' #' + GetID + 'menu ul span.drop-label {'#13\r\n + ' display: inline-block;'#13\r\n + ' }'#13\r\n\r\n + ' #' + GetID + 'menu li {'#13\r\n + ' float: left;'#13\r\n + ' border-width: 0 1px 0 0;'#13\r\n + ' }'#13\r\n\r\n + ' #' + GetID + 'menu .popup-menu li, '#13\r\n + ' #' + GetID + 'menu .sub-menu li {'#13\r\n + ' float: none;'#13\r\n + ' }'#13\r\n\r\n + ' #' + GetID + 'menu .sub-menu {'#13\r\n + ' top: 100%;'#13\r\n + ' }'#13\r\n\r\n + ' #' + GetID + 'menu .popup-menu { '#13\r\n + ' top: 0;'#13\r\n + ' }'#13\r\n\r\n + ' #' + GetID + 'menu .popup-menu, '#13\r\n + ' #' + GetID + 'menu .sub-menu {'#13\r\n + ' border-width: 0;'#13\r\n + ' margin: 0;'#13\r\n + ' position: absolute;'#13\r\n + ' left: 0;'#13\r\n + ' min-width: 12em;'#13\r\n + ' z-index: 9999999;'#13\r\n + '\t white-space: nowrap;'#13\r\n + ' }'#13\r\n\r\n + ' #' + GetID + 'menu .sub-menu {'#13\r\n + ' top: 100%;'#13\r\n + ' }'#13\r\n\r\n + ' #' + GetID + 'menu .popup-menu { '#13\r\n + ' display: ' + ShowPopup + ';'#13\r\n + ' }'#13\r\n\r\n + ' #' + GetID + 'menu .sub-menu,'#13\r\n + ' #' + GetID + 'menu input[type=\"checkbox\"]:checked + .popup-menu,'#13\r\n + ' #' + GetID + 'menu input[type=\"checkbox\"]:checked + .sub-menu {'#13\r\n + ' display: none;'#13\r\n + ' }'#13\r\n\r\n + ' #' + GetID + 'menu .popup-menu li, '#13\r\n + ' #' + GetID + 'menu .sub-menu li {'#13\r\n + ' border-width: 1px;'#13\r\n + ' }'#13\r\n\r\n + ' #' + GetID + 'menu .popup-menu .sub-menu, '#13\r\n + ' #' + GetID + 'menu .sub-menu .sub-menu {'#13\r\n + ' top: 0;'#13\r\n + ' left: 100%;'#13\r\n + ' }'#13\r\n\r\n + ' #' + GetID + 'menu li:hover > input[type=\"checkbox\"] + .popup-menu, '#13\r\n + ' #' + GetID + 'menu li:hover > input[type=\"checkbox\"] + .sub-menu {'#13\r\n + ' display: block;'#13\r\n + ' }'#13;\r\n\r\n if Appearance.HamburgerMenu.Visible = hmResponsive then\r\n begin\r\n MenuResponsiveStyle :=\r\n '@media only screen and (min-width: ' + IntToStr(Appearance.HamburgerMenu.ResponsiveMaxWidth) + 'px) {'#13\r\n + MenuResponsiveStyle\r\n + '}';\r\n end;\r\n end;\r\n\r\n if Appearance.ImageSize > 0 then\r\n begin\r\n MenuImageSize := ' width: ' + IntToStr(Appearance.ImageSize) + 'px;'#13\r\n + ' height: ' + IntToStr(Appearance.ImageSize) + 'px;'#13\r\n ;\r\n end;\r\n\r\n MenuStyle :=\r\n '#' + GetID + 'menu ul {'#13\r\n + ' margin: 0;'#13\r\n + ' padding: 0;'#13\r\n + '}'#13\r\n\r\n + '#' + GetID + 'menu .main-menu {'#13\r\n + ' display: none;'#13\r\n + '}'#13\r\n\r\n + '#' + GetID + 'menu .popup-menu {'#13\r\n + ' display: block;'#13\r\n + '}'#13\r\n\r\n + '#' + GetID + 'menu label img.icon,' +\r\n '#' + GetID + 'menu label span.checked {'#13\r\n + MenuImageSize\r\n + ' margin-right: 10px;'#13\r\n + ' pointer-events: none;'#13\r\n// + ' float: left;'#13\r\n + '}'#13\r\n\r\n + '#' + GetID + 'tm:checked + .main-menu {'#13\r\n + ' display: block;'#13\r\n + '}'#13\r\n\r\n + '#' + GetID + 'menu input[type=\"checkbox\"],'#13\r\n + '#' + GetID + 'menu ul span.drop-label {'#13\r\n + ' display: none;'#13\r\n + '}'#13\r\n\r\n + '#' + GetID + 'menu li,'#13\r\n + '#' + GetID + 'menu #toggle-menu,'#13\r\n + '#' + GetID + 'menu .popup-menu,'#13\r\n + '#' + GetID + 'menu .sub-menu {'#13\r\n + ' border-width: 1px;'#13\r\n + ' border-style: solid;'#13\r\n + ' border-color: rgba(0, 0, 0, .05);'#13\r\n + ' border-bottom: 0px;'#13\r\n + ' border-top: 0px;'#13\r\n + '}'#13\r\n\r\n + '#' + GetID + 'menu li,'#13\r\n + '#' + GetID + 'menu #toggle-menu {'#13\r\n + ' border-width: 0 0 3px;'#13\r\n + '}'#13\r\n\r\n + '#' + GetID + 'menu .popup-menu,'#13\r\n + '#' + GetID + 'menu .sub-menu {'#13\r\n + ' border-width: 1px 1px 0;'#13\r\n + ' margin: 0 1em;'#13\r\n + '}'#13\r\n\r\n + '#' + GetID + 'menu .popup-menu li:first-child,'#13\r\n + '#' + GetID + 'menu .sub-menu li:first-child {'#13\r\n + ' border-top: 1px solid;'#13\r\n + ' border-color: rgba(0, 0, 0, .05);'#13\r\n + '}'#13\r\n\r\n + '#' + GetID + 'menu .popup-menu li:last-child,'#13\r\n + '#' + GetID + 'menu .sub-menu li:last-child {'#13\r\n + ' border-bottom: 1px solid;'#13\r\n + ' border-color: rgba(0, 0, 0, .05);'#13\r\n + '}'#13\r\n\r\n + '#' + GetID + 'menu li,'#13\r\n + '#' + GetID + 'menu #toggle-menu,'#13\r\n + '#' + GetID + 'menu li label {'#13\r\n + ' position: relative;'#13\r\n + ' display: block;'#13\r\n + '}'#13\r\n\r\n + '#' + GetID + 'menu #toggle-menu,'#13\r\n + '#' + GetID + 'menu li label { '#13\r\n + ' padding: 0.75em 1.5em;'#13\r\n + ' text-decoration: none;'#13\r\n + '}'#13\r\n\r\n + '#' + GetID + 'menu li span.menu-separator { '#13\r\n + ' display: block;'#13\r\n + ' width: 100%;'#13\r\n + ' height: 1px;'#13\r\n + ' background-color: rgba(0, 0, 0, .05);'#13\r\n + '}'#13\r\n\r\n + '#' + GetID + 'menu .popup-menu, '#13\r\n + '#' + GetID + 'menu .sub-menu {'#13\r\n + ' display: none;'#13\r\n + '}'#13\r\n\r\n + '#' + GetID + 'menu input[type=\"checkbox\"]:checked + .popup-menu,'#13\r\n + '#' + GetID + 'menu input[type=\"checkbox\"]:checked + .sub-menu {'#13\r\n + ' display: block;'#13\r\n + ' z-index: 3000;'#13\r\n + '}'#13\r\n\r\n + '#' + GetID + 'menu span.drop-icon {'#13\r\n// + ' float: right;'#13\r\n + ' margin-left: 10px;'\r\n + '}'#13\r\n\r\n + '#' + GetID + 'menu span.hamburger-icon {'#13\r\n + ' float: right;'#13\r\n + ' padding: 0;'#13\r\n + ' margin: 0;'#13\r\n + ' font-weight: 900;'#13\r\n + '}'#13\r\n\r\n + '@media only screen and (max-width: 64em) and (min-width: 52.01em) {'#13\r\n + ' #' + GetID + 'menu li {'#13\r\n + ' width: auto;'#13\r\n + ' }'#13\r\n\r\n + ' #' + GetID + 'menu .sub-menu li {'#13\r\n + ' width: auto;'#13\r\n + ' }'#13\r\n + '}'#13;\r\n\r\n MenuColorStyle := '';\r\n\r\n if ElementClassName = '' then\r\n begin\r\n MenuColorStyle :=\r\n '#' + GetID + 'menu .popup-menu, '#13\r\n + '#' + GetID + 'menu .sub-menu {'#13\r\n + ' background-color: ' + ColorToHtml(Appearance.BackgroundColor) + ';'#13\r\n + '}'#13\r\n\r\n + '@media only screen and (max-width: 64em) and (min-width: 52.01em) {'#13\r\n + '#' + GetID + 'menu .sub-menu {'#13\r\n + ' background-color: ' + ColorToHtml(Appearance.HamburgerMenu.BackgroundColor) + ';'#13\r\n + '}'#13\r\n + '}'#13\r\n\r\n + '#' + GetID + 'menu li,'#13\r\n + '#' + GetID + 'menu #toggle-menu,'#13\r\n + '#' + GetID + 'menu li label {'#13\r\n + '}'#13\r\n\r\n + '#' + GetID + 'menu #toggle-menu {'#13\r\n + ' background-color: ' + ColorToHtml(Appearance.HamburgerMenu.BackgroundColor) + ';'#13\r\n + ' color: ' + ColorToHtml(Appearance.HamburgerMenu.CaptionColor) + ';'#13\r\n + '}'#13\r\n\r\n + '#' + GetID + 'menu .main-menu li label {'#13\r\n + ' background-color: ' + ColorToHtml(Appearance.BackgroundColor) + ';'#13\r\n + '}'#13\r\n\r\n + '#' + GetID + 'menu li label:hover {'#13\r\n + ' background-color: ' + ColorToHtml(Appearance.HoverColor) + ';'#13\r\n + ' color: ' + ColorToHtml(Appearance.HoverFontColor) + ';'#13\r\n + '}'#13\r\n\r\n + '#' + GetID + 'menu .popup-menu label:hover, '#13\r\n + '#' + GetID + 'menu .sub-menu label:hover {'#13\r\n + ' background-color: ' + ColorToHtml(Appearance.HoverColor) + ';'#13\r\n + ' color: ' + ColorToHtml(Appearance.HoverFontColor) + ';'#13\r\n + '}'#13;\r\n end;\r\n\r\n MenuStyle := MenuStyle\r\n + MenuColorStyle\r\n + MenuResponsiveStyle\r\n ;\r\n\r\n FMainMenu := True;\r\n FMenuIndex := 0;\r\n\r\n ElStyle := TJSHTMLElement(document.createElement('STYLE'));\r\n ElStyle.innerHTML := MenuStyle;\r\n\r\n ElScript := TJSHTMLElement(document.createElement('SCRIPT'));\r\n ElScript.innerHTML := 'function ' + GetID + 'MenuClick(ctrl){'\r\n + ' el = ctrl.parentElement.parentElement;'\r\n + ' el.style.display = \"none\";'\r\n + ' setTimeout(function(){el.style.removeProperty(\"display\")}, 25);'\r\n + '}'\r\n + 'function ' + GetID + 'MenuOut(ctrl){'\r\n + ' menuel = document.getElementById(\"' + GetID + '\");'\r\n + ' if(menuel) { '\r\n + ' popupel = menuel.getElementsByClassName(\"popup-menu\");'\r\n + ' if(popupel) '\r\n + ' setTimeout(function(){popupel[0].style.display = \"none\"}, 25);'\r\n + ' }'\r\n + '}';\r\n\r\n ElLabel := TJSHTMLElement(document.createElement('LABEL'));\r\n ElLabel.setAttribute('for', GetID + 'tm');\r\n ElLabel.setAttribute('id', 'toggle-menu');\r\n ElLabel.innerHTML := Appearance.HamburgerMenu.Caption;\r\n\r\n ElSpan := TJSHTMLElement(document.createElement('SPAN'));\r\n if ElementItemClassName <> '' then\r\n ElSpan.setAttribute('class', ElementItemClassName)\r\n else\r\n ElSpan.setAttribute('class', 'drop-label');\r\n ElLabel.appendChild(ElSpan);\r\n\r\n ElIcon := TJSHTMLElement(document.createElement('SPAN'));\r\n ElIcon.setAttribute('class', 'hamburger-icon');\r\n// ElIcon.innerHTML := '>';\r\n ElIcon.innerHTML := '☰';\r\n// ElIcon.innerHTML := '';\r\n ElSpan.appendChild(ElIcon);\r\n\r\n ElCheckBox := TJSHTMLElement(document.createElement('INPUT'));\r\n ElCheckBox.setAttribute('type', 'checkbox');\r\n ElCheckBox.setAttribute('id', GetID + 'tm');\r\n\r\n FMenu.appendChild(ElStyle);\r\n FMenu.appendChild(ElScript);\r\n FMenu.appendChild(ElLabel);\r\n FMenu.appendChild(ElCheckBox);\r\n\r\n ElItems := GetMenuSource(Items);\r\n if ElItems <> nil then\r\n FMenu.appendChild(ElItems);\r\n ElHandle.appendChild(FMenu);\r\nend;\r\n\r\n{ TMenuItem }\r\n\r\nprocedure TMenuItem.Assign(Source: TPersistent);\r\nvar\r\n i: integer;\r\n srcmenu,mnu: TMenuItem;\r\n pm: TCustomMainMenu;\r\n\r\nbegin\r\n if (Source is TMenuItem) then\r\n begin\r\n srcmenu := (Source as TMenuItem);\r\n\r\n FAutoCheck := srcmenu.AutoCheck;\r\n FAutoHotkeys := srcmenu.AutoHotkeys;\r\n FAutoLineReduction:= srcmenu.AutoLineReduction;\r\n FBreak := srcmenu.Break;\r\n FCaption := srcmenu.Caption;\r\n FChecked := srcmenu.Checked;\r\n FDefault := srcmenu.Default;\r\n FEnabled := srcmenu.Enabled;\r\n FGroupIndex := srcmenu.GroupIndex;\r\n FHelpContext := srcmenu.HelpContext;\r\n FHint := srcmenu.Hint;\r\n FImageIndex := srcmenu.ImageIndex;\r\n FRadioItem := srcmenu.RadioItem;\r\n FShortCut := srcmenu.ShortCut;\r\n FVisible := srcmenu.Visible;\r\n FElementClassName := srcmenu.ElementClassName;\r\n\r\n pm := GetParentMenu;\r\n\r\n if Assigned(Parent) then\r\n Name := pm.GetUniqueName(srcmenu.Caption);\r\n\r\n if Assigned(srcmenu.Items) then\r\n begin\r\n if Assigned(FItems) then\r\n begin\r\n for I := FItems.Count - 1 downto 0 do\r\n begin\r\n RemoveItem(GetParentMenu.Parent, TComponent(FItems[I]));\r\n end;\r\n FItems.Clear;\r\n end\r\n else\r\n FItems := TMenuItemList.Create;\r\n\r\n for i := 0 to srcmenu.Items.Count - 1 do\r\n begin\r\n // create with form owner\r\n mnu := TMenuItem.Create(pm.Owner);\r\n mnu.FParentMenu := pm;\r\n mnu.FParentItem := Self;\r\n mnu.Assign(TMenuItem(srcmenu.Items[i]));\r\n FItems.Add(mnu);\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TMenuItem.BeginUpdate;\r\nbegin\r\n inc(FUpdateCount);\r\nend;\r\n\r\nprocedure TMenuItem.Clear;\r\nvar\r\n i: integer;\r\n mnu: TMenuItem;\r\nbegin\r\n for i := Count - 1 downto 0 do\r\n begin\r\n mnu := TMenuItem(FItems[i]);\r\n if Assigned(mnu.Items) then\r\n mnu.Items.Clear;\r\n mnu.Free;\r\n end;\r\nend;\r\n\r\nprocedure TMenuItem.Click;\r\nbegin\r\n if Assigned(OnClick) then\r\n OnClick(Self);\r\nend;\r\n\r\nconstructor TMenuItem.Create(AOwner: TComponent);\r\nbegin\r\n FParentMenu := nil;\r\n\r\n if AOwner is TMainMenu then\r\n FParentMenu := AOwner;\r\n\r\n inherited Create(AOwner);\r\n\r\n FAutoHotkeys := maParent;\r\n FAutoLineReduction := maParent;\r\n FImageIndex := -1;\r\n FHint := '';\r\n FCaption := 'MenuItem';\r\n FChecked := False;\r\n FEnabled := True;\r\n FDefault := False;\r\n FRadioItem := False;\r\n FVisible := True;\r\n FOwner := TMenuItem(AOwner);\r\nend;\r\n\r\ndestructor TMenuItem.Destroy;\r\nvar\r\n i: integer;\r\n pm: TCustomMainMenu;\r\n mnu: TMenuItem;\r\nbegin\r\n pm := GetParentMenu;\r\n\r\n // delete item from the parent item list\r\n if Assigned(Parent) and Assigned(pm) then\r\n begin\r\n pm.BeginUpdate;\r\n\r\n for i := TMenuItem(Parent).Items.Count - 1 downto 0 do\r\n begin\r\n if (TMenuItem(Parent).Items[i] = Self) then\r\n begin\r\n TMenuItem(Parent).Items.Delete(i);\r\n end;\r\n end;\r\n\r\n pm.EndUpdate;\r\n end;\r\n\r\n // delete its childs\r\n if Assigned(Items) then\r\n begin\r\n for i := Items.Count - 1 downto 0 do\r\n begin\r\n mnu := TMenuItem(Items[i]);\r\n mnu.FParentItem := nil;\r\n mnu.Free;\r\n Items.Delete(i);\r\n end;\r\n end;\r\n\r\n inherited;\r\nend;\r\n\r\nprocedure TMenuItem.EndUpdate;\r\nbegin\r\n if (FUpdateCount > 0) then\r\n begin\r\n dec(FUpdateCount);\r\n\r\n if FUpdateCount = 0 then\r\n GetParentMenu.UpdateElement;\r\n end;\r\nend;\r\n\r\nprocedure TMenuItem.GetChildren(Proc: TGetChildProc; Root: TComponent);\r\nvar\r\n I: Integer;\r\nbegin\r\n if Assigned(Items) then\r\n for I := 0 to Items.Count - 1 do Proc(TMenuItem(Items[I]));\r\nend;\r\n\r\nfunction TMenuItem.GetCount: integer;\r\nbegin\r\n if FItems = nil then\r\n Result := 0\r\n else\r\n Result := FItems.Count;\r\nend;\r\n\r\nfunction TMenuItem.GetMenuItem(AIndex: integer): TMenuItem;\r\nbegin\r\n Result := Items[AIndex];\r\nend;\r\n\r\nfunction TMenuItem.GetOwner: TPersistent;\r\nbegin\r\n Result := FOwner;\r\nend;\r\n\r\nfunction TMenuItem.GetParentMenu: TCustomMainMenu;\r\nvar\r\n AOwner: TComponent;\r\nbegin\r\n Result := nil;\r\n\r\n AOwner := FParentMenu;\r\n\r\n while Assigned(AOwner) and (AOwner is TMenuItem) do\r\n begin\r\n AOwner := TMenuItem(AOwner).FParentMenu;\r\n end;\r\n\r\n if Assigned(AOwner) then\r\n Result := TCustomMainMenu(AOwner);\r\nend;\r\n\r\nprocedure TMenuItem.Insert(Index: Integer; Item: TMenuItem);\r\nbegin\r\n if FItems = nil then\r\n FItems := TMenuItemList.Create;\r\n FItems.Insert(Index, Item);\r\n Item.FParentItem := Self;\r\n\r\n if Assigned(Item.GetParentMenu) then\r\n Item.GetParentMenu.UpdateElement;\r\nend;\r\n\r\nfunction TMenuItem.IsChild(Item: TMenuItem): boolean;\r\nvar\r\n i: integer;\r\nbegin\r\n Result := false;\r\n if not Assigned(Items) then\r\n Exit;\r\n\r\n for i := 0 to Items.Count - 1 do\r\n begin\r\n if (Items[i] = Item) then\r\n begin\r\n Result := true;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TMenuItem.RemoveItem(AOwner, AItem: TComponent);\r\nvar\r\n I: Integer;\r\nbegin\r\n if Assigned(TMenuItem(AItem).Items) then\r\n begin\r\n for I := TMenuItem(AItem).Items.Count - 1 downto 0 do\r\n RemoveItem(AOwner, TComponent(TMenuItem(AItem).Items[I]));\r\n end;\r\n AOwner.RemoveComponent(AItem);\r\nend;\r\n\r\nprocedure TMenuItem.Add(Item: TMenuItem);\r\nbegin\r\n Insert(GetCount, Item);\r\nend;\r\n\r\nprocedure TMenuItem.SetCaption(const Value: string);\r\nvar\r\n pm: TCustomMainMenu;\r\nbegin\r\n FCaption := Value;\r\n pm := GetParentMenu;\r\n if Assigned(pm) then\r\n pm.UpdateElement;\r\nend;\r\n\r\nprocedure TMenuItem.SetChecked(const Value: Boolean);\r\nvar\r\n pm: TCustomMainMenu;\r\n Item, OtherItem: TMenuItem;\r\n MenuOwner: TComponent;\r\n I: Integer;\r\nbegin\r\n if FChecked <> Value then\r\n begin\r\n FChecked := Value;\r\n MenuOwner := FParentMenu;\r\n if Assigned(MenuOwner) then\r\n begin\r\n if (MenuOwner is TMenuItem) and Value then\r\n begin\r\n Item := TMenuItem(MenuOwner);\r\n for I := 0 to Item.Items.Count - 1 do\r\n begin\r\n OtherItem := TMenuItem(Item.Items[I]);\r\n if (OtherItem.RadioItem) and (OtherItem <> Self) then\r\n OtherItem.Checked := False;\r\n end;\r\n end;\r\n\r\n while not (MenuOwner is TCustomMainMenu) and Assigned(MenuOwner) do\r\n begin\r\n MenuOwner := MenuOwner.Owner;\r\n end;\r\n end;\r\n\r\n pm := GetParentMenu;\r\n if Assigned(pm) then\r\n pm.UpdateElement;\r\n end;\r\nend;\r\n\r\nprocedure TMenuItem.SetChildOrder(Child: TComponent; Order: Integer);\r\nvar\r\n idx: integer;\r\nbegin\r\n idx := FItems.IndexOf(Child);\r\n if (idx >= 0) and (Order < FItems.Count) then\r\n begin\r\n FItems.Move(idx, Order);\r\n end;\r\nend;\r\n\r\nprocedure TMenuItem.SetEnabled(const Value: Boolean);\r\nbegin\r\n if FEnabled <> Value then\r\n begin\r\n FEnabled := Value;\r\n GetParentMenu.UpdateElement;\r\n end;\r\nend;\r\n\r\nprocedure TMenuItem.SetImageIndex(const Value: Integer);\r\nvar\r\n pm: TCustomMainMenu;\r\nbegin\r\n FImageIndex := Value;\r\n pm := GetParentMenu;\r\n if Assigned(pm) then\r\n pm.UpdateElement;\r\nend;\r\n\r\nprocedure TMenuItem.SetMenuItem(AIndex: integer; const Value: TMenuItem);\r\nbegin\r\n Items[AIndex] := Value;\r\nend;\r\n\r\nprocedure TMenuItem.SetParentComponent(Value: TComponent);\r\nbegin\r\n inherited;\r\n\r\n FParentMenu := Value;\r\n\r\n if (Value <> nil) then\r\n begin\r\n if Value is TCustomMainMenu then\r\n begin\r\n if not TCustomMainMenu(Value).Items.IsChild(Self) then\r\n TCustomMainMenu(Value).Items.Add(Self)\r\n end\r\n else if Value is TMenuItem then\r\n begin\r\n if not TMenuItem(Value).IsChild(Self) then\r\n TMenuItem(Value).Add(Self);\r\n end;\r\n end;\r\nend;\r\n\r\n{ TMainMenuAppearance }\r\n\r\nprocedure TMainMenuAppearance.Assign(Source: TPersistent);\r\nbegin\r\n inherited;\r\n if (Source is TMainMenuAppearance) then\r\n begin\r\n FBackgroundColor := (Source as TMainMenuAppearance).BackgroundColor;\r\n FHoverColor := (Source as TMainMenuAppearance).HoverColor;\r\n FHoverFontColor := (Source as TMainMenuAppearance).HoverFontColor;\r\n FHamburgerMenu.Assign((Source as TMainMenuAppearance).HamburgerMenu);\r\n FImageURLs.Assign((Source as TMainMenuAppearance).ImageURLs);\r\n FImageSize := (Source as TMainMenuAppearance).ImageSize;\r\n FSubmenuIndicator := (Source as TMainMenuAppearance).SubmenuIndicator;\r\n end;\r\nend;\r\n\r\nconstructor TMainMenuAppearance.Create(AOwner: TMainMenu);\r\nbegin\r\n FBackgroundColor := $F0F0F0;\r\n FHoverColor := clHighlight;\r\n FHoverFontColor := clHighlightText;\r\n FHamburgerMenu := THamburgerMenu.Create(Self);\r\n FImageURLs := TStringList.Create;\r\n FImageURLs.SkipLastLinebreak := true;\r\n FImageURLs.OnChange := HandleImageURLsChanged;\r\n FImageSize := 16;\r\n FSubmenuIndicator := '►';\r\n FOwner := AOwner;\r\nend;\r\n\r\ndestructor TMainMenuAppearance.Destroy;\r\nbegin\r\n FHamburgerMenu.Free;\r\n FImageURLs.Free;\r\n inherited;\r\nend;\r\n\r\nfunction TMainMenuAppearance.GetOwner: TPersistent;\r\nbegin\r\n Result := FOwner;\r\nend;\r\n\r\nprocedure TMainMenuAppearance.HandleImageURLsChanged(Sender: TObject);\r\nbegin\r\n FOwner.UpdateElement;\r\nend;\r\n\r\nprocedure TMainMenuAppearance.SetBackgroundColor(const Value: TColor);\r\nbegin\r\n if FBackgroundColor <> Value then\r\n begin\r\n FBackgroundColor := Value;\r\n FOwner.UpdateElement;\r\n end;\r\nend;\r\n\r\nprocedure TMainMenuAppearance.SetHoverColor(const Value: TColor);\r\nbegin\r\n if FHoverColor <> Value then\r\n begin\r\n FHoverColor := Value;\r\n FOwner.UpdateElement;\r\n end;\r\nend;\r\n\r\nprocedure TMainMenuAppearance.SetHoverFontColor(const Value: TColor);\r\nbegin\r\n if FHoverFontColor <> Value then\r\n begin\r\n FHoverFontColor := Value;\r\n FOwner.UpdateElement;\r\n end;\r\nend;\r\n\r\nprocedure TMainMenuAppearance.SetImageSize(const Value: Integer);\r\nbegin\r\n if FImageSize <> Value then\r\n begin\r\n FImageSize := Value;\r\n FOwner.UpdateElement;\r\n end;\r\nend;\r\n\r\nprocedure TMainMenuAppearance.SetImageURLs(const Value: TStringList);\r\nbegin\r\n FImageURLs.Assign(Value);\r\nend;\r\n\r\nprocedure TMainMenuAppearance.SetSubmenuIndicator(const Value: string);\r\nbegin\r\n if FSubmenuIndicator <> Value then\r\n begin\r\n FSubmenuIndicator := Value;\r\n FOwner.UpdateElement;\r\n end;\r\nend;\r\n\r\n{ THamburgerMenu }\r\n\r\nprocedure THamburgerMenu.Assign(Source: TPersistent);\r\nbegin\r\n inherited;\r\n if (Source is THamburgerMenu) then\r\n begin\r\n FBackgroundColor := (Source as THamburgerMenu).BackgroundColor;\r\n FCaption := (Source as THamburgerMenu).Caption;\r\n FCaptionColor := (Source as THamburgerMenu).CaptionColor;\r\n FVisible := (Source as THamburgerMenu).Visible;\r\n FResponsiveMaxWidth := (Source as THamburgerMenu).ResponsiveMaxWidth;\r\n end;\r\nend;\r\n\r\nconstructor THamburgerMenu.Create(AOwner: TMainMenuAppearance);\r\nbegin\r\n FBackgroundColor := clSilver;\r\n FCaption := 'Menu';\r\n FCaptionColor := clWhite;\r\n FVisible := hmResponsive;\r\n FResponsiveMaxWidth := 768;\r\n FOwner := AOwner;\r\nend;\r\n\r\ndestructor THamburgerMenu.Destroy;\r\nbegin\r\n inherited;\r\nend;\r\n\r\nfunction THamburgerMenu.GetOwner: TPersistent;\r\nbegin\r\n Result := FOwner;\r\nend;\r\n\r\nprocedure THamburgerMenu.SetBackgroundColor(const Value: TColor);\r\nbegin\r\n if FBackgroundColor <> Value then\r\n begin\r\n FBackgroundColor := Value;\r\n FOwner.FOwner.UpdateElement;\r\n end;\r\nend;\r\n\r\nprocedure THamburgerMenu.SetCaption(const Value: string);\r\nbegin\r\n if FCaption <> Value then\r\n begin\r\n FCaption := Value;\r\n FOwner.FOwner.UpdateElement;\r\n end;\r\nend;\r\n\r\nprocedure THamburgerMenu.SetCaptionColor(const Value: TColor);\r\nbegin\r\n if FCaptionColor <> Value then\r\n begin\r\n FCaptionColor := Value;\r\n FOwner.FOwner.UpdateElement;\r\n end;\r\nend;\r\n\r\nprocedure THamburgerMenu.SetResponsiveMaxWidth(const Value: Integer);\r\nbegin\r\n if FResponsiveMaxWidth <> Value then\r\n begin\r\n FResponsiveMaxWidth := Value;\r\n FOwner.FOwner.UpdateElement;\r\n end;\r\nend;\r\n\r\nprocedure THamburgerMenu.SetVisible(const Value: TMainMenuHamburgerMenuVisible);\r\nbegin\r\n if FVisible <> Value then\r\n begin\r\n FVisible := Value;\r\n FOwner.FOwner.UpdateElement;\r\n end;\r\nend;\r\n\r\n{ TMenuItemList }\r\n\r\nfunction TMenuItemList.GetItem(Index: Integer): TMenuItem;\r\nbegin\r\n Result := TMenuItem(inherited Items[Index]);\r\nend;\r\n\r\nprocedure TMenuItemList.PutItem(Index: Integer; const Value: TMenuItem);\r\nbegin\r\n inherited Items[Index] := Value;\r\nend;\r\n\r\n{ TPopupMenu }\r\n\r\nconstructor TPopupMenu.Create(AOwner: TComponent);\r\nbegin\r\n inherited;\r\n if (AOwner is TControl) then\r\n Parent := TControl(AOwner);\r\nend;\r\n\r\nprocedure TPopupMenu.CreateInitialize;\r\nbegin\r\n inherited;\r\n Appearance.HamburgerMenu.Visible := hmNever;\r\n FIsPopupMenu := True;\r\nend;\r\n\r\nprocedure TPopupMenu.Popup(X, Y: Integer);\r\nbegin\r\n if Assigned(OnPopup) then\r\n OnPopup(Self);\r\n\r\n Top := Y;\r\n Left := X;\r\n FShowPopup := True;\r\n UpdateElement;\r\n FShowPopup := False;\r\nend;\r\n\r\n{ TWebCustomControl }\r\n\r\nfunction TWebCustomControl.HandleDoContextMenu(Event: TJSMouseEvent): Boolean;\r\nvar\r\n pt: TPoint;\r\n frm: TCustomForm;\r\n r: TJSDOMRect;\r\nbegin\r\n inherited;\r\n if Assigned(FPopupMenu) then\r\n begin\r\n Event.stopPropagation;\r\n Event.preventDefault;\r\n pt := Point(Round(Event.clientX), Round(Event.clientY));\r\n\r\n frm := GetParentForm(Self);\r\n\r\n if Assigned(frm) {and frm.Popup} and Assigned(frm.Container) then\r\n begin\r\n r := frm.Container.getBoundingClientRect;\r\n pt.X := pt.X - Round(r.Left);\r\n pt.Y := pt.Y - Round(r.Top);\r\n end;\r\n\r\n FPopupMenu.Popup(pt.X,pt.Y);\r\n Result := true;\r\n end;\r\nend;\r\n\r\nprocedure TWebCustomControl.Notification(AComponent: TComponent;\r\n Operation: TOperation);\r\nbegin\r\n inherited;\r\n if (Operation = opRemove) and (AComponent = FPopupMenu) then\r\n FPopupMenu := nil;\r\nend;\r\n\r\n{ TWebGraphicControl }\r\n\r\nfunction TWebGraphicControl.HandleDoContextMenu(Event: TJSMouseEvent): Boolean;\r\nvar\r\n pt: TPoint;\r\n frm: TCustomForm;\r\n r: TJSDOMRect;\r\nbegin\r\n inherited;\r\n if Assigned(FPopupMenu) then\r\n begin\r\n Event.stopPropagation;\r\n Event.preventDefault;\r\n pt := Point(Round(Event.clientX), Round(Event.clientY));\r\n\r\n frm := GetParentForm(Self);\r\n\r\n if Assigned(frm) and (frm.Popup) and Assigned(frm.Container) then\r\n begin\r\n r := frm.Container.getBoundingClientRect;\r\n pt.X := pt.X - Round(r.Left);\r\n pt.Y := pt.Y - Round(r.Top);\r\n end;\r\n\r\n FPopupMenu.Popup(pt.X,pt.Y);\r\n Result := true;\r\n end;\r\nend;\r\n\r\nprocedure TWebGraphicControl.Notification(AComponent: TComponent;\r\n Operation: TOperation);\r\nbegin\r\n inherited;\r\n if (Operation = opRemove) and (AComponent = FPopupMenu) then\r\n FPopupMenu := nil;\r\nend;\r\n\r\nend.\r\n","{********************************************************************}\r\n{ }\r\n{ written by TMS Software }\r\n{ copyright (c) 2018 - 2020 }\r\n{ Email : info@tmssoftware.com }\r\n{ Web : http://www.tmssoftware.com }\r\n{ }\r\n{ The source code is given as is. The author is not responsible }\r\n{ for any possible damage done due to the use of this code. }\r\n{ The complete source code remains property of the author and may }\r\n{ not be distributed, published, given or sold in any form as such. }\r\n{ No parts of the source code can be included in any other component }\r\n{ or application without written authorization of the author. }\r\n{********************************************************************}\r\n\r\nunit WEBLib.ClientConnector;\r\n\r\n{$DEFINE NOPP}\r\n\r\ninterface\r\n\r\nuses\r\n Classes, WEBLib.JSON;\r\n\r\ntype\r\n TClientConnectorIdentifier = (ciUnknown, ciAndroid, ciiOS, ciWindows, ciMac);\r\n\r\n TClientConnectorReceivedMessageEvent = procedure(Sender: TObject; AJSON: TJSONObject) of object;\r\n\r\n TClientConnector = class(TComponent)\r\n private\r\n FOnReceivedMessage: TClientConnectorReceivedMessageEvent;\r\n public\r\n constructor Create(AOwner: TComponent); override;\r\n destructor Destroy; override;\r\n procedure Receive(AJSON: string);\r\n procedure Send(AJSON: TJSONObject);\r\n procedure SendMessage(AMessage: string);\r\n published\r\n property OnReceivedMessage: TClientConnectorReceivedMessageEvent read FOnReceivedMessage write FOnReceivedMessage;\r\n end;\r\n\r\n TWebClientConnector = class(TClientConnector);\r\n\r\nimplementation\r\n\r\nuses\r\n Math, JS, WEBLib.Forms, SysUtils, WEBLib.Dialogs;\r\n\r\nconst\r\n Prefix: string = 'webclientevent://';\r\n\r\nconstructor TClientConnector.Create(AOwner: TComponent);\r\nbegin\r\n inherited;\r\n Application.ClientConnector := Self;\r\nend;\r\n\r\ndestructor TClientConnector.Destroy;\r\nbegin\r\n Application.ClientConnector := nil;\r\n inherited;\r\nend;\r\n\r\nprocedure TClientConnector.Receive(AJSON: string);\r\nvar\r\n js: TJSON;\r\n o: TJSONObject;\r\n s: string;\r\nbegin\r\n js := TJSON.Create;\r\n s := decodeURIComponent(AJSON);\r\n o := TJSONObject(js.parse(s));\r\n if Assigned(OnReceivedMessage) then\r\n OnReceivedMessage(Self, o);\r\n o.Free;\r\nend;\r\n\r\nprocedure TClientConnector.Send(AJSON: TJSONObject);\r\nvar\r\n s: string;\r\nbegin\r\n s := TJSJSON.stringify(AJSON.JSObject);\r\n SendMessage(s);\r\nend;\r\n\r\nprocedure TClientConnector.SendMessage(AMessage: string);\r\nconst\r\n MAXBUFFERCOUNT = 500;\r\nvar\r\n s: string;\r\n cid: TClientConnectorIdentifier;\r\n scid: string;\r\n sSub: string;\r\n sc: Integer;\r\n\r\n procedure InternalSend(m: string);\r\n begin\r\n case cid of\r\n ciAndroid:\r\n begin\r\n asm\r\n injectedObject.Setjsvalue(m);\r\n injectedObject.performClick();\r\n end;\r\n end;\r\n ciiOS, ciMac:\r\n begin\r\n asm\r\n window.webkit.messageHandlers.bridge.postMessage(m);\r\n end;\r\n end;\r\n ciWindows:\r\n begin\r\n asm\r\n window.location = m;\r\n end;\r\n end;\r\n ciUnknown: ShowMessage('Please perform handshake from client first.');\r\n end;\r\n end;\r\nbegin\r\n s := AMessage;\r\n asm\r\n scid = window.TMSWEBCoreClientIdentifier;\r\n end;\r\n\r\n cid := ciUnknown;\r\n case LowerCase(scid) of\r\n 'android': cid := ciAndroid;\r\n 'ios': cid := ciiOS;\r\n 'windows': cid := ciWindows;\r\n 'mac', 'macos': cid := ciMac;\r\n end;\r\n\r\n\r\n case LowerCase(scid) of\r\n 'mac', 'macos', 'ios': InternalSend(Prefix + encodeURIcomponent(s));\r\n 'android', 'windows':\r\n begin\r\n InternalSend(Prefix + 'BUFFERSTART');\r\n while Length(s) > 0 do\r\n begin\r\n sc := Min(Integer(Length(s)), MAXBUFFERCOUNT);\r\n sSub := Copy(s, 1, sc);\r\n Delete(s, 1, sc);\r\n InternalSend(Prefix + encodeURIcomponent(sSub));\r\n end;\r\n InternalSend(Prefix + 'BUFFEREND');\r\n end;\r\n end;\r\nend;\r\n\r\nend.\r\n","unit Rtl.BrowserLoadHelper;\r\n\r\n{$mode objfpc}\r\n\r\ninterface\r\n\r\nuses\r\n Classes, SysUtils, JS, Web;\r\n\r\nType\r\n { TBrowserLoadHelper }\r\n\r\n TBrowserLoadHelper = Class (TLoadHelper)\r\n Public\r\n Class Procedure LoadText(aURL : String; aSync : Boolean; OnLoaded : TTextLoadedCallBack; OnError : TErrorCallBack); override;\r\n Class Procedure LoadBytes(aURL : String; aSync : Boolean; OnLoaded : TBytesLoadedCallBack; OnError : TErrorCallBack); override;\r\n end;\r\n\r\nimplementation\r\n\r\n{ TBrowserLoadHelper }\r\n\r\nclass procedure TBrowserLoadHelper.LoadText(aURL: String; aSync: Boolean; OnLoaded: TTextLoadedCallBack; OnError: TErrorCallBack);\r\n\r\n function doFetchOK(response : JSValue) : JSValue;\r\n\r\n var\r\n Res : TJSResponse absolute response;\r\n\r\n begin\r\n Result:=False;\r\n If (Res.status<>200) then\r\n begin\r\n If Assigned(OnError) then\r\n OnError('Error '+IntToStr(Res.Status)+ ': '+Res.StatusText)\r\n end\r\n else\r\n Res.Text._then(\r\n function (value : JSValue) : JSValue\r\n begin\r\n OnLoaded(String(value));\r\n end\r\n );\r\n end;\r\n\r\n function doFetchFail(response : JSValue) : JSValue;\r\n\r\n begin\r\n Result:=False;\r\n OnError('Error 999: unknown error');\r\n end;\r\n\r\nbegin\r\n if ASync then\r\n Window.Fetch(aURl)._then(@DoFetchOK).catch(@DoFetchFail)\r\n else\r\n With TJSXMLHttpRequest.new do\r\n begin\r\n open('GET', aURL, False);\r\n AddEventListener('load',Procedure (oEvent: JSValue)\r\n begin\r\n OnLoaded(responseText);\r\n end\r\n );\r\n AddEventListener('error',Procedure (oEvent: JSValue)\r\n begin\r\n if Assigned(OnError) then\r\n OnError(TJSError(oEvent).Message);\r\n end\r\n );\r\n send();\r\n end;\r\nend;\r\n\r\nclass procedure TBrowserLoadHelper.LoadBytes(aURL: String; aSync: Boolean; OnLoaded: TBytesLoadedCallBack; OnError: TErrorCallBack);\r\n\r\n function doFetchFail(response : JSValue) : JSValue;\r\n\r\n begin\r\n Result:=False;\r\n if isObject(Response) and (TJSObject(Response) is TJSError) then\r\n OnError('Error 999: '+TJSError(Response).Message)\r\n else\r\n OnError('Error 999: unknown error');\r\n end;\r\n\r\n\r\n function doFetchOK(response : JSValue) : JSValue;\r\n\r\n var\r\n Res : TJSResponse absolute response;\r\n\r\n begin\r\n Result:=False;\r\n If (Res.status<>200) then\r\n begin\r\n If Assigned(OnError) then\r\n OnError('Error '+IntToStr(Res.Status)+ ': '+Res.StatusText)\r\n end\r\n else\r\n Res.Blob._then(\r\n function (value : JSValue) : JSValue\r\n begin\r\n TJSBlob(Value).ArrayBuffer._then(function(arr : JSValue) : JSValue\r\n begin\r\n OnLoaded(TJSArrayBuffer(arr))\r\n end\r\n ).Catch(@DoFetchFail);\r\n end\r\n );\r\n end;\r\n\r\n\r\n function StringToArrayBuffer(str : string) : TJSArrayBuffer;\r\n\r\n Var\r\n i,l : Integer;\r\n\r\n begin\r\n L:=Length(str);\r\n Result:=TJSArrayBuffer.New(l*2); // 2 bytes for each char\r\n With TJSUint16Array.New(Result) do\r\n for i:=1 to L do\r\n Values[i-1]:=Ord(Str[i]);\r\n end;\r\n\r\nbegin\r\n if ASync then\r\n Window.Fetch(aURl)._then(@DoFetchOK).catch(@DoFetchFail)\r\n else\r\n With TJSXMLHttpRequest.new do\r\n begin\r\n open('GET', aURL, False);\r\n AddEventListener('load',Procedure (oEvent: JSValue)\r\n begin\r\n if Status<>200 then\r\n OnError('Error '+IntToStr(Status)+ ': '+StatusText)\r\n else\r\n OnLoaded(StringToArrayBuffer(responseText));\r\n end\r\n );\r\n AddEventListener('error',Procedure (oEvent: JSValue)\r\n begin\r\n if Assigned(OnError) then\r\n OnError(TJSError(oEvent).Message);\r\n end\r\n );\r\n send();\r\n end;\r\nend;\r\n\r\ninitialization\r\n SetLoadHelperClass(TBrowserLoadHelper);\r\nend.\r\n\r\n","{********************************************************************}\r\n{ }\r\n{ written by TMS Software }\r\n{ copyright (c) 2018 - 2025 }\r\n{ Email : info@tmssoftware.com }\r\n{ Web : http://www.tmssoftware.com }\r\n{ }\r\n{ The source code is given as is. The author is not responsible }\r\n{ for any possible damage done due to the use of this code. }\r\n{ The complete source code remains property of the author and may }\r\n{ not be distributed, published, given or sold in any form as such. }\r\n{ No parts of the source code can be included in any other component }\r\n{ or application without written authorization of the author. }\r\n{********************************************************************}\r\n\r\nunit WEBLib.Forms;\r\n\r\n{$DEFINE NOPP}\r\n\r\ninterface\r\n\r\nuses\r\n Classes, Types, SysUtils, WEBLib.Graphics, WEBLib.Controls, WEBLib.Modules,\r\n WEBLib.Lang, WEBLib.Menus, Web, JS, WEBLib.ClientConnector, Rtl.BrowserLoadHelper\r\n {$IFDEF SINGLEINSTANCE}\r\n , WEBLib.WebSocketClient\r\n {$ENDIF}\r\n ;\r\n\r\nconst\r\n WEBCOREVERSION = '2.7.2.2';\r\n\r\n idOK = 1;\r\n idCancel = 2;\r\n idAbort = 3;\r\n idRetry = 4;\r\n idIgnore = 5;\r\n idYes = 6;\r\n idNo = 7;\r\n idClose = 8;\r\n idHelp = 9;\r\n idTryAgain = 10;\r\n idContinue = 11;\r\n mrNone = 0;\r\n mrOk = idOk;\r\n mrCancel = idCancel;\r\n mrAbort = idAbort;\r\n mrRetry = idRetry;\r\n mrIgnore = idIgnore;\r\n mrYes = idYes;\r\n mrNo = idNo;\r\n mrClose = idClose;\r\n mrHelp = idHelp;\r\n mrTryAgain = idTryAgain;\r\n mrContinue = idContinue;\r\n mrAll = mrContinue + 1;\r\n mrNoToAll = mrAll + 1;\r\n mrYesToAll = mrNoToAll + 1;\r\n\r\n rgiFirst = -1024;\r\n rgiLast = -513;\r\n igiFirst = 256;\r\n igiLast = 511;\r\n\r\n clTMSBlue = $E39E00;\r\n clTMSWEB = $8F8300;\r\n\r\ntype\r\n TDragDockObject = class;\r\n TCustomForm = class;\r\n\r\n TConstraintSize = 0..MaxInt;\r\n TCloseAction = (caNone, caHide, caFree, caMinimize);\r\n TModalResult = Integer;\r\n TFormStyle = (fsNormal, fsStayOnTop);\r\n TNavigationTarget = (ntBlank, ntPage);\r\n TGestureID = rgiFirst..igiLast;\r\n TInteractiveGestureFlag = (gfBegin, gfInertia, gfEnd);\r\n TInteractiveGestureFlags = set of TInteractiveGestureFlag;\r\n TMouseActivate = (maDefault, maActivate, maActivateAndEat, maNoActivate, maNoActivateAndEat);\r\n TScreenOrientation = (soPortrait, soLandscape);\r\n TApplicationColorScheme = (csNoScheme, csLight, csDark);\r\n\r\n TSmallPoint = record\r\n x, y: SmallInt;\r\n end;\r\n\r\n TAlignInfo = record\r\n AlignList: TList;\r\n ControlIndex: Integer;\r\n Align: TAlign;\r\n Scratch: Integer;\r\n end;\r\n\r\n TGestureEventInfo = record\r\n GestureID: TGestureID;\r\n Location: TPoint;\r\n Flags: TInteractiveGestureFlags;\r\n Angle: Double;\r\n InertiaVector: TSmallPoint;\r\n Distance: Integer;\r\n TapLocation: TSmallPoint;\r\n end;\r\n\r\n TOnPaintEvent = TNotifyEvent;\r\n TCloseEvent = procedure(Sender: TObject; var Action: TCloseAction) of object;\r\n TCloseQueryEvent = procedure(Sender: TObject; var CanClose: Boolean) of object;\r\n TOrientationChangeEvent = procedure(Sender: TObject; AOrientation: TScreenOrientation) of object;\r\n TBeforeUnloadEvent = procedure(Sender: TObject; var AMessage: string) of object;\r\n TAlignInsertBeforeEvent = function(Sender: TWinControl; C1, C2: TControl): Boolean of object;\r\n TAlignPositionEvent = procedure(Sender: TWinControl; Control: TControl;\r\n var NewLeft, NewTop, NewWidth, NewHeight: Integer;\r\n var AlignRect: TRect; AlignInfo: TAlignInfo) of object;\r\n TCanResizeEvent = procedure(Sender: TObject; var NewWidth, NewHeight: Integer;\r\n var Resize: Boolean) of object;\r\n TConstrainedResizeEvent = procedure(Sender: TObject; var MinWidth, MinHeight,\r\n MaxWidth, MaxHeight: Integer) of object;\r\n TContextPopupEvent = procedure(Sender: TObject; MousePos: TPoint; var Handled: Boolean) of object;\r\n TDockDropEvent = procedure(Sender: TObject; Source: TDragDockObject;\r\n X, Y: Integer) of object;\r\n TDockOverEvent = procedure(Sender: TObject; Source: TDragDockObject;\r\n X, Y: Integer; State: TDragState; var Accept: Boolean) of object;\r\n TGestureEvent = procedure(Sender: TObject; const EventInfo: TGestureEventInfo;\r\n var Handled: Boolean) of object;\r\n TGetSiteInfoEvent = procedure(Sender: TObject; DockClient: TControl;\r\n var InfluenceRect: TRect; MousePos: TPoint; var CanDock: Boolean) of object;\r\n TMouseActivateEvent = procedure(Sender: TObject; Button: TMouseButton;\r\n Shift: TShiftState; X, Y: Integer; HitTest: Integer; var MouseActivate: TMouseActivate) of object;\r\n TMouseWheelUpDownEvent = procedure(Sender: TObject; Shift: TShiftState;\r\n MousePos: TPoint; var Handled: Boolean) of object;\r\n TStartDockEvent = procedure(Sender: TObject;\r\n var DragObject: TDragDockObject) of object;\r\n TUnDockEvent = procedure(Sender: TObject; Client: TControl;\r\n NewTarget: TWinControl; var Allow: Boolean) of object;\r\n\r\n THashChangeEvent = procedure(Sender: TObject; oldURL, newURL: string) of object;\r\n\r\n TModalResultProc = reference to procedure(AValue: TModalResult);\r\n TFormCreatedProc = reference to procedure(AForm: TObject);\r\n\r\n TWindowState = (wsNormal, wsMinimized, wsMaximized);\r\n\r\n TPopupMode = (pmNone, pmAuto, pmExplicit);\r\n TPopupClose = (pcOnDeactivate, pcNever);\r\n TPosition = (poDesigned, poDefault, poDefaultPosOnly, poDefaultSizeOnly, poScreenCenter, poDesktopCenter, poMainFormCenter, poOwnerFormCenter);\r\n\r\n TApplicationErrorType = (aeSilent, aeDialog, aeAlert, aeFooter);\r\n\r\n TFormBorderStyle = (fbNone, fbSingle, fbSizeable, fbDialog, fbDialogSizeable);\r\n TFormBorder = fbNone..fbSingle;\r\n\r\n TBootstrapVersion = (bv3, bv4, bv5);\r\n\r\n TCustomSizeConstraints = class(TPersistent)\r\n private\r\n FControl: TControl;\r\n FMaxHeight: TConstraintSize;\r\n FMaxWidth: TConstraintSize;\r\n FMinHeight: TConstraintSize;\r\n FMinWidth: TConstraintSize;\r\n FOnChange: TNotifyEvent;\r\n procedure SetConstraints(AIndex: Integer; AValue: TConstraintSize);\r\n protected\r\n procedure Change; virtual;\r\n procedure AssignTo(ADest: TPersistent); override;\r\n property Control: TControl read FControl;\r\n property MaxHeight: TConstraintSize index 0 read FMaxHeight write SetConstraints default 0;\r\n property MaxWidth: TConstraintSize index 1 read FMaxWidth write SetConstraints default 0;\r\n property MinHeight: TConstraintSize index 2 read FMinHeight write SetConstraints default 0;\r\n property MinWidth: TConstraintSize index 3 read FMinWidth write SetConstraints default 0;\r\n public\r\n constructor Create(AControl: TControl); virtual;\r\n property OnChange: TNotifyEvent read FOnChange write FOnChange;\r\n end;\r\n\r\n TSizeConstraints = class(TCustomSizeConstraints)\r\n published\r\n property MaxHeight;\r\n property MaxWidth;\r\n property MinHeight;\r\n property MinWidth;\r\n end;\r\n\r\n TDragDockObject = class(TObject)\r\n strict private\r\n FBrush: TBrush;\r\n FDockRect: TRect;\r\n FDropAlign: TAlign;\r\n FDropOnControl: TControl;\r\n FEraseDockRect: TRect;\r\n FEraseWhenMoving: Boolean;\r\n FFloating: Boolean;\r\n FFrameWidth: Integer;\r\n public\r\n constructor Create(AControl: TControl);\r\n destructor Destroy; override;\r\n procedure Assign(Source: TDragObject);\r\n property Brush: TBrush read FBrush write FBrush;\r\n property DockRect: TRect read FDockRect write FDockRect;\r\n property DropAlign: TAlign read FDropAlign;\r\n property DropOnControl: TControl read FDropOnControl;\r\n property EraseDockRect: TRect read FEraseDockRect write FEraseDockRect;\r\n property EraseWhenMoving: Boolean read FEraseWhenMoving;\r\n property Floating: Boolean read FFloating write FFloating;\r\n property FrameWidth: Integer read FFrameWidth;\r\n end;\r\n\r\n TCustomForm = class(TWinControl)\r\n private\r\n FDesignContainer: TJSElement;\r\n FLayer: TJSElement;\r\n FPopup: Boolean;\r\n FPopupElement: TJSHTMLElement;\r\n FFormFileName: string;\r\n FFormContent: string;\r\n FFormContainer: TElementID;\r\n FFormElement: string;\r\n FFormStyle: TFormStyle;\r\n FOnCreate: TNotifyEvent;\r\n FOnShow: TNotifyEvent;\r\n FModalResult: TModalResult;\r\n FOnPaint: TOnPaintEvent;\r\n FOnDeactivate: TNotifyEvent;\r\n FOnCloseQuery: TCloseQueryEvent;\r\n FOnClose: TCloseEvent;\r\n FModalProc: TModalResultProc;\r\n FCreatedProc: TFormCreatedProc;\r\n FWindowState: TWindowState;\r\n FCaption: string;\r\n FIsResizing: boolean;\r\n FOnScroll: TNotifyEvent;\r\n FOnUnload: TNotifyEvent;\r\n FOnBeforeUnload: TBeforeUnloadEvent;\r\n FPopupMode: TPopupMode;\r\n FPopupClose: TPopupClose;\r\n FPosition: TPosition;\r\n FActiveControl: TWinControl;\r\n FMdx, FMdy: integer;\r\n FDlgX, FDlgY: integer;\r\n FCaptured: boolean;\r\n FDown: boolean;\r\n FHasCaption: boolean;\r\n FMoveSpan: TJSHTMLElement;\r\n FCaptionElement: TJSHTMLElement;\r\n FCaptionCloseElement: TJSHTMLElement;\r\n FBorder: TFormBorderStyle;\r\n FShadow: boolean;\r\n FTimerID: integer;\r\n FOrigWidth, FOrigHeight: integer;\r\n FOldWidth, FOldHeight: integer;\r\n FOnDestroy: TNotifyEvent;\r\n FPopupOpacity: single;\r\n FCreating: boolean;\r\n FCreated: boolean;\r\n FShown: boolean;\r\n FLoadedPtr: pointer;\r\n FDOMContentLoadedPtr: pointer;\r\n FUnloadPtr: pointer;\r\n FBeforeUnloadPtr: pointer;\r\n FResizePtr: pointer;\r\n FScrollPtr: pointer;\r\n FDocMouseUpPtr: pointer;\r\n FDocMouseMovePtr: pointer;\r\n FTitleDownPtr: pointer;\r\n FDoClickPtr: pointer;\r\n FKeyDownPtr: pointer;\r\n FOrientationChangePtr: pointer;\r\n FHashChangePtr: pointer;\r\n FCSSLibrary: TCSSLibrary;\r\n FNoHTML: boolean;\r\n FPrevActiveForm: TCustomForm;\r\n FElementCaptionClassName: TElementClassName;\r\n FElementPopupClassName: TElementClassName;\r\n FMenu: TCustomControl;\r\n FResizeObserver: TJSObject;\r\n FOnOrientationChange: TOrientationChangeEvent;\r\n FOnDOMContentLoaded: TNotifyEvent;\r\n FShowClose: boolean;\r\n FOnHashChange: THashChangeEvent;\r\n procedure SetModalResult(const Value: TModalResult);\r\n function GetFormStyle: TFormStyle;\r\n procedure SetFormStyle(const Value: TFormStyle); virtual;\r\n function GetCanvas: TCanvas;\r\n procedure SetCaption(const AValue: string); virtual;\r\n procedure SetActiveControl(const Value: TWinControl);\r\n procedure SetShadow(const Value: boolean);\r\n procedure SetBorder(const Value: TFormBorderStyle);\r\n procedure SetFormContainer(const Value: TElementID);\r\n function GetActiveControl: TWinControl;\r\n procedure SetWidth(AValue: Integer); override;\r\n procedure SetHeight(AValue: Integer); override;\r\n procedure SetPosition(const Value: TPosition); virtual;\r\n procedure SetClientHeight(const Value: Integer); override;\r\n function GetClientHeight: integer; override;\r\n procedure ReadPixelsPerInch(AReader: TReader);\r\n procedure WritePixelsPerInch(AWriter: TWriter);\r\n protected\r\n function HandleHashChange(Event: TEventListenerEvent): boolean; virtual;\r\n function HandleLoaded(Event: TEventListenerEvent): boolean; virtual;\r\n function HandleDOMContentLoaded(Event: TEventListenerEvent): boolean; virtual;\r\n function HandleScroll(Event: TEventListenerEvent): boolean; virtual;\r\n function HandleUnload(Event: TEventListenerEvent): boolean; virtual;\r\n function HandleBeforeUnload(Event: TEventListenerEvent): boolean; virtual;\r\n function HandleObserver: boolean; virtual;\r\n function HandleResize(Event: TEventListenerEvent): boolean; virtual;\r\n function HandleDocMouseMove(Event: TJSMouseEvent): Boolean; virtual;\r\n function HandleDocMouseUp(Event: TJSMouseEvent): Boolean; virtual;\r\n function HandleTitleDown(Event: TJSMouseEvent): Boolean; virtual;\r\n function HandleCloseClick(Event: TEventListenerEvent): boolean; virtual;\r\n\r\n procedure SetLeft(AValue: Integer); override;\r\n procedure SetTop(AValue: Integer); override;\r\n\r\n procedure DefineProperties(AFiler: TFiler); override;\r\n procedure ClearMethodPointers; override;\r\n procedure GetMethodPointers; override;\r\n procedure VisibleChanged; override;\r\n procedure Resize; reintroduce; virtual;\r\n procedure CreateControl; override;\r\n procedure DoClose(var CloseAction: TCloseAction); virtual;\r\n procedure BindEvents; override;\r\n procedure UnbindEvents; override;\r\n procedure DoCreate; virtual;\r\n procedure Realign; override;\r\n procedure DoResize; virtual;\r\n procedure DoShow; virtual;\r\n procedure DoAutoFocus; virtual;\r\n procedure Paint; virtual;\r\n function HandleDoClick(Event: TJSMouseEvent): Boolean; reintroduce; virtual;\r\n function HandleKeyDown(Event: TJSKeyBoardEvent): Boolean; virtual;\r\n function HandleOrientationChange(Event: TJSEvent): Boolean; virtual;\r\n procedure HandleDoResize; virtual;\r\n procedure KeyPreview(var Key: Word; Shift: TShiftState); override;\r\n function GetWidth: Integer; override;\r\n function GetHeight: Integer; override;\r\n function GetLeft: Integer; override;\r\n function GetTop: Integer; override;\r\n function GetClientRect: TRect; override;\r\n function CreateElement: TJSElement; override;\r\n procedure UpdateElement; override;\r\n function ContainerElement: TJSElement; override;\r\n function FormContainerElement: TJSElement; virtual;\r\n function GetElementBindHandle: TJSEventTarget; override;\r\n function GetElementHandle: TJSHTMLElement; override;\r\n procedure SetElementClassName(AValue: string); override;\r\n function CloseQuery: Boolean; virtual;\r\n procedure LoadDFMValues; virtual;\r\n procedure Init; virtual;\r\n property FormContent: string read FFormContent write FFormContent;\r\n property WindowState: TWindowState read FWindowState write FWindowState;\r\n function IsFocused: Boolean; override;\r\n property PopupMode: TPopupMode read FPopupMode write FPopupMode default pmNone;\r\n property Position: TPosition read FPosition write SetPosition default poDefaultPosOnly;\r\n function CreateLayer: TJSHTMLElement;\r\n function CreateCaption: TJSHTMLElement;\r\n function GetCaptionHeight: integer;\r\n procedure SetColorScheme(AScheme: TApplicationColorScheme); virtual;\r\n procedure SetCSSLibrary(ALibrary: TCSSLibrary);\r\n procedure SetFormPos; virtual;\r\n property Border: TFormBorderStyle read FBorder write SetBorder;\r\n class function GetHTMLFileName: string; virtual;\r\n procedure LoadedDone; virtual;\r\n procedure Loaded; override;\r\n procedure ColorChanging; override;\r\n public\r\n procedure CreateInitialize; override;\r\n constructor Create(id: string); overload; override;\r\n constructor Create(id: string; var AReference); overload; virtual;\r\n constructor Create(AOwner: TComponent); overload; override;\r\n constructor Create(AOwner: TComponent; IsPopup: boolean; ABorder: TFormBorderStyle = fbSingle; ATitle: string = ''); overload;\r\n constructor CreateNew(AOwner: TComponent; Dummy: Integer = 0); overload; virtual;\r\n constructor CreateNew(AFileName: string); overload; virtual;\r\n constructor CreateNew; overload; virtual;\r\n constructor CreateNew(AProc: TFormCreatedProc); overload; virtual;\r\n constructor CreateNew(AElementID: string; AProc: TFormCreatedProc); overload; virtual;\r\n constructor CreateNew(AElementID, AFileName: string; AProc: TFormCreatedProc); overload; virtual;\r\n constructor CreateDialog(ACaption: string); virtual;\r\n constructor CreateDialogNew(ACaption: string); virtual;\r\n\r\n [async]\r\n function Load: TJSPromise;\r\n [async]\r\n function Execute: TJSPromise;\r\n [async]\r\n function LoadAndExecute: TJSPromise;\r\n\r\n destructor Destroy; override;\r\n procedure Close; virtual;\r\n function GetUniqueComponentName(AComponent: TComponent): string;\r\n function IsMiletus: boolean;\r\n procedure PreventDefault; reintroduce;\r\n property ActiveControl: TWinControl read GetActiveControl write SetActiveControl;\r\n property ModalResult: TModalResult read FModalResult write SetModalResult;\r\n property Canvas: TCanvas read GetCanvas;\r\n property CaptionElement: TJSHTMLElement read FCaptionElement;\r\n property ElementCaptionClassName: TElementClassName read FElementCaptionClassName write FElementCaptionClassName;\r\n property ElementPopupClassName: TElementClassName read FElementPopupClassName write FElementPopupClassName;\r\n procedure SetBounds(X, Y, AWidth, AHeight: Integer); override;\r\n procedure SelectFirst;\r\n procedure SelectNext(CurControl: TControl; GoForward: boolean; CheckTabStop: boolean);\r\n procedure Show; reintroduce;\r\n function ShowModal: Integer; overload; virtual;\r\n function ShowModal(AProc: TModalResultProc): TModalResult; overload; virtual;\r\n procedure AddCSS(const id: string; const css: string);\r\n procedure RemoveCSS(const id: string);\r\n procedure UpdateCSS(const id: string; const css: string);\r\n property Caption: string read FCaption write SetCaption;\r\n property Color;\r\n property CSSLibrary: TCSSLibrary read FCSSLibrary write SetCSSLibrary default cssNone;\r\n property FormContainer: TElementID read FFormContainer write SetFormContainer;\r\n property FormFileName: string read FFormFileName write FFormFileName;\r\n property FormStyle: TFormStyle read GetFormStyle write SetFormStyle;\r\n property IsResizing: boolean read FIsResizing;\r\n property Menu: TCustomControl read FMenu write FMenu;\r\n property Popup: boolean read FPopup write FPopup;\r\n property PopupClose: TPopupClose read FPopupClose write FPopupClose default pcOnDeactivate;\r\n property PopupOpacity: single read FPopupOpacity write FPopupOpacity;\r\n property ShowClose: boolean read FShowClose write FShowClose default true;\r\n property Shadow: boolean read FShadow write SetShadow default true;\r\n property OnBeforeUnload: TBeforeUnloadEvent read FOnBeforeUnload write FOnBeforeUnload;\r\n property OnClick;\r\n property OnDblClick;\r\n property OnDOMContentLoaded: TNotifyEvent read FOnDOMContentLoaded write FOnDOMContentLoaded;\r\n property OnClose: TCloseEvent read FOnClose write FOnClose;\r\n property OnCloseQuery: TCloseQueryEvent read FOnCloseQuery write FOnCloseQuery;\r\n property OnCreate: TNotifyEvent read FOnCreate write FOnCreate;\r\n property OnDestroy: TNotifyEvent read FOnDestroy write FOnDestroy;\r\n property OnDeactivate: TNotifyEvent read FOnDeactivate write FOnDeactivate;\r\n property OnOrientationChange: TOrientationChangeEvent read FOnOrientationChange write FOnOrientationChange;\r\n property OnPaint: TOnPaintEvent read FOnPaint write FOnPaint;\r\n property OnScroll: TNotifyEvent read FOnScroll write FOnScroll;\r\n property OnShow: TNotifyEvent read FOnShow write FOnShow;\r\n property OnUnload: TNotifyEvent read FOnUnload write FOnUnload;\r\n property OnHashChange: THashChangeEvent read FOnHashChange write FOnHashChange;\r\n end;\r\n\r\n TFormClass = class of TForm;\r\n TForm = class(TCustomForm)\r\n public\r\n property Border;\r\n property ClientHeight;\r\n property ClientWidth;\r\n property PopupMode;\r\n property Position;\r\n published\r\n property Align;\r\n property Caption;\r\n property Color;\r\n property CSSLibrary;\r\n property ElementClassName;\r\n property ElementFont;\r\n property ElementPosition;\r\n property Font;\r\n property FormContainer;\r\n property FormStyle;\r\n property Menu;\r\n property ParentFont;\r\n property Shadow;\r\n property ShowClose;\r\n property TabOrder;\r\n property TabStop;\r\n property OnBeforeUnload;\r\n property OnClick;\r\n property OnClose;\r\n property OnCloseQuery;\r\n property OnCreate;\r\n property OnDblClick;\r\n property OnDeactivate;\r\n property OnDestroy;\r\n property OnDOMContentLoaded;\r\n property OnHashChange;\r\n property OnResize;\r\n property OnShow;\r\n property OnScroll;\r\n property OnOrientationChange;\r\n property OnPaint;\r\n property OnTouchStart;\r\n property OnTouchMove;\r\n property OnTouchEnd;\r\n property OnUnload;\r\n end;\r\n\r\n TWebForm = TForm;\r\n\r\n TWebFormClass = class of TWebForm;\r\n\r\n //TTouchManager = class(TComponent)\r\n //end;\r\n\r\n TCustomFrame = class(TCustomHTMLDiv)\r\n private\r\n FAutoScroll: Boolean;\r\n FAutoSize: Boolean;\r\n FBiDiMode: TBiDiMode;\r\n FConstraints: TSizeConstraints;\r\n FCtl3D: Boolean;\r\n FDockSite: Boolean;\r\n FDragCursor: TCursor;\r\n FDragKind: TDragKind;\r\n FDragMode: TDragMode;\r\n FOnAlignInsertBefore: TAlignInsertBeforeEvent;\r\n FOnAlignPosition: TAlignPositionEvent;\r\n FOnCanResize: TCanResizeEvent;\r\n FOnConstrainedResize: TConstrainedResizeEvent;\r\n FOnContextPopup: TContextPopupEvent;\r\n FOnDockDrop: TDockDropEvent;\r\n FOnDockOver: TDockOverEvent;\r\n FOnEndDock: TEndDragEvent;\r\n FOnGesture: TGestureEvent;\r\n FOnGetSiteInfo: TGetSiteInfoEvent;\r\n FOnMouseActivate: TMouseActivateEvent;\r\n FOnMouseWheelDown: TMouseWheelUpDownEvent;\r\n FOnMouseWheelUp: TMouseWheelUpDownEvent;\r\n FOnStartDock: TStartDockEvent;\r\n FOnUnDock: TUnDockEvent;\r\n FPadding: TPadding;\r\n FParentBackground: Boolean;\r\n FParentCtl3D: Boolean;\r\n FPopupMenu: TPopupMenu;\r\n procedure LoadHTMLFile(const AId: string);\r\n //FTouch: TTouchManager;\r\n //FTouchManager: TTouchManager;\r\n procedure SetConstraints(const AValue: TSizeConstraints);\r\n procedure SetPopupMenu(AValue: TPopupMenu);\r\n procedure SetPadding(AValue: TPadding);\r\n //procedure SetTouchManager(AValue: TTouchManager);\r\n protected\r\n class function GetHTMLFileName: string; virtual;\r\n procedure LoadDFMValues; virtual;\r\n procedure UpdateElement; override;\r\n property AutoScroll: Boolean read FAutoScroll write FAutoScroll default False;\r\n property AutoSize: Boolean read FAutoSize write FAutoSize default False;\r\n property BiDiMode: TBiDiMode read FBiDiMode write FBiDiMode stored False;\r\n property Constraints: TSizeConstraints read FConstraints write SetConstraints;\r\n property Ctl3D: Boolean read FCtl3D write FCtl3D stored False;\r\n property DockSite: Boolean read FDockSite write FDockSite default False;\r\n property DragCursor: TCursor read FDragCursor write FDragCursor default crDrag;\r\n property DragKind: TDragKind read FDragKind write FDragKind default dkDrag;\r\n property DragMode: TDragMode read FDragMode write FDragMode default dmManual;\r\n property Padding: TPadding read FPadding write SetPadding;\r\n property ParentBackground: Boolean read FParentBackground write FParentBackground;\r\n property ParentCtl3D: Boolean read FParentCtl3D write FParentCtl3D default True;\r\n property PopupMenu: TPopupMenu read FPopupMenu write SetPopupMenu;\r\n //property Touch: TTouchManager read FTouch write SetTouchManager;\r\n property OnAlignInsertBefore: TAlignInsertBeforeEvent read FOnAlignInsertBefore write FOnAlignInsertBefore;\r\n property OnAlignPosition: TAlignPositionEvent read FOnAlignPosition write FOnAlignPosition;\r\n property OnCanResize: TCanResizeEvent read FOnCanResize write FOnCanResize;\r\n property OnConstrainedResize: TConstrainedResizeEvent read FOnConstrainedResize write FOnConstrainedResize;\r\n property OnContextPopup: TContextPopupEvent read FOnContextPopup write FOnContextPopup;\r\n property OnDockDrop: TDockDropEvent read FOnDockDrop write FOnDockDrop;\r\n property OnDockOver: TDockOverEvent read FOnDockOver write FOnDockOver;\r\n property OnEndDock: TEndDragEvent read FOnEndDock write FOnEndDock;\r\n property OnGesture: TGestureEvent read FOnGesture write FOnGesture;\r\n property OnGetSiteInfo: TGetSiteInfoEvent read FOnGetSiteInfo write FOnGetSiteInfo;\r\n property OnMouseActivate: TMouseActivateEvent read FOnMouseActivate write FOnMouseActivate;\r\n property OnMouseWheelDown: TMouseWheelUpDownEvent read FOnMouseWheelDown write FOnMouseWheelDown;\r\n property OnMouseWheelUp: TMouseWheelUpDownEvent read FOnMouseWheelUp write FOnMouseWheelUp;\r\n property OnStartDock: TStartDockEvent read FOnStartDock write FOnStartDock;\r\n property OnUnDock: TUnDockEvent read FOnUnDock write FOnUnDock;\r\n public\r\n constructor Create(AId: string); override; overload;\r\n constructor Create(AOwner: TComponent); override; overload;\r\n constructor CreateNew(AOwner: TComponent);\r\n destructor Destroy; override;\r\n procedure LoadFromForm;\r\n property ElementHandle;\r\n end;\r\n\r\n TFrameClass = class of TFrame;\r\n TFrame = class(TCustomFrame)\r\n published\r\n property Align;\r\n property Anchors;\r\n property AutoScroll;\r\n property AutoSize;\r\n property BiDiMode;\r\n property Constraints;\r\n property DockSite;\r\n property DoubleBuffered;\r\n property DragCursor;\r\n property DragKind;\r\n property DragMode;\r\n property Enabled;\r\n property Color nodefault;\r\n property Ctl3D;\r\n property Font;\r\n property Padding;\r\n property ParentBackground default True;\r\n property ParentBiDiMode;\r\n property ParentColor;\r\n property ParentCtl3D;\r\n property ParentDoubleBuffered;\r\n property ParentFont;\r\n property ParentShowHint;\r\n property PopupMenu;\r\n property ShowHint;\r\n property TabOrder;\r\n property TabStop;\r\n //property Touch;\r\n property Visible;\r\n property OnAlignInsertBefore;\r\n property OnAlignPosition;\r\n property OnCanResize;\r\n property OnClick;\r\n property OnConstrainedResize;\r\n property OnContextPopup;\r\n property OnDblClick;\r\n property OnDockDrop;\r\n property OnDockOver;\r\n property OnDragDrop;\r\n property OnDragOver;\r\n property OnEndDock;\r\n property OnEndDrag;\r\n property OnEnter;\r\n property OnExit;\r\n property OnGesture;\r\n property OnGetSiteInfo;\r\n property OnMouseActivate;\r\n property OnMouseDown;\r\n property OnMouseEnter;\r\n property OnMouseLeave;\r\n property OnMouseMove;\r\n property OnMouseUp;\r\n property OnMouseWheel;\r\n property OnMouseWheelDown;\r\n property OnMouseWheelUp;\r\n property OnResize;\r\n property OnStartDock;\r\n property OnStartDrag;\r\n property OnUnDock;\r\n end;\r\n TWebFrame = TFrame;\r\n\r\n TApplicationError = record\r\n AMessage: string;\r\n AFile: string;\r\n ALineNumber: integer;\r\n AColNumber: integer;\r\n AStack: string;\r\n AError: TJSObject;\r\n end;\r\n\r\n THintPosition = (hpLeft, hpTop, hpRight, hpBottom);\r\n\r\n TOnlineStatus = (osOnline, osOffline);\r\n\r\n TApplicationErrorEvent = procedure(Sender: TObject; AError: TApplicationError; var Handled: boolean) of object;\r\n\r\n TApplicationHashChangeEvent = procedure(Sender: TObject; AHash: string; var Handled: boolean) of object;\r\n\r\n TApplicationOnlineChangeEvent = procedure(Sender: TObject; AStatus: TOnlineStatus) of object;\r\n\r\n TApplicationActiveChangeEvent = procedure(Sender: TObject; Active: boolean) of object;\r\n\r\n TApplicationCallBackEvent = procedure(Sender: TObject; AQuery: string) of object;\r\n\r\n TApplicationExceptionEvent = procedure(Sender: TObject; E: Exception) of object;\r\n\r\n TApplicationPopStateEvent = procedure(Sender: TObject; State: JSValue) of object;\r\n\r\n TApplicationAutoCreateFormEvent = procedure(Sender: TObject; AInstanceClass: TFormClass; var AReference) of object;\r\n\r\n TApplication = class(TControl)\r\n private\r\n FAppContainer: TElementID;\r\n FMainFormOnTaskBar: Boolean;\r\n FCanCreateForm: Boolean;\r\n FAppInitializing: Boolean;\r\n FLastReq: TJSXMLHttpRequest;\r\n FFormCaptionHeight: integer;\r\n {$IFDEF SINGLEINSTANCE}\r\n FWebSocket: TSocketClient;\r\n {$ENDIF}\r\n FActiveForm: TCustomForm;\r\n FMainForm: TCustomForm;\r\n FLoadForm: TCustomForm;\r\n FInitFormClassName: string;\r\n FFormStack: TList;\r\n FParameters: TStrings;\r\n FIsRedirect: boolean;\r\n FLanguage: TUILanguage;\r\n FOnImageCacheReady: TNotifyEvent;\r\n FOnError: TApplicationErrorEvent;\r\n FOnHashChange: TApplicationHashChangeEvent;\r\n FAutoFormRoute: boolean;\r\n FErrorType: TApplicationErrorType;\r\n FClientConnector: TClientConnector;\r\n FOnOnlineChange: TApplicationOnlineChangeEvent;\r\n FOnActivate: TApplicationActiveChangeEvent;\r\n FThemeTextColor: TColor;\r\n FThemeColor: TColor;\r\n FThemed: boolean;\r\n FThemeButtonClassName: string;\r\n FOnOAuthToken: TApplicationCallBackEvent;\r\n FOnOAuthCallBack: TApplicationCallBackEvent;\r\n FOnFontCacheReady: TNotifyEvent;\r\n FOnPopState: TApplicationPopStateEvent;\r\n FMaxZIndex: integer;\r\n FCreatedProc: TFormCreatedProc;\r\n FHandleOAuth: boolean;\r\n FHintPause: integer;\r\n FHintHidePause: integer;\r\n FHintPosition: THintPosition;\r\n FHintClassName: string;\r\n FOnExit: TNotifyEvent;\r\n FOnException: TApplicationExceptionEvent;\r\n FOnAutoCreateForm: TApplicationAutoCreateFormEvent;\r\n FRouting: boolean;\r\n FSBW: integer;\r\n {$IFDEF FREEWARE}\r\n FNotifyCount: integer;\r\n {$ENDIF}\r\n {$IFDEF HOTRELOAD}\r\n FHotReloadPollInterval: Integer;\r\n FHotReloadReq: TJSXMLHttpRequest;\r\n FHotReloadTimer: NativeInt;\r\n FHotReloadVersion: Integer;\r\n FHotReloadFile: string;\r\n {$ENDIF}\r\n function DoFormLoad(Event: TEventListenerEvent): boolean;\r\n function DoFormAbort(Event: TEventListenerEvent): boolean;\r\n function DoHandleError(Event: TJSErrorEvent): boolean;\r\n function DoHandleExit(Event: TEventListenerEvent): boolean;\r\n function DoHashChange(Event: TEventListenerEvent): boolean;\r\n function DoPopState(Event: TJSPopStateEvent): boolean;\r\n function DoErrorClose(Event: TJSMOuseEvent): boolean;\r\n function DoUpdateOnlineStatus(Event: TEventListenerEvent): boolean;\r\n function DoVisibilityChange(Event: TEventListenerEvent): boolean;\r\n procedure SetLanguage(const Value: TUILanguage);\r\n function GetIsOnline: boolean;\r\n function GetIsMobile: boolean;\r\n function GetIsPWA: boolean;\r\n procedure InternalDownloadFile(const AData: TJSUint8Array; const AFileName, AType: string; const ANewTab: Boolean);\r\n {$IFDEF SINGLEINSTANCE}\r\n procedure DoGetDataReceived(Sender: TObject; Origin: string; Data: TJSObjectRecord);\r\n procedure DoGetConnected(Sender: TObject);\r\n {$ENDIF}\r\n {$IFDEF HOTRELOAD}\r\n procedure OnHotReloadTick;\r\n function OnHotReloadLoad(AEvent: TEventListenerEvent): Boolean;\r\n function OnHotReloadAbort(AEvent: TEventListenerEvent): Boolean;\r\n procedure HandleHotReload(const AData: TJSObject);\r\n procedure StartHotReload;\r\n procedure StopHotReload;\r\n {$ENDIF}\r\n protected\r\n procedure CreateNewForm(AForm: TCustomForm; HTML: string); overload; virtual;\r\n function GetFormExtension: string;\r\n function GetAuthorizationPageHTML(const AAuthorizationSuccess: Boolean): string;\r\n function GetColorScheme: TApplicationColorScheme; virtual;\r\n function GetActive: boolean;\r\n function GetBootstrapVersion: TBootstrapVersion;\r\n procedure ReloadForm;\r\n procedure ActivateChildScripts(AElement: TJSHTMLElement);\r\n procedure ChangeMaxZIndex(Delta: integer);\r\n procedure TriggerNotification;\r\n procedure AutoCreateForm(AInstanceClass: TFormClass; var AReference);\r\n procedure SetHash(const AValue: string);\r\n function GetHash: string;\r\n public\r\n procedure PushForm(AForm: TCustomForm);\r\n function PopForm: TCustomForm;\r\n procedure LockForm(AForm: TCustomForm);\r\n procedure UnLockForm(AForm: TCustomForm);\r\n constructor Create(AOwner: TComponent); override;\r\n destructor Destroy; override;\r\n property MaxZIndex: integer read FMaxZIndex write FMaxZIndex;\r\n function MaxZIndexStr: string;\r\n function IsPWAInstalled: TJSPromise;\r\n function CalcScrollBarWidth: integer;\r\n procedure GoBack;\r\n function CreateNewForm(AInstanceClass: TFormClass): TCustomForm; overload;\r\n function CreateNewForm(AInstanceClass: TFormClass; AElementID: string): TCustomForm; overload;\r\n procedure CreateForm(AInstanceClass: TFormClass; var AReference); overload;\r\n procedure CreateForm(AInstanceClass: TFormClass; AElementID: string; var AReference); overload;\r\n procedure CreateForm(AInstanceClass: TFormClass; AElementID: string; var AReference; AProc: TFormCreatedProc); overload;\r\n procedure CreateForm(AInstanceClass: TFormClass; AElementID: string; var AReference; AProc: TFormCreatedProc; LoadHTML: boolean); overload;\r\n procedure CreateForm(AInstanceClass: TDataModuleClass; var AReference); overload;\r\n procedure CreateForm(AInstanceClass: TFrameClass; var AReference); overload;\r\n procedure CreateForm(AInstanceClass: TFormClass; AElement: TJSHTMLElement; var AReference); overload;\r\n procedure CreateFormDirect(AInstanceClass: TFormClass; var AReference); overload;\r\n procedure CreateFormDirect(AInstanceClass: TFormClass; AElementID: string; var AReference); overload;\r\n procedure CreateFormDirect(AInstanceClass: TDataModuleClass; var AReference); overload;\r\n procedure CreateFormDirect(AInstanceClass: TFrameClass; var AReference); overload;\r\n procedure LoadForm(AForm: TCustomForm; AFormFile: string); overload; virtual;\r\n procedure LoadForm(AForm: TCustomForm; AFormFile: string; FormLoaded: TFormCreatedProc); overload; virtual;\r\n procedure ChangeCSS(id: string; href:string);\r\n procedure InsertCSS(id, href: string);\r\n procedure RemoveCSS(id: string);\r\n function HasCSS(href:string): boolean;\r\n procedure ChangeLanguage(const Value: TUILanguage); virtual;\r\n procedure Initialize;\r\n function Route: boolean;\r\n procedure InitFormatSettings(const BrowserLocale: string);\r\n procedure ReceiveMessageFromClient(const AMessage: string);\r\n procedure RouteForm(AParameter: string);\r\n procedure Run;\r\n procedure RunScript(Source: string);\r\n procedure Terminate;\r\n procedure Navigate(const AURL: string; ATarget: TNavigationTarget = ntBlank);\r\n procedure Download(const AURL: string);\r\n procedure DownloadTextFile(const AText: string; AFileName: string = '');\r\n procedure DownloadBinaryFile(const AData: TJSBlob; const AFileName: string = ''; const ANewTab: Boolean = False); overload;\r\n procedure DownloadBinaryFile(const AData: TBytes; const AFileName: string = ''; const ANewTab: Boolean = False); overload;\r\n procedure DownloadBinaryFile(const AData: TJSUint8Array; const AFileName: string = ''; const ANewTab: Boolean = False); overload;\r\n procedure DownloadPDFFile(const AData: TBytes; const AFileName: string = ''; const ANewTab: Boolean = False); overload;\r\n procedure DownloadPDFFile(const AData: TJSUint8Array; const AFileName: string = ''; const ANewTab: Boolean = False); overload;\r\n function EXEName: string;\r\n function IDETheme: string;\r\n function IDECSS: string;\r\n function Version: string;\r\n procedure IDEMessage(const Msg: string);\r\n procedure IDEOpenURL(const URL: string);\r\n function NeedsFormRouting: Boolean;\r\n function ObjectURL(AFile: TJSHTMLFile): string;\r\n property Active: boolean read GetActive;\r\n property AppContainer: TElementID read FAppContainer write FAppContainer;\r\n property AutoFormRoute: boolean read FAutoFormRoute write FAutoFormRoute;\r\n property ErrorType: TApplicationErrorType read FErrorType write FErrorType;\r\n property BootstrapVersion: TBootstrapVersion read GetBootstrapVersion;\r\n property FormCaptionHeight: integer read FFormCaptionHeight write FFormCaptionHeight;\r\n property Hash: string read GetHash write SetHash;\r\n property HandleOAuth: boolean read FHandleOAuth write FHandleOAuth;\r\n property HintHidePause: integer read FHintHidePause write FHintHidePause;\r\n property HintPause: integer read FHintPause write FHintPause;\r\n property HintClassName: string read FHintCLassName write FHintClassName;\r\n property HintPosition: THintPosition read FHintPosition write FHintPosition;\r\n property IsOnline: boolean read GetIsOnline;\r\n property IsMobile: boolean read GetIsMobile;\r\n property IsPWA: boolean read GetIsPWA;\r\n property ActiveForm: TCustomForm read FActiveForm;\r\n property ColorScheme: TApplicationColorScheme read GetColorScheme;\r\n property Routing: boolean read FRouting write FRouting;\r\n property MainForm: TCustomForm read FMainForm;\r\n property MainFormOnTaskBar: boolean read FMainFormOnTaskBar write FMainFormOnTaskBar;\r\n property Parameters: TStrings read FParameters;\r\n property Language: TUILanguage read FLanguage write SetLanguage;\r\n property Themed: boolean read FThemed write FThemed;\r\n property ThemeColor: TColor read FThemeColor write FThemeColor;\r\n property ThemeTextColor: TColor read FThemeTextColor write FThemeTextColor;\r\n property ThemeButtonClassName: string read FThemeButtonClassName write FThemeButtonClassName;\r\n property OnError: TApplicationErrorEvent read FOnError write FOnError;\r\n property OnException: TApplicationExceptionEvent read FOnException write FOnException;\r\n property OnExit: TNotifyEvent read FOnExit write FOnExit;\r\n property OnAutoCreateForm: TApplicationAutoCreateFormEvent read FOnAutoCreateForm write FOnAutoCreateForm;\r\n property OnImageCacheReady: TNotifyEvent read FOnImageCacheReady write FOnImageCacheReady;\r\n property OnFontCacheReady: TNotifyEvent read FOnFontCacheReady write FOnFontCacheReady;\r\n property OnHashChange: TApplicationHashChangeEvent read FOnHashChange write FOnHashChange;\r\n property OnOnlineChange: TApplicationOnlineChangeEvent read FOnOnlineChange write FOnOnlineChange;\r\n property OnOAuthCallBack: TApplicationCallBackEvent read FOnOAuthCallBack write FOnOAuthCallBack;\r\n property OnOAuthToken: TApplicationCallBackEvent read FOnOAuthToken write FOnOAuthToken;\r\n property OnActivate: TApplicationActiveChangeEvent read FOnActivate write FOnActivate;\r\n property OnPopState: TApplicationPopStateEvent read FOnPopState write FOnPopState;\r\n property ClientConnector: TClientConnector read FClientConnector write FClientConnector;\r\n{$IFDEF HOTRELOAD}\r\n property HotReloadPollInterval: Integer read FHotReloadPollInterval write FHotReloadPollInterval;\r\n property HotReloadFile: string read FHotReloadFile write FHotReloadFile;\r\n{$ENDIF}\r\n end;\r\n\r\nfunction GetParentForm(AControl: TControl): TCustomForm;\r\nprocedure Log(v: JSValue); overload;\r\nprocedure Log(arr: array of JSValue); overload;\r\nfunction WinWidth: integer;\r\nfunction WinHeight: integer;\r\nfunction Sleep(milliseconds: cardinal): TJSPromise;\r\n\r\nvar\r\n Application: TApplication;\r\n HandShakeScript: TJSHTMLScriptElement;\r\n VSIDE: TJSObject;\r\n LastHash: string;\r\n\r\nimplementation\r\n\r\nuses\r\n WEBLib.Dialogs, WEBLib.WebTools, WEBLib.JSON, WEBLib.Utils, Math\r\n {$IFDEF HOTRELOAD}, IOUtils{$ENDIF};\r\n\r\ntype\r\n TFramePreviewForm = class(TWebForm)\r\n private\r\n FFrame: TFrame;\r\n protected\r\n procedure LoadDFMValues; override;\r\n end;\r\n\r\nprocedure Log(v: JSValue);\r\nbegin\r\n asm\r\n console.log(v);\r\n end;\r\nend;\r\n\r\nfunction WinHeight: integer;\r\nvar\r\n h: integer;\r\nbegin\r\n if Assigned(VSIDE) then\r\n begin\r\n asm\r\n h = pas[\"WEBLib.Forms\"].VSIDE.clientHeight();\r\n end;\r\n end\r\n else\r\n h := window.innerHeight;\r\n\r\n Result := h;\r\nend;\r\n\r\nfunction WinWidth: integer;\r\nvar\r\n w: integer;\r\nbegin\r\n if Assigned(VSIDE) then\r\n begin\r\n asm\r\n w = pas[\"WEBLib.Forms\"].VSIDE.clientWidth();\r\n end;\r\n end\r\n else\r\n w := window.innerWidth;\r\n\r\n Result := w;\r\nend;\r\n\r\n\r\n{$HINTS OFF}\r\nprocedure Log(arr: array of JSValue);\r\nvar\r\n i: integer;\r\n s,su: string;\r\nbegin\r\n s := '[';\r\n for i := 0 to length(arr) - 1 do\r\n begin\r\n asm\r\n function isPrimitive(test) {\r\n return (test !== Object(test));\r\n };\r\n\r\n if (isPrimitive(arr[i])) {\r\n var su = arr[i].toString();\r\n if (s != \"[\") { s = s + \",\"; }\r\n s = s + su;\r\n }\r\n else\r\n {\r\n console.log(arr[i]);\r\n if (s != \"[\") { s = s + \",\"; }\r\n s = s + \"#object\";\r\n }\r\n end;\r\n end;\r\n\r\n s := s + ']';\r\n\r\n log(s);\r\nend;\r\n{$HINTS ON}\r\n\r\nfunction GetParentForm(AControl: TControl): TCustomForm;\r\nvar\r\n FOwner: TComponent;\r\nbegin\r\n Result := nil;\r\n\r\n FOwner := AControl;\r\n\r\n while Assigned(FOwner) and not (FOwner is TCustomForm) do\r\n begin\r\n // it is a control without Owner, created with HTML element ID\r\n if (FOwner = AControl) and (FOwner.Owner = nil) then\r\n FOwner := AControl.Parent\r\n else\r\n FOwner := FOwner.Owner;\r\n end;\r\n\r\n if Assigned(FOwner) and (FOwner is TCustomForm) then\r\n Result := (FOwner as TCustomForm);\r\nend;\r\n\r\n\r\n{ TCustomForm }\r\n\r\nfunction TCustomForm.Load: TJSPromise;\r\nbegin\r\n FShown := false;\r\n FormFileName := GetHTMLFileName;\r\n\r\n if FormFileName = '' then\r\n begin\r\n Result := TJSPromise.new(procedure(ASuccess, AFailed: TJSPromiseResolver)\r\n begin\r\n Asuccess(Self);\r\n end);\r\n end\r\n else\r\n begin\r\n Result := TJSPromise.new(\r\n procedure(ASuccess, AFailed: TJSPromiseResolver)\r\n begin\r\n Application.LoadForm(Self, FormFileName, procedure(AForm: TObject)\r\n begin\r\n ASuccess(AForm);\r\n end);\r\n end\r\n );\r\n end;\r\nend;\r\n\r\nfunction TCustomForm.Execute: TJSPromise;\r\nbegin\r\n Result := TJSPromise.new(\r\n procedure(ASuccess, AFailed: TJSPromiseResolver)\r\n begin\r\n ShowModal(procedure(AValue: TModalResult)\r\n begin\r\n ASuccess(AValue);\r\n end);\r\n end\r\n );\r\nend;\r\n\r\nprocedure TCustomForm.KeyPreview(var Key: Word; Shift: TShiftState);\r\nvar\r\n i,lt,ft,lti,fti:integer;\r\nbegin\r\n lt := -1;\r\n ft := $FFFF;\r\n\r\n for i := 0 to ControlCount - 1 do\r\n begin\r\n if not (Controls[i].Visible) and (Controls[i].Enabled) then\r\n Continue;\r\n\r\n if Controls[i].TabOrder < ft then\r\n begin\r\n ft := Controls[i].TabOrder;\r\n fti := i;\r\n end;\r\n\r\n if Controls[i].TabOrder > lt then\r\n begin\r\n lt := Controls[i].TabOrder;\r\n lti := i;\r\n end;\r\n\r\n // check if control handles Default or Cancel with ESC/Return\r\n if (Key = VK_RETURN) or (Key = VK_ESCAPE) then\r\n Controls[i].HandleKeyPreview(Key);\r\n end;\r\n\r\n if Application.MainForm = Self then\r\n Exit;\r\n\r\n if (key = VK_TAB) and not (ssShift in Shift) and (lti < ControlCount) and (fti >= 0) and (fti <> lti) then\r\n begin\r\n if Controls[lti].Focused then\r\n begin\r\n Controls[fti].SetFocus;\r\n key := 0;\r\n end;\r\n end;\r\n\r\n if (key = VK_TAB) and (ssShift in Shift) and (fti >= 0) and (lti < ControlCount) and (fti <> lti) then\r\n begin\r\n if Controls[fti].Focused then\r\n begin\r\n Controls[lti].SetFocus;\r\n key := 0;\r\n end;\r\n end;\r\n\r\n\r\n\r\nend;\r\n\r\nfunction TCustomForm.LoadAndExecute: TJSPromise;\r\n\r\n function LoadAsync: boolean; async;\r\n begin\r\n Result := await(boolean, Load);\r\n end;\r\n\r\nbegin\r\n LoadAsync;\r\n\r\n Result := TJSPromise.new(\r\n procedure(ASuccess, AFailed: TJSPromiseResolver)\r\n begin\r\n ShowModal(procedure(AValue: TModalResult)\r\n begin\r\n ASuccess(AValue);\r\n end);\r\n end\r\n );\r\nend;\r\n\r\nprocedure TCustomForm.BindEvents;\r\nvar\r\n pc: TPersistentClass;\r\n hash: string;\r\nbegin\r\n inherited;\r\n\r\n if (document.readyState <> 'loading') then\r\n if Assigned(OnDOMContentLoaded) then\r\n OnDomContentLoaded(Self);\r\n\r\n window.addEventListener('resize', FResizePtr);\r\n window.addEventListener('load', FLoadedPtr);\r\n window.addEventListener('DOMContentLoaded', FDOMContentLoadedPtr);\r\n document.addEventListener('scroll', FScrollPtr);\r\n window.addEventListener('unload', FUnloadPtr);\r\n window.addEventListener('beforeunload', FBeforeUnloadPtr);\r\n window.addEventListener('keydown', FKeyDownPtr);\r\n window.addEventListener('orientationchange',FOrientationChangePtr);\r\n window.addEventListener('hashchange',FHashChangePtr);\r\n\r\n pc := GetClass(ClassName);\r\n\r\n if Assigned(pc) and not Popup and Application.FRouting then\r\n begin\r\n hash := ClassName;\r\n delete(hash,1,1);\r\n LastHash := hash;\r\n window.location.hash := hash;\r\n end;\r\nend;\r\n\r\nprocedure ReleaseForm(AForm: TCustomForm);\r\nbegin\r\n AForm.Free;\r\n AForm := nil;\r\nend;\r\n\r\nprocedure TCustomForm.ReadPixelsPerInch(AReader: TReader);\r\nbegin\r\nend;\r\n\r\nprocedure TCustomForm.WritePixelsPerInch(AWriter: TWriter);\r\nbegin\r\nend;\r\n\r\nprocedure TCustomForm.DefineProperties(AFiler: TFiler);\r\nconst\r\n cPixelsPerInch = 'PixelsPerInch';\r\nbegin\r\n inherited DefineProperties(AFiler);\r\n AFiler.DefineProperty(cPixelsPerInch, @ReadPixelsPerInch, @WritePixelsPerInch, False);\r\nend;\r\n\r\nprocedure TCustomForm.ClearMethodPointers;\r\nbegin\r\n inherited;\r\n FLoadedPtr := nil;\r\n FDOMContentLoadedPtr := nil;\r\n FUnloadPtr := nil;\r\n FBeforeUnloadPtr := nil;\r\n FResizePtr := nil;\r\n FScrollPtr := nil;\r\n FDocMouseUpPtr := nil;\r\n FDocMouseMovePtr := nil;\r\n FTitleDownPtr := nil;\r\n FDoClickPtr := nil;\r\n FKeyDownPtr := nil;\r\n FOrientationChangePtr := nil;\r\n FHashChangePtr := nil;\r\nend;\r\n\r\nprocedure TCustomForm.AddCSS(const id: string; const css: string);\r\nbegin\r\n asm\r\n function writeStylesOnce(styleName, cssText) {\r\n var styleElement = document.getElementById(styleName);\r\n if (styleElement) {\r\n styleElement.innerHTML = cssText;\r\n return;\r\n }\r\n styleElement = document.createElement('style');\r\n styleElement.type = 'text/css';\r\n styleElement.id = styleName;\r\n styleElement.innerHTML = cssText;\r\n document.getElementsByTagName('head')[0].appendChild(styleElement);\r\n }\r\n writeStylesOnce(id,css);\r\n end;\r\nend;\r\n\r\nprocedure TCustomForm.RemoveCSS(const id: string);\r\nvar\r\n el: TJSElement;\r\nbegin\r\n el := document.getElementById(id);\r\n if Assigned(el) then\r\n document.head.removeChild(el);\r\nend;\r\n\r\nprocedure TCustomForm.Close;\r\nvar\r\n lAction: TCloseAction;\r\n el: TJSElement;\r\nbegin\r\n if CloseQuery then\r\n begin\r\n UnbindEvents;\r\n\r\n lAction := caHide;\r\n\r\n if FTimerID <> -1 then\r\n begin\r\n window.clearInterval(FTimerID);\r\n FTimerID := -1;\r\n end;\r\n\r\n if Assigned(OnClose) then\r\n OnClose(Self, lAction);\r\n\r\n //if lAction = caFree then\r\n // DestroyControls;\r\n\r\n if lAction <> caNone then\r\n begin\r\n if Assigned(FLayer) then\r\n begin\r\n if Container.parentNode = FLayer then\r\n begin\r\n FLayer.removeChild(Container);\r\n end\r\n else\r\n begin\r\n if Container.parentNode.parentNode = FLayer then\r\n FLayer.removeChild(Container.parentNode);\r\n end;\r\n\r\n Container := nil;\r\n if FormContainerElement = FLayer.parentNode then\r\n begin\r\n FormContainerElement.removeChild(FLayer);\r\n Application.ChangeMaxZIndex(-1);\r\n end;\r\n FLayer := nil;\r\n end;\r\n\r\n if (FormFileName = '') then\r\n begin\r\n if (FFormElement <> '') and Assigned(Container) then\r\n begin\r\n Container.innerHTML := '';\r\n Container := nil;\r\n end\r\n else\r\n if Assigned(Container) then\r\n begin\r\n if FormContainerElement = Container.parentNode then\r\n FormContainerElement.removeChild(Container);\r\n Container := nil;\r\n end;\r\n end\r\n else\r\n begin\r\n if FFormElement <> '' then\r\n begin\r\n Container.innerHTML := '';\r\n Container := nil;\r\n end\r\n end;\r\n\r\n if (FFormElement <> FormContainer) and (FFormElement <> '') then\r\n begin\r\n el := document.getElementById(FFormElement);\r\n if Assigned(el) then\r\n el.innerHTML := '';\r\n end;\r\n\r\n DoClose(lAction);\r\n\r\n if (lAction = caFree) and not (csDestroying in ComponentState) then\r\n begin\r\n Visible := false;\r\n ReleaseForm(Self);\r\n if Application.FMainForm = Self then\r\n Application.FMainForm := nil;\r\n end;\r\n\r\n Application.FActiveForm := FPrevActiveForm;\r\n\r\n Visible := False;\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TCustomForm.CloseQuery: Boolean;\r\nbegin\r\n Result := True;\r\n if Assigned(FOnCloseQuery) then\r\n FOnCloseQuery(Self, Result);\r\nend;\r\n\r\nprocedure TCustomForm.ColorChanging;\r\nbegin\r\n inherited;\r\n if Assigned(Container) then\r\n begin\r\n TJSHTMLElement(Container).style.setProperty(CSSBackground, ColorToHTML(Color));\r\n end;\r\nend;\r\n\r\nfunction TCustomForm.ContainerElement: TJSElement;\r\nbegin\r\n Result := FormContainerElement;\r\nend;\r\n\r\nconstructor TCustomForm.Create(AOwner: TComponent);\r\nbegin\r\n FNoHTML := false;\r\n FCreating := true;\r\n FResizeObserver := nil;\r\n inherited;\r\n FBorder := fbSingle;\r\n FFormFileName := '';\r\n FPopupMode := pmNone;\r\n FPopupClose := pcOnDeactivate;\r\n FPopup := True;\r\n FPosition := poScreenCenter;\r\n FPopupOpacity := 1.0;\r\n FCreated := true;\r\nend;\r\n\r\nconstructor TCustomForm.Create(AOwner: TComponent; IsPopup: boolean; ABorder: TFormBorderStyle; ATitle: string);\r\nbegin\r\n FNoHTML := false;\r\n FCreating := true;\r\n FResizeObserver := nil;\r\n inherited Create(AOwner);\r\n FBorder := ABorder;\r\n FCaption := ATitle;\r\n FFormFileName := '';\r\n FPopupMode := pmNone;\r\n FPopupClose := pcOnDeactivate;\r\n FPopup := IsPopup;\r\n FPosition := poScreenCenter;\r\n FPopupOpacity := 1.0;\r\nend;\r\n\r\nfunction TCustomForm.CreateCaption: TJSHTMLElement;\r\nvar\r\n BarHeight: string;\r\nbegin\r\n BarHeight := IntToStr(Application.FormCaptionHeight);\r\n FCaptionElement := TJSHTMLElement(document.createElement('DIV'));\r\n FCaptionElement.innerHTML := Caption;\r\n FCaptionElement.style.setProperty(CSSBackground, ColorToHTML(Application.ThemeColor));\r\n FCaptionElement.style.setProperty('color', ColorToHTML(Application.ThemeTextColor));\r\n FCaptionElement.style.setProperty('cursor', 'move');\r\n //title.style.setProperty('padding', Padding + 'px');\r\n FCaptionElement.style.setProperty('height', BarHeight + 'px');\r\n FCaptionElement.style.setProperty('line-height', BarHeight + 'px');\r\n FCaptionElement.style.setProperty('border-bottom', '1px solid black');\r\n FCaptionElement.style.setProperty('padding-left','4px');\r\n\r\n FCaptionElement.style.setProperty('-moz-user-select','none');\r\n FCaptionElement.style.setProperty('-webkit-user-select','none');\r\n FCaptionElement.style.setProperty('-ms-user-select','none');\r\n FCaptionElement.style.setProperty('user-select','none');\r\n FCaptionElement.style.setProperty('-o-user-select','none');\r\n\r\n if ElementCaptionClassName <> '' then\r\n FCaptionElement.setAttribute('class',ElementCaptionClassName);\r\n\r\n SetHTMLElementFont(FCaptionElement, Font, not ((ElementCaptionClassName = '') and (ElementFont = efProperty)));\r\n\r\n if not Assigned(FTitleDownPtr) then\r\n GetMethodPointers;\r\n\r\n FCaptionElement.innerHTML := FCaption;\r\n FCaptionElement.addEventListener('mousedown', FTitleDownPtr);\r\n FHasCaption := true;\r\n\r\n Result := FCaptionElement;\r\nend;\r\n\r\nprocedure TCustomForm.CreateControl;\r\nvar\r\n s: string;\r\nbegin\r\n if not Visible and not FPopup then\r\n Exit;\r\n\r\n inherited;\r\n\r\n s := '';\r\n asm\r\n if (typeof CONTAINERID !== \"undefined\") {\r\n try {\r\n s = CONTAINERID;\r\n }\r\n catch(e)\r\n {\r\n }\r\n }\r\n end;\r\n\r\n if s <> '' then\r\n FormContainer := s;\r\n\r\n UpdateSize;\r\nend;\r\n\r\nfunction TCustomForm.CreateLayer: TJSHTMLElement;\r\nbegin\r\n Result := TJSHTMLElement(document.createElement('SPAN'));\r\n Result.style.setProperty('top', '0');\r\n Result.style.setProperty('left', '0');\r\n Result.style.setProperty('right', '0');\r\n Result.style.setProperty('bottom', '0');\r\n\r\n Result.style.setProperty('webkit-user-select', 'none');\r\n Result.style.setProperty('moz-user-select', 'none');\r\n Result.style.setProperty('khtml-user-select', 'none');\r\n Result.style.setProperty('ms-user-select', 'none');\r\n Result.style.setProperty('user-select', 'none');\r\n Result.style.setProperty('position', 'absolute');\r\n Result.style.setProperty('z-index', Application.MaxZIndexStr);\r\nend;\r\n\r\nfunction TCustomForm.CreateElement: TJSElement;\r\nvar\r\n eh,caph: TJSHTMLElement;\r\n\r\nbegin\r\n if not FPopup and Assigned(FormContainerElement) then\r\n begin\r\n Result := FormContainerElement;\r\n Exit;\r\n end;\r\n\r\n //if FPopup then\r\n begin\r\n Result := document.createElement('DIV');\r\n\r\n FLayer := CreateLayer;\r\n document.body.appendChild(FLayer);\r\n\r\n eh := TJSHTMLElement(FLayer);\r\n\r\n if FPopupClose = pcOnDeactivate then\r\n begin\r\n // ensure method pointers exist\r\n GetMethodPointers;\r\n eh.addEventListener('click', FDoClickPtr);\r\n end;\r\n\r\n eh.style.setProperty(CSSZINDEX, Application.MaxZIndexStr);\r\n\r\n if (Border = fbSizeable) then\r\n begin\r\n TJSHTMLElement(Result).style.setProperty('resize','both');\r\n TJSHTMLElement(Result).style.setProperty('overflow','auto');\r\n end;\r\n\r\n FHasCaption := false;\r\n\r\n if (Border in [fbSizeable, fbDialog, fbDialogSizeable]) then\r\n begin\r\n caph := CreateCaption;\r\n Result.appendChild(caph);\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TCustomForm.LoadDFMValues;\r\nbegin\r\nend;\r\n\r\nprocedure TCustomForm.Loaded;\r\nvar\r\n el: TJSElement;\r\nbegin\r\n inherited;\r\n if (FormContainer <> '') and (ElementClassName <> '') then\r\n begin\r\n el := FormContainerElement;\r\n if Assigned(el) then\r\n begin\r\n el.setAttribute('class', ElementClassName);\r\n end;\r\n end;\r\n\r\n LoadedDone;\r\nend;\r\n\r\nprocedure TCustomForm.LoadedDone;\r\nbegin\r\n Application.TriggerNotification;\r\nend;\r\n\r\nprocedure TCustomForm.Init;\r\nbegin\r\nend;\r\n\r\nfunction TCustomForm.IsFocused: Boolean;\r\nbegin\r\n // form is not focused only controls\r\n Result := false;\r\nend;\r\n\r\nfunction TCustomForm.IsMiletus: boolean;\r\nvar\r\n cl: TClass;\r\nbegin\r\n cl := ClassType;\r\n Result := false;\r\n\r\n repeat\r\n cl := cl.ClassParent;\r\n if Assigned(cl) and (cl.ClassName = 'TMiletusForm') then\r\n begin\r\n Result := true;\r\n break;\r\n end;\r\n until not Assigned(cl) or (cl.ClassName = 'TForm');\r\nend;\r\n\r\nprocedure TCustomForm.Resize;\r\nvar\r\n i,ch: integer;\r\n neww, newh: integer;\r\n eh: TJSHTMLElement;\r\n dr: TJSDOMRect;\r\nbegin\r\n if (csDestroying in ComponentState) then\r\n Exit;\r\n\r\n FIsResizing := true;\r\n\r\n if FPopup and Assigned(FPopupElement) then\r\n begin\r\n eh := FPopupElement;\r\n dr := eh.getBoundingClientRect;\r\n\r\n neww := Round(dr.Right - dr.Left - 2);\r\n if (Border in [fbDialog, fbDialogSizeable]) then\r\n begin\r\n ch := GetCaptionHeight;\r\n newh := Round(dr.Bottom - dr.Top - ch - 2)\r\n end\r\n else\r\n newh := Round(dr.Bottom - dr.Top - 2)\r\n end\r\n else\r\n begin\r\n neww := window.innerWidth;\r\n newh := window.innerHeight;\r\n end;\r\n\r\n UpdateControlSize(neww, newh);\r\n\r\n if not (IsAndroid and (document.activeElement.tagName = 'INPUT')) then\r\n AlignControl(Self);\r\n\r\n DoResize;\r\n\r\n FIsResizing := false;\r\n\r\n if not IsUpdating then\r\n begin\r\n if (OrigRect.Left = -1) and (OrigRect.Top = -1) then\r\n InitAnchoring;\r\n\r\n for i := 0 to ControlCount - 1 do\r\n Controls[i].UpdateAnchoring;\r\n end;\r\n\r\nend;\r\n\r\nprocedure TCustomForm.SetActiveControl(const Value: TWinControl);\r\nbegin\r\n FActiveControl := Value;\r\n if Assigned(FActiveControl) then\r\n FActiveControl.SetFocus;\r\nend;\r\n\r\nprocedure TCustomForm.SetBorder(const Value: TFormBorderStyle);\r\nbegin\r\n if (FBorder <> Value) then\r\n begin\r\n FBorder := Value;\r\n if Assigned(Container) then\r\n AlignControl(Self);\r\n end;\r\nend;\r\n\r\nprocedure TCustomForm.SetBounds(X, Y, AWidth, AHeight: Integer);\r\nbegin\r\n if (csDesigning in ComponentState) then\r\n begin\r\n Resize;\r\n SetBoundsInt(X, Y, AWidth, AHeight);\r\n end\r\n else\r\n inherited SetBounds(X, Y, AWidth, AHeight);\r\nend;\r\n\r\nprocedure TCustomForm.SetCaption(const AValue: string);\r\nbegin\r\n if FCaption <> AValue then\r\n begin\r\n FCaption := AValue;\r\n UpdateElement;\r\n end;\r\nend;\r\n\r\nprocedure TCustomForm.SetColorScheme(AScheme: TApplicationColorScheme);\r\nvar\r\n s: string;\r\nbegin\r\n if not Application.Themed then\r\n Exit;\r\n\r\n case AScheme of\r\n csDark:\r\n begin\r\n Color := $202124;\r\n s :=\r\n 'label,option,td,table,ul,li {background-color: #202124; color: #BEC1C6;}'+#13#10 +\r\n 'body,input,textarea,select,fieldset {background-color: #202124; color: #BEC1C6; border: 1px solid gray;}'+#13#10 +\r\n 'input:focus, textarea:focus, select:focus, span:focus { border: 1px solid silver; outline: none !important;}';\r\n AddCSS('appscheme',s);\r\n end;\r\n csLight:\r\n begin\r\n Color := clWhite;\r\n RemoveCSS('appscheme');\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TCustomForm.SetCSSLibrary(ALibrary: TCSSLibrary);\r\nbegin\r\n FCSSLibrary := ALibrary;\r\n if (ALibrary = cssBootstrap) and (csDesigning in ComponentState) and not (csLoading in ComponentState) then\r\n ElementFont := efCSS;\r\nend;\r\n\r\nprocedure TCustomForm.SetElementClassName(AValue: string);\r\nbegin\r\n inherited;\r\n if FPopup and Assigned(FPopupElement) then\r\n begin\r\n FPopupElement['class'] := AValue;\r\n end;\r\nend;\r\n\r\nprocedure TCustomForm.SetFormContainer(const Value: TElementID);\r\nvar\r\n el,old: TJSElement;\r\n i: integer;\r\n\r\nbegin\r\n old := Container;\r\n\r\n if (csDesigning in ComponentState) then\r\n FFormContainer := Value\r\n else\r\n begin\r\n if Uppercase(Value) = 'BODY' then\r\n FFormContainer := ''\r\n else\r\n FFormContainer := Value;\r\n end;\r\n\r\n if (csLoading in ComponentState) and not (csDesigning in ComponentState) then\r\n Exit;\r\n\r\n // displayed on top of other in layer\r\n if Assigned(FLayer) then\r\n el := FLayer\r\n else\r\n // update container element\r\n if Value = '' then\r\n begin\r\n el := document.body;\r\n end\r\n else\r\n begin\r\n el := document.getElementById(Value);\r\n if not Assigned(el) then\r\n el := document.body;\r\n end;\r\n\r\n if Assigned(el) then\r\n begin\r\n Container := el;\r\n\r\n if Assigned(old) then\r\n begin\r\n for i := 0 to ControlCount - 1 do\r\n begin\r\n if (Controls[i].ParentElement = old) then\r\n Controls[i].ParentElementHandle := TJSHTMLElement(el);\r\n\r\n if Assigned(Controls[i].ElementHandle) and (Controls[i].ElementHandle.parentElement = old) then\r\n begin\r\n el.appendChild(Controls[i].ElementHandle);\r\n end;\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TCustomForm.SetFormPos;\r\nbegin\r\n if not Assigned(Container) then\r\n Exit;\r\n\r\n if Position = poScreenCenter then\r\n begin\r\n FLeft := Round((WinWidth - Width)/2) + window.scrollX;\r\n FTop := Round((WinHeight - Height)/2) + window.scrollY;\r\n end;\r\n\r\n TJSHTMLElement(Container).style.setProperty('position','absolute');\r\n TJSHTMLElement(Container).style.setProperty('width',inttostr(Width)+'px');\r\n TJSHTMLElement(Container).style.setProperty('height',inttostr(Height)+'px');\r\n TJSHTMLElement(Container).style.setProperty('left',inttostr(Left)+'px');\r\n TJSHTMLElement(Container).style.setProperty('top',inttostr(Top)+'px');\r\nend;\r\n\r\nprocedure TCustomForm.SetFormStyle(const Value: TFormStyle);\r\nbegin\r\n FFormStyle := Value;\r\nend;\r\n\r\nprocedure TCustomForm.SetClientHeight(const Value: Integer);\r\nbegin\r\n if (Self.Border in [fbDialog, fbDialogSizeable]) then\r\n begin\r\n SetHeight(Value + Application.FormCaptionHeight);\r\n end\r\n else\r\n inherited;\r\nend;\r\n\r\nprocedure TCustomForm.SetHeight(AValue: Integer);\r\nvar\r\n eh: TJSHTMLElement;\r\nbegin\r\n if ((csLoading in ComponentState) and (FFormContainer <> '')) or (not Popup and not Assigned(ElementHandle)) then\r\n begin\r\n SetHeightInt(AValue);\r\n if Assigned(FormContainerElement) then\r\n begin\r\n if (Uppercase(FormContainerElement.tagName) <> 'BODY') and not IsLinked then\r\n TJSHTMLElement(FormContainerElement).style.setProperty('height',inttostr(AValue)+'px');\r\n end;\r\n Exit;\r\n end;\r\n\r\n inherited;\r\n\r\n if (FFormContainer <> '') and Assigned(FormContainerElement) then\r\n begin\r\n TJSHTMLElement(FormContainerElement).style.setProperty('height',inttostr(AValue)+'px');\r\n Realign;\r\n end;\r\n\r\n if Popup then\r\n begin\r\n eh := FPopupElement;\r\n if Assigned(eh) then\r\n eh.style.setProperty('height',inttostr(AValue)+'px');\r\n end;\r\nend;\r\n\r\nprocedure TCustomForm.SetLeft(AValue: Integer);\r\nvar\r\n eh: TJSHTMLElement;\r\nbegin\r\n inherited;\r\n if Popup then\r\n begin\r\n eh := FPopupElement;\r\n if Assigned(eh) then\r\n eh.style.setProperty('left',inttostr(avalue)+'px');\r\n end;\r\nend;\r\n\r\nprocedure TCustomForm.SetModalResult(const Value: TModalResult);\r\nbegin\r\n FModalResult := Value;\r\n if (FModalResult <> mrNone) then\r\n Close;\r\nend;\r\n\r\nprocedure TCustomForm.SetPosition(const Value: TPosition);\r\nbegin\r\n FPosition := Value;\r\nend;\r\n\r\nprocedure TCustomForm.SetShadow(const Value: boolean);\r\nbegin\r\n if (FShadow <> Value) then\r\n begin\r\n FShadow := Value;\r\n UpdateElement;\r\n end;\r\nend;\r\n\r\nprocedure TCustomForm.SetTop(AValue: Integer);\r\nvar\r\n eh: TJSHTMLElement;\r\nbegin\r\n inherited;\r\n if Popup then\r\n begin\r\n eh := FPopupElement;\r\n if Assigned(eh) then\r\n eh.style.setProperty('top',IntToStr(avalue)+'px');\r\n end;\r\nend;\r\n\r\nprocedure TCustomForm.SetWidth(AValue: Integer);\r\nvar\r\n eh: TJSHTMLElement;\r\nbegin\r\n if ((csLoading in ComponentState) and (FFormContainer <> '')) or (not Popup and not Assigned(ElementHandle)) then\r\n begin\r\n SetWidthInt(AValue);\r\n Exit;\r\n end;\r\n\r\n inherited;\r\n\r\n if Popup then\r\n begin\r\n eh := FPopupElement;\r\n if Assigned(eh) then\r\n eh.style.setProperty('width',IntToStr(avalue)+'px');\r\n end;\r\nend;\r\n\r\nprocedure TCustomForm.SelectFirst;\r\nbegin\r\n if ControlCount > 0 then\r\n Controls[0].SetFocus;\r\nend;\r\n\r\nprocedure TCustomForm.SelectNext(CurControl: TControl; GoForward: boolean; CheckTabStop: boolean);\r\nvar\r\n i: integer;\r\nbegin\r\n if ControlCount > 0 then\r\n begin\r\n for i := 0 to ControlCount - 1 do\r\n begin\r\n if Controls[i] = CurControl then\r\n begin\r\n if GoForward then\r\n begin\r\n if i + 1 <= ControlCount - 1 then\r\n Controls[i + 1].SetFocus\r\n else\r\n Controls[0].SetFocus;\r\n end\r\n else\r\n begin\r\n if i - 1 >= 0 then\r\n Controls[i - 1].SetFocus\r\n else\r\n Controls[ControlCount - 1].SetFocus;\r\n end;\r\n break;\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TCustomForm.Show;\r\nvar\r\n dr: TJSDOMRect;\r\nbegin\r\n if FCreating and FPopup then\r\n begin\r\n Application.ChangeMaxZIndex(+1);\r\n FCreating := false;\r\n UpdateElement;\r\n end;\r\n\r\n if (FormFileName = '') then\r\n begin\r\n if not Assigned(Container) then\r\n begin\r\n if FPopup then\r\n begin\r\n Container := CreateElement;\r\n// TJSHTMLElement(FLayer).style.setProperty(CSSBackground,'silver');\r\n FPopupElement := TJSHTMLElement(Container);\r\n SetFormPos;\r\n UpdateElement;\r\n FLayer.appendChild(Container);\r\n end\r\n else\r\n begin\r\n Container := CreateLayer;\r\n TJSHTMLElement(Container).style.setProperty(CSSBackground,ColorToHTML(Color));\r\n document.body.appendChild(Container);\r\n end;\r\n end\r\n else\r\n begin\r\n if FPopup then\r\n begin\r\n SetFormPos;\r\n FLayer.appendChild(Container)\r\n end\r\n else\r\n begin\r\n if Assigned(FLayer) then\r\n begin\r\n FLayer.appendChild(Container)\r\n end\r\n else\r\n begin\r\n document.body.appendChild(Container);\r\n end;\r\n end;\r\n end;\r\n\r\n if FPopup then\r\n begin\r\n if (Border = fbSizeable) then\r\n begin\r\n dr := Container.getBoundingClientRect;\r\n FOrigWidth := Round(dr.Right - dr.Left);\r\n FOrigHeight := Round(dr.Bottom - dr.Top);\r\n FTimerID := window.setInterval(@HandleDoResize, 100);\r\n end\r\n else\r\n begin\r\n TJSHTMLElement(Container).style.setProperty('resize','');\r\n TJSHTMLElement(Container).style.setProperty('overflow','');\r\n end;\r\n end;\r\n end;\r\n\r\n Visible := True;\r\n\r\n DoShow;\r\nend;\r\n\r\nfunction TCustomForm.ShowModal: Integer;\r\nbegin\r\n Result := ShowModal(nil);\r\nend;\r\n\r\nfunction TCustomForm.ShowModal(AProc: TModalResultProc): TModalResult;\r\nbegin\r\n // create runtime form without HTML\r\n if FNoHTML or (FormFileName = '') then\r\n begin\r\n FPrevActiveForm := Application.ActiveForm;\r\n Application.FActiveForm := Self;\r\n if not FCreated then\r\n Application.CreateNewForm(Self, '');\r\n end;\r\n\r\n Result := mrNone;\r\n FNoHTML := false;\r\n FModalProc := AProc;\r\n ModalResult := mrNone;\r\n Show;\r\nend;\r\n\r\nprocedure TCustomForm.UnbindEvents;\r\nbegin\r\n inherited;\r\n\r\n if Assigned(FLayer) and (FPopupClose = pcOnDeactivate) then\r\n FLayer.removeEventListener('click', FDoClickPtr);\r\n\r\n if Assigned(FResizeObserver) then\r\n begin\r\n asm\r\n this.FResizeObserver.disconnect();\r\n end;\r\n end;\r\n\r\n window.removeEventListener('resize', FResizePtr);\r\n window.removeEventListener('load', FLoadedPtr);\r\n window.removeEventListener('DOMContentLoaded',FDOMContentLoadedPtr);\r\n document.removeEventListener('scroll', FScrollPtr);\r\n window.removeEventListener('unload', FUnloadPtr);\r\n window.removeEventListener('beforeunload', FBeforeUnloadPtr);\r\n window.removeEventListener('keydown', FKeyDownPtr);\r\n window.removeEventListener('orientationchange',FOrientationChangePtr);\r\n window.removeEventListener('hashchange',FHashChangePtr);\r\nend;\r\n\r\nprocedure TCustomForm.UpdateCSS(const id, css: string);\r\nbegin\r\n RemoveCSS(id);\r\n AddCSS(id,css);\r\nend;\r\n\r\nprocedure TCustomForm.UpdateElement;\r\nvar\r\n clr: string;\r\n el: TJSNode;\r\n\r\nbegin\r\n if FCreating then\r\n Exit;\r\n\r\n inherited;\r\n\r\n if IsUpdating then\r\n Exit;\r\n\r\n if Assigned(ElementHandle) or Assigned(Container) then\r\n begin\r\n if (FCaption <> '') then\r\n begin\r\n if not FPopup then\r\n window.document.title := FCaption\r\n else\r\n begin\r\n if Assigned(FCaptionElement) then\r\n begin\r\n el := FCaptionElement.childNodes[0];\r\n if Assigned(el) then\r\n el.nodeValue := FCaption;\r\n\r\n if ShowClose and not Assigned(FCaptionCloseElement) then\r\n begin\r\n FCaptionCloseElement := TJSHTMLElement(document.createElement('SPAN'));\r\n FCaptionCloseElement.style.setProperty('float','right');\r\n FCaptionCloseElement.style.setProperty('cursor','default');\r\n FCaptionCloseElement.style.setProperty('margin-right','8px');\r\n FCaptionCloseElement.innerHTML := '✖';\r\n FCaptionElement.appendChild(FCaptionCloseElement);\r\n FCaptionCloseElement.addEventListener('click', @HandleCloseClick);\r\n end;\r\n\r\n SetHTMLElementFont(FCaptionElement, Font, not ((ElementCaptionClassName = '') and (ElementFont = efProperty)));\r\n end;\r\n end;\r\n end;\r\n end;\r\n\r\n\r\n if Assigned(Container) then\r\n begin\r\n clr := ColorToHtml(Color);\r\n\r\n if Assigned(Container) then\r\n begin\r\n if (Color <> clNone) and ((Color <> clWhite) and not Popup) and (ElementClassName = '') then\r\n TJSHTMLElement(Container).style.setProperty(CSSBackground,clr);\r\n\r\n if not Popup and (CSSLibrary <> cssNone) then\r\n TJSHTMLElement(document.body).style.removeProperty(CSSBackground);\r\n\r\n if (ElementClassName <> '') or (Color = clNone) or ((Color = clWhite) and not Popup) then\r\n TJSHTMLElement(Container).style.removeProperty(CSSBackground);\r\n\r\n if (ElementClassName = '') and not Popup then\r\n begin\r\n // make sure body stretches over the entire page\r\n //TJSHTMLElement(Container).style.setProperty('height','100%');\r\n asm\r\n document.documentElement.style.setProperty('height','100%');\r\n end;\r\n end;\r\n\r\n SetHTMLElementFont(TJSHTMLElement(Container), Font, not ((ElementClassName = '') and (ElementFont = efProperty)));\r\n end;\r\n\r\n if FPopup then\r\n begin\r\n if not Assigned(FPopupElement) then\r\n FPopupElement := TJSHTMLElement(Container);\r\n\r\n if ElementPopupClassName <> '' then\r\n begin\r\n TJSHTMLElement(Container).style.removeProperty('border');\r\n TJSHTMLElement(FPopupElement).setAttribute('class', FElementPopupClassName);\r\n end\r\n else\r\n begin\r\n if FShadow then\r\n begin\r\n TJSHTMLElement(FPopupElement).style.setProperty('box-shadow','3px 3px 3px silver')\r\n end\r\n else\r\n begin\r\n TJSHTMLElement(FPopupElement).style.removeProperty('box-shadow');\r\n end;\r\n\r\n TJSHTMLElement(FPopupElement).style.setProperty('border','1px solid gray');\r\n end;\r\n\r\n if (CSSLibrary = cssBootstrap) and (ElementClassName = '') then\r\n begin\r\n TJSHTMLElement(FPopupElement).setAttribute('class', 'card');\r\n TJSHTMLElement(FPopupElement).style.setProperty('display', 'block');\r\n TJSHTMLElement(Container).style.removeProperty('box-shadow');\r\n end;\r\n end\r\n else\r\n begin\r\n TJSHTMLElement(Container).style.removeProperty('box-shadow');\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TCustomForm.VisibleChanged;\r\nvar\r\n LIsBody: boolean;\r\nbegin\r\n inherited;\r\n\r\n if Assigned(FLayer) then\r\n begin\r\n if Visible then\r\n TJSHTMLElement(FLayer).style.setProperty('display','')\r\n else\r\n TJSHTMLElement(FLayer).style.setProperty('display','none');\r\n end\r\n else\r\n begin\r\n LIsBody := LowerCase(ElementID) = cBodyTag;\r\n\r\n if Assigned(Container) and (FormContainer <> '') and not LIsBody then\r\n begin\r\n if Visible then\r\n TJSHTMLElement(Container).style.setProperty('display','')\r\n else\r\n TJSHTMLElement(Container).style.setProperty('display','none');\r\n end;\r\n end;\r\nend;\r\n\r\n\r\nprocedure TCustomForm.Paint;\r\nbegin\r\n //\r\nend;\r\n\r\nprocedure TCustomForm.PreventDefault;\r\nbegin\r\n ElementEvent.preventDefault();\r\nend;\r\n\r\nfunction TCustomForm.HandleObserver: boolean;\r\nbegin\r\n Resize;\r\n Result := true;\r\nend;\r\n\r\nfunction TCustomForm.HandleOrientationChange(Event: TJSEvent): Boolean;\r\nvar\r\n so: TScreenOrientation;\r\n isPortrait: boolean;\r\nbegin\r\n Resize;\r\n Realign;\r\n Result := true;\r\n\r\n if Assigned(OnOrientationChange) then\r\n begin\r\n asm\r\n var mql = window.matchMedia(\"(orientation: portrait)\");\r\n isPortrait = (mql.matches);\r\n end;\r\n\r\n if isPortrait then\r\n so := soLandscape\r\n else\r\n so := soPortrait;\r\n\r\n OnOrientationChange(Self, so);\r\n end;\r\n\r\n if Assigned(OnResize) then\r\n OnResize(Self);\r\nend;\r\n\r\nfunction TCustomForm.HandleResize(Event: TEventListenerEvent): boolean;\r\nbegin\r\n if Visible and not (csDestroying in ComponentState) then\r\n begin\r\n if not Assigned(Container) then\r\n CreateControl;\r\n\r\n Resize;\r\n\r\n // retrigger in case resize changed scrollbar visibility\r\n if (ElementHandle = document.body) then\r\n window.setTimeout(@Resize, 25);\r\n end;\r\n\r\n // make sure HandleObserver is not optimized away\r\n if (1<0) then\r\n begin\r\n HandleObserver;\r\n end;\r\n\r\n Result := true;\r\nend;\r\n\r\nfunction TCustomForm.GetActiveControl: TWinControl;\r\nvar\r\n i: integer;\r\nbegin\r\n Result := FActiveControl;\r\n\r\n\r\n for i := 0 to ControlCount - 1 do\r\n begin\r\n if Controls[i].ElementHandle = document.activeElement then\r\n begin\r\n Result := TWinControl(Controls[i]);\r\n break;\r\n end;\r\n\r\n end;\r\nend;\r\n\r\nfunction TCustomForm.GetCanvas: TCanvas;\r\nbegin\r\n Result := nil;\r\nend;\r\n\r\nfunction TCustomForm.GetCaptionHeight: integer;\r\nvar\r\n r: TJSDOMRect;\r\nbegin\r\n Result := 0;\r\n if Assigned(FCaptionElement) and (Border in [fbDialog, fbDialogSizeable]) then\r\n begin\r\n r := FCaptionElement.getBoundingClientRect;\r\n Result := Round(r.Bottom - r.Top);\r\n end;\r\nend;\r\n\r\nfunction TCustomForm.GetClientRect: TRect;\r\n//var\r\n// ch: integer;\r\nbegin\r\n Result := inherited GetClientRect;\r\n\r\n// if FHasCaption then\r\n// begin\r\n// ch := GetCaptionHeight - 2;\r\n// Result.Top := Result.Top + ch;\r\n// Result.Bottom := Result.Bottom + ch;\r\n// end;\r\nend;\r\n\r\nfunction TCustomForm.GetElementBindHandle: TJSEventTarget;\r\nbegin\r\n if (csDesigning in ComponentState) then\r\n begin\r\n Result := TJSEventTarget(window);\r\n Exit;\r\n end;\r\n\r\n if (FormContainer <> '') then\r\n begin\r\n Result := TJSEventTarget(window);\r\n end\r\n else\r\n begin\r\n if not FPopup then\r\n begin\r\n Result := TJSEventTarget(window);\r\n end\r\n else\r\n Result := inherited GetElementBindHandle;\r\n end;\r\nend;\r\n\r\nfunction TCustomForm.GetElementHandle: TJSHTMLElement;\r\nbegin\r\n if FPopup then\r\n begin\r\n Result := inherited GetElementHandle;\r\n if not Assigned(Result) then\r\n Result := FPopupElement;\r\n end\r\n else\r\n Result := TJSHTMLElement(FormContainerElement);\r\nend;\r\n\r\nfunction TCustomForm.GetFormStyle: TFormStyle;\r\nbegin\r\n Result := FFormStyle;\r\nend;\r\n\r\nfunction TCustomForm.GetClientHeight: Integer;\r\nbegin\r\n if (Self.Border in [fbDialog, fbDialogSizeable]) then\r\n begin\r\n Result := Height {- Application.FormCaptionHeight};\r\n end\r\n else\r\n Result := inherited;\r\nend;\r\n\r\nfunction TCustomForm.GetHeight: Integer;\r\nvar\r\n d: integer;\r\n s: string;\r\n css: TJSCSSStyleDeclaration;\r\n el: TJSHTMLElement;\r\n dr: TJSDOMRect;\r\nbegin\r\n if (FFormElement <> '') then\r\n begin\r\n el := TJSHTMLElement(document.getElementById(FFormElement));\r\n if Assigned(el) then\r\n begin\r\n dr := el.getBoundingClientRect;\r\n Result := Round(dr.bottom - dr.top);\r\n Exit;\r\n end\r\n end;\r\n\r\n if (ElementHandle = document.body) then\r\n begin\r\n css := window.getComputedStyle(ElementHandle);\r\n s := css.getPropertyValue('margin-top');\r\n s := Copy(s,1,Length(s) - 2);\r\n d := Round(StrToFloat(s, TFormatSettings.Invariant) - 2); // div 2;\r\n\r\n dr := document.documentElement.getBoundingClientRect;\r\n Result := Round(dr.Height);\r\n\r\n if Result > window.innerHeight then\r\n Result := window.innerHeight - Max(0,d);\r\n end\r\n else\r\n begin\r\n if FPopup then\r\n begin // take caption border in account\r\n Result := inherited GetHeight // GetCaptionHeight - 2;\r\n end\r\n else\r\n begin\r\n Result := Round(ElementHandle.offsetHeight);\r\n if Result = 0 then\r\n begin\r\n if FFormContainer <> '' then\r\n Result := inherited GetHeight\r\n else\r\n Result:= window.innerHeight;\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\nclass function TCustomForm.GetHTMLFileName: string;\r\nbegin\r\n Result := Self.UnitName + Application.GetFormExtension;\r\nend;\r\n\r\nfunction TCustomForm.GetLeft: Integer;\r\nvar\r\n el: TJSHTMLElement;\r\n dr: TJSDOMRect;\r\nbegin\r\n if FPopup then\r\n begin\r\n Result := inherited GetLeft\r\n end\r\n else\r\n begin\r\n if (FFormElement <> '') then\r\n begin\r\n el := TJSHTMLElement(document.getElementById(FFormElement));\r\n if Assigned(el) then\r\n begin\r\n dr := el.getBoundingClientRect;\r\n Result := Round(dr.left);\r\n end;\r\n end\r\n else\r\n begin\r\n el := nil;\r\n if (FormContainer <> '') then\r\n el := TJSHTMLElement(document.getElementById(FormContainer));\r\n\r\n if not Assigned(el) then\r\n el := ElementHandle; \r\n\r\n Result := Round(el.offsetLeft);\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TCustomForm.GetMethodPointers;\r\nbegin\r\n inherited;\r\n\r\n if FLoadedPtr = nil then\r\n begin\r\n FLoadedPtr := @HandleLoaded;\r\n FDOMContentLoadedPtr := @HandleDOMContentLoaded;\r\n FUnloadPtr := @HandleUnLoad;\r\n FBeforeUnloadPtr := @HandleBeforeUnload;\r\n FResizePtr := @HandleResize;\r\n FScrollPtr := @HandleScroll;\r\n FDocMouseUpPtr := @HandleDocMouseUp;\r\n FDocMouseMovePtr := @HandleDocMouseMove;\r\n FTitleDownPtr := @HandleTitleDown;\r\n FDoClickPtr := @HandleDoClick;\r\n FKeyDownPtr := @HandleKeyDown;\r\n FOrientationChangePtr := @HandleOrientationChange;\r\n FHashChangePtr := @HandleHashChange;\r\n end;\r\nend;\r\n\r\nfunction TCustomForm.GetTop: Integer;\r\nvar\r\n el: TJSHTMLElement;\r\n dr: TJSDOMRect;\r\nbegin\r\n if FPopup then\r\n Result := inherited GetTop\r\n else\r\n begin\r\n if (FFormElement <> '') then\r\n begin\r\n el := TJSHTMLElement(document.getElementById(FFormElement));\r\n if Assigned(el) then\r\n begin\r\n dr := el.getBoundingClientRect;\r\n Result := Round(dr.top);\r\n end;\r\n end\r\n else\r\n begin\r\n el := nil;\r\n if (FormContainer <> '') then\r\n el := TJSHTMLElement(document.getElementById(FormContainer));\r\n\r\n if not Assigned(el) then\r\n el := ElementHandle; \r\n Result := Round(el.offsetTop);\r\n end; \r\n end;\r\nend;\r\n\r\nfunction TCustomForm.GetUniqueComponentName(AComponent: TComponent): string;\r\nvar\r\n s: string;\r\n i,j: integer;\r\n found: boolean;\r\nbegin\r\n i := 1;\r\n repeat\r\n found := false;\r\n\r\n s := Copy(ClassName,2, Length(ClassName)) + '_' + Copy(AComponent.ClassName, 2, Length(AComponent.ClassName)) + IntToStr(i);\r\n inc(i);\r\n\r\n for j := 0 to ComponentCount - 1 do\r\n begin\r\n if Components[j].Name = s then\r\n begin\r\n found := true;\r\n break;\r\n end;\r\n end;\r\n\r\n until found = false;\r\n\r\n Result := s;\r\nend;\r\n\r\nfunction TCustomForm.GetWidth: Integer;\r\nvar\r\n dr: TJSDOMRect;\r\n el: TJSHTMLElement;\r\n// s: string;\r\n// d: integer;\r\n// css: TJSCSSStyleDeclaration;\r\nbegin\r\n if (FFormElement <> '') then\r\n begin\r\n el := TJSHTMLElement(document.getElementById(FFormElement));\r\n if Assigned(el) then\r\n begin\r\n dr := el.getBoundingClientRect;\r\n Result := Round(dr.right - dr.left);\r\n Exit;\r\n end\r\n end;\r\n\r\n if (ElementHandle = document.body) then\r\n begin\r\n {\r\n css := window.getComputedStyle(ElementHandle);\r\n s := css.getPropertyValue('margin-left');\r\n s := Copy(s,1,Length(s) - 2);\r\n d := StrToInt(s) - 2;\r\n Result := window.innerWidth - d + 4;\r\n Result := window.innerWidth;\r\n }\r\n\r\n dr := document.documentElement.getBoundingClientRect;\r\n Result := Round(dr.Width);\r\n\r\n if Result > window.innerWidth then\r\n Result := window.innerWidth;\r\n end\r\n else\r\n begin\r\n if FPopup then\r\n Result := inherited GetWidth\r\n else\r\n begin\r\n\r\n Result := Round(ElementHandle.offsetWidth);\r\n if Result = 0 then\r\n begin\r\n if FFormContainer <> '' then\r\n Result := inherited GetWidth\r\n else\r\n Result := window.innerWidth;\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TCustomForm.HandleBeforeUnload(Event: TEventListenerEvent): boolean;\r\nvar\r\n msg: string;\r\nbegin\r\n msg := '';\r\n if Assigned(OnBeforeUnload) then\r\n OnBeforeUnload(Self,msg);\r\n\r\n if msg <> '' then\r\n begin\r\n asm\r\n Event.returnValue = msg;\r\n return msg;\r\n end;\r\n end;\r\n\r\n Result := true;\r\nend;\r\n\r\nfunction TCustomForm.HandleCloseClick(Event: TEventListenerEvent): boolean;\r\nvar\r\n CanClose: boolean;\r\n\r\nbegin\r\n CanClose := true;\r\n\r\n if Assigned(OnCloseQuery) then\r\n OnCloseQuery(self, CanClose);\r\n\r\n if CanClose then\r\n Close;\r\n\r\n Result := true;\r\nend;\r\n\r\nfunction TCustomForm.HandleDoClick(Event: TJSMouseEvent): Boolean;\r\nbegin\r\n Event.stopPropagation;\r\n\r\n if FPopupClose = pcOnDeactivate then\r\n Close;\r\n\r\n Result := True;\r\nend;\r\n\r\nfunction TCustomForm.HandleDocMouseMove(Event: TJSMouseEvent): Boolean;\r\nvar\r\n deltax,deltay: double;\r\n el: TJSHTMLElement;\r\n l,t: integer;\r\nbegin\r\n if FDown and Assigned(Container) then\r\n begin\r\n deltax := Event.clientX - FMdx;\r\n deltay := Event.clientY - FMdy;\r\n\r\n if FHasCaption and (FormFileName <> '') then\r\n el := TJSHTMLElement(Container.parentNode)\r\n else\r\n el := TJSHTMLElement(Container);\r\n\r\n el.style.setProperty('transform','');\r\n el.style.setProperty('position','absolute');\r\n\r\n l := round(FDlgX + deltax);\r\n t := round(FDlgY + deltay);\r\n\r\n el.style.setProperty('left', inttostr(l)+'px');\r\n el.style.setProperty('top', inttostr(t)+'px');\r\n\r\n FLeft := l;\r\n FTop := t;\r\n\r\n// el := TJSHTMLElement(FCancel);\r\n// el.style.setProperty('position', 'absolute');\r\n// el.style.setProperty('top', '0');\r\n// el.style.setProperty('right', '0');\r\n end;\r\n\r\n Result := true;\r\nend;\r\n\r\nfunction TCustomForm.HandleDocMouseUp(Event: TJSMouseEvent): Boolean;\r\nbegin\r\n if FDown then\r\n begin\r\n FCaptured := false;\r\n FDown := false;\r\n document.body.removeEventListener('mousemove', FDocMouseMovePtr);\r\n document.body.removeEventListener('mouseup', FDocMouseUpPtr);\r\n if Assigned(FMoveSpan) then\r\n document.body.removeChild(FMoveSpan);\r\n\r\n EventStopPropagation := EventStopPropagation + [eeMouseMove, eeMouseUp];\r\n\r\n FMoveSpan := nil;\r\n end;\r\n Result := true;\r\nend;\r\n\r\nfunction TCustomForm.HandleDOMContentLoaded(\r\n Event: TEventListenerEvent): boolean;\r\nbegin\r\n if Assigned(OnDOMContentLoaded) then\r\n OnDOMContentLoaded(Self);\r\n Result := true;\r\nend;\r\n\r\nprocedure TCustomForm.HandleDoResize;\r\nvar\r\n dr: TJSDOMRect;\r\n neww,newh: integer;\r\nbegin\r\n dr := Container.getBoundingClientRect;\r\n\r\n neww := Round(dr.Right - dr.Left);\r\n newh := Round(dr.Bottom - dr.Top);\r\n\r\n if (neww <> FOrigWidth) or (newh <> FOrigHeight) then\r\n begin\r\n Width := neww;\r\n Height := newh;\r\n\r\n dr := Container.getBoundingClientRect;\r\n FOrigWidth := Round(dr.Right - dr.Left);\r\n FOrigHeight := Round(dr.Bottom - dr.Top);\r\n\r\n AlignControl(Self);\r\n end;\r\nend;\r\n\r\n\r\nfunction TCustomForm.HandleHashChange(Event: TEventListenerEvent): boolean;\r\nvar\r\n oldURL,newURL,newHash: string;\r\n pc: TPersistentClass;\r\n newform: TForm;\r\nbegin\r\n asm\r\n oldURL = Event.oldURL;\r\n newURL = Event.newURL;\r\n end;\r\n\r\n if Assigned(OnHashChange) then\r\n begin\r\n OnHashChange(Self, oldURL, newURL);\r\n end;\r\n\r\n if Application.FRouting then\r\n begin\r\n NewHash := copy(newURL, pos('#', newURL) + 1, Length(newURL));\r\n\r\n pc := GetClass('T' + Name);\r\n\r\n if Assigned(pc) and (LastHash <> NewHash) then\r\n begin\r\n if (pos('#' + Name + '_', oldURL + '_') <> 0) and\r\n (pos('#' + Name + '_', newURL + '_') = 0) then\r\n begin\r\n Close;\r\n end;\r\n\r\n if not Popup then\r\n begin\r\n pc := GetClass('T' + NewHash);\r\n if Assigned(pc) then\r\n begin\r\n Application.AutoCreateForm(TFormClass(pc), newform);\r\n end;\r\n end;\r\n end;\r\n end;\r\n\r\n Result := true;\r\nend;\r\n\r\nfunction TCustomForm.HandleKeyDown(Event: TJSKeyBoardEvent): Boolean;\r\nvar\r\n k: Word;\r\nbegin\r\n k := GetKeyCode(Event.Key);\r\n if not Assigned(k) then\r\n Exit;\r\n\r\n if (k = VK_ESCAPE) and not (csDesigning in ComponentState) and Popup then\r\n begin\r\n Close;\r\n end;\r\n Result := true;\r\nend;\r\n\r\nfunction TCustomForm.HandleTitleDown(Event: TJSMouseEvent): Boolean;\r\nvar\r\n r: TJSDOMRect;\r\nbegin\r\n Event.StopPropagation;\r\n Event.PreventDefault;\r\n\r\n FPopupClose := pcNever;\r\n\r\n FMdx := Round(Event.clientX);\r\n FMdy := Round(Event.clientY);\r\n\r\n if FHasCaption and (FormFileName <> '') then\r\n r := TJSHTMLElement(Container.parentNode).getBoundingClientRect()\r\n else\r\n r := TJSHTMLElement(Container).getBoundingClientRect();\r\n\r\n FDlgX := Round(int(r.left));\r\n FDlgY := Round(int(r.top));\r\n\r\n FDown := true;\r\n\r\n if not FCaptured then\r\n begin\r\n FCaptured := true;\r\n FMoveSpan := TJSHTMLElement(document.createElement('SPAN'));\r\n FMoveSpan.style.setProperty('top', '0');\r\n FMoveSpan.style.setProperty('left', '0');\r\n FMoveSpan.style.setProperty('right', '0');\r\n FMoveSpan.style.setProperty('bottom', '0');\r\n FMoveSpan.style.setProperty('position', 'absolute');\r\n\r\n document.body.appendChild(FMoveSpan);\r\n\r\n EventStopPropagation := EventStopPropagation - [eeMouseMove, eeMouseUp];\r\n\r\n document.body.addEventListener('mousemove', FDocMouseMovePtr);\r\n document.body.addEventListener('mouseup', FDocMouseUpPtr);\r\n end;\r\n\r\n Result := true;\r\nend;\r\n\r\nprocedure TCustomForm.DoClose(var CloseAction: TCloseAction);\r\nbegin\r\n if Assigned(FModalProc) and (CloseAction <> caNone) then\r\n begin\r\n FModalProc(FModalResult);\r\n FModalProc := nil;\r\n end;\r\nend;\r\n\r\nprocedure TCustomForm.DoCreate;\r\nbegin\r\n BeginUpdate;\r\n LoadDFMValues;\r\n Loaded;\r\n\r\n if Assigned(OnCreate) then\r\n OnCreate(Self);\r\n\r\n FCreating := false;\r\n\r\n EndUpdate;\r\n\r\n UpdateChildren(Self);\r\n\r\n Realign;\r\n\r\n DoResize;\r\nend;\r\n\r\nfunction TCustomForm.HandleScroll(Event: TEventListenerEvent): boolean;\r\nbegin\r\n if Assigned(OnScroll) then\r\n OnScroll(Self);\r\n Result := true;\r\nend;\r\n\r\nprocedure TCustomForm.DoAutoFocus;\r\nvar\r\n i: integer;\r\nbegin\r\n // Auto focus control on form\r\n for i := 0 to ControlCount - 1 do\r\n begin\r\n if (Controls[i].TabOrder = 0) and (Controls[i].TabStop) then\r\n begin\r\n Controls[i].SetFocus;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TCustomForm.DoShow;\r\nbegin\r\n DoAutoFocus;\r\n if Assigned(OnShow) and not FShown then\r\n begin\r\n FShown := true;\r\n OnShow(Self);\r\n end;\r\nend;\r\n\r\nfunction TCustomForm.HandleUnload(Event: TEventListenerEvent): boolean;\r\nbegin\r\n if Assigned(OnUnload) then\r\n OnUnload(Self);\r\n Result := true;\r\nend;\r\n\r\nfunction TCustomForm.FormContainerElement: TJSElement;\r\nbegin\r\n if (csDesigning in ComponentState) then\r\n begin\r\n if Assigned(FDesignContainer) then\r\n Result := FDesignContainer\r\n end;\r\n\r\n if (FormContainer <> '') then\r\n begin\r\n Result := document.getElementById(FormContainer);\r\n if not Assigned(Result) then\r\n Result := document.body;\r\n end\r\n else\r\n begin\r\n Result := document.body;\r\n end;\r\nend;\r\n\r\nfunction TCustomForm.HandleLoaded(Event: TEventListenerEvent): boolean;\r\nbegin\r\n Resize;\r\n InitAnchoring;\r\n Result := true;\r\nend;\r\n\r\nprocedure TCustomForm.Realign;\r\nvar\r\n el: TJSHTMLElement;\r\n dr: TJSDOMRect;\r\n r: TRect;\r\nbegin\r\n if (FFormContainer <> '') and (Align <> alNone) then\r\n begin\r\n el := TJSHTMLElement( document.getElementById(FFormContainer) );\r\n if Assigned(el) then\r\n begin\r\n dr := el.getBoundingClientRect;\r\n\r\n if (dr.width = 0) and (dr.height = 0) and (el.style.getPropertyValue('position') = 'absolute') then\r\n begin\r\n r := GetHTMLElementAbsoluteRect(el);\r\n end\r\n else\r\n begin\r\n r := Rect(Round(dr.left), Round(dr.Top), Round(dr.Right), Round(dr.Bottom));\r\n end;\r\n\r\n SetBoundsInt(r.Left, r.Top, r.Right - r.Left, r.Bottom - r.Top);\r\n end;\r\n end;\r\n\r\n inherited;\r\nend;\r\n\r\nprocedure TCustomForm.DoResize;\r\nvar\r\n w,h: integer;\r\nbegin\r\n w := Width;\r\n h := Height;\r\n\r\n if (w = FOldWidth) and (h = FOldHeight) then\r\n Exit;\r\n\r\n FOldWidth := w;\r\n FOldHeight := h;\r\n\r\n if Assigned(OnResize) then\r\n OnResize(Self);\r\nend;\r\n\r\ndestructor TCustomForm.Destroy;\r\nbegin\r\n if Visible then\r\n Close;\r\n\r\n if Assigned(OnDestroy) then\r\n OnDestroy(Self);\r\n\r\n inherited;\r\n\r\n if Assigned(FLayer) then\r\n begin\r\n if FormContainerElement = FLayer.parentNode then\r\n FormContainerElement.removeChild(FLayer);\r\n FLayer := nil;\r\n end;\r\nend;\r\n\r\nconstructor TCustomForm.Create(id: string);\r\nbegin\r\n FNoHTML := false;\r\n FCreating := true;\r\n FFormContainer := id;\r\n if id = '' then\r\n inherited Create(cBodyTag)\r\n else\r\n inherited Create(id);\r\n\r\n FFormElement := '';\r\n FModalResult := mrNone;\r\n FFormStyle := fsNormal;\r\n DoCreate;\r\nend;\r\n\r\nconstructor TCustomForm.Create(id: string; var AReference);\r\nbegin\r\n FCreating := true;\r\n FFormContainer := id;\r\n inherited Create(id);\r\n AReference := Self;\r\n FFormElement := '';\r\n FModalResult := mrNone;\r\n FFormStyle := fsNormal;\r\n DoCreate;\r\nend;\r\n\r\nprocedure TCustomForm.CreateInitialize;\r\nbegin\r\n inherited;\r\n AllowTouch := True;\r\n FModalResult := mrNone;\r\n FFormStyle := fsNormal;\r\n FBorder := fbSizeable;\r\n FShadow := true;\r\n FShowClose := true;\r\n FTimerID := -1;\r\n FCaptionElement := nil;\r\n FColor := clWhite;\r\n TJSEventTarget(window).addEventListener('load', FLoadedPtr);\r\nend;\r\n\r\nconstructor TCustomForm.CreateNew(AOwner: TComponent; Dummy: Integer = 0);\r\nbegin\r\n Create(AOwner);\r\nend;\r\n\r\nconstructor TCustomForm.CreateDialog(ACaption: string);\r\nvar\r\n AFileName: string;\r\nbegin\r\n FCreating := true;\r\n AFileName := GetHTMLFileName;\r\n inherited Create(cBodyTag);\r\n Caption := ACaption;\r\n Popup := true;\r\n Border := fbDialog;\r\n FormFileName := AFileName;\r\n Application.LoadForm(Self, AFileName);\r\nend;\r\n\r\nconstructor TCustomForm.CreateDialogNew(ACaption: string);\r\nvar\r\n AFileName: string;\r\nbegin\r\n FNoHTML := true;\r\n FCreating := true;\r\n AFileName := GetHTMLFileName;\r\n inherited Create(cBodyTag);\r\n Caption := ACaption;\r\n Popup := true;\r\n Border := fbDialog;\r\n FormFileName := AFileName;\r\nend;\r\n\r\nconstructor TCustomForm.CreateNew;\r\nvar\r\n AFileName: string;\r\nbegin\r\n FCreating := true;\r\n AFileName := GetHTMLFileName;\r\n inherited Create(cBodyTag);\r\n FormFileName := AFileName;\r\n if FormFileName <> '' then\r\n Application.LoadForm(Self, AFileName);\r\nend;\r\n\r\nconstructor TCustomForm.CreateNew(AFileName: string);\r\nbegin\r\n FCreating := true;\r\n inherited Create(cBodyTag);\r\n FormFileName := AFileName;\r\n if FormFileName <> '' then\r\n Application.LoadForm(Self, AFileName);\r\nend;\r\n\r\nconstructor TCustomForm.CreateNew(AProc: TFormCreatedProc);\r\nbegin\r\n FCreatedProc := AProc;\r\n CreateNew;\r\nend;\r\n\r\nconstructor TCustomForm.CreateNew(AElementID: string; AProc: TFormCreatedProc);\r\nbegin\r\n CreateNew(AElementID, '', AProc);\r\nend;\r\n\r\nconstructor TCustomForm.CreateNew(AElementID, AFileName: string; AProc: TFormCreatedProc);\r\nbegin\r\n FCreating := true;\r\n FFormContainer := AElementID;\r\n inherited Create(AElementID);\r\n FCreatedProc := AProc;\r\n FFormElement := AElementID;\r\n if AFileName = '' then\r\n AFileName := GetHTMLFileName;\r\n\r\n if AFileName <> '' then\r\n Application.LoadForm(Self, AFileName)\r\n else\r\n if Assigned(FCreatedProc) then\r\n FCreatedProc(Self);\r\nend;\r\n\r\n{ TApplication }\r\n\r\nfunction TApplication.CreateNewForm(AInstanceClass: TFormClass): TCustomForm;\r\nbegin\r\n if not Assigned(VSIDE) then\r\n Result := AInstanceClass.Create(cBodyTag)\r\n else\r\n Result := AInstanceClass.Create('');\r\nend;\r\n\r\nfunction TApplication.CreateNewForm(AInstanceClass: TFormClass; AElementID: string): TCustomForm;\r\nvar\r\n el: TJSHTMLElement;\r\n AForm: TForm;\r\nbegin\r\n el := TJSHTMLElement(document.getElementById(AElementID));\r\n\r\n AForm := AInstanceClass.Create(AElementID);\r\n AForm.FDesignContainer := el;\r\n AForm.FormContainer := AElementID;\r\n AForm.FFormElement := AElementID;\r\n AForm.CreateControl;\r\n AForm.Container := el;\r\n AForm.Init;\r\n\r\n Result := AForm;\r\nend;\r\n\r\nprocedure TApplication.LoadForm(AForm: TCustomForm; AFormFile: string; FormLoaded: TFormCreatedProc);\r\nbegin\r\n FCreatedProc := FormLoaded;\r\n LoadForm(AForm, AFormFile);\r\nend;\r\n\r\nprocedure TApplication.LoadForm(AForm: TCustomForm; AFormFile: string);\r\nbegin\r\n AForm.FPrevActiveForm := FActiveForm;\r\n\r\n FActiveForm := AForm;\r\n FLoadForm := AForm;\r\n\r\n if FMainForm = nil then\r\n FMainForm := AForm;\r\n\r\n FLastReq := TJSXMLHttpRequest.new;\r\n FLastReq.addEventListener('load', @DoFormLoad);\r\n FLastReq.addEventListener('abort', @DoFormAbort);\r\n FLastReq.open('GET', AFormFile);\r\n FLastReq.send;\r\nend;\r\n\r\nprocedure TApplication.Navigate(const AURL: string; ATarget: TNavigationTarget );\r\nbegin\r\n if ATarget = ntBlank then\r\n window.open(AURL, '_blank')\r\n else\r\n window.location.href := AURL;\r\nend;\r\n\r\nfunction TApplication.NeedsFormRouting: Boolean;\r\nvar\r\n s: string;\r\nbegin\r\n Result := HasQueryParam('form', s);\r\n if Result then\r\n RouteForm(s);\r\nend;\r\n\r\nfunction TApplication.ObjectURL(AFile: TJSHTMLFile): string;\r\nvar\r\n res: string;\r\nbegin\r\n asm\r\n res = URL.createObjectURL(AFile);\r\n end;\r\n Result := res;\r\nend;\r\n\r\nprocedure TApplication.CreateFormDirect(AInstanceClass: TFormClass; var AReference);\r\nbegin\r\n CreateForm(AInstanceClass, FAppContainer, AReference, nil, false);\r\nend;\r\n\r\nprocedure TApplication.CreateFormDirect(AInstanceClass: TFormClass; AElementID: string; var AReference);\r\nbegin\r\n CreateForm(AInstanceClass, AElementID, AReference, nil, false);\r\nend;\r\n\r\nprocedure TApplication.CreateFormDirect(AInstanceClass: TDataModuleClass; var AReference);\r\nbegin\r\n CreateForm(AInstanceClass, AReference);\r\nend;\r\n\r\nprocedure TApplication.CreateFormDirect(AInstanceClass: TFrameClass; var AReference);\r\nbegin\r\n CreateForm(AInstanceClass, AReference);\r\nend;\r\n\r\nprocedure TApplication.CreateForm(AInstanceClass: TFormClass; AElementID: string; var AReference);\r\nbegin\r\n CreateForm(AInstanceClass, AElementID, AReference, nil);\r\nend;\r\n\r\nprocedure TApplication.CreateForm(AInstanceClass: TFormClass; AElement: TJSHTMLElement; var AReference); overload;\r\nbegin\r\n CreateForm(AInstanceClass, AElement.ID, AReference, nil);\r\nend;\r\n\r\nprocedure TApplication.CreateForm(AInstanceClass: TFormClass; AElementID: string; var AReference; AProc: TFormCreatedProc);\r\nbegin\r\n CreateForm(AInstanceClass, AElementID, AReference, AProc, true);\r\nend;\r\n\r\nprocedure TApplication.CreateForm(AInstanceClass: TFormClass; AElementID: string; var AReference; AProc: TFormCreatedProc; LoadHTML: boolean);\r\nvar\r\n LFileName: string;\r\n\r\n function DoStatusCreate(Event: TEventListenerEvent): boolean;\r\n var\r\n LElem: TJSHTMLElement;\r\n LForm: TForm;\r\n LResponse: string;\r\n LIsBody: boolean;\r\n LisLoaded: boolean;\r\n begin\r\n LisLoaded := Assigned(Event);\r\n // HTML of the form being loaded\r\n if LisLoaded then\r\n begin\r\n asm\r\n LResponse = Event.target.responseText;\r\n end;\r\n\r\n LIsBody := LowerCase(AElementID) = cBodyTag;\r\n\r\n if LIsBody then\r\n LElem := TJSHTMLElement(document.body)\r\n else\r\n LElem := TJSHTMLElement(document.getElementById(AElementID));\r\n\r\n LElem.innerHTML := LResponse;\r\n end\r\n else\r\n begin\r\n LElem := TJSHTMLElement(document.body);\r\n end;\r\n\r\n LForm := AInstanceClass.Create(AElementID, AReference);\r\n LForm.FormFileName := LFileName;\r\n\r\n if LForm.FormContainer = '' then\r\n LForm.FormContainer := AElementID;\r\n\r\n if not LIsBody then\r\n begin\r\n LForm.FFormElement := AElementID;\r\n LForm.Container := LElem;\r\n end;\r\n\r\n LForm.CreateControl;\r\n LForm.Init;\r\n\r\n LForm.SetColorScheme(Application.ColorScheme);\r\n\r\n // set previous active form\r\n LForm.FPrevActiveForm := FActiveForm;\r\n\r\n FActiveForm := LForm;\r\n\r\n if FMainForm = nil then\r\n FMainForm := LForm;\r\n\r\n if Assigned(AProc) then\r\n AProc(LForm);\r\n\r\n Result := true;\r\n\r\n if LisLoaded then\r\n ActivateChildScripts(LElem);\r\n\r\n FActiveForm.DoShow;\r\n\r\n // force resize\r\n FActiveForm.Resize;\r\n end;\r\n\r\nbegin\r\n if FIsRedirect then\r\n Exit;\r\n\r\n if FAppInitializing then\r\n begin\r\n if FCanCreateForm then\r\n FCanCreateForm := False\r\n else\r\n Exit;\r\n end;\r\n\r\n LFileName := AInstanceClass.GetHTMLFileName;\r\n if (LFileName <> '') and LoadHTML then\r\n begin\r\n FLastReq := TJSXMLHttpRequest.new;\r\n FLastReq.addEventListener('load', @DoStatusCreate);\r\n FLastReq.open('GET', lFileName);\r\n {$IFDEF DEBUG}\r\n FLastReq.setRequestHeader('Cache-Control', 'no-cache');\r\n {$ENDIF}\r\n FLastReq.send;\r\n end\r\n else\r\n begin\r\n DoStatusCreate(nil);\r\n end;\r\nend;\r\n\r\nprocedure TApplication.ActivateChildScripts(AElement: TJSHTMLElement);\r\nbegin\r\n // activate possible child scripts\r\n asm\r\n function nodeScriptReplace(node) {\r\n if ( nodeScriptIs(node) === true ) {\r\n node.parentNode.replaceChild( nodeScriptClone(node) , node );\r\n }\r\n else {\r\n var i = 0;\r\n var children = node.childNodes;\r\n while ( i < children.length ) {\r\n nodeScriptReplace( children[i++] );\r\n }\r\n }\r\n\r\n return node;\r\n }\r\n function nodeScriptIs(node) {\r\n return node.tagName === 'SCRIPT';\r\n }\r\n function nodeScriptClone(node){\r\n var script = document.createElement(\"script\");\r\n script.async = false;\r\n script.text = node.innerHTML;\r\n for( var i = node.attributes.length-1; i >= 0; i-- ) {\r\n script.setAttribute( node.attributes[i].name, node.attributes[i].value );\r\n }\r\n return script;\r\n }\r\n nodeScriptReplace(AElement);\r\n end;\r\nend;\r\n\r\nprocedure TApplication.ReloadForm;\r\nvar\r\n lFileName: string;\r\n\r\n function DoStatusCreate(Event: TEventListenerEvent): boolean;\r\n var\r\n i: integer;\r\n ctl: TControl;\r\n s: string;\r\n sl: TStringList;\r\n response: string;\r\n\r\n begin\r\n asm\r\n response = Event.target.responseText;\r\n end;\r\n\r\n sl := TStringList.Create;\r\n\r\n // persist control state\r\n for i := FActiveForm.ControlCount - 1 downto 0 do\r\n begin\r\n ctl := FActiveForm.Controls[i];\r\n s := ctl.SaveState;\r\n ctl.ElementHandle.Id := ctl.Name;\r\n //s := ctl.Name +'='+ctl.ElementHandle.outerHTML;\r\n s := ctl.Name +'='+ s;\r\n sl.Add(s);\r\n end;\r\n\r\n for i := FActiveForm.ControlCount - 1 downto 0 do\r\n begin\r\n ctl := FActiveForm.Controls[i];\r\n FActiveForm.RemoveComponent(ctl);\r\n ctl.Free;\r\n end;\r\n\r\n FActiveForm.ClearControls;\r\n FActiveForm.UnbindEvents;\r\n\r\n // HTML of the form being loaded\r\n document.body.innerHTML := response;\r\n\r\n FActiveForm.CreateControl;\r\n FActiveForm.DoCreate;\r\n FActiveForm.Init;\r\n\r\n // persist control state\r\n for i := FActiveForm.ControlCount - 1 downto 0 do\r\n begin\r\n ctl := FActiveForm.Controls[i]; // get controls back after form init\r\n // get HTML saved for control\r\n s := sl.Values[ctl.Name];\r\n\r\n if s <> '' then\r\n ctl.LoadState(s);\r\n\r\n //ctl.ElementHandle.outerHTML := s;\r\n //ctl.Container := document.getElementById(ctl.Name);\r\n //ctl.BindEvents;\r\n end;\r\n\r\n sl.Free;\r\n\r\n FActiveForm.DoShow;\r\n\r\n Result := true;\r\n end;\r\n\r\nbegin\r\n lFileName := FActiveForm.GetHTMLFileName;\r\n\r\n FLastReq := TJSXMLHttpRequest.new;\r\n FLastReq.addEventListener('load', @DoStatusCreate);\r\n FLastReq.open('GET', lFileName);\r\n {$IFDEF DEBUG}\r\n FLastReq.setRequestHeader('Cache-Control', 'no-cache');\r\n {$ENDIF}\r\n FLastReq.send;\r\nend;\r\n\r\nfunction TApplication.HasCSS(href:string): boolean;\r\nvar\r\n els: TJSNodeList;\r\n i: integer;\r\n s: string;\r\nbegin\r\n Result := false;\r\n els := document.querySelectorAll('head > link');\r\n for i := 0 to els.length - 1 do\r\n begin\r\n s := TJSHTMLLinkElement(els[i]).href;\r\n\r\n if CompareText(s, href) = 0 then\r\n begin\r\n Result := true;\r\n break;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TApplication.RemoveCSS(id: string);\r\nvar\r\n styleElement: TJSElement;\r\nbegin\r\n styleElement := document.getElementById(id);\r\n if Assigned(styleElement) then\r\n begin\r\n styleElement.parentNode.removeChild(styleElement);\r\n end;\r\nend;\r\n\r\nprocedure TApplication.RouteForm(AParameter: string);\r\nvar\r\n frm: TCustomForm;\r\n fc: TFormClass;\r\nbegin\r\n fc := TFormClass(GetClass(AParameter));\r\n Application.CreateForm(fc, frm);\r\nend;\r\n\r\nprocedure TApplication.GoBack;\r\nbegin\r\n window.history.back();\r\nend;\r\n\r\nprocedure TApplication.AutoCreateForm(AInstanceClass: TFormClass; var AReference);\r\nbegin\r\n if Assigned(OnAutoCreateForm) then\r\n OnAutoCreateForm(Self, AInstanceClass, AReference)\r\n else\r\n CreateForm(AInstanceClass, AReference);\r\nend;\r\n\r\nprocedure TApplication.CreateForm(AInstanceClass: TFormClass; var AReference);\r\nbegin\r\n CreateForm(AInstanceClass, FAppContainer, AReference, nil);\r\nend;\r\n\r\nprocedure TApplication.CreateForm(AInstanceClass: TDataModuleClass; var AReference);\r\nvar\r\n lModule: TDataModule;\r\nbegin\r\n lModule := AInstanceClass.Create(Self);\r\n AReference := lModule;\r\nend;\r\n\r\nprocedure TApplication.CreateForm(AInstanceClass: TFrameClass; var AReference);\r\nconst\r\n cHTMLCode = 'TMS Web Project' +\r\n '';\r\nvar\r\n lFrame: TFrame;\r\n lForm: TFramePreviewForm;\r\nbegin\r\n lForm := TFramePreviewForm.Create(Application);\r\n lFrame := AInstanceClass.Create(lForm);\r\n lForm.FFrame := lFrame;\r\n lForm.Popup := False;\r\n AReference := lFrame;\r\n\r\n Application.FActiveForm := lForm;\r\n Application.CreateNewForm(lForm, cHTMLCode);\r\nend;\r\n\r\nprocedure TApplication.CreateNewForm(AForm: TCustomForm; HTML: string);\r\nvar\r\n eh,op,span,childspan,formspan: TJSHTMLElement;\r\n l,t,w,h: integer;\r\n LCreatedProc: TFormCreatedProc;\r\n LCaptionDiv: TJSHTMLElement;\r\n LCaptionHeight: integer;\r\n ro: TJSOBject;\r\nbegin\r\n if FMainForm = nil then\r\n FMainForm := AForm;\r\n\r\n span := nil;\r\n formspan := nil;\r\n LCaptionHeight := 0;\r\n\r\n // form hosted in designated container\r\n if not AForm.Popup and (AForm.FFormElement <> '') then\r\n begin\r\n AForm.FLayer := nil;\r\n eh := TJSHTMLElement(document.getElementById(AForm.FFormElement));\r\n if Assigned(eh) then\r\n begin\r\n eh.innerHTML := HTML;\r\n if (AForm.ElementClassname = '') and (AForm.CSSLibrary = cssNone) then\r\n eh.style.setProperty(CSSBackground,ColorToHTML(AForm.Color));\r\n end;\r\n end\r\n else\r\n begin\r\n AForm.ClearControls;\r\n // transparent mouse blocking layer\r\n AForm.FLayer := AForm.CreateLayer;\r\n document.body.appendChild(AForm.FLayer);\r\n\r\n eh := TJSHTMLElement(AForm.FLayer);\r\n\r\n // insert opacity layer\r\n if AForm.Popup and (AForm.PopupOpacity < 1) then\r\n begin\r\n op := AForm.CreateLayer;\r\n op.style.setProperty(CSSBackground, 'black');\r\n op.style.setProperty('opacity', DoubleToHTML(AForm.PopupOpacity));\r\n op.style.setProperty(CSSZIndex, Application.MaxZIndexStr);\r\n eh.appendChild(op);\r\n end;\r\n\r\n Application.ChangeMaxZIndex(+1);\r\n\r\n span := TJSHTMLElement(document.createElement('DIV'));\r\n\r\n // highest z-index but below modal dialog z-index\r\n span.style.setProperty(CSSZIndex, Application.MaxZIndexStr);\r\n AForm.FPopupElement := span;\r\n\r\n if (AForm.Border = fbDialogSizeable) then\r\n begin\r\n span.style.setProperty('resize','both');\r\n span.style.setProperty('overflow','auto');\r\n\r\n ro := nil;\r\n asm\r\n try\r\n {\r\n var frm = AForm;\r\n ro = new ResizeObserver( function(entries) {\r\n window.requestAnimationFrame(() => {\r\n if (!Array.isArray(entries) || !entries.length) {\r\n return;\r\n }\r\n entries.forEach( function(entry) {\r\n frm.HandleObserver();\r\n });\r\n } );\r\n });\r\n // Observe the scrollingElement for when the window gets resized\r\n ro.observe(span);\r\n }\r\n catch(err)\r\n {\r\n span.style.removeProperty('resize');\r\n span.style.removeProperty('overflow');\r\n }\r\n end;\r\n\r\n AForm.FResizeObserver := ro;\r\n end;\r\n\r\n if AForm.ElementClassName <> '' then\r\n span.setAttribute('class', AForm.ElementClassName);\r\n\r\n if AForm.Shadow and AForm.Popup then\r\n span.style.setProperty('box-shadow','3px 3px 3px silver');\r\n\r\n eh.appendChild(span);\r\n\r\n AForm.GetMethodPointers;\r\n\r\n if (AForm.Border in [fbDialog, fbDialogSizeable]) then\r\n begin\r\n LCaptionDiv := AForm.CreateCaption;\r\n span.appendChild(LCaptionDiv);\r\n childspan := TJSHTMLElement(document.createElement('DIV'));\r\n childspan.style.setProperty('position','absolute');\r\n childspan.style.setProperty('width','100%');\r\n// childspan.style.setProperty('height','100%');\r\n childspan['id']:= 'childspan';\r\n span.appendChild(childspan);\r\n formspan := childspan;\r\n LCaptionHeight := Application.FormCaptionHeight;\r\n end\r\n else\r\n begin\r\n formspan := span;\r\n end;\r\n\r\n formspan.innerHTML := HTML;\r\n AForm.Container := formspan;\r\n end;\r\n\r\n AForm.Init;\r\n AForm.LoadDFMValues;\r\n\r\n if (AForm.Border in [fbDialog, fbDialogSizeable]) and (AForm.ElementCaptionClassName <> '') then\r\n begin\r\n LCaptionDiv.ClassList.Add(AForm.ElementCaptionClassName);\r\n LCaptionDiv.style.removeProperty('background-color');\r\n LCaptionDiv.style.removeProperty('color');\r\n end;\r\n\r\n if Assigned(AForm.FLayer) then\r\n begin\r\n // ensure full screen background is white or adopts the form elementclassname when it is not popup\r\n if not AForm.Popup then\r\n begin\r\n if (AForm.ElementClassName = '') then\r\n begin\r\n if AForm.Color <> clNone then\r\n eh.style.setProperty(CSSBackground, ColorToHTML(AForm.Color))\r\n else\r\n eh.style.setProperty(CSSBackground, 'white')\r\n end\r\n else\r\n eh.setAttribute('class',AForm.ElementClassName);\r\n\r\n if (AForm.CSSLibrary = cssBootstrap) and (AForm.ElementClassName = '') then\r\n begin\r\n eh.setAttribute('class', 'card');\r\n eh.style.removeProperty('background-color');\r\n eh.style.setProperty('display','block');\r\n end;\r\n end;\r\n end;\r\n\r\n // position popup form centered\r\n if Assigned(span) and (AForm.FormContainer = '') and AForm.Popup and (AForm.Position = poScreenCenter) then\r\n begin\r\n span.style.setProperty('position', 'absolute');\r\n\r\n l := max(0,Round((WinWidth - AForm.Width)/2)) + window.scrollX;\r\n t := max(0,Round((WinHeight - AForm.Height)/2)) + window.scrollY;\r\n\r\n w := AForm.Width;\r\n h := AForm.ClientHeight + LCaptionHeight;\r\n\r\n AForm.FTop := t;\r\n AForm.FLeft := l;\r\n AForm.SetWidthInt(w);\r\n AForm.SetHeightInt(h);\r\n\r\n if (AForm.ElementClassName = '') and (AForm.CSSLibrary = cssNone) then\r\n begin\r\n span.style.setProperty(CSSBackground,ColorToHTML(AForm.Color));\r\n span.style.setProperty('border','1px Black solid');\r\n end;\r\n\r\n span.style.setProperty('top',IntTostr(t)+'px');\r\n span.style.setProperty('left',IntToStr(l)+'px');\r\n span.style.setProperty('width',IntToStr(w)+'px');\r\n span.style.setProperty('height',IntToStr(h)+'px');\r\n end;\r\n\r\n if Assigned(formspan) then\r\n ActivateChildScripts(formspan);\r\n\r\n if Assigned(AForm.OnCreate) then\r\n AForm.OnCreate(AForm);\r\n\r\n if Assigned(AForm.FCreatedProc) then\r\n begin\r\n LCreatedProc := AForm.FCreatedProc;\r\n AForm.FCreatedProc := nil;\r\n LCreatedProc(AForm);\r\n end;\r\n\r\n AForm.Loaded;\r\n AForm.InitAnchoring;\r\n AForm.UpdateChildAnchoring;\r\n AForm.FCreating := false;\r\n AForm.UpdateElement;\r\n\r\n if not AForm.EventsBound then\r\n AForm.BindEvents;\r\n\r\n AForm.Resize;\r\n AForm.DoShow;\r\nend;\r\n\r\nfunction TApplication.DoFormLoad(Event: TEventListenerEvent): boolean;\r\nvar\r\n LResponse: string;\r\nbegin\r\n asm\r\n LResponse = Event.target.responseText;\r\n end;\r\n\r\n CreateNewForm(FLoadForm, LResponse);\r\n\r\n if Assigned(FCreatedProc) then\r\n begin\r\n FCreatedProc(Self);\r\n FCreatedProc := nil;\r\n end;\r\n\r\n Result := true;\r\nend;\r\n\r\nfunction TApplication.DoHandleExit(Event: TEventListenerEvent): boolean;\r\nbegin\r\n Result := true;\r\n if Assigned(OnExit) then\r\n OnExit(Self);\r\nend;\r\n\r\nfunction TApplication.DoHandleError(Event: TJSErrorEvent): boolean;\r\nvar\r\n err: TApplicationError;\r\n el,sp,x: TJSHTMLElement;\r\n msg,pmsg,pstack,s: string;\r\n isError, isPromise: boolean;\r\n jserror: JSValue;\r\n ex: Exception;\r\nbegin\r\n isError := true;\r\n isPromise := false;\r\n jserror := nil;\r\n\r\n err.AFile := '';\r\n err.ALineNumber := 0;\r\n err.AColNumber := 0;\r\n err.AError := nil;\r\n\r\n asm\r\n if (Event.message == undefined) {\r\n isError = false;\r\n if (Event instanceof PromiseRejectionEvent)\r\n {\r\n isError = true;\r\n isPromise = true;\r\n pmsg = Event.reason.FMessage;\r\n pstack = Event.reason.FStack;\r\n jserror = Event.reason;\r\n }\r\n }\r\n end;\r\n\r\n // ignore this error\r\n if not isPromise and (Event.message = 'ResizeObserver loop limit exceeded') then\r\n Exit;\r\n\r\n // ignore this error\r\n if not isPromise and (Event.message = 'ResizeObserver loop completed with undelivered notifications.') then\r\n Exit;\r\n\r\n if not isError then\r\n begin\r\n err.AMessage := 'Undefined JavaScript exception';\r\n err.AFile := '';\r\n err.ALineNumber := 0;\r\n err.AColNumber := 0;\r\n err.AError := nil;\r\n\r\n if Assigned(OnError) then\r\n OnError(Self, err, Result);\r\n Exit;\r\n end;\r\n\r\n if isPromise then\r\n begin\r\n err.AMessage := pmsg;\r\n err.AStack := pstack;\r\n err.AError := TJSObject(jserror);\r\n end\r\n else\r\n begin\r\n err.AMessage := Event.message;\r\n err.AFile := Event.filename;\r\n err.ALineNumber := Event.lineno;\r\n err.AColNumber := Event.colno;\r\n err.AError := Event.error;\r\n err.AStack := '';\r\n end;\r\n\r\n s := '';\r\n\r\n // try to get stack & RTL exception message\r\n if Assigned(Event.error) then\r\n begin\r\n asm\r\n if (Event.error.stack) {\r\n err.AStack = Event.error.stack;\r\n }\r\n if (Event.error.fMessage) {\r\n err.AMessage = Event.error.fMessage;\r\n }\r\n end;\r\n\r\n asm\r\n function objToString (obj) {\r\n var str = '';\r\n for (var p in obj) {\r\n if (obj.hasOwnProperty(p)) {\r\n str += p + '::' + obj[p] + '\\n';\r\n }\r\n }\r\n return str;\r\n }\r\n\r\n // detect if it was an RTL exception\r\n if (Event.error.hasOwnProperty('FJSError'))\r\n {\r\n jserror = Event.error['FJSError'];\r\n }\r\n\r\n s = objToString(Event.error);\r\n end;\r\n end;\r\n\r\n // it is an RTL exception, allow to handle by application object\r\n if Assigned(jserror) then\r\n begin\r\n asm\r\n ex = err.AError; //Event.error;\r\n end;\r\n if Assigned(OnException) then\r\n OnException(Self, ex);\r\n end;\r\n\r\n Result := false;\r\n\r\n msg := 'ERROR
' + err.AMessage + ' | ' + s + err.AStack + '
at '+err.AFile + ' [' +inttostr(err.ALineNumber)+':'+inttostr(err.AColNumber)+']';\r\n\r\n case ErrorType of\r\n aeFooter:\r\n begin\r\n el := TJSHTMLElement(document.getElementById('tmserrormessage'));\r\n\r\n if Assigned(el) then\r\n begin\r\n (el.firstChild as TJSHTMLElement).innerHTML := msg;\r\n end\r\n else\r\n begin\r\n el := TJSHTMLElement(document.createElement('DIV'));\r\n el.setAttribute('id','tmserrormessage');\r\n el.style.setProperty('position','absolute');\r\n el.style.setProperty('font-family','Courier');\r\n el.style.setProperty('font-size','8pt');\r\n el.style.setProperty('bottom','0');\r\n el.style.setProperty('width','100%');\r\n el.style.setProperty('height','100px');\r\n el.style.setProperty('background','#ff0000');\r\n el.style.setProperty('color','#ffffff');\r\n TJSHTMLElement(document.body).style.setProperty('padding','0');\r\n TJSHTMLElement(document.body).style.setProperty('margin','0');\r\n sp := TJSHTMLElement(document.createElement('SPAN'));\r\n sp.style.setProperty('margin-left','4px');\r\n sp.style.setProperty('float','left');\r\n sp.style.setProperty('overflow','hidden');\r\n sp.style.setProperty('display','block');\r\n sp.innerHTML := msg;\r\n el.appendChild(sp);\r\n\r\n x := TJSHTMLElement(document.createElement('SPAN'));\r\n x.style.setProperty('font-family','Courier');\r\n x.style.setProperty('font-size','8pt');\r\n x.style.setProperty('font-weight','bold');\r\n x.style.setProperty('position','absolute');\r\n x.style.setProperty('width','20px');\r\n x.style.setProperty('vertical-align','top');\r\n x.style.setProperty('cursor','pointer');\r\n x.style.setProperty('text-align','right');\r\n x.style.setProperty('right','4px');\r\n x.style.setProperty('display','block');\r\n x.innerHTML := 'X';\r\n x.onClick := @DoErrorClose;\r\n el.appendChild(x);\r\n\r\n document.body.appendChild(el);\r\n end;\r\n end;\r\n aeAlert: window.alert(msg);\r\n aeDialog:\r\n begin\r\n AddControlLink('googlematerial', 'https://fonts.googleapis.com/icon?family=Material+Icons');\r\n MessageDlg(msg, mtError, [mbOK]);\r\n end;\r\n end;\r\n\r\n if Assigned(OnError) then\r\n OnError(Self, err, Result);\r\nend;\r\n\r\nfunction TApplication.GetBootstrapVersion: TBootstrapVersion;\r\nvar\r\n bv: string;\r\nbegin\r\n bv := '';\r\n\r\n asm\r\n if (typeof bootstrap !== 'undefined') {\r\n bv = bootstrap.Tooltip.VERSION;\r\n }\r\n end;\r\n\r\n Result := bv3;\r\n if pos('4.',bv) = 1 then\r\n Result := bv4\r\n else\r\n if pos('5.',bv) = 1 then\r\n Result := bv5;\r\nend;\r\n\r\nfunction TApplication.DoPopState(Event: TJSPopStateEvent): boolean;\r\nbegin\r\n if Assigned(OnPopState) then\r\n OnPopState(Self, Event.state);\r\n Result := true;\r\nend;\r\n\r\n\r\nfunction TApplication.DoHashChange(Event: TEventListenerEvent): boolean;\r\nvar\r\n s: string;\r\n fc: TFormClass;\r\n frm: TCustomForm;\r\n bdy: TJSHTMLElement;\r\n Handled: boolean;\r\n\r\nbegin\r\n Result := true;\r\n\r\n if not AutoFormRoute then\r\n Exit;\r\n\r\n asm\r\n s = location.hash;\r\n end;\r\n\r\n // remove hash sign to get class name\r\n Delete(s,1,1);\r\n\r\n Handled := false;\r\n\r\n if Assigned(OnHashChange) then\r\n OnHashChange(Self, s, Handled);\r\n\r\n if Handled then\r\n Exit;\r\n\r\n if s = '' then\r\n s := FInitFormClassName;\r\n\r\n if s <> '' then\r\n begin\r\n if FInitFormClassName = '' then\r\n FInitFormClassName := FActiveForm.ClassName;\r\n\r\n fc := TFormClass(GetClass(s));\r\n\r\n if Assigned(fc) then\r\n begin\r\n bdy := TJSHTMLElement(document.body);\r\n CreateForm(fc, bdy, frm);\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TApplication.DoUpdateOnlineStatus(Event: TEventListenerEvent): boolean;\r\nbegin\r\n Result := true;\r\n\r\n if Assigned(OnOnlineChange) then\r\n begin\r\n if window.navigator.onLine then\r\n OnOnlineChange(Self, osOnline)\r\n else\r\n OnOnlineChange(Self, osOffline);\r\n end;\r\nend;\r\n\r\nfunction TApplication.DoVisibilityChange(Event: TEventListenerEvent): boolean;\r\nvar\r\n res: boolean;\r\nbegin\r\n Result := true;\r\n\r\n res := (document.visibilityState = 'visible');\r\n\r\n if Assigned(OnActivate) then\r\n OnActivate(Self, res);\r\nend;\r\n\r\nprocedure TApplication.Download(const AURL: string);\r\nbegin\r\n asm\r\n window.location.href = AURL;\r\n end;\r\nend;\r\n\r\nprocedure TApplication.DownloadTextFile(const AText: string; AFileName: string = '');\r\nbegin\r\n asm\r\n var element = document.createElement('a');\r\n element.setAttribute('href', 'data:text/plain;charset=utf-8,' + encodeURIComponent(AText));\r\n if (AFileName != ''){\r\n element.setAttribute('download', AFileName);\r\n }\r\n element.style.display = 'none';\r\n document.body.appendChild(element);\r\n element.click();\r\n document.body.removeChild(element);\r\n end;\r\nend;\r\n\r\nfunction TApplication.EXEName: string;\r\nbegin\r\n Result := window.document.location.href;\r\nend;\r\n\r\nfunction TApplication.GetActive: boolean;\r\nbegin\r\n Result := not document.hidden;\r\nend;\r\n\r\nfunction TApplication.GetColorScheme: TApplicationColorScheme;\r\nbegin\r\n Result := csNoScheme;\r\n\r\n if (window.matchMedia('(prefers-color-scheme)').media <> 'not all') then\r\n begin\r\n\r\n if (window.matchMedia('(prefers-color-scheme: dark)').matches) then\r\n Result := csDark\r\n else\r\n Result := csLight;\r\n end;\r\nend;\r\n\r\nfunction TApplication.IDETheme: string;\r\nvar\r\n s: string;\r\nbegin\r\n Result := '';\r\n\r\n if not Assigned(VSIDE) then\r\n Exit;\r\n\r\n asm\r\n s = pas[\"WEBLib.Forms\"].VSIDE.theme;\r\n end;\r\n\r\n Result := s;\r\nend;\r\n\r\nprocedure TApplication.IDEOpenURL(const URL: string);\r\nbegin\r\n asm\r\n pas[\"WEBLib.Forms\"].VSIDE.Open(URL);\r\n end;\r\nend;\r\n\r\nprocedure TApplication.IDEMessage(const Msg: string);\r\nbegin\r\n asm\r\n pas[\"WEBLib.Forms\"].VSIDE.ShowMessage(Msg);\r\n end;\r\nend;\r\n\r\nfunction TApplication.IDECSS: string;\r\nbegin\r\n Result := '';\r\n if IDETheme = 'vscode-light' then\r\n begin\r\n Result := '.IDECaption { background-color: #F0F0F0 !important; color: #555555 !important; border: 1px solid #DDDDDD !important}'+#13#10+\r\n '.IDEBkg { background-color: white !important; color: #555555 !important; border: 1px solid #DDDDDD !important}'+#13#10+\r\n '.IDEButton { background-color: #FAFAFA !important; font-size:10pt; color: #555555 !important; border: 1px solid #DDDDDD !important}'+#13#10+\r\n '.IDEButton:hover {background-color:#F0F0F0 !important}'+#13#10+\r\n '.IDEFont {font-size:10pt !important}';\r\n end;\r\n\r\n if IDETheme = 'vscode' then\r\n begin\r\n Result := '.IDECaption,.IDEButton { background-color: #3F3E43 !important; color: #FFFFFF !important; border: 1px solid #35353A !important}'+#13#10+\r\n '.IDEBkg { background-color: #2A2A2C !important; color: #A9ACB4 !important; border: 1px solid #35353A !important}'+#13#10+\r\n '.IDEButton:hover {background-color:#434857 !important}'+#13#10+\r\n '.IDEFont {font-size:10pt !important}';\r\n end;\r\nend;\r\n\r\nprocedure TApplication.InternalDownloadFile(const AData: TJSUint8Array; const AFileName, AType: string; const ANewTab: Boolean);\r\nbegin\r\n asm\r\n var lElement = document.createElement('a');\r\n var lBlob = new Blob([AData], {type: AType})\r\n var lUrl = window.URL.createObjectURL(lBlob);\r\n lElement.href = lUrl;\r\n if (AFileName != ''){\r\n lElement.setAttribute('download', AFileName);\r\n }\r\n lElement.style.display = 'none';\r\n if (ANewTab == true) {\r\n lElement.target = '_blank';\r\n }\r\n document.body.appendChild(lElement);\r\n lElement.click();\r\n document.body.removeChild(lElement);\r\n end;\r\nend;\r\n\r\nprocedure TApplication.DownloadBinaryFile(const AData: TJSBlob; const AFileName: string = ''; const ANewTab: Boolean = False);\r\nbegin\r\n asm\r\n var lElement = document.createElement('a');\r\n var lUrl = window.URL.createObjectURL(AData);\r\n lElement.href = lUrl;\r\n\r\n if (AFileName != ''){\r\n lElement.setAttribute('download', AFileName);\r\n }\r\n\r\n lElement.style.display = 'none';\r\n if (ANewTab == true) {\r\n lElement.target = '_blank';\r\n }\r\n document.body.appendChild(lElement);\r\n lElement.click();\r\n document.body.removeChild(lElement);\r\n end;\r\nend;\r\n\r\nprocedure TApplication.DownloadBinaryFile(const AData: TBytes; const AFileName: string; const ANewTab: Boolean);\r\nbegin\r\n DownloadBinaryFile(TJSUint8Array.from(AData), AFileName, ANewTab);\r\nend;\r\n\r\nprocedure TApplication.DownloadBinaryFile(const AData: TJSUint8Array; const AFileName: string; const ANewTab: Boolean);\r\nbegin\r\n InternalDownloadFile(AData, AFileName, 'octet/stream', ANewTab);\r\nend;\r\n\r\nprocedure TApplication.DownloadPDFFile(const AData: TBytes; const AFileName: string; const ANewTab: Boolean);\r\nbegin\r\n DownloadPDFFile(TJSUint8Array.from(AData), AFileName, ANewTab);\r\nend;\r\n\r\nprocedure TApplication.DownloadPDFFile(const AData: TJSUint8Array; const AFileName: string; const ANewTab: Boolean);\r\nbegin\r\n InternalDownloadFile(AData, AFileName, 'application/pdf', ANewTab);\r\nend;\r\n\r\nfunction TApplication.GetAuthorizationPageHTML(const AAuthorizationSuccess: Boolean): string;\r\nconst\r\n sExternalBrowserAuthorizationOK = '
Application succesfully authorized
You can close this browser window';\r\n sExternalBrowserAuthorizationFailed = '
Application authorization failed

Please try again.';\r\n LB = #13#10;\r\n\r\n ImageFail = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeA'+\r\n 'AAACXBIWXMAAA7DAAAOwwHHb6hkAAABtElEQVR4nO2bUY7CMAxEhz0NB+EgrDjXCg6yB+E4+9NKCAiN'+\r\n '7XHcjf1+ED+Z6ahNHScFiqIoBNwvp+v9crpG+3hG6+sgFQFwXv7ejj+/31JBDyy+ugN4ElkJD8Hqqyu'+\r\n 'AhohYjA3D12YAGyIiMSYsXx8D6BTpFmPB9NUMQCjSJcaA7ettAEqRTTErHr5eAjCKfBSz4OXryzhgiz'+\r\n 'OzWCJd/Fs8HoFHzHeCtxf2JNgt3MMID8zXoMpAtDarEDIbidJklMJUQ6MDty6GNDSNRdxtluWwhReDU'+\r\n 'fONKADAx2jkZCsOAOAaXn4pY2let6oAAN/qTIG61lAHAOwmBFO1aQoACA/BXGqbAwDCQqCsOCkBAMND'+\r\n 'oC23aQEAw0Kg9hqoAQDuIdAbLfQAALcQXFptLgEA9BDc+oxeLbF/Qz0C7AFTT4KpX4OpC6HUpXDqxVD'+\r\n 'q5fBOLn5lbEMkdUssdVM0dVs89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derImage = '#PLACEHOLDERIMAGE#';\r\n PlaceHolderText = '#PLACEHOLDERTEXT#';\r\n PlaceHolderColor = '#PLACEHOLDERCOLOR#';\r\n\r\n AuthHTMLTemplate =\r\n ''+LB+\r\n ''+LB+\r\n ''+LB+\r\n ' Authentication Result'+LB+\r\n ' '+LB+\r\n ''+LB+\r\n ''+LB+\r\n ''+LB+\r\n '
'+LB+\r\n '
'+LB+\r\n ' '+LB+\r\n '
'+LB+\r\n '
'+LB+\r\n ' #PLACEHOLDERTEXT#'+LB+\r\n '
'+LB+\r\n '
'+LB+\r\n ' '+LB+\r\n '';\r\n\r\n function ReplacePlaceHolders(APlaceHolders: array of string; APlaceHolderValues: array of string): string;\r\n var\r\n I: Integer;\r\n s: string;\r\n begin\r\n s := AuthHTMLTemplate;\r\n for I := 0 to Length(APlaceHolders) - 1 do\r\n s := StringReplace(s, APlaceHolders[I], APlaceHolderValues[I], [rfReplaceAll]);\r\n\r\n Result := s;\r\n end;\r\n\r\nbegin\r\n if AAuthorizationSuccess then\r\n Result := ReplacePlaceHolders([PlaceHolderImage, PlaceHolderText, PlaceHolderColor], [ImageSuccess, sExternalBrowserAuthorizationOK, 'rgb(104, 164, 144)'])\r\n else\r\n Result := ReplacePlaceHolders([PlaceHolderImage, PlaceHolderText, PlaceHolderColor], [ImageFail, sExternalBrowserAuthorizationFailed, 'rgb(216, 99, 68)']);\r\nend;\r\n\r\nfunction TApplication.GetFormExtension: string;\r\nbegin\r\n if Language <> lNone then\r\n Result := '_' + GetLanguageISO639_1Code(Language) + cHTMLExt\r\n else\r\n Result := cHTMLExt;\r\nend;\r\n\r\nfunction TApplication.GetIsOnline: boolean;\r\nbegin\r\n Result := window.navigator.onLine;\r\nend;\r\n\r\nfunction TApplication.GetIsPWA: boolean;\r\nvar\r\n pwa: boolean;\r\nbegin\r\n asm\r\n pwa = ('standalone' in window.navigator) && (window.navigator.standalone);\r\n end;\r\n\r\n Result := pwa;\r\nend;\r\n\r\n{$HINTS OFF}\r\nfunction TApplication.CalcScrollBarWidth: integer;\r\nvar\r\n res: integer;\r\nbegin\r\n if FSBW <> -1 then\r\n begin\r\n Result := FSBW;\r\n Exit;\r\n end;\r\n\r\n asm\r\n function getScrollbarWidth() {\r\n // Create a temporary div element\r\n const div = document.createElement('div');\r\n\r\n // Apply styles to force a scrollbar\r\n div.style.overflow = 'scroll';\r\n div.style.position = 'absolute';\r\n div.style.top = '-9999px'; // Move it off-screen\r\n div.style.width = '100px';\r\n div.style.height = '100px';\r\n\r\n // Append the div to the body\r\n document.body.appendChild(div);\r\n\r\n // Calculate the scrollbar width\r\n const scrollbarWidth = div.offsetWidth - div.clientWidth;\r\n\r\n // Remove the temporary element\r\n document.body.removeChild(div);\r\n\r\n res = scrollbarWidth;\r\n }\r\n getScrollbarWidth();\r\n end;\r\n\r\n FSBW := res;\r\n Result := FSBW;\r\nend;\r\n\r\nfunction TApplication.IsPWAInstalled: TJSPromise;\r\nvar\r\n b: boolean;\r\n s: string;\r\nbegin\r\n b := false;\r\n s := window.location.hostname;\r\n\r\n Result := TJSPromise.new(\r\n procedure(ASuccess, AFailed: TJSPromiseResolver) async\r\n begin\r\n asm\r\n if ('getInstalledRelatedApps' in window.navigator) {\r\n const relatedApps = await navigator.getInstalledRelatedApps();\r\n relatedApps.forEach((app) => {\r\n if (app.id.indexOf(s) >= 0)\r\n {\r\n b = true;\r\n }\r\n });\r\n }\r\n end;\r\n ASuccess(b);\r\n end);\r\nend;\r\n{$HINTS ON}\r\n\r\nfunction TApplication.GetIsMobile: boolean;\r\nvar\r\n mob: boolean;\r\nbegin\r\n asm\r\n function TestMobile() {\r\n var check = false;\r\n (function(a){if(/(android|bb\\d+|meego).+mobile|avantgo|bada\\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(a)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\\-(n|u)|c55\\/|capi|ccwa|cdm\\-|cell|chtm|cldc|cmd\\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\\-s|devi|dica|dmob|do(c|p)o|ds(12|\\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\\-|_)|g1 u|g560|gene|gf\\-5|g\\-mo|go(\\.w|od)|gr(ad|un)|haie|hcit|hd\\-(m|p|t)|hei\\-|hi(pt|ta)|hp( i|ip)|hs\\-c|ht(c(\\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\\-(20|go|ma)|i230|iac( |\\-|\\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\\/)|klon|kpt |kwc\\-|kyo(c|k)|le(no|xi)|lg( g|\\/(k|l|u)|50|54|\\-[a-w])|libw|lynx|m1\\-w|m3ga|m50\\/|ma(te|ui|xo)|mc(01|21|ca)|m\\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\\-2|po(ck|rt|se)|prox|psio|pt\\-g|qa\\-a|qc(07|12|21|32|60|\\-[2-7]|i\\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\\-|oo|p\\-)|sdk\\/|se(c(\\-|0|1)|47|mc|nd|ri)|sgh\\-|shar|sie(\\-|m)|sk\\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\\-|v\\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\\-|tdg\\-|tel(i|m)|tim\\-|t\\-mo|to(pl|sh)|ts(70|m\\-|m3|m5)|tx\\-9|up(\\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\\-|your|zeto|zte\\-/i.test(a.substr(0,4))) check = true;})(navigator.userAgent||navigator.vendor||window.opera);\r\n return check;\r\n };\r\n\r\n mob = TestMobile();\r\n end;\r\n\r\n Result := mob;\r\nend;\r\n\r\n{$IFDEF SINGLEINSTANCE}\r\nprocedure TApplication.DoGetDataReceived(Sender: TObject; Origin: string;\r\n Data: TJSObjectRecord);\r\nbegin\r\n if Data.jsobject.toString = '#reload' then\r\n begin\r\n asm\r\n location.reload();\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TApplication.DoGetConnected(Sender: TObject);\r\nvar\r\n url,agent:string;\r\nbegin\r\n url := window.location.href;\r\n agent := window.navigator.useragent;\r\n\r\n if Pos('Edg', agent) > 0 then\r\n agent := 'Edge'\r\n else if Pos('Opera', agent) > 0 then\r\n agent := 'Opera'\r\n else if Pos('OPR', agent) > 0 then\r\n agent := 'Opera'\r\n else if Pos('Chrome', agent) > 0 then\r\n agent := 'Chrome'\r\n else if Pos('Safari', agent) > 0 then\r\n agent := 'Safari'\r\n else if Pos('Firefox', agent) > 0 then\r\n agent := 'Firefox'\r\n else if Pos('Trident', agent) > 0 then\r\n agent := 'MSIE'\r\n else\r\n agent := '';\r\n\r\n FWebSocket.Send(url + ';' + agent);\r\nend;\r\n{$ENDIF}\r\n\r\nfunction TApplication.DoErrorClose(Event: TJSMouseEvent): boolean;\r\nbegin\r\n document.body.removeChild(Event.targetElement.parentElement);\r\n Result := true;\r\nend;\r\n\r\nfunction TApplication.DoFormAbort(Event: TEventListenerEvent): boolean;\r\nbegin\r\n ShowMessage('Failed to load form HTML template file');\r\n Result := true;\r\nend;\r\n\r\nprocedure TApplication.TriggerNotification;\r\nbegin\r\n {$IFDEF FREEWARE}\r\n if FNotifyCount = 0 then\r\n begin\r\n {$IFDEF TMS}\r\n asm\r\n alert('TMS WEB Core \\u00A9 2018 - 2024 tmssoftware.com - Trial Version');\r\n end;\r\n {$ENDIF}\r\n {$IFNDEF TMS}\r\n asm\r\n alert('Application created with an unlicensed trial version of software');\r\n end;\r\n {$ENDIF}\r\n end;\r\n inc(FNotifyCount);\r\n {$ENDIF}\r\nend;\r\n\r\nprocedure TApplication.InitFormatSettings(const BrowserLocale: string);\r\nvar\r\n timestr: string;\r\n i: integer;\r\n locale: string;\r\nbegin\r\n locale := BrowserLocale;\r\n\r\n FormatSettings.ShortDateFormat := GetLocaleShortDateFormat(locale);\r\n\r\n if (Pos('/',FormatSettings.ShortDateFormat) > 0) then\r\n FormatSettings.DateSeparator := '/';\r\n\r\n if (Pos('.',FormatSettings.ShortDateFormat) > 0) then\r\n FormatSettings.DateSeparator := '.';\r\n\r\n if (Pos('-',FormatSettings.ShortDateFormat) > 0) then\r\n FormatSettings.DateSeparator := '-';\r\n\r\n asm\r\n var event = new Date('Jan 1, 1980 06:07:08 GMT+00:00');\r\n var loc = \"\";\r\n if (locale == \"\") { loc = navigator.language; } else\r\n { loc = locale; }\r\n timestr = event.toLocaleTimeString(loc);\r\n end;\r\n\r\n if pos(':',timestr) > 0 then\r\n FormatSettings.TimeSeparator := ':';\r\n\r\n if pos('.',timestr) > 0 then\r\n FormatSettings.TimeSeparator := '.';\r\n\r\n if pos('-',timestr) > 0 then\r\n FormatSettings.TimeSeparator := '-';\r\n\r\n for i := 1 to 7 do\r\n begin\r\n FormatSettings.ShortDayNames[i] := GetLocaleShortDayName(i,locale);\r\n FormatSettings.LongDayNames[i] := GetLocaleLongDayName(i,locale);\r\n end;\r\n\r\n for i := 1 to 12 do\r\n begin\r\n FormatSettings.ShortMonthNames[i] := GetLocaleShortMonthName(i,locale);\r\n FormatSettings.LongMonthNames[i] := GetLocaleLongMonthName(i,locale);\r\n end;\r\n\r\n FormatSettings.DecimalSeparator := GetLocaleDecimalSeparator;\r\n\r\n if FormatSettings.DecimalSeparator = '.' then\r\n FormatSettings.ThousandSeparator := ','\r\n else\r\n FormatSettings.ThousandSeparator := '.';\r\nend;\r\n\r\n{$HINTS OFF}\r\n\r\nfunction TApplication.Route: boolean;\r\nvar\r\n frm: TCustomForm;\r\n hash: string;\r\n pc: TPersistentClass;\r\nbegin\r\n Result := false;\r\n FRouting := true;\r\n hash := window.location.hash;\r\n\r\n if (hash <> '') then\r\n begin\r\n delete(hash,1,1);\r\n hash := 'T' + hash;\r\n pc := GetClass(hash);\r\n if Assigned(pc) then\r\n begin\r\n Result := true;\r\n Application.AutoCreateForm(TFormClass(pc), frm);\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TApplication.Initialize;\r\nvar\r\n query, token: string;\r\n p: Integer;\r\n b: Boolean;\r\nbegin\r\n\r\n FCanCreateForm := True;\r\n FAppInitializing := True;\r\n FParameters.Clear;\r\n query := window.location.href;\r\n\r\n InitFormatSettings(GetBrowserLocale);\r\n\r\n FParameters.Delimiter := '&';\r\n FParameters.StrictDelimiter := true;\r\n p := Pos('?', query);\r\n if p > 0 then\r\n query := Copy(query, p + 1, Length(query));\r\n FParameters.DelimitedText := query;\r\n\r\n asm\r\n b = (window.name == \"Authentication\");\r\n end;\r\n\r\n if Assigned(OnOAuthCallBack) then\r\n begin\r\n if (FParameters.IndexOfName('oauthcallback') <> -1) or b then\r\n begin\r\n OnOauthCallBack(Self, query);\r\n\r\n FIsRedirect := true;\r\n document.body.innerHTML := GetAuthorizationPageHTML(True);\r\n Exit;\r\n end;\r\n end;\r\n\r\n // there is a code callback\r\n if (FParameters.IndexOfName('code') <> -1) and HandleOAuth then\r\n begin\r\n if Assigned(OnOAuthToken) then\r\n OnOauthToken(Self, query);\r\n\r\n FIsRedirect := true;\r\n token := FParameters.Values['code'];\r\n asm\r\n if (window.opener && window.opener.processAuthData){\r\n window.opener.processAuthData(token);\r\n window.close();\r\n }\r\n end;\r\n end;\r\n\r\n window.addEventListener('hashchange',@DoHashChange);\r\n window.addEventListener('online', @DoUpdateOnlineStatus);\r\n window.addEventListener('offline', @DoUpdateOnlineStatus);\r\n window.addEventListener('popstate', @DoPopState);\r\n document.addEventListener('visibilitychange', @DoVisibilityChange);\r\n\r\n if (window.opener <> nil) then\r\n if (FParameters.IndexOfName('access_token') <> -1) then\r\n begin\r\n FIsRedirect := true;\r\n token := FParameters.Values['access_token'];\r\n asm\r\n if (window.opener && window.opener.processAuthData){\r\n window.opener.processAuthData(token);\r\n \twindow.close();\r\n }\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TApplication.InsertCSS(id, href: string);\r\nvar\r\n styleElement: TJSElement;\r\nbegin\r\n\r\n styleElement := document.getElementById(id);\r\n if Assigned(styleElement) then\r\n begin\r\n asm\r\n styleElement.href = href;\r\n end;\r\n Exit;\r\n end;\r\n\r\n styleElement := document.createElement('link');\r\n styleElement.id := id;\r\n\r\n asm\r\n styleElement.rel = 'stylesheet';\r\n styleElement.href = href;\r\n end;\r\n\r\n document.getElementsByTagName('head')[0].appendChild(styleElement);\r\nend;\r\n\r\n{$HINTS ON}\r\n\r\nprocedure TApplication.Run;\r\nbegin\r\n FCanCreateForm := True;\r\n FAppInitializing := False;\r\nend;\r\n\r\nprocedure TApplication.RunScript(Source: string);\r\nbegin\r\n asm\r\n eval(Source);\r\n end;\r\nend;\r\n\r\nprocedure TApplication.Terminate;\r\nbegin\r\n window.location.href := 'about:blank';\r\nend;\r\n\r\nprocedure TApplication.ReceiveMessageFromClient(const AMessage: string);\r\nbegin\r\n if Assigned(FClientConnector) then\r\n FClientConnector.Receive(AMessage);\r\nend;\r\n\r\nprocedure TApplication.ChangeLanguage(const Value: TUILanguage);\r\nbegin\r\n FLanguage := Value;\r\n if Assigned(FMainForm) then\r\n ReloadForm;\r\nend;\r\n\r\nprocedure TApplication.SetLanguage(const Value: TUILanguage);\r\nbegin\r\n FLanguage := Value;\r\nend;\r\n\r\nprocedure TApplication.ChangeCSS(id, href: string);\r\nbegin\r\n asm\r\n var styleElement = document.getElementById(id);\r\n if (styleElement) {\r\n styleElement.href = href;\r\n return;\r\n }\r\n end;\r\nend;\r\n\r\nfunction TApplication.MaxZIndexStr: string;\r\nbegin\r\n Result := IntToStr(FMaxZIndex);\r\nend;\r\n\r\nprocedure TApplication.ChangeMaxZIndex(Delta: integer);\r\nbegin\r\n FMaxZIndex := FMaxZIndex + Delta;\r\nend;\r\n\r\nconstructor TApplication.Create(AOwner: TComponent);\r\n{$IFDEF HOTRELOAD}\r\nconst\r\n cDefPollInterval = 1000;\r\n cDefFileName = 'TMSHotreloadVersion.json';\r\n {$ENDIF}\r\nbegin\r\n FFormStack := TList.Create;\r\n FParameters := TStringList.Create;\r\n FAppContainer := cBodyTag;\r\n FMainForm := nil;\r\n FActiveForm := nil;\r\n FInitFormClassName := '';\r\n FIsRedirect := false;\r\n FAutoFormRoute := false;\r\n FThemed := false;\r\n FThemeColor := clTMSBlue;\r\n FThemeTextColor := clWhite;\r\n FFormCaptionHeight := 22;\r\n FMaxZIndex := 998;\r\n FHandleOAuth := true;\r\n FHintPause := 200;\r\n FHintHidePause := 250;\r\n FHintPosition := hpTop;\r\n FHintClassName := '';\r\n FSBW := -1;\r\n {$IFDEF FREEWARE}\r\n FNotifyCount := 0;\r\n {$ENDIF}\r\n {$IFDEF HOTRELOAD}\r\n FHotReloadPollInterval := cDefPollInterval;\r\n FHotReloadFile := cDefFileName;\r\n StartHotReload;\r\n {$ENDIF}\r\n {$IFDEF SINGLEINSTANCE}\r\n FWebSocket := TSocketClient.Create(Self);\r\n FWebSocket.Port := DefaultPort;\r\n FWebSocket.OnDataReceived := @DoGetDataReceived;\r\n FWebSocket.OnConnect := @DoGetConnected;\r\n FWebSocket.Connect;\r\n {$ENDIF}\r\n\r\n window.addEventListener('error', @DoHandleError);\r\n window.addEventListener('unhandledrejection', @DoHandleError);\r\n window.addEventListener('beforeunload', @DoHandleExit);\r\n\r\n FErrorType := aeSilent;\r\n {$IFDEF DEBUG}\r\n FErrorType := aeFooter;\r\n {$ENDIF}\r\n //TriggerNotification;\r\nend;\r\n\r\nfunction TApplication.GetHash: string;\r\nvar\r\n s: string;\r\nbegin\r\n s := window.location.hash;\r\n if (Length(s) > 0) and (s[1] = '#') then\r\n Delete(s,1,1);\r\n\r\n\r\n Result := s;\r\nend;\r\n\r\nprocedure TApplication.SetHash(const AValue: string);\r\nbegin\r\n window.location.hash := AValue;\r\nend;\r\n\r\n\r\ndestructor TApplication.Destroy;\r\nbegin\r\n {$IFDEF HOTRELOAD}\r\n StopHotReload;\r\n {$ENDIF}\r\n {$IFDEF SINGLEINSTANCE}\r\n FWebSocket.Free;\r\n {$ENDIF}\r\n FFormStack.Free;\r\n FParameters.Free;\r\n inherited Destroy;\r\nend;\r\n\r\nprocedure TApplication.LockForm(AForm: TCustomForm);\r\nvar\r\n i: integer;\r\nbegin\r\n for i := 0 to AForm.ControlCount - 1 do\r\n begin\r\n AForm.Controls[i].DisableTab;\r\n end;\r\nend;\r\n\r\nprocedure TApplication.UnLockForm(AForm: TCustomForm);\r\nvar\r\n i: integer;\r\nbegin\r\n for i := 0 to AForm.ControlCount - 1 do\r\n begin\r\n AForm.Controls[i].EnableTab;\r\n end;\r\nend;\r\n\r\nprocedure TApplication.PushForm(AForm: TCustomForm);\r\nvar\r\n i: integer;\r\nbegin\r\n // persist all control settings in HTML to be saved\r\n for i := 0 to AForm.ControlCount - 1 do\r\n begin\r\n AForm.Controls[i].PersistInHTML;\r\n end;\r\n\r\n // save with form\r\n AForm.FormContent := document.body.innerHTML;\r\n\r\n for i := 0 to AForm.ControlCount - 1 do\r\n begin\r\n AForm.Controls[i].DisableTab;\r\n end;\r\n\r\n FFormStack.Add(AForm);\r\nend;\r\n\r\nfunction TApplication.PopForm: TCustomForm;\r\nvar\r\n i: integer;\r\n frm: string;\r\nbegin\r\n if (FFormStack.Count > 0) then\r\n begin\r\n Result := TCustomForm(FFormStack.Items[FFormStack.Count - 1]);\r\n frm := Result.FormContent;\r\n FFormStack.Delete(FFormStack.Count - 1);\r\n\r\n // restore document\r\n document.body.innerHTML := frm;\r\n\r\n Result.InitFromHTML;\r\n\r\n // rebind form events\r\n Result.BindEvents;\r\n\r\n // rehook controls\r\n for i := 0 to Result.ControlCount - 1 do\r\n Result.Controls[i].HookElement;\r\n\r\n for i := 0 to Result.ControlCount - 1 do\r\n begin\r\n Result.Controls[i].RecreateCanvas;\r\n Result.Controls[i].InternalResize;\r\n end;\r\n\r\n Application.FActiveForm := Result;\r\n end;\r\nend;\r\n\r\nfunction TApplication.Version: string;\r\nbegin\r\n Result := WEBCOREVERSION;\r\nend;\r\n\r\n{$IFDEF HOTRELOAD}\r\nprocedure TApplication.OnHotReloadTick;\r\nconst\r\n cMethodLoad = 'load';\r\n cMethodAbort = 'abort';\r\n cMethodGet = 'GET';\r\n cDeli = '/';\r\nvar\r\n lReq: TJSXMLHttpRequest;\r\n lBuffer: string;\r\nbegin\r\n if FHotReloadReq <> nil then\r\n Exit;\r\n\r\n lReq := TJSXMLHttpRequest.New;\r\n lReq.AddEventListener(cMethodLoad, @OnHotReloadLoad);\r\n lReq.AddEventListener(cMethodAbort, @OnHotReloadAbort);\r\n lBuffer := window.document.location.href;\r\n lBuffer := TPath.GetDirectoryName(lBuffer);\r\n lBuffer := lBuffer + cDeli + FHotReloadFile;\r\n lReq.Open(cMethodGet, lBuffer);\r\n lReq.setRequestHeader('Cache-Control', 'no-cache, no-store, must-revalidate');\r\n lReq.Send;\r\n FHotReloadReq := lReq;\r\nend;\r\n\r\nfunction TApplication.OnHotReloadAbort(AEvent: TEventListenerEvent): Boolean;\r\nbegin\r\n FHotReloadReq := nil;\r\n Result := False;\r\nend;\r\n\r\nfunction TApplication.OnHotReloadLoad(AEvent: TEventListenerEvent): Boolean;\r\nvar\r\n lData: TJSObject;\r\nbegin\r\n try\r\n lData := TJSJSON.parseObject(FHotReloadReq.responseText);\r\n HandleHotReload(lData);\r\n except\r\n console.error('Error parsing Hotreload JSON: '+ FHotReloadReq.responseText);\r\n end;\r\n FHotReloadReq := nil;\r\n Result := True;\r\nend;\r\n\r\nprocedure TApplication.HandleHotReload(const AData: TJSObject);\r\nconst\r\n cAttributeVersion = 'version';\r\nvar\r\n lVersion: JSValue;\r\nbegin\r\n lVersion := AData[cAttributeVersion];\r\n if FHotReloadVersion = 0 then\r\n begin\r\n FHotReloadVersion := Integer(lVersion);\r\n Exit;\r\n end;\r\n\r\n if Integer(lVersion) > FHotReloadVersion then\r\n begin\r\n FHotReloadVersion := Integer(lVersion);\r\n window.location.reload(false);\r\n end;\r\nend;\r\n\r\nprocedure TApplication.StartHotReload;\r\nbegin\r\n if FHotReloadTimer = 0 then\r\n FHotReloadTimer := Window.setInterval(@OnHotReloadTick, FHotReloadPollInterval);\r\nend;\r\n\r\nprocedure TApplication.StopHotReload;\r\nbegin\r\n if FHotReloadTimer <> 0 then\r\n begin\r\n Window.ClearInterval(FHotReloadTimer);\r\n FHotReloadTimer := 0;\r\n end;\r\nend;\r\n\r\n{$ENDIF}\r\n\r\n{ TCustomFrame }\r\n\r\nconstructor TCustomFrame.Create(AId: string);\r\nbegin\r\n inherited Create(AId);\r\n FPadding := TPadding.Create;\r\n LoadHTMLFile(AId);\r\nend;\r\n\r\nconstructor TCustomFrame.Create(AOwner: TComponent);\r\nbegin\r\n inherited Create(AOwner);\r\n FPadding := TPadding.Create;\r\n FConstraints := TSizeConstraints.Create(Self);\r\nend;\r\n\r\nconstructor TCustomFrame.CreateNew(AOwner: TComponent);\r\nbegin\r\n Create(AOwner);\r\n BeforeLoadDFMValues;\r\n try\r\n LoadFromForm;\r\n finally\r\n AfterLoadDFMValues;\r\n end;\r\nend;\r\n\r\ndestructor TCustomFrame.Destroy;\r\nbegin\r\n FConstraints.Free;\r\n FPadding.Free;\r\n inherited Destroy;\r\nend;\r\n\r\nclass function TCustomFrame.GetHTMLFileName: string;\r\nbegin\r\n Result := UnitName + Application.GetFormExtension;\r\nend;\r\n\r\nprocedure TCustomFrame.LoadDFMValues;\r\nbegin\r\nend;\r\n\r\nprocedure TCustomFrame.LoadFromForm;\r\nbegin\r\n LoadDFMValues;\r\nend;\r\n\r\nprocedure TCustomFrame.LoadHTMLFile(const AId: string);\r\nconst\r\n cMethodGet = 'GET';\r\n cTypeLoad = 'load';\r\n {$IFDEF DEBUG}\r\n cHeaderCacheControl = 'Cache-Control';\r\n cValueNoCache = 'no-cache';\r\n {$ENDIF}\r\nvar\r\n lFileName: string;\r\n lRequest: TJSXMLHttpRequest;\r\n\r\n function DoStatusCreate(AEvent: TEventListenerEvent): Boolean;\r\n var\r\n lElement: TJSHTMLElement;\r\n lResponse: string;\r\n begin\r\n if AEvent = nil then\r\n Exit(False);\r\n\r\n asm\r\n lResponse = AEvent.target.responseText;\r\n end;\r\n lElement := TJSHTMLElement(document.getElementById(AId));\r\n lElement.innerHTML := lResponse;\r\n\r\n Result := True;\r\n end;\r\n\r\nbegin\r\n lFileName := GetHTMLFileName;\r\n if lFileName <> '' then\r\n begin\r\n lRequest := TJSXMLHttpRequest.new;\r\n lRequest.addEventListener(cTypeLoad, @DoStatusCreate);\r\n lRequest.open(cMethodGet, lFileName);\r\n {$IFDEF DEBUG}\r\n lRequest.setRequestHeader(cHeaderCacheControl, cValueNoCache);\r\n {$ENDIF}\r\n lRequest.send;\r\n end;\r\nend;\r\n\r\nprocedure TCustomFrame.UpdateElement;\r\nvar\r\n nocolor: boolean;\r\nbegin\r\n inherited;\r\n\r\n nocolor := Color in [clBtnFace, clNone, clWhite, clWindow];\r\n\r\n if Assigned(ElementHandle) and not IsUpdating and (csDesigning in ComponentState) and nocolor then\r\n begin\r\n ElementHandle.style.setProperty('background-color',ColorToHTML($F0F0F0));\r\n end;\r\nend;\r\n\r\nprocedure TCustomFrame.SetConstraints(const AValue: TSizeConstraints);\r\nbegin\r\n FConstraints.Assign(AValue);\r\nend;\r\n\r\nprocedure TCustomFrame.SetPopupMenu(AValue: TPopupMenu);\r\nbegin\r\n FPopupMenu := AValue;\r\nend;\r\n\r\nprocedure TCustomFrame.SetPadding(AValue: TPadding);\r\nbegin\r\n FPadding.Assign(AValue);\r\nend;\r\n\r\n{ TCustomSizeConstraints }\r\n\r\nconstructor TCustomSizeConstraints.Create(AControl: TControl);\r\nbegin\r\n inherited Create;\r\n FControl := AControl;\r\nend;\r\n\r\nprocedure TCustomSizeConstraints.AssignTo(ADest: TPersistent);\r\nbegin\r\n if ADest is TCustomSizeConstraints then\r\n begin\r\n with TCustomSizeConstraints(ADest) do\r\n begin\r\n FMinHeight := Self.FMinHeight;\r\n FMaxHeight := Self.FMaxHeight;\r\n FMinWidth := Self.FMinWidth;\r\n FMaxWidth := Self.FMaxWidth;\r\n Change;\r\n end;\r\n end\r\n else\r\n inherited AssignTo(ADest);\r\nend;\r\n\r\nprocedure TCustomSizeConstraints.SetConstraints(AIndex: Integer; AValue: TConstraintSize);\r\nbegin\r\n case AIndex of\r\n 0:\r\n if AValue <> FMaxHeight then\r\n begin\r\n FMaxHeight := AValue;\r\n// if not FControl.FIScaling then\r\n begin\r\n if (AValue > 0) and (AValue < FMinHeight) then\r\n FMinHeight := AValue;\r\n Change;\r\n end;\r\n end;\r\n 1:\r\n if AValue <> FMaxWidth then\r\n begin\r\n FMaxWidth := AValue;\r\n// if not FControl.FIScaling then\r\n begin\r\n if (AValue > 0) and (AValue < FMinWidth) then\r\n FMinWidth := AValue;\r\n Change;\r\n end;\r\n end;\r\n 2:\r\n if AValue <> FMinHeight then\r\n begin\r\n FMinHeight := AValue;\r\n// if not FControl.FIScaling then\r\n begin\r\n if (FMaxHeight > 0) and (AValue > FMaxHeight) then\r\n FMaxHeight := AValue;\r\n Change;\r\n end;\r\n end;\r\n 3:\r\n if AValue <> FMinWidth then\r\n begin\r\n FMinWidth := AValue;\r\n // if not FControl.FIScaling then\r\n begin\r\n if (FMaxWidth > 0) and (AValue > FMaxWidth) then\r\n FMaxWidth := AValue;\r\n Change;\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TCustomSizeConstraints.Change;\r\nbegin\r\n if Assigned(FOnChange) then\r\n FOnChange(Self);\r\nend;\r\n\r\n{ TDragDockObject }\r\n\r\nconstructor TDragDockObject.Create(AControl: TControl);\r\nbegin\r\n inherited Create;\r\n FBrush := TBrush.Create;\r\nend;\r\n\r\ndestructor TDragDockObject.Destroy;\r\nbegin\r\n FBrush.Free;\r\n inherited Destroy;\r\nend;\r\n\r\nprocedure TDragDockObject.Assign(Source: TDragObject);\r\nbegin\r\nend;\r\n\r\nprocedure TFramePreviewForm.LoadDFMValues;\r\nbegin\r\n inherited LoadDFMValues;\r\n\r\n FFrame.SetParentComponent(Self);\r\n FFrame.LoadFromForm;\r\n FFrame.BeforeLoadDFMValues;\r\n try\r\n FFrame.Name := 'Frame1';\r\n FFrame.Left := 0;\r\n FFrame.Top := 0;\r\n FFrame.Width := 640;\r\n FFrame.Height := 480;\r\n finally\r\n FFrame.AfterLoadDFMValues;\r\n end;\r\n\r\n Name := 'Form1';\r\n Left := 0;\r\n Top := 0;\r\n Width := 640;\r\n Height := 480;\r\nend;\r\n\r\nfunction Sleep(milliseconds: cardinal): TJSPromise;\r\nbegin\r\n Result := TJSPromise.New(\r\n procedure(resolve,reject : TJSPromiseResolver)\r\n begin\r\n window.setTimeout(\r\n procedure()\r\n begin\r\n resolve(milliseconds);\r\n end,\r\n milliseconds);\r\n end);\r\nend;\r\n\r\n\r\ninitialization\r\nbegin\r\n HandShakeScript := TJSHTMLScriptElement(document.createElement('script'));\r\n HandShakeScript.id := 'HandShakeScript';\r\n HandShakeScript.type_ := 'text/javascript';\r\n HandShakeScript.innerHTML :=\r\n 'var IDE = null;'+#13#10+\r\n 'var TMSWEBCoreClientIdentifier = \"unknown\";'+#13#10+\r\n 'var TMSWEBCoreOAuthCallback = \"unknown\";'+#13#10+\r\n 'function HandShake(cid){'+#13#10+\r\n ' TMSWEBCoreClientIdentifier = cid;'+#13#10+\r\n '}';\r\n document.body.appendChild(HandShakeScript);\r\n Application := TApplication.Create(nil);\r\nend;\r\n\r\nend.\r\n\r\n\r\n","{********************************************************************}\r\n{ }\r\n{ written by TMS Software }\r\n{ copyright (c) 2018 - 2025 }\r\n{ Email : info@tmssoftware.com }\r\n{ Web : http://www.tmssoftware.com }\r\n{ }\r\n{ The source code is given as is. The author is not responsible }\r\n{ for any possible damage done due to the use of this code. }\r\n{ The complete source code remains property of the author and may }\r\n{ not be distributed, published, given or sold in any form as such. }\r\n{ No parts of the source code can be included in any other component }\r\n{ or application without written authorization of the author. }\r\n{********************************************************************}\r\n\r\nunit WEBLib.StdCtrls;\r\n\r\n{$DEFINE NOPP}\r\n\r\ninterface\r\n\r\nuses\r\n Classes, WEBLib.Controls, SysUtils, Web, WEBLib.Graphics, Types, WEBlib.WebTools,\r\n WEBLib.Forms, WEBLib.Menus;\r\n\r\ntype\r\n Single = Double;\r\n TEditCharCase = (wecLowerCase, wecNormal, wecMixedCase, wecUpperCase);\r\n TCheckBoxState = (cbChecked, cbGrayed, cbUnchecked);\r\n TDateTimeKind = (dtkDate, dtkTime);\r\n TEllipsisPosition = (epEndEllipsis, epNone, epPathEllipsis, epWordEllipsis);\r\n TTextLayout = (tlTop, tlCenter, tlBottom);\r\n TSysLinkType = (sltID, sltURL);\r\n\r\n TLeftRight = TAlignment;\r\n\r\n TAutoCompletion = (acOff,acHonorificPrefix, acGivenName, acAdditionalName, acFamilyName, acHonorificSuffix,\r\n acNickName, acEmail, acUserName, acNewPassword, acCurrentPassword, acOrganizationTitle, acOrganization,\r\n acStreetAddress, acAddressLine1, acAddressLine2, acAddressLine3, acAddressLevel1, acAddressLevel2,\r\n acAddressLevel3, acAddressLevel4, acCountry, acCountryName, acPostalCode, acCCName, acCCGivenName,\r\n acCCAdditionalName, acCCFamilyName, acCCNumber, acExpiry, acExpiryMonth, acExpiryYear, acCSC,\r\n acType, acTransactionCurrency, acTransactionAmount, acLanguage, acBirthday, acBirthdayDay,\r\n acBirthDayMonth, acBirthDayYear, acSex, acTelephone, acTelephoneCountryCode, acTelephoneNational,\r\n acTelephoneAreaCode, acTelephoneLocal, acTelephoneExtension, acIMPP, acURL, acPhoto, acNone, acNope);\r\n\r\n TEditType = (weString, weFloat, weHex, weNumeric, weSignedFloat, weSignedNumeric, weSearch);\r\n\r\n THTMLType = (tLABELTAG, tSPAN, tDIV, tH1,tH2, tH3, tH4, tH5, tH6, tP);\r\n\r\n TLinkClickEvent = procedure(Sender: TObject; Link: string; LinkType: TSysLinkType) of object;\r\n\r\n TCustomLabel = class(TWebCustomControl)\r\n private\r\n FContent: TJSElement;\r\n FAutoSize: boolean;\r\n FEllipsisPosition: TEllipsisPosition;\r\n FWordWrap: Boolean;\r\n FAlignment: TAlignment;\r\n FLayout: TTextLayout;\r\n FTransparent: boolean;\r\n FHTMLType: THTMLType;\r\n FFocusControl: TWinControl;\r\n FShowAccelChar: boolean;\r\n FColor: TColor;\r\n FHasAccel: boolean;\r\n FHasHTML: boolean;\r\n FElementLabelClassName: TElementClassName;\r\n FOrigWidth: integer;\r\n FOldWidth, FOldHeight: integer;\r\n FHTML: string;\r\n procedure SetLayout(const Value: TTextLayout);\r\n procedure SetAlignment(const Value: TAlignment);\r\n function GetContentHandle: TJSHTMLElement;\r\n procedure SetTransparent(const Value: boolean);\r\n procedure SetHTMLType(const Value: THTMLType);\r\n procedure SetColorEx(const Value: TColor);\r\n procedure SetElementLabelClassName(const Value: TElementClassName);\r\n procedure SetHTML(const Value: string);\r\n protected\r\n procedure SetWidth(AValue: Integer); override;\r\n function CreateElement: TJSElement; override;\r\n function CreateLabelElement: TJSElement; virtual;\r\n function GetDisplayText: string; virtual;\r\n function CanShowFocus: boolean; override;\r\n procedure SetParent(AValue: TControl); override;\r\n procedure BindElement; override;\r\n procedure Loaded; override;\r\n procedure UpdateAutoSize; virtual;\r\n procedure UpdateElementData; override;\r\n procedure UpdateElementVisual; override;\r\n procedure UpdateElementSize; override;\r\n procedure SetAutoSize(AValue: boolean);\r\n procedure SetCaption(const AValue: string); override;\r\n procedure SetControlCursor(const Value: TCursor); override;\r\n procedure SetEllipsisPosition(AValue: TEllipsisPosition);\r\n property ContentHandle: TJSHTMLElement read GetContentHandle;\r\n property Alignment: TAlignment read FAlignment write SetAlignment default taLeftJustify;\r\n property AutoSize: boolean read FAutoSize write SetAutoSize default true;\r\n property ElementLabelClassName: TElementClassName read FElementLabelClassName write SetElementLabelClassName;\r\n property EllipsisPosition: TEllipsisPosition read FEllipsisPosition write SetEllipsisPosition default epNone;\r\n property FocusControl: TWinControl read FFocusControl write FFocusControl;\r\n property Layout: TTextLayout read FLayout write SetLayout default tlTop;\r\n property ShowAccelChar: boolean read FShowAccelChar write FShowAccelChar default true;\r\n property Transparent: boolean read FTransparent write SetTransparent default true;\r\n property WordWrap: Boolean read FWordWrap write FWordWrap default false;\r\n property HTML: string read FHTML write SetHTML;\r\n property HTMLType: THTMLType read FHTMLType write SetHTMLType default tLABELTAG;\r\n property Color: TColor read FColor write SetColorEx default clWhite;\r\n function GetWidth: Integer; override;\r\n function GetHeight: Integer; override;\r\n procedure InitCSSLibrary(ALibrary: TCSSLibrary); override;\r\n public\r\n procedure CreateInitialize; override;\r\n end;\r\n\r\n TLabel = class(TCustomLabel)\r\n published\r\n property Align;\r\n property Alignment;\r\n property AlignWithMargins;\r\n property Anchors;\r\n property AutoSize;\r\n property Caption;\r\n property ChildOrder;\r\n property Color;\r\n property DragMode;\r\n property EllipsisPosition;\r\n property Enabled;\r\n property ElementClassName;\r\n property ElementLabelClassName;\r\n property ElementID;\r\n property ElementFont;\r\n property ElementPosition;\r\n property FocusControl;\r\n property Font;\r\n property Height;\r\n property HeightPercent;\r\n property HeightStyle;\r\n property Hint;\r\n property HTML;\r\n property HTMLType;\r\n property Layout;\r\n property Left;\r\n property Margins;\r\n property ParentFont;\r\n property PopupMenu;\r\n property ShowAccelChar;\r\n property ShowHint;\r\n property TextDirection;\r\n property Top;\r\n property Transparent;\r\n property Visible;\r\n property Width;\r\n property WidthPercent;\r\n property WidthStyle;\r\n property WordWrap;\r\n property OnClick;\r\n property OnDblClick;\r\n property OnTouchStart;\r\n property OnTouchEnd;\r\n property OnTouchMove;\r\n property OnTouchCancel;\r\n property OnDragOver;\r\n property OnDragDrop;\r\n property OnStartDrag;\r\n property OnEndDrag;\r\n end;\r\n\r\n TWebLabel = class(TLabel);\r\n\r\n TCustomInput = class(TWebCustomControl)\r\n private\r\n protected\r\n function IsInputControl: Boolean; override;\r\n function GetInputType: string; virtual;\r\n function CreateElement: TJSElement; override;\r\n procedure UpdateElementVisual; override;\r\n procedure LoadState(AState: string); override;\r\n function SaveState: string; override;\r\n public\r\n procedure CreateInitialize; override;\r\n end;\r\n\r\n TCustomEdit = class(TCustomInput)\r\n private\r\n FCharCase: TEditCharCase;\r\n FMaxLength: integer;\r\n FReadOnly: Boolean;\r\n FText: string;\r\n FTextHint: string;\r\n FSelStart: Integer;\r\n FAlignment: TAlignment;\r\n FHideSelection: Boolean;\r\n FPasswordChar: Char;\r\n FOnChange: TNotifyEvent;\r\n FAutoSize: Boolean;\r\n FAutoSelect: Boolean;\r\n FSelLength: Integer;\r\n FNumeric: Boolean;\r\n FAutoCompletion: TAutoCompletion;\r\n FEditType: TEditType;\r\n FRequired: Boolean;\r\n FAutoFocus: boolean;\r\n FPattern: string;\r\n FHandlePastePtr: pointer;\r\n FHandleCutPtr: pointer;\r\n FHandleChangePtr: pointer;\r\n FHandleInvalidPtr: pointer;\r\n FHandleSearchPtr: pointer;\r\n FSpellCheck: boolean;\r\n FRequiredText: string;\r\n FOnSearch: TNotifyEvent;\r\n procedure SetAlignment(const Value: TAlignment);\r\n procedure SetHideSelection(const Value: Boolean);\r\n procedure SetAutoSelect(const Value: Boolean);\r\n procedure SetAutoSize(const Value: Boolean);\r\n procedure SetSelLength(const Value: Integer);\r\n procedure SetSelStart(const Value: Integer);\r\n procedure SetPasswordChar(const Value: Char);\r\n procedure SetNumeric(const Value: Boolean);\r\n procedure SetAutoCompletion(const Value: TAutoCompletion);\r\n procedure SetAutoFocus(const Value: boolean);\r\n procedure SetRequired(const Value: Boolean);\r\n procedure SetPattern(const Value: string);\r\n function GetSelLength: Integer;\r\n function GetSelStart: Integer;\r\n procedure SetEditType(const Value: TEditType);\r\n function GetSelText: string;\r\n procedure SetSpellCheck(const Value: boolean);\r\n protected\r\n function GetElementInputHandle: TJSHTMLInputElement; virtual;\r\n function DoHandlePaste(Event: TEventListenerEvent): Boolean; virtual;\r\n function DoHandleCut(Event: TEventListenerEvent): Boolean; virtual;\r\n function DoHandleChange(Event: TEventListenerEvent): Boolean; virtual;\r\n function DoHandleInvalid(Event: TJSEvent): Boolean; virtual;\r\n function DoHandleSearch(Event: TJSEvent): Boolean; virtual;\r\n function IsCustomEditor: Boolean; virtual;\r\n procedure KeyPress(var Key: Char); override;\r\n procedure DoEnter; override;\r\n function GetInputType: string; override;\r\n procedure PersistinHTML; override;\r\n function GetText: string;\r\n function GetDisplayText: string; virtual;\r\n function IsReadOnly: boolean; virtual;\r\n function Validate(AValue: string): boolean; virtual;\r\n procedure ClearMethodPointers; override;\r\n procedure GetMethodPointers; override;\r\n procedure BindEvents; override;\r\n procedure UnBindEvents; override;\r\n procedure UpdateElementData; override;\r\n procedure SetCharCase(AValue: TEditCharCase); virtual;\r\n procedure SetMaxLength(AValue: integer);\r\n procedure SetReadOnly(AValue: boolean);\r\n procedure SetText(AValue: string);\r\n procedure SetTextHint(AValue: string);\r\n function CanPaste(AValue: string): boolean; virtual;\r\n function CanCut: boolean; virtual;\r\n property Font;\r\n property AutoCompletion: TAutoCompletion read FAutoCompletion write SetAutoCompletion default acOff;\r\n property AutoFocus: boolean read FAutoFocus write SetAutoFocus default false;\r\n property Color;\r\n property BorderStyle;\r\n property HideSelection: Boolean read FHideSelection write SetHideSelection;\r\n property CharCase: TEditCharCase read FCharCase write SetCharCase default wecNormal;\r\n property MaxLength: integer read FMaxLength write SetMaxLength default 0;\r\n property Numeric: Boolean read FNumeric write SetNumeric default false;\r\n property PasswordChar: Char read FPasswordChar write SetPasswordChar default #0;\r\n property Pattern: string read FPattern write SetPattern;\r\n property ReadOnly: Boolean read FReadOnly write SetReadOnly default false;\r\n property Required: Boolean read FRequired write SetRequired default false;\r\n property RequiredText: string read FRequiredText write FRequiredText;\r\n property TextHint: string read FTextHint write SetTextHint;\r\n property AutoSize: Boolean read FAutoSize write SetAutoSize default false;\r\n property AutoSelect: Boolean read FAutoSelect write SetAutoSelect default true;\r\n property Alignment: TAlignment read FAlignment write SetAlignment;\r\n property OnChange: TNotifyEvent read FOnChange write FOnChange;\r\n property OnClick;\r\n property OnDblClick;\r\n property OnSearch: TNotifyEvent read FOnSearch write FOnSearch;\r\n procedure InitCSSLibrary(ALibrary: TCSSLibrary); override;\r\n public\r\n procedure CreateInitialize; override;\r\n property SelStart: Integer read GetSelStart write SetSelStart;\r\n property SelLength: Integer read GetSelLength write SetSelLength;\r\n procedure Clear;\r\n procedure ClearSelection;\r\n procedure Change; virtual;\r\n procedure SelectAll;\r\n procedure CopyToClipboard;\r\n procedure SetSelection(ASelStart, ASelLength: integer);\r\n property Text: string read GetText write SetText;\r\n property SelText: string read GetSelText;\r\n property SpellCheck: boolean read FSpellCheck write SetSpellCheck default true;\r\n property EditType: TEditType read FEditType write SetEditType default weString;\r\n property ElementInputHandle: TJSHTMLInputElement read GetElementInputHandle;\r\n end;\r\n\r\n TEdit = class(TCustomEdit)\r\n published\r\n property Alignment;\r\n property Align;\r\n property AlignWithMargins;\r\n property Anchors;\r\n property AutoCompletion;\r\n property AutoFocus;\r\n property AutoSize;\r\n property AutoSelect;\r\n property BiDiMode;\r\n property BorderStyle;\r\n property Center;\r\n property CharCase;\r\n property ChildOrder;\r\n property Color;\r\n property DragMode;\r\n property EditType;\r\n property ElementClassName;\r\n property ElementID;\r\n property ElementFont;\r\n property ElementPosition;\r\n property Enabled;\r\n property Font;\r\n property Height;\r\n property HeightPercent;\r\n property HeightStyle;\r\n property Hint;\r\n property HideSelection;\r\n property Left;\r\n property ParentFont;\r\n property PasswordChar;\r\n property Pattern;\r\n property Margins;\r\n property MaxLength;\r\n property PopupMenu;\r\n property ReadOnly;\r\n property Required;\r\n property RequiredText;\r\n property ShowFocus;\r\n property ShowHint;\r\n property SpellCheck;\r\n property TabOrder;\r\n property TabStop;\r\n property Text;\r\n property TextDirection;\r\n property TextHint;\r\n property Top;\r\n property Visible;\r\n property Width;\r\n property WidthPercent;\r\n property WidthStyle;\r\n property OnChange;\r\n property OnClick;\r\n property OnDblClick;\r\n property OnKeyDown;\r\n property OnKeyPress;\r\n property OnKeyUp;\r\n property OnMouseDown;\r\n property OnMouseUp;\r\n property OnMouseMove;\r\n property OnMouseLeave;\r\n property OnMouseEnter;\r\n property OnEnter;\r\n property OnExit;\r\n property OnDragDrop;\r\n property OnDragOver;\r\n property OnEndDrag;\r\n property OnSearch;\r\n property OnStartDrag;\r\n end;\r\n\r\n TWebEdit = class(TEdit);\r\n\r\n TSpinEdit = class(TCustomInput)\r\n private\r\n FIncrement: integer;\r\n FMaxValue: integer;\r\n FMinValue: integer;\r\n FValue: integer;\r\n FAutoSize: Boolean;\r\n FOnChange: TNotifyEvent;\r\n FReadOnly: boolean;\r\n FHandleChangePtr: pointer;\r\n FHandleInvalidPtr: pointer;\r\n FRequiredText: string;\r\n FRequired: Boolean;\r\n function GetText: string;\r\n procedure SetText(const Value: string);\r\n function GetElementInputHandle: TJSHTMLInputElement;\r\n procedure SetReadOnly(const Value: boolean);\r\n procedure SetRequired(const Value: Boolean);\r\n protected\r\n procedure KeyPress(var Key: Char); override;\r\n procedure PersistinHTML; override;\r\n function GetInputType: string; override;\r\n procedure UpdateElementData; override;\r\n function GetValue: integer;\r\n procedure SetIncrement(AValue: integer);\r\n procedure SetMaxValue(AValue: integer);\r\n procedure SetMinValue(AValue: integer);\r\n procedure SetValue(AValue: integer);\r\n function DoHandleChange(Event: TEventListenerEvent): Boolean;\r\n function DoHandleInvalid(Event: TJSEvent): Boolean; virtual;\r\n function IsReadOnly: boolean; virtual;\r\n function GetDisplayText: string; virtual;\r\n procedure BindEvents; override;\r\n procedure UnBindEvents; override;\r\n procedure Change; virtual;\r\n procedure ClearMethodPointers; override;\r\n procedure GetMethodPointers; override;\r\n procedure InitCSSLibrary(ALibrary: TCSSLibrary); override;\r\n public\r\n procedure CreateInitialize; override;\r\n property ElementInputHandle: TJSHTMLInputElement read GetElementInputHandle;\r\n property Text: string read GetText write SetText;\r\n published\r\n property Align;\r\n property AlignWithMargins;\r\n property Anchors;\r\n property AutoSize: Boolean read FAutoSize write FAutoSize;\r\n property BiDiMode;\r\n property BorderStyle;\r\n property ChildOrder;\r\n property Color;\r\n property DragMode;\r\n property ElementClassName;\r\n property ElementID;\r\n property ElementFont;\r\n property ElementPosition;\r\n property Enabled;\r\n property Font;\r\n property Height;\r\n property HeightPercent;\r\n property HeightStyle;\r\n property Hint;\r\n property Increment: integer read FIncrement write SetIncrement;\r\n property Left;\r\n property Margins;\r\n property MaxValue: integer read FMaxValue write SetMaxValue default 100;\r\n property MinValue: integer read FMinValue write SetMinValue default 0;\r\n property ParentFont;\r\n property ReadOnly: boolean read FReadOnly write SetReadOnly default false;\r\n property Required: Boolean read FRequired write SetRequired default false;\r\n property RequiredText: string read FRequiredText write FRequiredText;\r\n property Role;\r\n property ShowFocus;\r\n property ShowHint;\r\n property TabStop;\r\n property TabOrder;\r\n property TextDirection;\r\n property Value: integer read GetValue write SetValue;\r\n property Visible;\r\n property Width;\r\n property WidthPercent;\r\n property WidthStyle;\r\n property OnChange: TNotifyEvent read FOnChange write FOnChange;\r\n property OnClick;\r\n property OnDblClick;\r\n property OnKeyDown;\r\n property OnKeyPress;\r\n property OnKeyUp;\r\n property OnMouseDown;\r\n property OnMouseUp;\r\n property OnMouseMove;\r\n property OnMouseLeave;\r\n property OnMouseEnter;\r\n property OnEnter;\r\n property OnExit;\r\n property OnDragDrop;\r\n property OnDragOver;\r\n property OnEndDrag;\r\n property OnStartDrag;\r\n end;\r\n\r\n TWebSpinEdit = class(TSpinEdit);\r\n\r\n TDateTimePicker = class(TCustomInput)\r\n private\r\n FDate: TDate;\r\n FTime: TTime;\r\n FKind: TDateTimeKind;\r\n FOnChange: TNotifyEvent;\r\n FReadOnly: Boolean;\r\n FElementCheck: TJSHTMLElement;\r\n FElementPicker: TJSHTMLElement;\r\n FShowCheckBox: boolean;\r\n FClickPtr: pointer;\r\n FHandleChangePtr: pointer;\r\n FFocusPtr: pointer;\r\n FBlurPtr: pointer;\r\n FChecked: boolean;\r\n FShowSeconds: boolean;\r\n FAutoDropDown: boolean;\r\n FIsBootstrap: boolean;\r\n FMax: TDateTime;\r\n FMin: TDateTime;\r\n procedure SetDate(AValue: TDate);\r\n function GetDate: TDate;\r\n procedure SetTime(AValue: TTime);\r\n function GetTime: TTime;\r\n procedure SetKind(AValue: TDateTimeKind);\r\n procedure SetText(const Value: String);\r\n function GetText: String;\r\n procedure SetReadOnly(const Value: boolean);\r\n procedure SetShowCheckBox(const Value: boolean);\r\n procedure SetChecked(const Value: boolean);\r\n function GetDateTime: TDateTime;\r\n procedure SetDateTime(const Value: TDateTime);\r\n procedure SetShowSeconds(const Value: boolean);\r\n procedure SetMax(const Value: TDateTime);\r\n procedure SetMin(const Value: TDateTime);\r\n protected\r\n function DoCheckClick(Event: TEventListenerEvent): Boolean;\r\n function DoPickerFocus(Event: TEventListenerEvent): Boolean;\r\n function DoPickerBlur(Event: TEventListenerEvent): Boolean;\r\n function DoHandleChange(Event: TEventListenerEvent): Boolean;\r\n function HandleDoEnter(Event: TJSFocusEvent): Boolean; override;\r\n function GetElementBindHandle: TJSEventTarget; override;\r\n procedure BindEvents; override;\r\n procedure UnBindEvents; override;\r\n procedure UpdateElementData; override;\r\n procedure UpdateElementVisual; override;\r\n function CreateElement: TJSElement; override;\r\n function GetInputType: string; override;\r\n procedure Change; virtual;\r\n function IsReadOnly: boolean; virtual;\r\n procedure ClearMethodPointers; override;\r\n procedure GetMethodPointers; override;\r\n function GetElementPicker: TJSHTMLElement;\r\n procedure SetEnabled(Value: Boolean); override;\r\n procedure InitCSSLibrary(ALibrary: TCSSLibrary); override;\r\n public\r\n procedure CreateInitialize; override;\r\n procedure Clear;\r\n property DateTime: TDateTime read GetDateTime write SetDateTime;\r\n procedure SetFocus; override;\r\n published\r\n property Align;\r\n property AlignWithMargins;\r\n property Anchors;\r\n property AutoDropDown: boolean read FAutoDropDown write FAutoDropDown default false;\r\n property BorderStyle;\r\n property Checked: boolean read FChecked write SetChecked default false;\r\n property ChildOrder;\r\n property Color;\r\n property Date: TDate read GetDate write SetDate;\r\n property DragMode;\r\n property ElementClassName;\r\n property ElementID;\r\n property ElementFont;\r\n property ElementPosition;\r\n property Font;\r\n property Height;\r\n property HeightPercent;\r\n property HeightStyle;\r\n property Hint;\r\n property Kind: TDateTimeKind read FKind write SetKind;\r\n property Left;\r\n property Margins;\r\n property Max: TDateTime read FMax write SetMax;\r\n property Min: TDateTime read FMin write SetMin;\r\n property ParentFont;\r\n property ReadOnly: boolean read FReadOnly write SetReadOnly default false;\r\n property Role;\r\n property ShowCheckBox: boolean read FShowCheckBox write SetShowCheckBox default false;\r\n property ShowFocus;\r\n property ShowHint;\r\n property ShowSeconds: boolean read FShowSeconds write SetShowSeconds default true;\r\n property TabStop;\r\n property TabOrder;\r\n property Text: String read GetText write SetText;\r\n property TextDirection;\r\n property Time: TTime read GetTime write SetTime;\r\n property Top;\r\n property Visible;\r\n property Width;\r\n property WidthPercent;\r\n property WidthStyle;\r\n property OnClick;\r\n property OnChange: TNotifyEvent read FOnChange write FOnChange;\r\n property OnDblClick;\r\n property OnKeyDown;\r\n property OnKeyPress;\r\n property OnKeyUp;\r\n property OnMouseDown;\r\n property OnMouseUp;\r\n property OnMouseMove;\r\n property OnMouseLeave;\r\n property OnMouseEnter;\r\n property OnEnter;\r\n property OnExit;\r\n property OnDragDrop;\r\n property OnDragOver;\r\n property OnEndDrag;\r\n property OnStartDrag;\r\n end;\r\n\r\n TWebDateTimePicker = class(TDateTimePicker);\r\n\r\n TButton = class(TWebCustomControl)\r\n private\r\n FModalResult: TModalResult;\r\n FDefault: Boolean;\r\n FCancel: Boolean;\r\n FButtonType: string;\r\n procedure SetButtonType(const Value: string);\r\n procedure SetDefault(const Value: Boolean);\r\n protected\r\n function CreateElement: TJSElement; override;\r\n procedure SetCaption(const AValue: string); override;\r\n procedure UpdateElementData; override;\r\n procedure UpdateElementVisual; override;\r\n procedure HandleKeyPreview(Key: Word); override;\r\n procedure InitCSSLibrary(ALibrary: TCSSLibrary); override;\r\n public\r\n procedure CreateInitialize; override;\r\n procedure Click; override;\r\n published\r\n property Align;\r\n property AlignWithMargins;\r\n property Anchors;\r\n property BiDiMode;\r\n property BorderStyle;\r\n property ButtonType: string read FButtonType write SetButtonType;\r\n property Caption;\r\n property Cancel: Boolean read FCancel write FCancel default false;\r\n property Center;\r\n property ChildOrder;\r\n property Color;\r\n property Default: Boolean read FDefault write SetDefault default false;\r\n property DragMode;\r\n property ElementClassName;\r\n property ElementID;\r\n property ElementFont;\r\n property ElementPosition;\r\n property Enabled;\r\n property Font;\r\n property Height;\r\n property HeightPercent;\r\n property HeightStyle;\r\n property Hint;\r\n property Left;\r\n property Margins;\r\n property ModalResult: TModalResult read FModalResult write FModalResult default mrNone;\r\n property PopupMenu;\r\n property Role;\r\n property ParentFont;\r\n property ShowHint;\r\n property TabOrder;\r\n property TabStop;\r\n property TextDirection;\r\n property Top;\r\n property Visible;\r\n property Width;\r\n property WidthPercent;\r\n property WidthStyle;\r\n property OnClick;\r\n property OnKeyDown;\r\n property OnKeyPress;\r\n property OnKeyUp;\r\n property OnMouseDown;\r\n property OnMouseUp;\r\n property OnMouseMove;\r\n property OnMouseLeave;\r\n property OnMouseEnter;\r\n property OnEnter;\r\n property OnExit;\r\n property OnDragDrop;\r\n property OnDragOver;\r\n property OnEndDrag;\r\n property OnStartDrag;\r\n end;\r\n\r\n TWebButton = class(TButton);\r\n\r\n TCheckBox = class(TWebCustomControl)\r\n private\r\n FChecked: boolean;\r\n FState: TCheckBoxState;\r\n FElementButtonClassName: TElementClassName;\r\n FElementLabelClassName: TElementClassName;\r\n FOnCheckClick: TNotifyEvent;\r\n FAlignment: TAlignment;\r\n procedure SetAlignment(const Value: TAlignment);\r\n protected\r\n procedure Loaded; override;\r\n procedure UpdateElementData; override;\r\n procedure UpdateElementSize; override;\r\n procedure UpdateElementVisual; override;\r\n procedure PersistinHTML; override;\r\n function CreateElement: TJSElement; override;\r\n procedure SetChecked(AValue: boolean);\r\n function GetChecked: boolean;\r\n procedure SetState(AValue: TCheckBoxState);\r\n function GetState: TCheckBoxState;\r\n procedure SetCaption(const AValue: string); override;\r\n procedure SetEnabled(Value: boolean); override;\r\n function HandleLabelClick(Event: TJSMouseEvent): Boolean; virtual;\r\n function HandleCheckClick(Event: TJSMouseEvent): Boolean; virtual;\r\n procedure Click; override;\r\n procedure DoCheckClick; virtual;\r\n function GetCheckElement: TJSHTMLElement;\r\n procedure KeyPress(var ch: char); override;\r\n procedure LoadState(AState: string); override;\r\n function SaveState: string; override;\r\n property OnCheckClick: TNotifyEvent read FOnCheckClick write FOnCheckClick;\r\n procedure InitCSSLibrary(ALibrary: TCSSLibrary); override;\r\n public\r\n procedure CreateInitialize; override;\r\n published\r\n property Align;\r\n property Alignment: TAlignment read FAlignment write SetAlignment default taRightJustify;\r\n property AlignWithMargins;\r\n property Anchors;\r\n property Caption;\r\n property Checked: boolean read GetChecked write SetChecked default False;\r\n property ChildOrder;\r\n property Color default clNone;\r\n property DragMode;\r\n property ElementClassName;\r\n property ElementButtonClassName: TElementClassName read FElementButtonClassName write FElementButtonClassName;\r\n property ElementLabelClassName: TElementClassName read FElementLabelClassName write FElementLabelClassName;\r\n property ElementID;\r\n property ElementFont;\r\n property ElementPosition;\r\n property Enabled;\r\n property Font;\r\n property Height;\r\n property HeightPercent;\r\n property HeightStyle;\r\n property Hint;\r\n property Left;\r\n property Margins;\r\n property ParentFont;\r\n property PopupMenu;\r\n property Role;\r\n property ShowFocus;\r\n property ShowHint;\r\n property State: TCheckBoxState read GetState write SetState default cbUnchecked;\r\n property TabOrder;\r\n property TabStop;\r\n property Top;\r\n property Visible;\r\n property Width;\r\n property WidthPercent;\r\n property WidthStyle;\r\n property OnClick;\r\n property OnKeyDown;\r\n property OnKeyPress;\r\n property OnKeyUp;\r\n property OnMouseDown;\r\n property OnMouseUp;\r\n property OnMouseMove;\r\n property OnMouseLeave;\r\n property OnMouseEnter;\r\n property OnEnter;\r\n property OnExit;\r\n property OnDragDrop;\r\n property OnDragOver;\r\n property OnEndDrag;\r\n property OnStartDrag;\r\n end;\r\n\r\n TWebCheckBox = class(TCheckBox);\r\n\r\n TRadioButton = class(TWebCustomControl)\r\n private\r\n FChecked: boolean;\r\n FGroupName: string;\r\n FElementButtonClassName: TElementClassName;\r\n FElementLabelClassName: TElementClassName;\r\n protected\r\n procedure PersistInHTML; override;\r\n function CreateElement: TJSElement; override;\r\n procedure SetChecked(AValue: boolean);\r\n function GetChecked: boolean;\r\n procedure SetEnabled(Value: boolean); override;\r\n procedure SetCaption(const AValue: string); override;\r\n procedure SetGroupName(AValue: string);\r\n function HandleLabelClick(Event: TJSMouseEvent): Boolean; virtual;\r\n function HandleRadioClick(Event: TJSMouseEvent): Boolean; virtual;\r\n procedure UpdateElementSize; override;\r\n procedure UpdateElementData; override;\r\n procedure UpdateElementVisual; override;\r\n function GetRadioElement: TJSHTMLElement;\r\n procedure Keypress(var ch: Char); override;\r\n procedure LoadState(AState: string); override;\r\n function SaveState: string; override;\r\n procedure InitCSSLibrary(ALibrary: TCSSLibrary); override;\r\n public\r\n procedure CreateInitialize; override;\r\n published\r\n property Align;\r\n property AlignWithMargins;\r\n property Anchors;\r\n property Caption;\r\n property Checked: boolean read GetChecked write SetChecked default false;\r\n property ChildOrder;\r\n property Color default clNone;\r\n property DragMode;\r\n property ElementClassName;\r\n property ElementButtonClassName: TElementClassName read FElementButtonClassName write FElementButtonClassName;\r\n property ElementLabelClassName: TElementClassName read FElementLabelClassName write FElementLabelClassName;\r\n property ElementID;\r\n property ElementFont;\r\n property ElementPosition;\r\n property Enabled;\r\n property Font;\r\n property GroupName: string read FGroupName write SetGroupName;\r\n property Height;\r\n property HeightPercent;\r\n property HeightStyle;\r\n property Hint;\r\n property Left;\r\n property ParentFont;\r\n property PopupMenu;\r\n property Role;\r\n property ShowFocus;\r\n property ShowHint;\r\n property TabOrder;\r\n property TabStop;\r\n property Visible;\r\n property Width;\r\n property WidthPercent;\r\n property WidthStyle;\r\n property OnClick;\r\n property OnDblClick;\r\n property OnKeyDown;\r\n property OnKeyPress;\r\n property OnKeyUp;\r\n property OnMouseDown;\r\n property OnMouseUp;\r\n property OnMouseMove;\r\n property OnMouseLeave;\r\n property OnMouseEnter;\r\n property OnEnter;\r\n property OnExit;\r\n property OnDragDrop;\r\n property OnDragOver;\r\n property OnEndDrag;\r\n property OnStartDrag;\r\n end;\r\n\r\n TWebRadioButton = class(TRadioButton);\r\n\r\n TListBox = class(TWebCustomControl)\r\n private\r\n FItems: TStrings;\r\n FItemIndex: integer;\r\n FMultiSelect: boolean;\r\n FSelected: TList;\r\n FItemHeight: Integer;\r\n FSorted: Boolean;\r\n FOnChange: TNotifyEvent;\r\n FHandleChangePtr: pointer;\r\n FElementItemClassName: string;\r\n procedure SetItemHeight(const Value: Integer);\r\n procedure SetSorted(const Value: Boolean);\r\n function GetCount: Integer;\r\n function GetElementSelectHandle: TJSHTMLSelectElement;\r\n function GetSelCount: integer;\r\n function GetValues(AIndex: integer): string;\r\n procedure SetValues(AIndex: integer; const Value: string);\r\n protected\r\n function DoHandleChange(Event: TEventListenerEvent): Boolean;\r\n procedure DoItemsChange(Sender: TObject);\r\n procedure DoUpdateList; virtual;\r\n procedure PersistinHTML; override;\r\n function GetItemIndex: integer; virtual;\r\n function CreateElement: TJSElement; override;\r\n function GetSelected(AIndex: integer): boolean;\r\n procedure SetSelected(AIndex: Integer; AValue: boolean);\r\n procedure SetItems(AItems: TStrings);\r\n procedure SetItemIndex(AIndex: integer); virtual;\r\n procedure SetMultiSelect(AValue: boolean);\r\n procedure Loaded; override;\r\n procedure UpdateElementData; override;\r\n procedure UpdateElementVisual; override;\r\n procedure UpdateParent; override;\r\n procedure BindEvents; override;\r\n procedure UnBindEvents; override;\r\n procedure Change; virtual;\r\n function SaveState: string; override;\r\n procedure LoadState(AState: string); override;\r\n procedure EnableDrag; override;\r\n procedure DisableDrag; override;\r\n procedure ClearMethodPointers; override;\r\n procedure GetMethodPointers; override;\r\n procedure InitCSSLibrary(ALibrary: TCSSLibrary); override;\r\n public\r\n procedure CreateInitialize; override;\r\n destructor Destroy; override;\r\n procedure EndUpdate; override;\r\n procedure ClearSelection;\r\n procedure SelectAll;\r\n procedure DeleteSelected;\r\n property Sorted: Boolean read FSorted write SetSorted;\r\n property Count: Integer read GetCount;\r\n property SelCount: integer read GetSelCount;\r\n property ElementSelectHandle: TJSHTMLSelectElement read GetElementSelectHandle;\r\n procedure AddItem(Item: string; AObject: TObject);\r\n property Selected[i: Integer]: boolean read GetSelected write SetSelected;\r\n property Values[AIndex: integer]: string read GetValues write SetValues;\r\n procedure Clear;\r\n published\r\n property Align;\r\n property AlignWithMargins;\r\n property Anchors;\r\n property BiDiMode;\r\n property BorderStyle;\r\n property ChildOrder;\r\n property Color;\r\n property DragMode;\r\n property Font;\r\n property ElementClassName;\r\n property ElementItemClassName: string read FElementItemClassName write FElementItemClassName;\r\n property ElementID;\r\n property ElementFont;\r\n property ElementPosition;\r\n property Enabled;\r\n property Height;\r\n property HeightPercent;\r\n property HeightStyle;\r\n property Hint;\r\n property ItemHeight: Integer read FItemHeight write SetItemHeight;\r\n property ItemIndex: integer read GetItemIndex write SetItemIndex default -1;\r\n property Items: TStrings read FItems write SetItems;\r\n property Left;\r\n property MultiSelect: boolean read FMultiSelect write SetMultiSelect;\r\n property ParentColor;\r\n property ParentFont;\r\n property PopupMenu;\r\n property Role;\r\n property ShowFocus;\r\n property ShowHint;\r\n property TabOrder;\r\n property TabStop;\r\n property TextDirection;\r\n property Top;\r\n property Visible;\r\n property Width;\r\n property WidthPercent;\r\n property WidthStyle;\r\n property OnChange: TNotifyEvent read FOnChange write FOnChange;\r\n property OnClick;\r\n property OnDblClick;\r\n property OnKeyDown;\r\n property OnKeyPress;\r\n property OnKeyUp;\r\n property OnMouseDown;\r\n property OnMouseUp;\r\n property OnMouseMove;\r\n property OnMouseLeave;\r\n property OnMouseEnter;\r\n property OnMouseWheel;\r\n property OnEnter;\r\n property OnExit;\r\n property OnDragDrop;\r\n property OnDragOver;\r\n property OnEndDrag;\r\n property OnStartDrag;\r\n end;\r\n\r\n TWebListBox = class(TListBox);\r\n\r\n TComboBoxStyle = (csDropDownList, csDropDown);\r\n\r\n TCustomComboBox = class(TWebCustomControl)\r\n private\r\n FItems: TStrings;\r\n FItemIndex: integer;\r\n FStyle: TComboBoxStyle;\r\n FDroppedDown: Boolean;\r\n FOnChange: TNotifyEvent;\r\n FTextHint: string;\r\n FListName: string;\r\n FText: string;\r\n FHandleChangePtr: pointer;\r\n FHandleInputPtr: pointer;\r\n FHandleFocusInPtr: pointer;\r\n FHandleFocusOutPtr: pointer;\r\n FOnFocusOut: TNotifyEvent;\r\n FOnFocusIn: TNotifyEvent;\r\n FRequired: boolean;\r\n FRequiredText: string;\r\n FHandleInvalidPtr: pointer;\r\n FSorted: boolean;\r\n function GetText: string;\r\n procedure SetText(const Value: string);\r\n procedure SetStyle(const Value: TComboBoxStyle);\r\n procedure SetDroppedDown(const Value: Boolean);\r\n function GetElementSelectHandle: TJSHTMLSelectElement;\r\n procedure SetTextHint(const Value: string);\r\n function GetValues(AIndex: integer): string;\r\n procedure SetValues(AIndex: integer; const Value: string);\r\n procedure SetRequired(const Value: boolean);\r\n procedure SetSorted(const Value: boolean);\r\n protected\r\n function DoHandleChange(Event: TEventListenerEvent): Boolean; virtual;\r\n function DoHandleInput(Event: TEventListenerEvent): Boolean; virtual;\r\n function DoHandleFocusIn(Event: TEventListenerEvent): Boolean; virtual;\r\n function DoHandleFocusOut(Event: TEventListenerEvent): Boolean; virtual;\r\n function DoHandleInvalid(Event: TJSEvent): Boolean; virtual;\r\n procedure DoItemsChange(Sender: TObject);\r\n procedure ClearMethodPointers; override;\r\n procedure GetMethodPointers; override;\r\n procedure AddTextHint; virtual;\r\n procedure DoUpdateList; virtual;\r\n procedure LoadState(AState: string); override;\r\n function SaveState: string; override;\r\n function GetItemIndex: integer;\r\n function CreateElement: TJSElement; override;\r\n procedure BindEvents; override;\r\n procedure UnBindEvents; override;\r\n procedure UpdateElementData; override;\r\n procedure UpdateElementVisual; override;\r\n procedure UpdateParent; override;\r\n procedure SetItems(AItems: TStrings);\r\n procedure SetItemIndex(AIndex: integer);\r\n procedure Loaded; override;\r\n procedure Change; virtual;\r\n procedure PersistinHTML; override;\r\n procedure InitCSSLibrary(ALibrary: TCSSLibrary); override;\r\n property Items: TStrings read FItems write SetItems;\r\n property Align;\r\n property AlignWithMargins;\r\n property BiDiMode;\r\n property BorderStyle;\r\n property Color;\r\n property ElementClassName;\r\n property ElementID;\r\n property ElementFont;\r\n property ElementPosition;\r\n property Enabled;\r\n property Font;\r\n property Height;\r\n property Hint;\r\n property ItemIndex: integer read GetItemIndex write SetItemIndex default -1;\r\n property Left;\r\n property PopupMenu;\r\n property Required: boolean read FRequired write SetRequired default false;\r\n property RequiredText: string read FRequiredText write FRequiredText;\r\n property ShowHint;\r\n property TabOrder;\r\n property TabStop;\r\n property Text: string read GetText write SetText;\r\n property TextHint: string read FTextHint write SetTextHint;\r\n property Top;\r\n property Visible;\r\n property Width;\r\n property OnChange: TNotifyEvent read FOnChange write FOnChange;\r\n property OnClick;\r\n property OnDblClick;\r\n property OnFocusIn: TNotifyEvent read FOnFocusIn write FOnFocusIn;\r\n property OnFocusOut: TNotifyEvent read FOnFocusOut write FOnFocusOut;\r\n property OnKeyDown;\r\n property OnKeyPress;\r\n property OnKeyUp;\r\n property OnMouseDown;\r\n property OnMouseUp;\r\n property OnMouseMove;\r\n property OnMouseLeave;\r\n property OnMouseEnter;\r\n property OnMouseWheel;\r\n property OnEnter;\r\n property OnExit;\r\n public\r\n procedure CreateInitialize; override;\r\n destructor Destroy; override;\r\n procedure Clear;\r\n procedure AddItem(Item: string; AObject: TObject);\r\n property Values[AIndex: integer]: string read GetValues write SetValues;\r\n property ElementSelectHandle: TJSHTMLSelectElement read GetElementSelectHandle;\r\n property Sorted: boolean read FSorted write SetSorted;\r\n property Style: TComboBoxStyle read FStyle write SetStyle;\r\n property DroppedDown: Boolean read FDroppedDown write SetDroppedDown;\r\n end;\r\n\r\n TComboBox = class(TCustomComboBox)\r\n published\r\n property Align;\r\n property AlignWithMargins;\r\n property Anchors;\r\n property BiDiMode;\r\n property BorderStyle;\r\n property ChildOrder;\r\n property Color;\r\n property DragMode;\r\n property ElementClassName;\r\n property ElementID;\r\n property ElementFont;\r\n property ElementPosition;\r\n property Enabled;\r\n property Font;\r\n property Height;\r\n property HeightPercent;\r\n property HeightStyle;\r\n property Hint;\r\n property ItemIndex;\r\n property Items;\r\n property Left;\r\n property OnFocusIn;\r\n property OnFocusOut;\r\n property ParentFont;\r\n property Required;\r\n property RequiredText;\r\n property Role;\r\n property ShowFocus;\r\n property ShowHint;\r\n property Style;\r\n property TabOrder;\r\n property TabStop;\r\n property Text;\r\n property TextDirection;\r\n property TextHint;\r\n property Top;\r\n property Visible;\r\n property Width;\r\n property WidthPercent;\r\n property WidthStyle;\r\n property OnChange;\r\n property OnClick;\r\n property OnDblClick;\r\n property OnKeyDown;\r\n property OnKeyPress;\r\n property OnKeyUp;\r\n property OnMouseDown;\r\n property OnMouseUp;\r\n property OnMouseMove;\r\n property OnMouseLeave;\r\n property OnMouseEnter;\r\n property OnEnter;\r\n property OnExit;\r\n property OnDragDrop;\r\n property OnDragOver;\r\n property OnEndDrag;\r\n property OnStartDrag;\r\n end;\r\n\r\n TWebComboBox = class(TComboBox);\r\n\r\n TFontPicker = class(TCustomComboBox)\r\n public\r\n procedure CreateInitialize; override;\r\n property Items;\r\n published\r\n property Align;\r\n property AlignWithMargins;\r\n property Color;\r\n property ElementClassName;\r\n property ElementID;\r\n property ElementFont;\r\n property ElementPosition;\r\n property Enabled;\r\n property Font;\r\n property Height;\r\n property Hint;\r\n property ItemIndex;\r\n property Left;\r\n property ShowHint;\r\n property TabOrder;\r\n property TabStop;\r\n property Text;\r\n property Top;\r\n property Visible;\r\n property Width;\r\n property WidthPercent;\r\n property OnChange;\r\n property OnClick;\r\n property OnDblClick;\r\n property OnKeyDown;\r\n property OnKeyPress;\r\n property OnKeyUp;\r\n property OnMouseDown;\r\n property OnMouseUp;\r\n property OnMouseMove;\r\n property OnMouseLeave;\r\n property OnMouseEnter;\r\n property OnEnter;\r\n property OnExit;\r\n end;\r\n\r\n TWebFontPicker = class(TFontPicker);\r\n\r\n TFontSizePickerMode = (fmPointSize, fmRelativeSize);\r\n\r\n TFontSizePicker = class(TCustomComboBox)\r\n private\r\n FPickerMode: TFontSizePickerMode;\r\n procedure SetPickerMode(const AValue: TFontSizePickerMode);\r\n protected\r\n procedure Init; virtual;\r\n public\r\n procedure CreateInitialize; override;\r\n property Items;\r\n published\r\n property Align;\r\n property AlignWithMargins;\r\n property Color;\r\n property ElementClassName;\r\n property ElementID;\r\n property ElementFont;\r\n property ElementPosition;\r\n property Enabled;\r\n property Font;\r\n property Height;\r\n property HeightPercent;\r\n property HeightStyle;\r\n property Hint;\r\n property ItemIndex;\r\n property Left;\r\n property PickerMode: TFontSizePickerMode read FPickerMode write SetPickerMode;\r\n property ShowHint;\r\n property TabOrder;\r\n property TabStop;\r\n property Text;\r\n property Top;\r\n property Visible;\r\n property Width;\r\n property WidthPercent;\r\n property WidthStyle;\r\n property OnChange;\r\n property OnClick;\r\n property OnDblClick;\r\n property OnKeyDown;\r\n property OnKeyPress;\r\n property OnKeyUp;\r\n property OnMouseDown;\r\n property OnMouseUp;\r\n property OnMouseMove;\r\n property OnMouseLeave;\r\n property OnMouseEnter;\r\n property OnEnter;\r\n property OnExit;\r\n end;\r\n\r\n TLineSpacingPicker = class(TCustomComboBox)\r\n private\r\n protected\r\n procedure CreateInitialize; override;\r\n public\r\n property Items;\r\n published\r\n property Align;\r\n property AlignWithMargins;\r\n property Color;\r\n property ElementClassName;\r\n property ElementID;\r\n property ElementFont;\r\n property ElementPosition;\r\n property Enabled;\r\n property Font;\r\n property Height;\r\n property HeightPercent;\r\n property HeightStyle;\r\n property Hint;\r\n property ItemIndex;\r\n property Left;\r\n property ShowHint;\r\n property TabOrder;\r\n property TabStop;\r\n property Text;\r\n property Top;\r\n property Visible;\r\n property Width;\r\n property WidthPercent;\r\n property WidthStyle;\r\n property OnChange;\r\n property OnClick;\r\n property OnDblClick;\r\n property OnKeyDown;\r\n property OnKeyPress;\r\n property OnKeyUp;\r\n property OnMouseDown;\r\n property OnMouseUp;\r\n property OnMouseMove;\r\n property OnMouseLeave;\r\n property OnMouseEnter;\r\n property OnEnter;\r\n property OnExit;\r\n end;\r\n\r\n\r\n TWebFontSizePicker = class(TFontSizePicker);\r\n\r\n TCaretPosition = TPoint;\r\n\r\n TCustomMemo = class(TWebCustomControl)\r\n private\r\n FWordWrap: Boolean;\r\n FBlockChange: Boolean;\r\n FLines: TStrings;\r\n FSelStart: Integer;\r\n FSelLength: Integer;\r\n FCaretPosition: TCaretPosition;\r\n FAutoSize: Boolean;\r\n FOnChange: TNotifyEvent;\r\n FReadOnly: boolean;\r\n FTextHint: string;\r\n FHandleChangePtr: pointer;\r\n FHandlePastePtr: pointer;\r\n FHandleCutPtr: pointer;\r\n FHandleInputPtr: pointer;\r\n FHandleInvalidPtr: pointer;\r\n FWantTabs: boolean;\r\n FAutoCompletion: TAutoCompletion;\r\n FSpellCheck: boolean;\r\n FModified: boolean;\r\n FScrollbars: TScrollStyle;\r\n FRequiredText: string;\r\n FRequired: Boolean;\r\n function GetText: String;\r\n procedure SetText(const Value: String);\r\n procedure SetSelLength(const Value: Integer);\r\n procedure SetSelStart(const Value: Integer);\r\n procedure SetAutoSize(const Value: Boolean);\r\n function GetElementInputHandle: TJSHTMLInputElement;\r\n procedure SetReadOnly(const Value: boolean);\r\n function GetSelLength: Integer;\r\n function GetSelStart: Integer;\r\n procedure SetTextHint(const Value: string);\r\n procedure SetAutoCompletion(const Value: TAutoCompletion);\r\n procedure SetSpellCheck(const Value: boolean);\r\n procedure SetWantTabs(const Value: boolean);\r\n procedure SetWordWrap(const Value: Boolean);\r\n function GetCaretPos: TPoint;\r\n procedure SetCaretPos(const Value: TPoint);\r\n procedure SetScrollBars(const Value: TScrollStyle);\r\n function GetSelText: string;\r\n procedure SetRequired(const Value: Boolean);\r\n protected\r\n function IsInputControl: Boolean; override;\r\n function HandleDoKeyDown(Event: TJSKeyBoardEvent): Boolean; override;\r\n function CreateElement: TJSElement; override;\r\n function DoHandlePaste(Event: TEventListenerEvent): Boolean; virtual;\r\n function DoHandleCut(Event: TEventListenerEvent): Boolean; virtual;\r\n function DoHandleInput(Event: TEventListenerEvent): Boolean; virtual;\r\n function DoHandleChange(Event: TEventListenerEvent): Boolean; virtual;\r\n function DoHandleInvalid(Event: TJSEvent): Boolean; virtual;\r\n function IsReadOnly: boolean; virtual;\r\n procedure PersistinHTML; override;\r\n function GetDisplayText: string; virtual;\r\n procedure DoAutoSize; virtual;\r\n procedure BindEvents; override;\r\n procedure UnBindEvents; override;\r\n procedure UpdateElementData; override;\r\n procedure UpdateElementVisual; override;\r\n procedure UpdateElementSize; override;\r\n procedure SetLines(ALines: TStrings);\r\n procedure ClearMethodPointers; override;\r\n procedure GetMethodPointers; override;\r\n procedure DoLinesChange(Sender: TObject);\r\n function CanPaste(AValue: string): boolean; virtual;\r\n function CanCut: boolean; virtual;\r\n function SaveState: string; override;\r\n procedure LoadState(AState: string); override;\r\n property Font;\r\n property Color;\r\n property BorderStyle;\r\n property AutoSize: Boolean read FAutoSize write SetAutoSize;\r\n property ReadOnly: boolean read FReadOnly write SetReadOnly;\r\n property OnClick;\r\n property OnDblClick;\r\n property OnChange: TNotifyEvent read FOnChange write FOnChange;\r\n procedure Change; virtual;\r\n procedure SetCaret(x,y: integer);\r\n function GetCaret: TPoint;\r\n procedure InitCSSLibrary(ALibrary: TCSSLibrary); override;\r\n public\r\n procedure CreateInitialize; override;\r\n destructor Destroy; override;\r\n procedure Clear;\r\n procedure SelectAll;\r\n procedure CopyToClipboard;\r\n procedure ScrollBy(DeltaX, DeltaY: integer);\r\n property CaretPos: TPoint read GetCaretPos write SetCaretPos;\r\n property AutoCompletion: TAutoCompletion read FAutoCompletion write SetAutoCompletion default acOff;\r\n property CaretPosition: TCaretPosition read FCaretPosition write FCaretPosition;\r\n property ElementInputHandle: TJSHTMLInputElement read GetElementInputHandle;\r\n property Lines: TStrings read FLines write SetLines;\r\n property Modified: boolean read FModified write FModified;\r\n property Required: Boolean read FRequired write SetRequired default false;\r\n property RequiredText: string read FRequiredText write FRequiredText;\r\n property Scrollbars: TScrollStyle read FScrollbars write SetScrollBars;\r\n property SelStart: Integer read GetSelStart write SetSelStart;\r\n property SelLength: Integer read GetSelLength write SetSelLength;\r\n property SelText: string read GetSelText;\r\n property Spellcheck: boolean read FSpellCheck write SetSpellCheck default true;\r\n property Text: String read GetText write SetText;\r\n property TextHint: string read FTextHint write SetTextHint;\r\n property WantTabs: boolean read FWantTabs write SetWantTabs default false;\r\n property WordWrap: Boolean read FWordWrap write SetWordWrap default true;\r\n end;\r\n\r\n TMemo = class(TCustomMemo)\r\n published\r\n property Align;\r\n property AlignWithMargins;\r\n property Anchors;\r\n property AutoSize;\r\n property BiDiMode;\r\n property BorderStyle;\r\n property ChildOrder;\r\n property Color;\r\n property DragMode;\r\n property ElementClassName;\r\n property ElementID;\r\n property ElementFont;\r\n property ElementPosition;\r\n property Enabled;\r\n property Font;\r\n property Height;\r\n property HeightPercent;\r\n property HeightStyle;\r\n property Hint;\r\n property Left;\r\n property Lines;\r\n property Margins;\r\n property ParentColor;\r\n property ParentFont;\r\n property PopupMenu;\r\n property ReadOnly;\r\n property Required;\r\n property RequiredText;\r\n property Role;\r\n property SelStart;\r\n property SelLength;\r\n property ShowFocus;\r\n property ShowHint;\r\n property SpellCheck;\r\n property TabOrder;\r\n property TabStop;\r\n property TextDirection;\r\n property Top;\r\n property Visible;\r\n property Width;\r\n property WidthPercent;\r\n property WidthStyle;\r\n property OnChange;\r\n property OnClick;\r\n property OnDblClick;\r\n property OnKeyDown;\r\n property OnKeyPress;\r\n property OnKeyUp;\r\n property OnMouseDown;\r\n property OnMouseUp;\r\n property OnMouseMove;\r\n property OnMouseLeave;\r\n property OnMouseEnter;\r\n property OnMouseWheel;\r\n property OnEnter;\r\n property OnExit;\r\n property OnDragDrop;\r\n property OnDragOver;\r\n property OnEndDrag;\r\n property OnStartDrag;\r\n end;\r\n\r\n TWebMemo = class(TMemo);\r\n\r\n TControlGroup = class(TWebCustomControl)\r\n private\r\n FControls: TList;\r\n FOldCount: integer;\r\n FColumns: integer;\r\n FItems: TStrings;\r\n FOnChange: TNotifyEvent;\r\n FElementButtonClassName: TElementClassName;\r\n FElementLabelClassName: TElementClassName;\r\n FElementGroupClassName: TElementClassName;\r\n FControlPosition: TElementPosition;\r\n FElementLegendClassName: TElementClassName;\r\n procedure SetControlPosition(const Value: TElementPosition);\r\n protected\r\n function CreateElement: TJSElement; override;\r\n function DoHandleChange(Event: TEventListenerEvent): Boolean;\r\n procedure DoHandleClick(AControl: TCustomControl); virtual;\r\n procedure DoItemsChange(Sender: TObject);\r\n procedure DoControlClick(Sender: TObject);\r\n procedure SetCaption(const AValue: string); override;\r\n procedure SetColumns(AValue: integer);\r\n procedure SetItems(AItems: TStrings);\r\n procedure DoUpdateList; virtual;\r\n procedure Change; virtual;\r\n procedure Loaded; override;\r\n procedure FontChanged; override;\r\n function CreateGroupControl(ALeft, ATop, AIndex: integer; ACaption: string; APosition: TElementPosition; AState, AEnabled: boolean): TCustomControl; virtual;\r\n function GetGroupControlState(AIndex: integer): boolean; virtual;\r\n function GetGroupControl(AIndex: integer): TCustomControl;\r\n procedure SetEnabled(Value: Boolean); override;\r\n public\r\n procedure CreateInitialize; override;\r\n destructor Destroy; override;\r\n procedure EndUpdate; override;\r\n procedure SetHeight(AValue: Integer); override;\r\n procedure SetWidth(AValue: Integer); override;\r\n published\r\n property Align;\r\n property AlignWithMargins;\r\n property Anchors;\r\n property Caption;\r\n property ChildOrder;\r\n property Columns: integer read FColumns write SetColumns;\r\n property ControlPosition: TElementPosition read FControlPosition write SetControlPosition default epAbsolute;\r\n property DragMode;\r\n property ElementClassName;\r\n property ElementButtonClassName: TElementClassName read FElementButtonClassName write FElementButtonClassName;\r\n property ElementGroupClassName: TElementClassName read FElementGroupClassName write FElementGroupClassName;\r\n property ElementLabelClassName: TElementClassName read FElementLabelClassName write FElementLabelClassName;\r\n property ElementLegendClassName: TElementClassName read FElementLegendClassName write FElementLegendClassName;\r\n property ElementID;\r\n property ElementFont;\r\n property ElementPosition;\r\n property Enabled;\r\n property Font;\r\n property Height;\r\n property HeightPercent;\r\n property HeightStyle;\r\n property Items: TStrings read FItems write SetItems;\r\n property Margins;\r\n property ParentFont;\r\n property PopupMenu;\r\n property Role;\r\n property TabStop;\r\n property TabOrder;\r\n property Visible;\r\n property Width;\r\n property WidthPercent;\r\n property WidthStyle;\r\n property OnChange: TNotifyEvent read FOnChange write FOnChange;\r\n property OnDragDrop;\r\n property OnDragOver;\r\n property OnEndDrag;\r\n property OnStartDrag;\r\n end;\r\n\r\n TRadioGroup = class(TControlGroup)\r\n private\r\n FItemIndex: integer;\r\n FOldItemIndex: integer;\r\n protected\r\n procedure DoHandleClick(AControl: TCustomControl); override;\r\n function GetItemIndex: integer;\r\n procedure SetItemIndex(AIndex: integer);\r\n function CreateGroupControl(ALeft, ATop, AIndex: integer; ACaption: string; APosition: TElementPosition; AState, AEnabled: boolean): TCustomControl; override;\r\n function GetGroupControlState(AIndex: integer): boolean; override;\r\n procedure LoadState(AState: string); override;\r\n function SaveState: string; override;\r\n public\r\n procedure CreateInitialize; override;\r\n procedure SetFocus; override;\r\n published\r\n property ItemIndex: integer read GetItemIndex write SetItemIndex;\r\n end;\r\n\r\n TWebRadioGroup = class(TRadioGroup);\r\n\r\n TCheckClickEvent = procedure(Sender: TObject; AIndex: integer) of object;\r\n\r\n TCheckGroup = class(TControlGroup)\r\n private\r\n FOnCheckClick: TCheckClickEvent;\r\n function GetChecked(AIndex: integer): boolean;\r\n procedure SetChecked(AIndex: integer; const Value: boolean);\r\n protected\r\n procedure DoHandleClick(AControl: TCustomControl); override;\r\n function CreateGroupControl(ALeft, ATop, AIndex: integer; ACaption: string; APosition: TElementPosition; AState, AEnabled: boolean): TCustomControl; override;\r\n function GetGroupControlState(AIndex: integer): boolean; override;\r\n function SaveState: string; override;\r\n procedure LoadState(AState: string); override;\r\n public\r\n procedure CreateInitialize; override;\r\n property Checked[AIndex: integer]: boolean read GetChecked write SetChecked;\r\n procedure SetFocus; override;\r\n published\r\n property OnCheckClick: TCheckClickEvent read FOnCheckClick write FOnCheckClick;\r\n end;\r\n\r\n TWebCheckGroup = class(TCheckGroup);\r\n\r\n TColorPicker = class(TCustomInput)\r\n private\r\n FColor: TColor;\r\n FOnSelect: TNotifyEvent;\r\n FHandleChangePtr: pointer;\r\n function GetElementInputHandle: TJSHTMLInputElement;\r\n protected\r\n procedure UpdateElementVisual; override;\r\n function DoHandleChange(Event: TEventListenerEvent): Boolean;\r\n function GetInputType: string; override;\r\n function GetColor: TColor;\r\n procedure SetColor(AValue: TColor); reintroduce;\r\n procedure BindEvents; override;\r\n procedure UnBindEvents; override;\r\n procedure Select; virtual;\r\n procedure ClearMethodPointers; override;\r\n procedure GetMethodPointers; override;\r\n procedure InitCSSLibrary(ALibrary: TCSSLibrary); override;\r\n public\r\n procedure CreateInitialize; override;\r\n property ElementInputHandle: TJSHTMLInputElement read GetElementInputHandle;\r\n property Selected: TColor read GetColor write SetColor;\r\n published\r\n property Align;\r\n property AlignWithMargins;\r\n property Anchors;\r\n property ChildOrder;\r\n property Color: TColor read GetColor write SetColor;\r\n property DragMode;\r\n property ElementClassName;\r\n property ElementID;\r\n property ElementFont;\r\n property ElementPosition;\r\n property Enabled;\r\n property Height;\r\n property HeightPercent;\r\n property Left;\r\n property Margins;\r\n property Role;\r\n property Top;\r\n property Visible;\r\n property Width;\r\n property WidthPercent;\r\n property OnClick;\r\n property OnSelect: TNotifyEvent read FOnSelect write FOnSelect;\r\n property OnDragDrop;\r\n property OnDragOver;\r\n property OnEndDrag;\r\n property OnStartDrag;\r\n end;\r\n\r\n TWebColorPicker = class(TColorPicker);\r\n\r\n TScrollBarContent = class(TCustomControl)\r\n protected\r\n function CreateElement: TJSElement; override;\r\n end;\r\n\r\n TScrollBarInc = Integer;\r\n\r\n TScrollBar = class(TCustomControl)\r\n private\r\n FScrolling: Boolean;\r\n FContent: TScrollBarContent;\r\n FKind: TScrollBarKind;\r\n FPosition: Integer;\r\n FSmallChange: TScrollBarInc;\r\n FMax: Integer;\r\n FMin: Integer;\r\n FLargeChange: TScrollBarInc;\r\n FPageSize: Integer;\r\n FOnChange: TNotifyEvent;\r\n FScrollPtr: pointer;\r\n procedure SetKind(const Value: TScrollBarKind);\r\n procedure SetPosition(const Value: Integer);\r\n procedure SetMax(const Value: Integer);\r\n procedure SetMin(const Value: Integer);\r\n procedure SetPageSize(const Value: Integer);\r\n function GetPosition: Integer;\r\n function GetPageSize: Integer;\r\n protected\r\n function GetValue(XYPos: Double): Double;\r\n function CreateElement: TJSElement; override;\r\n function DoScroll(Event: TJSUIEvent): Boolean; virtual;\r\n procedure BindEvents; override;\r\n procedure UnBindEvents; override;\r\n procedure UpdateElementVisual; override;\r\n procedure UpdateContent; virtual;\r\n procedure Loaded; override;\r\n procedure ClearMethodPointers; override;\r\n procedure GetMethodPointers; override;\r\n public\r\n procedure CreateInitialize; override;\r\n destructor Destroy; override;\r\n procedure SetBounds(X, Y, AWidth, AHeight: Integer); override;\r\n published\r\n property Align;\r\n property AlignWithMargins;\r\n property DragMode;\r\n property Height;\r\n property Kind: TScrollBarKind read FKind write SetKind;\r\n property Position: Integer read GetPosition write SetPosition;\r\n property Left;\r\n property SmallChange: TScrollBarInc read FSmallChange write FSmallChange;\r\n property LargeChange: TScrollBarInc read FLargeChange write FLargeChange;\r\n property Max: Integer read FMax write SetMax;\r\n property Min: Integer read FMin write SetMin;\r\n property PageSize: Integer read GetPageSize write SetPageSize;\r\n property Top;\r\n property Visible;\r\n property Width;\r\n property OnChange: TNotifyEvent read FOnChange write FOnChange;\r\n property OnDragDrop;\r\n property OnDragOver;\r\n property OnEndDrag;\r\n property OnStartDrag;\r\n end;\r\n\r\n TWebScrollBar = class(TScrollBar);\r\n\r\nfunction GetAutoCompletionName(aAutoCompletion: TAutoCompletion): string;\r\n\r\nimplementation\r\n\r\nfunction GetAutoCompletionName(aAutoCompletion: TAutoCompletion): string;\r\nbegin\r\n case aAutoCompletion of\r\n acOff: Result := '';\r\n acHonorificPrefix: Result := 'honorific-prefix';\r\n acGivenName: Result := 'given-name';\r\n acAdditionalName: Result := 'additional-name';\r\n acFamilyName: Result := 'family-name';\r\n acHonorificSuffix: Result := 'honorific-suffix';\r\n acNickName: Result := 'nickname';\r\n acEmail: Result := 'email';\r\n acUserName: Result := 'username';\r\n acNewPassword: Result := 'new-password';\r\n acCurrentPassword: Result := 'current-password';\r\n acOrganizationTitle: Result := 'organization-title';\r\n acOrganization: Result := 'organization';\r\n acStreetAddress: Result := 'street-address';\r\n acAddressLine1: Result := 'address-line1';\r\n acAddressLine2: Result := 'address-line2';\r\n acAddressLine3: Result := 'address-line3';\r\n acAddressLevel1: Result := 'address-level1';\r\n acAddressLevel2: Result := 'address-level2';\r\n acAddressLevel3: Result := 'address-level3';\r\n acAddressLevel4: Result := 'address-level4';\r\n acCountry: Result := 'country';\r\n acCountryName: Result := 'country-name';\r\n acPostalCode: Result := 'postal-code';\r\n acCCName: Result := 'cc-name';\r\n acCCGivenName: Result := 'cc-given-name';\r\n acCCAdditionalName: Result := 'cc-additional-name';\r\n acCCFamilyName: Result := 'cc-family-name';\r\n acCCNumber: Result := 'cc-number';\r\n acExpiry: Result := 'cc-exp';\r\n acExpiryMonth: Result := 'cc-exp-month';\r\n acExpiryYear: Result := 'cc-exp-year';\r\n acCSC: Result := 'cc-csc';\r\n acType: Result := 'cc-type';\r\n acTransactionCurrency: Result := 'transaction-currency';\r\n acTransactionAmount: Result := 'transaction-amount';\r\n acLanguage: Result := 'language';\r\n acBirthday: Result := 'bday';\r\n acBirthdayDay: Result := 'bday-day';\r\n acBirthDayMonth: Result := 'bday-month';\r\n acBirthDayYear: Result := 'bday-year';\r\n acSex: Result := 'sex';\r\n acTelephone: Result := 'tel';\r\n acTelephoneCountryCode: Result := 'tel-country-code';\r\n acTelephoneNational: Result := 'tel-national';\r\n acTelephoneAreaCode: Result := 'tel-area-code';\r\n acTelephoneLocal: Result := 'tel-local';\r\n acTelephoneExtension: Result := 'tel-extension';\r\n acIMPP: Result := 'impp';\r\n acURL: Result := 'url';\r\n acPhoto: Result := 'photo';\r\n acNope: Result := 'nope';\r\n end;\r\nend;\r\n\r\n{ TCustomLabel }\r\n\r\nprocedure TCustomLabel.CreateInitialize;\r\nbegin\r\n inherited;\r\n FAutoSize := true;\r\n FLayout := tlTop;\r\n FEllipsisPosition := epNone;\r\n FColor := clWhite;\r\n FTransparent := True;\r\n FAlignment := taLeftJustify;\r\n TabStop := false;\r\n FShowAccelChar := true;\r\nend;\r\n\r\nfunction TCustomLabel.CanShowFocus: boolean;\r\nbegin\r\n Result := false;\r\nend;\r\n\r\nfunction TCustomLabel.CreateElement: TJSElement;\r\nbegin\r\n Result := document.createElement('DIV');\r\n\r\n FContent := CreateLabelElement;\r\n Result.appendChild(FContent);\r\nend;\r\n\r\nfunction TCustomLabel.CreateLabelElement: TJSElement;\r\nbegin\r\n Result := nil;\r\n\r\n case HTMLType of\r\n tSPAN: Result := document.createElement('SPAN');\r\n tDIV: Result := document.createElement('DIV');\r\n tH1: Result := document.createElement('H1');\r\n tH2: Result := document.createElement('H2');\r\n tH3: Result := document.createElement('H3');\r\n tH4: Result := document.createElement('H4');\r\n tH5: Result := document.createElement('H5');\r\n tH6: Result := document.createElement('H6');\r\n tLABELTAG: Result := document.createElement('LABEL');\r\n tP: Result := document.createElement('P');\r\n end;\r\n\r\n Result.setAttribute('data-lbl','lbl');\r\nend;\r\n\r\nprocedure TCustomLabel.BindElement;\r\nbegin\r\n FContent := Container.firstElementChild;\r\nend;\r\n\r\nfunction TCustomLabel.GetContentHandle: TJSHTMLElement;\r\nbegin\r\n Result := TJSHTMLElement(FContent);\r\nend;\r\n\r\nfunction TCustomLabel.GetDisplayText: string;\r\nbegin\r\n Result := Caption;\r\nend;\r\n\r\nfunction TCustomLabel.GetHeight: Integer;\r\nbegin\r\n if AutoSize and Assigned(ElementHandle) and Assigned(Parent) then\r\n begin\r\n Result := Round(TJSHTMLElement(ElementHandle).offsetHeight);\r\n if Result = 0 then\r\n Result := inherited GetHeight;\r\n\r\n if (Result = 0) and (Caption <> '') and (csDesigning in ComponentState) then\r\n Result := FOldHeight;\r\n end\r\n else\r\n Result := inherited GetHeight;\r\nend;\r\n\r\nfunction TCustomLabel.GetWidth: Integer;\r\nbegin\r\n if AutoSize and Assigned(ElementHandle) and Assigned(Parent) then\r\n begin\r\n Result := Round(TJSHTMLElement(ElementHandle).offsetWidth);\r\n\r\n if Result = 0 then\r\n Result := inherited GetWidth;\r\n\r\n if (Result = 0) and (Caption <> '') and (csDesigning in ComponentState) then\r\n Result := FOldWidth;\r\n end\r\n else\r\n Result := inherited GetWidth;\r\nend;\r\n\r\nprocedure TCustomLabel.InitCSSLibrary(ALibrary: TCSSLibrary);\r\nbegin\r\n if (ALibrary = cssBootstrap) then\r\n begin\r\n ElementFont := efCSS;\r\n HeightStyle := ssAuto;\r\n end;\r\nend;\r\n\r\nprocedure TCustomLabel.Loaded;\r\nbegin\r\n inherited;\r\n\r\n if ShowAccelChar and Assigned(FocusControl) then\r\n UpdateElementData;\r\nend;\r\n\r\nprocedure TCustomLabel.SetAutoSize(AValue: boolean);\r\nbegin\r\n if (FAutoSize <> AValue) then\r\n begin\r\n FAutoSize := AValue;\r\n UpdateAutoSize;\r\n UpdateElement;\r\n end;\r\nend;\r\n\r\nprocedure TCustomLabel.SetCaption(const AValue: string);\r\nvar\r\n dw: integer;\r\nbegin\r\n if Caption <> AValue then\r\n begin\r\n dw := Width;\r\n inherited SetCaption(AValue);\r\n UpdateAutoSize;\r\n UpdateElement;\r\n dw := dw - Width;\r\n if AutoSize and (Alignment <> taLeftJustify) and (dw <> 0) and (akRight in Anchors) and not IsUpdating then\r\n Left := Left + dw;\r\n end;\r\nend;\r\n\r\nprocedure TCustomLabel.SetColorEx(const Value: TColor);\r\nbegin\r\n FColor := Value;\r\n\r\n if (csDesigning in ComponentState) and (Color <> clWhite) then\r\n Transparent := false;\r\n\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TCustomLabel.SetControlCursor(const Value: TCursor);\r\nbegin\r\n inherited;\r\n if (ElementClassName = '') and Assigned(ContentHandle) then\r\n SetElementPointer(ContentHandle, Cursor);\r\nend;\r\n\r\nprocedure TCustomLabel.SetElementLabelClassName(const Value: TElementClassName);\r\nbegin\r\n if (FElementLabelClassName <> Value) then\r\n begin\r\n FElementLabelClassName := Value;\r\n UpdateElement;\r\n end;\r\nend;\r\n\r\nprocedure TCustomLabel.SetEllipsisPosition(AValue: TEllipsisPosition);\r\nbegin\r\n if FEllipsisPosition <> AValue then\r\n begin\r\n FEllipsisPosition := AValue;\r\n if FEllipsisPosition <> epNone then\r\n FAutoSize := False;\r\n UpdateElement;\r\n end;\r\nend;\r\n\r\nprocedure TCustomLabel.SetHTML(const Value: string);\r\nbegin\r\n if (FHTML <> Value) then\r\n begin\r\n FHTML := Value;\r\n UpdateElementData;\r\n end;\r\nend;\r\n\r\nprocedure TCustomLabel.SetHTMLType(const Value: THTMLType);\r\nvar\r\n el: TJSElement;\r\nbegin\r\n if (FHTMLType <> Value) then\r\n begin\r\n FHTMLType := Value;\r\n\r\n if FHTMLType in [tH1..tH6] then\r\n ElementFont := efCSS;\r\n\r\n if Assigned(ElementHandle) and Assigned(FContent) then\r\n begin\r\n el := TJSElement(ElementHandle.firstChild);\r\n\r\n if Assigned(el) and (el.getAttribute('data-lbl') = 'lbl') then\r\n begin\r\n ElementHandle.removeChild(FContent);\r\n FContent := CreateLabelElement;\r\n ElementHandle.appendChild(FContent);\r\n UpdateElement;\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TCustomLabel.SetLayout(const Value: TTextLayout);\r\nbegin\r\n if FLayout <> Value then\r\n begin\r\n FLayout := Value;\r\n UpdateElementVisual;\r\n end;\r\nend;\r\n\r\nprocedure TCustomLabel.SetParent(AValue: TControl);\r\nbegin\r\n inherited;\r\n if AutoSize and (Alignment <> taLeftJustify) and (FOrigWidth <> -1) then\r\n begin\r\n Left := Left + FOrigWidth - Width;\r\n FOrigWidth := -1;\r\n end;\r\nend;\r\n\r\nprocedure TCustomLabel.SetTransparent(const Value: boolean);\r\nbegin\r\n if (FTransparent <> Value) then\r\n begin\r\n FTransparent := Value;\r\n UpdateElementVisual;\r\n end;\r\nend;\r\n\r\nprocedure TCustomLabel.SetWidth(AValue: Integer);\r\nbegin\r\n if (AValue <> -1) and (csLoading in ComponentState) then\r\n FOrigWidth := AValue;\r\n\r\n inherited;\r\nend;\r\n\r\nprocedure TCustomLabel.SetAlignment(const Value: TAlignment);\r\nbegin\r\n if FAlignment <> Value then\r\n begin\r\n FAlignment := Value;\r\n UpdateElementVisual;\r\n end;\r\nend;\r\n\r\nprocedure TCustomLabel.UpdateAutoSize;\r\nbegin\r\n if FAutoSize and (Align = alNone) then\r\n begin\r\n if Assigned(ElementHandle) and ElementVisible(ElementHandle) {and not (csDesigning in ComponentState)} then\r\n begin\r\n Width := -1;\r\n Height := -1;\r\n end;\r\n FEllipsisPosition := epNone;\r\n end;\r\nend;\r\n\r\nprocedure TCustomLabel.UpdateElementData;\r\nvar\r\n lTxt: string;\r\n acc: string;\r\n ml: boolean;\r\n contentelement: TJSElement;\r\nbegin\r\n inherited;\r\n\r\n acc := '';\r\n\r\n lTxt := GetDisplayText;\r\n\r\n if ShowAccelChar and (pos('&', lTxt) > 0) then\r\n lTxt := ProcessAccelerator(lTxt,acc)\r\n else\r\n begin\r\n if HTML = '' then\r\n lTxt := HTMLToString(lTxt)\r\n else\r\n lTxt := HTML;\r\n end;\r\n\r\n ml := false;\r\n\r\n if (pos(#13, lTxt) > 0) then\r\n begin\r\n ml := true;\r\n if (pos(#10, lTxt) > 0) then\r\n lTxt := StringReplace(lTxt,#10,'',[rfReplaceAll,rfIgnoreCase]);\r\n lTxt := StringReplace(lTxt,#13,'
',[rfReplaceAll,rfIgnoreCase]);\r\n end\r\n else\r\n if (pos(#10, lTxt) > 0) then\r\n begin\r\n ml := true;\r\n lTxt := StringReplace(lTxt,#10,'
',[rfReplaceAll,rfIgnoreCase]);\r\n end;\r\n\r\n if IsLinked and (lTxt = '') and (csLoading in ComponentState) then\r\n Exit;\r\n\r\n if Assigned(ContentHandle) then\r\n begin\r\n if isLinked then\r\n begin\r\n contentelement := ContentHandle;\r\n\r\n if (ElementID <> '') then\r\n begin\r\n contentelement := document.getElementById(ElementID);\r\n end;\r\n\r\n if Assigned(contentelement) then\r\n begin\r\n if Assigned(ContentHandle.nodeValue) then\r\n contentelement.nodeValue := lTxt\r\n else\r\n if contentelement.childelementcount = 0 then\r\n contentelement.innerHTML := lTxt;\r\n end;\r\n end\r\n else\r\n begin\r\n\r\n if (ContentHandle.childElementCount > 0) and Assigned(ContentHandle.nodeValue) and not FHasAccel and not FHasHTML and not ml then\r\n begin\r\n ContentHandle.nodeValue := lTxt;\r\n end\r\n else\r\n begin\r\n ContentHandle.innerHTML := lTxt\r\n end;\r\n end;\r\n end\r\n else\r\n ElementHandle.innerHTML := lTxt;\r\n\r\n FHasHTML := pos(' 0;\r\n FHasAccel := acc <> '';\r\n\r\n // https://www.htmlgoodies.com/tutorials/html_401/article.php/3479621\r\n if (acc <> '') and Assigned(FocusControl) then\r\n begin\r\n ContentHandle['accesskey'] := acc;\r\n ContentHandle['for'] := FocusControl.ElementID;\r\n end;\r\nend;\r\n\r\nprocedure TCustomLabel.UpdateElementSize;\r\nbegin\r\n inherited;\r\n\r\n if AutoSize and (Align = alNone) and Assigned(ElementHandle) then\r\n begin\r\n if not (csDesigning in ComponentState) then\r\n begin\r\n ElementHandle.style.removeProperty('width');\r\n ElementHandle.style.removeProperty('height');\r\n end;\r\n end;\r\n\r\n if Assigned(ContentHandle) and (Align in [alLeft, alRight, alClient]) and not AutoSize and (Layout in [tlCenter, tlBottom]) then\r\n begin\r\n ContentHandle.style.setProperty('height', Height.ToString+'px');\r\n end;\r\nend;\r\n\r\nprocedure TCustomLabel.UpdateElementVisual;\r\nvar\r\n ow,oh: integer;\r\nbegin\r\n inherited;\r\n\r\n if IsUpdating then\r\n Exit;\r\n\r\n if Assigned(ElementHandle) then\r\n begin\r\n oh := Round(TJSHTMLElement(ElementHandle).offsetHeight);\r\n ow := Round(TJSHTMLElement(ElementHandle).offsetWidth);\r\n\r\n if oh > 0 then\r\n FOldHeight := oh;\r\n if ow > 0 then\r\n FOldWidth := ow;\r\n\r\n if Visible and (not AutoSize or (Align <> alNone)) and ((Alignment <> taLeftJustify) or (Layout <> tlTop)) then\r\n ElementHandle.style.setProperty('display', 'table');\r\n\r\n ElementHandle['zindex'] := '1';\r\n\r\n if AutoSize and (Align = alNone) and not (csDesigning in ComponentState) then\r\n ElementHandle.style.setProperty('overflow', '')\r\n else\r\n ElementHandle.style.setProperty('overflow', 'hidden');\r\n end;\r\n\r\n if Assigned(ContentHandle) then\r\n begin\r\n case Layout of\r\n tlTop: ContentHandle.style.setProperty('vertical-align', 'top');\r\n tlCenter: ContentHandle.style.setProperty('vertical-align', 'middle');\r\n tlBottom: ContentHandle.style.setProperty('vertical-align', 'bottom');\r\n end;\r\n\r\n case Alignment of\r\n taLeftJustify: ContentHandle.style.removeProperty('text-align');\r\n taCenter: ContentHandle.style.setProperty('text-align', 'center');\r\n taRightJustify: ContentHandle.style.setProperty('text-align', 'right');\r\n end;\r\n\r\n SetHTMLElementColor(ElementHandle, Color, Transparent or (Color = clNone) or (Color = clWindow));\r\n SetHTMLElementColor(ContentHandle, Color, Transparent or (Color = clNone) or (Color = clWindow));\r\n\r\n ContentHandle.style.setProperty('display', 'table-cell');\r\n\r\n if ElementClassName = '' then\r\n begin\r\n if Enabled and (ElementFont = efProperty) and not IsLinked then\r\n ContentHandle.style.setProperty('color', ColorToHtml(Font.Color))\r\n else\r\n ContentHandle.style.removeProperty('color');\r\n\r\n SetElementPointer(ContentHandle, Cursor);\r\n SetHTMLElementFont(ContentHandle, Font, not ((ElementFont = efProperty) and not IsLinked) );\r\n end\r\n else\r\n begin\r\n ContentHandle.style.removeProperty('color');\r\n SetHTMLElementFont(ContentHandle, Font, true);\r\n end;\r\n\r\n if ElementLabelClassName <> '' then\r\n ContentHandle['class'] := ElementLabelClassName\r\n else\r\n ContentHandle.removeAttribute('class');\r\n\r\n if (ElementPosition = epAbsolute) or (WidthStyle = ssAbsolute) then\r\n begin\r\n if FEllipsisPosition = epNone then\r\n ContentHandle.style.setProperty('text-overflow', 'clip')\r\n else\r\n ContentHandle.style.setProperty('text-overflow', 'ellipsis');\r\n end\r\n else\r\n ContentHandle.style.removeProperty('text-overflow');\r\n\r\n if WordWrap then\r\n ContentHandle.style.setProperty('white-space', 'normal')\r\n else\r\n ContentHandle.style.setProperty('white-space', 'nowrap');\r\n\r\n // allow selection in labels\r\n ElementHandle.style.setProperty('user-select', '');\r\n\r\n // allow default caret on text\r\n if Cursor = crDefault then\r\n ElementHandle.style.setProperty('cursor', '');\r\n\r\n if AutoSize and (Align = alNone) and not (csDesigning in ComponentState) then\r\n begin\r\n ElementHandle.style.removeProperty('width');\r\n ElementHandle.style.removeProperty('height');\r\n end;\r\n end;\r\nend;\r\n\r\n{ TCustomInput }\r\n\r\nfunction TCustomInput.CreateElement: TJSElement;\r\nbegin\r\n Result := document.createElement('INPUT');\r\n Result['type'] := GetInputType;\r\nend;\r\n\r\nprocedure TCustomInput.UpdateElementVisual;\r\nbegin\r\n inherited;\r\n\r\n if Assigned(Container) and not IsLinked then\r\n begin\r\n TJSHTMLInputElement(Container).style.setProperty('-moz-box-sizing', 'border-box');\r\n TJSHTMLInputElement(Container).style.setProperty('-webkit-box-sizing', 'border-box');\r\n TJSHTMLInputElement(Container).style.setProperty('box-sizing', 'border-box');\r\n end;\r\nend;\r\n\r\nprocedure TCustomInput.CreateInitialize;\r\nbegin\r\n inherited;\r\n ShowFocus := true;\r\n NoUserSelect := false;\r\nend;\r\n\r\nfunction TCustomInput.GetInputType: string;\r\nbegin\r\n Result := 'EDIT';\r\nend;\r\n\r\nfunction TCustomInput.IsInputControl: Boolean;\r\nbegin\r\n Result := True;\r\nend;\r\n\r\nprocedure TCustomInput.LoadState(AState: string);\r\nbegin\r\n TJSHTMLInputElement(ElementHandle).value := AState;\r\nend;\r\n\r\nfunction TCustomInput.SaveState: string;\r\nbegin\r\n Result := TJSHTMLInputElement(ElementHandle).value;\r\nend;\r\n\r\n{ TCustomEdit }\r\n\r\nprocedure TCustomEdit.BindEvents;\r\nbegin\r\n inherited;\r\n if Assigned(ElementInputHandle) then\r\n begin\r\n ElementInputHandle.addEventListener('input', FHandleChangePtr);\r\n ElementInputHandle.addEventListener('paste', FHandlePastePtr);\r\n ElementInputHandle.addEventListener('cut', FHandleCutPtr);\r\n ElementInputHandle.addEventListener('invalid', FHandleInvalidPtr);\r\n ElementInputHandle.addEventListener('search', FHandleSearchPtr);\r\n end;\r\nend;\r\n\r\nprocedure TCustomEdit.UnBindEvents;\r\nbegin\r\n inherited;\r\n if Assigned(ElementInputHandle) then\r\n begin\r\n ElementInputHandle.removeEventListener('input', FHandleChangePtr);\r\n ElementInputHandle.removeEventListener('paste', FHandlePastePtr);\r\n ElementInputHandle.removeEventListener('cut', FHandleCutPtr);\r\n ElementInputHandle.removeEventListener('invalid', FHandleInvalidPtr);\r\n ElementInputHandle.removeEventListener('search', FHandleSearchPtr);\r\n end;\r\nend;\r\n\r\n\r\nprocedure TCustomEdit.Change;\r\nbegin\r\n if Assigned(ElementHandle) then\r\n FText := ElementInputHandle.value;\r\n\r\n if Assigned(OnChange) then\r\n OnChange(Self);\r\nend;\r\n\r\nprocedure TCustomEdit.Clear;\r\nbegin\r\n Text := '';\r\nend;\r\n\r\nprocedure TCustomEdit.ClearMethodPointers;\r\nbegin\r\n inherited;\r\n FHandlePastePtr := nil;\r\n FHandleCutPtr := nil;\r\n FHandleChangePtr := nil;\r\n FHandleInvalidPtr := nil;\r\n FHandleSearchPtr := nil;\r\nend;\r\n\r\nprocedure TCustomEdit.ClearSelection;\r\nvar\r\n s: string;\r\nbegin\r\n s := Text;\r\n Text := Copy(s, 1, SelStart) + Copy(s, SelStart + SelLength, Length(s));\r\nend;\r\n\r\n{$HINTS OFF}\r\nprocedure TCustomEdit.CopyToClipboard;\r\nvar\r\n s: string;\r\nbegin\r\n s := Text;\r\n asm\r\n navigator.clipboard.writeText(s);\r\n end;\r\nend;\r\n{$HINTS ON}\r\n\r\nprocedure TCustomEdit.CreateInitialize;\r\nbegin\r\n inherited;\r\n FAutoCompletion := acOff;\r\n FEditType := weString;\r\n FText := '';\r\n FCharCase := wecNormal;\r\n FMaxLength := 0;\r\n FReadOnly := false;\r\n FTextHint := '';\r\n FPasswordChar := #0;\r\n FSpellCheck := true;\r\n FAutoSelect := true;\r\n Height := 25;\r\nend;\r\n\r\n{$HINTS OFF}\r\nprocedure TCustomEdit.DoEnter;\r\nvar\r\n el: TJSHTMLElement;\r\nbegin\r\n inherited;\r\n if AutoSelect and Assigned(ElementInputHandle) then\r\n begin\r\n el := ElementInputHandle;\r\n asm\r\n el.select();\r\n end;\r\n end;\r\nend;\r\n{$HINTS ON}\r\n\r\nfunction TCustomEdit.DoHandleChange(Event: TEventListenerEvent): Boolean;\r\nbegin\r\n Change;\r\n Result := True;\r\n if FRequiredText <> '' then\r\n begin\r\n ElementInputHandle.setCustomValidity('');\r\n end;\r\nend;\r\n\r\nfunction TCustomEdit.DoHandleCut(Event: TEventListenerEvent): Boolean;\r\nbegin\r\n if not CanCut then\r\n begin\r\n asm\r\n Event.preventDefault();\r\n Event.stopPropagation();\r\n end;\r\n end;\r\n\r\n Result := False;\r\nend;\r\n\r\nfunction TCustomEdit.DoHandleInvalid(Event: TJSEvent): Boolean;\r\nbegin\r\n ElementInputHandle.setCustomValidity(FRequiredText);\r\n Result := true;\r\nend;\r\n\r\nfunction TCustomEdit.DoHandlePaste(Event: TEventListenerEvent): Boolean;\r\nvar\r\n s: string;\r\n clp: boolean;\r\nbegin\r\n clp := false;\r\n asm\r\n var clipboardData = Event.clipboardData || window.clipboardData;\r\n if (clipboardData) {\r\n s = clipboardData.getData('Text');\r\n clp = true;\r\n }\r\n end;\r\n\r\n if clp and (not CanPaste(s) or not Validate(s)) then\r\n begin\r\n asm\r\n Event.preventDefault();\r\n Event.stopPropagation();\r\n end;\r\n end;\r\n\r\n Result := False;\r\nend;\r\n\r\nfunction TCustomEdit.DoHandleSearch(Event: TJSEvent): Boolean;\r\nbegin\r\n Result := true;\r\n if Assigned(OnSearch) then\r\n OnSearch(Self);\r\nend;\r\n\r\nfunction TCustomEdit.CanCut: boolean;\r\nbegin\r\n Result := True\r\nend;\r\n\r\nfunction TCustomEdit.CanPaste(AValue: string): boolean;\r\nbegin\r\n Result := True;\r\nend;\r\n\r\nprocedure TCustomEdit.SetReadOnly(AValue: Boolean);\r\nbegin\r\n if (FReadOnly <> AValue) then\r\n begin\r\n FReadOnly := AValue;\r\n UpdateElement;\r\n end;\r\nend;\r\n\r\nprocedure TCustomEdit.SetRequired(const Value: Boolean);\r\nbegin\r\n if (FRequired <> Value) then\r\n begin\r\n FRequired := Value;\r\n UpdateElement;\r\n end;\r\nend;\r\n\r\nprocedure TCustomEdit.SetSelection(ASelStart, ASelLength: integer);\r\nvar\r\n eh: TJSHTMLElement;\r\nbegin\r\n FSelStart := ASelStart;\r\n FSelLength := ASelLength;\r\n eh := ElementInputHandle;\r\n if Assigned(eh) then\r\n begin\r\n asm\r\n eh.setSelectionRange(ASelStart, ASelStart + ASelLength);\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TCustomEdit.SetSelLength(const Value: Integer);\r\nbegin\r\n FSelLength := Value;\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TCustomEdit.SetSelStart(const Value: Integer);\r\nbegin\r\n FSelStart := Value;\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TCustomEdit.SetSpellCheck(const Value: boolean);\r\nbegin\r\n if (FSpellCheck <> Value) then\r\n begin\r\n FSpellCheck := Value;\r\n UpdateElement;\r\n end;\r\nend;\r\n\r\nprocedure TCustomEdit.SetPasswordChar(const Value: Char);\r\nbegin\r\n FPasswordChar := Value;\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TCustomEdit.SetPattern(const Value: string);\r\nbegin\r\n if FPattern <> Value then\r\n begin\r\n FPattern := Value;\r\n UpdateElement;\r\n end;\r\nend;\r\n\r\nprocedure TCustomEdit.SetNumeric(const Value: Boolean);\r\nbegin\r\n FNumeric := Value;\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TCustomEdit.SetText(AValue: string);\r\nbegin\r\n FText := AValue;\r\n\r\n if Assigned(ElementInputHandle) then\r\n begin\r\n ElementInputHandle.value := GetDisplayText;\r\n ElementInputHandle.readOnly := IsReadOnly;\r\n end;\r\nend;\r\n\r\nfunction TCustomEdit.GetText: string;\r\nbegin\r\n Result := FText;\r\n if Assigned(ElementInputHandle) then\r\n Result := ElementInputHandle.value;\r\n\r\n if CharCase = wecUpperCase then\r\n Result := Uppercase(Result);\r\n\r\n if CharCase = wecLowerCase then\r\n Result := Lowercase(Result);\r\nend;\r\n\r\nprocedure TCustomEdit.InitCSSLibrary(ALibrary: TCSSLibrary);\r\nbegin\r\n if (ALibrary = cssBootstrap) then\r\n begin\r\n ElementFont := efCSS;\r\n ElementClassName := 'form-control';\r\n HeightStyle := ssAuto;\r\n end;\r\nend;\r\n\r\nfunction TCustomEdit.IsCustomEditor: Boolean;\r\nbegin\r\n Result := False;\r\nend;\r\n\r\nfunction TCustomEdit.IsReadOnly: boolean;\r\nbegin\r\n Result := ReadOnly;\r\nend;\r\n\r\nprocedure TCustomEdit.KeyPress(var Key: Char);\r\nvar\r\n isValid: boolean;\r\n\r\nbegin\r\n inherited KeyPress(Key);\r\n\r\n isValid := true;\r\n\r\n case EditType of\r\n weNumeric: isValid := (Key in ['0'..'9']);\r\n weSignedNumeric: isValid := (Key in ['0'..'9','+','-']);\r\n weFloat: isValid := (Key in ['0'..'9',',','.']);\r\n weSignedFloat: isValid := (Key in ['0'..'9',',','.','+','-']);\r\n weHex: isValid := (Key in ['0'..'9','A'..'F']);\r\n end;\r\n\r\n if not isValid then\r\n Key := #0;\r\nend;\r\n\r\nprocedure TCustomEdit.SetTextHint(AValue: string);\r\nbegin\r\n FTextHint := AValue;\r\n UpdateElement;\r\nend;\r\n\r\n{$HINTS OFF}\r\nprocedure TCustomEdit.UpdateElementData;\r\nvar\r\n eh: TJSHTMLElement;\r\n ss, sl: Integer;\r\n isNum, doAc: boolean;\r\nbegin\r\n inherited;\r\n\r\n if Assigned(ElementInputHandle) then\r\n begin\r\n if not IsLinked then\r\n begin\r\n case CharCase of\r\n wecUpperCase: ElementInputHandle.style.setProperty('text-transform', 'uppercase');\r\n wecLowerCase: ElementInputHandle.style.setProperty('text-transform', 'lowercase');\r\n wecMixedCase: ElementInputHandle.style.setProperty('text-transform', 'capitalize');\r\n wecNormal: ElementInputHandle.style.setProperty('text-transform', 'initial');\r\n end;\r\n end;\r\n\r\n ElementInputHandle.readOnly := IsReadOnly;\r\n\r\n if TextHint <> '' then\r\n ElementInputHandle.placeholder := TextHint;\r\n\r\n doAc := true;\r\n\r\n if IsLinked then\r\n begin\r\n doAc := not TJSHTMLElement(ElementInputHandle).hasAttribute('autocomplete');\r\n end;\r\n\r\n if doAc then\r\n begin\r\n if AutoCompletion = acNope then\r\n begin\r\n TJSHTMLElement(ElementInputHandle).setAttribute('autocomplete','nope');\r\n if not IsLinked then\r\n TJSHTMLElement(ElementInputHandle).removeAttribute('name');\r\n end\r\n else\r\n if AutoCompletion = acNone then\r\n begin\r\n TJSHTMLElement(ElementInputHandle).setAttribute('autocomplete','off');\r\n if not IsLinked then\r\n TJSHTMLElement(ElementInputHandle).removeAttribute('name');\r\n end\r\n else\r\n if AutoCompletion <> acOff then\r\n begin\r\n TJSHTMLElement(ElementInputHandle).setAttribute('autocomplete','on');\r\n if not IsLinked then\r\n TJSHTMLElement(ElementInputHandle).setAttribute('name', GetAutoCompletionName(AutoCompletion));\r\n end\r\n else\r\n begin\r\n TJSHTMLElement(ElementInputHandle).removeAttribute('autocomplete');\r\n if not IsLinked then\r\n TJSHTMLElement(ElementInputHandle).removeAttribute('name');\r\n end;\r\n end;\r\n\r\n if not isLinked then\r\n begin\r\n ElementInputHandle['type'] := GetInputType;\r\n ElementInputHandle['role'] := 'textbox';\r\n\r\n case Alignment of\r\n taLeftJustify: TJSHTMLElement(ElementInputHandle).style.removeProperty('text-align');\r\n taCenter: TJSHTMLElement(ElementInputHandle).style.setProperty('text-align', 'center');\r\n taRightJustify: TJSHTMLElement(ElementInputHandle).style.setProperty('text-align', 'right');\r\n end;\r\n\r\n end;\r\n\r\n if Required then\r\n ElementInputHandle.setAttribute('required','')\r\n else\r\n if not isLinked then\r\n ElementInputHandle.removeAttribute('required');\r\n\r\n if AutoFocus then\r\n ElementInputHandle.setAttribute('autofocus','')\r\n else\r\n if not isLinked then\r\n ElementInputHandle.removeAttribute('autofocus');\r\n\r\n if FPattern <> '' then\r\n ElementInputHandle.setAttribute('pattern',FPattern)\r\n else\r\n ElementInputHandle.removeAttribute('pattern');\r\n\r\n if MaxLength <= 0 then\r\n ElementInputHandle.removeAttribute('maxLength')\r\n else\r\n ElementInputHandle.maxLength := MaxLength;\r\n\r\n ElementInputHandle.value := GetDisplayText;\r\n\r\n isNum := Uppercase(GetInputType) = 'NUMBER';\r\n\r\n if not SpellCheck then\r\n ElementInputHandle['spellcheck'] := 'false'\r\n else\r\n ElementInputHandle.removeAttribute('spellcheck');\r\n\r\n if (not isNum) and (not isLinked) and (not IsCustomEditor) then\r\n begin\r\n ss := FSelStart;\r\n sl := FSelStart + FSelLength;\r\n eh := ElementInputHandle;\r\n asm\r\n setTimeout(function() {\r\n eh.setSelectionRange(ss, sl);\r\n }, 1);\r\n end;\r\n end;\r\n\r\n end;\r\nend;\r\n\r\n{$HINTS ON}\r\n\r\nfunction TCustomEdit.Validate(AValue: string): boolean;\r\nvar\r\n i: integer;\r\n Key: char;\r\n isvalid: boolean;\r\nbegin\r\n Result := true;\r\n\r\n for i := 1 to Length(AValue) do\r\n begin\r\n Key := AValue[i];\r\n isValid := true;\r\n\r\n case EditType of\r\n weNumeric: isValid := (Key in ['0'..'9']);\r\n weSignedNumeric: isValid := (Key in ['0'..'9','+','-']);\r\n weFloat: isValid := (Key in ['0'..'9',',','.']);\r\n weSignedFloat: isValid := (Key in ['0'..'9',',','.','+','-']);\r\n weHex: isValid := (Key in ['0'..'9','A'..'F']);\r\n end;\r\n\r\n if not IsValid then\r\n begin\r\n Result := false;\r\n break;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TCustomEdit.SelectAll;\r\nbegin\r\n if Assigned(ElementInputHandle) then\r\n ElementInputHandle.select;\r\nend;\r\n\r\nprocedure TCustomEdit.SetAlignment(const Value: TAlignment);\r\nbegin\r\n FAlignment := Value;\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TCustomEdit.SetAutoCompletion(const Value: TAutoCompletion);\r\nbegin\r\n if (FAutoCompletion <> Value) then\r\n begin\r\n FAutoCompletion := Value;\r\n UpdateElement;\r\n end;\r\nend;\r\n\r\nprocedure TCustomEdit.SetAutoFocus(const Value: boolean);\r\nbegin\r\n if (FAutoFocus <> Value) then\r\n begin\r\n FAutoFocus := Value;\r\n UpdateElement;\r\n end;\r\nend;\r\n\r\nprocedure TCustomEdit.SetAutoSelect(const Value: Boolean);\r\nbegin\r\n if FAutoSelect <> Value then\r\n begin\r\n FAutoSelect := Value;\r\n UpdateElement;\r\n end;\r\nend;\r\n\r\nprocedure TCustomEdit.SetAutoSize(const Value: Boolean);\r\nbegin\r\n if FAutoSize <> Value then\r\n begin\r\n FAutoSize := Value;\r\n UpdateElement;\r\n end;\r\nend;\r\n\r\nprocedure TCustomEdit.SetCharCase(AValue: TEditCharCase);\r\nbegin\r\n if (FCharcase <> AValue) then\r\n begin\r\n FCharcase := AValue;\r\n UpdateElement;\r\n end;\r\nend;\r\n\r\nprocedure TCustomEdit.SetEditType(const Value: TEditType);\r\nbegin\r\n if (FEditType <> Value) then\r\n begin\r\n FEditType := Value;\r\n UpdateElement;\r\n end;\r\nend;\r\n\r\nprocedure TCustomEdit.SetHideSelection(const Value: Boolean);\r\nbegin\r\n if (FHideSelection <> Value) then\r\n begin\r\n FHideSelection := Value;\r\n UpdateElement;\r\n end;\r\nend;\r\n\r\nprocedure TCustomEdit.SetMaxLength(AValue: integer);\r\nbegin\r\n if (FMaxLength <> AValue) then\r\n begin\r\n FMaxLength := AValue;\r\n UpdateElementData;\r\n end;\r\nend;\r\n\r\nfunction TCustomEdit.GetDisplayText: string;\r\nbegin\r\n Result := FText;\r\nend;\r\n\r\nfunction TCustomEdit.GetElementInputHandle: TJSHTMLInputElement;\r\nbegin\r\n Result := TJSHTMLInputElement(Container);\r\nend;\r\n\r\nfunction TCustomEdit.GetInputType: string;\r\nbegin\r\n if (PasswordChar <> #0) then\r\n Result := 'PASSWORD'\r\n else if Numeric then\r\n Result := 'NUMBER'\r\n else\r\n if (EditType in [weFloat, weNumeric]) then\r\n Result := 'TEL'\r\n else\r\n if EditType = weSearch then\r\n Result := 'SEARCH'\r\n else\r\n Result := 'TEXT';\r\nend;\r\n\r\nprocedure TCustomEdit.GetMethodPointers;\r\nbegin\r\n inherited;\r\n FHandlePastePtr := @DoHandlePaste;\r\n FHandleCutPtr := @DoHandleCut;\r\n FHandleChangePtr := @DoHandleChange;\r\n FHandleInvalidPtr := @DoHandleInvalid;\r\n FHandleSearchPtr := @DoHandleSearch;\r\nend;\r\n\r\nfunction TCustomEdit.GetSelLength: Integer;\r\nbegin\r\n Result := -1;\r\n if Assigned(ElementInputHandle) then\r\n Result := ElementInputHandle.selectionEnd - ElementInputHandle.selectionStart;\r\nend;\r\n\r\nfunction TCustomEdit.GetSelStart: Integer;\r\nbegin\r\n Result := -1;\r\n if Assigned(ElementInputHandle) then\r\n Result := ElementInputHandle.selectionStart;\r\nend;\r\n\r\nfunction TCustomEdit.GetSelText: string;\r\nbegin\r\n Result := Copy(Text,SelStart + 1, SelLength);\r\nend;\r\n\r\nprocedure TCustomEdit.PersistinHTML;\r\nbegin\r\n ElementInputHandle.setAttribute('value', Text);\r\nend;\r\n\r\n{ TSpinEdit }\r\n\r\nprocedure TSpinEdit.CreateInitialize;\r\nbegin\r\n inherited;\r\n FIncrement := 1;\r\n FMaxValue := 100;\r\n FMinValue := 0;\r\n ShowFocus := true;\r\n Height := 25;\r\n\r\n // make the spin buttons always visible\r\n AddControlStyle('input[type=\"number\"]::-webkit-inner-spin-button { opacity: 1 !important; }');\r\nend;\r\n\r\nprocedure TSpinEdit.BindEvents;\r\nbegin\r\n inherited;\r\n if Assigned(ElementInputHandle) then\r\n begin\r\n ElementInputHandle.addEventListener('input', FHandleChangePtr);\r\n ElementInputHandle.addEventListener('invalid', FHandleInvalidPtr);\r\n end;\r\nend;\r\n\r\nprocedure TSpinEdit.UnBindEvents;\r\nbegin\r\n inherited;\r\n if Assigned(ElementInputHandle) then\r\n begin\r\n ElementInputHandle.removeEventListener('input', FHandleChangePtr);\r\n ElementInputHandle.removeEventListener('invalid', FHandleInvalidPtr);\r\n end;\r\nend;\r\n\r\nfunction TSpinEdit.GetDisplayText: string;\r\nbegin\r\n Result := IntToStr(FValue);\r\nend;\r\n\r\nfunction TSpinEdit.GetElementInputHandle: TJSHTMLInputElement;\r\nbegin\r\n Result := TJSHTMLInputElement(Container);\r\nend;\r\n\r\nfunction TSpinEdit.DoHandleChange(Event: TEventListenerEvent): Boolean;\r\nbegin\r\n Change;\r\n Result := True;\r\n if FRequiredText <> '' then\r\n begin\r\n ElementInputHandle.setCustomValidity('');\r\n end;\r\nend;\r\n\r\nfunction TSpinEdit.DoHandleInvalid(Event: TJSEvent): Boolean;\r\nbegin\r\n ElementInputHandle.setCustomValidity(FRequiredText);\r\n Result := true;\r\nend;\r\n\r\nprocedure TSpinEdit.Change;\r\nbegin\r\n FValue := GetValue;\r\n\r\n if Assigned(OnChange) then\r\n OnChange(Self);\r\nend;\r\n\r\nprocedure TSpinEdit.ClearMethodPointers;\r\nbegin\r\n inherited;\r\n FHandleChangePtr := nil;\r\n FHandleInvalidPtr := nil;\r\nend;\r\n\r\nfunction TSpinEdit.GetInputType: string;\r\nbegin\r\n Result := 'NUMBER';\r\nend;\r\n\r\nprocedure TSpinEdit.GetMethodPointers;\r\nbegin\r\n inherited;\r\n FHandleChangePtr := @DoHandleChange;\r\n FHandleInvalidPtr := @DoHandleInvalid;\r\nend;\r\n\r\nfunction TSpinEdit.GetText: string;\r\nbegin\r\n Result := IntToStr(Value);\r\nend;\r\n\r\nfunction TSpinEdit.GetValue: integer;\r\nvar\r\n s: string;\r\nbegin\r\n Result := FValue;\r\n\r\n if not Assigned(Container) then\r\n Exit;\r\n\r\n s := TJSHTMLInputElement(Container).value;\r\n if (s <> '') then\r\n Result := StrToInt(s);\r\nend;\r\n\r\nprocedure TSpinEdit.InitCSSLibrary(ALibrary: TCSSLibrary);\r\nbegin\r\n if (ALibrary = cssBootstrap) then\r\n begin\r\n ElementFont := efCSS;\r\n ElementClassName := 'form-control';\r\n HeightStyle := ssAuto;\r\n end;\r\nend;\r\n\r\nfunction TSpinEdit.IsReadOnly: boolean;\r\nbegin\r\n Result := FReadOnly;\r\nend;\r\n\r\nprocedure TSpinEdit.KeyPress(var Key: Char);\r\nbegin\r\n if not (Key in ['0'..'9']) then\r\n begin\r\n Key := #0;\r\n PreventDefault;\r\n StopPropagation;\r\n end;\r\n inherited;\r\nend;\r\n\r\nprocedure TSpinEdit.SetIncrement(AValue: integer);\r\nbegin\r\n FIncrement := AValue;\r\n if Assigned(Container) then\r\n Container['step'] := IntToStr(AValue);\r\nend;\r\n\r\nprocedure TSpinEdit.SetMaxValue(AValue: integer);\r\nbegin\r\n FMaxValue := AValue;\r\n if Assigned(Container) then\r\n Container['max'] := IntToStr(AValue);\r\nend;\r\n\r\nprocedure TSpinEdit.SetMinValue(AValue: integer);\r\nbegin\r\n FMinValue := AValue;\r\n if Assigned(Container) then\r\n Container['min'] := IntToStr(AValue);\r\nend;\r\n\r\nprocedure TSpinEdit.SetReadOnly(const Value: boolean);\r\nbegin\r\n if (FReadOnly <> Value) then\r\n begin\r\n FReadOnly := Value;\r\n UpdateElement;\r\n end;\r\nend;\r\n\r\nprocedure TSpinEdit.SetRequired(const Value: Boolean);\r\nbegin\r\n if (FRequired <> Value) then\r\n begin\r\n FRequired := Value;\r\n UpdateElement;\r\n end;\r\nend;\r\n\r\nprocedure TSpinEdit.SetText(const Value: string);\r\nvar\r\n i: Integer;\r\nbegin\r\n i := 0;\r\n if TryStrToInt(Value, i) then\r\n Self.Value := i\r\n else\r\n Self.Value := 0;\r\nend;\r\n\r\nprocedure TSpinEdit.PersistinHTML;\r\nbegin\r\n ElementInputHandle.setAttribute('value',IntToStr(Value));\r\nend;\r\n\r\nprocedure TSpinEdit.SetValue(AValue: integer);\r\nbegin\r\n FValue := AValue;\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TSpinEdit.UpdateElementData;\r\nbegin\r\n inherited;\r\n if Assigned(Container) then\r\n begin\r\n Container['inputmode'] := 'numeric';\r\n Container['pattern'] := '[0-9]*';\r\n TJSHTMLInputElement(Container).value := GetDisplayText;\r\n ElementInputHandle.readOnly := IsReadOnly;\r\n\r\n if Required then\r\n ElementInputHandle.setAttribute('required','')\r\n else\r\n ElementInputHandle.removeAttribute('required');\r\n end;\r\nend;\r\n\r\n{ TDateTimePicker }\r\n\r\nfunction TDateTimePicker.GetInputType: string;\r\nbegin\r\n if FKind = dtkDate then\r\n Result := 'DATE'\r\n else\r\n Result := 'TIME';\r\nend;\r\n\r\nprocedure TDateTimePicker.GetMethodPointers;\r\nbegin\r\n inherited;\r\n FHandleChangePtr := @DoHandleChange;\r\n FClickPtr := @DoCheckClick;\r\n FFocusPtr := @DoPickerFocus;\r\n FBlurPtr := @DoPickerBlur;\r\nend;\r\n\r\nprocedure TDateTimePicker.SetChecked(const Value: boolean);\r\nbegin\r\n if (FChecked <> Value) then\r\n begin\r\n FChecked := Value;\r\n UpdateElementVisual;\r\n end;\r\nend;\r\n\r\nprocedure TDateTimePicker.SetDate(AValue: TDate);\r\nbegin\r\n if FDate <> AValue then\r\n begin\r\n FDate := Int(AValue);\r\n FTime := 0;\r\n UpdateElementData;\r\n end;\r\nend;\r\n\r\nprocedure TDateTimePicker.SetDateTime(const Value: TDateTime);\r\nbegin\r\n FDate := Int(Value);\r\n FTime := Frac(Value);\r\n UpdateElementData;\r\nend;\r\n\r\nprocedure TDateTimePicker.SetEnabled(Value: Boolean);\r\nvar\r\n el: TJSHTMLElement;\r\nbegin\r\n inherited;\r\n el := TJSHTMLElement(GetElementPicker);\r\n if Assigned(el) then\r\n begin\r\n if Value then\r\n el.removeAttribute('disabled')\r\n else\r\n el.setAttribute('disabled','');\r\n end;\r\nend;\r\n\r\nprocedure TDateTimePicker.SetFocus;\r\nbegin\r\n if Assigned(GetElementPicker) then\r\n begin\r\n TJSHTMLElement(GetElementPicker).Focus();\r\n end;\r\nend;\r\n\r\nprocedure TDateTimePicker.BindEvents;\r\nbegin\r\n inherited;\r\n if Assigned(FElementCheck) then\r\n FElementCheck.addEventListener('click',FClickPtr);\r\n\r\n if Assigned(GetElementPicker) then\r\n begin\r\n GetElementPicker.addEventListener('input', FHandleChangePtr);\r\n GetElementPicker.addEventListener('focus',FFocusPtr);\r\n GetElementPicker.addEventListener('blur',FBlurPtr);\r\n end;\r\nend;\r\n\r\nprocedure TDateTimePicker.UnBindEvents;\r\nbegin\r\n inherited;\r\n if Assigned(FElementCheck) then\r\n FElementCheck.removeEventListener('click',FClickPtr);\r\n\r\n if Assigned(GetElementPicker) then\r\n begin\r\n GetElementPicker.removeEventListener('input', FHandleChangePtr);\r\n GetElementPicker.removeEventListener('focus',FFocusPtr);\r\n GetElementPicker.removeEventListener('blur',FBlurPtr);\r\n end;\r\nend;\r\n\r\n\r\nprocedure TDateTimePicker.Change;\r\nbegin\r\n FTime := GetTime;\r\n FDate := GetDate;\r\n if Assigned(OnChange) then\r\n OnChange(Self);\r\nend;\r\n\r\nprocedure TDateTimePicker.Clear;\r\nbegin\r\n TJSHTMLInputElement(GetElementPicker).value := '';\r\nend;\r\n\r\nprocedure TDateTimePicker.ClearMethodPointers;\r\nbegin\r\n inherited;\r\n FHandleChangePtr := nil;\r\n FBlurPtr := nil;\r\n FFocusPtr := nil;\r\n FClickPtr := nil;\r\nend;\r\n\r\nfunction TDateTimePicker.CreateElement: TJSElement;\r\nbegin\r\n Result := document.createElement('DIV');\r\n\r\n FElementCheck := TJSHTMLElement(document.createElement('INPUT'));\r\n FElementPicker := TJSHTMLElement(document.createElement('INPUT'));\r\n\r\n Result.appendChild(FElementCheck);\r\n Result.appendChild(FElementPicker);\r\nend;\r\n\r\nprocedure TDateTimePicker.CreateInitialize;\r\nbegin\r\n inherited;\r\n FMin := 0;\r\n FMax := 0;\r\n Date := now;\r\n ShowFocus := true;\r\n if (csDesigning in ComponentState) then\r\n begin\r\n Width := 170;\r\n Height := 25;\r\n end;\r\n FDate := Int(Now);\r\n FTime := 0;\r\n FReadOnly := false;\r\n FShowSeconds := true;\r\n FIsBootstrap := false;\r\nend;\r\n\r\nfunction TDateTimePicker.DoCheckClick(Event: TEventListenerEvent): Boolean;\r\nbegin\r\n FChecked := TJSHTMLInputElement(FElementCheck).checked;\r\n\r\n if FChecked then\r\n GetElementPicker.removeAttribute('disabled')\r\n else\r\n GetElementPicker.setAttribute('disabled','true');\r\n\r\n Result := true;\r\nend;\r\n\r\nfunction TDateTimePicker.DoHandleChange(Event: TEventListenerEvent): Boolean;\r\nbegin\r\n Change;\r\n Result := true;\r\nend;\r\n\r\nfunction TDateTimePicker.DoPickerBlur(Event: TEventListenerEvent): Boolean;\r\nbegin\r\n if not IsLinked and not FIsBootstrap then\r\n ElementHandle.style.setProperty('outline','none');\r\n Result := true;\r\n DoExit;\r\nend;\r\n\r\nfunction TDateTimePicker.DoPickerFocus(Event: TEventListenerEvent): Boolean;\r\nbegin\r\n if not IsLinked and not FIsBootstrap then\r\n ElementHandle.style.setProperty('outline','auto');\r\n Result := true;\r\n DoEnter;\r\nend;\r\n\r\nfunction TDateTimePicker.GetDate: TDate;\r\nvar\r\n str: string;\r\n\r\nbegin\r\n Result := Int(FDate) + Frac(FTime);\r\n if not Assigned(GetElementPicker) then\r\n Exit;\r\n\r\n str := TJSHTMLInputElement(GetElementPicker).value;\r\n\r\n if Kind = dtkDate then\r\n begin\r\n Result := PickerDateToDate(str) + Frac(FTime);\r\n end\r\n else\r\n Result := FTime;\r\nend;\r\n\r\nfunction TDateTimePicker.GetDateTime: TDateTime;\r\nbegin\r\n Result := Int(FDate) + Frac(FTime);\r\nend;\r\n\r\nfunction TDateTimePicker.GetElementBindHandle: TJSEventTarget;\r\nbegin\r\n Result := GetElementPicker;\r\nend;\r\n\r\nfunction TDateTimePicker.GetElementPicker: TJSHTMLElement;\r\nbegin\r\n if IsLinked then\r\n Result := ElementHandle\r\n else\r\n Result := FElementPicker;\r\nend;\r\n\r\nprocedure TDateTimePicker.SetText(const Value: String);\r\nbegin\r\n if not Assigned(GetElementPicker) then\r\n Exit;\r\nend;\r\n\r\nprocedure TDateTimePicker.SetTime(AValue: TTime);\r\nbegin\r\n if FTime <> AValue then\r\n begin\r\n FDate := 0;\r\n FTime := AValue;\r\n UpdateElementData;\r\n end;\r\nend;\r\n\r\nprocedure TDateTimePicker.UpdateElementData;\r\nvar\r\n el: TJSHTMLElement;\r\n s: string;\r\n i: integer;\r\n d,m,y: word;\r\nbegin\r\n inherited;\r\n\r\n el := GetElementPicker;\r\n\r\n if Assigned(el) then\r\n begin\r\n el['step'] := '1';\r\n\r\n case Kind of\r\n dtkTime:\r\n begin\r\n if ShowSeconds then\r\n s := FormatDateTime('HH:MM:SS', FTime)\r\n else\r\n s := FormatDateTime('HH:MM', FTime);\r\n\r\n for i := 1 to Length(s) do\r\n begin\r\n if not (s[i] in ['0'..'9']) then\r\n s[i] := ':';\r\n end;\r\n\r\n TJSHTMLInputElement(el).value := s;\r\n if not ShowSeconds then\r\n el['step'] := '60';\r\n end;\r\n dtkDate:\r\n begin\r\n if FDate = 0 then\r\n TJSHTMLInputElement(el).value := ''\r\n else\r\n begin\r\n s := FormatDateTime('yyyy-MM-dd', FDate);\r\n for i := 1 to Length(s) do\r\n begin\r\n if not (s[i] in ['0'..'9']) then\r\n s[i] := '-';\r\n end;\r\n TJSHTMLInputElement(el).value := s;\r\n end;\r\n end;\r\n end;\r\n\r\n if TabStop then\r\n el.setAttribute('tabindex',inttostr(TabOrder))\r\n else\r\n el.setAttribute('tabindex','-1');\r\n\r\n if Kind = dtkDate then\r\n begin\r\n if FMin <> 0 then\r\n begin\r\n DecodeDate(FMin, y, m, d);\r\n el.setAttribute('min', Format('%d',[y])+'-' + Format('%.*d',[2,m])+'-' + Format('%.*d',[2,d]));\r\n end\r\n else\r\n el.removeAttribute('min');\r\n\r\n if FMax <> 0 then\r\n begin\r\n DecodeDate(FMax, y, m, d);\r\n el.setAttribute('max', Format('%d',[y])+'-' + Format('%.*d',[2,m])+'-' + Format('%.*d',[2,d]));\r\n end\r\n else\r\n el.removeAttribute('max');\r\n end;\r\n\r\n\r\n TJSHTMLInputElement(el).readOnly := IsReadOnly;\r\n\r\n if IsEnabled then\r\n el.removeAttribute('disabled')\r\n else\r\n el.setAttribute('disabled','');\r\n end;\r\nend;\r\n\r\nprocedure TDateTimePicker.UpdateElementVisual;\r\nvar\r\n frm: TCustomForm;\r\nbegin\r\n inherited;\r\n\r\n frm := GetParentForm(Self);\r\n FIsBootstrap := Assigned(frm) and (frm.CSSLibrary = cssBootstrap) and (ElementClassName <> '');\r\n\r\n if Assigned(GetElementPicker) and Assigned(ElementHandle) and Assigned(FElementCheck) then\r\n begin\r\n FElementCheck['type'] := 'CHECKBOX';\r\n\r\n if FKind = dtkDate then\r\n GetElementPicker['type'] := 'DATE'\r\n else\r\n GetElementPicker['type'] := 'TIME';\r\n\r\n if (ElementClassName = '') then\r\n begin\r\n GetElementPicker.style.setProperty('border','none');\r\n GetElementPicker.style.setProperty('border-width','0px');\r\n GetElementPicker.style.setProperty('outline','none');\r\n GetElementPicker.style.setProperty('font-family','inherit');\r\n GetElementPicker.style.setProperty('font-size','inherit');\r\n GetElementPicker.style.setProperty('width','100%');\r\n GetElementPicker.style.setProperty('height','100%');\r\n end\r\n else\r\n begin\r\n if FIsBootstrap then\r\n begin\r\n GetElementPicker.setAttribute('class',ElementClassName);\r\n ElementHandle.removeAttribute('class');\r\n end;\r\n end;\r\n\r\n if not IsLinked then\r\n begin\r\n ElementHandle.style.setProperty('padding','1px');\r\n ElementHandle.style.setProperty('outline','none');\r\n end;\r\n\r\n if (BorderStyle = bsSingle) and (ElementClassName = '') then\r\n begin\r\n if not Enabled then\r\n ElementHandle.style.setProperty('border','1px silver solid')\r\n else\r\n ElementHandle.style.setProperty('border','1px solid');\r\n\r\n ElementHandle.style.setProperty('border-radius','3px');\r\n end\r\n else\r\n begin\r\n if FIsBootstrap then\r\n begin\r\n ElementHandle.style.removeProperty('border');\r\n ElementHandle.style.removeProperty('box-sizing');\r\n end;\r\n end;\r\n\r\n if Assigned(FElementCheck) then\r\n begin\r\n if ShowCheckBox then\r\n FElementCheck.style.SetProperty('display','')\r\n else\r\n FElementCheck.style.SetProperty('display','none');\r\n end;\r\n\r\n if ShowCheckBox then\r\n begin\r\n if Checked then\r\n GetElementPicker.removeAttribute('disabled')\r\n else\r\n GetElementPicker.setAttribute('disabled','true');\r\n end;\r\n\r\n end;\r\nend;\r\n\r\nfunction TDateTimePicker.GetText: String;\r\nbegin\r\n Result := '';\r\n if not Assigned(GetElementPicker) then\r\n Exit;\r\n\r\n Result := TJSHTMLInputElement(GetElementPicker).value;\r\nend;\r\n\r\nfunction TDateTimePicker.GetTime: TTime;\r\nvar\r\n str: string;\r\nbegin\r\n if FDate > 0 then\r\n Result := Frac(FTime) + Int(FDate)\r\n else\r\n Result := Frac(FTime);\r\n\r\n if not Assigned(GetElementPicker) then\r\n Exit;\r\n\r\n str := TJSHTMLInputElement(GetElementPicker).value;\r\n\r\n if Kind = dtkTime then\r\n begin\r\n Result := PickerTimeToTime(str) + Int(FDate);\r\n end\r\n else\r\n Result := FTime;\r\nend;\r\n\r\n{$HINTS OFF}\r\nfunction TDateTimePicker.HandleDoEnter(Event: TJSFocusEvent): Boolean;\r\nvar\r\n el: TJSElement;\r\nbegin\r\n Result := inherited HandleDoEnter(Event);\r\n if AutoDropDown then\r\n begin\r\n el := GetElementPicker;\r\n asm\r\n el.showPicker();\r\n end;\r\n end;\r\nend;\r\n{$HINTS ON}\r\n\r\nprocedure TDateTimePicker.InitCSSLibrary(ALibrary: TCSSLibrary);\r\nbegin\r\n if (ALibrary = cssBootstrap) then\r\n begin\r\n ElementFont := efCSS;\r\n ElementClassName := 'form-control';\r\n HeightStyle := ssAuto;\r\n end;\r\nend;\r\n\r\nfunction TDateTimePicker.IsReadOnly: boolean;\r\nbegin\r\n Result := FReadOnly;\r\nend;\r\n\r\nprocedure TDateTimePicker.SetKind(AValue: TDateTimeKind);\r\nvar\r\n dt: TDateTime;\r\nbegin\r\n FKind := AValue;\r\n if Assigned(GetElementPicker) then\r\n begin\r\n dt := Int(FDate) + Frac(FTime);\r\n if AValue = dtkDate then\r\n GetElementPicker['type'] := 'DATE'\r\n else\r\n GetElementPicker['type'] := 'TIME';\r\n\r\n Date := dt;\r\n Time := dt;\r\n UpdateElement;\r\n end;\r\nend;\r\n\r\nprocedure TDateTimePicker.SetMax(const Value: TDateTime);\r\nbegin\r\n if (FMax <> Value) then\r\n begin\r\n FMax := Value;\r\n UpdateElementData;\r\n end;\r\nend;\r\n\r\nprocedure TDateTimePicker.SetMin(const Value: TDateTime);\r\nbegin\r\n if (FMin <> Value) then\r\n begin\r\n FMin := Value;\r\n UpdateElementData;\r\n end;\r\nend;\r\n\r\nprocedure TDateTimePicker.SetReadOnly(const Value: boolean);\r\nbegin\r\n FReadOnly := Value;\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TDateTimePicker.SetShowCheckBox(const Value: boolean);\r\nbegin\r\n if (FShowCheckBox <> Value) then\r\n begin\r\n FShowCheckBox := Value;\r\n UpdateElementVisual;\r\n end;\r\nend;\r\n\r\nprocedure TDateTimePicker.SetShowSeconds(const Value: boolean);\r\nbegin\r\n if (FShowSeconds <> Value) then\r\n begin\r\n FShowSeconds := Value;\r\n UpdateElement;\r\n end;\r\nend;\r\n\r\n{ TButton }\r\n\r\nprocedure TButton.CreateInitialize;\r\nbegin\r\n inherited;\r\n if (csDesigning in ComponentState) and (Caption = '') then\r\n Caption := Name;\r\n Color := clNone;\r\n FModalResult := mrNone;\r\nend;\r\n\r\nprocedure TButton.HandleKeyPreview(Key: Word);\r\nbegin\r\n inherited;\r\n if Default and (Key = VK_RETURN) then\r\n begin\r\n Click;\r\n end;\r\n if Cancel and (Key = VK_ESCAPE) then\r\n begin\r\n Click;\r\n end;\r\nend;\r\n\r\nprocedure TButton.InitCSSLibrary(ALibrary: TCSSLibrary);\r\nbegin\r\n if (ALibrary = cssBootstrap) then\r\n begin\r\n ElementClassName := 'btn btn-light';\r\n ElementFont := efCSS;\r\n HeightStyle := ssAuto;\r\n end;\r\nend;\r\n\r\nprocedure TButton.Click;\r\nvar\r\n frm: TCustomForm;\r\nbegin\r\n inherited;\r\n\r\n if ModalResult <> mrNone then\r\n begin\r\n frm := GetParentForm(Self);\r\n if Assigned(frm) then\r\n frm.ModalResult := ModalResult;\r\n end;\r\nend;\r\n\r\nfunction TButton.CreateElement: TJSElement;\r\nbegin\r\n Result := document.createElement('BUTTON');\r\n Result['type'] := 'BUTTON';\r\nend;\r\n\r\nprocedure TButton.SetCaption(const AValue: string);\r\nbegin\r\n if Caption <> AValue then\r\n begin\r\n inherited SetCaption(AValue);\r\n UpdateElementData;\r\n end;\r\nend;\r\n\r\nprocedure TButton.SetDefault(const Value: Boolean);\r\nbegin\r\n FDefault := Value;\r\n if FDefault then\r\n SetFocus;\r\nend;\r\n\r\nprocedure TButton.SetButtonType(const Value: string);\r\nbegin\r\n FButtonType := Value;\r\n UpdateElementData;\r\nend;\r\n\r\nprocedure TButton.UpdateElementData;\r\nvar\r\n acc: string;\r\nbegin\r\n inherited;\r\n\r\n if IsLinked and (Caption = '') then\r\n Exit;\r\n\r\n if Assigned(ElementHandle) then\r\n begin\r\n if (ElementHandle.childElementCount = 0) or (Pos(' 0) or not IsLinked then\r\n begin\r\n ElementHandle.innerHTML := ProcessAccelerator(Caption,acc);\r\n end;\r\n\r\n if acc <> '' then\r\n ElementHandle['accesskey'] := acc;\r\n\r\n ElementHandle['role'] := 'button';\r\n ElementHandle['aria-label'] := Caption;\r\n\r\n if FButtonType <> '' then\r\n ElementHandle['type'] := FButtonType\r\n else\r\n ElementHandle['type'] := 'BUTTON';\r\n end;\r\nend;\r\n\r\nprocedure TButton.UpdateElementVisual;\r\nvar\r\n ecn: string;\r\nbegin\r\n inherited;\r\n if Assigned(ElementHandle) then\r\n begin\r\n ElementHandle.style.removeProperty('outline');\r\n ElementHandle.style.removeProperty('user-select');\r\n\r\n ecn := Uppercase(ElementClassName);\r\n\r\n if (ecn = 'BTN') or (pos('BTN ', ecn) > 0) then\r\n begin\r\n// ElementHandle.style.setProperty('border','none');\r\n end;\r\n end;\r\nend;\r\n\r\n{ TCheckBox }\r\n\r\nprocedure TCheckBox.CreateInitialize;\r\nbegin\r\n inherited;\r\n Color := clNone;\r\n FChecked := False;\r\n FState := cbUnchecked;\r\n Alignment := taRightJustify;\r\n\r\n if (csDesigning in ComponentState) and (Caption = '') then\r\n Caption := Name;\r\n\r\n ShowFocus := true;\r\nend;\r\n\r\nprocedure TCheckBox.DoCheckClick;\r\nbegin\r\n if Assigned(OnCheckClick) then\r\n OnCheckClick(Self);\r\nend;\r\n\r\nprocedure TCheckBox.Click;\r\nbegin\r\n inherited;\r\n FChecked := GetChecked;\r\n if FChecked then\r\n FState := cbChecked\r\n else\r\n FState := cbUnChecked;\r\n\r\n SetFocus;\r\nend;\r\n\r\nfunction TCheckBox.CreateElement: TJSElement;\r\nvar\r\n btn, lbl: TJSElement;\r\nbegin\r\n Result := document.createElement('SPAN');\r\n btn := document.createElement('INPUT');\r\n lbl := document.createElement('SPAN');\r\n\r\n btn['TYPE'] := 'CHECKBOX';\r\n btn['id'] := GetID + 'ck';\r\n btn['role'] := 'checkbox';\r\n lbl['id'] := GetID + 'lbl';\r\n lbl['value'] := GetID;\r\n\r\n Result.appendChild(btn);\r\n Result.appendChild(lbl);\r\n\r\n (btn as TJSHTMLInputElement).OnClick := @HandleCheckClick;\r\nend;\r\n\r\nfunction TCheckBox.HandleCheckClick(Event: TJSMouseEvent): Boolean;\r\nbegin\r\n DoCheckClick;\r\n Result := true;\r\nend;\r\n\r\nfunction TCheckBox.HandleLabelClick(Event: TJSMouseEvent): Boolean;\r\nvar\r\n chk: TJSHTMLInputElement;\r\nbegin\r\n if Assigned(Container) and Enabled then\r\n begin\r\n chk := TJSHTMLInputElement(GetCheckElement);\r\n chk.checked := not chk.checked;\r\n\r\n Checked := chk.checked;\r\n end;\r\n DoCheckClick;\r\n Result := true;\r\nend;\r\n\r\nprocedure TCheckBox.InitCSSLibrary(ALibrary: TCSSLibrary);\r\nbegin\r\n if (ALibrary = cssBootstrap) then\r\n begin\r\n ElementFont := efCSS;\r\n ElementClassName := 'custom-control custom-checkbox';\r\n ElementButtonClassName := 'custom-control-input';\r\n ElementLabelClassName := 'custom-control-label';\r\n HeightStyle := ssAuto;\r\n end;\r\nend;\r\n\r\nprocedure TCheckBox.KeyPress(var ch: char);\r\nvar\r\n chk: TJSHTMLInputElement;\r\nbegin\r\n inherited;\r\n if ch = #32 then\r\n begin\r\n if Assigned(Container) and not IsLinked then\r\n begin\r\n chk := TJSHTMLInputElement(GetCheckElement);\r\n chk.checked := not chk.checked;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TCheckBox.Loaded;\r\nvar\r\n lbl: TJSHTMLInputElement;\r\n\r\nbegin\r\n inherited;\r\n\r\n if Assigned(Container) then\r\n begin\r\n if not IsLinked then\r\n begin\r\n lbl := TJSHTMLInputElement(Container.children[1]);\r\n lbl.OnClick := @HandleLabelClick;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TCheckBox.UpdateElementData;\r\nvar\r\n chk: TJSHTMLInputElement;\r\n btn: TJSElement;\r\nbegin\r\n inherited;\r\n\r\n if Assigned(Container) then\r\n begin\r\n chk := TJSHTMLInputElement(GetCheckElement);\r\n if Assigned(chk) then\r\n begin\r\n chk.disabled := not IsEnabled;\r\n chk.checked := FChecked;\r\n chk.indeterminate := (State = cbGrayed);\r\n end;\r\n\r\n if not IsLinked then\r\n begin\r\n if (Caption <> '') then\r\n Container.lastElementChild.innerHTML := Caption;\r\n\r\n ElementHandle.setAttribute('tabindex','-1');\r\n\r\n btn := TJSElement(ElementHandle.firstChild);\r\n btn.setAttribute('tabindex','-1');\r\n end;\r\n\r\n if TabStop then\r\n Container.setAttribute('tabindex',inttostr(TabOrder));\r\n end;\r\nend;\r\n\r\nprocedure TCheckBox.UpdateElementSize;\r\nbegin\r\n inherited;\r\n\r\n if Assigned(Container) and not IsLinked and (ElementPosition = epAbsolute) then\r\n begin\r\n if HeightStyle <> ssAuto then\r\n TJSHTMLElement(Container.firstElementChild).style.setProperty('height','100%')\r\n else\r\n TJSHTMLElement(Container.firstElementChild).style.removeProperty('height');\r\n end;\r\nend;\r\n\r\nprocedure TCheckBox.UpdateElementVisual;\r\nvar\r\n btn,lbl: TJSElement;\r\n frm: TCustomForm;\r\n isbs: boolean;\r\nbegin\r\n inherited;\r\n\r\n if Assigned(ElementHandle) then\r\n begin\r\n btn := TJSElement(ElementHandle.firstChild);\r\n\r\n if Assigned(btn) then\r\n begin\r\n if Assigned(TJSHTMLElement(btn).style) then\r\n TJSHTMLElement(btn).style.setProperty('margin-right','4px');\r\n\r\n if ElementClassName = '' then\r\n begin\r\n TJSHTMLElement(btn).style.setProperty('vertical-align','middle');\r\n TJSHTMLElement(btn).style.setProperty('margin-top','0px');\r\n end;\r\n\r\n if FElementButtonClassName <> '' then\r\n btn.setAttribute('class',FElementButtonClassName)\r\n else\r\n btn.removeAttribute('class');\r\n end;\r\n\r\n lbl := TJSElement(ElementHandle.lastElementChild);\r\n\r\n if Assigned(lbl) then\r\n begin\r\n if FElementLabelClassName <> '' then\r\n lbl.setAttribute('class',FElementLabelClassName)\r\n else\r\n lbl.removeAttribute('class');\r\n end;\r\n\r\n if not TabStop or not ShowFocus or (ElementClassName <> '') then\r\n ElementHandle.style.setProperty('outline','none');\r\n\r\n if not IsLinked then\r\n begin\r\n ElementHandle.style.setProperty('user-select','none');\r\n\r\n if ElementPosition = epAbsolute then\r\n begin\r\n if ElementButtonClassName = '' then\r\n begin\r\n if Alignment = taRightJustify then\r\n begin\r\n TJSHTMLElement(btn).style.setProperty('float','left');\r\n end\r\n else\r\n begin\r\n TJSHTMLElement(btn).style.setProperty('float','right');\r\n end;\r\n\r\n if HeightStyle = ssAuto then\r\n TJSHTMLElement(btn).style.removeProperty('height')\r\n else\r\n if (ElementPosition = epAbsolute) then\r\n TJSHTMLElement(btn).style.setProperty('height','100%');\r\n\r\n TJSHTMLElement(btn).style.setProperty('vertical-align','middle');\r\n\r\n if not (Parent is TCheckGroup) then\r\n begin\r\n TJSHTMLElement(btn).style.setProperty('margin-top','0px');\r\n TJSHTMLElement(btn).style.setProperty('margin-bottom','0px');\r\n end;\r\n end;\r\n\r\n frm := GetParentForm(Self);\r\n isbs := Assigned(frm) and (frm.CSSLibrary = cssBootstrap);\r\n\r\n if (ElementLabelClassName = '') or isbs then\r\n begin\r\n lbl := TJSElement(Container.lastElementChild);\r\n TJSHTMLElement(lbl).style.setProperty('vertical-align','middle');\r\n TJSHTMLElement(lbl).style.setProperty('min-height','100%');\r\n TJSHTMLElement(lbl).style.setProperty('height','100%');\r\n TJSHTMLElement(lbl).style.setProperty('position','absolute');\r\n TJSHTMLElement(lbl).style.setProperty('overflow','hidden');\r\n TJSHTMLElement(lbl).style.setProperty('display','inline-flex');\r\n TJSHTMLElement(lbl).style.setProperty('align-items','center');\r\n end;\r\n end;\r\n end;\r\n\r\n end;\r\nend;\r\n\r\nprocedure TCheckBox.SetAlignment(const Value: TAlignment);\r\nbegin\r\n if FAlignment <> Value then\r\n begin\r\n FAlignment := Value;\r\n UpdateElementVisual;\r\n end;\r\nend;\r\n\r\nprocedure TCheckBox.SetCaption(const AValue: string);\r\nbegin\r\n if Caption <> AValue then\r\n begin\r\n inherited SetCaption(AValue);\r\n if Assigned(Container) then\r\n begin\r\n if IsLinked then\r\n begin\r\n if Assigned(Container.lastElementChild) and (Container.lastElementChild.tagName = 'SPAN') then\r\n Container.lastElementChild.innerHTML := AValue;\r\n end\r\n else\r\n if Assigned(Container.lastElementChild) then\r\n Container.lastElementChild.innerHTML := AValue;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TCheckBox.SetEnabled(Value: boolean);\r\nvar\r\n el: TJSHTMLElement;\r\nbegin\r\n inherited;\r\n if Assigned(Container) then\r\n begin\r\n el := GetCheckElement;\r\n if Assigned(el) then\r\n TJSHTMLInputElement(el).disabled := not Value;\r\n end;\r\nend;\r\n\r\nprocedure TCheckBox.SetChecked(AValue: boolean);\r\nbegin\r\n FChecked := AValue;\r\n if AValue then\r\n FState := cbChecked\r\n else\r\n FState := cbUnChecked;\r\n\r\n UpdateElement;\r\nend;\r\n\r\nfunction TCheckBox.GetChecked: boolean;\r\nvar\r\n el: TJSHTMLElement;\r\nbegin\r\n if Assigned(Container) then\r\n begin\r\n el := GetCheckElement;\r\n if Assigned(el) then\r\n FChecked := TJSHTMLInputElement(el).checked;\r\n end;\r\n\r\n Result := FChecked;\r\nend;\r\n\r\nfunction TCheckBox.GetCheckElement: TJSHTMLElement;\r\nbegin\r\n if IsLinked then\r\n begin\r\n if ElementHandle.tagName = 'INPUT' then\r\n Result := TJSHTMLElement(ElementHandle)\r\n else\r\n Result := TJSHTMLElement(Container.firstElementChild);\r\n end\r\n else\r\n Result := TJSHTMLElement(Container.firstElementChild);\r\nend;\r\n\r\nprocedure TCheckBox.SetState(AValue: TCheckBoxState);\r\nbegin\r\n FState := AValue;\r\n FChecked := FState = cbChecked;\r\n UpdateElement;\r\nend;\r\n\r\nfunction TCheckBox.GetState: TCheckBoxState;\r\nbegin\r\n Result := FState;\r\nend;\r\n\r\nprocedure TCheckBox.PersistinHTML;\r\nvar\r\n cb: TJSHTMLInputElement;\r\nbegin\r\n if not Assigned(Container) then\r\n Exit;\r\n\r\n cb := TJSHTMLInputElement(GetCheckElement);\r\n\r\n if (cb.checked) then\r\n cb.setAttribute('checked','checked')\r\n else\r\n cb.removeAttribute('checked');\r\nend;\r\n\r\nprocedure TCheckBox.LoadState(AState: string);\r\nvar\r\n cb: TJSHTMLInputElement;\r\nbegin\r\n if not Assigned(Container) then\r\n Exit;\r\n\r\n cb := TJSHTMLInputElement(GetCheckElement);\r\n cb.checked := AState = '1';\r\nend;\r\n\r\nfunction TCheckBox.SaveState: string;\r\nvar\r\n cb: TJSHTMLInputElement;\r\nbegin\r\n if not Assigned(Container) then\r\n Exit;\r\n\r\n cb := TJSHTMLInputElement(GetCheckElement);\r\n\r\n if (cb.checked) then\r\n Result := '1'\r\n else\r\n Result := '0';\r\nend;\r\n\r\n{ TRadioButton }\r\n\r\nprocedure TRadioButton.CreateInitialize;\r\nbegin\r\n inherited;\r\n Color := clNone;\r\n\r\n if (csDesigning in ComponentState) and (Caption = '') then\r\n Caption := Name;\r\n\r\n FGroupName := '';\r\n ShowFocus := true;\r\nend;\r\n\r\nfunction TRadioButton.CreateElement: TJSElement;\r\nvar\r\n btn, lbl: TJSElement;\r\nbegin\r\n Result := document.createElement('SPAN');\r\n btn := document.createElement('INPUT');\r\n lbl := document.createElement('SPAN');\r\n Result.addEventListener('click', @HandleLabelClick);\r\n\r\n btn['TYPE'] := 'RADIO';\r\n btn['id'] := GetID + 'rd';\r\n btn['name'] := GroupName;\r\n btn['role'] := 'radio';\r\n btn['tabindex'] := '-1';\r\n btn.AddEventListener('click',@HandleRadioClick);\r\n\r\n lbl['id'] := GetID + 'lbl';\r\n lbl['value'] := GetID;\r\n\r\n Result.appendChild(btn);\r\n Result.appendChild(lbl);\r\nend;\r\n\r\nfunction TRadioButton.HandleLabelClick(Event: TJSMouseEvent): Boolean;\r\nvar\r\n rb: TJSHTMLInputElement;\r\nbegin\r\n if Assigned(Container) and Enabled then\r\n begin\r\n rb := TJSHTMLInputElement(GetRadioElement);\r\n rb.checked := true;\r\n end;\r\n Result := true;\r\nend;\r\n\r\nfunction TRadioButton.HandleRadioClick(Event: TJSMouseEvent): Boolean;\r\nbegin\r\n SetFocus;\r\n Result := true;\r\nend;\r\n\r\nprocedure TRadioButton.InitCSSLibrary(ALibrary: TCSSLibrary);\r\nbegin\r\n if (ALibrary = cssBootstrap) then\r\n begin\r\n ElementFont := efCSS;\r\n ElementClassName := 'form-control';\r\n HeightStyle := ssAuto;\r\n end;\r\nend;\r\n\r\nprocedure TRadioButton.Keypress(var ch: Char);\r\nvar\r\n rb: TJSHTMLInputElement;\r\nbegin\r\n inherited;\r\n if ch = #32 then\r\n begin\r\n rb := TJSHTMLInputElement(GetRadioElement);\r\n rb.checked := true;\r\n end;\r\nend;\r\n\r\nprocedure TRadioButton.LoadState(AState: string);\r\nvar\r\n rb: TJSHTMLInputElement;\r\nbegin\r\n if not Assigned(Container) then\r\n Exit;\r\n\r\n rb := TJSHTMLInputElement(GetRadioElement);\r\n rb.checked := AState = '1';\r\nend;\r\n\r\nprocedure TRadioButton.SetCaption(const AValue: string);\r\nbegin\r\n if (Caption <> AValue) then\r\n begin\r\n inherited SetCaption(AValue);\r\n if Assigned(Container) and not IsLinked then\r\n Container.lastElementChild.innerHTML := AValue;\r\n end;\r\nend;\r\n\r\nprocedure TRadioButton.SetEnabled(Value: boolean);\r\nvar\r\n el: TJSHTMLElement;\r\nbegin\r\n inherited;\r\n if Assigned(Container) then\r\n begin\r\n el := GetRadioElement;\r\n if Assigned(el) then\r\n TJSHTMLInputElement(el).disabled := not Value;\r\n end;\r\nend;\r\n\r\nprocedure TRadioButton.SetGroupName(AValue: string);\r\nbegin\r\n FGroupName := AValue;\r\n UpdateElementData;\r\nend;\r\n\r\nfunction TRadioButton.SaveState: string;\r\nvar\r\n rb: TJSHTMLInputElement;\r\nbegin\r\n if not Assigned(Container) then\r\n Exit;\r\n\r\n rb := TJSHTMLInputElement(GetRadioElement);\r\n\r\n if rb.checked then\r\n Result := '1'\r\n else\r\n Result := '0';\r\nend;\r\n\r\nprocedure TRadioButton.UpdateElementData;\r\nvar\r\n btn: TJSElement;\r\n\r\nbegin\r\n inherited;\r\n if Assigned(Container) then\r\n begin\r\n if IsLinked then\r\n TJSHTMLElement(ElementHandle)['name'] := FGroupName\r\n else\r\n begin\r\n Container.firstElementChild['name'] := FGroupName;\r\n btn := TJSElement(ElementHandle.firstChild);\r\n TJSHTMLInputElement(btn).disabled := not Enabled;\r\n end;\r\n\r\n if not IsLinked then\r\n begin\r\n if (Caption <> '') then\r\n Container.lastElementChild.innerHTML := Caption;\r\n\r\n ElementHandle.setAttribute('tabindex','-1');\r\n\r\n if TabStop and Assigned(btn) then\r\n btn.setAttribute('tabindex','-1');\r\n end;\r\n\r\n if TabStop then\r\n Container.setAttribute('tabindex',inttostr(TabOrder));\r\n end;\r\nend;\r\n\r\nprocedure TRadioButton.UpdateElementSize;\r\nbegin\r\n inherited;\r\n\r\n if Assigned(Container) and not IsLinked then\r\n begin\r\n if (HeightStyle <> ssAuto) then\r\n TJSHTMLElement(Container.firstElementChild).style.setProperty('height','100%')\r\n else\r\n TJSHTMLElement(Container.firstElementChild).style.removeProperty('height')\r\n end;\r\nend;\r\n\r\nprocedure TRadioButton.UpdateElementVisual;\r\nvar\r\n btn,lbl: TJSElement;\r\n isbs: boolean;\r\n frm: TCustomForm;\r\nbegin\r\n inherited;\r\n\r\n if Assigned(ElementHandle) then\r\n begin\r\n\r\n if not IsLinked then\r\n begin\r\n btn := TJSElement(ElementHandle.firstChild);\r\n TJSHTMLElement(btn).style.setProperty('margin-right','4px');\r\n\r\n TJSHTMLElement(btn).style.setProperty('vertical-align','middle');\r\n TJSHTMLElement(btn).style.setProperty('margin-top','0px');\r\n\r\n if Assigned(btn) then\r\n begin\r\n if FElementButtonClassName <> '' then\r\n btn.setAttribute('class',FElementButtonClassName)\r\n else\r\n btn.removeAttribute('class');\r\n end;\r\n\r\n lbl := TJSElement(ElementHandle.lastElementChild);\r\n\r\n if Assigned(lbl) then\r\n begin\r\n if FElementLabelClassName <> '' then\r\n lbl.setAttribute('class',FElementLabelClassName)\r\n else\r\n lbl.removeAttribute('class');\r\n end;\r\n end;\r\n\r\n if not TabStop or not ShowFocus or (ElementClassName <> '') then\r\n ElementHandle.style.setProperty('outline','none');\r\n\r\n if not IsLinked then\r\n begin\r\n ElementHandle.style.setProperty('user-select','none');\r\n ElementHandle.style.setProperty('white-space','normal');\r\n\r\n if ElementPosition = epAbsolute then\r\n begin\r\n if ElementButtonClassName = '' then\r\n begin\r\n TJSHTMLElement(btn).style.setProperty('float','left');\r\n\r\n if HeightStyle <> ssAuto then\r\n TJSHTMLElement(btn).style.setProperty('height','100%')\r\n else\r\n TJSHTMLElement(btn).style.removeProperty('height');\r\n TJSHTMLElement(btn).style.setProperty('vertical-align','middle');\r\n\r\n if not (Parent is TRadioGroup) then\r\n begin\r\n TJSHTMLElement(btn).style.setProperty('margin-top','0px');\r\n TJSHTMLElement(btn).style.setProperty('margin-bottom','0px');\r\n end;\r\n end;\r\n\r\n frm := GetParentForm(Self);\r\n isbs := Assigned(frm) and (frm.CSSLibrary = cssBootstrap);\r\n\r\n if (ElementLabelClassName = '') or isbs then\r\n begin\r\n lbl := TJSElement(Container.lastElementChild);\r\n TJSHTMLElement(lbl).style.setProperty('vertical-align','middle');\r\n TJSHTMLElement(lbl).style.setProperty('min-height','100%');\r\n TJSHTMLElement(lbl).style.setProperty('height','100%');\r\n if not (Parent is TRadioGroup) then\r\n TJSHTMLElement(lbl).style.setProperty('position','absolute');\r\n TJSHTMLElement(lbl).style.setProperty('overflow','hidden');\r\n TJSHTMLElement(lbl).style.setProperty('display','inline-flex');\r\n TJSHTMLElement(lbl).style.setProperty('align-items','center');\r\n end;\r\n end;\r\n end;\r\n\r\n end;\r\nend;\r\n\r\nprocedure TRadioButton.SetChecked(AValue: boolean);\r\nvar\r\n el: TJSHTMLElement;\r\nbegin\r\n FChecked := AValue;\r\n\r\n if Assigned(Container) then\r\n begin\r\n el := GetRadioElement;\r\n if Assigned(el) then\r\n TJSHTMLInputElement(el).checked := AValue;\r\n end;\r\nend;\r\n\r\nfunction TRadioButton.GetChecked: boolean;\r\nvar\r\n el: TJSHTMLElement;\r\n\r\nbegin\r\n Result := FChecked;\r\n if Assigned(Container) then\r\n begin\r\n el := GetRadioElement;\r\n if Assigned(el) then\r\n Result := TJSHTMLInputElement(el).checked;\r\n end;\r\nend;\r\n\r\nfunction TRadioButton.GetRadioElement: TJSHTMLElement;\r\nbegin\r\n if IsLinked then\r\n Result := TJSHTMLElement(ElementHandle)\r\n else\r\n Result := TJSHTMLElement(Container.firstElementChild);\r\nend;\r\n\r\nprocedure TRadioButton.PersistInHTML;\r\nvar\r\n rb: TJSHTMLInputElement;\r\nbegin\r\n if not Assigned(Container) then\r\n Exit;\r\n\r\n rb := TJSHTMLInputElement(GetRadioElement);\r\n if (rb.checked) then\r\n rb.setAttribute('checked','checked')\r\n else\r\n rb.removeAttribute('checked');\r\nend;\r\n\r\n{ TListBox }\r\n\r\nprocedure TListBox.CreateInitialize;\r\nbegin\r\n inherited;\r\n FItems := TStringList.Create;\r\n FItems.SkipLastLinebreak := true;\r\n TStringList(FItems).OnChange := DoItemsChange;\r\n FMultiSelect := false;\r\n FSelected := TList.Create;\r\n FItemIndex := -1;\r\n ShowFocus := true;\r\n if (csDesigning in ComponentState) then\r\n begin\r\n Width := 160;\r\n Height := 180;\r\n end;\r\nend;\r\n\r\nfunction TListBox.CreateElement: TJSElement;\r\nbegin\r\n Result := document.createElement('SELECT');\r\n Result['Size'] := '2';\r\nend;\r\n\r\nprocedure TListBox.DeleteSelected;\r\nvar\r\n i: integer;\r\nbegin\r\n Items.BeginUpdate;\r\n for i := Items.Count - 1 downto 0 do\r\n begin\r\n if Selected[i] then\r\n Items.Delete(i);\r\n end;\r\n Items.EndUpdate;\r\nend;\r\n\r\ndestructor TListBox.Destroy;\r\nbegin\r\n FItems.Free;\r\n FSelected.Free;\r\n inherited;\r\nend;\r\n\r\nprocedure TListBox.DisableDrag;\r\nvar\r\n I: Integer;\r\nbegin\r\n if not Assigned(Container) then\r\n Exit;\r\n\r\n for I := 0 to TJSHTMLSelectElement(Container).options.length - 1 do\r\n TJSHTMLOptionElement(TJSHTMLSelectElement(Container).options[I]).Attrs['draggable'] := 'false';\r\nend;\r\n\r\nfunction TListBox.DoHandleChange(Event: TEventListenerEvent): Boolean;\r\nbegin\r\n Change;\r\n Result := True;\r\nend;\r\n\r\nprocedure TListBox.AddItem(Item: string; AObject: TObject);\r\nbegin\r\n FItems.AddObject(Item, AObject);\r\nend;\r\n\r\nprocedure TListBox.BindEvents;\r\nbegin\r\n inherited;\r\n if Assigned(ElementHandle) then\r\n begin\r\n ElementHandle.addEventListener('change', FHandleChangePtr);\r\n end;\r\nend;\r\n\r\nprocedure TListBox.UnBindEvents;\r\nbegin\r\n inherited;\r\n if Assigned(ElementHandle) then\r\n begin\r\n ElementHandle.removeEventListener('change', FHandleChangePtr);\r\n end;\r\nend;\r\n\r\n\r\nprocedure TListBox.Change;\r\nbegin\r\n if Assigned(OnChange) then\r\n OnChange(Self);\r\nend;\r\n\r\nprocedure TListBox.Clear;\r\nbegin\r\n BeginUpdate;\r\n FItems.Clear;\r\n EndUpdate;\r\nend;\r\n\r\nprocedure TListBox.ClearMethodPointers;\r\nbegin\r\n inherited;\r\n FHandleChangePtr := nil;\r\nend;\r\n\r\nprocedure TListBox.ClearSelection;\r\nvar\r\n i: integer;\r\nbegin\r\n ItemIndex := -1;\r\n\r\n if not Assigned(Container) then\r\n Exit;\r\n\r\n if ElementHandle.tagName <> 'SELECT' then\r\n Exit;\r\n\r\n for i := 0 to TJSHTMLSelectElement(Container).options.length - 1 do\r\n TJSHTMLOptionElement(TJSHTMLSelectElement(Container).options[i]).selected := false;\r\nend;\r\n\r\nfunction TListBox.SaveState: string;\r\nvar\r\n i: integer;\r\n s: string;\r\nbegin\r\n for i := 0 to Items.Count - 1 do\r\n begin\r\n if Selected[i] then\r\n s := s + ',1'\r\n else\r\n s := s + ',0';\r\n end;\r\n Delete(s,1,1);\r\n Result := s;\r\nend;\r\n\r\nprocedure TListBox.SelectAll;\r\nvar\r\n i: integer;\r\nbegin\r\n if not Assigned(Container) then\r\n Exit;\r\n\r\n if ElementHandle.tagName <> 'SELECT' then\r\n Exit;\r\n\r\n for i := 0 to TJSHTMLSelectElement(Container).options.length - 1 do\r\n begin\r\n Selected[i] := true;\r\n TJSHTMLOptionElement(TJSHTMLSelectElement(Container).options[i]).selected := true;\r\n end;\r\nend;\r\n\r\nprocedure TListBox.SetItems(AItems: TStrings);\r\nbegin\r\n FItems.Assign(AItems);\r\nend;\r\n\r\nfunction TListBox.GetCount: Integer;\r\nbegin\r\n Result := FItems.Count;\r\nend;\r\n\r\nfunction TListBox.GetElementSelectHandle: TJSHTMLSelectElement;\r\nbegin\r\n Result := TJSHTMLSelectElement(Container);\r\nend;\r\n\r\nfunction TListBox.GetItemIndex: integer;\r\nbegin\r\n Result := FItemIndex;\r\n if Assigned(Container) then\r\n Result := TJSHTMLSelectElement(Container).selectedIndex;\r\nend;\r\n\r\nprocedure TListBox.GetMethodPointers;\r\nbegin\r\n inherited;\r\n FHandleChangePtr := @DoHandleChange;\r\nend;\r\n\r\nprocedure TListBox.PersistinHTML;\r\nvar\r\n i: integer;\r\nbegin\r\n if not Assigned(Container) then\r\n Exit;\r\n\r\n if ElementHandle.tagName <> 'SELECT' then\r\n Exit;\r\n\r\n for i := 0 to TJSHTMLSelectElement(Container).options.length - 1 do\r\n begin\r\n if TJSHTMLOptionElement(TJSHTMLSelectElement(Container).options[i]).selected then\r\n TJSHTMLOptionElement(TJSHTMLSelectElement(Container).options[i]).setAttribute('selected','selected')\r\n else\r\n TJSHTMLOptionElement(TJSHTMLSelectElement(Container).options[i]).removeAttribute('selected');\r\n end;\r\nend;\r\n\r\nprocedure TListBox.SetItemHeight(const Value: Integer);\r\nbegin\r\n FItemHeight := Value;\r\nend;\r\n\r\nprocedure TListBox.SetItemIndex(AIndex: integer);\r\nbegin\r\n if FItemIndex <> AIndex then\r\n begin\r\n FItemIndex := AIndex;\r\n UpdateElement;\r\n end;\r\nend;\r\n\r\nprocedure TListBox.SetMultiSelect(AValue: boolean);\r\nbegin\r\n FMultiSelect := AValue;\r\n if Assigned(Container) then\r\n TJSHTMLSelectElement(Container).multiple := AValue;\r\nend;\r\n\r\nfunction TListBox.GetSelCount: integer;\r\nvar\r\n i: integer;\r\nbegin\r\n Result := 0;\r\n\r\n if Assigned(Container) then\r\n begin\r\n for i := 0 to FItems.Count - 1 do\r\n begin\r\n if TJSHTMLOptionElement(TJSHTMLSelectElement(Container).options[i]).selected then\r\n inc(Result);\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TListBox.GetSelected(AIndex: integer): boolean;\r\nbegin\r\n if (AIndex < FSelected.Count) then\r\n Result := boolean(FSelected.Items[AIndex])\r\n else\r\n Result := False;\r\n\r\n if ElementHandle.tagName <> 'SELECT' then\r\n Exit;\r\n\r\n if Assigned(Container) and (AIndex < TJSHTMLSelectElement(Container).options.length) then\r\n Result := TJSHTMLOptionElement(TJSHTMLSelectElement(Container).options[Aindex]).selected;\r\nend;\r\n\r\nfunction TListBox.GetValues(AIndex: integer): string;\r\nvar\r\n opt: TJSHTMLOptionElement;\r\n el: TJSHTMLSelectElement;\r\nbegin\r\n if (AIndex >= 0) and (AIndex < Items.Count) then\r\n begin\r\n el := TJSHTMLSelectElement(ElementHandle);\r\n opt := TJSHTMLOptionElement(el.options[AIndex]);\r\n Result := opt['value'];\r\n end;\r\nend;\r\n\r\nprocedure TListBox.InitCSSLibrary(ALibrary: TCSSLibrary);\r\nbegin\r\n if (ALibrary = cssBootstrap) then\r\n begin\r\n ElementFont := efCSS;\r\n ElementClassName := 'form-control';\r\n end;\r\nend;\r\n\r\nprocedure TListBox.Loaded;\r\nbegin\r\n inherited;\r\n DoUpdateList;\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TListBox.LoadState(AState: string);\r\nvar\r\n sl: TStringList;\r\n i: integer;\r\nbegin\r\n sl := TStringList.Create;\r\n sl.Delimiter := ',';\r\n sl.CommaText := AState;\r\n\r\n for i := 0 to sl.Count - 1 do\r\n begin\r\n Selected[i] := sl.Strings[i] = '1';\r\n end;\r\n\r\n sl.Free;\r\nend;\r\n\r\nprocedure TListBox.SetSelected(AIndex: integer; AValue: boolean);\r\nbegin\r\n while (AIndex >= FSelected.Count) do\r\n FSelected.Add(false);\r\n\r\n FSelected.Items[AIndex] := AValue;\r\n\r\n if Assigned(Container) then\r\n begin\r\n TJSHTMLOptionElement(TJSHTMLSelectElement(Container).options[Aindex]).selected := AValue;\r\n end;\r\nend;\r\n\r\nprocedure TListBox.SetSorted(const Value: Boolean);\r\nbegin\r\n FSorted := Value;\r\n TStringList(Items).Sorted := Value;\r\nend;\r\n\r\nprocedure TListBox.SetValues(AIndex: integer; const Value: string);\r\nvar\r\n opt: TJSHTMLOptionElement;\r\n el: TJSHTMLSelectElement;\r\nbegin\r\n if (AIndex >= 0) and (AIndex < Items.Count) then\r\n begin\r\n el := TJSHTMLSelectElement(ElementHandle);\r\n opt := TJSHTMLOptionElement(el.options[AIndex]);\r\n opt['value'] := Value;\r\n end;\r\nend;\r\n\r\nprocedure TListBox.UpdateElementData;\r\nvar\r\n i: integer;\r\n b: boolean;\r\nbegin\r\n inherited;\r\n\r\n if Assigned(ElementSelectHandle) then\r\n begin\r\n ElementSelectHandle.style.setProperty('overflow', 'auto');\r\n if not MultiSelect then\r\n ElementSelectHandle.selectedIndex := FItemIndex\r\n else\r\n begin\r\n for i := 0 to FItems.Count - 1 do\r\n begin\r\n if FSelected.Count > i then\r\n begin\r\n b := boolean(FSelected.Items[i]);\r\n if Assigned(Container) then\r\n TJSHTMLOptionElement(TJSHTMLSelectElement(Container).options[i]).selected := b;\r\n end;\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TListBox.UpdateElementVisual;\r\nbegin\r\n inherited;\r\n\r\n if Assigned(ElementSelectHandle) then\r\n begin\r\n ElementSelectHandle.style.setProperty('overflow', 'auto');\r\n ElementSelectHandle['role'] := 'listbox';\r\n ElementSelectHandle['aria-busy'] := 'true';\r\n end;\r\nend;\r\n\r\nprocedure TListBox.UpdateParent;\r\nbegin\r\n inherited;\r\n DoUpdateList;\r\nend;\r\n\r\nprocedure TListBox.DoItemsChange(Sender: TObject);\r\nbegin\r\n DoUpdateList;\r\nend;\r\n\r\nprocedure TListBox.DoUpdateList;\r\nvar\r\n i,j: integer;\r\n opt: TJSHTMLOptionElement;\r\n k,v,s: string;\r\n\r\nbegin\r\n if not Assigned(Container) then\r\n Exit;\r\n\r\n if IsUpdating then\r\n Exit;\r\n\r\n if ElementHandle.tagName <> 'SELECT' then\r\n Exit;\r\n\r\n for i := TJSHTMLSelectElement(Container).options.length - 1 downto 0 do\r\n TJSHTMLSelectElement(Container).remove(i);\r\n\r\n for i := 0 to FItems.Count - 1 do\r\n begin\r\n s := FItems[i];\r\n k := s;\r\n v := s;\r\n j := pos(FItems.NameValueSeparator,s);\r\n\r\n if j > 0 then\r\n begin\r\n v := copy(s,1,j-1);\r\n k := copy(s,j+1,$FFFF);\r\n end\r\n else\r\n k := '';\r\n\r\n opt := TJSHTMLOptionElement.New(v);\r\n if k <> '' then\r\n opt['value'] := k;\r\n\r\n opt['role'] := 'listitem';\r\n if ElementItemClassName <> '' then\r\n opt['class'] := ElementItemClassName;\r\n\r\n if DragMode = dmAutomatic then\r\n opt['draggable'] := 'true';\r\n TJSHTMLSelectElement(Container).add(opt);\r\n //Selected[i] := false;\r\n end;\r\n\r\n UpdateElementData;\r\nend;\r\n\r\nprocedure TListBox.EnableDrag;\r\nvar\r\n I: Integer;\r\nbegin\r\n if not Assigned(Container) then\r\n Exit;\r\n\r\n for I := 0 to TJSHTMLSelectElement(Container).options.length - 1 do\r\n TJSHTMLOptionElement(TJSHTMLSelectElement(Container).options[I]).Attrs['draggable'] := 'true';\r\nend;\r\n\r\nprocedure TListBox.EndUpdate;\r\nbegin\r\n inherited;\r\n DoUpdateList;\r\nend;\r\n\r\n{ TCustomComboBox }\r\n\r\nprocedure TCustomComboBox.AddItem(Item: string; AObject: TObject);\r\nbegin\r\n FItems.AddObject(Item, AObject);\r\nend;\r\n\r\nprocedure TCustomComboBox.BindEvents;\r\nbegin\r\n inherited;\r\n if Assigned(ElementHandle) then\r\n begin\r\n ElementHandle.addEventListener('input', FHandleInputPtr);\r\n ElementHandle.addEventListener('change', FHandleChangePtr);\r\n\r\n ElementHandle.addEventListener('focusin', FHandleFocusInPtr);\r\n ElementHandle.addEventListener('focusout', FHandleFocusOutPtr);\r\n\r\n ElementHandle.addEventListener('invalid', FHandleInvalidPtr);\r\n end;\r\nend;\r\n\r\nprocedure TCustomComboBox.UnBindEvents;\r\nbegin\r\n inherited;\r\n if Assigned(ElementHandle) then\r\n begin\r\n ElementHandle.removeEventListener('input', FHandleInputPtr);\r\n ElementHandle.removeEventListener('change', FHandleChangePtr);\r\n\r\n ElementHandle.removeEventListener('focusin', FHandleFocusInPtr);\r\n ElementHandle.removeEventListener('focusout', FHandleFocusOutPtr);\r\n\r\n ElementHandle.removeEventListener('invalid', FHandleInvalidPtr);\r\n end;\r\nend;\r\n\r\nprocedure TCustomComboBox.Clear;\r\nbegin\r\n Items.Clear;\r\nend;\r\n\r\nprocedure TCustomComboBox.ClearMethodPointers;\r\nbegin\r\n inherited;\r\n FHandleChangePtr := nil;\r\n FHandleInputPtr := nil;\r\n FHandleInvalidPtr := nil;\r\nend;\r\n\r\nprocedure TCustomComboBox.CreateInitialize;\r\nbegin\r\n inherited;\r\n FItems := TStringList.Create;\r\n TStringList(FItems).OnChange := DoItemsChange;\r\n FItemIndex := -1;\r\n FStyle := csDropDownList;\r\n ShowFocus := true;\r\n Height := 25;\r\nend;\r\n\r\nfunction TCustomComboBox.CreateElement: TJSElement;\r\nbegin\r\n if FStyle = csDropDownList then\r\n Result := document.createElement('SELECT')\r\n else\r\n begin\r\n Result := document.createElement('INPUT');\r\n FListName := Name+'_LIST';\r\n Result['list'] := FListName;\r\n end;\r\nend;\r\n\r\ndestructor TCustomComboBox.Destroy;\r\nbegin\r\n FItems.Free;\r\n inherited;\r\nend;\r\n\r\nprocedure TCustomComboBox.SetItems(AItems: TStrings);\r\nbegin\r\n FItems.Assign(AItems);\r\nend;\r\n\r\nprocedure TCustomComboBox.SetRequired(const Value: boolean);\r\nbegin\r\n if (FRequired <> Value) then\r\n begin\r\n FRequired := Value;\r\n UpdateElement;\r\n end;\r\nend;\r\n\r\nprocedure TCustomComboBox.SetSorted(const Value: boolean);\r\nbegin\r\n TStringList(Items).Sorted := true;\r\n FSorted := Value;\r\nend;\r\n\r\nprocedure TCustomComboBox.SetStyle(const Value: TComboBoxStyle);\r\nbegin\r\n if FStyle <> Value then\r\n begin\r\n FStyle := Value;\r\n if not IsLinked then\r\n RecreateElement;\r\n end;\r\nend;\r\n\r\nprocedure TCustomComboBox.SetText(const Value: string);\r\nvar\r\n I: Integer;\r\n AName, AValue: string;\r\nbegin\r\n if Style = csDropDown then\r\n begin\r\n FText := Value;\r\n UpdateElement;\r\n end\r\n else\r\n begin\r\n for I := 0 to Items.Count - 1 do\r\n begin\r\n Items.GetNameValue(i, AName, AValue);\r\n\r\n if (Value = Items[I]) or (Value = AName) then\r\n ItemIndex := I;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TCustomComboBox.SetTextHint(const Value: string);\r\nbegin\r\n if (FTextHint <> Value) then\r\n begin\r\n FTextHint := Value;\r\n DoUpdateList;\r\n end;\r\nend;\r\n\r\nprocedure TCustomComboBox.SetValues(AIndex: integer; const Value: string);\r\nvar\r\n opt: TJSHTMLOptionElement;\r\n el: TJSHTMLSelectElement;\r\nbegin\r\n if (AIndex >= 0) and (AIndex < Items.Count) then\r\n begin\r\n el := TJSHTMLSelectElement(ElementHandle);\r\n opt := TJSHTMLOptionElement(el.options[AIndex]);\r\n opt['value'] := Value;\r\n end;\r\nend;\r\n\r\nprocedure TCustomComboBox.UpdateElementData;\r\nvar\r\n d: integer;\r\nbegin\r\n inherited;\r\n\r\n if Required then\r\n ElementHandle.setAttribute('required','')\r\n else\r\n if not isLinked then\r\n ElementHandle.removeAttribute('required');\r\n\r\n if Style = csDropDown then\r\n begin\r\n if Assigned(ElementHandle) then\r\n begin\r\n TJSHTMLInputELement(ElementHandle).Value := FText;\r\n\r\n FListName := Name+'_LIST';\r\n ElementHandle['list'] := FListName;\r\n end;\r\n end\r\n else\r\n if Assigned(ElementSelectHandle) then\r\n begin\r\n d := 0;\r\n if (TextHint <> '') then\r\n d := 1;\r\n\r\n ElementSelectHandle.selectedIndex := FItemIndex + d;\r\n ElementSelectHandle['role'] := 'combobox';\r\n end;\r\nend;\r\n\r\nprocedure TCustomComboBox.UpdateElementVisual;\r\nbegin\r\n inherited;\r\nend;\r\n\r\nprocedure TCustomComboBox.UpdateParent;\r\nbegin\r\n inherited;\r\n DoUpdateList;\r\nend;\r\n\r\nfunction TCustomComboBox.GetElementSelectHandle: TJSHTMLSelectElement;\r\nbegin\r\n Result := TJSHTMLSelectElement(Container);\r\nend;\r\n\r\nfunction TCustomComboBox.GetItemIndex: integer;\r\nbegin\r\n if Style = csDropDown then\r\n begin\r\n Result := Items.IndexOf(Text);\r\n end\r\n else\r\n begin\r\n Result := FItemIndex;\r\n\r\n if Assigned(Container) then\r\n begin\r\n Result := TJSHTMLSelectElement(Container).selectedIndex;\r\n if TextHint <> '' then\r\n Result := Result - 1;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TCustomComboBox.GetMethodPointers;\r\nbegin\r\n inherited;\r\n FHandleChangePtr := @DoHandleChange;\r\n FHandleInputPtr := @DoHandleInput;\r\n FHandleFocusInPtr := @DoHandleFocusIn;\r\n FHandleFocusOutPtr := @DoHandleFocusOut;\r\n FHandleInvalidPtr := @DoHandleInvalid;\r\nend;\r\n\r\nfunction TCustomComboBox.GetText: string;\r\nvar\r\n el: TJSHTMLElement;\r\n AName,AValue: string;\r\nbegin\r\n Result := '';\r\n if Style = csDropDown then\r\n begin\r\n if Assigned(ElementHandle) then\r\n Result := TJSHTMLInputElement(ElementHandle).value;\r\n end\r\n else\r\n if (ItemIndex >= 0) then\r\n begin\r\n if (ItemIndex < Items.Count) then\r\n begin\r\n Items.GetNameValue(ItemIndex, AName, AValue);\r\n if (AName <> '') and (AValue <> '') then\r\n Result := AName\r\n else\r\n Result := Items[ItemIndex];\r\n end\r\n else\r\n begin\r\n if IsLinked then\r\n begin\r\n if ItemIndex < ElementHandle.childElementCount then\r\n begin\r\n el := TJSHTMLElement(ElementHandle.children[ItemIndex]);\r\n if el.tagName = 'OPTION' then\r\n Result := el.innerHTML;\r\n end;\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TCustomComboBox.GetValues(AIndex: integer): string;\r\nvar\r\n opt: TJSHTMLOptionElement;\r\n el: TJSHTMLSelectElement;\r\nbegin\r\n if (AIndex >= 0) and (AIndex < Items.Count) then\r\n begin\r\n el := TJSHTMLSelectElement(ElementHandle);\r\n opt := TJSHTMLOptionElement(el.options[AIndex]);\r\n Result := opt['value'];\r\n end;\r\nend;\r\n\r\nprocedure TCustomComboBox.InitCSSLibrary(ALibrary: TCSSLibrary);\r\nbegin\r\n if (ALibrary = cssBootstrap) then\r\n begin\r\n ElementFont := efCSS;\r\n ElementClassName := 'form-select';\r\n HeightStyle := ssAuto;\r\n end;\r\nend;\r\n\r\nprocedure TCustomComboBox.Change;\r\nbegin\r\n FItemIndex := GetItemIndex;\r\n if Assigned(OnChange) then\r\n OnChange(Self);\r\nend;\r\n\r\nfunction TCustomComboBox.DoHandleChange(Event: TEventListenerEvent): Boolean;\r\nbegin\r\n Change;\r\n\r\n Result := True;\r\n if FRequiredText <> '' then\r\n begin\r\n TJSHTMLInputElement(ElementHandle).setCustomValidity('');\r\n end;\r\n\r\n Result := True;\r\nend;\r\n\r\nfunction TCustomComboBox.DoHandleFocusIn(Event: TEventListenerEvent): Boolean;\r\nbegin\r\n if Assigned(OnFocusIn) then\r\n OnFocusIn(Self);\r\n Result := true;\r\nend;\r\n\r\nfunction TCustomComboBox.DoHandleFocusOut(Event: TEventListenerEvent): Boolean;\r\nbegin\r\n if Assigned(OnFocusOut) then\r\n OnFocusOut(Self);\r\n Result := true;\r\nend;\r\n\r\nfunction TCustomComboBox.DoHandleInput(Event: TEventListenerEvent): Boolean;\r\nbegin\r\n if Style = csDropDown then\r\n Change;\r\n Result := True;\r\nend;\r\n\r\nfunction TCustomComboBox.DoHandleInvalid(Event: TJSEvent): Boolean;\r\nbegin\r\n TJSHTMLInputElement(ElementHandle).setCustomValidity(FRequiredText);\r\n Result := true;\r\nend;\r\n\r\nprocedure TCustomComboBox.Loaded;\r\nbegin\r\n inherited;\r\n DoUpdateList;\r\nend;\r\n\r\nprocedure TCustomComboBox.LoadState(AState: string);\r\nvar\r\n idx,e: integer;\r\nbegin\r\n val(AState, idx, e);\r\n if e = 0 then\r\n ItemIndex := idx;\r\nend;\r\n\r\nprocedure TCustomComboBox.PersistinHTML;\r\nvar\r\n sel: TJSHTMLElement;\r\nbegin\r\n inherited;\r\n\r\n sel := TJSHTMLElement(ElementHandle.children[ItemIndex]);\r\n if Assigned(sel) then\r\n sel.setAttribute('selected','selected');\r\nend;\r\n\r\nfunction TCustomComboBox.SaveState: string;\r\nbegin\r\n Result := IntToStr(ItemIndex);\r\nend;\r\n\r\nprocedure TCustomComboBox.SetDroppedDown(const Value: Boolean);\r\nbegin\r\n FDroppedDown := Value;\r\nend;\r\n\r\nprocedure TCustomComboBox.SetItemIndex(AIndex: integer);\r\nbegin\r\n if (FItemIndex <> AIndex) then\r\n begin\r\n FItemIndex := AIndex;\r\n\r\n if (AIndex >= 0) and (Style in [csDropDown, csDropDownList]) and (AIndex < Items.Count) then\r\n FText := Items[AIndex];\r\n\r\n UpdateElement;\r\n end;\r\nend;\r\n\r\nprocedure TCustomComboBox.DoItemsChange(Sender: TObject);\r\nbegin\r\n DoUpdateList;\r\nend;\r\n\r\nprocedure TCustomComboBox.AddTextHint;\r\nvar\r\n opt: TJSElement;\r\n\r\nbegin\r\n if (TextHint <> '') and (Style = csDropDownList) then\r\n begin\r\n opt := document.createElement('OPTION');\r\n opt['value'] := '';\r\n opt['disabled'] := 'true';\r\n opt['selected'] := 'true';\r\n opt['hidden'] := 'true';\r\n opt.innerHTML := TextHint;\r\n Container.appendChild(opt);\r\n end;\r\nend;\r\n\r\nprocedure TCustomComboBox.DoUpdateList;\r\nvar\r\n i,j: integer;\r\n s,k,v: string;\r\n opt: TJSElement;\r\n el: TJSElement;\r\nbegin\r\n if not Assigned(Container) then\r\n Exit;\r\n\r\n if ElementHandle.tagName = 'INPUT' then\r\n begin\r\n TJSHTMLInputElement(ElementHandle).value := Text;\r\n\r\n el := document.getElementById(Name+'_LIST');\r\n if Assigned(el) then\r\n el.parentNode.removeChild(el);\r\n\r\n if TextHint <> '' then\r\n TJSHTMLInputElement(ElementHandle).placeholder := TextHint;\r\n\r\n el := document.createElement('DATALIST');\r\n el['id'] := FListName;\r\n document.body.appendChild(el);\r\n\r\n for i := 0 to FItems.Count - 1 do\r\n begin\r\n s := FItems[i];\r\n opt := document.createElement('OPTION');\r\n\r\n k := s;\r\n v := s;\r\n j := pos(FItems.NameValueSeparator,s);\r\n\r\n if j > 0 then\r\n begin\r\n v := copy(s,1,j-1);\r\n k := copy(s,j+1,$FFFF);\r\n end;\r\n\r\n opt['value'] := k;\r\n opt.innerHTML := v;\r\n el.appendChild(opt);\r\n end;\r\n\r\n end\r\n else\r\n begin\r\n if ElementHandle.tagName <> 'SELECT' then\r\n Exit;\r\n\r\n for i := TJSHTMLSelectElement(Container).options.length - 1 downto 0 do\r\n TJSHTMLSelectElement(Container).remove(i);\r\n\r\n AddTextHint;\r\n\r\n for i := 0 to FItems.Count - 1 do\r\n begin\r\n s := FItems[i];\r\n opt := document.createElement('OPTION');\r\n\r\n k := s;\r\n v := s;\r\n j := pos(FItems.NameValueSeparator,s);\r\n\r\n if j > 0 then\r\n begin\r\n v := copy(s,1,j-1);\r\n k := copy(s,j+1,$FFFF);\r\n end;\r\n\r\n opt['value'] := k;\r\n opt.innerHTML := v;\r\n Container.appendChild(opt);\r\n end;\r\n end;\r\n\r\n UpdateElement;\r\nend;\r\n\r\n\r\n{ TFontPicker }\r\n\r\nprocedure TFontPicker.CreateInitialize;\r\nvar\r\n tst: boolean;\r\n \r\n procedure Add(s: string);\r\n begin\r\n asm\r\n tst = d.detect(s);\r\n end;\r\n if tst then\r\n Self.Items.Add(s);\r\n end;\r\n\r\nbegin\r\n inherited;\r\n\r\n asm\r\n var Detector = function() {\r\n // a font will be compared against all the three default fonts.\r\n // and if it doesn't match all 3 then that font is not available.\r\n var baseFonts = ['monospace', 'sans-serif', 'serif'];\r\n\r\n //we use m or w because these two characters take up the maximum width.\r\n // And we use a LLi so that the same matching fonts can get separated\r\n var testString = \"mmmmmmmmmmlli\";\r\n\r\n //we test using 72px font size, we may use any size. I guess larger the better.\r\n var testSize = '72px';\r\n\r\n var h = document.getElementsByTagName(\"body\")[0];\r\n\r\n // create a SPAN in the document to get the width of the text we use to test\r\n var s = document.createElement(\"span\");\r\n s.style.fontSize = testSize;\r\n s.innerHTML = testString;\r\n var defaultWidth = {};\r\n var defaultHeight = {};\r\n for (var index in baseFonts) {\r\n //get the default width for the three base fonts\r\n s.style.fontFamily = baseFonts[index];\r\n h.appendChild(s);\r\n defaultWidth[baseFonts[index]] = s.offsetWidth; //width for the default font\r\n defaultHeight[baseFonts[index]] = s.offsetHeight; //height for the defualt font\r\n h.removeChild(s);\r\n }\r\n\r\n function detect(font) {\r\n var detected = false;\r\n for (var index in baseFonts) {\r\n s.style.fontFamily = font + ',' + baseFonts[index]; // name of the font along with the base font for fallback.\r\n h.appendChild(s);\r\n var matched = (s.offsetWidth != defaultWidth[baseFonts[index]] || s.offsetHeight != defaultHeight[baseFonts[index]]);\r\n h.removeChild(s);\r\n detected = detected || matched;\r\n }\r\n return detected;\r\n }\r\n\r\n this.detect = detect;\r\n };\r\n\r\n var d = new Detector();\r\n //tst = d.detect(\"Arial\");\r\n end;\r\n\r\n Add('Arial');\r\n Add('Arial Black');\r\n Add('Arial Narrow');\r\n Add('Courier');\r\n Add('Courier New');\r\n Add('Georgia');\r\n Add('Lucida Console');\r\n Add('Modena');\r\n Add('Monotype Corsiva');\r\n Add('Papyrus');\r\n Add('Tahoma');\r\n Add('Times');\r\n Add('Times New Roman');\r\n Add('Trebuchet MS');\r\n Add('Verdana');\r\n Add('Verona');\r\nend;\r\n\r\n{ TFontSizePicker }\r\n\r\nprocedure TFontSizePicker.CreateInitialize;\r\nbegin\r\n inherited;\r\n PickerMode := fmPointSize;\r\nend;\r\n\r\nprocedure TFontSizePicker.Init;\r\nbegin\r\n Items.Clear;\r\n\r\n case PickerMode of\r\n fmPointSize:\r\n begin\r\n Items.Add('8');\r\n Items.Add('9');\r\n Items.Add('10');\r\n Items.Add('11');\r\n Items.Add('12');\r\n Items.Add('14');\r\n Items.Add('16');\r\n Items.Add('18');\r\n Items.Add('20');\r\n Items.Add('22');\r\n Items.Add('24');\r\n Items.Add('26');\r\n Items.Add('28');\r\n Items.Add('36');\r\n Items.Add('48');\r\n Items.Add('72');\r\n end;\r\n fmRelativeSize:\r\n begin\r\n Items.Add('8');\r\n Items.Add('9');\r\n Items.Add('10');\r\n Items.Add('14');\r\n Items.Add('18');\r\n Items.Add('24');\r\n Items.Add('36');\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TFontSizePicker.SetPickerMode(const AValue: TFontSizePickerMode);\r\nbegin\r\n FPickerMode := AValue;\r\n Init;\r\nend;\r\n\r\n\r\n{ TCustomMemo }\r\n\r\nfunction TCustomMemo.DoHandleChange(Event: TEventListenerEvent): Boolean;\r\nbegin\r\n FModified := true;\r\n Change;\r\n\r\n if FRequiredText <> '' then\r\n begin\r\n ElementInputHandle.setCustomValidity('');\r\n end;\r\n\r\n Result := true;\r\nend;\r\n\r\nfunction TCustomMemo.DoHandleCut(Event: TEventListenerEvent): Boolean;\r\nbegin\r\n if not CanCut then\r\n begin\r\n asm\r\n Event.preventDefault();\r\n Event.stopPropagation();\r\n end;\r\n end;\r\n\r\n Result := False;\r\nend;\r\n\r\nprocedure TCustomMemo.BindEvents;\r\nbegin\r\n inherited;\r\n\r\n if Assigned(ElementInputHandle) then\r\n begin\r\n ElementInputHandle.addEventListener('input', FHandleInputPtr);\r\n ElementInputHandle.addEventListener('change', FHandleChangePtr);\r\n ElementInputHandle.addEventListener('paste', FHandlePastePtr);\r\n ElementInputHandle.addEventListener('cut', FHandleCutPtr);\r\n ElementInputHandle.addEventListener('invalid', FHandleInvalidPtr);\r\n end;\r\nend;\r\n\r\nprocedure TCustomMemo.UnBindEvents;\r\nbegin\r\n inherited;\r\n\r\n if Assigned(ElementInputHandle) then\r\n begin\r\n ElementInputHandle.removeEventListener('input', FHandleInputPtr);\r\n ElementInputHandle.removeEventListener('change', FHandleChangePtr);\r\n ElementInputHandle.removeEventListener('paste', FHandlePastePtr);\r\n ElementInputHandle.removeEventListener('cut', FHandleCutPtr);\r\n ElementInputHandle.removeEventListener('invalid', FHandleInvalidPtr);\r\n end;\r\nend;\r\n\r\n\r\nprocedure TCustomMemo.Change;\r\nbegin\r\n if Assigned(OnChange) then\r\n OnChange(Self);\r\nend;\r\n\r\nprocedure TCustomMemo.Clear;\r\nbegin\r\n Lines.Clear;\r\nend;\r\n\r\nprocedure TCustomMemo.ClearMethodPointers;\r\nbegin\r\n inherited;\r\n FHandleChangePtr := nil;\r\n FHandleInputPtr := nil;\r\n FHandlePastePtr := nil;\r\n FHandleCutPtr := nil;\r\n FHandleInvalidPtr := nil;\r\nend;\r\n\r\n{$HINTS OFF}\r\nprocedure TCustomMemo.CopyToClipboard;\r\nvar\r\n s: string;\r\nbegin\r\n s := Text;\r\n asm\r\n navigator.clipboard.writeText(s);\r\n end;\r\nend;\r\n{$HINTS ON}\r\n\r\nprocedure TCustomMemo.CreateInitialize;\r\nbegin\r\n inherited;\r\n FSpellCheck := true;\r\n FLines := TStringList.Create;\r\n FLines.SkipLastLineBreak := true;\r\n TStringList(FLines).OnChange := DoLinesChange;\r\n if (csDesigning in ComponentState) then\r\n begin\r\n Width := 400;\r\n Height := 300;\r\n end;\r\n ShowFocus := true;\r\n ClipChildren := false;\r\n FWantTabs := false;\r\n FAutoSize := false;\r\n FAutoCompletion := acOff;\r\n FWordWrap := true;\r\n FScrollBars := ssBoth;\r\n NoUserSelect := false;\r\nend;\r\n\r\nfunction TCustomMemo.CreateElement: TJSElement;\r\nbegin\r\n Result := document.createElement('TEXTAREA');\r\nend;\r\n\r\ndestructor TCustomMemo.Destroy;\r\nbegin\r\n FLines.Free;\r\n inherited;\r\nend;\r\n\r\nfunction TCustomMemo.DoHandleInput(Event: TEventListenerEvent): Boolean;\r\nbegin\r\n GetText;\r\n Change;\r\n if AutoSize then\r\n DoAutoSize;\r\n Result := True;\r\nend;\r\n\r\nfunction TCustomMemo.DoHandleInvalid(Event: TJSEvent): Boolean;\r\nbegin\r\n ElementInputHandle.setCustomValidity(FRequiredText);\r\n Result := true;\r\nend;\r\n\r\nfunction TCustomMemo.DoHandlePaste(Event: TEventListenerEvent): Boolean;\r\nvar\r\n s: string;\r\n clp: boolean;\r\nbegin\r\n clp := false;\r\n asm\r\n var clipboardData = Event.clipboardData || window.clipboardData;\r\n if (clipboardData) {\r\n s = clipboardData.getData('Text');\r\n clp = true;\r\n }\r\n end;\r\n\r\n if clp and not CanPaste(s) then\r\n begin\r\n asm\r\n Event.preventDefault();\r\n Event.stopPropagation();\r\n end;\r\n end;\r\n\r\n Result:= false;\r\nend;\r\n\r\nprocedure TCustomMemo.DoLinesChange(Sender: TObject);\r\nbegin\r\n if Assigned(ElementInputHandle) and not FBlockChange then\r\n begin\r\n ElementInputHandle.value := GetDisplayText;\r\n ElementInputHandle.readOnly := IsReadOnly;\r\n end;\r\nend;\r\n\r\nfunction TCustomMemo.CanCut: boolean;\r\nbegin\r\n Result := True;\r\nend;\r\n\r\nfunction TCustomMemo.CanPaste(AValue: string): boolean;\r\nbegin\r\n Result := True;\r\nend;\r\n\r\nfunction TCustomMemo.SaveState: string;\r\nbegin\r\n Result := Lines.Text;\r\nend;\r\n\r\nprocedure TCustomMemo.ScrollBy(DeltaX, DeltaY: integer);\r\nbegin\r\n //\r\n if Assigned(ElementHandle) then\r\n begin\r\n ElementHandle.scrollTop := ElementHandle.scrollTop + DeltaY;\r\n ElementHandle.scrollLeft := ElementHandle.scrollLeft + DeltaX;\r\n end;\r\n\r\nend;\r\n\r\nprocedure TCustomMemo.SelectAll;\r\nbegin\r\n if Assigned(ElementInputHandle) then\r\n ElementInputHandle.select;\r\nend;\r\n\r\nprocedure TCustomMemo.SetAutoCompletion(const Value: TAutoCompletion);\r\nbegin\r\n if (FAutoCompletion <> Value) then\r\n begin\r\n FAutoCompletion := Value;\r\n UpdateElementData;\r\n end;\r\nend;\r\n\r\nprocedure TCustomMemo.SetAutoSize(const Value: Boolean);\r\nbegin\r\n if FAutoSize <> Value then\r\n begin\r\n FAutoSize := Value;\r\n UpdateElement;\r\n end;\r\nend;\r\n\r\nprocedure TCustomMemo.SetCaret(x, y: integer);\r\nvar\r\n i,l: integer;\r\nbegin\r\n l := 0;\r\n for i := 0 to Lines.Count -1 do\r\n begin\r\n if i < y then\r\n l := l + Length(Lines[i]) + 1;\r\n end;\r\n\r\n SelStart := l + x;\r\nend;\r\n\r\nprocedure TCustomMemo.SetCaretPos(const Value: TPoint);\r\nbegin\r\n SetCaret(Value.X, Value.Y);\r\nend;\r\n\r\nprocedure TCustomMemo.SetLines(ALines: TStrings);\r\nbegin\r\n FLines.Assign(ALines);\r\nend;\r\n\r\nprocedure TCustomMemo.SetReadOnly(const Value: boolean);\r\nbegin\r\n if (FReadOnly <> Value) then\r\n begin\r\n FReadOnly := Value;\r\n UpdateElement;\r\n end;\r\nend;\r\n\r\nprocedure TCustomMemo.SetRequired(const Value: Boolean);\r\nbegin\r\n if (FRequired <> Value) then\r\n begin\r\n FRequired := Value;\r\n UpdateElement;\r\n end;\r\nend;\r\n\r\nprocedure TCustomMemo.SetScrollBars(const Value: TScrollStyle);\r\nbegin\r\n if (FScrollbars <> Value) then\r\n begin\r\n FScrollbars := Value;\r\n UpdateElement;\r\n end;\r\nend;\r\n\r\nprocedure TCustomMemo.SetSelLength(const Value: Integer);\r\nbegin\r\n if FSelLength <> Value then\r\n begin\r\n FSelLength := Value;\r\n UpdateElement;\r\n end;\r\nend;\r\n\r\nprocedure TCustomMemo.SetSelStart(const Value: Integer);\r\nbegin\r\n if FSelStart <> Value then\r\n begin\r\n FSelStart := Value;\r\n UpdateElement;\r\n end;\r\nend;\r\n\r\nprocedure TCustomMemo.SetSpellCheck(const Value: boolean);\r\nbegin\r\n if FSpellCheck <> Value then\r\n begin\r\n FSpellCheck := Value;\r\n UpdateElement;\r\n end;\r\nend;\r\n\r\nprocedure TCustomMemo.SetText(const Value: String);\r\nbegin\r\n FLines.Text := Value;\r\nend;\r\n\r\nprocedure TCustomMemo.SetTextHint(const Value: string);\r\nbegin\r\n if FTextHint <> Value then\r\n begin\r\n FTextHint := Value;\r\n UpdateElement;\r\n end;\r\n\r\nend;\r\n\r\nprocedure TCustomMemo.SetWantTabs(const Value: boolean);\r\nbegin\r\n if (FWantTabs <> Value) then\r\n begin\r\n FWantTabs := Value;\r\n UpdateElement;\r\n end;\r\nend;\r\n\r\nprocedure TCustomMemo.SetWordWrap(const Value: Boolean);\r\nbegin\r\n if (FWordWrap <> Value) then\r\n begin\r\n FWordWrap := Value;\r\n UpdateElement;\r\n end;\r\nend;\r\n\r\n{$HINTS OFF}\r\nprocedure TCustomMemo.UpdateElementData;\r\nvar\r\n ss,sl: integer;\r\n e: TJSHTMLElement;\r\nbegin\r\n inherited;\r\n if Assigned(ElementInputHandle) and not FBlockChange then\r\n begin\r\n if Required then\r\n ElementInputHandle.setAttribute('required','')\r\n else\r\n if not isLinked then\r\n ElementInputHandle.removeAttribute('required');\r\n\r\n ElementInputHandle.value := GetDisplayText;\r\n\r\n if (ElementInputHandle.TagName = 'TEXTAREA') then\r\n begin\r\n ElementInputHandle.setSelectionRange(SelStart, SelStart + SelLength);\r\n end;\r\n\r\n if not IsLinked then\r\n begin\r\n ElementInputHandle.style.setProperty('resize', 'none');\r\n end;\r\n\r\n ElementInputHandle.readOnly := IsReadOnly;\r\n\r\n if TextHint <> '' then\r\n ElementInputHandle.placeholder := TextHint;\r\n\r\n if not isLinked then\r\n begin\r\n if AutoCompletion = acNone then\r\n begin\r\n TJSHTMLElement(ElementInputHandle).setAttribute('autocomplete','none');\r\n if not IsLinked then\r\n TJSHTMLElement(ElementInputHandle).removeAttribute('name');\r\n end\r\n else\r\n if AutoCompletion <> acOff then\r\n begin\r\n TJSHTMLElement(ElementInputHandle).setAttribute('autocomplete','on');\r\n if not IsLinked then\r\n TJSHTMLElement(ElementInputHandle).setAttribute('name', GetAutoCompletionName(AutoCompletion));\r\n end\r\n else\r\n begin\r\n TJSHTMLElement(ElementInputHandle).removeAttribute('autocomplete');\r\n if not IsLinked then\r\n TJSHTMLElement(ElementInputHandle).removeAttribute('name');\r\n end;\r\n\r\n ss := FSelStart;\r\n sl := FSelStart + FSelLength;\r\n e := ElementInputHandle;\r\n asm\r\n setTimeout(function() {\r\n e.setSelectionRange(ss, sl);\r\n }, 1);\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\n{$HINTS OFF}\r\nprocedure TCustomMemo.DoAutoSize;\r\nvar\r\n sh: integer;\r\n el: TJSHTMLElement;\r\nbegin\r\n ElementInputHandle.style.setProperty('overflow', 'hidden');\r\n ElementInputHandle.style.SetProperty('height', 'auto');\r\n el := ElementInputHandle;\r\n asm\r\n sh = el.scrollHeight;\r\n end;\r\n ElementInputHandle.style.SetProperty('height', sh.ToString+'px');\r\nend;\r\n{$HINTS ON}\r\n\r\nprocedure TCustomMemo.UpdateElementSize;\r\nbegin\r\n inherited;\r\n if AutoSize then\r\n DoAutoSize;\r\nend;\r\n\r\n{$HINTS ON}\r\n\r\nprocedure TCustomMemo.UpdateElementVisual;\r\nbegin\r\n inherited;\r\n if Assigned(ElementInputHandle) and not FBlockChange and not IsLinked then\r\n begin\r\n if AutoSize then\r\n begin\r\n ElementInputHandle.style.setProperty('overflow', 'hidden');\r\n ElementInputHandle.style.SetProperty('height', 'auto');\r\n end\r\n else\r\n begin\r\n ElementInputHandle.style.setProperty('overflow', 'auto');\r\n\r\n case ScrollBars of\r\n ssNone:\r\n begin\r\n ElementInputHandle.style.setProperty('overflow', 'hidden');\r\n end;\r\n ssVertical:\r\n begin\r\n ElementInputHandle.style.removeProperty('overflow');\r\n ElementInputHandle.style.setProperty('overflow-x', 'hidden');\r\n ElementInputHandle.style.setProperty('overflow-y', 'auto');\r\n end;\r\n ssHorizontal:\r\n begin\r\n ElementInputHandle.style.removeProperty('overflow');\r\n ElementInputHandle.style.setProperty('overflow-x', 'auto');\r\n ElementInputHandle.style.setProperty('overflow-y', 'hidden');\r\n end;\r\n ssBoth:\r\n begin\r\n ElementInputHandle.style.setProperty('overflow', 'auto');\r\n end;\r\n end;\r\n end;\r\n\r\n ElementInputHandle.style.setProperty('margin', '0');\r\n\r\n if (Color <> clNone) and (Color <> clWindow) then\r\n ElementInputHandle.style.setProperty('background-color', ColorToHtml(Color))\r\n else\r\n ElementInputHandle.style.removeProperty('background-color');\r\n\r\n if not SpellCheck then\r\n ElementInputHandle['spellcheck'] := 'false'\r\n else\r\n if ElementInputHandle.hasAttribute('spellcheck') then\r\n ElementInputHandle.removeAttribute('spellcheck');\r\n\r\n if not WordWrap then\r\n ElementInputHandle['wrap'] := 'off'\r\n else\r\n if ElementInputHandle.hasAttribute('wrap') then\r\n ElementInputHandle.removeAttribute('wrap');\r\n end;\r\nend;\r\n\r\nfunction TCustomMemo.GetText: String;\r\nbegin\r\n if Assigned(ElementInputHandle) then\r\n begin\r\n FBlockChange := True;\r\n FLines.Text := ElementInputHandle.value;\r\n FBlockChange := False;\r\n end;\r\n\r\n Result := FLines.Text;\r\nend;\r\n\r\n{$HINTS OFF}\r\nfunction TCustomMemo.HandleDoKeyDown(Event: TJSKeyBoardEvent): Boolean;\r\nvar\r\n eh: TJSHTMLElement;\r\nbegin\r\n if (GetKeyCode(Event.Key) = 9) and WantTabs then\r\n begin\r\n eh := ElementInputHandle;\r\n\r\n asm\r\n var sstart = eh.selectionStart;\r\n var send = eh.selectionEnd;\r\n\r\n eh.value = eh.value.substring(0, sstart) + \"\\t\" +eh.value.substring(send);\r\n // put caret at right position again\r\n eh.selectionStart = eh.selectionEnd = sstart + 1;\r\n\r\n Event.stopPropagation();\r\n Event.preventDefault();\r\n end;\r\n end\r\n else\r\n inherited;\r\nend;\r\n{$HINTS ON}\r\n\r\nprocedure TCustomMemo.InitCSSLibrary(ALibrary: TCSSLibrary);\r\nbegin\r\n if (ALibrary = cssBootstrap) then\r\n begin\r\n ElementFont := efCSS;\r\n ElementClassName := 'form-control';\r\n end;\r\nend;\r\n\r\nfunction TCustomMemo.IsInputControl: Boolean;\r\nbegin\r\n Result := True;\r\nend;\r\n\r\nfunction TCustomMemo.IsReadOnly: boolean;\r\nbegin\r\n Result := FReadOnly;\r\nend;\r\n\r\nprocedure TCustomMemo.LoadState(AState: string);\r\nbegin\r\n Lines.Text := AState;\r\nend;\r\n\r\nprocedure TCustomMemo.PersistinHTML;\r\nbegin\r\n ElementInputHandle.innerHTML := Lines.Text;\r\nend;\r\n\r\nfunction TCustomMemo.GetCaret: TPoint;\r\nvar\r\n l,i,ll,tl: integer;\r\n ss: integer;\r\nbegin\r\n l := 0;\r\n tl := 0;\r\n ss := SelStart;\r\n for i := 0 to Lines.Count - 1 do\r\n begin\r\n ll := Length(Lines[i]) + 1;\r\n if ss > tl + ll then\r\n begin\r\n inc(l);\r\n tl := tl + ll;\r\n end\r\n else\r\n begin\r\n break;\r\n end;\r\n end;\r\n\r\n Result.X := ss - tl;\r\n Result.Y := l;\r\nend;\r\n\r\nfunction TCustomMemo.GetCaretPos: TPoint;\r\nbegin\r\n Result := GetCaret;\r\nend;\r\n\r\nfunction TCustomMemo.GetDisplayText: string;\r\nbegin\r\n Result := FLines.Text;\r\nend;\r\n\r\nfunction TCustomMemo.GetElementInputHandle: TJSHTMLInputElement;\r\nbegin\r\n Result := TJSHTMLInputElement(Container);\r\nend;\r\n\r\nprocedure TCustomMemo.GetMethodPointers;\r\nbegin\r\n inherited;\r\n FHandleChangePtr := @DoHandleChange;\r\n FHandleInputPtr := @DoHandleInput;\r\n FHandlePastePtr := @DoHandlePaste;\r\n FHandleCutPtr := @DoHandleCut;\r\n FHandleInvalidPtr := @DoHandleInvalid;\r\nend;\r\n\r\nfunction TCustomMemo.GetSelLength: Integer;\r\nbegin\r\n Result := -1;\r\n if Assigned(ElementInputHandle) then\r\n Result := ElementInputHandle.selectionEnd - ElementInputHandle.selectionStart;\r\nend;\r\n\r\nfunction TCustomMemo.GetSelStart: Integer;\r\nbegin\r\n Result := -1;\r\n if Assigned(ElementInputHandle) then\r\n Result := ElementInputHandle.selectionStart;\r\nend;\r\n\r\nfunction TCustomMemo.GetSelText: string;\r\nbegin\r\n Result := '';\r\n if Assigned(ElementInputHandle) then\r\n Result := ElementInputHandle.Value.Substring(SelStart, SelStart + SelLength);\r\nend;\r\n\r\n{ TControlGroup }\r\n\r\nprocedure TControlGroup.CreateInitialize;\r\nbegin\r\n inherited;\r\n FColumns := 1;\r\n FControls := TList.Create;\r\n FItems := TStringList.Create;\r\n TStringList(FItems).OnChange := DoItemsChange;\r\n //BorderWidth := 1;\r\n FOldCount := -1;\r\n FControlPosition := epAbsolute;\r\n if (csDesigning in ComponentState) then\r\n begin\r\n Width := 200;\r\n Height := 200;\r\n end;\r\nend;\r\n\r\nprocedure TControlGroup.Change;\r\nbegin\r\n if Assigned(OnChange) then\r\n OnChange(Self);\r\nend;\r\n\r\nfunction TControlGroup.CreateGroupControl(ALeft, ATop, AIndex: integer;\r\n ACaption: string; APosition: TElementPosition; AState, AEnabled: boolean): TCustomControl;\r\nbegin\r\n //\r\n Result := nil;\r\nend;\r\n\r\nfunction TControlGroup.CreateElement: TJSElement;\r\nvar\r\n legend: TJSElement;\r\nbegin\r\n Result := document.createElement('FIELDSET');\r\n legend := document.createElement('LEGEND');\r\n Result.appendChild(legend);\r\n legend.innerHTML := Caption;\r\n legend['class'] := 'w-auto ' + ElementLegendClassName;\r\n\r\n if Caption = '' then\r\n TJSHTMLElement(legend).style.setProperty('display', 'none')\r\n else\r\n TJSHTMLElement(legend).style.setProperty('display', '');\r\n\r\n TJSHTMLElement(legend).style.setProperty('float', 'none');\r\n\r\n TJSHTMLElement(Result).style.setProperty('display', 'inline-block');\r\n\r\n TJSHTMLElement(Result).style.setProperty('-webkit-padding-before','0px');\r\n TJSHTMLElement(Result).style.setProperty('-webkit-padding-after','0px');\r\n TJSHTMLElement(Result).style.setProperty('-webkit-padding-end','0px');\r\n TJSHTMLElement(Result).style.setProperty('-webkit-padding-start','0px');\r\n TJSHTMLElement(Result).style.setProperty('border','1px');\r\nend;\r\n\r\ndestructor TControlGroup.Destroy;\r\nbegin\r\n FControls.Free;\r\n FItems.Free;\r\n inherited;\r\nend;\r\n\r\nprocedure TControlGroup.Loaded;\r\nbegin\r\n inherited;\r\n DoUpdateList;\r\nend;\r\n\r\nprocedure TControlGroup.SetCaption(const AValue: string);\r\nvar\r\n el: TJSHTMLElement;\r\nbegin\r\n inherited SetCaption(AValue);\r\n\r\n if not Assigned(Container) then\r\n Exit;\r\n\r\n el := TJSHTMLElement(Container.firstElementChild);\r\n\r\n if Assigned(el) then\r\n begin\r\n el.innerHTML := AValue;\r\n\r\n if AValue = '' then\r\n el.style.setProperty('display', 'none')\r\n else\r\n el.style.setProperty('display', '');\r\n end;\r\nend;\r\n\r\nprocedure TControlGroup.SetColumns(AValue: integer);\r\nbegin\r\n if (FColumns > 0) and (FColumns <> AValue) then\r\n begin\r\n FColumns := AValue;\r\n DoUpdateList;\r\n end;\r\nend;\r\n\r\nprocedure TControlGroup.SetControlPosition(const Value: TElementPosition);\r\nbegin\r\n if (FControlPosition <> Value) then\r\n begin\r\n FControlPosition := Value;\r\n DoUpdateList;\r\n end;\r\nend;\r\n\r\nprocedure TControlGroup.SetEnabled(Value: Boolean);\r\nvar\r\n i: integer;\r\nbegin\r\n inherited;\r\n for i := 0 to FControls.Count - 1 do\r\n begin\r\n TCustomControl(FControls.Items[i]).Enabled := Value;\r\n end;\r\nend;\r\n\r\nprocedure TControlGroup.SetHeight(AValue: Integer);\r\nbegin\r\n inherited;\r\n DoUpdateList;\r\nend;\r\n\r\nprocedure TControlGroup.SetItems(AItems: TStrings);\r\nbegin\r\n FItems.Assign(AItems);\r\n DoUpdateList;\r\nend;\r\n\r\nprocedure TControlGroup.SetWidth(AValue: Integer);\r\nbegin\r\n inherited;\r\n DoUpdateList;\r\nend;\r\n\r\nfunction TControlGroup.DoHandleChange(Event: TEventListenerEvent): Boolean;\r\nbegin\r\n Change;\r\n Result := true;\r\nend;\r\n\r\nprocedure TControlGroup.DoHandleClick(AControl: TCustomControl);\r\nbegin\r\n Change;\r\nend;\r\n\r\nprocedure TControlGroup.DoItemsChange(Sender: TObject);\r\nbegin\r\n DoUpdateList;\r\nend;\r\n\r\nprocedure TControlGroup.DoControlClick(Sender: TObject);\r\nbegin\r\n DoHandleClick((Sender as TCustomControl));\r\nend;\r\n\r\nprocedure TControlGroup.DoUpdateList;\r\nvar\r\n i: integer;\r\n s: string;\r\n rd: TCustomControl;\r\n dx, dy, dc, col, row, ypos: integer;\r\n legend: TJSElement;\r\n chk: array of boolean;\r\nbegin\r\n if not Assigned(Container) then\r\n Exit;\r\n\r\n if FItems.Count = 0 then\r\n Exit;\r\n\r\n dy := Round(Font.Size * 2.5);\r\n dx := Width div FColumns;\r\n if Caption <> '' then\r\n dc := Font.Size\r\n else\r\n dc := 4;\r\n\r\n col := 0;\r\n row := 0;\r\n\r\n if FOldCount > 0 then\r\n setLength(chk, FOldCount);\r\n\r\n for i := 0 to FOldCount - 1 do\r\n begin\r\n rd := TCustomControl(FControls[i]);\r\n\r\n if rd is TRadioButton then\r\n chk[i] := (rd as TRadioButton).Checked;\r\n if rd is TCheckBox then\r\n chk[i] := (rd as TCheckBox).Checked;\r\n\r\n rd.Free;\r\n end;\r\n FControls.Clear;\r\n\r\n while Container.childElementCount > 0 do\r\n Container.removeChild(Container.firstChild);\r\n\r\n if Caption <> '' then\r\n begin\r\n legend := document.createElement('LEGEND');\r\n ElementHandle.appendChild(legend);\r\n legend.innerHTML := Caption;\r\n legend['class'] := 'w-auto ' + ElementLegendClassName;\r\n\r\n TJSHTMLElement(legend).style.setProperty('float','none');\r\n\r\n SetHTMLElementFont(TJSHTMLElement(legend), Font, not((ElementFont = efProperty) and (ElementClassName = '')));\r\n end;\r\n\r\n if ElementGroupClassName <> '' then\r\n ElementHandle.setAttribute('class', ElementGroupClassName)\r\n else\r\n ElementHandle.setAttribute('class','border p-2');\r\n\r\n TJSHTMLElement(Container).style.setProperty('margin','0px');\r\n\r\n for i := 0 to FItems.Count - 1 do\r\n begin\r\n ypos := dc + row * dy;\r\n s := FItems[i];\r\n rd := CreateGroupControl(4 + col * dx, ypos, i, s, ControlPosition, GetGroupControlState(i), true);\r\n rd.Enabled := Enabled;\r\n FControls.Add(rd);\r\n\r\n if i <= FOldCount then\r\n begin\r\n if rd is TRadioButton then\r\n (rd as TRadioButton).Checked := chk[i];\r\n if rd is TCheckBox then\r\n (rd as TCheckBox).Checked := chk[i];\r\n end;\r\n\r\n if not IsLinked then\r\n begin\r\n TJSHTMLElement(rd.Container).style.setProperty('float', 'left');\r\n TJSHTMLElement(rd.Container).style.setProperty('width', IntToStr(Trunc(100 / FColumns) - 5) + '%');\r\n if TabStop then\r\n begin\r\n TJSHTMLElement(rd.Container)['tabindex'] := TabOrder.toString;\r\n TJSHTMLElement(Container)['tabindex'] := '-1';\r\n end\r\n else\r\n TJSHTMLElement(rd.Container)['tabindex'] := '-1';\r\n end;\r\n\r\n if i mod FColumns = 0 then\r\n TJSHTMLElement(rd.Container).style.setProperty('clear', 'left');\r\n\r\n ElementHandle.appendChild(rd.Container);\r\n\r\n if col < FColumns - 1 then\r\n inc(col)\r\n else\r\n begin\r\n col := 0;\r\n inc(row);\r\n end;\r\n end;\r\n\r\n FOldCount := Items.Count;\r\nend;\r\n\r\nprocedure TControlGroup.EndUpdate;\r\nbegin\r\n inherited;\r\n DoUpdateList;\r\nend;\r\n\r\nprocedure TControlGroup.FontChanged;\r\nbegin\r\n inherited;\r\n DoUpdateList;\r\nend;\r\n\r\nfunction TControlGroup.GetGroupControl(AIndex: integer): TCustomControl;\r\nbegin\r\n Result := TCustomControl(FControls[AIndex]);\r\nend;\r\n\r\nfunction TControlGroup.GetGroupControlState(AIndex: integer): boolean;\r\nbegin\r\n Result := false;\r\nend;\r\n\r\nfunction TRadioGroup.CreateGroupControl(ALeft, ATop, AIndex: integer;\r\n ACaption: string; APosition: TElementPosition; AState, AEnabled: boolean): TCustomControl;\r\nvar\r\n rd: TRadioButton;\r\n id: string;\r\nbegin\r\n id := GetID;\r\n if (id = '') then\r\n id := Name;\r\n\r\n rd := TRadioButton.Create(id + IntToStr(AIndex));\r\n rd.ElementPosition := APosition;\r\n rd.ElementFont := ElementFont;\r\n rd.ElementClassName := ElementClassName;\r\n rd.ElementButtonClassName := ElementButtonClassName;\r\n rd.ElementLabelClassName := ElementLabelClassName;\r\n rd.HeightStyle := ssAuto;\r\n rd.ParentFont := false;\r\n rd.Font.Assign(Font);\r\n rd.Parent := Self;\r\n rd.Caption := ACaption;\r\n rd.GroupName := id;\r\n rd.Top := ATop; //dc + row * dy;\r\n rd.Left := ALeft; //4 + col * dx;\r\n rd.WidthStyle := ssAuto;\r\n rd.WidthPercent := 100;\r\n rd.OnClick := DoControlClick;\r\n rd.Checked := AState;\r\n rd.Enabled := AEnabled;\r\n rd.Tag := AIndex;\r\n rd.TabStop := true;\r\n Result := rd;\r\nend;\r\n\r\nprocedure TRadioGroup.CreateInitialize;\r\nbegin\r\n inherited;\r\n FItemIndex := -1;\r\n FOldItemIndex := -2;\r\nend;\r\n\r\nprocedure TRadioGroup.DoHandleClick(AControl: TCustomControl);\r\nbegin\r\n if ItemIndex = FOldItemIndex then\r\n Exit;\r\n\r\n Change;\r\n\r\n FOldItemIndex := ItemIndex;\r\nend;\r\n\r\nfunction TRadioGroup.GetGroupControlState(AIndex: integer): boolean;\r\nbegin\r\n Result := AIndex = FItemIndex;\r\nend;\r\n\r\nfunction TRadioGroup.GetItemIndex: integer;\r\nvar\r\n el: TJSElement;\r\n i: integer;\r\nbegin\r\n Result := FItemIndex;\r\n\r\n for i := 0 to FItems.Count -1 do\r\n begin\r\n el := document.getElementByID(GetID + IntToStr(i) + 'rd');\r\n if Assigned(el) then\r\n begin\r\n if TJSHTMLInputElement(el).checked then\r\n Result := i;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TRadioGroup.LoadState(AState: string);\r\nvar\r\n idx,e: integer;\r\nbegin\r\n val(AState, idx, e);\r\n\r\n if (e = 0) then\r\n ItemIndex := idx;\r\nend;\r\n\r\nfunction TRadioGroup.SaveState: string;\r\nbegin\r\n Result := IntToStr(ItemIndex);\r\nend;\r\n\r\nprocedure TRadioGroup.SetFocus;\r\nvar\r\n idx: integer;\r\n rd: TRadioButton;\r\nbegin\r\n if Items.Count = 0 then\r\n Exit;\r\n\r\n idx := ItemIndex;\r\n if idx < 0 then\r\n idx := 0;\r\n\r\n rd := TRadioButton(GetGroupControl(idx));\r\n if Assigned(rd) then\r\n rd.SetFocus;\r\nend;\r\n\r\nprocedure TRadioGroup.SetItemIndex(AIndex: integer);\r\nvar\r\n el: TJSElement;\r\nbegin\r\n // clear selection\r\n if (AIndex = -1) and (ItemIndex >= 0) then\r\n begin\r\n el := document.getElementByID(GetID + IntToStr(ItemIndex) + 'rd');\r\n\r\n if Assigned(el) then\r\n TJSHTMLInputElement(el).checked := False;\r\n\r\n FItemIndex := -1;\r\n end\r\n else\r\n begin\r\n // new selection\r\n FItemIndex := AIndex;\r\n if (AIndex >= 0) and (AIndex < Items.Count) then\r\n begin\r\n el := document.getElementByID(GetID + IntToStr(AIndex) + 'rd');\r\n if Assigned(el) then\r\n TJSHTMLInputElement(el).checked := True;\r\n end;\r\n end;\r\nend;\r\n\r\n\r\n\r\n{ TColorPicker }\r\n\r\nprocedure TColorPicker.ClearMethodPointers;\r\nbegin\r\n inherited;\r\n FHandleChangePtr := nil;\r\nend;\r\n\r\nprocedure TColorPicker.CreateInitialize;\r\nbegin\r\n inherited;\r\n FColor := clBlack;\r\nend;\r\n\r\nprocedure TColorPicker.BindEvents;\r\nbegin\r\n inherited;\r\n if Assigned(ElementInputHandle) then\r\n begin\r\n ElementInputHandle.addEventListener('input', FHandleChangePtr);\r\n end;\r\nend;\r\n\r\nfunction TColorPicker.GetElementInputHandle: TJSHTMLInputElement;\r\nbegin\r\n Result := TJSHTMLInputElement(Container);\r\nend;\r\n\r\nprocedure TColorPicker.UnBindEvents;\r\nbegin\r\n inherited;\r\n if Assigned(ElementInputHandle) then\r\n begin\r\n ElementInputHandle.removeEventListener('input', FHandleChangePtr);\r\n end;\r\n\r\nend;\r\n\r\nprocedure TColorPicker.UpdateElementVisual;\r\nbegin\r\n inherited;\r\n\r\n if Assigned(ElementHandle) then\r\n begin\r\n ElementHandle.style.setProperty('padding','0px'); \r\n ElementHandle.style.setProperty('width', IntToStr(Width - 2) + 'px');\r\n ElementHandle.style.setProperty('height',IntToStr(Height - 2) + 'px');\r\n ElementHandle.style.setProperty('min-width','32px');\r\n end;\r\nend;\r\n\r\nfunction TColorPicker.DoHandleChange(Event: TEventListenerEvent): Boolean;\r\nbegin \r\n Select;\r\n Result := true;\r\nend;\r\n\r\nprocedure TColorPicker.Select;\r\nbegin\r\n if Assigned(OnSelect) then\r\n OnSelect(Self);\r\nend;\r\n\r\nfunction TColorPicker.GetColor: TColor;\r\nbegin\r\n Result := FColor;\r\n\r\n if Assigned(Container) then\r\n Result := HexToColor(TJSHTMLInputElement(Container).value);\r\nend;\r\n\r\nprocedure TColorPicker.SetColor(AValue: TColor);\r\nbegin\r\n FColor := AValue;\r\n\r\n if Assigned(Container) then\r\n TJSHTMLInputElement(Container).value := ColorToHTML(AValue);\r\nend;\r\n\r\nfunction TColorPicker.GetInputType: string;\r\nbegin \r\n Result := 'COLOR';\r\nend;\r\n\r\nprocedure TColorPicker.GetMethodPointers;\r\nbegin\r\n inherited;\r\n FHandleChangePtr := @DoHandleChange;\r\nend;\r\n\r\nprocedure TColorPicker.InitCSSLibrary(ALibrary: TCSSLibrary);\r\nbegin\r\n if (ALibrary = cssBootstrap) then\r\n begin\r\n ElementClassName := 'form-control';\r\n ElementFont := efCSS;\r\n HeightStyle := ssAuto;\r\n end;\r\nend;\r\n\r\n{ TScrollBar }\r\n\r\nprocedure TScrollBar.CreateInitialize;\r\nbegin\r\n inherited;\r\n TabStop := True;\r\n FKind := sbHorizontal;\r\n FPosition := 0;\r\n FMin := 0;\r\n FMax := 100;\r\n FSmallChange := 1;\r\n FLargeChange := 1;\r\n\r\n FContent := TScrollBarContent.Create(Self);\r\n FContent.Parent := Self;\r\n FContent.Width := 121;\r\n FContent.Height := 17;\r\n\r\n if (csDesigning in ComponentState) then\r\n begin\r\n Width := 121;\r\n Height := 17;\r\n end;\r\n\r\n UpdateContent;\r\nend;\r\n\r\nprocedure TScrollBar.BindEvents;\r\nbegin\r\n inherited;\r\n if Assigned(ElementHandle) then\r\n ElementHandle.addEventListener('scroll', FScrollPtr);\r\nend;\r\n\r\nprocedure TScrollBar.ClearMethodPointers;\r\nbegin\r\n inherited;\r\n FScrollPtr := nil;\r\nend;\r\n\r\nfunction TScrollBar.CreateElement: TJSElement;\r\nbegin\r\n Result := document.createElement('SPAN');\r\nend;\r\n\r\ndestructor TScrollBar.Destroy;\r\nbegin\r\n FContent.Free;\r\n inherited;\r\nend;\r\n\r\nfunction TScrollBar.DoScroll(Event: TJSUIEvent): Boolean;\r\nbegin\r\n FScrolling := True;\r\n if Assigned(OnChange) then\r\n OnChange(Self);\r\n\r\n FScrolling := False;\r\n Result := True;\r\nend;\r\n\r\nprocedure TScrollBar.GetMethodPointers;\r\nbegin\r\n inherited;\r\n FScrollPtr := @DoScroll;\r\nend;\r\n\r\nfunction TScrollBar.GetPageSize: Integer;\r\nbegin\r\n Result := FPageSize;\r\n if Result = 0 then\r\n Result := 25;\r\nend;\r\n\r\nfunction TScrollBar.GetValue(XYPos: Double): Double;\r\nbegin\r\n Result := 0;\r\n if Assigned(FContent) then\r\n begin\r\n case Kind of\r\n sbHorizontal:\r\n begin\r\n if FContent.Width > 0 then\r\n Result := (XYPos / FContent.Width) * (Max - Min)\r\n end;\r\n sbVertical:\r\n begin\r\n if FContent.Height > 0 then\r\n Result := (XYPos / FContent.Height) * (Max - Min);\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TScrollBar.GetPosition: Integer;\r\nbegin\r\n Result := 0;\r\n if Assigned(Element) then\r\n begin\r\n case Kind of\r\n sbHorizontal: Result := Round(GetValue(Element.scrollLeft));\r\n sbVertical: Result := Round(GetValue(Element.scrollTop));\r\n end;\r\n end\r\n else\r\n Result := FPosition;\r\nend;\r\n\r\nprocedure TScrollBar.Loaded;\r\nbegin\r\n inherited;\r\n UpdateContent;\r\nend;\r\n\r\nprocedure TScrollBar.SetBounds(X, Y, AWidth, AHeight: Integer);\r\nbegin\r\n inherited;\r\n UpdateContent;\r\nend;\r\n\r\nprocedure TScrollBar.SetKind(const Value: TScrollBarKind);\r\nbegin\r\n if FKind <> Value then\r\n begin\r\n FKind := Value;\r\n// if not (csLoading in ComponentState) then\r\n begin\r\n case Kind of\r\n sbHorizontal:\r\n begin\r\n SetBounds(Left, Top, Height, 17)\r\n end;\r\n sbVertical:\r\n begin\r\n SetBounds(Left, Top, 17, Width)\r\n end;\r\n end;\r\n end;\r\n UpdateElement;\r\n UpdateContent;\r\n end;\r\nend;\r\n\r\nprocedure TScrollBar.SetMax(const Value: Integer);\r\nbegin\r\n if FMax <> Value then\r\n begin\r\n FMax := Value;\r\n UpdateContent;\r\n end;\r\nend;\r\n\r\nprocedure TScrollBar.SetMin(const Value: Integer);\r\nbegin\r\n if FMin <> Value then\r\n begin\r\n FMin := Value;\r\n UpdateContent;\r\n end;\r\nend;\r\n\r\nprocedure TScrollBar.SetPageSize(const Value: Integer);\r\nbegin\r\n if FPageSize <> Value then\r\n begin\r\n FPageSize := Value;\r\n UpdateContent;\r\n end;\r\nend;\r\n\r\nprocedure TScrollBar.SetPosition(const Value: Integer);\r\nbegin\r\n if FPosition <> Value then\r\n begin\r\n FPosition := Value;\r\n UpdateContent;\r\n end;\r\nend;\r\n\r\nprocedure TScrollBar.UpdateElementVisual;\r\nbegin\r\n inherited;\r\n\r\n if Assigned(ElementHandle) then\r\n begin\r\n ElementHandle.style.setProperty('overflow', 'auto');\r\n case Kind of\r\n sbHorizontal:\r\n begin\r\n ElementHandle.style.setProperty('overflow-y', 'hidden');\r\n ElementHandle.style.setProperty('overflow-x', '');\r\n end;\r\n sbVertical:\r\n begin\r\n ElementHandle.style.setProperty('overflow-y', '');\r\n ElementHandle.style.setProperty('overflow-x', 'hidden');\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TScrollBar.UnBindEvents;\r\nbegin\r\n inherited;\r\n if Assigned(ElementHandle) then\r\n ElementHandle.removeEventListener('scroll', FScrollPtr);\r\nend;\r\n\r\nprocedure TScrollBar.UpdateContent;\r\nvar\r\n x, y, w, h: Integer;\r\n ps: Integer;\r\n v: Single;\r\nbegin\r\n if not Assigned(FContent) or not Assigned(ElementHandle) or FScrolling then\r\n Exit;\r\n\r\n ps := PageSize;\r\n v := (Max - Min) / ps;\r\n\r\n case Kind of\r\n sbHorizontal:\r\n begin\r\n y := 0;\r\n h := Height;\r\n w := Round(v * Width);\r\n x := Round(((FPosition - Min) / (Max - Min)) * w);\r\n end;\r\n sbVertical:\r\n begin\r\n x := 0;\r\n w := Width;\r\n h := Round(v * Height);\r\n y := Round(((FPosition - Min) / (Max - Min)) * h);\r\n end;\r\n end;\r\n\r\n FContent.SetBounds(0, 0, w, h);\r\n ElementHandle.scrollLeft := x;\r\n ElementHandle.scrollTop := y;\r\nend;\r\n\r\n{ TScrollBarContent }\r\n\r\nfunction TScrollBarContent.CreateElement: TJSElement;\r\nbegin\r\n Result := document.createElement('SPAN');\r\nend;\r\n\r\n{ TCheckGroup }\r\n\r\nfunction TCheckGroup.CreateGroupControl(ALeft, ATop, AIndex: integer;\r\n ACaption: string; APosition: TElementPosition; AState, AEnabled: boolean): TCustomControl;\r\nvar\r\n cb: TCheckBox;\r\n id: string;\r\nbegin\r\n id := GetID;\r\n if id = '' then\r\n id := Name;\r\n\r\n cb := TCheckBox.Create(id + IntToStr(AIndex));\r\n cb.Caption := ACaption;\r\n cb.ElementPosition := APosition;\r\n cb.ElementFont := ElementFont;\r\n cb.ElementClassName := ElementClassName;\r\n cb.ElementButtonClassName := ElementButtonClassName;\r\n cb.ElementLabelClassName := ElementLabelClassName;\r\n cb.ParentFont := false;\r\n cb.Font.Assign(Font);\r\n cb.Parent := Self;\r\n cb.Top := ATop;\r\n cb.Left := ALeft;\r\n cb.WidthStyle := ssPercent;\r\n cb.WidthPercent := 100;\r\n cb.HeightStyle := ssAuto;\r\n\r\n cb.OnCheckClick := DoControlClick;\r\n cb.Checked := AState;\r\n cb.Enabled := AEnabled;\r\n cb.Tag := AIndex;\r\n cb.TabStop := true;\r\n Result := cb;\r\nend;\r\n\r\nprocedure TCheckGroup.CreateInitialize;\r\nbegin\r\n inherited;\r\nend;\r\n\r\nprocedure TCheckGroup.DoHandleClick(AControl: TCustomControl);\r\nbegin\r\n inherited;\r\n if Assigned(OnCheckClick) then\r\n OnCheckClick(Self, AControl.Tag);\r\nend;\r\n\r\nfunction TCheckGroup.GetChecked(AIndex: integer): boolean;\r\nbegin\r\n Result := (GetGroupControl(AIndex) as TCheckBox).Checked;\r\nend;\r\n\r\nfunction TCheckGroup.GetGroupControlState(AIndex: integer): boolean;\r\nbegin\r\n Result := false;\r\nend;\r\n\r\nprocedure TCheckGroup.LoadState(AState: string);\r\nvar\r\n sl: TStringList;\r\n i: integer;\r\nbegin\r\n sl := TStringList.Create;\r\n sl.Delimiter := ',';\r\n sl.CommaText := AState;\r\n\r\n for i := 0 to sl.Count - 1 do\r\n begin\r\n Checked[i] := sl.Strings[i] = '1';\r\n end;\r\n\r\n sl.Free;\r\nend;\r\n\r\nfunction TCheckGroup.SaveState: string;\r\nvar\r\n i: integer;\r\n s: string;\r\nbegin\r\n s := '';\r\n for i := 0 to Items.Count - 1 do\r\n begin\r\n if Checked[i] then\r\n s := s + ',1'\r\n else\r\n s := s + ',0';\r\n end;\r\n\r\n Delete(s,1,1);\r\n Result := s;\r\nend;\r\n\r\nprocedure TCheckGroup.SetChecked(AIndex: integer; const Value: boolean);\r\nbegin\r\n (GetGroupControl(AIndex) as TCheckBox).Checked := Value;\r\nend;\r\n\r\nprocedure TCheckGroup.SetFocus;\r\nvar\r\n cb: TCheckBox;\r\nbegin\r\n if Items.Count > 0 then\r\n begin\r\n cb := TCheckBox(GetGroupControl(0));\r\n if Assigned(cb) then\r\n cb.SetFocus;\r\n end;\r\nend;\r\n\r\n\r\n{ TLineSpacingPicker }\r\n\r\nprocedure TLineSpacingPicker.CreateInitialize;\r\nbegin\r\n inherited;\r\n Items.Clear;\r\n Items.Add('1');\r\n Items.Add('1.5');\r\n Items.Add('2');\r\nend;\r\n\r\nend.\r\n","{********************************************************************}\r\n{ }\r\n{ written by TMS Software }\r\n{ copyright (c) 2018 - 2025 }\r\n{ Email : info@tmssoftware.com }\r\n{ Web : http://www.tmssoftware.com }\r\n{ }\r\n{ The source code is given as is. The author is not responsible }\r\n{ for any possible damage done due to the use of this code. }\r\n{ The complete source code remains property of the author and may }\r\n{ not be distributed, published, given or sold in any form as such. }\r\n{ No parts of the source code can be included in any other component }\r\n{ or application without written authorization of the author. }\r\n{********************************************************************}\r\n\r\nunit WEBLib.ExtCtrls;\r\n\r\n{$modeswitch externalclass}\r\n\r\n{$DEFINE NOPP}\r\n\r\ninterface\r\n\r\nuses\r\n Classes, SysUtils, Types, WEBLib.Controls, WEBLib.StdCtrls, WEBLib.Graphics,\r\n Web, JS, WEBLib.WebTools, WEBLib.Menus, WEBLib.REST;\r\n\r\ntype\r\n TLinkTarget = (ltCurrentTab, ltNewTab);\r\n\r\n TCustomLinkLabel = class(TCustomLabel)\r\n private\r\n FDisplText: string;\r\n FOnLinkClick: TLinkClickEvent;\r\n FWidthStyle: TSizeStyle;\r\n FHeightPercent: TPercentSize;\r\n FHeightStyle: TSizeStyle;\r\n FWidthPercent: TPercentSize;\r\n FTarget: TLinkTarget;\r\n procedure SetHeightPercent(const Value: TPercentSize); reintroduce;\r\n procedure SetHeightStyle(const Value: TSizeStyle); reintroduce;\r\n procedure SetWidthPercent(const Value: TPercentSize); reintroduce;\r\n procedure SetWidthStyle(const Value: TSizeStyle); reintroduce;\r\n procedure SetTarget(const Value: TLinkTarget);\r\n protected\r\n function GetOuterWidth: integer; override;\r\n function GetOuterHeight: integer; override;\r\n function GetDisplayText: string; override;\r\n\r\n procedure SetCaption(const AValue: string); override;\r\n function DoLinkClick(Event: TJSMouseEvent): boolean;\r\n public\r\n constructor Create(AOwner: TComponent); overload; override;\r\n published\r\n property Align;\r\n property Alignment;\r\n property AlignWithMargins;\r\n property Anchors;\r\n property AutoSize;\r\n property Caption;\r\n property Color;\r\n property DragMode;\r\n property EllipsisPosition;\r\n property ElementClassName;\r\n property ElementID;\r\n property ElementFont;\r\n property ElementPosition;\r\n property Enabled;\r\n property Font;\r\n property Height;\r\n property Hint;\r\n property Layout;\r\n property Left;\r\n property Margins;\r\n property ShowHint;\r\n property Target: TLinkTarget read FTarget write SetTarget default ltCurrentTab;\r\n property Top;\r\n property Transparent default true;\r\n property Visible;\r\n property Width;\r\n property WordWrap;\r\n\r\n property HeightStyle: TSizeStyle read FHeightStyle write SetHeightStyle default ssAbsolute;\r\n property WidthStyle: TSizeStyle read FWidthStyle write SetWidthStyle default ssAbsolute;\r\n property HeightPercent: TPercentSize read FHeightPercent write SetHeightPercent default 100;\r\n property WidthPercent: TPercentSize read FWidthPercent write SetWidthPercent default 100;\r\n\r\n property OnClick;\r\n property OnDblClick;\r\n property OnLinkClick: TLinkClickEvent read FOnLinkClick write FOnLinkClick;\r\n property OnDragDrop;\r\n property OnDragOver;\r\n property OnEndDrag;\r\n property OnStartDrag;\r\n end;\r\n\r\n TLinkLabel = class(TCustomLinkLabel)\r\n published\r\n property Caption;\r\n property ParentFont;\r\n end;\r\n\r\n TWebLinkLabel = class(TLinkLabel);\r\n\r\n TTrackBarOrientation = (trHorizontal, trVertical);\r\n\r\n TTrackBar = class(TCustomInput)\r\n private\r\n FMax: integer;\r\n FMin: integer;\r\n FPosition: integer;\r\n FOnChange: TNotifyEvent;\r\n FOrientation: TTrackBarOrientation;\r\n procedure SetOrientation(const Value: TTrackBarOrientation);\r\n protected\r\n function GetElementInputHandle: TJSHTMLInputElement;\r\n function GetInputType: string; override;\r\n function DoHandleChange(Event: TEventListenerEvent): Boolean;\r\n procedure BindEvents; override;\r\n procedure SetMax(AValue: integer);\r\n procedure SetMin(AValue: integer);\r\n procedure SetPosition(AValue: integer);\r\n function GetPosition: integer;\r\n procedure DoUpdate;\r\n procedure Change; virtual;\r\n procedure CreateControl; override;\r\n procedure UpdateElementVisual; override;\r\n public\r\n procedure CreateInitialize; override;\r\n property ElementInputHandle: TJSHTMLInputElement read GetElementInputHandle;\r\n published\r\n property Align;\r\n property AlignWithMargins;\r\n property Anchors;\r\n property DragMode;\r\n property ElementClassName;\r\n property ElementID;\r\n property ElementFont;\r\n property ElementPosition;\r\n property Enabled;\r\n property Height;\r\n property HeightPercent;\r\n property HeightStyle;\r\n property Left;\r\n property Margins;\r\n property Max: integer read FMax write SetMax default 10;\r\n property Min: integer read FMin write SetMin default 0;\r\n property Orientation: TTrackBarOrientation read FOrientation write SetOrientation default trHorizontal;\r\n property Position: integer read GetPosition write SetPosition default 0;\r\n property Role;\r\n property ShowHint;\r\n property TabOrder;\r\n property TabStop;\r\n property Top;\r\n property Visible;\r\n property Width;\r\n property WidthPercent;\r\n property WidthStyle;\r\n property OnClick;\r\n property OnChange: TNotifyEvent read FOnChange write FOnChange;\r\n property OnDragDrop;\r\n property OnDragOver;\r\n property OnEndDrag;\r\n property OnStartDrag;\r\n end;\r\n\r\n TWebTrackBar = class(TTrackBar);\r\n\r\n TTimer = class(TComponent)\r\n private\r\n FInterval: integer;\r\n FTimerID: integer;\r\n FOnTimer: TNotifyEvent;\r\n FEnabled: boolean;\r\n protected\r\n procedure SetEnabled(Value: Boolean); virtual;\r\n procedure SetInterval(AValue: integer);\r\n procedure DoTimer;\r\n procedure DoUpdateTimer;\r\n procedure DoClearTimer;\r\n public\r\n constructor Create(AOwner: TComponent); override;\r\n destructor Destroy; override;\r\n published\r\n property Enabled: boolean read FEnabled write SetEnabled default True;\r\n property Interval: integer read FInterval write SetInterval default 1000;\r\n property OnTimer: TNotifyEvent read FOnTimer write FOnTimer;\r\n end;\r\n\r\n TWebTimer = class(TTimer);\r\n\r\n TGeolocationEvent = procedure(Sender: TObject; Lat,Lon,Alt:double) of object;\r\n TGeolocationExEvent = procedure(Sender: TObject; Lat,Lon,Alt,Accuracy:double) of object;\r\n TGeolocationErrorEvent = procedure(Sender: TObject; ACode: integer; AMessage: string) of object;\r\n\r\n TGeolocationResponseProc = reference to procedure(APosition: TJSPosition);\r\n\r\n TGeoLocation = class(TComponent)\r\n private\r\n FOnGeolocation: TGeolocationEvent;\r\n FWidth: integer;\r\n FHeight: integer;\r\n FMaximumAge: integer;\r\n FTimeOut: integer;\r\n FHighPrecision: boolean;\r\n FTrackID: integer;\r\n FOnGeolocationUpdate: TGeolocationEvent;\r\n FOnGeolocationEx: TGeolocationExEvent;\r\n FOnGeolocationError: TGeolocationErrorEvent;\r\n FOnGeolocationUpdateEx: TGeolocationExEvent;\r\n protected\r\n procedure DoHandleGeolocation(APosition: TJSPosition);\r\n procedure DoHandleError(AValue : TJSPositionError);\r\n procedure DoHandleGeolocationAsync(AProc: TGeolocationResponseProc);\r\n procedure DoHandleGeolocationUpdate(APosition: TJSPosition);\r\n public\r\n constructor Create(AOwner: TComponent); override;\r\n function HasGeolocation: boolean;\r\n procedure GetGeolocation;\r\n function GetGeolocationAsync: TJSPromise;\r\n property Width: integer read FWidth write FWidth;\r\n property Height: integer read FHeight write FHeight;\r\n procedure StartTracking;\r\n procedure StopTracking;\r\n published\r\n property HighPrecision: boolean read FHighPrecision write FHighPrecision default false;\r\n property TimeOut: integer read FTimeOut write FTimeOut default 60000;\r\n property MaximumAge: integer read FMaximumAge write FMaximumAge default 0;\r\n property OnGeolocation: TGeolocationEvent read FOnGeolocation write FOnGeolocation;\r\n property OnGeolocationEx: TGeolocationExEvent read FOnGeolocationEx write FOnGeolocationEx;\r\n property OnGeolocationError: TGeolocationErrorEvent read FOnGeolocationError write FOnGeolocationError;\r\n property OnGeolocationUpdate: TGeolocationEvent read FOnGeolocationUpdate write FOnGeolocationUpdate;\r\n property OnGeolocationUpdateEx: TGeolocationExEvent read FOnGeolocationUpdateEx write FOnGeolocationUpdateEx;\r\n end;\r\n\r\n TWebGeoLocation = class(TGeoLocation);\r\n\r\n TPaintBox = class(TWebGraphicControl)\r\n private\r\n FOnPaint: TNotifyEvent;\r\n protected\r\n procedure Paint; override;\r\n procedure UpdateElementVisual; override;\r\n public\r\n published\r\n property Align;\r\n property AlignWithMargins;\r\n property Anchors;\r\n property DragMode;\r\n property ElementID;\r\n property ElementFont;\r\n property ElementPosition;\r\n property Enabled;\r\n property HeightPercent;\r\n property HeightStyle;\r\n property Margins;\r\n property PopupMenu;\r\n property WidthPercent;\r\n property WidthStyle;\r\n property OnClick;\r\n property OnDblClick;\r\n property OnMouseWheel;\r\n property OnPaint: TNotifyEvent read FOnPaint write FOnPaint;\r\n property OnTouchStart;\r\n property OnTouchMove;\r\n property OnTouchEnd;\r\n property OnDragDrop;\r\n property OnDragOver;\r\n property OnEndDrag;\r\n property OnStartDrag;\r\n end;\r\n\r\n TWebPaintBox = class(TPaintBox);\r\n\r\n TImageLoadedProc = reference to procedure(AEvent: TJSEvent);\r\n TImageErrorProc = reference to procedure(AEvent: TJSEvent);\r\n\r\n\r\n TCustomImageControl = class(TWebCustomControl)\r\n private\r\n FURL: string;\r\n FPicture: TURLPicture;\r\n FAutoSize: boolean;\r\n FOnLoaded: TNotifyEvent;\r\n FOnError: THTTPErrorEvent;\r\n FImageLoadPtr: pointer;\r\n FImageErrorPtr: pointer;\r\n FImageLoaded: TImageLoadedProc;\r\n FImageError: TImageErrorProc;\r\n procedure SetURL(AURL: string);\r\n function GetBase64Img: string;\r\n protected\r\n function HandleImageLoad(AEvent: TJSEvent): boolean; virtual;\r\n function HandleError(AEvent: TJSEvent): boolean; virtual;\r\n\r\n procedure SetPicture(const Value: TURLPicture);\r\n procedure PictureChanged(Sender: TObject);\r\n procedure PictureDataChanged(Sender: TObject);\r\n function CreateElement: TJSElement; override;\r\n procedure UpdateElement; override;\r\n procedure SetContainerURL(AURL: string);\r\n property Picture: TURLPicture read FPicture write SetPicture;\r\n property URL: string read FURL write SetURL;\r\n procedure BindEvents; override;\r\n procedure UnbindEvents; override;\r\n procedure ClearMethodPointers; override;\r\n procedure GetMethodPointers; override;\r\n public\r\n procedure CreateInitialize; override;\r\n destructor Destroy; override;\r\n procedure Clear;\r\n function DataURL: string; overload;\r\n function DataURL(AWidth, AHeight: integer): string; overload;\r\n procedure ResizeImage; overload;\r\n procedure ResizeImage(AWidth, AHeight: integer); overload;\r\n procedure ResizeImage(AWidth, AHeight: integer; AspectRatio: boolean); overload;\r\n property Base64Image: string read GetBase64Img;\r\n function ImageWidth: integer;\r\n function ImageHeight: integer;\r\n procedure LoadFromArrayBuffer(AArray: TJSArrayBuffer);\r\n procedure SaveToArrayBuffer(AArray: TJSArrayBuffer);\r\n function LoadFromURL(const AURL: string): TJSPromise; overload;\r\n procedure LoadFromURL(const AURL: string; ImageLoaded: TImageLoadedProc; ImageError: TImageErrorProc); overload;\r\n published\r\n property Align;\r\n property AlignWithMargins;\r\n property Anchors;\r\n property AutoSize: boolean read FAutoSize write FAutoSize default false;\r\n property Center;\r\n property ChildOrder;\r\n property DragMode;\r\n property ElementClassName;\r\n property ElementFont;\r\n property ElementID;\r\n property ElementPosition;\r\n property HeightPercent;\r\n property HeightStyle;\r\n property Margins;\r\n property PopupMenu;\r\n property ShowHint;\r\n property WidthPercent;\r\n property WidthStyle;\r\n property OnClick;\r\n property OnDblClick;\r\n property OnError: THTTPErrorEvent read FOnError write FOnError;\r\n property OnLoaded: TNotifyEvent read FOnLoaded write FOnLoaded;\r\n property OnDragDrop;\r\n property OnDragOver;\r\n property OnEndDrag;\r\n property OnStartDrag;\r\n end;\r\n\r\n TImageControl = class(TCustomImageControl)\r\n published\r\n property Picture;\r\n property URL;\r\n end;\r\n\r\n TWebImageControl = class(TImageControl);\r\n\r\n TImageZoomControl = class;\r\n\r\n TImageZoomAppearance = class(TPersistent)\r\n private\r\n FOwner: TImageZoomControl;\r\n FHeightPercent: Integer;\r\n FWidthPercent: Integer;\r\n FResponsiveHeightPercent: Integer;\r\n FResponsiveWidthPercent: Integer;\r\n FResponsiveMaxWidth: Integer;\r\n procedure SetHeightPercent(const Value: Integer);\r\n procedure SetWidthPercent(const Value: Integer);\r\n procedure SetResponsiveHeightPercent(const Value: Integer);\r\n procedure SetResponsiveWidthPercent(const Value: Integer);\r\n procedure SetResponsiveMaxWidth(const Value: Integer);\r\n public\r\n constructor Create(AOwner: TImageZoomControl); overload;\r\n destructor Destroy; override;\r\n procedure Assign(Source: TPersistent); override;\r\n function GetOwner: TPersistent; override;\r\n published\r\n property HeightPercent: Integer read FHeightPercent write SetHeightPercent default 100;\r\n property WidthPercent: Integer read FWidthPercent write SetWidthPercent default 100;\r\n property ResponsiveHeightPercent: Integer read FResponsiveHeightPercent write SetResponsiveHeightPercent default 100;\r\n property ResponsiveWidthPercent: Integer read FResponsiveWidthPercent write SetResponsiveWidthPercent default 100;\r\n property ResponsiveMaxWidth: Integer read FResponsiveMaxWidth write SetResponsiveMaxWidth default 768;\r\n end;\r\n\r\n TImageZoomControl = class(TCustomImageControl)\r\n private\r\n FStyle: TJSElement;\r\n FOverlay: TJSElement;\r\n FPictureZoom: TURLPicture;\r\n FURLZoom: string;\r\n FPictureZoomDataURL: string;\r\n FAppearance: TImageZoomAppearance;\r\n FZoomBkgOpacity: single;\r\n FZoomBkgColor: TColor;\r\n procedure SetPictureZoom(const Value: TURLPicture);\r\n procedure SetURLZoom(const Value: string);\r\n protected\r\n procedure PictureZoomChanged(Sender: TObject);\r\n procedure PictureZoomDataChanged(Sender: TObject);\r\n procedure UpdateElement; override;\r\n public\r\n procedure CreateInitialize; override;\r\n function CreateElement: TJSElement; override;\r\n destructor Destroy; override;\r\n published\r\n property Appearance: TImageZoomAppearance read FAppearance write FAppearance;\r\n property Picture;\r\n property PopupMenu;\r\n property URL;\r\n property PictureZoom: TURLPicture read FPictureZoom write SetPictureZoom;\r\n property URLZoom: string read FURLZoom write SetURLZoom;\r\n property ZoomBkgColor: TColor read FZoomBkgColor write FZoomBkgColor default clBlack;\r\n property ZoomBkgOpacity: single read FZoomBkgOpacity write FZoomBkgOpacity;\r\n end;\r\n\r\n TWebImageZoomControl = class(TImageZoomControl);\r\n\r\n TCustomPanel = class(TWebCustomControl)\r\n private\r\n FAutoSize: Boolean;\r\n FIsSizing: Boolean;\r\n FPadding: TPadding;\r\n FShowCaption: boolean;\r\n FLabel: TJSHTMLElement;\r\n FPanelBody: TJSHTMLElement;\r\n FElementBodyClassName: TElementClassName;\r\n FAlignment: TAlignment;\r\n procedure SetShowCaption(const Value: boolean);\r\n procedure SetPadding(const Value: TPadding);\r\n procedure SetAlignment(const Value: TAlignment);\r\n protected\r\n function CreateElement: TJSElement; override;\r\n procedure SetCaption(const AValue: string); override;\r\n procedure SetBorderStyle(const AValue: TBorderStyle); override;\r\n procedure SetAutoSize(AValue: boolean);\r\n procedure UpdateElementVisual; override;\r\n property AutoSize: boolean read FAutoSize write SetAutoSize default false;\r\n property Alignment: TAlignment read FAlignment write SetAlignment default taCenter;\r\n property Padding: TPadding read FPadding write SetPadding;\r\n property ShowCaption: boolean read FShowCaption write SetShowCaption default true;\r\n function GetOuterWidth: integer; override;\r\n function GetOuterHeight: integer; override;\r\n function GetChildContainer: TJSElement; override;\r\n property ElementBodyClassName: TElementClassName read FElementBodyClassName write FElementBodyClassName;\r\n procedure RegisterParent(AValue: TControl); override;\r\n procedure UnRegisterParent(AValue: TControl); override;\r\n procedure UpdatePadding(var ARect: TRect); override;\r\n procedure DoAutoSize;\r\n procedure AlignControl(AControl: TControl); override;\r\n public\r\n procedure CreateInitialize; override;\r\n destructor Destroy; override;\r\n procedure EndUpdate; override;\r\n procedure SetBounds(X, Y, AWidth, AHeight: Integer); override;\r\n end;\r\n\r\n TPanel = class(TCustomPanel)\r\n published\r\n property Align;\r\n property Alignment;\r\n property AlignWithMargins;\r\n property Anchors;\r\n property AutoSize;\r\n property BorderColor;\r\n property BorderStyle;\r\n property Caption;\r\n property Center;\r\n property ChildOrder;\r\n property Color;\r\n property DragMode;\r\n property ElementBodyClassName;\r\n property ElementID;\r\n property ElementFont;\r\n property ElementPosition;\r\n property Font;\r\n property HeightPercent;\r\n property HeightStyle;\r\n property Margins;\r\n property Padding;\r\n property ParentFont;\r\n property PopupMenu;\r\n property Role;\r\n property ShowCaption;\r\n property TabOrder;\r\n property TabStop;\r\n property WidthPercent;\r\n property WidthStyle;\r\n property OnClick;\r\n property OnDblClick;\r\n property OnDragDrop;\r\n property OnDragOver;\r\n property OnEndDrag;\r\n property OnStartDrag;\r\n property OnTouchStart;\r\n property OnTouchMove;\r\n property OnTouchEnd;\r\n property OnTouchCancel;\r\n end;\r\n\r\n TDivPanel = class(TPanel)\r\n protected\r\n function CreateElement: TJSElement; override;\r\n end;\r\n\r\n TWebPanel = class(TPanel);\r\n\r\n TCustomGroupBox = class(TWebCustomControl)\r\n private\r\n FCaption: string;\r\n FLegend: TJSHTMLElement;\r\n FFieldSet: TJSHTMLElement;\r\n FElementLegendClassName: TElementClassName;\r\n FPadding: TPadding;\r\n procedure SetElementLegendClassName(const Value: TElementClassName);\r\n procedure SetPadding(const Value: TPadding);\r\n protected\r\n procedure UpdatePadding(var ARect: TRect); override;\r\n procedure SetFieldSetSize; virtual;\r\n procedure SetCaption(const Value: string); override;\r\n function CreateElement: TJSElement; override;\r\n procedure UpdateElementData; override;\r\n procedure UpdateElementVisual; override;\r\n procedure SetBoundsInt(X, Y, AWidth, AHeight: Integer); override;\r\n property Caption: string read FCaption write SetCaption;\r\n procedure InitCSSLibrary(ALibrary: TCSSLibrary); override;\r\n public\r\n destructor Destroy; override;\r\n procedure CreateInitialize; override;\r\n property ElementLegendClassName: TElementClassName read FElementLegendClassName write SetElementLegendClassName;\r\n property Legend: TJSHTMLElement read FLegend;\r\n property FieldSet: TJSHTMLElement read FFieldSet;\r\n property Padding: TPadding read FPadding write SetPadding;\r\n end;\r\n\r\n TGroupBox = class(TCustomGroupBox)\r\n published\r\n property Align;\r\n property AlignWithMargins;\r\n property Anchors;\r\n property BorderColor;\r\n property Caption;\r\n property Color;\r\n property DragMode;\r\n property ElementFont;\r\n property ElementID;\r\n property ElementLegendClassName;\r\n property ElementPosition;\r\n property Font;\r\n property HeightPercent;\r\n property HeightStyle;\r\n property Margins;\r\n property ParentFont;\r\n property PopupMenu;\r\n property Role;\r\n property WidthPercent;\r\n property WidthStyle;\r\n property OnDragDrop;\r\n property OnDragOver;\r\n property OnEndDrag;\r\n property OnStartDrag;\r\n property OnTouchStart;\r\n property OnTouchMove;\r\n property OnTouchEnd;\r\n property OnTouchCancel;\r\n\r\n end;\r\n\r\n TWebGroupBox = class(TGroupBox);\r\n\r\n TScrollBox = class(TCustomPanel)\r\n private\r\n FAutoScroll: boolean;\r\n FScrollBars: TScrollStyle;\r\n FScrollPtr: pointer;\r\n FOnScroll: TNotifyEvent;\r\n FVertScrollBar: TControlScrollBar;\r\n FHorzScrollBar: TControlScrollBar;\r\n function GetScrollLeft: integer;\r\n function GetScrollTop: integer;\r\n procedure SetScrollLeft(const Value: integer);\r\n procedure SetScrollTop(const Value: integer);\r\n procedure SetScrollBars(const Value: TScrollStyle);\r\n protected\r\n procedure UpdateElement; override;\r\n procedure SetAutoScroll(AValue: boolean);\r\n function GetClientRect: TRect; override;\r\n function HandleDoScroll(Event: TJSMouseEvent): Boolean; virtual;\r\n procedure DoScroll; virtual;\r\n procedure ClearMethodPointers; override;\r\n procedure GetMethodPointers; override;\r\n procedure BindEvents; override;\r\n procedure UnbindEvents; override;\r\n public\r\n procedure CreateInitialize; override;\r\n destructor Destroy; override;\r\n property ScrollLeft: integer read GetScrollLeft write SetScrollLeft;\r\n property ScrollTop: integer read GetScrollTop write SetScrollTop;\r\n procedure ScrollBy(DeltaX: integer; DeltaY: integer);\r\n procedure EndUpdate; override;\r\n property VertScrollBar: TControlScrollBar read FVertScrollBar;\r\n property HorzScrollBar: TControlScrollBar read FHorzScrollBar;\r\n published\r\n property Align;\r\n property AlignWithMargins;\r\n property Anchors;\r\n property AutoScroll: boolean read FAutoScroll write SetAutoScroll;\r\n property BorderColor;\r\n property BorderStyle;\r\n property Color;\r\n property DragMode;\r\n property ElementFont;\r\n property ElementID;\r\n property ElementPosition;\r\n property HeightPercent;\r\n property HeightStyle;\r\n property Margins;\r\n property Padding;\r\n property PopupMenu;\r\n property Role;\r\n property ScrollBars: TScrollStyle read FScrollBars write SetScrollBars;\r\n property WidthPercent;\r\n property WidthStyle;\r\n property OnClick;\r\n property OnDblClick;\r\n property OnMouseDown;\r\n property OnMouseMove;\r\n property OnMouseUp;\r\n property OnResize;\r\n property OnDragDrop;\r\n property OnDragOver;\r\n property OnEndDrag;\r\n property OnScroll: TNotifyEvent read FOnScroll write FOnScroll;\r\n property OnStartDrag;\r\n property OnTouchStart;\r\n property OnTouchMove;\r\n property OnTouchEnd;\r\n property OnTouchCancel;\r\n\r\n end;\r\n\r\n TWebScrollBox = class(TScrollBox);\r\n\r\n TSplitter = class(TCustomControl)\r\n private\r\n FLayer: TJSElement;\r\n FTouched: boolean;\r\n FFirstMove: boolean;\r\n FSplitControl: TControl;\r\n FSizing: boolean;\r\n FSizingX,FSizingY: double;\r\n FOriginalWidth,FOriginalHeight: integer;\r\n FGripColor: TColor;\r\n FOnMoved: TNotifyEvent;\r\n FOnMove: TNotifyEvent;\r\n procedure SetGripColor(const Value: TColor);\r\n protected\r\n function CreateElement: TJSElement; override;\r\n procedure UpdateElement; override;\r\n procedure UpdateElementSize; override;\r\n\r\n procedure ColorChanging; override;\r\n procedure DoSizeStart(X,Y: integer);\r\n function HandleDoTouchStart(Event: TJSTouchEvent): Boolean; override;\r\n\r\n function HandleDocDoMouseMove(Event: TJSMouseEvent): Boolean; virtual;\r\n function HandleDocDoMouseUp(Event: TJSMouseEvent): Boolean; virtual;\r\n\r\n function HandleDocDoTouchMove(Event: TJSTouchEvent): Boolean; virtual;\r\n function HandleDocDoTouchEnd(Event: TJSTouchEvent): Boolean; virtual;\r\n\r\n procedure DoMouseEnter; override;\r\n procedure MouseUp(Button: TMouseButton; Shift: TShiftState; X,Y: Integer); override;\r\n procedure MouseDown(Button: TMouseButton; Shift: TShiftState; X,Y: Integer); override;\r\n procedure Paint; override;\r\n public\r\n procedure CreateInitialize; override;\r\n published\r\n property Align;\r\n property AlignWithMargins;\r\n property Color;\r\n property HeightPercent;\r\n property HeightStyle;\r\n property ElementFont;\r\n property ElementID;\r\n property ElementPosition;\r\n property GripColor: TColor read FGripColor write SetGripColor default clWhite;\r\n property Margins;\r\n property WidthPercent;\r\n property WidthStyle;\r\n property OnClick;\r\n property OnTouchStart;\r\n property OnTouchMove;\r\n property OnTouchEnd;\r\n property OnTouchCancel;\r\n property OnMove: TNotifyEvent read FOnMove write FOnMove;\r\n property OnMoved: TNotifyEvent read FOnMoved write FOnMoved;\r\n end;\r\n\r\n TWebSplitter = class(TSplitter);\r\n\r\n TVerticalAlignment = (vaTop, vaCenter, vaBottom);\r\n TGridPanelExpandStyle = (esAddRows, esAddColumns);\r\n\r\n TGridPanelRow = class(TCollectionItem)\r\n private\r\n FSizeStyle: TSizeStyle;\r\n FValue: integer;\r\n FMarginBottom: integer;\r\n FMarginTop: integer;\r\n FAlignment: TVerticalAlignment;\r\n FElementClassName: string;\r\n procedure SetMarginBottom(const Value: integer);\r\n procedure SetMarginTop(const Value: integer);\r\n procedure SetSizeStyle(const Value: TSizeStyle);\r\n procedure SetValue(const Value: integer);\r\n protected\r\n function HeightAttribute: string;\r\n public\r\n constructor Create(ACollection: TCollection); override;\r\n procedure Assign(Source: TPersistent); override;\r\n published\r\n property Alignment: TVerticalAlignment read FAlignment write FAlignment default vaTop;\r\n property ElementClassName: string read FElementClassName write FElementClassName;\r\n property MarginTop: integer read FMarginTop write SetMarginTop;\r\n property MarginBottom: integer read FMarginBottom write SetMarginBottom;\r\n property SizeStyle: TSizeStyle read FSizeStyle write SetSizeStyle;\r\n property Value: integer read FValue write SetValue;\r\n end;\r\n\r\n TGridPanelRows = class(TOwnedCollection)\r\n private\r\n FOnChange: TNotifyEvent;\r\n function GetItem(Index: integer): TGridPanelRow; reintroduce;\r\n procedure SetItem(Index: integer; const Value: TGridPanelRow); reintroduce;\r\n protected\r\n procedure Update(Item: TCollectionItem); override;\r\n public\r\n constructor Create(AOwner: TComponent); reintroduce;\r\n function Add: TGridPanelRow; reintroduce;\r\n function Insert(Index: integer): TGridPanelRow; reintroduce;\r\n property Items[Index: integer]: TGridPanelRow read GetItem write SetItem; default;\r\n property OnChange: TNotifyEvent read FOnChange write FOnChange;\r\n end;\r\n\r\n TGridPanelColumn = class(TCollectionItem)\r\n private\r\n FSizeStyle: TSizeStyle;\r\n FValue: integer;\r\n FMarginLeft: integer;\r\n FAlignment: TAlignment;\r\n FMarginRight: integer;\r\n FElementClassName: string;\r\n procedure SetMarginLeft(const Value: integer);\r\n procedure SetMarginRight(const Value: integer);\r\n procedure SetSizeStyle(const Value: TSizeStyle);\r\n procedure SetValue(const Value: integer);\r\n protected\r\n function WidthAttribute: string;\r\n public\r\n constructor Create(ACollection: TCollection); override;\r\n procedure Assign(Source: TPersistent); override;\r\n published\r\n property Alignment: TAlignment read FAlignment write FAlignment default taLeftJustify;\r\n property ElementClassName: string read FElementClassName write FElementClassName;\r\n property MarginLeft: integer read FMarginLeft write SetMarginLeft default 0;\r\n property MarginRight: integer read FMarginRight write SetMarginRight default 0;\r\n property SizeStyle: TSizeStyle read FSizeStyle write SetSizeStyle default ssPercent;\r\n property Value: integer read FValue write SetValue;\r\n end;\r\n\r\n TGridPanelColumns = class(TOwnedCollection)\r\n private\r\n FOnChange: TNotifyEvent;\r\n function GetItem(Index: integer): TGridPanelColumn; reintroduce;\r\n procedure SetItem(Index: integer; const Value: TGridPanelColumn); reintroduce;\r\n protected\r\n procedure Update(Item: TCollectionItem); override;\r\n public\r\n constructor Create(AOwner: TComponent); reintroduce;\r\n function Add: TGridPanelColumn; reintroduce;\r\n function Insert(Index: integer): TGridPanelColumn; reintroduce;\r\n property Items[Index: integer]: TGridPanelColumn read GetItem write SetItem; default;\r\n property OnChange: TNotifyEvent read FOnChange write FOnChange;\r\n end;\r\n\r\n TControlCollectionItem = class(TCollectionItem)\r\n private\r\n FControl: TWinControl;\r\n FRow: integer;\r\n FColumn: integer;\r\n public\r\n procedure Assign(Source: TPersistent); override;\r\n published\r\n property Column: integer read FColumn write FColumn;\r\n property Row: integer read FRow write FRow;\r\n property Control: TWinControl read FControl write FControl;\r\n end;\r\n\r\n TControlCollection = class(TOwnedCollection)\r\n private\r\n function GetItem(Index: Integer): TControlCollectionItem; reintroduce;\r\n procedure SetItem(Index: Integer; const Value: TControlCollectionItem); reintroduce;\r\n public\r\n constructor Create(AOwner: TComponent); reintroduce;\r\n function Add: TControlCollectionItem; reintroduce;\r\n function Insert(Index: Integer): TControlCollectionItem; reintroduce;\r\n property Items[Index: Integer]: TControlCollectionItem read GetItem write SetItem;\r\n function FindItem(AControl: TWinControl): TControlCollectionItem;\r\n function GetItemAtCell(ACol,ARow: integer): TControlCollectionItem;\r\n end;\r\n\r\n TGridPanel = class(TWebCustomControl)\r\n private\r\n FDesignTime: boolean;\r\n FUpdateTable: boolean;\r\n FColCount: integer;\r\n FRowCollection: TGridPanelRows;\r\n FColumnCollection: TGridPanelColumns;\r\n FControlCollection: TControlCollection;\r\n FGridLineWidth: integer;\r\n FGridLineColor: TColor;\r\n FExpandStyle: TGridPanelExpandStyle;\r\n FTbl: TJSElement;\r\n FTblBody: TJSElement;\r\n procedure SetColumnCollection(const Value: TGridPanelColumns);\r\n procedure SetRowCollection(const Value: TGridPanelRows);\r\n procedure SetControlCollection(const Value: TControlCollection);\r\n protected\r\n function CreateTable: TJSElement; virtual;\r\n function CreateRow(AIndex: integer): TJSElement; virtual;\r\n function CreateElement: TJSElement; override;\r\n procedure AlignControl(AControl: TControl); override;\r\n procedure UpdateTable;\r\n procedure UpdateElement; override;\r\n procedure UpdateElementVisual; override;\r\n procedure RegisterParent(AValue: TControl); override;\r\n procedure TableChanged(Sender: TObject);\r\n procedure Notification(AComponent: TComponent; Operation: TOperation); override;\r\n public\r\n procedure CreateInitialize; override;\r\n destructor Destroy; override;\r\n procedure AddControl(AControl: TWinControl);\r\n procedure RemoveControl(AControl: TWinControl);\r\n procedure EndUpdate; override;\r\n published\r\n property Align;\r\n property AlignWithMargins;\r\n property Anchors;\r\n property Color;\r\n property ControlCollection: TControlCollection read FControlCollection write SetControlCollection;\r\n property ColumnCollection: TGridPanelColumns read FColumnCollection write SetColumnCollection;\r\n property DragMode;\r\n property ElementFont;\r\n property ElementID;\r\n property ElementPosition;\r\n property ExpandStyle: TGridPanelExpandStyle read FExpandStyle write FExpandStyle default esAddRows;\r\n property GridLineWidth: integer read FGridLineWidth write FGridLineWidth default 0;\r\n property GridLineColor: TColor read FGridLineColor write FGridLineColor default clBlack;\r\n property HeightPercent;\r\n property HeightStyle;\r\n property Margins;\r\n property PopupMenu;\r\n property Role;\r\n property RowCollection: TGridPanelRows read FRowCollection write SetRowCollection;\r\n property WidthPercent;\r\n property WidthStyle;\r\n property OnDragDrop;\r\n property OnDragOver;\r\n property OnEndDrag;\r\n property OnStartDrag;\r\n property OnTouchStart;\r\n property OnTouchMove;\r\n property OnTouchEnd;\r\n property OnTouchCancel;\r\n\r\n end;\r\n\r\n TWebGridPanel = class(TGridPanel);\r\n\r\n TMultiMediaType = (mtVideo, mtAudio);\r\n\r\n TMultiMediaControl = (mcFullscreen, mcDownload, mcRemoteplayback, mcPlaybackrate, mcPictureInPicture);\r\n TMultiMediaControls = set of TMultiMediaControl;\r\n\r\n // nofullscreen nodownload noremoteplayback noplaybackrate\r\n\r\n TMultiMediaVolume = 0..100;\r\n\r\n TMultiMediaPreload = (mpAuto, mpNone, mpMetadata);\r\n\r\n TMultimediaPlayer = class(TCustomControl)\r\n private\r\n FURL: string;\r\n FMultimediaType: TMultimediaType;\r\n FAutoPlay: boolean;\r\n FControls: boolean;\r\n FMuted: boolean;\r\n FLoop: boolean;\r\n FVolume: TMultiMediaVolume;\r\n FPlaybackRate: double;\r\n FContextMenu: boolean;\r\n FPoster: string;\r\n FHideControls: TMultiMediaControls;\r\n FPreload: TMultiMediaPreload;\r\n procedure SetAutoPlay(const Value: boolean);\r\n procedure SetControls(const Value: boolean);\r\n procedure SetMuted(const Value: boolean);\r\n procedure SetLoop(const Value: boolean);\r\n procedure SetURL(const Value: string);\r\n procedure SetVolume(const Value: TMultiMediaVolume);\r\n function GetCurrentTime: double;\r\n procedure SetCurrentTime(const Value: double);\r\n function GetDuration: double;\r\n function GetEnded: boolean;\r\n function GetPaused: boolean;\r\n procedure SetPlaybackRate(const Value: double);\r\n procedure SetContextMenu(const Value: boolean);\r\n procedure SetPoster(const Value: string);\r\n procedure SetHideControls(const Value: TMultiMediaControls);\r\n procedure SetPreload(const Value: TMultiMediaPreload);\r\n protected\r\n function CreateElement: TJSElement; override;\r\n procedure UpdateElement; override;\r\n public\r\n procedure CreateInitialize; override;\r\n procedure Play;\r\n procedure Pause;\r\n procedure ReLoad;\r\n property CurrentTime: double read GetCurrentTime write SetCurrentTime;\r\n property Duration: double read GetDuration;\r\n property Ended: boolean read GetEnded;\r\n property Paused: boolean read GetPaused;\r\n published\r\n property AlignWithMargins;\r\n property AutoPlay: boolean read FAutoPlay write SetAutoPlay;\r\n property Controls: boolean read FControls write SetControls;\r\n property ContextMenu: boolean read FContextMenu write SetContextMenu default true;\r\n property HideControls: TMultiMediaControls read FHideControls write SetHideControls;\r\n property HeightPercent;\r\n property HeightStyle;\r\n property Loop: boolean read FLoop write SetLoop;\r\n property Margins;\r\n property MultimediaType: TMultimediaType read FMultiMediaType write FMultiMediaType;\r\n property Muted: boolean read FMuted write SetMuted;\r\n property PlaybackRate: double read FPlaybackRate write SetPlaybackRate;\r\n property Poster: string read FPoster write SetPoster;\r\n property Preload: TMultiMediaPreload read FPreload write SetPreload;\r\n property URL: string read FURL write SetURL;\r\n property Volume: TMultiMediaVolume read FVolume write SetVolume;\r\n property WidthPercent;\r\n property WidthStyle;\r\n// property OnContextMenu;\r\n property OnMouseDown;\r\n property OnMouseUp;\r\n property OnMouseMove;\r\n end;\r\n\r\n TWebMultiMediaPlayer = class(TMultiMediaPlayer);\r\n\r\n THTMLContainer = class(TCustomControl)\r\n private\r\n FHTML: TStringList;\r\n FScrollStyle: TScrollStyle;\r\n FURL: string;\r\n FOnLoaded: TNotifyEvent;\r\n procedure SetHTML(const Value: TStringList);\r\n procedure SetURL(const Value: string);\r\n protected\r\n function CreateElement: TJSElement; override;\r\n procedure UpdateElement; override;\r\n procedure HTMLChanged(Sender: TObject); virtual;\r\n procedure DoLoaded; virtual;\r\n public\r\n procedure CreateInitialize; override;\r\n destructor Destroy; override;\r\n function LoadFromURL(AURL: string): TJSPromise;\r\n published\r\n property Align;\r\n property AlignWithMargins;\r\n property Anchors;\r\n property DragMode;\r\n property ElementFont;\r\n property ElementID;\r\n property ElementPosition;\r\n property Font;\r\n property HeightPercent;\r\n property HeightStyle;\r\n property HTML: TStringList read FHTML write SetHTML;\r\n property Margins;\r\n property ParentFont;\r\n property Role;\r\n property ScrollStyle: TScrollStyle read FScrollStyle write FScrollStyle;\r\n property URL: string read FURL write SetURL;\r\n property WidthPercent;\r\n property WidthStyle;\r\n property OnClick;\r\n property OnDblClick;\r\n property OnLoaded: TNotifyEvent read FOnLoaded write FOnLoaded;\r\n property OnMouseDown;\r\n property OnMouseMove;\r\n property OnMouseUp;\r\n property OnMouseLeave;\r\n property OnMouseEnter;\r\n property OnTouchEnd;\r\n property OnTouchCancel;\r\n property OnTouchStart;\r\n property OnTouchMove;\r\n property OnDragDrop;\r\n property OnDragOver;\r\n property OnEndDrag;\r\n property OnStartDrag;\r\n end;\r\n\r\n TWebHTMLContainer = class(THTMLContainer);\r\n\r\n THTMLForm = class(TCustomControl)\r\n private\r\n FOnSubmit: TNotifyEvent;\r\n FAction: string;\r\n procedure SetAction(const Value: string);\r\n protected\r\n procedure UpdateElement; override;\r\n function CreateElement: TJSElement; override;\r\n function DoHandleSubmit(Event: TJSEvent): boolean; virtual;\r\n function GetChildContainer: TJSElement; override;\r\n procedure BindEvents; override;\r\n public\r\n function CheckValidity: boolean;\r\n procedure CreateInitialize; override;\r\n published\r\n property Action: string read FAction write SetAction;\r\n property Align;\r\n property Anchors;\r\n property ElementPosition;\r\n property ElementFont;\r\n property ElementID;\r\n property Font;\r\n property HeightPercent;\r\n property HeightStyle;\r\n property Role;\r\n property WidthPercent;\r\n property WidthStyle;\r\n property OnSubmit: TNotifyEvent read FOnSubmit write FOnSubmit;\r\n end;\r\n\r\n TWebHTMLForm = class(THTMLForm);\r\n\r\n TBadge = class(TCustomControl)\r\n private\r\n FTextColor: TColor;\r\n FText: string;\r\n procedure SetTextColor(const Value: TColor);\r\n procedure SetText(const Value: string);\r\n protected\r\n function CreateElement: TJSElement; override;\r\n procedure UpdateElement; override;\r\n procedure SetElementClassName(AValue: string); override;\r\n public\r\n procedure CreateInitialize; override;\r\n destructor Destroy; override;\r\n published\r\n property Align;\r\n property AlignWithMargins;\r\n property Anchors;\r\n property Color default clRed;\r\n property ElementFont;\r\n property ElementID;\r\n property ElementPosition;\r\n property HeightPercent;\r\n property HeightStyle;\r\n property Margins;\r\n property Role;\r\n property Text: string read FText write SetText;\r\n property TextColor: TColor read FTextColor write SetTextColor;\r\n property WidthPercent;\r\n property WidthStyle;\r\n property OnClick;\r\n property OnDblClick;\r\n property OnMouseDown;\r\n property OnMouseUp;\r\n property OnMouseMove;\r\n end;\r\n\r\n\r\n TWebBadge = class(TBadge);\r\n\r\n TAccordionSection = class(TCollectionItem)\r\n private\r\n FCaption: string;\r\n FContent: string;\r\n FTag: integer;\r\n FExpanded: boolean;\r\n FControl: TWebCustomControl;\r\n procedure SetExpanded(const Value: boolean);\r\n procedure SetCaption(const Value: string);\r\n procedure SetContent(const Value: string);\r\n public\r\n procedure Assign(Source: TPersistent); override;\r\n property Expanded: boolean read FExpanded write SetExpanded;\r\n function CaptionElement: TJSHTMLElement;\r\n function PanelElement: TJSHTMLElement;\r\n property Control: TWebCustomControl read FControl write FControl;\r\n published\r\n property Caption: string read FCaption write SetCaption;\r\n property Content: string read FContent write SetContent;\r\n property Tag: integer read FTag write FTag;\r\n end;\r\n\r\n TAccordionSections = class(TOwnedCollection)\r\n private\r\n FOnChange: TNotifyEvent;\r\n function GetItem(Index: integer): TAccordionSection; reintroduce;\r\n procedure SetItem(Index: integer; const Value: TAccordionSection);\r\n protected\r\n procedure Update(Item: TCollectionItem); override;\r\n public\r\n constructor Create(AOwner: TComponent); overload;\r\n function Add: TAccordionSection; reintroduce;\r\n function Insert(Index: integer): TAccordionSection; reintroduce;\r\n property Items[Index: integer]: TAccordionSection read GetItem write SetItem; default;\r\n property OnChange: TNotifyEvent read FOnChange write FOnChange;\r\n end;\r\n\r\n TAccordionSectionEvent = procedure(Sender: TObject; ASection: TAccordionSection) of object;\r\n TAccordionSectionAllowEvent = procedure(Sender: TObject; ASection: TAccordionSection; var Allow: boolean) of object;\r\n\r\n TAccordionSectionRenderEvent = procedure(Sender: TObject; ASection: TAccordionSection; ACaption, APanel: TJSHTMLElementRecord) of object;\r\n\r\n TAccordion = class(TCustomControl)\r\n private\r\n FStyleRendered: boolean;\r\n FSections: TAccordionSections;\r\n FOnCollapsing: TAccordionSectionAllowEvent;\r\n FOnExpanding: TAccordionSectionAllowEvent;\r\n FOnCollapsed: TAccordionSectionEvent;\r\n FOnExpanded: TAccordionSectionEvent;\r\n FOnRenderSection: TAccordionSectionRenderEvent;\r\n FElementSectionClassName: TElementClassName;\r\n FElementContentClassName: TElementClassName;\r\n procedure SetSections(const Value: TAccordionSections);\r\n protected\r\n function CreateElement: TJSElement; override;\r\n procedure UpdateElement; override;\r\n procedure RenderAccordion;\r\n procedure RenderStyle;\r\n procedure SectionsChanged(Sender: TObject); virtual;\r\n function DoAccordionClick(Event: TJSEvent): Boolean; virtual;\r\n procedure UpdateElementVisual; override;\r\n procedure Expand(ASection: TAccordionSection);\r\n procedure Collapse(ASection: TAccordionSection);\r\n procedure SetElementClassName(AValue: string); override;\r\n procedure Loaded; override;\r\n public\r\n procedure CreateInitialize; override;\r\n destructor Destroy; override;\r\n procedure EndUpdate; override;\r\n published\r\n property Align;\r\n property AlignWithMargins;\r\n property Anchors;\r\n property Margins;\r\n property HeightPercent;\r\n property HeightStyle;\r\n property ElementSectionClassName: TElementClassName read FElementSectionClassName write FElementSectionClassName;\r\n property ElementContentClassName: TElementClassName read FElementContentClassName write FElementContentClassName;\r\n property ElementClassName;\r\n property ElementID;\r\n property ElementFont;\r\n property ElementPosition;\r\n property Role;\r\n property Sections: TAccordionSections read FSections write SetSections;\r\n property WidthPercent;\r\n property WidthStyle;\r\n property OnCollapsed: TAccordionSectionEvent read FOnCollapsed write FOnCollapsed;\r\n property OnCollapsing: TAccordionSectionAllowEvent read FOnCollapsing write FOnCollapsing;\r\n property OnExpanded: TAccordionSectionEvent read FOnExpanded write FOnExpanded;\r\n property OnExpanding: TAccordionSectionAllowEvent read FOnExpanding write FOnExpanding;\r\n property OnRenderSection: TAccordionSectionRenderEvent read FOnRenderSection write FOnRenderSection;\r\n\r\n property OnTouchStart;\r\n property OnTouchMove;\r\n property OnTouchEnd;\r\n property OnTouchCancel;\r\n end;\r\n\r\n TWebAccordion = class(TAccordion);\r\n\r\n\r\n TGridStyle = (gTemplateColumns, gTemplateRows);\r\n\r\n TResponsiveLayoutItem = class(TCollectionItem)\r\n private\r\n FWidth: integer;\r\n FStyleType: TGridStyle;\r\n FStyle: string;\r\n FColumnGap: string;\r\n FRowGap: string;\r\n FTag: integer;\r\n FDescription: string;\r\n FMargins: TMargins;\r\n procedure SetMargins(const Value: TMargins);\r\n procedure SetColumnGap(const Value: string);\r\n procedure SetRowGap(const Value: string);\r\n procedure SetStyle(const Value: string);\r\n procedure SetStyleType(const Value: TGridStyle);\r\n procedure SetWidth(const Value: integer);\r\n public\r\n constructor Create(AOwner: TCollection); override;\r\n destructor Destroy; override;\r\n procedure Assign(Source: TPersistent); override;\r\n published\r\n property ColumnGap: string read FColumnGap write SetColumnGap;\r\n property Description: string read FDescription write FDescription;\r\n property Margins: TMargins read FMargins write SetMargins;\r\n property RowGap: string read FRowGap write SetRowGap;\r\n property StyleType: TGridStyle read FStyleType write SetStyleType;\r\n property Style: string read FStyle write SetStyle;\r\n property Tag: integer read FTag write FTag;\r\n property Width: integer read FWidth write SetWidth;\r\n end;\r\n\r\n TResponsiveLayout = class(TOwnedCollection)\r\n private\r\n FOnChange: TNotifyEvent;\r\n function GetItem(Index: integer): TResponsiveLayoutItem; reintroduce;\r\n procedure SetItem(Index: integer; const Value: TResponsiveLayoutItem);\r\n protected\r\n procedure Update(Item: TCollectionItem); override;\r\n public\r\n function GetLayoutForWidth(w: integer): TResponsiveLayoutItem;\r\n constructor Create(AOwner: TComponent); reintroduce;\r\n function Add(AWidth: integer; AStyle: string): TResponsiveLayoutItem; overload; reintroduce;\r\n function Add: TResponsiveLayoutItem; overload; reintroduce;\r\n function Insert(Index: integer): TResponsiveLayoutItem; reintroduce;\r\n property Items[Index: integer]: TResponsiveLayoutItem read GetItem write SetItem;\r\n property OnChange: TNotifyEvent read FOnChange write FOnChange;\r\n end;\r\n\r\n //https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Grid_Layout\r\n\r\n TResponsiveLayoutChangeEvent = procedure(Sender: TObject; ALayout: TResponsiveLayoutItem) of object;\r\n\r\n TResponsiveGridPanel = class(TCustomControl)\r\n private\r\n FDesignTime: boolean;\r\n FLabel: TJSHTMLElement;\r\n FLayout: TResponsiveLayout;\r\n FActiveLayoutItem: TResponsiveLayoutItem;\r\n FOldWidth: integer;\r\n FControlCollection: TControlCollection;\r\n FOnLayoutChange: TResponsiveLayoutChangeEvent;\r\n FResizePtr: pointer;\r\n procedure SetControlCollection(const Value: TControlCollection);\r\n function HandleResize(Event: TEventListenerEvent): boolean; virtual;\r\n procedure SetResponsiveStyle;\r\n protected\r\n procedure BindEvents; override;\r\n procedure UnbindEvents; override;\r\n procedure UpdateControls;\r\n function CreateElement: TJSElement; override;\r\n function GridElementCount: integer;\r\n procedure UpdateElement; override;\r\n procedure Loaded; override;\r\n procedure RegisterParent(AValue: TControl); override;\r\n procedure Notification(AComponent: TComponent; Operation: TOperation); override;\r\n procedure LayoutChanged(Sender: TObject);\r\n public\r\n constructor Create(AOwner: TComponent); overload; override;\r\n destructor Destroy; override;\r\n procedure CreateInitialize; override;\r\n procedure AlignControls(AControl: TControl; var Rect: TRect); override;\r\n procedure GetChildren(Proc: TGetChildProc; Root: TComponent); override;\r\n procedure Resize; override;\r\n procedure AddControl(AControl: TWinControl);\r\n procedure RemoveControl(AControl: TWinControl);\r\n procedure RemoveControls;\r\n procedure EndUpdate; override;\r\n published\r\n property Align;\r\n property AlignWithMargins;\r\n property Anchors;\r\n property ChildOrder;\r\n property Color;\r\n property ControlCollection: TControlCollection read FControlCollection write SetControlCollection;\r\n property ElementClassName;\r\n property ElementFont;\r\n property ElementID;\r\n property ElementPosition;\r\n property HeightPercent;\r\n property HeightStyle;\r\n property Hint;\r\n property Layout: TResponsiveLayout read FLayout write FLayout;\r\n property Margins;\r\n property Role;\r\n property ShowHint;\r\n property Visible;\r\n property WidthPercent;\r\n property WidthStyle;\r\n property OnLayoutChange: TResponsiveLayoutChangeEvent read FOnLayoutChange write FOnLayoutChange;\r\n end;\r\n\r\n TWebResponsiveGridPanel = class(TResponsiveGridPanel);\r\n\r\n TLookupValueItem = class(TCollectionItem)\r\n private\r\n FValue: string;\r\n FDisplayText: string;\r\n public\r\n\r\n published\r\n property Value: string read FValue write FValue;\r\n property DisplayText: string read FDisplayText write FDisplayText;\r\n end;\r\n\r\n TLookupValues = class(TOwnedCollection)\r\n private\r\n FOnChange: TNotifyEvent;\r\n function GetItem(Index: integer): TLookupValueItem; reintroduce;\r\n procedure SetItem(Index: integer; const Value: TLookupValueItem);\r\n protected\r\n procedure DoChange; virtual;\r\n procedure Update(Item: TCollectionItem); override;\r\n public\r\n constructor Create(AOwner: TComponent); reintroduce;\r\n procedure AddPair(AValue, ADisplayText: string);\r\n procedure InsertPair(Index: Integer; AValue, ADisplayText: string);\r\n function Add: TLookupValueItem; reintroduce;\r\n function Insert(Index: integer): TLookupValueItem; reintroduce;\r\n property Items[Index: integer]: TLookupValueItem read GetItem write SetItem; default;\r\n property OnChange: TNotifyEvent read FOnChange write FOnChange;\r\n end;\r\n\r\n TCustomLookupComboBox = class(TCustomComboBox)\r\n private\r\n FLookupValues: TLookupValues;\r\n procedure SetLookupValues(const Value: TLookupValues);\r\n function GetDisplayText: string;\r\n function GetValue: string;\r\n procedure SetDisplayText(const Value: string);\r\n protected\r\n procedure SetValue(const Value: string); virtual;\r\n procedure ValuesChanged(Sender: TObject);\r\n procedure DoUpdateList; override;\r\n procedure InitCSSLibrary(ALibrary: TCSSLibrary); override;\r\n public\r\n destructor Destroy; override;\r\n procedure CreateInitialize; override;\r\n property Value: string read GetValue write SetValue;\r\n property DisplayText: string read GetDisplayText write SetDisplayText;\r\n property LookupValues: TLookupValues read FLookupValues write SetLookupValues;\r\n published\r\n property Align;\r\n property AlignWithMargins;\r\n property Anchors;\r\n property Color;\r\n property ElementClassName;\r\n property ElementID;\r\n property ElementFont;\r\n property ElementPosition;\r\n property Enabled;\r\n property Font;\r\n property Height;\r\n property HeightPercent;\r\n property HeightStyle;\r\n property Hint;\r\n property ItemIndex;\r\n property Left;\r\n property Margins;\r\n property ParentFont;\r\n property Role;\r\n property ShowFocus;\r\n property ShowHint;\r\n property TabOrder;\r\n property TabStop;\r\n property TextDirection;\r\n property TextHint;\r\n property Top;\r\n property Visible;\r\n property Width;\r\n property WidthPercent;\r\n property WidthStyle;\r\n property OnChange;\r\n property OnClick;\r\n property OnDblClick;\r\n property OnKeyDown;\r\n property OnKeyPress;\r\n property OnKeyUp;\r\n property OnMouseDown;\r\n property OnMouseUp;\r\n property OnMouseMove;\r\n property OnMouseLeave;\r\n property OnMouseEnter;\r\n property OnEnter;\r\n property OnExit;\r\n end;\r\n\r\n TLookupComboBox = class(TCustomLookupComboBox)\r\n published\r\n property LookupValues;\r\n end;\r\n\r\n TWebLookupComboBox = class(TLookupComboBox);\r\n\r\n TCustomListBox = class(TWebCustomControl)\r\n private\r\n FItems: TStrings;\r\n FItemIndex: integer;\r\n FItemHeight: Integer;\r\n FSorted: Boolean;\r\n FOnChange: TNotifyEvent;\r\n FHandleChangePtr: pointer;\r\n FElementItemClassName: string;\r\n procedure SetItemHeight(const Value: Integer);\r\n procedure SetSorted(const Value: Boolean);\r\n function GetCount: Integer;\r\n function GetItemElement(i: Integer): TJSHTMLElement;\r\n protected\r\n function DoHandleChange(Event: TEventListenerEvent): Boolean;\r\n procedure DoItemsChange(Sender: TObject);\r\n procedure KeyDown(var Key: Word; Shift: TShiftState); override;\r\n\r\n procedure DoUpdateList; virtual;\r\n procedure PersistinHTML; override;\r\n procedure SetItemIndex(const Value: integer); virtual;\r\n function GetItemIndex: integer; virtual;\r\n function CreateElement: TJSElement; override;\r\n procedure SetItems(AItems: TStrings);\r\n procedure Loaded; override;\r\n procedure UpdateElementData; override;\r\n procedure UpdateElementVisual; override;\r\n procedure UpdateParent; override;\r\n procedure BindEvents; override;\r\n procedure UnBindEvents; override;\r\n procedure Change; virtual;\r\n procedure EnableDrag; override;\r\n procedure DisableDrag; override;\r\n procedure ClearMethodPointers; override;\r\n procedure GetMethodPointers; override;\r\n public\r\n procedure CreateInitialize; override;\r\n destructor Destroy; override;\r\n procedure EndUpdate; override;\r\n property Sorted: Boolean read FSorted write SetSorted;\r\n property Count: Integer read GetCount;\r\n procedure AddItem(Item: string; AObject: TObject);\r\n property ItemElement[i: Integer]: TJSHTMLElement read GetItemElement;\r\n property ItemIndex: integer read GetItemIndex write SetItemIndex;\r\n procedure SetFilter(AExpression: string; CaseSensitive: boolean = false);\r\n procedure RemoveFilter;\r\n procedure Clear;\r\n // properties to publish\r\n protected\r\n property Align;\r\n property AlignWithMargins;\r\n property Anchors;\r\n property BiDiMode;\r\n property BorderStyle;\r\n property ChildOrder;\r\n property Color;\r\n property DragMode;\r\n property Font;\r\n property ElementClassName;\r\n property ElementItemClassName: string read FElementItemClassName write FElementItemClassName;\r\n property ElementID;\r\n property ElementFont;\r\n property ElementPosition;\r\n property Enabled;\r\n property Height;\r\n property HeightPercent;\r\n property HeightStyle;\r\n property Hint;\r\n property ItemHeight: Integer read FItemHeight write SetItemHeight;\r\n property Items: TStrings read FItems write SetItems;\r\n property Left;\r\n property ParentColor;\r\n property ParentFont;\r\n property PopupMenu;\r\n property Role;\r\n property ShowFocus;\r\n property ShowHint;\r\n property TabOrder;\r\n property TabStop;\r\n property TextDirection;\r\n property Top;\r\n property Visible;\r\n property Width;\r\n property WidthPercent;\r\n property WidthStyle;\r\n property OnChange: TNotifyEvent read FOnChange write FOnChange;\r\n property OnClick;\r\n property OnDblClick;\r\n property OnKeyDown;\r\n property OnKeyPress;\r\n property OnKeyUp;\r\n property OnMouseDown;\r\n property OnMouseUp;\r\n property OnMouseMove;\r\n property OnMouseLeave;\r\n property OnMouseEnter;\r\n property OnMouseWheel;\r\n\r\n property OnTouchStart;\r\n property OnTouchMove;\r\n property OnTouchEnd;\r\n property OnTouchCancel;\r\n\r\n property OnEnter;\r\n property OnExit;\r\n property OnDragDrop;\r\n property OnDragOver;\r\n property OnEndDrag;\r\n property OnStartDrag;\r\n end;\r\n\r\n TImageListBox = class(TCustomListBox)\r\n protected\r\n procedure DoUpdateList; override;\r\n published\r\n property Align;\r\n property AlignWithMargins;\r\n property Anchors;\r\n property BiDiMode;\r\n property BorderStyle;\r\n property ChildOrder;\r\n property Color;\r\n property DragMode;\r\n property Font;\r\n property ElementClassName;\r\n property ElementItemClassName;\r\n property ElementID;\r\n property ElementFont;\r\n property ElementPosition;\r\n property Enabled;\r\n property Height;\r\n property HeightPercent;\r\n property HeightStyle;\r\n property Hint;\r\n property ItemHeight;\r\n property Items;\r\n property Left;\r\n property ParentColor;\r\n property ParentFont;\r\n property PopupMenu;\r\n property Role;\r\n property ShowFocus;\r\n property ShowHint;\r\n property TabOrder;\r\n property TabStop;\r\n property Top;\r\n property Visible;\r\n property Width;\r\n property WidthPercent;\r\n property WidthStyle;\r\n property OnChange;\r\n property OnClick;\r\n property OnDblClick;\r\n property OnKeyDown;\r\n property OnKeyPress;\r\n property OnKeyUp;\r\n property OnMouseDown;\r\n property OnMouseUp;\r\n property OnMouseMove;\r\n property OnMouseLeave;\r\n property OnMouseEnter;\r\n property OnMouseWheel;\r\n property OnEnter;\r\n property OnExit;\r\n property OnDragDrop;\r\n property OnDragOver;\r\n property OnEndDrag;\r\n property OnStartDrag;\r\n end;\r\n\r\n TWebImageListBox = class(TImageListBox);\r\n\r\n\r\n TSearchEdit = class(TCustomEdit)\r\n private\r\n FSearchElement: TJSElement;\r\n FClearElement: TJSElement;\r\n FInputElement: TJSElement;\r\n FClearPtr: pointer;\r\n FSearchPtr: pointer;\r\n FOnSearchClick: TNotifyEvent;\r\n FOnClearClick: TNotifyEvent;\r\n FClearImageURL: string;\r\n FSearchImageURL: string;\r\n procedure SetClearImageURL(const Value: string);\r\n procedure SetSearchImageURL(const Value: string);\r\n protected\r\n function GetElementBindHandle: TJSEventTarget; override;\r\n function GetElementInputHandle: TJSHTMLInputElement; override;\r\n procedure UpdateElementVisual; override;\r\n procedure CreateChildElements(AContainer: TJSElement); override;\r\n procedure BindEvents; override;\r\n function HandleDoClear(Event: TJSEvent): Boolean; virtual;\r\n function HandleDoSearch(Event: TJSEvent): Boolean; virtual;\r\n function CreateElement: TJSElement; override;\r\n procedure UpdateElement; override;\r\n procedure SetEnabled(Value: Boolean); override;\r\n procedure ClearMethodPointers; override;\r\n procedure GetMethodPointers; override;\r\n public\r\n property SearchImageURL: string read FSearchImageURL write SetSearchImageURL;\r\n property ClearImageURL: string read FClearImageURL write SetClearImageURL;\r\n published\r\n property Alignment;\r\n property AutoCompletion;\r\n property AutoSelect;\r\n property AutoFocus;\r\n property AutoSize;\r\n property BorderStyle;\r\n property CharCase;\r\n property Color;\r\n property Font;\r\n property HideSelection;\r\n property MaxLength;\r\n property PasswordChar;\r\n property Pattern;\r\n property ReadOnly;\r\n property Required;\r\n property RequiredText;\r\n property TextHint;\r\n procedure SetFocus; override;\r\n property Text;\r\n property OnChange;\r\n property OnClick;\r\n property OnDblClick;\r\n property OnKeyDown;\r\n property OnKeyPress;\r\n property OnKeyUp;\r\n property OnMouseDown;\r\n property OnMouseUp;\r\n property OnMouseMove;\r\n property OnMouseLeave;\r\n property OnMouseEnter;\r\n property OnEnter;\r\n property OnExit;\r\n property OnDragDrop;\r\n property OnDragOver;\r\n property OnEndDrag;\r\n property OnStartDrag;\r\n property OnClearClick: TNotifyEvent read FOnClearClick write FOnClearClick;\r\n property OnSearchClick: TNotifyEvent read FOnSearchClick write FOnSearchClick;\r\n end;\r\n\r\n TWebSearchEdit = class(TSearchEdit)\r\n published\r\n property Alignment;\r\n property Align;\r\n property AlignWithMargins;\r\n property Anchors;\r\n property AutoCompletion;\r\n property AutoFocus;\r\n property AutoSize;\r\n property AutoSelect;\r\n property BiDiMode;\r\n property BorderStyle;\r\n property CharCase;\r\n property ChildOrder;\r\n property ClearImageURL;\r\n property Color;\r\n property DragMode;\r\n property EditType;\r\n property ElementClassName;\r\n property ElementID;\r\n property ElementFont;\r\n property ElementPosition;\r\n property Enabled;\r\n property Font;\r\n property Height;\r\n property HeightPercent;\r\n property HeightStyle;\r\n property Hint;\r\n property HideSelection;\r\n property Left;\r\n property ParentFont;\r\n property PasswordChar;\r\n property Pattern;\r\n property Margins;\r\n property MaxLength;\r\n property PopupMenu;\r\n property ReadOnly;\r\n property Required;\r\n property SearchImageURL;\r\n property ShowFocus;\r\n property ShowHint;\r\n property SpellCheck;\r\n property TabOrder;\r\n property TabStop;\r\n property Text;\r\n property TextDirection;\r\n property TextHint;\r\n property Top;\r\n property Visible;\r\n property Width;\r\n property WidthPercent;\r\n property WidthStyle;\r\n property OnChange;\r\n property OnClick;\r\n property OnDblClick;\r\n property OnKeyDown;\r\n property OnKeyPress;\r\n property OnKeyUp;\r\n property OnMouseDown;\r\n property OnMouseUp;\r\n property OnMouseMove;\r\n property OnMouseLeave;\r\n property OnMouseEnter;\r\n property OnEnter;\r\n property OnExit;\r\n property OnDragDrop;\r\n property OnDragOver;\r\n property OnEndDrag;\r\n property OnStartDrag;\r\n property OnClearClick;\r\n property OnSearchClick;\r\n end;\r\n\r\n\r\n TEditButton = class(TPersistent)\r\n private\r\n FMaterialGlyph: TMaterialGlyph;\r\n FWidth: integer;\r\n FMaterialGlyphColor: TColor;\r\n FCaption: string;\r\n FMaterialGlyphType: TMaterialGlyphType;\r\n FMaterialGlyphSize: integer;\r\n FOnChange: TNotifyEvent;\r\n procedure SetMaterialGlyph(const Value: TMaterialGlyph);\r\n procedure SetMaterialGlyphSize(const Value: integer);\r\n procedure SetMaterialGlyphType(const Value: TMaterialGlyphType);\r\n procedure SetMaterialGyphColor(const Value: TColor);\r\n procedure SetCaption(const Value: string);\r\n procedure SetWidth(const Value: integer);\r\n protected\r\n procedure Changed;\r\n public\r\n constructor Create;\r\n procedure Assign(Source: TPersistent); override;\r\n property OnChange: TNotifyEvent read FOnChange write FOnChange;\r\n published\r\n property Caption: string read FCaption write SetCaption;\r\n property MaterialGlyph: TMaterialGlyph read FMaterialGlyph write SetMaterialGlyph;\r\n property MaterialGlyphColor: TColor read FMaterialGlyphColor write SetMaterialGyphColor default clNone;\r\n property MaterialGlyphSize: integer read FMaterialGlyphSize write SetMaterialGlyphSize default 18;\r\n property MaterialGlyphType: TMaterialGlyphType read FMaterialGlyphType write SetMaterialGlyphType default mgNormal;\r\n property Width: integer read FWidth write SetWidth default 24;\r\n end;\r\n\r\n\r\n TEditBtn = class(TCustomEdit)\r\n private\r\n FBtnElement: TJSElement;\r\n FInputElement: TJSElement;\r\n FBtnClickPtr: pointer;\r\n FOnBtnClick: TNotifyEvent;\r\n FButton: TEditButton;\r\n FElementInputClassName: TElementClassName;\r\n FElementButtonClassName: TElementClassName;\r\n procedure SetButton(const Value: TEditButton);\r\n procedure SetElementInputClassName(const Value: TElementClassName);\r\n procedure SetElementButtonClassName(const Value: TElementClassName);\r\n protected\r\n function HandleDoBtnClick(Event: TJSEvent): Boolean; virtual;\r\n\r\n function GetElementBindHandle: TJSEventTarget; override;\r\n function GetElementInputHandle: TJSHTMLInputElement; override;\r\n\r\n function CreateElement: TJSElement; override;\r\n procedure UpdateElement; override;\r\n procedure ClearMethodPointers; override;\r\n procedure GetMethodPointers; override;\r\n procedure BindEvents; override;\r\n procedure ButtonChanged(Sender: TObject);\r\n procedure InitCSSLibrary(ALibrary: TCSSLibrary); override;\r\n public\r\n constructor Create(AOwner: TComponent); override;\r\n destructor Destroy; override;\r\n property Alignment;\r\n property AutoCompletion;\r\n property AutoSelect;\r\n property AutoFocus;\r\n property AutoSize;\r\n property BorderStyle;\r\n property CharCase;\r\n property Color;\r\n property Font;\r\n property HideSelection;\r\n property MaxLength;\r\n property ReadOnly;\r\n property PasswordChar;\r\n property Pattern;\r\n property TextHint;\r\n property Button: TEditButton read FButton write SetButton;\r\n property ElementButtonClassName: TElementClassName read FElementButtonClassName write SetElementButtonClassName;\r\n property ElementInputClassName: TElementClassName read FElementInputClassName write SetElementInputClassName;\r\n property Required;\r\n property RequiredText;\r\n property Text;\r\n property OnBtnClick: TNotifyEvent read FOnBtnClick write FOnBtnClick;\r\n end;\r\n\r\n TWebEditBtn = class(TEditBtn)\r\n published\r\n property Alignment;\r\n property Align;\r\n property AlignWithMargins;\r\n property Anchors;\r\n property AutoCompletion;\r\n property AutoFocus;\r\n property AutoSize;\r\n property AutoSelect;\r\n property BiDiMode;\r\n property BorderStyle;\r\n property Button;\r\n property CharCase;\r\n property ChildOrder;\r\n property Color;\r\n property DragMode;\r\n property EditType;\r\n property ElementClassName;\r\n property ElementID;\r\n property ElementFont;\r\n property ElementPosition;\r\n property Enabled;\r\n property Font;\r\n property Height;\r\n property HeightPercent;\r\n property HeightStyle;\r\n property Hint;\r\n property HideSelection;\r\n property Left;\r\n property ParentFont;\r\n property PasswordChar;\r\n property Pattern;\r\n property Margins;\r\n property MaxLength;\r\n property PopupMenu;\r\n property ReadOnly;\r\n property Required;\r\n property RequiredText;\r\n property ShowFocus;\r\n property ShowHint;\r\n property SpellCheck;\r\n property TabOrder;\r\n property TabStop;\r\n property Text;\r\n property TextDirection;\r\n property TextHint;\r\n property Top;\r\n property Visible;\r\n property Width;\r\n property WidthPercent;\r\n property WidthStyle;\r\n property OnChange;\r\n property OnClick;\r\n property OnDblClick;\r\n property OnKeyDown;\r\n property OnKeyPress;\r\n property OnKeyUp;\r\n property OnMouseDown;\r\n property OnMouseUp;\r\n property OnMouseMove;\r\n property OnMouseLeave;\r\n property OnMouseEnter;\r\n property OnEnter;\r\n property OnExit;\r\n property OnDragDrop;\r\n property OnDragOver;\r\n property OnEndDrag;\r\n property OnStartDrag;\r\n property OnBtnClick;\r\n end;\r\n\r\nimplementation\r\n\r\nuses\r\n WEBLib.Utils;\r\n\r\nconst\r\n btnclearres = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAAsTAAALEwEAmpwYAAAA70lEQVQ4jbWSzQ2CQBCFl5OROgSKgAMmHExUDia2QUSswqg9GK1COfnTjCbagm/Cw2wQFw46yZcM+5jZ+Vml/mQ2iMEcpPTt'+\r\n 'NoEWyMAdHMCaiH9jMssUvAcn0KvRHXAGu29JMgZ3DBWKdgGzqmCz7PLmAfA1PQAT+q4q2unqCcaq6LM0nz/1QcjkoabnYKgnWIBlpSq59QGeIKpoK1Vs6G0ZD9smkM2kphYClh21bUGGKD07/I4rATKTKX1P1QxRsSTZc9MaryCpE+VxyCORPbs1usfgrWp4jS'+\r\n 'lLPIINyXmWmIJ1k/5GTJbS/+j5J/YC/YEx2smgMEoAAAAASUVORK5CYII=';\r\n btnsearchres = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAAsTAAALEwEAmpwYAAABNUlEQVQ4jZWSPU7DQBCFU5ECiEBU/AgEcmXJtvxbuAo0pOAE1CAaAigViFNBOAMRFengBNCCwgH4XrQrBXntkJGePLsz782'+\r\n 'Pt9WqMc/z2mma9sEITAzk9xWr400tiqJtEsdJkjzwPfR9f0WQD4bcvyqnqfIY3OpcFMU+hHMIazaH2L1EnJ0QvFJl45/iX8dxvOXIG4LLigCEFwLdLMsO8G/qxiR2pJ24OpiYeS/AZp1AWZarynUJfElgdmaXsZsOXXy7BPSruk3keSMM7BKbjLynyhLZ9h6X'+\r\n 'bwIidw3k6W9k1KUKmW8vz/MNEt45P+rxhGG4LMw+JHaw4ySbc890MgDPWiz4sU/5T2Uudk3LJ2Y5x6quFzhvD1ZgZMm2sjr6F9kIfARBsC6RhclG4AzypzpZmIz9Aj6Qcv0OcR9YAAAAAElFTkSuQmCC';\r\n\r\n emptyimgres = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII=';\r\n\r\nvar\r\n geolocation : TJSGeoLocation; external name 'navigator.geolocation';\r\n\r\n\r\n{ TCustomLinkLabel }\r\n\r\nprocedure TCustomLinkLabel.SetCaption(const AValue: string);\r\nvar\r\n iopen, iopena, iopeni, iopenend, iopenendt, iclose: integer;\r\n scaption, shref, stext, sanchor, sid, stype, slcaption: string;\r\n anchor, span, contentelement: TJSElement;\r\nbegin\r\n inherited SetCaption(AValue);\r\n\r\n if not Assigned(Container) then\r\n Exit;\r\n\r\n contentelement := ContentHandle;\r\n\r\n if {IsLinked and} (ElementID <> '') then\r\n begin\r\n contentelement := document.getElementById(ElementID);\r\n end;\r\n\r\n if Assigned(contentelement) and Assigned(contentelement.nodeValue) then\r\n contentelement.nodeValue := '';\r\n\r\n scaption := AValue;\r\n\r\n slcaption := lowercase(scaption);\r\n\r\n if (Pos('https://', slcaption) = 1) or\r\n (Pos('http://', slcaption) = 1) then\r\n begin\r\n scaption := '' + Caption + '';\r\n\r\n if not Assigned(FOnLinkClick) then\r\n begin\r\n contentelement.innerHTML := scaption;\r\n Exit;\r\n end;\r\n end;\r\n\r\n sanchor := ' 0) or (pos(sid, scaption) > 0)) then\r\n begin\r\n contentelement.innerHTML := '';\r\n while (Pos(sanchor, scaption) > 0) or (Pos(sid, scaption) > 0) do\r\n begin\r\n //find first link in string\r\n iopena := pos(sanchor, scaption);\r\n iopeni := pos(sid, scaption);\r\n\r\n if ((iopena < iopeni) or (iopeni <= 0)) and (iopena > 0) then\r\n begin\r\n stype := '#url#';\r\n iopen := iopena + length(sanchor);\r\n end\r\n else\r\n begin\r\n stype := '#id#';\r\n iopen := iopeni + length(sid);\r\n end;\r\n\r\n iopenend := pos('\">', scaption);\r\n iopenendt := pos('\" ', scaption);\r\n if (iopenendt > 0) and (iopenendt < iopenend) then\r\n iopenend := iopenendt;\r\n\r\n iclose := pos('', scaption);\r\n shref := copy(scaption, iopen, iopenend - iopen);\r\n\r\n iopenend := pos('\">', scaption);\r\n iclose := pos('', scaption);\r\n stext := copy(scaption, iopenend + 2, iclose - (iopenend + 2));\r\n\r\n //add prefix text\r\n span := document.createElement('SPAN');\r\n span.innerHTML := copy(scaption, 0, iopen);\r\n contentelement.appendChild(span);\r\n\r\n //add link\r\n anchor := document.createElement('A');\r\n anchor['href'] := '#';\r\n anchor['id'] := stype + shref;\r\n anchor.innerHTML := stext;\r\n TJSHTMLElement(anchor).onclick := DoLinkClick;\r\n contentelement.appendChild(anchor);\r\n\r\n //remove prefix + link\r\n Delete(scaption, 1, Pos('', scaption) + 3);\r\n end;\r\n\r\n //suffix text\r\n span := document.createElement('SPAN');\r\n span.innerHTML := scaption;\r\n contentelement.appendChild(span);\r\n FDisplText := scaption;\r\n end\r\n else\r\n begin\r\n FDisplText := StringReplace(AValue, '> <', '> <', [rfReplaceAll]);\r\n\r\n if Assigned(contentElement) and Assigned(contentElement.nodeValue) then\r\n contentelement.nodeValue := FDisplText\r\n else\r\n if Assigned(contentElement) and (contentelement.childelementcount <= 1) then\r\n contentelement.innerHTML := FDisplText;\r\n end;\r\nend;\r\n\r\nprocedure TCustomLinkLabel.SetHeightPercent(const Value: TPercentSize);\r\nbegin\r\n FHeightPercent := Value;\r\nend;\r\n\r\nprocedure TCustomLinkLabel.SetHeightStyle(const Value: TSizeStyle);\r\nbegin\r\n FHeightStyle := Value;\r\nend;\r\n\r\nprocedure TCustomLinkLabel.SetTarget(const Value: TLinkTarget);\r\nbegin\r\n if (FTarget <> Value) then\r\n begin\r\n FTarget := Value;\r\n SetCaption(Caption);\r\n end;\r\nend;\r\n\r\nprocedure TCustomLinkLabel.SetWidthPercent(const Value: TPercentSize);\r\nbegin\r\n FWidthPercent := Value;\r\nend;\r\n\r\nprocedure TCustomLinkLabel.SetWidthStyle(const Value: TSizeStyle);\r\nbegin\r\n FWidthStyle := Value;\r\nend;\r\n\r\nconstructor TCustomLinkLabel.Create(AOwner: TComponent);\r\nbegin\r\n inherited;\r\n FWidthStyle := ssAbsolute;\r\n FWidthPercent := 100;\r\n FHeightStyle := ssAbsolute;\r\n FHeightPercent := 100;\r\n Transparent := true;\r\nend;\r\n\r\nfunction TCustomLinkLabel.DoLinkClick(Event: TJSMouseEvent): boolean;\r\nvar\r\n slink, stype, svalue: string;\r\n ltype: TSysLinkType;\r\nbegin\r\n svalue := event.targetElement['id'];\r\n stype := '#url#';\r\n ltype := sltURL;\r\n\r\n if not (pos(stype, svalue) > 0) then\r\n begin\r\n stype := '#id#';\r\n ltype := sltID;\r\n end;\r\n\r\n slink := StringReplace(svalue, stype, '', []);\r\n\r\n if Assigned(FOnLinkClick) then\r\n FOnLinkClick(Self, slink, ltype);\r\n\r\n Result := true;\r\nend;\r\n\r\n\r\nfunction TCustomLinkLabel.GetDisplayText: string;\r\nbegin\r\n Result := FDisplText;\r\nend;\r\n\r\nfunction TCustomLinkLabel.GetOuterHeight: integer;\r\nbegin\r\n if Align <> alNone then\r\n Result := inherited GetOuterHeight\r\n else\r\n Result := Height;\r\nend;\r\n\r\nfunction TCustomLinkLabel.GetOuterWidth: integer;\r\nbegin\r\n if Align <> alNone then\r\n Result := inherited GetOuterWidth\r\n else\r\n Result := Width;\r\nend;\r\n\r\n{ TTrackBar }\r\n\r\nfunction TTrackBar.GetElementInputHandle: TJSHTMLInputElement;\r\nbegin\r\n Result := TJSHTMLInputElement(Container);\r\nend;\r\n\r\nfunction TTrackBar.GetInputType: string;\r\nbegin\r\n Result := 'range';\r\nend;\r\n\r\nprocedure TTrackBar.Change;\r\nbegin\r\n if Assigned(OnChange) then\r\n OnChange(Self);\r\nend;\r\n\r\n{$HINTS OFF}\r\nfunction TTrackBar.DoHandleChange(Event: TEventListenerEvent): Boolean;\r\nvar\r\n el: TJSHTMLElement;\r\nbegin\r\n el := ElementHandle;\r\n asm\r\n this.FPosition = el.value;\r\n end;\r\n\r\n Change;\r\n Result := True;\r\nend;\r\n{$HINTS ON}\r\n\r\nprocedure TTrackBar.BindEvents;\r\nbegin\r\n inherited;\r\n if Assigned(ElementHandle) then\r\n begin\r\n ElementHandle.oninput := DoHandleChange;\r\n end;\r\nend;\r\n\r\nprocedure TTrackBar.CreateControl;\r\nbegin\r\n inherited;\r\n DoUpdate;\r\nend;\r\n\r\nprocedure TTrackBar.CreateInitialize;\r\nbegin\r\n inherited;\r\n FMax := 100;\r\n FMin := 0;\r\n FPosition := 0;\r\nend;\r\n\r\nprocedure TTrackBar.SetMax(AValue: integer);\r\nbegin\r\n if (FMax <> AValue) then\r\n begin\r\n FMax := AValue;\r\n DoUpdate;\r\n end;\r\nend;\r\n\r\nprocedure TTrackBar.SetMin(AValue: integer);\r\nbegin\r\n if (FMin <> AValue) then\r\n begin\r\n FMin := AValue;\r\n DoUpdate;\r\n end;\r\nend;\r\n\r\nprocedure TTrackBar.SetOrientation(const Value: TTrackBarOrientation);\r\nvar\r\n ow, oh: integer;\r\nbegin\r\n if (FOrientation <> Value) then\r\n begin\r\n ow := Width;\r\n oh := Height;\r\n FOrientation := Value;\r\n if not (csLoading in ComponentState) then\r\n begin\r\n Width := oh;\r\n Height := ow;\r\n end;\r\n UpdateElement;\r\n end;\r\nend;\r\n\r\n{$HINTS OFF}\r\nprocedure TTrackBar.DoUpdate;\r\nvar\r\n el: TJSHTMLElement;\r\nbegin\r\n if not Assigned(Container) then\r\n Exit;\r\n\r\n Container['max'] := IntToStr(FMax);\r\n Container['min'] := IntToStr(FMin);\r\n\r\n el := ElementHandle;\r\n\r\n asm\r\n el.value = this.FPosition;\r\n el.setAttribute('value',this.FPosition);\r\n end;\r\nend;\r\n{$HINTS ON}\r\n\r\nprocedure TTrackBar.SetPosition(AValue: integer);\r\nbegin\r\n if (FPosition <> AValue) then\r\n begin\r\n FPosition := AValue;\r\n DoUpdate;\r\n end;\r\nend;\r\n\r\nprocedure TTrackBar.UpdateElementVisual;\r\nvar\r\n el: TJSHTMLElement;\r\nbegin\r\n inherited;\r\n\r\n el := ElementHandle;\r\n\r\n if Orientation = trHorizontal then\r\n begin\r\n el.removeAttribute('orient');\r\n el.style.removeProperty('writing-mode');\r\n el.style.removeProperty('-webkit-appearance');\r\n el.style.removeProperty('height');\r\n if WidthStyle = ssAbsolute then\r\n el.style.setProperty('width', IntToStr(Width));\r\n end\r\n else\r\n begin\r\n el.setAttribute('orient','vertical');\r\n el.style.setProperty('writing-mode','bt-lt');\r\n el.style.setProperty('-webkit-appearance','slider-vertical');\r\n el.style.removeProperty('width');\r\n if HeightStyle = ssAbsolute then\r\n el.style.setProperty('height', IntToStr(Height));\r\n el.style.setProperty('width','22px');\r\n end;\r\n\r\nend;\r\n\r\nfunction TTrackBar.GetPosition: integer;\r\nvar\r\n s: string;\r\nbegin\r\n Result := FPosition;\r\n\r\n if not Assigned(Container) then\r\n Exit;\r\n\r\n s := TJSHTMLInputElement(Container).value;\r\n if (s <> '') then\r\n Result := StrToInt(s);\r\nend;\r\n\r\n{ TTimer }\r\n\r\nconstructor TTimer.Create(AOwner: TComponent);\r\nbegin\r\n inherited;\r\n FInterval := 1000;\r\n FTimerID := -1;\r\n Enabled := True;\r\nend;\r\n\r\nprocedure TTimer.SetEnabled(Value: boolean);\r\nbegin\r\n FEnabled := Value;\r\n DoUpdateTimer;\r\nend;\r\n\r\nprocedure TTimer.SetInterval(AValue: integer);\r\nbegin\r\n FInterval := AValue;\r\n DoUpdateTimer;\r\nend;\r\n\r\nprocedure TTimer.DoTimer;\r\nbegin\r\n if Assigned(FOnTimer) then\r\n FOnTimer(Self);\r\nend;\r\n\r\ndestructor TTimer.Destroy;\r\nbegin\r\n DoClearTimer;\r\n inherited;\r\nend;\r\n\r\nprocedure TTimer.DoClearTimer;\r\nbegin\r\n if FTimerID <> -1 then\r\n begin\r\n window.clearInterval(FTimerID);\r\n FTimerID := -1;\r\n end;\r\nend;\r\n\r\nprocedure TTimer.DoUpdateTimer;\r\nbegin\r\n DoClearTimer;\r\n\r\n if Enabled then\r\n FTimerID := window.setInterval(@DoTimer, FInterval);\r\nend;\r\n\r\n{ TPaintBox }\r\n\r\nprocedure TPaintBox.UpdateElementVisual;\r\nbegin\r\n inherited;\r\n\r\n if (csDesigning in ComponentState) then\r\n begin\r\n ElementHandle.style.setProperty('border', '1px dotted gray');\r\n end;\r\nend;\r\n\r\nprocedure TPaintBox.Paint;\r\nbegin\r\n inherited;\r\n if Assigned(OnPaint) then\r\n OnPaint(Self);\r\nend;\r\n\r\n{ TScrollBox }\r\n\r\nprocedure TScrollBox.BindEvents;\r\nvar\r\n eh: TJSEventTarget;\r\nbegin\r\n inherited;\r\n if Assigned(ElementBindHandle) then\r\n begin\r\n eh := ElementBindHandle;\r\n eh.addEventListener('scroll',FScrollPtr);\r\n end;\r\nend;\r\n\r\nprocedure TScrollBox.ClearMethodPointers;\r\nbegin\r\n inherited;\r\n FScrollPtr := nil;\r\nend;\r\n\r\nprocedure TScrollBox.CreateInitialize;\r\nbegin\r\n inherited;\r\n FAutoScroll := true;\r\n FScrollBars := ssBoth;\r\n FHorzScrollBar := TControlScrollBar.Create(Self, TScrollBarKind.sbHorizontal);\r\n FVertScrollBar := TControlScrollBar.Create(Self, TScrollBarKind.sbVertical);\r\nend;\r\n\r\ndestructor TScrollBox.Destroy;\r\nbegin\r\n FHorzScrollBar.Free;\r\n FVertScrollBar.Free;\r\n inherited;\r\nend;\r\n\r\nprocedure TScrollBox.DoScroll;\r\nbegin\r\n if Assigned(OnScroll) then\r\n OnScroll(Self);\r\nend;\r\n\r\nprocedure TScrollBox.UnbindEvents;\r\nvar\r\n eh: TJSEventTarget;\r\nbegin\r\n inherited;\r\n if Assigned(ElementBindHandle) then\r\n begin\r\n eh := ElementBindHandle;\r\n eh.removeEventListener('scroll', FScrollPtr);\r\n end;\r\nend;\r\n\r\nprocedure TScrollBox.UpdateElement;\r\nbegin\r\n inherited;\r\n if Assigned(ElementHandle) and not IsUpdating then\r\n begin\r\n case ScrollBars of\r\n ssNone:\r\n begin\r\n ElementHandle.style.setProperty('overflow', 'hidden');\r\n end;\r\n ssVertical:\r\n begin\r\n ElementHandle.style.removeProperty('overflow');\r\n ElementHandle.style.setProperty('overflow-x', 'hidden');\r\n ElementHandle.style.setProperty('overflow-y', 'auto');\r\n end;\r\n ssHorizontal:\r\n begin\r\n ElementHandle.style.removeProperty('overflow');\r\n ElementHandle.style.setProperty('overflow-x', 'auto');\r\n ElementHandle.style.setProperty('overflow-y', 'hidden');\r\n end;\r\n ssBoth:\r\n begin\r\n ElementHandle.style.setProperty('overflow', 'auto');\r\n end;\r\n end;\r\n\r\n if Visible and not IsLinked then\r\n ElementHandle.style.setProperty('display', 'inline-block');\r\n end;\r\nend;\r\n\r\nprocedure TScrollBox.EndUpdate;\r\nbegin\r\n inherited;\r\n AlignControl(Self);\r\n // re-align in case align had effect on scrollbar appearance\r\n AlignControl(Self);\r\nend;\r\n\r\nfunction TScrollBox.GetClientRect: TRect;\r\nvar\r\n dw, dh: integer;\r\nbegin\r\n dw := 0;\r\n dh := 0;\r\n\r\n if (ElementHandle.scrollHeight > ElementHandle.ClientHeight) and (ScrollBars in [ssBoth, ssVertical]) then\r\n dw := 16; //GetScrollBarWidth;\r\n\r\n if (ElementHandle.scrollWidth > ElementHandle.ClientWidth) and (ScrollBars in [ssBoth, ssHorizontal]) then\r\n dh := 16; //GetScrollBarHeight;\r\n\r\n Result := Rect(0,0, TJSHTMLElement(ElementHandle).clientWidth - dw, TJSHTMLElement(ElementHandle).clientHeight - dh);\r\nend;\r\n\r\nprocedure TScrollBox.GetMethodPointers;\r\nbegin\r\n inherited;\r\n if FScrollPtr = nil then\r\n begin\r\n FScrollPtr := @HandleDoScroll;\r\n end;\r\nend;\r\n\r\nfunction TScrollBox.GetScrollLeft: integer;\r\nbegin\r\n Result := ElementHandle.scrollLeft;\r\nend;\r\n\r\nfunction TScrollBox.GetScrollTop: integer;\r\nbegin\r\n Result := ElementHandle.scrollTop;\r\nend;\r\n\r\nfunction TScrollBox.HandleDoScroll(Event: TJSMouseEvent): Boolean;\r\nbegin\r\n DoScroll;\r\n Result := true;\r\nend;\r\n\r\nprocedure TScrollBox.SetAutoScroll(AValue: boolean);\r\nbegin\r\n FAutoScroll := AValue;\r\nend;\r\n\r\nprocedure TScrollBox.SetScrollBars(const Value: TScrollStyle);\r\nbegin\r\n if (FScrollBars <> Value) then\r\n begin\r\n FScrollBars := Value;\r\n UpdateElement;\r\n end;\r\nend;\r\n\r\nprocedure TScrollBox.SetScrollLeft(const Value: integer);\r\nbegin\r\n ElementHandle.scrollLeft := Value;\r\nend;\r\n\r\nprocedure TScrollBox.SetScrollTop(const Value: integer);\r\nbegin\r\n ElementHandle.scrollTop := Value;\r\nend;\r\n\r\nprocedure TScrollBox.ScrollBy(DeltaX: integer; DeltaY: integer);\r\nbegin\r\n ScrollLeft := ScrollLeft + deltaX;\r\n ScrollTop := ScrollTop + deltaY;\r\nend;\r\n\r\n{ TCustomImageControl }\r\n\r\nprocedure TCustomImageControl.CreateInitialize;\r\nbegin\r\n inherited;\r\n FPicture := TURLPicture.Create;\r\n FPicture.OnChange := PictureChanged;\r\n FPicture.OnDataChange := PictureDataChanged;\r\n Color := clNone;\r\n TabStop := false;\r\n if (csDesigning in ComponentState) then\r\n begin\r\n Width := 400;\r\n Height := 300;\r\n end;\r\nend;\r\n\r\nfunction TCustomImageControl.DataURL: string;\r\nbegin\r\n Result := 'data:image/png;base64,' + GetBase64Img;\r\nend;\r\n\r\nfunction TCustomImageControl.DataURL(AWidth, AHeight: integer): string;\r\nbegin\r\n Result := 'data:image/png;base64,' + GetBase64Image(ElementHandle, AWidth, AHeight);\r\nend;\r\n\r\ndestructor TCustomImageControl.Destroy;\r\nbegin\r\n FPicture.Free;\r\n inherited Destroy;\r\nend;\r\n\r\nfunction TCustomImageControl.GetBase64Img: string;\r\nbegin\r\n Result := GetBase64Image(ElementHandle);\r\nend;\r\n\r\nprocedure TCustomImageControl.GetMethodPointers;\r\nbegin\r\n inherited;\r\n if FImageLoadPtr = nil then\r\n FImageLoadPtr := @HandleImageLoad;\r\n if FImageErrorPtr = nil then\r\n FImageErrorPtr := @HandleError;\r\nend;\r\n\r\nprocedure TCustomImageControl.BindEvents;\r\nbegin\r\n inherited;\r\n\r\n if Assigned(ElementBindHandle) then\r\n begin\r\n ElementBindHandle.addEventListener('load',FImageLoadPtr);\r\n if not (csDesigning in ComponentState) then\r\n ElementBindHandle.addEventListener('error',FImageErrorPtr);\r\n end;\r\nend;\r\n\r\nprocedure TCustomImageControl.Clear;\r\nbegin\r\n URL := EmptyImgres;\r\nend;\r\n\r\nprocedure TCustomImageControl.ClearMethodPointers;\r\nbegin\r\n inherited;\r\n\r\n FImageLoadPtr := nil;\r\n FImageErrorPtr := nil;\r\nend;\r\n\r\nfunction TCustomImageControl.CreateElement: TJSElement;\r\nbegin\r\n Result := document.createElement('IMG');\r\n\r\n if URL <> '' then\r\n Result.setAttribute('src', URL);\r\nend;\r\n\r\n{$HINTS OFF}\r\nfunction TCustomImageControl.HandleError(AEvent: TJSEvent): boolean;\r\nvar\r\n Handled: boolean;\r\n LEventRec: TJSEventRecord;\r\n LRequestRec: TJSXMLHttpRequestRecord;\r\nbegin\r\n Result := true;\r\n Handled := false;\r\n if Assigned(FOnError) then\r\n begin\r\n LEventRec.event := aEvent;\r\n LRequestRec.req := TJSXMLHttpRequest(aEvent.Target);\r\n FOnError(Self, LRequestRec, LEventRec, Handled);\r\n end;\r\n\r\n if Assigned(FImageError) then\r\n FImageError(AEvent);\r\n\r\n if not Handled and not (csDesigning in ComponentState) and (URL <> '') then\r\n raise Exception.Create('Error loading image ' + URL);\r\nend;\r\n\r\nfunction TCustomImageControl.HandleImageLoad(AEvent: TJSEvent): boolean;\r\nvar\r\n el: TJSElement;\r\n w,h: integer;\r\nbegin\r\n el := ElementHandle;\r\n\r\n asm\r\n w = el.naturalWidth;\r\n h = el.naturalHeight;\r\n end;\r\n\r\n FPicture.Width := w;\r\n FPicture.Height := h;\r\n\r\n if Assigned(OnLoaded) then\r\n OnLoaded(Self);\r\n\r\n if Assigned(FImageLoaded) then\r\n FImageLoaded(AEvent);\r\n\r\n Result := true;\r\nend;\r\n\r\nfunction TCustomImageControl.ImageHeight: integer;\r\nvar\r\n el: TJSElement;\r\n h: integer;\r\nbegin\r\n Result := -1;\r\n if Assigned(ElementHandle) then\r\n begin\r\n el := ElementHandle;\r\n asm\r\n h = el.naturalHeight;\r\n end;\r\n Result := h;\r\n end;\r\nend;\r\n\r\nfunction TCustomImageControl.ImageWidth: integer;\r\nvar\r\n el: TJSElement;\r\n w: integer;\r\nbegin\r\n Result := -1;\r\n if Assigned(ElementHandle) then\r\n begin\r\n el := ElementHandle;\r\n asm\r\n w = el.naturalWidth;\r\n end;\r\n Result := w;\r\n end;\r\nend;\r\n\r\nprocedure TCustomImageControl.LoadFromURL(const AURL: string;\r\n ImageLoaded: TImageLoadedProc; ImageError: TImageErrorProc);\r\nbegin\r\n FImageLoaded := ImageLoaded;\r\n FImageError := ImageError;\r\n\r\n URL := AURL;\r\nend;\r\n\r\nfunction TCustomImageControl.LoadFromURL(const AURL: string): TJSPromise;\r\nbegin\r\n Result := TJSPromise.new(\r\n procedure(ASuccess, AFailed: TJSPromiseResolver)\r\n begin\r\n LoadFromURL(AURL,\r\n procedure(AEvent: TJSEvent)\r\n begin\r\n ASuccess(AEvent);\r\n end,\r\n\r\n procedure(AEvent: TJSEvent)\r\n begin\r\n AFailed(AEvent);\r\n end)\r\n end);\r\nend;\r\n\r\nprocedure TCustomImageControl.SaveToArrayBuffer(AArray: TJSArrayBuffer);\r\nbegin\r\n AArray := Base64ToArrayBuffer(GetBase64Img);\r\nend;\r\n\r\nprocedure TCustomImageControl.LoadFromArrayBuffer(AArray: TJSArrayBuffer);\r\nvar\r\n uint8b: TJSUint8Array;\r\n dataUri: string;\r\nbegin\r\n uint8b := TJSUint8Array.new(AArray);\r\n\r\n asm\r\n dataUri = btoa(new Uint8Array(uint8b).reduce(function (data, byte) {\r\n return data + String.fromCharCode(byte);\r\n }, ''));\r\n end;\r\n\r\n URL := 'data:image/jpeg;base64,' + dataUri;\r\nend;\r\n\r\n{$HINTS ON}\r\n\r\nprocedure TCustomImageControl.SetContainerURL(AURL: string);\r\nbegin\r\n if Assigned(Container) then\r\n begin\r\n if AURL = '' then\r\n Container.removeAttribute('src')\r\n else\r\n Container['src'] := AURL;\r\n UpdateElement;\r\n end;\r\nend;\r\n\r\nprocedure TCustomImageControl.SetURL(AURL: string);\r\nbegin\r\n FURL := AURL;\r\n SetContainerURL(AURL);\r\nend;\r\n\r\nprocedure TCustomImageControl.UnbindEvents;\r\nvar\r\n eh: TJSEventTarget;\r\nbegin\r\n inherited;\r\n\r\n if Assigned(ElementBindHandle) then\r\n begin\r\n eh := ElementBindHandle;\r\n eh.removeEventListener('load', FImageLoadPtr);\r\n if not (csDesigning in ComponentState) then\r\n eh.removeEventListener('error',FImageErrorPtr);\r\n end;\r\nend;\r\n\r\nprocedure TCustomImageControl.UpdateElement;\r\nbegin\r\n inherited;\r\n if AutoSize and Assigned(ElementHandle) then\r\n begin\r\n ElementHandle.style.removeProperty('width');\r\n ElementHandle.style.removeProperty('height');\r\n end;\r\n\r\nend;\r\n\r\nprocedure TCustomImageControl.SetPicture(const Value: TURLPicture);\r\nbegin\r\n FPicture.Assign(Value);\r\nend;\r\n\r\nprocedure TCustomImageControl.PictureChanged(Sender: TObject);\r\nbegin\r\n SetURL(Picture.FileName);\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TCustomImageControl.PictureDataChanged(Sender: TObject);\r\nbegin\r\n SetContainerURL('data:image/png;base64,' + HexImageDecodeAsBase64(Picture.Data));\r\nend;\r\n\r\nprocedure TCustomImageControl.ResizeImage(AWidth, AHeight: integer);\r\nbegin\r\n ResizeImage(AWidth, AHeight, false);\r\nend;\r\n\r\nprocedure TCustomImageControl.ResizeImage;\r\nbegin\r\n ResizeImage(Width, Height, false);\r\nend;\r\n\r\nprocedure TCustomImageControl.ResizeImage(AWidth, AHeight: integer;\r\n AspectRatio: boolean);\r\nvar\r\n w,h: integer;\r\n r: double;\r\nbegin\r\n if AspectRatio then\r\n begin\r\n if (ImageWidth = AWidth) or (ImageHeight = AHeight) then\r\n Exit;\r\n end\r\n else\r\n begin\r\n if (ImageWidth = AWidth) and (ImageHeight = AHeight) then\r\n Exit;\r\n end;\r\n\r\n if (AWidth = 0) or (AHeight = 0) then\r\n Exit;\r\n\r\n w := AWidth;\r\n h := AHeight;\r\n\r\n if AspectRatio then\r\n begin\r\n if (ImageWidth/w > ImageHeight/h) then\r\n r := ImageWidth/w\r\n else\r\n r := ImageHeight/h;\r\n\r\n w := Round(ImageWidth / r);\r\n h := Round(ImageHeight / r);\r\n end;\r\n\r\n URL := 'data:image/png;base64,' + GetBase64Image(ElementHandle, w, h);\r\nend;\r\n\r\n{ TSplitter }\r\n\r\nprocedure TSplitter.ColorChanging;\r\nbegin\r\n inherited;\r\n Invalidate;\r\nend;\r\n\r\nfunction TSplitter.CreateElement: TJSElement;\r\nbegin\r\n Result := inherited CreateElement;\r\nend;\r\n\r\nprocedure TSplitter.CreateInitialize;\r\n begin\r\n inherited;\r\n Cursor := crHSplit;\r\n\r\n if (csDesigning in ComponentState) then\r\n begin\r\n Width := 6;\r\n Height := 100;\r\n end;\r\n Align := alLeft;\r\n FSplitControl := nil;\r\n GripColor := clWhite;\r\n end;\r\n\r\n procedure TSplitter.Paint;\r\n var\r\n xofs,dx: integer;\r\n yofs,dy: integer;\r\n i: integer;\r\n begin\r\n if FTouched then\r\n begin\r\n Canvas.Brush.Color := clGray;\r\n Canvas.Pen.Color := clGray;\r\n end\r\n else\r\n begin\r\n Canvas.Brush.Color := Color;\r\n Canvas.Pen.Color := Color;\r\n end;\r\n Canvas.Brush.Style := bsSolid;\r\n Canvas.Rectangle(ClientRect);\r\n\r\n if (Align in [alLeft, alRight]) then\r\n begin\r\n dx := 0;\r\n dy := 6;\r\n yofs := (Height div 2) - 9;\r\n xofs := (Width div 2);\r\n end;\r\n\r\n if (Align in [alTop, alBottom]) then\r\n begin\r\n dx := 6;\r\n dy := 0;\r\n xofs := (Width div 2) - 9;\r\n yofs := (Height div 2) - 1;\r\n end;\r\n\r\n Canvas.Brush.Color := GripColor;\r\n Canvas.Pen.Color := GripColor;\r\n\r\n for i := 0 to 2 do\r\n begin\r\n Canvas.Rectangle(xofs, yofs, xofs + 2, yofs + 2);\r\n xofs := xofs + dx;\r\n yofs := yofs + dy;\r\n end;\r\n end;\r\n\r\nprocedure TSplitter.SetGripColor(const Value: TColor);\r\nbegin\r\n if (FGripColor <> Value) then\r\n begin\r\n FGripColor := Value;\r\n Invalidate;\r\n end;\r\nend;\r\n\r\nprocedure TSplitter.UpdateElement;\r\nbegin\r\n inherited;\r\nend;\r\n\r\nprocedure TSplitter.UpdateElementSize;\r\nbegin\r\n inherited;\r\nend;\r\n\r\nprocedure TSplitter.MouseUp(Button: TMouseButton; Shift: TShiftState; X,Y: Integer);\r\nbegin\r\n inherited;\r\n FSizing := false;\r\n FSplitControl := nil;\r\nend;\r\n\r\nprocedure TSplitter.MouseDown(Button: TMouseButton; Shift: TShiftState; X,Y: Integer);\r\nbegin\r\n inherited;\r\n DoSizeStart(X,Y);\r\nend;\r\n\r\nprocedure TSplitter.DoMouseEnter;\r\nbegin\r\n inherited;\r\n if (Align in [alLeft, alRight]) then\r\n Cursor := crHSplit;\r\n\r\n if (Align in [alTop, alBottom]) then\r\n Cursor := crVSplit;\r\nend;\r\n\r\nprocedure TSplitter.DoSizeStart(X,Y: integer);\r\nvar\r\n r,rc: TRect;\r\n i: integer;\r\n c: TControl;\r\n eh: TJSHTMLElement;\r\nbegin\r\n FSizing := true;\r\n\r\n Y := Y - document.documentElement.scrollTop;\r\n\r\n r := Rect(Left, Top, Left + Width, Top + Height);\r\n\r\n if Assigned(Parent) then\r\n begin\r\n for i := 0 to Parent.ControlCount - 1 do\r\n begin\r\n c := Parent.Controls[i];\r\n\r\n if (c.Align = Align) and (c <> Self) then\r\n begin\r\n rc := Rect(c.Left, c.Top, c.Left + c.Width, c.Top + c.Height);\r\n\r\n //OutputDebugString(c.GetID+':'+inttostr(rc.Right)+':'+inttostr(r.Left));\r\n\r\n if (Align = alLeft) and (rc.Right - r.Left < 4) then\r\n begin\r\n FSplitControl := c;\r\n FOriginalWidth := FSplitControl.Width;\r\n FSizing := true;\r\n FSizingX := X;\r\n FSizingY := Y;\r\n break;\r\n //OutputDebugString('left:'+c.GetID);\r\n end;\r\n\r\n if (Align = alRight) and (rc.Left - r.Right < 4) then\r\n begin\r\n FSplitControl := c;\r\n FOriginalWidth := FSplitControl.Width;\r\n FSizing := true;\r\n FSizingX := X;\r\n FSizingY := Y;\r\n break;\r\n //OutputDebugString('left:'+c.GetID);\r\n end;\r\n\r\n if (Align = alTop) and (rc.Bottom - r.Top < 4) then\r\n begin\r\n FSplitControl := c;\r\n FOriginalHeight := FSplitControl.Height;\r\n FSizing := true;\r\n FSizingX := X;\r\n FSizingY := Y;\r\n break;\r\n //OutputDebugString('top:'+c.GetID);\r\n end;\r\n\r\n if (Align = alBottom) and (rc.Top - r.Bottom < 4) then\r\n begin\r\n FSplitControl := c;\r\n FOriginalHeight := FSplitControl.Height;\r\n FSizing := true;\r\n FSizingX := X;\r\n FSizingY := Y;\r\n break;\r\n //OutputDebugString('top:'+c.GetID);\r\n end;\r\n\r\n end;\r\n end;\r\n end;\r\n\r\n FLayer := document.createElement('SPAN');\r\n document.body.appendChild(FLayer);\r\n\r\n eh := TJSHTMLElement(FLayer);\r\n eh.style.setProperty('top', '0');\r\n eh.style.setProperty('left', '0');\r\n eh.style.setProperty('right', '0');\r\n eh.style.setProperty('bottom', '0');\r\n\r\n // make sure it is higher than the z-index of the layer associated with popup forms\r\n eh.style.setProperty('z-index', '99999999');\r\n\r\n eh.style.setProperty('webkit-user-select', 'none');\r\n eh.style.setProperty('moz-user-select', 'none');\r\n eh.style.setProperty('khtml-user-select', 'none');\r\n eh.style.setProperty('ms-user-select', 'none');\r\n eh.style.setProperty('user-select', 'none');\r\n eh.style.setProperty('position', 'fixed');\r\n\r\n if (Align in [alLeft, alRight]) then\r\n eh.style.setProperty('cursor', 'col-resize');\r\n\r\n if (Align in [alTop, alBottom]) then\r\n eh.style.setProperty('cursor', 'row-resize');\r\n\r\n FFirstMove := true;\r\n FSizing := true;\r\n\r\n eh.addEventListener('mousemove',@HandleDocDoMouseMove);\r\n eh.addEventListener('mouseup',@HandleDocDoMouseUp);\r\n\r\n eh.addEventListener('touchmove', @HandleDocDoTouchMove);\r\n eh.addEventListener('touchend', @HandleDocDoTouchEnd);\r\n\r\nend;\r\n\r\nfunction TSplitter.HandleDocDoMouseMove(Event: TJSMouseEvent): Boolean;\r\nvar\r\n dx,dy: integer;\r\nbegin\r\n if FSizing and Assigned(FSplitControl) then\r\n begin\r\n if FFirstMove then\r\n begin\r\n FSizingX := Event.clientX;\r\n FSizingY := Event.clientY - document.documentElement.scrollTop;\r\n FFirstMove := false;\r\n end\r\n else\r\n begin\r\n dx := Round(Event.clientX - FSizingX);\r\n dy := Round(Event.clientY - document.documentElement.scrollTop - FSizingY);\r\n\r\n if Align = alLeft then\r\n FSplitControl.Width := FOriginalWidth + dx;\r\n\r\n if Align = alRight then\r\n FSplitControl.Width := FOriginalWidth - dx;\r\n\r\n if Align = alTop then\r\n FSplitControl.Height := FOriginalHeight + dy;\r\n\r\n if Align = alBottom then\r\n FSplitControl.Height := FOriginalHeight - dy;\r\n\r\n DoRealign;\r\n\r\n if Assigned(OnMove) then\r\n OnMove(Self);\r\n end;\r\n end;\r\n Result := true;\r\nend;\r\n\r\nfunction TSplitter.HandleDocDoMouseUp(Event: TJSMouseEvent): Boolean;\r\nbegin\r\n FSizing := false;\r\n FSplitControl := nil;\r\n FFirstMove := true;\r\n FLayer.parentNode.removeChild(FLayer);\r\n Result := true;\r\n if Assigned(OnMoved) then\r\n OnMoved(Self);\r\nend;\r\n\r\n\r\nfunction TSplitter.HandleDocDoTouchMove(Event: TJSTouchEvent): Boolean;\r\nvar\r\n touch: TJSTouch;\r\n dx,dy: integer;\r\nbegin\r\n StopPropagation;\r\n\r\n if Event.Touches.length > 0 then\r\n begin\r\n touch := Event.touches.Touches[0];\r\n\r\n if FSizing and Assigned(FSplitControl) then\r\n begin\r\n if FFirstMove then\r\n begin\r\n FSizingX := touch.clientX;\r\n FSizingY := touch.clientY;\r\n FFirstMove := false;\r\n end\r\n else\r\n begin\r\n dx := Round(touch.clientX - FSizingX);\r\n dy := Round(touch.clientY - FSizingY);\r\n\r\n if Align = alLeft then\r\n FSplitControl.Width := FOriginalWidth + dx;\r\n\r\n if Align = alRight then\r\n FSplitControl.Width := FOriginalWidth - dx;\r\n\r\n if Align = alTop then\r\n FSplitControl.Height := FOriginalHeight + dy;\r\n\r\n if Align = alBottom then\r\n FSplitControl.Height := FOriginalHeight - dy;\r\n\r\n DoRealign;\r\n\r\n if Assigned(OnMove) then\r\n OnMove(Self);\r\n end;\r\n end;\r\n end;\r\n\r\n Result := True;\r\nend;\r\n\r\nfunction TSplitter.HandleDoTouchStart(Event: TJSTouchEvent): Boolean;\r\nvar\r\n l,t: single;\r\n touch: TJSTouch;\r\nbegin\r\n StopPropagation;\r\n PreventDefault;\r\n\r\n if Event.Touches.length > 0 then\r\n begin\r\n touch := Event.touches.Touches[0];\r\n\r\n FTouched := true;\r\n Invalidate;\r\n Invalidate;\r\n XYToClient(touch.clientX, touch.clientY, l, t);\r\n\r\n DoSizeStart(round(l),round(t));\r\n end;\r\n\r\n Result := false;\r\nend;\r\n\r\nfunction TSplitter.HandleDocDoTouchEnd(Event: TJSTouchEvent): Boolean;\r\nbegin\r\n FTouched := false;\r\n Invalidate;\r\n\r\n FSizing := false;\r\n FSplitControl := nil;\r\n FFirstMove := true;\r\n FLayer.parentNode.removeChild(FLayer);\r\n Result := true;\r\n if Assigned(OnMoved) then\r\n OnMoved(Self);\r\nend;\r\n\r\n{ TDivPanel }\r\n\r\nfunction TDivPanel.CreateElement: TJSElement;\r\nbegin\r\n Result := document.createElement('DIV');\r\nend;\r\n\r\n{ TCustomPanel }\r\n\r\nprocedure TCustomPanel.CreateInitialize;\r\nbegin\r\n inherited;\r\n if (csDesigning in ComponentState) then\r\n EnablePropagation := True;\r\n FAutoSize := False;\r\n FAlignment := taCenter;\r\n Color := clBtnFace;\r\n TabStop := False;\r\n CustomBorder := true;\r\n ShowCaption := true;\r\n ControlStyle := ControlStyle + [csAcceptsControls];\r\n FLabel := nil;\r\n FPadding := TPadding.Create;\r\n\r\n if (csDesigning in ComponentState) then\r\n begin\r\n Width := 400;\r\n Height := 300;\r\n end;\r\nend;\r\n\r\ndestructor TCustomPanel.Destroy;\r\nbegin\r\n FPadding.Free;\r\n inherited;\r\nend;\r\n\r\nprocedure TCustomPanel.EndUpdate;\r\nbegin\r\n inherited;\r\n if AutoSize then\r\n AutoSize := true;\r\nend;\r\n\r\nfunction TCustomPanel.GetChildContainer: TJSElement;\r\nbegin\r\n if Assigned(FPanelBody) then\r\n Result := FPanelBody\r\n else\r\n Result := inherited;\r\nend;\r\n\r\nfunction TCustomPanel.GetOuterHeight: integer;\r\nbegin\r\n Result := inherited GetOuterHeight;\r\nend;\r\n\r\nfunction TCustomPanel.GetOuterWidth: integer;\r\nbegin\r\n Result := inherited GetOuterWidth;\r\nend;\r\n\r\nprocedure TCustomPanel.RegisterParent(AValue: TControl);\r\nbegin\r\n inherited;\r\n if AutoSize then\r\n DoAutoSize;\r\nend;\r\n\r\nprocedure TCustomPanel.AlignControl(AControl: TControl);\r\nbegin\r\n inherited;\r\n if AutoSize then\r\n DoAutoSize;\r\nend;\r\n\r\nfunction TCustomPanel.CreateElement: TJSElement;\r\nbegin\r\n Result := document.createElement('SPAN');\r\n FPanelBody := TJSHTMLElement(document.createElement('DIV'));\r\n FPanelBody['class'] := 'card-body';\r\n Result.appendChild(FPanelBody);\r\nend;\r\n\r\nprocedure TCustomPanel.DoAutoSize;\r\nvar\r\n i: integer;\r\n minx,miny,maxx,maxy: integer;\r\n r: TJSDomRect;\r\n el: TJSElement;\r\nbegin\r\n if FIsSizing then\r\n Exit;\r\n\r\n FIsSizing := true;\r\n\r\n if (WidthStyle = ssAbsolute) and (HeightStyle = ssAbsolute) then\r\n begin\r\n maxx := 0;\r\n maxy := 0;\r\n minx := $FFFF;\r\n miny := $FFFF;\r\n for i := 0 to ControlCount - 1 do\r\n begin\r\n if Controls[i].WidthStyle = ssAbsolute then\r\n begin\r\n if Controls[i].Left + Controls[i].Width > maxx then\r\n maxx := Controls[i].Left + Controls[i].Width;\r\n\r\n if Controls[i].Left < minx then\r\n minx := Controls[i].Left;\r\n end\r\n else\r\n begin\r\n el := Controls[i].ElementHandle;\r\n if Assigned(el) then\r\n begin\r\n r := el.getBoundingClientRect;\r\n if r.X - Left + r.Width > maxx then\r\n maxx := Round(r.X - Left + r.Width);\r\n\r\n minx := 0;\r\n end;\r\n end;\r\n\r\n if Controls[i].HeightStyle = ssAbsolute then\r\n begin\r\n if Controls[i].Top + Controls[i].Height > maxy then\r\n maxy := Controls[i].Top + Controls[i].Height;\r\n\r\n if Controls[i].Top < miny then\r\n miny := Controls[i].Top;\r\n end\r\n else\r\n begin\r\n el := Controls[i].ElementHandle;\r\n if Assigned(el) then\r\n begin\r\n r := el.getBoundingClientRect;\r\n if r.Y - Top + r.Height > maxy then\r\n maxy := Round(r.Y - Top + r.Height);\r\n miny := 0;\r\n end;\r\n end;\r\n end;\r\n\r\n // don't do anything if it would render the panel invisible at design-time\r\n if (csDesigning in ComponentState) then\r\n begin\r\n if (ControlCount = 0) or (maxx = 0) or (maxy = 0) then\r\n Exit;\r\n end;\r\n\r\n if (BorderStyle = bsSingle) then\r\n begin\r\n inc(maxx);\r\n inc(maxy);\r\n end;\r\n\r\n for i := 0 to ControlCount - 1 do\r\n begin\r\n Controls[i].Left := Controls[i].Left - minx;\r\n Controls[i].Top := Controls[i].Top - miny;\r\n end;\r\n\r\n Width := maxx - minx;\r\n Height := maxy - miny;\r\n end\r\n else\r\n begin\r\n Width := -1;\r\n Height := -1;\r\n end;\r\n\r\n UpdateElement;\r\n\r\n FIsSizing := false;\r\nend;\r\n\r\nprocedure TCustomPanel.SetAlignment(const Value: TAlignment);\r\nbegin\r\n if (FAlignment <> Value) then\r\n begin\r\n FAlignment := Value;\r\n UpdateElement;\r\n end;\r\nend;\r\n\r\nprocedure TCustomPanel.SetAutoSize(AValue: boolean);\r\nbegin\r\n FAutoSize := AValue;\r\n if FAutoSize and not IsUpdating then\r\n begin\r\n DoAutoSize;\r\n end;\r\nend;\r\n\r\nprocedure TCustomPanel.SetBorderStyle(const AValue: TBorderStyle);\r\nbegin\r\n inherited;\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TCustomPanel.SetBounds(X, Y, AWidth, AHeight: Integer);\r\nbegin\r\n inherited;\r\n if AutoSize then\r\n DoAutoSize;\r\nend;\r\n\r\nprocedure TCustomPanel.SetCaption(const AValue: string);\r\nbegin\r\n inherited SetCaption(AValue);\r\n\r\n if Assigned(ElementHandle) and ShowCaption then\r\n begin\r\n if not Assigned(FLabel) then\r\n begin\r\n FLabel := TJSHTMLElement(document.createElement('SPAN'));\r\n FLabel.innerHTML := Caption;\r\n\r\n if Assigned(ChildContainer) then\r\n ChildContainer.appendChild(FLabel)\r\n else\r\n ElementHandle.appendChild(FLabel);\r\n\r\n UpdateElementVisual;\r\n end\r\n else\r\n begin\r\n FLabel.innerHTML := Caption;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TCustomPanel.SetPadding(const Value: TPadding);\r\nbegin\r\n FPadding.Assign(Value);\r\n Realign;\r\nend;\r\n\r\nprocedure TCustomPanel.SetShowCaption(const Value: boolean);\r\nbegin\r\n if (FShowCaption <> Value) then\r\n begin\r\n FShowCaption := Value;\r\n UpdateElementVisual;\r\n end;\r\nend;\r\n\r\nprocedure TCustomPanel.UnRegisterParent(AValue: TControl);\r\nbegin\r\n inherited;\r\n if AutoSize then\r\n DoAutoSize;\r\n\r\nend;\r\n\r\nprocedure TCustomPanel.UpdateElementVisual;\r\nbegin\r\n inherited;\r\n\r\n if Assigned(ElementHandle) then\r\n begin\r\n if not IsLinked then\r\n begin\r\n if AutoSize then\r\n begin\r\n ElementHandle.style.setProperty('overflow', '');\r\n ElementHandle.style.setProperty('white-space', 'normal');\r\n if Visible then\r\n ElementHandle.style.setProperty('display', 'inline');\r\n end\r\n else\r\n begin\r\n ElementHandle.style.setProperty('overflow', 'hidden');\r\n ElementHandle.style.setProperty('white-space', 'nowrap');\r\n if Visible then\r\n ElementHandle.style.setProperty('display', 'inline-block');\r\n end;\r\n\r\n ElementHandle.style.setProperty('padding-left',inttostr(Padding.Left)+'px');\r\n ElementHandle.style.setProperty('padding-right',inttostr(Padding.Right)+'px');\r\n ElementHandle.style.setProperty('padding-top',inttostr(Padding.Top)+'px');\r\n ElementHandle.style.setProperty('padding-bottom',inttostr(Padding.Bottom)+'px');\r\n ElementHandle.style.setProperty('box-sizing','border-box');\r\n\r\n if ElementBodyClassName <> '' then\r\n ChildContainer.setAttribute('class', ElementBodyClassName)\r\n else\r\n ChildContainer.removeAttribute('class');\r\n end;\r\n\r\n if Assigned(FLabel) then\r\n begin\r\n if ShowCaption then\r\n FLabel.innerHTML := Caption\r\n else\r\n FLabel.innerHTML := '';\r\n\r\n // center the label\r\n if Visible then\r\n begin\r\n ElementHandle.style.setProperty('display','flex');\r\n case Alignment of\r\n taLeftJustify: ElementHandle.style.setProperty('justify-content','flex-start');\r\n taCenter: ElementHandle.style.setProperty('justify-content','center');\r\n taRightJustify: ElementHandle.style.setProperty('justify-content','flex-end');\r\n end;\r\n ElementHandle.style.setProperty('align-items','center');\r\n end;\r\n end;\r\n\r\n // do not block selection in child controls\r\n ElementHandle.style.setProperty('user-select', '');\r\n\r\n // allow default caret on text\r\n if Cursor = crDefault then\r\n ElementHandle.style.setProperty('cursor', '');\r\n end;\r\nend;\r\n\r\nprocedure TCustomPanel.UpdatePadding(var ARect: TRect);\r\nbegin\r\n ARect.Left := Padding.Left;\r\n ARect.Top := Padding.Top;\r\n ARect.Right := ARect.Right - Padding.Right;\r\n ARect.Bottom := ARect.Bottom - Padding.Bottom;\r\nend;\r\n\r\n{ TGeoLocation }\r\n\r\nconstructor TGeoLocation.Create(AOwner: TComponent);\r\nbegin\r\n inherited;\r\n FHighPrecision := false;\r\n FTimeOut := 60000;\r\n FMaximumAge := 0;\r\n FTrackID := -1;\r\nend;\r\n\r\nprocedure TGeoLocation.DoHandleError(AValue: TJSPositionError);\r\nbegin\r\n if Assigned(OnGeolocationError) then\r\n OnGeolocationError(Self, AValue.code, AValue.Message);\r\nend;\r\n\r\nprocedure TGeoLocation.DoHandleGeolocation(APosition: TJSPosition);\r\nbegin\r\n if Assigned(OnGeolocation) then\r\n OnGeolocation(Self, APosition.Coords.Latitude, APosition.Coords.Longitude, APosition.Coords.Altitude);\r\n\r\n if Assigned(OnGeolocationEx) then\r\n OnGeolocationEx(Self, APosition.Coords.Latitude, APosition.Coords.Longitude, APosition.Coords.Altitude, APosition.Coords.Accuracy);\r\nend;\r\n\r\nprocedure TGeoLocation.DoHandleGeolocationAsync(\r\n AProc: TGeolocationResponseProc);\r\nvar\r\n posopt: TJSPositionOptions;\r\n\r\n procedure Handler(APosition: TJSPosition);\r\n begin\r\n AProc(APosition);\r\n end;\r\n\r\nbegin\r\n posopt.enableHighAccuracy := FHighPrecision;\r\n posopt.timeout := FTimeOut;\r\n posopt.maximumAge := FMaximumAge;\r\n geolocation.getCurrentPosition(TJSGeoLocationCallback(@Handler), nil, posopt);\r\nend;\r\n\r\nprocedure TGeoLocation.DoHandleGeolocationUpdate(APosition: TJSPosition);\r\nbegin\r\n if Assigned(OnGeolocationUpdate) then\r\n OnGeolocationUpdate(Self, APosition.Coords.Latitude, APosition.Coords.Longitude, APosition.Coords.Altitude);\r\n\r\n if Assigned(OnGeolocationUpdateEx) then\r\n OnGeolocationUpdateEx(Self, APosition.Coords.Latitude, APosition.Coords.Longitude, APosition.Coords.Altitude, APosition.Coords.Accuracy);\r\nend;\r\n\r\n{$HINTS OFF}\r\nprocedure TGeoLocation.GetGeolocation;\r\nvar\r\n posopt: TJSPositionOptions;\r\nbegin\r\n if Assigned(geolocation) then\r\n begin\r\n posopt.enableHighAccuracy := FHighPrecision;\r\n posopt.timeout := FTimeOut;\r\n posopt.maximumAge := FMaximumAge;\r\n geolocation.getCurrentPosition(TJSGeoLocationCallback(@DoHandleGeoLocation), TJSGeoLocationErrorCallback(@DoHandleError), posopt);\r\n end;\r\nend;\r\n\r\nfunction TGeoLocation.GetGeolocationAsync: TJSPromise;\r\nvar\r\n posopt: TJSPositionOptions;\r\nbegin\r\n Result := TJSPromise.new(\r\n procedure(ASuccess, AFailed: TJSPromiseResolver)\r\n begin\r\n if Assigned(geolocation) then\r\n begin\r\n DoHandleGeolocationAsync(procedure(APosition: TJSPosition)\r\n begin\r\n ASuccess(APosition);\r\n end);\r\n end\r\n else\r\n AFailed(nil);\r\n end);\r\nend;\r\n\r\n{$HINTS ON}\r\n\r\nfunction TGeoLocation.HasGeolocation: boolean;\r\nbegin\r\n Result := Assigned(geolocation);\r\nend;\r\n\r\nprocedure TGeoLocation.StartTracking;\r\nvar\r\n posopt: TJSPositionOptions;\r\nbegin\r\n if FTrackID <> -1 then\r\n StopTracking;\r\n\r\n if Assigned(geolocation) then\r\n begin\r\n posopt.enableHighAccuracy := FHighPrecision;\r\n posopt.timeout := FTimeOut;\r\n posopt.maximumAge := FMaximumAge;\r\n FTrackId := geolocation.watchPosition(TJSGeoLocationCallback(@DoHandleGeoLocationUpdate), TJSGeoLocationErrorCallback(@DoHandleError), posopt);\r\n end;\r\nend;\r\n\r\nprocedure TGeoLocation.StopTracking;\r\nbegin\r\n if Assigned(geolocation) and (FTrackID <> -1) then\r\n begin\r\n geolocation.clearWatch(FTrackID);\r\n FTrackID := -1;\r\n end;\r\nend;\r\n\r\n{ TGridPanelRows }\r\n\r\nfunction TGridPanelRows.Add: TGridPanelRow;\r\nbegin\r\n Result := TGridPanelRow(inherited Add);\r\nend;\r\n\r\nconstructor TGridPanelRows.Create(AOwner: TComponent);\r\nbegin\r\n inherited Create(AOwner, TGridPanelRow);\r\nend;\r\n\r\nfunction TGridPanelRows.GetItem(Index: integer): TGridPanelRow;\r\nbegin\r\n Result := TGridPanelRow(inherited Items[Index]);\r\nend;\r\n\r\nfunction TGridPanelRows.Insert(Index: integer): TGridPanelRow;\r\nbegin\r\n Result := TGridPanelRow(inherited Insert(Index));\r\nend;\r\n\r\nprocedure TGridPanelRows.SetItem(Index: integer; const Value: TGridPanelRow);\r\nbegin\r\n inherited Items[Index] := Value;\r\nend;\r\n\r\nprocedure TGridPanelRows.Update(Item: TCollectionItem);\r\nbegin\r\n inherited;\r\n if Assigned(OnChange) then\r\n OnChange(Self);\r\nend;\r\n\r\n{ TGridPanelColumns }\r\n\r\nfunction TGridPanelColumns.Add: TGridPanelColumn;\r\nbegin\r\n Result := TGridPanelColumn(inherited Add);\r\nend;\r\n\r\nconstructor TGridPanelColumns.Create(AOwner: TComponent);\r\nbegin\r\n inherited Create(AOwner, TGridPanelColumn);\r\nend;\r\n\r\nfunction TGridPanelColumns.GetItem(Index: integer): TGridPanelColumn;\r\nbegin\r\n Result := TGridPanelColumn(inherited Items[Index]);\r\nend;\r\n\r\nfunction TGridPanelColumns.Insert(Index: integer): TGridPanelColumn;\r\nbegin\r\n Result := TGridPanelColumn(inherited Insert(Index));\r\nend;\r\n\r\nprocedure TGridPanelColumns.SetItem(Index: integer;\r\n const Value: TGridPanelColumn);\r\nbegin\r\n inherited Items[Index] := Value;\r\nend;\r\n\r\nprocedure TGridPanelColumns.Update(Item: TCollectionItem);\r\nbegin\r\n inherited;\r\n if Assigned(OnChange) then\r\n OnChange(Self);\r\nend;\r\n\r\n{ TGridPanel }\r\n\r\nprocedure TGridPanel.AddControl(AControl: TWinControl);\r\nbegin\r\n FControlCollection.Add.Control := AControl;\r\n AControl.Parent := Self;\r\n\r\n if FControlCollection.Count > FColumnCollection.Count * FRowCollection.Count then\r\n begin\r\n if ExpandStyle = esAddRows then\r\n FRowCollection.Add\r\n else\r\n FColumnCollection.Add;\r\n end;\r\nend;\r\n\r\nprocedure TGridPanel.AlignControl(AControl: TControl);\r\nbegin\r\n if not (csDestroying in ComponentState) then\r\n UpdateTable;\r\n\r\n inherited;\r\nend;\r\n\r\nfunction TGridPanel.CreateElement: TJSElement;\r\nbegin\r\n Result := document.createElement('SPAN');\r\nend;\r\n\r\nprocedure TGridPanel.CreateInitialize;\r\nbegin\r\n inherited;\r\n\r\n FDesignTime := (csDesigning in ComponentState) and not\r\n ((csReading in Owner.ComponentState) or (csLoading in Owner.ComponentState));\r\n\r\n EnablePropagation := true;\r\n ControlStyle := ControlStyle + [csAcceptsControls];\r\n FUpdateTable := true;\r\n FColCount := -1;\r\n FRowCollection := TGridPanelRows.Create(Self);\r\n FRowCollection.PropName := 'RowCollection';\r\n\r\n if FDesignTime and not (csLoading in ComponentState) then\r\n begin\r\n FRowCollection.Add;\r\n FRowCollection[0].Value := 100;\r\n FRowCollection[0].SizeStyle := ssPercent;\r\n end;\r\n\r\n FColumnCollection := TGridPanelColumns.Create(Self);\r\n FColumnCollection.PropName := 'ColumnCollection';\r\n\r\n if FDesignTime and not (csLoading in ComponentState) then\r\n begin\r\n FColumnCollection.Add;\r\n FColumnCollection.Add;\r\n FColumnCollection[0].Value := 50;\r\n FColumnCollection[1].Value := 50;\r\n FColumnCollection[0].SizeStyle := ssPercent;\r\n FColumnCollection[1].SizeStyle := ssPercent;\r\n end;\r\n\r\n FRowCollection.OnChange := TableChanged;\r\n FColumnCollection.OnChange := TableChanged;\r\n\r\n FControlCollection := TControlCollection.Create(Self);\r\n if (csDesigning in ComponentState) then\r\n begin\r\n Width := 400;\r\n Height := 300;\r\n end;\r\nend;\r\n\r\nfunction TGridPanel.CreateRow(AIndex: integer): TJSElement;\r\nvar\r\n row, cell: TJSElement;\r\n i: integer;\r\n ps: string;\r\n\r\nbegin\r\n if (GridLineColor <> clNone) and (GridLineWidth > 0) then\r\n ps := IntToStr(GridLineWidth)+'px solid '+ ColorToHTML(GridLineColor)\r\n else\r\n begin\r\n if (csDesigning in ComponentState) then\r\n ps := '1px dotted gray'\r\n else\r\n ps := '0px';\r\n end;\r\n\r\n row := document.createElement('tr');\r\n if (ElementClassName = '') then\r\n TJSHTMLElement(row).style.setProperty('border', ps);\r\n\r\n if AIndex < RowCollection.Count then\r\n begin\r\n if RowCollection.Items[AIndex].MarginTop <> 0 then\r\n TJSHTMLElement(row).style.setProperty('margin-top', IntToStr(RowCollection.Items[AIndex].MarginTop));\r\n\r\n if RowCollection.Items[AIndex].MarginBottom <> 0 then\r\n TJSHTMLElement(row).style.setProperty('margin-bottom', IntToStr(RowCollection.Items[AIndex].MarginBottom));\r\n\r\n if (RowCollection.Items[AIndex].ElementClassName <> '') then\r\n begin\r\n TJSHTMLElement(row).setAttribute('class', RowCollection.Items[AIndex].ElementClassName);\r\n end;\r\n\r\n case RowCollection.Items[AIndex].Alignment of\r\n vaCenter: TJSHTMLElement(row).setAttribute('valign','middle');\r\n vaBottom: TJSHTMLElement(row).setAttribute('valign','bottom');\r\n end;\r\n\r\n if (ElementClassName = '') then\r\n TJSHTMLElement(row).style.setProperty('border', ps);\r\n\r\n row.setAttribute('height', RowCollection.Items[AIndex].HeightAttribute);\r\n end;\r\n\r\n for i := 0 to ColumnCollection.Count - 1 do\r\n begin\r\n cell := document.createElement('td');\r\n if (ElementClassName = '') then\r\n TJSHTMLElement(cell).style.setProperty('border', ps);\r\n\r\n if ColumnCollection.Items[i].MarginLeft <> 0 then\r\n TJSHTMLElement(cell).style.setProperty('padding-left', IntToStr(ColumnCollection.Items[i].MarginLeft) +'px');\r\n\r\n if ColumnCollection.Items[i].MarginRight <> 0 then\r\n TJSHTMLElement(cell).style.setProperty('padding-right', IntToStr(ColumnCollection.Items[i].MarginRight)+'px' );\r\n\r\n if (ColumnCollection.Items[i].ElementClassName <> '') then\r\n begin\r\n TJSHTMLElement(cell).setAttribute('class', ColumnCollection.Items[i].ElementClassName);\r\n end;\r\n\r\n case ColumnCollection.Items[i].Alignment of\r\n taCenter: TJSHTMLElement(cell).setAttribute('align','center');\r\n taRightJustify: TJSHTMLElement(cell).setAttribute('align','right');\r\n end;\r\n\r\n cell.setAttribute('id', Name+'R'+IntToStr(AIndex)+'C'+IntToStr(i));\r\n\r\n if AIndex = 0 then\r\n begin\r\n TJSHTMLElement(cell).style.setProperty('width',ColumnCollection.Items[i].WidthAttribute);\r\n end;\r\n\r\n //cellText := document.createTextNode('cell is row '+IntToStr(j)+', column '+IntToStr(i));\r\n //cell.appendChild(cellText);\r\n row.appendChild(cell);\r\n end;\r\n\r\n Result := row;\r\nend;\r\n\r\n\r\nfunction TGridPanel.CreateTable: TJSElement;\r\nvar\r\n row: TJSElement;\r\n j: integer;\r\n ps: string;\r\nbegin\r\n FTbl := document.createElement('table');\r\n\r\n FTbl.setAttribute('width','100%');\r\n FTbl.setAttribute('height','100%');\r\n\r\n if ElementClassName <> '' then\r\n FTbl.setAttribute('class', ElementClassName)\r\n else\r\n begin\r\n if (GridLineColor <> clNone) and (GridLineWidth > 0) then\r\n ps := IntToStr(GridLineWidth)+'px solid '+ ColorToHTML(GridLineColor)\r\n else\r\n begin\r\n if (csDesigning in ComponentState) then\r\n ps := '1px dotted gray'\r\n else\r\n ps := '0px';\r\n end;\r\n\r\n TJSHTMLElement(FTbl).style.setProperty('border', ps);\r\n TJSHTMLElement(FTbl).style.setProperty('border-collapse','collapse');\r\n end;\r\n\r\n SetHTMLElementColor(TJSHTMLElement(FTbl), Color, not ((ElementClassName = '') and not IsLinked));\r\n\r\n FTblBody := document.createElement('tbody');\r\n\r\n // cells creation\r\n for j := 0 to RowCollection.Count - 1 do\r\n begin\r\n row := CreateRow(j);\r\n FTblBody.appendChild(row);\r\n end;\r\n\r\n // append the inside the \r\n FTbl.appendChild(FTblBody);\r\n Result := FTbl;\r\nend;\r\n\r\nprocedure TGridPanel.UpdateTable;\r\nvar\r\n i,j,k,mw,numrows: integer;\r\n fragment: TJSDocumentFragment;\r\n destid: string;\r\n control: TWinControl;\r\n el,row: TJSElement;\r\n isPercent: boolean;\r\n f: single;\r\n\r\nbegin\r\n if not Assigned(FTblBody) then\r\n Exit;\r\n\r\n if IsUpdating then\r\n Exit;\r\n\r\n if (csDestroying in ComponentState) then\r\n Exit;\r\n\r\n // row height distribution\r\n isPercent := true;\r\n mw := 0;\r\n\r\n for i := 0 to RowCollection.Count - 1 do\r\n begin\r\n begin\r\n if RowCollection.Items[i].SizeStyle <> ssPercent then\r\n begin\r\n isPercent := false;\r\n break;\r\n end\r\n else\r\n mw := mw + RowCollection.Items[i].Value;\r\n end;\r\n end;\r\n\r\n if isPercent and (mw > 100) then\r\n begin\r\n f := mw/100;\r\n for i := 0 to RowCollection.Count - 1 do\r\n begin\r\n RowCollection.Items[i].FValue := Trunc(RowCollection.Items[i].FValue / f);\r\n end;\r\n end;\r\n\r\n // column width distribution\r\n isPercent := true;\r\n mw := 0;\r\n\r\n for i := 0 to ColumnCollection.Count - 1 do\r\n begin\r\n begin\r\n if ColumnCollection.Items[i].SizeStyle <> ssPercent then\r\n begin\r\n isPercent := false;\r\n break;\r\n end\r\n else\r\n mw := mw + ColumnCollection.Items[i].Value;\r\n end;\r\n end;\r\n\r\n if isPercent and (mw > 100) then\r\n begin\r\n f := mw/100;\r\n for i := 0 to ColumnCollection.Count - 1 do\r\n begin\r\n ColumnCollection.Items[i].FValue := Trunc(ColumnCollection.Items[i].FValue / f);\r\n end;\r\n end;\r\n\r\n numrows := RowCollection.Count;\r\n\r\n // change column structure\r\n if (FColCount <> ColumnCollection.Count) then\r\n numrows := 0;\r\n\r\n // remove rows when rows decreased\r\n while FTblBody.childNodes.length > numrows do\r\n begin\r\n FTblBody.removeChild(FTblBody.childNodes[FTblBody.childNodes.length - 1]);\r\n end;\r\n\r\n // fill rows to match RowCollection.Count\r\n while FTblBody.childNodes.length < RowCollection.Count do\r\n begin\r\n row := CreateRow(FTblBody.childNodes.length);\r\n FTblBody.appendChild(row);\r\n end;\r\n\r\n for i := 0 to RowCollection.Count - 1 do\r\n begin\r\n row := TJSElement(FTblBody.childNodes[i]);\r\n row.setAttribute('height', RowCollection.Items[i].HeightAttribute);\r\n end;\r\n\r\n i := 0;\r\n j := 0;\r\n\r\n // assign controls in grid cells\r\n for k := 0 to ControlCollection.Count - 1 do\r\n begin\r\n if Assigned(ControlCollection.Items[k].Control) then\r\n begin\r\n fragment := document.createDocumentFragment();\r\n control := ControlCollection.Items[k].Control;\r\n ControlCollection.Items[k].Column := i;\r\n ControlCollection.Items[k].Row := j;\r\n\r\n control.ElementPosition := epRelative;\r\n control.ChildOrder := -1;\r\n\r\n if control.Align = alLeft then\r\n begin\r\n control.HeightStyle := ssPercent;\r\n control.HeightPercent := 100;\r\n if Assigned(control.ElementHandle) then\r\n TJSHTMLElement(control.ElementHandle).style.setProperty('float','left');\r\n end;\r\n\r\n if control.Align = alRight then\r\n begin\r\n control.HeightStyle := ssPercent;\r\n control.HeightPercent := 100;\r\n if Assigned(control.ElementHandle) then\r\n TJSHTMLElement(control.ElementHandle).style.setProperty('float','right');\r\n end;\r\n\r\n if (control.Align in [alTop, alBottom]) then\r\n begin\r\n control.WidthStyle := ssPercent;\r\n control.WidthPercent := 100;\r\n end;\r\n\r\n if control.Align = alClient then\r\n begin\r\n control.WidthStyle := ssPercent;\r\n control.HeightStyle := ssPercent;\r\n control.WidthPercent := 100;\r\n control.HeightPercent:= 100;\r\n end;\r\n\r\n row := TJSElement(FTblBody.childNodes[j]);\r\n if Assigned(row) and (j < RowCollection.Count) then\r\n begin\r\n row.setAttribute('height', RowCollection.Items[j].HeightAttribute);\r\n if (RowCollection.Items[j].ElementClassName <> '') then\r\n row.setAttribute('class', RowCollection.Items[j].ElementClassName)\r\n else\r\n row.removeAttribute('class');\r\n end;\r\n\r\n if Assigned(control.ElementHandle) then\r\n fragment.appendChild(control.ElementHandle);\r\n\r\n destid := Name + 'R'+ inttostr(j) + 'C' + inttostr(i);\r\n\r\n el := document.getElementById(destid);\r\n\r\n\r\n if not Assigned(el) then\r\n begin\r\n row := CreateRow(j);\r\n\r\n FTblBody.appendChild(row);\r\n el := document.getElementById(destid);\r\n if RowCollection.Count > j then\r\n row.setAttribute('height', RowCollection.Items[j].HeightAttribute);\r\n end\r\n else\r\n begin\r\n if (j = 0) and (i < ColumnCollection.Count) then\r\n begin\r\n if ColumnCollection.Items[i].SizeStyle = ssAbsolute then\r\n begin\r\n TJSHTMLElement(FTbl).removeAttribute('width');\r\n TJSHTMLElement(FTbl).removeAttribute('height');\r\n end\r\n else\r\n begin\r\n TJSHTMLElement(FTbl).setAttribute('width','100%');\r\n TJSHTMLElement(FTbl).setAttribute('height','100%');\r\n end;\r\n\r\n TJSHTMLElement(el).style.setProperty('width',ColumnCollection.Items[i].WidthAttribute);\r\n end;\r\n end;\r\n\r\n if Assigned(el) then\r\n begin\r\n el.appendChild(fragment);\r\n\r\n if control.Align = alTop then\r\n TJSHTMLElement(el).style.setProperty('vertical-align','top');\r\n\r\n if control.Align = alBottom then\r\n TJSHTMLElement(el).style.setProperty('vertical-align','bottom');\r\n end;\r\n\r\n inc(i);\r\n if i = ColumnCollection.Count then\r\n begin\r\n i := 0;\r\n inc(j);\r\n end;\r\n end;\r\n end;\r\n\r\n for i := 0 to ColumnCollection.Count - 1 do\r\n begin\r\n destid := Name + 'R0C' + inttostr(i);\r\n el := document.getElementById(destid);\r\n if Assigned(el) then\r\n TJSHTMLElement(el).style.setProperty('width',ColumnCollection.Items[i].WidthAttribute);\r\n end;\r\n\r\n FColCount := ColumnCollection.Count;\r\nend;\r\n\r\ndestructor TGridPanel.Destroy;\r\nbegin\r\n FRowCollection.Free;\r\n FColumnCollection.Free;\r\n FControlCollection.Free;\r\n inherited;\r\nend;\r\n\r\nprocedure TGridPanel.EndUpdate;\r\nbegin\r\n inherited;\r\n UpdateTable;\r\nend;\r\n\r\nprocedure TGridPanel.Notification(AComponent: TComponent;\r\n Operation: TOperation);\r\nvar\r\n i: integer;\r\n destid: string;\r\n el: TJSElement;\r\nbegin\r\n if (Operation = opRemove) and not (csDestroying in ComponentState) then\r\n begin\r\n for i := ControlCollection.Count - 1 downto 0 do\r\n begin\r\n if ControlCollection.Items[i].Control = AComponent then\r\n begin\r\n destid := Name + 'R'+ inttostr(ControlCollection.Items[i].Row) + 'C' + inttostr(ControlCollection.Items[i].Column);\r\n el := document.getElementById(destid);\r\n el.removeChild(el.firstChild);\r\n\r\n ControlCollection.Items[i].FControl := nil;\r\n ControlCollection.Delete(i);\r\n end;\r\n end;\r\n\r\n UpdateTable;\r\n end;\r\n\r\n inherited;\r\nend;\r\n\r\nprocedure TGridPanel.RegisterParent(AValue: TControl);\r\nbegin\r\n inherited;\r\n\r\n if not IsUpdating and not (csLoading in ComponentState) then\r\n begin\r\n// if Assigned(Owner) and (csLoading in Owner.ComponentState) then\r\n// Exit;\r\n\r\n if (csLoading in AValue.ComponentState) then\r\n Exit;\r\n\r\n ControlCollection.Add.Control := TWinControl(AValue);\r\n\r\n if ControlCollection.Count > ColumnCollection.Count * RowCollection.Count then\r\n begin\r\n if ExpandStyle = esAddRows then\r\n RowCollection.Add\r\n else\r\n ColumnCollection.Add;\r\n end;\r\n\r\n UpdateTable;\r\n end;\r\nend;\r\n\r\nprocedure TGridPanel.RemoveControl(AControl: TWinControl);\r\nvar\r\n i,r,c: integer;\r\n row: TJSElement;\r\n d: double;\r\n\r\nbegin\r\n for i := 0 to FControlCollection.Count - 1 do\r\n begin\r\n if FControlCollection.Items[i].Control = AControl then\r\n begin\r\n r := FControlCollection.Items[i].Row;\r\n c := FControlCollection.Items[i].Column;\r\n\r\n row := TJSElement(FTblBody.childNodes[r]);\r\n\r\n TJSHTMLElement(row.childNodes[c]).innerHTML := '';\r\n\r\n FControlCollection.Delete(i);\r\n break;\r\n end;\r\n end;\r\n\r\n if ColumnCollection.Count > 0 then\r\n begin\r\n d := ControlCollection.Count / ColumnCollection.Count;\r\n\r\n if Frac(d) > 0 then\r\n d := Trunc(d + 1);\r\n\r\n while d < RowCollection.Count do\r\n begin\r\n RowCollection.Delete(RowCollection.Count - 1);\r\n end;\r\n end;\r\n\r\nend;\r\n\r\nprocedure TGridPanel.SetColumnCollection(const Value: TGridPanelColumns);\r\nbegin\r\n FColumnCollection.Assign(Value);\r\nend;\r\n\r\nprocedure TGridPanel.SetControlCollection(const Value: TControlCollection);\r\nbegin\r\n FControlCollection.Assign(Value);\r\nend;\r\n\r\nprocedure TGridPanel.SetRowCollection(const Value: TGridPanelRows);\r\nbegin\r\n FRowCollection.Assign(Value);\r\nend;\r\n\r\nprocedure TGridPanel.TableChanged(Sender: TObject);\r\nbegin\r\n UpdateTable;\r\nend;\r\n\r\nprocedure TGridPanel.UpdateElement;\r\nbegin\r\n inherited;\r\n\r\n if Assigned(ElementHandle) and not IsUpdating then\r\n begin\r\n // do not block selection in child controls\r\n ElementHandle.style.setProperty('user-select', '');\r\n\r\n // allow default caret on text\r\n if Cursor = crDefault then\r\n ElementHandle.style.setProperty('cursor', '');\r\n\r\n if FUpdateTable and Assigned(Container) then\r\n begin\r\n TJSElement(Container).appendChild(CreateTable);\r\n UpdateTable;\r\n FUpdateTable := false;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TGridPanel.UpdateElementVisual;\r\nbegin\r\n inherited;\r\n\r\n if (csDesigning in ComponentState) then\r\n begin\r\n ElementHandle.style.setProperty('border', '1px dotted gray');\r\n end;\r\n\r\n if not isLinked and Assigned(FTbl) then\r\n begin\r\n if Color <> clNone then\r\n TJSHTMLElement(FTbl).style.setProperty('background-color',ColorToHTML(Color))\r\n else\r\n TJSHTMLElement(FTbl).style.removeProperty('background-color');\r\n end;\r\nend;\r\n\r\n{ TGridPanelColumn }\r\n\r\nprocedure TGridPanelColumn.Assign(Source: TPersistent);\r\nbegin\r\n if (Source is TGridPanelColumn) then\r\n begin\r\n FAlignment := (Source as TGridPanelColumn).Alignment;\r\n FSizeStyle := (Source as TGridPanelColumn).SizeStyle;\r\n FElementClassName := (Source as TGridPanelColumn).ElementClassName;\r\n FValue := (Source as TGridPanelColumn).Value;\r\n FMarginLeft := (Source as TGridPanelColumn).MarginLeft;\r\n FMarginRight := (Source as TGridPanelColumn).MarginRight;\r\n end;\r\nend;\r\n\r\nconstructor TGridPanelColumn.Create(ACollection: TCollection);\r\nbegin\r\n inherited;\r\n FSizeStyle := ssPercent;\r\n FValue := 0;\r\n FMarginLeft := 0;\r\n FMarginRight := 0;\r\n FAlignment := taLeftJustify;\r\nend;\r\n\r\nprocedure TGridPanelColumn.SetMarginLeft(const Value: integer);\r\nbegin\r\n if (FMarginLeft <> Value) then\r\n begin\r\n FMarginLeft := Value;\r\n TGridPanelColumns(Collection).Update(Self);\r\n end;\r\nend;\r\n\r\nprocedure TGridPanelColumn.SetMarginRight(const Value: integer);\r\nbegin\r\n if (FMarginRight <> Value) then\r\n begin\r\n FMarginRight := Value;\r\n TGridPanelColumns(Collection).Update(Self);\r\n end;\r\nend;\r\n\r\nprocedure TGridPanelColumn.SetSizeStyle(const Value: TSizeStyle);\r\nbegin\r\n if (FSizeStyle <> Value) then\r\n begin\r\n FSizeStyle := Value;\r\n TGridPanelColumns(Collection).Update(Self);\r\n end;\r\nend;\r\n\r\nprocedure TGridPanelColumn.SetValue(const Value: integer);\r\nbegin\r\n if (FValue <> Value) then\r\n begin\r\n FValue := Value;\r\n TGridPanelColumns(Collection).Update(Self);\r\n end;\r\nend;\r\n\r\nfunction TGridPanelColumn.WidthAttribute: string;\r\nbegin\r\n Result := '';\r\n case SizeStyle of\r\n ssPercent: Result := IntTostr(Value)+'%';\r\n ssAbsolute: Result := IntTostr(Value)+'px';\r\n end;\r\nend;\r\n\r\n{ TGridPanelRow }\r\n\r\nprocedure TGridPanelRow.Assign(Source: TPersistent);\r\nbegin\r\n if (Source is TGridPanelRow) then\r\n begin\r\n FAlignment := (Source as TGridPanelRow).Alignment;\r\n FSizeStyle := (Source as TGridPanelRow).SizeStyle;\r\n FElementClassName := (Source as TGridPanelRow).ElementClassName;\r\n FValue := (Source as TGridPanelRow).Value;\r\n FMarginTop := (Source as TGridPanelRow).MarginTop;\r\n FMarginBottom := (Source as TGridPanelRow).MarginBottom;\r\n end;\r\nend;\r\n\r\nconstructor TGridPanelRow.Create(ACollection: TCollection);\r\nbegin\r\n inherited;\r\n FSizeStyle := ssPercent;\r\n FAlignment := vaTop;\r\n FMarginTop := 0;\r\n FMarginBottom := 0;\r\nend;\r\n\r\nfunction TGridPanelRow.HeightAttribute: string;\r\nbegin\r\n Result := '';\r\n case SizeStyle of\r\n ssPercent: Result := IntTostr(Value)+'%';\r\n ssAbsolute: Result := IntTostr(Value)+'px';\r\n end;\r\nend;\r\n\r\nprocedure TGridPanelRow.SetMarginBottom(const Value: integer);\r\nbegin\r\n if (FMarginBottom <> Value) then\r\n begin\r\n FMarginBottom := Value;\r\n TGridPanelColumns(Collection).Update(Self);\r\n end;\r\nend;\r\n\r\nprocedure TGridPanelRow.SetMarginTop(const Value: integer);\r\nbegin\r\n if (FMarginTop <> Value) then\r\n begin\r\n FMarginTop := Value;\r\n TGridPanelColumns(Collection).Update(Self);\r\n end;\r\nend;\r\n\r\nprocedure TGridPanelRow.SetSizeStyle(const Value: TSizeStyle);\r\nbegin\r\n if (FSizeStyle <> Value) then\r\n begin\r\n FSizeStyle := Value;\r\n TGridPanelColumns(Collection).Update(Self);\r\n end;\r\nend;\r\n\r\nprocedure TGridPanelRow.SetValue(const Value: integer);\r\nbegin\r\n if (FValue <> Value) then\r\n begin\r\n FValue := Value;\r\n TGridPanelColumns(Collection).Update(Self);\r\n end;\r\nend;\r\n\r\n{ TControlCollectionItem }\r\n\r\nprocedure TControlCollectionItem.Assign(Source: TPersistent);\r\nbegin\r\n if (Source is TControlCollectionItem) then\r\n begin\r\n FColumn := (Source as TControlCollectionItem).Column;\r\n FRow := (Source as TControlCollectionItem).Row;\r\n FControl := (Source as TControlCollectionItem).Control;\r\n end;\r\nend;\r\n\r\n\r\n{ TControlCollection }\r\n\r\nfunction TControlCollection.Add: TControlCollectionItem;\r\nbegin\r\n Result := TControlCollectionItem(inherited Add);\r\nend;\r\n\r\nconstructor TControlCollection.Create(AOwner: TComponent);\r\nbegin\r\n inherited Create(AOwner, TControlCollectionItem);\r\nend;\r\n\r\nfunction TControlCollection.FindItem(AControl: TWinControl): TControlCollectionItem;\r\nvar\r\n i: integer;\r\nbegin\r\n Result := nil;\r\n for i := 0 to Count - 1 do\r\n begin\r\n if Items[i].Control = AControl then\r\n begin\r\n Result := Items[i];\r\n Exit;\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TControlCollection.GetItemAtCell(ACol,\r\n ARow: integer): TControlCollectionItem;\r\nvar\r\n i: integer;\r\nbegin\r\n Result := nil;\r\n if Assigned(Owner) and (Owner is TGridPanel) then\r\n begin\r\n i := ACol + (Owner as TGridPanel).ColumnCollection.Count * ARow;\r\n if i < Count then\r\n Result := Items[i];\r\n end;\r\nend;\r\n\r\nfunction TControlCollection.GetItem(Index: Integer): TControlCollectionItem;\r\nbegin\r\n Result := TControlCollectionItem(inherited Items[Index]);\r\nend;\r\n\r\nfunction TControlCollection.Insert(Index: Integer): TControlCollectionItem;\r\nbegin\r\n Result := TControlCollectionItem(inherited Insert(Index));\r\nend;\r\n\r\nprocedure TControlCollection.SetItem(Index: Integer;\r\n const Value: TControlCollectionItem);\r\nbegin\r\n inherited Items[Index] := Value;\r\nend;\r\n\r\n{ TWebMultimediaPlayer }\r\n\r\n{$HINTS OFF}\r\nfunction TMultimediaPlayer.CreateElement: TJSElement;\r\nvar\r\n el, src: TJSElement;\r\n p: string;\r\nbegin\r\n if MultimediaType = mtVideo then\r\n el := document.createElement('VIDEO')\r\n else\r\n el := document.createElement('AUDIO');\r\n\r\n src := document.createElement('SOURCE');\r\n\r\n case FPreload of\r\n mpNone: p := 'none';\r\n mpAuto: p := 'auto';\r\n mpMetadata: p := 'metadata';\r\n end;\r\n\r\n asm\r\n el.defaultPlaybackRate = this.FPlaybackRate;\r\n el.preload = p;\r\n end;\r\n\r\n el.appendChild(src);\r\n Result := el;\r\nend;\r\n{$HINTS ON}\r\n\r\nprocedure TMultimediaPlayer.CreateInitialize;\r\nbegin\r\n inherited;\r\n FVolume := 100;\r\n FPlaybackRate := 1;\r\n FMuted := false;\r\n FAutoPlay := false;\r\n FContextMenu := true;\r\n FPreload := mpAuto;\r\n if (csDesigning in ComponentState) then\r\n begin\r\n Width := 400;\r\n Height := 300;\r\n end;\r\nend;\r\n\r\nfunction TMultimediaPlayer.GetCurrentTime: double;\r\nvar\r\n el: TJSElement;\r\n i: double;\r\nbegin\r\n el := ElementHandle;\r\n if Assigned(el) then\r\n begin\r\n asm\r\n i = el.currentTime;\r\n end;\r\n end;\r\n\r\n Result := i;\r\nend;\r\n\r\nfunction TMultimediaPlayer.GetDuration: double;\r\nvar\r\n el: TJSElement;\r\n i: double;\r\nbegin\r\n el := ElementHandle;\r\n if Assigned(el) then\r\n begin\r\n asm\r\n i = el.duration;\r\n end;\r\n end;\r\n Result := i;\r\nend;\r\n\r\nfunction TMultimediaPlayer.GetEnded: boolean;\r\nvar\r\n el: TJSElement;\r\n e: boolean;\r\nbegin\r\n el := ElementHandle;\r\n if Assigned(el) then\r\n begin\r\n asm\r\n e = el.ended;\r\n end;\r\n end;\r\n\r\n Result := e;\r\nend;\r\n\r\nfunction TMultimediaPlayer.GetPaused: boolean;\r\nvar\r\n el: TJSElement;\r\n e: boolean;\r\nbegin\r\n el := ElementHandle;\r\n if Assigned(el) then\r\n begin\r\n asm\r\n e = el.paused;\r\n end;\r\n end;\r\n\r\n Result := e;\r\nend;\r\n\r\n\r\nprocedure TMultimediaPlayer.Pause;\r\nvar\r\n el: TJSElement;\r\nbegin\r\n el := ElementHandle;\r\n if Assigned(el) then\r\n begin\r\n asm\r\n el.pause();\r\n end;\r\n end;\r\n\r\nend;\r\n\r\nprocedure TMultimediaPlayer.Play;\r\nvar\r\n el: TJSElement;\r\nbegin\r\n el := ElementHandle;\r\n if Assigned(el) then\r\n asm\r\n el.play();\r\n end;\r\nend;\r\n\r\nprocedure TMultimediaPlayer.ReLoad;\r\nvar\r\n el: TJSElement;\r\nbegin\r\n el := ElementHandle;\r\n if Assigned(el) then\r\n asm\r\n el.load();\r\n end;\r\nend;\r\n\r\nprocedure TMultimediaPlayer.SetAutoPlay(const Value: boolean);\r\nbegin\r\n if (FAutoPlay <> Value) then\r\n begin\r\n FAutoPlay := Value;\r\n UpdateElement;\r\n end;\r\nend;\r\n\r\nprocedure TMultimediaPlayer.SetContextMenu(const Value: boolean);\r\nbegin\r\n if (FContextMenu <> Value) then\r\n begin\r\n FContextMenu := Value;\r\n UpdateElement;\r\n end;\r\nend;\r\n\r\nprocedure TMultimediaPlayer.SetControls(const Value: boolean);\r\nbegin\r\n if (FControls <> Value) then\r\n begin\r\n FControls := Value;\r\n UpdateElement;\r\n end;\r\nend;\r\n\r\nprocedure TMultimediaPlayer.SetCurrentTime(const Value: double);\r\nvar\r\n el: TJSElement;\r\nbegin\r\n el := ElementHandle;\r\n if Assigned(el) then\r\n asm\r\n el.currentTime = Value;\r\n end;\r\nend;\r\n\r\nprocedure TMultimediaPlayer.SetHideControls(const Value: TMultiMediaControls);\r\nbegin\r\n if FHideControls <> Value then\r\n begin\r\n FHideControls := Value;\r\n UpdateElement;\r\n end;\r\nend;\r\n\r\n{$HINTS OFF}\r\n\r\nprocedure TMultimediaPlayer.SetLoop(const Value: boolean);\r\nvar\r\n el: TJSElement;\r\nbegin\r\n if (FLoop <> Value) then\r\n begin\r\n FLoop := Value;\r\n if Assigned(ElementHandle) then\r\n begin\r\n el := ElementHandle;\r\n asm\r\n el.loop = Value;\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TMultimediaPlayer.SetMuted(const Value: boolean);\r\nvar\r\n el: TJSElement;\r\nbegin\r\n if (FMuted <> Value) then\r\n begin\r\n FMuted := Value;\r\n if Assigned(ElementHandle) then\r\n begin\r\n el := ElementHandle;\r\n asm\r\n el.muted = Value;\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TMultimediaPlayer.SetPlaybackRate(const Value: double);\r\nbegin\r\n if (FPlaybackRate <> Value) then\r\n begin\r\n FPlaybackRate := Value;\r\n UpdateElement;\r\n end;\r\nend;\r\n\r\nprocedure TMultimediaPlayer.SetPoster(const Value: string);\r\nvar\r\n el: TJSElement;\r\nbegin\r\n if FPoster <> Value then\r\n begin\r\n FPoster := Value;\r\n if Assigned(ElementHandle) then\r\n begin\r\n el := ElementHandle;\r\n asm\r\n el.poster = Value;\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TMultimediaPlayer.SetPreload(const Value: TMultiMediaPreload);\r\nvar\r\n s: string;\r\n el: TJSElement;\r\nbegin\r\n if FPreload <> Value then\r\n begin\r\n FPreload := Value;\r\n if Assigned(ElementHandle) then\r\n begin\r\n el := ElementHandle;\r\n case Value of\r\n mpNone: s := 'none';\r\n mpAuto: s := 'auto';\r\n mpMetadata: s := 'metadata';\r\n end;\r\n\r\n asm\r\n el.preload = s;\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TMultimediaPlayer.SetURL(const Value: string);\r\nbegin\r\n if (FURL <> Value) then\r\n begin\r\n FURL := Value;\r\n UpdateElement;\r\n end;\r\nend;\r\n\r\nprocedure TMultimediaPlayer.SetVolume(const Value: TMultiMediaVolume);\r\nvar\r\n el: TJSElement;\r\nbegin\r\n if (FVolume <> Value) and (Value >= 0) and (Value <= 100) then\r\n begin\r\n FVolume := Value;\r\n if Assigned(ElementHandle) then\r\n begin\r\n el := ElementHandle;\r\n asm\r\n el.volume = Value/100;\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\n\r\nprocedure TMultimediaPlayer.UpdateElement;\r\nvar\r\n el: TJSNode;\r\n vid: TJSElement;\r\n nocontrols: string;\r\n\r\n function booltoattr(b: boolean): string;\r\n begin\r\n if b then\r\n result := 'true'\r\n else\r\n result := 'false';\r\n end;\r\n\r\nbegin\r\n inherited;\r\n\r\n if Assigned(ElementHandle) then\r\n begin\r\n vid := TJSElement(ElementHandle);\r\n asm\r\n vid.controls = this.FControls;\r\n vid.defaultPlaybackRate = this.FPlaybackRate;\r\n vid.playbackRate = this.FPlaybackRate;\r\n vid.muted = this.FMuted;\r\n end;\r\n\r\n if FControls then\r\n ElementHandle.setAttribute('controls','')\r\n else\r\n ElementHandle.removeAttribute('controls');\r\n\r\n if FAutoPlay then\r\n ElementHandle.setAttribute('autoplay',booltoattr(FAutoplay))\r\n else\r\n ElementHandle.removeAttribute('autoplay');\r\n\r\n if FMuted then\r\n ElementHandle.setAttribute('muted',booltoattr(FMuted))\r\n else\r\n ElementHandle.removeAttribute('muted');\r\n\r\n if not FContextMenu then\r\n ElementHandle.setAttribute('oncontextmenu','return false;')\r\n else\r\n ElementHandle.removeAttribute('oncontextmenu');\r\n\r\n ElementHandle.setAttribute('volume',FormatProp('%.2f',[FVolume/100]));\r\n ElementHandle.setAttribute('src',url);\r\n\r\n nocontrols := '';\r\n\r\n if mcFullscreen in HideControls then\r\n nocontrols := 'nofullscreen ';\r\n\r\n if mcDownload in HideControls then\r\n nocontrols := nocontrols + 'nodownload ';\r\n\r\n if mcRemoteplayback in HideControls then\r\n nocontrols := nocontrols + 'noremoteplayback ';\r\n\r\n if mcPlaybackrate in HideControls then\r\n nocontrols := nocontrols + 'noplaybackrate ';\r\n\r\n if nocontrols <> '' then\r\n ElementHandle.setAttribute('controlsList',nocontrols)\r\n else\r\n if ElementHandle.hasAttribute('controlsList') then\r\n ElementHandle.removeAttribute('controlsList');\r\n\r\n if mcPictureInPicture in HideControls then\r\n ElementHandle.setAttribute('disablePictureInPicture','')\r\n else\r\n if ElementHandle.hasAttribute('disablePictureInPicture') then\r\n ElementHandle.removeAttribute('disablePictureInPicture');\r\n\r\n// el := ElementHandle.firstChild;\r\n// if Assigned(el) then\r\n// begin\r\n// (el as TJSElement).setAttribute('src',url);\r\n// (el as TJSElement).setAttribute('type','video/mp4');\r\n// end;\r\n end;\r\nend;\r\n\r\n{$HINTS ON}\r\n\r\n{ TCustomGroupBox }\r\n\r\nfunction TCustomGroupBox.CreateElement: TJSElement;\r\nbegin\r\n// Result := document.createElement('FIELDSET');\r\n// FFieldSet := TJSHTMLElement(Result);\r\n\r\n Result := document.createElement('DIV');\r\n\r\n FFieldSet := TJSHTMLElement(document.createElement('FIELDSET'));\r\n Result.appendChild(FFieldSet);\r\n\r\n FLegend := TJSHTMLElement(document.createElement('LEGEND'));\r\n FFieldSet.appendChild(FLegend);\r\n FLegend.innerHTML := Caption;\r\nend;\r\n\r\nprocedure TCustomGroupBox.CreateInitialize;\r\nbegin\r\n inherited;\r\n EnablePropagation := True;\r\n ControlStyle := ControlStyle + [csAcceptsControls];\r\n Color := clBtnFace;\r\n FPadding := TPadding.Create;\r\n\r\n if (csDesigning in ComponentState) then\r\n begin\r\n Width := 400;\r\n Height := 300;\r\n end;\r\nend;\r\n\r\n\r\ndestructor TCustomGroupBox.Destroy;\r\nbegin\r\n FPadding.Free;\r\n inherited;\r\nend;\r\n\r\nprocedure TCustomGroupBox.InitCSSLibrary(ALibrary: TCSSLibrary);\r\nbegin\r\n if (ALibrary = cssBootstrap) then\r\n begin\r\n ElementLegendClassName := 'h6';\r\n end;\r\nend;\r\n\r\nprocedure TCustomGroupBox.SetBoundsInt(X, Y, AWidth, AHeight: Integer);\r\nbegin\r\n inherited;\r\n SetFieldSetSize;\r\nend;\r\n\r\nprocedure TCustomGroupBox.SetCaption(const Value: string);\r\nbegin\r\n if FCaption <> Value then\r\n begin\r\n FCaption := Value;\r\n UpdateElementData;\r\n end;\r\nend;\r\n\r\nprocedure TCustomGroupBox.SetElementLegendClassName(const Value: TElementClassName);\r\nbegin\r\n if (FElementLegendClassName <> Value) then\r\n begin\r\n FElementLegendClassName := Value;\r\n UpdateElementVisual;\r\n end;\r\nend;\r\n\r\nprocedure TCustomGroupBox.SetFieldSetSize;\r\nvar\r\n dx,dy: integer;\r\nbegin\r\n if Assigned(FFieldSet) then\r\n begin\r\n dx := 4;\r\n dy := 2;\r\n if (ElementClassName <> '') or (ElementLegendClassName <> '') then\r\n begin\r\n dx := 0;\r\n dy := 0;\r\n end;\r\n\r\n if (WidthStyle = ssAbsolute) then\r\n FFieldSet.style.setProperty('width',IntToStr(Width - dx {- Font.Size * 2})+'px')\r\n else\r\n FFieldSet.style.setProperty('width','90%');\r\n\r\n if HeightStyle = ssAbsolute then\r\n FFieldSet.style.setProperty('height',IntToStr(Height - dy {- Font.Size * 2})+'px')\r\n else\r\n FFieldSet.style.setProperty('height','90%');\r\n end;\r\nend;\r\n\r\nprocedure TCustomGroupBox.SetPadding(const Value: TPadding);\r\nbegin\r\n FPadding.Assign(Value);\r\n Realign;\r\nend;\r\n\r\nprocedure TCustomGroupBox.UpdateElementData;\r\nbegin\r\n inherited;\r\n if Assigned(FLegend) then\r\n begin\r\n FLegend.innerHTML := Caption;\r\n end;\r\nend;\r\n\r\nprocedure TCustomGroupBox.UpdateElementVisual;\r\nbegin\r\n inherited;\r\n\r\n if Assigned(ElementHandle) then\r\n begin\r\n ElementHandle.style.removeProperty('background-color');\r\n end;\r\n\r\n if Assigned(FLegend) then\r\n begin\r\n FLegend['class'] := 'w-auto ' + ElementLegendClassName;\r\n TJSHTMLElement(FLegend).style.setProperty('float', 'none');\r\n end;\r\n\r\n if Assigned(FFieldSet) then\r\n begin\r\n FFieldSet.style.setProperty('background-color',ColorToHTML(Color));\r\n FFieldSet.style.setProperty('overflow', 'visible');\r\n\r\n SetFieldSetSize;\r\n\r\n FFieldSet.style.setProperty('white-space', 'nowrap');\r\n\r\n FFieldSet.style.setProperty('padding-left',inttostr(Padding.Left)+'px');\r\n FFieldSet.style.setProperty('padding-right',inttostr(Padding.Right)+'px');\r\n FFieldSet.style.setProperty('padding-top',inttostr(Padding.Top)+'px');\r\n FFieldSet.style.setProperty('padding-bottom',inttostr(Padding.Bottom)+'px');\r\n\r\n if Visible then\r\n FFieldSet.style.setProperty('display', 'inline-block');\r\n\r\n FFieldSet.style.setProperty('webkit-user-select', 'none');\r\n FFieldSet.style.setProperty('moz-user-select', 'none');\r\n FFieldSet.style.setProperty('khtml-user-select', 'none');\r\n FFieldSet.style.setProperty('ms-user-select', 'none');\r\n FFieldSet.style.setProperty('user-select', 'none');\r\n FFieldSet.style.setProperty('border','1px solid '+ ColorToHTML(BorderColor));\r\n end;\r\nend;\r\n\r\nprocedure TCustomGroupBox.UpdatePadding(var ARect: TRect);\r\nbegin\r\n ARect.Left := Padding.Left;\r\n ARect.Top := Padding.Top;\r\n ARect.Right := ARect.Right - Padding.Right;\r\n ARect.Bottom := ARect.Bottom - Padding.Bottom;\r\nend;\r\n\r\n{ THTMLContainer }\r\n\r\nfunction THTMLContainer.CreateElement: TJSElement;\r\nbegin\r\n Result := document.createElement('DIV');\r\nend;\r\n\r\nprocedure THTMLContainer.CreateInitialize;\r\nbegin\r\n inherited;\r\n FHTML := TStringList.Create;\r\n FHTML.SkipLastLinebreak := true;\r\n FHTML.OnChange := HTMLChanged;\r\n FScrollStyle := ssBoth;\r\n if (csDesigning in ComponentState) then\r\n begin\r\n Width := 240;\r\n Height := 160;\r\n end;\r\nend;\r\n\r\ndestructor THTMLContainer.Destroy;\r\nbegin\r\n FHTML.Free;\r\n inherited;\r\nend;\r\n\r\nprocedure THTMLContainer.DoLoaded;\r\nbegin\r\n if Assigned(OnLoaded) then\r\n OnLoaded(Self);\r\nend;\r\n\r\nprocedure THTMLContainer.HTMLChanged(Sender: TObject);\r\nbegin\r\n UpdateElement;\r\nend;\r\n\r\nfunction THTMLContainer.LoadFromURL(AURL: string): TJSPromise;\r\nvar\r\n wr: TWebHTTPRequest;\r\n\r\nbegin\r\n Result := TJSPromise.new(\r\n procedure(ASuccess, AFailed: TJSPromiseResolver)\r\n begin\r\n wr := TWebHttpRequest.Create(self);\r\n wr.URL := AURL;\r\n\r\n wr.Execute(procedure(AResponse: string; ARequest: TJSXMLHttpRequest)\r\n begin\r\n HTML.Text := AResponse;\r\n DoLoaded;\r\n ASuccess(true);\r\n end,\r\n procedure(ARequest: TJSXMLHttpRequest)\r\n begin\r\n AFailed(false);\r\n end);\r\n end);\r\nend;\r\n\r\nprocedure THTMLContainer.SetHTML(const Value: TStringList);\r\nbegin\r\n FHTML.Assign(Value);\r\nend;\r\n\r\nprocedure THTMLContainer.SetURL(const Value: string);\r\nbegin\r\n FURL := Value;\r\n LoadFromURL(FURL);\r\nend;\r\n\r\nprocedure THTMLContainer.UpdateElement;\r\nvar\r\n TextFound: Boolean;\r\nbegin\r\n inherited;\r\n\r\n if not IsUpdating and Assigned(ElementHandle) and Assigned(Container) then\r\n begin\r\n if (ElementClassname <> '') then\r\n begin\r\n ElementHandle.style.removeProperty('border');\r\n ElementHandle.style.removeProperty('background-color');\r\n end\r\n else\r\n ElementHandle.style.setProperty('white-space','normal');\r\n\r\n if Assigned(FHTML) then\r\n begin\r\n TextFound := FHTML.Text <> '';\r\n Container.innerHTML := FHTML.Text;\r\n end;\r\n\r\n if not IsLinked and (csDesigning in ComponentState) then\r\n RenderDesigning(ClassName, Container, Self, (not TextFound));\r\n\r\n if not IsLinked then\r\n begin\r\n SetHTMLElementFont(TJSHTMLElement(ElementHandle), Font, ElementFont = efCSS );\r\n end;\r\n\r\n case ScrollStyle of\r\n ssBoth: ElementHandle.style.setProperty('overflow','auto');\r\n ssNone: ElementHandle.style.setProperty('overflow','');\r\n ssVertical: ElementHandle.style.setProperty('overflow-y','auto');\r\n ssHorizontal: ElementHandle.style.setProperty('overflow-x','auto');\r\n end;\r\n end;\r\nend;\r\n\r\n\r\n{ THMTMLForm }\r\n\r\n{$HINTS OFF}\r\nprocedure THTMLForm.BindEvents;\r\nbegin\r\n inherited;\r\n GetChildContainer.addEventListener('submit',@DoHandleSubmit);\r\nend;\r\n\r\nfunction THTMLForm.CheckValidity: boolean;\r\nvar\r\n el: TJSHTMLElement;\r\n res: boolean;\r\nbegin\r\n el := ElementHandle;\r\n asm\r\n res = el.checkValidity();\r\n end;\r\n Result := res;\r\nend;\r\n\r\nfunction THTMLForm.GetChildContainer: TJSElement;\r\nbegin\r\n if (csDesigning in ComponentState) then\r\n Result := ElementHandle\r\n else\r\n begin\r\n if IsLinked then\r\n Result := ElementHandle\r\n else\r\n Result := TJSElement(ElementHandle.firstChild);\r\n end;\r\nend;\r\n\r\n{$HINTS ON}\r\n\r\nfunction THTMLForm.CreateElement: TJSElement;\r\nbegin\r\n Result := document.createElement('DIV');\r\n Result.appendChild(document.createElement('FORM'));\r\nend;\r\n\r\nprocedure THTMLForm.CreateInitialize;\r\nbegin\r\n inherited;\r\n EnablePropagation := true;\r\n ControlStyle := ControlStyle + [csAcceptsControls];\r\n if (csDesigning in ComponentState) then\r\n begin\r\n Width := 400;\r\n Height := 300;\r\n end;\r\nend;\r\n\r\nfunction THTMLForm.DoHandleSubmit(Event: TJSEvent): boolean;\r\nbegin\r\n ElementEvent := Event;\r\n if Assigned(OnSubmit) then\r\n OnSubmit(Self);\r\n Result := true;\r\nend;\r\n\r\nprocedure THTMLForm.SetAction(const Value: string);\r\nvar\r\n el: TJSElement;\r\nbegin\r\n FAction := Value;\r\n\r\n if not (csDesigning in ComponentState) then\r\n begin\r\n if IsLinked then\r\n el := ElementHandle\r\n else\r\n el := GetChildContainer;\r\n\r\n if Assigned(el) then\r\n el['action'] := FAction;\r\n end;\r\nend;\r\n\r\nprocedure THTMLForm.UpdateElement;\r\nbegin\r\n if not Assigned(ElementHandle) then\r\n Exit;\r\n\r\n inherited;\r\n\r\n if (csDesigning in ComponentState) then\r\n TJSHTMLElement(ElementHandle).style.setProperty('background','repeating-linear-gradient(45deg,#EEEEEE 10px,#EEEEEE 10px, #ffffff 20px)');\r\nend;\r\n\r\n{ TBadge }\r\n\r\nfunction TBadge.CreateElement: TJSElement;\r\nbegin\r\n Result := document.createElement('SPAN');\r\nend;\r\n\r\nprocedure TBadge.CreateInitialize;\r\nvar\r\n css: string;\r\nbegin\r\n inherited;\r\n Color := clRed;\r\n FTextColor := clWhite;\r\n FText := '1';\r\n\r\n css := 'span.tmsbadge {' +\r\n ' background: #FF0000;' +\r\n ' border-radius: 0.8em;' +\r\n ' -moz-border-radius: 0.8em;' +\r\n ' -webkit-border-radius: 0.8em;' +\r\n ' color: #ffffff;' +\r\n ' display: inline-block;' +\r\n ' line-height: 1.6em;' +\r\n ' margin-right: 5px;' +\r\n ' text-align: center;' +\r\n ' width: 1.6em;' +\r\n '}';\r\n\r\n AddControlStyle(css);\r\n\r\n if (csDesigning in ComponentState) then\r\n begin\r\n Width := 20;\r\n Height := 20;\r\n end;\r\nend;\r\n\r\ndestructor TBadge.Destroy;\r\nbegin\r\n\r\n inherited;\r\nend;\r\n\r\nprocedure TBadge.SetElementClassName(AValue: string);\r\nbegin\r\n inherited;\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TBadge.SetText(const Value: string);\r\nbegin\r\n FText := Value;\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TBadge.SetTextColor(const Value: TColor);\r\nbegin\r\n FTextColor := Value;\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TBadge.UpdateElement;\r\nbegin\r\n inherited;\r\n\r\n if Assigned(ElementHandle) then\r\n begin\r\n ElementHandle.innerHTML := FText;\r\n\r\n if ElementClassName = '' then\r\n begin\r\n ElementHandle.setAttribute('class','tmsbadge');\r\n ElementHandle.style.setProperty('color',ColorToHTML(TextColor));\r\n end\r\n else\r\n begin\r\n ElementHandle.style.removeProperty('color');\r\n end;\r\n\r\n ElementHandle.style.removeProperty('width');\r\n ElementHandle.style.removeProperty('height');\r\n end;\r\nend;\r\n\r\n{ TAccordion }\r\n\r\nprocedure TAccordion.Collapse(ASection: TAccordionSection);\r\nvar\r\n el,pnl: TJSHTMLElement;\r\n LClass: string;\r\nbegin\r\n el := ASection.CaptionElement;\r\n\r\n LClass := 'accordionactive_'+Name;\r\n\r\n if el.classList.contains(LClass) then\r\n el.classList.remove(LClass);\r\n\r\n pnl := TJSHTMLElement(el.nextElementSibling);\r\n pnl.style.setProperty('max-height','0')\r\nend;\r\n\r\nfunction TAccordion.CreateElement: TJSElement;\r\nbegin\r\n Result := document.createElement('DIV');\r\nend;\r\n\r\nprocedure TAccordion.CreateInitialize;\r\nbegin\r\n inherited;\r\n\r\n FSections := TAccordionSections.Create(Self);\r\n FSections.OnChange := SectionsChanged;\r\n FSections.PropName := 'Sections';\r\n FStyleRendered := false;\r\n\r\n if (csDesigning in ComponentState) then\r\n begin\r\n Width := 400;\r\n Height := 300;\r\n end;\r\nend;\r\n\r\ndestructor TAccordion.Destroy;\r\nbegin\r\n FSections.Free;\r\n inherited;\r\nend;\r\n\r\nfunction TAccordion.DoAccordionClick(Event: TJSEvent): Boolean;\r\nvar\r\n el: TJSElement;\r\n pnl: TJSHTMLElement;\r\n s: string;\r\n Allow: boolean;\r\n ASection: TAccordionSection;\r\n i,e: integer;\r\nbegin\r\n asm\r\n el = Event.srcElement;\r\n end;\r\n\r\n Allow := true;\r\n ASection := nil;\r\n\r\n if el.hasAttribute('id') then\r\n begin\r\n s := el['id'];\r\n s := Copy(s, pos(Name,s) + Length(Name) + 1, Length(s));\r\n val(s,i,e);\r\n\r\n if (e = 0) and (i < Sections.Count) then\r\n ASection := Sections[i];\r\n end;\r\n\r\n if el.classlist.contains('accordionactive_'+Name) then\r\n begin\r\n if Assigned(OnCollapsing) then\r\n OnCollapsing(Self, ASection, Allow);\r\n end\r\n else\r\n begin\r\n if Assigned(OnExpanding) then\r\n OnExpanding(Self, ASection, Allow);\r\n end;\r\n\r\n if not Allow then\r\n Exit;\r\n\r\n el.classList.toggle('accordionactive_'+Name);\r\n\r\n pnl := TJSHTMLElement(el.nextElementSibling);\r\n\r\n if Assigned(ASection.Control) then\r\n begin\r\n ASection.Control.ElementPosition := epRelative;\r\n pnl.appendChild(ASection.Control.ElementHandle);\r\n ASection.Control.Visible := true;\r\n end;\r\n\r\n s := pnl.style.getPropertyValue('max-height');\r\n\r\n if (s <> '0px') and (s <> '') then\r\n begin\r\n pnl.style.setProperty('max-height','0')\r\n end\r\n else\r\n begin\r\n pnl.style.setProperty('max-height', IntToStr(pnl.scrollHeight) + 'px');\r\n end;\r\n\r\n if el.classlist.contains('accordionactive_'+Name) then\r\n begin\r\n ASection.FExpanded := true;\r\n if Assigned(OnExpanded) then\r\n OnExpanded(Self, ASection);\r\n end\r\n else\r\n begin\r\n ASection.FExpanded := false;\r\n if Assigned(OnCollapsed) then\r\n OnCollapsed(Self, ASection);\r\n end;\r\n\r\n Result := true;\r\nend;\r\n\r\nprocedure TAccordion.EndUpdate;\r\nbegin\r\n inherited;\r\n RenderStyle;\r\n RenderAccordion;\r\nend;\r\n\r\nprocedure TAccordion.Expand(ASection: TAccordionSection);\r\nvar\r\n el,pnl: TJSHTMLElement;\r\n LClass: string;\r\nbegin\r\n el := ASection.CaptionElement;\r\n\r\n LClass := 'accordionactive_'+Name;\r\n\r\n if not el.classList.contains(LClass) then\r\n el.classList.add(LClass);\r\n\r\n pnl := TJSHTMLElement(el.nextElementSibling);\r\n pnl.style.setProperty('max-height', IntToStr(pnl.scrollHeight) + 'px');\r\nend;\r\n\r\nprocedure TAccordion.Loaded;\r\nvar\r\n i: integer;\r\nbegin\r\n inherited;\r\n for i := 0 to Sections.Count - 1 do\r\n begin\r\n if Assigned(Sections[i].Control) then\r\n Sections[i].Control.Visible := false;\r\n end;\r\nend;\r\n\r\nprocedure TAccordion.RenderAccordion;\r\nvar\r\n i: integer;\r\n sp,btn,divel,p: TJSHTMLElement;\r\n LCaptionElementRec, LPanelElementRec: TJSHTMLElementRecord;\r\n\r\nbegin\r\n if ElementHandle.childNodes.length > 0 then\r\n begin\r\n while Assigned(ElementHandle.firstChild) do\r\n ElementHandle.removeChild(ElementHandle.firstChild);\r\n\r\n if ElementClassname <> '' then\r\n begin\r\n ElementHandle.style.removeProperty('border');\r\n ElementHandle.style.removeProperty('background-color');\r\n end;\r\n end;\r\n\r\n sp := TJSHTMLElement(document.createElement('SPAN'));\r\n ElementHandle.appendChild(sp);\r\n\r\n for i := 0 to FSections.Count - 1 do\r\n begin\r\n btn := TJSHTMLElement(document.createElement('BUTTON'));\r\n btn.innerHTML := FSections.Items[i].Caption;\r\n btn['id'] := Name + '_' + inttostr(i);\r\n btn.setAttribute('class','accordion_'+Name);\r\n if ElementSectionClassName <> '' then\r\n btn.classList.Add(ElementSectionClassName);\r\n\r\n btn.addEventListener('click',@DoAccordionClick);\r\n divel := TJSHTMLElement(document.createElement('DIV'));\r\n divel.setAttribute('class','accordionpanel_'+Name);\r\n p := TJSHTMLElement(document.createElement('P'));\r\n p.style.SetProperty('user-select','text');\r\n if ElementContentClassName <> '' then\r\n p.setAttribute('class',ElementContentClassName);\r\n\r\n p.innerHTML := FSections[i].Content;\r\n\r\n sp.appendChild(btn);\r\n sp.appendChild(divel);\r\n divel.appendChild(p);\r\n\r\n if Assigned(OnRenderSection) then\r\n begin\r\n LCaptionElementRec.element := btn;\r\n LPanelElementRec.element := p;\r\n OnRenderSection(Self, FSections.Items[i], LCaptionElementRec, LPanelElementRec);\r\n end;\r\n end;\r\n\r\n if not IsLinked and (csDesigning in ComponentState) then\r\n RenderDesigning(Classname, Container, Self, (FSections.Count = 0));\r\nend;\r\n\r\nprocedure TAccordion.RenderStyle;\r\nvar\r\n css: string;\r\nbegin\r\n if FStyleRendered then\r\n Exit;\r\n\r\n FStyleRendered := true;\r\n\r\n css :=\r\n '.accordion_'+ Name +' {'+\r\n 'background-color: #eee;'+\r\n 'color: #444;'+\r\n 'cursor: pointer;'+\r\n 'padding: 18px;'+\r\n 'width: 100%;'+\r\n 'text-align: left;'+\r\n 'border: none;' +\r\n 'outline: none;' +\r\n 'transition: 0.4s;'+\r\n '}' +#13#10 +\r\n\r\n '.accordionactive_'+Name+', .accordion_'+Name+'::hover {'+\r\n 'background-color: #ccc;'+\r\n '}' +#13#10 +\r\n\r\n '.accordionactive_'+Name+'::before {'+\r\n 'transform: rotate(90deg);'+\r\n '}' +#13#10 +\r\n\r\n '.accordion_'+Name+'::before {'+\r\n ' content: \"\\25B6\";'+\r\n ' font-size: 13px;'+\r\n// ' color: #777;'+\r\n ' display: inline-block;'+\r\n ' margin-right: 5px;'+\r\n '}' +#13#10 +\r\n\r\n '.accordionpanel_'+Name+' {'+\r\n 'padding: 0 18px;'+\r\n// 'background-color: white;'+\r\n 'max-height: 0;'+\r\n 'overflow: hidden;'+\r\n 'transition: max-height 0.2s ease-out;'+\r\n '}';\r\n\r\n AddInstanceStyle(css);\r\nend;\r\n\r\nprocedure TAccordion.SectionsChanged(Sender: TObject);\r\nbegin\r\n if not IsUpdating then\r\n begin\r\n RenderStyle;\r\n RenderAccordion;\r\n end;\r\nend;\r\n\r\nprocedure TAccordion.SetElementClassName(AValue: string);\r\nbegin\r\n inherited;\r\n if ElementClassname <> '' then\r\n RenderAccordion;\r\nend;\r\n\r\nprocedure TAccordion.SetSections(const Value: TAccordionSections);\r\nbegin\r\n FSections.Assign(Value);\r\nend;\r\n\r\nprocedure TAccordion.UpdateElement;\r\nbegin\r\n inherited;\r\nend;\r\n\r\nprocedure TAccordion.UpdateElementVisual;\r\nbegin\r\n inherited;\r\n ElementHandle.style.setProperty('overflow-y','auto');\r\n ElementHandle.style.setProperty('overflow-x','hidden');\r\nend;\r\n\r\n{ TAccordionSections }\r\n\r\nfunction TAccordionSections.Add: TAccordionSection;\r\nbegin\r\n Result := TAccordionSection(inherited Add);\r\nend;\r\n\r\nconstructor TAccordionSections.Create(AOwner: TComponent);\r\nbegin\r\n inherited Create(AOwner, TAccordionSection);\r\nend;\r\n\r\nfunction TAccordionSections.GetItem(Index: integer): TAccordionSection;\r\nbegin\r\n Result := TAccordionSection(inherited Items[Index]);\r\nend;\r\n\r\nfunction TAccordionSections.Insert(Index: integer): TAccordionSection;\r\nbegin\r\n Result := TAccordionSection(inherited Insert(Index));\r\nend;\r\n\r\nprocedure TAccordionSections.SetItem(Index: integer;\r\n const Value: TAccordionSection);\r\nbegin\r\n inherited Items[Index] := Value;\r\nend;\r\n\r\nprocedure TAccordionSections.Update(Item: TCollectionItem);\r\nbegin\r\n inherited;\r\n\r\n if Assigned(OnChange) and (UpdateCount = 0) then\r\n OnChange(Self);\r\nend;\r\n\r\n{ TResponsiveGridPanel }\r\n\r\nprocedure TResponsiveGridPanel.AddControl(AControl: TWinControl);\r\nbegin\r\n FControlCollection.Add.Control := AControl;\r\n AControl.Parent := Self;\r\nend;\r\n\r\nprocedure TResponsiveGridPanel.AlignControls(AControl: TControl;\r\n var Rect: TRect);\r\nbegin\r\n inherited;\r\n Resize;\r\nend;\r\n\r\nprocedure TResponsiveGridPanel.BindEvents;\r\nbegin\r\n inherited;\r\n FResizePtr := @HandleResize;\r\n document.defaultView.addEventListener('resize', FResizePtr);\r\nend;\r\n\r\nconstructor TResponsiveGridPanel.Create(AOwner: TComponent);\r\nbegin\r\n inherited;\r\n FResizePtr := nil;\r\nend;\r\n\r\nfunction TResponsiveGridPanel.CreateElement: TJSElement;\r\nbegin\r\n if (csDesigning in ComponentState) and (ControlCollection.Count = 0) then\r\n begin\r\n Result := document.createElement('DIV');\r\n FLabel := TJSHTMLElement(document.createElement('DIV'));\r\n FLabel.innerHTML := ClassName;\r\n BorderStyle := bsSingle;\r\n FLabel['align'] := 'center';\r\n FLabel.style.setProperty('border','1px solid silver');\r\n FLabel.style.setProperty('vertical-align','middle');\r\n FLabel.style.setProperty('display','table-cell');\r\n Result.appendChild(FLabel);\r\n end\r\n else\r\n begin\r\n Result := document.createElement('DIV');\r\n end;\r\nend;\r\n\r\nprocedure TResponsiveGridPanel.CreateInitialize;\r\nvar\r\n li: TResponsiveLayoutItem;\r\nbegin\r\n inherited;\r\n FDesignTime := (csDesigning in ComponentState) and not\r\n ((csReading in Owner.ComponentState) or (csLoading in Owner.ComponentState));\r\n\r\n EnablePropagation := true;\r\n ControlStyle := ControlStyle + [csAcceptsControls];\r\n FControlCollection := TControlCollection.Create(Self);\r\n FControlCollection.PropName := 'ControlCollection';\r\n if (csDesigning in ComponentState) then\r\n begin\r\n Width := 400;\r\n Height := 300;\r\n end;\r\n\r\n FLabel := nil;\r\n FActiveLayoutItem := nil;\r\n FLayout := TResponsiveLayout.Create(Self);\r\n FLayout.OnChange := LayoutChanged;\r\n FLayout.PropName := 'Layout';\r\n\r\n if FDesignTime then\r\n begin\r\n li := FLayout.Add;\r\n li.Description := 'Smartphone';\r\n li.Width := 575;\r\n li.Style := '1fr';\r\n\r\n li := FLayout.Add;\r\n li.Description := 'Tablet';\r\n li.Width := 768;\r\n li.Style := '1fr 1fr';\r\n\r\n li := FLayout.Add;\r\n li.Description := 'Desktop';\r\n li.Width := 991;\r\n li.Style := '1fr 1fr 1fr';\r\n\r\n li := FLayout.Add;\r\n li.Description := 'Large Desktop';\r\n li.Width := 1199;\r\n li.Style := '1fr 1fr 1fr 1fr';\r\n\r\n end;\r\nend;\r\n\r\ndestructor TResponsiveGridPanel.Destroy;\r\nbegin\r\n FControlCollection.Free;\r\n FLayout.Free;\r\n inherited;\r\nend;\r\n\r\nprocedure TResponsiveGridPanel.EndUpdate;\r\nbegin\r\n inherited;\r\n UpdateControls;\r\nend;\r\n\r\nprocedure TResponsiveGridPanel.GetChildren(Proc: TGetChildProc;\r\n Root: TComponent);\r\n//var\r\n// i: integer;\r\nbegin\r\n inherited;\r\n// for i := 0 to ControlCollection.Count - 1 do\r\n// begin\r\n// if Assigned(ControlCollection.Items[i].Control) then\r\n// Proc(ControlCollection.Items[i].Control);\r\n// end;\r\nend;\r\n\r\nfunction TResponsiveGridPanel.GridElementCount: integer;\r\nvar\r\n i: integer;\r\n el: TJSHTMLElement;\r\nbegin\r\n Result := 0;\r\n\r\n for i := 0 to ElementHandle.childElementCount - 1 do\r\n begin\r\n el := TJSHTMLElement(ElementHandle.children[i]);\r\n if (el['data'] = 'grid') then\r\n inc(Result);\r\n end;\r\nend;\r\n\r\nfunction TResponsiveGridPanel.HandleResize(Event: TEventListenerEvent): boolean;\r\nvar\r\n w: integer;\r\nbegin\r\n if (csDestroying in ComponentState) then\r\n Exit;\r\n\r\n Result := true;\r\n w := Width;\r\n if FOldWidth <> w then\r\n begin\r\n FOldWidth := w;\r\n Resize;\r\n end;\r\nend;\r\n\r\nprocedure TResponsiveGridPanel.LayoutChanged(Sender: TObject);\r\nbegin\r\n inherited;\r\n\r\n if IsUpdating or (csLoading in ComponentState) then\r\n Exit;\r\n\r\n UpdateControls;\r\nend;\r\n\r\nprocedure TResponsiveGridPanel.Loaded;\r\nbegin\r\n inherited;\r\n UpdateControls;\r\nend;\r\n\r\nprocedure TResponsiveGridPanel.Notification(AComponent: TComponent;\r\n Operation: TOperation);\r\nvar\r\n i: integer;\r\n upd: boolean;\r\n el: TJSHTMLElement;\r\n\r\nbegin\r\n upd := false;\r\n\r\n if (Operation = opRemove) and not (csDestroying in ComponentState) then\r\n begin\r\n for i := ControlCollection.Count - 1 downto 0 do\r\n begin\r\n if (ControlCollection.Items[i].Control = AComponent) then\r\n begin\r\n el := TJSHTMLElement(ElementHandle.children[i]);\r\n while el.childElementCount > 0 do\r\n el.removeChild(el.firstChild);\r\n\r\n ControlCollection.Items[i].Control := nil;\r\n ControlCollection.Delete(i);\r\n upd := true;\r\n end;\r\n end;\r\n end;\r\n\r\n inherited;\r\n\r\n if upd then\r\n UpdateControls;\r\nend;\r\n\r\nprocedure TResponsiveGridPanel.RegisterParent(AValue: TControl);\r\nbegin\r\n inherited;\r\n\r\n if not IsUpdating and not (csLoading in ComponentState) then\r\n begin\r\n ControlCollection.Add.Control := TWinControl(AValue);\r\n UpdateControls;\r\n end;\r\n\r\nend;\r\n\r\nprocedure TResponsiveGridPanel.RemoveControl(AControl: TWinControl);\r\nvar\r\n i: integer;\r\n\r\nbegin\r\n for i := 0 to FControlCollection.Count - 1 do\r\n begin\r\n if FControlCollection.Items[i].Control = AControl then\r\n begin\r\n FControlCollection.Delete(i);\r\n break;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TResponsiveGridPanel.RemoveControls;\r\nvar\r\n i: integer;\r\nbegin\r\n for i := FControlCollection.Count - 1 downto 0 do\r\n begin\r\n FControlCollection.Delete(i);\r\n end;\r\nend;\r\n\r\nprocedure TResponsiveGridPanel.Resize;\r\nbegin\r\n inherited;\r\n SetResponsiveStyle;\r\nend;\r\n\r\nprocedure TResponsiveGridPanel.SetControlCollection(\r\n const Value: TControlCollection);\r\nbegin\r\n FControlCollection.Assign(Value);\r\nend;\r\n\r\nprocedure TResponsiveGridPanel.SetResponsiveStyle;\r\nvar\r\n li: TResponsiveLayoutItem;\r\n w: integer;\r\n lGap: string;\r\nbegin\r\n if not Assigned(Layout) then\r\n Exit;\r\n\r\n if (csDestroying in ComponentState) then\r\n Exit;\r\n\r\n if not Assigned(ElementHandle) then\r\n Exit;\r\n\r\n w := Width;\r\n\r\n li := Layout.GetLayoutForWidth(w);\r\n\r\n if Assigned(li) then\r\n begin\r\n if li.StyleType = gTemplateColumns then\r\n begin\r\n ElementHandle.style.setProperty('grid-template-columns', li.Style);\r\n ElementHandle.style.removeProperty('grid-template-rows');\r\n end\r\n else\r\n begin\r\n ElementHandle.style.removeProperty('grid-template-columns');\r\n ElementHandle.style.setProperty('grid-template-rows', li.Style);\r\n end;\r\n\r\n lGap := li.RowGap;\r\n if lGap.IsNumber then\r\n lGap := lGap + 'px';\r\n\r\n ElementHandle.style.setProperty('grid-row-gap', lGap);\r\n\r\n lGap := li.ColumnGap;\r\n if lGap.IsNumber then\r\n lGap := lGap + 'px';\r\n\r\n ElementHandle.style.setProperty('grid-column-gap', lGap);\r\n\r\n ElementHandle.style.setProperty('padding-left', inttostr(li.Margins.Left)+'px');\r\n ElementHandle.style.setProperty('padding-top', inttostr(li.Margins.Top)+'px');\r\n ElementHandle.style.setProperty('padding-right', inttostr(li.Margins.Right)+'px');\r\n ElementHandle.style.setProperty('padding-bottom', inttostr(li.Margins.Bottom)+'px');\r\n end;\r\n\r\n if li <> FActiveLayoutItem then\r\n begin\r\n FActiveLayoutItem := li;\r\n if Assigned(OnLayoutChange) then\r\n OnLayoutChange(Self, FActiveLayoutItem);\r\n end;\r\nend;\r\n\r\nprocedure TResponsiveGridPanel.UnbindEvents;\r\nbegin\r\n inherited;\r\n if Assigned(FResizePtr) then\r\n begin\r\n document.defaultView.removeEventListener('resize', FResizePtr);\r\n FResizePtr := nil;\r\n end;\r\nend;\r\n\r\nprocedure TResponsiveGridPanel.UpdateControls;\r\nvar\r\n i,j,k: integer;\r\n el,sp: TJSHTMLElement;\r\n fragment: TJSDocumentFragment;\r\n control: TControl;\r\nbegin\r\n if (csLoading in ComponentState) then\r\n Exit;\r\n\r\n if IsUpdating then\r\n Exit;\r\n\r\n if not Assigned(ElementHandle) then\r\n Exit;\r\n\r\n if (ControlCollection.Count > 0) and Assigned(FLabel) then\r\n begin\r\n ElementHandle.removeChild(FLabel);\r\n FLabel := nil;\r\n ElementHandle.style.setProperty('display','grid');\r\n end;\r\n\r\n if (csDesigning in ComponentState) then\r\n begin\r\n for i := ElementHandle.childElementCount - 1 downto 0 do\r\n begin\r\n if TJSElement(ElementHandle.children[i]).tagName = 'SPAN' then\r\n ElementHandle.removeChild(ElementHandle.children[i]);\r\n end;\r\n\r\n for i := 0 to Layout.Count - 1 do\r\n begin\r\n sp := TJSHTMLElement(document.createElement('SPAN'));\r\n sp.style.setProperty('position','absolute');\r\n sp.style.setProperty('width','4px');\r\n sp.style.setProperty('height','12px');\r\n sp.style.setProperty('background-color','red');\r\n sp.style.setProperty('top','0px');\r\n sp.style.setProperty('left', IntToStr(Layout.Items[i].Width)+'px');\r\n ElementHandle.appendChild(sp);\r\n end;\r\n end;\r\n\r\n for i := 0 to ControlCollection.Count - 1 do\r\n begin\r\n if GridElementCount <= i then\r\n begin\r\n el := TJSHTMLElement(document.createElement('DIV'));\r\n el['data'] := 'grid';\r\n\r\n if (csDesigning in ComponentState) then\r\n el.style.setProperty('border','1px silver dotted');\r\n\r\n ElementHandle.appendChild(el);\r\n end\r\n else\r\n begin\r\n k := 0;\r\n for j := 0 to ElementHandle.ChildElementCount - 1 do\r\n begin\r\n el := TJSHTMLElement(ElementHandle.children[j]);\r\n if (el['data'] = 'grid') then\r\n begin\r\n if (k = i) then\r\n break\r\n else\r\n inc(k);\r\n end;\r\n end;\r\n end;\r\n\r\n fragment := document.createDocumentFragment();\r\n control := ControlCollection.Items[i].Control;\r\n if Assigned(control) then\r\n begin\r\n control.ElementPosition := epRelative;\r\n control.ChildOrder := -1;\r\n if Assigned(control.ElementHandle) then\r\n begin\r\n fragment.appendChild(control.ElementHandle);\r\n el.appendChild(fragment);\r\n end;\r\n end;\r\n end;\r\n\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TResponsiveGridPanel.UpdateElement;\r\nbegin\r\n inherited;\r\n\r\n if (csDestroying in ComponentState) then\r\n Exit;\r\n\r\n if not Assigned(ElementHandle) then\r\n Exit;\r\n\r\n if (csDesigning in ComponentState) then\r\n begin\r\n if (ControlCollection.Count = 0) then\r\n begin\r\n TJSHTMLElement(ElementHandle).style.setProperty('display','table');\r\n if (Color = clNone) then\r\n TJSHTMLElement(ElementHandle).style.setProperty('background-color','silver');\r\n end;\r\n end;\r\n\r\n if (csDesigning in ComponentState) then\r\n begin\r\n ElementHandle.style.setProperty('border','1px silver dotted');\r\n end;\r\n\r\n ElementHandle.style.setProperty('display','grid');\r\n SetResponsiveStyle;\r\nend;\r\n\r\n{ TLayout }\r\n\r\nfunction TResponsiveLayout.Add: TResponsiveLayoutItem;\r\nbegin\r\n Result := TResponsiveLayoutItem(inherited Add);\r\nend;\r\n\r\nfunction TResponsiveLayout.Add(AWidth: integer;\r\n AStyle: string): TResponsiveLayoutItem;\r\nbegin\r\n Result := Add;\r\n Result.Width := AWidth;\r\n Result.Style := AStyle;\r\nend;\r\n\r\nconstructor TResponsiveLayout.Create(AOwner: TComponent);\r\nbegin\r\n inherited Create(AOwner, TResponsiveLayoutItem);\r\nend;\r\n\r\nfunction TResponsiveLayout.GetItem(Index: integer): TResponsiveLayoutItem;\r\nbegin\r\n Result := TResponsiveLayoutItem(inherited Items[Index]);\r\nend;\r\n\r\nfunction TResponsiveLayout.GetLayoutForWidth(w: integer): TResponsiveLayoutItem;\r\nvar\r\n i,d,j,l,mx: integer;\r\n\r\nbegin\r\n Result := nil;\r\n if Count = 0 then\r\n Exit;\r\n\r\n d := $FFFF;\r\n j := -1;\r\n mx := 0;\r\n\r\n for i := 0 to Count - 1 do\r\n begin\r\n if Items[i].Width > mx then\r\n begin\r\n mx := Items[i].Width;\r\n l := i;\r\n end;\r\n\r\n if w < Items[i].Width then\r\n begin\r\n if Items[i].Width - w < d then\r\n begin\r\n d := Items[i].Width - w;\r\n j := i;\r\n end;\r\n end;\r\n end;\r\n\r\n if j = -1 then\r\n j := l;\r\n\r\n Result := Items[j];\r\nend;\r\n\r\nfunction TResponsiveLayout.Insert(Index: integer): TResponsiveLayoutItem;\r\nbegin\r\n Result := TResponsiveLayoutItem(inherited Insert(Index));\r\nend;\r\n\r\nprocedure TResponsiveLayout.SetItem(Index: integer; const Value: TResponsiveLayoutItem);\r\nbegin\r\n inherited Items[Index] := Value;\r\nend;\r\n\r\nprocedure TResponsiveLayout.Update(Item: TCollectionItem);\r\nbegin\r\n inherited;\r\n if Assigned(OnChange) then\r\n OnChange(Self);\r\nend;\r\n\r\n{ TResponsiveLayoutItem }\r\n\r\nprocedure TResponsiveLayoutItem.Assign(Source: TPersistent);\r\nbegin\r\n if (Source is TResponsiveLayoutItem) then\r\n begin\r\n FColumnGap := (Source as TResponsiveLayoutItem).ColumnGap;\r\n FDescription := (Source as TResponsiveLayoutItem).Description;\r\n FRowGap := (Source as TResponsiveLayoutItem).RowGap;\r\n FWidth := (Source as TResponsiveLayoutItem).Width;\r\n FStyle := (Source as TResponsiveLayoutItem).Style;\r\n FStyleType := (Source as TResponsiveLayoutItem).StyleType;\r\n FTag := (Source as TResponsiveLayoutItem).Tag;\r\n FMargins.Assign((Source as TResponsiveLayoutItem).Margins);\r\n end;\r\nend;\r\n\r\nconstructor TResponsiveLayoutItem.Create(AOwner: TCollection);\r\nbegin\r\n FMargins := TMargins.Create;\r\n FMargins.Left := 0;\r\n FMargins.Top := 0;\r\n FMargins.Right := 0;\r\n FMargins.Bottom := 0;\r\n\r\n inherited;\r\n\r\nend;\r\n\r\ndestructor TResponsiveLayoutItem.Destroy;\r\nbegin\r\n FMargins.Free;\r\n inherited;\r\nend;\r\n\r\nprocedure TResponsiveLayoutItem.SetColumnGap(const Value: string);\r\nbegin\r\n if (FColumnGap <> Value) then\r\n begin\r\n FColumnGap := Value;\r\n TResponsiveLayout(Collection).Update(Self);\r\n end;\r\nend;\r\n\r\nprocedure TResponsiveLayoutItem.SetMargins(const Value: TMargins);\r\nbegin\r\n FMargins.Assign(Value);\r\n TResponsiveLayout(Collection).Update(Self);\r\nend;\r\n\r\nprocedure TResponsiveLayoutItem.SetRowGap(const Value: string);\r\nbegin\r\n if (FRowGap <> Value) then\r\n begin\r\n FRowGap := Value;\r\n TResponsiveLayout(Collection).Update(Self);\r\n end;\r\nend;\r\n\r\nprocedure TResponsiveLayoutItem.SetStyle(const Value: string);\r\nbegin\r\n if (FStyle <> Value) then\r\n begin\r\n FStyle := Value;\r\n TResponsiveLayout(Collection).Update(Self);\r\n end;\r\nend;\r\n\r\nprocedure TResponsiveLayoutItem.SetStyleType(const Value: TGridStyle);\r\nbegin\r\n if (FStyleType <> Value) then\r\n begin\r\n FStyleType := Value;\r\n TResponsiveLayout(Collection).Update(Self);\r\n end;\r\nend;\r\n\r\nprocedure TResponsiveLayoutItem.SetWidth(const Value: integer);\r\nbegin\r\n if (FWidth <> Value) then\r\n begin\r\n FWidth := Value;\r\n TResponsiveLayout(Collection).Update(Self);\r\n end;\r\nend;\r\n\r\n{ TAccordionSection }\r\n\r\nprocedure TAccordionSection.Assign(Source: TPersistent);\r\nbegin\r\n if (Source is TAccordionSection) then\r\n begin\r\n FCaption := (Source as TAccordionSection).Caption;\r\n FContent := (Source as TAccordionSection).Content;\r\n FTag := (Source as TAccordionSection).Tag;\r\n end;\r\nend;\r\n\r\nfunction TAccordionSection.CaptionElement: TJSHTMLElement;\r\nbegin\r\n Result := TJSHTMLElement(document.getElementById(((Collection as TAccordionSections).Owner as TAccordion).Name+'_'+inttostr(Index)));\r\nend;\r\n\r\nfunction TAccordionSection.PanelElement: TJSHTMLElement;\r\nvar\r\n el: TJSHTMLElement;\r\nbegin\r\n el := CaptionElement;\r\n Result := TJSHTMLElement(el.nextElementSibling);\r\nend;\r\n\r\nprocedure TAccordionSection.SetCaption(const Value: string);\r\nbegin\r\n FCaption := Value;\r\n (Collection as TAccordionSections).Update(Self);\r\nend;\r\n\r\nprocedure TAccordionSection.SetContent(const Value: string);\r\nbegin\r\n FContent := Value;\r\n (Collection as TAccordionSections).Update(Self);\r\nend;\r\n\r\nprocedure TAccordionSection.SetExpanded(const Value: boolean);\r\nbegin\r\n if (FExpanded <> Value) then\r\n begin\r\n FExpanded := Value;\r\n\r\n if FExpanded then\r\n ((Collection as TAccordionSections).Owner as TAccordion).Expand(Self)\r\n else\r\n ((Collection as TAccordionSections).Owner as TAccordion).Collapse(Self);\r\n end;\r\nend;\r\n\r\n{ TImageZoomControl }\r\n\r\nfunction TImageZoomControl.CreateElement: TJSElement;\r\nbegin\r\n Result := inherited;\r\nend;\r\n\r\nprocedure TImageZoomControl.CreateInitialize;\r\nbegin\r\n inherited;\r\n FAppearance := TImageZoomAppearance.Create(Self);\r\n FPictureZoom := TURLPicture.Create;\r\n FPictureZoom.OnChange := PictureZoomChanged;\r\n FPictureZoom.OnDataChange := PictureZoomDataChanged;\r\n FPictureZoomDataURL := '';\r\n FZoomBkgColor := clBlack;\r\n FZoomBkgOpacity := 0.9;\r\n\r\n FStyle := document.createElement('STYLE');\r\n FOverlay := document.createElement('DIV');\r\n document.body.appendChild(FStyle);\r\n document.body.appendChild(FOverlay);\r\n\r\n if (csDesigning in ComponentState) then\r\n begin\r\n Width := 100;\r\n Height := 75;\r\n end;\r\nend;\r\n\r\ndestructor TImageZoomControl.Destroy;\r\nbegin\r\n FAppearance.Free;\r\n FPictureZoom.Free;\r\n inherited;\r\nend;\r\n\r\nprocedure TImageZoomControl.PictureZoomChanged(Sender: TObject);\r\nbegin\r\n SetURLZoom(PictureZoom.FileName);\r\n FPictureZoomDataURL := '';\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TImageZoomControl.PictureZoomDataChanged(Sender: TObject);\r\nbegin\r\n FPictureZoomDataURL := 'data:image/png;base64,' + HexImageDecodeAsBase64(PictureZoom.Data);\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TImageZoomControl.SetPictureZoom(const Value: TURLPicture);\r\nbegin\r\n FPictureZoom.Assign(Value);\r\nend;\r\n\r\nprocedure TImageZoomControl.SetURLZoom(const Value: string);\r\nbegin\r\n if FURLZoom <> Value then\r\n begin\r\n FURLZoom := Value;\r\n UpdateElement;\r\n end;\r\nend;\r\n\r\nprocedure TImageZoomControl.UpdateElement;\r\nvar\r\n PopupImage: string;\r\n Popup: TJSElement;\r\n r,g,b: byte;\r\n l: longint;\r\n op: string;\r\nbegin\r\n inherited;\r\n\r\n if not Assigned(ElementHandle) then\r\n Exit;\r\n\r\n if Assigned(FOverlay) then\r\n begin\r\n ElementHandle.setAttribute('onClick', 'document.getElementById(\"' + Name + 'myModal\").style.display = \"block\"');\r\n\r\n if FPictureZoomDataURL <> '' then\r\n PopupImage := FPictureZoomDataURL\r\n else\r\n PopupImage := URLZoom;\r\n\r\n if PopupImage = '' then\r\n PopupImage := URL;\r\n\r\n if IsLinked and (PopupImage = '') then\r\n begin\r\n PopupImage := ElementHandle['src'];\r\n end;\r\n\r\n op := floattostr(ZoomBkgOpacity);\r\n stringreplace(op,',','.',[rfReplaceAll]);\r\n l := ColorToRGB(ZoomBkgColor);\r\n r := GetRValue(l);\r\n g := GetGValue(l);\r\n b := GetBValue(l);\r\n\r\n FStyle.innerHTML := '.' + Name + 'modal-overlay {'#13\r\n + ' display: none;'#13\r\n + ' position: fixed;'#13\r\n + ' z-index: 99999999;'#13\r\n + ' width: 100%;'#13\r\n + ' height: 100%;'#13\r\n + ' overflow: hidden;'#13\r\n + ' top: 50%;'#13\r\n + ' left: 50%;'#13\r\n + ' -ms-transform: translate(-50%, -50%);'#13\r\n + ' transform: translate(-50%, -50%);'#13\r\n + ' background-color: rgba('+r.ToString+','+g.ToString+','+b.ToString+',0.2);'#13\r\n + '}'#13\r\n\r\n + '.' + Name + 'modal {'#13\r\n + ' display: block;'#13\r\n + ' position: absolute;'#13\r\n + ' z-index: 99999999;'#13\r\n + ' width: ' + IntToStr(Appearance.WidthPercent) + '%;'#13\r\n + ' height: ' + IntToStr(Appearance.HeightPercent) + '%;'#13\r\n + ' overflow: hidden;'#13\r\n + ' top: 50%;'#13\r\n + ' left: 50%;'#13\r\n + ' -ms-transform: translate(-50%, -50%);'#13\r\n + ' transform: translate(-50%, -50%);'#13\r\n + ' background-color: rgba('+r.ToString+','+g.ToString+','+b.ToString+','+op+');'#13\r\n + '}'#13\r\n\r\n + '.' + Name + 'modal-content {'#13\r\n + ' display: block;'#13\r\n + ' margin: 0;'#13\r\n + ' position: absolute;'#13\r\n + ' top: 50%;'#13\r\n + ' left: 50%;'#13\r\n + ' -ms-transform: translate(-50%, -50%);'#13\r\n + ' transform: translate(-50%, -50%);'#13\r\n + ' max-width: 100%;'#13\r\n + ' max-height: 100%;'#13\r\n + '}'#13\r\n\r\n + '.' + Name + 'close {'#13\r\n + ' z-index: 99999999;'#13\r\n + ' position: absolute;'#13\r\n + ' top: 15px;'#13\r\n + ' right: 35px;'#13\r\n + ' color: #f1f1f1;'#13\r\n + ' font-size: 40px;'#13\r\n + ' font-weight: bold;'#13\r\n + ' transition: 0.3s;'#13\r\n + '}'#13\r\n\r\n + '.' + Name + 'close:hover,'#13\r\n + '.' + Name + 'close:focus {'#13\r\n + ' color: #bbb;'#13\r\n + ' text-decoration: none;'#13\r\n + ' cursor: pointer;'#13\r\n + '}'#13\r\n\r\n + '@media only screen and (max-width: 769px) {'#13\r\n + '\t.' + Name + 'modal {'#13\r\n + ' width: ' + IntToStr(Appearance.ResponsiveWidthPercent) + '%;'#13\r\n + ' height: ' + IntToStr(Appearance.ResponsiveHeightPercent) + '%;'#13\r\n + '\t}'#13\r\n + '}'#13;\r\n\r\n FOverlay.setAttribute('onClick', 'this.style.display = \"none\";');\r\n FOverlay.setAttribute('id', Name + 'myModal');\r\n FOverlay.setAttribute('class', Name + 'modal-overlay');\r\n\r\n while Assigned(FOverlay.firstChild) do\r\n FOverlay.removeChild(FOverlay.firstChild);\r\n\r\n Popup := document.createElement('DIV');\r\n Popup.setAttribute('class', Name + 'modal');\r\n Popup.innerHTML := '×'\r\n + '';\r\n\r\n FOverlay.innerHTML := '';\r\n FOverlay.AppendChild(Popup);\r\n end;\r\nend;\r\n\r\n{ TImageZoomAppearance }\r\n\r\nprocedure TImageZoomAppearance.Assign(Source: TPersistent);\r\nbegin\r\n inherited;\r\n if (Source is TImageZoomAppearance) then\r\n begin\r\n FHeightPercent := (Source as TImageZoomAppearance).HeightPercent;\r\n FWidthPercent := (Source as TImageZoomAppearance).WidthPercent;\r\n FResponsiveHeightPercent := (Source as TImageZoomAppearance).ResponsiveHeightPercent;\r\n FResponsiveWidthPercent := (Source as TImageZoomAppearance).ResponsiveWidthPercent;\r\n FResponsiveMaxWidth := (Source as TImageZoomAppearance).ResponsiveMaxWidth;\r\n end;\r\nend;\r\n\r\nconstructor TImageZoomAppearance.Create(AOwner: TImageZoomControl);\r\nbegin\r\n FHeightPercent := 100;\r\n FWidthPercent := 100;\r\n FResponsiveHeightPercent := 100;\r\n FResponsiveWidthPercent := 100;\r\n FResponsiveMaxWidth := 768;\r\n FOwner := AOwner;\r\nend;\r\n\r\ndestructor TImageZoomAppearance.Destroy;\r\nbegin\r\n inherited;\r\nend;\r\n\r\nfunction TImageZoomAppearance.GetOwner: TPersistent;\r\nbegin\r\n Result := FOwner;\r\nend;\r\n\r\nprocedure TImageZoomAppearance.SetHeightPercent(const Value: Integer);\r\nbegin\r\n if (FHeightPercent <> Value) and (FHeightPercent <= 100) then\r\n begin\r\n FHeightPercent := Value;\r\n FOwner.UpdateElement;\r\n end;\r\nend;\r\n\r\nprocedure TImageZoomAppearance.SetResponsiveHeightPercent(const Value: Integer);\r\nbegin\r\n if (FResponsiveHeightPercent <> Value) and (FResponsiveHeightPercent <= 100) then\r\n begin\r\n FResponsiveHeightPercent := Value;\r\n FOwner.UpdateElement;\r\n end;\r\nend;\r\n\r\nprocedure TImageZoomAppearance.SetResponsiveMaxWidth(const Value: Integer);\r\nbegin\r\n if (FResponsiveMaxWidth <> Value) and (FResponsiveMaxWidth >= 0) then\r\n begin\r\n FResponsiveMaxWidth := Value;\r\n FOwner.UpdateElement;\r\n end;\r\nend;\r\n\r\nprocedure TImageZoomAppearance.SetResponsiveWidthPercent(const Value: Integer);\r\nbegin\r\n if (FResponsiveWidthPercent <> Value) and (FResponsiveWidthPercent <= 100) then\r\n begin\r\n FResponsiveWidthPercent := Value;\r\n FOwner.UpdateElement;\r\n end;\r\nend;\r\n\r\nprocedure TImageZoomAppearance.SetWidthPercent(const Value: Integer);\r\nbegin\r\n if (FWidthPercent <> Value) and (FWidthPercent <= 100) then\r\n begin\r\n FWidthPercent := Value;\r\n FOwner.UpdateElement;\r\n end;\r\nend;\r\n\r\n{ TCustomLookupComboBox }\r\n\r\nprocedure TCustomLookupComboBox.CreateInitialize;\r\nbegin\r\n inherited;\r\n FLookupValues := TLookupValues.Create(Self);\r\n FLookupValues.PropName := 'LookupValues';\r\n FLookupValues.OnChange := ValuesChanged;\r\nend;\r\n\r\ndestructor TCustomLookupComboBox.Destroy;\r\nbegin\r\n FLookupValues.Free;\r\n inherited;\r\nend;\r\n\r\nprocedure TCustomLookupComboBox.DoUpdateList;\r\nvar\r\n i: integer;\r\n opt: TJSElement;\r\nbegin\r\n if not Assigned(Container) then\r\n Exit;\r\n\r\n for i := TJSHTMLSelectElement(Container).options.length - 1 downto 0 do\r\n TJSHTMLSelectElement(Container).remove(i);\r\n\r\n AddTextHint;\r\n\r\n for i := 0 to FLookupValues.Count - 1 do\r\n begin\r\n opt := document.createElement('OPTION');\r\n opt['value'] := TLookupValueItem(FLookupValues.Items[i]).Value;\r\n opt.innerHTML := TLookupValueItem(FLookupValues.Items[i]).DisplayText;\r\n Container.appendChild(opt);\r\n end;\r\n\r\n UpdateElement;\r\nend;\r\n\r\nfunction TCustomLookupComboBox.GetDisplayText: string;\r\nbegin\r\n Result := '';\r\n if ItemIndex >= 0 then\r\n Result := FLookupValues[ItemIndex].DisplayText;\r\nend;\r\n\r\nfunction TCustomLookupComboBox.GetValue: string;\r\nbegin\r\n Result := '';\r\n if ItemIndex >= 0 then\r\n Result := FLookupValues[ItemIndex].Value;\r\nend;\r\n\r\nprocedure TCustomLookupComboBox.InitCSSLibrary(ALibrary: TCSSLibrary);\r\nbegin\r\n if (ALibrary = cssBootstrap) then\r\n begin\r\n ElementFont := efCSS;\r\n ElementClassName := 'custom-select';\r\n end;\r\nend;\r\n\r\nprocedure TCustomLookupComboBox.SetDisplayText(const Value: string);\r\nvar\r\n i,idx: integer;\r\nbegin\r\n idx := -1;\r\n for i := 0 to FLookupValues.Count - 1 do\r\n begin\r\n if FLookupValues[i].DisplayText = Value then\r\n begin\r\n idx := i;\r\n break;\r\n end;\r\n end;\r\n\r\n ItemIndex := idx;\r\nend;\r\n\r\nprocedure TCustomLookupComboBox.SetLookupValues(const Value: TLookupValues);\r\nbegin\r\n FLookupValues.Assign(Value);\r\nend;\r\n\r\nprocedure TCustomLookupComboBox.SetValue(const Value: string);\r\nvar\r\n i,idx: integer;\r\nbegin\r\n idx := -1;\r\n\r\n for i := 0 to FLookupValues.Count - 1 do\r\n begin\r\n if FLookupValues[i].Value = Value then\r\n begin\r\n idx := i;\r\n break;\r\n end;\r\n end;\r\n\r\n ItemIndex := idx;\r\nend;\r\n\r\nprocedure TCustomLookupComboBox.ValuesChanged(Sender: TObject);\r\nbegin\r\n DoUpdateList;\r\nend;\r\n\r\n{ TLookupValues }\r\n\r\nfunction TLookupValues.Add: TLookupValueItem;\r\nbegin\r\n Result := TLookupValueItem(inherited Add);\r\nend;\r\n\r\nprocedure TLookupValues.AddPair(AValue, ADisplayText: string);\r\nvar\r\n lv: TLookupValueItem;\r\nbegin\r\n lv := TLookupValueItem(inherited Add);\r\n lv.Value := AValue;\r\n lv.DisplayText := ADisplayText;\r\n if (UpdateCount = 0) then\r\n DoChange;\r\nend;\r\n\r\nprocedure TLookupValues.InsertPair(Index: Integer; AValue, ADisplayText: string);\r\nvar\r\n lv: TLookupValueItem;\r\nbegin\r\n lv := TLookupValueItem(inherited Insert(Index));\r\n lv.Value := AValue;\r\n lv.DisplayText := ADisplayText;\r\n if (UpdateCount = 0) then\r\n DoChange;\r\nend;\r\n\r\nconstructor TLookupValues.Create(AOwner: TComponent);\r\nbegin\r\n inherited Create(AOwner, TLookupValueItem);\r\nend;\r\n\r\nprocedure TLookupValues.DoChange;\r\nbegin\r\n if Assigned(OnChange) then\r\n OnChange(Self);\r\nend;\r\n\r\nfunction TLookupValues.GetItem(Index: integer): TLookupValueItem;\r\nbegin\r\n Result := TLookupValueItem(inherited Items[Index]);\r\nend;\r\n\r\nfunction TLookupValues.Insert(Index: integer): TLookupValueItem;\r\nbegin\r\n Result := TLookupValueItem(inherited Insert(Index));\r\nend;\r\n\r\nprocedure TLookupValues.SetItem(Index: integer; const Value: TLookupValueItem);\r\nbegin\r\n inherited Items[Index] := Value;\r\nend;\r\n\r\nprocedure TLookupValues.Update(Item: TCollectionItem);\r\nbegin\r\n inherited;\r\n if Item = nil then\r\n DoChange;\r\nend;\r\n\r\n{ TCustomListBox }\r\n\r\nprocedure TCustomListBox.CreateInitialize;\r\nbegin\r\n inherited;\r\n FItems := TStringList.Create;\r\n FItems.SkipLastLinebreak := true;\r\n TStringList(FItems).OnChange := DoItemsChange;\r\n FItemIndex := -1;\r\n BorderStyle := bsSingle;\r\n CustomBorder := true;\r\n ShowFocus := true;\r\n if (csDesigning in ComponentState) then\r\n begin\r\n Width := 160;\r\n Height := 180;\r\n end;\r\nend;\r\n\r\nfunction TCustomListBox.CreateElement: TJSElement;\r\nbegin\r\n Result := document.createElement('DIV');\r\n// Result['Size'] := '2';\r\nend;\r\n\r\ndestructor TCustomListBox.Destroy;\r\nbegin\r\n FItems.Free;\r\n inherited;\r\nend;\r\n\r\nprocedure TCustomListBox.DisableDrag;\r\nvar\r\n I: Integer;\r\nbegin\r\n if not Assigned(Container) then\r\n Exit;\r\n\r\n for I := 0 to TJSHTMLElement(Container).children.length - 1 do\r\n begin\r\n TJSHTMLElement(Container.children[I]).Attrs['draggable'] := 'false';\r\n end;\r\nend;\r\n\r\nfunction TCustomListBox.DoHandleChange(Event: TEventListenerEvent): Boolean;\r\nbegin\r\n Change;\r\n Result := True;\r\nend;\r\n\r\nprocedure TCustomListBox.AddItem(Item: string; AObject: TObject);\r\nbegin\r\n FItems.AddObject(Item, AObject);\r\nend;\r\n\r\nprocedure TCustomListBox.BindEvents;\r\nbegin\r\n inherited;\r\n if Assigned(ElementHandle) then\r\n begin\r\n ElementHandle.addEventListener('change', FHandleChangePtr);\r\n end;\r\nend;\r\n\r\nprocedure TCustomListBox.UnBindEvents;\r\nbegin\r\n inherited;\r\n if Assigned(ElementHandle) then\r\n begin\r\n ElementHandle.removeEventListener('change', FHandleChangePtr);\r\n end;\r\nend;\r\n\r\n\r\nprocedure TCustomListBox.Change;\r\nbegin\r\n if Assigned(OnChange) then\r\n OnChange(Self);\r\nend;\r\n\r\nprocedure TCustomListBox.Clear;\r\nbegin\r\n BeginUpdate;\r\n FItems.Clear;\r\n EndUpdate;\r\nend;\r\n\r\nprocedure TCustomListBox.ClearMethodPointers;\r\nbegin\r\n inherited;\r\n FHandleChangePtr := nil;\r\nend;\r\n\r\nprocedure TCustomListBox.SetItems(AItems: TStrings);\r\nbegin\r\n FItems.Assign(AItems);\r\nend;\r\n\r\nfunction TCustomListBox.GetCount: Integer;\r\nbegin\r\n Result := FItems.Count;\r\nend;\r\n\r\nfunction TCustomListBox.GetItemElement(i: Integer): TJSHTMLElement;\r\nbegin\r\n Result := nil;\r\n\r\n if Assigned(Container) and (i < TJSHTMLElement(Container).children.length) then\r\n Result := TJSHTMLElement(Container.children[i]);\r\nend;\r\n\r\nfunction TCustomListBox.GetItemIndex: integer;\r\nvar\r\n i: integer;\r\n el: TJSHTMLElement;\r\nbegin\r\n Result := FItemIndex;\r\n if Assigned(Container) then\r\n begin\r\n for i := 0 to FItems.Count - 1 do\r\n begin\r\n el := ItemElement[i];\r\n if Assigned(el) then\r\n el := TJSHTMLElement(el.firstChild);\r\n if Assigned(el) then\r\n begin\r\n if el = document.activeElement then\r\n begin\r\n Result := i;\r\n Break;\r\n end;\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TCustomListBox.GetMethodPointers;\r\nbegin\r\n inherited;\r\n FHandleChangePtr := @DoHandleChange;\r\nend;\r\n\r\nprocedure TCustomListBox.KeyDown(var Key: Word; Shift: TShiftState);\r\nbegin\r\n inherited;\r\n\r\n if Key = VK_DOWN then\r\n begin\r\n ItemIndex := ItemIndex + 1;\r\n key := 0;\r\n end;\r\n\r\n if Key = VK_HOME then\r\n begin\r\n ItemIndex := 0;\r\n key := 0;\r\n end;\r\n\r\n if Key = VK_NEXT then\r\n begin\r\n ItemIndex := ItemIndex + 4;\r\n key := 0;\r\n end;\r\n\r\n if Key = VK_PRIOR then\r\n begin\r\n ItemIndex := ItemIndex - 4;\r\n key := 0;\r\n end;\r\n\r\n if Key = VK_END then\r\n begin\r\n ItemIndex := Items.Count - 1;\r\n key := 0;\r\n end;\r\n\r\n if Key = VK_UP then\r\n begin\r\n ItemIndex := ItemIndex - 1;\r\n key := 0;\r\n end;\r\nend;\r\n\r\nprocedure TCustomListBox.PersistinHTML;\r\nbegin\r\n if not Assigned(Container) then\r\n Exit;\r\n\r\n if ElementHandle.tagName <> 'DIV' then\r\n Exit;\r\n\r\n// for i := 0 to TJSHTMLSelectElement(Container).options.length - 1 do\r\n// begin\r\n// if TJSHTMLOptionElement(TJSHTMLSelectElement(Container).options[i]).selected then\r\n// TJSHTMLOptionElement(TJSHTMLSelectElement(Container).options[i]).setAttribute('selected','selected')\r\n// else\r\n// TJSHTMLOptionElement(TJSHTMLSelectElement(Container).options[i]).removeAttribute('selected');\r\n// end;\r\nend;\r\n\r\nprocedure TCustomListBox.RemoveFilter;\r\nvar\r\n i: integer;\r\nbegin\r\n for i := 0 to Items.Count - 1 do\r\n begin\r\n ItemElement[i].style.setProperty('display','block');\r\n end;\r\nend;\r\n\r\nprocedure TCustomListBox.SetFilter(AExpression: string; CaseSensitive: boolean = false);\r\nvar\r\n i: integer;\r\n re: TJSRegexp;\r\nbegin\r\n if CaseSensitive then\r\n re := TJSRegexp.new(AExpression)\r\n else\r\n re := TJSRegexp.new(AExpression,'i');\r\n\r\n for i := 0 to Items.Count - 1 do\r\n begin\r\n if not re.test(Items[i]) then\r\n begin\r\n ItemElement[i].style.setProperty('display','none');\r\n end\r\n else\r\n ItemElement[i].style.setProperty('display','block');\r\n\r\n end;\r\nend;\r\n\r\nprocedure TCustomListBox.SetItemHeight(const Value: Integer);\r\nbegin\r\n FItemHeight := Value;\r\nend;\r\n\r\n\r\nprocedure TCustomListBox.SetItemIndex(const Value: integer);\r\nvar\r\n el: TJSHTMLElement;\r\nbegin\r\n el := ItemElement[Value];\r\n if Assigned(el) then\r\n TJSHTMLInputElement(el.firstChild).focus;\r\nend;\r\n\r\nprocedure TCustomListBox.Loaded;\r\nbegin\r\n inherited;\r\n DoUpdateList;\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TCustomListBox.SetSorted(const Value: Boolean);\r\nbegin\r\n FSorted := Value;\r\n TStringList(Items).Sort;\r\nend;\r\n\r\nprocedure TCustomListBox.UpdateElementData;\r\nbegin\r\n inherited;\r\n\r\n if Assigned(ElementHandle) then\r\n begin\r\n ElementHandle.style.setProperty('overflow', 'auto');\r\n end;\r\nend;\r\n\r\nprocedure TCustomListBox.UpdateElementVisual;\r\nbegin\r\n inherited;\r\n\r\n if Assigned(ElementHandle) then\r\n begin\r\n ElementHandle.style.setProperty('overflow', 'auto');\r\n// ElementSelectHandle['role'] := 'listbox';\r\n// ElementSelectHandle['aria-busy'] := 'true';\r\n end;\r\nend;\r\n\r\nprocedure TCustomListBox.UpdateParent;\r\nbegin\r\n inherited;\r\n DoUpdateList;\r\nend;\r\n\r\nprocedure TCustomListBox.DoItemsChange(Sender: TObject);\r\nbegin\r\n DoUpdateList;\r\nend;\r\n\r\nprocedure TCustomListBox.DoUpdateList;\r\nvar\r\n i: integer;\r\n opt: TJSHTMLElement;\r\n chk: TJSHTMLInputElement;\r\n txt: TJSNode;\r\nbegin\r\n if not Assigned(Container) then\r\n Exit;\r\n\r\n if IsUpdating then\r\n Exit;\r\n\r\n if ElementHandle.tagName <> 'DIV' then\r\n Exit;\r\n\r\n // remove previous content\r\n while Assigned(Container.firstChild) do\r\n Container.removeChild(Container.lastChild);\r\n\r\n for i := 0 to FItems.Count - 1 do\r\n begin\r\n opt := TJSHTMLElement(document.createElement('LABEL'));\r\n chk := TJSHTMLInputElement(document.createElement('INPUT'));\r\n chk['type'] := 'checkbox';\r\n chk.style.setProperty('vertical-align','middle');\r\n opt.style.setProperty('vertical-align','middle');\r\n\r\n opt.appendChild(chk);\r\n opt.style.setProperty('display','block');\r\n txt := document.createTextNode(FItems[i]);\r\n\r\n opt.appendChild(txt);\r\n\r\n if ElementItemClassName <> '' then\r\n opt['class'] := ElementItemClassName;\r\n\r\n if DragMode = dmAutomatic then\r\n opt['draggable'] := 'true';\r\n\r\n Container.appendChild(opt);\r\n end;\r\n\r\n UpdateElementData;\r\nend;\r\n\r\nprocedure TCustomListBox.EnableDrag;\r\nvar\r\n I: Integer;\r\nbegin\r\n if not Assigned(Container) then\r\n Exit;\r\n\r\n for I := 0 to TJSHTMLSelectElement(Container).options.length - 1 do\r\n TJSHTMLOptionElement(TJSHTMLSelectElement(Container).options[I]).Attrs['draggable'] := 'true';\r\nend;\r\n\r\nprocedure TCustomListBox.EndUpdate;\r\nbegin\r\n inherited;\r\n DoUpdateList;\r\nend;\r\n\r\n\r\n{ TImageListBox }\r\n\r\nprocedure TImageListBox.DoUpdateList;\r\nvar\r\n i: integer;\r\n opt, img: TJSHTMLElement;\r\nbegin\r\n if not Assigned(Container) then\r\n Exit;\r\n\r\n if IsUpdating then\r\n Exit;\r\n\r\n if ElementHandle.tagName <> 'DIV' then\r\n Exit;\r\n\r\n // remove previous content\r\n while Assigned(Container.firstChild) do\r\n Container.removeChild(Container.lastChild);\r\n\r\n for i := 0 to Items.Count - 1 do\r\n begin\r\n opt := TJSHTMLElement(document.createElement('LABEL'));\r\n\r\n img := TJSHTMLElement(document.createElement('IMG'));\r\n img['src'] := Items[i];\r\n img.style.setProperty('display','inline-block');\r\n\r\n opt.appendChild(img);\r\n\r\n opt.style.setProperty('display','block');\r\n\r\n if ElementItemClassName <> '' then\r\n opt['class'] := ElementItemClassName;\r\n\r\n if DragMode = dmAutomatic then\r\n opt['draggable'] := 'true';\r\n\r\n Container.appendChild(opt);\r\n end;\r\n\r\n UpdateElementData;\r\nend;\r\n\r\n{ TCustomSearchEdit }\r\n\r\nprocedure TSearchEdit.BindEvents;\r\nbegin\r\n inherited;\r\n if Assigned(FClearElement) then\r\n FClearElement.addEventListener('click', FClearPtr);\r\n if Assigned(FSearchElement) then\r\n FSearchElement.addEventListener('click', FSearchPtr);\r\nend;\r\n\r\nprocedure TSearchEdit.ClearMethodPointers;\r\nbegin\r\n inherited;\r\n FClearPtr := nil;\r\n FSearchPtr := nil;\r\nend;\r\n\r\nprocedure TSearchEdit.CreateChildElements(AContainer: TJSElement);\r\nvar\r\n FTable,FRow,FCell: TJSElement;\r\nbegin\r\n inherited;\r\n\r\n FSearchElement := document.createElement('IMG');\r\n FClearElement := document.createElement('IMG');\r\n FInputElement := document.createElement('INPUT');\r\n\r\n FTable := document.createElement('TABLE');\r\n TJSHTMLElement(FTable).style.setProperty('height','100%');\r\n FRow := document.createElement('TR');\r\n\r\n AContainer.appendChild(FTable);\r\n FTable.appendChild(FRow);\r\n\r\n FCell := document.createElement('TD');\r\n FRow.appendChild(FCell);\r\n\r\n FCell.appendChild(FSearchElement);\r\n\r\n FCell := document.createElement('TD');\r\n FRow.appendChild(FCell);\r\n\r\n FCell.appendChild(FInputElement);\r\n\r\n FCell := document.createElement('TD');\r\n FRow.appendChild(FCell);\r\n\r\n FCell.appendChild(FClearElement);\r\n\r\n FSearchElement['src'] := btnsearchres;\r\n FClearElement['src'] := btnclearres;\r\nend;\r\n\r\nfunction TSearchEdit.CreateElement: TJSElement;\r\nbegin\r\n Result := document.createElement('DIV');\r\nend;\r\n\r\nfunction TSearchEdit.GetElementBindHandle: TJSEventTarget;\r\nbegin\r\n Result := FInputElement;\r\nend;\r\n\r\nfunction TSearchEdit.GetElementInputHandle: TJSHTMLInputElement;\r\nbegin\r\n Result := TJSHTMLInputElement(FInputElement);\r\nend;\r\n\r\nprocedure TSearchEdit.GetMethodPointers;\r\nbegin\r\n inherited;\r\n if FClearPtr = nil then\r\n FClearPtr := @HandleDoClear;\r\n if FSearchPtr = nil then\r\n FSearchPtr := @HandleDoSearch;\r\nend;\r\n\r\nfunction TSearchEdit.HandleDoClear(Event: TJSEvent): Boolean;\r\nbegin\r\n if Assigned(OnClearClick) then\r\n OnClearClick(Self);\r\n\r\n asm\r\n this.FInputElement.value = '';\r\n this.FInputElement.focus();\r\n end;\r\n Result := true;\r\nend;\r\n\r\nfunction TSearchEdit.HandleDoSearch(Event: TJSEvent): Boolean;\r\nbegin\r\n if Assigned(OnSearchClick) then\r\n OnSearchClick(Self);\r\n\r\n Result := true;\r\nend;\r\n\r\n{$HINTS OFF}\r\nprocedure TSearchEdit.SetClearImageURL(const Value: string);\r\nbegin\r\n FClearImageURL := Value;\r\nend;\r\n\r\nprocedure TSearchEdit.SetEnabled(Value: Boolean);\r\nbegin\r\n inherited;\r\n\r\n if Assigned(ElementInputHandle) then\r\n begin\r\n if Value then\r\n ElementInputHandle.removeAttribute('disabled')\r\n else\r\n ElementInputHandle.setAttribute('disabled','');\r\n end;\r\nend;\r\n\r\nprocedure TSearchEdit.SetFocus;\r\nvar\r\n eh: TJSHTMLInputElement;\r\nbegin\r\n if Assigned(ElementInputHandle) then\r\n begin\r\n eh := TJSHTMLInputElement(ElementInputHandle);\r\n asm\r\n eh.focus();\r\n end;\r\n end;\r\nend;\r\nprocedure TSearchEdit.SetSearchImageURL(const Value: string);\r\nbegin\r\n FSearchImageURL := Value;\r\nend;\r\n\r\n{$HINTS ON}\r\n\r\nprocedure TSearchEdit.UpdateElement;\r\nbegin\r\n inherited;\r\n\r\n if Assigned(ElementHandle) and (ElementHandle <> ContainerElement) and not IsUpdating then\r\n begin\r\n if (ElementClassName = '') and (BorderStyle = bsSingle) then\r\n begin\r\n TJSHTMLElement(ElementHandle).style.setProperty('border','1px solid gray');\r\n TJSHTMLElement(ElementHandle).style.setProperty('border-radius','4px');\r\n end;\r\n\r\n TJSHTMLElement(FInputElement).style.setProperty('border','none');\r\n TJSHTMLElement(FInputElement).style.setProperty('outline','none');\r\n\r\n\r\n TJSHTMLElement(FInputElement.parentElement).style.setProperty('vertical-align','middle');\r\n TJSHTMLElement(FInputElement.parentElement).style.setProperty('width','100%');\r\n TJSHTMLElement(FSearchElement.parentElement).style.setProperty('vertical-align','middle');\r\n TJSHTMLElement(FClearElement.parentElement).style.setProperty('vertical-align','middle');\r\n\r\n\r\n if ElementPosition = epAbsolute then\r\n TJSHTMLElement(FInputElement).style.setProperty('width','100%')\r\n else\r\n TJSHTMLElement(FInputElement).style.removeProperty('width');\r\n end;\r\nend;\r\n\r\nprocedure TSearchEdit.UpdateElementVisual;\r\nbegin\r\n inherited;\r\n if Assigned(FSearchElement) then\r\n begin\r\n if (FSearchImageURL <> '') then\r\n FSearchElement['src'] := FSearchImageURL\r\n else\r\n FSearchElement['src'] := btnsearchres;\r\n end;\r\n\r\n if Assigned(FClearElement) then\r\n begin\r\n if (FClearImageURL <> '') then\r\n FClearElement['src'] := FClearImageURL\r\n else\r\n FClearElement['src'] := btnclearres;\r\n end;\r\nend;\r\n\r\n{ TEditBtn }\r\n\r\nprocedure TEditBtn.BindEvents;\r\nbegin\r\n inherited;\r\n if Assigned(FBtnElement) then\r\n FBtnElement.addEventListener('click', FBtnClickPtr);\r\nend;\r\n\r\nprocedure TEditBtn.ButtonChanged(Sender: TObject);\r\nbegin\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TEditBtn.ClearMethodPointers;\r\nbegin\r\n inherited;\r\n FBtnClickPtr := nil;\r\nend;\r\n\r\nconstructor TEditBtn.Create(AOwner: TComponent);\r\nbegin\r\n inherited;\r\n FButton := TEditButton.Create;\r\n FButton.OnChange := ButtonChanged;\r\nend;\r\n\r\nfunction TEditBtn.CreateElement: TJSElement;\r\nvar\r\n FTable,FRow,FCell1,FCell2: TJSElement;\r\nbegin\r\n Result := document.createElement('DIV');\r\n FBtnElement := document.createElement('BUTTON');\r\n FInputElement := document.createElement('INPUT');\r\n\r\n FTable := document.createElement('TABLE');\r\n FRow := document.createElement('TR');\r\n\r\n Result.appendChild(FTable);\r\n FTable.appendChild(FRow);\r\n\r\n FCell1 := document.createElement('TD');\r\n FRow.appendChild(FCell1);\r\n\r\n FCell1.appendChild(FInputElement);\r\n\r\n FCell2 := document.createElement('TD');\r\n FRow.appendChild(FCell2);\r\n\r\n FCell2.appendChild(FBtnElement);\r\n\r\n FBtnElement.innerHTML := ' ';\r\n TJSHTMLElement(FTable).style.setProperty('border','none');\r\n TJSHTMLElement(FTable).style.setProperty('border-collapse','collapse');\r\n TJSHTMLElement(FTable).style.setProperty('height','100%');\r\nend;\r\n\r\ndestructor TEditBtn.Destroy;\r\nbegin\r\n FButton.Free;\r\n inherited;\r\nend;\r\n\r\nfunction TEditBtn.GetElementBindHandle: TJSEventTarget;\r\nbegin\r\n Result := FInputElement;\r\nend;\r\n\r\nfunction TEditBtn.GetElementInputHandle: TJSHTMLInputElement;\r\nbegin\r\n Result := TJSHTMLInputElement(FInputElement);\r\nend;\r\n\r\nprocedure TEditBtn.GetMethodPointers;\r\nbegin\r\n inherited;\r\n if FBtnClickPtr = nil then\r\n FBtnClickPtr := @HandleDoBtnClick;\r\nend;\r\n\r\nfunction TEditBtn.HandleDoBtnClick(Event: TJSEvent): Boolean;\r\nbegin\r\n if Assigned(OnBtnClick) then\r\n OnBtnClick(Self);\r\n Result := true;\r\nend;\r\n\r\nprocedure TEditBtn.InitCSSLibrary(ALibrary: TCSSLibrary);\r\nbegin\r\n if (ALibrary = cssBootstrap) then\r\n begin\r\n ElementFont := efCSS;\r\n ElementClassName := '';\r\n ElementInputClassName := 'form-control';\r\n ElementButtonClassName := 'btn btn-primary';\r\n HeightStyle := ssAuto;\r\n end;\r\nend;\r\n\r\nprocedure TEditBtn.SetButton(const Value: TEditButton);\r\nbegin\r\n FButton.Assign(Value);\r\nend;\r\n\r\nprocedure TEditBtn.SetElementButtonClassName(const Value: TElementClassName);\r\nbegin\r\n if (FElementButtonClassName <> Value) then\r\n begin\r\n FElementButtonClassName := Value;\r\n UpdateElement;\r\n end;\r\nend;\r\n\r\nprocedure TEditBtn.SetElementInputClassName(const Value: TElementClassName);\r\nbegin\r\n if (FElementInputClassName <> Value) then\r\n begin\r\n FElementInputClassName := Value;\r\n UpdateElement;\r\n end;\r\nend;\r\n\r\nprocedure TEditBtn.UpdateElement;\r\nvar\r\n h: integer;\r\nbegin\r\n inherited;\r\n if Assigned(ElementHandle) and (ElementHandle <> ContainerElement) and not IsUpdating then\r\n begin\r\n TJSHTMLElement(FInputElement).style.setProperty('outline','none');\r\n TJSHTMLElement(FInputElement).style.setProperty('box-sizing','unset');\r\n\r\n if ElementPosition = epAbsolute then\r\n TJSHTMLElement(FInputElement).style.setProperty('width','100%')\r\n else\r\n TJSHTMLElement(FInputElement).style.removeProperty('width');\r\n\r\n // compensate for edit height\r\n h := Height - 6 - 4;\r\n\r\n TJSHTMLElement(FInputElement).style.setProperty('height',h.toString+'px');\r\n\r\n if ElementInputClassName <> '' then\r\n TJSHTMLElement(FInputElement).setAttribute('class',ElementInputClassName)\r\n else\r\n TJSHTMLElement(FInputElement).removeAttribute('class');\r\n\r\n if ElementButtonClassName <> '' then\r\n TJSHTMLElement(FBtnElement).setAttribute('class',ElementButtonClassName)\r\n else\r\n TJSHTMLElement(FBtnElement).removeAttribute('class');\r\n\r\n // compensate for button padding\r\n h := Height - 4;\r\n\r\n TJSHTMLElement(FBtnElement).style.setProperty('width', Button.Width.ToString+'px');\r\n TJSHTMLElement(FBtnElement).style.setProperty('padding', '0');\r\n\r\n TJSHTMLElement(FBtnElement).style.setProperty('height', h.ToString+'px');\r\n\r\n SetHTMLElementFont(TJSHTMLElement(FInputElement), Font, ElementFont = efCSS );\r\n\r\n if (Button.Caption <> '') then\r\n TJSHTMLElement(FBtnElement).innerHTML := Button.Caption;\r\n\r\n if (Button.MaterialGlyph <> '') then\r\n begin\r\n TJSHTMLElement(FBtnElement).innerHTML := GetMaterialGlyph(Button.MaterialGlyph,Button.MaterialGlyphSize,Button.MaterialGlyphColor, Button.MaterialGlyphType);\r\n end;\r\n\r\n TJSHTMLElement(ElementHandle).style.setProperty('border','none');\r\n end;\r\nend;\r\n\r\n{ TEditButton }\r\n\r\nprocedure TEditButton.Assign(Source: TPersistent);\r\nbegin\r\n if (Source is TEditButton) then\r\n begin\r\n FWidth := (Source as TEditButton).Width;\r\n FMaterialGlyph := (Source as TEditButton).MaterialGlyph;\r\n FMaterialGlyphSize := (Source as TEditButton).MaterialGlyphSize;\r\n FMaterialGlyphColor := (Source as TEditButton).MaterialGlyphColor;\r\n FCaption := (Source as TEditButton).Caption;\r\n end;\r\nend;\r\n\r\nprocedure TEditButton.Changed;\r\nbegin\r\n if Assigned(OnChange) then\r\n OnChange(Self);\r\nend;\r\n\r\nconstructor TEditButton.Create;\r\nbegin\r\n inherited;\r\n FWidth := 24;\r\n FCaption := '';\r\n FMaterialGlyphColor := clNone;\r\n FMaterialGlyphSize := 18;\r\n FMaterialGlyphType := mgNormal;\r\nend;\r\n\r\nprocedure TEditButton.SetCaption(const Value: string);\r\nbegin\r\n FCaption := Value;\r\n Changed;\r\nend;\r\n\r\nprocedure TEditButton.SetMaterialGlyph(const Value: TMaterialGlyph);\r\nbegin\r\n FMaterialGlyph := Value;\r\n Changed;\r\nend;\r\n\r\nprocedure TEditButton.SetMaterialGlyphSize(const Value: integer);\r\nbegin\r\n FMaterialGlyphSize := Value;\r\n Changed;\r\nend;\r\n\r\nprocedure TEditButton.SetMaterialGlyphType(const Value: TMaterialGlyphType);\r\nbegin\r\n FMaterialGlyphType := Value;\r\n Changed;\r\nend;\r\n\r\nprocedure TEditButton.SetMaterialGyphColor(const Value: TColor);\r\nbegin\r\n FMaterialGlyphColor := Value;\r\n Changed;\r\nend;\r\n\r\nprocedure TEditButton.SetWidth(const Value: integer);\r\nbegin\r\n FWidth := Value;\r\n Changed;\r\nend;\r\n\r\nend.\r\n","{*************************************************************************}\r\n{ TAdvTreeNodes }\r\n{ for Delphi & C++Builder }\r\n{ }\r\n{ written by TMS Software }\r\n{ copyright (c) 2019 - 2023 }\r\n{ Email : info@tmssoftware.com }\r\n{ Website : http://www.tmssoftware.com/ }\r\n{ }\r\n{ The source code is given as is. The author is not responsible }\r\n{ for any possible damage done due to the use of this code. }\r\n{ The component can be freely used in any application. The complete }\r\n{ source code remains property of the author and may not be distributed, }\r\n{ published, given or sold in any form as such. No parts of the source }\r\n{ code can be included in any other component or application without }\r\n{ written authorization of the author. }\r\n{*************************************************************************}\r\n\r\nunit WEBLib.TreeNodes;\r\n\r\n\r\ninterface\r\nuses\r\n Classes, Types, SysUtils, Web;\r\n\r\ntype\r\n TTreeNode = class;\r\n TTreeNodes = class;\r\n\r\n TDbgList = class(TList)\r\n private\r\n function GetItemsEx(Index: Integer): TTreeNode;\r\n procedure SetItemsEx(Index: Integer; const Value: TTreeNode);\r\n public\r\n procedure AssignList(ListA: TList);\r\n property Items[Index: Integer]: TTreeNode read GetItemsEx write SetItemsEx; default;\r\n end;\r\n\r\n{ TTreeNode }\r\n\r\n TNodeType = (ntText, ntCheckbox, ntRadioButton);\r\n\r\n TImageIndex = integer;\r\n\r\n PNodeInfo = ^TNodeInfo;\r\n TNodeInfo = packed record\r\n SelectedIndex: Integer;\r\n StateIndex: Integer;\r\n OverlayIndex: Integer;\r\n Data: Pointer;\r\n Count: Integer;\r\n Text: string;\r\n NodeType: TNodeType;\r\n Checked: Boolean;\r\n ImageURL: string;\r\n ImageCollapsedURL: string;\r\n URL: string;\r\n Tag: Integer;\r\n Hint: string;\r\n IsExpanded: Boolean;\r\n end;\r\n\r\n TNodeDataInfo = packed record\r\n SelectedIndex: Integer;\r\n StateIndex: Integer;\r\n OverlayIndex: Integer;\r\n Data: Pointer;\r\n Count: Integer;\r\n NodeType: TNodeType;\r\n Checked: Boolean;\r\n Tag: Integer;\r\n IsExpanded: Boolean;\r\n TextLen: Byte;\r\n HintLen: Byte;\r\n URLLen: Byte;\r\n ImageURLLen: Byte;\r\n ImageCollapsedURLLen: Byte;\r\n end;\r\n\r\n\r\n TTreeNodeClass = class of TTreeNode;\r\n\r\n TTreeNode = class(TPersistent)\r\n private\r\n FOwner: TTreeNodes;\r\n FText: string;\r\n FData: TObject;\r\n FDeleting: Boolean;\r\n FIsExpanded: Boolean;\r\n FFirstChild: TTreeNode;\r\n FNextSibling: TTreeNode;\r\n FPrevSibling: TTreeNode;\r\n FParentNode: TTreeNode;\r\n FShowText: Boolean;\r\n FImageCollapsedURL: string;\r\n FImageURL: string;\r\n FNodeType: TNodeType;\r\n FURL: string;\r\n FChecked: boolean;\r\n FTag: Integer;\r\n FHint: string;\r\n FSelected: boolean;\r\n function GetLevel: Integer;\r\n function GetParent: TTreeNode;\r\n function GetIndex: Integer;\r\n function GetItem(Index: Integer): TTreeNode;\r\n function GetCount: Integer;\r\n procedure SetData(Value: TObject);\r\n procedure SetItem(Index: Integer; Value: TTreeNode);\r\n procedure SetText(const S: string);\r\n function GetHasChildren: Boolean;\r\n procedure SetShowText(const Value: Boolean);\r\n //procedure ReadData(Stream: TStream; var Info: TNodeDataInfo);\r\n //procedure WriteData(Stream: TStream; var Info: TNodeDataInfo);\r\n procedure SetChecked(const Value: boolean);\r\n procedure SetImageCollapsedURL(const Value: string);\r\n procedure SetImageURL(const Value: string);\r\n procedure SetNodeType(const Value: TNodeType);\r\n procedure SetURL(const Value: string);\r\n procedure SetTag(const Value: Integer);\r\n procedure SetHint(const Value: string);\r\n procedure SetIsExpanded(const Value: Boolean);\r\n procedure SetSelected(const Value: boolean);\r\n function GetAbsoluteIndex: Integer;\r\n protected\r\n function CompareCount(CompareMe: Integer): Boolean;\r\n property Owner: TTreeNodes read FOwner;\r\n function IsEqual(Node: TTreeNode): Boolean;\r\n procedure Select;\r\n procedure UnSelect;\r\n public\r\n property Item[Index: Integer]: TTreeNode read GetItem write SetItem; default;\r\n function IndexOf(Value: TTreeNode): Integer;\r\n property Count: Integer read GetCount;\r\n property Index: Integer read GetIndex;\r\n\r\n constructor Create(AOwner: TTreeNodes);\r\n destructor Destroy; override;\r\n\r\n function AddFirstChild(const S: string): TTreeNode; overload;\r\n function AddFirstChild(const S: string; Data: TObject): TTreeNode; overload;\r\n function AddChild(const S: string): TTreeNode; overload;\r\n function AddChild(const S: string; Data: TObject): TTreeNode; overload;\r\n procedure Assign(Source: TPersistent); override;\r\n\r\n procedure Expand(Recurse: boolean); virtual;\r\n\r\n procedure Collapse(Recurse: boolean); virtual;\r\n\r\n procedure Delete;\r\n procedure DeleteChildren;\r\n\r\n function GetFirstChild: TTreeNode;\r\n function GetLastChild: TTreeNode;\r\n function GetNextChild(Value: TTreeNode): TTreeNode;\r\n function GetNextSibling: TTreeNode;\r\n function GetPrevChild(Value: TTreeNode): TTreeNode;\r\n function GetPrevSibling: TTreeNode;\r\n function HasAsParent(Value: TTreeNode): Boolean;\r\n function IsFirstNode: Boolean;\r\n function IsFirstChild: Boolean;\r\n function GetNext: TTreeNode;\r\n function GetPrev: TTreeNode;\r\n\r\n property AbsoluteIndex: Integer read GetAbsoluteIndex;\r\n property Deleting: Boolean read FDeleting;\r\n property Expanded: Boolean read FIsExpanded write SetIsExpanded;\r\n property HasChildren: Boolean read GetHasChildren;\r\n property Level: Integer read GetLevel;\r\n property Parent: TTreeNode read GetParent;\r\n property Text: string read FText write SetText;\r\n property Data: TObject read FData write SetData;\r\n property ShowText: Boolean read FShowText write SetShowText default true;\r\n property NodeType: TNodeType read FNodeType write SetNodeType default ntText;\r\n property Checked: boolean read FChecked write SetChecked default False;\r\n property URL: string read FURL write SetURL;\r\n property Selected: boolean read FSelected write SetSelected;\r\n\r\n property ImageCollapsedURL: string read FImageCollapsedURL write SetImageCollapsedURL;\r\n property ImageURL: string read FImageURL write SetImageURL;\r\n property Tag: Integer read FTag write SetTag default 0;\r\n property Hint: string read FHint write SetHint;\r\n end;\r\n\r\n TSelectNodeEvent = procedure(Sender: TObject; ANode: TTreeNode; IsSelected: boolean) of object;\r\n\r\n TNodeEvent = procedure(Sender: TObject; ANode: TTreeNode) of object;\r\n\r\n{ TTreeNodes }\r\n\r\n TTreeNodes = class(TPersistent)\r\n private\r\n FOwner: TComponent;\r\n FFirstNode: TTreeNode;\r\n FNodeList: TDbgList;\r\n FDeleting: Boolean;\r\n FReading: Boolean;\r\n FOnChange: TNotifyEvent;\r\n FOnExpandedChange: TNodeEvent;\r\n FOnSelectionChange: TSelectNodeEvent;\r\n function GetNodeFromIndex(Index: Integer): TTreeNode;\r\n function GetSiblingCount: Integer;\r\n function GetSiblingFromIndex(Index: integer): TTreeNode;\r\n //procedure ReadData(Stream: TStream);\r\n //procedure WriteData(Stream: TStream);\r\n protected\r\n //procedure DefineProperties(Filer: TFiler); override;\r\n procedure SetItem(Index: Integer; Value: TTreeNode);\r\n function GetCount: Integer;\r\n function InsertNode(ParentNode: TTreeNode; DesNode: TTreeNode; InsertBefore: Boolean): TTreeNode;\r\n function IsVeryFirstNode(Node: TTreeNode): Boolean;\r\n procedure SelectionChange(Node: TTreeNode; IsSelected: boolean); virtual;\r\n function CreateNode: TTreeNode; virtual;\r\n property Reading: Boolean read FReading;\r\n property OnSelectionChange: TSelectNodeEvent read FOnSelectionChange write FOnSelectionChange;\r\n public\r\n constructor Create(AOwner: TComponent);\r\n destructor Destroy; override;\r\n function AddFirst(const S: string): TTreeNode; overload;\r\n function AddFirst(Data: TObject; const S: string): TTreeNode; overload;\r\n function Add(Sibling: TTreeNode; const S: string): TTreeNode; overload;\r\n function Add(Sibling: TTreeNode; const S: string; Data: TObject): TTreeNode; overload;\r\n function Add(const S: string): TTreeNode; overload;\r\n function Add(const S: string; Data: TObject): TTreeNode; overload;\r\n function AddChild(Parent: TTreeNode; const S: string): TTreeNode; overload;\r\n function AddChild(Parent: TTreeNode; const S: string; Data: TObject): TTreeNode; overload;\r\n function AddChildFirst(Parent: TTreeNode; const S: string): TTreeNode; overload;\r\n function AddChildFirst(Parent: TTreeNode; const S: string; Data: TObject): TTreeNode; overload;\r\n procedure Assign(Source: TPersistent); override;\r\n procedure BeginUpdate; virtual;\r\n procedure EndUpdate; virtual;\r\n procedure Clear;\r\n procedure Delete(Node: TTreeNode);\r\n function GetFirstNode: TTreeNode;\r\n function GetLastNode: TTreeNode;\r\n function Insert(Sibling: TTreeNode; const S: string): TTreeNode;\r\n function InsertObject(Sibling: TTreeNode; const S: string; Data: TObject): TTreeNode;\r\n property Count: Integer read GetCount;\r\n property SiblingCount: Integer read GetSiblingCount;\r\n property Sibling[Index: integer]: TTreeNode read GetSiblingFromIndex;\r\n property Item[Index: Integer]: TTreeNode read GetNodeFromIndex; default;\r\n property Owner: TComponent read FOwner;\r\n property OnChange: TNotifyEvent read FOnChange write FOnChange;\r\n property OnExpandedChange: TNodeEvent read FOnExpandedChange write FOnExpandedChange;\r\n procedure Changed;\r\n end;\r\n\r\nimplementation\r\n\r\nuses\r\n Math;\r\n\r\n//------------------------------------------------------------------------------\r\n\r\n{ TDbgList }\r\n\r\nprocedure TDbgList.AssignList(ListA: TList);\r\nvar\r\n I: Integer;\r\nbegin\r\n Clear;\r\n for I := 0 to ListA.Count - 1 do\r\n Add(ListA[I]);\r\nend;\r\n\r\n//------------------------------------------------------------------------------\r\n\r\nfunction TDbgList.GetItemsEx(Index: Integer): TTreeNode;\r\nbegin\r\n if (Index >= Count) then\r\n begin\r\n raise Exception.Create('Index out of bounds in list read access');\r\n end;\r\n\r\n if Index < Count then\r\n Result := TTreeNode(inherited Items[Index])\r\n else\r\n Result := nil;\r\nend;\r\n\r\n//------------------------------------------------------------------------------\r\n\r\nprocedure TDbgList.SetItemsEx(Index: Integer; const Value: TTreeNode);\r\nbegin\r\n if (Index >= Count) then\r\n begin\r\n raise Exception.Create('Index out of bounds in list write access');\r\n end;\r\n if Index < Count then\r\n inherited Items[Index] := value;\r\nend;\r\n\r\n//------------------------------------------------------------------------------\r\n\r\n{ TTreeNode }\r\n\r\nconstructor TTreeNode.Create(AOwner: TTreeNodes);\r\nbegin\r\n inherited Create;\r\n FOwner := AOwner;\r\n FShowText := true;\r\n FNodeType := ntText;\r\n FChecked := False;\r\n FIsExpanded := False;\r\n FTag := 0;\r\nend;\r\n\r\n//------------------------------------------------------------------------------\r\n\r\ndestructor TTreeNode.Destroy;\r\nvar\r\n N, PN, NN: TTreeNode;\r\n i: Integer;\r\nbegin\r\n FDeleting := True;\r\n\r\n DeleteChildren;\r\n\r\n N := Parent;\r\n if (((N <> nil) and (not N.Deleting)) or (N = nil)) and (not Owner.FDeleting) and Assigned(Owner) and Assigned(Owner.Owner) and not (csDestroying in Owner.Owner.ComponentState) then\r\n begin\r\n PN := getPrevSibling;\r\n NN := getNextSibling;\r\n\r\n if not Assigned(NN) then\r\n begin\r\n if IsFirstNode then\r\n Owner.FFirstNode := nil\r\n else if Assigned(Parent) and IsFirstChild then\r\n Parent.FFirstChild := nil\r\n else\r\n begin\r\n if Assigned(PN) then\r\n PN.FNextSibling := nil;\r\n end;\r\n end\r\n else if not Assigned(PN) then\r\n begin\r\n if IsFirstNode then\r\n begin\r\n Owner.FFirstNode := NN;\r\n NN.FPrevSibling := PN;\r\n end\r\n else if Assigned(Parent) and IsFirstChild then\r\n Parent.FFirstChild := NN;\r\n end\r\n else\r\n begin\r\n PN.FNextSibling := NN;\r\n NN.FPrevSibling := PN;\r\n end;\r\n end;\r\n\r\n if not Assigned(Parent) then\r\n begin\r\n i := Owner.FNodeList.IndexOf(Self);\r\n if (i >= 0) then\r\n begin\r\n Owner.FNodeList.Delete(i);\r\n end;\r\n end;\r\n\r\n Data := nil;\r\n inherited Destroy;\r\nend;\r\n\r\n//------------------------------------------------------------------------------\r\n\r\nprocedure TTreeNode.Expand(Recurse: boolean);\r\nvar\r\n i: integer;\r\nbegin\r\n Expanded := true;\r\n\r\n if recurse then\r\n begin\r\n for i := 0 to Count - 1 do\r\n Item[i].Expand(Recurse);\r\n end;\r\nend;\r\n\r\n//------------------------------------------------------------------------------\r\n\r\nfunction TTreeNode.HasAsParent(Value: TTreeNode): Boolean;\r\nbegin\r\n if Value <> Nil then\r\n begin\r\n if Parent = nil then Result := False\r\n else if Parent = Value then Result := True\r\n else Result := Parent.HasAsParent(Value);\r\n end\r\n else Result := True;\r\nend;\r\n\r\n//------------------------------------------------------------------------------\r\n\r\nprocedure TTreeNode.SetTag(const Value: Integer);\r\nbegin\r\n FTag := Value;\r\nend;\r\n\r\n//------------------------------------------------------------------------------\r\n\r\nprocedure TTreeNode.SetText(const S: string);\r\nbegin\r\n if not Deleting and (S <> Text) then\r\n begin\r\n FText := S;\r\n end;\r\nend;\r\n\r\n//------------------------------------------------------------------------------\r\n\r\nprocedure TTreeNode.SetURL(const Value: string);\r\nbegin\r\n FURL := Value;\r\nend;\r\n\r\n//------------------------------------------------------------------------------\r\n\r\nprocedure TTreeNode.UnSelect;\r\nbegin\r\n FSelected := false;\r\nend;\r\n\r\n//------------------------------------------------------------------------------\r\n\r\nprocedure TTreeNode.Select;\r\nbegin\r\n FSelected := true;\r\nend;\r\n\r\n//------------------------------------------------------------------------------\r\n\r\nprocedure TTreeNode.SetChecked(const Value: boolean);\r\nbegin\r\n FChecked := Value;\r\nend;\r\n\r\n//------------------------------------------------------------------------------\r\n\r\nprocedure TTreeNode.SetData(Value: TObject);\r\nbegin\r\n if not Deleting and (Value <> Data) then\r\n begin\r\n FData := Value;\r\n end;\r\nend;\r\n\r\n//------------------------------------------------------------------------------\r\n\r\nprocedure TTreeNode.SetHint(const Value: string);\r\nbegin\r\n FHint := Value;\r\nend;\r\n\r\n//------------------------------------------------------------------------------\r\n\r\nprocedure TTreeNode.SetImageCollapsedURL(const Value: string);\r\nbegin\r\n FImageCollapsedURL := Value;\r\nend;\r\n\r\n//------------------------------------------------------------------------------\r\n\r\nprocedure TTreeNode.SetImageURL(const Value: string);\r\nbegin\r\n FImageURL := Value;\r\nend;\r\n\r\n//------------------------------------------------------------------------------\r\n\r\nprocedure TTreeNode.SetIsExpanded(const Value: Boolean);\r\nbegin\r\n if (FIsExpanded <> Value) then\r\n begin\r\n FIsExpanded := Value;\r\n if Assigned(FOwner) then\r\n if Assigned(FOwner.OnExpandedChange) then\r\n FOwner.OnExpandedChange(FOwner, Self);\r\n end;\r\nend;\r\n\r\n//------------------------------------------------------------------------------\r\n\r\nprocedure TTreeNode.Collapse(Recurse: boolean);\r\nvar\r\n i: integer;\r\nbegin\r\n Expanded := false;\r\n\r\n if recurse then\r\n begin\r\n for i := 0 to Count - 1 do\r\n Item[i].Collapse(Recurse);\r\n end;\r\nend;\r\n\r\n//------------------------------------------------------------------------------\r\n\r\nfunction TTreeNode.CompareCount(CompareMe: Integer): Boolean;\r\nvar\r\n Count: integer;\r\n Node: TTreeNode;\r\nBegin\r\n Count := 0;\r\n Result := False;\r\n Node := GetFirstChild;\r\n while Node <> nil do\r\n begin\r\n Inc(Count);\r\n Node := Node.GetNextChild(Node);\r\n if Count > CompareMe then\r\n Exit;\r\n end;\r\n if Count = CompareMe then\r\n Result := True;\r\nend;\r\n\r\n//------------------------------------------------------------------------------\r\n\r\nfunction TTreeNode.GetHasChildren: Boolean;\r\nbegin\r\n Result := Assigned(FFirstChild);\r\nend;\r\n\r\n//------------------------------------------------------------------------------\r\n\r\nfunction TTreeNode.GetParent: TTreeNode;\r\nbegin\r\n Result := FParentNode;\r\nend;\r\n\r\n//------------------------------------------------------------------------------\r\n\r\nfunction TTreeNode.GetNextSibling: TTreeNode;\r\nbegin\r\n Result := FNextSibling;\r\nend;\r\n\r\n//------------------------------------------------------------------------------\r\n\r\nfunction TTreeNode.GetPrevSibling: TTreeNode;\r\nbegin\r\n Result := FPrevSibling;\r\nend;\r\n\r\n//------------------------------------------------------------------------------\r\n\r\nfunction TTreeNode.GetNext: TTreeNode;\r\nvar\r\n p: TTreeNode;\r\nbegin\r\n Result := nil;\r\n\r\n if Count > 0 then\r\n Result := Item[0]\r\n else\r\n begin\r\n Result := GetNextSibling;\r\n if not Assigned(Result) then\r\n begin\r\n p := Self;\r\n repeat\r\n p := p.GetParent;\r\n if Assigned(p) then\r\n Result := p.GetNextSibling;\r\n until not Assigned(p) or Assigned(Result);\r\n end;\r\n end;\r\nend;\r\n\r\n//------------------------------------------------------------------------------\r\n\r\nfunction TTreeNode.GetNextChild(Value: TTreeNode): TTreeNode;\r\nbegin\r\n if Value <> nil then Result := Value.GetNextSibling\r\n else Result := nil;\r\nend;\r\n\r\n//------------------------------------------------------------------------------\r\n\r\nfunction TTreeNode.GetPrev: TTreeNode;\r\nvar\r\n cn: TTreeNode;\r\nbegin\r\n Result := GetPrevSibling;\r\n\r\n if Assigned(Result) then\r\n begin\r\n cn := Result;\r\n\r\n repeat\r\n if cn.Count > 0 then\r\n begin\r\n Result := cn.Item[cn.Count - 1];\r\n cn := Result;\r\n end;\r\n\r\n until cn.Count = 0;\r\n end\r\n else\r\n Result := GetParent;\r\nend;\r\n\r\n//------------------------------------------------------------------------------\r\n\r\nfunction TTreeNode.GetPrevChild(Value: TTreeNode): TTreeNode;\r\nbegin\r\n if Value <> nil then Result := Value.GetPrevSibling\r\n else Result := nil;\r\nend;\r\n\r\n//------------------------------------------------------------------------------\r\n\r\nfunction TTreeNode.GetFirstChild: TTreeNode;\r\nbegin\r\n Result := FFirstChild;\r\nend;\r\n\r\n//------------------------------------------------------------------------------\r\n\r\nfunction TTreeNode.GetLastChild: TTreeNode;\r\nvar\r\n Node: TTreeNode;\r\nbegin\r\n Result := GetFirstChild;\r\n if Result <> nil then\r\n begin\r\n Node := Result;\r\n repeat\r\n Result := Node;\r\n Node := Result.GetNextSibling;\r\n until Node = nil;\r\n end;\r\nend;\r\n\r\n//------------------------------------------------------------------------------\r\n\r\nfunction TTreeNode.GetIndex: Integer;\r\nvar\r\n Node: TTreeNode;\r\nbegin\r\n Result := -1;\r\n Node := Self;\r\n// while Node <> nil do\r\n while Assigned(Node) do\r\n begin\r\n Inc(Result);\r\n Node := Node.GetPrevSibling;\r\n end;\r\nend;\r\n\r\n//------------------------------------------------------------------------------\r\n\r\nfunction TTreeNode.GetItem(Index: Integer): TTreeNode;\r\nbegin\r\n Result := GetFirstChild;\r\n while (Result <> nil) and (Index > 0) do\r\n begin\r\n Result := GetNextChild(Result);\r\n Dec(Index);\r\n end;\r\n if Result = nil then raise Exception.Create('Invalid index');\r\nend;\r\n\r\n//------------------------------------------------------------------------------\r\n\r\nprocedure TTreeNode.SetItem(Index: Integer; Value: TTreeNode);\r\nbegin\r\n item[Index].Assign(Value);\r\nend;\r\n\r\n//------------------------------------------------------------------------------\r\n\r\nprocedure TTreeNode.SetNodeType(const Value: TNodeType);\r\nbegin\r\n FNodeType := Value;\r\nend;\r\n\r\n//------------------------------------------------------------------------------\r\n\r\nprocedure TTreeNode.SetSelected(const Value: boolean);\r\nbegin\r\n if (FSelected <> Value) then\r\n begin\r\n FSelected := Value;\r\n FOwner.SelectionChange(Self, Value);\r\n end;\r\nend;\r\n\r\n//------------------------------------------------------------------------------\r\n\r\nprocedure TTreeNode.SetShowText(const Value: Boolean);\r\nbegin\r\n FShowText := Value;\r\nend;\r\n\r\n//------------------------------------------------------------------------------\r\n\r\nfunction TTreeNode.IndexOf(Value: TTreeNode): Integer;\r\nvar\r\n Node: TTreeNode;\r\nbegin\r\n Result := -1;\r\n Node := GetFirstChild;\r\n while (Node <> nil) do\r\n begin\r\n Inc(Result);\r\n if Node = Value then Break;\r\n Node := GetNextChild(Node);\r\n end;\r\n if Node = nil then Result := -1;\r\nend;\r\n\r\n//------------------------------------------------------------------------------\r\n\r\nfunction TTreeNode.GetAbsoluteIndex: Integer;\r\nvar\r\n Node: TTreeNode;\r\nbegin\r\n if IsFirstNode then\r\n Result := 0\r\n else\r\n begin\r\n Result := -1;\r\n Node := Self;\r\n while Node <> nil do\r\n begin\r\n Inc(Result);\r\n Node := Node.GetPrev;\r\n end;\r\n end;\r\nend;\r\n\r\n//------------------------------------------------------------------------------\r\n\r\nfunction TTreeNode.GetCount: Integer;\r\nvar\r\n Node: TTreeNode;\r\nbegin\r\n Result := 0;\r\n Node := GetFirstChild;\r\n while Assigned(Node) do\r\n begin\r\n Inc(Result);\r\n Node := Node.GetNextChild(Node);\r\n end;\r\nend;\r\n\r\n//------------------------------------------------------------------------------\r\n\r\nfunction TTreeNode.IsFirstNode: Boolean;\r\nbegin\r\n Result := Self = Owner.FFirstNode; // not Deleting and (Parent = nil) and (GetPrevSibling = nil);\r\nend;\r\n\r\n//------------------------------------------------------------------------------\r\n\r\nfunction TTreeNode.IsFirstChild: Boolean;\r\nbegin\r\n Result := IsFirstNode or (Assigned(Parent) and (Parent.getFirstChild = Self));\r\nend;\r\n\r\n//------------------------------------------------------------------------------\r\n\r\nfunction TTreeNode.GetLevel: Integer;\r\nvar\r\n Node: TTreeNode;\r\nbegin\r\n Result := 0;\r\n Node := Parent;\r\n while Node <> nil do\r\n begin\r\n Inc(Result);\r\n Node := Node.Parent;\r\n end;\r\nend;\r\n\r\n//------------------------------------------------------------------------------\r\n\r\nprocedure TTreeNode.Delete;\r\nbegin\r\n if not Deleting then\r\n Free;\r\nend;\r\n\r\n//------------------------------------------------------------------------------\r\n\r\nprocedure TTreeNode.DeleteChildren;\r\nvar\r\n ChildList: TDbgList;\r\n N: TTreeNode;\r\n i: Integer;\r\nbegin\r\n ChildList := TDbgList.Create;\r\n N := GetFirstChild;\r\n if N <> nil then\r\n begin\r\n repeat\r\n ChildList.Add(N);\r\n N := N.GetNextSibling;\r\n until N = nil;\r\n end;\r\n\r\n for i := ChildList.Count - 1 downto 0 do\r\n begin\r\n N := ChildList[i];\r\n N.Free;\r\n ChildList[i].Delete;\r\n end;\r\n ChildList.Free;\r\nend;\r\n\r\n//------------------------------------------------------------------------------\r\n\r\nfunction TTreeNode.AddChild(const S: string): TTreeNode;\r\nbegin\r\n Result := AddChild(S, nil);\r\nend;\r\n\r\n//------------------------------------------------------------------------------\r\n\r\nfunction TTreeNode.AddChild(const S: string; Data: TObject): TTreeNode;\r\nvar\r\n N: TTreeNode;\r\nbegin\r\n N := GetLastChild;\r\n if Assigned(N) then\r\n Result := Owner.InsertNode(nil, N, False)\r\n else\r\n Result := Owner.InsertNode(Self, nil, False);\r\n Result.Text := S;\r\n Result.Data := Data;\r\nend;\r\n\r\n//------------------------------------------------------------------------------\r\n\r\nfunction TTreeNode.AddFirstChild(const S: string): TTreeNode;\r\nbegin\r\n Result := AddFirstChild(S, nil);\r\nend;\r\n\r\n//------------------------------------------------------------------------------\r\n\r\nfunction TTreeNode.AddFirstChild(const S: string; Data: TObject): TTreeNode;\r\nbegin\r\n if not Assigned(FFirstChild) then\r\n Result := Owner.InsertNode(Self, nil, True)\r\n else\r\n Result := Owner.InsertNode(nil, FFirstChild, True);\r\n Result.Text := S;\r\n Result.Data := Data;\r\nend;\r\n\r\n//------------------------------------------------------------------------------\r\n\r\nprocedure TTreeNode.Assign(Source: TPersistent);\r\nvar\r\n Node: TTreeNode;\r\nbegin\r\n if not Deleting and (Source is TTreeNode) then\r\n begin\r\n Node := TTreeNode(Source);\r\n Text := Node.Text;\r\n Data := Node.Data;\r\n ShowText := Node.ShowText;\r\n NodeType := Node.NodeType;\r\n Checked := Node.Checked;\r\n URL := Node.URL;\r\n Hint := Node.Hint;\r\n ImageURL := Node.ImageURL;\r\n ImageCollapsedURL := Node.ImageCollapsedURL;\r\n Tag := Node.Tag;\r\n FIsExpanded := Node.Expanded;\r\n end\r\n else\r\n inherited Assign(Source);\r\nend;\r\n\r\n//------------------------------------------------------------------------------\r\n\r\nfunction TTreeNode.IsEqual(Node: TTreeNode): Boolean;\r\nbegin\r\n Result := (Text = Node.Text) and (Data = Node.Data);\r\nend;\r\n\r\n//------------------------------------------------------------------------------\r\n(*\r\nprocedure TTreeNode.ReadData(Stream: TStream; var Info: TNodeDataInfo);\r\nvar\r\n I, Size, ItemCount, SzM: Integer;\r\n LNode: TTreeNode;\r\n s: string;\r\nbegin\r\n Stream.ReadBuffer(Size, SizeOf(Size));\r\n Stream.ReadBuffer(Info, SizeOf(TNodeDataInfo));\r\n\r\n {$IFDEF DELPHI_UNICODE}\r\n SzM := 2;\r\n {$ENDIF}\r\n\r\n {$IFNDEF DELPHI_UNICODE}\r\n SzM := 1;\r\n {$ENDIF}\r\n\r\n SetLength(S, Info.TextLen);\r\n Stream.ReadBuffer(S[1], SzM * Info.TextLen);\r\n Text := S;\r\n\r\n SetLength(S, Info.HintLen);\r\n Stream.ReadBuffer(S[1], SzM * Info.HintLen);\r\n Hint := S;\r\n\r\n SetLength(S, Info.URLLen);\r\n Stream.ReadBuffer(S[1], SzM * Info.URLLen);\r\n URL := S;\r\n\r\n SetLength(S, Info.ImageURLLen);\r\n Stream.ReadBuffer(S[1], SzM * Info.ImageURLLen);\r\n ImageURL := S;\r\n\r\n SetLength(S, Info.ImageCollapsedURLLen);\r\n Stream.ReadBuffer(S[1], SzM * Info.ImageCollapsedURLLen);\r\n ImageCollapsedURL := S;\r\n\r\n NodeType := Info.NodeType;\r\n Checked := Info.Checked;\r\n Tag := Info.Tag;\r\n IsExpanded := Info.IsExpanded;\r\n\r\n ItemCount := Info.Count;\r\n for I := 0 to ItemCount - 1 do\r\n begin\r\n LNode := AddChild(''); //Owner.Add(Self, '');\r\n LNode.FParentNode := Self;\r\n LNode.ReadData(Stream, Info);\r\n //Owner.Owner.Added(LNode);\r\n end;\r\nend;\r\n\r\n//------------------------------------------------------------------------------\r\n\r\nprocedure TTreeNode.WriteData(Stream: TStream; var Info: TNodeDataInfo);\r\nvar\r\n I, Size, ItemCount, SzM: Integer;\r\nbegin\r\n //L := Length(Text);\r\n //if L > 255 then L := 255;\r\n //Size := SizeOf(TNodeInfo) + L - 255;\r\n\r\n //L := Min(255, Length(Text)) + Min(255, Length(URL)) + Min(255, Length(Hint)) + Min(255, Length(ImageURL)) + Min(255, Length(ImageCollapsedURL));\r\n //Size := SizeOf(TNodeInfo) + L - 255 * 5;\r\n\r\n {$IFDEF DELPHI_UNICODE}\r\n SzM := 2;\r\n {$ENDIF}\r\n\r\n {$IFNDEF DELPHI_UNICODE}\r\n SzM := 1;\r\n {$ENDIF}\r\n\r\n Info.TextLen := Min(255, Length(Text));\r\n Info.HintLen := Min(255, Length(Hint));\r\n Info.URLLen := Min(255, Length(URL));\r\n Info.ImageURLLen := Min(255, Length(ImageURL));\r\n Info.ImageCollapsedURLLen := Min(255, Length(ImageCollapsedURL));\r\n\r\n Info.NodeType := NodeType;\r\n Info.Checked := Checked;\r\n Info.Tag := Tag;\r\n Info.IsExpanded := IsExpanded;\r\n\r\n ItemCount := Count;\r\n Info.Count := ItemCount;\r\n\r\n Size := SizeOf(TNodeDataInfo) + (Info.TextLen + Info.HintLen + Info.URLLen + Info.ImageURLLen + Info.ImageCollapsedURLLen);\r\n\r\n Stream.WriteBuffer(Size, SizeOf(Size));\r\n Stream.WriteBuffer(Info, SizeOf(TNodeDataInfo));\r\n Stream.WriteBuffer(Text[1], SzM * Info.TextLen);\r\n Stream.WriteBuffer(Hint[1], SzM * Info.HintLen);\r\n Stream.WriteBuffer(URL[1], SzM * Info.URLLen);\r\n Stream.WriteBuffer(ImageURL[1], SzM * Info.ImageURLLen);\r\n Stream.WriteBuffer(ImageCollapsedURL[1], SzM * Info.ImageCollapsedURLLen);\r\n\r\n for I := 0 to ItemCount - 1 do\r\n Item[I].WriteData(Stream, Info);\r\nend;\r\n*)\r\n//------------------------------------------------------------------------------\r\n\r\n{ TTreeNodes }\r\n\r\nconstructor TTreeNodes.Create(AOwner: TComponent);\r\nbegin\r\n inherited Create;\r\n FOwner := AOwner;\r\n FFirstNode := nil;\r\n FNodeList := TDbgList.Create;\r\nend;\r\n\r\n//------------------------------------------------------------------------------\r\n\r\nfunction TTreeNodes.CreateNode: TTreeNode;\r\nvar\r\n LClass: TTreeNodeClass;\r\nbegin\r\n LClass := TTreeNode;\r\n Result := LClass.Create(Self);\r\nend;\r\n\r\n//------------------------------------------------------------------------------\r\n\r\ndestructor TTreeNodes.Destroy;\r\nbegin\r\n FDeleting := True;\r\n Clear;\r\n FNodeList.Free;\r\n inherited Destroy;\r\nend;\r\n\r\nprocedure TTreeNodes.EndUpdate;\r\nbegin\r\n//\r\nend;\r\n\r\n//------------------------------------------------------------------------------\r\n\r\nprocedure TTreeNodes.Delete(Node: TTreeNode);\r\nbegin\r\n Node.Delete;\r\nend;\r\n\r\n//------------------------------------------------------------------------------\r\n\r\nprocedure TTreeNodes.Changed;\r\nbegin\r\n if Assigned(OnChange) then\r\n OnChange(Self);\r\nend;\r\n\r\nprocedure TTreeNodes.Clear;\r\nvar\r\n i: Integer;\r\nbegin\r\n for i := FNodeList.Count - 1 downto 0 do\r\n FNodeList[i].Delete;\r\n\r\n FNodeList.Clear;\r\nend;\r\n\r\n//------------------------------------------------------------------------------\r\n\r\nfunction TTreeNodes.GetSiblingCount: Integer;\r\nbegin\r\n Result := FNodeList.Count;\r\nend;\r\n\r\n//------------------------------------------------------------------------------\r\n\r\nfunction TTreeNodes.GetSiblingFromIndex(Index: integer): TTreeNode;\r\nbegin\r\n Result := nil;\r\n if (Index >= 0) and (Index < FNodeList.Count) then\r\n Result := FNodeList[Index];\r\nend;\r\n\r\n//------------------------------------------------------------------------------\r\n\r\nfunction TTreeNodes.GetCount: Integer;\r\nvar\r\n i: integer;\r\n\r\n function GetChildCount(tn: TTreeNode): integer;\r\n var\r\n j: integer;\r\n begin\r\n Result := tn.Count;\r\n for j := 0 to tn.Count - 1 do\r\n begin\r\n Result := Result + GetChildCount(tn.Item[j]);\r\n end;\r\n end;\r\n\r\nbegin\r\n Result := FNodeList.Count;\r\n\r\n for i := 0 to FNodeList.Count - 1 do\r\n begin\r\n Result := Result + GetChildCount(FNodeList.Items[i]);\r\n end;\r\nend;\r\n\r\n//------------------------------------------------------------------------------\r\n\r\nfunction TTreeNodes.GetNodeFromIndex(Index: Integer): TTreeNode;\r\nvar\r\n i,idx: integer;\r\n child: TTreeNode;\r\nbegin\r\n Result := nil;\r\n idx := 0;\r\n\r\n for i := 0 to FNodeList.Count - 1 do\r\n begin\r\n child := FNodeList.Items[i];\r\n repeat\r\n if (Index = idx) then\r\n begin\r\n Result := child;\r\n Exit;\r\n end;\r\n child := child.GetNext;\r\n inc(idx);\r\n until (child = nil);\r\n end;\r\nend;\r\n\r\n//------------------------------------------------------------------------------\r\n\r\nprocedure TTreeNodes.SelectionChange(Node: TTreeNode; IsSelected: boolean);\r\nbegin\r\n if Assigned(OnSelectionChange) then\r\n OnSelectionChange(Self, Node, IsSelected);\r\nend;\r\n\r\nprocedure TTreeNodes.SetItem(Index: Integer; Value: TTreeNode);\r\nbegin\r\n if (Index >= 0) and (Index < FNodeList.Count) then\r\n GetNodeFromIndex(Index).Assign(Value);\r\nend;\r\n\r\n//------------------------------------------------------------------------------\r\n\r\nfunction TTreeNodes.Insert(Sibling: TTreeNode; const S: string): TTreeNode;\r\nbegin\r\n Result := InsertObject(Sibling, S, nil);\r\nend;\r\n\r\n//------------------------------------------------------------------------------\r\n\r\nfunction TTreeNodes.InsertObject(Sibling: TTreeNode; const S: string;\r\n Data: TObject): TTreeNode;\r\nbegin\r\n Result := InsertNode(nil, Sibling, True);\r\n if Assigned(Result) then\r\n begin\r\n Result.Text := S;\r\n Result.Data := Data;\r\n end;\r\nend;\r\n\r\n//------------------------------------------------------------------------------\r\n\r\nfunction TTreeNodes.IsVeryFirstNode(Node: TTreeNode): Boolean;\r\nbegin\r\n Result := Assigned(Node) and (Node = FFirstNode); \r\nend;\r\n\r\n//------------------------------------------------------------------------------\r\n\r\nfunction TTreeNodes.GetFirstNode: TTreeNode;\r\nbegin\r\n Result := FFirstNode;\r\nend;\r\n\r\n//------------------------------------------------------------------------------\r\n\r\nfunction TTreeNodes.GetLastNode: TTreeNode;\r\nbegin\r\n Result := FFirstNode;\r\n if Assigned(Result) then\r\n while (Result.getNextSibling <> nil) do\r\n Result := Result.getNextSibling;\r\nend;\r\n\r\n//------------------------------------------------------------------------------\r\n\r\nfunction TTreeNodes.Add(Sibling: TTreeNode; const S: string): TTreeNode;\r\nbegin\r\n Result := Add(Sibling, S, nil);\r\nend;\r\n\r\n//------------------------------------------------------------------------------\r\n\r\nfunction TTreeNodes.Add(Sibling: TTreeNode; const S: string; Data: TObject): TTreeNode;\r\nbegin\r\n Result := InsertNode(Sibling, GetLastNode, False);\r\n Result.Text := S;\r\n Result.Data := Data;\r\nend;\r\n\r\n//------------------------------------------------------------------------------\r\n\r\nfunction TTreeNodes.Add(const S: string): TTreeNode;\r\nbegin\r\n Result := Add(S, nil);\r\nend;\r\n\r\n//------------------------------------------------------------------------------\r\n\r\nfunction TTreeNodes.Add(const S: string; Data: TObject): TTreeNode;\r\nbegin\r\n Result := InsertNode(nil, GetLastNode, False);\r\n Result.Text := S;\r\n Result.Data := Data;\r\nend;\r\n\r\n//------------------------------------------------------------------------------\r\n\r\nfunction TTreeNodes.AddChild(Parent: TTreeNode; const S: string): TTreeNode;\r\nbegin\r\n if Parent = nil then\r\n Result := Add(S, nil)\r\n else\r\n Result := AddChild(Parent, S, nil);\r\nend;\r\n\r\n//------------------------------------------------------------------------------\r\n\r\nfunction TTreeNodes.AddChild(Parent: TTreeNode;\r\n const S: string; Data: TObject): TTreeNode;\r\nbegin\r\n Result := nil;\r\n\r\n if Assigned(Parent) then\r\n Result := Parent.AddChild(S, Data)\r\n else\r\n Result := Add(S, Data);\r\nend;\r\n\r\n//------------------------------------------------------------------------------\r\n\r\nfunction TTreeNodes.AddChildFirst(Parent: TTreeNode;\r\n const S: string): TTreeNode;\r\nbegin\r\n Result := AddChildFirst(Parent, S, nil);\r\nend;\r\n\r\n//------------------------------------------------------------------------------\r\n\r\nfunction TTreeNodes.AddChildFirst(Parent: TTreeNode;\r\n const S: string; Data: TObject): TTreeNode;\r\nbegin\r\n Result := nil;\r\n if Assigned(Parent) then\r\n Result := Parent.AddFirstChild(S, Data)\r\nend;\r\n\r\n//------------------------------------------------------------------------------\r\n\r\nfunction TTreeNodes.AddFirst(const S: string): TTreeNode;\r\nbegin\r\n Result := AddFirst(nil, S);\r\nend;\r\n\r\n//------------------------------------------------------------------------------\r\n\r\nfunction TTreeNodes.AddFirst(Data: TObject; const S: string): TTreeNode;\r\nbegin\r\n if not Assigned(FFirstNode) then\r\n begin\r\n //Result := CreateNode;\r\n //FFirstNode := Result\r\n Result := InsertNode(nil, nil, True);\r\n end\r\n else\r\n begin\r\n Result := InsertNode(nil, FFirstNode, True);\r\n end;\r\n Result.Text := S;\r\n Result.Data := Data;\r\nend;\r\n\r\n//------------------------------------------------------------------------------\r\n\r\nfunction TTreeNodes.InsertNode(ParentNode: TTreeNode; DesNode: TTreeNode; InsertBefore: Boolean): TTreeNode;\r\nvar\r\n N: TTreeNode;\r\nbegin\r\n Result := nil;\r\n if not Assigned(DesNode) then\r\n begin\r\n if Assigned(ParentNode) then\r\n begin\r\n N := ParentNode.GetLastChild;\r\n if Assigned(N) then\r\n begin\r\n InsertNode(nil, N, False);\r\n Exit;\r\n end\r\n else // First Child Node\r\n begin\r\n Result := CreateNode;\r\n ParentNode.FFirstChild := Result;\r\n Result.FParentNode := ParentNode;\r\n Exit;\r\n {\r\n if Assigned(ParentNode.GetNextSibling) then\r\n FNodeList.Insert(ParentNode.GetNextSibling.Index, Result)\r\n else\r\n FNodeList.Add(Result);\r\n }\r\n end;\r\n end\r\n else\r\n begin\r\n if not Assigned(FFirstNode) then\r\n begin\r\n Result := CreateNode;\r\n FFirstNode := Result; // very first Node\r\n FNodeList.Add(Result);\r\n end;\r\n end;\r\n end\r\n else\r\n begin\r\n Result := CreateNode;\r\n if InsertBefore then\r\n begin\r\n if IsVeryFirstNode(DesNode) then\r\n begin\r\n FFirstNode := Result;\r\n Result.FNextSibling := DesNode;\r\n DesNode.FPrevSibling := Result;\r\n FNodeList.Insert(0,Result);\r\n end\r\n else\r\n begin\r\n//fix: if DesNode is not the first node in a treeview, but a first child in a parent node (with DesNode.FPrevSibling = nil),\r\n//then execution continues on \"else\" branch and DesNode.Parent.FFirstChild does not change\r\n//- it remains pointing to DesNode, not on newly inserted node\r\n// if DesNode.IsFirstNode and Assigned(DesNode.Parent) then\r\n if DesNode.IsFirstChild and Assigned(DesNode.Parent) then\r\n begin\r\n DesNode.Parent.FFirstChild := Result;\r\n Result.FNextSibling := DesNode;\r\n DesNode.FPrevSibling := Result;\r\n Result.FParentNode := DesNode.Parent;\r\n end\r\n else\r\n begin\r\n Result.FPrevSibling := DesNode.FPrevSibling;\r\n Result.FNextSibling := DesNode;\r\n DesNode.FPrevSibling := Result;\r\n Result.FParentNode := DesNode.Parent;\r\n if Assigned(Result.FPrevSibling) then\r\n Result.FPrevSibling.FNextSibling := Result;\r\n end;\r\n end;\r\n end\r\n else // Insert after DesNode\r\n begin\r\n Result.FNextSibling := DesNode.FNextSibling;\r\n Result.FPrevSibling := DesNode;\r\n DesNode.FNextSibling := Result;\r\n if Assigned(Result.FNextSibling) then\r\n Result.FNextSibling.FPrevSibling := Result;\r\n Result.FParentNode := DesNode.Parent;\r\n if not Assigned(DesNode.Parent) then // Root Node\r\n FNodeList.Add(Result);\r\n end;\r\n end;\r\nend;\r\n\r\n//------------------------------------------------------------------------------\r\n\r\nprocedure TTreeNodes.Assign(Source: TPersistent);\r\nvar\r\n// TreeNodes: TTreeNodes;\r\n// MemStream: TMemoryStream;\r\nbegin\r\n\r\n if Source is TTreeNodes then\r\n begin\r\n// TreeNodes := TTreeNodes(Source);\r\n Clear;\r\n (*\r\n MemStream := TMemoryStream.Create;\r\n try\r\n TreeNodes.WriteData(MemStream);\r\n MemStream.Position := 0;\r\n ReadData(MemStream);\r\n finally\r\n MemStream.Free;\r\n end;\r\n *)\r\n end\r\n else inherited Assign(Source);\r\nend;\r\n\r\nprocedure TTreeNodes.BeginUpdate;\r\nbegin\r\n//\r\nend;\r\n\r\n//------------------------------------------------------------------------------\r\n(*\r\nprocedure TTreeNodes.DefineProperties(Filer: TFiler);\r\n\r\n function WriteNodes: Boolean;\r\n var\r\n I: Integer;\r\n Nodes: TTreeNodes;\r\n begin\r\n Nodes := TTreeNodes(Filer.Ancestor);\r\n if Nodes = nil then\r\n Result := Count > 0\r\n else if Nodes.Count <> Count then\r\n Result := True\r\n else\r\n begin\r\n Result := False;\r\n for I := 0 to Count - 1 do\r\n begin\r\n Result := not Item[I].IsEqual(Nodes[I]);\r\n if Result then\r\n Break;\r\n end\r\n end;\r\n end;\r\n\r\nbegin\r\n inherited DefineProperties(Filer);\r\n Filer.DefineBinaryProperty('Data', ReadData, WriteData, WriteNodes);\r\nend;\r\n*)\r\n//------------------------------------------------------------------------------\r\n(*\r\nprocedure TTreeNodes.ReadData(Stream: TStream);\r\nvar\r\n I, Count: Integer;\r\n NodeInfo: TNodeDataInfo;\r\n LNode: TTreeNode;\r\nbegin\r\n FReading := True;\r\n try\r\n Clear;\r\n Stream.ReadBuffer(Count, SizeOf(Count));\r\n for I := 0 to Count - 1 do\r\n begin\r\n LNode := Add('');\r\n LNode.ReadData(Stream, NodeInfo);\r\n end;\r\n finally\r\n FReading := False;\r\n end;\r\nend;\r\n\r\n//------------------------------------------------------------------------------\r\n\r\nprocedure TTreeNodes.WriteData(Stream: TStream);\r\nvar\r\n I: Integer;\r\n Node: TTreeNode;\r\n NodeInfo: TNodeDataInfo;\r\nbegin\r\n I := 0;\r\n Node := GetFirstNode;\r\n while Node <> nil do\r\n begin\r\n Inc(I);\r\n Node := Node.GetNextSibling;\r\n end;\r\n Stream.WriteBuffer(I, SizeOf(I));\r\n Node := GetFirstNode;\r\n while Node <> nil do\r\n begin\r\n Node.WriteData(Stream, NodeInfo);\r\n Node := Node.GetNextSibling;\r\n end;\r\nend;\r\n*)\r\n//------------------------------------------------------------------------------\r\n\r\n\r\nend.\r\n","{********************************************************************}\r\n{ }\r\n{ written by TMS Software }\r\n{ copyright (c) 2018 - 2024 }\r\n{ Email : info@tmssoftware.com }\r\n{ Web : http://www.tmssoftware.com }\r\n{ }\r\n{ The source code is given as is. The author is not responsible }\r\n{ for any possible damage done due to the use of this code. }\r\n{ The complete source code remains property of the author and may }\r\n{ not be distributed, published, given or sold in any form as such. }\r\n{ No parts of the source code can be included in any other component }\r\n{ or application without written authorization of the author. }\r\n{********************************************************************}\r\n\r\nunit WEBLib.Buttons;\r\n\r\n{$DEFINE NOPP}\r\n\r\ninterface\r\n\r\nuses\r\n Classes, SysUtils, WEBLib.Controls, Web, WEBLib.Graphics, WEBLib.StdCtrls,\r\n WEBlib.ComCtrls, WEBLib.ExtCtrls, WEBLib.Forms, WEBLib.Menus;\r\n\r\ntype\r\n\r\n TButtonLayout = (blGlyphLeft, blGlyphRight, blGlyphTop, blGlyphBottom);\r\n\r\n TCustomSpeedButton = class(TWebCustomControl)\r\n private\r\n FMaterialGlyph: TMaterialGlyph;\r\n FColor: TColor;\r\n FIntColor: TColor;\r\n FDown: boolean;\r\n FFlat: boolean;\r\n FGroupIndex: integer;\r\n FAllowAllUp: boolean;\r\n FGlyph: TURLPicture;\r\n FLayout: TButtonLayout;\r\n FGlyphURL: String;\r\n FMaterialGlyphSize: integer;\r\n FMaterialGlyphColor: TColor;\r\n FMaterialGlyphType: TMaterialGlyphType;\r\n FGlyphSize: integer;\r\n procedure SetMaterialGlyph(const AValue: TMaterialGlyph);\r\n procedure SetColorEx(const AValue: TColor);\r\n procedure SetIntColor(const AValue: TColor);\r\n procedure SetGroupIndex(const AValue: integer);\r\n procedure SetDown(const AValue: boolean);\r\n procedure SetFlat(const Value: boolean);\r\n procedure SetGlyph(const Value: TURLPicture);\r\n procedure SetGlyphURL(const Value: String);\r\n procedure SetMaterialGlyphSize(const Value: integer);\r\n procedure SetMaterialGyphColor(const Value: TColor);\r\n procedure SetMaterialGlyphType(const Value: TMaterialGlyphType);\r\n procedure SetGlyphSize(const Value: integer);\r\n protected\r\n procedure SetEnabled(Value: Boolean); override;\r\n procedure SetCaption(const AValue: string); override;\r\n function CreateElement: TJSElement; override;\r\n procedure UpdateElement; override;\r\n procedure UpdateElementVisual; override;\r\n procedure UpdateGroup; virtual;\r\n procedure DoMouseLeave; override;\r\n procedure DoMouseEnter; override;\r\n procedure MouseUp(Button: TMouseButton; Shift: TShiftState; X,Y: Integer); override;\r\n procedure MouseDown(Button: TMouseButton; Shift: TShiftState; X,Y: Integer); override;\r\n procedure GlyphChanged(Sender: TObject);\r\n property AllowAllUp: boolean read FAllowAllUp write FAllowAllUp;\r\n property Color: TColor read FColor write SetColorEx default clNone;\r\n property IntColor: TColor read FIntColor write SetIntColor;\r\n property Down: boolean read FDown write SetDown;\r\n property Flat: boolean read FFlat write SetFlat default false;\r\n property Glyph: TURLPicture read FGlyph write SetGlyph;\r\n property GlyphURL: String read FGlyphURL write SetGlyphURL;\r\n property GlyphSize: integer read FGlyphSize write SetGlyphSize default 0;\r\n property GroupIndex: integer read FGroupIndex write SetGroupIndex;\r\n property Layout: TButtonLayout read FLayout write FLayout default blGlyphLeft;\r\n property MaterialGlyph: TMaterialGlyph read FMaterialGlyph write SetMaterialGlyph;\r\n property MaterialGlyphColor: TColor read FMaterialGlyphColor write SetMaterialGyphColor default clNone;\r\n property MaterialGlyphSize: integer read FMaterialGlyphSize write SetMaterialGlyphSize default 18;\r\n property MaterialGlyphType: TMaterialGlyphType read FMaterialGlyphType write SetMaterialGlyphType default mgNormal;\r\n procedure InitCSSLibrary(ALibrary: TCSSLibrary); override;\r\n public\r\n destructor Destroy; override;\r\n procedure CreateInitialize; override;\r\n function CanFocus: Boolean; override;\r\n end;\r\n\r\n TSpeedButton = class(TCustomSpeedButton)\r\n published\r\n property Align;\r\n property AlignWithMargins;\r\n property Anchors;\r\n property AllowAllUp;\r\n property Caption;\r\n property Color;\r\n property Down;\r\n property ElementClassName;\r\n property ElementID;\r\n property ElementFont;\r\n property ElementPosition;\r\n property Enabled;\r\n property Flat;\r\n property Font;\r\n property Glyph;\r\n property GlyphURL;\r\n property GlyphSize;\r\n property GroupIndex;\r\n property Height;\r\n property HeightPercent;\r\n property HeightStyle;\r\n property Hint;\r\n property Layout;\r\n property Margins;\r\n property MaterialGlyph;\r\n property MaterialGlyphColor;\r\n property MaterialGlyphSize;\r\n property MaterialGlyphType;\r\n property ParentFont;\r\n property PopupMenu;\r\n property ShowHint;\r\n property TabOrder;\r\n property TabStop;\r\n property Visible;\r\n property Width;\r\n property WidthPercent;\r\n property WidthStyle;\r\n property OnClick;\r\n property OnDblClick;\r\n property OnKeyDown;\r\n property OnKeyPress;\r\n property OnKeyUp;\r\n property OnMouseDown;\r\n property OnMouseUp;\r\n property OnMouseMove;\r\n property OnMouseLeave;\r\n property OnMouseEnter;\r\n property OnEnter;\r\n property OnExit;\r\n end;\r\n\r\n\r\n TWebSpeedButton = class(TSpeedButton);\r\n\r\n TCustomBitBtn = class(TCustomControl)\r\n private\r\n FMaterialGlyph: TMaterialGlyph;\r\n FLayout: TButtonLayout;\r\n FFlat: boolean;\r\n FGlyph: TURLPicture;\r\n FColor: TColor;\r\n FIntColor: TColor;\r\n FAlignment: TAlignment;\r\n FGlyphURL: String;\r\n FMaterialGlyphSize: integer;\r\n FMaterialGlyphColor: TColor;\r\n FMaterialGlyphType: TMaterialGlyphType;\r\n FGlyphSize: integer;\r\n FModalResult: TModalResult;\r\n FDefault: boolean;\r\n FCancel: boolean;\r\n procedure SetFlat(const Value: boolean);\r\n procedure SetGlyph(const Value: TURLPicture);\r\n procedure SetLayout(const Value: TButtonLayout);\r\n procedure SetMaterialGlyph(const Value: TMaterialGlyph);\r\n procedure SetColorEx(const Value: TColor);\r\n procedure SetIntColor(const Value: TColor);\r\n procedure SetAlignment(const Value: TAlignment);\r\n procedure SetGlyphURL(const Value: String);\r\n procedure SetMaterialGlyphSize(const Value: integer);\r\n procedure SetMaterialGyphColor(const Value: TColor);\r\n procedure SetMaterialGlyphType(const Value: TMaterialGlyphType);\r\n procedure SetGlyphSize(const Value: integer);\r\n protected\r\n procedure SetCaption(const AValue: string); override;\r\n function CreateElement: TJSElement; override;\r\n procedure UpdateElement; override;\r\n procedure UpdateElementVisual; override;\r\n procedure Click; override;\r\n procedure GlyphChanged(Sender: TObject);\r\n procedure HandleKeyPreview(Key: Word); override;\r\n property Alignment: TAlignment read FAlignment write SetAlignment default taCenter;\r\n property Cancel: boolean read FCancel write FCancel default false;\r\n property Color: TColor read FColor write SetColorEx;\r\n property Default: boolean read FDefault write FDefault default false;\r\n property IntColor: TColor read FIntColor write SetIntColor;\r\n property Flat: boolean read FFlat write SetFlat default false;\r\n property Layout: TButtonLayout read FLayout write SetLayout default blGlyphLeft;\r\n property MaterialGlyph: TMaterialGlyph read FMaterialGlyph write SetMaterialGlyph;\r\n property MaterialGlyphColor: TColor read FMaterialGlyphColor write SetMaterialGyphColor default clNone;\r\n property MaterialGlyphSize: integer read FMaterialGlyphSize write SetMaterialGlyphSize default 18;\r\n property MaterialGlyphType: TMaterialGlyphType read FMaterialGlyphType write SetMaterialGlyphType default mgNormal;\r\n property ModalResult: TModalResult read FModalResult write FModalResult default mrNone;\r\n property Glyph: TURLPicture read FGlyph write SetGlyph;\r\n property GlyphURL: String read FGlyphURL write SetGlyphURL;\r\n property GlyphSize: integer read FGlyphSize write SetGlyphSize default 0;\r\n procedure InitCSSLibrary(ALibrary: TCSSLibrary); override;\r\n public\r\n destructor Destroy; override;\r\n procedure CreateInitialize; override;\r\n end;\r\n\r\n TBitBtn = class(TCustomBitBtn)\r\n published\r\n property Align;\r\n property AlignWithMargins;\r\n property Alignment;\r\n property Anchors;\r\n property Cancel;\r\n property Caption;\r\n property Color;\r\n property Default;\r\n property DragMode;\r\n property ElementClassName;\r\n property ElementID;\r\n property ElementFont;\r\n property ElementPosition;\r\n property Enabled;\r\n property Font;\r\n property Flat;\r\n property Glyph;\r\n property GlyphURL;\r\n property GlyphSize;\r\n property Height;\r\n property HeightPercent;\r\n property HeightStyle;\r\n property Hint;\r\n property Layout;\r\n property MaterialGlyph;\r\n property MaterialGlyphColor;\r\n property MaterialGlyphSize;\r\n property MaterialGlyphType;\r\n property ModalResult;\r\n property ParentFont;\r\n property ShowHint;\r\n property TabOrder;\r\n property TabStop;\r\n property Visible;\r\n property Width;\r\n property WidthPercent;\r\n property WidthStyle;\r\n property OnClick;\r\n property OnDblClick;\r\n property OnKeyDown;\r\n property OnKeyPress;\r\n property OnKeyUp;\r\n property OnMouseDown;\r\n property OnMouseUp;\r\n property OnMouseMove;\r\n property OnMouseLeave;\r\n property OnMouseEnter;\r\n property OnEnter;\r\n property OnExit;\r\n property OnDragDrop;\r\n property OnDragOver;\r\n property OnEndDrag;\r\n property OnStartDrag;\r\n end;\r\n\r\n TWebBitBtn = class(TBitBtn);\r\n\r\n TCustomToolBar = class(TCustomControl)\r\n protected\r\n function CreateElement: TJSElement; override;\r\n public\r\n procedure CreateInitialize; override;\r\n property Color default $CFCFCF;\r\n end;\r\n\r\n TToolBar = class(TCustomToolBar)\r\n published\r\n property Align;\r\n property AlignWithMargins;\r\n property Anchors;\r\n property Color;\r\n property DragMode;\r\n property Enabled;\r\n property ElementClassName;\r\n property ElementID;\r\n property ElementFont;\r\n property ElementPosition;\r\n property Height;\r\n property HeightPercent;\r\n property HeightStyle;\r\n property Hint;\r\n property Left;\r\n property Margins;\r\n property ShowHint;\r\n property Top;\r\n property Visible;\r\n property Width;\r\n property WidthPercent;\r\n property WidthStyle;\r\n property OnClick;\r\n property OnDblClick;\r\n property OnDragDrop;\r\n property OnDragOver;\r\n property OnEndDrag;\r\n property OnStartDrag;\r\n end;\r\n\r\n TWebToolBar = class(TToolBar);\r\n\r\n TRichEditBtn = (reFont, reFontSize, reBold, reItalic, reUnderline, reStrikeThrough,\r\n reAlignLeft, reAlignCenter, reAlignRight, reUnorderedList, reOrderedList, reForegroundColor, reBackgroundColor, reHyperlink, reImageInsert, reLineSpacing);\r\n\r\n TRichEditButtonSet = set of TRichEditBtn;\r\n\r\n TRichEditToolBar = class(TToolBar)\r\n private\r\n FBold: TSpeedButton;\r\n FItalic: TSpeedButton;\r\n FUnderline: TSpeedButton;\r\n FStrikeThrough: TSpeedButton;\r\n FAlignLeft: TSpeedButton;\r\n FAlignCenter: TSpeedButton;\r\n FAlignRight: TSpeedButton;\r\n FUList: TSpeedButton;\r\n FOList: TSpeedButton;\r\n FURL: TSpeedButton;\r\n FRichEdit: TRichEdit;\r\n FFnt: TFontPicker;\r\n FFntSize: TFontSizePicker;\r\n FFgClr: TWebColorPicker;\r\n FBkClr: TWebColorPicker;\r\n FImage: TSpeedButton;\r\n FLineSpacing: TLineSpacingPicker;\r\n FOnSpeedButtonClick: TNotifyEvent;\r\n FTextColor: TColor;\r\n FBackgroundColor: TColor;\r\n FVisibleButtons: TRichEditButtonSet;\r\n FHints: TStrings;\r\n FBtnID: string;\r\n FFilePicker: TJSHTMLElement;\r\n FPtrFileLoad: pointer;\r\n procedure SetRichEdit(const AValue: TRichEdit);\r\n function GetRichEdit: TRichEdit;\r\n procedure SetTextColor(const Value: TColor);\r\n procedure SetBackgroundColor(const Value: TColor);\r\n procedure SetVisibleButtons(const Value: TRichEditButtonSet);\r\n procedure SetHints(const Value: TStrings);\r\n function HandleDoFileLoad(Event: TEventListenerEvent): Boolean; virtual;\r\n protected\r\n procedure Notification(AComponent: TComponent; Operation: TOperation); override;\r\n procedure CreateButton(var btn: TSpeedButton; BtnID, Glyph, Hint: string);\r\n procedure HandleSpeedButtonClick(Sender: TObject); virtual;\r\n procedure FgSelect(Sender: TObject);\r\n procedure BkSelect(Sender: TObject);\r\n procedure FntChange(Sender: TObject);\r\n procedure FntSizeChange(Sender: TObject);\r\n procedure LineSpacingChange(Sender: TObject);\r\n procedure UpdateButtons; virtual;\r\n procedure UpdateElement; override;\r\n procedure Loaded; override;\r\n procedure HandleAttributeChanged(Sender: TObject; Attributes: TSelAttributes);\r\n procedure GetChildren(Proc: TGetChildProc; Root: TComponent); override;\r\n function InitButtons(): boolean;\r\n procedure SetParent(AValue: TControl); override;\r\n public\r\n procedure CreateInitialize; override;\r\n destructor Destroy; override;\r\n property FontPicker: TFontPicker read FFnt;\r\n property FontSizePicker: TFontSizePicker read FFntSize;\r\n property BoldButton: TSpeedButton read FBold;\r\n property ItalicButton: TSpeedButton read FItalic;\r\n property UnderlineButton: TSpeedButton read FUnderline;\r\n property StrikeThroughButton: TSpeedButton read FStrikeThrough;\r\n property AlignLeftButton: TSpeedButton read FAlignLeft;\r\n property AlignCenterButton: TSpeedButton read FAlignCenter;\r\n property AlignRightButton: TSpeedButton read FAlignRight;\r\n property UListButton: TSpeedButton read FUList;\r\n property OListButton: TSpeedButton read FOList;\r\n property URLButton: TSpeedButton read FURL;\r\n property ImageButton: TSpeedButton read FImage;\r\n property ForegroundColorPicker: TWebColorPicker read FFgClr;\r\n property BackgroundColorPicker: TWebColorPicker read FBkClr;\r\n property LineSpacingPicker: TLineSpacingPicker read FLineSpacing;\r\n published\r\n property BackgroundColor: TColor read FBackgroundColor write SetBackgroundColor default clWhite;\r\n property Hints: TStrings read FHints write SetHints;\r\n property RichEdit: TRichEdit read GetRichEdit write SetRichEdit;\r\n property TextColor: TColor read FTextColor write SetTextColor default clBlack;\r\n property VisibleButtons: TRichEditButtonSet read FVisibleButtons write SetVisibleButtons;\r\n property OnSpeedButtonClick: TNotifyEvent read FOnSpeedButtonClick write FOnSpeedButtonClick;\r\n end;\r\n\r\n TWebRichEditToolBar = class(TRichEditToolBar);\r\n\r\n TToggleButtonStyle = (tsRectangular, tsRounded);\r\n\r\n TToggleButton = class(TCustomControl)\r\n private\r\n FChecked: boolean;\r\n FLabel: TJSHTMLElement;\r\n FInput: TJSHTMLElement;\r\n FSlider: TJSHTMLElement;\r\n FStyle: TToggleButtonStyle;\r\n procedure SetStyle(const Value: TToggleButtonStyle);\r\n function GetChecked: boolean;\r\n procedure SetChecked(const Value: boolean);\r\n protected\r\n function HandleDoClick(Event: TJSMouseEvent): Boolean; override;\r\n procedure UpdateElement; override;\r\n procedure UpdateCSS;\r\n function CreateElement: TJSElement; override;\r\n procedure Loaded; override;\r\n procedure Resize; override;\r\n public\r\n procedure CreateInitialize; override;\r\n published\r\n property Anchors;\r\n property Checked: boolean read GetChecked write SetChecked;\r\n property DragMode;\r\n property ElementClassName;\r\n property ElementID;\r\n property ElementFont;\r\n property ElementPosition;\r\n property Style: TToggleButtonStyle read FStyle write SetStyle default tsRectangular;\r\n property Visible;\r\n property OnClick;\r\n property OnMouseDown;\r\n property OnMouseUp;\r\n property OnMouseMove;\r\n property OnMouseLeave;\r\n property OnMouseEnter;\r\n property OnEnter;\r\n property OnExit;\r\n property OnDragDrop;\r\n property OnDragOver;\r\n property OnEndDrag;\r\n property OnStartDrag;\r\n end;\r\n\r\n TWebToggleButton = class(TToggleButton);\r\n\r\n\r\nimplementation\r\n\r\nuses\r\n WEBLib.WebTools, Math;\r\n\r\n// https://stackoverflow.com/questions/1720320/how-to-dynamically-create-css-class-in-javascript-and-apply\r\n// https://www.w3schools.com/howto/howto_css_switch.asp\r\n\r\ntype\r\n TRichEditorCracker = class(TRichEdit);\r\n\r\n{ TCustomSpeedButton }\r\n\r\nprocedure TCustomSpeedButton.CreateInitialize;\r\nbegin\r\n inherited;\r\n FColor := clNone;\r\n FIntColor := clNone;\r\n FGroupIndex := 0;\r\n FDown := false;\r\n FFlat := false;\r\n FGlyph := TURLPicture.Create;\r\n FGlyph.OnChange := GlyphChanged;\r\n FGlyph.OnDataChange := GlyphChanged;\r\n FLayout := blGlyphLeft;\r\n FMaterialGlyphSize := 18;\r\n FMaterialGlyphColor := clNone;\r\n FMaterialGlyphType := mgNormal;\r\nend;\r\n\r\nfunction TCustomSpeedButton.CanFocus: Boolean;\r\nbegin\r\n Result := false;\r\nend;\r\n\r\nfunction TCustomSpeedButton.CreateElement: TJSElement;\r\nbegin\r\n if FFlat then\r\n Result := document.createElement('SPAN')\r\n else\r\n begin\r\n Result := document.createElement('BUTTON');\r\n Result['type'] := 'BUTTON';\r\n end;\r\nend;\r\n\r\nprocedure TCustomSpeedButton.SetCaption(const AValue: string);\r\nbegin\r\n if (Caption <> AValue) then\r\n begin\r\n inherited SetCaption(AValue);\r\n UpdateElement;\r\n end;\r\nend;\r\n\r\nprocedure TCustomSpeedButton.SetColorEx(const AValue: TColor);\r\nbegin\r\n if FColor <> AValue then\r\n begin\r\n FColor := AValue;\r\n FIntColor := AValue;\r\n UpdateElement;\r\n end;\r\nend;\r\n\r\nprocedure TCustomSpeedButton.SetDown(const AValue: boolean);\r\nbegin\r\n if (FDown <> AValue) then\r\n begin\r\n FDown := AValue;\r\n UpdateElement;\r\n end;\r\nend;\r\n\r\nprocedure TCustomSpeedButton.SetEnabled(Value: Boolean);\r\nbegin\r\n inherited;\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TCustomSpeedButton.SetFlat(const Value: boolean);\r\nbegin\r\n if (FFlat <> Value) then\r\n begin\r\n FFlat := Value;\r\n RecreateElement;\r\n end;\r\nend;\r\n\r\nprocedure TCustomSpeedButton.SetIntColor(const AValue: TColor);\r\nbegin\r\n if FIntColor <> AValue then\r\n begin\r\n FIntColor := AValue;\r\n UpdateElement;\r\n end;\r\nend;\r\n\r\nprocedure TCustomSpeedButton.SetMaterialGlyph(const AValue: TMaterialGlyph);\r\nbegin\r\n if FMaterialGlyph <> AValue then\r\n begin\r\n FMaterialGlyph := AValue;\r\n UpdateElement;\r\n end;\r\nend;\r\n\r\nprocedure TCustomSpeedButton.SetMaterialGlyphSize(const Value: integer);\r\nbegin\r\n if (Value > 0) and (Value < 100) then\r\n begin\r\n FMaterialGlyphSize := Value;\r\n UpdateElement;\r\n end;\r\nend;\r\n\r\nprocedure TCustomSpeedButton.SetMaterialGlyphType(const Value: TMaterialGlyphType);\r\nbegin\r\n if FMaterialGlyphType <> Value then\r\n begin\r\n FMaterialGlyphType := Value;\r\n UpdateElement;\r\n end;\r\nend;\r\n\r\nprocedure TCustomSpeedButton.SetMaterialGyphColor(const Value: TColor);\r\nbegin\r\n if (FMaterialGlyphColor <> Value) then\r\n begin\r\n FMaterialGlyphColor := Value;\r\n UpdateElement;\r\n end;\r\nend;\r\n\r\nprocedure TCustomSpeedButton.SetGlyph(const Value: TURLPicture);\r\nbegin\r\n FGlyph.Assign(Value);\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TCustomSpeedButton.SetGlyphSize(const Value: integer);\r\nbegin\r\n if (FGlyphSize <> Value) then\r\n begin\r\n FGlyphSize := Value;\r\n UpdateElement;\r\n end;\r\nend;\r\n\r\nprocedure TCustomSpeedButton.SetGlyphURL(const Value: String);\r\nbegin\r\n if FGlyphURL <> Value then\r\n begin\r\n FGlyphURL := Value;\r\n RecreateElement;\r\n end;\r\nend;\r\n\r\nprocedure TCustomSpeedButton.SetGroupIndex(const AValue: integer);\r\nbegin\r\n FGroupIndex := AValue;\r\nend;\r\n\r\nprocedure TCustomSpeedButton.UpdateElement;\r\nvar\r\n s,inactive,noptr,icn,imgsrc,gs: string;\r\n matclr,cap,acc: string;\r\nbegin\r\n inherited;\r\n\r\n if not IsUpdating and (MaterialGlyph <> '') then\r\n AddControlLink('googlematerial', 'https://fonts.googleapis.com/icon?family=Material+Icons');\r\n\r\n if Assigned(ElementHandle) then\r\n begin\r\n ElementHandle.style.setProperty('vertical-align','middle');\r\n\r\n// if Visible then\r\n// ElementHandle.style.setProperty('display','table');\r\n\r\n ElementHandle.style.setProperty('overflow','hidden');\r\n ElementHandle.style.setProperty('padding','0px');\r\n ElementHandle.style.setProperty('text-align','center');\r\n\r\n ElementHandle.style.setProperty('min-width','32px');\r\n\r\n if FFlat and Visible then\r\n begin\r\n ElementHandle.style.setProperty('display','flex');\r\n ElementHandle.style.setProperty('justify-content','center');\r\n end;\r\n\r\n s := '';\r\n inactive := '';\r\n noptr := '';\r\n\r\n if not Enabled then\r\n inactive := ' md-light md-inactive';\r\n\r\n noptr := 'pointer-events:none';\r\n\r\n if FMaterialGlyph <> '' then\r\n begin\r\n matclr := '';\r\n if FMaterialGlyphColor <> clNone then\r\n begin\r\n if Enabled then\r\n matclr := ';color:'+ColorToHTML(FMaterialGlyphColor)\r\n else\r\n matclr := ';color:'+ColorToHTML($A0A0A0);\r\n end;\r\n\r\n icn := '' + FMaterialGlyph + '';\r\n end;\r\n\r\n if FGlyph.Data <> '' then\r\n imgsrc := 'data:image/jpeg;base64,' + HexImageDecodeAsBase64(FGlyph.Data)\r\n else\r\n if FGlyph.FileName <> '' then\r\n imgsrc := FGlyph.FileName\r\n else\r\n if FGlyphURL <> '' then\r\n imgsrc := FGlyphURL;\r\n\r\n gs := '';\r\n if GlyphSize <> 0 then\r\n gs := 'width:'+GlyphSize.ToString+'px';\r\n\r\n if imgsrc <> '' then\r\n icn := '';\r\n\r\n if (ElementHandle.childElementCount = 0) or not IsLinked then\r\n cap := ProcessAccelerator(Caption,acc);\r\n\r\n if acc <> '' then\r\n ElementHandle['accesskey'] := acc;\r\n\r\n if TabStop then\r\n ElementHandle['tabindex'] := inttostr(TabOrder)\r\n else\r\n ElementHandle['tabindex'] := '-1';\r\n\r\n case Layout of\r\n blGlyphLeft: s := '
'+icn+''+cap+'
';\r\n blGlyphRight: s := '
'+cap+''+icn+'
';\r\n blGlyphTop: s := '
'+icn+'
'+cap+'
';\r\n blGlyphBottom: s := '
'+cap+'
'+icn+'
';\r\n end;\r\n\r\n ElementHandle.innerHTML := s;\r\n\r\n SetHTMLElementFont(TJSHTMLElement(ElementHandle.firstChild), Font, not ((ElementClassName = '') and (ElementFont = efProperty)) );\r\n\r\n if not IsEnabled then\r\n TJSHTMLElement(ElementHandle).style.removeProperty('color')\r\n else // restore color when font color is used\r\n if (ELementFont = efProperty) and (ElementClassName = '') then\r\n begin\r\n TJSHTMLElement(ElementHandle).style.setProperty('color',ColorToHTML(Font.Color));\r\n if (csDesigning in ComponentState) then\r\n TJSHTMLElement(ElementHandle.firstChild).style.setProperty('color',ColorToHTML(Font.Color));\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TCustomSpeedButton.UpdateElementVisual;\r\nvar\r\n clr: TColor;\r\nbegin\r\n inherited;\r\n\r\n if Assigned(ElementHandle) then\r\n begin\r\n if Down then\r\n clr := clGray\r\n else\r\n clr := FIntColor;\r\n\r\n if (clr <> clNone) and (ElementClassName = '') then\r\n ElementHandle.style.setProperty('background-color', ColorToHTML(clr))\r\n else\r\n ElementHandle.style.setProperty('background-color', '');\r\n\r\n if Assigned(ElementHandle.firstChild) then\r\n SetHTMLElementFont(TJSHTMLElement(ElementHandle.firstChild), Font, not ((ElementClassName = '') and (ElementFont = efProperty)) );\r\n\r\n if not IsEnabled then\r\n TJSHTMLElement(ElementHandle).style.removeProperty('color')\r\n else // restore color when font color is used\r\n if (ELementFont = efProperty) and (ElementClassName = '') then\r\n begin\r\n TJSHTMLElement(ElementHandle).style.setProperty('color',ColorToHTML(Font.Color));\r\n if (csDesigning in ComponentState) and Assigned(ElementHandle.firstChild) then\r\n TJSHTMLElement(ElementHandle.firstChild).style.setProperty('color',ColorToHTML(Font.Color));\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TCustomSpeedButton.UpdateGroup;\r\nvar\r\n i: integer;\r\nbegin\r\n if Assigned(Parent) then\r\n begin\r\n for i := 0 to Parent.ControlCount - 1 do\r\n begin\r\n if (Parent.Controls[i] <> Self) and (Parent.Controls[i] is TSpeedButton) and ((Parent.Controls[i] as TSpeedButton).GroupIndex = GroupIndex) then\r\n (Parent.Controls[i] as TSpeedButton).Down := false;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TCustomSpeedButton.DoMouseLeave;\r\nvar\r\n frm: TCustomForm;\r\nbegin\r\n inherited;\r\n frm := GetParentForm(Self);\r\n if Assigned(frm) and (frm.CSSLibrary = cssBootstrap) and ShowHint and (Hint <> '') then\r\n Exit;\r\n\r\n IntColor := FColor;\r\nend;\r\n\r\nprocedure TCustomSpeedButton.GlyphChanged(Sender: TObject);\r\nbegin\r\n UpdateElement;\r\nend;\r\n\r\n\r\nprocedure TCustomSpeedButton.InitCSSLibrary(ALibrary: TCSSLibrary);\r\nbegin\r\n if ALibrary = cssBootstrap then\r\n begin\r\n ElementClassName := 'btn btn-light';\r\n ElementFont := efCSS;\r\n HeightStyle := ssAuto;\r\n end;\r\nend;\r\n\r\ndestructor TCustomSpeedButton.Destroy;\r\nbegin\r\n FGlyph.Free;\r\n inherited;\r\nend;\r\n\r\nprocedure TCustomSpeedButton.DoMouseEnter;\r\nvar\r\n frm: TCustomForm;\r\nbegin\r\n inherited;\r\n\r\n frm := GetParentForm(Self);\r\n if Assigned(frm) and (frm.CSSLibrary = cssBootstrap) and ShowHint and (Hint <> '') then\r\n Exit;\r\n if Enabled then\r\n IntColor := clSilver;\r\nend;\r\n\r\nprocedure TCustomSpeedButton.MouseUp(Button: TMouseButton; Shift: TShiftState; X,Y: Integer);\r\nbegin\r\n inherited;\r\n if Enabled then\r\n IntColor := clSilver;\r\nend;\r\n\r\nprocedure TCustomSpeedButton.MouseDown(Button: TMouseButton; Shift: TShiftState; X,Y: Integer);\r\nbegin\r\n inherited;\r\n if not Enabled then\r\n Exit;\r\n\r\n IntColor := clGray;\r\n\r\n if GroupIndex > 0 then\r\n begin\r\n if Down and AllowAllUp then\r\n Down := false\r\n else\r\n begin\r\n Down := true;\r\n UpdateGroup;\r\n end;\r\n end;\r\nend;\r\n\r\n{ TCustomToolBar }\r\n\r\nfunction TCustomToolBar.CreateElement: TJSElement;\r\nvar\r\n el: TJSHTMLElement;\r\nbegin\r\n Result := document.createElement('SPAN');\r\n // add design-time layer to prevent interacting with the controls on the toolbar\r\n if (csDesigning in ComponentState) then\r\n begin\r\n el := TJSHTMLElement(document.createElement('DIV'));\r\n el.style.setProperty('z-index','10');\r\n el.style.setProperty('width','100%');\r\n el.style.setProperty('height','100%');\r\n el.style.setProperty('webkit-user-select', 'none');\r\n el.style.setProperty('moz-user-select', 'none');\r\n el.style.setProperty('khtml-user-select', 'none');\r\n el.style.setProperty('ms-user-select', 'none');\r\n el.style.setProperty('user-select', 'none');\r\n el.style.setProperty('position', 'absolute');\r\n\r\n Result.appendChild(el);\r\n end;\r\nend;\r\n\r\nprocedure TCustomToolBar.CreateInitialize;\r\nbegin\r\n inherited;\r\n Color := $CFCFCF;\r\n ControlStyle := ControlStyle + [csAcceptsControls];\r\n Width := 300;\r\n Height := 32;\r\nend;\r\n\r\n{ TRichEditToolBar }\r\n\r\nprocedure TRichEditToolBar.CreateInitialize;\r\n\r\nbegin\r\n inherited;\r\n FPtrFileLoad := @HandleDoFileLoad;\r\n\r\n // do not permit other child controls\r\n ControlStyle := ControlStyle - [csAcceptsControls];\r\n\r\n FTextColor := clBlack;\r\n FBackgroundColor := clWhite;\r\n\r\n FBtnID := FindUniqueName('RETBBtn');\r\n\r\n FFnt := TFontPicker.Create(Self);\r\n FFnt.Name := FBtnID + '_fontname';\r\n FFnt.Parent := Self;\r\n FFnt.Width := 150;\r\n FFnt.Align := alLeft;\r\n FFnt.ItemIndex := 0;\r\n FFnt.OnChange := FntChange;\r\n\r\n FFntSize := TFontSizePicker.Create(Self);\r\n FFntSize.Name := FBtnID + '_fontsize';\r\n FFntSize.Parent := Self;\r\n FFntSize.Width := 50;\r\n FFntSize.Align := alLeft;\r\n FFntSize.PickerMode := fmRelativeSize;\r\n FFntSize.ItemIndex := 0;\r\n FFntSize.OnChange := FntSizeChange;\r\n\r\n FHints := TStringList.Create;\r\n FHints.Add('Bold');\r\n FHints.Add('Italic');\r\n FHints.Add('Underline');\r\n FHints.Add('Strike Throught');\r\n\r\n FHints.Add('Text Color');\r\n FHints.Add('Background Color');\r\n FHints.Add('Align left');\r\n FHints.Add('Align center');\r\n FHints.Add('Align right');\r\n FHints.Add('Numbered list');\r\n FHints.Add('List');\r\n FHints.Add('Hyperlink');\r\n FHints.Add('Insert image');\r\n FHints.Add('Line spacing');\r\n\r\n CreateButton(FBold, FBtnID + '_bold', '',FHints.Strings[0]);\r\n CreateButton(FItalic, FBtnID + '_italic', '',FHints.Strings[1]);\r\n CreateButton(FUnderline, FBtnID + '_underline', '',FHints.Strings[2]);\r\n CreateButton(FStrikeThrough, FBtnID + '_strikethrough', '',FHints.Strings[3]);\r\n\r\n FFgClr := TWebColorPicker.Create(Self);\r\n FFgClr.Name := FBtnID + '_fgclr';\r\n FFgClr.Parent := Self;\r\n FFgClr.Align := alLeft;\r\n FFgClr.Hint := FHints.Strings[4];\r\n FFgClr.Width := 32;\r\n FFgClr.Height := 24;\r\n FFgClr.Color := clBlack;\r\n FFgClr.OnSelect := FgSelect;\r\n FFgClr.ShowHint := true;\r\n\r\n FBkClr := TWebColorPicker.Create(Self);\r\n FBkClr.Name := FBtnID + '_bkclr';\r\n FBkClr.Parent := Self;\r\n FBkClr.Align := alLeft;\r\n FBkClr.Hint := FHints.Strings[5];\r\n FBkClr.Width := 32;\r\n FBkClr.Height := 24;\r\n FBkClr.Color := clWhite;\r\n FBkClr.OnSelect := BkSelect;\r\n FBkClr.ShowHint := true;\r\n\r\n CreateButton(FAlignLeft, FBtnID + '_alignleft', '',FHints.Strings[6]);\r\n CreateButton(FAlignCenter, FBtnID + '_aligncenter', '',FHints.Strings[7]);\r\n CreateButton(FAlignRight, FBtnID + '_alignright', '',FHints.Strings[8]);\r\n\r\n CreateButton(FOList, FBtnID + '_olist','',FHints.Strings[9]);\r\n CreateButton(FUList, FBtnID + '_ulist','',FHints.Strings[10]);\r\n\r\n CreateButton(FURL, FBtnID + '_url', '',FHints.Strings[11]);\r\n\r\n CreateButton(FImage, FBtnID + '_image', '',FHints.Strings[12]);\r\n\r\n FVisibleButtons := [reFont, reFontSize, reBold, reItalic, reUnderline, reStrikeThrough,\r\n reAlignLeft, reAlignCenter, reAlignRight, reUnorderedList, reOrderedList, reForegroundColor, reBackgroundColor, reHyperlink, reImageInsert, reLineSpacing];\r\n\r\n Width := 540;\r\n Height := 32;\r\n\r\n RichEdit := nil;\r\n\r\n FFilePicker := TJSHTMLElement(document.createElement('INPUT'));\r\n FFilePicker['type'] := 'file';\r\n FFilePicker.style.setProperty('visibility','hidden');\r\n FFilePicker.addEventListener('change', FPtrFileLoad);\r\n ElementHandle.appendChild(FFilePicker);\r\n\r\n FLineSpacing := TLineSpacingPicker.Create(Self);\r\n FLineSpacing.Name := FBtnID + '_linespacing';\r\n FLineSpacing.Parent := Self;\r\n FLineSpacing.Width := 40;\r\n FLineSpacing.Align := alLeft;\r\n FLineSpacing.ItemIndex := 0;\r\n FLineSpacing.ShowHint := true;\r\n FLineSpacing.Hint := FHints.Strings[13];\r\n FLineSpacing.OnChange := LineSpacingChange;\r\nend;\r\n\r\ndestructor TRichEditToolBar.Destroy;\r\nbegin\r\n FHints.Free;\r\n if Assigned(FRichEdit) then\r\n TRichEditorCracker(FRichEdit).OnAttributesChanged := nil;\r\n\r\n inherited;\r\nend;\r\n\r\nprocedure TRichEditToolBar.CreateButton(var btn: TSpeedButton; BtnID, Glyph, Hint: string);\r\nbegin\r\n btn := TSpeedButton.Create(BtnID);\r\n btn.Name := BtnID;\r\n btn.Parent := Self;\r\n btn.MaterialGlyph := Glyph;\r\n btn.Top := 0;\r\n btn.Width := 32;\r\n btn.Height := 24;\r\n btn.Align := alLeft;\r\n btn.Flat := true;\r\n btn.Hint := Hint;\r\n btn.ShowHint := Hint <> '';\r\n btn.Enabled := true;\r\n btn.OnClick := HandleSpeedButtonClick;\r\nend;\r\n\r\nprocedure TRichEditToolBar.SetBackgroundColor(const Value: TColor);\r\nbegin\r\n FBackgroundColor := Value;\r\n FBkClr.Color := Value;\r\nend;\r\n\r\nprocedure TRichEditToolBar.SetHints(const Value: TStrings);\r\nbegin\r\n FHints.Assign(Value);\r\nend;\r\n\r\nprocedure TRichEditToolBar.SetParent(AValue: TControl);\r\nbegin\r\n inherited;\r\n\r\n if not (csLoading in ComponentState) then\r\n InitButtons;\r\nend;\r\n\r\nprocedure TRichEditToolBar.SetRichEdit(const AValue: TRichEdit);\r\nbegin\r\n if Assigned(AValue) then\r\n begin\r\n FRichEdit := AValue;\r\n FRichEdit.Owner := Self;\r\n TRichEditorCracker(FRichEdit).OnAttributesChanged := HandleAttributeChanged;\r\n end;\r\nend;\r\n\r\nprocedure TRichEditToolBar.SetTextColor(const Value: TColor);\r\nbegin\r\n FTextColor := Value;\r\n FFgClr.Color := Value;\r\nend;\r\n\r\nprocedure TRichEditToolBar.SetVisibleButtons(const Value: TRichEditButtonSet);\r\nbegin\r\n FVisibleButtons := Value;\r\n UpdateButtons;\r\nend;\r\n\r\nprocedure TRichEditToolBar.UpdateButtons;\r\nbegin\r\n if IsUpdating then\r\n Exit;\r\n\r\n FBold.Visible := reBold in FVisibleButtons;\r\n FItalic.Visible := reItalic in VisibleButtons;\r\n FUnderline.Visible := reUnderline in VisibleButtons;\r\n FStrikeThrough.Visible := reStrikeThrough in VisibleButtons;\r\n FAlignLeft.Visible := reAlignLeft in VisibleButtons;\r\n FAlignCenter.Visible := reAlignCenter in VisibleButtons;\r\n FAlignRight.Visible := reAlignRight in VisibleButtons;\r\n FUList.Visible := reUnorderedList in VisibleButtons;\r\n FOList.Visible := reOrderedList in VisibleButtons;\r\n FFnt.Visible := reFont in VisibleButtons;\r\n FFntSize.Visible := reFontSize in VisibleButtons;\r\n FFgClr.Visible := reForegroundColor in VisibleButtons;\r\n FBkClr.Visible := reBackgroundColor in VisibleButtons;\r\n FURL.Visible := reHyperlink in VisibleButtons;\r\n FImage.Visible := reImageInsert in VisibleButtons;\r\n FLineSpacing.Visible := reLineSpacing in VisibleButtons;\r\n\r\n if ElementPosition = epRelative then\r\n begin\r\n if Assigned(ElementHandle) then\r\n ElementHandle.style.setProperty('display','flex');\r\n end;\r\n\r\n FFnt.ElementPosition := ElementPosition;\r\n FFntSize.ElementPosition := ElementPosition;\r\n FBold.ElementPosition := ElementPosition;\r\n FItalic.ElementPosition := ElementPosition;\r\n FUnderline.ElementPosition := ElementPosition;\r\n FStrikeThrough.ElementPosition := ElementPosition;\r\n FFgClr.ElementPosition := ElementPosition;\r\n FBkClr.ElementPosition := ElementPosition;\r\n FAlignLeft.ElementPosition := ElementPosition;\r\n FAlignCenter.ElementPosition := ElementPosition;\r\n FAlignRight.ElementPosition := ElementPosition;\r\n FUList.ElementPosition := ElementPosition;\r\n FOList.ElementPosition := ElementPosition;\r\n FURL.ElementPosition := ElementPosition;\r\n FImage.ElementPosition := ElementPosition;\r\n FLineSpacing.ElementPosition := ElementPosition;\r\n\r\n while FHints.Count < 14 do\r\n FHints.Add('');\r\n\r\n FBold.Hint := FHints.Strings[0];\r\n FItalic.Hint := FHints.Strings[1];\r\n FUnderline.Hint := FHints.Strings[2];\r\n FStrikeThrough.Hint := FHints.Strings[3];\r\n FFgClr.Hint := FHints.Strings[4];\r\n FBkClr.Hint := FHints.Strings[5];\r\n\r\n FAlignLeft.Hint := FHints.Strings[6];\r\n FAlignCenter.Hint := FHints.Strings[7];\r\n FAlignRight.Hint := FHints.Strings[8];\r\n FUList.Hint := FHints.Strings[9];\r\n FOList.Hint := FHints.Strings[10];\r\n FURL.Hint := FHints.Strings[11];\r\n FImage.Hint := FHints.Strings[12];\r\n FLineSpacing.Hint := FHints.Strings[13];\r\nend;\r\n\r\nprocedure TRichEditToolBar.UpdateElement;\r\nbegin\r\n inherited;\r\n\r\n if Assigned(ElementHandle) then\r\n begin\r\n ElementHandle.style.SetProperty('height', '32px');\r\n end;\r\nend;\r\n\r\nprocedure TRichEditToolBar.GetChildren(Proc: TGetChildProc; Root: TComponent);\r\nbegin\r\n // do nothing\r\nend;\r\n\r\nfunction TRichEditToolBar.GetRichEdit: TRichEdit;\r\nbegin\r\n Result := FRichEdit;\r\nend;\r\n\r\nprocedure TRichEditToolBar.FgSelect(Sender: TObject);\r\nbegin\r\n if Assigned(RichEdit) then\r\n RichEdit.SelAttributes.Color := FFgClr.Color;\r\nend;\r\n\r\nprocedure TRichEditToolBar.BkSelect(Sender: TObject);\r\nbegin\r\n if Assigned(RichEdit) then\r\n RichEdit.SelAttributes.BackColor := FBkClr.Color;\r\nend;\r\n\r\nprocedure TRichEditToolBar.FntChange(Sender: TObject);\r\nbegin\r\n if Assigned(RichEdit) then\r\n RichEdit.SelAttributes.Name := FFnt.Items[FFnt.ItemIndex];\r\nend;\r\n\r\nprocedure TRichEditToolBar.FntSizeChange(Sender: TObject);\r\nbegin\r\n if Assigned(RichEdit) then\r\n RichEdit.SelAttributes.Height := FFntSize.ItemIndex + 1;\r\nend;\r\n\r\nprocedure TRichEditToolBar.HandleAttributeChanged(Sender: TObject; Attributes: TSelAttributes);\r\nbegin\r\n FFnt.ItemIndex := Max(0,FFnt.Items.IndexOf(Attributes.FontName));\r\n FFntSize.ItemIndex := Max(0,FFntSize.Items.IndexOf(Attributes.FontSize));\r\n FBold.Down := Attributes.isBold;\r\n FItalic.Down := Attributes.isItalic;\r\n FUnderline.Down := Attributes.isUnderline;\r\n FStrikeThrough.Down := Attributes.isStrikeOut;\r\n\r\n FAlignLeft.Down := Attributes.isLeft;\r\n FAlignRight.Down := Attributes.isRight;\r\n FAlignCenter.Down := Attributes.isCenter;\r\n\r\n if Attributes.FontColor <> '' then\r\n begin\r\n FFgClr.Color := HexToColor(Attributes.FontColor);\r\n end;\r\n\r\n if Attributes.BkColor <> '' then\r\n begin\r\n FBkClr.Color := RgbToColor(Attributes.BkColor);\r\n end;\r\nend;\r\n\r\nfunction TRichEditToolBar.HandleDoFileLoad(Event: TEventListenerEvent): Boolean;\r\n\r\n procedure InsertImage(DataURL: string);\r\n begin\r\n RichEdit.InsertImage(DataURL);\r\n end;\r\n\r\nbegin\r\n if 1 < 0 then\r\n InsertImage('');\r\n\r\n asm\r\n var file = this.FFilePicker.files[0];\r\n var reader = new FileReader();\r\n\r\n reader.addEventListener(\"load\", function () {\r\n InsertImage(reader.result);\r\n }, false);\r\n\r\n if (file)\r\n reader.readAsDataURL(file);\r\n end;\r\n\r\n Result := true;\r\nend;\r\n\r\nprocedure TRichEditToolBar.HandleSpeedButtonClick(Sender: TObject);\r\nvar\r\n BID: string;\r\nbegin\r\n if Assigned(RichEdit) then\r\n begin\r\n BID := TControl(Sender).GetID;\r\n\r\n if BID = FBtnID + '_bold' then\r\n begin\r\n if fsBold in RichEdit.SelAttributes.Style then\r\n RichEdit.SelAttributes.Style := RichEdit.SelAttributes.Style - [fsBold]\r\n else\r\n RichEdit.SelAttributes.Style := RichEdit.SelAttributes.Style + [fsBold];\r\n end\r\n else if BID = FBtnID + '_italic' then\r\n begin\r\n if fsItalic in RichEdit.SelAttributes.Style then\r\n RichEdit.SelAttributes.Style := RichEdit.SelAttributes.Style - [fsItalic]\r\n else\r\n RichEdit.SelAttributes.Style := RichEdit.SelAttributes.Style + [fsItalic];\r\n end\r\n else if BID = FBtnID + '_underline' then\r\n begin\r\n if fsUnderline in RichEdit.SelAttributes.Style then\r\n RichEdit.SelAttributes.Style := RichEdit.SelAttributes.Style - [fsUnderline]\r\n else\r\n RichEdit.SelAttributes.Style := RichEdit.SelAttributes.Style + [fsUnderline];\r\n end\r\n else if BID = FBtnID + '_strikethrough' then\r\n begin\r\n if fsStrikeOut in RichEdit.SelAttributes.Style then\r\n RichEdit.SelAttributes.Style := RichEdit.SelAttributes.Style - [fsStrikeOut]\r\n else\r\n RichEdit.SelAttributes.Style := RichEdit.SelAttributes.Style + [fsStrikeOut];\r\n end\r\n else if BID = FBtnID + '_alignleft' then\r\n RichEdit.SelAttributes.Alignment := taleftJustify\r\n else if BID = FBtnID + '_aligncenter' then\r\n RichEdit.SelAttributes.Alignment := taCenter\r\n else if BID = FBtnID + '_alignright' then\r\n RichEdit.SelAttributes.Alignment := taRightJustify\r\n else if BID = FBtnID + '_olist' then\r\n RichEdit.SelAttributes.OrderedList := not RichEdit.SelAttributes.OrderedList\r\n else if BID = FBtnID + '_ulist' then\r\n RichEdit.SelAttributes.UnOrderedList := not RichEdit.SelAttributes.UnOrderedList\r\n else if BID = FBtnID + '_url' then\r\n RichEdit.SelAttributes.Link\r\n else if BID = FBtnID + '_image' then\r\n FFilePicker.click();\r\n\r\n end;\r\n\r\n if Assigned(OnSpeedButtonClick) then\r\n OnSpeedButtonClick(Sender);\r\nend;\r\n\r\n{$HINTS OFF}\r\nfunction TRichEditToolBar.InitButtons(): boolean;\r\n\r\n procedure HandleTimeOut;\r\n var\r\n i: integer;\r\n begin\r\n for i := 0 to ControlCount - 1 do\r\n begin\r\n Controls[i].UpdateElement;\r\n end;\r\n end;\r\n\r\nbegin\r\n Result := true;\r\n if not IsLinked then\r\n Exit;\r\n\r\n if (1 < 0) then\r\n HandleTimeOut;\r\n\r\n asm\r\n setTimeout(function() {HandleTimeOut();}, 10);\r\n end;\r\nend;\r\n{$HINTS ON}\r\n\r\nprocedure TRichEditToolBar.LineSpacingChange(Sender: TObject);\r\nvar\r\n spacing: single;\r\nbegin\r\n case FLineSpacing.ItemIndex of\r\n 0: spacing := 1;\r\n 1: spacing := 1.5;\r\n 2: spacing := 2;\r\n end;\r\n FRichEdit.SetSelectionSpacing(spacing);\r\nend;\r\n\r\nprocedure TRichEditToolBar.Loaded;\r\nbegin\r\n inherited;\r\n UpdateButtons;\r\n InitButtons;\r\nend;\r\n\r\nprocedure TRichEditToolBar.Notification(AComponent: TComponent;\r\n Operation: TOperation);\r\nbegin\r\n inherited;\r\n if (Operation = opRemove) and (AComponent = FRichEdit) then\r\n begin\r\n FRichEdit := nil;\r\n end;\r\nend;\r\n\r\n{ TToggleButton }\r\n\r\nfunction TToggleButton.CreateElement: TJSElement;\r\nbegin\r\n Result := document.createElement('span');\r\n FLabel := TJSHTMLElement(document.createElement('label'));\r\n FInput := TJSHTMLElement(document.createElement('input'));\r\n FSlider := TJSHTMLElement(document.createElement('span'));\r\n FInput.setAttribute('type','checkbox');\r\n FInput.style.setProperty('display','none');\r\n\r\n Result.appendChild(FLabel);\r\n FLabel.appendChild(FInput);\r\n FLabel.appendChild(FSlider);\r\nend;\r\n\r\nprocedure TToggleButton.CreateInitialize;\r\nbegin\r\n inherited;\r\n Width := 48;\r\n Height := 24;\r\nend;\r\n\r\nfunction TToggleButton.GetChecked: boolean;\r\nbegin\r\n if Assigned(Container) then\r\n FChecked := TJSHTMLInputElement(FInput).checked;\r\n\r\n Result := FChecked;\r\nend;\r\n\r\nfunction TToggleButton.HandleDoClick(Event: TJSMouseEvent): Boolean;\r\nbegin\r\n ElementEvent := Event;\r\n StopPropagation;\r\n\r\n if Event.target = FInput then\r\n begin\r\n if Assigned(OnClick) then\r\n OnClick(Self);\r\n end;\r\n Result := True;\r\n ElementEvent := nil;\r\nend;\r\n\r\nprocedure TToggleButton.Loaded;\r\nbegin\r\n inherited;\r\nend;\r\n\r\nprocedure TToggleButton.Resize;\r\nbegin\r\n inherited;\r\n UpdateCSS;\r\nend;\r\n\r\nprocedure TToggleButton.SetChecked(const Value: boolean);\r\nbegin\r\n FChecked := Value;\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TToggleButton.SetStyle(const Value: TToggleButtonStyle);\r\nbegin\r\n if (FStyle <> Value) then\r\n begin\r\n FStyle := Value;\r\n UpdateElement;\r\n end;\r\nend;\r\n\r\nprocedure TToggleButton.UpdateCSS;\r\nvar\r\n css: string;\r\n wpx,hpx,hwpx,wspx,hspx: string;\r\nbegin\r\n wpx := width.ToString+'px';\r\n hpx := height.ToString+'px';\r\n hwpx := (width div 2).toString+'px';\r\n\r\n wspx := ((width div 2) - 8).toString+'px';\r\n hspx := (height - 8).toString+'px';\r\n\r\n css := '.'+Name+'_switch {'+\r\n 'position: relative;'+\r\n 'display: inline-block;'+\r\n 'width: '+wpx+';'+\r\n 'height: '+hpx+';'+\r\n '}'+\r\n\r\n '.switch input {display:none;}'+\r\n\r\n '.'+Name+'_slider {'+\r\n 'position: absolute;'+\r\n 'cursor: pointer;'+\r\n 'top: 0;'+\r\n 'left: 0;'+\r\n 'right: 0;'+\r\n 'bottom: 0;'+\r\n 'background-color: #ccc;'+\r\n '-webkit-transition: .4s;'+\r\n 'transition: .4s;'+\r\n '}'+\r\n\r\n '.'+Name+'_slider:before {'+\r\n 'position: absolute;'+\r\n 'content: \"\";'+\r\n 'height: '+hspx+';'+\r\n 'width: '+ wspx+';'+\r\n 'left: 4px;'+\r\n 'bottom: 4px;'+\r\n 'background-color: white;'+\r\n '-webkit-transition: .4s;'+\r\n 'transition: .4s;'+\r\n '}'+\r\n\r\n 'input:checked + .'+Name+'_slider {'+\r\n 'background-color: #2196F3;'+\r\n '}'+\r\n\r\n 'input:focus + .'+Name+'_slider {'+\r\n 'box-shadow: 0 0 1px #2196F3;'+\r\n '}'+\r\n\r\n 'input:checked + .'+Name+'_slider:before {'+\r\n '-webkit-transform: translateX('+hwpx+');'+\r\n '-ms-transform: translateX('+hwpx+');'+\r\n 'transform: translateX('+hwpx+');'+\r\n '}'+\r\n\r\n '/* Rounded sliders */'+\r\n '.'+Name+'_slider.round {'+\r\n 'border-radius: '+ wspx+ ';'+\r\n '}'+\r\n\r\n '.'+Name+'_slider.round:before {'+\r\n 'border-radius: 50%;'+\r\n '}';\r\n\r\n AddInstanceStyle(css);\r\nend;\r\n\r\nprocedure TToggleButton.UpdateElement;\r\nbegin\r\n inherited;\r\n if not IsUpdating and Assigned(FLabel) then\r\n begin\r\n UpdateCSS;\r\n InjectCSS;\r\n\r\n FLabel.setAttribute('class', Name + '_switch');\r\n\r\n TJSHTMLInputElement(FInput).checked := FChecked;\r\n\r\n if Style = tsRectangular then\r\n FSlider.setAttribute('class', Name +'_slider')\r\n else\r\n FSlider.setAttribute('class',Name +'_slider round');\r\n end;\r\nend;\r\n\r\n{ TCustomBitBtn }\r\n\r\nprocedure TCustomBitBtn.Click;\r\nvar\r\n frm: TCustomForm;\r\nbegin\r\n inherited;\r\n\r\n if ModalResult <> mrNone then\r\n begin\r\n frm := GetParentForm(Self);\r\n if Assigned(frm) then\r\n frm.ModalResult := ModalResult;\r\n end;\r\nend;\r\n\r\nfunction TCustomBitBtn.CreateElement: TJSElement;\r\nbegin\r\n if FFlat then\r\n Result := document.createElement('SPAN')\r\n else\r\n begin\r\n Result := document.createElement('BUTTON');\r\n Result['type'] := 'BUTTON';\r\n end;\r\nend;\r\n\r\nprocedure TCustomBitBtn.CreateInitialize;\r\nbegin\r\n inherited;\r\n FColor := clNone;\r\n FIntColor := clNone;\r\n FFlat := false;\r\n Width := 80;\r\n Height := 25;\r\n FAlignment := taCenter;\r\n FGlyph := TURLPicture.Create;\r\n FGlyph.OnChange := GlyphChanged;\r\n FGlyph.OnDataChange := GlyphChanged;\r\n FGlyphSize := 0;\r\n FMaterialGlyphSize := 18;\r\n FMaterialGlyphColor := clNone;\r\n FMaterialGlyphType := mgNormal;\r\n FModalResult := mrNone;\r\nend;\r\n\r\ndestructor TCustomBitBtn.Destroy;\r\nbegin\r\n FGlyph.Free;\r\n inherited;\r\nend;\r\n\r\nprocedure TCustomBitBtn.GlyphChanged(Sender: TObject);\r\nbegin\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TCustomBitBtn.HandleKeyPreview(Key: Word);\r\nbegin\r\n inherited;\r\n if Default and (Key = VK_RETURN) then\r\n begin\r\n Click;\r\n end;\r\n if Cancel and (Key = VK_ESCAPE) then\r\n begin\r\n Click;\r\n end;\r\nend;\r\n\r\nprocedure TCustomBitBtn.InitCSSLibrary(ALibrary: TCSSLibrary);\r\nbegin\r\n if (ALibrary = cssBootstrap) then\r\n begin\r\n ElementClassName := 'btn btn-light';\r\n ElementFont := efCSS;\r\n HeightStyle := ssAuto;\r\n end;\r\nend;\r\n\r\nprocedure TCustomBitBtn.SetCaption(const AValue: string);\r\nbegin\r\n if (Caption <> AValue) then\r\n begin\r\n inherited SetCaption(AValue);\r\n UpdateElement;\r\n end;\r\nend;\r\n\r\nprocedure TCustomBitBtn.SetColorEx(const Value: TColor);\r\nbegin\r\n if (FColor <> Value) then\r\n begin\r\n FColor := Value;\r\n inherited Color := Value;\r\n UpdateElement;\r\n end;\r\nend;\r\n\r\nprocedure TCustomBitBtn.SetFlat(const Value: boolean);\r\nbegin\r\n if (FFlat <> Value) then\r\n begin\r\n FFlat := Value;\r\n RecreateElement;\r\n end;\r\nend;\r\n\r\nprocedure TCustomBitBtn.SetGlyph(const Value: TURLPicture);\r\nbegin\r\n FGlyph.Assign(Value);\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TCustomBitBtn.SetGlyphSize(const Value: integer);\r\nbegin\r\n if (FGlyphSize <> Value) then\r\n begin\r\n FGlyphSize := Value;\r\n UpdateElement;\r\n end;\r\nend;\r\n\r\nprocedure TCustomBitBtn.SetGlyphURL(const Value: String);\r\nbegin\r\n if FGlyphURL <> Value then\r\n begin\r\n FGlyphURL := Value;\r\n UpdateElement;\r\n end;\r\nend;\r\n\r\nprocedure TCustomBitBtn.SetIntColor(const Value: TColor);\r\nbegin\r\n FIntColor := Value;\r\nend;\r\n\r\nprocedure TCustomBitBtn.SetAlignment(const Value: TAlignment);\r\nbegin\r\n if (FAlignment <> Value) then\r\n begin\r\n FAlignment := Value;\r\n UpdateElement;\r\n end;\r\nend;\r\n\r\nprocedure TCustomBitBtn.SetLayout(const Value: TButtonLayout);\r\nbegin\r\n if (FLayout <> Value) then\r\n begin\r\n FLayout := Value;\r\n UpdateElement;\r\n end;\r\nend;\r\n\r\nprocedure TCustomBitBtn.SetMaterialGlyph(const Value: TMaterialGlyph);\r\nbegin\r\n if (FMaterialGlyph <> Value) then\r\n begin\r\n FMaterialGlyph := Value;\r\n UpdateElement;\r\n end;\r\nend;\r\n\r\nprocedure TCustomBitBtn.SetMaterialGlyphSize(const Value: integer);\r\nbegin\r\n if (Value > 0) and (Value < 100) then\r\n begin\r\n FMaterialGlyphSize := Value;\r\n UpdateElement;\r\n end;\r\nend;\r\n\r\nprocedure TCustomBitBtn.SetMaterialGlyphType(const Value: TMaterialGlyphType);\r\nbegin\r\n if (FMaterialGlyphType <> Value) then\r\n begin\r\n FMaterialGlyphType := Value;\r\n UpdateElement;\r\n end;\r\nend;\r\n\r\nprocedure TCustomBitBtn.SetMaterialGyphColor(const Value: TColor);\r\nbegin\r\n if (FMaterialGlyphColor <> Value) then\r\n begin\r\n FMaterialGlyphColor := Value;\r\n UpdateElement;\r\n end;\r\nend;\r\n\r\nprocedure TCustomBitBtn.UpdateElement;\r\nvar\r\n s,inactive,noptr,matgl,imgsrc,matclr,cap,acc,gs: string;\r\nbegin\r\n inherited;\r\n\r\n if Assigned(ElementHandle) then\r\n begin\r\n if (FColor <> clNone) and not Flat then\r\n ElementHandle.style.setProperty('background-color', ColorToHTML(FColor))\r\n else\r\n ElementHandle.style.setProperty('background-color', '');\r\n\r\n ElementHandle.style.setProperty('vertical-align','middle');\r\n if Visible then\r\n ElementHandle.style.setProperty('display','table');\r\n ElementHandle.style.setProperty('overflow','hidden');\r\n ElementHandle.style.setProperty('padding','0px');\r\n\r\n case Alignment of\r\n taLeftJustify: ElementHandle.style.setProperty('text-align','left');\r\n taCenter: ElementHandle.style.setProperty('text-align','center');\r\n taRightJustify: ElementHandle.style.setProperty('text-align','right');\r\n end;\r\n\r\n s := '';\r\n inactive := '';\r\n noptr := '';\r\n matgl := '';\r\n\r\n if not Enabled then\r\n inactive := ' md-light md-inactive';\r\n\r\n noptr := 'pointer-events:none';\r\n\r\n if FMaterialGlyph <> '' then\r\n begin\r\n matclr := '';\r\n if FMaterialGlyphColor <> clNone then\r\n matclr := ';color:'+ColorToHTML(FMaterialGlyphColor);\r\n\r\n matgl := '' + FMaterialGlyph + '';\r\n end;\r\n\r\n// if (FMaterialGlyph <> '') and (Caption <> '') then\r\n// s := s + ' ';\r\n\r\n if (ElementHandle.childElementCount = 0) or not IsLinked then\r\n cap := ProcessAccelerator(Caption,acc);\r\n\r\n if acc <> '' then\r\n ElementHandle['accesskey'] := acc;\r\n\r\n\r\n if (cap <> '') then\r\n s := '' + cap + '';\r\n\r\n gs := '';\r\n if GlyphSIze <> 0 then\r\n gs := 'width:'+GlyphSize.ToString+'px;';\r\n\r\n\r\n if FGlyph.Data <> '' then\r\n imgsrc := 'data:image/jpeg;base64,' + HexImageDecodeAsBase64(FGlyph.Data)\r\n else\r\n if FGlyph.FileName <> '' then\r\n imgsrc := FGlyph.FileName\r\n else\r\n if FGlyphURL <> '' then\r\n imgsrc := FGlyphURL;\r\n\r\n case Layout of\r\n blGlyphLeft:\r\n begin\r\n if (matgl <> '') then\r\n begin\r\n if cap <> '' then\r\n s := matgl + ' ' + s\r\n else\r\n s := matgl;\r\n end;\r\n\r\n if imgsrc <> '' then\r\n s := ' ' + s;\r\n end;\r\n\r\n blGlyphRight:\r\n begin\r\n if (matgl <> '') then\r\n begin\r\n if (cap <> '') then\r\n s := s + ' ' + matgl\r\n else\r\n s := matgl;\r\n end;\r\n\r\n if imgsrc <> '' then\r\n s := s+ ' ';\r\n end;\r\n\r\n blGlyphTop:\r\n begin\r\n if matgl <> '' then\r\n begin\r\n if cap <> '' then\r\n s := matgl + '
' + s\r\n else\r\n s := matgl;\r\n end;\r\n\r\n if imgsrc <> '' then\r\n s := '
' + s;\r\n end;\r\n\r\n blGlyphBottom:\r\n begin\r\n if matgl <> '' then\r\n begin\r\n if cap <> '' then\r\n s := s+ '
' + matgl\r\n else\r\n s := matgl;\r\n end;\r\n\r\n if imgsrc <> '' then\r\n s := s + '
';\r\n end;\r\n end;\r\n\r\n ElementHandle.innerHTML := s;\r\n SetHTMLElementFont(TJSHTMLElement(ElementHandle), Font, not ((ElementClassName = '') and (ElementFont = efProperty)) );\r\n end;\r\nend;\r\n\r\nprocedure TCustomBitBtn.UpdateElementVisual;\r\nbegin\r\n inherited;\r\n if Assigned(ElementHandle) then\r\n begin\r\n ElementHandle.style.removeProperty('outline');\r\n ElementHandle.style.removeProperty('user-select');\r\n end;\r\n\r\nend;\r\n\r\nend.\r\n","{********************************************************************}\r\n{ }\r\n{ written by TMS Software }\r\n{ copyright (c) 2018 - 2025 }\r\n{ Email : info@tmssoftware.com }\r\n{ Web : http://www.tmssoftware.com }\r\n{ }\r\n{ The source code is given as is. The author is not responsible }\r\n{ for any possible damage done due to the use of this code. }\r\n{ The complete source code remains property of the author and may }\r\n{ not be distributed, published, given or sold in any form as such. }\r\n{ No parts of the source code can be included in any other component }\r\n{ or application without written authorization of the author. }\r\n{********************************************************************}\r\n\r\nunit WEBLib.ComCtrls;\r\n\r\n{$DEFINE NOPP}\r\n\r\ninterface\r\n\r\nuses\r\n Classes, SysUtils, Web, WEBLib.Controls, WEBLib.Graphics, WEBLib.ExtCtrls,\r\n WEBLib.TreeNodes, WebLib.Menus;\r\n\r\ntype\r\n TCustomRichEdit = class;\r\n\r\n TTextAttributes = class(TPersistent)\r\n private\r\n RichEdit: TCustomRichEdit;\r\n FAlignment: TAlignment;\r\n FIsBold: Boolean;\r\n FIsItalic: Boolean;\r\n FIsUnderline: Boolean;\r\n FIsStrikeOut: Boolean;\r\n FBackColor: TColor;\r\n FColor: TColor;\r\n FHeight: Integer;\r\n FName: String;\r\n FOrderedList: Boolean;\r\n FSize: Integer;\r\n FStyle: TFontStyles;\r\n FUnOrderedList: Boolean;\r\n procedure SetAlignment(Value: TAlignment);\r\n procedure SetBackColor(Value: TColor);\r\n procedure SetColor(Value: TColor);\r\n procedure SetHeight(Value: Integer);\r\n procedure SetName(Value: String);\r\n procedure SetOrderedList(Value: Boolean);\r\n procedure SetSize(Value: Integer);\r\n procedure SetStyle(Value: TFontStyles);\r\n procedure SetUnOrderedList(Value: Boolean);\r\n protected\r\n procedure AssignTo(Dest: TPersistent); override;\r\n function FontSizeToEM(const Value: integer): string;\r\n public\r\n constructor Create(AOwner: TCustomRichEdit); reintroduce;\r\n procedure Assign(Source: TPersistent); override;\r\n procedure Cut;\r\n procedure Copy;\r\n procedure Paste;\r\n procedure Image;\r\n procedure Link;\r\n property Alignment: TAlignment read FAlignment write SetAlignment;\r\n property BackColor: TColor read FBackColor write SetBackColor;\r\n property Color: TColor read FColor write SetColor;\r\n property Height: Integer read FHeight write SetHeight;\r\n property Name: String read FName write SetName;\r\n property OrderedList: Boolean read FOrderedList write SetOrderedList;\r\n property Size: Integer read FSize write SetSize;\r\n property Style: TFontStyles read FStyle write SetStyle;\r\n property UnOrderedList: Boolean read FUnOrderedList write SetUnOrderedList;\r\n end;\r\n\r\n TSelAttributes = record\r\n FontName: string;\r\n FontSize: string;\r\n FontColor: string;\r\n BkColor: string;\r\n IsBold: boolean;\r\n IsItalic: boolean;\r\n IsStrikeOut: boolean;\r\n IsUnderline: boolean;\r\n IsLeft: boolean;\r\n IsRight: boolean;\r\n IsCenter: boolean;\r\n end;\r\n\r\n TAttributesChangeEvent = procedure(Sender: TObject; Attributes: TSelAttributes) of object;\r\n\r\n TCustomRichEdit = class(TWebCustomControl)\r\n private\r\n FOwner: TCustomControl;\r\n FLines: TStrings;\r\n FSelAttributes: TTextAttributes;\r\n FAutoSize: Boolean;\r\n FOnSelectionChange: TNotifyEvent;\r\n FShowFocus: boolean;\r\n FInsertLineBreaks: boolean;\r\n FWantTabs: boolean;\r\n FReadOnly: boolean;\r\n FOnChange: TNotifyEvent;\r\n FOnAttributesChanged: TAttributesChangeEvent;\r\n FWantImages: boolean;\r\n function GetText: String;\r\n function GetPlainText: String;\r\n procedure SetText(const Value: String);\r\n procedure SetSelAttributes(Value: TTextAttributes);\r\n procedure SetAutoSize(const Value: Boolean);\r\n procedure SetShowFocus(const Value: boolean); reintroduce;\r\n procedure SetReadOnly(const Value: boolean);\r\n function GetLines: TStrings;\r\n function GetSelStart: integer;\r\n procedure SetSelStart(const Value: integer);\r\n protected\r\n function CreateElement: TJSElement; override;\r\n// function ElementIFrameHandle: TJSWindow;\r\n function ElementIFrameHandle: TJSDocument;\r\n procedure UpdateElement; override;\r\n procedure Loaded; override;\r\n function CanShowFocus: boolean; override;\r\n procedure DoHandleInput(Event: TJSEvent); virtual;\r\n procedure DoHandlePaste(Event: TJSEvent); virtual;\r\n function HandleDoSelectionChange(Event: TEventListenerEvent): Boolean; virtual;\r\n function HandleDoKeyDown(Event: TJSKeyBoardEvent): Boolean; override;\r\n function HandleDoKeyUp(Event: TJSKeyBoardEvent): Boolean; override;\r\n procedure SetLines(ALines: TStrings);\r\n procedure DoLinesChange(Sender: TObject);\r\n property Text: String read GetText write SetText;\r\n property Font;\r\n property Color;\r\n property BorderStyle;\r\n property AutoSize: Boolean read FAutoSize write SetAutoSize default false;\r\n property Lines: TStrings read GetLines write SetLines;\r\n property OnClick;\r\n property OnDblClick;\r\n property OnChange: TNotifyEvent read FOnChange write FOnChange;\r\n property OnSelectionChange: TNotifyEvent read FOnSelectionChange write FOnSelectionChange;\r\n property PlainText: string read GetPlainText;\r\n procedure DoChange; virtual;\r\n procedure BindEvents; override;\r\n function GetSelectionAttributes(selnode:TJSNode): TSelAttributes;\r\n property OnAttributesChanged: TAttributesChangeEvent read FOnAttributesChanged write FOnAttributesChanged;\r\n public\r\n procedure CreateInitialize; override;\r\n destructor Destroy; override;\r\n function GetContent: string;\r\n function GetSelection: string;\r\n procedure DoSelectAction(StartPosition, EndPosition: integer);\r\n procedure DoEditAction(ActionString: string); overload;\r\n procedure DoEditAction(ActionString: string; Data: string); overload;\r\n procedure SelectText(StartPosition, EndPosition: integer);\r\n procedure SetSelectionSpacing(ASpacing: double);\r\n procedure DoImageAction;\r\n procedure DoLinkAction;\r\n procedure AppendHTML(HTML: string);\r\n procedure AppendLineBreak;\r\n procedure InsertHTML(HTML: String);\r\n procedure InsertLineBreak;\r\n procedure InsertImage(DataURL: string);\r\n property CursorPosition: integer read GetSelStart write SetSelStart;\r\n property InsertLineBreaks: boolean read FInsertLineBreaks write FInsertLineBreaks default false;\r\n property SelAttributes: TTextAttributes read FSelAttributes write SetSelAttributes;\r\n property ShowFocus: boolean read FShowFocus write SetShowFocus default true;\r\n property Owner: TCustomControl read FOwner write FOwner;\r\n property ReadOnly: boolean read FReadOnly write SetReadOnly default false;\r\n property WantImages: boolean read FWantImages write FWantImages default true;\r\n property WantTabs: boolean read FWantTabs write FWantTabs default false;\r\n end;\r\n\r\n TRichEdit = class(TCustomRichEdit)\r\n public\r\n property Owner;\r\n property PlainText;\r\n published\r\n property Align;\r\n property AlignWithMargins;\r\n property Anchors;\r\n property AutoSize;\r\n property ElementClassName;\r\n property ElementFont;\r\n property ElementID;\r\n property ElementPosition;\r\n property Font;\r\n property Color;\r\n property DragMode;\r\n property BorderStyle;\r\n property Height;\r\n property HeightPercent;\r\n property HeightStyle;\r\n property InsertLinebreaks;\r\n property Lines;\r\n property Margins;\r\n property ReadOnly;\r\n property PopupMenu;\r\n property WantTabs;\r\n property Width;\r\n property WidthPercent;\r\n property WidthStyle;\r\n property OnChange;\r\n property OnClick;\r\n property OnDblClick;\r\n property OnSelectionChange;\r\n property OnKeyDown;\r\n property OnKeyPress;\r\n property OnKeyUp;\r\n property OnMouseDown;\r\n property OnMouseUp;\r\n property OnMouseMove;\r\n property OnMouseLeave;\r\n property OnMouseEnter;\r\n property OnEnter;\r\n property OnExit;\r\n property OnDragDrop;\r\n property OnDragOver;\r\n property OnEndDrag;\r\n property OnStartDrag;\r\n end;\r\n\r\n TWebRichEdit = class(TRichEdit);\r\n\r\n TTabSet = class(TWebCustomControl)\r\n private\r\n FItems: TStringList;\r\n FItemIndex: integer;\r\n FSelectedColor: TColor;\r\n FOnChange: TNotifyEvent;\r\n FSelectedTextColor: TColor;\r\n FElementTabActiveClassName: TElementClassName;\r\n FElementTabClassName: TElementClassName;\r\n FElementTabItemClassName: TElementClassName;\r\n FUseHash: boolean;\r\n procedure SetSelectedColor(const Value: TColor);\r\n procedure SetSelectedTextColor(const Value: TColor);\r\n protected\r\n function CreateElement: TJSElement; override;\r\n function HandleDoClick(Event: TJSMouseEvent): Boolean; override;\r\n function HandleDoChange(Event: TEventListenerEvent): Boolean; virtual;\r\n function HandleDoItemMouseOut(Event: TJSMouseEvent): Boolean; virtual;\r\n function HandleDoItemMouseOver(Event: TJSMouseEvent): Boolean; virtual;\r\n procedure BindEvents; override;\r\n procedure SetItems(AItems: TStringList);\r\n procedure SetItemIndex(AIndex: integer);\r\n procedure DoUpdateList; virtual;\r\n procedure Loaded; override;\r\n procedure ItemsChanged(Sender: TObject);\r\n procedure EnableDrag; override;\r\n procedure DisableDrag; override;\r\n public\r\n procedure CreateInitialize; override;\r\n destructor Destroy; override;\r\n procedure EndUpdate; override;\r\n procedure Clear;\r\n procedure SelectNextTab(GoForward: boolean);\r\n published\r\n property Align;\r\n property AlignWithMargins;\r\n property Anchors;\r\n property Color;\r\n property DragMode;\r\n property ElementClassName;\r\n property ElementTabClassName: TElementClassName read FElementTabClassName write FElementTabClassName;\r\n property ElementTabActiveClassName: TElementClassName read FElementTabActiveClassName write FElementTabActiveClassName;\r\n property ElementTabItemClassName: TElementClassName read FElementTabItemClassName write FElementTabItemClassName;\r\n property ElementFont;\r\n property ElementID;\r\n property ElementPosition;\r\n property Enabled;\r\n property Font;\r\n property Height;\r\n property HeightPercent;\r\n property HeightStyle;\r\n property Hint;\r\n property ItemIndex: integer read FItemIndex write SetItemIndex;\r\n property Items: TStringList read FItems write SetItems;\r\n property Left;\r\n property Margins;\r\n property ParentFont;\r\n property PopupMenu;\r\n property ShowHint;\r\n property SelectedColor: TColor read FSelectedColor write SetSelectedColor default clSilver;\r\n property SelectedTextColor: TColor read FSelectedTextColor write SetSelectedTextColor default clBlack;\r\n property TabOrder;\r\n property TabStop;\r\n property Top;\r\n property UseHash: boolean read FUseHash write FUseHash default true;\r\n property Visible;\r\n property Width;\r\n property WidthPercent;\r\n property WidthStyle;\r\n property OnChange: TNotifyEvent read FOnChange write FOnChange;\r\n property OnClick;\r\n property OnDblClick;\r\n property OnKeyDown;\r\n property OnKeyPress;\r\n property OnKeyUp;\r\n property OnMouseDown;\r\n property OnMouseUp;\r\n property OnMouseMove;\r\n property OnMouseLeave;\r\n property OnMouseEnter;\r\n property OnEnter;\r\n property OnExit;\r\n property OnDragDrop;\r\n property OnDragOver;\r\n property OnEndDrag;\r\n property OnStartDrag;\r\n end;\r\n\r\n TWebTabSet = class(TTabSet);\r\n\r\n TTabSheet = class(TCustomPanel)\r\n private\r\n FTabVisible: Boolean;\r\n FTabEnabled: Boolean;\r\n FPosUpdating: Boolean;\r\n FOnShow: TNotifyEvent;\r\n FOnHide: TNotifyEvent;\r\n FMaterialGlyph: TMaterialGlyph;\r\n FMaterialGlyphColor: TColor;\r\n FMaterialGlyphType: TMaterialGlyphType;\r\n FMaterialGlyphSize: integer;\r\n procedure SetTabVisible(const Value: Boolean);\r\n procedure SetTabEnabled(const Value: Boolean);\r\n function GetPageIndex: integer;\r\n procedure SetPageIndex(const Value: integer);\r\n procedure SetMaterialGlyph(const Value: TMaterialGlyph);\r\n procedure SetMaterialGlyphColor(const Value: TColor);\r\n procedure SetMaterialGlyphSize(const Value: integer);\r\n procedure SetMaterialGlyphType(const Value: TMaterialGlyphType);\r\n protected\r\n procedure SetCaption(const AValue: string); override;\r\n procedure SetParent(AValue: TControl); override;\r\n procedure ResetUpdate;\r\n public\r\n procedure CreateInitialize; override;\r\n procedure EndUpdate; override;\r\n procedure SetBounds(X, Y, AWidth, AHeight: Integer); override;\r\n destructor Destroy; override;\r\n property ShowCaption;\r\n published\r\n property Alignment;\r\n property AlignWithMargins;\r\n property BorderColor;\r\n property BorderStyle;\r\n property Caption;\r\n property Color;\r\n property DragMode;\r\n property ElementBodyClassName;\r\n property ElementID;\r\n property ElementFont;\r\n property ElementPosition;\r\n property Font;\r\n property HeightPercent;\r\n property HeightStyle;\r\n property Margins;\r\n property MaterialGlyph: TMaterialGlyph read FMaterialGlyph write SetMaterialGlyph;\r\n property MaterialGlyphColor: TColor read FMaterialGlyphColor write SetMaterialGlyphColor default clNone;\r\n property MaterialGlyphSize: integer read FMaterialGlyphSize write SetMaterialGlyphSize default 18;\r\n property MaterialGlyphType: TMaterialGlyphType read FMaterialGlyphType write SetMaterialGlyphType default mgNormal;\r\n property Padding;\r\n property PageIndex: integer read GetPageIndex write SetPageIndex stored false;\r\n property ParentFont;\r\n property Role;\r\n property WidthPercent;\r\n property WidthStyle;\r\n property TabVisible: Boolean read FTabVisible write SetTabVisible default True;\r\n property TabEnabled: Boolean read FTabEnabled write SetTabEnabled default True;\r\n property Visible;\r\n property OnClick;\r\n property OnDblClick;\r\n property OnHide: TNotifyEvent read FOnHide write FOnHide;\r\n property OnMouseDown;\r\n property OnMouseMove;\r\n property OnMouseUp;\r\n property OnDragDrop;\r\n property OnDragOver;\r\n property OnEndDrag;\r\n property OnShow: TNotifyEvent read FOnShow write FOnShow;\r\n property OnStartDrag;\r\n end;\r\n\r\n TWebTabSheet = class(TTabSheet);\r\n\r\n TPageControl = class(TWebCustomControl)\r\n private\r\n FDesignTime: boolean;\r\n FPrevTabIndex: Integer;\r\n FItems: TStringList;\r\n FTabIndex: Integer;\r\n FSelectedColor: TColor;\r\n FOnChange: TNotifyEvent;\r\n FSelectedTextColor: TColor;\r\n FDisabledTextColor: TColor;\r\n FShowTabs: boolean;\r\n FOldVisible: boolean;\r\n FUseHash: boolean;\r\n FElementTabActiveClassName: TElementClassName;\r\n FElementTabClassName: TElementClassName;\r\n FElementTabItemClassName: TElementClassName;\r\n procedure SetSelectedColor(const AValue: TColor);\r\n procedure SetItems(AItems: TStringList);\r\n procedure SetTabIndex(AIndex: integer);\r\n function GetActivePage: TTabsheet;\r\n function GetActivePageIndex: integer;\r\n procedure SetActivePageIndex(const Value: integer);\r\n procedure SetSelectedTextColor(const Value: TColor);\r\n procedure SetActivePage(const Value: TTabsheet);\r\n procedure SetShowTabs(const Value: boolean);\r\n procedure SetDisabledTextColor(const Value: TColor);\r\n protected\r\n function GetPage(Index: integer): TTabSheet;\r\n function CreateElement: TJSElement; override;\r\n function HandleDoClick(Event: TJSMouseEvent): Boolean; override;\r\n function HandleDoChange(Event: TJSMouseEvent): Boolean; virtual;\r\n function HandleDoItemMouseOut(Event: TJSMouseEvent): Boolean; virtual;\r\n function HandleDoItemMouseOver(Event: TJSMouseEvent): Boolean; virtual;\r\n function CanAcceptChild(AValue: TControl): TControl; override;\r\n procedure BindEvents; override;\r\n procedure GetChildren(Proc: TGetChildProc; Root: TComponent); override;\r\n procedure UpdateElement; override;\r\n procedure DoUpdateList; virtual;\r\n procedure DoUpdateResize; virtual;\r\n procedure Loaded; override;\r\n procedure VisibleChanged; override;\r\n procedure ItemsChanged(Sender: TObject); virtual;\r\n procedure SetParent(AValue: TControl); override;\r\n function GetUniqueName: string;\r\n procedure EnableDrag; override;\r\n procedure DisableDrag; override;\r\n public\r\n procedure CreateInitialize; override;\r\n destructor Destroy; override;\r\n procedure Clear;\r\n procedure EndUpdate; override;\r\n procedure SelectNextPage(GoForward: boolean);\r\n function PageCount: integer;\r\n function PageIndexFromElement(AElement: TJSElement): Integer;\r\n property Pages[index: integer]: TTabSheet read GetPage;\r\n property ActivePageIndex: integer read GetActivePageIndex write SetActivePageIndex;\r\n property ActivePage: TTabsheet read GetActivePage write SetActivePage;\r\n property Items: TStringList read FItems write SetItems;\r\n published\r\n property Align;\r\n property AlignWithMargins;\r\n property Anchors;\r\n property BorderStyle default bsNone;\r\n property ChildOrder;\r\n property DisabledTextColor: TColor read FDisabledTextColor write SetDisabledTextColor default clGray;\r\n property DragMode;\r\n property ElementClassName;\r\n property ElementTabClassName: TElementClassName read FElementTabClassName write FElementTabClassName;\r\n property ElementTabActiveClassName: TElementClassName read FElementTabActiveClassName write FElementTabActiveClassName;\r\n property ElementTabItemClassName: TElementClassName read FElementTabItemClassName write FElementTabItemClassName;\r\n property ElementFont;\r\n property ElementID;\r\n property ElementPosition;\r\n property Enabled;\r\n property Font;\r\n property Height;\r\n property HeightPercent;\r\n property HeightStyle;\r\n property Hint;\r\n property TabIndex: integer read FTabIndex write SetTabIndex;\r\n property Left;\r\n property Margins;\r\n property ParentFont;\r\n property PopupMenu;\r\n property ShowHint;\r\n property ShowTabs: boolean read FShowTabs write SetShowTabs default true;\r\n property SelectedColor: TColor read FSelectedColor write SetSelectedColor default clSilver;\r\n property SelectedTextColor: TColor read FSelectedTextColor write SetSelectedTextColor default clBlack;\r\n property TabOrder;\r\n property TabStop;\r\n property Top;\r\n property UseHash: boolean read FUseHash write FUseHash default true;\r\n property Visible;\r\n property Width;\r\n property WidthPercent;\r\n property WidthStyle;\r\n property OnChange: TNotifyEvent read FOnChange write FOnChange;\r\n property OnClick;\r\n property OnDblClick;\r\n property OnKeyDown;\r\n property OnKeyPress;\r\n property OnKeyUp;\r\n property OnMouseDown;\r\n property OnMouseUp;\r\n property OnMouseMove;\r\n property OnMouseLeave;\r\n property OnMouseEnter;\r\n property OnEnter;\r\n property OnExit;\r\n property OnDragDrop;\r\n property OnDragOver;\r\n property OnEndDrag;\r\n property OnStartDrag;\r\n end;\r\n\r\n TWebPageControl = class(TPageControl);\r\n\r\n TProgressBarStyle = (pbstNormal, pbstMarquee, pbstDiv);\r\n TProgressBarValue = (pbvNone, pbvPercentage, pbvAbsolute);\r\n\r\n TProgressBar = class(TWebCustomControl)\r\n private\r\n FMax: integer;\r\n FMin: integer;\r\n FPosition: integer;\r\n FStyle: TProgressBarStyle;\r\n FElementBarClassName: string;\r\n FValue: TProgressBarValue;\r\n FValueColor: TColor;\r\n procedure SetStyle(const Value: TProgressBarStyle);\r\n procedure SetElementBarClassName(const Value: string);\r\n procedure SetValue(const Value: TProgressBarValue);\r\n procedure SetValueColor(const Value: TColor);\r\n protected\r\n function CreateElement: TJSElement; override;\r\n procedure SetMax(AValue: integer);\r\n procedure SetMin(AValue: integer);\r\n procedure SetPosition(AValue: integer);\r\n procedure DoUpdate; virtual;\r\n procedure UpdateElementVisual; override;\r\n procedure CreateProgressElement(AElement: TJSElement);\r\n public\r\n procedure CreateInitialize; override;\r\n procedure AfterLoadDFMValues; override;\r\n published\r\n property Align;\r\n property AlignWithMargins;\r\n property Anchors;\r\n property DragMode;\r\n property ElementBarClassName: string read FElementBarClassName write SetElementBarClassName;\r\n property ElementPosition;\r\n property Height;\r\n property HeightPercent;\r\n property HeightStyle;\r\n property Left;\r\n property Margins;\r\n property Max: integer read FMax write SetMax;\r\n property Min: integer read FMin write SetMin;\r\n property PopupMenu;\r\n property Position: integer read FPosition write SetPosition;\r\n property Style: TProgressBarStyle read FStyle write SetStyle;\r\n property Top;\r\n property Value: TProgressBarValue read FValue write SetValue;\r\n property ValueColor: TColor read FValueColor write SetValueColor default clNone;\r\n property Visible;\r\n property Width;\r\n property WidthPercent;\r\n property WidthStyle;\r\n property OnDragDrop;\r\n property OnDragOver;\r\n property OnEndDrag;\r\n property OnStartDrag;\r\n end;\r\n\r\n TWebProgressBar = class(TProgressBar);\r\n\r\n TTreeViewNodeEvent = procedure(Sender: TObject; Node: TTreeNode) of object;\r\n TTreeViewNodeStateEvent = procedure(Sender: TObject; Node: TTreeNode; AState: boolean) of object;\r\n TTreeViewNodeAllowEvent = procedure(Sender: TObject; Node: TTreeNode; var Allow: boolean) of object;\r\n\r\n TTreeViewNodeRenderEvent = procedure(Sender: TObject; Node: TTreeNode; AElement: TJSHTMLElementRecord) of object;\r\n\r\n TTreeView = class(TWebCustomControl)\r\n private\r\n FItems: TTreeNodes;\r\n FSelected: TTreeNode;\r\n FOnCollapsing: TTreeViewNodeAllowEvent;\r\n FOnExpanding: TTreeViewNodeAllowEvent;\r\n FOnCollapsed: TTreeViewNodeEvent;\r\n FOnExpanded: TTreeViewNodeEvent;\r\n FOnClickNode: TTreeViewNodeEvent;\r\n FOnDblClickNode: TTreeViewNodeEvent;\r\n FOnRenderNode: TTreeViewNodeRenderEvent;\r\n FAutoExpand: boolean;\r\n FOnChange: TTreeViewNodeEvent;\r\n FOnChanging: TTreeViewNodeAllowEvent;\r\n FElementNodeSelectedClassName: TElementClassName;\r\n FElementNodeClassName: TElementClassName;\r\n FOnClickRadio: TTreeViewNodeStateEvent;\r\n FOnClickCheckBox: TTreeViewNodeStateEvent;\r\n procedure SetItems(const Value: TTreeNodes);\r\n function GetSelected: TTreeNode;\r\n procedure SetSelected(const Value: TTreeNode);\r\n procedure SetElementNodeClassName(const Value: TElementClassName);\r\n procedure SetElementNodeSelectedClassName(const Value: TElementClassName);\r\n function GetTopItem: TTreeNode;\r\n procedure SetTopItem(const Value: TTreeNode);\r\n protected\r\n procedure DoRenderNode(ANode: TTreeNode; AElement: TJSHTMLElement);\r\n function RenderControl(ANode: TTreeNode; AElementName: string): string;\r\n function RenderNode(ANode: TTreeNode; AElementName: string): TJSHTMLElement;\r\n procedure RenderNodes;\r\n function CreateNodes: TTreeNodes; virtual;\r\n function CreateElement: TJSElement; override;\r\n procedure DoNodesChanged(Sender: TObject);\r\n procedure DoExpandedChanged(Sender: TObject; ANode: TTreeNode);\r\n procedure DoSelectionChanged(Sender: TObject; ANode: TTreeNode; IsSelected: boolean);\r\n function HandleNode(Event: TJSEvent): Boolean; virtual;\r\n function HandleClick(Event: TJSEvent): Boolean; virtual;\r\n function HandleDblClick(Event: TJSEvent): Boolean; virtual;\r\n procedure ClickCheck(ANode: TTreeNode; AState: boolean); virtual;\r\n procedure ClickRadio(ANode: TTreeNode; AState: boolean); virtual;\r\n procedure KeyDown(var Key: Word; Shift: TShiftState); override;\r\n procedure DoChangeSelection(NewNode: TTreeNode); virtual;\r\n procedure EnableDrag; override;\r\n procedure DisableDrag; override;\r\n function FormPrefix: string;\r\n procedure InitCSSLibrary(ALibrary: TCSSLibrary); override;\r\n public\r\n procedure CreateInitialize; override;\r\n destructor Destroy; override;\r\n procedure BeginUpdate; override;\r\n procedure EndUpdate; override;\r\n function GetNodeFromID(AId: string): TTreeNode;\r\n function GetNodeElement(ANode: TTreeNode): TJSHTMLElement;\r\n property Selected: TTreeNode read GetSelected write SetSelected;\r\n procedure Select(const ANode: TTreeNode);\r\n procedure FullExpand;\r\n procedure FullCollapse;\r\n property TopItem: TTreeNode read GetTopItem write SetTopItem;\r\n published\r\n property Align;\r\n property AlignWithMargins;\r\n property Anchors;\r\n\r\n property AutoExpand: boolean read FAutoExpand write FAutoExpand;\r\n property DragMode;\r\n property ElementNodeClassName: TElementClassName read FElementNodeClassName write SetElementNodeClassName;\r\n property ElementNodeSelectedClassName: TElementClassName read FElementNodeSelectedClassName write SetElementNodeSelectedClassName;\r\n property ElementClassName;\r\n property ElementID;\r\n property ElementFont;\r\n property ElementPosition;\r\n\r\n property Font;\r\n property HeightPercent;\r\n property HeightStyle;\r\n\r\n property Items: TTreeNodes read FItems write SetItems;\r\n property Margins;\r\n property ParentFont;\r\n property PopupMenu;\r\n property WidthPercent;\r\n property WidthStyle;\r\n property OnClick;\r\n property OnClickCheckBox: TTreeViewNodeStateEvent read FOnClickCheckBox write FOnClickCheckBox;\r\n property OnClickRadio: TTreeViewNodeStateEvent read FOnClickRadio write FOnClickRadio;\r\n property OnDblClick;\r\n property OnClickNode: TTreeViewNodeEvent read FOnClickNode write FOnClickNode;\r\n property OnDblClickNode: TTreeViewNodeEvent read FOnDblClickNode write FOnDblClickNode;\r\n property OnRenderNode: TTreeViewNodeRenderEvent read FOnRenderNode write FOnRenderNode;\r\n property OnChange: TTreeViewNodeEvent read FOnChange write FOnChange;\r\n property OnChanging: TTreeViewNodeAllowEvent read FOnChanging write FOnChanging;\r\n\r\n property OnCollapsed: TTreeViewNodeEvent read FOnCollapsed write FOnCollapsed;\r\n property OnCollapsing: TTreeViewNodeAllowEvent read FOnCollapsing write FOnCollapsing;\r\n property OnExpanded: TTreeViewNodeEvent read FOnExpanded write FOnExpanded;\r\n property OnExpanding: TTreeViewNodeAllowEvent read FOnExpanding write FOnExpanding;\r\n\r\n property OnDragDrop;\r\n property OnDragOver;\r\n property OnEndDrag;\r\n property OnStartDrag;\r\n end;\r\n\r\n TWebTreeView = class(TTreeView);\r\n\r\n\r\n\r\nimplementation\r\n\r\nuses\r\n WEBLib.Buttons, WEBLib.Forms, WEBLib.Utils;\r\n\r\ntype\r\n TTreeNodeEx = class(TTreeNode);\r\n TTreeNodesEx = class(TTreeNodes);\r\n\r\n{ TCustomRichEdit }\r\n\r\nprocedure TCustomRichEdit.CreateInitialize;\r\nbegin\r\n inherited;\r\n FLines := TStringList.Create;\r\n TStringList(FLines).OnChange := DoLinesChange;\r\n FSelAttributes := TTextAttributes.Create(Self);\r\n FShowFocus := true;\r\n FWantImages := true;\r\n FInsertLineBreaks := false;\r\n if (csDesigning in ComponentState) then\r\n begin\r\n Width := 400;\r\n Height := 300;\r\n end;\r\nend;\r\n\r\nprocedure TCustomRichEdit.BindEvents;\r\nbegin\r\n inherited;\r\n Container.addEventListener('input',@DoHandleInput);\r\n Container.addEventListener('paste',@DoHandlePaste);\r\nend;\r\n\r\nfunction TCustomRichEdit.CanShowFocus: boolean;\r\nbegin\r\n Result := FShowFocus;\r\nend;\r\n\r\nfunction TCustomRichEdit.CreateElement: TJSElement;\r\nbegin\r\n Result := document.createElement('DIV');\r\n TJSHTMLElement(Result).style.setProperty('white-space','normal');\r\nend;\r\n\r\ndestructor TCustomRichEdit.Destroy;\r\nbegin\r\n FLines.Free;\r\n inherited;\r\nend;\r\n\r\nprocedure TCustomRichEdit.DoLinesChange(Sender: TObject);\r\nbegin\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TCustomRichEdit.SelectText(StartPosition, EndPosition: integer);\r\nbegin\r\n DoSelectAction(StartPosition, EndPosition);\r\nend;\r\n\r\nprocedure TCustomRichEdit.SetAutoSize(const Value: Boolean);\r\nbegin\r\n if FAutoSize <> Value then\r\n begin\r\n FAutoSize := Value;\r\n UpdateElement;\r\n end;\r\nend;\r\n\r\nprocedure TCustomRichEdit.SetLines(ALines: TStrings);\r\nbegin\r\n FLines.Assign(ALines);\r\nend;\r\n\r\nprocedure TCustomRichEdit.SetReadOnly(const Value: boolean);\r\nbegin\r\n if FReadOnly <> Value then\r\n begin\r\n FReadOnly := Value;\r\n if Assigned(ElementHandle) then\r\n begin\r\n if FReadOnly then\r\n ElementHandle.contentEditable := 'false'\r\n else\r\n ElementHandle.contentEditable := 'true';\r\n end;\r\n\r\n end;\r\nend;\r\n\r\nprocedure TCustomRichEdit.SetText(const Value: String);\r\nbegin\r\n FLines.Text := Value;\r\n UpdateElement;\r\nend;\r\n\r\n//function TCustomRichEdit.ElementIFrameHandle: TJSWindow;\r\nfunction TCustomRichEdit.ElementIFrameHandle: TJSDocument;\r\n//var\r\n// iframe: TJSHTMLIFrameElement;\r\nbegin\r\n Result := nil;\r\n if Assigned(ElementHandle) then\r\n begin\r\n// iframe := TJSHTMLIFrameElement(document.getElementById(ElementID));\r\n// if Assigned(iframe) then\r\n// result := iframe.contentWindow.document;\r\n Result := document;\r\n end;\r\nend;\r\n\r\nprocedure GetTextNodes(node: TJSNode; nodes: TList);\r\nvar\r\n children: TJSNodeList;\r\n i, j: integer;\r\n childlist: TList;\r\nbegin\r\n if (node.nodeType = 3) then\r\n nodes.Add(node)\r\n else\r\n begin\r\n children := node.childNodes;\r\n\r\n childlist := TList.Create;\r\n for i := 0 to children.length - 1 do\r\n begin\r\n GetTextNodes(children[i], childlist);\r\n for j := 0 to childlist.count - 1 do\r\n nodes.Add(childlist[j]);\r\n end;\r\n childlist.Free;\r\n end;\r\nend;\r\n\r\nprocedure TCustomRichEdit.DoSelectAction(StartPosition, EndPosition: integer);\r\nvar\r\n s: string;\r\n sstart, send: integer;\r\n el: TJSElement;\r\n range: TJSRange;\r\n textNodes: TList;\r\n textNode: TJSNode;\r\n i: integer;\r\n foundStart: boolean;\r\n charCount, endCharCount: integer;\r\n sel: TJSSelection;\r\nbegin\r\n s := ElementID;\r\n sstart := StartPosition;\r\n send := EndPosition;\r\n\r\n el := document.getElementById(s);\r\n if Assigned(el) then\r\n begin\r\n range := document.createRange;\r\n range.selectNodeContents(el);\r\n textNodes := TList.Create;\r\n\r\n GetTextNodes(el, textNodes);\r\n foundStart := false;\r\n charCount := 0;\r\n endCharCount := 0;\r\n\r\n for i := 0 to textNodes.count - 1 do\r\n begin\r\n textNode := TJSNode(textNodes[i]);\r\n endCharCount := charCount + length(TJSNode(textNode).nodeValue);\r\n\r\n if (not foundStart) and (sstart >= charCount) and ((sstart < endCharCount) or ((sstart = endCharCount) and (i <= textNodes.count))) then\r\n begin\r\n range.setStart(textNode, sstart - charCount);\r\n foundStart := true;\r\n end;\r\n\r\n if (foundStart) and (send <= endCharCount) then\r\n begin\r\n range.setEnd(textNode, send - charCount);\r\n \tbreak;\r\n end;\r\n charCount := endCharCount;\r\n end;\r\n\r\n sel := document.getSelection();\r\n sel.removeAllRanges();\r\n sel.addRange(range);\r\n\r\n textNodes.Free;\r\n end;\r\nend;\r\n\r\nprocedure TCustomRichEdit.DoEditAction(ActionString: string);\r\nbegin\r\n if Assigned(ElementIFrameHandle) then\r\n begin\r\n ElementIFrameHandle.execCommand(ActionString, false);\r\n end;\r\nend;\r\n\r\nprocedure TCustomRichEdit.DoChange;\r\nbegin\r\n if Assigned(OnChange) then\r\n OnChange(Self);\r\nend;\r\n\r\nprocedure TCustomRichEdit.DoEditAction(ActionString: string; Data: string);\r\nbegin\r\n if Assigned(ElementIFrameHandle) then\r\n begin\r\n ElementIFrameHandle.execCommand(ActionString, false, Data);\r\n end;\r\nend;\r\n\r\nprocedure TCustomRichEdit.DoHandleInput(Event: TJSEvent);\r\nbegin\r\n DoChange;\r\nend;\r\n\r\nprocedure TCustomRichEdit.DoHandlePaste(Event: TJSEvent);\r\nbegin\r\n if FWantImages then\r\n Exit;\r\n asm\r\n var pastedData = Event.clipboardData.getData('text');\r\n var regex = /^[a-zA-Z0-9@ `!@#$%^&*()_+\\-=\\[\\]{};':\"\\\\|,.<>\\/?~]/;\r\n if (regex.test(pastedData) !== true) {\r\n Event.preventDefault();\r\n }\r\n end;\r\nend;\r\n\r\nprocedure TCustomRichEdit.DoLinkAction;\r\nvar\r\n url: string;\r\nbegin\r\n if Assigned(ElementHandle) then\r\n begin\r\n url := window.prompt('Enter URL:', 'http://');\r\n if Assigned(url) then\r\n begin\r\n if (url <> '') and (url <> 'http://') and (url <> 'https://') then\r\n DoEditAction('createLink', url);\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TCustomRichEdit.DoImageAction;\r\nvar\r\n url: string;\r\nbegin\r\n if Assigned(ElementHandle) then\r\n begin\r\n url := window.prompt('Enter Image URL:', 'http://');\r\n if Assigned(url) then\r\n begin\r\n if (url <> '') and (url <> 'http://') and (url <> 'https://') then\r\n DoEditAction('insertImage', url);\r\n end;\r\n end; \r\nend;\r\n\r\nprocedure TCustomRichEdit.UpdateElement;\r\nvar\r\n i: integer;\r\n s: string;\r\nbegin\r\n inherited;\r\n\r\n if Assigned(ElementIFrameHandle) then\r\n begin\r\n// ElementIFrameHandle.designMode := 'On';\r\n// ElementIFrameHandle.document.open;\r\n// ElementIFrameHandle.document.write(FLines.Text);\r\n// ElementIFrameHandle.document.close;\r\n// ElementIFrameHandle.document.contentEditable = true;\r\n// ElementIFrameHandle.body.innerHTML := FLines.Text;\r\n end;\r\n\r\n if Assigned(ElementHandle) then\r\n begin\r\n s := '';\r\n for i := 0 to FLines.Count - 1 do\r\n begin\r\n if i > 0 then\r\n s := s + '
';\r\n s := s + FLines[i];\r\n end;\r\n\r\n ElementHandle.innerHTML := s;\r\n\r\n if ReadOnly then\r\n ElementHandle.contentEditable := 'false'\r\n else\r\n ElementHandle.contentEditable := 'true';\r\n\r\n ElementHandle.style.setProperty('overflow', 'auto');\r\n ElementHandle.style.setProperty('padding', '3px');\r\n\r\n if BorderStyle = bsSingle then\r\n ElementHandle.style.setProperty('border', '1px solid silver')\r\n else\r\n ElementHandle.style.setProperty('border', '');\r\n end;\r\nend;\r\n\r\nfunction TCustomRichEdit.GetText: String;\r\nbegin\r\n if Assigned(ElementHandle) then\r\n FLines.Text := ElementHandle.innerHTML;\r\n Result := FLines.Text;\r\nend;\r\n\r\nfunction TCustomRichEdit.GetContent: string;\r\nbegin\r\n Result := self.GetText;\r\nend;\r\n\r\nfunction TCustomRichEdit.GetLines: TStrings;\r\nbegin\r\n Result := FLines;\r\nend;\r\n\r\nfunction TCustomRichEdit.GetPlainText: String;\r\nbegin\r\n Result := '';\r\n if Assigned(ElementHandle) then\r\n Result := ElementHandle.innerText;\r\nend;\r\n\r\nfunction TCustomRichEdit.GetSelection: string;\r\nvar\r\n res: string;\r\nbegin\r\n res := '';\r\n asm\r\n // window.getSelection() gives you a Selection object representing the range of text selected by the user or the current position of the caret.\r\n if (window.getSelection) {\r\n res = window.getSelection().toString();\r\n }\r\n end;\r\n\r\n Result := res;\r\nend;\r\n\r\nfunction TCustomRichEdit.GetSelectionAttributes(selnode: TJSNode): TSelAttributes;\r\nvar\r\n el: TJSElement;\r\n fn,fs,fc,fbk: string;\r\n found: boolean;\r\n Attr: TSelAttributes;\r\nbegin\r\n begin\r\n asm\r\n el = null;\r\n if (selnode.focusNode) {\r\n el = selnode.focusNode.parentElement;\r\n }\r\n end;\r\n\r\n repeat\r\n found := false;\r\n\r\n if Assigned(el) then\r\n begin\r\n if el.tagName = 'B' then\r\n begin\r\n found := true;\r\n Attr.IsBold := true;\r\n end;\r\n if el.tagName = 'I' then\r\n begin\r\n found := true;\r\n Attr.IsItalic := true;\r\n end;\r\n if el.tagName = 'U' then\r\n begin\r\n found := true;\r\n Attr.IsUnderline := true;\r\n end;\r\n if el.tagName = 'STRIKE' then\r\n begin\r\n found := true;\r\n Attr.IsStrikeOut := true;\r\n end;\r\n\r\n if el.tagName = 'SPAN' then\r\n begin\r\n fbk := TJSHTMLElement(el).style.getPropertyValue('background-color');\r\n\r\n asm\r\n if (fbk == null) {\r\n fbk = ''; }\r\n end;\r\n Attr.BkColor := fbk;\r\n\r\n found := true;\r\n end;\r\n\r\n if el.tagName = 'DIV' then\r\n begin\r\n fbk := TJSHTMLElement(el).style.getPropertyValue('text-align');\r\n\r\n asm\r\n if (fbk == null) {\r\n fbk = ''; }\r\n end;\r\n\r\n if fbk = 'center' then\r\n Attr.isCenter := true;\r\n\r\n if fbk = 'right' then\r\n Attr.isRight := true;\r\n\r\n if fbk = 'left' then\r\n Attr.isLeft := true;\r\n\r\n found := true;\r\n end;\r\n\r\n if el.tagName = 'FONT' then\r\n begin\r\n fn := el['face'];\r\n\r\n asm\r\n if (fn == null) {\r\n fn = ''; }\r\n end;\r\n\r\n fs := el['size'];\r\n\r\n asm\r\n if (fs == null) {\r\n fs = ''; }\r\n end;\r\n\r\n fc := el['color'];\r\n\r\n asm\r\n if (fc == null) {\r\n fc = ''; }\r\n end;\r\n\r\n fbk := TJSHTMLElement(el).style.getPropertyValue('background-color');\r\n\r\n asm\r\n if (fbk == null) {\r\n fbk = ''; }\r\n end;\r\n\r\n found := true;\r\n\r\n Attr.FontName := fn;\r\n Attr.FontColor := fc;\r\n\r\n if (fs <> '') then\r\n begin\r\n if fs = '7' then\r\n fs := '36';\r\n\r\n if fs = '6' then\r\n fs := '24';\r\n\r\n if fs = '5' then\r\n fs := '18';\r\n\r\n if fs = '4' then\r\n fs := '14';\r\n\r\n if fs = '3' then\r\n fs := '10';\r\n\r\n if fs = '2' then\r\n fs := '9';\r\n\r\n if fs = '1' then\r\n fs := '8';\r\n end;\r\n\r\n Attr.FontSize := fs;\r\n Attr.BkColor := fbk;\r\n end;\r\n\r\n el := TJSElement(el.parentElement);\r\n\r\n if (el = ElementHandle) then\r\n found := false;\r\n end;\r\n until not found;\r\n\r\n Result := Attr;\r\n\r\n if Assigned(OnAttributesChanged) then\r\n OnAttributesChanged(Self, Attr);\r\n end;\r\nend;\r\n\r\n{$HINTS OFF}\r\n\r\nfunction TCustomRichEdit.GetSelStart: integer;\r\nvar\r\n res: integer;\r\n el: TJSHTMLElement;\r\nbegin\r\n el := TJSHTMLElement(ElementHandle);\r\n asm\r\n const selection = window.getSelection();\r\n const range = selection.getRangeAt(0);\r\n const preSelectionRange = range.cloneRange();\r\n preSelectionRange.selectNodeContents(el);\r\n preSelectionRange.setEnd(range.startContainer, range.startOffset);\r\n res = preSelectionRange.toString().length;\r\n end;\r\n\r\n Result := res;\r\nend;\r\n{$HINTS ON}\r\n\r\nprocedure TCustomRichEdit.SetSelAttributes(Value: TTextAttributes);\r\nbegin\r\n SelAttributes.Assign(Value);\r\nend;\r\n\r\nprocedure TCustomRichEdit.SetSelectionSpacing(ASpacing: double);\r\nvar\r\n sel: TJSSelection;\r\n range: TJSRange;\r\n node, pNode: TJSNode;\r\n i: integer;\r\n lh: string;\r\n\r\n function getNextNode(anode: TJSNode): TJSNode;\r\n begin\r\n if Assigned(anode.firstChild) then\r\n Result := anode.firstChild\r\n else\r\n while Assigned(anode) do\r\n begin\r\n if Assigned(anode.nextSibling) then\r\n begin\r\n Result := anode.nextSibling;\r\n break;\r\n end;\r\n anode := anode.parentNode;\r\n end;\r\n end;\r\n\r\nbegin\r\n sel := document.getSelection;\r\n\r\n if not Assigned(sel) then\r\n Exit;\r\n\r\n lh := FormatProp('%g',[ASpacing]);\r\n\r\n for i := 0 to sel.rangeCount - 1 do\r\n begin\r\n range := sel.getRangeAt(i);\r\n\r\n node := range.startContainer;\r\n\r\n if node.nodeName = '#text' then\r\n begin\r\n pNode := node.parentNode;\r\n if pNode.nodeName = 'DIV' then\r\n TJSHTMLElement(pNode).style.setProperty('line-height',lh);\r\n end;\r\n\r\n while node <> range.endContainer do\r\n begin\r\n node := getNextNode(node);\r\n if node.nodeName = 'DIV' then\r\n TJSHTMLElement(node).style.setProperty('line-height',lh);\r\n end;\r\n end;\r\nend;\r\n\r\n{$HINTS OFF}\r\nprocedure TCustomRichEdit.SetSelStart(const Value: integer);\r\nvar\r\n el: TJSHTMLElement;\r\nbegin\r\n el := TJSHTMLElement(ElementHandle);\r\n\r\n asm\r\n const range = document.createRange();\r\n const sel = window.getSelection();\r\n\r\n var i = 0;\r\n while (i < el.childNodes.length) {\r\n if (Value <=el.childNodes[i].textContent.length) {\r\n range.setStart(el.childNodes[i], Value);\r\n }\r\n else {\r\n Value = Value - el.childNodes[i].textContent.length;\r\n }\r\n i++;\r\n }\r\n range.collapse(true);\r\n sel.removeAllRanges();\r\n sel.addRange(range);\r\n end;\r\nend;\r\n{$HINTS ON}\r\n\r\n\r\nprocedure TCustomRichEdit.SetShowFocus(const Value: boolean);\r\nbegin\r\n if (FShowFocus <> Value) then\r\n begin\r\n FShowFocus := Value;\r\n UpdateElement;\r\n end;\r\nend;\r\n\r\nprocedure TCustomRichEdit.Loaded;\r\nvar\r\n doc: TJSDocument;\r\n el: TJSHTMLElement;\r\nbegin\r\n inherited;\r\n\r\n if Assigned(ElementIFrameHandle) then\r\n begin\r\n doc := ElementIFrameHandle;\r\n el := ElementHandle;\r\n el.onclick := @HandleDoClick;\r\n el.ondblclick := @HandleDoDblClick;\r\n el.onmousedown := @HandleDoMouseDown;\r\n el.onmouseup := @HandleDoMouseUp;\r\n el.onmousemove := @HandleDoMouseMove;\r\n el.onkeydown := @HandleDoKeyDown;\r\n el.onkeyup := @HandleDoKeyUp;\r\n el.onkeypress := @HandleDoKeyPress;\r\n el.onfocus := @HandleDoEnter;\r\n el.onblur := @HandleDoExit;\r\n doc.onselectionchange := @HandleDoSelectionChange;\r\n end;\r\nend;\r\n\r\nprocedure TCustomRichEdit.AppendHTML(HTML: string);\r\nvar\r\n sel: TJSSelection;\r\n range: TJSRange;\r\n el: TJSHTMLElement;\r\n frag: TJSDocumentFragment;\r\n node, lastNode: TJSNode;\r\nbegin\r\n sel := nil;\r\n\r\n if Focused then\r\n begin\r\n sel := document.getSelection;\r\n range := sel.getRangeAt(0);\r\n range.deleteContents;\r\n end\r\n else\r\n begin\r\n range := document.createRange();\r\n node := ElementHandle.firstChild;\r\n lastNode := node;\r\n while Assigned(node) do\r\n begin\r\n node := node.nextSibling;\r\n if Assigned(node) then\r\n lastNode := node;\r\n end;\r\n\r\n if Assigned(lastNode) then\r\n begin\r\n range.setStartAfter(lastNode);\r\n range.setEndAfter(lastNode);\r\n end\r\n else\r\n begin\r\n range.setStart(ElementHandle, 0);\r\n range.setEnd(ElementHandle,0);\r\n end;\r\n end;\r\n\r\n el := TJSHTMLElement(document.createElement('div'));\r\n el.innerHTML := HTML;\r\n frag := document.createDocumentFragment;\r\n node := el.firstChild;\r\n\r\n while (node = el.firstChild) do\r\n begin\r\n lastNode := frag.appendChild(node);\r\n range.insertNode(frag);\r\n end;\r\n\r\n if Assigned(lastNode) then\r\n begin\r\n range := range.cloneRange();\r\n range.setStartAfter(lastNode);\r\n range.collapse;\r\n if Assigned(sel) then\r\n begin\r\n sel.removeAllRanges;\r\n sel.addRange(range);\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TCustomRichEdit.AppendLinebreak;\r\nbegin\r\n AppendHTML('
');\r\nend;\r\n\r\nprocedure TCustomRichEdit.InsertHTML(HTML: String);\r\nvar\r\n sel: TJSSelection;\r\n range: TJSRange;\r\n el: TJSHTMLElement;\r\n frag: TJSDocumentFragment;\r\n node, lastNode: TJSNode;\r\nbegin\r\n sel := nil;\r\n if Focused then\r\n begin\r\n sel := document.getSelection;\r\n range := sel.getRangeAt(0);\r\n range.deleteContents;\r\n end\r\n else\r\n begin\r\n range := document.createRange();\r\n range.setStart(ElementHandle, 0);\r\n range.setEnd(ElementHandle, 0);\r\n end;\r\n\r\n el := TJSHTMLElement(document.createElement('div'));\r\n el.innerHTML := HTML;\r\n frag := document.createDocumentFragment;\r\n node := el.firstChild;\r\n\r\n\r\n while (node = el.firstChild) do\r\n begin\r\n lastNode := frag.appendChild(node);\r\n range.insertNode(frag);\r\n end;\r\n\r\n if Assigned(lastNode) then\r\n begin\r\n range := range.cloneRange();\r\n range.setStartAfter(lastNode);\r\n range.collapse;\r\n if Assigned(sel) then\r\n begin\r\n sel.removeAllRanges;\r\n sel.addRange(range);\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TCustomRichEdit.InsertImage(DataURL: string);\r\nbegin\r\n DoEditAction('insertImage', DataURL);\r\nend;\r\n\r\nprocedure TCustomRichEdit.InsertLineBreak;\r\nbegin\r\n InsertHTML('
');\r\nend;\r\n\r\nfunction TCustomRichEdit.HandleDoSelectionChange(Event: TEventListenerEvent): Boolean;\r\nvar\r\n Attr: TSelAttributes;\r\nbegin\r\n if Assigned(Owner) then\r\n begin\r\n //reset to a color close to black to avoid being unable to\r\n //select black as the new color\r\n (Owner as TRichEditToolBar).TextColor := $000001;\r\n (Owner as TRichEditToolBar).BackgroundColor := $000001;\r\n end;\r\n\r\n Attr := GetSelectionAttributes(TJSNode(document.getSelection()));\r\n\r\n SelAttributes.Style := [];\r\n\r\n if Attr.IsBold then\r\n SelAttributes.Style := SelAttributes.Style + [fsBold];\r\n if Attr.IsItalic then\r\n SelAttributes.Style := SelAttributes.Style + [fsItalic];\r\n if Attr.IsUnderline then\r\n SelAttributes.Style := SelAttributes.Style + [fsUnderline];\r\n if Attr.IsStrikeOut then\r\n SelAttributes.Style := SelAttributes.Style + [fsStrikeOut];\r\n\r\n if Assigned(OnSelectionChange) then\r\n OnSelectionChange(Self);\r\n\r\n Result := True;\r\nend;\r\n\r\nfunction TCustomRichEdit.HandleDoKeyDown(Event: TJSKeyBoardEvent): Boolean;\r\nbegin\r\n Result := false;\r\n\r\n if (Event.ctrlKey = true) and (Event.key = 'Control') and ReadOnly then\r\n begin\r\n ElementHandle.contentEditable := 'false';\r\n end;\r\n\r\n //Handle Return Key\r\n if (GetKeyCode(Event.Key) = 13) and InsertLineBreaks then\r\n InsertHTML('
')\r\n else\r\n //Handle Tab Key\r\n if (GetKeyCode(Event.Key) = 9) and WantTabs then\r\n InsertHTML(' ')\r\n else\r\n begin\r\n Result := True;\r\n end;\r\n\r\n inherited;\r\nend;\r\n\r\n\r\nfunction TCustomRichEdit.HandleDoKeyUp(Event: TJSKeyBoardEvent): Boolean;\r\nbegin\r\n Result := false;\r\n\r\n if (Event.ctrlKey = false) and (Event.key = 'Control') and not ReadOnly then\r\n begin\r\n ElementHandle.contentEditable := 'true';\r\n end;\r\n\r\n inherited;\r\nend;\r\n\r\n{ TTextAttributes }\r\n\r\nconstructor TTextAttributes.Create(AOwner: TCustomRichEdit);\r\nbegin\r\n inherited Create;\r\n RichEdit := AOwner;\r\n FAlignment := taLeftJustify;\r\n FIsBold := False;\r\n FIsItalic := False;\r\n FIsUnderline := False;\r\n FIsStrikeOut := False;\r\n FOrderedList := False;\r\n FUnOrderedList := False;\r\nend;\r\n\r\nprocedure TTextAttributes.Cut;\r\nbegin\r\n RichEdit.DoEditAction('cut');\r\nend;\r\n\r\nfunction TTextAttributes.FontSizeToEM(const Value: integer): string;\r\nbegin\r\n Result := '0.63';\r\n case Value of\r\n 1: Result := '0.63em';\r\n 2: Result := '0.82em';\r\n 3: Result := '1.0em';\r\n 4: Result := '1.13em';\r\n 5: Result := '1.5em';\r\n 6: Result := '2em';\r\n 7: Result := '3em';\r\n end;\r\nend;\r\n\r\nprocedure TTextAttributes.Copy;\r\nbegin\r\n RichEdit.DoEditAction('copy');\r\nend;\r\n\r\nprocedure TTextAttributes.Paste;\r\nbegin\r\n RichEdit.DoEditAction('paste');\r\nend;\r\n\r\nprocedure TTextAttributes.Image;\r\nbegin\r\n RichEdit.DoImageAction;\r\nend;\r\n\r\nprocedure TTextAttributes.Link;\r\nbegin\r\n RichEdit.DoLinkAction;\r\nend;\r\n\r\nprocedure TTextAttributes.SetAlignment(Value: TAlignment);\r\nbegin\r\n FAlignment := Value;\r\n\r\n case FAlignment of\r\n taLeftJustify: RichEdit.DoEditAction('justifyleft');\r\n taCenter: RichEdit.DoEditAction('justifycenter');\r\n taRightJustify: RichEdit.DoEditAction('justifyright');\r\n end;\r\nend;\r\n\r\nprocedure TTextAttributes.SetBackColor(Value: TColor);\r\nbegin\r\n FColor := Value;\r\n RichEdit.DoEditAction('hiliteColor', ColorToHtml(Value));\r\nend;\r\n\r\nprocedure TTextAttributes.SetColor(Value: TColor);\r\nbegin\r\n FColor := Value;\r\n RichEdit.DoEditAction('foreColor', ColorToHtml(Value));\r\nend;\r\n\r\nprocedure TTextAttributes.SetName(Value: string);\r\nbegin\r\n FName := Value;\r\n RichEdit.DoEditAction('fontName', Value);\r\nend;\r\n\r\nprocedure TTextAttributes.SetOrderedList(Value: Boolean);\r\nbegin\r\n if (FOrderedLIst <> Value) then\r\n RichEdit.DoEditAction('insertorderedlist');\r\n\r\n FOrderedList := Value;\r\nend;\r\n\r\nprocedure TTextAttributes.SetUnOrderedList(Value: Boolean);\r\nbegin\r\n if (FUnOrderedLIst <> Value) then\r\n RichEdit.DoEditAction('insertunorderedlist');\r\n\r\n FUnOrderedList := Value;\r\nend;\r\n\r\nprocedure TTextAttributes.SetStyle(Value: TFontStyles);\r\nbegin\r\n FStyle := Value;\r\n\r\n if (fsBold in FStyle) and (not FIsBold) then\r\n begin\r\n RichEdit.DoEditAction('bold');\r\n FIsBold := True;\r\n end;\r\n\r\n if (not(fsBold in FStyle)) and (FIsBold) then\r\n begin\r\n RichEdit.DoEditAction('bold');\r\n FIsBold := False;\r\n end;\r\n\r\n if (fsItalic in FStyle) and (not FIsItalic) then\r\n begin\r\n RichEdit.DoEditAction('italic');\r\n FIsItalic := True;\r\n end;\r\n\r\n if (not(fsItalic in FStyle)) and (FIsItalic) then\r\n begin\r\n RichEdit.DoEditAction('italic');\r\n FIsItalic := False;\r\n end;\r\n\r\n if (fsUnderline in FStyle) and (not FIsUnderline) then\r\n begin\r\n RichEdit.DoEditAction('underline');\r\n FIsUnderline := True;\r\n end;\r\n\r\n if (not(fsUnderline in FStyle)) and (FIsUnderline) then\r\n begin\r\n RichEdit.DoEditAction('underline');\r\n FIsUnderline := False;\r\n end;\r\n\r\n if (fsStrikeOut in FStyle) and (not FIsStrikeOut) then\r\n begin\r\n RichEdit.DoEditAction('strikethrough');\r\n FIsStrikeOut := True;\r\n end;\r\n\r\n if (not(fsStrikeOut in FStyle)) and (FIsStrikeOut) then\r\n begin\r\n RichEdit.DoEditAction('strikethrough');\r\n FIsStrikeOut := False;\r\n end;\r\n\r\n// RichEdit.UpdateElement;\r\nend;\r\n\r\nprocedure TTextAttributes.SetSize(Value: Integer);\r\nbegin\r\n if (Value > 0) and (Value < 8) then\r\n begin\r\n FSize := Value;\r\n FHeight := Value;\r\n RichEdit.DoEditAction('fontSize', IntToStr(Value));\r\n asm\r\n var selection = window.getSelection();\r\n end;\r\n end;\r\nend;\r\n\r\n{$HINTS OFF}\r\nprocedure TTextAttributes.SetHeight(Value: Integer);\r\nvar\r\n eh: TJSElement;\r\n fs: string;\r\nbegin\r\n if (Value > 0) and (Value < 8) then\r\n begin\r\n FSize := Value;\r\n FHeight := Value;\r\n fs := IntToStr(Value);\r\n RichEdit.DoEditAction('fontSize', fs);\r\n\r\n fs := FontSizeToEm(Value);\r\n\r\n eh := RichEdit.ElementHandle;\r\n\r\n // fix browser shortcoming that it doesn't apply font size changes to LI elements\r\n asm\r\n var selection = window.getSelection();\r\n if (selection.rangeCount > 0) {\r\n var range = selection.getRangeAt(0);\r\n const selectedElements = eh.querySelectorAll('*');\r\n selectedElements.forEach(element => {\r\n if (range.intersectsNode(element)) {\r\n if (element.tagName == \"LI\") {\r\n element.style.setProperty(\"font-size\",fs);\r\n }\r\n }\r\n });\r\n }\r\n end;\r\n end;\r\nend;\r\n{$HINTS ON}\r\n\r\nprocedure TTextAttributes.Assign(Source: TPersistent);\r\nbegin\r\n if Source is TFont then\r\n begin\r\n Color := TFont(Source).Color;\r\n Name := TFont(Source).Name;\r\n Style := TFont(Source).Style;\r\n Size := TFont(Source).Size;\r\n end\r\n else if Source is TTextAttributes then\r\n begin\r\n Color := TTextAttributes(Source).Color;\r\n Name := TTextAttributes(Source).Name;\r\n Style := TTextAttributes(Source).Style;\r\n Size := TTextAttributes(Source).Size;\r\n end\r\n else inherited Assign(Source);\r\nend;\r\n\r\nprocedure TTextAttributes.AssignTo(Dest: TPersistent);\r\nbegin\r\n if Dest is TFont then\r\n begin\r\n TFont(Dest).Color := Color;\r\n TFont(Dest).Name := Name;\r\n TFont(Dest).Style := Style;\r\n TFont(Dest).Size := Size;\r\n end\r\n else if Dest is TTextAttributes then\r\n begin\r\n TTextAttributes(Dest).Color := Color;\r\n TTextAttributes(Dest).Name := Name;\r\n TTextAttributes(Dest).Style := Style;\r\n end\r\n else inherited AssignTo(Dest);\r\nend;\r\n\r\n{ TTabSet }\r\n\r\nprocedure TTabSet.BindEvents;\r\nbegin\r\n inherited;\r\n if Assigned(ElementHandle) then\r\n begin\r\n ElementHandle.onchange := @HandleDoChange;\r\n end;\r\nend;\r\n\r\nprocedure TTabSet.Clear;\r\nbegin\r\n Items.Clear;\r\nend;\r\n\r\nprocedure TTabSet.CreateInitialize;\r\nbegin\r\n inherited;\r\n FItems := TStringList.Create;\r\n FItems.OnChange := ItemsChanged;\r\n FItemIndex := 0;\r\n FSelectedColor := clSilver;\r\n FSelectedTextColor := clBlack;\r\n FUseHash := true;\r\nend;\r\n\r\nfunction TTabSet.CreateElement: TJSElement;\r\nbegin\r\n Result := document.createElement('SPAN');\r\nend;\r\n\r\ndestructor TTabSet.Destroy;\r\nbegin\r\n FItems.Free;\r\n inherited;\r\nend;\r\n\r\nprocedure TTabSet.DisableDrag;\r\n procedure RemoveDraggableAttribute(AElement: TJSElement);\r\n var\r\n I: Integer;\r\n begin\r\n for I := 0 to AElement.children.length - 1 do\r\n begin\r\n if TJSElement(AElement.children[I]).tagName = 'LI' then\r\n begin\r\n TJSElement(AElement.children[I]).removeAttribute('draggable');\r\n RemoveDraggableAttribute(TJSElement(AElement.children[I]));\r\n end\r\n else if TJSElement(AElement.children[I]).tagName = 'A' then\r\n TJSElement(AElement.children[I]).removeAttribute('draggable')\r\n else\r\n RemoveDraggableAttribute(TJSElement(AElement.children[I]));\r\n end;\r\n end;\r\nbegin\r\n if not Assigned(Container) then\r\n Exit;\r\n\r\n RemoveDraggableAttribute(Container);\r\nend;\r\n\r\nprocedure TTabSet.SetItems(AItems: TStringList);\r\nbegin\r\n FItems.Assign(AItems);\r\nend;\r\n\r\nfunction TTabSet.HandleDoChange(Event: TEventListenerEvent): Boolean;\r\nbegin\r\n if Assigned(OnChange) then\r\n OnChange(Self);\r\n Result := True;\r\nend;\r\n\r\nprocedure TTabSet.Loaded;\r\nbegin\r\n inherited;\r\n DoUpdateList;\r\nend;\r\n\r\nprocedure TTabSet.SelectNextTab(GoForward: boolean);\r\nbegin\r\n if GoForward then\r\n begin\r\n if ItemIndex < Items.Count - 1 then\r\n ItemIndex := ItemIndex + 1\r\n else\r\n ItemIndex := 0;\r\n end\r\n else\r\n begin\r\n if ItemIndex > 0 then\r\n ItemIndex := ItemIndex - 1\r\n else\r\n ItemIndex := Items.Count - 1;\r\n end;\r\n\r\nend;\r\n\r\nprocedure TTabSet.SetItemIndex(AIndex: integer);\r\nbegin\r\n if FItemIndex <> AIndex then\r\n begin\r\n FItemIndex := AIndex;\r\n DoUpdateList;\r\n end;\r\nend;\r\n\r\nprocedure TTabSet.SetSelectedColor(const Value: TColor);\r\nbegin\r\n if FSelectedColor <> Value then\r\n begin\r\n FSelectedColor := Value;\r\n DoUpdateList;\r\n end;\r\nend;\r\n\r\nprocedure TTabSet.SetSelectedTextColor(const Value: TColor);\r\nbegin\r\n if (FSelectedColor <> Value) then\r\n begin\r\n FSelectedTextColor := Value;\r\n DoUpdateList;\r\n end;\r\nend;\r\n\r\nprocedure TTabSet.DoUpdateList;\r\nvar\r\n i: integer;\r\n s, cid: string;\r\n ul, li, a: TJSElement;\r\nbegin\r\n if not Assigned(Container) then\r\n Exit;\r\n\r\n while Assigned(Container.firstChild) do\r\n Container.removeChild(Container.firstChild);\r\n\r\n Container['class'] := '';\r\n\r\n ul := document.createElement('UL');\r\n ul['class'] := ElementClassName;\r\n\r\n if ElementClassName <> '' then\r\n ul['role'] := 'tablist'\r\n else\r\n begin\r\n (TJSHTMLElement(ul)).style.setProperty('list-style-type', 'none');\r\n (TJSHTMLElement(ul)).style.setProperty('margin', '0');\r\n (TJSHTMLElement(ul)).style.setProperty('padding', '0');\r\n (TJSHTMLElement(ul)).style.setProperty('display', 'inline-block');\r\n end;\r\n\r\n Container.appendChild(ul);\r\n\r\n for i := 0 to FItems.Count - 1 do\r\n begin\r\n s := FItems[i];\r\n\r\n li := document.createElement('LI');\r\n\r\n if ElementClassName <> '' then\r\n begin\r\n if ElementTabItemClassName = '' then\r\n li['class'] := 'nav-item'\r\n else\r\n li['class'] := ElementTabItemClassName;\r\n end\r\n else\r\n begin\r\n (TJSHTMLElement(li)).style.setProperty('float', 'left');\r\n (TJSHTMLElement(li)).style.setProperty('border-bottom', '1px solid lightgray');\r\n end;\r\n\r\n SetHTMLElementFont(TJSHTMLElement(li), Font, not ((ElementClassName = '') and (ElementFont = efProperty)));\r\n\r\n if DragMode = dmAutomatic then\r\n li['draggable'] := 'true';\r\n\r\n ul.appendChild(li);\r\n\r\n if not Enabled then\r\n a := document.createElement('SPAN')\r\n else\r\n begin\r\n a := document.createElement('A');\r\n if FUseHash then\r\n a['href'] := '#' + s;\r\n end;\r\n\r\n a.innerHTML := s;\r\n\r\n cid := GetID;\r\n if cid = '' then\r\n cid := Name;\r\n\r\n a['id'] := cid + '_' + IntToStr(i);\r\n\r\n if ElementClassName <> '' then\r\n begin\r\n if ItemIndex = i then\r\n begin\r\n if ElementTabActiveClassName = '' then\r\n a['class'] := 'nav-link active'\r\n else\r\n a['class'] := ElementTabActiveClassName;\r\n end\r\n else\r\n begin\r\n if ElementTabClassName = '' then\r\n a['class'] := 'nav-link'\r\n else\r\n a['class'] := ElementTabClassName;\r\n end;\r\n a['role'] := 'tab';\r\n\r\n a['data-toggle'] := 'tab';\r\n a['aria-controls'] := s;\r\n\r\n if ItemIndex = i then\r\n a['aria-selected'] := 'true'\r\n else\r\n a['aria-selected'] := 'false';\r\n\r\n if DragMode = dmAutomatic then\r\n a['draggable'] := 'false';\r\n end\r\n else\r\n begin\r\n (TJSHTMLElement(a)).style.setProperty('display', 'block');\r\n (TJSHTMLElement(a)).style.setProperty('text-align', 'center');\r\n (TJSHTMLElement(a)).style.setProperty('padding', '3px 15px');\r\n (TJSHTMLElement(a)).style.setProperty('text-decoration', 'none');\r\n (TJSHTMLElement(a)).style.setProperty('min-width', '50px');\r\n\r\n (TJSHTMLElement(a)).style.setProperty('color', 'inherit');\r\n (TJSHTMLElement(a)).style.setProperty('font-family', 'inherit');\r\n (TJSHTMLElement(a)).style.setProperty('font-style', 'inherit');\r\n (TJSHTMLElement(a)).style.setProperty('font-size', 'inherit');\r\n\r\n if not Enabled then\r\n (TJSHTMLElement(a)).style.setProperty('pointer-events', 'none');\r\n\r\n if DragMode = dmAutomatic then\r\n a['draggable'] := 'false';\r\n\r\n if ItemIndex = i then\r\n begin\r\n if SelectedColor <> clNone then\r\n (TJSHTMLElement(a)).style.setProperty('background-color', ColorToHtml(SelectedColor));\r\n if SelectedTextColor <> clNone then\r\n (TJSHTMLElement(a)).style.setProperty('color', ColorToHtml(SelectedTextColor));\r\n end;\r\n end;\r\n\r\n li.appendChild(a);\r\n end;\r\n\r\n if not IsLinked and (csDesigning in ComponentState) then\r\n RenderDesigning('TWebTabSet', Container, Self, (FItems.Count = 0));\r\n\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TTabSet.EnableDrag;\r\n procedure AddDraggableAttribute(AElement: TJSElement);\r\n var\r\n I: Integer;\r\n begin\r\n for I := 0 to AElement.children.length - 1 do\r\n begin\r\n if TJSElement(AElement.children[I]).tagName = 'LI' then\r\n begin\r\n TJSElement(AElement.children[I]).Attrs['draggable'] := 'true';\r\n AddDraggableAttribute(TJSElement(AElement.children[I]));\r\n end\r\n else if TJSElement(AElement.children[I]).tagName = 'A' then\r\n TJSElement(AElement.children[I]).Attrs['draggable'] := 'false'\r\n else\r\n AddDraggableAttribute(TJSElement(AElement.children[I]));\r\n end;\r\n end;\r\nbegin\r\n if not Assigned(Container) then\r\n Exit;\r\n\r\n AddDraggableAttribute(Container);\r\nend;\r\n\r\nprocedure TTabSet.EndUpdate;\r\nbegin\r\n inherited;\r\n DoUpdateList;\r\nend;\r\n\r\nfunction TTabSet.HandleDoClick(Event: TJSMouseEvent): Boolean;\r\nvar\r\n sid, cid: string;\r\n i: integer;\r\n el: TJSElement;\r\nbegin\r\n el := Event.targetElement;\r\n\r\n sid := '';\r\n if el.hasAttribute('id') then\r\n sid := el.getAttribute('id');\r\n\r\n if sid <> '' then\r\n begin\r\n cid := GetID;\r\n if cid = '' then\r\n cid := Name;\r\n\r\n sid := StringReplace(sid, cid + '_', '', []);\r\n if TryStrToInt(sid,i) then\r\n begin\r\n FItemIndex := i;\r\n DoUpdateList;\r\n end;\r\n inherited;\r\n end;\r\n\r\n Result := true;\r\nend;\r\n\r\nfunction TTabSet.HandleDoItemMouseOut(Event: TJSMouseEvent): Boolean;\r\nvar\r\n el: TJSHTMLElement;\r\nbegin\r\n Result := true;\r\n //Event.stopPropagation;\r\n\r\n el := TJSHTMLElement(Event.relatedTarget);\r\n if Assigned(el) then\r\n begin\r\n if el.nodeName = 'A' then\r\n el.style.setProperty('background-color', '');\r\n end\r\nend;\r\n\r\nfunction TTabSet.HandleDoItemMouseOver(Event: TJSMouseEvent): Boolean;\r\nvar\r\n el: TJSHTMLElement;\r\nbegin\r\n Result := true;\r\n //Event.stopPropagation;\r\n\r\n el := TJSHTMLElement(Event.relatedTarget);\r\n if Assigned(el) then\r\n begin\r\n if el.nodeName = 'A' then\r\n el.style.setProperty('background-color', 'lightgray');\r\n end\r\nend;\r\n\r\n\r\nprocedure TTabSet.ItemsChanged(Sender: TObject);\r\nbegin\r\n DoUpdateList;\r\nend;\r\n\r\n{ TPageControl }\r\n\r\nprocedure TPageControl.BindEvents;\r\nbegin\r\n inherited;\r\n if Assigned(ElementHandle) then\r\n begin\r\n //The ElementHandle doesn't have an onchange event\r\n //so the onclick is used instead.\r\n //HandleDoChange checks if a different tab is clicked\r\n ElementHandle.onclick := @HandleDoChange;\r\n end;\r\nend;\r\n\r\nfunction TPageControl.CanAcceptChild(AValue: TControl): TControl;\r\nbegin\r\n Result := inherited;\r\n\r\n if Assigned(AValue) and not (AValue is TTabSheet) then\r\n begin\r\n Result := Parent;\r\n end;\r\nend;\r\n\r\nprocedure TPageControl.Clear;\r\nbegin\r\n Items.Clear;\r\nend;\r\n\r\nprocedure TPageControl.CreateInitialize;\r\nbegin\r\n inherited;\r\n\r\n FDesignTime := (csDesigning in ComponentState) and not\r\n ((csReading in Owner.ComponentState) or (csLoading in Owner.ComponentState));\r\n\r\n ControlStyle := ControlStyle + [csAcceptsControls];\r\n BorderStyle := bsNone;\r\n FItems := TStringList.Create;\r\n FItems.OnChange := ItemsChanged;\r\n FTabIndex := 0;\r\n FPrevTabIndex := FTabIndex;\r\n FShowTabs := true;\r\n FUseHash := true;\r\n TabStop := false;\r\n FSelectedColor := clSilver;\r\n FSelectedTextColor := clBlack;\r\n if (csDesigning in ComponentState) then\r\n begin\r\n Width := 400;\r\n Height := 300;\r\n end;\r\n EnablePropagation := true;\r\n FOldVisible := true;\r\nend;\r\n\r\nfunction TPageControl.CreateElement: TJSElement;\r\nbegin\r\n Result := document.createElement('SPAN');\r\nend;\r\n\r\ndestructor TPageControl.Destroy;\r\nbegin\r\n FItems.Free;\r\n inherited;\r\nend;\r\n\r\nprocedure TPageControl.DisableDrag;\r\n procedure RemoveDraggableAttribute(AElement: TJSElement);\r\n var\r\n I: Integer;\r\n tn: string;\r\n begin\r\n for I := 0 to AElement.children.length - 1 do\r\n begin\r\n tn := TJSElement(AElement.children[I]).tagName;\r\n if tn = 'LI' then\r\n begin\r\n TJSElement(AElement.children[I]).removeAttribute('draggable');\r\n RemoveDraggableAttribute(TJSElement(AElement.children[I]));\r\n end\r\n else if tn = 'A' then\r\n TJSElement(AElement.children[I]).removeAttribute('draggable')\r\n else if tn = 'UL' then\r\n RemoveDraggableAttribute(TJSElement(AElement.children[I]));\r\n end;\r\n end;\r\nbegin\r\n if not Assigned(Container) then\r\n Exit;\r\n\r\n RemoveDraggableAttribute(Container);\r\nend;\r\n\r\nprocedure TPageControl.SelectNextPage(GoForward: boolean);\r\nbegin\r\n if GoForward then\r\n begin\r\n if TabIndex < PageCount - 1 then\r\n TabIndex := TabIndex + 1\r\n else\r\n TabIndex := 0;\r\n end\r\n else\r\n begin\r\n if TabIndex > 0 then\r\n TabIndex := TabIndex - 1\r\n else\r\n TabIndex := PageCount - 1;\r\n end;\r\nend;\r\n\r\nfunction TPageControl.PageCount: integer;\r\nvar\r\n i: integer;\r\nbegin\r\n Result := 0;\r\n\r\n for i := 0 to ControlCount - 1 do\r\n begin\r\n if (Controls[i] is TTabSheet) then\r\n inc(Result);\r\n end;\r\nend;\r\n\r\n\r\nfunction TPageControl.PageIndexFromElement(AElement: TJSElement): Integer;\r\nvar\r\n sid, cid: string;\r\n i: Integer;\r\nbegin\r\n Result := -1;\r\n\r\n sid := '';\r\n if AElement.tagName = 'LI' then\r\n AElement := TJSElement(AElement.firstChild);\r\n\r\n if AElement.hasAttribute('id') then\r\n sid := AElement.getAttribute('id');\r\n\r\n if (sid <> '') then\r\n begin\r\n cid := GetID;\r\n if cid = '' then\r\n cid := Name;\r\n\r\n sid := StringReplace(sid, cid + '_', '', []);\r\n if TryStrToInt(sid, i) then\r\n Result := i;\r\n end;\r\nend;\r\n\r\nfunction TPageControl.GetActivePage: TTabsheet;\r\nvar\r\n pi: integer;\r\nbegin\r\n Result := nil;\r\n\r\n pi := GetActivePageIndex;\r\n if (pi >= 0) then\r\n Result := Pages[pi];\r\nend;\r\n\r\nfunction TPageControl.GetActivePageIndex: integer;\r\nbegin\r\n Result := -1;\r\n if (PageCount >= 0) and (TabIndex >= 0) and (TabIndex < PageCount) then\r\n Result := TabIndex;\r\nend;\r\n\r\nprocedure TPageControl.GetChildren(Proc: TGetChildProc; Root: TComponent);\r\nvar\r\n i: integer;\r\nbegin\r\n for i := 0 to ControlCount - 1 do\r\n begin\r\n if (Controls[i] is TTabSheet) then\r\n begin\r\n Proc(Controls[i]);\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TPageControl.GetPage(index: integer): TTabSheet;\r\nvar\r\n c,i: integer;\r\nbegin\r\n c := -1;\r\n Result := nil;\r\n\r\n for i := 0 to ControlCount - 1 do\r\n begin\r\n if (Controls[i] is TTabSheet) then\r\n inc(c);\r\n\r\n if c = index then\r\n begin\r\n Result := Controls[i] as TTabSheet;\r\n break;\r\n end;\r\n end;\r\nend;\r\n\r\n\r\nfunction TPageControl.GetUniqueName: string;\r\nvar\r\n i,id: integer;\r\n found: boolean;\r\n AName: string;\r\nbegin\r\n id := 1;\r\n\r\n AName := Name + 'sheet';\r\n\r\n repeat\r\n Result := AName + inttostr(id);\r\n\r\n found := true;\r\n\r\n for i := 0 to Owner.ComponentCount - 1 do\r\n begin\r\n if Owner.Components[i].Name = Result then\r\n begin\r\n found := false;\r\n inc(id);\r\n break;\r\n end;\r\n end;\r\n\r\n until found;\r\nend;\r\n\r\nprocedure TPageControl.SetActivePage(const Value: TTabsheet);\r\nvar\r\n i: integer;\r\nbegin\r\n for i := 0 to ControlCount - 1 do\r\n begin\r\n if Controls[i] = Value then\r\n begin\r\n ActivePageINdex := i;\r\n break;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TPageControl.SetActivePageIndex(const Value: integer);\r\nbegin\r\n if (Value >= 0) and (Value < PageCount) then\r\n TabIndex := Value;\r\nend;\r\n\r\n\r\nprocedure TPageControl.SetDisabledTextColor(const Value: TColor);\r\nbegin\r\n if (FDisabledTextColor <> Value) then\r\n begin\r\n FDisabledTextColor := Value;\r\n DoUpdateList;\r\n end;\r\nend;\r\n\r\nprocedure TPageControl.SetItems(AItems: TStringList);\r\nbegin\r\n FItems.Assign(AItems);\r\nend;\r\n\r\nprocedure TPageControl.SetParent(AValue: TControl);\r\nvar\r\n ts: TTabSheet;\r\n frm: TCustomForm;\r\nbegin\r\n inherited;\r\n\r\n if FDesignTime then\r\n begin\r\n frm := GetParentForm(Self);\r\n\r\n FDesignTime := false;\r\n ts := TWebTabSheet.Create(frm);\r\n ts.Parent := Self;\r\n ts.Caption := 'Page1';\r\n ts.Name := GetUniqueName;\r\n\r\n ts := TWebTabSheet.Create(frm);\r\n ts.Parent := Self;\r\n ts.Caption := 'Page2';\r\n ts.Name := GetUniqueName;\r\n end;\r\n\r\n DoUpdateList;\r\nend;\r\n\r\nfunction TPageControl.HandleDoChange(Event: TJSMouseEvent): Boolean;\r\nbegin\r\n if FPrevTabIndex <> FTabIndex then\r\n begin\r\n FPrevTabIndex := FTabIndex;\r\n if Assigned(OnChange) then\r\n OnChange(Self);\r\n end;\r\n Result := True;\r\nend;\r\n\r\nprocedure TPageControl.Loaded;\r\nbegin\r\n inherited;\r\n DoUpdateList;\r\n TabIndex := FTabIndex;\r\n FOldVisible := Visible;\r\nend;\r\n\r\nprocedure TPageControl.SetTabIndex(AIndex: integer);\r\nbegin\r\n if (csLoading in ComponentState) then\r\n FTabIndex := AIndex;\r\n\r\n if (FTabIndex <> AIndex) and (AIndex >= 0) and (AIndex < PageCount) then\r\n begin\r\n FTabIndex := AIndex;\r\n FPrevTabIndex := FTabIndex;\r\n DoUpdateList;\r\n end;\r\nend;\r\n\r\nprocedure TPageControl.UpdateElement;\r\nbegin\r\n inherited;\r\nend;\r\n\r\nprocedure TPageControl.VisibleChanged;\r\nbegin\r\n inherited;\r\n if FOldVisible <> Visible then\r\n begin\r\n DoUpdateList;\r\n FOldVisible := Visible;\r\n end;\r\nend;\r\n\r\nprocedure TPageControl.SetSelectedColor(const AValue: TColor);\r\nbegin\r\n if FSelectedColor <> AValue then\r\n begin\r\n FSelectedColor := AValue;\r\n DoUpdateList;\r\n end;\r\nend;\r\n\r\nprocedure TPageControl.SetSelectedTextColor(const Value: TColor);\r\nbegin\r\n if FSelectedTextColor <> Value then\r\n begin\r\n FSelectedTextColor := Value;\r\n DoUpdateList;\r\n end;\r\nend;\r\n\r\nprocedure TPageControl.SetShowTabs(const Value: boolean);\r\nbegin\r\n if FShowTabs <> Value then\r\n begin\r\n FShowTabs := Value;\r\n DoUpdateList;\r\n end;\r\nend;\r\n\r\nprocedure TPageControl.DoUpdateList;\r\nvar\r\n i, vistabindex: integer;\r\n ena: TObject;\r\n s, cid: string;\r\n shidden: string;\r\n n: TJSNode;\r\n ul, li, a: TJSElement;\r\n tabs: TStringList;\r\n tab: TTabSheet;\r\n LLabel: TJSHTMLElement;\r\n LHasLabel: boolean;\r\n matclr,icn,noptr,inactive: string;\r\n th: integer;\r\n\r\nbegin\r\n if not Assigned(Container) then\r\n Exit;\r\n\r\n if not Assigned(ElementHandle) or IsUpdating then\r\n Exit;\r\n\r\n tab := nil;\r\n\r\n if ControlCount > 0 then\r\n begin\r\n BorderStyle := bsNone;\r\n LLabel := TJSHTMLElement(ElementHandle.firstChild);\r\n LHasLabel := Assigned(LLabel) and (LLabel.tagName = 'DIV') and (LLabel.getAttribute('data-design') = '1');\r\n if LHasLabel then\r\n begin\r\n ElementHandle.removeChild(ElementHandle.firstChild);\r\n ElementHandle.style.removeProperty('border');\r\n end;\r\n\r\n tabs := TStringList.Create;\r\n\r\n shidden := '{#hidden#}';\r\n\r\n vistabindex := TabIndex;\r\n\r\n for i := 0 to ControlCount - 1 do\r\n begin\r\n if (csDestroying in Controls[i].ComponentState) and (i <= TabIndex) then\r\n inc(vistabindex);\r\n\r\n if (Controls[i] is TTabSheet) and not (csDestroying in Controls[i].ComponentState) then\r\n begin\r\n tab := TTabSheet(Controls[i]);\r\n\r\n icn := '';\r\n\r\n if tab.TabEnabled then\r\n ena := Self\r\n else\r\n ena := nil;\r\n\r\n if tab.TabVisible then\r\n begin\r\n if tab.MaterialGlyph <> '' then\r\n begin\r\n matclr := '';\r\n inactive := '';\r\n\r\n if not tab.Enabled then\r\n inactive := ' md-light md-inactive';\r\n\r\n if tab.FMaterialGlyphColor <> clNone then\r\n matclr := ';color:'+ColorToHTML(tab.MaterialGlyphColor);\r\n noptr := 'pointer-events:none';\r\n\r\n icn := '' + tab.MaterialGlyph + ' ';\r\n end;\r\n tabs.AddObject(icn + tab.Caption, ena);\r\n end\r\n else\r\n tabs.AddObject(shidden, ena);\r\n\r\n tab.BeginUpdate;\r\n\r\n if (vistabindex = i) then\r\n tab.Align := alClient\r\n else\r\n tab.Align := alNone;\r\n\r\n tab.AlignWithMargins := True;\r\n tab.Margins.Left := 0;\r\n tab.Margins.Right := 0;\r\n tab.Margins.Bottom := 0;\r\n// tab.BorderStyle := bsSingle;\r\n tab.Visible := (vistabindex = i);\r\n\r\n tab.ResetUpdate;\r\n\r\n // change order of tabs to bring visible tab to front\r\n if (vistabindex = i) then\r\n tab.ElementHandle.parentElement.insertBefore(tab.ElementHandle, nil {tab.ElementHandle.parentElement.firstChild});\r\n\r\n tab.GetElementHandle.style.setProperty('background-color', ColorToHtml(tab.Color));\r\n end;\r\n end;\r\n\r\n cid := GetID;\r\n if cid = '' then\r\n cid := Name;\r\n\r\n for i := 0 to Container.childNodes.length - 1 do\r\n begin\r\n n := Container.childNodes[i];\r\n if Assigned(n) and (TJSElement(n)['id'] = cid + '_UL') then\r\n Container.removeChild(n);\r\n end;\r\n\r\n Container['class'] := '';\r\n\r\n if not Enabled then\r\n ElementHandle.style.setProperty('pointer-events', 'none')\r\n else\r\n ElementHandle.style.setProperty('pointer-events', 'auto');\r\n\r\n if ShowTabs then\r\n begin\r\n ul := document.createElement('UL');\r\n ul['class'] := ElementClassName;\r\n ul['id'] := cid + '_UL';\r\n\r\n if ElementClassName <> '' then\r\n ul['role'] := 'tablist'\r\n else\r\n begin\r\n (TJSHTMLElement(ul)).style.setProperty('list-style-type', 'none');\r\n (TJSHTMLElement(ul)).style.setProperty('margin', '0');\r\n (TJSHTMLElement(ul)).style.setProperty('padding', '0');\r\n (TJSHTMLElement(ul)).style.setProperty('display', 'inline-block')\r\n end;\r\n\r\n Container.appendChild(ul);\r\n end;\r\n\r\n for i := 0 to tabs.Count - 1 do\r\n begin\r\n s := tabs[i];\r\n if (s <> shidden) and ShowTabs then\r\n begin\r\n if s = '' then\r\n s := 'tab' + IntToStr(i);\r\n\r\n li := document.createElement('LI');\r\n\r\n if ElementClassName <> '' then\r\n begin\r\n if ElementTabItemClassName = '' then\r\n li['class'] := 'nav-item'\r\n else\r\n li['class'] := ElementTabItemClassName;\r\n end\r\n else\r\n begin\r\n (TJSHTMLElement(li)).style.setProperty('float', 'left');\r\n if BorderStyle <> bsNone then\r\n (TJSHTMLElement(li)).style.setProperty('border-bottom', '1px solid lightgray');\r\n end;\r\n\r\n if (tabs.Objects[i] = nil) then\r\n begin\r\n (TJSHTMLElement(li)).style.setProperty('pointer-events', 'none');\r\n (TJSHTMLElement(li)).style.setProperty('color', ColorToHTML(DisabledTextColor));\r\n end;\r\n\r\n if DragMode = dmAutomatic then\r\n li['draggable'] := 'true';\r\n\r\n SetHTMLElementFont(TJSHTMLElement(li), Font, not ((ElementClassName = '') and (ElementFont = efProperty)));\r\n\r\n ul.appendChild(li);\r\n\r\n if not Enabled then\r\n a := document.createElement('SPAN')\r\n else\r\n begin\r\n a := document.createElement('A');\r\n if UseHash then\r\n a['href'] := '#' + s;\r\n end;\r\n\r\n if DragMode = dmAutomatic then\r\n a['draggable'] := 'false';\r\n\r\n a.innerHTML := s;\r\n a['id'] := cid + '_' + IntToStr(i);\r\n\r\n if ElementClassName <> '' then\r\n begin\r\n if TabIndex = i then\r\n begin\r\n if ElementTabActiveClassName = '' then\r\n a['class'] := 'nav-link active'\r\n else\r\n a['class'] := ElementTabActiveClassName;\r\n end\r\n else\r\n begin\r\n if ElementTabClassName = '' then\r\n a['class'] := 'nav-link'\r\n else\r\n a['class'] := ElementTabClassName;\r\n end;\r\n a['role'] := 'tab';\r\n\r\n a['data-toggle'] := 'tab';\r\n a['aria-controls'] := s;\r\n\r\n if TabIndex = i then\r\n a['aria-selected'] := 'true'\r\n else\r\n a['aria-selected'] := 'false';\r\n end\r\n else\r\n begin\r\n (TJSHTMLElement(a)).style.setProperty('display', 'block');\r\n (TJSHTMLElement(a)).style.setProperty('text-align', 'center');\r\n (TJSHTMLElement(a)).style.setProperty('padding', '3px 15px');\r\n (TJSHTMLElement(a)).style.setProperty('text-decoration', 'none');\r\n (TJSHTMLElement(a)).style.setProperty('min-width', '50px');\r\n\r\n (TJSHTMLElement(a)).style.setProperty('color', 'inherit');\r\n (TJSHTMLElement(a)).style.setProperty('font-family', 'inherit');\r\n (TJSHTMLElement(a)).style.setProperty('font-style', 'inherit');\r\n (TJSHTMLElement(a)).style.setProperty('font-size', 'inherit');\r\n\r\n// if not enabled then\r\n// (TJSHTMLElement(a)).style.setProperty('pointer-events', 'none');\r\n\r\n if TabIndex = i then\r\n begin\r\n if SelectedColor <> clNone then\r\n (TJSHTMLElement(a)).style.setProperty('background-color', ColorToHtml(SelectedColor));\r\n if SelectedTextColor <> clNone then\r\n (TJSHTMLElement(a)).style.setProperty('color', ColorToHtml(SelectedTextColor));\r\n end;\r\n end;\r\n\r\n li.appendChild(a);\r\n end;\r\n end;\r\n\r\n for i := 0 to ControlCount - 1 do\r\n begin\r\n if Controls[i] is TTabSheet then\r\n begin\r\n if ShowTabs then\r\n th := Round((TJSHTMLElement(ul)).offsetHeight) - 1\r\n else\r\n th := 0;\r\n\r\n TTabSheet(Controls[i]).Margins.Top := th;\r\n TTabSheet(Controls[i]).ElementHandle.style.setProperty('white-space', '');\r\n end;\r\n end;\r\n\r\n tabs.Free;\r\n end\r\n else\r\n begin\r\n if not IsLinked then\r\n begin\r\n ClearChildElements;\r\n if (csDesigning in ComponentState) then\r\n begin\r\n RenderDesigning('TWebPageControl', Container, Self, True);\r\n end;\r\n end;\r\n end;\r\n\r\n DoUpdateResize;\r\n\r\n if Assigned(tab) then\r\n begin\r\n tab.Align := alNone;\r\n tab.Align := alClient;\r\n end;\r\n\r\n UpdateElement;\r\n\r\n if not IsLinked and (ControlCount = 0) then\r\n begin\r\n ElementHandle.style.setProperty('border','1px solid lightgray');\r\n end;\r\nend;\r\n\r\nprocedure TPageControl.DoUpdateResize;\r\nvar\r\n i, vistabindex: integer;\r\nbegin\r\n // hide all\r\n for i := 0 to ControlCount - 1 do\r\n begin\r\n if Controls[i] is TTabSheet then\r\n Controls[i].Visible := false;\r\n end;\r\n\r\n // cause client alignment for all\r\n for i := 0 to ControlCount - 1 do\r\n begin\r\n if Controls[i] is TTabSheet then\r\n begin\r\n Controls[i].Visible := true;\r\n Controls[i].Align := alNone;\r\n Controls[i].Align := alClient;\r\n Controls[i].Visible := false;\r\n end;\r\n end;\r\n\r\n vistabindex := TabIndex;\r\n\r\n // make active tab visible\r\n for i := 0 to ControlCount - 1 do\r\n begin\r\n if (csDestroying in Controls[i].ComponentState) and (i <= TabIndex) then\r\n inc(vistabindex);\r\n\r\n if Controls[i] is TTabSheet then\r\n begin\r\n Controls[i].Visible := (vistabindex = i);\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TPageControl.EnableDrag;\r\n procedure AddDraggableAttribute(AElement: TJSElement);\r\n var\r\n I: Integer;\r\n tn: string;\r\n begin\r\n for I := 0 to AElement.children.length - 1 do\r\n begin\r\n tn := TJSElement(AElement.children[I]).tagName;\r\n if tn = 'LI' then\r\n begin\r\n TJSElement(AElement.children[I]).Attrs['draggable'] := 'true';\r\n AddDraggableAttribute(TJSElement(AElement.children[I]));\r\n end\r\n else if tn = 'A' then\r\n TJSElement(AElement.children[I]).Attrs['draggable'] := 'false'\r\n else if tn = 'UL' then\r\n AddDraggableAttribute(TJSElement(AElement.children[I]));\r\n end;\r\n end;\r\nbegin\r\n if not Assigned(Container) then\r\n Exit;\r\n\r\n AddDraggableAttribute(Container);\r\nend;\r\n\r\nprocedure TPageControl.EndUpdate;\r\nbegin\r\n inherited;\r\n DoUpdateList;\r\nend;\r\n\r\nfunction TPageControl.HandleDoClick(Event: TJSMouseEvent): Boolean;\r\nvar\r\n sid, cid: string;\r\n i: integer;\r\n el: TJSElement;\r\n ts: TTabSheet;\r\n\r\nbegin\r\n el := Event.targetElement;\r\n\r\n sid := '';\r\n if el.hasAttribute('id') then\r\n sid := el.getAttribute('id');\r\n\r\n if (sid <> '') then\r\n begin\r\n cid := GetID;\r\n if cid = '' then\r\n cid := Name;\r\n\r\n sid := StringReplace(sid, cid + '_', '', []);\r\n if TryStrToInt(sid,i) then\r\n begin\r\n if FTabIndex <> -1 then\r\n begin\r\n ts := GetPage(FTabIndex);\r\n if Assigned(ts) and Assigned(ts.OnHide) then\r\n ts.OnHide(ts);\r\n end;\r\n\r\n FTabIndex := i;\r\n\r\n DoUpdateList;\r\n\r\n if FTabIndex <> -1 then\r\n begin\r\n ts := GetPage(FTabIndex);\r\n if Assigned(ts) and Assigned(ts.OnShow) then\r\n ts.OnShow(ts);\r\n end;\r\n\r\n end;\r\n inherited;\r\n end;\r\n\r\n Result := true;\r\nend;\r\n\r\nfunction TPageControl.HandleDoItemMouseOut(Event: TJSMouseEvent): Boolean;\r\nvar\r\n el: TJSHTMLElement;\r\nbegin\r\n Result := true;\r\n //Event.stopPropagation;\r\n\r\n el := TJSHTMLElement(Event.relatedTarget);\r\n if Assigned(el) then\r\n begin\r\n if el.nodeName = 'A' then\r\n el.style.setProperty('background-color', '');\r\n end\r\nend;\r\n\r\nfunction TPageControl.HandleDoItemMouseOver(Event: TJSMouseEvent): Boolean;\r\nvar\r\n el: TJSHTMLElement;\r\nbegin\r\n Result := true;\r\n //Event.stopPropagation;\r\n\r\n el := TJSHTMLElement(Event.relatedTarget);\r\n if Assigned(el) then\r\n begin\r\n if el.nodeName = 'A' then\r\n el.style.setProperty('background-color', 'lightgray');\r\n end\r\nend;\r\n\r\nprocedure TPageControl.ItemsChanged(Sender: TObject);\r\nvar\r\n i: integer;\r\n ts: TTabSheet;\r\n\r\nbegin\r\n if (PageCount = 0) and (Items.Count > 0) and (ElementHandle.childElementCount > 0) then\r\n begin\r\n ElementHandle.removeChild(ElementHandle.firstChild);\r\n end;\r\n\r\n for i := 0 to FItems.Count - 1 do\r\n begin\r\n if PageCount <= i then\r\n begin\r\n ts := TTabSheet.Create(Owner);\r\n ts.Parent := Self;\r\n ts.Name := Name + 'sheet' + inttostr(i + 1);\r\n end;\r\n Pages[i].Caption := FItems[i];\r\n end;\r\n\r\n for i := PageCount - 1 downto 0 do\r\n begin\r\n if i >= Items.Count then\r\n begin\r\n ts := Pages[i];\r\n ts.Free;\r\n end;\r\n end;\r\n\r\n DoUpdateList;\r\nend;\r\n\r\n{ TTabSheet }\r\n\r\nprocedure TTabSheet.CreateInitialize;\r\nbegin\r\n inherited;\r\n EnablePropagation := true;\r\n ControlStyle := ControlStyle + [csAcceptsControls];\r\n Color := clWhite;\r\n TabVisible := True;\r\n TabEnabled := True;\r\n ShowCaption := False;\r\n FPosUpdating := False;\r\n FMaterialGlyphSize := 18;\r\n FMaterialGlyphType := mgNormal;\r\n FMaterialGlyphColor := clNone;\r\nend;\r\n\r\ndestructor TTabSheet.Destroy;\r\nvar\r\n p: TPageControl;\r\nbegin\r\n p := nil;\r\n\r\n if Assigned(Parent) then\r\n begin\r\n if Parent is TPageControl then\r\n begin\r\n p := (Parent as TPageControl);\r\n end;\r\n end;\r\n\r\n inherited;\r\n\r\n if Assigned(p) then\r\n begin\r\n p.DoUpdateList;\r\n p.TabIndex := 0;\r\n end;\r\nend;\r\n\r\nprocedure TTabSheet.EndUpdate;\r\nbegin\r\n inherited;\r\n if Assigned(Parent) then\r\n begin\r\n if Parent is TPageControl then\r\n (Parent as TPageControl).DoUpdateList;\r\n end;\r\nend;\r\n\r\nfunction TTabSheet.GetPageIndex: integer;\r\nvar\r\n i,j: integer;\r\n FPageControl: TPageControl;\r\nbegin\r\n Result := -1;\r\n\r\n if (Parent is TPageControl) then\r\n begin\r\n FPageControl := (Parent as TPageControl);\r\n\r\n j := 0;\r\n for i := 0 to FPageControl.ControlCount - 1 do\r\n begin\r\n if FPageControl.Controls[i] is TTabSheet then\r\n begin\r\n if FPageControl.Controls[i] = Self then\r\n begin\r\n Result := j;\r\n end\r\n else\r\n inc(j);\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TTabSheet.ResetUpdate;\r\nbegin\r\n inherited EndUpdate;\r\nend;\r\n\r\nprocedure TTabSheet.SetBounds(X, Y, AWidth, AHeight: Integer);\r\nbegin\r\n inherited;\r\n\r\n if (Parent is TPageControl) and not FPosUpdating then\r\n begin\r\n FPosupdating := true;\r\n (Parent as TPageControl).DoUpdateList;\r\n FPosupdating := false;\r\n end;\r\nend;\r\n\r\nprocedure TTabSheet.SetCaption(const AValue: string);\r\nbegin\r\n inherited;\r\n\r\n if Assigned(Parent) then\r\n begin\r\n if Parent is TPageControl then\r\n (Parent as TPageControl).DoUpdateList;\r\n end;\r\nend;\r\n\r\nprocedure TTabSheet.SetMaterialGlyph(const Value: TMaterialGlyph);\r\nbegin\r\n if (FMaterialGlyph <> Value) then\r\n begin\r\n FMaterialGlyph := Value;\r\n if Parent is TPageControl then\r\n (Parent as TPageControl).DoUpdateList;\r\n end;\r\nend;\r\n\r\nprocedure TTabSheet.SetMaterialGlyphColor(const Value: TColor);\r\nbegin\r\n if (FMaterialGlyphColor <> Value) then\r\n begin\r\n FMaterialGlyphColor := Value;\r\n if Parent is TPageControl then\r\n (Parent as TPageControl).DoUpdateList;\r\n end;\r\nend;\r\n\r\nprocedure TTabSheet.SetMaterialGlyphSize(const Value: integer);\r\nbegin\r\n if (FMaterialGlyphSize <> Value) then\r\n begin\r\n FMaterialGlyphSize := Value;\r\n if Parent is TPageControl then\r\n (Parent as TPageControl).DoUpdateList;\r\n end;\r\nend;\r\n\r\nprocedure TTabSheet.SetMaterialGlyphType(const Value: TMaterialGlyphType);\r\nbegin\r\n if (FMaterialGlyphType <> Value) then\r\n begin\r\n FMaterialGlyphType := Value;\r\n if Parent is TPageControl then\r\n (Parent as TPageControl).DoUpdateList;\r\n end;\r\nend;\r\n\r\nprocedure TTabSheet.SetPageIndex(const Value: integer);\r\nbegin\r\n //\r\nend;\r\n\r\nprocedure TTabSheet.SetParent(AValue: TControl);\r\nbegin\r\n if (AValue is TTabSheet) then\r\n begin\r\n if (AValue as TTabSheet).Parent is TPageControl then\r\n AValue := (AValue as TTabSheet).Parent;\r\n end;\r\n\r\n inherited SetParent(AValue);\r\n\r\n if Assigned(Parent) then\r\n begin\r\n if Parent is TPageControl then\r\n begin\r\n (Parent as TPageControl).DoUpdateList;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TTabSheet.SetTabVisible(const Value: Boolean);\r\nbegin\r\n if FTabVisible <> Value then\r\n begin\r\n FTabVisible := Value;\r\n\r\n if Assigned(Parent) then\r\n begin\r\n if Parent is TPageControl then\r\n (Parent as TPageControl).DoUpdateList;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TTabSheet.SetTabEnabled(const Value: Boolean);\r\nbegin\r\n if FTabEnabled <> Value then\r\n begin\r\n FTabEnabled := Value;\r\n\r\n if Assigned(Parent) then\r\n begin\r\n if Parent is TPageControl then\r\n (Parent as TPageControl).DoUpdateList;\r\n end;\r\n end;\r\nend;\r\n\r\n\r\n{ TProgressBar }\r\n\r\nprocedure TProgressBar.CreateInitialize;\r\nbegin\r\n inherited;\r\n FMax := 100;\r\n FMin := 0;\r\n FPosition := 0;\r\n FStyle := pbstNormal;\r\n FValueColor := clNone;\r\nend;\r\n\r\nprocedure TProgressBar.CreateProgressElement(AElement: TJSElement);\r\nvar\r\n d: TJSElement;\r\nbegin\r\n while Assigned(AElement.firstChild) do\r\n AElement.removeChild(AElement.firstChild);\r\n\r\n if FStyle = pbstDiv then\r\n begin\r\n d := document.createElement('DIV');\r\n d.appendChild(document.createElement('DIV'));\r\n end\r\n else\r\n d := document.createElement('PROGRESS');\r\n\r\n AElement.appendChild(d);\r\nend;\r\n\r\nprocedure TProgressBar.AfterLoadDFMValues;\r\nbegin\r\n inherited;\r\n DoUpdate;\r\nend;\r\n\r\nfunction TProgressBar.CreateElement: TJSElement;\r\nbegin\r\n Result := document.createElement('SPAN');\r\n CreateProgressElement(Result);\r\nend;\r\n\r\nprocedure TProgressBar.SetElementBarClassName(const Value: string);\r\nbegin\r\n FElementBarClassName := Value;\r\n DoUpdate;\r\nend;\r\n\r\nprocedure TProgressBar.SetMax(AValue: integer);\r\nbegin\r\n FMax := AValue;\r\n DoUpdate;\r\nend;\r\n\r\nprocedure TProgressBar.SetMin(AValue: integer);\r\nbegin\r\n FMin := AValue;\r\n DoUpdate;\r\nend;\r\n\r\nprocedure TProgressBar.DoUpdate;\r\nvar\r\n pvalue: integer;\r\n maxvalue: integer;\r\n el: TJSHTMLElement;\r\n pos: integer;\r\nbegin\r\n if not Assigned(Container) then\r\n Exit;\r\n\r\n if FMax <> FMin then\r\n pos := Round((FPosition - Min) / (Max - Min) * 100)\r\n else\r\n pos := 0;\r\n\r\n //\r\n if isLinked then\r\n begin\r\n if ElementHandle.TagName= 'DIV' then\r\n begin\r\n if ElementHandle['role'] = 'progressbar' then\r\n ElementHandle.style.setProperty('width',inttostr(pos)+'%')\r\n else\r\n ElementHandle.innerHTML := inttostr(pos)\r\n end\r\n else\r\n ElementHandle.setAttribute('value',inttostr(pos));\r\n\r\n Exit;\r\n end;\r\n\r\n\r\n if Style = pbstDiv then\r\n begin\r\n el := TJSHTMLElement(ElementHandle.firstChild);\r\n\r\n if ElementClassName <> '' then\r\n begin\r\n el.setAttribute('class',ElementClassName);\r\n ElementHandle.removeAttribute('class');\r\n end;\r\n\r\n el.style.setProperty('height',inttostr(Height)+'px');\r\n\r\n if WidthStyle = ssAbsolute then\r\n el.style.setProperty('width',inttostr(Width)+'px');\r\n\r\n el := TJSHTMLElement(el.firstChild);\r\n el.style.setProperty('background-color','#3397FD');\r\n\r\n if ElementBarClassName <> '' then\r\n el.setAttribute('class',ElementBarClassName);\r\n\r\n el.setAttribute('role','progressbar');\r\n el.style.setProperty('width',inttostr(pos)+'%');\r\n\r\n case Value of\r\n pbvPercentage: el.innerHTML := inttostr(pos)+'%';\r\n pbvAbsolute: el.innerHTML := inttostr(Position);\r\n pbvNone: el.innerHTML := ' ';\r\n end;\r\n end\r\n else\r\n begin\r\n el := TJSHTMLElement(ElementHandle.firstChild);\r\n el.style.setProperty('width','100%');\r\n el.style.setProperty('height','100%');\r\n pvalue := FPosition - FMin;\r\n maxvalue := FMax - FMin;\r\n el['max'] := IntToStr(maxvalue);\r\n\r\n if Style = pbstNormal then\r\n el['value'] := IntToStr(pvalue)\r\n else\r\n el.removeAttribute('value');\r\n end;\r\nend;\r\n\r\nprocedure TProgressBar.SetPosition(AValue: integer);\r\nbegin\r\n if (AValue >= Min) and (AValue <= Max) then\r\n begin\r\n FPosition := AValue;\r\n DoUpdate;\r\n end;\r\nend;\r\n\r\nprocedure TProgressBar.SetStyle(const Value: TProgressBarStyle);\r\nbegin\r\n if FStyle <> Value then\r\n begin\r\n FStyle := Value;\r\n\r\n if Assigned(ElementHandle) then\r\n begin\r\n CreateProgressElement(ElementHandle);\r\n DoUpdate;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TProgressBar.SetValue(const Value: TProgressBarValue);\r\nbegin\r\n FValue := Value;\r\n DoUpdate;\r\nend;\r\n\r\nprocedure TProgressBar.SetValueColor(const Value: TColor);\r\nbegin\r\n if (FValueColor <> Value) then\r\n begin\r\n FValueColor := Value;\r\n UpdateElementVisual;\r\n end;\r\nend;\r\n\r\nprocedure TProgressBar.UpdateElementVisual;\r\nvar\r\n el: TJSHTMLElement;\r\n\r\nbegin\r\n inherited;\r\n if (ValueColor <> clNone) then\r\n begin\r\n if Style = pbstDiv then\r\n begin\r\n el := TJSHTMLElement(ElementHandle.firstChild);\r\n el := TJSHTMLElement(el.firstChild);\r\n el.style.setProperty('background-color',ColorToHTML(ValueColor));\r\n end\r\n else\r\n begin\r\n el := TJSHTMLElement(ElementHandle.firstChild);\r\n el.style.setProperty('accent-color',ColorToHTML(ValueColor));\r\n end;\r\n end;\r\nend;\r\n\r\n{ TWebTreeView }\r\n\r\nprocedure TTreeView.BeginUpdate;\r\nbegin\r\n inherited;\r\nend;\r\n\r\nprocedure TTreeView.ClickCheck(ANode: TTreeNode; AState: boolean);\r\nbegin\r\n if Assigned(OnClickCheckBox) then\r\n OnClickCheckBox(Self, ANode, AState);\r\nend;\r\n\r\nprocedure TTreeView.ClickRadio(ANode: TTreeNode; AState: boolean);\r\nbegin\r\n if Assigned(OnClickRadio) then\r\n OnClickRadio(Self, ANode, AState);\r\nend;\r\n\r\nfunction TTreeView.CreateElement: TJSElement;\r\nvar\r\n tn: TTreeNode;\r\nbegin\r\n if (csDesigning in ComponentState) then\r\n begin\r\n BeginUpdate;\r\n\r\n tn := Items.Add(' Item 1');\r\n Items.AddChild(tn,'Child Item 1');\r\n\r\n tn := Items.Add(' Item 2');\r\n Items.AddChild(tn,'Child Item 2');\r\n\r\n tn := Items.Add(' Item 3');\r\n Items.AddChild(tn,'Child Item 3');\r\n\r\n EndUpdate;\r\n end;\r\n\r\n Result := document.createElement('DIV');\r\nend;\r\n\r\nprocedure TTreeView.CreateInitialize;\r\nvar\r\n css: string;\r\nbegin\r\n inherited;\r\n FSelected := nil;\r\n FItems := CreateNodes;\r\n FItems.OnChange := DoNodesChanged;\r\n FItems.OnExpandedChange := DoExpandedChanged;\r\n TTreeNodesEx(FItems).OnSelectionChange := DoSelectionChanged;\r\n\r\n // remove default bullets\r\n css := '.TVUL {' +\r\n ' list-style-type: none;' +\r\n ' margin: 0;' +\r\n ' padding-left: 15px;' +\r\n '}' + #13#10 +\r\n\r\n ' .TVCARET {' +\r\n ' cursor: pointer;' +\r\n ' user-select: none;' +\r\n '}' + #13#10 +\r\n\r\n '.TVCARET::before {' +\r\n 'content: \"\\25B6\";' +\r\n// 'color: black;' +\r\n 'display: inline-block;' +\r\n 'margin-right: 6px;' +\r\n '}' + #13#10 +\r\n\r\n '.TVCARET-DOWN::before {'+\r\n 'transform: rotate(90deg);'+\r\n '}'+ #13#10 +\r\n\r\n '.TVNESTED {' +\r\n ' display: none;' +\r\n '}' + #13#10 +\r\n\r\n '.TVACTIVE {' +\r\n ' display: block;' +\r\n '}' + #13#10 +\r\n\r\n '.TVNODE {' +\r\n ' padding: 3px;'+\r\n ' display: inline-block;' +\r\n '}' + #13#10 +\r\n\r\n '.TVNOCURSOR {' +\r\n ' cursor: initial;'+\r\n '}' + #13#10 +\r\n\r\n '.TVSELECTED {' +\r\n ' background-color: #0000ff;' +\r\n ' color: #ffffff;' +\r\n '}';\r\n\r\n AddControlStyle(css);\r\n\r\n if (csDesigning in ComponentState) then\r\n begin\r\n Width := 200;\r\n Height := 200;\r\n end;\r\nend;\r\n\r\nfunction TTreeView.CreateNodes: TTreeNodes;\r\nbegin\r\n Result := TTreeNodes.Create(Self);\r\nend;\r\n\r\ndestructor TTreeView.Destroy;\r\nbegin\r\n FItems.Free;\r\n inherited;\r\nend;\r\n\r\nprocedure TTreeView.DisableDrag;\r\n procedure RemoveDraggableAttribute(AElement: TJSElement);\r\n var\r\n I: Integer;\r\n begin\r\n for I := 0 to AElement.children.length - 1 do\r\n begin\r\n if TJSElement(AElement.children[I]).tagName = 'LI' then\r\n begin\r\n TJSElement(AElement.children[I]).removeAttribute('draggable');\r\n RemoveDraggableAttribute(TJSElement(AElement.children[I]));\r\n end\r\n else\r\n RemoveDraggableAttribute(TJSElement(AElement.children[I]));\r\n end;\r\n end;\r\nbegin\r\n if not Assigned(Container) then\r\n Exit;\r\n\r\n RemoveDraggableAttribute(Container);\r\nend;\r\n\r\nprocedure TTreeView.DoChangeSelection(NewNode: TTreeNode);\r\nvar\r\n Allow: boolean;\r\nbegin\r\n Allow := true;\r\n\r\n if Assigned(OnChanging) and (NewNode <> Selected) then\r\n OnChanging(Self, NewNode, Allow);\r\n\r\n if Allow and (Selected <> NewNode) then\r\n begin\r\n Selected := NewNode;\r\n if Assigned(OnChange) then\r\n OnChange(Self, NewNode);\r\n end;\r\nend;\r\n\r\nprocedure TTreeView.DoExpandedChanged(Sender: TObject; ANode: TTreeNode);\r\nvar\r\n el, su: TJSElement;\r\n i: integer;\r\nbegin\r\n if ANode.Count > 0 then\r\n begin\r\n el := GetNodeElement(ANode);\r\n\r\n if Assigned(el) and Assigned(el.parentElement) and Assigned(el.parentElement.parentElement) then\r\n begin\r\n su := el.parentElement.parentElement.querySelector('.TVNESTED');\r\n if Assigned(su) then\r\n begin\r\n if ANode.Expanded then\r\n su.classList.add('TVACTIVE')\r\n else\r\n su.classList.remove('TVACTIVE');\r\n\r\n\r\n// su.classList.toggle('TVACTIVE');\r\n el.parentElement.classList.toggle('TVCARET-DOWN');\r\n end;\r\n end;\r\n\r\n if AutoExpand then\r\n begin\r\n for i := 0 to ANode.Count - 1 do\r\n begin\r\n if ANode.Item[i].Count > 0 then\r\n begin\r\n ANode.Item[i].Expanded := ANode.Expanded;\r\n end;\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TTreeView.DoNodesChanged(Sender: TObject);\r\nbegin\r\n //\r\nend;\r\n\r\nprocedure TTreeView.DoRenderNode(ANode: TTreeNode; AElement: TJSHTMLElement);\r\nvar\r\n LElementRec: TJSHTMLElementRecord;\r\nbegin\r\n if Assigned(OnRenderNode) then\r\n begin\r\n LElementRec.element := AElement;\r\n OnRenderNode(Self, ANode, LElementRec);\r\n end;\r\nend;\r\n\r\nprocedure TTreeView.DoSelectionChanged(Sender: TObject; ANode: TTreeNode;\r\n IsSelected: boolean);\r\nbegin\r\n if IsSelected then\r\n Selected := ANode\r\n else\r\n Selected := nil;\r\nend;\r\n\r\nprocedure TTreeView.EnableDrag;\r\n procedure AddDraggableAttribute(AElement: TJSElement);\r\n var\r\n I: Integer;\r\n begin\r\n for I := 0 to AElement.children.length - 1 do\r\n begin\r\n if TJSElement(AElement.children[I]).tagName = 'LI' then\r\n begin\r\n TJSElement(AElement.children[I]).Attrs['draggable'] := 'true';\r\n AddDraggableAttribute(TJSElement(AElement.children[I]));\r\n end\r\n else\r\n AddDraggableAttribute(TJSElement(AElement.children[I]));\r\n end;\r\n end;\r\nbegin\r\n if not Assigned(Container) then\r\n Exit;\r\n\r\n AddDraggableAttribute(Container);\r\nend;\r\n\r\nprocedure TTreeView.EndUpdate;\r\nbegin\r\n inherited;\r\n\r\n if not IsUpdating then\r\n begin\r\n Selected := nil;\r\n RenderNodes;\r\n end;\r\nend;\r\n\r\nfunction TTreeView.FormPrefix: string;\r\nvar\r\n frm: TCustomForm;\r\nbegin\r\n Result := '';\r\n frm := GetParentForm(Self);\r\n if Assigned(frm) then\r\n Result := frm.ClassName;\r\nend;\r\n\r\nprocedure TTreeView.FullExpand;\r\nvar\r\n i: integer;\r\nbegin\r\n for i := 0 to Items.SiblingCount - 1 do\r\n Items.Sibling[i].Expand(true);\r\nend;\r\n\r\nprocedure TTreeView.FullCollapse;\r\nvar\r\n i: integer;\r\nbegin\r\n for i := 0 to Items.SiblingCount - 1 do\r\n Items.Sibling[i].Collapse(true);\r\nend;\r\n\r\nfunction TTreeView.GetNodeElement(ANode: TTreeNode): TJSHTMLElement;\r\nvar\r\n s: string;\r\n tn: TTreeNode;\r\nbegin\r\n Result := nil;\r\n tn := ANode;\r\n\r\n if not Assigned(tn) then\r\n Exit;\r\n\r\n s := '';\r\n\r\n // generate HTML element ID\r\n repeat\r\n if s = '' then\r\n s := IntToStr(tn.Index)\r\n else\r\n s := IntTostr(tn.Index) + '_' + s;\r\n\r\n tn := tn.Parent;\r\n\r\n// until (tn = nil);\r\n until (not Assigned(tn));\r\n\r\n s := FormPrefix + Name + '_' + s;\r\n\r\n Result := TJSHTMLElement(document.getElementById(s));\r\n\r\n if Assigned(Result) then\r\n begin\r\n if Result.classlist.contains('TVCARET') then\r\n Result := TJSHTMLElement(Result.firstChild);\r\n end;\r\nend;\r\n\r\nfunction TTreeView.GetNodeFromID(AId: string): TTreeNode;\r\nvar\r\n s: string;\r\n sl: TStringList;\r\n n: TTreeNode;\r\n i,j,e: integer;\r\n\r\nbegin\r\n Result := nil;\r\n\r\n s := AID;\r\n s := Copy(s, Length(FormPrefix + Name) + 2, Length(s));\r\n\r\n if (s <> '') then\r\n begin\r\n sl := TStringList.Create;\r\n sl.Delimiter := '_';\r\n sl.StrictDelimiter := true;\r\n sl.DelimitedText := s;\r\n\r\n n := nil;\r\n for i := 0 to sl.Count - 1 do\r\n begin\r\n val(sl.Strings[i], j, e);\r\n\r\n if (i = 0) then\r\n n := Items.Sibling[j]\r\n else\r\n n := n.Item[j];\r\n end;\r\n sl.Free;\r\n\r\n Result := n;\r\n end;\r\nend;\r\n\r\nfunction TTreeView.GetSelected: TTreeNode;\r\nbegin\r\n Result := FSelected;\r\nend;\r\n\r\nfunction TTreeView.GetTopItem: TTreeNode;\r\nvar\r\n el: TJSHTMLElement;\r\n tn: TTreeNode;\r\n h: single;\r\n\r\nbegin\r\n Result := nil;\r\n\r\n if Items.SiblingCount = 0 then\r\n Exit;\r\n\r\n h := ElementHandle.getBoundingClientRect().top;\r\n\r\n tn := Items.Sibling[0];\r\n\r\n while Assigned(tn) do\r\n begin\r\n el := GetNodeElement(tn);\r\n if el.getBoundingClientRect().top >= h then\r\n begin\r\n Result := tn;\r\n break;\r\n end;\r\n\r\n tn := tn.GetNext;\r\n end;\r\nend;\r\n\r\nfunction TTreeView.HandleClick(Event: TJSEvent): Boolean;\r\nvar\r\n n: TTreeNode;\r\n el,chk: TJSHTMLElement;\r\nbegin\r\n Result := true;\r\n asm\r\n el = Event.srcElement;\r\n end;\r\n\r\n while Assigned(el) and (el.tagName <> 'SPAN') do\r\n el := TJSHTMLElement(el.parentElement);\r\n\r\n if Assigned(el) then\r\n begin\r\n if el.hasAttribute('id') then\r\n begin\r\n n := GetNodeFromID(el['id']);\r\n\r\n if (n.NodeType in [ntCheckBox, ntRadioButton]) then\r\n begin\r\n chk := TJSHTMLElement(el.firstChild);\r\n if chk.TagName = 'INPUT' then\r\n begin\r\n if chk['type'] = 'radio' then\r\n ClickRadio(n, TJSHTMLInputElement(chk).checked)\r\n else\r\n ClickCheck(n, TJSHTMLInputElement(chk).checked);\r\n\r\n n.Checked := TJSHTMLInputElement(chk).checked;\r\n end;\r\n end;\r\n\r\n if Assigned(OnClick) then\r\n OnClick(Self);\r\n\r\n if Assigned(n) then\r\n begin\r\n DoChangeSelection(n);\r\n\r\n if Assigned(OnClickNode) then\r\n OnClickNode(Self, n);\r\n end;\r\n end;\r\n\r\n end;\r\nend;\r\n\r\nfunction TTreeView.HandleDblClick(Event: TJSEvent): Boolean;\r\nvar\r\n n: TTreeNode;\r\n el: TJSElement;\r\n Allow: boolean;\r\nbegin\r\n Result := true;\r\n\r\n asm\r\n el = Event.srcElement;\r\n end;\r\n\r\n while Assigned(el) and (el.tagName <> 'SPAN') do\r\n el := TJSHTMLElement(el.parentElement);\r\n\r\n if Assigned(el) then\r\n begin\r\n if not el.hasAttribute('id') then\r\n el := el.parentElement;\r\n\r\n if el.hasAttribute('id') then\r\n begin\r\n n := GetNodeFromID(el['id']);\r\n\r\n if Assigned(OnDblClick) then\r\n OnDblClick(Self);\r\n\r\n if Assigned(n) then\r\n begin\r\n DoChangeSelection(n);\r\n\r\n Allow := true;\r\n\r\n if n.Expanded then\r\n begin\r\n if Assigned(OnCollapsing) then\r\n OnCollapsing(Self, n, Allow);\r\n end\r\n else\r\n begin\r\n if Assigned(OnExpanding) then\r\n OnExpanding(Self, n, Allow);\r\n end;\r\n\r\n if Allow then\r\n begin\r\n n.Expanded := not n.Expanded;\r\n\r\n if n.Expanded then\r\n begin\r\n if Assigned(OnExpanded) then\r\n OnExpanded(Self, N);\r\n end\r\n else\r\n if not n.Expanded then\r\n begin\r\n if Assigned(OnCollapsed) then\r\n OnCollapsed(Self, N);\r\n end;\r\n end;\r\n\r\n\r\n if Assigned(n) and Assigned(OnDblClickNode) then\r\n OnDblClickNode(Self, n);\r\n // toggle expanded state on dbl click\r\n end;\r\n\r\n end;\r\n end;\r\n\r\n Event.StopPropagation;\r\n Result := true;\r\nend;\r\n\r\nfunction TTreeView.HandleNode(Event: TJSEvent): Boolean;\r\nvar\r\n el: TJSElement;\r\n n: TTreeNode;\r\n Allow: boolean;\r\nbegin\r\n asm\r\n el = Event.srcElement;\r\n end;\r\n\r\n if Assigned(el) and (el.hasAttribute('id')) then\r\n begin\r\n n := GetNodeFromID(el['id']);\r\n\r\n Allow := true;\r\n\r\n if n.Expanded then\r\n begin\r\n if Assigned(OnCollapsing) then\r\n OnCollapsing(Self, n, Allow);\r\n end\r\n else\r\n begin\r\n if Assigned(OnExpanding) then\r\n OnExpanding(Self, n, Allow);\r\n end;\r\n\r\n if Allow then\r\n begin\r\n n.Expanded := not n.Expanded;\r\n\r\n if n.Expanded then\r\n begin\r\n if Assigned(OnExpanded) then\r\n OnExpanded(Self, n);\r\n end\r\n else\r\n begin\r\n if Assigned(OnCollapsed) then\r\n OnCollapsed(Self, n);\r\n end;\r\n end;\r\n\r\n DoChangeSelection(n);\r\n\r\n if Assigned(OnClickNode) then\r\n OnClickNode(Self, n);\r\n\r\n Result := true;\r\n Event.preventDefault;\r\n end\r\n else\r\n begin\r\n if Assigned(el) then\r\n begin\r\n el := el.parentElement;\r\n if el.hasAttribute('id') then\r\n begin\r\n n := GetNodeFromID(el['id']);\r\n DoChangeSelection(n);\r\n\r\n if Assigned(OnClickNode) then\r\n OnClickNode(Self, n);\r\n\r\n Result := true;\r\n Event.preventDefault;\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TTreeView.InitCSSLibrary(ALibrary: TCSSLibrary);\r\nbegin\r\n if (ALibrary = cssBootstrap) then\r\n begin\r\n ElementFont := efCSS;\r\n end;\r\nend;\r\n\r\nprocedure TTreeView.KeyDown(var Key: Word; Shift: TShiftState);\r\nvar\r\n tn,sn,ln: TTreeNode;\r\nbegin\r\n tn := Selected;\r\n\r\n if (Key = VK_HOME) then\r\n begin\r\n if Assigned(Items.Sibling[0]) then\r\n DoChangeSelection(Items.Sibling[0]);\r\n end;\r\n\r\n if (Key = VK_END) and (Items.SiblingCount > 0) then\r\n begin\r\n tn := Items.Sibling[Items.SiblingCount - 1];\r\n\r\n while tn.Expanded do\r\n begin\r\n if tn.Count > 0 then\r\n tn := tn.Item[tn.Count -1];\r\n end;\r\n\r\n DoChangeSelection(tn);\r\n end;\r\n\r\n if (Key = VK_DOWN) then\r\n begin\r\n if Assigned(tn) then\r\n begin\r\n if tn.Expanded and (tn.Count > 0) then\r\n begin\r\n tn := tn.GetFirstChild;\r\n end\r\n else\r\n tn := tn.GetNextSibling;\r\n\r\n if not Assigned(tn) then\r\n begin\r\n tn := Selected;\r\n sn := tn;\r\n\r\n while not Assigned(sn.GetNextSibling) and Assigned(sn.Parent) do\r\n begin\r\n sn := sn.Parent;\r\n if Assigned(sn) then\r\n ln := sn.GetNextSibling;\r\n\r\n if Assigned(ln) then\r\n begin\r\n tn := ln;\r\n end;\r\n end;\r\n end;\r\n\r\n if Assigned(tn) then\r\n DoChangeSelection(tn);\r\n end;\r\n end;\r\n\r\n if (Key = VK_UP) then\r\n begin\r\n if Assigned(tn) then\r\n begin\r\n tn := tn.GetPrevSibling;\r\n if Assigned(tn) then\r\n begin\r\n sn := tn;\r\n while Assigned(sn) and sn.Expanded and (sn.Count > 0) do\r\n begin\r\n sn := sn.Item[tn.Count - 1];\r\n if Assigned(sn) then\r\n tn := sn;\r\n end;\r\n\r\n DoChangeSelection(tn);\r\n end\r\n else\r\n begin\r\n tn := Selected.Parent;\r\n if Assigned(tn) then\r\n DoChangeSelection(tn);\r\n end;\r\n end;\r\n end;\r\n\r\n if (Key = VK_RIGHT) then\r\n begin\r\n if Assigned(tn) then\r\n Selected.Expanded := true;\r\n end;\r\n\r\n if (Key = VK_LEFT) then\r\n begin\r\n if Assigned(tn) then\r\n Selected.Expanded := false;\r\n end;\r\n\r\n if (Key in [VK_LEFT, VK_RIGHT, VK_DOWN, VK_UP]) then\r\n begin\r\n Key := 0;\r\n Exit;\r\n end;\r\n\r\n inherited;\r\nend;\r\n\r\nfunction TTreeView.RenderControl(ANode: TTreeNode;\r\n AElementName: string): string;\r\nvar\r\n chk, rname: string;\r\n l: integer;\r\nbegin\r\n chk := '';\r\n if ANode.Checked then\r\n chk := ' checked';\r\n\r\n rname := AElementName;\r\n\r\n l := Length(rname);\r\n if pos('_',rname)> 0 then\r\n begin\r\n while (rname[l] <> '_') do\r\n begin\r\n dec(l);\r\n end;\r\n\r\n rname := Copy(rname,1,l-1);\r\n end;\r\n\r\n case ANode.NodeType of\r\n ntCheckBox: Result := ' ' + ANode.Text;\r\n ntRadioButton: Result := ' ' + ANode.Text;\r\n ntText: Result := ANode.Text;\r\n end;\r\nend;\r\n\r\nfunction TTreeView.RenderNode(ANode: TTreeNode; AElementName: string): TJSHTMLElement;\r\nbegin\r\n Result := TJSHTMLElement(document.createElement('SPAN'));\r\n if AElementName <> '' then\r\n Result.setAttribute('id',AElementName);\r\n\r\n Result.innerHTML := RenderControl(ANode, AElementName);\r\n\r\n Result.classlist.add('TVNODE');\r\n\r\n if ElementNodeClassName <> '' then\r\n Result.classlist.add(ElementNodeClassName);\r\n\r\n if Assigned(Selected) then\r\n begin\r\n if Selected = ANode then\r\n begin\r\n Result.classlist.add('TVSELECTED');\r\n if ElementNodeSelectedClassName <> '' then\r\n Result.classlist.add(ElementNodeSelectedClassName);\r\n end;\r\n end;\r\n\r\n// if not Assigned(OnClickNode) and not Assigned(OnDblClickNode) then\r\n// Result.style.setProperty('pointer-events','none');\r\n\r\n if ANode.Hint <> '' then\r\n Result.setAttribute('title', ANode.Hint);\r\nend;\r\n\r\nprocedure TTreeView.RenderNodes;\r\n\r\n procedure RenderChildNode(LinkElement: TJSHTMLElement; ANode: TTreeNode; AElementName: string);\r\n var\r\n sp,nd: TJSHTMLElement;\r\n begin\r\n sp := TJSHTMLElement(document.createElement('SPAN'));\r\n if AElementName <> '' then\r\n sp.setAttribute('id', AElementName);\r\n\r\n sp.addEventListener('click',@HandleNode);\r\n sp.addEventListener('dblclick',@HandleDblClick);\r\n\r\n nd := TJSHTMLElement(document.createElement('SPAN'));\r\n\r\n if AutoExpand then\r\n nd.style.setProperty('pointer-events', 'none');\r\n\r\n nd.innerHTML := RenderControl(ANode, AElementName);\r\n\r\n nd.classlist.add('TVNODE');\r\n\r\n if ElementNodeClassName <> '' then\r\n nd.classlist.add(ElementNodeClassName);\r\n\r\n if not AutoExpand then\r\n nd.classlist.add('TVNOCURSOR');\r\n\r\n if Assigned(Selected) then\r\n begin\r\n if Selected = ANode then\r\n begin\r\n nd.classlist.add('TVSELECTED');\r\n if ElementNodeSelectedClassName <> '' then\r\n nd.classlist.add(ElementNodeSelectedClassName);\r\n end;\r\n end;\r\n\r\n if ANode.Hint <> '' then\r\n nd.setAttribute('title', ANode.Hint);\r\n\r\n LinkElement.appendChild(sp);\r\n sp.appendChild(nd);\r\n if ANode.Expanded then\r\n sp.setAttribute('class', 'TVCARET TVCARET-DOWN')\r\n else\r\n sp.setAttribute('class', 'TVCARET');\r\n\r\n DoRenderNode(ANode, nd);\r\n end;\r\n\r\n procedure FillChilds(ParentElement: TJSElement; ParentName: string; ANode: TTreeNode);\r\n var\r\n i: integer;\r\n ul: TJSElement;\r\n nd,li: TJSHTMLElement;\r\n nn: string;\r\n begin\r\n ul := document.createElement('UL');\r\n ul.setAttribute('class','TVUL');\r\n ul.setAttribute('id',ParentName);\r\n if DragMode = dmAutomatic then\r\n ul.setAttribute('draggable', 'true');\r\n ParentElement.appendChild(ul);\r\n\r\n if not Assigned(ANode) then\r\n begin\r\n // root items\r\n for i := 0 to FItems.SiblingCount - 1 do\r\n begin\r\n nn := ParentName + '_' + inttostr(i);\r\n\r\n li := TJSHTMLElement(document.createElement('LI'));\r\n if DragMode = dmAutomatic then\r\n li.setAttribute('draggable', 'true');\r\n ul.appendChild(li);\r\n\r\n if FItems.Sibling[i].Count > 0 then\r\n begin\r\n RenderChildNode(li, FItems.Sibling[i], nn);\r\n FillChilds(li, nn, FItems.Sibling[i]);\r\n end\r\n else\r\n begin\r\n nd := RenderNode(FItems.Sibling[i], nn);\r\n li.appendChild(nd);\r\n DoRenderNode(FItems.Sibling[i], nd);\r\n\r\n nd.addEventListener('click', @HandleClick);\r\n nd.addEventListener('dblclick', @HandleDblClick);\r\n end;\r\n end;\r\n end\r\n else\r\n begin\r\n // child items\r\n if ANode.Expanded then\r\n ul.setAttribute('class','TVNESTED TVUL TVACTIVE')\r\n else\r\n ul.setAttribute('class','TVNESTED TVUL');\r\n\r\n for i := 0 to ANode.Count - 1 do\r\n begin\r\n nn := ParentName + '_' + inttostr(i);\r\n\r\n li := TJSHTMLElement(document.createElement('LI'));\r\n if DragMode = dmAutomatic then\r\n li.setAttribute('draggable', 'true');\r\n ul.appendChild(li);\r\n\r\n if ANode.Item[i].Count > 0 then\r\n begin\r\n RenderChildNode(li, ANode.Item[i], nn);\r\n FillChilds(li, nn, ANode.Item[i]);\r\n end\r\n else\r\n begin\r\n nd := RenderNode(ANode.Item[i], nn);\r\n li.appendChild(nd);\r\n\r\n DoRenderNode(ANode.Item[i], nd);\r\n\r\n nd.addEventListener('click', @HandleClick);\r\n nd.addEventListener('dblclick', @HandleDblClick);\r\n end;\r\n end;\r\n end;\r\n end;\r\n\r\nbegin\r\n if not Assigned(ElementHandle) then\r\n Exit;\r\n\r\n // remove previous tree\r\n while ElementHandle.childNodes.length > 0 do\r\n ElementHandle.removeChild(ElementHandle.FirstChild);\r\n\r\n FillChilds(ElementHandle, FormPrefix + Name, nil);\r\n ElementHandle.style.setProperty('overflow','auto');\r\nend;\r\n\r\nprocedure TTreeView.Select(const ANode: TTreeNode);\r\nbegin\r\n SetSelected(ANode);\r\nend;\r\n\r\nprocedure TTreeView.SetElementNodeClassName(const Value: TElementClassName);\r\nbegin\r\n if (FElementNodeClassName <> Value) then\r\n begin\r\n FElementNodeClassName := Value;\r\n UpdateElement;\r\n end;\r\nend;\r\n\r\nprocedure TTreeView.SetElementNodeSelectedClassName(\r\n const Value: TElementClassName);\r\nbegin\r\n if (FElementNodeSelectedClassName <> Value) then\r\n begin\r\n FElementNodeSelectedClassName := Value;\r\n UpdateElement;\r\n end;\r\nend;\r\n\r\nprocedure TTreeView.SetItems(const Value: TTreeNodes);\r\nbegin\r\n FItems.Assign(Value);\r\nend;\r\n\r\nprocedure TTreeView.SetSelected(const Value: TTreeNode);\r\nvar\r\n el: TJSHTMLElement;\r\nbegin\r\n if Assigned(FSelected) then\r\n begin\r\n TTreeNodeEx(FSelected).UnSelect;\r\n\r\n el := GetNodeElement(FSelected);\r\n if Assigned(el) then\r\n begin\r\n el.classlist.toggle('TVSELECTED');\r\n if ElementNodeSelectedClassName <> '' then\r\n el.classlist.toggle(ElementNodeSelectedClassName);\r\n end;\r\n end;\r\n\r\n FSelected := Value;\r\n\r\n if Assigned(FSelected) then\r\n TTreeNodeEx(FSelected).Select;\r\n\r\n el := GetNodeElement(FSelected);\r\n if Assigned(el) then\r\n begin\r\n el.classlist.toggle('TVSELECTED');\r\n if ElementNodeSelectedClassName <> '' then\r\n el.classlist.toggle(ElementNodeSelectedClassName);\r\n end;\r\nend;\r\n\r\nprocedure TTreeView.SetTopItem(const Value: TTreeNode);\r\nvar\r\n el: TJSHTMLElement;\r\n h,ch: single;\r\n\r\nbegin\r\n if not Assigned(Value) then\r\n raise Exception.Create('Value is not assigned');\r\n\r\n el := GetNodeElement(Value);\r\n h := el.getBoundingClientRect().top + ElementHandle.scrollTop;\r\n\r\n ch := ElementHandle.getBoundingClientRect().top;\r\n\r\n ElementHandle.scrollTop := Round(h - ch);\r\nend;\r\n\r\nend.","{\r\n Delphi/Kylix compatibility unit: String handling routines.\r\n\r\n This file is part of the Free Pascal run time library.\r\n Copyright (c) 2018 by the Free Pascal development team\r\n\r\n See the file COPYING.FPC, included in this distribution,\r\n for details about the copyright.\r\n\r\n This program is distributed in the hope that it will be useful,\r\n but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\r\n\r\n **********************************************************************}\r\n{$mode objfpc}\r\n\r\n{$inline on}\r\nunit StrUtils;\r\n\r\ninterface\r\n\r\nuses\r\n SysUtils, Types;\r\n\r\n{ ---------------------------------------------------------------------\r\n Case insensitive search/replace\r\n ---------------------------------------------------------------------}\r\n\r\nFunction AnsiResemblesText(const AText, AOther: string): Boolean;\r\nFunction AnsiContainsText(const AText, ASubText: string): Boolean;\r\nFunction AnsiStartsText(const ASubText, AText: string): Boolean;\r\nFunction AnsiEndsText(const ASubText, AText: string): Boolean;\r\nFunction AnsiReplaceText(const AText, AFromText, AToText: string): string;\r\nFunction AnsiMatchText(const AText: string; const AValues: array of string): Boolean;\r\nFunction AnsiIndexText(const AText: string; const AValues: array of string): Integer;\r\n\r\nFunction StartsText(const ASubText, AText: string): Boolean;\r\nFunction EndsText(const ASubText, AText: string): Boolean;\r\n\r\nfunction ResemblesText(const AText, AOther: string): Boolean;\r\nfunction ContainsText(const AText, ASubText: string): Boolean;\r\nfunction MatchText(const AText: string; const AValues: array of string): Boolean;\r\nfunction IndexText(const AText: string; const AValues: array of string): Integer;\r\n\r\n{ ---------------------------------------------------------------------\r\n Case sensitive search/replace\r\n ---------------------------------------------------------------------}\r\n\r\nFunction AnsiContainsStr(const AText, ASubText: string): Boolean;\r\nFunction AnsiStartsStr(const ASubText, AText: string): Boolean;\r\nFunction AnsiEndsStr(const ASubText, AText: string): Boolean;\r\nFunction AnsiReplaceStr(const AText, AFromText, AToText: string): string;\r\nFunction AnsiMatchStr(const AText: string; const AValues: array of string): Boolean;\r\nFunction AnsiIndexStr(const AText: string; const AValues: array of string): Integer;\r\nFunction MatchStr(const AText: String; const AValues: array of String): Boolean;\r\nFunction IndexStr(const AText: String; const AValues: array of String): Integer;\r\nfunction ContainsStr(const AText, ASubText: string): Boolean;\r\nFunction StartsStr(const ASubText, AText: string): Boolean;\r\nFunction EndsStr(const ASubText, AText: string): Boolean;\r\n\r\n{ ---------------------------------------------------------------------\r\n Miscellaneous\r\n ---------------------------------------------------------------------}\r\n\r\nFunction DupeString(const AText: string; ACount: Integer): string;\r\nFunction ReverseString(const AText: string): string;\r\nFunction AnsiReverseString(const AText: String): String;\r\nFunction StuffString(const AText: string; AStart, ALength: Cardinal; const ASubText: string): string;\r\nFunction RandomFrom(const AValues: array of string): string; overload;\r\nFunction IfThen(AValue: Boolean; const ATrue: string; const AFalse: string = ''): string; overload;\r\nfunction NaturalCompareText (const S1 , S2 : string ): Integer ;\r\nfunction NaturalCompareText(const Str1, Str2: string; const ADecSeparator, AThousandSeparator: String): Integer;\r\n\r\n\r\n{ ---------------------------------------------------------------------\r\n VB emulations.\r\n ---------------------------------------------------------------------}\r\n\r\nFunction LeftStr(const AText: String; const ACount: SizeInt): String;\r\nFunction RightStr(const AText: String; const ACount: SizeInt): String;\r\nFunction MidStr(const AText: String; const AStart, ACount: SizeInt): String;\r\nFunction RightBStr(const AText: String; const AByteCount: SizeInt): String;\r\nFunction MidBStr(const AText: String; const AByteStart, AByteCount: SizeInt): String;\r\nFunction AnsiLeftStr(const AText: String; const ACount: SizeInt): String;\r\nFunction AnsiRightStr(const AText: String; const ACount: SizeInt): String;\r\nFunction AnsiMidStr(const AText: String; const AStart, ACount: SizeInt): String;\r\nFunction LeftBStr(const AText: String; const AByteCount: SizeInt): String;\r\n\r\n{ ---------------------------------------------------------------------\r\n Extended search and replace\r\n ---------------------------------------------------------------------}\r\n\r\nVar\r\n { Default word delimiters are any character except the core alphanumerics. }\r\n WordDelimiters: Array of Char;// = [#0..#255] - ['a'..'z','A'..'Z','1'..'9','0'];\r\n \r\nConst\r\n SErrAmountStrings = 'Amount of search and replace strings don''t match';\r\n SInvalidRomanNumeral = '%s is not a valid Roman numeral';\r\n\r\ntype\r\n TStringSearchOption = (soDown, soMatchCase, soWholeWord);\r\n TStringSearchOptions = set of TStringSearchOption;\r\n TStringSeachOption = TStringSearchOption;\r\n\r\nFunction PosEx(const SubStr, S: string; Offset: SizeUint): SizeInt;\r\nFunction PosEx(const SubStr, S: string): SizeInt; // Offset: Cardinal = 1\r\nFunction PosEx(c:char; const S: string; Offset: SizeUint): SizeInt;\r\nfunction StringsReplace(const S: string; OldPattern, NewPattern: array of string; Flags: TReplaceFlags): string;\r\n\r\n{ ---------------------------------------------------------------------\r\n Delphi compat\r\n ---------------------------------------------------------------------}\r\n\r\nFunction ReplaceStr(const AText, AFromText, AToText: string): string;\r\nFunction ReplaceText(const AText, AFromText, AToText: string): string;\r\n\r\n{ ---------------------------------------------------------------------\r\n Soundex Functions.\r\n ---------------------------------------------------------------------}\r\n\r\ntype\r\n TSoundexLength = 1..MaxInt;\r\n\r\nFunction Soundex(const AText: string; ALength: TSoundexLength): string;\r\nFunction Soundex(const AText: string): string; // ; ALength: TSoundexLength = 4\r\n\r\ntype\r\n TSoundexIntLength = 1..8;\r\n\r\nFunction SoundexInt(const AText: string; ALength: TSoundexIntLength): Integer;\r\nFunction SoundexInt(const AText: string): Integer; //; ALength: TSoundexIntLength = 4\r\nFunction DecodeSoundexInt(AValue: Integer): string;\r\nFunction SoundexWord(const AText: string): Word;\r\nFunction DecodeSoundexWord(AValue: Word): string;\r\nFunction SoundexSimilar(const AText, AOther: string; ALength: TSoundexLength): Boolean;\r\nFunction SoundexSimilar(const AText, AOther: string): Boolean; //; ALength: TSoundexLength = 4\r\nFunction SoundexCompare(const AText, AOther: string; ALength: TSoundexLength): Integer;\r\nFunction SoundexCompare(const AText, AOther: string): Integer; //; ALength: TSoundexLength = 4\r\nFunction SoundexProc(const AText, AOther: string): Boolean;\r\n\r\ntype\r\n TCompareTextProc = Function(const AText, AOther: string): Boolean;\r\n\r\nVar\r\n AnsiResemblesProc: TCompareTextProc;\r\n ResemblesProc: TCompareTextProc;\r\n\r\n{ ---------------------------------------------------------------------\r\n Other functions, based on RxStrUtils.\r\n ---------------------------------------------------------------------}\r\ntype\r\n TRomanConversionStrictness = (rcsStrict, rcsRelaxed, rcsDontCare);\r\n\r\n\r\nfunction IsEmptyStr(const S: string; const EmptyChars: Array of char): Boolean;\r\nfunction DelSpace(const S: string): string;\r\nfunction DelChars(const S: string; Chr: Char): string;\r\nfunction DelSpace1(const S: string): string;\r\nfunction Tab2Space(const S: string; Numb: Byte): string;\r\nfunction NPos(const C: string; S: string; N: Integer): SizeInt;\r\nFunction RPosEX(C:char;const S : String;offs:cardinal):SizeInt; overload;\r\nFunction RPosex (Const Substr : String; Const Source : String;offs:cardinal) : SizeInt; overload;\r\nFunction RPos(c:char;const S : String):SizeInt; overload;\r\nFunction RPos (Const Substr : String; Const Source : String) : SizeInt; overload;\r\nfunction AddChar(C: Char; const S: string; N: Integer): string;\r\nfunction AddCharR(C: Char; const S: string; N: Integer): string;\r\nfunction PadLeft(const S: string; N: Integer): string;\r\nfunction PadRight(const S: string; N: Integer): string;\r\nfunction PadCenter(const S: string; Len: SizeInt): string;\r\nfunction Copy2Symb(const S: string; Symb: Char): string;\r\nfunction Copy2SymbDel(var S: string; Symb: Char): string;\r\nfunction Copy2Space(const S: string): string;\r\nfunction Copy2SpaceDel(var S: string): string;\r\nfunction AnsiProperCase(const S: string; const WordDelims: Array of char): string;\r\nfunction WordCount(const S: string; const WordDelims: Array of char): SizeInt;\r\nfunction WordPosition(const N: Integer; const S: string; const WordDelims: Array of char): SizeInt;\r\nfunction ExtractWord(N: Integer; const S: string; const WordDelims: Array of char): string;\r\nfunction ExtractWordPos(N: Integer; const S: string; const WordDelims: Array of char; out Pos: Integer): string;\r\nfunction ExtractDelimited(N: Integer; const S: string; const Delims: Array of char): string;\r\nfunction ExtractSubstr(const S: string; var Pos: Integer; const Delims: Array of char): string;\r\nfunction IsWordPresent(const W, S: string; const WordDelims: Array of char): Boolean;\r\nfunction FindPart(const HelpWilds, InputStr: string): SizeInt;\r\nfunction IsWild(InputStr, Wilds: string; IgnoreCase: Boolean): Boolean;\r\nfunction XorString(const Key, Src: String): String;\r\nfunction XorEncode(const Key, Source: string): string;\r\nfunction XorDecode(const Key, Source: string): string;\r\nfunction GetCmdLineArg(const Switch: string; SwitchChars: Array of char): string;\r\nfunction Numb2USA(const S: string): string;\r\nfunction Hex2Dec(const S: string): Longint;\r\nfunction Dec2Numb(N: Longint; Len, Base: Byte): string;\r\nfunction Numb2Dec(S: string; Base: Byte): Longint;\r\nfunction IntToBin(Value: Longint; Digits, Spaces: Integer): string;\r\nfunction IntToBin(Value: Longint; Digits: Integer): string;\r\nfunction IntToBin(Value: NativeInt; Digits:integer): string;\r\nfunction IntToRoman(Value: Longint): string;\r\nfunction TryRomanToInt(S: String; out N: LongInt; Strictness: TRomanConversionStrictness = rcsRelaxed): Boolean;\r\nfunction RomanToInt(const S: string; Strictness: TRomanConversionStrictness = rcsRelaxed): Longint;\r\nfunction RomanToIntDef(Const S : String; const ADefault: Longint = 0; Strictness: TRomanConversionStrictness = rcsRelaxed): Longint;\r\n\r\nconst\r\n DigitChars = ['0'..'9'];\r\n Brackets = ['(',')','[',']','{','}'];\r\n StdWordDelims = [#0..' ',',','.',';','/','\\',':','''','\"','`'] + Brackets;\r\n StdSwitchChars = ['-','/'];\r\n\r\nfunction PosSet (const c:Array of char;const s : String ):SizeInt;\r\nfunction PosSet (const c:string;const s : String ):SizeInt;\r\nfunction PosSetEx (const c:Array of char;const s : String;count:Integer ):SizeInt;\r\nfunction PosSetEx (const c:string;const s : String;count:Integer ):SizeInt;\r\n\r\nProcedure Removeleadingchars(VAR S : String; Const CSet:Array of char);\r\nProcedure RemoveTrailingChars(VAR S : String;Const CSet:Array of char);\r\nProcedure RemovePadChars(VAR S : String;Const CSet:Array of char);\r\n\r\nfunction TrimLeftSet(const S: String;const CSet:Array of char): String;\r\nFunction TrimRightSet(const S: String;const CSet:Array of char): String;\r\nfunction TrimSet(const S: String;const CSet:Array of char): String;\r\n\r\nFunction SplitString(const S, Delimiters: string): TStringDynArray;\r\n\r\ntype\r\n SizeIntArray = array of SizeInt;\r\n\r\n\r\nimplementation\r\n\r\nuses js;\r\n\r\n{ ---------------------------------------------------------------------\r\n Possibly Exception raising functions\r\n ---------------------------------------------------------------------}\r\n\r\n\r\nfunction Hex2Dec(const S: string): Longint;\r\nvar\r\n HexStr: string;\r\nbegin\r\n if Pos('$',S)=0 then\r\n HexStr:='$'+ S\r\n else\r\n HexStr:=S;\r\n Result:=StrToInt(HexStr);\r\nend;\r\n\r\n{\r\n We turn off implicit exceptions, since these routines are tested, and it \r\n saves 20% codesize (and some speed) and don't throw exceptions, except maybe \r\n heap related. If they don't, that is consider a bug.\r\n\r\n In the future, be wary with routines that use strtoint, floating point \r\n and/or format() derivatives. And check every divisor for 0.\r\n}\r\n\r\n{$IMPLICITEXCEPTIONS OFF}\r\n\r\n{ ---------------------------------------------------------------------\r\n Case insensitive search/replace\r\n ---------------------------------------------------------------------}\r\nFunction AnsiResemblesText(const AText, AOther: string): Boolean;\r\n\r\nbegin\r\n if Assigned(AnsiResemblesProc) then\r\n Result:=AnsiResemblesProc(AText,AOther)\r\n else\r\n Result:=False;\r\nend;\r\n\r\nFunction AnsiContainsText(const AText, ASubText: string): Boolean;\r\nbegin\r\n Result:=Pos(Uppercase(ASubText),Uppercase(AText))>0;\r\nend;\r\n\r\n\r\nFunction AnsiStartsText(const ASubText, AText: string): Boolean;\r\nbegin\r\n if (Length(AText) >= Length(ASubText)) and (ASubText <> '') then\r\n Result := SameText(ASubText,Copy(AText,1,Length(ASubText)))\r\n else\r\n Result := False;\r\nend;\r\n\r\n\r\nFunction AnsiEndsText(const ASubText, AText: string): Boolean;\r\nbegin\r\n if Length(AText) >= Length(ASubText) then\r\n Result := SameText(aSubText,RightStr(aText,Length(ASubText)))\r\n else\r\n Result := False;\r\nend;\r\n\r\n\r\nFunction AnsiReplaceText(const AText, AFromText, AToText: string): string;\r\nbegin\r\n Result := StringReplace(AText,AFromText,AToText,[rfReplaceAll,rfIgnoreCase]);\r\nend;\r\n\r\n\r\nFunction AnsiMatchText(const AText: string; const AValues: array of string): Boolean;\r\nbegin\r\n Result:=(AnsiIndexText(AText,AValues)<>-1)\r\nend;\r\n\r\n\r\nFunction AnsiIndexText(const AText: string; const AValues: array of string): Integer;\r\n\r\nvar\r\n i : Integer;\r\n\r\nbegin\r\n Result:=-1;\r\n if (high(AValues)=-1) or (High(AValues)>MaxInt) Then\r\n Exit;\r\n for i:=low(AValues) to High(Avalues) do\r\n if CompareText(avalues[i],atext)=0 Then\r\n exit(i); // make sure it is the first val.\r\nend;\r\n\r\n\r\n{ ---------------------------------------------------------------------\r\n Case sensitive search/replace\r\n ---------------------------------------------------------------------}\r\n\r\nFunction AnsiContainsStr(const AText, ASubText: string): Boolean;\r\nbegin\r\n Result := Pos(ASubText,AText)>0;\r\nend;\r\n\r\n\r\nFunction AnsiStartsStr(const ASubText, AText: string): Boolean;\r\nbegin\r\n if (Length(AText) >= Length(ASubText)) and (ASubText <> '') then\r\n Result := (ASubText=Copy(aText,1,Length(ASubtext)))\r\n else\r\n Result := False;\r\nend;\r\n\r\n\r\nFunction AnsiEndsStr(const ASubText, AText: string): Boolean;\r\nbegin\r\n if Length(AText) >= Length(ASubText) then\r\n Result := (ASubText=RightStr(aText,Length(ASubText)))\r\n else\r\n Result := False;\r\nend;\r\n\r\n\r\nFunction AnsiReplaceStr(const AText, AFromText, AToText: string): string;\r\nbegin\r\n Result := StringReplace(AText,AFromText,AToText,[rfReplaceAll]);\r\nend;\r\n\r\n\r\nFunction AnsiMatchStr(const AText: string; const AValues: array of string): Boolean;\r\nbegin\r\n Result:=AnsiIndexStr(AText,Avalues)<>-1;\r\nend;\r\n\r\n\r\nFunction AnsiIndexStr(const AText: string; const AValues: array of string): Integer;\r\nvar\r\n i : longint;\r\nbegin\r\n result:=-1;\r\n if (high(AValues)=-1) or (High(AValues)>MaxInt) Then\r\n Exit;\r\n for i:=low(AValues) to High(Avalues) do\r\n if (avalues[i]=AText) Then\r\n exit(i); // make sure it is the first val.\r\nend;\r\n\r\n\r\nFunction MatchStr(const AText: String; const AValues: array of String): Boolean;\r\nbegin\r\n Result := IndexStr(AText,AValues) <> -1;\r\nend;\r\n\r\n\r\nFunction IndexStr(const AText: String; const AValues: array of String): Integer;\r\nvar\r\n i: longint;\r\nbegin\r\n Result := -1;\r\n if (high(AValues) = -1) or (High(AValues) > MaxInt) Then\r\n Exit;\r\n for i := low(AValues) to High(Avalues) do\r\n if (avalues[i] = AText) Then\r\n exit(i); // make sure it is the first val.\r\nend;\r\n\r\n{ ---------------------------------------------------------------------\r\n Playthingies\r\n ---------------------------------------------------------------------}\r\n\r\nFunction DupeString(const AText: string; ACount: Integer): string;\r\n\r\nvar i : SizeInt;\r\n\r\nbegin\r\n result:='';\r\n for i:=1 to ACount do\r\n Result:=Result+aText;\r\nend;\r\n\r\nFunction ReverseString(const AText: string): string;\r\n\r\nvar\r\n i,j : SizeInt;\r\n\r\nbegin\r\n setlength(result,length(atext));\r\n i:=1; j:=length(atext);\r\n while (i<=j) do\r\n begin\r\n result[i]:=atext[j-i+1];\r\n inc(i);\r\n end;\r\nend;\r\n\r\n\r\nFunction AnsiReverseString(const AText: String): String;\r\n\r\nbegin\r\n Result:=ReverseString(AText);\r\nend;\r\n\r\n\r\nFunction StuffString(const AText: string; AStart, ALength: Cardinal; const ASubText: string): string;\r\n\r\nvar i,j,k : SizeUInt;\r\n\r\nbegin\r\n j:=length(ASubText);\r\n i:=length(AText);\r\n if AStart>i then \r\n aStart:=i+1;\r\n k:=i+1-AStart;\r\n if ALength> k then\r\n ALength:=k;\r\n SetLength(Result,i+j-ALength);\r\n Result:=Copy(AText,1,AStart-1)+Copy(ASubText,1,J)+Copy(AText,AStart+ALength,I+1-AStart-ALength);\r\nend;\r\n\r\nFunction RandomFrom(const AValues: array of string): string; overload;\r\n\r\nbegin\r\n if high(AValues)=-1 then exit('');\r\n result:=Avalues[random(High(AValues)+1)];\r\nend;\r\n\r\nFunction IfThen(AValue: Boolean; const ATrue: string; const AFalse: string = ''): string; overload;\r\n\r\nbegin\r\n if avalue then\r\n result:=atrue\r\n else\r\n result:=afalse;\r\nend;\r\n\r\nfunction NaturalCompareText(const Str1, Str2: string; const ADecSeparator, AThousandSeparator: String): Integer;\r\n{\r\n NaturalCompareBase compares strings in a collated order and\r\n so numbers are sorted too. It sorts like this:\r\n\r\n 01\r\n 001\r\n 0001\r\n\r\n and\r\n\r\n 0\r\n 00\r\n 000\r\n 000_A\r\n 000_B\r\n\r\n in a intuitive order.\r\n }\r\nvar\r\n Num1, Num2: double;\r\n pStr1, pStr2: integer;\r\n Len1, Len2: SizeInt;\r\n TextLen1, TextLen2: SizeInt;\r\n TextStr1: string = '';\r\n TextStr2: string = '';\r\n i: SizeInt;\r\n j: SizeInt;\r\n \r\n function Sign(const AValue: sizeint): integer;\r\n\r\n begin\r\n If Avalue<0 then\r\n Result:=-1\r\n else If Avalue>0 then\r\n Result:=1\r\n else\r\n Result:=0;\r\n end;\r\n\r\n function IsNumber(ch: char): boolean; overload;\r\n begin\r\n Result := ch in ['0'..'9'];\r\n end;\r\n\r\n function GetInteger(aString : String; var pch: integer; var Len: sizeint): double;\r\n\r\n begin\r\n Result := 0;\r\n while (pch<=length(astring)) and IsNumber(AString[pch]) do\r\n begin\r\n Result := (Result * 10) + Ord(Astring[pch]) - Ord('0');\r\n Inc(Len);\r\n Inc(pch);\r\n end;\r\n end;\r\n\r\n procedure GetChars;\r\n\r\n begin\r\n TextLen1 := 0;\r\n while not (Str1[pStr1 + TextLen1] in ['0'..'9']) and ((pStr1 + TextLen1)<=Length(Str1)) do\r\n Inc(TextLen1);\r\n TextStr1:='';\r\n i := 1;\r\n j := 0;\r\n while i <= TextLen1 do\r\n begin\r\n TextStr1 := TextStr1+Str1[pStr1 + j];\r\n Inc(i);\r\n Inc(j);\r\n end;\r\n\r\n TextLen2 := 0;\r\n while not (Str2[pStr2 + TextLen2] in ['0'..'9']) and ((pStr2 + TextLen2)<=Length(Str2)) do\r\n Inc(TextLen2);\r\n i := 1;\r\n j := 0;\r\n while i <= TextLen2 do\r\n begin\r\n TextStr2 := TextStr2+Str2[pStr2 + j];\r\n Inc(i);\r\n Inc(j);\r\n end;\r\n end;\r\n\r\nbegin\r\n if (Str1 <> '') and (Str2 <> '') then\r\n begin\r\n pStr1 := 1;\r\n pStr2 := 1;\r\n Result := 0;\r\n while (pStr1<=Length(Str1)) and (pStr2 <=Length(Str2)) do\r\n begin\r\n TextLen1 := 1;\r\n TextLen2 := 1;\r\n Len1 := 0;\r\n Len2 := 0;\r\n while (Str1[pStr1] = ' ') do\r\n begin\r\n Inc(pStr1);\r\n Inc(Len1);\r\n end;\r\n while (Str2[pstr2] = ' ') do\r\n begin\r\n Inc(pStr2);\r\n Inc(Len2);\r\n end;\r\n if IsNumber(Str1[pStr1]) and IsNumber(Str2[pStr2]) then\r\n begin\r\n Num1 := GetInteger(Str1,pStr1, Len1);\r\n Num2 := GetInteger(Str2, pStr2, Len2);\r\n if Num1 < Num2 then\r\n Result := -1\r\n else if Num1 > Num2 then\r\n Result := 1\r\n else\r\n begin\r\n Result := Sign(Len1 - Len2);\r\n end;\r\n Dec(pStr1);\r\n Dec(pStr2);\r\n end\r\n else\r\n begin\r\n GetChars;\r\n if TextStr1 <> TextStr2 then\r\n Result := CompareText(TextStr1, TextStr2)\r\n else\r\n Result := 0;\r\n end;\r\n if Result <> 0 then\r\n Break;\r\n Inc(pStr1, TextLen1);\r\n Inc(pStr2, TextLen2);\r\n end;\r\n end;\r\n Num1:=Length(Str1);\r\n Num2:=Length(Str2);\r\n if (Result = 0) and (Num1 <> Num2) then\r\n begin\r\n if Num1 < Num2 then\r\n Result := -1\r\n else\r\n Result := 1;\r\n end;\r\n if ADecSeparator='' then ;\r\n if aThousandSeparator='' then ;\r\nend;\r\n\r\nfunction NaturalCompareText (const S1 , S2 : string ): Integer ;\r\nbegin\r\n Result := NaturalCompareText(S1, S2, FormatSettings.DecimalSeparator,FormatSettings.ThousandSeparator);\r\nend;\r\n\r\n{ ---------------------------------------------------------------------\r\n VB emulations.\r\n ---------------------------------------------------------------------}\r\n\r\nFunction LeftStr(const AText: String; const ACount: SizeInt): String;\r\n\r\nbegin\r\n Result:=Copy(AText,1,ACount);\r\nend;\r\n\r\nFunction RightStr(const AText: String; const ACount: SizeInt): String;\r\n\r\nvar j,l:SizeInt;\r\n\r\nbegin\r\n l:=length(atext);\r\n j:=ACount;\r\n if j>l then j:=l;\r\n Result:=Copy(AText,l-j+1,j);\r\nend;\r\n\r\nFunction MidStr(const AText: String; const AStart, ACount: SizeInt): String;\r\n\r\nbegin\r\n if (ACount=0) or (AStart>length(atext)) then\r\n exit('');\r\n Result:=Copy(AText,AStart,ACount);\r\nend;\r\n\r\n\r\n\r\nFunction LeftBStr(const AText: String; const AByteCount: SizeInt): String;\r\n\r\nbegin\r\n Result:=LeftStr(AText,AByteCount);\r\nend;\r\n\r\n\r\nFunction RightBStr(const AText: String; const AByteCount: SizeInt): String;\r\nbegin\r\n Result:=RightStr(Atext,AByteCount);\r\nend;\r\n\r\n\r\nFunction MidBStr(const AText: String; const AByteStart, AByteCount: SizeInt): String;\r\nbegin\r\n Result:=MidStr(AText,AByteStart,AByteCount);\r\nend;\r\n\r\n\r\nFunction AnsiLeftStr(const AText: String; const ACount: SizeInt): String;\r\nbegin\r\n Result := copy(AText,1,ACount);\r\nend;\r\n\r\n\r\nFunction AnsiRightStr(const AText: String; const ACount: SizeInt): String;\r\nbegin\r\n Result := copy(AText,length(AText)-ACount+1,ACount);\r\nend;\r\n\r\n\r\nFunction AnsiMidStr(const AText: String; const AStart, ACount: SizeInt): String;\r\nbegin\r\n Result:=Copy(AText,AStart,ACount);\r\nend;\r\n\r\n\r\nFunction PosEx(const SubStr, S: string; Offset: SizeUint): SizeInt;\r\n\r\n\r\nbegin\r\n result:=TJSString.New(S).IndexOf(SubStr,offset-1)+1;\r\nend;\r\n\r\nFunction PosEx(c:char; const S: string; Offset: SizeUint): SizeInt;\r\nbegin\r\n result:=TJSString.New(S).IndexOf(c,offset-1)+1;\r\nend;\r\n\r\nFunction PosEx(const SubStr, S: string): SizeInt; // Offset: Cardinal = 1\r\n\r\nbegin\r\n Result:=posex(substr,s,1);\r\nend;\r\n\r\n\r\nfunction StringsReplace(const S: string; OldPattern, NewPattern: array of string; Flags: TReplaceFlags): string;\r\n\r\nvar pc,pcc,lastpc : integer;\r\n strcount : integer;\r\n ResStr,\r\n CompStr : string;\r\n Found : Boolean;\r\n sc : sizeint;\r\n\r\nbegin\r\n sc := length(OldPattern);\r\n if sc <> length(NewPattern) then\r\n raise exception.Create(SErrAmountStrings);\r\n\r\n dec(sc);\r\n\r\n if rfIgnoreCase in Flags then\r\n begin\r\n CompStr:=UpperCase(S);\r\n for strcount := 0 to sc do\r\n OldPattern[strcount] := UpperCase(OldPattern[strcount]);\r\n end\r\n else\r\n CompStr := s;\r\n\r\n ResStr := '';\r\n pc := 1;\r\n pcc := 1;\r\n lastpc := pc+Length(S);\r\n\r\n while pc < lastpc do\r\n begin\r\n Found := False;\r\n for strcount := 0 to sc do\r\n begin\r\n if (Copy(compStr,pc,Length(OldPattern[strcount]))=OldPattern[strcount]) then\r\n begin\r\n ResStr := ResStr + NewPattern[strcount];\r\n pc := pc+Length(OldPattern[strcount]);\r\n pcc := pcc+Length(OldPattern[strcount]);\r\n Found := true;\r\n end\r\n end;\r\n if not found then\r\n begin\r\n ResStr := ResStr + S[pcc];\r\n inc(pc);\r\n inc(pcc);\r\n end\r\n else if not (rfReplaceAll in Flags) then\r\n begin\r\n ResStr := ResStr + copy(S,pcc,Length(S)-pcc+1);\r\n break;\r\n end;\r\n end;\r\n Result := ResStr;\r\nend;\r\n\r\n{ ---------------------------------------------------------------------\r\n Delphi compat\r\n ---------------------------------------------------------------------}\r\n\r\nFunction ReplaceStr(const AText, AFromText, AToText: string): string;\r\nbegin\r\n result:=AnsiReplaceStr(AText, AFromText, AToText);\r\nend;\r\n\r\nFunction ReplaceText(const AText, AFromText, AToText: string): string;\r\nbegin\r\n result:=AnsiReplaceText(AText, AFromText, AToText);\r\nend;\r\n\r\n{ ---------------------------------------------------------------------\r\n Soundex Functions.\r\n ---------------------------------------------------------------------}\r\nVar\r\n SScore : String =\r\n '00000000000000000000000000000000'+ // 1..32\r\n '00000000000000000000000000000000'+ // 33..64\r\n '0123012i02245501262301i2i2'+ // 65..90\r\n '000000'+ // 91..96\r\n '0123012i02245501262301i2i2'+ // 97..122\r\n '00000000000000000000000000000000'+ // 123..154\r\n '00000000000000000000000000000000'+ // 155..186\r\n '00000000000000000000000000000000'+ // 187..218\r\n '00000000000000000000000000000000'+ // 219..250\r\n '00000'; // 251..255\r\n\r\nFunction Soundex(const AText: string; ALength: TSoundexLength): string;\r\n\r\nVar\r\n S,PS : Char;\r\n I,L : SizeInt;\r\n\r\nbegin\r\n Result:='';\r\n PS:=#0;\r\n If Length(AText)>0 then\r\n begin\r\n Result:=Upcase(AText[1]);\r\n I:=2;\r\n L:=Length(AText);\r\n While (I<=L) and (Length(Result)'i') then\r\n PS:=S;\r\n Inc(I);\r\n end;\r\n end;\r\n L:=Length(Result);\r\n If (L0 then\r\n begin\r\n Result:=Ord(SE[1])-OrdA;\r\n if ALength > 1 then\r\n begin\r\n Result:=Result*26+(Ord(SE[2])-Ord0);\r\n for I:=3 to ALength do\r\n Result:=(Ord(SE[I])-Ord0)+Result*7;\r\n end;\r\n Result:=ALength+Result*9;\r\n end;\r\nend;\r\n\r\n\r\nFunction SoundexInt(const AText: string): Integer; //; ALength: TSoundexIntLength = 4\r\nbegin\r\n Result:=SoundexInt(AText,4);\r\nend;\r\n\r\n\r\nFunction DecodeSoundexInt(AValue: Integer): string;\r\n\r\nvar\r\n I, Len: Integer;\r\n\r\nbegin\r\n Result := '';\r\n Len := AValue mod 9;\r\n AValue := AValue div 9;\r\n for I:=Len downto 3 do\r\n begin\r\n Result:=Chr(Ord0+(AValue mod 7))+Result;\r\n AValue:=AValue div 7;\r\n end;\r\n if Len>1 then\r\n begin\r\n Result:=Chr(Ord0+(AValue mod 26))+Result;\r\n AValue:=AValue div 26;\r\n end;\r\n Result:=Chr(OrdA+AValue)+Result;\r\nend;\r\n\r\n\r\nFunction SoundexWord(const AText: string): Word;\r\n\r\nVar\r\n S : String;\r\n\r\nbegin\r\n S:=SoundEx(Atext,4);\r\n Result:=Ord(S[1])-OrdA;\r\n Result:=Result*26+ord(S[2])-48;\r\n Result:=Result*7+ord(S[3])-48;\r\n Result:=Result*7+ord(S[4])-48;\r\nend;\r\n\r\n\r\nFunction DecodeSoundexWord(AValue: Word): string;\r\nbegin\r\n Result := Chr(Ord0+ (AValue mod 7));\r\n AValue := AValue div 7;\r\n Result := Chr(Ord0+ (AValue mod 7)) + Result;\r\n AValue := AValue div 7;\r\n Result := IntToStr(AValue mod 26) + Result;\r\n AValue := AValue div 26;\r\n Result := Chr(OrdA+AValue) + Result;\r\nend;\r\n\r\n\r\nFunction SoundexSimilar(const AText, AOther: string; ALength: TSoundexLength): Boolean;\r\nbegin\r\n Result:=Soundex(AText,ALength)=Soundex(AOther,ALength);\r\nend;\r\n\r\n\r\nFunction SoundexSimilar(const AText, AOther: string): Boolean; //; ALength: TSoundexLength = 4\r\nbegin\r\n Result:=SoundexSimilar(AText,AOther,4);\r\nend;\r\n\r\n\r\nFunction SoundexCompare(const AText, AOther: string; ALength: TSoundexLength): Integer;\r\nbegin\r\n Result:=AnsiCompareStr(Soundex(AText,ALength),Soundex(AOther,ALength));\r\nend;\r\n\r\n\r\nFunction SoundexCompare(const AText, AOther: string): Integer; //; ALength: TSoundexLength = 4\r\nbegin\r\n Result:=SoundexCompare(AText,AOther,4);\r\nend;\r\n\r\n\r\nFunction SoundexProc(const AText, AOther: string): Boolean;\r\nbegin\r\n Result:=SoundexSimilar(AText,AOther);\r\nend;\r\n\r\n{ ---------------------------------------------------------------------\r\n RxStrUtils-like functions.\r\n ---------------------------------------------------------------------}\r\n\r\n\r\n\r\nfunction IsEmptyStr(const S: string; const EmptyChars: Array of char): Boolean;\r\n\r\nvar\r\n i,l: SizeInt;\r\n\r\nbegin\r\n l:=Length(S);\r\n i:=1;\r\n Result:=True;\r\n while Result and (i<=l) do\r\n begin\r\n Result:=CharInSet(S[i],EmptyChars);\r\n Inc(i);\r\n end;\r\nend;\r\n\r\nfunction DelSpace(const S: String): string;\r\n\r\nbegin\r\n Result:=DelChars(S,' ');\r\nend;\r\n\r\nfunction DelChars(const S: string; Chr: Char): string;\r\n\r\nvar\r\n I,J: SizeInt;\r\n\r\nbegin\r\n Result:=S;\r\n I:=Length(Result);\r\n While I>0 do\r\n begin\r\n if Result[I]=Chr then\r\n begin\r\n J:=I-1;\r\n While (J>0) and (Result[J]=Chr) do\r\n Dec(j);\r\n Delete(Result,J+1,I-J);\r\n I:=J+1;\r\n end;\r\n dec(I);\r\n end;\r\nend;\r\n\r\nfunction DelSpace1(const S: string): string;\r\n\r\nvar\r\n I : SizeInt;\r\n\r\nbegin\r\n Result:=S;\r\n for i:=Length(Result) downto 2 do\r\n if (Result[i]=' ') and (Result[I-1]=' ') then\r\n Delete(Result,I,1);\r\nend;\r\n\r\nfunction Tab2Space(const S: string; Numb: Byte): string;\r\n\r\nvar\r\n I: SizeInt;\r\n\r\nbegin\r\n I:=1;\r\n Result:=S;\r\n while I <= Length(Result) do\r\n if Result[I]<>Chr(9) then\r\n inc(I)\r\n else\r\n begin\r\n Result[I]:=' ';\r\n If (Numb>1) then\r\n Insert(StringOfChar(' ',Numb-1),Result,I);\r\n Inc(I,Numb);\r\n end;\r\nend;\r\n\r\nfunction NPos(const C: string; S: string; N: Integer): SizeInt;\r\n\r\nvar\r\n i,p,k: SizeInt;\r\n\r\nbegin\r\n Result:=0;\r\n if N<1 then\r\n Exit;\r\n k:=0;\r\n i:=1;\r\n Repeat\r\n p:=pos(C,S);\r\n Inc(k,p);\r\n if p>0 then\r\n delete(S,1,p);\r\n Inc(i);\r\n Until (i>n) or (p=0);\r\n If (P>0) then\r\n Result:=K;\r\nend;\r\n\r\nfunction AddChar(C: Char; const S: string; N: Integer): string;\r\n\r\nVar\r\n l : SizeInt;\r\n\r\nbegin\r\n Result:=S;\r\n l:=Length(Result);\r\n if lN) do\r\n begin\r\n while (P<=PE) and CharInSet(S[P],WordDelims) do\r\n inc(P);\r\n if (P<=PE) then\r\n inc(Count);\r\n if (Count<>N) then\r\n while (P<=PE) and not CharInSet(S[P],WordDelims) do\r\n inc(P)\r\n else\r\n Result:=(P-PS)+1;\r\n end;\r\nend;\r\n\r\n\r\nfunction ExtractWord(N: Integer; const S: string; const WordDelims: Array of char): string;\r\nvar\r\n i: LongInt;\r\nbegin\r\n Result:=ExtractWordPos(N,S,WordDelims,i);\r\nend;\r\n\r\n\r\nfunction ExtractWordPos(N: Integer; const S: string; const WordDelims: Array of char; out Pos: Integer): string;\r\n\r\nvar\r\n i,j,l: SizeInt;\r\n\r\nbegin\r\n j:=0;\r\n i:=WordPosition(N, S, WordDelims);\r\n if (I>MaxInt) then\r\n begin\r\n Result:='';\r\n Pos:=-1;\r\n Exit;\r\n end;\r\n Pos:=i;\r\n if (i<>0) then\r\n begin\r\n j:=i;\r\n l:=Length(S);\r\n while (j<=L) and not CharInSet(S[j],WordDelims) do\r\n inc(j);\r\n end;\r\n Result:=Copy(S,I,j-I);\r\nend;\r\n\r\n\r\nfunction ExtractDelimited(N: Integer; const S: string; const Delims: Array of char): string;\r\nvar\r\n w,i,l,len: SizeInt;\r\nbegin\r\n w:=0;\r\n i:=1;\r\n l:=0;\r\n len:=Length(S);\r\n SetLength(Result, 0);\r\n while (i<=len) and (w<>N) do\r\n begin\r\n if CharInSet(S[i],Delims) then\r\n inc(w)\r\n else\r\n begin\r\n if (N-1)=w then\r\n begin\r\n inc(l);\r\n Result:=Result+S[i];\r\n end;\r\n end;\r\n inc(i);\r\n end;\r\nend;\r\n\r\n\r\nfunction ExtractSubstr(const S: string; var Pos: Integer; const Delims: Array of char): string;\r\n\r\nvar\r\n i,l: SizeInt;\r\n\r\nbegin\r\n i:=Pos;\r\n l:=Length(S);\r\n while (i<=l) and not CharInSet(S[i],Delims) do\r\n inc(i);\r\n Result:=Copy(S,Pos,i-Pos);\r\n while (i<=l) and CharInSet(S[i],Delims) do\r\n inc(i);\r\n if I>MaxInt then\r\n Pos:=MaxInt\r\n else\r\n Pos:=i;\r\nend;\r\n\r\nfunction isWordPresent(const W, S: string; const WordDelims: Array of char): Boolean;\r\n\r\nvar\r\n i,Count : SizeInt;\r\n\r\nbegin\r\n Result:=False;\r\n Count:=WordCount(S, WordDelims);\r\n I:=1;\r\n While (Not Result) and (I<=Count) do\r\n begin\r\n Result:=ExtractWord(i,S,WordDelims)=W;\r\n Inc(i);\r\n end;\r\nend;\r\n\r\n\r\nfunction Numb2USA(const S: string): string;\r\nvar\r\n i, NA: Integer;\r\nbegin\r\n i:=Length(S);\r\n Result:=S;\r\n NA:=0;\r\n while (i > 0) do begin\r\n if ((Length(Result) - i + 1 - NA) mod 3 = 0) and (i <> 1) then\r\n begin\r\n insert(',', Result, i);\r\n inc(NA);\r\n end;\r\n Dec(i);\r\n end;\r\nend;\r\n\r\nfunction PadCenter(const S: string; Len: SizeInt): string;\r\nbegin\r\n if Length(S)0 do\r\n begin\r\n C:=Number mod Base;\r\n if C>9 then\r\n C:=C+55\r\n else\r\n C:=C+48;\r\n Result:=Chr(C)+Result;\r\n Number:=Number div Base;\r\n end;\r\n end;\r\n if (Result<>'') then\r\n Result:=AddChar('0',Result,Len);\r\nend;\r\n\r\nfunction Numb2Dec(S: string; Base: Byte): Longint;\r\n\r\nvar\r\n i, P: sizeint;\r\n\r\nbegin\r\n i:=Length(S);\r\n Result:=0;\r\n S:=UpperCase(S);\r\n P:=1;\r\n while (i>=1) do\r\n begin\r\n if (S[i]>'@') then\r\n Result:=Result+(Ord(S[i])-55)*P\r\n else\r\n Result:=Result+(Ord(S[i])-48)*P;\r\n Dec(i);\r\n P:=P*Base;\r\n end;\r\nend;\r\n\r\nFunction RomanValues(C : Char) : Word;\r\n\r\nbegin\r\n Case c of\r\n 'C' : Result:=100;\r\n 'D' : Result:=500;\r\n 'I' : Result:=1;\r\n 'L' : Result:=50;\r\n 'M' : Result:=1000;\r\n 'V' : Result:=5;\r\n 'X' : Result:=10;\r\n else\r\n Result:=0;\r\n end;\r\nend;\r\n\r\nfunction RomanToIntDontCare(const S: String): Longint;\r\n{This was the original implementation of RomanToInt,\r\n it is internally used in TryRomanToInt when Strictness = rcsDontCare}\r\nconst\r\n RomanChars = ['C','D','I','L','M','V','X'];\r\n\r\nvar\r\n index, Next: Char;\r\n i,l: SizeInt;\r\n Negative: Boolean;\r\n\r\nbegin\r\n Result:=0;\r\n i:=0;\r\n Negative:=(Length(S)>0) and (S[1]='-');\r\n if Negative then\r\n inc(i);\r\n l:=Length(S);\r\n while (i 8\r\n - from M you can only subtract C\r\n - from D you can only subtract C\r\n - from C you can only subtract X\r\n - from L you can only subtract X\r\n - from X you can only subtract I\r\n - from V you can only subtract I\r\n * The numeral is parsed in \"groups\" (first M's, then D's etc.), the next group to be parsed\r\n must always be of a lower denomination than the previous one.\r\n Example: 'MMDCCXX' is allowed but 'MMCCXXDD' is not\r\n * There can only ever be 3 consecutive M's, C's, X's or I's\r\n * There can only ever be 1 D, 1 L and 1 V\r\n * After IX or IV there can be no more characters\r\n * Negative numbers are not supported\r\n // As a consequence the maximum allowed Roman numeral is MMMCMXCIX = 3999, also N can never become 0 (zero)\r\n\r\n - rcsRelaxed: Like rcsStrict but with the following exceptions:\r\n * An infinite number of (leading) M's is allowed\r\n * Up to 4 consecutive M's, C's, X's and I's are allowed\r\n // So this is allowed: 'MMMMMMCXIIII' = 6124\r\n\r\n - rcsDontCare:\r\n * no checking on the order of \"groups\" is done\r\n * there are no restrictions on the number of consecutive chars\r\n * negative numbers are supported\r\n * an empty string as input will return True and N will be 0\r\n * invalid input will return false\r\n // for backwards comatibility: it supports rather ludicrous input like '-IIIMIII' -> -(2+(1000-1)+3)=-1004\r\n}\r\n\r\nfunction TryRomanToInt(S: String; out N: LongInt; Strictness: TRomanConversionStrictness = rcsRelaxed): Boolean;\r\n\r\nvar\r\n i, Len: SizeInt;\r\n Terminated: Boolean;\r\n\r\nbegin\r\n Result := (False);\r\n S := UpperCase(S); //don't use AnsiUpperCase please\r\n Len := Length(S);\r\n if (Strictness = rcsDontCare) then\r\n begin\r\n N := RomanToIntDontCare(S);\r\n if (N = 0) then\r\n begin\r\n Result := (Len = 0);\r\n end\r\n else\r\n Result := True;\r\n Exit;\r\n end;\r\n if (Len = 0) then Exit;\r\n i := 1;\r\n N := 0;\r\n Terminated := False;\r\n //leading M's\r\n while (i <= Len) and ((Strictness <> rcsStrict) or (i < 4)) and (S[i] = 'M') do\r\n begin\r\n //writeln('TryRomanToInt: Found 1000');\r\n Inc(i);\r\n N := N + 1000;\r\n end;\r\n //then CM or or CD or D or (C, CC, CCC, CCCC)\r\n if (i <= Len) and (S[i] = 'D') then\r\n begin\r\n //writeln('TryRomanToInt: Found 500');\r\n Inc(i);\r\n N := N + 500;\r\n end\r\n else if (i + 1 <= Len) and (S[i] = 'C') then\r\n begin\r\n if (S[i+1] = 'M') then\r\n begin\r\n //writeln('TryRomanToInt: Found 900');\r\n Inc(i,2);\r\n N := N + 900;\r\n end\r\n else if (S[i+1] = 'D') then\r\n begin\r\n //writeln('TryRomanToInt: Found 400');\r\n Inc(i,2);\r\n N := N + 400;\r\n end;\r\n end ;\r\n //next max 4 or 3 C's, depending on Strictness\r\n if (i <= Len) and (S[i] = 'C') then\r\n begin\r\n //find max 4 C's\r\n //writeln('TryRomanToInt: Found 100');\r\n Inc(i);\r\n N := N + 100;\r\n if (i <= Len) and (S[i] = 'C') then\r\n begin\r\n //writeln('TryRomanToInt: Found 100');\r\n Inc(i);\r\n N := N + 100;\r\n end;\r\n if (i <= Len) and (S[i] = 'C') then\r\n begin\r\n //writeln('TryRomanToInt: Found 100');\r\n Inc(i);\r\n N := N + 100;\r\n end;\r\n if (Strictness <> rcsStrict) and (i <= Len) and (S[i] = 'C') then\r\n begin\r\n //writeln('TryRomanToInt: Found 100');\r\n Inc(i);\r\n N := N + 100;\r\n end;\r\n end;\r\n\r\n //then XC or XL\r\n if (i + 1 <= Len) and (S[i] = 'X') then\r\n begin\r\n if (S[i+1] = 'C') then\r\n begin\r\n //writeln('TryRomanToInt: Found 90');\r\n Inc(i,2);\r\n N := N + 90;\r\n end\r\n else if (S[i+1] = 'L') then\r\n begin\r\n //writeln('TryRomanToInt: Found 40');\r\n Inc(i,2);\r\n N := N + 40;\r\n end;\r\n end;\r\n\r\n //then L\r\n if (i <= Len) and (S[i] = 'L') then\r\n begin\r\n //writeln('TryRomanToInt: Found 50');\r\n Inc(i);\r\n N := N + 50;\r\n end;\r\n\r\n //then (X, xx, xxx, xxxx)\r\n if (i <= Len) and (S[i] = 'X') then\r\n begin\r\n //find max 3 or 4 X's, depending on Strictness\r\n //writeln('TryRomanToInt: Found 10');\r\n Inc(i);\r\n N := N + 10;\r\n if (i <= Len) and (S[i] = 'X') then\r\n begin\r\n //writeln('TryRomanToInt: Found 10');\r\n Inc(i);\r\n N := N + 10;\r\n end;\r\n if (i <= Len) and (S[i] = 'X') then\r\n begin\r\n //writeln('TryRomanToInt: Found 10');\r\n Inc(i);\r\n N := N + 10;\r\n end;\r\n if (Strictness <> rcsStrict) and (i <= Len) and (S[i] = 'X') then\r\n begin\r\n //writeln('TryRomanToInt: Found 10');\r\n Inc(i);\r\n N := N + 10;\r\n end;\r\n end;\r\n\r\n //then IX or IV\r\n if (i + 1 <= Len) and (S[i] = 'I') then\r\n begin\r\n if (S[i+1] = 'X') then\r\n begin\r\n Terminated := (True);\r\n //writeln('TryRomanToInt: Found 9');\r\n Inc(i,2);\r\n N := N + 9;\r\n end\r\n else if (S[i+1] = 'V') then\r\n begin\r\n Terminated := (True);\r\n //writeln('TryRomanToInt: Found 4');\r\n Inc(i,2);\r\n N := N + 4;\r\n end;\r\n end;\r\n\r\n //then V\r\n if (not Terminated) and (i <= Len) and (S[i] = 'V') then\r\n begin\r\n //writeln('TryRomanToInt: Found 5');\r\n Inc(i);\r\n N := N + 5;\r\n end;\r\n\r\n\r\n //then I\r\n if (not Terminated) and (i <= Len) and (S[i] = 'I') then\r\n begin\r\n Terminated := (True);\r\n //writeln('TryRomanToInt: Found 1');\r\n Inc(i);\r\n N := N + 1;\r\n //Find max 2 or 3 closing I's, depending on strictness\r\n if (i <= Len) and (S[i] = 'I') then\r\n begin\r\n //writeln('TryRomanToInt: Found 1');\r\n Inc(i);\r\n N := N + 1;\r\n end;\r\n if (i <= Len) and (S[i] = 'I') then\r\n begin\r\n //writeln('TryRomanToInt: Found 1');\r\n Inc(i);\r\n N := N + 1;\r\n end;\r\n if (Strictness <> rcsStrict) and (i <= Len) and (S[i] = 'I') then\r\n begin\r\n //writeln('TryRomanToInt: Found 1');\r\n Inc(i);\r\n N := N + 1;\r\n end;\r\n end;\r\n\r\n //writeln('TryRomanToInt: Len = ',Len,' i = ',i);\r\n Result := (i > Len);\r\n //if Result then writeln('TryRomanToInt: N = ',N);\r\n\r\nend;\r\n\r\nfunction RomanToInt(const S: string; Strictness: TRomanConversionStrictness = rcsRelaxed): Longint;\r\nbegin\r\n if not TryRomanToInt(S, Result, Strictness) then\r\n raise EConvertError.CreateFmt(SInvalidRomanNumeral,[S]);\r\nend;\r\n\r\nfunction RomanToIntDef(const S: String; const ADefault: Longint;\r\n Strictness: TRomanConversionStrictness): Longint;\r\nbegin\r\n if not TryRomanToInt(S, Result, Strictness) then\r\n Result := ADefault;\r\nend;\r\n\r\n\r\n\r\n\r\nfunction intToRoman(Value: Longint): string;\r\n\r\nconst\r\n Arabics : Array[1..13] of Integer\r\n = (1,4,5,9,10,40,50,90,100,400,500,900,1000);\r\n Romans : Array[1..13] of String\r\n = ('I','IV','V','IX','X','XL','L','XC','C','CD','D','CM','M');\r\n\r\nvar\r\n i: Integer;\r\n\r\nbegin\r\n Result:='';\r\n for i:=13 downto 1 do\r\n while (Value >= Arabics[i]) do\r\n begin\r\n Value:=Value-Arabics[i];\r\n Result:=Result+Romans[i];\r\n end;\r\nend;\r\n\r\nfunction intToBin(Value: Longint; Digits, Spaces: Integer): string;\r\n\r\nvar endpos : integer;\r\n p,p2: integer;\r\n k: integer;\r\n\r\nbegin\r\n Result:='';\r\n if (Digits>32) then\r\n Digits:=32;\r\n if (spaces=0) then\r\n begin\r\n result:=inttobin(value,digits);\r\n exit;\r\n end;\r\n endpos:=digits+ (digits-1) div spaces;\r\n setlength(result,endpos);\r\n p:=endpos;\r\n p2:=1;\r\n k:=spaces;\r\n while (p>=p2) do\r\n begin\r\n if k=0 then\r\n begin\r\n Result[p]:=' ';\r\n dec(p);\r\n k:=spaces;\r\n end;\r\n Result[P]:=chr(48+(cardinal(value) and 1));\r\n value:=cardinal(value) shr 1;\r\n dec(p); \r\n dec(k);\r\n end;\r\nend;\r\n\r\nfunction intToBin(Value: Longint; Digits:integer): string;\r\n\r\nvar\r\n p,p2 : integer;\r\n\r\nbegin\r\n result:='';\r\n if digits<=0 then exit;\r\n setlength(result,digits);\r\n p:=digits;\r\n p2:=1;\r\n // typecasts because we want to keep intto* delphi compat and take an integer\r\n while (p>=p2) and (cardinal(value)>0) do \r\n begin\r\n Result[p]:=chr(48+(cardinal(value) and 1));\r\n value:=cardinal(value) shr 1;\r\n dec(p); \r\n end;\r\n digits:=p-p2+1;\r\n While digits>0 do\r\n begin\r\n Result[Digits]:=Chr(48);\r\n Dec(Digits);\r\n end;\r\nend;\r\n\r\nfunction IntToBin(Value: NativeInt; Digits:integer): string;\r\nvar\r\n p,p2 : integer;\r\nbegin\r\n result:='';\r\n if digits<=0 then exit;\r\n setlength(result,digits);\r\n p:=digits;\r\n p2:=1;\r\n // typecasts because we want to keep intto* delphi compat and take a signed val\r\n // and avoid warnings\r\n while (p>=p2) and (value>0) do\r\n begin\r\n Result[p]:=chr(48+(cardinal(value) and 1));\r\n value:=value div 2;\r\n dec(p); \r\n end;\r\n digits:=p-p2+1;\r\n While digits>0 do\r\n result[digits]:=#48;\r\nend;\r\n\r\n\r\nfunction FindPart(const HelpWilds, inputStr: string): SizeInt;\r\nvar\r\n Diff, i, J: SizeInt;\r\n\r\nbegin\r\n Result:=0;\r\n i:=Pos('?',HelpWilds);\r\n if (i=0) then\r\n Result:=Pos(HelpWilds, inputStr)\r\n else\r\n begin\r\n Diff:=Length(inputStr) - Length(HelpWilds);\r\n for i:=0 to Diff do\r\n begin\r\n for J:=1 to Length(HelpWilds) do\r\n if (inputStr[i + J] = HelpWilds[J]) or (HelpWilds[J] = '?') then\r\n begin\r\n if (J=Length(HelpWilds)) then\r\n begin\r\n Result:=i+1;\r\n Exit;\r\n end;\r\n end\r\n else\r\n Break;\r\n end;\r\n end;\r\nend;\r\n\r\nFunction isMatch(level : integer;inputstr,wilds : string; CWild, CinputWord: SizeInt;MaxInputword,maxwilds : SizeInt; Out EOS : Boolean) : Boolean;\r\n\r\nbegin\r\n EOS:=False;\r\n Result:=True;\r\n repeat\r\n if Wilds[CWild] = '*' then { handling of '*' }\r\n begin\r\n inc(CWild);\r\n while Wilds[CWild] = '?' do { equal to '?' }\r\n begin\r\n { goto next letter }\r\n inc(CWild);\r\n inc(CinputWord);\r\n end;\r\n { increase until a match }\r\n Repeat\r\n while (inputStr[CinputWord]<>Wilds[CWild]) and (CinputWord <= MaxinputWord) do\r\n inc(CinputWord);\r\n Result:=isMatch(Level+1,inputstr,wilds,CWild, CinputWord,MaxInputword,maxwilds,EOS);\r\n if not Result then\r\n Inc(cInputWord);\r\n Until Result or (CinputWord>=MaxinputWord);\r\n if Result and EOS then\r\n Exit;\r\n Continue;\r\n end;\r\n if Wilds[CWild] = '?' then { equal to '?' }\r\n begin\r\n { goto next letter }\r\n inc(CWild);\r\n inc(CinputWord);\r\n Continue;\r\n end;\r\n if inputStr[CinputWord] = Wilds[CWild] then { equal letters }\r\n begin\r\n { goto next letter }\r\n inc(CWild);\r\n inc(CinputWord);\r\n Continue;\r\n end;\r\n Result:=false;\r\n Exit;\r\n until (CinputWord > MaxinputWord) or (CWild > MaxWilds);\r\n { no completed evaluation, we need to check what happened }\r\n if (CinputWord <= MaxinputWord) or (CWild < MaxWilds) then\r\n Result:=false\r\n else if (CWild>Maxwilds) then\r\n EOS:=False\r\n else\r\n begin\r\n EOS:=Wilds[CWild]='*';\r\n if not EOS then\r\n Result:=False;\r\n end\r\nend;\r\n\r\nfunction isWild(inputStr, Wilds: string; ignoreCase: boolean): boolean;\r\n\r\nvar\r\n i: SizeInt;\r\n MaxinputWord, MaxWilds: SizeInt; { Length of inputStr and Wilds }\r\n eos : Boolean;\r\n\r\nbegin\r\n Result:=true;\r\n if Wilds = inputStr then\r\n Exit;\r\n { delete '**', because '**' = '*' }\r\n i:=Pos('**', Wilds);\r\n while i > 0 do\r\n begin\r\n Delete(Wilds, i, 1);\r\n i:=Pos('**', Wilds);\r\n end;\r\n if Wilds = '*' then { for fast end, if Wilds only '*' }\r\n Exit;\r\n MaxinputWord:=Length(inputStr);\r\n MaxWilds:=Length(Wilds);\r\n if (MaxWilds = 0) or (MaxinputWord = 0) then\r\n begin\r\n Result:=false;\r\n Exit;\r\n end;\r\n if ignoreCase then { upcase all letters }\r\n begin\r\n inputStr:=UpperCase(inputStr);\r\n Wilds:=UpperCase(Wilds);\r\n end;\r\n Result:=isMatch(1,inputStr,wilds,1,1,MaxinputWord, MaxWilds,EOS);\r\nend;\r\n\r\n\r\nfunction XorString(const Key, Src: String): String;\r\nvar\r\n i: SizeInt;\r\nbegin\r\n Result:=Src;\r\n if Length(Key) > 0 then\r\n for i:=1 to Length(Src) do\r\n Result[i]:=Chr(Ord(Key[1 + ((i - 1) mod Length(Key))]) xor Ord(Src[i]));\r\nend;\r\n\r\nfunction XorEncode(const Key, Source: string): string;\r\n\r\nvar\r\n i: Integer;\r\n C: Byte;\r\n\r\nbegin\r\n Result:='';\r\n for i:=1 to Length(Source) do\r\n begin\r\n if Length(Key) > 0 then\r\n C:=Ord(Key[1 + ((i - 1) mod Length(Key))]) xor Ord(Source[i])\r\n else\r\n C:=Ord(Source[i]);\r\n Result:=Result+LowerCase(intToHex(C, 2));\r\n end;\r\nend;\r\n\r\nfunction XorDecode(const Key, Source: string): string;\r\nvar\r\n i: Integer;\r\n C: Char;\r\nbegin\r\n Result:='';\r\n for i:=0 to Length(Source) div 2 - 1 do\r\n begin\r\n C:=Chr(StrTointDef('$' + Copy(Source, (i * 2) + 1, 2), Ord(' ')));\r\n if Length(Key) > 0 then\r\n C:=Chr(Ord(Key[1 + (i mod Length(Key))]) xor Ord(C));\r\n Result:=Result + C;\r\n end;\r\nend;\r\n\r\nfunction GetCmdLineArg(const Switch: string; SwitchChars: Array of char): string;\r\nvar\r\n i: Integer;\r\n S: string;\r\nbegin\r\n i:=1;\r\n Result:='';\r\n while (Result='') and (i<=ParamCount) do\r\n begin\r\n S:=ParamStr(i);\r\n if (Length(SwitchChars)=0) or (CharInSet(S[1],SwitchChars) and (Length(S) > 1)) and\r\n (CompareText(Copy(S,2,Length(S)-1),Switch)=0) then\r\n begin\r\n inc(i);\r\n if i<=ParamCount then\r\n Result:=ParamStr(i);\r\n end;\r\n inc(i);\r\n end;\r\nend;\r\n\r\nFunction RPosEX(C:char;const S : String;offs:cardinal):SizeInt; overload;\r\n\r\nBegin\r\n Result:=TJSString.New(S).lastIndexOf(c,offs-1)+1;\r\nEnd;\r\n\r\nFunction RPos(c:char;const S : String):SizeInt;\r\n\r\nbegin\r\n Result:=RPosEx(string(C),S,Length(S));\r\nend;\r\n\r\nFunction RPos (Const Substr : String; Const Source : String) : SizeInt; overload;\r\nbegin\r\n Result:=RPosEx(SubStr,Source,Length(Source));\r\nend;\r\n\r\nFunction RPosex (Const Substr : String; Const Source : String;offs:cardinal) : SizeInt; overload;\r\n\r\nbegin\r\n Result:=TJSString.New(Source).lastIndexOf(SubStr,offs-1)+1;\r\nend;\r\n\r\nfunction possetex (const c:Array of char;const s : String;count:Integer ):SizeInt;\r\n\r\nvar i,j:SizeInt;\r\n\r\nbegin\r\n if s='' then\r\n j:=0\r\n else\r\n begin\r\n i:=length(s);\r\n j:=count;\r\n if j>i then\r\n begin\r\n result:=0;\r\n exit;\r\n end;\r\n while (j<=i) and (not CharInSet(s[j],c)) do inc(j);\r\n if (j>i) then\r\n j:=0; // not found.\r\n end;\r\n result:=j;\r\nend;\r\n\r\nfunction PosSetEx (const c:string;const s : String;count:Integer ):SizeInt;\r\n\r\nvar\r\n cset : Array of char;\r\n i,l : SizeInt;\r\nbegin\r\n L:=Length(C);\r\n SetLength(Cset,L);\r\n if L>0 then\r\n for i:=1 to l do\r\n cset[i-1]:=c[i];\r\n Result:=PosSetEx(cset,s,count);\r\nend;\r\n\r\nfunction posset (const c:Array of char;const s : String ):SizeInt;\r\n\r\nbegin\r\n result:=possetex(c,s,1);\r\nend;\r\n\r\nfunction PosSet (const c:string;const s : String ):SizeInt;\r\n\r\nbegin\r\n Result:=PosSetEx(c,S,1);\r\nend;\r\n\r\n\r\nProcedure Removeleadingchars(Var S : String; Const CSet:Array of char);\r\n\r\nvar\r\n I,J : Longint;\r\n\r\nbegin\r\n I:=Length(S);\r\n if (I>0) then\r\n begin\r\n J:=1;\r\n while (J<=I) and CharInSet(S[J],CSet) DO\r\n inc(J);\r\n if J>1 then\r\n Delete(S,1,J-1);\r\n end;\r\nend;\r\n\r\n\r\nfunction TrimLeftSet(const S: String;const CSet:Array of char): String;\r\n\r\nbegin\r\n result:=s;\r\n removeleadingchars(result,cset); \r\nend;\r\n\r\nProcedure RemoveTrailingChars(VAR S : String;Const CSet:Array of char);\r\n\r\nvar\r\n i,j : longint;\r\n\r\nbegin\r\n I:=Length(S);\r\n if (I>0) then\r\n begin\r\n J:=I;\r\n while (j>0) and CharInSet(S[J],CSet) do\r\n dec(J);\r\n if J<>I then\r\n setLength(S,J);\r\n End;\r\nEnd;\r\n\r\nFunction TrimRightSet(const S: String;const CSet:Array of char): String;\r\n\r\nbegin\r\n result:=s;\r\n RemoveTrailingchars(result,cset); \r\nend;\r\n\r\nProcedure RemovePadChars(VAR S : String;Const CSet:Array of char);\r\n\r\nvar\r\n I,J,K: longint;\r\n\r\nbegin\r\n I:=Length(S);\r\n if I=0 then exit;\r\n J:=I;\r\n while (j>0) and CharInset(S[J],CSet) do\r\n dec(J);\r\n if j=0 Then\r\n begin\r\n s:='';\r\n exit;\r\n end;\r\n SetLength(S,J);\r\n I:=J;\r\n k:=1;\r\n while (k<=I) and CharInSet(S[k],CSet) do\r\n inc(k);\r\n if k>1 Then\r\n Delete(S,1,K-1);\r\nend;\r\n\r\nfunction TrimSet(const S: String;const CSet:Array of char): String;\r\n\r\nbegin\r\n Result:=s;\r\n RemovePadChars(Result,cset);\r\nend;\r\n\r\nfunction SplitString(const S, Delimiters: string): TStringDynArray;\r\nbegin\r\n Result:=S.Split(Delimiters);\r\nend;\r\n\r\nfunction StartsText(const ASubText, AText: string): Boolean;\r\nbegin\r\n Result := AnsiStartsText(ASubText, AText);\r\nend;\r\n\r\n\r\nfunction EndsText(const ASubText, AText: string): Boolean;\r\nbegin\r\n Result := AnsiEndsText(ASubText, AText);\r\nend;\r\n\r\nfunction ResemblesText(const AText, AOther: string): Boolean;\r\nbegin\r\n if Assigned(ResemblesProc) then\r\n Result := ResemblesProc(AText, AOther)\r\n else\r\n Result := False;\r\nend;\r\n\r\nfunction ContainsText(const AText, ASubText: string): Boolean;\r\nbegin\r\n Result := AnsiContainsText(AText, ASubText);\r\nend;\r\n\r\nfunction MatchText(const AText: string; const AValues: array of string): Boolean;\r\nbegin\r\n Result := AnsiMatchText(AText, AValues);\r\nend;\r\n\r\nfunction IndexText(const AText: string; const AValues: array of string): Integer;\r\nbegin\r\n Result := AnsiIndexText(AText, AValues);\r\nend;\r\n\r\nfunction ContainsStr(const AText, ASubText: string): Boolean;\r\nbegin\r\n Result := AnsiContainsStr(AText, ASubText);\r\nend;\r\n\r\nFunction StartsStr(const ASubText, AText: string): Boolean;\r\n\r\nbegin\r\n Result := AnsiStartsStr(ASubText, AText);\r\nend;\r\n\r\nFunction EndsStr(const ASubText, AText: string): Boolean;\r\n\r\nbegin\r\n Result := AnsiEndsStr(ASubText, AText);\r\nend;\r\n\r\n\r\ninitialization\r\n AnsiResemblesProc:= @SoundexProc;\r\n ResemblesProc:=@SoundexProc;\r\n\r\nend.\r\n","{********************************************************************}\r\n{ }\r\n{ written by TMS Software }\r\n{ Copyright (c) 2022 }\r\n{ Email : info@tmssoftware.com }\r\n{ Web : http://www.tmssoftware.com }\r\n{ }\r\n{ The source code is given as is. The author is not responsible }\r\n{ for any possible damage done due to the use of this code. }\r\n{ The complete source code remains property of the author and may }\r\n{ not be distributed, published, given or sold in any form as such. }\r\n{ No parts of the source code can be included in any other component }\r\n{ or application without written authorization of the author. }\r\n{********************************************************************}\r\n\r\nunit TimeSpan;\r\n\r\ninterface\r\n\r\ntype\r\n TTimeSpan = record\r\n private\r\n FTicks: Int64;\r\n strict private\r\n function GetDays: Integer;\r\n function GetHours: Integer;\r\n function GetMinutes: Integer;\r\n function GetSeconds: Integer;\r\n function GetMilliseconds: Integer;\r\n function GetTotalDays: Double;\r\n function GetTotalHours: Double;\r\n function GetTotalMinutes: Double;\r\n function GetTotalSeconds: Double;\r\n function GetTotalMilliseconds: Double;\r\n class function GetScaledInterval(const AValue: Double; const AScale: Integer): TTimeSpan; static;\r\n class constructor Create;\r\n class function get_MaxValue: TTimeSpan; static;\r\n class function get_MinValue: TTimeSpan; static;\r\n class function get_Zero: TTimeSpan; static;\r\n strict private class var\r\n FMinValue: Int64;\r\n FMaxValue: Int64;\r\n FZero: Int64;\r\n strict private const\r\n cIntLengthShift = 52 - 1;\r\n MillisecondsPerTick = 0.0001;\r\n SecondsPerTick = 1e-07;\r\n MinutesPerTick = 1.6666666666666667E-09;\r\n HoursPerTick = 2.7777777777777777E-11;\r\n DaysPerTick = 1.1574074074074074E-12;\r\n MillisPerSecond = 1000;\r\n MillisPerMinute = 60 * MillisPerSecond;\r\n MillisPerHour = 60 * MillisPerMinute;\r\n MillisPerDay = 24 * MillisPerHour;\r\n MaxSeconds = 922337203685;\r\n MinSeconds = -922337203685;\r\n MaxMilliseconds = 922337203685477;\r\n MinMilliseconds = -922337203685477;\r\n public const\r\n TicksPerMillisecond = 10000;\r\n TicksPerSecond = 1000 * Int64(TicksPerMillisecond);\r\n TicksPerMinute = 60 * Int64(TicksPerSecond);\r\n TicksPerHour = 60 * Int64(TicksPerMinute);\r\n TicksPerDay = 24 * TicksPerHour;\r\n public\r\n constructor Create(ATicks: Int64); overload;\r\n constructor Create(const AHours, AMinutes, ASeconds: Integer); overload;\r\n constructor Create(const ADays, AHours, AMinutes, ASeconds: Integer); overload;\r\n constructor Create(const ADays, AHours, AMinutes, ASeconds, AMilliseconds: Integer); overload;\r\n\r\n function Add(const ATimeSpan: TTimeSpan): TTimeSpan; overload;\r\n function Duration: TTimeSpan;\r\n function Negate: TTimeSpan;\r\n function Subtract(const ATimeSpan: TTimeSpan): TTimeSpan; overload;\r\n function ToString: string;\r\n\r\n class function FromDays(const AValue: Double): TTimeSpan; static;\r\n class function FromHours(const AValue: Double): TTimeSpan; static;\r\n class function FromMinutes(const AValue: Double): TTimeSpan; static;\r\n class function FromSeconds(const AValue: Double): TTimeSpan; static;\r\n class function FromMilliseconds(const AValue: Double): TTimeSpan; static;\r\n class function FromTicks(const AValue: Int64): TTimeSpan; static;\r\n class function Subtract(const ADateTimeLeft, ADateTimeRight: TDateTime): TTimeSpan; overload; static;\r\n\r\n class function Parse(const AValue: string): TTimeSpan; static;\r\n class function TryParse(const AValue: string; out ATimeSpan: TTimeSpan): Boolean; static;\r\n\r\n property Ticks: Int64 read FTicks;\r\n property Days: Integer read GetDays;\r\n property Hours: Integer read GetHours;\r\n property Minutes: Integer read GetMinutes;\r\n property Seconds: Integer read GetSeconds;\r\n property Milliseconds: Integer read GetMilliseconds;\r\n property TotalDays: Double read GetTotalDays;\r\n property TotalHours: Double read GetTotalHours;\r\n property TotalMinutes: Double read GetTotalMinutes;\r\n property TotalSeconds: Double read GetTotalSeconds;\r\n property TotalMilliseconds: Double read GetTotalMilliseconds;\r\n\r\n class property MinValue: TTimeSpan read get_MinValue;\r\n class property MaxValue: TTimeSpan read get_MaxValue;\r\n class property Zero: TTimeSpan read get_Zero;\r\n end;\r\n\r\nimplementation\r\n\r\nuses\r\n SysUtils, Math;\r\n\r\nresourcestring\r\n SCannotNegateTimespan = 'Negating the minimum value of a Timespan is invalid';\r\n SInvalidTimespanDuration = 'The duration cannot be returned because the absolute value exceeds the value of TTimeSpan.MaxValue';\r\n SInvalidTimespanFormat = 'Invalid Timespan format';\r\n STimespanElementTooLong = 'Timespan element too long';\r\n STimespanTooLong = 'Timespan too long';\r\n STimespanValueCannotBeNan = 'Value cannot be NaN';\r\n\r\ntype\r\n TTimeSpanParser = record\r\n public type\r\n TParseError = (peNone, peFormat, peOverflow, peOverflowHMS);\r\n private\r\n FStr: string;\r\n FPos: Integer;\r\n public\r\n function CurrentChar: Char; inline;\r\n function NextChar: Char; inline;\r\n function NextNonDigit: Char;\r\n function Convert(const AValue: string): Int64;\r\n function TryConvert(const AString: string; out AValue: Int64): TParseError;\r\n function NextInt(AMaxValue: Integer; out AValue: Integer): TParseError;\r\n function ConvertTime(out ATime: Int64): TParseError;\r\n procedure SkipWhite;\r\n end;\r\n\r\n{ TTimeSpanParser }\r\n\r\nfunction TTimeSpanParser.CurrentChar: Char;\r\nbegin\r\n if (FPos>= Low(string)) and (FPos <= High(FStr)) then\r\n Result := FStr[FPos]\r\n else\r\n Result := #0;\r\nend;\r\n\r\nfunction TTimeSpanParser.NextChar: Char;\r\nbegin\r\n if FPos <= High(FStr) then\r\n Inc(FPos);\r\n Result := CurrentChar;\r\nend;\r\n\r\nfunction TTimeSpanParser.NextNonDigit: Char;\r\nvar\r\n lCount: Integer;\r\nbegin\r\n for lCount := FPos to High(FStr) do\r\n begin\r\n Result := FStr[lCount];\r\n if (Result < '0') or (Result > '9') then\r\n Exit;\r\n end;\r\n Result := #0;\r\nend;\r\n\r\nfunction TTimeSpanParser.Convert(const AValue: string): Int64;\r\nbegin\r\n Result := 0;\r\n case TryConvert(AValue, Result) of\r\n peFormat:\r\n raise Exception.Create(sInvalidTimespanFormat);\r\n peOverflow:\r\n raise EIntOverflow.Create(sTimespanTooLong);\r\n peOverflowHMS:\r\n raise EIntOverflow.Create(sTimespanElementTooLong);\r\n end;\r\nend;\r\n\r\nfunction TTimeSpanParser.NextInt(AMaxValue: Integer; out AValue: Integer): TParseError;\r\nvar\r\n lChar: Char;\r\n lStartPos: Integer;\r\nbegin\r\n AValue := 0;\r\n lStartPos := FPos;\r\n lChar := CurrentChar;\r\n while (lChar >= '0') and (lChar <= '9') do\r\n begin\r\n if AValue and $F0000000 <> 0 then\r\n Exit(peOverflow);\r\n AValue := AValue * 10 + (Ord(lChar) - $30);\r\n if AValue < 0 then\r\n Exit(peOverflow);\r\n lChar := NextChar;\r\n end;\r\n if FPos = lStartPos then\r\n Exit(peFormat);\r\n if AValue > AMaxValue then\r\n Exit(peOverflow);\r\n Result := peNone;\r\nend;\r\n\r\nfunction TTimeSpanParser.ConvertTime(out ATime: Int64): TParseError;\r\nvar\r\n lChar: Char;\r\n lPart: Integer;\r\nbegin\r\n ATime := 0;\r\n Result := NextInt(23, lPart);\r\n if Result <> peNone then\r\n begin\r\n if Result = peOverflow then\r\n Result := peOverflowHMS;\r\n Exit;\r\n end;\r\n ATime := lPart * TTimeSpan.TicksPerHour;\r\n if CurrentChar <> ':' then\r\n Exit(peFormat);\r\n NextChar;\r\n Result := NextInt(59, lPart);\r\n if Result <> peNone then\r\n begin\r\n if Result = peOverflow then\r\n Result := peOverflowHMS;\r\n Exit;\r\n end;\r\n ATime := ATime + lPart * TTimeSpan.TicksPerMinute;\r\n if CurrentChar = ':' then\r\n begin\r\n if NextChar <> '.' then\r\n begin\r\n Result := NextInt(59, lPart);\r\n if Result <> peNone then\r\n begin\r\n if Result = peOverflow then\r\n Result := peOverflowHMS;\r\n Exit;\r\n end;\r\n ATime := ATime + lPart * TTimeSpan.TicksPerSecond;\r\n end;\r\n if CurrentChar = '.' then\r\n begin\r\n lChar := NextChar;\r\n lPart := TTimeSpan.TicksPerSecond;\r\n while (lPart > 1) and ((lChar >= '0') and (lChar <= '9')) do\r\n begin\r\n lPart := lPart div 10;\r\n ATime := ATime + (Ord(lChar) - $30) * lPart;\r\n lChar := NextChar;\r\n end;\r\n end;\r\n end;\r\n Result := peNone;\r\nend;\r\n\r\nprocedure TTimeSpanParser.SkipWhite;\r\nvar\r\n lChar: Char;\r\nbegin\r\n lChar := CurrentChar;\r\n while (lChar= ' ') or (lChar = #9) do\r\n lChar := NextChar;\r\nend;\r\n\r\nfunction TTimeSpanParser.TryConvert(const AString: string; out AValue: Int64): TParseError;\r\nvar\r\n lDays: Integer;\r\n lIsNegative: Boolean;\r\n lTicks: Int64;\r\n lTimeVal: Int64;\r\nbegin\r\n lTicks := 0;\r\n AValue := 0;\r\n FStr := AString;\r\n FPos := Low(string);\r\n SkipWhite;\r\n lIsNegative := False;\r\n if CurrentChar = '-' then\r\n begin\r\n lIsNegative := True;\r\n NextChar;\r\n end;\r\n if NextNonDigit = ':' then\r\n begin\r\n Result := ConvertTime(lTicks);\r\n if Result <> peNone then\r\n Exit;\r\n end\r\n else\r\n begin\r\n Result := NextInt($a2e3ff, lDays);\r\n if Result <> peNone then\r\n Exit;\r\n lTicks := lDays * TTimeSpan.TicksPerDay;\r\n if CurrentChar = '.' then\r\n begin\r\n NextChar;\r\n Result := ConvertTime(lTimeVal);\r\n if Result <> peNone then\r\n Exit;\r\n lTicks := lTicks + lTimeVal;\r\n end;\r\n end;\r\n if lIsNegative then\r\n begin\r\n lTicks := -lTicks;\r\n if lTicks > 0 then\r\n Exit(peOverflow);\r\n end\r\n else if lTicks < 0 then\r\n Exit(peOverflow);\r\n SkipWhite;\r\n if FPos <= High(FStr) then\r\n Exit(peFormat);\r\n AValue := lTicks;\r\n Result := peNone;\r\nend;\r\n\r\n{ TTimeSpan }\r\n\r\nconstructor TTimeSpan.Create(ATicks: Int64);\r\nbegin\r\n FTicks := ATicks;\r\nend;\r\n\r\nconstructor TTimeSpan.Create(const AHours, AMinutes, ASeconds: Integer);\r\nbegin\r\n FTicks := Int64(AHours) * SecsPerHour + Int64(AMinutes) * SecsPerMin + ASeconds;\r\n if (FTicks > MaxSeconds) or (FTicks < MinSeconds) then\r\n raise EArgumentOutOfRangeException.Create(STimespanTooLong);\r\n FTicks := FTicks * TicksPerSecond;\r\nend;\r\n\r\nconstructor TTimeSpan.Create(const ADays, AHours, AMinutes, ASeconds: Integer);\r\nbegin\r\n Create(ADays, AHours, AMinutes, ASeconds, 0);\r\nend;\r\n\r\nconstructor TTimeSpan.Create(const ADays, AHours, AMinutes, ASeconds, AMilliseconds: Integer);\r\nvar\r\n lTicks: Int64;\r\nbegin\r\n lTicks := (Int64(ADays) * SecsPerDay + Int64(AHours) * SecsPerHour + Int64(AMinutes) * SecsPerMin + ASeconds) * MillisPerSecond + AMilliseconds;\r\n if (lTicks > MaxMilliseconds) or (lTicks < MinMilliseconds) then\r\n raise EArgumentOutOfRangeException.Create(sTimespanTooLong);\r\n FTicks := lTicks * TicksPerMillisecond;\r\nend;\r\n\r\nfunction TTimeSpan.Add(const ATimeSpan: TTimeSpan): TTimeSpan;\r\nvar\r\n lNewTicks: Int64;\r\nbegin\r\n lNewTicks := FTicks + ATimeSpan.FTicks;\r\n if ((FTicks shr cIntLengthShift) = (ATimeSpan.FTicks shr cIntLengthShift)) and ((FTicks shr cIntLengthShift) <> (lNewTicks shr cIntLengthShift)) then\r\n raise EArgumentOutOfRangeException.Create(STimespanTooLong);\r\n Result := TTimeSpan.Create(lNewTicks);\r\nend;\r\n\r\nfunction TTimeSpan.Duration: TTimeSpan;\r\nbegin\r\n if FTicks = MinValue.FTicks then\r\n raise EIntOverflow.Create(SInvalidTimespanDuration);\r\n if FTicks < 0 then\r\n Result := TTimeSpan.Create(-FTicks)\r\n else\r\n Result := TTimeSpan.Create(FTicks);\r\nend;\r\n\r\nclass function TTimeSpan.FromDays(const AValue: Double): TTimeSpan;\r\nbegin\r\n Result := GetScaledInterval(AValue, MillisPerDay);\r\nend;\r\n\r\nclass function TTimeSpan.FromHours(const AValue: Double): TTimeSpan;\r\nbegin\r\n Result := GetScaledInterval(AValue, MillisPerHour);\r\nend;\r\n\r\nclass function TTimeSpan.FromMilliseconds(const AValue: Double): TTimeSpan;\r\nbegin\r\n Result := GetScaledInterval(AValue, 1);\r\nend;\r\n\r\nclass function TTimeSpan.FromMinutes(const AValue: Double): TTimeSpan;\r\nbegin\r\n Result := GetScaledInterval(AValue, MillisPerMinute);\r\nend;\r\n\r\nclass function TTimeSpan.FromSeconds(const AValue: Double): TTimeSpan;\r\nbegin\r\n Result := GetScaledInterval(AValue, MillisPerSecond);\r\nend;\r\n\r\nclass function TTimeSpan.FromTicks(const AValue: Int64): TTimeSpan;\r\nbegin\r\n Result := TTimeSpan.Create(AValue);\r\nend;\r\n\r\nfunction TTimeSpan.GetDays: Integer;\r\nbegin\r\n Result := Integer(FTicks div TicksPerDay);\r\nend;\r\n\r\nfunction TTimeSpan.GetHours: Integer;\r\nbegin\r\n Result := Integer((FTicks div TicksPerHour) mod HoursPerDay);\r\nend;\r\n\r\nfunction TTimeSpan.GetMilliseconds: Integer;\r\nbegin\r\n Result := Integer((FTicks div TicksPerMillisecond) mod MillisPerSecond);\r\nend;\r\n\r\nfunction TTimeSpan.GetMinutes: Integer;\r\nbegin\r\n Result := Integer((FTicks div TicksPerMinute) mod MinsPerHour);\r\nend;\r\n\r\nfunction TTimeSpan.GetSeconds: Integer;\r\nbegin\r\n Result := Integer((FTicks div TicksPerSecond) mod SecsPerMin);\r\nend;\r\n\r\nfunction TTimeSpan.GetTotalDays: Double;\r\nbegin\r\n Result := FTicks * DaysPerTick;\r\nend;\r\n\r\nfunction TTimeSpan.GetTotalHours: Double;\r\nbegin\r\n Result := FTicks * HoursPerTick;\r\nend;\r\n\r\nfunction TTimeSpan.GetTotalMilliseconds: Double;\r\nbegin\r\n Result := MillisecondsPerTick;\r\n Result := FTicks * Result;\r\n if Result > MaxMilliseconds then\r\n Result := MaxMilliseconds\r\n else if Result < MinMilliseconds then\r\n Result := MinMilliseconds;\r\nend;\r\n\r\nfunction TTimeSpan.GetTotalMinutes: Double;\r\nbegin\r\n Result := FTicks * MinutesPerTick;\r\nend;\r\n\r\nfunction TTimeSpan.GetTotalSeconds: Double;\r\nbegin\r\n Result := FTicks * SecondsPerTick;\r\nend;\r\n\r\nclass constructor TTimeSpan.Create;\r\nbegin\r\n FMinValue := High(Int64);\r\n FMaxValue := Low(Int64);\r\nend;\r\n\r\nclass function TTimeSpan.GetScaledInterval(const AValue: Double; const AScale: Integer): TTimeSpan;\r\nvar\r\n lNewValue: Double;\r\nbegin\r\n if IsNan(AValue) then\r\n raise EArgumentException.Create(STimespanValueCannotBeNan);\r\n lNewValue := AValue * AScale;\r\n if AValue >= 0.0 then\r\n lNewValue := lNewValue + 0.5\r\n else\r\n lNewValue := lNewValue - 0.5;\r\n if (lNewValue > MaxMilliseconds) or (lNewValue < MinMilliseconds) then\r\n raise EArgumentOutOfRangeException.Create(STimespanElementTooLong);\r\n Result := TTimeSpan.Create(Trunc(lNewValue) * TicksPerMillisecond);\r\nend;\r\n\r\nclass function TTimeSpan.get_MaxValue: TTimeSpan;\r\nbegin\r\n Result.FTicks := FMaxValue;\r\nend;\r\n\r\nclass function TTimeSpan.get_MinValue: TTimeSpan;\r\nbegin\r\n Result.FTicks := FMinValue;\r\nend;\r\n\r\nclass function TTimeSpan.get_Zero: TTimeSpan;\r\nbegin\r\n Result.FTicks := FZero;\r\nend;\r\n\r\nfunction TTimeSpan.Negate: TTimeSpan;\r\nbegin\r\n if FTicks = MinValue.FTicks then\r\n raise EIntOverflow.Create(SCannotNegateTimespan);\r\n Result := TTimeSpan.Create(-FTicks);\r\nend;\r\n\r\nclass function TTimeSpan.Parse(const AValue: string): TTimeSpan;\r\nvar\r\n lParser: TTimeSpanParser;\r\nbegin\r\n Result := TTimeSpan.Create(lParser.Convert(AValue));\r\nend;\r\n\r\nfunction TTimeSpan.Subtract(const ATimeSpan: TTimeSpan): TTimeSpan;\r\nvar\r\n lNewTicks: Int64;\r\nbegin\r\n lNewTicks := FTicks - ATimeSpan.FTicks;\r\n if ((FTicks shr cIntLengthShift) <> (ATimeSpan.FTicks shr cIntLengthShift)) and ((FTicks shr cIntLengthShift) <> (lNewTicks shr cIntLengthShift)) then\r\n raise EArgumentOutOfRangeException.Create(sTimespanTooLong);\r\n Result := TTimeSpan.Create(lNewTicks);\r\nend;\r\n\r\nfunction TTimeSpan.ToString: string;\r\nvar\r\n lFormat: string;\r\n lDays: Int64;\r\n lSecondTicks: Int64;\r\n lTicks: Int64;\r\nbegin\r\n lFormat := '%1:.2d:%2:.2d:%3:.2d';\r\n lDays := FTicks div TicksPerDay;\r\n lTicks := FTicks mod TicksPerDay;\r\n if FTicks < 0 then\r\n lTicks := -lTicks;\r\n if lDays <> 0 then\r\n lFormat := '%0:d.' + lFormat;\r\n lSecondTicks := lTicks mod TicksPerSecond;\r\n if lSecondTicks <> 0 then\r\n lFormat := lFormat + '.%4:.7d';\r\n Result := string.Format(lFormat, [lDays, (lTicks div TicksPerHour) mod HoursPerDay,\r\n (lTicks div TicksPerMinute) mod MinsPerHour, (lTicks div TicksPerSecond) mod SecsPerMin,\r\n lSecondTicks]);\r\nend;\r\n\r\nclass function TTimeSpan.TryParse(const AValue: string; out ATimeSpan: TTimeSpan): Boolean;\r\nvar\r\n lTicks: Int64;\r\n lParser: TTimeSpanParser;\r\nbegin\r\n Result := lParser.TryConvert(AValue, lTicks) = TTimeSpanParser.TParseError.peNone;\r\n if Result then\r\n ATimeSpan := TTimeSpan.Create(lTicks)\r\n else\r\n ATimeSpan := Zero;\r\nend;\r\n\r\nclass function TTimeSpan.Subtract(const ADateTimeLeft, ADateTimeRight: TDateTime): TTimeSpan;\r\nbegin\r\n Result := TTimeSpan.Create(Trunc(TimeStampToMSecs(DateTimeToTimeStamp(ADateTimeLeft)) - TimeStampToMSecs(DateTimeToTimeStamp(ADateTimeRight))) * TicksPerMillisecond);\r\nend;\r\n\r\nend.\r\n\r\n","unit Generics.Defaults;\r\n\r\n{$MODE DELPHI}\r\n\r\ninterface\r\n\r\n//uses Classes;\r\n\r\ntype\r\n\r\n { IComparer }\r\n\r\n IComparer = interface ['{505778ED-F783-4456-9691-32F419CC5E18}']\r\n function Compare(const Left, Right: T): Integer; overload;\r\n end;\r\n\r\n TOnComparison = reference to function(const Left, Right: T): Integer;\r\n\r\n { TComparer }\r\n\r\n TComparer = class(TInterfacedObject, IComparer)\r\n private\r\n type TMyComparer = TComparer;\r\n class var DefaultComparer: TMyComparer;\r\n public\r\n class function Default: IComparer; static;\r\n function Compare(const ALeft, ARight: T): Integer; virtual; abstract; overload;\r\n\r\n class function Construct(const AComparison: TOnComparison): IComparer; overload;\r\n end;\r\n\r\n { TDefaultComparer }\r\n\r\n TDefaultComparer = class(TComparer)\r\n public\r\n function Compare(const ALeft, ARight: T): Integer; override; overload;\r\n end;\r\n\r\n { TDelegatedComparerEvents }\r\n\r\n TDelegatedComparerEvents = class(TComparer)\r\n private\r\n FComparison: TOnComparison;\r\n public\r\n function Compare(const ALeft, ARight: T): Integer; override;\r\n constructor Create(AComparison: TOnComparison);\r\n end;\r\n\r\n IEnumerator = interface\r\n function GetCurrent: T;\r\n function MoveNext: Boolean;\r\n procedure Reset;\r\n property Current: T read GetCurrent;\r\n end;\r\n\r\n IEnumerable = interface\r\n function GetEnumerator: IEnumerator;\r\n end;\r\n\r\nimplementation\r\n\r\n{ TComparer }\r\n\r\nclass function TComparer.Default: IComparer;\r\nbegin\r\n if DefaultComparer=nil then\r\n DefaultComparer:=TDefaultComparer.Create;\r\n Result:=DefaultComparer;\r\nend;\r\n\r\nclass function TComparer.Construct(const AComparison: TOnComparison\r\n ): IComparer;\r\nbegin\r\n Result := TDelegatedComparerEvents.Create(AComparison);\r\nend;\r\n\r\n{ TDefaultComparer }\r\n\r\nfunction TDefaultComparer.Compare(const ALeft, ARight: T): Integer;\r\nbegin\r\n asm\r\n if (ALeft < ARight) return -1;\r\n if (ALeft > ARight) return 1;\r\n end;\r\n Result:=0;\r\n if ALeft = ARight then exit;\r\nend;\r\n\r\n{ TDelegatedComparerEvents }\r\n\r\nfunction TDelegatedComparerEvents.Compare(const ALeft, ARight: T\r\n ): Integer;\r\nbegin\r\n Result := FComparison(ALeft, ARight);\r\nend;\r\n\r\nconstructor TDelegatedComparerEvents.Create(AComparison: TOnComparison);\r\nbegin\r\n Inherited create;\r\n FComparison := AComparison;\r\nend;\r\n\r\n\r\nend.\r\n\r\n","unit XData.Model.Types;\r\n\r\n{$I XData.inc}\r\n\r\ninterface\r\n\r\nuses\r\n Generics.Collections,\r\n SysUtils, Bcl.SysUtils,\r\n Bcl.Collections.Common,\r\n XData.Model.Classes;\r\n\r\ntype\r\n TXDataPrimitiveType = class(TXDataScalarType)\r\n public\r\n destructor Destroy; override;\r\n end;\r\n\r\n TXDataBinaryType = class(TXDataPrimitiveType)\r\n strict protected\r\n function GetName: string; override;\r\n function GetTypeKind: TXTypeKind; override;\r\n public\r\n function ValueToLiteral(Value: TBytes; var Literal: string): boolean;\r\n function LiteralToValue(const Literal: string; var Value: TBytes): boolean;\r\n end;\r\n\r\n TXDataBooleanType = class(TXDataPrimitiveType)\r\n strict protected\r\n function GetName: string; override;\r\n function GetTypeKind: TXTypeKind; override;\r\n public\r\n function ValueToLiteral(Value: Boolean; var Literal: string): boolean;\r\n function LiteralToValue(const Literal: string; var Value: boolean): boolean;\r\n end;\r\n\r\n TXDataByteType = class(TXDataPrimitiveType)\r\n strict protected\r\n function GetName: string; override;\r\n function GetTypeKind: TXTypeKind; override;\r\n public\r\n function ValueToLiteral(Value: byte; var Literal: string): boolean;\r\n function LiteralToValue(const Literal: string; var Value: byte): boolean;\r\n end;\r\n\r\n TXDataDateTimeType = class(TXDataPrimitiveType)\r\n strict protected\r\n function GetName: string; override;\r\n function GetTypeKind: TXTypeKind; override;\r\n public\r\n function ValueToLiteral(Value: TDateTime; var Literal: string): boolean;\r\n function LiteralToValue(const Literal: string; var Value: TDateTime): boolean;\r\n end;\r\n\r\n TXDataDateType = class(TXDataPrimitiveType)\r\n strict protected\r\n function GetName: string; override;\r\n function GetTypeKind: TXTypeKind; override;\r\n public\r\n function ValueToLiteral(Value: TDate; var Literal: string): boolean;\r\n function LiteralToValue(const Literal: string; var Value: TDate): boolean;\r\n end;\r\n\r\n TXDataCurrencyType = class(TXDataPrimitiveType)\r\n strict protected\r\n function GetName: string; override;\r\n function GetTypeKind: TXTypeKind; override;\r\n {$IFNDEF PAS2JS}\r\n strict private\r\n FFormatSettings: TFormatSettings;\r\n public\r\n procedure AfterConstruction; override;\r\n function ValueToLiteral(Value: Currency; var Literal: string): boolean;\r\n function LiteralToValue(const Literal: string; var Value: Currency): boolean;\r\n {$ENDIF}\r\n end;\r\n\r\n TXDataDoubleType = class(TXDataPrimitiveType)\r\n strict protected\r\n function GetName: string; override;\r\n function GetTypeKind: TXTypeKind; override;\r\n public\r\n function ValueToLiteral(Value: Double; var Literal: string): boolean;\r\n function LiteralToValue(const Literal: string; var Value: double): boolean;\r\n end;\r\n\r\n TXDataGuidType = class(TXDataPrimitiveType)\r\n strict protected\r\n function GetName: string; override;\r\n function GetTypeKind: TXTypeKind; override;\r\n public\r\n {$IFDEF PAS2JS}\r\n function ValueToLiteral(Value: string; var Literal: string): boolean;\r\n function LiteralToValue(const Literal: string; var Value: string): boolean;\r\n {$ELSE}\r\n function ValueToLiteral(Value: TGuid; var Literal: string): boolean;\r\n function LiteralToValue(const Literal: string; var Value: TGuid): boolean;\r\n {$ENDIF}\r\n end;\r\n\r\n TXDataVariantType = class(TXDataPrimitiveType)\r\n strict protected\r\n function GetName: string; override;\r\n function GetTypeKind: TXTypeKind; override;\r\n public\r\n {$IFNDEF PAS2JS}\r\n function ValueToLiteral(Value: Variant; var Literal: string): boolean;\r\n function LiteralToValue(const Literal: string; var Value: Variant): boolean;\r\n {$ELSE}\r\n function ValueToLiteral(Value: JSValue; var Literal: string): boolean;\r\n function LiteralToValue(const Literal: string; var Value: JSValue): boolean;\r\n {$ENDIF}\r\n end;\r\n\r\n TXDataInt16Type = class(TXDataPrimitiveType)\r\n strict protected\r\n function GetName: string; override;\r\n function GetTypeKind: TXTypeKind; override;\r\n public\r\n function ValueToLiteral(Value: Integer; var Literal: string): boolean;\r\n function LiteralToValue(const Literal: string; var Value: Integer): boolean;\r\n end;\r\n\r\n TXDataInt32Type = class(TXDataPrimitiveType)\r\n strict protected\r\n function GetName: string; override;\r\n function GetTypeKind: TXTypeKind; override;\r\n public\r\n function ValueToLiteral(const Value: Integer; var Literal: string): boolean;\r\n function LiteralToValue(const Literal: string; var Value: integer): boolean;\r\n end;\r\n\r\n TXDataInt64Type = class(TXDataPrimitiveType)\r\n strict protected\r\n function GetName: string; override;\r\n function GetTypeKind: TXTypeKind; override;\r\n public\r\n {$IFDEF PAS2JS}\r\n function ValueToLiteral(const Value: Integer; var Literal: string): boolean;\r\n function LiteralToValue(const Literal: string; var Value: integer): boolean;\r\n {$ELSE}\r\n function ValueToLiteral(Value: Int64; var Literal: string): boolean;\r\n function LiteralToValue(const Literal: string; var Value: Int64): boolean;\r\n {$ENDIF}\r\n end;\r\n\r\n TXDataSByteType = class(TXDataPrimitiveType)\r\n strict protected\r\n function GetName: string; override;\r\n function GetTypeKind: TXTypeKind; override;\r\n public\r\n function ValueToLiteral(Value: ShortInt; var Literal: string): boolean;\r\n function LiteralToValue(const Literal: string; var Value: ShortInt): boolean;\r\n end;\r\n\r\n TXDataStringType = class(TXDataPrimitiveType)\r\n strict protected\r\n function GetName: string; override;\r\n function GetTypeKind: TXTypeKind; override;\r\n public\r\n function ValueToLiteral(const Value: string; var Literal: string): boolean;\r\n function LiteralToValue(const Literal: string; var Value: string): boolean;\r\n end;\r\n\r\n TXDataTimeType = class(TXDataPrimitiveType)\r\n strict protected\r\n function GetName: string; override;\r\n function GetTypeKind: TXTypeKind; override;\r\n public\r\n function ValueToLiteral(Value: TTime; var Literal: string): boolean;\r\n function LiteralToValue(const Literal: string; var Value: TTime): boolean;\r\n end;\r\n\r\n TXDataStreamType = class(TXDataPrimitiveType)\r\n strict protected\r\n function GetName: string; override;\r\n function GetTypeKind: TXTypeKind; override;\r\n end;\r\n\r\n TXDataRawType = class(TXDataPrimitiveType)\r\n strict protected\r\n function GetName: string; override;\r\n function GetTypeKind: TXTypeKind; override;\r\n end;\r\n\r\n TXDataTypeMap = TStringMap;\r\n\r\n TXDataPrimitiveTypes = class\r\n strict private\r\n class var\r\n FInstance: TXDataPrimitiveTypes;\r\n strict private\r\n FTypes: TXDataTypeMap;\r\n FTypeList: TList;\r\n FBinaryType: TXDataBinaryType;\r\n FBooleanType: TXDataBooleanType;\r\n FByteType: TXDataByteType;\r\n FDateTimeType: TXDataDateTimeType;\r\n FDateType: TXDataDateType;\r\n FDoubleType: TXDataDoubleType;\r\n FInt16Type: TXDataInt16Type;\r\n FInt32Type: TXDataInt32Type;\r\n FInt64Type: TXDataInt64Type;\r\n FSByteType: TXDataSByteType;\r\n FStringType: TXDataStringType;\r\n FTimeType: TXDataTimeType;\r\n FStreamType: TXDataStreamType;\r\n FRawType: TXDataRawType;\r\n FGuidType: TXDataGuidType;\r\n FCurrencyType: TXDataCurrencyType;\r\n FVariantType: TXDataVariantType;\r\n procedure PrivateCreate;\r\n procedure PrivateDestroy;\r\n procedure AddType(const Key: string; Value: TXDataPrimitiveType);\r\n function GetTypes: TList;\r\n public\r\n class function Instance: TXDataPrimitiveTypes;\r\n class procedure ClassDestroy;\r\n function Find(const AName: string): TXDataPrimitiveType; overload;\r\n destructor Destroy; override;\r\n property Types: TList read GetTypes;\r\n property BinaryType: TXDataBinaryType read FBinaryType;\r\n property BooleanType: TXDataBooleanType read FBooleanType;\r\n property ByteType: TXDataByteType read FByteType;\r\n property DateTimeType: TXDataDateTimeType read FDateTimeType;\r\n property DateType: TXDataDateType read FDateType;\r\n property DoubleType: TXDataDoubleType read FDoubleType;\r\n property Int16Type: TXDataInt16Type read FInt16Type;\r\n property Int32Type: TXDataInt32Type read FInt32Type;\r\n property Int64Type: TXDataInt64Type read FInt64Type;\r\n property SByteType: TXDataSByteType read FSByteType;\r\n property StringType: TXDataStringType read FStringType;\r\n property TimeType: TXDataTimeType read FTimeType;\r\n property StreamType: TXDataStreamType read FStreamType;\r\n property RawType: TXDataRawType read FRawType;\r\n property GuidType: TXDataGuidType read FGuidType;\r\n property CurrencyType: TXDataCurrencyType read FCurrencyType;\r\n property VariantType: TXDataVariantType read FVariantType;\r\n end;\r\n\r\n// helper methods for some base types. Should refactor this to a better place later\r\nfunction LiteralQuote(const Str: string): string;\r\nfunction LiteralUnquote(var Str: string): boolean;\r\n\r\nimplementation\r\n\r\nuses\r\n {$IFDEF PAS2JS}\r\n JS,\r\n {$ELSE}\r\n System.Variants,\r\n {$ENDIF}\r\n Bcl.Utils;\r\n\r\nfunction LiteralUnquote(var Str: string): boolean;\r\nvar\r\n Len: integer;\r\nbegin\r\n Result := True;\r\n Len := Length(Str);\r\n if (Len >= 2) and (Str[1] = '''') and (Str[Len] = '''') then\r\n begin\r\n Str := Copy(Str, 2, Len - 2);\r\n Str := StringReplace(Str, '''''', '''', [rfReplaceAll]);\r\n end;\r\nend;\r\n\r\nfunction LiteralQuote(const Str: string): string;\r\nbegin\r\n Result := StringReplace(Str, '''', '''''', [rfReplaceAll]);\r\n Result := '''' + Result + '''';\r\nend;\r\n\r\n{ TXDataPrimitiveTypes }\r\n\r\nprocedure TXDataPrimitiveTypes.AddType(const Key: string;\r\n Value: TXDataPrimitiveType);\r\nbegin\r\n FTypes.Add(Key, Value);\r\n FTypeList.Add(Value);\r\nend;\r\n\r\ndestructor TXDataPrimitiveTypes.Destroy;\r\nbegin\r\n PrivateDestroy;\r\n inherited;\r\nend;\r\n\r\nclass procedure TXDataPrimitiveTypes.ClassDestroy;\r\nbegin\r\n if FInstance <> nil then\r\n begin\r\n FInstance.Free;\r\n FInstance := nil;\r\n end;\r\nend;\r\n\r\nfunction TXDataPrimitiveTypes.Find(const AName: string): TXDataPrimitiveType;\r\nbegin\r\n if FTypes.ContainsKey(Lowercase(AName)) then\r\n Result := TXDataPrimitiveType(FTypes[Lowercase(AName)])\r\n else\r\n Result := nil;\r\nend;\r\n\r\nfunction TXDataPrimitiveTypes.GetTypes: TList;\r\nbegin\r\n Result := FTypeList;\r\nend;\r\n\r\nclass function TXDataPrimitiveTypes.Instance: TXDataPrimitiveTypes;\r\nbegin\r\n if FInstance = nil then\r\n begin\r\n FInstance := TXDataPrimitiveTypes.Create;\r\n FInstance.PrivateCreate;\r\n end;\r\n Result := FInstance;\r\nend;\r\n\r\nprocedure TXDataPrimitiveTypes.PrivateCreate;\r\nbegin\r\n FTypes := TXDataTypeMap.Create(False);\r\n FTypeList := TList.Create;\r\n\r\n FBinaryType := TXDataBinaryType.Create;\r\n FBooleanType := TXDataBooleanType.Create;\r\n FByteType := TXDataByteType.Create;\r\n FDateTimeType := TXDataDateTimeType.Create;\r\n FDateType := TXDataDateType.Create;\r\n FDoubleType := TXDataDoubleType.Create;\r\n FInt16Type := TXDataInt16Type.Create;\r\n FInt32Type := TXDataInt32Type.Create;\r\n FInt64Type := TXDataInt64Type.Create;\r\n FSByteType := TXDataSByteType.Create;\r\n FStringType := TXDataStringType.Create;\r\n FTimeType := TXDataTimeType.Create;\r\n FStreamType := TXDataStreamType.Create;\r\n FRawType := TXDataRawType.Create;\r\n FGuidType := TXDataGuidType.Create;\r\n FCurrencyType := TXDataCurrencyType.Create;\r\n FVariantType := TXDataVariantType.Create;\r\n\r\n AddType(Lowercase(FBinaryType.Name), FBinaryType);\r\n AddType(Lowercase(FBooleanType.Name), FBooleanType);\r\n AddType(Lowercase(FByteType.Name), FByteType);\r\n AddType(Lowercase(FDateTimeType.Name), FDateTimeType);\r\n AddType(Lowercase(FDateType.Name), FDateType);\r\n AddType(Lowercase(FDoubleType.Name), FDoubleType);\r\n AddType(Lowercase(FInt16Type.Name), FInt16Type);\r\n AddType(Lowercase(FInt32Type.Name), FInt32Type);\r\n AddType(Lowercase(FInt64Type.Name), FInt64Type);\r\n AddType(Lowercase(FSByteType.Name), FSByteType);\r\n AddType(Lowercase(FStringType.Name), FStringType);\r\n AddType(Lowercase(FTimeType.Name), FTimeType);\r\n AddType(Lowercase(FStreamType.Name), FStreamType);\r\n AddType(Lowercase(FRawType.Name), FRawType);\r\n AddType(Lowercase(FGuidType.Name), FGuidType);\r\n AddType(Lowercase(FCurrencyType.Name), FCurrencyType);\r\n AddType(Lowercase(FVariantType.Name), FVariantType);\r\nend;\r\n\r\nprocedure TXDataPrimitiveTypes.PrivateDestroy;\r\nbegin\r\n FTypeList.Free;\r\n FTypes.Free;\r\n FVariantType.Free;\r\n FCurrencyType.Free;\r\n FGuidType.Free;\r\n FBinaryType.Free;\r\n FBooleanType.Free;\r\n FByteType.Free;\r\n FDateTimeType.Free;\r\n FDateType.Free;\r\n FDoubleType.Free;\r\n FInt16Type.Free;\r\n FInt32Type.Free;\r\n FInt64Type.Free;\r\n FSByteType.Free;\r\n FStringType.Free;\r\n FTimeType.Free;\r\n FStreamType.Free;\r\n FRawType.Free;\r\nend;\r\n\r\n{ TXDataStreamType }\r\n\r\nfunction TXDataStreamType.GetName: string;\r\nbegin\r\n Result := 'Stream';\r\nend;\r\n\r\nfunction TXDataStreamType.GetTypeKind: TXTypeKind;\r\nbegin\r\n Result := TXTypeKind.xtStream;\r\nend;\r\n\r\n{ TXDataBinaryType }\r\n\r\nfunction TXDataBinaryType.GetName: string;\r\nbegin\r\n Result := 'Binary';\r\nend;\r\n\r\nfunction TXDataBinaryType.GetTypeKind: TXTypeKind;\r\nbegin\r\n Result := TXTypeKind.xtBinary;\r\nend;\r\n\r\nfunction TXDataBinaryType.LiteralToValue(const Literal: string;\r\n var Value: TBytes): boolean;\r\nbegin\r\n Value := TBclUtils.DecodeBase64(Literal);\r\n Result := true;\r\nend;\r\n\r\nfunction TXDataBinaryType.ValueToLiteral(Value: TBytes;\r\n var Literal: string): boolean;\r\nbegin\r\n Literal := TBclUtils.EncodeBase64(Value);\r\n Result := true;\r\nend;\r\n\r\n{ TXDataBooleanType }\r\n\r\nfunction TXDataBooleanType.GetName: string;\r\nbegin\r\n Result := 'Boolean';\r\nend;\r\n\r\nfunction TXDataBooleanType.GetTypeKind: TXTypeKind;\r\nbegin\r\n Result := TXTypeKind.xtBoolean;\r\nend;\r\n\r\nfunction TXDataBooleanType.LiteralToValue(const Literal: string;\r\n var Value: boolean): boolean;\r\nbegin\r\n if SameText(Literal, 'true') then\r\n begin\r\n Value := true;\r\n Result := true;\r\n end\r\n else\r\n if SameText(Literal, 'false') then\r\n begin\r\n Value := false;\r\n Result := true;\r\n end\r\n else\r\n Result := false;\r\nend;\r\n\r\nfunction TXDataBooleanType.ValueToLiteral(Value: Boolean; var Literal: string): boolean;\r\nbegin\r\n if Value then\r\n Literal := 'true'\r\n else\r\n Literal := 'false';\r\n Result := true;\r\nend;\r\n\r\n{ TXDataByteType }\r\n\r\nfunction TXDataByteType.GetName: string;\r\nbegin\r\n Result := 'Byte';\r\nend;\r\n\r\nfunction TXDataByteType.GetTypeKind: TXTypeKind;\r\nbegin\r\n Result := TXTypeKind.xtByte;\r\nend;\r\n\r\nfunction TXDataByteType.LiteralToValue(const Literal: string; var Value: byte): boolean;\r\nvar\r\n V: integer;\r\nbegin\r\n Result := TryStrToInt(Literal, V);\r\n Value := byte(V);\r\nend;\r\n\r\nfunction TXDataByteType.ValueToLiteral(Value: byte; var Literal: string): boolean;\r\nbegin\r\n Literal := IntToStr(Value);\r\n Result := True;\r\nend;\r\n\r\n{ TXDataDateTimeType }\r\n\r\nfunction TXDataDateTimeType.GetName: string;\r\nbegin\r\n Result := 'DateTime'; // DateTimeOffset\r\nend;\r\n\r\nfunction TXDataDateTimeType.GetTypeKind: TXTypeKind;\r\nbegin\r\n Result := TXTypeKind.xtDateTime;\r\nend;\r\n\r\nfunction TXDataDateTimeType.LiteralToValue(const Literal: string;\r\n var Value: TDateTime): boolean;\r\nbegin\r\n Result := TBclUtils.TryISOToDateTime(Literal, Value);\r\nend;\r\n\r\nfunction TXDataDateTimeType.ValueToLiteral(Value: TDateTime;\r\n var Literal: string): boolean;\r\nbegin\r\n Result := true;\r\n Literal := TBclUtils.DateTimeToISO(Value, false);\r\nend;\r\n\r\n{ TXDataCurrencyType }\r\n\r\n{$IFNDEF PAS2JS}\r\nprocedure TXDataCurrencyType.AfterConstruction;\r\nbegin\r\n inherited;\r\n TBclUtils.InitFormatSettings(FFormatSettings);\r\n FFormatSettings.DecimalSeparator := '.';\r\n FFormatSettings.ThousandSeparator := #0;\r\nend;\r\n{$ENDIF}\r\n\r\nfunction TXDataCurrencyType.GetName: string;\r\nbegin\r\n Result := 'Currency';\r\nend;\r\n\r\nfunction TXDataCurrencyType.GetTypeKind: TXTypeKind;\r\nbegin\r\n Result := TXTypeKind.xtCurrency;\r\nend;\r\n\r\n{$IFNDEF PAS2JS}\r\nfunction TXDataCurrencyType.LiteralToValue(const Literal: string; var Value: Currency): boolean;\r\nbegin\r\n Result := TryStrToCurr(Literal, Value, FFormatSettings);\r\nend;\r\n{$ENDIF}\r\n\r\n{$IFNDEF PAS2JS}\r\nfunction TXDataCurrencyType.ValueToLiteral(Value: Currency; var Literal: string): boolean;\r\nbegin\r\n Literal := CurrToStr(Value, FFormatSettings);\r\n Result := true;\r\nend;\r\n{$ENDIF}\r\n\r\n{ TXDataDoubleType }\r\n\r\nfunction TXDataDoubleType.GetName: string;\r\nbegin\r\n Result := 'Double';\r\nend;\r\n\r\nfunction TXDataDoubleType.GetTypeKind: TXTypeKind;\r\nbegin\r\n Result := TXTypeKind.xtDouble;\r\nend;\r\n\r\nfunction TXDataDoubleType.LiteralToValue(const Literal: string;\r\n var Value: double): boolean;\r\nbegin\r\n Result := TryStrToNumber(Literal, Value);\r\nend;\r\n\r\nfunction TXDataDoubleType.ValueToLiteral(Value: Double;\r\n var Literal: string): boolean;\r\nbegin\r\n Literal := NumberToStr(Value);\r\n Result := true;\r\nend;\r\n\r\n{ TXDataGuidType }\r\n\r\nfunction TXDataGuidType.GetName: string;\r\nbegin\r\n Result := 'Guid';\r\nend;\r\n\r\nfunction TXDataGuidType.GetTypeKind: TXTypeKind;\r\nbegin\r\n Result := TXTypeKind.xtGuid;\r\nend;\r\n\r\n{$IFDEF PAS2JS}\r\nfunction TXDataGuidType.LiteralToValue(const Literal: string;\r\n var Value: string): boolean;\r\nbegin\r\n Result := True;\r\n case Length(Literal) of\r\n 36: Value := Literal;\r\n 38: Value := Copy(Literal, 2, 36);\r\n else\r\n Result := False;\r\n end;\r\nend;\r\n\r\nfunction TXDataGuidType.ValueToLiteral(Value: string;\r\n var Literal: string): boolean;\r\nbegin\r\n Result := True;\r\n case Length(Value) of\r\n 36: Literal := Value;\r\n 38: Literal := Copy(Value, 2, 36);\r\n else\r\n Result := False;\r\n end;\r\nend;\r\n{$ELSE}\r\nfunction TXDataGuidType.LiteralToValue(const Literal: string;\r\n var Value: TGuid): boolean;\r\nbegin\r\n Result := TBclUtils.TryStringToGuid(Literal, Value);\r\nend;\r\n\r\nfunction TXDataGuidType.ValueToLiteral(Value: TGuid;\r\n var Literal: string): boolean;\r\nbegin\r\n Literal := Copy(GuidToString(Value), 2, 36);\r\n Result := true;\r\nend;\r\n{$ENDIF}\r\n\r\n{ TXDataInt16Type }\r\n\r\nfunction TXDataInt16Type.GetName: string;\r\nbegin\r\n Result := 'Int16';\r\nend;\r\n\r\nfunction TXDataInt16Type.GetTypeKind: TXTypeKind;\r\nbegin\r\n Result := TXTypeKind.xtInt16;\r\nend;\r\n\r\nfunction TXDataInt16Type.LiteralToValue(const Literal: string;\r\n var Value: integer): boolean;\r\nbegin\r\n Result := TryStrToInt(Literal, Value);\r\nend;\r\n\r\nfunction TXDataInt16Type.ValueToLiteral(Value: Integer;\r\n var Literal: string): boolean;\r\nbegin\r\n Literal := IntToStr(Value);\r\n Result := True;\r\nend;\r\n\r\n{ TXDataInt32Type }\r\n\r\nfunction TXDataInt32Type.GetName: string;\r\nbegin\r\n Result := 'Int32';\r\nend;\r\n\r\nfunction TXDataInt32Type.GetTypeKind: TXTypeKind;\r\nbegin\r\n Result := TXTypeKind.xtInt32;\r\nend;\r\n\r\nfunction TXDataInt32Type.LiteralToValue(const Literal: string;\r\n var Value: integer): boolean;\r\nbegin\r\n Result := TryStrToInt(Literal, Value);\r\nend;\r\n\r\nfunction TXDataInt32Type.ValueToLiteral(const Value: Integer;\r\n var Literal: string): boolean;\r\nbegin\r\n Literal := IntToStr(Value);\r\n Result := True;\r\nend;\r\n\r\n{ TXDataInt64Type }\r\n\r\nfunction TXDataInt64Type.GetName: string;\r\nbegin\r\n Result := 'Int64';\r\nend;\r\n\r\nfunction TXDataInt64Type.GetTypeKind: TXTypeKind;\r\nbegin\r\n Result := TXTypeKind.xtInt64;\r\nend;\r\n\r\n{$IFDEF PAS2JS}\r\nfunction TXDataInt64Type.LiteralToValue(const Literal: string;\r\n var Value: Integer): boolean;\r\nbegin\r\n Result := TryStrToInt(Literal, Value);\r\nend;\r\n\r\nfunction TXDataInt64Type.ValueToLiteral(const Value: Integer;\r\n var Literal: string): boolean;\r\nbegin\r\n Literal := IntToStr(Value);\r\n Result := True;\r\nend;\r\n{$ELSE}\r\nfunction TXDataInt64Type.LiteralToValue(const Literal: string;\r\n var Value: Int64): boolean;\r\nbegin\r\n Result := TryStrToInt64(Literal, Value);\r\nend;\r\n\r\nfunction TXDataInt64Type.ValueToLiteral(Value: Int64;\r\n var Literal: string): boolean;\r\nbegin\r\n Literal := IntToStr(Value);\r\n Result := True;\r\nend;\r\n{$ENDIF}\r\n\r\n{ TXDataSByteType }\r\n\r\nfunction TXDataSByteType.GetName: string;\r\nbegin\r\n Result := 'SByte';\r\nend;\r\n\r\nfunction TXDataSByteType.GetTypeKind: TXTypeKind;\r\nbegin\r\n Result := TXTypeKind.xtSByte;\r\nend;\r\n\r\nfunction TXDataSByteType.LiteralToValue(const Literal: string; var Value: ShortInt): boolean;\r\nvar\r\n V: integer;\r\nbegin\r\n Result := TryStrToInt(Literal, V);\r\n Value := ShortInt(V);\r\nend;\r\n\r\nfunction TXDataSByteType.ValueToLiteral(Value: ShortInt; var Literal: string): boolean;\r\nbegin\r\n Literal := IntToStr(Value);\r\n Result := True;\r\nend;\r\n\r\n{ TXDataStringType }\r\n\r\nfunction TXDataStringType.GetName: string;\r\nbegin\r\n Result := 'String';\r\nend;\r\n\r\nfunction TXDataStringType.GetTypeKind: TXTypeKind;\r\nbegin\r\n Result := TXTypeKind.xtText;\r\nend;\r\n\r\nfunction TXDataStringType.LiteralToValue(const Literal: string;\r\n var Value: string): boolean;\r\nbegin\r\n Value := Literal;\r\n Result := true;\r\nend;\r\n\r\nfunction TXDataStringType.ValueToLiteral(const Value: string;\r\n var Literal: string): boolean;\r\nbegin\r\n // strictly we should convert it to UTF-8. Let's keep it this way as a trade-off for speed\r\n Literal := Value;\r\n Result := true;\r\nend;\r\n\r\n{ TXDataTimeType }\r\n\r\nfunction TXDataTimeType.GetName: string;\r\nbegin\r\n Result := 'Time';\r\nend;\r\n\r\nfunction TXDataTimeType.GetTypeKind: TXTypeKind;\r\nbegin\r\n Result := TXTypeKind.xtTime;\r\nend;\r\n\r\nfunction TXDataTimeType.LiteralToValue(const Literal: string;\r\n var Value: TTime): boolean;\r\nbegin\r\n Result := TBclUtils.TryISOToTime(Literal, Value);\r\nend;\r\n\r\nfunction TXDataTimeType.ValueToLiteral(Value: TTime;\r\n var Literal: string): boolean;\r\nbegin\r\n Result := true;\r\n Literal := TBclUtils.TimeToISO(Value);\r\nend;\r\n\r\n{ TXDataDateType }\r\n\r\nfunction TXDataDateType.GetName: string;\r\nbegin\r\n Result := 'Date';\r\nend;\r\n\r\nfunction TXDataDateType.GetTypeKind: TXTypeKind;\r\nbegin\r\n Result := TXTypeKind.xtDate;\r\nend;\r\n\r\nfunction TXDataDateType.LiteralToValue(const Literal: string; var Value: TDate): boolean;\r\nbegin\r\n Result := TBclUtils.TryISOToDate(Literal, Value);\r\nend;\r\n\r\nfunction TXDataDateType.ValueToLiteral(Value: TDate; var Literal: string): boolean;\r\nbegin\r\n Result := true;\r\n Literal := TBclUtils.DateToISO(Value);\r\nend;\r\n\r\n{ TXDataVariantType }\r\n\r\nfunction TXDataVariantType.GetName: string;\r\nbegin\r\n Result := 'Variant';\r\nend;\r\n\r\nfunction TXDataVariantType.GetTypeKind: TXTypeKind;\r\nbegin\r\n Result := TXTypeKind.xtVariant;\r\nend;\r\n\r\n{$IFDEF PAS2JS}\r\nfunction TXDataVariantType.LiteralToValue(const Literal: string;\r\n var Value: JSValue): boolean;\r\nvar\r\n T: TXDataPrimitiveTypes;\r\n BoolValue: Boolean;\r\n Int32Value: Integer;\r\n Int64Value: Integer;\r\n DoubleValue: Double;\r\n StringValue: string;\r\nbegin\r\n T := TXDataPrimitiveTypes.Instance;\r\n Result := True;\r\n if Literal = 'null' then\r\n Value := nil\r\n else\r\n if T.BooleanType.LiteralToValue(Literal, BoolValue) then\r\n Value := BoolValue\r\n else\r\n if T.Int32Type.LiteralToValue(Literal, Int32Value) then\r\n Value := Int32Value\r\n else\r\n if T.Int64Type.LiteralToValue(Literal, Int64Value) then\r\n Value := Int64Value\r\n else\r\n if T.DoubleType.LiteralToValue(Literal, DoubleValue) then\r\n Value := DoubleValue\r\n else\r\n if T.StringType.LiteralToValue(Literal, StringValue) and LiteralUnquote(StringValue) then\r\n Value := StringValue\r\n else\r\n Result := False;\r\nend;\r\n\r\nfunction TXDataVariantType.ValueToLiteral(Value: JSValue;\r\n var Literal: string): boolean;\r\nvar\r\n T: TXDataPrimitiveTypes;\r\nbegin\r\n T := TXDataPrimitiveTypes.Instance;\r\n Result := True;\r\n case GetValueType(Value) of\r\n jvtNull:\r\n Literal := 'null';\r\n jvtBoolean:\r\n Result := T.BooleanType.ValueToLiteral(Boolean(Value), Literal);\r\n jvtInteger:\r\n Result := T.Int32Type.ValueToLiteral(NativeInt(Value), Literal);\r\n jvtFloat:\r\n Result := T.DoubleType.ValueToLiteral(Double(Value), Literal);\r\n jvtString:\r\n begin\r\n Result := T.StringType.ValueToLiteral(string(Value), Literal);\r\n Literal := LiteralQuote(Literal);\r\n end;\r\n else\r\n Result := False;\r\n end;\r\nend;\r\n{$ELSE}\r\nfunction TXDataVariantType.LiteralToValue(const Literal: string;\r\n var Value: Variant): boolean;\r\nvar\r\n T: TXDataPrimitiveTypes;\r\n BoolValue: Boolean;\r\n Int32Value: Integer;\r\n Int64Value: Int64;\r\n DoubleValue: Double;\r\n GuidValue: TGuid;\r\n StringValue: string;\r\nbegin\r\n T := TXDataPrimitiveTypes.Instance;\r\n Result := True;\r\n if Literal = 'null' then\r\n Value := NULL\r\n else\r\n if T.BooleanType.LiteralToValue(Literal, BoolValue) then\r\n Value := BoolValue\r\n else\r\n if T.Int32Type.LiteralToValue(Literal, Int32Value) then\r\n Value := Int32Value\r\n else\r\n if T.Int64Type.LiteralToValue(Literal, Int64Value) then\r\n Value := Int64Value\r\n else\r\n if T.DoubleType.LiteralToValue(Literal, DoubleValue) then\r\n Value := DoubleValue\r\n else\r\n if T.GuidType.LiteralToValue(Literal, GuidValue) then\r\n Value := GuidToString(GuidValue)\r\n else\r\n if T.StringType.LiteralToValue(Literal, StringValue) and LiteralUnquote(StringValue) then\r\n Value := StringValue\r\n else\r\n Result := False;\r\nend;\r\n\r\nfunction TXDataVariantType.ValueToLiteral(Value: Variant;\r\n var Literal: string): boolean;\r\nvar\r\n VarData: TVarData;\r\n T: TXDataPrimitiveTypes;\r\nbegin\r\n T := TXDataPrimitiveTypes.Instance;\r\n VarData := TVarData(Value);\r\n Result := True;\r\n case VarType(Value) of\r\n varEmpty, varNull:\r\n Literal := 'null';\r\n varBoolean:\r\n Result := T.BooleanType.ValueToLiteral(VarData.VBoolean, Literal);\r\n varShortInt:\r\n Result := T.Int32Type.ValueToLiteral(VarData.VShortInt, Literal);\r\n varSmallint:\r\n Result := T.Int32Type.ValueToLiteral(VarData.VSmallInt, Literal);\r\n varInteger:\r\n Result := T.Int32Type.ValueToLiteral(VarData.VInteger, Literal);\r\n varSingle:\r\n Result := T.DoubleType.ValueToLiteral(VarData.VSingle, Literal);\r\n varDouble:\r\n Result := T.DoubleType.ValueToLiteral(VarData.VDouble, Literal);\r\n varCurrency:\r\n Result := T.CurrencyType.ValueToLiteral(VarData.VCurrency, Literal);\r\n// varDate:\r\n// Result := T.DaType.ValueToLiteral(VarData.VCurrency, Literal);\r\n// Writer.WriteDouble(VarData.VDate);\r\n varOleStr:\r\n begin\r\n Result := T.StringType.ValueToLiteral(VarData.VOleStr, Literal);\r\n Literal := LiteralQuote(Literal);\r\n end;\r\n varError:\r\n Result := T.Int32Type.ValueToLiteral(VarData.VError, Literal);\r\n varByte:\r\n Result := T.Int32Type.ValueToLiteral(VarData.VByte, Literal);\r\n varWord:\r\n Result := T.Int32Type.ValueToLiteral(VarData.VWord, Literal);\r\n varLongWord:\r\n Result := T.Int32Type.ValueToLiteral(VarData.VLongWord, Literal);\r\n varInt64:\r\n Result := T.Int64Type.ValueToLiteral(VarData.VInt64, Literal);\r\n varUInt64:\r\n Result := T.Int64Type.ValueToLiteral(VarData.VUInt64, Literal);\r\n varString:\r\n begin\r\n {$IFNDEF NEXTGEN}\r\n Result := T.StringType.ValueToLiteral(string(AnsiString(VarData.VString)), Literal);\r\n {$ELSE}\r\n Result := T.StringType.ValueToLiteral(string(VarData.VString), Literal);\r\n {$ENDIF}\r\n Literal := LiteralQuote(Literal);\r\n end;\r\n varUString:\r\n begin\r\n Result := T.StringType.ValueToLiteral(UnicodeString(VarData.VUString), Literal);\r\n Literal := LiteralQuote(Literal);\r\n end\r\n else\r\n Result := False;\r\n end;\r\nend;\r\n{$ENDIF}\r\n\r\n{ TXDataRawType }\r\n\r\nfunction TXDataRawType.GetName: string;\r\nbegin\r\n Result := 'Raw';\r\nend;\r\n\r\nfunction TXDataRawType.GetTypeKind: TXTypeKind;\r\nbegin\r\n Result := TXTypeKind.xtRaw;\r\nend;\r\n\r\n{ TXDataPrimitiveType }\r\n\r\ndestructor TXDataPrimitiveType.Destroy;\r\nbegin\r\n{$IFNDEF PAS2JS}\r\n UrlConverter.Free;\r\n{$ENDIF}\r\n inherited;\r\nend;\r\n\r\n{$IFNDEF PAS2JS}\r\ninitialization\r\nfinalization\r\n TXDataPrimitiveTypes.ClassDestroy;\r\n{$ENDIF}\r\n\r\nend.\r\n\r\n","{********************************************************************}\r\n{ }\r\n{ written by TMS Software }\r\n{ copyright (c) 2017 - 2021 }\r\n{ Email : info@tmssoftware.com }\r\n{ Web : http://www.tmssoftware.com }\r\n{ }\r\n{ The source code is given as is. The author is not responsible }\r\n{ for any possible damage done due to the use of this code. }\r\n{ The complete source code remains property of the author and may }\r\n{ not be distributed, published, given or sold in any form as such. }\r\n{ No parts of the source code can be included in any other component }\r\n{ or application without written authorization of the author. }\r\n{********************************************************************}\r\n\r\nunit WEBLib.TMSFNCPersistence;\r\n\r\n{$I WEBLib.TMSFNCDefines.inc}\r\n\r\n{$IFDEF WEBLIB}\r\n{$DEFINE CMNWEBLIB}\r\n{$DEFINE LCLWEBLIB}\r\n{$ENDIF}\r\n{$IFDEF CMNLIB}\r\n{$DEFINE CMNWEBLIB}\r\n{$ENDIF}\r\n{$IFDEF LCLLIB}\r\n{$DEFINE LCLWEBLIB}\r\n{$ENDIF}\r\n\r\ninterface\r\n\r\nuses\r\n {$IFDEF MSWINDOWS}\r\n Windows,\r\n {$ENDIF}\r\n {$IFDEF LCLLIB}\r\n fgl,\r\n {$IFNDEF MSWINDOWS}\r\n LCLIntF,\r\n {$ENDIF}\r\n {$ENDIF}\r\n {$IFNDEF LCLLIB}\r\n Generics.Collections,\r\n {$ENDIF}\r\n Classes, TypInfo, Variants, SysUtils,\r\n WEBLib.TMSFNCTypes,\r\n WEBLib.TMSFNCJSONReader,\r\n WEBLib.TMSFNCJSONWriter\r\n {$IFDEF FNCLIB}\r\n {$IFDEF WEBLIB}\r\n ,WEBLib.JSON\r\n {$ENDIF}\r\n {$IFDEF FMXLIB}\r\n ,JSON\r\n {$ENDIF}\r\n {$IFDEF VCLLIB}\r\n ,JSON\r\n {$ENDIF}\r\n {$IFDEF LCLLIB}\r\n ,fpjson\r\n {$ENDIF}\r\n {$ENDIF}\r\n ;\r\n\r\ntype\r\n ITMSFNCPersistence = interface\r\n ['{363F04AF-B8A7-4C47-A2D6-8ED9C44CEFF6}']\r\n procedure SaveSettingsToFile(AFileName: string; AAppearanceOnly: Boolean = False);\r\n procedure LoadSettingsFromFile(AFileName: string);\r\n procedure SaveSettingsToStream(AStream: TStream; AAppearanceOnly: Boolean = False);\r\n procedure LoadSettingsFromStream(AStream: TStream);\r\n function CanSaveProperty(AObject: TObject; APropertyName: string; APropertyType: TTypeKind): Boolean;\r\n function CanLoadProperty(AObject: TObject; APropertyName: string; APropertyType: TTypeKind): Boolean;\r\n end;\r\n\r\n ITMSFNCCustomReadWriteIO = interface\r\n ['{3BC2E91F-A937-47EE-A4CB-6F705B154901}']\r\n procedure CustomWriteProperty(AObject: TObject; APropertyName: string; APropertyKind: TTypeKind; AWriter: TTMSFNCJSONWriter; var ACanWrite: Boolean);\r\n procedure CustomReadProperty(AObject: TObject; APropertyName: string; APropertyKind: TTypeKind; AReader: TTMSFNCJSONReader; var ACanRead: Boolean);\r\n end;\r\n\r\n ITMSFNCBaseListIO = interface\r\n ['{FAB1D21E-D798-4CE0-B17B-9D75E4456AB4}']\r\n function GetItemClass: TClass;\r\n end;\r\n\r\n ITMSFNCBasePersistenceIO = interface\r\n ['{91DEAFC3-8932-45F4-A3ED-5AAA0C0E9250}']\r\n function CreateObject(const AClassName: string; const ABaseClass: TClass): TObject;\r\n end;\r\n\r\n ITMSFNCBaseCollectionIO = interface\r\n ['{90FDF257-7362-411D-B7F6-E2BEE2265016}']\r\n function AddItem(const AObject: TObject): TCollectionItem;\r\n end;\r\n\r\n ITMSFNCPersistenceIO = interface(ITMSFNCBasePersistenceIO)\r\n ['{11B625F8-447A-4AE5-BB88-5ECDEA979AF7}']\r\n function NeedsObjectReference(const AClass: TClass): Boolean;\r\n function GetObjectReference(const AObject: TObject): string;\r\n function FindObject(const AReference: string): TObject;\r\n procedure FixOwners(const AObject: TObject; const AObjectList: TObject);\r\n end;\r\n\r\n ETMSFNCReaderException = class(Exception)\r\n end;\r\n\r\n {$IFDEF WEBLIB}\r\n TTMSFNCPropertyInfo = TTypeMemberProperty;\r\n {$ENDIF}\r\n {$IFNDEF WEBLIB}\r\n TTMSFNCPropertyInfo = PPropInfo;\r\n {$ENDIF}\r\n\r\n TTMSFNCStringObjectDictionary = class(TDictionary);\r\n TTMSFNCIntegerObjectDictionary = class(TDictionary);\r\n TTMSFNCIntegerIntegerDictionary = class(TDictionary);\r\n TTMSFNCIntegerBooleanDictionary = class(TDictionary);\r\n TTMSFNCIntegerDoubleDictionary = class(TDictionary);\r\n TTMSFNCObjectList = class(TObjectList);\r\n TTMSFNCStringList = class(TList);\r\n TTMSFNCIntegerList = class(TList);\r\n TTMSFNCDoubleList = class(TList);\r\n\r\n TTMSFNCObjectArray = array of TObject;\r\n\r\n TTMSFNCWriterCustomWritePropertyEvent = procedure(AObject: TObject; APropertyName: string; APropertyKind: TTypeKind; AWriter: TTMSFNCJSONWriter; var ACanWrite: Boolean) of object;\r\n TTMSFNCWriterCustomIsAssignablePropertyEvent = procedure(AObject: TObject; APropertyName: string; var AIsAssignable: Boolean) of object;\r\n\r\n TTMSFNCExcludePropertyListArray = array of string;\r\n\r\n TTMSFNCWriter = class\r\n private\r\n FWriter: TTMSFNCJSONWriter;\r\n FWriterRef: Boolean;\r\n FIOReference: TObject;\r\n FOnCustomWriteProperty: TTMSFNCWriterCustomWritePropertyEvent;\r\n FRootObject: TObject;\r\n FExcludeProperties: TTMSFNCExcludePropertyListArray;\r\n FOnCustomIsAssignableProperty: TTMSFNCWriterCustomIsAssignablePropertyEvent;\r\n procedure SetRootObject(const Value: TObject);\r\n procedure SetExcludeProperties(\r\n const Value: TTMSFNCExcludePropertyListArray);\r\n procedure SetIOReference(const Value: TObject);\r\n property Writer: TTMSFNCJSONWriter read FWriter;\r\n procedure WritePropInfoValue(AInstance: TObject; const APropInfo: TTMSFNCPropertyInfo);\r\n procedure WriteProperties(AObject: TObject);\r\n procedure WriteProperty(AObject: TObject; AProp: TTMSFNCPropertyInfo);\r\n procedure WriteGenericObjectList(AList: TTMSFNCObjectList);\r\n procedure WriteGenericStringList(AList: TTMSFNCStringList);\r\n procedure WriteGenericIntegerList(AList: TTMSFNCIntegerList);\r\n procedure WriteGenericDoubleList(AList: TTMSFNCDoubleList);\r\n procedure WriteStrings(AList: TStrings);\r\n procedure WriteGenericStringObjectDictionary(ADictionary: TTMSFNCStringObjectDictionary);\r\n procedure WriteGenericIntegerObjectDictionary(ADictionary: TTMSFNCIntegerObjectDictionary);\r\n procedure WriteGenericIntegerIntegerDictionary(ADictionary: TTMSFNCIntegerIntegerDictionary);\r\n procedure WriteGenericIntegerBooleanDictionary(ADictionary: TTMSFNCIntegerBooleanDictionary);\r\n procedure WriteGenericIntegerDoubleDictionary(ADictionary: TTMSFNCIntegerDoubleDictionary);\r\n procedure WriteCollection(ACollection: TCollection);\r\n procedure WriteList(AList: TList);\r\n procedure WriteBitmap(ABitmap: TTMSFNCBitmap);\r\n procedure WriteSingleObject(AObject: TObject);\r\n procedure WriteObject(AObject: TObject);\r\n public\r\n constructor Create(AStream: TStream); overload;\r\n constructor Create(AWriter: TTMSFNCJSONWriter); overload;\r\n destructor Destroy; override;\r\n procedure Write(AObject: TObject);\r\n procedure WriteArray(AName: string; AArray: TTMSFNCObjectArray);\r\n property JSONWriter: TTMSFNCJSONWriter read FWriter;\r\n property IOReference: TObject read FIOReference write SetIOReference;\r\n property RootObject: TObject read FRootObject write SetRootObject;\r\n property ExcludeProperties: TTMSFNCExcludePropertyListArray read FExcludeProperties write SetExcludeProperties;\r\n property OnCustomWriteProperty: TTMSFNCWriterCustomWritePropertyEvent read FOnCustomWriteProperty write FOnCustomWriteProperty;\r\n property OnCustomIsAssignableProperty: TTMSFNCWriterCustomIsAssignablePropertyEvent read FOnCustomIsAssignableProperty write FOnCustomIsAssignableProperty;\r\n end;\r\n\r\n TTMSFNCReaderCustomReadPropertyEvent = procedure(AObject: TObject; APropertyName: string; APropertyKind: TTypeKind; AReader: TTMSFNCJSONReader; var ACanRead: Boolean) of object;\r\n\r\n TTMSFNCObjectReference = class\r\n public\r\n Instance: TObject;\r\n Prop: TTMSFNCPropertyInfo;\r\n Id: string;\r\n constructor Create(AInstance: TObject; AProp: TTMSFNCPropertyInfo; const AId: string);\r\n end;\r\n\r\n TTMSFNCObjectReferences = TObjectList;\r\n\r\n TTMSFNCReader = class\r\n private\r\n FReaderRef: Boolean;\r\n FReferences: TTMSFNCObjectReferences;\r\n FReader: TTMSFNCJSONReader;\r\n FIOReference: TObject;\r\n FOnCustomReadProperty: TTMSFNCReaderCustomReadPropertyEvent;\r\n FRootObject: TObject;\r\n FExcludeProperties: TTMSFNCExcludePropertyListArray;\r\n FOnCustomIsAssignableProperty: TTMSFNCWriterCustomIsAssignablePropertyEvent;\r\n function ReadSingleObject(ABaseClass: TClass): TObject; overload;\r\n procedure SetRootObject(const Value: TObject);\r\n procedure SetExcludeProperties(\r\n const Value: TTMSFNCExcludePropertyListArray);\r\n procedure SetIOReference(const Value: TObject);\r\n property Reader: TTMSFNCJSONReader read FReader;\r\n procedure ReadSingleObject(AObject: TObject); overload;\r\n procedure ReadProperties(AObject: TObject);\r\n procedure ReadProperty(AObject: TObject; AProp: TTMSFNCPropertyInfo);\r\n procedure ReadPropInfoValue(AInstance: TObject; const APropInfo: TTMSFNCPropertyInfo);\r\n procedure ReadExistingObject(AObject: TObject);\r\n procedure ReadGenericStringList(AList: TTMSFNCStringList);\r\n procedure ReadGenericDoubleList(AList: TTMSFNCDoubleList);\r\n procedure ReadGenericIntegerList(AList: TTMSFNCIntegerList);\r\n procedure ReadStrings(AList: TStrings);\r\n procedure ReadGenericObjectList(AList: TTMSFNCObjectList);\r\n procedure ReadGenericStringObjectDictionary(ADictionary: TTMSFNCStringObjectDictionary);\r\n procedure ReadGenericIntegerObjectDictionary(ADictionary: TTMSFNCIntegerObjectDictionary);\r\n procedure ReadGenericIntegerIntegerDictionary(ADictionary: TTMSFNCIntegerIntegerDictionary);\r\n procedure ReadGenericIntegerBooleanDictionary(ADictionary: TTMSFNCIntegerBooleanDictionary);\r\n procedure ReadGenericIntegerDoubleDictionary(ADictionary: TTMSFNCIntegerDoubleDictionary);\r\n procedure ReadCollection(ACollection: TCollection);\r\n procedure ReadList(AList: TList);\r\n procedure ReadBitmap(ABitmap: TTMSFNCBitmap);\r\n procedure ReadObject(AObject: TObject);\r\n public\r\n constructor Create(AStream: TStream); overload;\r\n constructor Create(AReader: TTMSFNCJSONReader); overload;\r\n destructor Destroy; override;\r\n function Read(AClass: TClass): TObject; overload;\r\n procedure Read(AObject: TObject); overload;\r\n function ReadArray(AName: string): TTMSFNCObjectArray; overload;\r\n property JSONReader: TTMSFNCJSONReader read FReader;\r\n property IOReference: TObject read FIOReference write SetIOReference;\r\n property RootObject: TObject read FRootObject write SetRootObject;\r\n property ExcludeProperties: TTMSFNCExcludePropertyListArray read FExcludeProperties write SetExcludeProperties;\r\n property OnCustomReadProperty: TTMSFNCReaderCustomReadPropertyEvent read FOnCustomReadProperty write FOnCustomReadProperty;\r\n property OnCustomIsAssignableProperty: TTMSFNCWriterCustomIsAssignablePropertyEvent read FOnCustomIsAssignableProperty write FOnCustomIsAssignableProperty;\r\n procedure SolveReferences;\r\n end;\r\n\r\n {$IFDEF WEBLIB}\r\n PTypeInfo = TypInfo.TTypeInfo;\r\n {$ELSE}\r\n PTypeInfo = TypInfo.PTypeInfo;\r\n {$ENDIF}\r\n\r\n TTMSFNCObjectPersistence = class\r\n public\r\n class function SaveObjectToString(AObject: TObject): string;\r\n class procedure LoadObjectFromString(AObject: TObject; AString: string);\r\n end;\r\n\r\n TTMSFNCPersistence = class\r\n public class var\r\n ClassTypeVariable: string;\r\n IgnoreExceptions: Boolean;\r\n private\r\n class var FOnCustomReadProperty: TTMSFNCReaderCustomReadPropertyEvent;\r\n class var FOnCustomWriteProperty: TTMSFNCWriterCustomWritePropertyEvent;\r\n class var FRootObject: TObject;\r\n class var FExcludeProperties: TTMSFNCExcludePropertyListArray;\r\n class var FIOReference: TObject;\r\n class procedure DoCustomReadProperty(AObject: TObject; APropertyName: string; APropertyKind: TTypeKind; AReader: TTMSFNCJSONReader; var ACanRead: Boolean);\r\n class procedure DoCustomWriteProperty(AObject: TObject; APropertyName: string; APropertyKind: TTypeKind; AWriter: TTMSFNCJSONWriter; var ACanWrite: Boolean);\r\n public\r\n class procedure SaveSettingsToFile(AObject: TObject; AFileName: string);\r\n class procedure LoadSettingsFromFile(AObject: TObject; AFileName: string);\r\n class procedure SaveSettingsToStream(AObject: TObject; AStream: TStream);\r\n class procedure LoadSettingsFromStream(AObject: TObject; AStream: TStream);\r\n class procedure GetEnumValues(AValues: TStrings; APropInfo: TTMSFNCPropertyInfo);\r\n class function CreateObject(const AClassName: string; BaseClass: TClass): TObject;\r\n class function GetPropInfoDataTypeInfo(APropInfo: TTMSFNCPropertyInfo): PTypeInfo;\r\n class function GetPropInfoDataTypeInfoClassType(APropInfo: TTMSFNCPropertyInfo): TClass;\r\n class function GetPropInfoType(APropInfo: TTMSFNCPropertyInfo): TTypeKind; virtual;\r\n class function GetPropInfoName(APropInfo: TTMSFNCPropertyInfo): string; virtual;\r\n class function GetPropInfoTypeName(APropInfo: TTMSFNCPropertyInfo): string;\r\n class function GetEnumName(ATypeInfo: PTypeInfo; AValue: Integer): string;\r\n class function IsWriteOnly(APropInfo: TTMSFNCPropertyInfo): Boolean; virtual;\r\n class function IsReadOnly(APropInfo: TTMSFNCPropertyInfo): Boolean; virtual;\r\n class function IsAssignableProperty(AObject: TObject; APropInfo: TTMSFNCPropertyInfo): Boolean; virtual;\r\n class function IsColor(APropertyName: string): Boolean; virtual;\r\n class function IsStrokeKind(APropertyName: string): Boolean; virtual;\r\n class function IsFillKind(APropertyName: string): Boolean; virtual;\r\n class function IsDate(APropertyName: string): Boolean; virtual;\r\n class function IsDateTime(APropertyName: string): Boolean; virtual;\r\n class function IsTime(APropertyName: string): Boolean; virtual;\r\n class function GetGenericListType(AClass: TClass): TClass; virtual;\r\n class function GetGenericDictionaryValueType(AClass: TClass): TClass; virtual;\r\n class function IsGenericDictionaryValueTypeObject(AClass: TClass): Boolean; virtual;\r\n class function IsGenericDictionaryValueTypeInteger(AClass: TClass): Boolean; virtual;\r\n class function IsGenericDictionaryValueTypeBoolean(AClass: TClass): Boolean; virtual;\r\n class function IsGenericDictionaryValueTypeDouble(AClass: TClass): Boolean; virtual;\r\n class function IsGenericList(AClass: TClass; AType: string = ''): Boolean; virtual;\r\n class function IsGenericDictionary(AClass: TClass): Boolean; virtual;\r\n class function IsGenericStringDictionary(AClass: TClass): Boolean; virtual;\r\n class function IsGenericIntegerDictionary(AClass: TClass): Boolean; virtual;\r\n class function IsCollection(AClass: TClass): Boolean; virtual;\r\n class function IsComponent(AClass: TClass): Boolean; virtual;\r\n class function IsControl(AClass: TClass): Boolean; virtual;\r\n class function IsList(AClass: TClass): Boolean; virtual;\r\n class function IsDescendingClass(AClass: TClass; AClassParentList: array of string): Boolean; virtual;\r\n class function IsBitmap(AClass: TClass): Boolean; virtual;\r\n class function IsStrings(AClass: TClass): Boolean; virtual;\r\n class property OnCustomWriteProperty: TTMSFNCWriterCustomWritePropertyEvent read FOnCustomWriteProperty write FOnCustomWriteProperty;\r\n class property OnCustomReadProperty: TTMSFNCReaderCustomReadPropertyEvent read FOnCustomReadProperty write FOnCustomReadProperty;\r\n class property RootObject: TObject read FRootObject write FRootObject;\r\n class property ExcludeProperties: TTMSFNCExcludePropertyListArray read FExcludeProperties write FExcludeProperties;\r\n class property IOReference: TObject read FIOReference write FIOReference;\r\n end;\r\n\r\n {$IFDEF FNCLIB}\r\n TTMSFNCJSONToClassPropertyType = (cptUndefined, cptString, cptBoolean, cptDateTime, cptObject, cptDouble, cptInteger,\r\n cptInteger64, cptObjectArray, cptStringArray, cptBooleanArray, cptDateTimeArray, cptDoubleArray, cptIntegerArray, cptInteger64Array);\r\n\r\n TTMSFNCJSONToClassBaseClass = (cbcNone, cbcPersistent);\r\n\r\n TTMSFNCJSONToClassOptions = record\r\n SortProperties: Boolean;\r\n DelphiCasing: Boolean;\r\n RemoveSpecialCharacters: Boolean;\r\n AddConstructor: Boolean;\r\n AddDestructor: Boolean;\r\n AddAssign: Boolean;\r\n AddUnit: Boolean;\r\n BaseClass: TTMSFNCJSONToClassBaseClass;\r\n AddImplementation: Boolean;\r\n end;\r\n\r\n TTMSFNCJSONToClassExportEvent = {$IFNDEF LCLLIB}reference to {$ENDIF}procedure(var APropertyName: string; var APropertyType: TTMSFNCJSONToClassPropertyType){$IFDEF LCLLIB} of object{$ENDIF};\r\n\r\n TTMSFNCJSONToClassProperty = class\r\n private\r\n FName: string;\r\n FType: TTMSFNCJSONToClassPropertyType;\r\n function FixKeyWord(AValue: string): string;\r\n public\r\n function IsObject: Boolean;\r\n function DelphiName(ACallBack: TTMSFNCJSONToClassExportEvent; AOptions: TTMSFNCJSONToClassOptions; AFixKeyWord: Boolean = True): string;\r\n function DelphiType(ACallBack: TTMSFNCJSONToClassExportEvent; AOptions: TTMSFNCJSONToClassOptions): string;\r\n constructor Create(AName: string; AType: TTMSFNCJSONToClassPropertyType);\r\n property Name: string read FName write FName;\r\n property &Type: TTMSFNCJSONToClassPropertyType read FType write FType;\r\n end;\r\n\r\n TTMSFNCJSONToClassProperties = class(TObjectList);\r\n\r\n TTMSFNCJSONToClassItem = class\r\n private\r\n FProperties: TTMSFNCJSONToClassProperties;\r\n FParentProperty: TTMSFNCJSONToClassProperty;\r\n function GetProperties: TTMSFNCJSONToClassProperties;\r\n public\r\n function GetClassName(ACallBack: TTMSFNCJSONToClassExportEvent; AOptions: TTMSFNCJSONToClassOptions): string;\r\n constructor Create(AParentProperty: TTMSFNCJSONToClassProperty);\r\n destructor Destroy; override;\r\n property Properties: TTMSFNCJSONToClassProperties read GetProperties;\r\n property ParentProperty: TTMSFNCJSONToClassProperty read FParentProperty;\r\n end;\r\n\r\n TTMSFNCJSONToClassItems = class(TObjectList);\r\n\r\n TTMSFNCJSONToClass = class\r\n private\r\n class var FClasses: TTMSFNCJSONToClassItems;\r\n protected\r\n class procedure JSONValueToClass(AParentProperty: TTMSFNCJSONToClassProperty; AJSONValue: TJSONValue);\r\n class function JSONValueToPropertyType(AJSONValue: TJSONValue): TTMSFNCJSONToClassPropertyType;\r\n public\r\n class function ExportToDelphi(AJSONString: string; AOptions: TTMSFNCJSONToClassOptions; ACallBack: TTMSFNCJSONToClassExportEvent = nil): string; overload;\r\n class function ExportToDelphi(AJSONString: string; ACallBack: TTMSFNCJSONToClassExportEvent = nil): string; overload;\r\n class function ExportToDelphi(AJSONValue: TJSONValue; AOptions: TTMSFNCJSONToClassOptions; ACallBack: TTMSFNCJSONToClassExportEvent = nil): string; overload;\r\n class function ExportToDelphi(AJSONValue: TJSONValue; ACallBack: TTMSFNCJSONToClassExportEvent = nil): string; overload;\r\n class function ExportToDelphiFromFile(AFileName: string; ACallBack: TTMSFNCJSONToClassExportEvent = nil): string; overload;\r\n class function ExportToDelphiFromFile(AFileName: string; AOptions: TTMSFNCJSONToClassOptions; ACallBack: TTMSFNCJSONToClassExportEvent = nil): string; overload;\r\n end;\r\n {$ENDIF}\r\n\r\nvar\r\n ExcludePropertyList: array[0..52] of string = (\r\n 'Align',\r\n 'AllowFocus',\r\n 'Anchors',\r\n 'BevelEdges',\r\n 'BevelInner',\r\n 'BevelKind',\r\n 'BevelOuter',\r\n 'BevelWidth',\r\n 'BiDiMode',\r\n 'BitmapContainer',\r\n 'BorderSpacing',\r\n 'CanParentFocus',\r\n 'ClipChildren',\r\n 'ClipParent',\r\n 'Constraints',\r\n 'Ctl3D',\r\n 'DisableFocusEffect',\r\n 'DoubleBuffered',\r\n 'DragCursor',\r\n 'DragKind',\r\n 'DragMode',\r\n 'Enabled',\r\n 'EnableDragHighLight',\r\n 'Height',\r\n 'Hint',\r\n 'HitTest',\r\n 'Locked',\r\n 'Margins',\r\n 'Name',\r\n 'Opacity',\r\n 'Padding',\r\n 'ParentBiDiMode',\r\n 'ParentColor',\r\n 'ParentCtl3D',\r\n 'ParentDoubleBuffered',\r\n 'ParentFont',\r\n 'ParentShowHint',\r\n 'PopupMenu',\r\n 'Position',\r\n 'RotationAngle',\r\n 'RotationCenter',\r\n 'Scale',\r\n 'ShowHint',\r\n 'Size',\r\n 'StyleElements',\r\n 'StyleName',\r\n 'TabOrder',\r\n 'TabStop',\r\n 'Tag',\r\n 'Touch',\r\n 'TouchTargetExpansion',\r\n 'Visible',\r\n 'Width');\r\n\r\n{$IFDEF FNCLIB}\r\nfunction DefaultJSONToClassOptions: TTMSFNCJSONToClassOptions;\r\n{$ENDIF}\r\n\r\nimplementation\r\n\r\nuses\r\n {$IFNDEF LCLLIB}\r\n Rtti,\r\n {$ENDIf}\r\n {$IFDEF FMXLIB}\r\n UITypes,\r\n {$ENDIF}\r\n DateUtils,\r\n StrUtils,\r\n WEBLib.Controls,\r\n WEBLib.Graphics,\r\n {$IFDEF WEBLIB}\r\n js,\r\n {$ENDIF}\r\n {$IFNDEF LCLLIB}\r\n Generics.Defaults,\r\n {$ENDIF}\r\n WEBLib.TMSFNCUtils;\r\n\r\nconst\r\n {$IFDEF FMXLIB}\r\n gcNull = $00000000;\r\n {$ENDIF}\r\n {$IFDEF CMNWEBLIB}\r\n gcNull = -1;\r\n {$ENDIF}\r\n\r\ntype\r\n {$IFDEF FMXLIB}\r\n TTMSFNCPersistenceColor = TAlphaColor;\r\n {$ENDIF}\r\n {$IFDEF CMNWEBLIB}\r\n TTMSFNCPersistenceColor = TColor;\r\n {$ENDIF}\r\n\r\n{$IFDEF FNCLIB}\r\ntype\r\n {$IFNDEF LCLWEBLIB}\r\n TTMSFNCJSONToClassPropertyNameComparer = class(TComparer)\r\n public\r\n function Compare(const Left, Right: TTMSFNCJSONToClassProperty): Integer; override;\r\n end;\r\n {$ENDIF}\r\n{$ENDIF}\r\n\r\n{$IFDEF FMXLIB}\r\n TControlClass = class of TControl;\r\n{$ENDIF}\r\n{$IFDEF CMNWEBLIB}\r\n TCustomControlClass = class of TCustomControl;\r\n{$ENDIF}\r\n\r\n{$IFNDEF WEBLIB}\r\n{$IFNDEF FMXMOBILE}\r\n{$IFNDEF LCLLIB}\r\ntype\r\n {$HINTS OFF}\r\n {$IF COMPILERVERSION < 26}\r\n TSymbolNameBase = string[255];\r\n TSymbolName = type TSymbolNameBase;\r\n {$IFEND}\r\n {$HINTS ON}\r\n PSymbolName = ^TSymbolName;\r\n{$ENDIF}\r\n{$IFDEF LCLLIB}\r\ntype\r\n PSymbolName = ^ShortString;\r\n{$ENDIF}\r\n\r\nfunction GetShortStringString(const ShortStringPointer: PSymbolName): string;\r\nbegin\r\n Result := string(ShortStringPointer^);\r\nend;\r\n{$ENDIF}\r\n{$IFDEF FMXMOBILE}\r\nfunction GetShortStringString(const ShortStringPointer: PByte): string;\r\nvar\r\n ShortStringLength: Byte;\r\n FirstShortStringCharacter: MarshaledAString;\r\n ConvertedLength: Cardinal;\r\n UnicodeCharacters: array[Byte] of Char;\r\nbegin\r\n if not Assigned(ShortStringPointer) then\r\n Result := ''\r\n else\r\n begin\r\n ShortStringLength := ShortStringPointer^;\r\n if ShortStringLength = 0 then\r\n Result := ''\r\n else\r\n begin\r\n FirstShortStringCharacter := MarshaledAString(ShortStringPointer+1);\r\n ConvertedLength := UTF8ToUnicode(\r\n UnicodeCharacters,\r\n Length(UnicodeCharacters),\r\n FirstShortStringCharacter,\r\n ShortStringLength\r\n );\r\n\r\n ConvertedLength := ConvertedLength-1;\r\n SetString(Result, UnicodeCharacters, ConvertedLength);\r\n end;\r\n end;\r\nend;\r\n{$ENDIF}\r\n{$ENDIF}\r\n\r\nfunction GetTypeInfoEx(APropInfo: TTMSFNCPropertyInfo): PTypeInfo;\r\nbegin\r\n {$IFNDEF WEBLIB}\r\n Result := APropInfo^.PropType{$IFNDEF LCLLIB}^{$ENDIF};\r\n {$ENDIF}\r\n {$IFDEF WEBLIB}\r\n Result := APropInfo.typeinfo;\r\n {$ENDIF}\r\nend;\r\n\r\nfunction GetColorRed(AColor: TTMSFNCPersistenceColor): Byte;\r\nbegin\r\n {$IFDEF FMXLIB}\r\n Result := TAlphaColorRec(AColor).R;\r\n {$ENDIF}\r\n {$IFDEF CMNWEBLIB}\r\n AColor := ColorToRGB(AColor);\r\n Result := GetRValue(AColor);\r\n {$ENDIF}\r\nend;\r\n\r\nfunction GetColorGreen(AColor: TTMSFNCPersistenceColor): Byte;\r\nbegin\r\n {$IFDEF FMXLIB}\r\n Result := TAlphaColorRec(AColor).G;\r\n {$ENDIF}\r\n {$IFDEF CMNWEBLIB}\r\n AColor := ColorToRGB(AColor);\r\n Result := GetGValue(AColor);\r\n {$ENDIF}\r\nend;\r\n\r\nfunction GetColorBlue(AColor: TTMSFNCPersistenceColor): Byte;\r\nbegin\r\n {$IFDEF FMXLIB}\r\n Result := TAlphaColorRec(AColor).B;\r\n {$ENDIF}\r\n {$IFDEF CMNWEBLIB}\r\n AColor := ColorToRGB(AColor);\r\n Result := GetBValue(AColor);\r\n {$ENDIF}\r\nend;\r\n\r\nfunction HTMLToColorEx(AHTML: string): TTMSFNCPersistenceColor;\r\n\r\nfunction HexVal(s:string): Integer;\r\nvar\r\n i,j: Integer;\r\n i1, i2: Integer;\r\nbegin\r\n if Length(s) < 2 then\r\n begin\r\n Result := 0;\r\n Exit;\r\n end;\r\n\r\n {$IFDEF ZEROSTRINGINDEX}\r\n i1 := 0;\r\n i2 := 1;\r\n {$ELSE}\r\n i1 := 1;\r\n i2 := 2;\r\n {$ENDIF}\r\n\r\n if s[i1] >= 'A' then\r\n i := ord(s[i1]) - ord('A') + 10\r\n else\r\n i := ord(s[i1]) - ord('0');\r\n\r\n if s[i2] >= 'A' then\r\n j := ord(s[i2]) - ord('A') + 10\r\n else\r\n j := ord(s[i2]) - ord('0');\r\n\r\n Result := i shl 4 + j;\r\nend;\r\n\r\n{$IFDEF CMNWEBLIB}\r\nvar\r\n r,g,b: Integer;\r\nbegin\r\n r := Hexval(Copy(AHTML,2,2));\r\n g := Hexval(Copy(AHTML,4,2)) shl 8;\r\n b := Hexval(Copy(AHTML,6,2)) shl 16;\r\n Result := b + g + r;\r\n{$ENDIF}\r\n\r\n{$IFDEF FMXLIB}\r\nconst\r\n Alpha = TTMSFNCPersistenceColor($FF000000);\r\nvar\r\n r,g,b: Integer;\r\nbegin\r\n r := Hexval(Copy(AHTML,2,2)) shl 16;\r\n g := Hexval(Copy(AHTML,4,2)) shl 8;\r\n b := Hexval(Copy(AHTML,6,2));\r\n Result := Alpha or TTMSFNCPersistenceColor(b + g + r);\r\n{$ENDIF}\r\nend;\r\n\r\nfunction ColorToHTMLEx(AColor: TTMSFNCPersistenceColor): string;\r\nconst\r\n HTMLHexColor = '#RRGGBB';\r\n HexDigit: array[0..$F] of Char = '0123456789ABCDEF';\r\nvar\r\n c: TTMSFNCPersistenceColor;\r\n i: Integer;\r\nbegin\r\n {$IFDEF ZEROSTRINGINDEX}\r\n i := 0;\r\n {$ELSE}\r\n i := 1;\r\n {$ENDIF}\r\n\r\n {$IFDEF FMXLIB}\r\n c := AColor;\r\n {$ENDIF}\r\n {$IFNDEF FMXLIB}\r\n c := ColorToRGB(AColor);\r\n {$ENDIF}\r\n Result := HtmlHexColor;\r\n Result[1 + i] := HexDigit[GetColorRed(c) shr 4];\r\n Result[2 + i] := HexDigit[GetColorRed(c) and $F];\r\n Result[3 + i] := HexDigit[GetColorGreen(c) shr 4];\r\n Result[4 + i] := HexDigit[GetColorGreen(c) and $F];\r\n Result[5 + i] := HexDigit[GetColorBlue(c) shr 4];\r\n Result[6 + i] := HexDigit[GetColorBlue(c) and $F];\r\nend;\r\n\r\n{$IFDEF FNCLIB}\r\nfunction DefaultJSONToClassOptions: TTMSFNCJSONToClassOptions;\r\nbegin\r\n Result.AddUnit := False;\r\n Result.AddImplementation := False;\r\n Result.AddConstructor := False;\r\n Result.AddDestructor := False;\r\n Result.AddAssign := False;\r\n Result.BaseClass := cbcNone;\r\n Result.SortProperties := True;\r\n Result.DelphiCasing := True;\r\n Result.RemoveSpecialCharacters := True;\r\nend;\r\n{$ENDIF}\r\n\r\n{ TTMSFNCWriter }\r\n\r\nconstructor TTMSFNCWriter.Create(AStream: TStream);\r\nbegin\r\n FWriter := TTMSFNCJSONWriter.Create(AStream);\r\n FWriterRef := False;\r\nend;\r\n\r\nconstructor TTMSFNCWriter.Create(AWriter: TTMSFNCJSONWriter);\r\nbegin\r\n FWriter := AWriter;\r\n FWriterRef := True;\r\nend;\r\n\r\ndestructor TTMSFNCWriter.Destroy;\r\nbegin\r\n if FWriterRef then\r\n FWriter := nil\r\n else\r\n FWriter.Free;\r\n inherited;\r\nend;\r\n\r\nprocedure TTMSFNCWriter.SetExcludeProperties(\r\n const Value: TTMSFNCExcludePropertyListArray);\r\nbegin\r\n FExcludeProperties := Value;\r\n TTMSFNCPersistence.ExcludeProperties := FExcludeProperties;\r\nend;\r\n\r\nprocedure TTMSFNCWriter.SetIOReference(const Value: TObject);\r\nbegin\r\n FIOReference := Value;\r\n TTMSFNCPersistence.IOReference := FIOReference;\r\nend;\r\n\r\nprocedure TTMSFNCWriter.SetRootObject(const Value: TObject);\r\nbegin\r\n FRootObject := Value;\r\n TTMSFNCPersistence.RootObject := FRootObject;\r\nend;\r\n\r\nprocedure TTMSFNCWriter.WriteGenericStringObjectDictionary(\r\n ADictionary: TTMSFNCStringObjectDictionary);\r\nvar\r\n {$IFDEF LCLLIB}\r\n k: Integer;\r\n key: string;\r\n {$ENDIF}\r\n {$IFNDEF LCLLIB}\r\n key: string;\r\n {$ENDIF}\r\nbegin\r\n Writer.WriteBeginArray;\r\n {$IFDEF LCLLIB}\r\n for k := 0 to ADictionary.Count - 1 do\r\n begin\r\n key := ADictionary.Keys[k];\r\n {$ENDIF}\r\n {$IFNDEF LCLLIB}\r\n for key in ADictionary.Keys do\r\n begin\r\n {$ENDIF}\r\n Writer.WriteBeginObject;\r\n Writer.WriteName(key);\r\n WriteSingleObject(ADictionary[key]);\r\n Writer.WriteEndObject;\r\n end;\r\n Writer.WriteEndArray;\r\nend;\r\n\r\nprocedure TTMSFNCWriter.WriteGenericIntegerObjectDictionary(\r\n ADictionary: TTMSFNCIntegerObjectDictionary);\r\nvar\r\n {$IFDEF LCLLIB}\r\n k: Integer;\r\n key: Integer;\r\n {$ENDIF}\r\n {$IFNDEF LCLLIB}\r\n key: Integer;\r\n {$ENDIF}\r\nbegin\r\n Writer.WriteBeginArray;\r\n {$IFDEF LCLLIB}\r\n for k := 0 to ADictionary.Count - 1 do\r\n begin\r\n key := ADictionary.Keys[k];\r\n {$ENDIF}\r\n {$IFNDEF LCLLIB}\r\n for key in ADictionary.Keys do\r\n begin\r\n {$ENDIF}\r\n Writer.WriteBeginObject;\r\n Writer.WriteName(IntToStr(key));\r\n WriteSingleObject(ADictionary[key]);\r\n Writer.WriteEndObject;\r\n end;\r\n Writer.WriteEndArray;\r\nend;\r\n\r\nprocedure TTMSFNCWriter.WriteGenericIntegerIntegerDictionary(\r\n ADictionary: TTMSFNCIntegerIntegerDictionary);\r\nvar\r\n {$IFDEF LCLLIB}\r\n k: Integer;\r\n key: Integer;\r\n {$ENDIF}\r\n {$IFNDEF LCLLIB}\r\n key: Integer;\r\n {$ENDIF}\r\nbegin\r\n Writer.WriteBeginArray;\r\n {$IFDEF LCLLIB}\r\n for k := 0 to ADictionary.Count - 1 do\r\n begin\r\n key := ADictionary.Keys[k];\r\n {$ENDIF}\r\n {$IFNDEF LCLLIB}\r\n for key in ADictionary.Keys do\r\n begin\r\n {$ENDIF}\r\n Writer.WriteBeginObject;\r\n Writer.WriteName(IntToStr(key));\r\n Writer.WriteInteger(ADictionary[key]);\r\n Writer.WriteEndObject;\r\n end;\r\n Writer.WriteEndArray;\r\nend;\r\n\r\nprocedure TTMSFNCWriter.WriteGenericIntegerBooleanDictionary(\r\n ADictionary: TTMSFNCIntegerBooleanDictionary);\r\nvar\r\n {$IFDEF LCLLIB}\r\n k: Integer;\r\n key: Integer;\r\n {$ENDIF}\r\n {$IFNDEF LCLLIB}\r\n key: Integer;\r\n {$ENDIF}\r\nbegin\r\n Writer.WriteBeginArray;\r\n {$IFDEF LCLLIB}\r\n for k := 0 to ADictionary.Count - 1 do\r\n begin\r\n key := ADictionary.Keys[k];\r\n {$ENDIF}\r\n {$IFNDEF LCLLIB}\r\n for key in ADictionary.Keys do\r\n begin\r\n {$ENDIF}\r\n Writer.WriteBeginObject;\r\n Writer.WriteName(IntToStr(key));\r\n Writer.WriteBoolean(ADictionary[key]);\r\n Writer.WriteEndObject;\r\n end;\r\n Writer.WriteEndArray;\r\nend;\r\n\r\nprocedure TTMSFNCWriter.WriteGenericIntegerDoubleDictionary(\r\n ADictionary: TTMSFNCIntegerDoubleDictionary);\r\nvar\r\n {$IFDEF LCLLIB}\r\n k: Integer;\r\n key: Integer;\r\n {$ENDIF}\r\n {$IFNDEF LCLLIB}\r\n key: Integer;\r\n {$ENDIF}\r\nbegin\r\n Writer.WriteBeginArray;\r\n {$IFDEF LCLLIB}\r\n for k := 0 to ADictionary.Count - 1 do\r\n begin\r\n key := ADictionary.Keys[k];\r\n {$ENDIF}\r\n {$IFNDEF LCLLIB}\r\n for key in ADictionary.Keys do\r\n begin\r\n {$ENDIF}\r\n Writer.WriteBeginObject;\r\n Writer.WriteName(IntToStr(key));\r\n Writer.WriteDouble(ADictionary[key]);\r\n Writer.WriteEndObject;\r\n end;\r\n Writer.WriteEndArray;\r\nend;\r\n\r\nprocedure TTMSFNCWriter.WriteGenericDoubleList(AList: TTMSFNCDoubleList);\r\nvar\r\n I: Integer;\r\nbegin\r\n Writer.WriteBeginArray;\r\n for I := 0 to AList.Count - 1 do\r\n Writer.WriteDouble(AList[I]);\r\n Writer.WriteEndArray;\r\nend;\r\n\r\nprocedure TTMSFNCWriter.WriteGenericIntegerList(AList: TTMSFNCIntegerList);\r\nvar\r\n I: Integer;\r\nbegin\r\n Writer.WriteBeginArray;\r\n for I := 0 to AList.Count - 1 do\r\n Writer.WriteInteger(AList[I]);\r\n Writer.WriteEndArray;\r\nend;\r\n\r\nprocedure TTMSFNCWriter.WriteGenericObjectList(AList: TTMSFNCObjectList);\r\nvar\r\n I: Integer;\r\nbegin\r\n Writer.WriteBeginArray;\r\n for I := 0 to AList.Count - 1 do\r\n WriteSingleObject(AList[I]);\r\n Writer.WriteEndArray;\r\nend;\r\n\r\nprocedure TTMSFNCWriter.WriteGenericStringList(AList: TTMSFNCStringList);\r\nvar\r\n I: Integer;\r\nbegin\r\n Writer.WriteBeginArray;\r\n for I := 0 to AList.Count - 1 do\r\n Writer.WriteString(AList[I]);\r\n Writer.WriteEndArray;\r\nend;\r\n\r\nprocedure TTMSFNCWriter.Write(AObject: TObject);\r\nbegin\r\n WriteObject(AObject);\r\nend;\r\n\r\nprocedure TTMSFNCWriter.WriteArray(AName: string; AArray: TTMSFNCObjectArray);\r\nvar\r\n I: Integer;\r\nbegin\r\n Writer.WriteBeginObject;\r\n Writer.WriteName(AName);\r\n Writer.WriteBeginArray;\r\n for I := 0 to Length(AArray) - 1 do\r\n WriteSingleObject(AArray[I]);\r\n Writer.WriteEndArray;\r\n Writer.WriteEndObject;\r\nend;\r\n\r\nprocedure TTMSFNCWriter.WriteBitmap(ABitmap: TTMSFNCBitmap);\r\n{$IFNDEF WEBLIB}\r\nvar\r\n ms: TMemoryStream;\r\n{$ENDIF}\r\nbegin\r\n if IsBitmapEmpty(ABitmap) then\r\n begin\r\n FWriter.WriteString('');\r\n Exit;\r\n end;\r\n\r\n {$IFNDEF WEBLIB}\r\n ms := TMemoryStream.Create;\r\n try\r\n ABitmap.SaveToStream(ms);\r\n ms.Position := 0;\r\n FWriter.WriteString(TTMSFNCUtils.SaveStreamToHexStr(ms));\r\n finally\r\n ms.Free;\r\n end;\r\n {$ENDIF}\r\n {$IFDEF WEBLIB}\r\n FWriter.WriteString(ABitmap.Data);\r\n {$ENDIF}\r\nend;\r\n\r\nprocedure TTMSFNCWriter.WriteCollection(ACollection: TCollection);\r\nvar\r\n I: Integer;\r\nbegin\r\n Writer.WriteBeginArray;\r\n for I := 0 to ACollection.Count - 1 do\r\n WriteSingleObject(ACollection.Items[I]);\r\n Writer.WriteEndArray;\r\nend;\r\n\r\nprocedure TTMSFNCWriter.WriteList(AList: TList);\r\nvar\r\n I: Integer;\r\nbegin\r\n Writer.WriteBeginArray;\r\n for I := 0 to AList.Count - 1 do\r\n WriteSingleObject(TObject(AList[I]));\r\n Writer.WriteEndArray;\r\nend;\r\n\r\nprocedure TTMSFNCWriter.WriteObject(AObject: TObject);\r\nvar\r\n b: ITMSFNCPersistenceIO;\r\nbegin\r\n if AObject = nil then\r\n Writer.WriteNull\r\n else\r\n begin\r\n if TTMSFNCPersistence.IsGenericList(AObject.ClassType, 'String') then\r\n WriteGenericStringList(TTMSFNCStringList(AObject))\r\n else if TTMSFNCPersistence.IsGenericList(AObject.ClassType, 'Integer') then\r\n WriteGenericIntegerList(TTMSFNCIntegerList(AObject))\r\n else if TTMSFNCPersistence.IsGenericList(AObject.ClassType, 'Double') then\r\n WriteGenericDoubleList(TTMSFNCDoubleList(AObject))\r\n else if TTMSFNCPersistence.IsGenericList(AObject.ClassType) then\r\n WriteGenericObjectList(TTMSFNCObjectList(AObject))\r\n else if TTMSFNCPersistence.IsGenericStringDictionary(AObject.ClassType) then\r\n begin\r\n if TTMSFNCPersistence.IsGenericDictionaryValueTypeObject(AObject.ClassType) then\r\n WriteGenericStringObjectDictionary(TTMSFNCStringObjectDictionary(AObject))\r\n else\r\n Writer.WriteNull;\r\n end\r\n else if TTMSFNCPersistence.IsGenericIntegerDictionary(AObject.ClassType) then\r\n begin\r\n if TTMSFNCPersistence.IsGenericDictionaryValueTypeObject(AObject.ClassType) then\r\n WriteGenericIntegerObjectDictionary(TTMSFNCIntegerObjectDictionary(AObject))\r\n else if TTMSFNCPersistence.IsGenericDictionaryValueTypeInteger(AObject.ClassType) then\r\n WriteGenericIntegerIntegerDictionary(TTMSFNCIntegerIntegerDictionary(AObject))\r\n else if TTMSFNCPersistence.IsGenericDictionaryValueTypeBoolean(AObject.ClassType) then\r\n WriteGenericIntegerBooleanDictionary(TTMSFNCIntegerBooleanDictionary(AObject))\r\n else if TTMSFNCPersistence.IsGenericDictionaryValueTypeDouble(AObject.ClassType) then\r\n WriteGenericIntegerDoubleDictionary(TTMSFNCIntegerDoubleDictionary(AObject))\r\n else\r\n Writer.WriteNull;\r\n end\r\n else if TTMSFNCPersistence.IsList(AObject.ClassType) then\r\n WriteList(TList(AObject))\r\n else if TTMSFNCPersistence.IsCollection(AObject.ClassType) then\r\n WriteCollection(TCollection(AObject))\r\n else if TTMSFNCPersistence.IsBitmap(AObject.ClassType) then\r\n WriteBitmap(TTMSFNCBitmap(AObject))\r\n else if TTMSFNCPersistence.IsDescendingClass(AObject.ClassType, ['TStrings']) then\r\n WriteStrings(TStrings(AObject))\r\n else\r\n begin\r\n if Assigned(IOReference) and Supports(IOReference, ITMSFNCPersistenceIO, b) then\r\n begin\r\n if b.NeedsObjectReference(AObject.ClassType) then\r\n Writer.WriteString(b.GetObjectReference(AObject))\r\n else\r\n WriteSingleObject(AObject);\r\n end\r\n else\r\n WriteSingleObject(AObject);\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCWriter.WriteSingleObject(AObject: TObject);\r\nbegin\r\n Writer.WriteBeginObject;\r\n if TTMSFNCPersistence.ClassTypeVariable <> '' then\r\n begin\r\n Writer.WriteName(TTMSFNCPersistence.ClassTypeVariable);\r\n Writer.WriteString(AObject.ClassName);\r\n end;\r\n WriteProperties(AObject);\r\n Writer.WriteEndObject;\r\nend;\r\n\r\nprocedure TTMSFNCWriter.WriteStrings(AList: TStrings);\r\nvar\r\n I: Integer;\r\nbegin\r\n Writer.WriteBeginArray;\r\n for I := 0 to AList.Count - 1 do\r\n Writer.WriteString(AList[I]);\r\n Writer.WriteEndArray;\r\nend;\r\n\r\n{$HINTS OFF}\r\nprocedure TTMSFNCWriter.WritePropInfoValue(AInstance: TObject; const APropInfo: TTMSFNCPropertyInfo);\r\nvar\r\n cn: string;\r\n pName: string;\r\n en: string;\r\n k: TTypeKind;\r\n p: TTMSFNCPropertyInfo;\r\n o: TObject;\r\n v: TMethod;\r\n c: TTMSFNCPersistenceColor;\r\n {$IFNDEF LCLLIB}\r\n {$IFDEF WEBLIB}\r\n vr: JSValue;\r\n {$ELSE}\r\n vr: Variant;\r\n {$ENDIF}\r\n {$ENDIF}\r\nbegin\r\n if TTMSFNCPersistence.IsWriteOnly(APropInfo) then\r\n begin\r\n Writer.WriteNull;\r\n Exit;\r\n end;\r\n\r\n o := AInstance;\r\n p := APropInfo;\r\n k := TTMSFNCPersistence.GetPropInfoType(p);\r\n pName := TTMSFNCPersistence.GetPropInfoName(p);\r\n\r\n case k of\r\n tkInteger:\r\n begin\r\n cn := TTMSFNCPersistence.GetPropInfoTypeName(p);\r\n if (cn = 'TAlphaColor') or (cn = 'TColor') or (cn = 'TGraphicsColor') then\r\n begin\r\n if GetOrdProp(o, p) = gcNull then\r\n Writer.WriteString('gcNull')\r\n else\r\n begin\r\n c := TTMSFNCPersistenceColor(GetOrdProp(o, p));\r\n Writer.WriteString(ColorToHTMLEx(c))\r\n end;\r\n end\r\n else\r\n Writer.WriteInteger(GetOrdProp(o, p));\r\n end;\r\n {$IFNDEF WEBLIB}tkWChar, tkLString, tkUString,{$ENDIF}tkChar, tkString{$IFDEF LCLLIB},tkAString{$ENDIF}: Writer.WriteString(GetStrProp(o, p));\r\n tkEnumeration:\r\n if TTMSFNCPersistence.GetPropInfoDataTypeInfo(p) = TypeInfo(Boolean) then\r\n Writer.WriteBoolean(Boolean(GetOrdProp(o, p)))\r\n else\r\n Writer.WriteInteger(GetOrdProp(o, p));\r\n {$IFDEF LCLLIB}\r\n tkBool: Writer.WriteBoolean(Boolean(GetOrdProp(o, p)));\r\n {$ENDIF}\r\n {$IFDEF WEBLIB}\r\n tkBool: Writer.WriteBoolean(GetBoolProp(o, p));\r\n {$ENDIF}\r\n tkFloat: Writer.WriteDouble(GetFloatProp(o, p));\r\n {$IFNDEF WEBLIB}\r\n tkInt64: Writer.WriteInteger(GetInt64Prop(o, p));\r\n {$ENDIF}\r\n tkSet: Writer.WriteInteger(GetOrdProp(o, p));\r\n {$IFNDEF LCLLIB}\r\n {$IFDEF WEBLIB}\r\n tkJSValue:\r\n begin\r\n vr := GetJSValueProp(o, p);\r\n if isUndefined(vr) or isNull(vr) then\r\n Writer.WriteNull\r\n else if IsNumber(vr) then\r\n begin\r\n if Frac(Double(vr))=0 then\r\n Writer.WriteInteger(NativeInt(vr))\r\n else\r\n Writer.WriteDouble(Double(vr))\r\n end\r\n else if isBoolean(vr) then\r\n Writer.WriteBoolean(Boolean(vr))\r\n else if isString(vr) then\r\n Writer.WriteString(string(vr))\r\n else\r\n Writer.WriteNull;\r\n end;\r\n {$ELSE}\r\n tkVariant:\r\n begin\r\n vr := GetVariantProp(o, p);\r\n case VarType(vr) of\r\n varEmpty, varNull: Writer.WriteNull;\r\n varBoolean: Writer.WriteBoolean(TVarData(vr).VBoolean);\r\n varShortInt: Writer.WriteInteger(TVarData(vr).VShortInt);\r\n varSmallint: Writer.WriteInteger(TVarData(vr).VSmallInt);\r\n varInteger: Writer.WriteInteger(TVarData(vr).VInteger);\r\n varSingle: Writer.WriteDouble(TVarData(vr).VSingle);\r\n varDouble: Writer.WriteDouble(TVarData(vr).VDouble);\r\n varCurrency: Writer.WriteDouble(TVarData(vr).VCurrency);\r\n varDate: Writer.WriteDouble(TVarData(vr).VDate);\r\n varOleStr: Writer.WriteString(string(TVarData(vr).VOleStr));\r\n varByte: Writer.WriteInteger(TVarData(vr).VByte);\r\n varWord: Writer.WriteInteger(TVarData(vr).VWord);\r\n varLongWord: Writer.WriteInteger(TVarData(vr).VLongWord);\r\n varInt64: Writer.WriteInteger(TVarData(vr).VInt64);\r\n varUInt64: Writer.WriteInteger(TVarData(vr).VUInt64);\r\n varString: Writer.WriteString(string(TVarData(vr).VString));\r\n varUString: Writer.WriteString(UnicodeString(TVarData(vr).VUString));\r\n else\r\n Writer.WriteNull;\r\n end;\r\n end;\r\n {$ENDIF}\r\n {$ENDIF}\r\n tkMethod:\r\n begin\r\n v := GetMethodProp(o, p);\r\n if v.Code = nil then\r\n Writer.WriteNull\r\n else\r\n begin\r\n if Assigned(TTMSFNCPersistence.RootObject) then\r\n Writer.WriteString(TTMSFNCPersistence.RootObject.MethodName(v.Code))\r\n else\r\n Writer.WriteNull;\r\n end;\r\n end\r\n else\r\n begin\r\n en := TTMSFNCPersistence.GetEnumName(TypeInfo(TTypeKind), Integer(k));\r\n Writer.WriteNull;\r\n end;\r\n end;\r\n\r\n if (o is TFont) and (pName = 'Size') then\r\n begin\r\n Writer.WriteName('IsFMX');\r\n Writer.WriteBoolean({$IFDEF FMXLIB}True{$ELSE}False{$ENDIF});\r\n end;\r\nend;\r\n{$HINTS ON}\r\n\r\nprocedure TTMSFNCWriter.WriteProperties(AObject: TObject);\r\nvar\r\n {$IFNDEF WEBLIB}\r\n ci: Pointer;\r\n c: Integer;\r\n pl: PPropList;\r\n {$ENDIF}\r\n {$IFDEF WEBLIB}\r\n ci: TTypeInfoClass;\r\n a: TTypeMemberPropertyDynArray;\r\n {$ENDIF}\r\n I: Integer;\r\nbegin\r\n if Assigned(AObject) then\r\n begin\r\n {$IFNDEF WEBLIB}\r\n ci := AObject.ClassInfo;\r\n c := GetPropList(ci, tkAny, nil);\r\n GetMem(pl, c * SizeOf(TTMSFNCPropertyInfo));\r\n {$ENDIF}\r\n {$IFDEF WEBLIB}\r\n ci := TypeInfo(AObject);\r\n {$ENDIF}\r\n try\r\n {$IFNDEF WEBLIB}\r\n GetPropList(ci, tkAny, pl);\r\n for I := 0 to c - 1 do\r\n WriteProperty(AObject, pl^[i]);\r\n {$ENDIF}\r\n {$IFDEF WEBLIB}\r\n a := GetPropList(ci, tkAny);\r\n for I := 0 to Length(a) - 1 do\r\n WriteProperty(AObject, a[I]);\r\n {$ENDIF}\r\n finally\r\n {$IFNDEF WEBLIB}\r\n FreeMem(pl);\r\n {$ENDIF}\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCWriter.WriteProperty(AObject: TObject; AProp: TTMSFNCPropertyInfo);\r\nvar\r\n pName: string;\r\n k: TTypeKind;\r\n b, a, ap: Boolean;\r\n p: ITMSFNCPersistence;\r\n crw: ITMSFNCCustomReadWriteIO;\r\n o: TObject;\r\nbegin\r\n if not Assigned(AProp) then\r\n Exit;\r\n\r\n pName := TTMSFNCPersistence.GetPropInfoName(AProp);\r\n k := TTMSFNCPersistence.GetPropInfoType(AProp);\r\n\r\n b := TTMSFNCUtils.IndexOfTextInArray(pName, TTMSFNCPersistence.ExcludeProperties) = -1;\r\n if Supports(AObject, ITMSFNCPersistence, p) then\r\n b := p.CanSaveProperty(AObject, pName, k);\r\n\r\n if b then\r\n begin\r\n a := True;\r\n if Assigned(OnCustomWriteProperty) then\r\n OnCustomWriteProperty(AObject, pName, k, Writer, a);\r\n\r\n if a and Supports(AObject, ITMSFNCCustomReadWriteIO, crw) then\r\n crw.CustomWriteProperty(AObject, pName, k, Writer, a);\r\n\r\n if a then\r\n begin\r\n Writer.WriteName(pName);\r\n\r\n if k in [tkClass] then\r\n begin\r\n o := GetObjectProp(AObject, pName);\r\n\r\n ap := TTMSFNCPersistence.IsAssignableProperty(AObject, AProp);\r\n\r\n if Assigned(OnCustomIsAssignableProperty) then\r\n OnCustomIsAssignableProperty(AObject, pName, ap);\r\n\r\n if ap then\r\n begin\r\n if o is TComponent then\r\n Writer.WriteString((o as TComponent).Name)\r\n else\r\n Writer.WriteString('');\r\n end\r\n else\r\n WriteObject(o);\r\n end\r\n else\r\n WritePropInfoValue(AObject, AProp);\r\n end;\r\n end;\r\nend;\r\n\r\n{ TTMSFNCReader }\r\n\r\nconstructor TTMSFNCReader.Create(AStream: TStream);\r\nbegin\r\n FReader := TTMSFNCJSONReader.Create(AStream);\r\n FReaderRef := False;\r\n FReferences := TTMSFNCObjectReferences.Create(true);\r\nend;\r\n\r\nconstructor TTMSFNCReader.Create(AReader: TTMSFNCJSONReader);\r\nbegin\r\n FReader := AReader;\r\n FReaderRef := True;\r\n FReferences := TTMSFNCObjectReferences.Create(true);\r\nend;\r\n\r\ndestructor TTMSFNCReader.Destroy;\r\nbegin\r\n if FReaderRef then\r\n FReader := nil\r\n else\r\n FReader.Free;\r\n\r\n FReferences.Free;\r\n inherited;\r\nend;\r\n\r\nfunction TTMSFNCReader.ReadSingleObject(ABaseClass: TClass): TObject;\r\nvar\r\n cn: string;\r\n b: ITMSFNCBasePersistenceIO;\r\n p: ITMSFNCPersistenceIO;\r\nbegin\r\n Reader.ReadBeginObject;\r\n if TTMSFNCPersistence.ClassTypeVariable <> '' then\r\n begin\r\n if not Reader.HasNext or (Reader.ReadName <> TTMSFNCPersistence.ClassTypeVariable) then\r\n raise ETMSFNCReaderException.Create('\"'+TTMSFNCPersistence.ClassTypeVariable+'\" property not found in Object descriptor.');\r\n\r\n cn := Reader.ReadString;\r\n end;\r\n\r\n if cn = '' then\r\n cn := ABaseClass.ClassName;\r\n\r\n Result := nil;\r\n\r\n if Assigned(FIOReference) then\r\n begin\r\n if Supports(FIOReference, ITMSFNCBasePersistenceIO, b) then\r\n Result := b.CreateObject(cn, ABaseClass)\r\n else if Supports(FIOReference, ITMSFNCPersistenceIO, p) then\r\n Result := p.CreateObject(cn, ABaseClass);\r\n end;\r\n\r\n if not Assigned(Result) then\r\n Result := TTMSFNCPersistence.CreateObject(cn, ABaseClass);\r\n \r\n try\r\n ReadProperties(Result);\r\n Reader.ReadEndObject;\r\n except\r\n Result.Free;\r\n raise;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCReader.ReadExistingObject(AObject: TObject);\r\nbegin\r\n if Assigned(AObject) then\r\n begin\r\n if not Reader.IsNull then\r\n begin\r\n Reader.ReadBeginObject;\r\n if TTMSFNCPersistence.ClassTypeVariable <> '' then\r\n begin\r\n if not Reader.HasNext or (Reader.ReadName <> TTMSFNCPersistence.ClassTypeVariable) then\r\n raise ETMSFNCReaderException.Create('\"'+TTMSFNCPersistence.ClassTypeVariable+'\" property not found in Object descriptor.');\r\n\r\n Reader.ReadString;\r\n end;\r\n\r\n ReadProperties(AObject);\r\n Reader.ReadEndObject;\r\n end\r\n else\r\n Reader.SkipValue;\r\n end\r\n else\r\n Reader.ReadNull;\r\nend;\r\n\r\nprocedure TTMSFNCReader.ReadGenericStringObjectDictionary(ADictionary: TTMSFNCStringObjectDictionary);\r\nvar\r\n obj: TObject;\r\n k: string;\r\n c: TClass;\r\n i: ITMSFNCBaseListIO;\r\n cl: Boolean;\r\nbegin\r\n if Supports(ADictionary, ITMSFNCBaseListIO, i) then\r\n c := i.GetItemClass\r\n else\r\n c := TTMSFNCPersistence.GetGenericDictionaryValueType(ADictionary.ClassType);\r\n\r\n cl := False;\r\n ADictionary.Clear;\r\n Reader.ReadBeginArray;\r\n if not Reader.HasNext then\r\n ADictionary.Clear\r\n else\r\n begin\r\n while Reader.HasNext do\r\n begin\r\n if not Reader.IsNull then\r\n begin\r\n Reader.ReadBeginObject;\r\n k := Reader.ReadName;\r\n obj := ReadSingleObject(c);\r\n if Assigned(obj) then\r\n begin\r\n if not cl then\r\n begin\r\n ADictionary.Clear;\r\n cl := True;\r\n end;\r\n\r\n ADictionary.Add(k, obj);\r\n end;\r\n Reader.ReadEndObject;\r\n end\r\n else\r\n Reader.SkipValue;\r\n end;\r\n end;\r\n Reader.ReadEndArray;\r\nend;\r\n\r\nprocedure TTMSFNCReader.ReadGenericIntegerObjectDictionary(ADictionary: TTMSFNCIntegerObjectDictionary);\r\nvar\r\n obj: TObject;\r\n k: Integer;\r\n c: TClass;\r\n i: ITMSFNCBaseListIO;\r\n cl: Boolean;\r\nbegin\r\n if Supports(ADictionary, ITMSFNCBaseListIO, i) then\r\n c := i.GetItemClass\r\n else\r\n c := TTMSFNCPersistence.GetGenericDictionaryValueType(ADictionary.ClassType);\r\n\r\n cl := False;\r\n ADictionary.Clear;\r\n Reader.ReadBeginArray;\r\n if not Reader.HasNext then\r\n ADictionary.Clear\r\n else\r\n begin\r\n while Reader.HasNext do\r\n begin\r\n if not Reader.IsNull then\r\n begin\r\n Reader.ReadBeginObject;\r\n TryStrToInt(Reader.ReadName, k);\r\n obj := ReadSingleObject(c);\r\n if Assigned(obj) then\r\n begin\r\n if not cl then\r\n begin\r\n ADictionary.Clear;\r\n cl := True;\r\n end;\r\n\r\n ADictionary.Add(k, obj);\r\n end;\r\n Reader.ReadEndObject;\r\n end\r\n else\r\n Reader.SkipValue;\r\n end;\r\n end;\r\n Reader.ReadEndArray;\r\nend;\r\n\r\nprocedure TTMSFNCReader.ReadGenericIntegerDoubleDictionary(ADictionary: TTMSFNCIntegerDoubleDictionary);\r\nvar\r\n obj: Double;\r\n k: Integer;\r\n cl: Boolean;\r\nbegin\r\n cl := False;\r\n ADictionary.Clear;\r\n Reader.ReadBeginArray;\r\n if not Reader.HasNext then\r\n ADictionary.Clear\r\n else\r\n begin\r\n while Reader.HasNext do\r\n begin\r\n if not Reader.IsNull then\r\n begin\r\n Reader.ReadBeginObject;\r\n TryStrToInt(Reader.ReadName, k);\r\n obj := Reader.ReadDouble;\r\n if not cl then\r\n begin\r\n ADictionary.Clear;\r\n cl := True;\r\n end;\r\n\r\n ADictionary.Add(k, obj);\r\n Reader.ReadEndObject;\r\n end\r\n else\r\n Reader.SkipValue;\r\n end;\r\n end;\r\n Reader.ReadEndArray;\r\nend;\r\n\r\nprocedure TTMSFNCReader.ReadGenericIntegerBooleanDictionary(ADictionary: TTMSFNCIntegerBooleanDictionary);\r\nvar\r\n obj: Boolean;\r\n k: Integer;\r\n cl: Boolean;\r\nbegin\r\n cl := False;\r\n ADictionary.Clear;\r\n Reader.ReadBeginArray;\r\n if not Reader.HasNext then\r\n ADictionary.Clear\r\n else\r\n begin\r\n while Reader.HasNext do\r\n begin\r\n if not Reader.IsNull then\r\n begin\r\n Reader.ReadBeginObject;\r\n TryStrToInt(Reader.ReadName, k);\r\n obj := Reader.ReadBoolean;\r\n if not cl then\r\n begin\r\n ADictionary.Clear;\r\n cl := True;\r\n end;\r\n\r\n ADictionary.Add(k, obj);\r\n Reader.ReadEndObject;\r\n end\r\n else\r\n Reader.SkipValue;\r\n end;\r\n end;\r\n Reader.ReadEndArray;\r\nend;\r\n\r\nprocedure TTMSFNCReader.ReadGenericIntegerIntegerDictionary(ADictionary: TTMSFNCIntegerIntegerDictionary);\r\nvar\r\n obj: Integer;\r\n k: Integer;\r\n cl: Boolean;\r\nbegin\r\n cl := False;\r\n ADictionary.Clear;\r\n Reader.ReadBeginArray;\r\n if not Reader.HasNext then\r\n ADictionary.Clear\r\n else\r\n begin\r\n while Reader.HasNext do\r\n begin\r\n if not Reader.IsNull then\r\n begin\r\n Reader.ReadBeginObject;\r\n TryStrToInt(Reader.ReadName, k);\r\n obj := Reader.ReadInteger;\r\n if not cl then\r\n begin\r\n ADictionary.Clear;\r\n cl := True;\r\n end;\r\n\r\n ADictionary.Add(k, obj);\r\n Reader.ReadEndObject;\r\n end\r\n else\r\n Reader.SkipValue;\r\n end;\r\n end;\r\n Reader.ReadEndArray;\r\nend;\r\n\r\nprocedure TTMSFNCReader.ReadGenericStringList(AList: TTMSFNCStringList);\r\nvar\r\n obj: string;\r\nbegin\r\n AList.Clear;\r\n Reader.ReadBeginArray;\r\n while Reader.HasNext do\r\n begin\r\n if not Reader.IsNull then\r\n begin\r\n obj := Reader.ReadString;\r\n AList.Add(obj);\r\n end\r\n else\r\n Reader.SkipValue;\r\n end;\r\n Reader.ReadEndArray;\r\nend;\r\n\r\nprocedure TTMSFNCReader.ReadGenericIntegerList(AList: TTMSFNCIntegerList);\r\nvar\r\n obj: Integer;\r\nbegin\r\n AList.Clear;\r\n Reader.ReadBeginArray;\r\n while Reader.HasNext do\r\n begin\r\n if not Reader.IsNull then\r\n begin\r\n obj := Reader.ReadInteger;\r\n AList.Add(obj);\r\n end\r\n else\r\n Reader.SkipValue;\r\n end;\r\n Reader.ReadEndArray;\r\nend;\r\n\r\nprocedure TTMSFNCReader.ReadGenericDoubleList(AList: TTMSFNCDoubleList);\r\nvar\r\n obj: Double;\r\nbegin\r\n AList.Clear;\r\n Reader.ReadBeginArray;\r\n while Reader.HasNext do\r\n begin\r\n if not Reader.IsNull then\r\n begin\r\n obj := Reader.ReadDouble;\r\n AList.Add(obj);\r\n end\r\n else\r\n Reader.SkipValue;\r\n end;\r\n Reader.ReadEndArray;\r\nend;\r\n\r\nprocedure TTMSFNCReader.ReadGenericObjectList(AList: TTMSFNCObjectList);\r\nvar\r\n obj: TObject;\r\n b: ITMSFNCPersistenceIO;\r\n c: TClass;\r\n i: ITMSFNCBaseListIO;\r\n cl: Boolean;\r\nbegin\r\n if Supports(AList, ITMSFNCBaseListIO, i) then\r\n c := i.GetItemClass\r\n else\r\n c := TTMSFNCPersistence.GetGenericListType(AList.ClassType);\r\n\r\n cl := False;\r\n Reader.ReadBeginArray;\r\n if not Reader.HasNext then\r\n AList.Clear\r\n else\r\n begin\r\n while Reader.HasNext do\r\n begin\r\n if not Reader.IsNull then\r\n begin\r\n obj := ReadSingleObject(c);\r\n if Assigned(obj) then\r\n begin\r\n if not cl then\r\n begin\r\n AList.Clear;\r\n cl := True;\r\n end;\r\n\r\n if Assigned(IOReference) and Supports(IOReference, ITMSFNCPersistenceIO, b) then\r\n b.FixOwners(obj, AList);\r\n\r\n AList.Add(obj);\r\n end;\r\n end\r\n else\r\n Reader.SkipValue;\r\n end;\r\n end;\r\n Reader.ReadEndArray;\r\nend;\r\n\r\nfunction TTMSFNCReader.Read(AClass: TClass): TObject;\r\nbegin\r\n Result := ReadSingleObject(AClass);\r\nend;\r\n\r\nprocedure TTMSFNCReader.Read(AObject: TObject);\r\nbegin\r\n ReadObject(AObject);\r\nend;\r\n\r\nprocedure TTMSFNCReader.ReadBitmap(ABitmap: TTMSFNCBitmap);\r\nvar\r\n s: string;\r\n {$IFNDEF WEBLIB}\r\n ms: TMemoryStream;\r\n {$ENDIF}\r\nbegin\r\n if Reader.IsNull then\r\n Exit;\r\n\r\n s := Reader.ReadString;\r\n if s <> '' then\r\n begin\r\n {$IFNDEF WEBLIB}\r\n ms := TMemoryStream.Create;\r\n try\r\n TTMSFNCUtils.LoadStreamFromHexStr(s, ms);\r\n ms.Position := 0;\r\n ABitmap.LoadFromStream(ms);\r\n finally\r\n ms.Free;\r\n end;\r\n {$ELSE}\r\n ABitmap.Data := s;\r\n {$ENDIF}\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCReader.ReadCollection(ACollection: TCollection);\r\nvar\r\n obj: TObject;\r\n c: TClass;\r\n i: ITMSFNCBaseListIO;\r\n ii: ITMSFNCBaseCollectionIO;\r\n cl: Boolean;\r\nbegin\r\n if Supports(ACollection, ITMSFNCBaseListIO, i) then\r\n c := i.GetItemClass\r\n else\r\n c := ACollection.ItemClass;\r\n\r\n Supports(ACollection, ITMSFNCBaseCollectionIO, ii);\r\n\r\n cl := False;\r\n\r\n Reader.ReadBeginArray;\r\n if not Reader.HasNext then\r\n ACollection.Clear\r\n else\r\n begin\r\n while Reader.HasNext do\r\n begin\r\n if not Reader.IsNull then\r\n begin\r\n obj := ReadSingleObject(c);\r\n if Assigned(obj) then\r\n begin\r\n if not cl then\r\n begin\r\n ACollection.Clear;\r\n cl := True;\r\n end;\r\n\r\n try\r\n if obj is TPersistent then\r\n begin\r\n if Assigned(ii) then\r\n ii.AddItem(obj).Assign(obj as TPersistent)\r\n else\r\n ACollection.Add.Assign(obj as TPersistent);\r\n end;\r\n finally\r\n obj.Free;\r\n end;\r\n end;\r\n end\r\n else\r\n Reader.SkipValue;\r\n end;\r\n end;\r\n Reader.ReadEndArray;\r\nend;\r\n\r\nfunction TTMSFNCReader.ReadArray(AName: string): TTMSFNCObjectArray;\r\nvar\r\n Name: string;\r\nbegin\r\n Reader.ReadBeginObject;\r\n while Reader.HasNext do\r\n begin\r\n if not Reader.IsNull then\r\n begin\r\n Name := Reader.ReadName;\r\n if Name = AName then\r\n begin\r\n Reader.ReadBeginArray;\r\n while Reader.HasNext do\r\n begin\r\n SetLength(Result, Length(Result) + 1);\r\n Result[Length(Result) - 1] := ReadSingleObject(TObject);\r\n end;\r\n Reader.ReadEndArray;\r\n end\r\n else\r\n Reader.SkipValue;\r\n end\r\n else\r\n Reader.SkipValue;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCReader.ReadList(AList: TList);\r\nvar\r\n obj: TObject;\r\n b: ITMSFNCPersistenceIO;\r\n c: TClass;\r\n i: ITMSFNCBaseListIO;\r\n cl: Boolean;\r\nbegin\r\n c := TObject;\r\n if Supports(AList, ITMSFNCBaseListIO, i) then\r\n c := i.GetItemClass;\r\n\r\n cl := False;\r\n\r\n Reader.ReadBeginArray;\r\n if not Reader.HasNext then\r\n AList.Clear\r\n else\r\n begin\r\n while Reader.HasNext do\r\n begin\r\n if not Reader.IsNull then\r\n begin\r\n obj := ReadSingleObject(c);\r\n if Assigned(obj) then\r\n begin\r\n if not cl then\r\n begin\r\n AList.Clear;\r\n cl := True;\r\n end;\r\n\r\n if Assigned(IOReference) and Supports(IOReference, ITMSFNCPersistenceIO, b) then\r\n b.FixOwners(obj, AList);\r\n AList.Add(obj);\r\n end;\r\n end\r\n else\r\n Reader.SkipValue;\r\n end;\r\n end;\r\n Reader.ReadEndArray;\r\nend;\r\n\r\nprocedure TTMSFNCReader.ReadObject(AObject: TObject);\r\nbegin\r\n if AObject = nil then\r\n Reader.ReadNull\r\n else\r\n begin\r\n if TTMSFNCPersistence.IsGenericList(AObject.ClassType, 'String') then\r\n ReadGenericStringList(TTMSFNCStringList(AObject))\r\n else if TTMSFNCPersistence.IsGenericList(AObject.ClassType, 'Double') then\r\n ReadGenericDoubleList(TTMSFNCDoubleList(AObject))\r\n else if TTMSFNCPersistence.IsGenericList(AObject.ClassType, 'Integer') then\r\n ReadGenericIntegerList(TTMSFNCIntegerList(AObject))\r\n else if TTMSFNCPersistence.IsGenericList(AObject.ClassType) then\r\n ReadGenericObjectList(TTMSFNCObjectList(AObject))\r\n else if TTMSFNCPersistence.IsGenericStringDictionary(AObject.ClassType) then\r\n begin\r\n if TTMSFNCPersistence.IsGenericDictionaryValueTypeObject(AObject.ClassType) then\r\n ReadGenericStringObjectDictionary(TTMSFNCStringObjectDictionary(AObject))\r\n else\r\n Reader.ReadNull\r\n end\r\n else if TTMSFNCPersistence.IsGenericIntegerDictionary(AObject.ClassType) then\r\n begin\r\n if TTMSFNCPersistence.IsGenericDictionaryValueTypeObject(AObject.ClassType) then\r\n ReadGenericIntegerObjectDictionary(TTMSFNCIntegerObjectDictionary(AObject))\r\n else if TTMSFNCPersistence.IsGenericDictionaryValueTypeInteger(AObject.ClassType) then\r\n ReadGenericIntegerIntegerDictionary(TTMSFNCIntegerIntegerDictionary(AObject))\r\n else if TTMSFNCPersistence.IsGenericDictionaryValueTypeBoolean(AObject.ClassType) then\r\n ReadGenericIntegerBooleanDictionary(TTMSFNCIntegerBooleanDictionary(AObject))\r\n else if TTMSFNCPersistence.IsGenericDictionaryValueTypeDouble(AObject.ClassType) then\r\n ReadGenericIntegerDoubleDictionary(TTMSFNCIntegerDoubleDictionary(AObject))\r\n else\r\n Reader.ReadNull;\r\n end\r\n else if TTMSFNCPersistence.IsList(AObject.ClassType) then\r\n ReadList(TList(AObject))\r\n else if TTMSFNCPersistence.IsCollection(AObject.ClassType) then\r\n ReadCollection(TCollection(AObject))\r\n else if TTMSFNCPersistence.IsBitmap(AObject.ClassType) then\r\n ReadBitmap(TTMSFNCBitmap(AObject))\r\n else if TTMSFNCPersistence.IsDescendingClass(AObject.ClassType, ['TStrings']) then\r\n ReadStrings(TStrings(AObject))\r\n else\r\n ReadSingleObject(AObject);\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCReader.ReadProperties(AObject: TObject);\r\nvar\r\n Prop: TTMSFNCPropertyInfo;\r\nbegin\r\n while Reader.HasNext do\r\n begin\r\n if not Reader.IsNull then\r\n begin\r\n Prop := nil;\r\n if Assigned(AObject) then\r\n Prop := GetPropInfo(AObject, Reader.ReadName);\r\n if Assigned(Prop) then\r\n ReadProperty(AObject, Prop)\r\n else\r\n Reader.SkipValue;\r\n end\r\n else\r\n Reader.SkipValue;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCReader.ReadProperty(AObject: TObject; AProp: TTMSFNCPropertyInfo);\r\nvar\r\n pName: string;\r\n ct: TClass;\r\n b: Boolean;\r\n p: ITMSFNCPersistence;\r\n pio: ITMSFNCPersistenceIO;\r\n k: TTypeKind;\r\n a, ap: Boolean;\r\n o: TObject;\r\n n: string;\r\n crw: ITMSFNCCustomReadWriteIO;\r\nbegin\r\n if not Assigned(AProp) then\r\n Exit;\r\n\r\n k := TTMSFNCPersistence.GetPropInfoType(AProp);\r\n pName := TTMSFNCPersistence.GetPropInfoName(AProp);\r\n\r\n b := TTMSFNCUtils.IndexOfTextInArray(pName, TTMSFNCPersistence.ExcludeProperties) = -1;\r\n if Supports(AObject, ITMSFNCPersistence, p) then\r\n b := p.CanLoadProperty(AObject, pName, k);\r\n\r\n if b then\r\n begin\r\n a := True;\r\n if Assigned(OnCustomReadProperty) then\r\n OnCustomReadProperty(AObject, pName, k, Reader, a);\r\n\r\n if a and Supports(AObject, ITMSFNCCustomReadWriteIO, crw) then\r\n crw.CustomReadProperty(AObject, pName, k, Reader, a);\r\n\r\n if a then\r\n begin\r\n if k in [tkClass] then\r\n begin\r\n ct := TTMSFNCPersistence.GetPropInfoDataTypeInfoClassType(AProp);\r\n if TTMSFNCPersistence.IsGenericList(ct, 'String') then\r\n ReadGenericStringList(TTMSFNCStringList(GetObjectProp(AObject, pName)))\r\n else if TTMSFNCPersistence.IsGenericList(ct, 'Double') then\r\n ReadGenericDoubleList(TTMSFNCDoubleList(GetObjectProp(AObject, pName)))\r\n else if TTMSFNCPersistence.IsGenericList(ct, 'Integer') then\r\n ReadGenericIntegerList(TTMSFNCIntegerList(GetObjectProp(AObject, pName)))\r\n else if TTMSFNCPersistence.IsGenericList(ct) then\r\n ReadGenericObjectList(TTMSFNCObjectList(GetObjectProp(AObject, pName)))\r\n else if TTMSFNCPersistence.IsGenericStringDictionary(ct) then\r\n begin\r\n if TTMSFNCPersistence.IsGenericDictionaryValueTypeObject(ct) then\r\n ReadGenericStringObjectDictionary(TTMSFNCStringObjectDictionary(GetObjectProp(AObject, pName)))\r\n else\r\n Reader.SkipValue;\r\n end\r\n else if TTMSFNCPersistence.IsGenericIntegerDictionary(ct) then\r\n begin\r\n if TTMSFNCPersistence.IsGenericDictionaryValueTypeObject(ct) then\r\n ReadGenericIntegerObjectDictionary(TTMSFNCIntegerObjectDictionary(GetObjectProp(AObject, pName)))\r\n else if TTMSFNCPersistence.IsGenericDictionaryValueTypeInteger(ct) then\r\n ReadGenericIntegerIntegerDictionary(TTMSFNCIntegerIntegerDictionary(GetObjectProp(AObject, pName)))\r\n else if TTMSFNCPersistence.IsGenericDictionaryValueTypeBoolean(ct) then\r\n ReadGenericIntegerBooleanDictionary(TTMSFNCIntegerBooleanDictionary(GetObjectProp(AObject, pName)))\r\n else if TTMSFNCPersistence.IsGenericDictionaryValueTypeDouble(ct) then\r\n ReadGenericIntegerDoubleDictionary(TTMSFNCIntegerDoubleDictionary(GetObjectProp(AObject, pName)))\r\n else\r\n Reader.SkipValue;\r\n end\r\n else if TTMSFNCPersistence.IsList(ct) then\r\n ReadList(TList(GetObjectProp(AObject, pName)))\r\n else if TTMSFNCPersistence.IsCollection(ct) then\r\n ReadCollection(TCollection(GetObjectProp(AObject, pName)))\r\n else if TTMSFNCPersistence.IsBitmap(ct) then\r\n ReadBitmap(TTMSFNCBitmap(GetObjectProp(AObject, pName)))\r\n else if TTMSFNCPersistence.IsDescendingClass(ct, ['TStrings']) then\r\n ReadStrings(TStrings(GetObjectProp(AObject, pName)))\r\n else\r\n begin\r\n a := False;\r\n if Assigned(IOReference) and Supports(IOReference, ITMSFNCPersistenceIO, pio) then\r\n a := pio.NeedsObjectReference(ct);\r\n\r\n if a then\r\n begin\r\n if Reader.IsNull then\r\n begin\r\n Reader.ReadNull;\r\n SetObjectProp(AObject, pName, nil);\r\n end\r\n else\r\n FReferences.Add(TTMSFNCObjectReference.Create(AObject, AProp, Reader.ReadString));\r\n end\r\n else\r\n begin\r\n o := GetObjectProp(AObject, pName);\r\n\r\n ap := TTMSFNCPersistence.IsAssignableProperty(AObject, AProp);\r\n if Assigned(OnCustomIsAssignableProperty) then\r\n OnCustomIsAssignableProperty(AObject, pName, ap);\r\n\r\n if ap then\r\n begin\r\n n := Reader.ReadString;\r\n if Assigned(FRootObject) and (FRootObject is TComponent) then\r\n SetObjectProp(AObject, pName, (FRootObject as TComponent).FindComponent(n));\r\n end\r\n else\r\n ReadExistingObject(o);\r\n end;\r\n end;\r\n end\r\n else\r\n ReadPropInfoValue(AObject, AProp);\r\n end;\r\n end\r\n else\r\n Reader.SkipValue;\r\nend;\r\n\r\n{$HINTS OFF}\r\nprocedure TTMSFNCReader.ReadPropInfoValue(AInstance: TObject; const APropInfo: TTMSFNCPropertyInfo);\r\nvar\r\n pName, cn, cnv, en: string;\r\n k: TTypeKind;\r\n p: TTMSFNCPropertyInfo;\r\n o: TObject;\r\n i: Integer;\r\n s: string;\r\n b: Boolean;\r\n d: Double;\r\n ii: Int64;\r\n v: string;\r\n m: TMethod;\r\n bsz: Boolean;\r\n {$IFNDEF LCLLIB}\r\n {$IFDEF WEBLIB}\r\n vr: JSValue;\r\n {$ELSE}\r\n vr: Variant;\r\n {$ENDIF}\r\n {$ENDIF}\r\nbegin\r\n if TTMSFNCPersistence.IsWriteOnly(APropInfo) or Reader.IsNull then\r\n begin\r\n Reader.ReadNull; \r\n Exit;\r\n end;\r\n \r\n o := AInstance;\r\n p := APropInfo;\r\n pName := TTMSFNCPersistence.GetPropInfoName(p);\r\n k := TTMSFNCPersistence.GetPropInfoType(p);\r\n\r\n case k of\r\n tkInteger:\r\n begin\r\n cn := TTMSFNCPersistence.GetPropInfoTypeName(p);\r\n if (cn = 'TAlphaColor') or (cn = 'TColor') or (cn = 'TGraphicsColor') then\r\n begin\r\n cnv := Reader.ReadString;\r\n if not TTMSFNCPersistence.IsReadOnly(p) then\r\n begin\r\n if cnv = 'gcNull' then\r\n SetOrdProp(o, pName, gcNull)\r\n else\r\n begin\r\n {$RANGECHECKS OFF}\r\n SetOrdProp(o, pName, HTMLToColorEx(cnv));\r\n {$RANGECHECKS ON}\r\n end;\r\n end;\r\n end\r\n else\r\n begin\r\n i := Reader.ReadInteger;\r\n if not TTMSFNCPersistence.IsReadOnly(p) then\r\n SetOrdProp(o, p, i);\r\n end;\r\n end;\r\n {$IFNDEF WEBLIB}tkWChar, tkLString, tkUString,{$ENDIF}tkChar, tkString{$IFDEF LCLLIB},tkAString{$ENDIF}: \r\n begin\r\n s := Reader.ReadString;\r\n if not TTMSFNCPersistence.IsReadOnly(p) then\r\n SetStrProp(o, p, s);\r\n end;\r\n tkEnumeration:\r\n if TTMSFNCPersistence.GetPropInfoDataTypeInfo(p) = TypeInfo(Boolean) then\r\n begin\r\n b := Reader.ReadBoolean;\r\n if not TTMSFNCPersistence.IsReadOnly(p) then \r\n SetOrdProp(o, p, Integer(b))\r\n end\r\n else\r\n begin\r\n i := Reader.ReadInteger;\r\n if not TTMSFNCPersistence.IsReadOnly(p) then\r\n SetOrdProp(o, p, i);\r\n end;\r\n {$IFDEF LCLWEBLIB}\r\n tkBool:\r\n begin\r\n b := Reader.ReadBoolean;\r\n if not TTMSFNCPersistence.IsReadOnly(p) then\r\n begin\r\n {$IFDEF LCLLIB}\r\n SetOrdProp(o, p, Integer(b))\r\n {$ELSE}\r\n SetBoolProp(o, p, b)\r\n {$ENDIF}\r\n end;\r\n end;\r\n {$ENDIF}\r\n tkFloat:\r\n begin\r\n d := Reader.ReadDouble;\r\n if not TTMSFNCPersistence.IsReadOnly(p) then\r\n SetFloatProp(o, p, d)\r\n end;\r\n {$IFNDEF WEBLIB}\r\n tkInt64:\r\n begin\r\n ii := Reader.ReadInt64;\r\n if not TTMSFNCPersistence.IsReadOnly(p) then\r\n SetOrdProp(o, p, ii)\r\n end;\r\n {$ENDIF}\r\n tkSet:\r\n begin\r\n i := Reader.ReadInteger;\r\n if not TTMSFNCPersistence.IsReadOnly(p) then\r\n SetOrdProp(o, p, i);\r\n end;\r\n {$IFNDEF LCLLIB}\r\n {$IFDEF WEBLIB}tkJSValue{$ELSE}tkVariant{$ENDIF}:\r\n begin\r\n {$IFDEF WEBLIB}\r\n vr := nil;\r\n {$ELSE}\r\n vr := varEmpty;\r\n {$ENDIF}\r\n\r\n if Reader.HasDouble then\r\n vr := Reader.ReadDouble\r\n else if Reader.HasInt64 then\r\n vr := Reader.ReadInt64\r\n else if Reader.HasBoolean then\r\n vr := Reader.ReadBoolean\r\n else if Reader.HasString then\r\n vr := Reader.ReadString\r\n else\r\n Reader.ReadNull;\r\n\r\n if not TTMSFNCPersistence.IsReadOnly(p) then\r\n begin\r\n {$IFDEF WEBLIB}\r\n SetJSValueProp(o, p, vr);\r\n {$ELSE}\r\n SetVariantProp(o, p, vr);\r\n {$ENDIF}\r\n end;\r\n end;\r\n {$ENDIF}\r\n tkMethod:\r\n begin\r\n m.Data := nil;\r\n m.Code := nil;\r\n if Reader.IsNull then\r\n Reader.ReadNull\r\n else\r\n begin\r\n if Assigned(TTMSFNCPersistence.RootObject) then\r\n begin\r\n v := Reader.ReadString;\r\n m.Code := TTMSFNCPersistence.RootObject.MethodAddress(v);\r\n if m.Code <> nil then\r\n m.Data := TTMSFNCPersistence.RootObject;\r\n end\r\n else\r\n Reader.ReadNull;\r\n end;\r\n\r\n SetMethodProp(o, p, m);\r\n end\r\n else\r\n begin\r\n en := TTMSFNCPersistence.GetEnumName(TypeInfo(TTypeKind), Integer(k));\r\n Reader.ReadNull;\r\n end;\r\n end;\r\n\r\n if (o is TFont) and (pName = 'Size') then\r\n begin\r\n if Reader.HasNext then\r\n begin\r\n s := Reader.PeekName;\r\n if s = 'IsFMX' then\r\n begin\r\n Reader.ReadName;\r\n bsz := Reader.ReadBoolean;\r\n if bsz then\r\n begin\r\n {$IFNDEF FMXLIB}\r\n (o as TFont).Size := Round(((o as TFont).Size / 96) * 72);\r\n {$ENDIF}\r\n end\r\n else\r\n begin\r\n {$IFDEF FMXLIB}\r\n (o as TFont).Size := ((o as TFont).Size / 72) * 96;\r\n {$ENDIF}\r\n end;\r\n end;\r\n end;\r\n end;\r\nend;\r\n{$HINTS ON}\r\n\r\nprocedure TTMSFNCReader.ReadSingleObject(AObject: TObject);\r\nbegin\r\n Reader.ReadBeginObject;\r\n if TTMSFNCPersistence.ClassTypeVariable <> '' then\r\n begin\r\n if not Reader.HasNext or (Reader.ReadName <> TTMSFNCPersistence.ClassTypeVariable) then\r\n raise ETMSFNCReaderException.Create('\"'+TTMSFNCPersistence.ClassTypeVariable+'\" property not found in Object descriptor.');\r\n Reader.ReadString;\r\n end;\r\n\r\n try\r\n ReadProperties(AObject);\r\n Reader.ReadEndObject;\r\n except\r\n raise;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCReader.ReadStrings(AList: TStrings);\r\nvar\r\n obj: string;\r\nbegin\r\n AList.Clear;\r\n Reader.ReadBeginArray;\r\n while Reader.HasNext do\r\n begin\r\n if not Reader.IsNull then\r\n begin\r\n obj := Reader.ReadString;\r\n AList.Add(obj);\r\n end\r\n else\r\n Reader.SkipValue;\r\n end;\r\n Reader.ReadEndArray;\r\nend;\r\n\r\nprocedure TTMSFNCReader.SetExcludeProperties(\r\n const Value: TTMSFNCExcludePropertyListArray);\r\nbegin\r\n FExcludeProperties := Value;\r\n TTMSFNCPersistence.ExcludeProperties := FExcludeProperties;\r\nend;\r\n\r\nprocedure TTMSFNCReader.SetIOReference(const Value: TObject);\r\nbegin\r\n FIOReference := Value;\r\n TTMSFNCPersistence.IOReference := FIOReference;\r\nend;\r\n\r\nprocedure TTMSFNCReader.SetRootObject(const Value: TObject);\r\nbegin\r\n FRootObject := Value;\r\n TTMSFNCPersistence.RootObject := FRootObject;\r\nend;\r\n\r\nprocedure TTMSFNCReader.SolveReferences;\r\nvar\r\n b: ITMSFNCPersistenceIO;\r\n r: Integer;\r\n rf: TTMSFNCObjectReference;\r\n o: TObject;\r\nbegin\r\n if Assigned(IOReference) and Supports(IOReference, ITMSFNCPersistenceIO, b) then\r\n begin\r\n for r := 0 to FReferences.Count - 1 do\r\n begin\r\n rf := FReferences[r];\r\n o := b.FindObject(rf.Id);\r\n SetObjectProp(rf.Instance, rf.Prop, o);\r\n end;\r\n end;\r\nend;\r\n\r\n{ TTMSFNCObjectReference }\r\n\r\nconstructor TTMSFNCObjectReference.Create(AInstance: TObject;\r\n AProp: TTMSFNCPropertyInfo; const AId: string);\r\nbegin\r\n Instance := AInstance;\r\n Prop := AProp;\r\n Id := AId;\r\nend;\r\n\r\n{ TTMSFNCPersistence }\r\n\r\nclass procedure TTMSFNCPersistence.LoadSettingsFromFile(AObject: TObject; AFileName: string);\r\nvar\r\n ms: TMemoryStream;\r\nbegin\r\n ms := TMemoryStream.Create;\r\n try\r\n {$IFNDEF WEBLIB}\r\n ms.LoadFromFile(AFileName);\r\n {$ENDIF}\r\n LoadSettingsFromStream(AObject, ms);\r\n finally\r\n ms.Free;\r\n end;\r\nend;\r\n\r\nclass procedure TTMSFNCPersistence.LoadSettingsFromStream(AObject: TObject; AStream: TStream);\r\nvar\r\n Reader: TTMSFNCReader;\r\nbegin\r\n AStream.Position := 0;\r\n Reader := TTMSFNCReader.Create(AStream);\r\n try\r\n Reader.IOReference := TTMSFNCPersistence.IOReference;\r\n Reader.RootObject := TTMSFNCPersistence.RootObject;\r\n Reader.OnCustomReadProperty := DoCustomReadProperty;\r\n Reader.Read(AObject);\r\n finally\r\n Reader.Free;\r\n end;\r\nend;\r\n\r\nclass procedure TTMSFNCPersistence.SaveSettingsToFile(AObject: TObject;\r\n AFileName: string);\r\nvar\r\n ms: TMemoryStream;\r\nbegin\r\n ms := TMemoryStream.Create;\r\n try\r\n SaveSettingsToStream(AObject, ms);\r\n ms.SaveToFile(AFileName);\r\n finally\r\n ms.Free;\r\n end;\r\nend;\r\n\r\nclass procedure TTMSFNCPersistence.SaveSettingsToStream(AObject: TObject;\r\n AStream: TStream);\r\nvar\r\n Writer: TTMSFNCWriter;\r\nbegin\r\n Writer := TTMSFNCWriter.Create(AStream);\r\n try\r\n Writer.IOReference := TTMSFNCPersistence.IOReference;\r\n Writer.RootObject := TTMSFNCPersistence.RootObject;\r\n Writer.OnCustomWriteProperty := DoCustomWriteProperty;\r\n Writer.Write(AObject);\r\n finally\r\n Writer.Free;\r\n end;\r\nend;\r\n\r\n{$HINTS OFF}\r\nclass procedure TTMSFNCPersistence.GetEnumValues(AValues: TStrings; APropInfo: TTMSFNCPropertyInfo);\r\nvar\r\n p: PTypeInfo;\r\n {$IFNDEF WEBLIB}\r\n su: PTypeData;\r\n {$IFNDEF LCLLIB}\r\n ct: PPTypeInfo;\r\n {$ENDIF}\r\n {$IFDEF LCLLIB}\r\n ct: PTypeInfo;\r\n {$ENDIF}\r\n {$ENDIF}\r\n {$IFDEF WEBLIB}\r\n pi: TTypeInfoInteger;\r\n ps: PTypeInfo;\r\n {$ENDIF}\r\n I: Integer;\r\n k: TTypeKind;\r\nbegin\r\n p := GetTypeInfoEx(APropInfo);\r\n {$IFNDEF WEBLIB}\r\n su := GetTypeData(p);\r\n if Assigned(su) then\r\n begin\r\n if p{$IFDEF LCLLIB}^{$ENDIF}.Kind = tkSet then\r\n begin\r\n ct := su^.CompType;\r\n if Assigned(ct) then\r\n begin\r\n k := ct^.Kind;\r\n case k of\r\n tkEnumeration:\r\n begin\r\n su := GetTypeData(ct{$IFNDEF LCLLIB}^{$ENDIF});\r\n for i := su^.MinValue to su^.MaxValue do\r\n AValues.Add(TTMSFNCPersistence.GetEnumName(ct{$IFNDEF LCLLIB}^{$ENDIF},i));\r\n end;\r\n end;\r\n end;\r\n end\r\n else\r\n begin\r\n for i := su^.MinValue to su^.MaxValue do\r\n AValues.Add(TTMSFNCPersistence.GetEnumName(p,i));\r\n end;\r\n end;\r\n {$ENDIF}\r\n {$IFDEF WEBLIB}\r\n if Assigned(p) and (p is TTypeInfoSet) then\r\n p := TTypeInfoSet(p).comptype;\r\n\r\n if Assigned(p) and (p is TTypeInfoInteger) then\r\n begin\r\n pi := TTypeInfoInteger(p);\r\n for i := pi.MinValue to pi.MaxValue do\r\n AValues.Add(TTMSFNCPersistence.GetEnumName(p, i));\r\n end;\r\n {$ENDIF}\r\nend;\r\n\r\nclass function TTMSFNCPersistence.GetGenericDictionaryValueType(\r\n AClass: TClass): TClass;\r\nvar\r\n cn: string;\r\n po, pc, poc: Integer;\r\n fn: string;\r\n sl: TStringList;\r\n c, I: Integer;\r\n p: TPersistentClass;\r\nbegin\r\n if not Assigned(AClass) then\r\n Exit(TClass(TObject));\r\n repeat\r\n cn := AClass.ClassName;\r\n if AnsiStartsStr('TDictionary<', cn) or AnsiStartsStr('TObjectDictionary<', cn) then\r\n begin\r\n po := Pos('<', cn);\r\n pc := Pos('>', cn);\r\n if (po > 0) and (pc > 0) then\r\n begin\r\n fn := Copy(cn, po+1, pc - po - 1);\r\n poc := Pos(',', fn);\r\n\r\n if poc > 0 then\r\n begin\r\n fn := Copy(fn, poc + 1, Length(fn) - poc);\r\n sl := TStringList.Create;\r\n try\r\n sl.Delimiter := '.';\r\n sl.DelimitedText := fn;\r\n\r\n while sl.Count > 0 do\r\n begin\r\n fn := sl.DelimitedText;\r\n p := GetClass(fn);\r\n if Assigned(p) then\r\n Exit(p);\r\n\r\n sl.Delete(0);\r\n end;\r\n\r\n finally\r\n sl.Free;\r\n end;\r\n end;\r\n end;\r\n end;\r\n AClass := AClass.ClassParent;\r\n until not Assigned(AClass);\r\n Result := TClass(TObject);\r\nend;\r\n\r\nclass function TTMSFNCPersistence.IsGenericDictionaryValueTypeBoolean(\r\n AClass: TClass): Boolean;\r\nvar\r\n cn: string;\r\n po, pc, poc: Integer;\r\n fn: string;\r\n sl: TStringList;\r\n c, I: Integer;\r\nbegin\r\n if not Assigned(AClass) then\r\n Exit(False);\r\n repeat\r\n cn := AClass.ClassName;\r\n if AnsiStartsStr('TDictionary<', cn) or AnsiStartsStr('TObjectDictionary<', cn) then\r\n begin\r\n po := Pos('<', cn);\r\n pc := Pos('>', cn);\r\n if (po > 0) and (pc > 0) then\r\n begin\r\n fn := Copy(cn, po+1, pc - po - 1);\r\n poc := Pos(',', fn);\r\n\r\n if poc > 0 then\r\n begin\r\n fn := Copy(fn, poc + 1, Length(fn) - poc);\r\n sl := TStringList.Create;\r\n try\r\n sl.Delimiter := '.';\r\n sl.DelimitedText := fn;\r\n\r\n while sl.Count > 0 do\r\n begin\r\n fn := sl.DelimitedText;\r\n if (UpperCase(fn) = 'BOOLEAN') or (UpperCase(fn) = 'SYSTEM.BOOLEAN') then\r\n Exit(True);\r\n\r\n sl.Delete(0);\r\n end;\r\n\r\n finally\r\n sl.Free;\r\n end;\r\n end;\r\n end;\r\n end;\r\n AClass := AClass.ClassParent;\r\n until not Assigned(AClass);\r\n Result := False;\r\nend;\r\n\r\nclass function TTMSFNCPersistence.IsGenericDictionaryValueTypeDouble(\r\n AClass: TClass): Boolean;\r\nvar\r\n cn: string;\r\n po, pc, poc: Integer;\r\n fn: string;\r\n sl: TStringList;\r\n c, I: Integer;\r\nbegin\r\n if not Assigned(AClass) then\r\n Exit(False);\r\n repeat\r\n cn := AClass.ClassName;\r\n if AnsiStartsStr('TDictionary<', cn) or AnsiStartsStr('TObjectDictionary<', cn) then\r\n begin\r\n po := Pos('<', cn);\r\n pc := Pos('>', cn);\r\n if (po > 0) and (pc > 0) then\r\n begin\r\n fn := Copy(cn, po+1, pc - po - 1);\r\n poc := Pos(',', fn);\r\n\r\n if poc > 0 then\r\n begin\r\n fn := Copy(fn, poc + 1, Length(fn) - poc);\r\n sl := TStringList.Create;\r\n try\r\n sl.Delimiter := '.';\r\n sl.DelimitedText := fn;\r\n\r\n while sl.Count > 0 do\r\n begin\r\n fn := sl.DelimitedText;\r\n if (UpperCase(fn) = 'DOUBLE') or (UpperCase(fn) = 'SYSTEM.DOUBLE') then\r\n Exit(True);\r\n\r\n sl.Delete(0);\r\n end;\r\n\r\n finally\r\n sl.Free;\r\n end;\r\n end;\r\n end;\r\n end;\r\n AClass := AClass.ClassParent;\r\n until not Assigned(AClass);\r\n Result := False;\r\nend;\r\n\r\nclass function TTMSFNCPersistence.IsGenericDictionaryValueTypeInteger(\r\n AClass: TClass): Boolean;\r\nvar\r\n cn: string;\r\n po, pc, poc: Integer;\r\n fn: string;\r\n sl: TStringList;\r\n c, I: Integer;\r\nbegin\r\n if not Assigned(AClass) then\r\n Exit(False);\r\n repeat\r\n cn := AClass.ClassName;\r\n if AnsiStartsStr('TDictionary<', cn) or AnsiStartsStr('TObjectDictionary<', cn) then\r\n begin\r\n po := Pos('<', cn);\r\n pc := Pos('>', cn);\r\n if (po > 0) and (pc > 0) then\r\n begin\r\n fn := Copy(cn, po+1, pc - po - 1);\r\n poc := Pos(',', fn);\r\n\r\n if poc > 0 then\r\n begin\r\n fn := Copy(fn, poc + 1, Length(fn) - poc);\r\n sl := TStringList.Create;\r\n try\r\n sl.Delimiter := '.';\r\n sl.DelimitedText := fn;\r\n\r\n while sl.Count > 0 do\r\n begin\r\n fn := sl.DelimitedText;\r\n if (UpperCase(fn) = 'INTEGER') or (UpperCase(fn) = 'SYSTEM.INTEGER')\r\n or (UpperCase(fn) = 'LONGINT') or (UpperCase(fn) = 'SYSTEM.LONGINT') then\r\n Exit(True);\r\n\r\n sl.Delete(0);\r\n end;\r\n\r\n finally\r\n sl.Free;\r\n end;\r\n end;\r\n end;\r\n end;\r\n AClass := AClass.ClassParent;\r\n until not Assigned(AClass);\r\n Result := False;\r\nend;\r\n\r\nclass function TTMSFNCPersistence.IsGenericDictionaryValueTypeObject(\r\n AClass: TClass): Boolean;\r\nvar\r\n cn: string;\r\n po, pc, poc: Integer;\r\n fn: string;\r\n sl: TStringList;\r\n c, I: Integer;\r\n p: TPersistentClass;\r\nbegin\r\n if not Assigned(AClass) then\r\n Exit(False);\r\n repeat\r\n cn := AClass.ClassName;\r\n if AnsiStartsStr('TDictionary<', cn) or AnsiStartsStr('TObjectDictionary<', cn) then\r\n begin\r\n po := Pos('<', cn);\r\n pc := Pos('>', cn);\r\n if (po > 0) and (pc > 0) then\r\n begin\r\n fn := Copy(cn, po+1, pc - po - 1);\r\n poc := Pos(',', fn);\r\n\r\n if poc > 0 then\r\n begin\r\n fn := Copy(fn, poc + 1, Length(fn) - poc);\r\n sl := TStringList.Create;\r\n try\r\n sl.Delimiter := '.';\r\n sl.DelimitedText := fn;\r\n\r\n while sl.Count > 0 do\r\n begin\r\n fn := sl.DelimitedText;\r\n p := GetClass(fn);\r\n if Assigned(p) then\r\n Exit(True);\r\n\r\n sl.Delete(0);\r\n end;\r\n\r\n finally\r\n sl.Free;\r\n end;\r\n end;\r\n end;\r\n end;\r\n AClass := AClass.ClassParent;\r\n until not Assigned(AClass);\r\n Result := False;\r\nend;\r\n\r\nclass function TTMSFNCPersistence.GetGenericListType(AClass: TClass): TClass;\r\nvar\r\n cn: string;\r\n po, pc: Integer;\r\n fn: string;\r\n sl: TStringList;\r\n c, I: Integer;\r\n p: TPersistentClass;\r\nbegin\r\n if not Assigned(AClass) then\r\n Exit(TClass(TObject));\r\n repeat\r\n cn := AClass.ClassName;\r\n if AnsiStartsStr('TList<', cn) or AnsiStartsStr('TObjectList<', cn) then\r\n begin\r\n po := Pos('<', cn);\r\n pc := Pos('>', cn);\r\n if (po > 0) and (pc > 0) then\r\n begin\r\n fn := Copy(cn, po+1, pc - po - 1);\r\n\r\n sl := TStringList.Create;\r\n try\r\n sl.Delimiter := '.';\r\n sl.DelimitedText := fn;\r\n\r\n while sl.Count > 0 do\r\n begin\r\n fn := sl.DelimitedText;\r\n p := GetClass(fn);\r\n if Assigned(p) then\r\n Exit(p);\r\n\r\n sl.Delete(0);\r\n end;\r\n\r\n finally\r\n sl.Free;\r\n end;\r\n end;\r\n end;\r\n AClass := AClass.ClassParent;\r\n until not Assigned(AClass);\r\n Result := TClass(TObject);\r\nend;\r\n\r\nclass function TTMSFNCPersistence.GetPropInfoDataTypeInfoClassType(APropInfo: TTMSFNCPropertyInfo): TClass;\r\n{$IFDEF WEBLIB}\r\nvar\r\n t: PTypeInfo;\r\n{$ENDIF}\r\nbegin\r\n {$IFNDEF WEBLIB}\r\n Result := GetTypeData(APropInfo^.PropType{$IFNDEF LCLLIB}^{$ENDIF})^.ClassType\r\n {$ENDIF}\r\n {$IFDEF WEBLIB}\r\n Result := nil;\r\n if Assigned(APropInfo) and Assigned(APropInfo.typeinfo) then\r\n begin\r\n t := APropInfo.typeinfo;\r\n asm\r\n if (t.class){\r\n return t.class.ClassType();\r\n }\r\n end;\r\n end;\r\n {$ENDIF}\r\nend;\r\n{$HINTS ON}\r\n\r\nclass function TTMSFNCPersistence.GetPropInfoDataTypeInfo(\r\n APropInfo: TTMSFNCPropertyInfo): PTypeInfo;\r\nbegin\r\n {$IFNDEF WEBLIB}\r\n Result := GetTypeData(APropInfo^.PropType{$IFNDEF LCLLIB}^{$ENDIF})^.BaseType{$IFNDEF LCLLIB}^{$ENDIF}\r\n {$ENDIF}\r\n {$IFDEF WEBLIB}\r\n Result := nil;\r\n if Assigned(APropInfo) then\r\n Result := APropInfo.typeinfo;\r\n {$ENDIF}\r\nend;\r\n\r\nclass function TTMSFNCPersistence.GetPropInfoName(APropInfo: TTMSFNCPropertyInfo): string;\r\nbegin\r\n {$IFNDEF WEBLIB}\r\n Result := GetShortStringString(@APropInfo{$IFDEF LCLLIB}^{$ENDIF}.Name);\r\n {$ENDIF}\r\n {$IFDEF WEBLIB}\r\n Result := APropInfo.name;\r\n {$ENDIF}\r\nend;\r\n\r\nclass function TTMSFNCPersistence.GetPropInfoType(APropInfo: TTMSFNCPropertyInfo): TTypeKind;\r\nbegin\r\n {$IFNDEF WEBLIB}\r\n Result := APropInfo^.PropType^{$IFNDEF LCLLIB}^{$ENDIF}.Kind;\r\n {$ENDIF}\r\n {$IFDEF WEBLIB}\r\n if Assigned(APropInfo.typeinfo) then\r\n Result := APropInfo.typeinfo.kind\r\n else\r\n Result := tkUnknown;\r\n {$ENDIF}\r\nend;\r\n\r\nclass procedure TTMSFNCPersistence.DoCustomReadProperty(AObject: TObject;\r\n APropertyName: string; APropertyKind: TTypeKind; AReader: TTMSFNCJSONReader;\r\n var ACanRead: Boolean);\r\nbegin\r\n if Assigned(OnCustomReadProperty) then\r\n OnCustomReadProperty(AObject, APropertyName, APropertyKind, AReader, ACanRead);\r\nend;\r\n\r\nclass procedure TTMSFNCPersistence.DoCustomWriteProperty(AObject: TObject;\r\n APropertyName: string; APropertyKind: TTypeKind; AWriter: TTMSFNCJSONWriter;\r\n var ACanWrite: Boolean);\r\nbegin\r\n if Assigned(OnCustomWriteProperty) then\r\n OnCustomWriteProperty(AObject, APropertyName, APropertyKind, AWriter, ACanWrite);\r\nend;\r\n\r\nclass function TTMSFNCPersistence.GetEnumName(ATypeInfo: PTypeInfo; AValue: Integer): string;\r\nbegin\r\n {$IFNDEF WEBLIB}\r\n Result := TypInfo.GetEnumName(ATypeInfo, AValue);\r\n {$ENDIF}\r\n {$IFDEF WEBLIB}\r\n Result := TTypeInfoEnum(ATypeInfo).EnumType.IntToName[AValue];\r\n {$ENDIF}\r\nend;\r\n\r\nclass function TTMSFNCPersistence.GetPropInfoTypeName(APropInfo: TTMSFNCPropertyInfo): string;\r\nbegin\r\n {$IFNDEF WEBLIB}\r\n Result := GetShortStringString(@APropInfo{$IFDEF LCLLIB}^{$ENDIF}.PropType^.Name);\r\n {$ENDIF}\r\n {$IFDEF WEBLIB}\r\n Result := '';\r\n if Assigned(APropInfo.typeinfo) then\r\n Result := APropInfo.typeinfo.name;\r\n {$ENDIF}\r\nend;\r\n\r\nclass function TTMSFNCPersistence.IsList(AClass: TClass): boolean;\r\nbegin\r\n Result := IsDescendingClass(AClass, ['TList']);\r\nend;\r\n\r\nclass function TTMSFNCPersistence.IsAssignableProperty(AObject: TObject;\r\n APropInfo: TTMSFNCPropertyInfo): Boolean;\r\nvar\r\n oProp: TObject;\r\n k: TTypeKind;\r\n pName: string;\r\nbegin\r\n Result := False;\r\n k := GetPropInfoType(APropInfo);\r\n if k in [tkClass] then\r\n begin\r\n pName := GetPropInfoName(APropInfo);\r\n oProp := GetObjectProp(AObject, pName);\r\n Result := (Assigned(oProp) and IsComponent(oProp.ClassType)) or not Assigned(oProp);\r\n end;\r\nend;\r\n\r\nclass function TTMSFNCPersistence.IsBitmap(AClass: TClass): Boolean;\r\nbegin\r\n Result := IsDescendingClass(AClass, ['TBitmap', 'TPicture', 'TTMSFNCBitmap'{$IFDEF WEBLIB}, 'TGraphic'{$ENDIF}]);\r\nend;\r\n\r\nclass function TTMSFNCPersistence.IsReadOnly(\r\n APropInfo: TTMSFNCPropertyInfo): Boolean;\r\nbegin\r\n {$IFNDEF WEBLIB}\r\n Result := APropInfo^.SetProc = nil;\r\n {$ENDIF}\r\n {$IFDEF WEBLIB}\r\n Result := APropInfo.setter = '';\r\n {$ENDIF}\r\nend;\r\n\r\nclass function TTMSFNCPersistence.IsStrings(AClass: TClass): Boolean;\r\nbegin\r\n Result := IsDescendingClass(AClass, ['TStrings']);\r\nend;\r\n\r\nclass function TTMSFNCPersistence.IsStrokeKind(APropertyName: string): Boolean;\r\nbegin\r\n Result := (APropertyName = 'TTMSFNCGraphicsStrokeKind');\r\nend;\r\n\r\nclass function TTMSFNCPersistence.IsTime(APropertyName: string): Boolean;\r\nbegin\r\n Result := (APropertyName = 'TTime');\r\nend;\r\n\r\nclass function TTMSFNCPersistence.IsWriteOnly(APropInfo: TTMSFNCPropertyInfo): Boolean;\r\nbegin\r\n {$IFNDEF WEBLIB}\r\n Result := APropInfo^.GetProc = nil;\r\n {$ENDIF}\r\n {$IFDEF WEBLIB}\r\n Result := APropInfo.getter = '';\r\n {$ENDIF}\r\nend;\r\n\r\nclass function TTMSFNCPersistence.IsCollection(AClass: TClass): Boolean;\r\nbegin\r\n Result := IsDescendingClass(AClass, ['TCollection']);\r\nend;\r\n\r\nclass function TTMSFNCPersistence.IsColor(APropertyName: string): Boolean;\r\nbegin\r\n Result := (APropertyName = 'TAlphaColor') or (APropertyName = 'TColor') or (APropertyName = 'TGraphicsColor');\r\nend;\r\n\r\nclass function TTMSFNCPersistence.IsComponent(AClass: TClass): Boolean;\r\nbegin\r\n Result := IsDescendingClass(AClass, ['TComponent', 'TTMSFNCCustomComponent']);\r\nend;\r\n\r\nclass function TTMSFNCPersistence.IsControl(AClass: TClass): Boolean;\r\nbegin\r\n Result := IsDescendingClass(AClass, ['TControl']);\r\nend;\r\n\r\nclass function TTMSFNCPersistence.IsDate(APropertyName: string): Boolean;\r\nbegin\r\n Result := (APropertyName = 'TDate');\r\nend;\r\n\r\nclass function TTMSFNCPersistence.IsDateTime(APropertyName: string): Boolean;\r\nbegin\r\n Result := (APropertyName = 'TDateTime');\r\nend;\r\n\r\nclass function TTMSFNCPersistence.IsDescendingClass(AClass: TClass;\r\n AClassParentList: array of string): Boolean;\r\nvar\r\n cn: string;\r\n I: Integer;\r\nbegin\r\n if not Assigned(AClass) then\r\n Exit(False);\r\n repeat\r\n cn := AClass.ClassName;\r\n for I := 0 to Length(AClassParentList) - 1 do\r\n begin\r\n if (cn = AClassParentList[I]) then\r\n Exit(True);\r\n end;\r\n AClass := AClass.ClassParent;\r\n until not Assigned(AClass);\r\n Result := False;\r\nend;\r\n\r\nclass function TTMSFNCPersistence.IsFillKind(APropertyName: string): Boolean;\r\nbegin\r\n Result := (APropertyName = 'TTMSFNCGraphicsFillKind');\r\nend;\r\n\r\nclass function TTMSFNCPersistence.IsGenericDictionary(AClass: TClass): Boolean;\r\nvar\r\n cn: string;\r\nbegin\r\n if not Assigned(AClass) then\r\n Exit(False);\r\n repeat\r\n cn := AClass.ClassName;\r\n if AnsiStartsStr('TDictionary<', cn) or AnsiStartsStr('TObjectDictionary<', cn) then\r\n Exit(True);\r\n AClass := AClass.ClassParent;\r\n until not Assigned(AClass);\r\n Result := False;\r\nend;\r\n\r\nclass function TTMSFNCPersistence.IsGenericStringDictionary(AClass: TClass): Boolean;\r\nvar\r\n cn: string;\r\nbegin\r\n if not Assigned(AClass) then\r\n Exit(False);\r\n repeat\r\n cn := AClass.ClassName;\r\n if AnsiStartsStr('TDictionary '') and (Pos(LowerCase(AType), LowerCase(cn)) > 0) or (Pos(LowerCase(AType), LowerCase(cn)) > 0)) then\r\n Exit(True);\r\n end;\r\n AClass := AClass.ClassParent;\r\n until not Assigned(AClass);\r\n Result := False;\r\nend;\r\n\r\nclass function TTMSFNCPersistence.CreateObject(const AClassName: string;\r\n BaseClass: TClass): TObject;\r\nvar\r\n ObjType: TPersistentClass;\r\nbegin\r\n ObjType := GetClass(AClassName);\r\n if (ObjType = nil) then\r\n begin\r\n if TTMSFNCPersistence.IgnoreExceptions then\r\n begin\r\n Result := nil;\r\n Exit;\r\n end\r\n else\r\n raise ETMSFNCReaderException.CreateFmt('Type \"%s\" not found', [AClassName]);\r\n end;\r\n \r\n if not TTMSFNCPersistence.IgnoreExceptions then\r\n begin\r\n if not ObjType.InheritsFrom(TObject) then\r\n raise ETMSFNCReaderException.Create('Type \"%s\" is not an class type');\r\n \r\n if BaseClass <> nil then\r\n if not ObjType.InheritsFrom(BaseClass) then\r\n raise ETMSFNCReaderException.CreateFmt('Type \"%s\" does not inherit from %s',\r\n [AClassName, BaseClass.ClassName]);\r\n end;\r\n\r\n {$IFDEF CMNWEBLIB}\r\n if ObjType.InheritsFrom(TCustomControl) then\r\n Result := TCustomControlClass(ObjType).Create(nil)\r\n {$ENDIF}\r\n {$IFDEF FMXLIB}\r\n if ObjType.InheritsFrom(TControl) then\r\n Result := TControlClass(ObjType).Create(nil)\r\n {$ENDIF}\r\n else if ObjType.InheritsFrom(TComponent) then\r\n Result := TComponentClass(ObjType).Create(nil)\r\n else if ObjType.InheritsFrom(TCollectionItem) then\r\n Result := TCollectionItemClass(ObjType).Create(nil)\r\n else if ObjType.InheritsFrom(TPersistent) then\r\n Result := TPersistentClass(ObjType).Create\r\n else\r\n raise ETMSFNCReaderException.CreateFmt('Type \"%s\" not supported', [AClassName]);\r\nend;\r\n\r\n{ TTMSFNCObjectPersistence }\r\n\r\nclass procedure TTMSFNCObjectPersistence.LoadObjectFromString(AObject: TObject; AString: string);\r\nvar\r\n ms: TStringStream;\r\nbegin\r\n ms := TStringStream.Create(AString{$IFDEF WEBLIB}, TEncoding.UTF8{$ENDIF});\r\n try\r\n TTMSFNCPersistence.LoadSettingsFromStream(AObject, ms);\r\n finally\r\n ms.Free;\r\n end;\r\nend;\r\n\r\nclass function TTMSFNCObjectPersistence.SaveObjectToString(\r\n AObject: TObject): string;\r\nvar\r\n ss: TStringStream;\r\nbegin\r\n ss := TStringStream.Create(''{$IFDEF WEBLIB}, TEncoding.UTF8{$ENDIF});\r\n try\r\n TTMSFNCPersistence.SaveSettingsToStream(AObject, ss);\r\n ss.Position := 0;\r\n Result := ss.DataString;\r\n finally\r\n ss.Free;\r\n end;\r\nend;\r\n\r\n{$IFDEF FNCLIB}\r\n\r\n{ TTMSFNCJSONToClass }\r\n\r\nclass procedure TTMSFNCJSONToClass.JSONValueToClass(AParentProperty: TTMSFNCJSONToClassProperty; AJSONValue: TJSONValue);\r\nvar\r\n v: TJSONValue;\r\n n: string;\r\n p: TTMSFNCJSONToClassProperty;\r\n sz: Integer;\r\n K: Integer;\r\n t: TTMSFNCJSONToClassPropertyType;\r\n ci: TTMSFNCJSONToClassItem;\r\nbegin\r\n if AJSONValue is TJSONObject then\r\n begin\r\n ci := TTMSFNCJSONToClassItem.Create(AParentProperty);\r\n FClasses.Add(ci);\r\n\r\n sz := TTMSFNCUtils.GetJSONObjectSize(AJSONValue as TJSONObject);\r\n for k := 0 to sz - 1 do\r\n begin\r\n n := TTMSFNCUtils.GetJSONObjectName(AJSONValue as TJSONObject, k);\r\n v := TTMSFNCUtils.GetJSONValue(AJSONValue, n);\r\n\r\n p := nil;\r\n if Assigned(v) then\r\n begin\r\n t := JSONValueToPropertyType(v);\r\n if t <> cptUndefined then\r\n begin\r\n p := TTMSFNCJSONToClassProperty.Create(n, t);\r\n ci.Properties.Add(p);\r\n end;\r\n end;\r\n\r\n JSONValueToClass(p, v);\r\n end;\r\n end\r\n else if AJSONValue is TJSONArray then\r\n begin\r\n if TTMSFNCUtils.GetJSONArraySize(AJSONValue as TJSONArray) > 0 then\r\n begin\r\n t := JSONValueToPropertyType(AJSONValue);\r\n v := TTMSFNCUtils.GetJSONArrayItem(AJSONValue as TJSONArray, 0);\r\n if not Assigned(AParentProperty) and (t <> cptUndefined) then\r\n begin\r\n ci := TTMSFNCJSONToClassItem.Create(nil);\r\n p := TTMSFNCJSONToClassProperty.Create('Items', t);\r\n ci.Properties.Add(p);\r\n FClasses.Add(ci);\r\n AParentProperty := p;\r\n end;\r\n\r\n JSONValueToClass(AParentProperty, v);\r\n end\r\n else\r\n begin\r\n ci := TTMSFNCJSONToClassItem.Create(AParentProperty);\r\n FClasses.Add(ci);\r\n end;\r\n end\r\n else\r\n begin\r\n\r\n end;\r\nend;\r\n\r\nclass function TTMSFNCJSONToClass.JSONValueToPropertyType(\r\n AJSONValue: TJSONValue): TTMSFNCJSONToClassPropertyType;\r\nvar\r\n s: string;\r\n dt: TDateTime;\r\n b: Boolean;\r\n v: TJSONValue;\r\n p: TTMSFNCJSONToClassPropertyType;\r\n d: Double;\r\n i: Integer;\r\n i64: Int64;\r\nbegin\r\n Result := cptUndefined;\r\n if not Assigned(AJSONValue) then\r\n Exit;\r\n\r\n if AJSONValue is TJSONObject then\r\n Result := cptObject\r\n else if AJSONValue is TJSONArray then\r\n begin\r\n Result := cptObjectArray;\r\n if TTMSFNCUtils.GetJSONArraySize(AJSONValue as TJSONArray) > 0 then\r\n begin\r\n v := TTMSFNCUtils.GetJSONArrayItem(AJSONValue as TJSONArray, 0);\r\n if Assigned(v) then\r\n begin\r\n p := JSONValueToPropertyType(v);\r\n case p of\r\n cptString: Result := cptStringArray;\r\n cptBoolean: Result := cptBooleanArray;\r\n cptDateTime: Result := cptDateTimeArray;\r\n cptObject: Result := cptObjectArray;\r\n cptDouble: Result := cptDoubleArray;\r\n cptInteger: Result := cptIntegerArray;\r\n cptInteger64: Result := cptInteger64Array;\r\n end;\r\n end;\r\n end;\r\n end\r\n else if AJSONValue is TJSONNumber then\r\n begin\r\n s := AJSONValue.Value;\r\n if TryStrToInt(s, i) then\r\n Result := cptInteger\r\n else if TryStrToInt64(s, i64) then\r\n Result := cptInteger64\r\n else if not TTMSFNCUtils.TryStrToFloatDot(s, d) then\r\n Result := cptString\r\n else\r\n Result := cptDouble;\r\n end\r\n {$IFDEF LCLLIB}\r\n else if AJSONValue is TJSONBoolean then\r\n Result := cptBoolean\r\n {$ENDIF}\r\n {$IFNDEF LCLLIB}\r\n else if (AJSONValue is TJSONTrue) or (AJSONValue is TJSONFalse) then\r\n Result := cptBoolean\r\n {$ENDIF}\r\n else if AJSONValue is TJSONString then\r\n begin\r\n s := AJSONValue.Value;\r\n\r\n if TTMSFNCUtils.TryStrToFloatDot(s, d) then\r\n Result := cptString\r\n else if TTMSFNCUtils.IsDate(s, dt) or {$IFDEF FNCLIB}(TTMSFNCUtils.ISOToDateTime(s, True) > 0) or{$ENDIF} TryStrToDateTime(s, dt) then\r\n Result := cptDateTime\r\n else if TryStrToBool(s, b) then\r\n Result := cptBoolean\r\n else\r\n Result:= cptString;\r\n end;\r\nend;\r\n\r\nclass function TTMSFNCJSONToClass.ExportToDelphiFromFile(AFileName: string; ACallBack: TTMSFNCJSONToClassExportEvent = nil): string;\r\nbegin\r\n Result := ExportToDelphiFromFile(AFileName, DefaultJSONToClassOptions, ACallBack);\r\nend;\r\n\r\nclass function TTMSFNCJSONToClass.ExportToDelphi(AJSONString: string; ACallBack: TTMSFNCJSONToClassExportEvent = nil): string;\r\nbegin\r\n Result := ExportToDelphi(AJSONString, DefaultJSONToClassOptions, ACallBack);\r\nend;\r\n\r\nclass function TTMSFNCJSONToClass.ExportToDelphi(AJSONValue: TJSONValue; ACallBack: TTMSFNCJSONToClassExportEvent = nil): string;\r\nbegin\r\n Result := ExportToDelphi(AJSONValue.ToString, DefaultJSONToClassOptions, ACallBack);\r\nend;\r\n\r\nclass function TTMSFNCJSONToClass.ExportToDelphiFromFile(AFileName: string; AOptions: TTMSFNCJSONToClassOptions; ACallBack: TTMSFNCJSONToClassExportEvent = nil): string;\r\nvar\r\n sl: TStringList;\r\nbegin\r\n sl := TStringList.Create;\r\n try\r\n sl.LoadFromFile(AFileName);\r\n Result := ExportToDelphi(sl.Text, AOptions, ACallBack);\r\n finally\r\n sl.Free;\r\n end;\r\nend;\r\n\r\n{$IFDEF LCLLIB}\r\nfunction CompareNameVal(const Item1, Item2: TTMSFNCJSONToClassProperty): Integer;\r\nbegin\r\n Result := CompareText(Item1.Name, Item2.Name);\r\nend;\r\n{$ENDIF}\r\n\r\nclass function TTMSFNCJSONToClass.ExportToDelphi(AJSONValue: TJSONValue; AOptions: TTMSFNCJSONToClassOptions; ACallBack: TTMSFNCJSONToClassExportEvent = nil): string;\r\nbegin\r\n Result := ExportToDelphi(AJSONValue.ToString, AOptions, ACallBack);\r\nend;\r\n\r\nclass function TTMSFNCJSONToClass.ExportToDelphi(AJSONString: string; AOptions: TTMSFNCJSONToClassOptions; ACallBack: TTMSFNCJSONToClassExportEvent = nil): string;\r\nvar\r\n root: TJSONValue;\r\n I, K: Integer;\r\n c: TTMSFNCJSONToClassItem;\r\n sl: TStringList;\r\n p: TTMSFNCJSONToClassProperty;\r\n ind: string;\r\n cn: string;\r\n slRendered: TStringList;\r\n\r\n procedure SortList(const AList: TTMSFNCJSONToClassProperties);\r\n {$IFNDEF LCLWEBLIB}\r\n var\r\n cmp: TTMSFNCJSONToClassPropertyNameComparer;\r\n {$ENDIF}\r\n begin\r\n {$IFNDEF LCLWEBLIB}\r\n cmp := TTMSFNCJSONToClassPropertyNameComparer.Create;\r\n try\r\n AList.Sort(cmp);\r\n finally\r\n cmp.Free;\r\n end;\r\n {$ENDIF}\r\n {$IFDEF LCLLIB}\r\n AList.Sort(@CompareNameVal);\r\n {$ENDIF}\r\n {$IFDEF WEBLIB}\r\n AList.Sort(TComparer.Construct(\r\n function(const ALeft, ARight: TTMSFNCJSONToClassProperty): Integer\r\n begin\r\n Result := CompareText(ALeft.Name, ARight.Name);\r\n end));\r\n {$ENDIF}\r\n end;\r\nbegin\r\n root := TTMSFNCUtils.ParseJSON(AJSONString);\r\n if Assigned(root) then\r\n begin\r\n try\r\n FClasses := TTMSFNCJSONToClassItems.Create;\r\n try\r\n JSONValueToClass(nil, root);\r\n\r\n sl := TStringList.Create;\r\n slRendered := TStringList.Create;\r\n try\r\n {$IFNDEF LCLLIB}\r\n {$HINTS OFF}\r\n {$IF COMPILERVERSION > 30}\r\n sl.TrailingLineBreak := False;\r\n {$IFEND}\r\n {$HINTS ON}\r\n {$ENDIF}\r\n\r\n ind := '';\r\n if AOptions.AddUnit then\r\n begin\r\n sl.Add('unit MyDelphiUnit;');\r\n sl.Add('');\r\n sl.Add('interface');\r\n sl.Add('');\r\n sl.Add('uses');\r\n sl.Add(' Classes, System.Generics.Collections;');\r\n sl.Add('');\r\n sl.Add('type');\r\n ind := ' ';\r\n end;\r\n\r\n for I := FClasses.Count - 1 downto 0 do\r\n begin\r\n c := FClasses[I];\r\n cn := c.GetClassName(ACallBack, AOptions);\r\n if slRendered.IndexOf(cn) = -1 then\r\n begin\r\n case AOptions.BaseClass of\r\n cbcNone: sl.Add(ind + cn + ' = class');\r\n cbcPersistent: sl.Add(ind + cn + ' = class(TPersistent)');\r\n end;\r\n\r\n if AOptions.SortProperties then\r\n SortList(c.Properties);\r\n\r\n\r\n if c.Properties.Count > 0 then\r\n begin\r\n sl.Add(ind + 'private');\r\n for K := 0 to c.Properties.Count - 1 do\r\n begin\r\n p := c.Properties[K];\r\n sl.Add(ind + ' F' + p.DelphiName(ACallBack, AOptions, False) + ': ' + p.DelphiType(ACallBack, AOptions) + ';');\r\n end;\r\n end;\r\n\r\n if AOptions.AddConstructor or AOptions.AddDestructor or AOptions.AddAssign then\r\n begin\r\n sl.Add(ind + 'public');\r\n\r\n if AOptions.AddAssign then\r\n begin\r\n case AOptions.BaseClass of\r\n cbcNone: sl.Add(ind + ' procedure Assign(Source: TObject);');\r\n cbcPersistent: sl.Add(ind + ' procedure Assign(Source: TPersistent); override;');\r\n end;\r\n end;\r\n\r\n if AOptions.AddConstructor then\r\n sl.Add(ind + ' constructor Create;');\r\n\r\n if AOptions.AddDestructor then\r\n sl.Add(ind + ' destructor Destroy; override;');\r\n end;\r\n\r\n if c.Properties.Count > 0 then\r\n begin\r\n sl.Add(ind + 'published');\r\n for K := 0 to c.Properties.Count - 1 do\r\n begin\r\n p := c.Properties[K];\r\n sl.Add(ind + ' property ' + p.DelphiName(ACallBack, AOptions) + ': ' + p.DelphiType(ACallBack, AOptions) + ' read F' + p.DelphiName(ACallBack, AOptions, False) + ' write F' + p.DelphiName(ACallBack, AOptions, False) + ';');\r\n end;\r\n end;\r\n\r\n sl.Add(ind + 'end;');\r\n sl.Add('');\r\n\r\n slRendered.Add(cn);\r\n end;\r\n end;\r\n\r\n slRendered.Clear;\r\n\r\n if AOptions.AddUnit then\r\n begin\r\n sl.Add('implementation');\r\n sl.Add('');\r\n if AOptions.AddImplementation then\r\n begin\r\n slRendered.Clear;\r\n\r\n for I := FClasses.Count - 1 downto 0 do\r\n begin\r\n c := FClasses[I];\r\n\r\n cn := c.GetClassName(ACallBack,AOptions);\r\n if slRendered.IndexOf(cn) = -1 then\r\n begin\r\n if AOptions.AddConstructor or AOptions.AddDestructor or AOptions.AddAssign then\r\n begin\r\n sl.Add('{ ' + c.GetClassName(ACallBack, AOptions) + ' }');\r\n sl.Add('');\r\n\r\n if AOptions.AddAssign then\r\n begin\r\n case AOptions.BaseClass of\r\n cbcNone: sl.Add('procedure ' + cn + '.Assign(Source: TObject);');\r\n cbcPersistent: sl.Add('procedure ' + cn + '.Assign(Source: TPersistent);');\r\n end;\r\n\r\n sl.Add('begin');\r\n sl.Add(' if (Source is ' + cn + ') then');\r\n sl.Add(' begin');\r\n for K := 0 to c.Properties.Count - 1 do\r\n begin\r\n p := c.Properties[K];\r\n if (p.&Type = cptObject) then\r\n sl.Add(' F' + p.DelphiName(ACallBack, AOptions, False) + '.Assign((Source as ' + cn + ').' + p.DelphiName(ACallBack, AOptions, True) + ');')\r\n else if not p.IsObject then\r\n sl.Add(' F' + p.DelphiName(ACallBack, AOptions, False) + ' := (Source as ' + cn + ').' + p.DelphiName(ACallBack, AOptions, True) + ';')\r\n else\r\n sl.Add(' //F' + p.DelphiName(ACallBack, AOptions, False) + ' := (Source as ' + cn + ').' + p.DelphiName(ACallBack, AOptions, True) + '; //implement list copy');\r\n end;\r\n sl.Add(' end;');\r\n sl.Add('end;');\r\n sl.Add('');\r\n end;\r\n\r\n if AOptions.AddConstructor then\r\n begin\r\n sl.Add('constructor ' + cn + '.Create;');\r\n sl.Add('begin');\r\n sl.Add(' inherited;');\r\n for K := 0 to c.Properties.Count - 1 do\r\n begin\r\n p := c.Properties[K];\r\n if p.IsObject then\r\n sl.Add(' F' + p.DelphiName(ACallBack, AOptions, False) + ' := ' + p.DelphiType(ACallBack, AOptions) + '.Create;');\r\n end;\r\n sl.Add('end;');\r\n sl.Add('');\r\n end;\r\n\r\n if AOptions.AddDestructor then\r\n begin\r\n sl.Add('destructor ' + cn + '.Destroy;');\r\n sl.Add('begin');\r\n for K := 0 to c.Properties.Count - 1 do\r\n begin\r\n p := c.Properties[K];\r\n if p.IsObject then\r\n sl.Add(' F' + p.DelphiName(ACallBack, AOptions, False) + '.Free;');\r\n end;\r\n sl.Add(' inherited;');\r\n sl.Add('end;');\r\n sl.Add('');\r\n end;\r\n\r\n slRendered.Add(cn);\r\n end;\r\n end;\r\n end;\r\n end;\r\n\r\n sl.Add('end.');\r\n end;\r\n\r\n while sl.Count > 0 do\r\n begin\r\n if sl[sl.Count - 1] = '' then\r\n sl.Delete(sl.Count - 1)\r\n else\r\n Break;\r\n end;\r\n\r\n Result := sl.Text;\r\n finally\r\n slRendered.Free;\r\n sl.Free;\r\n end;\r\n\r\n finally\r\n FClasses.Free;\r\n end;\r\n finally\r\n root.Free;\r\n end;\r\n end;\r\nend;\r\n\r\n{ TTMSFNCJSONToClassItem }\r\n\r\nconstructor TTMSFNCJSONToClassItem.Create(\r\n AParentProperty: TTMSFNCJSONToClassProperty);\r\nbegin\r\n FParentProperty := AParentProperty;\r\nend;\r\n\r\ndestructor TTMSFNCJSONToClassItem.Destroy;\r\nbegin\r\n if Assigned(FProperties) then\r\n FProperties.Free;\r\n inherited;\r\nend;\r\n\r\nfunction TTMSFNCJSONToClassItem.GetClassName(ACallBack: TTMSFNCJSONToClassExportEvent; AOptions: TTMSFNCJSONToClassOptions): string;\r\nbegin\r\n Result := 'TMyDelphiClass';\r\n if Assigned(ParentProperty) then\r\n Result := 'T' + ParentProperty.DelphiName(ACallBack, AOptions, False);\r\nend;\r\n\r\nfunction TTMSFNCJSONToClassItem.GetProperties: TTMSFNCJSONToClassProperties;\r\nbegin\r\n if not Assigned(FProperties) then\r\n FProperties := TTMSFNCJSONToClassProperties.Create;\r\n\r\n Result := FProperties;\r\nend;\r\n\r\n{ TTMSFNCJSONToClassProperty }\r\n\r\nconstructor TTMSFNCJSONToClassProperty.Create(AName: string;\r\n AType: TTMSFNCJSONToClassPropertyType);\r\nbegin\r\n FName := AName;\r\n FType := AType;\r\nend;\r\n\r\nfunction TTMSFNCJSONToClassProperty.DelphiName(ACallBack: TTMSFNCJSONToClassExportEvent; AOptions: TTMSFNCJSONToClassOptions; AFixKeyWord: Boolean = True): string;\r\nvar\r\n n, s: string;\r\n c: Char;\r\n sl: TStringList;\r\n I: Integer;\r\n p: string;\r\n pt: TTMSFNCJSONToClassPropertyType;\r\nbegin\r\n Result := '';\r\n if Length(Name) > 0 then\r\n begin\r\n p := Name;\r\n pt := &Type;\r\n\r\n if Assigned(ACallBack) then\r\n ACallBack(p, pt);\r\n\r\n sl := TStringList.Create;\r\n try\r\n\r\n if AOptions.RemoveSpecialCharacters then\r\n begin\r\n s := p;\r\n p := '';\r\n\r\n for c in s do\r\n begin\r\n if TTMSFNCUtils.IsLetterOrDigit(c) then\r\n p := p + c\r\n else\r\n p := p + '_'\r\n end;\r\n end;\r\n\r\n TTMSFNCUtils.Split('_', p, sl);\r\n\r\n for I := 0 to sl.Count - 1 do\r\n begin\r\n n := sl[I];\r\n\r\n if Length(n) > 0 then\r\n begin\r\n if AOptions.DelphiCasing then\r\n n := UpperCase(n[{$IFNDEF ZEROSTRINGINDEX}1{$ELSE}0{$ENDIF}]) + Copy(n, 2, Length(n) - 1);\r\n end;\r\n\r\n Result := Result + n;\r\n end;\r\n\r\n if AFixKeyWord then\r\n Result := FixKeyWord(Result);\r\n\r\n finally\r\n sl.Free;\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCJSONToClassProperty.DelphiType(ACallBack: TTMSFNCJSONToClassExportEvent; AOptions: TTMSFNCJSONToClassOptions): string;\r\nvar\r\n n: string;\r\n t: TTMSFNCJSONToClassPropertyType;\r\nbegin\r\n Result := '';\r\n\r\n n := Name;\r\n t := FType;\r\n if Assigned(ACallBack) then\r\n ACallBack(n, t);\r\n\r\n case t of\r\n cptUndefined: Result := 'UNDEFINED';\r\n cptString: Result := 'string';\r\n cptBoolean: Result := 'Boolean';\r\n cptDateTime: Result := 'TDateTime';\r\n cptObject: Result := 'T' + DelphiName(ACallback, AOptions, False);\r\n cptDouble: Result := 'Double';\r\n cptInteger: Result := 'Integer';\r\n cptInteger64: Result := 'Int64';\r\n cptObjectArray: Result := 'TObjectList<' + 'T' + DelphiName(ACallback, AOptions, False) + '>';\r\n cptDoubleArray: Result := 'TList';\r\n cptStringArray: Result := 'TList';\r\n cptBooleanArray: Result := 'TList';\r\n cptDateTimeArray: Result := 'TList';\r\n cptIntegerArray: Result := 'TList';\r\n cptInteger64Array: Result := 'TList';\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCJSONToClassProperty.FixKeyWord(AValue: string): string;\r\nconst\r\n a: array[0..64] of string = ('and','array', 'as', 'asm', 'begin',\r\n 'case', 'class', 'const', 'constructor', 'destructor',\r\n 'dispinterface', 'div',\t'do',\t'downto',\t'else',\r\n 'end',\t'except',\t'exports',\t'file',\t'finalization',\r\n 'finally',\t'for',\t'function',\t'goto',\t'if',\r\n 'implementation',\t'in',\t'inherited',\t'initialization',\t'inline',\r\n 'interface',\t'is',\t'label',\t'library', 'mod',\r\n 'nil',\t'not',\t'object',\t'of',\t'or',\r\n 'out',\t'packed',\t'procedure',\t'program', 'property',\r\n 'raise',\t'record',\t'repeat',\t'resourcestring',\t'set',\r\n 'shl',\t'shr',\t'string',\t'then',\t'threadvar',\r\n 'to',\t'try',\t'type',\t'unit',\t'until',\r\n 'uses',\t'var',\t'while',\t'with',\t'xor');\r\nbegin\r\n Result := AValue;\r\n if TTMSFNCUtils.IndexOfTextInArray(UpperCase(AValue), a) <> -1 then\r\n Result := '&' + AValue;\r\nend;\r\n\r\nfunction TTMSFNCJSONToClassProperty.IsObject: Boolean;\r\nbegin\r\n Result := &Type in [cptObject, cptObjectArray, cptStringArray, cptBooleanArray, cptDateTimeArray, cptDoubleArray, cptIntegerArray, cptInteger64Array];\r\nend;\r\n\r\n{ TTMSFNCJSONToClassPropertyNameComparer }\r\n\r\n{$IFNDEF LCLWEBLIB}\r\nfunction TTMSFNCJSONToClassPropertyNameComparer.Compare(const Left,\r\n Right: TTMSFNCJSONToClassProperty): Integer;\r\nbegin\r\n Result := CompareText(Left.Name, Right.Name);\r\nend;\r\n{$ENDIF}\r\n{$ENDIF}\r\n\r\n\r\ninitialization\r\nbegin\r\n TTMSFNCPersistence.ClassTypeVariable := '$type';\r\n TTMSFNCPersistence.IgnoreExceptions := False;\r\nend;\r\n\r\nend.\r\n\r\n\r\n","{********************************************************************}\r\n{ }\r\n{ written by TMS Software }\r\n{ copyright (c) 2020 - 2024 }\r\n{ Email : info@tmssoftware.com }\r\n{ Web : https://www.tmssoftware.com }\r\n{ }\r\n{ The source code is given as is. The author is not responsible }\r\n{ for any possible damage done due to the use of this code. }\r\n{ The complete source code remains property of the author and may }\r\n{ not be distributed, published, given or sold in any form as such. }\r\n{ No parts of the source code can be included in any other component }\r\n{ or application without written authorization of the author. }\r\n{********************************************************************}\r\n\r\nunit WEBLib.TMSFNCWebBrowser;\r\n\r\n{$I WEBLib.TMSFNCDefines.inc}\r\n\r\n{$IFDEF WEBLIB}\r\n{$DEFINE CMNWEBLIB}\r\n{$DEFINE LCLWEBLIB}\r\n{$ENDIF}\r\n{$IFDEF CMNLIB}\r\n{$DEFINE CMNWEBLIB}\r\n{$ENDIF}\r\n{$IFDEF LCLLIB}\r\n{$DEFINE LCLWEBLIB}\r\n{$ENDIF}\r\n\r\n{$IFDEF MSWINDOWS}\r\n{$DEFINE USEEDGE}\r\n{$ENDIF}\r\n\r\n{$IFDEF USEEDGE}\r\n{$DEFINE EDGESUPPORT}\r\n{$ENDIF}\r\n\r\ninterface\r\n\r\nuses\r\n {$IFDEF MSWINDOWS}\r\n Windows,\r\n {$ENDIF}\r\n {$IFDEF FMXLIB}\r\n UITypes, FMX.Types, System.Messaging, FMX.Menus,\r\n {$ENDIF}\r\n {$IFDEF VCLLIB}\r\n VCL.Menus, Messages,\r\n {$ENDIF}\r\n {$IFDEF LCLLIB}\r\n Menus,\r\n {$ENDIF}\r\n Types, WEBLib.TMSFNCCustomControl, WEBLib.TMSFNCGraphics, WEBLib.TMSFNCUtils, WEBLib.TMSFNCTypes,\r\n Classes, TypInfo,\r\n {$IFNDEF LCLLIB}\r\n Generics.Collections,\r\n {$ELSE}\r\n fgl,\r\n {$ENDIF}\r\n {$IFDEF WEBLIB}\r\n Contnrs, WEBLib.Menus,\r\n {$ENDIF}\r\n WEBLib.StdCtrls, WEBLib.Forms, WEBLib.Controls\r\n {$IFDEF ANDROID}\r\n ,FMX.Platform.Android, AndroidApi.JNI.Embarcadero, AndroidApi.JNI.App, Androidapi.JNI.GraphicsContentViewText, AndroidApi.JNI.JavaTypes,\r\n AndroidApi.JNI.Widget, FMX.Helpers.Android, AndroidApi.JNIBridge, AndroidApi.Helpers\r\n {$ENDIF}\r\n {$IFDEF IOS}\r\n ,FMX.Platform.iOS, iOSApi.CocoaTypes, iOSApi.CoreGraphics, iOSApi.UIKit, iOSApi.Foundation,\r\n Macapi.ObjectiveC, MacApi.ObjcRuntime\r\n {$ENDIF}\r\n {$IFDEF MACOS}\r\n {$IFNDEF IOS}\r\n ,MacApi.Foundation, MacApi.AppKit, MacApi.CocoaTypes, FMX.Platform.Mac\r\n {$ENDIF}\r\n ,MacApi.Helpers\r\n {$ENDIF}\r\n ;\r\n\r\nconst\r\n {$IFDEF FNCLIB}\r\n MAJ_VER = 1; // Major version nr.\r\n MIN_VER = 1; // Minor version nr.\r\n REL_VER = 8; // Release nr.\r\n BLD_VER = 2; // Build nr.\r\n {$ENDIF}\r\n {$IFNDEF FNCLIB}\r\n MAJ_VER = 1; // Major version nr.\r\n MIN_VER = 3; // Minor version nr.\r\n REL_VER = 3; // Release nr.\r\n BLD_VER = 3; // Build nr.\r\n {$ENDIF}\r\n DESIGNTIMEMESSAGE = 'Selectable/Draggable area (only active at designtime)';\r\n\r\n //v1.0.0.0 : First release\r\n //v1.0.0.1 : Improved : Interfaces added to Edge Chromium to add JavaScript object injection\r\n // (bridge to Delphi) and capture preview capabilities in TTMSFNCWebBrowser\r\n //1.1.0.0 : New : CaptureScreenShot method\r\n // : New : JavaScript bridge support\r\n // : Fixed : Issue with Visibility / Parenting in FMX\r\n //1.1.1.0 : Improved : Support for Microsoft Edge Chromium Stable v85.0.564.41 detection/fallback mechanism\r\n //1.1.2.0 : Improved : CacheFolderName & ClearCache for defining Edge Chromium cache folder\r\n // : Improved : Moved Edge detection entry points and variables to be available at application level\r\n //1.1.2.1 : Fixed : Issue detecting stable version v86.0.622.38 (copy to temp folder solution)\r\n //1.1.3.0 : New : CacheFolder, CacheFolderName & AutoClearCache properties\r\n // : Improved : Changed ClearCache property to method to manually clear cache\r\n // : Fixed : Issues with clearing cache when AutoClearCache = False\r\n //1.1.4.0 : New : EnableAcceleratorKeys to enable/disable keyboard accelerator keys\r\n //1.1.4.1 : Fixed : Issue with default value of EnableAcceleratorKeys\r\n //1.1.4.2 : Fixed : Issue with reparenting in Windows\r\n //1.1.4.3 : Fixed : Issue with scaling in FMX\r\n //1.1.4.4 : Fixed : Issue with focus exception in combination with TMS Scripter\r\n //1.1.4.5 : Fixed : Issue with keyboard handling in macOS\r\n //1.1.4.6 : Fixed : Issue with border being visible in Linux GTK\r\n //1.1.4.7 : Fixed : Issue with retaining and releasing focus in macOS\r\n {$IFDEF FNCLIB}\r\n //1.1.4.8 : New : Methods added for TMSFNCEdgeWebBrowser\r\n //1.1.4.9 : Fixed : Issue with the menus unit in Linux Lazarus\r\n //1.1.5.0 : New : DevTool Protocol methods implemented\r\n // : New : Download Manager implemented\r\n //1.1.5.1 : Fixed : Issue parsing JavaScript functions in WEB\r\n //1.1.5.2 : Fixed : Edge Chromium fallback implementation causing multiple copies in Windows temp folder during runtime update mechanism\r\n //1.1.6.0 : New : Additional events added\r\n // : Fixed : Issue with download assign in TMSFNCWebBrowser.Win\r\n //1.1.6.1 : Fixed : Issue with focus in FMX\r\n // : Fixed : Issue with URL property set on retrieving frame\r\n // : Fixed : Issue with persistence of EnableContextMenu property\r\n //1.1.7.0 : New : Setup settings Additional Browser Arguments and language properties available\r\n //1.1.8.0 : New : Virtual Hosting methods\r\n //1.1.8.1 : Fixed : Issue with request parameters in OnWebResourceRequested event\r\n //1.1.8.2 : Fixed : Issue with accessing local files in Linux\r\n {$ENDIF}\r\n {$IFNDEF FNCLIB}\r\n //1.2.0.0 : New : Print and save to PDF\r\n // : New : Use popupmenu or manipulate context menu\r\n // : New : Manage Cookies\r\n // : New : Navigate with custom method and data\r\n //1.3.0.0 : New : DevTool Protocol methods implemented\r\n // : New : Download Manager implemented\r\n //1.3.0.1 : Fixed : Issue parsing JavaScript functions in WEB\r\n //1.3.0.2 : Fixed : Edge Chromium fallback implementation causing multiple copies in Windows temp folder during runtime update mechanism\r\n //1.3.1.0 : New : Additional events added\r\n // : Fixed : Issue with download assign in TMSFNCWebBrowser.Win\r\n //1.3.1.1 : Fixed : Issue with URL property set on retrieving frame\r\n // : Fixed : Issue with persistence of EnableContextMenu property\r\n //1.3.1.2 : Fixed : Issue with Handled parameter in NewWindowRequested\r\n //1.3.2.0 : New : Setup settings Additional Browser Arguments and language properties available\r\n //1.3.3.0 : New : Virtual Hosting methods\r\n //1.3.3.1 : Improved : WebView2 Downloads Estimated End Time event and property added\r\n //1.3.3.2 : Fixed : Issue with request parameters in OnWebResourceRequested event\r\n //1.3.3.3 : Fixed : Issue with accessing local files in Linux\r\n {$ENDIF}\r\nconst\r\n {$IFDEF FNCLIB}\r\n IID_ITMSFNCCustomWebBrowserGUID = '{F74562D0-56C7-4ED2-B01B-8C9C16DD9361}';\r\n IID_ITMSFNCCustomWebBrowserExGUID = '{6B5D75C1-B5EC-463D-A602-1FFB97C8668C}';\r\n IID_ITMSFNCCustomWebBrowserContextMenuGUID = '{04BD0560-104B-4D3B-8CB1-45628D16CB0D}';\r\n IID_ITMSFNCCustomWebBrowserBridgeGUID = '{AC2934EC-9397-4A99-8E0A-1EF58803C8EA}';\r\n IID_ITMSFNCCustomWebBrowserSettingsGUID = '{25142510-A807-4635-BAE7-CB261D00137E}';\r\n IID_ITMSFNCCustomWebBrowserCookiesGUID = '{A50ABF08-0A6F-4877-AC92-FC834CF36AE6}';\r\n IID_ITMSFNCCustomWebBrowserServiceGUID = '{4B7A5FE1-A889-47C6-B40F-A611BB6266E6}';\r\n IID_ITMSFNCCustomWebBrowserPrintGUID = '{56EFC9E8-CD92-4FAC-B79C-084BF3DB0FBD}';\r\n IID_ITMSFNCCustomWebBrowserEdgeGUID = '{BAA1AC1A-4392-4496-A595-47388CC6A083}';\r\n IID_ITMSFNCCustomWebBrowserInfoGUID = '{307CE047-ED5D-4B5C-87EF-0237EC695C08}';\r\n IID_ITMSFNCCustomWebBrowserVirtualHostingGUID = '{CCAC3B8B-6A04-4D01-BFB3-D873D645C965}';\r\n {$ELSE}\r\n IID_ITMSFNCCustomWebBrowserGUID = '{8CE780C0-D22F-4063-993B-CFB0DD7D1351}';\r\n IID_ITMSFNCCustomWebBrowserExGUID = '{8620B994-4E90-4A43-82A6-62BD445E76F5}';\r\n IID_ITMSFNCCustomWebBrowserContextMenuGUID = '{45D26565-5CB6-4343-80F0-2E31991C13E1}';\r\n IID_ITMSFNCCustomWebBrowserBridgeGUID = '{E639C360-3FD0-4F63-9132-E8D0044EF860}';\r\n IID_ITMSFNCCustomWebBrowserSettingsGUID = '{86DF94BF-9310-4291-B22A-2E791A797E29}';\r\n IID_ITMSFNCCustomWebBrowserCookiesGUID = '{6B92ADFC-FD76-4708-B8AB-60904123449E}';\r\n IID_ITMSFNCCustomWebBrowserServiceGUID = '{94C7BF89-2B0A-40DF-8C24-B393CEB91389}';\r\n IID_ITMSFNCCustomWebBrowserPrintGUID = '{8C4A1B85-CC31-4A4D-9334-6D76DBAC569C}';\r\n IID_ITMSFNCCustomWebBrowserEdgeGUID = '{CCFBAF21-A278-40DC-AD61-51A70D58EAE4}';\r\n IID_ITMSFNCCustomWebBrowserInfoGUID = '{A89FBC24-BA7C-486C-8D49-1C8F6D60418D}';\r\n IID_ITMSFNCCustomWebBrowserVirtualHostingGUID = '{4D6BD1AE-33BA-42CD-A792-442C10F9F6CF}';\r\n {$ENDIF}\r\n IID_ITMSFNCCustomWebBrowser: TGUID = IID_ITMSFNCCustomWebBrowserGUID;\r\n IID_ITMSFNCCustomWebBrowserBridge: TGUID = IID_ITMSFNCCustomWebBrowserBridgeGUID;\r\n IID_ITMSFNCCustomWebBrowserSettings: TGUID = IID_ITMSFNCCustomWebBrowserSettingsGUID;\r\n IID_ITMSFNCCustomWebBrowserCookies: TGUID = IID_ITMSFNCCustomWebBrowserCookiesGUID;\r\n IID_ITMSFNCCustomWebBrowserService: TGUID = IID_ITMSFNCCustomWebBrowserServiceGUID;\r\n IID_ITMSFNCCustomWebBrowserEx: TGUID = IID_ITMSFNCCustomWebBrowserExGUID;\r\n IID_ITMSFNCCustomWebBrowserEdge: TGUID = IID_ITMSFNCCustomWebBrowserEdgeGUID;\r\n IID_ITMSFNCCustomWebBrowserContextMenu: TGUID = IID_ITMSFNCCustomWebBrowserContextMenuGUID;\r\n IID_ITMSFNCCustomWebBrowserPrint: TGUID = IID_ITMSFNCCustomWebBrowserPrintGUID;\r\n IID_ITMSFNCCustomWebBrowserVirtualHosting: TGUID = IID_ITMSFNCCustomWebBrowserVirtualHostingGUID;\r\n\r\ntype\r\n TTMSFNCWebBrowserJavaScriptCompleteEvent = {$IFNDEF LCLLIB}reference to {$ENDIF}procedure(const AValue: string){$IFDEF LCLLIB} of object{$ENDIF};\r\n TTMSFNCWebBrowserCaptureScreenShotCompleteEvent = {$IFNDEF LCLLIB}reference to {$ENDIF}procedure(const AScreenShot: TTMSFNCBitmap){$IFDEF LCLLIB} of object{$ENDIF};\r\n\r\n TTMSFNCWebBrowserContextMenuType = (mtPage, mtImage, mtSelectedText, mtAudio, mtVideo, (*not implemented in dll only for Delphi usage*)mtSubMenu);\r\n TTMSFNCWebBrowserContextMenuItemKind = (ikCommand, ikCheckBox, ikRadioButton, ikSeperator, ikSubMenu);\r\n TTMSFNCWebBrowserPrintOrientation = (poPortrait, poLandscape);\r\n TTMSFNCWebBrowserHostResourceAccessKind = (akDeny, akAllow, akDenyCors);\r\n\r\n TTMSFNCWebBrowserSystemContextMenuItem = class;\r\n TTMSFNCWebBrowserCustomContextMenuItem = class;\r\n\r\n {$IFNDEF MACOS}\r\n TTMSFNCWebBrowserSameSiteType = (sstNone, sstLax, sstSameSite); //Lax means same-site and cross-site\r\n {$ENDIF}\r\n\r\n TTMSFNCWebBrowserCookie = record\r\n Path: string;\r\n Name: string;\r\n Expires: TDateTime;\r\n Domain: string;\r\n Secure: Boolean;\r\n HTTPOnly: Boolean;\r\n Value: string;\r\n Session: Boolean;\r\n {$IFNDEF MACOS}\r\n SameSite: TTMSFNCWebBrowserSameSiteType;\r\n {$ENDIF}\r\n end;\r\n\r\n TTMSFNCCustomWebBrowser = class;\r\n\r\n TTMSFNCWebBrowserLogSeverityLevel = (lslUnknown, lslVerbose, lslInfo, lslWarning, lslError);\r\n// TTMSFNCWebBrowserLogSource = (lsOther, lsXML, lsJavascript, lsNetwork, lsStorage, lsAppCache, lsRendering, lsSecurity, lsDeprecation, lsWorker, lsViolation, lsIntervention, lsRecommendation);\r\n\r\n TTMSFNCWebBrowserLogEntry = record\r\n Level: TTMSFNCWebBrowserLogSeverityLevel;\r\n Text: string;\r\n// Source: TTMSFNCWebBrowserLogSource\r\n Url: string;\r\n LineNumber: integer;\r\n TimeStamp: TDateTime;\r\n end;\r\n\r\n TTMSFNCWebBrowserDownloadInterruptReason = (dirNone, dirFileFailed, dirFileAccessDenied, dirFileNoSpace, dirFileNameTooLong, dirFileTooLarge, dirFileMalicious, dirFileTransientError, dirFileBlockedByPolicy,\r\n dirFileSecurityCheckFailed, dirFileTooShort, dirFileHasMismatch, dirNetworkFailed, dirNetworkTimeout, dirNetworkDisconnected, dirNetworkServerDown, dirNetworkInvalidRequest, dirServerFailed, dirServerNoRange,\r\n dirServerBadContent, dirServerUnauthorized, dirServerCertificateProblem, dirServerForbidden, dirServerUnexpectedResponse, dirServerContentLengthMismatch, dirServerCrossOriginRedirect, dirUserCanceled,\r\n dirUserShutdown, dirUserPaused, dirDownloadProcessCrashed);\r\n\r\n TTMSFNCWebBrowserDownloadState = (dsInProgress, dsInterrupted, dsCompleted, dsCancelled);\r\n\r\n TTMSFNCWebBrowserDownload = class(TCollectionItem)\r\n private\r\n FOwner: TTMSFNCCustomWebBrowser;\r\n FDataPointer: Pointer;\r\n FDataBoolean: Boolean;\r\n FDataString: String;\r\n FDataObject: TObject;\r\n FDataInteger: NativeInt;\r\n FInterruptReason: TTMSFNCWebBrowserDownloadInterruptReason;\r\n FCanResume: Boolean;\r\n FState: TTMSFNCWebBrowserDownloadState;\r\n FBytesReceived: Int64;\r\n FMimeType: string;\r\n FURI: string;\r\n FTotalBytes: Int64;\r\n FResultFilePath: string;\r\n FEstimatedEndTime: TDateTime;\r\n procedure SetResultFilePath(const Value: string);\r\n protected\r\n FInternalOperationInterface: IInterface;\r\n procedure SetURI(const Value: string);\r\n procedure SetTotalBytes(const Value: Int64);\r\n procedure SetBytesReceived(const Value: Int64);\r\n procedure SetState(const Value: TTMSFNCWebBrowserDownloadState);\r\n procedure SetInterruptReason(const Value: TTMSFNCWebBrowserDownloadInterruptReason);\r\n procedure SetMimeType(const Value: string);\r\n procedure SetCanResume(const Value: boolean);\r\n procedure SetEstimatedEndTime(const Value: TDateTime);\r\n public\r\n constructor Create(ACollection: TCollection); override;\r\n destructor Destroy; override;\r\n procedure Cancel;\r\n procedure Pause;\r\n procedure Resume;\r\n property URI: string read FURI;\r\n property ResultFilePath: string read FResultFilePath write SetResultFilePath;\r\n property State: TTMSFNCWebBrowserDownloadState read FState;\r\n property InterruptReason: TTMSFNCWebBrowserDownloadInterruptReason read FInterruptReason;\r\n property BytesReceived: Int64 read FBytesReceived;\r\n property TotalBytes: Int64 read FTotalBytes;\r\n property MimeType: string read FMimeType;\r\n property EstimatedEndTime: TDateTime read FEstimatedEndTime write FEstimatedEndTime;\r\n property CanResume: Boolean read FCanResume;\r\n property DataPointer: Pointer read FDataPointer write FDataPointer;\r\n property DataBoolean: Boolean read FDataBoolean write FDataBoolean;\r\n property DataObject: TObject read FDataObject write FDataObject;\r\n property DataString: String read FDataString write FDataString;\r\n property DataInteger: NativeInt read FDataInteger write FDataInteger;\r\n end;\r\n\r\n {$IFDEF WEBLIB}\r\n TTMSFNCWebBrowserDownloads = class(TTMSFNCOwnedCollection)\r\n {$ELSE}\r\n TTMSFNCWebBrowserDownloads = class({$IFDEF LCLLIB}specialize {$ENDIF}TTMSFNCOwnedCollection)\r\n {$ENDIF}\r\n private\r\n FOwner: TTMSFNCCustomWebBrowser;\r\n function GetItem(Index: Integer): TTMSFNCWebBrowserDownload;\r\n procedure SetItem(Index: Integer; const Value: TTMSFNCWebBrowserDownload);\r\n protected\r\n function CreateItemClass: TCollectionItemClass; virtual;\r\n function GetOwner: TPersistent; override;\r\n public\r\n constructor Create(AOwner: TTMSFNCCustomWebBrowser); virtual;\r\n property Items[Index: Integer]: TTMSFNCWebBrowserDownload read GetItem write SetItem; default;\r\n function Add: TTMSFNCWebBrowserDownload;\r\n function Insert(Index: Integer): TTMSFNCWebBrowserDownload;\r\n procedure ClearFinishedDownloads;\r\n function GetDownloadByURI(AURI: string): TTMSFNCWebBrowserDownload;\r\n function GetDownloadByResultFile(AResultFilePath: string): TTMSFNCWebBrowserDownload;\r\n procedure RemoveDownloadsByState(AState: TTMSFNCWebBrowserDownloadState);\r\n end;\r\n\r\n TTMSFNCWebBrowserTargetItem = record\r\n Kind: TTMSFNCWebBrowserContextMenuType;\r\n URI: string;\r\n SelectionText: string;\r\n LinkText: string;\r\n end;\r\n\r\n TTMSFNCWebBrowserContextMenuItem = class;\r\n\r\n TTMSFNCWebBrowserContextMenuItemList = class(TObjectList);\r\n\r\n TTMSFNCWebBrowserContextMenuItem = class(TPersistent)\r\n private\r\n FParentItem: TTMSFNCWebBrowserContextMenuItem;\r\n FName: string;\r\n FText: string;\r\n FChildren: TTMSFNCWebBrowserContextMenuItemList;\r\n FCommandId: Integer;\r\n FEnabled: Boolean;\r\n FShortcutKeyDescription: string;\r\n FKind: TTMSFNCWebBrowserContextMenuItemKind;\r\n FChecked: Boolean;\r\n FOriginalIndex: Integer;\r\n FInternalObject: TObject;\r\n FDataPointer: Pointer;\r\n FDataBoolean: Boolean;\r\n FDataString: String;\r\n FDataObject: TObject;\r\n FDataInteger: NativeInt;\r\n FIcon: TTMSFNCBitmap;\r\n FEventHandlerObject: TObject;\r\n procedure SetShortcutKeyDescription(const Value: string);\r\n protected\r\n property Name: string read FName write FName;\r\n property Text: string read FText write FText;\r\n property Children: TTMSFNCWebBrowserContextMenuItemList read FChildren write FChildren;\r\n property OriginalIndex: Integer read FOriginalIndex write FOriginalIndex;\r\n property CommandId: Integer read FCommandId write FCommandId;\r\n property ShortcutKeyDescription: string read FShortcutKeyDescription write SetShortcutKeyDescription;\r\n property Icon: TTMSFNCBitmap read FIcon write FIcon;\r\n property Kind: TTMSFNCWebBrowserContextMenuItemKind read FKind write FKind;\r\n property Enabled: Boolean read FEnabled write FEnabled;\r\n property Checked: Boolean read FChecked write FChecked;\r\n property InternalObject: TObject read FInternalObject write FInternalObject;\r\n property EventHandlerObject: TObject read FEventHandlerObject write FEventHandlerObject;\r\n property ParentItem: TTMSFNCWebBrowserContextMenuItem read FParentItem write FParentItem;\r\n public\r\n constructor Create;\r\n destructor Destroy; override;\r\n function AsCustom: TTMSFNCWebBrowserCustomContextMenuItem;\r\n function AsSystem: TTMSFNCWebBrowserSystemContextMenuItem;\r\n property DataPointer: Pointer read FDataPointer write FDataPointer;\r\n property DataBoolean: Boolean read FDataBoolean write FDataBoolean;\r\n property DataObject: TObject read FDataObject write FDataObject;\r\n property DataString: String read FDataString write FDataString;\r\n property DataInteger: NativeInt read FDataInteger write FDataInteger;\r\n end;\r\n\r\n TTMSFNCWebBrowserSystemContextMenuItem = class(TTMSFNCWebBrowserContextMenuItem)\r\n private\r\n function GetName: string;\r\n function GetText: string;\r\n function GetChildren: TObjectList;\r\n function GetKind: TTMSFNCWebBrowserContextMenuItemKind;\r\n function GetChecked: Boolean;\r\n function GetEnabled: Boolean;\r\n function GetIcon: TTMSFNCBitmap;\r\n function GetParentItem: TTMSFNCWebBrowserContextMenuItem;\r\n public\r\n property Name: string read GetName;\r\n property Text: string read GetText;\r\n property Children: TObjectList read GetChildren;\r\n property Kind: TTMSFNCWebBrowserContextMenuItemKind read GetKind;\r\n property Enabled: Boolean read GetEnabled;\r\n property Checked: Boolean read GetChecked;\r\n property Icon: TTMSFNCBitmap read GetIcon;\r\n property ParentItem: TTMSFNCWebBrowserContextMenuItem read GetParentItem;\r\n end;\r\n\r\n TTMSFNCWebBrowserCustomContextMenuItem = class(TTMSFNCWebBrowserContextMenuItem)\r\n private\r\n function GetParentItem: TTMSFNCWebBrowserContextMenuItem;\r\n public\r\n property Name;\r\n property Text;\r\n property Children;\r\n property Kind;\r\n property Enabled;\r\n property Checked;\r\n property Icon;\r\n property ParentItem: TTMSFNCWebBrowserContextMenuItem read GetParentItem;\r\n end;\r\n\r\n TTMSFNCWebBrowserPrintSettings = record\r\n Orientation: TTMSFNCWebBrowserPrintOrientation;\r\n ScaleFactor: Double;\r\n PageWidth: Integer;\r\n PageHeight: Integer;\r\n MarginLeft: Integer;\r\n MarginTop: Integer;\r\n MarginRight: Integer;\r\n MarginBottom: Integer;\r\n PrintBackgrounds: Boolean;\r\n PrintSelectionOnly: Boolean;\r\n PrintHeaderAndFooter: Boolean;\r\n HeaderTitle: string;\r\n FooterURI: string;\r\n end;\r\n\r\n TTMSFNCWebBrowserOnGetContextMenu = procedure(Sender: TObject; ATarget: TTMSFNCWebBrowserTargetItem; AContextMenu: TObjectList) of object;\r\n TTMSFNCWebBrowserOnGetPopupMenuForContextMenu = procedure(Sender: TObject; ATarget: TTMSFNCWebBrowserTargetItem; var APopupMenu: TPopupMenu) of object;\r\n TTMSFNCWebBrowserOnCustomContextMenuItemSelected = procedure(Sender: TObject; ASelectedItem: TTMSFNCWebBrowserCustomContextMenuItem) of object;\r\n TTMSFNCWebBrowserOnGetCookies = procedure(Sender: TObject; ACookies: array of TTMSFNCWebBrowserCookie) of object;\r\n TTMSFNCWebBrowserOnGetPrintPDFStream = procedure(Sender: TObject; AStream: TMemoryStream) of object;\r\n TTMSFNCWebBrowserOnGetDevTools = procedure(Sender: TObject; AEventName: string; AJSONResponse: string) of object;\r\n TTMSFNCWebBrowserOnDownloadStarted = procedure(Sender: TObject; ADownload: TTMSFNCWebBrowserDownload; var ASilent: Boolean; var APause: Boolean; var AResume: Boolean; var ACancel: Boolean) of object;\r\n TTMSFNCWebBrowserOnDownloadStateChanged = procedure(Sender: TObject; ADownload: TTMSFNCWebBrowserDownload; AState: TTMSFNCWebBrowserDownloadState; var APause: Boolean; var AResume: Boolean; var ACancel: Boolean) of object;\r\n TTMSFNCWebBrowserOnDownloadBytesChanged = procedure(Sender: TObject; ADownload: TTMSFNCWebBrowserDownload; ABytesReceived: Int64; var APause: Boolean; var AResume: Boolean; var ACancel: Boolean) of object;\r\n TTMSFNCWebBrowserOnDownloadTimeChanged = procedure(Sender: TObject; ADownload: TTMSFNCWebBrowserDownload; ATime: TDateTime; var APause: Boolean; var AResume: Boolean; var ACancel: Boolean) of object;\r\n\r\n ITMSFNCCustomWebBrowserBridge = interface(IInterface)\r\n {$IFNDEF WEBLIB}\r\n [IID_ITMSFNCCustomWebBrowserBridgeGUID]\r\n {$ENDIF}\r\n function GetObjectMessage: string;\r\n procedure SetObjectMessage(const AValue: string);\r\n property ObjectMessage: string read GetObjectMessage write SetObjectMessage;\r\n end;\r\n\r\n ITMSFNCCustomWebBrowser = interface(IInterface)\r\n {$IFNDEF WEBLIB}\r\n [IID_ITMSFNCCustomWebBrowserGUID]\r\n {$ENDIF}\r\n procedure SetFocus;\r\n procedure ClearFocus;\r\n procedure SetUserAgent(const AValue: string);\r\n procedure SetURL(const AValue: string);\r\n procedure SetExternalBrowser(const AValue: Boolean);\r\n procedure SetEnableContextMenu(const AValue: Boolean);\r\n procedure SetEnableShowDebugConsole(const AValue: Boolean);\r\n procedure SetEnableAcceleratorKeys(const AValue: Boolean);\r\n procedure SetCacheFolderName(const Value: string);\r\n procedure SetAutoClearCache(const Value: Boolean);\r\n procedure SetCacheFolder(const Value: string);\r\n procedure Navigate(const AURL: String); overload;\r\n procedure Navigate; overload;\r\n procedure LoadHTML(AHTML: String);\r\n procedure LoadFile(AFile: String);\r\n procedure GoForward;\r\n procedure GoBack;\r\n procedure Reload;\r\n procedure Close;\r\n procedure StopLoading;\r\n procedure AddBridge(ABridgeName: string; ABridgeObject: TObject);\r\n procedure RemoveBridge(ABridgeName: string);\r\n procedure UpdateBounds;\r\n procedure CaptureScreenShot(ACompleteEvent: TTMSFNCWebBrowserCaptureScreenShotCompleteEvent = nil);\r\n procedure UpdateVisible;\r\n procedure UpdateEnabled;\r\n procedure BeforeChangeParent;\r\n procedure Initialize;\r\n procedure DeInitialize;\r\n procedure ClearCache;\r\n procedure ShowDebugConsole;\r\n function GetUserAgent: string;\r\n function GetURL: string;\r\n function GetExternalBrowser: Boolean;\r\n function GetEnableContextMenu: Boolean;\r\n function GetEnableShowDebugConsole: Boolean;\r\n function GetEnableAcceleratorKeys: Boolean;\r\n procedure ExecuteJavaScript(AScript: String; ACompleteEvent: TTMSFNCWebBrowserJavaScriptCompleteEvent; ACallback: TNotifyEvent);\r\n function NativeEnvironment: Pointer;\r\n function NativeBrowser: Pointer;\r\n function GetBrowserInstance: IInterface;\r\n function CanGoBack: Boolean;\r\n function CanGoForward: Boolean;\r\n function NativeDialog: Pointer;\r\n function IsFMXBrowser: Boolean;\r\n function GetCacheFolderName: string;\r\n function GetAutoClearCache: Boolean;\r\n function GetCacheFolder: string;\r\n procedure UpdateContentFromControl;\r\n property UserAgent: string read GetUserAgent write SetUserAgent;\r\n property CacheFolderName: string read GetCacheFolderName write SetCacheFolderName;\r\n property CacheFolder: string read GetCacheFolder write SetCacheFolder;\r\n property AutoClearCache: Boolean read GetAutoClearCache write SetAutoClearCache;\r\n property URL: string read GetURL write SetURL;\r\n property ExternalBrowser: Boolean read GetExternalBrowser write SetExternalBrowser;\r\n property EnableContextMenu: Boolean read GetEnableContextMenu write SetEnableContextMenu;\r\n property EnableShowDebugConsole: Boolean read GetEnableShowDebugConsole write SetEnableShowDebugConsole;\r\n property EnableAcceleratorKeys: Boolean read GetEnableAcceleratorKeys write SetEnableAcceleratorKeys;\r\n end;\r\n\r\n ITMSFNCCustomWebBrowserEx = interface(IInterface)\r\n {$IFNDEF WEBLIB}\r\n [IID_ITMSFNCCustomWebBrowserExGUID]\r\n {$ENDIF}\r\n procedure OpenTaskManagerWindow;\r\n procedure NavigateWithData(AURI: string; AMethod: string; ABody: string; AHeaders: TStrings = nil); overload;\r\n procedure NavigateWithData(AURI: string; AMethod: string; ABodyStream: TStream; AHeaders: TStrings = nil); overload;\r\n end;\r\n\r\n ITMSFNCCustomWebBrowserInfo = interface(IInterface)\r\n {$IFNDEF WEBLIB}\r\n [IID_ITMSFNCCustomWebBrowserInfoGUID]\r\n {$ENDIF}\r\n function GetDocumentTitle: string;\r\n function GetContainsFullScreenElement: Boolean;\r\n function GetParentWindowHandle: Cardinal;\r\n function GetBrowserVersion: string;\r\n function GetUserDataFolder: string;\r\n end;\r\n\r\n ITMSFNCCustomWebBrowserSettings = interface(IInterface)\r\n {$IFNDEF WEBLIB}\r\n [IID_ITMSFNCCustomWebBrowserSettingsGUID]\r\n {$ENDIF}\r\n function GetEnableScript: Boolean;\r\n procedure SetEnableScript(const Value: Boolean);\r\n function GetAllowExternalDrop: Boolean;\r\n procedure SetAllowExternalDrop(const Value: Boolean);\r\n property EnableScript: boolean read GetEnableScript write SetEnableScript;\r\n property AllowExternalDrop: boolean read GetAllowExternalDrop write SetAllowExternalDrop;\r\n end;\r\n\r\n ITMSFNCCustomWebBrowserCookies = interface(IInterface)\r\n {$IFNDEF WEBLIB}\r\n [IID_ITMSFNCCustomWebBrowserCookiesGUID]\r\n {$ENDIF}\r\n procedure GetCookies(AURI: string);\r\n procedure AddCookie(ACookie: TTMSFNCWebBrowserCookie);\r\n procedure DeleteAllCookies;\r\n procedure DeleteCookie(AName: string; ADomain: string; APath: string);\r\n end;\r\n\r\n ITMSFNCCustomWebBrowserEdge = interface(IInterface)\r\n {$IFNDEF WEBLIB}\r\n [IID_ITMSFNCCustomWebBrowserEdgeGUID]\r\n {$ENDIF}\r\n procedure SubscribeDevtools(AEventName: string);\r\n procedure CallDevToolsProtocolMethod(AMethodName: string; AParametersAsJSON: string);\r\n procedure EnableDevToolDomain(AEventName: string; AJSONParameters: string = '');\r\n procedure DisableDevToolDomain(ADomain: string);\r\n procedure SetupStartDomains;\r\n procedure CancelDownload(ADownload: TTMSFNCWebBrowserDownload);\r\n procedure PauseDownload(ADownload: TTMSFNCWebBrowserDownload);\r\n procedure ResumeDownload(ADownload: TTMSFNCWebBrowserDownload);\r\n end;\r\n\r\n ITMSFNCCustomWebBrowserContextMenu = interface(IInterface)\r\n {$IFNDEF WEBLIB}\r\n [IID_ITMSFNCCustomWebBrowserContextMenuGUID]\r\n {$ENDIF}\r\n end;\r\n\r\n ITMSFNCCustomWebBrowserPrint = interface(IInterface)\r\n {$IFNDEF WEBLIB}\r\n [IID_ITMSFNCCustomWebBrowserPrintGUID]\r\n {$ENDIF}\r\n procedure ShowPrintUI;\r\n procedure Print; overload;\r\n procedure Print(APrintSettings: TTMSFNCWebBrowserPrintSettings); overload;\r\n procedure PrintToPDFStream(APrintSettings: TTMSFNCWebBrowserPrintSettings); overload;\r\n procedure PrintToPDFStream; overload;\r\n procedure PrintToPDF(AFileName: string; APrintSettings: TTMSFNCWebBrowserPrintSettings); overload;\r\n procedure PrintToPDF(AFileName: string); overload;\r\n end;\r\n\r\n ITMSFNCCustomWebBrowserVirtualHosting = interface(IInterface)\r\n {$IFNDEF WEBLIB}\r\n [IID_ITMSFNCCustomWebBrowserVirtualHostingGUID]\r\n {$ENDIF}\r\n procedure SetVirtualHostNameToFolderMapping(AHostName, AFolderPath: string; AAccessKind: TTMSFNCWebBrowserHostResourceAccessKind);\r\n procedure ClearVirtualHostNameToFolderMapping(AHostName: string);\r\n end;\r\n\r\n ITMSFNCWebBrowserService = interface(IInterface)\r\n {$IFNDEF WEBLIB}\r\n [IID_ITMSFNCCustomWebBrowserServiceGUID]\r\n {$ENDIF}\r\n function CreateWebBrowser(const AValue: TTMSFNCCustomWebBrowser): ITMSFNCCustomWebBrowser;\r\n procedure DeleteCookies;\r\n procedure DestroyWebBrowser(const AValue: ITMSFNCCustomWebBrowser);\r\n end;\r\n\r\n TTMSFNCCustomWebBrowserNavigateCompleteParams = record\r\n URL: String;\r\n Success: Boolean;\r\n ErrorCode: Integer;\r\n end;\r\n\r\n TTMSFNCCustomWebBrowserBeforeNavigateParams = record\r\n URL: String;\r\n Cancel: Boolean;\r\n end;\r\n\r\n TTMSFNCCustomWebBrowserFrameNavigateCompleteParams = record\r\n URL: String;\r\n Success: Boolean;\r\n ErrorCode: Integer;\r\n end;\r\n\r\n TTMSFNCCustomWebBrowserBeforeFrameNavigateParams = record\r\n URL: String;\r\n Cancel: Boolean;\r\n end;\r\n\r\n TTMSFNCWebBrowserNewWindowRequestedParams = record\r\n URL: String;\r\n Handled: Boolean;\r\n IsUserInitiated: Boolean;\r\n end;\r\n\r\n TTMSFNCWebBrowserPermissionKind = (pkUnknown, pkMicrophone, pkCamera, pkGeolocation, pkNotifications, pkOtherSensors, pkClipboardRead);\r\n TTMSFNCWebBrowserPermissionState = (psDefault, psAllow, psDeny);\r\n\r\n TTMSFNCWebBrowserPermissionRequestedParams = record\r\n State: TTMSFNCWebBrowserPermissionState;\r\n URL: String;\r\n PermissionKind: TTMSFNCWebBrowserPermissionKind;\r\n IsUserInitiated: Boolean;\r\n end;\r\n\r\n TTMSFNCWebBrowserProcessFailedKind = (pfkBrowserProcessExited, pfkRenderProcessExited, pfkRenderProcessUnresponsive, pfkFrameRenderProcessExited, pfkUtilityProcessExited,\r\n pfkSandboxHelperProcessExited, pfkGpuProcessExited, pfkPpapiPluginProcessExited, pfkPpapiBrokerProcessExited, pfkUnknownProcessExited);\r\n\r\n TTMSFNCWebBrowserProcessFailedParams = record\r\n ProcessFailedKind: TTMSFNCWebBrowserProcessFailedKind;\r\n end;\r\n\r\n TTMSFNCWebBrowserScriptDialogKind = (sdkAlert, sdkConfirm, sdkPrompt, sdkBeforeUnload, sdkUnknown);\r\n\r\n TTMSFNCWebBrowserScriptDialogOpeningParams = record\r\n URL: String;\r\n ResultText: String;\r\n Accept: Boolean;\r\n DialogMessage: String;\r\n DialogKind: TTMSFNCWebBrowserScriptDialogKind;\r\n DefaultText: String;\r\n end;\r\n\r\n TTMSFNCWebBrowserSourceChangedParams = record\r\n IsNewDocument: Boolean;\r\n end;\r\n\r\n TTMSFNCWebBrowserWebMessageReceivedParams = record\r\n Source: String;\r\n WebMessageAsJSON: String;\r\n end;\r\n\r\n TTMSFNCWebBrowserWebResourceRequest = record\r\n URL: String;\r\n Method: String;\r\n end;\r\n\r\n TTMSFNCWebBrowserWebResourceContext = (wrcAll, wrcDocument, wrcStylesheet, wrcImage, wrcMedia, wrcFont, wrcScript, wrcXMLHTTPRequest, wrcFetch, wrcTextTrack, wrcEventSource, wrcWebSocket, wrcManifest, wrcSignedExchange, wrcPing, wrcCSPViolationReport, wrcOther);\r\n\r\n TTMSFNCWebBrowserWebResourceRequestedParams = record\r\n Request: TTMSFNCWebBrowserWebResourceRequest;\r\n ResourceContext: TTMSFNCWebBrowserWebResourceContext;\r\n end;\r\n\r\n TTMSFNCCustomWebBrowserNavigateComplete = procedure(Sender: TObject; var Params: TTMSFNCCustomWebBrowserNavigateCompleteParams) of object;\r\n TTMSFNCCustomWebBrowserBeforeNavigate = procedure(Sender: TObject; var Params: TTMSFNCCustomWebBrowserBeforeNavigateParams) of object;\r\n TTMSFNCCustomWebBrowserCaptureScreenShot = procedure(Sender: TObject; AScreenShot: TTMSFNCBitmap) of object;\r\n TTMSFNCCustomWebBrowserOnExecuteSuccessful = procedure(Sender: TObject; ASuccessful: Boolean) of object;\r\n TTMSFNCCustomWebBrowserOnGetConsoleMessage = procedure(Sender: TObject; ALogEntry: TTMSFNCWebBrowserLogEntry) of object;\r\n TTMSFNCWebBrowserFrameNavigateComplete = procedure(Sender: TObject; var Params: TTMSFNCCustomWebBrowserFrameNavigateCompleteParams) of object;\r\n TTMSFNCWebBrowserBeforeFrameNavigate = procedure(Sender: TObject; var Params: TTMSFNCCustomWebBrowserBeforeFrameNavigateParams) of object;\r\n TTMSFNCWebBrowserNewWindowRequested = procedure(Sender: TObject; var Params: TTMSFNCWebBrowserNewWindowRequestedParams) of object;\r\n TTMSFNCWebBrowserPermissionRequested = procedure(Sender: TObject; var Params: TTMSFNCWebBrowserPermissionRequestedParams) of object;\r\n TTMSFNCWebBrowserProcessFailed = procedure(Sender: TObject; var Params: TTMSFNCWebBrowserProcessFailedParams) of object;\r\n TTMSFNCWebBrowserScriptDialogOpening = procedure(Sender: TObject; var Params: TTMSFNCWebBrowserScriptDialogOpeningParams) of object;\r\n TTMSFNCWebBrowserSourceChanged = procedure(Sender: TObject; var Params: TTMSFNCWebBrowserSourceChangedParams) of object;\r\n TTMSFNCWebBrowserWebMessageReceivedChanged = procedure(Sender: TObject; var Params: TTMSFNCWebBrowserWebMessageReceivedParams) of object;\r\n TTMSFNCWebBrowserWebResourceRequested = procedure(Sender: TObject; var Params: TTMSFNCWebBrowserWebResourceRequestedParams) of object;\r\n\r\n {$IFNDEF WEBLIB}\r\n TTMSFNCWebBrowserDocumentReadyStateThread = class(TThread)\r\n private\r\n FWebBrowser: TTMSFNCCustomWebBrowser;\r\n protected\r\n procedure Execute; override;\r\n public\r\n constructor Create(AWebBrowser: TTMSFNCCustomWebBrowser);\r\n end;\r\n {$ENDIF}\r\n\r\n {$IFNDEF WEBLIB}\r\n TTMSFNCScript = class\r\n private\r\n FScript: string;\r\n FCompleteEvent: TTMSFNCWebBrowserJavaScriptCompleteEvent;\r\n public\r\n constructor Create(AScript: string; ACompleteEvent: TTMSFNCWebBrowserJavaScriptCompleteEvent);\r\n end;\r\n\r\n TTMSFNCScriptList = class(TObjectList);\r\n {$ENDIF}\r\n\r\n TTMSFNCCustomWebBrowserSettings = class(TPersistent)\r\n private\r\n FOwner: TTMSFNCCustomWebBrowser;\r\n FAllowExternalDrop: Boolean;\r\n FEnableScript: Boolean;\r\n FEnableAcceleratorKeys: Boolean;\r\n FEnableContextMenu: Boolean;\r\n FEnableShowDebugConsole: Boolean;\r\n FUsePopupMenuAsContextMenu: Boolean;\r\n FLanguage: string;\r\n FAdditionalBrowserArguments: TStringList;\r\n function GetEnableAcceleratorKeys: Boolean;\r\n function GetEnableContextMenu: Boolean;\r\n function GetEnableScript: Boolean;\r\n function GetEnableShowDebugConsole: Boolean;\r\n procedure SetEnableAcceleratorKeys(const Value: Boolean);\r\n procedure SetEnableContextMenu(const Value: Boolean);\r\n procedure SetEnableShowDebugConsole(const Value: Boolean);\r\n procedure SetEnableScript(const Value: boolean);\r\n function GetUsePopupMenuAsContextMenu: Boolean;\r\n procedure SetUsePopupMenuAsContextMenu(const Value: Boolean);\r\n function GetAllowExternalDrop: Boolean;\r\n procedure SetAllowExternalDrop(const Value: Boolean);\r\n procedure SetAdditionalBrowserArguments(const Value: TStringList);\r\n protected\r\n procedure ApplySettings;\r\n property EnableScript: Boolean read GetEnableScript write SetEnableScript;\r\n property EnableContextMenu: Boolean read GetEnableContextMenu write SetEnableContextMenu;\r\n property EnableShowDebugConsole: Boolean read GetEnableShowDebugConsole write SetEnableShowDebugConsole;\r\n property EnableAcceleratorKeys: Boolean read GetEnableAcceleratorKeys write SetEnableAcceleratorKeys;\r\n property UsePopupMenuAsContextMenu: Boolean read GetUsePopupMenuAsContextMenu write SetUsePopupMenuAsContextMenu;\r\n property AllowExternalDrop: Boolean read GetAllowExternalDrop write SetAllowExternalDrop;\r\n property AdditionalBrowserArguments: TStringList read FAdditionalBrowserArguments write SetAdditionalBrowserArguments;\r\n property Language: string read FLanguage write FLanguage;\r\n public\r\n constructor Create(AOwner: TTMSFNCCustomWebBrowser);\r\n destructor Destroy; override;\r\n end;\r\n\r\n TTMSFNCWebBrowserSettings = class(TTMSFNCCustomWebBrowserSettings)\r\n published\r\n// property EnableScript;\r\n property EnableContextMenu;\r\n property EnableShowDebugConsole;\r\n property EnableAcceleratorKeys;\r\n property AllowExternalDrop;\r\n property UsePopupMenuAsContextMenu;\r\n property Language;\r\n property AdditionalBrowserArguments;\r\n end;\r\n\r\n TTMSFNCWebBrowserError = class(TPersistent)\r\n private\r\n FMessage: string;\r\n FType: string;\r\n function GetMessage: string;\r\n function GetType: string;\r\n protected\r\n function GetDefaultErrorMessage: string; virtual;\r\n function GetDefaultType: string; virtual;\r\n public\r\n constructor Create(AMessage, AType: string); overload; virtual;\r\n constructor Create(AMessage: string); overload; virtual;\r\n constructor CreateDefault; virtual;\r\n published\r\n property &Message: string read GetMessage;\r\n property &Type: string read GetType;\r\n end;\r\n\r\n TTMSFNCWebBrowserErrorEvent = procedure(Sender: TObject; AError: TTMSFNCWebBrowserError) of object;\r\n\r\n TTMSFNCCustomWebBrowser = class(TTMSFNCCustomControl)\r\n private\r\n FInitializeEventCalled: Boolean;\r\n FDesigntimeEnabled: Boolean;\r\n FCanDestroyDispatch: Boolean;\r\n FSyncValue: string;\r\n FSyncValueExecuted: Boolean;\r\n FThreadDone: Boolean;\r\n FReady: Boolean;\r\n FInitialized: Boolean;\r\n {$IFNDEF WEBLIB}\r\n FScriptList: TTMSFNCScriptList;\r\n FDocumentReadyStateThread: TTMSFNCWebBrowserDocumentReadyStateThread;\r\n {$ENDIF}\r\n FWebBrowser: ITMSFNCCustomWebBrowser;\r\n FURL: string;\r\n FExternalBrowser, FEnableShowDebugConsole, FEnableAcceleratorKeys, FEnableContextMenu: Boolean;\r\n FOnNavigateComplete: TTMSFNCCustomWebBrowserNavigateComplete;\r\n FOnBeforeNavigate: TTMSFNCCustomWebBrowserBeforeNavigate;\r\n FOnHardwareButtonClicked: TNotifyEvent;\r\n FOnInitialized: TNotifyEvent;\r\n FOnCloseForm: TNotifyEvent;\r\n FOnDocumentComplete: TNotifyEvent;\r\n FOnCaptureScreenShot: TTMSFNCCustomWebBrowserCaptureScreenShot;\r\n FSettings: TTMSFNCWebBrowserSettings;\r\n FOnGetContextMenu: TTMSFNCWebBrowserOnGetContextMenu;\r\n FOnGetCookies: TTMSFNCWebBrowserOnGetCookies;\r\n FOnGetPrintPDFStream: TTMSFNCWebBrowserOnGetPrintPDFStream;\r\n FOnPrintedToPDF: TTMSFNCCustomWebBrowserOnExecuteSuccessful;\r\n FOnPrinted: TTMSFNCCustomWebBrowserOnExecuteSuccessful;\r\n FOnCustomContextMenuItemSelected: TTMSFNCWebBrowserOnCustomContextMenuItemSelected;\r\n FOnGetPopupMenuForContextMenu: TTMSFNCWebBrowserOnGetPopupMenuForContextMenu;\r\n FOnDevToolsSubscribedEvent: TTMSFNCWebBrowserOnGetDevTools;\r\n FOnDevToolsMethodCompleted: TTMSFNCWebBrowserOnGetDevTools;\r\n FOnGetConsoleMessage: TTMSFNCCustomWebBrowserOnGetConsoleMessage;\r\n FOnDownloadStarted: TTMSFNCWebBrowserOnDownloadStarted;\r\n FDownloads: TTMSFNCWebBrowserDownloads;\r\n FOnDownloadStateChanged: TTMSFNCWebBrowserOnDownloadStateChanged;\r\n FOnDownloadBytesReceivedChanged: TTMSFNCWebBrowserOnDownloadBytesChanged;\r\n FOnContainsFullScreenElementChanged: TNotifyEvent;\r\n FOnDocumentTitleChanged: TNotifyEvent;\r\n FOnFrameNavigateComplete: TTMSFNCWebBrowserFrameNavigateComplete;\r\n FOnBeforeFrameNavigate: TTMSFNCWebBrowserBeforeFrameNavigate;\r\n FOnHistoryChanged: TNotifyEvent;\r\n FOnNewWindowRequested: TTMSFNCWebBrowserNewWindowRequested;\r\n FOnPermissionRequested: TTMSFNCWebBrowserPermissionRequested;\r\n FOnProcessFailed: TTMSFNCWebBrowserProcessFailed;\r\n FOnScriptDialogOpening: TTMSFNCWebBrowserScriptDialogOpening;\r\n FOnSourceChanged: TTMSFNCWebBrowserSourceChanged;\r\n FOnWebMessageReceived: TTMSFNCWebBrowserWebMessageReceivedChanged;\r\n FOnWebResourceRequested: TTMSFNCWebBrowserWebResourceRequested;\r\n FOnWindowCloseRequested: TNotifyEvent;\r\n FOnZoomFactorChanged: TNotifyEvent;\r\n FOnDownloadEstimatedEndTimeChanged: TTMSFNCWebBrowserOnDownloadTimeChanged;\r\n FOnError: TTMSFNCWebBrowserErrorEvent;\r\n function GetURL: string;\r\n procedure SetURL(const Value: string);\r\n function GetExternalBrowser: Boolean;\r\n procedure SetExternalBrowser(const Value: Boolean);\r\n function GetEnableContextMenu: Boolean;\r\n function GetEnableShowDebugConsole: Boolean;\r\n procedure SetEnableContextMenu(const Value: Boolean);\r\n procedure SetEnableShowDebugConsole(const Value: Boolean);\r\n function GetCacheFolder: string;\r\n function GetCacheFolderName: string;\r\n function GetAutoClearCache: Boolean;\r\n procedure SetCacheFolder(const Value: string);\r\n procedure SetCacheFolderName(const Value: string);\r\n procedure SetAutoClearCache(const Value: Boolean);\r\n procedure SetDesigntimeEnabled(const Value: Boolean);\r\n function GetEnableAcceleratorKeys: Boolean;\r\n procedure SetEnabledAcceleratorKeys(const Value: Boolean);\r\n function GetUserAgent: string;\r\n procedure SetUserAgent(const Value: string);\r\n procedure DoExecuteJavaScriptSync(const AValue: string);\r\n procedure SetSettings(const Value: TTMSFNCWebBrowserSettings);\r\n function GetSettingsI: ITMSFNCCustomWebBrowserSettings;\r\n {$IFDEF FMXLIB}\r\n {$HINTS OFF}\r\n {$IF COMPILERVERSION > 32}\r\n procedure FormHandleCreated(const Sender: TObject; const Msg: TMessage);\r\n {$IFEND}\r\n {$HINTS ON}\r\n {$ENDIF}\r\n {$IFDEF VCLLIB}\r\n procedure CMVisibleChanged(var Message: TMessage); message CM_VISIBLECHANGED;\r\n {$ENDIF}\r\n protected\r\n {$IFDEF LCLLIB}\r\n {$IFDEF UNIX}\r\n {$IFDEF LCLGTK3}\r\n class procedure WSRegisterClass; override;\r\n {$ENDIF}\r\n {$ENDIF}\r\n {$ENDIF}\r\n\r\n function GetDocURL: string; override;\r\n function GetVersion: string; override;\r\n function CanCreateBrowser: Boolean;\r\n function CanBeVisible: Boolean; virtual;\r\n function CheckIdentifier: Boolean; virtual;\r\n class procedure DeleteCookies; virtual;\r\n {$IFNDEF WEBLIB}\r\n procedure StartDocumentReadyStateThread; virtual;\r\n procedure DoTerminate(Sender: TObject);\r\n procedure StopDocumentReadyStateThread;\r\n procedure DoScriptHandled(Sender: TObject);\r\n {$ENDIF}\r\n {$IFDEF WEBLIB}\r\n procedure UpdateElement; override;\r\n {$ENDIF}\r\n procedure DoEnter; override;\r\n procedure DoExit; override;\r\n procedure DoError(AError: TTMSFNCWebBrowserError); virtual;\r\n procedure ChangeDPIScale({%H-}M, {%H-}D: Integer); override;\r\n procedure CreateClasses; virtual;\r\n procedure DoDocumentComplete; virtual;\r\n procedure CheckApplicationInitialized;\r\n procedure DoCheckReadyState(const AValue: string);\r\n procedure DoCheckIdentifier(const AValue: string);\r\n procedure DoHardwareButtonClicked; virtual;\r\n procedure DoCloseForm; virtual;\r\n procedure DoCaptureScreenShot(AScreenShot: TTMSFNCBitmap); virtual;\r\n procedure BeforeNavigate(var Params: TTMSFNCCustomWebBrowserBeforeNavigateParams); virtual;\r\n procedure NavigateComplete(var Params: TTMSFNCCustomWebBrowserNavigateCompleteParams); virtual;\r\n procedure Initialized; virtual;\r\n {$IFDEF FMXLIB}\r\n procedure AncestorVisibleChanged(const Visible: Boolean); override;\r\n procedure SetParent(const Value: TFmxObject); override;\r\n procedure SetVisible(const Value: Boolean); override;\r\n procedure SetEnabled(const Value: Boolean); override;\r\n {$ENDIF}\r\n {$IFDEF CMNWEBLIB}\r\n {$IFDEF CMNLIB}\r\n procedure SetParent(Value: TWinControl); override;\r\n {$ELSE}\r\n procedure SetParent(Value: TControl); override;\r\n {$ENDIF}\r\n procedure SetEnabled(Value: Boolean); override;\r\n {$ENDIF}\r\n procedure DoKeyPressed(var Key: Word); virtual;\r\n procedure Draw({%H-}AGraphics: TTMSFNCGraphics; {%H-}ARect: TRectF); override;\r\n procedure Loaded; override;\r\n property OnInitialized: TNotifyEvent read FOnInitialized write FOnInitialized;\r\n property OnError: TTMSFNCWebBrowserErrorEvent read FOnError write FOnError;\r\n property ExternalBrowser: Boolean read GetExternalBrowser write SetExternalBrowser default False;\r\n procedure Navigate; overload; virtual;\r\n procedure Navigate(const AURL: string); overload; virtual;\r\n procedure ExecuteJavaScript(AScript: String; ACompleteEvent: TTMSFNCWebBrowserJavaScriptCompleteEvent = nil; AImmediate: Boolean = False); virtual;\r\n function ExecuteJavaScriptSync(AScript: string): string; virtual;\r\n procedure LoadHTML(AHTML: String); virtual;\r\n procedure LoadFile(AFile: String); virtual;\r\n procedure Initialize; virtual;\r\n procedure DeInitialize; virtual;\r\n procedure GoForward; virtual;\r\n procedure GoBack; virtual;\r\n procedure Reload; virtual;\r\n procedure StopLoading; virtual;\r\n procedure AddBridge(ABridgeName: string; ABridgeObject: TObject); virtual;\r\n procedure RemoveBridge(ABridgeName: string); virtual;\r\n procedure CaptureScreenShot(ACompleteEvent: TTMSFNCWebBrowserCaptureScreenShotCompleteEvent = nil); virtual;\r\n procedure ShowDebugConsole; virtual;\r\n property URL: string read GetURL write SetURL;\r\n property SettingsI: ITMSFNCCustomWebBrowserSettings read GetSettingsI;\r\n function GetBridgeCommunicationLayer(ABridgeName: string): string; virtual;\r\n function NativeEnvironment: Pointer; virtual;\r\n function NativeBrowser: Pointer; virtual;\r\n function IsFMXBrowser: Boolean; virtual;\r\n function CanGoBack: Boolean; virtual;\r\n function CanGoForward: Boolean; virtual;\r\n {$IFDEF ANDROID}\r\n function NativeDialog: Pointer; virtual;\r\n {$ENDIF}\r\n {$IFDEF MSWINDOWS}\r\n function GetWebBrowserInstance: IInterface; virtual;\r\n {$ENDIF}\r\n property OnCloseForm: TNotifyEvent read FOnCloseForm write FOnCloseForm;\r\n property OnBeforeNavigate: TTMSFNCCustomWebBrowserBeforeNavigate read FOnBeforeNavigate write FOnBeforeNavigate;\r\n property OnNavigateComplete: TTMSFNCCustomWebBrowserNavigateComplete read FOnNavigateComplete write FOnNavigateComplete;\r\n property OnHardwareButtonClicked: TNotifyEvent read FOnHardwareButtonClicked write FOnHardwareButtonClicked;\r\n property OnDocumentComplete: TNotifyEvent read FOnDocumentComplete write FOnDocumentComplete;\r\n property OnCaptureScreenShot: TTMSFNCCustomWebBrowserCaptureScreenShot read FOnCaptureScreenShot write FOnCaptureScreenShot;\r\n property EnableContextMenu: Boolean read GetEnableContextMenu write SetEnableContextMenu default True;\r\n property EnableShowDebugConsole: Boolean read GetEnableShowDebugConsole write SetEnableShowDebugConsole default True;\r\n property EnableAcceleratorKeys: Boolean read GetEnableAcceleratorKeys write SetEnabledAcceleratorKeys default True;\r\n property CacheFolder: string read GetCacheFolder write SetCacheFolder;\r\n property CacheFolderName: string read GetCacheFolderName write SetCacheFolderName;\r\n property AutoClearCache: Boolean read GetAutoClearCache write SetAutoClearCache;\r\n property UserAgent: string read GetUserAgent write SetUserAgent;\r\n property CanDestroyDispatch: Boolean read FCanDestroyDispatch write FCanDestroyDispatch;\r\n property DesigntimeEnabled: Boolean read FDesigntimeEnabled write SetDesigntimeEnabled default True;\r\n property Settings: TTMSFNCWebBrowserSettings read FSettings write SetSettings;\r\n property OnGetContextMenu: TTMSFNCWebBrowserOnGetContextMenu read FOnGetContextMenu write FOnGetContextMenu;\r\n property OnGetPopupMenuForContextMenu: TTMSFNCWebBrowserOnGetPopupMenuForContextMenu read FOnGetPopupMenuForContextMenu write FOnGetPopupMenuForContextMenu;\r\n property OnCustomContextMenuItemSelected: TTMSFNCWebBrowserOnCustomContextMenuItemSelected read FOnCustomContextMenuItemSelected write FOnCustomContextMenuItemSelected;\r\n procedure DoGetContextMenuItemEvent(ATarget: TTMSFNCWebBrowserTargetItem; AContextMenu: TObjectList);\r\n procedure DoGetPopupMenuForContextMenu(ATarget: TTMSFNCWebBrowserTargetItem; var APopUpMenu: TPopupMenu);\r\n procedure DoCustomContextMenuItemSelected(ASelectedItem: TTMSFNCWebBrowserCustomContextMenuItem); virtual;\r\n function InitialPrintSettings: TTMSFNCWebBrowserPrintSettings; virtual;\r\n procedure DoGetPrintPDFStream(AStream: TMemoryStream); virtual;\r\n property OnGetPrintPDFStream: TTMSFNCWebBrowserOnGetPrintPDFStream read FOnGetPrintPDFStream write FOnGetPrintPDFStream;\r\n property OnGetCookies: TTMSFNCWebBrowserOnGetCookies read FOnGetCookies write FOnGetCookies;\r\n procedure DoGetCookies(ACookies: array of TTMSFNCWebBrowserCookie); virtual;\r\n procedure DoPrintedToPDF(ASuccesfull: Boolean); virtual;\r\n procedure DoPrinted(APrinterStatus: Boolean); virtual;\r\n property OnPrintedToPDF: TTMSFNCCustomWebBrowserOnExecuteSuccessful read FOnPrintedToPDF write FOnPrintedToPDF;\r\n property OnPrinted: TTMSFNCCustomWebBrowserOnExecuteSuccessful read FOnPrinted write FOnPrinted;\r\n procedure OpenTaskManager; virtual;\r\n procedure GetCookies(AURI: string = ''); virtual;\r\n procedure AddCookie(ACookie: TTMSFNCWebBrowserCookie); virtual;\r\n procedure DeleteAllCookies; virtual;\r\n procedure DeleteCookie(AName: string; ADomain: string; APath: string); virtual;\r\n procedure SetVirtualHostNameToFolderMapping(AHostName, AFolderPath: string; AAccessKind: TTMSFNCWebBrowserHostResourceAccessKind); virtual;\r\n procedure ClearVirtualHostNameToFolderMapping(AHostName: string); virtual;\r\n procedure ShowPrintUI; virtual;\r\n procedure Print(APrintSettings: TTMSFNCWebBrowserPrintSettings); overload; virtual;\r\n procedure Print; overload; virtual;\r\n procedure PrintToPDFStream(APrintSettings: TTMSFNCWebBrowserPrintSettings); overload; virtual;\r\n procedure PrintToPDFStream; overload; virtual;\r\n procedure PrintToPDF(AFileName: string; APrintSettings: TTMSFNCWebBrowserPrintSettings); overload; virtual;\r\n procedure PrintToPDF(AFileName: string); overload; virtual;\r\n procedure NavigateWithData(AURI: string; AMethod: string; ABody: string; AHeaders: TStrings = nil); overload; virtual;\r\n procedure NavigateWithData(AURI: string; AMethod: string; ABodyStream: TStream; AHeaders: TStrings = nil); overload; virtual;\r\n procedure ClearCache; virtual;\r\n procedure SubscribeDevtools(AEventName: string); virtual;\r\n procedure CallDevToolsProtocolMethod(AMethodName: string; AParametersAsJSON: string); virtual;\r\n procedure DoDevToolsMethodCompleted(AEventName: string; AJSONResponse: string); virtual;\r\n procedure DoDevToolsSubscribedEvent(AEventName: string; AJSONResponse: string); virtual;\r\n procedure DoGetConsoleMessage(ALogEntry: TTMSFNCWebBrowserLogEntry); virtual;\r\n procedure SetupStartDomains; virtual;\r\n property OnDevToolsMethodCompleted: TTMSFNCWebBrowserOnGetDevTools read FOnDevToolsMethodCompleted write FOnDevToolsMethodCompleted;\r\n property OnDevToolsSubscribedEvent: TTMSFNCWebBrowserOnGetDevTools read FOnDevToolsSubscribedEvent write FOnDevToolsSubscribedEvent;\r\n property OnGetConsoleMessage: TTMSFNCCustomWebBrowserOnGetConsoleMessage read FOnGetConsoleMessage write FOnGetConsoleMessage;\r\n procedure DoDownloadStarted(ADownload: TTMSFNCWebBrowserDownload; var ASilent: Boolean; var APause: Boolean; var AResume: Boolean; var ACancel: Boolean); virtual;\r\n procedure DoDownloadStateChanged(ADownload: TTMSFNCWebBrowserDownload; AState: TTMSFNCWebBrowserDownloadState; var APause: Boolean; var AResume: Boolean; var ACancel: Boolean); virtual;\r\n procedure DoDownloadBytesReceivedChanged(ADownload: TTMSFNCWebBrowserDownload; ABytesReceived: Int64; var APause: Boolean; var AResume: Boolean; var ACancel: Boolean); virtual;\r\n procedure DoDownloadEstimatedEndTimeChanged(ADownload: TTMSFNCWebBrowserDownload; AEstimatedEndTime: TDateTime; var APause: Boolean; var AResume: Boolean; var ACancel: Boolean); virtual;\r\n procedure CancelDownload(ADownload: TTMSFNCWebBrowserDownload);\r\n procedure PauseDownload(ADownload: TTMSFNCWebBrowserDownload);\r\n procedure ResumeDownload(ADownload: TTMSFNCWebBrowserDownload);\r\n function GetDownloadInterruptReasonText(ADownloadInterruptReason: TTMSFNCWebBrowserDownloadInterruptReason): string; virtual;\r\n function GetDownloadStateText(ADownloadState: TTMSFNCWebBrowserDownloadState): string; virtual;\r\n function GetDocumentTitle: string; virtual;\r\n function GetContainsFullScreenElement: Boolean; virtual;\r\n function GetParentWindowHandle: Cardinal; virtual;\r\n function GetBrowserVersion: string; virtual;\r\n function GetUserDataFolder: string; virtual;\r\n procedure DoContainsFullScreenElementChanged; virtual;\r\n procedure DoDocumentTitleChanged; virtual;\r\n procedure DoBeforeFrameNavigate(var Params: TTMSFNCCustomWebBrowserBeforeFrameNavigateParams); virtual;\r\n procedure DoFrameNavigationComplete(var Params: TTMSFNCCustomWebBrowserFrameNavigateCompleteParams); virtual;\r\n procedure DoHistoryChanged; virtual;\r\n procedure DoNewWindowRequested(var Params: TTMSFNCWebBrowserNewWindowRequestedParams); virtual;\r\n procedure DoPermissionRequested(var Params: TTMSFNCWebBrowserPermissionRequestedParams); virtual;\r\n procedure DoProcessFailed(var Params: TTMSFNCWebBrowserProcessFailedParams); virtual;\r\n procedure DoScriptDialogOpening(var Params: TTMSFNCWebBrowserScriptDialogOpeningParams); virtual;\r\n procedure DoSourceChanged(var Params: TTMSFNCWebBrowserSourceChangedParams); virtual;\r\n procedure DoWebMessageReceived(var Params: TTMSFNCWebBrowserWebMessageReceivedParams); virtual;\r\n procedure DoWebResourceRequested(var Params: TTMSFNCWebBrowserWebResourceRequestedParams); virtual;\r\n procedure DoWindowCloseRequested; virtual;\r\n procedure DoZoomFactorChanged; virtual;\r\n property OnDownloadStarted: TTMSFNCWebBrowserOnDownloadStarted read FOnDownloadStarted write FOnDownloadStarted;\r\n property OnDownloadStateChanged: TTMSFNCWebBrowserOnDownloadStateChanged read FOnDownloadStateChanged write FOnDownloadStateChanged;\r\n property OnDownloadBytesReceivedChanged: TTMSFNCWebBrowserOnDownloadBytesChanged read FOnDownloadBytesReceivedChanged write FOnDownloadBytesReceivedChanged;\r\n property OnDownloadEstimatedEndTimeChanged: TTMSFNCWebBrowserOnDownloadTimeChanged read FOnDownloadEstimatedEndTimeChanged write FOnDownloadEstimatedEndTimeChanged;\r\n property Downloads: TTMSFNCWebBrowserDownloads read FDownloads write FDownloads;\r\n property OnContainsFullScreenElementChanged: TNotifyEvent read FOnContainsFullScreenElementChanged write FOnContainsFullScreenElementChanged;\r\n property OnDocumentTitleChanged: TNotifyEvent read FOnDocumentTitleChanged write FOnDocumentTitleChanged;\r\n property OnBeforeFrameNavigate: TTMSFNCWebBrowserBeforeFrameNavigate read FOnBeforeFrameNavigate write FOnBeforeFrameNavigate;\r\n property OnFrameNavigateComplete: TTMSFNCWebBrowserFrameNavigateComplete read FOnFrameNavigateComplete write FOnFrameNavigateComplete;\r\n property OnHistoryChanged: TNotifyEvent read FOnHistoryChanged write FOnHistoryChanged;\r\n property OnNewWindowRequested: TTMSFNCWebBrowserNewWindowRequested read FOnNewWindowRequested write FOnNewWindowRequested;\r\n property OnPermissionRequested: TTMSFNCWebBrowserPermissionRequested read FOnPermissionRequested write FOnPermissionRequested;\r\n property OnProcessFailed: TTMSFNCWebBrowserProcessFailed read FOnProcessFailed write FOnProcessFailed;\r\n property OnScriptDialogOpening: TTMSFNCWebBrowserScriptDialogOpening read FOnScriptDialogOpening write FOnScriptDialogOpening;\r\n property OnSourceChanged: TTMSFNCWebBrowserSourceChanged read FOnSourceChanged write FOnSourceChanged;\r\n property OnWebMessageReceived: TTMSFNCWebBrowserWebMessageReceivedChanged read FOnWebMessageReceived write FOnWebMessageReceived;\r\n property OnWebResourceRequested: TTMSFNCWebBrowserWebResourceRequested read FOnWebResourceRequested write FOnWebResourceRequested;\r\n property OnWindowCloseRequested: TNotifyEvent read FOnWindowCloseRequested write FOnWindowCloseRequested;\r\n property OnZoomFactorChanged: TNotifyEvent read FOnZoomFactorChanged write FOnZoomFactorChanged;\r\n {$IFDEF FMXLIB}\r\n procedure Show; override;\r\n procedure Hide; override;\r\n procedure Move; override;\r\n procedure DoAbsoluteChanged; override;\r\n {$ENDIF}\r\n {$IFDEF VCLLIB}\r\n procedure CreateWnd; override;\r\n {$ENDIF}\r\n function CanRecreate: Boolean; virtual;\r\n function CanLoadDefaultHTML: Boolean; virtual;\r\n public\r\n constructor Create(AOwner: TComponent); override;\r\n destructor Destroy; override;\r\n {$IFDEF FMXLIB}\r\n procedure SetBounds(X, Y, AWidth, AHeight: Single); override;\r\n {$ENDIF}\r\n procedure UpdateControlAfterResize; override;\r\n property Version: string read GetVersion;\r\n end;\r\n\r\n {$IFDEF WEBLIB}\r\n TTMSFNCWebBrowserList = class(TList)\r\n private\r\n function GetItem(Index: Integer): ITMSFNCCustomWebBrowser;\r\n procedure SetItem(Index: Integer; const Value: ITMSFNCCustomWebBrowser);\r\n public\r\n property Items[Index: Integer]: ITMSFNCCustomWebBrowser read GetItem write SetItem; default;\r\n end;\r\n {$ENDIF}\r\n {$IFNDEF WEBLIB}\r\n TTMSFNCWebBrowserList = class(TList);\r\n {$ENDIF}\r\n\r\n TTMSFNCWebBrowserFactoryService = class(TInterfacedObject, ITMSFNCWebBrowserService)\r\n protected\r\n FWebBrowsers: TTMSFNCWebBrowserList;\r\n function DoCreateWebBrowser(const AValue: TTMSFNCCustomWebBrowser): ITMSFNCCustomWebBrowser; virtual; abstract;\r\n procedure DoRemoveWebBrowser(const AValue: ITMSFNCCustomWebBrowser);\r\n public\r\n constructor Create;\r\n destructor Destroy; override;\r\n function CreateWebBrowser(const AValue: TTMSFNCCustomWebBrowser): ITMSFNCCustomWebBrowser;\r\n procedure DeleteCookies; virtual; abstract;\r\n procedure DestroyWebBrowser(const AValue: ITMSFNCCustomWebBrowser);\r\n end;\r\n\r\n {$IFNDEF LCLLIB}\r\n [ComponentPlatformsAttribute(TMSPlatforms)]\r\n {$ENDIF}\r\n TTMSFNCWebBrowser = class(TTMSFNCCustomWebBrowser)\r\n public\r\n {$IFNDEF WEBLIB}\r\n procedure StartDocumentReadyStateThread; override;\r\n {$ENDIF}\r\n procedure Navigate; overload; override;\r\n procedure Navigate(const AURL: string); overload; override;\r\n procedure ExecuteJavaScript(AScript: String; ACompleteEvent: TTMSFNCWebBrowserJavaScriptCompleteEvent = nil; AImmediate: Boolean = False); override;\r\n function ExecuteJavaScriptSync(AScript: string): string; override;\r\n procedure LoadHTML(AHTML: String); override;\r\n procedure LoadFile(AFile: String); override;\r\n procedure Initialize; override;\r\n procedure DeInitialize; override;\r\n procedure GoForward; override;\r\n procedure GoBack; override;\r\n procedure Reload; override;\r\n procedure StopLoading; override;\r\n procedure ShowDebugConsole; override;\r\n procedure AddBridge(ABridgeName: string; ABridgeObject: TObject); override;\r\n procedure RemoveBridge(ABridgeName: string); override;\r\n procedure CaptureScreenShot(ACompleteEvent: TTMSFNCWebBrowserCaptureScreenShotCompleteEvent = nil); override;\r\n function GetBridgeCommunicationLayer(ABridgeName: string): string; override;\r\n function NativeEnvironment: Pointer; override;\r\n function NativeBrowser: Pointer; override;\r\n function IsFMXBrowser: Boolean; override;\r\n function CanGoBack: Boolean; override;\r\n function CanGoForward: Boolean; override;\r\n {$IFDEF ANDROID}\r\n function NativeDialog: Pointer; override;\r\n {$ENDIF}\r\n {$IFDEF MSWINDOWS}\r\n function GetWebBrowserInstance: IInterface; override;\r\n {$ENDIF}\r\n {$IFNDEF FNCLIB}\r\n procedure OpenTaskManager; override;\r\n procedure GetCookies(AURI: string = ''); override;\r\n procedure AddCookie(ACookie: TTMSFNCWebBrowserCookie); override;\r\n procedure DeleteAllCookies; override;\r\n procedure DeleteCookie(AName: string; ADomain: string; APath: string); override;\r\n function InitialPrintSettings: TTMSFNCWebBrowserPrintSettings; override;\r\n procedure ShowPrintUI; override;\r\n procedure SetVirtualHostNameToFolderMapping(AHostName, AFolderPath: string; AAccessKind: TTMSFNCWebBrowserHostResourceAccessKind); override;\r\n procedure ClearVirtualHostNameToFolderMapping(AHostName: string); override;\r\n procedure Print(APrintSettings: TTMSFNCWebBrowserPrintSettings); overload; override;\r\n procedure Print; overload; override;\r\n procedure PrintToPDFStream(APrintSettings: TTMSFNCWebBrowserPrintSettings); overload; override;\r\n procedure PrintToPDFStream; overload; override;\r\n procedure PrintToPDF(AFileName: string; APrintSettings: TTMSFNCWebBrowserPrintSettings); overload; override;\r\n procedure PrintToPDF(AFileName: string); overload; override;\r\n procedure NavigateWithData(AURI: string; AMethod: string; ABody: string; AHeaders: TStrings = nil); overload; override;\r\n procedure NavigateWithData(AURI: string; AMethod: string; ABodyStream: TStream; AHeaders: TStrings = nil); overload; override;\r\n procedure SubscribeDevtools(AEventName: string); override;\r\n procedure CallDevToolsProtocolMethod(AMethodName: string; AParametersAsJSON: string); override;\r\n function GetDownloadInterruptReasonText(ADownloadInterruptReason: TTMSFNCWebBrowserDownloadInterruptReason): string; override;\r\n function GetDownloadStateText(ADownloadState: TTMSFNCWebBrowserDownloadState): string; override;\r\n property Downloads;\r\n {$ENDIF}\r\n property OnCloseForm;\r\n property EnableContextMenu;\r\n property EnableShowDebugConsole;\r\n property EnableAcceleratorKeys;\r\n property CacheFolder;\r\n property CacheFolderName;\r\n property AutoClearCache;\r\n procedure ClearCache; override;\r\n property UserAgent;\r\n published\r\n property OnInitialized;\r\n property OnError;\r\n property URL;\r\n property OnBeforeNavigate;\r\n property OnNavigateComplete;\r\n property OnHardwareButtonClicked;\r\n property OnCaptureScreenShot;\r\n property OnDocumentComplete;\r\n property Version;\r\n property DesigntimeEnabled;\r\n {$IFNDEF FNCLIB}\r\n property Settings;\r\n property OnGetContextMenu;\r\n property OnGetCookies;\r\n property OnPrintedToPDF;\r\n property OnGetPrintPDFStream;\r\n property OnPrinted;\r\n property OnCustomContextMenuItemSelected;\r\n property OnGetPopupMenuForContextMenu;\r\n property OnDevToolsMethodCompleted;\r\n property OnDevToolsSubscribedEvent;\r\n property OnGetConsoleMessage;\r\n property OnDownloadStarted;\r\n property OnDownloadStateChanged;\r\n property OnDownloadBytesReceivedChanged;\r\n property OnContainsFullScreenElementChanged;\r\n property OnDocumentTitleChanged;\r\n property OnBeforeFrameNavigate;\r\n property OnFrameNavigateComplete;\r\n property OnHistoryChanged;\r\n property OnNewWindowRequested;\r\n property OnPermissionRequested;\r\n property OnProcessFailed;\r\n property OnScriptDialogOpening;\r\n property OnSourceChanged;\r\n property OnWebMessageReceived;\r\n property OnWebResourceRequested;\r\n property OnWindowCloseRequested;\r\n {$ENDIF}\r\n end;\r\n\r\n TTMSFNCWebBrowserPopup = class;\r\n\r\n {$IFDEF FMXMOBILE}\r\n TTMSFNCWebBrowserPopupForm = class(TCommonCustomForm)\r\n {$ELSE}\r\n TTMSFNCWebBrowserPopupForm = class(TCustomForm)\r\n {$ENDIF}\r\n private\r\n FWebBrowserPopup: TTMSFNCWebBrowserPopup;\r\n protected\r\n procedure UpdateBackGround;\r\n public\r\n procedure SetBounds(ALeft, ATop, AWidth, AHeight: Integer); override;\r\n end;\r\n\r\n {$IFDEF IOS}\r\n ITMSFNCWebBrowserPopupButtonEventHandler = interface(NSObject)\r\n ['{723E9874-7EEF-4E40-896D-9E2DAC8E6DD4}']\r\n procedure Click; cdecl;\r\n end;\r\n\r\n TTMSFNCWebBrowserPopupButtonEventHandler = class(TOCLocal)\r\n private\r\n FWebBrowserPopup: TTMSFNCWebBrowserPopup;\r\n protected\r\n function GetObjectiveCClass: PTypeInfo; override;\r\n public\r\n procedure Click; cdecl;\r\n end;\r\n {$ENDIF}\r\n\r\n {$IFDEF ANDROID}\r\n TTMSFNCWebBrowserPopupButtonEventHandler = class(TJavaLocal, JView_OnClickListener)\r\n private\r\n FWebBrowserPopup: TTMSFNCWebBrowserPopup;\r\n public\r\n procedure onClick(P1: JView); cdecl;\r\n end;\r\n {$ENDIF}\r\n\r\n TTMSFNCCustomWebBrowserClass = class of TTMSFNCCustomWebBrowser;\r\n\r\n {$IFDEF FMXLIB}\r\n TTMSFNCWebBrowserFormPosition = TFormPosition;\r\n {$ENDIF}\r\n {$IFNDEF FMXLIB}\r\n TTMSFNCWebBrowserFormPosition = TPosition;\r\n {$ENDIF}\r\n\r\n {$IFNDEF LCLLIB}\r\n [ComponentPlatformsAttribute(TMSPlatforms)]\r\n {$ENDIF}\r\n TTMSFNCWebBrowserPopup = class(TComponent)\r\n private\r\n {$IFDEF MSWINDOWS}\r\n FLoadURL: String;\r\n FFirstLoad: Boolean;\r\n {$ENDIF}\r\n FModal: Boolean;\r\n {$IFDEF IOS}\r\n FButton: UIButton;\r\n {$ENDIF}\r\n {$IFNDEF ANDROID}\r\n {$IFNDEF CMNWEBLIB}\r\n FPopup: TPopup;\r\n {$ENDIF}\r\n FWebBrowserForm: TTMSFNCWebBrowserPopupForm;\r\n {$ENDIF}\r\n {$IFDEF ANDROID}\r\n FButton: JButton;\r\n {$ENDIF}\r\n {$IFDEF FMXMOBILE}\r\n FButtonEventHandler: TTMSFNCWebBrowserPopupButtonEventHandler;\r\n {$ENDIF}\r\n FWebBrowser: TTMSFNCCustomWebBrowser;\r\n FOnNavigateComplete: TTMSFNCCustomWebBrowserNavigateComplete;\r\n FOnBeforeNavigate: TTMSFNCCustomWebBrowserBeforeNavigate;\r\n FURL: String;\r\n FPosition: TTMSFNCWebBrowserFormPosition;\r\n FWidth: Integer;\r\n FHeight: Integer;\r\n FT: Integer;\r\n FL: Integer;\r\n FFullScreen: Boolean;\r\n FCloseButton: Boolean;\r\n FOnClose: TNotifyEvent;\r\n FCloseButtonText: String;\r\n FExternalBrowser: Boolean;\r\n protected\r\n procedure ButtonClose(Sender: TObject);\r\n {$IFDEF MSWINDOWS}\r\n procedure FormShow(Sender: TObject);\r\n {$ENDIF}\r\n {$IFNDEF ANDROID}\r\n procedure FormClose(Sender: TObject; var Action: TCloseAction);\r\n {$ENDIF}\r\n procedure CloseForm(Sender: TObject);\r\n procedure DoBeforeNavigate(Sender: TObject; var Params: TTMSFNCCustomWebBrowserBeforeNavigateParams); virtual;\r\n procedure DoNavigateComplete(Sender: TObject; var Params: TTMSFNCCustomWebBrowserNavigateCompleteParams); virtual;\r\n procedure InitializeWebBrowser(AWebBrowser: TTMSFNCCustomWebBrowser); virtual;\r\n function GetWebBrowserClass: TTMSFNCCustomWebBrowserClass; virtual;\r\n public\r\n constructor Create(AOwner: TComponent); override;\r\n destructor Destroy; override;\r\n function Open(AModal: Boolean = True): TModalResult; overload;\r\n function Open(AURL: String; AModal: Boolean = True): TModalResult; overload;\r\n procedure Close(AModalResult: TModalResult = mrOk);\r\n property WebBrowser: TTMSFNCCustomWebBrowser read FWebBrowser;\r\n property ExternalBrowser: Boolean read FExternalBrowser write FExternalBrowser default False;\r\n published\r\n property OnBeforeNavigate: TTMSFNCCustomWebBrowserBeforeNavigate read FOnBeforeNavigate write FOnBeforeNavigate;\r\n property OnNavigateComplete: TTMSFNCCustomWebBrowserNavigateComplete read FOnNavigateComplete write FOnNavigateComplete;\r\n property URL: String read FURL write FURL;\r\n {$IFDEF FMXLIB}\r\n property Position: TTMSFNCWebBrowserFormPosition read FPosition write FPosition default TFormPosition.ScreenCenter;\r\n {$ENDIF}\r\n {$IFNDEF FMXLIB}\r\n property Position: TTMSFNCWebBrowserFormPosition read FPosition write FPosition default poScreenCenter;\r\n {$ENDIF}\r\n property FullScreen: Boolean read FFullScreen write FFullScreen default False;\r\n property Width: Integer read FWidth write FWidth default 640;\r\n property Height: Integer read FHeight write FHeight default 480;\r\n property Left: Integer read FL write FL default 0;\r\n property Top: Integer read FT write FT default 0;\r\n property CloseButton: Boolean read FCloseButton write FCloseButton default False;\r\n property CloseButtonText: String read FCloseButtonText write FCloseButtonText;\r\n property OnClose: TNotifyEvent read FOnClose write FOnClose;\r\n end;\r\n\r\n TTMSFNCWebBrowserPlatformServicesService = class\r\n private\r\n FInterface: IInterface;\r\n FGUID: string;\r\n public\r\n constructor Create(AGUID: string; AInterface: IInterface);\r\n property GUID: string read FGUID;\r\n property &Interface: IInterface read FInterface;\r\n end;\r\n\r\n {$IFDEF WEBLIB}\r\n TTMSFNCWebBrowserPlatformServicesList = class(TObjectList)\r\n private\r\n function GetItem(Index: Integer): TTMSFNCWebBrowserPlatformServicesService;\r\n procedure SetItem(Index: Integer; const Value: TTMSFNCWebBrowserPlatformServicesService);\r\n public\r\n property Items[Index: Integer]: TTMSFNCWebBrowserPlatformServicesService read GetItem write SetItem; default;\r\n {$ENDIF}\r\n {$IFNDEF WEBLIB}\r\n TTMSFNCWebBrowserPlatformServicesList = class(TObjectList)\r\n {$ENDIF}\r\n private\r\n function GetValue(AGUID: string): IInterface;\r\n public\r\n function ContainsKey(AGUID: string): Boolean;\r\n procedure RemoveByGUID(AGUID: string);\r\n property Interfaces[AGUID: string]: IInterface read GetValue;\r\n end;\r\n\r\n TTMSFNCWebBrowserPlatformServices = class\r\n private\r\n FServicesList: TTMSFNCWebBrowserPlatformServicesList;\r\n class var FCurrent: TTMSFNCWebBrowserPlatformServices;\r\n class var FCurrentReleased: Boolean;\r\n{$IFNDEF AUTOREFCOUNT}\r\n class procedure ReleaseCurrent;\r\n{$ENDIF}\r\n public\r\n constructor Create;\r\n destructor Destroy; override;\r\n procedure AddPlatformService(const AServiceGUID: TGUID; const AService: IInterface);\r\n procedure RemovePlatformService(const AServiceGUID: TGUID);\r\n function Count: Integer;\r\n function GetPlatformService(const AServiceGUID: TGUID): IInterface;\r\n function SupportsPlatformService(const AServiceGUID: TGUID): Boolean; overload;\r\n function SupportsPlatformService(const AServiceGUID: TGUID; var AService: IInterface): Boolean; overload;\r\n class function Current: TTMSFNCWebBrowserPlatformServices;\r\n end;\r\n\r\n{$IFDEF MACOS}\r\nfunction NSStrEx(AString: string): NSString;\r\n{$ENDIF}\r\n\r\nimplementation\r\n\r\nuses\r\n SysUtils, WEBLib.TMSFNCGraphicsTypes\r\n{$IFDEF FMXLIB}\r\n ,FMX.Platform\r\n{$ENDIF}\r\n{$IFDEF WEBLIB}\r\n ,WEBLib.TMSFNCWebBrowser.WEB\r\n{$ENDIF}\r\n{$IFDEF MSWINDOWS}\r\n ,WEBLib.TMSFNCWebBrowser.Win\r\n{$ENDIF}\r\n{$IFDEF UNIX}\r\n ,WEBLib.TMSFNCWebBrowser.Unix\r\n{$ENDIF}\r\n{$IFDEF MACOS}\r\n{$IFDEF IOS}\r\n ,WEBLib.TMSFNCWebBrowser.iOS\r\n{$ELSE}\r\n ,WEBLib.TMSFNCWebBrowser.Mac\r\n{$ENDIF}\r\n{$ENDIF}\r\n{$IFDEF ANDROID}\r\n ,WEBLib.TMSFNCWebBrowser.Android\r\n{$ENDIF}\r\n ;\r\n\r\nvar\r\n FTrial: Integer = 0;\r\n\r\nfunction Hiword(L: DWORD): integer;\r\nbegin\r\n Result := L shr 16;\r\nend;\r\n\r\nfunction LoWord(L: DWORD): Integer;\r\nbegin\r\n Result := L AND $FFFF;\r\nend;\r\n\r\nfunction MakeWord(b1,b2: integer): integer;\r\nbegin\r\n Result := b1 or b2 shl 8;\r\nend;\r\n\r\nfunction MakeLong(i1,i2: integer): integer;\r\nbegin\r\n Result := i1 or i2 shl 16;\r\nend;\r\n\r\n{$IFDEF MACOS}\r\nfunction NSStrEx(AString: string): NSString;\r\nbegin\r\n Result := StrToNSStr(AString);\r\nend;\r\n{$ENDIF}\r\n\r\n{$IFDEF IOS}\r\nfunction GetSharedApplication: UIApplication;\r\nbegin\r\n Result := TUIApplication.Wrap(TUIApplication.OCClass.sharedApplication);\r\nend;\r\n{$ENDIF}\r\n\r\n{$IFDEF FREEWARE}\r\nfunction ScrambleEx(s:string): string;\r\nvar\r\n r:string;\r\n i: integer;\r\n c: char;\r\n b: byte;\r\nbegin\r\n r := '';\r\n {$IFDEF ZEROSTRINGINDEX}\r\n for i := 0 to length(s) - 1 do\r\n {$ELSE}\r\n for i := 1 to length(s) do\r\n {$ENDIF}\r\n begin\r\n b := ord(s[i]);\r\n b := (b and $E0) + ((b and $1F) xor 5);\r\n c := chr(b);\r\n r := r + c;\r\n end;\r\n Result := r;\r\nend;\r\n{$ENDIF}\r\n\r\n{ TTMSFNCCustomWebBrowser }\r\n\r\n{$IFDEF FMXLIB}\r\nprocedure TTMSFNCCustomWebBrowser.Show;\r\nbegin\r\n inherited;\r\n if Assigned(FWebBrowser) then\r\n FWebBrowser.UpdateBounds;\r\nend;\r\n{$ENDIF}\r\n\r\nprocedure TTMSFNCCustomWebBrowser.AddBridge(ABridgeName: string;\r\n ABridgeObject: TObject);\r\nbegin\r\n if Assigned(FWebBrowser) then\r\n begin\r\n FWebBrowser.RemoveBridge(ABridgeName);\r\n FWebBrowser.AddBridge(ABridgeName, ABridgeObject);\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomWebBrowser.AddCookie(ACookie: TTMSFNCWebBrowserCookie);\r\nvar\r\n ic: ITMSFNCCustomWebBrowserCookies;\r\nbegin\r\n if Assigned(FWebBrowser) then\r\n begin\r\n if FWebBrowser.QueryInterface(IID_ITMSFNCCustomWebBrowserCookies, ic) = S_OK then\r\n ic.AddCookie(ACookie);\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomWebBrowser.BeforeNavigate(\r\n var Params: TTMSFNCCustomWebBrowserBeforeNavigateParams);\r\nbegin\r\n if Assigned(OnBeforeNavigate) then\r\n OnBeforeNavigate(Self, Params);\r\nend;\r\n\r\nprocedure TTMSFNCCustomWebBrowser.CallDevToolsProtocolMethod(AMethodName, AParametersAsJSON: string);\r\nvar\r\n ie: ITMSFNCCustomWebBrowserEdge;\r\nbegin\r\n if Assigned(FWebBrowser) then\r\n begin\r\n if FWebBrowser.QueryInterface(IID_ITMSFNCCustomWebBrowserEdge, ie) = S_OK then\r\n ie.CallDevToolsProtocolMethod(AMethodName, AParametersAsJSON);\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCCustomWebBrowser.CanBeVisible: Boolean;\r\nbegin\r\n Result := True;\r\nend;\r\n\r\nprocedure TTMSFNCCustomWebBrowser.CancelDownload(ADownload: TTMSFNCWebBrowserDownload);\r\nvar\r\n ie: ITMSFNCCustomWebBrowserEdge;\r\nbegin\r\n if Assigned(FWebBrowser) then\r\n begin\r\n if FWebBrowser.QueryInterface(IID_ITMSFNCCustomWebBrowserEdge, ie) = S_OK then\r\n ie.CancelDownload(ADownload);\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCCustomWebBrowser.CheckIdentifier: Boolean;\r\nbegin\r\n Result := False;\r\nend;\r\n\r\nfunction TTMSFNCCustomWebBrowser.CanCreateBrowser: Boolean;\r\nbegin\r\n {$IFDEF EDGESUPPORT}\r\n Result := True;\r\n {$ELSE}\r\n {$IFDEF WEBLIB}\r\n Result := True;\r\n {$ELSE}\r\n Result := not IsDesigning\r\n {$ENDIF}\r\n {$ENDIF}\r\nend;\r\n\r\nfunction TTMSFNCCustomWebBrowser.CanGoBack: Boolean;\r\nbegin\r\n Result := False;\r\n if Assigned(FWebBrowser) then\r\n Result := FWebBrowser.CanGoBack;\r\nend;\r\n\r\nfunction TTMSFNCCustomWebBrowser.CanGoForward: Boolean;\r\nbegin\r\n Result := False;\r\n if Assigned(FWebBrowser) then\r\n Result := FWebBrowser.CanGoForward;\r\nend;\r\n\r\nprocedure TTMSFNCCustomWebBrowser.CaptureScreenShot(ACompleteEvent: TTMSFNCWebBrowserCaptureScreenShotCompleteEvent = nil);\r\nbegin\r\n if Assigned(FWebBrowser) then\r\n FWebBrowser.CaptureScreenShot(ACompleteEvent);\r\nend;\r\n\r\nprocedure TTMSFNCCustomWebBrowser.ChangeDPIScale(M, D: Integer);\r\nbegin\r\n inherited;\r\n if Assigned(FWebBrowser) then\r\n FWebBrowser.UpdateBounds;\r\nend;\r\n\r\nprocedure TTMSFNCCustomWebBrowser.CheckApplicationInitialized;\r\nbegin\r\n ExecuteJavaScript('document.readyState', {$IFDEF LCLWEBLIB}@{$ENDIF}DoCheckReadyState);\r\nend;\r\n\r\nprocedure TTMSFNCCustomWebBrowser.ClearCache;\r\nbegin\r\n if Assigned(FWebBrowser) then\r\n FWebBrowser.ClearCache;\r\nend;\r\n\r\nconstructor TTMSFNCCustomWebBrowser.Create(AOwner: TComponent);\r\nvar\r\n WebBrowserService: ITMSFNCWebBrowserService;\r\nbegin\r\n inherited;\r\n FSettings := TTMSFNCWebBrowserSettings.Create(Self);\r\n FCanDestroyDispatch := True;\r\n FDesigntimeEnabled := True;\r\n {$IFDEF FMXLIB}\r\n {$HINTS OFF}\r\n {$IF COMPILERVERSION > 32}\r\n TMessageManager.DefaultManager.SubscribeToMessage(TAfterCreateFormHandle, FormHandleCreated);\r\n {$IFEND}\r\n {$HINTS ON}\r\n {$ENDIF}\r\n {$IFNDEF WEBLIB}\r\n FScriptList := TTMSFNCScriptList.Create;\r\n {$ENDIF}\r\n\r\n FDownloads := TTMSFNCWebBrowserDownloads.Create(Self);\r\n\r\n FExternalBrowser := False;\r\n FEnableShowDebugConsole := True;\r\n FEnableContextMenu := True;\r\n FEnableAcceleratorKeys := True;\r\n\r\n CreateClasses;\r\n\r\n if CanCreateBrowser then\r\n if TTMSFNCWebBrowserPlatformServices.Current.SupportsPlatformService(ITMSFNCWebBrowserService, IInterface(WebBrowserService)) then\r\n FWebBrowser := WebBrowserService.CreateWebBrowser(Self);\r\n\r\n Width := 500;\r\n Height := 350;\r\nend;\r\n\r\n{$IFDEF WEBLIB}\r\nprocedure TTMSFNCCustomWebBrowser.UpdateElement;\r\nbegin\r\n inherited;\r\n if Assigned(ElementHandle) then\r\n ElementHandle.style.setProperty('overflow', 'auto');\r\nend;\r\n{$ENDIF}\r\n\r\nprocedure TTMSFNCCustomWebBrowser.CreateClasses;\r\nbegin\r\n//\r\nend;\r\n\r\ndestructor TTMSFNCCustomWebBrowser.Destroy;\r\nvar\r\n WebBrowserService: ITMSFNCWebBrowserService;\r\nbegin\r\n {$IFNDEF WEBLIB}\r\n StopDocumentReadyStateThread;\r\n {$ENDIF}\r\n\r\n if CanCreateBrowser and TTMSFNCWebBrowserPlatformServices.Current.SupportsPlatformService(ITMSFNCWebBrowserService, IInterface(WebBrowserService)) then\r\n WebBrowserService.DestroyWebBrowser(FWebBrowser);\r\n\r\n if Assigned(FDownloads) then\r\n FDownloads.Free;\r\n\r\n if Assigned(FWebBrowser) then\r\n begin\r\n FWebBrowser.Deinitialize;\r\n FWebBrowser := nil;\r\n end;\r\n\r\n {$IFNDEF WEBLIB}\r\n FScriptList.Free;\r\n {$ENDIF}\r\n\r\n {$IFDEF FMXLIB}\r\n {$HINTS OFF}\r\n {$IF COMPILERVERSION > 32}\r\n TMessageManager.DefaultManager.Unsubscribe(TAfterCreateFormHandle, FormHandleCreated);\r\n {$IFEND}\r\n {$HINTS ON}\r\n {$ENDIF}\r\n\r\n FreeAndNil(FSettings);\r\n inherited;\r\nend;\r\n\r\nprocedure TTMSFNCCustomWebBrowser.DoBeforeFrameNavigate(var Params: TTMSFNCCustomWebBrowserBeforeFrameNavigateParams);\r\nbegin\r\n if Assigned(OnBeforeFrameNavigate) then\r\n OnBeforeFrameNavigate(Self, Params);\r\nend;\r\n\r\nprocedure TTMSFNCCustomWebBrowser.DoCaptureScreenShot(AScreenShot: TTMSFNCBitmap);\r\nbegin\r\n if Assigned(OnCaptureScreenShot) then\r\n OnCaptureScreenShot(Self, AScreenShot);\r\nend;\r\n\r\nprocedure TTMSFNCCustomWebBrowser.DoCheckIdentifier(const AValue: string);\r\nbegin\r\n if LowerCase(StringReplace(AValue, '\"', '', [rfReplaceAll])) = 'unknown' then\r\n FReady := True;\r\nend;\r\n\r\nprocedure TTMSFNCCustomWebBrowser.DoDevToolsMethodCompleted(AEventName, AJSONResponse: string);\r\nbegin\r\n if Assigned(OnDevToolsMethodCompleted) then\r\n OnDevToolsMethodCompleted(Self, AEventName, AJSONResponse);\r\nend;\r\n\r\nprocedure TTMSFNCCustomWebBrowser.DoDevToolsSubscribedEvent(AEventName, AJSONResponse: string);\r\nbegin\r\n if Assigned(OnDevToolsSubscribedEvent) then\r\n OnDevToolsSubscribedEvent(Self, AEventName, AJSONResponse);\r\nend;\r\n\r\nprocedure TTMSFNCCustomWebBrowser.DoDocumentComplete;\r\nbegin\r\n if Assigned(OnDocumentComplete) then\r\n OnDocumentComplete(Self);\r\nend;\r\n\r\nprocedure TTMSFNCCustomWebBrowser.DoDocumentTitleChanged;\r\nbegin\r\n if Assigned(OnDocumentTitleChanged) then\r\n OnDocumentTitleChanged(Self);\r\nend;\r\n\r\nprocedure TTMSFNCCustomWebBrowser.DoCheckReadyState(const AValue: string);\r\nbegin\r\n if LowerCase(StringReplace(AValue, '\"', '', [rfReplaceAll])) = 'complete' then\r\n begin\r\n if CheckIdentifier then\r\n ExecuteJavaScript('window.TMSWEBCoreClientIdentifier', {$IFDEF LCLWEBLIB}@{$ENDIF}DoCheckIdentifier)\r\n else\r\n FReady := True;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomWebBrowser.DoCloseForm;\r\nbegin\r\n if Assigned(OnCloseForm) then\r\n OnCloseForm(Self);\r\nend;\r\n\r\nprocedure TTMSFNCCustomWebBrowser.DoContainsFullScreenElementChanged;\r\nbegin\r\n if Assigned(OnContainsFullScreenElementChanged) then\r\n OnContainsFullScreenElementChanged(Self);\r\nend;\r\n\r\nprocedure TTMSFNCCustomWebBrowser.DoCustomContextMenuItemSelected(ASelectedItem: TTMSFNCWebBrowserCustomContextMenuItem);\r\nbegin\r\n if Assigned(OnCustomContextMenuItemSelected) then\r\n OnCustomContextMenuItemSelected(Self, ASelectedItem);\r\nend;\r\n\r\n{$IFNDEF WEBLIB}\r\nprocedure TTMSFNCCustomWebBrowser.DoTerminate(Sender: TObject);\r\nbegin\r\n FThreadDone := True;\r\nend;\r\n{$ENDIF}\r\n\r\nprocedure TTMSFNCCustomWebBrowser.DoWebMessageReceived(var Params: TTMSFNCWebBrowserWebMessageReceivedParams);\r\nbegin\r\n if Assigned(OnWebMessageReceived) then\r\n OnWebMessageReceived(Self, Params);\r\nend;\r\n\r\nprocedure TTMSFNCCustomWebBrowser.DoWebResourceRequested(var Params: TTMSFNCWebBrowserWebResourceRequestedParams);\r\nbegin\r\n if Assigned(OnWebResourceRequested) then\r\n OnWebResourceRequested(Self, Params);\r\nend;\r\n\r\nprocedure TTMSFNCCustomWebBrowser.DoWindowCloseRequested;\r\nbegin\r\n if Assigned(OnWindowCloseRequested) then\r\n OnWindowCloseRequested(Self);\r\nend;\r\n\r\nprocedure TTMSFNCCustomWebBrowser.DoZoomFactorChanged;\r\nbegin\r\n if Assigned(OnZoomFactorChanged) then\r\n OnZoomFactorChanged(Self);\r\nend;\r\n\r\nprocedure TTMSFNCCustomWebBrowser.DoHardwareButtonClicked;\r\nbegin\r\n if Assigned(OnHardwareButtonClicked) then\r\n OnHardwareButtonClicked(Self);\r\nend;\r\n\r\nprocedure TTMSFNCCustomWebBrowser.DoHistoryChanged;\r\nbegin\r\n if Assigned(OnHistoryChanged) then\r\n OnHistoryChanged(Self);\r\nend;\r\n\r\nprocedure TTMSFNCCustomWebBrowser.DoKeyPressed(var Key: Word);\r\nbegin\r\n\r\nend;\r\n\r\nprocedure TTMSFNCCustomWebBrowser.DoNewWindowRequested(var Params: TTMSFNCWebBrowserNewWindowRequestedParams);\r\nbegin\r\n if Assigned(OnNewWindowRequested) then\r\n OnNewWindowRequested(Self, Params);\r\nend;\r\n\r\nprocedure TTMSFNCCustomWebBrowser.DoPermissionRequested(var Params: TTMSFNCWebBrowserPermissionRequestedParams);\r\nbegin\r\n if Assigned(OnPermissionRequested) then\r\n OnPermissionRequested(Self, Params);\r\nend;\r\n\r\nprocedure TTMSFNCCustomWebBrowser.DoPrinted(APrinterStatus: Boolean);\r\nbegin\r\n if Assigned(OnPrinted) then\r\n OnPrinted(Self, APrinterStatus);\r\nend;\r\n\r\nprocedure TTMSFNCCustomWebBrowser.DoPrintedToPDF(ASuccesfull: Boolean);\r\nbegin\r\n if Assigned(OnPrintedToPDF) then\r\n OnPrintedToPDF(Self, ASuccesfull);\r\nend;\r\n\r\nprocedure TTMSFNCCustomWebBrowser.DoProcessFailed(var Params: TTMSFNCWebBrowserProcessFailedParams);\r\nbegin\r\n if Assigned(OnProcessFailed) then\r\n OnProcessFailed(Self, Params);\r\nend;\r\n\r\n\r\nprocedure TTMSFNCCustomWebBrowser.DoScriptDialogOpening(var Params: TTMSFNCWebBrowserScriptDialogOpeningParams);\r\nbegin\r\n if Assigned(OnScriptDialogOpening) then\r\n OnScriptDialogOpening(Self, Params);\r\nend;\r\n\r\n{$IFNDEF WEBLIB}\r\nprocedure TTMSFNCCustomWebBrowser.DoScriptHandled(Sender: TObject);\r\nvar\r\n s: TTMSFNCScript;\r\nbegin\r\n if Assigned(FWebBrowser) then\r\n begin\r\n if FScriptList.Count > 0 then\r\n FScriptList.Delete(0);\r\n\r\n if FScriptList.Count > 0 then\r\n begin\r\n s := FScriptList[0];\r\n FWebBrowser.ExecuteJavaScript(s.FScript, s.FCompleteEvent, {$IFDEF LCLWEBLIB}@{$ENDIF}DoScriptHandled);\r\n end;\r\n end;\r\nend;\r\n{$ENDIF}\r\n\r\nprocedure TTMSFNCCustomWebBrowser.DoSourceChanged(var Params: TTMSFNCWebBrowserSourceChangedParams);\r\nbegin\r\n if Assigned(OnSourceChanged) then\r\n OnSourceChanged(Self, Params);\r\nend;\r\n\r\nprocedure TTMSFNCCustomWebBrowser.Draw(AGraphics: TTMSFNCGraphics; ARect: TRectF);\r\nvar\r\n s: string;\r\n sz: Single;\r\nbegin\r\n inherited;\r\n if IsDesigning then\r\n begin\r\n AGraphics.Font.Size := 12;\r\n AGraphics.Font.Name := 'Montserrat';\r\n {$IFDEF MSWINDOWS}\r\n if not EdgeLoaded then\r\n AGraphics.DrawText(RectF(0, 0, Width, Height), EErrorMessageNoDLL, True, gtaCenter, gtaCenter)\r\n else\r\n {$ENDIF}\r\n s := DESIGNTIMEMESSAGE;\r\n sz := AGraphics.CalculateTextHeight(s);\r\n AGraphics.DrawText(RectF(ScalePaintValue(5), ScalePaintValue(5), Width - ScalePaintValue(5), sz + ScalePaintValue(5)), s);\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomWebBrowser.DoEnter;\r\nbegin\r\n inherited;\r\n if Assigned(FWebBrowser) then\r\n FWebBrowser.SetFocus;\r\nend;\r\n\r\nprocedure TTMSFNCCustomWebBrowser.DoExecuteJavaScriptSync(const AValue: string);\r\nbegin\r\n FSyncValue := AValue;\r\n FSyncValueExecuted := True;\r\nend;\r\n\r\nprocedure TTMSFNCCustomWebBrowser.DoError(AError: TTMSFNCWebBrowserError);\r\nbegin\r\n if Assigned(OnError) then\r\n OnError(Self, AError);\r\nend;\r\n\r\nprocedure TTMSFNCCustomWebBrowser.DoExit;\r\nbegin\r\n inherited;\r\n if Assigned(FWebBrowser) then\r\n FWebBrowser.ClearFocus;\r\nend;\r\n\r\nprocedure TTMSFNCCustomWebBrowser.DoFrameNavigationComplete(var Params: TTMSFNCCustomWebBrowserFrameNavigateCompleteParams);\r\nbegin\r\n if Assigned(OnFrameNavigateComplete) then\r\n OnFrameNavigateComplete(Self, Params);\r\nend;\r\n\r\nprocedure TTMSFNCCustomWebBrowser.DoGetConsoleMessage(ALogEntry: TTMSFNCWebBrowserLogEntry);\r\nbegin\r\n if Assigned(OnGetConsoleMessage) then\r\n OnGetConsoleMessage(Self, ALogEntry);\r\nend;\r\n\r\nprocedure TTMSFNCCustomWebBrowser.DoGetContextMenuItemEvent(ATarget: TTMSFNCWebBrowserTargetItem; AContextMenu: TObjectList);\r\nbegin\r\n if Assigned(FOnGetContextMenu) then\r\n OnGetContextMenu(Self, ATarget, AContextMenu);\r\nend;\r\n\r\nprocedure TTMSFNCCustomWebBrowser.DoGetCookies(ACookies: array of TTMSFNCWebBrowserCookie);\r\nbegin\r\n if Assigned(OnGetCookies) then\r\n OnGetCookies(Self, ACookies);\r\nend;\r\n\r\nprocedure TTMSFNCCustomWebBrowser.DoDownloadBytesReceivedChanged(ADownload: TTMSFNCWebBrowserDownload; ABytesReceived: Int64;\r\n var APause, AResume, ACancel: Boolean);\r\nbegin\r\n if Assigned(OnDownloadBytesReceivedChanged) then\r\n OnDownloadBytesReceivedChanged(Self, ADownload, ABytesReceived, APause, AResume, ACancel);\r\nend;\r\n\r\nprocedure TTMSFNCCustomWebBrowser.DoDownloadEstimatedEndTimeChanged(ADownload: TTMSFNCWebBrowserDownload; AEstimatedEndTime: TDateTime;\r\n var APause, AResume, ACancel: Boolean);\r\nbegin\r\n if Assigned(OnDownloadEstimatedEndTimeChanged) then\r\n OnDownloadEstimatedEndTimeChanged(Self, ADownload, AEstimatedEndTime, APause, AResume, ACancel);\r\nend;\r\n\r\nprocedure TTMSFNCCustomWebBrowser.DoDownloadStarted(ADownload: TTMSFNCWebBrowserDownload; var ASilent, APause, AResume, ACancel: Boolean);\r\nbegin\r\n if Assigned(OnDownloadStarted) then\r\n OnDownloadStarted(Self, ADownload, ASilent, APause, AResume, ACancel);\r\nend;\r\n\r\nprocedure TTMSFNCCustomWebBrowser.DoDownloadStateChanged(ADownload: TTMSFNCWebBrowserDownload; AState: TTMSFNCWebBrowserDownloadState;\r\n var APause, AResume, ACancel: Boolean);\r\nbegin\r\n if Assigned(OnDownloadStateChanged) then\r\n OnDownloadStateChanged(Self, ADownload, AState, APause, AResume, ACancel);\r\nend;\r\n\r\nprocedure TTMSFNCCustomWebBrowser.DoGetPopupMenuForContextMenu(ATarget: TTMSFNCWebBrowserTargetItem; var APopUpMenu: TPopupMenu);\r\nbegin\r\n if Assigned(OnGetPopupMenuForContextMenu) then\r\n OnGetPopupMenuForContextMenu(Self, ATarget, APopupMenu);\r\nend;\r\n\r\nprocedure TTMSFNCCustomWebBrowser.DoGetPrintPDFStream(AStream: TMemoryStream);\r\nbegin\r\n if Assigned(OnGetPrintPDFStream) then\r\n OnGetPrintPDFStream(Self, AStream);\r\nend;\r\n\r\nfunction TTMSFNCCustomWebBrowser.ExecuteJavaScriptSync(AScript: string): string;\r\n{$IFNDEF WEBLIB}\r\n{$IFNDEF ANDROID}\r\nvar\r\n i: Integer;\r\n{$ENDIF}\r\n{$ENDIF}\r\nbegin\r\n Result := '';\r\n if Assigned(FWebBrowser) then\r\n begin\r\n FSyncValue := '';\r\n FSyncValueExecuted := False;\r\n FWebBrowser.ExecuteJavaScript(AScript, {$IFDEF LCLWEBLIB}@{$ENDIF}DoExecuteJavaScriptSync, nil);\r\n {$IFNDEF ANDROID}\r\n {$IFNDEF WEBLIB}\r\n i := 0;\r\n while not FSyncValueExecuted and (i <= 60000) do\r\n begin\r\n Application.ProcessMessages;\r\n Sleep(1);\r\n Inc(i);\r\n end;\r\n {$ENDIF}\r\n {$ENDIF}\r\n\r\n Result := FSyncValue;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomWebBrowser.ExecuteJavaScript(AScript: String; ACompleteEvent: TTMSFNCWebBrowserJavaScriptCompleteEvent = nil; AImmediate: Boolean = False);\r\nbegin\r\n if Assigned(FWebBrowser) then\r\n begin\r\n if AImmediate and FInitialized then\r\n FWebBrowser.ExecuteJavaScript(AScript, ACompleteEvent, nil)\r\n else\r\n begin\r\n {$IFNDEF WEBLIB}\r\n FScriptList.Add(TTMSFNCScript.Create(AScript, ACompleteEvent));\r\n if FScriptList.Count = 1 then\r\n begin\r\n if FInitialized then\r\n FWebBrowser.ExecuteJavaScript(AScript, ACompleteEvent, {$IFNDEF WEBLIB}{$IFDEF LCLLIB}@{$ENDIF}DoScriptHandled{$ELSE}nil{$ENDIF})\r\n else\r\n DoScriptHandled(nil);\r\n end\r\n else if not FInitialized then\r\n DoScriptHandled(nil);\r\n {$ELSE}\r\n FWebBrowser.ExecuteJavaScript(AScript, ACompleteEvent, {$IFNDEF WEBLIB}{$IFDEF LCLLIB}@{$ENDIF}DoScriptHandled{$ELSE}nil{$ENDIF});\r\n {$ENDIF}\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCCustomWebBrowser.GetBridgeCommunicationLayer(ABridgeName: string): string;\r\nconst\r\n LB = #13;\r\nbegin\r\n Result :=\r\n 'var send' + ABridgeName + 'ObjectMessage = function(parameters) {' + LB +\r\n ' var v = parameters;' + LB +\r\n {$IFDEF ANDROID}\r\n ' if (!' + ABridgeName + ') {' + LB +\r\n ' return;' + LB +\r\n ' }' + LB +\r\n ' ' + ABridgeName + '.Setjsvalue(v); ' + LB +\r\n ' ' + ABridgeName + '.performClick();' + LB +\r\n {$ENDIF}\r\n {$IFDEF MACOS}\r\n ' if (!window.webkit || !window.webkit.messageHandlers || !window.webkit.messageHandlers.' + ABridgeName + ') {' + LB +\r\n ' return;' + LB +\r\n ' }' + LB +\r\n ' window.webkit.messageHandlers.' + ABridgeName + '.postMessage(v);' + LB +\r\n {$ENDIF}\r\n {$IFDEF MSWINDOWS}\r\n 'if (!window.chrome || !window.chrome.webview || !window.chrome.webview.hostObjects || !window.chrome.webview.hostObjects.sync) {' + LB +\r\n ' return;' + LB +\r\n '}' + LB +\r\n 'var obj = window.chrome.webview.hostObjects.sync.' + ABridgeName + ';' + LB +\r\n ' if (obj) {' + LB +\r\n ' obj.ObjectMessage = v;' + LB +\r\n ' }' + LB +\r\n {$ENDIF}\r\n {$IFDEF WEBLIB}\r\n ' var event = new CustomEvent(\"' + ABridgeName + '\", {detail: v});' + LB +\r\n ' ' + ElementID + '.dispatchEvent(event);' + LB +\r\n {$ENDIF}\r\n {$IFDEF LINUX}\r\n ' if (!window.webkit || !window.webkit.messageHandlers || !window.webkit.messageHandlers.' + ABridgeName + ') {' + LB +\r\n ' return;' + LB +\r\n ' }' + LB +\r\n ' window.webkit.messageHandlers.' + ABridgeName + '.postMessage(v);' + LB +\r\n {$ENDIF}\r\n '};';\r\nend;\r\n\r\nfunction TTMSFNCCustomWebBrowser.GetBrowserVersion: string;\r\nvar\r\n ii: ITMSFNCCustomWebBrowserInfo;\r\nbegin\r\n Result := '';\r\n if Assigned(FWebBrowser) then\r\n begin\r\n if FWebBrowser.QueryInterface(ITMSFNCCustomWebBrowserInfo, ii) = S_OK then\r\n Result := ii.GetBrowserVersion;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCCustomWebBrowser.GetCacheFolder: string;\r\nbegin\r\n Result := '';\r\n if Assigned(FWebBrowser) then\r\n Result := FWebBrowser.CacheFolder;\r\nend;\r\n\r\nfunction TTMSFNCCustomWebBrowser.GetCacheFolderName: string;\r\nbegin\r\n Result := '';\r\n if Assigned(FWebBrowser) then\r\n Result := FWebBrowser.CacheFolderName;\r\nend;\r\n\r\nfunction TTMSFNCCustomWebBrowser.GetContainsFullScreenElement: Boolean;\r\nvar\r\n ii: ITMSFNCCustomWebBrowserInfo;\r\nbegin\r\n Result := False;\r\n if Assigned(FWebBrowser) then\r\n begin\r\n if FWebBrowser.QueryInterface(IID_ITMSFNCCustomWebBrowserEx, ii) = S_OK then\r\n Result := ii.GetContainsFullScreenElement;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomWebBrowser.GetCookies(AURI: string = '');\r\nvar\r\n ic: ITMSFNCCustomWebBrowserCookies;\r\nbegin\r\n if Assigned(FWebBrowser) then\r\n begin\r\n if FWebBrowser.QueryInterface(IID_ITMSFNCCustomWebBrowserCookies, ic) = S_OK then\r\n ic.GetCookies(AURI);\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCCustomWebBrowser.GetDocumentTitle: string;\r\nvar\r\n ii: ITMSFNCCustomWebBrowserInfo;\r\nbegin\r\n Result := '';\r\n if Assigned(FWebBrowser) then\r\n begin\r\n if FWebBrowser.QueryInterface(ITMSFNCCustomWebBrowserInfo, ii) = S_OK then\r\n Result := ii.GetDocumentTitle;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCCustomWebBrowser.GetDocURL: string;\r\nbegin\r\n Result := TTMSFNCBaseDocURL + 'tmsfnccore/components/ttmsfncwebbrowser';\r\nend;\r\n\r\nfunction TTMSFNCCustomWebBrowser.GetDownloadInterruptReasonText(ADownloadInterruptReason: TTMSFNCWebBrowserDownloadInterruptReason): string;\r\nbegin\r\n case ADownloadInterruptReason of\r\n dirNone: Result := 'None';\r\n dirFileFailed: Result := 'File Failed';\r\n dirFileAccessDenied: Result := 'File Access Denied';\r\n dirFileNoSpace: Result := 'File No Space';\r\n dirFileNameTooLong: Result := 'File Name Too Long';\r\n dirFileTooLarge: Result := 'File Too Large';\r\n dirFileMalicious: Result := 'File Malicious';\r\n dirFileTransientError: Result := 'File Transient Error';\r\n dirFileBlockedByPolicy: Result := 'File Blocked By Policy';\r\n dirFileSecurityCheckFailed: Result := 'File Security Check Failed';\r\n dirFileTooShort: Result := 'File Too Short';\r\n dirFileHasMismatch: Result := 'File Has Mismatch';\r\n dirNetworkFailed: Result := 'Network Failed';\r\n dirNetworkTimeout: Result := 'Network Timeout';\r\n dirNetworkDisconnected: Result := 'Network Disconnected';\r\n dirNetworkServerDown: Result := 'Network Server Down';\r\n dirNetworkInvalidRequest: Result := 'Network Invalid Request';\r\n dirServerFailed: Result := 'Server Failed';\r\n dirServerNoRange: Result := 'Server No Range';\r\n dirServerBadContent: Result := 'Server Bad Content';\r\n dirServerUnauthorized: Result := 'Server Unauthorized';\r\n dirServerCertificateProblem: Result := 'Server Certificate Problem';\r\n dirServerForbidden: Result := 'Server Forbidden';\r\n dirServerUnexpectedResponse: Result := 'Server Unexpected Response';\r\n dirServerContentLengthMismatch: Result := 'Server Content Length Mismatch';\r\n dirServerCrossOriginRedirect: Result := 'Server Cross Origin Redirect';\r\n dirUserCanceled: Result := 'User Canceled';\r\n dirUserShutdown: Result := 'User Shutdown';\r\n dirUserPaused: Result := 'User Paused';\r\n dirDownloadProcessCrashed: Result := 'Download Process Crashed';\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCCustomWebBrowser.GetDownloadStateText(ADownloadState: TTMSFNCWebBrowserDownloadState): string;\r\nbegin\r\n case ADownloadState of\r\n dsInProgress: Result := 'In Progress';\r\n dsInterrupted: Result := 'Interrupted';\r\n dsCompleted: Result := 'Completed';\r\n dsCancelled: Result := 'Cancelled';\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCCustomWebBrowser.GetAutoClearCache: Boolean;\r\nbegin\r\n Result := False;\r\n if Assigned(FWebBrowser) then\r\n Result := FWebBrowser.AutoClearCache;\r\nend;\r\n\r\nfunction TTMSFNCCustomWebBrowser.GetEnableAcceleratorKeys: Boolean;\r\nbegin\r\n if FWebBrowser <> nil then\r\n Result := FWebBrowser.EnableAcceleratorKeys\r\n else\r\n Result := FEnableAcceleratorKeys;\r\nend;\r\n\r\nfunction TTMSFNCCustomWebBrowser.GetEnableContextMenu: Boolean;\r\nbegin\r\n if FWebBrowser <> nil then\r\n Result := FWebBrowser.EnableContextMenu\r\n else\r\n Result := FEnableContextMenu;\r\nend;\r\n\r\nfunction TTMSFNCCustomWebBrowser.GetEnableShowDebugConsole: Boolean;\r\nbegin\r\n if FWebBrowser <> nil then\r\n Result := FWebBrowser.EnableShowDebugConsole\r\n else\r\n Result := FEnableShowDebugConsole;\r\nend;\r\n\r\nfunction TTMSFNCCustomWebBrowser.GetExternalBrowser: Boolean;\r\nbegin\r\n if FWebBrowser <> nil then\r\n Result := FWebBrowser.ExternalBrowser\r\n else\r\n Result := FExternalBrowser;\r\nend;\r\n\r\nfunction TTMSFNCCustomWebBrowser.GetParentWindowHandle: Cardinal;\r\nvar\r\n ii: ITMSFNCCustomWebBrowserInfo;\r\nbegin\r\n Result := 0;\r\n if Assigned(FWebBrowser) then\r\n begin\r\n if FWebBrowser.QueryInterface(ITMSFNCCustomWebBrowserInfo, ii) = S_OK then\r\n Result := ii.GetParentWindowHandle;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCCustomWebBrowser.GetSettingsI: ITMSFNCCustomWebBrowserSettings;\r\nvar\r\n s: ITMSFNCCustomWebBrowserSettings;\r\nbegin\r\n Result := nil;\r\n if Assigned(FWebBrowser) then\r\n begin\r\n if FWebBrowser.QueryInterface(IID_ITMSFNCCustomWebBrowserSettings, s) = S_OK then\r\n Result := s;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCCustomWebBrowser.GetURL: string;\r\nbegin\r\n if FWebBrowser <> nil then\r\n Result := FWebBrowser.URL\r\n else\r\n Result := FURL;\r\nend;\r\n\r\nfunction TTMSFNCCustomWebBrowser.GetUserAgent: string;\r\nbegin\r\n Result := '';\r\n if Assigned(FWebBrowser) then\r\n Result := FWebBrowser.UserAgent;\r\nend;\r\n\r\nfunction TTMSFNCCustomWebBrowser.GetUserDataFolder: string;\r\nvar\r\n ii: ITMSFNCCustomWebBrowserInfo;\r\nbegin\r\n Result := '';\r\n if Assigned(FWebBrowser) then\r\n begin\r\n if FWebBrowser.QueryInterface(ITMSFNCCustomWebBrowserInfo, ii) = S_OK then\r\n Result := ii.GetUserDataFolder;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomWebBrowser.GoBack;\r\nbegin\r\n if Assigned(FWebBrowser) then\r\n FWebBrowser.GoBack;\r\nend;\r\n\r\nfunction TTMSFNCCustomWebBrowser.GetVersion: string;\r\nbegin\r\n Result := GetVersionNumber(MAJ_VER, MIN_VER, REL_VER, BLD_VER);\r\nend;\r\n\r\nprocedure TTMSFNCCustomWebBrowser.GoForward;\r\nbegin\r\n if Assigned(FWebBrowser) then\r\n FWebBrowser.GoForward;\r\nend;\r\n\r\n{$IFDEF VCLLIB}\r\nprocedure TTMSFNCCustomWebBrowser.CreateWnd;\r\nbegin\r\n if CanRecreate and (not isLoading and not IsDestroying) then\r\n begin\r\n Deinitialize;\r\n inherited;\r\n Initialize;\r\n end\r\n else\r\n inherited;\r\nend;\r\n{$ENDIF}\r\n\r\n{$IFDEF FMXLIB}\r\nprocedure TTMSFNCCustomWebBrowser.Hide;\r\nbegin\r\n inherited;\r\n if Assigned(FWebBrowser) then\r\n FWebBrowser.UpdateBounds;\r\nend;\r\n\r\nprocedure TTMSFNCCustomWebBrowser.DoAbsoluteChanged;\r\nbegin\r\n inherited;\r\n if Assigned(FWebBrowser) then\r\n FWebBrowser.UpdateBounds;\r\nend;\r\n{$ENDIF}\r\n\r\nprocedure TTMSFNCCustomWebBrowser.Initialize;\r\nbegin\r\n if (IsDesigning and FDesigntimeEnabled) or not IsDesigning then\r\n begin\r\n if Assigned(FWebBrowser) then\r\n FWebBrowser.Initialize;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomWebBrowser.Initialized;\r\nbegin\r\n {$IFNDEF FNCLIB}\r\n SetupStartDomains;\r\n {$ENDIF}\r\n\r\n FInitialized := True;\r\n\r\n if Assigned(Settings) then\r\n Settings.ApplySettings;\r\n\r\n if Assigned(OnInitialized) and not FInitializeEventCalled then\r\n begin\r\n FInitializeEventCalled := True;\r\n OnInitialized(Self);\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCCustomWebBrowser.InitialPrintSettings: TTMSFNCWebBrowserPrintSettings;\r\nbegin\r\n Result.Orientation := poPortrait;\r\n Result.ScaleFactor := 0;\r\n Result.PageWidth := 0;\r\n Result.PageHeight := 0;\r\n Result.MarginLeft := 0;\r\n Result.MarginRight := 0;\r\n Result.MarginTop := 0;\r\n Result.MarginBottom := 0;\r\n Result.PrintBackgrounds := False;\r\n Result.PrintSelectionOnly := False;\r\n Result.PrintHeaderAndFooter := False;\r\n Result.HeaderTitle := '';\r\n Result.FooterURI := '';\r\nend;\r\n\r\nfunction TTMSFNCCustomWebBrowser.CanLoadDefaultHTML: Boolean;\r\nbegin\r\n Result := True;\r\nend;\r\n\r\nfunction TTMSFNCCustomWebBrowser.CanRecreate: Boolean;\r\nbegin\r\n Result := True;\r\nend;\r\n\r\nfunction TTMSFNCCustomWebBrowser.IsFMXBrowser: Boolean;\r\nbegin\r\n Result := False;\r\n if Assigned(FWebBrowser) then\r\n Result := FWebBrowser.IsFMXBrowser;\r\nend;\r\n\r\nprocedure TTMSFNCCustomWebBrowser.Loaded;\r\nbegin\r\n inherited;\r\n Initialize;\r\n if Assigned(FWebBrowser) then\r\n FWebBrowser.UpdateBounds;\r\n\r\n if Assigned(OnInitialized) and FInitialized and not FInitializeEventCalled then\r\n begin\r\n FInitializeEventCalled := True;\r\n OnInitialized(Self);\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomWebBrowser.LoadFile(AFile: String);\r\nbegin\r\n if Assigned(FWebBrowser) then\r\n FWebBrowser.LoadFile(AFile);\r\nend;\r\n\r\nprocedure TTMSFNCCustomWebBrowser.LoadHTML(AHTML: String);\r\nbegin\r\n if Assigned(FWebBrowser) then\r\n FWebBrowser.LoadHTML(AHTML);\r\nend;\r\n\r\n{$IFDEF FMXLIB}\r\nprocedure TTMSFNCCustomWebBrowser.Move;\r\nbegin\r\n inherited;\r\n if Assigned(FWebBrowser) then\r\n FWebBrowser.UpdateBounds;\r\nend;\r\n{$ENDIF}\r\n\r\n{$IFDEF ANDROID}\r\nfunction TTMSFNCCustomWebBrowser.NativeDialog: Pointer;\r\nbegin\r\n Result := nil;\r\n if Assigned(FWebBrowser) then\r\n Result := FWebBrowser.NativeDialog;\r\nend;\r\n{$ENDIF}\r\n\r\n{$IFDEF MSWINDOWS}\r\nfunction TTMSFNCCustomWebBrowser.GetWebBrowserInstance: IInterface;\r\nbegin\r\n Result := nil;\r\n if Assigned(FWebBrowser) then\r\n Result := FWebBrowser.GetBrowserInstance;\r\nend;\r\n{$ENDIF}\r\n\r\nfunction TTMSFNCCustomWebBrowser.NativeBrowser: Pointer;\r\nbegin\r\n Result := nil;\r\n if Assigned(FWebBrowser) then\r\n Result := FWebBrowser.NativeBrowser;\r\nend;\r\n\r\nfunction TTMSFNCCustomWebBrowser.NativeEnvironment: Pointer;\r\nbegin\r\n Result := nil;\r\n if Assigned(FWebBrowser) then\r\n Result := FWebBrowser.NativeEnvironment;\r\nend;\r\n\r\nprocedure TTMSFNCCustomWebBrowser.Navigate(const AURL: string);\r\nbegin\r\n FReady := False;\r\n if Assigned(FWebBrowser) then\r\n FWebBrowser.Navigate(AURL);\r\nend;\r\n\r\nprocedure TTMSFNCCustomWebBrowser.NavigateComplete(\r\n var Params: TTMSFNCCustomWebBrowserNavigateCompleteParams);\r\nbegin\r\n if Assigned(OnNavigateComplete) then\r\n OnNavigateComplete(Self, Params);\r\nend;\r\n\r\nprocedure TTMSFNCCustomWebBrowser.NavigateWithData(AURI: string; AMethod: string; ABodyStream: TStream; AHeaders: TStrings = nil);\r\nvar\r\n iX: ITMSFNCCustomWebBrowserEx;\r\nbegin\r\n if Assigned(FWebBrowser) then\r\n begin\r\n if FWebBrowser.QueryInterface(IID_ITMSFNCCustomWebBrowserEx, iX) = S_OK then\r\n iX.NavigateWithData(AURI, AMethod, ABodyStream, AHeaders);\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomWebBrowser.NavigateWithData(AURI, AMethod, ABody: string; AHeaders: TStrings);\r\nvar\r\n iX: ITMSFNCCustomWebBrowserEx;\r\nbegin\r\n if Assigned(FWebBrowser) then\r\n begin\r\n if FWebBrowser.QueryInterface(IID_ITMSFNCCustomWebBrowserEx, iX) = S_OK then\r\n iX.NavigateWithData(AURI, AMethod, ABody, AHeaders);\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomWebBrowser.OpenTaskManager;\r\nvar\r\n iX: ITMSFNCCustomWebBrowserEx;\r\nbegin\r\n if Assigned(FWebBrowser) then\r\n begin\r\n if FWebBrowser.QueryInterface(IID_ITMSFNCCustomWebBrowserEx, iX) = S_OK then\r\n iX.OpenTaskManagerWindow;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomWebBrowser.SetVirtualHostNameToFolderMapping(AHostName, AFolderPath: string; AAccessKind: TTMSFNCWebBrowserHostResourceAccessKind);\r\nvar\r\n vh: ITMSFNCCustomWebBrowserVirtualHosting;\r\nbegin\r\n if Assigned(FWebBrowser) then\r\n begin\r\n if FWebBrowser.QueryInterface(IID_ITMSFNCCustomWebBrowserVirtualHosting, vh) = S_OK then\r\n vh.SetVirtualHostNameToFolderMapping(AHostName, AFolderPath, AAccessKind);\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomWebBrowser.ClearVirtualHostNameToFolderMapping(AHostName: string);\r\nvar\r\n vh: ITMSFNCCustomWebBrowserVirtualHosting;\r\nbegin\r\n if Assigned(FWebBrowser) then\r\n begin\r\n if FWebBrowser.QueryInterface(IID_ITMSFNCCustomWebBrowserVirtualHosting, vh) = S_OK then\r\n vh.ClearVirtualHostNameToFolderMapping(AHostName);\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomWebBrowser.Print(APrintSettings: TTMSFNCWebBrowserPrintSettings);\r\nvar\r\n ip: ITMSFNCCustomWebBrowserPrint;\r\nbegin\r\n if Assigned(FWebBrowser) then\r\n begin\r\n if FWebBrowser.QueryInterface(IID_ITMSFNCCustomWebBrowserPrint, ip) = S_OK then\r\n ip.Print(APrintSettings);\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomWebBrowser.PauseDownload(ADownload: TTMSFNCWebBrowserDownload);\r\nvar\r\n ie: ITMSFNCCustomWebBrowserEdge;\r\nbegin\r\n if Assigned(FWebBrowser) then\r\n begin\r\n if FWebBrowser.QueryInterface(IID_ITMSFNCCustomWebBrowserEdge, ie) = S_OK then\r\n ie.PauseDownload(ADownload);\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomWebBrowser.Print;\r\nvar\r\n ip: ITMSFNCCustomWebBrowserPrint;\r\nbegin\r\n if Assigned(FWebBrowser) then\r\n begin\r\n if FWebBrowser.QueryInterface(IID_ITMSFNCCustomWebBrowserPrint, ip) = S_OK then\r\n ip.Print;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomWebBrowser.PrintToPDF(AFileName: string);\r\nvar\r\n ip: ITMSFNCCustomWebBrowserPrint;\r\nbegin\r\n if Assigned(FWebBrowser) then\r\n begin\r\n if FWebBrowser.QueryInterface(IID_ITMSFNCCustomWebBrowserPrint, ip) = S_OK then\r\n ip.PrintToPDF(AFileName);\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomWebBrowser.PrintToPDF(AFileName: string; APrintSettings: TTMSFNCWebBrowserPrintSettings);\r\nvar\r\n ip: ITMSFNCCustomWebBrowserPrint;\r\nbegin\r\n if Assigned(FWebBrowser) then\r\n begin\r\n if FWebBrowser.QueryInterface(IID_ITMSFNCCustomWebBrowserPrint, ip) = S_OK then\r\n ip.PrintToPDF(AFileName, APrintSettings);\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomWebBrowser.PrintToPDFStream;\r\nvar\r\n ip: ITMSFNCCustomWebBrowserPrint;\r\nbegin\r\n if Assigned(FWebBrowser) then\r\n begin\r\n if FWebBrowser.QueryInterface(IID_ITMSFNCCustomWebBrowserPrint, ip) = S_OK then\r\n ip.PrintToPDFStream;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomWebBrowser.PrintToPDFStream(APrintSettings: TTMSFNCWebBrowserPrintSettings);\r\nvar\r\n ip: ITMSFNCCustomWebBrowserPrint;\r\nbegin\r\n if Assigned(FWebBrowser) then\r\n begin\r\n if FWebBrowser.QueryInterface(IID_ITMSFNCCustomWebBrowserPrint, ip) = S_OK then\r\n ip.PrintToPDFStream(APrintSettings);\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomWebBrowser.Reload;\r\nbegin\r\n if Assigned(FWebBrowser) then\r\n FWebBrowser.Reload;\r\nend;\r\n\r\nprocedure TTMSFNCCustomWebBrowser.RemoveBridge(ABridgeName: string);\r\nbegin\r\n if Assigned(FWebBrowser) then\r\n FWebBrowser.RemoveBridge(ABridgeName);\r\nend;\r\n\r\nprocedure TTMSFNCCustomWebBrowser.ResumeDownload(ADownload: TTMSFNCWebBrowserDownload);\r\nvar\r\n ie: ITMSFNCCustomWebBrowserEdge;\r\nbegin\r\n if Assigned(FWebBrowser) then\r\n begin\r\n if FWebBrowser.QueryInterface(IID_ITMSFNCCustomWebBrowserEdge, ie) = S_OK then\r\n ie.ResumeDownload(ADownload);\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomWebBrowser.UpdateControlAfterResize;\r\nbegin\r\n inherited;\r\n if Assigned(FWebBrowser) then\r\n FWebBrowser.UpdateBounds;\r\nend;\r\n\r\nprocedure TTMSFNCCustomWebBrowser.Navigate;\r\nbegin\r\n FReady := False;\r\n if Assigned(FWebBrowser) then\r\n FWebBrowser.Navigate;\r\nend;\r\n\r\nprocedure TTMSFNCCustomWebBrowser.SetCacheFolder(const Value: string);\r\nbegin\r\n if Assigned(FWebBrowser) then\r\n FWebBrowser.CacheFolder := Value;\r\nend;\r\n\r\nprocedure TTMSFNCCustomWebBrowser.SetCacheFolderName(const Value: string);\r\nbegin\r\n if Assigned(FWebBrowser) then\r\n FWebBrowser.CacheFolderName := Value;\r\nend;\r\n\r\nprocedure TTMSFNCCustomWebBrowser.SetDesigntimeEnabled(const Value: Boolean);\r\nbegin\r\n FDesigntimeEnabled := Value;\r\n if IsDesigning then\r\n begin\r\n if FDesigntimeEnabled and not FInitialized then\r\n Initialize\r\n else\r\n DeInitialize;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomWebBrowser.SetAutoClearCache(const Value: Boolean);\r\nbegin\r\n if Assigned(FWebBrowser) then\r\n FWebBrowser.AutoClearCache := Value;\r\nend;\r\n\r\nprocedure TTMSFNCCustomWebBrowser.SetEnableContextMenu(const Value: Boolean);\r\nbegin\r\n FEnableContextMenu := Value;\r\n if Assigned(Settings) then\r\n Settings.FEnableContextMenu := Value;\r\n if Assigned(FWebBrowser) then\r\n FWebBrowser.EnableContextMenu := Value;\r\nend;\r\n\r\n{$IFDEF VCLLIB}\r\nprocedure TTMSFNCCustomWebBrowser.CMVisibleChanged(var Message: TMessage);\r\nbegin\r\n inherited;\r\n if Assigned(FWebBrowser) then\r\n FWebBrowser.UpdateVisible;\r\nend;\r\n{$ENDIF}\r\n\r\n{$IFDEF FMXLIB}\r\n{$HINTS OFF}\r\n{$IF COMPILERVERSION > 32}\r\nprocedure TTMSFNCCustomWebBrowser.FormHandleCreated(const Sender: TObject; const Msg: TMessage);\r\n\r\n function GetParentForm(Control: TFmxObject): TCommonCustomForm;\r\n begin\r\n if (Control.Root <> nil) and (Control.Root.GetObject is TCommonCustomForm) then\r\n Result := TCommonCustomForm(Control.Root.GetObject)\r\n else\r\n Result := nil;\r\n end;\r\n\r\nbegin\r\n if not (csDesigning in ComponentState) and ((FWebBrowser = nil) or (Sender = GetParentForm(self as TFmxObject))) then\r\n begin\r\n FWebBrowser.UpdateContentFromControl;\r\n{$IFNDEF MACOS}\r\n DeInitialize;\r\n Initialize;\r\n{$ENDIF}\r\n end;\r\nend;\r\n{$IFEND}\r\n{$HINTS ON}\r\n{$ENDIF}\r\n\r\nprocedure TTMSFNCCustomWebBrowser.SetEnabledAcceleratorKeys(const Value: Boolean);\r\nbegin\r\n FEnableAcceleratorKeys := Value;\r\n if Assigned(FWebBrowser) then\r\n FWebBrowser.EnableAcceleratorKeys := Value;\r\nend;\r\n\r\nprocedure TTMSFNCCustomWebBrowser.SetEnableShowDebugConsole(const Value: Boolean);\r\nbegin\r\n FEnableShowDebugConsole := Value;\r\n if Assigned(FWebBrowser) then\r\n FWebBrowser.EnableShowDebugConsole := Value;\r\nend;\r\n\r\nprocedure TTMSFNCCustomWebBrowser.SetExternalBrowser(const Value: Boolean);\r\nbegin\r\n FExternalBrowser := Value;\r\n if Assigned(FWebBrowser) then\r\n FWebBrowser.ExternalBrowser := Value;\r\nend;\r\n\r\nprocedure TTMSFNCCustomWebBrowser.SetSettings(const Value: TTMSFNCWebBrowserSettings);\r\nbegin\r\n FSettings.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCCustomWebBrowser.SetupStartDomains;\r\nvar\r\n ie: ITMSFNCCustomWebBrowserEdge;\r\nbegin\r\n if Assigned(FWebBrowser) then\r\n begin\r\n if FWebBrowser.QueryInterface(IID_ITMSFNCCustomWebBrowserEdge, ie) = S_OK then\r\n ie.SetupStartDomains;\r\n end;\r\nend;\r\n\r\n{$IFDEF CMNWEBLIB}\r\nprocedure TTMSFNCCustomWebBrowser.SetEnabled(Value: Boolean);\r\nbegin\r\n inherited;\r\n if Assigned(FWebBrowser) then\r\n FWebBrowser.UpdateEnabled;\r\nend;\r\n\r\n{$IFDEF CMNLIB}\r\nprocedure TTMSFNCCustomWebBrowser.SetParent(Value: TWinControl);\r\n{$ELSE}\r\nprocedure TTMSFNCCustomWebBrowser.SetParent(Value: TControl);\r\n{$ENDIF}\r\nbegin\r\n if Assigned(FWebBrowser) then\r\n FWebBrowser.BeforeChangeParent;\r\n inherited;\r\n Initialize;\r\n {$IFDEF WEBLIB}\r\n BeginUpdate;\r\n EndUpdate;\r\n {$ENDIF}\r\nend;\r\n{$ENDIF}\r\n\r\n{$IFDEF FMXLIB}\r\nprocedure TTMSFNCCustomWebBrowser.SetBounds(X, Y, AWidth, AHeight: Single);\r\nbegin\r\n inherited;\r\n if Assigned(FWebBrowser) then\r\n FWebBrowser.UpdateBounds;\r\nend;\r\n\r\nprocedure TTMSFNCCustomWebBrowser.SetEnabled(const Value: Boolean);\r\nbegin\r\n inherited;\r\n if Assigned(FWebBrowser) then\r\n FWebBrowser.UpdateEnabled;\r\nend;\r\n\r\nprocedure TTMSFNCCustomWebBrowser.AncestorVisibleChanged(const Visible: Boolean);\r\nbegin\r\n if Assigned(FWebBrowser) then\r\n FWebBrowser.UpdateVisible;\r\nend;\r\n\r\nprocedure TTMSFNCCustomWebBrowser.SetParent(const Value: TFmxObject);\r\nbegin\r\n if Assigned(FWebBrowser) then\r\n FWebBrowser.BeforeChangeParent;\r\n inherited;\r\n Initialize;\r\nend;\r\n\r\nprocedure TTMSFNCCustomWebBrowser.SetVisible(const Value: Boolean);\r\nbegin\r\n inherited;\r\n if Assigned(FWebBrowser) then\r\n FWebBrowser.UpdateVisible;\r\nend;\r\n{$ENDIF}\r\n\r\nprocedure TTMSFNCCustomWebBrowser.SetURL(const Value: string);\r\nbegin\r\n FURL := Value;\r\n if Assigned(FWebBrowser) then\r\n begin\r\n FWebBrowser.URL := Value;\r\n if CanCreateBrowser and (Value <> '') then\r\n Navigate;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomWebBrowser.SetUserAgent(const Value: string);\r\nbegin\r\n if Assigned(FWebBrowser) then\r\n FWebBrowser.UserAgent := Value;\r\nend;\r\n\r\nprocedure TTMSFNCCustomWebBrowser.ShowDebugConsole;\r\nbegin\r\n if Assigned(FWebBrowser) then\r\n FWebBrowser.ShowDebugConsole;\r\nend;\r\n\r\nprocedure TTMSFNCCustomWebBrowser.ShowPrintUI;\r\nvar\r\n ip: ITMSFNCCustomWebBrowserPrint;\r\nbegin\r\n if Assigned(FWebBrowser) then\r\n begin\r\n if FWebBrowser.QueryInterface(IID_ITMSFNCCustomWebBrowserPrint, ip) = S_OK then\r\n begin\r\n ip.ShowPrintUI;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomWebBrowser.DeInitialize;\r\nbegin\r\n FInitialized := False;\r\n FInitializeEventCalled := False;\r\n if Assigned(FWebBrowser) then\r\n FWebBrowser.DeInitialize;\r\nend;\r\n\r\nprocedure TTMSFNCCustomWebBrowser.DeleteAllCookies;\r\nvar\r\n ic: ITMSFNCCustomWebBrowserCookies;\r\nbegin\r\n if Assigned(FWebBrowser) then\r\n begin\r\n if FWebBrowser.QueryInterface(IID_ITMSFNCCustomWebBrowserCookies, ic) = S_OK then\r\n ic.DeleteAllCookies;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomWebBrowser.DeleteCookie(AName, ADomain, APath: string);\r\nvar\r\n ic: ITMSFNCCustomWebBrowserCookies;\r\nbegin\r\n if Assigned(FWebBrowser) then\r\n begin\r\n if FWebBrowser.QueryInterface(IID_ITMSFNCCustomWebBrowserCookies, ic) = S_OK then\r\n ic.DeleteCookie(AName, ADomain, APath);\r\n end;\r\nend;\r\n\r\n{$IFDEF LCLLIB}\r\n{$IFDEF UNIX}\r\n{$IFDEF LCLGTK3}\r\nclass procedure TTMSFNCCustomWebBrowser.WSRegisterClass;\r\nbegin\r\n inherited WSRegisterClass;\r\n RegisterGTK3WebBrowser;\r\nend;\r\n{$ENDIF}\r\n{$ENDIF}\r\n{$ENDIF}\r\n\r\nclass procedure TTMSFNCCustomWebBrowser.DeleteCookies;\r\nvar\r\n WebBrowserService: ITMSFNCWebBrowserService;\r\nbegin\r\n inherited;\r\n if TTMSFNCWebBrowserPlatformServices.Current.SupportsPlatformService(ITMSFNCWebBrowserService, IInterface(WebBrowserService)) then\r\n WebBrowserService.DeleteCookies;\r\nend;\r\n\r\n{$IFNDEF WEBLIB}\r\nprocedure TTMSFNCCustomWebBrowser.StartDocumentReadyStateThread;\r\nbegin\r\n StopDocumentReadyStateThread;\r\n\r\n if not Assigned(FDocumentReadyStateThread) then\r\n begin\r\n FDocumentReadyStateThread := TTMSFNCWebBrowserDocumentReadyStateThread.Create(Self);\r\n FDocumentReadyStateThread.OnTerminate := DoTerminate;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomWebBrowser.StopDocumentReadyStateThread;\r\nbegin\r\n if Assigned(FDocumentReadyStateThread) then\r\n begin\r\n FDocumentReadyStateThread.Terminate;\r\n FDocumentReadyStateThread.WaitFor;\r\n\r\n while not FThreadDone do\r\n begin\r\n Sleep(100);\r\n Application.ProcessMessages;\r\n end;\r\n\r\n FreeAndNil(FDocumentReadyStateThread);\r\n FThreadDone := False;\r\n end;\r\nend;\r\n{$ENDIF}\r\n\r\nprocedure TTMSFNCCustomWebBrowser.StopLoading;\r\nbegin\r\n if Assigned(FWebBrowser) then\r\n FWebBrowser.StopLoading;\r\nend;\r\n\r\nprocedure TTMSFNCCustomWebBrowser.SubscribeDevtools(AEventName: string);\r\nvar\r\n ie: ITMSFNCCustomWebBrowserEdge;\r\nbegin\r\n if Assigned(FWebBrowser) then\r\n begin\r\n if FWebBrowser.QueryInterface(IID_ITMSFNCCustomWebBrowserEdge, ie) = S_OK then\r\n ie.SubscribeDevtools(AEventName);\r\n end;\r\nend;\r\n\r\n{ TTMSFNCWebBrowserFactoryService }\r\n\r\nconstructor TTMSFNCWebBrowserFactoryService.Create;\r\nbegin\r\n inherited Create;\r\n FWebBrowsers := TTMSFNCWebBrowserList.Create;\r\nend;\r\n\r\nfunction TTMSFNCWebBrowserFactoryService.CreateWebBrowser(const AValue: TTMSFNCCustomWebBrowser): ITMSFNCCustomWebBrowser;\r\nbegin\r\n Result := DoCreateWebBrowser(AValue);\r\n FWebBrowsers.Add(Result);\r\nend;\r\n\r\ndestructor TTMSFNCWebBrowserFactoryService.Destroy;\r\nbegin\r\n FreeAndNil(FWebBrowsers);\r\n inherited Destroy;\r\nend;\r\n\r\nprocedure TTMSFNCWebBrowserFactoryService.DestroyWebBrowser(const AValue: ITMSFNCCustomWebBrowser);\r\nbegin\r\n DoRemoveWebBrowser(AValue);\r\nend;\r\n\r\nprocedure TTMSFNCWebBrowserFactoryService.DoRemoveWebBrowser(const AValue: ITMSFNCCustomWebBrowser);\r\nbegin\r\n if (FWebBrowsers <> nil) and (AValue <> nil) then\r\n FWebBrowsers.Remove(AValue);\r\nend;\r\n\r\n{ TTMSFNCWebBrowserPopup }\r\n\r\nprocedure TTMSFNCWebBrowserPopup.DoBeforeNavigate(Sender: TObject; var Params: TTMSFNCCustomWebBrowserBeforeNavigateParams);\r\nbegin\r\n if Assigned(OnBeforeNavigate) then\r\n OnBeforeNavigate(Self, Params);\r\nend;\r\n\r\nprocedure TTMSFNCWebBrowserPopup.Close(AModalResult: TModalResult = mrOk);\r\nbegin\r\n {$IFDEF ANDROID}\r\n if Assigned(FWebBrowser) then\r\n begin\r\n FWebBrowser.Free;\r\n FWebBrowser := nil;\r\n end;\r\n if Assigned(OnClose) then\r\n OnClose(Self);\r\n {$ELSE}\r\n if Assigned(FWebBrowserForm) then\r\n begin\r\n if FModal then\r\n FWebBrowserForm.ModalResult := AModalResult\r\n else\r\n begin\r\n if Assigned(FWebBrowserForm) then\r\n FWebBrowserForm.Close;\r\n end;\r\n end;\r\n {$ENDIF}\r\nend;\r\n\r\nprocedure TTMSFNCWebBrowserPopup.CloseForm(Sender: TObject);\r\nbegin\r\n Close;\r\nend;\r\n\r\nconstructor TTMSFNCWebBrowserPopup.Create(AOwner: TComponent);\r\nbegin\r\n inherited;\r\n {$IFNDEF ANDROID}\r\n {$IFNDEF CMNWEBLIB}\r\n FPopup := TPopup.Create(Self);\r\n {$ENDIF}\r\n {$ENDIF}\r\n {$IFDEF FMXLIB}\r\n FPosition := TFormPosition.ScreenCenter;\r\n {$ENDIF}\r\n {$IFNDEF FMXLIB}\r\n FPosition := poScreenCenter;\r\n {$ENDIF}\r\n {$IFDEF FMXMOBILE}\r\n FButtonEventHandler := TTMSFNCWebBrowserPopupButtonEventHandler.Create;\r\n FButtonEventHandler.FWebBrowserPopup := Self;\r\n {$ENDIF}\r\n FFullScreen := False;\r\n FWidth := 640;\r\n FHeight := 480;\r\n FL := 0;\r\n FT := 0;\r\n FExternalBrowser := False;\r\n if csDesigning in ComponentState then\r\n FCloseButtonText := 'Close';\r\nend;\r\n\r\ndestructor TTMSFNCWebBrowserPopup.Destroy;\r\nbegin\r\n {$IFNDEF ANDROID}\r\n {$IFNDEF CMNWEBLIB}\r\n if Assigned(FPopup) then\r\n FPopup := nil;\r\n {$ENDIF}\r\n {$ENDIF}\r\n {$IFDEF FMXMOBILE}\r\n if Assigned(FButtonEventHandler) then\r\n begin\r\n FButtonEventHandler.Free;\r\n FButtonEventHandler := nil;\r\n end;\r\n {$ENDIF}\r\n if Assigned(FWebBrowser) then\r\n begin\r\n FWebBrowser.Free;\r\n FWebBrowser := nil;\r\n end;\r\n inherited;\r\nend;\r\n\r\n{$IFDEF MSWINDOWS}\r\nprocedure TTMSFNCWebBrowserPopup.FormShow(Sender: TObject);\r\nbegin\r\n if FFirstLoad then\r\n begin\r\n FFirstLoad := False;\r\n if Assigned(FWebBrowser) then\r\n FWebBrowser.URL := FLoadURL;\r\n end;\r\nend;\r\n{$ENDIF}\r\n\r\nfunction TTMSFNCWebBrowserPopup.GetWebBrowserClass: TTMSFNCCustomWebBrowserClass;\r\nbegin\r\n Result := TTMSFNCCustomWebBrowser;\r\nend;\r\n\r\nprocedure TTMSFNCWebBrowserPopup.InitializeWebBrowser(AWebBrowser: TTMSFNCCustomWebBrowser);\r\nbegin\r\n\r\nend;\r\n\r\n{$IFNDEF ANDROID}\r\nprocedure TTMSFNCWebBrowserPopup.FormClose(Sender: TObject; var Action: TCloseAction);\r\nbegin\r\n if FModal then\r\n begin\r\n {$IFDEF MACOS}\r\n {$IFDEF IOS}\r\n Action := TCloseAction.caFree;\r\n {$ENDIF}\r\n {$ELSE}\r\n Action := TCloseAction.caFree;\r\n {$ENDIF}\r\n end\r\n else\r\n Action := TCloseAction.caFree;\r\n\r\n FWebBrowserForm := nil;\r\n FWebBrowser := nil;\r\n\r\n if Assigned(OnClose) then\r\n OnClose(Self);\r\nend;\r\n\r\n{$ENDIF}\r\n\r\nprocedure TTMSFNCWebBrowserPopup.DoNavigateComplete(Sender: TObject; var Params: TTMSFNCCustomWebBrowserNavigateCompleteParams);\r\nbegin\r\n if Assigned(OnNavigateComplete) then\r\n OnNavigateComplete(Self, Params);\r\nend;\r\n\r\nfunction TTMSFNCWebBrowserPopup.Open(AURL: String;\r\n AModal: Boolean = True): TModalResult;\r\nbegin\r\n URL := AURL;\r\n Result := Open(AModal);\r\nend;\r\n\r\nprocedure TTMSFNCWebBrowserPopup.ButtonClose(Sender: TObject);\r\nbegin\r\n Close;\r\nend;\r\n\r\nfunction TTMSFNCWebBrowserPopup.Open(AModal: Boolean = True): TModalResult;\r\n{$IFNDEF FMXMOBILE}\r\nvar\r\n b: TButton;\r\n{$ENDIF}\r\n{$IFDEF IOS}\r\nvar\r\n h: TiOSWindowHandle;\r\n wbv: UIView;\r\n p: Pointer;\r\n{$ENDIF}\r\n{$IFDEF ANDROID}\r\nvar\r\n wb: JWebBrowser;\r\n {$IF COMPILERVERSION < 32}\r\n wnd: JWindow;\r\n dl: JDialog;\r\n {$ENDIF}\r\n ll: JLinearLayout;\r\n{$ENDIF}\r\nbegin\r\n try\r\n FModal := AModal;\r\n {$IFDEF ANDROID}\r\n FModal := False;\r\n {$ENDIF}\r\n\r\n {$IFNDEF ANDROID}\r\n {$IFDEF CMNWEBLIB}\r\n FWebBrowserForm := TTMSFNCWebBrowserPopupForm.CreateNew(Application);\r\n {$ELSE}\r\n FWebBrowserForm := TTMSFNCWebBrowserPopupForm.CreateNew(FPopup);\r\n {$ENDIF}\r\n FWebBrowserForm.FWebBrowserPopup := Self;\r\n {$IFDEF DELPHHI_LLVM}\r\n FWebBrowserForm.FullScreen := FullScreen;\r\n {$ENDIF}\r\n FWebBrowserForm.OnClose := FormClose;\r\n {$IFDEF MSWINDOWS}\r\n FFirstLoad := True;\r\n FWebBrowserForm.OnShow := FormShow;\r\n {$ENDIF}\r\n FWebBrowserForm.Position := Position;\r\n FWebBrowserForm.Left := Left;\r\n FWebBrowserForm.Top := Top;\r\n FWebBrowserForm.Width := Width;\r\n FWebBrowserForm.Height := Height;\r\n {$ENDIF}\r\n\r\n FWebBrowser := GetWebBrowserClass.Create(Self);\r\n FWebBrowser.ExternalBrowser := ExternalBrowser;\r\n FWebBrowser.OnCloseForm := CloseForm;\r\n FWebBrowser.OnBeforeNavigate := DoBeforeNavigate;\r\n FWebBrowser.OnNavigateComplete := DoNavigateComplete;\r\n InitializeWebBrowser(FWebBrowser);\r\n\r\n {$IFDEF MSWINDOWS}\r\n FLoadURL := URL;\r\n if FWebBrowser.ExternalBrowser then\r\n FWebBrowser.URL := URL;\r\n {$ELSE}\r\n FWebBrowser.URL := URL;\r\n {$ENDIF}\r\n {$IFNDEF FMXMOBILE}\r\n FWebBrowser.ControlAlignment := caClient;\r\n {$ENDIF}\r\n\r\n {$IFDEF ANDROID}\r\n FWebBrowser.Parent := Application.MainForm;\r\n if FullScreen then\r\n begin\r\n FWebBrowser.ControlAlignment := caClient;\r\n end\r\n else\r\n begin\r\n case Position of\r\n TFormPosition.ScreenCenter, TFormPosition.DesktopCenter, TFormPosition.MainFormCenter,\r\n TFormPosition.OwnerFormCenter:\r\n FWebBrowser.Align := TAlignLayout.Center;\r\n end;\r\n end;\r\n {$ELSE}\r\n FWebBrowser.Parent := FWebBrowserForm;\r\n {$ENDIF}\r\n\r\n {$IFDEF FMXLIB}\r\n FWebBrowser.Position.X := Left;\r\n FWebBrowser.Position.Y := Top;\r\n {$ENDIF}\r\n {$IFDEF CMNWEBLIB}\r\n FWebBrowser.Left := Left;\r\n FWebBrowser.Top := Top;\r\n {$ENDIF}\r\n FWebBrowser.Width := Width;\r\n FWebBrowser.Height := Height;\r\n\r\n if CloseButton then\r\n begin\r\n {$IFNDEF FMXMOBILE}\r\n b := TButton.Create(FWebBrowserForm);\r\n b.Parent := FWebBrowserForm;\r\n {$IFDEF FMXLIB}\r\n b.Text := CloseButtonText;\r\n {$ENDIF}\r\n {$IFDEF CMNWEBLIB}\r\n b.Caption := CloseButtonText;\r\n {$ENDIF}\r\n b.OnClick := ButtonClose;\r\n {$IFNDEF FMXMOBILE}\r\n {$IFDEF FMXLIB}\r\n b.Align := TAlignLayout.Top;\r\n {$ENDIF}\r\n {$IFNDEF FMXLIB}\r\n b.Align := alTop;\r\n {$ENDIF}\r\n {$ELSE}\r\n if FullScreen then\r\n begin\r\n {$IFDEF FMXLIB}\r\n b.Align := TAlignLayout.Top;\r\n {$ENDIF}\r\n {$IFNDEF FMXLIB}\r\n b.Align := alTop;\r\n {$ENDIF}\r\n end;\r\n\r\n {$IFDEF FMXLIB}\r\n FWebBrowser.Position.Y := FWebBrowser.Position.Y + b.Height;\r\n FWebBrowser.Height := FWebBrowser.Height - b.Height;\r\n b.Position.X := FWebBrowser.Position.X;\r\n b.Position.Y := FWebBrowser.Position.Y - b.Height;\r\n {$ENDIF}\r\n {$IFDEF CMNWEBLIB}\r\n FWebBrowser.Position.Y := FWebBrowser.Top + b.Height;\r\n FWebBrowser.Height := FWebBrowser.Height - b.Height;\r\n b.Position.X := FWebBrowser.Left;\r\n b.Position.Y := FWebBrowser.Top - b.Height;\r\n {$ENDIF}\r\n b.Width := FWebBrowserForm.Width;\r\n {$ENDIF}\r\n {$ELSE}\r\n {$IFDEF IOS}\r\n FButton := TUIButton.Wrap(TUIButton.OCClass.buttonWithType(UIButtonTypeRoundedRect));\r\n FButton.addTarget(FButtonEventHandler.GetObjectID, sel_getUid('Click'), UIControlEventTouchUpInside);\r\n FButton.setTitle(NSStrEx(CloseButtonText), UIControlStateNormal);\r\n FWebBrowser.Position.Y := FWebBrowser.Position.Y + FButton.frame.size.height;\r\n FWebBrowser.Height := FWebBrowser.Height - FButton.frame.size.height;\r\n FButton.setFrame(CGRectMake(FWebBrowser.Position.X, FWebBrowser.Position.Y - FButton.frame.size.height, FWebBrowser.Width, 30));\r\n {$ELSE}\r\n CallInUIThreadAndWaitFinishing(\r\n procedure\r\n begin\r\n FButton := TJButton.JavaClass.init(SharedActivityEx);\r\n FButton.setText(StrToJCharSequence(CloseButtonText));\r\n FButton.setOnClickListener(FButtonEventHandler);\r\n wb := TJWebBrowser.Wrap(FWebBrowser.NativeBrowser);\r\n ll := TJLinearLayout.Wrap((wb.getParent as ILocalObject).GetObjectID);\r\n ll.addView(FButton, 0);\r\n end\r\n );\r\n {$ENDIF}\r\n {$ENDIF}\r\n end;\r\n\r\n {$IFDEF ANDROID}\r\n {$HINTS ON}\r\n {$IF COMPILERVERSION < 32}\r\n CallInUIThreadAndWaitFinishing(\r\n procedure\r\n begin\r\n dl := TJDialog.Wrap(FWebBrowser.NativeDialog);\r\n wnd := dl.getWindow;\r\n wnd.clearFlags(TJWindowManager_LayoutParams.JavaClass.FLAG_NOT_TOUCH_MODAL);\r\n wnd.addFlags(TJWindowManager_LayoutParams.JavaClass.FLAG_DIM_BEHIND);\r\n end\r\n );\r\n {$IFEND}\r\n {$HINTS OFF}\r\n FWebBrowser.SetFocus;\r\n {$ENDIF}\r\n\r\n {$IFDEF IOS}\r\n p := FWebBrowser.NativeBrowser;\r\n if Assigned(p) then\r\n begin\r\n wbv := TUIView.Wrap(p);\r\n wbv.layer.setShadowColor(TUIColor.OCClass.blackColor);\r\n wbv.layer.setShadowColor(TUIColor.Wrap(TUIColor.OCClass.blackColor).CGColor);\r\n wbv.layer.setShadowOffset(CGSizeMake(1,1));\r\n wbv.layer.setShadowRadius(5);\r\n wbv.layer.setShadowOpacity(0.75);\r\n\r\n h := WindowHandleToPlatform(FWebBrowserForm.Handle);\r\n h.View.setBackgroundColor(TUIColor.Wrap(TUIColor.OCClass.whiteColor).colorWithAlphaComponent(0.75));\r\n if Assigned(FButton) then\r\n begin\r\n h.View.addSubview(FButton);\r\n FButton.layer.setShadowColor(TUIColor.OCClass.blackColor);\r\n FButton.layer.setShadowColor(TUIColor.Wrap(TUIColor.OCClass.blackColor).CGColor);\r\n FButton.layer.setShadowOffset(CGSizeMake(1,1));\r\n FButton.layer.setShadowRadius(5);\r\n FButton.layer.setShadowOpacity(0.75);\r\n h.View.sendSubviewToBack(FButton);\r\n end;\r\n end;\r\n {$ENDIF}\r\n\r\n if ExternalBrowser then\r\n begin\r\n if Assigned(FWebBrowser) then\r\n begin\r\n FWebBrowser.Free;\r\n FWebBrowser := nil;\r\n end;\r\n\r\n {$IFNDEF ANDROID}\r\n if Assigned(FWebBrowserForm) then\r\n begin\r\n FWebBrowserForm.Free;\r\n FWebBrowserForm := nil;\r\n end;\r\n {$ENDIF}\r\n\r\n Result := mrOk;\r\n Exit;\r\n end;\r\n\r\n {$IFNDEF ANDROID}\r\n if FModal then\r\n begin\r\n Result := FWebBrowserForm.ShowModal;\r\n {$IFDEF MACOS}\r\n {$IFNDEF IOS}\r\n FWebBrowserForm.Free;\r\n FWebBrowserForm := nil;\r\n {$ENDIF}\r\n {$ENDIF}\r\n end\r\n else\r\n begin\r\n FWebBrowserForm.Show;\r\n Result := mrOk;\r\n end;\r\n {$ELSE}\r\n Result := mrOk;\r\n {$ENDIF}\r\n finally\r\n end;\r\nend;\r\n\r\n{ TTMSFNCWebBrowserPopupForm }\r\n\r\nprocedure TTMSFNCWebBrowserPopupForm.SetBounds(ALeft, ATop, AWidth, AHeight: Integer);\r\nbegin\r\n inherited;\r\n UpdateBackGround;\r\nend;\r\n\r\nprocedure TTMSFNCWebBrowserPopupForm.UpdateBackGround;\r\nvar\r\n wb: TTMSFNCCustomWebBrowser;\r\n {$IFDEF IOS}\r\n btn: UIButton;\r\n {$ENDIF}\r\nbegin\r\n if Assigned(FWebBrowserPopup) then\r\n begin\r\n wb := FWebBrowserPopup.FWebBrowser;\r\n if Assigned(wb) then\r\n begin\r\n if FWebBrowserPopup.FullScreen then\r\n begin\r\n wb.SetBounds(0, 0, Width, Height);\r\n end\r\n else\r\n begin\r\n {$IFDEF FMXLIB}\r\n case Position of\r\n TFormPosition.ScreenCenter, TFormPosition.DesktopCenter, TFormPosition.MainFormCenter,\r\n TFormPosition.OwnerFormCenter:\r\n begin\r\n wb.SetBounds((Width - FWebBrowserPopup.Width) / 2 , (Height - FWebBrowserPopup.Height) / 2, FWebBrowserPopup.Width, FWebBrowserPopup.Height);\r\n end;\r\n {$ENDIF}\r\n {$IFDEF CMNWEBLIB}\r\n case Position of\r\n poScreenCenter, poDesktopCenter, poMainFormCenter, poOwnerFormCenter:\r\n begin\r\n wb.SetBounds((Width - FWebBrowserPopup.Width) div 2 , (Height - FWebBrowserPopup.Height) div 2, FWebBrowserPopup.Width, FWebBrowserPopup.Height);\r\n end;\r\n {$ENDIF}\r\n else\r\n begin\r\n wb.SetBounds(FWebBrowserPopup.Left, FWebBrowserPopup.Top, FWebBrowserPopup.Width, FWebBrowserPopup.Height);\r\n end;\r\n end;\r\n end;\r\n {$IFDEF IOS}\r\n if Assigned(FWebBrowserPopup.FButton) and FWebBrowserPopup.CloseButton then\r\n begin\r\n btn := FWebBrowserPopup.FButton;\r\n btn.setFrame(CGRectMake(wb.Position.X, wb.Position.Y - FWebBrowserPopup.FButton.frame.size.height, wb.Width, FWebBrowserPopup.FButton.frame.size.height));\r\n wb.Position.Y := wb.Position.Y + btn.frame.size.height;\r\n wb.Height := wb.Height - btn.frame.size.height;\r\n btn.setFrame(CGRectMake(wb.Position.X, wb.Position.Y - btn.frame.size.height, wb.Width, 30));\r\n end;\r\n {$ENDIF}\r\n end;\r\n end;\r\nend;\r\n\r\n{ TTMSFNCWebBrowserError }\r\n\r\nconstructor TTMSFNCWebBrowserError.Create(AMessage, AType: string);\r\nbegin\r\n FMessage := AMessage;\r\n FType := AType;\r\nend;\r\n\r\nconstructor TTMSFNCWebBrowserError.Create(AMessage: string);\r\nbegin\r\n FMessage := AMessage;\r\n FType := GetDefaultType;\r\nend;\r\n\r\nconstructor TTMSFNCWebBrowserError.CreateDefault;\r\nbegin\r\n Create(GetDefaultErrorMessage, GetDefaultType);\r\nend;\r\n\r\nfunction TTMSFNCWebBrowserError.GetDefaultErrorMessage: string;\r\nbegin\r\n Result := 'Error Message';\r\nend;\r\n\r\nfunction TTMSFNCWebBrowserError.GetDefaultType: string;\r\nbegin\r\n Result := 'ERROR_TYPE';\r\nend;\r\n\r\nfunction TTMSFNCWebBrowserError.GetMessage: string;\r\nbegin\r\n Result := FMessage;\r\nend;\r\n\r\nfunction TTMSFNCWebBrowserError.GetType: string;\r\nbegin\r\n Result := FType;\r\nend;\r\n\r\n{ TTMSFNCWebBrowserDownloads }\r\n\r\nfunction TTMSFNCWebBrowserDownloads.Add: TTMSFNCWebBrowserDownload;\r\nbegin\r\n Result := TTMSFNCWebBrowserDownload(inherited Add);\r\nend;\r\n\r\nprocedure TTMSFNCWebBrowserDownloads.RemoveDownloadsByState(AState: TTMSFNCWebBrowserDownloadState);\r\nvar\r\n I: integer;\r\nbegin\r\n I := 0;\r\n while I < Self.Count do\r\n begin\r\n if Items[I].State = AState then\r\n Delete(I)\r\n else\r\n Inc(I);\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCWebBrowserDownloads.ClearFinishedDownloads;\r\nbegin\r\n RemoveDownloadsByState(dsCompleted);\r\nend;\r\n\r\nconstructor TTMSFNCWebBrowserDownloads.Create(AOwner: TTMSFNCCustomWebBrowser);\r\nbegin\r\n inherited Create(AOwner, CreateItemClass);\r\n FOwner := AOwner;\r\nend;\r\n\r\nfunction TTMSFNCWebBrowserDownloads.CreateItemClass: TCollectionItemClass;\r\nbegin\r\n Result := TTMSFNCWebBrowserDownload;\r\nend;\r\n\r\nfunction TTMSFNCWebBrowserDownloads.GetDownloadByResultFile(AResultFilePath: string): TTMSFNCWebBrowserDownload;\r\nvar\r\n I: Integer;\r\nbegin\r\n Result := nil;\r\n for I := Count - 1 downto 0 do\r\n begin\r\n if Items[I].ResultFilePath = AResultFilePath then\r\n begin\r\n Result := Items[I];\r\n Break;\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCWebBrowserDownloads.GetDownloadByURI(AURI: string): TTMSFNCWebBrowserDownload;\r\nvar\r\n I: Integer;\r\nbegin\r\n Result := nil;\r\n for I := Count - 1 downto 0 do\r\n begin\r\n if Items[I].URI = AURI then\r\n begin\r\n Result := Items[I];\r\n Break;\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCWebBrowserDownloads.GetItem(Index: Integer): TTMSFNCWebBrowserDownload;\r\nbegin\r\n Result := TTMSFNCWebBrowserDownload(inherited Items[Index]);\r\nend;\r\n\r\nfunction TTMSFNCWebBrowserDownloads.GetOwner: TPersistent;\r\nbegin\r\n Result := FOwner\r\nend;\r\n\r\nfunction TTMSFNCWebBrowserDownloads.Insert(Index: Integer): TTMSFNCWebBrowserDownload;\r\nbegin\r\n Result := TTMSFNCWebBrowserDownload(inherited Insert(Index));\r\nend;\r\n\r\nprocedure TTMSFNCWebBrowserDownloads.SetItem(Index: Integer; const Value: TTMSFNCWebBrowserDownload);\r\nbegin\r\n inherited Items[Index] := Value;\r\nend;\r\n\r\n{ TTMSFNCWebBrowserDownload }\r\n\r\nprocedure TTMSFNCWebBrowserDownload.Cancel;\r\nbegin\r\n if Assigned(FOwner) then\r\n FOwner.CancelDownload(Self);\r\nend;\r\n\r\nconstructor TTMSFNCWebBrowserDownload.Create(ACollection: TCollection);\r\nbegin\r\n inherited;\r\n if (Collection is TTMSFNCWebBrowserDownloads) then\r\n FOwner := (Collection as TTMSFNCWebBrowserDownloads).FOwner;\r\nend;\r\n\r\ndestructor TTMSFNCWebBrowserDownload.Destroy;\r\nbegin\r\n\r\n inherited;\r\nend;\r\n\r\nprocedure TTMSFNCWebBrowserDownload.Pause;\r\nbegin\r\n if Assigned(FOwner) then\r\n FOwner.PauseDownload(Self);\r\nend;\r\n\r\nprocedure TTMSFNCWebBrowserDownload.Resume;\r\nbegin\r\n if Assigned(FOwner) then\r\n FOwner.ResumeDownload(Self);\r\nend;\r\n\r\nprocedure TTMSFNCWebBrowserDownload.SetBytesReceived(const Value: Int64);\r\nbegin\r\n if FBytesReceived <> Value then\r\n FBytesReceived := Value;\r\nend;\r\n\r\nprocedure TTMSFNCWebBrowserDownload.SetCanResume(const Value: boolean);\r\nbegin\r\n if FCanResume <> Value then\r\n FCanResume := Value;\r\nend;\r\n\r\nprocedure TTMSFNCWebBrowserDownload.SetEstimatedEndTime(const Value: TDateTime);\r\nbegin\r\n if FEstimatedEndTime <> Value then\r\n FEstimatedEndTime := Value;\r\nend;\r\n\r\nprocedure TTMSFNCWebBrowserDownload.SetInterruptReason(const Value: TTMSFNCWebBrowserDownloadInterruptReason);\r\nbegin\r\n if FInterruptReason <> Value then\r\n FInterruptReason := Value;\r\nend;\r\n\r\nprocedure TTMSFNCWebBrowserDownload.SetMimeType(const Value: string);\r\nbegin\r\n if FMimeType <> Value then\r\n FMimeType := Value;\r\nend;\r\n\r\nprocedure TTMSFNCWebBrowserDownload.SetResultFilePath(const Value: string);\r\nbegin\r\n if FResultFilePath <> Value then\r\n FResultFilePath := Value;\r\nend;\r\n\r\nprocedure TTMSFNCWebBrowserDownload.SetState(const Value: TTMSFNCWebBrowserDownloadState);\r\nbegin\r\n if FState <> Value then\r\n FState := Value;\r\nend;\r\n\r\nprocedure TTMSFNCWebBrowserDownload.SetTotalBytes(const Value: Int64);\r\nbegin\r\n if FTotalBytes <> Value then\r\n FTotalBytes := Value;\r\nend;\r\n\r\nprocedure TTMSFNCWebBrowserDownload.SetURI(const Value: string);\r\nbegin\r\n if FURI <> Value then\r\n FURI := Value;\r\nend;\r\n\r\n{ TTMSFNCWebBrowserCustomContextMenuItem }\r\n\r\nfunction TTMSFNCWebBrowserCustomContextMenuItem.GetParentItem: TTMSFNCWebBrowserContextMenuItem;\r\nbegin\r\n Result := inherited ParentItem;\r\nend;\r\n\r\n{ TTMSFNCBrowserContextMenuItem }\r\n\r\nfunction TTMSFNCWebBrowserContextMenuItem.AsCustom: TTMSFNCWebBrowserCustomContextMenuItem;\r\nbegin\r\n if Self is TTMSFNCWebBrowserCustomContextMenuItem then\r\n Result := TTMSFNCWebBrowserCustomContextMenuItem(Self)\r\n else\r\n Result := nil;\r\nend;\r\n\r\nfunction TTMSFNCWebBrowserContextMenuItem.AsSystem: TTMSFNCWebBrowserSystemContextMenuItem;\r\nbegin\r\n if Self is TTMSFNCWebBrowserSystemContextMenuItem then\r\n Result := TTMSFNCWebBrowserSystemContextMenuItem(Self)\r\n else if Self is TTMSFNCWebBrowserCustomContextMenuItem then\r\n Result := TTMSFNCWebBrowserSystemContextMenuItem(Self)\r\n else\r\n Result := nil;\r\nend;\r\n\r\nconstructor TTMSFNCWebBrowserContextMenuItem.Create;\r\nbegin\r\n FKind := ikCommand;\r\n FEnabled := True;\r\n FOriginalIndex := -1;\r\n FChildren := TTMSFNCWebBrowserContextMenuItemList.Create;\r\n FIcon := TTMSFNCBitmap.Create;\r\nend;\r\n\r\ndestructor TTMSFNCWebBrowserContextMenuItem.Destroy;\r\nbegin\r\n if Assigned(FEventHandlerObject) then\r\n FreeAndNil(FEventHandlerObject);\r\n\r\n FIcon.Free;\r\n FChildren.Free;\r\n inherited;\r\nend;\r\n\r\nprocedure TTMSFNCWebBrowserContextMenuItem.SetShortcutKeyDescription(const Value: string);\r\nbegin\r\n FShortcutKeyDescription := Value;\r\nend;\r\n\r\n{ TTMSFNCBrowserSystemContextMenuItem }\r\n\r\nfunction TTMSFNCWebBrowserSystemContextMenuItem.GetChecked: Boolean;\r\nbegin\r\n Result := inherited Checked;\r\nend;\r\n\r\nfunction TTMSFNCWebBrowserSystemContextMenuItem.GetChildren: TObjectList;\r\nbegin\r\n Result := inherited Children;\r\nend;\r\n\r\nfunction TTMSFNCWebBrowserSystemContextMenuItem.GetEnabled: Boolean;\r\nbegin\r\n Result := inherited Enabled;\r\nend;\r\n\r\nfunction TTMSFNCWebBrowserSystemContextMenuItem.GetIcon: TTMSFNCBitmap;\r\nbegin\r\n Result := inherited Icon;\r\nend;\r\n\r\nfunction TTMSFNCWebBrowserSystemContextMenuItem.GetKind: TTMSFNCWebBrowserContextMenuItemKind;\r\nbegin\r\n Result := inherited Kind;\r\nend;\r\n\r\nfunction TTMSFNCWebBrowserSystemContextMenuItem.GetName: string;\r\nbegin\r\n Result := inherited Name;\r\nend;\r\n\r\nfunction TTMSFNCWebBrowserSystemContextMenuItem.GetParentItem: TTMSFNCWebBrowserContextMenuItem;\r\nbegin\r\n Result := inherited ParentItem;\r\nend;\r\n\r\nfunction TTMSFNCWebBrowserSystemContextMenuItem.GetText: string;\r\nbegin\r\n Result := inherited Text;\r\nend;\r\n\r\n{ TTMSFNCCustomWebBrowserSettings }\r\n\r\nprocedure TTMSFNCCustomWebBrowserSettings.ApplySettings;\r\nbegin\r\n SetEnableAcceleratorKeys(FEnableAcceleratorKeys);\r\n SetEnableContextMenu(FEnableContextMenu);\r\n SetEnableShowDebugConsole(FEnableShowDebugConsole);\r\n SetAllowExternalDrop(FAllowExternalDrop);\r\n// SetEnableScript(FEnableScript);\r\nend;\r\n\r\nconstructor TTMSFNCCustomWebBrowserSettings.Create(AOwner: TTMSFNCCustomWebBrowser);\r\nbegin\r\n inherited Create;\r\n FEnableScript := True;\r\n FEnableContextMenu := True;\r\n FEnableAcceleratorKeys := True;\r\n FEnableShowDebugConsole := True;\r\n FAllowExternalDrop := True;\r\n FAdditionalBrowserArguments := TStringList.Create;\r\n FLanguage := '';\r\n\r\n FOwner := AOwner;\r\nend;\r\n\r\ndestructor TTMSFNCCustomWebBrowserSettings.Destroy;\r\nbegin\r\n FAdditionalBrowserArguments.Free;\r\n inherited;\r\nend;\r\n\r\nfunction TTMSFNCCustomWebBrowserSettings.GetAllowExternalDrop: Boolean;\r\nvar\r\n s: ITMSFNCCustomWebBrowserSettings;\r\nbegin\r\n Result := FAllowExternalDrop;\r\n if Assigned(FOwner) and Assigned(FOwner.FWebBrowser) then\r\n begin\r\n if FOwner.FWebBrowser.QueryInterface(IID_ITMSFNCCustomWebBrowserSettings, s) = S_OK then\r\n Result := s.AllowExternalDrop;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCCustomWebBrowserSettings.GetEnableAcceleratorKeys: Boolean;\r\nbegin\r\n Result := FEnableAcceleratorKeys;\r\n if Assigned(FOwner) and FOwner.FInitialized then\r\n Result := FOwner.EnableAcceleratorKeys;\r\nend;\r\n\r\nfunction TTMSFNCCustomWebBrowserSettings.GetEnableContextMenu: Boolean;\r\nbegin\r\n Result := FEnableContextMenu;\r\n if Assigned(FOwner) and FOwner.FInitialized then\r\n Result := FOwner.EnableContextMenu;\r\nend;\r\n\r\nfunction TTMSFNCCustomWebBrowserSettings.GetEnableScript: Boolean;\r\nvar\r\n s: ITMSFNCCustomWebBrowserSettings;\r\nbegin\r\n if Assigned(FOwner) and FOwner.FInitialized then\r\n begin\r\n if Assigned(FOwner) then\r\n begin\r\n s := FOwner.SettingsI;\r\n if Assigned(s) then\r\n FEnableScript := s.GetEnableScript;\r\n end;\r\n end;\r\n Result := FEnableScript;\r\nend;\r\n\r\nfunction TTMSFNCCustomWebBrowserSettings.GetEnableShowDebugConsole: Boolean;\r\nbegin\r\n Result := FEnableShowDebugConsole;\r\n if Assigned(FOwner) and FOwner.FInitialized then\r\n Result := FOwner.EnableShowDebugConsole;\r\nend;\r\n\r\nfunction TTMSFNCCustomWebBrowserSettings.GetUsePopupMenuAsContextMenu: Boolean;\r\nbegin\r\n Result := FUsePopupMenuAsContextMenu;\r\nend;\r\n\r\nprocedure TTMSFNCCustomWebBrowserSettings.SetAdditionalBrowserArguments(\r\n const Value: TStringList);\r\nbegin\r\n FAdditionalBrowserArguments.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCCustomWebBrowserSettings.SetAllowExternalDrop(const Value: Boolean);\r\nvar\r\n s: ITMSFNCCustomWebBrowserSettings;\r\nbegin\r\n FAllowExternalDrop := Value;\r\n if Assigned(FOwner) and Assigned(FOwner.FWebBrowser) then\r\n begin\r\n if FOwner.FWebBrowser.QueryInterface(IID_ITMSFNCCustomWebBrowserSettings, s) = S_OK then\r\n s.SetAllowExternalDrop(FAllowExternalDrop);\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomWebBrowserSettings.SetEnableAcceleratorKeys(const Value: Boolean);\r\nbegin\r\n FEnableAcceleratorKeys := Value;\r\n if Assigned(FOwner) then\r\n FOwner.EnableAcceleratorKeys := Value;\r\nend;\r\n\r\nprocedure TTMSFNCCustomWebBrowserSettings.SetEnableContextMenu(const Value: Boolean);\r\nbegin\r\n FEnableContextMenu := Value;\r\n if Assigned(FOwner) then\r\n FOwner.EnableContextMenu := Value;\r\nend;\r\n\r\nprocedure TTMSFNCCustomWebBrowserSettings.SetEnableScript(const Value: boolean);\r\nvar\r\n s: ITMSFNCCustomWebBrowserSettings;\r\nbegin\r\n FEnableScript := Value;\r\n if Assigned(FOwner) then\r\n begin\r\n s := FOwner.SettingsI;\r\n if Assigned(s) then\r\n s.SetEnableScript(Value);\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomWebBrowserSettings.SetEnableShowDebugConsole(const Value: Boolean);\r\nbegin\r\n FEnableShowDebugConsole := Value;\r\n if Assigned(FOwner) then\r\n FOwner.EnableShowDebugConsole := Value;\r\nend;\r\n\r\nprocedure TTMSFNCCustomWebBrowserSettings.SetUsePopupMenuAsContextMenu(const Value: Boolean);\r\nbegin\r\n FUsePopupMenuAsContextMenu := Value;\r\nend;\r\n\r\n{$IFNDEF WEBLIB}\r\n\r\n{ TTMSFNCScript }\r\n\r\nconstructor TTMSFNCScript.Create(AScript: string; ACompleteEvent: TTMSFNCWebBrowserJavaScriptCompleteEvent);\r\nbegin\r\n FScript := AScript;\r\n FCompleteEvent := ACompleteEvent;\r\nend;\r\n{$ENDIF}\r\n\r\n{$IFDEF IOS}\r\n\r\n{ TTMSFNCWebBrowserPopupButtonEventHandler }\r\n\r\nprocedure TTMSFNCWebBrowserPopupButtonEventHandler.Click;\r\nbegin\r\n if Assigned(FWebBrowserPopup) then\r\n FWebBrowserPopup.Close;\r\nend;\r\n\r\nfunction TTMSFNCWebBrowserPopupButtonEventHandler.GetObjectiveCClass: PTypeInfo;\r\nbegin\r\n Result := TypeInfo(ITMSFNCWebBrowserPopupButtonEventHandler);\r\nend;\r\n{$ENDIF}\r\n\r\n{$IFDEF ANDROID}\r\n\r\n{ TTMSFNCWebBrowserPopupButtonEventHandler }\r\n\r\nprocedure TTMSFNCWebBrowserPopupButtonEventHandler.onClick(P1: JView);\r\nbegin\r\n if Assigned(FWebBrowserPopup) then\r\n FWebBrowserPopup.Close;\r\nend;\r\n\r\n{$ENDIF}\r\n\r\n{$IFNDEF WEBLIB}\r\n\r\n{ TTMSFNCWebBrowserDocumentReadyStateThread }\r\n\r\nconstructor TTMSFNCWebBrowserDocumentReadyStateThread.Create(AWebBrowser: TTMSFNCCustomWebBrowser);\r\nbegin\r\n inherited Create(False);\r\n FWebBrowser := AWebBrowser;\r\nend;\r\n\r\nprocedure TTMSFNCWebBrowserDocumentReadyStateThread.Execute;\r\nbegin\r\n while not Terminated do\r\n begin\r\n if Assigned(FWebBrowser) then\r\n begin\r\n Synchronize(FWebBrowser.CheckApplicationInitialized);\r\n Sleep(100);\r\n if FWebBrowser.FReady then\r\n begin\r\n Synchronize(FWebBrowser.DoDocumentComplete);\r\n Terminate;\r\n end;\r\n end\r\n else\r\n Terminate;\r\n end;\r\nend;\r\n\r\n{$ENDIF}\r\n\r\n{ TTMSFNCWebBrowserPlatformServices }\r\n\r\nfunction TTMSFNCWebBrowserPlatformServices.Count: Integer;\r\nbegin\r\n Result := FServicesList.Count;\r\nend;\r\n\r\nprocedure TTMSFNCWebBrowserPlatformServices.AddPlatformService(const AServiceGUID: TGUID; const AService: IInterface);\r\nvar\r\n LService: IInterface;\r\nbegin\r\n if not FServicesList.ContainsKey(GUIDToString(AServiceGUID)) then\r\n begin\r\n if Supports(AService, AServiceGUID, LService) then\r\n FServicesList.Add(TTMSFNCWebBrowserPlatformServicesService.Create(GUIDToString(AServiceGUID), AService));\r\n end;\r\nend;\r\n\r\nconstructor TTMSFNCWebBrowserPlatformServices.Create;\r\nbegin\r\n inherited;\r\n FServicesList := TTMSFNCWebBrowserPlatformServicesList.Create;\r\nend;\r\n\r\ndestructor TTMSFNCWebBrowserPlatformServices.Destroy;\r\nbegin\r\n FreeAndNil(FServicesList);\r\n inherited;\r\nend;\r\n\r\n{$IFNDEF AUTOREFCOUNT}\r\nclass procedure TTMSFNCWebBrowserPlatformServices.ReleaseCurrent;\r\nbegin\r\n FreeAndNil(FCurrent);\r\n FCurrentReleased := True;\r\nend;\r\n{$ENDIF}\r\n\r\nclass function TTMSFNCWebBrowserPlatformServices.Current: TTMSFNCWebBrowserPlatformServices;\r\nbegin\r\n if (FCurrent = nil) and not FCurrentReleased then\r\n FCurrent := TTMSFNCWebBrowserPlatformServices.Create;\r\n Result := FCurrent;\r\nend;\r\n\r\nfunction TTMSFNCWebBrowserPlatformServices.GetPlatformService(const AServiceGUID: TGUID): IInterface;\r\nvar\r\n k: IInterface;\r\nbegin\r\n k := FServicesList.Interfaces[GUIDToString(AServiceGUID)];\r\n Supports(k, AServiceGUID, Result);\r\nend;\r\n\r\nprocedure TTMSFNCWebBrowserPlatformServices.RemovePlatformService(const AServiceGUID: TGUID);\r\nbegin\r\n FServicesList.RemoveByGUID(GUIDToString(AServiceGUID));\r\nend;\r\n\r\nfunction TTMSFNCWebBrowserPlatformServices.SupportsPlatformService(const AServiceGUID: TGUID;\r\n var AService: IInterface): Boolean;\r\nbegin\r\n if FServicesList.ContainsKey(GUIDToString(AServiceGUID)) then\r\n Result := Supports(FServicesList.Interfaces[GUIDToString(AServiceGUID)], AServiceGUID, AService)\r\n else\r\n begin\r\n AService := nil;\r\n Result := False;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCWebBrowserPlatformServices.SupportsPlatformService(const AServiceGUID: TGUID): Boolean;\r\nbegin\r\n Result := FServicesList.ContainsKey(GUIDToString(AServiceGUID));\r\nend;\r\n\r\n{ TTMSFNCWebBrowserPlatformServicesService }\r\n\r\nconstructor TTMSFNCWebBrowserPlatformServicesService.Create(AGUID: string;\r\n AInterface: IInterface);\r\nbegin\r\n FGUID := AGUID;\r\n FInterface := AInterface;\r\nend;\r\n\r\n{ TTMSFNCWebBrowserPlatformServicesList }\r\n\r\nfunction TTMSFNCWebBrowserPlatformServicesList.ContainsKey(AGUID: string): Boolean;\r\nvar\r\n I: Integer;\r\nbegin\r\n Result := False;\r\n for I := 0 to Count - 1 do\r\n begin\r\n if Items[I].GUID = AGUID then\r\n begin\r\n Result := True;\r\n Break;\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCWebBrowserPlatformServicesList.GetValue(AGUID: string): IInterface;\r\nvar\r\n I: Integer;\r\nbegin\r\n Result := nil;\r\n for I := 0 to Count - 1 do\r\n begin\r\n if Items[I].GUID = AGUID then\r\n begin\r\n Result := Items[I].&Interface;\r\n Break;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCWebBrowserPlatformServicesList.RemoveByGUID(AGUID: string);\r\nvar\r\n I: Integer;\r\nbegin\r\n for I := Count - 1 downto 0 do\r\n begin\r\n if Items[I].GUID = AGUID then\r\n begin\r\n Remove(Items[I]);\r\n Break;\r\n end;\r\n end;\r\nend;\r\n\r\n{$IFDEF WEBLIB}\r\nfunction TTMSFNCWebBrowserList.GetItem(Index: Integer): ITMSFNCCustomWebBrowser;\r\nbegin\r\n Result := ITMSFNCCustomWebBrowser(inherited Items[Index]);\r\nend;\r\n\r\nprocedure TTMSFNCWebBrowserList.SetItem(Index: Integer; const Value: ITMSFNCCustomWebBrowser);\r\nbegin\r\n inherited Items[Index] := Value;\r\nend;\r\n\r\nfunction TTMSFNCWebBrowserPlatformServicesList.GetItem(Index: Integer): TTMSFNCWebBrowserPlatformServicesService;\r\nbegin\r\n Result := TTMSFNCWebBrowserPlatformServicesService(inherited Items[Index]);\r\nend;\r\n\r\nprocedure TTMSFNCWebBrowserPlatformServicesList.SetItem(Index: Integer; const Value: TTMSFNCWebBrowserPlatformServicesService);\r\nbegin\r\n inherited Items[Index] := Value;\r\nend;\r\n{$ENDIF}\r\n\r\n{ TTMSFNCWebBrowser }\r\n\r\nprocedure TTMSFNCWebBrowser.AddBridge(ABridgeName: string; ABridgeObject: TObject);\r\nbegin\r\n inherited AddBridge(ABridgeName, ABridgeObject);\r\nend;\r\n\r\n{$IFNDEF FNCLIB}\r\nprocedure TTMSFNCWebBrowser.AddCookie(ACookie: TTMSFNCWebBrowserCookie);\r\nbegin\r\n inherited AddCookie(ACookie);\r\nend;\r\n\r\nprocedure TTMSFNCWebBrowser.DeleteAllCookies;\r\nbegin\r\n inherited DeleteAllCookies;\r\nend;\r\n\r\nprocedure TTMSFNCWebBrowser.DeleteCookie(AName, ADomain, APath: string);\r\nbegin\r\n inherited DeleteCookie(AName, ADomain, APath);\r\nend;\r\n\r\nprocedure TTMSFNCWebBrowser.GetCookies(AURI: string);\r\nbegin\r\n inherited GetCookies(AURI);\r\nend;\r\n\r\nfunction TTMSFNCWebBrowser.InitialPrintSettings: TTMSFNCWebBrowserPrintSettings;\r\nbegin\r\n Result := inherited InitialPrintSettings;\r\nend;\r\n\r\nprocedure TTMSFNCWebBrowser.OpenTaskManager;\r\nbegin\r\n inherited OpenTaskManager;\r\nend;\r\n\r\nprocedure TTMSFNCWebBrowser.ShowPrintUI;\r\nbegin\r\n inherited ShowPrintUI;\r\nend;\r\n\r\nprocedure TTMSFNCWebBrowser.Print(APrintSettings: TTMSFNCWebBrowserPrintSettings);\r\nbegin\r\n inherited Print(APrintSettings);\r\nend;\r\n\r\nprocedure TTMSFNCWebBrowser.PrintToPDFStream(APrintSettings: TTMSFNCWebBrowserPrintSettings);\r\nbegin\r\n inherited PrintToPDFStream(APrintSettings);\r\nend;\r\n\r\nprocedure TTMSFNCWebBrowser.SetVirtualHostNameToFolderMapping(AHostName, AFolderPath: string; AAccessKind: TTMSFNCWebBrowserHostResourceAccessKind);\r\nbegin\r\n inherited SetVirtualHostNameToFolderMapping(AHostName, AFolderPath, AAccessKind);\r\nend;\r\n\r\nprocedure TTMSFNCWebBrowser.ClearVirtualHostNameToFolderMapping(AHostName: string);\r\nbegin\r\n inherited ClearVirtualHostNameToFolderMapping(AHostName);\r\nend;\r\n\r\nprocedure TTMSFNCWebBrowser.Print;\r\nbegin\r\n inherited Print;\r\nend;\r\n\r\nprocedure TTMSFNCWebBrowser.PrintToPDF(AFileName: string;\r\n APrintSettings: TTMSFNCWebBrowserPrintSettings);\r\nbegin\r\n inherited PrintToPDF(AFileName, APrintSettings);\r\nend;\r\n\r\nprocedure TTMSFNCWebBrowser.PrintToPDF(AFileName: string);\r\nbegin\r\n inherited PrintToPDF(AFileName);\r\nend;\r\n\r\nprocedure TTMSFNCWebBrowser.PrintToPDFStream;\r\nbegin\r\n inherited PrintToPDFStream;\r\nend;\r\n\r\nprocedure TTMSFNCWebBrowser.NavigateWithData(AURI: string; AMethod: string; ABodyStream: TStream; AHeaders: TStrings);\r\nbegin\r\n inherited NavigateWithData(AURI, AMethod, ABodyStream, AHeaders);\r\nend;\r\n\r\nprocedure TTMSFNCWebBrowser.NavigateWithData(AURI, AMethod, ABody: string; AHeaders: TStrings);\r\nbegin\r\n inherited NavigateWithData(AURI, AMethod, ABody, AHeaders);\r\nend;\r\n\r\nprocedure TTMSFNCWebBrowser.SubscribeDevtools(AEventName: string);\r\nbegin\r\n inherited SubscribeDevtools(AEventName);\r\nend;\r\n\r\nprocedure TTMSFNCWebBrowser.CallDevToolsProtocolMethod(AMethodName: string; AParametersAsJSON: string);\r\nbegin\r\n inherited CallDevToolsProtocolMethod(AMethodName, AParametersAsJSON);\r\nend;\r\n\r\nfunction TTMSFNCWebBrowser.GetDownloadInterruptReasonText(ADownloadInterruptReason: TTMSFNCWebBrowserDownloadInterruptReason): string;\r\nbegin\r\n Result := inherited GetDownloadInterruptReasonText(ADownloadInterruptReason);\r\nend;\r\n\r\nfunction TTMSFNCWebBrowser.GetDownloadStateText(ADownloadState: TTMSFNCWebBrowserDownloadState): string;\r\nbegin\r\n Result := inherited GetDownloadStateText(ADownloadState);\r\nend;\r\n\r\n{$ENDIF}\r\n\r\nfunction TTMSFNCWebBrowser.CanGoBack: Boolean;\r\nbegin\r\n Result := inherited CanGoBack;\r\nend;\r\n\r\nfunction TTMSFNCWebBrowser.CanGoForward: Boolean;\r\nbegin\r\n Result := inherited CanGoForward;\r\nend;\r\n\r\nprocedure TTMSFNCWebBrowser.CaptureScreenShot(ACompleteEvent: TTMSFNCWebBrowserCaptureScreenShotCompleteEvent = nil);\r\nbegin\r\n inherited CaptureScreenShot(ACompleteEvent);\r\nend;\r\n\r\nprocedure TTMSFNCWebBrowser.ClearCache;\r\nbegin\r\n inherited ClearCache;\r\nend;\r\n\r\nprocedure TTMSFNCWebBrowser.DeInitialize;\r\nbegin\r\n inherited DeInitialize;\r\nend;\r\n\r\nprocedure TTMSFNCWebBrowser.ExecuteJavaScript(AScript: String; ACompleteEvent: TTMSFNCWebBrowserJavaScriptCompleteEvent = nil; AImmediate: Boolean = False);\r\nbegin\r\n inherited ExecuteJavaScript(AScript, ACompleteEvent, AImmediate);\r\nend;\r\n\r\nfunction TTMSFNCWebBrowser.ExecuteJavaScriptSync(AScript: string): string;\r\nbegin\r\n Result := inherited ExecuteJavaScriptSync(AScript);\r\nend;\r\n\r\nfunction TTMSFNCWebBrowser.GetBridgeCommunicationLayer(ABridgeName: string): string;\r\nbegin\r\n Result := inherited GetBridgeCommunicationLayer(ABridgeName);\r\nend;\r\n\r\n{$IFDEF ANDROID}\r\nfunction TTMSFNCWebBrowser.NativeDialog: Pointer;\r\nbegin\r\n Result := inherited NativeDialog;\r\nend;\r\n{$ENDIF}\r\n\r\n{$IFDEF MSWINDOWS}\r\nfunction TTMSFNCWebBrowser.GetWebBrowserInstance: IInterface;\r\nbegin\r\n Result := inherited GetWebBrowserInstance;\r\nend;\r\n{$ENDIF}\r\n\r\nprocedure TTMSFNCWebBrowser.GoBack;\r\nbegin\r\n inherited GoBack;\r\nend;\r\n\r\nprocedure TTMSFNCWebBrowser.GoForward;\r\nbegin\r\n inherited GoForward;\r\nend;\r\n\r\nprocedure TTMSFNCWebBrowser.Initialize;\r\nbegin\r\n inherited Initialize;\r\nend;\r\n\r\nfunction TTMSFNCWebBrowser.IsFMXBrowser: Boolean;\r\nbegin\r\n Result := inherited IsFMXBrowser;\r\nend;\r\n\r\nprocedure TTMSFNCWebBrowser.LoadFile(AFile: String);\r\nbegin\r\n inherited LoadFile(AFile);\r\nend;\r\n\r\nprocedure TTMSFNCWebBrowser.LoadHTML(AHTML: String);\r\nbegin\r\n inherited LoadHTML(AHTML);\r\nend;\r\n\r\nfunction TTMSFNCWebBrowser.NativeBrowser: Pointer;\r\nbegin\r\n Result := inherited NativeBrowser;\r\nend;\r\n\r\nfunction TTMSFNCWebBrowser.NativeEnvironment: Pointer;\r\nbegin\r\n Result := inherited NativeEnvironment;\r\nend;\r\n\r\n{$IFNDEF WEBLIB}\r\nprocedure TTMSFNCWebBrowser.StartDocumentReadyStateThread;\r\nbegin\r\n inherited StartDocumentReadyStateThread;\r\nend;\r\n{$ENDIF}\r\n\r\nprocedure TTMSFNCWebBrowser.Navigate;\r\nbegin\r\n inherited Navigate;\r\nend;\r\n\r\nprocedure TTMSFNCWebBrowser.Navigate(const AURL: string);\r\nbegin\r\n inherited Navigate(AURL);\r\nend;\r\n\r\nprocedure TTMSFNCWebBrowser.Reload;\r\nbegin\r\n inherited Reload;\r\nend;\r\n\r\nprocedure TTMSFNCWebBrowser.RemoveBridge(ABridgeName: string);\r\nbegin\r\n inherited RemoveBridge(ABridgeName);\r\nend;\r\n\r\nprocedure TTMSFNCWebBrowser.ShowDebugConsole;\r\nbegin\r\n inherited ShowDebugConsole;\r\nend;\r\n\r\nprocedure TTMSFNCWebBrowser.StopLoading;\r\nbegin\r\n inherited StopLoading;\r\nend;\r\n\r\ninitialization\r\nbegin\r\n TTMSFNCWebBrowserPlatformServices.FCurrentReleased := False;\r\n RegisterWebBrowserService;\r\nend;\r\n\r\n{$IFNDEF WEBLIB}\r\nfinalization\r\nbegin\r\n UnRegisterWebBrowserService;\r\n{$IFNDEF AUTOREFCOUNT}\r\n TTMSFNCWebBrowserPlatformServices.ReleaseCurrent;\r\n{$ENDIF}\r\nend;\r\n{$ENDIF}\r\n\r\nend.\r\n","unit Generics.Strings;\r\n\r\n{$Mode Delphi}\r\n\r\ninterface\r\n\r\nresourcestring\r\n SArgumentOutOfRange = 'Argument out of range';\r\n //SArgumentNilNode = 'Node is nil';\r\n //SDuplicatesNotAllowed = 'Duplicates not allowed in dictionary';\r\n //SCollectionInconsistency = 'Collection inconsistency';\r\n //SCollectionDuplicate = 'Collection does not allow duplicates';\r\n //SDictionaryKeyDoesNotExist = 'Dictionary key does not exist';\r\n //SItemNotFound = 'Item not found';\r\n\r\nimplementation\r\n\r\nend.\r\n\r\n","unit Generics.Collections;\r\n\r\n{$Mode Delphi}\r\n{$COperators On}\r\n\r\ninterface\r\n\r\nuses\r\n Classes, SysUtils, rtlconsts, Types,\r\n {$IFDEF Pas2js}JS,{$ENDIF}\r\n Generics.Strings, Generics.Defaults;\r\n\r\ntype\r\n TCollectionNotification = (cnAdded, cnRemoved, cnExtracted);\r\n TCollectionNotifyEvent = procedure(ASender: TObject; const AItem: T;\r\n AAction: TCollectionNotification) of object;\r\n\r\n { TBinarySearchResult }\r\n\r\n TBinarySearchResult = record\r\n FoundIndex, CandidateIndex: SizeInt;\r\n CompareResult: SizeInt;\r\n end;\r\n\r\n { TCustomArrayHelper }\r\n\r\n TCustomArrayHelper = class abstract\r\n protected\r\n class procedure QuickSort(var AValues: array of T; ALeft, ARight: SizeInt;\r\n const AComparer: IComparer); virtual; abstract;\r\n public\r\n //class procedure Sort(var AValues: array of T); overload;\r\n class procedure Sort(var AValues: array of T;\r\n const AComparer: IComparer); overload;\r\n class procedure Sort(var AValues: array of T;\r\n const AComparer: IComparer; AIndex, ACount: SizeInt); overload;\r\n\r\n class function BinarySearch(const AValues: array of T; const AItem: T;\r\n out ASearchResult: TBinarySearchResult; const AComparer: IComparer;\r\n AIndex, ACount: SizeInt): Boolean; virtual; abstract; overload;\r\n class function BinarySearch(const AValues: array of T; const AItem: T;\r\n out AFoundIndex: SizeInt; const AComparer: IComparer;\r\n AIndex, ACount: SizeInt): Boolean; virtual; abstract; overload;\r\n class function BinarySearch(const AValues: array of T; const AItem: T;\r\n out AFoundIndex: SizeInt; const AComparer: IComparer): Boolean; overload;\r\n class function BinarySearch(const AValues: array of T; const AItem: T;\r\n out ASearchResult: TBinarySearchResult; const AComparer: IComparer): Boolean; overload;\r\n // No support for automatically creating a comparer.\r\n // class function BinarySearch(const AValues: array of T; const AItem: T;\r\n // out AFoundIndex: SizeInt): Boolean; overload;\r\n // class function BinarySearch(const AValues: array of T; const AItem: T;\r\n // out ASearchResult: TBinarySearchResult): Boolean; overload;\r\n end;\r\n\r\n { TArrayHelper }\r\n\r\n TArrayHelper = class(TCustomArrayHelper)\r\n protected\r\n class procedure QuickSort(var AValues: array of T; ALeft, ARight: SizeInt;\r\n const AComparer: IComparer); override;\r\n public\r\n class function BinarySearch(const AValues: array of T; const AItem: T;\r\n out ASearchResult: TBinarySearchResult; const AComparer: IComparer;\r\n AIndex, ACount: SizeInt): Boolean; override; overload;\r\n class function BinarySearch(const AValues: array of T; const AItem: T;\r\n out AFoundIndex: SizeInt; const AComparer: IComparer;\r\n AIndex, ACount: SizeInt): Boolean; override; overload;\r\n end;\r\n\r\n { TEnumerator }\r\n\r\n TEnumerator = class abstract\r\n protected\r\n function DoGetCurrent: T; virtual; abstract;\r\n function DoMoveNext: boolean; virtual; abstract;\r\n public\r\n property Current: T read DoGetCurrent;\r\n function MoveNext: boolean;\r\n end;\r\n\r\n { TEnumerable }\r\n\r\n TEnumerable = class abstract\r\n protected\r\n type\r\n TMyEnumerator = TEnumerator;\r\n function DoGetEnumerator: TMyEnumerator; virtual; abstract;\r\n public\r\n type\r\n TMyArray = TArray;\r\n function GetEnumerator: TMyEnumerator; inline;\r\n function ToArray: TMyArray; virtual;\r\n end;\r\n\r\n { TCustomList }\r\n\r\n TCustomList = class abstract(TEnumerable)\r\n private\r\n FOnNotify: TCollectionNotifyEvent;\r\n function GetCapacity: SizeInt; inline;\r\n protected\r\n type TMyArrayHelper = TArrayHelper;\r\n protected\r\n FLength: SizeInt;\r\n FItems: array of T;\r\n function PrepareAddingItem: SizeInt; virtual;\r\n function PrepareAddingRange(ACount: SizeInt): SizeInt; virtual;\r\n procedure Notify(const AValue: T; ACollectionNotification: TCollectionNotification); virtual;\r\n function DoRemove(AIndex: SizeInt; ACollectionNotification: TCollectionNotification): T; virtual;\r\n procedure SetCapacity(AValue: SizeInt); virtual; abstract;\r\n function GetCount: SizeInt; virtual;\r\n public\r\n property Count: SizeInt read GetCount;\r\n property Capacity: SizeInt read GetCapacity write SetCapacity;\r\n property OnNotify: TCollectionNotifyEvent read FOnNotify write FOnNotify;\r\n procedure TrimExcess; virtual; abstract;\r\n end;\r\n\r\n { TCustomListEnumerator }\r\n\r\n TCustomListEnumerator = class abstract(TEnumerator)\r\n private\r\n FList: TCustomList;\r\n FIndex: SizeInt;\r\n protected\r\n function DoMoveNext: boolean; override;\r\n function DoGetCurrent: T; override;\r\n function GetCurrent: T; virtual;\r\n public\r\n constructor Create(AList: TCustomList);\r\n end;\r\n\r\n { TCustomInvertedListEnumerator }\r\n\r\n TCustomInvertedListEnumerator = class abstract(TEnumerator)\r\n private\r\n FList: TCustomList;\r\n FIndex: SizeInt;\r\n protected\r\n function DoMoveNext: boolean; override;\r\n function DoGetCurrent: T; override;\r\n function GetCurrent: T; virtual;\r\n public\r\n constructor Create(AList: TCustomList);\r\n end;\r\n\r\n { TList }\r\n{$SCOPEDENUMS ON}\r\n TDirection = (FromBeginning,fromEnd);\r\n{$SCOPEDENUMS OFF}\r\n\r\n TList = class(TCustomList)\r\n private\r\n FComparer: IComparer;\r\n function SameValue(const Left, Right: T): Boolean;\r\n protected\r\n procedure SetCapacity(AValue: SizeInt); override;\r\n procedure SetCount(AValue: SizeInt);\r\n procedure InitializeList; virtual;\r\n procedure InternalInsert(AIndex: SizeInt; const AValue: T);\r\n function DoGetEnumerator: TEnumerator; override;\r\n private\r\n function GetItem(AIndex: SizeInt): T;\r\n procedure SetItem(AIndex: SizeInt; const AValue: T);\r\n public\r\n type\r\n TEnumerator = class(TCustomListEnumerator);\r\n TMyType = TList;\r\n function GetEnumerator: TEnumerator; reintroduce;\r\n public\r\n constructor Create; overload;\r\n constructor Create(const AComparer: IComparer); overload;\r\n constructor Create(ACollection: TEnumerable); overload;\r\n\r\n destructor Destroy; override;\r\n\r\n function Add(const AValue: T): SizeInt; virtual;\r\n procedure AddRange(const AValues: array of T); virtual; overload;\r\n procedure AddRange(const AEnumerable: IEnumerable); overload;\r\n procedure AddRange(AEnumerable: TEnumerable); overload;\r\n\r\n procedure Insert(AIndex: SizeInt; const AValue: T); virtual;\r\n procedure InsertRange(AIndex: SizeInt; const AValues: array of T); virtual; overload;\r\n procedure InsertRange(AIndex: SizeInt; const AEnumerable: IEnumerable); overload;\r\n procedure InsertRange(AIndex: SizeInt; const AEnumerable: TEnumerable); overload;\r\n\r\n function Remove(const AValue: T): SizeInt;\r\n function RemoveItem(const AValue: T; Direction : TDirection): SizeInt;\r\n procedure Delete(AIndex: SizeInt); inline;\r\n procedure DeleteRange(AIndex, ACount: SizeInt);\r\n function ExtractIndex(const AIndex: SizeInt): T; overload;\r\n function Extract(const AValue: T): T; overload;\r\n\r\n procedure Exchange(AIndex1, AIndex2: SizeInt); virtual;\r\n procedure Move(AIndex, ANewIndex: SizeInt); virtual;\r\n\r\n function First: T; inline;\r\n function Last: T; inline;\r\n\r\n procedure Clear;\r\n\r\n function Contains(const AValue: T): Boolean; inline;\r\n function IndexOf(const AValue: T): SizeInt; virtual;\r\n function LastIndexOf(const AValue: T): SizeInt; virtual;\r\n\r\n procedure Reverse;\r\n\r\n procedure TrimExcess; override;\r\n\r\n procedure Sort; overload;\r\n procedure Sort(const AComparer: IComparer); overload;\r\n function BinarySearch(const AItem: T; out AIndex: SizeInt): Boolean; overload;\r\n function BinarySearch(const AItem: T; out AIndex: SizeInt; const AComparer: IComparer): Boolean; overload;\r\n\r\n property Count: SizeInt read FLength write SetCount;\r\n property Items[Index: SizeInt]: T read GetItem write SetItem; default;\r\n end;\r\n\r\n\r\n TObjectList = class(TList)\r\n private\r\n FObjectsOwner: Boolean;\r\n protected\r\n procedure Notify(const aValue: T; Action: TCollectionNotification); override;\r\n public\r\n constructor Create(aOwnsObjects: Boolean = True); overload;\r\n constructor Create(const AComparer: IComparer; aOwnsObjects: Boolean = True); overload;\r\n constructor Create(const aCollection: TEnumerable; aOwnsObjects: Boolean = True); overload;\r\n property OwnsObjects: Boolean read FObjectsOwner write FObjectsOwner;\r\n end;\r\n\r\n { TThreadList }\r\n // This is provided for delphi/FPC compatibility\r\n // No locking is done, since Javascript is single-threaded. We do keep a lock count for debugging purposes.\r\n\r\n TThreadList = class\r\n private\r\n FList: TList;\r\n FLock: Integer;\r\n FDuplicates: TDuplicates;\r\n public\r\n constructor Create;\r\n destructor Destroy; override;\r\n procedure Add(const Item: T);\r\n procedure Clear;\r\n function LockList: TList;\r\n procedure Remove(const Item: T); inline;\r\n procedure RemoveItem(const Item: T; Direction: TDirection);\r\n procedure UnlockList; inline;\r\n property Duplicates: TDuplicates read FDuplicates write FDuplicates;\r\n end;\r\n\r\n { TQueue }\r\n\r\n TQueue = class(TCustomList)\r\n private\r\n FMaxGapLength: Integer;\r\n FLow: SizeInt;\r\n protected\r\n function DoGetEnumerator: TEnumerator; override;\r\n public\r\n type\r\n TMyType = TQueue;\r\n { TEnumerator }\r\n TEnumerator = class(TCustomListEnumerator)\r\n public\r\n constructor Create(AQueue: TMyType);\r\n end;\r\n function GetEnumerator: TEnumerator; reintroduce;\r\n protected\r\n Procedure Rebase; virtual;\r\n procedure SetCapacity(AValue: SizeInt); override;\r\n function DoRemove(AIndex: SizeInt; ACollectionNotification: TCollectionNotification): T; override;\r\n function GetCount: SizeInt; override;\r\n public\r\n Constructor Create; overload;\r\n constructor Create(ACollection: TEnumerable); overload;\r\n destructor Destroy; override;\r\n procedure Enqueue(const AValue: T);\r\n function Dequeue: T;\r\n function Extract: T;\r\n function Peek: T;\r\n procedure Clear;\r\n procedure TrimExcess; override;\r\n // Maximum gap (=amount of empty slots in array before first element)\r\n // before doing a rebase of the list. Defaults to 10.\r\n Property MaxGapLength : Integer Read FMaxGapLength Write FMaxGapLength;\r\n end;\r\n\r\n { TObjectQueue }\r\n\r\n TObjectQueue = class(TQueue)\r\n private\r\n FOwnsObjects: Boolean;\r\n protected\r\n procedure Notify(const Value: T; Action: TCollectionNotification); override;\r\n public\r\n constructor Create(AOwnsObjects: Boolean = True); overload;\r\n constructor Create(const Collection: TEnumerable; AOwnsObjects: Boolean = True); overload;\r\n procedure Dequeue; reintroduce; // Can't use the result, it might have been freed;\r\n property OwnsObjects: Boolean read FOwnsObjects write FOwnsObjects;\r\n end;\r\n\r\n { TStack }\r\n\r\n TStack = class(TCustomList)\r\n private\r\n protected\r\n function DoRemove(AIndex: SizeInt; ACollectionNotification: TCollectionNotification): T; override;\r\n procedure SetCapacity(AValue: SizeInt); override;\r\n function DoGetEnumerator: TEnumerator; override;\r\n public\r\n type\r\n TMyType = TStack;\r\n\r\n { TEnumerator }\r\n\r\n TEnumerator = class(TCustomListEnumerator)\r\n public\r\n constructor Create(AStack: TMyType);\r\n end;\r\n function GetEnumerator: TEnumerator; reintroduce;\r\n Public\r\n destructor Destroy; override;\r\n procedure Clear;\r\n procedure Push(const aValue: T);\r\n function Pop: T;\r\n function Peek: T;\r\n function Extract: T;\r\n procedure TrimExcess; override;\r\n property Count: SizeInt read GetCount;\r\n end;\r\n\r\n { TObjectStack }\r\n\r\n TObjectStack = class(TStack)\r\n private\r\n FOwnsObjects: Boolean;\r\n protected\r\n procedure Notify(const aValue: T; Action: TCollectionNotification); override;\r\n public\r\n constructor Create(AOwnsObjects: Boolean = True); overload;\r\n constructor Create(const Collection: TEnumerable; AOwnsObjects: Boolean = True); overload;\r\n procedure Pop; reintroduce; // Can't use the result, it might have been freed;\r\n property OwnsObjects: Boolean read FOwnsObjects write FOwnsObjects;\r\n end;\r\n\r\n\r\n { TPair }\r\n\r\n TPair = record\r\n Key: TKey;\r\n Value: TValue;\r\n constructor Create(const AKey: TKey; const AValue: TValue);\r\n end;\r\n\r\n // Hash table using linear probing\r\n\r\n { TDictionary }\r\n EDictionary = Class(Exception);\r\n\r\n TDictionary = class(TEnumerable>)\r\n private\r\n FMap: TJSMap;\r\n FComparer: IComparer;\r\n function GetEffectiveKey(Key : TKey) : TKey;\r\n function GetItem(const Key: TKey): TValue;\r\n procedure SetItem(const Key: TKey; const Value: TValue);\r\n procedure DoAdd(const Key: TKey; const Value: TValue);\r\n function DoRemove(const Key: TKey; Notification: TCollectionNotification): TValue;\r\n Function GetCount : Integer;\r\n protected\r\n Function CanClearMap : Boolean; virtual;\r\n function DoGetEnumerator: TEnumerator>; override;\r\n procedure PairNotify(const Key: TKey; Value : TValue; Action: TCollectionNotification); virtual;\r\n procedure KeyNotify(const Key: TKey; Action: TCollectionNotification); virtual;\r\n procedure ValueNotify(const Value: TValue; Action: TCollectionNotification); virtual;\r\n public\r\n Type\r\n TMyType = TDictionary;\r\n TMyPair = TPair;\r\n\r\n constructor Create(ACapacity: Integer=0); overload;\r\n constructor Create(const Collection: TEnumerable); overload;\r\n constructor Create(const AComparer: IComparer); overload;\r\n destructor Destroy; override;\r\n\r\n procedure Add(const Key: TKey; const Value: TValue);\r\n procedure Remove(const Key: TKey);\r\n function ExtractPair(const Key: TKey): TMyPair;\r\n procedure Clear;\r\n function TryGetValue(const Key: TKey; out Value: TValue): Boolean;\r\n procedure AddOrSetValue(const Key: TKey; const Value: TValue);\r\n function ContainsKey(const Key: TKey): Boolean;\r\n function ContainsValue(const Value: TValue): Boolean;\r\n function ToArray: TArray; override;\r\n\r\n property Items[const Key: TKey]: TValue read GetItem write SetItem; default;\r\n property Count: Integer read GetCount;\r\n\r\n type\r\n { TPairEnumerator }\r\n\r\n TPairEnumerator = class(TEnumerator)\r\n private\r\n FIter: TJSIterator;\r\n FVal : TJSIteratorValue;\r\n function GetCurrent: TMyPair;\r\n protected\r\n function DoGetCurrent: TMyPair; override;\r\n function DoMoveNext: Boolean; override;\r\n public\r\n constructor Create(const ADictionary: TMyType);\r\n function MoveNext: Boolean; reintroduce;\r\n property Current: TMyPair read GetCurrent;\r\n end;\r\n\r\n { TKeyEnumerator }\r\n\r\n TKeyEnumerator = class(TEnumerator)\r\n private\r\n FIter: TJSIterator;\r\n FVal : TJSIteratorValue;\r\n function GetCurrent: TKey;\r\n protected\r\n function DoGetCurrent: TKey; override;\r\n function DoMoveNext: Boolean; override;\r\n public\r\n constructor Create(const AIter: TJSIterator); overload;\r\n constructor Create(const ADictionary: TMyType); overload;\r\n function MoveNext: Boolean; reintroduce;\r\n property Current: TKey read GetCurrent;\r\n end;\r\n\r\n { TValueEnumerator }\r\n\r\n TValueEnumerator = class(TEnumerator)\r\n private\r\n FIter: TJSIterator;\r\n FVal : TJSIteratorValue;\r\n function GetCurrent: TValue;\r\n protected\r\n function DoGetCurrent: TValue; override;\r\n function DoMoveNext: Boolean; override;\r\n public\r\n constructor Create(const AIter: TJSIterator); overload;\r\n constructor Create(const ADictionary: TMyType); overload;\r\n function MoveNext: Boolean; reintroduce;\r\n property Current: TValue read GetCurrent;\r\n end;\r\n\r\n { TValueCollection }\r\n\r\n TValueCollection = class(TEnumerable)\r\n private\r\n FMap: TJSMap;\r\n function GetCount: Integer;\r\n protected\r\n function DoGetEnumerator: TEnumerator; override;\r\n public\r\n constructor Create(const ADictionary: TMyType);\r\n function GetEnumerator: TValueEnumerator; reintroduce;\r\n function ToArray: TArray; override;\r\n property Count: Integer read GetCount;\r\n end;\r\n\r\n { TKeyCollection }\r\n\r\n TKeyCollection = class(TEnumerable)\r\n private\r\n FMap: TJSMap;\r\n function GetCount: Integer;\r\n protected\r\n function DoGetEnumerator: TEnumerator; override;\r\n public\r\n constructor Create(const ADictionary: TMyType);\r\n function GetEnumerator: TKeyEnumerator; reintroduce;\r\n function ToArray: TArray; override;\r\n property Count: Integer read GetCount;\r\n end;\r\n\r\n private\r\n FOnKeyNotify: TCollectionNotifyEvent;\r\n FOnValueNotify: TCollectionNotifyEvent;\r\n FKeyCollection: TKeyCollection;\r\n FValueCollection: TValueCollection;\r\n function GetKeys: TKeyCollection;\r\n function GetValues: TValueCollection;\r\n public\r\n function GetEnumerator: TPairEnumerator; reintroduce;\r\n property Keys: TKeyCollection read GetKeys;\r\n property Values: TValueCollection read GetValues;\r\n property OnKeyNotify: TCollectionNotifyEvent read FOnKeyNotify write FOnKeyNotify;\r\n property OnValueNotify: TCollectionNotifyEvent read FOnValueNotify write FOnValueNotify;\r\n end;\r\n\r\n TDictionaryOwnership = (doOwnsKeys, doOwnsValues);\r\n TDictionaryOwnerships = set of TDictionaryOwnership;\r\n\r\n { TObjectDictionary }\r\n\r\n TObjectDictionary = class(TDictionary)\r\n private\r\n FOwnerships: TDictionaryOwnerships;\r\n protected\r\n Function CanClearMap : Boolean; override;\r\n procedure KeyNotify(const Key: TKey; Action: TCollectionNotification); override;\r\n procedure ValueNotify(const Value: TValue; Action: TCollectionNotification); override;\r\n public\r\n constructor Create(aOwnerships: TDictionaryOwnerships; ACapacity: Integer); overload;\r\n constructor Create(aOwnerships: TDictionaryOwnerships); overload;\r\n Property OwnerShips : TDictionaryOwnerships Read FOwnerships Write FOwnerShips;\r\n end;\r\n\r\nimplementation\r\n\r\n{ TCustomArrayHelper }\r\n\r\nclass procedure TCustomArrayHelper.Sort(var AValues: array of T;\r\n const AComparer: IComparer);\r\nbegin\r\n Sort(AValues, AComparer, Low(AValues), Length(AValues));\r\nend;\r\n\r\nclass procedure TCustomArrayHelper.Sort(var AValues: array of T;\r\n const AComparer: IComparer; AIndex, ACount: SizeInt);\r\nbegin\r\n if ACount <= 1 then\r\n Exit;\r\n QuickSort(AValues, AIndex, Pred(AIndex + ACount), AComparer);\r\nend;\r\n\r\nclass function TCustomArrayHelper.BinarySearch(const AValues: array of T;\r\n const AItem: T; out AFoundIndex: SizeInt; const AComparer: IComparer\r\n ): Boolean;\r\nbegin\r\n Result := BinarySearch(AValues, AItem, AFoundIndex, AComparer,\r\n 0, Length(AValues));\r\nend;\r\n\r\nclass function TCustomArrayHelper.BinarySearch(const AValues: array of T;\r\n const AItem: T; out ASearchResult: TBinarySearchResult;\r\n const AComparer: IComparer): Boolean;\r\nbegin\r\n Result := BinarySearch(AValues, AItem, ASearchResult, AComparer,\r\n 0, Length(AValues));\r\nend;\r\n\r\n{ TArrayHelper }\r\n\r\nclass procedure TArrayHelper.QuickSort(var AValues: array of T; ALeft,\r\n ARight: SizeInt; const AComparer: IComparer);\r\nvar\r\n I, J: SizeInt;\r\n P, Q: T;\r\nbegin\r\n if ((ARight - ALeft) <= 0) or (Length(AValues) = 0) then\r\n Exit;\r\n repeat\r\n I := ALeft;\r\n J := ARight;\r\n P := AValues[ALeft + (ARight - ALeft) shr 1];\r\n repeat\r\n while AComparer.Compare(AValues[I], P) < 0 do\r\n Inc(I);\r\n while AComparer.Compare(AValues[J], P) > 0 do\r\n Dec(J);\r\n if I <= J then\r\n begin\r\n if I <> J then\r\n begin\r\n Q := AValues[I];\r\n AValues[I] := AValues[J];\r\n AValues[J] := Q;\r\n end;\r\n Inc(I);\r\n Dec(J);\r\n end;\r\n until I > J;\r\n // sort the smaller range recursively\r\n // sort the bigger range via the loop\r\n // Reasons: memory usage is O(log(n)) instead of O(n) and loop is faster than recursion\r\n if J - ALeft < ARight - I then\r\n begin\r\n if ALeft < J then\r\n QuickSort(AValues, ALeft, J, AComparer);\r\n ALeft := I;\r\n end\r\n else\r\n begin\r\n if I < ARight then\r\n QuickSort(AValues, I, ARight, AComparer);\r\n ARight := J;\r\n end;\r\n until ALeft >= ARight;\r\nend;\r\n\r\nclass function TArrayHelper.BinarySearch(const AValues: array of T;\r\n const AItem: T; out ASearchResult: TBinarySearchResult;\r\n const AComparer: IComparer; AIndex, ACount: SizeInt): Boolean;\r\nvar\r\n imin, imax, imid, ilo: Int32;\r\n\r\nbegin\r\n // Writeln('Enter ',Length(aValues),' Idx ',aIndex,' acount: ',aCount);\r\n // continually narrow search until just one element remains\r\n imin := AIndex;\r\n imax := Pred(AIndex + ACount);\r\n // Writeln('Start Imax, imin : ',Imax, ' - ', imin);\r\n ilo:=imid * imid;\r\n imid:=ilo*imid;\r\n while (imin < imax) do\r\n begin\r\n imid := (imax+imin) div 2;\r\n // writeln('imid',imid);\r\n\r\n ASearchResult.CompareResult := AComparer.Compare(AValues[imid], AItem);\r\n // reduce the search\r\n if (ASearchResult.CompareResult < 0) then\r\n imin := imid + 1\r\n else\r\n begin\r\n if ASearchResult.CompareResult = 0 then\r\n begin\r\n ASearchResult.FoundIndex := imid;\r\n ASearchResult.CandidateIndex := imid;\r\n Exit(True);\r\n end;\r\n imax := imid;\r\n end;\r\n end;\r\n // At exit of while:\r\n // if A[] is empty, then imax < imin\r\n // otherwise imax == imin\r\n\r\n // deferred test for equality\r\n // Writeln('End Imax, imin : ',Imax, ' - ', imin);\r\n Result:=(imax = imin);\r\n if Result then\r\n begin\r\n ASearchResult.CompareResult := AComparer.Compare(AValues[imin], AItem);\r\n ASearchResult.CandidateIndex := imin;\r\n Result:=(ASearchResult.CompareResult = 0);\r\n if Result then\r\n ASearchResult.FoundIndex := imin\r\n else\r\n ASearchResult.FoundIndex := -1;\r\n end\r\n else\r\n begin\r\n ASearchResult.CompareResult := 0;\r\n ASearchResult.FoundIndex := -1;\r\n ASearchResult.CandidateIndex := -1;\r\n end;\r\nend;\r\n\r\nclass function TArrayHelper.BinarySearch(const AValues: array of T;\r\n const AItem: T; out AFoundIndex: SizeInt; const AComparer: IComparer;\r\n AIndex, ACount: SizeInt): Boolean;\r\nvar\r\n imin, imax, imid: Int32;\r\n LCompare: SizeInt;\r\nbegin\r\n // continually narrow search until just one element remains\r\n imin := AIndex;\r\n imax := Pred(AIndex + ACount);\r\n\r\n // http://en.wikipedia.org/wiki/Binary_search_algorithm\r\n while (imin < imax) do\r\n begin\r\n imid := (imin + imax) div 2;\r\n\r\n // code must guarantee the interval is reduced at each iteration\r\n // assert(imid < imax);\r\n // note: 0 <= imin < imax implies imid will always be less than imax\r\n\r\n LCompare := AComparer.Compare(AValues[imid], AItem);\r\n // reduce the search\r\n if (LCompare < 0) then\r\n imin := imid + 1\r\n else\r\n begin\r\n if LCompare = 0 then\r\n begin\r\n AFoundIndex := imid;\r\n Exit(True);\r\n end;\r\n imax := imid;\r\n end;\r\n end;\r\n // At exit of while:\r\n // if A[] is empty, then imax < imin\r\n // otherwise imax == imin\r\n\r\n // deferred test for equality\r\n LCompare := AComparer.Compare(AValues[imin], AItem);\r\n Result:=(imax = imin) and (LCompare = 0);\r\n if Result then\r\n AFoundIndex := imin\r\n else\r\n AFoundIndex := -1;\r\nend;\r\n\r\n{ TEnumerator }\r\n\r\nfunction TEnumerator.MoveNext: boolean;\r\nbegin\r\n Result:=DoMoveNext;\r\nend;\r\n\r\n{ TEnumerable }\r\n\r\nfunction TEnumerable.GetEnumerator: TMyEnumerator;\r\nbegin\r\n Result:=DoGetEnumerator;\r\nend;\r\n\r\nfunction TEnumerable.ToArray: TMyArray;\r\nvar\r\n LEnumerator: TMyEnumerator;\r\nbegin\r\n Result:=[];\r\n LEnumerator := GetEnumerator;\r\n try\r\n while LEnumerator.MoveNext do\r\n TJSArray(Result).push(LEnumerator.Current);\r\n finally\r\n LEnumerator.Free;\r\n end;\r\nend;\r\n\r\n{ TCustomList }\r\n\r\nfunction TCustomList.GetCapacity: SizeInt;\r\nbegin\r\n Result:=length(FItems);\r\nend;\r\n\r\nfunction TCustomList.PrepareAddingItem: SizeInt;\r\nbegin\r\n if FLength=length(FItems) then\r\n TJSArray(FItems).push(Default(T));\r\n\r\n Result := FLength;\r\n Inc(FLength);\r\nend;\r\n\r\nfunction TCustomList.PrepareAddingRange(ACount: SizeInt): SizeInt;\r\nvar\r\n l: SizeInt;\r\nbegin\r\n if ACount < 0 then\r\n raise EArgumentOutOfRangeException.Create(SArgumentOutOfRange);\r\n if ACount = 0 then\r\n Exit(FLength - 1);\r\n\r\n for l:=length(FItems)+1 to FLength+ACount do\r\n TJSArray(FItems).push(Default(T));\r\n\r\n Result := FLength;\r\n Inc(FLength, ACount);\r\nend;\r\n\r\nprocedure TCustomList.Notify(const AValue: T;\r\n ACollectionNotification: TCollectionNotification);\r\nbegin\r\n if Assigned(FOnNotify) then\r\n FOnNotify(Self, AValue, ACollectionNotification);\r\nend;\r\n\r\nfunction TCustomList.DoRemove(AIndex: SizeInt;\r\n ACollectionNotification: TCollectionNotification): T;\r\nbegin\r\n if (AIndex < 0) or (AIndex >= FLength) then\r\n raise EArgumentOutOfRangeException.Create(SArgumentOutOfRange);\r\n\r\n Result := FItems[AIndex];\r\n Dec(FLength);\r\n\r\n FItems[AIndex] := Default(T); // needed for refcounted types\r\n TJSArray(FItems).splice(AIndex,1);\r\n\r\n Notify(Result, ACollectionNotification);\r\nend;\r\n\r\nfunction TCustomList.GetCount: SizeInt;\r\nbegin\r\n Result := FLength;\r\nend;\r\n\r\n\r\n{ TCustomListEnumerator }\r\n\r\nfunction TCustomListEnumerator.DoMoveNext: boolean;\r\nbegin\r\n Inc(FIndex);\r\n Result := (FList.FLength > 0) and (FIndex < FList.FLength)\r\nend;\r\n\r\nfunction TCustomListEnumerator.DoGetCurrent: T;\r\nbegin\r\n Result := GetCurrent;\r\nend;\r\n\r\nfunction TCustomListEnumerator.GetCurrent: T;\r\nbegin\r\n Result := FList.FItems[FIndex];\r\nend;\r\n\r\nconstructor TCustomListEnumerator.Create(AList: TCustomList);\r\nbegin\r\n inherited Create;\r\n FIndex := -1;\r\n FList := AList;\r\nend;\r\n\r\n{ TList }\r\n\r\nfunction TList.SameValue(const Left, Right: T): Boolean;\r\nbegin\r\n if Assigned(FComparer) then\r\n Result:=(FComparer.Compare(Left, Right) = 0)\r\n else\r\n Result:=(Left = Right);\r\nend;\r\n\r\nprocedure TList.SetCapacity(AValue: SizeInt);\r\nbegin\r\n if AValue < Count then\r\n Count := AValue;\r\n SetLength(FItems, AValue);\r\nend;\r\n\r\nprocedure TList.SetCount(AValue: SizeInt);\r\nbegin\r\n if AValue < 0 then\r\n raise EArgumentOutOfRangeException.Create(SArgumentOutOfRange);\r\n\r\n if AValue > Capacity then\r\n Capacity := AValue\r\n else if AValue < Count then\r\n DeleteRange(AValue, Count - AValue);\r\n\r\n FLength := AValue;\r\nend;\r\n\r\nprocedure TList.InitializeList;\r\nbegin\r\nend;\r\n\r\nprocedure TList.InternalInsert(AIndex: SizeInt; const AValue: T);\r\nbegin\r\n if (AIndex < 0) or (AIndex > Count) then\r\n raise EArgumentOutOfRangeException.Create(SArgumentOutOfRange);\r\n TJSArray(FItems).splice(AIndex,0,AValue);\r\n inc(FLength);\r\n\r\n FItems[AIndex] := AValue;\r\n Notify(AValue, cnAdded);\r\nend;\r\n\r\nfunction TList.DoGetEnumerator: TEnumerator;\r\nbegin\r\n Result := GetEnumerator;\r\nend;\r\n\r\nfunction TList.GetItem(AIndex: SizeInt): T;\r\nbegin\r\n if (AIndex < 0) or (AIndex >= Count) then\r\n raise EArgumentOutOfRangeException.Create(SArgumentOutOfRange);\r\n\r\n Result := FItems[AIndex];\r\nend;\r\n\r\nprocedure TList.SetItem(AIndex: SizeInt; const AValue: T);\r\nbegin\r\n if (AIndex < 0) or (AIndex >= Count) then\r\n raise EArgumentOutOfRangeException.Create(SArgumentOutOfRange);\r\n Notify(FItems[AIndex], cnRemoved);\r\n FItems[AIndex] := AValue;\r\n Notify(AValue, cnAdded);\r\nend;\r\n\r\nfunction TList.GetEnumerator: TEnumerator;\r\nbegin\r\n Result := TEnumerator.Create(Self);\r\nend;\r\n\r\nconstructor TList.Create;\r\nbegin\r\n InitializeList;\r\nend;\r\n\r\nconstructor TList.Create(const AComparer: IComparer);\r\nbegin\r\n InitializeList;\r\n FComparer := AComparer;\r\nend;\r\n\r\nconstructor TList.Create(ACollection: TEnumerable);\r\nvar\r\n LItem: T;\r\nbegin\r\n Create;\r\n for LItem in ACollection do\r\n Add(LItem);\r\nend;\r\n\r\ndestructor TList.Destroy;\r\nbegin\r\n SetCapacity(0);\r\nend;\r\n\r\nfunction TList.Add(const AValue: T): SizeInt;\r\nbegin\r\n Result := PrepareAddingItem;\r\n FItems[Result] := AValue;\r\n Notify(AValue, cnAdded);\r\nend;\r\n\r\nprocedure TList.AddRange(const AValues: array of T);\r\nbegin\r\n InsertRange(Count, AValues);\r\nend;\r\n\r\nprocedure TList.AddRange(const AEnumerable: IEnumerable);\r\nvar\r\n LValue: T;\r\nbegin\r\n for LValue in AEnumerable do\r\n Add(LValue);\r\nend;\r\n\r\nprocedure TList.AddRange(AEnumerable: TEnumerable);\r\nvar\r\n LValue: T;\r\nbegin\r\n for LValue in AEnumerable do\r\n Add(LValue);\r\nend;\r\n\r\nprocedure TList.Insert(AIndex: SizeInt; const AValue: T);\r\nbegin\r\n if (AIndex < 0) or (AIndex > Count) then\r\n raise EArgumentOutOfRangeException.Create(SArgumentOutOfRange);\r\n\r\n InternalInsert(AIndex, AValue);\r\nend;\r\n\r\nprocedure TList.InsertRange(AIndex: SizeInt; const AValues: array of T);\r\nvar\r\n LLength, i: sizeint;\r\n LValue: T;\r\nbegin\r\n if (AIndex < 0) or (AIndex > Count) then\r\n raise EArgumentOutOfRangeException.Create(SArgumentOutOfRange);\r\n\r\n LLength := Length(AValues);\r\n if LLength = 0 then\r\n Exit;\r\n\r\n if AIndex <> PrepareAddingRange(LLength) then\r\n begin\r\n for i := AIndex to Count - LLength -1 do\r\n FItems[i+LLength] := FItems[i];\r\n for i := 0 to LLength -1 do\r\n FItems[AIndex+i] := Default(T);\r\n end;\r\n\r\n for i := 0 to Pred(LLength) do\r\n begin\r\n LValue:=AValues[i];\r\n FItems[i+AIndex] := LValue;\r\n Notify(LValue, cnAdded);\r\n end;\r\nend;\r\n\r\nprocedure TList.InsertRange(AIndex: SizeInt; const AEnumerable: IEnumerable);\r\nvar\r\n LValue: T;\r\n i: SizeInt;\r\nbegin\r\n if (AIndex < 0) or (AIndex > Count) then\r\n raise EArgumentOutOfRangeException.Create(SArgumentOutOfRange);\r\n\r\n i := 0;\r\n for LValue in AEnumerable do\r\n begin\r\n InternalInsert(AIndex + i, LValue);\r\n Inc(i);\r\n end;\r\nend;\r\n\r\nprocedure TList.InsertRange(AIndex: SizeInt; const AEnumerable: TEnumerable);\r\nvar\r\n LValue: T;\r\n i: SizeInt;\r\nbegin\r\n if (AIndex < 0) or (AIndex > Count) then\r\n raise EArgumentOutOfRangeException.Create(SArgumentOutOfRange);\r\n\r\n i := 0;\r\n for LValue in AEnumerable do\r\n begin\r\n InternalInsert(Aindex + i, LValue);\r\n Inc(i);\r\n end;\r\nend;\r\n\r\nfunction TList.RemoveItem(const AValue: T; Direction : TDirection): SizeInt;\r\n\r\nbegin\r\n if Direction=TDirection.FromEnd then\r\n Result := LastIndexOf(AValue)\r\n else\r\n Result := IndexOf(AValue);\r\n if Result >= 0 then\r\n DoRemove(Result, cnRemoved);\r\nend;\r\n\r\nfunction TList.Remove(const AValue: T): SizeInt;\r\nbegin\r\n Result := IndexOf(AValue);\r\n if Result >= 0 then\r\n DoRemove(Result, cnRemoved);\r\nend;\r\n\r\nprocedure TList.Delete(AIndex: SizeInt);\r\nbegin\r\n DoRemove(AIndex, cnRemoved);\r\nend;\r\n\r\nprocedure TList.DeleteRange(AIndex, ACount: SizeInt);\r\nvar\r\n LDeleted: TMyArray;\r\n i: SizeInt;\r\nbegin\r\n if ACount = 0 then\r\n Exit;\r\n\r\n if (ACount < 0) or (AIndex < 0) or (AIndex + ACount > Count) then\r\n raise EArgumentOutOfRangeException.Create(SArgumentOutOfRange);\r\n\r\n LDeleted:=TMyArray(TJSArray(FItems).splice(AIndex,Count));\r\n Dec(FLength, ACount);\r\n\r\n for i := 0 to High(LDeleted) do\r\n Notify(LDeleted[i], cnRemoved);\r\nend;\r\n\r\nfunction TList.ExtractIndex(const AIndex: SizeInt): T;\r\nbegin\r\n Result := DoRemove(AIndex, cnExtracted);\r\nend;\r\n\r\nfunction TList.Extract(const AValue: T): T;\r\nvar\r\n LIndex: SizeInt;\r\nbegin\r\n LIndex := IndexOf(AValue);\r\n if LIndex < 0 then\r\n Result:=Default(T)\r\n else\r\n Result := DoRemove(LIndex, cnExtracted);\r\nend;\r\n\r\nprocedure TList.Exchange(AIndex1, AIndex2: SizeInt);\r\nvar\r\n LTemp: T;\r\nbegin\r\n LTemp := FItems[AIndex1];\r\n FItems[AIndex1] := FItems[AIndex2];\r\n FItems[AIndex2] := LTemp;\r\nend;\r\n\r\nprocedure TList.Move(AIndex, ANewIndex: SizeInt);\r\nvar\r\n Arr: TJSArray;\r\n LTemp: JSValue;\r\n i: SizeInt;\r\nbegin\r\n if ANewIndex = AIndex then\r\n Exit;\r\n\r\n if (ANewIndex < 0) or (ANewIndex >= Count) then\r\n raise EArgumentOutOfRangeException.Create(SArgumentOutOfRange);\r\n\r\n Arr := TJSArray(FItems);\r\n LTemp := Arr[AIndex];\r\n if AIndex < ANewIndex then\r\n for i := AIndex to ANewIndex-1 do\r\n Arr[i] := Arr[i+1]\r\n else\r\n for i := AIndex downto ANewIndex+1 do\r\n Arr[i] := Arr[i-1];\r\n Arr[ANewIndex] := LTemp;\r\nend;\r\n\r\nfunction TList.First: T;\r\nbegin\r\n Result := Items[0];\r\nend;\r\n\r\nfunction TList.Last: T;\r\nbegin\r\n Result := Items[Pred(Count)];\r\nend;\r\n\r\nprocedure TList.Clear;\r\nbegin\r\n SetCount(0);\r\n SetCapacity(0);\r\nend;\r\n\r\nfunction TList.Contains(const AValue: T): Boolean;\r\nbegin\r\n Result := IndexOf(AValue) >= 0;\r\nend;\r\n\r\nfunction TList.IndexOf(const AValue: T): SizeInt;\r\nvar\r\n i: SizeInt;\r\nbegin\r\n for i := 0 to Count - 1 do\r\n if SameValue(AValue, FItems[i]) then\r\n Exit(i);\r\n Result:=-1;\r\nend;\r\n\r\nfunction TList.LastIndexOf(const AValue: T): SizeInt;\r\nvar\r\n i: SizeInt;\r\nbegin\r\n for i := Count - 1 downto 0 do\r\n if SameValue(AValue, FItems[i]) then\r\n Exit(i);\r\n Result:=-1;\r\nend;\r\n\r\nprocedure TList.Reverse;\r\nvar\r\n a, b: SizeInt;\r\n LTemp: T;\r\nbegin\r\n a := 0;\r\n b := Count - 1;\r\n while a < b do\r\n begin\r\n LTemp := FItems[a];\r\n FItems[a] := FItems[b];\r\n FItems[b] := LTemp;\r\n Inc(a);\r\n Dec(b);\r\n end;\r\nend;\r\n\r\nprocedure TList.TrimExcess;\r\nbegin\r\n SetCapacity(Count);\r\nend;\r\n\r\nprocedure TList.Sort;\r\nbegin\r\n TMyArrayHelper.Sort(FItems, FComparer, 0, Count);\r\nend;\r\n\r\nprocedure TList.Sort(const AComparer: IComparer);\r\nbegin\r\n TMyArrayHelper.Sort(FItems, AComparer, 0, Count);\r\nend;\r\n\r\nfunction TList.BinarySearch(const AItem: T; out AIndex: SizeInt): Boolean;\r\nbegin\r\n Result := TMyArrayHelper.BinarySearch(FItems, AItem, AIndex, FComparer, 0, Count);\r\nend;\r\n\r\nfunction TList.BinarySearch(const AItem: T; out AIndex: SizeInt;\r\n const AComparer: IComparer): Boolean;\r\nbegin\r\n Result := TMyArrayHelper.BinarySearch(FItems, AItem, AIndex, AComparer, 0, Count);\r\nend;\r\n\r\n{ TPair }\r\n\r\nconstructor TPair.Create(const AKey: TKey; const AValue: TValue);\r\nbegin\r\n Key:=aKey;\r\n Value:=aValue;\r\nend;\r\n\r\n{ TDictionary }\r\n\r\nResourceString\r\n SErrDictKeyNotFound = 'Key value not found';\r\n SErrDictDuplicateKey = 'Duplicate key value';\r\n\r\nfunction TDictionary.GetEffectiveKey(Key: TKey): TKey;\r\n\r\nVar\r\n it : TJSIterator;\r\n v : TJSIteratorValue;\r\n\r\nbegin\r\n if Not assigned(FComparer) then\r\n Exit(key);\r\n it:=FMap.Keys;\r\n v:=it.next;\r\n While not v.Done do\r\n begin\r\n Result:=TKey(v.Value);\r\n if FComparer.Compare(Result,Key)=0 then\r\n exit;\r\n v:=it.Next;\r\n end;\r\n Result:=Key;\r\nend;\r\n\r\nfunction TDictionary.GetItem(const Key: TKey): TValue;\r\n\r\nVar\r\n V : JSValue;\r\n\r\nbegin\r\n v:=FMap.Get(GetEffectiveKey(Key));\r\n if isUndefined(v) then\r\n Raise EDictionary.Create(SErrDictKeyNotFound);\r\n Result:=TValue(V);\r\nend;\r\n\r\nprocedure TDictionary.SetItem(const Key: TKey; const Value: TValue);\r\n\r\nVar\r\n V : JSValue;\r\n\r\nbegin\r\n v:=FMap.Get(GetEffectiveKey(Key));\r\n if Not isUndefined(v) then\r\n ValueNotify(TValue(V),cnRemoved);\r\n FMap.&Set(Key,Value);\r\n ValueNotify(Value, cnAdded);\r\nend;\r\n\r\nprocedure TDictionary.DoAdd(const Key: TKey; const Value: TValue);\r\nbegin\r\n FMap.&Set(GetEffectiveKey(Key),Value);\r\n KeyNotify(Key,cnAdded);\r\n ValueNotify(Value,cnAdded);\r\nend;\r\n\r\n\r\nfunction TDictionary.DoRemove(const Key: TKey; Notification: TCollectionNotification): TValue;\r\nVar\r\n V : JSValue;\r\n K : TKey;\r\n\r\nbegin\r\n K:=GetEffectiveKey(Key);\r\n V:=FMap.Get(k);\r\n if Not isUndefined(v) then\r\n begin\r\n FMap.Delete(k);\r\n Result:=TValue(v);\r\n KeyNotify(Key,Notification);\r\n ValueNotify(Result,Notification);\r\n end;\r\nend;\r\n\r\nfunction TDictionary.GetCount: Integer;\r\nbegin\r\n Result:=FMap.Size;\r\nend;\r\n\r\nfunction TDictionary.DoGetEnumerator: TEnumerator>;\r\nbegin\r\n Result:=TPairEnumerator.Create(Self);\r\nend;\r\n\r\nprocedure TDictionary.PairNotify(const Key: TKey; Value : TValue; Action: TCollectionNotification);\r\n\r\nbegin\r\n KeyNotify(Key,action);\r\n ValueNotify(Value,action);\r\nend;\r\n\r\nprocedure TDictionary.KeyNotify(const Key: TKey; Action: TCollectionNotification);\r\nbegin\r\n if Assigned(FOnKeyNotify) then\r\n FOnKeyNotify(Self,Key,Action);\r\nend;\r\n\r\nprocedure TDictionary.ValueNotify(const Value: TValue; Action: TCollectionNotification);\r\nbegin\r\n if Assigned(FOnValueNotify) then\r\n FOnValueNotify(Self,Value,Action);\r\nend;\r\n\r\nconstructor TDictionary.Create(ACapacity: Integer = 0);\r\nbegin\r\n FMap:=TJSMap.New;\r\n if ACapacity>0 then ; // ToDo\r\nend;\r\n\r\nconstructor TDictionary.Create(const Collection: TEnumerable);\r\n\r\nVar\r\n aPair : TMyPair;\r\n\r\nbegin\r\n Create(0);\r\n For aPair in Collection do\r\n Add(aPair.Key,aPair.Value);\r\nend;\r\n\r\nconstructor TDictionary.Create(const AComparer: IComparer);\r\nbegin\r\n Create(0);\r\n FComparer:=aComparer;\r\nend;\r\n\r\ndestructor TDictionary.Destroy;\r\nbegin\r\n FreeAndNil(FKeyCollection);\r\n FreeAndNil(FValueCollection);\r\n Clear;\r\n FMap:=Nil;\r\n inherited Destroy;\r\nend;\r\n\r\nprocedure TDictionary.Add(const Key: TKey; const Value: TValue);\r\nbegin\r\n if FMap.Has(GetEffectiveKey(Key)) then\r\n Raise EDictionary.Create(SErrDictDuplicateKey);\r\n DoAdd(Key,Value);\r\nend;\r\n\r\nprocedure TDictionary.Remove(const Key: TKey);\r\nbegin\r\n doRemove(Key,cnRemoved);\r\nend;\r\n\r\nfunction TDictionary.ExtractPair(const Key: TKey): TMyPair;\r\n\r\nVar\r\n K : TKey;\r\n\r\nbegin\r\n Result:=Default(TMyPair);\r\n K:=GetEffectiveKey(Key);\r\n if FMap.Has(K) then\r\n begin\r\n Result.Create(Key,TValue(FMap.get(K)));\r\n FMap.Delete(k);\r\n end\r\n else\r\n Result.Create(Key,Default(TValue));\r\nend;\r\n\r\nfunction TDictionary.CanClearMap: Boolean;\r\n\r\nbegin\r\n Result:=(FOnKeyNotify=Nil) and (FOnValueNotify=Nil);\r\nend;\r\n\r\nprocedure TDictionary.Clear;\r\n\r\nVar\r\n Iter : TJSIterator;\r\n IVal : TJSIteratorValue;\r\n A : TJSValueDynArray;\r\n K : TKey;\r\n V : TValue;\r\n\r\nbegin\r\n if CanClearMap then\r\n Fmap.Clear\r\n else\r\n begin\r\n Iter:=FMap.Entries;\r\n Repeat\r\n IVal:=Iter.next;\r\n if not ival.Done then\r\n begin\r\n A:=TJSValueDynArray(IVal.Value);\r\n K:=TKey(A[0]);\r\n V:=TValue(A[1]);\r\n FMap.delete(k);\r\n PairNotify(K,V,cnRemoved);\r\n end;\r\n Until Ival.Done;\r\n end;\r\nend;\r\n\r\n\r\nfunction TDictionary.TryGetValue(const Key: TKey; out Value: TValue): Boolean;\r\n\r\nVar\r\n K : TKey;\r\nbegin\r\n K:=GetEffectiveKey(Key);\r\n Result:=FMap.Has(K);\r\n If Result then\r\n Value:=TValue(FMap.get(K));\r\nend;\r\n\r\n\r\nprocedure TDictionary.AddOrSetValue(const Key: TKey; const Value: TValue);\r\n\r\nVar\r\n k : TKey;\r\n\r\nbegin\r\n K:=GetEffectiveKey(Key);\r\n if Not FMap.Has(k) then\r\n DoAdd(Key,Value)\r\n else\r\n SetItem(K,Value);\r\nend;\r\n\r\nfunction TDictionary.ContainsKey(const Key: TKey): Boolean;\r\nbegin\r\n Result:=FMap.Has(GetEffectiveKey(Key));\r\nend;\r\n\r\nfunction TDictionary.ContainsValue(const Value: TValue): Boolean;\r\n\r\nVar\r\n It : TJSIterator;\r\n Res : TJSIteratorValue;\r\n\r\nbegin\r\n Result:=False;\r\n It:=FMap.Values;\r\n Repeat\r\n Res:=It.next;\r\n if not Res.done then\r\n Result:=(Value=TValue(Res.value));\r\n Until (Result or Res.done);\r\nend;\r\n\r\nfunction TDictionary.ToArray: TArray;\r\nbegin\r\n Result:=inherited ToArray;\r\nend;\r\n\r\nfunction TDictionary.GetKeys: TKeyCollection;\r\nbegin\r\n if FKeyCollection=Nil then\r\n FKeyCollection:=TKeyCollection.Create(Self);\r\n Result:=FKeyCollection;\r\nend;\r\n\r\nfunction TDictionary.GetValues: TValueCollection;\r\nbegin\r\n if FValueCollection=Nil then\r\n FValueCollection:=TValueCollection.Create(Self);\r\n Result:=FValueCollection;\r\nend;\r\n\r\nfunction TDictionary.GetEnumerator: TPairEnumerator;\r\nbegin\r\n Result:=TPairEnumerator.Create(Self);\r\nend;\r\n\r\n{ TDictionary.TPairEnumerator }\r\n\r\nfunction TDictionary.TPairEnumerator.GetCurrent: TMyPair;\r\nbegin\r\n Result:=DoGetCurrent();\r\nend;\r\n\r\nfunction TDictionary.TPairEnumerator.DoGetCurrent: TMyPair;\r\n\r\nVar\r\n A : TJSValueDynArray;\r\n\r\nbegin\r\n A:=TJSValueDynArray(FVal.Value);\r\n Result:=Default(TMyPair);\r\n Result.Create(TKey(A[0]),TValue(A[1]));\r\nend;\r\n\r\nfunction TDictionary.TPairEnumerator.DoMoveNext: Boolean;\r\nbegin\r\n FVal:=FIter.Next;\r\n Result:=Not FVal.Done;\r\nend;\r\n\r\nconstructor TDictionary.TPairEnumerator.Create(const ADictionary: TMyType);\r\nbegin\r\n FIter:=ADictionary.FMap.Entries;\r\nend;\r\n\r\nfunction TDictionary.TPairEnumerator.MoveNext: Boolean;\r\nbegin\r\n Result:=DoMoveNext;\r\nend;\r\n\r\n{ TDictionary.TKeyEnumerator }\r\n\r\nfunction TDictionary.TKeyEnumerator.GetCurrent: TKey;\r\nbegin\r\n Result:=DoGetCurrent();\r\nend;\r\n\r\nfunction TDictionary.TKeyEnumerator.DoGetCurrent: TKey;\r\nbegin\r\n Result:=TKey(FVal.Value);\r\nend;\r\n\r\nfunction TDictionary.TKeyEnumerator.DoMoveNext: Boolean;\r\nbegin\r\n FVal:=FIter.Next;\r\n Result:=Not FVal.Done;\r\nend;\r\n\r\nconstructor TDictionary.TKeyEnumerator.Create(const ADictionary: TMyType);\r\nbegin\r\n Create(ADictionary.FMap.Keys);\r\nend;\r\n\r\nconstructor TDictionary.TKeyEnumerator.Create(const AIter : TJSIterator);\r\nbegin\r\n FIter:=aIter;\r\nend;\r\n\r\nfunction TDictionary.TKeyEnumerator.MoveNext: Boolean;\r\nbegin\r\n Result:=DoMoveNext;\r\nend;\r\n\r\n{ TDictionary.TValueEnumerator }\r\n\r\nfunction TDictionary.TValueEnumerator.GetCurrent: TValue;\r\nbegin\r\n Result:=DoGetCurrent();\r\nend;\r\n\r\nfunction TDictionary.TValueEnumerator.DoGetCurrent: TValue;\r\nbegin\r\n Result:=TValue(FVal.Value);\r\nend;\r\n\r\nfunction TDictionary.TValueEnumerator.DoMoveNext: Boolean;\r\nbegin\r\n FVal:=FIter.Next;\r\n Result:=Not FVal.Done;\r\nend;\r\n\r\nconstructor TDictionary.TValueEnumerator.Create(const ADictionary: TMyType);\r\nbegin\r\n Create(aDictionary.FMap.Values);\r\nend;\r\n\r\nconstructor TDictionary.TValueEnumerator.Create(const AIter: TJSIterator);\r\nbegin\r\n FIter:=AIter;\r\nend;\r\n\r\nfunction TDictionary.TValueEnumerator.MoveNext: Boolean;\r\nbegin\r\n Result:=DoMoveNext;\r\nend;\r\n\r\n{ TDictionary.TValueCollection }\r\n\r\nfunction TDictionary.TValueCollection.GetCount: Integer;\r\nbegin\r\n Result:=FMap.Size;\r\nend;\r\n\r\nfunction TDictionary.TValueCollection.DoGetEnumerator: TEnumerator;\r\nbegin\r\n Result:=TValueEnumerator.Create(FMap.Values);\r\nend;\r\n\r\nconstructor TDictionary.TValueCollection.Create(const ADictionary: TMyType);\r\nbegin\r\n FMap:=ADictionary.FMap;\r\nend;\r\n\r\nfunction TDictionary.TValueCollection.GetEnumerator: TValueEnumerator;\r\nbegin\r\n Result:=TValueEnumerator(DoGetEnumerator);\r\nend;\r\n\r\nfunction TDictionary.TValueCollection.ToArray: TArray;\r\n\r\nVar\r\n I : Integer;\r\n P : TValue;\r\n\r\nbegin\r\n SetLength(Result,FMap.Size);\r\n For P in Self do\r\n begin\r\n Result[i]:=P;\r\n Inc(I);\r\n End;\r\nend;\r\n\r\n{ TDictionary.TKeyCollection }\r\n\r\nfunction TDictionary.TKeyCollection.GetCount: Integer;\r\nbegin\r\n Result:=FMap.Size;\r\nend;\r\n\r\nfunction TDictionary.TKeyCollection.DoGetEnumerator: TEnumerator;\r\nbegin\r\n Result:=GetEnumerator;\r\nend;\r\n\r\nconstructor TDictionary.TKeyCollection.Create(const ADictionary: TMyType);\r\nbegin\r\n FMap:=aDictionary.FMap;\r\nend;\r\n\r\nfunction TDictionary.TKeyCollection.GetEnumerator: TKeyEnumerator;\r\nbegin\r\n Result:=TKeyEnumerator.Create(FMap.Keys);\r\nend;\r\n\r\nfunction TDictionary.TKeyCollection.ToArray: TArray;\r\nbegin\r\n Result:=inherited ToArray;\r\nend;\r\n\r\n\r\n{ TObjectList }\r\n\r\nprocedure TObjectList.Notify(const aValue: T; Action: TCollectionNotification);\r\n\r\nVar\r\n A : TObject absolute aValue; // needed to fool compiler\r\n\r\nbegin\r\n inherited Notify(aValue, Action);\r\n if FObjectsOwner and (action = cnRemoved) then\r\n a.Free;\r\nend;\r\n\r\nconstructor TObjectList.Create(AOwnsObjects: Boolean);\r\nbegin\r\n inherited Create;\r\n FObjectsOwner := AOwnsObjects;\r\nend;\r\n\r\nconstructor TObjectList.Create(const AComparer: IComparer; AOwnsObjects: Boolean);\r\nbegin\r\n inherited Create(AComparer);\r\n FObjectsOwner := AOwnsObjects;\r\nend;\r\n\r\nconstructor TObjectList.Create(const ACollection: TEnumerable; aOwnsObjects: Boolean);\r\nbegin\r\n inherited Create(ACollection);\r\n FObjectsOwner := AOwnsObjects;\r\nend;\r\n\r\n{ TThreadList }\r\n\r\nconstructor TThreadList.Create;\r\nbegin\r\n inherited Create;\r\n FLock:=0;\r\n FList := TList.Create;\r\n FDuplicates := dupIgnore;\r\nend;\r\n\r\ndestructor TThreadList.Destroy;\r\nbegin\r\n // No need to unlock.\r\n FList.Free;\r\n inherited Destroy;\r\nend;\r\n\r\nprocedure TThreadList.Add(const Item: T);\r\nbegin\r\n LockList;\r\n try\r\n if (Duplicates = dupAccept) or (FList.IndexOf(Item) = -1) then\r\n FList.Add(Item)\r\n else if Duplicates = dupError then\r\n raise EListError.Create(SDuplicateItem);\r\n finally\r\n UnlockList;\r\n end;\r\nend;\r\n\r\nprocedure TThreadList.Clear;\r\nbegin\r\n LockList;\r\n try\r\n FList.Clear;\r\n finally\r\n UnlockList;\r\n end;\r\nend;\r\n\r\nfunction TThreadList.LockList: TList;\r\nbegin\r\n Inc(FLock);\r\n if (FLock>1) then\r\n Writeln('Locking already locked list, lockcount : ',FLock);\r\n Result:=FList;\r\nend;\r\n\r\nprocedure TThreadList.Remove(const Item: T);\r\n\r\nbegin\r\n RemoveItem(Item,TDirection.FromBeginning);\r\nend;\r\n\r\nprocedure TThreadList.RemoveItem(const Item: T; Direction: TDirection);\r\nbegin\r\n LockList;\r\n try\r\n FList.RemoveItem(Item,Direction);\r\n finally\r\n UnlockList;\r\n end;\r\nend;\r\n\r\nprocedure TThreadList.UnlockList;\r\nbegin\r\n Dec(FLock);\r\n if (FLock<0) then\r\n Writeln('Unlocking already unlocked list, lockcount : ',FLock);\r\nend;\r\n\r\n{ TObjectDictionary }\r\n\r\nfunction TObjectDictionary.CanClearMap: Boolean;\r\nbegin\r\n Result:=(Inherited CanClearMap) and (FOwnerships=[]);\r\nend;\r\n\r\nprocedure TObjectDictionary.KeyNotify(const Key: TKey; Action: TCollectionNotification);\r\n\r\nVar\r\n A : TObject absolute key; // Avoid typecast, refused by compiler\r\n\r\nbegin\r\n inherited KeyNotify(Key, Action);\r\n if (doOwnsKeys in FOwnerships) and (Action = cnRemoved) then\r\n A.Free;\r\nend;\r\n\r\nprocedure TObjectDictionary.ValueNotify(const Value: TValue; Action: TCollectionNotification);\r\n\r\nVar\r\n A : TObject absolute Value; // Avoid typecast, refused by compiler\r\n\r\nbegin\r\n inherited ValueNotify(Value, Action);\r\n if (doOwnsValues in FOwnerships) and (Action = cnRemoved) then\r\n A.Free;\r\nend;\r\n\r\nconstructor TObjectDictionary.Create(aOwnerships: TDictionaryOwnerships; ACapacity: Integer);\r\nbegin\r\n FOwnerShips:=aOwnerships;\r\n inherited Create(ACapacity);\r\nend;\r\n\r\nconstructor TObjectDictionary.Create(aOwnerships: TDictionaryOwnerships);\r\nbegin\r\n Inherited Create;\r\n FOwnerShips:=aOwnerships;\r\nend;\r\n\r\n{ TQueue }\r\n\r\nfunction TQueue.DoGetEnumerator: TEnumerator;\r\nbegin\r\n Result:=GetEnumerator;\r\nend;\r\n\r\nfunction TQueue.GetEnumerator: TEnumerator;\r\nbegin\r\n Result := TEnumerator.Create(Self);\r\nend;\r\n\r\nprocedure TQueue.SetCapacity(AValue: SizeInt);\r\nbegin\r\n if AValue < Count then\r\n raise EArgumentOutOfRangeException.Create(SArgumentOutOfRange);\r\n if FLow>0 then\r\n Rebase;\r\n SetLength(FItems,aValue);\r\nend;\r\n\r\nfunction TQueue.DoRemove(AIndex: SizeInt; ACollectionNotification: TCollectionNotification): T;\r\n\r\nbegin\r\n if (FLow>=FLength) then\r\n raise EArgumentOutOfRangeException.Create(SArgumentOutOfRange);\r\n Result := FItems[AIndex];\r\n FItems[AIndex] := Default(T);\r\n Inc(FLow);\r\n if FLow >= FLength then\r\n begin\r\n FLow:=0;\r\n FLength:=0;\r\n end;\r\n Notify(Result, ACollectionNotification);\r\nend;\r\n\r\nfunction TQueue.GetCount: SizeInt;\r\nbegin\r\n Result:=FLength-FLow;\r\nend;\r\n\r\nconstructor TQueue.Create;\r\nbegin\r\n FMaxGapLength:=10;\r\nend;\r\n\r\nconstructor TQueue.Create(ACollection: TEnumerable);\r\n\r\nvar\r\n Itm: T;\r\n\r\nbegin\r\n Create;\r\n for Itm in ACollection do\r\n Enqueue(Itm);\r\nend;\r\n\r\ndestructor TQueue.Destroy;\r\nbegin\r\n Clear;\r\n inherited Destroy;\r\nend;\r\n\r\nprocedure TQueue.Enqueue(const AValue: T);\r\nbegin\r\n if Capacity<=FLength then\r\n SetCapacity(FLength+10);\r\n FItems[FLength]:=aValue;\r\n Inc(FLength);\r\n Notify(aValue,cnAdded);\r\nend;\r\n\r\nfunction TQueue.Dequeue: T;\r\nbegin\r\n Result := DoRemove(FLow, cnRemoved);\r\n if FLow>FMaxGapLength then\r\n Rebase;\r\nend;\r\n\r\nfunction TQueue.Extract: T;\r\nbegin\r\n Result := DoRemove(FLow, cnExtracted);\r\n if FLow>FMaxGapLength then\r\n Rebase;\r\nend;\r\n\r\nfunction TQueue.Peek: T;\r\nbegin\r\n if (Count=0) then\r\n raise EArgumentOutOfRangeException.Create(SArgumentOutOfRange);\r\n Result:=FItems[FLow];\r\nend;\r\n\r\nprocedure TQueue.Clear;\r\nbegin\r\n while Count <> 0 do\r\n Dequeue;\r\nend;\r\n\r\nprocedure TQueue.Rebase;\r\n\r\nVar\r\n I,Spare : integer;\r\n\r\nbegin\r\n Spare:=Capacity-Count;\r\n if FLow>0 then\r\n begin\r\n For I:=Flow to FLength do\r\n FItems[I-FLow]:=FItems[I];\r\n SetLength(FItems,FLength+Spare);\r\n FLength:=FLength-Flow+1;\r\n Flow:=0;\r\n end;\r\nend;\r\n\r\nprocedure TQueue.TrimExcess;\r\nbegin\r\n Rebase;\r\n SetCapacity(Count);\r\nend;\r\n\r\n{ TQueue.TEnumerator }\r\n\r\nconstructor TQueue.TEnumerator.Create(AQueue: TMyType);\r\nbegin\r\n aQueue.Rebase;\r\n Inherited Create(aQueue);\r\nend;\r\n\r\n{ TObjectQueue }\r\n\r\nprocedure TObjectQueue.Notify(const Value: T; Action: TCollectionNotification);\r\n\r\nVar\r\n A : TObject absolute Value;\r\n\r\nbegin\r\n inherited Notify(Value, Action);\r\n if OwnsObjects and (Action = cnRemoved) then\r\n A.Free;\r\nend;\r\n\r\nconstructor TObjectQueue.Create(AOwnsObjects: Boolean);\r\nbegin\r\n Inherited create;\r\n FOwnsObjects:=aOwnsObjects;\r\nend;\r\n\r\nconstructor TObjectQueue.Create(const Collection: TEnumerable; AOwnsObjects: Boolean);\r\nVar\r\n A : T;\r\n\r\nbegin\r\n Create(aOwnsObjects);\r\n For A in Collection do\r\n EnQueue(A);\r\nend;\r\n\r\nprocedure TObjectQueue.Dequeue;\r\nbegin\r\n Inherited DeQueue;\r\nend;\r\n\r\n{ TStack }\r\n\r\nfunction TStack.DoRemove(aIndex : SizeInt; ACollectionNotification: TCollectionNotification): T;\r\n\r\nbegin\r\n if (FLength=0) or (aIndex<>FLength-1) then\r\n raise EArgumentOutOfRangeException.Create(SArgumentOutOfRange);\r\n Result:=FItems[AIndex];\r\n FItems[AIndex] := Default(T);\r\n Dec(FLength);\r\n Notify(Result, ACollectionNotification);\r\nend;\r\n\r\nprocedure TStack.SetCapacity(aValue: SizeInt);\r\n\r\nbegin\r\n if AValue < Count then\r\n raise EArgumentOutOfRangeException.Create(SArgumentOutOfRange);\r\n SetLength(FItems,aValue);\r\nend;\r\n\r\nfunction TStack.DoGetEnumerator: TEnumerator;\r\nbegin\r\n Result:=GetEnumerator;\r\nend;\r\n\r\nfunction TStack.GetEnumerator: TEnumerator;\r\nbegin\r\n Result:=TEnumerator.Create(Self);\r\nend;\r\n\r\n\r\ndestructor TStack.Destroy;\r\nbegin\r\n Clear;\r\n inherited Destroy;\r\nend;\r\n\r\nprocedure TStack.Clear;\r\nbegin\r\n While Count>0 do Pop;\r\nend;\r\n\r\nprocedure TStack.Push(const aValue: T);\r\nbegin\r\n if Capacity<=FLength then\r\n SetCapacity(FLength+10);\r\n FItems[FLength]:=aValue;\r\n Inc(FLength);\r\n Notify(aValue,cnAdded);\r\nend;\r\n\r\nfunction TStack.Pop: T;\r\nbegin\r\n Result:=DoRemove(FLength-1,cnRemoved);\r\nend;\r\n\r\nfunction TStack.Peek: T;\r\nbegin\r\n if Count<1 then\r\n raise EArgumentOutOfRangeException.Create(SArgumentOutOfRange);\r\n Result:=FItems[FLength-1];\r\nend;\r\n\r\nfunction TStack.Extract: T;\r\nbegin\r\n Result:=DoRemove(FLength-1,cnExtracted);\r\nend;\r\n\r\nprocedure TStack.TrimExcess;\r\nbegin\r\n SetCapacity(FLength);\r\nend;\r\n\r\n{ TCustomInvertedListEnumerator }\r\n\r\nfunction TCustomInvertedListEnumerator.DoMoveNext: boolean;\r\nbegin\r\n Result:=FIndex>0;\r\n If Result then\r\n Dec(FIndex);\r\nend;\r\n\r\nfunction TCustomInvertedListEnumerator.DoGetCurrent: T;\r\nbegin\r\n Result:=FList.FItems[FIndex];\r\nend;\r\n\r\nfunction TCustomInvertedListEnumerator.GetCurrent: T;\r\nbegin\r\n Result:=DoGetCurrent();\r\nend;\r\n\r\nconstructor TCustomInvertedListEnumerator.Create(AList: TCustomList);\r\nbegin\r\n inherited Create;\r\n FList:=AList;\r\n FIndex:=AList.FLength;\r\nend;\r\n\r\n{ TStack.TEnumerator }\r\n\r\nconstructor TStack.TEnumerator.Create(AStack: TMyType);\r\nbegin\r\n Inherited Create(aStack);\r\nend;\r\n\r\n{ TObjectStack }\r\n\r\nprocedure TObjectStack.Notify(const aValue: T; Action: TCollectionNotification);\r\n\r\nVar\r\n A : T absolute aValue;\r\n\r\nbegin\r\n inherited Notify(aValue, Action);\r\n if (Action=cnRemoved) and FOwnsObjects then\r\n a.Free;\r\nend;\r\n\r\nconstructor TObjectStack.Create(AOwnsObjects: Boolean);\r\nbegin\r\n Inherited Create;\r\n FOwnsObjects:=aOwnsObjects;\r\nend;\r\n\r\nconstructor TObjectStack.Create(const Collection: TEnumerable; AOwnsObjects: Boolean);\r\n\r\nVar\r\n A : T;\r\n\r\nbegin\r\n Create(aOwnsObjects);\r\n For A in Collection do\r\n Push(A);\r\nend;\r\n\r\nprocedure TObjectStack.Pop;\r\nbegin\r\n Inherited Pop;\r\nend;\r\n\r\nend.\r\n","{********************************************************************}\r\n{ }\r\n{ written by TMS Software }\r\n{ copyright (c) 2018 - 2024 }\r\n{ Email : info@tmssoftware.com }\r\n{ Web : http://www.tmssoftware.com }\r\n{ }\r\n{ The source code is given as is. The author is not responsible }\r\n{ for any possible damage done due to the use of this code. }\r\n{ The complete source code remains property of the author and may }\r\n{ not be distributed, published, given or sold in any form as such. }\r\n{ No parts of the source code can be included in any other component }\r\n{ or application without written authorization of the author. }\r\n{********************************************************************}\r\n\r\nunit WEBLib.DesignIntf;\r\n\r\ninterface\r\n\r\nuses\r\n Classes, Web, JS, TypInfo, WEBLib.Forms, WEBLib.Menus;\r\n\r\ntype\r\n IMenuItem = interface;\r\n\r\n IMenuItems = interface\r\n ['{1F683FB4-D9CF-4CC7-934D-99A300314500}']\r\n\r\n // protected\r\n function GetItem(Index: Integer): IMenuItem;\r\n\r\n // public\r\n function SameAs(const AItem: IUnknown): Boolean;\r\n function Find(const ACaption: WideString): IMenuItem;\r\n function FindByName(const AName: string): IMenuItem;\r\n function Count: Integer;\r\n property Items[Index: Integer]: IMenuItem read GetItem;\r\n procedure Clear;\r\n\r\n function AddItem(const ACaption: WideString; AShortCut: TShortCut;\r\n AChecked, AEnabled: Boolean; AOnClick: TNotifyEvent = nil;\r\n hCtx: THelpContext = 0; const AName: string = ''): IMenuItem; overload;\r\n\r\n function InsertItem(const ACaption: WideString;\r\n AShortCut: TShortCut; AChecked, AEnabled: Boolean; AOnClick: TNotifyEvent = nil;\r\n hCtx: THelpContext = 0; const AName: string = ''): IMenuItem; overload;\r\n function InsertItem(Index: Integer; const ACaption: WideString;\r\n AShortCut: TShortCut; AChecked, AEnabled: Boolean; AOnClick: TNotifyEvent = nil;\r\n hCtx: THelpContext = 0; const AName: string = ''): IMenuItem; overload;\r\n\r\n function AddLine(const AName: string = ''): IMenuItem;\r\n\r\n function InsertLine(const AName: string = ''): IMenuItem; overload;\r\n function InsertLine(Index: Integer; const AName: string = ''): IMenuItem; overload;\r\n end;\r\n\r\n IMenu = interface\r\n ['{C24B5609-AD3A-4246-8FDC-65B57EFA75AA}']\r\n function Items: IMenuItems;\r\n end;\r\n\r\n IMainMenu = interface(IMenu)\r\n ['{4605DA9D-79C3-4969-8DC4-FAD9B96D287B}']\r\n end;\r\n\r\n IPopupMenu = interface(IMenu)\r\n ['{16ABD57D-6CC6-4004-B4FD-53C46429894F}']\r\n\r\n procedure Popup(X, Y: Integer);\r\n function PopupComponent: TComponent;\r\n end;\r\n\r\n IMenuItem = interface(IMenuItems)\r\n ['{FEA8F8DA-E0D9-4DB3-B7B7-C1C38394BA17}']\r\n\r\n // protected\r\n function GetCaption: WideString;\r\n procedure SetCaption(const ACaption: WideString);\r\n function GetChecked: Boolean;\r\n procedure SetChecked(AChecked: Boolean);\r\n function GetEnabled: Boolean;\r\n procedure SetEnabled(AEnabled: Boolean);\r\n function GetGroupIndex: Byte;\r\n procedure SetGroupIndex(AGroupIndex: Byte);\r\n function GetHelpContext: THelpContext;\r\n procedure SetHelpContext(AHelpContext: THelpContext);\r\n function GetHint: string;\r\n procedure SetHint(const AHint: string);\r\n function GetRadioItem: Boolean;\r\n procedure SetRadioItem(ARadioItem: Boolean);\r\n function GetShortCut: TShortCut;\r\n procedure SetShortCut(AShortCut: TShortCut);\r\n\r\n function GetTag: LongInt;\r\n procedure SetTag(AValue: LongInt);\r\n function GetVisible: Boolean;\r\n procedure SetVisible(AVisible: Boolean);\r\n\r\n // public\r\n function Name: TComponentName;\r\n function MenuIndex: Integer;\r\n function Parent: IMenuItem;\r\n function HasParent: Boolean;\r\n function IsLine: Boolean;\r\n\r\n property Caption: WideString read GetCaption write SetCaption;\r\n property Checked: Boolean read GetChecked write SetChecked;\r\n property Enabled: Boolean read GetEnabled write SetEnabled;\r\n property GroupIndex: Byte read GetGroupIndex write SetGroupIndex;\r\n property HelpContext: THelpContext read GetHelpContext write SetHelpContext;\r\n property Hint: string read GetHint write SetHint;\r\n property RadioItem: Boolean read GetRadioItem write SetRadioItem;\r\n property ShortCut: TShortCut read GetShortCut write SetShortCut;\r\n\r\n property Tag: LongInt read GetTag write SetTag;\r\n property Visible: Boolean read GetVisible write SetVisible;\r\n end;\r\n\r\n IMenuItem2 = interface(IMenuItem)\r\n ['{7BB2E6D5-A47D-4ECD-B891-29ECB256199F}']\r\n procedure Click;\r\n end;\r\n\r\n TLoadJavaScriptCallBack = procedure(AJavaScriptFile: String) of object;\r\n TErrorJavaScriptCallBack = procedure(AError: TJSErrorEvent) of object;\r\n\r\n TComponentClass = class of TComponent;\r\n\r\n TIconArray = array of string;\r\n\r\n TComponentClassArray = array of TComponentClass;\r\n\r\n TRegisteredComponent = class\r\n private\r\n FClass: TComponentClass;\r\n FIcon: string;\r\n FPage: string;\r\n public\r\n constructor Create(APage: string; AClass: TComponentClass; AIcon: string = '');\r\n property &Class: TComponentClass read FClass write FClass;\r\n property Page: string read FPage write FPage;\r\n property Icon: string read FIcon write FIcon;\r\n end;\r\n\r\n IDesignerSelections = interface\r\n function Add(const Item: TPersistent): Integer;\r\n function Get(Index: Integer): TPersistent;\r\n function GetCount: Integer;\r\n property Count: Integer read GetCount;\r\n property Items[Index: Integer]: TPersistent read Get; default;\r\n end;\r\n\r\n TGetStrProc = procedure(AUnitName: string);\r\n\r\n TSelectionEditor = class(TObject)\r\n public\r\n procedure RequiresUnits(Proc: TGetStrProc); virtual;\r\n end;\r\n\r\n TSelectionEditorClass = class of TSelectionEditor;\r\n\r\n TRegisteredSelectionEditor = class\r\n private\r\n FClass: TComponentClass;\r\n FEditor: TSelectionEditorClass;\r\n public\r\n constructor Create(AClass: TComponentClass; AEditorClass: TSelectionEditorClass);\r\n property &Class: TComponentClass read FClass write FClass;\r\n property Editor: TSelectionEditorClass read FEditor write FEditor;\r\n end;\r\n\r\n TLibraryRequirementsEditor = class\r\n public\r\n procedure RequiresLibraries(Proc: TGetStrProc); virtual;\r\n end;\r\n\r\n TLibraryRequirementsEditorClass = class of TLibraryRequirementsEditor;\r\n\r\n TRegisteredLibraryRequirementsEditor = class\r\n private\r\n FClass: TComponentClass;\r\n FEditor: TLibraryRequirementsEditorClass;\r\n public\r\n constructor Create(AClass: TComponentClass; AEditorClass: TLibraryRequirementsEditorClass);\r\n property &Class: TComponentClass read FClass write FClass;\r\n property Editor: TLibraryRequirementsEditorClass read FEditor write FEditor;\r\n end;\r\n\r\n TPropertyAttribute = (paDialog, paValueList, paSortList, paValueEditable, paSubProperties);\r\n\r\n TPropertyAttributes = set of TPropertyAttribute;\r\n\r\n TPropertyEditor = class(TObject)\r\n private\r\n FComponent: TPersistent;\r\n FPropertyName: string;\r\n FPropertyInfo: TTypeMemberProperty;\r\n FResultProc: TModalResultProc;\r\n protected\r\n property ResultProc: TModalResultProc read FResultProc;\r\n function GetStrValue: string;\r\n function GetStrValueAt(Index: Integer): string;\r\n procedure SetStrValue(const Value: string);\r\n procedure Modified; virtual;\r\n public\r\n constructor Create;\r\n property Component: TPersistent read FComponent write FComponent;\r\n property PropertyName: string read FPropertyName write FPropertyName;\r\n property PropertyInfo: TTypeMemberProperty read FPropertyInfo write FPropertyInfo;\r\n procedure Edit; virtual; overload;\r\n procedure Edit(AProc: TModalResultProc); virtual; overload;\r\n function GetAttributes: TPropertyAttributes; virtual;\r\n function GetValue: string; virtual;\r\n function GetComponent: TPersistent; virtual; overload;\r\n function GetComponent(Index: Integer): TPersistent; virtual; overload;\r\n procedure GetValues(Proc: TGetStrProc); virtual;\r\n procedure SetValue(const Value: string); virtual;\r\n function GetOrdValue: Longint; virtual;\r\n function GetOrdValueAt(Index: Integer): Longint; virtual;\r\n function GetObjectValue: TObject; virtual;\r\n function GetObjectValueAt(Index: Integer): TObject; virtual;\r\n procedure SetOrdValue(Value: Integer); virtual;\r\n end;\r\n\r\n TStringProperty = class(TPropertyEditor)\r\n public\r\n function GetValue: string; override;\r\n procedure SetValue(const Value: string); override;\r\n end;\r\n\r\n TIntegerProperty = class(TPropertyEditor);\r\n\r\n TClassProperty = class(TPropertyEditor);\r\n\r\n TPropertyEditorClass = class of TPropertyEditor;\r\n\r\n TRegisteredPropertyEditor = class\r\n private\r\n FClass: TComponentClass;\r\n FPropertyName: string;\r\n FPropertyType: PTypeInfo;\r\n FEditor: TPropertyEditorClass;\r\n public\r\n constructor Create(APropertyType: PTypeInfo; AClass: TComponentClass; AProperty: string; AEditor: TPropertyEditorClass);\r\n property &Class: TComponentClass read FClass write FClass;\r\n property PropertyType: PTypeInfo read FPropertyType write FPropertyType;\r\n property PropertyName: string read FPropertyName write FPropertyName;\r\n property Editor: TPropertyEditorClass read FEditor write FEditor;\r\n end;\r\n\r\n TRegisteredIgnoredProperty = class\r\n private\r\n FClass: TComponentClass;\r\n FPropertyName: string;\r\n public\r\n constructor Create(AClass: TComponentClass; AProperty: string);\r\n property &Class: TComponentClass read FClass write FClass;\r\n property PropertyName: string read FPropertyName write FPropertyName;\r\n end;\r\n\r\n TComponentEditor = class\r\n private\r\n FComponent: TComponent;\r\n FResultProc: TModalResultProc;\r\n FExecResultProc: TModalResultProc;\r\n protected\r\n property ResultProc: TModalResultProc read FResultProc;\r\n property ExecResultProc: TModalResultProc read FExecResultProc;\r\n public\r\n property Component: TComponent read FComponent write FComponent;\r\n procedure Edit; virtual; overload;\r\n procedure Edit(AProc: TModalResultProc); virtual; overload;\r\n procedure ExecuteVerb(Index: Integer); virtual; overload;\r\n procedure ExecuteVerb(Index: Integer; AProc: TModalResultProc); virtual; overload;\r\n procedure PrepareItem(Index: Integer; const AItem: IMenuItem); virtual;\r\n function GetVerb(Index: Integer): string; virtual;\r\n function GetVerbCount: Integer; virtual;\r\n function GetComponent: TComponent; virtual; overload;\r\n function GetComponent(Index: Integer): TComponent; virtual; overload;\r\n function GetDefaultProperty: string; virtual;\r\n end;\r\n\r\n TComponentEditorClass = class of TComponentEditor;\r\n\r\n TRegisteredComponentEditor = class\r\n private\r\n FClass: TComponentClass;\r\n FEditor: TComponentEditorClass;\r\n public\r\n constructor Create(AClass: TComponentClass; AEditorClass: TComponentEditorClass);\r\n property &Class: TComponentClass read FClass write FClass;\r\n property Editor: TComponentEditorClass read FEditor write FEditor;\r\n end;\r\n\r\n TDefaultEditor = class(TComponentEditor);\r\n\r\n TIdentToInt = function(const Ident: string; var Int: Integer): Boolean;\r\n TIntToIdent = function(Int: Integer; var Ident: string): Boolean;\r\n\r\n TRegisteredIdentToInt = class\r\n private\r\n FIdentToInt: TIdentToInt;\r\n FIntToIdent: TIntToIdent;\r\n FPropertyType: PTypeInfo;\r\n public\r\n constructor Create(APropertyType: PTypeInfo; AIdentToInt: TIdentToInt; AIntToIdent: TIntToIdent);\r\n property PropertyType: PTypeInfo read FPropertyType write FPropertyType;\r\n property IdentToInt: TIdentToInt read FIdentToInt write FIdentToInt;\r\n property IntToIdent: TIntToIdent read FIntToIdent write FIntToIdent;\r\n end;\r\n\r\n\r\n\r\n\r\nprocedure RegisterComponents(Page: string; ComponentClasses: TComponentClassArray; Icons: TIconArray = nil);\r\nprocedure RegisterSelectionEditor(AClass: TComponentClass; AEditorClass: TSelectionEditorClass);\r\nprocedure RegisterPropertyEditor(PropertyType: PTypeInfo; ComponentClass: TClass; const PropertyName: string; EditorClass: TPropertyEditorClass);\r\nprocedure RegisterComponentEditor(AClass: TComponentClass; ComponentEditor: TComponentEditorClass);\r\nprocedure RegisterIgnoredProperty(ComponentClass: TClass; const PropertyName: string);\r\nprocedure RegisterLibraryRequirementsEditor(AClass: TComponentClass; AEditorClass: TLibraryRequirementsEditorClass);\r\nprocedure RegisterIcon(const AComponentName, AIconName, AUnitName: string);\r\n\r\nprocedure GetRegisteredComponents(List: TList);\r\nprocedure GetRegisteredPages(List: TList);\r\nprocedure GetSelectionEditors(List: TList);\r\nprocedure LoadComponentFromJavaScript(JavaScriptFile: string; CallBack: TLoadJavaScriptCallBack; ErrorCallBack: TErrorJavaScriptCallBack = nil);\r\nprocedure InitializeComponentFromJavaScript(JavaScriptFile: string);\r\nfunction GetRegisteredComponentClass(ComponentClassName: string): TComponentClass;\r\nfunction GetRegisteredComponent(ComponentClassName: string): TRegisteredComponent;\r\nfunction GetRegisteredSelectionEditor(ComponentClassName: string): TRegisteredSelectionEditor;\r\nfunction GetRegisteredLibraryRequirementsEditor(ComponentClassName: string): TRegisteredLibraryRequirementsEditor;\r\nfunction GetRegisteredPropertyEditor(PropertyType: PTypeInfo; AClass: TComponentClass; AProperty: string): TRegisteredPropertyEditor;\r\nfunction GetRegisteredComponentEditor(AClass: TComponentClass): TRegisteredComponentEditor;\r\nfunction IsComponentFromJavaScriptLoaded(JavaScriptFile: string): Boolean;\r\nfunction IsIgnoredProperty(AClass: TComponentClass; AProperty: string): boolean;\r\n\r\nprocedure RegisterIntegerConsts(IntegerPropertyType: PTypeInfo; AIdentToInt: TIdentToInt; AIntToIdent: TIntToIdent);\r\nfunction GetRegisteredIdentToInt(IntegerPropertyType: PTypeInfo): TIdentToInt;\r\nfunction GetRegisteredIntToIdent(IntegerPropertyType: PTypeInfo): TIntToIdent;\r\n\r\n\r\nimplementation\r\n\r\nuses\r\n SysUtils, Generics.Collections;\r\n\r\ntype\r\n TIconData = class(TObject)\r\n strict private\r\n FNameConst: string;\r\n FNameUnit: string;\r\n public\r\n property NameConst: string read FNameConst write FNameConst;\r\n property NameUnit: string read FNameUnit write FNameUnit;\r\n end;\r\n\r\n TIconDataDict = class(TObject)\r\n strict private\r\n class var FDict: TObjectDictionary;\r\n public\r\n class destructor Destroy;\r\n class procedure Add(const AComponentName, AConstantName, AUnitName: string);\r\n class function Find(const AComponentName: string): string;\r\n end;\r\n\r\nvar\r\n RegisteredComponentList: TJSObject;\r\n RegisteredSelectionEditorList: TJSObject;\r\n RegisteredPropertyEditorList: TJSObject;\r\n RegisteredIgnoredPropertyList: TJSObject;\r\n RegisteredLibraryRequirementsEditorList: TJSObject;\r\n RegisteredComponentEditorList: TJSObject;\r\n RegisteredIdentToIntList: TJSObject;\r\n\r\nprocedure RegisterComponents(Page: string; ComponentClasses: TComponentClassArray; Icons: TIconArray = nil);\r\nconst\r\n cPNGExt = '_PNG';\r\nvar\r\n I: Integer;\r\n c: TComponentClass;\r\n ic: String;\r\nbegin\r\n for I := 0 to Length(ComponentClasses) - 1 do\r\n begin\r\n c := ComponentClasses[I];\r\n if Assigned(Icons) then\r\n ic := Icons[I]\r\n else\r\n ic := '';\r\n if ic = '' then\r\n ic := TIconDataDict.Find(c.ClassName + cPNGExt);\r\n if ic = '' then\r\n ic := TIconDataDict.Find(c.ClassName);\r\n\r\n RegisteredComponentList[c.ClassName] := TRegisteredComponent.Create(Page, c, ic);\r\n end;\r\nend;\r\n\r\nfunction GetRegisteredComponent(ComponentClassName: string): TRegisteredComponent;\r\nvar\r\n res: TRegisteredComponent;\r\nbegin\r\n Result := nil;\r\n if ComponentClassName = '' then\r\n Exit;\r\n\r\n res := nil;\r\n\r\n // case insensitive class search\r\n asm\r\n var a = Object.keys($impl.RegisteredComponentList).map(function(key) {\r\n return [$impl.RegisteredComponentList[key]];\r\n });\r\n\r\n for (let el of a) {\r\n if (el[0].FClass.$classname.toLowerCase() == ComponentClassName.toLowerCase()) {\r\n res = el[0];\r\n break; }\r\n }\r\n end;\r\n\r\n Result := res;\r\n\r\n// Result := TRegisteredComponent(RegisteredComponentList[ComponentClassName]);\r\nend;\r\n\r\nfunction GetRegisteredComponentClass(ComponentClassName: string): TComponentClass;\r\nvar\r\n r: TRegisteredComponent;\r\nbegin\r\n Result := nil;\r\n r := GetRegisteredComponent(ComponentClassName);\r\n if Assigned(r) then\r\n Result := r.&Class;\r\nend;\r\n\r\nprocedure GetRegisteredPages(List: TList);\r\nbegin\r\n asm\r\n var a = Object.keys($impl.RegisteredComponentList).map(function(key) {\r\n return [$impl.RegisteredComponentList[key]];\r\n });\r\n\r\n a.forEach(function(element) {\r\n var p = element[0].FPage;\r\n if (List.IndexOf(p) == -1) {\r\n List.Add(element[0].FPage);\r\n }\r\n });\r\n end;\r\nend;\r\n\r\nprocedure GetRegisteredComponents(List: TList);\r\nbegin\r\n asm\r\n var a = Object.keys($impl.RegisteredComponentList).map(function(key) {\r\n return [$impl.RegisteredComponentList[key]];\r\n });\r\n\r\n a.forEach(function(element) {\r\n List.Add(element[0]);\r\n });\r\n end;\r\nend;\r\n\r\nprocedure RegisterSelectionEditor(AClass: TComponentClass; AEditorClass: TSelectionEditorClass);\r\nbegin\r\n RegisteredSelectionEditorList[AClass.ClassName] := TRegisteredSelectionEditor.Create(AClass, AEditorClass);\r\nend;\r\n\r\n\r\nprocedure GetSelectionEditors(List: TList);\r\nbegin\r\n asm\r\n var a = Object.keys($impl.RegisteredSelectionEditorList).map(function(key) {\r\n return [$impl.RegisteredSelectionEditorList[key]];\r\n });\r\n\r\n a.forEach(function(element) {\r\n List.Add(element[0]);\r\n });\r\n end;\r\nend;\r\n\r\nfunction GetRegisteredSelectionEditor(ComponentClassName: string): TRegisteredSelectionEditor;\r\nvar\r\n cn: string;\r\n c: TClass;\r\nbegin\r\n Result := nil;\r\n if ComponentClassName = '' then\r\n Exit;\r\n\r\n c := GetClass(ComponentClassName);\r\n\r\n if not Assigned(c) then\r\n begin\r\n c := GetRegisteredComponentClass(ComponentClassName);\r\n if not Assigned(c) then\r\n Exit(nil);\r\n end;\r\n repeat\r\n cn := c.ClassName;\r\n Result := TRegisteredSelectionEditor(RegisteredSelectionEditorList[cn]);\r\n if Assigned(Result) then\r\n Exit;\r\n c := c.ClassParent;\r\n until not Assigned(c);\r\nend;\r\n\r\nfunction GetRegisteredComponentEditor(AClass: TComponentClass): TRegisteredComponentEditor;\r\nvar\r\n cn: string;\r\n c: TClass;\r\nbegin\r\n Result := nil;\r\n if not Assigned(AClass) then\r\n Exit;\r\n\r\n c := AClass;\r\n\r\n if not Assigned(c) then\r\n Exit(nil);\r\n repeat\r\n cn := c.ClassName;\r\n Result := TRegisteredComponentEditor(RegisteredComponentEditorList[cn]);\r\n if Assigned(Result) then\r\n Exit;\r\n c := c.ClassParent;\r\n until not Assigned(c);\r\nend;\r\n\r\nprocedure RegisterLibraryRequirementsEditor(AClass: TComponentClass; AEditorClass: TLibraryRequirementsEditorClass);\r\nbegin\r\n RegisteredLibraryRequirementsEditorList[AClass.ClassName] := TRegisteredLibraryRequirementsEditor.Create(AClass, AEditorClass);\r\nend;\r\n\r\nprocedure RegisterIcon(const AComponentName, AIconName, AUnitName: string);\r\nbegin\r\n TIconDataDict.Add(AComponentName, AIconName, AUnitName);\r\nend;\r\n\r\nfunction GetRegisteredLibraryRequirementsEditor(ComponentClassName: string): TRegisteredLibraryRequirementsEditor;\r\nvar\r\n cn: string;\r\n c: TClass;\r\nbegin\r\n Result := nil;\r\n if ComponentClassName = '' then\r\n Exit;\r\n\r\n c := GetClass(ComponentClassName);\r\n\r\n if not Assigned(c) then\r\n Exit(nil);\r\n repeat\r\n cn := c.ClassName;\r\n Result := TRegisteredLibraryRequirementsEditor(RegisteredLibraryRequirementsEditorList[cn]);\r\n if Assigned(Result) then\r\n Exit;\r\n c := c.ClassParent;\r\n until not Assigned(c);\r\nend;\r\n\r\nprocedure GetPropertyEditors(List: TList);\r\nbegin\r\n asm\r\n var a = Object.keys($impl.RegisteredPropertyEditorList).map(function(key) {\r\n return [$impl.RegisteredPropertyEditorList[key]];\r\n });\r\n\r\n a.forEach(function(element) {\r\n List.Add(element[0]);\r\n });\r\n end;\r\nend;\r\n\r\nprocedure RegisterPropertyEditor(PropertyType: PTypeInfo; ComponentClass: TClass; const PropertyName: string; EditorClass: TPropertyEditorClass);\r\nvar\r\n LKey, LType, LClass: string;\r\nbegin\r\n LType := '';\r\n if Assigned(PropertyType) then\r\n LType := TTypeInfo(PropertyType).Name;\r\n\r\n LClass := '';\r\n if Assigned(ComponentClass) then\r\n LClass := ComponentClass.ClassName;\r\n\r\n LKey := LType + '_' + LClass + '_' + PropertyName;\r\n RegisteredPropertyEditorList[LKey] := TRegisteredPropertyEditor.Create(PropertyType, TComponentClass(ComponentClass), PropertyName, EditorClass);\r\nend;\r\n\r\nfunction GetRegisteredPropertyEditor(PropertyType: PTypeInfo; AClass: TComponentClass; AProperty: string): TRegisteredPropertyEditor;\r\nvar\r\n LKey, LType: string;\r\n LPropEditor: TRegisteredPropertyEditor;\r\n LList: TList;\r\n i: integer;\r\n c: TClass;\r\nbegin\r\n Result := nil;\r\n\r\n LType := TTypeInfo(PropertyType).Name;\r\n\r\n LKey := LType + '__';\r\n LPropEditor := TRegisteredPropertyEditor(RegisteredPropertyEditorList[LKey]);\r\n\r\n if Assigned(LPropEditor) then\r\n Result := LPropEditor;\r\n\r\n if not Assigned(Result) and Assigned(AClass) and (AProperty <> '') then\r\n begin\r\n c := AClass;\r\n repeat\r\n LKey := LType + '_' + c.ClassName + '_' + AProperty;\r\n LPropEditor := TRegisteredPropertyEditor(RegisteredPropertyEditorList[LKey]);\r\n if Assigned(LPropEditor) then\r\n begin\r\n Result := LPropEditor;\r\n Break;\r\n end;\r\n\r\n c := c.ClassParent;\r\n until not Assigned(c);\r\n end;\r\n\r\n if not Assigned(Result) then\r\n begin\r\n LList := Classes.TList.Create;\r\n GetPropertyEditors(LList);\r\n\r\n for i := 0 to LList.Count - 1 do\r\n begin\r\n LPropEditor := TRegisteredPropertyEditor(LList.Items[i]);\r\n\r\n if (LPropEditor.PropertyType = PropertyType) then\r\n begin\r\n if (LPropEditor.PropertyName = '') or (LPropEditor.PropertyName = AProperty) then\r\n begin\r\n if not Assigned(LPropEditor.&Class) then\r\n begin\r\n Result := LPropEditor;\r\n Break;\r\n end\r\n else if Assigned(AClass) then\r\n begin\r\n c := AClass;\r\n repeat\r\n if (LPropEditor.&Class.ClassName = c.ClassName) then\r\n begin\r\n Result := LPropEditor;\r\n Break;\r\n end;\r\n\r\n c := c.ClassParent;\r\n until not Assigned(c);\r\n\r\n if Assigned(Result) then\r\n Break;\r\n end;\r\n end;\r\n end;\r\n end;\r\n LList.Free;\r\n end;\r\nend;\r\n\r\nconstructor TRegisteredIdentToInt.Create(APropertyType: PTypeInfo; AIdentToInt: TIdentToInt; AIntToIdent: TIntToIdent);\r\nbegin\r\n\r\n FPropertyType := APropertyType;\r\n FIdentToInt := AIdentToInt;\r\n FIntToIdent := AIntToIdent;\r\nend;\r\n\r\nprocedure RegisterIntegerConsts(IntegerPropertyType: PTypeInfo; AIdentToInt: TIdentToInt; AIntToIdent: TIntToIdent);\r\nvar\r\n LKey: string;\r\nbegin\r\n LKey := TTypeInfo(IntegerPropertyType).Name;\r\n RegisteredIdentToIntList[LKey] := TRegisteredIdentToInt.Create(IntegerPropertyType, AIdentToInt, AIntToIdent);\r\nend;\r\n\r\nfunction GetRegisteredIdentToInt(IntegerPropertyType: PTypeInfo): TIdentToInt;\r\nvar\r\n ri: TRegisteredIdentToInt;\r\n LKey: string;\r\nbegin\r\n Result := nil;\r\n\r\n LKey := TTypeInfo(IntegerPropertyType).Name;\r\n\r\n ri := TRegisteredIdentToInt(RegisteredIdentToIntList[LKey]);\r\n if Assigned(ri) then\r\n Result := ri.IdentToInt;\r\nend;\r\n\r\nfunction GetRegisteredIntToIdent(IntegerPropertyType: PTypeInfo): TIntToIdent;\r\nvar\r\n ri: TRegisteredIdentToInt;\r\n LKey: string;\r\nbegin\r\n Result := nil;\r\n LKey := TTypeInfo(IntegerPropertyType).Name;\r\n\r\n ri := TRegisteredIdentToInt(RegisteredIdentToIntList[LKey]);\r\n if Assigned(ri) then\r\n Result := ri.IntToIdent;\r\nend;\r\n\r\nprocedure RegisterComponentEditor(AClass: TComponentClass; ComponentEditor: TComponentEditorClass);\r\nbegin\r\n RegisteredComponentEditorList[AClass.ClassName] := TRegisteredComponentEditor.Create(AClass, ComponentEditor);\r\nend;\r\n\r\n\r\nconstructor TRegisteredIgnoredProperty.Create(AClass: TComponentClass; AProperty: string);\r\nbegin\r\n inherited Create;\r\n\r\n FClass := AClass;\r\n FPropertyName := AProperty;\r\nend;\r\n\r\nprocedure RegisterIgnoredProperty(ComponentClass: TClass; const PropertyName: string);\r\nvar\r\n LKey, LClass: string;\r\nbegin\r\n LClass := '';\r\n if Assigned(ComponentClass) then\r\n LClass := ComponentClass.ClassName;\r\n\r\n LKey := LClass + '_' + PropertyName;\r\n RegisteredIgnoredPropertyList[LKey] := TRegisteredIgnoredProperty.Create(TComponentClass(ComponentClass), PropertyName);\r\nend;\r\n\r\nfunction IsIgnoredProperty(AClass: TComponentClass; AProperty: string): boolean;\r\nvar\r\n LKey: string;\r\n LIgnoredProperty: TRegisteredIgnoredProperty;\r\n\r\nbegin\r\n Result := false;\r\n\r\n if not Assigned(AClass) then\r\n begin\r\n LKey := '_' + AProperty;\r\n LIgnoredProperty := TRegisteredIgnoredProperty(RegisteredIgnoredPropertyList[LKey]);\r\n if Assigned(LIgnoredProperty) then\r\n begin\r\n Result := true;\r\n end;\r\n end\r\n else\r\n if Assigned(AClass) and (AProperty <> '') then\r\n begin\r\n LKey := AClass.ClassName + '_' + AProperty;\r\n LIgnoredProperty := TRegisteredIgnoredProperty(RegisteredIgnoredPropertyList[LKey]);\r\n if Assigned(LIgnoredProperty) then\r\n begin\r\n Result := true;\r\n end\r\n else\r\n begin\r\n LKey := '_' + AProperty;\r\n LIgnoredProperty := TRegisteredIgnoredProperty(RegisteredIgnoredPropertyList[LKey]);\r\n if Assigned(LIgnoredProperty) then\r\n begin\r\n Result := true;\r\n end;\r\n end;\r\n end\r\nend;\r\n\r\n\r\n{$HINTS OFF}\r\nprocedure InitializeComponentFromJavaScript(JavaScriptFile: string);\r\nvar\r\n src: String;\r\nbegin\r\n if IsComponentFromJavaScriptLoaded(JavaScriptFile) then\r\n begin\r\n src := JavaScriptFile;\r\n asm\r\n var n = src.substr(0, src.lastIndexOf(\".\"))\r\n var module = pas[n];\r\n rtl.loadintf(module);\r\n rtl.loadimpl(module);\r\n end;\r\n end;\r\nend;\r\n\r\nfunction IsComponentFromJavaScriptLoaded(JavaScriptFile: string): Boolean;\r\nvar\r\n src: String;\r\nbegin\r\n src := JavaScriptFile;\r\n asm\r\n var n = src.substr(0, src.lastIndexOf(\".\"))\r\n return (pas[n]);\r\n end;\r\nend;\r\n{$HINTS ON}\r\n\r\nprocedure LoadComponentFromJavaScript(JavaScriptFile: string; CallBack: TLoadJavaScriptCallBack; ErrorCallBack: TErrorJavaScriptCallBack = nil);\r\nbegin\r\n asm\r\n var self = this;\r\n var JavaScript = {\r\n loadcomponent: function(src) {\r\n var n = src.substr(0, src.lastIndexOf(\".\"));\r\n if (!pas[n]) {\r\n var script = document.createElement('script'), loaded;\r\n script.async = false;\r\n script.setAttribute('src', src);\r\n script.onerror = function(e){\r\n if (ErrorCallBack != null)\r\n {\r\n ErrorCallBack(e);\r\n }\r\n }\r\n script.onreadystatechange = script.onload = function() {\r\n if (!loaded) {\r\n if (CallBack != null)\r\n CallBack(src);\r\n }\r\n loaded = true;\r\n };\r\n document.getElementsByTagName('head')[0].appendChild(script);\r\n }\r\n }\r\n };\r\n\r\n JavaScript.loadcomponent(JavaScriptFile);\r\n end;\r\nend;\r\n\r\n{ TRegisteredComponent }\r\n\r\nconstructor TRegisteredComponent.Create(APage: string; AClass: TComponentClass; AIcon: string = '');\r\nbegin\r\n FPage := APage;\r\n FClass := AClass;\r\n FIcon := AIcon;\r\nend;\r\n\r\n{ TSelectionEditor }\r\n\r\nprocedure TSelectionEditor.RequiresUnits(Proc: TGetStrProc);\r\nbegin\r\n //\r\nend;\r\n\r\n{ TRegisteredSelectionEditor }\r\n\r\nconstructor TRegisteredSelectionEditor.Create(AClass: TComponentClass;\r\n AEditorClass: TSelectionEditorClass);\r\nbegin\r\n inherited Create;\r\n FClass := AClass;\r\n FEditor := AEditorClass;\r\nend;\r\n\r\n{ TRegisteredComponentEditor }\r\n\r\nconstructor TRegisteredComponentEditor.Create(AClass: TComponentClass;\r\n AEditorClass: TComponentEditorClass);\r\nbegin\r\n inherited Create;\r\n FClass := AClass;\r\n FEditor := AEditorClass;\r\nend;\r\n\r\n\r\n{ TRegisteredLibraryRequirementsEditor }\r\n\r\nconstructor TRegisteredLibraryRequirementsEditor.Create(AClass: TComponentClass; AEditorClass: TLibraryRequirementsEditorClass);\r\nbegin\r\n inherited Create;\r\n FClass := AClass;\r\n FEditor := AEditorClass;\r\nend;\r\n\r\n{ TPropertyEditor }\r\n\r\nfunction TPropertyEditor.GetObjectValue: TObject;\r\nbegin\r\n Result := GetObjectValueAt(0);\r\nend;\r\n\r\nfunction TPropertyEditor.GetObjectValueAt(Index: Integer): TObject;\r\nbegin\r\n Result := GetObjectProp(FComponent, FPropertyInfo);\r\nend;\r\n\r\nfunction TPropertyEditor.GetOrdValue: Longint;\r\nbegin\r\n Result := GetOrdValueAt(0);\r\nend;\r\n\r\nfunction TPropertyEditor.GetOrdValueAt(Index: Integer): Longint;\r\nbegin\r\n Result := GetOrdProp(FComponent, FPropertyInfo);\r\nend;\r\n\r\nconstructor TPropertyEditor.Create;\r\nbegin\r\n FPropertyName := '';\r\n FPropertyInfo := nil;\r\nend;\r\n\r\nfunction TPropertyEditor.GetComponent: TPersistent;\r\nbegin\r\n Result := FComponent;\r\nend;\r\n\r\nfunction TPropertyEditor.GetComponent(Index: Integer): TPersistent;\r\nbegin\r\n Result := FComponent;\r\nend;\r\n\r\nprocedure TPropertyEditor.Edit;\r\nbegin\r\n Edit(nil);\r\nend;\r\n\r\nprocedure TPropertyEditor.Edit(AProc: TModalResultProc);\r\nbegin\r\n FResultProc := AProc;\r\nend;\r\n\r\nfunction TPropertyEditor.GetAttributes: TPropertyAttributes;\r\nbegin\r\n Result := [paDialog];\r\nend;\r\n\r\nfunction TPropertyEditor.GetValue: string;\r\nbegin\r\n Result := '(Unknown)';\r\nend;\r\n\r\nprocedure TPropertyEditor.GetValues(Proc: TGetStrProc);\r\nbegin\r\n //\r\nend;\r\n\r\nfunction TPropertyEditor.GetStrValue: string;\r\nbegin\r\n Result := GetStrValueAt(0);\r\nend;\r\n\r\nprocedure TPropertyEditor.Modified;\r\nbegin\r\nend;\r\n\r\nfunction TPropertyEditor.GetStrValueAt(Index: Integer): string;\r\nbegin\r\n Result := GetStrProp(FComponent, FPropertyInfo);\r\nend;\r\n\r\nprocedure TPropertyEditor.SetStrValue(const Value: string);\r\nbegin\r\n SetStrProp(FComponent, FPropertyInfo, Value);\r\nend;\r\n\r\nprocedure TPropertyEditor.SetOrdValue(Value: Integer);\r\nbegin\r\n SetOrdProp(FComponent, FPropertyInfo, Value);\r\nend;\r\n\r\nprocedure TPropertyEditor.SetValue(const Value: string);\r\nbegin\r\n\r\nend;\r\n\r\n{ TStringProperty}\r\n\r\nfunction TStringProperty.GetValue: string;\r\nbegin\r\n Result := GetStrValue;\r\nend;\r\n\r\nprocedure TStringProperty.SetValue(const Value: string);\r\nbegin\r\n SetStrValue(Value);\r\nend;\r\n\r\n{ TComponentEditor }\r\n\r\nprocedure TComponentEditor.Edit;\r\nbegin\r\n Edit(nil);\r\nend;\r\n\r\nprocedure TComponentEditor.Edit(AProc: TModalResultProc);\r\nbegin\r\n FResultProc := AProc;\r\nend;\r\n\r\nprocedure TComponentEditor.ExecuteVerb(Index: Integer);\r\nbegin\r\n ExecuteVerb(Index, nil);\r\nend;\r\n\r\nprocedure TComponentEditor.PrepareItem(Index: Integer; const AItem: IMenuItem);\r\nbegin\r\nend;\r\n\r\nprocedure TComponentEditor.ExecuteVerb(Index: Integer; AProc: TModalResultProc);\r\nbegin\r\n FExecResultProc := AProc;\r\nend;\r\n\r\nfunction TComponentEditor.GetVerb(Index: Integer): string;\r\nbegin\r\n Result := '';\r\nend;\r\n\r\nfunction TComponentEditor.GetVerbCount: Integer;\r\nbegin\r\n Result := 0;\r\nend;\r\n\r\nfunction TComponentEditor.GetComponent: TComponent;\r\nbegin\r\n Result := FComponent;\r\nend;\r\n\r\nfunction TComponentEditor.GetComponent(Index: Integer): TComponent;\r\nbegin\r\n Result := FComponent;\r\nend;\r\n\r\nfunction TComponentEditor.GetDefaultProperty: string;\r\nbegin\r\n Result := '';\r\nend;\r\n\r\n{ TRegisteredPropertyEditor }\r\n\r\nconstructor TRegisteredPropertyEditor.Create(APropertyType: PTypeInfo; AClass: TComponentClass; AProperty: string; AEditor: TPropertyEditorClass);\r\nbegin\r\n inherited Create;\r\n\r\n FClass := AClass;\r\n FPropertyName := AProperty;\r\n FPropertyType := APropertyType;\r\n FEditor := AEditor;\r\nend;\r\n\r\n\r\nprocedure TLibraryRequirementsEditor.RequiresLibraries(Proc: TGetStrProc);\r\nbegin\r\n //\r\nend;\r\n\r\n{ TIconDataDict }\r\n\r\nclass destructor TIconDataDict.Destroy;\r\nbegin\r\n FDict.Free;\r\nend;\r\n\r\nclass procedure TIconDataDict.Add(const AComponentName, AConstantName, AUnitName: string);\r\nvar\r\n lData: TIconData;\r\nbegin\r\n if FDict = nil then\r\n FDict := TObjectDictionary.Create([doOwnsValues]);\r\n if FDict.TryGetValue(AComponentName.ToUpper, lData) then\r\n Exit;\r\n\r\n lData := TIconData.Create;\r\n try\r\n lData.NameConst := AConstantName;\r\n lData.NameUnit := AUnitName;\r\n\r\n //make the compiler happy\r\n if lData.NameConst.IsEmpty then;\r\n if lData.NameUnit.IsEmpty then;\r\n\r\n FDict.Add(AComponentName.ToUpper, lData);\r\n lData := nil;\r\n finally\r\n lData.Free;\r\n end;\r\nend;\r\n\r\nclass function TIconDataDict.Find(const AComponentName: string): string;\r\nvar\r\n lData: TIconData;\r\nbegin\r\n Result := string.Empty;\r\n if (FDict = nil) or (not FDict.TryGetValue(AComponentName.ToUpper, lData)) then\r\n Exit;\r\n\r\n asm\r\n Result = pas[lData.FNameUnit][lData.FNameConst];\r\n end;\r\nend;\r\n\r\ninitialization\r\nbegin\r\n RegisteredComponentList := TJSObject.Create(nil);\r\n RegisteredSelectionEditorList := TJSObject.Create(nil);\r\n RegisteredPropertyEditorList := TJSObject.Create(nil);\r\n RegisteredIgnoredPropertyList := TJSObject.Create(nil);\r\n RegisteredLibraryRequirementsEditorList := TJSObject.Create(nil);\r\n RegisteredComponentEditorList := TJSObject.Create(nil);\r\n RegisteredIdentToIntList := TJSObject.Create(nil);\r\nend;\r\n\r\nend.\r\n\r\n","{********************************************************************}\r\n{ }\r\n{ written by TMS Software }\r\n{ Copyright (c) 2022 }\r\n{ Email : info@tmssoftware.com }\r\n{ Web : https://www.tmssoftware.com }\r\n{ }\r\n{ The source code is given as is. The author is not responsible }\r\n{ for any possible damage done due to the use of this code. }\r\n{ The complete source code remains property of the author and may }\r\n{ not be distributed, published, given or sold in any form as such. }\r\n{ No parts of the source code can be included in any other component }\r\n{ or application without written authorization of the author. }\r\n{********************************************************************}\r\n\r\nunit dateutils.helper;\r\n\r\n{$Mode Delphi}\r\n\r\ninterface\r\n\r\nuses\r\n Generics.Defaults, Generics.Collections;\r\n\r\ntype\r\n TDSTPoints = TPair;\r\n\r\n TDateUtilsHelper = class(TObject)\r\n strict private\r\n FCache: TDictionary;\r\n function CalcPoints(const AYear: Integer; out AValue: TDSTPoints): Boolean;\r\n function Find(const AYear: Integer; out AResult: TDSTPoints): Boolean;\r\n public\r\n constructor Create;\r\n destructor Destroy; override;\r\n function Force(const AYear: Integer; out AValue: TDSTPoints): Boolean;\r\n end;\r\n\r\nimplementation\r\n\r\nuses\r\n SysUtils, JS;\r\n\r\n{ TDateUtilsHelper }\r\n\r\nconstructor TDateUtilsHelper.Create;\r\nbegin\r\n inherited Create;\r\n FCache := TDictionary.Create;\r\nend;\r\n\r\ndestructor TDateUtilsHelper.Destroy;\r\nbegin\r\n FCache.Free;\r\n inherited Destroy;\r\nend;\r\n\r\nfunction TDateUtilsHelper.CalcPoints(const AYear: Integer; out AValue: TDSTPoints): Boolean;\r\nconst\r\n cJanuary = 0;\r\n cDecember = 11;\r\nvar\r\n lMonth: Integer;\r\n lDay: Integer;\r\n lHour: Integer;\r\n lDate: TJSDate;\r\n lOffset: NativeInt;\r\n lOffsetNext: NativeInt;\r\n lFirst: Boolean;\r\n lDateTime: TDateTime;\r\nbegin\r\n lFirst := True;\r\n for lMonth := cJanuary to cDecember do\r\n begin\r\n for lDay := 1 to MonthDays[IsLeapYear(AYear)][lMonth + 1] do\r\n begin\r\n for lHour := 0 to HoursPerDay - 1 do\r\n begin\r\n lDate := TJSDate.New(AYear, lMonth, lDay, lHour);\r\n lOffset := lDate.getTimezoneOffset;\r\n\r\n lDate.Hours := lDate.Hours + 1;\r\n lOffsetNext := lDate.getTimezoneOffset;\r\n\r\n if lOffset <> lOffsetNext then\r\n begin\r\n lDateTime := EncodeDate(AYear, lMonth + 1, lDay);\r\n if lFirst then\r\n AValue.Key := lDateTime + EncodeTime(lHour + 1, 0, 0, 0)\r\n else\r\n AValue.Value := lDateTime + EncodeTime(lHour, 0, 0, 0);\r\n lFirst := False;\r\n end;\r\n end;\r\n end;\r\n end;\r\n Result := not lFirst;\r\n if Result then\r\n FCache.Add(AYear, AValue);\r\nend;\r\n\r\nfunction TDateUtilsHelper.Find(const AYear: Integer; out AResult: TDSTPoints): Boolean;\r\nbegin\r\n Result := FCache.TryGetValue(AYear, AResult);\r\nend;\r\n\r\nfunction TDateUtilsHelper.Force(const AYear: Integer; out AValue: TDSTPoints): Boolean;\r\nbegin\r\n Result := Find(AYear, AValue);\r\n if not Result then\r\n Result := CalcPoints(AYear, AValue);\r\nend;\r\n\r\nend.\r\n\r\n","{$mode objfpc}\r\n\r\n{\r\n This file is part of the Free Pascal run time library.\r\n Copyright (c) 2018 by the Free Pascal development team\r\n\r\n Delphi/Kylix compatibility unit, provides Date/Time handling routines.\r\n\r\n See the file COPYING.FPC, included in this distribution,\r\n for details about the copyright.\r\n\r\n This program is distributed in the hope that it will be useful,\r\n but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\r\n\r\n **********************************************************************}\r\n\r\nunit DateUtils;\r\n\r\ninterface\r\n\r\nuses\r\n SysUtils, Math, TimeSpan, DateUtils.Helper;\r\n\r\n{ ---------------------------------------------------------------------\r\n Various constants\r\n ---------------------------------------------------------------------}\r\n\r\nconst\r\n DaysPerWeek = 7;\r\n WeeksPerFortnight = 2;\r\n MonthsPerYear = 12;\r\n YearsPerDecade = 10;\r\n YearsPerCentury = 100;\r\n YearsPerMillennium = 1000;\r\n\r\n // ISO day numbers.\r\n DayMonday = 1;\r\n DayTuesday = 2;\r\n DayWednesday = 3;\r\n DayThursday = 4;\r\n DayFriday = 5;\r\n DaySaturday = 6;\r\n DaySunday = 7;\r\n\r\n // Fraction of a day\r\n OneHour = TDateTime(1)/HoursPerDay;\r\n OneMinute = TDateTime(1)/MinsPerDay;\r\n OneSecond = TDateTime(1)/SecsPerDay;\r\n OneMillisecond = TDateTime(1)/MSecsPerDay;\r\n\r\n { This is actual days per year but you need to know if it's a leap year}\r\n DaysPerYear: array [Boolean] of Word = (365, 366);\r\n\r\n { Used in RecodeDate, RecodeTime and RecodeDateTime for those datetime }\r\n { fields you want to leave alone }\r\n RecodeLeaveFieldAsIs = 65535;\r\n\r\n{ ---------------------------------------------------------------------\r\n Global variables used in this unit\r\n ---------------------------------------------------------------------}\r\n\r\nConst\r\n\r\n { Average over a 4 year span. Valid for next 100 years }\r\n ApproxDaysPerMonth: Double = 30.4375;\r\n ApproxDaysPerYear: Double = 365.25;\r\n\r\n\r\n\r\n{ ---------------------------------------------------------------------\r\n Simple trimming functions.\r\n ---------------------------------------------------------------------}\r\n\r\nFunction DateOf(const AValue: TDateTime): TDateTime;\r\nFunction TimeOf(const AValue: TDateTime): TDateTime;\r\n\r\n{ ---------------------------------------------------------------------\r\n Identification functions.\r\n ---------------------------------------------------------------------}\r\n\r\nFunction IsInLeapYear(const AValue: TDateTime): Boolean;\r\nFunction IsPM(const AValue: TDateTime): Boolean;\r\nFunction IsValidDate(const AYear, AMonth, ADay: Word): Boolean;\r\nFunction IsValidTime(const AHour, AMinute, ASecond, AMilliSecond: Word): Boolean;\r\nFunction IsValidDateTime(const AYear, AMonth, ADay, AHour, AMinute, ASecond, AMilliSecond: Word): Boolean;\r\nFunction IsValidDateDay(const AYear, ADayOfYear: Word): Boolean;\r\nFunction IsValidDateWeek(const AYear, AWeekOfYear, ADayOfWeek: Word): Boolean;\r\nFunction IsValidDateMonthWeek(const AYear, AMonth, AWeekOfMonth, ADayOfWeek: Word): Boolean;\r\n\r\n{ ---------------------------------------------------------------------\r\n Enumeration functions.\r\n ---------------------------------------------------------------------}\r\n\r\nFunction WeeksInYear(const AValue: TDateTime): Word;\r\nFunction WeeksInAYear(const AYear: Word): Word;\r\nFunction DaysInYear(const AValue: TDateTime): Word;\r\nFunction DaysInAYear(const AYear: Word): Word;\r\nFunction DaysInMonth(const AValue: TDateTime): Word;\r\nFunction DaysInAMonth(const AYear, AMonth: Word): Word;\r\n\r\n\r\n{ ---------------------------------------------------------------------\r\n Variations on current date/time.\r\n ---------------------------------------------------------------------}\r\n\r\n\r\nFunction Today: TDateTime;\r\nFunction Yesterday: TDateTime;\r\nFunction Tomorrow: TDateTime;\r\nFunction IsToday(const AValue: TDateTime): Boolean;\r\nFunction IsSameDay(const AValue, ABasis: TDateTime): Boolean;\r\nfunction IsSameMonth(const Avalue, ABasis: TDateTime): Boolean;\r\nFunction PreviousDayOfWeek (DayOfWeek : Word) : Word;\r\n\r\n{ ---------------------------------------------------------------------\r\n Extraction functions.\r\n ---------------------------------------------------------------------}\r\n\r\nFunction YearOf(const AValue: TDateTime): Word;\r\nFunction MonthOf(const AValue: TDateTime): Word;\r\nFunction WeekOf(const AValue: TDateTime): Word;\r\nFunction DayOf(const AValue: TDateTime): Word;\r\nFunction HourOf(const AValue: TDateTime): Word;\r\nFunction MinuteOf(const AValue: TDateTime): Word;\r\nFunction SecondOf(const AValue: TDateTime): Word;\r\nFunction MilliSecondOf(const AValue: TDateTime): Word;\r\n\r\n{ ---------------------------------------------------------------------\r\n Start/End of year functions.\r\n ---------------------------------------------------------------------}\r\n\r\nFunction StartOfTheYear(const AValue: TDateTime): TDateTime;\r\nFunction EndOfTheYear(const AValue: TDateTime): TDateTime;\r\nFunction StartOfAYear(const AYear: Word): TDateTime;\r\nFunction EndOfAYear(const AYear: Word): TDateTime;\r\n\r\n{ ---------------------------------------------------------------------\r\n Start/End of month functions.\r\n ---------------------------------------------------------------------}\r\n\r\nFunction StartOfTheMonth(const AValue: TDateTime): TDateTime;\r\nFunction EndOfTheMonth(const AValue: TDateTime): TDateTime;\r\nFunction StartOfAMonth(const AYear, AMonth: Word): TDateTime;\r\nFunction EndOfAMonth(const AYear, AMonth: Word): TDateTime;\r\n\r\n{ ---------------------------------------------------------------------\r\n Start/End of week functions.\r\n ---------------------------------------------------------------------}\r\n\r\n\r\nFunction StartOfTheWeek(const AValue: TDateTime): TDateTime;\r\nFunction EndOfTheWeek(const AValue: TDateTime): TDateTime;\r\nFunction StartOfAWeek(const AYear, AWeekOfYear: Word; const ADayOfWeek: Word): TDateTime;\r\nFunction StartOfAWeek(const AYear, AWeekOfYear: Word): TDateTime; // ADayOFWeek 1\r\nFunction EndOfAWeek(const AYear, AWeekOfYear: Word; const ADayOfWeek: Word): TDateTime;\r\nFunction EndOfAWeek(const AYear, AWeekOfYear: Word): TDateTime; // const ADayOfWeek: Word = 7\r\n\r\n\r\n{ ---------------------------------------------------------------------\r\n Start/End of day functions.\r\n ---------------------------------------------------------------------}\r\n\r\nFunction StartOfTheDay(const AValue: TDateTime): TDateTime;\r\nFunction EndOfTheDay(const AValue: TDateTime): TDateTime;\r\nFunction StartOfADay(const AYear, AMonth, ADay: Word): TDateTime; overload;\r\nFunction StartOfADay(const AYear, ADayOfYear: Word): TDateTime; overload;\r\nFunction EndOfADay(const AYear, AMonth, ADay: Word): TDateTime; overload;\r\nFunction EndOfADay(const AYear, ADayOfYear: Word): TDateTime; overload;\r\n\r\n{ ---------------------------------------------------------------------\r\n Part of year functions.\r\n ---------------------------------------------------------------------}\r\n\r\nFunction MonthOfTheYear(const AValue: TDateTime): Word;\r\nFunction WeekOfTheYear(const AValue: TDateTime): Word; overload;\r\nFunction WeekOfTheYear(const AValue: TDateTime; out AYear: Word): Word; overload;\r\nFunction DayOfTheYear(const AValue: TDateTime): Word;\r\nFunction HourOfTheYear(const AValue: TDateTime): Word;\r\nFunction MinuteOfTheYear(const AValue: TDateTime): LongWord;\r\nFunction SecondOfTheYear(const AValue: TDateTime): LongWord;\r\nFunction MilliSecondOfTheYear(const AValue: TDateTime): NativeLargeInt;\r\n\r\n{ ---------------------------------------------------------------------\r\n Part of month functions.\r\n ---------------------------------------------------------------------}\r\n\r\nFunction WeekOfTheMonth(const AValue: TDateTime): Word; overload;\r\nFunction WeekOfTheMonth(const AValue: TDateTime; out AYear, AMonth: Word): Word; overload;\r\nFunction DayOfTheMonth(const AValue: TDateTime): Word;\r\nFunction HourOfTheMonth(const AValue: TDateTime): Word;\r\nFunction MinuteOfTheMonth(const AValue: TDateTime): Word;\r\nFunction SecondOfTheMonth(const AValue: TDateTime): LongWord;\r\nFunction MilliSecondOfTheMonth(const AValue: TDateTime): LongWord;\r\n\r\n{ ---------------------------------------------------------------------\r\n Part of week functions.\r\n ---------------------------------------------------------------------}\r\n\r\nFunction DayOfTheWeek(const AValue: TDateTime): Word;\r\nFunction HourOfTheWeek(const AValue: TDateTime): Word;\r\nFunction MinuteOfTheWeek(const AValue: TDateTime): Word;\r\nFunction SecondOfTheWeek(const AValue: TDateTime): LongWord;\r\nFunction MilliSecondOfTheWeek(const AValue: TDateTime): LongWord;\r\n\r\n{ ---------------------------------------------------------------------\r\n Part of day functions.\r\n ---------------------------------------------------------------------}\r\n\r\nFunction HourOfTheDay(const AValue: TDateTime): Word;\r\nFunction MinuteOfTheDay(const AValue: TDateTime): Word;\r\nFunction SecondOfTheDay(const AValue: TDateTime): LongWord;\r\nFunction MilliSecondOfTheDay(const AValue: TDateTime): LongWord;\r\n\r\n{ ---------------------------------------------------------------------\r\n Part of hour functions.\r\n ---------------------------------------------------------------------}\r\n\r\nFunction MinuteOfTheHour(const AValue: TDateTime): Word;\r\nFunction SecondOfTheHour(const AValue: TDateTime): Word;\r\nFunction MilliSecondOfTheHour(const AValue: TDateTime): LongWord;\r\n\r\n{ ---------------------------------------------------------------------\r\n Part of minute functions.\r\n ---------------------------------------------------------------------}\r\n\r\n\r\nFunction SecondOfTheMinute(const AValue: TDateTime): Word;\r\nFunction MilliSecondOfTheMinute(const AValue: TDateTime): LongWord;\r\n\r\n{ ---------------------------------------------------------------------\r\n Part of second functions.\r\n ---------------------------------------------------------------------}\r\n\r\nFunction MilliSecondOfTheSecond(const AValue: TDateTime): Word;\r\n\r\n\r\n{ ---------------------------------------------------------------------\r\n Range checking functions.\r\n ---------------------------------------------------------------------}\r\n\r\nFunction WithinPastYears(const ANow, AThen: TDateTime; const AYears: Integer): Boolean;\r\nFunction WithinPastMonths(const ANow, AThen: TDateTime; const AMonths: Integer): Boolean;\r\nFunction WithinPastWeeks(const ANow, AThen: TDateTime; const AWeeks: Integer): Boolean;\r\nFunction WithinPastDays(const ANow, AThen: TDateTime; const ADays: Integer): Boolean;\r\nFunction WithinPastHours(const ANow, AThen: TDateTime; const AHours: NativeLargeInt): Boolean;\r\nFunction WithinPastMinutes(const ANow, AThen: TDateTime; const AMinutes: NativeLargeInt): Boolean;\r\nFunction WithinPastSeconds(const ANow, AThen: TDateTime; const ASeconds: NativeLargeInt): Boolean;\r\nFunction WithinPastMilliSeconds(const ANow, AThen: TDateTime; const AMilliSeconds: NativeLargeInt): Boolean;\r\n\r\n{ ---------------------------------------------------------------------\r\n Period functions.\r\n ---------------------------------------------------------------------}\r\n\r\nFunction YearsBetween(const ANow, AThen: TDateTime; AExact : Boolean = False): Integer;\r\nFunction MonthsBetween(const ANow, AThen: TDateTime; AExact : Boolean = False): Integer;\r\nFunction WeeksBetween(const ANow, AThen: TDateTime): Integer;\r\nFunction DaysBetween(const ANow, AThen: TDateTime): Integer;\r\nFunction HoursBetween(const ANow, AThen: TDateTime): NativeLargeInt;\r\nFunction MinutesBetween(const ANow, AThen: TDateTime): NativeLargeInt;\r\nFunction SecondsBetween(const ANow, AThen: TDateTime): NativeLargeInt;\r\nFunction MilliSecondsBetween(const ANow, AThen: TDateTime): NativeLargeInt;\r\nProcedure PeriodBetween(const ANow, AThen: TDateTime; Out Years, months, days : Word); \r\n\r\n{ ---------------------------------------------------------------------\r\n Timespan in xxx functions.\r\n ---------------------------------------------------------------------}\r\n\r\n{ YearSpan and MonthSpan are approximate values }\r\nFunction YearSpan(const ANow, AThen: TDateTime): Double;\r\nFunction MonthSpan(const ANow, AThen: TDateTime): Double;\r\nFunction WeekSpan(const ANow, AThen: TDateTime): Double;\r\nFunction DaySpan(const ANow, AThen: TDateTime): Double;\r\nFunction HourSpan(const ANow, AThen: TDateTime): Double;\r\nFunction MinuteSpan(const ANow, AThen: TDateTime): Double;\r\nFunction SecondSpan(const ANow, AThen: TDateTime): Double;\r\nFunction MilliSecondSpan(const ANow, AThen: TDateTime): Double;\r\n\r\n{ ---------------------------------------------------------------------\r\n Increment/decrement functions.\r\n ---------------------------------------------------------------------}\r\n\r\nFunction IncYear(const AValue: TDateTime; const ANumberOfYears: Integer ): TDateTime;\r\nFunction IncYear(const AValue: TDateTime): TDateTime; // ; const ANumberOfYears: Integer = 1)\r\n// Function IncMonth is in SysUtils\r\nFunction IncWeek(const AValue: TDateTime; const ANumberOfWeeks: Integer): TDateTime;\r\nFunction IncWeek(const AValue: TDateTime): TDateTime; // ; const ANumberOfWeeks: Integer = 1)\r\nFunction IncDay(const AValue: TDateTime; const ANumberOfDays: Integer): TDateTime;\r\nFunction IncDay(const AValue: TDateTime): TDateTime; //; const ANumberOfDays: Integer = 1)\r\nFunction IncHour(const AValue: TDateTime; const ANumberOfHours: NativeLargeInt): TDateTime;\r\nFunction IncHour(const AValue: TDateTime): TDateTime; //; const ANumberOfHours: NativeLargeInt = 1\r\nFunction IncMinute(const AValue: TDateTime; const ANumberOfMinutes: NativeLargeInt): TDateTime;\r\nFunction IncMinute(const AValue: TDateTime): TDateTime; // ; const ANumberOfMinutes: NativeLargeInt = 1\r\nFunction IncSecond(const AValue: TDateTime; const ANumberOfSeconds: NativeLargeInt): TDateTime;\r\nFunction IncSecond(const AValue: TDateTime): TDateTime; // ; const ANumberOfSeconds: NativeLargeInt = 1\r\nFunction IncMilliSecond(const AValue: TDateTime; const ANumberOfMilliSeconds: NativeLargeInt): TDateTime;\r\nFunction IncMilliSecond(const AValue: TDateTime): TDateTime; // ; const ANumberOfMilliSeconds: NativeLargeInt = 1\r\n\r\n{ ---------------------------------------------------------------------\r\n Encode/Decode of complete timestamp\r\n ---------------------------------------------------------------------}\r\n\r\nFunction EncodeDateTime(const AYear, AMonth, ADay, AHour, AMinute, ASecond, AMilliSecond: Word): TDateTime;\r\nProcedure DecodeDateTime(const AValue: TDateTime; out AYear, AMonth, ADay, AHour, AMinute, ASecond, AMilliSecond: Word);\r\nFunction TryEncodeDateTime(const AYear, AMonth, ADay, AHour, AMinute, ASecond, AMilliSecond: Word; out AValue: TDateTime): Boolean;\r\n\r\n{ ---------------------------------------------------------------------\r\n Encode/decode date, specifying week of year and day of week\r\n ---------------------------------------------------------------------}\r\n\r\nFunction EncodeDateWeek(const AYear, AWeekOfYear: Word; const ADayOfWeek: Word): TDateTime;\r\nFunction EncodeDateWeek(const AYear, AWeekOfYear: Word): TDateTime; //; const ADayOfWeek: Word = 1\r\nProcedure DecodeDateWeek(const AValue: TDateTime; out AYear, AWeekOfYear, ADayOfWeek: Word);\r\nFunction TryEncodeDateWeek(const AYear, AWeekOfYear: Word; out AValue: TDateTime; const ADayOfWeek: Word): Boolean;\r\nFunction TryEncodeDateWeek(const AYear, AWeekOfYear: Word; out AValue: TDateTime): Boolean; //; const ADayOfWeek: Word = 1\r\n\r\n{ ---------------------------------------------------------------------\r\n Encode/decode date, specifying day of year\r\n ---------------------------------------------------------------------}\r\n\r\nFunction EncodeDateDay(const AYear, ADayOfYear: Word): TDateTime;\r\nProcedure DecodeDateDay(const AValue: TDateTime; out AYear, ADayOfYear: Word);\r\nFunction TryEncodeDateDay(const AYear, ADayOfYear: Word; out AValue: TDateTime): Boolean;\r\n\r\n{ ---------------------------------------------------------------------\r\n Encode/decode date, specifying week of month\r\n ---------------------------------------------------------------------}\r\n\r\nFunction EncodeDateMonthWeek(const AYear, AMonth, AWeekOfMonth, ADayOfWeek: Word): TDateTime;\r\nProcedure DecodeDateMonthWeek(const AValue: TDateTime; out AYear, AMonth, AWeekOfMonth, ADayOfWeek: Word);\r\nFunction TryEncodeDateMonthWeek(const AYear, AMonth, AWeekOfMonth, ADayOfWeek: Word; out AValue: TDateTime): Boolean;\r\n\r\n{ ---------------------------------------------------------------------\r\n Encode time interval, allowing hours>24\r\n ---------------------------------------------------------------------}\r\n\r\nfunction TryEncodeTimeInterval(Hour, Min, Sec, MSec:word; Out Time : TDateTime) : boolean;\r\nfunction EncodeTimeInterval(Hour, Minute, Second, MilliSecond:word): TDateTime;\r\n\r\n{ ---------------------------------------------------------------------\r\n Replace given element with supplied value.\r\n ---------------------------------------------------------------------}\r\n\r\nFunction RecodeYear(const AValue: TDateTime; const AYear: Word): TDateTime;\r\nFunction RecodeMonth(const AValue: TDateTime; const AMonth: Word): TDateTime;\r\nFunction RecodeDay(const AValue: TDateTime; const ADay: Word): TDateTime;\r\nFunction RecodeHour(const AValue: TDateTime; const AHour: Word): TDateTime;\r\nFunction RecodeMinute(const AValue: TDateTime; const AMinute: Word): TDateTime;\r\nFunction RecodeSecond(const AValue: TDateTime; const ASecond: Word): TDateTime;\r\nFunction RecodeMilliSecond(const AValue: TDateTime; const AMilliSecond: Word): TDateTime;\r\nFunction RecodeDate(const AValue: TDateTime; const AYear, AMonth, ADay: Word): TDateTime;\r\nFunction RecodeTime(const AValue: TDateTime; const AHour, AMinute, ASecond, AMilliSecond: Word): TDateTime;\r\nFunction RecodeDateTime(const AValue: TDateTime; const AYear, AMonth, ADay, AHour, AMinute, ASecond, AMilliSecond: Word): TDateTime;\r\nFunction TryRecodeDateTime(const AValue: TDateTime; const AYear, AMonth, ADay, AHour, AMinute, ASecond, AMilliSecond: Word; out AResult: TDateTime): Boolean;\r\n\r\n{ ---------------------------------------------------------------------\r\n Comparision of date/time\r\n ---------------------------------------------------------------------}\r\n\r\nFunction CompareDateTime(const A, B: TDateTime): TValueRelationship;\r\nFunction CompareDate(const A, B: TDateTime): TValueRelationship;\r\nFunction CompareTime(const A, B: TDateTime): TValueRelationship;\r\nFunction SameDateTime(const A, B: TDateTime): Boolean;\r\nFunction SameDate(const A, B: TDateTime): Boolean;\r\nFunction SameTime(const A, B: TDateTime): Boolean;\r\n\r\n{ For a given date these Functions tell you the which day of the week of the\r\n month (or year). If its a Thursday, they will tell you if its the first,\r\n second, etc Thursday of the month (or year). Remember, even though its\r\n the first Thursday of the year it doesn't mean its the first week of the\r\n year. See ISO 8601 above for more information. }\r\n\r\nFunction NthDayOfWeek(const AValue: TDateTime): Word;\r\n\r\nProcedure DecodeDayOfWeekInMonth(const AValue: TDateTime; out AYear, AMonth, ANthDayOfWeek, ADayOfWeek: Word);\r\n\r\nFunction EncodeDayOfWeekInMonth(const AYear, AMonth, ANthDayOfWeek, ADayOfWeek: Word): TDateTime;\r\nFunction TryEncodeDayOfWeekInMonth(const AYear, AMonth, ANthDayOfWeek, ADayOfWeek: Word; out AValue: TDateTime): Boolean;\r\n\r\n{ ---------------------------------------------------------------------\r\n Exception throwing routines\r\n ---------------------------------------------------------------------}\r\n\r\nProcedure InvalidDateTimeError(const AYear, AMonth, ADay, AHour, AMinute, ASecond, AMilliSecond: Word; const ABaseDate: TDateTime);\r\nProcedure InvalidDateTimeError(const AYear, AMonth, ADay, AHour, AMinute, ASecond, AMilliSecond: Word); // const ABaseDate: TDateTime = 0\r\nProcedure InvalidDateWeekError(const AYear, AWeekOfYear, ADayOfWeek: Word);\r\nProcedure InvalidDateDayError(const AYear, ADayOfYear: Word);\r\nProcedure InvalidDateMonthWeekError(const AYear, AMonth, AWeekOfMonth, ADayOfWeek: Word);\r\nProcedure InvalidDayOfWeekInMonthError(const AYear, AMonth, ANthDayOfWeek, ADayOfWeek: Word);\r\n\r\n{ ---------------------------------------------------------------------\r\n Julian and Modified Julian Date conversion support\r\n ---------------------------------------------------------------------}\r\n\r\nFunction DateTimeToJulianDate(const AValue: TDateTime): Double;\r\nFunction JulianDateToDateTime(const AValue: Double): TDateTime;\r\nFunction TryJulianDateToDateTime(const AValue: Double; out ADateTime: TDateTime): Boolean;\r\n\r\nFunction DateTimeToModifiedJulianDate(const AValue: TDateTime): Double;\r\nFunction ModifiedJulianDateToDateTime(const AValue: Double): TDateTime;\r\nFunction TryModifiedJulianDateToDateTime(const AValue: Double; out ADateTime: TDateTime): Boolean;\r\n\r\n{ ---------------------------------------------------------------------\r\n Unix timestamp support.\r\n ---------------------------------------------------------------------}\r\n\r\nFunction DateTimeToUnix(const AValue: TDateTime): NativeLargeInt;\r\nFunction UnixToDateTime(const AValue: NativeLargeInt; AReturnUTC: Boolean = True): TDateTime;\r\nFunction UnixTimeStampToMac(const AValue: NativeLargeInt): NativeLargeInt;\r\n\r\n{ ---------------------------------------------------------------------\r\n Mac timestamp support.\r\n ---------------------------------------------------------------------}\r\n\r\nFunction DateTimeToMac(const AValue: TDateTime): NativeLargeInt;\r\nFunction MacToDateTime(const AValue: NativeLargeInt): TDateTime;\r\nFunction MacTimeStampToUnix(const AValue: NativeLargeInt): NativeLargeInt;\r\n\r\n{ .....................................................................\r\n Dos <-> Delphi datetime support\r\n .....................................................................}\r\n\r\nFunction DateTimeToDosDateTime(const AValue: TDateTime): longint;\r\nFunction DosDateTimeToDateTime( AValue: longint): TDateTime;\r\n\r\n{ UTC <-> Local time }\r\n\r\nFunction UniversalTimeToLocal(UT: TDateTime): TDateTime;\r\nFunction UniversalTimeToLocal(UT: TDateTime; TZOffset : Integer): TDateTime;\r\nFunction LocalTimeToUniversal(LT: TDateTime): TDateTime;\r\nFunction LocalTimeToUniversal(LT: TDateTime; TZOffset: Integer): TDateTime;\r\n\r\n{ RFC 3339 support }\r\n\r\nFunction DateTimeToRFC3339(ADate :TDateTime):string;\r\nFunction DateToRFC3339(ADate :TDateTime):string;\r\nFunction TimeToRFC3339(ADate :TDateTime):string;\r\nFunction TryRFC3339ToDateTime(const Avalue: String; out ADateTime: TDateTime): Boolean;\r\nFunction RFC3339ToDateTime(const Avalue: String): TDateTime;\r\n\r\nfunction DateTimeToMilliseconds(const ADateTime: TDateTime): Int64;\r\nfunction TimeToMilliseconds(const ATime: TTime): Integer;\r\n\r\nType\r\n {\r\n Inverse of formatdatetime, destined for the dateutils unit of FPC.\r\n\r\n Limitations/implementation details:\r\n - An inverse of FormatDateTime is not 100% an inverse, simply because one can put e.g. time tokens twice in the format string,\r\n and scandatetime wouldn't know which time to pick.\r\n - Strings like hn can't be reversed safely. E.g. 1:2 (2 minutes after 1) delivers 12 which is parsed as 12:00 and then\r\n misses chars for the \"n\" part.\r\n - trailing characters are ignored.\r\n - no support for Eastern Asian formatting characters since they are windows only.\r\n - no MBCS support.\r\n\r\n Extensions\r\n - #9 eats whitespace.\r\n - whitespace at the end of a pattern is optional.\r\n - ? matches any char.\r\n - Quote the above chars to really match the char.\r\n }\r\n\r\n { TDateTimeScanner }\r\n\r\n TDateTimeScanner = Class\r\n Private\r\n FPattern: String;\r\n FText: String;\r\n FPatternOffset,\r\n FLen,FPatternLen: Integer;\r\n FPatternPos,FPos : Integer;\r\n FY,FM,FD : Word;\r\n FTimeval : TDateTime;\r\n procedure ArrayMatchError;\r\n procedure DoDateTime;\r\n procedure SetPattern(AValue: String);\r\n procedure SetText(AValue: String);\r\n function ScanFixedInt(maxv:integer):integer;\r\n function ScanPatternLength :integer;\r\n procedure MatchChar(c:char);\r\n function FindIMatch(const values :array of string; aTerm : string):integer;\r\n function FindMatch(const Values : array of string):integer;\r\n Procedure MatchPattern(const aPattern : String);\r\n Procedure DoYear;\r\n Procedure DoMonth;\r\n Procedure DoDay;\r\n Procedure DoTime;\r\n Procedure DoAMPM;\r\n Public\r\n Function Scan(StartPos: integer = -1) : TDateTime;\r\n property Pattern : String Read FPattern Write SetPattern;\r\n Property Text : String Read FText Write SetText;\r\n Property PatternOffset : Integer Read FPatternOffset;\r\n Property Position: Integer read FPos;\r\n end;\r\n\r\n // Easy access function\r\nFunction ScanDateTime(APattern,AValue: String; APos : integer = 1) : TDateTime;\r\n\r\n{********************************************************************}\r\n{ }\r\n{ written by TMS Software }\r\n{ Copyright (c) 2022 }\r\n{ Email : info@tmssoftware.com }\r\n{ Web : http://www.tmssoftware.com }\r\n{ }\r\n{ The source code is given as is. The author is not responsible }\r\n{ for any possible damage done due to the use of this code. }\r\n{ The complete source code remains property of the author and may }\r\n{ not be distributed, published, given or sold in any form as such. }\r\n{ No parts of the source code can be included in any other component }\r\n{ or application without written authorization of the author. }\r\n{********************************************************************}\r\n\r\ntype\r\n TLocalTimeType = (lttStandard, lttDaylight, lttAmbiguous, lttInvalid);\r\n\r\n ELocalTimeInvalid = class(Exception);\r\n EDateTimeException = class(Exception);\r\n\r\n TTimeZone = class abstract(TObject)\r\n strict private class var\r\n FLocal: TTimeZone;\r\n strict private\r\n function GetAbbreviationForNow: string;\r\n function GetCurrentUtcOffset: TTimeSpan;\r\n function GetDisplayNameForNow: string;\r\n class function GetLocal: TTimeZone;\r\n function GetUtcOffsetInSeconds(const ADateTime: TDateTime; const AForceDaylight: Boolean): Int64;\r\n strict protected\r\n function DoGetDisplayName(const ADateTime: TDateTime; const AForceDaylight: Boolean): string; virtual; abstract;\r\n function DoGetID: string; virtual; abstract;\r\n procedure DoGetOffsetsAndType(const ADateTime: TDateTime; out AOffset, ADstSave: Int64; out AType: TLocalTimeType); virtual; abstract;\r\n public\r\n function GetAbbreviation(const ADateTime: TDateTime; const AForceDaylight: Boolean = False): string;\r\n function GetDisplayName(const ADateTime: TDateTime; const AForceDaylight: Boolean = False): string;\r\n function GetLocalTimeType(const ADateTime: TDateTime): TLocalTimeType; inline;\r\n function GetUtcOffset(const ADateTime: TDateTime; const AForceDaylight: Boolean = False): TTimeSpan; inline;\r\n function HasDST: Boolean; overload; inline;\r\n function HasDST(const AYear: TDateTime): Boolean; overload;\r\n function IncMilliSecond(const AValue: TDateTime; const ANumberOfMilliSeconds: Int64 = 1): TDateTime;\r\n function IncSecond(const AValue: TDateTime; const ANumberOfSeconds: Int64 = 1): TDateTime; inline;\r\n function IsAmbiguousTime(const ADateTime: TDateTime): Boolean; inline;\r\n function IsDaylightTime(const ADateTime: TDateTime; const AForceDaylight: Boolean = False): Boolean;\r\n function IsInvalidTime(const ADateTime: TDateTime): Boolean; inline;\r\n function IsStandardTime(const ADateTime: TDateTime; const AForceDaylight: Boolean = False): Boolean;\r\n function ToLocalTime(const ADateTime: TDateTime): TDateTime;\r\n function ToUniversalTime(const ADateTime: TDateTime; const AForceDaylight: Boolean = False): TDateTime; inline;\r\n property Abbreviation: string read GetAbbreviationForNow;\r\n property DisplayName: string read GetDisplayNameForNow;\r\n property ID: string read DoGetID;\r\n class property Local: TTimeZone read GetLocal;\r\n property UtcOffset: TTimeSpan read GetCurrentUtcOffset;\r\n end;\r\n\r\n TLocalTimeZone = class(TTimeZone)\r\n strict private\r\n FDST: TDateUtilsHelper;\r\n strict protected\r\n function DoGetDisplayName(const ADateTime: TDateTime; const AForceDaylight: Boolean): string; override;\r\n function DoGetID: string; override;\r\n procedure DoGetOffsetsAndType(const ADateTime: TDateTime; out AOffset, ADstSave: Int64; out AType: TLocalTimeType); override;\r\n public\r\n constructor Create;\r\n destructor Destroy; override;\r\n end;\r\n\r\nimplementation\r\n\r\nuses js, rtlconsts;\r\n\r\nconst\r\n TDateTimeEpsilon = 2.2204460493e-16;\r\n HalfMilliSecond = OneMillisecond /2 ;\r\n\r\nresourcestring\r\n SLocalTimeInvalid = 'The given \"%s\" local time is invalid (situated within the missing period prior to DST).';\r\n\r\n{ ---------------------------------------------------------------------\r\n Simple trimming functions.\r\n ---------------------------------------------------------------------}\r\n\r\nFunction DateOf(const AValue: TDateTime): TDateTime;\r\nbegin\r\n Result:=Trunc(AValue);\r\nend;\r\n\r\n\r\nFunction TimeOf(const AValue: TDateTime): TDateTime;\r\nbegin\r\n Result:=Frac(Avalue);\r\nend;\r\n\r\n\r\n{ ---------------------------------------------------------------------\r\n Identification functions.\r\n ---------------------------------------------------------------------}\r\n\r\n\r\nFunction IsInLeapYear(const AValue: TDateTime): Boolean;\r\nbegin\r\n Result:=IsLeapYear(YearOf(AValue));\r\nend;\r\n\r\n\r\nFunction IsPM(const AValue: TDateTime): Boolean;\r\nbegin\r\n Result:=(HourOf(AValue)>=12);\r\nend;\r\n\r\n\r\nFunction IsValidMonth(AMonth : Word) : Boolean;\r\n\r\nbegin\r\n Result:=(AMonth>=1) and (AMonth<=12);\r\nend;\r\n\r\nFunction IsValidDayOfWeek(ADayOfWeek : Word) : Boolean;\r\n\r\nbegin\r\n Result:=(ADayOfWeek>=1) and (ADayOfWeek<=7);\r\nend;\r\n\r\nFunction IsValidWeekOfMonth(AWeekOfMonth : Word) : Boolean;\r\n\r\nbegin\r\n Result:=(AWeekOfMonth>=1) and (AWeekOfMonth<=5);\r\nend;\r\n\r\nFunction IsValidDate(const AYear, AMonth, ADay: Word): Boolean;\r\nbegin\r\n Result:=(AYear<>0) and (AYear<10000)\r\n and IsValidMonth(AMonth)\r\n and (ADay<>0) and (ADay<=MonthDays[IsleapYear(AYear),AMonth]);\r\nend;\r\n\r\n\r\nFunction IsValidTime(const AHour, AMinute, ASecond, AMilliSecond: Word): Boolean;\r\nbegin\r\n Result:=(AHour=HoursPerDay) and (AMinute=0) and (ASecond=0) and (AMillisecond=0);\r\n Result:=Result or\r\n ((AHour0) and (ADayOfYear<>0) and (AYear<10000) and\r\n (ADayOfYear<=DaysPerYear[IsLeapYear(AYear)]);\r\nend;\r\n\r\n\r\nFunction IsValidDateWeek(const AYear, AWeekOfYear, ADayOfWeek: Word): Boolean;\r\nbegin\r\n Result:=(AYear<>0) and (AYear<10000)\r\n and IsValidDayOfWeek(ADayOfWeek)\r\n and (AWeekOfYear<>0)\r\n and (AWeekOfYear<=WeeksInaYear(AYear));\r\n { should we not also check whether the day of the week is not\r\n larger than the last day of the last week in the year 9999 ?? }\r\nend;\r\n\r\n\r\nFunction IsValidDateMonthWeek(const AYear, AMonth, AWeekOfMonth, ADayOfWeek: Word): Boolean;\r\n\r\nbegin\r\n Result:=(AYear<>0) and (AYear<10000)\r\n and IsValidMonth(AMonth)\r\n and IsValidWeekOfMonth(AWeekOfMonth)\r\n and IsValidDayOfWeek(ADayOfWeek);\r\nend;\r\n\r\n{ ---------------------------------------------------------------------\r\n Enumeration functions.\r\n ---------------------------------------------------------------------}\r\n\r\nFunction WeeksInYear(const AValue: TDateTime): Word;\r\nbegin\r\n Result:=WeeksInAYear(YearOf(AValue));\r\nend;\r\n\r\n\r\nFunction WeeksInAYear(const AYear: Word): Word;\r\n\r\nVar\r\n DOW : Word;\r\n\r\nbegin\r\n Result:=52;\r\n DOW:=DayOfTheWeek(StartOfAYear(AYear));\r\n If (DOW=4) or ((DOW=3) and IsLeapYear(AYear)) then\r\n Inc(Result);\r\nend;\r\n\r\n\r\nFunction DaysInYear(const AValue: TDateTime): Word;\r\nbegin\r\n Result:=DaysPerYear[IsLeapYear(YearOf(AValue))];\r\nend;\r\n\r\n\r\nFunction DaysInAYear(const AYear: Word): Word;\r\nbegin\r\n Result:=DaysPerYear[Isleapyear(AYear)];\r\nend;\r\n\r\n\r\nFunction DaysInMonth(const AValue: TDateTime): Word;\r\n\r\nVar\r\n Y,M,D : Word;\r\n\r\nbegin\r\n Decodedate(AValue,Y,M,D);\r\n Result:=MonthDays[IsLeapYear(Y),M];\r\nend;\r\n\r\n\r\nFunction DaysInAMonth(const AYear, AMonth: Word): Word;\r\nbegin\r\n Result:=MonthDays[IsLeapYear(AYear),AMonth];\r\nend;\r\n\r\n\r\n{ ---------------------------------------------------------------------\r\n Variations on current date/time.\r\n ---------------------------------------------------------------------}\r\n\r\n\r\nFunction Today: TDateTime;\r\nbegin\r\n Result:=Date();\r\nend;\r\n\r\n\r\nFunction Yesterday: TDateTime;\r\nbegin\r\n Result:=Date()-1;\r\nend;\r\n\r\n\r\nFunction Tomorrow: TDateTime; \r\nbegin\r\n Result:=Date()+1;\r\nend;\r\n\r\n\r\nFunction IsToday(const AValue: TDateTime): Boolean;\r\nbegin\r\n Result:=IsSameDay(AValue,Date());\r\nend;\r\n\r\n\r\nFunction IsSameDay(const AValue, ABasis: TDateTime): Boolean;\r\n\r\nVar\r\n D : TDateTime;\r\n\r\nbegin\r\n D:=AValue-Trunc(ABasis);\r\n Result:=(D>=0) and (D<1);\r\nend;\r\n\r\nfunction IsSameMonth(const Avalue, ABasis: TDateTime): Boolean;\r\nbegin\r\n result:=( YearOf(Avalue) = YearOf(Abasis) );\r\n result:=result and ( MonthOf(AValue) = MonthOf(ABasis) );\r\nend;\r\n\r\nconst\r\n DOWMap: array [1..7] of Word = (7, 1, 2, 3, 4, 5, 6);\r\n\r\nFunction PreviousDayOfWeek (DayOfWeek : Word) : Word;\r\n\r\nbegin\r\n If Not IsValidDayOfWeek(DayOfWeek) then\r\n Raise EConvertError.CreateFmt(SErrInvalidDayOfWeek,[DayOfWeek]);\r\n Result:=DOWMap[DayOfWeek];\r\nend;\r\n\r\n\r\n\r\n{ ---------------------------------------------------------------------\r\n Extraction functions.\r\n ---------------------------------------------------------------------}\r\n\r\n\r\nFunction YearOf(const AValue: TDateTime): Word;\r\n\r\nVar\r\n D,M : Word;\r\n\r\nbegin\r\n DecodeDate(AValue,Result,D,M);\r\nend;\r\n\r\n\r\nFunction MonthOf(const AValue: TDateTime): Word;\r\n\r\nVar\r\n Y,D : Word;\r\n\r\nbegin\r\n DecodeDate(AValue,Y,Result,D);\r\nend;\r\n\r\n\r\nFunction WeekOf(const AValue: TDateTime): Word;\r\nbegin\r\n Result:=WeekOfTheYear(AValue);\r\nend;\r\n\r\n\r\nFunction DayOf(const AValue: TDateTime): Word;\r\n\r\nVar\r\n Y,M : Word;\r\n\r\nbegin\r\n DecodeDate(AValue,Y,M,Result);\r\nend;\r\n\r\n\r\nFunction HourOf(const AValue: TDateTime): Word;\r\n\r\nVar\r\n N,S,MS : Word;\r\n\r\nbegin\r\n DecodeTime(AValue,Result,N,S,MS);\r\nend;\r\n\r\n\r\nFunction MinuteOf(const AValue: TDateTime): Word;\r\n\r\nVar\r\n H,S,MS : Word;\r\n\r\nbegin\r\n DecodeTime(AValue,H,Result,S,MS);\r\nend;\r\n\r\n\r\nFunction SecondOf(const AValue: TDateTime): Word;\r\n\r\nVar\r\n H,N,MS : Word;\r\n\r\nbegin\r\n DecodeTime(AValue,H,N,Result,MS);\r\nend;\r\n\r\n\r\nFunction MilliSecondOf(const AValue: TDateTime): Word;\r\n\r\nVar\r\n H,N,S : Word;\r\n\r\nbegin\r\n DecodeTime(AValue,H,N,S,Result);\r\nend;\r\n\r\n\r\n{ ---------------------------------------------------------------------\r\n Start/End of year functions.\r\n ---------------------------------------------------------------------}\r\n\r\n\r\nFunction StartOfTheYear(const AValue: TDateTime): TDateTime;\r\nbegin\r\n Result:=EncodeDate(YearOf(AValue),1,1);\r\nend;\r\n\r\n\r\nFunction EndOfTheYear(const AValue: TDateTime): TDateTime;\r\nbegin\r\n Result:=EncodeDateTime(YearOf(AValue),12,31,23,59,59,999);\r\nend;\r\n\r\n\r\nFunction StartOfAYear(const AYear: Word): TDateTime;\r\nbegin\r\n Result:=EncodeDate(AYear,1,1);\r\nend;\r\n\r\n\r\nFunction EndOfAYear(const AYear: Word): TDateTime;\r\n\r\nbegin\r\n Result:=(EncodeDateTime(AYear,12,31,23,59,59,999));\r\nend;\r\n\r\n{ ---------------------------------------------------------------------\r\n Start/End of month functions.\r\n ---------------------------------------------------------------------}\r\n\r\nFunction StartOfTheMonth(const AValue: TDateTime): TDateTime;\r\n\r\nVar\r\n Y,M,D : Word;\r\n\r\nbegin\r\n DecodeDate(AValue,Y,M,D);\r\n Result:=EncodeDate(Y,M,1);\r\n// MonthDays[IsLeapYear(Y),M])\r\nend;\r\n\r\n\r\nFunction EndOfTheMonth(const AValue: TDateTime): TDateTime;\r\n\r\nVar\r\n Y,M,D : Word;\r\n\r\nbegin\r\n DecodeDate(AValue,Y,M,D);\r\n Result:=EncodeDateTime(Y,M,MonthDays[IsLeapYear(Y),M],23,59,59,999);\r\nend;\r\n\r\n\r\nFunction StartOfAMonth(const AYear, AMonth: Word): TDateTime;\r\nbegin\r\n Result:=EncodeDate(AYear,AMonth,1);\r\nend;\r\n\r\n\r\nFunction EndOfAMonth(const AYear, AMonth: Word): TDateTime;\r\n\r\nbegin\r\n Result:=EncodeDateTime(AYear,AMonth,MonthDays[IsLeapYear(AYear),AMonth],23,59,59,999);\r\nend;\r\n\r\n\r\n{ ---------------------------------------------------------------------\r\n Start/End of week functions.\r\n ---------------------------------------------------------------------}\r\n\r\n\r\nFunction StartOfTheWeek(const AValue: TDateTime): TDateTime;\r\nbegin\r\n Result:=Trunc(AValue)-DayOfTheWeek(AValue)+1;\r\nend;\r\n\r\n\r\nFunction EndOfTheWeek(const AValue: TDateTime): TDateTime;\r\nbegin\r\n Result:=EndOfTheDay(AValue-DayOfTheWeek(AValue)+7);\r\nend;\r\n\r\n\r\nFunction StartOfAWeek(const AYear, AWeekOfYear: Word; const ADayOfWeek: Word): TDateTime;\r\nbegin\r\n Result:=EncodeDateWeek(AYear,AWeekOfYear,ADayOfWeek);\r\nend;\r\n\r\n\r\nFunction StartOfAWeek(const AYear, AWeekOfYear: Word): TDateTime; // ADayOFWeek 1\r\nbegin\r\n Result:=StartOfAWeek(AYear,AWeekOfYear,1)\r\nend;\r\n\r\n\r\nFunction EndOfAWeek(const AYear, AWeekOfYear: Word; const ADayOfWeek: Word): TDateTime;\r\nbegin\r\n Result := EndOfTheDay(EncodeDateWeek(AYear, AWeekOfYear, ADayOfWeek));\r\nend;\r\n\r\n\r\nFunction EndOfAWeek(const AYear, AWeekOfYear: Word): TDateTime; // const ADayOfWeek: Word = 7\r\n\r\n\r\nbegin\r\n Result:=EndOfAWeek(AYear,AWeekOfYear,7);\r\nend;\r\n\r\n{ ---------------------------------------------------------------------\r\n Start/End of day functions.\r\n ---------------------------------------------------------------------}\r\n\r\nFunction StartOfTheDay(const AValue: TDateTime): TDateTime;\r\nbegin\r\n Result:=Trunc(Avalue);\r\nend;\r\n\r\n\r\nFunction EndOfTheDay(const AValue: TDateTime): TDateTime;\r\n\r\nVar\r\n Y,M,D : Word;\r\n\r\nbegin\r\n DecodeDate(AValue,Y,M,D);\r\n Result:=EncodeDateTime(Y,M,D,23,59,59,999);\r\nend;\r\n\r\n\r\nFunction StartOfADay(const AYear, AMonth, ADay: Word): TDateTime;\r\nbegin\r\n Result:=EncodeDate(AYear,AMonth,ADay);\r\nend;\r\n\r\n\r\nFunction StartOfADay(const AYear, ADayOfYear: Word): TDateTime;\r\nbegin\r\n Result:=StartOfAYear(AYear)+ADayOfYear-1;\r\nend;\r\n\r\n\r\nFunction EndOfADay(const AYear, AMonth, ADay: Word): TDateTime;\r\nbegin\r\n Result:=EndOfTheDay(EncodeDate(AYear,AMonth,ADay));\r\nend;\r\n\r\n\r\nFunction EndOfADay(const AYear, ADayOfYear: Word): TDateTime;\r\n\r\n\r\nbegin\r\n Result:=StartOfAYear(AYear)+ADayOfYear-1+EncodeTime(23,59,59,999);\r\nend;\r\n\r\n{ ---------------------------------------------------------------------\r\n Part of year functions.\r\n ---------------------------------------------------------------------}\r\n\r\n\r\nFunction MonthOfTheYear(const AValue: TDateTime): Word;\r\nbegin\r\n Result:=MonthOf(AValue);\r\nend;\r\n\r\n\r\nFunction WeekOfTheYear(const AValue: TDateTime): Word;\r\n\r\nVar\r\n Y,DOW : Word;\r\n\r\nbegin\r\n DecodeDateWeek(AValue,Y,Result,DOW)\r\nend;\r\n\r\n\r\nFunction WeekOfTheYear(const AValue: TDateTime; out AYear: Word): Word;\r\n\r\nVar\r\n DOW : Word;\r\n\r\nbegin\r\n DecodeDateWeek(AValue,AYear,Result,DOW);\r\nend;\r\n\r\n\r\nFunction DayOfTheYear(const AValue: TDateTime): Word;\r\nbegin\r\n Result:=Trunc(AValue-StartOfTheYear(AValue)+1);\r\nend;\r\n\r\n\r\nFunction HourOfTheYear(const AValue: TDateTime): Word;\r\n\r\nVar\r\n H,M,S,MS : Word;\r\n\r\nbegin\r\n DecodeTime(AValue,H,M,S,MS);\r\n Result:=H+((DayOfTheYear(AValue)-1)*24);\r\nend;\r\n\r\n\r\nFunction MinuteOfTheYear(const AValue: TDateTime): LongWord;\r\n\r\nVar\r\n H,M,S,MS : Word;\r\n\r\nbegin\r\n DecodeTime(AValue,H,M,S,MS);\r\n Result:=M+(H+((DayOfTheYear(AValue)-1)*24))*60;\r\nend;\r\n\r\n\r\nFunction SecondOfTheYear(const AValue: TDateTime): LongWord;\r\n\r\nVar\r\n H,M,S,MS : Word;\r\n\r\nbegin\r\n DecodeTime(AValue,H,M,S,MS);\r\n Result:=(M+(H+((DayOfTheYear(AValue)-1)*24))*60)*60+S;\r\nend;\r\n\r\n\r\nFunction MilliSecondOfTheYear(const AValue: TDateTime): NativeLargeInt;\r\n\r\nVar\r\n H,M,S,MS : Word;\r\n\r\nbegin\r\n DecodeTime(AValue,H,M,S,MS);\r\n Result:=((M+(H+((NativeLargeInt(DayOfTheYear(AValue))-1)*24))*60)*60+S)*1000+MS;\r\nend;\r\n\r\n\r\n{ ---------------------------------------------------------------------\r\n Part of month functions.\r\n ---------------------------------------------------------------------}\r\n\r\n\r\nFunction WeekOfTheMonth(const AValue: TDateTime): Word;\r\n\r\nvar\r\n Y,M,DOW : word;\r\n\r\nbegin\r\n DecodeDateMonthWeek(AValue,Y,M,Result,DOW);\r\nend;\r\n\r\n\r\nFunction WeekOfTheMonth(const AValue: TDateTime; out AYear, AMonth: Word): Word;\r\n\r\nVar\r\n DOW : Word;\r\n\r\nbegin\r\n DecodeDateMonthWeek(AValue,AYear,AMonth,Result,DOW);\r\nend;\r\n\r\n\r\nFunction DayOfTheMonth(const AValue: TDateTime): Word;\r\n\r\nVar\r\n Y,M : Word;\r\n\r\nbegin\r\n DecodeDate(AValue,Y,M,Result);\r\nend;\r\n\r\n\r\nFunction HourOfTheMonth(const AValue: TDateTime): Word;\r\n\r\nVar\r\n Y,M,D,H,N,S,MS : Word;\r\n\r\nbegin\r\n DecodeDateTime(AValue,Y,M,D,H,N,S,MS);\r\n Result:=(D-1)*24+H;\r\nend;\r\n\r\n\r\nFunction MinuteOfTheMonth(const AValue: TDateTime): Word;\r\n\r\nVar\r\n Y,M,D,H,N,S,MS : Word;\r\n\r\nbegin\r\n DecodeDateTime(AValue,Y,M,D,H,N,S,MS);\r\n Result:=((D-1)*24+H)*60+N;\r\nend;\r\n\r\n\r\nFunction SecondOfTheMonth(const AValue: TDateTime): LongWord;\r\n\r\nVar\r\n Y,M,D,H,N,S,MS : Word;\r\n\r\nbegin\r\n DecodeDateTime(AValue,Y,M,D,H,N,S,MS);\r\n Result:=(((D-1)*24+H)*60+N)*60+S;\r\nend;\r\n\r\n\r\nFunction MilliSecondOfTheMonth(const AValue: TDateTime): LongWord;\r\n\r\nVar\r\n Y,M,D,H,N,S,MS : Word;\r\n\r\nbegin\r\n DecodeDateTime(AValue,Y,M,D,H,N,S,MS);\r\n Result:=((((D-1)*24+H)*60+N)*60+S)*1000+MS;\r\nend;\r\n\r\n{ ---------------------------------------------------------------------\r\n Part of week functions.\r\n ---------------------------------------------------------------------}\r\n\r\n\r\nFunction DayOfTheWeek(const AValue: TDateTime): Word;\r\n\r\nbegin\r\n Result:=DowMAP[DayOfWeek(AValue)];\r\nend;\r\n\r\n\r\nFunction HourOfTheWeek(const AValue: TDateTime): Word;\r\n\r\nVar\r\n H,M,S,MS : Word;\r\n\r\nbegin\r\n DecodeTime(AValue,H,M,S,MS);\r\n Result:=(DayOfTheWeek(AValue)-1)*24+H;\r\nend;\r\n\r\n\r\nFunction MinuteOfTheWeek(const AValue: TDateTime): Word;\r\n\r\nVar\r\n H,M,S,MS : Word;\r\n\r\nbegin\r\n DecodeTime(AValue,H,M,S,MS);\r\n Result:=((DayOfTheWeek(AValue)-1)*24+H)*60+M;\r\nend;\r\n\r\n\r\nFunction SecondOfTheWeek(const AValue: TDateTime): LongWord;\r\n\r\nVar\r\n H,M,S,MS : Word;\r\n\r\nbegin\r\n DecodeTime(AValue,H,M,S,MS);\r\n Result:=(((DayOfTheWeek(AValue)-1)*24+H)*60+M)*60+S;\r\nend;\r\n\r\n\r\nFunction MilliSecondOfTheWeek(const AValue: TDateTime): LongWord;\r\n\r\n\r\nVar\r\n H,M,S,MS : Word;\r\n\r\nbegin\r\n DecodeTime(AValue,H,M,S,MS);\r\n Result:=((((DayOfTheWeek(AValue)-1)*24+H)*60+M)*60+S)*1000+MS;\r\nend;\r\n\r\n{ ---------------------------------------------------------------------\r\n Part of day functions.\r\n ---------------------------------------------------------------------}\r\n\r\n\r\nFunction HourOfTheDay(const AValue: TDateTime): Word;\r\nbegin\r\n Result:=HourOf(AValue);\r\nend;\r\n\r\n\r\nFunction MinuteOfTheDay(const AValue: TDateTime): Word;\r\n\r\nVar\r\n H,M,S,MS : Word;\r\n\r\nbegin\r\n DecodeTime(AValue,H,M,S,MS);\r\n Result:=(H*60)+M;\r\nend;\r\n\r\n\r\nFunction SecondOfTheDay(const AValue: TDateTime): LongWord;\r\n\r\nVar\r\n H,M,S,MS : Word;\r\n\r\nbegin\r\n DecodeTime(AValue,H,M,S,MS);\r\n Result:=((H*60)+M)*60+S;\r\nend;\r\n\r\n\r\nFunction MilliSecondOfTheDay(const AValue: TDateTime): LongWord;\r\n\r\nVar\r\n H,M,S,MS : Word;\r\n\r\nbegin\r\n DecodeTime(AValue,H,M,S,MS);\r\n Result:=(((H*60)+M)*60+S)*1000+MS;\r\nend;\r\n\r\n{ ---------------------------------------------------------------------\r\n Part of hour functions.\r\n ---------------------------------------------------------------------}\r\n\r\n\r\nFunction MinuteOfTheHour(const AValue: TDateTime): Word;\r\nbegin\r\n Result:=MinuteOf(AValue);\r\nend;\r\n\r\n\r\nFunction SecondOfTheHour(const AValue: TDateTime): Word;\r\n\r\nVar\r\n H,S,M,MS : Word;\r\n\r\nbegin\r\n DecodeTime(AValue,H,M,S,MS);\r\n Result:=M*60+S;\r\nend;\r\n\r\n\r\nFunction MilliSecondOfTheHour(const AValue: TDateTime): LongWord;\r\n\r\nVar\r\n H,S,M,MS : Word;\r\n\r\nbegin\r\n DecodeTime(AValue,H,M,S,MS);\r\n Result:=(M*60+S)*1000+MS;\r\nend;\r\n\r\n{ ---------------------------------------------------------------------\r\n Part of minute functions.\r\n ---------------------------------------------------------------------}\r\n\r\n\r\nFunction SecondOfTheMinute(const AValue: TDateTime): Word;\r\nbegin\r\n Result:=SecondOf(AValue);\r\nend;\r\n\r\n\r\nFunction MilliSecondOfTheMinute(const AValue: TDateTime): LongWord;\r\n\r\nVar\r\n H,S,M,MS : Word;\r\n\r\nbegin\r\n DecodeTime(AValue,H,M,S,MS);\r\n Result:=S*1000+MS;\r\nend;\r\n\r\n{ ---------------------------------------------------------------------\r\n Part of second functions.\r\n ---------------------------------------------------------------------}\r\n\r\nFunction MilliSecondOfTheSecond(const AValue: TDateTime): Word;\r\nbegin\r\n Result:=MilliSecondOf(AValue);\r\nend;\r\n\r\n{ ---------------------------------------------------------------------\r\n Range checking functions.\r\n ---------------------------------------------------------------------}\r\n\r\nFunction WithinPastYears(const ANow, AThen: TDateTime; const AYears: Integer): Boolean;\r\nbegin\r\n Result:=YearsBetween(ANow,AThen)<=AYears;\r\nend;\r\n\r\n\r\nFunction WithinPastMonths(const ANow, AThen: TDateTime; const AMonths: Integer): Boolean;\r\nbegin\r\n Result:=MonthsBetween(ANow,AThen)<=AMonths;\r\nend;\r\n\r\n\r\nFunction WithinPastWeeks(const ANow, AThen: TDateTime; const AWeeks: Integer): Boolean;\r\nbegin\r\n Result:=WeeksBetween(ANow,AThen)<=AWeeks;\r\nend;\r\n\r\n\r\nFunction WithinPastDays(const ANow, AThen: TDateTime; const ADays: Integer): Boolean;\r\nbegin\r\n Result:=DaysBetween(ANow,AThen)<=ADays;\r\nend;\r\n\r\n\r\nFunction WithinPastHours(const ANow, AThen: TDateTime; const AHours: NativeLargeInt): Boolean;\r\nbegin\r\n Result:=HoursBetween(ANow,AThen)<=AHours;\r\nend;\r\n\r\n\r\nFunction WithinPastMinutes(const ANow, AThen: TDateTime; const AMinutes: NativeLargeInt): Boolean;\r\nbegin\r\n Result:=MinutesBetween(ANow,AThen)<=AMinutes;\r\nend;\r\n\r\n\r\nFunction WithinPastSeconds(const ANow, AThen: TDateTime; const ASeconds: NativeLargeInt): Boolean;\r\nbegin\r\n Result:=SecondsBetween(ANow,Athen)<=ASeconds;\r\nend;\r\n\r\n\r\nFunction WithinPastMilliSeconds(const ANow, AThen: TDateTime; const AMilliSeconds: NativeLargeInt): Boolean;\r\nbegin\r\n Result:=MilliSecondsBetween(ANow,AThen)<=AMilliSeconds;\r\nend;\r\n\r\n\r\n{ ---------------------------------------------------------------------\r\n Period functions.\r\n ---------------------------------------------------------------------}\r\n\r\n{\r\n These functions are declared as approximate by Borland.\r\n A bit strange, since it can be calculated exactly ?\r\n\r\n -- No, because you need rounding or truncating (JM)\r\n}\r\n\r\n\r\nFunction DateTimeDiff(const ANow, AThen: TDateTime): TDateTime;\r\nbegin\r\n Result:= ANow - AThen;\r\n if (ANow>0) and (AThen<0) then\r\n Result:=Result-0.5\r\n else if (ANow<-1.0) and (AThen>-1.0) then\r\n Result:=Result+0.5;\r\nend;\r\n\r\n\r\nFunction YearsBetween(const ANow, AThen: TDateTime; AExact : Boolean = False): Integer;\r\n\r\nvar\r\n yy, mm, dd: Word;\r\n \r\nbegin\r\n if AExact and (ANow >= -DateDelta) and (AThen >= -DateDelta) and\r\n (ANow <= MaxDateTime) and (AThen <= MaxDateTime) then\r\n begin\r\n PeriodBetween(ANow, AThen, yy , mm, dd);\r\n Result := yy;\r\n end\r\n else\r\n Result:=Trunc((Abs(DateTimeDiff(ANow,AThen))+HalfMilliSecond)/ApproxDaysPerYear);\r\nend;\r\n\r\n\r\nFunction MonthsBetween(const ANow, AThen: TDateTime; AExact : Boolean = False): Integer;\r\n\r\nvar\r\n y, m, d: Word;\r\n\r\nbegin\r\n if AExact and (ANow >= -DateDelta) and (AThen >= -DateDelta) and\r\n (ANow <= MaxDateTime) and (AThen <= MaxDateTime) then\r\n begin\r\n PeriodBetween(ANow, AThen, y, m, d);\r\n Result := y*12 + m;\r\n end\r\n else\r\n Result:=Trunc((Abs(DateTimeDiff(ANow,AThen))+HalfMilliSecond)/ApproxDaysPerMonth);\r\nend;\r\n\r\n\r\nFunction WeeksBetween(const ANow, AThen: TDateTime): Integer;\r\nbegin\r\n Result:=Trunc(Abs(DateTimeDiff(ANow,AThen))+HalfMilliSecond) div 7;\r\nend;\r\n\r\n\r\nFunction DaysBetween(const ANow, AThen: TDateTime): Integer;\r\nbegin\r\n Result:=Trunc(Abs(DateTimeDiff(ANow,AThen))+HalfMilliSecond);\r\nend;\r\n\r\n\r\nFunction HoursBetween(const ANow, AThen: TDateTime): NativeLargeInt;\r\nbegin\r\n Result:=Trunc((Abs(DateTimeDiff(ANow,AThen))+HalfMilliSecond)*HoursPerDay);\r\nend;\r\n\r\n\r\nFunction MinutesBetween(const ANow, AThen: TDateTime): NativeLargeInt;\r\nbegin\r\n Result:=Trunc((Abs(DateTimeDiff(ANow,AThen))+HalfMilliSecond)*MinsPerDay);\r\nend;\r\n\r\n\r\nFunction SecondsBetween(const ANow, AThen: TDateTime): NativeLargeInt;\r\nbegin\r\n Result:=Trunc((Abs(DateTimeDiff(ANow,AThen))+HalfMilliSecond)*SecsPerDay);\r\nend;\r\n\r\n\r\nFunction MilliSecondsBetween(const ANow, AThen: TDateTime): NativeLargeInt;\r\nbegin\r\n Result:=Trunc((Abs(DateTimeDiff(ANow,AThen))+HalfMilliSecond)*MSecsPerDay);\r\nend;\r\n\r\nProcedure PeriodBetween(Const ANow, AThen: TDateTime; Out Years, months, days : Word); \r\n\r\nvar\r\n Y1, Y2, M1, M2, D1, D2: word;\r\n\r\nbegin\r\n if (AThen>ANow) then\r\n begin\r\n DecodeDate(ANow,Y1,M1,D1);\r\n DecodeDate(AThen,Y2,M2,D2);\r\n end\r\n else\r\n begin \r\n DecodeDate(AThen,Y1,M1,D1);\r\n DecodeDate(ANow,Y2,M2,D2);\r\n end;\r\n Years:=Y2-Y1;\r\n if (M1>M2) or ((M1=M2) and (D1>D2)) then Dec(Years);\r\n if (M1>M2) then Inc(M2,12); //already adjusted Years in that case\r\n Months:=M2-M1;\r\n if (D2>=D1) then\r\n Days:=D2-D1\r\n else\r\n begin\r\n if (Months=0) then\r\n Months:=11\r\n else\r\n Dec(Months);\r\n Days:=(DaysInAMonth(Y1,M1)-D1)+D2;\r\n end;\r\nend; \r\n\r\n{ ---------------------------------------------------------------------\r\n Timespan in xxx functions.\r\n ---------------------------------------------------------------------}\r\n\r\nFunction YearSpan(const ANow, AThen: TDateTime): Double;\r\nbegin\r\n Result:=Abs(DateTimeDiff(ANow,AThen))/ApproxDaysPerYear;\r\nend;\r\n\r\n\r\nFunction MonthSpan(const ANow, AThen: TDateTime): Double;\r\nbegin\r\n Result:=Abs(DateTimeDiff(ANow,AThen))/ApproxDaysPerMonth;\r\nend;\r\n\r\n\r\nFunction WeekSpan(const ANow, AThen: TDateTime): Double;\r\nbegin\r\n Result:=Abs(DateTimeDiff(ANow,AThen)) / 7\r\nend;\r\n\r\n\r\nFunction DaySpan(const ANow, AThen: TDateTime): Double;\r\nbegin\r\n Result:=Abs(DateTimeDiff(ANow,AThen));\r\nend;\r\n\r\n\r\nFunction HourSpan(const ANow, AThen: TDateTime): Double;\r\nbegin\r\n Result:=Abs(DateTimeDiff(ANow,AThen))*HoursPerDay;\r\nend;\r\n\r\n\r\nFunction MinuteSpan(const ANow, AThen: TDateTime): Double;\r\nbegin\r\n Result:=Abs(DateTimeDiff(ANow,AThen))*MinsPerDay;\r\nend;\r\n\r\n\r\nFunction SecondSpan(const ANow, AThen: TDateTime): Double;\r\nbegin\r\n Result:=Abs(DateTimeDiff(ANow,AThen))*SecsPerDay;\r\nend;\r\n\r\n\r\nFunction MilliSecondSpan(const ANow, AThen: TDateTime): Double;\r\nbegin\r\n Result:=Abs(DateTimeDiff(ANow,AThen))*MSecsPerDay;\r\nend;\r\n\r\n\r\n{ ---------------------------------------------------------------------\r\n Increment/decrement functions.\r\n ---------------------------------------------------------------------}\r\n\r\n{ TDateTime is not defined in the interval [-1.0..0.0[. Additionally, when\r\n negative the time part must be treated using its absolute value (0.25 always\r\n means \"6 a.m.\") -> skip the gap and convert the time part when crossing the\r\n gap -- and take care of rounding errors }\r\nProcedure MaybeSkipTimeWarp(OldDate: TDateTime; var NewDate: TDateTime);\r\nbegin\r\n if (OldDate>=0) and (NewDate<-TDateTimeEpsilon) then\r\n NewDate:=int(NewDate-1.0+TDateTimeEpsilon)-frac(1.0+frac(NewDate))\r\n else if (OldDate<=-1.0) and (NewDate>-1.0+TDateTimeEpsilon) then\r\n NewDate:=int(NewDate+1.0-TDateTimeEpsilon)+frac(1.0-abs(frac(1.0+NewDate)));\r\nend;\r\n\r\n\r\nfunction IncNegativeTime(AValue, Addend: TDateTime): TDateTime;\r\nvar\r\n newtime: tdatetime;\r\nbegin\r\n newtime:=-frac(Avalue)+frac(Addend);\r\n { handle rounding errors }\r\n if SameValue(newtime,int(newtime)+1,TDateTimeEpsilon) then\r\n newtime:=int(newtime)+1\r\n else if SameValue(newtime,int(newtime),TDateTimeEpsilon) then\r\n newtime:=int(newtime);\r\n { time underflow -> previous day }\r\n if newtime<-TDateTimeEpsilon then\r\n begin\r\n newtime:=1.0+newtime;\r\n avalue:=int(avalue)-1;\r\n end\r\n { time overflow -> next day }\r\n else if newtime>=1.0-TDateTimeEpsilon then\r\n begin\r\n newtime:=newtime-1.0;\r\n avalue:=int(avalue)+1;\r\n end;\r\n Result:=int(AValue)+int(Addend)-newtime;\r\nend;\r\n\r\nFunction IncYear(const AValue: TDateTime; const ANumberOfYears: Integer ): TDateTime;\r\n\r\nVar\r\n Y,M,D,H,N,S,MS : Word;\r\nbegin\r\n DecodeDateTime(AValue,Y,M,D,H,N,S,MS);\r\n Y:=Y+ANumberOfYears;\r\n If (M=2) and (D=29) And (Not IsLeapYear(Y)) then\r\n D:=28;\r\n Result:=EncodeDateTime(Y,M,D,H,N,S,MS);\r\nend;\r\n\r\n\r\nFunction IncYear(const AValue: TDateTime): TDateTime; // ; const ANumberOfYears: Integer = 1)\r\nbegin\r\n Result:=IncYear(Avalue,1);\r\nend;\r\n\r\n\r\nFunction IncWeek(const AValue: TDateTime; const ANumberOfWeeks: Integer): TDateTime;\r\nbegin\r\n Result:=AValue+ANumberOfWeeks*7;\r\n MaybeSkipTimeWarp(AValue,Result);\r\nend;\r\n\r\n\r\nFunction IncWeek(const AValue: TDateTime): TDateTime; // ; const ANumberOfWeeks: Integer = 1)\r\nbegin\r\n Result:=IncWeek(Avalue,1);\r\nend;\r\n\r\n\r\nFunction IncDay(const AValue: TDateTime; const ANumberOfDays: Integer): TDateTime;\r\nbegin\r\n Result:=AValue+ANumberOfDays;\r\n MaybeSkipTimeWarp(AValue,Result);\r\nend;\r\n\r\n\r\nFunction IncDay(const AValue: TDateTime): TDateTime; //; const ANumberOfDays: Integer = 1)\r\nbegin\r\n Result:=IncDay(Avalue,1);\r\nend;\r\n\r\n\r\nFunction IncHour(const AValue: TDateTime; const ANumberOfHours: NativeLargeInt): TDateTime;\r\nbegin\r\n if AValue>=0 then\r\n Result:=AValue+ANumberOfHours/HoursPerDay\r\n else\r\n Result:=IncNegativeTime(Avalue,ANumberOfHours/HoursPerDay);\r\n MaybeSkipTimeWarp(AValue,Result);\r\nend;\r\n\r\n\r\nFunction IncHour(const AValue: TDateTime): TDateTime; //; const ANumberOfHours: NativeLargeInt = 1\r\nbegin\r\n Result:=IncHour(AValue,1);\r\nend;\r\n\r\n\r\nFunction IncMinute(const AValue: TDateTime; const ANumberOfMinutes: NativeLargeInt): TDateTime;\r\nbegin\r\n if AValue>=0 then\r\n Result:=AValue+ANumberOfMinutes/MinsPerDay\r\n else\r\n Result:=IncNegativeTime(Avalue,ANumberOfMinutes/MinsPerDay);\r\n MaybeSkipTimeWarp(AValue,Result);\r\nend;\r\n\r\n\r\nFunction IncMinute(const AValue: TDateTime): TDateTime; // ; const ANumberOfMinutes: NativeLargeInt = 1\r\nbegin\r\n Result:=IncMinute(AValue,1);\r\nend;\r\n\r\n\r\nFunction IncSecond(const AValue: TDateTime; const ANumberOfSeconds: NativeLargeInt): TDateTime;\r\nbegin\r\n if AValue>=0 then\r\n Result:=AValue+ANumberOfSeconds/SecsPerDay\r\n else\r\n Result:=IncNegativeTime(Avalue,ANumberOfSeconds/SecsPerDay);\r\n MaybeSkipTimeWarp(AValue,Result);\r\nend;\r\n\r\n\r\nFunction IncSecond(const AValue: TDateTime): TDateTime; // ; const ANumberOfSeconds: NativeLargeInt = 1\r\nbegin\r\n Result:=IncSecond(Avalue,1);\r\nend;\r\n\r\n\r\nFunction IncMilliSecond(const AValue: TDateTime; const ANumberOfMilliSeconds: NativeLargeInt): TDateTime;\r\nbegin\r\n if Avalue>=0 then\r\n Result:=AValue+ANumberOfMilliSeconds/MSecsPerDay\r\n else\r\n Result:=IncNegativeTime(Avalue,ANumberOfMilliSeconds/MSecsPerDay);\r\n MaybeSkipTimeWarp(AValue,Result);\r\nend;\r\n\r\n\r\nFunction IncMilliSecond(const AValue: TDateTime): TDateTime; // ; const ANumberOfMilliSeconds: NativeLargeInt = 1\r\nbegin\r\n Result:=IncMilliSecond(AValue,1);\r\nend;\r\n\r\n\r\n{ ---------------------------------------------------------------------\r\n Encode/Decode of complete timestamp\r\n ---------------------------------------------------------------------}\r\n\r\n\r\nFunction EncodeDateTime(const AYear, AMonth, ADay, AHour, AMinute, ASecond, AMilliSecond: Word): TDateTime;\r\nbegin\r\n If Not TryEncodeDateTime(AYear, AMonth, ADay, AHour, AMinute, ASecond, AMilliSecond,Result) then\r\n InvalidDateTimeError(AYear, AMonth, ADay, AHour, AMinute, ASecond, AMilliSecond)\r\nend;\r\n\r\n\r\nProcedure DecodeDateTime(const AValue: TDateTime; out AYear, AMonth, ADay, AHour, AMinute, ASecond, AMilliSecond: Word);\r\nbegin\r\n DecodeTime(AValue,AHour,AMinute,ASecond,AMilliSecond);\r\n if AHour=24 then // can happen due rounding issues mantis 17123\r\n begin\r\n AHour:=0; // rest is already zero\r\n DecodeDate(round(AValue),AYear,AMonth,ADay);\r\n end\r\n else\r\n DecodeDate(AValue,AYear,AMonth,ADay);\r\nend;\r\n\r\n\r\nFunction TryEncodeDateTime(const AYear, AMonth, ADay, AHour, AMinute, ASecond, AMilliSecond: Word; out AValue: TDateTime): Boolean;\r\n\r\nVar\r\n tmp : TDateTime;\r\n\r\nbegin\r\n Result:=TryEncodeDate(AYear,AMonth,ADay,AValue);\r\n Result:=Result and TryEncodeTime(AHour,AMinute,ASecond,Amillisecond,Tmp);\r\n If Result then\r\n Avalue:=ComposeDateTime(AValue,Tmp);\r\nend;\r\n\r\n{ ---------------------------------------------------------------------\r\n Encode/decode date, specifying week of year and day of week\r\n ---------------------------------------------------------------------}\r\n\r\nFunction EncodeDateWeek(const AYear, AWeekOfYear: Word; const ADayOfWeek: Word): TDateTime;\r\nbegin\r\n If Not TryEncodeDateWeek(AYear,AWeekOfYear,Result,ADayOfWeek) then\r\n InvalidDateWeekError(AYear,AWeekOfYear,ADayOfWeek);\r\nend;\r\n\r\n\r\nFunction EncodeDateWeek(const AYear, AWeekOfYear: Word): TDateTime; //; const ADayOfWeek: Word = 1\r\nbegin\r\n Result := EncodeDateWeek(AYear,AWeekOfYear,1);\r\nend;\r\n\r\n\r\nProcedure DecodeDateWeek(const AValue: TDateTime; out AYear, AWeekOfYear, ADayOfWeek: Word);\r\n\r\nvar\r\n DOY : Integer;\r\n D: Word;\r\n YS : TDateTime;\r\n YSDOW, YEDOW: Word;\r\n\r\nbegin\r\n AYear:=YearOf(AValue);\r\n // Correct to ISO DOW\r\n ADayOfWeek:=DayOfWeek(AValue)-1;\r\n If ADAyOfWeek=0 then\r\n ADayofweek:=7;\r\n YS:=StartOfAYear(AYear);\r\n DOY:=Trunc(AValue-YS)+1;\r\n YSDOW:=DayOfTheWeek(YS);\r\n // Correct week if later than wednesday. First week never starts later than wednesday\r\n if (YSDOW<5) then\r\n Inc(DOY,YSDOW-1)\r\n else\r\n Dec(DOY,8-YSDOW);\r\n if (DOY<=0) then // Day is in last week of previous year.\r\n DecodeDateWeek(YS-1,AYear,AWeekOfYear,D)\r\n else\r\n begin\r\n AWeekOfYear:=DOY div 7;\r\n if ((DOY mod 7)<>0) then\r\n Inc(AWeekOfYear);\r\n if (AWeekOfYear>52) then // Maybe in first week of next year ?\r\n begin\r\n YEDOW:=YSDOW;\r\n if IsLeapYear(AYear) then\r\n begin\r\n Inc(YEDOW);\r\n if (YEDOW>7) then\r\n YEDOW:=1;\r\n end;\r\n if (YEDOW<4) then // Really next year.\r\n begin\r\n Inc(AYear);\r\n AWeekOfYear:=1;\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\n\r\n\r\nFunction TryEncodeDateWeek(const AYear, AWeekOfYear: Word; out AValue: TDateTime; const ADayOfWeek: Word): Boolean;\r\n\r\nVar\r\n DOW : Word;\r\n Rest : Integer;\r\n\r\nbegin\r\n Result:=IsValidDateWeek(Ayear,AWeekOfYear,ADayOfWeek);\r\n If Result then\r\n begin\r\n AValue:=EncodeDate(AYear,1,1)+(7*(AWeekOfYear-1));\r\n DOW:=DayOfTheWeek(AValue);\r\n Rest:=ADayOfWeek-DOW;\r\n If (DOW>4) then\r\n Inc(Rest,7);\r\n AValue:=AValue+Rest;\r\n end;\r\nend;\r\n\r\n\r\nFunction TryEncodeDateWeek(const AYear, AWeekOfYear: Word; out AValue: TDateTime): Boolean; //; const ADayOfWeek: Word = 1\r\nbegin\r\n Result:=TryEncodeDateWeek(AYear,AWeekOfYear,AValue,1);\r\nend;\r\n\r\n{ ---------------------------------------------------------------------\r\n Encode/decode date, specifying day of year\r\n ---------------------------------------------------------------------}\r\n\r\nFunction EncodeDateDay(const AYear, ADayOfYear: Word): TDateTime;\r\nbegin\r\n If Not TryEncodeDateDay(AYear,ADayOfYear,Result) then\r\n InvalidDateDayError(AYear,ADayOfYear);\r\nend;\r\n\r\n\r\nProcedure DecodeDateDay(const AValue: TDateTime; out AYear, ADayOfYear: Word);\r\n\r\nVar\r\n M,D : Word;\r\n\r\nbegin\r\n DecodeDate(AValue,AYear,M,D);\r\n ADayOfyear:=Trunc(AValue-EncodeDate(AYear,1,1))+1;\r\nend;\r\n\r\n\r\nFunction TryEncodeDateDay(const AYear, ADayOfYear: Word; out AValue: TDateTime): Boolean;\r\nbegin\r\n Result:=(ADayOfYear<>0) and (ADayOfYear<=DaysPerYear [IsleapYear(AYear)]);\r\n If Result then\r\n AValue:=EncodeDate(AYear,1,1)+ADayOfYear-1;\r\nend;\r\n\r\n\r\n{ ---------------------------------------------------------------------\r\n Encode/decode date, specifying week of month\r\n ---------------------------------------------------------------------}\r\n\r\n\r\nFunction EncodeDateMonthWeek(const AYear, AMonth, AWeekOfMonth, ADayOfWeek: Word): TDateTime;\r\nbegin\r\n If Not TryEncodeDateMonthWeek(Ayear,AMonth,AWeekOfMonth,ADayOfWeek,Result) then\r\n InvalidDateMonthWeekError(AYear,AMonth,AWeekOfMonth,ADayOfWeek);\r\nend;\r\n\r\nProcedure DecodeDateMonthWeek(const AValue: TDateTime; out AYear, AMonth, AWeekOfMonth, ADayOfWeek: Word);\r\n\r\nVar\r\n D,SDOM,EDOM : Word;\r\n SOM : TdateTime;\r\n DOM : Integer;\r\nbegin\r\n DecodeDate(AValue,AYear,AMonth,D);\r\n ADayOfWeek:=DayOfTheWeek(AValue);\r\n SOM:=EncodeDate(Ayear,Amonth,1);\r\n SDOM:=DayOfTheWeek(SOM);\r\n DOM:=D-1+SDOM;\r\n If SDOM>4 then\r\n Dec(DOM,7);\r\n // Too early in the month. First full week is next week, day is after thursday.\r\n If DOM<=0 Then\r\n DecodeDateMonthWeek(SOM-1,AYear,AMonth,AWeekOfMonth,D)\r\n else\r\n begin\r\n AWeekOfMonth:=(DOM div 7);\r\n if (DOM mod 7)<>0 then\r\n Inc(AWeekOfMonth);\r\n EDOM:=DayOfTheWeek(EndOfAMonth(Ayear,AMonth));\r\n // In last days of last long week, so in next month...\r\n If (EDOM<4) and ((DaysInAMonth(AYear,Amonth)-D)24\r\n ---------------------------------------------------------------------}\r\n\r\nfunction TryEncodeTimeInterval(Hour, Min, Sec, MSec: word; out Time: TDateTime): boolean;\r\nbegin\r\n Result:= (Min<60) and (Sec<60) and (MSec<1000);\r\n If Result then\r\n Time:=TDateTime(cardinal(Hour)*3600000+cardinal(Min)*60000+cardinal(Sec)*1000+MSec)/MSecsPerDay;\r\nend;\r\n\r\nfunction EncodeTimeInterval(Hour, Minute, Second, MilliSecond: word): TDateTime;\r\nbegin\r\n If not TryEncodeTimeInterval(Hour,Minute,Second,MilliSecond,Result) then\r\n Raise EConvertError.CreateFmt(SerrInvalidHourMinuteSecMsec,\r\n [Hour,Minute,Second,MilliSecond]);\r\nend;\r\n\r\n{ ---------------------------------------------------------------------\r\n Replace given element with supplied value.\r\n ---------------------------------------------------------------------}\r\n\r\nConst\r\n LFAI = RecodeLeaveFieldAsIS; // Less typing, readable code\r\n{\r\n Note: We have little choice but to implement it like Borland did:\r\n If AValue contains some 'wrong' value, it will throw an error.\r\n To simulate this we'd have to check in each function whether\r\n both arguments are correct. To avoid it, all is routed through\r\n the 'central' RecodeDateTime function as in Borland's implementation.\r\n}\r\n\r\nFunction RecodeYear(const AValue: TDateTime; const AYear: Word): TDateTime;\r\n\r\nbegin\r\n Result := RecodeDateTime(AValue,AYear,LFAI,LFAI,LFAI,LFAI,LFAI,LFAI);\r\nend;\r\n\r\n\r\nFunction RecodeMonth(const AValue: TDateTime; const AMonth: Word): TDateTime;\r\nbegin\r\n Result := RecodeDateTime(AValue,LFAI,AMonth,LFAI,LFAI,LFAI,LFAI,LFAI);\r\nend;\r\n\r\n\r\nFunction RecodeDay(const AValue: TDateTime; const ADay: Word): TDateTime;\r\nbegin\r\n Result := RecodeDateTime(AValue,LFAI,LFAI,ADay,LFAI,LFAI,LFAI,LFAI);\r\nend;\r\n\r\n\r\nFunction RecodeHour(const AValue: TDateTime; const AHour: Word): TDateTime;\r\nbegin\r\n Result := RecodeDateTime(AValue,LFAI,LFAI,LFAI,AHour,LFAI,LFAI,LFAI);\r\nend;\r\n\r\n\r\nFunction RecodeMinute(const AValue: TDateTime; const AMinute: Word): TDateTime;\r\nbegin\r\n Result := RecodeDateTime(AValue,LFAI,LFAI,LFAI,LFAI,AMinute,LFAI,LFAI);\r\nend;\r\n\r\n\r\nFunction RecodeSecond(const AValue: TDateTime; const ASecond: Word): TDateTime;\r\nbegin\r\n Result := RecodeDateTime(AValue,LFAI,LFAI,LFAI,LFAI,LFAI,ASecond,LFAI);\r\nend;\r\n\r\n\r\nFunction RecodeMilliSecond(const AValue: TDateTime; const AMilliSecond: Word): TDateTime;\r\nbegin\r\n Result := RecodeDateTime(AValue,LFAI,LFAI,LFAI,LFAI,LFAI,LFAI,AMilliSecond);\r\nend;\r\n\r\n\r\nFunction RecodeDate(const AValue: TDateTime; const AYear, AMonth, ADay: Word): TDateTime;\r\nbegin\r\n Result := RecodeDateTime(AValue,AYear,AMonth,ADay,LFAI,LFAI,LFAI,LFAI);\r\nend;\r\n\r\n\r\nFunction RecodeTime(const AValue: TDateTime; const AHour, AMinute, ASecond, AMilliSecond: Word): TDateTime;\r\nbegin\r\n Result := RecodeDateTime(AValue,LFAI,LFAI,LFAI,AHour,AMinute,ASecond,AMilliSecond);\r\nend;\r\n\r\n\r\nFunction RecodeDateTime(const AValue: TDateTime; const AYear, AMonth, ADay, AHour, AMinute, ASecond, AMilliSecond: Word): TDateTime;\r\nbegin\r\n If Not TryRecodeDateTime(AValue,AYear,AMonth,ADay,AHour,AMinute,ASecond,AMilliSecond,Result) then\r\n InvalidDateTimeError(AYear,AMonth,ADay,AHour,AMinute,ASecond,AMilliSecond,AValue);\r\nend;\r\n\r\n\r\nFunction TryRecodeDateTime(const AValue: TDateTime; const AYear, AMonth, ADay, AHour, AMinute, ASecond, AMilliSecond: Word; out AResult: TDateTime): Boolean;\r\n\r\n Procedure FV (var AV{%H-} : Word; Arg : Word);\r\n\r\n begin\r\n If (Arg<>LFAI) then\r\n AV:=Arg;\r\n end;\r\n\r\nVar\r\n Y,M,D,H,N,S,MS : Word;\r\n\r\nbegin\r\n DecodeDateTime(AValue,Y,M,D,H,N,S,MS);\r\n FV(Y,AYear);\r\n FV(M,AMonth);\r\n FV(D,ADay);\r\n FV(H,AHour);\r\n FV(N,AMinute);\r\n FV(S,ASecond);\r\n FV(MS,AMillisecond);\r\n Result:=TryEncodeDateTime(Y,M,D,H,N,S,MS,AResult);\r\nend;\r\n\r\n{ ---------------------------------------------------------------------\r\n Comparision of date/time\r\n ---------------------------------------------------------------------}\r\n\r\n\r\nFunction CompareDateTime(const A, B: TDateTime): TValueRelationship;\r\nbegin\r\n If SameDateTime(A,B) then\r\n Result:=EqualsValue\r\n else if trunc(a)=trunc(b) then\r\n begin\r\n if abs(frac(a))>abs(frac(b)) then \r\n result:=GreaterThanValue\r\n else \r\n result:=LessThanValue;\r\n end \r\n else \r\n begin\r\n if a>b then \r\n result:=GreaterThanValue\r\n else \r\n result:=LessThanValue;\r\n end;\r\nend;\r\n\r\n\r\nFunction CompareDate(const A, B: TDateTime): TValueRelationship;\r\nbegin\r\n If SameDate(A,B) then\r\n Result:=EQualsValue\r\n else if AADayOfWeek then\r\n D:=D+7; // Clearer would have been Inc(ANthDayOfweek) but it's a const\r\n Result:=TryEncodeDate(Ayear,AMonth,D,AValue);\r\nend;\r\n\r\n{ ---------------------------------------------------------------------\r\n Exception throwing routines\r\n ---------------------------------------------------------------------}\r\n\r\n\r\n\r\nProcedure InvalidDateTimeError(const AYear, AMonth, ADay, AHour, AMinute, ASecond, AMilliSecond: Word; const ABaseDate: TDateTime);\r\n\r\n Function DoField(Arg,Def : Word; Unknown: String) : String;\r\n\r\n begin\r\n if Def=0 then ;\r\n If (Arg<>LFAI) then\r\n Result:=Format('%.*d',[Length(Unknown),Arg])\r\n else if (ABaseDate=0) then\r\n Result:=Unknown\r\n else\r\n Result:=Format('%.*d',[Length(Unknown),Arg]);\r\n end;\r\n\r\nVar\r\n Y,M,D,H,N,S,MS : Word;\r\n Msg : String;\r\n\r\nbegin\r\n DecodeDateTime(ABasedate,Y,M,D,H,N,S,MS);\r\n Msg:=DoField(AYear,Y,'????');\r\n Msg:=Msg+FormatSettings.DateSeparator+DoField(AMonth,M,'??');\r\n Msg:=Msg+FormatSettings.DateSeparator+DoField(ADay,D,'??');\r\n Msg:=Msg+' '+DoField(AHour,H,'??');\r\n Msg:=Msg+FormatSettings.TimeSeparator+DoField(AMinute,N,'??');\r\n Msg:=Msg+FormatSettings.TimeSeparator+Dofield(ASecond,S,'??');\r\n Msg:=Msg+FormatSettings.DecimalSeparator+DoField(AMilliSecond,MS,'???');\r\n Raise EConvertError.CreateFmt(SErrInvalidTimeStamp,[Msg]);\r\nend;\r\n\r\n\r\nProcedure InvalidDateTimeError(const AYear, AMonth, ADay, AHour, AMinute, ASecond, AMilliSecond: Word); // const ABaseDate: TDateTime = 0\r\nbegin\r\n InvalidDateTimeError(AYear,AMonth,ADay,AHour,AMinute,ASecond,AMilliSecond,0);\r\nend;\r\n\r\n\r\nProcedure InvalidDateWeekError(const AYear, AWeekOfYear, ADayOfWeek: Word);\r\nbegin\r\n Raise EConvertError.CreateFmt(SErrInvalidDateWeek,[AYear,AWeekOfYear,ADayOfWeek]);\r\nend;\r\n\r\n\r\nProcedure InvalidDateDayError(const AYear, ADayOfYear: Word);\r\nbegin\r\n Raise EConvertError.CreateFmt(SErrInvalidDayOfYear,[AYear,ADayOfYear]);\r\nend;\r\n\r\n\r\nProcedure InvalidDateMonthWeekError(const AYear, AMonth, AWeekOfMonth, ADayOfWeek: Word);\r\nbegin\r\n Raise EConvertError.CreateFmt(SErrInvalidDateMonthWeek,[Ayear,AMonth,AWeekOfMonth,ADayOfWeek]);\r\nend;\r\n\r\n\r\nProcedure InvalidDayOfWeekInMonthError(const AYear, AMonth, ANthDayOfWeek, ADayOfWeek: Word);\r\n\r\nbegin\r\n Raise EConvertError.CreateFmt(SErrInvalidDayOfWeekInMonth,[AYear,AMonth,ANthDayOfWeek,ADayOfWeek]);\r\nend;\r\n\r\n\r\n{ ---------------------------------------------------------------------\r\n Julian and Modified Julian Date conversion support\r\n ---------------------------------------------------------------------}\r\n\r\n{$push}\r\n{$R-}\r\n{$Q-}\r\n\r\nFunction DateTimeToJulianDate(const AValue: TDateTime): Double;\r\nvar\r\n day,month,year: word;\r\n a,y,m: longint;\r\nbegin\r\n DecodeDate ( AValue, year, month, day );\r\n a := (14-month) div 12;\r\n y := year + 4800 - a;\r\n m := month + (12*a) - 3;\r\n result := day + ((153*m+2) div 5) + (365*y)\r\n + (y div 4) - (y div 100) + (y div 400) - 32045.5 + frac(avalue);\r\nend;\r\n\r\n\r\nFunction JulianDateToDateTime(const AValue: Double): TDateTime;\r\nbegin\r\n if not TryJulianDateToDateTime(AValue, Result) then\r\n raise EConvertError.CreateFmt(SInvalidJulianDate, [AValue]);\r\nend;\r\n\r\n\r\nFunction TryJulianDateToDateTime(const AValue: Double; out ADateTime: TDateTime): Boolean;\r\nvar\r\n a,b,c,d,e,m:longint;\r\n day,month,year: word;\r\nbegin\r\n a := trunc(AValue + 32044.5);\r\n b := (4*a + 3) div 146097;\r\n c := a - (146097*b div 4);\r\n d := (4*c + 3) div 1461;\r\n e := c - (1461*d div 4);\r\n m := (5*e+2) div 153;\r\n day := e - ((153*m + 2) div 5) + 1;\r\n month := m + 3 - 12 * ( m div 10 );\r\n year := (100*b) + d - 4800 + ( m div 10 );\r\n result := TryEncodeDate ( Year, Month, Day, ADateTime );\r\n if Result then\r\n// ADateTime:=IncMilliSecond(IncHour(ADateTime,-12),MillisecondOfTheDay(Abs(Frac(aValue))));\r\n ADateTime:=ADateTime+frac(AValue-0.5);\r\nend;\r\n\r\nFunction DateTimeToModifiedJulianDate(const AValue: TDateTime): Double;\r\nbegin\r\n result := DateTimeToJulianDate(AValue) - 2400000.5;\r\nend;\r\n\r\n\r\nFunction ModifiedJulianDateToDateTime(const AValue: Double): TDateTime;\r\nbegin\r\n result := JulianDateToDateTime(AValue + 2400000.5);\r\nend;\r\n\r\n\r\nFunction TryModifiedJulianDateToDateTime(const AValue: Double; out ADateTime: TDateTime): Boolean;\r\nbegin\r\n Result:=TryJulianDateToDateTime(AValue + 2400000.5, ADateTime);\r\nend;\r\n\r\n{$pop}//{$R-}{$Q-} for Julian conversion functions\r\n\r\n{ ---------------------------------------------------------------------\r\n Unix timestamp support.\r\n ---------------------------------------------------------------------}\r\n\r\nFunction DateTimeToUnix(const AValue: TDateTime): NativeLargeInt;\r\n\r\nbegin\r\n Result:=Round(DateTimeDiff(RecodeMillisecond(AValue,0),UnixEpoch)*SecsPerDay);\r\nend;\r\n\r\n\r\nFunction UnixToDateTime(const AValue: NativeLargeInt; AReturnUTC: Boolean): TDateTime;\r\nbegin\r\n if AReturnUTC then\r\n Result := IncSecond(UnixEpoch, AValue)\r\n else\r\n Result := TTimeZone.Local.ToLocalTime(IncSecond(UnixEpoch, AValue));\r\nend;\r\n\r\n\r\nFunction UnixTimeStampToMac(const AValue: NativeLargeInt): NativeLargeInt;\r\nconst\r\n Epoch=24107 * 24 * 3600;\r\nbegin\r\n Result:=AValue + Epoch;\r\nend;\r\n\r\n{ ---------------------------------------------------------------------\r\n Mac timestamp support.\r\n ---------------------------------------------------------------------}\r\n\r\nFunction DateTimeToMac(const AValue: TDateTime): NativeLargeInt;\r\nvar\r\n Epoch:TDateTime;\r\nbegin\r\n Epoch:=EncodeDateTime( 1904, 1, 1, 0, 0, 0, 0 );\r\n Result:=SecondsBetween( Epoch, AValue );\r\nend;\r\n\r\n\r\nFunction MacToDateTime(const AValue: NativeLargeInt): TDateTime;\r\nvar\r\n Epoch:TDateTime;\r\nbegin\r\n Epoch:=EncodeDateTime( 1904, 1, 1, 0, 0, 0, 0 );\r\n Result:=IncSecond( Epoch, AValue );\r\nend;\r\n\r\n\r\nFunction MacTimeStampToUnix(const AValue: NativeLargeInt): NativeLargeInt;\r\nconst\r\n Epoch=24107 * 24 * 3600;\r\nbegin\r\n Result:=AValue - Epoch;\r\nend;\r\n\r\nFunction DateTimeToDosDateTime(const AValue: TDateTime): longint;\r\nvar year,month,day,hour,min,sec,msec : word;\r\n zs : longint;\r\nbegin\r\n decodedatetime(avalue,year,month,day,hour,min,sec,msec);\r\n result:=-1980;\r\n result:=result+year and 127;\r\n result:=result shl 4;\r\n result:=result+month;\r\n result:=result shl 5;\r\n result:=result+day;\r\n result:=result shl 16;\r\n zs:=hour;\r\n zs:=zs shl 6;\r\n zs:=zs+min;\r\n zs:=zs shl 5;\r\n zs:=zs+sec div 2;\r\n result:=result+(zs and $ffff);\r\nend;\r\n\r\nFunction DosDateTimeToDateTime( AValue: longint): TDateTime;\r\nvar year,month,day,hour,min,sec : integer;\r\nbegin\r\n sec:=(AValue and 31) * 2;\r\n avalue:=AValue shr 5;\r\n min:=AValue and 63;\r\n avalue:=AValue shr 6;\r\n hour:=AValue and 31;\r\n avalue:=AValue shr 5;\r\n day:=AValue and 31;\r\n avalue:=AValue shr 5;\r\n month:=AValue and 15;\r\n avalue:=AValue shr 4;\r\n year:=AValue+1980;\r\n result:=EncodeDateTime(year,month,day,hour,min,sec,0);\r\nend;\r\n\r\n\r\n\r\nconst whitespace = [' ',#13,#10];\r\n hrfactor = 1/(24);\r\n minfactor = 1/(24*60);\r\n secfactor = 1/(24*60*60);\r\n mssecfactor = 1/(24*60*60*1000);\r\n\r\nconst AMPMformatting : array[0..2] of string =('am/pm','a/p','ampm');\r\n\r\nprocedure raiseexception(const s:string);\r\n\r\nbegin\r\n raise EConvertError.Create(s);\r\nend;\r\n\r\n{ Conversion of UTC to local time and vice versa }\r\n\r\nFunction GetLocalTimeOffset : Integer;\r\n\r\nbegin\r\n Result:=TJSDate.New.getTimezoneOffset();\r\nend;\r\n\r\nfunction UniversalTimeToLocal(UT: TDateTime): TDateTime;\r\n\r\nbegin\r\n Result:=UniversalTimeToLocal(UT,-GetLocalTimeOffset);\r\nend;\r\n\r\nfunction UniversalTimeToLocal(UT: TDateTime; TZOffset : Integer): TDateTime;\r\n\r\nbegin\r\n if (TZOffset > 0) then\r\n Result := UT + EncodeTime(TZOffset div 60, TZOffset mod 60, 0, 0)\r\n else if (TZOffset < 0) then\r\n Result := UT - EncodeTime(Abs(TZOffset) div 60, Abs(TZOffset) mod 60, 0, 0)\r\n else\r\n Result := UT;\r\nend;\r\n \r\nFunction LocalTimeToUniversal(LT: TDateTime): TDateTime;\r\n\r\nbegin\r\n Result:=LocalTimeToUniversal(LT,-GetLocalTimeOffset);\r\nend;\r\n\r\nFunction LocalTimeToUniversal(LT: TDateTime;TZOffset: Integer): TDateTime;\r\n\r\nbegin\r\n if (TZOffset > 0) then\r\n Result := LT - EncodeTime(TZOffset div 60, TZOffset mod 60, 0, 0)\r\n else if (TZOffset < 0) then\r\n Result := LT + EncodeTime(Abs(TZOffset) div 60, Abs(TZOffset) mod 60, 0, 0)\r\n else\r\n Result := LT;\r\nend;\r\n\r\n\r\n{ RFC 3339 }\r\n\r\nfunction DateTimeToRFC3339(ADate :TDateTime):string;\r\n\r\nbegin\r\n Result:=FormatDateTime('yyyy-mm-dd\"T\"hh\":\"nn\":\"ss\".\"zzz\"Z\"',ADate);\r\nend;\r\n\r\nfunction DateToRFC3339(ADate: TDateTime): string;\r\nbegin\r\n Result:=FormatDateTime('yyyy-mm-dd',ADate);\r\nend;\r\n\r\nfunction TimeToRFC3339(ADate :TDateTime):string;\r\n\r\nbegin\r\n Result:=FormatDateTime('hh\":\"nn\":\"ss\".\"zzz',ADate);\r\nend;\r\n\r\nFunction TryRFC3339ToDateTime(const Avalue: String; out ADateTime: TDateTime): Boolean;\r\n\r\n// 1 2\r\n// 12345678901234567890123\r\n// yyyy-mm-ddThh:nn:ss.zzz\r\n\r\nType\r\n TPartPos = (ppTime,ppYear,ppMonth,ppDay,ppHour,ppMinute,ppSec,ppMSec);\r\n TPos = Array [TPartPos] of byte;\r\n\r\nConst\r\n P : TPos = (11,1,6,9,12,15,18,21);\r\n\r\nvar\r\n lY, lM, lD, lH, lMi, lS, lMs: Integer;\r\n\r\nbegin\r\n if Trim(AValue) = '' then\r\n begin\r\n Result:=True;\r\n ADateTime:=0;\r\n end;\r\n lY:=StrToIntDef(Copy(AValue,P[ppYear],4),-1);\r\n lM:=StrToIntDef(Copy(AValue,P[ppMonth],2),-1);\r\n lD:=StrToIntDef(Copy(AValue,P[ppDay],2),-1);\r\n if (Length(AValue)>=P[ppTime]) then\r\n begin\r\n lH:=StrToIntDef(Copy(AValue,P[ppHour],2),-1);\r\n lMi:=StrToIntDef(Copy(AValue,P[ppMinute],2),-1);\r\n // Bug ID 37974\r\n if (Length(AValue)>=P[ppSec]) then\r\n lS:=StrToIntDef(Copy(AValue,P[ppSec],2),-1)\r\n else\r\n LS:=0;\r\n if (Length(AValue)>=P[ppMSec]) then\r\n lmS := StrToIntDef(Copy(AValue,P[ppMSec],3),-1);\r\n end\r\n else\r\n begin\r\n lH:=0;\r\n lMi:=0;\r\n lS:=0;\r\n lMS:=0;\r\n end;\r\n Result:=(lY>=0) and (lM>=0) and (lD>=0) and (lH>=0) and (lMi>=0) and (ls>=0) and (lMS>=0);\r\n if Not Result then\r\n ADateTime:=0\r\n else\r\n { Cannot EncodeDate if any part equals 0. EncodeTime is okay. }\r\n if (lY = 0) or (lM = 0) or (lD = 0) then\r\n ADateTime:=EncodeTime(lH, lMi, lS, 0)\r\n else\r\n ADateTime:=EncodeDate(lY, lM, lD) + EncodeTime(lH, lMi, lS, lMs);\r\nend;\r\n\r\nFunction RFC3339ToDateTime(const Avalue: String): TDateTime;\r\n\r\nbegin\r\n if Not TryRFC3339ToDateTime(AValue,Result) then\r\n Result:=0;\r\nend;\r\n\r\nconst\r\n\r\n SPatternCharMismatch = 'Pattern mismatch char \"%s\" at position %d.';\r\n SNoCharMatch = 'Mismatch char \"%s\" <> \"%s\" at pattern position %d, string position %d.';\r\n SHHMMError = 'mm in a sequence hh:mm is interpreted as minutes. No longer versions allowed! (Position : %d).' ;\r\n SNoArrayMatch = 'Can''t match any allowed value at pattern position %d, string position %d.';\r\n //SFullpattern = 'Couldn''t match entire pattern string. Input too short at pattern position %d.';\r\n\r\n\r\n{ TDateTimeScanner }\r\nprocedure TDateTimeScanner.ArrayMatchError;\r\n\r\nbegin\r\n raiseexception(format(SNoArrayMatch,[FPatternPos+1,FPos]))\r\nend;\r\n\r\nprocedure TDateTimeScanner.SetPattern(AValue: String);\r\nbegin\r\n if FPattern=AValue then Exit;\r\n FPattern:=AValue;\r\n FPatternLen:=Length(FPattern);\r\nend;\r\n\r\nprocedure TDateTimeScanner.SetText(AValue: String);\r\nbegin\r\n if FText=AValue then Exit;\r\n FText:=AValue;\r\n FLen:=Length(FText);\r\nend;\r\n\r\nfunction TDateTimeScanner.ScanFixedInt(maxv:integer):integer;\r\n\r\nvar\r\n c,n : char;\r\n oi:integer;\r\n\r\nbegin\r\n Result:=0;\r\n oi:=FPos;\r\n c:=FPattern[FPatternPos];\r\n while (FPatternPos<=FPatternLen) and (FPattern[FPatternPos]=c) do\r\n Inc(FPatternPos);\r\n N:=FText[FPos];\r\n while (maxv>0) and (FPos<=FLen) and (N IN ['0'..'9']) do\r\n begin\r\n Result:=(Result*10)+ord(N)-48;\r\n inc(FPos);\r\n dec(maxv);\r\n if FPos<=FLen then\r\n N:=FText[FPos];\r\n end;\r\n if (OI=FPos) then\r\n raiseexception(format(SPatternCharMismatch,[c,oi]));\r\nend;\r\n\r\nfunction TDateTimeScanner.FindIMatch(const values :array of string; aTerm : string):integer;\r\n\r\nvar\r\n l,i : integer;\r\n\r\nbegin\r\n Result:=-1;\r\n l:=high(values);\r\n i:=0;\r\n while (i<=l) and (result=-1) do\r\n begin\r\n if SameText(Copy(aTerm,1,Length(values[i])),values[i]) then\r\n Result:=i;\r\n inc(i);\r\n end;\r\nend;\r\n\r\nfunction TDateTimeScanner.FindMatch(const Values : array of string):integer;\r\n\r\nbegin\r\n result:=FindIMatch(Values,Copy(FText,FPos,FLen-FPos+1));\r\n if result=-1 then\r\n arraymatcherror\r\n else\r\n begin\r\n inc(FPos,length(Values[result])+1);\r\n inc(FPatternPos,length(Values[result])+1);\r\n inc(result); // was 0 based.\r\n end;\r\nend;\r\n\r\n\r\nprocedure TDateTimeScanner.MatchChar(c:char);\r\n\r\nVar\r\n N : Char;\r\n\r\nbegin\r\n if (FPos<=Flen) then\r\n N:=FText[FPos]\r\n else\r\n N:='?';\r\n if (N<>c) then\r\n raiseexception(format(SNoCharMatch,[N,C,FPatternPos+FPatternOffset,FPos]));\r\n inc(FPatternPos);\r\n inc(FPos);\r\nend;\r\n\r\nfunction TDateTimeScanner.ScanPatternLength :integer;\r\n\r\nvar\r\n c : char;\r\n i : Integer;\r\n\r\nbegin\r\n result:=FPatternPos;\r\n I:=FPatternPos;\r\n c:=FPattern[I];\r\n while (I<=FPatternLen) and (FPattern[i]=c) do\r\n inc(I);\r\n Result:=I-Result;\r\nend;\r\n\r\nprocedure TDateTimeScanner.MatchPattern(const aPattern: String);\r\n\r\nVar\r\n T : String;\r\n cPos: Integer;\r\n\r\nbegin\r\n T:=FPattern;\r\n cPos:=FPatternPos;\r\n FPatternOffset:=FPatternPos;\r\n FPattern:=aPattern;\r\n FPatternLen:=Length(aPattern);\r\n try\r\n Scan;\r\n finally\r\n FPattern:=T;\r\n FPatternLen:=Length(aPattern);\r\n FPatternPos:=cPos;\r\n FPatternOffset:=0;\r\n end;\r\nend;\r\n\r\nprocedure TDateTimeScanner.DoDay;\r\n\r\nVar\r\n I : integer;\r\n\r\nbegin\r\n i:=ScanPatternLength;\r\n case i of\r\n 1,2 : FD:=scanfixedint(2);\r\n 3 : FD:=findmatch(FormatSettings.shortDayNames);\r\n 4 : FD:=findmatch(FormatSettings.longDayNames);\r\n 5 : matchpattern(FormatSettings.shortdateformat);\r\n 6 : matchpattern(FormatSettings.longdateformat);\r\n end;\r\nend;\r\n\r\nprocedure TDateTimeScanner.DoYear;\r\n\r\nVar\r\n I : integer;\r\n pivot : Integer;\r\n\r\nbegin\r\n i:=ScanPatternLength;\r\n FY:=scanfixedint(4);\r\n if i<=2 then\r\n begin\r\n Pivot:=YearOf(Now)-TwoDigitYearCenturyWindow;\r\n inc(FY, Pivot div 100 * 100);\r\n if (TwoDigitYearCenturyWindow > 0) and (FY < Pivot) then\r\n inc(FY, 100);\r\n end;\r\nend;\r\n\r\nprocedure TDateTimeScanner.DoMonth;\r\n\r\nVar\r\n I : integer;\r\n\r\nbegin\r\n I:=ScanPatternLength;\r\n case i of\r\n 1,2: FM:=scanfixedint(2);\r\n 3: FM:=findmatch(FormatSettings.ShortMonthNames);\r\n 4: FM:=findmatch(FormatSettings.LongMonthNames);\r\n end;\r\nend;\r\n\r\nprocedure TDateTimeScanner.DoTime;\r\n\r\nVar\r\n I : integer;\r\n\r\nbegin\r\n i:=ScanPatternLength;\r\n case i of\r\n 1: matchpattern(FormatSettings.ShortTimeFormat);\r\n 2: matchpattern(FormatSettings.LongTimeFormat);\r\n end;\r\nend;\r\n\r\nprocedure TDateTimeScanner.DoDateTime;\r\n\r\nbegin\r\n MatchPattern(FormatSettings.ShortDateFormat);\r\n MatchPattern(#9);\r\n MatchPattern(FormatSettings.LongTimeFormat);\r\n inc(FPatternPos);\r\nend;\r\n\r\nprocedure TDateTimeScanner.DoAMPM;\r\n\r\nVar\r\n I : integer;\r\n\r\nbegin\r\n i:=FindIMatch(AMPMformatting,Copy(FPattern,FPatternPos,5));\r\n case i of\r\n 0:\r\n begin\r\n i:=FindIMatch(['AM','PM'],Copy(FText,FPos,2));\r\n case i of\r\n 0: ;\r\n 1: FTimeval:=FTimeval+12*hrfactor;\r\n else\r\n ArrayMatchError\r\n end;\r\n inc(FPatternPos,length(AMPMformatting[0]));\r\n inc(FPos,2);\r\n end;\r\n 1:\r\n begin\r\n case Upcase(FText[FPos]) of\r\n 'A' : ;\r\n 'P' : FTimeval:=FTimeval+12*hrfactor;\r\n else\r\n ArrayMatchError\r\n end;\r\n inc(FPatternPos,length(AMPMformatting[1]));\r\n inc(FPos);\r\n end;\r\n 2:\r\n begin\r\n i:=FindIMatch([FormatSettings.TimeAMString,FormatSettings.TimePMString],Copy(FText,FPos,5));\r\n case i of\r\n 0: inc(FPos,length(FormatSettings.TimeAMString));\r\n 1: begin\r\n FTimeval:=FTimeval+12*hrfactor;\r\n inc(FPos,length(FormatSettings.TimePMString));\r\n end;\r\n else\r\n arraymatcherror\r\n end;\r\n inc(FPatternPos,length(AMPMformatting[2]));\r\n inc(FPatternPos,2);\r\n inc(FPos,2);\r\n end;\r\n else // no AM/PM match. Assume 'a' is simply a char\r\n MatchChar(FPattern[FPatternPos]);\r\n end;\r\nend;\r\n\r\nfunction TDateTimeScanner.Scan(StartPos: integer): TDateTime;\r\n\r\nvar\r\n lasttoken,\r\n activequote,\r\n lch : char;\r\n i : Integer;\r\n\r\nbegin\r\n if StartPos<1 then\r\n StartPos:=1;\r\n if FPos#0 then\r\n begin\r\n if (activequote<>lch) then\r\n MatchChar(lch)\r\n else\r\n begin\r\n activequote:=#0;\r\n inc(FPatternPos);\r\n end\r\n end\r\n else\r\n begin\r\n if (lch='M') and (lasttoken='H') then\r\n begin\r\n i:=ScanPatternLength;\r\n if i>2 then\r\n raiseexception(format(SHHMMError,[FPatternOffset+FPatternPos+1]));\r\n FTimeval:=FTimeval+scanfixedint(2)* minfactor;\r\n end\r\n else\r\n case lch of\r\n 'Y': DoYear;\r\n 'M': DoMonth;\r\n 'D': DoDay;\r\n 'T': DoTime;\r\n 'H': FTimeval:=FTimeval+scanfixedint(2)* hrfactor;\r\n 'N': FTimeval:=FTimeval+scanfixedint(2)* minfactor;\r\n 'S': FTimeval:=FTimeval+scanfixedint(2)* secfactor;\r\n 'Z': FTimeval:=FTimeval+scanfixedint(3)* mssecfactor;\r\n 'A': DoAMPM;\r\n '/': MatchChar(FormatSettings.DateSeparator);\r\n ':': begin\r\n MatchChar(FormatSettings.TimeSeparator);\r\n lch:=lasttoken;\r\n end;\r\n #39,'\"' :\r\n begin\r\n activequote:=lch;\r\n inc(FPatternPos);\r\n end;\r\n 'C': DoDateTime;\r\n '?': begin\r\n inc(FPatternPos);\r\n inc(FPos)\r\n end;\r\n #9: begin\r\n while (FPos<=FLen) and (FText[FPos] in WhiteSpace) do\r\n inc(FPos);\r\n inc(FPatternPos);\r\n end;\r\n else\r\n MatchChar(FPattern[FPatternPos]);\r\n end; {case}\r\n lasttoken:=lch;\r\n end\r\n end;\r\n// if (FPatternPos0) and (FPattern[FPatternLen-1]<>#9) then // allow omission of trailing whitespace\r\n// RaiseException(format(SFullpattern,[FPatternOffset+FPatternPos]));\r\n Result:=FTimeval;\r\n if (FY>0) and (FM>0) and (FD>0) then\r\n Result:=Result+EncodeDate(FY,FM,FD);\r\nend;\r\n\r\nFunction ScanDateTime(APattern,AValue: String; APos : integer = 1) : TDateTime;\r\n\r\nVar\r\n T : TDateTimeScanner;\r\n\r\nbegin\r\n T:=TDateTimeScanner.Create;\r\n try\r\n T.Pattern:=APattern;\r\n T.Text:=AValue;\r\n Result:=T.Scan(APos);\r\n finally\r\n T.Free;\r\n end;\r\nend;\r\n\r\n\r\n{ TTimeZone }\r\n\r\nfunction TTimeZone.GetAbbreviation(const ADateTime: TDateTime; const AForceDaylight: Boolean): string;\r\nconst\r\n cAbbreviationFormat_Hours = '%s%s%.2d';\r\n cAbbreviationFormat_Minutes = '%s%s%.2d:%.2d';\r\n cGMT = 'GMT';\r\n cMinus = '-';\r\n cPlus = '+';\r\nvar\r\n lAbsOffset: Int64;\r\n lHours: Integer;\r\n lMinutes: Integer;\r\n lOffset: Int64;\r\n lSignChar: Char;\r\nbegin\r\n lOffset := GetUtcOffsetInSeconds(ADateTime, AForceDaylight);\r\n\r\n if lOffset = 0 then\r\n Result := cGMT\r\n else\r\n begin\r\n lAbsOffset := Abs(lOffset);\r\n\r\n lHours := lAbsOffset div SecsPerHour;\r\n lMinutes := (lAbsOffset mod SecsPerHour) div SecsPerMin;\r\n\r\n if lOffset < 0 then\r\n lSignChar := cMinus\r\n else\r\n lSignChar := cPlus;\r\n\r\n if lMinutes > 0 then\r\n Result := Format(cAbbreviationFormat_Minutes, [cGMT, lSignChar, lHours, lMinutes])\r\n else\r\n Result := Format(cAbbreviationFormat_Hours, [cGMT, lSignChar, lHours]);\r\n end;\r\nend;\r\n\r\nfunction TTimeZone.GetAbbreviationForNow: string;\r\nbegin\r\n Result := GetAbbreviation(Now);\r\nend;\r\n\r\nfunction TTimeZone.GetCurrentUtcOffset: TTimeSpan;\r\nbegin\r\n Result := GetUtcOffset(Now);\r\nend;\r\n\r\nfunction TTimeZone.GetDisplayName(const ADateTime: TDateTime; const AForceDaylight: Boolean): string;\r\nbegin\r\n if GetLocalTimeType(ADateTime) = lttInvalid then\r\n raise ELocalTimeInvalid.CreateFmt(SLocalTimeInvalid, [DateTimeToStr(ADateTime)]);\r\n\r\n Result := DoGetDisplayName(ADateTime, AForceDaylight);\r\nend;\r\n\r\nfunction TTimeZone.GetDisplayNameForNow: string;\r\nbegin\r\n Result := GetDisplayName(Now);\r\nend;\r\n\r\nclass function TTimeZone.GetLocal: TTimeZone;\r\nbegin\r\n if not Assigned(FLocal) then\r\n FLocal := TLocalTimeZone.Create;\r\n Result := FLocal;\r\nend;\r\n\r\nfunction TTimeZone.GetLocalTimeType(const ADateTime: TDateTime): TLocalTimeType;\r\nvar\r\n lDSTSave: Int64;\r\n lOffset: Int64;\r\nbegin\r\n DoGetOffsetsAndType(ADateTime, lOffset, lDSTSave, Result);\r\nend;\r\n\r\nfunction TTimeZone.GetUtcOffset(const ADateTime: TDateTime; const AForceDaylight: Boolean): TTimeSpan;\r\nbegin\r\n Result := TTimeSpan.FromSeconds(GetUtcOffsetInSeconds(ADateTime, AForceDaylight));\r\nend;\r\n\r\nfunction TTimeZone.GetUtcOffsetInSeconds(const ADateTime: TDateTime; const AForceDaylight: Boolean): Int64;\r\nvar\r\n lDSTSave: Int64;\r\n lOffset: Int64;\r\n lType: TLocalTimeType;\r\nbegin\r\n DoGetOffsetsAndType(ADateTime, lOffset, lDSTSave, lType);\r\n\r\n if (lType = lttInvalid) then\r\n raise ELocalTimeInvalid.CreateFmt(SLocalTimeInvalid, [DateTimeToStr(ADateTime)])\r\n else if (lType = lttDaylight) or ((lType = lttAmbiguous) and AForceDaylight) then\r\n Result := lOffset + lDSTSave\r\n else\r\n Result := lOffset;\r\nend;\r\n\r\nfunction TTimeZone.HasDST: Boolean;\r\nbegin\r\n Result := HasDST(Now);\r\nend;\r\n\r\nfunction TTimeZone.HasDST(const AYear: TDateTime): Boolean;\r\nvar\r\n lDstSave: Int64;\r\n lOffset: Int64;\r\n lType: TLocalTimeType;\r\nbegin\r\n DoGetOffsetsAndType(AYear, lOffset, lDstSave, lType);\r\n Result := lDstSave <> 0;\r\nend;\r\n\r\nfunction TTimeZone.IncMilliSecond(const AValue: TDateTime; const ANumberOfMilliSeconds: Int64 = 1): TDateTime;\r\nvar\r\n lTempTime: Int64;\r\n lTimeStamp: TTimeStamp;\r\nbegin\r\n lTimeStamp := DateTimeToTimeStamp(AValue);\r\n lTempTime := TimeStampToMSecs(lTimeStamp);\r\n lTempTime := lTempTime + ANumberOfMilliSeconds;\r\n lTimeStamp := MSecsToTimeStamp(lTempTime);\r\n Result := TimeStampToDateTime(lTimeStamp);\r\nend;\r\n\r\nfunction TTimeZone.IncSecond(const AValue: TDateTime; const ANumberOfSeconds: Int64 = 1): TDateTime;\r\nbegin\r\n Result := IncMilliSecond(AValue, ANumberOfSeconds * MSecsPerSec);\r\nend;\r\n\r\nfunction TTimeZone.IsAmbiguousTime(const ADateTime: TDateTime): Boolean;\r\nbegin\r\n Result := GetLocalTimeType(ADateTime) = lttAmbiguous;\r\nend;\r\n\r\nfunction TTimeZone.IsDaylightTime(const ADateTime: TDateTime; const AForceDaylight: Boolean): Boolean;\r\nbegin\r\n case GetLocalTimeType(ADateTime) of\r\n lttDaylight: Result := True;\r\n lttAmbiguous: Result := AForceDaylight;\r\n else\r\n Result := False;\r\n end;\r\nend;\r\n\r\nfunction TTimeZone.IsInvalidTime(const ADateTime: TDateTime): Boolean;\r\nbegin\r\n Result := GetLocalTimeType(ADateTime) = lttInvalid;\r\nend;\r\n\r\nfunction TTimeZone.IsStandardTime(const ADateTime: TDateTime; const AForceDaylight: Boolean): Boolean;\r\nbegin\r\n case GetLocalTimeType(ADateTime) of\r\n lttStandard: Result := True;\r\n lttAmbiguous: Result := not AForceDaylight;\r\n else\r\n Result := False;\r\n end;\r\nend;\r\n\r\nfunction TTimeZone.ToLocalTime(const ADateTime: TDateTime): TDateTime;\r\nvar\r\n lDSTSave: Int64;\r\n lOffset: Int64;\r\n lType: TLocalTimeType;\r\nbegin\r\n DoGetOffsetsAndType(ADateTime, lOffset, lDSTSave, lType);\r\n Result := IncSecond(ADateTime, lOffset);\r\n\r\n DoGetOffsetsAndType(Result, lOffset, lDSTSave, lType);\r\n\r\n if lType in [lttInvalid, lttDaylight] then\r\n Result := IncSecond(Result, lDSTSave);\r\nend;\r\n\r\nfunction TTimeZone.ToUniversalTime(const ADateTime: TDateTime; const AForceDaylight: Boolean): TDateTime;\r\nvar\r\n lOffset: Int64;\r\nbegin\r\n lOffset := GetUtcOffsetInSeconds(ADateTime, AForceDaylight);\r\n\r\n Result := IncSecond(ADateTime, -lOffset);\r\nend;\r\n\r\n{ TLocalTimeZone }\r\n\r\nconstructor TLocalTimeZone.Create;\r\nbegin\r\n inherited Create;\r\n FDST := TDateUtilsHelper.Create;\r\nend;\r\n\r\ndestructor TLocalTimeZone.Destroy;\r\nbegin\r\n FDST.Free;\r\n inherited Destroy;\r\nend;\r\n\r\nfunction TLocalTimeZone.DoGetDisplayName(const ADateTime: TDateTime; const AForceDaylight: Boolean): string;\r\nvar\r\n lDateTime: NativeLargeInt;\r\n lLocale: string;\r\nbegin\r\n asm\r\n lLocale = undefined;\r\n end;\r\n lDateTime := DateTimeToUnix(ADateTime) * MSecsPerSec;\r\n Result := TJSDate.New(lDateTime).toLocaleDateString(lLocale, new(['day', '2-digit', 'timeZoneName', 'long']));\r\n Result := Result.Substring(4);\r\nend;\r\n\r\nfunction TLocalTimeZone.DoGetID: string;\r\nvar\r\n lLocale: string;\r\nbegin\r\n asm\r\n lLocale = undefined;\r\n end;\r\n Result := TJSDate.new().toLocaleDateString(lLocale, new(['day', '2-digit', 'timeZoneName', 'longGeneric']));\r\n Result := Result.Substring(4);\r\nend;\r\n\r\nprocedure TLocalTimeZone.DoGetOffsetsAndType(const ADateTime: TDateTime; out AOffset, ADstSave: Int64; out AType: TLocalTimeType);\r\nconst\r\n cIndexJanuary = 0;\r\n cIndexJuly = 6;\r\nvar\r\n lDate: TJSDate;\r\n lOffsetSummer: NativeInt;\r\n lOffsetWinter: NativeInt;\r\n lStdOffset: NativeInt;\r\n lDST: TDSTPoints;\r\nbegin\r\n lDate := TJSDate.New(DateTimeToUnix(ADateTime) * MSecsPerSec);\r\n\r\n lOffsetSummer := TJSDate.New(YearOf(ADateTime), cIndexJuly).getTimezoneOffset;\r\n lOffsetWinter := TJSDate.New(YearOf(ADateTime), cIndexJanuary).getTimezoneOffset;\r\n\r\n lStdOffset := Max(lOffsetSummer, lOffsetWinter);\r\n AOffset := -lStdOffset * SecsPerMin;\r\n ADstSave := Abs(lOffsetSummer - lOffsetWinter) * SecsPerMin;\r\n\r\n if FDST.Force(YearOf(ADateTime), lDST) then\r\n begin\r\n if (ADateTime > lDST.Key) and (ADateTime < IncHour(lDST.Key)) then\r\n begin\r\n AType := TLocalTimeType.lttInvalid;\r\n Exit;\r\n end;\r\n\r\n if (ADateTime > lDST.Value) and (ADateTime < IncHour(lDST.Value)) then\r\n begin\r\n AType := TLocalTimeType.lttAmbiguous;\r\n Exit;\r\n end;\r\n end;\r\n\r\n if lDate.getTimezoneOffset = lStdOffset then\r\n AType := TLocalTimeType.lttStandard\r\n else\r\n AType := TLocalTimeType.lttDaylight;\r\nend;\r\n\r\nfunction DateTimeToMilliseconds(const ADateTime: TDateTime): Int64;\r\nvar\r\n LTimeStamp: TTimeStamp;\r\nbegin\r\n LTimeStamp := DateTimeToTimeStamp(ADateTime);\r\n Result := LTimeStamp.Date;\r\n Result := (Result * MSecsPerDay) + LTimeStamp.Time;\r\nend;\r\n\r\nfunction TimeToMilliSeconds(const ATime: TTime): Integer;\r\nbegin\r\n result := Round(Abs(TimeOf(ATime)) * MSecsPerDay);\r\nend;\r\n\r\nend.\r\n","{********************************************************************}\r\n{ }\r\n{ written by TMS Software }\r\n{ Copyright (c) 2018 - 2024 }\r\n{ Email : info@tmssoftware.com }\r\n{ Web : http://www.tmssoftware.com }\r\n{ }\r\n{ The source code is given as is. The author is not responsible }\r\n{ for any possible damage done due to the use of this code. }\r\n{ The complete source code remains property of the author and may }\r\n{ not be distributed, published, given or sold in any form as such. }\r\n{ No parts of the source code can be included in any other component }\r\n{ or application without written authorization of the author. }\r\n{********************************************************************}\r\n\r\nunit WEBLib.Login;\r\n\r\n{$DEFINE NOPP}\r\n\r\ninterface\r\n\r\nuses\r\n Classes, SysUtils, Types, WEBLib.Controls, WEBLib.StdCtrls, WEBLib.Graphics, WEBLib.Dialogs,\r\n Web;\r\n\r\ntype\r\n TLoginPanel = class(TCustomControl)\r\n private\r\n FPasswordLabel: string;\r\n FOnLogin: TNotifyEvent;\r\n FUserLabel: string;\r\n FPassword: string;\r\n FCaptionLabel: string;\r\n FUser: string;\r\n FBorderColor: TColor;\r\n FLoginLabel: string;\r\n FElementButtonClassname: string;\r\n FElementInputClassName: string;\r\n FElementClassName: string;\r\n FUserInput: TJSHTMLElement;\r\n FPasswordInput: TJSHTMLElement;\r\n FUserLabelSpan: TJSHTMLElement;\r\n FPasswordLabelSpan: TJSHTMLElement;\r\n FButton: TJSHTMLElement;\r\n FCaption: TJSHTMLElement;\r\n FElementCaptionClassName: string;\r\n FPadding: integer;\r\n FMargin: integer;\r\n FElementLabelClassName: string;\r\n FCreated: boolean;\r\n procedure SetPassword(const Value: string);\r\n procedure SetPasswordLabel(const Value: string);\r\n procedure SetUser(const Value: string);\r\n procedure SetUserLabel(const Value: string);\r\n function HandleLoginClick(Event: TJSMouseEvent): Boolean; virtual;\r\n function HandlePasswordKeypress(Event: TJSKeyBoardEvent): Boolean; virtual;\r\n function GetPassword: string;\r\n function GetUser: string;\r\n procedure SetBorderColor(const Value: TColor); reintroduce;\r\n procedure SetCaptionLabel(const Value: string);\r\n procedure SetElementButtonClassName(const Value: string);\r\n procedure SetElementCaptionClassName(const Value: string);\r\n procedure SetElementClassName(const Value: string); reintroduce;\r\n procedure SetElementInputClassName(const Value: string);\r\n procedure SetMargin(const Value: integer);\r\n procedure SetPadding(const Value: integer);\r\n procedure SetElementLabelClassName(const Value: string);\r\n procedure SetLoginLabel(const Value: string);\r\n protected\r\n procedure DoLogin; virtual;\r\n function CreateElement: TJSElement; override;\r\n procedure UpdateElementVisual; override;\r\n procedure UpdateElementData; override;\r\n procedure BindEvents; override;\r\n procedure UnbindEvents; override;\r\n public\r\n procedure CreateInitialize; override;\r\n published\r\n property Align;\r\n property AlignWithMargins;\r\n property Anchors;\r\n property BorderColor: TColor read FBorderColor write SetBorderColor;\r\n property CaptionLabel: string read FCaptionLabel write SetCaptionLabel;\r\n property Center;\r\n property ElementClassName: string read FElementClassName write SetElementClassName;\r\n property ElementFont;\r\n property ElementID;\r\n property ElementPosition;\r\n property ElementCaptionClassName: string read FElementCaptionClassName write SetElementCaptionClassName;\r\n property ElementInputClassName: string read FElementInputClassName write SetElementInputClassName;\r\n property ElementButtonClassName: string read FElementButtonClassName write SetElementButtonClassName;\r\n property ElementLabelClassName: string read FElementLabelClassName write SetElementLabelClassName;\r\n property Font;\r\n property LoginLabel: string read FLoginLabel write SetLoginLabel;\r\n property Margin: integer read FMargin write SetMargin;\r\n property Padding: integer read FPadding write SetPadding;\r\n property Password: string read GetPassword write SetPassword;\r\n property PasswordLabel: string read FPasswordLabel write SetPasswordLabel;\r\n property User: string read GetUser write SetUser;\r\n property UserLabel: string read FUserLabel write SetUserLabel;\r\n property OnClick;\r\n property OnLogin: TNotifyEvent read FOnLogin write FOnLogin;\r\n\r\n end;\r\n\r\n TWebLoginPanel = class(TLoginPanel);\r\n\r\nimplementation\r\n\r\n{ TLoginPanel }\r\n\r\nprocedure TLoginPanel.BindEvents;\r\nvar\r\n s: string;\r\nbegin\r\n inherited;\r\n\r\n if FCreated then\r\n begin\r\n FButton.addEventListener('click', @HandleLoginClick);\r\n FPasswordInput.addEventListener('keypress', @HandlePasswordKeypress);\r\n FCreated := false;\r\n end\r\n else\r\n begin\r\n s := GetID + '_btn';\r\n FButton := TJSHTMLElement(document.getElementById(s));\r\n FButton.addEventListener('click', @HandleLoginClick);\r\n\r\n s := GetID + '_usr';\r\n FUserInput := TJSHTMLElement(document.getElementById(s));\r\n s := GetID + '_pwd';\r\n FPasswordInput := TJSHTMLElement(document.getElementById(s));\r\n FPasswordInput.addEventListener('keypress', @HandlePasswordKeypress);\r\n end;\r\nend;\r\n\r\nfunction TLoginPanel.CreateElement: TJSElement;\r\nvar\r\n br: TJSElement;\r\n useCSS: boolean;\r\nbegin\r\n FCreated := true;\r\n Result := document.createElement('SPAN');\r\n\r\n FCaption := TJSHTMLElement(document.createElement('DIV'));\r\n\r\n FUserInput := TJSHTMLElement(document.createElement('INPUT'));\r\n FUserInput['id'] := Name + '_usr';\r\n FPasswordInput := TJSHTMLElement(document.createElement('INPUT'));\r\n FPasswordInput.setAttribute('type','password');\r\n FPasswordInput['id'] := Name + '_pwd';\r\n\r\n FUserLabelSpan := TJSHTMLElement(document.createElement('DIV'));\r\n FPasswordLabelSpan := TJSHTMLElement(document.createElement('DIV'));\r\n\r\n useCSS := UseCSSFont;\r\n\r\n SetHTMLElementFont(FCaption, Font, useCSS);\r\n SetHTMLElementFont(FUserLabelSpan, Font, useCSS);\r\n SetHTMLElementFont(FUserInput, Font, useCSS);\r\n SetHTMLElementFont(FPasswordLabelSpan, Font, useCSS);\r\n SetHTMLElementFont(FPasswordInput, Font, useCSS);\r\n\r\n Result.appendChild(FCaption);\r\n Result.appendChild(FUserLabelSpan);\r\n Result.appendChild(FUserInput);\r\n Result.appendChild(FPasswordLabelSpan);\r\n Result.appendChild(FPasswordInput);\r\n\r\n br := document.createElement('BR');\r\n Result.appendChild(br);\r\n\r\n FButton := TJSHTMLElement(document.createElement('BUTTON'));\r\n FButton['id'] := Name + '_btn';\r\n Result.appendChild(FButton);\r\nend;\r\n\r\nprocedure TLoginPanel.CreateInitialize;\r\nbegin\r\n inherited;\r\n Color := clInfoBk;\r\n FCaptionLabel := 'Login';\r\n FBorderColor := clSilver;\r\n FUserLabel := 'Username:';\r\n FPasswordLabel := 'Password:';\r\n FLoginLabel := 'Login';\r\n FPadding := 10;\r\n FMargin := 5;\r\n Height := 155;\r\n Width := 185;\r\nend;\r\n\r\nprocedure TLoginPanel.DoLogin;\r\nbegin\r\n if Assigned(OnLogin) then\r\n OnLogin(Self);\r\nend;\r\n\r\nfunction TLoginPanel.GetPassword: string;\r\nbegin\r\n if Assigned(FPasswordInput) then\r\n Result := (FPasswordInput as TJSHTMLInputElement).value\r\n else\r\n Result := FPassword;\r\nend;\r\n\r\nfunction TLoginPanel.GetUser: string;\r\nbegin\r\n if Assigned(FUserInput) then\r\n Result := (FUserInput as TJSHTMLInputElement).value\r\n else\r\n Result := FUser;\r\nend;\r\n\r\nfunction TLoginPanel.HandleLoginClick(Event: TJSMouseEvent): Boolean;\r\nbegin\r\n Result := true;\r\n DoLogin;\r\nend;\r\n\r\nfunction TLoginPanel.HandlePasswordKeypress(Event: TJSKeyBoardEvent): Boolean;\r\nbegin\r\n Result := true;\r\n if (Event.Key = 'Enter') then\r\n DoLogin;\r\nend;\r\n\r\nprocedure TLoginPanel.SetBorderColor(const Value: TColor);\r\nbegin\r\n if (FBorderColor <> Value) then\r\n begin\r\n FBorderColor := Value;\r\n UpdateElementVisual;\r\n end;\r\nend;\r\n\r\nprocedure TLoginPanel.SetCaptionLabel(const Value: string);\r\nbegin\r\n if (FCaptionLabel <> Value) then\r\n begin\r\n FCaptionLabel := Value;\r\n UpdateElementData;\r\n end;\r\nend;\r\n\r\nprocedure TLoginPanel.SetElementButtonClassName(const Value: string);\r\nbegin\r\n FElementButtonClassname := Value;\r\nend;\r\n\r\nprocedure TLoginPanel.SetElementCaptionClassName(const Value: string);\r\nbegin\r\n FElementCaptionClassName := Value;\r\nend;\r\n\r\nprocedure TLoginPanel.SetElementClassName(const Value: string);\r\nbegin\r\n FElementClassName := Value;\r\nend;\r\n\r\nprocedure TLoginPanel.SetElementInputClassName(const Value: string);\r\nbegin\r\n FElementInputClassName := Value;\r\nend;\r\n\r\nprocedure TLoginPanel.SetElementLabelClassName(const Value: string);\r\nbegin\r\n if (FElementLabelClassName <> Value) then\r\n begin\r\n FElementLabelClassName := Value;\r\n UpdateElementVisual;\r\n end;\r\nend;\r\n\r\nprocedure TLoginPanel.SetLoginLabel(const Value: string);\r\nbegin\r\n if FLoginLabel <> Value then\r\n begin\r\n FLoginLabel := Value;\r\n UpdateElementData;\r\n end;\r\nend;\r\n\r\nprocedure TLoginPanel.SetMargin(const Value: integer);\r\nbegin\r\n if (FMargin <> Value) then\r\n begin\r\n FMargin := Value;\r\n UpdateElementVisual;\r\n end;\r\nend;\r\n\r\nprocedure TLoginPanel.SetPadding(const Value: integer);\r\nbegin\r\n if (FPadding <> Value) then\r\n begin\r\n FPadding := Value;\r\n UpdateElementVisual;\r\n end;\r\nend;\r\n\r\nprocedure TLoginPanel.SetPassword(const Value: string);\r\nbegin\r\n if (FPassword <> Value) then\r\n begin\r\n FPassword := Value;\r\n UpdateElementData;\r\n end;\r\nend;\r\n\r\nprocedure TLoginPanel.SetPasswordLabel(const Value: string);\r\nbegin\r\n if (FPasswordLabel <> Value) then\r\n begin\r\n FPasswordLabel := Value;\r\n UpdateElementData;\r\n end;\r\nend;\r\n\r\nprocedure TLoginPanel.SetUser(const Value: string);\r\nbegin\r\n if (FUser <> Value) then\r\n begin\r\n FUser := Value;\r\n UpdateElementData;\r\n end;\r\nend;\r\n\r\nprocedure TLoginPanel.SetUserLabel(const Value: string);\r\nbegin\r\n if (FUserLabel <> Value) then\r\n begin\r\n FUserLabel := Value;\r\n UpdateElementData;\r\n end;\r\nend;\r\n\r\nprocedure TLoginPanel.UnbindEvents;\r\nbegin\r\n inherited;\r\n FButton.removeEventListener('click',@HandleLoginClick);\r\nend;\r\n\r\nprocedure TLoginPanel.UpdateElementData;\r\nbegin\r\n inherited;\r\n FUserLabelSpan.innerHTML := FUserLabel;\r\n FPasswordLabelSpan.innerHTML := FPasswordLabel;\r\n FButton.innerHTML := FLoginLabel;\r\n FCaption.innerHTML := FCaptionLabel;\r\n (FUserInput as TJSHTMLInputElement).value := FUser;\r\n (FPasswordInput as TJSHTMLInputElement).value := FPassword;\r\nend;\r\n\r\nprocedure TLoginPanel.UpdateElementVisual;\r\nvar\r\n strpadding,strmargin: string;\r\n useCSS: boolean;\r\nbegin\r\n inherited;\r\n\r\n if Assigned(ElementHandle) then\r\n begin\r\n useCSS := UseCSSFont;\r\n\r\n strpadding := IntToStr(Padding)+'px';\r\n strmargin := IntToStr(Margin)+'px';\r\n\r\n ElementHandle.setAttribute('class',ElementClassName);\r\n\r\n if (ElementClassName = '') then\r\n begin\r\n ElementHandle.style.setProperty('border', 'solid 1px '+ColorToHTML(BorderColor));\r\n ElementHandle.style.setProperty('padding',strPadding);\r\n end;\r\n\r\n if Visible then\r\n ElementHandle.style.setProperty('display','table');\r\n\r\n FCaption.setAttribute('class',ElementCaptionClassName);\r\n\r\n if (ElementCaptionClassName = '') then\r\n begin\r\n FCaption.style.setProperty('margin-top',strMargin);\r\n FCaption.style.setProperty('margin-bottom',strMargin);\r\n FCaption.style.setProperty('font-weight','bold');\r\n\r\n SetHTMLElementFont(FCaption, Font, useCSS);\r\n end;\r\n\r\n FUserInput.setAttribute('class',ElementInputClassName);\r\n FPasswordInput.setAttribute('class',ElementInputClassName);\r\n\r\n if (ElementInputClassName = '') then\r\n begin\r\n FUserInput.style.setProperty('margin-top',strMargin);\r\n FUserInput.style.setProperty('margin-bottom',strMargin);\r\n FPasswordInput.style.setProperty('margin-top',strMargin);\r\n FPasswordInput.style.setProperty('margin-bottom',strMargin);\r\n\r\n SetHTMLElementFont(FUserInput, Font, useCSS);\r\n SetHTMLElementFont(FPasswordInput, Font, useCSS);\r\n end;\r\n\r\n FUserInput.style.setProperty('width','100%');\r\n FUserInput.style.setProperty('display','table-cell');\r\n\r\n FPasswordInput.style.setProperty('width','100%');\r\n FPasswordInput.style.setProperty('display','table-cell');\r\n\r\n FUserLabelSpan.setAttribute('class',ElementLabelClassName);\r\n FPasswordLabelSpan.setAttribute('class',ElementLabelClassName);\r\n\r\n if (ElementLabelClassName = '') then\r\n begin\r\n FUserLabelSpan.style.setProperty('margin-top',strMargin);\r\n FUserLabelSpan.style.setProperty('margin-bottom',strMargin);\r\n FPasswordLabelSpan.style.setProperty('margin-top',strMargin);\r\n FPasswordLabelSpan.style.setProperty('margin-bottom',strMargin);\r\n\r\n SetHTMLElementFont(FUserLabelSpan, Font, useCSS);\r\n SetHTMLElementFont(FPasswordLabelSpan, Font, useCSS);\r\n end;\r\n\r\n FButton.setAttribute('class',ElementButtonClassName);\r\n\r\n if (ElementButtonClassname = '') then\r\n begin\r\n FButton.style.setProperty('margin-top',strMargin);\r\n FButton.style.setProperty('margin-bottom',strMargin);\r\n\r\n SetHTMLElementFont(FButton, Font, useCSS);\r\n end;\r\n\r\n FButton.style.setProperty('float','right');\r\n end;\r\nend;\r\n\r\nend.\r\n","{\r\n This file is part of the Free Pascal run time library.\r\n Copyright (c) 1999-2000 by Michael Van Canneyt, member of the\r\n Free Pascal development team\r\n\r\n Constants used for displaying messages in DB units\r\n\r\n See the file COPYING.FPC, included in this distribution,\r\n for details about the copyright.\r\n\r\n This program is distributed in the hope that it will be useful,\r\n but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\r\n\r\n **********************************************************************}\r\n\r\nunit DBConst;\r\n\r\nInterface\r\n\r\nResourcestring\r\n SActiveDataset = 'Operation cannot be performed on an active dataset';\r\n SBadParamFieldType = 'Bad fieldtype for parameter \"%s\".';\r\n SCantSetAutoIncFields = 'AutoInc Fields are read-only';\r\n SConnected = 'Operation cannot be performed on a connected database';\r\n SDatasetReadOnly = 'Dataset is read-only.';\r\n SDatasetRegistered = 'Dataset already registered : \"%s\"';\r\n SDuplicateFieldName = 'Duplicate fieldname : \"%s\"';\r\n SErrAssTransaction = 'Cannot assign transaction while old transaction active!';\r\n SErrColumnNotFound = 'Column \"%s\" not found.';\r\n SErrDatabasenAssigned = 'Database not assigned!';\r\n SErrNoDatabaseAvailable = 'Invalid operation: Not attached to database';\r\n SErrNoDatabaseName = 'Database connect string (DatabaseName) not filled in!';\r\n SErrNoSelectStatement = 'Cannot open a non-select statement';\r\n SErrNoStatement = 'SQL statement not set';\r\n SErrTransAlreadyActive = 'Transaction already active';\r\n SErrTransactionnSet = 'Transaction not set';\r\n SErrIndexResultTooLong = 'Index result for \"%s\" too long, >100 characters (%d).';\r\n SErrIndexBasedOnInvField = 'Field \"%s\" has an invalid field type (%s) to base index on.';\r\n SErrIndexBasedOnUnkField = 'Index based on unknown field \"%s\".';\r\n SErrConnTransactionnSet = 'Transaction of connection not set';\r\n SErrNotASQLConnection = '\"%s\" is not a TSQLConnection';\r\n SErrNotASQLQuery = '\"%s\" is not a TCustomSQLQuery';\r\n STransNotActive = 'Operation cannot be performed on an inactive transaction';\r\n STransActive = 'Operation cannot be performed on an active transaction';\r\n SFieldNotFound = 'Field not found : \"%s\"';\r\n SInactiveDataset = 'Operation cannot be performed on an inactive dataset';\r\n SInvalidDisplayValues = '\"%s\" are not valid boolean displayvalues';\r\n SInvalidFieldKind = '%s : invalid field kind : ';\r\n SInvalidBookmark = 'Invalid bookmark';\r\n SInvalidFieldSize = 'Invalid field size : %d';\r\n SInvalidTypeConversion = 'Invalid type conversion to %s in field %s';\r\n SNeedField = 'Field %s is required, but not supplied.';\r\n SNeedFieldName = 'Field needs a name';\r\n SNoDataset = 'No dataset asssigned for field : \"%s\"';\r\n SNoDatasetRegistered = 'No such dataset registered : \"%s\"';\r\n SNoDatasets = 'No datasets are attached to the database';\r\n SNoSuchRecord = 'Could not find the requested record.';\r\n SNoTransactionRegistered = 'No such transaction registered : \"%s\"';\r\n SNoTransactions = 'No transactions are attached to the database';\r\n SNotABoolean = '\"%s\" is not a valid boolean';\r\n SNotAFloat = '\"%s\" is not a valid float';\r\n SNotAninteger = '\"%s\" is not a valid integer';\r\n SNotConnected = 'Operation cannot be performed on an disconnected database';\r\n SNotEditing = 'Operation not allowed, dataset \"%s\" is not in an edit or insert state.';\r\n SParameterNotFound = 'Parameter \"%s\" not found';\r\n SRangeError = '%f is not between %f and %f for %s';\r\n SReadOnlyField = 'Field %s cannot be modified, it is read-only.';\r\n STransactionRegistered = 'Transaction already registered : \"%s\"';\r\n SUniDirectional = 'Operation cannot be performed on an unidirectional dataset';\r\n SUnknownField = 'No field named \"%s\" was found in dataset \"%s\"';\r\n SUnknownFieldType = 'Unknown field type : %s';\r\n SUnknownParamFieldType = 'Unknown fieldtype for parameter \"%s\".';\r\n SMetadataUnavailable = 'The metadata is not available for this type of database.';\r\n SDeletedRecord = 'The record is deleted.';\r\n SIndexNotFound = 'Index ''%s'' not found';\r\n SParameterCountIncorrect = 'The number of parameters is incorrect.';\r\n SUnsupportedParameter = 'Parameters of the type ''%s'' are not (yet) supported.';\r\n SFieldValueError = 'Invalid value for field ''%s''';\r\n SInvalidCalcType = 'Field ''%s'' cannot be a calculated or lookup field';\r\n SDuplicateName = 'Duplicate name ''%s'' in %s';\r\n SNoParseSQL = '%s is only possible if ParseSQL is True';\r\n SLookupInfoError = 'Lookup information for field ''%s'' is incomplete';\r\n SUnsupportedFieldType = 'Fieldtype %s is not supported';\r\n SInvPacketRecordsValue = 'PacketRecords has to be larger then 0';\r\n SInvPacketRecordsValueFieldNames = 'PacketRecords must be -1 if IndexFieldNames is set';\r\n SInvalidSearchFieldType = 'Searching in fields of type %s is not supported';\r\n SDatasetEmpty = 'The dataset is empty';\r\n SFieldIsNull = 'The field is null';\r\n SOnUpdateError = 'An error occurred while applying the updates in a record: %s';\r\n SApplyRecNotSupported = 'Applying updates is not supported by this TDataset descendent';\r\n SNoWhereFields = 'No %s query specified and failed to generate one. (No fields for inclusion in where statement found)';\r\n SNoUpdateFields = 'No %s query specified and failed to generate one. (No fields found for insert- or update-statement found)';\r\n SNotSupported = 'Operation is not supported by this type of database';\r\n SDBCreateDropFailed = 'Creation or dropping of database failed';\r\n SMaxIndexes = 'The maximum amount of indexes is reached';\r\n SMinIndexes = 'The minimum amount of indexes is 1';\r\n STooManyFields = 'More fields specified then really exist';\r\n// These are added for Delphi-compatilility, but not used by the fcl:\r\n SFieldIndexError = 'Field index out of range';\r\n SIndexFieldMissing = 'Cannot access index field ''%s''';\r\n SNoFieldIndexes = 'No index currently active';\r\n SNotIndexField = 'Field ''%s'' is not indexed and cannot be modified';\r\n SErrUnknownConnectorType = 'Unknown connector type: \"%s\"';\r\n SNoIndexFieldNameGiven = 'There are no fields selected to base the index on';\r\n SStreamNotRecognised = 'The data-stream format is not recognized';\r\n SNoReaderClassRegistered = 'There is no TDatapacketReaderClass registered for this kind of data-stream';\r\n SErrCircularDataSourceReferenceNotAllowed = 'Circular datasource references are not allowed.';\r\n SCommitting = 'Committing transaction';\r\n SRollingBack = 'Rolling back transaction';\r\n SCommitRetaining = 'Commit and retaining transaction';\r\n SRollBackRetaining = 'Rollback and retaining transaction';\r\n SErrNoFieldsDefined = 'Can not create a dataset when there are no fielddefinitions or fields defined';\r\n SErrApplyUpdBeforeRefresh = 'Must apply updates before refreshing data';\r\n SErrNoDataset = 'Missing (compatible) underlying dataset, can not open';\r\n SErrDisconnectedPacketRecords = 'For disconnected TSQLQuery instances, packetrecords must be -1';\r\n SErrImplicitNoRollBack = 'Implicit use of transactions does not allow rollback.';\r\n SErrNoImplicitTransaction = 'Connection %s does not allow implicit transactions.';\r\n SErrImplictTransactionStart = 'Error: attempt to implicitly start a transaction on Connection \"%s\", transaction \"%s\".';\r\n SErrImplicitConnect = 'Error: attempt to implicitly activate connection \"%s\".';\r\n SErrFailedToUpdateRecord = 'Failed to apply record updates: %d rows updated.';\r\n SErrRefreshNotSingleton = 'Refresh SQL resulted in multiple records: %d.';\r\n SErrRefreshEmptyResult = 'Refresh SQL resulted in empty result set.';\r\n SErrNoKeyFieldForRefreshClause = 'No key field found to construct refresh SQL WHERE clause';\r\n SErrFailedToFetchReturningResult = 'Failed to fetch returning result';\r\n SLogParamValue = 'Parameter \"%s\" value : \"%s\"';\r\n SErrInvalidDateTime = 'Invalid date/time value : \"%s\"';\r\n SatEOFInternalOnly = 'loAtEOF is for internal use only.';\r\n SErrInsertingSameRecordtwice = 'Attempt to insert the same record twice.';\r\n SErrDoApplyUpdatesNeedsProxy = 'Cannot apply updates without Data proxy';\r\n SNestedDataSetClass = 'Nested dataset must inherit from %s';\r\n SCircularDataLink = 'Circular datalinks are not allowed';\n\r\nImplementation\r\n\r\nend.\r\n","{\r\n This file is part of the Free Pascal run time library.\r\n Copyright (c) 1999-2017 by Michael Van Canneyt, member of the\r\n Free Pascal development team\r\n\r\n DB database unit\r\n\r\n See the file COPYING.FPC, included in this distribution,\r\n for details about the copyright.\r\n\r\n This program is distributed in the hope that it will be useful,\r\n but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\r\n\r\n **********************************************************************}\r\nunit DB;\r\n\r\n{$mode objfpc}\r\n\r\n{ $define dsdebug}\r\n\r\ninterface\r\n\r\nuses Classes, SysUtils, JS, Types, DateUtils;\r\n\r\nconst\r\n\r\n dsMaxBufferCount = MAXINT div 8;\r\n dsMaxStringSize = 8192;\r\n\r\n // Used in AsBoolean for string fields to determine\r\n // whether it's true or false.\r\n YesNoChars : Array[Boolean] of char = ('N', 'Y');\r\n\r\n SQLDelimiterCharacters = [';',',',' ','(',')',#13,#10,#9];\r\n\r\ntype\r\n\r\n{ Misc Dataset types }\r\n\r\n TDataSetState = (dsInactive, dsBrowse, dsEdit, dsInsert, dsSetKey,\r\n dsCalcFields, dsFilter, dsNewValue, dsOldValue, dsCurValue, dsBlockRead,\r\n dsInternalCalc, dsOpening, dsRefreshFields);\r\n\r\n TDataEvent = (deFieldChange, deRecordChange, deDataSetChange,\r\n deDataSetScroll, deLayoutChange, deUpdateRecord, deUpdateState,\r\n deCheckBrowseMode, dePropertyChange, deFieldListChange, deFocusControl,\r\n deParentScroll,deConnectChange,deReconcileError,deDisabledStateChange);\r\n\r\n TUpdateStatus = (usModified, usInserted, usDeleted);\r\n TUpdateStatusSet = Set of TUpdateStatus;\r\n\r\n TResolveStatus = (rsUnresolved, rsResolving, rsResolved, rsResolveFailed);\r\n TResolveStatusSet = Set of TResolveStatus;\r\n\r\n TUpdateMode = (upWhereAll, upWhereChanged, upWhereKeyOnly);\r\n TResolverResponse = (rrSkip, rrAbort, rrMerge, rrApply, rrIgnore);\r\n\r\n TProviderFlag = (pfInUpdate, pfInWhere, pfInKey, pfHidden, pfRefreshOnInsert,pfRefreshOnUpdate);\r\n TProviderFlags = set of TProviderFlag;\r\n\r\n{ Forward declarations }\r\n\r\n TFieldDef = class;\r\n TFieldDefs = class;\r\n TField = class;\r\n TFields = Class;\r\n TDataSet = class;\r\n TDataSource = Class;\r\n TDataLink = Class;\r\n TDataProxy = Class;\r\n TDataRequest = class;\r\n TRecordUpdateDescriptor = class;\r\n TRecordUpdateDescriptorList = class;\r\n TRecordUpdateBatch = class;\r\n\r\n{ Exception classes }\r\n\r\n EDatabaseError = class(Exception);\r\n\r\n EUpdateError = class(EDatabaseError)\r\n private\r\n FContext : String;\r\n FErrorCode : integer;\r\n FOriginalException : Exception;\r\n FPreviousError : Integer;\r\n public\r\n constructor Create(NativeError, Context : String;\r\n ErrCode, PrevError : integer; E: Exception); reintroduce;\r\n Destructor Destroy; override;\r\n property Context : String read FContext;\r\n property ErrorCode : integer read FErrorcode;\r\n property OriginalException : Exception read FOriginalException;\r\n property PreviousError : Integer read FPreviousError;\r\n end;\r\n \r\n\r\n{ TFieldDef }\r\n\r\n TFieldClass = class of TField;\r\n\r\n // Data type for field.\r\n TFieldType = (ftUnknown, ftString, ftSmallint, ftInteger, ftWord, // 0..4\r\n ftBoolean, ftFloat, ftCurrency, ftBCD, ftDate, ftTime, ftDateTime, // 5..11\r\n ftBytes, ftVarBytes, ftAutoInc, ftBlob, ftMemo, ftGraphic, ftFmtMemo, // 12..18\r\n ftParadoxOle, ftDBaseOle, ftTypedBinary, ftCursor, ftFixedChar, ftWideString, // 19..24\r\n ftLargeint, ftADT, ftArray, ftReference, ftDataSet, ftOraBlob, ftOraClob, // 25..31\r\n ftVariant, ftInterface, ftIDispatch, ftGuid, ftTimeStamp, ftFMTBcd, // 32..37\r\n ftFixedWideChar, ftWideMemo, ftOraTimeStamp, ftOraInterval, // 38..41\r\n ftLongWord, ftShortint, ftByte, ftExtended, ftConnection, ftParams, ftStream, //42..48\r\n ftTimeStampOffset, ftObject, ftSingle); //49..51\r\n\r\nconst\r\n ftNonTextTypes = [ftBytes, ftVarBytes, ftBlob, ftMemo, ftGraphic, ftFmtMemo,\r\n ftParadoxOle, ftDBaseOle, ftTypedBinary, ftCursor, ftADT, ftArray,\r\n ftReference, ftDataSet];\r\n\r\ntype\r\n\r\n{ TDateTimeRec }\r\n\r\n TFieldAttribute = (faHiddenCol, faReadonly, faRequired, faLink, faUnNamed, faFixed);\r\n TFieldAttributes = set of TFieldAttribute;\r\n\r\n{ TNamedItem }\r\n\r\n TNamedItem = class(TCollectionItem)\r\n private\r\n FName: string;\r\n protected\r\n function GetDisplayName: string; override;\r\n procedure SetDisplayName(const Value: string); override;\r\n Public \r\n property DisplayName : string read GetDisplayName write SetDisplayName;\r\n published\r\n property Name : string read FName write SetDisplayName;\r\n end;\r\n\r\n{ TDefCollection }\r\n\r\n TDefCollection = class(TOwnedCollection)\r\n private\r\n FDataset: TDataset;\r\n FUpdated: boolean;\r\n protected\r\n procedure SetItemName(Item: TCollectionItem); override;\r\n public\r\n constructor create(ADataset: TDataset; AOwner: TPersistent; AClass: TCollectionItemClass); reintroduce;\r\n function Find(const AName: string): TNamedItem;\r\n procedure GetItemNames(List: TStrings);\r\n function IndexOf(const AName: string): Longint;\r\n property Dataset: TDataset read FDataset;\r\n property Updated: boolean read FUpdated write FUpdated;\r\n end;\r\n\r\n{ TFieldDef }\r\n\r\n TFieldDef = class(TNamedItem)\r\n Private\r\n FAttributes : TFieldAttributes;\r\n FDataType : TFieldType;\r\n FFieldNo : Longint;\r\n FInternalCalcField : Boolean;\r\n FPrecision : Longint;\r\n FRequired : Boolean;\r\n FSize : Integer;\r\n Function GetFieldClass : TFieldClass;\r\n procedure SetAttributes(AValue: TFieldAttributes);\r\n procedure SetDataType(AValue: TFieldType);\r\n procedure SetPrecision(const AValue: Longint);\r\n procedure SetSize(const AValue: Integer);\r\n procedure SetRequired(const AValue: Boolean);\r\n public\r\n constructor Create(ACollection : TCollection); override;\r\n constructor Create(AOwner: TFieldDefs; const AName: string; ADataType: TFieldType; ASize: Integer; ARequired: Boolean; AFieldNo: Longint); overload;\r\n destructor Destroy; override;\r\n procedure Assign(Source: TPersistent); override;\r\n function CreateField(AOwner: TComponent): TField;\r\n property FieldClass: TFieldClass read GetFieldClass;\r\n property FieldNo: Longint read FFieldNo;\r\n property InternalCalcField: Boolean read FInternalCalcField write FInternalCalcField;\r\n property Required: Boolean read FRequired write SetRequired;\r\n Published\r\n property Attributes: TFieldAttributes read FAttributes write SetAttributes default [];\r\n property DataType: TFieldType read FDataType write SetDataType;\r\n property Precision: Longint read FPrecision write SetPrecision default 0;\r\n property Size: Integer read FSize write SetSize default 0;\r\n end;\r\n TFieldDefClass = Class of TFieldDef;\r\n\r\n{ TFieldDefs }\r\n\r\n TFieldDefs = class(TDefCollection)\r\n private\r\n FHiddenFields : Boolean;\r\n function GetItem(Index: Longint): TFieldDef; reintroduce;\r\n procedure SetItem(Index: Longint; const AValue: TFieldDef); reintroduce;\r\n Protected\r\n Class Function FieldDefClass : TFieldDefClass; virtual;\r\n public\r\n constructor Create(ADataSet: TDataSet); reintroduce;\r\n// destructor Destroy; override;\r\n Function Add(const AName: string; ADataType: TFieldType; ASize, APrecision{%H-}: Integer; ARequired, AReadOnly: Boolean; AFieldNo : Integer) : TFieldDef; overload;\r\n Function Add(const AName: string; ADataType: TFieldType; ASize: Word; ARequired: Boolean; AFieldNo : Integer) : TFieldDef; overload;\r\n procedure Add(const AName: string; ADataType: TFieldType; ASize: Word; ARequired: Boolean); overload;\r\n procedure Add(const AName: string; ADataType: TFieldType; ASize: Word); overload;\r\n procedure Add(const AName: string; ADataType: TFieldType); overload;\r\n function Add: TFieldDef; overload; reintroduce;\r\n Function AddFieldDef : TFieldDef;\r\n procedure Assign(FieldDefs: TFieldDefs); overload;\r\n function Find(const AName: string): TFieldDef; reintroduce;\r\n// procedure Clear;\r\n// procedure Delete(Index: Longint);\r\n procedure Update; overload;\r\n Function MakeNameUnique(const AName : String) : string; virtual;\r\n Property HiddenFields : Boolean Read FHiddenFields Write FHiddenFields;\r\n property Items[Index: Longint]: TFieldDef read GetItem write SetItem; default;\r\n end;\r\n TFieldDefsClass = Class of TFieldDefs;\r\n\r\n{ TField }\r\n\r\n TFieldKind = (fkData, fkCalculated, fkLookup, fkInternalCalc);\r\n TFieldKinds = Set of TFieldKind;\r\n\r\n TFieldNotifyEvent = procedure(Sender: TField) of object;\r\n TFieldGetTextEvent = procedure(Sender: TField; var aText: string;\r\n DisplayText: Boolean) of object;\r\n TFieldSetTextEvent = procedure(Sender: TField; const aText: string) of object;\r\n TFieldChars = Array of Char;\r\n\r\n{ TLookupList }\r\n\r\n TAutoRefreshFlag = (arNone, arAutoInc, arDefault);\r\n TLookupList = class(TObject)\r\n private\r\n FList: TFPList;\r\n public\r\n constructor Create; reintroduce;\r\n destructor Destroy; override;\r\n procedure Add(const AKey, AValue: JSValue);\r\n procedure Clear;\r\n function FirstKeyByValue(const AValue: JSValue): JSValue;\r\n function ValueOfKey(const AKey: JSValue): JSValue;\r\n procedure ValuesToStrings(AStrings: TStrings);\r\n end;\r\n\r\n{ TField }\r\n\r\n TField = class(TComponent)\r\n private\r\n FAlignment : TAlignment;\r\n FAttributeSet : String;\r\n FAutoGenerateValue: TAutoRefreshFlag;\r\n FCalculated : Boolean;\r\n FConstraintErrorMessage : String;\r\n FCustomConstraint : String;\r\n FDataSet : TDataSet;\r\n// FDataSize : Word;\r\n FDataType : TFieldType;\r\n FDefaultExpression : String;\r\n FDisplayLabel : String;\r\n FDisplayWidth : Longint;\r\n// FEditMask: TEditMask;\r\n FFieldDef: TFieldDef;\r\n FFieldKind : TFieldKind;\r\n FFieldName : String;\r\n FFieldNo : Longint;\r\n FFields : TFields;\r\n FHasConstraints : Boolean;\r\n FImportedConstraint : String;\r\n FIsIndexField : Boolean;\r\n FKeyFields : String;\r\n FLookupCache : Boolean;\r\n FLookupDataSet : TDataSet;\r\n FLookupKeyfields : String;\r\n FLookupresultField : String;\r\n FLookupList: TLookupList;\r\n FOnChange : TFieldNotifyEvent;\r\n FOnGetText: TFieldGetTextEvent;\r\n FOnSetText: TFieldSetTextEvent;\r\n FOnValidate: TFieldNotifyEvent;\r\n FOrigin : String;\r\n FReadOnly : Boolean;\r\n FRequired : Boolean;\r\n FSize : integer;\r\n FValidChars : TFieldChars;\r\n FValueBuffer : JSValue;\r\n FValidating : Boolean;\r\n FVisible : Boolean;\r\n FProviderFlags : TProviderFlags;\r\n function GetIndex : longint;\r\n function GetLookup: Boolean;\r\n procedure SetAlignment(const AValue: TAlignMent);\r\n procedure SetIndex(const AValue: Longint);\r\n function GetDisplayText: String;\r\n function GetEditText: String;\r\n procedure SetEditText(const AValue: string);\r\n procedure SetDisplayLabel(const AValue: string);\r\n procedure SetDisplayWidth(const AValue: Longint);\r\n function GetDisplayWidth: integer;\r\n procedure SetLookup(const AValue: Boolean);\r\n procedure SetReadOnly(const AValue: Boolean);\r\n procedure SetVisible(const AValue: Boolean);\r\n function IsDisplayLabelStored : Boolean;\r\n function IsDisplayWidthStored: Boolean;\r\n function GetLookupList: TLookupList;\r\n procedure CalcLookupValue;\r\n protected\r\n Procedure RaiseAccessError(const TypeName: string);\r\n function AccessError(const TypeName: string): EDatabaseError;\r\n procedure CheckInactive;\r\n class procedure CheckTypeSize(AValue: Longint); virtual;\r\n procedure Change; virtual;\r\n procedure Bind(Binding: Boolean); virtual;\r\n procedure DataChanged;\r\n function GetAsBoolean: Boolean; virtual;\r\n function GetAsBytes: TBytes; virtual;\r\n function GetAsLargeInt: NativeInt; virtual;\r\n function GetAsDateTime: TDateTime; virtual;\r\n function GetAsFloat: Double; virtual;\r\n function GetAsLongint: Longint; virtual;\r\n function GetAsInteger: Longint; virtual;\r\n function GetAsJSValue: JSValue; virtual;\r\n function GetOldValue: JSValue; virtual;\r\n function GetAsString: string; virtual;\r\n function GetCanModify: Boolean; virtual;\r\n function GetClassDesc: String; virtual;\r\n function GetDataSize: Integer; virtual;\r\n function GetDefaultWidth: Longint; virtual;\r\n function GetDisplayName : String;\r\n function GetCurValue: JSValue; virtual;\r\n function GetNewValue: JSValue; virtual;\r\n function GetIsNull: Boolean; virtual;\r\n procedure GetText(var AText: string; ADisplayText{%H-}: Boolean); virtual;\r\n procedure Notification(AComponent: TComponent; Operation: TOperation); override;\r\n procedure PropertyChanged(LayoutAffected: Boolean);\r\n procedure SetAsBoolean(AValue{%H-}: Boolean); virtual;\r\n procedure SetAsDateTime(AValue{%H-}: TDateTime); virtual;\r\n procedure SetAsFloat(AValue{%H-}: Double); virtual;\r\n procedure SetAsLongint(AValue: Longint); virtual;\r\n procedure SetAsInteger(AValue{%H-}: Longint); virtual;\r\n procedure SetAsLargeInt(AValue{%H-}: NativeInt); virtual;\r\n procedure SetAsJSValue(const AValue: JSValue); virtual;\r\n procedure SetAsString(const AValue{%H-}: string); virtual;\r\n procedure SetDataset(AValue : TDataset); virtual;\r\n procedure SetDataType(AValue: TFieldType);\r\n procedure SetNewValue(const AValue: JSValue);\r\n procedure SetSize(AValue: Integer); virtual;\r\n procedure SetText(const AValue: string); virtual;\r\n procedure SetVarValue(const AValue{%H-}: JSValue); virtual;\r\n procedure SetAsBytes(const AValue{%H-}: TBytes); virtual;\r\n procedure DefineProperties(Filer: TFiler); override;\r\n public\r\n constructor Create(AOwner: TComponent); override;\r\n destructor Destroy; override;\r\n function GetParentComponent: TComponent; override;\r\n procedure SetParentComponent(Value: TComponent); override;\r\n function HasParent: Boolean; override;\r\n procedure Assign(Source: TPersistent); override;\r\n procedure AssignValue(const AValue: JSValue);\r\n procedure Clear; virtual;\r\n procedure FocusControl;\r\n function GetData : JSValue;\r\n class function IsBlob: Boolean; virtual;\r\n function IsValidChar(InputChar: Char): Boolean; virtual;\r\n procedure RefreshLookupList;\r\n procedure SetData(Buffer: JSValue); overload;\r\n procedure SetFieldType(AValue{%H-}: TFieldType); virtual;\r\n procedure Validate(Buffer: Pointer);\r\n property AsBytes: TBytes read GetAsBytes write SetAsBytes;\r\n property AsBoolean: Boolean read GetAsBoolean write SetAsBoolean;\r\n property AsDateTime: TDateTime read GetAsDateTime write SetAsDateTime;\r\n property AsFloat: Double read GetAsFloat write SetAsFloat;\r\n property AsLongint: Longint read GetAsLongint write SetAsLongint;\r\n property AsLargeInt: NativeInt read GetAsLargeInt write SetAsLargeInt;\r\n property AsInteger: Longint read GetAsInteger write SetAsInteger;\r\n property AsString: string read GetAsString write SetAsString;\r\n property AsJSValue: JSValue read GetAsJSValue write SetAsJSValue;\r\n property AutoGenerateValue: TAutoRefreshFlag read FAutoGenerateValue write FAutoGenerateValue default arNone;\r\n property AttributeSet: string read FAttributeSet write FAttributeSet;\r\n property Calculated: Boolean read FCalculated write FCalculated;\r\n property CanModify: Boolean read GetCanModify;\r\n property CurValue: JSValue read GetCurValue;\r\n property DataSet: TDataSet read FDataSet write SetDataSet;\r\n property DataSize: Integer read GetDataSize;\r\n property DataType: TFieldType read FDataType;\r\n property DisplayName: String Read GetDisplayName;\r\n property DisplayText: String read GetDisplayText;\r\n property FieldNo: Longint read FFieldNo;\r\n property IsIndexField: Boolean read FIsIndexField;\r\n property IsNull: Boolean read GetIsNull;\r\n property Lookup: Boolean read GetLookup write SetLookup; //deprecated;\r\n property NewValue: JSValue read GetNewValue write SetNewValue;\r\n property Size: Integer read FSize write SetSize;\r\n property Text: string read GetEditText write SetEditText;\r\n property ValidChars : TFieldChars read FValidChars write FValidChars;\r\n property Value: JSValue read GetAsJSValue write SetAsJSValue;\r\n property OldValue: JSValue read GetOldValue;\r\n property LookupList: TLookupList read GetLookupList;\r\n Property FieldDef : TFieldDef Read FFieldDef;\r\n published\r\n property Alignment : TAlignment read FAlignment write SetAlignment default taLeftJustify;\r\n property CustomConstraint: string read FCustomConstraint write FCustomConstraint;\r\n property ConstraintErrorMessage: string read FConstraintErrorMessage write FConstraintErrorMessage;\r\n property DefaultExpression: string read FDefaultExpression write FDefaultExpression;\r\n property DisplayLabel : string read GetDisplayName write SetDisplayLabel stored IsDisplayLabelStored;\r\n property DisplayWidth: Longint read GetDisplayWidth write SetDisplayWidth stored IsDisplayWidthStored;\r\n property FieldKind: TFieldKind read FFieldKind write FFieldKind;\r\n property FieldName: string read FFieldName write FFieldName;\r\n property HasConstraints: Boolean read FHasConstraints;\r\n property Index: Longint read GetIndex write SetIndex;\r\n property ImportedConstraint: string read FImportedConstraint write FImportedConstraint;\r\n property KeyFields: string read FKeyFields write FKeyFields;\r\n property LookupCache: Boolean read FLookupCache write FLookupCache;\r\n property LookupDataSet: TDataSet read FLookupDataSet write FLookupDataSet;\r\n property LookupKeyFields: string read FLookupKeyFields write FLookupKeyFields;\r\n property LookupResultField: string read FLookupResultField write FLookupResultField;\r\n property Origin: string read FOrigin write FOrigin;\r\n property ProviderFlags : TProviderFlags read FProviderFlags write FProviderFlags;\r\n property ReadOnly: Boolean read FReadOnly write SetReadOnly;\r\n property Required: Boolean read FRequired write FRequired;\r\n property Visible: Boolean read FVisible write SetVisible default True;\r\n property OnChange: TFieldNotifyEvent read FOnChange write FOnChange;\r\n property OnGetText: TFieldGetTextEvent read FOnGetText write FOnGetText;\r\n property OnSetText: TFieldSetTextEvent read FOnSetText write FOnSetText;\r\n property OnValidate: TFieldNotifyEvent read FOnValidate write FOnValidate;\r\n end;\r\n\r\n{ TStringField }\r\n\r\n TStringField = class(TField)\r\n private\r\n FFixedChar : boolean;\r\n FTransliterate : Boolean;\r\n protected\r\n class procedure CheckTypeSize(AValue: Longint); override;\r\n function GetAsBoolean: Boolean; override;\r\n function GetAsDateTime: TDateTime; override;\r\n function GetAsFloat: Double; override;\r\n function GetAsInteger: Longint; override;\r\n function GetAsLargeInt: NativeInt; override;\r\n function GetAsString: String; override;\r\n function GetAsJSValue: JSValue; override;\r\n function GetDefaultWidth: Longint; override;\r\n procedure GetText(var AText: string; ADisplayText{%H-}: Boolean); override;\r\n procedure SetAsBoolean(AValue: Boolean); override;\r\n procedure SetAsDateTime(AValue: TDateTime); override;\r\n procedure SetAsFloat(AValue: Double); override;\r\n procedure SetAsInteger(AValue: Longint); override;\r\n procedure SetAsLargeInt(AValue: NativeInt); override;\r\n procedure SetAsString(const AValue: String); override;\r\n procedure SetVarValue(const AValue: JSValue); override;\r\n public\r\n constructor Create(AOwner: TComponent); override;\r\n procedure SetFieldType(AValue: TFieldType); override;\r\n property FixedChar : Boolean read FFixedChar write FFixedChar;\r\n property Transliterate: Boolean read FTransliterate write FTransliterate;\r\n property Value: String read GetAsString write SetAsString;\r\n published\r\n property Size default 20;\r\n end;\r\n\r\n\r\n{ TNumericField }\r\n\r\n TNumericField = class(TField)\r\n Private\r\n FDisplayFormat : String;\r\n FEditFormat : String;\r\n protected\r\n class procedure CheckTypeSize(AValue: Longint); override;\r\n procedure RangeError(AValue, Min, Max: Double);\r\n procedure SetDisplayFormat(const AValue: string);\r\n procedure SetEditFormat(const AValue: string);\r\n function GetAsBoolean: Boolean; override;\r\n Procedure SetAsBoolean(AValue: Boolean); override;\r\n public\r\n constructor Create(AOwner: TComponent); override;\r\n published\r\n property Alignment default taRightJustify;\r\n property DisplayFormat: string read FDisplayFormat write SetDisplayFormat;\r\n property EditFormat: string read FEditFormat write SetEditFormat;\r\n end;\r\n\r\n{ TLongintField }\r\n\r\n TIntegerField = class(TNumericField)\r\n private\r\n FMinValue,\r\n FMaxValue,\r\n FMinRange,\r\n FMaxRange : Longint;\r\n Procedure SetMinValue (AValue : longint);\r\n Procedure SetMaxValue (AValue : longint);\r\n protected\r\n function GetAsFloat: Double; override;\r\n function GetAsInteger: Longint; override;\r\n function GetAsString: string; override;\r\n function GetAsJSValue: JSValue; override;\r\n procedure GetText(var AText: string; ADisplayText: Boolean); override;\r\n function GetValue(var AValue: Longint): Boolean;\r\n procedure SetAsFloat(AValue: Double); override;\r\n procedure SetAsInteger(AValue: Longint); override;\r\n procedure SetAsString(const AValue: string); override;\r\n procedure SetVarValue(const AValue: JSValue); override;\r\n function GetAsLargeInt: NativeInt; override;\r\n procedure SetAsLargeInt(AValue: NativeInt); override;\r\n public\r\n constructor Create(AOwner: TComponent); override;\r\n Function CheckRange(AValue : Longint) : Boolean;\r\n property Value: Longint read GetAsInteger write SetAsInteger;\r\n published\r\n property MaxValue: Longint read FMaxValue write SetMaxValue default 0;\r\n property MinValue: Longint read FMinValue write SetMinValue default 0;\r\n end;\r\n\r\n TSmallIntField = class(TIntegerField);\r\n\r\n TWordField = class(TIntegerField)\r\n private\r\n procedure SetAsWord(AValue: word);\r\n function GetAsWord: word;\r\n public\r\n property Value: Word read GetAsWord write SetAsWord;\r\n end;\r\n\r\n{ TLargeintField }\r\n\r\n TLargeintField = class(TNumericField)\r\n private\r\n FMinValue,\r\n FMaxValue,\r\n FMinRange,\r\n FMaxRange : NativeInt;\r\n Procedure SetMinValue (AValue : NativeInt);\r\n Procedure SetMaxValue (AValue : NativeInt);\r\n protected\r\n function GetAsFloat: Double; override;\r\n function GetAsInteger: Longint; override;\r\n function GetAsLargeInt: NativeInt; override;\r\n function GetAsString: string; override;\r\n function GetAsJSValue: JSValue; override;\r\n procedure GetText(var AText: string; ADisplayText: Boolean); override;\r\n function GetValue(var AValue: NativeInt): Boolean;\r\n procedure SetAsFloat(AValue: Double); override;\r\n procedure SetAsInteger(AValue: Longint); override;\r\n procedure SetAsLargeInt(AValue: NativeInt); override;\r\n procedure SetAsString(const AValue: string); override;\r\n procedure SetVarValue(const AValue: JSValue); override;\r\n public\r\n constructor Create(AOwner: TComponent); override;\r\n Function CheckRange(AValue : NativeInt) : Boolean;\r\n property Value: NativeInt read GetAsLargeInt write SetAsLargeInt;\r\n published\r\n property MaxValue: NativeInt read FMaxValue write SetMaxValue default 0;\r\n property MinValue: NativeInt read FMinValue write SetMinValue default 0;\r\n end;\r\n\r\n{ TAutoIncField }\r\n\r\n TAutoIncField = class(TIntegerField)\r\n Protected\r\n procedure SetAsInteger(AValue: Longint); override;\r\n public\r\n constructor Create(AOwner: TComponent); override;\r\n end;\r\n\r\n{ TFloatField }\r\n\r\n TFloatField = class(TNumericField)\r\n private\r\n FCurrency: Boolean;\r\n FMaxValue : Double;\r\n FMinValue : Double;\r\n FPrecision : Longint;\r\n procedure SetCurrency(const AValue: Boolean);\r\n procedure SetPrecision(const AValue: Longint);\r\n protected\r\n function GetAsFloat: Double; override;\r\n function GetAsLargeInt: NativeInt; override;\r\n function GetAsInteger: Longint; override;\r\n function GetAsJSValue: JSValue; override;\r\n function GetAsString: string; override;\r\n procedure GetText(var AText: string; ADisplayText: Boolean); override;\r\n procedure SetAsFloat(AValue: Double); override;\r\n procedure SetAsLargeInt(AValue: NativeInt); override;\r\n procedure SetAsInteger(AValue: Longint); override;\r\n procedure SetAsString(const AValue: string); override;\r\n procedure SetVarValue(const AValue: JSValue); override;\r\n public\r\n constructor Create(AOwner: TComponent); override;\r\n Function CheckRange(AValue : Double) : Boolean;\r\n property Value: Double read GetAsFloat write SetAsFloat;\r\n\r\n published\r\n property Currency: Boolean read FCurrency write SetCurrency default False;\r\n property MaxValue: Double read FMaxValue write FMaxValue;\r\n property MinValue: Double read FMinValue write FMinValue;\r\n property Precision: Longint read FPrecision write SetPrecision default 15; // min 2 instellen, delphi compat\r\n end;\r\n\r\n\r\n{ TBooleanField }\r\n\r\n TBooleanField = class(TField)\r\n private\r\n FDisplayValues : String;\r\n // First byte indicates uppercase or not.\r\n FDisplays : Array[Boolean,Boolean] of string;\r\n Procedure SetDisplayValues(const AValue : String);\r\n protected\r\n function GetAsBoolean: Boolean; override;\r\n function GetAsString: string; override;\r\n function GetAsJSValue: JSValue; override;\r\n function GetAsInteger: Longint; override;\r\n function GetDefaultWidth: Longint; override;\r\n procedure SetAsBoolean(AValue: Boolean); override;\r\n procedure SetAsString(const AValue: string); override;\r\n procedure SetAsInteger(AValue: Longint); override;\r\n procedure SetVarValue(const AValue: JSValue); override;\r\n public\r\n constructor Create(AOwner: TComponent); override;\r\n property Value: Boolean read GetAsBoolean write SetAsBoolean;\r\n published\r\n property DisplayValues: string read FDisplayValues write SetDisplayValues;\r\n end;\r\n\r\n{ TDateTimeField }\r\n\r\n TDateTimeField = class(TField)\r\n private\r\n FDisplayFormat : String;\r\n procedure SetDisplayFormat(const AValue: string);\r\n protected\r\n Function ConvertToDateTime(aValue : JSValue; aRaiseError : Boolean) : TDateTime; virtual;\r\n Function DateTimeToNativeDateTime(aValue : TDateTime) : JSValue; virtual;\r\n function GetAsDateTime: TDateTime; override;\r\n function GetAsFloat: Double; override;\r\n function GetAsString: string; override;\r\n function GetAsJSValue: JSValue; override;\r\n function GetDataSize: Integer; override;\r\n procedure GetText(var AText: string; ADisplayText: Boolean); override;\r\n procedure SetAsDateTime(AValue: TDateTime); override;\r\n procedure SetAsFloat(AValue: Double); override;\r\n procedure SetAsString(const AValue: string); override;\r\n procedure SetVarValue(const AValue: JSValue); override;\r\n public\r\n constructor Create(AOwner: TComponent); override;\r\n property Value: TDateTime read GetAsDateTime write SetAsDateTime;\r\n published\r\n property DisplayFormat: string read FDisplayFormat write SetDisplayFormat;\r\n end;\r\n\r\n{ TDateField }\r\n\r\n TDateField = class(TDateTimeField)\r\n public\r\n constructor Create(AOwner: TComponent); override;\r\n end;\r\n\r\n{ TTimeField }\r\n\r\n TTimeField = class(TDateTimeField)\r\n protected\r\n procedure SetAsString(const AValue: string); override;\r\n public\r\n constructor Create(AOwner: TComponent); override;\r\n end;\r\n\r\n{ TBinaryField }\r\n\r\n TBinaryField = class(TField)\r\n protected\r\n class procedure CheckTypeSize(AValue: Longint); override;\r\n Function BlobToBytes(aValue : JSValue) : TBytes; virtual;\r\n Function BytesToBlob(aValue : TBytes) : JSValue; virtual;\r\n function GetAsString: string; override;\r\n function GetAsJSValue: JSValue; override;\r\n function GetValue(var AValue: TBytes): Boolean;\r\n procedure SetAsString(const AValue: string); override;\r\n procedure SetVarValue(const AValue: JSValue); override;\r\n Function GetAsBytes: TBytes; override;\r\n Procedure SetAsBytes(const aValue: TBytes); override;\r\n public\r\n constructor Create(AOwner: TComponent); override;\r\n published\r\n property Size default 16;\r\n end;\r\n\r\n{ TBytesField }\r\n\r\n\r\n{ TBlobField }\r\n TBlobDisplayValue = (dvClass, dvFull, dvClip, dvFit);\r\n TBlobStreamMode = (bmRead, bmWrite, bmReadWrite);\r\n TBlobType = ftBlob..ftWideMemo;\r\n\r\n TBlobField = class(TBinaryField)\r\n private\r\n FDisplayValue: TBlobDisplayValue;\r\n FModified : Boolean;\r\n // Wrapper that retrieves FDataType as a TBlobType\r\n function GetBlobType: TBlobType;\r\n // Wrapper that calls SetFieldType\r\n procedure SetBlobType(AValue: TBlobType);\r\n procedure SetDisplayValue(AValue: TBlobDisplayValue);\r\n protected\r\n class procedure CheckTypeSize(AValue: Longint); override;\r\n function GetBlobSize: Longint; virtual;\r\n function GetIsNull: Boolean; override;\r\n procedure GetText(var AText: string; ADisplayText{%H-}: Boolean); override;\r\n public\r\n constructor Create(AOwner: TComponent); override;\r\n procedure Clear; override;\r\n class function IsBlob: Boolean; override;\r\n procedure SetFieldType(AValue: TFieldType); override;\r\n property BlobSize: Longint read GetBlobSize;\r\n property Modified: Boolean read FModified write FModified;\r\n property Value: string read GetAsString write SetAsString;\r\n published\r\n property DisplayValue: TBlobDisplayValue read FDisplayValue write SetDisplayValue default dvClass;\r\n property BlobType: TBlobType read GetBlobType write SetBlobType; // default ftBlob;\r\n property Size default 0;\r\n end;\r\n\r\n{ TMemoField }\r\n\r\n TMemoField = class(TBlobField)\r\n protected\r\n procedure GetText(var AText: string; ADisplayText{%H-}: Boolean); override;\r\n public\r\n constructor Create(AOwner: TComponent); override;\r\n end;\r\n\r\n{ TGraphicField }\r\n\r\n TGraphicField = class(TBlobField)\r\n public\r\n constructor Create(AOwner: TComponent); override;\r\n end;\r\n\r\n{ TVariantField }\r\n\r\n TVariantField = class(TField)\r\n protected\r\n class procedure CheckTypeSize(aValue{%H-}: Integer); override;\r\n\r\n function GetAsBoolean: Boolean; override;\r\n procedure SetAsBoolean(aValue: Boolean); override;\r\n\r\n function GetAsDateTime: TDateTime; override;\r\n procedure SetAsDateTime(aValue: TDateTime); override;\r\n\r\n function GetAsFloat: Double; override;\r\n procedure SetAsFloat(aValue: Double); override;\r\n\r\n function GetAsInteger: Longint; override;\r\n procedure SetAsInteger(AValue: Longint); override;\r\n\r\n function GetAsString: string; override;\r\n procedure SetAsString(const aValue: string); override;\r\n\r\n\r\n function GetAsJSValue: JSValue; override;\r\n procedure SetVarValue(const aValue: JSValue); override;\r\n\r\n public\r\n constructor Create(AOwner: TComponent); override;\r\n end;\r\n\r\n TDataSetField = class(TField)\r\n private\r\n FNestedDataSet: TDataSet;\r\n procedure AssignNestedDataSet(Value: TDataSet);\r\n protected\r\n procedure Bind(Binding: Boolean); override;\r\n public\r\n constructor Create(AOwner: TComponent); override;\r\n\r\n destructor Destroy; override;\r\n end;\r\n\r\n{ TIndexDef }\r\n\r\n TIndexDefs = class;\r\n\r\n TIndexOption = (ixPrimary, ixUnique, ixDescending, ixCaseInsensitive,\r\n ixExpression, ixNonMaintained);\r\n TIndexOptions = set of TIndexOption;\r\n\r\n TIndexDef = class(TNamedItem)\r\n Private\r\n FCaseinsFields: string;\r\n FDescFields: string;\r\n FExpression : String;\r\n FFields : String;\r\n FOptions : TIndexOptions;\r\n FSource : String;\r\n protected\r\n function GetExpression: string;\r\n procedure SetCaseInsFields(const AValue: string); virtual;\r\n procedure SetDescFields(const AValue: string);\r\n procedure SetExpression(const AValue: string);\r\n public\r\n constructor Create(Owner: TIndexDefs; const AName, TheFields: string;\r\n TheOptions: TIndexOptions); overload;\r\n procedure Assign(Source: TPersistent); override;\r\n published\r\n property Expression: string read GetExpression write SetExpression;\r\n property Fields: string read FFields write FFields;\r\n property CaseInsFields: string read FCaseinsFields write SetCaseInsFields;\r\n property DescFields: string read FDescFields write SetDescFields;\r\n property Options: TIndexOptions read FOptions write FOptions;\r\n property Source: string read FSource write FSource;\r\n end;\r\n TIndexDefClass = class of TIndexDef;\r\n{ TIndexDefs }\r\n\r\n TIndexDefs = class(TDefCollection)\r\n Private\r\n Function GetItem(Index: Integer): TIndexDef; reintroduce;\r\n Procedure SetItem(Index: Integer; Value: TIndexDef); reintroduce;\r\n public\r\n constructor Create(ADataSet: TDataSet); virtual; overload;\r\n procedure Add(const Name, Fields: string; Options: TIndexOptions); reintroduce;\r\n Function AddIndexDef: TIndexDef;\r\n function Find(const IndexName: string): TIndexDef; reintroduce;\r\n function FindIndexForFields(const Fields{%H-}: string): TIndexDef;\r\n function GetIndexForFields(const Fields: string;\r\n CaseInsensitive: Boolean): TIndexDef;\r\n procedure Update; overload; virtual;\r\n Property Items[Index: Integer] : TIndexDef read GetItem write SetItem; default;\r\n end;\r\n\r\n{ TCheckConstraint }\r\n\r\n TCheckConstraint = class(TCollectionItem)\r\n Private\r\n FCustomConstraint : String;\r\n FErrorMessage : String;\r\n FFromDictionary : Boolean;\r\n FImportedConstraint : String;\r\n public\r\n procedure Assign(Source{%H-}: TPersistent); override;\r\n // function GetDisplayName: string; override;\r\n published\r\n property CustomConstraint: string read FCustomConstraint write FCustomConstraint;\r\n property ErrorMessage: string read FErrorMessage write FErrorMessage;\r\n property FromDictionary: Boolean read FFromDictionary write FFromDictionary;\r\n property ImportedConstraint: string read FImportedConstraint write FImportedConstraint;\r\n end;\r\n\r\n{ TCheckConstraints }\r\n\r\n TCheckConstraints = class(TCollection)\r\n Private\r\n Function GetItem(Index{%H-} : Longint) : TCheckConstraint; reintroduce;\r\n Procedure SetItem(index{%H-} : Longint; Value{%H-} : TCheckConstraint); reintroduce;\r\n protected\r\n function GetOwner: TPersistent; override;\r\n public\r\n constructor Create(AOwner{%H-}: TPersistent); reintroduce;\r\n function Add: TCheckConstraint; reintroduce;\r\n property Items[Index: Longint]: TCheckConstraint read GetItem write SetItem; default;\r\n end;\r\n\r\n { TFieldsEnumerator }\r\n\r\n TFieldsEnumerator = class\r\n private\r\n FPosition: Integer;\r\n FFields: TFields;\r\n function GetCurrent: TField;\r\n public\r\n constructor Create(AFields: TFields); reintroduce;\r\n function MoveNext: Boolean;\r\n property Current: TField read GetCurrent;\r\n end;\r\n\r\n{ TFields }\r\n\r\n TFields = Class(TObject)\r\n Private\r\n FDataset : TDataset;\r\n FFieldList : TFpList;\r\n FOnChange : TNotifyEvent;\r\n FValidFieldKinds : TFieldKinds;\r\n Protected\r\n Procedure ClearFieldDefs;\r\n Procedure Changed;\r\n Procedure CheckfieldKind(Fieldkind : TFieldKind; Field : TField);\r\n Function GetCount : Longint;\r\n Function GetField (Index : Integer) : TField;\r\n Procedure SetField(Index: Integer; Value: TField);\r\n Procedure SetFieldIndex (Field : TField;Value : Integer);\r\n Property OnChange : TNotifyEvent Read FOnChange Write FOnChange;\r\n Property ValidFieldKinds : TFieldKinds Read FValidFieldKinds;\r\n Public\r\n Constructor Create(ADataset : TDataset); reintroduce;\r\n Destructor Destroy;override;\r\n Procedure Add(Field : TField);\r\n Procedure CheckFieldName (Const Value : String);\r\n Procedure CheckFieldNames (Const Value : String);\r\n Procedure Clear;\r\n Function FindField (Const Value : String) : TField;\r\n Function FieldByName (Const Value : String) : TField;\r\n Function FieldByNumber(FieldNo : Integer) : TField;\r\n Function GetEnumerator: TFieldsEnumerator;\r\n Procedure GetFieldNames (Values : TStrings);\r\n Function IndexOf(Field : TField) : Longint;\r\n procedure Remove(Value : TField);\r\n Property Count : Integer Read GetCount;\r\n Property Dataset : TDataset Read FDataset;\r\n Property Fields [Index : Integer] : TField Read GetField Write SetField; default;\r\n end;\r\n TFieldsClass = Class of TFields;\r\n\r\n{ TParam }\r\n\r\n TBlobData = TBytes; // Delphi defines it as alias to TBytes\r\n\r\n TParamBinding = array of integer;\r\n\r\n TParamType = (ptUnknown, ptInput, ptOutput, ptInputOutput, ptResult);\r\n TParamTypes = set of TParamType;\r\n\r\n TParamStyle = (psInterbase,psPostgreSQL,psSimulated);\r\n\r\n TParams = class;\r\n\r\n TParam = class(TCollectionItem)\r\n private\r\n FValue: JSValue;\r\n FPrecision: Integer;\r\n FNumericScale: Integer;\r\n FName: string;\r\n FDataType: TFieldType;\r\n FBound: Boolean;\r\n FParamType: TParamType;\r\n FSize: Integer;\r\n Function GetDataSet: TDataSet;\r\n Function IsParamStored: Boolean;\r\n protected\r\n Procedure AssignParam(Param: TParam);\r\n Procedure AssignTo(Dest: TPersistent); override;\r\n Function GetAsBoolean: Boolean;\r\n Function GetAsBytes: TBytes;\r\n Function GetAsDateTime: TDateTime;\r\n Function GetAsFloat: Double;\r\n Function GetAsInteger: Longint;\r\n Function GetAsLargeInt: NativeInt;\r\n Function GetAsMemo: string;\r\n Function GetAsString: string;\r\n Function GetAsJSValue: JSValue;\r\n Function GetDisplayName: string; override;\r\n Function GetIsNull: Boolean;\r\n Function IsEqual(AValue: TParam): Boolean;\r\n Procedure SetAsBlob(const AValue: TBlobData);\r\n Procedure SetAsBoolean(AValue: Boolean);\r\n Procedure SetAsBytes(const AValue{%H-}: TBytes);\r\n Procedure SetAsDate(const AValue: TDateTime);\r\n Procedure SetAsDateTime(const AValue: TDateTime);\r\n Procedure SetAsFloat(const AValue: Double);\r\n Procedure SetAsInteger(AValue: Longint);\r\n Procedure SetAsLargeInt(AValue: NativeInt);\r\n Procedure SetAsMemo(const AValue: string);\r\n Procedure SetAsString(const AValue: string);\r\n Procedure SetAsTime(const AValue: TDateTime);\r\n Procedure SetAsJSValue(const AValue: JSValue);\r\n Procedure SetDataType(AValue: TFieldType);\r\n Procedure SetText(const AValue: string);\r\n public\r\n constructor Create(ACollection: TCollection); overload; override;\r\n constructor Create(AParams: TParams; AParamType: TParamType); reintroduce; overload;\r\n Procedure Assign(Source: TPersistent); override;\r\n Procedure AssignField(Field: TField);\r\n Procedure AssignToField(Field: TField);\r\n Procedure AssignFieldValue(Field: TField; const AValue: JSValue);\r\n Procedure AssignFromField(Field : TField);\r\n Procedure Clear;\r\n Property AsBlob : TBlobData read GetAsBytes write SetAsBytes;\r\n Property AsBoolean : Boolean read GetAsBoolean write SetAsBoolean;\r\n Property AsBytes : TBytes read GetAsBytes write SetAsBytes;\r\n Property AsDate : TDateTime read GetAsDateTime write SetAsDate;\r\n Property AsDateTime : TDateTime read GetAsDateTime write SetAsDateTime;\r\n Property AsFloat : Double read GetAsFloat write SetAsFloat;\r\n Property AsInteger : LongInt read GetAsInteger write SetAsInteger;\r\n Property AsLargeInt : NativeInt read GetAsLargeInt write SetAsLargeInt;\r\n Property AsMemo : string read GetAsMemo write SetAsMemo;\r\n Property AsSmallInt : LongInt read GetAsInteger write SetAsInteger;\r\n Property AsString : string read GetAsString write SetAsString;\r\n Property AsTime : TDateTime read GetAsDateTime write SetAsTime;\r\n Property Bound : Boolean read FBound write FBound;\r\n Property Dataset : TDataset Read GetDataset;\r\n Property IsNull : Boolean read GetIsNull;\r\n Property Text : string read GetAsString write SetText;\r\n published\r\n Property DataType : TFieldType read FDataType write SetDataType;\r\n Property Name : string read FName write FName;\r\n Property NumericScale : Integer read FNumericScale write FNumericScale default 0;\r\n Property ParamType : TParamType read FParamType write FParamType;\r\n Property Precision : Integer read FPrecision write FPrecision default 0;\r\n Property Size : Integer read FSize write FSize default 0;\r\n Property Value : JSValue read GetAsJSValue write SetAsJSValue stored IsParamStored;\r\n end;\r\n TParamClass = Class of TParam;\r\n\r\n{ TParams }\r\n\r\n TParams = class(TCollection)\r\n private\r\n FOwner: TPersistent;\r\n Function GetItem(Index: Integer): TParam; reintroduce;\r\n Function GetParamValue(const ParamName: string): JSValue;\r\n Procedure SetItem(Index: Integer; Value: TParam); reintroduce;\r\n Procedure SetParamValue(const ParamName: string; const Value: JSValue);\r\n protected\r\n Procedure AssignTo(Dest: TPersistent); override;\r\n Function GetDataSet: TDataSet;\r\n Function GetOwner: TPersistent; override;\r\n Class Function ParamClass : TParamClass; virtual;\r\n public\r\n Constructor Create(AOwner: TPersistent; AItemClass : TCollectionItemClass); overload;\r\n Constructor Create(AOwner: TPersistent); overload;\r\n Constructor Create; overload; reintroduce;\r\n Procedure AddParam(Value: TParam);\r\n Procedure AssignValues(Value: TParams);\r\n Function CreateParam(FldType: TFieldType; const ParamName: string; ParamType: TParamType): TParam;\r\n Function FindParam(const Value: string): TParam;\r\n Procedure GetParamList(List: TList; const ParamNames: string);\r\n Function IsEqual(Value: TParams): Boolean;\r\n Function ParamByName(const Value: string): TParam;\r\n Function ParseSQL(SQL: String; DoCreate: Boolean): String; overload;\r\n Function ParseSQL(SQL: String; DoCreate, EscapeSlash, EscapeRepeat : Boolean; ParameterStyle : TParamStyle): String; overload;\r\n Function ParseSQL(SQL: String; DoCreate, EscapeSlash, EscapeRepeat : Boolean; ParameterStyle : TParamStyle; out ParamBinding: TParambinding): String; overload;\r\n Function ParseSQL(SQL: String; DoCreate, EscapeSlash, EscapeRepeat : Boolean; ParameterStyle : TParamStyle; out ParamBinding: TParambinding; out ReplaceString : string): String; overload;\r\n Procedure RemoveParam(Value: TParam);\r\n Procedure CopyParamValuesFromDataset(ADataset : TDataset; CopyBound : Boolean);\r\n Property Dataset : TDataset Read GetDataset;\r\n Property Items[Index: Integer] : TParam read GetItem write SetItem; default;\r\n function Add: TParam; reintroduce;\r\n Property ParamValues[const ParamName: string] : JSValue read GetParamValue write SetParamValue;\r\n end;\r\n\r\n{ TDataSet }\r\n \r\n TBookmarkFlag = (bfCurrent, bfBOF, bfEOF, bfInserted);\r\n TBookmark = record\r\n Data : JSValue;\r\n Flag : TBookmarkFlag;\r\n end; // Bookmark is always the index in the data array.\r\n TBookmarkStr = string; // JSON encoded version of the above\r\n\r\n TGetMode = (gmCurrent, gmNext, gmPrior);\r\n TGetResult = (grOK, grBOF, grEOF, grError);\r\n\r\n TResyncMode = set of (rmExact, rmCenter);\r\n TDataAction = (daFail, daAbort, daRetry);\r\n TUpdateAction = (uaFail, uaAbort, uaSkip, uaRetry, uaApplied);\r\n TUpdateKind = (ukModify, ukInsert, ukDelete);\r\n\r\n TLocateOption = (loCaseInsensitive, loPartialKey, loFromCurrent);\r\n TLocateOptions = set of TLocateOption;\r\n TDataOperation = procedure of object;\r\n\r\n TDataSetNotifyEvent = procedure(DataSet: TDataSet) of object;\r\n TDataSetErrorEvent = procedure(DataSet: TDataSet; E: EDatabaseError;\r\n var DataAction: TDataAction) of object;\r\n\r\n TFilterOption = (foCaseInsensitive, foNoPartialCompare);\r\n TFilterOptions = set of TFilterOption;\r\n\r\n TLoadOption = (loNoOpen,loNoEvents,loAtEOF,loCancelPending);\r\n TLoadOptions = Set of TLoadOption;\r\n TDatasetLoadEvent = procedure(DataSet: TDataSet; Data : JSValue) of object;\r\n TDatasetLoadFailEvent = procedure(DataSet: TDataSet; ID : Integer; Const ErrorMsg : String) of object;\r\n\r\n TFilterRecordEvent = procedure(DataSet: TDataSet;\r\n var Accept: Boolean) of object;\r\n TDatasetClass = Class of TDataset;\r\n\r\n TRecordState = (rsNew,rsClean,rsUpdate,rsDelete);\r\n TDataRecord = record\r\n data : JSValue;\r\n state : TRecordState;\r\n bookmark : JSValue;\r\n bookmarkFlag : TBookmarkFlag;\r\n end;\r\n TBuffers = Array of TDataRecord;\r\n\r\n TResolveInfo = record\r\n Data : JSValue;\r\n Status : TUpdateStatus;\r\n ResolveStatus : TResolveStatus;\r\n Error : String; // Only filled on error.\r\n BookMark : TBookmark;\r\n _private : JSValue; // for use by descendents of TDataset\r\n end;\r\n TResolveInfoArray = Array of TResolveInfo;\r\n\r\n // Record so we can extend later on\r\n TResolveResults = record\r\n Records : TResolveInfoArray;\r\n end;\r\n\r\n TOnRecordResolveEvent = Procedure (Sender : TDataset; info : TResolveInfo) of object;\r\n TApplyUpdatesEvent = Procedure (Sender : TDataset; info : TResolveResults) of object;\r\n\r\n TNestedDataSetsList = TFPList;\r\n\r\n{------------------------------------------------------------------------------}\r\n\r\n TDataSet = class(TComponent)\r\n Private\r\n FAfterApplyUpdates: TApplyUpdatesEvent;\r\n FAfterLoad: TDatasetNotifyEvent;\r\n FBeforeApplyUpdates: TDatasetNotifyEvent;\r\n FBeforeLoad: TDatasetNotifyEvent;\r\n FBlockReadSize: Integer;\r\n FCalcBuffer: TDataRecord;\r\n FCalcFieldsCount: Longint;\r\n FOnLoadFail: TDatasetLoadFailEvent;\r\n FOnRecordResolved: TOnRecordResolveEvent;\r\n FOpenAfterRead : boolean;\r\n FActiveRecord: Longint;\r\n FAfterCancel: TDataSetNotifyEvent;\r\n FAfterClose: TDataSetNotifyEvent;\r\n FAfterDelete: TDataSetNotifyEvent;\r\n FAfterEdit: TDataSetNotifyEvent;\r\n FAfterInsert: TDataSetNotifyEvent;\r\n FAfterOpen: TDataSetNotifyEvent;\r\n FAfterPost: TDataSetNotifyEvent;\r\n FAfterRefresh: TDataSetNotifyEvent;\r\n FAfterScroll: TDataSetNotifyEvent;\r\n FAutoCalcFields: Boolean;\r\n FBOF: Boolean;\r\n FBeforeCancel: TDataSetNotifyEvent;\r\n FBeforeClose: TDataSetNotifyEvent;\r\n FBeforeDelete: TDataSetNotifyEvent;\r\n FBeforeEdit: TDataSetNotifyEvent;\r\n FBeforeInsert: TDataSetNotifyEvent;\r\n FBeforeOpen: TDataSetNotifyEvent;\r\n FBeforePost: TDataSetNotifyEvent;\r\n FBeforeRefresh: TDataSetNotifyEvent;\r\n FBeforeScroll: TDataSetNotifyEvent;\r\n FBlobFieldCount: Longint;\r\n FBuffers : TBuffers;\r\n // The actual length of FBuffers is FBufferCount+1\r\n FBufferCount: Longint;\r\n FConstraints: TCheckConstraints;\r\n FDisableControlsCount : Integer;\r\n FDisableControlsState : TDatasetState;\r\n FCurrentRecord: Longint;\r\n FDataSources : TFPList;\r\n FDefaultFields: Boolean;\r\n FEOF: Boolean;\r\n FEnableControlsEvent : TDataEvent;\r\n FFieldList : TFields;\r\n FFieldDefs: TFieldDefs;\r\n FFilterOptions: TFilterOptions;\r\n FFilterText: string;\r\n FFiltered: Boolean;\r\n FFound: Boolean;\r\n FInternalCalcFields: Boolean;\r\n FModified: Boolean;\r\n FOnCalcFields: TDataSetNotifyEvent;\r\n FOnDeleteError: TDataSetErrorEvent;\r\n FOnEditError: TDataSetErrorEvent;\r\n FOnFilterRecord: TFilterRecordEvent;\r\n FOnNewRecord: TDataSetNotifyEvent;\r\n FOnPostError: TDataSetErrorEvent;\r\n FRecordCount: Longint;\r\n FIsUniDirectional: Boolean;\r\n FState : TDataSetState;\r\n FInternalOpenComplete: Boolean;\r\n FDataProxy : TDataProxy;\r\n FDataRequestID : Integer;\r\n FUpdateBatchID : Integer;\r\n FChangeList : TFPList;\r\n FBatchList : TFPList;\r\n FInApplyupdates : Boolean;\r\n FLoadCount : Integer;\r\n FMinLoadID : Integer;\r\n FDataSetField: TDataSetField;\r\n FNestedDataSets: TNestedDataSetsList;\r\n FNestedDataSetClass: TDataSetClass;\r\n Procedure DoInsertAppend(DoAppend : Boolean);\r\n Procedure DoInternalOpen;\r\n Function GetBuffer (Index : longint) : TDataRecord;\r\n function GetDataProxy: TDataProxy;\r\n function GetIsLoading: Boolean;\r\n Procedure RegisterDataSource(ADataSource : TDataSource);\r\n procedure SetConstraints(Value: TCheckConstraints);\r\n procedure SetDataProxy(AValue: TDataProxy);\r\n Procedure ShiftBuffersForward;\r\n Procedure ShiftBuffersBackward;\r\n Function TryDoing(P: TDataOperation; Ev : TDatasetErrorEvent) : Boolean;\r\n Function GetActive : boolean;\r\n Procedure UnRegisterDataSource(ADataSource : TDataSource);\r\n procedure SetBlockReadSize(AValue: Integer); virtual;\r\n Procedure SetFieldDefs(AFieldDefs: TFieldDefs);\r\n procedure DoInsertAppendRecord(const Values: array of jsValue; DoAppend : boolean);\r\n // Callback for Tdataproxy.DoGetData;\r\n function ResolveRecordUpdate(anUpdate: TRecordUpdateDescriptor): Boolean;\r\n procedure HandleRequestResponse(ARequest: TDataRequest);\r\n function GetNestedDataSets: TNestedDataSetsList;\r\n protected\r\n // Proxy methods\r\n // Override this to integrate package in local data\r\n // call OnRecordResolved\r\n procedure DoOnRecordResolved(anUpdate: TRecordUpdateDescriptor); virtual;\r\n // Convert TRecordUpdateDescriptor to ResolveInfo\r\n function RecordUpdateDescriptorToResolveInfo(anUpdate: TRecordUpdateDescriptor): TResolveInfo; virtual;\r\n function DoResolveRecordUpdate(anUpdate{%H-}: TRecordUpdateDescriptor): Boolean; virtual;\r\n Function GetRecordUpdates(AList: TRecordUpdateDescriptorList) : Integer; virtual;\r\n procedure ResolveUpdateBatch(Sender: TObject; aBatch: TRecordUpdateBatch); virtual;\r\n Function DataPacketReceived(ARequest{%H-}: TDataRequest) : Boolean; virtual;\r\n function DoLoad(aOptions: TLoadOptions; aAfterLoad: TDatasetLoadEvent): Boolean; virtual;\r\n function DoGetDataProxy: TDataProxy; virtual;\r\n Procedure InitChangeList; virtual;\r\n Procedure DoneChangeList; virtual;\r\n Procedure ClearChangeList;\r\n procedure ResetUpdateDescriptors;\r\n function GetApplyUpdateData(aBuffer: TDataRecord) : JSValue; virtual;\r\n Function IndexInChangeList(aBookmark: TBookmark): Integer; virtual;\r\n Function AddToChangeList(aChange : TUpdateStatus) : TRecordUpdateDescriptor ; virtual;\r\n Procedure RemoveFromChangeList(R : TRecordUpdateDescriptor); virtual;\r\n Procedure DoApplyUpdates;\r\n procedure RecalcBufListSize;\r\n procedure ActivateBuffers; virtual;\r\n procedure BindFields(Binding: Boolean);\r\n procedure BlockReadNext; virtual;\r\n function BookmarkAvailable: Boolean;\r\n procedure CalculateFields(Var Buffer: TDataRecord); virtual;\r\n procedure CheckActive; virtual;\r\n procedure CheckInactive; virtual;\r\n procedure CheckBiDirectional;\r\n procedure Loaded; override;\r\n procedure ClearBuffers; virtual;\r\n procedure ClearCalcFields(var Buffer{%H-}: TDataRecord); virtual;\r\n procedure CloseBlob(Field{%H-}: TField); virtual;\r\n procedure CloseCursor; virtual;\r\n procedure CreateFields; virtual;\r\n procedure DataEvent(Event: TDataEvent; Info: JSValue); virtual;\r\n procedure DestroyFields; virtual;\r\n procedure DoAfterCancel; virtual;\r\n procedure DoAfterClose; virtual;\r\n procedure DoAfterDelete; virtual;\r\n procedure DoAfterEdit; virtual;\r\n procedure DoAfterInsert; virtual;\r\n procedure DoAfterOpen; virtual;\r\n procedure DoAfterPost; virtual;\r\n procedure DoAfterScroll; virtual;\r\n procedure DoAfterRefresh; virtual;\r\n procedure DoBeforeCancel; virtual;\r\n procedure DoBeforeClose; virtual;\r\n procedure DoBeforeDelete; virtual;\r\n procedure DoBeforeEdit; virtual;\r\n procedure DoBeforeInsert; virtual;\r\n procedure DoBeforeOpen; virtual;\r\n procedure DoBeforePost; virtual;\r\n procedure DoBeforeScroll; virtual;\r\n procedure DoBeforeRefresh; virtual;\r\n procedure DoOnCalcFields; virtual;\r\n procedure DoOnNewRecord; virtual;\r\n procedure DoBeforeLoad; virtual;\r\n procedure DoAfterLoad; virtual;\r\n procedure DoBeforeApplyUpdates; virtual;\r\n procedure DoAfterApplyUpdates(const ResolveInfo: TResolveResults); virtual;\r\n function FieldByNumber(FieldNo: Longint): TField;\r\n function FindRecord(Restart{%H-}, GoForward{%H-}: Boolean): Boolean; virtual;\r\n function GetBookmarkStr: TBookmarkStr; virtual;\r\n procedure GetCalcFields(Var Buffer: TDataRecord); virtual;\r\n function GetCanModify: Boolean; virtual;\r\n procedure GetChildren(Proc: TGetChildProc; Root: TComponent); override;\r\n function GetFieldClass(FieldType: TFieldType): TFieldClass; virtual;\r\n Function GetfieldCount : Integer;\r\n function GetFieldValues(const FieldName : string) : JSValue; virtual;\r\n function GetIsIndexField(Field{%H-}: TField): Boolean; virtual;\r\n function GetIndexDefs(IndexDefs : TIndexDefs; IndexTypes : TIndexOptions) : TIndexDefs;\r\n function GetNextRecords: Longint; virtual;\r\n function GetNextRecord: Boolean; virtual;\r\n function GetPriorRecords: Longint; virtual;\r\n function GetPriorRecord: Boolean; virtual;\r\n function GetRecordCount: Longint; virtual;\r\n function GetRecNo: Longint; virtual;\r\n procedure InitFieldDefs; virtual;\r\n procedure InitFieldDefsFromfields;\r\n procedure InitRecord(var Buffer: TDataRecord); virtual;\r\n procedure InternalCancel; virtual;\r\n procedure InternalEdit; virtual;\r\n procedure InternalInsert; virtual;\r\n procedure InternalRefresh; virtual;\r\n procedure OpenCursor(InfoQuery: Boolean); virtual;\r\n procedure OpenCursorcomplete; virtual;\r\n procedure RefreshInternalCalcFields(Var Buffer{%H-}: TDataRecord); virtual;\r\n procedure RestoreState(const Value: TDataSetState);\r\n Procedure SetActive (Value : Boolean); virtual;\r\n procedure SetBookmarkStr(const Value: TBookmarkStr); virtual;\r\n procedure SetBufListSize(Value: Longint); virtual;\r\n procedure SetChildOrder(Child: TComponent; Order: Longint); override;\r\n procedure SetCurrentRecord(Index: Longint); virtual;\r\n procedure SetDefaultFields(const Value: Boolean);\r\n procedure SetFiltered(Value: Boolean); virtual;\r\n procedure SetFilterOptions(Value: TFilterOptions); virtual;\r\n procedure SetFilterText(const Value: string); virtual;\r\n procedure SetFieldValues(const FieldName: string; Value: JSValue); virtual;\r\n procedure SetFound(const Value: Boolean); virtual;\r\n procedure SetModified(Value: Boolean);\r\n procedure SetName(const NewName: TComponentName); override;\r\n procedure SetOnFilterRecord(const Value: TFilterRecordEvent); virtual;\r\n procedure SetRecNo(Value{%H-}: Longint); virtual;\r\n procedure SetState(Value: TDataSetState);\r\n function SetTempState(const Value: TDataSetState): TDataSetState;\r\n Function TempBuffer: TDataRecord;\r\n procedure UpdateIndexDefs; virtual;\r\n property ActiveRecord: Longint read FActiveRecord;\r\n property CurrentRecord: Longint read FCurrentRecord;\r\n property BlobFieldCount: Longint read FBlobFieldCount;\r\n property Buffers[Index: Longint]: TDataRecord read GetBuffer;\r\n property BufferCount: Longint read FBufferCount;\r\n property CalcBuffer: TDataRecord read FCalcBuffer;\r\n property CalcFieldsCount: Longint read FCalcFieldsCount;\r\n property InternalCalcFields: Boolean read FInternalCalcFields;\r\n property Constraints: TCheckConstraints read FConstraints write SetConstraints;\r\n function AllocRecordBuffer: TDataRecord; virtual;\r\n procedure FreeRecordBuffer(var Buffer{%H-}: TDataRecord); virtual;\r\n procedure GetBookmarkData(Buffer{%H-}: TDataRecord; var Data{%H-}: TBookmark); virtual;\r\n function GetBookmarkFlag(Buffer{%H-}: TDataRecord): TBookmarkFlag; virtual;\r\n function GetDataSource: TDataSource; virtual;\r\n function GetRecordSize: Word; virtual;\r\n procedure InternalAddRecord(Buffer{%H-}: Pointer; AAppend{%H-}: Boolean); virtual;\r\n procedure InternalDelete; virtual;\r\n procedure InternalFirst; virtual;\r\n procedure InternalGotoBookmark(ABookmark{%H-}: TBookmark); virtual;\r\n procedure InternalHandleException(E: Exception); virtual;\r\n procedure InternalInitRecord(var Buffer{%H-}: TDataRecord); virtual;\r\n procedure InternalLast; virtual;\r\n procedure InternalPost; virtual;\r\n procedure InternalSetToRecord(Buffer{%H-}: TDataRecord); virtual;\r\n procedure SetBookmarkFlag(Var Buffer{%H-}: TDataRecord; Value{%H-}: TBookmarkFlag); virtual;\r\n procedure SetBookmarkData(Var Buffer{%H-}: TDataRecord; Data{%H-}: TBookmark); virtual;\r\n procedure SetUniDirectional(const Value: Boolean);\r\n procedure Notification(AComponent: TComponent; Operation: TOperation); override;\r\n procedure SetDataSetField(const Value: TDataSetField); virtual;\r\n // These use the active buffer\r\n function GetFieldData(Field: TField): JSValue; virtual; overload;\r\n procedure SetFieldData(Field: TField; AValue : JSValue); virtual; overload;\r\n function GetFieldData(Field: TField; Buffer: TDatarecord): JSValue; virtual; overload;\r\n procedure SetFieldData(Field: TField; var Buffer: TDatarecord; AValue : JSValue); virtual; overload;\r\n class function FieldDefsClass : TFieldDefsClass; virtual;\r\n class function FieldsClass : TFieldsClass; virtual;\r\n property NestedDataSets: TNestedDataSetsList read GetNestedDataSets;\r\n protected { abstract methods }\r\n function GetRecord(var Buffer: TDataRecord; GetMode: TGetMode; DoCheck: Boolean): TGetResult; virtual; abstract;\r\n procedure InternalClose; virtual; abstract;\r\n procedure InternalOpen; virtual; abstract;\r\n procedure InternalInitFieldDefs; virtual; abstract;\r\n function IsCursorOpen: Boolean; virtual; abstract;\r\n function GetBOF: boolean; virtual;\r\n function GetEOF: boolean; virtual;\r\n property DataProxy : TDataProxy Read GetDataProxy Write SetDataProxy;\r\n property LoadCount : Integer Read FLoadCount;\r\n public\r\n constructor Create(AOwner: TComponent); override;\r\n destructor Destroy; override;\r\n function ActiveBuffer: TDataRecord;\r\n procedure Append;\r\n procedure AppendRecord(const Values: array of jsValue);\r\n function GetClonedDataSet(WithSettings: Boolean): TDataSet; virtual;\r\n function BookmarkValid(ABookmark{%H-}: TBookmark): Boolean; virtual;\r\n function ConvertToDateTime(aField : TField; aValue : JSValue; ARaiseException : Boolean) : TDateTime; virtual;\r\n function ConvertDateTimeToNative(aField : TField; aValue : TDateTime) : JSValue; virtual;\r\n Class function DefaultConvertToDateTime(aField : TField; aValue : JSValue; ARaiseException{%H-} : Boolean) : TDateTime; virtual;\r\n Class function DefaultConvertDateTimeToNative(aField : TField; aValue : TDateTime) : JSValue; virtual;\r\n Function BlobDataToBytes(aValue : JSValue) : TBytes; virtual;\r\n Class Function DefaultBlobDataToBytes(aValue : JSValue) : TBytes; virtual;\r\n Function BytesToBlobData(aValue : TBytes) : JSValue ; virtual;\r\n Class Function DefaultBytesToBlobData(aValue : TBytes) : JSValue; virtual;\r\n procedure Cancel; virtual;\r\n procedure CheckBrowseMode;\r\n procedure ClearFields;\r\n procedure Close;\r\n Function GetUpdateCount(UnresolvedOnly : Boolean) : Integer;\r\n Procedure ApplyUpdates;\r\n function ControlsDisabled: Boolean;\r\n function CompareBookmarks(Bookmark1{%H-}, Bookmark2{%H-}: TBookmark): Longint; virtual;\r\n procedure CursorPosChanged;\r\n procedure Delete; virtual;\r\n procedure DisableControls;\r\n procedure Edit; virtual;\r\n procedure EnableControls;\r\n function FieldByName(const FieldName: string): TField;\r\n function FindField(const FieldName: string): TField;\r\n function FindFirst: Boolean; virtual;\r\n function FindLast: Boolean; virtual;\r\n function FindNext: Boolean; virtual;\r\n function FindPrior: Boolean; virtual;\r\n procedure First;\r\n procedure FreeBookmark(ABookmark{%H-}: TBookmark); virtual;\r\n function GetBookmark: TBookmark; virtual;\r\n function GetCurrentRecord(Buffer{%H-}: TDataRecord): Boolean; virtual;\r\n procedure GetFieldList(List: TList; const FieldNames: string); overload;\r\n procedure GetFieldList(List: TFPList; const FieldNames: string); overload;\r\n procedure GetFieldNames(List: TStrings);\r\n procedure GotoBookmark(const ABookmark: TBookmark);\r\n procedure Insert; reintroduce;\r\n procedure InsertRecord(const Values: array of JSValue);\r\n function IsEmpty: Boolean; virtual;\r\n function IsLinkedTo(ADataSource: TDataSource): Boolean;\r\n function IsSequenced: Boolean; virtual;\r\n procedure Last;\r\n Function Load(aOptions : TLoadOptions; aAfterLoad : TDatasetLoadEvent) : Boolean;\r\n function Locate(const KeyFields{%H-}: string; const KeyValues{%H-}: JSValue; Options{%H-}: TLocateOptions) : boolean; virtual;\r\n function Lookup(const KeyFields{%H-}: string; const KeyValues{%H-}: JSValue; const ResultFields{%H-}: string): JSValue; virtual;\r\n function MoveBy(Distance: Longint): Longint;\r\n procedure Next; virtual;\r\n procedure Open;\r\n procedure Post; virtual;\r\n procedure Prior; virtual;\r\n procedure Refresh;\r\n procedure Resync(Mode: TResyncMode); virtual;\r\n Procedure CancelLoading;\r\n procedure SetFields(const Values: array of JSValue);\r\n procedure UpdateCursorPos;\r\n procedure UpdateRecord;\r\n Function GetPendingUpdates : TResolveInfoArray;\r\n property DataSetField: TDataSetField read FDataSetField write SetDataSetField;\r\n Property Loading : Boolean Read GetIsLoading;\r\n property BlockReadSize: Integer read FBlockReadSize write SetBlockReadSize;\r\n property BOF: Boolean read GetBOF;\r\n property Bookmark: TBookmark read GetBookmark write GotoBookmark;\r\n property CanModify: Boolean read GetCanModify;\r\n property DataSource: TDataSource read GetDataSource;\r\n property DefaultFields: Boolean read FDefaultFields;\r\n property EOF: Boolean read GetEOF;\r\n property FieldCount: Longint read GetFieldCount;\r\n property FieldDefs: TFieldDefs read FFieldDefs write SetFieldDefs;\r\n property Found: Boolean read FFound;\r\n property Modified: Boolean read FModified;\r\n property IsUniDirectional: Boolean read FIsUniDirectional default False;\r\n property RecordCount: Longint read GetRecordCount;\r\n property RecNo: Longint read GetRecNo write SetRecNo;\r\n property RecordSize: Word read GetRecordSize;\r\n property State: TDataSetState read FState;\r\n property Fields : TFields read FFieldList;\r\n property FieldValues[const FieldName : string] : JSValue read GetFieldValues write SetFieldValues; default;\r\n property Filter: string read FFilterText write SetFilterText;\r\n property Filtered: Boolean read FFiltered write SetFiltered default False;\r\n property FilterOptions: TFilterOptions read FFilterOptions write SetFilterOptions;\r\n property Active: Boolean read GetActive write SetActive default False;\r\n property AutoCalcFields: Boolean read FAutoCalcFields write FAutoCalcFields default true;\r\n property BeforeOpen: TDataSetNotifyEvent read FBeforeOpen write FBeforeOpen;\r\n property AfterOpen: TDataSetNotifyEvent read FAfterOpen write FAfterOpen;\r\n property BeforeClose: TDataSetNotifyEvent read FBeforeClose write FBeforeClose;\r\n property AfterClose: TDataSetNotifyEvent read FAfterClose write FAfterClose;\r\n property BeforeInsert: TDataSetNotifyEvent read FBeforeInsert write FBeforeInsert;\r\n property AfterInsert: TDataSetNotifyEvent read FAfterInsert write FAfterInsert;\r\n property BeforeEdit: TDataSetNotifyEvent read FBeforeEdit write FBeforeEdit;\r\n property AfterEdit: TDataSetNotifyEvent read FAfterEdit write FAfterEdit;\r\n property BeforePost: TDataSetNotifyEvent read FBeforePost write FBeforePost;\r\n property AfterPost: TDataSetNotifyEvent read FAfterPost write FAfterPost;\r\n property BeforeCancel: TDataSetNotifyEvent read FBeforeCancel write FBeforeCancel;\r\n property AfterCancel: TDataSetNotifyEvent read FAfterCancel write FAfterCancel;\r\n property BeforeDelete: TDataSetNotifyEvent read FBeforeDelete write FBeforeDelete;\r\n property AfterDelete: TDataSetNotifyEvent read FAfterDelete write FAfterDelete;\r\n property BeforeScroll: TDataSetNotifyEvent read FBeforeScroll write FBeforeScroll;\r\n property AfterScroll: TDataSetNotifyEvent read FAfterScroll write FAfterScroll;\r\n property BeforeRefresh: TDataSetNotifyEvent read FBeforeRefresh write FBeforeRefresh;\r\n property BeforeLoad : TDatasetNotifyEvent Read FBeforeLoad Write FBeforeLoad;\r\n Property AfterLoad : TDatasetNotifyEvent Read FAfterLoad Write FAfterLoad;\r\n Property BeforeApplyUpdates : TDatasetNotifyEvent Read FBeforeApplyUpdates Write FBeforeApplyUpdates;\r\n Property AfterApplyUpdates : TApplyUpdatesEvent Read FAfterApplyUpdates Write FAfterApplyUpdates;\r\n property AfterRefresh: TDataSetNotifyEvent read FAfterRefresh write FAfterRefresh;\r\n property OnCalcFields: TDataSetNotifyEvent read FOnCalcFields write FOnCalcFields;\r\n property OnDeleteError: TDataSetErrorEvent read FOnDeleteError write FOnDeleteError;\r\n property OnEditError: TDataSetErrorEvent read FOnEditError write FOnEditError;\r\n property OnFilterRecord: TFilterRecordEvent read FOnFilterRecord write SetOnFilterRecord;\r\n property OnNewRecord: TDataSetNotifyEvent read FOnNewRecord write FOnNewRecord;\r\n Property OnRecordResolved : TOnRecordResolveEvent Read FOnRecordResolved Write FOnRecordResolved;\r\n property OnPostError: TDataSetErrorEvent read FOnPostError write FOnPostError;\r\n property OnLoadFail : TDatasetLoadFailEvent Read FOnLoadFail Write FOnLoadFail;\r\n end;\r\n\r\n{ TDataLink }\r\n\r\n TDataLink = class(TPersistent)\r\n private\r\n FFirstRecord,\r\n FBufferCount : Integer;\r\n FActive,\r\n FDataSourceFixed,\r\n FEditing,\r\n FReadOnly,\r\n FUpdatingRecord,\r\n FVisualControl : Boolean;\r\n FDataSource : TDataSource;\r\n Function CalcFirstRecord(Index : Integer) : Integer;\r\n Procedure CalcRange;\r\n Procedure CheckActiveAndEditing;\r\n Function GetDataset : TDataset;\r\n procedure SetActive(AActive: Boolean);\r\n procedure SetDataSource(Value: TDataSource);\r\n Procedure SetReadOnly(Value : Boolean);\r\n protected\r\n procedure ActiveChanged; virtual;\r\n procedure CheckBrowseMode; virtual;\r\n procedure DataEvent(Event: TDataEvent; Info: JSValue); virtual;\r\n procedure DataSetChanged; virtual;\r\n procedure DataSetScrolled(Distance{%H-}: Integer); virtual;\r\n procedure EditingChanged; virtual;\r\n procedure FocusControl(Field{%H-}: JSValue); virtual;\r\n function GetActiveRecord: Integer; virtual;\r\n function GetBOF: Boolean; virtual;\r\n function GetBufferCount: Integer; virtual;\r\n function GetEOF: Boolean; virtual;\r\n function GetRecordCount: Integer; virtual;\r\n procedure LayoutChanged; virtual;\r\n function MoveBy(Distance: Integer): Integer; virtual;\r\n procedure RecordChanged(Field{%H-}: TField); virtual;\r\n procedure SetActiveRecord(Value: Integer); virtual;\r\n procedure SetBufferCount(Value: Integer); virtual;\r\n procedure UpdateData; virtual;\r\n property VisualControl: Boolean read FVisualControl write FVisualControl;\r\n property FirstRecord: Integer read FFirstRecord write FFirstRecord;\r\n public\r\n constructor Create; reintroduce;\r\n destructor Destroy; override;\r\n function Edit: Boolean;\r\n procedure UpdateRecord;\r\n property Active: Boolean read FActive;\r\n property ActiveRecord: Integer read GetActiveRecord write SetActiveRecord;\r\n property BOF: Boolean read GetBOF;\r\n property BufferCount: Integer read GetBufferCount write SetBufferCount;\r\n property DataSet: TDataSet read GetDataSet;\r\n property DataSource: TDataSource read FDataSource write SetDataSource;\r\n property DataSourceFixed: Boolean read FDataSourceFixed write FDataSourceFixed;\r\n property Editing: Boolean read FEditing;\r\n property Eof: Boolean read GetEOF;\r\n property ReadOnly: Boolean read FReadOnly write SetReadOnly;\r\n property RecordCount: Integer read GetRecordCount;\r\n end;\r\n\r\n{ TDetailDataLink }\r\n\r\n TDetailDataLink = class(TDataLink)\r\n protected\r\n function GetDetailDataSet: TDataSet; virtual;\r\n public\r\n property DetailDataSet: TDataSet read GetDetailDataSet;\r\n end;\r\n\r\n{ TMasterDataLink }\r\n\r\n TMasterDataLink = class(TDetailDataLink)\r\n private\r\n FDetailDataSet: TDataSet;\r\n FFieldNames: string;\r\n FFields: TList;\r\n FOnMasterChange: TNotifyEvent;\r\n FOnMasterDisable: TNotifyEvent;\r\n procedure SetFieldNames(const Value: string);\r\n protected\r\n procedure ActiveChanged; override;\r\n procedure CheckBrowseMode; override;\r\n function GetDetailDataSet: TDataSet; override;\r\n procedure LayoutChanged; override;\r\n procedure RecordChanged(Field: TField); override;\r\n Procedure DoMasterDisable; virtual;\r\n Procedure DoMasterChange; virtual;\r\n public\r\n constructor Create(ADataSet: TDataSet);virtual; reintroduce;\r\n destructor Destroy; override;\r\n property FieldNames: string read FFieldNames write SetFieldNames;\r\n property Fields: TList read FFields;\r\n property OnMasterChange: TNotifyEvent read FOnMasterChange write FOnMasterChange;\r\n property OnMasterDisable: TNotifyEvent read FOnMasterDisable write FOnMasterDisable;\r\n end;\r\n\r\n{ TMasterParamsDataLink }\r\n\r\n TMasterParamsDataLink = Class(TMasterDataLink)\r\n Private\r\n FParams : TParams;\r\n Procedure SetParams(AValue : TParams);\r\n Protected\r\n Procedure DoMasterDisable; override;\r\n Procedure DoMasterChange; override;\r\n Public\r\n constructor Create(ADataSet: TDataSet); override;\r\n Procedure RefreshParamNames; virtual;\r\n Procedure CopyParamsFromMaster(CopyBound : Boolean); virtual;\r\n Property Params : TParams Read FParams Write SetParams;\r\n end;\r\n\r\n{ TDataSource }\r\n\r\n TDataChangeEvent = procedure(Sender: TObject; Field: TField) of object;\r\n\r\n TDataSource = class(TComponent)\r\n private\r\n FDataSet: TDataSet;\r\n FDataLinks: TList;\r\n FEnabled: Boolean;\r\n FAutoEdit: Boolean;\r\n FState: TDataSetState;\r\n FOnStateChange: TNotifyEvent;\r\n FOnDataChange: TDataChangeEvent;\r\n FOnUpdateData: TNotifyEvent;\r\n procedure DistributeEvent(Event: TDataEvent; Info: JSValue);\r\n procedure RegisterDataLink(DataLink: TDataLink);\r\n Procedure ProcessEvent(Event : TDataEvent; Info : JSValue);\r\n procedure SetDataSet(ADataSet: TDataSet);\r\n procedure SetEnabled(Value: Boolean);\r\n procedure UnregisterDataLink(DataLink: TDataLink);\r\n protected\r\n Procedure DoDataChange (Info : Pointer);virtual;\r\n Procedure DoStateChange; virtual;\r\n Procedure DoUpdateData;\r\n property DataLinks: TList read FDataLinks;\r\n public\r\n constructor Create(AOwner: TComponent); override;\r\n destructor Destroy; override;\r\n procedure Edit;\r\n function IsLinkedTo(ADataSet{%H-}: TDataSet): Boolean;\r\n property State: TDataSetState read FState;\r\n published\r\n property AutoEdit: Boolean read FAutoEdit write FAutoEdit default True;\r\n property DataSet: TDataSet read FDataSet write SetDataSet;\r\n property Enabled: Boolean read FEnabled write SetEnabled default True;\r\n property OnStateChange: TNotifyEvent read FOnStateChange write FOnStateChange;\r\n property OnDataChange: TDataChangeEvent read FOnDataChange write FOnDataChange;\r\n property OnUpdateData: TNotifyEvent read FOnUpdateData write FOnUpdateData;\r\n end;\r\n\r\n\r\n { TDataRequest }\r\n TDataRequestResult = (rrFail,rrEOF,rrOK);\r\n TDataRequestEvent = Procedure (ARequest : TDataRequest) of object;\r\n\r\n TDataRequest = Class(TObject)\r\n private\r\n FBookmark: TBookMark;\r\n FCurrent: TBookMark;\r\n FDataset: TDataset;\r\n FErrorMsg: String;\r\n FEvent: TDatasetLoadEvent;\r\n FLoadOptions: TLoadOptions;\r\n FRequestID: Integer;\r\n FSuccess: TDataRequestResult;\r\n FData : JSValue;\r\n FAfterRequest : TDataRequestEvent;\r\n FDataProxy : TDataProxy;\r\n Protected\r\n Procedure DoAfterRequest;\r\n Public\r\n Constructor Create(aDataProxy : TDataProxy; aOptions: TLoadOptions; aAfterRequest: TDataRequestEvent; aAfterLoad: TDatasetLoadEvent); virtual; reintroduce;\r\n property DataProxy : TDataProxy Read FDataProxy;\r\n Property Dataset : TDataset Read FDataset;\r\n Property Bookmark : TBookMark Read FBookmark;\r\n Property RequestID : Integer Read FRequestID;\r\n Property LoadOptions : TLoadOptions Read FLoadOptions;\r\n Property Current : TBookMark Read FCurrent;\r\n Property Success : TDataRequestResult Read FSuccess Write FSuccess;\r\n Property Event : TDatasetLoadEvent Read FEvent;\r\n Property ErrorMsg : String Read FErrorMsg Write FErrorMsg;\r\n Property Data : JSValue read FData Write FData;\r\n end;\r\n TDataRequestClass = Class of TDataRequest;\r\n\r\n { TRecordUpdateDescriptor }\r\n\r\n TRecordUpdateDescriptor = Class(TObject)\r\n private\r\n FBookmark: TBookmark;\r\n FData: JSValue;\r\n FDataset: TDataset;\r\n FProxy: TDataProxy;\r\n FResolveStatus: TResolveStatus;\r\n FResolveError: String;\r\n FServerData: JSValue;\r\n FStatus: TUpdateStatus;\r\n Protected\r\n Procedure SetResolveStatus(aValue : TResolveStatus); virtual;\r\n Procedure Reset;\r\n Public\r\n Constructor Create(aProxy : TDataProxy; aDataset : TDataset; aBookmark : TBookMark; AData : JSValue; AStatus : TUpdateStatus); reintroduce;\r\n Procedure Resolve(aData : JSValue);\r\n Procedure ResolveFailed(aError : String);\r\n Property Proxy : TDataProxy read FProxy;\r\n Property Dataset : TDataset Read FDataset;\r\n Property OriginalStatus : TUpdateStatus Read FStatus; deprecated;\r\n Property Status : TUpdateStatus Read FStatus;\r\n Property ResolveStatus : TResolveStatus Read FResolveStatus;\r\n Property ServerData : JSValue Read FServerData;\r\n Property Data : JSValue Read FData;\r\n Property Bookmark : TBookmark Read FBookmark;\r\n Property ResolveError : String Read FResolveError ;\r\n end;\r\n\r\n TRecordUpdateDescriptorClass = Class of TRecordUpdateDescriptor;\r\n\r\n { TRecordUpdateDescriptorList }\r\n\r\n TRecordUpdateDescriptorList = Class(TFPList)\r\n private\r\n function GetUpdate(AIndex : Integer): TRecordUpdateDescriptor;\r\n Public\r\n Property UpdateDescriptors[AIndex : Integer] : TRecordUpdateDescriptor Read GetUpdate; Default;\r\n end;\r\n\r\n { TRecordUpdateBatch }\r\n TUpdateBatchStatus = (ubsPending,ubsProcessing,ubsProcessed,ubsResolved);\r\n TResolveBatchEvent = Procedure (Sender : TObject; ARequest : TRecordUpdateBatch) of object;\r\n\r\n TRecordUpdateBatch = class(TObject)\r\n private\r\n FBatchID: Integer;\r\n FDataset: TDataset;\r\n FLastChangeIndex: Integer;\r\n FList: TRecordUpdateDescriptorList;\r\n FOnResolve: TResolveBatchEvent;\r\n FOwnsList: Boolean;\r\n FStatus: TUpdateBatchStatus;\r\n Protected\r\n Property LastChangeIndex : Integer Read FLastChangeIndex;\r\n Public\r\n Constructor Create (aBatchID : Integer; AList : TRecordUpdateDescriptorList; AOwnsList : Boolean); reintroduce;\r\n Destructor Destroy; override;\r\n Procedure FreeList;\r\n Property Dataset : TDataset Read FDataset Write FDataset;\r\n Property OnResolve : TResolveBatchEvent Read FOnResolve Write FOnResolve;\r\n Property OwnsList : Boolean Read FOwnsList;\r\n property BatchID : Integer Read FBatchID;\r\n Property Status : TUpdateBatchStatus Read FStatus Write FStatus;\r\n Property List : TRecordUpdateDescriptorList Read FList;\r\n end;\r\n TRecordUpdateBatchClass = Class of TRecordUpdateBatch;\r\n\r\n { TDataProxy }\r\n\r\n TDataProxy = Class(TComponent)\r\n Protected\r\n Function GetDataRequestClass : TDataRequestClass; virtual;\r\n Function GetUpdateDescriptorClass : TRecordUpdateDescriptorClass; virtual;\r\n Function GetUpdateBatchClass : TRecordUpdateBatchClass; virtual;\r\n // Use this to call resolve event, and free the batch.\r\n Procedure ResolveBatch(aBatch : TRecordUpdateBatch);\r\n Public\r\n Function GetDataRequest(aOptions: TLoadOptions; aAfterRequest: TDataRequestEvent; aAfterLoad: TDatasetLoadEvent) : TDataRequest; virtual;\r\n Function GetUpdateDescriptor(aDataset : TDataset; aBookmark : TBookMark; AData : JSValue; AStatus : TUpdateStatus) : TRecordUpdateDescriptor; virtual;\r\n function GetRecordUpdateBatch(aBatchID: Integer; AList: TRecordUpdateDescriptorList; AOwnsList: Boolean=True): TRecordUpdateBatch; virtual;\r\n // actual calls to do the work. Dataset wi\r\n Function DoGetData(aRequest : TDataRequest) : Boolean; virtual; abstract;\r\n // TDataProxy is responsible for calling OnResolve and if not, Freeing the batch.\r\n Function ProcessUpdateBatch(aBatch : TRecordUpdateBatch): Boolean; virtual; abstract;\r\n end;\r\n\r\nconst\r\n {\r\n TFieldType = (\r\n ftUnknown, ftString, ftInteger, ftLargeInt, ftBoolean, ftFloat, ftDate,\r\n ftTime, ftDateTime, ftAutoInc, ftBlob, ftMemo, ftFixedChar,\r\n ftVariant\r\n );\r\n }\r\n\r\nConst\r\n FieldTypeNames: array[TFieldType] of string = (\r\n 'Unknown', 'String', 'SmallInt', 'Integer', 'Word', 'Boolean', 'Float',\r\n 'Currency', 'BCD', 'Date', 'Time', 'DateTime', 'Bytes', 'VarBytes',\r\n 'AutoInc', 'Blob', 'Memo', 'Graphic', 'FmtMemo', 'ParadoxOle',\r\n 'dBaseOle', 'TypedBinary', 'Cursor', 'FixedChar', 'WideString',\r\n 'LargeInt', 'ADT', 'Array', 'Reference', 'DataSet', 'OraBlob', 'OraClob',\r\n 'Variant', 'Interface', 'IDispatch', 'Guid', 'TimeStamp', 'FMTBcd',\r\n 'FixedWideChar', 'WideMemo', 'OraTimeStamp', 'OraInterval',\r\n 'LongWord', 'ShortInt', 'Byte', 'Extended', 'Connection', 'Params', 'Stream',\r\n 'TimeStampOffset', 'Object', 'Single');\r\n\r\n DefaultFieldClasses: array[TFieldType] of TFieldClass = (\r\n nil, { ftUnknown }\r\n TStringField, { ftString }\r\n TSmallintField, { ftSmallint }\r\n TIntegerField, { ftInteger }\r\n TWordField, { ftWord }\r\n TBooleanField, { ftBoolean }\r\n TFloatField, { ftFloat }\r\n nil, { ftCurrency }\r\n nil, { ftBCD }\r\n TDateField, { ftDate }\r\n TTimeField, { ftTime }\r\n TDateTimeField, { ftDateTime }\r\n nil, { ftBytes }\r\n nil, { ftVarBytes }\r\n TAutoIncField, { ftAutoInc }\r\n TBlobField, { ftBlob }\r\n TMemoField, { ftMemo }\r\n TGraphicField, { ftGraphic }\r\n TBlobField, { ftFmtMemo }\r\n TBlobField, { ftParadoxOle }\r\n TBlobField, { ftDBaseOle }\r\n TBlobField, { ftTypedBinary }\r\n nil, { ftCursor }\r\n TStringField, { ftFixedChar }\r\n nil, { ftWideString }\r\n TLargeIntField, { ftLargeInt }\r\n nil, { ftADT }\r\n nil, { ftArray }\r\n nil, { ftReference }\r\n TDataSetField, { ftDataSet }\r\n TBlobField, { ftOraBlob }\r\n TMemoField, { ftOraClob }\r\n TVariantField, { ftVariant }\r\n nil, { ftInterface }\r\n nil, { ftIDispatch }\r\n nil, { ftGuid }\r\n nil, { ftTimeStamp }\r\n nil, { ftFMTBcd }\r\n nil, { ftFixedWideChar }\r\n nil, { ftWideMemo }\r\n nil, { ftOraTimeStamp }\r\n TStringField, { ftOraInterval }\r\n nil, { ftLongWord }\r\n nil, { ftShortint }\r\n nil, { ftByte }\r\n nil, { ftExtended }\r\n nil, { ftConnection }\r\n nil, { ftParams }\r\n nil, { ftStream }\r\n nil, { ftTimeStampOffset }\r\n nil, { ftObject }\r\n nil); { ftSingle }\r\n\r\n dsEditModes = [dsEdit, dsInsert, dsSetKey];\r\n dsWriteModes = [dsEdit, dsInsert, dsSetKey, dsCalcFields, dsFilter,\r\n dsNewValue, dsInternalCalc, dsRefreshFields];\r\n\r\n{ Auxiliary functions }\r\n\r\nProcedure DatabaseError (Const Msg : String); overload;\r\nProcedure DatabaseError (Const Msg : String; Comp : TComponent); overload;\r\nProcedure DatabaseErrorFmt (Const Fmt : String; Const Args : Array Of const); overload;\r\nProcedure DatabaseErrorFmt (Const Fmt : String; Const Args : Array Of const; Comp : TComponent); overload;\r\nFunction ExtractFieldName(Const Fields: String; var Pos: Integer): String;\r\n\r\n// function SkipComments(var p: PChar; EscapeSlash, EscapeRepeat : Boolean) : boolean;\r\n\r\n// operator Enumerator(ADataSet: TDataSet): TDataSetEnumerator;\r\n \r\nimplementation\r\n\r\nuses DBConst,TypInfo;\r\n\r\n{ ---------------------------------------------------------------------\r\n Auxiliary functions\r\n ---------------------------------------------------------------------}\r\n\r\nProcedure DatabaseError (Const Msg : String);\r\n\r\nbegin\r\n Raise EDataBaseError.Create(Msg);\r\nend;\r\n\r\nProcedure DatabaseError (Const Msg : String; Comp : TComponent);\r\n\r\nbegin\r\n if assigned(Comp) and (Comp.Name <> '') then\r\n Raise EDatabaseError.CreateFmt('%s : %s',[Comp.Name,Msg])\r\n else\r\n DatabaseError(Msg);\r\nend;\r\n\r\nProcedure DatabaseErrorFmt (Const Fmt : String; Const Args : Array Of const);\r\n\r\nbegin\r\n Raise EDatabaseError.CreateFmt(Fmt,Args);\r\nend;\r\n\r\nProcedure DatabaseErrorFmt (Const Fmt : String; Const Args : Array Of const;\r\n Comp : TComponent);\r\nbegin\r\n if assigned(comp) then\r\n Raise EDatabaseError.CreateFmt(Format('%s : %s',[Comp.Name,Fmt]),Args)\r\n else\r\n DatabaseErrorFmt(Fmt, Args);\r\nend;\r\n\r\nfunction ExtractFieldName(const Fields: string; var Pos: Integer): string;\r\nvar\r\n i: Integer;\r\n FieldsLength: Integer;\r\nbegin\r\n i:=Pos;\r\n FieldsLength:=Length(Fields);\r\n while (i<=FieldsLength) and (Fields[i]<>';') do Inc(i);\r\n Result:=Trim(Copy(Fields,Pos,i-Pos));\r\n if (i<=FieldsLength) and (Fields[i]=';') then Inc(i);\r\n Pos:=i;\r\nend;\r\n\r\n{ TRecordUpdateBatch }\r\n\r\nconstructor TRecordUpdateBatch.Create(aBatchID: Integer; AList: TRecordUpdateDescriptorList; AOwnsList : Boolean);\r\nbegin\r\n FBatchID:=aBatchID;\r\n FList:=AList;\r\n FOwnsList:=AOwnsList;\r\n FStatus:=ubsPending;\r\nend;\r\n\r\ndestructor TRecordUpdateBatch.Destroy;\r\nbegin\r\n if OwnsList then\r\n FreeList;\r\n inherited Destroy;\r\nend;\r\n\r\nprocedure TRecordUpdateBatch.FreeList;\r\nbegin\r\n FreeAndNil(FList);\r\nend;\r\n\r\n{ TRecordUpdateDescriptorList }\r\n\r\nfunction TRecordUpdateDescriptorList.GetUpdate(AIndex : Integer): TRecordUpdateDescriptor;\r\nbegin\r\n Result:=TRecordUpdateDescriptor(Items[AIndex]);\r\nend;\r\n\r\n{ TRecordUpdateDescriptor }\r\n\r\nprocedure TRecordUpdateDescriptor.SetResolveStatus(aValue: TResolveStatus);\r\nbegin\r\n FResolveStatus:=AValue;\r\nend;\r\n\r\nprocedure TRecordUpdateDescriptor.Reset;\r\nbegin\r\n FResolveStatus:=rsUnresolved;\r\n FResolveError:='';\r\n FServerData:=Null;\r\nend;\r\n\r\nconstructor TRecordUpdateDescriptor.Create(aProxy: TDataProxy; aDataset: TDataset; aBookmark: TBookMark; AData: JSValue;\r\n AStatus: TUpdateStatus);\r\nbegin\r\n FDataset:=aDataset;\r\n FBookmark:=aBookmark;\r\n FData:=AData;\r\n FStatus:=AStatus;\r\n FProxy:=aProxy;\r\nend;\r\n\r\n\r\nprocedure TRecordUpdateDescriptor.Resolve(aData: JSValue);\r\nbegin\r\n SetResolveStatus(rsResolved);\r\n FServerData:=AData;\r\nend;\r\n\r\nprocedure TRecordUpdateDescriptor.ResolveFailed(aError: String);\r\nbegin\r\n SetResolveStatus(rsResolveFailed);\r\n FResolveError:=AError;\r\nend;\r\n\r\n{ TDataRequest }\r\n\r\nprocedure TDataRequest.DoAfterRequest;\r\nbegin\r\n if Assigned(FAfterRequest) then\r\n FAfterRequest(Self);\r\nend;\r\n\r\nconstructor TDataRequest.Create(aDataProxy : TDataProxy; aOptions: TLoadOptions; aAfterRequest: TDataRequestEvent; aAfterLoad: TDatasetLoadEvent);\r\nbegin\r\n FDataProxy:=aDataProxy;\r\n FLoadOptions:=aOptions;\r\n FEvent:=aAfterLoad;\r\n FAfterRequest:=aAfterRequest;\r\nend;\r\n\r\n{ TDataProxy }\r\n\r\nfunction TDataProxy.GetDataRequestClass: TDataRequestClass;\r\nbegin\r\n Result:=TDataRequest;\r\nend;\r\n\r\nfunction TDataProxy.GetUpdateDescriptorClass: TRecordUpdateDescriptorClass;\r\nbegin\r\n Result:=TRecordUpdateDescriptor;\r\nend;\r\n\r\nfunction TDataProxy.GetUpdateBatchClass: TRecordUpdateBatchClass;\r\nbegin\r\n Result:=TRecordUpdateBatch;\r\nend;\r\n\r\nprocedure TDataProxy.ResolveBatch(aBatch: TRecordUpdateBatch);\r\nbegin\r\n try\r\n If Assigned(ABatch.FOnResolve) then\r\n ABatch.FOnResolve(Self,ABatch);\r\n finally\r\n aBatch.Free;\r\n end;\r\nend;\r\n\r\nfunction TDataProxy.GetDataRequest(aOptions: TLoadOptions; aAfterRequest : TDataRequestEvent; aAfterLoad: TDatasetLoadEvent): TDataRequest;\r\nbegin\r\n Result:=GetDataRequestClass.Create(Self,aOptions,aAfterRequest,aAfterLoad);\r\nend;\r\n\r\nfunction TDataProxy.GetUpdateDescriptor(aDataset : TDataset; aBookmark: TBookMark; AData: JSValue; AStatus: TUpdateStatus): TRecordUpdateDescriptor;\r\nbegin\r\n Result:=GetUpdateDescriptorClass.Create(Self,aDataset, aBookmark,AData,AStatus);\r\nend;\r\n\r\nfunction TDataProxy.GetRecordUpdateBatch(aBatchID: Integer; AList: TRecordUpdateDescriptorList; AOwnsList : Boolean = True): TRecordUpdateBatch;\r\nbegin\r\n Result:=GetUpdateBatchClass.Create(aBatchID,AList,AOwnsList);\r\nend;\r\n\r\n\r\n{ EUpdateError }\r\nconstructor EUpdateError.Create(NativeError, Context : String;\r\n ErrCode, PrevError : integer; E: Exception);\r\n \r\nbegin\r\n Inherited CreateFmt(NativeError,[Context]);\r\n FContext := Context;\r\n FErrorCode := ErrCode;\r\n FPreviousError := PrevError;\r\n FOriginalException := E;\r\nend;\r\n\r\nDestructor EUpdateError.Destroy;\r\n\r\nbegin\r\n FOriginalException.Free;\r\n Inherited;\r\nend;\r\n\r\n{ TNamedItem }\r\n\r\nfunction TNamedItem.GetDisplayName: string;\r\nbegin\r\n Result := FName;\r\nend;\r\n\r\nprocedure TNamedItem.SetDisplayName(const Value: string);\r\nVar TmpInd : Integer;\r\nbegin\r\n if FName=Value then exit;\r\n if (Value <> '') and (Collection is TFieldDefs ) then\r\n begin\r\n TmpInd := (TDefCollection(Collection).IndexOf(Value));\r\n if (TmpInd >= 0) and (TmpInd <> Index) then\r\n DatabaseErrorFmt(SDuplicateName, [Value, Collection.ClassName]);\r\n end;\r\n FName:=Value;\r\n inherited SetDisplayName(Value);\r\nend;\r\n\r\n{ TDefCollection }\r\n\r\nprocedure TDefCollection.SetItemName(Item: TCollectionItem);\r\n\r\nVar\r\n N : TNamedItem;\r\n TN : String;\r\n\r\nbegin\r\n N:=Item as TNamedItem;\r\n if N.Name = '' then\r\n begin\r\n TN:=Copy(ClassName, 2, 5) + IntToStr(N.ID+1);\r\n if assigned(Dataset) then\r\n TN:=Dataset.Name+TN;\r\n N.Name:=TN;\r\n end\r\n else\r\n inherited SetItemName(Item);\r\nend;\r\n\r\nconstructor TDefCollection.create(ADataset: TDataset; AOwner: TPersistent;\r\n AClass: TCollectionItemClass);\r\nbegin\r\n inherited Create(AOwner,AClass);\r\n FDataset := ADataset;\r\nend;\r\n\r\nfunction TDefCollection.Find(const AName: string): TNamedItem;\r\nvar i: integer;\r\nbegin\r\n Result := Nil;\r\n for i := 0 to Count - 1 do\r\n if AnsiSameText(TNamedItem(Items[i]).Name, AName) then\r\n begin\r\n Result := TNamedItem(Items[i]);\r\n Break;\r\n end;\r\nend;\r\n\r\nprocedure TDefCollection.GetItemNames(List: TStrings);\r\nvar i: LongInt;\r\nbegin\r\n for i := 0 to Count - 1 do\r\n List.Add(TNamedItem(Items[i]).Name);\r\nend;\r\n\r\nfunction TDefCollection.IndexOf(const AName: string): Longint;\r\nvar i: LongInt;\r\nbegin\r\n Result := -1;\r\n for i := 0 to Count - 1 do\r\n if AnsiSameText(TNamedItem(Items[i]).Name, AName) then\r\n begin\r\n Result := i;\r\n Break;\r\n end;\r\nend;\r\n\r\n{ TIndexDef }\r\n\r\nprocedure TIndexDef.SetDescFields(const AValue: string);\r\nbegin\r\n if FDescFields=AValue then exit;\r\n if AValue <> '' then FOptions:=FOptions + [ixDescending];\r\n FDescFields:=AValue;\r\nend;\r\n\r\nprocedure TIndexDef.Assign(Source: TPersistent);\r\nvar idef : TIndexDef;\r\nbegin\r\n idef := nil;\r\n if Source is TIndexDef then\r\n idef := Source as TIndexDef;\r\n if Assigned(idef) then\r\n begin\r\n FName := idef.Name;\r\n FFields := idef.Fields;\r\n FOptions := idef.Options;\r\n FCaseinsFields := idef.CaseInsFields;\r\n FDescFields := idef.DescFields;\r\n FSource := idef.Source;\r\n FExpression := idef.Expression;\r\n end\r\n else\r\n inherited Assign(Source);\r\nend;\r\n\r\nfunction TIndexDef.GetExpression: string;\r\nbegin\r\n Result := FExpression;\r\nend;\r\n\r\nprocedure TIndexDef.SetExpression(const AValue: string);\r\nbegin\r\n FExpression := AValue;\r\nend;\r\n\r\nprocedure TIndexDef.SetCaseInsFields(const AValue: string);\r\nbegin\r\n if FCaseinsFields=AValue then exit;\r\n if AValue <> '' then FOptions:=FOptions + [ixCaseInsensitive];\r\n FCaseinsFields:=AValue;\r\nend;\r\n\r\nconstructor TIndexDef.Create(Owner: TIndexDefs; const AName, TheFields: string;\r\n TheOptions: TIndexOptions);\r\n\r\nbegin\r\n FName := aname;\r\n inherited create(Owner);\r\n FFields := TheFields;\r\n FOptions := TheOptions;\r\nend;\r\n\r\n\r\n{ TIndexDefs }\r\n\r\nFunction TIndexDefs.GetItem (Index : integer) : TIndexDef;\r\n\r\nbegin\r\n Result:=(Inherited GetItem(Index)) as TIndexDef;\r\nend;\r\n\r\nProcedure TIndexDefs.SetItem(Index: Integer; Value: TIndexDef);\r\nbegin\r\n Inherited SetItem(Index,Value);\r\nend;\r\n\r\nconstructor TIndexDefs.Create(ADataSet: TDataSet);\r\n\r\nbegin\r\n inherited create(ADataset, Owner, TIndexDef);\r\nend;\r\n\r\n\r\nFunction TIndexDefs.AddIndexDef: TIndexDef;\r\n\r\nbegin\r\n// Result := inherited add as TIndexDef;\r\n Result:=TIndexDefClass(Self.ItemClass).Create(Self,'','',[]);\r\nend;\r\n\r\nprocedure TIndexDefs.Add(const Name, Fields: string; Options: TIndexOptions);\r\n\r\nbegin\r\n TIndexDefClass(Self.ItemClass).Create(Self,Name,Fields,Options);\r\nend;\r\n\r\nfunction TIndexDefs.Find(const IndexName: string): TIndexDef;\r\nbegin\r\n Result := (inherited Find(IndexName)) as TIndexDef;\r\n if (Result=Nil) Then\r\n DatabaseErrorFmt(SIndexNotFound, [IndexName], FDataSet);\r\nend;\r\n\r\nfunction TIndexDefs.FindIndexForFields(const Fields: string): TIndexDef;\r\n\r\nbegin\r\n //!! To be implemented\r\n Result:=nil;\r\nend;\r\n\r\n\r\nfunction TIndexDefs.GetIndexForFields(const Fields: string;\r\n CaseInsensitive: Boolean): TIndexDef;\r\n\r\nvar\r\n i, FieldsLen: integer;\r\n Last: TIndexDef;\r\nbegin\r\n Last := nil;\r\n FieldsLen := Length(Fields);\r\n for i := 0 to Count - 1 do\r\n begin\r\n Result := Items[I];\r\n if (Result.Options * [ixDescending, ixExpression] = []) and\r\n (not CaseInsensitive or (ixCaseInsensitive in Result.Options)) and\r\n AnsiSameText(Fields, Result.Fields) then\r\n begin\r\n Exit;\r\n end else\r\n if AnsiSameText(Fields, Copy(Result.Fields, 1, FieldsLen)) and\r\n ((Length(Result.Fields) = FieldsLen) or\r\n (Result.Fields[FieldsLen + 1] = ';')) then\r\n begin\r\n if (Last = nil) or\r\n ((Last <> nil) And (Length(Last.Fields) > Length(Result.Fields))) then\r\n Last := Result;\r\n end;\r\n end;\r\n Result := Last;\r\nend;\r\n\r\nprocedure TIndexDefs.Update;\r\n\r\nbegin\r\n if (not updated) and assigned(Dataset) then\r\n begin\r\n Dataset.UpdateIndexDefs;\r\n updated := True;\r\n end;\r\nend;\r\n\r\n{ TCheckConstraint }\r\n\r\nprocedure TCheckConstraint.Assign(Source: TPersistent);\r\n\r\nbegin\r\n //!! To be implemented\r\nend;\r\n\r\n\r\n\r\n{ TCheckConstraints }\r\n\r\nFunction TCheckConstraints.GetItem(Index : Longint) : TCheckConstraint;\r\n\r\nbegin\r\n //!! To be implemented\r\n Result := nil;\r\nend;\r\n\r\n\r\nProcedure TCheckConstraints.SetItem(index : Longint; Value : TCheckConstraint);\r\n\r\nbegin\r\n //!! To be implemented\r\nend;\r\n\r\n\r\nfunction TCheckConstraints.GetOwner: TPersistent;\r\n\r\nbegin\r\n //!! To be implemented\r\n Result := nil;\r\nend;\r\n\r\n\r\nconstructor TCheckConstraints.Create(AOwner: TPersistent);\r\n\r\nbegin\r\n //!! To be implemented\r\n inherited Create(TCheckConstraint);\r\nend;\r\n\r\n\r\nfunction TCheckConstraints.Add: TCheckConstraint;\r\n\r\nbegin\r\n //!! To be implemented\r\n Result := nil;\r\nend;\r\n\r\n{ TLookupList }\r\n\r\nconstructor TLookupList.Create;\r\n\r\nbegin\r\n FList := TFPList.Create;\r\nend;\r\n\r\ndestructor TLookupList.Destroy;\r\n\r\nbegin\r\n Clear;\r\n FList.Destroy;\r\n inherited Destroy;\r\nend;\r\n\r\nprocedure TLookupList.Add(const AKey, AValue: JSValue);\r\n\r\nvar LookupRec: TJSObject;\r\n\r\nbegin\r\n LookupRec:=New(['Key',AKey,'Value',AValue]);\r\n FList.Add(LookupRec);\r\nend;\r\n\r\nprocedure TLookupList.Clear;\r\n\r\nbegin\r\n FList.Clear;\r\nend;\r\n\r\nfunction TLookupList.FirstKeyByValue(const AValue: JSValue): JSValue;\r\nvar\r\n i: Integer;\r\nbegin\r\n for i := 0 to FList.Count - 1 do\r\n with TJSObject(FList[i]) do\r\n if Properties['Value'] = AValue then\r\n begin\r\n Result := Properties['Key'];\r\n exit;\r\n end;\r\n Result := Null;\r\nend;\r\n\r\nfunction TLookupList.ValueOfKey(const AKey: JSValue): JSValue;\r\n\r\n Function VarArraySameValues(VarArray1,VarArray2 : TJSValueDynArray) : Boolean;\r\n // This only works for one-dimensional vararrays with a lower bound of 0\r\n // and equal higher bounds wich only contains JSValues.\r\n // The vararrays returned by GetFieldValues do apply.\r\n var i : integer;\r\n begin\r\n Result := True;\r\n if (Length(VarArray1)<>Length(VarArray2)) then\r\n exit;\r\n for i := 0 to Length(VarArray1) do\r\n begin\r\n if VarArray1[i]<>VarArray2[i] then\r\n begin\r\n Result := false;\r\n Exit;\r\n end;\r\n end;\r\n end;\r\n\r\nvar I: Integer;\r\nbegin\r\n Result := Null;\r\n if IsNull(AKey) then Exit;\r\n i := FList.Count - 1;\r\n if IsArray(AKey) then\r\n while (i >= 0) And not VarArraySameValues(TJSValueDynArray(TJSOBject(FList.Items[I]).Properties['Key']),TJSValueDynArray(AKey)) do Dec(i)\r\n else\r\n while (i >= 0) And (TJSObject(FList[I]).Properties['Key'] <> AKey) do Dec(i);\r\n if i >= 0 then Result := TJSObject(FList[I]).Properties['Value'];\r\nend;\r\n\r\nprocedure TLookupList.ValuesToStrings(AStrings: TStrings);\r\n\r\nvar\r\n i: Integer;\r\n p: TJSObject;\r\n\r\nbegin\r\n AStrings.Clear;\r\n for i := 0 to FList.Count - 1 do\r\n begin\r\n p := TJSObject(FList[i]);\r\n AStrings.AddObject(String(p.properties['Value']), TObject(p));\r\n end;\r\nend;\r\n\r\n{ ---------------------------------------------------------------------\r\n TDataSet\r\n ---------------------------------------------------------------------}\r\n\r\nConst\r\n DefaultBufferCount = 10;\r\n\r\nconstructor TDataSet.Create(AOwner: TComponent);\r\n\r\nbegin\r\n Inherited Create(AOwner);\r\n FFieldDefs:=FieldDefsClass.Create(Self);\r\n FFieldList:=FieldsClass.Create(Self);\r\n FDataSources:=TFPList.Create;\r\n FConstraints:=TCheckConstraints.Create(Self);\r\n SetLength(FBuffers,1);\r\n FActiveRecord := 0;\r\n FEOF := True;\r\n FBOF := True;\r\n FIsUniDirectional := False;\r\n FAutoCalcFields := True;\r\n FDataRequestID:=0;\r\n FNestedDataSetClass := TDataSetClass(Self.ClassType);\r\nend;\r\n\r\n\r\ndestructor TDataSet.Destroy;\r\n\r\nvar\r\n i: Integer;\r\n\r\nbegin\r\n Active:=False;\r\n\r\n SetDataSetField(nil);\r\n\r\n FFieldDefs.Free;\r\n FFieldList.Free;\r\n FNestedDataSets.Free;\r\n With FDataSources do\r\n begin\r\n While Count>0 do\r\n TDataSource(Items[Count - 1]).DataSet:=Nil;\r\n Destroy;\r\n end;\r\n for i := 0 to FBufferCount do\r\n FreeRecordBuffer(FBuffers[i]);\r\n FConstraints.Free;\r\n SetLength(FBuffers,1);\r\n Inherited Destroy;\r\nend;\r\n\r\n// This procedure must be called when the first record is made/read\r\nprocedure TDataSet.ActivateBuffers;\r\n\r\nbegin\r\n FBOF:=False;\r\n FEOF:=False;\r\n FActiveRecord:=0;\r\nend;\r\n\r\nprocedure TDataSet.BindFields(Binding: Boolean);\r\n\r\nvar i, FieldIndex: Integer;\r\n FieldDef: TFieldDef;\r\n Field: TField;\r\n\r\nbegin\r\n { FieldNo is set to -1 for calculated/lookup fields, to 0 for unbound field\r\n and for bound fields it is set to FieldDef.FieldNo }\r\n FCalcFieldsCount := 0;\r\n FBlobFieldCount := 0;\r\n for i := 0 to Fields.Count - 1 do\r\n begin\r\n Field := Fields[i];\r\n Field.FFieldDef := Nil;\r\n if not Binding then\r\n Field.FFieldNo := 0\r\n else if Field.FieldKind in [fkCalculated, fkLookup] then\r\n begin\r\n Field.FFieldNo := -1;\r\n Inc(FCalcFieldsCount);\r\n end\r\n else\r\n begin\r\n FieldIndex := FieldDefs.IndexOf(Field.FieldName);\r\n if FieldIndex = -1 then\r\n DatabaseErrorFmt(SFieldNotFound,[Field.FieldName],Self)\r\n else\r\n begin\r\n FieldDef := FieldDefs[FieldIndex];\r\n Field.FFieldDef := FieldDef;\r\n Field.FFieldNo := FieldDef.FieldNo;\r\n if FieldDef.InternalCalcField then\r\n FInternalCalcFields := True;\r\n if Field.IsBlob then\r\n begin\r\n Field.FSize := FieldDef.Size;\r\n Inc(FBlobFieldCount);\r\n end;\r\n // synchronize CodePage between TFieldDef and TField\r\n // character data in record buffer and field buffer should have same CodePage\r\n end;\r\n end;\r\n Field.Bind(Binding);\r\n end;\r\nend;\r\n\r\nfunction TDataSet.BookmarkAvailable: Boolean;\r\n\r\nConst BookmarkStates = [dsBrowse,dsEdit,dsInsert];\r\n\r\nbegin\r\n Result:=(Not IsEmpty) and not FIsUniDirectional and (State in BookmarkStates)\r\n and (getBookMarkFlag(ActiveBuffer)=bfCurrent);\r\nend;\r\n\r\nprocedure TDataSet.CalculateFields(var Buffer: TDataRecord);\r\nvar\r\n i: Integer;\r\nbegin\r\n FCalcBuffer := Buffer;\r\n\r\n if FState <> dsInternalCalc then\r\n begin\r\n ClearCalcFields(FCalcBuffer);\r\n\r\n if not IsUniDirectional then\r\n for i := 0 to FFieldList.Count - 1 do\r\n if FFieldList[i].FieldKind = fkLookup then\r\n FFieldList[i].CalcLookupValue;\r\n end;\r\n\r\n DoOnCalcFields;\r\nend;\r\n\r\nprocedure TDataSet.CheckActive;\r\n\r\nbegin\r\n If Not Active then\r\n DataBaseError(SInactiveDataset,Self);\r\nend;\r\n\r\nprocedure TDataSet.CheckInactive;\r\n\r\nbegin\r\n If Active then\r\n DataBaseError(SActiveDataset,Self);\r\nend;\r\n\r\nprocedure TDataSet.ClearBuffers;\r\n\r\nbegin\r\n FRecordCount:=0;\r\n FActiveRecord:=0;\r\n FCurrentRecord:=-1;\r\n FBOF:=True;\r\n FEOF:=True;\r\nend;\r\n\r\nprocedure TDataSet.ClearCalcFields(var Buffer: TDataRecord);\r\n\r\nbegin\r\n // Empty\r\nend;\r\n\r\nprocedure TDataSet.CloseBlob(Field: TField);\r\n\r\nbegin\r\n //!! To be implemented\r\nend;\r\n\r\nprocedure TDataSet.CloseCursor;\r\n\r\nbegin\r\n ClearBuffers;\r\n SetBufListSize(1);\r\n Fields.ClearFieldDefs;\r\n InternalClose;\r\n FInternalOpenComplete := False;\r\nend;\r\n\r\nprocedure TDataSet.CreateFields;\r\n\r\nVar I : longint;\r\n\r\nbegin\r\n{$ifdef DSDebug}\r\n Writeln ('Creating fields');\r\n Writeln ('Count : ',fielddefs.Count);\r\n For I:=0 to FieldDefs.Count-1 do\r\n Writeln('Def ',I,' : ',Fielddefs.items[i].Name,'(',Fielddefs.items[i].FieldNo,')');\r\n{$endif}\r\n For I:=0 to FieldDefs.Count-1 do\r\n With FieldDefs.Items[I] do\r\n If DataType<>ftUnknown then\r\n begin\r\n {$ifdef DSDebug}\r\n Writeln('About to create field ',FieldDefs.Items[i].Name);\r\n {$endif}\r\n CreateField(self);\r\n end;\r\nend;\r\n\r\nprocedure TDataSet.DataEvent(Event: TDataEvent; Info: JSValue);\r\n\r\n procedure HandleFieldChange(aField: TField);\r\n begin\r\n if aField.FieldKind in [fkData, fkInternalCalc] then\r\n SetModified(True);\r\n \r\n if State <> dsSetKey then begin\r\n if aField.FieldKind = fkData then begin\r\n if FInternalCalcFields then\r\n RefreshInternalCalcFields(FBuffers[FActiveRecord])\r\n else if FAutoCalcFields and (FCalcFieldsCount <> 0) then\r\n CalculateFields(FBuffers[FActiveRecord]);\r\n end;\r\n aField.Change;\r\n end;\r\n end;\r\n \r\n procedure HandleScrollOrChange;\r\n var\r\n A: Integer;\r\n NestedDataSet: TDataSet;\r\n\r\n begin\r\n if State <> dsInsert then\r\n UpdateCursorPos;\r\n\r\n if Assigned(FNestedDataSets) then\r\n for A := 0 to Pred(NestedDataSets.Count) do\r\n begin\r\n NestedDataSet := TDataSet(NestedDataSets[A]);\r\n\r\n if NestedDataSet.Active then\r\n NestedDataSet.DataEvent(deParentScroll, 0);\r\n end;\r\n end;\r\n\r\nvar\r\n i: Integer;\r\nbegin\r\n case Event of\r\n deFieldChange : HandleFieldChange(TField(Info));\r\n deDataSetChange,\r\n deDataSetScroll : HandleScrollOrChange;\r\n deLayoutChange : FEnableControlsEvent:=deLayoutChange;\r\n end;\r\n\r\n if not ControlsDisabled and (FState <> dsBlockRead) then begin\r\n for i := 0 to FDataSources.Count - 1 do\r\n TDataSource(FDataSources[i]).ProcessEvent(Event, Info);\r\n end;\r\nend;\r\n\r\nprocedure TDataSet.DestroyFields;\r\n\r\nbegin\r\n FFieldList.Clear;\r\nend;\r\n\r\nprocedure TDataSet.DoAfterCancel;\r\n\r\nbegin\r\n If assigned(FAfterCancel) then\r\n FAfterCancel(Self);\r\nend;\r\n\r\nprocedure TDataSet.DoAfterClose;\r\n\r\nbegin\r\n If assigned(FAfterClose) and not (csDestroying in ComponentState) then\r\n FAfterClose(Self);\r\nend;\r\n\r\nprocedure TDataSet.DoAfterDelete;\r\n\r\nbegin\r\n If assigned(FAfterDelete) then\r\n FAfterDelete(Self);\r\nend;\r\n\r\nprocedure TDataSet.DoAfterEdit;\r\n\r\nbegin\r\n If assigned(FAfterEdit) then\r\n FAfterEdit(Self);\r\nend;\r\n\r\nprocedure TDataSet.DoAfterInsert;\r\n\r\nbegin\r\n If assigned(FAfterInsert) then\r\n FAfterInsert(Self);\r\nend;\r\n\r\nprocedure TDataSet.DoAfterOpen;\r\n\r\nbegin\r\n If assigned(FAfterOpen) then\r\n FAfterOpen(Self);\r\nend;\r\n\r\nprocedure TDataSet.DoAfterPost;\r\n\r\nbegin\r\n If assigned(FAfterPost) then\r\n FAfterPost(Self);\r\nend;\r\n\r\nprocedure TDataSet.DoAfterScroll;\r\n\r\nbegin\r\n If assigned(FAfterScroll) then\r\n FAfterScroll(Self);\r\nend;\r\n\r\nprocedure TDataSet.DoAfterRefresh;\r\n\r\nbegin\r\n If assigned(FAfterRefresh) then\r\n FAfterRefresh(Self);\r\nend;\r\n\r\nprocedure TDataSet.DoBeforeCancel;\r\n\r\nbegin\r\n If assigned(FBeforeCancel) then\r\n FBeforeCancel(Self);\r\nend;\r\n\r\nprocedure TDataSet.DoBeforeClose;\r\n\r\nbegin\r\n If assigned(FBeforeClose) and not (csDestroying in ComponentState) then\r\n FBeforeClose(Self);\r\nend;\r\n\r\nprocedure TDataSet.DoBeforeDelete;\r\n\r\nbegin\r\n If assigned(FBeforeDelete) then\r\n FBeforeDelete(Self);\r\nend;\r\n\r\nprocedure TDataSet.DoBeforeEdit;\r\n\r\nbegin\r\n If assigned(FBeforeEdit) then\r\n FBeforeEdit(Self);\r\nend;\r\n\r\nprocedure TDataSet.DoBeforeInsert;\r\n\r\nbegin\r\n If assigned(FBeforeInsert) then\r\n FBeforeInsert(Self);\r\nend;\r\n\r\nprocedure TDataSet.DoBeforeOpen;\r\n\r\nbegin\r\n If assigned(FBeforeOpen) then\r\n FBeforeOpen(Self);\r\nend;\r\n\r\nprocedure TDataSet.DoBeforePost;\r\n\r\nbegin\r\n If assigned(FBeforePost) then\r\n FBeforePost(Self);\r\nend;\r\n\r\nprocedure TDataSet.DoBeforeScroll;\r\n\r\nbegin\r\n If assigned(FBeforeScroll) then\r\n FBeforeScroll(Self);\r\nend;\r\n\r\nprocedure TDataSet.DoBeforeRefresh;\r\n\r\nbegin\r\n If assigned(FBeforeRefresh) then\r\n FBeforeRefresh(Self);\r\nend;\r\n\r\nprocedure TDataSet.DoInternalOpen;\r\n\r\nbegin\r\n InternalOpen;\r\n FInternalOpenComplete := True;\r\n{$ifdef dsdebug}\r\n Writeln ('Calling internal open');\r\n{$endif}\r\n{$ifdef dsdebug}\r\n Writeln ('Calling RecalcBufListSize');\r\n{$endif}\r\n FRecordCount := 0;\r\n RecalcBufListSize;\r\n FBOF := True;\r\n FEOF := (FRecordCount = 0);\r\n// if Assigned(DataProxy) then\r\n InitChangeList;\r\nend;\r\n\r\nprocedure TDataSet.DoOnCalcFields;\r\n\r\nbegin\r\n If Assigned(FOnCalcfields) then\r\n FOnCalcFields(Self);\r\nend;\r\n\r\nprocedure TDataSet.DoOnNewRecord;\r\n\r\nbegin\r\n If assigned(FOnNewRecord) then\r\n FOnNewRecord(Self);\r\nend;\r\n\r\nprocedure TDataSet.DoBeforeLoad;\r\nbegin\r\n If Assigned(FBeforeLoad) then\r\n FBeforeLoad(Self);\r\nend;\r\n\r\nprocedure TDataSet.DoAfterLoad;\r\nbegin\r\n if Assigned(FAfterLoad) then\r\n FAfterLoad(Self);\r\nend;\r\n\r\nprocedure TDataSet.DoBeforeApplyUpdates;\r\n\r\nbegin\r\n If Assigned(FBeforeApplyUpdates) then\r\n FBeforeApplyUpdates(Self);\r\nend;\r\n\r\nprocedure TDataSet.DoAfterApplyUpdates(const ResolveInfo: TResolveResults);\r\n\r\nbegin\r\n If Assigned(FAfterApplyUpdates) then\r\n FAfterApplyUpdates(Self,ResolveInfo);\r\nend;\r\n\r\nfunction TDataSet.FieldByNumber(FieldNo: Longint): TField;\r\n\r\nbegin\r\n Result:=FFieldList.FieldByNumber(FieldNo);\r\nend;\r\n\r\nfunction TDataSet.FindRecord(Restart, GoForward: Boolean): Boolean;\r\n\r\nbegin\r\n //!! To be implemented\r\n Result:=false;\r\nend;\r\n\r\n\r\nfunction TDataSet.GetBookmarkStr: TBookmarkStr;\r\n\r\nVar\r\n B : TBookMark;\r\n\r\nbegin\r\n Result:='';\r\n If BookMarkAvailable then\r\n begin\r\n GetBookMarkData(ActiveBuffer,B);\r\n Result:=TJSJSON.stringify(B);\r\n end\r\nend;\r\n\r\nfunction TDataSet.GetBuffer(Index: longint): TDataRecord;\r\n\r\nbegin\r\n Result:=FBuffers[Index];\r\nend;\r\n\r\nfunction TDataSet.DoGetDataProxy: TDataProxy;\r\n\r\nbegin\r\n Result:=nil;\r\nend;\r\n\r\nprocedure TDataSet.InitChangeList;\r\n\r\nbegin\r\n DoneChangeList;\r\n FChangeList:=TFPList.Create;\r\nend;\r\n\r\nprocedure TDataSet.ClearChangeList;\r\n\r\nVar\r\n I : integer;\r\n\r\nbegin\r\n If not Assigned(FChangeList) then\r\n exit;\r\n For I:=0 to FChangeList.Count-1 do\r\n begin\r\n TObject(FChangeList[i]).Destroy;\r\n FChangeList[i]:=Nil;\r\n end;\r\nend;\r\n\r\nprocedure TDataSet.ResetUpdateDescriptors;\r\n\r\nVar\r\n I : Integer;\r\n\r\nbegin\r\n For I:=0 to FChangeList.Count-1 do\r\n TRecordUpdateDescriptor(FChangeList[i]).Reset;\r\nend;\r\n\r\nfunction TDataSet.IndexInChangeList(aBookmark: TBookmark): Integer;\r\n\r\nbegin\r\n Result:=-1;\r\n if Not assigned(FChangeList) then\r\n exit;\r\n Result:=FChangeList.Count-1;\r\n While (Result>=0) and (CompareBookmarks(aBookMark,TRecordUpdateDescriptor(FChangeList[Result]).Bookmark)<>0) do\r\n Dec(Result);\r\nend;\r\n\r\nfunction TDataSet.GetApplyUpdateData(aBuffer : TDataRecord) : JSValue;\r\n\r\nbegin\r\n Result:=aBuffer.Data;\r\nend;\r\n\r\nfunction TDataSet.AddToChangeList(aChange: TUpdateStatus): TRecordUpdateDescriptor;\r\n\r\nVar\r\n B : TBookmark;\r\n I : Integer;\r\n aData : JSValue;\r\n\r\nbegin\r\n Result:=Nil;\r\n if Not Assigned(FChangeList) then\r\n Exit;\r\n B:=GetBookmark;\r\n I:=IndexInChangeList(B);\r\n if (I=-1) then\r\n begin\r\n aData:=GetApplyUpdateData(ActiveBuffer);\r\n if Assigned(DataProxy) then\r\n Result:=DataProxy.GetUpdateDescriptor(Self,B,aData,aChange)\r\n else\r\n Result:=TRecordUpdateDescriptor.Create(Nil,Self,B,aData,aChange);\r\n FChangeList.Add(Result);\r\n end\r\n else\r\n begin\r\n Result:=TRecordUpdateDescriptor(FChangeList[i]);\r\n Case aChange of\r\n usDeleted :\r\n begin\r\n if Result.FStatus = usInserted then\r\n FChangeList.Delete(I)\r\n else\r\n Result.FStatus:=usDeleted;\r\n end;\r\n usInserted : DatabaseError(SErrInsertingSameRecordtwice,Self);\r\n usModified : Result.FData:=GetApplyUpdateData(ActiveBuffer);\r\n end\r\n end;\r\nend;\r\n\r\nprocedure TDataSet.RemoveFromChangeList(R: TRecordUpdateDescriptor);\r\n\r\nbegin\r\n if Not (Assigned(R) and Assigned(FChangeList)) then\r\n Exit;\r\nend;\r\n\r\nfunction TDataSet.GetRecordUpdates(AList: TRecordUpdateDescriptorList): Integer;\r\n\r\nVar\r\n I,MinIndex : integer;\r\n\r\nbegin\r\n MinIndex:=0; // Check batch list for minimal index ?\r\n For I:=MinIndex to FChangeList.Count-1 do\r\n if TRecordUpdateDescriptor(FChangeList[i]).ResolveStatus=rsUnResolved then\r\n Alist.Add(FChangeList[i]);\r\n Result:=FChangeList.Count;\r\nend;\r\n\r\nfunction TDataSet.ResolveRecordUpdate(anUpdate: TRecordUpdateDescriptor): Boolean;\r\n\r\n// This must return true if the record may be removed from the list of 'modified' records.\r\n// If it returns false, the record is kept in the list of modified records.\r\n\r\nbegin\r\n try\r\n Result:=DoResolveRecordUpdate(anUpdate);\r\n If not Result then\r\n anUpdate.SetResolveStatus(rsResolveFailed);\r\n except\r\n On E : Exception do\r\n begin\r\n anUpdate.ResolveFailed(E.Classname+': '+E.Message);\r\n Result:=False;\r\n end;\r\n end;\r\n DoOnRecordResolved(anUpdate);\r\nend;\r\n\r\nfunction TDataSet.RecordUpdateDescriptorToResolveInfo(anUpdate: TRecordUpdateDescriptor): TResolveInfo;\r\n\r\nbegin\r\n Result.BookMark:=anUpdate.Bookmark;\r\n Result.Data:=anUpdate.Data;\r\n Result.Status:=anUpdate.Status;\r\n Result.ResolveStatus:=anUpdate.ResolveStatus;\r\n Result.Error:=anUpdate.ResolveError;\r\nend;\r\n\r\nprocedure TDataSet.DoOnRecordResolved(anUpdate: TRecordUpdateDescriptor) ;\r\n\r\nVar\r\n Info : TResolveInfo;\r\n\r\nbegin\r\n if Not Assigned(OnRecordResolved) then exit;\r\n Info:=RecordUpdateDescriptorToResolveInfo(anUpdate);\r\n OnRecordResolved(Self,Info);\r\nend;\r\n\r\nprocedure TDataSet.ResolveUpdateBatch(Sender: TObject; aBatch : TRecordUpdateBatch);\r\n\r\nVar\r\n BI,RI,Idx: integer;\r\n RUD : TRecordUpdateDescriptor;\r\n doRemove : Boolean;\r\n Results : TResolveResults;\r\n\r\nbegin\r\n if Assigned(FBatchList) and (aBatch.Dataset=Self) then\r\n BI:=FBatchList.IndexOf(aBatch)\r\n else\r\n BI:=-1;\r\n if (BI=-1) then\r\n Exit;\r\n FBatchList.Delete(Bi);\r\n SetLength(Results.Records, aBatch.List.Count);\r\n For RI:=0 to aBatch.List.Count-1 do\r\n begin\r\n RUD:=aBatch.List[RI];\r\n Results.Records[RI]:=RecordUpdateDescriptorToResolveInfo(RUD);\r\n aBatch.List.Items[RI]:=Nil;\r\n Idx:=IndexInChangeList(RUD.Bookmark);\r\n if (Idx<>-1) then\r\n begin\r\n doRemove:=False;\r\n if (RUD.ResolveStatus=rsResolved) then\r\n DoRemove:=ResolveRecordUpdate(RUD)\r\n else\r\n // What if not resolvable.. ?\r\n DoRemove:=(RUD.ResolveStatus=rsResolved);\r\n If DoRemove then\r\n begin\r\n RUD.Free;\r\n FChangeList.Delete(Idx);\r\n end\r\n else\r\n RUD.Reset; // So we try it again in next applyupdates.\r\n end;\r\n end;\r\n if (FBatchList.Count=0) then\r\n FreeAndNil(FBatchList);\r\n DoAfterApplyUpdates(Results);\r\nend;\r\n\r\nprocedure TDataSet.DoApplyUpdates;\r\n\r\nVar\r\n B : TRecordUpdateBatch;\r\n l : TRecordUpdateDescriptorList;\r\n I : integer;\r\n\r\nbegin\r\n if Not Assigned(DataProxy) then\r\n DatabaseError(SErrDoApplyUpdatesNeedsProxy,Self);\r\n if FInApplyupdates then\r\n exit;\r\n try\r\n FInApplyupdates:=True;\r\n if Not (Assigned(FChangeList) and (FChangeList.Count>0)) then\r\n Exit;\r\n L:=TRecordUpdateDescriptorList.Create;\r\n try\r\n I:=GetRecordUpdates(L);\r\n except\r\n L.Free;\r\n Raise;\r\n end;\r\n Inc(FUpdateBatchID);\r\n For I:=0 to L.Count-1 do\r\n TRecordUpdateDescriptor(L[i]).SetResolveStatus(rsResolving);\r\n B:=DataProxy.GetRecordUpdateBatch(FUpdateBatchID,L,True);\r\n B.FDataset:=Self;\r\n B.FLastChangeIndex:=I;\r\n B.OnResolve:=@ResolveUpdateBatch;\r\n If not Assigned(FBatchlist) then\r\n FBatchlist:=TFPList.Create;\r\n FBatchList.Add(B);\r\n DataProxy.ProcessUpdateBatch(B);\r\n Finally\r\n FInApplyupdates:=False;\r\n end;\r\nend;\r\n\r\nprocedure TDataSet.DoneChangeList;\r\n\r\nbegin\r\n ClearChangeList;\r\n FreeAndNil(FChangeList);\r\nend;\r\n\r\nfunction TDataSet.GetDataProxy: TDataProxy;\r\n\r\nbegin\r\n If (FDataProxy=Nil) then\r\n DataProxy:=DoGetDataProxy;\r\n Result:=FDataProxy;\r\nend;\r\n\r\nfunction TDataSet.GetIsLoading: Boolean;\r\nbegin\r\n// Writeln(Name,' GetIsLoading Loadcount : ',LoadCount);\r\n Result:=(FLoadCount>0);\r\nend;\r\n\r\nfunction TDataSet.DataPacketReceived(ARequest: TDataRequest): Boolean;\r\n\r\nbegin\r\n Result:=False;\r\nend;\r\n\r\nprocedure TDataSet.HandleRequestResponse(ARequest: TDataRequest);\r\n\r\nVar\r\n DataAdded : Boolean;\r\n\r\nbegin\r\n if Not Assigned(ARequest) then\r\n exit;\r\n// Writeln(Name,' Check request response: ',ARequest.FRequestID,', min: ',FMinLoadID,' Loadcount:',FLoadCount);\r\n if ARequest.FRequestID<=FMinLoadID then\r\n begin\r\n ARequest.Destroy;\r\n Exit;\r\n end;\r\n Dec(FloadCount);\r\n// Writeln(Name,' Handle request response: ',ARequest.FRequestID,', min: ',FMinLoadID,' Loadcount:',FLoadCount);\r\n Case ARequest.Success of\r\n rrFail:\r\n begin\r\n if Assigned(FOnLoadFail) then\r\n FOnLoadFail(Self,aRequest.RequestID,aRequest.ErrorMsg);\r\n end;\r\n rrEOF,\r\n rrOK :\r\n begin\r\n DataAdded:=False;\r\n // Notify caller\r\n if Assigned(ARequest.Event) then\r\n ARequest.Event(Self,aRequest.Data);\r\n // allow descendent to integrate data.\r\n // Must be done before user is notified or dataset is opened...\r\n if (ARequest.Success<>rrEOF) then\r\n DataAdded:=DataPacketReceived(aRequest);\r\n // Open if needed.\r\n if Not (Active or (loNoOpen in aRequest.LoadOptions)) then\r\n begin\r\n // Notify user\r\n if not (loNoEvents in aRequest.LoadOptions) then\r\n DoAfterLoad;\r\n Open\r\n end\r\n else\r\n begin\r\n if (loAtEOF in aRequest.LoadOptions) and DataAdded then\r\n FEOF:=False;\r\n if not (loNoEvents in aRequest.LoadOptions) then\r\n DoAfterLoad;\r\n end;\r\n end;\r\n end;\r\n aRequest.Destroy;\r\nend;\r\n\r\nfunction TDataSet.DoResolveRecordUpdate(anUpdate: TRecordUpdateDescriptor): Boolean;\r\nbegin\r\n Result:=True;\r\nend;\r\n\r\nprocedure TDataSet.GetCalcFields(var Buffer: TDataRecord);\r\nvar\r\n OldState: TDatasetState;\r\nbegin\r\n if (FCalcFieldsCount > 0) or FInternalCalcFields then\r\n begin\r\n OldState := FState;\r\n FState := dsCalcFields;\r\n try\r\n CalculateFields(Buffer);\r\n finally\r\n FState := OldState;\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TDataSet.GetCanModify: Boolean;\r\n\r\nbegin\r\n Result:= not FIsUnidirectional;\r\nend;\r\n\r\nprocedure TDataSet.GetChildren(Proc: TGetChildProc; Root: TComponent);\r\n\r\nvar\r\n I: Integer;\r\n Field: TField;\r\n\r\nbegin\r\n for I := 0 to Fields.Count - 1 do begin\r\n Field := Fields[I];\r\n if (Field.Owner = Root) then\r\n Proc(Field);\r\n end;\r\nend;\r\n\r\nfunction TDataSet.GetDataSource: TDataSource;\r\nbegin\r\n Result:=nil;\r\nend;\r\n\r\nfunction TDataSet.GetRecordSize: Word;\r\nbegin\r\n Result := 0;\r\nend;\r\n\r\nprocedure TDataSet.InternalAddRecord(Buffer: Pointer; AAppend: Boolean);\r\nbegin\r\n // empty stub\r\nend;\r\n\r\nprocedure TDataSet.InternalDelete;\r\nbegin\r\n // empty stub\r\nend;\r\n\r\nprocedure TDataSet.InternalFirst;\r\nbegin\r\n // empty stub\r\nend;\r\n\r\nprocedure TDataSet.InternalGotoBookmark(ABookmark: TBookmark);\r\nbegin\r\n // empty stub\r\nend;\r\n\r\nprocedure TDataSet.SetDataSetField(const Value: TDataSetField);\r\nbegin\r\n if Value = FDataSetField then\r\n exit;\r\n if (Value <> nil) and ((Value.DataSet = Self) or\r\n ((Value.DataSet.GetDataSource <> nil) and\r\n (Value.DataSet.GetDataSource.DataSet = Self))) then\r\n DatabaseError(SCircularDataLink, Self);\r\n if Assigned(Value) and not InheritsFrom(Value.DataSet.FNestedDataSetClass) then\r\n DatabaseErrorFmt(SNestedDataSetClass, [Value.DataSet.FNestedDataSetClass.ClassName], Self);\r\n if Active then\r\n Close;\r\n if Assigned(FDataSetField) then\r\n FDataSetField.AssignNestedDataSet(nil);\r\n FDataSetField := Value;\r\n if Assigned(Value) then\r\n begin\r\n Value.AssignNestedDataSet(Self);\r\n if Value.DataSet.Active then\r\n Open;\r\n end;\r\nend;\r\n\r\nfunction TDataSet.GetNestedDataSets: TNestedDataSetsList;\r\nbegin\r\n if not Assigned(FNestedDataSets) then\r\n FNestedDataSets := TNestedDataSetsList.Create;\r\n Result := FNestedDataSets;\r\nend;\r\n\r\nfunction TDataSet.GetBOF: boolean;\r\nbegin\r\n Result := FBOF;\r\nend;\r\n\r\nfunction TDataSet.GetEOF: boolean;\r\nbegin\r\n Result := FEOF;\r\nend;\r\n\r\nfunction TDataSet.GetFieldData(Field: TField; Buffer: TDatarecord): JSValue;\r\n\r\nbegin\r\n Result:=TJSObject(buffer.data).Properties[Field.FieldName];\r\n if isUndefined(Result) then\r\n Result:=Null;\r\nend;\r\n\r\n\r\nprocedure TDataSet.SetFieldData(Field: TField; var Buffer: TDatarecord; AValue: JSValue);\r\n\r\nbegin\r\n TJSObject(buffer.data).Properties[Field.FieldName]:=AValue;\r\nend;\r\n\r\n\r\nfunction TDataSet.GetFieldClass(FieldType: TFieldType): TFieldClass;\r\n\r\nbegin\r\n Result := DefaultFieldClasses[FieldType];\r\nend;\r\n\r\nfunction TDataSet.GetIsIndexField(Field: TField): Boolean;\r\n\r\nbegin\r\n Result:=False;\r\nend;\r\n\r\nfunction TDataSet.GetIndexDefs(IndexDefs: TIndexDefs; IndexTypes: TIndexOptions\r\n ): TIndexDefs;\r\n\r\nvar i,f : integer;\r\n IndexFields : TStrings;\r\n\r\nbegin\r\n IndexDefs.Update;\r\n Result := TIndexDefs.Create(Self);\r\n Result.Assign(IndexDefs);\r\n i := 0;\r\n IndexFields := TStringList.Create;\r\n while i < result.Count do\r\n begin\r\n if (not ((IndexTypes = []) and (result[i].Options = []))) and\r\n ((IndexTypes * result[i].Options) = []) then\r\n begin\r\n result.Delete(i);\r\n dec(i);\r\n end\r\n else\r\n begin\r\n// ExtractStrings([';'],[' '],result[i].Fields,Indexfields);\r\n for f := 0 to IndexFields.Count-1 do\r\n if FindField(Indexfields[f]) = nil then\r\n begin\r\n result.Delete(i);\r\n dec(i);\r\n break;\r\n end;\r\n end;\r\n inc(i);\r\n end;\r\n IndexFields.Free;\r\nend;\r\n\r\nfunction TDataSet.GetNextRecord: Boolean;\r\n\r\nVar\r\n T : TDataRecord;\r\n\r\nbegin\r\n{$ifdef dsdebug}\r\n Writeln ('Getting next record. Internal RecordCount : ',FRecordCount);\r\n Writeln ('Getting next record. Internal buffercount : ',FBufferCount);\r\n{$endif}\r\n If FRecordCount>0 Then\r\n SetCurrentRecord(FRecordCount-1);\r\n Result:=GetRecord(FBuffers[FBufferCount],gmNext,True)=grOK;\r\n if Result then\r\n begin\r\n If FRecordCount=0 then ActivateBuffers;\r\n if FRecordCount=FBufferCount then\r\n ShiftBuffersBackward\r\n else\r\n begin\r\n Inc(FRecordCount);\r\n FCurrentRecord:=FRecordCount - 1;\r\n T:=FBuffers[FCurrentRecord];\r\n FBuffers[FCurrentRecord]:=FBuffers[FBufferCount];\r\n FBuffers[FBufferCount]:=T;\r\n end;\r\n end\r\n else\r\n CursorPosChanged;\r\n{$ifdef dsdebug}\r\n Writeln ('Result getting next record : ',Result);\r\n{$endif}\r\nend;\r\n\r\nfunction TDataSet.GetNextRecords: Longint;\r\n\r\nbegin\r\n Result:=0;\r\n{$ifdef dsdebug}\r\n Writeln ('Getting next record(s), need :',FBufferCount);\r\n{$endif}\r\n While (FRecordCount0 Then SetCurrentRecord(0);\r\n Result:=GetRecord(FBuffers[FBufferCount],gmPrior,True)=grOK;\r\n if Result then\r\n begin\r\n If FRecordCount=0 then ActivateBuffers;\r\n ShiftBuffersForward;\r\n\r\n if FRecordCount 0 then\r\n begin\r\n CheckActive; \r\n SetState(dsBlockRead);\r\n end\t\r\n else\r\n begin\r\n //update state only when in dsBlockRead \r\n if FState = dsBlockRead then\r\n SetState(dsBrowse);\r\n end;\t\r\nend;\r\n\r\nprocedure TDataSet.SetFieldDefs(AFieldDefs: TFieldDefs);\r\n\r\nbegin\r\n Fields.ClearFieldDefs;\r\n FFieldDefs.Assign(AFieldDefs);\r\nend;\r\n\r\nprocedure TDataSet.DoInsertAppendRecord(const Values: array of jsValue; DoAppend: boolean);\r\nvar i : integer;\r\n ValuesSize : integer;\r\nbegin\r\n ValuesSize:=Length(Values);\r\n if ValuesSize>FieldCount then DatabaseError(STooManyFields,self);\r\n if DoAppend then\r\n Append\r\n else\r\n Insert;\r\n for i := 0 to ValuesSize-1 do\r\n Fields[i].AssignValue(Values[i]);\r\n Post;\r\nend;\r\n\r\nprocedure TDataSet.InitFieldDefsFromfields;\r\nvar i : integer;\r\n\r\nbegin\r\n if FieldDefs.Count = 0 then\r\n begin\r\n FieldDefs.BeginUpdate;\r\n try\r\n for i := 0 to Fields.Count-1 do with Fields[i] do\r\n if not (FieldKind in [fkCalculated,fkLookup]) then // Do not add fielddefs for calculated/lookup fields.\r\n begin\r\n FFieldDef:=FieldDefs.FieldDefClass.Create(FieldDefs,FieldName,DataType,Size,Required,FieldDefs.Count+1);\r\n with FFieldDef do\r\n begin\r\n if Required then Attributes := Attributes + [faRequired];\r\n if ReadOnly then Attributes := Attributes + [faReadOnly];\r\n end;\r\n end;\r\n finally\r\n FieldDefs.EndUpdate;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TDataSet.InitRecord(var Buffer: TDataRecord);\r\n\r\nbegin\r\n InternalInitRecord(Buffer);\r\n ClearCalcFields(Buffer);\r\nend;\r\n\r\nprocedure TDataSet.InternalCancel;\r\n\r\nbegin\r\n //!! To be implemented\r\nend;\r\n\r\nprocedure TDataSet.InternalEdit;\r\n\r\nbegin\r\n //!! To be implemented\r\nend;\r\n\r\nprocedure TDataSet.InternalRefresh;\r\n\r\nbegin\r\n //!! To be implemented\r\nend;\r\n\r\nprocedure TDataSet.OpenCursor(InfoQuery: Boolean);\r\n\r\nbegin\r\n if InfoQuery then\r\n InternalInitFieldDefs\r\n else if State <> dsOpening then\r\n DoInternalOpen;\r\nend;\r\n\r\nprocedure TDataSet.OpenCursorcomplete;\r\nbegin\r\n try\r\n if FState = dsOpening then DoInternalOpen\r\n finally\r\n if FInternalOpenComplete then\r\n begin\r\n SetState(dsBrowse);\r\n DoAfterOpen;\r\n if not IsEmpty then\r\n DoAfterScroll;\r\n end\r\n else\r\n begin\r\n SetState(dsInactive);\r\n CloseCursor;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TDataSet.RefreshInternalCalcFields(var Buffer: TDataRecord);\r\n\r\nbegin\r\n //!! To be implemented\r\nend;\r\n\r\nfunction TDataSet.SetTempState(const Value: TDataSetState): TDataSetState;\r\n\r\nbegin\r\n result := FState;\r\n FState := value;\r\n inc(FDisableControlsCount);\r\nend;\r\n\r\nprocedure TDataSet.RestoreState(const Value: TDataSetState);\r\n\r\nbegin\r\n FState := value;\r\n dec(FDisableControlsCount);\r\nend;\r\n\r\nfunction TDataSet.GetActive: boolean;\r\n\r\nbegin\r\n result := (FState <> dsInactive) and (FState <> dsOpening);\r\nend;\r\n\r\nprocedure TDataSet.InternalHandleException(E :Exception);\r\n\r\nbegin\r\n ShowException(E,Nil);\r\nend;\r\n\r\nprocedure TDataSet.InternalInitRecord(var Buffer: TDataRecord);\r\nbegin\r\n // empty stub\r\nend;\r\n\r\nprocedure TDataSet.InternalLast;\r\nbegin\r\n // empty stub\r\nend;\r\n\r\nprocedure TDataSet.InternalPost;\r\n\r\n Procedure CheckRequiredFields;\r\n\r\n Var I : longint;\r\n\r\n begin\r\n For I:=0 to FFieldList.Count-1 do\r\n With FFieldList[i] do\r\n // Required fields that are NOT autoinc !! Autoinc cannot be set !!\r\n if Required and not ReadOnly and\r\n (FieldKind=fkData) and Not (DataType=ftAutoInc) and IsNull then\r\n DatabaseErrorFmt(SNeedField,[DisplayName],Self);\r\n end;\r\n\r\nbegin\r\n CheckRequiredFields;\r\nend;\r\n\r\nprocedure TDataSet.InternalSetToRecord(Buffer: TDataRecord);\r\nbegin\r\n // empty stub\r\nend;\r\n\r\nprocedure TDataSet.SetBookmarkFlag(var Buffer: TDataRecord; Value: TBookmarkFlag);\r\nbegin\r\n // empty stub\r\nend;\r\n\r\nprocedure TDataSet.SetBookmarkData(var Buffer: TDataRecord; Data: TBookmark);\r\nbegin\r\n // empty stub\r\nend;\r\n\r\nprocedure TDataSet.SetUniDirectional(const Value: Boolean);\r\nbegin\r\n FIsUniDirectional := Value;\r\nend;\r\n\r\nprocedure TDataSet.Notification(AComponent: TComponent; Operation: TOperation);\r\nbegin\r\n inherited Notification(AComponent, Operation);\r\n if (Operation=opRemove) and (AComponent=FDataProxy) then\r\n FDataProxy:=Nil;\r\nend;\r\n\r\nclass function TDataSet.FieldDefsClass: TFieldDefsClass;\r\nbegin\r\n Result:=TFieldDefs;\r\nend;\r\n\r\nclass function TDataSet.FieldsClass: TFieldsClass;\r\nbegin\r\n Result:=TFields;\r\nend;\r\n\r\nprocedure TDataSet.SetActive(Value: Boolean);\r\n\r\nbegin\r\n if value and (Fstate = dsInactive) then\r\n begin\r\n if csLoading in ComponentState then\r\n begin\r\n FOpenAfterRead := true;\r\n exit;\r\n end\r\n else\r\n begin\r\n DoBeforeOpen;\r\n FEnableControlsEvent:=deLayoutChange;\r\n FInternalCalcFields:=False;\r\n try\r\n FDefaultFields:=FieldCount=0;\r\n OpenCursor(False);\r\n finally\r\n if FState <> dsOpening then OpenCursorComplete;\r\n end;\r\n end;\r\n FModified:=False;\r\n end\r\n else if not value and (Fstate <> dsinactive) then\r\n begin\r\n DoBeforeClose;\r\n SetState(dsInactive);\r\n FDataRequestID:=0;\r\n DoneChangeList;\r\n CloseCursor;\r\n DoAfterClose;\r\n FModified:=False;\r\n end\r\nend;\r\n\r\nprocedure TDataSet.Loaded;\r\n\r\nbegin\r\n inherited;\r\n try\r\n if FOpenAfterRead then SetActive(true);\r\n except\r\n on E : Exception do\r\n if csDesigning in Componentstate then\r\n InternalHandleException(E);\r\n else\r\n raise;\r\n end;\r\nend;\r\n\r\n\r\nprocedure TDataSet.RecalcBufListSize;\r\n\r\nvar\r\n i, j, ABufferCount: Integer;\r\n DataLink: TDataLink;\r\n\r\nbegin\r\n{$ifdef dsdebug}\r\n Writeln('Recalculating buffer list size - check cursor');\r\n{$endif}\r\n If Not IsCursorOpen Then\r\n Exit;\r\n{$ifdef dsdebug}\r\n Writeln('Recalculating buffer list size');\r\n{$endif}\r\n if IsUniDirectional then\r\n ABufferCount := 1\r\n else\r\n ABufferCount := DefaultBufferCount;\r\n{$ifdef dsdebug}\r\n Writeln('Recalculating buffer list size, start count: ',ABufferCount);\r\n{$endif}\r\n for i := 0 to FDataSources.Count - 1 do\r\n for j := 0 to TDataSource(FDataSources[i]).DataLinks.Count - 1 do\r\n begin\r\n DataLink:=TDataLink(TDataSource(FDataSources[i]).DataLinks[j]);\r\n if ABufferCountFBufferCount then\r\n begin\r\n SetLength(FBuffers,Value+1); // FBuffers[FBufferCount] is used as a temp buffer\r\n For I:=FBufferCount to Value do\r\n FBuffers[i]:=AllocRecordBuffer;\r\n end\r\n else if value=0) and (FActiveRecord>Value-1) then\r\n begin\r\n for i := 0 to (FActiveRecord-Value) do\r\n ShiftBuffersBackward;\r\n FActiveRecord := Value -1;\r\n end;\r\n SetLength(FBuffers,Value+1); // FBuffers[FBufferCount] is used as a temp buffer\r\n FBufferCount:=Value;\r\n if FRecordCount > FBufferCount then\r\n FRecordCount := FBufferCount;\r\n\r\nend;\r\n\r\nprocedure TDataSet.SetChildOrder(Child: TComponent; Order: Longint);\r\n\r\nvar\r\n Field: TField;\r\nbegin\r\n Field := Child as TField;\r\n if Fields.IndexOf(Field) >= 0 then\r\n Field.Index := Order;\r\nend;\r\n\r\nprocedure TDataSet.SetCurrentRecord(Index: Longint);\r\n\r\nbegin\r\n If FCurrentRecord<>Index then\r\n begin\r\n{$ifdef DSdebug}\r\n Writeln ('Setting current record to: ',index);\r\n{$endif}\r\n if not FIsUniDirectional then Case GetBookMarkFlag(FBuffers[Index]) of\r\n bfCurrent : InternalSetToRecord(FBuffers[Index]);\r\n bfBOF : InternalFirst;\r\n bfEOF : InternalLast;\r\n end;\r\n FCurrentRecord:=Index;\r\n end;\r\nend;\r\n\r\nprocedure TDataSet.SetDefaultFields(const Value: Boolean);\r\nbegin\r\n FDefaultFields := Value;\r\nend;\r\n\r\nprocedure TDataSet.CheckBiDirectional;\r\n\r\nbegin\r\n if FIsUniDirectional then DataBaseError(SUniDirectional,Self);\r\nend;\r\n\r\nprocedure TDataSet.SetFilterOptions(Value: TFilterOptions);\r\n\r\nbegin\r\n CheckBiDirectional;\r\n FFilterOptions := Value;\r\nend;\r\n\r\nprocedure TDataSet.SetFilterText(const Value: string);\r\n\r\nbegin\r\n FFilterText := value;\r\nend;\r\n\r\nprocedure TDataSet.SetFiltered(Value: Boolean);\r\n\r\nbegin\r\n if Value then CheckBiDirectional;\r\n FFiltered := value;\r\nend;\r\n\r\nprocedure TDataSet.SetFound(const Value: Boolean);\r\nbegin\r\n FFound := Value;\r\nend;\r\n\r\nprocedure TDataSet.SetModified(Value: Boolean);\r\n\r\nbegin\r\n FModified := value;\r\nend;\r\n\r\nprocedure TDataSet.SetName(const NewName: TComponentName);\r\n\r\n function CheckName(const FieldName: string): string;\r\n var i,j: integer;\r\n begin\r\n Result := FieldName;\r\n i := 0;\r\n j := 0;\r\n while (i < Fields.Count) do begin\r\n if Result = Fields[i].FieldName then begin\r\n inc(j);\r\n Result := FieldName + IntToStr(j);\r\n end else Inc(i);\r\n end;\r\n end;\r\n\r\nvar\r\n i: integer;\r\n nm: string;\r\n old: string;\r\n\r\nbegin\r\n if Self.Name = NewName then Exit;\r\n old := Self.Name;\r\n inherited SetName(NewName);\r\n if (csDesigning in ComponentState) then\r\n for i := 0 to Fields.Count - 1 do begin\r\n nm := old + Fields[i].FieldName;\r\n if Copy(Fields[i].Name, 1, Length(nm)) = nm then\r\n Fields[i].Name := CheckName(NewName + Fields[i].FieldName);\r\n end;\r\nend;\r\n\r\nprocedure TDataSet.SetOnFilterRecord(const Value: TFilterRecordEvent);\r\n\r\nbegin\r\n CheckBiDirectional;\r\n FOnFilterRecord := Value;\r\nend;\r\n\r\nprocedure TDataSet.SetRecNo(Value: Longint);\r\n\r\nbegin\r\n //!! To be implemented\r\nend;\r\n\r\nprocedure TDataSet.SetState(Value: TDataSetState);\r\n\r\nbegin\r\n If Value<>FState then\r\n begin\r\n FState:=Value;\r\n if Value=dsBrowse then\r\n FModified:=false;\r\n DataEvent(deUpdateState,0);\r\n end;\r\nend;\r\n\r\nfunction TDataSet.TempBuffer: TDataRecord;\r\n\r\nbegin\r\n Result := FBuffers[FRecordCount];\r\nend;\r\n\r\nprocedure TDataSet.UpdateIndexDefs;\r\n\r\nbegin\r\n // Empty Abstract\r\nend;\r\n\r\nfunction TDataSet.AllocRecordBuffer: TDataRecord;\r\nbegin\r\n Result.data:=Null;\r\n Result.state:=rsNew;\r\n// Result := nil;\r\nend;\r\n\r\nprocedure TDataSet.FreeRecordBuffer(var Buffer: TDataRecord);\r\nbegin\r\n // empty stub\r\nend;\r\n\r\nprocedure TDataSet.GetBookmarkData(Buffer: TDataRecord; var Data: TBookmark);\r\nbegin\r\n\r\nend;\r\n\r\n\r\nfunction TDataSet.GetBookmarkFlag(Buffer: TDataRecord): TBookmarkFlag;\r\nbegin\r\n Result := bfCurrent;\r\nend;\r\n\r\nfunction TDataSet.ControlsDisabled: Boolean;\r\n\r\nbegin\r\n Result := (FDisableControlsCount > 0);\r\nend;\r\n\r\nfunction TDataSet.ActiveBuffer: TDataRecord;\r\n\r\nbegin\r\n{$ifdef dsdebug}\r\n Writeln ('Active buffer requested. Returning record number: ',ActiveRecord);\r\n{$endif}\r\n if FactiveRecord<>-1 then\r\n Result:=FBuffers[FActiveRecord]\r\n else\r\n Result:=Default(TDataRecord);\r\nend;\r\n\r\nfunction TDataSet.GetFieldData(Field: TField): JSValue;\r\nbegin\r\n Result:=GetFieldData(Field,ActiveBuffer);\r\nend;\r\n\r\nprocedure TDataSet.SetFieldData(Field: TField; AValue: JSValue);\r\nbegin\r\n SetFieldData(Field,FBuffers[FActiveRecord],AValue);\r\nend;\r\n\r\nprocedure TDataSet.Append;\r\n\r\nbegin\r\n DoInsertAppend(True);\r\nend;\r\n\r\nprocedure TDataSet.InternalInsert;\r\n\r\nbegin\r\n //!! To be implemented\r\nend;\r\n\r\nprocedure TDataSet.AppendRecord(const Values: array of jsValue);\r\n\r\nbegin\r\n DoInsertAppendRecord(Values,True);\r\nend;\r\n\r\nfunction TDataSet.GetClonedDataSet(WithSettings: Boolean): TDataSet;\r\nbegin\r\n Result := nil;\r\nend;\r\n\r\nfunction TDataSet.BookmarkValid(ABookmark: TBookmark): Boolean;\r\n{\r\n Should be overridden by descendant objects.\r\n}\r\nbegin\r\n Result:=False\r\nend;\r\n\r\n\r\n\r\nfunction TDataSet.ConvertToDateTime(aField: TField; aValue: JSValue; ARaiseException: Boolean): TDateTime;\r\nbegin\r\n Result:=DefaultConvertToDateTime(aField,aValue,ARaiseException);\r\nend;\r\n\r\nclass function TDataSet.DefaultConvertToDateTime(aField: TField; aValue: JSValue; ARaiseException: Boolean): TDateTime;\r\nbegin\r\n Result:=0;\r\n if IsString(aValue) then\r\n begin\r\n if not TryRFC3339ToDateTime(String(AValue),Result) then\r\n Raise EConvertError.CreateFmt(SErrInvalidDateTime,[String(aValue)])\r\n end\r\n else if IsNumber(aValue) then\r\n Result:=TDateTime(AValue)\r\n else if IsDate(aValue) then\r\n Result := JSDateToDateTime(TJSDate(aValue));\r\nend;\r\n\r\nfunction TDataSet.ConvertDateTimeToNative(aField: TField; aValue : TDateTime) : JSValue;\r\n\r\nbegin\r\n Result:=DefaultConvertDateTimeToNative(aField, aValue);\r\nend;\r\n\r\nclass function TDataSet.DefaultConvertDateTimeToNative(aField: TField; aValue: TDateTime): JSValue;\r\n\r\nbegin\r\n Result:=DateTimeToRFC3339(aValue);\r\nend;\r\n\r\nfunction TDataSet.BlobDataToBytes(aValue: JSValue): TBytes;\r\nbegin\r\n Result:=DefaultBlobDataToBytes(aValue);\r\nend;\r\n\r\nclass function TDataSet.DefaultBlobDataToBytes(aValue: JSValue): TBytes;\r\n\r\nVar\r\n S : String;\r\n I,J,L : Integer;\r\nbegin\r\n SetLength(Result,0);\r\n // We assume a string, hex-encoded.\r\n if isString(AValue) then\r\n begin\r\n S:=String(Avalue);\r\n L:=Length(S);\r\n SetLength(Result,(L+1) div 2);\r\n I:=1;\r\n J:=0;\r\n While (I dsSetKey then\r\n GetCalcFields(FBuffers[FActiveRecord]);\r\n DataEvent(deRecordChange, 0);\r\nend;\r\n\r\nprocedure TDataSet.Close;\r\n\r\nbegin\r\n Active:=False;\r\nend;\r\n\r\nfunction TDataSet.GetUpdateCount(UnresolvedOnly: Boolean): Integer;\r\n\r\nVar\r\n I : Integer;\r\n\r\nbegin\r\n Result:=0;\r\n if Not Assigned(FChangeList) then\r\n exit;\r\n If Not UnresolvedOnly then\r\n Result:=FChangeList.Count\r\n else\r\n For I:=0 to FChangeList.Count-1 do\r\n if TRecordUpdateDescriptor(FChangeList[i]).ResolveStatus=rsUnresolved then\r\n Inc(Result);\r\nend;\r\n\r\nprocedure TDataSet.ApplyUpdates;\r\nbegin\r\n DoBeforeApplyUpdates;\r\n DoApplyUpdates;\r\nend;\r\n\r\nfunction TDataSet.CompareBookmarks(Bookmark1, Bookmark2: TBookmark): Longint;\r\n\r\nbegin\r\n Result:=0;\r\nend;\r\n\r\nprocedure TDataSet.CursorPosChanged;\r\n\r\n\r\nbegin\r\n FCurrentRecord:=-1;\r\nend;\r\n\r\nprocedure TDataSet.Delete;\r\n\r\nVar\r\n R : TRecordUpdateDescriptor;\r\n\r\nbegin\r\n If Not CanModify then\r\n DatabaseError(SDatasetReadOnly,Self);\r\n If IsEmpty then\r\n DatabaseError(SDatasetEmpty,Self);\r\n if State in [dsInsert] then\r\n begin\r\n Cancel;\r\n end else begin\r\n DataEvent(deCheckBrowseMode,0);\r\n{$ifdef dsdebug}\r\n writeln ('Delete: checking required fields');\r\n{$endif}\r\n DoBeforeDelete;\r\n DoBeforeScroll;\r\n R:=AddToChangeList(usDeleted);\r\n If Not TryDoing(@InternalDelete,OnDeleteError) then\r\n begin\r\n if Assigned(R) then\r\n RemoveFromChangeList(R);\r\n exit;\r\n end;\r\n{$ifdef dsdebug}\r\n writeln ('Delete: Internaldelete succeeded');\r\n{$endif}\r\n SetState(dsBrowse);\r\n{$ifdef dsdebug}\r\n writeln ('Delete: Browse mode set');\r\n{$endif}\r\n SetCurrentRecord(FActiveRecord);\r\n Resync([]);\r\n DoAfterDelete;\r\n DoAfterScroll;\r\n end;\r\nend;\r\n\r\nprocedure TDataSet.DisableControls;\r\n\r\n\r\nbegin\r\n If FDisableControlsCount=0 then\r\n begin\r\n { Save current state,\r\n needed to detect change of state when enabling controls.\r\n }\r\n FDisableControlsState:=FState;\r\n FEnableControlsEvent:=deDatasetChange;\r\n end;\r\n Inc(FDisableControlsCount);\r\nend;\r\n\r\nprocedure TDataSet.DoInsertAppend(DoAppend: Boolean);\r\n\r\n\r\n procedure DoInsert(DoAppend : Boolean);\r\n\r\n Var\r\n BookBeforeInsert : TBookmark;\r\n TempBuf : TDataRecord;\r\n I : integer;\r\n\r\n begin\r\n // need to scroll up al buffers after current one,\r\n // but copy current bookmark to insert buffer.\r\n If FRecordCount > 0 then\r\n BookBeforeInsert:=Bookmark;\r\n\r\n if not DoAppend then\r\n begin\r\n if FRecordCount > 0 then\r\n begin\r\n TempBuf := FBuffers[FBufferCount];\r\n for I:=FBufferCount downto FActiveRecord+1 do\r\n FBuffers[I]:=FBuffers[I-1];\r\n FBuffers[FActiveRecord]:=TempBuf;\r\n end;\r\n end\r\n else if FRecordCount=FBufferCount then\r\n ShiftBuffersBackward\r\n else\r\n begin\r\n if FRecordCount>0 then\r\n inc(FActiveRecord);\r\n end;\r\n\r\n // Active buffer is now edit buffer. Initialize.\r\n InitRecord(FBuffers[FActiveRecord]);\r\n CursorPosChanged;\r\n\r\n // Put bookmark in edit buffer.\r\n if FRecordCount=0 then\r\n SetBookmarkFlag(FBuffers[FActiveRecord],bfEOF)\r\n else\r\n begin\r\n fBOF := false;\r\n // 29:01:05, JvdS: Why is this here?!? It can result in records with the same bookmark-data?\r\n // I would say that the 'internalinsert' should do this. But I don't know how Tdbf handles it\r\n\r\n // 1-apr-06, JvdS: It just sets the bookmark of the newly inserted record to the place\r\n // where the record should be inserted. So it is ok.\r\n if FRecordCount > 0 then\r\n begin\r\n SetBookMarkData(FBuffers[FActiveRecord],BookBeforeInsert);\r\n FreeBookmark(BookBeforeInsert);\r\n end;\r\n end;\r\n\r\n InternalInsert;\r\n\r\n // update buffer count.\r\n If FRecordCount0 then\r\n FActiveRecord:=FRecordCount-1;\r\n DoInsert(True);\r\n SetBookmarkFlag(FBuffers[FActiveRecord],bfEOF);\r\n FBOF :=False;\r\n FEOF := true;\r\n end;\r\n SetState(dsInsert);\r\n try\r\n DoOnNewRecord;\r\n except\r\n SetCurrentRecord(FActiveRecord);\r\n resync([]);\r\n raise;\r\n end;\r\n // mark as not modified.\r\n FModified:=False;\r\n // Final events.\r\n DataEvent(deDatasetChange,0);\r\n DoAfterInsert;\r\n DoAfterScroll;\r\n{$ifdef dsdebug}\r\n Writeln ('Done with append');\r\n{$endif}\r\nend;\r\n\r\nprocedure TDataSet.Edit;\r\n\r\nbegin\r\n If State in [dsEdit,dsInsert] then exit;\r\n CheckBrowseMode;\r\n If Not CanModify then\r\n DatabaseError(SDatasetReadOnly,Self);\r\n If FRecordCount = 0 then\r\n begin\r\n Append;\r\n Exit;\r\n end;\r\n DoBeforeEdit;\r\n If Not TryDoing(@InternalEdit,OnEditError) then exit;\r\n GetCalcFields(FBuffers[FActiveRecord]);\r\n SetState(dsEdit);\r\n DataEvent(deRecordChange,0);\r\n DoAfterEdit;\r\nend;\r\n\r\nprocedure TDataSet.EnableControls;\r\n\r\n\r\nbegin\r\n if FDisableControlsCount > 0 then\r\n Dec(FDisableControlsCount);\r\n\r\n if FDisableControlsCount = 0 then begin\r\n if FState <> FDisableControlsState then\r\n DataEvent(deUpdateState, 0);\r\n\r\n if (FState <> dsInactive) and (FDisableControlsState <> dsInactive) then\r\n DataEvent(FEnableControlsEvent, 0);\r\n end;\r\nend;\r\n\r\nfunction TDataSet.FieldByName(const FieldName: string): TField;\r\n\r\n\r\nbegin\r\n Result:=FindField(FieldName);\r\n If Result=Nil then\r\n DatabaseErrorFmt(SFieldNotFound,[FieldName],Self);\r\nend;\r\n\r\nfunction TDataSet.FindField(const FieldName: string): TField;\r\n\r\n\r\nbegin\r\n Result:=FFieldList.FindField(FieldName);\r\nend;\r\n\r\nfunction TDataSet.FindFirst: Boolean;\r\n\r\n\r\nbegin\r\n Result:=False;\r\nend;\r\n\r\nfunction TDataSet.FindLast: Boolean;\r\n\r\n\r\nbegin\r\n Result:=False;\r\nend;\r\n\r\nfunction TDataSet.FindNext: Boolean;\r\n\r\n\r\nbegin\r\n Result:=False;\r\nend;\r\n\r\nfunction TDataSet.FindPrior: Boolean;\r\n\r\n\r\nbegin\r\n Result:=False;\r\nend;\r\n\r\nprocedure TDataSet.First;\r\n\r\n\r\nbegin\r\n CheckBrowseMode;\r\n DoBeforeScroll;\r\n if not FIsUniDirectional then\r\n ClearBuffers\r\n else if not FBof then\r\n begin\r\n Active := False;\r\n Active := True;\r\n end;\r\n try\r\n InternalFirst;\r\n if not FIsUniDirectional then GetNextRecords;\r\n finally\r\n FBOF:=True;\r\n DataEvent(deDatasetChange,0);\r\n DoAfterScroll;\r\n end;\r\nend;\r\n\r\nprocedure TDataSet.FreeBookmark(ABookmark: TBookmark);\r\n\r\n\r\nbegin\r\n {$ifdef noautomatedbookmark}\r\n FreeMem(ABookMark,FBookMarkSize);\r\n {$endif}\r\nend;\r\n\r\nfunction TDataSet.GetBookmark: TBookmark;\r\n\r\n\r\nbegin\r\n if BookmarkAvailable then\r\n GetBookMarkdata(ActiveBuffer,Result)\r\n else\r\n Result.Data:=Null;\r\nend;\r\n\r\nfunction TDataSet.GetCurrentRecord(Buffer: TDataRecord): Boolean;\r\n\r\n\r\nbegin\r\n Result:=False;\r\nend;\r\n\r\nprocedure TDataSet.GetFieldList(List: TList; const FieldNames: string);\r\n\r\nvar\r\n F: TField;\r\n N: String;\r\n StrPos: Integer;\r\n\r\nbegin\r\n if (FieldNames = '') or (List = nil) then\r\n Exit;\r\n StrPos := 1;\r\n repeat\r\n N := ExtractFieldName(FieldNames, StrPos);\r\n F := FieldByName(N);\r\n List.Add(F);\r\n until StrPos > Length(FieldNames);\r\nend;\r\n\r\nprocedure TDataSet.GetFieldList(List: TFPList; const FieldNames: string);\r\nvar\r\n F: TField;\r\n N: String;\r\n StrPos: Integer;\r\n\r\nbegin\r\n if (FieldNames = '') or (List = nil) then\r\n Exit;\r\n StrPos := 1;\r\n repeat\r\n N := ExtractFieldName(FieldNames, StrPos);\r\n F := FieldByName(N);\r\n List.Add(F);\r\n until StrPos > Length(FieldNames);\r\nend;\r\n\r\nprocedure TDataSet.GetFieldNames(List: TStrings);\r\n\r\n\r\nbegin\r\n FFieldList.GetFieldNames(List);\r\nend;\r\n\r\nprocedure TDataSet.GotoBookmark(const ABookmark: TBookmark);\r\n\r\n\r\nbegin\r\n If Not IsNull(ABookMark.Data) then\r\n begin\r\n CheckBrowseMode;\r\n DoBeforeScroll;\r\n{$ifdef dsdebug}\r\n Writeln('Gotobookmark: ',ABookMark.Data);\r\n{$endif}\r\n InternalGotoBookMark(ABookMark);\r\n Resync([rmExact,rmCenter]);\r\n DoAfterScroll;\r\n end;\r\nend;\r\n\r\nprocedure TDataSet.Insert;\r\n\r\nbegin\r\n DoInsertAppend(False);\r\nend;\r\n\r\nprocedure TDataSet.InsertRecord(const Values: array of JSValue);\r\n\r\nbegin\r\n DoInsertAppendRecord(Values,False);\r\nend;\r\n\r\nfunction TDataSet.IsEmpty: Boolean;\r\n\r\nbegin\r\n Result:=(fBof and fEof) and\r\n (not (State = dsInsert)); // After an insert on an empty dataset, both fBof and fEof are true\r\nend;\r\n\r\nfunction TDataSet.IsLinkedTo(ADataSource: TDataSource): Boolean;\r\n\r\nbegin\r\n//!! Not tested, I never used nested DS\r\n if (ADataSource = nil) or (ADataSource.Dataset = nil) then begin\r\n Result := False\r\n end else if ADataSource.Dataset = Self then begin\r\n Result := True;\r\n end else begin\r\n Result := ADataSource.Dataset.IsLinkedTo(ADataSource.Dataset.DataSource);\r\n end;\r\n//!! DataSetField not implemented\r\nend;\r\n\r\nfunction TDataSet.IsSequenced: Boolean;\r\n\r\nbegin\r\n Result := True;\r\nend;\r\n\r\nprocedure TDataSet.Last;\r\n\r\nbegin\r\n CheckBiDirectional;\r\n CheckBrowseMode;\r\n DoBeforeScroll;\r\n ClearBuffers;\r\n try\r\n // Writeln('FActiveRecord before last',FActiveRecord);\r\n InternalLast;\r\n // Writeln('FActiveRecord after last',FActiveRecord);\r\n GetPriorRecords;\r\n // Writeln('FRecordCount: ',FRecordCount);\r\n if FRecordCount>0 then\r\n FActiveRecord:=FRecordCount-1;\r\n // Writeln('FActiveRecord ',FActiveRecord);\r\n finally\r\n FEOF:=true;\r\n DataEvent(deDataSetChange, 0);\r\n DoAfterScroll;\r\n end;\r\nend;\r\n\r\nfunction TDataSet.DoLoad(aOptions: TLoadOptions; aAfterLoad: TDatasetLoadEvent): Boolean;\r\n\r\nVar\r\n Request : TDataRequest;\r\n\r\nbegin\r\n if not (loNoEvents in aOptions) then\r\n DoBeforeLoad;\r\n Result:=DataProxy<>Nil;\r\n if Not Result then\r\n Exit;\r\n Request:=DataProxy.GetDataRequest(aOptions,@HandleRequestResponse,aAfterLoad);\r\n Request.FDataset:=Self;\r\n If Active then\r\n Request.FBookmark:=GetBookmark;\r\n Inc(FDataRequestID);\r\n Request.FRequestID:=FDataRequestID;\r\n if DataProxy.DoGetData(Request) then\r\n Inc(FLoadCount)\r\n else\r\n Request.Free;\r\n// Writeln(Name,' End of Load call. Count: ',LoadCount);\r\nend;\r\n\r\n\r\nfunction TDataSet.Load(aOptions: TLoadOptions; aAfterLoad: TDatasetLoadEvent): Boolean;\r\n\r\nbegin\r\n if loAtEOF in aOptions then\r\n DatabaseError(SatEOFInternalOnly,Self);\r\n if loCancelPending in aOptions then\r\n CancelLoading;\r\n Result:=DoLoad(aOptions,aAfterLoad);\r\nend;\r\n\r\nfunction TDataSet.MoveBy(Distance: Longint): Longint;\r\nVar\r\n TheResult: Integer;\r\n\r\n Function ScrollForward : Integer;\r\n begin\r\n Result:=0;\r\n{$ifdef dsdebug}\r\n Writeln('Scrolling forward : ',Distance);\r\n Writeln('Active buffer : ',FActiveRecord);\r\n Writeln('RecordCount : ',FRecordCount);\r\n WriteLn('BufferCount : ',FBufferCount);\r\n{$endif}\r\n FBOF:=False;\r\n While (Distance>0) and not FEOF do\r\n begin\r\n If FActiveRecord0 then\r\n begin\r\n Dec(FActiveRecord);\r\n Inc(Distance);\r\n Dec(TheResult); //Dec(Result);\r\n end\r\n else\r\n begin\r\n {$ifdef dsdebug}\r\n Writeln('Moveby : need next record');\r\n {$endif}\r\n If GetPriorRecord then\r\n begin\r\n Inc(Distance);\r\n Inc(Result);\r\n Dec(TheResult); //Dec(Result);\r\n end\r\n else\r\n FBOF:=true;\r\n end;\r\n end\r\n end;\r\n\r\nVar\r\n Scrolled : Integer;\r\n\r\nbegin\r\n CheckBrowseMode;\r\n Result:=0; TheResult:=0;\r\n DoBeforeScroll;\r\n If (Distance = 0) or\r\n ((Distance>0) and FEOF) or\r\n ((Distance<0) and FBOF) then\r\n exit;\r\n Try\r\n Scrolled := 0;\r\n If Distance>0 then\r\n Scrolled:=ScrollForward\r\n else\r\n Scrolled:=ScrollBackward;\r\n finally\r\n{$ifdef dsdebug}\r\n WriteLn('ActiveRecord=', FActiveRecord,' FEOF=',FEOF,' FBOF=',FBOF);\r\n{$Endif}\r\n DataEvent(deDatasetScroll,Scrolled);\r\n DoAfterScroll;\r\n Result:=TheResult;\r\n end;\r\nend;\r\n\r\nprocedure TDataSet.Next;\r\nbegin\r\n if BlockReadSize>0 then\r\n BlockReadNext\r\n else\r\n MoveBy(1);\r\nend;\r\n\r\nprocedure TDataSet.BlockReadNext;\r\nbegin\r\n MoveBy(1);\r\nend;\r\n\r\nprocedure TDataSet.Open;\r\nbegin\r\n Active:=True;\r\nend;\r\n\r\nprocedure TDataSet.Post;\r\n\r\nConst\r\n UpdateStates : Array[Boolean] of TUpdateStatus = (usModified,usInserted);\r\n\r\nVar\r\n R : TRecordUpdateDescriptor;\r\n WasInsert : Boolean;\r\n\r\nbegin\r\n UpdateRecord;\r\n if State in [dsEdit,dsInsert] then\r\n begin\r\n DataEvent(deCheckBrowseMode,0);\r\n{$ifdef dsdebug}\r\n writeln ('Post: checking required fields');\r\n{$endif}\r\n DoBeforePost;\r\n WasInsert:=State=dsInsert;\r\n If Not TryDoing(@InternalPost,OnPostError) then exit;\r\n CursorPosChanged;\r\n{$ifdef dsdebug}\r\n writeln ('Post: Internalpost succeeded');\r\n{$endif}\r\n// First set the state to dsBrowse, then the Resync, to prevent the calling of\r\n// the deDatasetChange event, while the state is still 'editable', while the db isn't\r\n SetState(dsBrowse);\r\n Resync([]);\r\n // We get the new values here, since the bookmark should now be correct to find the record later on when doing applyupdates.\r\n R:=AddToChangeList(UpdateStates[wasInsert]);\r\n if Assigned(R) then\r\n R.FBookmark:=BookMark;\r\n{$ifdef dsdebug}\r\n writeln ('Post: Browse mode set');\r\n{$endif}\r\n DoAfterPost;\r\n end\r\n else if State<>dsSetKey then\r\n DatabaseErrorFmt(SNotEditing, [Name], Self);\r\nend;\r\n\r\nprocedure TDataSet.Prior;\r\n\r\nbegin\r\n MoveBy(-1);\r\nend;\r\n\r\nprocedure TDataSet.Refresh;\r\n\r\nbegin\r\n CheckbrowseMode;\r\n DoBeforeRefresh;\r\n UpdateCursorPos;\r\n InternalRefresh;\r\n{ SetCurrentRecord is called by UpdateCursorPos already, so as long as\r\n InternalRefresh doesn't do strange things this should be ok. }\r\n// SetCurrentRecord(FActiveRecord);\r\n Resync([]);\r\n DoAfterRefresh;\r\nend;\r\n\r\nprocedure TDataSet.RegisterDataSource(ADataSource: TDataSource);\r\n\r\nbegin\r\n FDataSources.Add(ADataSource);\r\n RecalcBufListSize;\r\nend;\r\n\r\n\r\nprocedure TDataSet.Resync(Mode: TResyncMode);\r\n\r\nvar i,count : integer;\r\n\r\nbegin\r\n // See if we can find the requested record.\r\n{$ifdef dsdebug}\r\n Writeln ('Resync called');\r\n{$endif}\r\n if FIsUnidirectional then Exit;\r\n// place the cursor of the underlying dataset to the active record\r\n// SetCurrentRecord(FActiveRecord);\r\n\r\n// Now look if the data on the current cursor of the underlying dataset is still available\r\n If GetRecord(FBuffers[0],gmCurrent,False)<>grOk Then\r\n// If that fails and rmExact is set, then raise an exception\r\n If rmExact in Mode then\r\n DatabaseError(SNoSuchRecord,Self)\r\n// else, if rmexact is not set, try to fetch the next or prior record in the underlying dataset\r\n else if (GetRecord(FBuffers[0],gmNext,True)<>grOk) and\r\n (GetRecord(FBuffers[0],gmPrior,True)<>grOk) then\r\n begin\r\n{$ifdef dsdebug}\r\n Writeln ('Resync: fuzzy resync');\r\n{$endif}\r\n // nothing found, invalidate buffer and bail out.\r\n ClearBuffers;\r\n // Make sure that the active record is 'empty', ie: that all fields are null\r\n InternalInitRecord(FBuffers[FActiveRecord]);\r\n DataEvent(deDatasetChange,0);\r\n exit;\r\n end;\r\n FCurrentRecord := 0;\r\n FEOF := false;\r\n FBOF := false;\r\n\r\n// If we've arrived here, FBuffer[0] is the current record\r\n If (rmCenter in Mode) then\r\n count := (FRecordCount div 2)\r\n else\r\n count := FActiveRecord;\r\n i := 0;\r\n FRecordCount := 1;\r\n FActiveRecord := 0;\r\n\r\n// Fill the buffers before the active record\r\n while (i < count) and GetPriorRecord do\r\n inc(i);\r\n FActiveRecord := i;\r\n// Fill the rest of the buffer\r\n GetNextRecords;\r\n// If the buffer is not full yet, try to fetch some more prior records\r\n if FRecordCount < FBufferCount then FActiveRecord:=FActiveRecord+getpriorrecords;\r\n// That's all folks!\r\n DataEvent(deDatasetChange,0);\r\nend;\r\n\r\nprocedure TDataSet.CancelLoading;\r\nbegin\r\n FMinLoadID:=FDataRequestID;\r\n FloadCount:=0;\r\nend;\r\n\r\nprocedure TDataSet.SetFields(const Values: array of JSValue);\r\n\r\nVar I : longint;\r\nbegin\r\n For I:=0 to high(Values) do\r\n Fields[I].AssignValue(Values[I]);\r\nend;\r\n\r\nfunction TDataSet.TryDoing(P: TDataOperation; Ev: TDatasetErrorEvent): Boolean;\r\n\r\nVar Retry : TDataAction;\r\n\r\nbegin\r\n{$ifdef dsdebug}\r\n Writeln ('Trying to do');\r\n If P=Nil then writeln ('Procedure to call is nil !!!');\r\n{$endif dsdebug}\r\n Result:=True;\r\n Retry:=daRetry;\r\n while Retry=daRetry do\r\n Try\r\n{$ifdef dsdebug}\r\n Writeln ('Trying : updatecursorpos');\r\n{$endif dsdebug}\r\n UpdateCursorPos;\r\n{$ifdef dsdebug}\r\n Writeln ('Trying to do it');\r\n{$endif dsdebug}\r\n P();\r\n exit;\r\n except\r\n On E : EDatabaseError do\r\n begin\r\n retry:=daFail;\r\n If Assigned(Ev) then\r\n Ev(Self,E,Retry);\r\n Case Retry of\r\n daFail : Raise;\r\n daAbort : Abort;\r\n end;\r\n end;\r\n else\r\n Raise;\r\n end;\r\n{$ifdef dsdebug}\r\n Writeln ('Exit Trying to do');\r\n{$endif dsdebug}\r\nend;\r\n\r\nprocedure TDataSet.UpdateCursorPos;\r\n\r\nbegin\r\n If FRecordCount>0 then\r\n SetCurrentRecord(FActiveRecord);\r\nend;\r\n\r\nprocedure TDataSet.UpdateRecord;\r\n\r\nbegin\r\n if not (State in dsEditModes) then\r\n DatabaseErrorFmt(SNotEditing, [Name], Self);\r\n DataEvent(deUpdateRecord, 0);\r\nend;\r\n\r\nfunction TDataSet.GetPendingUpdates: TResolveInfoArray;\r\n\r\nVar\r\n L : TRecordUpdateDescriptorList;\r\n I : integer;\r\n\r\nbegin\r\n L:=TRecordUpdateDescriptorList.Create;\r\n try\r\n SetLength(Result,GetRecordUpdates(L));\r\n For I:=0 to L.Count-1 do\r\n Result[i]:=RecordUpdateDescriptorToResolveInfo(L[i]);\r\n finally\r\n L.Free;\r\n end;\r\nend;\r\n\r\n\r\n\r\nprocedure TDataSet.SetConstraints(Value: TCheckConstraints);\r\nbegin\r\n FConstraints.Assign(Value);\r\nend;\r\n\r\nprocedure TDataSet.SetDataProxy(AValue: TDataProxy);\r\nbegin\r\n If AValue=FDataProxy then\r\n exit;\r\n if Assigned(FDataProxy) then\r\n FDataProxy.RemoveFreeNotification(Self);\r\n FDataProxy:=AValue;\r\n if Assigned(FDataProxy) then\r\n FDataProxy.FreeNotification(Self)\r\nend;\r\n\r\nfunction TDataSet.GetfieldCount: Integer;\r\n\r\nbegin\r\n Result:=FFieldList.Count;\r\nend;\r\n\r\nprocedure TDataSet.ShiftBuffersBackward;\r\n\r\nvar\r\n TempBuf : TDataRecord;\r\n I : Integer;\r\n\r\nbegin\r\n TempBuf := FBuffers[0];\r\n For I:=1 to FBufferCount do\r\n FBuffers[I-1]:=FBuffers[i];\r\n FBuffers[FBufferCount]:=TempBuf;\r\nend;\r\n\r\nprocedure TDataSet.ShiftBuffersForward;\r\n\r\nvar\r\n TempBuf : TDataRecord;\r\n I : Integer;\r\n\r\nbegin\r\n TempBuf := FBuffers[FBufferCount];\r\n For I:=FBufferCount downto 1 do\r\n FBuffers[I]:=FBuffers[i-1];\r\n FBuffers[0]:=TempBuf;\r\nend;\r\n\r\nfunction TDataSet.GetFieldValues(const FieldName: string): JSValue;\r\n\r\nvar\r\n i: Integer;\r\n FieldList: TList;\r\n A : TJSValueDynArray;\r\n\r\nbegin\r\n FieldList := TList.Create;\r\n try\r\n GetFieldList(FieldList, FieldName);\r\n if FieldList.Count>1 then\r\n begin\r\n SetLength(A,FieldList.Count);\r\n for i := 0 to FieldList.Count - 1 do\r\n A[i] := TField(FieldList[i]).Value;\r\n Result:=A;\r\n end\r\n else\r\n Result := FieldByName(FieldName).Value;\r\n finally\r\n FieldList.Free;\r\n end;\r\nend;\r\n\r\nprocedure TDataSet.SetFieldValues(const FieldName: string; Value: JSValue);\r\n\r\nvar\r\n i : Integer;\r\n FieldList: TList;\r\n A : TJSValueDynArray;\r\n\r\nbegin\r\n if IsArray(Value) then\r\n begin\r\n FieldList := TList.Create;\r\n try\r\n GetFieldList(FieldList, FieldName);\r\n A:=TJSValueDynArray(Value);\r\n if (FieldList.Count = 1) and (Length(A)>0) then\r\n // Allow for a field type that can deal with an array\r\n FieldByName(FieldName).Value := Value\r\n else\r\n for i := 0 to FieldList.Count - 1 do\r\n TField(FieldList[i]).Value := A[i];\r\n finally\r\n FieldList.Free;\r\n end;\r\n end\r\n else\r\n FieldByName(FieldName).Value := Value;\r\nend;\r\n\r\nfunction TDataSet.Locate(const KeyFields: string; const KeyValues: JSValue;\r\n Options: TLocateOptions): boolean;\r\n\r\nbegin\r\n CheckBiDirectional;\r\n Result := False;\r\nend;\r\n\r\nfunction TDataSet.Lookup(const KeyFields: string; const KeyValues: JSValue;\r\n const ResultFields: string): JSValue;\r\n\r\nbegin\r\n CheckBiDirectional;\r\n Result := Null;\r\nend;\r\n\r\n\r\nprocedure TDataSet.UnRegisterDataSource(ADataSource: TDataSource);\r\n\r\nbegin\r\n FDataSources.Remove(ADataSource);\r\nend;\r\n\r\n{ ---------------------------------------------------------------------\r\n TFieldDef\r\n ---------------------------------------------------------------------}\r\n\r\nconstructor TFieldDef.Create(ACollection: TCollection);\r\n\r\nbegin\r\n Inherited Create(ACollection);\r\n FFieldNo:=Index+1;\r\nend;\r\n\r\nconstructor TFieldDef.Create(AOwner: TFieldDefs; const AName: string; ADataType: TFieldType; ASize: Integer; ARequired: Boolean;\r\n AFieldNo: Longint);\r\nbegin\r\n{$ifdef dsdebug }\r\n Writeln('TFieldDef.Create : ',Aname,'(',AFieldNo,')');\r\n{$endif}\r\n Inherited Create(AOwner);\r\n Name:=Aname;\r\n FDatatype:=ADatatype;\r\n FSize:=ASize;\r\n FRequired:=ARequired;\r\n FPrecision:=-1;\r\n FFieldNo:=AFieldNo;\r\nend;\r\n\r\ndestructor TFieldDef.Destroy;\r\n\r\nbegin\r\n Inherited destroy;\r\nend;\r\n\r\nprocedure TFieldDef.Assign(Source: TPersistent);\r\nvar fd: TFieldDef;\r\nbegin\r\n fd := nil;\r\n if Source is TFieldDef then\r\n fd := Source as TFieldDef;\r\n if Assigned(fd) then begin\r\n Collection.BeginUpdate;\r\n try\r\n Name := fd.Name;\r\n DataType := fd.DataType;\r\n Size := fd.Size;\r\n Precision := fd.Precision;\r\n FRequired := fd.Required;\r\n finally\r\n Collection.EndUpdate;\r\n end;\r\n end\r\n else\r\n inherited Assign(Source);\r\nend;\r\n\r\nfunction TFieldDef.CreateField(AOwner: TComponent): TField;\r\n\r\nvar TheField : TFieldClass;\r\n\r\nbegin\r\n{$ifdef dsdebug}\r\n Writeln ('Creating field '+FNAME);\r\n{$endif dsdebug}\r\n TheField:=GetFieldClass;\r\n if TheField=Nil then\r\n DatabaseErrorFmt(SUnknownFieldType,[FName]);\r\n Result:=TheField.Create(AOwner);\r\n Try\r\n Result.FFieldDef:=Self;\r\n Result.Size:=FSize;\r\n Result.Required:=FRequired;\r\n Result.FFieldName:=FName;\r\n Result.FDisplayLabel:=DisplayName;\r\n Result.FFieldNo:=Self.FieldNo;\r\n Result.SetFieldType(DataType);\r\n Result.FReadOnly:=(faReadOnly in Attributes);\r\n{$ifdef dsdebug}\r\n Writeln ('TFieldDef.CreateField : Result Fieldno : ',Result.FieldNo,'; Self : ',FieldNo);\r\n Writeln ('TFieldDef.CreateField : Trying to set dataset');\r\n{$endif dsdebug}\r\n Result.Dataset:=TFieldDefs(Collection).Dataset;\r\n if (Result is TFloatField) then\r\n TFloatField(Result).Precision := FPrecision;\r\n except\r\n Result.Free;\r\n Raise;\r\n end;\r\nend;\r\n\r\nprocedure TFieldDef.SetAttributes(AValue: TFieldAttributes);\r\nbegin\r\n FAttributes := AValue;\r\n Changed(False);\r\nend;\r\n\r\nprocedure TFieldDef.SetDataType(AValue: TFieldType);\r\nbegin\r\n FDataType := AValue;\r\n Changed(False);\r\nend;\r\n\r\nprocedure TFieldDef.SetPrecision(const AValue: Longint);\r\nbegin\r\n FPrecision := AValue;\r\n Changed(False);\r\nend;\r\n\r\nprocedure TFieldDef.SetSize(const AValue: Integer);\r\nbegin\r\n FSize := AValue;\r\n Changed(False);\r\nend;\r\n\r\nprocedure TFieldDef.SetRequired(const AValue: Boolean);\r\nbegin\r\n FRequired := AValue;\r\n Changed(False);\r\nend;\r\n\r\nfunction TFieldDef.GetFieldClass: TFieldClass;\r\n\r\nbegin\r\n //!! Should be owner as tdataset but that doesn't work ??\r\n\r\n If Assigned(Collection) And\r\n (Collection is TFieldDefs) And\r\n Assigned(TFieldDefs(Collection).Dataset) then\r\n Result:=TFieldDefs(Collection).Dataset.GetFieldClass(FDataType)\r\n else\r\n Result:=Nil;\r\nend;\r\n\r\n\r\n{ ---------------------------------------------------------------------\r\n TFieldDefs\r\n ---------------------------------------------------------------------}\r\n\r\n{\r\ndestructor TFieldDefs.Destroy;\r\n\r\nbegin\r\n FItems.Free;\r\n // This will destroy all fielddefs since we own them...\r\n Inherited Destroy;\r\nend;\r\n}\r\n\r\nprocedure TFieldDefs.Add(const AName: string; ADataType: TFieldType);\r\n\r\nbegin\r\n Add(AName,ADatatype,0,False);\r\nend;\r\n\r\nprocedure TFieldDefs.Add(const AName: string; ADataType: TFieldType; ASize : Word);\r\n\r\nbegin\r\n Add(AName,ADatatype,ASize,False);\r\nend;\r\n\r\nprocedure TFieldDefs.Add(const AName: string; ADataType: TFieldType; ASize: Word;\r\n ARequired: Boolean);\r\n\r\nbegin\r\n If Length(AName)=0 Then\r\n DatabaseError(SNeedFieldName,Dataset);\r\n // the fielddef will register itself here as an owned component.\r\n // fieldno is 1 based !\r\n BeginUpdate;\r\n try\r\n Add(AName,ADataType,ASize,ARequired,Count+1);\r\n finally\r\n EndUpdate;\r\n end;\r\nend;\r\n\r\nfunction TFieldDefs.Add: TFieldDef;\r\nbegin\r\n Result := TFieldDef(inherited Add);\r\nend;\r\n\r\nfunction TFieldDefs.GetItem(Index: Longint): TFieldDef;\r\n\r\nbegin\r\n Result := TFieldDef(inherited Items[Index]);\r\nend;\r\n\r\nprocedure TFieldDefs.SetItem(Index: Longint; const AValue: TFieldDef);\r\nbegin\r\n inherited Items[Index] := AValue;\r\nend;\r\n\r\nclass function TFieldDefs.FieldDefClass: TFieldDefClass;\r\nbegin\r\n Result:=TFieldDef;\r\nend;\r\n\r\nconstructor TFieldDefs.Create(ADataSet: TDataSet);\r\nbegin\r\n Inherited Create(ADataset, Owner, FieldDefClass);\r\nend;\r\n\r\nfunction TFieldDefs.Add(const AName: string; ADataType: TFieldType; ASize, APrecision: Integer;\r\n ARequired, AReadOnly: Boolean; AFieldNo: Integer): TFieldDef;\r\nbegin\r\n Result:=FieldDefClass.Create(Self, MakeNameUnique(AName), ADataType, ASize, ARequired, AFieldNo);\r\n if AReadOnly then\r\n Result.Attributes := Result.Attributes + [faReadOnly];\r\nend;\r\n\r\nfunction TFieldDefs.Add(const AName: string; ADataType: TFieldType; ASize: Word; ARequired: Boolean; AFieldNo: Integer): TFieldDef;\r\nbegin\r\n Result:=FieldDefClass.Create(Self,AName,ADataType,ASize,ARequired,AFieldNo);\r\nend;\r\n\r\nprocedure TFieldDefs.Assign(FieldDefs: TFieldDefs);\r\n\r\nvar I : longint;\r\n\r\nbegin\r\n Clear;\r\n For i:=0 to FieldDefs.Count-1 do\r\n With FieldDefs[i] do\r\n Add(Name,DataType,Size,Required);\r\nend;\r\n\r\nfunction TFieldDefs.Find(const AName: string): TFieldDef;\r\nbegin\r\n Result := (Inherited Find(AName)) as TFieldDef;\r\n if Result=nil then DatabaseErrorFmt(SFieldNotFound,[AName],FDataset);\r\nend;\r\n\r\n{\r\nprocedure TFieldDefs.Clear;\r\n\r\nvar I : longint;\r\n\r\nbegin\r\n For I:=FItems.Count-1 downto 0 do\r\n TFieldDef(Fitems[i]).Free;\r\n FItems.Clear;\r\nend;\r\n}\r\n\r\nprocedure TFieldDefs.Update;\r\n\r\nbegin\r\n if not Updated then\r\n begin\r\n If Assigned(Dataset) then\r\n DataSet.InitFieldDefs;\r\n Updated := True;\r\n end;\r\nend;\r\n\r\nfunction TFieldDefs.MakeNameUnique(const AName: String): string;\r\nvar DblFieldCount : integer;\r\nbegin\r\n DblFieldCount := 0;\r\n Result := AName;\r\n while assigned(inherited Find(Result)) do\r\n begin\r\n inc(DblFieldCount);\r\n Result := AName + '_' + IntToStr(DblFieldCount);\r\n end;\r\nend;\r\n\r\nfunction TFieldDefs.AddFieldDef: TFieldDef;\r\n\r\nbegin\r\n Result:=FieldDefClass.Create(Self,'',ftUnknown,0,False,Count+1);\r\nend;\r\n\r\n{ ---------------------------------------------------------------------\r\n TField\r\n ---------------------------------------------------------------------}\r\n\r\nConst\r\n// SBCD = 'BCD';\r\n SBoolean = 'Boolean';\r\n SDateTime = 'TDateTime';\r\n SFloat = 'Float';\r\n SInteger = 'Integer';\r\n SLargeInt = 'NativeInt';\r\n SJSValue = 'JSValue';\r\n SString = 'String';\r\n SBytes = 'Bytes';\r\n\r\nconstructor TField.Create(AOwner: TComponent);\r\n\r\n//Var\r\n// I : Integer;\r\n\r\nbegin\r\n Inherited Create(AOwner);\r\n FVisible:=True;\r\n SetLength(FValidChars,255);\r\n// For I:=0 to 255 do\r\n// FValidChars[i]:=Char(i);\r\n\r\n FProviderFlags := [pfInUpdate,pfInWhere];\r\nend;\r\n\r\ndestructor TField.Destroy;\r\n\r\nbegin\r\n IF Assigned(FDataSet) then\r\n begin\r\n FDataSet.Active:=False;\r\n if Assigned(FFields) then\r\n FFields.Remove(Self);\r\n end;\r\n FLookupList.Free;\r\n Inherited Destroy;\r\nend;\r\n\r\nProcedure TField.RaiseAccessError(const TypeName: string);\r\n\r\nVar\r\n E : EDatabaseError;\r\n\r\nbegin\r\n E:=AccessError(TypeName);\r\n Raise E;\r\nend;\r\n\r\nfunction TField.AccessError(const TypeName: string): EDatabaseError;\r\n\r\nbegin\r\n Result:=EDatabaseError.CreateFmt(SinvalidTypeConversion,[TypeName,FFieldName]);\r\nend;\r\n\r\nprocedure TField.DefineProperties(Filer: TFiler); \r\n procedure IgnoreReadString(Reader: TReader);\r\n begin\r\n Reader.ReadString;\r\n end;\r\n \r\n procedure IgnoreReadBoolean(Reader: TReader);\r\n begin\r\n Reader.ReadBoolean;\r\n end;\r\n\r\n procedure IgnoreWrite(Writer: TWriter);\r\n begin\r\n if writer=Nil then;\r\n end;\r\n\r\nbegin\r\n Filer.DefineProperty('AttributeSet', @IgnoreReadString, @IgnoreWrite, False);\r\n Filer.DefineProperty('Calculated', @IgnoreReadBoolean, @IgnoreWrite, False);\r\n Filer.DefineProperty('Lookup', @IgnoreReadBoolean, @IgnoreWrite, False);\r\nend;\r\n\r\nprocedure TField.Assign(Source: TPersistent);\r\n\r\nbegin\r\n if Source = nil then Clear\r\n else if Source is TField then begin\r\n Value := TField(Source).Value;\r\n end else\r\n inherited Assign(Source);\r\nend;\r\n\r\nprocedure TField.AssignValue(const AValue: JSValue);\r\n\r\n procedure Error;\r\n begin\r\n DatabaseErrorFmt(SFieldValueError, [DisplayName]);\r\n end;\r\n\r\nbegin\r\n Case GetValueType(AValue) of\r\n jvtNull : Clear;\r\n jvtBoolean : AsBoolean:=Boolean(AValue);\r\n jvtInteger : AsLargeInt:=NativeInt(AValue);\r\n jvtFloat : AsFloat:=Double(AValue);\r\n jvtString : AsString:=String(AValue);\r\n jvtArray : SetAsBytes(TBytes(AValue));\r\n else\r\n Error;\r\n end;\r\nend;\r\n\r\nprocedure TField.Bind(Binding: Boolean);\r\n\r\nbegin\r\n if Binding and (FieldKind=fkLookup) then\r\n begin\r\n if ((FLookupDataSet = nil) or (FLookupKeyFields = '') or\r\n (FLookupResultField = '') or (FKeyFields = '')) then\r\n DatabaseErrorFmt(SLookupInfoError, [DisplayName]);\r\n FFields.CheckFieldNames(FKeyFields);\r\n FLookupDataSet.Open;\r\n FLookupDataSet.Fields.CheckFieldNames(FLookupKeyFields);\r\n FLookupDataSet.FieldByName(FLookupResultField);\r\n if FLookupCache then\r\n RefreshLookupList;\r\n end;\r\nend;\r\n\r\nprocedure TField.Change;\r\n\r\nbegin\r\n If Assigned(FOnChange) Then\r\n FOnChange(Self);\r\nend;\r\n\r\nprocedure TField.CheckInactive;\r\n\r\nbegin\r\n If Assigned(FDataSet) then\r\n FDataset.CheckInactive;\r\nend;\r\n\r\nprocedure TField.Clear;\r\n\r\nbegin\r\n SetData(Nil);\r\nend;\r\n\r\nprocedure TField.DataChanged;\r\n\r\nbegin\r\n FDataset.DataEvent(deFieldChange,self);\r\nend;\r\n\r\nprocedure TField.FocusControl;\r\nvar\r\n Field1: TField;\r\nbegin\r\n Field1 := Self;\r\n FDataSet.DataEvent(deFocusControl,Field1);\r\nend;\r\n\r\nfunction TField.GetAsBoolean: Boolean;\r\nbegin\r\n raiseAccessError(SBoolean);\r\n Result:=false;\r\nend;\r\n\r\nfunction TField.GetAsBytes: TBytes;\r\n\r\nbegin\r\n raiseAccessError(SBytes);\r\n Result:=nil;\r\nend;\r\n\r\n\r\nfunction TField.GetAsDateTime: TDateTime;\r\n\r\nbegin\r\n raiseAccessError(SdateTime);\r\n Result:=0.0;\r\nend;\r\n\r\nfunction TField.GetAsFloat: Double;\r\n\r\nbegin\r\n raiseAccessError(SDateTime);\r\n Result:=0.0;\r\nend;\r\n\r\nfunction TField.GetAsLargeInt: NativeInt;\r\nbegin\r\n RaiseAccessError(SLargeInt);\r\n Result:=0;\r\nend;\r\n\r\nfunction TField.GetAsLongint: Longint;\r\n\r\nbegin\r\n Result:=GetAsInteger;\r\nend;\r\n\r\nfunction TField.GetAsInteger: Longint;\r\n\r\nbegin\r\n RaiseAccessError(SInteger);\r\n Result:=0;\r\nend;\r\n\r\nfunction TField.GetAsJSValue: JSValue;\r\n\r\nbegin\r\n Result:=GetData\r\nend;\r\n\r\n\r\nfunction TField.GetAsString: string;\r\nbegin\r\n Result := GetClassDesc\r\nend;\r\n\r\nfunction TField.GetOldValue: JSValue;\r\n\r\nvar SaveState : TDatasetState;\r\n\r\nbegin\r\n SaveState := FDataset.State;\r\n try\r\n FDataset.SetTempState(dsOldValue);\r\n Result := GetAsJSValue;\r\n finally\r\n FDataset.RestoreState(SaveState);\r\n end;\r\nend;\r\n\r\nfunction TField.GetNewValue: JSValue;\r\n\r\nvar SaveState : TDatasetState;\r\n\r\nbegin\r\n SaveState := FDataset.State;\r\n try\r\n FDataset.SetTempState(dsNewValue);\r\n Result := GetAsJSValue;\r\n finally\r\n FDataset.RestoreState(SaveState);\r\n end;\r\nend;\r\n\r\nprocedure TField.SetNewValue(const AValue: JSValue);\r\n\r\nvar SaveState : TDatasetState;\r\n\r\nbegin\r\n SaveState := FDataset.State;\r\n try\r\n FDataset.SetTempState(dsNewValue);\r\n SetAsJSValue(AValue);\r\n finally\r\n FDataset.RestoreState(SaveState);\r\n end;\r\nend;\r\n\r\nfunction TField.GetCurValue: JSValue;\r\n\r\nvar SaveState : TDatasetState;\r\n\r\nbegin\r\n SaveState := FDataset.State;\r\n try\r\n FDataset.SetTempState(dsCurValue);\r\n Result := GetAsJSValue;\r\n finally\r\n FDataset.RestoreState(SaveState);\r\n end;\r\nend;\r\n\r\nfunction TField.GetCanModify: Boolean;\r\n\r\nbegin\r\n Result:=Not ReadOnly;\r\n If Result then\r\n begin\r\n Result := FieldKind in [fkData, fkInternalCalc];\r\n if Result then\r\n begin\r\n Result:=Assigned(DataSet) and Dataset.Active;\r\n If Result then\r\n Result:= DataSet.CanModify;\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TField.GetClassDesc: String;\r\nvar ClassN : string;\r\nbegin\r\n ClassN := copy(ClassName,2,pos('Field',ClassName)-2);\r\n if isNull then\r\n result := '(' + LowerCase(ClassN) + ')'\r\n else\r\n result := '(' + UpperCase(ClassN) + ')';\r\nend;\r\n\r\n\r\nfunction TField.GetData : JSValue;\r\n\r\nbegin\r\n IF FDataset=Nil then\r\n DatabaseErrorFmt(SNoDataset,[FieldName]);\r\n If FValidating then\r\n result:=FValueBuffer\r\n else\r\n begin\r\n Result:=FDataset.GetFieldData(Self);\r\n If IsUndefined(Result) then\r\n Result:=Null;\r\n end;\r\nend;\r\n\r\nfunction TField.GetDataSize: Integer;\r\n\r\nbegin\r\n Result:=0;\r\nend;\r\n\r\nfunction TField.GetDefaultWidth: Longint;\r\n\r\nbegin\r\n Result:=10;\r\nend;\r\n\r\nfunction TField.GetDisplayName : String;\r\n\r\nbegin\r\n If FDisplayLabel<>'' then\r\n result:=FDisplayLabel\r\n else\r\n Result:=FFieldName;\r\nend;\r\n\r\nfunction TField.IsDisplayLabelStored: Boolean;\r\n\r\nbegin\r\n Result:=(DisplayLabel<>FieldName);\r\nend;\r\n\r\nfunction TField.IsDisplayWidthStored: Boolean;\r\n\r\nbegin\r\n Result:=(FDisplayWidth<>0);\r\nend;\r\n\r\nfunction TField.GetLookupList: TLookupList;\r\nbegin\r\n if not Assigned(FLookupList) then\r\n FLookupList := TLookupList.Create;\r\n Result := FLookupList;\r\nend;\r\n\r\nprocedure TField.CalcLookupValue;\r\nbegin\r\n// MVC: TODO\r\n// if FLookupCache then\r\n// Value := LookupList.ValueOfKey(FDataSet.FieldValues[FKeyFields])\r\n// else if\r\n if Assigned(FLookupDataSet) and FLookupDataSet.Active then\r\n Value := FLookupDataSet.Lookup(FLookupKeyfields, FDataSet.FieldValues[FKeyFields], FLookupresultField)\r\n else\r\n Value:=Null;\r\nend;\r\n\r\nfunction TField.GetIndex: longint;\r\n\r\nbegin\r\n If Assigned(FDataset) then\r\n Result:=FDataset.FFieldList.IndexOf(Self)\r\n else\r\n Result:=-1;\r\nend;\r\n\r\nfunction TField.GetLookup: Boolean;\r\nbegin\r\n Result := FieldKind = fkLookup;\r\nend;\r\n\r\nprocedure TField.SetAlignment(const AValue: TAlignMent);\r\nbegin\r\n if FAlignment <> AValue then\r\n begin\r\n FAlignment := AValue;\r\n PropertyChanged(false);\r\n end;\r\nend;\r\n\r\nprocedure TField.SetIndex(const AValue: Longint);\r\nbegin\r\n if FFields <> nil then FFields.SetFieldIndex(Self, AValue)\r\nend;\r\n\r\nfunction TField.GetIsNull: Boolean;\r\n\r\nbegin\r\n Result:=js.IsNull(GetData);\r\nend;\r\n\r\nfunction TField.GetParentComponent: TComponent;\r\n\r\nbegin\r\n Result := DataSet;\r\nend;\r\n\r\nprocedure TField.GetText(var AText: string; ADisplayText: Boolean);\r\n\r\nbegin\r\n AText:=GetAsString;\r\nend;\r\n\r\nfunction TField.HasParent: Boolean;\r\n\r\nbegin\r\n HasParent:=True;\r\nend;\r\n\r\nfunction TField.IsValidChar(InputChar: Char): Boolean;\r\n\r\nbegin\r\n // FValidChars must be set in Create.\r\n Result:=CharInset(InputChar,FValidChars);\r\nend;\r\n\r\nprocedure TField.RefreshLookupList;\r\nvar\r\n tmpActive: Boolean;\r\nbegin\r\n if not Assigned(FLookupDataSet) or (Length(FLookupKeyfields) = 0)\r\n or (Length(FLookupresultField) = 0) or (Length(FKeyFields) = 0) then\r\n Exit;\r\n \r\n tmpActive := FLookupDataSet.Active;\r\n try\r\n FLookupDataSet.Active := True;\r\n FFields.CheckFieldNames(FKeyFields);\r\n FLookupDataSet.Fields.CheckFieldNames(FLookupKeyFields);\r\n FLookupDataset.FieldByName(FLookupResultField); // I presume that if it doesn't exist it throws exception, and that a field with null value is still valid\r\n LookupList.Clear; // have to be F-less because we might be creating it here with getter!\r\n\r\n FLookupDataSet.DisableControls;\r\n try\r\n FLookupDataSet.First;\r\n while not FLookupDataSet.Eof do\r\n begin\r\n// FLookupList.Add(FLookupDataSet.FieldValues[FLookupKeyfields], FLookupDataSet.FieldValues[FLookupResultField]);\r\n FLookupDataSet.Next;\r\n end;\r\n finally\r\n FLookupDataSet.EnableControls;\r\n end;\r\n finally\r\n FLookupDataSet.Active := tmpActive;\r\n end;\r\nend;\r\n\r\nprocedure TField.Notification(AComponent: TComponent; Operation: TOperation);\r\n\r\nbegin\r\n Inherited Notification(AComponent,Operation);\r\n if (Operation = opRemove) and (AComponent = FLookupDataSet) then\r\n FLookupDataSet := nil;\r\nend;\r\n\r\nprocedure TField.PropertyChanged(LayoutAffected: Boolean);\r\n\r\nbegin\r\n If (FDataset<>Nil) and (FDataset.Active) then\r\n If LayoutAffected then\r\n FDataset.DataEvent(deLayoutChange,0)\r\n else\r\n FDataset.DataEvent(deDatasetchange,0);\r\nend;\r\n\r\n\r\nprocedure TField.SetAsBytes(const AValue: TBytes);\r\nbegin\r\n RaiseAccessError(SBytes);\r\nend;\r\n\r\nprocedure TField.SetAsBoolean(AValue: Boolean);\r\n\r\nbegin\r\n RaiseAccessError(SBoolean);\r\nend;\r\n\r\nprocedure TField.SetAsDateTime(AValue: TDateTime);\r\n\r\nbegin\r\n RaiseAccessError(SDateTime);\r\nend;\r\n\r\nprocedure TField.SetAsFloat(AValue: Double);\r\n\r\nbegin\r\n RaiseAccessError(SFloat);\r\nend;\r\n\r\nprocedure TField.SetAsJSValue(const AValue: JSValue);\r\n\r\nbegin\r\n if js.IsNull(AValue) then\r\n Clear\r\n else\r\n try\r\n SetVarValue(AValue);\r\n except\r\n on EVariantError do\r\n DatabaseErrorFmt(SFieldValueError, [DisplayName]);\r\n end;\r\nend;\r\n\r\n\r\nprocedure TField.SetAsLongint(AValue: Longint);\r\nbegin\r\n SetAsInteger(AValue);\r\nend;\r\n\r\nprocedure TField.SetAsInteger(AValue: Longint);\r\nbegin\r\n RaiseAccessError(SInteger);\r\nend;\r\n\r\nprocedure TField.SetAsLargeInt(AValue: NativeInt);\r\nbegin\r\n RaiseAccessError(SLargeInt);\r\nend;\r\n\r\nprocedure TField.SetAsString(const AValue: string);\r\nbegin\r\n RaiseAccessError(SString);\r\nend;\r\n\r\nprocedure TField.SetData(Buffer: JSValue);\r\n\r\nbegin\r\n If Not Assigned(FDataset) then\r\n DatabaseErrorFmt(SNoDataset,[FieldName]);\r\n FDataSet.SetFieldData(Self,Buffer);\r\nend;\r\n\r\nprocedure TField.SetDataset(AValue: TDataset);\r\n\r\nbegin\r\n{$ifdef dsdebug}\r\n Writeln ('Setting dataset');\r\n{$endif}\r\n If AValue=FDataset then exit;\r\n If Assigned(FDataset) Then\r\n begin\r\n FDataset.CheckInactive;\r\n FDataset.FFieldList.Remove(Self);\r\n end;\r\n If Assigned(AValue) then\r\n begin\r\n AValue.CheckInactive;\r\n AValue.FFieldList.Add(Self);\r\n end;\r\n FDataset:=AValue;\r\nend;\r\n\r\nprocedure TField.SetDataType(AValue: TFieldType);\r\nbegin\r\n FDataType := AValue;\r\nend;\r\n\r\nprocedure TField.SetFieldType(AValue: TFieldType);\r\nbegin\r\n { empty }\r\nend;\r\n\r\nprocedure TField.SetParentComponent(Value: TComponent);\r\nbegin\r\n// if not (csLoading in ComponentState) then\r\n DataSet := Value as TDataSet\r\nend;\r\n\r\nprocedure TField.SetSize(AValue: Integer);\r\nbegin\r\n CheckInactive;\r\n CheckTypeSize(AValue);\r\n FSize:=AValue;\r\nend;\r\n\r\nprocedure TField.SetText(const AValue: string);\r\nbegin\r\n SetAsString(AValue);\r\nend;\r\n\r\nprocedure TField.SetVarValue(const AValue: JSValue);\r\nbegin\r\n RaiseAccessError(SJSValue);\r\nend;\r\n\r\nprocedure TField.Validate(Buffer: Pointer);\r\nbegin\r\n If assigned(OnValidate) Then\r\n begin\r\n FValueBuffer:=Buffer;\r\n FValidating:=True;\r\n Try\r\n OnValidate(Self);\r\n finally\r\n FValidating:=False;\r\n end;\r\n end;\r\nend;\r\n\r\nclass function TField.IsBlob: Boolean;\r\nbegin\r\n Result:=False;\r\nend;\r\n\r\nclass procedure TField.CheckTypeSize(AValue: Longint);\r\n\r\nbegin\r\n If (AValue<>0) and Not IsBlob Then\r\n DatabaseErrorFmt(SInvalidFieldSize,[AValue]);\r\nend;\r\n\r\n// TField private methods\r\n\r\nprocedure TField.SetEditText(const AValue: string);\r\nbegin\r\n if Assigned(OnSetText) then\r\n OnSetText(Self, AValue)\r\n else\r\n SetText(AValue);\r\nend;\r\n\r\nfunction TField.GetEditText: String;\r\nbegin\r\n SetLength(Result, 0);\r\n if Assigned(OnGetText) then\r\n OnGetText(Self, Result, False)\r\n else\r\n GetText(Result, False);\r\nend;\r\n\r\nfunction TField.GetDisplayText: String;\r\nbegin\r\n SetLength(Result, 0);\r\n if Assigned(OnGetText) then\r\n OnGetText(Self, Result, True)\r\n else\r\n GetText(Result, True);\r\nend;\r\n\r\nprocedure TField.SetDisplayLabel(const AValue: string);\r\nbegin\r\n if FDisplayLabel<>AValue then\r\n begin\r\n FDisplayLabel:=AValue;\r\n PropertyChanged(true);\r\n end;\r\nend;\r\n\r\nprocedure TField.SetDisplayWidth(const AValue: Longint);\r\nbegin\r\n if FDisplayWidth<>AValue then\r\n begin\r\n FDisplayWidth:=AValue;\r\n PropertyChanged(True);\r\n end;\r\nend;\r\n\r\nfunction TField.GetDisplayWidth: integer;\r\nbegin\r\n if FDisplayWidth=0 then\r\n result:=GetDefaultWidth\r\n else\r\n result:=FDisplayWidth;\r\nend;\r\n\r\nprocedure TField.SetLookup(const AValue: Boolean);\r\nconst\r\n ValueToLookupMap: array[Boolean] of TFieldKind = (fkData, fkLookup);\r\nbegin\r\n FieldKind := ValueToLookupMap[AValue];\r\nend;\r\n\r\nprocedure TField.SetReadOnly(const AValue: Boolean);\r\nbegin\r\n if (FReadOnly<>AValue) then\r\n begin\r\n FReadOnly:=AValue;\r\n PropertyChanged(True);\r\n end;\r\nend;\r\n\r\nprocedure TField.SetVisible(const AValue: Boolean);\r\nbegin\r\n if FVisible<>AValue then\r\n begin\r\n FVisible:=AValue;\r\n PropertyChanged(True);\r\n end;\r\nend;\r\n\r\n\r\n{ ---------------------------------------------------------------------\r\n TStringField\r\n ---------------------------------------------------------------------}\r\n\r\n\r\nconstructor TStringField.Create(AOwner: TComponent);\r\n\r\nbegin\r\n Inherited Create(AOwner);\r\n SetDataType(ftString);\r\n FFixedChar := False;\r\n FTransliterate := False;\r\n FSize := 20;\r\nend;\r\n\r\nprocedure TStringField.SetFieldType(AValue: TFieldType);\r\nbegin\r\n if AValue in [ftString, ftFixedChar, ftWideString] then\r\n SetDataType(AValue);\r\nend;\r\n\r\nclass procedure TStringField.CheckTypeSize(AValue: Longint);\r\n\r\nbegin\r\n// A size of 0 is allowed, since for example Firebird allows\r\n// a query like: 'select '' as fieldname from table' which\r\n// results in a string with size 0.\r\n If (AValue<0) Then\r\n DatabaseErrorFmt(SInvalidFieldSize,[AValue])\r\nend;\r\n\r\nfunction TStringField.GetAsBoolean: Boolean;\r\n\r\nvar S : String;\r\n\r\nbegin\r\n S:=GetAsString;\r\n result := (Length(S)>0) and (Upcase(S[1]) in ['T',YesNoChars[True]]);\r\nend;\r\n\r\nfunction TStringField.GetAsDateTime: TDateTime;\r\n\r\nbegin\r\n Result:=StrToDateTime(GetAsString);\r\nend;\r\n\r\nfunction TStringField.GetAsFloat: Double;\r\n\r\nbegin\r\n Result:=StrToFloat(GetAsString);\r\nend;\r\n\r\nfunction TStringField.GetAsInteger: Longint;\r\n\r\nbegin\r\n Result:=StrToInt(GetAsString);\r\nend;\r\n\r\nfunction TStringField.GetAsLargeInt: NativeInt;\r\n\r\nbegin\r\n Result:=StrToInt64(GetAsString);\r\nend;\r\n\r\nfunction TStringField.GetAsString: String;\r\n\r\nVar\r\n V : JSValue;\r\n\r\nbegin\r\n V:=GetData;\r\n if isString(V) then\r\n Result := String(V)\r\n else\r\n Result:='';\r\nend;\r\n\r\n\r\nfunction TStringField.GetAsJSValue: JSValue;\r\n\r\nbegin\r\n Result:=GetData\r\nend;\r\n\r\n\r\nfunction TStringField.GetDefaultWidth: Longint;\r\n\r\nbegin\r\n result:=Size;\r\nend;\r\n\r\nprocedure TStringField.GetText(var AText: string; ADisplayText: Boolean);\r\n\r\nbegin\r\n AText:=GetAsString;\r\nend;\r\n\r\n\r\nprocedure TStringField.SetAsBoolean(AValue: Boolean);\r\n\r\nbegin\r\n If AValue Then\r\n SetAsString('T')\r\n else\r\n SetAsString('F');\r\nend;\r\n\r\nprocedure TStringField.SetAsDateTime(AValue: TDateTime);\r\n\r\nbegin\r\n SetAsString(DateTimeToStr(AValue));\r\nend;\r\n\r\nprocedure TStringField.SetAsFloat(AValue: Double);\r\n\r\nbegin\r\n SetAsString(FloatToStr(AValue));\r\nend;\r\n\r\nprocedure TStringField.SetAsInteger(AValue: Longint);\r\n\r\nbegin\r\n SetAsString(IntToStr(AValue));\r\nend;\r\n\r\nprocedure TStringField.SetAsLargeInt(AValue: NativeInt);\r\n\r\nbegin\r\n SetAsString(IntToStr(AValue));\r\nend;\r\n\r\n\r\nprocedure TStringField.SetAsString(const AValue: String);\r\nbegin\r\n SetData(AValue);\r\nend;\r\n\r\n\r\nprocedure TStringField.SetVarValue(const AValue: JSValue);\r\nbegin\r\n if isString(AVAlue) then\r\n SetAsString(String(AValue))\r\n else\r\n RaiseAccessError(SFieldValueError);\r\nend;\r\n\r\n\r\n{ ---------------------------------------------------------------------\r\n TNumericField\r\n ---------------------------------------------------------------------}\r\n\r\n\r\nconstructor TNumericField.Create(AOwner: TComponent);\r\n\r\nbegin\r\n Inherited Create(AOwner);\r\n AlignMent:=taRightJustify;\r\nend;\r\n\r\nclass procedure TNumericField.CheckTypeSize(AValue: Longint);\r\nbegin\r\n // This procedure is only added because some TDataset descendents have the\r\n // but that they set the Size property as if it is the DataSize property.\r\n // To avoid problems with those descendents, allow values <= 16.\r\n If (AValue>16) Then\r\n DatabaseErrorFmt(SInvalidFieldSize,[AValue]);\r\nend;\r\n\r\nprocedure TNumericField.RangeError(AValue, Min, Max: Double);\r\n\r\nbegin\r\n DatabaseErrorFmt(SRangeError,[AValue,Min,Max,FieldName]);\r\nend;\r\n\r\nprocedure TNumericField.SetDisplayFormat(const AValue: string);\r\n\r\nbegin\r\n If FDisplayFormat<>AValue then\r\n begin\r\n FDisplayFormat:=AValue;\r\n PropertyChanged(True);\r\n end;\r\nend;\r\n\r\nprocedure TNumericField.SetEditFormat(const AValue: string);\r\n\r\nbegin\r\n If FEditFormat<>AValue then\r\n begin\r\n FEditFormat:=AValue;\r\n PropertyChanged(True);\r\n end;\r\nend;\r\n\r\nfunction TNumericField.GetAsBoolean: Boolean;\r\nbegin\r\n Result:=GetAsInteger<>0;\r\nend;\r\n\r\nprocedure TNumericField.SetAsBoolean(AValue: Boolean);\r\nbegin\r\n SetAsInteger(ord(AValue));\r\nend;\r\n\r\n{ ---------------------------------------------------------------------\r\n TIntegerField\r\n ---------------------------------------------------------------------}\r\n\r\n\r\nconstructor TIntegerField.Create(AOwner: TComponent);\r\n\r\nbegin\r\n Inherited Create(AOwner);\r\n SetDataType(ftInteger);\r\n FMinRange:=Low(LongInt);\r\n FMaxRange:=High(LongInt);\r\n// MVC : Todo\r\n// FValidchars:=['+','-','0'..'9'];\r\nend;\r\n\r\nfunction TIntegerField.GetAsFloat: Double;\r\n\r\nbegin\r\n Result:=GetAsInteger;\r\nend;\r\n\r\nfunction TIntegerField.GetAsLargeInt: NativeInt;\r\nbegin\r\n Result:=GetAsInteger;\r\nend;\r\n\r\nfunction TIntegerField.GetAsInteger: Longint;\r\n\r\nbegin\r\n If Not GetValue(Result) then\r\n Result:=0;\r\nend;\r\n\r\nfunction TIntegerField.GetAsJSValue: JSValue;\r\n\r\nvar L : Longint;\r\n\r\nbegin\r\n If GetValue(L) then\r\n Result:=L\r\n else\r\n Result:=Null;\r\nend;\r\n\r\nfunction TIntegerField.GetAsString: string;\r\n\r\nvar L : Longint;\r\n\r\nbegin\r\n If GetValue(L) then\r\n Result:=IntTostr(L)\r\n else\r\n Result:='';\r\nend;\r\n\r\n\r\nprocedure TIntegerField.GetText(var AText: string; ADisplayText: Boolean);\r\n\r\nvar l : longint;\r\n fmt : string;\r\n\r\nbegin\r\n Atext:='';\r\n If Not GetValue(l) then exit;\r\n If ADisplayText or (FEditFormat='') then\r\n fmt:=FDisplayFormat\r\n else\r\n fmt:=FEditFormat;\r\n If length(fmt)<>0 then\r\n AText:=FormatFloat(fmt,L)\r\n else\r\n Str(L,AText);\r\nend;\r\n\r\nfunction TIntegerField.GetValue(var AValue: Longint): Boolean;\r\n\r\nvar\r\n V : JSValue;\r\n\r\nbegin\r\n V:=GetData;\r\n Result:=isInteger(V);\r\n if Result then\r\n AValue:=Longint(V);\r\nend;\r\n\r\nprocedure TIntegerField.SetAsLargeInt(AValue: NativeInt);\r\nbegin\r\n if (AValue>=FMinRange) and (AValue<=FMaxRange) then\r\n SetAsInteger(AValue)\r\n else\r\n RangeError(AValue,FMinRange,FMaxRange);\r\nend;\r\n\r\nprocedure TIntegerField.SetAsFloat(AValue: Double);\r\n\r\nbegin\r\n SetAsInteger(Round(AValue));\r\nend;\r\n\r\nprocedure TIntegerField.SetAsInteger(AValue: Longint);\r\nbegin\r\n If CheckRange(AValue) then\r\n SetData(AValue)\r\n else\r\n if (FMinValue<>0) or (FMaxValue<>0) then\r\n RangeError(AValue,FMinValue,FMaxValue)\r\n else\r\n RangeError(AValue,FMinRange,FMaxRange);\r\nend;\r\n\r\nprocedure TIntegerField.SetVarValue(const AValue: JSValue);\r\nbegin\r\n if IsInteger(aValue) then\r\n SetAsInteger(Integer(AValue))\r\n else\r\n RaiseAccessError(SInteger);\r\nend;\r\n\r\nprocedure TIntegerField.SetAsString(const AValue: string);\r\n\r\nvar L,Code : longint;\r\n\r\nbegin\r\n If length(AValue)=0 then\r\n Clear\r\n else\r\n begin\r\n Val(AValue,L,Code);\r\n If Code=0 then\r\n SetAsInteger(L)\r\n else\r\n DatabaseErrorFmt(SNotAnInteger,[AValue]);\r\n end;\r\nend;\r\n\r\nFunction TIntegerField.CheckRange(AValue : longint) : Boolean;\r\n\r\nbegin\r\n if (FMinValue<>0) or (FMaxValue<>0) then\r\n Result := (AValue>=FMinValue) and (AValue<=FMaxValue)\r\n else\r\n Result := (AValue>=FMinRange) and (AValue<=FMaxRange);\r\nend;\r\n\r\nProcedure TIntegerField.SetMaxValue (AValue : longint);\r\n\r\nbegin\r\n If (AValue>=FMinRange) and (AValue<=FMaxRange) then\r\n FMaxValue:=AValue\r\n else\r\n RangeError(AValue,FMinRange,FMaxRange);\r\nend;\r\n\r\nProcedure TIntegerField.SetMinValue (AValue : longint);\r\n\r\nbegin\r\n If (AValue>=FMinRange) and (AValue<=FMaxRange) then\r\n FMinValue:=AValue\r\n else\r\n RangeError(AValue,FMinRange,FMaxRange);\r\nend;\r\n\r\n{ ---------------------------------------------------------------------\r\n TWordField\r\n ---------------------------------------------------------------------}\r\n\r\n\r\nprocedure TWordField.SetAsWord(AValue: word);\r\nbegin\r\n SetAsInteger(AValue);\r\nend;\r\n\r\nfunction TWordField.GetAsWord: word;\r\nvar\r\n w: longint;\r\nbegin\r\n if not GetValue(w) then\r\n Result := 0\r\n else\r\n Result := w;\r\nend;\r\n\r\n{ ---------------------------------------------------------------------\r\n TLargeintField\r\n ---------------------------------------------------------------------}\r\n\r\n\r\nconstructor TLargeintField.Create(AOwner: TComponent);\r\n\r\nbegin\r\n Inherited Create(AOwner);\r\n SetDataType(ftLargeint);\r\n FMinRange:=Low(NativeInt);\r\n FMaxRange:=High(NativeInt);\r\n// MVC : Todo\r\n// FValidchars:=['+','-','0'..'9'];\r\nend;\r\n\r\nfunction TLargeintField.GetAsFloat: Double;\r\n\r\nbegin\r\n Result:=GetAsLargeInt;\r\nend;\r\n\r\nfunction TLargeintField.GetAsLargeInt: NativeInt;\r\n\r\nbegin\r\n If Not GetValue(Result) then\r\n Result:=0;\r\nend;\r\n\r\nfunction TLargeIntField.GetAsJSValue: JSValue;\r\n\r\nvar L : NativeInt;\r\n\r\nbegin\r\n If GetValue(L) then\r\n Result:=L\r\n else\r\n Result:=Null;\r\nend;\r\n\r\nfunction TLargeintField.GetAsInteger: Longint;\r\n\r\nbegin\r\n Result:=GetAsLargeInt;\r\nend;\r\n\r\nfunction TLargeintField.GetAsString: string;\r\n\r\nvar L : NativeInt;\r\n\r\nbegin\r\n If GetValue(L) then\r\n Result:=IntTostr(L)\r\n else\r\n Result:='';\r\nend;\r\n\r\nprocedure TLargeintField.GetText(var AText: string; ADisplayText: Boolean);\r\n\r\nvar l : NativeInt;\r\n fmt : string;\r\n\r\nbegin\r\n Atext:='';\r\n If Not GetValue(l) then exit;\r\n If ADisplayText or (FEditFormat='') then\r\n fmt:=FDisplayFormat\r\n else\r\n fmt:=FEditFormat;\r\n If length(fmt)<>0 then\r\n AText:=FormatFloat(fmt,L)\r\n else\r\n Str(L,AText);\r\nend;\r\n\r\nfunction TLargeintField.GetValue(var AValue: NativeInt): Boolean;\r\n\r\nvar\r\n P : JSValue;\r\n\r\nbegin\r\n P:=GetData;\r\n Result:=isInteger(P);\r\n if Result then\r\n AValue:=NativeInt(P);\r\nend;\r\n\r\nprocedure TLargeintField.SetAsFloat(AValue: Double);\r\n\r\nbegin\r\n SetAsLargeInt(Round(AValue));\r\nend;\r\n\r\nprocedure TLargeintField.SetAsLargeInt(AValue: NativeInt);\r\n\r\nbegin\r\n If CheckRange(AValue) then\r\n SetData(AValue)\r\n else\r\n RangeError(AValue,FMinValue,FMaxValue);\r\nend;\r\n\r\nprocedure TLargeintField.SetAsInteger(AValue: Longint);\r\n\r\nbegin\r\n SetAsLargeInt(AValue);\r\nend;\r\n\r\nprocedure TLargeintField.SetAsString(const AValue: string);\r\n\r\nvar L : NativeInt;\r\n code : Longint;\r\n\r\nbegin\r\n If length(AValue)=0 then\r\n Clear\r\n else\r\n begin\r\n Val(AValue,L,Code);\r\n If Code=0 then\r\n SetAsLargeInt(L)\r\n else\r\n DatabaseErrorFmt(SNotAnInteger,[AValue]);\r\n end;\r\nend;\r\n\r\nprocedure TLargeintField.SetVarValue(const AValue: JSValue);\r\nbegin\r\n if IsInteger(Avalue) then\r\n SetAsLargeInt(NativeInt(AValue))\r\n else\r\n RaiseAccessError(SLargeInt);\r\nend;\r\n\r\nFunction TLargeintField.CheckRange(AValue : NativeInt) : Boolean;\r\n\r\nbegin\r\n if (FMinValue<>0) or (FMaxValue<>0) then\r\n Result := (AValue>=FMinValue) and (AValue<=FMaxValue)\r\n else\r\n Result := (AValue>=FMinRange) and (AValue<=FMaxRange);\r\nend;\r\n\r\nProcedure TLargeintField.SetMaxValue (AValue : NativeInt);\r\n\r\nbegin\r\n If (AValue>=FMinRange) and (AValue<=FMaxRange) then\r\n FMaxValue:=AValue\r\n else\r\n RangeError(AValue,FMinRange,FMaxRange);\r\nend;\r\n\r\nProcedure TLargeintField.SetMinValue (AValue : NativeInt);\r\n\r\nbegin\r\n If (AValue>=FMinRange) and (AValue<=FMaxRange) then\r\n FMinValue:=AValue\r\n else\r\n RangeError(AValue,FMinRange,FMaxRange);\r\nend;\r\n\r\n\r\n{ TAutoIncField }\r\n\r\nconstructor TAutoIncField.Create(AOwner: TComponent);\r\n\r\nbegin\r\n Inherited Create(AOWner);\r\n SetDataType(ftAutoInc);\r\nend;\r\n\r\nProcedure TAutoIncField.SetAsInteger(AValue: Longint);\r\n\r\nbegin\r\n // Some databases allows insertion of explicit values into identity columns\r\n // (some of them also allows (some not) updating identity columns)\r\n // So allow it at client side and leave check for server side\r\n //if not(FDataSet.State in [dsFilter,dsSetKey,dsInsert]) then\r\n // DataBaseError(SCantSetAutoIncFields);\r\n inherited;\r\nend;\r\n\r\n{ TFloatField }\r\n\r\nprocedure TFloatField.SetCurrency(const AValue: Boolean);\r\nbegin\r\n if FCurrency=AValue then exit;\r\n FCurrency:=AValue;\r\nend;\r\n\r\nprocedure TFloatField.SetPrecision(const AValue: Longint);\r\nbegin\r\n if (AValue = -1) or (AValue > 1) then\r\n FPrecision := AValue\r\n else\r\n FPrecision := 2;\r\nend;\r\n\r\nfunction TFloatField.GetAsFloat: Double;\r\n\r\nVar\r\n P : JSValue;\r\n\r\nbegin\r\n P:=GetData;\r\n If IsNumber(P) then\r\n Result:=Double(P)\r\n else\r\n Result:=0.0;\r\nend;\r\n\r\nfunction TFloatField.GetAsJSValue: JSValue;\r\n\r\nvar\r\n P : JSValue;\r\n\r\nbegin\r\n P:=GetData;\r\n if IsNumber(P) then\r\n Result:=P\r\n else\r\n Result:=Null;\r\nend;\r\n\r\nfunction TFloatField.GetAsLargeInt: NativeInt;\r\nbegin\r\n Result:=Round(GetAsFloat);\r\nend;\r\n\r\nfunction TFloatField.GetAsInteger: Longint;\r\n\r\nbegin\r\n Result:=Round(GetAsFloat);\r\nend;\r\n\r\nfunction TFloatField.GetAsString: string;\r\n\r\nvar\r\n P : JSValue;\r\n\r\nbegin\r\n P:=GetData;\r\n if IsNumber(P) then\r\n Result:=FloatToStr(Double(P))\r\n else\r\n Result:='';\r\nend;\r\n\r\nprocedure TFloatField.GetText(var AText: string; ADisplayText: Boolean);\r\n\r\nVar\r\n fmt : string;\r\n E : Double;\r\n Digits : integer;\r\n ff: TFloatFormat;\r\n P : JSValue;\r\n\r\nbegin\r\n AText:='';\r\n P:=GetData;\r\n if Not IsNumber(P) then\r\n exit;\r\n E:=Double(P);\r\n If ADisplayText or (Length(FEditFormat) = 0) Then\r\n Fmt:=FDisplayFormat\r\n else\r\n Fmt:=FEditFormat;\r\n \r\n Digits := 0;\r\n if not FCurrency then\r\n ff := ffGeneral\r\n else\r\n begin\r\n Digits := 2;\r\n ff := ffFixed;\r\n end;\r\n\r\n\r\n If fmt<>'' then\r\n AText:=FormatFloat(fmt,E)\r\n else\r\n AText:=FloatToStrF(E,ff,FPrecision,Digits);\r\nend;\r\n\r\nprocedure TFloatField.SetAsFloat(AValue: Double);\r\n\r\nbegin\r\n If CheckRange(AValue) then\r\n SetData(AValue)\r\n else\r\n RangeError(AValue,FMinValue,FMaxValue);\r\nend;\r\n\r\nprocedure TFloatField.SetAsLargeInt(AValue: NativeInt);\r\nbegin\r\n SetAsFloat(AValue);\r\nend;\r\n\r\nprocedure TFloatField.SetAsInteger(AValue: Longint);\r\n\r\nbegin\r\n SetAsFloat(AValue);\r\nend;\r\n\r\nprocedure TFloatField.SetAsString(const AValue: string);\r\n\r\nvar f : Double;\r\n\r\nbegin\r\n If (AValue='') then\r\n Clear\r\n else \r\n begin\r\n If not TryStrToFloat(AValue,F) then\r\n DatabaseErrorFmt(SNotAFloat, [AValue]);\r\n SetAsFloat(f);\r\n end;\r\nend;\r\n\r\nprocedure TFloatField.SetVarValue(const AValue: JSValue);\r\nbegin\r\n if IsNumber(aValue) then\r\n SetAsFloat(Double(AValue))\r\n else\r\n RaiseAccessError('Float');\r\nend;\r\n\r\nconstructor TFloatField.Create(AOwner: TComponent);\r\n\r\nbegin\r\n Inherited Create(AOwner);\r\n SetDataType(ftFloat);\r\n FPrecision:=15;\r\n// MVC\r\n// FValidChars := [DecimalSeparator, '+', '-', '0'..'9', 'E', 'e'];\r\nend;\r\n\r\nFunction TFloatField.CheckRange(AValue : Double) : Boolean;\r\n\r\nbegin\r\n If (FMinValue<>0) or (FMaxValue<>0) then\r\n Result:=(AValue>=FMinValue) and (AValue<=FMaxValue)\r\n else\r\n Result:=True;\r\nend;\r\n\r\n{ TBooleanField }\r\n\r\nfunction TBooleanField.GetAsBoolean: Boolean;\r\n\r\nvar\r\n P : JSValue;\r\n\r\nbegin\r\n P:=GetData;\r\n if isBoolean(P) then\r\n Result:=Boolean(P)\r\n else\r\n Result:=False;\r\nend;\r\n\r\nfunction TBooleanField.GetAsJSValue: JSValue;\r\n\r\nvar\r\n P : JSValue;\r\n\r\nbegin\r\n P:=GetData;\r\n if isBoolean(P) then\r\n Result:=Boolean(P)\r\n else\r\n Result:=Null;\r\nend;\r\n\r\nfunction TBooleanField.GetAsString: string;\r\n\r\nvar\r\n P : JSValue;\r\n\r\nbegin\r\n P:=GetData;\r\n if isBoolean(P) then\r\n Result:=FDisplays[False,Boolean(P)]\r\n else\r\n result:='';\r\nend;\r\n\r\nfunction TBooleanField.GetDefaultWidth: Longint;\r\n\r\nbegin\r\n Result:=Length(FDisplays[false,false]);\r\n If Result0);\r\nend;\r\n\r\nprocedure TBooleanField.SetAsBoolean(AValue: Boolean);\r\n\r\nbegin\r\n SetData(AValue);\r\nend;\r\n\r\nprocedure TBooleanField.SetAsString(const AValue: string);\r\n\r\nvar Temp : string;\r\n\r\nbegin\r\n Temp:=UpperCase(AValue);\r\n if Temp='' then\r\n Clear\r\n else if pos(Temp, FDisplays[True,True])=1 then\r\n SetAsBoolean(True)\r\n else if pos(Temp, FDisplays[True,False])=1 then\r\n SetAsBoolean(False)\r\n else\r\n DatabaseErrorFmt(SNotABoolean,[AValue]);\r\nend;\r\n\r\nprocedure TBooleanField.SetVarValue(const AValue: JSValue);\r\nbegin\r\n if isBoolean(aValue) then\r\n SetAsBoolean(Boolean(AValue))\r\n else if isNumber(aValue) then\r\n SetAsBoolean(Double(AValue)<>0)\r\nend;\r\n\r\nconstructor TBooleanField.Create(AOwner: TComponent);\r\n\r\nbegin\r\n Inherited Create(AOwner);\r\n SetDataType(ftBoolean);\r\n DisplayValues:='True;False';\r\nend;\r\n\r\nProcedure TBooleanField.SetDisplayValues(const AValue : String);\r\n\r\nvar I : longint;\r\n\r\nbegin\r\n If FDisplayValues<>AValue then\r\n begin\r\n I:=Pos(';',AValue);\r\n If (I<2) or (I=Length(AValue)) then\r\n DatabaseErrorFmt(SInvalidDisplayValues,[AValue]);\r\n FdisplayValues:=AValue;\r\n // Store display values and their uppercase equivalents;\r\n FDisplays[False,True]:=Copy(AValue,1,I-1);\r\n FDisplays[True,True]:=UpperCase(FDisplays[False,True]);\r\n FDisplays[False,False]:=Copy(AValue,I+1,Length(AValue)-i);\r\n FDisplays[True,False]:=UpperCase(FDisplays[False,False]);\r\n PropertyChanged(True);\r\n end;\r\nend;\r\n\r\n{ TDateTimeField }\r\n\r\nprocedure TDateTimeField.SetDisplayFormat(const AValue: string);\r\nbegin\r\n if FDisplayFormat<>AValue then begin\r\n FDisplayFormat:=AValue;\r\n PropertyChanged(True);\r\n end;\r\nend;\r\n\r\nfunction TDateTimeField.ConvertToDateTime(aValue: JSValue; aRaiseError: Boolean): TDateTime;\r\nbegin\r\n if JS.isNull(aValue) then\r\n Result:=0\r\n else if Assigned(Dataset) then\r\n Result:=Dataset.ConvertToDateTime(Self,aValue,aRaiseError)\r\n else\r\n Result:=TDataset.DefaultConvertToDateTime(Self,aValue,aRaiseError);\r\nend;\r\n\r\nfunction TDateTimeField.DateTimeToNativeDateTime(aValue: TDateTime): JSValue;\r\nbegin\r\n if Assigned(Dataset) then\r\n Result:=Dataset.ConvertDateTimeToNative(Self,aValue)\r\n else\r\n Result:=TDataset.DefaultConvertDateTimeToNative(Self,aValue);\r\nend;\r\n\r\nfunction TDateTimeField.GetAsDateTime: TDateTime;\r\n\r\nbegin\r\n Result:=ConvertToDateTime(GetData,False);\r\nend;\r\n\r\nprocedure TDateTimeField.SetVarValue(const AValue: JSValue);\r\n\r\nbegin\r\n SetAsDateTime(ConvertToDateTime(aValue,True));\r\nend;\r\n\r\nfunction TDateTimeField.GetAsJSValue: JSValue;\r\n\r\nbegin\r\n Result:=GetData;\r\n if Not isString(Result) then\r\n Result:=Null;\r\nend;\r\n\r\nfunction TDateTimeField.GetDataSize: Integer;\r\nbegin\r\n Result:=inherited GetDataSize;\r\nend;\r\n\r\nfunction TDateTimeField.GetAsFloat: Double;\r\n\r\nbegin\r\n Result:=GetAsdateTime;\r\nend;\r\n\r\n\r\nfunction TDateTimeField.GetAsString: string;\r\n\r\nbegin\r\n GetText(Result,False);\r\nend;\r\n\r\n\r\nProcedure TDateTimeField.GetText(var AText: string; ADisplayText: Boolean);\r\n\r\nvar\r\n R : TDateTime;\r\n F : String;\r\n\r\nbegin\r\n R:=ConvertToDateTime(GetData,false);\r\n If (R=0) then\r\n AText:=''\r\n else\r\n begin\r\n If (ADisplayText) and (Length(FDisplayFormat)<>0) then\r\n F:=FDisplayFormat\r\n else\r\n Case DataType of\r\n ftTime : F:=FormatSettings.LongTimeFormat;\r\n ftDate : F:=FormatSettings.ShortDateFormat;\r\n else\r\n F:='c'\r\n end;\r\n AText:=FormatDateTime(F,R);\r\n end;\r\nend;\r\n\r\n\r\nprocedure TDateTimeField.SetAsDateTime(AValue: TDateTime);\r\n\r\nbegin\r\n SetData(DateTimeToNativeDateTime(aValue));\r\nend;\r\n\r\n\r\nprocedure TDateTimeField.SetAsFloat(AValue: Double);\r\n\r\nbegin\r\n SetAsDateTime(AValue);\r\nend;\r\n\r\n\r\nprocedure TDateTimeField.SetAsString(const AValue: string);\r\n\r\nvar R : TDateTime;\r\n\r\nbegin\r\n if AValue<>'' then\r\n begin\r\n R:=StrToDateTime(AValue);\r\n SetData(DateTimeToNativeDateTime(R));\r\n end\r\n else\r\n SetData(Null);\r\nend;\r\n\r\n\r\nconstructor TDateTimeField.Create(AOwner: TComponent);\r\n\r\nbegin\r\n Inherited Create(AOwner);\r\n SetDataType(ftDateTime);\r\nend;\r\n\r\n\r\n{ TDateField }\r\n\r\nconstructor TDateField.Create(AOwner: TComponent);\r\n\r\nbegin\r\n Inherited Create(AOwner);\r\n SetDataType(ftDate);\r\nend;\r\n\r\n\r\n{ TTimeField }\r\n\r\nconstructor TTimeField.Create(AOwner: TComponent);\r\n\r\nbegin\r\n Inherited Create(AOwner);\r\n SetDataType(ftTime);\r\nend;\r\n\r\nprocedure TTimeField.SetAsString(const AValue: string);\r\n\r\nvar\r\n R : TDateTime;\r\n\r\nbegin\r\n if AValue<>'' then\r\n begin\r\n R:=StrToTime(AValue);\r\n SetData(DateTimeToNativeDateTime(R));\r\n end\r\n else\r\n SetData(Null);\r\nend;\r\n\r\n\r\n\r\n{ TBinaryField }\r\n\r\nclass procedure TBinaryField.CheckTypeSize(AValue: Longint);\r\n\r\nbegin\r\n // Just check for really invalid stuff; actual size is\r\n // dependent on the record...\r\n If AValue<1 then\r\n DatabaseErrorFmt(SInvalidFieldSize,[AValue]);\r\nend;\r\n\r\nfunction TBinaryField.BlobToBytes(aValue: JSValue): TBytes;\r\n\r\nbegin\r\n if Assigned(Dataset) then\r\n Result:=DataSet.BlobDataToBytes(aValue)\r\n else\r\n Result:=TDataSet.DefaultBlobDataToBytes(aValue)\r\nend;\r\n\r\nfunction TBinaryField.BytesToBlob(aValue: TBytes): JSValue;\r\n\r\nbegin\r\n if Assigned(Dataset) then\r\n Result:=DataSet.BytesToBlobData(aValue)\r\n else\r\n Result:=TDataSet.DefaultBytesToBlobData(aValue)\r\nend;\r\n\r\nfunction TBinaryField.GetAsString: string;\r\n\r\nvar\r\n V : JSValue;\r\n S : TBytes;\r\n I : Integer;\r\n\r\nbegin\r\n Result := '';\r\n V:=GetData;\r\n if V<>Null then\r\n if (DataType in [ftMemo, ftGraphic]) then\r\n Result:=String(V)\r\n else\r\n begin\r\n S:=BlobToBytes(V);\r\n For I:=0 to Length(S)-1 do\r\n Result:=TJSString(Result).Concat(TJSString.fromCharCode(S[I]));\r\n end;\r\nend;\r\n\r\n\r\nfunction TBinaryField.GetAsJSValue: JSValue;\r\n\r\nbegin\r\n Result:=GetData;\r\nend;\r\n\r\n\r\nfunction TBinaryField.GetValue(var AValue: TBytes): Boolean;\r\nvar\r\n V : JSValue;\r\nbegin\r\n V:=GetData;\r\n Result:=(V<>Null);\r\n if Result then\r\n AValue:=BlobToBytes(V)\r\n else\r\n SetLength(AValue,0);\r\nend;\r\n\r\n\r\n\r\nprocedure TBinaryField.SetAsString(const AValue: string);\r\n\r\nvar\r\n B : TBytes;\r\n i : Integer;\r\n\r\nbegin\r\n if DataType in [ftMemo, ftGraphic] then\r\n SetData(aValue)\r\n else\r\n begin\r\n SetLength(B, Length(aValue));\r\n For I:=1 to Length(aValue) do\r\n B[i-1]:=Ord(aValue[i]);\r\n SetAsBytes(B);\r\n end;\r\nend;\r\n\r\n\r\nprocedure TBinaryField.SetVarValue(const AValue: JSValue);\r\n\r\nvar\r\n B: TBytes;\r\n I,Len: integer;\r\n\r\nbegin\r\n if IsArray(AValue) then\r\n begin\r\n Len:=Length(TJSValueDynArray(AValue));\r\n SetLength(B, Len);\r\n For I:=1 to Len-1 do\r\n B[i]:=TBytes(AValue)[i];\r\n SetAsBytes(B);\r\n end\r\n else if IsString(AValue) then\r\n SetAsString(String(AValue))\r\n else\r\n RaiseAccessError('Blob');\r\nend;\r\n\r\nfunction TBinaryField.GetAsBytes: TBytes;\r\n\r\nVar\r\n V : JSValue;\r\n\r\nbegin\r\n V:=GetData;\r\n if Assigned(V) then\r\n Result:=BlobToBytes(V)\r\n else\r\n SetLength(Result,0);\r\nend;\r\n\r\nprocedure TBinaryField.SetAsBytes(const aValue: TBytes);\r\nbegin\r\n SetData(BytesToBlob(aValue))\r\nend;\r\n\r\n\r\nconstructor TBinaryField.Create(AOwner: TComponent);\r\n\r\nbegin\r\n Inherited Create(AOwner);\r\nend;\r\n\r\n\r\n\r\n{ TBlobField }\r\n\r\nconstructor TBlobField.Create(AOwner: TComponent);\r\n\r\nbegin\r\n Inherited Create(AOwner);\r\n SetDataType(ftBlob);\r\nend;\r\n\r\nprocedure TBlobField.Clear;\r\nbegin\r\n SetData(Null);\r\nend;\r\n\r\n\r\nfunction TBlobField.GetBlobType: TBlobType;\r\nbegin\r\n Result := TBlobType(DataType);\r\nend;\r\n\r\nprocedure TBlobField.SetBlobType(AValue: TBlobType);\r\nbegin\r\n if BlobType <> AValue then\r\n begin\r\n SetFieldType(AValue);\r\n PropertyChanged(True);\r\n end;\r\nend;\r\n\r\nprocedure TBlobField.SetDisplayValue(AValue: TBlobDisplayValue);\r\nbegin\r\n if FDisplayValue=AValue then Exit;\r\n FDisplayValue:=AValue;\r\n PropertyChanged(False);\r\nend;\r\n\r\nclass procedure TBlobField.CheckTypeSize(AValue: Longint);\r\nbegin\r\n If AValue<0 then\r\n DatabaseErrorFmt(SInvalidFieldSize,[AValue]);\r\nend;\r\n\r\nfunction TBlobField.GetBlobSize: Longint;\r\n\r\nvar\r\n B : TBytes;\r\n\r\nbegin\r\n B:=GetAsBytes;\r\n Result:=Length(B);\r\nend;\r\n\r\n\r\nfunction TBlobField.GetIsNull: Boolean;\r\n\r\nbegin\r\n if Not Modified then\r\n Result:= inherited GetIsNull\r\n else\r\n Result:=GetBlobSize=0;\r\nend;\r\n\r\nprocedure TBlobField.GetText(var AText: string; ADisplayText: Boolean);\r\nbegin\r\n Case FDisplayValue of\r\n dvClass:\r\n aText:=GetClassDesc;\r\n dvFull:\r\n aText:=GetAsString;\r\n dvClip:\r\n begin\r\n aText:=GetAsString;\r\n if aDisplayText and (Length(aText)>DisplayWidth) then\r\n aText:=Copy(Text,1,DisplayWidth) + '...';\r\n end;\r\n dvFit:\r\n begin\r\n aText:=GetAsString;\r\n if aDisplayText and (Length(aText)>DisplayWidth) then\r\n aText:=GetClassDesc;\r\n end;\r\n end;\r\nend;\r\n\r\nclass function TBlobField.IsBlob: Boolean;\r\n\r\nbegin\r\n Result:=True;\r\nend;\r\n\r\nprocedure TBlobField.SetFieldType(AValue: TFieldType);\r\nbegin\r\n if AValue in [Low(TBlobType)..High(TBlobType)] then\r\n SetDataType(AValue);\r\nend;\r\n\r\n{ TGraphicField }\r\n\r\nconstructor TGraphicField.Create(AOwner: TComponent);\r\nbegin\r\n inherited Create(AOwner);\r\n SetDataType(ftGraphic);\r\nend;\r\n\r\n{ TMemoField }\r\n\r\nconstructor TMemoField.Create(AOwner: TComponent);\r\nbegin\r\n inherited Create(AOwner);\r\n SetDataType(ftMemo);\r\nend;\r\n\r\nprocedure TMemoField.GetText(var AText: string; ADisplayText: Boolean);\r\nbegin\r\n AText := inherited GetAsString;\r\nend;\r\n\r\n\r\n{ TVariantField }\r\n\r\nconstructor TVariantField.Create(AOwner: TComponent);\r\nbegin\r\n inherited Create(AOwner);\r\n SetDataType(ftVariant);\r\nend;\r\n\r\nclass procedure TVariantField.CheckTypeSize(aValue: Integer);\r\nbegin\r\n { empty }\r\nend;\r\n\r\nfunction TVariantField.GetAsBoolean: Boolean;\r\nbegin\r\n Result :=GetAsJSValue=True;\r\nend;\r\n\r\nfunction TVariantField.GetAsDateTime: TDateTime;\r\n\r\nVar\r\n V : JSValue;\r\n\r\nbegin\r\n V:=GetData;\r\n if Assigned(Dataset) then\r\n Result:=Dataset.ConvertToDateTime(Self,V,True)\r\n else\r\n Result:=TDataset.DefaultConvertToDateTime(Self,V,True)\r\nend;\r\n\r\nfunction TVariantField.GetAsFloat: Double;\r\n\r\nVar\r\n V : JSValue;\r\n\r\nbegin\r\n V:=GetData;\r\n if isNumber(V) then\r\n Result:=Double(V)\r\n else if isString(V) then\r\n Result:=parsefloat(String(V))\r\n else\r\n RaiseAccessError('Variant');\r\nend;\r\n\r\nfunction TVariantField.GetAsInteger: Longint;\r\nVar\r\n V : JSValue;\r\n\r\nbegin\r\n V:=GetData;\r\n if isInteger(V) then\r\n Result:=Integer(V)\r\n else if isString(V) then\r\n Result:=parseInt(String(V))\r\n else\r\n RaiseAccessError('Variant');\r\nend;\r\n\r\nfunction TVariantField.GetAsString: string;\r\nVar\r\n V : JSValue;\r\n\r\nbegin\r\n V:=GetData;\r\n if isInteger(V) then\r\n Result:=IntToStr(Integer(V))\r\n else if isNumber(V) then\r\n Result:=FloatToStr(Double(V))\r\n else if isString(V) then\r\n Result:=String(V)\r\n else\r\n RaiseAccessError('Variant');\r\nend;\r\n\r\n\r\nfunction TVariantField.GetAsJSValue: JSValue;\r\nbegin\r\n Result:=GetData;\r\nend;\r\n\r\nprocedure TVariantField.SetAsBoolean(aValue: Boolean);\r\nbegin\r\n SetVarValue(aValue);\r\nend;\r\n\r\nprocedure TVariantField.SetAsDateTime(aValue: TDateTime);\r\nbegin\r\n SetVarValue(aValue);\r\nend;\r\n\r\nprocedure TVariantField.SetAsFloat(aValue: Double);\r\nbegin\r\n SetVarValue(aValue);\r\nend;\r\n\r\nprocedure TVariantField.SetAsInteger(AValue: Longint);\r\nbegin\r\n SetVarValue(aValue);\r\nend;\r\n\r\nprocedure TVariantField.SetAsString(const aValue: string);\r\nbegin\r\n SetVarValue(aValue);\r\nend;\r\n\r\nprocedure TVariantField.SetVarValue(const aValue: JSValue);\r\nbegin\r\n SetData(aValue);\r\nend;\r\n\r\n{ TFieldsEnumerator }\r\n\r\nfunction TFieldsEnumerator.GetCurrent: TField;\r\nbegin\r\n Result := FFields[FPosition];\r\nend;\r\n\r\nconstructor TFieldsEnumerator.Create(AFields: TFields);\r\nbegin\r\n inherited Create;\r\n FFields := AFields;\r\n FPosition := -1;\r\nend;\r\n\r\nfunction TFieldsEnumerator.MoveNext: Boolean;\r\nbegin\r\n inc(FPosition);\r\n Result := FPosition < FFields.Count;\r\nend;\r\n\r\n{ TFields }\r\n\r\nconstructor TFields.Create(ADataset: TDataset);\r\n\r\nbegin\r\n FDataSet:=ADataset;\r\n FFieldList:=TFpList.Create;\r\n FValidFieldKinds:=[fkData..fkInternalcalc];\r\nend;\r\n\r\ndestructor TFields.Destroy;\r\n\r\nbegin\r\n if Assigned(FFieldList) then\r\n Clear;\r\n FreeAndNil(FFieldList);\r\n inherited Destroy;\r\nend;\r\n\r\nprocedure TFields.ClearFieldDefs;\r\n\r\nVar\r\n i : Integer;\r\n\r\nbegin\r\n For I:=0 to Count-1 do\r\n Fields[i].FFieldDef:=Nil;\r\nend;\r\n\r\nprocedure TFields.Changed;\r\n\r\nbegin\r\n // Removed FDataSet.Active check, needed for Persistent fields (see bug ID 30954)\r\n if (FDataSet <> nil) and not (csDestroying in FDataSet.ComponentState) then\r\n FDataSet.DataEvent(deFieldListChange, 0);\r\n If Assigned(FOnChange) then\r\n FOnChange(Self);\r\nend;\r\n\r\nprocedure TFields.CheckfieldKind(Fieldkind: TFieldKind; Field: TField);\r\n\r\nbegin\r\n If Not (FieldKind in ValidFieldKinds) Then\r\n DatabaseErrorFmt(SInvalidFieldKind,[Field.FieldName]);\r\nend;\r\n\r\nfunction TFields.GetCount: Longint;\r\n\r\nbegin\r\n Result:=FFieldList.Count;\r\nend;\r\n\r\n\r\nfunction TFields.GetField(Index: Integer): TField;\r\n\r\nbegin\r\n Result:=Tfield(FFieldList[Index]);\r\nend;\r\n\r\nprocedure TFields.SetField(Index: Integer; Value: TField);\r\nbegin\r\n Fields[Index].Assign(Value);\r\nend;\r\n\r\nprocedure TFields.SetFieldIndex(Field: TField; Value: Integer);\r\nvar Old : Longint;\r\nbegin\r\n Old := FFieldList.indexOf(Field);\r\n If Old=-1 then\r\n Exit;\r\n // Check value\r\n If Value<0 Then Value:=0;\r\n If Value>=Count then Value:=Count-1;\r\n If Value<>Old then\r\n begin\r\n FFieldList.Delete(Old);\r\n FFieldList.Insert(Value,Field);\r\n Field.PropertyChanged(True);\r\n Changed;\r\n end;\r\nend;\r\n\r\nprocedure TFields.Add(Field: TField);\r\n\r\nbegin\r\n CheckFieldName(Field.FieldName);\r\n FFieldList.Add(Field);\r\n Field.FFields:=Self;\r\n Changed;\r\nend;\r\n\r\nprocedure TFields.CheckFieldName(const Value: String);\r\n\r\nbegin\r\n If FindField(Value)<>Nil then\r\n DataBaseErrorFmt(SDuplicateFieldName,[Value],FDataset);\r\nend;\r\n\r\nprocedure TFields.CheckFieldNames(const Value: String);\r\n\r\nvar\r\n N: String;\r\n StrPos: Integer;\r\n\r\nbegin\r\n if Value = '' then\r\n Exit;\r\n StrPos := 1;\r\n repeat\r\n N := ExtractFieldName(Value, StrPos);\r\n // Will raise an error if no such field...\r\n FieldByName(N);\r\n until StrPos > Length(Value);\r\nend;\r\n\r\nprocedure TFields.Clear;\r\nvar\r\n AField: TField;\r\nbegin\r\n while FFieldList.Count > 0 do \r\n begin\r\n AField := TField(FFieldList.Last);\r\n AField.FDataSet := Nil;\r\n AField.Free;\r\n FFieldList.Delete(FFieldList.Count - 1);\r\n end;\r\n Changed;\r\nend;\r\n\r\nfunction TFields.FindField(const Value: String): TField;\r\nvar S : String;\r\n I : longint;\r\nbegin\r\n S:=UpperCase(Value);\r\n For I:=0 To FFieldList.Count-1 do\r\n begin\r\n Result:=TField(FFieldList[I]);\r\n if S=UpperCase(Result.FieldName) then\r\n begin\r\n {$ifdef dsdebug}\r\n Writeln ('Found field ',Value);\r\n {$endif}\r\n Exit;\r\n end;\r\n end;\r\n Result:=Nil;\r\nend;\r\n\r\nfunction TFields.FieldByName(const Value: String): TField;\r\n\r\nbegin\r\n Result:=FindField(Value);\r\n If result=Nil then\r\n DatabaseErrorFmt(SFieldNotFound,[Value],FDataset);\r\nend;\r\n\r\nfunction TFields.FieldByNumber(FieldNo: Integer): TField;\r\nvar i : Longint;\r\nbegin\r\n For I:=0 to FFieldList.Count-1 do\r\n begin\r\n Result:=TField(FFieldList[I]);\r\n if FieldNo=Result.FieldNo then\r\n Exit;\r\n end;\r\n Result:=Nil;\r\nend;\r\n\r\nfunction TFields.GetEnumerator: TFieldsEnumerator;\r\n\r\nbegin\r\n Result:=TFieldsEnumerator.Create(Self);\r\nend;\r\n\r\nprocedure TFields.GetFieldNames(Values: TStrings);\r\nvar i : longint;\r\nbegin\r\n Values.Clear;\r\n For I:=0 to FFieldList.Count-1 do\r\n Values.Add(Tfield(FFieldList[I]).FieldName);\r\nend;\r\n\r\nfunction TFields.IndexOf(Field: TField): Longint;\r\n\r\nbegin\r\n Result:=FFieldList.IndexOf(Field);\r\nend;\r\n\r\nprocedure TFields.Remove(Value : TField);\r\n\r\nbegin\r\n FFieldList.Remove(Value);\r\n Value.FFields := nil;\r\n Changed;\r\nend;\r\n\r\n{ ---------------------------------------------------------------------\r\n TDatalink\r\n ---------------------------------------------------------------------}\r\n\r\nConstructor TDataLink.Create;\r\n\r\nbegin\r\n Inherited Create;\r\n FBufferCount:=1;\r\n FFirstRecord := 0;\r\n FDataSource := nil;\r\n FDatasourceFixed:=False;\r\nend;\r\n\r\n\r\nDestructor TDataLink.Destroy;\r\n\r\nbegin\r\n Factive:=False;\r\n FEditing:=False;\r\n FDataSourceFixed:=False;\r\n DataSource:=Nil;\r\n Inherited Destroy;\r\nend;\r\n\r\n\r\nProcedure TDataLink.ActiveChanged;\r\n\r\nbegin\r\n FFirstRecord := 0;\r\nend;\r\n\r\nProcedure TDataLink.CheckActiveAndEditing;\r\n\r\nVar\r\n B : Boolean;\r\n\r\nbegin\r\n B:=Assigned(DataSource) and Not (DataSource.State in [dsInactive,dsOpening]);\r\n If B<>FActive then\r\n begin\r\n FActive:=B;\r\n ActiveChanged;\r\n end;\r\n B:=Assigned(DataSource) and (DataSource.State in dsEditModes) and Not FReadOnly;\r\n If B<>FEditing Then\r\n begin\r\n FEditing:=B;\r\n EditingChanged;\r\n end;\r\nend;\r\n\r\n\r\nProcedure TDataLink.CheckBrowseMode;\r\n\r\nbegin\r\nend;\r\n\r\n\r\nFunction TDataLink.CalcFirstRecord(Index : Integer) : Integer;\r\nbegin\r\n if DataSource.DataSet.FActiveRecord > FFirstRecord + Index + FBufferCount - 1 then\r\n Result := DataSource.DataSet.FActiveRecord - (FFirstRecord + Index + FBufferCount - 1)\r\n else if DataSource.DataSet.FActiveRecord < FFirstRecord + Index then\r\n Result := DataSource.DataSet.FActiveRecord - (FFirstRecord + Index)\r\n else Result := 0;\r\n \r\n Inc(FFirstRecord, Index + Result);\r\nend;\r\n\r\n\r\nProcedure TDataLink.CalcRange;\r\nvar\r\n aMax, aMin: integer;\r\nbegin\r\n aMin:= DataSet.FActiveRecord - FBufferCount + 1;\r\n If aMin < 0 Then aMin:= 0;\r\n aMax:= Dataset.FBufferCount - FBufferCount;\r\n If aMax < 0 then aMax:= 0;\r\n\r\n If aMax>DataSet.FActiveRecord Then aMax:=DataSet.FActiveRecord;\r\n If FFirstRecord < aMin Then FFirstRecord:= aMin;\r\n If FFirstrecord > aMax Then FFirstRecord:= aMax;\r\n\r\n If (FfirstRecord<>0) And\r\n (DataSet.FActiveRecord - FFirstRecord < FBufferCount -1) Then\r\n Dec(FFirstRecord, 1);\r\n\r\nend;\r\n\r\nprocedure TDataLink.DataEvent(Event: TDataEvent; Info: JSValue);\r\nbegin\r\n if Event = deUpdateState then\r\n CheckActiveAndEditing\r\n else if Active then\r\n case Event of\r\n deFieldChange, deRecordChange:\r\n if not FUpdatingRecord then\r\n RecordChanged(TField(Info));\r\n deDataSetChange:\r\n begin\r\n SetActive(DataSource.DataSet.Active);\r\n CalcRange;\r\n CalcFirstRecord(Integer(Info));\r\n DatasetChanged;\r\n end;\r\n deDataSetScroll: DatasetScrolled(CalcFirstRecord(Integer(Info)));\r\n deLayoutChange:\r\n begin\r\n CalcFirstRecord(Integer(Info));\r\n LayoutChanged;\r\n end;\r\n deUpdateRecord: UpdateRecord;\r\n deCheckBrowseMode: CheckBrowseMode;\r\n deFocusControl: FocusControl(Info);\r\n end;\r\nend;\r\n\r\nprocedure TDataLink.DataSetChanged;\r\nbegin\r\n RecordChanged(Nil);\r\nend;\r\n\r\nProcedure TDataLink.DataSetScrolled(Distance: Integer);\r\n\r\nbegin\r\n DataSetChanged;\r\nend;\r\n\r\n\r\nProcedure TDataLink.EditingChanged;\r\n\r\nbegin\r\nend;\r\n\r\n\r\nProcedure TDataLink.FocusControl(Field: JSValue);\r\n\r\nbegin\r\nend;\r\n\r\n\r\nFunction TDataLink.GetActiveRecord: Integer;\r\n\r\nbegin\r\n Result:=Dataset.FActiveRecord - FFirstRecord;\r\nend;\r\n\r\nFunction TDatalink.GetDataSet : TDataset;\r\n\r\nbegin\r\n If Assigned(Datasource) then\r\n Result:=DataSource.DataSet\r\n else\r\n Result:=Nil; \r\nend;\r\n\r\n\r\nFunction TDataLink.GetBOF: Boolean;\r\n\r\nbegin\r\n Result:=DataSet.BOF\r\nend;\r\n\r\n\r\nFunction TDataLink.GetBufferCount: Integer;\r\n\r\nbegin\r\n Result:=FBufferCount;\r\nend;\r\n\r\n\r\nFunction TDataLink.GetEOF: Boolean;\r\n\r\nbegin\r\n Result:=DataSet.EOF\r\nend;\r\n\r\n\r\nFunction TDataLink.GetRecordCount: Integer;\r\n\r\nbegin\r\n Result:=Dataset.FRecordCount;\r\n If Result>BufferCount then\r\n Result:=BufferCount;\r\nend;\r\n\r\n\r\nProcedure TDataLink.LayoutChanged;\r\n\r\nbegin\r\n DataSetChanged;\r\nend;\r\n\r\n\r\nFunction TDataLink.MoveBy(Distance: Integer): Integer;\r\n\r\nbegin\r\n Result:=DataSet.MoveBy(Distance);\r\nend;\r\n\r\n\r\nProcedure TDataLink.RecordChanged(Field: TField);\r\n\r\nbegin\r\nend;\r\n\r\n\r\nProcedure TDataLink.SetActiveRecord(Value: Integer);\r\n\r\nbegin\r\n{$ifdef dsdebug}\r\n Writeln('Datalink. Setting active record to ',Value,' with firstrecord ',ffirstrecord);\r\n{$endif}\r\n Dataset.FActiveRecord:=Value + FFirstRecord;\r\nend;\r\n\r\n\r\nProcedure TDataLink.SetBufferCount(Value: Integer);\r\n\r\nbegin\r\n If FBufferCount<>Value then\r\n begin\r\n FBufferCount:=Value;\r\n if Active then begin\r\n DataSet.RecalcBufListSize;\r\n CalcRange;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TDataLink.SetActive(AActive: Boolean);\r\nbegin\r\n if Active <> AActive then\r\n begin\r\n FActive := AActive;\r\n // !!!: Set internal state\r\n ActiveChanged;\r\n end;\r\nend;\r\n\r\nProcedure TDataLink.SetDataSource(Value : TDatasource);\r\n\r\nbegin\r\n if FDataSource = Value then\r\n Exit;\r\n if not FDataSourceFixed then\r\n begin\r\n if Assigned(DataSource) then\r\n Begin\r\n DataSource.UnregisterDatalink(Self);\r\n FDataSource := nil;\r\n CheckActiveAndEditing;\r\n End;\r\n FDataSource := Value;\r\n if Assigned(DataSource) then\r\n begin\r\n DataSource.RegisterDatalink(Self);\r\n CheckActiveAndEditing;\r\n End;\r\n end;\r\nend;\r\n\r\nProcedure TDatalink.SetReadOnly(Value : Boolean);\r\n\r\nbegin\r\n If FReadOnly<>Value then\r\n begin\r\n FReadOnly:=Value;\r\n CheckActiveAndEditing;\r\n end;\r\nend;\r\n\r\nProcedure TDataLink.UpdateData;\r\n\r\nbegin\r\nend;\r\n\r\n\r\n\r\nFunction TDataLink.Edit: Boolean;\r\n\r\nbegin\r\n If Not FReadOnly then\r\n DataSource.Edit;\r\n // Triggered event will set FEditing\r\n Result:=FEditing;\r\nend;\r\n\r\n\r\nProcedure TDataLink.UpdateRecord;\r\n\r\nbegin\r\n FUpdatingRecord:=True;\r\n Try\r\n UpdateData;\r\n finally\r\n FUpdatingRecord:=False;\r\n end;\r\nend;\r\n\r\n\r\n{ ---------------------------------------------------------------------\r\n TDetailDataLink\r\n ---------------------------------------------------------------------}\r\n\r\nFunction TDetailDataLink.GetDetailDataSet: TDataSet;\r\n\r\nbegin\r\n Result := nil;\r\nend;\r\n\r\n\r\n{ ---------------------------------------------------------------------\r\n TMasterDataLink\r\n ---------------------------------------------------------------------}\r\n\r\nconstructor TMasterDataLink.Create(ADataSet: TDataSet);\r\n\r\nbegin\r\n inherited Create;\r\n FDetailDataSet:=ADataSet;\r\n FFields:=TList.Create;\r\nend;\r\n\r\n\r\ndestructor TMasterDataLink.Destroy;\r\n\r\nbegin\r\n FFields.Free;\r\n inherited Destroy;\r\nend;\r\n\r\n\r\nProcedure TMasterDataLink.ActiveChanged;\r\n\r\nbegin\r\n FFields.Clear;\r\n if Active then\r\n try\r\n DataSet.GetFieldList(FFields, FFieldNames);\r\n except\r\n FFields.Clear;\r\n raise;\r\n end;\r\n if FDetailDataSet.Active and not (csDestroying in FDetailDataSet.ComponentState) then\r\n if Active and (FFields.Count > 0) then\r\n DoMasterChange\r\n else\r\n DoMasterDisable; \r\nend;\r\n\r\n\r\nProcedure TMasterDataLink.CheckBrowseMode;\r\n\r\nbegin\r\n if FDetailDataSet.Active then FDetailDataSet.CheckBrowseMode;\r\nend;\r\n\r\n\r\nFunction TMasterDataLink.GetDetailDataSet: TDataSet;\r\n\r\nbegin\r\n Result := FDetailDataSet;\r\nend;\r\n\r\n\r\nProcedure TMasterDataLink.LayoutChanged;\r\n\r\nbegin\r\n ActiveChanged;\r\nend;\r\n\r\n\r\nProcedure TMasterDataLink.RecordChanged(Field: TField);\r\n\r\nbegin\r\n if (DataSource.State <> dsSetKey) and FDetailDataSet.Active and\r\n (FFields.Count > 0) and ((Field = nil) or\r\n (FFields.IndexOf(Field) >= 0)) then\r\n DoMasterChange; \r\nend;\r\n\r\nprocedure TMasterDatalink.SetFieldNames(const Value: string);\r\n\r\nbegin\r\n if FFieldNames <> Value then\r\n begin\r\n FFieldNames := Value;\r\n ActiveChanged;\r\n end;\r\nend;\r\n\r\nProcedure TMasterDataLink.DoMasterDisable; \r\n\r\nbegin\r\n if Assigned(FOnMasterDisable) then \r\n FOnMasterDisable(Self);\r\nend;\r\n\r\nProcedure TMasterDataLink.DoMasterChange; \r\n\r\nbegin\r\n If Assigned(FOnMasterChange) then\r\n FOnMasterChange(Self);\r\nend;\r\n\r\n{ ---------------------------------------------------------------------\r\n TMasterParamsDataLink\r\n ---------------------------------------------------------------------}\r\n\r\nconstructor TMasterParamsDataLink.Create(ADataSet: TDataSet);\r\n\r\nVar\r\n P : TParams;\r\n\r\nbegin\r\n inherited Create(ADataset);\r\n If (ADataset<>Nil) then\r\n begin\r\n P:=TParams(GetObjectProp(ADataset,'Params',TParams));\r\n if (P<>Nil) then\r\n Params:=P;\r\n end; \r\nend;\r\n\r\n\r\nProcedure TMasterParamsDataLink.SetParams(AValue : TParams);\r\n\r\nbegin\r\n FParams:=AValue;\r\n If (AValue<>Nil) then\r\n RefreshParamNames;\r\nend;\r\n\r\nProcedure TMasterParamsDataLink.RefreshParamNames; \r\n\r\nVar\r\n FN : String;\r\n DS : TDataset;\r\n F : TField;\r\n I : Integer;\r\n P : TParam;\r\n\r\n\r\nbegin\r\n FN:='';\r\n DS:=Dataset;\r\n If Assigned(FParams) then\r\n begin\r\n F:=Nil;\r\n For I:=0 to FParams.Count-1 do\r\n begin\r\n P:=FParams[i];\r\n if not P.Bound then\r\n begin\r\n If Assigned(DS) then\r\n F:=DS.FindField(P.Name);\r\n If (Not Assigned(DS)) or (not DS.Active) or (F<>Nil) then\r\n begin\r\n If (FN<>'') then\r\n FN:=FN+';';\r\n FN:=FN+P.Name;\r\n end;\r\n end;\r\n end;\r\n end;\r\n FieldNames:=FN; \r\nend;\r\n\r\nProcedure TMasterParamsDataLink.CopyParamsFromMaster(CopyBound : Boolean);\r\n\r\nbegin\r\n if Assigned(FParams) then\r\n FParams.CopyParamValuesFromDataset(Dataset,CopyBound);\r\nend;\r\n\r\nProcedure TMasterParamsDataLink.DoMasterDisable; \r\n\r\nbegin\r\n Inherited;\r\n // If master dataset is closing, leave detail dataset intact (Delphi compatible behavior)\r\n // If master dataset is reopened, relationship will be reestablished\r\nend;\r\n\r\nProcedure TMasterParamsDataLink.DoMasterChange; \r\n\r\nbegin\r\n Inherited;\r\n if Assigned(Params) and Assigned(DetailDataset) and DetailDataset.Active then\r\n begin\r\n DetailDataSet.CheckBrowseMode;\r\n DetailDataset.Close;\r\n DetailDataset.Open;\r\n end;\r\nend;\r\n\r\n{ ---------------------------------------------------------------------\r\n TDatasource\r\n ---------------------------------------------------------------------}\r\n\r\nConstructor TDataSource.Create(AOwner: TComponent);\r\n\r\nbegin\r\n Inherited Create(AOwner);\r\n FDatalinks := TList.Create;\r\n FEnabled := True;\r\n FAutoEdit := True;\r\nend;\r\n\r\n\r\nDestructor TDataSource.Destroy;\r\n\r\nbegin\r\n FOnStateCHange:=Nil;\r\n Dataset:=Nil;\r\n With FDataLinks do\r\n While Count>0 do\r\n TDatalink(Items[Count - 1]).DataSource:=Nil;\r\n FDatalinks.Free;\r\n inherited Destroy;\r\nend;\r\n\r\n\r\nProcedure TDatasource.Edit;\r\n\r\nbegin\r\n If (State=dsBrowse) and AutoEdit Then\r\n Dataset.Edit;\r\nend;\r\n\r\n\r\nFunction TDataSource.IsLinkedTo(ADataSet: TDataSet): Boolean;\r\n\r\nbegin\r\n Result:=False;\r\nend;\r\n\r\n\r\nprocedure TDatasource.DistributeEvent(Event: TDataEvent; Info: JSValue);\r\n\r\n\r\nVar\r\n i : Longint;\r\n\r\nbegin\r\n With FDatalinks do\r\n begin\r\n For I:=0 to Count-1 do\r\n With TDatalink(Items[i]) do\r\n If Not VisualControl Then\r\n DataEvent(Event,Info);\r\n For I:=0 to Count-1 do\r\n With TDatalink(Items[i]) do\r\n If VisualControl Then\r\n DataEvent(Event,Info);\r\n end;\r\nend;\r\n\r\nprocedure TDatasource.RegisterDataLink(DataLink: TDataLink);\r\n\r\nbegin\r\n FDatalinks.Add(DataLink);\r\n if Assigned(DataSet) then\r\n DataSet.RecalcBufListSize;\r\nend;\r\n\r\n\r\nprocedure TDatasource.SetDataSet(ADataSet: TDataSet);\r\nbegin\r\n If FDataset<>Nil Then\r\n Begin\r\n FDataset.UnRegisterDataSource(Self);\r\n FDataSet:=nil;\r\n ProcessEvent(deUpdateState,0);\r\n End;\r\n If ADataset<>Nil Then\r\n begin\r\n ADataset.RegisterDatasource(Self);\r\n FDataSet:=ADataset;\r\n ProcessEvent(deUpdateState,0);\r\n End;\r\nend;\r\n\r\n\r\nprocedure TDatasource.SetEnabled(Value: Boolean);\r\nbegin\r\n FEnabled:=Value;\r\n ProcessEvent(deUpdateState,0);\r\nend;\r\n\r\nprocedure TDatasource.DoDataChange (Info : Pointer);\r\nbegin\r\n if Assigned(OnDataChange) then\r\n if Assigned(Info) Then\r\n OnDataChange(Self, TField(Info))\r\n else\r\n OnDataChange(Self, nil);\r\nend;\r\n\r\nprocedure TDatasource.DoStateChange;\r\nbegin\r\n If Assigned(OnStateChange) Then\r\n OnStateChange(Self);\r\nend;\r\n\r\nprocedure TDatasource.DoUpdateData;\r\nbegin\r\n If Assigned(OnUpdateData) Then\r\n OnUpdateData(Self);\r\nend;\r\n\r\n\r\nprocedure TDatasource.UnregisterDataLink(DataLink: TDataLink);\r\n\r\nbegin\r\n FDatalinks.Remove(Datalink);\r\n If Dataset<>Nil then\r\n DataSet.RecalcBufListSize;\r\n //Dataset.SetBufListSize(DataLink.BufferCount);\r\nend;\r\n\r\n\r\nprocedure TDataSource.ProcessEvent(Event : TDataEvent; Info : JSValue);\r\n\r\nConst\r\n OnDataChangeEvents = [deRecordChange, deDataSetChange, deDataSetScroll,\r\n deLayoutChange,deUpdateState];\r\n\r\nVar\r\n NeedDataChange : Boolean;\r\n FLastState : TdataSetState;\r\n\r\nbegin\r\n // Special UpdateState handling.\r\n If Event=deUpdateState then\r\n begin\r\n NeedDataChange:=(FState=dsInactive);\r\n FLastState:=FState;\r\n If Assigned(Dataset) and enabled then\r\n FState:=Dataset.State\r\n else\r\n FState:=dsInactive;\r\n // Don't do events if nothing changed.\r\n If FState=FLastState then\r\n exit;\r\n end\r\n else\r\n NeedDataChange:=True;\r\n DistributeEvent(Event,Info);\r\n // Extra handlers\r\n If Not (csDestroying in ComponentState) then\r\n begin\r\n If (Event=deUpdateState) then\r\n DoStateChange;\r\n If (Event in OnDataChangeEvents) and\r\n NeedDataChange Then\r\n DoDataChange(Nil);\r\n If (Event = deFieldChange) Then\r\n DoDataCHange(Pointer(Info));\r\n If (Event=deUpdateRecord) then\r\n DoUpdateData;\r\n end;\r\n end;\r\n\r\n\r\nprocedure SkipQuotesString(S : String; var p : integer; QuoteChar : char; EscapeSlash, EscapeRepeat : Boolean);\r\n\r\nvar notRepeatEscaped : boolean;\r\nbegin\r\n Inc(p);\r\n repeat\r\n notRepeatEscaped := True;\r\n while not CharInSet(S[p],[#0, QuoteChar]) do\r\n begin\r\n if EscapeSlash and (S[p]='\\') and (P=0) do\r\n If (CompareText(Value,Items[i].Name)=0) then\r\n Result:=Items[i]\r\n else\r\n Dec(i);\r\nend;\r\n\r\nProcedure TParams.GetParamList(List: TList; const ParamNames: string);\r\n\r\nVar\r\n P: TParam;\r\n N: String;\r\n StrPos: Integer;\r\n\r\nbegin\r\n if (ParamNames = '') or (List = nil) then\r\n Exit;\r\n StrPos := 1;\r\n repeat\r\n N := ExtractFieldName(ParamNames, StrPos);\r\n P := ParamByName(N);\r\n List.Add(P);\r\n until StrPos > Length(ParamNames);\r\nend;\r\n\r\nFunction TParams.IsEqual(Value: TParams): Boolean;\r\n\r\nVar\r\n I : Integer;\r\n\r\nbegin\r\n Result:=(Value.Count=Count);\r\n I:=Count-1;\r\n While Result and (I>=0) do\r\n begin\r\n Result:=Items[I].IsEqual(Value[i]);\r\n Dec(I);\r\n end;\r\nend;\r\n\r\nFunction TParams.ParamByName(const Value: string): TParam;\r\nbegin\r\n Result:=FindParam(Value);\r\n If (Result=Nil) then\r\n DatabaseErrorFmt(SParameterNotFound,[Value],Dataset);\r\nend;\r\n\r\nFunction TParams.ParseSQL(SQL: String; DoCreate: Boolean): String;\r\n\r\nvar pb : TParamBinding;\r\n rs : string;\r\n\r\nbegin\r\n Result := ParseSQL(SQL,DoCreate,True,True,psInterbase, pb, rs);\r\nend;\r\n\r\nFunction TParams.ParseSQL(SQL: String; DoCreate, EscapeSlash,\r\n EscapeRepeat: Boolean; ParameterStyle: TParamStyle): String;\r\n\r\nvar pb : TParamBinding;\r\n rs : string;\r\n\r\nbegin\r\n Result := ParseSQL(SQL,DoCreate,EscapeSlash,EscapeRepeat,ParameterStyle,pb, rs);\r\nend;\r\n\r\nFunction TParams.ParseSQL(SQL: String; DoCreate, EscapeSlash,\r\n EscapeRepeat: Boolean; ParameterStyle: TParamStyle; out\r\n ParamBinding: TParambinding): String;\r\n\r\nvar rs : string;\r\n\r\nbegin\r\n Result := ParseSQL(SQL,DoCreate,EscapeSlash, EscapeRepeat, ParameterStyle,ParamBinding, rs);\r\nend;\r\n\r\nfunction SkipComments(S : String; Var p: Integer; EscapeSlash, EscapeRepeat : Boolean) : Boolean;\r\n\r\nbegin\r\n Result := False;\r\n case S[P] of\r\n '''', '\"', '`':\r\n begin\r\n Result := True;\r\n // single quote, double quote or backtick delimited string\r\n SkipQuotesString(S,p, S[p], EscapeSlash, EscapeRepeat);\r\n end;\r\n '-': // possible start of -- comment\r\n begin\r\n Inc(p);\r\n if S[p]='-' then // -- comment\r\n begin\r\n Result := True;\r\n repeat // skip until at end of line\r\n Inc(p);\r\n until CharInset(S[p],[#10, #13, #0]);\r\n while CharInSet(S[p],[#10, #13]) do\r\n Inc(p); // newline is part of comment\r\n end;\r\n end;\r\n '/': // possible start of /* */ comment\r\n begin\r\n Inc(p);\r\n if S[p]='*' then // /* */ comment\r\n begin\r\n Result := True;\r\n Inc(p);\r\n while p<=Length(S) do\r\n begin\r\n if S[p]='*' then // possible end of comment\r\n begin\r\n Inc(p);\r\n if S[p]='/' then Break; // end of comment\r\n end\r\n else\r\n Inc(p);\r\n end;\r\n if (P<=Length(s)) and (S[p]='/') then\r\n Inc(p); // skip final /\r\n end;\r\n end;\r\n end; {case}\r\nend;\r\n\r\nFunction TParams.ParseSQL(SQL: String; DoCreate, EscapeSlash,\r\n EscapeRepeat: Boolean; ParameterStyle: TParamStyle; out\r\n ParamBinding: TParambinding; out ReplaceString: string): String;\r\n\r\ntype\r\n // used for ParamPart\r\n TStringPart = record\r\n Start,Stop:integer;\r\n end;\r\n\r\nconst\r\n ParamAllocStepSize = 8;\r\n PAramDelimiters : Array of char = (';',',',' ','(',')',#13,#10,#9,#0,'=','+','-','*','\\','/','[',']','|');\r\n\r\nvar\r\n IgnorePart:boolean;\r\n p,ParamNameStart,BufStart:Integer;\r\n ParamName:string;\r\n QuestionMarkParamCount,ParameterIndex,NewLength:integer;\r\n ParamCount:integer; // actual number of parameters encountered so far;\r\n // always <= Length(ParamPart) = Length(Parambinding)\r\n // Parambinding will have length ParamCount in the end\r\n ParamPart:array of TStringPart; // describe which parts of buf are parameters\r\n NewQueryLength:integer;\r\n NewQuery:string;\r\n NewQueryIndex,BufIndex,CopyLen,i:integer; // Parambinding will have length ParamCount in the end\r\n tmpParam:TParam;\r\n\r\nbegin\r\n if DoCreate then Clear;\r\n // Parse the SQL and build ParamBinding\r\n ParamCount:=0;\r\n NewQueryLength:=Length(SQL);\r\n SetLength(ParamPart,ParamAllocStepSize);\r\n SetLength(ParamBinding,ParamAllocStepSize);\r\n QuestionMarkParamCount:=0; // number of ? params found in query so far\r\n\r\n ReplaceString := '$';\r\n if ParameterStyle = psSimulated then\r\n while pos(ReplaceString,SQL) > 0 do ReplaceString := ReplaceString+'$';\r\n\r\n p:=1;\r\n BufStart:=p; // used to calculate ParamPart.Start values\r\n repeat\r\n while SkipComments(SQL,p,EscapeSlash,EscapeRepeat) do ;\r\n case SQL[p] of\r\n ':','?': // parameter\r\n begin\r\n IgnorePart := False;\r\n if SQL[p]=':' then\r\n begin // find parameter name\r\n Inc(p);\r\n if charInSet(SQL[p],[':','=',' ']) then // ignore ::, since some databases uses this as a cast (wb 4813)\r\n begin\r\n IgnorePart := True;\r\n Inc(p);\r\n end\r\n else\r\n begin\r\n if (SQL[p]='\"') then // Check if the parameter-name is between quotes\r\n begin\r\n ParamNameStart:=p;\r\n SkipQuotesString(SQL,p,'\"',EscapeSlash,EscapeRepeat);\r\n // Do not include the quotes in ParamName, but they must be included\r\n // when the parameter is replaced by some place-holder.\r\n ParamName:=Copy(SQL,ParamNameStart+1,p-ParamNameStart-2);\r\n end\r\n else\r\n begin\r\n ParamNameStart:=p;\r\n while not CharInSet(SQL[p], ParamDelimiters) do\r\n Inc(p);\r\n ParamName:=Copy(SQL,ParamNameStart,p-ParamNameStart);\r\n end;\r\n end;\r\n end\r\n else\r\n begin\r\n Inc(p);\r\n ParamNameStart:=p;\r\n ParamName:='';\r\n end;\r\n if not IgnorePart then\r\n begin\r\n Inc(ParamCount);\r\n if ParamCount>Length(ParamPart) then\r\n begin\r\n NewLength:=Length(ParamPart)+ParamAllocStepSize;\r\n SetLength(ParamPart,NewLength);\r\n SetLength(ParamBinding,NewLength);\r\n end;\r\n if DoCreate then\r\n begin\r\n // Check if this is the first occurance of the parameter\r\n tmpParam := FindParam(ParamName);\r\n // If so, create the parameter and assign the Parameterindex\r\n if not assigned(tmpParam) then\r\n ParameterIndex := CreateParam(ftUnknown, ParamName, ptInput).Index\r\n else // else only assign the ParameterIndex\r\n ParameterIndex := tmpParam.Index;\r\n end\r\n // else find ParameterIndex\r\n else\r\n begin\r\n if ParamName<>'' then\r\n ParameterIndex:=ParamByName(ParamName).Index\r\n else\r\n begin\r\n ParameterIndex:=QuestionMarkParamCount;\r\n Inc(QuestionMarkParamCount);\r\n end;\r\n end;\r\n if ParameterStyle in [psPostgreSQL,psSimulated] then\r\n begin\r\n i:=ParameterIndex+1;\r\n repeat\r\n inc(NewQueryLength);\r\n i:=i div 10;\r\n until i=0;\r\n end;\r\n // store ParameterIndex in FParamIndex, ParamPart data\r\n ParamBinding[ParamCount-1]:=ParameterIndex;\r\n ParamPart[ParamCount-1].Start:=ParamNameStart-BufStart;\r\n ParamPart[ParamCount-1].Stop:=p-BufStart+1;\r\n // update NewQueryLength\r\n Dec(NewQueryLength,p-ParamNameStart);\r\n end;\r\n end;\r\n #0:\r\n Break; // end of SQL\r\n else\r\n Inc(p);\r\n end;\r\n until false;\r\n SetLength(ParamPart,ParamCount);\r\n SetLength(ParamBinding,ParamCount);\r\n if ParamCount<=0 then\r\n NewQuery:=SQL\r\n else\r\n begin\r\n // replace :ParamName by ? for interbase and by $x for postgresql/psSimulated\r\n // (using ParamPart array and NewQueryLength)\r\n if (ParameterStyle = psSimulated) and (length(ReplaceString) > 1) then\r\n inc(NewQueryLength,(paramcount)*(length(ReplaceString)-1));\r\n\r\n SetLength(NewQuery,NewQueryLength);\r\n NewQueryIndex:=1;\r\n BufIndex:=1;\r\n for i:=0 to High(ParamPart) do\r\n begin\r\n CopyLen:=ParamPart[i].Start-BufIndex;\r\n NewQuery:=NewQuery+Copy(SQL,BufIndex,CopyLen);\r\n Inc(NewQueryIndex,CopyLen);\r\n case ParameterStyle of\r\n psInterbase : begin\r\n NewQuery:=NewQuery+'?';\r\n Inc(NewQueryIndex);\r\n end;\r\n psPostgreSQL,\r\n psSimulated : begin\r\n ParamName := IntToStr(ParamBinding[i]+1);\r\n NewQuery:=StringOfChar('$',Length(ReplaceString));\r\n NewQuery:=NewQuery+ParamName;\r\n end;\r\n end;\r\n BufIndex:=ParamPart[i].Stop;\r\n end;\r\n CopyLen:=Length(SQL)+1-BufIndex;\r\n if (CopyLen>0) then\r\n NewQuery:=NewQuery+Copy(SQL,BufIndex,CopyLen);\r\n end;\r\n Result:=NewQuery;\r\nend;\r\n\r\n\r\nProcedure TParams.RemoveParam(Value: TParam);\r\nbegin\r\n Value.Collection:=Nil;\r\nend;\r\n\r\n{ TParam }\r\n\r\nFunction TParam.GetDataSet: TDataSet;\r\nbegin\r\n If Assigned(Collection) and (Collection is TParams) then\r\n Result:=TParams(Collection).GetDataset\r\n else\r\n Result:=Nil;\r\nend;\r\n\r\nFunction TParam.IsParamStored: Boolean;\r\nbegin\r\n Result:=Bound;\r\nend;\r\n\r\nProcedure TParam.AssignParam(Param: TParam);\r\nbegin\r\n if Not Assigned(Param) then\r\n begin\r\n Clear;\r\n FDataType:=ftunknown;\r\n FParamType:=ptUnknown;\r\n Name:='';\r\n Size:=0;\r\n Precision:=0;\r\n NumericScale:=0;\r\n end\r\n else\r\n begin\r\n FDataType:=Param.DataType;\r\n if Param.IsNull then\r\n Clear\r\n else\r\n FValue:=Param.FValue;\r\n FBound:=Param.Bound;\r\n Name:=Param.Name;\r\n if (ParamType=ptUnknown) then\r\n ParamType:=Param.ParamType;\r\n Size:=Param.Size;\r\n Precision:=Param.Precision;\r\n NumericScale:=Param.NumericScale;\r\n end;\r\nend;\r\n\r\nProcedure TParam.AssignTo(Dest: TPersistent);\r\nbegin\r\n if (Dest is TField) then\r\n AssignToField(TField(Dest))\r\n else\r\n inherited AssignTo(Dest);\r\nend;\r\n\r\nFunction TParam.GetAsBoolean: Boolean;\r\nbegin\r\n if not IsNull and (FDataType = ftString) then\r\n begin\r\n Result := StrToBool(string(FValue));\r\n end\r\n else\r\n begin\r\n If IsNull then\r\n Result:=False\r\n else\r\n Result:=FValue=true;\r\n end;\r\nend;\r\n\r\nFunction TParam.GetAsBytes: TBytes;\r\nbegin\r\n if IsNull then\r\n Result:=nil\r\n else if isArray(FValue) then\r\n Result := TBytes(FValue)\r\nend;\r\n\r\nFunction TParam.GetAsDateTime: TDateTime;\r\nbegin\r\n if not IsNull and (FDataType = ftString) then\r\n begin\r\n Result := StrToDateTime(string(FValue));\r\n end\r\n else\r\n begin\r\n If IsNull then\r\n Result := 0.0\r\n else\r\n Result := TDateTime(FValue);\r\n end;\r\nend;\r\n\r\nFunction TParam.GetAsFloat: Double;\r\nbegin\r\n if not IsNull and (FDataType = ftString) then\r\n begin\r\n Result := StrToFloat(string(FValue));\r\n end\r\n else\r\n begin\r\n If IsNull then\r\n Result := 0.0\r\n else\r\n Result := Double(FValue);\r\n end;\r\nend;\r\n\r\nFunction TParam.GetAsInteger: Longint;\r\nbegin\r\n if not IsNull and (FDataType = ftString) then\r\n begin\r\n Result := StrToInt(string(FValue));\r\n end\r\n else\r\n begin\r\n If IsNull or not IsInteger(FValue) then\r\n Result := 0\r\n else\r\n Result := Integer(FValue);\r\n end;\r\nend;\r\n\r\nFunction TParam.GetAsLargeInt: NativeInt;\r\nbegin\r\n if not IsNull and (FDataType = ftString) then\r\n begin\r\n Result := StrToInt(string(FValue));\r\n end\r\n else\r\n begin\r\n If IsNull or not IsInteger(FValue) then\r\n Result:=0\r\n else\r\n Result:=NativeInt(FValue);\r\n end;\r\nend;\r\n\r\n\r\nFunction TParam.GetAsMemo: string;\r\nbegin\r\n If IsNull or not IsString(FValue) then\r\n Result:=''\r\n else\r\n Result:=String(FValue);\r\nend;\r\n\r\nFunction TParam.GetAsString: string;\r\n\r\nbegin\r\n If IsNull or not IsString(FValue) then\r\n Result:=''\r\n else\r\n Result:=String(FValue);\r\nend;\r\n\r\nFunction TParam.GetAsJSValue: JSValue;\r\nbegin\r\n if IsNull then\r\n Result:=Null\r\n else\r\n Result:=FValue;\r\nend;\r\nFunction TParam.GetDisplayName: string;\r\nbegin\r\n if (FName<>'') then\r\n Result:=FName\r\n else\r\n Result:=inherited GetDisplayName\r\nend;\r\n\r\nFunction TParam.GetIsNull: Boolean;\r\nbegin\r\n Result:= JS.IsNull(FValue);\r\nend;\r\n\r\nFunction TParam.IsEqual(AValue: TParam): Boolean;\r\nbegin\r\n Result:=(Name=AValue.Name)\r\n and (IsNull=AValue.IsNull)\r\n and (Bound=AValue.Bound)\r\n and (DataType=AValue.DataType)\r\n and (ParamType=AValue.ParamType)\r\n and (GetValueType(FValue)=GetValueType(AValue.FValue))\r\n and (FValue=AValue.FValue);\r\nend;\r\n\r\nProcedure TParam.SetAsBlob(const AValue: TBlobData);\r\nbegin\r\n FDataType:=ftBlob;\r\n Value:=AValue;\r\nend;\r\n\r\nProcedure TParam.SetAsBoolean(AValue: Boolean);\r\nbegin\r\n FDataType:=ftBoolean;\r\n Value:=AValue;\r\nend;\r\n\r\nprocedure TParam.SetAsBytes(const AValue: TBytes);\r\nbegin\r\n\r\nend;\r\n\r\nProcedure TParam.SetAsDate(const AValue: TDateTime);\r\nbegin\r\n FDataType:=ftDate;\r\n Value:=AValue;\r\nend;\r\n\r\nProcedure TParam.SetAsDateTime(const AValue: TDateTime);\r\nbegin\r\n FDataType:=ftDateTime;\r\n Value:=AValue;\r\nend;\r\n\r\nProcedure TParam.SetAsFloat(const AValue: Double);\r\nbegin\r\n FDataType:=ftFloat;\r\n Value:=AValue;\r\nend;\r\n\r\nProcedure TParam.SetAsInteger(AValue: Longint);\r\nbegin\r\n FDataType:=ftInteger;\r\n Value:=AValue;\r\nend;\r\n\r\nProcedure TParam.SetAsLargeInt(AValue: NativeInt);\r\nbegin\r\n FDataType:=ftLargeint;\r\n Value:=AValue;\r\nend;\r\n\r\nProcedure TParam.SetAsMemo(const AValue: string);\r\nbegin\r\n FDataType:=ftMemo;\r\n Value:=AValue;\r\nend;\r\n\r\nProcedure TParam.SetAsString(const AValue: string);\r\nbegin\r\n if FDataType <> ftFixedChar then\r\n FDataType := ftString;\r\n Value:=AValue;\r\nend;\r\n\r\n\r\nProcedure TParam.SetAsTime(const AValue: TDateTime);\r\nbegin\r\n FDataType:=ftTime;\r\n Value:=AValue;\r\nend;\r\n\r\nProcedure TParam.SetAsJSValue(const AValue: JSValue);\r\n\r\nbegin\r\n FValue:=AValue;\r\n FBound:=not JS.IsNull(AValue);\r\n if FBound then\r\n case GetValueType(aValue) of\r\n jvtBoolean : FDataType:=ftBoolean;\r\n jvtInteger : FDataType:=ftInteger;\r\n jvtFloat : FDataType:=ftFloat;\r\n jvtObject,jvtArray : FDataType:=ftBlob;\r\n end;\r\nend;\r\n\r\nProcedure TParam.SetDataType(AValue: TFieldType);\r\n\r\n\r\nbegin\r\n FDataType:=AValue;\r\n\r\nend;\r\n\r\nProcedure TParam.SetText(const AValue: string);\r\nbegin\r\n Value:=AValue;\r\nend;\r\n\r\nconstructor TParam.Create(ACollection: TCollection);\r\nbegin\r\n inherited Create(ACollection);\r\n ParamType:=ptUnknown;\r\n DataType:=ftUnknown;\r\n FValue:=Null;\r\nend;\r\n\r\nconstructor TParam.Create(AParams: TParams; AParamType: TParamType);\r\nbegin\r\n Create(AParams);\r\n ParamType:=AParamType;\r\nend;\r\n\r\nProcedure TParam.Assign(Source: TPersistent);\r\nbegin\r\n if (Source is TParam) then\r\n AssignParam(TParam(Source))\r\n else if (Source is TField) then\r\n AssignField(TField(Source))\r\n else if (source is TStrings) then\r\n AsMemo:=TStrings(Source).Text\r\n else\r\n inherited Assign(Source);\r\nend;\r\n\r\nProcedure TParam.AssignField(Field: TField);\r\nbegin\r\n if Assigned(Field) then\r\n begin\r\n // Need TField.Value\r\n AssignFieldValue(Field,Field.Value);\r\n Name:=Field.FieldName;\r\n end\r\n else\r\n begin\r\n Clear;\r\n Name:='';\r\n end\r\nend;\r\n\r\nProcedure TParam.AssignToField(Field : TField);\r\n\r\nbegin\r\n if Assigned(Field) then\r\n case FDataType of\r\n ftUnknown : DatabaseErrorFmt(SUnknownParamFieldType,[Name],DataSet);\r\n // Need TField.AsSmallInt\r\n // Need TField.AsWord\r\n ftInteger,\r\n ftAutoInc : Field.AsInteger:=AsInteger;\r\n ftFloat : Field.AsFloat:=AsFloat;\r\n ftBoolean : Field.AsBoolean:=AsBoolean;\r\n ftBlob,\r\n ftString,\r\n ftWideString,\r\n ftMemo,\r\n ftFixedChar: Field.AsString:=AsString;\r\n ftTime,\r\n ftDate,\r\n ftDateTime : Field.AsDateTime:=AsDateTime;\r\n end;\r\nend;\r\n\r\nProcedure TParam.AssignFromField(Field : TField);\r\n\r\nbegin\r\n if Assigned(Field) then\r\n begin\r\n FDataType:=Field.DataType;\r\n case Field.DataType of\r\n ftUnknown : DatabaseErrorFmt(SUnknownParamFieldType,[Name],DataSet);\r\n ftInteger,\r\n ftAutoInc : AsInteger:=Field.AsInteger;\r\n ftFloat : AsFloat:=Field.AsFloat;\r\n ftBoolean : AsBoolean:=Field.AsBoolean;\r\n ftBlob,\r\n ftString,\r\n ftWideString,\r\n ftMemo,\r\n ftFixedChar: AsString:=Field.AsString;\r\n ftTime,\r\n ftDate,\r\n ftDateTime : AsDateTime:=Field.AsDateTime;\r\n end;\r\n end;\r\nend;\r\n\r\nProcedure TParam.AssignFieldValue(Field: TField; const AValue: JSValue);\r\n\r\nbegin\r\n If Assigned(Field) then\r\n begin\r\n\r\n if (Field.DataType = ftString) and TStringField(Field).FixedChar then\r\n FDataType := ftFixedChar\r\n else if (Field.DataType = ftMemo) and (Field.Size > 255) then\r\n FDataType := ftString\r\n else\r\n FDataType := Field.DataType;\r\n if JS.IsNull(AValue) then\r\n Clear\r\n else\r\n Value:=AValue;\r\n\r\n Size:=Field.DataSize;\r\n FBound:=True;\r\n\r\n end;\r\nend;\r\n\r\nProcedure TParam.Clear;\r\nbegin\r\n FValue:=Null;\r\nend;\r\n\r\n\r\nProcedure TParams.CopyParamValuesFromDataset(ADataSet: TDataSet;\r\n CopyBound: Boolean);\r\n\r\nVar\r\n I : Integer;\r\n P : TParam;\r\n F : TField;\r\n\r\nbegin\r\n If assigned(ADataSet) then\r\n For I:=0 to Count-1 do\r\n begin\r\n P:=Items[i];\r\n if CopyBound or (not P.Bound) then\r\n begin\r\n // Master dataset must be active and unbound parameters must have fields\r\n // with same names in master dataset (Delphi compatible behavior)\r\n F:=ADataSet.FieldByName(P.Name);\r\n P.AssignField(F);\r\n If Not CopyBound then\r\n P.Bound:=False;\r\n end;\r\n end;\r\nend;\r\n\r\n{ TDataSetField }\r\n\r\nconstructor TDataSetField.Create(AOwner: TComponent);\r\nbegin\r\n inherited;\r\n\r\n SetDataType(ftDataSet);\r\nend;\r\n\r\nprocedure TDataSetField.Bind(Binding: Boolean);\r\nbegin\r\n inherited;\r\n if Assigned(FNestedDataSet) then\r\n if Binding then\r\n begin\r\n if FNestedDataSet.State = dsInActive then\r\n FNestedDataSet.Open;\r\n end\r\n else\r\n FNestedDataSet.Close;\r\nend;\r\n\r\nprocedure TDataSetField.AssignNestedDataSet(Value: TDataSet);\r\nbegin\r\n if Assigned(FNestedDataSet) then\r\n begin\r\n FNestedDataSet.Close;\r\n FNestedDataSet.FDataSetField := nil;\r\n if Assigned(DataSet) then\r\n DataSet.NestedDataSets.Remove(FNestedDataSet);\r\n end;\r\n\r\n if Assigned(Value) then\r\n DataSet.NestedDataSets.Add(Value);\r\n\r\n FNestedDataSet := Value;\r\nend;\r\n\r\ndestructor TDataSetField.Destroy;\r\nbegin\r\n AssignNestedDataSet(nil);\r\n\r\n inherited;\r\nend;\r\n\r\nend.\r\n","{\r\n This file is part of the Free Component Library (FCL)\r\n Copyright (c) 2008 Michael Van Canneyt.\r\n\r\n Expression parser, supports variables, functions and\r\n float/integer/string/boolean/datetime operations.\r\n\r\n See the file COPYING.FPC, included in this distribution,\r\n for details about the copyright.\r\n\r\n This program is distributed in the hope that it will be useful,\r\n but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\r\n\r\n **********************************************************************}\r\n{$IFNDEF FPC_DOTTEDUNITS} \r\nunit fpexprpars;\r\n{$ENDIF}\r\n\r\n{$mode objfpc}\r\n{$h+}\r\n\r\ninterface\r\n\r\nuses\r\n{$IFDEF FPC_DOTTEDUNITS} \r\n System.Classes, System.SysUtils, System.Contnrs, JSApi.JS;\r\n{$ELSE}\r\n Classes, SysUtils, contnrs, js;\r\n{$ENDIF}\r\n\r\nType\r\n // tokens\r\n TTokenType = (ttPlus, ttMinus, ttLessThan, ttLargerThan, ttEqual, ttDiv,\r\n ttMod, ttMul, ttLeft, ttRight, ttLessThanEqual,\r\n ttLargerThanEqual, ttunequal, ttNumber, ttString, ttIdentifier,\r\n ttComma, ttAnd, ttOr, ttXor, ttTrue, ttFalse, ttNot, ttif,\r\n ttCase, ttPower, ttLike, ttEOF); // keep ttEOF last\r\n\r\n TExprFloat = Double;\r\n\r\nConst\r\n ttDelimiters = [ttPlus, ttMinus, ttLessThan, ttLargerThan, ttEqual, ttDiv,\r\n ttMul, ttLeft, ttRight, ttLessThanEqual, ttLargerThanEqual,\r\n ttunequal, ttPower];\r\n ttComparisons = [ttLargerThan,ttLessthan,\r\n ttLargerThanEqual,ttLessthanEqual,\r\n ttEqual,ttUnequal, ttLike];\r\n\r\nType\r\n\r\n TFPExpressionParser = Class;\r\n TExprBuiltInManager = Class;\r\n TFPExprFunction = Class;\r\n TFPExprFunctionClass = Class of TFPExprFunction;\r\n\r\n TNumberKind = (nkDecimal, nkHex, nkOctal, nkBinary);\r\n\r\n { TFPExpressionScanner }\r\n\r\n TFPExpressionScanner = Class(TObject)\r\n FSource : String;\r\n LSource,\r\n FPos : Integer;\r\n FChar : Char;\r\n FToken : String;\r\n FTokenType : TTokenType;\r\n private\r\n FAllowLike: Boolean;\r\n function GetCurrentChar: Char;\r\n procedure ScanError(Msg: String);\r\n protected\r\n procedure SetSource(const AValue: String); virtual;\r\n function DoIdentifier: TTokenType;\r\n function DoNumber(AKind: TNumberKind): TTokenType;\r\n function DoDelimiter: TTokenType;\r\n function DoString: TTokenType;\r\n Function NextPos : Char; // inline;\r\n procedure SkipWhiteSpace; // inline;\r\n function IsWordDelim(C : Char) : Boolean; // inline;\r\n function IsDelim(C : Char) : Boolean; // inline;\r\n function IsDigit(C : Char; AKind: TNumberKind) : Boolean; // inline;\r\n function IsAlpha(C : Char) : Boolean; // inline;\r\n public\r\n Constructor Create;\r\n Function GetToken : TTokenType;\r\n Property Token : String Read FToken;\r\n Property TokenType : TTokenType Read FTokenType;\r\n Property Source : String Read FSource Write SetSource;\r\n Property Pos : Integer Read FPos;\r\n Property CurrentChar : Char Read GetCurrentChar;\r\n Property AllowLike : Boolean Read FAllowLike Write FAllowLike;\r\n end;\r\n\r\n EExprScanner = Class(Exception);\r\n\r\n TResultType = (rtBoolean,rtInteger,rtFloat,rtDateTime,rtString,rtCurrency);\r\n TResultTypes = set of TResultType;\r\n\r\n TFPExpressionResult = record\r\n ResultType : TResultType;\r\n resValue : JSValue;\r\n end;\r\n PFPExpressionResult = ^TFPExpressionResult;\r\n TExprParameterArray = Array of TFPExpressionResult;\r\n\r\n { TFPExprNode }\r\n\r\n TFPExprNode = Class(TObject)\r\n Protected\r\n Procedure CheckNodeType(Anode : TFPExprNode; Allowed : TResultTypes);\r\n // A procedure with var saves an implicit try/finally in each node\r\n // A marked difference in execution speed.\r\n Function GetNodeValue : TFPExpressionResult; virtual; abstract;\r\n Public\r\n Procedure Check; virtual; abstract;\r\n Procedure InitAggregate; virtual;\r\n Procedure UpdateAggregate; virtual;\r\n Class Function IsAggregate : Boolean; virtual;\r\n Function HasAggregate : Boolean; virtual;\r\n Function NodeType : TResultType; virtual; abstract;\r\n Function NodeValue : TFPExpressionResult;\r\n Function AsString : string; virtual; abstract;\r\n end;\r\n TExprArgumentArray = Array of TFPExprNode;\r\n\r\n { TFPBinaryOperation }\r\n\r\n TFPBinaryOperation = Class(TFPExprNode)\r\n private\r\n FLeft: TFPExprNode;\r\n FRight: TFPExprNode;\r\n Protected\r\n Procedure CheckSameNodeTypes;\r\n Public\r\n Constructor Create(ALeft,ARight : TFPExprNode); virtual;\r\n Destructor Destroy; override;\r\n Procedure InitAggregate; override;\r\n Procedure UpdateAggregate; override;\r\n Function HasAggregate : Boolean; override;\r\n Procedure Check; override;\r\n Property left : TFPExprNode Read FLeft;\r\n Property Right : TFPExprNode Read FRight;\r\n end;\r\n TFPBinaryOperationClass = Class of TFPBinaryOperation;\r\n\r\n\r\n { TFPBooleanOperation }\r\n\r\n TFPBooleanOperation = Class(TFPBinaryOperation)\r\n Public\r\n Procedure Check; override;\r\n Function NodeType : TResultType; override;\r\n end;\r\n { TFPBinaryAndOperation }\r\n\r\n TFPBinaryAndOperation = Class(TFPBooleanOperation)\r\n Protected\r\n Function GetNodeValue : TFPExpressionResult; override;\r\n Public\r\n Function AsString : string ; override;\r\n end;\r\n\r\n { TFPBinaryOrOperation }\r\n\r\n TFPBinaryOrOperation = Class(TFPBooleanOperation)\r\n Protected\r\n Function GetNodeValue : TFPExpressionResult; override;\r\n Public\r\n Function AsString : string ; override;\r\n end;\r\n\r\n { TFPBinaryXOrOperation }\r\n\r\n TFPBinaryXOrOperation = Class(TFPBooleanOperation)\r\n Protected\r\n Function GetNodeValue : TFPExpressionResult; override;\r\n Public\r\n Function AsString : string ; override;\r\n end;\r\n\r\n { TFPBooleanResultOperation }\r\n\r\n TFPBooleanResultOperation = Class(TFPBinaryOperation)\r\n Public\r\n Procedure Check; override;\r\n Function NodeType : TResultType; override;\r\n end;\r\n TFPBooleanResultOperationClass = Class of TFPBooleanResultOperation;\r\n\r\n\r\n { TFPEqualOperation }\r\n\r\n TFPEqualOperation = Class(TFPBooleanResultOperation)\r\n Protected\r\n Function GetNodeValue : TFPExpressionResult; override;\r\n Public\r\n Function AsString : string ; override;\r\n end;\r\n\r\n { TFPEqualOperation }\r\n\r\n { TFPLikeOperation }\r\n\r\n TFPLikeOperation = Class(TFPBooleanResultOperation)\r\n Protected\r\n FRE : TJSRegexp;\r\n FLast : String;\r\n Function GetNodeValue : TFPExpressionResult; override;\r\n Public\r\n procedure check; override;\r\n Function AsString : string ; override;\r\n end;\r\n\r\n\r\n { TFPUnequalOperation }\r\n\r\n TFPUnequalOperation = Class(TFPEqualOperation)\r\n Protected\r\n Function GetNodeValue : TFPExpressionResult; override;\r\n Public\r\n Function AsString : string ; override;\r\n end;\r\n\r\n { TFPOrderingOperation }\r\n\r\n TFPOrderingOperation = Class(TFPBooleanResultOperation)\r\n Public\r\n Procedure Check; override;\r\n end;\r\n\r\n { TFPLessThanOperation }\r\n\r\n TFPLessThanOperation = Class(TFPOrderingOperation)\r\n Protected\r\n Function GetNodeValue : TFPExpressionResult; override;\r\n Public\r\n Function AsString : string ; override;\r\n end;\r\n\r\n { TFPGreaterThanOperation }\r\n\r\n TFPGreaterThanOperation = Class(TFPOrderingOperation)\r\n Protected\r\n Function GetNodeValue : TFPExpressionResult; override;\r\n Public\r\n Function AsString : string ; override;\r\n end;\r\n\r\n { TFPLessThanEqualOperation }\r\n\r\n TFPLessThanEqualOperation = Class(TFPGreaterThanOperation)\r\n Protected\r\n Function GetNodeValue : TFPExpressionResult; override;\r\n Public\r\n Function AsString : string ; override;\r\n end;\r\n\r\n\r\n { TFPGreaterThanEqualOperation }\r\n\r\n TFPGreaterThanEqualOperation = Class(TFPLessThanOperation)\r\n Protected\r\n Function GetNodeValue : TFPExpressionResult; override;\r\n Public\r\n Function AsString : string ; override;\r\n end;\r\n\r\n { TIfOperation }\r\n\r\n TIfOperation = Class(TFPBinaryOperation)\r\n private\r\n FCondition: TFPExprNode;\r\n protected\r\n Function GetNodeValue : TFPExpressionResult; override;\r\n Public\r\n Procedure Check; override;\r\n Procedure InitAggregate; override;\r\n Procedure UpdateAggregate; override;\r\n Function HasAggregate : Boolean; override;\r\n Function NodeType : TResultType; override;\r\n Constructor Create(ACondition,ALeft,ARight : TFPExprNode); reintroduce;\r\n Destructor destroy; override;\r\n Function AsString : string ; override;\r\n Property Condition : TFPExprNode Read FCondition;\r\n end;\r\n\r\n { TCaseOperation }\r\n\r\n TCaseOperation = Class(TFPExprNode)\r\n private\r\n FArgs : TExprArgumentArray;\r\n FCondition: TFPExprNode;\r\n protected\r\n Function GetNodeValue : TFPExpressionResult; override;\r\n Public\r\n Procedure Check; override;\r\n Procedure InitAggregate; override;\r\n Procedure UpdateAggregate; override;\r\n function HasAggregate: Boolean; override;\r\n Function NodeType : TResultType; override;\r\n Constructor Create(Args : TExprArgumentArray);\r\n Destructor destroy; override;\r\n Function AsString : string ; override;\r\n Property Condition : TFPExprNode Read FCondition;\r\n end;\r\n\r\n { TMathOperation }\r\n\r\n TMathOperation = Class(TFPBinaryOperation)\r\n Public\r\n Procedure Check; override;\r\n Function NodeType : TResultType; override;\r\n end;\r\n\r\n { TFPAddOperation }\r\n\r\n TFPAddOperation = Class(TMathOperation)\r\n Protected\r\n Function GetNodeValue : TFPExpressionResult; override;\r\n Public\r\n Function AsString : string ; override;\r\n end;\r\n\r\n { TFPSubtractOperation }\r\n\r\n TFPSubtractOperation = Class(TMathOperation)\r\n Public\r\n Procedure Check; override;\r\n Function GetNodeValue : TFPExpressionResult; override;\r\n Function AsString : string ; override;\r\n end;\r\n\r\n { TFPMultiplyOperation }\r\n\r\n TFPMultiplyOperation = Class(TMathOperation)\r\n Public\r\n Procedure check; override;\r\n Function AsString : string ; override;\r\n Function GetNodeValue : TFPExpressionResult; override;\r\n end;\r\n\r\n { TFPDivideOperation }\r\n\r\n TFPDivideOperation = Class(TMathOperation)\r\n Public\r\n Procedure Check; override;\r\n Function AsString : string ; override;\r\n Function NodeType : TResultType; override;\r\n Function GetNodeValue : TFPExpressionResult; override;\r\n end;\r\n\r\n { TFPModuloOperation }\r\n\r\n TFPModuloOperation = Class(TMathOperation)\r\n Public\r\n Procedure Check; override;\r\n Function AsString : string ; override;\r\n Function NodeType : TResultType; override;\r\n Function GetNodeValue : TFPExpressionResult; override;\r\n end;\r\n\r\n\r\n { TFPPowerOperation }\r\n TFPPowerOperation = class(TMathOperation)\r\n public\r\n Procedure Check; override;\r\n Function AsString : string ; override;\r\n Function NodeType : TResultType; override;\r\n Function GetNodeValue : TFPExpressionResult; override;\r\n end;\r\n\r\n\r\n { TFPUnaryOperator }\r\n\r\n TFPUnaryOperator = Class(TFPExprNode)\r\n private\r\n FOperand: TFPExprNode;\r\n Public\r\n Constructor Create(AOperand : TFPExprNode);\r\n Destructor Destroy; override;\r\n Procedure InitAggregate; override;\r\n Procedure UpdateAggregate; override;\r\n Function HasAggregate : Boolean; override;\r\n Procedure Check; override;\r\n Property Operand : TFPExprNode Read FOperand;\r\n end;\r\n\r\n { TFPConvertNode }\r\n\r\n TFPConvertNode = Class(TFPUnaryOperator)\r\n Function AsString : String; override;\r\n end;\r\n\r\n { TFPNotNode }\r\n\r\n TFPNotNode = Class(TFPUnaryOperator)\r\n Public\r\n Procedure Check; override;\r\n Function NodeType : TResultType; override;\r\n Function GetNodeValue : TFPExpressionResult; override;\r\n Function AsString : String; override;\r\n end;\r\n\r\n TIntConvertNode = Class(TFPConvertNode)\r\n Public\r\n Procedure Check; override;\r\n end;\r\n\r\n { TIntToFloatNode }\r\n\r\n TIntToFloatNode = Class(TIntConvertNode)\r\n Public\r\n Function NodeType : TResultType; override;\r\n Function GetNodeValue : TFPExpressionResult; override;\r\n end;\r\n\r\n { TIntToCurrencyNode }\r\n\r\n TIntToCurrencyNode = Class(TIntConvertNode)\r\n Public\r\n Function NodeType : TResultType; override;\r\n Function GetNodeValue : TFPExpressionResult; override;\r\n end;\r\n\r\n { TIntToDateTimeNode }\r\n\r\n TIntToDateTimeNode = Class(TIntConvertNode)\r\n Public\r\n Function NodeType : TResultType; override;\r\n Function GetNodeValue : TFPExpressionResult; override;\r\n end;\r\n\r\n { TFloatToDateTimeNode }\r\n\r\n TFloatToDateTimeNode = Class(TFPConvertNode)\r\n Public\r\n Procedure Check; override;\r\n Function NodeType : TResultType; override;\r\n Function GetNodeValue : TFPExpressionResult; override;\r\n end;\r\n\r\n { TFloatToCurrencyNode }\r\n\r\n TFloatToCurrencyNode = Class(TFPConvertNode)\r\n Public\r\n Procedure Check; override;\r\n Function NodeType : TResultType; override;\r\n Function GetNodeValue : TFPExpressionResult; override;\r\n end;\r\n\r\n { TCurrencyToDateTimeNode }\r\n\r\n TCurrencyToDateTimeNode = Class(TFPConvertNode)\r\n Public\r\n Procedure Check; override;\r\n Function NodeType : TResultType; override;\r\n Function GetNodeValue : TFPExpressionResult; override;\r\n end;\r\n\r\n { TCurrencyToFloatNode }\r\n\r\n TCurrencyToFloatNode = Class(TFPConvertNode)\r\n Public\r\n Procedure Check; override;\r\n Function NodeType : TResultType; override;\r\n Function GetNodeValue : TFPExpressionResult; override;\r\n end;\r\n\r\n\r\n { TFPNegateOperation }\r\n\r\n TFPNegateOperation = Class(TFPUnaryOperator)\r\n Public\r\n Procedure Check; override;\r\n Function NodeType : TResultType; override;\r\n Function GetNodeValue : TFPExpressionResult; override;\r\n Function AsString : String; override;\r\n end;\r\n\r\n { TFPConstExpression }\r\n\r\n TFPConstExpression = Class(TFPExprnode)\r\n private\r\n FValue : TFPExpressionResult;\r\n public\r\n Constructor CreateString(AValue : String);\r\n Constructor CreateInteger(AValue : NativeInt);\r\n Constructor CreateDateTime(AValue : TDateTime);\r\n Constructor CreateFloat(AValue : TExprFloat);\r\n Constructor CreateBoolean(AValue : Boolean);\r\n constructor CreateCurrency(AValue: Currency);\r\n Procedure Check; override;\r\n Function NodeType : TResultType; override;\r\n Function GetNodeValue : TFPExpressionResult; override;\r\n Function AsString : string ; override;\r\n // For inspection\r\n Property ConstValue : TFPExpressionResult read FValue;\r\n end;\r\n\r\n\r\n TIdentifierType = (itVariable,itFunctionHandler,itFunctionNode);\r\n TFPExprFunctionEvent = reference to Function (Const Args : TExprParameterArray) : TFPExpressionResult ;\r\n TFPExprVariableEvent = Reference to Function (Const AName : String) : TFPExpressionResult;\r\n\r\n { TFPExprIdentifierDef }\r\n\r\n TFPExprIdentifierDef = Class(TCollectionItem)\r\n private\r\n FNodeType: TFPExprFunctionClass;\r\n FOnGetVarValue: TFPExprVariableEvent;\r\n FStringValue : String;\r\n FValue : TFPExpressionResult;\r\n FArgumentTypes: String;\r\n FIDType: TIdentifierType;\r\n FName: string;\r\n FOnGetValue: TFPExprFunctionEvent;\r\n function GetAsBoolean: Boolean;\r\n function GetAsDateTime: TDateTime;\r\n function GetAsFloat: TExprFloat;\r\n function GetAsCurrency : Currency;\r\n function GetAsInteger: NativeInt;\r\n function GetAsString: String;\r\n function GetResultType: TResultType;\r\n function GetValue: String;\r\n procedure SetArgumentTypes(const AValue: String);\r\n procedure SetAsBoolean(const AValue: Boolean);\r\n procedure SetAsDateTime(const AValue: TDateTime);\r\n procedure SetAsFloat(const AValue: TExprFloat);\r\n procedure SetAsCurrency(const AValue: Currency);\r\n procedure SetAsInteger(const AValue: NativeInt);\r\n procedure SetAsString(const AValue: String);\r\n procedure SetName(const AValue: string);\r\n procedure SetResultType(const AValue: TResultType);\r\n procedure SetValue(const AValue: String);\r\n Protected\r\n Procedure CheckResultType(Const AType : TResultType);\r\n Procedure CheckVariable;\r\n Procedure FetchValue;\r\n Public\r\n Function ArgumentCount : Integer;\r\n Procedure Assign(Source : TPersistent); override;\r\n Function EventBasedVariable : Boolean; Inline;\r\n Property AsFloat : TExprFloat Read GetAsFloat Write SetAsFloat;\r\n Property AsCurrency : Currency Read GetAsCurrency Write SetAsCurrency;\r\n Property AsInteger : NativeInt Read GetAsInteger Write SetAsInteger;\r\n Property AsString : String Read GetAsString Write SetAsString;\r\n Property AsBoolean : Boolean Read GetAsBoolean Write SetAsBoolean;\r\n Property AsDateTime : TDateTime Read GetAsDateTime Write SetAsDateTime;\r\n Published\r\n Property IdentifierType : TIdentifierType Read FIDType Write FIDType;\r\n Property Name : string Read FName Write SetName;\r\n Property Value : String Read GetValue Write SetValue;\r\n Property ParameterTypes : String Read FArgumentTypes Write SetArgumentTypes;\r\n Property ResultType : TResultType Read GetResultType Write SetResultType;\r\n Property OnGetFunctionValue : TFPExprFunctionEvent Read FOnGetValue Write FOnGetValue;\r\n Property OnGetVariableValue : TFPExprVariableEvent Read FOnGetVarValue Write FOnGetVarValue;\r\n Property NodeType : TFPExprFunctionClass Read FNodeType Write FNodeType;\r\n end;\r\n\r\n\r\n TBuiltInCategory = (bcStrings,bcDateTime,bcMath,bcBoolean,bcConversion,bcData,bcVaria,bcUser,bcAggregate);\r\n TBuiltInCategories = Set of TBuiltInCategory;\r\n\r\n { TFPBuiltInExprIdentifierDef }\r\n\r\n TFPBuiltInExprIdentifierDef = Class(TFPExprIdentifierDef)\r\n private\r\n FCategory: TBuiltInCategory;\r\n Public\r\n Procedure Assign(Source : TPersistent); override;\r\n Published\r\n Property Category : TBuiltInCategory Read FCategory Write FCategory;\r\n end;\r\n\r\n { TFPExprIdentifierDefs }\r\n\r\n TFPExprIdentifierDefs = Class(TCollection)\r\n private\r\n FParser: TFPExpressionParser;\r\n function GetI(AIndex : Integer): TFPExprIdentifierDef;\r\n procedure SetI(AIndex : Integer; const AValue: TFPExprIdentifierDef);\r\n Protected\r\n procedure Update(Item: TCollectionItem); override;\r\n Property Parser: TFPExpressionParser Read FParser;\r\n Public\r\n Function IndexOfIdentifier(Const AName : string) : Integer;\r\n Function FindIdentifier(Const AName : string) : TFPExprIdentifierDef;\r\n Function IdentifierByName(Const AName : string) : TFPExprIdentifierDef;\r\n Function AddVariable(Const AName : string; AResultType : TResultType; ACallback : TFPExprVariableEvent) : TFPExprIdentifierDef;\r\n Function AddVariable(Const AName : string; AResultType : TResultType; AValue : String) : TFPExprIdentifierDef;\r\n Function AddBooleanVariable(Const AName : string; AValue : Boolean) : TFPExprIdentifierDef;\r\n Function AddIntegerVariable(Const AName : string; AValue : Integer) : TFPExprIdentifierDef;\r\n Function AddFloatVariable(Const AName : string; AValue : TExprFloat) : TFPExprIdentifierDef;\r\n Function AddCurrencyVariable(Const AName : string; AValue : Currency) : TFPExprIdentifierDef;\r\n Function AddStringVariable(Const AName : string; AValue : String) : TFPExprIdentifierDef;\r\n Function AddDateTimeVariable(Const AName : string; AValue : TDateTime) : TFPExprIdentifierDef;\r\n Function AddFunction(Const AName : string; Const AResultType : Char; Const AParamTypes : String; ACallBack : TFPExprFunctionEvent) : TFPExprIdentifierDef;\r\n Function AddFunction(Const AName : string; Const AResultType : Char; Const AParamTypes : String; ANodeClass : TFPExprFunctionClass) : TFPExprIdentifierDef;\r\n property Identifiers[AIndex : Integer] : TFPExprIdentifierDef Read GetI Write SetI; Default;\r\n end;\r\n\r\n { TFPExprIdentifierNode }\r\n\r\n TFPExprIdentifierNode = Class(TFPExprNode)\r\n Private\r\n FID : TFPExprIdentifierDef;\r\n PResult : PFPExpressionResult;\r\n FResultType : TResultType;\r\n public\r\n Constructor CreateIdentifier(AID : TFPExprIdentifierDef);\r\n Function NodeType : TResultType; override;\r\n Function GetNodeValue : TFPExpressionResult; override;\r\n Property Identifier : TFPExprIdentifierDef Read FID;\r\n end;\r\n\r\n { TFPExprVariable }\r\n\r\n TFPExprVariable = Class(TFPExprIdentifierNode)\r\n Procedure Check; override;\r\n function AsString: string; override;\r\n end;\r\n\r\n { TFPExprFunction }\r\n\r\n TFPExprFunction = Class(TFPExprIdentifierNode)\r\n private\r\n FArgumentNodes : TExprArgumentArray;\r\n FargumentParams : TExprParameterArray;\r\n Protected\r\n Procedure CalcParams;\r\n function ConvertArgument(aIndex: Integer; aNode: TFPExprNode; aType: TResultType): TFPExprNode; virtual;\r\n Public\r\n Procedure Check; override;\r\n Constructor CreateFunction(AID : TFPExprIdentifierDef; Const Args : TExprArgumentArray); virtual;\r\n Destructor Destroy; override;\r\n Procedure InitAggregate; override;\r\n Procedure UpdateAggregate; override;\r\n Function HasAggregate : Boolean; override;\r\n Property ArgumentNodes : TExprArgumentArray Read FArgumentNodes;\r\n Property ArgumentParams : TExprParameterArray Read FArgumentParams;\r\n Function AsString : String; override;\r\n end;\r\n\r\n { TAggregateExpr }\r\n\r\n TAggregateExpr = Class(TFPExprFunction)\r\n Protected\r\n FResult : TFPExpressionResult;\r\n public\r\n Class Function IsAggregate : Boolean; override;\r\n Function GetNodeValue : TFPExpressionResult; override;\r\n end;\r\n\r\n { TAggregateMin }\r\n\r\n TAggregateMin = Class(TAggregateExpr)\r\n Public\r\n FFirst: Boolean;\r\n Public\r\n Procedure InitAggregate; override;\r\n Procedure UpdateAggregate; override;\r\n end;\r\n\r\n { TAggregateMax }\r\n\r\n TAggregateMax = Class(TAggregateExpr)\r\n Public\r\n FFirst: Boolean;\r\n Public\r\n Procedure InitAggregate; override;\r\n Procedure UpdateAggregate; override;\r\n end;\r\n\r\n { TAggregateSum }\r\n\r\n TAggregateSum = Class(TAggregateExpr)\r\n Public\r\n function ConvertArgument(aIndex: Integer; aNode: TFPExprNode; aType: TResultType): TFPExprNode; override;\r\n Procedure InitAggregate; override;\r\n Procedure UpdateAggregate; override;\r\n end;\r\n\r\n { TAggregateAvg }\r\n\r\n TAggregateAvg = Class(TAggregateSum)\r\n Protected\r\n FCount : Integer;\r\n Public\r\n Procedure InitAggregate; override;\r\n Procedure UpdateAggregate; override;\r\n Function GetNodeValue : TFPExpressionResult; override;\r\n end;\r\n\r\n { TAggregateCount }\r\n\r\n TAggregateCount = Class(TAggregateExpr)\r\n Public\r\n Procedure InitAggregate; override;\r\n Procedure UpdateAggregate; override;\r\n end;\r\n\r\n { TFPFunctionEventHandler }\r\n\r\n TFPFunctionEventHandler = Class(TFPExprFunction)\r\n Private\r\n FCallBack : TFPExprFunctionEvent;\r\n Public\r\n Constructor CreateFunction(AID : TFPExprIdentifierDef; Const Args : TExprArgumentArray); override;\r\n Function GetNodeValue : TFPExpressionResult; override;\r\n Property CallBack : TFPExprFunctionEvent Read FCallBack;\r\n end;\r\n\r\n { TFPExpressionParser }\r\n\r\n TFPExpressionParser = class(TComponent)\r\n private\r\n FBuiltIns: TBuiltInCategories;\r\n FExpression: String;\r\n FScanner : TFPExpressionScanner;\r\n FExprNode : TFPExprNode;\r\n FIdentifiers : TFPExprIdentifierDefs;\r\n FHashList : TFPObjectHashTable;\r\n FDirty : Boolean;\r\n procedure CheckEOF;\r\n function GetAsBoolean: Boolean;\r\n function GetAsDateTime: TDateTime;\r\n function GetAsFloat: TExprFloat;\r\n function GetAsCurrency: Currency;\r\n function GetAsInteger: NativeInt;\r\n function GetAsString: String;\r\n function GetAllowLike: Boolean;\r\n function MatchNodes(Todo, Match: TFPExprNode): TFPExprNode;\r\n procedure CheckNodes(var Left, Right: TFPExprNode);\r\n procedure SetBuiltIns(const AValue: TBuiltInCategories);\r\n procedure SetIdentifiers(const AValue: TFPExprIdentifierDefs);\r\n procedure SetAllowLike(AValue: Boolean);\r\n Protected\r\n procedure ParserError(Msg: String);\r\n procedure SetExpression(const AValue: String); virtual;\r\n Procedure CheckResultType(Const Res :TFPExpressionResult; AType : TResultType); inline;\r\n Procedure CheckResultTypes(Const Res :TFPExpressionResult; ATypes : TResultTypes); inline;\r\n Class function ConvertNode(Todo: TFPExprNode; ToType: TResultType): TFPExprNode;\r\n class Function BuiltinsManager : TExprBuiltInManager;\r\n Function Level1 : TFPExprNode;\r\n Function Level2 : TFPExprNode;\r\n Function Level3 : TFPExprNode;\r\n Function Level4 : TFPExprNode;\r\n Function Level5 : TFPExprNode;\r\n Function Level6 : TFPExprNode;\r\n Function Level7 : TFPExprNode;\r\n Function Primitive : TFPExprNode;\r\n function GetToken: TTokenType;\r\n Function TokenType : TTokenType;\r\n Function CurrentToken : String;\r\n Procedure CreateHashList;\r\n Property Scanner : TFPExpressionScanner Read FScanner;\r\n Property ExprNode : TFPExprNode Read FExprNode;\r\n Property Dirty : Boolean Read FDirty;\r\n public\r\n Constructor Create(AOwner :TComponent); override;\r\n Destructor Destroy; override;\r\n Function IdentifierByName(const AName : string) : TFPExprIdentifierDef; virtual;\r\n Procedure Clear;\r\n Class function Evaluate(aExpression : String): TFPExpressionResult; overload;\r\n Procedure EvaluateExpression(Out Result : TFPExpressionResult);\r\n function ExtractNode(var N: TFPExprNode): Boolean;\r\n Function Evaluate : TFPExpressionResult;overload;\r\n Function ResultType : TResultType;\r\n Function HasAggregate : Boolean;\r\n Procedure InitAggregate;\r\n Procedure UpdateAggregate;\r\n Property AllowLike : Boolean Read GetAllowLike Write SetAllowLike;\r\n Property AsFloat : TExprFloat Read GetAsFloat;\r\n Property AsCurrency : Currency Read GetAsCurrency;\r\n Property AsInteger : NativeInt Read GetAsInteger;\r\n Property AsString : String Read GetAsString;\r\n Property AsBoolean : Boolean Read GetAsBoolean;\r\n Property AsDateTime : TDateTime Read GetAsDateTime;\r\n Published\r\n // The Expression to parse\r\n property Expression : String read FExpression write SetExpression;\r\n Property Identifiers : TFPExprIdentifierDefs Read FIdentifiers Write SetIdentifiers;\r\n Property BuiltIns : TBuiltInCategories Read FBuiltIns Write SetBuiltIns;\r\n end;\r\n TFPExpressionParserClass = Class of TFPExpressionParser;\r\n { TExprBuiltInManager }\r\n\r\n TExprBuiltInManager = Class(TComponent)\r\n Private\r\n FDefs : TFPExprIdentifierDefs;\r\n function GetCount: Integer;\r\n function GetI(AIndex : Integer): TFPBuiltInExprIdentifierDef;\r\n protected\r\n Property Defs : TFPExprIdentifierDefs Read FDefs;\r\n Public\r\n Constructor Create(AOwner : TComponent); override;\r\n Destructor Destroy; override;\r\n Function IndexOfIdentifier(Const AName : string) : Integer;\r\n Function FindIdentifier(Const AName : string) : TFPBuiltinExprIdentifierDef;\r\n Function IdentifierByName(Const AName : string) : TFPBuiltinExprIdentifierDef;\r\n Function AddVariable(Const ACategory : TBuiltInCategory; Const AName : string; AResultType : TResultType; AValue : String) : TFPBuiltInExprIdentifierDef;\r\n Function AddBooleanVariable(Const ACategory : TBuiltInCategory; Const AName : string; AValue : Boolean) : TFPBuiltInExprIdentifierDef;\r\n Function AddIntegerVariable(Const ACategory : TBuiltInCategory; Const AName : string; AValue : Integer) : TFPBuiltInExprIdentifierDef;\r\n Function AddFloatVariable(Const ACategory : TBuiltInCategory; Const AName : string; AValue : TExprFloat) : TFPBuiltInExprIdentifierDef;\r\n Function AddCurrencyVariable(Const ACategory : TBuiltInCategory; Const AName : string; AValue : Currency) : TFPBuiltInExprIdentifierDef;\r\n Function AddStringVariable(Const ACategory : TBuiltInCategory; Const AName : string; AValue : String) : TFPBuiltInExprIdentifierDef;\r\n Function AddDateTimeVariable(Const ACategory : TBuiltInCategory; Const AName : string; AValue : TDateTime) : TFPBuiltInExprIdentifierDef;\r\n Function AddFunction(Const ACategory : TBuiltInCategory; Const AName : string; Const AResultType : Char; Const AParamTypes : String; ACallBack : TFPExprFunctionEvent) : TFPBuiltInExprIdentifierDef;\r\n Function AddFunction(Const ACategory : TBuiltInCategory; Const AName : string; Const AResultType : Char; Const AParamTypes : String; ANodeClass : TFPExprFunctionClass) : TFPBuiltInExprIdentifierDef;\r\n Property IdentifierCount : Integer Read GetCount;\r\n Property Identifiers[AIndex : Integer] :TFPBuiltInExprIdentifierDef Read GetI;\r\n end;\r\n\r\n EExprParser = Class(Exception);\r\n\r\nConst\r\n AllBuiltIns = [bcStrings,bcDateTime,bcMath,bcBoolean,bcConversion,bcData,bcVaria,bcUser,bcAggregate];\r\n\r\nFunction TokenName (AToken : TTokenType) : String;\r\nFunction ResultTypeName (AResult : TResultType) : String;\r\nFunction CharToResultType(C : Char) : TResultType;\r\nFunction BuiltinIdentifiers : TExprBuiltInManager;\r\nProcedure RegisterStdBuiltins(AManager : TExprBuiltInManager; Categories : TBuiltInCategories = AllBuiltIns);\r\nfunction ArgToFloat(Arg: TFPExpressionResult): TExprFloat;\r\n\r\n\r\n\r\nimplementation\r\n\r\nuses \r\n{$IFDEF FPC_DOTTEDUNITS}\r\n System.Typinfo;\r\n{$ELSE}\r\n typinfo;\r\n{$ENDIF}\r\n\r\n{ TFPExpressionParser }\r\n\r\nconst\r\n cNull=#0;\r\n cSingleQuote = '''';\r\n cHexIdentifier = '$';\r\n cOctalIdentifier = '&';\r\n cBinaryIdentifier = '%';\r\n\r\n Digits = ['0'..'9','.'];\r\n HexDigits = ['0'..'9', 'A'..'F', 'a'..'f'];\r\n OctalDigits = ['0'..'7'];\r\n BinaryDigits = ['0', '1'];\r\n WhiteSpace = [' ',#13,#10,#9];\r\n Operators = ['+','-','<','>','=','/','*','^'];\r\n Delimiters = Operators+[',','(',')'];\r\n Symbols = ['%']+Delimiters;\r\n WordDelimiters = WhiteSpace + Symbols;\r\n\r\nvar\r\n FileFormatSettings: TFormatSettings;\r\n\r\nResourcestring\r\n SBadQuotes = 'Unterminated string';\r\n SUnknownDelimiter = 'Unknown delimiter character: \"%s\"';\r\n SErrUnknownCharacter = 'Unknown character at pos %d: \"%s\"';\r\n SErrUnexpectedEndOfExpression = 'Unexpected end of expression';\r\n SErrUnknownComparison = 'Internal error: Unknown comparison';\r\n SErrUnknownBooleanOp = 'Internal error: Unknown boolean operation';\r\n SErrBracketExpected = 'Expected ) bracket at position %d, but got %s';\r\n SerrUnknownTokenAtPos = 'Unknown token at pos %d : %s';\r\n SErrLeftBracketExpected = 'Expected ( bracket at position %d, but got %s';\r\n SErrInvalidFloat = '%s is not a valid floating-point value';\r\n SErrUnknownIdentifier = 'Unknown identifier: %s';\r\n SErrInExpression = 'Cannot evaluate: error in expression';\r\n SErrInExpressionEmpty = 'Cannot evaluate: empty expression';\r\n SErrCommaExpected = 'Expected comma (,) at position %d, but got %s';\r\n SErrInvalidNumberChar = 'Unexpected character in number : %s';\r\n SErrInvalidNumber = 'Invalid numerical value : %s';\r\n SErrUnterminatedIdentifier = 'Unterminated quoted identifier: %s';\r\n SErrNoOperand = 'No operand for unary operation %s';\r\n SErrNoleftOperand = 'No left operand for binary operation %s';\r\n SErrNoRightOperand = 'No right operand for binary operation %s';\r\n SErrNoNegation = 'Cannot negate expression of type %s : %s';\r\n SErrNoNOTOperation = 'Cannot perform \"not\" on expression of type %s: %s';\r\n SErrTypesDoNotMatch = 'Type mismatch: %s<>%s for expressions \"%s\" and \"%s\".';\r\n SErrNoNodeToCheck = 'Internal error: No node to check !';\r\n SInvalidNodeType = 'Node type (%s) not in allowed types (%s) for expression: %s';\r\n SErrUnterminatedExpression = 'Badly terminated expression. Found token at position %d : %s';\r\n SErrDuplicateIdentifier = 'An identifier with name \"%s\" already exists.';\r\n SErrInvalidResultCharacter = '\"%s\" is not a valid return type indicator';\r\n ErrInvalidArgumentCount = 'Invalid argument count for function %s';\r\n SErrInvalidArgumentType = 'Invalid type for argument %d: Expected %s, got %s';\r\n SErrInvalidResultType = 'Invalid result type: %s';\r\n SErrNotVariable = 'Identifier %s is not a variable';\r\n SErrIFNeedsBoolean = 'First argument to IF must be of type boolean: %s';\r\n SErrCaseNeeds3 = 'Case statement needs to have at least 4 arguments';\r\n SErrCaseEvenCount = 'Case statement needs to have an even number of arguments';\r\n SErrCaseLabelNotAConst = 'Case label %d \"%s\" is not a constant expression';\r\n SErrCaseLabelType = 'Case label %d \"%s\" needs type %s, but has type %s';\r\n SErrCaseValueType = 'Case value %d \"%s\" needs type %s, but has type %s';\r\n SErrStringTypeRequired = 'Expression requires string type, got type \"%s\" for %s';\r\n\r\n{ ---------------------------------------------------------------------\r\n Auxiliary functions\r\n ---------------------------------------------------------------------}\r\n\r\nProcedure RaiseParserError(Msg : String);\r\nbegin\r\n Raise EExprParser.Create(Msg);\r\nend;\r\n\r\nProcedure RaiseParserError(Fmt : String; Args : Array of Const);\r\nbegin\r\n Raise EExprParser.CreateFmt(Fmt,Args);\r\nend;\r\n\r\nfunction TokenName(AToken: TTokenType): String;\r\n\r\nbegin\r\n Result:=GetEnumName(TypeInfo(TTokenType),Ord(AToken));\r\nend;\r\n\r\nfunction ResultTypeName(AResult: TResultType): String;\r\n\r\nbegin\r\n Result:=GetEnumName(TypeInfo(TResultType),Ord(AResult));\r\nend;\r\n\r\nfunction CharToResultType(C: Char): TResultType;\r\nbegin\r\n Case Upcase(C) of\r\n 'S' : Result:=rtString;\r\n 'D' : Result:=rtDateTime;\r\n 'B' : Result:=rtBoolean;\r\n 'I' : Result:=rtInteger;\r\n 'F' : Result:=rtFloat;\r\n 'C' : Result:=rtCurrency;\r\n else\r\n RaiseParserError(SErrInvalidResultCharacter,[C]);\r\n end;\r\nend;\r\n\r\nVar\r\n BuiltIns : TExprBuiltInManager;\r\n\r\nfunction BuiltinIdentifiers: TExprBuiltInManager;\r\n\r\nbegin\r\n If (BuiltIns=Nil) then\r\n BuiltIns:=TExprBuiltInManager.Create(Nil);\r\n Result:=BuiltIns;\r\nend;\r\n\r\n\r\n{ TFloatToCurrencyNode }\r\n\r\nprocedure TFloatToCurrencyNode.Check;\r\nbegin\r\n CheckNodeType(Operand,[rtFloat]);\r\nend;\r\n\r\nfunction TFloatToCurrencyNode.NodeType: TResultType;\r\nbegin\r\n Result:=rtCurrency;\r\nend;\r\n\r\nFunction TFloatToCurrencyNode.GetNodeValue: TFPExpressionResult;\r\nbegin\r\n Result:=Operand.GetNodeValue;\r\n Result.ResultType:=rtCurrency;\r\n Result.resValue:=Result.resValue;\r\nend;\r\n\r\n{ TIntToCurrencyNode }\r\n\r\nfunction TIntToCurrencyNode.NodeType: TResultType;\r\nbegin\r\n Result:=rtCurrency;\r\nend;\r\n\r\nFunction TIntToCurrencyNode.GetNodeValue: TFPExpressionResult;\r\nbegin\r\n Result:=Operand.GetNodeValue;\r\n Result.resValue:=Result.resValue;\r\n Result.ResultType:=rtCurrency;\r\nend;\r\n\r\n{ TFPModuloOperation }\r\n\r\nprocedure TFPModuloOperation.Check;\r\nbegin\r\n CheckNodeType(Left,[rtInteger]);\r\n CheckNodeType(Right,[rtInteger]);\r\n inherited Check;\r\nend;\r\n\r\nfunction TFPModuloOperation.AsString: string;\r\nbegin\r\n Result:=Left.AsString+' mod '+Right.asString;\r\nend;\r\n\r\nfunction TFPModuloOperation.NodeType: TResultType;\r\nbegin\r\n Result:=rtInteger;\r\nend;\r\n\r\nfunction TFPModuloOperation.GetNodeValue: TFPExpressionResult;\r\n\r\nVar\r\n RRes : TFPExpressionResult;\r\n\r\nbegin\r\n Result:=Left.GetNodeValue;\r\n RRes:=Right.GetNodeValue;\r\n Result.resValue:=NativeInt(Result.resValue) mod NativeInt(RRes.resValue);\r\n Result.ResultType:=rtInteger;\r\nend;\r\n\r\n{ TAggregateMax }\r\n\r\nprocedure TAggregateMax.InitAggregate;\r\nbegin\r\n inherited InitAggregate;\r\n FFirst:=True;\r\n FResult.ResultType:=FArgumentNodes[0].NodeType;\r\n Case FResult.ResultType of\r\n rtFloat : FResult.resValue:=0.0;\r\n rtCurrency : FResult.resValue:=0.0;\r\n rtInteger : FResult.resValue:=0;\r\n end;\r\nend;\r\n\r\nprocedure TAggregateMax.UpdateAggregate;\r\n\r\nVar\r\n OK : Boolean;\r\n N : TFPExpressionResult;\r\n\r\nbegin\r\n N:=FArgumentNodes[0].GetNodeValue;\r\n if FFirst then\r\n begin\r\n FResult.ResultType:=N.ResultType;\r\n FFirst:=False;\r\n OK:=True;\r\n end\r\n else\r\n Case N.ResultType of\r\n rtFloat: OK:=TExprFloat(N.resValue)>TExprFloat(FResult.resValue);\r\n rtCurrency: OK:=Currency(N.resValue)>Currency(FResult.resValue);\r\n rtinteger: OK:=NativeInt(N.resValue)>NativeInt(FResult.resValue);\r\n end;\r\n if OK then\r\n Case N.ResultType of\r\n rtFloat: FResult.resValue:=N.resValue;\r\n rtinteger: FResult.resValue:=N.resValue;\r\n rtCurrency: FResult.resValue:=N.resValue;\r\n end;\r\nend;\r\n\r\n{ TAggregateMin }\r\n\r\nprocedure TAggregateMin.InitAggregate;\r\nbegin\r\n inherited InitAggregate;\r\n FFirst:=True;\r\n FResult.ResultType:=FArgumentNodes[0].NodeType;\r\n Case FResult.ResultType of\r\n rtFloat : FResult.resValue:=0.0;\r\n rtCurrency : FResult.resValue:=0.0;\r\n rtInteger : FResult.resValue:=0;\r\n end;\r\nend;\r\n\r\nprocedure TAggregateMin.UpdateAggregate;\r\n\r\nVar\r\n OK : Boolean;\r\n N : TFPExpressionResult;\r\n\r\nbegin\r\n N:=FArgumentNodes[0].GetNodeValue;\r\n if FFirst then\r\n begin\r\n FFirst:=False;\r\n OK:=True;\r\n end\r\n else\r\n Case N.ResultType of\r\n rtFloat: OK:=TExprFloat(N.resValue)Length(FSource) then\r\n FChar:=cNull\r\n else\r\n FChar:=FSource[FPos];\r\n Result:=FChar;\r\nend;\r\n\r\n\r\nfunction TFPExpressionScanner.IsWordDelim(C: Char): Boolean;\r\nbegin\r\n Result:=C in WordDelimiters;\r\nend;\r\n\r\nfunction TFPExpressionScanner.IsDelim(C: Char): Boolean;\r\nbegin\r\n Result:=C in Delimiters;\r\nend;\r\n\r\nfunction TFPExpressionScanner.IsDigit(C: Char; AKind: TNumberKind): Boolean;\r\nbegin\r\n case AKind of\r\n nkDecimal: Result := C in Digits;\r\n nkHex : Result := C in HexDigits;\r\n nkOctal : Result := C in OctalDigits;\r\n nkBinary : Result := C in BinaryDigits;\r\n end;\r\nend;\r\n\r\nprocedure TFPExpressionScanner.SkipWhiteSpace;\r\n\r\nbegin\r\n While (FChar in WhiteSpace) and (FPos<=LSource) do\r\n NextPos;\r\nend;\r\n\r\nfunction TFPExpressionScanner.DoDelimiter: TTokenType;\r\n\r\nVar\r\n B : Boolean;\r\n C,D : Char;\r\n\r\nbegin\r\n C:=FChar;\r\n FToken:=C;\r\n B:=C in ['<','>'];\r\n D:=C;\r\n C:=NextPos;\r\n\r\n if B and (C in ['=','>']) then\r\n begin\r\n FToken:=FToken+C;\r\n NextPos;\r\n If (D='>') then\r\n Result:=ttLargerThanEqual\r\n else if (C='>') then\r\n Result:=ttUnequal\r\n else\r\n Result:=ttLessThanEqual;\r\n end\r\n else\r\n Case D of\r\n '+' : Result := ttPlus;\r\n '-' : Result := ttMinus;\r\n '<' : Result := ttLessThan;\r\n '>' : Result := ttLargerThan;\r\n '=' : Result := ttEqual;\r\n '/' : Result := ttDiv;\r\n '*' : Result := ttMul;\r\n '(' : Result := ttLeft;\r\n ')' : Result := ttRight;\r\n ',' : Result := ttComma;\r\n '^' : Result := ttPower;\r\n else\r\n ScanError(Format(SUnknownDelimiter,[D]));\r\n end;\r\n\r\nend;\r\n\r\nprocedure TFPExpressionScanner.ScanError(Msg: String);\r\n\r\nbegin\r\n Raise EExprScanner.Create(Msg)\r\nend;\r\n\r\n\r\nfunction TFPExpressionScanner.DoString: TTokenType;\r\n\r\n Function TerminatingChar(C : Char) : boolean;\r\n\r\n begin\r\n Result:=(C=cNull) or\r\n ((C=cSingleQuote) and\r\n Not ((FPos '') and (S[1] in ['&', '$', '%']) then\r\n begin\r\n System.Val(S, L64, Code);\r\n if Code = 0 then\r\n V := L64\r\n end\r\n else\r\n System.Val(S, V, Code);\r\nend;\r\n{$endif}\r\n\r\nfunction TFPExpressionScanner.DoNumber(AKind: TNumberKind): TTokenType;\r\n\r\nVar\r\n C : Char;\r\n X : TExprFloat;\r\n I : Integer;\r\n prevC: Char;\r\n\r\n function ValidDigit(C: Char; AKind: TNumberKind): Boolean;\r\n begin\r\n Result := IsDigit(C, AKind);\r\n if (not Result) then\r\n case AKind of\r\n nkDecimal:\r\n Result := ((FToken <> '') and (UpCase(C)='E')) or\r\n ((FToken <> '') and (C in ['+','-']) and (prevC='E'));\r\n nkHex:\r\n Result := (C = cHexIdentifier) and (prevC = #0);\r\n nkOctal:\r\n Result := (C = cOctalIdentifier) and (prevC = #0);\r\n nkBinary:\r\n Result := (C = cBinaryIdentifier) and (prevC = #0);\r\n end;\r\n end;\r\n\r\nbegin\r\n C:=CurrentChar;\r\n prevC := #0;\r\n while (C <> cNull) do\r\n begin\r\n if IsWordDelim(C) then\r\n case AKind of\r\n nkDecimal:\r\n if not (prevC in ['E','-','+']) then break;\r\n nkHex, nkOctal:\r\n break;\r\n nkBinary:\r\n if (prevC <> #0) then break; // allow '%' as first char\r\n end;\r\n if not ValidDigit(C, AKind) then\r\n ScanError(Format(SErrInvalidNumberChar,[C]));\r\n FToken := FToken+C;\r\n prevC := Upcase(C);\r\n C:=NextPos;\r\n end;\r\n Val(FToken,X,I);\r\n If (I<>0) then\r\n ScanError(Format(SErrInvalidNumber,[FToken]));\r\n Result:=ttNumber;\r\nend;\r\n\r\nfunction TFPExpressionScanner.DoIdentifier: TTokenType;\r\nVar\r\n C : Char;\r\n S : String;\r\n IsBracket: boolean;\r\nbegin\r\n C:=CurrentChar;\r\n IsBracket := false;\r\n while (not IsWordDelim(C)) and (C<>cNull) or (IsBracket and (C = ' ')) do\r\n begin\r\n if (C='[') then\r\n IsBracket := true;\r\n if (C=']') then\r\n IsBracket := false;\r\n\r\n if (C<>'\"') then\r\n FToken:=FToken+C\r\n else\r\n begin\r\n C:=NextPos;\r\n While Not (C in [cNull,'\"']) do\r\n begin\r\n FToken:=FToken+C;\r\n C:=NextPos;\r\n end;\r\n if (C<>'\"') then\r\n ScanError(Format(SErrUnterminatedIdentifier,[FToken]));\r\n end;\r\n C:=NextPos;\r\n end;\r\n S:=LowerCase(Token);\r\n If (S='or') then\r\n Result:=ttOr\r\n else if (S='xor') then\r\n Result:=ttXOr\r\n else if (S='and') then\r\n Result:=ttAnd\r\n else if (S='true') then\r\n Result:=ttTrue\r\n else if (S='false') then\r\n Result:=ttFalse\r\n else if (S='not') then\r\n Result:=ttnot\r\n else if (S='if') then\r\n Result:=ttif\r\n else if (S='case') then\r\n Result:=ttcase\r\n else if (S='mod') then\r\n Result:=ttMod\r\n else if (S='like') and AllowLike then\r\n Result:=ttLike\r\n else\r\n Result:=ttIdentifier;\r\nend;\r\n\r\nfunction TFPExpressionScanner.GetToken: TTokenType;\r\n\r\nVar\r\n C : Char;\r\n\r\nbegin\r\n FToken := '';\r\n SkipWhiteSpace;\r\n C:=FChar;\r\n if c=cNull then\r\n Result:=ttEOF\r\n else if IsDelim(C) then\r\n Result:=DoDelimiter\r\n else if (C=cSingleQuote) then\r\n Result:=DoString\r\n else if (C=cHexIdentifier) then\r\n Result := DoNumber(nkHex)\r\n else if (C=cOctalIdentifier) then\r\n Result := DoNumber(nkOctal)\r\n else if (C=cBinaryIdentifier) then\r\n Result := DoNumber(nkBinary)\r\n else if IsDigit(C, nkDecimal) then\r\n Result:=DoNumber(nkDecimal)\r\n else if IsAlpha(C) or (C='\"') or (C='_') or (C='[') or (C=']') then\r\n Result:=DoIdentifier\r\n else\r\n ScanError(Format(SErrUnknownCharacter,[FPos,C])) ;\r\n FTokenType:=Result;\r\nend;\r\n\r\n{ ---------------------------------------------------------------------\r\n TFPExpressionParser\r\n ---------------------------------------------------------------------}\r\n\r\nfunction TFPExpressionParser.TokenType: TTokenType;\r\n\r\nbegin\r\n Result:=FScanner.TokenType;\r\nend;\r\n\r\nfunction TFPExpressionParser.CurrentToken: String;\r\nbegin\r\n Result:=FScanner.Token;\r\nend;\r\n\r\nprocedure TFPExpressionParser.CreateHashList;\r\n\r\nVar\r\n ID : TFPExpridentifierDef;\r\n BID : TFPBuiltinExpridentifierDef;\r\n I : Integer;\r\n M : TExprBuiltinManager;\r\n\r\nbegin\r\n FHashList.Clear;\r\n // Builtins\r\n M:=BuiltinsManager;\r\n If (FBuiltins<>[]) and Assigned(M) then\r\n For I:=0 to M.IdentifierCount-1 do\r\n begin\r\n BID:=M.Identifiers[I];\r\n If BID.Category in FBuiltins then\r\n FHashList.Add(LowerCase(BID.Name),BID);\r\n end;\r\n // User\r\n For I:=0 to FIdentifiers.Count-1 do\r\n begin\r\n ID:=FIdentifiers[i];\r\n FHashList.Add(LowerCase(ID.Name),ID);\r\n end;\r\n FDirty:=False;\r\nend;\r\n\r\nfunction TFPExpressionParser.IdentifierByName(const AName: string): TFPExprIdentifierDef;\r\nvar\r\n s: string;\r\nbegin\r\n If FDirty then\r\n CreateHashList;\r\n\r\n s := AName;\r\n if (Length(s) > 2) then\r\n begin\r\n if (s[1] = '[') and (s[Length(s)] = ']') then\r\n begin\r\n Delete(s,1,1);\r\n Delete(s,Length(s),1);\r\n end;\r\n end;\r\n\r\n Result:=TFPExprIdentifierDef(FHashList[LowerCase(s)]);\r\nend;\r\n\r\nprocedure TFPExpressionParser.Clear;\r\nbegin\r\n FExpression:='';\r\n FHashList.Clear;\r\n FExprNode.Free;\r\nend;\r\n\r\nclass function TFPExpressionParser.Evaluate(aExpression: String): TFPExpressionResult;\r\n\r\nVar\r\n F : TFPExpressionParser;\r\n\r\nbegin\r\n F:=TFPExpressionParser.Create(Nil);\r\n try\r\n F.Expression:=aExpression;\r\n Result:=F.Evaluate;\r\n finally\r\n F.Free;\r\n end;\r\nend;\r\n\r\nconstructor TFPExpressionParser.Create(AOwner: TComponent);\r\nbegin\r\n inherited Create(AOwner);\r\n FIdentifiers:=TFPExprIdentifierDefs.Create(TFPExprIdentifierDef);\r\n FIdentifiers.FParser:=Self;\r\n FScanner:=TFPExpressionScanner.Create;\r\n FHashList:=TFPObjectHashTable.Create(False);\r\nend;\r\n\r\ndestructor TFPExpressionParser.Destroy;\r\nbegin\r\n FreeAndNil(FHashList);\r\n FreeAndNil(FExprNode);\r\n FreeAndNil(FIdentifiers);\r\n FreeAndNil(FScanner);\r\n inherited Destroy;\r\nend;\r\n\r\nfunction TFPExpressionParser.GetToken: TTokenType;\r\n\r\nbegin\r\n Result:=FScanner.GetToken;\r\nend;\r\n\r\nprocedure TFPExpressionParser.CheckEOF;\r\n\r\nbegin\r\n If (TokenType=ttEOF) then\r\n ParserError(SErrUnexpectedEndOfExpression);\r\nend;\r\n\r\nprocedure TFPExpressionParser.SetIdentifiers(const AValue: TFPExprIdentifierDefs\r\n );\r\nbegin\r\n FIdentifiers.Assign(AValue)\r\nend;\r\n\r\nprocedure TFPExpressionParser.SetAllowLike(AValue: Boolean);\r\nbegin\r\n FScanner.AllowLike:=aValue;\r\nend;\r\n\r\nfunction TFPExpressionParser.Evaluate: TFPExpressionResult;\r\nbegin\r\n If (FExpression='') then\r\n ParserError(SErrInExpressionEmpty);\r\n if not Assigned(FExprNode) then\r\n ParserError(SErrInExpression);\r\n Result:=FExprNode.GetNodeValue;\r\nend;\r\n\r\n\r\nprocedure TFPExpressionParser.EvaluateExpression(out Result: TFPExpressionResult);\r\nbegin\r\n Result:=Evaluate;\r\nend;\r\n\r\nfunction TFPExpressionParser.ExtractNode(var N: TFPExprNode): Boolean;\r\nbegin\r\n Result:=Assigned(FExprNode);\r\n if Result then\r\n begin\r\n N:=FExprNode;\r\n FExprNode:=Nil;\r\n FExpression:='';\r\n end;\r\nend;\r\n\r\nprocedure TFPExpressionParser.ParserError(Msg: String);\r\nbegin\r\n Raise EExprParser.Create(Msg);\r\nend;\r\n\r\nclass function TFPExpressionParser.ConvertNode(Todo: TFPExprNode; ToType: TResultType): TFPExprNode;\r\nbegin\r\n Result:=ToDo;\r\n Case ToDo.NodeType of\r\n rtInteger :\r\n Case ToType of\r\n rtFloat : Result:=TIntToFloatNode.Create(Result);\r\n rtCurrency : Result:=TIntToCurrencyNode.Create(Result);\r\n rtDateTime : Result:=TIntToDateTimeNode.Create(Result);\r\n end;\r\n rtFloat :\r\n Case ToType of\r\n rtCurrency : Result:=TFloatToCurrencyNode.Create(Result);\r\n rtDateTime : Result:=TFloatToDateTimeNode.Create(Result);\r\n end;\r\n rtCurrency :\r\n Case ToType of\r\n rtFloat : Result:=TCurrencyToFloatNode.Create(Result);\r\n rtDateTime : Result:=TCurrencyToDateTimeNode.Create(Result);\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TFPExpressionParser.GetAsBoolean: Boolean;\r\n\r\nvar\r\n Res: TFPExpressionResult;\r\n\r\nbegin\r\n EvaluateExpression(Res);\r\n CheckResultType(Res,rtBoolean);\r\n Result:=Boolean(Res.resValue);\r\nend;\r\n\r\nfunction TFPExpressionParser.GetAsDateTime: TDateTime;\r\nvar\r\n Res: TFPExpressionResult;\r\n\r\nbegin\r\n EvaluateExpression(Res);\r\n CheckResultType(Res,rtDateTime);\r\n Result:=TDateTime(Res.resValue);\r\nend;\r\n\r\nfunction TFPExpressionParser.GetAsFloat: TExprFloat;\r\n\r\nvar\r\n Res: TFPExpressionResult;\r\n\r\nbegin\r\n EvaluateExpression(Res);\r\n CheckResultTypes(Res,[rtFloat,rtCurrency,rtInteger]);\r\n case Res.ResultType of\r\n rtInteger : Result:=NativeInt(Res.resValue);\r\n rtFloat : Result:=TExprFloat(Res.resValue);\r\n rtCurrency : Result:=Currency(res.resValue);\r\n end;\r\nend;\r\n\r\nfunction TFPExpressionParser.GetAsCurrency: Currency;\r\nvar\r\n Res: TFPExpressionResult;\r\n\r\nbegin\r\n EvaluateExpression(Res);\r\n CheckResultTypes(Res,[rtFloat,rtCurrency,rtInteger]);\r\n case Res.ResultType of\r\n rtInteger : Result:=NativeInt(Res.resValue);\r\n rtFloat : Result:=TExprFloat(Res.resValue);\r\n rtCurrency : Result:=Currency(res.resValue);\r\n end;\r\nend;\r\n\r\nfunction TFPExpressionParser.GetAsInteger: NativeInt;\r\n\r\nvar\r\n Res: TFPExpressionResult;\r\n\r\nbegin\r\n EvaluateExpression(Res);\r\n CheckResultType(Res,rtInteger);\r\n Result:=NativeInt(Res.resValue);\r\nend;\r\n\r\nfunction TFPExpressionParser.GetAsString: String;\r\n\r\nvar\r\n Res: TFPExpressionResult;\r\n\r\nbegin\r\n EvaluateExpression(Res);\r\n CheckResultType(Res,rtString);\r\n Result:=String(Res.resValue);\r\nend;\r\n\r\nfunction TFPExpressionParser.GetAllowLike: Boolean;\r\nbegin\r\n Result:=FScanner.AllowLike;\r\nend;\r\n\r\n{\r\n Checks types of todo and match. If ToDO can be converted to it matches\r\n the type of match, then a node is inserted.\r\n For binary operations, this function is called for both operands.\r\n}\r\n\r\nfunction TFPExpressionParser.MatchNodes(Todo,Match : TFPExprNode): TFPExprNode;\r\n\r\nVar\r\n FromType,ToType : TResultType;\r\n\r\nbegin\r\n Result:=Todo;\r\n FromType:=Todo.NodeType;\r\n ToType:=Match.NodeType;\r\n If (FromType<>ToType) then\r\n Case FromType of\r\n rtInteger:\r\n if (ToType in [rtFloat,rtCurrency,rtDateTime]) then\r\n Result:=ConvertNode(Todo,toType);\r\n rtFloat:\r\n if (ToType in [rtCurrency,rtDateTime]) then\r\n Result:=ConvertNode(Todo,toType);\r\n rtCurrency:\r\n if (ToType in [rtFloat,rtDateTime]) then\r\n Result:=ConvertNode(Todo,toType);\r\n end;\r\nend;\r\n\r\n{\r\n if the result types differ, they are converted to a common type if possible.\r\n}\r\n\r\nprocedure TFPExpressionParser.CheckNodes(var Left, Right: TFPExprNode);\r\n\r\nbegin\r\n Left:=MatchNodes(Left,Right);\r\n Right:=MatchNodes(Right,Left);\r\nend;\r\n\r\nprocedure TFPExpressionParser.SetBuiltIns(const AValue: TBuiltInCategories);\r\nbegin\r\n if FBuiltIns=AValue then exit;\r\n FBuiltIns:=AValue;\r\n FDirty:=True;\r\nend;\r\n\r\nfunction TFPExpressionParser.Level1: TFPExprNode;\r\n\r\nvar\r\n tt: TTokenType;\r\n Right : TFPExprNode;\r\n\r\nbegin\r\n{$ifdef debugexpr}Writeln('Level 1 ',TokenName(TokenType),': ',CurrentToken);{$endif debugexpr}\r\n if TokenType = ttNot then\r\n begin\r\n GetToken;\r\n CheckEOF;\r\n Right:=Level2;\r\n Result:=TFPNotNode.Create(Right);\r\n end\r\n else\r\n Result:=Level2;\r\n Try\r\n while (TokenType in [ttAnd,ttOr,ttXor]) do\r\n begin\r\n tt:=TokenType;\r\n GetToken;\r\n CheckEOF;\r\n Right:=Level2;\r\n Case tt of\r\n ttOr : Result:=TFPBinaryOrOperation.Create(Result,Right);\r\n ttAnd : Result:=TFPBinaryAndOperation.Create(Result,Right);\r\n ttXor : Result:=TFPBinaryXorOperation.Create(Result,Right);\r\n Else\r\n ParserError(SErrUnknownBooleanOp)\r\n end;\r\n end;\r\n Except\r\n Result.Free;\r\n Raise;\r\n end;\r\nend;\r\n\r\nfunction TFPExpressionParser.Level2: TFPExprNode;\r\n\r\nvar\r\n Right : TFPExprNode;\r\n tt : TTokenType;\r\n C : TFPBinaryOperationClass;\r\n\r\nbegin\r\n{$ifdef debugexpr} Writeln('Level 2 ',TokenName(TokenType),': ',CurrentToken);{$endif debugexpr}\r\n Result:=Level3;\r\n try\r\n if (TokenType in ttComparisons) then\r\n begin\r\n tt:=TokenType;\r\n GetToken;\r\n CheckEOF;\r\n Right:=Level3;\r\n CheckNodes(Result,Right);\r\n Case tt of\r\n ttLessthan : C:=TFPLessThanOperation;\r\n ttLessthanEqual : C:=TFPLessThanEqualOperation;\r\n ttLargerThan : C:=TFPGreaterThanOperation;\r\n ttLargerThanEqual : C:=TFPGreaterThanEqualOperation;\r\n ttEqual : C:=TFPEqualOperation;\r\n ttUnequal : C:=TFPUnequalOperation;\r\n ttLike : C:=TFPLikeOperation;\r\n Else\r\n ParserError(SErrUnknownComparison)\r\n end;\r\n Result:=C.Create(Result,Right);\r\n end;\r\n Except\r\n Result.Free;\r\n Raise;\r\n end;\r\nend;\r\n\r\nfunction TFPExpressionParser.Level3: TFPExprNode;\r\n\r\nvar\r\n tt : TTokenType;\r\n right : TFPExprNode;\r\n\r\nbegin\r\n{$ifdef debugexpr} Writeln('Level 3 ',TokenName(TokenType),': ',CurrentToken);{$endif debugexpr}\r\n Result:=Level4;\r\n try\r\n while TokenType in [ttPlus,ttMinus] do\r\n begin\r\n tt:=TokenType;\r\n GetToken;\r\n CheckEOF;\r\n Right:=Level4;\r\n CheckNodes(Result,Right);\r\n Case tt of\r\n ttPlus : Result:=TFPAddOperation.Create(Result,Right);\r\n ttMinus : Result:=TFPSubtractOperation.Create(Result,Right);\r\n end;\r\n end;\r\n Except\r\n Result.Free;\r\n Raise;\r\n end;\r\nend;\r\n\r\n\r\n\r\n\r\nfunction TFPExpressionParser.Level4: TFPExprNode;\r\n\r\nvar\r\n tt : TTokenType;\r\n right : TFPExprNode;\r\n\r\nbegin\r\n{$ifdef debugexpr} Writeln('Level 4 ',TokenName(TokenType),': ',CurrentToken);{$endif debugexpr}\r\n Result:=Level5;\r\n try\r\n while (TokenType in [ttMul,ttDiv,ttMod]) do\r\n begin\r\n tt:=TokenType;\r\n GetToken;\r\n Right:=Level5;\r\n CheckNodes(Result,Right);\r\n Case tt of\r\n ttMul : Result:=TFPMultiplyOperation.Create(Result,Right);\r\n ttDiv : Result:=TFPDivideOperation.Create(Result,Right);\r\n ttMod : Result:=TFPModuloOperation.Create(Result,Right);\r\n end;\r\n end;\r\n Except\r\n Result.Free;\r\n Raise;\r\n end;\r\nend;\r\n\r\nfunction TFPExpressionParser.Level5: TFPExprNode;\r\n\r\nVar\r\n B : Boolean;\r\n\r\nbegin\r\n{$ifdef debugexpr} Writeln('Level 5 ',TokenName(TokenType),': ',CurrentToken);{$endif debugexpr}\r\n B:=False;\r\n if (TokenType in [ttPlus,ttMinus]) then\r\n begin\r\n B:=TokenType=ttMinus;\r\n GetToken;\r\n end;\r\n Result:=Level6;\r\n If B then\r\n Result:=TFPNegateOperation.Create(Result);\r\nend;\r\n\r\nfunction TFPExpressionParser.Level6: TFPExprNode;\r\nvar\r\n right: TFPExprNode;\r\nbegin\r\n{$ifdef debugexpr} Writeln('Level 6 ',TokenName(TokenType),': ',CurrentToken);{$endif debugexpr}\r\n Result := Level7;\r\n try\r\n while (TokenType = ttPower) do\r\n begin\r\n GetToken;\r\n right := Level5; // Accept '(', unary '+', '-' as next tokens\r\n CheckNodes(Result, right);\r\n Result := TFPPowerOperation.Create(Result, right);\r\n end;\r\n except\r\n Result.Free;\r\n Raise;\r\n end;\r\nend;\r\n\r\nfunction TFPExpressionParser.Level7: TFPExprNode;\r\nbegin\r\n{$ifdef debugexpr} Writeln('Level 7 ',TokenName(TokenType),': ',CurrentToken);{$endif debugexpr}\r\n if (TokenType=ttLeft) then\r\n begin\r\n GetToken;\r\n Result:=Level1;\r\n try\r\n if (TokenType<>ttRight) then\r\n ParserError(Format(SErrBracketExpected,[SCanner.Pos,CurrentToken]));\r\n GetToken;\r\n Except\r\n Result.Free;\r\n Raise;\r\n end;\r\n end\r\n else\r\n Result:=Primitive;\r\nend;\r\n\r\nfunction TFPExpressionParser.Primitive: TFPExprNode;\r\n\r\nVar\r\n I : NativeInt;\r\n C : Integer;\r\n X : TExprFloat;\r\n ACount : Integer;\r\n IFF : Boolean;\r\n IFC : Boolean;\r\n ID : TFPExprIdentifierDef;\r\n Args : TExprArgumentArray;\r\n AI : Integer;\r\n\r\nbegin\r\n{$ifdef debugexpr} Writeln('Primitive : ',TokenName(TokenType),': ',CurrentToken);{$endif debugexpr}\r\n SetLength(Args,0);\r\n if (TokenType=ttNumber) then\r\n begin\r\n if TryStrToInt64(CurrentToken,I) then\r\n Result:=TFPConstExpression.CreateInteger(I)\r\n else\r\n begin\r\n Val(CurrentToken,X,C);\r\n If (C=0) then\r\n Result:=TFPConstExpression.CreateFloat(X)\r\n else\r\n ParserError(Format(SErrInvalidFloat,[CurrentToken]));\r\n end;\r\n end\r\n else if (TokenType=ttString) then\r\n Result:=TFPConstExpression.CreateString(CurrentToken)\r\n else if (TokenType in [ttTrue,ttFalse]) then\r\n Result:=TFPConstExpression.CreateBoolean(TokenType=ttTrue)\r\n else if Not (TokenType in [ttIdentifier,ttIf,ttcase]) then\r\n ParserError(Format(SerrUnknownTokenAtPos,[Scanner.Pos,CurrentToken]))\r\n else\r\n begin\r\n IFF:=TokenType=ttIf;\r\n IFC:=TokenType=ttCase;\r\n if Not (IFF or IFC) then\r\n begin\r\n ID:=self.IdentifierByName(CurrentToken);\r\n If (ID=Nil) then\r\n ParserError(Format(SErrUnknownIdentifier,[CurrentToken]))\r\n end;\r\n // Determine number of arguments\r\n if Iff then\r\n ACount:=3\r\n else if IfC then\r\n ACount:=-4\r\n else if (ID.IdentifierType in [itFunctionHandler,itFunctionNode]) then\r\n ACount:=ID.ArgumentCount\r\n else\r\n ACount:=0;\r\n // Parse arguments.\r\n // Negative is for variable number of arguments, where Abs(value) is the minimum number of arguments\r\n If (ACount<>0) then\r\n begin\r\n GetToken;\r\n If (TokenType<>ttLeft) then\r\n ParserError(Format(SErrLeftBracketExpected,[Scanner.Pos,CurrentToken]));\r\n SetLength(Args,Abs(ACount));\r\n AI:=0;\r\n Try\r\n Repeat\r\n GetToken;\r\n // Check if we must enlarge the argument array\r\n If (ACount<0) and (AI=Length(Args)) then\r\n begin\r\n SetLength(Args,AI+1);\r\n Args[AI]:=Nil;\r\n end;\r\n Args[AI]:=Level1;\r\n Inc(AI);\r\n If (TokenType<>ttComma) then\r\n If (AIttRight then\r\n ParserError(Format(SErrBracketExpected,[Scanner.Pos,CurrentToken]));\r\n except\r\n On E : Exception do\r\n begin\r\n Dec(AI);\r\n While (AI>=0) do\r\n begin\r\n FreeAndNil(Args[Ai]);\r\n Dec(AI);\r\n end;\r\n Raise;\r\n end;\r\n end;\r\n end;\r\n If Iff then\r\n Result:=TIfOperation.Create(Args[0],Args[1],Args[2])\r\n else If IfC then\r\n Result:=TCaseOperation.Create(Args)\r\n else\r\n Case ID.IdentifierType of\r\n itVariable : Result:= TFPExprVariable.CreateIdentifier(ID);\r\n itFunctionHandler : Result:= TFPFunctionEventHandler.CreateFunction(ID,Args);\r\n itFunctionNode : Result:= ID.NodeType.CreateFunction(ID,Args);\r\n end;\r\n end;\r\n GetToken;\r\nend;\r\n\r\n\r\nprocedure TFPExpressionParser.SetExpression(const AValue: String);\r\nbegin\r\n if FExpression=AValue then exit;\r\n FExpression:=AValue;\r\n FScanner.Source:=AValue;\r\n If Assigned(FExprNode) then\r\n FreeAndNil(FExprNode);\r\n If (FExpression<>'') then\r\n begin\r\n GetToken;\r\n FExprNode:=Level1;\r\n If (TokenType<>ttEOF) then\r\n ParserError(Format(SErrUnterminatedExpression,[Scanner.Pos,CurrentToken]));\r\n FExprNode.Check;\r\n end\r\n else\r\n FExprNode:=Nil;\r\nend;\r\n\r\nprocedure TFPExpressionParser.CheckResultType(const Res: TFPExpressionResult;\r\n AType: TResultType); inline;\r\nbegin\r\n If (Res.ResultType<>AType) then\r\n RaiseParserError(SErrInvalidResultType,[ResultTypeName(Res.ResultType)]);\r\nend;\r\n\r\nprocedure TFPExpressionParser.CheckResultTypes(const Res: TFPExpressionResult; ATypes: TResultTypes);\r\nbegin\r\n If Not (Res.ResultType in ATypes) then\r\n RaiseParserError(SErrInvalidResultType,[ResultTypeName(Res.ResultType)]);\r\nend;\r\n\r\nclass function TFPExpressionParser.BuiltinsManager: TExprBuiltInManager;\r\nbegin\r\n Result:=BuiltinIdentifiers;\r\nend;\r\n\r\n\r\n\r\nfunction TFPExpressionParser.ResultType: TResultType;\r\nbegin\r\n if not Assigned(FExprNode) then\r\n ParserError(SErrInExpression);\r\n Result:=FExprNode.NodeType;\r\nend;\r\n\r\nfunction TFPExpressionParser.HasAggregate: Boolean;\r\nbegin\r\n Result:=Assigned(FExprNode) and FExprNode.HasAggregate;\r\nend;\r\n\r\nprocedure TFPExpressionParser.InitAggregate;\r\nbegin\r\n If Assigned(FExprNode) then\r\n FExprNode.InitAggregate;\r\nend;\r\n\r\nprocedure TFPExpressionParser.UpdateAggregate;\r\nbegin\r\n If Assigned(FExprNode) then\r\n FExprNode.UpdateAggregate;\r\nend;\r\n\r\n{ ---------------------------------------------------------------------\r\n TFPExprIdentifierDefs\r\n ---------------------------------------------------------------------}\r\n\r\nfunction TFPExprIdentifierDefs.GetI(AIndex : Integer): TFPExprIdentifierDef;\r\nbegin\r\n Result:=TFPExprIdentifierDef(Items[AIndex]);\r\nend;\r\n\r\nprocedure TFPExprIdentifierDefs.SetI(AIndex : Integer;\r\n const AValue: TFPExprIdentifierDef);\r\nbegin\r\n Items[AIndex]:=AValue;\r\nend;\r\n\r\nprocedure TFPExprIdentifierDefs.Update(Item: TCollectionItem);\r\nbegin\r\n Inherited Update(Item);\r\n If Assigned(FParser) then\r\n FParser.FDirty:=True;\r\nend;\r\n\r\nfunction TFPExprIdentifierDefs.IndexOfIdentifier(const AName: string\r\n ): Integer;\r\nbegin\r\n Result:=Count-1;\r\n While (Result>=0) And (CompareText(GetI(Result).Name,AName)<>0) do\r\n Dec(Result);\r\nend;\r\n\r\nfunction TFPExprIdentifierDefs.FindIdentifier(const AName: string\r\n ): TFPExprIdentifierDef;\r\n\r\nVar\r\n I : Integer;\r\n\r\nbegin\r\n I:=IndexOfIdentifier(AName);\r\n If (I=-1) then\r\n Result:=Nil\r\n else\r\n Result:=GetI(I);\r\nend;\r\n\r\nfunction TFPExprIdentifierDefs.IdentifierByName(const AName: string\r\n ): TFPExprIdentifierDef;\r\nbegin\r\n Result:=FindIdentifier(AName);\r\n if (Result=Nil) then\r\n RaiseParserError(SErrUnknownIdentifier,[AName]);\r\nend;\r\n\r\n\r\nfunction TFPExprIdentifierDefs.AddVariable(const AName: string;\r\n AResultType: TResultType; ACallback: TFPExprVariableEvent\r\n ): TFPExprIdentifierDef;\r\nbegin\r\n Result:=Add as TFPExprIdentifierDef;\r\n Result.IdentifierType:=itVariable;\r\n Result.Name:=AName;\r\n Result.ResultType:=AResultType;\r\n Result.OnGetVariableValue:=ACallBack\r\nend;\r\n\r\nfunction TFPExprIdentifierDefs.AddVariable(const AName: string;\r\n AResultType: TResultType; AValue: String): TFPExprIdentifierDef;\r\nbegin\r\n Result:=Add as TFPExprIdentifierDef;\r\n Result.IdentifierType:=itVariable;\r\n Result.Name:=AName;\r\n Result.ResultType:=AResultType;\r\n Result.Value:=AValue;\r\nend;\r\n\r\nfunction TFPExprIdentifierDefs.AddBooleanVariable(const AName: string;\r\n AValue: Boolean): TFPExprIdentifierDef;\r\nbegin\r\n Result:=Add as TFPExprIdentifierDef;\r\n Result.IdentifierType:=itVariable;\r\n Result.Name:=AName;\r\n Result.ResultType:=rtBoolean;\r\n Result.FValue.resValue:=AValue;\r\nend;\r\n\r\nfunction TFPExprIdentifierDefs.AddIntegerVariable(const AName: string;\r\n AValue: Integer): TFPExprIdentifierDef;\r\nbegin\r\n Result:=Add as TFPExprIdentifierDef;\r\n Result.IdentifierType:=itVariable;\r\n Result.Name:=AName;\r\n Result.ResultType:=rtInteger;\r\n Result.FValue.resValue:=AValue;\r\nend;\r\n\r\nfunction TFPExprIdentifierDefs.AddFloatVariable(const AName: string;\r\n AValue: TExprFloat): TFPExprIdentifierDef;\r\nbegin\r\n Result:=Add as TFPExprIdentifierDef;\r\n Result.IdentifierType:=itVariable;\r\n Result.Name:=AName;\r\n Result.ResultType:=rtFloat;\r\n Result.FValue.resValue:=AValue;\r\nend;\r\n\r\nfunction TFPExprIdentifierDefs.AddCurrencyVariable(const AName: string; AValue: Currency): TFPExprIdentifierDef;\r\nbegin\r\n Result:=Add as TFPExprIdentifierDef;\r\n Result.IdentifierType:=itVariable;\r\n Result.Name:=AName;\r\n Result.ResultType:=rtCurrency;\r\n Result.FValue.resValue:=AValue;\r\nend;\r\n\r\nfunction TFPExprIdentifierDefs.AddStringVariable(const AName: string;\r\n AValue: String): TFPExprIdentifierDef;\r\nbegin\r\n Result:=Add as TFPExprIdentifierDef;\r\n Result.IdentifierType:=itVariable;\r\n Result.Name:=AName;\r\n Result.ResultType:=rtString;\r\n Result.FValue.resValue:=AValue;\r\nend;\r\n\r\nfunction TFPExprIdentifierDefs.AddDateTimeVariable(const AName: string;\r\n AValue: TDateTime): TFPExprIdentifierDef;\r\nbegin\r\n Result:=Add as TFPExprIdentifierDef;\r\n Result.IdentifierType:=itVariable;\r\n Result.Name:=AName;\r\n Result.ResultType:=rtDateTime;\r\n Result.FValue.resValue:=AValue;\r\nend;\r\n\r\n\r\nfunction TFPExprIdentifierDefs.AddFunction(const AName: string;\r\n const AResultType: Char; const AParamTypes: String;\r\n ACallBack: TFPExprFunctionEvent): TFPExprIdentifierDef;\r\nbegin\r\n Result:=Add as TFPExprIdentifierDef;\r\n Result.Name:=Aname;\r\n Result.IdentifierType:=itFunctionHandler;\r\n Result.ParameterTypes:=AParamTypes;\r\n Result.ResultType:=CharToResultType(AResultType);\r\n Result.FOnGetValue:=ACallBack;\r\nend;\r\n\r\nfunction TFPExprIdentifierDefs.AddFunction(const AName: string;\r\n const AResultType: Char; const AParamTypes: String;\r\n ANodeClass: TFPExprFunctionClass): TFPExprIdentifierDef;\r\nbegin\r\n Result:=Add as TFPExprIdentifierDef;\r\n Result.Name:=Aname;\r\n Result.IdentifierType:=itFunctionNode;\r\n Result.ParameterTypes:=AParamTypes;\r\n Result.ResultType:=CharToResultType(AResultType);\r\n Result.FNodeType:=ANodeClass;\r\nend;\r\n\r\n{ ---------------------------------------------------------------------\r\n TFPExprIdentifierDef\r\n ---------------------------------------------------------------------}\r\n\r\nprocedure TFPExprIdentifierDef.SetName(const AValue: string);\r\nbegin\r\n if FName=AValue then exit;\r\n If (AValue<>'') then\r\n If Assigned(Collection) and (TFPExprIdentifierDefs(Collection).IndexOfIdentifier(AValue)<>-1) then\r\n RaiseParserError(SErrDuplicateIdentifier,[AValue]);\r\n FName:=AValue;\r\nend;\r\n\r\nprocedure TFPExprIdentifierDef.SetResultType(const AValue: TResultType);\r\n\r\nbegin\r\n If AValue<>FValue.ResultType then\r\n begin\r\n FValue.ResultType:=AValue;\r\n SetValue(FStringValue);\r\n end;\r\nend;\r\n\r\nprocedure TFPExprIdentifierDef.SetValue(const AValue: String);\r\nbegin\r\n FStringValue:=AValue;\r\n If (AValue<>'') then\r\n Case FValue.ResultType of\r\n rtBoolean : FValue.resValue:=FStringValue='True';\r\n rtInteger : FValue.resValue:=StrToInt(AValue);\r\n rtFloat : FValue.resValue:=StrToFloat(AValue);\r\n rtCurrency : FValue.resValue:=StrToCurr(AValue);\r\n rtDateTime : FValue.resValue:=StrToDateTime(AValue);\r\n rtString : FValue.resValue:=AValue;\r\n end\r\n else\r\n Case FValue.ResultType of\r\n rtBoolean : FValue.resValue:=False;\r\n rtInteger : FValue.resValue:=0;\r\n rtFloat : FValue.resValue:=0.0;\r\n rtCurrency : FValue.resValue:=0.0;\r\n rtDateTime : FValue.resValue:=0;\r\n rtString : FValue.resValue:='';\r\n end\r\nend;\r\n\r\nprocedure TFPExprIdentifierDef.CheckResultType(const AType: TResultType);\r\nbegin\r\n If FValue.ResultType<>AType then\r\n RaiseParserError(SErrInvalidResultType,[ResultTypeName(AType)])\r\nend;\r\n\r\nprocedure TFPExprIdentifierDef.CheckVariable;\r\nbegin\r\n If Identifiertype<>itvariable then\r\n RaiseParserError(SErrNotVariable,[Name]);\r\n if EventBasedVariable then\r\n FetchValue;\r\nend;\r\n\r\nfunction TFPExprIdentifierDef.ArgumentCount: Integer;\r\nbegin\r\n Result:=Length(FArgumentTypes);\r\nend;\r\n\r\nprocedure TFPExprIdentifierDef.Assign(Source: TPersistent);\r\n\r\nVar\r\n EID : TFPExprIdentifierDef;\r\n\r\nbegin\r\n if (Source is TFPExprIdentifierDef) then\r\n begin\r\n EID:=Source as TFPExprIdentifierDef;\r\n FStringValue:=EID.FStringValue;\r\n FValue:=EID.FValue;\r\n FArgumentTypes:=EID.FArgumentTypes;\r\n FIDType:=EID.FIDType;\r\n FName:=EID.FName;\r\n FOnGetValue:=EID.FOnGetValue;\r\n FOnGetVarValue:=EID.FOnGetVarValue;\r\n end\r\n else\r\n inherited Assign(Source);\r\nend;\r\n\r\nprocedure TFPExprIdentifierDef.SetArgumentTypes(const AValue: String);\r\n\r\nVar\r\n I : integer;\r\n\r\nbegin\r\n if FArgumentTypes=AValue then exit;\r\n For I:=1 to Length(AValue) do\r\n CharToResultType(AValue[i]);\r\n FArgumentTypes:=AValue;\r\nend;\r\n\r\nprocedure TFPExprIdentifierDef.SetAsBoolean(const AValue: Boolean);\r\nbegin\r\n CheckVariable;\r\n CheckResultType(rtBoolean);\r\n FValue.resValue:=AValue;\r\nend;\r\n\r\nprocedure TFPExprIdentifierDef.SetAsDateTime(const AValue: TDateTime);\r\nbegin\r\n CheckVariable;\r\n CheckResultType(rtDateTime);\r\n FValue.resValue:=AValue;\r\nend;\r\n\r\nprocedure TFPExprIdentifierDef.SetAsFloat(const AValue: TExprFloat);\r\nbegin\r\n CheckVariable;\r\n CheckResultType(rtFloat);\r\n FValue.resValue:=AValue;\r\nend;\r\n\r\nprocedure TFPExprIdentifierDef.SetAsCurrency(const AValue: Currency);\r\nbegin\r\n CheckVariable;\r\n CheckResultType(rtCurrency);\r\n FValue.resValue:=AValue;\r\nend;\r\n\r\nprocedure TFPExprIdentifierDef.SetAsInteger(const AValue: NativeInt);\r\nbegin\r\n CheckVariable;\r\n CheckResultType(rtInteger);\r\n FValue.resValue:=AValue;\r\nend;\r\n\r\nprocedure TFPExprIdentifierDef.SetAsString(const AValue: String);\r\nbegin\r\n CheckVariable;\r\n CheckResultType(rtString);\r\n FValue.resValue:=AValue;\r\nend;\r\n\r\nfunction TFPExprIdentifierDef.GetValue: String;\r\nbegin\r\n Case FValue.ResultType of\r\n rtBoolean : If FValue.resValue then\r\n Result:='True'\r\n else\r\n Result:='False';\r\n rtInteger : Result:=IntToStr(NativeInt(FValue.resValue));\r\n rtFloat : Result:=FloatToStr(TExprFloat(FValue.resValue));\r\n rtCurrency : Result:=CurrToStr(Currency(FValue.resValue));\r\n rtDateTime : Result:=FormatDateTime('cccc',TExprFloat(FValue.resValue));\r\n rtString : Result:=String(FValue.resValue);\r\n end;\r\nend;\r\n\r\nprocedure TFPExprIdentifierDef.FetchValue;\r\n\r\nVar\r\n RT,RT2 : TResultType;\r\n I : Integer;\r\n\r\nbegin\r\n RT:=ResultType;\r\n if Assigned(FOnGetVarValue) then\r\n FValue:=FOnGetVarValue(FName);\r\n RT2:=FValue.ResultType;\r\n if RT2<>RT then\r\n begin\r\n // Automatically convert integer to float.\r\n if (rt2=rtInteger) and (rt=rtFloat) then\r\n begin\r\n FValue.ResultType:=RT;\r\n I:=NativeInt(FValue.resValue);\r\n FValue.resValue:=I;\r\n end\r\n else\r\n begin\r\n // Restore\r\n FValue.ResultType:=RT;\r\n Raise EExprParser.CreateFmt('Value handler for variable %s returned wrong type, expected \"%s\", got \"%s\"',[\r\n FName,\r\n GetEnumName(TypeInfo(TResultType),Ord(rt)),\r\n GetEnumName(TypeInfo(TResultType),Ord(rt2))\r\n ]);\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TFPExprIdentifierDef.EventBasedVariable: Boolean;\r\nbegin\r\n Result:=Assigned(FOnGetVarValue);\r\nend;\r\n\r\nfunction TFPExprIdentifierDef.GetResultType: TResultType;\r\nbegin\r\n Result:=FValue.ResultType;\r\nend;\r\n\r\nfunction TFPExprIdentifierDef.GetAsFloat: TExprFloat;\r\nbegin\r\n CheckResultType(rtFloat);\r\n CheckVariable;\r\n Result:=TExprFloat(FValue.resValue);\r\nend;\r\n\r\nfunction TFPExprIdentifierDef.GetAsCurrency: Currency;\r\nbegin\r\n CheckResultType(rtCurrency);\r\n CheckVariable;\r\n Result:=Currency(FValue.resValue);\r\nend;\r\n\r\nfunction TFPExprIdentifierDef.GetAsBoolean: Boolean;\r\nbegin\r\n CheckResultType(rtBoolean);\r\n CheckVariable;\r\n Result:=Boolean(FValue.resValue);\r\nend;\r\n\r\nfunction TFPExprIdentifierDef.GetAsDateTime: TDateTime;\r\nbegin\r\n CheckResultType(rtDateTime);\r\n CheckVariable;\r\n Result:=TDateTime(FValue.resValue);\r\nend;\r\n\r\nfunction TFPExprIdentifierDef.GetAsInteger: NativeInt;\r\nbegin\r\n CheckResultType(rtInteger);\r\n CheckVariable;\r\n Result:=NativeInt(FValue.resValue);\r\nend;\r\n\r\nfunction TFPExprIdentifierDef.GetAsString: String;\r\nbegin\r\n CheckResultType(rtString);\r\n CheckVariable;\r\n Result:=String(FValue.resValue);\r\nend;\r\n\r\n{ ---------------------------------------------------------------------\r\n TExprBuiltInManager\r\n ---------------------------------------------------------------------}\r\n\r\nfunction TExprBuiltInManager.GetCount: Integer;\r\nbegin\r\n Result:=FDefs.Count;\r\nend;\r\n\r\nfunction TExprBuiltInManager.GetI(AIndex : Integer\r\n ): TFPBuiltInExprIdentifierDef;\r\nbegin\r\n Result:=TFPBuiltInExprIdentifierDef(FDefs[Aindex])\r\nend;\r\n\r\nconstructor TExprBuiltInManager.Create(AOwner: TComponent);\r\nbegin\r\n inherited Create(AOwner);\r\n FDefs:=TFPExprIdentifierDefs.Create(TFPBuiltInExprIdentifierDef)\r\nend;\r\n\r\ndestructor TExprBuiltInManager.Destroy;\r\nbegin\r\n FreeAndNil(FDefs);\r\n inherited Destroy;\r\nend;\r\n\r\nfunction TExprBuiltInManager.IndexOfIdentifier(const AName: string\r\n ): Integer;\r\nbegin\r\n Result:=FDefs.IndexOfIdentifier(AName);\r\nend;\r\n\r\nfunction TExprBuiltInManager.FindIdentifier(const AName: string\r\n ): TFPBuiltinExprIdentifierDef;\r\nbegin\r\n Result:=TFPBuiltinExprIdentifierDef(FDefs.FindIdentifier(AName));\r\nend;\r\n\r\nfunction TExprBuiltInManager.IdentifierByName(const AName: string\r\n ): TFPBuiltinExprIdentifierDef;\r\nbegin\r\n Result:=TFPBuiltinExprIdentifierDef(FDefs.IdentifierByName(AName));\r\nend;\r\n\r\nfunction TExprBuiltInManager.AddVariable(const ACategory: TBuiltInCategory;\r\n const AName: string; AResultType: TResultType; AValue: String\r\n ): TFPBuiltInExprIdentifierDef;\r\nbegin\r\n Result:=TFPBuiltInExprIdentifierDef(FDefs.Addvariable(AName,AResultType,AValue));\r\n Result.Category:=ACategory;\r\nend;\r\n\r\nfunction TExprBuiltInManager.AddBooleanVariable(\r\n const ACategory: TBuiltInCategory; const AName: string; AValue: Boolean\r\n ): TFPBuiltInExprIdentifierDef;\r\nbegin\r\n Result:=TFPBuiltInExprIdentifierDef(FDefs.AddBooleanvariable(AName,AValue));\r\n Result.Category:=ACategory;\r\nend;\r\n\r\nfunction TExprBuiltInManager.AddIntegerVariable(\r\n const ACategory: TBuiltInCategory; const AName: string; AValue: Integer\r\n ): TFPBuiltInExprIdentifierDef;\r\nbegin\r\n Result:=TFPBuiltInExprIdentifierDef(FDefs.AddIntegerVariable(AName,AValue));\r\n Result.Category:=ACategory;\r\nend;\r\n\r\nfunction TExprBuiltInManager.AddFloatVariable(\r\n const ACategory: TBuiltInCategory; const AName: string;\r\n AValue: TExprFloat): TFPBuiltInExprIdentifierDef;\r\nbegin\r\n Result:=TFPBuiltInExprIdentifierDef(FDefs.AddFloatVariable(AName,AValue));\r\n Result.Category:=ACategory;\r\nend;\r\n\r\nfunction TExprBuiltInManager.AddCurrencyVariable(const ACategory: TBuiltInCategory; const AName: string; AValue: Currency\r\n ): TFPBuiltInExprIdentifierDef;\r\nbegin\r\n Result:=TFPBuiltInExprIdentifierDef(FDefs.AddCurrencyVariable(AName,AValue));\r\n Result.Category:=ACategory;\r\nend;\r\n\r\nfunction TExprBuiltInManager.AddStringVariable(\r\n const ACategory: TBuiltInCategory; const AName: string; AValue: String\r\n ): TFPBuiltInExprIdentifierDef;\r\nbegin\r\n Result:=TFPBuiltInExprIdentifierDef(FDefs.AddStringVariable(AName,AValue));\r\n Result.Category:=ACategory;\r\nend;\r\n\r\nfunction TExprBuiltInManager.AddDateTimeVariable(\r\n const ACategory: TBuiltInCategory; const AName: string; AValue: TDateTime\r\n ): TFPBuiltInExprIdentifierDef;\r\nbegin\r\n Result:=TFPBuiltInExprIdentifierDef(FDefs.AddDateTimeVariable(AName,AValue));\r\n Result.Category:=ACategory;\r\nend;\r\n\r\n\r\nfunction TExprBuiltInManager.AddFunction(const ACategory: TBuiltInCategory;\r\n const AName: string; const AResultType: Char; const AParamTypes: String;\r\n ACallBack: TFPExprFunctionEvent): TFPBuiltInExprIdentifierDef;\r\nbegin\r\n Result:=TFPBuiltInExprIdentifierDef(FDefs.AddFunction(AName,AResultType,AParamTypes,ACallBack));\r\n Result.Category:=ACategory;\r\nend;\r\n\r\nfunction TExprBuiltInManager.AddFunction(const ACategory: TBuiltInCategory;\r\n const AName: string; const AResultType: Char; const AParamTypes: String;\r\n ANodeClass: TFPExprFunctionClass): TFPBuiltInExprIdentifierDef;\r\nbegin\r\n Result:=TFPBuiltInExprIdentifierDef(FDefs.AddFunction(AName,AResultType,AParamTypes,ANodeClass));\r\n Result. Category:=ACategory;\r\nend;\r\n\r\n\r\n{ ---------------------------------------------------------------------\r\n Various Nodes\r\n ---------------------------------------------------------------------}\r\n\r\n{ TFPBinaryOperation }\r\n\r\nprocedure TFPBinaryOperation.CheckSameNodeTypes;\r\n\r\nVar\r\n LT,RT : TResultType;\r\n\r\n\r\nbegin\r\n LT:=Left.NodeType;\r\n RT:=Right.NodeType;\r\n if (RT<>LT) then\r\n RaiseParserError(SErrTypesDoNotMatch,[ResultTypeName(LT),ResultTypeName(RT),Left.AsString,Right.AsString])\r\nend;\r\n\r\nconstructor TFPBinaryOperation.Create(ALeft, ARight: TFPExprNode);\r\nbegin\r\n FLeft:=ALeft;\r\n FRight:=ARight;\r\nend;\r\n\r\ndestructor TFPBinaryOperation.Destroy;\r\nbegin\r\n FreeAndNil(FLeft);\r\n FreeAndNil(FRight);\r\n inherited Destroy;\r\nend;\r\n\r\nprocedure TFPBinaryOperation.InitAggregate;\r\nbegin\r\n inherited InitAggregate;\r\n if Assigned(Left) then\r\n Left.InitAggregate;\r\n if Assigned(Right) then\r\n Right.InitAggregate;\r\nend;\r\n\r\nprocedure TFPBinaryOperation.UpdateAggregate;\r\nbegin\r\n inherited UpdateAggregate;\r\n if Assigned(Left) then\r\n Left.UpdateAggregate;\r\n if Assigned(Right) then\r\n Right.UpdateAggregate;\r\nend;\r\n\r\nfunction TFPBinaryOperation.HasAggregate: Boolean;\r\nbegin\r\n Result:=inherited HasAggregate;\r\n if Assigned(Left) then\r\n Result:=Result or Left.HasAggregate;\r\n if Assigned(Right) then\r\n Result:=Result or Right.HasAggregate;\r\nend;\r\n\r\nprocedure TFPBinaryOperation.Check;\r\nbegin\r\n If Not Assigned(Left) then\r\n RaiseParserError(SErrNoLeftOperand,[classname]);\r\n If Not Assigned(Right) then\r\n RaiseParserError(SErrNoRightOperand,[classname]);\r\nend;\r\n\r\n{ TFPUnaryOperator }\r\n\r\nconstructor TFPUnaryOperator.Create(AOperand: TFPExprNode);\r\nbegin\r\n FOperand:=AOperand;\r\nend;\r\n\r\ndestructor TFPUnaryOperator.Destroy;\r\nbegin\r\n FreeAndNil(FOperand);\r\n inherited Destroy;\r\nend;\r\n\r\nprocedure TFPUnaryOperator.InitAggregate;\r\nbegin\r\n inherited InitAggregate;\r\n if Assigned(FOperand) then\r\n FOperand.InitAggregate;\r\n\r\nend;\r\n\r\nprocedure TFPUnaryOperator.UpdateAggregate;\r\nbegin\r\n inherited UpdateAggregate;\r\n if Assigned(FOperand) then\r\n FOperand.UpdateAggregate;\r\nend;\r\n\r\nfunction TFPUnaryOperator.HasAggregate: Boolean;\r\nbegin\r\n Result:=inherited HasAggregate;\r\n if Assigned(FOperand) then\r\n Result:=Result or FOperand.HasAggregate;\r\nend;\r\n\r\nprocedure TFPUnaryOperator.Check;\r\nbegin\r\n If Not Assigned(Operand) then\r\n RaiseParserError(SErrNoOperand,[Self.className]);\r\nend;\r\n\r\n{ TFPConstExpression }\r\n\r\nconstructor TFPConstExpression.CreateString(AValue: String);\r\nbegin\r\n FValue.ResultType:=rtString;\r\n FValue.resValue:=AValue;\r\nend;\r\n\r\nconstructor TFPConstExpression.CreateInteger(AValue: NativeInt);\r\nbegin\r\n FValue.ResultType:=rtInteger;\r\n FValue.resValue:=AValue;\r\nend;\r\n\r\nconstructor TFPConstExpression.CreateDateTime(AValue: TDateTime);\r\nbegin\r\n FValue.ResultType:=rtDateTime;\r\n FValue.resValue:=AValue;\r\nend;\r\n\r\nconstructor TFPConstExpression.CreateFloat(AValue: TExprFloat);\r\nbegin\r\n Inherited create;\r\n FValue.ResultType:=rtFloat;\r\n FValue.resValue:=AValue;\r\nend;\r\n\r\nconstructor TFPConstExpression.CreateCurrency(AValue: Currency);\r\nbegin\r\n Inherited create;\r\n FValue.ResultType:=rtCurrency;\r\n FValue.resValue:=AValue;\r\nend;\r\n\r\nconstructor TFPConstExpression.CreateBoolean(AValue: Boolean);\r\nbegin\r\n FValue.ResultType:=rtBoolean;\r\n FValue.resValue:=AValue;\r\nend;\r\n\r\nprocedure TFPConstExpression.Check;\r\nbegin\r\n // Nothing to check;\r\nend;\r\n\r\nfunction TFPConstExpression.NodeType: TResultType;\r\nbegin\r\n Result:=FValue.ResultType;\r\nend;\r\n\r\nFunction TFPConstExpression.GetNodeValue : TFPExpressionResult;\r\nbegin\r\n Result:=FValue;\r\nend;\r\n\r\nfunction TFPConstExpression.AsString: string ;\r\n\r\nbegin\r\n Case NodeType of\r\n rtString : Result:=''''+String(FValue.resValue)+'''';\r\n rtInteger : Result:=IntToStr(NativeInt(FValue.resValue));\r\n rtDateTime : Result:=''''+FormatDateTime('cccc',TDateTime(FValue.resValue))+'''';\r\n rtBoolean : If Boolean(FValue.resValue) then Result:='True' else Result:='False';\r\n rtFloat : Str(TExprFloat(FValue.resValue),Result);\r\n rtCurrency : Str(Currency(FValue.resValue),Result);\r\n end;\r\nend;\r\n\r\n\r\n{ TFPNegateOperation }\r\n\r\nprocedure TFPNegateOperation.Check;\r\nbegin\r\n Inherited;\r\n If Not (Operand.NodeType in [rtInteger,rtFloat,rtCurrency]) then\r\n RaiseParserError(SErrNoNegation,[ResultTypeName(Operand.NodeType),Operand.AsString])\r\nend;\r\n\r\nfunction TFPNegateOperation.NodeType: TResultType;\r\nbegin\r\n Result:=Operand.NodeType;\r\nend;\r\n\r\nFunction TFPNegateOperation.GetNodeValue : TFPExpressionResult;\r\nbegin\r\n Result:=Operand.GetNodeValue;\r\n Case Result.ResultType of\r\n rtInteger : Result.resValue:=-NativeInt(Result.resValue);\r\n rtFloat : Result.resValue:=-TExprFloat(Result.resValue);\r\n rtCurrency : Result.resValue:=-Currency(Result.resValue);\r\n end;\r\nend;\r\n\r\nfunction TFPNegateOperation.AsString: String;\r\nbegin\r\n Result:='-'+TrimLeft(Operand.AsString);\r\nend;\r\n\r\n{ TFPBinaryAndOperation }\r\n\r\nprocedure TFPBooleanOperation.Check;\r\nbegin\r\n inherited Check;\r\n CheckNodeType(Left,[rtInteger,rtBoolean]);\r\n CheckNodeType(Right,[rtInteger,rtBoolean]);\r\n CheckSameNodeTypes;\r\nend;\r\n\r\nfunction TFPBooleanOperation.NodeType: TResultType;\r\nbegin\r\n Result:=Left.NodeType;\r\nend;\r\n\r\nFunction TFPBinaryAndOperation.GetNodeValue : TFPExpressionResult;\r\n\r\nVar\r\n RRes : TFPExpressionResult;\r\n\r\nbegin\r\n Result:=Left.GetNodeValue;\r\n RRes:=Right.GetNodeValue;\r\n Case Result.ResultType of\r\n rtBoolean : Result.resValue:=Boolean(Result.resValue) and Boolean(RRes.resValue);\r\n rtInteger : Result.resValue:=NativeInt(Result.resValue) and NativeInt(RRes.resValue);\r\n end;\r\nend;\r\n\r\nfunction TFPBinaryAndOperation.AsString: string;\r\nbegin\r\n Result:=Left.AsString+' and '+Right.AsString;\r\nend;\r\n\r\n{ TFPExprNode }\r\n\r\nprocedure TFPExprNode.CheckNodeType(Anode: TFPExprNode; Allowed: TResultTypes);\r\n\r\nVar\r\n S : String;\r\n A : TResultType;\r\n\r\nbegin\r\n If (Anode=Nil) then\r\n RaiseParserError(SErrNoNodeToCheck);\r\n If Not (ANode.NodeType in Allowed) then\r\n begin\r\n S:='';\r\n For A:=Low(TResultType) to High(TResultType) do\r\n If A in Allowed then\r\n begin\r\n If S<>'' then\r\n S:=S+',';\r\n S:=S+ResultTypeName(A);\r\n end;\r\n RaiseParserError(SInvalidNodeType,[ResultTypeName(ANode.NodeType),S,ANode.AsString]);\r\n end;\r\nend;\r\n\r\nprocedure TFPExprNode.InitAggregate;\r\nbegin\r\n // Do nothing\r\nend;\r\n\r\nprocedure TFPExprNode.UpdateAggregate;\r\nbegin\r\n // Do nothing\r\nend;\r\n\r\nfunction TFPExprNode.HasAggregate: Boolean;\r\nbegin\r\n Result:=IsAggregate;\r\nend;\r\n\r\nclass function TFPExprNode.IsAggregate: Boolean;\r\nbegin\r\n Result:=False;\r\nend;\r\n\r\nfunction TFPExprNode.NodeValue: TFPExpressionResult;\r\nbegin\r\n Result:=GetNodeValue;\r\nend;\r\n\r\n{ TFPBinaryOrOperation }\r\n\r\nfunction TFPBinaryOrOperation.AsString: string;\r\nbegin\r\n Result:=Left.AsString+' or '+Right.AsString;\r\nend;\r\n\r\nFunction TFPBinaryOrOperation.GetNodeValue : TFPExpressionResult;\r\n\r\nVar\r\n RRes : TFPExpressionResult;\r\n\r\nbegin\r\n Result:=Left.GetNodeValue;\r\n RRes:=Right.GetNodeValue;\r\n Case Result.ResultType of\r\n rtBoolean : Result.resValue:=Boolean(Result.resValue) or Boolean(RRes.resValue);\r\n rtInteger : Result.resValue:=NativeInt(Result.resValue) or NativeInt(RRes.resValue);\r\n end;\r\nend;\r\n\r\n{ TFPBinaryXOrOperation }\r\n\r\nfunction TFPBinaryXOrOperation.AsString: string;\r\nbegin\r\n Result:=Left.AsString+' xor '+Right.AsString;\r\nend;\r\n\r\nFunction TFPBinaryXOrOperation.GetNodeValue : TFPExpressionResult;\r\n\r\nVar\r\n RRes : TFPExpressionResult;\r\n\r\nbegin\r\n Result:=Left.GetNodeValue;\r\n RRes:=Right.GetNodeValue;\r\n Case Result.ResultType of\r\n rtBoolean : Result.resValue:=Boolean(Result.resValue) xor Boolean(RRes.resValue);\r\n rtInteger : Result.resValue:=NativeInt(Result.resValue) xor NativeInt(RRes.resValue);\r\n end;\r\nend;\r\n\r\n{ TFPNotNode }\r\n\r\nprocedure TFPNotNode.Check;\r\nbegin\r\n If Not (Operand.NodeType in [rtInteger,rtBoolean]) then\r\n RaiseParserError(SErrNoNotOperation,[ResultTypeName(Operand.NodeType),Operand.AsString])\r\nend;\r\n\r\nfunction TFPNotNode.NodeType: TResultType;\r\nbegin\r\n Result:=Operand.NodeType;\r\nend;\r\n\r\nFunction TFPNotNode.GetNodeValue: TFPExpressionResult;\r\nbegin\r\n Result:=Operand.GetNodeValue;\r\n Case result.ResultType of\r\n rtInteger : Result.resValue:=Not Result.resValue;\r\n rtBoolean : Result.resValue:=Not Result.resValue;\r\n end\r\nend;\r\n\r\nfunction TFPNotNode.AsString: String;\r\nbegin\r\n Result:='not '+Operand.AsString;\r\nend;\r\n\r\n{ TIfOperation }\r\n\r\nconstructor TIfOperation.Create(ACondition, ALeft, ARight: TFPExprNode);\r\nbegin\r\n Inherited Create(ALeft,ARight);\r\n FCondition:=ACondition;\r\nend;\r\n\r\ndestructor TIfOperation.destroy;\r\nbegin\r\n FreeAndNil(FCondition);\r\n inherited destroy;\r\nend;\r\n\r\nFunction TIfOperation.GetNodeValue: TFPExpressionResult;\r\n\r\nbegin\r\n Result:=FCondition.GetNodeValue;\r\n If Boolean(Result.resValue) then\r\n Result:=Left.GetNodeValue\r\n else\r\n Result:=Right.GetNodeValue;\r\nend;\r\n\r\nprocedure TIfOperation.Check;\r\nbegin\r\n inherited Check;\r\n if (Condition.NodeType<>rtBoolean) then\r\n RaiseParserError(SErrIFNeedsBoolean,[Condition.AsString]);\r\n CheckSameNodeTypes;\r\nend;\r\n\r\nprocedure TIfOperation.InitAggregate;\r\nbegin\r\n inherited InitAggregate;\r\n If Assigned(FCondition) then\r\n fCondition.InitAggregate;\r\nend;\r\n\r\nprocedure TIfOperation.UpdateAggregate;\r\nbegin\r\n inherited UpdateAggregate;\r\n If Assigned(FCondition) then\r\n FCondition.UpdateAggregate;\r\nend;\r\n\r\nfunction TIfOperation.HasAggregate: Boolean;\r\nbegin\r\n Result:=inherited HasAggregate;\r\n if Assigned(Condition) then\r\n Result:=Result or Condition.HasAggregate;\r\nend;\r\n\r\nfunction TIfOperation.NodeType: TResultType;\r\nbegin\r\n Result:=Left.NodeType;\r\nend;\r\n\r\nfunction TIfOperation.AsString: string;\r\nbegin\r\n Result:=Format('if(%s , %s , %s)',[Condition.AsString,Left.AsString,Right.AsString]);\r\nend;\r\n\r\n{ TCaseOperation }\r\n\r\nFunction TCaseOperation.GetNodeValue: TFPExpressionResult;\r\n\r\nVar\r\n I,L : Integer;\r\n B : Boolean;\r\n RT,RV : TFPExpressionResult;\r\n\r\nbegin\r\n RT:=FArgs[0].GetNodeValue;\r\n L:=Length(FArgs);\r\n I:=2;\r\n B:=False;\r\n While (Not B) and (IT) then\r\n RaiseParserError(SErrCaseLabelType,[I div 2,N.AsString,ResultTypeName(T),ResultTypeName(N.NodeType)]);\r\n end\r\n else // Odd argument types (values) must match first.\r\n begin\r\n If (N.NodeType<>V) then\r\n RaiseParserError(SErrCaseValueType,[(I-1)div 2,N.AsString,ResultTypeName(V),ResultTypeName(N.NodeType)]);\r\n end\r\n end;\r\nend;\r\n\r\nprocedure TCaseOperation.InitAggregate;\r\n\r\nVar\r\n I : Integer;\r\n\r\nbegin\r\n inherited InitAggregate;\r\n if Assigned(FCondition) then\r\n FCondition.InitAggregate;\r\n For I:=0 to Length(Fargs)-1 do\r\n FArgs[i].InitAggregate;\r\nend;\r\n\r\nprocedure TCaseOperation.UpdateAggregate;\r\nVar\r\n I : Integer;\r\nbegin\r\n inherited UpdateAggregate;\r\n if Assigned(FCondition) then\r\n FCondition.UpdateAggregate;\r\n For I:=0 to Length(Fargs)-1 do\r\n FArgs[i].InitAggregate;\r\nend;\r\n\r\nFunction TCaseOperation.HasAggregate : Boolean;\r\n\r\nVar\r\n I,L : Integer;\r\nbegin\r\n Result:=inherited HasAggregate;\r\n L:=Length(Fargs);\r\n I:=0;\r\n While (Not Result) and (I'') then\r\n Result:=Result+', ';\r\n Result:=Result+FArgs[i].AsString;\r\n end;\r\n Result:='Case('+Result+')';\r\nend;\r\n\r\n{ TFPBooleanResultOperation }\r\n\r\nprocedure TFPBooleanResultOperation.Check;\r\nbegin\r\n inherited Check;\r\n CheckSameNodeTypes;\r\nend;\r\n\r\nfunction TFPBooleanResultOperation.NodeType: TResultType;\r\nbegin\r\n Result:=rtBoolean;\r\nend;\r\n\r\n{ TFPEqualOperation }\r\n\r\nfunction TFPEqualOperation.AsString: string;\r\nbegin\r\n Result:=Left.AsString+' = '+Right.AsString;\r\nend;\r\n\r\nFunction TFPEqualOperation.GetNodeValue : TFPExpressionResult;\r\n\r\nVar\r\n RRes : TFPExpressionResult;\r\n\r\nbegin\r\n Result:=Left.GetNodeValue;\r\n RRes:=Right.GetNodeValue;\r\n Result.resValue:=Result.resValue=RRes.resValue;\r\n Result.ResultType:=rtBoolean;\r\nend;\r\n\r\n{ TFPLikeOperation }\r\n\r\nfunction TFPLikeOperation.GetNodeValue: TFPExpressionResult;\r\n\r\nconst\r\n RESpecials = '([\\$\\+\\[\\]\\(\\)\\\\\\.\\*\\^\\?\\|])';\r\n\r\nVar\r\n S: String;\r\n RE : TJSRegexp;\r\n\r\nbegin\r\n // We need to recreate a regexp every time, since the RE can change any time the right-hand expression changes\r\n S:=String(Right.NodeValue.resValue);\r\n if (FLast<>'') and (S=FLast) then\r\n RE:=FRE\r\n else\r\n begin\r\n FLast:=S;\r\n S:=TJSString(S).replace(TJSRegexp.new(RESpecials,'g'),'\\$1');\r\n S:=StringReplace(S,'%','(.*)',[rfReplaceAll]);\r\n S:=StringReplace(S,'_','(.)',[rfReplaceAll]);\r\n S:='^'+S+'$';\r\n try\r\n // Writeln('Ex: ',FLast,' -> ',S);\r\n FRE:=TJSRegexp.New(S,'i');\r\n Re:=FRe;\r\n except\r\n Result.resValue:=False;\r\n exit;\r\n end;\r\n end;\r\n Result.resValue:=RE.Test(String(Left.NodeValue.resValue));\r\n // Writeln('Checking : ',flast,' (',FRE.Source,') on ',Left.NodeValue.resValue,' : ', Result.resValue);\r\nend;\r\n\r\n\r\nprocedure TFPLikeOperation.check;\r\nbegin\r\n if Left.NodeType<>rtString then\r\n RaiseParserError(SErrStringTypeRequired,[ResultTypeName(Left.NodeType),Left.AsString]);\r\n if Right.NodeType<>rtString then\r\n RaiseParserError(SErrStringTypeRequired,[ResultTypeName(Right.NodeType),Right.AsString]);\r\n inherited check;\r\nend;\r\n\r\nfunction TFPLikeOperation.AsString: string;\r\nbegin\r\n Result:=Left.AsString+' LIKE '+Right.AsString;\r\nend;\r\n\r\n{ TFPUnequalOperation }\r\n\r\nfunction TFPUnequalOperation.AsString: string;\r\nbegin\r\n Result:=Left.AsString+' <> '+Right.AsString;\r\nend;\r\n\r\nFunction TFPUnequalOperation.GetNodeValue : TFPExpressionResult;\r\nbegin\r\n Result:=Inherited GetNodeValue;\r\n Result.resValue:=Not Result.resValue;\r\nend;\r\n\r\n\r\n{ TFPLessThanOperation }\r\n\r\nfunction TFPLessThanOperation.AsString: string;\r\nbegin\r\n Result:=Left.AsString+' < '+Right.AsString;\r\nend;\r\n\r\nFunction TFPLessThanOperation.GetNodeValue : TFPExpressionResult;\r\nVar\r\n RRes : TFPExpressionResult;\r\n\r\nbegin\r\n Result:=Left.GetNodeValue;\r\n RRes:=Right.GetNodeValue;\r\n Case Result.ResultType of\r\n rtInteger : Result.resValue:=NativeInt(Result.resValue) '+Right.AsString;\r\nend;\r\n\r\nFunction TFPGreaterThanOperation.GetNodeValue : TFPExpressionResult;\r\n\r\nVar\r\n RRes : TFPExpressionResult;\r\n\r\nbegin\r\n Result:=Left.GetNodeValue;\r\n RRes:=Right.GetNodeValue;\r\n Case Result.ResultType of\r\n rtInteger : case Right.NodeType of\r\n rtInteger : Result.resValue:=NativeInt(Result.resValue)>NativeInt(RRes.resValue);\r\n rtFloat : Result.resValue:=NativeInt(Result.resValue)>TExprFloat(RRes.resValue);\r\n rtCurrency : Result.resValue:=NativeINt(Result.resValue)>Currency(RRes.resValue);\r\n end;\r\n rtFloat : case Right.NodeType of\r\n rtInteger : Result.resValue:=TExprFloat(Result.resValue)>NativeInt(RRes.resValue);\r\n rtFloat : Result.resValue:=TExprFloat(Result.resValue)>TExprFloat(RRes.resValue);\r\n rtCurrency : Result.resValue:=TExprFloat(Result.resValue)>Currency(RRes.resValue);\r\n end;\r\n rtCurrency : case Right.NodeType of\r\n rtInteger : Result.resValue:=Currency(Result.resValue)>NativeInt(RRes.resValue);\r\n rtFloat : Result.resValue:=Currency(Result.resValue)>TExprFloat(RRes.resValue);\r\n rtCurrency : Result.resValue:=Currency(Result.resValue)>Currency(RRes.resValue);\r\n end;\r\n rtDateTime : Result.resValue:=TDateTime(Result.resValue)>TDateTime(RRes.resValue);\r\n rtString : Result.resValue:=String(Result.resValue)>String(RRes.resValue);\r\n end;\r\n Result.ResultType:=rtBoolean;\r\nend;\r\n\r\n{ TFPGreaterThanEqualOperation }\r\n\r\nfunction TFPGreaterThanEqualOperation.AsString: string;\r\nbegin\r\n Result:=Left.AsString+' >= '+Right.AsString;\r\nend;\r\n\r\nFunction TFPGreaterThanEqualOperation.GetNodeValue : TFPExpressionResult;\r\nbegin\r\n Result:=Inherited GetNodeValue;\r\n Result.resValue:=Not Result.resValue;\r\nend;\r\n\r\n{ TFPLessThanEqualOperation }\r\n\r\nfunction TFPLessThanEqualOperation.AsString: string;\r\nbegin\r\n Result:=Left.AsString+' <= '+Right.AsString;\r\nend;\r\n\r\nFunction TFPLessThanEqualOperation.GetNodeValue : TFPExpressionResult;\r\nbegin\r\n Result:=Inherited GetNodeValue;\r\n Result.resValue:=Not Result.resValue;\r\nend;\r\n\r\n{ TFPOrderingOperation }\r\n\r\nprocedure TFPOrderingOperation.Check;\r\n\r\nConst\r\n AllowedTypes =[rtInteger,rtfloat,rtCurrency,rtDateTime,rtString];\r\n\r\nbegin\r\n CheckNodeType(Left,AllowedTypes);\r\n CheckNodeType(Right,AllowedTypes);\r\n inherited Check;\r\nend;\r\n\r\n{ TMathOperation }\r\n\r\nprocedure TMathOperation.Check;\r\n\r\nConst\r\n AllowedTypes =[rtInteger,rtfloat,rtCurrency,rtDateTime,rtString];\r\n\r\nbegin\r\n inherited Check;\r\n CheckNodeType(Left,AllowedTypes);\r\n CheckNodeType(Right,AllowedTypes);\r\n CheckSameNodeTypes;\r\nend;\r\n\r\nfunction TMathOperation.NodeType: TResultType;\r\nbegin\r\n Result:=Left.NodeType;\r\nend;\r\n\r\n{ TFPAddOperation }\r\n\r\nfunction TFPAddOperation.AsString: string;\r\nbegin\r\n Result:=Left.AsString+' + '+Right.asString;\r\nend;\r\n\r\nFunction TFPAddOperation.GetNodeValue : TFPExpressionResult;\r\n\r\nVar\r\n RRes : TFPExpressionResult;\r\n\r\nbegin\r\n Result:=Left.GetNodeValue;\r\n RRes:=Right.GetNodeValue;\r\n case Result.ResultType of\r\n rtInteger : Result.resValue:=NativeInt(Result.resValue)+NativeInt(RRes.resValue);\r\n rtString : Result.resValue:=String(Result.resValue)+String(RRes.resValue);\r\n rtDateTime : Result.resValue:=TDateTime(Result.resValue)+TDateTime(RRes.resValue);\r\n rtFloat : Result.resValue:=TExprFloat(Result.resValue)+TExprFloat(RRes.resValue);\r\n rtCurrency : Result.resValue:=Currency(Result.resValue)+Currency(RRes.resValue);\r\n end;\r\n Result.ResultType:=NodeType;\r\nend;\r\n\r\n{ TFPSubtractOperation }\r\n\r\nprocedure TFPSubtractOperation.check;\r\n\r\nConst\r\n AllowedTypes =[rtInteger,rtfloat,rtCurrency,rtDateTime];\r\n\r\nbegin\r\n CheckNodeType(Left,AllowedTypes);\r\n CheckNodeType(Right,AllowedTypes);\r\n inherited check;\r\nend;\r\n\r\nfunction TFPSubtractOperation.AsString: string;\r\nbegin\r\n Result:=Left.AsString+' - '+Right.asString;\r\nend;\r\n\r\nFunction TFPSubtractOperation.GetNodeValue : TFPExpressionResult;\r\n\r\nVar\r\n RRes : TFPExpressionResult;\r\n\r\nbegin\r\n Result:=Left.GetNodeValue;\r\n RRes:=Right.GetNodeValue;\r\n case Result.ResultType of\r\n rtInteger : Result.resValue:=NativeInt(Result.resValue)-NativeInt(RRes.resValue);\r\n rtDateTime : Result.resValue:=TDateTime(Result.resValue)-TDateTime(RRes.resValue);\r\n rtFloat : Result.resValue:=TExprFloat(Result.resValue)-TExprFloat(RRes.resValue);\r\n rtCurrency : Result.resValue:=Currency(Result.resValue)-Currency(RRes.resValue);\r\n end;\r\nend;\r\n\r\n{ TFPMultiplyOperation }\r\n\r\nprocedure TFPMultiplyOperation.check;\r\n\r\nConst\r\n AllowedTypes =[rtInteger,rtCurrency,rtfloat];\r\n\r\nbegin\r\n CheckNodeType(Left,AllowedTypes);\r\n CheckNodeType(Right,AllowedTypes);\r\n Inherited;\r\nend;\r\n\r\nfunction TFPMultiplyOperation.AsString: string;\r\nbegin\r\n Result:=Left.AsString+' * '+Right.asString;\r\nend;\r\n\r\nFunction TFPMultiplyOperation.GetNodeValue : TFPExpressionResult;\r\nVar\r\n RRes : TFPExpressionResult;\r\n\r\nbegin\r\n Result:=Left.GetNodeValue;\r\n RRes:=Right.GetNodeValue;\r\n case Result.ResultType of\r\n rtInteger : Result.resValue:=NativeInt(Result.resValue)*NativeInt(RRes.resValue);\r\n rtFloat : Result.resValue:=TExprFloat(Result.resValue)*TExprFloat(RRes.resValue);\r\n rtCurrency : Result.resValue:=Currency(Result.resValue)*Currency(RRes.resValue);\r\n end;\r\nend;\r\n\r\n{ TFPDivideOperation }\r\n\r\nprocedure TFPDivideOperation.check;\r\nConst\r\n AllowedTypes =[rtInteger,rtCurrency,rtfloat];\r\n\r\nbegin\r\n CheckNodeType(Left,AllowedTypes);\r\n CheckNodeType(Right,AllowedTypes);\r\n inherited check;\r\nend;\r\n\r\nfunction TFPDivideOperation.AsString: string;\r\nbegin\r\n Result:=Left.AsString+' / '+Right.asString;\r\nend;\r\n\r\nfunction TFPDivideOperation.NodeType: TResultType;\r\n\r\nbegin\r\n if (Left.NodeType=rtCurrency) and (Right.NodeType=rtCurrency) then\r\n Result:=rtCurrency\r\n else\r\n Result:=rtFloat;\r\nend;\r\n\r\nFunction TFPDivideOperation.GetNodeValue : TFPExpressionResult;\r\n\r\nVar\r\n RRes : TFPExpressionResult;\r\n\r\nbegin\r\n Result:=Left.GetNodeValue;\r\n RRes:=Right.GetNodeValue;\r\n case Result.ResultType of\r\n rtInteger : Result.resValue:=NativeInt(Result.resValue)/NativeInt(RRes.resValue);\r\n rtFloat : Result.resValue:=TExprFloat(Result.resValue)/TExprFloat(RRes.resValue);\r\n rtCurrency :\r\n if NodeType=rtCurrency then\r\n Result.resValue:=Currency(Result.resValue)/Currency(RRes.resValue)\r\n else\r\n Result.resValue:=TExprFloat(Result.resValue)/TExprFloat(RRes.resValue);\r\n end;\r\n Result.ResultType:=NodeType;\r\nend;\r\n\r\n{ TFPPowerOperation }\r\n\r\nprocedure TFPPowerOperation.Check;\r\nconst\r\n AllowedTypes = [rtInteger, rtCurrency, rtFloat];\r\nbegin\r\n CheckNodeType(Left, AllowedTypes);\r\n CheckNodeType(Right, AllowedTypes);\r\nend;\r\n\r\nfunction TFPPowerOperation.AsString: String;\r\nbegin\r\n Result := Left.AsString + '^' + Right.AsString;\r\nend;\r\n\r\nfunction TFPPowerOperation.NodeType: TResultType;\r\nbegin\r\n Result := rtFloat;\r\nend;\r\n\r\nfunction power(base,exponent: TExprFloat): TExprFloat;\r\n// Adapted from unit \"math\"\r\nvar\r\n ex: Integer;\r\nbegin\r\n if Exponent = 0.0 then\r\n result := 1.0\r\n else if (base = 0.0) and (exponent > 0.0) then\r\n result := 0.0\r\n else if (base < 0.0) and (frac(exponent) = 0.0) then\r\n begin\r\n ex := round(exponent);\r\n result := exp( exponent * ln(-base));\r\n if odd(ex) then result := -result;\r\n end\r\n else\r\n result := exp( exponent * ln(base) );\r\nend;\r\n\r\nFunction TFPPowerOperation.GetNodeValue: TFPExpressionResult;\r\nvar\r\n RRes: TFPExpressionResult;\r\nbegin\r\n Result:=Left.GetNodeValue;\r\n RRes:=Right.GetNodeValue;\r\n Result.resValue := power(ArgToFloat(Result), ArgToFloat(RRes));\r\n Result.ResultType := rtFloat;\r\nend;\r\n\r\n{ TFPConvertNode }\r\n\r\nfunction TFPConvertNode.AsString: String;\r\nbegin\r\n Result:=Operand.AsString;\r\nend;\r\n\r\n{ TIntToFloatNode }\r\n\r\nprocedure TIntConvertNode.Check;\r\nbegin\r\n inherited Check;\r\n CheckNodeType(Operand,[rtInteger])\r\nend;\r\n\r\nfunction TIntToFloatNode.NodeType: TResultType;\r\nbegin\r\n Result:=rtFloat;\r\nend;\r\n\r\nFunction TIntToFloatNode.GetNodeValue : TFPExpressionResult;\r\nbegin\r\n Result:=Operand.GetNodeValue;\r\n Result.resValue:=Result.resValue;\r\n Result.ResultType:=rtFloat;\r\nend;\r\n\r\n\r\n{ TIntToDateTimeNode }\r\n\r\nfunction TIntToDateTimeNode.NodeType: TResultType;\r\nbegin\r\n Result:=rtDatetime;\r\nend;\r\n\r\nFunction TIntToDateTimeNode.GetNodeValue : TFPExpressionResult;\r\nbegin\r\n Result:=Operand.GetNodeValue;\r\n Result.ResultType:=rtDateTime;\r\nend;\r\n\r\n{ TFloatToDateTimeNode }\r\n\r\nprocedure TFloatToDateTimeNode.Check;\r\nbegin\r\n inherited Check;\r\n CheckNodeType(Operand,[rtFloat]);\r\nend;\r\n\r\nfunction TFloatToDateTimeNode.NodeType: TResultType;\r\nbegin\r\n Result:=rtDateTime;\r\nend;\r\n\r\nFunction TFloatToDateTimeNode.GetNodeValue : TFPExpressionResult;\r\nbegin\r\n Result:=Operand.GetNodeValue;\r\n Result.ResultType:=rtDateTime;\r\nend;\r\n\r\n{ TCurrencyToDateTimeNode }\r\n\r\nprocedure TCurrencyToDateTimeNode.Check;\r\n\r\nbegin\r\n inherited Check;\r\n CheckNodeType(Operand,[rtCurrency]);\r\nend;\r\n\r\nfunction TCurrencyToDateTimeNode.NodeType: TResultType;\r\nbegin\r\n Result:=rtDateTime;\r\nend;\r\n\r\nFunction TCurrencyToDateTimeNode.GetNodeValue : TFPExpressionResult;\r\n\r\nVar\r\n R : TFPExpressionResult;\r\nbegin\r\n R:=Operand.GetNodeValue;\r\n Result.resValue:=Currency(R.resValue);\r\n Result.ResultType:=rtDateTime;\r\nend;\r\n\r\n{ TCurrencyToFloatNode }\r\n\r\nprocedure TCurrencyToFloatNode.Check;\r\nbegin\r\n inherited Check;\r\n CheckNodeType(Operand,[rtCurrency]);\r\nend;\r\n\r\nfunction TCurrencyToFloatNode.NodeType: TResultType;\r\nbegin\r\n Result:=rtFloat;\r\nend;\r\n\r\nFunction TCurrencyToFloatNode.GetNodeValue : TFPExpressionResult;\r\n\r\nbegin\r\n Result:=Operand.GetNodeValue;\r\n Result.resValue:=Currency(Result.resValue);\r\n Result.ResultType:=rtFloat;\r\nend;\r\n\r\n{ TFPExprIdentifierNode }\r\n\r\nconstructor TFPExprIdentifierNode.CreateIdentifier(AID: TFPExprIdentifierDef);\r\nbegin\r\n Inherited Create;\r\n FID:=AID;\r\n PResult:=@FID.FValue;\r\n FResultType:=FID.ResultType;\r\nend;\r\n\r\nfunction TFPExprIdentifierNode.NodeType: TResultType;\r\nbegin\r\n Result:=FResultType;\r\nend;\r\n\r\nFunction TFPExprIdentifierNode.GetNodeValue : TFPExpressionResult;\r\nbegin\r\n if Identifier.EventBasedVariable then\r\n begin\r\n Identifier.FetchValue;\r\n PResult:=@FID.FValue;\r\n end;\r\n Result:=PResult^;\r\n Result.ResultType:=FResultType;\r\nend;\r\n\r\n{ TFPExprVariable }\r\n\r\nprocedure TFPExprVariable.Check;\r\nbegin\r\n // Do nothing;\r\nend;\r\n\r\nfunction TFPExprVariable.AsString: string;\r\nbegin\r\n Result:=FID.Name;\r\nend;\r\n\r\n{ TFPExprFunction }\r\n\r\nprocedure TFPExprFunction.CalcParams;\r\n\r\nVar\r\n I : Integer;\r\n\r\nbegin\r\n For I:=0 to Length(FArgumentParams)-1 do\r\n begin\r\n FArgumentParams[i]:=FArgumentNodes[i].GetNodeValue;\r\n end;\r\nend;\r\n\r\nFunction TFPExprFunction.ConvertArgument(aIndex : Integer; aNode : TFPExprNode; aType : TResultType) : TFPExprNode;\r\n\r\nVar\r\n N : TFPExprNode;\r\n\r\nbegin\r\n // Automatically convert integers to floats for float/currency parameters\r\n N:=TFPExpressionParser.ConvertNode(aNode,aType);\r\n if (aNode=N) then\r\n // No conversion was performed, raise error\r\n RaiseParserError(SErrInvalidArgumentType,[aIndex,ResultTypeName(aType),ResultTypeName(aNode.NodeType)]);\r\n Result:=N;\r\nend;\r\n\r\nfunction TFPExprFunction.HasAggregate: Boolean;\r\nvar\r\n I: Integer;\r\nbegin\r\n Result := true;\r\n if IsAggregate then\r\n exit;\r\n For I:=0 to Length(FArgumentNodes)-1 do\r\n if FArgumentNodes[I].HasAggregate then\r\n exit;\r\n Result := false;\r\nend;\r\n\r\nprocedure TFPExprFunction.Check;\r\n\r\nVar\r\n I : Integer;\r\n rtp,rta : TResultType;\r\n\r\nbegin\r\n If Length(FArgumentNodes)<>FID.ArgumentCount then\r\n RaiseParserError(ErrInvalidArgumentCount,[FID.Name]);\r\n For I:=0 to Length(FArgumentNodes)-1 do\r\n begin\r\n rtp:=CharToResultType(FID.ParameterTypes[i+1]);\r\n rta:=FArgumentNodes[i].NodeType;\r\n If (rtp<>rta) then\r\n FArgumentNodes[i]:=ConvertArgument(I+1,FArgumentNodes[i],rtp);\r\n end;\r\nend;\r\n\r\nconstructor TFPExprFunction.CreateFunction(AID: TFPExprIdentifierDef; const Args: TExprArgumentArray);\r\n\r\nbegin\r\n Inherited CreateIdentifier(AID);\r\n FArgumentNodes:=Args;\r\n SetLength(FArgumentParams,Length(Args));\r\nend;\r\n\r\ndestructor TFPExprFunction.Destroy;\r\n\r\nVar\r\n I : Integer;\r\n\r\nbegin\r\n For I:=0 to Length(FArgumentNodes)-1 do\r\n FreeAndNil(FArgumentNodes[I]);\r\n inherited Destroy;\r\nend;\r\n\r\nprocedure TFPExprFunction.InitAggregate;\r\nvar\r\n I: Integer;\r\nbegin\r\n For I:=0 to Length(FArgumentNodes)-1 do\r\n FArgumentNodes[i].InitAggregate;\r\nend;\r\n\r\nprocedure TFPExprFunction.UpdateAggregate;\r\nvar\r\n I: Integer;\r\nbegin\r\n For I:=0 to Length(FArgumentNodes)-1 do\r\n FArgumentNodes[i].UpdateAggregate;\r\nend;\r\n\r\nfunction TFPExprFunction.AsString: String;\r\n\r\nVar\r\n S : String;\r\n I : Integer;\r\n\r\nbegin\r\n S:='';\r\n For I:=0 to length(FArgumentNodes)-1 do\r\n begin\r\n If (S<>'') then\r\n S:=S+',';\r\n S:=S+FArgumentNodes[I].AsString;\r\n end;\r\n If (S<>'') then\r\n S:='('+S+')';\r\n Result:=FID.Name+S;\r\nend;\r\n\r\n{ TFPFunctionEventHandler }\r\n\r\nconstructor TFPFunctionEventHandler.CreateFunction(AID: TFPExprIdentifierDef;\r\n Const Args : TExprArgumentArray);\r\nbegin\r\n Inherited;\r\n FCallBack:=AID.OnGetFunctionValue;\r\nend;\r\n\r\nFunction TFPFunctionEventHandler.GetNodeValue : TFPExpressionResult;\r\nbegin\r\n If Length(FArgumentParams)>0 then\r\n CalcParams;\r\n Result:=FCallBack(FArgumentParams);\r\n Result.ResultType:=NodeType;\r\nend;\r\n\r\n{ ---------------------------------------------------------------------\r\n Standard Builtins support\r\n ---------------------------------------------------------------------}\r\n\r\n{ Template for builtin.\r\n\r\nProcedure MyCallback (Var Result : TFPExpressionResult; Const Args : TExprParameterArray);\r\nbegin\r\nend;\r\n\r\n}\r\n\r\nfunction ArgToFloat(Arg: TFPExpressionResult): TExprFloat;\r\n// Utility function for the built-in math functions. Accepts also integers\r\n// in place of the floating point arguments. To be called in builtins or\r\n// user-defined callbacks having float results.\r\nbegin\r\n if Arg.ResultType = rtInteger then\r\n result := NativeInt(Arg.resValue)\r\n else if Arg.ResultType = rtCurrency then\r\n result := Currency(Arg.resValue)\r\n else\r\n result := TExprFloat(Arg.resValue);\r\nend;\r\n\r\n// Math builtins\r\n\r\nFunction BuiltInCos(Const Args : TExprParameterArray) : TFPExpressionResult;\r\nbegin\r\n Result.ResultType:=rtFloat;\r\n Result.resValue:=Cos(ArgToFloat(Args[0]));\r\nend;\r\n\r\nFunction BuiltInSin(Const Args : TExprParameterArray) : TFPExpressionResult;\r\nbegin\r\n Result.ResultType:=rtFloat;\r\n Result.resValue:=Sin(ArgToFloat(Args[0]));\r\nend;\r\n\r\n(*\r\nFunction BuiltInArcTan(Const Args : TExprParameterArray) : TFPExpressionResult;\r\nbegin\r\n// Result.resValue:=Arctan(ArgToFloat(Args[0]));\r\nend;\r\n*)\r\n\r\nFunction BuiltInAbs(Const Args : TExprParameterArray) : TFPExpressionResult;\r\nbegin\r\n Result.ResultType:=rtFloat;\r\n Result.resValue:=Abs(ArgToFloat(Args[0]));\r\nend;\r\n\r\nFunction BuiltInSqr(Const Args : TExprParameterArray) : TFPExpressionResult;\r\nbegin\r\n Result.ResultType:=rtFloat;\r\n Result.resValue:=Sqr(ArgToFloat(Args[0]));\r\nend;\r\n\r\nFunction BuiltInSqrt(Const Args : TExprParameterArray) : TFPExpressionResult;\r\nbegin\r\n Result.ResultType:=rtFloat;\r\n Result.resValue:=Sqrt(ArgToFloat(Args[0]));\r\nend;\r\n\r\nFunction BuiltInExp(Const Args : TExprParameterArray) : TFPExpressionResult;\r\nbegin\r\n Result.ResultType:=rtFloat;\r\n Result.resValue:=Exp(ArgToFloat(Args[0]));\r\nend;\r\n\r\nFunction BuiltInLn(Const Args : TExprParameterArray) : TFPExpressionResult;\r\nbegin\r\n Result.ResultType:=rtFloat;\r\n Result.resValue:=Ln(ArgToFloat(Args[0]));\r\nend;\r\n\r\nVar\r\n L10 : TExprFloat;\r\n\r\nFunction BuiltInLog(Const Args : TExprParameterArray) : TFPExpressionResult;\r\nbegin\r\n Result.ResultType:=rtFloat;\r\n Result.resValue:=Ln(ArgToFloat(Args[0]))/L10;\r\nend;\r\n\r\nFunction BuiltInRound(Const Args : TExprParameterArray) : TFPExpressionResult;\r\nbegin\r\n Result.ResultType:=rtInteger;\r\n Result.resValue:=Round(ArgToFloat(Args[0]));\r\nend;\r\n\r\nFunction BuiltInTrunc(Const Args : TExprParameterArray) : TFPExpressionResult;\r\nbegin\r\n Result.ResultType:=rtInteger;\r\n Result.resValue:=Trunc(ArgToFloat(Args[0]));\r\nend;\r\n\r\nFunction BuiltInInt(Const Args : TExprParameterArray) : TFPExpressionResult;\r\nbegin\r\n Result.ResultType:=rtInteger;\r\n Result.resValue:=Int(ArgToFloat(Args[0]));\r\nend;\r\n\r\nFunction BuiltInFrac(Const Args : TExprParameterArray) : TFPExpressionResult;\r\nbegin\r\n Result.ResultType:=rtFloat;\r\n Result.resValue:=frac(ArgToFloat(Args[0]));\r\nend;\r\n\r\n// String builtins\r\n\r\nFunction BuiltInLength(Const Args : TExprParameterArray) : TFPExpressionResult;\r\nbegin\r\n Result.ResultType:=rtInteger;\r\n Result.resValue:=Length(String(Args[0].resValue));\r\nend;\r\n\r\nFunction BuiltInCopy(Const Args : TExprParameterArray) : TFPExpressionResult;\r\nbegin\r\n Result.ResultType:=rtString;\r\n Result.resValue:=Copy(String(Args[0].resValue),NativeInt(Args[1].resValue),NativeInt(Args[2].resValue));\r\nend;\r\n\r\nFunction BuiltInDelete(Const Args : TExprParameterArray) : TFPExpressionResult;\r\n\r\nVar\r\n S : String;\r\n\r\nbegin\r\n Result.ResultType:=rtString;\r\n S:=String(Args[0].resValue);\r\n Delete(S,NativeInt(Args[1].resValue),NativeInt(Args[2].resValue));\r\n Result.resValue:=S;\r\nend;\r\n\r\nFunction BuiltInPos(Const Args : TExprParameterArray) : TFPExpressionResult;\r\nbegin\r\n result.ResultType:=rtInteger;\r\n Result.resValue:=Pos(String(Args[0].resValue),String(Args[1].resValue));\r\nend;\r\n\r\nFunction BuiltInUppercase(Const Args : TExprParameterArray) : TFPExpressionResult;\r\nbegin\r\n Result.ResultType:=rtString;\r\n Result.resValue:=Uppercase(String(Args[0].resValue));\r\nend;\r\n\r\nFunction BuiltInLowercase(Const Args : TExprParameterArray) : TFPExpressionResult;\r\nbegin\r\n Result.ResultType:=rtString;\r\n Result.resValue:=Lowercase(String(Args[0].resValue));\r\nend;\r\n\r\nFunction BuiltInStringReplace(Const Args : TExprParameterArray) : TFPExpressionResult;\r\n\r\nVar\r\n F : TReplaceFlags;\r\n\r\nbegin\r\n Result.ResultType:=rtString;\r\n F:=[];\r\n If Boolean(Args[3].resValue) then\r\n Include(F,rfReplaceAll);\r\n If Boolean(Args[4].resValue) then\r\n Include(F,rfIgnoreCase);\r\n Result.resValue:=StringReplace(String(Args[0].resValue),String(Args[1].resValue),String(Args[2].resValue),f);\r\nend;\r\n\r\nFunction BuiltInCompareText(Const Args : TExprParameterArray) : TFPExpressionResult;\r\nbegin\r\n Result.ResultType:=rtInteger;\r\n Result.resValue:=CompareText(String(Args[0].resValue),String(Args[1].resValue));\r\nend;\r\n\r\n// Date/Time builtins\r\n\r\nFunction BuiltInDate(Const Args : TExprParameterArray) : TFPExpressionResult;\r\nbegin\r\n if Args=nil then ;\r\n Result.ResultType:=rtDateTime;\r\n Result.resValue:=Date;\r\nend;\r\n\r\nFunction BuiltInTime(Const Args : TExprParameterArray) : TFPExpressionResult;\r\nbegin\r\n if Args=nil then ;\r\n Result.ResultType:=rtDateTime;\r\n Result.resValue:=Time;\r\nend;\r\n\r\nFunction BuiltInNow(Const Args : TExprParameterArray) : TFPExpressionResult;\r\nbegin\r\n if Args=nil then ;\r\n Result.ResultType:=rtDateTime;\r\n Result.resValue:=Now;\r\nend;\r\n\r\nFunction BuiltInDayofWeek(Const Args : TExprParameterArray) : TFPExpressionResult;\r\nbegin\r\n Result.ResultType:=rtInteger;\r\n Result.resValue:=DayOfWeek(TDateTime(Args[0].resValue));\r\nend;\r\n\r\nFunction BuiltInExtractYear(Const Args : TExprParameterArray) : TFPExpressionResult;\r\n\r\nVar\r\n Y,M,D : Word;\r\n\r\nbegin\r\n Result.ResultType:=rtInteger;\r\n DecodeDate(TDateTime(Args[0].resValue),Y,M,D);\r\n Result.resValue:=Y;\r\nend;\r\n\r\nFunction BuiltInExtractMonth(Const Args : TExprParameterArray) : TFPExpressionResult;\r\n\r\nVar\r\n Y,M,D : Word;\r\n\r\nbegin\r\n Result.ResultType:=rtInteger;\r\n DecodeDate(TDateTime(Args[0].resValue),Y,M,D);\r\n Result.resValue:=M;\r\nend;\r\n\r\nFunction BuiltInExtractDay(Const Args : TExprParameterArray) : TFPExpressionResult;\r\n\r\nVar\r\n Y,M,D : Word;\r\n\r\nbegin\r\n Result.ResultType:=rtInteger;\r\n DecodeDate(TDateTime(Args[0].resValue),Y,M,D);\r\n Result.resValue:=D;\r\nend;\r\n\r\nFunction BuiltInExtractHour(Const Args : TExprParameterArray) : TFPExpressionResult;\r\n\r\nVar\r\n H,M,S,MS : Word;\r\n\r\nbegin\r\n Result.ResultType:=rtInteger;\r\n DecodeTime(TDateTime(Args[0].resValue),H,M,S,MS);\r\n Result.resValue:=H;\r\nend;\r\n\r\nFunction BuiltInExtractMin(Const Args : TExprParameterArray) : TFPExpressionResult;\r\n\r\nVar\r\n H,M,S,MS : Word;\r\n\r\nbegin\r\n Result.ResultType:=rtInteger;\r\n DecodeTime(TDateTime(Args[0].resValue),H,M,S,MS);\r\n Result.resValue:=M;\r\nend;\r\n\r\nFunction BuiltInExtractSec(Const Args : TExprParameterArray) : TFPExpressionResult;\r\n\r\nVar\r\n H,M,S,MS : Word;\r\n\r\nbegin\r\n Result.ResultType:=rtInteger;\r\n DecodeTime(TdateTime(Args[0].resValue),H,M,S,MS);\r\n Result.resValue:=S;\r\nend;\r\n\r\nFunction BuiltInExtractMSec(Const Args : TExprParameterArray) : TFPExpressionResult;\r\n\r\nVar\r\n H,M,S,MS : Word;\r\n\r\nbegin\r\n Result.ResultType:=rtInteger;\r\n DecodeTime(TDateTime(Args[0].resValue),H,M,S,MS);\r\n Result.resValue:=MS;\r\nend;\r\n\r\nFunction BuiltInEncodedate(Const Args : TExprParameterArray) : TFPExpressionResult;\r\n\r\nbegin\r\n Result.ResultType:=rtDateTime;\r\n Result.resValue:=Encodedate(NativeInt(Args[0].resValue),NativeInt(Args[1].resValue),NativeInt(Args[2].resValue));\r\nend;\r\n\r\nFunction BuiltInEncodeTime(Const Args : TExprParameterArray) : TFPExpressionResult;\r\n\r\nbegin\r\n Result.ResultType:=rtDateTime;\r\n Result.resValue:=EncodeTime(NativeInt(Args[0].resValue),NativeInt(Args[1].resValue),NativeInt(Args[2].resValue),NativeInt(Args[3].resValue));\r\nend;\r\n\r\nFunction BuiltInEncodeDateTime(Const Args : TExprParameterArray) : TFPExpressionResult;\r\n\r\nbegin\r\n Result.ResultType:=rtDateTime;\r\n Result.resValue:=EncodeDate(NativeInt(Args[0].resValue),NativeInt(Args[1].resValue),NativeInt(Args[2].resValue))\r\n +EncodeTime(NativeInt(Args[3].resValue),NativeInt(Args[4].resValue),NativeInt(Args[5].resValue),NativeInt(Args[6].resValue));\r\nend;\r\n\r\nFunction BuiltInShortDayName(Const Args : TExprParameterArray) : TFPExpressionResult;\r\n\r\nbegin\r\n Result.ResultType:=rtString;\r\n Result.resValue:=FormatSettings.ShortDayNames[NativeInt(Args[0].resValue)];\r\nend;\r\n\r\nFunction BuiltInShortMonthName(Const Args : TExprParameterArray) : TFPExpressionResult;\r\n\r\nbegin\r\n Result.ResultType:=rtString;\r\n Result.resValue:=FormatSettings.ShortMonthNames[NativeInt(Args[0].resValue)];\r\nend;\r\nFunction BuiltInLongDayName(Const Args : TExprParameterArray) : TFPExpressionResult;\r\n\r\nbegin\r\n Result.resValue:=FormatSettings.LongDayNames[NativeInt(Args[0].resValue)];\r\nend;\r\n\r\nFunction BuiltInLongMonthName(Const Args : TExprParameterArray) : TFPExpressionResult;\r\n\r\nbegin\r\n Result.ResultType:=rtString;\r\n Result.resValue:=FormatSettings.LongMonthNames[NativeInt(Args[0].resValue)];\r\nend;\r\n\r\nFunction BuiltInFormatDateTime(Const Args : TExprParameterArray) : TFPExpressionResult;\r\n\r\nbegin\r\n Result.ResultType:=rtString;\r\n Result.resValue:=FormatDateTime(String(Args[0].resValue),TDateTime(Args[1].resValue));\r\nend;\r\n\r\n\r\n// Conversion\r\nFunction BuiltInIntToStr(Const Args : TExprParameterArray) : TFPExpressionResult;\r\n\r\nbegin\r\n Result.ResultType:=rtString;\r\n Result.resValue:=IntToStr(NativeInt(Args[0].resValue));\r\nend;\r\n\r\nFunction BuiltInStrToInt(Const Args : TExprParameterArray) : TFPExpressionResult;\r\n\r\nbegin\r\n Result.ResultType:=rtInteger;\r\n Result.resValue:=StrToInt(String(Args[0].resValue));\r\nend;\r\n\r\nFunction BuiltInStrToIntDef(Const Args : TExprParameterArray) : TFPExpressionResult;\r\n\r\nbegin\r\n Result.ResultType:=rtInteger;\r\n Result.resValue:=StrToIntDef(String(Args[0].resValue),NativeInt(Args[1].resValue));\r\nend;\r\n\r\nFunction BuiltInFloatToStr(Const Args : TExprParameterArray) : TFPExpressionResult;\r\n\r\nbegin\r\n Result.ResultType:=rtString;\r\n Result.resValue:=FloatToStr(TExprFloat(Args[0].resValue));\r\nend;\r\n\r\nFunction BuiltInStrToFloat(Const Args : TExprParameterArray) : TFPExpressionResult;\r\n\r\nbegin\r\n Result.ResultType:=rtFloat;\r\n Result.resValue:=StrToFloat(String(Args[0].resValue));\r\nend;\r\n\r\nFunction BuiltInStrToFloatDef(Const Args : TExprParameterArray) : TFPExpressionResult;\r\n\r\nbegin\r\n Result.ResultType:=rtFloat;\r\n Result.resValue:=StrToFloatDef(String(Args[0].resValue),TExprFloat(Args[1].resValue));\r\nend;\r\n\r\nFunction BuiltInDateToStr(Const Args : TExprParameterArray) : TFPExpressionResult;\r\n\r\nbegin\r\n Result.ResultType:=rtString;\r\n Result.resValue:=DateToStr(TDateTime(Args[0].resValue));\r\nend;\r\n\r\nFunction BuiltInTimeToStr(Const Args : TExprParameterArray) : TFPExpressionResult;\r\n\r\nbegin\r\n Result.ResultType:=rtString;\r\n Result.resValue:=TimeToStr(TDateTime(Args[0].resValue));\r\nend;\r\n\r\nFunction BuiltInStrToDate(Const Args : TExprParameterArray) : TFPExpressionResult;\r\n\r\nbegin\r\n Result.ResultType:=rtDateTime;\r\n Result.resValue:=StrToDate(String(Args[0].resValue));\r\nend;\r\n\r\nFunction BuiltInStrToDateDef(Const Args : TExprParameterArray) : TFPExpressionResult;\r\n\r\nbegin\r\n Result.ResultType:=rtDateTime;\r\n Result.resValue:=StrToDateDef(String(Args[0].resValue),TDateTime(Args[1].resValue));\r\nend;\r\n\r\nFunction BuiltInStrToTime(Const Args : TExprParameterArray) : TFPExpressionResult;\r\n\r\nbegin\r\n Result.ResultType:=rtDateTime;\r\n Result.resValue:=StrToTime(String(Args[0].resValue));\r\nend;\r\n\r\nFunction BuiltInStrToTimeDef(Const Args : TExprParameterArray) : TFPExpressionResult;\r\n\r\nbegin\r\n Result.ResultType:=rtDateTime;\r\n Result.resValue:=StrToTimeDef(String(Args[0].resValue),TDateTime(Args[1].resValue));\r\nend;\r\n\r\nFunction BuiltInStrToDateTime(Const Args : TExprParameterArray) : TFPExpressionResult;\r\n\r\nbegin\r\n Result.ResultType:=rtDateTime;\r\n Result.resValue:=StrToDateTime(String(Args[0].resValue));\r\nend;\r\n\r\nFunction BuiltInStrToDateTimeDef(Const Args : TExprParameterArray) : TFPExpressionResult;\r\n\r\nbegin\r\n Result.ResultType:=rtDateTime;\r\n Result.resValue:=StrToDateTimeDef(String(Args[0].resValue),TDateTime(Args[1].resValue));\r\nend;\r\n\r\nFunction BuiltInFormatFloat(Const Args : TExprParameterArray) : TFPExpressionResult;\r\nbegin\r\n Result.ResultType:=rtString;\r\n result.resValue := FormatFloat(String(Args[0].resValue), TExprFloat(Args[1].resValue));\r\nend;\r\n\r\nFunction BuiltInBoolToStr(Const Args : TExprParameterArray) : TFPExpressionResult;\r\n\r\nbegin\r\n Result.ResultType:=rtString;\r\n Result.resValue:=BoolToStr(Boolean(Args[0].resValue));\r\nend;\r\n\r\nFunction BuiltInStrToBool(Const Args : TExprParameterArray) : TFPExpressionResult;\r\n\r\nbegin\r\n Result.ResultType:=rtBoolean;\r\n Result.resValue:=StrToBool(String(Args[0].resValue));\r\nend;\r\n\r\nFunction BuiltInStrToBoolDef(Const Args : TExprParameterArray) : TFPExpressionResult;\r\n\r\nbegin\r\n Result.resValue:=StrToBoolDef(String(Args[0].resValue),Boolean(Args[1].resValue));\r\n Result.ResultType:=rtBoolean;\r\nend;\r\n\r\n// Boolean\r\nFunction BuiltInShl(Const Args : TExprParameterArray) : TFPExpressionResult;\r\n\r\nbegin\r\n Result.ResultType:=rtinteger;\r\n Result.resValue:=NativeInt(Args[0].resValue) shl NativeInt(Args[1].resValue);\r\nend;\r\n\r\nFunction BuiltInShr(Const Args : TExprParameterArray) : TFPExpressionResult;\r\n\r\nbegin\r\n Result.ResultType:=rtinteger;\r\n Result.resValue:=NativeInt(Args[0].resValue) shr NativeInt(Args[1].resValue);\r\nend;\r\n\r\nFunction BuiltinIFS(Const Args : TExprParameterArray) : TFPExpressionResult;\r\n\r\nbegin\r\n Result.ResultType:=rtString;\r\n If Boolean(Args[0].resValue) then\r\n Result.resValue:=Args[1].resValue\r\n else\r\n Result.resValue:=Args[2].resValue\r\nend;\r\n\r\nFunction BuiltinIFI(Const Args : TExprParameterArray) : TFPExpressionResult;\r\n\r\nbegin\r\n Result.ResultType:=rtinteger;\r\n If Boolean(Args[0].resValue) then\r\n Result.resValue:=Args[1].resValue\r\n else\r\n Result.resValue:=Args[2].resValue\r\nend;\r\n\r\nFunction BuiltinIFF(Const Args : TExprParameterArray) : TFPExpressionResult;\r\n\r\nbegin\r\n Result.ResultType:=rtFloat;\r\n If Boolean(Args[0].resValue) then\r\n Result.resValue:=Args[1].resValue\r\n else\r\n Result.resValue:=Args[2].resValue\r\nend;\r\n\r\nFunction BuiltinIFD(Const Args : TExprParameterArray) : TFPExpressionResult;\r\n\r\nbegin\r\n Result.ResultType:=rtDateTime;\r\n If Boolean(Args[0].resValue) then\r\n Result.resValue:=Args[1].resValue\r\n else\r\n Result.resValue:=Args[2].resValue\r\nend;\r\n\r\nprocedure RegisterStdBuiltins(AManager: TExprBuiltInManager; Categories: TBuiltInCategories = AllBuiltIns);\r\n\r\nbegin\r\n With AManager do\r\n begin\r\n if bcMath in Categories then\r\n begin\r\n AddFloatVariable(bcMath,'pi',Pi);\r\n // Math functions\r\n AddFunction(bcMath,'cos','F','F',@BuiltinCos);\r\n AddFunction(bcMath,'sin','F','F',@BuiltinSin);\r\n// AddFunction(bcMath,'arctan','F','F',@BuiltinArctan);\r\n AddFunction(bcMath,'abs','F','F',@BuiltinAbs);\r\n AddFunction(bcMath,'sqr','F','F',@BuiltinSqr);\r\n AddFunction(bcMath,'sqrt','F','F',@BuiltinSqrt);\r\n AddFunction(bcMath,'exp','F','F',@BuiltinExp);\r\n AddFunction(bcMath,'ln','F','F',@BuiltinLn);\r\n AddFunction(bcMath,'log','F','F',@BuiltinLog);\r\n AddFunction(bcMath,'frac','F','F',@BuiltinFrac);\r\n AddFunction(bcMath,'int','F','F',@BuiltinInt);\r\n AddFunction(bcMath,'round','I','F',@BuiltinRound);\r\n AddFunction(bcMath,'trunc','I','F',@BuiltinTrunc);\r\n end;\r\n if bcStrings in Categories then\r\n begin\r\n // String\r\n AddFunction(bcStrings,'length','I','S',@BuiltinLength);\r\n AddFunction(bcStrings,'copy','S','SII',@BuiltinCopy);\r\n AddFunction(bcStrings,'delete','S','SII',@BuiltinDelete);\r\n AddFunction(bcStrings,'pos','I','SS',@BuiltinPos);\r\n AddFunction(bcStrings,'lowercase','S','S',@BuiltinLowercase);\r\n AddFunction(bcStrings,'uppercase','S','S',@BuiltinUppercase);\r\n AddFunction(bcStrings,'stringreplace','S','SSSBB',@BuiltinStringReplace);\r\n AddFunction(bcStrings,'comparetext','I','SS',@BuiltinCompareText);\r\n end;\r\n if bcDateTime in Categories then\r\n begin\r\n // Date/Time\r\n AddFunction(bcDateTime,'date','D','',@BuiltinDate);\r\n AddFunction(bcDateTime,'time','D','',@BuiltinTime);\r\n AddFunction(bcDateTime,'now','D','',@BuiltinNow);\r\n AddFunction(bcDateTime,'dayofweek','I','D',@BuiltinDayofweek);\r\n AddFunction(bcDateTime,'extractyear','I','D',@BuiltinExtractYear);\r\n AddFunction(bcDateTime,'extractmonth','I','D',@BuiltinExtractMonth);\r\n AddFunction(bcDateTime,'extractday','I','D',@BuiltinExtractDay);\r\n AddFunction(bcDateTime,'extracthour','I','D',@BuiltinExtractHour);\r\n AddFunction(bcDateTime,'extractmin','I','D',@BuiltinExtractMin);\r\n AddFunction(bcDateTime,'extractsec','I','D',@BuiltinExtractSec);\r\n AddFunction(bcDateTime,'extractmsec','I','D',@BuiltinExtractMSec);\r\n AddFunction(bcDateTime,'encodedate','D','III',@BuiltinEncodedate);\r\n AddFunction(bcDateTime,'encodetime','D','IIII',@BuiltinEncodeTime);\r\n AddFunction(bcDateTime,'encodedatetime','D','IIIIIII',@BuiltinEncodeDateTime);\r\n AddFunction(bcDateTime,'shortdayname','S','I',@BuiltinShortDayName);\r\n AddFunction(bcDateTime,'shortmonthname','S','I',@BuiltinShortMonthName);\r\n AddFunction(bcDateTime,'longdayname','S','I',@BuiltinLongDayName);\r\n AddFunction(bcDateTime,'longmonthname','S','I',@BuiltinLongMonthName);\r\n end;\r\n if bcBoolean in Categories then\r\n begin\r\n // Boolean\r\n AddFunction(bcBoolean,'shl','I','II',@BuiltinShl);\r\n AddFunction(bcBoolean,'shr','I','II',@BuiltinShr);\r\n AddFunction(bcBoolean,'IFS','S','BSS',@BuiltinIFS);\r\n AddFunction(bcBoolean,'IFF','F','BFF',@BuiltinIFF);\r\n AddFunction(bcBoolean,'IFD','D','BDD',@BuiltinIFD);\r\n AddFunction(bcBoolean,'IFI','I','BII',@BuiltinIFI);\r\n end;\r\n if (bcConversion in Categories) then\r\n begin\r\n // Conversion\r\n AddFunction(bcConversion,'inttostr','S','I',@BuiltInIntToStr);\r\n AddFunction(bcConversion,'strtoint','I','S',@BuiltInStrToInt);\r\n AddFunction(bcConversion,'strtointdef','I','SI',@BuiltInStrToIntDef);\r\n AddFunction(bcConversion,'floattostr','S','F',@BuiltInFloatToStr);\r\n AddFunction(bcConversion,'strtofloat','F','S',@BuiltInStrToFloat);\r\n AddFunction(bcConversion,'strtofloatdef','F','SF',@BuiltInStrToFloatDef);\r\n AddFunction(bcConversion,'booltostr','S','B',@BuiltInBoolToStr);\r\n AddFunction(bcConversion,'strtobool','B','S',@BuiltInStrToBool);\r\n AddFunction(bcConversion,'strtobooldef','B','SB',@BuiltInStrToBoolDef);\r\n AddFunction(bcConversion,'datetostr','S','D',@BuiltInDateToStr);\r\n AddFunction(bcConversion,'timetostr','S','D',@BuiltInTimeToStr);\r\n AddFunction(bcConversion,'strtodate','D','S',@BuiltInStrToDate);\r\n AddFunction(bcConversion,'strtodatedef','D','SD',@BuiltInStrToDateDef);\r\n AddFunction(bcConversion,'strtotime','D','S',@BuiltInStrToTime);\r\n AddFunction(bcConversion,'strtotimedef','D','SD',@BuiltInStrToTimeDef);\r\n AddFunction(bcConversion,'strtodatetime','D','S',@BuiltInStrToDateTime);\r\n AddFunction(bcConversion,'strtodatetimedef','D','SD',@BuiltInStrToDateTimeDef);\r\n AddFunction(bcConversion,'formatfloat','S','SF',@BuiltInFormatFloat);\r\n AddFunction(bcConversion,'formatdatetime','S','SD',@BuiltinFormatDateTime);\r\n end;\r\n if bcAggregate in Categories then\r\n begin\r\n AddFunction(bcAggregate,'count','I','',TAggregateCount);\r\n AddFunction(bcAggregate,'sum','F','F',TAggregateSum);\r\n AddFunction(bcAggregate,'avg','F','F',TAggregateAvg);\r\n AddFunction(bcAggregate,'min','F','F',TAggregateMin);\r\n AddFunction(bcAggregate,'max','F','F',TAggregateMax);\r\n end;\r\n end;\r\nend;\r\n\r\n{ TFPBuiltInExprIdentifierDef }\r\n\r\nprocedure TFPBuiltInExprIdentifierDef.Assign(Source: TPersistent);\r\nbegin\r\n inherited Assign(Source);\r\n If Source is TFPBuiltInExprIdentifierDef then\r\n FCategory:=(Source as TFPBuiltInExprIdentifierDef).Category;\r\nend;\r\n\r\nprocedure InitFileFormatSettings;\r\nbegin\r\n FileFormatSettings := FormatSettings;\r\n FileFormatSettings.DecimalSeparator := '.';\r\n FileFormatSettings.DateSeparator := '-';\r\n FileFormatSettings.TimeSeparator := ':';\r\n FileFormatsettings.ShortDateFormat := 'yyyy-mm-dd';\r\n FileFormatSettings.LongTimeFormat := 'hh:nn:ss';\r\nend;\r\n\r\ninitialization\r\n L10:=Ln(10);\r\n RegisterStdBuiltins(BuiltinIdentifiers);\r\n InitFileFormatSettings;\r\n\r\nend.\r\n","{\r\n This file is part of the Free Pascal run time library.\r\n Copyright (c) 2019 by Michael Van Canneyt, member of the\r\n Free Pascal development team\r\n\r\n Simple JSON dataset component.\r\n\r\n See the file COPYING.FPC, included in this distribution,\r\n for details about the copyright.\r\n\r\n This program is distributed in the hope that it will be useful,\r\n but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\r\n\r\n **********************************************************************}\r\n{$IFNDEF FPC_DOTTEDUNITS}\r\nunit JSONDataset;\r\n{$ENDIF}\r\n\r\n{$mode objfpc}\r\n\r\ninterface\r\n\r\nuses\r\n{$IFDEF FPC_DOTTEDUNITS}\r\n System.Types, JSApi.JS, Data.DB, System.Classes, System.SysUtils, System.Typinfo, Fcl.Expressions;\r\n{$ELSE}\r\n Types, JS, DB, Classes, SysUtils, typinfo, fpexprpars;\r\n{$ENDIF}\r\n\r\ntype\r\n TBaseJSONDataset = Class;\r\n TJSONIndexDef = class;\r\n\r\n // How are rows encoded in the JSON ?\r\n TJSONRowType = (rtJSONObject, // Each row is an object.\r\n rtJSONArray // Each row is an array.\r\n );\r\n\r\n { TJSONFieldMapper }\r\n // This class is responsible for mapping the field objects of the records.\r\n TJSONFieldMapper = Class(TObject)\r\n Public\r\n Function CopyRow(aRow : JSValue) : JSValue; virtual;\r\n // Remove a field from the\r\n Procedure RemoveField(Const FieldName : String; FieldIndex : Integer; Row : JSValue); virtual; abstract;\r\n // Return row TJSONData instance with data for field 'FieldName' or 'FieldIndex'.\r\n Function GetJSONDataForField(Const FieldName : String; FieldIndex : Integer; Row : JSValue) : JSValue; virtual; abstract;\r\n // Same, but now based on TField.\r\n Function GetJSONDataForField(F : TField; Row : JSValue) : JSValue; virtual;\r\n // Set data for field 'FieldName' or 'FieldIndex' to supplied TJSONData instance in row\r\n procedure SetJSONDataForField(Const FieldName : String; FieldIndex : Integer; Row,Data : JSValue); virtual; abstract;\r\n // Set data for field TField to supplied TJSONData instance\r\n procedure SetJSONDataForField(F : TField; Row,Data : JSValue); virtual;\r\n // Create a new row.\r\n Function CreateRow : JSValue; virtual; abstract;\r\n end;\r\n\r\n // JSON has no date/time type, so we use a string field.\r\n // ExtJS provides the date/time format in it's field config: 'dateFormat'\r\n // The below field classes store this in the NNNFormat field.\r\n { TJSONDateField }\r\n\r\n TJSONDateField = Class(TDateField)\r\n private\r\n FDateFormat: String;\r\n Published\r\n Property DateFormat : String Read FDateFormat Write FDateFormat;\r\n end;\r\n\r\n { TJSONTimeField }\r\n\r\n TJSONTimeField = Class(TTimeField)\r\n private\r\n FTimeFormat: String;\r\n Published\r\n Property TimeFormat : String Read FTimeFormat Write FTimeFormat;\r\n end;\r\n\r\n { TJSONDateTimeField }\r\n\r\n TJSONDateTimeField = Class(TDateTimeField)\r\n private\r\n FDateTimeFormat: String;\r\n Published\r\n Property DateTimeFormat : String Read FDateTimeFormat Write FDateTimeFormat;\r\n end;\r\n\r\n { TFieldComparer }\r\n\r\n TFieldComparer = Class\r\n Private\r\n FDesc: Boolean;\r\n FValue : JSValue;\r\n FField : TField;\r\n FOptions : TLocateOptions;\r\n FDataset : TBaseJSONDataset;\r\n Public\r\n Constructor Create(aDataset : TBaseJSONDataset; aField : TField; aValue : JSValue; aOptions : TLocateOptions);\r\n Function GetFieldValue(RowIndex : integer) : JSValue;\r\n Function CompareRows (RowIndex1,RowIndex2 : Integer) : Integer; virtual;\r\n // First value is always dataset value.\r\n Function Compare (RowIndex : Integer; aValue : JSValue) : Integer; virtual; abstract;\r\n Function Compare (RowIndex : Integer) : Integer; virtual;\r\n Property Value : JSValue read FValue Write FValue;\r\n Property Options : TLocateOptions Read FOptions Write FOptions;\r\n Property Dataset : TBaseJSONDataset Read FDataset;\r\n Property Field : TField Read FField;\r\n Property Desc : Boolean Read FDesc Write FDesc;\r\n end;\r\n TFieldComparerClass = Class of TFieldComparer;\r\n\r\n { TStringFieldComparer }\r\n\r\n TStringFieldComparer = Class (TFieldComparer)\r\n Function Compare (RowIndex : Integer; aValue : JSValue) : Integer; override;\r\n end;\r\n\r\n { TNativeIntFieldComparer }\r\n\r\n TNativeIntFieldComparer = Class (TFieldComparer)\r\n Function Compare (RowIndex : Integer; aValue : JSValue) : Integer; override;\r\n end;\r\n\r\n { TBooleanFieldComparer }\r\n\r\n TBooleanFieldComparer = Class (TFieldComparer)\r\n Function Compare (RowIndex : Integer; aValue : JSValue) : Integer; override;\r\n end;\r\n\r\n { TDateTimeFieldComparer }\r\n\r\n TDateTimeFieldComparer = Class (TFieldComparer)\r\n Function Compare (RowIndex : Integer; aValue : JSValue) : Integer; override;\r\n end;\r\n\r\n { TFloatFieldComparer }\r\n\r\n TFloatFieldComparer = Class (TFieldComparer)\r\n Function Compare (RowIndex : Integer; aValue : JSValue) : Integer; override;\r\n end;\r\n\r\n { TRecordComparer }\r\n\r\n TRecordComparer = class\r\n private\r\n FDataset: TBaseJSONDataset;\r\n FIndexBased: Boolean;\r\n FItems : Array of TFieldComparer;\r\n FOptions: TLocateOptions;\r\n FValues: TJSValueDynArray;\r\n function GetFieldComparer(Index : Integer): TFieldComparer;\r\n Protected\r\n procedure ConstructItems(aFields: String); virtual;\r\n function DataTypeToComparerClass(aFieldType: TFieldType): TFieldComparerClass;\r\n Function Compare(aRowindex : integer) : Integer;\r\n Function CompareRows(aRowindex1,aRowIndex2 : integer) : Integer;\r\n procedure updateFromIndex(aIndex : TJSONIndexDef); virtual;\r\n Public\r\n Constructor Create(aDataset : TBaseJSONDataset; aFields : String; aValues : JSValue; aOptions : TLocateOptions);\r\n Constructor Create(aDataset : TBaseJSONDataset; aIndex : TJSONIndexDef);\r\n Destructor Destroy; override;\r\n Property Dataset : TBaseJSONDataset Read FDataset;\r\n property Items [Index : Integer] : TFieldComparer Read GetFieldComparer;\r\n Property Options : TLocateOptions Read FOptions Write FOptions;\r\n Property Values : TJSValueDynArray Read FValues;\r\n Property IndexBased : Boolean Read FIndexBased;\r\n end;\r\n TRecordComparerClass = Class of TRecordComparer;\r\n\r\n { TBaseJSONDataSet }\r\n\r\n { TJSONIndex }\r\n\r\n TJSONIndex = Class\r\n FList : TJSArray; // Indexes of elements in FRows.\r\n FRows : TJSArray;\r\n FDataset : TBaseJSONDataset;\r\n private\r\n function GetRecordIndex(aListIndex : Integer): NativeInt;\r\n protected\r\n Function GetCount: Integer; virtual;\r\n Procedure CreateIndex; Virtual; abstract;\r\n Procedure ClearIndex;\r\n Property List : TJSArray Read FList;\r\n Property Rows : TJSArray Read FRows;\r\n Property Dataset : TBaseJSONDataset Read FDataset;\r\n Public\r\n Constructor Create(aDataset: TBaseJSONDataset; aRows : TJSArray); reintroduce;\r\n // Append remainder of FRows to FList.\r\n Procedure AppendToIndex; virtual; abstract;\r\n // Delete aListIndex from list, not from row. Return Recordindex of deleted record.\r\n Function Delete(aListIndex : Integer) : Integer; virtual;\r\n // Delete By rowIndex, Return list index of deleted record.\r\n Function DeleteByRowIndex(aRowIndex : Integer) : Integer; virtual;\r\n // Append aRecordIndex to list. Return ListIndex of appended record.\r\n Function Append(aRecordIndex : Integer) : Integer; virtual; abstract;\r\n // Insert record into list. By default, this does an append. Return ListIndex of inserted record\r\n Function Insert(aCurrentIndex{%H-}, aRecordIndex : Integer) : Integer; virtual;\r\n // Record at index aCurrentIndex has changed. Update index and return new listindex.\r\n Function Update(aRecordIndex : Integer) : Integer; virtual; abstract;\r\n // Find list index for Record at index aCurrentIndex. Return -1 if not found.\r\n Function FindRecord(aRecordIndex : Integer) : Integer; virtual; abstract;\r\n // index of record in index list, based on Row index.\r\n Function IndexOfRow(aRowIndex : Integer): NativeInt;\r\n // index of record in FRows based on aListIndex in List.\r\n Property RecordIndex[aListIndex : Integer] : NativeInt Read GetRecordIndex;\r\n // Number of records in index. This can differ from FRows, e.g. when filtering.\r\n Property Count : Integer Read GetCount;\r\n end;\r\n\r\n { TDefaultJSONIndex }\r\n\r\n TDefaultJSONIndex = Class(TJSONIndex)\r\n public\r\n Procedure CreateIndex; override;\r\n Procedure AppendToIndex; override;\r\n Function Append(aRecordIndex : Integer) : Integer; override;\r\n Function Insert(aCurrentIndex, aRecordIndex : Integer) : Integer; override;\r\n Function FindRecord(aRecordIndex : Integer) : Integer; override;\r\n Function Update(aRecordIndex : Integer) : Integer; override;\r\n end;\r\n\r\n { TSortedJSONIndex }\r\n\r\n TSortedJSONIndex = Class(TJSONIndex)\r\n Private\r\n FComparer : TRecordComparer;\r\n FUnique: Boolean;\r\n function FindPos(aRecordIndex: Integer): Integer;\r\n function MergeSort(aList: TJSArray): TJSArray;\r\n Protected\r\n Property Comparer : TRecordComparer Read FComparer Write FComparer;\r\n public\r\n Destructor Destroy; override;\r\n procedure CreateComparer(aIndex: TJSONIndexDef);\r\n Procedure CreateIndex; override;\r\n Procedure AppendToIndex; override;\r\n Function Append(aRecordIndex : Integer) : Integer; override;\r\n Function FindRecord(aRecordIndex : Integer) : Integer; override;\r\n Function Update(aRecordIndex : Integer) : Integer; override;\r\n Property Unique : Boolean Read FUnique Write FUnique;\r\n end;\r\n\r\n { TJSONIndexDef }\r\n\r\n TJSONIndexDef = class(TIndexDef)\r\n Private\r\n FIndex : TSortedJSONIndex;\r\n Protected\r\n Procedure ClearIndex;\r\n Property Index : TSortedJSONIndex Read FIndex Write FIndex;\r\n Public\r\n Procedure BuildIndex(aDataset : TBaseJSONDataset);\r\n end;\r\n\r\n { TJSONIndexDefs }\r\n\r\n TJSONIndexDefs = Class(TIndexDefs)\r\n private\r\n function GetD(aIndex : Integer): TJSONIndexDef;\r\n procedure SetD(aIndex : Integer; AValue: TJSONIndexDef);\r\n Public\r\n Function AddJSONIndexDef: TJSONIndexDef;\r\n Property Defs[aIndex : Integer] : TJSONIndexDef Read GetD Write SetD; default;\r\n end;\r\n\r\n TBlobFormat = (bfHex, bfBase64, bfBytes, bfCustom);\r\n TBlobFormats = Set of TBlobFormat;\r\n\r\n TOnDecodeBlobBytesEvent = Procedure (Sender : TDataset; aValue : JSValue; var aData : TBytes) of object;\r\n TOnEncodeBlobBytesEvent = Procedure (Sender : TDataset; aData : TBytes; var aValue : JSValue) of object;\r\n\r\n // basic JSON dataset. Does nothing ExtJS specific.\r\n TBaseJSONDataSet = class (TDataSet)\r\n private\r\n FActiveIndex: String;\r\n FBlobFormat: TBlobFormat;\r\n FIndexes: TJSONIndexDefs;\r\n FMUS: Boolean;\r\n FOnDecodeBlobValue: TOnDecodeBlobBytesEvent;\r\n FOnEncodeBlobValue: TOnEncodeBlobBytesEvent;\r\n FOwnsData : Boolean;\r\n FDefaultIndex : TJSONIndex; // Default index, built from array\r\n FCurrentIndex : TJSONIndex; // Currently active index.\r\n FCurrent: Integer; // Record Index in the current IndexList\r\n // Possible metadata to configure fields from.\r\n FMetaData : TJSObject;\r\n // This will contain the rows.\r\n FRows : TJSArray;\r\n // Deleted rows\r\n FDeletedRows : TJSArray;\r\n FFieldMapper : TJSONFieldMapper;\r\n // When editing, this object is edited.\r\n FEditIdx : Integer;\r\n FEditRow : JSValue;\r\n // When filtering, this is the current row;\r\n FFilterRow : JSValue;\r\n FUseDateTimeFormatFields: Boolean;\r\n FRowType: TJSONRowType;\r\n FFilterExpression : TFPExpressionParser;\r\n function GetFilterField(const AName: String): TFPExpressionResult;\r\n procedure SetActiveIndex(AValue: String);\r\n procedure SetIndexes(AValue: TJSONIndexDefs);\r\n procedure SetMetaData(AValue: TJSObject);\r\n procedure SetRows(AValue: TJSArray);\r\n procedure SetRowType(AValue: TJSONRowType);\r\n protected\r\n // Remove calculated fields from buffer\r\n procedure RemoveCalcFields(Buf: JSValue);\r\n procedure ActivateIndex(Build : Boolean);\r\n // Determine filter value type based on field type\r\n function FieldTypeToExpressionType(aDataType: TFieldType): TResultType; virtual;\r\n // Callback for IsNull filter function.\r\n function GetFilterIsNull(const Args: TExprParameterArray): TFPExpressionResult; virtual;\r\n // Expression parser class. Override this to create a customized version.\r\n function FilterExpressionClass: TFPExpressionParserClass; virtual;\r\n // Create filter expression.\r\n function CreateFilterExpression: TFPExpressionParser; virtual;\r\n // Function called to check if current buffer should be accepted.\r\n function DoFilterRecord: Boolean; virtual;\r\n // Override this to return customized version.\r\n function CreateIndexDefs: TJSONIndexDefs; virtual;\r\n // override this to return a customized version if you are so inclined\r\n function RecordComparerClass: TRecordComparerClass; virtual;\r\n // Return index of Row in FRows matching keyfields/values. If not found, -1 is returned.\r\n function LocateRecordIndex(const KeyFields: string; const KeyValues: JSValue; Options: TLocateOptions): Integer; virtual;\r\n // dataset virtual methods\r\n function AllocRecordBuffer: TDataRecord; override;\r\n procedure FreeRecordBuffer(var Buffer: TDataRecord); override;\r\n procedure InternalInitRecord(var Buffer: TDataRecord); override;\r\n function GetRecord(Var Buffer: TDataRecord; GetMode: TGetMode; DoCheck{%H-}: Boolean): TGetResult; override;\r\n function GetRecordSize: Word; override;\r\n procedure AddToRows(AValue: TJSArray);\r\n procedure InternalClose; override;\r\n procedure InternalDelete; override;\r\n procedure InternalFirst; override;\r\n procedure InternalLast; override;\r\n procedure InternalOpen; override;\r\n procedure InternalPost; override;\r\n procedure InternalInsert; override;\r\n procedure InternalEdit; override;\r\n procedure InternalCancel; override;\r\n procedure InternalInitFieldDefs; override;\r\n procedure InternalSetToRecord(Buffer: TDataRecord); override;\r\n procedure SetFilterText(const Value: string); override;\r\n procedure SetFiltered(Value: Boolean); override;\r\n function GetFieldClass(FieldType: TFieldType): TFieldClass; override;\r\n Function GetApplyUpdateData(Buffer : TDataRecord) : JSValue; override;\r\n function IsCursorOpen: Boolean; override;\r\n // Bookmark operations\r\n procedure GetBookmarkData(Buffer: TDataRecord; var Data: TBookmark); override;\r\n function GetBookmarkFlag(Buffer: TDataRecord): TBookmarkFlag; override;\r\n procedure InternalGotoBookmark(ABookmark: TBookmark); override;\r\n procedure SetBookmarkFlag(Var Buffer: TDataRecord; Value: TBookmarkFlag); override;\r\n procedure SetBookmarkData(Var Buffer: TDataRecord; Data: TBookmark); override;\r\n function GetRecordCount: Integer; override;\r\n procedure SetRecNo(Value: Integer); override;\r\n function GetRecNo: Integer; override;\r\n Protected\r\n // New methods.\r\n // Build all sorted indexes. Default index is not built.\r\n Procedure BuildIndexes;\r\n // Called when dataset is closed. If OwnsData is true, metadata and rows are freed.\r\n Procedure FreeData; virtual;\r\n // Fill default list.\r\n procedure AppendToIndexes; virtual;\r\n procedure Clone(Source: TBaseJSONDataSet);\r\n\r\n Procedure CreateIndexes; virtual;\r\n // Convert MetaData object to FieldDefs.\r\n Procedure MetaDataToFieldDefs; virtual;\r\n // Initialize Date/Time info in all date/time fields. Called during InternalOpen\r\n procedure InitDateTimeFields; virtual;\r\n // Convert JSON date S to DateTime for Field F\r\n function ConvertDateTimeField(S: String; F: TField): TDateTime; virtual;\r\n // Format JSON date to from DT for Field F\r\n function FormatDateTimeField(DT : TDateTime; F: TField): String; virtual;\r\n // Create fieldmapper. A descendent MUST implement this.\r\n Function CreateFieldMapper : TJSONFieldMapper; virtual;\r\n // If True, then the dataset will free MetaData and FRows when it is closed.\r\n Property OwnsData : Boolean Read FownsData Write FOwnsData;\r\n // set to true if unknown field types should be handled as string fields.\r\n Property MapUnknownToStringType : Boolean Read FMUS Write FMUS;\r\n // Metadata\r\n Property MetaData : TJSObject Read FMetaData Write SetMetaData;\r\n // Rows\r\n Property Rows : TJSArray Read FRows Write SetRows;\r\n // RowType\r\n Property RowType : TJSONRowType Read FRowType Write SetRowType;\r\n // Fieldmapper\r\n Property FieldMapper : TJSONFieldMapper Read FFieldMapper;\r\n // FieldClass\r\n Property UseDateTimeFormatFields : Boolean Read FUseDateTimeFormatFields Write FUseDateTimeFormatFields;\r\n // Indexes\r\n Property Indexes : TJSONIndexDefs Read FIndexes Write SetIndexes;\r\n // Active index name. Set to empty for default index.\r\n Property ActiveIndex : String Read FActiveIndex Write SetActiveIndex;\r\n // Blob format returned by server\r\n Property BlobFormat : TBlobFormat Read FBlobFormat Write FBlobFormat;\r\n // Called when BlobFormat is custom to decode incoming server data to TBytes\r\n Property OnDecodeBlobValue : TOnDecodeBlobBytesEvent Read FOnDecodeBlobValue Write FOnDecodeBlobValue;\r\n // Called when BlobFormat is custom to encode TBytes to server data.\r\n Property OnEncodeBlobValue : TOnEncodeBlobBytesEvent Read FOnEncodeBlobValue Write FOnEncodeBlobValue;\r\n public\r\n constructor Create (AOwner: TComponent); override;\r\n destructor Destroy; override;\r\n Function BlobDataToBytes(aValue : JSValue) : TBytes; override;\r\n Function BytesToBlobData(aValue : TBytes) : JSValue ; override;\r\n function ConvertDateTimeToNative(aField : TField; aValue : TDateTime) : JSValue; override;\r\n function Locate(const KeyFields: string; const KeyValues: JSValue; Options: TLocateOptions): boolean; override;\r\n function Lookup(const KeyFields: string; const KeyValues: JSValue; const ResultFields: string): JSValue; override;\r\n function GetFieldData(Field: TField; Buffer: TDatarecord): JSValue; override;\r\n procedure SetFieldData(Field: TField; var Buffer{%H-}: TDatarecord; AValue : JSValue); override;\r\n function GetClonedDataSet(WithSettings: Boolean): TDataSet; override;\r\n function BookmarkValid(ABookmark: TBookmark): Boolean; override;\r\n function CompareBookmarks(Bookmark1, Bookmark2: TBookmark): Longint; override;\r\n end;\r\n\r\n TJSONDataset = Class(TBaseJSONDataset)\r\n published\r\n Property FieldDefs;\r\n Property RowType;\r\n Property UseDateTimeFormatFields;\r\n Property Indexes;\r\n Property ActiveIndex;\r\n property Active;\r\n property BeforeOpen;\r\n property AfterOpen;\r\n property BeforeClose;\r\n property AfterClose;\r\n property BeforeInsert;\r\n property AfterInsert;\r\n property BeforeEdit;\r\n property AfterEdit;\r\n property BeforePost;\r\n property AfterPost;\r\n property BeforeCancel;\r\n property AfterCancel;\r\n property BeforeDelete;\r\n property AfterDelete;\r\n property BeforeScroll;\r\n property AfterScroll;\r\n property OnCalcFields;\r\n property OnDeleteError;\r\n property OnEditError;\r\n property OnFilterRecord;\r\n property OnNewRecord;\r\n property OnPostError;\r\n Property OnRecordResolved;\r\n property OnLoadFail;\r\n Property BlobFormat;\r\n Property OnDecodeBlobValue;\r\n Property OnEncodeBlobValue;\r\n end;\r\n\r\n { TJSONObjectFieldMapper }\r\n // Fieldmapper to be used when the data is in an object\r\n TJSONObjectFieldMapper = Class(TJSONFieldMapper)\r\n Public\r\n Procedure RemoveField(Const FieldName : String; FieldIndex{%H-} : Integer; Row : JSValue); override;\r\n procedure SetJSONDataForField(Const FieldName : String; FieldIndex{%H-} : Integer; Row,Data : JSValue); override;\r\n Function GetJSONDataForField(Const FieldName : String; FieldIndex{%H-} : Integer; Row : JSValue) : JSValue; override;\r\n Function CreateRow : JSValue; override;\r\n end;\r\n\r\n { TJSONArrayFieldMapper }\r\n // Fieldmapper to be used when the data is in an array\r\n TJSONArrayFieldMapper = Class(TJSONFieldMapper)\r\n Public\r\n Procedure RemoveField(Const FieldName{%H-} : String; FieldIndex : Integer; Row : JSValue); override;\r\n procedure SetJSONDataForField(Const FieldName{%H-} : String; FieldIndex : Integer; Row,Data : JSValue); override;\r\n Function GetJSONDataForField(Const FieldName{%H-} : String; FieldIndex : Integer; Row : JSValue) : JSValue; override;\r\n Function CreateRow : JSValue; override;\r\n end;\r\n\r\n EJSONDataset = Class(EDatabaseError);\r\n \r\nimplementation\r\n\r\nuses\r\n{$IFDEF FPC_DOTTEDUNITS}\r\n System.DateUtils;\r\n{$ELSE}\r\n DateUtils;\r\n{$ENDIF}\r\n\r\nFunction atob (s : String) : string; external name 'atob';\r\nFunction btoa (s : String) : string; external name 'btoa';\r\n\r\n{ TJSONIndexDef }\r\n\r\nprocedure TJSONIndexDef.ClearIndex;\r\nbegin\r\n FreeAndNil(FIndex);\r\nend;\r\n\r\nprocedure TJSONIndexDef.BuildIndex(aDataset : TBaseJSONDataset);\r\n\r\nbegin\r\n if Findex=Nil then\r\n FIndex:=TSortedJSONIndex.Create(aDataset,aDataset.Rows)\r\n else\r\n FIndex.ClearIndex;\r\n FIndex.CreateComparer(Self);\r\n FIndex.CreateIndex;\r\nend;\r\n\r\n{ TJSONIndexDefs }\r\n\r\nfunction TJSONIndexDefs.GetD(aIndex : Integer): TJSONIndexDef;\r\nbegin\r\n Result:=Items[aIndex] as TJSONIndexDef;\r\nend;\r\n\r\nprocedure TJSONIndexDefs.SetD(aIndex : Integer; AValue: TJSONIndexDef);\r\nbegin\r\n Items[aIndex]:=aValue;\r\nend;\r\n\r\nfunction TJSONIndexDefs.AddJSONIndexDef: TJSONIndexDef;\r\nbegin\r\n Result:=Add as TJSONIndexDef;\r\nend;\r\n\r\n{ TSortedJSONIndex }\r\n\r\nFunction TSortedJSONIndex.MergeSort(aList : TJSArray) : TJSArray;\r\n\r\nVar\r\n temp : TJSArray;\r\n l,p,q,e,tail : integer;\r\n insize, nmerges, psize, qsize : Integer;\r\n\r\nbegin\r\n if aList=Nil then\r\n Exit(Nil);\r\n L:=aList.length;\r\n Result:=TJSArray.new(l);\r\n if L=0 then exit;\r\n insize:=1;\r\n Repeat\r\n p:=0;\r\n Tail:=0;\r\n nmerges := 0; // count number of merges we do in this pass\r\n while (p0) or ((qsize > 0) and (Q=L)) then\r\n begin // * q is empty; e must come from p. */\r\n e := p; Inc(p); Dec(psize);\r\n end\r\n else if (FComparer.CompareRows(Integer(aList[p]),Integer(aList[q])) <= 0) then\r\n begin // * First element of p is lower (or same); * e must come from p. */\r\n e:=p; inc(p); Dec(psize);\r\n end\r\n else\r\n begin // * First element of q is lower; e must come from q. */\r\n e := q; Inc(q); Dec(qsize);\r\n end;\r\n Result[Tail]:=aList[e];\r\n Inc(tail);\r\n end;\r\n p:=q;\r\n end;\r\n // * If we have done only one merge, we're finished. */\r\n if (nmerges <= 1) then //* allow for nmerges==0, the empty list case */\r\n exit;\r\n // * Otherwise repeat, merging lists twice the size */\r\n InSize:=Insize * 2;\r\n // Swap lists for next round.\r\n Temp:=Result;\r\n Result:=aList;\r\n aList:=Temp;\r\n until false;\r\nend;\r\n\r\ndestructor TSortedJSONIndex.Destroy;\r\nbegin\r\n FreeAndNil(FComparer);\r\n Inherited;\r\nend;\r\n\r\nprocedure TSortedJSONIndex.CreateComparer(aIndex: TJSONIndexDef);\r\nbegin\r\n FreeAndNil(FComparer);\r\n FComparer:=TRecordComparer.Create(Dataset,aindex);\r\nend;\r\n\r\nprocedure TSortedJSONIndex.CreateIndex;\r\n\r\nVar\r\n Lst : Array of Integer;\r\n I,SrcLen,Destlen : Integer;\r\nbegin\r\n // CreateIndex is called during constructor. We cannot build index then, so we exit\r\n if FComparer=Nil then\r\n exit;\r\n SrcLen:=FRows.Length;\r\n // Temp list, mergsort destroys list\r\n SetLength(Lst,SrcLen);\r\n DestLen:=0;\r\n For I:=0 to SrcLen-1 do\r\n begin\r\n if not isUndefined(FRows[I]) then\r\n begin\r\n Lst[DestLen]:=I;\r\n Inc(DestLen);\r\n end;\r\n end;\r\n SetLength(Lst,DestLen);\r\n FList:=MergeSort(TJSArray(Lst));\r\nend;\r\n\r\nprocedure TSortedJSONIndex.AppendToIndex;\r\nbegin\r\n // In theory, we could sort the rest of the list, and then merge the 2 sublists.\r\n CreateIndex;\r\nend;\r\n\r\nfunction TSortedJSONIndex.FindPos(aRecordIndex: Integer): Integer;\r\n\r\nVar\r\n L,R,I, CompareRes : Integer;\r\n\r\nbegin\r\n if not Assigned(FComparer) then\r\n exit;\r\n L := 0;\r\n R := Count - 1;\r\n while (L<=R) do\r\n begin\r\n I := L + (R - L) div 2;\r\n CompareRes := FComparer.CompareRows(aRecordIndex, Integer(Flist[I]));\r\n if (CompareRes>0) then\r\n L := I+1\r\n else\r\n begin\r\n R := I-1;\r\n if (CompareRes=0) then\r\n begin\r\n if Unique then\r\n L := I; // forces end of while loop\r\n end;\r\n end;\r\n end;\r\n Result:=L;\r\nend;\r\n\r\nfunction TSortedJSONIndex.Append(aRecordIndex: Integer): Integer;\r\n\r\n\r\nbegin\r\n Result:=FindPos(aRecordIndex);\r\n // insert in list\r\n FList.Splice(Result,0,aRecordIndex);\r\nend;\r\n\r\n\r\nfunction TSortedJSONIndex.FindRecord(aRecordIndex: Integer): Integer;\r\nbegin\r\n Result:=FList.indexOf(aRecordIndex);\r\nend;\r\n\r\nfunction TSortedJSONIndex.Update(aRecordIndex: Integer): Integer;\r\n\r\nVar\r\n aCurrentIndex : Integer;\r\n\r\nbegin\r\n // Old pos\r\n aCurrentIndex:=FindRecord(aRecordIndex);\r\n // New pos\r\n Result:=FindPos(aRecordIndex);\r\n if Result<>aCurrentIndex then\r\n FList.Splice(Result,0,FList.Splice(aCurrentIndex,1)[0])\r\nend;\r\n\r\n{ TFloatFieldComparer }\r\n\r\nfunction TFloatFieldComparer.Compare(RowIndex: Integer; aValue: JSValue): Integer;\r\nvar\r\n D1,D2 : Double;\r\n\r\nbegin\r\n D1:=Double(GetFieldValue(Rowindex));\r\n D2:=Double(aValue);\r\n Result:=Round(D1-D2);\r\nend;\r\n\r\n{ TDateTimeFieldComparer }\r\n\r\nfunction TDateTimeFieldComparer.Compare(RowIndex: Integer; aValue: JSValue): Integer;\r\n\r\nvar\r\n D1,D2 : TDateTime;\r\n\r\n Function ToDate(v: JSValue) : TDateTime;\r\n\r\n begin\r\n if IsDate(v) then\r\n Result:= JSDateToDateTime(TJSDate(v))\r\n else\r\n Result:=Dataset.ConvertDateTimeField(String(v),Self.Field);\r\n end;\r\n\r\nbegin\r\n D1:=ToDate(GetFieldValue(RowIndex));\r\n D2:=ToDate(aValue);\r\n Result:=Round(D1-D2);\r\nend;\r\n\r\n{ TBooleanFieldComparer }\r\n\r\nfunction TBooleanFieldComparer.Compare(RowIndex: Integer; aValue: JSValue): Integer;\r\n\r\nvar\r\n B1,B2 : Boolean;\r\n\r\nbegin\r\n B1:=Boolean(GetFieldValue(Rowindex));\r\n B2:=Boolean(aValue);\r\n Result:=Ord(B1)-Ord(B2);\r\nend;\r\n\r\n{ TNativeIntFieldComparer }\r\n\r\nfunction TNativeIntFieldComparer.Compare(RowIndex: Integer; aValue: JSValue): Integer;\r\n\r\nvar\r\n I1,I2 : NativeInt;\r\n\r\nbegin\r\n I1:=NativeInt(GetFieldValue(Rowindex));\r\n I2:=NativeInt(aValue);\r\n Result:=I1-I2;\r\nend;\r\n\r\n{ TStringFieldComparer }\r\n\r\nfunction TStringFieldComparer.Compare(RowIndex: Integer; aValue: JSValue): Integer;\r\n\r\nvar\r\n S1,S2 : String;\r\n\r\nbegin\r\n S1:=String(GetFieldValue(Rowindex));\r\n S2:=String(aValue);\r\n if loPartialKey in Options then\r\n S1:=Copy(S1,1,Length(S2));\r\n if loCaseInsensitive in options then\r\n Result := CompareText(S1,S2)\r\n else\r\n Result := CompareStr(S1,S2);\r\nend;\r\n\r\n{ TFieldComparer }\r\n\r\nconstructor TFieldComparer.Create(aDataset: TBaseJSONDataset; aField: TField; aValue: JSValue; aOptions: TLocateOptions);\r\n\r\nbegin\r\n FField:=AField;\r\n FValue:=aValue;\r\n FOptions:=aOptions;\r\n FDataset:=aDataset;\r\nend;\r\n\r\nfunction TFieldComparer.GetFieldValue(RowIndex: integer): JSValue;\r\nbegin\r\n Result:=FDataset.FieldMapper.GetJSONDataForField(FField,FDataset.FRows[Rowindex]);\r\nend;\r\n\r\nfunction TFieldComparer.CompareRows(RowIndex1, RowIndex2: Integer): Integer;\r\nbegin\r\n Result:=Compare(RowIndex1,GetFieldValue(RowIndex2));\r\nend;\r\n\r\nfunction TFieldComparer.Compare(RowIndex: Integer): Integer;\r\nbegin\r\n Result:=Compare(RowIndex,FValue);\r\nend;\r\n\r\n{ TRecordComparer }\r\n\r\nfunction TRecordComparer.GetFieldComparer(Index: Integer): TFieldComparer;\r\nbegin\r\n if (Index<0) or (Index>=Length(Fitems)) then\r\n Raise EListError.CreateFmt('Index out of bounds: %d not in [%d,%d]',[Index,0,Length(Fitems)-1]);\r\n Result:=Items[Index];\r\nend;\r\n\r\nprocedure TRecordComparer.ConstructItems(aFields : String);\r\n\r\nVar\r\n L : TFPlist;\r\n FCC : TFieldComparerClass;\r\n F : TField;\r\n I : Integer;\r\n\r\n\r\nbegin\r\n L:=TFPList.Create;\r\n try\r\n Dataset.GetFieldList(L,aFields);\r\n if Not Indexbased and (L.Count<>Length(FValues)) then\r\n Raise EDatabaseError.CreateFmt('Array of values has different length (%d) from array of fields (%d)',[Length(FValues), L.Count]);\r\n SetLength(FItems,L.Count);\r\n For I:=0 to L.Count-1 do\r\n begin\r\n F:=TField(L[i]);\r\n FCC:=DataTypeToComparerClass(F.DataType);\r\n If FCC=Nil then\r\n Raise EDatabaseError.CreateFmt('Cannot locate on field %s of type %s)',[F.FieldName,GetEnumName(TypeInfo(TFieldType),Ord(F.DataType))]);\r\n if IndexBased then\r\n Fitems[i]:=FCC.Create(FDataset,F,Null,FOptions)\r\n else\r\n Fitems[i]:=FCC.Create(FDataset,F,FValues[i],FOptions);\r\n end;\r\n finally\r\n L.Free;\r\n end;\r\nend;\r\n\r\nfunction TRecordComparer.DataTypeToComparerClass(aFieldType: TFieldType): TFieldComparerClass;\r\n\r\nbegin\r\n Case aFieldType of\r\n ftMemo, ftFixedChar,ftString :\r\n Result:=TStringFieldComparer;\r\n ftAutoInc, ftInteger, ftLargeInt:\r\n Result:=TNativeIntFieldComparer;\r\n ftBoolean:\r\n Result:=TBooleanFieldComparer;\r\n ftFloat:\r\n Result:=TFloatFieldComparer;\r\n ftDate, ftTime, ftDateTime:\r\n Result:=TDateTimeFieldComparer;\r\n else\r\n result:=Nil;\r\n end;\r\nend;\r\n\r\nfunction TRecordComparer.Compare(aRowindex: integer): Integer;\r\n\r\nVar\r\n I,L : Integer;\r\n\r\nbegin\r\n Result:=0;\r\n I:=0;\r\n L:=Length(FItems);\r\n While (Result=0) and (I0) and Fitems[i].Desc then\r\n Result:=-Result;\r\n Inc(I);\r\n end;\r\nend;\r\n\r\nprocedure TRecordComparer.updateFromIndex(aIndex: TJSONIndexDef);\r\n\r\nVar\r\n L : TFPList;\r\n I : Integer;\r\n\r\nbegin\r\n L:=TFPList.Create;\r\n try\r\n if (aIndex.CaseInsFields<>'') then\r\n begin\r\n Dataset.GetFieldList(L,aIndex.CaseInsFields);\r\n for I:=0 to Length(FItems)-1 do\r\n if L.IndexOf(FItems[i].Field)<>-1 then\r\n Fitems[i].Options:=Fitems[i].Options+[loCaseInsensitive];\r\n end;\r\n L.Clear;\r\n Dataset.GetFieldList(L,aIndex.DescFields);\r\n for I:=0 to Length(FItems)-1 do\r\n Fitems[i].Desc:=(ixDescending in aIndex.Options) or (L.IndexOf(FItems[i].Field)<>-1);\r\n finally\r\n L.Free;\r\n end;\r\nend;\r\n\r\nconstructor TRecordComparer.Create(aDataset: TBaseJSONDataset; aFields: String; aValues: JSValue; aOptions: TLocateOptions);\r\nbegin\r\n FDataset:=aDataset;\r\n if isArray(aValues) then\r\n FValues:=TJSValueDynArray(aValues)\r\n else\r\n begin\r\n SetLength(FValues,1);\r\n FValues[0]:=Avalues;\r\n end;\r\n Foptions:=aOptions;\r\n ConstructItems(aFields);\r\nend;\r\n\r\nconstructor TRecordComparer.Create(aDataset: TBaseJSONDataset; aIndex: TJSONIndexDef);\r\nbegin\r\n FDataset:=aDataset;\r\n FIndexBased:=True;\r\n if ixCaseInsensitive in aIndex.Options then\r\n FOptions:=[loCaseInsensitive];\r\n ConstructItems(aIndex.Fields);\r\n UpdateFromIndex(aIndex);\r\nend;\r\n\r\ndestructor TRecordComparer.Destroy;\r\n\r\nVar\r\n I : Integer;\r\n\r\nbegin\r\n For I:=0 to Length(FItems)-1 do\r\n FItems[i].Free;\r\n inherited Destroy;\r\nend;\r\n\r\n{ TDefaultJSONIndex }\r\n\r\nprocedure TDefaultJSONIndex.CreateIndex;\r\n\r\nVar\r\n I : Integer;\r\n\r\nbegin\r\n For I:=0 to FRows.length-1 do\r\n FList[i]:=I;\r\nend;\r\n\r\nprocedure TDefaultJSONIndex.AppendToIndex;\r\n\r\nVar\r\n I,L : Integer;\r\n\r\nbegin\r\n L:=FList.Length;\r\n FList.Length:=FRows.Length;\r\n For I:=L to FRows.Length-1 do\r\n FList[i]:=I;\r\nend;\r\n\r\nfunction TDefaultJSONIndex.Append(aRecordIndex: Integer): Integer;\r\nbegin\r\n Result:=FList.Push(aRecordIndex)-1;\r\nend;\r\n\r\nfunction TDefaultJSONIndex.Insert(aCurrentIndex, aRecordIndex: Integer\r\n ): Integer;\r\nbegin\r\n FList.splice(aCurrentIndex, 0, aRecordIndex);\r\n Result:=aCurrentIndex;\r\nend;\r\n\r\nfunction TDefaultJSONIndex.FindRecord(aRecordIndex: Integer): Integer;\r\nbegin\r\n Result:=FList.indexOf(aRecordIndex);\r\nend;\r\n\r\nfunction TDefaultJSONIndex.Update(aRecordIndex: Integer\r\n ): Integer;\r\nbegin\r\n Result:=aRecordIndex;\r\nend;\r\n\r\n{ TJSONIndex }\r\n\r\nconstructor TJSONIndex.Create(aDataset: TBaseJSONDataset; aRows: TJSArray);\r\nbegin\r\n FRows:=aRows;\r\n FList:=TJSArray.New(FRows.length);\r\n FDataset:=aDataset;\r\n CreateIndex;\r\nend;\r\n\r\nfunction TJSONIndex.Delete(aListIndex: Integer): Integer;\r\n\r\nVar\r\n a : TJSArray;\r\n\r\nbegin\r\n A:=FList.Splice(aListIndex,1);\r\n If a.Length>0 then\r\n Result:=Integer(A[0])\r\n else\r\n Result:=-1;\r\nend;\r\n\r\nfunction TJSONIndex.DeleteByRowIndex(aRowIndex: Integer): Integer;\r\nbegin\r\n Result:=IndexOfRow(aRowIndex);\r\n if Result<>-1 then\r\n FList.Splice(Result,1);\r\nend;\r\n\r\nfunction TJSONIndex.Insert(aCurrentIndex, aRecordIndex: Integer): Integer;\r\nbegin\r\n Result:=Append(aRecordIndex);\r\nend;\r\n\r\nfunction TJSONIndex.IndexOfRow(aRowIndex: Integer): NativeInt;\r\nbegin\r\n Result:=FList.indexOf(aRowIndex);\r\nend;\r\n\r\nfunction TJSONIndex.GetCount: Integer;\r\nbegin\r\n Result:=FList.Length;\r\nend;\r\n\r\nprocedure TJSONIndex.ClearIndex;\r\nbegin\r\n FList.Length:=0;\r\nend;\r\n\r\nfunction TJSONIndex.GetRecordIndex(aListIndex : Integer): NativeInt;\r\nbegin\r\n if isUndefined(FList[aListIndex]) then\r\n Result:=-1\r\n else\r\n Result:=NativeInt(FList[aListIndex]);\r\nend;\r\n\r\n\r\n\r\n{ TJSONFieldMapper }\r\n\r\nfunction TJSONFieldMapper.CopyRow(aRow: JSValue): JSValue;\r\nbegin\r\n Result:=TJSJSON.parse(TJSJSON.stringify(aRow));\r\nend;\r\n\r\nfunction TJSONFieldMapper.GetJSONDataForField(F: TField; Row: JSValue ): JSValue;\r\nbegin\r\n // This supposes that Index is correct, i.e. the field positions have not been changed.\r\n Result:=GetJSONDataForField(F.FieldName,F.Index,Row);\r\nend;\r\n\r\nprocedure TJSONFieldMapper.SetJSONDataForField(F: TField; Row,Data: JSValue);\r\nbegin\r\n SetJSONDataForField(F.FieldName,F.Index,Row,Data);\r\nend;\r\n\r\n\r\n{ TJSONArrayFieldMapper }\r\n\r\nprocedure TJSONArrayFieldMapper.RemoveField(const FieldName: String; FieldIndex: Integer; Row: JSValue);\r\nbegin\r\n TJSArray(Row).Splice(FieldIndex,1);\r\nend;\r\n\r\nprocedure TJSONArrayFieldMapper.SetJSONDataForField(const FieldName: String;\r\n FieldIndex: Integer; Row, Data: JSValue);\r\nbegin\r\n TJSValueDynArray(Row)[FieldIndex]:=Data;\r\nend;\r\n\r\nfunction TJSONArrayFieldMapper.GetJSONDataForField(const FieldName: String; FieldIndex: Integer; Row: JSValue): JSValue;\r\nbegin\r\n Result:=TJSValueDynArray(Row)[FieldIndex];\r\nend;\r\n\r\nfunction TJSONArrayFieldMapper.CreateRow: JSValue;\r\n\r\nbegin\r\n Result:=TJSArray.New;\r\nend;\r\n\r\n{ TJSONObjectFieldMapper }\r\n\r\nprocedure TJSONObjectFieldMapper.RemoveField(const FieldName: String; FieldIndex: Integer; Row: JSValue);\r\nbegin\r\n jsDelete(Row,FieldName);\r\nend;\r\n\r\nprocedure TJSONObjectFieldMapper.SetJSONDataForField(const FieldName: String;\r\n FieldIndex: Integer; Row, Data: JSValue);\r\nbegin\r\n TJSObject(Row).Properties[FieldName]:=Data;\r\nend;\r\n\r\nfunction TJSONObjectFieldMapper.GetJSONDataForField(const FieldName: String;\r\n FieldIndex: Integer; Row: JSValue): JSValue;\r\nbegin\r\n Result:=TJSObject(Row).Properties[FieldName];\r\nend;\r\n\r\nfunction TJSONObjectFieldMapper.CreateRow: JSValue;\r\nbegin\r\n Result:=TJSObject.New;\r\nend;\r\n\r\nprocedure TBaseJSONDataSet.SetMetaData(AValue: TJSObject);\r\nbegin\r\n CheckInActive;\r\n FMetaData:=AValue;\r\nend;\r\n\r\nprocedure TBaseJSONDataSet.SetIndexes(AValue: TJSONIndexDefs);\r\nbegin\r\n if FIndexes=AValue then Exit;\r\n FIndexes.Assign(aValue);\r\n if Active then\r\n BuildIndexes;\r\nend;\r\n\r\nprocedure TBaseJSONDataSet.SetActiveIndex(AValue: String);\r\n\r\n\r\nbegin\r\n if FActiveIndex=AValue then Exit;\r\n FActiveIndex:=AValue;\r\n if (csLoading in ComponentState) then\r\n exit;\r\n ActivateIndex(Active);\r\nend;\r\n\r\nprocedure TBaseJSONDataSet.ActivateIndex(Build : Boolean);\r\n\r\nVar\r\n Idx : TJSONIndexDef;\r\n\r\nbegin\r\n if (FActiveIndex<>'') then\r\n Idx:=FIndexes.Find(FActiveIndex) as TJSONIndexDef\r\n else\r\n Idx:=nil;\r\n if Idx=Nil then\r\n FCurrentIndex:=FDefaultIndex\r\n else\r\n begin\r\n if (Idx.Index=Nil) and Build then\r\n Idx.BuildIndex(Self);\r\n FCurrentIndex:=Idx.Index;\r\n end;\r\n if Active then\r\n Resync([rmCenter]);\r\nend;\r\n\r\nprocedure TBaseJSONDataSet.AddToRows(AValue: TJSArray);\r\n\r\nbegin\r\n if FRows=Nil then\r\n FRows:=AValue\r\n else\r\n begin\r\n FRows:=FRows.Concat(AValue);\r\n AppendToIndexes;\r\n end;\r\nend;\r\n\r\nprocedure TBaseJSONDataSet.SetRows(AValue: TJSArray);\r\nbegin\r\n if AValue=FRows then exit;\r\n CheckInActive;\r\n FRows:=Nil;\r\n AddToRows(AValue);\r\nend;\r\n\r\nprocedure TBaseJSONDataSet.SetRowType(AValue: TJSONRowType);\r\nbegin\r\n if FRowType=AValue then Exit;\r\n CheckInactive;\r\n FRowType:=AValue;\r\nend;\r\n\r\n\r\n\r\nfunction TBaseJSONDataSet.BlobDataToBytes(aValue: JSValue): TBytes;\r\n\r\nbegin\r\n Result:=[];\r\n Case BlobFormat of\r\n bfHex:\r\n Result:=DefaultBlobDataToBytes(aValue);\r\n bfBase64:\r\n Result:=BytesOf(atob(String(aValue)));\r\n bfBytes:\r\n Result:=TBytes(aValue);\r\n bfCustom:\r\n if Assigned(FOnDecodeBlobValue) then\r\n FOnDecodeBlobValue(Self,aValue,Result);\r\n end;\r\nend;\r\n\r\nfunction TBaseJSONDataSet.BytesToBlobData(aValue: TBytes): JSValue;\r\n\r\nbegin\r\n Result:='';\r\n Case BlobFormat of\r\n bfHex:\r\n Result:=DefaultBytesToBlobData(aValue);\r\n bfBase64:\r\n begin\r\n Result:=BtoA(StringOf(aValue));\r\n end;\r\n bfBytes:\r\n Result:=TBytes(aValue);\r\n bfCustom:\r\n if Assigned(FOnEncodeBlobValue) then\r\n FOnEncodeBlobValue(Self,aValue,Result);\r\n end;\r\nend;\r\n\r\nfunction TBaseJSONDataSet.ConvertDateTimeToNative(aField : TField; aValue: TDateTime): JSValue;\r\nbegin\r\n if jsISNan(aValue) then\r\n Result:=Null\r\n else\r\n Result:=FormatDateTimeField(aValue,aField)\r\nend;\r\n\r\n\r\nfunction TBaseJSONDataSet.AllocRecordBuffer: TDataRecord;\r\nbegin\r\n Result.data:=TJSObject.New;\r\n Result.bookmark:=null;\r\n Result.state:=rsNew;\r\nend;\r\n\r\n// the next two are particularly ugly.\r\nprocedure TBaseJSONDataSet.InternalInitRecord(var Buffer: TDataRecord);\r\nbegin\r\n// Writeln('TBaseJSONDataSet.InternalInitRecord');\r\n Buffer.Data:=FFieldMapper.CreateRow;\r\n Buffer.bookmark:=null;\r\n Buffer.state:=rsNew;\r\nend;\r\n\r\nprocedure TBaseJSONDataSet.FreeRecordBuffer (var Buffer: TDataRecord);\r\nbegin\r\n Buffer.Data:=Null;\r\n Buffer.bookmark:=null;\r\n Buffer.state:=rsNew;\r\nend;\r\n\r\nprocedure TBaseJSONDataSet.GetBookmarkData(Buffer: TDataRecord; var Data: TBookmark);\r\nbegin\r\n Data.Data:=Buffer.bookmark;\r\nend;\r\n\r\nfunction TBaseJSONDataSet.GetBookmarkFlag(Buffer: TDataRecord): TBookmarkFlag;\r\nbegin\r\n Result :=Buffer.BookmarkFlag;\r\nend;\r\n\r\nfunction TBaseJSONDataSet.GetClonedDataSet(WithSettings: Boolean): TDataSet;\r\nvar\r\n DS: TBaseJSONDataSet;\r\nbegin\r\n Result := TBaseJSONDataSet.Create(nil);\r\n try\r\n DS := Result as TBaseJSONDataSet;\r\n if WithSettings then\r\n begin\r\n DS.Filter := Filter;\r\n DS.OnFilterRecord := OnFilterRecord;\r\n DS.FilterOptions := FilterOptions;\r\n DS.Filtered := Filtered;\r\n// if IndexName <> '' then\r\n// DS.IndexName := IndexName\r\n// else\r\n// DS.IndexFieldNames := IndexFieldNames;\r\n// DS.DataSource := DataSource;\r\n// DS.MasterFields := MasterFields;\r\n end;\r\n DS.Clone(Self);\r\n DS.Active := Active;\r\n except\r\n Result.Free;\r\n raise;\r\n end;\r\nend;\r\n\r\nfunction TBaseJSONDataSet.GetRecNo: Integer;\r\nvar\r\n bkmIdx: Integer;\r\n\r\nbegin\r\n bkmIdx := Integer(ActiveBuffer.bookmark);\r\n Result := FCurrentIndex.FindRecord(bkmIdx)+1;\r\nend;\r\n\r\nprocedure TBaseJSONDataSet.InternalInitFieldDefs;\r\nbegin\r\n if Assigned(FMetaData) then\r\n MetaDataToFieldDefs;\r\n if (FieldDefs.Count = 0) then\r\n raise EJSONDataset.Create('No fields found');\r\nend;\r\n\r\nprocedure TBaseJSONDataSet.FreeData;\r\n\r\nVar\r\n I : integer;\r\n\r\nbegin\r\n If FOwnsData then\r\n begin\r\n FRows:=Nil;\r\n FMetaData:=Nil;\r\n end;\r\n For I:=0 to FIndexes.Count-1 do\r\n FIndexes[i].ClearIndex;\r\n FCurrentIndex:=Nil;\r\n FreeAndNil(FDefaultindex);\r\n FreeAndNil(FFieldMapper);\r\n FCurrentIndex:=Nil;\r\n FDeletedRows:=Nil;\r\nend;\r\n\r\nprocedure TBaseJSONDataSet.AppendToIndexes;\r\n\r\nbegin\r\n FDefaultIndex.AppendToIndex;\r\n if Assigned(FCurrentIndex) and (FCurrentIndex<>FDefaultIndex) then\r\n FCurrentIndex.AppendToIndex;\r\nend;\r\n\r\nprocedure TBaseJSONDataSet.CreateIndexes;\r\n\r\nbegin\r\n FDefaultIndex:=TDefaultJSONIndex.Create(Self,FRows);\r\n AppendToIndexes;\r\n if FCurrentIndex=Nil then\r\n FCurrentIndex:=FDefaultIndex;\r\nend;\r\n\r\nprocedure TBaseJSONDataSet.MetaDataToFieldDefs;\r\nbegin\r\nend;\r\n\r\nfunction TBaseJSONDataSet.FilterExpressionClass : TFPExpressionParserClass;\r\n\r\nbegin\r\n Result:=TFPExpressionParser;\r\nend;\r\n\r\nfunction TBaseJSONDataSet.GetFilterIsNull(const Args: TExprParameterArray): TFPExpressionResult;\r\n\r\nbegin\r\n Result.ResultType:=rtBoolean;\r\n Result.ResValue:=FieldByName(String(Args[0].resValue)).IsNull;\r\nend;\r\n\r\nfunction TBaseJSONDataSet.FieldTypeToExpressionType(aDataType : TFieldType) : TResultType;\r\n\r\nbegin\r\n Case aDataType of\r\n ftMemo,\r\n ftFixedChar,\r\n ftString : Result:=rtString;\r\n ftInteger,\r\n ftAutoInc,\r\n ftLargeInt : Result:=rtInteger;\r\n ftBoolean : Result:=rtBoolean;\r\n ftFloat : Result:=rtFloat;\r\n ftDate,\r\n ftTime,\r\n ftDateTime : Result:=rtDateTime;\r\n else\r\n DatabaseErrorFmt('Fields of type %s are not supported in filter expressions.',[Fieldtypenames[aDataType]],Self);\r\n end;\r\nend;\r\n\r\nfunction TBaseJSONDataSet.GetFilterField(const AName: String): TFPExpressionResult;\r\n\r\nVar\r\n F : TField;\r\n C : Currency;\r\n\r\nbegin\r\n F:=FieldByName(aName);\r\n Result.resultType:=FieldTypeToExpressionType(F.DataType);\r\n case Result.resultType of\r\n rtBoolean : Result.resValue:=F.AsBoolean;\r\n rtInteger : Result.resValue:=F.AsLargeInt;\r\n rtFloat : Result.resValue:=F.AsFloat;\r\n rtDateTime : Result.resValue:=F.AsDateTime;\r\n rtString : Result.resValue:=F.AsString;\r\n rtCurrency :\r\n begin\r\n C:=Currency(F.AsFloat);\r\n Result.resValue:=C;\r\n end;\r\n end;\r\n// Writeln('Filtering field ',aName,'value: ',result.resValue);\r\nend;\r\n\r\n\r\nfunction TBaseJSONDataSet.CreateFilterExpression : TFPExpressionParser;\r\n\r\nVar\r\n I : Integer;\r\n\r\nbegin\r\n Result:=FilterExpressionClass.Create(Self);\r\n Result.AllowLike:=True;\r\n for I:=0 to Fields.Count-1 do\r\n if not (Fields[i].DataType in [ftBlob,ftMemo]) then\r\n Result.Identifiers.AddVariable(Fields[i].FieldName,FieldTypeToExpressionType(Fields[i].DataType),@GetFilterField);\r\n Result.Identifiers.AddFunction('IsNull','B','S',@GetFilterIsNull);\r\n Result.Expression:=Filter;\r\nend;\r\n\r\nfunction TBaseJSONDataSet.DoFilterRecord : Boolean;\r\n\r\nVar\r\n DS : TDatasetState;\r\n\r\nbegin\r\n // Writeln('Filtering');\r\n Result:=True;\r\n DS:=SetTempState(dsFilter);\r\n try\r\n if Assigned(OnFilterRecord) then\r\n begin\r\n OnFilterRecord(Self,Result);\r\n if Not Result then\r\n Exit;\r\n end;\r\n if not Filtered or (Filter='') then\r\n Exit;\r\n if (FFilterExpression=Nil) then\r\n FFilterExpression:=CreateFilterExpression;\r\n Result:=FFilterExpression.AsBoolean;\r\n finally\r\n RestoreState(DS);\r\n end;\r\nend;\r\n\r\nfunction TBaseJSONDataSet.GetRecord(var Buffer: TDataRecord; GetMode: TGetMode; DoCheck: Boolean): TGetResult;\r\n\r\nVar\r\n BkmIdx : Integer;\r\n recordAccepted : Boolean;\r\nbegin\r\n Result := grOK; // default\r\n Repeat\r\n recordAccepted:=True;\r\n case GetMode of\r\n gmNext: // move on\r\n if fCurrent < fCurrentIndex.Count - 1 then\r\n Inc (fCurrent)\r\n else\r\n Result := grEOF; // end of file\r\n gmPrior: // move back\r\n if fCurrent > 0 then\r\n Dec (fCurrent)\r\n else\r\n Result := grBOF; // begin of file\r\n gmCurrent: // check if empty\r\n if (FCurrent<0) or (fCurrent >= fCurrentIndex.Count) then\r\n Result := grEOF;\r\n end;\r\n if Result = grOK then // read the data\r\n begin\r\n BkmIdx:=FCurrentIndex.RecordIndex[FCurrent];\r\n Buffer.Data:=FRows[bkmIdx];\r\n Buffer.BookmarkFlag := bfCurrent;\r\n Buffer.Bookmark:=BkmIdx;\r\n GetCalcFields(Buffer);\r\n if Filtered then\r\n begin\r\n FFilterRow:=Buffer.Data;\r\n recordAccepted:=DoFilterRecord;\r\n if Not RecordAccepted and (GetMode=gmCurrent) then\r\n begin\r\n // Transform to EOF.\r\n RecordAccepted:=True;\r\n Result:=grEOF;\r\n end;\r\n end;\r\n end;\r\n until recordAccepted;\r\nend;\r\n\r\nfunction TBaseJSONDataSet.GetRecordCount: Integer;\r\n \r\nbegin\r\n if Assigned(FCurrentIndex) then\r\n Result:=FCurrentIndex.Count\r\n else\r\n Result:=0;\r\nend;\r\n\r\nfunction TBaseJSONDataSet.GetRecordSize: Word;\r\nbegin\r\n Result := 0; // actual data without house-keeping\r\nend;\r\n\r\n\r\nprocedure TBaseJSONDataSet.InternalClose;\r\nbegin\r\n // disconnect and destroy field objects\r\n BindFields (False);\r\n if DefaultFields then\r\n DestroyFields;\r\n FreeData;\r\nend;\r\n\r\nprocedure TBaseJSONDataSet.InternalDelete;\r\n\r\nVar\r\n I,RowIdx : Integer;\r\n aIndex : TJSONIndex;\r\n\r\nbegin\r\n RowIdx:=FCurrentIndex.Delete(FCurrent);\r\n if (RowIdx<>-1) then\r\n begin\r\n For I:=0 to FIndexes.Count-1 do\r\n begin\r\n aIndex:=FIndexes[i].Index;\r\n if aIndex<>FCurrentIndex then\r\n aIndex.DeleteByRowIndex(RowIdx);\r\n end;\r\n // ...\r\n // Add to array of deleted records.\r\n if Not Assigned(FDeletedRows) then\r\n FDeletedRows:=TJSArray.New(FRows[RowIdx])\r\n else\r\n FDeletedRows.Push(FRows[RowIdx]);\r\n FRows[RowIdx]:=Undefined;\r\n end;\r\nend;\r\n\r\nprocedure TBaseJSONDataSet.InternalFirst;\r\nbegin\r\n FCurrent := -1;\r\nend;\r\n\r\nprocedure TBaseJSONDataSet.InternalGotoBookmark(ABookmark: TBookmark);\r\nbegin\r\n if isNumber(ABookmark.Data) then\r\n FCurrent:=FCurrentIndex.FindRecord(Integer(ABookmark.Data));\r\n// Writeln('Fcurrent', FCurrent,' from ',ABookmark.Data);\r\nend;\r\n\r\n\r\nprocedure TBaseJSONDataSet.InternalInsert;\r\n\r\nVar\r\n I : Integer;\r\n D : TFieldDef;\r\n\r\nbegin\r\n// Writeln('TBaseJSONDataSet.InternalInsert');\r\n FEditRow:=ActiveBuffer.Data;\r\n For I:=0 to FieldDefs.Count-1 do\r\n begin\r\n D:=FieldDefs[i];\r\n FFieldMapper.SetJSONDataForField(D.Name,D.Index,FEditRow,Null);\r\n end;\r\nend;\r\n\r\nprocedure TBaseJSONDataSet.RemoveCalcFields(Buf : JSValue);\r\n\r\nVar\r\n i : integer;\r\n\r\nbegin\r\n For I:=0 to Fields.Count-1 do\r\n if Fields[i].FieldKind in [fkCalculated,fkInternalCalc,fkLookup] then\r\n FieldMapper.RemoveField(FIelds[i].FieldName,FIelds[i].Index,Buf);\r\n\r\nend;\r\n\r\nprocedure TBaseJSONDataSet.InternalEdit;\r\n\r\nbegin\r\n// Writeln('TBaseJSONDataSet.InternalEdit: ');\r\n FEditIdx:=FCurrentIndex.RecordIndex[FCurrent];\r\n if not isUndefined(Rows[FEditIdx]) then\r\n begin\r\n FEditRow:=FieldMapper.CopyRow(Rows[FEditIdx]);\r\n\r\n end\r\n else\r\n FEditRow:=FFieldMapper.CreateRow;\r\n// Writeln('TBaseJSONDataSet.InternalEdit: ',FEditRow);\r\nend;\r\n\r\nprocedure TBaseJSONDataSet.InternalCancel;\r\nbegin\r\n FEditIdx:=-1;\r\n FEditRow:=Nil;\r\nend;\r\n\r\nprocedure TBaseJSONDataSet.InternalLast;\r\nbegin\r\n // The first thing that will happen is a GetPrior Record.\r\n FCurrent:=FCurrentIndex.Count;\r\nend;\r\n\r\nprocedure TBaseJSONDataSet.InitDateTimeFields;\r\n\r\nbegin\r\n // Do nothing\r\nend;\r\n\r\nprocedure TBaseJSONDataSet.InternalOpen;\r\nbegin\r\n FreeAndNil(FFieldMapper);\r\n FFieldMapper:=CreateFieldMapper;\r\n IF (FRows=Nil) then // opening from fielddefs ?\r\n begin\r\n FRows:=TJSArray.New;\r\n OwnsData:=True;\r\n end;\r\n CreateIndexes;\r\n InternalInitFieldDefs;\r\n if DefaultFields then\r\n CreateFields;\r\n BindFields (True);\r\n InitDateTimeFields;\r\n if FActiveIndex<>'' then\r\n ActivateIndex(True);\r\n FCurrent := -1;\r\nend;\r\n\r\nprocedure TBaseJSONDataSet.InternalPost;\r\n\r\nVar\r\n I,NewIdx,NewCurrent,Idx : integer;\r\n B : TBookmark;\r\n\r\nbegin\r\n inherited;\r\n NewCurrent:=-1;\r\n GetBookMarkData(ActiveBuffer,B);\r\n if (State=dsInsert) then\r\n begin // Insert or Append\r\n Idx:=FRows.push(FEditRow)-1;\r\n if GetBookMarkFlag(ActiveBuffer)=bfEOF then\r\n begin // Append\r\n FDefaultIndex.Append(Idx);\r\n for I:=0 to FIndexes.Count-1 do\r\n if Assigned(FIndexes[i].Findex) then\r\n begin\r\n NewIdx:=FIndexes[i].Findex.Append(Idx);\r\n if FIndexes[i].Findex=FCurrentIndex then\r\n NewCurrent:=NewIdx;\r\n end;\r\n end\r\n else // insert\r\n begin\r\n FCurrent:=FDefaultIndex.Insert(FCurrent,Idx);\r\n for I:=0 to FIndexes.Count-1 do\r\n\t if Assigned(FIndexes[i].Findex) then\r\n begin\r\n NewIdx:=FIndexes[i].Findex.Append(Idx);\r\n if FIndexes[i].Findex=FCurrentIndex then\r\n NewCurrent:=NewIdx;\r\n end;\r\n end;\r\n end\r\n else\r\n begin // Edit\r\n if (FEditIdx=-1) then\r\n DatabaseErrorFmt('Failed to retrieve record index for record %d',[FCurrent]);\r\n // Update source record\r\n Idx:=FEditIdx;\r\n FRows[Idx]:=FEditRow;\r\n FDefaultIndex.Update(Idx);\r\n // Must replace this by updating all indexes.\r\n // Note that this will change current index.\r\n for I:=0 to FIndexes.Count-1 do\r\n begin\r\n // Determine old index.\r\n NewIdx:=FCurrentIndex.Update(Idx);\r\n if Assigned(FIndexes[i].Findex) then\r\n if FIndexes[i].Findex=FCurrentIndex then\r\n NewCurrent:=NewIdx;\r\n end;\r\n end;\r\n // We have an active index, set current to that index.\r\n if NewCurrent<>-1 then\r\n FCurrent:=NewCurrent;\r\n FEditIdx:=-1;\r\n FEditRow:=Nil;\r\nend;\r\n\r\nprocedure TBaseJSONDataSet.InternalSetToRecord(Buffer: TDataRecord);\r\nbegin\r\n FCurrent:=FCurrentIndex.FindRecord(Integer(Buffer.Bookmark));\r\nend;\r\n\r\nprocedure TBaseJSONDataSet.SetFilterText(const Value: string);\r\nbegin\r\n inherited SetFilterText(Value);\r\n FreeAndNil(FFilterExpression);\r\n if Active then\r\n Resync([rmCenter]);\r\nend;\r\n\r\nprocedure TBaseJSONDataSet.SetFiltered(Value: Boolean);\r\nbegin\r\n inherited SetFiltered(Value);\r\n FreeAndNil(FFilterExpression);\r\n if Active then\r\n Resync([rmCenter]);\r\nend;\r\n\r\nfunction TBaseJSONDataSet.GetFieldClass(FieldType: TFieldType): TFieldClass;\r\nbegin\r\n If UseDateTimeFormatFields and (FieldType in [ftDate,ftDateTime,ftTime]) then\r\n case FieldType of\r\n ftDate : Result:=TJSONDateField;\r\n ftDateTime : Result:=TJSONDateTimeField;\r\n ftTime : Result:=TJSONTimeField;\r\n end\r\n else\r\n Result:=inherited GetFieldClass(FieldType);\r\nend;\r\n\r\nfunction TBaseJSONDataSet.GetApplyUpdateData(Buffer: TDataRecord): JSValue;\r\nbegin\r\n Result:=FieldMapper.CopyRow(Buffer.Data);\r\n RemoveCalcFields(Result);\r\nend;\r\n\r\nfunction TBaseJSONDataSet.IsCursorOpen: Boolean;\r\nbegin\r\n Result := Assigned(FDefaultIndex);\r\nend;\r\n\r\nfunction TBaseJSONDataSet.BookmarkValid(ABookmark: TBookmark): Boolean;\r\nbegin\r\n Result:=isNumber(ABookmark.Data);\r\nend;\r\n\r\nprocedure TBaseJSONDataSet.SetBookmarkData(var Buffer: TDataRecord; Data: TBookmark);\r\nbegin\r\n Buffer.Bookmark:=Data.Data;\r\n// Writeln('Set Bookmark from: ',Data.Data);\r\nend;\r\n\r\nfunction TBaseJSONDataSet.ConvertDateTimeField(S : String; F : TField) : TDateTime;\r\n\r\nVar\r\n Ptrn : string;\r\n\r\nbegin\r\n Result:=0;\r\n Ptrn:='';\r\n Case F.DataType of\r\n ftDate : if F is TJSONDateField then\r\n Ptrn:=(F as TJSONDateField).DateFormat;\r\n ftTime : if F is TJSONTimeField then\r\n Ptrn:=(F as TJSONTimeField).TimeFormat;\r\n ftDateTime : if F is TJSONDateTimeField then\r\n Ptrn:=(F as TJSONDateTimeField).DateTimeFormat;\r\n end;\r\n If (Ptrn='') then\r\n Result := DefaultConvertToDateTime(F,S,True)\r\n else\r\n Result:=ScanDateTime(ptrn,S,1);\r\nend;\r\n\r\nfunction TBaseJSONDataSet.FormatDateTimeField(DT: TDateTime; F: TField\r\n ): String;\r\n\r\nVar\r\n Ptrn : string;\r\nbegin\r\n Result:='';\r\n Ptrn:='';\r\n Case F.DataType of\r\n ftDate : if F is TJSONDateField then\r\n Ptrn:=TJSONDateField(F).DateFormat;\r\n ftTime : if F is TJSONTimeField then\r\n Ptrn:=TJSONTimeField(F).TimeFormat;\r\n ftDateTime : if F is TJSONDateTimeField then\r\n Ptrn:=TJSONDateTimeField(F).DateTimeFormat;\r\n end;\r\n If (Ptrn='') then\r\n Result := DateTimeToRFC3339(DT)\r\n else\r\n Result:=FormatDateTime(ptrn,DT);\r\nend;\r\n\r\nfunction TBaseJSONDataSet.CreateFieldMapper: TJSONFieldMapper;\r\nbegin\r\n if FRowType=rtJSONArray then\r\n Result:=TJSONArrayFieldMapper.Create\r\n else\r\n Result:=TJSONObjectFieldMapper.Create;\r\nend;\r\n\r\nfunction TBaseJSONDataSet.GetFieldData(Field: TField; Buffer: TDatarecord): JSValue;\r\n\r\nvar\r\n R : JSValue;\r\n\r\nbegin\r\n if State in [dsCalcFields,dsInternalCalc] then\r\n R:=CalcBuffer.data\r\n else if (State=dsFilter) then\r\n R:=FFilterRow\r\n else if (FEditIdx=Buffer.Bookmark) then\r\n begin\r\n if State=dsOldValue then\r\n R:=Buffer.data\r\n else\r\n R:=FEditRow;\r\n end\r\n else\r\n begin\r\n if State=dsOldValue then\r\n Exit(Null)\r\n else\r\n R:=Buffer.data;\r\n end;\r\n Result:=FFieldMapper.GetJSONDataForField(Field,R);\r\n if isUndefined(Result) then\r\n Result:=Null;\r\nend;\r\n\r\nprocedure TBaseJSONDataSet.SetFieldData(Field: TField; var Buffer: TDatarecord; AValue : JSValue);\r\n\r\nvar\r\n R : JSValue;\r\n\r\nbegin\r\n if State in [dsCalcFields,dsInternalCalc] then\r\n R:=CalcBuffer.Data\r\n else\r\n R:=FEditRow;\r\n FFieldMapper.SetJSONDataForField(Field,R,AValue);\r\n \r\n if not(State in [dsCalcFields, dsInternalCalc, dsFilter, dsNewValue]) then\r\n DataEvent(deFieldChange, Field);\r\n\r\n SetModified(True);\r\n// FFieldMapper.SetJSONDataForField(Field,Buffer.Data,AValue);\r\nend;\r\n\r\nprocedure TBaseJSONDataSet.SetBookmarkFlag(var Buffer: TDataRecord; Value: TBookmarkFlag);\r\n\r\nbegin\r\n Buffer.BookmarkFlag := Value;\r\nend;\r\n\r\nprocedure TBaseJSONDataSet.Clone(Source: TBaseJSONDataSet);\r\nbegin\r\n if Source.FieldDefs.Count > 0 then\r\n begin\r\n FieldDefs.Assign(Source.FieldDefs);\r\n CreateFields;\r\n end\r\n else\r\n begin\r\n Source.InitFieldDefsFromfields;\r\n FieldDefs.Assign(Source.FieldDefs);\r\n CreateFields;\r\n end;\r\n Rows := Source.Rows;\r\nend;\r\n\r\nfunction TBaseJSONDataSet.CompareBookmarks(Bookmark1, Bookmark2: TBookmark): Longint;\r\n\r\nbegin\r\n if isNumber(Bookmark1.Data) and isNumber(Bookmark2.Data) then\r\n Result := Integer(Bookmark2.Data) - Integer(Bookmark1.Data)\r\n else\r\n begin\r\n if isNumber(Bookmark1.Data) then\r\n Result := -1\r\n else\r\n if isNumber(Bookmark2.Data) then\r\n Result := 1\r\n else\r\n Result := 0;\r\n end;\r\nend;\r\n\r\n\r\nprocedure TBaseJSONDataSet.SetRecNo(Value: Integer);\r\nbegin\r\n CheckBrowseMode;\r\n DoBeforeScroll;\r\n if (Value < 1) or (Value > FCurrentIndex.Count) then\r\n raise EJSONDataset.CreateFmt('%s: SetRecNo: index %d out of range',[Name,Value]);\r\n FCurrent := Value - 1;\r\n Resync([]);\r\n DoAfterScroll;\r\nend;\r\n\r\nconstructor TBaseJSONDataSet.Create(AOwner: TComponent);\r\nbegin\r\n inherited;\r\n FownsData:=True;\r\n UseDateTimeFormatFields:=False;\r\n FEditIdx:=-1;\r\n FIndexes:=CreateIndexDefs;\r\nend;\r\n\r\ndestructor TBaseJSONDataSet.Destroy;\r\nbegin\r\n Close;\r\n FreeAndNil(FFilterExpression);\r\n FreeAndNil(FIndexes);\r\n FEditIdx:=-1;\r\n inherited;\r\nend;\r\n\r\nfunction TBaseJSONDataSet.CreateIndexDefs: TJSONIndexDefs;\r\n\r\nbegin\r\n Result:=TJSONIndexDefs.Create(Self,Self,TJSONIndexDef);\r\nend;\r\n\r\n\r\nprocedure TBaseJSONDataSet.BuildIndexes;\r\n\r\nVar\r\n I : integer;\r\n\r\nbegin\r\n For I:=0 to FIndexes.Count-1 do\r\n FIndexes[i].BuildIndex(Self);\r\nend;\r\n\r\nfunction TBaseJSONDataSet.RecordComparerClass : TRecordComparerClass;\r\n\r\nbegin\r\n Result:=TRecordComparer;\r\nend;\r\n\r\nfunction TBaseJSONDataSet.LocateRecordIndex(const KeyFields: string; const KeyValues: JSValue; Options: TLocateOptions): Integer;\r\n\r\nVar\r\n Comp : TRecordComparer;\r\n RI,I : Integer;\r\n\r\nbegin\r\n Result:=-1;\r\n Comp:=RecordComparerClass.Create(Self,KeyFields,KeyValues,Options);\r\n try\r\n if loFromCurrent in Options then\r\n I:=FCurrent\r\n else\r\n I:=0;\r\n RI:=FCurrentIndex.GetRecordIndex(I);\r\n While (Result=-1) and (RI<>-1) do\r\n begin\r\n if Comp.Compare(RI)=0 then\r\n Result:=RI;\r\n inc(I);\r\n RI:=FCurrentIndex.GetRecordIndex(I);\r\n end;\r\n finally\r\n Comp.Free;\r\n end;\r\nend;\r\n\r\nfunction TBaseJSONDataSet.Locate(const KeyFields: string; const KeyValues: JSValue; Options: TLocateOptions): boolean;\r\n\r\nVar\r\n I : Integer;\r\n BM : TBookMark;\r\n\r\nbegin\r\n Result:=Inherited;\r\n I:=LocateRecordIndex(KeyFields,KeyValues,Options);\r\n Result:=I<>-1;\r\n if Result then\r\n begin\r\n // Construct bookmark.\r\n // Bookmark is always the index in the FRows array.\r\n BM.Data:=I;\r\n BM.Flag:=bfCurrent;\r\n GotoBookMark(BM);\r\n end;\r\nend;\r\n\r\nfunction TBaseJSONDataSet.Lookup(const KeyFields: string; const KeyValues: JSValue; const ResultFields: string): JSValue;\r\n\r\nVar\r\n RI,I : Integer;\r\n l : TFPList;\r\n Vals : TJSValueDynArray;\r\n\r\nbegin\r\n Result:=Null;\r\n l:=TFPList.Create;\r\n try\r\n GetFieldList(L,ResultFields);\r\n Result:=inherited Lookup(KeyFields, KeyValues, ResultFields);\r\n RI:=LocateRecordIndex(KeyFields,KeyValues,[]);\r\n if RI<>-1 then\r\n begin\r\n SetLength(Vals,L.Count);\r\n For I:=0 to L.Count-1 do\r\n Vals[i]:=FFieldMapper.GetJSONDataForField(TField(L[I]),FRows[RI]);\r\n if L.Count=1 then\r\n Result:=Vals[i]\r\n else\r\n Result:=Vals;\r\n end;\r\n finally\r\n L.Free;\r\n end;\r\nend;\r\n\r\nend.\r\n","unit Bcl.Utils;\r\n\r\n{$I Bcl.inc}\r\n\r\ninterface\r\n\r\nuses\r\n SysUtils, Classes,\r\n {$IFNDEF PAS2JS}\r\n Character;\r\n {$ELSE}\r\n JS,\r\n WEBLib.Utils;\r\n {$ENDIF}\r\n\r\ntype\r\n TBase64EncodeTable = array[0..63] of Char;\r\n\r\n TTimeZoneMode = (Error, Ignore, AsUTC, AsLocal);\r\n\r\n TTimeZoneInfo = record\r\n HourOff: Integer;\r\n MinOff: Integer;\r\n HasTimeZone: Boolean;\r\n IsUTC: Boolean;\r\n procedure Init;\r\n end;\r\n\r\n TBclUtils = class\r\n public\r\n class procedure InitFormatSettings(var FS: TFormatSettings); {$IFNDEF PAS2JS}static;{$ENDIF}\r\n private\r\n class function InternalISOToTime(const Text: string; out DateTime: TDateTime; out TimeZone: TTimeZoneInfo): boolean; overload; {$IFNDEF PAS2JS}static;{$ENDIF}\r\n class function AdjustTimeZone(var DateTime: TDateTime; const TimeZone: TTimeZoneInfo;\r\n TimeZoneMode: TTimeZoneMode): Boolean; {$IFNDEF PAS2JS}static;{$ENDIF}\r\n public\r\n class function DateTimeToISO(const Value: TDateTime; FullNotation: boolean): string; {$IFNDEF PAS2JS}static;{$ENDIF}\r\n class function TryISOToDateTime(const Value: string; out DateTime: TDateTime): boolean; overload; {$IFNDEF PAS2JS}static;{$ENDIF}\r\n class function TryISOToDateTime(const Value: string; out DateTime: TDateTime; TimeZoneMode: TTimeZoneMode): boolean; overload; {$IFNDEF PAS2JS}static;{$ENDIF}\r\n class function TryISOToDateTime(const Value: string; out DateTime: TDateTime; out TimeZone: TTimeZoneInfo; TimeZoneMode: TTimeZoneMode): boolean; overload; {$IFNDEF PAS2JS}static;{$ENDIF}\r\n class function TimeToISO(const Value: TTime): string; {$IFNDEF PAS2JS}static;{$ENDIF}\r\n class function TryISOToTime(const Value: string; out DateTime: TTime): boolean; overload; {$IFNDEF PAS2JS}static;{$ENDIF}\r\n class function TryISOToTime(const Value: string; out DateTime: TTime; TimeZoneMode: TTimeZoneMode): boolean; overload; {$IFNDEF PAS2JS}static;{$ENDIF}\r\n class function DateToISO(const Value: TDate): string; {$IFNDEF PAS2JS}static;{$ENDIF}\r\n class function TryISOToDate(const Text: string; out DateTime: TDate): boolean; {$IFNDEF PAS2JS}static;{$ENDIF}\r\n class function ISOToDate(const Value: string): TDate; {$IFNDEF PAS2JS}static;{$ENDIF}\r\n class function ISOToDateTime(const Value: string): TDateTime; overload; {$IFNDEF PAS2JS}static;{$ENDIF}\r\n class function ISOToDateTime(const Value: string; TimeZoneMode: TTimeZoneMode): TDateTime; overload; {$IFNDEF PAS2JS}static;{$ENDIF}\r\n class function ISOToTime(const Value: string): TTime; {$IFNDEF PAS2JS}static;{$ENDIF}\r\n class function DateTimeToUtcString(const Value: TDateTime): string; {$IFNDEF PAS2JS}static;{$ENDIF}\r\n class function EncodeBase64(const Input: TBytes): string; overload; {$IFNDEF PAS2JS}static;{$ENDIF}\r\n {$IFNDEF PAS2JS}\r\n class function EncodeBase64(Data: Pointer; Len: Integer): string; overload; {$IFNDEF PAS2JS}static;{$ENDIF}\r\n {$ENDIF}\r\n class function EncodeBase64Url(const Input: TBytes): string; {$IFNDEF PAS2JS}static;{$ENDIF}\r\n class function DecodeBase64(const Input: string): TBytes; {$IFNDEF PAS2JS}static;{$ENDIF}\r\n class function DecodeBase64Url(const Input: string): TBytes; {$IFNDEF PAS2JS}static;{$ENDIF}\r\n\r\n {$IFNDEF PAS2JS}\r\n class function TryStringToGuid(const Value: string; out Guid: TGuid; WithBrackets: Boolean = false): boolean; {$IFNDEF PAS2JS}static;{$ENDIF}\r\n {$ENDIF}\r\n\r\n// class function RandomNumber(Length: Integer): string;\r\n// class function RandomString(Length: Integer): string;\r\n class function RandomBytes(Length: Integer): TBytes;\r\n class function RandomString(ByteLength: Integer = 32): string;\r\n class function BytesToHex(Bytes: TBytes; AsUpperCase: Boolean = False): string;\r\n public\r\n {$IFNDEF PAS2JS}\r\n class function IsLetter(C: Char): Boolean; {$IFNDEF PAS2JS}static; inline;{$ENDIF}\r\n class function IsLower(C: Char): Boolean; {$IFNDEF PAS2JS}static; inline;{$ENDIF}\r\n class function IsUpper(C: Char): Boolean; {$IFNDEF PAS2JS}static; inline;{$ENDIF}\r\n {$ENDIF}\r\n class function IsDigit(C: Char): Boolean; {$IFNDEF PAS2JS}static; inline;{$ENDIF}\r\n public\r\n class function CombineUrlFast(const AbsoluteUrl, RelativeUrl: string): string; {$IFNDEF PAS2JS}static;{$ENDIF}\r\n private\r\n class function InternalEncodeBase64(const Input: TBytes;\r\n EncodeTable: TBase64EncodeTable; Padding: Boolean): string; overload; {$IFNDEF PAS2JS}static;{$ENDIF}\r\n\r\n {$IFNDEF PAS2JS}\r\n class function InternalEncodeBase64(Data: Pointer; Len: Integer;\r\n EncodeTable: TBase64EncodeTable; Padding: Boolean): string; overload; {$IFNDEF PAS2JS}static;{$ENDIF}\r\n {$ENDIF}\r\n public\r\n class function PercentEncode(const S: string): string; {$IFNDEF PAS2JS}static;{$ENDIF}\r\n class function PercentDecode(const S: string): string; {$IFNDEF PAS2JS}static;{$ENDIF}\r\n end;\r\n\r\n{$IFDEF PAS2JS}\r\nprocedure FreeObj(var Obj);\r\n{$ELSE}\r\n {$IFDEF DELPHISYDNEY_LVL}\r\nprocedure FreeObj(const [ref] Obj: TObject); inline;\r\n {$ELSE}\r\nprocedure FreeObj(var Obj); inline;\r\n {$ENDIF}\r\n{$ENDIF}\r\n\r\n{$IFNDEF PAS2JS}\r\nconst\r\n{$HINTS OFF}\r\n BIZPlatforms = pidWin32 or pidWin64 or pidOSX32\r\n{$IF CompilerVersion >= 35}\r\n or pidiOSSimulator32 or pidiOSSimulator64 or pidiOSDevice32 or pidiOSDevice64 or pidAndroidArm32 or pidAndroidArm64 or pidLinux64 or pidOSX64 or pidOSXArm64 or pidiOSSimulatorArm64\r\n{$ELSEIF CompilerVersion >= 33}\r\n or pidiOSSimulator32 or pidiOSSimulator64 or pidiOSDevice32 or pidiOSDevice64 or pidAndroid32Arm or pidAndroid64Arm or pidLinux64 or pidOSX64\r\n{$ELSEIF CompilerVersion >= 32}\r\n or pidiOSSimulator or pidiOSDevice32 or pidiOSDevice64 or pidAndroid or pidLinux64\r\n{$ELSEIF CompilerVersion >= 29}\r\n or pidiOSSimulator or pidiOSDevice32 or pidiOSDevice64 or pidAndroid\r\n{$ELSEIF CompilerVersion >= 26}\r\n or pidiOSSimulator or pidiOSDevice or pidAndroid\r\n{$ELSEIF CompilerVersion >= 25}\r\n or pidiOSSimulator or pidiOSDevice\r\n{$IFEND};\r\n{$HINTS ON}\r\n{$ENDIF}\r\n\r\nvar\r\n DefaultTimeZoneMode: TTimeZoneMode;\r\n FullISOTimeNotation: Boolean;\r\n\r\nimplementation\r\n\r\nuses\r\n {$IFNDEF PAS2JS}\r\n Types, StrUtils,\r\n {$ENDIF}\r\n DateUtils;\r\n\r\nconst\r\n SInvalidDateFormat = 'Value %s is not a valid datetime';\r\n\r\n\r\n{$IFDEF PAS2JS}\r\nprocedure FreeObj(var Obj);\r\n{$ELSE}\r\n {$IFDEF DELPHISYDNEY_LVL}\r\nprocedure FreeObj(const [ref] Obj: TObject);\r\n {$ELSE}\r\nprocedure FreeObj(var Obj);\r\n {$ENDIF}\r\n{$ENDIF}\r\n{$IFDEF AUTOREFCOUNT}\r\nbegin\r\n if (Pointer(Obj) <> nil) then TObject(Obj).DisposeOf;\r\n TObject(Obj) := nil;\r\nend;\r\n{$ELSE}\r\nbegin\r\n FreeAndNil(Obj);\r\nend;\r\n{$ENDIF}\r\n\r\n\r\n{ TBclUtils }\r\n\r\n//type\r\n// TAcceptItem = record\r\n// TypeName: string;\r\n// SubType: string;\r\n// Q: double;\r\n// end;\r\n//\r\n// TMatchWeight = record\r\n// Value: integer;\r\n// Q: double;\r\n// TypeName: string;\r\n// end;\r\n//\r\n//function ParseMediaItem(const Item: string): TAcceptItem;\r\n//var\r\n// Parts: TStringDynArray;\r\n// Param, ParamName, ParamValue: string;\r\n// QValue: double;\r\n// I: integer;\r\n// P: integer;\r\n// FullType: string;\r\n//begin\r\n// Parts := SplitString(Trim(Item), ';');\r\n//\r\n// // parse params\r\n// Result.Q := 1;\r\n// for I := 1 to Length(Parts) - 1 do\r\n// begin\r\n// Param := Parts[I];\r\n// P := Pos('=', Param);\r\n// if P > 0 then\r\n// begin\r\n// ParamName := Copy(Param, 1, P - 1);\r\n// ParamValue := Copy(Param, P + 1, MaxInt);\r\n// if ParamName = 'q' then\r\n// begin\r\n// // ignore other parameters for now\r\n// if not TryStrToFloat(ParamValue, QValue) or (QValue < 0) or (QValue > 1) then\r\n// QValue := 1;\r\n// Result.Q := QValue;\r\n// end;\r\n// end;\r\n// end;\r\n//\r\n// if Length(Parts) > 0 then\r\n// FullType := Parts[0]\r\n// else\r\n// FullType := '*/*';\r\n// if FullType = '*' then\r\n// FullType := '*/*';\r\n//\r\n// P := Pos('/', FullType);\r\n// if P > 0 then\r\n// begin\r\n// Result.TypeName := Copy(FullType, 1, P - 1);\r\n// Result.SubType := Copy(FullType, P + 1, MaxInt);\r\n// end\r\n// else\r\n// begin\r\n// Result.TypeName := FullType;\r\n// Result.SubType := '*';\r\n// end;\r\n//end;\r\n//\r\n//function MediaItemWeight(const Item: string; Acceptables: TArray): TMatchWeight;\r\n//var\r\n// Target: TAcceptItem;\r\n// Acceptable: TAcceptItem;\r\n// EqualsType, EqualsSubType: boolean;\r\n// TempWeight: integer;\r\n//begin\r\n// Target := ParseMediaItem(Item);\r\n// Result.Value := -1;\r\n// Result.Q := 0;\r\n//\r\n// for Acceptable in Acceptables do\r\n// begin\r\n// EqualsType := SameText(Target.TypeName, Acceptable.TypeName);\r\n// EqualsSubType := SameText(Target.SubType, Acceptable.SubType);\r\n// if (EqualsType or (Acceptable.TypeName = '*') or (Target.TypeName = '*'))\r\n// and\r\n// (EqualsSubType or (Acceptable.SubType = '*') or (Target.SubType = '*')) then\r\n// begin\r\n// TempWeight := 0;\r\n// if EqualsType then\r\n// TempWeight := TempWeight + 100;\r\n// if EqualsSubType then\r\n// TempWeight := TempWeight + 10;\r\n// if (TempWeight > Result.Value) then\r\n// begin\r\n// Result.Value := TempWeight;\r\n// Result.Q := Acceptable.Q;\r\n// end;\r\n// end;\r\n// end;\r\n//end;\r\n//\r\n//function GetAcceptables(const Accept: string): TArray;\r\n//var\r\n// MediaItems: TStringDynArray;\r\n// I: integer;\r\n//begin\r\n// MediaItems := SplitString(Accept, ',');\r\n// SetLength(Result, Length(MediaItems));\r\n// for I := 0 to Length(MediaItems) - 1 do\r\n// Result[I] := ParseMediaItem(MediaItems[I]);\r\n//end;\r\n//\r\n//function BestAcceptableMatch(Acceptables: TArray; Values: TArray): TMatchWeight;\r\n//var\r\n// Weight: TMatchWeight;\r\n// I: integer;\r\n//begin\r\n// Result.Value := -1;\r\n// Result.Q := 0;\r\n// for I := 0 to Length(Values) - 1 do\r\n// begin\r\n// Weight := MediaItemWeight(Values[I], Acceptables);\r\n// if Weight.Value = -1 then Continue;\r\n//\r\n// if (Weight.Value > Result.Value) or\r\n// ((Weight.Value = Result.Value) and (Weight.Q > Result.Q)) or\r\n// (Result.Q = 0) then\r\n// begin\r\n// Result := Weight;\r\n// Result.TypeName := Values[I];\r\n// end;\r\n// end;\r\n//// if Result.Q > 0 then\r\n//// Result := '';\r\n//end;\r\n//\r\n//class function TBclUtils.AcceptsType(const Accept: string; const Value: string): boolean;\r\n//begin\r\n// Result := AcceptsType(Accept, TArray.Create(Value)) <> '';\r\n//end;\r\n//\r\n//class function TBclUtils.AcceptsType(const Accept: string; const Values: TArray): string;\r\n//var\r\n// Acceptables: TArray;\r\n// Match: TMatchWeight;\r\n//begin\r\n// if Length(Values) = 0 then Exit('');\r\n// if Accept = '' then Exit(Values[0]);\r\n//\r\n// Acceptables := GetAcceptables(Accept);\r\n//\r\n// Match := BestAcceptableMatch(Acceptables, Values);\r\n// if Match.Q > 0 then\r\n// Result := Match.TypeName\r\n// else\r\n// Result := '';\r\n//end;\r\n//\r\n//class function TBclUtils.AcceptsEncoding(const Accept: string; const Value: string): boolean;\r\n//begin\r\n// Result := AcceptsType(Accept, TArray.Create(Value)) <> '';\r\n//end;\r\n//\r\n//class function TBclUtils.AcceptsEncoding(const Accept: string; const Values: TArray): string;\r\n//var\r\n// Acceptables: TArray;\r\n// Acceptable: TAcceptItem;\r\n// HasIdentity: boolean;\r\n// Value: string;\r\n// Match: TMatchWeight;\r\n//begin\r\n// if Length(Values) = 0 then Exit('');\r\n//// if Accept = '' then Exit(Values[0]); // we must consider identity\r\n//\r\n// HasIdentity := false;\r\n// Acceptables := GetAcceptables(Accept);\r\n// for Acceptable in Acceptables do\r\n// begin\r\n// if not HasIdentity and SameText(Acceptable.TypeName, 'identity') then\r\n// HasIdentity := True;\r\n// end;\r\n//\r\n// Match := BestAcceptableMatch(Acceptables, Values);\r\n// if Match.Q > 0 then\r\n// Exit(Match.TypeName);\r\n//\r\n// // check for identity\r\n// if not HasIdentity and not SameText(Match.TypeName, 'identity') then\r\n// for Value in Values do\r\n// if SameText(Value, 'identity') then\r\n// Exit(Value);\r\n//end;\r\n//\r\n//class function TBclUtils.BasicAuthHeaderValue(const UserName, Password: string): string;\r\n//begin\r\n// Result := 'Basic ' + EncodeBase64(TEncoding.UTF8.GetBytes(Format('%s:%s', [UserName, Password])));\r\n//end;\r\n//\r\n//class function TBclUtils.CombineUrlFast(const AbsoluteUrl,\r\n// RelativeUrl: string): string;\r\n//begin\r\n// // Do a faster url combination because we know RelativeUrl comes correct\r\n// Result := AbsoluteUrl;\r\n// if (Length(Result) > 0) and (Result[Length(Result)] <> '/') then\r\n// Result := Result + '/';\r\n// Result := Result + RelativeUrl;\r\n//end;\r\n\r\n//class function TBclUtils.DateTimeToDayTimeDuration(\r\n// const Value: TTime): string;\r\n//var\r\n// D, H, M, S, MS: Word;\r\n//begin\r\n// D := Trunc(Value);\r\n// DecodeTime(Value, H, M, S, MS);\r\n// Result := 'P';\r\n// if D > 0 then\r\n// Result := Result + IntToStr(D) + 'D';\r\n// if H > 0 then\r\n// Result := Result + IntToStr(H) + 'H';\r\n// if M > 0 then\r\n// Result := Result + IntToStr(M) + 'M';\r\n// if S > 0 then\r\n// Result := Result + IntToStr(S) + 'S';\r\n// if Result = 'P' then\r\n// Result := 'P0D';\r\n//end;\r\n\r\n{$IFNDEF PAS2JS}\r\nclass function TBclUtils.IsDigit(C: Char): Boolean;\r\nbegin\r\n {$IFDEF DELPHIXE4_LVL}\r\n Result := C.IsDigit;\r\n {$ELSE}\r\n Result := Character.IsDigit(C);\r\n {$ENDIF}\r\nend;\r\n{$ELSE}\r\nclass function TBclUtils.IsDigit(C: Char): Boolean;\r\nbegin\r\n Result := (C >= '0') and (C <= '9');\r\nend;\r\n{$ENDIF}\r\n\r\nclass function TBclUtils.AdjustTimeZone(var DateTime: TDateTime; const TimeZone: TTimeZoneInfo;\r\n TimeZoneMode: TTimeZoneMode): Boolean;\r\n\r\n function AdjustTime(Value: TDateTime; HourOff, MinOff: Integer): TDateTime;\r\n var\r\n Delta: TDateTime;\r\n begin\r\n Result := Value;\r\n Delta := EncodeTime(Abs(HourOff), Abs(MinOff), 0, 0);\r\n if ((HourOff * MinsPerHour) + MinOff) > 0 then\r\n Result := Result - Delta\r\n else\r\n Result := Result + Delta;\r\n end;\r\n\r\nbegin\r\n case TimeZoneMode of\r\n TTimeZoneMode.Error:\r\n // do not accept timezone in the format, otherwise, return local date time\r\n if TimeZone.HasTimeZone then Exit(False);\r\n\r\n TTimeZoneMode.Ignore: ;\r\n // Return local time ignoring time zone\r\n\r\n TTimeZoneMode.AsUTC:\r\n if TimeZone.HasTimeZone then\r\n DateTime := AdjustTime(DateTime, TimeZone.HourOff, TimeZone.MinOff)\r\n else\r\n begin\r\n {$IFDEF PAS2JS}\r\n DateTime := IncMinute(DateTime, DateTimeToJSDate(DateTime).getTimezoneOffset);\r\n {$ELSE}\r\n DateTime := TTimeZone.Local.ToUniversalTime(DateTime);\r\n {$ENDIF}\r\n end;\r\n\r\n TTimeZoneMode.AsLocal:\r\n if TimeZone.HasTimeZone then\r\n begin\r\n DateTime := AdjustTime(DateTime, TimeZone.HourOff, TimeZone.MinOff);\r\n {$IFDEF PAS2JS}\r\n DateTime := IncMinute(DateTime, -DateTimeToJSDate(DateTime).getTimezoneOffset);\r\n {$ELSE}\r\n DateTime := TTimeZone.Local.ToLocalTime(DateTime);\r\n {$ENDIF}\r\n end;\r\n end;\r\n Result := True;\r\nend;\r\n\r\nclass function TBclUtils.BytesToHex(Bytes: TBytes; AsUpperCase: Boolean = False): string;\r\ntype\r\n THexChar = array[0..15] of Char;\r\nconst\r\n HexChars: array[Boolean] of THexChar = (\r\n '0123456789abcdef',\r\n '0123456789ABCDEF'\r\n );\r\nvar\r\n ByteIndex: Integer;\r\n StrIndex: Integer;\r\n Len: Integer;\r\nbegin\r\n Len := Length(Bytes);\r\n SetLength(Result, Len * 2);\r\n StrIndex := 1;\r\n for ByteIndex := 0 to Len - 1 do\r\n begin\r\n Result[StrIndex] := HexChars[AsUpperCase][Bytes[ByteIndex] shr 4];\r\n Result[StrIndex + 1] := HexChars[AsUpperCase][Bytes[ByteIndex] and $0f];\r\n Inc(StrIndex, 2);\r\n end;\r\nend;\r\n\r\nclass function TBclUtils.CombineUrlFast(const AbsoluteUrl,\r\n RelativeUrl: string): string;\r\nbegin\r\n // Do a faster url combination because we know RelativeUrl comes correct\r\n Result := AbsoluteUrl;\r\n if (Length(Result) > 0) and (Result[Length(Result)] <> '/') then\r\n Result := Result + '/';\r\n Result := Result + RelativeUrl;\r\nend;\r\n\r\nclass function TBclUtils.DateTimeToISO(const Value: TDateTime; FullNotation: boolean): string;\r\nvar\r\n Year, Month, Day, Hour, Minute, Second, MS: Word;\r\nbegin\r\n if not FullNotation and (Value = DateOf(Value)) then\r\n Result := DateToISO(Value)\r\n else\r\n begin\r\n DecodeDateTime(Value, Year, Month, Day, Hour, Minute, Second, MS);\r\n if FullNotation or (DateOf(Value) <> 0) then\r\n Result := Format('%sT%s', [DateToISO(Value), TimeToISO(Value)])\r\n else\r\n Result := Format('%s', [TimeToISO(Value)])\r\n end;\r\nend;\r\n\r\nclass function TBclUtils.DateTimeToUtcString(const Value: TDateTime): string;\r\nconst\r\n DayNames: array[1..7] of string = ('Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat');\r\n MonthNames: array[1..12] of string = ('Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul',\r\n 'Aug', 'Sep', 'Oct', 'Nov', 'Dec');\r\nvar\r\n Y, M, D: Word;\r\n H, Mn, S, MS: Word;\r\nbegin\r\n DecodeDate(Value, Y, M, D);\r\n DecodeTime(Value, H, Mn, S, MS);\r\n Result := Format('%s, %.2d %s %.4d %.2d:%.2d:%.2d GMT',\r\n [DayNames[DayOfWeek(Value)], D, MonthNames[M], Y, H, Mn, S]\r\n );\r\nend;\r\n\r\n//class function TBclUtils.DateTimeToJson(const Value: TDateTime): string;\r\n//begin\r\n// Result := Format('\\/Date(%d)\\/', [DateTimeToUnix(Value) * 1000]);\r\n//end;\r\n//\r\n//class function TBclUtils.DateTimeToUnix(const Value: TDateTime): Int64;\r\n//begin\r\n// Result := Round((Value - UnixDateDelta) * SecsPerDay);\r\n//end;\r\n\r\ntype\r\n TPacket = packed record\r\n a: array[0..3] of Byte;\r\n end;\r\n\r\nclass function TBclUtils.DecodeBase64(const Input: string): TBytes;\r\nvar\r\n StrLen: Integer;\r\nconst\r\n DecodeTable: array[#0..#127] of Integer = (\r\n 61, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\r\n 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,\r\n 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 62, 64, 62, 64, 63,\r\n 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 64, 64, 64, 64, 64, 64,\r\n 64, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,\r\n 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 64, 64, 64, 64, 63,\r\n 64, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,\r\n 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 64, 64, 64, 64, 64);\r\n\r\n function DecodePacket(Idx: Integer; var nChars: Integer): TPacket;\r\n begin\r\n Result.a[0] := (DecodeTable[Input[Idx + 0]] shl 2) or\r\n (DecodeTable[Input[Idx + 1]] shr 4);\r\n NChars := 1;\r\n if (Idx + 2 <= StrLen) and (Input[Idx + 2] <> '=') then\r\n begin\r\n Inc(NChars);\r\n Result.a[1] := ((DecodeTable[Input[Idx + 1]] shl 4) or (DecodeTable[Input[Idx + 2]] shr 2)) and $FF;\r\n end;\r\n if (Idx + 3 <= StrLen) and (Input[Idx + 3] <> '=') then\r\n begin\r\n Inc(NChars);\r\n Result.a[2] := ((DecodeTable[Input[Idx + 2]] shl 6) or DecodeTable[Input[Idx + 3]]) and $FF;\r\n end;\r\n end;\r\n\r\nvar\r\n I, J, K: Integer;\r\n Packet: TPacket;\r\n Len: integer;\r\nbegin\r\n SetLength(Result, ((Length(Input) + 2) div 4) * 3);\r\n StrLen := Length(Input);\r\n Len := 0;\r\n for I := 1 to (StrLen + 2) div 4 do\r\n begin\r\n Packet := DecodePacket((I - 1) * 4 + 1, J);\r\n K := 0;\r\n while J > 0 do\r\n begin\r\n Result[Len] := Packet.a[K];\r\n Inc(Len);\r\n Inc(K);\r\n Dec(J);\r\n end;\r\n end;\r\n SetLength(Result, Len);\r\nend;\r\n\r\nclass function TBclUtils.DecodeBase64Url(const Input: string): TBytes;\r\nbegin\r\n Result := DecodeBase64(Input);\r\nend;\r\n\r\nclass function TBclUtils.EncodeBase64(const Input: TBytes): string;\r\nconst\r\n EncodeTable: TBase64EncodeTable =\r\n 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' +\r\n 'abcdefghijklmnopqrstuvwxyz' +\r\n '0123456789+/';\r\nbegin\r\n Result := InternalEncodeBase64(Input, EncodeTable, True);\r\nend;\r\n\r\n{$IFNDEF PAS2JS}\r\nclass function TBclUtils.EncodeBase64(Data: Pointer; Len: Integer): string;\r\nconst\r\n EncodeTable: TBase64EncodeTable =\r\n 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' +\r\n 'abcdefghijklmnopqrstuvwxyz' +\r\n '0123456789+/';\r\nbegin\r\n Result := InternalEncodeBase64(Data, Len, EncodeTable, True);\r\nend;\r\n{$ENDIF}\r\n\r\nclass function TBclUtils.EncodeBase64Url(const Input: TBytes): string;\r\nconst\r\n EncodeTable: TBase64EncodeTable =\r\n 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' +\r\n 'abcdefghijklmnopqrstuvwxyz' +\r\n '0123456789-_';\r\nbegin\r\n Result := InternalEncodeBase64(Input, EncodeTable, False);\r\nend;\r\n\r\nclass function TBclUtils.InternalEncodeBase64(const Input: TBytes;\r\n EncodeTable: TBase64EncodeTable; Padding: Boolean): string;\r\nvar\r\n Output: string;\r\n\r\n procedure EncodePacket(const Packet: TPacket; NumChars: Integer; Idx: Integer);\r\n begin\r\n Output[Idx + 0] := EnCodeTable[Packet.a[0] shr 2];\r\n Output[Idx + 1] := EnCodeTable[((Packet.a[0] shl 4) or (Packet.a[1] shr 4)) and $0000003f];\r\n\r\n if NumChars < 2 then\r\n Output[Idx + 2] := '='\r\n else\r\n Output[Idx + 2] := EnCodeTable[((Packet.a[1] shl 2) or (Packet.a[2] shr 6)) and $0000003f];\r\n\r\n if NumChars < 3 then\r\n Output[Idx + 3] := '='\r\n else\r\n Output[Idx + 3] := EnCodeTable[Packet.a[2] and $0000003f];\r\n end;\r\n\r\nvar\r\n I, K, J: Integer;\r\n Packet: TPacket;\r\nbegin\r\n Output := '';\r\n I := (Length(Input) div 3) * 4;\r\n if Length(Input) mod 3 > 0 then Inc(I, 4);\r\n SetLength(Output, I);\r\n J := 1;\r\n for I := 1 to Length(Input) div 3 do\r\n begin\r\n Packet.a[0] := Input[(I - 1) * 3];\r\n Packet.a[1] := Input[(I - 1) * 3 + 1];\r\n Packet.a[2] := Input[(I - 1) * 3 + 2];\r\n Packet.a[3] := 0;\r\n EncodePacket(Packet, 3, J);\r\n Inc(J, 4);\r\n end;\r\n K := 0;\r\n\r\n Packet.a[0] := 0;\r\n Packet.a[1] := 0;\r\n Packet.a[2] := 0;\r\n Packet.a[3] := 0;\r\n\r\n for I := Length(Input) - (Length(Input) mod 3) + 1 to Length(Input) do\r\n begin\r\n Packet.a[K] := Byte(Input[I - 1]);\r\n Inc(K);\r\n if I = Length(Input) then\r\n EncodePacket(Packet, Length(Input) mod 3, J);\r\n end;\r\n\r\n if not Padding and (Length(Output) >= 2) then\r\n begin\r\n if Output[Length(Output) - 1] = '=' then\r\n SetLength(Output, Length(Output) - 2)\r\n else\r\n if Output[Length(Output)] = '=' then\r\n SetLength(Output, Length(Output) - 1);\r\n end;\r\n Result := Output;\r\nend;\r\n\r\nclass function TBclUtils.InternalISOToTime(const Text: string; //FI:C103\r\n out DateTime: TDateTime; out TimeZone: TTimeZoneInfo): boolean;\r\nvar\r\n TextLen: Integer;\r\n\r\n function ExtractDigit(var CharIndex: Integer; out Value: Integer): Boolean;\r\n begin\r\n Result := (CharIndex <= TextLen) and IsDigit(Text[CharIndex]);\r\n if Result then\r\n begin\r\n Value := Ord(Text[CharIndex]) - Ord('0');\r\n Inc(CharIndex);\r\n end;\r\n end;\r\n\r\n function ExtractDoubleDigit(var CharIndex: Integer; out Value: Integer): Boolean;\r\n var\r\n N10, N: Integer;\r\n begin\r\n Result := ExtractDigit(CharIndex, N10) and ExtractDigit(CharIndex, N);\r\n if Result then\r\n Value := N10 * 10 + N;\r\n end;\r\n\r\n function ExtractChar(var CharIndex: Integer; C: Char): Boolean;\r\n begin\r\n Result := (CharIndex <= TextLen) and (Text[CharIndex] = C);\r\n if Result then\r\n Inc(CharIndex);\r\n end;\r\n\r\n function ExtractHourMinOffset(var CharIndex: Integer; out HourOff, MinOff: Integer): Boolean;\r\n begin\r\n if not ExtractDoubleDigit(CharIndex, HourOff) then Exit(False);\r\n ExtractChar(CharIndex, ':');\r\n if not ExtractDoubleDigit(CharIndex, MinOff) then Exit(False);\r\n Result := (CharIndex > TextLen);\r\n end;\r\n\r\n function ExtractTimeZone(var CharIndex: Integer; out HourOff, MinOff: Integer): Boolean;\r\n begin\r\n HourOff := 0;\r\n MinOff := 0;\r\n if ExtractChar(CharIndex, 'Z') then\r\n begin\r\n Result := CharIndex > TextLen;\r\n end\r\n else\r\n if ExtractChar(CharIndex, '+') then\r\n begin\r\n Result := ExtractHourMinOffset(CharIndex, HourOff, MinOff);\r\n end\r\n else\r\n if ExtractChar(CharIndex, '-') then\r\n begin\r\n Result := ExtractHourMinOffset(CharIndex, HourOff, MinOff);\r\n HourOff := -HourOff;\r\n MinOff := -MinOff;\r\n end\r\n else\r\n Result := False;\r\n end;\r\n\r\n function IsFinal(var CharIndex: Integer; out HasTimeZone: Boolean; out IsUTC: Boolean): Boolean;\r\n var\r\n C: Char;\r\n begin\r\n if CharIndex <= TextLen then\r\n C := Text[CharIndex]\r\n else\r\n C := #0;\r\n Result := (C = #0) or (C = 'Z') or (C = '+') or (C = '-');\r\n HasTimeZone := C <> #0;\r\n IsUTC := C = 'Z';\r\n end;\r\n\r\nvar\r\n Hour, Min, Sec, MSec, MsecDigit: Integer;\r\n HourOff, MinOff: Integer;\r\n HasTimeChar: Boolean;\r\n HasTimeZone: Boolean;\r\n IsUTC: Boolean;\r\n CharIndex: Integer;\r\n Mul: Integer;\r\nbegin\r\n DateTime := 0;\r\n if Text = '' then\r\n begin\r\n Result := True;\r\n end else\r\n begin\r\n Hour := 0;\r\n Min := 0;\r\n Sec := 0;\r\n MSec := 0;\r\n HourOff := 0;\r\n MinOff := 0;\r\n HasTimeZone := False;\r\n IsUTC := False;\r\n\r\n TextLen := Length(Text);\r\n CharIndex := 1;\r\n if not ExtractDoubleDigit(CharIndex, Hour) then Exit(False);\r\n HasTimeChar := ExtractChar(CharIndex, ':');\r\n if not ExtractDoubleDigit(CharIndex, Min) then Exit(False);\r\n if not IsFinal(CharIndex, HasTimeZone, IsUTC) then\r\n begin\r\n if HasTimeChar and not ExtractChar(CharIndex, ':') then Exit(False);\r\n if not ExtractDoubleDigit(CharIndex, Sec) then Exit(False);\r\n if not IsFinal(CharIndex, HasTimeZone, IsUTC) then\r\n begin\r\n // extract miliseconds\r\n if not ExtractChar(CharIndex, '.') then\r\n Exit(False);\r\n Mul := 100;\r\n repeat\r\n if not ExtractDigit(CharIndex, MsecDigit) then Exit(False);\r\n Msec := Msec + MsecDigit * Mul;\r\n Mul := Mul div 10;\r\n until IsFinal(CharIndex, HasTimeZone, IsUTC);\r\n end;\r\n end;\r\n if HasTimeZone then\r\n begin\r\n if not ExtractTimeZone(CharIndex, HourOff, MinOff) then Exit(False);\r\n end;\r\n\r\n Result := TryEncodeTime(Hour, Min, Sec, MSec, DateTime);\r\n if Result then\r\n begin\r\n TimeZone.HourOff := HourOff;\r\n TimeZone.MinOff := MinOff;\r\n TimeZone.HasTimeZone := HasTimeZone;\r\n TimeZone.IsUTC := IsUTC;\r\n end;\r\n end;\r\nend;\r\n\r\nclass procedure TBclUtils.InitFormatSettings(var FS: TFormatSettings);\r\nbegin\r\n{$IF Defined(PAS2JS)}\r\n FS := TFormatSettings.Create;\r\n{$ELSEIF Defined(DELPHIXE2_LVL)}\r\n FS := System.SysUtils.FormatSettings;\r\n{$ELSEIF Defined(DELPHIXE_LVL)}\r\n FS := TFormatSettings.Create;\r\n{$ELSE}\r\n GetLocaleFormatSettings(0, FS);\r\n{$IFEND}\r\nend;\r\n\r\n{$IFNDEF PAS2JS}\r\nclass function TBclUtils.IsLetter(C: Char): Boolean;\r\nbegin\r\n {$IFDEF DELPHIXE4_LVL}\r\n Result := C.IsLetter;\r\n {$ELSE}\r\n Result := Character.IsLetter(C);\r\n {$ENDIF}\r\nend;\r\n{$ENDIF}\r\n\r\n{$IFNDEF PAS2JS}\r\nclass function TBclUtils.IsLower(C: Char): Boolean;\r\nbegin\r\n {$IFDEF DELPHIXE4_LVL}\r\n Result := C.IsLower;\r\n {$ELSE}\r\n Result := Character.IsLower(C);\r\n {$ENDIF}\r\nend;\r\n{$ENDIF}\r\n\r\n{$IFNDEF PAS2JS}\r\nclass function TBclUtils.IsUpper(C: Char): Boolean;\r\nbegin\r\n {$IFDEF DELPHIXE4_LVL}\r\n Result := C.IsUpper;\r\n {$ELSE}\r\n Result := Character.IsUpper(C);\r\n {$ENDIF}\r\nend;\r\n{$ENDIF}\r\n\r\nclass function TBclUtils.PercentDecode(const S: string): string;\r\n{$IFDEF PAS2JS}\r\nbegin\r\n Result := decodeURIComponent(S);\r\nend;\r\n{$ELSE}\r\n\r\n function IsHexa(C: Char): boolean;\r\n begin\r\n Result := ((C >= '0') and (C <= '9'))\r\n or ((C >= 'a') and (C <= 'f'))\r\n or ((C >= 'A') and (C <= 'F'));\r\n end;\r\n\r\nvar\r\n {$IFDEF PAS2JS}\r\n B: string;\r\n {$ELSE}\r\n B: TBytes;\r\n {$ENDIF}\r\n L: integer;\r\n I: integer;\r\nbegin\r\n SetLength(B, Length(S));\r\n L := 1;\r\n I := 0;\r\n while L <= Length(S) do\r\n begin\r\n if (S[L] = '%') and (L + 2 <= Length(S)) and IsHexa(S[L + 1]) and IsHexa(S[L + 2]) then\r\n begin\r\n B[I] := StrToInt('$' + S[L + 1] + S[L + 2]);\r\n Inc(L, 3);\r\n end\r\n else\r\n begin\r\n B[I] := Ord(S[L]);\r\n Inc(L);\r\n end;\r\n Inc(I);\r\n end;\r\n SetLength(B, I);\r\n{$IFDEF PAS2JS}\r\n Result := B;\r\n{$ELSE}\r\n Result := TEncoding.UTF8.GetString(B);\r\n{$ENDIF}\r\nend;\r\n{$ENDIF}\r\n\r\nclass function TBclUtils.PercentEncode(const S: string): string;\r\n{$IFDEF PAS2JS}\r\nbegin\r\n Result := encodeURIComponent(S);\r\nend;\r\n{$ELSE}\r\nvar\r\n {$IFDEF PAS2JS}\r\n Bytes: string;\r\n {$ELSE}\r\n Bytes: TBytes;\r\n {$ENDIF}\r\n B: Byte;\r\n I: integer;\r\n L: integer;\r\n H: string;\r\nbegin\r\n {$IFDEF PAS2JS}\r\n Bytes := S;\r\n {$ELSE}\r\n Bytes := TEncoding.UTF8.GetBytes(S);\r\n {$ENDIF}\r\n\r\n SetLength(Result, Length(Bytes) * 3); // final string will be maximum 3 times the original bytes\r\n L := 1;\r\n {$IFDEF PAS2JS}\r\n for I := 1 to Length(Bytes) do\r\n begin\r\n B := Ord(Bytes[I]);\r\n {$ELSE}\r\n for I := 0 to Length(Bytes) - 1 do\r\n begin\r\n B := Bytes[I];\r\n {$ENDIF}\r\n\r\n // Check if is unreserved char\r\n if ((B >= 65) and (B <= 90)) // A..Z\r\n or ((B >= 97) and (B <= 122)) // a..z\r\n or ((B >= 48) and (B <= 57)) //0..9\r\n or (B in [45, 46, 95, 126]) // - . _ ~\r\n or (B in [33, 39, 40, 41, 42]) then // ! ' ( ) *\r\n begin\r\n Result[L] := Chr(B);\r\n Inc(L);\r\n end else\r\n begin\r\n Result[L] := '%';\r\n H := IntToHex(B, 2);\r\n Result[L + 1] := H[1];\r\n Result[L + 2] := H[2];\r\n Inc(L, 3);\r\n end;\r\n end;\r\n SetLength(Result, L - 1);\r\nend;\r\n{$ENDIF}\r\n\r\n{$IFDEF PAS2JS}\r\nclass function TBclUtils.RandomBytes(Length: Integer): TBytes; assembler;\r\nasm\r\n var crypto = (typeof window !== 'undefined') ? (window.crypto || window.msCrypto) : null;\r\n return crypto.getRandomValues(new Uint8Array(Length));\r\nend;\r\n{$ELSE}\r\nclass function TBclUtils.RandomBytes(Length: Integer): TBytes;\r\nvar\r\n I: Integer;\r\nbegin\r\n // TODO: Use better cryptographic random number generator\r\n SetLength(Result, Length);\r\n for I := 0 to Length - 1 do\r\n Result[I] := Random(256);\r\nend;\r\n{$ENDIF}\r\n\r\nclass function TBclUtils.RandomString(ByteLength: Integer): string;\r\nbegin\r\n Result := EncodeBase64Url(RandomBytes(ByteLength));\r\nend;\r\n\r\n//class function TBclUtils.RandomNumber(Length: Integer): string;\r\n//const\r\n// cNumbers = '0123456789';\r\n//var\r\n// I: integer;\r\n//begin\r\n// SetLength(Result, Length);\r\n// for I := 1 to Length do\r\n// Result[I] := cNumbers[Random(10) + 1];\r\n//end;\r\n\r\n//class procedure TBclUtils.GetNameAndAnnotation(const Text: string; out AName,\r\n// AAnnotation: string);\r\n//var\r\n// P: integer;\r\n//begin\r\n// P := Pos('@', Text);\r\n// if P = 0 then\r\n// begin\r\n// AName := Text;\r\n// AAnnotation := '';\r\n// end else\r\n// begin\r\n// AName := Copy(Text, 1, P - 1);\r\n// AAnnotation := Copy(Text, P + 1, MaxInt);\r\n// end;\r\n//end;\r\n//\r\n//class function TBclUtils.GetQueryParams(const Query: string): TArray>;\r\n//var\r\n// QueryItem: string;\r\n// QueryItems: TStringDynArray;\r\n// I, P: integer;\r\n// Name, Value: string;\r\n//begin\r\n// if (Length(Query) > 0) and (Query[1] = '?') then\r\n// QueryItems := SplitString(Copy(Query, 2, MaxInt), '&')\r\n// else\r\n// QueryItems := SplitString(Query, '&');\r\n// SetLength(Result, Length(QueryItems));\r\n// for I := 0 to Length(QueryItems) - 1 do\r\n// begin\r\n// QueryItem := QueryItems[I];\r\n// P := Pos('=', QueryItem);\r\n// Name := Copy(QueryItem, 1, P - 1);\r\n// Value := Copy(QueryItem, P + 1, MaxInt);\r\n// Name := TBclUtils.PercentDecode(Name);\r\n// Value := TBclUtils.PercentDecode(Value);\r\n// Result[I].Key := Name;\r\n// Result[I].Value := Value;\r\n// end;\r\n//end;\r\n//\r\n//class function TBclUtils.GetStatusReason(const StatusCode: integer): string;\r\n//begin\r\n// case StatusCode of\r\n// 100: Result := 'Continue';\r\n// 101: Result := 'Switching Protocols';\r\n// 102: Result := 'Processing';\r\n// 200: Result := 'OK';\r\n// 201: Result := 'Created';\r\n// 202: Result := 'Accepted';\r\n// 203: Result := 'Non-Authoritative Information';\r\n// 204: Result := 'No Content';\r\n// 205: Result := 'Reset Content';\r\n// 206: Result := 'Partial Content';\r\n// 207: Result := 'Multi-Status';\r\n// 208: Result := 'Already Reported';\r\n// 300: Result := 'Multiple Choices';\r\n// 301: Result := 'Moved Permanently';\r\n// 302: Result := 'Found';\r\n// 303: Result := 'See Other';\r\n// 304: Result := 'Not Modified';\r\n// 305: Result := 'Use Proxy';\r\n// 306: Result := 'Switch Proxy';\r\n// 307: Result := 'Temporary Redirect';\r\n// 400: Result := 'Bad Request';\r\n// 401: Result := 'Unauthorized';\r\n// 402: Result := 'Payment Required';\r\n// 403: Result := 'Forbidden';\r\n// 404: Result := 'Not Found';\r\n// 405: Result := 'Method Not Allowed';\r\n// 406: Result := 'Not Acceptable';\r\n// 407: Result := 'Proxy Authentication Required';\r\n// 408: Result := 'Request Timeout';\r\n// 409: Result := 'Conflict';\r\n// 410: Result := 'Gone';\r\n// 411: Result := 'Length Required';\r\n// 412: Result := 'Precondition Failed';\r\n// 413: Result := 'Request Entity Too Large';\r\n// 414: Result := 'Request-URI Too Long';\r\n// 415: Result := 'Unsupported Media Type';\r\n// 416: Result := 'Request Range Not Satisfiable';\r\n// 417: Result := 'Expectation Failed';\r\n// 422: Result := 'Unprocessable Entity';\r\n// 423: Result := 'Locked';\r\n// 424: Result := 'Failed Dependency';\r\n// 500: Result := 'Internal Server Error';\r\n// 501: Result := 'Not Implemented';\r\n// 502: Result := 'Bad Gateway';\r\n// 503: Result := 'Service Unavailable';\r\n// 504: Result := 'Gateway Timeout';\r\n// 505: Result := 'Http Version Not Supported';\r\n// 506: Result := 'Variant Also Negotiates';\r\n// 507: Result := 'Insufficient Storage';\r\n// else\r\n// Result := '';\r\n// end;\r\n//end;\r\n//\r\n//class function TBclUtils.ISOToTime(const Value: string): TTime;\r\n//begin\r\n// if Value = '' then Exit(0);\r\n// Result := StrToDateTime(Value, FISODateSettings);\r\n//end;\r\n\r\nclass function TBclUtils.TimeToISO(const Value: TTime): string;\r\nvar\r\n Year, Month, Day, Hour, Minute, Second, MS: Word;\r\nbegin\r\n DecodeDateTime(Value, Year, Month, Day, Hour, Minute, Second, MS);\r\n if (MS <> 0) or FullISOTimeNotation then\r\n Result := Format('%.2d:%.2d:%.2d.%.3d', [Hour, Minute, Second, MS])\r\n else\r\n if Second <> 0 then\r\n Result := Format('%.2d:%.2d:%.2d', [Hour, Minute, Second])\r\n else\r\n Result := Format('%.2d:%.2d', [Hour, Minute]);\r\nend;\r\n\r\nclass function TBclUtils.TryISOToTime(const Value: string; out DateTime: TTime;\r\n TimeZoneMode: TTimeZoneMode): boolean;\r\nvar\r\n TimeZone: TTimeZoneInfo;\r\n TempDate: TDateTime;\r\nbegin\r\n Result := InternalISOToTime(Value, TempDate, TimeZone);\r\n if Result then\r\n begin\r\n TempDate := Date + TempDate;\r\n Result := AdjustTimeZone(TempDate, TimeZone, TimeZoneMode);\r\n TempDate := Frac(TempDate);\r\n end;\r\n DateTime := TempDate;\r\nend;\r\n\r\n//class function TBclUtils.ISOToDateTime(const Value: string): TDateTime;\r\n//begin\r\n// if Value = '' then Exit(0);\r\n// Result := StrToDateTime(Value, FISODateSettings);\r\n//end;\r\n//\r\n//class function TBclUtils.PercentDecode(const S: string): string;\r\n//\r\n// function IsHexa(C: Char): boolean;\r\n// begin\r\n// Result := ((C >= '0') and (C <= '9'))\r\n// or ((C >= 'a') and (C <= 'f'))\r\n// or ((C >= 'A') and (C <= 'F'));\r\n// end;\r\n//\r\n//var\r\n// B: TBytes;\r\n// L: integer;\r\n// I: integer;\r\n//begin\r\n// SetLength(B, Length(S));\r\n// L := 1;\r\n// I := 0;\r\n// while L <= Length(S) do\r\n// begin\r\n// if (S[L] = '%') and (L + 2 <= Length(S)) and IsHexa(S[L + 1]) and IsHexa(S[L + 2]) then\r\n// begin\r\n// B[I] := StrToInt('$' + S[L + 1] + S[L + 2]);\r\n// Inc(L, 3);\r\n// end\r\n// else\r\n// begin\r\n// B[I] := Ord(S[L]);\r\n// Inc(L);\r\n// end;\r\n// Inc(I);\r\n// end;\r\n// SetLength(B, I);\r\n// Result := TEncoding.UTF8.GetString(B);\r\n//end;\r\n//\r\n//class function TBclUtils.PercentEncode(Segments: TArray): string;\r\n//var\r\n// Segment: string;\r\n//begin\r\n// Result := '';\r\n// for Segment in Segments do\r\n// begin\r\n// if Result <> '' then\r\n// Result := Result + '/';\r\n// Result := Result + PercentEncode(Segment);\r\n// end;\r\n//end;\r\n//\r\n//class function TBclUtils.PercentEncode(const S: string): string;\r\n//var\r\n// B: TBytes;\r\n// I: integer;\r\n// L: integer;\r\n// H: string;\r\n//begin\r\n// B := TEncoding.UTF8.GetBytes(S);\r\n// SetLength(Result, Length(B) * 3); // final string will be maximum 3 times the original bytes\r\n// L := 1;\r\n// for I := 0 to Length(B) - 1 do\r\n// begin\r\n// // Check if is unreserved char\r\n// if ((B[I] >= 65) and (B[I] <= 90)) // A..Z\r\n// or ((B[I] >= 97) and (B[I] <= 122)) // a..z\r\n// or ((B[I] >= 48) and (B[I] <= 57)) //0..9\r\n// or (B[I] in [45, 46, 95, 126]) // - . _ ~\r\n// or (B[I] in [33, 39, 40, 41, 42]) then // ! ' ( ) *\r\n// begin\r\n// Result[L] := Char(B[I]);\r\n// Inc(L);\r\n// end else\r\n// begin\r\n// Result[L] := '%';\r\n// H := IntToHex(B[I], 2);\r\n// Result[L + 1] := H[1];\r\n// Result[L + 2] := H[2];\r\n// Inc(L, 3);\r\n// end;\r\n// end;\r\n// SetLength(Result, L - 1);\r\n//end;\r\n//\r\n//class function TBclUtils.TryDayTimeDurationToDateTime(const Value: string;\r\n// out Time: TTime): boolean;\r\n//var\r\n// Len: integer;\r\n// Day, Hour, Min, Sec: integer;\r\n//\r\n// function ExtractNumber(const Value: string; var I: integer): boolean;\r\n// var\r\n// Start: integer;\r\n// C: Char;\r\n// Number: integer;\r\n// begin\r\n// Start := I;\r\n// while (I <= Len) and\r\n// {$IFDEF DELPHIXE4_LVL}\r\n// Value[I].IsDigit\r\n// {$ELSE}\r\n// IsDigit(Value[I])\r\n// {$ENDIF}\r\n// do\r\n// Inc(I);\r\n// Result := TryStrToInt(Copy(Value, Start, I - Start), Number) and (I <= Len);\r\n// if Result then\r\n// begin\r\n// C := Value[I];\r\n// Inc(I);\r\n// if C = 'D' then\r\n// Day := Number\r\n// else\r\n// if C = 'H' then\r\n// Hour := Number\r\n// else\r\n// if C = 'M' then\r\n// Min := Number\r\n// else\r\n// if C = 'S' then\r\n// Sec := Number\r\n// else\r\n// Result := false;\r\n// end;\r\n// end;\r\n//\r\n//var\r\n// I: integer;\r\n//begin\r\n// Len := Length(Value);\r\n// if (Len = 0) or (Value[1] <> 'P') then\r\n// Exit(false);\r\n// I := 2;\r\n//\r\n// Day := 0;\r\n// Hour := 0;\r\n// Min := 0;\r\n// Sec := 0;\r\n//\r\n// // at least one part must exist\r\n// if not ExtractNumber(Value, I) then\r\n// Exit(false);\r\n//\r\n// // now extract as many as exist\r\n// while ExtractNumber(Value, I) do ;\r\n// Time := EncodeTime(Hour, Min, Sec, 0);\r\n// Result := true;\r\n//end;\r\n\r\nclass function TBclUtils.ISOToDate(const Value: string): TDate;\r\nbegin\r\n if not TryISOToDate(Value, Result) then\r\n raise EConvertError.CreateFmt(SInvalidDateFormat, [Value]);\r\nend;\r\n\r\nclass function TBclUtils.ISOToDateTime(const Value: string; TimeZoneMode: TTimeZoneMode): TDateTime;\r\nbegin\r\n if not TryISOToDateTime(Value, Result, TimeZoneMode) then\r\n raise EConvertError.CreateFmt(SInvalidDateFormat, [Value]);\r\nend;\r\n\r\nclass function TBclUtils.ISOToDateTime(const Value: string): TDateTime;\r\nbegin\r\n if not TryISOToDateTime(Value, Result) then\r\n raise EConvertError.CreateFmt(SInvalidDateFormat, [Value]);\r\nend;\r\n\r\nclass function TBclUtils.ISOToTime(const Value: string): TTime;\r\nbegin\r\n if not TryISOToTime(Value, Result) then\r\n raise EConvertError.CreateFmt(SInvalidDateFormat, [Value]);\r\nend;\r\n\r\nclass function TBclUtils.TryISOToDateTime(const Value: string;\r\n out DateTime: TDateTime): boolean;\r\nbegin\r\n Result := TryISOToDateTime(Value, DateTime, DefaultTimeZoneMode);\r\nend;\r\n\r\nclass function TBclUtils.TryISOToTime(const Value: string; out DateTime: TTime): boolean;\r\nbegin\r\n Result := TryISOToTime(Value, DateTime, DefaultTimeZoneMode);\r\nend;\r\n\r\n{$IFNDEF PAS2JS}\r\nclass function TBclUtils.TryStringToGuid(const Value: string; out Guid: TGuid; WithBrackets: Boolean = false): boolean;\r\nbegin\r\n // TODO: Optimize this to a TryStringToGUID\r\n try\r\n if not WithBrackets then\r\n Guid := StringToGUID('{' + Value + '}')\r\n else\r\n Guid := StringToGUID(Value);\r\n Result := true;\r\n except\r\n Result := false;\r\n end;\r\nend;\r\n{$ENDIF}\r\n\r\nclass function TBclUtils.TryISOToDate(const Text: string; out DateTime: TDate): boolean;\r\nvar\r\n TextLen: Integer;\r\n\r\n function ExtractDigit(var CharIndex: Integer; out Value: Integer): Boolean;\r\n begin\r\n Result := (CharIndex <= TextLen) and IsDigit(Text[CharIndex]);\r\n if Result then\r\n begin\r\n Value := Ord(Text[CharIndex]) - Ord('0');\r\n Inc(CharIndex);\r\n end;\r\n end;\r\n\r\n function ExtractDoubleDigit(var CharIndex: Integer; out Value: Integer): Boolean;\r\n var\r\n N10, N: Integer;\r\n begin\r\n Result := ExtractDigit(CharIndex, N10) and ExtractDigit(CharIndex, N);\r\n if Result then\r\n Value := N10 * 10 + N;\r\n end;\r\n\r\n function ExtractFourDigits(var CharIndex: Integer; out Value: Integer): Boolean;\r\n var\r\n N1000, N100, N10, N: Integer;\r\n begin\r\n Result := ExtractDigit(CharIndex, N1000) and ExtractDigit(CharIndex, N100)\r\n and ExtractDigit(CharIndex, N10) and ExtractDigit(CharIndex, N);\r\n if Result then\r\n Value := N1000 * 1000 + N100 * 100 + N10 * 10 + N;\r\n end;\r\n\r\n function ExtractChar(var CharIndex: Integer; C: Char): Boolean;\r\n begin\r\n Result := (CharIndex <= TextLen) and (Text[CharIndex] = C);\r\n if Result then\r\n Inc(CharIndex);\r\n end;\r\n\r\n function IsFinal(var CharIndex: Integer): Boolean;\r\n var\r\n C: Char;\r\n begin\r\n if CharIndex <= TextLen then\r\n C := Text[CharIndex]\r\n else\r\n C := #0;\r\n Result := (C = #0);\r\n end;\r\n\r\nvar\r\n Year, Month, Day: Integer;\r\n CharIndex: Integer;\r\n HasDateChar: Boolean;\r\n TempDate: TDateTime;\r\nbegin\r\n DateTime := 0;\r\n if Text = '' then\r\n begin\r\n Result := True;\r\n end else\r\n begin\r\n Year := 0;\r\n Month := 0;\r\n\r\n TextLen := Length(Text);\r\n CharIndex := 1;\r\n if not ExtractFourDigits(CharIndex, Year) then Exit(False);\r\n HasDateChar := ExtractChar(CharIndex, '-');\r\n if not ExtractDoubleDigit(CharIndex, Month) then Exit(False);\r\n if HasDateChar and not ExtractChar(CharIndex, '-') then Exit(False);\r\n if not ExtractDoubleDigit(CharIndex, Day) then Exit(False);\r\n if not IsFinal(CharIndex) then Exit(False);\r\n\r\n Result := TryEncodeDate(Year, Month, Day, TempDate);\r\n if Result then\r\n DateTime := TempDate;\r\n end;\r\nend;\r\n\r\n\r\nclass function TBclUtils.TryISOToDateTime(const Value: string;\r\n out DateTime: TDateTime; out TimeZone: TTimeZoneInfo;\r\n TimeZoneMode: TTimeZoneMode): boolean;\r\nvar\r\n DatePart: TDate;\r\n TimePart: TDateTime;\r\n TIndex: Integer;\r\nbegin\r\n TimeZone.Init;\r\n DateTime := 0;\r\n if Value = '' then\r\n begin\r\n Result := true;\r\n end else\r\n begin\r\n Result := False;\r\n TIndex := Pos('T', Value);\r\n if TIndex > 0 then\r\n begin\r\n Result := TryISOToDate(Copy(Value, 1, TIndex - 1), DatePart) and\r\n InternalISOToTime(Copy(Value, TIndex + 1, MaxInt), TimePart, TimeZone);\r\n if Result then\r\n DateTime := DatePart + TimePart;\r\n end\r\n else\r\n if TryISOToDate(Value, DatePart) then\r\n begin\r\n Result := True;\r\n DateTime := DatePart;\r\n end\r\n else\r\n if InternalISOToTime(Value, TimePart, TimeZone) then\r\n begin\r\n Result := True;\r\n DateTime := TimePart;\r\n end;\r\n if Result then\r\n Result := AdjustTimeZone(DateTime, TimeZone, TimeZoneMode);\r\n end;\r\nend;\r\n\r\n(*class function TBclUtils.TryISOToDate(const Value: string; out DateTime: TDate): boolean;\r\nvar\r\n Year, Month, Day: Integer;\r\nbegin\r\n DateTime := 0;\r\n if Value = '' then\r\n begin\r\n Result := true;\r\n end else\r\n begin\r\n case Length(Value) of\r\n 10:\r\n begin\r\n Result := (Value[5] = '-') and (Value[8] = '-')\r\n and TryStrToInt(Copy(Value, 1, 4), Year)\r\n and TryStrToInt(Copy(Value, 6, 2), Month)\r\n and TryStrToInt(Copy(Value, 9, 2), Day);\r\n if Result then\r\n DateTime := EncodeDate(Year, Month, Day);\r\n end;\r\n else\r\n Result := False;\r\n end;\r\n end;\r\nend;*)\r\n\r\n//{$IFDEF PAS2JS}\r\n//class function TBclUtils.TryISOToDateTime(const Value: string;\r\n// out DateTime: TDateTime; TimeZoneMode: TTimeZoneMode): boolean;\r\n//var\r\n// JD: TJSDate;\r\n//begin\r\n// JD := TJSDate.new(Value);\r\n// Result := not JSisNan(JD);\r\n// if Result then\r\n// case TimeZoneMode of\r\n// TTimeZoneMode.Error, TTimeZoneMode.Ignore, TTimeZoneMode.AsLocal:\r\n// // In Pas2JS, Error and Ignore are not supported and considered as local\r\n// DateTime := EncodeDateTime(JD.FullYear, JD.Month + 1, JD.Date,\r\n// JD.Hours, JD.Minutes, JD.Seconds, JD.Milliseconds);\r\n// else\r\n// // UTC\r\n// DateTime := EncodeDateTime(JD.UTCFullYear, JD.UTCMonth + 1, JD.UTCDate,\r\n// JD.UTCHours, JD.UTCMinutes, JD.UTCSeconds, JD.UTCMilliseconds);\r\n// end;\r\n//end;\r\n//{$ELSE}\r\nclass function TBclUtils.TryISOToDateTime(const Value: string;\r\n out DateTime: TDateTime; TimeZoneMode: TTimeZoneMode): boolean;\r\nvar\r\n TimeZone: TTimeZoneInfo;\r\nbegin\r\n Result := TryISOToDateTime(Value, DateTime, TimeZone, TimeZoneMode);\r\nend;\r\n//{$ENDIF}\r\n\r\n//class function TBclUtils.ISOToDate(const Value: string): TDate;\r\n//begin\r\n// if Value = '' then Exit(0);\r\n// Result := StrToDate(Value, FISODateSettings);\r\n//end;\r\n\r\nclass function TBclUtils.DateToISO(const Value: TDate): string;\r\nvar\r\n Year, Month, Day: Word;\r\nbegin\r\n DecodeDate(Value, Year, Month, Day);\r\n Result := Format('%.4d-%.2d-%.2d', [Year, Month, Day]);\r\nend;\r\n\r\n{ TTimeZoneInfo }\r\n\r\nprocedure TTimeZoneInfo.Init;\r\nbegin\r\n HourOff := 0;\r\n MinOff := 0;\r\n HasTimeZone := False;\r\n IsUTC := False;\r\nend;\r\n\r\n{$IFNDEF PAS2JS}\r\nclass function TBclUtils.InternalEncodeBase64(Data: Pointer; Len: Integer;\r\n EncodeTable: TBase64EncodeTable; Padding: Boolean): string;\r\nvar\r\n Output: string;\r\n\r\n procedure EncodePacket(const Packet: TPacket; NumChars: Integer; Idx: Integer);\r\n begin\r\n Output[Idx + 0] := EnCodeTable[Packet.a[0] shr 2];\r\n Output[Idx + 1] := EnCodeTable[((Packet.a[0] shl 4) or (Packet.a[1] shr 4)) and $0000003f];\r\n\r\n if NumChars < 2 then\r\n Output[Idx + 2] := '='\r\n else\r\n Output[Idx + 2] := EnCodeTable[((Packet.a[1] shl 2) or (Packet.a[2] shr 6)) and $0000003f];\r\n\r\n if NumChars < 3 then\r\n Output[Idx + 3] := '='\r\n else\r\n Output[Idx + 3] := EnCodeTable[Packet.a[2] and $0000003f];\r\n end;\r\n\r\nvar\r\n I, K, J: Integer;\r\n Packet: TPacket;\r\n Input: PByte;\r\nbegin\r\n Input := PByte(Data);\r\n Output := '';\r\n I := (Len div 3) * 4;\r\n if Len mod 3 > 0 then Inc(I, 4);\r\n SetLength(Output, I);\r\n J := 1;\r\n for I := 1 to Len div 3 do\r\n begin\r\n Packet.a[0] := Input[(I - 1) * 3];\r\n Packet.a[1] := Input[(I - 1) * 3 + 1];\r\n Packet.a[2] := Input[(I - 1) * 3 + 2];\r\n Packet.a[3] := 0;\r\n EncodePacket(Packet, 3, J);\r\n Inc(J, 4);\r\n end;\r\n K := 0;\r\n\r\n Packet.a[0] := 0;\r\n Packet.a[1] := 0;\r\n Packet.a[2] := 0;\r\n Packet.a[3] := 0;\r\n\r\n for I := Len - (Len mod 3) + 1 to Len do\r\n begin\r\n Packet.a[K] := Byte(Input[I - 1]);\r\n Inc(K);\r\n if I = Len then\r\n EncodePacket(Packet, Len mod 3, J);\r\n end;\r\n\r\n if not Padding and (Length(Output) >= 2) then\r\n begin\r\n if Output[Length(Output) - 1] = '=' then\r\n SetLength(Output, Length(Output) - 2)\r\n else\r\n if Output[Length(Output)] = '=' then\r\n SetLength(Output, Length(Output) - 1);\r\n end;\r\n Result := Output;\r\nend;\r\n{$ENDIF}\r\n\r\ninitialization\r\n {$IFNDEF PAS2JS}\r\n Randomize;\r\n {$ENDIF}\r\n DefaultTimeZoneMode := TTimeZoneMode.Error;\r\n FullISOTimeNotation := False;\r\nend.\r\n\r\n","unit XData.Web.JsonDataset;\r\n\r\ninterface\r\n\r\nuses\r\n JS, DB, Classes, SysUtils, JsonDataset;\r\n\r\ntype\r\n TJSONFieldMapper = JsonDataset.TJSONFieldMapper;\r\n// TJSONObjectFieldMapper = JsonDataset.TJSONObjectFieldMapper;\r\n\r\n TXDataObjectFieldMapper = class(TJSONObjectFieldMapper)\r\n private\r\n function GetPropValue(APropName: string; Obj: TJSObject): JSValue;\r\n public\r\n procedure SetJSONDataForField(const FieldName: string; FieldIndex: Integer; Row, Data: JSValue); override;\r\n function GetJSONDataForField(const FieldName: string; FieldIndex: Integer; Row: JSValue): JSValue; override;\r\n end;\r\n\r\n TXDataWebEntityField = class(TVariantField)\r\n protected\r\n function GetAsString: string; override;\r\n// procedure SetAsString(const aValue: string); override;\r\n// protected\r\n// function GetAsVariant: Variant; override;\r\n// procedure SetVarValue(const Value: Variant); override;\r\n// public\r\n// property AsObject: TObject read GetAsObject write SetAsObject;\r\n// function AsEntity: T;\r\n end;\r\n\r\n TXDataWebDatasetField = class(TVariantField)\r\n protected\r\n function GetAsString: string; override;\r\n end;\r\n\r\n TXDataWebCurrencyField = class(TFloatField)\r\n public\r\n constructor Create(AOwner: TComponent); override;\r\n published\r\n property Currency default True;\r\n end;\r\n\r\n// TXDataWebGuidField = class(TStringField)\r\n// end;\r\n\r\n EXDataDatasetException = class(Exception)\r\n end;\r\n\r\n TXDataJsonDataset = Class(TBaseJSONDataset)\r\n protected\r\n procedure MetaDataToFieldDefs; override;\r\n function GetFieldClass(FieldType: TFieldType): TFieldClass; override;\r\n function CreateFieldMapper: TJSONFieldMapper; override;\r\n public\r\n procedure SetJsonData(Data: JSValue);\r\n function ConvertToDateTime(AField: TField; AValue: JSValue; ARaiseException: Boolean): TDateTime; override;\r\n function ConvertDateTimeToNative(AField: TField; AValue: TDateTime): JSValue; override;\r\n property ActiveIndex;\r\n published\r\n // redeclared data set properties\r\n// property Active;\r\n property Indexes;\r\n property Filter;\r\n property Filtered;\r\n\r\n property AfterApplyUpdates;\r\n property BeforeOpen;\r\n property AfterOpen;\r\n property BeforeClose;\r\n property AfterClose;\r\n property BeforeInsert;\r\n property AfterInsert;\r\n property BeforeEdit;\r\n property AfterEdit;\r\n property BeforePost;\r\n property AfterPost;\r\n property BeforeCancel;\r\n property AfterCancel;\r\n property BeforeDelete;\r\n property AfterDelete;\r\n property BeforeScroll;\r\n property AfterScroll;\r\n property OnCalcFields;\r\n property OnDeleteError;\r\n property OnEditError;\r\n property OnFilterRecord;\r\n property OnNewRecord;\r\n property OnPostError;\r\n end;\r\n\r\nimplementation\r\n\r\nuses\r\n DBConst,\r\n Bcl.Utils;\r\n\r\n{ TXDataWebEntityField }\r\n\r\nfunction TXDataWebEntityField.GetAsString: string;\r\nvar\r\n V: JSValue;\r\nbegin\r\n V := GetData;\r\n if IsObject(V) then\r\n Result := '[object]'\r\n else\r\n if JS.IsNull(V) or JS.IsUndefined(V) then\r\n Result := 'null'\r\n else\r\n Result := inherited GetAsString;\r\nend;\r\n\r\n{ TXDataObjectFieldMapper }\r\n\r\nfunction TXDataObjectFieldMapper.GetJSONDataForField(const FieldName: string;\r\n FieldIndex: Integer; Row: JSValue): JSValue;\r\nbegin\r\n Result := GetPropValue(FieldName, TJSObject(Row));\r\n// Result:=TJSObject(Row).Properties[FieldName];\r\nend;\r\n\r\nprocedure SplitProp(const AText: string; var AProp, ASubProp: string);\r\nvar\r\n p: integer;\r\nbegin\r\n p := Pos('.', AText);\r\n if p = 0 then\r\n begin\r\n AProp := AText;\r\n ASubProp := '';\r\n end else\r\n begin\r\n AProp := Copy(AText, 1, p - 1);\r\n ASubProp := Copy(AText, p + 1, MaxInt);\r\n end;\r\nend;\r\n\r\nfunction TXDataObjectFieldMapper.GetPropValue(APropName: string;\r\n Obj: TJSObject): JSValue;\r\nvar\r\n Value: JSValue;\r\n Prop, SubProp: string;\r\nbegin\r\n if Obj = nil then Exit(Null);\r\n SplitProp(APropName, Prop, SubProp);\r\n\r\n// // Special treatment for TCriteriaResult objects\r\n// if Obj is TCriteriaResult then\r\n// begin\r\n// CriteriaResult := TCriteriaResult(Obj);\r\n// if CriteriaResult.HasProp(Prop) and (SubProp = '') then\r\n// Exit(CriteriaResult.Values[Prop])\r\n// else\r\n// Exit(Null);\r\n// end;\r\n\r\n Value := Obj.Properties[Prop];\r\n if IsObject(Value) then\r\n begin\r\n if SubProp = '' then\r\n Result := Value\r\n else\r\n Result := GetPropValue(SubProp, TJSObject(Value));\r\n end\r\n else\r\n begin\r\n if SubProp = '' then\r\n Result := Value\r\n else\r\n// if IsEnumeration(Value.TypeInfo) and SameText(SubProp, EnumNameSufix) then\r\n// Result := GetEnumName(Value.TypeInfo, Value.AsOrdinal)\r\n// else\r\n Result := Null;\r\n end;\r\nend;\r\n\r\nprocedure TXDataObjectFieldMapper.SetJSONDataForField(const FieldName: string;\r\n FieldIndex: Integer; Row, Data: JSValue);\r\nbegin\r\n inherited;\r\n\r\nend;\r\n\r\n{ TXDataJsonDataset }\r\n\r\nfunction TXDataJsonDataset.ConvertDateTimeToNative(AField: TField; AValue: TDateTime): JSValue;\r\nbegin\r\n Result := TBclUtils.DateTimeToIso(AValue, False);\r\nend;\r\n\r\nfunction TXDataJsonDataset.ConvertToDateTime(AField: TField; AValue: JSValue;\r\n ARaiseException: Boolean): TDateTime;\r\nbegin\r\n Result := 0;\r\n if JS.IsString(AValue) then\r\n begin\r\n if not TBclUtils.TryIsoToDateTime(string(AValue), Result) and ARaiseException then\r\n Raise EConvertError.CreateFmt(SErrInvalidDateTime,[String(aValue)])\r\n end\r\n else\r\n if JS.IsNumber(AValue) then\r\n Result := TDateTime(AValue);\r\nend;\r\n\r\nfunction TXDataJsonDataset.CreateFieldMapper: TJSONFieldMapper;\r\nbegin\r\n Result := TXDataObjectFieldMapper.Create;\r\nend;\r\n\r\nfunction TXDataJsonDataset.GetFieldClass(FieldType: TFieldType): TFieldClass;\r\nbegin\r\n case FieldType of\r\n ftVariant: Result := TXDataWebEntityField;\r\n ftDataset: Result := TXDataWebDatasetField;\r\n// ftCurrency: Result := TXDataWebCurrencyField;\r\n// ftGuid: Result := TXDataWebGuidField;\r\n else\r\n result := inherited GetFieldClass(FieldType);\r\n end;\r\nend;\r\n\r\nprocedure TXDataJsonDataset.MetaDataToFieldDefs;\r\nbegin\r\nend;\r\n\r\nprocedure TXDataJsonDataset.SetJsonData(Data: JSValue);\r\nvar\r\n ArrayData: TJSArray;\r\nbegin\r\n if IsArray(Data) then\r\n ArrayData := TJSArray(Data)\r\n else\r\n ArrayData := TJSArray.new(Data);\r\n Rows := ArrayData;\r\nend;\r\n\r\n{ TXDataWebDatasetField }\r\n\r\nfunction TXDataWebDatasetField.GetAsString: string;\r\nvar\r\n V: JSValue;\r\nbegin\r\n V := GetData;\r\n if IsArray(V) then\r\n Result := '[dataset]'\r\n else\r\n if JS.IsNull(V) or JS.IsUndefined(V) then\r\n Result := 'null'\r\n else\r\n Result := inherited GetAsString;\r\nend;\r\n\r\n{ TXDataWebCurrencyField }\r\n\r\nconstructor TXDataWebCurrencyField.Create(AOwner: TComponent);\r\nbegin\r\n inherited;\r\n Currency := True;\r\nend;\r\n\r\nend.\r\n","unit Bcl.Rtti.Common;\r\n\r\n{$I Bcl.inc}\r\n\r\ninterface\r\n\r\nuses\r\n SysUtils,\r\n {$IFDEF PAS2JS}\r\n JS;\r\n {$ELSE}\r\n Rtti,\r\n Bcl.TypInfo.Common;\r\n {$ENDIF}\r\n\r\ntype\r\n {$IFDEF ISDELPHI}\r\n TValue = Rtti.TValue;\r\n {$ELSE}\r\n {$IFDEF PAS2JS}\r\n TValue = JSValue;\r\n {$ELSE}\r\n TValue = Pointer;\r\n {$ENDIF}\r\n {$ENDIF}\r\n\r\n {$IFDEF PAS2JS}\r\n EInvalidJSCast = class(Exception)\r\n public\r\n constructor Create(Value: TValue; const TypeName: string); reintroduce;\r\n end;\r\n {$ENDIF}\r\n\r\nfunction TValue_IsArray(const Value: TValue): Boolean; {$IFDEF ISDELPHI}inline;{$ENDIF}\r\nfunction TValue_GetArrayLength(const Value: TValue): Integer; {$IFDEF ISDELPHI}inline;{$ENDIF}\r\nfunction TValue_GetArrayElement(const Value: TValue; Index: Integer): TValue; {$IFDEF ISDELPHI}inline;{$ENDIF}\r\nfunction TValue_AsString(const Value: TValue): String;\r\nfunction TValue_AsInteger(const Value: TValue): Integer;\r\nfunction TValue_AsOrdinal(const Value: TValue): {$IFDEF PAS2JS}Integer{$ELSE}Int64{$ENDIF};\r\nfunction TValue_AsBoolean(const Value: TValue): Boolean;\r\nfunction TValue_AsExtended(const Value: TValue): Extended;\r\nfunction TValue_AsDouble(const Value: TValue): Double;\r\nfunction TValue_AsBytes(const Value: TValue): TBytes;\r\nfunction TValue_IsEmpty(const Value: TValue): Boolean;\r\n\r\nfunction TValue_FromDateTime(const Value: TDateTime): TValue;\r\nfunction TValue_FromDate(const Value: TDate): TValue;\r\nfunction TValue_FromTime(const Value: TTime): TValue;\r\nfunction TValue_FromBytes(const Value: TBytes): TValue;\r\n\r\nfunction TValue_ToString(const Value: TValue): string;\r\n\r\n\r\nimplementation\r\n\r\n{ EInvalidJSCast }\r\n\r\n{$IFDEF PAS2JS}\r\nconstructor EInvalidJSCast.Create(Value: TValue; const TypeName: string);\r\nbegin\r\n inherited CreateFmt('Cannot cast value %s to type %s',\r\n [TValue_ToString(Value), TypeName]);\r\nend;\r\n{$ENDIF}\r\n\r\n{$IFDEF PAS2JS}\r\nfunction TValue_ToString(const Value: TValue): string;\r\nasm\r\n Result = \"\" + Value;\r\nend;\r\n{$ELSE}\r\nfunction TValue_ToString(const Value: TValue): string;\r\nbegin\r\n Result := Value.ToString;\r\nend;\r\n{$ENDIF}\r\n\r\nfunction TValue_IsArray(const Value: TValue): Boolean;\r\nbegin\r\n {$IFDEF PAS2JS}\r\n Result := JS.IsArray(Value);\r\n {$ELSE}\r\n Result := Value.IsArray;\r\n {$ENDIF}\r\nend;\r\n\r\nfunction TValue_GetArrayLength(const Value: TValue): Integer;\r\nbegin\r\n {$IFDEF PAS2JS}\r\n Result := TJSArray(Value).Length;\r\n {$ELSE}\r\n Result := Value.GetArrayLength;\r\n {$ENDIF}\r\nend;\r\n\r\nfunction TValue_GetArrayElement(const Value: TValue; Index: Integer): TValue;\r\nbegin\r\n {$IFDEF PAS2JS}\r\n Result := TJSArray(Value)[Index];\r\n {$ELSE}\r\n Result := Value.GetArrayElement(Index);\r\n {$ENDIF}\r\nend;\r\n\r\nfunction TValue_AsString(const Value: TValue): string;\r\nbegin\r\n {$IFDEF PAS2JS}\r\n if not JS.isString(Value) then\r\n raise EInvalidJSCast.Create(Value, 'String');\r\n Result := string(Value);\r\n {$ELSE}\r\n Result := Value.AsString;\r\n {$ENDIF}\r\nend;\r\n\r\nfunction TValue_AsInteger(const Value: TValue): Integer;\r\nbegin\r\n {$IFDEF PAS2JS}\r\n Result := 0; // Avoid hint\r\n asm\r\n Result = Math.floor(Value);\r\n end;\r\n if (Result <> Value) or (jsTypeOf(Value) <> 'number') then\r\n raise EInvalidJSCast.Create(Value, 'Integer');\r\n {$ELSE}\r\n Result := Value.AsInteger;\r\n {$ENDIF}\r\nend;\r\n\r\n{$IFDEF PAS2JS}\r\nfunction TValue_AsOrdinal(const Value: TValue): Integer;\r\nbegin\r\n Result := TValue_AsInteger(Value);\r\nend;\r\n{$ELSE}\r\nfunction TValue_AsOrdinal(const Value: TValue): Int64;\r\nbegin\r\n Result := Value.AsOrdinal;\r\nend;\r\n{$ENDIF}\r\n\r\nfunction TValue_AsBoolean(const Value: TValue): Boolean;\r\nbegin\r\n {$IFDEF PAS2JS}\r\n Result := False; // Avoid hint\r\n if not JS.isBoolean(Value) then\r\n raise EInvalidJSCast.Create(Value, 'Boolean');\r\n asm\r\n Result = !(Value == false);\r\n end;\r\n {$ELSE}\r\n Result := Value.AsBoolean;\r\n {$ENDIF}\r\nend;\r\n\r\nfunction TValue_AsExtended(const Value: TValue): Extended;\r\nbegin\r\n {$IFDEF PAS2JS}\r\n Result := 0.0; // Avoid hint\r\n if not JS.isNumber(Value) then\r\n raise EInvalidJSCast.Create(Value, 'Number');\r\n asm\r\n Result = rtl.getNumber(Value);\r\n end;\r\n {$ELSE}\r\n Result := Value.AsExtended;\r\n {$ENDIF}\r\nend;\r\n\r\nfunction TValue_FromDateTime(const Value: TDateTime): TValue;\r\nbegin\r\n {$IFDEF PAS2JS}\r\n Result := Value;\r\n {$ELSE}\r\n Result := TValue.From(Value);\r\n {$ENDIF}\r\nend;\r\n\r\nfunction TValue_FromDate(const Value: TDate): TValue;\r\nbegin\r\n {$IFDEF PAS2JS}\r\n Result := Value;\r\n {$ELSE}\r\n Result := TValue.From(Value);\r\n {$ENDIF}\r\nend;\r\n\r\nfunction TValue_FromTime(const Value: TTime): TValue;\r\nbegin\r\n {$IFDEF PAS2JS}\r\n Result := Value;\r\n {$ELSE}\r\n Result := TValue.From(Value);\r\n {$ENDIF}\r\nend;\r\n\r\nfunction TValue_AsDouble(const Value: TValue): Double;\r\nbegin\r\n {$IFDEF PAS2JS}\r\n Result := TValue_AsExtended(Value);\r\n {$ELSE}\r\n Result := Value.AsType;\r\n {$ENDIF}\r\nend;\r\n\r\nfunction TValue_AsBytes(const Value: TValue): TBytes;\r\nbegin\r\n {$IFDEF PAS2JS}\r\n Result := TBytes(Value);\r\n {$ELSE}\r\n Result := Value.AsType;\r\n {$ENDIF}\r\nend;\r\n\r\nfunction TValue_FromBytes(const Value: TBytes): TValue;\r\nbegin\r\n {$IFDEF PAS2JS}\r\n Result := Value;\r\n {$ELSE}\r\n Result := TValue.From(Value);\r\n {$ENDIF}\r\nend;\r\n\r\nfunction TValue_IsEmpty(const Value: TValue): Boolean;\r\nbegin\r\n {$IFDEF PAS2JS}\r\n Result := Value = nil;\r\n {$ELSE}\r\n Result := Value.IsEmpty;\r\n {$ENDIF}\r\nend;\r\n\r\nend.\r\n","unit Bcl.Json.Common;\r\n\r\n{$I Bcl.inc}\r\n\r\ninterface\r\n\r\nuses\r\n Types,\r\n {$IFDEF PAS2JS}\r\n JS;\r\n {$ELSE}\r\n Bcl.Json.Classes;\r\n {$ENDIF}\r\n\r\ntype\r\n{$IFDEF PAS2JS}\r\n TJElement = JSValue;\r\n TJObject = TJSObject;\r\n TJArray = TJSArray;\r\n{$ELSE}\r\n TJElement = Bcl.Json.Classes.TJElement;\r\n TJObject = Bcl.Json.Classes.TJObject;\r\n TJArray = Bcl.Json.Classes.TJArray;\r\n{$ENDIF}\r\n\r\nfunction JValue(const Value: string): TJElement; overload;\r\nfunction JValue(const Value: Integer): TJElement; overload;\r\n{$IFNDEF PAS2JS}\r\nfunction JValue(const Value: Int64): TJElement; overload;\r\n{$ENDIF}\r\nfunction JValue(const Value: Double): TJElement; overload;\r\nfunction JValue(const Value: Boolean): TJElement; overload;\r\n\r\nfunction JToInt(Value: TJElement): Integer;\r\nfunction JToStr(Value: TJElement): string;\r\nfunction JToBool(Value: TJElement): Boolean;\r\nfunction JIsString(Value: TJElement): Boolean;\r\nfunction JIsArray(Value: TJElement): Boolean;\r\nfunction JIsInteger(Value: TJElement): Boolean;\r\nfunction JIsBool(Value: TJElement): Boolean;\r\nfunction AsJObject(Value: TJElement): TJObject;\r\nfunction AsJArray(Value: TJElement): TJArray;\r\n\r\nfunction JStringOrDefault(Element: TJElement): string;\r\nfunction JIntegerOrDefault(Element: TJElement): Integer;\r\nfunction JBooleanOrDefault(Element: TJElement): Boolean;\r\nfunction JObjectKeys(Value: TJObject): TStringDynArray;\r\n\r\nimplementation\r\n\r\nfunction JValue(const Value: string): TJElement; overload;\r\nbegin\r\n {$IFDEF PAS2JS}\r\n Result := Value;\r\n {$ELSE}\r\n Result := TJPrimitive.Create(Value);\r\n {$ENDIF}\r\nend;\r\n\r\nfunction JValue(const Value: Integer): TJElement; overload;\r\nbegin\r\n {$IFDEF PAS2JS}\r\n Result := Value;\r\n {$ELSE}\r\n Result := TJPrimitive.Create(Value);\r\n {$ENDIF}\r\nend;\r\n\r\n{$IFNDEF PAS2JS}\r\nfunction JValue(const Value: Int64): TJElement; overload;\r\nbegin\r\n Result := TJPrimitive.Create(Value);\r\nend;\r\n{$ENDIF}\r\n\r\nfunction JValue(const Value: Double): TJElement; overload;\r\nbegin\r\n {$IFDEF PAS2JS}\r\n Result := Value;\r\n {$ELSE}\r\n Result := TJPrimitive.Create(Value);\r\n {$ENDIF}\r\nend;\r\n\r\nfunction JValue(const Value: Boolean): TJElement; overload;\r\nbegin\r\n {$IFDEF PAS2JS}\r\n Result := Value;\r\n {$ELSE}\r\n Result := TJPrimitive.Create(Value);\r\n {$ENDIF}\r\nend;\r\n\r\nfunction JToBool(Value: TJElement): Boolean;\r\nbegin\r\n {$IFDEF PAS2JS}\r\n Result := Boolean(Value);\r\n {$ELSE}\r\n Result := Value.AsBoolean;\r\n {$ENDIF}\r\nend;\r\n\r\nfunction JToInt(Value: TJElement): Integer;\r\nbegin\r\n {$IFDEF PAS2JS}\r\n Result := Integer(Value);\r\n {$ELSE}\r\n Result := Value.AsInteger;\r\n {$ENDIF}\r\nend;\r\n\r\nfunction JToStr(Value: TJElement): string;\r\nbegin\r\n {$IFDEF PAS2JS}\r\n Result := string(Value);\r\n {$ELSE}\r\n Result := Value.AsString;\r\n {$ENDIF}\r\nend;\r\n\r\nfunction JIsString(Value: TJElement): Boolean;\r\nbegin\r\n{$IFDEF PAS2JS}\r\n Result := JS.IsString(Value);\r\n{$ELSE}\r\n Result := (Value <> nil) and Value.IsString;\r\n{$ENDIF}\r\nend;\r\n\r\nfunction JIsInteger(Value: TJElement): Boolean;\r\nbegin\r\n{$IFDEF PAS2JS}\r\n Result := JS.IsInteger(Value);\r\n{$ELSE}\r\n Result := (Value <> nil) and Value.IsInteger;\r\n{$ENDIF}\r\nend;\r\n\r\nfunction JIsBool(Value: TJElement): Boolean;\r\nbegin\r\n{$IFDEF PAS2JS}\r\n Result := JS.IsBoolean(Value);\r\n{$ELSE}\r\n Result := (Value <> nil) and Value.IsBoolean;\r\n{$ENDIF}\r\nend;\r\n\r\nfunction JIsArray(Value: TJElement): Boolean;\r\nbegin\r\n{$IFDEF PAS2JS}\r\n Result := JS.IsArray(Value);\r\n{$ELSE}\r\n Result := (Value <> nil) and Value.IsArray;\r\n{$ENDIF}\r\nend;\r\n\r\nfunction AsJObject(Value: TJElement): TJObject;\r\nbegin\r\n {$IFDEF PAS2JS}\r\n Result := TJObject(Value);\r\n {$ELSE}\r\n Result := Value.AsObject;\r\n {$ENDIF}\r\nend;\r\n\r\nfunction AsJArray(Value: TJElement): TJArray;\r\nbegin\r\n {$IFDEF PAS2JS}\r\n Result := TJArray(Value);\r\n {$ELSE}\r\n Result := Value.AsArray;\r\n {$ENDIF}\r\nend;\r\n\r\nfunction JObjectKeys(Value: TJObject): TStringDynArray;\r\nbegin\r\n {$IFDEF PAS2JS}\r\n Result := TJSObject.keys(Value);\r\n {$ELSE}\r\n Result := TJObject.keys(Value)\r\n {$ENDIF}\r\nend;\r\n\r\nfunction JStringOrDefault(Element: TJElement): string;\r\nbegin\r\n if JIsString(Element) then\r\n Result := JToStr(Element)\r\n else\r\n Result := '';\r\nend;\r\n\r\nfunction JIntegerOrDefault(Element: TJElement): Integer;\r\nbegin\r\n if JIsInteger(Element) then\r\n Result := JToInt(Element)\r\n else\r\n Result := 0;\r\nend;\r\n\r\nfunction JBooleanOrDefault(Element: TJElement): Boolean;\r\nbegin\r\n if JIsBool(Element) then\r\n Result := JToBool(Element)\r\n else\r\n Result := False;\r\nend;\r\n\r\nend.\r\n","unit Bcl.Json.Attributes;\r\n\r\n{$I Bcl.inc}\r\n\r\ninterface\r\n\r\nuses\r\n Generics.Collections,\r\n {$IFNDEF PAS2JS}\r\n Bcl.JSON.Converters,\r\n {$ENDIF}\r\n Classes;\r\n\r\ntype\r\n {$IFDEF PAS2JS}\r\n TInclusionMode = (Always, NonDefault);\r\n TJsonNamingStrategy = class\r\n end;\r\n TJsonNamingStrategyClass = class of TJsonNamingStrategy;\r\n TCustomJsonConverter = class\r\n end;\r\n TCustomJsonConverterClass = class of TCustomJsonConverter;\r\n {$ELSE}\r\n TInclusionMode = Bcl.Json.Converters.TInclusionMode;\r\n {$ENDIF}\r\n\r\n\r\n JsonPropertyAttribute = class(TCustomAttribute)\r\n strict private\r\n FName: string;\r\n public\r\n constructor Create; overload;\r\n constructor Create(const AName: string); overload;\r\n property Name: string read FName;\r\n end;\r\n\r\n JsonIgnoreAttribute = class(TCustomAttribute)\r\n end;\r\n\r\n JsonIncludeAttribute = class(TCustomAttribute)\r\n strict private\r\n FInclusionMode: TInclusionMode;\r\n public\r\n constructor Create(AInclusionMode: TInclusionMode);\r\n property InclusionMode: TInclusionMode read FInclusionMode;\r\n end;\r\n\r\n JsonNamingStrategyAttribute = class(TCustomAttribute)\r\n strict private\r\n FStrategyClass: TJsonNamingStrategyClass;\r\n public\r\n constructor Create(AStrategyClass: TJsonNamingStrategyClass);\r\n property StrategyClass: TJsonNamingStrategyClass read FStrategyClass;\r\n end;\r\n\r\n JsonEnumValuesAttribute = class(TCustomAttribute)\r\n strict private\r\n FEnumValues: TList;\r\n public\r\n constructor Create(const AEnumValues: string);\r\n destructor Destroy; override;\r\n property EnumValues: TList read FEnumValues;\r\n end;\r\n\r\n JsonConverterAttribute = class(TCustomAttribute)\r\n strict private\r\n FConverterClass: TCustomJsonConverterClass;\r\n private\r\n procedure SetConverterClass(const Value: TCustomJsonConverterClass);\r\n public\r\n constructor Create(AConverterClass: TCustomJsonConverterClass);\r\n property ConverterClass: TCustomJsonConverterClass read FConverterClass write SetConverterClass;\r\n end;\r\n\r\n JsonManagedAttribute = class(TCustomAttribute)\r\n end;\r\n\r\nimplementation\r\n\r\n{ JsonPropertyAttribute }\r\n\r\nconstructor JsonPropertyAttribute.Create(const AName: string);\r\nbegin\r\n FName := AName;\r\nend;\r\n\r\nconstructor JsonPropertyAttribute.Create;\r\nbegin\r\n Create('');\r\nend;\r\n\r\n{ JsonIncludeAttribute }\r\n\r\nconstructor JsonIncludeAttribute.Create(AInclusionMode: TInclusionMode);\r\nbegin\r\n FInclusionMode := AInclusionMode;\r\nend;\r\n\r\n{ JsonNamingStrategyAttribute }\r\n\r\nconstructor JsonNamingStrategyAttribute.Create(AStrategyClass: TJsonNamingStrategyClass);\r\nbegin\r\n FStrategyClass := AStrategyClass;\r\nend;\r\n\r\n{ JsonEnumValuesAttribute }\r\n\r\nconstructor JsonEnumValuesAttribute.Create(const AEnumValues: string);\r\nvar\r\n List: TStringList;\r\n I: Integer;\r\nbegin\r\n FEnumValues := TList.Create;\r\n\r\n List := TStringList.Create;\r\n try\r\n {$IFNDEF PAS2JS}\r\n ExtractStrings([',', ';'], [' '], PChar(AEnumValues), List);\r\n {$ENDIF}\r\n for I := 0 to List.Count - 1 do\r\n FEnumValues.Add(List[I]);\r\n finally\r\n List.Free;\r\n end;\r\nend;\r\n\r\ndestructor JsonEnumValuesAttribute.Destroy;\r\nbegin\r\n FEnumValues.Free;\r\n inherited;\r\nend;\r\n\r\n{ JsonConverterAttribute }\r\n\r\nconstructor JsonConverterAttribute.Create(\r\n AConverterClass: TCustomJsonConverterClass);\r\nbegin\r\n FConverterClass := AConverterClass;\r\nend;\r\n\r\nprocedure JsonConverterAttribute.SetConverterClass(\r\n const Value: TCustomJsonConverterClass);\r\nbegin\r\n FConverterClass := Value;\r\nend;\r\n\r\nend.\r\n","unit Bcl.Collections.Common;\r\n\r\n{$I Bcl.inc}\r\n\r\ninterface\r\n\r\nuses\r\n Types,\r\n {$IFDEF ISDELPHI}\r\n Generics.Collections,\r\n {$ELSE}\r\n Bcl.Json.Common,\r\n JS,\r\n {$ENDIF}\r\n SysUtils;\r\n\r\ntype\r\n TStringMap = class\r\n private\r\n {$IFDEF PAS2JS}\r\n FMap: TJObject;\r\n {$ELSE}\r\n FDictionary: TObjectDictionary;\r\n {$ENDIF}\r\n function GetItem(const Key: string): TObject;\r\n function GetKeys: TStringDynArray;\r\n public\r\n constructor Create(AOwnsObjects: Boolean = False); reintroduce;\r\n destructor Destroy; override;\r\n procedure Clear;\r\n procedure Add(const Key: string; const Value: TObject);\r\n procedure AddOrSetValue(const Key: string; const Value: TObject);\r\n function ContainsKey(const Key: string): Boolean;\r\n procedure Remove(const Key: string);\r\n property Items[const Key: string]: TObject read GetItem; default;\r\n property Keys: TStringDynArray read GetKeys;\r\n end;\r\n\r\nimplementation\r\n\r\n{ TStringMap }\r\n\r\nprocedure TStringMap.Add(const Key: string; const Value: TObject);\r\nbegin\r\n {$IFDEF PAS2JS}\r\n FMap[Key] := Value;\r\n {$ELSE}\r\n FDictionary.Add(Key, Value);\r\n {$ENDIF}\r\nend;\r\n\r\nprocedure TStringMap.AddOrSetValue(const Key: string; const Value: TObject);\r\nbegin\r\n {$IFDEF PAS2JS}\r\n FMap[Key] := Value;\r\n {$ELSE}\r\n FDictionary.AddOrSetValue(Key, Value);\r\n {$ENDIF}\r\nend;\r\n\r\nprocedure TStringMap.Clear;\r\n{$IFDEF PAS2JS}\r\nvar\r\n I: Integer;\r\nbegin\r\n for I := Length(Keys) - 1 downto 0 do\r\n Remove(Keys[I]);\r\nend;\r\n{$ELSE}\r\nbegin\r\n FDictionary.Clear;\r\nend;\r\n{$ENDIF}\r\n\r\nfunction TStringMap.ContainsKey(const Key: string): Boolean;\r\nbegin\r\n {$IFDEF PAS2JS}\r\n Result := FMap.hasOwnProperty(Key);\r\n {$ELSE}\r\n Result := FDictionary.ContainsKey(Key);\r\n {$ENDIF}\r\nend;\r\n\r\nconstructor TStringMap.Create(AOwnsObjects: Boolean);\r\n{$IFDEF PAS2JS}\r\nbegin\r\n FMap := TJSObject.new;\r\nend;\r\n{$ELSE}\r\nvar\r\n Ownership: TDictionaryOwnerships;\r\nbegin\r\n Ownership := [];\r\n if AOwnsObjects then\r\n Ownership := [doOwnsValues];\r\n FDictionary := TObjectDictionary.Create(Ownership);\r\nend;\r\n{$ENDIF}\r\n\r\ndestructor TStringMap.Destroy;\r\nbegin\r\n {$IFDEF PAS2JS}\r\n {$ELSE}\r\n FDictionary.Free;\r\n {$ENDIF}\r\n inherited;\r\nend;\r\n\r\nfunction TStringMap.GetItem(const Key: string): TObject;\r\nbegin\r\n {$IFDEF PAS2JS}\r\n Result := TObject(FMap[Key]);\r\n {$ELSE}\r\n Result := FDictionary[Key];\r\n {$ENDIF}\r\nend;\r\n\r\nfunction TStringMap.GetKeys: TStringDynArray;\r\n{$IFDEF PAS2JS}\r\nbegin\r\n Result := TJSObject.Keys(FMap);\r\nend;\r\n{$ELSE}\r\nvar\r\n Key: string;\r\n I: Integer;\r\nbegin\r\n SetLength(Result, FDictionary.Keys.Count);\r\n I := 0;\r\n for Key in FDictionary.Keys do\r\n begin\r\n Result[I] := Key;\r\n Inc(I);\r\n end;\r\nend;\r\n{$ENDIF}\r\n\r\nprocedure TStringMap.Remove(const Key: string);\r\nbegin\r\n {$IFDEF PAS2JS}\r\n asm delete this.FMap[Key]; end;\r\n {$ELSE}\r\n FDictionary.Remove(Key);\r\n {$ENDIF}\r\nend;\r\n\r\nend.\r\n","unit Bcl.SysUtils;\r\n\r\n{$I Bcl.inc}\r\n\r\ninterface\r\n\r\nfunction TryStrToNumber(const S: string; out Value: double): Boolean;\r\nfunction NumberToStr(const Value: double): string; {$IFDEF PAS2JS}assembler;{$ENDIF}\r\n\r\nimplementation\r\n\r\nuses\r\n {$IFDEF PAS2JS}\r\n JS;\r\n {$ELSE}\r\n SysUtils;\r\n {$ENDIF}\r\n\r\nfunction TryStrToNumber(const S: string; out Value: double): Boolean;\r\n{$IFDEF PAS2JS}\r\nvar\r\n J: JSValue;\r\nbegin\r\n J := parseFloat(S);\r\n Result := not jsIsNaN(J);\r\n if Result then\r\n Value := double(J);\r\nend;\r\n{$ELSE}\r\nvar\r\n FS: TFormatSettings;\r\nbegin\r\n FS.DecimalSeparator := '.';\r\n FS.ThousandSeparator := #0;\r\n Result := TryStrToFloat(S, Value, FS);\r\nend;\r\n{$ENDIF}\r\n\r\n{$IFDEF PAS2JS}\r\nfunction NumberToStr(const Value: double): string; assembler;\r\nasm\r\n return Value.toString();\r\nend;\r\n{$ELSE}\r\nfunction NumberToStr(const Value: double): string;\r\nvar\r\n FS: TFormatSettings;\r\nbegin\r\n FS.DecimalSeparator := '.';\r\n FS.ThousandSeparator := #0;\r\n Result := FloatToStr(Value, FS);\r\nend;\r\n{$ENDIF}\r\n\r\nend.\r\n","unit XData.Types.Converters;\r\n\r\n{$I XData.inc}\r\n\r\ninterface\r\n\r\nuses\r\n SysUtils,\r\n Bcl.Rtti.Common,\r\n {$IFDEF PAS2JS}\r\n JS,\r\n {$ELSE}\r\n Rtti, TypInfo,\r\n {$ENDIF}\r\n XData.Model.Classes;\r\n\r\ntype\r\n TXDataTypeBaseConverter = class(TXDataTypeConverter)\r\n end;\r\n\r\n TXDataInt32Converter = class(TXDataTypeBaseConverter)\r\n strict protected\r\n function GetXDataType: TXDataScalarType; override;\r\n strict protected\r\n function TryValueToUrl(const Value: TValue; out Literal: string): boolean; override;\r\n function TryUrlToValue(const Literal: string; out Value: TValue): boolean; override;\r\n end;\r\n\r\n TXDataInt16Converter = class(TXDataTypeBaseConverter)\r\n strict protected\r\n function GetXDataType: TXDataScalarType; override;\r\n strict protected\r\n function TryValueToUrl(const Value: TValue; out Literal: string): boolean; override;\r\n function TryUrlToValue(const Literal: string; out Value: TValue): boolean; override;\r\n end;\r\n\r\n {$IFDEF PAS2JS}\r\n TXDataInt64Converter = TXDataInt32Converter;\r\n {$ELSE}\r\n TXDataInt64Converter = class(TXDataTypeBaseConverter)\r\n strict protected\r\n function GetXDataType: TXDataScalarType; override;\r\n strict protected\r\n function TryValueToUrl(const Value: TValue; out Literal: string): boolean; override;\r\n function TryUrlToValue(const Literal: string; out Value: TValue): boolean; override;\r\n end;\r\n {$ENDIF}\r\n\r\n TXDataBooleanConverter = class(TXDataTypeBaseConverter)\r\n strict protected\r\n function GetXDataType: TXDataScalarType; override;\r\n strict protected\r\n function TryValueToUrl(const Value: TValue; out Literal: string): boolean; override;\r\n function TryUrlToValue(const Literal: string; out Value: TValue): boolean; override;\r\n end;\r\n\r\n TXDataDoubleConverter = class(TXDataTypeBaseConverter)\r\n strict protected\r\n function GetXDataType: TXDataScalarType; override;\r\n strict protected\r\n function TryValueToUrl(const Value: TValue; out Literal: string): boolean; override;\r\n function TryUrlToValue(const Literal: string; out Value: TValue): boolean; override;\r\n end;\r\n\r\n {$IFNDEF PAS2JS}\r\n TXDataCurrencyConverter = class(TXDataTypeBaseConverter)\r\n strict protected\r\n function GetXDataType: TXDataScalarType; override;\r\n strict protected\r\n function TryValueToUrl(const Value: TValue; out Literal: string): boolean; override;\r\n function TryUrlToValue(const Literal: string; out Value: TValue): boolean; override;\r\n end;\r\n {$ENDIF}\r\n\r\n TXDataDateTimeConverter = class(TXDataTypeBaseConverter)\r\n strict protected\r\n function GetXDataType: TXDataScalarType; override;\r\n strict protected\r\n function TryValueToUrl(const Value: TValue; out Literal: string): boolean; override;\r\n function TryUrlToValue(const Literal: string; out Value: TValue): boolean; override;\r\n end;\r\n\r\n TXDataDateConverter = class(TXDataTypeBaseConverter)\r\n strict protected\r\n function GetXDataType: TXDataScalarType; override;\r\n strict protected\r\n function TryValueToUrl(const Value: TValue; out Literal: string): boolean; override;\r\n function TryUrlToValue(const Literal: string; out Value: TValue): boolean; override;\r\n end;\r\n\r\n TXDataTimeConverter = class(TXDataTypeBaseConverter)\r\n strict protected\r\n function GetXDataType: TXDataScalarType; override;\r\n strict protected\r\n function TryValueToUrl(const Value: TValue; out Literal: string): boolean; override;\r\n function TryUrlToValue(const Literal: string; out Value: TValue): boolean; override;\r\n end;\r\n\r\n TXDataBinaryConverter = class(TXDataTypeBaseConverter)\r\n strict protected\r\n function GetXDataType: TXDataScalarType; override;\r\n strict protected\r\n function TryValueToUrl(const Value: TValue; out Literal: string): boolean; override;\r\n function TryUrlToValue(const Literal: string; out Value: TValue): boolean; override;\r\n end;\r\n\r\n TXDataStringConverter = class(TXDataTypeBaseConverter)\r\n strict protected\r\n function GetXDataType: TXDataScalarType; override;\r\n strict protected\r\n function TryValueToUrl(const Value: TValue; out Literal: string): boolean; override;\r\n function TryUrlToValue(const Literal: string; out Value: TValue): boolean; override;\r\n end;\r\n\r\n TXDataUnquotedStringConverter = class(TXDataStringConverter)\r\n strict protected\r\n function TryValueToUrl(const Value: TValue; out Literal: string): boolean; override;\r\n end;\r\n\r\n TXDataCharConverter = class(TXDataTypeBaseConverter)\r\n strict protected\r\n function GetXDataType: TXDataScalarType; override;\r\n strict protected\r\n function TryValueToUrl(const Value: TValue; out Literal: string): boolean; override;\r\n function TryUrlToValue(const Literal: string; out Value: TValue): boolean; override;\r\n end;\r\n\r\n TXDataGuidConverter = class(TXDataTypeBaseConverter)\r\n strict protected\r\n function GetXDataType: TXDataScalarType; override;\r\n strict protected\r\n function TryValueToUrl(const Value: TValue; out Literal: string): boolean; override;\r\n function TryUrlToValue(const Literal: string; out Value: TValue): boolean; override;\r\n end;\r\n\r\n TXDataVariantConverter = class(TXDataTypeBaseConverter)\r\n strict protected\r\n function GetXDataType: TXDataScalarType; override;\r\n strict protected\r\n function TryValueToUrl(const Value: TValue; out Literal: string): boolean; override;\r\n function TryUrlToValue(const Literal: string; out Value: TValue): boolean; override;\r\n end;\r\n\r\n TXDataEnumConverter = class(TXDataTypeConverter)\r\n strict private\r\n {$IFDEF AUTOREFCOUNT}[Weak]{$ENDIF}\r\n FEnumType: TXDataEnumType;\r\n strict protected\r\n function GetXDataType: TXDataScalarType; override;\r\n strict protected\r\n function TryValueToUrl(const Value: TValue; out Literal: string): boolean; override;\r\n function TryUrlToValue(const Literal: string; out Value: TValue): boolean; override;\r\n public\r\n constructor Create(AEnumType: TXDataEnumType); reintroduce;\r\n end;\r\n\r\nimplementation\r\n\r\nuses\r\n XData.Model.Types;\r\n\r\nprocedure AddDefaultUrlConverters;\r\nvar\r\n Types: TXDataPrimitiveTypes;\r\nbegin\r\n Types := TXDataPrimitiveTypes.Instance;\r\n\r\n // Integer types\r\n Types.Int32Type.UrlConverter := TXDataInt32Converter.Create;\r\n Types.Int16Type.UrlConverter := TXDataInt16Converter.Create;\r\n Types.Int64Type.UrlConverter := TXDataInt64Converter.Create;\r\n\r\n // Boolean types\r\n Types.BooleanType.UrlConverter := TXDataBooleanConverter.Create;\r\n\r\n // Float types\r\n Types.DoubleType.UrlConverter := TXDataDoubleConverter.Create;\r\n {$IFDEF PAS2JS}\r\n Types.CurrencyType.UrlConverter := TXDataDoubleConverter.Create;\r\n {$ELSE}\r\n Types.CurrencyType.UrlConverter := TXDataCurrencyConverter.Create;\r\n {$ENDIF}\r\n\r\n // Date time types\r\n Types.DateTimeType.UrlConverter := TXDataDateTimeConverter.Create;\r\n Types.DateType.UrlConverter := TXDataDateConverter.Create;\r\n Types.TimeType.UrlConverter := TXDataTimeConverter.Create;\r\n\r\n // Blob types\r\n Types.BinaryType.UrlConverter := TXDataBinaryConverter.Create;\r\n Types.StreamType.UrlConverter := TXDataBinaryConverter.Create;\r\n\r\n // String types\r\n Types.StringType.UrlConverter := TXDataStringConverter.Create;\r\n\r\n // Char types\r\n// Types.CharType.UrlConverter := TXDataCharConverter.Create;\r\n\r\n // Guid types\r\n Types.GuidType.UrlConverter := TXDataGuidConverter.Create;\r\n\r\n // Variant\r\n Types.VariantType.UrlConverter := TXDataVariantConverter.Create;\r\nend;\r\n\r\n{ TXDataIntegerConverter }\r\n\r\nfunction TXDataInt32Converter.GetXDataType: TXDataScalarType;\r\nbegin\r\n Result := TXDataPrimitiveTypes.Instance.Int32Type;\r\nend;\r\n\r\nfunction TXDataInt32Converter.TryUrlToValue(const Literal: string; out Value: TValue): boolean;\r\nvar\r\n IntValue: integer;\r\nbegin\r\n Result := TXDataPrimitiveTypes.Instance.Int32Type.LiteralToValue(Literal, IntValue);\r\n Value := IntValue;\r\nend;\r\n\r\nfunction TXDataInt32Converter.TryValueToUrl(const Value: TValue; out Literal: string): boolean;\r\nbegin\r\n Result := TXDataPrimitiveTypes.Instance.Int32Type.ValueToLiteral(\r\n TValue_AsInteger(Value), Literal);\r\nend;\r\n\r\n{ TXDataInt16Converter }\r\n\r\nfunction TXDataInt16Converter.GetXDataType: TXDataScalarType;\r\nbegin\r\n Result := TXDataPrimitiveTypes.Instance.Int16Type;\r\nend;\r\n\r\nfunction TXDataInt16Converter.TryUrlToValue(const Literal: string; out Value: TValue): boolean;\r\nvar\r\n IntValue: integer;\r\nbegin\r\n Result := TXDataPrimitiveTypes.Instance.Int16Type.LiteralToValue(Literal, IntValue);\r\n Value := IntValue;\r\nend;\r\n\r\nfunction TXDataInt16Converter.TryValueToUrl(const Value: TValue; out Literal: string): boolean;\r\nbegin\r\n Result := TXDataPrimitiveTypes.Instance.Int16Type.ValueToLiteral(\r\n TValue_AsInteger(Value), Literal);\r\nend;\r\n\r\n{ TXDataInt64Converter }\r\n\r\n{$IFNDEF PAS2JS}\r\nfunction TXDataInt64Converter.GetXDataType: TXDataScalarType;\r\nbegin\r\n Result := TXDataPrimitiveTypes.Instance.Int64Type;\r\nend;\r\n\r\nfunction TXDataInt64Converter.TryUrlToValue(const Literal: string; out Value: TValue): boolean;\r\nvar\r\n IntValue: Int64;\r\nbegin\r\n Result := TXDataPrimitiveTypes.Instance.Int64Type.LiteralToValue(Literal, IntValue);\r\n Value := IntValue;\r\nend;\r\n\r\nfunction TXDataInt64Converter.TryValueToUrl(const Value: TValue; out Literal: string): boolean;\r\nbegin\r\n Result := TXDataPrimitiveTypes.Instance.Int64Type.ValueToLiteral(\r\n TValue_AsOrdinal(Value),\r\n Literal);\r\nend;\r\n{$ENDIF}\r\n\r\n{ TXDataBooleanConverter }\r\n\r\nfunction TXDataBooleanConverter.GetXDataType: TXDataScalarType;\r\nbegin\r\n Result := TXDataPrimitiveTypes.Instance.BooleanType;\r\nend;\r\n\r\nfunction TXDataBooleanConverter.TryUrlToValue(const Literal: string; out Value: TValue): boolean;\r\nvar\r\n BoolValue: boolean;\r\nbegin\r\n Result := TXDataPrimitiveTypes.Instance.BooleanType.LiteralToValue(Literal, BoolValue);\r\n if Result then\r\n Value := BoolValue;\r\nend;\r\n\r\nfunction TXDataBooleanConverter.TryValueToUrl(const Value: TValue; out Literal: string): boolean;\r\nbegin\r\n Result := TXDataPrimitiveTypes.Instance.BooleanType.ValueToLiteral(\r\n TValue_AsBoolean(Value), Literal);\r\nend;\r\n\r\n{ TXDataDoubleConverter }\r\n\r\nfunction TXDataDoubleConverter.GetXDataType: TXDataScalarType;\r\nbegin\r\n Result := TXDataPrimitiveTypes.Instance.DoubleType;\r\nend;\r\n\r\nfunction TXDataDoubleConverter.TryUrlToValue(const Literal: string; out Value: TValue): boolean;\r\nvar\r\n DoubleValue: Double;\r\nbegin\r\n Result := TXDataPrimitiveTypes.Instance.DoubleType.LiteralToValue(Literal, DoubleValue);\r\n if Result then\r\n Value := DoubleValue;\r\nend;\r\n\r\nfunction TXDataDoubleConverter.TryValueToUrl(const Value: TValue; out Literal: string): boolean;\r\nbegin\r\n Result := TXDataPrimitiveTypes.Instance.DoubleType.ValueToLiteral(\r\n TValue_AsExtended(Value), Literal);\r\nend;\r\n\r\n{ TXDataDateTimeConverter }\r\n\r\nfunction TXDataDateTimeConverter.GetXDataType: TXDataScalarType;\r\nbegin\r\n Result := TXDataPrimitiveTypes.Instance.DateTimeType;\r\nend;\r\n\r\nfunction TXDataDateTimeConverter.TryUrlToValue(const Literal: string; out Value: TValue): boolean;\r\nvar\r\n DateValue: TDateTime;\r\nbegin\r\n Result := TXDataPrimitiveTypes.Instance.DateTimeType.LiteralToValue(Literal, DateValue);\r\n if Result then\r\n Value := TValue_FromDateTime(DateValue);\r\nend;\r\n\r\nfunction TXDataDateTimeConverter.TryValueToUrl(const Value: TValue; out Literal: string): boolean;\r\nbegin\r\n {$IFDEF PAS2JS}\r\n // for Pas2JS, value can be string thus we just bypass the value (todo: test format yyyy-mm-dd)\r\n if JS.IsString(Value) then\r\n begin\r\n Result := True;\r\n Literal := string(value);\r\n end\r\n else\r\n {$ENDIF}\r\n Result := TXDataPrimitiveTypes.Instance.DateTimeType.ValueToLiteral(\r\n TDateTime(TValue_AsDouble(Value)), Literal);\r\nend;\r\n\r\n{ TXDataTimeConverter }\r\n\r\nfunction TXDataTimeConverter.GetXDataType: TXDataScalarType;\r\nbegin\r\n Result := TXDataPrimitiveTypes.Instance.TimeType;\r\nend;\r\n\r\nfunction TXDataTimeConverter.TryUrlToValue(const Literal: string; out Value: TValue): boolean;\r\nvar\r\n TimeValue: TTime;\r\nbegin\r\n Result := TXDataPrimitiveTypes.Instance.TimeType.LiteralToValue(Literal, TimeValue);\r\n if Result then\r\n Value := TValue_FromTime(TimeValue);\r\nend;\r\n\r\nfunction TXDataTimeConverter.TryValueToUrl(const Value: TValue; out Literal: string): boolean;\r\nbegin\r\n {$IFDEF PAS2JS}\r\n // for Pas2JS, value can be string thus we just bypass the value (todo: test format yyyy-mm-dd)\r\n if JS.IsString(Value) then\r\n begin\r\n Result := True;\r\n Literal := string(value);\r\n end\r\n else\r\n {$ENDIF}\r\n Result := TXDataPrimitiveTypes.Instance.TimeType.ValueToLiteral(\r\n TTime(TValue_AsDouble(Value)), Literal);\r\nend;\r\n\r\n{ TXDataBinaryConverter }\r\n\r\nfunction TXDataBinaryConverter.GetXDataType: TXDataScalarType;\r\nbegin\r\n Result := TXDataPrimitiveTypes.Instance.BinaryType;\r\nend;\r\n\r\nfunction TXDataBinaryConverter.TryUrlToValue(const Literal: string; out Value: TValue): boolean;\r\nvar\r\n Bytes: TBytes;\r\n StringValue: string;\r\nbegin\r\n StringValue := Literal;\r\n LiteralUnquote(StringValue);\r\n Result := TXDataPrimitiveTypes.Instance.BinaryType.LiteralToValue(StringValue, Bytes);\r\n if Result then\r\n Value := TValue_FromBytes(Bytes);\r\nend;\r\n\r\nfunction TXDataBinaryConverter.TryValueToUrl(const Value: TValue; out Literal: string): boolean;\r\nvar\r\n Bytes: TBytes;\r\nbegin\r\n Bytes := TValue_AsBytes(Value);\r\n Result := TXDataPrimitiveTypes.Instance.BinaryType.ValueToLiteral(Bytes, Literal);\r\n Literal := LiteralQuote(Literal);\r\nend;\r\n\r\n{ TXDataStringConverter }\r\n\r\nfunction TXDataStringConverter.GetXDataType: TXDataScalarType;\r\nbegin\r\n Result := TXDataPrimitiveTypes.Instance.StringType;\r\nend;\r\n\r\nfunction TXDataStringConverter.TryUrlToValue(const Literal: string; out Value: TValue): boolean;\r\nvar\r\n StringValue: string;\r\nbegin\r\n Result := TXDataPrimitiveTypes.Instance.StringType.LiteralToValue(Literal, StringValue)\r\n and LiteralUnquote(StringValue);\r\n if Result then\r\n Value := StringValue;\r\nend;\r\n\r\nfunction TXDataStringConverter.TryValueToUrl(const Value: TValue; out Literal: string): boolean;\r\nbegin\r\n Result := TXDataPrimitiveTypes.Instance.StringType.ValueToLiteral(\r\n LiteralQuote(TValue_AsString(Value)), Literal);\r\nend;\r\n\r\n{ TXDataCharConverter }\r\n\r\nfunction TXDataCharConverter.GetXDataType: TXDataScalarType;\r\nbegin\r\n Result := TXDataPrimitiveTypes.Instance.StringType;\r\nend;\r\n\r\nfunction TXDataCharConverter.TryUrlToValue(const Literal: string; out Value: TValue): boolean;\r\nvar\r\n StringValue: string;\r\nbegin\r\n Result := TXDataPrimitiveTypes.Instance.StringType.LiteralToValue(Literal, StringValue)\r\n and LiteralUnquote(StringValue);\r\n if Result then\r\n Value := StringValue;\r\nend;\r\n\r\nfunction TXDataCharConverter.TryValueToUrl(const Value: TValue; out Literal: string): boolean;\r\nbegin\r\n Result := TXDataPrimitiveTypes.Instance.StringType.ValueToLiteral(\r\n LiteralQuote(TValue_AsString(Value)), Literal);\r\nend;\r\n\r\n{ TXDataGuidConverter }\r\n\r\nfunction TXDataGuidConverter.GetXDataType: TXDataScalarType;\r\nbegin\r\n Result := TXDataPrimitiveTypes.Instance.GuidType;\r\nend;\r\n\r\n{$IFDEF PAS2JS}\r\ntype TGuid = string;\r\n{$ENDIF}\r\n\r\nfunction TXDataGuidConverter.TryUrlToValue(const Literal: string; out Value: TValue): boolean;\r\nvar\r\n GuidValue: TGuid;\r\nbegin\r\n Result := TXDataPrimitiveTypes.Instance.GuidType.LiteralToValue(Literal, GuidValue);\r\n if Result then\r\n {$IFDEF PAS2JS}\r\n Value := GuidValue;\r\n {$ELSE}\r\n Value := TValue.From(GuidValue);\r\n {$ENDIF}\r\nend;\r\n\r\nfunction TXDataGuidConverter.TryValueToUrl(const Value: TValue; out Literal: string): boolean;\r\nbegin\r\n {$IFDEF PAS2JS}\r\n Result := TXDataPrimitiveTypes.Instance.GuidType.ValueToLiteral(TValue_AsString(Value), Literal);\r\n {$ELSE}\r\n Result := TXDataPrimitiveTypes.Instance.GuidType.ValueToLiteral(Value.AsType, Literal);\r\n {$ENDIF}\r\nend;\r\n\r\n{ TXDataCurrencyConverter }\r\n\r\n{$IFNDEF PAS2JS}\r\nfunction TXDataCurrencyConverter.GetXDataType: TXDataScalarType;\r\nbegin\r\n Result := TXDataPrimitiveTypes.Instance.CurrencyType;\r\nend;\r\n{$ENDIF}\r\n\r\n{$IFNDEF PAS2JS}\r\nfunction TXDataCurrencyConverter.TryUrlToValue(const Literal: string; out Value: TValue): boolean;\r\nvar\r\n Curr: Currency;\r\nbegin\r\n Result := TXDataPrimitiveTypes.Instance.CurrencyType.LiteralToValue(Literal, Curr);\r\n if Result then\r\n Value := Curr;\r\nend;\r\n{$ENDIF}\r\n\r\n{$IFNDEF PAS2JS}\r\nfunction TXDataCurrencyConverter.TryValueToUrl(const Value: TValue; out Literal: string): boolean;\r\nbegin\r\n Result := TXDataPrimitiveTypes.Instance.CurrencyType.ValueToLiteral(Value.AsCurrency, Literal);\r\nend;\r\n{$ENDIF}\r\n\r\n{ TXDataEnumConverter }\r\n\r\nconstructor TXDataEnumConverter.Create(AEnumType: TXDataEnumType);\r\nbegin\r\n FEnumType := AEnumType;\r\nend;\r\n\r\nfunction TXDataEnumConverter.GetXDataType: TXDataScalarType;\r\nbegin\r\n Result := FEnumType;\r\nend;\r\n\r\nfunction TXDataEnumConverter.TryUrlToValue(const Literal: string; out Value: TValue): boolean;\r\nvar\r\n I: integer;\r\n StringValue: string;\r\nbegin\r\n StringValue := Literal;\r\n Result := False;\r\n if LiteralUnquote(StringValue) then\r\n for I := 0 to FEnumType.Members.Count - 1 do\r\n if StringValue = FEnumType.Members[I].Name then\r\n begin\r\n Value := FEnumType.Members[I].Value;\r\n Exit(True);\r\n end;\r\nend;\r\n\r\nfunction TXDataEnumConverter.TryValueToUrl(const Value: TValue; out Literal: string): boolean;\r\nvar\r\n I: Integer;\r\n EnumValue: Integer;\r\nbegin\r\n EnumValue := TValue_AsOrdinal(Value);\r\n Result := False;\r\n for I := 0 to FEnumType.Members.Count - 1 do\r\n if EnumValue = FEnumType.Members[I].Value then\r\n begin\r\n Result := TXDataPrimitiveTypes.Instance.StringType.ValueToLiteral(\r\n FEnumType.Members[I].Name,\r\n Literal);\r\n Exit;\r\n end;\r\nend;\r\n\r\n{ TXDataDateConverter }\r\n\r\nfunction TXDataDateConverter.GetXDataType: TXDataScalarType;\r\nbegin\r\n Result := TXDataPrimitiveTypes.Instance.DateType;\r\nend;\r\n\r\nfunction TXDataDateConverter.TryUrlToValue(const Literal: string; out Value: TValue): boolean;\r\nvar\r\n DateValue: TDate;\r\nbegin\r\n Result := TXDataPrimitiveTypes.Instance.DateType.LiteralToValue(Literal, DateValue);\r\n if Result then\r\n Value := TValue_FromDate(DateValue);\r\nend;\r\n\r\nfunction TXDataDateConverter.TryValueToUrl(const Value: TValue; out Literal: string): boolean;\r\nbegin\r\n {$IFDEF PAS2JS}\r\n // for Pas2JS, value can be string thus we just bypass the value (todo: test format yyyy-mm-dd)\r\n if JS.IsString(Value) then\r\n begin\r\n Result := True;\r\n Literal := string(value);\r\n end\r\n else\r\n {$ENDIF}\r\n Result := TXDataPrimitiveTypes.Instance.DateType.ValueToLiteral(\r\n TDate(TValue_AsDouble(Value)), Literal);\r\nend;\r\n\r\n{ TXDataVariantConverter }\r\n\r\nfunction TXDataVariantConverter.GetXDataType: TXDataScalarType;\r\nbegin\r\n Result := TXDataPrimitiveTypes.Instance.VariantType;\r\nend;\r\n\r\n{$IFDEF PAS2JS}\r\ntype\r\n Variant = JSValue;\r\n{$ENDIF}\r\n\r\nfunction TXDataVariantConverter.TryUrlToValue(const Literal: string; out Value: TValue): boolean;\r\nvar\r\n VariantValue: Variant;\r\nbegin\r\n Result := TXDataPrimitiveTypes.Instance.VariantType.LiteralToValue(Literal, VariantValue);\r\n {$IFNDEF PAS2JS}\r\n if Result then\r\n Value := TValue.From(VariantValue);\r\n {$ENDIF}\r\nend;\r\n\r\nfunction TXDataVariantConverter.TryValueToUrl(const Value: TValue; out Literal: string): boolean;\r\nbegin\r\n Result := TXDataPrimitiveTypes.Instance.VariantType.ValueToLiteral(\r\n {$IFDEF PAS2JS}\r\n Value,\r\n {$ELSE}\r\n Value.AsType,\r\n {$ENDIF}\r\n Literal);\r\nend;\r\n\r\n{ TXDataUnquotedStringConverter }\r\n\r\nfunction TXDataUnquotedStringConverter.TryValueToUrl(const Value: TValue; out Literal: string): boolean;\r\nbegin\r\n Result := TXDataPrimitiveTypes.Instance.StringType.ValueToLiteral(TValue_AsString(Value), Literal);\r\nend;\r\n\r\ninitialization\r\n AddDefaultUrlConverters;\r\n\r\nend.\r\n\r\n","unit XData.Utils;\r\n\r\n{$I XData.inc}\r\n\r\ninterface\r\n\r\nuses\r\n SysUtils;\r\n\r\ntype\r\n TXDataUtils = class\r\n public\r\n class function GetNameAndKey(const Input: string; out Name, Key: string): boolean;\r\n class procedure GetQualifiedName(const AQualifiedName: string; out APrefix, AName: string); {$IFNDEF PAS2JS}{$IFNDEF PAS2JS}static;{$ENDIF}{$ENDIF}\r\n class function XSBoolean(const S: string; ADefault: boolean = false): boolean; {$IFNDEF PAS2JS}inline; static;{$ENDIF}\r\n// class function DateTimeToDayTimeDuration(const Value: TTime): string; {$IFNDEF PAS2JS}static;{$ENDIF}\r\n// class function TryDayTimeDurationToDateTime(const Value: string; out Time: TTime): boolean; {$IFNDEF PAS2JS}static;{$ENDIF}\r\n class function CombineUrlFast(const AbsoluteUrl, RelativeUrl: string): string; {$IFNDEF PAS2JS}static;{$ENDIF}\r\n {$IFDEF PAS2JS}\r\n class function DateTimeToUnix(const Value: TDateTime): Integer;\r\n {$ELSE}\r\n class function DateTimeToUnix(const Value: TDateTime): Int64; static;\r\n {$ENDIF}\r\n class function DateTimeToJson(const Value: TDateTime): string; {$IFNDEF PAS2JS}static;{$ENDIF}\r\n end;\r\n\r\nimplementation\r\n\r\n{ TXDataUtils }\r\n\r\nclass function TXDataUtils.CombineUrlFast(const AbsoluteUrl,\r\n RelativeUrl: string): string;\r\nbegin\r\n // Do a faster url combination because we know RelativeUrl comes correct\r\n Result := AbsoluteUrl;\r\n if (Length(Result) > 0) and (Result[Length(Result)] <> '/') then\r\n Result := Result + '/';\r\n Result := Result + RelativeUrl;\r\nend;\r\n\r\n//class function TXDataUtils.DateTimeToDayTimeDuration(\r\n// const Value: TTime): string;\r\n//var\r\n// D, H, M, S, MS: Word;\r\n//begin\r\n// D := Trunc(Value);\r\n// DecodeTime(Value, H, M, S, MS);\r\n// Result := 'P';\r\n// if D > 0 then\r\n// Result := Result + IntToStr(D) + 'D';\r\n// if H > 0 then\r\n// Result := Result + IntToStr(H) + 'H';\r\n// if M > 0 then\r\n// Result := Result + IntToStr(M) + 'M';\r\n// if S > 0 then\r\n// Result := Result + IntToStr(S) + 'S';\r\n// if Result = 'P' then\r\n// Result := 'P0D';\r\n//end;\r\n\r\nclass function TXDataUtils.DateTimeToJson(const Value: TDateTime): string;\r\nbegin\r\n Result := Format('\\/Date(%d)\\/', [DateTimeToUnix(Value) * 1000]);\r\nend;\r\n\r\n{$IFDEF PAS2JS}\r\nclass function TXDataUtils.DateTimeToUnix(const Value: TDateTime): Integer;\r\n{$ELSE}\r\nclass function TXDataUtils.DateTimeToUnix(const Value: TDateTime): Int64;\r\n{$ENDIF}\r\nbegin\r\n Result := Round((Value - UnixDateDelta) * SecsPerDay);\r\nend;\r\n\r\nclass function TXDataUtils.GetNameAndKey(const Input: string; out Name, Key: string): boolean;\r\nvar\r\n P1: integer;\r\n Len: integer;\r\n KeyLen: integer;\r\nbegin\r\n P1 := Pos('(', Input);\r\n Len := Length(Input);\r\n KeyLen := Len - P1 - 1;\r\n Result :=\r\n (P1 > 1) //open parentesis must exist and must have one space for name\r\n and (Len >= 4) // at least one char for name and one char for key plus 2 parentesis: A(B)\r\n and (Input[Len] = ')') // last char must be close parentesis\r\n and (KeyLen > 0); // and key must have at least one char\r\n if Result then\r\n begin\r\n Name := Copy(Input, 1, P1 - 1);\r\n Key := Copy(Input, P1 + 1, KeyLen);\r\n end;\r\nend;\r\n\r\nclass procedure TXDataUtils.GetQualifiedName(const AQualifiedName: string;\r\n out APrefix, AName: string);\r\nvar\r\n I, Len: integer;\r\nbegin\r\n Len := Length(AQualifiedName);\r\n I := Len;\r\n while I > 0 do\r\n begin\r\n if AQualifiedName[I] = '.' then\r\n break;\r\n Dec(I);\r\n end;\r\n if I > 0 then\r\n begin\r\n APrefix := Copy(AQualifiedName, 1, I - 1);\r\n AName := Copy(AQualifiedName, I + 1, MaxInt)\r\n end\r\n else\r\n begin\r\n APrefix := '';\r\n AName := AQualifiedName;\r\n end;\r\nend;\r\n\r\n//class function TXDataUtils.TryDayTimeDurationToDateTime(const Value: string;\r\n// out Time: TTime): boolean;\r\n//var\r\n// Len: integer;\r\n// Day, Hour, Min, Sec: integer;\r\n//\r\n// function ExtractNumber(const Value: string; var I: integer): boolean;\r\n// var\r\n// Start: integer;\r\n// C: Char;\r\n// Number: integer;\r\n// begin\r\n// Start := I;\r\n// {$IFDEF DELPHIXE4_LVL}\r\n// while (I <= Len) and Value[I].IsDigit do\r\n// {$ELSE}\r\n// while (I <= Len) and IsDigit(Value[I]) do\r\n// {$ENDIF}\r\n// Inc(I);\r\n// Result := TryStrToInt(Copy(Value, Start, I - Start), Number) and (I <= Len);\r\n// if Result then\r\n// begin\r\n// C := Value[I];\r\n// Inc(I);\r\n// if C = 'D' then\r\n// Day := Number\r\n// else\r\n// if C = 'H' then\r\n// Hour := Number\r\n// else\r\n// if C = 'M' then\r\n// Min := Number\r\n// else\r\n// if C = 'S' then\r\n// Sec := Number\r\n// else\r\n// Result := false;\r\n// end;\r\n// end;\r\n//\r\n//var\r\n// I: integer;\r\n//begin\r\n// Len := Length(Value);\r\n// if (Len = 0) or (Value[1] <> 'P') then\r\n// Exit(false);\r\n// I := 2;\r\n//\r\n// Day := 0;\r\n// Hour := 0;\r\n// Min := 0;\r\n// Sec := 0;\r\n//\r\n// // at least one part must exist\r\n// if not ExtractNumber(Value, I) then\r\n// Exit(false);\r\n//\r\n// // now extract as many as exist\r\n// while ExtractNumber(Value, I) do ;\r\n// Time := EncodeTime(Hour, Min, Sec, 0);\r\n// Result := true;\r\n//end;\r\n\r\nclass function TXDataUtils.XSBoolean(const S: string; ADefault: boolean): boolean;\r\nbegin\r\n if S = '' then\r\n Exit(ADefault);\r\n Result := (S = 'true') or (S = '1') or (S = 'yes');\r\nend;\r\n\r\nend.\r\n\r\n","unit XData.Model.Classes;\r\n\r\n{$I XData.inc}\r\n\r\ninterface\r\n\r\nuses\r\n Classes, SysUtils, Types, StrUtils, TypInfo,\r\n {$IFDEF ISDELPHI}\r\n Rtti,\r\n Bcl.TypInfo.Common,\r\n {$ELSE}\r\n// JS,\r\n {$ENDIF}\r\n {$IFDEF GENERICS}\r\n Generics.Defaults,\r\n Generics.Collections,\r\n {$ELSE}\r\n Contnrs,\r\n {$ENDIF}\r\n Bcl.Json.Attributes,\r\n Bcl.Collections.Common,\r\n Bcl.Rtti.Common;\r\n\r\ntype\r\n// TXDataVersion = (v1, v2);\r\n TXDataEntityType = class;\r\n TXDataStructuredType = class;\r\n TXDataInstanceType = class;\r\n\r\n TXTypeKind = (\r\n xtUndefined,\r\n xtText,\r\n xtInt32,\r\n xtInt64,\r\n xtDouble,\r\n xtBoolean,\r\n xtDateTime,\r\n xtDate,\r\n xtTime,\r\n xtCurrency,\r\n xtGuid,\r\n xtVariant,\r\n xtBinary,\r\n xtStream,\r\n xtInt16,\r\n xtByte,\r\n xtSByte,\r\n xtEntity,\r\n xtEntityCollection,\r\n xtEnum,\r\n xtScalarCollection,\r\n xtRaw,\r\n xtInstance,\r\n xtInstanceCollection\r\n );\r\n\r\n TXDataSchema = class;\r\n TXDataModel = class;\r\n TXDataTypeConverter = class;\r\n\r\n /// \r\n /// Base class for all XData model classes.\r\n /// \r\n [JsonInclude(TInclusionMode.NonDefault)]\r\n TXDataModelObject = class\r\n strict private\r\n [JsonIgnore]\r\n FData: TValue;\r\n [JsonIgnore]\r\n FOwnsDataObject: Boolean;\r\n FDescription: string;\r\n {$IFDEF AUTOREFCOUNT}[Weak]{$ENDIF}\r\n [JsonIgnore]\r\n FParent: TXDataModelObject;\r\n protected\r\n property Parent: TXDataModelObject read FParent write FParent;\r\n public\r\n destructor Destroy; override;\r\n\r\n /// \r\n /// A holder for arbitrary data associated with the XData model object.\r\n /// \r\n property Data: TValue read FData write FData;\r\n property OwnsDataObject: boolean read FOwnsDataObject write FOwnsDataObject;\r\n property Description: string read FDescription write FDescription;\r\n end;\r\n\r\n {$IFDEF GENERICS}\r\n {$ELSE}\r\n TXDataOwnedList = class(TObjectList)\r\n private\r\n [JsonIgnore]\r\n {$IFDEF AUTOREFCOUNT}[Weak]{$ENDIF}\r\n FOwner: TXDataModelObject;\r\n protected\r\n {$IFDEF PAS2JS}\r\n procedure Notify(Ptr: JSValue; Action: TListNotification); override;\r\n {$ELSE}\r\n procedure Notify(Ptr: Pointer; Action: TListNotification); override;\r\n {$ENDIF}\r\n public\r\n constructor Create(AOwner: TXDataModelObject); overload;\r\n constructor Create; reintroduce; overload;\r\n end;\r\n {$ENDIF}\r\n\r\n /// \r\n /// Base type for all XData model classes representing types.\r\n /// \r\n TXDataType = class(TXDataModelObject)\r\n strict private\r\n FName: string;\r\n [JsonIgnore] FUrlConverter: TXDataTypeConverter;\r\n strict protected\r\n function GetName: string; virtual;\r\n function GetIsCollection: boolean; virtual;\r\n function GetWrappedType: TXDataType; virtual;\r\n function GetTypeKind: TXTypeKind; virtual;\r\n public\r\n function QualifiedName: string; virtual;\r\n property Name: string read GetName write FName;\r\n property IsCollection: boolean read GetIsCollection;\r\n property WrappedType: TXDataType read GetWrappedType;\r\n property TypeKind: TXTypeKind read GetTypeKind;\r\n property UrlConverter: TXDataTypeConverter read FUrlConverter write FUrlConverter;\r\n end;\r\n\r\n TXDataScalarCollectionType = class;\r\n\r\n TXDataScalarType = class(TXDataType)\r\n strict private\r\n [JsonIgnore]\r\n FCollection: TXDataScalarCollectionType;\r\n strict protected\r\n function GetCollection: TXDataScalarType;\r\n public\r\n destructor Destroy; override;\r\n property Collection: TXDataScalarType read GetCollection;\r\n end;\r\n\r\n TXDataEnumMember = class(TXDataModelObject)\r\n private\r\n FName: string;\r\n FValue: integer;\r\n public\r\n property Name: string read FName write FName;\r\n property Value: integer read FValue write FValue;\r\n end;\r\n\r\n {$IFDEF GENERICS}\r\n TXDataEnumMemberList = TList;\r\n {$ELSE}\r\n TXDataEnumMemberList = class(TObjectList)\r\n private\r\n function GetItem(Index: Integer): TXDataEnumMember; reintroduce;\r\n public\r\n property Items[Index: Integer]: TXDataEnumMember read GetItem; default;\r\n end;\r\n {$ENDIF}\r\n\r\n [JsonInclude(TInclusionMode.NonDefault)]\r\n TXDataEnumType = class(TXDataScalarType)\r\n strict private\r\n FMembers: TXDataEnumMemberList;\r\n function GetSchema: TXDataSchema;\r\n strict protected\r\n function GetTypeKind: TXTypeKind; override;\r\n public\r\n function QualifiedName: string; override;\r\n property Schema: TXDataSchema read GetSchema;\r\n public\r\n constructor Create; reintroduce;\r\n destructor Destroy; override;\r\n function AddMember(const AName: string; AValue: integer): TXDataEnumMember;\r\n property Members: TXDataEnumMemberList read FMembers;\r\n end;\r\n\r\n {$IFDEF GENERICS}\r\n TXDataEnumTypeList = TList;\r\n {$ELSE}\r\n TXDataEnumTypeList = class(TXDataOwnedList)\r\n private\r\n function GetItem(Index: Integer): TXDataEnumType; reintroduce;\r\n public\r\n property Items[Index: Integer]: TXDataEnumType read GetItem; default;\r\n end;\r\n {$ENDIF}\r\n\r\n TXDataScalarCollectionType = class(TXDataScalarType)\r\n strict private\r\n {$IFDEF AUTOREFCOUNT}[Weak]{$ENDIF}\r\n [JsonIgnore]\r\n FItemType: TXDataScalarType;\r\n strict protected\r\n function GetIsCollection: boolean; override;\r\n function GetName: string; override;\r\n function GetWrappedType: TXDataType; override;\r\n function GetTypeKind: TXTypeKind; override;\r\n public\r\n function QualifiedName: string; override;\r\n property ItemType: TXDataScalarType read FItemType write FItemType;\r\n end;\r\n\r\n TDocRequired = (Default, Required, NotRequired);\r\n\r\n [JsonInclude(TInclusionMode.NonDefault)]\r\n TXDataProperty = class(TXDataModelObject)\r\n strict private\r\n FName: string;\r\n FRequired: Boolean;\r\n [JsonIgnore]\r\n FDocRequired: TDocRequired;\r\n function GetParent: TXDataStructuredType;\r\n strict protected\r\n function GetTypeKind: TXTypeKind; virtual; abstract;\r\n function GetValueType: TXDataType; virtual; abstract;\r\n public\r\n function IsSimple: Boolean; virtual; abstract;\r\n property Parent: TXDataStructuredType read GetParent;\r\n property TypeKind: TXTypeKind read GetTypeKind;\r\n public\r\n constructor Create; reintroduce;\r\n destructor Destroy; override;\r\n function QualifiedName: string;\r\n property Name: string read FName write FName;\r\n property Required: Boolean read FRequired write FRequired;\r\n property DocRequired: TDocRequired read FDocRequired write FDocRequired;\r\n property ValueType: TXDataType read GetValueType;\r\n end;\r\n\r\n {$IFDEF GENERICS}\r\n TXDataPropertyList = TList;\r\n {$ELSE}\r\n TXDataPropertyList = class(TObjectList)\r\n private\r\n function GetItem(Index: Integer): TXDataProperty; reintroduce;\r\n public\r\n property Items[Index: Integer]: TXDataProperty read GetItem; default;\r\n end;\r\n {$ENDIF}\r\n\r\n [JsonInclude(TInclusionMode.NonDefault)]\r\n TXDataScalarProperty = class(TXDataProperty)\r\n strict private\r\n [JsonIgnore] FType: TXDataScalarType;\r\n FLength: Integer;\r\n FPrecision: Integer;\r\n FScale: Integer;\r\n procedure SetType(const Value: TXDataScalarType);\r\n function GetUrlConverter: TXDataTypeConverter;\r\n private\r\n [JsonIgnore] FTypeRef: string;\r\n function GetTypeRef: string;\r\n private\r\n [JsonIgnore]\r\n FDefaultValue: TValue;\r\n [JsonIgnore]\r\n FHasDefaultValue: Boolean;\r\n procedure SetDefaultValue(const Value: TValue);\r\n strict protected\r\n function GetTypeKind: TXTypeKind; override;\r\n function GetValueType: TXDataType; override;\r\n public\r\n function IsSimple: Boolean; override;\r\n [JsonProperty('Type')]\r\n property TypeRef: string read GetTypeRef write FTypeRef;\r\n property UrlConverter: TXDataTypeConverter read GetUrlConverter;\r\n property PropertyType: TXDataScalarType read FType write SetType;\r\n property Length: Integer read FLength write FLength;\r\n property Precision: Integer read FPrecision write FPrecision;\r\n property Scale: Integer read FScale write FScale;\r\n property DefaultValue: TValue read FDefaultValue write SetDefaultValue;\r\n property HasDefaultValue: Boolean read FHasDefaultValue write FHasDefaultValue;\r\n end;\r\n\r\n TXDataSimpleProperty = class(TXDataScalarProperty)\r\n strict private\r\n function GetParent: TXDataEntityType;\r\n private\r\n procedure Prepare;\r\n public\r\n property Parent: TXDataEntityType read GetParent;\r\n end;\r\n\r\n TXDataInstanceSimpleProperty = class(TXDataScalarProperty)\r\n strict private\r\n function GetParent: TXDataInstanceType;\r\n private\r\n procedure Prepare;\r\n public\r\n property Parent: TXDataInstanceType read GetParent;\r\n end;\r\n\r\n {$IFDEF GENERICS}\r\n TXDataSimplePropertyList = TList;\r\n {$ELSE}\r\n TXDataSimplePropertyList = class(TXDataOwnedList)\r\n private\r\n function GetItem(Index: Integer): TXDataSimpleProperty; reintroduce;\r\n public\r\n property Items[Index: Integer]: TXDataSimpleProperty read GetItem; default;\r\n end;\r\n {$ENDIF}\r\n\r\n {$IFDEF GENERICS}\r\n TXDataInstanceScalarPropertyList = TList;\r\n {$ELSE}\r\n TXDataInstanceScalarPropertyList = class(TXDataOwnedList)\r\n private\r\n function GetItem(Index: Integer): TXDataInstanceSimpleProperty; reintroduce;\r\n public\r\n property Items[Index: Integer]: TXDataInstanceSimpleProperty read GetItem; default;\r\n end;\r\n {$ENDIF}\r\n\r\n [JsonInclude(TInclusionMode.NonDefault)]\r\n TXDataStructuredProperty = class(TXDataProperty)\r\n private\r\n [JsonIgnore] FTargetRef: string;\r\n function GetTargetRef: string;\r\n strict protected\r\n function GetTarget: TXDataStructuredType; virtual; abstract;\r\n function GetValueType: TXDataType; override;\r\n public\r\n [JsonProperty('Target')]\r\n property TargetRef: string read GetTargetRef write FTargetRef;\r\n function IsSimple: Boolean; override;\r\n property Target: TXDataStructuredType read GetTarget;\r\n end;\r\n\r\n [JsonInclude(TInclusionMode.NonDefault)]\r\n TXDataInstanceNavigationProperty = class(TXDataStructuredProperty)\r\n strict private\r\n [JsonIgnore] FTarget: TXDataStructuredType;\r\n function GetParent: TXDataInstanceType;\r\n private\r\n procedure Prepare;\r\n strict protected\r\n function GetTypeKind: TXTypeKind; override;\r\n function GetTarget: TXDataStructuredType; override;\r\n public\r\n property Target: TXDataStructuredType read FTarget write FTarget;\r\n property Parent: TXDataInstanceType read GetParent;\r\n end;\r\n\r\n [JsonInclude(TInclusionMode.NonDefault)]\r\n TXDataNavigationProperty = class(TXDataStructuredProperty)\r\n strict private\r\n [JsonIgnore] FTarget: TXDataEntityType;\r\n function GetParent: TXDataEntityType;\r\n private\r\n procedure Prepare;\r\n strict protected\r\n function GetTypeKind: TXTypeKind; override;\r\n function GetTarget: TXDataStructuredType; override;\r\n public\r\n property Target: TXDataEntityType read FTarget write FTarget;\r\n property Parent: TXDataEntityType read GetParent;\r\n end;\r\n\r\n {$IFDEF GENERICS}\r\n TXDataNavigationPropertyList = TList;\r\n {$ELSE}\r\n TXDataNavigationPropertyList = class(TXDataOwnedList)\r\n private\r\n function GetItem(Index: Integer): TXDataNavigationProperty; reintroduce;\r\n public\r\n property Items[Index: Integer]: TXDataNavigationProperty read GetItem; default;\r\n end;\r\n {$ENDIF}\r\n\r\n {$IFDEF GENERICS}\r\n TXDataInstanceNavigationPropertyList = TList;\r\n {$ELSE}\r\n TXDataInstanceNavigationPropertyList = class(TXDataOwnedList)\r\n private\r\n function GetItem(Index: Integer): TXDataInstanceNavigationProperty; reintroduce;\r\n public\r\n property Items[Index: Integer]: TXDataInstanceNavigationProperty read GetItem; default;\r\n end;\r\n {$ENDIF}\r\n\r\n TXDataSimplePropertyArray = array of TXDataSimpleProperty;\r\n\r\n TXDataStructuredType = class(TXDataType)\r\n strict private\r\n function GetSchema: TXDataSchema;\r\n public\r\n function ScalarPropertyCount: Integer; virtual; abstract;\r\n function GetScalarProperty(Index: Integer): TXDataScalarProperty; virtual; abstract;\r\n function StructuredPropertyCount: Integer; virtual; abstract;\r\n function GetStructuredProperty(Index: Integer): TXDataStructuredProperty; virtual; abstract;\r\n function FindScalarProperty(const AName: string): TXDataScalarProperty; virtual;\r\n function FindStructuredProperty(const AName: string): TXDataStructuredProperty; virtual;\r\n function FindAnyProperty(const AName: string): TXDataProperty; virtual;\r\n property Schema: TXDataSchema read GetSchema;\r\n end;\r\n\r\n TXDataInstanceCollectionType = class;\r\n\r\n [JsonInclude(TInclusionMode.NonDefault)]\r\n TXDataInstanceType = class(TXDataStructuredType)\r\n strict private\r\n [JsonIgnore]\r\n FBaseType: TXDataInstanceType;\r\n FProperties: TXDataInstanceScalarPropertyList;\r\n FNavigationProperties: TXDataInstanceNavigationPropertyList;\r\n [JsonIgnore]\r\n FCollection: TXDataInstanceCollectionType;\r\n private\r\n [JsonIgnore]\r\n FBaseTypeRef: string;\r\n function GetBaseTypeRef: string;\r\n public\r\n [JsonProperty('BaseType')]\r\n property BaseTypeRef: string read GetBaseTypeRef write FBaseTypeRef;\r\n private\r\n procedure Prepare;\r\n strict protected\r\n function GetCollection: TXDataInstanceCollectionType;\r\n function GetTypeKind: TXTypeKind; override;\r\n public\r\n function ScalarPropertyCount: Integer; override;\r\n function GetScalarProperty(Index: Integer): TXDataScalarProperty; override;\r\n function StructuredPropertyCount: Integer; override;\r\n function GetStructuredProperty(Index: Integer): TXDataStructuredProperty; override;\r\n function QualifiedName: string; override;\r\n public\r\n constructor Create; reintroduce;\r\n destructor Destroy; override;\r\n property BaseType: TXDataInstanceType read FBaseType write FBaseType;\r\n property Properties: TXDataInstanceScalarPropertyList read FProperties;\r\n property NavigationProperties: TXDataInstanceNavigationPropertyList read FNavigationProperties;\r\n property Collection: TXDataInstanceCollectionType read GetCollection;\r\n end;\r\n\r\n TXDataInstanceCollectionType = class(TXDataInstanceType)\r\n strict private\r\n {$IFDEF AUTOREFCOUNT}[Weak]{$ENDIF}\r\n [JsonIgnore]\r\n FItemType: TXDataInstanceType;\r\n strict protected\r\n function GetName: string; override;\r\n function GetIsCollection: Boolean; override;\r\n function GetWrappedType: TXDataType; override;\r\n function GetTypeKind: TXTypeKind; override;\r\n public\r\n function QualifiedName: string; override;\r\n property ItemType: TXDataInstanceType read FItemType write FItemType;\r\n end;\r\n\r\n TXDataEntityCollectionType = class;\r\n TXDataEntitySet = class;\r\n\r\n [JsonInclude(TInclusionMode.NonDefault)]\r\n TXDataEntityType = class(TXDataStructuredType)\r\n strict private\r\n [JsonIgnore]\r\n FKey: TXDataPropertyList;\r\n [JsonIgnore]\r\n FBaseType: TXDataEntityType;\r\n FProperties: TXDataSimplePropertyList;\r\n FNavigationProperties: TXDataNavigationPropertyList;\r\n [JsonIgnore]\r\n FCollection: TXDataEntityCollectionType;\r\n {$IFDEF AUTOREFCOUNT}[Weak]{$ENDIF}\r\n [JsonIgnore]\r\n FDefaultEntitySet: TXDataEntitySet;\r\n private\r\n [JsonIgnore]\r\n FBaseTypeRef: string;\r\n [JsonIgnore]\r\n FKeyRef: TStringDynArray;\r\n function GetBaseTypeRef: string;\r\n function GetKeyRef: TStringDynArray;\r\n public\r\n [JsonProperty('BaseType')]\r\n property BaseTypeRef: string read GetBaseTypeRef write FBaseTypeRef;\r\n [JsonProperty('Key')]\r\n property KeyRef: TStringDynArray read GetKeyRef write FKeyRef;\r\n private\r\n procedure Prepare;\r\n strict protected\r\n function GetCollection: TXDataEntityCollectionType;\r\n function GetTypeKind: TXTypeKind; override;\r\n private\r\n property DefaultEntitySet: TXDataEntitySet read FDefaultEntitySet write FDefaultEntitySet;\r\n public\r\n function ScalarPropertyCount: Integer; override;\r\n function GetScalarProperty(Index: Integer): TXDataScalarProperty; override;\r\n function StructuredPropertyCount: Integer; override;\r\n function GetStructuredProperty(Index: Integer): TXDataStructuredProperty; override;\r\n function QualifiedName: string; override;\r\n function FindScalarProperty(const AName: string): TXDataScalarProperty; override;\r\n function FindStructuredProperty(const AName: string): TXDataStructuredProperty; override;\r\n function FindProperty(const AName: string): TXDataSimpleProperty;\r\n function FindNavigationProperty(const AName: string): TXDataNavigationProperty;\r\n function IsInheritedFrom(ABase: TXDataEntityType): boolean;\r\n function RootType: TXDataEntityType;\r\n function KeyScalarProperties: TXDataSimplePropertyArray;\r\n public\r\n constructor Create; reintroduce;\r\n destructor Destroy; override;\r\n property BaseType: TXDataEntityType read FBaseType write FBaseType;\r\n property Key: TXDataPropertyList read FKey;\r\n property Properties: TXDataSimplePropertyList read FProperties;\r\n property NavigationProperties: TXDataNavigationPropertyList read FNavigationProperties;\r\n property Collection: TXDataEntityCollectionType read GetCollection;\r\n end;\r\n\r\n TXDataEntityCollectionType = class(TXDataEntityType)\r\n strict private\r\n {$IFDEF AUTOREFCOUNT}[Weak]{$ENDIF}\r\n [JsonIgnore]\r\n FItemType: TXDataEntityType;\r\n strict protected\r\n function GetName: string; override;\r\n function GetIsCollection: boolean; override;\r\n function GetWrappedType: TXDataType; override;\r\n function GetTypeKind: TXTypeKind; override;\r\n public\r\n function QualifiedName: string; override;\r\n property ItemType: TXDataEntityType read FItemType write FItemType;\r\n end;\r\n\r\n TXDataEntityContainer = class;\r\n\r\n [JsonInclude(TInclusionMode.NonDefault)]\r\n TXDataEntitySet = class(TXDataModelObject)\r\n strict private\r\n FName: string;\r\n [JsonIgnore]\r\n FEntityType: TXDataEntityType;\r\n [JsonIgnore]\r\n FTagName: string;\r\n [JsonIgnore]\r\n FTagGroup: string;\r\n function GetContainer: TXDataEntityContainer;\r\n private\r\n [JsonIgnore]\r\n FEntityTypeRef: string;\r\n function GetEntityTypeRef: string;\r\n public\r\n [JsonProperty('EntityType')]\r\n property EntityTypeRef: string read GetEntityTypeRef write FEntityTypeRef;\r\n private\r\n procedure Prepare;\r\n public\r\n property Name: string read FName write FName;\r\n property EntityType: TXDataEntityType read FEntityType write FEntityType;\r\n property Container: TXDataEntityContainer read GetContainer;\r\n property TagName: string read FTagName write FTagName;\r\n property TagGroup: string read FTagGroup write FTagGroup;\r\n end;\r\n\r\n {$IFDEF GENERICS}\r\n TXDataEntitySetList = TList;\r\n {$ELSE}\r\n TXDataEntitySetList = class(TXDataOwnedList)\r\n private\r\n function GetItem(Index: Integer): TXDataEntitySet; reintroduce;\r\n public\r\n property Items[Index: Integer]: TXDataEntitySet read GetItem; default;\r\n end;\r\n {$ENDIF}\r\n\r\n [JsonInclude(TInclusionMode.NonDefault)]\r\n TXDataEntityContainer = class(TXDataModelObject)\r\n strict private\r\n FName: string;\r\n FEntitySets: TXDataEntitySetList;\r\n function GetSchema: TXDataSchema;\r\n public\r\n property Schema: TXDataSchema read GetSchema;\r\n public\r\n constructor Create; reintroduce;\r\n destructor Destroy; override;\r\n function FindEntitySet(const AName: string): TXDataEntitySet;\r\n property Name: string read FName write FName;\r\n property EntitySets: TXDataEntitySetList read FEntitySets;\r\n end;\r\n\r\n {$IFDEF GENERICS}\r\n TXDataEntityContainerList = TList;\r\n {$ELSE}\r\n TXDataEntityContainerList = class(TXDataOwnedList)\r\n private\r\n function GetItem(Index: Integer): TXDataEntityContainer; reintroduce;\r\n public\r\n property Items[Index: Integer]: TXDataEntityContainer read GetItem; default;\r\n end;\r\n {$ENDIF}\r\n\r\n TXDataAction = class;\r\n\r\n TBindingMode = (FromBody, FromURI {FromQuery}, FromPath);\r\n\r\n [JsonInclude(TInclusionMode.NonDefault)]\r\n TXDataParamDef = class(TXDataModelObject)\r\n strict private\r\n FName: string;\r\n function GetUrlConverter: TXDataTypeConverter;\r\n private\r\n [JsonIgnore]\r\n FTypeRef: string;\r\n [JsonIgnore]\r\n FTypeNameRef: string;\r\n [JsonIgnore]\r\n FDocRequired: TDocRequired;\r\n function GetTypeRef: string;\r\n function GetTypeNameRef: string;\r\n public\r\n [JsonProperty('Type')]\r\n property TypeRef: string read GetTypeRef write FTypeRef;\r\n [JsonProperty('TypeName')]\r\n property TypeNameRef: string read GetTypeNameRef write FTypeNameRef;\r\n private\r\n procedure Prepare;\r\n private\r\n [JsonIgnore]\r\n FType: TXDataType;\r\n FBindingMode: TBindingMode;\r\n FOutput: Boolean;\r\n FInput: Boolean;\r\n [JsonIgnore]\r\n FDefaultValue: TValue;\r\n [JsonIgnore]\r\n FHasDefaultValue: Boolean;\r\n procedure SetDefaultValue(const Value: TValue);\r\n function GetParent: TXDataAction;\r\n {$IFDEF ISDELPHI}\r\n strict private\r\n [JsonIgnore]\r\n FRttiType: TRttiType;\r\n public\r\n property RttiType: TRttiType read FRttiType write FRttiType;\r\n {$ENDIF}\r\n public\r\n function Index: Integer;\r\n property Parent: TXDataAction read GetParent;\r\n public\r\n property UrlConverter: TXDataTypeConverter read GetUrlConverter;\r\n property Name: string read FName write FName;\r\n property BindingMode: TBindingMode read FBindingMode write FBindingMode;\r\n property Output: Boolean read FOutput write FOutput;\r\n property Input: Boolean read FInput write FInput;\r\n property DefaultValue: TValue read FDefaultValue write SetDefaultValue;\r\n property HasDefaultValue: Boolean read FHasDefaultValue write FHasDefaultValue;\r\n property ParamType: TXDataType read FType write FType;\r\n property DocRequired: TDocRequired read FDocRequired write FDocRequired;\r\n end;\r\n\r\n {$IFDEF GENERICS}\r\n TXDataParamDefList = TList;\r\n {$ELSE}\r\n TXDataParamDefList = class(TXDataOwnedList)\r\n private\r\n function GetItem(Index: Integer): TXDataParamDef; reintroduce;\r\n public\r\n property Items[Index: Integer]: TXDataParamDef read GetItem; default;\r\n end;\r\n {$ENDIF}\r\n\r\n EFromURIBindingNotSupported = class(Exception)\r\n public\r\n constructor Create(AParam: TXDataParamDef); reintroduce;\r\n end;\r\n\r\n TXDataController = class;\r\n\r\n// TXDataRouteSegmentType = (Literal, Parameter);\r\n\r\n TXDataRouteSegment = class\r\n private\r\n FParamName: string;\r\n FValue: string;\r\n FParamIndex: Integer;\r\n FIsParam: Boolean;\r\n// FSegmentType: TXDataRouteSegmentType;\r\n public\r\n constructor Create(const AValue: string);\r\n// property SegmentType: TXDataRouteSegmentType read FSegmentType;\r\n property Value: string read FValue write FValue;\r\n property ParamName: string read FParamName write FParamName;\r\n property ParamIndex: Integer read FParamIndex write FParamIndex;\r\n property IsParam: Boolean read FIsParam;\r\n end;\r\n\r\n {$IFDEF GENERICS}\r\n TXDataRouteSegmentList = TObjectList;\r\n {$ELSE}\r\n TXDataRouteSegmentList = class(TXDataOwnedList)\r\n private\r\n function GetItem(Index: Integer): TXDataRouteSegment; reintroduce;\r\n public\r\n property Items[Index: Integer]: TXDataRouteSegment read GetItem; default;\r\n end;\r\n {$ENDIF}\r\n\r\n TXDataRouteInfo = class\r\n strict private\r\n FSegments: TXDataRouteSegmentList;\r\n FParamCount: Integer;\r\n FPriority: Integer;\r\n function GetSegment(Index: Integer): TXDataRouteSegment;\r\n function GetSegmentCount: Integer;\r\n public\r\n constructor Create;\r\n destructor Destroy; override;\r\n procedure Process(const ARoute: string);\r\n property Segments[Index: Integer]: TXDataRouteSegment read GetSegment;\r\n property SegmentCount: Integer read GetSegmentCount;\r\n property ParamCount: Integer read FParamCount;\r\n property Priority: Integer read FPriority;\r\n end;\r\n\r\n [JsonInclude(TInclusionMode.NonDefault)]\r\n TXDataAction = class(TXDataModelObject)\r\n strict private\r\n FName: string;\r\n FParameters: TXDataParamDefList;\r\n FHttpMethod: string;\r\n FIsParamStream: Boolean;\r\n FIsResultStream: Boolean;\r\n FIsResultCriteria: Boolean;\r\n FIsResultSingleObject: Boolean;\r\n FOperationId: string;\r\n FConsumes: string;\r\n [JsonIgnore]\r\n FRemarks: string;\r\n [JsonIgnore]\r\n FRouteInfo: TXDataRouteInfo;\r\n [JsonIgnore]\r\n FReturnType: TXDataType;\r\n [JsonIgnore]\r\n FIsDeprecated: Boolean;\r\n function ParamCount(Binding: TBindingMode): Integer;\r\n function GetParam(Binding: TBindingMode; Index: Integer): TXDataParamDef;\r\n strict private\r\n [JsonIgnore]\r\n FReturnTypeRef: string;\r\n function GetReturnTypeRef: string;\r\n public\r\n [JsonProperty('ReturnType')]\r\n property ReturnTypeRef: string read GetReturnTypeRef write FReturnTypeRef;\r\n private\r\n procedure Prepare;\r\n function GetBodyParam(Index: Integer): TXDataParamDef;\r\n function GetPathParam(Index: Integer): TXDataParamDef;\r\n function GetQueryParam(Index: Integer): TXDataParamDef;\r\n protected\r\n function GetController: TXDataController;\r\n public\r\n property Controller: TXDataController read GetController;\r\n property Remarks: string read FRemarks write FRemarks;\r\n property IsDeprecated: Boolean read FIsDeprecated write FIsDeprecated;\r\n public\r\n property IsParamStream: Boolean read FIsParamStream write FIsParamStream;\r\n property IsResultStream: Boolean read FIsResultStream write FIsResultStream;\r\n property IsResultCriteria: Boolean read FIsResultCriteria write FIsResultCriteria;\r\n property IsResultSingleObject: Boolean read FIsResultSingleObject write FIsResultSingleObject;\r\n property OperationId: string read FOperationId write FOperationId;\r\n property Consumes: string read FConsumes write FConsumes;\r\n function HasOutputParams: Boolean;\r\n function IsFormContent: Boolean;\r\n function IsJsonContent: Boolean;\r\n public\r\n constructor Create; reintroduce;\r\n destructor Destroy; override;\r\n function FindParameter(const AName: string): TXDataParamDef;\r\n function IndexOfParameter(const AName: string): Integer;\r\n function IndexOf(Param: TXDataParamDef): Integer;\r\n function ParamStreamIndex: Integer;\r\n function BodyParamCount: Integer;\r\n property BodyParams[Index: Integer]: TXDataParamDef read GetBodyParam;\r\n function QueryParamCount: Integer;\r\n property QueryParams[Index: Integer]: TXDataParamDef read GetQueryParam;\r\n function RequiredPathParamCount: Integer;\r\n function PathParamCount: Integer;\r\n property PathParams[Index: Integer]: TXDataParamDef read GetPathParam;\r\n property RouteInfo: TXDataRouteInfo read FRouteInfo;\r\n public\r\n // Despite the name, kept this way for backward compatibility, Name property is actually\r\n // the relative Route (path) for the action, so besides just \"GetCustomers\" it can also\r\n // be \"customers/?/items\", for example\r\n property Name: string read FName write FName;\r\n property Parameters: TXDataParamDefList read FParameters;\r\n property HttpMethod: string read FHttpMethod write FHttpMethod;\r\n property ReturnType: TXDataType read FReturnType write FReturnType;\r\n end;\r\n\r\n {$IFDEF GENERICS}\r\n TXDataActionList = TList;\r\n {$ELSE}\r\n TXDataActionList = class(TXDataOwnedList)\r\n private\r\n function GetItem(Index: Integer): TXDataAction; reintroduce;\r\n public\r\n property Items[Index: Integer]: TXDataAction read GetItem; default;\r\n end;\r\n {$ENDIF}\r\n\r\n [JsonInclude(TInclusionMode.NonDefault)]\r\n TXDataController = class(TXDataModelObject)\r\n strict private\r\n FName: string;\r\n FActions: TXDataActionList;\r\n [JsonIgnore]\r\n FServiceClass: TClass;\r\n [JsonIgnore]\r\n FRouteInfo: TXDataRouteInfo;\r\n [JsonIgnore]\r\n FTagName: string;\r\n [JsonIgnore]\r\n FTagGroup: string;\r\n function GetSchema: TXDataSchema;\r\n public\r\n property Schema: TXDataSchema read GetSchema;\r\n public\r\n property ServiceClass: TClass read FServiceClass write FServiceClass;\r\n property RouteInfo2: TXDataRouteInfo read FRouteInfo;\r\n property TagName: string read FTagName write FTagName;\r\n property TagGroup: string read FTagGroup write FTagGroup;\r\n private\r\n procedure Prepare;\r\n public\r\n constructor Create; reintroduce;\r\n destructor Destroy; override;\r\n property Name: string read FName write FName;\r\n property Actions: TXDataActionList read FActions;\r\n end;\r\n\r\n {$IFDEF GENERICS}\r\n TXDataEntityTypeList = TList;\r\n {$ELSE}\r\n TXDataEntityTypeList = class(TXDataOwnedList)\r\n private\r\n function GetItem(Index: Integer): TXDataEntityType; reintroduce;\r\n public\r\n property Items[Index: Integer]: TXDataEntityType read GetItem; default;\r\n end;\r\n {$ENDIF}\r\n\r\n {$IFDEF GENERICS}\r\n TXDataInstanceTypeList = TList;\r\n {$ELSE}\r\n TXDataInstanceTypeList = class(TXDataOwnedList)\r\n private\r\n function GetItem(Index: Integer): TXDataInstanceType; reintroduce;\r\n public\r\n property Items[Index: Integer]: TXDataInstanceType read GetItem; default;\r\n end;\r\n {$ENDIF}\r\n\r\n {$IFDEF GENERICS}\r\n TXDataControllerList = TList;\r\n {$ELSE}\r\n TXDataControllerList = class(TXDataOwnedList)\r\n private\r\n function GetItem(Index: Integer): TXDataController; reintroduce;\r\n public\r\n property Items[Index: Integer]: TXDataController read GetItem; default;\r\n end;\r\n {$ENDIF}\r\n\r\n [JsonInclude(TInclusionMode.NonDefault)]\r\n TXDataSchema = class(TXDataModelObject)\r\n private\r\n FNamespace: string;\r\n FAlias: string;\r\n function GetModel: TXDataModel;\r\n function IsCollectionName(const Name: string; var SubType: string): Boolean;\r\n strict private\r\n FEntityTypes: TXDataEntityTypeList;\r\n FEntityContainers: TXDataEntityContainerList;\r\n FEnumTypes: TXDataEnumTypeList;\r\n FInstanceTypes: TXDataInstanceTypeList;\r\n FControllers: TXDataControllerList;\r\n public\r\n constructor Create; reintroduce;\r\n destructor Destroy; override;\r\n function FindOrDefineConverter(AType: TXDataType): TXDataTypeConverter;\r\n function FindEntityType(const AName: string): TXDataEntityType;\r\n function FindInstanceType(const AName: string): TXDataInstanceType;\r\n function FindEnumType(const AName: string): TXDataEnumType;\r\n function FindEnumMember(const AName: string): TXDataEnumMember;\r\n function FindScalarType(const Name: string): TXDataScalarType;\r\n function FindType(const Name: string): TXDataType;\r\n function FindContainer(const AName: string): TXDataEntityContainer;\r\n function FindController(const AName: string): TXDataController;\r\n public\r\n property Namespace: string read FNamespace write FNamespace;\r\n property Alias: string read FAlias write FAlias;\r\n property EntityTypes: TXDataEntityTypeList read FEntityTypes;\r\n property InstanceTypes: TXDataInstanceTypeList read FInstanceTypes;\r\n property EntityContainers: TXDataEntityContainerList read FEntityContainers;\r\n property EnumTypes: TXDataEnumTypeList read FEnumTypes;\r\n property Controllers: TXDataControllerList read FControllers;\r\n property Model: TXDataModel read GetModel;\r\n end;\r\n\r\n {$IFDEF GENERICS}\r\n TXDataSchemaList = TList;\r\n {$ELSE}\r\n TXDataSchemaList = class(TXDataOwnedList)\r\n private\r\n function GetItem(Index: Integer): TXDataSchema; reintroduce;\r\n public\r\n property Items[Index: Integer]: TXDataSchema read GetItem; default;\r\n end;\r\n {$ENDIF}\r\n\r\n TXDataUrlConverters = class\r\n strict private\r\n FConverterMap: TStringMap;\r\n public\r\n constructor Create; reintroduce;\r\n destructor Destroy; override;\r\n function Find(const ATypeName: string): TXDataTypeConverter;\r\n procedure RegisterConverter(const ATypeName: string; AConverter: TXDataTypeConverter);\r\n end;\r\n\r\n [JsonInclude(TInclusionMode.NonDefault)]\r\n TXDataBaseModel = class(TXDataModelObject)\r\n strict private\r\n FTitle: string;\r\n FVersion: string;\r\n FSchemas: TXDataSchemaList;\r\n private\r\n [JsonIgnore]\r\n FUrlConverters: TXDataUrlConverters;\r\n strict private\r\n function GetDefaultEntityContainer: TXDataEntityContainer;\r\n public\r\n // This method must be called before using a model. It does the initialization of several\r\n // parts of the model, like solving references and settings converters\r\n procedure Prepare;\r\n public\r\n constructor Create; reintroduce;\r\n destructor Destroy; override;\r\n function FindSchema(const APrefix: string): TXDataSchema;\r\n property Schemas: TXDataSchemaList read FSchemas;\r\n function GetEntityType(const QualifiedName: string): TXDataEntityType;\r\n function FindEntityType(const QualifiedName: string): TXDataEntityType;\r\n function GetEntitySet(const QualifiedName: string): TXDataEntitySet;\r\n function FindEntitySet(const QualifiedName: string): TXDataEntitySet;\r\n function FindInstanceType(const QualifiedName: string): TXDataInstanceType;\r\n function FindController(const AName: string): TXDataController;\r\n function FindActionByOperationId(const AOperationId: string): TXDataAction;\r\n function DefaultEntitySet(AType: TXDataEntityType): TXDataEntitySet;\r\n procedure DefineDefaultEntitySet(AType: TXDataEntityType; EntitySet: TXDataEntitySet);\r\n property DefaultEntityContainer: TXDataEntityContainer read GetDefaultEntityContainer;\r\n property Title: string read FTitle write FTitle;\r\n property Version: string read FVersion write FVersion;\r\n end;\r\n\r\n TXDataGetPropValueProc = reference to function(Entity: TValue; Prop: TXDataSimpleProperty): TValue;\r\n TXDataGetNavPropValueProc = reference to function(Entity: TValue; NavProp: TXDataNavigationProperty): TValue;\r\n\r\n [JsonInclude(TInclusionMode.NonDefault)]\r\n TXDataModel = class(TXDataBaseModel)\r\n strict protected\r\n ///\t\r\n ///\t Returns the key predicate of an object instance, to be used in Url.\r\n ///\t\r\n ///\t\r\n ///\t The object instance for which the key predicate will be generated\r\n ///\t\r\n ///\t\r\n ///\t The entity type associated with the object. Just for optimization purposes\r\n ///\t\r\n ///\t\r\n ///\t Reference to a procedure that will read the value of a property\r\n ///\t\r\n ///\t\r\n ///\t Reference to a procedure that will read the value of a navigation property\r\n ///\t\r\n ///\t\r\n ///\t The key predicate of the object\r\n ///\t\r\n ///\t\r\n ///\t This function returns a string containing the key predicate of an\r\n ///\t object instance. The key predicate is a string representation of the\r\n ///\t object id, to be used in an Url to identify a web resource relate to\r\n ///\t the object. For example, in the url\r\n ///\t ), the key predicate\r\n ///\t is 'ABC' (with the quotes).\r\n ///\t\r\n function IdToKeyPredicate(const Entity: TValue; AType: TXDataEntityType;\r\n GetPropValue: TXDataGetPropValueProc; GetNavPropValue: TXDataGetNavPropValueProc): string; overload;\r\n /// \r\n /// Returns the key predicate for an entity of the specified class, given a specified value\r\n /// \r\n ///\t\r\n ///\t This function returns a string containing the key predicate of a class given the specified id.\r\n ///\t The key predicate is a string representation of the\r\n ///\t object id, to be used in an Url to identify a web resource relate to\r\n ///\t the object. For example, in the url\r\n ///\t ), the key predicate\r\n ///\t is 'ABC' (with the quotes).\r\n /// If the class has multiple keys (composite key), TValue must be an array of TValue elements\r\n /// with the same number of elements as the entity key properties\r\n ///\t\r\n function IdToKeyPredicate(AType: TXDataEntityType; const Id: TValue): string; overload;\r\n public\r\n ///\t\r\n ///\t Retrieves the canonical relative Url for an object instance.\r\n ///\t\r\n ///\t\r\n ///\t The object instance which the canonical Url will be generated for\r\n ///\t\r\n ///\t\r\n ///\t The TXDataEntityType object which relates to the AObject instance.\r\n /// It's used only for optimization and can be nil. If AType doesn't match\r\n /// the exact type associated with the object, the function will find\r\n /// the correct type. If type matches, a search is avoided for performance reasons\r\n ///\t\r\n ///\t\r\n /// The identifier or the entity\r\n ///\t\r\n ///\t\r\n ///\t The canonical Url, relative to the server base path, without trailing\r\n ///\t slash\r\n ///\t\r\n ///\t\r\n ///\t Use this method to build the Url to the resource that represents the\r\n ///\t object instance. The canonical Url returned is relative to the server\r\n ///\t base path.\r\n ///\t\r\n ///\t\r\n ///\t \r\n ///\t CanonicalUrl := Model.CanonicalUrl(Customer, CustomerType);\r\n ///\t \r\n ///\t \r\n ///\t // returns \"Customers(15)\" if Customer.Id is equal to 15\r\n ///\t \r\n ///\t\r\n function CanonicalUrlFromId(EntityType: TXDataEntityType; Id: TValue): string; overload;\r\n function CanonicalUrlFromEntity(EntityType: TXDataEntityType; const Entity: TValue;\r\n GetPropValue: TXDataGetPropValueProc; GetNavPropValue: TXDataGetNavPropValueProc): string;\r\n function EntitySetUrl(const AEntitySet: TXDataEntitySet): string;\r\n function DefaultSchema: TXDataSchema;\r\n end;\r\n\r\n ECannotSetTypeKind = class(Exception)\r\n public\r\n constructor Create(Prop: TXDataProperty; Value: TXTypeKind); reintroduce;\r\n end;\r\n\r\n TXDataTypeConverter = class\r\n strict private\r\n strict protected\r\n function GetXDataType: TXDataScalarType; virtual; abstract;\r\n function TryValueToUrl(const Value: TValue; out Literal: string): boolean; virtual;\r\n function TryUrlToValue(const Literal: string; out Value: TValue): boolean; virtual;\r\n public\r\n destructor Destroy; override;\r\n function ValueToUrl(const Value: TValue; const PropName: string = ''): string;\r\n function UrlToValue(const Literal: string; const PropName: string = ''): TValue;\r\n property XDataType: TXDataScalarType read GetXDataType;\r\n end;\r\n\r\n EConvertToUrlError = class(Exception)\r\n public\r\n constructor Create(const PropName: string; Value: TValue); reintroduce;\r\n end;\r\n\r\n EConvertFromUrlError = class(Exception)\r\n public\r\n constructor Create(const PropName, Literal: string); reintroduce;\r\n end;\r\n\r\n EModelTypeNotFound = class(Exception);\r\n\r\n EModelReferenceNotFound = class(Exception);\r\n\r\n EXDataEntityTypeNotFound = class(Exception)\r\n public\r\n constructor Create(const AName: string); reintroduce;\r\n end;\r\n\r\n EXDataEntitySetNotFound = class(Exception)\r\n public\r\n constructor Create(const AName: string); reintroduce;\r\n end;\r\n\r\n ECannotBuildKeyPredicateWrongValueLength = class(Exception)\r\n public\r\n constructor Create(AType: TXDataEntityType); reintroduce;\r\n end;\r\n\r\n ECannotBuildCanonicalUrl = class(Exception)\r\n public\r\n constructor Create(AType: TXDataEntityType); reintroduce;\r\n end;\r\n\r\n EUrlConverterNotFound = class(Exception)\r\n public\r\n constructor Create(AType: TXDataType); reintroduce;\r\n end;\r\n\r\n EIndexOutOfRange = class(Exception)\r\n end;\r\n\r\n EXDataInvalidRouteParam = class(Exception)\r\n public\r\n constructor Create(Action: TXDataAction; const ParamName: string);\r\n end;\r\n\r\nimplementation\r\n\r\nuses\r\n XData.Model.Types,\r\n XData.Types.Converters,\r\n XData.Utils;\r\n\r\nprocedure ErrorOutOfRange;\r\nbegin\r\n raise EIndexOutOfRange.Create('Index out of range');\r\nend;\r\n\r\n{ TXDataTypeConverter }\r\n\r\nfunction TXDataTypeConverter.UrlToValue(const Literal: string; const PropName: string = ''): TValue;\r\nbegin\r\n if not TryUrlToValue(Literal, Result) then\r\n raise EConvertFromUrlError.Create(PropName, Literal);\r\nend;\r\n\r\ndestructor TXDataTypeConverter.Destroy;\r\nbegin\r\n inherited;\r\nend;\r\n\r\nfunction TXDataTypeConverter.TryUrlToValue(const Literal: string; out Value: TValue): boolean;\r\nbegin\r\n Result := False;\r\nend;\r\n\r\nfunction TXDataTypeConverter.TryValueToUrl(const Value: TValue; out Literal: string): boolean;\r\nbegin\r\n Result := false;\r\nend;\r\n\r\nfunction TXDataTypeConverter.ValueToUrl(const Value: TValue; const PropName: string = ''): string;\r\nbegin\r\n {$IFDEF ISDELPHI}\r\n if Value.IsEmpty then\r\n Exit('null')\r\n else\r\n {$ELSE}\r\n if Value = nil then\r\n Exit('null')\r\n else\r\n {$ENDIF}\r\n begin\r\n if not TryValueToUrl(Value, Result) then\r\n raise EConvertToUrlError.Create(PropName, Value);\r\n end;\r\nend;\r\n\r\n{ EConvertToUrlError }\r\n\r\nconstructor EConvertToUrlError.Create(const PropName: string; Value: TValue);\r\nbegin\r\n if PropName <> '' then\r\n inherited CreateFmt('Cannot serialize value \"%s\" to Url parameter \"%s\"', [\r\n {$IFDEF ISDELPHI}\r\n Value.ToString\r\n {$ELSE}\r\n TValue_ToString(Value)\r\n {$ENDIF}\r\n , PropName]\r\n )\r\n else\r\n inherited CreateFmt('Cannot serialize value \"%s\" to Url',\r\n {$IFDEF ISDELPHI}\r\n [Value.ToString]\r\n {$ELSE}\r\n [TValue_ToString(Value)]\r\n {$ENDIF}\r\n );\r\nend;\r\n\r\n{ EConvertFromUrlError }\r\n\r\nconstructor EConvertFromUrlError.Create(const PropName, Literal: string);\r\nbegin\r\n if PropName <> '' then\r\n inherited CreateFmt('Cannot deserialize value \"%s\" from Url parameter \"%s\"', [Literal, PropName])\r\n else\r\n inherited CreateFmt('Cannot deserialize value \"%s\" from Url', [Literal])\r\nend;\r\n\r\n{ TOwnedList }\r\n\r\n{$IFDEF GENERICS}\r\ntype\r\n TOwnedList = class(TObjectList)\r\n strict private\r\n {$IFDEF AUTOREFCOUNT}[Weak]{$ENDIF}\r\n FOwner: {$IFDEF DELPHIXE6_LVL}TOwner{$ELSE}TObject{$ENDIF};\r\n protected\r\n procedure Notify(const Value: T; Action: TCollectionNotification); override;\r\n public\r\n constructor Create(AOwner: TOwner);\r\n end;\r\n\r\nconstructor TOwnedList.Create(AOwner: TOwner);\r\nbegin\r\n inherited Create(true);\r\n FOwner := AOwner;\r\nend;\r\n\r\nprocedure TOwnedList.Notify(const Value: T;\r\n Action: TCollectionNotification);\r\nbegin\r\n if Action = cnAdded then\r\n {$IFDEF DELPHIXE6_LVL}\r\n Value.Parent := FOwner\r\n {$ELSE}\r\n Value.Parent := TXDataModelObject(FOwner)\r\n {$ENDIF}\r\n else\r\n Value.Parent := nil;\r\n inherited;\r\nend;\r\n{$ENDIF}\r\n\r\n{ TXDataSchema }\r\n\r\nconstructor TXDataSchema.Create;\r\nbegin\r\n inherited;\r\n {$IFDEF GENERICS}\r\n FEntityTypes := TOwnedList.Create(Self);\r\n FInstanceTypes := TOwnedList.Create(Self);\r\n FEnumTypes := TOwnedList.Create(Self);\r\n FEntityContainers := TOwnedList.Create(Self);\r\n FControllers := TOwnedList.Create(Self);\r\n {$ELSE}\r\n FEntityTypes := TXDataEntityTypeList.Create(Self);\r\n FInstanceTypes := TXDataInstanceTypeList.Create(Self);\r\n FEnumTypes := TXDataEnumTypeList.Create(Self);\r\n FEntityContainers := TXDataEntityContainerList.Create(Self);\r\n FControllers := TXDataControllerList.Create(Self);\r\n {$ENDIF}\r\nend;\r\n\r\ndestructor TXDataSchema.Destroy;\r\nbegin\r\n FEntityTypes.Free;\r\n FInstanceTypes.Free;\r\n FEnumTypes.Free;\r\n FEntityContainers.Free;\r\n FControllers.Free;\r\n inherited;\r\nend;\r\n\r\nfunction TXDataSchema.FindController(const AName: string): TXDataController;\r\nvar\r\n Controller: TXDataController;\r\n I: Integer;\r\nbegin\r\n for I := 0 to Controllers.Count - 1 do\r\n begin\r\n Controller := Controllers[I];\r\n if SameText(Controller.Name, AName) then\r\n Exit(Controller);\r\n end;\r\n Result := nil;\r\nend;\r\n\r\nfunction TXDataSchema.FindContainer(const AName: string): TXDataEntityContainer;\r\nvar\r\n Container: TXDataEntityContainer;\r\n I: Integer;\r\nbegin\r\n for I := 0 to EntityContainers.Count - 1 do\r\n begin\r\n Container := EntityContainers[I];\r\n if SameText(Container.Name, AName) then\r\n Exit(Container);\r\n end;\r\n Result := nil;\r\nend;\r\n\r\nfunction TXDataSchema.FindEntityType(const AName: string): TXDataEntityType;\r\nvar\r\n EntityType: TXDataEntityType;\r\n SubType: string;\r\n I: Integer;\r\nbegin\r\n // Check if it's a collection type\r\n if IsCollectionName(AName, SubType) then\r\n begin\r\n EntityType := FindEntityType(SubType);\r\n if EntityType <> nil then\r\n Result := EntityType.Collection\r\n else\r\n Result := nil;\r\n end\r\n else\r\n begin\r\n for I := 0 to EntityTypes.Count - 1 do\r\n begin\r\n EntityType := EntityTypes[I];\r\n if SameText(EntityType.Name, AName) then\r\n Exit(EntityType);\r\n end;\r\n\r\n Result := nil;\r\n end;\r\nend;\r\n\r\nfunction TXDataSchema.FindEnumMember(const AName: string): TXDataEnumMember;\r\nvar\r\n EnumType: TXDataEnumType;\r\n EnumMember: TXDataEnumMember;\r\n I, J: Integer;\r\nbegin\r\n for I := 0 to EnumTypes.Count - 1 do\r\n begin\r\n EnumType := EnumTypes[I];\r\n for J := 0 to EnumType.Members.Count - 1 do\r\n begin\r\n EnumMember := EnumType.Members[J];\r\n if SameText(EnumMember.Name, AName) then\r\n Exit(EnumMember);\r\n end;\r\n end;\r\n Result := nil;\r\nend;\r\n\r\nfunction TXDataSchema.FindEnumType(const AName: string): TXDataEnumType;\r\nvar\r\n EnumType: TXDataEnumType;\r\n I: Integer;\r\n// SubType: string;\r\nbegin\r\n // Check if it's a collection type\r\n// if IsCollectionName(AName, SubType) then\r\n// begin\r\n// EnumType := FindEnumType(SubType);\r\n// if EnumType <> nil then\r\n// Result := EnumType.Collection\r\n// else\r\n// Result := nil;\r\n// end\r\n// else\r\n begin\r\n for I := 0 to EnumTypes.Count - 1 do\r\n begin\r\n EnumType := EnumTypes[I];\r\n if SameText(EnumType.Name, AName) then\r\n Exit(EnumType);\r\n end;\r\n Result := nil;\r\n end;\r\nend;\r\n\r\nfunction TXDataSchema.FindInstanceType(const AName: string): TXDataInstanceType;\r\nvar\r\n InstanceType: TXDataInstanceType;\r\n SubType: string;\r\n I: Integer;\r\nbegin\r\n // Check if it's a collection type\r\n if IsCollectionName(AName, SubType) then\r\n begin\r\n InstanceType := FindInstanceType(SubType);\r\n if InstanceType <> nil then\r\n Result := InstanceType.Collection\r\n else\r\n Result := nil;\r\n end\r\n else\r\n begin\r\n for I := 0 to InstanceTypes.Count - 1 do\r\n begin\r\n InstanceType := InstanceTypes[I];\r\n if SameText(InstanceType.Name, AName) then\r\n Exit(InstanceType);\r\n end;\r\n\r\n Result := nil;\r\n end;\r\nend;\r\n\r\nfunction TXDataSchema.FindOrDefineConverter(\r\n AType: TXDataType): TXDataTypeConverter;\r\nbegin\r\n if AType = nil then Exit(nil);\r\n if AType.UrlConverter <> nil then Exit(AType.UrlConverter);\r\n\r\n Result := Model.FUrlConverters.Find(AType.Name);\r\n if Result = nil then\r\n begin\r\n if AType is TXDataEnumType then\r\n begin\r\n Result := TXDataEnumConverter.Create(TXDataEnumType(AType));\r\n Model.FUrlConverters.RegisterConverter(AType.Name, Result);\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TXDataSchema.FindScalarType(const Name: string): TXDataScalarType;\r\nvar\r\n SubType: string;\r\nbegin\r\n Result := FindEnumType(Name);\r\n if Result = nil then\r\n begin\r\n // Check if it's a collection type\r\n if IsCollectionName(Name, SubType) then\r\n begin\r\n Result := TXDataPrimitiveTypes.Instance.Find(SubType);\r\n if Result <> nil then\r\n Result := Result.Collection;\r\n end\r\n else\r\n Result := TXDataPrimitiveTypes.Instance.Find(Name);\r\n end;\r\nend;\r\n\r\nfunction TXDataSchema.FindType(const Name: string): TXDataType;\r\nbegin\r\n Result := FindScalarType(Name);\r\n if Result = nil then\r\n Result := FindEntityType(Name);\r\n if Result = nil then\r\n Result := FindInstanceType(Name);\r\nend;\r\n\r\nfunction TXDataSchema.GetModel: TXDataModel;\r\nbegin\r\n Result := TXDataModel(inherited Parent);\r\nend;\r\n\r\nfunction TXDataSchema.IsCollectionName(const Name: string; var SubType: string): Boolean;\r\nvar\r\n Wrapper: string;\r\nbegin\r\n Result := TXDataUtils.GetNameAndKey(Name, Wrapper, SubType) and\r\n (Wrapper = 'Collection');\r\nend;\r\n\r\n{ TXDataProperty }\r\n\r\nconstructor TXDataProperty.Create;\r\nbegin\r\n inherited;\r\nend;\r\n\r\ndestructor TXDataProperty.Destroy;\r\nbegin\r\n inherited;\r\nend;\r\n\r\nfunction TXDataProperty.GetParent: TXDataStructuredType;\r\nbegin\r\n Result := TXDataStructuredType(inherited Parent);\r\nend;\r\n\r\nfunction TXDataProperty.QualifiedName: string;\r\nbegin\r\n if Parent <> nil then\r\n Result := Parent.QualifiedName + '.' + Self.Name\r\n else\r\n Result := Self.Name;\r\nend;\r\n\r\n{ TXDataEntityType }\r\n\r\nconstructor TXDataEntityType.Create;\r\nbegin\r\n inherited;\r\n {$IFDEF GENERICS}\r\n FKey := TList.Create;\r\n FProperties := TOwnedList.Create(Self);\r\n FNavigationProperties := TOwnedList.Create(Self);\r\n {$ELSE}\r\n FKey := TXDataPropertyList.Create(False);\r\n FProperties := TXDataSimplePropertyList.Create(Self);\r\n FNavigationProperties := TXDataNavigationPropertyList.Create(Self);\r\n {$ENDIF}\r\nend;\r\n\r\ndestructor TXDataEntityType.Destroy;\r\nbegin\r\n FKey.Free;\r\n FNavigationProperties.Free;\r\n FProperties.Free;\r\n FCollection.Free;\r\n inherited;\r\nend;\r\n\r\nfunction TXDataEntityType.FindNavigationProperty(const AName: string): TXDataNavigationProperty;\r\nbegin\r\n Result := TXDataNavigationProperty(FindStructuredProperty(AName));\r\nend;\r\n\r\nfunction TXDataEntityType.FindProperty(const AName: string): TXDataSimpleProperty;\r\nbegin\r\n Result := TXDataSimpleProperty(FindScalarProperty(AName));\r\nend;\r\n\r\nfunction TXDataEntityType.FindStructuredProperty(const AName: string): TXDataStructuredProperty;\r\nbegin\r\n Result := inherited FindStructuredProperty(AName);\r\n if (Result = nil) and (BaseType <> nil) then\r\n Result := BaseType.FindStructuredProperty(AName);\r\nend;\r\n\r\nfunction TXDataEntityType.FindScalarProperty(const AName: string): TXDataScalarProperty;\r\nbegin\r\n Result := inherited FindScalarProperty(AName);\r\n if (Result = nil) and (BaseType <> nil) then\r\n Result := BaseType.FindScalarProperty(AName);\r\nend;\r\n\r\nfunction TXDataEntityType.GetBaseTypeRef: string;\r\nbegin\r\n if FBaseType <> nil then\r\n Result := FBaseType.Name\r\n else\r\n Result := '';\r\nend;\r\n\r\nfunction TXDataEntityType.GetCollection: TXDataEntityCollectionType;\r\nbegin\r\n if FCollection = nil then\r\n begin\r\n FCollection := TXDataEntityCollectionType.Create;\r\n FCollection.ItemType := Self;\r\n FCollection.Parent := Self.Parent;\r\n end;\r\n Result := FCollection;\r\nend;\r\n\r\nfunction TXDataEntityType.GetKeyRef: TStringDynArray;\r\nvar\r\n I: Integer;\r\nbegin\r\n SetLength(Result, Key.Count);\r\n for I := 0 to Key.Count - 1 do\r\n Result[I] := Key[I].Name;\r\nend;\r\n\r\nfunction TXDataEntityType.GetStructuredProperty(Index: Integer): TXDataStructuredProperty;\r\nbegin\r\n Result := NavigationProperties[Index];\r\nend;\r\n\r\nfunction TXDataEntityType.GetScalarProperty(Index: Integer): TXDataScalarProperty;\r\nbegin\r\n Result := Properties[Index];\r\nend;\r\n\r\nfunction TXDataEntityType.GetTypeKind: TXTypeKind;\r\nbegin\r\n Result := TXTypeKind.xtEntity;\r\nend;\r\n\r\nfunction TXDataEntityType.IsInheritedFrom(ABase: TXDataEntityType): boolean;\r\nbegin\r\n if ABase = Self then\r\n Result := true\r\n else\r\n Result := (BaseType <> nil) and BaseType.IsInheritedFrom(ABase);\r\nend;\r\n\r\nfunction TXDataEntityType.KeyScalarProperties: TXDataSimplePropertyArray;\r\n\r\n procedure FillKeyConverters(AType: TXDataEntityType; var KeyProps: TXDataSimplePropertyArray);\r\n var\r\n Key: TXDataProperty;\r\n I: Integer;\r\n begin\r\n AType := AType.RootType;\r\n for I := 0 to AType.Key.Count - 1 do\r\n begin\r\n Key := AType.Key[I];\r\n if Key.IsSimple then\r\n begin\r\n SetLength(KeyProps, Length(KeyProps) + 1);\r\n KeyProps[Length(KeyProps) - 1] := TXDataSimpleProperty(Key);\r\n end\r\n else\r\n FillKeyConverters(TXDataNavigationProperty(Key).Target, KeyProps);\r\n end;\r\n end;\r\n\r\nvar\r\n KeyProps: TXDataSimplePropertyArray;\r\nbegin\r\n SetLength(KeyProps, 0);\r\n FillKeyConverters(Self, KeyProps);\r\n Result := KeyProps;\r\nend;\r\n\r\nfunction TXDataEntityType.StructuredPropertyCount: Integer;\r\nbegin\r\n Result := NavigationProperties.Count;\r\nend;\r\n\r\nfunction TXDataEntityType.QualifiedName: string;\r\nbegin\r\n Result := Self.Name;\r\n if Self.Schema <> nil then\r\n begin\r\n if Self.Schema.Alias <> '' then\r\n Result := Self.Schema.Alias + '.' + Self.Name\r\n else\r\n if Self.Schema.Namespace <> '' then\r\n Result := Self.Schema.Namespace + '.' + Self.Name;\r\n end;\r\nend;\r\n\r\nfunction TXDataEntityType.RootType: TXDataEntityType;\r\nbegin\r\n Result := Self;\r\n while Result.BaseType <> nil do\r\n Result := Result.BaseType;\r\nend;\r\n\r\nprocedure TXDataEntityType.Prepare;\r\nvar\r\n KeyItem: string;\r\n TempProp: TXDataProperty;\r\n I: Integer;\r\nbegin\r\n if FBaseTypeRef <> '' then\r\n begin\r\n BaseType := Schema.FindEntityType(FBaseTypeRef);\r\n if BaseType = nil then\r\n raise EModelReferenceNotFound.CreateFmt('BaseType %s not found for entity type %s', [FBaseTypeRef, Name]);\r\n FBaseTypeRef := '';\r\n end;\r\n if BaseType <> nil then\r\n BaseType.Prepare;\r\n\r\n if Length(FKeyRef) > 0 then\r\n begin\r\n Key.Clear;\r\n for I := 0 to Length(FKeyRef) - 1 do\r\n begin\r\n KeyItem := FKeyRef[I];\r\n TempProp := FindProperty(KeyItem);\r\n if TempProp = nil then\r\n TempProp := FindNavigationProperty(KeyItem);\r\n if TempProp = nil then\r\n raise EModelReferenceNotFound.CreateFmt('Key property %s not found on entity type %s', [KeyItem, Name]);\r\n Key.Add(TempProp);\r\n end;\r\n SetLength(FKeyRef, 0);\r\n end;\r\n\r\n for I := 0 to Properties.Count - 1 do\r\n Properties[I].Prepare;\r\n for I := 0 to NavigationProperties.Count - 1 do\r\n NavigationProperties[I].Prepare;\r\nend;\r\n\r\nfunction TXDataEntityType.ScalarPropertyCount: Integer;\r\nbegin\r\n Result := Properties.Count;\r\nend;\r\n\r\n{ TXDataSimpleProperty }\r\n\r\nfunction TXDataScalarProperty.GetTypeKind: TXTypeKind;\r\nbegin\r\n if PropertyType = nil then\r\n Result := TXTypeKind.xtUndefined\r\n else\r\n Result := PropertyType.TypeKind;\r\nend;\r\n\r\nfunction TXDataScalarProperty.GetTypeRef: string;\r\nbegin\r\n if FType <> nil then\r\n Result := FType.Name\r\n else\r\n Result := '';\r\nend;\r\n\r\nfunction TXDataScalarProperty.GetUrlConverter: TXDataTypeConverter;\r\nbegin\r\n if PropertyType <> nil then\r\n Result := PropertyType.UrlConverter\r\n else\r\n Result := nil;\r\nend;\r\n\r\nfunction TXDataScalarProperty.GetValueType: TXDataType;\r\nbegin\r\n Result := PropertyType;\r\nend;\r\n\r\nfunction TXDataScalarProperty.IsSimple: Boolean;\r\nbegin\r\n Result := True;\r\nend;\r\n\r\nprocedure TXDataScalarProperty.SetDefaultValue(const Value: TValue);\r\nbegin\r\n FDefaultValue := Value;\r\n FHasDefaultValue := True;\r\nend;\r\n\r\nprocedure TXDataScalarProperty.SetType(const Value: TXDataScalarType);\r\nbegin\r\n // add a restriction here, property cannot be entity type\r\n // (but can be complex type so we can't restrict by class)\r\n\r\n // Also, type must be in scope (same namespace as property). I.e, property can be\r\n // either a scalar type, a collection or a complex type in scope\r\n FType := Value;\r\nend;\r\n\r\n{ TXDataSimpleProperty }\r\n\r\nfunction TXDataSimpleProperty.GetParent: TXDataEntityType;\r\nbegin\r\n Result := TXDataEntityType(inherited Parent);\r\nend;\r\n\r\nprocedure TXDataSimpleProperty.Prepare;\r\nbegin\r\n // Resolve type reference\r\n if FTypeRef <> '' then\r\n begin\r\n PropertyType := Parent.Schema.FindScalarType(FTypeRef);\r\n if PropertyType = nil then\r\n raise EModelReferenceNotFound.CreateFmt('Property type %s not found for property %s.%s',\r\n [FTypeRef, Parent.Name, Name]);\r\n FTypeRef := '';\r\n end;\r\n\r\n // Set converter\r\n if PropertyType.UrlConverter = nil then\r\n raise EUrlConverterNotFound.Create(PropertyType);\r\nend;\r\n\r\n{ TXDataEntityContainer }\r\n\r\nconstructor TXDataEntityContainer.Create;\r\nbegin\r\n inherited;\r\n {$IFDEF GENERICS}\r\n FEntitySets := TOwnedList.Create(Self);\r\n {$ELSE}\r\n FEntitySets := TXDataEntitySetList.Create(Self);\r\n {$ENDIF}\r\nend;\r\n\r\ndestructor TXDataEntityContainer.Destroy;\r\nbegin\r\n FEntitySets.Free;\r\n inherited;\r\nend;\r\n\r\nfunction TXDataEntityContainer.FindEntitySet(\r\n const AName: string): TXDataEntitySet;\r\nvar\r\n EntitySet: TXDataEntitySet;\r\n I: Integer;\r\nbegin\r\n for I := 0 to EntitySets.Count - 1 do\r\n begin\r\n EntitySet := EntitySets[I];\r\n if SameText(EntitySet.Name, AName) then\r\n Exit(EntitySet);\r\n end;\r\n Result := nil;\r\nend;\r\n\r\nfunction TXDataEntityContainer.GetSchema: TXDataSchema;\r\nbegin\r\n Result := TXDataSchema(inherited Parent);\r\nend;\r\n\r\n{ TXDataEnumType }\r\n\r\nfunction TXDataEnumType.AddMember(const AName: string; AValue: integer): TXDataEnumMember;\r\nbegin\r\n Result := TXDataEnumMember.Create;\r\n Members.Add(Result);\r\n Result.Name := AName;\r\n Result.Value := AValue;\r\nend;\r\n\r\nconstructor TXDataEnumType.Create;\r\nbegin\r\n {$IFDEF GENERICS}\r\n FMembers := TObjectList.Create(True);\r\n {$ELSE}\r\n FMembers := TXDataEnumMemberList.Create;\r\n {$ENDIF}\r\nend;\r\n\r\ndestructor TXDataEnumType.Destroy;\r\nbegin\r\n FMembers.Free;\r\n inherited;\r\nend;\r\n\r\nfunction TXDataEnumType.GetSchema: TXDataSchema;\r\nbegin\r\n Result := TXDataSchema(inherited Parent);\r\nend;\r\n\r\nfunction TXDataEnumType.GetTypeKind: TXTypeKind;\r\nbegin\r\n Result := TXTypeKind.xtEnum;\r\nend;\r\n\r\nfunction TXDataEnumType.QualifiedName: string;\r\nbegin\r\n Result := Self.Name;\r\n if Self.Schema <> nil then\r\n begin\r\n if Self.Schema.Alias <> '' then\r\n Result := Self.Schema.Alias + '.' + Self.Name\r\n else\r\n if Self.Schema.Namespace <> '' then\r\n Result := Self.Schema.Namespace + '.' + Self.Name;\r\n end;\r\nend;\r\n\r\n{ TXDataModel }\r\n\r\nconstructor TXDataBaseModel.Create;\r\nbegin\r\n FTitle := 'Server API';\r\n FVersion := '3';\r\n {$IFDEF GENERICS}\r\n FSchemas := TOwnedList.Create(Self);\r\n {$ELSE}\r\n FSchemas := TXDataSchemaList.Create(Self);\r\n {$ENDIF}\r\n FUrlConverters := TXDataUrlConverters.Create;\r\nend;\r\n\r\nfunction TXDataBaseModel.DefaultEntitySet(AType: TXDataEntityType): TXDataEntitySet;\r\nvar\r\n Schema: TXDataSchema;\r\n EntitySet: TXDataEntitySet;\r\n Container: TXDataEntityContainer;\r\n SchemaIndex, ContainerIndex, EntitySetIndex: Integer;\r\nbegin\r\n if AType.DefaultEntitySet <> nil then\r\n Exit(AType.DefaultEntitySet);\r\n\r\n for SchemaIndex := 0 to Schemas.Count - 1 do\r\n begin\r\n Schema := Schemas[SchemaIndex];\r\n for ContainerIndex := 0 to Schema.EntityContainers.Count - 1 do\r\n begin\r\n Container := Schema.EntityContainers[ContainerIndex];\r\n for EntitySetIndex := 0 to Container.EntitySets.Count - 1 do\r\n begin\r\n EntitySet := Container.EntitySets[EntitySetIndex];\r\n if EntitySet.EntityType = AType then\r\n begin\r\n DefineDefaultEntitySet(AType, EntitySet);\r\n Exit(EntitySet);\r\n end;\r\n end;\r\n end;\r\n end;\r\n Result := nil;\r\nend;\r\n\r\nprocedure TXDataBaseModel.DefineDefaultEntitySet(AType: TXDataEntityType;\r\n EntitySet: TXDataEntitySet);\r\nbegin\r\n AType.DefaultEntitySet := EntitySet;\r\nend;\r\n\r\ndestructor TXDataBaseModel.Destroy;\r\nbegin\r\n FSchemas.Free;\r\n FUrlConverters.Free;\r\n inherited;\r\nend;\r\n\r\nfunction TXDataBaseModel.FindActionByOperationId(\r\n const AOperationId: string): TXDataAction;\r\nvar\r\n Schema: TXDataSchema;\r\n Controller: TXDataController;\r\n Action: TXDataAction;\r\n I, J, L: Integer;\r\nbegin\r\n Result := nil;\r\n for I := 0 to Schemas.Count - 1 do\r\n begin\r\n Schema := Schemas[I];\r\n for J := 0 to Schema.Controllers.Count - 1 do\r\n begin\r\n Controller := Schema.Controllers[J];\r\n for L := 0 to Controller.Actions.Count - 1 do\r\n begin\r\n Action := Controller.Actions[L];\r\n\r\n if SameText(Action.OperationId, AOperationId) then\r\n Exit(Action);\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TXDataBaseModel.FindController(const AName: string): TXDataController;\r\nvar\r\n Schema: TXDataSchema;\r\n I: Integer;\r\nbegin\r\n Result := nil;\r\n for I := 0 to Schemas.Count - 1 do\r\n begin\r\n Schema := Schemas[I];\r\n Result := Schema.FindController(AName);\r\n if Result <> nil then\r\n break;\r\n end;\r\nend;\r\n\r\nfunction TXDataBaseModel.FindEntitySet(const QualifiedName: string): TXDataEntitySet;\r\nvar\r\n Prefix, LocalName: string;\r\n Schema: TXDataSchema;\r\n Container: TXDataEntityContainer;\r\n I: Integer;\r\nbegin\r\n Result := nil;\r\n TXDataUtils.GetQualifiedName(QualifiedName, Prefix, LocalName);\r\n Container := nil;\r\n if Prefix = '' then\r\n begin\r\n Container := DefaultEntityContainer;\r\n end else\r\n begin\r\n for I := 0 to Schemas.Count - 1 do\r\n begin\r\n Schema := Schemas[I];\r\n Container := Schema.FindContainer(Prefix);\r\n if Container <> nil then\r\n break;\r\n end;\r\n end;\r\n if Container <> nil then\r\n Result := Container.FindEntitySet(LocalName);\r\nend;\r\n\r\nfunction TXDataBaseModel.FindEntityType(\r\n const QualifiedName: string): TXDataEntityType;\r\nvar\r\n Prefix, LocalName: string;\r\n Schema: TXDataSchema;\r\nbegin\r\n Result := nil;\r\n TXDataUtils.GetQualifiedName(QualifiedName, Prefix, LocalName);\r\n Schema := FindSchema(Prefix);\r\n if Schema <> nil then\r\n Result := Schema.FindEntityType(LocalName);\r\nend;\r\n\r\nfunction TXDataBaseModel.FindInstanceType(const QualifiedName: string): TXDataInstanceType;\r\nvar\r\n Prefix, LocalName: string;\r\n Schema: TXDataSchema;\r\nbegin\r\n Result := nil;\r\n TXDataUtils.GetQualifiedName(QualifiedName, Prefix, LocalName);\r\n Schema := FindSchema(Prefix);\r\n if Schema <> nil then\r\n Result := Schema.FindInstanceType(LocalName);\r\nend;\r\n\r\nfunction TXDataBaseModel.FindSchema(const APrefix: string): TXDataSchema;\r\nvar\r\n LocalSchema: TXDataSchema;\r\n I: Integer;\r\nbegin\r\n for I := 0 to Schemas.Count - 1 do\r\n begin\r\n LocalSchema := Schemas[I];\r\n if SameText(APrefix, LocalSchema.Namespace) or SameText(APrefix, LocalSchema.Alias) then\r\n Exit(LocalSchema);\r\n end;\r\n Result := nil;\r\nend;\r\n\r\nfunction TXDataBaseModel.GetDefaultEntityContainer: TXDataEntityContainer;\r\nbegin\r\n if (Schemas.Count > 0) and (Schemas[0].EntityContainers.Count > 0) then\r\n Result := Schemas[0].EntityContainers[0]\r\n else\r\n Result := nil;\r\nend;\r\n\r\nfunction TXDataBaseModel.GetEntitySet(\r\n const QualifiedName: string): TXDataEntitySet;\r\nbegin\r\n Result := FindEntitySet(QualifiedName);\r\n if Result = nil then\r\n raise EXDataEntitySetNotFound.Create(QualifiedName);\r\nend;\r\n\r\nfunction TXDataBaseModel.GetEntityType(\r\n const QualifiedName: string): TXDataEntityType;\r\nbegin\r\n Result := FindEntityType(QualifiedName);\r\n if Result = nil then\r\n raise EXDataEntityTypeNotFound.Create(QualifiedName);\r\nend;\r\n\r\nprocedure TXDataBaseModel.Prepare;\r\nvar\r\n Schema: TXDataSchema;\r\n Container: TXDataEntityContainer;\r\n EntitySet: TXDataEntitySet;\r\n EntityType: TXDataEntityType;\r\n InstanceType: TXDataInstanceType;\r\n SchemaIndex: Integer;\r\n ContainerIndex: Integer;\r\n EntitySetIndex: Integer;\r\n EntityTypeIndex: Integer;\r\n InstanceTypeIndex: Integer;\r\n ControllerIndex: Integer;\r\n Controller: TXDataController;\r\n ScalarTypeIndex: Integer;\r\n ScalarType: TXDataScalarType;\r\nbegin\r\n for SchemaIndex := 0 to Schemas.Count - 1 do\r\n begin\r\n Schema := Schemas[SchemaIndex];\r\n\r\n// Schema.EntityTypes.Sort(TComparer.Construct(\r\n// function(const Left, Right: TXDataEntityType): Integer\r\n// begin\r\n// Result := CompareText(Left.Name, Right.Name);\r\n// end));\r\n\r\n // set the UrlConverter for all types\r\n for ScalarTypeIndex := 0 to TXDataPrimitiveTypes.Instance.Types.Count - 1 do\r\n begin\r\n ScalarType := TXDataPrimitiveTypes.Instance.Types[ScalarTypeIndex];\r\n ScalarType.UrlConverter := Schema.FindOrDefineConverter(ScalarType);\r\n ScalarType.Collection.UrlConverter := Schema.FindOrDefineConverter(ScalarType.Collection);\r\n end;\r\n for ScalarTypeIndex := 0 to Schema.EnumTypes.Count - 1 do\r\n begin\r\n ScalarType := Schema.EnumTypes[ScalarTypeIndex];\r\n ScalarType.UrlConverter := Schema.FindOrDefineConverter(ScalarType);\r\n end;\r\n for EntityTypeIndex := 0 to Schema.EntityTypes.Count - 1 do\r\n begin\r\n EntityType := Schema.EntityTypes[EntityTypeIndex];\r\n EntityType.UrlConverter := Schema.FindOrDefineConverter(EntityType);\r\n EntityType.Collection.UrlConverter := Schema.FindOrDefineConverter(EntityType.Collection);\r\n end;\r\n for InstanceTypeIndex := 0 to Schema.InstanceTypes.Count - 1 do\r\n begin\r\n InstanceType := Schema.InstanceTypes[InstanceTypeIndex];\r\n InstanceType.UrlConverter := Schema.FindOrDefineConverter(InstanceType);\r\n InstanceType.Collection.UrlConverter := Schema.FindOrDefineConverter(InstanceType.Collection);\r\n end;\r\n\r\n for ContainerIndex := 0 to Schema.EntityContainers.Count - 1 do\r\n begin\r\n Container := Schema.EntityContainers[ContainerIndex];\r\n for EntitySetIndex := 0 to Container.EntitySets.Count - 1 do\r\n begin\r\n EntitySet := Container.EntitySets[EntitySetIndex];\r\n EntitySet.Prepare;\r\n end;\r\n end;\r\n\r\n for EntityTypeIndex := 0 to Schema.EntityTypes.Count - 1 do\r\n begin\r\n EntityType := Schema.EntityTypes[EntityTypeIndex];\r\n EntityType.Prepare;\r\n end;\r\n\r\n for InstanceTypeIndex := 0 to Schema.InstanceTypes.Count - 1 do\r\n begin\r\n InstanceType := Schema.InstanceTypes[InstanceTypeIndex];\r\n InstanceType.Prepare;\r\n end;\r\n\r\n for ControllerIndex := 0 to Schema.Controllers.Count - 1 do\r\n begin\r\n Controller := Schema.Controllers[ControllerIndex];\r\n Controller.Prepare;\r\n end;\r\n end;\r\nend;\r\n\r\n{ TXDataModel }\r\n\r\ntype\r\n TValueArray = array of TValue;\r\n\r\nfunction TXDataModel.IdToKeyPredicate(const Entity: TValue; AType: TXDataEntityType;\r\n GetPropValue: TXDataGetPropValueProc; GetNavPropValue: TXDataGetNavPropValueProc): string;\r\n\r\n procedure FillKeyValues(Entity: TValue; AType: TXDataEntityType; var Values: TValueArray);\r\n var\r\n Key: TXDataProperty;\r\n I: Integer;\r\n begin\r\n AType := AType.RootType;\r\n for I := 0 to AType.Key.Count - 1 do\r\n begin\r\n Key := AType.Key[I];\r\n if Key.IsSimple then\r\n begin\r\n SetLength(Values, Length(Values) + 1);\r\n Values[Length(Values) - 1] := GetPropValue(Entity, TXDataSimpleProperty(Key));\r\n end\r\n else\r\n FillKeyValues(\r\n GetNavPropValue(Entity, TXDataNavigationProperty(Key)),\r\n TXDataNavigationProperty(Key).Target,\r\n Values\r\n );\r\n end;\r\n end;\r\n\r\nvar\r\n ValueList: TValueArray;\r\n SimpleKey: TXDataSimpleProperty;\r\nbegin\r\n AType := AType.RootType;\r\n if AType.Key.Count = 0 then\r\n Exit('');\r\n\r\n if (AType.Key.Count = 1) and AType.Key[0].IsSimple then\r\n begin\r\n SimpleKey := TXDataSimpleProperty(AType.Key[0]);\r\n Result := SimpleKey.UrlConverter.ValueToUrl(\r\n GetPropValue(Entity, SimpleKey),\r\n SimpleKey.Name\r\n )\r\n end\r\n else\r\n begin\r\n SetLength(ValueList, 0);\r\n FillKeyValues(Entity, AType, ValueList);\r\n {$IFDEF PAS2JS}\r\n Result := IdToKeyPredicate(AType, ValueList);\r\n {$ELSE}\r\n Result := IdToKeyPredicate(AType, TValue.From(ValueList));\r\n {$ENDIF}\r\n end;\r\nend;\r\n\r\nfunction TXDataModel.CanonicalUrlFromEntity(EntityType: TXDataEntityType;\r\n const Entity: TValue; GetPropValue: TXDataGetPropValueProc;\r\n GetNavPropValue: TXDataGetNavPropValueProc): string;\r\nvar\r\n EntitySet: TXDataEntitySet;\r\nbegin\r\n EntitySet := DefaultEntitySet(EntityType);\r\n if EntitySet = nil then\r\n raise ECannotBuildCanonicalUrl.Create(EntityType);\r\n Result := Format('%s(%s)', [\r\n EntitySetUrl(EntitySet),\r\n IdToKeyPredicate(Entity, EntityType, GetPropValue, GetNavPropValue)\r\n ]);\r\nend;\r\n\r\nfunction TXDataModel.CanonicalUrlFromId(EntityType: TXDataEntityType; Id: TValue): string;\r\nvar\r\n EntitySet: TXDataEntitySet;\r\nbegin\r\n EntitySet := DefaultEntitySet(EntityType);\r\n if EntitySet = nil then\r\n raise ECannotBuildCanonicalUrl.Create(EntityType);\r\n Result := Format('%s(%s)', [EntitySetUrl(EntitySet), IdToKeyPredicate(EntityType, Id)]);\r\nend;\r\n\r\nfunction TXDataModel.DefaultSchema: TXDataSchema;\r\nbegin\r\n if Schemas.Count >= 0 then\r\n Result := Schemas[0]\r\n else\r\n Result := nil;\r\nend;\r\n\r\nfunction TXDataModel.EntitySetUrl(const AEntitySet: TXDataEntitySet): string;\r\nbegin\r\n // todo: use prefixed, qualified name when model has more than one entity container\r\n // for now, we will consider there is only one default entity container\r\n Result := AEntitySet.Name;\r\nend;\r\n\r\nfunction TXDataModel.IdToKeyPredicate(AType: TXDataEntityType;\r\n const Id: TValue): string;\r\nvar\r\n I: integer;\r\n Value, CastValue: TValue;\r\n IsArray: Boolean;\r\n KeyProps: TXDataSimplePropertyArray;\r\nbegin\r\n AType := AType.RootType;\r\n if AType.Key.Count = 0 then\r\n Exit('');\r\n if (AType.Key.Count = 1) and AType.Key[0].IsSimple then\r\n Result := TXDataSimpleProperty(AType.Key[0]).UrlConverter.ValueToUrl(Id, AType.Key[0].Name)\r\n else\r\n begin\r\n // complex predicate (composite or using associations)\r\n KeyProps := AType.KeyScalarProperties;\r\n IsArray := TValue_IsArray(Id);\r\n if IsArray and (TValue_GetArrayLength(Id) <> Length(KeyProps)) then\r\n raise ECannotBuildKeyPredicateWrongValueLength.Create(AType);\r\n if not IsArray and (Length(KeyProps) <> 1) then\r\n raise ECannotBuildKeyPredicateWrongValueLength.Create(AType);\r\n\r\n for I := 0 to Length(KeyProps) - 1 do\r\n begin\r\n if IsArray then\r\n Value := TValue_GetArrayElement(Id, I)\r\n else\r\n Value := Id;\r\n {$IFDEF PAS2JS}\r\n CastValue := Value;\r\n {$ELSE}\r\n if Value.TypeInfo = TypeInfo(TValue) then\r\n CastValue := Value.AsType\r\n else\r\n CastValue := Value;\r\n {$ENDIF}\r\n\r\n if Result <> '' then\r\n Result := Result + ',';\r\n Result := Result + KeyProps[I].UrlConverter.ValueToUrl(CastValue, KeyProps[I].Name);\r\n end;\r\n end;\r\nend;\r\n\r\n{ TXDataModelObject }\r\n\r\ndestructor TXDataModelObject.Destroy;\r\nbegin\r\n {$IFDEF ISDELPHI}\r\n {$IFNDEF AUTOREFCOUNT}\r\n if OwnsDataObject and FData.IsObject then\r\n FData.AsObject.Free;\r\n {$ENDIF}\r\n {$ENDIF}\r\n inherited;\r\nend;\r\n\r\n{ TXDataType }\r\n\r\nfunction TXDataType.GetIsCollection: boolean;\r\nbegin\r\n Result := false;\r\nend;\r\n\r\nfunction TXDataType.GetName: string;\r\nbegin\r\n Result := FName;\r\nend;\r\n\r\n\r\nfunction TXDataType.GetTypeKind: TXTypeKind;\r\nbegin\r\n Result := TXTypeKind.xtUndefined;\r\nend;\r\n\r\nfunction TXDataType.GetWrappedType: TXDataType;\r\nbegin\r\n Result := nil;\r\nend;\r\n\r\nfunction TXDataType.QualifiedName: string;\r\nbegin\r\n Result := Name;\r\nend;\r\n\r\n{ TXDataScalarType }\r\n\r\ndestructor TXDataScalarType.Destroy;\r\nbegin\r\n FCollection.Free;\r\n inherited;\r\nend;\r\n\r\nfunction TXDataScalarType.GetCollection: TXDataScalarType;\r\nbegin\r\n if FCollection = nil then\r\n begin\r\n FCollection := TXDataScalarCollectionType.Create;\r\n FCollection.ItemType := Self;\r\n end;\r\n Result := FCollection;\r\nend;\r\n\r\n{ TDataScalarCollectionType }\r\n\r\nfunction TXDataScalarCollectionType.GetIsCollection: boolean;\r\nbegin\r\n Result := true;\r\nend;\r\n\r\n{ TXDataEntityCollectionType }\r\n\r\nfunction TXDataEntityCollectionType.GetIsCollection: boolean;\r\nbegin\r\n Result := true;\r\nend;\r\n\r\nfunction TXDataScalarCollectionType.GetName: string;\r\nbegin\r\n if ItemType <> nil then\r\n Result := Format('Collection(%s)', [ItemType.Name])\r\n else\r\n Result := 'Collection()';\r\nend;\r\n\r\nfunction TXDataScalarCollectionType.GetTypeKind: TXTypeKind;\r\nbegin\r\n Result := TXTypeKind.xtScalarCollection;\r\nend;\r\n\r\nfunction TXDataScalarCollectionType.GetWrappedType: TXDataType;\r\nbegin\r\n Result := ItemType;\r\nend;\r\n\r\nfunction TXDataScalarCollectionType.QualifiedName: string;\r\nbegin\r\n if ItemType <> nil then\r\n Result := Format('Collection(%s)', [ItemType.QualifiedName])\r\n else\r\n Result := 'Collection()';\r\nend;\r\n\r\nfunction TXDataEntityCollectionType.GetName: string;\r\nbegin\r\n if ItemType <> nil then\r\n Result := Format('Collection(%s)', [ItemType.Name])\r\n else\r\n Result := 'Collection()';\r\nend;\r\n\r\nfunction TXDataEntityCollectionType.GetTypeKind: TXTypeKind;\r\nbegin\r\n Result := TXTypeKind.xtEntityCollection;\r\nend;\r\n\r\nfunction TXDataEntityCollectionType.GetWrappedType: TXDataType;\r\nbegin\r\n Result := ItemType;\r\nend;\r\n\r\nfunction TXDataEntityCollectionType.QualifiedName: string;\r\nbegin\r\n if ItemType <> nil then\r\n Result := Format('Collection(%s)', [ItemType.QualifiedName])\r\n else\r\n Result := 'Collection()';\r\nend;\r\n\r\n{ TXDataEntitySet }\r\n\r\nfunction TXDataEntitySet.GetContainer: TXDataEntityContainer;\r\nbegin\r\n Result := TXDataEntityContainer(inherited Parent);\r\nend;\r\n\r\nfunction TXDataEntitySet.GetEntityTypeRef: string;\r\nbegin\r\n if EntityType <> nil then\r\n Result := EntityType.Name\r\n else\r\n Result := '';\r\nend;\r\n\r\nprocedure TXDataEntitySet.Prepare;\r\nbegin\r\n if FEntityTypeRef <> '' then\r\n begin\r\n EntityType := Container.Schema.FindEntityType(FEntityTypeRef);\r\n if EntityType = nil then\r\n raise EModelReferenceNotFound.CreateFmt('EntityType not found: %s', [FEntityTypeRef]);\r\n FEntityTypeRef := '';\r\n end;\r\nend;\r\n\r\n{ ECannotSetTypeKind }\r\n\r\nconstructor ECannotSetTypeKind.Create(Prop: TXDataProperty; Value: TXTypeKind);\r\nbegin\r\n inherited CreateFmt('Cannot set property \"%s\" type to type kind %s',\r\n [Prop.QualifiedName, IntToStr(Ord(Value))]);\r\nend;\r\n\r\n{ TXDataAction }\r\n\r\nfunction TXDataAction.BodyParamCount: Integer;\r\nbegin\r\n Result := ParamCount(TBindingMode.FromBody);\r\nend;\r\n\r\nconstructor TXDataAction.Create;\r\nbegin\r\n FHttpMethod := 'POST';\r\n {$IFDEF GENERICS}\r\n FParameters := TOwnedList.Create(Self);\r\n {$ELSE}\r\n FParameters := TXDataParamDefList.Create(Self);\r\n {$ENDIF}\r\nend;\r\n\r\ndestructor TXDataAction.Destroy;\r\nbegin\r\n FParameters.Free;\r\n FRouteInfo.Free;\r\n inherited;\r\nend;\r\n\r\nfunction TXDataAction.FindParameter(const AName: string): TXDataParamDef;\r\nvar\r\n I: Integer;\r\nbegin\r\n I := IndexOfParameter(AName);\r\n if I >= 0 then\r\n Result := Parameters[I]\r\n else\r\n Result := nil;\r\nend;\r\n\r\nfunction TXDataAction.HasOutputParams: Boolean;\r\nvar\r\n ParamDef: TXDataParamDef;\r\n I: Integer;\r\nbegin\r\n for I := 0 to Parameters.Count - 1 do\r\n begin\r\n ParamDef := Parameters[I];\r\n if ParamDef.Output then\r\n Exit(True);\r\n end;\r\n Result := False;\r\nend;\r\n\r\nfunction TXDataAction.IndexOf(Param: TXDataParamDef): Integer;\r\nbegin\r\n Result := FParameters.IndexOf(Param);\r\nend;\r\n\r\nfunction TXDataAction.IndexOfParameter(const AName: string): Integer;\r\nvar\r\n I: Integer;\r\nbegin\r\n for I := 0 to Parameters.Count - 1 do\r\n if SameText(Parameters[I].Name, AName) then\r\n Exit(I);\r\n Result := -1;\r\nend;\r\n\r\nfunction TXDataAction.IsFormContent: Boolean;\r\nbegin\r\n Result := SameText(Consumes, 'application/x-www-form-urlencoded');\r\nend;\r\n\r\nfunction TXDataAction.IsJsonContent: Boolean;\r\nbegin\r\n Result := (Consumes = '') or SameText(Consumes, 'application/json');\r\nend;\r\n\r\nfunction TXDataAction.ParamCount(Binding: TBindingMode): Integer;\r\nvar\r\n I: Integer;\r\nbegin\r\n Result := 0;\r\n for I := 0 to Parameters.Count - 1 do\r\n if Parameters[I].BindingMode = Binding then\r\n Inc(Result);\r\nend;\r\n\r\nfunction TXDataAction.PathParamCount: Integer;\r\nbegin\r\n Result := ParamCount(TBindingMode.FromPath);\r\nend;\r\n\r\nprocedure TXDataAction.Prepare;\r\nvar\r\n ParamDefIndex: Integer;\r\n ParamDef: TXDataParamDef;\r\n Segment: TXDataRouteSegment;\r\n I: Integer;\r\nbegin\r\n for ParamDefIndex := 0 to Parameters.Count - 1 do\r\n begin\r\n ParamDef := Parameters[ParamDefIndex];\r\n ParamDef.Prepare;\r\n end;\r\n\r\n // Solve return type reference, if any\r\n if FReturnTypeRef <> '' then\r\n begin\r\n ReturnType := Controller.Schema.FindType(FReturnTypeRef);\r\n if ReturnType = nil then\r\n raise EModelReferenceNotFound.CreateFmt('Return type %s not found for action %s.%s',\r\n [FReturnTypeRef, Controller.Name, Name]);\r\n FReturnTypeRef := '';\r\n end;\r\n\r\n // Prepare Route\r\n FreeAndNil(FRouteInfo);\r\n FRouteInfo := TXDataRouteInfo.Create;\r\n FRouteInfo.Process(Controller.Name + '/' + Self.Name);\r\n\r\n // Bind parameters to existing PathParams\r\n for I := 0 to FRouteInfo.SegmentCount - 1 do\r\n begin\r\n Segment := FRouteInfo.Segments[I];\r\n if Segment.IsParam then\r\n begin\r\n Segment.ParamIndex := -1;\r\n // find an existing parameter by name\r\n for ParamDefIndex := 0 to PathParamCount - 1 do\r\n if SameText(PathParams[ParamDefIndex].Name, Segment.ParamName) then\r\n begin\r\n Segment.ParamIndex := ParamDefIndex;\r\n break;\r\n end;\r\n if Segment.ParamIndex = -1 then\r\n raise EXDataInvalidRouteParam.Create(Self, Segment.Value);\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TXDataAction.QueryParamCount: Integer;\r\nbegin\r\n Result := ParamCount(TBindingMode.FromURI);\r\nend;\r\n\r\nfunction TXDataAction.RequiredPathParamCount: Integer;\r\nvar\r\n I: Integer;\r\nbegin\r\n Result := 0;\r\n for I := 0 to Parameters.Count - 1 do\r\n if Parameters[I].BindingMode = TBindingMode.FromPath then\r\n if not Parameters[I].HasDefaultValue then\r\n Inc(Result);\r\nend;\r\n\r\nfunction TXDataAction.ParamStreamIndex: Integer;\r\nvar\r\n I: Integer;\r\nbegin\r\n for I := 0 to Parameters.Count - 1 do\r\n if Assigned(Parameters[I].ParamType) and (Parameters[I].ParamType.TypeKind = TXTypeKind.xtRaw) then\r\n begin\r\n Result := I;\r\n Exit;\r\n end;\r\n\r\n if IsParamStream then\r\n Result := 0\r\n else\r\n Result := -1;\r\nend;\r\n\r\nfunction TXDataAction.GetBodyParam(Index: Integer): TXDataParamDef;\r\nbegin\r\n Result := GetParam(TBindingMode.FromBody, Index);\r\nend;\r\n\r\nfunction TXDataAction.GetController: TXDataController;\r\nbegin\r\n Result := TXDataController(inherited Parent);\r\nend;\r\n\r\nfunction TXDataAction.GetParam(Binding: TBindingMode; Index: Integer): TXDataParamDef;\r\nvar\r\n I, CurIndex: Integer;\r\nbegin\r\n Result := nil;\r\n CurIndex := -1;\r\n for I := 0 to Parameters.Count - 1 do\r\n if Parameters[I].BindingMode = Binding then\r\n begin\r\n Inc(CurIndex);\r\n if Index = CurIndex then\r\n begin\r\n Result := Parameters[I];\r\n Exit;\r\n end;\r\n end;\r\n ErrorOutOfRange;\r\nend;\r\n\r\nfunction TXDataAction.GetPathParam(Index: Integer): TXDataParamDef;\r\nbegin\r\n Result := GetParam(TBindingMode.FromPath, Index);\r\nend;\r\n\r\nfunction TXDataAction.GetQueryParam(Index: Integer): TXDataParamDef;\r\nbegin\r\n Result := GetParam(TBindingMode.FromURI, Index);\r\nend;\r\n\r\nfunction TXDataAction.GetReturnTypeRef: string;\r\nbegin\r\n if FReturnType <> nil then\r\n Result := FReturnType.Name\r\n else\r\n Result := '';\r\nend;\r\n\r\n{ TXDataParamDef }\r\n\r\nfunction TXDataParamDef.GetParent: TXDataAction;\r\nbegin\r\n Result := TXDataAction(inherited Parent);\r\nend;\r\n\r\nfunction TXDataParamDef.GetTypeNameRef: string;\r\nbegin\r\n if (FType <> nil) and (GetTypeRef = '') then\r\n Result := FType.Name\r\n else\r\n Result := '';\r\nend;\r\n\r\nfunction TXDataParamDef.GetTypeRef: string;\r\nbegin\r\n // backward compatibility: GetType only returns value if the type is\r\n // scalar type and not a collection. This is what previous XData clients expect\r\n if (FType <> nil) and (FType is TXDataScalarType) and not FType.IsCollection then\r\n Result := FType.Name\r\n else\r\n Result := '';\r\nend;\r\n\r\nfunction TXDataParamDef.GetUrlConverter: TXDataTypeConverter;\r\nbegin\r\n if ParamType <> nil then\r\n Result := ParamType.UrlConverter\r\n else\r\n Result := nil;\r\nend;\r\n\r\nfunction TXDataParamDef.Index: Integer;\r\nbegin\r\n Result := Parent.IndexOf(Self);\r\nend;\r\n\r\nprocedure TXDataParamDef.Prepare;\r\nbegin\r\n // Solve type reference, if any\r\n if FTypeRef <> '' then\r\n begin\r\n ParamType := Parent.Controller.Schema.FindType(FTypeRef);\r\n if ParamType = nil then\r\n raise EModelReferenceNotFound.CreateFmt('Param type %s not found for property %s.%s',\r\n [FTypeRef, Parent.Name, Name]);\r\n FTypeRef := '';\r\n end;\r\n if FTypeNameRef <> '' then\r\n begin\r\n ParamType := Parent.Controller.Schema.FindType(FTypeNameRef);\r\n FTypeNameRef := '';\r\n end;\r\nend;\r\n\r\nprocedure TXDataParamDef.SetDefaultValue(const Value: TValue);\r\nbegin\r\n FDefaultValue := Value;\r\n FHasDefaultValue := True;\r\nend;\r\n\r\n{ TXDataController }\r\n\r\nconstructor TXDataController.Create;\r\nbegin\r\n {$IFDEF GENERICS}\r\n FActions := TOwnedList.Create(Self);\r\n {$ELSE}\r\n FActions := TXDataActionList.Create(Self);\r\n {$ENDIF}\r\nend;\r\n\r\ndestructor TXDataController.Destroy;\r\nbegin\r\n FActions.Free;\r\n FRouteInfo.Free;\r\n inherited;\r\nend;\r\n\r\nfunction TXDataController.GetSchema: TXDataSchema;\r\nbegin\r\n Result := TXDataSchema(inherited Parent);\r\nend;\r\n\r\nprocedure TXDataController.Prepare;\r\nvar\r\n ActionIndex: Integer;\r\n Action: TXDataAction;\r\nbegin\r\n // prepare RouteInof\r\n FreeAndNil(FRouteInfo);\r\n FRouteInfo := TXDataRouteInfo.Create;\r\n FRouteInfo.Process(Name);\r\n\r\n // prepare actions\r\n for ActionIndex := 0 to Actions.Count - 1 do\r\n begin\r\n Action := Actions[ActionIndex];\r\n Action.Prepare;\r\n end;\r\nend;\r\n\r\n{ TXDataNavigationProperty }\r\n\r\nfunction TXDataNavigationProperty.GetParent: TXDataEntityType;\r\nbegin\r\n Result := TXDataEntityType(inherited Parent);\r\nend;\r\n\r\nfunction TXDataNavigationProperty.GetTarget: TXDataStructuredType;\r\nbegin\r\n Result := Target;\r\nend;\r\n\r\nfunction TXDataNavigationProperty.GetTypeKind: TXTypeKind;\r\nbegin\r\n if (Target <> nil) and (Target.IsCollection) then\r\n Result := TXTypeKind.xtEntityCollection\r\n else\r\n Result := TXTypeKind.xtEntity;\r\nend;\r\n\r\nprocedure TXDataNavigationProperty.Prepare;\r\nbegin\r\n if FTargetRef <> '' then\r\n begin\r\n Target := Parent.Schema.FindEntityType(FTargetRef);\r\n if Target = nil then\r\n raise EModelReferenceNotFound.CreateFmt('Target %s not found for navigation property %s.%s',\r\n [FTargetRef, Parent.Name, Name]);\r\n FTargetRef := '';\r\n end;\r\nend;\r\n\r\n{ TXDataOwnedList }\r\n\r\n{$IFNDEF GENERICS}\r\nconstructor TXDataOwnedList.Create;\r\nbegin\r\n Create(nil);\r\nend;\r\n\r\nconstructor TXDataOwnedList.Create(AOwner: TXDataModelObject);\r\nbegin\r\n inherited Create(AOwner <> nil);\r\n FOwner := AOwner;\r\nend;\r\n\r\n{$IFDEF PAS2JS}\r\nprocedure TXDataOwnedList.Notify(Ptr: JSValue; Action: TListNotification);\r\n{$ELSE}\r\nprocedure TXDataOwnedList.Notify(Ptr: Pointer; Action: TListNotification);\r\n{$ENDIF}\r\nbegin\r\n if FOwner = nil then Exit; // not managed\r\n \r\n if Action = lnAdded then\r\n TXDataModelObject(Ptr).Parent := FOwner\r\n else\r\n TXDataModelObject(Ptr).Parent := nil;\r\n inherited;\r\nend;\r\n{$ENDIF}\r\n\r\n{ TXDataParamDefList }\r\n\r\n{$IFNDEF GENERICS}\r\nfunction TXDataParamDefList.GetItem(Index: Integer): TXDataParamDef;\r\nbegin\r\n Result := TXDataParamDef(inherited Items[Index]);\r\nend;\r\n{$ENDIF}\r\n\r\n{ TXDataEntityContainerList }\r\n\r\n{$IFNDEF GENERICS}\r\nfunction TXDataEntityContainerList.GetItem(\r\n Index: Integer): TXDataEntityContainer;\r\nbegin\r\n Result := TXDataEntityContainer(inherited Items[Index]);\r\nend;\r\n{$ENDIF}\r\n\r\n{ TXDataSchemaList }\r\n\r\n{$IFNDEF GENERICS}\r\nfunction TXDataSchemaList.GetItem(Index: Integer): TXDataSchema;\r\nbegin\r\n Result := TXDataSchema(inherited Items[Index]);\r\nend;\r\n{$ENDIF}\r\n\r\n{ TXDataPropertyList }\r\n\r\n{$IFNDEF GENERICS}\r\nfunction TXDataPropertyList.GetItem(Index: Integer): TXDataProperty;\r\nbegin\r\n Result := TXDataProperty(inherited Items[Index]);\r\nend;\r\n{$ENDIF}\r\n\r\n{ TXDataEnumTypeList }\r\n\r\n{$IFNDEF GENERICS}\r\nfunction TXDataEnumTypeList.GetItem(Index: Integer): TXDataEnumType;\r\nbegin\r\n Result := TXDataEnumType(inherited Items[Index]);\r\nend;\r\n{$ENDIF}\r\n\r\n{ TXDataEnumMemberList }\r\n\r\n{$IFNDEF GENERICS}\r\nfunction TXDataEnumMemberList.GetItem(Index: Integer): TXDataEnumMember;\r\nbegin\r\n Result := TXDataEnumMember(inherited Items[Index]);\r\nend;\r\n{$ENDIF}\r\n\r\n{ TXDataEntityTypeList }\r\n\r\n{$IFNDEF GENERICS}\r\nfunction TXDataEntityTypeList.GetItem(Index: Integer): TXDataEntityType;\r\nbegin\r\n Result := TXDataEntityType(inherited Items[Index]);\r\nend;\r\n{$ENDIF}\r\n\r\n{ TXDataInstanceTypeList }\r\n\r\n{$IFNDEF GENERICS}\r\nfunction TXDataInstanceTypeList.GetItem(Index: Integer): TXDataInstanceType;\r\nbegin\r\n Result := TXDataInstanceType(inherited Items[Index]);\r\nend;\r\n{$ENDIF}\r\n\r\n{ TXDataControllerList }\r\n\r\n{$IFNDEF GENERICS}\r\nfunction TXDataControllerList.GetItem(Index: Integer): TXDataController;\r\nbegin\r\n Result := TXDataController(inherited Items[Index]);\r\nend;\r\n{$ENDIF}\r\n\r\n{ TXDataOwnedActionList }\r\n\r\n{$IFNDEF GENERICS}\r\nfunction TXDataActionList.GetItem(Index: Integer): TXDataAction;\r\nbegin\r\n Result := TXDataAction(inherited Items[Index]);\r\nend;\r\n{$ENDIF}\r\n\r\n{ TXDataSimplePropertyList }\r\n\r\n{$IFNDEF GENERICS}\r\nfunction TXDataSimplePropertyList.GetItem(Index: Integer): TXDataSimpleProperty;\r\nbegin\r\n Result := TXDataSimpleProperty(inherited Items[Index]);\r\nend;\r\n{$ENDIF}\r\n\r\n{ EXDataEntityTypeNotFound }\r\n\r\nconstructor EXDataEntityTypeNotFound.Create(const AName: string);\r\nbegin\r\n inherited CreateFmt('Entity type not found for type \"%s\"', [AName]);\r\nend;\r\n\r\n{ EXDataEntitySetNotFound }\r\n\r\nconstructor EXDataEntitySetNotFound.Create(const AName: string);\r\nbegin\r\n inherited CreateFmt('Entity set \"%s\" not found', [AName]);\r\nend;\r\n\r\n{ ECannotBuildKeyPredicateWrongValueLength }\r\n\r\nconstructor ECannotBuildKeyPredicateWrongValueLength.Create(\r\n AType: TXDataEntityType);\r\nbegin\r\n inherited CreateFmt('Cannot create id predicate for type \"%s\". ' +\r\n 'The length of id value does not match number of elements in composite key', [AType.QualifiedName]);\r\nend;\r\n\r\n{ ECannotBuildCanonicalUrl }\r\n\r\nconstructor ECannotBuildCanonicalUrl.Create(AType: TXDataEntityType);\r\nbegin\r\n inherited CreateFmt('Cannot create canonical url for type \"%s\"', [AType.QualifiedName]);\r\nend;\r\n\r\n{ TXDataEntitySetList }\r\n\r\n{$IFNDEF GENERICS}\r\nfunction TXDataEntitySetList.GetItem(Index: Integer): TXDataEntitySet;\r\nbegin\r\n Result := TXDataEntitySet(inherited Items[Index]);\r\nend;\r\n{$ENDIF}\r\n\r\n{ TXDataNavigationPropertyList }\r\n\r\n{$IFNDEF GENERICS}\r\nfunction TXDataNavigationPropertyList.GetItem(\r\n Index: Integer): TXDataNavigationProperty;\r\nbegin\r\n Result := TXDataNavigationProperty(inherited Items[Index]);\r\nend;\r\n{$ENDIF}\r\n\r\n{ EFromURIBindingNotSupported }\r\n\r\nconstructor EFromURIBindingNotSupported.Create(AParam: TXDataParamDef);\r\nvar\r\n ParamTypeName: string;\r\nbegin\r\n if AParam.ParamType <> nil then\r\n ParamTypeName := AParam.ParamType.Name\r\n else\r\n ParamTypeName := '(undefined)';\r\n\r\n inherited CreateFmt('Cannot define action \"%s\": Type \"%s\" for param \"%s\" cannot be bound from URI',\r\n [AParam.Parent.Name, ParamTypeName, AParam.Name]);\r\nend;\r\n\r\n{ EUrlConverterNotFound }\r\n\r\nconstructor EUrlConverterNotFound.Create(AType: TXDataType);\r\nvar\r\n ATypeName: string;\r\nbegin\r\n if AType = nil then\r\n ATypeName := '(null)'\r\n else\r\n ATypeName := AType.Name;\r\n inherited CreateFmt('Could not find URL converter for type \"%s\"', [ATypeName]);\r\nend;\r\n\r\n{ TXDataUrlConverters }\r\n\r\nconstructor TXDataUrlConverters.Create;\r\nbegin\r\n inherited Create;\r\n FConverterMap := TStringMap.Create(True);\r\nend;\r\n\r\ndestructor TXDataUrlConverters.Destroy;\r\nbegin\r\n FConverterMap.Free;\r\n inherited;\r\nend;\r\n\r\nfunction TXDataUrlConverters.Find(const ATypeName: string): TXDataTypeConverter;\r\nbegin\r\n if FConverterMap.ContainsKey(ATypeName) then\r\n Result := TXDataTypeConverter(FConverterMap[ATypeName])\r\n else\r\n Result := nil;\r\nend;\r\n\r\nprocedure TXDataUrlConverters.RegisterConverter(const ATypeName: string;\r\n AConverter: TXDataTypeConverter);\r\nbegin\r\n FConverterMap.AddOrSetValue(ATypeName, AConverter);\r\nend;\r\n\r\n{ TXDataRouteInfo }\r\n\r\nconstructor TXDataRouteInfo.Create;\r\nbegin\r\n FSegments := TXDataRouteSegmentList.Create;\r\nend;\r\n\r\ndestructor TXDataRouteInfo.Destroy;\r\nbegin\r\n FSegments.Free;\r\n inherited;\r\nend;\r\n\r\nfunction TXDataRouteInfo.GetSegment(Index: Integer): TXDataRouteSegment;\r\nbegin\r\n Result := FSegments[Index];\r\nend;\r\n\r\nfunction TXDataRouteInfo.GetSegmentCount: Integer;\r\nbegin\r\n Result := FSegments.Count;\r\nend;\r\n\r\n{$IFDEF PAS2JS}\r\nfunction FindDelimiter(const S: string; StartIdx: Integer = 1): Integer;\r\nvar\r\n Stop: Boolean;\r\n Len: Integer;\r\nbegin\r\n Result := 0;\r\n\r\n Len := Length(S);\r\n Stop := False;\r\n while (not Stop) and (StartIdx <= Len) do\r\n if S[StartIdx] = '/' then\r\n begin\r\n Result := StartIdx;\r\n Stop := True;\r\n end\r\n else\r\n Inc(StartIdx);\r\nend;\r\n\r\nfunction SplitString(const S, Delimiters: string): TStringDynArray;\r\nvar\r\n StartIdx: Integer;\r\n FoundIdx: Integer;\r\n SplitPoints: Integer;\r\n CurrentSplit: Integer;\r\n i: Integer;\r\nbegin\r\n Result := nil;\r\n\r\n if S <> '' then\r\n begin\r\n { Determine the length of the resulting array }\r\n SplitPoints := 0;\r\n for i := 1 to Length(S) do\r\n if S[i] = '/' then\r\n Inc(SplitPoints);\r\n\r\n SetLength(Result, SplitPoints + 1);\r\n\r\n { Split the string and fill the resulting array }\r\n StartIdx := 1;\r\n CurrentSplit := 0;\r\n repeat\r\n FoundIdx := FindDelimiter(S, StartIdx);\r\n if FoundIdx <> 0 then\r\n begin\r\n Result[CurrentSplit] := Copy(S, StartIdx, FoundIdx - StartIdx);\r\n Inc(CurrentSplit);\r\n StartIdx := FoundIdx + 1;\r\n end;\r\n until CurrentSplit = SplitPoints;\r\n\r\n // copy the remaining part in case the string does not end in a delimiter\r\n Result[SplitPoints] := Copy(S, StartIdx, Length(S) - StartIdx + 1);\r\n end;\r\nend;\r\n{$ENDIF}\r\n\r\nprocedure TXDataRouteInfo.Process(const ARoute: string);\r\nvar\r\n I: Integer;\r\n StrSegments: TStringDynArray;\r\nbegin\r\n // add the segments\r\n StrSegments := SplitString(ARoute, '/');\r\n for I := 0 to Length(StrSegments) - 1 do\r\n if StrSegments[I] <> '' then\r\n FSegments.Add(TXDataRouteSegment.Create(StrSegments[I]));\r\n\r\n // Define the priority and count the parameters\r\n // Priority is defined as this: all the exact segments that come first have\r\n // higher priority. Any segment with parameter is less priority.\r\n // For example, the following routes are in order of priority (higher to low)\r\n // a/b/c\r\n // a/b/?\r\n // a/?/c\r\n // ?/b/c\r\n // ?\r\n FPriority := 0;\r\n FParamCount := 0;\r\n for I := 0 to SegmentCount - 1 do\r\n begin\r\n if Segments[I].IsParam then\r\n Inc(FParamCount)\r\n else\r\n FPriority := FPriority or (1 shl (16 - I));\r\n end;\r\nend;\r\n\r\n{ TXDataRouteSegment }\r\n\r\nconstructor TXDataRouteSegment.Create(const AValue: string);\r\nbegin\r\n FValue := AValue;\r\n// if Value = '?' then\r\n// FSegmentType := TXDataRouteSegmentType.Parameter;\r\n\r\n if (Length(Value) >= 3) and (Value[1] = '{') and (Value[Length(Value)] = '}') then\r\n begin\r\n FIsParam := True;\r\n FParamName := Copy(Value, 2, Length(Value) - 2);\r\n end;\r\nend;\r\n\r\n{ EXDataInvalidRouteParam }\r\n\r\nconstructor EXDataInvalidRouteParam.Create(Action: TXDataAction;\r\n const ParamName: string);\r\nbegin\r\n inherited CreateFmt('Invalid param \"%s\" in route of action \"%s\"',\r\n [ParamName, Action.OperationId]);\r\nend;\r\n\r\n{ TXDataRouteSegmentList }\r\n\r\n{$IFNDEF GENERICS}\r\nfunction TXDataRouteSegmentList.GetItem(Index: Integer): TXDataRouteSegment;\r\nbegin\r\n Result := TXDataRouteSegment(inherited Items[Index]);\r\nend;\r\n{$ENDIF}\r\n\r\n{ TXDataInstanceType }\r\n\r\nconstructor TXDataInstanceType.Create;\r\nbegin\r\n inherited;\r\n {$IFDEF GENERICS}\r\n FProperties := TOwnedList.Create(Self);\r\n FNavigationProperties := TOwnedList.Create(Self);\r\n {$ELSE}\r\n FProperties := TXDataInstanceScalarPropertyList.Create(Self);\r\n FNavigationProperties := TXDataInstanceNavigationPropertyList.Create(Self);\r\n {$ENDIF}\r\nend;\r\n\r\ndestructor TXDataInstanceType.Destroy;\r\nbegin\r\n FNavigationProperties.Free;\r\n FProperties.Free;\r\n FCollection.Free;\r\n inherited;\r\nend;\r\n\r\nfunction TXDataInstanceType.GetBaseTypeRef: string;\r\nbegin\r\n if FBaseType <> nil then\r\n Result := FBaseType.Name\r\n else\r\n Result := '';\r\nend;\r\n\r\nfunction TXDataInstanceType.GetCollection: TXDataInstanceCollectionType;\r\nbegin\r\n if FCollection = nil then\r\n begin\r\n FCollection := TXDataInstanceCollectionType.Create;\r\n FCollection.ItemType := Self;\r\n FCollection.Parent := Self.Parent;\r\n end;\r\n Result := FCollection;\r\nend;\r\n\r\nfunction TXDataInstanceType.GetStructuredProperty(Index: Integer): TXDataStructuredProperty;\r\nbegin\r\n Result := NavigationProperties[Index]\r\nend;\r\n\r\nfunction TXDataInstanceType.GetScalarProperty(Index: Integer): TXDataScalarProperty;\r\nbegin\r\n Result := Properties[Index];\r\nend;\r\n\r\nfunction TXDataInstanceType.GetTypeKind: TXTypeKind;\r\nbegin\r\n Result := TXTypeKind.xtInstance;\r\nend;\r\n\r\nfunction TXDataInstanceType.StructuredPropertyCount: Integer;\r\nbegin\r\n Result := NavigationProperties.Count;\r\nend;\r\n\r\nprocedure TXDataInstanceType.Prepare;\r\nvar\r\n I: Integer;\r\nbegin\r\n if FBaseTypeRef <> '' then\r\n begin\r\n BaseType := Schema.FindInstanceType(FBaseTypeRef);\r\n if BaseType = nil then\r\n raise EModelReferenceNotFound.CreateFmt('BaseType %s not found for instance type %s', [FBaseTypeRef, Name]);\r\n FBaseTypeRef := '';\r\n end;\r\n if BaseType <> nil then\r\n BaseType.Prepare;\r\n\r\n for I := 0 to Properties.Count - 1 do\r\n Properties[I].Prepare;\r\n for I := 0 to NavigationProperties.Count - 1 do\r\n NavigationProperties[I].Prepare;\r\nend;\r\n\r\nfunction TXDataInstanceType.ScalarPropertyCount: Integer;\r\nbegin\r\n Result := Properties.Count;\r\nend;\r\n\r\nfunction TXDataInstanceType.QualifiedName: string;\r\nbegin\r\n Result := Self.Name;\r\n if Self.Schema <> nil then\r\n begin\r\n if Self.Schema.Alias <> '' then\r\n Result := Self.Schema.Alias + '.' + Self.Name\r\n else\r\n if Self.Schema.Namespace <> '' then\r\n Result := Self.Schema.Namespace + '.' + Self.Name;\r\n end;\r\nend;\r\n\r\n{ TXDataInstanceCollectionType }\r\n\r\nfunction TXDataInstanceCollectionType.GetIsCollection: Boolean;\r\nbegin\r\n Result := True;\r\nend;\r\n\r\nfunction TXDataInstanceCollectionType.GetName: string;\r\nbegin\r\n if ItemType <> nil then\r\n Result := Format('Collection(%s)', [ItemType.Name])\r\n else\r\n Result := 'Collection()';\r\nend;\r\n\r\nfunction TXDataInstanceCollectionType.GetTypeKind: TXTypeKind;\r\nbegin\r\n Result := TXTypeKind.xtInstanceCollection;\r\nend;\r\n\r\nfunction TXDataInstanceCollectionType.GetWrappedType: TXDataType;\r\nbegin\r\n Result := ItemType;\r\nend;\r\n\r\nfunction TXDataInstanceCollectionType.QualifiedName: string;\r\nbegin\r\n if ItemType <> nil then\r\n Result := Format('Collection(%s)', [ItemType.QualifiedName])\r\n else\r\n Result := 'Collection()';\r\nend;\r\n\r\n{ TXDataStructuredProperty }\r\n\r\nfunction TXDataStructuredProperty.GetTargetRef: string;\r\nbegin\r\n if Target <> nil then\r\n Result := Target.Name\r\n else\r\n Result := FTargetRef;\r\nend;\r\n\r\nfunction TXDataStructuredProperty.GetValueType: TXDataType;\r\nbegin\r\n Result := Target;\r\nend;\r\n\r\nfunction TXDataStructuredProperty.IsSimple: Boolean;\r\nbegin\r\n Result := False;\r\nend;\r\n\r\n{ TXDataInstanceNavigationProperty }\r\n\r\nfunction TXDataInstanceNavigationProperty.GetParent: TXDataInstanceType;\r\nbegin\r\n Result := TXDataInstanceType(inherited Parent);\r\nend;\r\n\r\nfunction TXDataInstanceNavigationProperty.GetTarget: TXDataStructuredType;\r\nbegin\r\n Result := Target;\r\nend;\r\n\r\nfunction TXDataInstanceNavigationProperty.GetTypeKind: TXTypeKind;\r\nbegin\r\n if Target = nil then Exit(TXTypeKind.xtUndefined);\r\n\r\n if Target is TXDataEntityType then\r\n begin\r\n if Target.IsCollection then\r\n Result := TXTypeKind.xtEntityCollection\r\n else\r\n Result := TXTypeKind.xtEntity;\r\n end\r\n else\r\n begin\r\n if Target.IsCollection then\r\n Result := TXTypeKind.xtInstanceCollection\r\n else\r\n Result := TXTypeKind.xtInstance;\r\n end;\r\nend;\r\n\r\nprocedure TXDataInstanceNavigationProperty.Prepare;\r\nbegin\r\n if FTargetRef <> '' then\r\n begin\r\n Target := Parent.Schema.FindEntityType(FTargetRef);\r\n if Target = nil then\r\n Target := Parent.Schema.FindInstanceType(FTargetRef);\r\n FTargetRef := '';\r\n end;\r\nend;\r\n\r\n{ TXDataInstanceSimpleProperty }\r\n\r\nfunction TXDataInstanceSimpleProperty.GetParent: TXDataInstanceType;\r\nbegin\r\n Result := TXDataInstanceType(inherited Parent);\r\nend;\r\n\r\nprocedure TXDataInstanceSimpleProperty.Prepare;\r\nbegin\r\n // Resolve type reference\r\n if FTypeRef <> '' then\r\n begin\r\n PropertyType := Parent.Schema.FindScalarType(FTypeRef);\r\n FTypeRef := '';\r\n end;\r\nend;\r\n\r\n{ TXDataInstanceScalarPropertyList }\r\n\r\n{$IFNDEF GENERICS}\r\nfunction TXDataInstanceScalarPropertyList.GetItem(Index: Integer): TXDataInstanceSimpleProperty;\r\nbegin\r\n Result := TXDataInstanceSimpleProperty(inherited Items[Index]);\r\nend;\r\n{$ENDIF}\r\n\r\n{ TXDataInstancePropertyList }\r\n\r\n{$IFNDEF GENERICS}\r\nfunction TXDataInstanceNavigationPropertyList.GetItem(Index: Integer): TXDataInstanceNavigationProperty;\r\nbegin\r\n Result := TXDataInstanceNavigationProperty(inherited Items[Index]);\r\nend;\r\n{$ENDIF}\r\n\r\n{ TXDataStructuredType }\r\n\r\nfunction TXDataStructuredType.FindAnyProperty(const AName: string): TXDataProperty;\r\nbegin\r\n Result := FindScalarProperty(AName);\r\n if Result = nil then\r\n Result := FindStructuredProperty(AName);\r\nend;\r\n\r\nfunction TXDataStructuredType.FindScalarProperty(const AName: string): TXDataScalarProperty;\r\nvar\r\n Prop: TXDataScalarProperty;\r\n I: Integer;\r\nbegin\r\n for I := 0 to ScalarPropertyCount - 1 do\r\n begin\r\n Prop := GetScalarProperty(I);\r\n if SameText(AName, Prop.Name) then\r\n Exit(Prop);\r\n end;\r\n Result := nil;\r\nend;\r\n\r\nfunction TXDataStructuredType.FindStructuredProperty(const AName: string): TXDataStructuredProperty;\r\nvar\r\n Prop: TXDataStructuredProperty;\r\n I: Integer;\r\nbegin\r\n for I := 0 to StructuredPropertyCount - 1 do\r\n begin\r\n Prop := GetStructuredProperty(I);\r\n if SameText(AName, Prop.Name) then\r\n Exit(Prop);\r\n end;\r\n Result := nil;\r\nend;\r\n\r\nfunction TXDataStructuredType.GetSchema: TXDataSchema;\r\nbegin\r\n Result := TXDataSchema(inherited Parent);\r\nend;\r\n\r\nend.\r\n\r\n","unit XData.Web.Headers;\r\n\r\ninterface\r\n\r\nuses\r\n Types, SysUtils, Bcl.Collections.Common;\r\n\r\ntype\r\n THttpHeaderInfo = class\r\n private\r\n FName: string;\r\n FValue: string;\r\n public\r\n constructor Create(const AName, AValue: string); reintroduce;\r\n property Name: string read FName;\r\n property Value: string read FValue;\r\n end;\r\n\r\n THttpHeaders = class\r\n strict private\r\n FHeaders: TStringMap;\r\n private\r\n function GetHeaderNames: TStringDynArray;\r\n public\r\n constructor Create; reintroduce;\r\n destructor Destroy; override;\r\n procedure SetValue(const HeaderName, HeaderValue: string);\r\n procedure AddValue(const HeaderName, HeaderValue: string);\r\n function Get(const HeaderName: string): string;\r\n function Exists(const HeaderName: string): boolean;\r\n function GetIfExists(const HeaderName: string; var HeaderValue: string): Boolean;\r\n procedure Remove(const HeaderName: string);\r\n procedure Clear;\r\n property HeaderNames: TStringDynArray read GetHeaderNames;\r\n end;\r\n\r\nimplementation\r\n\r\n{ THttpHeaderInfo }\r\n\r\nconstructor THttpHeaderInfo.Create(const AName, AValue: string);\r\nbegin\r\n FName := AName;\r\n FValue := AValue;\r\nend;\r\n\r\n{ THttpHeaders }\r\n\r\nprocedure THttpHeaders.AddValue(const HeaderName, HeaderValue: string);\r\nbegin\r\n if Exists(HeaderName) then\r\n SetValue(HeaderName, Get(HeaderName) + ',' + HeaderValue)\r\n else\r\n SetValue(HeaderName, HeaderValue);\r\nend;\r\n\r\nprocedure THttpHeaders.Clear;\r\nbegin\r\n FHeaders.Clear;\r\nend;\r\n\r\nconstructor THttpHeaders.Create;\r\nbegin\r\n FHeaders := TStringMap.Create(True);\r\nend;\r\n\r\ndestructor THttpHeaders.Destroy;\r\nbegin\r\n FHeaders.Free;\r\n inherited;\r\nend;\r\n\r\nfunction THttpHeaders.Exists(const HeaderName: string): boolean;\r\nbegin\r\n Result := FHeaders.ContainsKey(LowerCase(HeaderName));\r\nend;\r\n\r\nfunction THttpHeaders.Get(const HeaderName: string): string;\r\nbegin\r\n if FHeaders.ContainsKey(Lowercase(HeaderName)) then\r\n Result := THttpHeaderInfo(FHeaders[Lowercase(HeaderName)]).Value\r\n else\r\n Result := '';\r\nend;\r\n\r\nfunction THttpHeaders.GetHeaderNames: TStringDynArray;\r\nbegin\r\n Result := FHeaders.Keys;\r\nend;\r\n\r\nfunction THttpHeaders.GetIfExists(const HeaderName: string;\r\n var HeaderValue: string): Boolean;\r\nbegin\r\n Result := Exists(HeaderName);\r\n if Result then\r\n HeaderValue := Get(HeaderName);\r\nend;\r\n\r\nprocedure THttpHeaders.Remove(const HeaderName: string);\r\nbegin\r\n if FHeaders.ContainsKey(LowerCase(HeaderName)) then\r\n FHeaders.Remove(LowerCase(HeaderName));\r\nend;\r\n\r\nprocedure THttpHeaders.SetValue(const HeaderName, HeaderValue: string);\r\nbegin\r\n if HeaderName <> '' then\r\n FHeaders.AddOrSetValue(Lowercase(HeaderName),\r\n THttpHeaderInfo.Create(Lowercase(HeaderName), Trim(HeaderValue)));\r\nend;\r\n\r\nend.","unit XData.Web.Request;\r\n\r\ninterface\r\n\r\nuses\r\n XData.Web.Headers;\r\n\r\ntype\r\n IHttpRequest = interface\r\n ['{782AF543-EFEB-4DA5-AC25-842DF76723A0}']\r\n function GetMethod: string;\r\n procedure SetMethod(const Value: string);\r\n function GetUri: string;\r\n procedure SetUri(const Value: string);\r\n function GetTimeout: Integer;\r\n procedure SetTimeout(const Value: Integer);\r\n function GetHeaders: THttpHeaders;\r\n function GetContent: JSValue;\r\n procedure SetContent(const Value: JSValue);\r\n function GetResponseType: string;\r\n procedure SetResponseType(const Value: string);\r\n property Method: string read GetMethod write SetMethod;\r\n property Uri: string read GetUri write SetUri;\r\n property Headers: THttpHeaders read GetHeaders;\r\n property Content: JSValue read GetContent write SetContent;\r\n property Timeout: Integer read GetTimeout write SetTimeout;\r\n property ResponseType: string read GetResponseType write SetResponseType;\r\n end;\r\n\r\n THttpRequest = class(TInterfacedObject, IHttpRequest)\r\n private\r\n FMethod: string;\r\n FUri: string;\r\n FHeaders: THttpHeaders;\r\n FContent: JSValue;\r\n FTimeout: Integer;\r\n FResponseType: string;\r\n function GetMethod: string;\r\n procedure SetMethod(const Value: string);\r\n function GetUri: string;\r\n procedure SetUri(const Value: string);\r\n function GetTimeout: Integer;\r\n procedure SetTimeout(const Value: Integer);\r\n function GetHeaders: THttpHeaders;\r\n function GetContent: JSValue;\r\n procedure SetContent(const Value: JSValue);\r\n function GetResponseType: string;\r\n procedure SetResponseType(const Value: string);\r\n public\r\n constructor Create; reintroduce; overload;\r\n constructor Create(const AUri: string); overload;\r\n constructor Create(const AUri, AMethod: string); overload;\r\n destructor Destroy; override;\r\n property Method: string read GetMethod write SetMethod;\r\n property Uri: string read GetUri write SetUri;\r\n property Headers: THttpHeaders read GetHeaders;\r\n property Content: JSValue read GetContent write SetContent;\r\n property Timeout: Integer read GetTimeout write SetTimeout;\r\n property ResponseType: string read GetResponseType write SetResponseType;\r\n end;\r\n\r\nimplementation\r\n\r\nuses\r\n SysUtils;\r\n\r\n{ THttpRequest }\r\n\r\nconstructor THttpRequest.Create;\r\nbegin\r\n Create('', 'GET');\r\nend;\r\n\r\nconstructor THttpRequest.Create(const AUri, AMethod: string);\r\nbegin\r\n FHeaders := THttpHeaders.Create;\r\n FUri := AUri;\r\n FMethod := AMethod;\r\n FTimeout := 0;\r\nend;\r\n\r\nconstructor THttpRequest.Create(const AUri: string);\r\nbegin\r\n Create(AUri, 'GET');\r\nend;\r\n\r\ndestructor THttpRequest.Destroy;\r\nbegin\r\n FHeaders.Free;\r\n inherited;\r\nend;\r\n\r\nfunction THttpRequest.GetContent: JSValue;\r\nbegin\r\n Result := FContent;\r\nend;\r\n\r\nfunction THttpRequest.GetHeaders: THttpHeaders;\r\nbegin\r\n Result := FHeaders;\r\nend;\r\n\r\nfunction THttpRequest.GetMethod: string;\r\nbegin\r\n Result := FMethod;\r\nend;\r\n\r\nfunction THttpRequest.GetResponseType: string;\r\nbegin\r\n Result := FResponseType;\r\nend;\r\n\r\nfunction THttpRequest.GetTimeout: Integer;\r\nbegin\r\n Result := FTimeout;\r\nend;\r\n\r\nfunction THttpRequest.GetUri: string;\r\nbegin\r\n Result := FUri;\r\nend;\r\n\r\nprocedure THttpRequest.SetContent(const Value: JSValue);\r\nbegin\r\n FContent := Value;\r\nend;\r\n\r\nprocedure THttpRequest.SetMethod(const Value: string);\r\nbegin\r\n FMethod := UpperCase(Value);\r\nend;\r\n\r\nprocedure THttpRequest.SetResponseType(const Value: string);\r\nbegin\r\n FResponseType := Value;\r\nend;\r\n\r\nprocedure THttpRequest.SetTimeout(const Value: Integer);\r\nbegin\r\n FTimeout := Value;\r\nend;\r\n\r\nprocedure THttpRequest.SetUri(const Value: string);\r\nbegin\r\n FUri := Value;\r\nend;\r\n\r\nend.","unit XData.Web.Response;\r\n\r\ninterface\r\n\r\nuses\r\n XData.Web.Headers,\r\n Web;\r\n\r\ntype\r\n IHttpResponse = interface\r\n ['{4F5FBBEB-2D03-446F-AD75-FFF8DB09B0B0}']\r\n function GetStatusCode: Integer;\r\n function GetStatusReason: string;\r\n function GetHeaders: THttpHeaders;\r\n function GetContentAsText: string;\r\n function GetContent: JSValue;\r\n property StatusCode: Integer read GetStatusCode;\r\n property StatusReason: string read GetStatusReason;\r\n property Headers: THttpHeaders read GetHeaders;\r\n property ContentAsText: string read GetContentAsText;\r\n property Content: JSValue read GetContent;\r\n end;\r\n\r\n THttpResponse = class(TInterfacedObject, IHttpResponse)\r\n strict private\r\n FPrepared: Boolean;\r\n function GetHeaders: THttpHeaders;\r\n strict protected\r\n FHeaders: THttpHeaders;\r\n procedure PrepareResponse;\r\n strict protected\r\n function GetStatusCode: Integer; virtual; abstract;\r\n function GetStatusReason: string; virtual; abstract;\r\n procedure UpdateHeaders(AHeaders: THttpHeaders); virtual; abstract;\r\n function GetContentAsText: string; virtual; abstract;\r\n function GetContent: JSValue; virtual; abstract;\r\n public\r\n constructor Create; reintroduce;\r\n destructor Destroy; override;\r\n property StatusCode: integer read GetStatusCode;\r\n property StatusReason: string read GetStatusReason;\r\n property Headers: THttpHeaders read GetHeaders;\r\n property ContentAsText: string read GetContentAsText;\r\n property Content: JSValue read GetContent;\r\n end;\r\n\r\n // Move this class to another unit later\r\n TXhrHttpResponse = class(THttpResponse, IHttpResponse)\r\n strict private\r\n FXhr: TJSXmlHttpRequest;\r\n strict protected\r\n function GetStatusCode: Integer; override;\r\n function GetStatusReason: string; override;\r\n procedure UpdateHeaders(AHeaders: THttpHeaders); override;\r\n function GetContentAsText: string; override;\r\n function GetContent: JSValue; override;\r\n public\r\n constructor Create(AXhr: TJSXmlHttpRequest); reintroduce;\r\n end;\r\n\r\n // Move this class to another unit later\r\n TDummyHttpResponse = class(THttpResponse, IHttpResponse)\r\n strict protected\r\n function GetStatusCode: Integer; override;\r\n function GetStatusReason: string; override;\r\n procedure UpdateHeaders(AHeaders: THttpHeaders); override;\r\n function GetContentAsText: string; override;\r\n function GetContent: JSValue; override;\r\n end;\r\n\r\nimplementation\r\n\r\nuses\r\n Types, SysUtils, JS;\r\n\r\n{ THttpResponse }\r\n\r\nconstructor THttpResponse.Create;\r\nbegin\r\n FHeaders := THttpHeaders.Create;\r\nend;\r\n\r\ndestructor THttpResponse.Destroy;\r\nbegin\r\n FHeaders.Free;\r\n inherited;\r\nend;\r\n\r\nfunction THttpResponse.GetHeaders: THttpHeaders;\r\nbegin\r\n PrepareResponse;\r\n Result := FHeaders;\r\nend;\r\n\r\nprocedure THttpResponse.PrepareResponse;\r\nbegin\r\n if FPrepared then\r\n Exit;\r\n FPrepared := True;\r\n UpdateHeaders(FHeaders);\r\nend;\r\n\r\n{ TXhrHttpResponse }\r\n\r\nconstructor TXhrHttpResponse.Create(AXhr: TJSXmlHttpRequest);\r\nbegin\r\n inherited Create;\r\n FXhr := AXhr;\r\nend;\r\n\r\nfunction TXhrHttpResponse.GetContent: JSValue;\r\nbegin\r\n Result := FXhr.response;\r\nend;\r\n\r\nfunction TXhrHttpResponse.GetContentAsText: string;\r\nbegin\r\n Result := FXhr.responseText;\r\nend;\r\n\r\nfunction TXhrHttpResponse.GetStatusCode: Integer;\r\nbegin\r\n Result := FXhr.status;\r\nend;\r\n\r\nfunction TXhrHttpResponse.GetStatusReason: string;\r\nbegin\r\n Result := FXhr.statusText;\r\nend;\r\n\r\n{$HINTS OFF}\r\n// Pas2Js is raising a hint about \"HeaderPair never used\"\r\n// Let's disable the hint for now and remove it when compiler is fixed\r\nprocedure TXhrHttpResponse.UpdateHeaders(AHeaders: THttpHeaders);\r\nvar\r\n I: Integer;\r\n SplitHeaders: TStringDynArray;\r\n HeaderPair: TStringDynArray;\r\nbegin\r\n SplitHeaders := TJSString(Trim(FXhr.getAllResponseHeaders)).split(#13#10);\r\n FHeaders.Clear;\r\n for I := 0 to Length(SplitHeaders) - 1 do\r\n begin\r\n HeaderPair := TJSString(SplitHeaders[I]).split(':');\r\n FHeaders.SetValue(Trim(HeaderPair[0]), Trim(HeaderPair[1]));\r\n end;\r\nend;\r\n{$HINTS ON}\r\n\r\n{ TDummyHttpResponse }\r\n\r\nfunction TDummyHttpResponse.GetContent: JSValue;\r\nbegin\r\n Result := JS.Undefined;\r\nend;\r\n\r\nfunction TDummyHttpResponse.GetContentAsText: string;\r\nbegin\r\n Result := '';\r\nend;\r\n\r\nfunction TDummyHttpResponse.GetStatusCode: Integer;\r\nbegin\r\n Result := 0;\r\nend;\r\n\r\nfunction TDummyHttpResponse.GetStatusReason: string;\r\nbegin\r\n Result := '';\r\nend;\r\n\r\nprocedure TDummyHttpResponse.UpdateHeaders(AHeaders: THttpHeaders);\r\nbegin\r\nend;\r\n\r\nend.\r\n","unit Bcl.TypInfo.Common;\r\n\r\n{$I Bcl.inc}\r\n\r\ninterface\r\n\r\nuses\r\n TypInfo;\r\n\r\ntype\r\n{$IFDEF PAS2JS}\r\n PTypeInfo = TypInfo.TTypeInfo;\r\n{$ELSE}\r\n PTypeInfo = TypInfo.PTypeInfo;\r\n{$ENDIF}\r\n\r\nfunction GetTypeName_(TypeInfo: PTypeInfo): string;\r\nfunction GetEnumName_(TypeInfo: PTypeInfo; Value: Integer): string;\r\nfunction GetEnumValue_(TypeInfo: PTypeInfo; const Name: string): Integer;\r\n\r\n\r\nimplementation\r\n\r\nfunction GetTypeName_(TypeInfo: PTypeInfo): string;\r\nbegin\r\n {$IFDEF PAS2JS}\r\n Result := TypeInfo.Name;\r\n {$ELSE}\r\n Result := TypInfo.GetTypeName(TypeInfo);\r\n {$ENDIF}\r\nend;\r\n\r\nfunction GetEnumName_(TypeInfo: PTypeInfo; Value: Integer): string;\r\nbegin\r\n {$IFDEF PAS2JS}\r\n Result := TTypeInfoEnum(TypeInfo).EnumType.IntToName[Value];\r\n {$ELSE}\r\n Result := TypInfo.GetEnumName(TypeInfo, Value);\r\n {$ENDIF}\r\nend;\r\n\r\nfunction GetEnumValue_(TypeInfo: PTypeInfo; const Name: string): Integer;\r\nbegin\r\n {$IFDEF PAS2JS}\r\n Result := TTypeInfoEnum(TypeInfo).EnumType.NameToInt[Name];\r\n {$ELSE}\r\n Result := TypInfo.GetEnumValue(TypeInfo, Name);\r\n {$ENDIF}\r\nend;\r\n\r\nend.","unit XData.Model.Deserializer;\r\n\r\n{$I XData.inc}\r\n\r\ninterface\r\n\r\nuses\r\n SysUtils, Types, TypInfo,\r\n {$IFDEF PAS2JS}\r\n JS,\r\n {$ELSE}\r\n Bcl.Json.Classes,\r\n Bcl.Json,\r\n {$ENDIF}\r\n Bcl.Json.Common,\r\n Bcl.TypInfo.Common,\r\n XData.Model.Classes;\r\n\r\ntype\r\n EXDataModelDeserialization = class(Exception);\r\n\r\n TXDataModelDeserializer = class\r\n strict private\r\n FModel: TXDataModel;\r\n FRoot: TJObject;\r\n public\r\n constructor Create(AModel: TXDataModel; const Json: string); reintroduce;\r\n destructor Destroy; override;\r\n\r\n procedure Read;\r\n procedure ReadBase(Base: TXDataModelObject; JObj: TJObject);\r\n procedure ReadType(XDataType: TXDataType; JObj: TJObject);\r\n procedure ReadStructuredType(StructuredType: TXDataStructuredType; JObj: TJObject);\r\n procedure ReadScalarType(ScalarType: TXDataScalarType; JObj: TJObject);\r\n\r\n procedure ReadModel(Model: TXDataModel; JObj: TJObject);\r\n procedure ReadSchema(Schema: TXDataSchema; JObj: TJObject);\r\n procedure ReadEntityType(EntityType: TXDataEntityType; JObj: TJObject);\r\n procedure ReadInstanceType(InstanceType: TXDataInstanceType; JObj: TJObject);\r\n procedure ReadScalarProperty(ScalarProperty: TXDataScalarProperty; JObj: TJObject);\r\n procedure ReadSimpleProperty(SimpleProperty: TXDataSimpleProperty; JObj: TJObject);\r\n procedure ReadInstanceSimpleProperty(ScalarProperty: TXDataInstanceSimpleProperty; JObj: TJObject);\r\n procedure ReadStructuredProperty(StructuredProperty: TXDataStructuredProperty; JObj: TJObject);\r\n procedure ReadNavigationProperty(NavigationProperty: TXDataNavigationProperty; JObj: TJObject);\r\n procedure ReadInstanceNavigationProperty(NavigationProperty: TXDataInstanceNavigationProperty; JObj: TJObject);\r\n procedure ReadProperty(Prop: TXDataProperty; JObj: TJObject);\r\n procedure ReadEntityContainer(Container: TXDataEntityContainer; JObj: TJObject);\r\n procedure ReadEntitySet(EntitySet: TXDataEntitySet; JObj: TJObject);\r\n procedure ReadEnumType(EnumType: TXDataEnumType; JObj: TJObject);\r\n procedure ReadEnumMember(EnumMember: TXDataEnumMember; JObj: TJObject);\r\n procedure ReadController(Controller: TXDataController; JObj: TJObject);\r\n procedure ReadAction(Action: TXDataAction; JObj: TJObject);\r\n procedure ReadParamDef(ParamDef: TXDataParamDef; JObj: TJObject);\r\n public\r\n class procedure Deserialize(AModel: TXDataModel; const Json: string);\r\n end;\r\n\r\nimplementation\r\n\r\n{ TXDataModelDeserializer }\r\n\r\nconstructor TXDataModelDeserializer.Create(AModel: TXDataModel; const Json: string);\r\nbegin\r\n FModel := AModel;\r\n {$IFDEF PAS2JS}\r\n FRoot := TJSJSON.parseObject(Json);\r\n {$ELSE}\r\n FRoot := TJson.Deserialize(Json);\r\n {$ENDIF}\r\nend;\r\n\r\nclass procedure TXDataModelDeserializer.Deserialize(AModel: TXDataModel; const Json: string);\r\nvar\r\n Deserializer: TXDataModelDeserializer;\r\nbegin\r\n Deserializer := TXDataModelDeserializer.Create(AModel, Json);\r\n try\r\n Deserializer.Read;\r\n finally\r\n Deserializer.Free;\r\n end;\r\nend;\r\n\r\ndestructor TXDataModelDeserializer.Destroy;\r\nbegin\r\n {$IFNDEF PAS2JS}\r\n FRoot.Free;\r\n {$ENDIF}\r\n inherited;\r\nend;\r\n\r\nprocedure TXDataModelDeserializer.ReadModel(Model: TXDataModel; JObj: TJObject);\r\nvar\r\n Key: string;\r\n I: Integer;\r\n JSchemas: TJArray;\r\n Keys: TStringDynArray;\r\n KeyIndex: Integer;\r\nbegin\r\n ReadBase(Model, JObj);\r\n Model.Schemas.Clear;\r\n Keys := JObjectKeys(JObj);\r\n for KeyIndex := 0 to Length(Keys) - 1 do\r\n begin\r\n Key := Keys[KeyIndex];\r\n if Key = 'Title' then\r\n Model.Title := JToStr(JObj[Key])\r\n else\r\n if Key = 'Version' then\r\n Model.Version := JToStr(JObj[Key])\r\n else\r\n if Key = 'Schemas' then\r\n begin\r\n JSchemas := AsJArray(JObj[Key]);\r\n for I := 0 to JSchemas.Length - 1 do\r\n ReadSchema(Model.Schemas[Model.Schemas.Add(TXDataSchema.Create)], AsJObject(JSchemas[I]));\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TXDataModelDeserializer.ReadNavigationProperty(\r\n NavigationProperty: TXDataNavigationProperty; JObj: TJObject);\r\nbegin\r\n ReadStructuredProperty(NavigationProperty, JObj);\r\nend;\r\n\r\nprocedure TXDataModelDeserializer.ReadParamDef(ParamDef: TXDataParamDef;\r\n JObj: TJObject);\r\nvar\r\n Key: string;\r\n Keys: TStringDynArray;\r\n KeyIndex: Integer;\r\nbegin\r\n ReadBase(ParamDef, JObj);\r\n Keys := JObjectKeys(JObj);\r\n for KeyIndex := 0 to Length(Keys) - 1 do\r\n begin\r\n Key := Keys[KeyIndex];\r\n if Key = 'Name' then\r\n ParamDef.Name := JToStr(JObj[Key])\r\n else\r\n if Key = 'BindingMode' then\r\n ParamDef.BindingMode := TBindingMode(GetEnumValue_(TypeInfo(TBindingMode), JToStr(JObj[Key])))\r\n else\r\n if Key = 'Output' then\r\n ParamDef.Output := JToBool(JObj[Key])\r\n else\r\n if Key = 'Input' then\r\n ParamDef.Input := JToBool(JObj[Key])\r\n else\r\n if Key = 'Type' then\r\n ParamDef.TypeRef := JToStr(JObj[Key])\r\n else\r\n if Key = 'TypeName' then\r\n ParamDef.TypeNameRef := JToStr(JObj[Key]);\r\n end;\r\nend;\r\n\r\nprocedure TXDataModelDeserializer.ReadProperty(Prop: TXDataProperty;\r\n JObj: TJObject);\r\nvar\r\n Key: string;\r\n Keys: TStringDynArray;\r\n KeyIndex: Integer;\r\nbegin\r\n ReadBase(Prop, JObj);\r\n Keys := JObjectKeys(JObj);\r\n for KeyIndex := 0 to Length(Keys) - 1 do\r\n begin\r\n Key := Keys[KeyIndex];\r\n if Key = 'Name' then\r\n Prop.Name := JToStr(JObj[Key])\r\n else\r\n if Key = 'Required' then\r\n Prop.Required := JToBool(JObj[Key]);\r\n end;\r\nend;\r\n\r\nprocedure TXDataModelDeserializer.Read;\r\nbegin\r\n ReadModel(FModel, FRoot);\r\n FModel.Prepare;\r\nend;\r\n\r\nprocedure TXDataModelDeserializer.ReadAction(Action: TXDataAction;\r\n JObj: TJObject);\r\nvar\r\n Key: string;\r\n I: Integer;\r\n JParamDefs: TJArray;\r\n Keys: TStringDynArray;\r\n KeyIndex: Integer;\r\nbegin\r\n ReadBase(Action, JObj);\r\n Keys := JObjectKeys(JObj);\r\n for KeyIndex := 0 to Length(Keys) - 1 do\r\n begin\r\n Key := Keys[KeyIndex];\r\n if Key = 'Name' then\r\n Action.Name := JToStr(JObj[Key])\r\n else\r\n if Key = 'Parameters' then\r\n begin\r\n JParamDefs := AsJArray(JObj[Key]);\r\n for I := 0 to JParamDefs.Length - 1 do\r\n ReadParamDef(Action.Parameters[Action.Parameters.Add(TXDataParamDef.Create)], AsJObject(JParamDefs[I]));\r\n end\r\n else\r\n if Key = 'HttpMethod' then\r\n Action.HttpMethod := JToStr(JObj[Key])\r\n else\r\n if Key = 'IsParamStream' then\r\n Action.IsParamStream := JToBool(JObj[Key])\r\n else\r\n if Key = 'IsResultStream' then\r\n Action.IsResultStream := JToBool(JObj[Key])\r\n else\r\n if Key = 'IsResultCriteria' then\r\n Action.IsResultCriteria := JToBool(JObj[Key])\r\n else\r\n if Key = 'IsResultSingleObject' then\r\n Action.IsResultSingleObject := JToBool(JObj[Key])\r\n else\r\n if Key = 'OperationId' then\r\n Action.OperationId := JToStr(JObj[Key])\r\n else\r\n if Key = 'ReturnType' then\r\n Action.ReturnTypeRef := JToStr(JObj[Key])\r\n else\r\n if Key = 'Consumes' then\r\n Action.Consumes := JToStr(JObj[Key]);\r\n end;\r\nend;\r\n\r\nprocedure TXDataModelDeserializer.ReadBase(Base: TXDataModelObject;\r\n JObj: TJObject);\r\nvar\r\n Key: string;\r\n Keys: TStringDynArray;\r\n KeyIndex: Integer;\r\nbegin\r\n Keys := JObjectKeys(JObj);\r\n for KeyIndex := 0 to Length(Keys) - 1 do\r\n begin\r\n Key := Keys[KeyIndex];\r\n if Key = 'Description' then\r\n Base.Description := JToStr(JObj[Key]);\r\n end;\r\nend;\r\n\r\nprocedure TXDataModelDeserializer.ReadController(Controller: TXDataController;\r\n JObj: TJObject);\r\nvar\r\n Key: string;\r\n I: Integer;\r\n JActions: TJArray;\r\n Keys: TStringDynArray;\r\n KeyIndex: Integer;\r\nbegin\r\n ReadBase(Controller, JObj);\r\n Keys := JObjectKeys(JObj);\r\n for KeyIndex := 0 to Length(Keys) - 1 do\r\n begin\r\n Key := Keys[KeyIndex];\r\n if Key = 'Name' then\r\n Controller.Name := JToStr(JObj[Key])\r\n else\r\n if Key = 'Actions' then\r\n begin\r\n JActions := AsJArray(JObj[Key]);\r\n for I := 0 to JActions.Length - 1 do\r\n ReadAction(Controller.Actions[Controller.Actions.Add(TXDataAction.Create)], AsJObject(JActions[I]));\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TXDataModelDeserializer.ReadEntityContainer(\r\n Container: TXDataEntityContainer; JObj: TJObject);\r\nvar\r\n Key: string;\r\n I: Integer;\r\n JEntitySets: TJArray;\r\n Keys: TStringDynArray;\r\n KeyIndex: Integer;\r\nbegin\r\n ReadBase(Container, JObj);\r\n Keys := JObjectKeys(JObj);\r\n for KeyIndex := 0 to Length(Keys) - 1 do\r\n begin\r\n Key := Keys[KeyIndex];\r\n if Key = 'Name' then\r\n Container.Name := JToStr(JObj[Key])\r\n else\r\n if Key = 'EntitySets' then\r\n begin\r\n JEntitySets := AsJArray(JObj[Key]);\r\n for I := 0 to JEntitySets.Length - 1 do\r\n ReadEntitySet(Container.EntitySets[Container.EntitySets.Add(TXDataEntitySet.Create)], AsJObject(JEntitySets[I]));\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TXDataModelDeserializer.ReadEntitySet(EntitySet: TXDataEntitySet;\r\n JObj: TJObject);\r\nvar\r\n Key: string;\r\n Keys: TStringDynArray;\r\n KeyIndex: Integer;\r\nbegin\r\n ReadBase(EntitySet, JObj);\r\n Keys := JObjectKeys(JObj);\r\n for KeyIndex := 0 to Length(Keys) - 1 do\r\n begin\r\n Key := Keys[KeyIndex];\r\n if Key = 'Name' then\r\n EntitySet.Name := JToStr(JObj[Key])\r\n else\r\n if Key = 'EntityType' then\r\n EntitySet.EntityTypeRef := JToStr(JObj[Key]); // Reference\r\n end;\r\nend;\r\n\r\nprocedure TXDataModelDeserializer.ReadEntityType(EntityType: TXDataEntityType;\r\n JObj: TJObject);\r\nvar\r\n Key: string;\r\n I: Integer;\r\n JProperties: TJArray;\r\n JNavigationProperties: TJArray;\r\n JKey: TJArray;\r\n TempKeyRef: TStringDynArray;\r\n Keys: TStringDynArray;\r\n KeyIndex: Integer;\r\nbegin\r\n ReadStructuredType(EntityType, JObj);\r\n SetLength(TempKeyRef, 0);\r\n EntityType.Properties.Clear;\r\n EntityType.NavigationProperties.Clear;\r\n Keys := JObjectKeys(JObj);\r\n for KeyIndex := 0 to Length(Keys) - 1 do\r\n begin\r\n Key := Keys[KeyIndex];\r\n if Key = 'Properties' then\r\n begin\r\n JProperties := AsJArray(JObj[Key]);\r\n for I := 0 to JProperties.Length - 1 do\r\n ReadSimpleProperty(EntityType.Properties[EntityType.Properties.Add(TXDataSimpleProperty.Create)], AsJObject(JProperties[I]));\r\n end\r\n else\r\n if Key = 'NavigationProperties' then\r\n begin\r\n JNavigationProperties := AsJArray(JObj[Key]);\r\n for I := 0 to JNavigationProperties.Length - 1 do\r\n ReadNavigationProperty(EntityType.NavigationProperties[EntityType.NavigationProperties.Add(TXDataNavigationProperty.Create)], AsJObject(JNavigationProperties[I]));\r\n end\r\n else\r\n if Key = 'BaseType' then\r\n EntityType.BaseTypeRef := JToStr(JObj[Key])\r\n else\r\n if Key = 'Key' then\r\n begin\r\n JKey := AsJArray(JObj[Key]);\r\n SetLength(TempKeyRef, JKey.Length);\r\n for I := 0 to JKey.Length - 1 do\r\n TempKeyRef[I] := JToStr(JKey[I]);\r\n EntityType.KeyRef := TempKeyRef;\r\n end\r\n end;\r\nend;\r\n\r\nprocedure TXDataModelDeserializer.ReadEnumMember(EnumMember: TXDataEnumMember;\r\n JObj: TJObject);\r\nvar\r\n Key: string;\r\n Keys: TStringDynArray;\r\n KeyIndex: Integer;\r\nbegin\r\n ReadBase(EnumMember, JObj);\r\n Keys := JObjectKeys(JObj);\r\n for KeyIndex := 0 to Length(Keys) - 1 do\r\n begin\r\n Key := Keys[KeyIndex];\r\n if Key = 'Name' then\r\n EnumMember.Name := JToStr(JObj[Key])\r\n else\r\n if Key = 'Value' then\r\n EnumMember.Value := JToInt(JObj[Key]);\r\n end;\r\nend;\r\n\r\nprocedure TXDataModelDeserializer.ReadEnumType(EnumType: TXDataEnumType;\r\n JObj: TJObject);\r\nvar\r\n Key: string;\r\n I: Integer;\r\n JMembers: TJArray;\r\n Keys: TStringDynArray;\r\n KeyIndex: Integer;\r\nbegin\r\n ReadScalarType(EnumType, JObj);\r\n Keys := JObjectKeys(JObj);\r\n for KeyIndex := 0 to Length(Keys) - 1 do\r\n begin\r\n Key := Keys[KeyIndex];\r\n if Key = 'Members' then\r\n begin\r\n JMembers := AsJArray(JObj[Key]);\r\n for I := 0 to JMembers.Length - 1 do\r\n ReadEnumMember(EnumType.Members[EnumType.Members.Add(TXDataEnumMember.Create)], AsJObject(JMembers[I]));\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TXDataModelDeserializer.ReadInstanceNavigationProperty(NavigationProperty: TXDataInstanceNavigationProperty;\r\n JObj: TJObject);\r\nbegin\r\n ReadStructuredProperty(NavigationProperty, JObj);\r\nend;\r\n\r\nprocedure TXDataModelDeserializer.ReadInstanceSimpleProperty(ScalarProperty: TXDataInstanceSimpleProperty;\r\n JObj: TJObject);\r\nbegin\r\n ReadScalarProperty(ScalarProperty, JObj);\r\nend;\r\n\r\nprocedure TXDataModelDeserializer.ReadInstanceType(InstanceType: TXDataInstanceType; JObj: TJObject);\r\nvar\r\n Key: string;\r\n I: Integer;\r\n JProperties: TJArray;\r\n JNavigationProperties: TJArray;\r\n Keys: TStringDynArray;\r\n KeyIndex: Integer;\r\nbegin\r\n ReadStructuredType(InstanceType, JObj);\r\n InstanceType.Properties.Clear;\r\n InstanceType.NavigationProperties.Clear;\r\n Keys := JObjectKeys(JObj);\r\n for KeyIndex := 0 to Length(Keys) - 1 do\r\n begin\r\n Key := Keys[KeyIndex];\r\n if Key = 'Properties' then\r\n begin\r\n JProperties := AsJArray(JObj[Key]);\r\n for I := 0 to JProperties.Length - 1 do\r\n ReadInstanceSimpleProperty(InstanceType.Properties[InstanceType.Properties.Add(TXDataInstanceSimpleProperty.Create)], AsJObject(JProperties[I]));\r\n end\r\n else\r\n if Key = 'NavigationProperties' then\r\n begin\r\n JNavigationProperties := AsJArray(JObj[Key]);\r\n for I := 0 to JNavigationProperties.Length - 1 do\r\n ReadInstanceNavigationProperty(InstanceType.NavigationProperties[InstanceType.NavigationProperties.Add(TXDataInstanceNavigationProperty.Create)], AsJObject(JNavigationProperties[I]));\r\n end\r\n else\r\n if Key = 'BaseType' then\r\n InstanceType.BaseTypeRef := JToStr(JObj[Key]);\r\n end;\r\nend;\r\n\r\nprocedure TXDataModelDeserializer.ReadScalarProperty(ScalarProperty: TXDataScalarProperty; JObj: TJObject);\r\nvar\r\n Key: string;\r\n Keys: TStringDynArray;\r\n KeyIndex: Integer;\r\nbegin\r\n ReadProperty(ScalarProperty, JObj);\r\n Keys := JObjectKeys(JObj);\r\n for KeyIndex := 0 to Length(Keys) - 1 do\r\n begin\r\n Key := Keys[KeyIndex];\r\n if Key = 'Length' then\r\n ScalarProperty.Length := JToInt(JObj[Key])\r\n else\r\n if Key = 'Precision' then\r\n ScalarProperty.Precision := JToInt(JObj[Key])\r\n else\r\n if Key = 'Scale' then\r\n ScalarProperty.Scale := JToInt(JObj[Key])\r\n else\r\n if Key = 'Type' then\r\n ScalarProperty.TypeRef := JToStr(JObj[Key]);\r\n end;\r\nend;\r\n\r\nprocedure TXDataModelDeserializer.ReadScalarType(ScalarType: TXDataScalarType;\r\n JObj: TJObject);\r\nbegin\r\n ReadType(ScalarType, JObj);\r\nend;\r\n\r\nprocedure TXDataModelDeserializer.ReadSchema(Schema: TXDataSchema;\r\n JObj: TJObject);\r\nvar\r\n Key: string;\r\n I: Integer;\r\n JEntityTypes: TJArray;\r\n JInstanceTypes: TJArray;\r\n JEntityContainers: TJArray;\r\n JEnumTypes: TJArray;\r\n JControllers: TJArray;\r\n Keys: TStringDynArray;\r\n KeyIndex: Integer;\r\nbegin\r\n ReadBase(Schema, JObj);\r\n Schema.EntityTypes.Clear;\r\n Schema.InstanceTypes.Clear;\r\n Schema.EntityContainers.Clear;\r\n Schema.EnumTypes.Clear;\r\n Schema.Controllers.Clear;\r\n Keys := JObjectKeys(JObj);\r\n for KeyIndex := 0 to Length(Keys) - 1 do\r\n begin\r\n Key := Keys[KeyIndex];\r\n if Key = 'Namespace' then\r\n Schema.Namespace := JToStr(JObj[Key])\r\n else\r\n if Key = 'Alias' then\r\n Schema.Alias := JToStr(JObj[Key])\r\n else\r\n if Key = 'EntityTypes' then\r\n begin\r\n JEntityTypes := AsJArray(JObj[Key]);\r\n for I := 0 to JEntityTypes.Length - 1 do\r\n ReadEntityType(Schema.EntityTypes[Schema.EntityTypes.Add(TXDataEntityType.Create)], AsJObject(JEntityTypes[I]));\r\n end\r\n else\r\n if Key = 'InstanceTypes' then\r\n begin\r\n JInstanceTypes := AsJArray(JObj[Key]);\r\n for I := 0 to JInstanceTypes.Length - 1 do\r\n ReadInstanceType(Schema.InstanceTypes[Schema.InstanceTypes.Add(TXDataInstanceType.Create)], AsJObject(JInstanceTypes[I]));\r\n end\r\n else\r\n if Key = 'EntityContainers' then\r\n begin\r\n JEntityContainers := AsJArray(JObj[Key]);\r\n for I := 0 to JEntityContainers.Length - 1 do\r\n ReadEntityContainer(Schema.EntityContainers[Schema.EntityContainers.Add(TXDataEntityContainer.Create)], AsJObject(JEntityContainers[I]));\r\n end\r\n else\r\n if Key = 'EnumTypes' then\r\n begin\r\n JEnumTypes := AsJArray(JObj[Key]);\r\n for I := 0 to JEnumTypes.Length - 1 do\r\n ReadEnumType(Schema.EnumTypes[Schema.EnumTypes.Add(TXDataEnumType.Create)], AsJObject(JEnumTypes[I]));\r\n end\r\n else\r\n if Key = 'Controllers' then\r\n begin\r\n JControllers := AsJArray(JObj[Key]);\r\n for I := 0 to JControllers.Length - 1 do\r\n ReadController(Schema.Controllers[Schema.Controllers.Add(TXDataController.Create)], AsJObject(JControllers[I]));\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TXDataModelDeserializer.ReadSimpleProperty(\r\n SimpleProperty: TXDataSimpleProperty; JObj: TJObject);\r\nbegin\r\n ReadScalarProperty(SimpleProperty, JObj);\r\nend;\r\n\r\nprocedure TXDataModelDeserializer.ReadStructuredProperty(StructuredProperty: TXDataStructuredProperty; JObj: TJObject);\r\nvar\r\n Key: string;\r\n Keys: TStringDynArray;\r\n KeyIndex: Integer;\r\nbegin\r\n ReadProperty(StructuredProperty, JObj);\r\n Keys := JObjectKeys(JObj);\r\n for KeyIndex := 0 to Length(Keys) - 1 do\r\n begin\r\n Key := Keys[KeyIndex];\r\n if Key = 'Target' then\r\n StructuredProperty.TargetRef := JToStr(JObj[Key]);\r\n end;\r\nend;\r\n\r\nprocedure TXDataModelDeserializer.ReadStructuredType(\r\n StructuredType: TXDataStructuredType; JObj: TJObject);\r\nbegin\r\n ReadType(StructuredType, JObj);\r\nend;\r\n\r\nprocedure TXDataModelDeserializer.ReadType(XDataType: TXDataType;\r\n JObj: TJObject);\r\nvar\r\n Key: string;\r\n Keys: TStringDynArray;\r\n KeyIndex: Integer;\r\nbegin\r\n ReadBase(XDataType, JObj);\r\n Keys := JObjectKeys(JObj);\r\n for KeyIndex := 0 to Length(Keys) - 1 do\r\n begin\r\n Key := Keys[KeyIndex];\r\n if Key = 'Name' then\r\n XDataType.Name := JToStr(JObj[Key]);\r\n end;\r\nend;\r\n\r\nend.\r\n","unit XData.Web.Connection;\r\n\r\n{$I XData.inc}\r\n{$IF PAS2JS_FULLVERSION >= 20000}\r\n {$DEFINE JSASYNC}\r\n{$ENDIF}\r\n\r\ninterface\r\n\r\nuses\r\n Types, Classes, SysUtils, Web, JS,\r\n XData.Web.Request, XData.Web.Response,\r\n XData.Model.Classes;\r\n\r\ntype\r\n TXDataWebConnection = class;\r\n TXDataWebConnectionDesignData = class;\r\n\r\n// Later refactor this to THttpEngine + THttpClient\r\n THttpResponseProc = reference to procedure(Response: IHttpResponse);\r\n THttpErrorProc = reference to procedure;\r\n THttpEventProc = reference to procedure(Event: JSValue);\r\n THttpRequestProc = reference to procedure(Request: IHttpRequest);\r\n\r\n TXDataWebConnectionRequest = class\r\n strict private\r\n FRequest: IHttpRequest;\r\n FConnection: TXDataWebConnection;\r\n FRequestProc: THttpRequestProc;\r\n FAsync: Boolean;\r\n strict protected\r\n property Connection: TXDataWebConnection read FConnection;\r\n public\r\n constructor Create(AConnection: TXDataWebConnection; ARequest: IHttpRequest); reintroduce;\r\n property Request: IHttpRequest read FRequest;\r\n property RequestProc: THttpRequestProc read FRequestProc write FRequestProc;\r\n property Async: Boolean read FAsync write FAsync;\r\n end;\r\n\r\n TXDataWebConnectionResponse = class\r\n strict private\r\n FRequest: IHttpRequest;\r\n FResponse: IHttpResponse;\r\n FConnection: TXDataWebConnection;\r\n FSuccessProc: THttpResponseProc;\r\n FAsync: Boolean;\r\n strict protected\r\n property Connection: TXDataWebConnection read FConnection;\r\n public\r\n constructor Create(AConnection: TXDataWebConnection; ARequest: IHttpRequest;\r\n AResponse: IHttpResponse); reintroduce;\r\n property Request: IHttpRequest read FRequest;\r\n property Response: IHttpResponse read FResponse write FResponse;\r\n property SuccessProc: THttpResponseProc read FSuccessProc write FSuccessProc;\r\n property Async: Boolean read FAsync write FAsync;\r\n end;\r\n\r\n TXDataWebConnectionError = class\r\n strict private\r\n FResponse: IHttpResponse;\r\n FConnection: TXDataWebConnection;\r\n FErrorMessage: string;\r\n FRequestUrl: string;\r\n strict protected\r\n property Connection: TXDataWebConnection read FConnection;\r\n public\r\n constructor Create(AConnection: TXDataWebConnection; AResponse: IHttpResponse;\r\n ARequestUrl: string; AErrorMessage: string); reintroduce;\r\n property Response: IHttpResponse read FResponse;\r\n property ErrorMessage: string read FErrorMessage;\r\n property RequestUrl: string read FRequestUrl;\r\n end;\r\n\r\n EXDataWebConnectionException = class(Exception)\r\n strict private\r\n FError: TXDataWebConnectionError;\r\n public\r\n constructor Create(AError: TXDataWebConnectionError);\r\n property Error: TXDataWebConnectionError read FError;\r\n end;\r\n\r\n TXDataWebConnectionRequestEvent = procedure(Args: TXDataWebConnectionRequest) of object;\r\n TXDataWebConnectionResponseEvent = procedure(Args: TXDataWebConnectionResponse) of object;\r\n TXDataWebConnectionErrorEvent = procedure(Error: TXDataWebConnectionError) of object;\r\n TXDataWebConnectionErrorProc = reference to procedure(Error: TXDataWebConnectionError);\r\n TXDataWebConnectionConnectProc = reference to procedure;\r\n\r\n TXDataWebConnection = class(TComponent)\r\n private\r\n FURL: string;\r\n FModel: TXDataModel;\r\n FOnConnect: TNotifyEvent;\r\n FStreamedConnected: Boolean;\r\n FOnRequest: TXDataWebConnectionRequestEvent;\r\n FOnResponse: TXDataWebConnectionResponseEvent;\r\n FOnError: TXDataWebConnectionErrorEvent;\r\n FDesignData: TXDataWebConnectionDesignData;\r\n function GetConnected: Boolean;\r\n procedure SetConnected(const Value: Boolean);\r\n function IsDesignDataStored: Boolean;\r\n procedure SetDesignData(const Value: TXDataWebConnectionDesignData);\r\n procedure DoError(Response: IHttpResponse; RequestUrl: string; ErrorMessage: string;\r\n ErrorProc: TXDataWebConnectionErrorProc);\r\n procedure SetURL(const Value: string);\r\n protected\r\n procedure DoConnect(ConnectProc: TXDataWebConnectionConnectProc;\r\n ErrorProc: TXDataWebConnectionErrorProc); virtual;\r\n procedure DoDisconnect; virtual;\r\n public\r\n procedure LoadModel; deprecated;\r\n procedure SendRequest(Request: IHttpRequest; SuccessProc: THttpResponseProc; ErrorProc: THttpErrorProc = nil);\r\n {$IFDEF JSASYNC}\r\n function SendRequestAsync(Request: IHttpRequest): IHttpResponse; async;\r\n {$ENDIF}\r\n function AbsoluteUrl(const RelativeUrl: string): string;\r\n property Model: TXDataModel read FModel;\r\n public\r\n constructor Create(AOwner: TComponent); override;\r\n destructor Destroy; override;\r\n procedure Open(ConnectProc: TXDataWebConnectionConnectProc = nil; ErrorProc: TXDataWebConnectionErrorProc = nil);\r\n {$IFDEF JSASYNC}\r\n function OpenAsync: JSValue; async;\r\n {$ENDIF}\r\n procedure Close;\r\n procedure Loaded; override;\r\n published\r\n property URL: string read FURL write SetURL;\r\n property DesignData: TXDataWebConnectionDesignData read FDesignData write SetDesignData stored IsDesignDataStored;\r\n property Connected: Boolean read GetConnected write SetConnected default False;\r\n property OnConnect: TNotifyEvent read FOnConnect write FOnConnect;\r\n property OnError: TXDataWebConnectionErrorEvent read FOnError write FOnError;\r\n property OnRequest: TXDataWebConnectionRequestEvent read FOnRequest write FOnRequest;\r\n property OnResponse: TXDataWebConnectionResponseEvent read FOnResponse write FOnResponse;\r\n end;\r\n\r\n TXDataWebConnectionDesignData = class(TPersistent)\r\n private\r\n FHeaders: TStrings;\r\n FPersist: Boolean;\r\n function IsStored: Boolean;\r\n procedure SetHeaders(const Value: TStrings);\r\n public\r\n constructor Create;\r\n destructor Destroy; override;\r\n procedure Assign(Source: TPersistent); override;\r\n published\r\n property Headers: TStrings read FHeaders write SetHeaders stored IsStored;\r\n property Persist: Boolean read FPersist write FPersist stored IsStored;\r\n end;\r\n\r\n EEventException = class(Exception)\r\n strict private\r\n FEvent: JSValue;\r\n public\r\n constructor Create(const Msg: string; AEvent: JSValue);\r\n property Event: JSValue read FEvent;\r\n end;\r\n\r\nprocedure InternalSendRequest(Req: IHttpRequest; SuccessProc: THttpResponseProc; ErrorProc: THttpEventProc = nil);\r\nfunction InternalSendRequestAsync(Req: IHttpRequest; SuccessProc: THttpResponseProc;\r\n ErrorProc: THttpEventProc = nil): JSValue; async;\r\n\r\nimplementation\r\n\r\nuses\r\n Bcl.Utils,\r\n XData.Model.Deserializer;\r\n\r\nprocedure InternalSendRequest(Req: IHttpRequest; SuccessProc: THttpResponseProc;\r\n ErrorProc: THttpEventProc = nil);\r\nvar\r\n Xhr: TJSXmlHttpRequest;\r\n\r\n procedure XhrLoad;\r\n var\r\n Resp: IHttpResponse;\r\n begin\r\n Resp := TXhrHttpResponse.Create(Xhr);\r\n if Assigned(SuccessProc) then\r\n SuccessProc(Resp);\r\n end;\r\n\r\n procedure XhrError(Event: JSValue);\r\n begin\r\n if Assigned(ErrorProc) then\r\n ErrorProc(Event);\r\n end;\r\n\r\nvar\r\n HeaderNames: TStringDynArray;\r\n I: Integer;\r\nbegin\r\n Xhr := TJSXMLHttpRequest.new;\r\n Xhr.open(Req.Method, Req.Uri, True);\r\n HeaderNames := Req.Headers.HeaderNames;\r\n for I := 0 to Length(HeaderNames) - 1 do\r\n Xhr.setRequestHeader(HeaderNames[I], Req.Headers.Get(HeaderNames[I]));\r\n\r\n Xhr.addEventListener('load', @XhrLoad);\r\n Xhr.addEventListener('error', @XhrError);\r\n Xhr.addEventListener('timeout', @XhrError);\r\n if Req.Timeout > 0 then\r\n Xhr.timeout := Req.Timeout;\r\n if Req.ResponseType <> '' then\r\n Xhr.responseType := Req.ResponseType;\r\n if not Js.IsNull(Req.Content) then\r\n Xhr.send(Req.Content)\r\n else\r\n Xhr.send;\r\nend;\r\n\r\nfunction InternalSendRequestAsync(Req: IHttpRequest; SuccessProc: THttpResponseProc;\r\n ErrorProc: THttpEventProc = nil): JSValue;\r\nbegin\r\n Result := TJSPromise.new(\r\n procedure(resolve, reject: TJSPromiseResolver)\r\n begin\r\n InternalSendRequest(Req,\r\n procedure(Response: IHttpResponse)\r\n begin\r\n resolve(Response);\r\n end,\r\n procedure(Event: JSValue)\r\n begin\r\n reject(EEventException.Create('XHR request failed', Event));\r\n end\r\n );\r\n end\r\n );\r\nend;\r\n\r\n//{$IFDEF JSASYNC}\r\n//function InternalSendRequestAsync(Req: IHttpRequest): IHttpResponse; async;\r\n//var\r\n// Promise: TJSPromise;\r\n//begin\r\n// Promise := TJSPromise.new(\r\n// procedure(resolve, reject: TJSPromiseResolver)\r\n// begin\r\n// InternalSendRequest(\r\n// Req,\r\n// procedure(Response: IHttpResponse)\r\n// begin\r\n// resolve(Response);\r\n// end,\r\n// procedure\r\n// begin\r\n// reject(Exception.Create('Request error: ' + Req.Uri));\r\n// end\r\n// );\r\n// end\r\n// );\r\n// Exit(Promise);\r\n//end;\r\n//{$ENDIF}\r\n\r\n{ EEventException }\r\n\r\nconstructor EEventException.Create(const Msg: string; AEvent: JSValue);\r\nbegin\r\n inherited Create(Msg);\r\n FEvent := AEvent;\r\nend;\r\n\r\n{ TXDataWebConnection }\r\n\r\nfunction TXDataWebConnection.AbsoluteUrl(const RelativeUrl: string): string;\r\nbegin\r\n Result := TBclUtils.CombineUrlFast(Self.URL, RelativeUrl);\r\nend;\r\n\r\nprocedure TXDataWebConnection.Close;\r\nbegin\r\n SetConnected(False);\r\nend;\r\n\r\nconstructor TXDataWebConnection.Create(AOwner: TComponent);\r\nbegin\r\n inherited Create(AOwner);\r\n FDesignData := TXDataWebConnectionDesignData.Create;\r\nend;\r\n\r\ndestructor TXDataWebConnection.Destroy;\r\nbegin\r\n FDesignData.Free;\r\n FModel.Free;\r\n inherited;\r\nend;\r\n\r\nprocedure TXDataWebConnection.DoConnect(ConnectProc: TXDataWebConnectionConnectProc = nil;\r\n ErrorProc: TXDataWebConnectionErrorProc = nil);\r\nvar\r\n ModelUrl: string;\r\n\r\n procedure OnSuccess(Resp: IHttpResponse);\r\n var\r\n LocalModel: TXDataModel;\r\n begin\r\n if Resp.StatusCode = 200 then\r\n begin\r\n LocalModel := TXDataModel.Create;\r\n try\r\n TXDataModelDeserializer.Deserialize(LocalModel, Resp.ContentAsText);\r\n FModel := LocalModel;\r\n except\r\n LocalModel.Free;\r\n raise;\r\n end;\r\n\r\n // Connect callback\r\n if Assigned(ConnectProc) then\r\n ConnectProc()\r\n else\r\n if Assigned(FOnConnect) then\r\n FOnConnect(Self);\r\n end\r\n else\r\n DoError(Resp, ModelUrl,\r\n Format('Error %d. Could not connect retrieve XData model from %s', [Resp.StatusCode, ModelUrl]),\r\n ErrorProc\r\n );\r\n end;\r\n\r\n procedure LocalError;\r\n var\r\n Resp: IHttpResponse;\r\n begin\r\n Resp := TDummyHttpResponse.Create;\r\n DoError(Resp, ModelUrl, 'Error connecting to XData server', ErrorProc);\r\n end;\r\n\r\nvar\r\n Req: IHttpRequest;\r\n I: Integer;\r\nbegin\r\n // DoDisconnect\r\n FModel.Free;\r\n FModel := nil;\r\n\r\n ModelUrl := TBclUtils.CombineUrlFast(Self.URL, '$model');\r\n\r\n Req := THttpRequest.Create(ModelUrl);\r\n for I := 0 to DesignData.Headers.Count - 1 do\r\n if DesignData.Headers.Names[I] <> '' then\r\n Req.Headers.SetValue(DesignData.Headers.Names[I], DesignData.Headers.ValueFromIndex[I]);\r\n\r\n SendRequest(Req, @OnSuccess, @LocalError);\r\nend;\r\n\r\nprocedure TXDataWebConnection.DoDisconnect;\r\nbegin\r\n FModel.Free;\r\n FModel := nil;\r\nend;\r\n\r\nprocedure TXDataWebConnection.DoError(Response: IHttpResponse;\r\n RequestUrl: string; ErrorMessage: string; ErrorProc: TXDataWebConnectionErrorProc);\r\nvar\r\n Error: TXDataWebConnectionError;\r\nbegin\r\n Error := TXDataWebConnectionError.Create(Self, Response, RequestUrl, ErrorMessage);\r\n if Assigned(ErrorProc) then\r\n ErrorProc(Error)\r\n else\r\n if Assigned(FOnError) then\r\n FOnError(Error)\r\n else\r\n raise Exception.Create('XDataConnectionError: ' + ErrorMessage);\r\nend;\r\n\r\nfunction TXDataWebConnection.GetConnected: Boolean;\r\nbegin\r\n Result := Assigned(FModel);\r\nend;\r\n\r\nfunction TXDataWebConnection.IsDesignDataStored: Boolean;\r\nbegin\r\n Result := FDesignData.Persist;\r\nend;\r\n\r\nprocedure TXDataWebConnection.Loaded;\r\nbegin\r\n inherited Loaded;\r\n if FStreamedConnected then SetConnected(True);\r\nend;\r\n\r\nprocedure TXDataWebConnection.LoadModel;\r\nbegin\r\n DoConnect(nil, nil);\r\nend;\r\n\r\nprocedure TXDataWebConnection.Open(ConnectProc: TXDataWebConnectionConnectProc = nil; ErrorProc: TXDataWebConnectionErrorProc = nil);\r\nbegin\r\n if not Connected then\r\n DoConnect(ConnectProc, ErrorProc);\r\nend;\r\n\r\n{$IFDEF JSASYNC}\r\nfunction TXDataWebConnection.OpenAsync: JSValue; async;\r\nbegin\r\n Result := TJSPromise.new(\r\n procedure(resolve, reject: TJSPromiseResolver)\r\n begin\r\n DoConnect(\r\n procedure\r\n begin\r\n if Assigned(FOnConnect) then\r\n FOnConnect(Self);\r\n resolve(nil);\r\n end,\r\n procedure(Error: TXDataWebConnectionError)\r\n begin\r\n reject(EXDataWebConnectionException.Create(Error));\r\n end\r\n );\r\n end\r\n );\r\nend;\r\n{$ENDIF}\r\n\r\nprocedure TXDataWebConnection.SendRequest(Request: IHttpRequest;\r\n SuccessProc: THttpResponseProc; ErrorProc: THttpErrorProc);\r\n\r\n procedure LocalSuccess(Response: IHttpResponse);\r\n var\r\n ResponseArgs: TXDataWebConnectionResponse;\r\n Async: Boolean;\r\n begin\r\n Async := False;\r\n if Assigned(FOnResponse) then\r\n begin\r\n ResponseArgs := TXDataWebConnectionResponse.Create(Self, Request, Response);\r\n try\r\n ResponseArgs.SuccessProc :=\r\n procedure(Response: IHttpResponse)\r\n begin\r\n SuccessProc(Response);\r\n end;\r\n FOnResponse(ResponseArgs);\r\n Async := ResponseArgs.Async;\r\n if not Async then\r\n Response := ResponseArgs.Response;\r\n finally\r\n if not Async then\r\n ResponseArgs.Free;\r\n end;\r\n end;\r\n if not Async then\r\n SuccessProc(Response);\r\n end;\r\n\r\nvar\r\n RequestArgs: TXDataWebConnectionRequest;\r\n Async: Boolean;\r\nbegin\r\n Async := False;\r\n\r\n if Assigned(FOnRequest) then\r\n begin\r\n RequestArgs := TXDataWebConnectionRequest.Create(Self, Request);\r\n try\r\n RequestArgs.RequestProc :=\r\n procedure(Request: IHttpRequest)\r\n begin\r\n InternalSendRequest(Request, @LocalSuccess,\r\n procedure(Event: JSValue)\r\n begin\r\n ErrorProc();\r\n end);\r\n end;\r\n FOnRequest(RequestArgs);\r\n Async := RequestArgs.Async;\r\n finally\r\n if not Async then\r\n RequestArgs.Free;\r\n end;\r\n end;\r\n if not Async then\r\n InternalSendRequest(Request, @LocalSuccess,\r\n procedure(Event: JSValue)\r\n begin\r\n ErrorProc();\r\n end);\r\nend;\r\n\r\n{$IFDEF JSASYNC}\r\nfunction TXDataWebConnection.SendRequestAsync(\r\n Request: IHttpRequest): IHttpResponse;\r\nvar\r\n Promise: TJSPromise;\r\nbegin\r\n Promise := TJSPromise.new(\r\n procedure(resolve, reject: TJSPromiseResolver)\r\n begin\r\n SendRequest(\r\n Request,\r\n procedure(Response: IHttpResponse)\r\n begin\r\n Response._AddRef;\r\n resolve(Response);\r\n end,\r\n procedure\r\n begin\r\n reject(Exception.Create('Request error: ' + Request.Uri));\r\n end\r\n );\r\n end\r\n );\r\n Exit(Promise);\r\nend;\r\n{$ENDIF}\r\n\r\nprocedure TXDataWebConnection.SetConnected(const Value: Boolean);\r\nbegin\r\n if (csLoading in ComponentState) and Value then\r\n FStreamedConnected := True else\r\n begin\r\n if Value = GetConnected then Exit;\r\n if Value then\r\n begin\r\n DoConnect(nil, nil);\r\n end else\r\n begin\r\n DoDisconnect;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TXDataWebConnection.SetDesignData(\r\n const Value: TXDataWebConnectionDesignData);\r\nbegin\r\n FDesignData.Assign(Value);\r\nend;\r\n\r\nprocedure TXDataWebConnection.SetURL(const Value: string);\r\nbegin\r\n if FURL <> Value then\r\n begin\r\n FUrl := Value;\r\n DoDisconnect;\r\n end;\r\nend;\r\n\r\n{ TXDataWebConnectionRequest }\r\n\r\nconstructor TXDataWebConnectionRequest.Create(AConnection: TXDataWebConnection;\r\n ARequest: IHttpRequest);\r\nbegin\r\n FConnection := AConnection;\r\n FRequest := ARequest;\r\nend;\r\n\r\n{ TXDataWebConnectionError }\r\n\r\nconstructor TXDataWebConnectionError.Create(AConnection: TXDataWebConnection;\r\n AResponse: IHttpResponse; ARequestUrl: string; AErrorMessage: string);\r\nbegin\r\n FConnection := AConnection;\r\n FResponse := AResponse;\r\n FErrorMessage := AErrorMessage;\r\n FRequestUrl := ARequestUrl;\r\nend;\r\n\r\n{ TXDataWebConnectionDesignData }\r\n\r\nprocedure TXDataWebConnectionDesignData.Assign(Source: TPersistent);\r\nbegin\r\n if Source is TXDataWebConnectionDesignData then\r\n begin\r\n Persist := TXDataWebConnectionDesignData(Source).Persist;\r\n Headers := TXDataWebConnectionDesignData(Source).Headers;\r\n end\r\n else\r\n inherited Assign(Source);\r\nend;\r\n\r\nconstructor TXDataWebConnectionDesignData.Create;\r\nbegin\r\n inherited Create;\r\n FHeaders := TStringList.Create;\r\nend;\r\n\r\ndestructor TXDataWebConnectionDesignData.Destroy;\r\nbegin\r\n FHeaders.Free;\r\n inherited;\r\nend;\r\n\r\nfunction TXDataWebConnectionDesignData.IsStored: Boolean;\r\nbegin\r\n Result := FPersist;\r\nend;\r\n\r\nprocedure TXDataWebConnectionDesignData.SetHeaders(const Value: TStrings);\r\nbegin\r\n FHeaders.Assign(Value);\r\nend;\r\n\r\n{ TXDataWebConnectionResponse }\r\n\r\nconstructor TXDataWebConnectionResponse.Create(AConnection: TXDataWebConnection;\r\n ARequest: IHttpRequest; AResponse: IHttpResponse);\r\nbegin\r\n FConnection := AConnection;\r\n FRequest := ARequest;\r\n FResponse := AResponse;\r\nend;\r\n\r\n{ EXDataWebConnectionException }\r\n\r\nconstructor EXDataWebConnectionException.Create(\r\n AError: TXDataWebConnectionError);\r\nbegin\r\n FError := AError;\r\n inherited CreateFmt('Error connecting to %s', [AError.RequestUrl]);\r\nend;\r\n\r\nend.\r\n","unit XData.Bind.Converter;\r\n\r\ninterface\r\n\r\nuses\r\n TypInfo, SysUtils,\r\n XData.Model.Classes;\r\n\r\nfunction BindValueToUrl(const Value: JSValue; const PropName: string; const Info: TTypeInfo;\r\n UrlConverter: TXDataTypeConverter): string;\r\n\r\nimplementation\r\n\r\nfunction BindValueToUrl(const Value: JSValue; const PropName: string; const Info: TTypeInfo;\r\n UrlConverter: TXDataTypeConverter): string;\r\nbegin\r\n Result := UrlConverter.ValueToUrl(Value, PropName);\r\nend;\r\n\r\nend.\r\n","unit XData.Web.Client;\r\n\r\n{$I XData.inc}\r\n{$SCOPEDENUMS OFF} // to keep backward compatibility\r\n{$IF PAS2JS_FULLVERSION >= 20000}\r\n {$DEFINE JSASYNC}\r\n{$ENDIF}\r\n\r\ninterface\r\n\r\nuses\r\n JS, SysUtils, Classes, Types,\r\n Bcl.Rtti.Common,\r\n Bcl.Json.Common,\r\n XData.Model.Classes,\r\n XData.Web.Connection,\r\n XData.Web.Request,\r\n XData.Web.Response;\r\n\r\ntype\r\n TXDataWebClient = class;\r\n TXDataClientRequestType = (rtGet, rtList, rtPut, rtPost, rtDelete, rtRawInvoke);\r\n\r\n TXDataClientResponse = class\r\n strict private\r\n FResponse: IHttpResponse;\r\n FRequestType: TXDataClientRequestType;\r\n FResult: JSValue;\r\n FRequestId: string;\r\n FCount: Integer;\r\n FClient: TXDataWebClient;\r\n function GetResponseText: string;\r\n function GetStatusCode: Integer;\r\n strict private\r\n function GetResultAsArray: TJSArray;\r\n function GetResultAsObject: TJSObject; protected\r\n property RequestType: TXDataClientRequestType read FRequestType;\r\n public\r\n constructor Create(AClient: TXDataWebClient; AResponse: IHttpResponse; AResult: JSValue;\r\n ARequestType: TXDataClientRequestType; ARequestId: string; ACount: Integer = 0); reintroduce;\r\n property StatusCode: Integer read GetStatusCode;\r\n property ResponseText: string read GetResponseText;\r\n property Result: JSValue read FResult;\r\n property ResultAsObject: TJSObject read GetResultAsObject;\r\n property ResultAsArray: TJSArray read GetResultAsArray;\r\n property RequestId: string read FRequestId;\r\n property Count: Integer read FCount;\r\n property Client: TXDataWebClient read FClient;\r\n property Response: IHttpResponse read FResponse;\r\n end;\r\n\r\n TXDataClientRequest = class\r\n strict private\r\n FRequest: IHttpRequest;\r\n FRequestType: TXDataClientRequestType;\r\n FRequestId: string;\r\n FClient: TXDataWebClient;\r\n strict protected\r\n property RequestType: TXDataClientRequestType read FRequestType;\r\n public\r\n constructor Create(AClient: TXDataWebClient; ARequest: IHttpRequest;\r\n ARequestType: TXDataClientRequestType; ARequestId: string); reintroduce;\r\n property RequestId: string read FRequestId;\r\n property Client: TXDataWebClient read FClient;\r\n property Request: IHttpRequest read FRequest;\r\n end;\r\n\r\n TXDataClientError = class\r\n private\r\n FResponse: IHttpResponse;\r\n FRequestId: string;\r\n FErrorCode: string;\r\n FErrorMessage: string;\r\n FRequestUrl: string;\r\n FClient: TXDataWebClient;\r\n function GetStatusCode: Integer;\r\n public\r\n constructor Create(AClient: TXDataWebClient; AResponse: IHttpResponse;\r\n const ARequestUrl, AErrorCode, AErrorMessage, ARequestId: string); reintroduce;\r\n property StatusCode: Integer read GetStatusCode;\r\n property RequestUrl: string read FRequestUrl;\r\n property RequestId: string read FRequestId;\r\n property ErrorCode: string read FErrorCode;\r\n property ErrorMessage: string read FErrorMessage;\r\n property Client: TXDataWebClient read FClient;\r\n property Response: IHttpResponse read FResponse;\r\n end;\r\n\r\n TXDataClientLoadEvent = procedure(Response: TXDataClientResponse) of object;\r\n TXDataClientLoadProc = reference to procedure(Response: TXDataClientResponse);\r\n TXDataClientErrorEvent = procedure(Error: TXDataClientError) of object;\r\n TXDataClientErrorProc = reference to procedure(Error: TXDataClientError);\r\n TXDataClientRequestEvent = procedure(Request: TXDataClientRequest) of object;\r\n THttpResponseProc = reference to procedure(Response: IHttpResponse);\r\n\r\n TReferenceSolvingMode = (rsAll, rsNone);\r\n\r\n TXDataWebClient = class(TComponent)\r\n strict private\r\n FOnLoad: TXDataClientLoadEvent;\r\n FOnError: TXDataClientErrorEvent;\r\n FOnRequest: TXDataClientRequestEvent;\r\n// FMaxEagerFetchDepth: integer;\r\n FConnection: TXDataWebConnection;\r\n FReferenceSolvingMode: TReferenceSolvingMode;\r\n function EntityTypeFromEntitySet(const EntitySetName: string): TXDataEntityType;\r\n procedure SetConnection(const Value: TXDataWebConnection);\r\n function Model: TXDataModel;\r\n function Url: string;\r\n procedure CheckConnection;\r\n procedure ParseError(Response: IHttpResponse; var ErrorCode, ErrorMessage: string);\r\n procedure SolveReferences(json: JSValue);\r\n// procedure SetIdFromResponse(Entity: TObject; Req: THttpRequest; Resp: THttpResponse);\r\n private\r\n { callback functions to build canonical url's }\r\n procedure DoLoad(Response: TXDataClientResponse; SuccessProc: TXDataClientLoadProc; AsyncMode: Boolean);\r\n procedure DoError(Response: IHttpResponse; RequestUrl, RequestId: string;\r\n ErrorMessage: string; ErrorProc: TXDataClientErrorProc; AsyncMode: Boolean);\r\n function RequestUrl(const RelativeUrl: string): string;\r\n function GetNavPropValue(Entity: JSValue; Prop: TXDataNavigationProperty): JSValue;\r\n function GetPropValue(Entity: JSValue; Prop: TXDataSimpleProperty): JSValue;\r\n private\r\n procedure InternalGet(const EntitySet, QueryString: string; Id: JSValue; const RequestId: string;\r\n SuccessProc: TXDataClientLoadProc; ErrorProc: TXDataClientErrorProc; AsyncMode: Boolean = False);\r\n procedure InternalPut(const EntitySet: string; Entity: TJObject; const RequestId: string;\r\n SuccessProc: TXDataClientLoadProc; ErrorProc: TXDataClientErrorProc; AsyncMode: Boolean = False);\r\n procedure InternalPost(const EntitySet: string; Entity: TJObject; const RequestId: string;\r\n SuccessProc: TXDataClientLoadProc; ErrorProc: TXDataClientErrorProc; AsyncMode: Boolean = False);\r\n procedure InternalDelete(const EntitySet: string; Entity: TJObject; const RequestId: string;\r\n SuccessProc: TXDataClientLoadProc; ErrorProc: TXDataClientErrorProc; AsyncMode: Boolean = False);\r\n procedure InternalList(const EntitySet: string; const Query: string; const RequestId: string;\r\n SuccessProc: TXDataClientLoadProc; ErrorProc: TXDataClientErrorProc; AsyncMode: Boolean = False);\r\n procedure InternalRawInvoke(const OperationId: string; Args: array of JSValue;\r\n const Query: string; RequestId: string; SuccessProc: TXDataClientLoadProc;\r\n ErrorProc: TXDataClientErrorProc; AsyncMode: Boolean = False);\r\n protected\r\n procedure DoRequest(Request: TXDataClientRequest);\r\n procedure Send(Req: IHttpRequest; SuccessProc: THttpResponseProc; ErrorProc: THttpErrorProc);\r\n procedure Notification(AComponent: TComponent; Operation: TOperation); override;\r\n public\r\n procedure Get(const EntitySet: string; Id: JSValue; const RequestId: string = 'get'); overload;\r\n procedure Get(const EntitySet: string; Id: JSValue; SuccessProc: TXDataClientLoadProc; ErrorProc: TXDataClientErrorProc = nil); overload;\r\n procedure Get(const EntitySet, QueryString: string; Id: JSValue; const RequestId: string = 'get'); overload;\r\n procedure Get(const EntitySet, QueryString: string; Id: JSValue; SuccessProc: TXDataClientLoadProc; ErrorProc: TXDataClientErrorProc = nil); overload;\r\n {$IFDEF JSASYNC}\r\n function GetAsync(const EntitySet, QueryString: string; Id: JSValue): TXDataClientResponse; async; overload;\r\n function GetAsync(const EntitySet: string; Id: JSValue): TXDataClientResponse; async; overload;\r\n {$ENDIF}\r\n\r\n procedure Put(const EntitySet: string; Entity: TJObject; const RequestId: string = 'put'); overload;\r\n procedure Put(const EntitySet: string; Entity: TJObject; SuccessProc: TXDataClientLoadProc; ErrorProc: TXDataClientErrorProc = nil); overload;\r\n {$IFDEF JSASYNC}\r\n function PutAsync(const EntitySet: string; Entity: TJObject): TXDataClientResponse; async;\r\n {$ENDIF}\r\n\r\n procedure Post(const EntitySet: string; Entity: TJObject; const RequestId: string = 'post'); overload;\r\n procedure Post(const EntitySet: string; Entity: TJObject; SuccessProc: TXDataClientLoadProc; ErrorProc: TXDataClientErrorProc = nil); overload;\r\n {$IFDEF JSASYNC}\r\n function PostAsync(const EntitySet: string; Entity: TJObject): TXDataClientResponse; async;\r\n {$ENDIF}\r\n\r\n procedure Delete(const EntitySet: string; Entity: TJObject; const RequestId: string = 'delete'); overload;\r\n procedure Delete(const EntitySet: string; Entity: TJObject; SuccessProc: TXDataClientLoadProc; ErrorProc: TXDataClientErrorProc = nil); overload;\r\n {$IFDEF JSASYNC}\r\n function DeleteAsync(const EntitySet: string; Entity: TJObject): TXDataClientResponse; async;\r\n {$ENDIF}\r\n\r\n procedure List(const EntitySet: string; const Query: string = ''; const RequestId: string = 'list'); overload;\r\n procedure List(const EntitySet: string; const Query: string; SuccessProc: TXDataClientLoadProc; ErrorProc: TXDataClientErrorProc = nil); overload;\r\n {$IFDEF JSASYNC}\r\n function ListAsync(const EntitySet: string; const Query: string = ''): TXDataClientResponse; async;\r\n {$ENDIF}\r\n\r\n procedure RawInvoke(const OperationId: string; Args: array of JSValue; const Query: string; SuccessProc: TXDataClientLoadProc; ErrorProc: TXDataClientErrorProc = nil); overload;\r\n procedure RawInvoke(const OperationId: string; Args: array of JSValue; RequestId: string = ''); overload;\r\n procedure RawInvoke(const OperationId: string; Args: array of JSValue; SuccessProc: TXDataClientLoadProc; ErrorProc: TXDataClientErrorProc = nil); overload;\r\n {$IFDEF JSASYNC}\r\n function RawInvokeAsync(const OperationId: string; Args: array of JSValue): TXDataClientResponse; async; overload;\r\n function RawInvokeAsync(const OperationId: string; Args: array of JSValue; const Query: string): TXDataClientResponse; async; overload;\r\n {$ENDIF}\r\n\r\n// function Count(Clazz: TClass; const Query: string = ''): Integer;\r\n// function Service: T;\r\n published\r\n property Connection: TXDataWebConnection read FConnection write SetConnection;\r\n property OnLoad: TXDataClientLoadEvent read FOnLoad write FOnLoad;\r\n property OnError: TXDataClientErrorEvent read FOnError write FOnError;\r\n property OnRequest: TXDataClientRequestEvent read FOnRequest write FOnRequest;\r\n property ReferenceSolvingMode: TReferenceSolvingMode read FReferenceSolvingMode write FReferenceSolvingMode default rsAll;\r\n end;\r\n\r\n TXDataWebInvoker = class\r\n strict private\r\n FClient: TXDataWebClient;\r\n FAction: TXDataAction;\r\n FRequestId: string;\r\n FSuccessProc: TXDataClientLoadProc;\r\n FErrorProc: TXDataClientErrorProc;\r\n FAsyncMode: Boolean;\r\n protected\r\n procedure DoLoad(Response: TXDataClientResponse);\r\n procedure DoError(Response: IHttpResponse; RequestUrl, RequestId: string;\r\n ErrorMessage: string);\r\n property Action: TXDataAction read FAction;\r\n property RequestId: string read FRequestId write FRequestId;\r\n strict private\r\n function CreateHttpRequest: IHttpRequest;\r\n function RequestUrl(const RelativeUrl: string): string;\r\n strict private\r\n function BuildQueryString(Args: array of JSValue; BindingModeFilter: TBindingMode; const Query: string = ''): string;\r\n function GetPathParamValues(Args: array of JSValue): TStringDynArray;\r\n function BuildUrlRoute(Args: array of JSValue): string;\r\n procedure SetParamStreamBody(Req: IHttpRequest; const Args: array of JSValue; ArgIndex: Integer);\r\n procedure SetJsonParamsBody(Req: IHttpRequest; const Args: array of JSValue);\r\n procedure SetJsonObjectBody(Req: IHttpRequest; const Args: array of JSValue);\r\n procedure SetFormBody(Req: IHttpRequest; const Args: array of JSValue);\r\n procedure TransformParam(Param: TXDataParamDef; var Value: JSValue);\r\n public\r\n constructor Create(AClient: TXDataWebClient; AAction: TXDataAction;\r\n ASuccessProc: TXDataClientLoadProc; AErrorProc: TXDataClientErrorProc;\r\n AAsyncMode: Boolean); reintroduce;\r\n procedure Execute(const Args: array of JSValue; const Query: string = '');\r\n end;\r\n\r\n EXDataClientException = class(Exception)\r\n end;\r\n\r\n EXDataClientRequestException = class(EXDataClientException)\r\n private\r\n FErrorResult: TXDataClientError;\r\n public\r\n constructor Create(AClientError: TXDataClientError); reintroduce;\r\n property ErrorResult: TXDataClientError read FErrorResult;\r\n end;\r\n\r\n EXDataOperationRequestException = class(EXDataClientRequestException)\r\n end;\r\n\r\n EXDataWrongParameterCount = class(EXDataClientException)\r\n public\r\n constructor Create(Action: TXDataAction; PassedParameters: integer); reintroduce;\r\n end;\r\n\r\n EXDataWrongRouteParams = class(EXDataClientException)\r\n public\r\n constructor Create(Action: TXDataAction);\r\n end;\r\n\r\nimplementation\r\n\r\nuses\r\n Bcl.Utils,\r\n XData.Bind.Converter,\r\n XData.Utils;\r\n\r\n{ TXDataWebClient }\r\n\r\nprocedure TXDataWebClient.CheckConnection;\r\nbegin\r\n if not Assigned(FConnection) then\r\n raise EXDataClientException.Create('Missing XData Connection');\r\nend;\r\n\r\nprocedure TXDataWebClient.Delete(const EntitySet: string; Entity: TJObject;\r\n const RequestId: string = 'delete');\r\nbegin\r\n InternalDelete(EntitySet, Entity, RequestId, nil, nil);\r\nend;\r\n\r\nprocedure TXDataWebClient.Delete(const EntitySet: string; Entity: TJObject;\r\n SuccessProc: TXDataClientLoadProc; ErrorProc: TXDataClientErrorProc);\r\nbegin\r\n InternalDelete(EntitySet, Entity, 'delete', SuccessProc, ErrorProc);\r\nend;\r\n\r\n{$IFDEF JSASYNC}\r\nfunction TXDataWebClient.DeleteAsync(const EntitySet: string; Entity: TJObject): TXDataClientResponse;\r\nvar\r\n Promise: TJSPromise;\r\nbegin\r\n Promise := TJSPromise.new(\r\n procedure(resolve, reject: TJSPromiseResolver)\r\n begin\r\n InternalDelete(EntitySet, Entity, 'delete',\r\n procedure(Response: TXDataClientResponse)\r\n begin\r\n resolve(Response);\r\n end,\r\n procedure(Error: TXDataClientError)\r\n begin\r\n reject(EXDataClientRequestException.Create(Error));\r\n end,\r\n True\r\n );\r\n end\r\n );\r\n Exit(Promise);\r\nend;\r\n{$ENDIF}\r\n\r\nprocedure TXDataWebClient.DoError(Response: IHttpResponse; RequestUrl, RequestId: string;\r\n ErrorMessage: string; ErrorProc: TXDataClientErrorProc; AsyncMode: Boolean);\r\nvar\r\n ErrorCode: string;\r\n ClientError: TXDataClientError;\r\nbegin\r\n if Response = nil then\r\n Response := TDummyHttpResponse.Create;\r\n\r\n ErrorCode := '';\r\n if ErrorMessage = '' then\r\n ParseError(Response, ErrorCode, ErrorMessage);\r\n ClientError := TXDataClientError.Create(Self, Response, RequestUrl, ErrorCode, ErrorMessage, RequestId);\r\n\r\n if AsyncMode then\r\n begin\r\n if Assigned(FOnError) then\r\n FOnError(ClientError);\r\n if Assigned(ErrorProc) then\r\n ErrorProc(ClientError)\r\n else\r\n raise EXDataClientRequestException.Create(ClientError);\r\n end\r\n else\r\n begin\r\n if Assigned(ErrorProc) then\r\n begin\r\n ErrorProc(ClientError);\r\n Exit;\r\n end;\r\n\r\n if Assigned(FOnError) then\r\n FOnError(ClientError)\r\n else\r\n raise EXDataClientRequestException.Create(ClientError);\r\n end;\r\nend;\r\n\r\nprocedure TXDataWebClient.DoLoad(Response: TXDataClientResponse;\r\n SuccessProc: TXDataClientLoadProc; AsyncMode: Boolean);\r\nbegin\r\n try\r\n case ReferenceSolvingMode of\r\n rsAll: SolveReferences(Response.Result);\r\n end;\r\n\r\n if AsyncMode then\r\n begin\r\n if Assigned(FOnLoad) then\r\n FOnLoad(Response);\r\n if Assigned(SuccessProc) then\r\n SuccessProc(Response);\r\n end\r\n else\r\n begin\r\n if Assigned(SuccessProc) then\r\n begin\r\n SuccessProc(Response);\r\n Exit;\r\n end;\r\n if Assigned(FOnLoad) then\r\n FOnLoad(Response);\r\n end;\r\n finally\r\n if not AsyncMode then\r\n Response.Free;\r\n end;\r\nend;\r\n\r\nprocedure TXDataWebClient.DoRequest(Request: TXDataClientRequest);\r\nbegin\r\n try\r\n if Assigned(FOnRequest) then\r\n FOnRequest(Request);\r\n finally\r\n Request.Free;\r\n end;\r\nend;\r\n\r\nfunction TXDataWebClient.EntityTypeFromEntitySet(\r\n const EntitySetName: string): TXDataEntityType;\r\nbegin\r\n Result := nil;\r\n Result := Model.GetEntitySet(EntitySetName).EntityType;\r\n\r\n if Result = nil then\r\n raise EXDataClientException.CreateFmt('Invalid entity set \"%s\"', [EntitySetName]);\r\nend;\r\n\r\nprocedure TXDataWebClient.Get(const EntitySet: string; Id: JSValue;\r\n const RequestId: string = 'get');\r\nbegin\r\n Get(EntitySet, '', id, RequestId);\r\nend;\r\n\r\nprocedure TXDataWebClient.Get(const EntitySet, QueryString: string; Id: JSValue;\r\n const RequestId: string);\r\nbegin\r\n InternalGet(EntitySet, QueryString, Id, RequestId, nil, nil);\r\nend;\r\n\r\nprocedure TXDataWebClient.Get(const EntitySet: string; Id: JSValue;\r\n SuccessProc: TXDataClientLoadProc; ErrorProc: TXDataClientErrorProc);\r\nbegin\r\n InternalGet(EntitySet, '', Id, 'get', SuccessProc, ErrorProc);\r\nend;\r\n\r\nfunction TXDataWebClient.GetNavPropValue(Entity: JSValue;\r\n Prop: TXDataNavigationProperty): JSValue;\r\nbegin\r\n Result := TJSObject(Entity)[Prop.Name];\r\nend;\r\n\r\nfunction TXDataWebClient.GetPropValue(Entity: JSValue;\r\n Prop: TXDataSimpleProperty): JSValue;\r\nbegin\r\n Result := TJSObject(Entity)[Prop.Name];\r\nend;\r\n\r\nprocedure TXDataWebClient.InternalDelete(const EntitySet: string;\r\n Entity: TJObject; const RequestId: string; SuccessProc: TXDataClientLoadProc;\r\n ErrorProc: TXDataClientErrorProc; AsyncMode: Boolean = False);\r\nvar\r\n Req: IHttpRequest;\r\n RequestUri: string;\r\n\r\n procedure LocalSuccess(Resp: IHttpResponse);\r\n begin\r\n if Resp.StatusCode = 204 then\r\n DoLoad(TXDataClientResponse.Create(Self, Resp, JS.NULL, rtDelete, RequestId), SuccessProc, AsyncMode)\r\n else\r\n DoError(Resp, RequestUri, RequestId, '', ErrorProc, AsyncMode);\r\n end;\r\n\r\n procedure LocalError;\r\n begin\r\n DoError(nil, RequestUri, RequestId, '', ErrorProc, AsyncMode);\r\n end;\r\n\r\nbegin\r\n RequestUri := RequestUrl(TBclUtils.PercentEncode(\r\n Model.CanonicalUrlFromEntity(EntityTypeFromEntitySet(EntitySet), Entity,\r\n @GetPropValue, @GetNavPropValue)));\r\n\r\n Req := THttpRequest.Create(RequestUri, 'DELETE');\r\n DoRequest(TXDataClientRequest.Create(Self, Req, rtDelete, RequestId));\r\n Send(Req, @LocalSuccess, @LocalError);\r\nend;\r\n\r\nprocedure TXDataWebClient.InternalGet(const EntitySet, QueryString: string;\r\n Id: JSValue; const RequestId: string; SuccessProc: TXDataClientLoadProc;\r\n ErrorProc: TXDataClientErrorProc; AsyncMode: Boolean = False);\r\nvar\r\n RequestUri: string;\r\n\r\n procedure LocalSuccess(Resp: IHttpResponse);\r\n var\r\n JsonResult: JSValue;\r\n begin\r\n if Resp.StatusCode = 200 then\r\n begin\r\n JsonResult := TJSJSON.parse(Resp.ContentAsText);\r\n if isObject(JsonResult) then\r\n DoLoad(TXDataClientResponse.Create(Self, Resp, JsonResult, rtGet, RequestId), SuccessProc, AsyncMode)\r\n else\r\n DoError(Resp, RequestUri, RequestId, 'Invalid JSON object from GET request', ErrorProc, AsyncMode);\r\n end\r\n else\r\n if Resp.StatusCode = 404 then\r\n DoLoad(TXDataClientResponse.Create(Self, Resp, JS.NULL, rtGet, RequestId), SuccessProc, AsyncMode)\r\n else\r\n DoError(Resp, RequestUri, RequestId, '', ErrorProc, AsyncMode);\r\n end;\r\n\r\n procedure LocalError;\r\n begin\r\n DoError(nil, RequestUri, RequestId, '', ErrorProc, AsyncMode);\r\n end;\r\n\r\nvar\r\n Req: IHttpRequest;\r\nbegin\r\n RequestUri := RequestUrl(TBclUtils.PercentEncode(\r\n Model.CanonicalUrlFromId(EntityTypeFromEntitySet(EntitySet), Id)));\r\n if QueryString <> '' then\r\n RequestUri := RequestUri + '?' + QueryString;\r\n\r\n Req := THttpRequest.Create(RequestUri);\r\n DoRequest(TXDataClientRequest.Create(Self, Req, rtGet, RequestId));\r\n Send(Req, @LocalSuccess, @LocalError);\r\nend;\r\n\r\nprocedure TXDataWebClient.InternalList(const EntitySet, Query,\r\n RequestId: string; SuccessProc: TXDataClientLoadProc;\r\n ErrorProc: TXDataClientErrorProc; AsyncMode: Boolean);\r\nvar\r\n RequestUri: string;\r\n\r\n procedure LocalSuccess(Resp: IHttpResponse);\r\n var\r\n JsonResult: JSValue;\r\n ObjResult: TJSObject;\r\n Count: Integer;\r\n begin\r\n if Resp.StatusCode = 200 then\r\n begin\r\n JsonResult := TJSJSON.parse(Resp.ContentAsText);\r\n if isObject(JsonResult) and isArray(TJSObject(JsonResult)['value']) then\r\n begin\r\n ObjResult := TJSObject(JsonResult);\r\n if ObjResult.hasOwnProperty('@xdata.count') then\r\n Count := Integer(ObjResult['@xdata.count'])\r\n else\r\n Count := 0;\r\n DoLoad(TXDataClientResponse.Create(Self, Resp, ObjResult['value'], rtList, RequestId, Count), SuccessProc, AsyncMode);\r\n end\r\n else\r\n DoError(Resp, RequestUri, RequestId, 'Invalid JSON array from LIST request', ErrorProc, AsyncMode);\r\n end\r\n else\r\n DoError(Resp, RequestUri, RequestId, '', ErrorProc, AsyncMode);\r\n end;\r\n\r\n procedure LocalError;\r\n begin\r\n DoError(nil, RequestUri, RequestId, '', ErrorProc, AsyncMode);\r\n end;\r\n\r\nvar\r\n Req: IHttpRequest;\r\nbegin\r\n RequestUri := RequestUrl(TBclUtils.PercentEncode(\r\n Model.EntitySetUrl(Model.GetEntitySet(EntitySet))));\r\n if Query <> '' then\r\n RequestUri := RequestUri + '?' + Query;\r\n\r\n Req := THttpRequest.Create(RequestUri);\r\n DoRequest(TXDataClientRequest.Create(Self, Req, rtList, RequestId));\r\n Send(Req, @LocalSuccess, @LocalError);\r\nend;\r\n\r\nprocedure TXDataWebClient.InternalPost(const EntitySet: string;\r\n Entity: TJObject; const RequestId: string; SuccessProc: TXDataClientLoadProc;\r\n ErrorProc: TXDataClientErrorProc; AsyncMode: Boolean = False);\r\nvar\r\n RequestUri: string;\r\n\r\n procedure LocalSuccess(Resp: IHttpResponse);\r\n var\r\n Value: JSValue;\r\n Obj: TJSObject;\r\n EntityType: TXDataEntityType;\r\n I: Integer;\r\n Prop: string;\r\n begin\r\n // SetIdFromResponse\r\n if Resp.StatusCode = 201 then\r\n begin\r\n // Get the resulted object and set the id from the result\r\n Value := TJSJSON.parse(Resp.ContentAsText);\r\n if IsObject(Value) then\r\n begin\r\n Obj := ToObject(Value);\r\n EntityType := EntityTypeFromEntitySet(EntitySet);\r\n for I := 0 to EntityType.Key.Count - 1 do\r\n begin\r\n Prop := EntityType.Key[I].Name;\r\n if not IsNull(Obj[Prop]) then\r\n Entity[Prop] := Obj[Prop];\r\n end;\r\n end;\r\n\r\n DoLoad(TXDataClientResponse.Create(Self, Resp, TJSJSON.parse(Resp.ContentAsText), rtPost, RequestId), SuccessProc, AsyncMode);\r\n end\r\n else\r\n DoError(Resp, RequestUri, RequestId, '', ErrorProc, AsyncMode);\r\n end;\r\n\r\n procedure LocalError;\r\n begin\r\n DoError(nil, RequestUri, RequestId, '', ErrorProc, AsyncMode);\r\n end;\r\n\r\nvar\r\n Req: IHttpRequest;\r\nbegin\r\n RequestUri := RequestUrl(TBclUtils.PercentEncode(\r\n Model.EntitySetUrl(Model.GetEntitySet(EntitySet))\r\n ));\r\n\r\n Req := THttpRequest.Create(RequestUri, 'POST');\r\n Req.Headers.SetValue('content-type', 'application/json');\r\n Req.Content := TJSJson.stringify(Entity);\r\n DoRequest(TXDataClientRequest.Create(Self, Req, rtPost, RequestId));\r\n Send(Req, @LocalSuccess, @LocalError);\r\nend;\r\n\r\nprocedure TXDataWebClient.InternalPut(const EntitySet: string; Entity: TJObject;\r\n const RequestId: string; SuccessProc: TXDataClientLoadProc;\r\n ErrorProc: TXDataClientErrorProc; AsyncMode: Boolean = False);\r\nvar\r\n RequestUri: string;\r\n\r\n procedure LocalSuccess(Resp: IHttpResponse);\r\n begin\r\n if Resp.StatusCode = 200 then\r\n DoLoad(TXDataClientResponse.Create(Self, Resp, JS.NULL, rtPut, RequestId), SuccessProc, AsyncMode)\r\n else\r\n DoError(Resp, RequestUri, RequestId, '', ErrorProc, AsyncMode);\r\n end;\r\n\r\n procedure LocalError;\r\n begin\r\n DoError(nil, RequestUri, RequestId, '', ErrorProc, AsyncMode);\r\n end;\r\n\r\nvar\r\n Req: IHttpRequest;\r\nbegin\r\n RequestUri := RequestUrl(TBclUtils.PercentEncode(\r\n Model.CanonicalUrlFromEntity(EntityTypeFromEntitySet(EntitySet), Entity,\r\n @GetPropValue, @GetNavPropValue)));\r\n\r\n Req := THttpRequest.Create(RequestUri, 'PUT');\r\n Req.Headers.SetValue('content-type', 'application/json');\r\n Req.Content := TJSJson.stringify(Entity);\r\n DoRequest(TXDataClientRequest.Create(Self, Req, rtPut, RequestId));\r\n Send(Req, @LocalSuccess, @LocalError);\r\nend;\r\n\r\nprocedure TXDataWebClient.InternalRawInvoke(const OperationId: string;\r\n Args: array of JSValue; const Query: string; RequestId: string;\r\n SuccessProc: TXDataClientLoadProc; ErrorProc: TXDataClientErrorProc; AsyncMode: Boolean = False);\r\nvar\r\n Invoker: TXDataWebInvoker;\r\n Action: TXDataAction;\r\nbegin\r\n if RequestId = '' then\r\n RequestId := OperationId;\r\n\r\n Action := Model.FindActionByOperationId(OperationId);\r\n if Action = nil then\r\n raise EXDataClientException.CreateFmt('Operation \"%s\" not found', [OperationId]);\r\n\r\n Invoker := TXDataWebInvoker.Create(Self, Action, SuccessProc, ErrorProc, AsyncMode);\r\n Invoker.RequestId := RequestId;\r\n Invoker.Execute(Args, Query);\r\nend;\r\n\r\nprocedure TXDataWebClient.List(const EntitySet, Query: string;\r\n SuccessProc: TXDataClientLoadProc; ErrorProc: TXDataClientErrorProc);\r\nbegin\r\n InternalList(EntitySet, Query, 'list', SuccessProc, ErrorProc);\r\nend;\r\n\r\nprocedure TXDataWebClient.List(const EntitySet, Query: string; const RequestId: string = 'list');\r\nbegin\r\n InternalList(EntitySet, Query, RequestId, nil, nil);\r\nend;\r\n\r\n{$IFDEF JSASYNC}\r\nfunction TXDataWebClient.ListAsync(const EntitySet: string; const Query: string = ''): TXDataClientResponse;\r\nvar\r\n Promise: TJSPromise;\r\nbegin\r\n Promise := TJSPromise.new(\r\n procedure(resolve, reject: TJSPromiseResolver)\r\n begin\r\n InternalList(EntitySet, Query, 'list',\r\n procedure(Response: TXDataClientResponse)\r\n begin\r\n resolve(Response);\r\n end,\r\n procedure(Error: TXDataClientError)\r\n begin\r\n reject(EXDataClientRequestException.Create(Error));\r\n end,\r\n True\r\n );\r\n end\r\n );\r\n Exit(Promise);\r\nend;\r\n{$ENDIF}\r\n\r\nfunction TXDataWebClient.Model: TXDataModel;\r\nbegin\r\n CheckConnection;\r\n if not Assigned(Connection.Model) then\r\n raise EXDataClientException.Create('TXDataWebConnection is not connected');\r\n Result := Connection.Model;\r\nend;\r\n\r\nprocedure TXDataWebClient.Notification(AComponent: TComponent;\r\n Operation: TOperation);\r\nbegin\r\n inherited;\r\n if (Operation = opRemove) and (AComponent = FConnection) then\r\n Connection := nil;\r\nend;\r\n\r\nprocedure TXDataWebClient.ParseError(Response: IHttpResponse; var ErrorCode,\r\n ErrorMessage: string);\r\nvar\r\n ErrorResult: JSValue;\r\n ErrorObject: TJSObject;\r\nbegin\r\n ErrorCode := '';\r\n ErrorMessage := Response.StatusReason;\r\n if SameText(Response.Headers.Get('content-type'), 'application/json') then\r\n begin\r\n ErrorResult := JS.Null;\r\n try\r\n ErrorResult := TJSJson.parse(Response.ContentAsText);\r\n except\r\n end;\r\n if IsObject(ErrorResult) and IsObject(TJSObject(ErrorResult)['error']) then\r\n begin\r\n ErrorObject := TJSObject(TJSObject(ErrorResult)['error']);\r\n ErrorCode := JS.ToString(ErrorObject['code']);\r\n ErrorMessage := JS.ToString(ErrorObject['message']);\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TXDataWebClient.Post(const EntitySet: string; Entity: TJObject;\r\n SuccessProc: TXDataClientLoadProc; ErrorProc: TXDataClientErrorProc);\r\nbegin\r\n InternalPost(EntitySet, Entity, 'post', SuccessProc, ErrorProc);\r\nend;\r\n\r\nprocedure TXDataWebClient.Post(const EntitySet: string; Entity: TJObject;\r\n const RequestId: string = 'post');\r\nbegin\r\n InternalPost(EntitySet, Entity, RequestId, nil, nil);\r\nend;\r\n\r\n{$IFDEF JSASYNC}\r\nfunction TXDataWebClient.PostAsync(const EntitySet: string; Entity: TJObject): TXDataClientResponse;\r\nvar\r\n Promise: TJSPromise;\r\nbegin\r\n Promise := TJSPromise.new(\r\n procedure(resolve, reject: TJSPromiseResolver)\r\n begin\r\n InternalPost(EntitySet, Entity, 'post',\r\n procedure(Response: TXDataClientResponse)\r\n begin\r\n resolve(Response);\r\n end,\r\n procedure(Error: TXDataClientError)\r\n begin\r\n reject(EXDataClientRequestException.Create(Error));\r\n end,\r\n True\r\n );\r\n end\r\n );\r\n Exit(Promise);\r\nend;\r\n{$ENDIF}\r\n\r\nprocedure TXDataWebClient.Put(const EntitySet: string; Entity: TJObject;\r\n const RequestId: string = 'put');\r\nbegin\r\n InternalPut(EntitySet, Entity, RequestId, nil, nil);\r\nend;\r\n\r\nprocedure TXDataWebClient.RawInvoke(const OperationId: string;\r\n Args: array of JSValue; const Query: string;\r\n SuccessProc: TXDataClientLoadProc; ErrorProc: TXDataClientErrorProc);\r\nbegin\r\n InternalRawInvoke(OperationId, Args, Query, '', SuccessProc, ErrorProc);\r\nend;\r\n\r\nprocedure TXDataWebClient.RawInvoke(const OperationId: string;\r\n Args: array of JSValue; RequestId: string);\r\nbegin\r\n InternalRawInvoke(OperationId, Args, '', RequestId, nil, nil);\r\nend;\r\n\r\nprocedure TXDataWebClient.RawInvoke(const OperationId: string;\r\n Args: array of JSValue; SuccessProc: TXDataClientLoadProc;\r\n ErrorProc: TXDataClientErrorProc);\r\nbegin\r\n InternalRawInvoke(OperationId, Args, '', '', SuccessProc, ErrorProc);\r\nend;\r\n\r\n{$IFDEF JSASYNC}\r\nfunction TXDataWebClient.RawInvokeAsync(const OperationId: string;\r\n Args: array of JSValue): TXDataClientResponse;\r\nvar\r\n Promise: TJSPromise;\r\nbegin\r\n Promise := TJSPromise.new(\r\n procedure(resolve, reject: TJSPromiseResolver)\r\n begin\r\n InternalRawInvoke(OperationId, Args, '', '',\r\n procedure(Response: TXDataClientResponse)\r\n begin\r\n resolve(Response);\r\n end,\r\n procedure(Error: TXDataClientError)\r\n begin\r\n reject(EXDataClientRequestException.Create(Error));\r\n end,\r\n True\r\n );\r\n end\r\n );\r\n Exit(Promise);\r\nend;\r\n\r\nfunction TXDataWebClient.RawInvokeAsync(const OperationId: string;\r\n Args: array of JSValue; const Query: string): TXDataClientResponse;\r\nvar\r\n Promise: TJSPromise;\r\nbegin\r\n Promise := TJSPromise.new(\r\n procedure(resolve, reject: TJSPromiseResolver)\r\n begin\r\n InternalRawInvoke(OperationId, Args, Query, '',\r\n procedure(Response: TXDataClientResponse)\r\n begin\r\n resolve(Response);\r\n end,\r\n procedure(Error: TXDataClientError)\r\n begin\r\n reject(EXDataClientRequestException.Create(Error));\r\n end,\r\n True\r\n );\r\n end\r\n );\r\n Exit(Promise);\r\nend;\r\n{$ENDIF}\r\n\r\nfunction TXDataWebClient.RequestUrl(const RelativeUrl: string): string;\r\nbegin\r\n Result := TXDataUtils.CombineUrlFast(Self.Url, RelativeUrl);\r\nend;\r\n\r\nprocedure TXDataWebClient.Send(Req: IHttpRequest; SuccessProc: THttpResponseProc;\r\n ErrorProc: THttpErrorProc);\r\nbegin\r\n Connection.SendRequest(Req, SuccessProc, ErrorProc);\r\nend;\r\n\r\nprocedure TXDataWebClient.SetConnection(const Value: TXDataWebConnection);\r\nbegin\r\n if Value <> FConnection then\r\n begin\r\n if FConnection <> nil then\r\n FConnection.RemoveFreeNotification(Self);\r\n FConnection := Value;\r\n if FConnection <> nil then\r\n FConnection.FreeNotification(Self);\r\n end;\r\nend;\r\n\r\n//procedure TXDataWebClient.SetIdFromResponse(Entity: TObject; Req: THttpRequest;\r\n// Resp: THttpResponse);\r\n//var\r\n// Uri: TUri;\r\n// Len: integer;\r\n// IdValue: Variant;\r\n// Clazz: TClass;\r\n//begin\r\n// if not Resp.Headers.Exists('location') then\r\n// raise EXDataMissingLocationHeader.Create(Req.Uri);\r\n// Uri := TUri.Create(Resp.Headers.Get('location'));\r\n// try\r\n// Len := Length(Uri.Segments);\r\n// if Len = 0 then\r\n// raise EXDataInvalidLocationHeader.Create(Req.Uri, Resp.Headers.Get('location'));\r\n// Clazz := Entity.ClassType;\r\n// Model.ParseCanonicalUrl(Uri.Segments[Len - 1], Clazz, IdValue);\r\n// finally\r\n// Uri.Free;\r\n// end;\r\n//\r\n// // If the server generates the id, the set it now\r\n// if not FModel.Explorer.GetId(Clazz).IsUserAssignedId then\r\n// FModel.Explorer.SetIdValue(Entity, IdValue);\r\n//end;\r\n\r\nprocedure TXDataWebClient.SolveReferences(json: JSValue);\r\nasm\r\n var byid = {}, // all objects by id\r\n refs = []; // references to objects that could not be resolved\r\n json = (function recurse(obj, prop, parent) {\r\n if (typeof obj !== 'object' || !obj) // a primitive value\r\n return obj;\r\n if (Object.prototype.toString.call(obj) === '[object Array]') {\r\n for (var i = 0; i < obj.length; i++)\r\n // check also if the array element is not a primitive value\r\n if (typeof obj[i] !== 'object' || !obj[i]) // a primitive value\r\n continue;\r\n else if (\"$ref\" in obj[i])\r\n obj[i] = recurse(obj[i], i, obj);\r\n else\r\n obj[i] = recurse(obj[i], prop, obj);\r\n return obj;\r\n }\r\n if (\"$ref\" in obj) { // a reference\r\n var ref = obj.$ref;\r\n if (ref in byid)\r\n return byid[ref];\r\n // else we have to make it lazy:\r\n refs.push([parent, prop, ref]);\r\n return;\r\n } else if (\"$id\" in obj) {\r\n var id = obj.$id;\r\n delete obj.$id;\r\n if (\"$values\" in obj) // an array\r\n obj = obj.$values.map(recurse);\r\n else // a plain object\r\n for (var p in obj)\r\n obj[p] = recurse(obj[p], p, obj);\r\n byid[id] = obj;\r\n }\r\n return obj;\r\n })(json); // run it!\r\n\r\n for (var i = 0; i < refs.length; i++) { // resolve previously unknown references\r\n var ref = refs[i];\r\n ref[0][ref[1]] = byid[ref[2]];\r\n // Notice that this throws if you put in a reference at top-level\r\n }\r\nend;\r\n\r\nfunction TXDataWebClient.Url: string;\r\nbegin\r\n CheckConnection;\r\n Result := Connection.URL;\r\nend;\r\n\r\nprocedure TXDataWebClient.Get(const EntitySet, QueryString: string; Id: JSValue;\r\n SuccessProc: TXDataClientLoadProc; ErrorProc: TXDataClientErrorProc);\r\nbegin\r\n InternalGet(EntitySet, QueryString, Id, 'get', SuccessProc, ErrorProc);\r\nend;\r\n\r\n{$IFDEF JSASYNC}\r\nfunction TXDataWebClient.GetAsync(const EntitySet, QueryString: string;\r\n Id: JSValue): TXDataClientResponse;\r\nvar\r\n Promise: TJSPromise;\r\nbegin\r\n Promise := TJSPromise.new(\r\n procedure(resolve, reject: TJSPromiseResolver)\r\n begin\r\n InternalGet(EntitySet, QueryString, Id, 'get',\r\n procedure(Response: TXDataClientResponse)\r\n begin\r\n resolve(Response);\r\n end,\r\n procedure(Error: TXDataClientError)\r\n begin\r\n reject(EXDataClientRequestException.Create(Error));\r\n end,\r\n True\r\n );\r\n end\r\n );\r\n Exit(Promise);\r\nend;\r\n{$ENDIF}\r\n\r\n{$IFDEF JSASYNC}\r\nfunction TXDataWebClient.GetAsync(const EntitySet: string;\r\n Id: JSValue): TXDataClientResponse;\r\nbegin\r\n Result := await(GetAsync(EntitySet, '', Id));\r\nend;\r\n{$ENDIF}\r\n\r\nprocedure TXDataWebClient.Put(const EntitySet: string; Entity: TJObject;\r\n SuccessProc: TXDataClientLoadProc; ErrorProc: TXDataClientErrorProc);\r\nbegin\r\n InternalPut(EntitySet, Entity, 'put', SuccessProc, ErrorProc);\r\nend;\r\n\r\n{$IFDEF JSASYNC}\r\nfunction TXDataWebClient.PutAsync(const EntitySet: string; Entity: TJObject): TXDataClientResponse;\r\nvar\r\n Promise: TJSPromise;\r\nbegin\r\n Promise := TJSPromise.new(\r\n procedure(resolve, reject: TJSPromiseResolver)\r\n begin\r\n InternalPut(EntitySet, Entity, 'put',\r\n procedure(Response: TXDataClientResponse)\r\n begin\r\n resolve(Response);\r\n end,\r\n procedure(Error: TXDataClientError)\r\n begin\r\n reject(EXDataClientRequestException.Create(Error));\r\n end,\r\n True\r\n );\r\n end\r\n );\r\n Exit(Promise);\r\nend;\r\n{$ENDIF}\r\n\r\n{ TXDataClientResponse }\r\n\r\nconstructor TXDataClientResponse.Create(AClient: TXDataWebClient; AResponse: IHttpResponse;\r\n AResult: JSValue; ARequestType: TXDataClientRequestType; ARequestId: string; ACount: Integer = 0);\r\nbegin\r\n FResponse := AResponse;\r\n FResult := AResult;\r\n FRequestType := ARequestType;\r\n FRequestId := ARequestId;\r\n FCount := ACount;\r\n FClient := AClient;\r\nend;\r\n\r\nfunction TXDataClientResponse.GetResponseText: string;\r\nbegin\r\n Result := Response.ContentAsText;\r\nend;\r\n\r\nfunction TXDataClientResponse.GetStatusCode: Integer;\r\nbegin\r\n Result := Response.StatusCode;\r\nend;\r\n\r\nfunction TXDataClientResponse.GetResultAsArray: TJSArray;\r\nbegin\r\n Result := JS.ToArray(Self.FResult);\r\nend;\r\n\r\nfunction TXDataClientResponse.GetResultAsObject: TJSObject;\r\nbegin\r\n Result := JS.ToObject(Self.FResult);\r\nend;\r\n\r\n{ EXDataClientRequestException }\r\n\r\nconstructor EXDataClientRequestException.Create(AClientError: TXDataClientError);\r\nvar\r\n Msg: string;\r\nbegin\r\n FErrorResult := AClientError;\r\n Msg := 'XData server request error.' + sLineBreak + 'Uri: ' + AClientError.RequestUrl;\r\n Msg := Msg + sLineBreak + 'Status code: ' + IntToStr(AClientError.StatusCode);\r\n if AClientError.ErrorCode <> '' then\r\n Msg := Msg + sLineBreak + 'Error Code: ' + AClientError.ErrorCode;\r\n if AClientError.ErrorMessage <> '' then\r\n Msg := Msg + sLineBreak + AClientError.ErrorMessage;\r\n inherited Create(Msg);\r\nend;\r\n\r\n{ TXDataClientError }\r\n\r\nconstructor TXDataClientError.Create(AClient: TXDataWebClient; AResponse: IHttpResponse;\r\n const ARequestUrl, AErrorCode, AErrorMessage, ARequestId: string);\r\nbegin\r\n FResponse := AResponse;\r\n FErrorCode := AErrorCode;\r\n FErrorMessage := AErrorMessage;\r\n FRequestId := ARequestId;\r\n FRequestUrl := ARequestUrl;\r\n FClient := AClient;\r\nend;\r\n\r\nfunction TXDataClientError.GetStatusCode: Integer;\r\nbegin\r\n Result := Response.StatusCode;\r\nend;\r\n\r\n{ TXDataClientRequest }\r\n\r\nconstructor TXDataClientRequest.Create(AClient: TXDataWebClient;\r\n ARequest: IHttpRequest; ARequestType: TXDataClientRequestType;\r\n ARequestId: string);\r\nbegin\r\n FRequest := ARequest;\r\n FRequestType := ARequestType;\r\n FRequestId := ARequestId;\r\n FClient := AClient;\r\nend;\r\n\r\n{ TXDataWebInvoker }\r\n\r\nfunction TXDataWebInvoker.GetPathParamValues(Args: array of JSValue): TStringDynArray;\r\nvar\r\n I: Integer;\r\n Param: TXDataParamDef;\r\n ParamIndex: Integer;\r\nbegin\r\n ParamIndex := 0;\r\n SetLength(Result, Action.Parameters.Count);\r\n for I := 0 to Action.Parameters.Count - 1 do\r\n if Action.Parameters[I].BindingMode = TBindingMode.FromPath then\r\n begin\r\n Param := Action.Parameters[I];\r\n if Param.Input and (I <= Length(Args)) then\r\n begin\r\n Result[ParamIndex] :=\r\n TBclUtils.PercentEncode(\r\n BindValueToUrl(Args[I], Param.Name, nil {Param.RttiType.Handle}, Param.UrlConverter)\r\n );\r\n Inc(ParamIndex);\r\n end;\r\n end;\r\n Result := Copy(Result, 0, ParamIndex);\r\nend;\r\n\r\nfunction TXDataWebInvoker.BuildUrlRoute(Args: array of JSValue): string;\r\nvar\r\n PathParamValues: TStringDynArray;\r\n UsedParamValues: array of Boolean;\r\n\r\n procedure AddRouteSegments(RouteInfo: TXDataRouteInfo);\r\n var\r\n I: Integer;\r\n begin\r\n for I := 0 to RouteInfo.SegmentCount - 1 do\r\n begin\r\n if RouteInfo.Segments[I].IsParam then\r\n begin\r\n // Segment is a path param\r\n if RouteInfo.Segments[I].ParamIndex < Length(PathParamValues) then\r\n Result := Result + PathParamValues[RouteInfo.Segments[I].ParamIndex]\r\n else\r\n raise EXDataWrongRouteParams.Create(Action);\r\n UsedParamValues[RouteInfo.Segments[I].ParamIndex] := True;\r\n end\r\n else\r\n Result := Result + RouteInfo.Segments[I].Value;\r\n Result := Result + '/';\r\n end;\r\n end;\r\n\r\nvar\r\n I: Integer;\r\nbegin\r\n PathParamValues := GetPathParamValues(Args);\r\n SetLength(UsedParamValues, Length(PathParamValues));\r\n Result := '';\r\n\r\n AddRouteSegments(Action.RouteInfo);\r\n\r\n for I := 0 to Length(UsedParamValues) - 1 do\r\n if not UsedParamValues[I] then\r\n Result := Result + PathParamValues[I] + '/';\r\nend;\r\n\r\nfunction TXDataWebInvoker.BuildQueryString(Args: array of JSValue; BindingModeFilter: TBindingMode; const Query: string): string;\r\nvar\r\n QueryString: string;\r\n\r\n procedure WriteQueryParam(const Name, Value: string);\r\n begin\r\n if QueryString <> '' then\r\n QueryString := QueryString + '&';\r\n QueryString := QueryString + TBclUtils.PercentEncode(Name) +\r\n '=' + TBclUtils.PercentEncode(Value);\r\n end;\r\n\r\n procedure WriteObjectToQuery(Obj: TJSObject; AType: TXDataStructuredType);\r\n var\r\n I: Integer;\r\n Prop: TXDataScalarProperty;\r\n Value: JSValue;\r\n begin\r\n if Obj = nil then Exit;\r\n\r\n for I := 0 to AType.ScalarPropertyCount - 1 do\r\n begin\r\n Prop := AType.GetScalarProperty(I);\r\n Value := Obj[Prop.Name];\r\n if not JS.IsUndefined(Value) then\r\n WriteQueryParam(Prop.Name,\r\n BindValueToUrl(Value, Prop.Name, nil {PropInfo.RttiInfo.RealType.Handle}, Prop.UrlConverter));\r\n end;\r\n end;\r\n\r\nvar\r\n I: Integer;\r\n Param: TXDataParamDef;\r\nbegin\r\n // set query string (parameters that are defined to be in uri query string)\r\n QueryString := Query;\r\n for I := 0 to Action.Parameters.Count - 1 do\r\n if Action.Parameters[I].BindingMode = BindingModeFilter then\r\n begin\r\n Param := Action.Parameters[I];\r\n if Param.Input and (I <= Length(Args)) then\r\n begin\r\n if Param.ParamType is TXDataStructuredType then\r\n begin\r\n Assert(JS.IsObject(Args[I]));\r\n WriteObjectToQuery(Js.ToObject(Args[I]), TXDataStructuredType(Param.ParamType));\r\n end\r\n else\r\n WriteQueryParam(Param.Name, BindValueToUrl(Args[I], Param.Name, nil {Param.RttiType.Handle}, Param.UrlConverter));\r\n end;\r\n end;\r\n Result := QueryString;\r\nend;\r\n\r\nconstructor TXDataWebInvoker.Create(AClient: TXDataWebClient; AAction: TXDataAction;\r\n ASuccessProc: TXDataClientLoadProc; AErrorProc: TXDataClientErrorProc; AAsyncMode: Boolean);\r\nbegin\r\n FClient := AClient;\r\n FAction := AAction;\r\n FSuccessProc := ASuccessProc;\r\n FErrorProc := AErrorProc;\r\n FAsyncMode := AAsyncMode;\r\nend;\r\n\r\nfunction TXDataWebInvoker.CreateHttpRequest: IHttpRequest;\r\nbegin\r\n Result := THttpRequest.Create;\r\nend;\r\n\r\nprocedure TXDataWebInvoker.DoError(Response: IHttpResponse; RequestUrl,\r\n RequestId, ErrorMessage: string);\r\nbegin\r\n FClient.DoError(Response, RequestUrl, RequestId, ErrorMessage, FErrorProc, FAsyncMode);\r\nend;\r\n\r\nprocedure TXDataWebInvoker.DoLoad(Response: TXDataClientResponse);\r\nbegin\r\n FClient.DoLoad(Response, FSuccessProc, FAsyncMode);\r\nend;\r\n\r\nprocedure TXDataWebInvoker.Execute(const Args: array of JSValue; const Query: string);\r\nvar\r\n RequestUrl: string;\r\n\r\n procedure OnSuccess(Resp: IHttpResponse);\r\n var\r\n ResultValue: JSValue;\r\n JsonResult: JSValue;\r\n begin\r\n // check errors\r\n if (Resp.StatusCode <> 200) and (Resp.StatusCode <> 204) and (Resp.StatusCode <> 404) then\r\n begin\r\n DoError(Resp, RequestUrl, RequestId, '');\r\n Exit;\r\n end;\r\n\r\n // has content\r\n if Action.IsResultStream then\r\n begin\r\n if Resp.StatusCode = 404 then\r\n DoError(Resp, RequestUrl, RequestId, '')\r\n else\r\n begin\r\n ResultValue := Resp.Content; //TBytesStream.Create(Resp.ContentAsBytes);\r\n DoLoad(TXDataClientResponse.Create(FClient, Resp, ResultValue, rtRawInvoke, RequestId));\r\n end;\r\n end\r\n else\r\n if Action.IsResultCriteria then\r\n begin\r\n DoError(Resp, RequestUrl, RequestId, 'TCriteria result yet not supported in TXDataClient');\r\n end\r\n else\r\n begin\r\n if (Resp.StatusCode <> 204) then\r\n begin\r\n JsonResult := TJSJSON.parse(Resp.ContentAsText)\r\n end\r\n else\r\n JsonResult := JS.Null;\r\n DoLoad(TXDataClientResponse.Create(FClient, Resp, JsonResult, rtRawInvoke, RequestId));\r\n end;\r\n end;\r\n\r\n procedure LocalError;\r\n begin\r\n DoError(nil, RequestUrl, RequestId, '');\r\n end;\r\n\r\nvar\r\n Req: IHttpRequest;\r\n QueryString: string;\r\n SingleBodyParamIndex: Integer;\r\nbegin\r\n // check number of parameters\r\n // note that first item in Args array is not the parameter, but instead always the interface pointer\r\n// if Action.Parameters.Count <> Length(Args) then\r\n// raise EXDataWrongParameterCount.Create(Action, Length(Args));\r\n\r\n// Resp := nil;\r\n Req := CreateHttpRequest;\r\n\r\n // Set request uri, method and other parameters before setting message body\r\n // TODO: Later Uri must be defined based on a more advanced routing system\r\n QueryString := BuildQueryString(Args, TBindingMode.FromURI, Query);\r\n RequestUrl := BuildUrlRoute(Args);\r\n if QueryString <> '' then\r\n RequestUrl := RequestUrl + '?' + QueryString;\r\n RequestUrl := Self.RequestUrl(RequestUrl);\r\n Req.Uri := RequestUrl;\r\n Req.Method := Action.HttpMethod;\r\n\r\n if Action.IsResultStream then\r\n Req.ResponseType := 'blob';\r\n\r\n if Action.IsParamStream then\r\n SetParamStreamBody(Req, Args, Action.ParamStreamIndex)\r\n else\r\n if Action.BodyParamCount > 0 then\r\n begin\r\n // Set content (parameters that are defined to be in the message body)\r\n if Action.IsFormContent then\r\n SetFormBody(Req, Args)\r\n else\r\n begin\r\n // Check for special case: single parameter object and list. Server-side equivalent code for this is\r\n // in XData.Payload.Json.Reader unit: TJsonParamsReader.ReadParams method\r\n // Check there if you change something here.\r\n // if (Action.Parameters.Count = 1) and (Action.Parameters[0].ParamType is TXDataEntityType) then\r\n SingleBodyParamIndex := Action.BodyParams[0].Index;\r\n if (Action.BodyParamCount = 1) and (Length(Args) > SingleBodyParamIndex) and (JS.IsObject(Args[SingleBodyParamIndex])) then\r\n SetJsonObjectBody(Req, Args)\r\n else\r\n SetJsonParamsBody(Req, Args);\r\n end;\r\n\r\n if Action.Consumes <> '' then\r\n Req.Headers.SetValue('content-type', Action.Consumes)\r\n else\r\n Req.Headers.SetValue('content-type', 'application/json');\r\n end;\r\n\r\n FClient.DoRequest(TXDataClientRequest.Create(FClient, Req, rtRawInvoke, FRequestId));\r\n FClient.Send(Req, @OnSuccess, @LocalError);\r\nend;\r\n\r\nfunction TXDataWebInvoker.RequestUrl(const RelativeUrl: string): string;\r\nbegin\r\n Result := FClient.RequestUrl(RelativeUrl);\r\nend;\r\n\r\nprocedure TXDataWebInvoker.SetFormBody(Req: IHttpRequest;\r\n const Args: array of JSValue);\r\nbegin\r\n Req.Content := BuildQueryString(Args, TBindingMode.FromBody);\r\nend;\r\n\r\nprocedure TXDataWebInvoker.SetJsonObjectBody(Req: IHttpRequest;\r\n const Args: array of JSValue);\r\nvar\r\n ParamIndex: Integer;\r\nbegin\r\n // Review this when Aurelius entities are supported\r\n // For now, just set the raw Json content\r\n ParamIndex := Action.BodyParams[0].Index;\r\n if Length(Args) <= ParamIndex then\r\n raise EXDataWrongParameterCount.Create(Action, ParamIndex + 1);\r\n Req.Content := TJSJson.stringify(Args[ParamIndex]);\r\nend;\r\n\r\nprocedure TXDataWebInvoker.SetJsonParamsBody(Req: IHttpRequest;\r\n const Args: array of JSValue);\r\nvar\r\n I: Integer;\r\n Param: TXDataParamDef;\r\n ParamObj: TJSObject;\r\n ParamValue: JSValue;\r\nbegin\r\n ParamObj := TJSObject.new;\r\n for I := 0 to Action.Parameters.Count - 1 do\r\n if Action.Parameters[I].BindingMode = TBindingMode.FromBody then\r\n begin\r\n Param := Action.Parameters[I];\r\n if Param.Input and (I < Length(Args)) then\r\n begin\r\n ParamValue := Args[I];\r\n TransformParam(Param, ParamValue);\r\n ParamObj[Param.Name] := ParamValue;\r\n end;\r\n end;\r\n Req.Content := TJSJson.stringify(ParamObj);\r\nend;\r\n\r\nprocedure TXDataWebInvoker.SetParamStreamBody(Req: IHttpRequest;\r\n const Args: array of JSValue; ArgIndex: Integer);\r\nbegin\r\n if ArgIndex >= Length(Args) then\r\n raise EXDataWrongParameterCount.Create(Action, ArgIndex + 1);\r\n Req.Content := Args[ArgIndex];\r\nend;\r\n\r\nprocedure TXDataWebInvoker.TransformParam(Param: TXDataParamDef;\r\n var Value: JSValue);\r\nbegin\r\n// case Param.ParamType.TypeKind of\r\n//// xtDateTime,\r\n//// xtDate,\r\n//// xtTime,\r\n// TXTypeKind.xtGuid:\r\n// begin\r\n// // Must be TGuid type\r\n// if JS.IsObject(Value) then\r\n// begin\r\n// Value := Copy(GuidToString(TGuid(Value)), 2, 36);\r\n// end;\r\n// end;\r\n//// xtBinary,\r\n//// xtEnum,\r\n//// xtScalarCollection\r\n// end;\r\nend;\r\n\r\n{ EXDataWrongParameterCount }\r\n\r\nconstructor EXDataWrongParameterCount.Create(Action: TXDataAction;\r\n PassedParameters: integer);\r\nbegin\r\n inherited CreateFmt('Incorrect parameter count for Operation \"%s\". Expected at least: %d, actual: %d',\r\n [Action.OperationId, Action.Parameters.Count, PassedParameters]);\r\nend;\r\n\r\n{ EXDataWrongRouteParams }\r\n\r\nconstructor EXDataWrongRouteParams.Create(Action: TXDataAction);\r\nbegin\r\n inherited CreateFmt('Invalid number of route params for Operation \"%s\". ' +\r\n 'Route params: %d, Path params: %d',\r\n [Action.OperationId, Action.RouteInfo.ParamCount, Action.PathParamCount]);\r\nend;\r\n\r\nend.\r\n","unit XData.Web.DatasetCommon;\r\n\r\ninterface\r\n\r\nuses\r\n DB,\r\n XData.Model.Classes;\r\n\r\nprocedure InitFieldDefsFromEntityType(Dataset: TDataset; EntityType: TXDataEntityType;\r\n SubPropsDepth: Integer; EnumAsString: Boolean = False);\r\n//procedure AddFieldDefsFromEntityType(Dataset: TDataset; SubPropsDepth: Integer; const APrefix: string;\r\n// EntityType: TXDataEntityType; ADepth: Integer);\r\n//function XDataTypeToFieldType(AType: TXDataType; ALength: Integer;\r\n// ForceAnsiString: boolean): TFieldType;\r\n\r\nimplementation\r\n\r\n{$IFDEF PAS2JS}\r\nconst\r\n { Field types with a fixed size. TField.Size = 0 for all of these }\r\n ftFixedSizeTypes = [ftInteger, ftBoolean, ftFloat,\r\n ftDate, ftTime, ftDateTime, ftAutoInc, ftLargeint];\r\n{$ENDIF}\r\n\r\nfunction XDataTypeToFieldType(AType: TXDataType; var ALength: Integer;\r\n ForceAnsiString: boolean; EnumAsString: Boolean): TFieldType;\r\nvar\r\n IsMemo: Boolean;\r\n EnumMember: TXDataEnumMember;\r\n I: Integer;\r\nbegin\r\n case AType.TypeKind of\r\n TXTypeKind.xtText:\r\n begin\r\n IsMemo := ALength > 65535; {arbitrary big number}\r\n if IsMemo then\r\n begin\r\n {$IFDEF PAS2JS}\r\n Result := TFieldType.ftMemo;\r\n {$ELSE}\r\n if ForceAnsiString then\r\n Result := TFieldType.ftMemo\r\n else\r\n Result := TFieldType.ftWideMemo;\r\n {$ENDIF}\r\n end\r\n else\r\n begin\r\n {$IFDEF PAS2JS}\r\n Result := TFieldType.ftString;\r\n {$ELSE}\r\n if ForceAnsiString then\r\n Result := TFieldType.ftString\r\n else\r\n Result := TFieldType.ftWideString;\r\n {$ENDIF}\r\n end;\r\n end;\r\n TXTypeKind.xtInt32:\r\n Result := ftInteger;\r\n TXTypeKind.xtInt64:\r\n Result := ftLargeInt;\r\n TXTypeKind.xtDouble:\r\n Result := ftFloat;\r\n TXTypeKind.xtBoolean:\r\n Result := ftBoolean;\r\n TXTypeKind.xtDateTime:\r\n Result := ftDateTime;\r\n TXTypeKind.xtDate:\r\n Result := ftDate;\r\n TXTypeKind.xtTime:\r\n Result := ftTime;\r\n TXTypeKind.xtCurrency:\r\n {$IFDEF PAS2JS}\r\n Result := ftFloat;\r\n {$ELSE}\r\n Result := ftCurrency;\r\n {$ENDIF}\r\n TXTypeKind.xtGuid:\r\n {$IFDEF PAS2JS}\r\n Result := ftString;\r\n {$ELSE}\r\n Result := ftGuid;\r\n {$ENDIF}\r\n TXTypeKind.xtVariant:\r\n Result := ftVariant;\r\n TXTypeKind.xtBinary:\r\n Result := ftBlob;\r\n TXTypeKind.xtStream:\r\n Result := ftBlob;\r\n TXTypeKind.xtInt16:\r\n {$IFDEF PAS2JS}\r\n Result := ftInteger;\r\n {$ELSE}\r\n Result := ftSmallInt;\r\n {$ENDIF}\r\n TXTypeKind.xtByte:\r\n {$IFDEF PAS2JS}\r\n Result := ftInteger;\r\n {$ELSE}\r\n Result := ftSmallInt;\r\n {$ENDIF}\r\n TXTypeKind.xtSByte:\r\n {$IFDEF PAS2JS}\r\n Result := ftInteger;\r\n {$ELSE}\r\n Result := ftSmallInt;\r\n {$ENDIF}\r\n TXTypeKind.xtEnum:\r\n if EnumAsString then\r\n begin\r\n Result := ftString;\r\n if (ALength = 0) and (AType is TXDataEnumType) then\r\n for I := 0 to TXDataEnumType(AType).Members.Count - 1 do\r\n begin\r\n EnumMember := TXDataEnumType(AType).Members[I];\r\n if Length(EnumMember.Name) > ALength then\r\n ALength := Length(EnumMember.Name);\r\n end;\r\n end\r\n else\r\n Result := ftInteger;\r\n else\r\n Result := ftUnknown;\r\n end;\r\nend;\r\n\r\nprocedure AddFieldDefsFromEntityType(Dataset: TDataset; SubPropsDepth: Integer; const APrefix: string;\r\n EntityType: TXDataEntityType; ADepth: Integer; EnumAsString: Boolean);\r\nvar\r\n DataType: TFieldType;\r\n Len: integer;\r\n FieldDef: TFieldDef;\r\n NavProp: TXDataNavigationProperty;\r\n Prop: TXDataSimpleProperty;\r\n I: Integer;\r\nbegin\r\n if EntityType.BaseType <> nil then\r\n AddFieldDefsFromEntityType(Dataset, SubPropsDepth, APrefix, EntityType.BaseType, ADepth, EnumAsString);\r\n\r\n for I := 0 to EntityType.NavigationProperties.Count - 1 do\r\n begin\r\n NavProp := EntityType.NavigationProperties[I];\r\n if NavProp.Target <> nil then\r\n begin\r\n if not NavProp.Target.IsCollection then\r\n begin\r\n FieldDef := Dataset.FieldDefs.AddFieldDef;\r\n FieldDef.Name := APrefix + NavProp.Name;\r\n FieldDef.DataType := ftVariant;\r\n FieldDef.Required := NavProp.Required and (ADepth = 0);\r\n\r\n// if not NavProp.CanWrite then\r\n// FieldDef.Attributes := FieldDef.Attributes + [TFieldAttribute.faReadonly];\r\n\r\n if ADepth < SubPropsDepth then\r\n AddFieldDefsFromEntityType(Dataset, SubPropsDepth, APrefix + NavProp.Name + '.', NavProp.Target, ADepth + 1, EnumAsString);\r\n end else\r\n begin\r\n FieldDef := Dataset.FieldDefs.AddFieldDef;\r\n FieldDef.Name := APrefix + NavProp.Name;\r\n FieldDef.DataType := ftDataSet;\r\n FieldDef.Required := false;\r\n FieldDef.Attributes := FieldDef.Attributes + [TFieldAttribute.faReadonly];\r\n end;\r\n end;\r\n end;\r\n\r\n for I := 0 to EntityType.Properties.Count - 1 do\r\n begin\r\n Prop := EntityType.Properties[I];\r\n if Prop.PropertyType <> nil then\r\n begin\r\n Len := Prop.Length;\r\n DataType := XDataTypeToFieldType(Prop.PropertyType, Len, True, EnumAsString);\r\n\r\n // Put a default value for field length. This should not be needed\r\n // as XData model should always return length for string types\r\n if (Len = 0) and (DataType in [ftString{$IFNDEF PAS2JS}, ftWideString{$ENDIF}]) then\r\n Len := 255;\r\n\r\n // Force guid fields to be size of 38 (required by Guid fields)\r\n {$IFNDEF PAS2JS}\r\n if DataType = ftGuid then\r\n Len := 38;\r\n {$ENDIF}\r\n\r\n FieldDef := Dataset.FieldDefs.AddFieldDef;\r\n FieldDef.Name := APrefix + Prop.Name;\r\n FieldDef.DataType := DataType;\r\n\r\n // Only set length for field types that need size. This avoids problems, for example, with enumerated types\r\n // enumerated field type will always be integer here (due to call to RttiTypeToFieldType above. But if the enumerated\r\n // is mapped in model as a string field, then Len will be not zero here (although datatype is ftInteger).\r\n // So we must keep Size 0 for integer fields otherwise an error will be raised by the dataset\r\n if not (FieldDef.DataType in ftFixedSizeTypes) then\r\n FieldDef.Size := Len;\r\n\r\n FieldDef.Required := Prop.Required;\r\n// FieldDef.Required := not (O.IsNullable or (DataType in [ftMemo, ftBlob, ftWideMemo]));\r\n FieldDef.Required := FieldDef.Required and (ADepth = 0);\r\n\r\n // Make read-only properties to become read-only fields. Except dynamic properties which are always writeable\r\n// if not Prop.CanWrite then\r\n// FieldDef.Attributes := FieldDef.Attributes + [TFieldAttribute.faReadonly];\r\n\r\n// if (C <> nil) and (TColumnProp.NoUpdate in C.Properties) then\r\n// FieldDef.Attributes := FieldDef.Attributes + [TFieldAttribute.faReadonly];\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure InitFieldDefsFromEntityType(Dataset: TDataset;\r\n EntityType: TXDataEntityType; SubPropsDepth: Integer; EnumAsString: Boolean);\r\nbegin\r\n if EntityType = nil then\r\n begin\r\n Dataset.FieldDefs.Clear;\r\n Exit;\r\n end;\r\n\r\n AddFieldDefsFromEntityType(Dataset, SubPropsDepth, '', EntityType, 0, EnumAsString);\r\nend;\r\n\r\nend.\r\n","unit XData.Web.Dataset;\r\n\r\ninterface\r\n\r\nuses\r\n Classes, DB, SysUtils, Types,\r\n XData.Web.Client,\r\n XData.Web.Connection,\r\n XData.Web.DatasetCommon,\r\n XData.Web.JsonDataset,\r\n XData.Model.Classes, JS;\r\n\r\ntype\r\n TServerRecordCountMode = (smNone, smInlineCount);\r\n TProc = reference to procedure;\r\n\r\n TXDataWebDataSet = class(TXDataJsonDataset)\r\n private\r\n FEntitySetName: string;\r\n FConnection: TXDataWebConnection;\r\n FSubpropsDepth: Integer;\r\n FQueryString: string;\r\n FServerRecordCountMode: TServerRecordCountMode;\r\n FQuerySkip: Integer;\r\n FQueryTop: Integer;\r\n FServerRecordCount: Integer;\r\n FDesignLoad: Boolean;\r\n FEnumAsInteger: Boolean;\r\n procedure SetConnection(const Value: TXDataWebConnection);\r\n procedure CheckConnected;\r\n procedure CheckConnection;\r\n procedure CheckEntitySetName;\r\n procedure EnsureConnected(Proc: TProc);\r\n procedure SetEntitySetName(const Value: string);\r\n procedure SetSubpropsDepth(const Value: Integer);\r\n procedure SetDesignLoad(const Value: Boolean);\r\n protected\r\n procedure Notification(AComponent: TComponent; Operation: TOperation); override;\r\n procedure InternalInitFieldDefs; override;\r\n procedure InitializeFieldDefinitions;\r\n function GetCurrentData: JSValue; virtual;\r\n procedure InternalClose; override;\r\n protected\r\n function DataPacketReceived(ARequest: TDataRequest): Boolean; override;\r\n function DoGetDataProxy: TDataProxy; override;\r\n public\r\n procedure Load; reintroduce;\r\n property CurrentData: JSValue read GetCurrentData;\r\n property ServerRecordCount: Integer read FServerRecordCount;\r\n published\r\n property DesignLoad: Boolean read FDesignLoad write SetDesignLoad;\r\n property EntitySetName: string read FEntitySetName write SetEntitySetName;\r\n property Connection: TXDataWebConnection read FConnection write SetConnection;\r\n property SubpropsDepth: Integer read FSubpropsDepth write SetSubpropsDepth default 0;\r\n property QueryString: string read FQueryString write FQueryString;\r\n property QueryTop: Integer read FQueryTop write FQueryTop default 0;\r\n property QuerySkip: Integer read FQuerySkip write FQuerySkip default 0;\r\n property ServerRecordCountMode: TServerRecordCountMode read FServerRecordCountMode write FServerRecordCountMode default smNone;\r\n property EnumAsInteger: Boolean read FEnumAsInteger write FEnumAsInteger default false;\r\n end;\r\n\r\n TXDataDataProxy = class(TDataProxy)\r\n private\r\n FDataset: TXDataWebDataSet;\r\n function GetConnection: TXDataWebConnection;\r\n procedure CheckBatchComplete(ABatch: TRecordUpdateBatch);\r\n function QueryToObject(const Query: string): TJSObject;\r\n function ObjectToQuery(Obj: TJSObject): string;\r\n function BuildQueryString: string;\r\n protected\r\n function GetUpdateDescriptorClass: TRecordUpdateDescriptorClass; override;\r\n function ProcessUpdateBatch(ABatch: TRecordUpdateBatch): Boolean; override;\r\n protected\r\n Function DoGetData(ARequest: TDataRequest): Boolean; override;\r\n Function GetDataRequest(aOptions: TLoadOptions;\r\n aAfterRequest: TDataRequestEvent; aAfterLoad: TDatasetLoadEvent)\r\n : TDataRequest; override;\r\n Public\r\n Constructor Create(AOwner: TComponent); override;\r\n Property Dataset: TXDataWebDataSet Read FDataset;\r\n property Connection: TXDataWebConnection read GetConnection;\r\n end;\r\n\r\n TXDataDataRequest = Class(TDataRequest)\r\n protected\r\n procedure OnSuccess(Resp: TXDataClientResponse); virtual;\r\n end;\r\n\r\n TXDataUpdateDescriptor = Class(TRecordUpdateDescriptor)\r\n Private\r\n FBatch: TRecordUpdateBatch;\r\n FApplying: Boolean;\r\n protected\r\n procedure OnLoad(Response: TXDataClientResponse); virtual;\r\n procedure OnError(Error: TXDataClientError); virtual;\r\n end;\r\n\r\nimplementation\r\n\r\n{ TXDataDBRequest }\r\n\r\nprocedure TXDataDataRequest.OnSuccess(Resp: TXDataClientResponse);\r\nbegin\r\n if (Resp.StatusCode = 200) then\r\n begin\r\n TXDataDataProxy(DataProxy).FDataset.FServerRecordCount := Resp.Count;\r\n Data := Resp.Result;\r\n if isArray(Data) then\r\n begin\r\n if (TJSArray(Data).Length = 0) then\r\n Success := rrEOF\r\n else\r\n Success := rrOK;\r\n end\r\n else\r\n begin\r\n Success := rrFail;\r\n ErrorMsg := 'Result is not an array';\r\n end;\r\n end\r\n else\r\n begin\r\n TXDataDataProxy(DataProxy).FDataset.FServerRecordCount := 0;\r\n Data := nil;\r\n Success := rrFail;\r\n ErrorMsg := Resp.Response.StatusReason;\r\n end;\r\n DoAfterRequest;\r\nend;\r\n\r\n{ TXDataWebDataSet }\r\n\r\nprocedure TXDataWebDataSet.CheckConnected;\r\nbegin\r\n CheckConnection;\r\n if not Connection.Connected then\r\n DatabaseError('Connection not active');\r\nend;\r\n\r\nprocedure TXDataWebDataSet.CheckConnection;\r\nbegin\r\n if Connection = nil then\r\n DatabaseError('Connection not assigned');\r\nend;\r\n\r\nprocedure TXDataWebDataSet.CheckEntitySetName;\r\nbegin\r\n if EntitySetName = '' then\r\n DatabaseError('EntitySetName not specified.');\r\nend;\r\n\r\nfunction TXDataWebDataSet.DataPacketReceived(ARequest: TDataRequest): Boolean;\r\nvar\r\n A: TJSArray;\r\nbegin\r\n Result := False;\r\n If isNull(ARequest.Data) then\r\n exit;\r\n\r\n if isArray(ARequest.Data) then\r\n A := TJSArray(ARequest.Data)\r\n else\r\n DatabaseError('Cannot handle data packet');\r\n\r\n Result := A.Length > 0;\r\n AddToRows(A);\r\nend;\r\n\r\nfunction TXDataWebDataSet.DoGetDataProxy: TDataProxy;\r\nbegin\r\n Result := TXDataDataProxy.Create(Self);\r\nend;\r\n\r\nprocedure TXDataWebDataSet.EnsureConnected(Proc: TProc);\r\n\r\n procedure Success;\r\n begin\r\n Proc();\r\n end;\r\n\r\nbegin\r\n CheckConnection;\r\n if Connection.Connected then\r\n Proc()\r\n else\r\n Connection.Open(@Success);\r\nend;\r\n\r\nfunction TXDataWebDataSet.GetCurrentData: JSValue;\r\nbegin\r\n Result := ActiveBuffer.Data;\r\nend;\r\n\r\nprocedure TXDataWebDataSet.InitializeFieldDefinitions;\r\nbegin\r\n CheckConnected;\r\n CheckEntitySetName;\r\n InitFieldDefsFromEntityType(Self, Connection.Model.GetEntitySet(EntitySetName).EntityType,\r\n SubPropsDepth, not EnumAsInteger);\r\nend;\r\n\r\nprocedure TXDataWebDataSet.InternalClose;\r\nbegin\r\n FServerRecordCount := 0;\r\n inherited;\r\nend;\r\n\r\nprocedure TXDataWebDataSet.InternalInitFieldDefs;\r\nbegin\r\n FieldDefs.Clear;\r\n if not(csDesigning in ComponentState) and (FieldCount > 0) then\r\n begin\r\n InitFieldDefsFromFields;\r\n exit;\r\n end;\r\n\r\n InitializeFieldDefinitions;\r\nend;\r\n\r\nprocedure TXDataWebDataSet.Load;\r\n\r\n procedure LocalExecute;\r\n begin\r\n inherited Load([], nil);\r\n end;\r\n\r\nbegin\r\n EnsureConnected(@LocalExecute);\r\nend;\r\n\r\nprocedure TXDataWebDataSet.Notification(AComponent: TComponent;\r\n Operation: TOperation);\r\nbegin\r\n inherited;\r\n if (Operation = opRemove) and (AComponent = FConnection) then\r\n Connection := nil;\r\nend;\r\n\r\nprocedure TXDataWebDataSet.SetConnection(const Value: TXDataWebConnection);\r\nbegin\r\n if Value <> FConnection then\r\n begin\r\n Active := False;\r\n if FConnection <> nil then\r\n FConnection.RemoveFreeNotification(Self);\r\n FConnection := Value;\r\n if FConnection <> nil then\r\n FConnection.FreeNotification(Self);\r\n FieldDefs.Updated := False;\r\n end;\r\nend;\r\n\r\nprocedure TXDataWebDataSet.SetDesignLoad(const Value: Boolean);\r\nbegin\r\n if Value <> FDesignLoad then\r\n begin\r\n FDesignLoad := Value;\r\n if Value then\r\n Load\r\n else\r\n Close;\r\n end;\r\nend;\r\n\r\nprocedure TXDataWebDataSet.SetEntitySetName(const Value: string);\r\nbegin\r\n if FEntitySetName <> Value then\r\n begin\r\n FEntitySetName := Value;\r\n FieldDefs.Updated := False;\r\n end;\r\nend;\r\n\r\nprocedure TXDataWebDataSet.SetSubpropsDepth(const Value: Integer);\r\nbegin\r\n if FSubpropsDepth <> Value then\r\n begin\r\n FSubpropsDepth := Value;\r\n FieldDefs.Updated := False;\r\n end;\r\nend;\r\n\r\n{ TXDataDatasetProxy }\r\n\r\nfunction TXDataDataProxy.BuildQueryString: string;\r\nvar\r\n Query: TJSObject;\r\nbegin\r\n Query := QueryToObject(Self.FDataset.QueryString);\r\n if Self.FDataset.QueryTop <> 0 then\r\n Query['$top'] := IntToStr(Self.FDataset.QueryTop);\r\n if Self.FDataset.QuerySkip <> 0 then\r\n Query['$skip'] := IntToStr(Self.FDataset.QuerySkip);\r\n if Self.FDataset.ServerRecordCountMode = smInlineCount then\r\n Query['$inlinecount'] := 'allpages';\r\n Result := ObjectToQuery(Query);\r\nend;\r\n\r\nprocedure TXDataDataProxy.CheckBatchComplete(ABatch: TRecordUpdateBatch);\r\nVar\r\n BatchOK: Boolean;\r\n I: Integer;\r\nbegin\r\n BatchOK := True;\r\n I := ABatch.List.Count - 1;\r\n While BatchOK and (I >= 0) do\r\n begin\r\n BatchOK := ABatch.List[I].ResolveStatus in [rsResolved, rsResolveFailed];\r\n Dec(I);\r\n end;\r\n if BatchOK and Assigned(ABatch.OnResolve) then\r\n ABatch.OnResolve(Self, ABatch);\r\nend;\r\n\r\nconstructor TXDataDataProxy.Create(AOwner: TComponent);\r\nbegin\r\n Inherited Create(AOwner);\r\n if AOwner is TXDataWebDataSet then\r\n FDataset := AOwner as TXDataWebDataSet\r\n else\r\n raise EXDataDatasetException.Create('Proxy created with invalid dataset');\r\nend;\r\n\r\nfunction TXDataDataProxy.DoGetData(ARequest: TDataRequest): Boolean;\r\nvar\r\n XClient: TXDataWebClient;\r\nbegin\r\n if not (loAtEof in ARequest.LoadOptions) then\r\n begin\r\n XClient := TXDataWebClient.Create(nil);\r\n XClient.Connection := Self.FDataset.Connection;\r\n XClient.List(Self.FDataset.EntitySetName, BuildQueryString,\r\n @TXDataDataRequest(ARequest).OnSuccess);\r\n end;\r\n\r\n Result := True; // not used by TDataset for now\r\nend;\r\n\r\nfunction TXDataDataProxy.GetConnection: TXDataWebConnection;\r\nbegin\r\n Result := FDataset.Connection;\r\nend;\r\n\r\nfunction TXDataDataProxy.GetDataRequest(aOptions: TLoadOptions;\r\n aAfterRequest: TDataRequestEvent; aAfterLoad: TDatasetLoadEvent)\r\n : TDataRequest;\r\nbegin\r\n Result := TXDataDataRequest.Create(Self, aOptions, aAfterRequest, aAfterLoad);\r\nend;\r\n\r\nfunction TXDataDataProxy.GetUpdateDescriptorClass: TRecordUpdateDescriptorClass;\r\nbegin\r\n Result := TXDataUpdateDescriptor;\r\nend;\r\n\r\nfunction TXDataDataProxy.ObjectToQuery(Obj: TJSObject): string;\r\nvar\r\n Key: string;\r\nbegin\r\n Result := '';\r\n for Key in TJSObject.keys(Obj) do\r\n begin\r\n if Result <> '' then\r\n Result := Result + '&';\r\n Result := Result + key + '=' + JS.ToString(Obj[key]);\r\n end;\r\nend;\r\n\r\nfunction TXDataDataProxy.ProcessUpdateBatch(ABatch: TRecordUpdateBatch): Boolean;\r\nvar\r\n R: TXDataUpdateDescriptor;\r\n I: Integer;\r\n XClient: TXDataWebClient;\r\n Entity: TJSObject;\r\nbegin\r\n I := 0;\r\n while I <= ABatch.List.Count - 1 do\r\n begin\r\n R := ABatch.List[I] as TXDataUpdateDescriptor;\r\n if R.FApplying then \r\n ABatch.List.Delete(I)\r\n else\r\n begin\r\n Inc(I);\r\n R.FBatch := ABatch;\r\n R.FApplying := True;\r\n\r\n XClient := TXDataWebClient.Create(nil);\r\n XClient.Connection := Self.Connection;\r\n XClient.OnLoad := @R.OnLoad;\r\n XClient.OnError := @R.OnError;\r\n Entity := TJSObject(R.Data);\r\n Case R.Status of\r\n usInserted:\r\n XClient.Post(Dataset.EntitySetName, Entity);\r\n usModified:\r\n XClient.Put(Dataset.EntitySetName, Entity);\r\n usDeleted:\r\n XClient.Delete(Dataset.EntitySetName, Entity);\r\n end;\r\n end;\r\n end;\r\n Result := True;\r\nend;\r\n\r\nfunction TXDataDataProxy.QueryToObject(const Query: string): TJSObject;\r\nvar\r\n Params: TStringDynArray;\r\n P: Integer;\r\n I: Integer;\r\nbegin\r\n Result := TJSObject.new;\r\n Params := TJSString(Query).split('&');\r\n for I := 0 to Length(Params) - 1 do\r\n begin\r\n P := Pos('=', Params[I]);\r\n if P > 1 then\r\n Result[Copy(Params[I], 1, P - 1)] := Copy(Params[I], P + 1, MaxInt);\r\n end;\r\nend;\r\n\r\n{ TXDataUpdateRequest }\r\n\r\nprocedure TXDataUpdateDescriptor.OnError(Error: TXDataClientError);\r\nbegin\r\n ResolveFailed(Error.ErrorMessage);\r\n FApplying := False;\r\n (Proxy as TXDataDataProxy).CheckBatchComplete(FBatch);\r\nend;\r\n\r\nprocedure TXDataUpdateDescriptor.onLoad(Response: TXDataClientResponse);\r\nbegin\r\n Resolve(Response.Result);\r\n FApplying := False;\r\n (Proxy as TXDataDataProxy).CheckBatchComplete(FBatch);\r\nend;\r\n\r\nend.\r\n","{********************************************************************}\r\n{ }\r\n{ written by TMS Software }\r\n{ copyright (c) 2018 - 2024 }\r\n{ Email : info@tmssoftware.com }\r\n{ Web : http://www.tmssoftware.com }\r\n{ }\r\n{ The source code is given as is. The author is not responsible }\r\n{ for any possible damage done due to the use of this code. }\r\n{ The complete source code remains property of the author and may }\r\n{ not be distributed, published, given or sold in any form as such. }\r\n{ No parts of the source code can be included in any other component }\r\n{ or application without written authorization of the author. }\r\n{********************************************************************}\r\n\r\nunit WEBLib.DB;\r\n\r\n{$DEFINE NOPP}\r\n\r\ninterface\r\n\r\nuses\r\n Classes, DB, jsondataset;\r\n\r\ntype\r\n TWebDataSource = class(TDataSource);\r\n\r\nimplementation\r\n\r\nend.","{********************************************************************}\r\n{ }\r\n{ written by TMS Software }\r\n{ copyright (c) 2018 - 2024 }\r\n{ Email : info@tmssoftware.com }\r\n{ Web : http://www.tmssoftware.com }\r\n{ }\r\n{ The source code is given as is. The author is not responsible }\r\n{ for any possible damage done due to the use of this code. }\r\n{ The complete source code remains property of the author and may }\r\n{ not be distributed, published, given or sold in any form as such. }\r\n{ No parts of the source code can be included in any other component }\r\n{ or application without written authorization of the author. }\r\n{********************************************************************}\r\n\r\nunit WEBLib.WebCtrls;\r\n\r\n{$DEFINE NOPP}\r\n\r\ninterface\r\n\r\nuses\r\n Classes, WEBLib.Controls, WEBLib.Graphics, SysUtils, Web, JS, WEBLib.Menus;\r\n\r\ntype\r\n TBrowserSandboxType = (stAllowForms, stAllowModals, stAllowOrientationLock, stAllowPointerLock, stAllowPopups, stAllowPopupsToEscapeSandbox,\r\n stAllowPresentation, stAllowSameOrigin, stAllowScripts, stAllowTopNavigation, stAllowTopNavigationByUserActivation);\r\n\r\n TBrowserSandboxTypes = set of TBrowserSandboxType;\r\n\r\n TBrowserReferrerPolicy = (rfNone, rfNoReferrer, rfNoReferrerWhenDowngrade, rfOrigin, rfOriginWhenCrossOrigin, rfUnsafeUrl);\r\n\r\n TBrowserLoadEvent = procedure(Sender: TObject; AEvent: TJSEvent) of object;\r\n\r\n TBrowserControl = class(TCustomControl)\r\n private\r\n FURL: string;\r\n FSandbox: TBrowserSandboxTypes;\r\n FReferrerPolicy: TBrowserReferrerPolicy;\r\n FLoadPtr: pointer;\r\n FOnLoad: TBrowserLoadEvent;\r\n procedure SetURL(const Value: string);\r\n procedure SetSandbox(const Value: TBrowserSandboxTypes);\r\n procedure SetReferrerPolicy(const Value: TBrowserReferrerPolicy);\r\n procedure DoLoad(Event: TJSEvent);\r\n protected\r\n function CreateElement: TJSElement; override;\r\n procedure UpdateElementVisual; override;\r\n procedure BindEvents; override;\r\n procedure UnBindEvents; override;\r\n procedure ClearMethodPointers; override;\r\n procedure GetMethodPointers; override;\r\n public\r\n procedure CreateInitialize; override;\r\n procedure Navigate(const AURL: string);\r\n function CurrentURL: string;\r\n published\r\n property Align;\r\n property AlignWithMargins;\r\n property Anchors;\r\n property BorderStyle;\r\n property ReferrerPolicy: TBrowserReferrerPolicy read FReferrerPolicy write SetReferrerPolicy;\r\n property Sandbox: TBrowserSandboxTypes read FSandbox write SetSandbox;\r\n property URL: string read FURL write SetURL;\r\n property Visible;\r\n property OnClick;\r\n property OnDblClick;\r\n property OnLoad: TBrowserLoadEvent read FOnLoad write FOnLoad;\r\n property OnMouseDown;\r\n property OnMouseMove;\r\n property OnMouseUp;\r\n end;\r\n\r\n TWebBrowserControl = class(TBrowserControl);\r\n\r\n TYoutube = class(TCustomControl)\r\n private\r\n FVideoID: string;\r\n FAllowFullScreen: boolean;\r\n FAutoPlay: boolean;\r\n procedure SetAllowFullScreen(const Value: boolean);\r\n protected\r\n procedure SetVideoID(const Value: string);\r\n function CreateElement: TJSElement; override;\r\n procedure UpdateElement; override;\r\n procedure UpdateElementVisual; override;\r\n public\r\n procedure CreateInitialize; override;\r\n published\r\n property Align;\r\n property AllowFullScreen: boolean read FAllowFullScreen write SetAllowFullScreen;\r\n property AutoPlay: boolean read FAutoPlay write FAutoPlay;\r\n property Center;\r\n property VideoID: string read FVideoID write SetVideoID;\r\n end;\r\n\r\n TWebYoutube = class(TYoutube);\r\n\r\n TMapClickEvent = procedure(Sender: TObject; Lon, Lat: double) of object;\r\n TMapZoomEvent = procedure(Sender: TObject; ZoomLevel: integer) of object;\r\n TMapMarkerClickEvent = procedure(Sender: TObject; AIndex: integer; AMarker: TJSObjectRecord) of object;\r\n TMapPolygonClickEvent = procedure(Sender: TObject; AIndex: integer; APolygon: TJSObjectRecord) of object;\r\n TMapPolylineClickEvent = procedure(Sender: TObject; AIndex: integer; APolyline: TJSObjectRecord) of object;\r\n TMapCircleClickEvent = procedure(Sender: TObject; AIndex: integer; ACircle: TJSObjectRecord) of object;\r\n TMapRectangleClickEvent = procedure(Sender: TObject; AIndex: integer; ARectangle: TJSObjectRecord) of object;\r\n TMapKMLClickEvent = procedure(Sender: TObject; AIndex: integer; AKML: TJSObjectRecord) of object;\r\n\r\n TGoogleMarkerColor = (mcDefault, mcRed, mcBlue, mcGreen, mcPurple, mcYellow);\r\n TGoogleMarkerShape = (msPin, msPinDot, msFlag, msBookmark, msFlagSmall, msHome, msFavorite, msStar, msCustom);\r\n TGoogleTravelMode = (tmDriving, tmWalking, tmBicycling, tmTransit);\r\n TGoogleMapType = (mtDefault, mtSatellite, mtHybrid, mtTerrain);\r\n TGoogleMapStyle = (mstDefault, mstNightMode, mstCustom);\r\n\r\n TGoogleMaps = class;\r\n\r\n TGoogleMapsOptions = class(TPersistent)\r\n private\r\n FOwner: TGoogleMaps;\r\n FCustomStyle: TStringList;\r\n FMapStyle: TGoogleMapStyle;\r\n FDefaultLongitude: Double;\r\n FDefaultLatitude: Double;\r\n FDefaultZoomLevel: Integer;\r\n procedure SetCustomStyle(const Value: TStringList);\r\n procedure SetMapStyle(const Value: TGoogleMapStyle);\r\n procedure SetDefaultLatitude(const Value: Double);\r\n procedure SetDefaultLongitude(const Value: Double);\r\n procedure SetDefaultZoomLevel(const Value: Integer);\r\n public\r\n constructor Create(AGoogleMaps: TGoogleMaps);\r\n destructor Destroy; override;\r\n procedure Assign(Source: TPersistent); override;\r\n published\r\n property CustomStyle: TStringList read FCustomStyle write SetCustomStyle;\r\n property MapStyle: TGoogleMapStyle read FMapStyle write SetMapStyle default mstDefault;\r\n property DefaultLatitude: Double read FDefaultLatitude write SetDefaultLatitude default -34.397;\r\n property DefaultLongitude: Double read FDefaultLongitude write SetDefaultLongitude default 150.644;\r\n property DefaultZoomLevel: Integer read FDefaultZoomLevel write SetDefaultZoomLevel default 8;\r\n end;\r\n\r\n TGoogleMapsRender = (mrRaster, mrVector);\r\n\r\n TGoogleMaps = class(TCustomControl)\r\n private\r\n FUpdateCount: integer;\r\n FReq: TJSXMLHttpRequest;\r\n FAPIKey: string;\r\n FOldAPIKey: string;\r\n FMap: TJSHTMLElement;\r\n FDirectionsService: TJSElement;\r\n FDirectionsDisplay: TJSElement;\r\n FCode: boolean;\r\n FBound: boolean;\r\n FOnMapClick: TMapClickEvent;\r\n FOnMapDblClick: TMapClickEvent;\r\n FOnMapZoom: TMapZoomEvent;\r\n FOnMapPan: TMapClickEvent;\r\n FOnGeoCoded: TMapClickEvent;\r\n FOnMapIdle: TNotifyEvent;\r\n FOnMapLoaded: TNotifyEvent;\r\n FOnMarkerClick: TMapMarkerClickEvent;\r\n FOnPolygonClick: TMapPolygonClickEvent;\r\n FOnPolylineClick: TMapPolylineClickEvent;\r\n FOnCircleClick: TMapCircleClickEvent;\r\n FOnRectangleClick: TMapRectangleClickEvent;\r\n FOnKMLClick: TMapKMLClickEvent;\r\n FOptions: TGoogleMapsOptions;\r\n FMapID: string;\r\n FMapRender: TGoogleMapsRender;\r\n procedure SetAPIKey(const Value: string);\r\n function GetMarker(AIndex: integer): TJSObject;\r\n function GetCircle(AIndex: integer): TJSObject;\r\n function GetRectangle(AIndex: integer): TJSObject;\r\n function GetPolygon(AIndex: integer): TJSObject;\r\n function GetPolyline(AIndex: integer): TJSObject;\r\n procedure SetMapID(const Value: string);\r\n procedure SetMapRender(const Value: TGoogleMapsRender);\r\n protected\r\n function GetMap: TJSHTMLElement;\r\n function CreateElement: TJSElement; override;\r\n procedure UpdateElement; override;\r\n procedure SetControlCursor(const Value: TCursor); override;\r\n procedure BindEvents; override;\r\n\r\n procedure HandleMapClick(e: TJSEvent);\r\n procedure HandleMapDblClick(e: TJSEvent);\r\n procedure HandleMapPan(e: TJSEvent);\r\n procedure HandleMapZoom(e: TJSEvent);\r\n procedure HandleMapIdle(e: TJSEvent);\r\n procedure HandleMarkerClick(e: TJSEvent);\r\n procedure HandlePolygonClick(e: TJSEvent);\r\n procedure HandlePolylineClick(e: TJSEvent);\r\n procedure HandleCircleClick(e: TJSEvent);\r\n procedure HandleRectangleClick(e: TJSEvent);\r\n procedure HandleKMLClick(e: TJSEvent);\r\n function HandleResponse(Event: TEventListenerEvent): boolean;\r\n function HandleAbort(Event: TEventListenerEvent): boolean;\r\n function TravelModeStr(ATravelMode: TGoogleTravelMode): string;\r\n function DoLoaded(Event: TEventListenerEvent): boolean; virtual;\r\n procedure Loaded; override;\r\n function GoogleLoaded: boolean;\r\n public\r\n procedure CreateInitialize; override;\r\n procedure SetCenter(Lat, Lon: Double);\r\n function GetCenter(var Lat, Lon: Double): Boolean;\r\n function GetBounds(var NorthEastLat, NorthEastLon, SouthWestLat, SouthWestLon: Double): Boolean;\r\n procedure SetDoubleClickZoom(AValue: Boolean);\r\n procedure SetDraggable(AValue: Boolean);\r\n procedure SetScrollWheel(AValue: Boolean);\r\n procedure SetMapType(AMapType: TGoogleMapType = mtDefault);\r\n procedure SetZoom(Zoom: integer);\r\n procedure SetHeading(AHeading: double);\r\n procedure SetTilt(ATilt: double);\r\n procedure PanTo(Lat, Lon: double);\r\n procedure PanToBounds(Lat1, Lon1, Lat2, Lon2: double);\r\n procedure AddGPX(AGPX: string; AColor: TColor = clRed; AWidth: integer = 2; AOpacity: Double = 1);\r\n procedure AddKML(Url: string; ZoomToBounds: Boolean = true);\r\n procedure AddPolyLine(Points: TJSArray; AColor: TColor = clRed;AWidth: integer = 2; AOpacity: Double = 1);\r\n procedure AddPolygon(Points: TJSArray; AFillColor: TColor = clRed; AStrokeColor: TColor = clBlack; AWidth: Integer = 2; AOpacity: Double = 1);\r\n procedure AddCircle(Lat, Lon: double; Radius: Integer; AFillColor: TColor = clRed; AStrokeColor: TColor = clBlack; AWidth: Integer = 2; AOpacity: double = 1);\r\n procedure AddRectangle(NorthEastLat, NorthEastLon, SouthWestLat, SouthWestLon: double; AFillColor: TColor = clRed; AStrokeColor: TColor = clBlack; AWidth: integer = 2; AOpacity: double = 1);\r\n procedure AddMarker(Lat,Lon: Double; Title: string = ''); overload;\r\n procedure AddMarker(Lat,Lon: Double; Color: TGoogleMarkerColor; Title: string = ''); overload;\r\n procedure AddMarker(Lat,Lon: Double; Color: TColor; PinLetter: string; Title: string = ''); overload;\r\n procedure AddMarker(Lat,Lon: Double; PinIcon: string; Title: string; XOffset: integer = 0; YOffset: integer = 0); overload;\r\n procedure AddMarker(Lat,Lon: Double; Shape: TGoogleMarkerShape; Color: TColor; Title: string = ''); overload;\r\n procedure AddMarker(Lat,Lon: Double; Shape: TGoogleMarkerShape; Color: TColor = clRed; BorderColor: TColor = clBlack; Scale: Double = 1; CustomShape: string = ''; Title: string = ''); overload;\r\n procedure SetMarkerTitle(AIndex: Integer; ATitle: string);\r\n procedure SetMarkerLocation(AIndex: Integer; Lat, Lon: Double);\r\n procedure SetMarkerIcon(AIndex: Integer; Url: string);\r\n procedure SetCircleCenter(AIndex: Integer; Lat, Lon: Double);\r\n procedure SetCircleRadius(AIndex, Radius: Integer);\r\n procedure SetCircleColors(AIndex: Integer; AFillColor, AStrokeColor: TColor);\r\n procedure SetRectangleLocation(AIndex: Integer; NorthEastLat, NorthEastLon, SouthWestLat, SouthWestLon: Double);\r\n procedure SetRectangleColors(AIndex: Integer; AFillColor, AStrokeColor: TColor);\r\n procedure SetPolylineColor(AIndex: Integer; AColor: TColor);\r\n procedure SetPolylinePoints(AIndex: Integer; Points: TJSArray);\r\n procedure SetPolygonColors(AIndex: Integer; AFillColor, AStrokeColor: TColor);\r\n procedure SetPolygonPoints(AIndex: Integer; Points: TJSArray);\r\n procedure FitBounds(LatMin, LonMin, LatMax, LonMax: Double);\r\n procedure ClearMarkers;\r\n procedure ClearKMLs;\r\n procedure ClearPolylines;\r\n procedure ClearPolygons;\r\n procedure ClearCircles;\r\n procedure ClearRectangles;\r\n procedure ShowDirections(Source, Destination: string; ATravelMode: TGoogleTravelMode = tmDriving; WayPoints: TStringList = nil; OptimizeWayPoints: Boolean = False; AvoidHighways: Boolean = False; AvoidTolls: Boolean = False); overload;\r\n procedure ShowDirections(SourceLon, SourceLat, DestLon, DestLat: Double; ATravelMode: TGoogleTravelMode = tmDriving; WayPoints: TStringList = nil; OptimizeWayPoints: Boolean = False; AvoidHighways: Boolean = False; AvoidTolls: Boolean = False); overload;\r\n procedure ShowStreetView(Lat, Lon: Double; Heading: Integer = 0; Zoom: Integer = 0; Pitch: Integer = 0);\r\n procedure HideStreetView;\r\n procedure MoveMarker(AIndex: integer; NewLat, NewLon: double);\r\n procedure RemoveDirections;\r\n procedure RemoveMarker(AIndex: Integer);\r\n procedure RemovePolygon(AIndex: Integer);\r\n procedure RemovePolyline(AIndex: Integer);\r\n procedure RemoveCircle(AIndex: Integer);\r\n procedure RemoveRectangle(AIndex: Integer);\r\n procedure GeoCode(const Address: string);\r\n function GetCoord(Lon,Lat: double): JSValue;\r\n function Distance(Lon1,Lat1,Lon2,Lat2: double): double;\r\n function GetBBox(Lon1,Lat1,Lon2,Lat2: double): JSValue;\r\n property Markers[AIndex: Integer]: TJSObject read GetMarker;\r\n property Polygons[AIndex: Integer]: TJSObject read GetPolygon;\r\n property Polylines[AIndex: Integer]: TJSObject read GetPolyline;\r\n property Circles[AIndex: Integer]: TJSObject read GetCircle;\r\n property Rectangles[AIndex: Integer]: TJSObject read GetRectangle;\r\n property MapElement: TJSHTMLElement read GetMap;\r\n published\r\n property Align;\r\n property APIKey: string read FAPIKey write SetAPIKey;\r\n property Center;\r\n property MapID: string read FMapID write SetMapID;\r\n property MapRender: TGoogleMapsRender read FMapRender write SetMapRender default mrRaster;\r\n property Options: TGoogleMapsOptions read FOptions write FOptions;\r\n property OnGeoCoded: TMapClickEvent read FOnGeoCoded write FOnGeoCoded;\r\n property OnKeyDown;\r\n property OnKeyUp;\r\n property OnKeyPress;\r\n property OnMapClick: TMapClickEvent read FOnMapClick write FOnMapClick;\r\n property OnMapDblClick: TMapClickEvent read FOnMapDblClick write FOnMapDblClick;\r\n property OnMapIdle: TNotifyEvent read FOnMapIdle write FOnMapIdle;\r\n property OnMapPan: TMapClickEvent read FOnMapPan write FOnMapPan;\r\n property OnMapLoaded: TNotifyEvent read FOnMapLoaded write FOnMapLoaded;\r\n property OnMapZoom: TMapZoomEvent read FOnMapZoom write FOnMapZoom;\r\n property OnMarkerClick: TMapMarkerClickEvent read FOnMarkerClick write FOnMarkerClick;\r\n property OnPolygonClick: TMapPolygonClickEvent read FOnPolygonClick write FOnPolygonClick;\r\n property OnPolylineClick: TMapPolylineClickEvent read FOnPolylineClick write FOnPolylineClick;\r\n property OnCircleClick: TMapCircleClickEvent read FOnCircleClick write FOnCircleClick;\r\n property OnRectangleClick: TMapRectangleClickEvent read FOnRectangleClick write FOnRectangleClick;\r\n property OnKMLClick: TMapKMLClickEvent read FOnKMLClick write FOnKMLClick;\r\n end;\r\n\r\n TWebGoogleMaps = class(TGoogleMaps);\r\n\r\n TLeafletMaps = class;\r\n\r\n TLeafletMarkerEvent = procedure(Sender: TObject; Lon, Lat: double; ID: string) of object;\r\n\r\n TLeafletZoom = (lzTopLeft, lzTopRight, lzBottomLeft, lzBottomRight, lzNone);\r\n\r\n TLeafletMapsOptions = class(TPersistent)\r\n private\r\n FOwner: TLeafletMaps;\r\n FDefaultLongitude: Double;\r\n FZoomControl: TLeafletZoom;\r\n FDefaultZoomLevel: Integer;\r\n FDefaultLatitude: Double;\r\n procedure SetDefaultLatitude(const Value: Double);\r\n procedure SetDefaultLongitude(const Value: Double);\r\n procedure SetDefaultZoomLevel(const Value: Integer);\r\n procedure SetZoomControl(const Value: TLeafletZoom);\r\n\r\n public\r\n constructor Create(AOwner: TLeafletMaps);\r\n procedure Assign(Source: TPersistent); override;\r\n\r\n published\r\n property ZoomControl: TLeafletZoom read FZoomControl write SetZoomControl default lzTopLeft;\r\n property DefaultLatitude: Double read FDefaultLatitude write SetDefaultLatitude default -34.397;\r\n property DefaultLongitude: Double read FDefaultLongitude write SetDefaultLongitude default 150.644;\r\n property DefaultZoomLevel: Integer read FDefaultZoomLevel write SetDefaultZoomLevel default 13;\r\n end;\r\n\r\n TLeafletMaps = class(TCustomControl)\r\n private\r\n FMap: TJSHTMLElement;\r\n FMapObject: JSValue;\r\n FMarkerGroup: JSValue;\r\n FZoomControl: JSValue;\r\n FCircles: TList;\r\n FRectangles: TList;\r\n FPolygons: TList;\r\n FPolyLines: TList;\r\n FMapClickPtr: pointer;\r\n FMapDblClickPtr: pointer;\r\n FMapPanPtr: pointer;\r\n FMapZoomPtr: pointer;\r\n FMarkerClickPtr: pointer;\r\n FOnMapClick: TMapClickEvent;\r\n FOnMapDblClick: TMapClickEvent;\r\n FOnMapPan: TMapClickEvent;\r\n FOnMapZoom: TMapZoomEvent;\r\n FOnMarkerClick: TLeafletMarkerEvent;\r\n FOptions: TLeafletMapsOptions;\r\n procedure SetOptions(const Value: TLeafletMapsOptions);\r\n protected\r\n function GetMap: TJSHTMLElement;\r\n function CreateElement: TJSElement; override;\r\n procedure BindEvents; override;\r\n procedure InitScript; override;\r\n\r\n function HandleDoMouseDown(Event: TJSMouseEvent): Boolean; override;\r\n function HandleDoMouseUp(Event: TJSMouseEvent): Boolean; override;\r\n function HandleDoMouseMove(Event: TJSMouseEvent): Boolean; override;\r\n\r\n procedure DoHandleMapClick(AEvent: JSValue);\r\n procedure DoHandleMapDblClick(AEvent: JSValue);\r\n procedure DoHandleMapPan(AEvent: JSValue);\r\n procedure DoHandleMapZoom(AEvent: JSValue);\r\n procedure DoHandleMarkerclick(AEvent: JSValue);\r\n procedure ClearMethodPointers; override;\r\n procedure GetMethodPointers; override;\r\n procedure SetBoundsInt(X, Y, AWidth, AHeight: Integer); override;\r\n procedure SetZoomControl(const Value: TLeafletZoom);\r\n public\r\n procedure CreateInitialize; override;\r\n destructor Destroy; override;\r\n procedure SetCenter(Lat, Lon: Double);\r\n function GetCenter(var Lat, Lon: Double): Boolean;\r\n procedure SetZoom(Zoom: integer);\r\n procedure AddMarker(Lat,Lon: Double; ID: string = ''; Title: string = ''; Popup: string = ''); overload;\r\n procedure ClearMarkers;\r\n procedure AddPolyLine(Points: TJSArray; AColor: TColor = clRed;AWidth: integer = 2; AOpacity: Double = 1);\r\n procedure AddPolygon(Points: TJSArray; AFillColor: TColor = clRed; AStrokeColor: TColor = clBlack; AWidth: Integer = 2; AOpacity: Double = 1);\r\n procedure AddCircle(Lat, Lon: double; Radius: Integer; AFillColor: TColor = clRed; AStrokeColor: TColor = clBlack; AWidth: Integer = 2; AOpacity: double = 1);\r\n procedure AddRectangle(NorthEastLat, NorthEastLon, SouthWestLat, SouthWestLon: double; AFillColor: TColor = clRed; AStrokeColor: TColor = clBlack; AWidth: integer = 2; AOpacity: double = 1);\r\n procedure ClearPolylines;\r\n procedure ClearPolygons;\r\n procedure ClearCircles;\r\n procedure ClearRectangles;\r\n procedure LatLonToXY(Lat, Lon: double; var X, Y: integer);\r\n procedure XYToLatLon(X, Y: integer; var Lat, Lon: double);\r\n function Distance(Lon1,Lat1,Lon2,Lat2: double): double;\r\n published\r\n property Center;\r\n property Options: TLeafletMapsOptions read FOptions write SetOptions;\r\n property OnKeyUp;\r\n property OnKeyDown;\r\n property OnKeyPress;\r\n property OnMapClick: TMapClickEvent read FOnMapClick write FOnMapClick;\r\n property OnMapDblClick: TMapClickEvent read FOnMapDblClick write FOnMapDblClick;\r\n property OnMapPan: TMapClickEvent read FOnMapPan write FOnMapPan;\r\n property OnMapZoom: TMapZoomEvent read FOnMapZoom write FOnMapZoom;\r\n property OnMarkerClick: TLeafletMarkerEvent read FOnMarkerClick write FOnMarkerClick;\r\n property OnMouseDown;\r\n property OnMouseMove;\r\n property OnMouseUp;\r\n end;\r\n\r\n TWebLeafletMaps = class(TLeafletMaps);\r\n\r\n TDriveView = (dvList, dvGrid);\r\n\r\n TGoogleDrive = class(TCustomControl)\r\n private\r\n FView: TDriveView;\r\n FFolderID: string;\r\n FFrameHandle: TJSElement;\r\n procedure SetFolderID(const Value: string);\r\n procedure SetView(const Value: TDriveView);\r\n protected\r\n function CreateElement: TJSElement; override;\r\n procedure UpdateElement; override;\r\n public\r\n procedure CreateInitialize; override;\r\n published\r\n property FolderID: string read FFolderID write SetFolderID;\r\n property View: TDriveView read FView write SetView;\r\n end;\r\n\r\n TWebGoogleDrive = class(TGoogleDrive);\r\n\r\n TTwitterFeed = class(TCustomControl)\r\n private\r\n FUpdatedFeed: boolean;\r\n FFeed: string;\r\n FFeedLinkText: string;\r\n procedure SetFeed(const Value: string);\r\n procedure SetFeedLinkText(const Value: string);\r\n protected\r\n function CreateElement: TJSElement; override;\r\n procedure UpdateElement; override;\r\n public\r\n procedure CreateInitialize; override;\r\n published\r\n property Center;\r\n property Feed: string read FFeed write SetFeed;\r\n property FeedLinkText: string read FFeedLinkText write SetFeedLinkText;\r\n property Visible;\r\n end;\r\n\r\n TWebTwitterFeed = class(TTwitterFeed);\r\n\r\n THTMLDiv = class(TCustomControl)\r\n private\r\n FHTML: TStrings;\r\n FOldText: string;\r\n procedure SetHTML(const Value: TStrings);\r\n protected\r\n procedure UpdateElementData; override;\r\n procedure HTMLChanged(Sender: TObject);\r\n function CreateElement: TJSElement; override;\r\n public\r\n procedure CreateInitialize; override;\r\n destructor Destroy; override;\r\n published\r\n property Align;\r\n property AlignWithMargins;\r\n property Anchors;\r\n property Center;\r\n property ChildOrder;\r\n property DragMode;\r\n property ElementClassName;\r\n property ElementFont;\r\n property ElementID;\r\n property ElementPosition;\r\n property HeightPercent;\r\n property HeightStyle;\r\n property HTML: TStrings read FHTML write SetHTML;\r\n property Role;\r\n property Visible;\r\n property WidthPercent;\r\n property WidthStyle;\r\n property OnClick;\r\n property OnDblClick;\r\n property OnMouseDown;\r\n property OnMouseUp;\r\n property OnMouseMove;\r\n property OnMouseLeave;\r\n property OnMouseEnter;\r\n property OnTouchStart;\r\n property OnTouchEnd;\r\n property OnTouchMove;\r\n property OnTouchCancel;\r\n property OnDragDrop;\r\n property OnDragOver;\r\n property OnEndDrag;\r\n property OnStartDrag;\r\n end;\r\n\r\n TWebHTMLDiv = class(THTMLDiv);\r\n\r\n THTMLSpan = class(TCustomControl)\r\n private\r\n FHTML: TStrings;\r\n FOldText: string;\r\n procedure SetHTML(const Value: TStrings);\r\n protected\r\n procedure UpdateElementData; override;\r\n procedure HTMLChanged(Sender: TObject);\r\n function CreateElement: TJSElement; override;\r\n public\r\n procedure CreateInitialize; override;\r\n destructor Destroy; override;\r\n published\r\n property Align;\r\n property AlignWithMargins;\r\n property Anchors;\r\n property Center;\r\n property ChildOrder;\r\n property DragMode;\r\n property ElementClassName;\r\n property ElementFont;\r\n property ElementID;\r\n property ElementPosition;\r\n property HeightPercent;\r\n property HeightStyle;\r\n property HTML: TStrings read FHTML write SetHTML;\r\n property Role;\r\n property Visible;\r\n property WidthPercent;\r\n property WidthStyle;\r\n property OnClick;\r\n property OnDblClick;\r\n property OnMouseDown;\r\n property OnMouseUp;\r\n property OnMouseMove;\r\n property OnMouseLeave;\r\n property OnMouseEnter;\r\n property OnTouchStart;\r\n property OnTouchEnd;\r\n property OnTouchMove;\r\n property OnTouchCancel;\r\n property OnDragDrop;\r\n property OnDragOver;\r\n property OnEndDrag;\r\n property OnStartDrag;\r\n end;\r\n\r\n TWebHTMLSpan = class(THTMLSpan);\r\n\r\n THTMLAnchor = class(TCustomControl)\r\n private\r\n FHref: string;\r\n FTarget: string;\r\n procedure SetHref(const Value: string);\r\n procedure SetTarget(const Value: string);\r\n protected\r\n procedure SetCaption(const Value: string); override;\r\n function HandleDoClick(Event: TJSMouseEvent): Boolean; override;\r\n function CreateElement: TJSElement; override;\r\n procedure UpdateElementData; override;\r\n public\r\n procedure CreateInitialize; override;\r\n published\r\n property Align;\r\n property AlignWithMargins;\r\n property Anchors;\r\n property Caption;\r\n property Center;\r\n property ChildOrder;\r\n property ElementClassName;\r\n property ElementFont;\r\n property ElementID;\r\n property ElementPosition;\r\n property HeightPercent;\r\n property HeightStyle;\r\n property HRef: string read FHref write SetHref;\r\n property Target: string read FTarget write SetTarget;\r\n property Role;\r\n property Visible;\r\n property WidthPercent;\r\n property WidthStyle;\r\n property OnClick;\r\n property OnDblClick;\r\n property OnMouseDown;\r\n property OnMouseUp;\r\n property OnMouseMove;\r\n property OnMouseLeave;\r\n property OnMouseEnter;\r\n end;\r\n\r\n TWebHTMLAnchor = class(THTMLAnchor);\r\n\r\n TURLValidatorEvent = procedure(Sender: TObject; IsValid: boolean) of object;\r\n\r\n TURLValidator = class(TComponent)\r\n private\r\n FURL: string;\r\n FOnValidated: TURLValidatorEvent;\r\n protected\r\n procedure HandleResult(IsValid: boolean);\r\n public\r\n procedure Validate;\r\n published\r\n property URL: string read FURL write FURL;\r\n property OnValidated: TURLValidatorEvent read FOnValidated write FOnValidated;\r\n end;\r\n\r\n TWebURLValidator = class(TURLValidator);\r\n\r\n\r\n TJSHTMLFileArray = array of TJSHTMLFile;\r\n\r\n TShare = class(TComponent)\r\n private\r\n FTitle: string;\r\n FText: string;\r\n FURL: string;\r\n public\r\n function Share(ATitle,AText,AURL: string): boolean; virtual overload;\r\n function Share(ATitle,AText,AURL: string; AFiles: TJSHTMLFileArray): boolean; virtual overload;\r\n function CanShareFiles: boolean;\r\n function Execute: boolean;\r\n published\r\n property Title: string read FTitle write FTitle;\r\n property Text: string read FText write FText;\r\n property URL: string read FURL write FURL;\r\n end;\r\n\r\n TWebShare = class(TShare);\r\n\r\n TDeviceOrientationError = (oeDenied, oeNotSupported);\r\n\r\n TDeviceOrientationEvent = procedure(Sender: TObject; Heading: double) of object;\r\n TDeviceOrientationErrorEvent = procedure(Sender: TObject; AError: TDeviceOrientationError) of object;\r\n\r\n TDeviceOrientation = class(TComponent)\r\n private\r\n FOnHeadingChange: TDeviceOrientationEvent;\r\n FOnInitialized: TNotifyEvent;\r\n FOnError: TDeviceOrientationErrorEvent;\r\n FStarted: boolean;\r\n protected\r\n FOrientationPtr: pointer;\r\n function DoHandleOrientationEvent(e: TJSEvent): boolean;\r\n public\r\n function Enabled: boolean;\r\n procedure Start;\r\n property Started: boolean read FStarted;\r\n published\r\n property OnHeadingChange: TDeviceOrientationEvent read FOnHeadingChange write FOnHeadingChange;\r\n property OnInitialized: TNotifyEvent read FOnInitialized write FOnInitialized;\r\n property OnError: TDeviceOrientationErrorEvent read FOnError write FOnError;\r\n end;\r\n\r\n TWebDeviceOrientation = class(TDeviceOrientation);\r\n\r\n TSpeechSynthesis = class(TComponent)\r\n private\r\n FVolume: single;\r\n FPitch: single;\r\n FRate: single;\r\n FVoices: TStrings;\r\n FOnVoicesReady: TNotifyEvent;\r\n FVoice: string;\r\n procedure SetVolume(const Value: single);\r\n procedure SetPitch(const Value: single);\r\n procedure SetRate(const Value: single);\r\n procedure SetVoice(const Value: string);\r\n public\r\n constructor Create(AOwner: TComponent); override;\r\n destructor Destroy; override;\r\n procedure Speak(AText: string);\r\n procedure Cancel;\r\n function GetVoices: TStrings;\r\n property Voices: TStrings read FVoices;\r\n function IsSpeaking: boolean;\r\n function Supported: boolean;\r\n published\r\n property Pitch: single read FPitch write SetPitch;\r\n property Rate: single read FRate write SetRate;\r\n property Voice: string read FVoice write SetVoice;\r\n property Volume: single read FVolume write SetVolume;\r\n property OnVoicesReady: TNotifyEvent read FOnVoicesReady write FOnVoicesReady;\r\n end;\r\n\r\n TWebSpeechSynthesis = class(TSpeechSynthesis);\r\n\r\n TConsoleLog = class(TWebCustomControl)\r\n private\r\n FLog: TJSHTMLElement;\r\n FInit: boolean;\r\n FAutoScroll: boolean;\r\n protected\r\n function CreateElement: TJSElement; override;\r\n procedure UpdateElement; override;\r\n public\r\n procedure CreateInitialize; override;\r\n destructor Destroy; override;\r\n procedure Clear;\r\n published\r\n property AutoScroll: boolean read FAutoScroll write FAutoScroll default true;\r\n end;\r\n\r\n TWebConsoleLog = class(TConsoleLog);\r\n\r\nfunction GPXToCoordinates(AGPXData: string): TJSArray;\r\n\r\nimplementation\r\n\r\nuses\r\n WEBLib.Dialogs, WEBLib.WebTools;\r\n\r\nconst\r\n TWITTERSCRIPTID = 'twitterscriptid';\r\n LMapNotCreated = 'Map not created';\r\n\r\n\r\n{ TYouTube }\r\n\r\nfunction TYoutube.CreateElement: TJSElement;\r\nvar\r\n// LLabel: TJSHTMLElement;\r\n LDiv: TJSHTMLElement;\r\nbegin\r\n if (csDesigning in ComponentState) then\r\n begin\r\n LDiv := TJSHTMLElement(document.createElement('DIV'));\r\n {\r\n LLabel := TJSHTMLElement(document.createElement('DIV'));\r\n LLabel.innerHTML := 'TWebYouTube';\r\n BorderStyle := bsSingle;\r\n LLabel['align'] := 'center';\r\n LLabel.style.setProperty('border','1px solid gray');\r\n LLabel.style.setProperty('vertical-align','middle');\r\n LLabel.style.setProperty('display','table-cell');\r\n Result.appendChild(LLabel);\r\n }\r\n\r\n LDiv.style.setProperty('background-color','slategray');\r\n LDiv.style.setProperty('background-repeat','no-repeat');\r\n LDiv.style.setProperty('background-position-y','center');\r\n LDiv.style.setProperty('background-image',\r\n 'url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/PjxzdmcgdmVyc2lvbj0iMS4xIiB2aWV3Qm94PSIwIDAuNDc5OTk5OTU5NDY4ODQyIDE2OS43MDk4Njkz'+\r\n 'ODQ3NjYgMTE5LjA4NTYyODA5MjI4OSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+PG'+\r\n 'RlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJkZWYwIiB4MT0iMC41IiB4Mj0iMC41IiB5MT0iMSIgeTI9IjMuMTAwNzJFLTA2Ij48c3RvcCBvZmZzZXQ9IjAiIHN0b3AtY29sb3I9IiNG'+\r\n 'RjAwMDAiLz48c3RvcCBvZmZzZXQ9IjEiIHN0b3AtY29sb3I9IiNGRjZCMDAiLz48L2xpbmVhckdyYWRpZW50PjwvZGVmcz48Zz48cGF0aCBkPSJNMzEuMDI5MywxLjc3NzM0QzEzLj'+\r\n 'E0MjcsMi45OTQ2Nyw0LjE1NDY3LDYuMTIsMS40ODgsMjguNzkzM0wxLjQ4OCwyOC43OTMzQzAuNTA2NjY3LDM3LjEzNiwwLjAwOTMzMzMzLDQ4LjQwMTMsMCw1OS42OTg3TDAsNjAu'+\r\n 'MzQ1M0MwLjAwOTMzMzMzLDcxLjYyOTMsMC41MDQsODIuODg5MywxLjQ4OCw5MS4yNTA3TDEuNDg4LDkxLjI1MDdDNC4xNTQ2NywxMTMuOTI3LDEzLjE0MjcsMTE3LjA1MiwzMS4wMj'+\r\n 'kzLDExOC4yNjdMMzEuMDI5MywxMTguMjY3QzU2LjQ3NzMsMTIwLDExMy4yNTEsMTE5Ljk5NywxMzguNjgsMTE4LjI2N0wxMzguNjgsMTE4LjI2N0MxNTYuNTY4LDExNy4wNTIsMTY1'+\r\n 'LjU1NSwxMTMuOTI3LDE2OC4yMjMsOTEuMjUwN0wxNjguMjIzLDkxLjI1MDdDMTcwLjIwMyw3NC40MTczLDE3MC4yMDgsNDUuNjg2NywxNjguMjIzLDI4Ljc5MzNMMTY4LjIyMywyOC'+\r\n '43OTMzQzE2NS41NTUsNi4xMTg2OCwxNTYuNTY4LDIuOTk0NjcsMTM4LjY4LDEuNzc3MzRMMTM4LjY4LDEuNzc3MzRDMTI1Ljk2MywwLjkxMjAxLDEwNS4zOTcsMC40ODAwMDMsODQu'+\r\n 'ODQsMC40ODAwMDNMODQuODQsMC40ODAwMDNDNjQuMjkyLDAuNDc4Njc2LDQzLjc1MDcsMC45MTIwMSwzMS4wMjkzLDEuNzc3MzR6IiBmaWxsPSJ1cmwoI2RlZjApIi8+PHBhdGggZD'+\r\n '0iTTEwOC40MjUsNjAuMDIyN0w2Mi4yNDE5LDkxLjk0NjcgNjIuMjQxOSwyOC4wOTg3IDEwOC40MjUsNjAuMDIyN3oiIGZpbGw9IiNGRkZGRkYiLz48L2c+PC9zdmc+)');\r\n LDiv.style.setProperty('background-position-x','center');\r\n LDiv.style.setProperty('background-size','128px');\r\n Result := LDiv;\r\n end\r\n else\r\n begin\r\n Result := document.createElement('IFRAME');\r\n Result.setAttribute('id', GetID);\r\n Result.setAttribute('frameborder','0');\r\n end;\r\nend;\r\n\r\nprocedure TYoutube.UpdateElement;\r\nvar\r\n FURL: string;\r\nbegin\r\n inherited;\r\n\r\n if IsUpdating then\r\n Exit;\r\n\r\n if (csDesigning in ComponentState) then\r\n begin\r\n if Assigned(ElementHandle) then\r\n begin\r\n TJSHTMLElement(ElementHandle).style.setProperty('background-color','slategray');\r\n end;\r\n end;\r\n\r\n if Assigned(Container) then\r\n begin\r\n if FVideoID <> '' then\r\n begin\r\n FURL := 'https://www.youtube.com/embed/' + FVideoID;\r\n if AutoPlay then\r\n FURL := FURL + '?autoplay=1';\r\n Container.setAttribute('src', FURL);\r\n end;\r\n if FAllowFullScreen then\r\n Container.setAttribute('allowfullscreen','allowfullscreen')\r\n else\r\n Container.removeAttribute('allowfullscreen');\r\n end;\r\nend;\r\n\r\nprocedure TYoutube.UpdateElementVisual;\r\nbegin\r\n inherited;\r\n\r\n if IsUpdating then\r\n Exit;\r\n\r\n if (csDesigning in ComponentState) then\r\n begin\r\n if Assigned(ElementHandle) then\r\n begin\r\n TJSHTMLElement(ElementHandle).style.setProperty('background-color','slategray');\r\n end;\r\n end;\r\n\r\nend;\r\n\r\nprocedure TYoutube.CreateInitialize;\r\nbegin\r\n inherited;\r\n Width := 400;\r\n Height := 300;\r\nend;\r\n\r\nprocedure TYoutube.SetAllowFullScreen(const Value: boolean);\r\nbegin\r\n FAllowFullScreen := Value;\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TYoutube.SetVideoID(const Value: string);\r\nbegin\r\n FVideoID := Value;\r\n UpdateElement;\r\nend;\r\n\r\n{ TGoogleMaps }\r\n\r\n{$HINTS OFF}\r\nprocedure TGoogleMaps.AddPolyLine(Points: TJSArray; AColor: TColor = clRed; AWidth: integer = 2; AOpacity: double = 1);\r\nvar\r\n map: TJSHTMLElement;\r\n clr: string;\r\n ptr: Pointer;\r\nbegin\r\n ptr := @HandlePolylineClick;\r\n map := GetMap;\r\n clr := ColorToHTML(AColor);\r\n\r\n asm\r\n var poly = new google.maps.Polyline({\r\n map: map,\r\n \t path: Points,\r\n\t strokeColor: clr,\r\n \t strokeOpacity: AOpacity,\r\n \t strokeWeight: AWidth\r\n \t});\r\n\r\n poly.idx = this.FPolylines.length;\r\n poly.addListener('click', function() { ptr(poly); } );\r\n this.FPolylines.push(poly);\r\n end;\r\nend;\r\n\r\nprocedure TGoogleMaps.AddRectangle(NorthEastLat, NorthEastLon, SouthWestLat,\r\n SouthWestLon: double; AFillColor, AStrokeColor: TColor; AWidth: integer;\r\n AOpacity: double);\r\nvar\r\n map: TJSHTMLElement;\r\n clrF,clrS: string;\r\n ptr: Pointer;\r\nbegin\r\n ptr := @HandleRectangleClick;\r\n map := GetMap;\r\n clrF := ColorToHTML(AFillColor);\r\n clrS := ColorToHTML(AStrokeColor);\r\n\r\n asm\r\n var NELatLng = {lat: NorthEastLat, lng: NorthEastLon};\r\n var SWLatLng = {lat: SouthWestLat, lng: SouthWestLon};\r\n var rect = new google.maps.Rectangle({\r\n map: map,\r\n \t bounds: new google.maps.LatLngBounds(NELatLng, SWLatLng),\r\n fillColor: clrF,\r\n fillOpacity: AOpacity,\r\n\t strokeColor: clrS,\r\n \t strokeOpacity: AOpacity,\r\n \t strokeWeight: AWidth\r\n \t});\r\n\r\n rect.idx = this.FRectangles.length;\r\n rect.addListener('click', function() { ptr(rect); } );\r\n this.FRectangles.push(rect);\r\n end;\r\nend;\r\n\r\nprocedure TGoogleMaps.AddPolygon(Points: TJSArray; AFillColor: TColor = clRed; AStrokeColor: TColor = clBlack; AWidth: integer = 2; AOpacity: double = 1);\r\nvar\r\n map: TJSHTMLElement;\r\n clrF,clrS: string;\r\n ptr: Pointer;\r\nbegin\r\n ptr := @HandlePolygonClick;\r\n map := GetMap;\r\n clrF := ColorToHTML(AFillColor);\r\n clrS := ColorToHTML(AStrokeColor);\r\n\r\n asm\r\n var poly = new google.maps.Polygon({\r\n map: map,\r\n \t paths: Points,\r\n fillColor: clrF,\r\n fillOpacity: AOpacity,\r\n\t strokeColor: clrS,\r\n \t strokeOpacity: AOpacity,\r\n \t strokeWeight: AWidth\r\n \t});\r\n\r\n poly.idx = this.FPolygons.length;\r\n poly.addListener('click', function() { ptr(poly); } );\r\n this.FPolygons.push(poly);\r\n end;\r\nend;\r\n\r\nprocedure TGoogleMaps.AddCircle(Lat, Lon: double; Radius: Integer;\r\n AFillColor, AStrokeColor: TColor; AWidth: integer; AOpacity: double);\r\nvar\r\n map: TJSHTMLElement;\r\n clrF,clrS: string;\r\n ptr: Pointer;\r\nbegin\r\n ptr := @HandleCircleClick;\r\n map := GetMap;\r\n clrF := ColorToHTML(AFillColor);\r\n clrS := ColorToHTML(AStrokeColor);\r\n\r\n asm\r\n var myLatLng = {lat: Lat, lng: Lon};\r\n var circle = new google.maps.Circle({\r\n map: map,\r\n \t center: myLatLng,\r\n radius: Radius,\r\n fillColor: clrF,\r\n fillOpacity: AOpacity,\r\n\t strokeColor: clrS,\r\n \t strokeOpacity: AOpacity,\r\n \t strokeWeight: AWidth\r\n \t});\r\n\r\n circle.idx = this.FCircles.length;\r\n circle.addListener('click', function() { ptr(circle); } );\r\n this.FCircles.push(circle);\r\n end;\r\nend;\r\n\r\nprocedure TGoogleMaps.AddMarker(Lat, Lon: double; Title: string = '');\r\nvar\r\n map: TJSHTMLElement;\r\n ptr: Pointer;\r\nbegin\r\n ptr := @HandleMarkerClick;\r\n map := GetMap;\r\n asm\r\n var myLatLng = {lat: Lat, lng: Lon};\r\n var marker = new google.maps.Marker({\r\n position: myLatLng,\r\n map: map,\r\n title: Title\r\n });\r\n marker.idx = this.FMarkers.length;\r\n marker.addListener('click', function() { ptr(marker); } );\r\n this.FMarkers.push(marker);\r\n end;\r\nend;\r\n\r\nprocedure TGoogleMaps.AddMarker(Lat, Lon: double; Color: TGoogleMarkerColor; Title: string);\r\nvar\r\n map: TJSHTMLElement;\r\n clr: string;\r\n ptr: Pointer;\r\nbegin\r\n ptr := @HandleMarkerClick;\r\n\r\n case Color of\r\n mcDefault: clr := '';\r\n mcRed: clr := 'red-dot.png';\r\n mcGreen: clr := 'green-dot.png';\r\n mcYellow: clr := 'yellow-dot.png';\r\n mcPurple: clr := 'purple-dot.png';\r\n mcBlue: clr := 'blue-dot.png';\r\n end;\r\n\r\n map := GetMap;\r\n asm\r\n var myLatLng = {lat: Lat, lng: Lon};\r\n\r\n var marker = new google.maps.Marker({\r\n position: myLatLng,\r\n map: map,\r\n title: Title\r\n });\r\n\r\n if (clr != \"\") {\r\n marker.setIcon('http://maps.google.com/mapfiles/ms/icons/' + clr);\r\n }\r\n marker.idx = this.FMarkers.length;\r\n marker.addListener('click', function() { ptr(marker); } );\r\n\r\n this.FMarkers.push(marker);\r\n end;\r\nend;\r\n\r\nprocedure TGoogleMaps.AddMarker(Lat, Lon: double; Color: TColor; PinLetter: string; Title: string);\r\nvar\r\n map: TJSHTMLElement;\r\n clr,url: string;\r\n ch: string;\r\n ptr: Pointer;\r\nbegin\r\n ptr := @HandleMarkerClick;\r\n\r\n clr := ColorToHTML(Color);\r\n delete(clr,1,1);\r\n map := GetMap;\r\n asm\r\n var myLatLng = {lat: Lat, lng: Lon};\r\n\r\n url = \"http://chart.apis.google.com/chart?chst=d_map_pin_letter&chld=\"+ PinLetter + \"|\" + clr;\r\n\r\n var pinImage = new google.maps.MarkerImage(url);\r\n\r\n var marker = new google.maps.Marker({\r\n position: myLatLng,\r\n map: map,\r\n title: Title,\r\n icon: pinImage\r\n });\r\n marker.idx = this.FMarkers.length;\r\n marker.addListener('click', function() { ptr(marker); } );\r\n\r\n this.FMarkers.push(marker);\r\n end;\r\nend;\r\n\r\nprocedure TGoogleMaps.AddMarker(Lat, Lon: double; PinIcon, Title: string; XOffset: integer = 0; YOffset: integer = 0);\r\nvar\r\n map: TJSHTMLElement;\r\n ptr: Pointer;\r\nbegin\r\n ptr := @HandleMarkerClick;\r\n\r\n map := GetMap;\r\n asm\r\n var pinImage = new google.maps.MarkerImage(PinIcon, null, null,new google.maps.Point(XOffset, YOffset));\r\n var myLatLng = {lat: Lat, lng: Lon};\r\n var marker = new google.maps.Marker({\r\n position: myLatLng,\r\n map: map,\r\n title: Title,\r\n icon: pinImage\r\n });\r\n marker.idx = this.FMarkers.length;\r\n marker.addListener('click', function() { ptr(marker); } );\r\n\r\n this.FMarkers.push(marker);\r\n end;\r\nend;\r\n\r\nprocedure TGoogleMaps.AddMarker(Lat, Lon: double; Shape: TGoogleMarkerShape;\r\n Color: TColor; Title: string);\r\n begin\r\n AddMarker(Lat, Lon, Shape, Color, clBlack, 1, Title);\r\n end;\r\n\r\nprocedure TGoogleMaps.AddGPX(AGPX: string; AColor: TColor; AWidth: integer;\r\n AOpacity: double);\r\nvar\r\n Points: TJSArray;\r\n LatMax,LonMax,LatMin,LonMin: double;\r\nbegin\r\n Points := TJSArray.new;\r\n asm\r\n var parser = new DOMParser();\r\n var doc = parser.parseFromString(AGPX, 'text/xml');\r\n var trk = doc.getElementsByTagName(\"trk\")[0];\r\n var name = trk.getElementsByTagName(\"name\")[0];\r\n var trkseg = doc.getElementsByTagName(\"trkseg\")[0];\r\n var i = trkseg.getElementsByTagName(\"trkpt\").length;\r\n var trkpt;\r\n var j;\r\n var lat;\r\n var lon;\r\n var bounds = new google.maps.LatLngBounds ();\r\n\r\n for (j= 0; j < i; j++)\r\n {\r\n trkpt = trkseg.getElementsByTagName(\"trkpt\")[j];\r\n lat = trkpt.getAttribute('lat');\r\n lon = trkpt.getAttribute('lon');\r\n\r\n var p = new google.maps.LatLng(lat, lon);\r\n \t Points.push(p);\r\n bounds.extend(p);\r\n }\r\n LatMax = bounds.getNorthEast().lat();\r\n LonMax = bounds.getNorthEast().lng();\r\n\r\n LatMin = bounds.getSouthWest().lat();\r\n LonMin = bounds.getSouthWest().lng();\r\n end;\r\n\r\n AddPolyLine(Points, AColor, AWidth, AOpacity);\r\n FitBounds(LatMin, LonMin, LatMax, LonMax);\r\nend;\r\n\r\nprocedure TGoogleMaps.AddKML(Url: string; ZoomToBounds: Boolean);\r\nvar\r\n map: TJSHTMLElement;\r\n clr: string;\r\n ptr: Pointer;\r\nbegin\r\n ptr := @HandleKMLClick;\r\n map := GetMap;\r\n\r\n asm\r\n var kml = new google.maps.KmlLayer(Url, {\r\n map: map,\r\n clickable: true,\r\n preserveViewport: !ZoomToBounds\r\n \t});\r\n\r\n kml.idx = this.FKMLs.length;\r\n kml.addListener('click', function() { ptr(kml); } );\r\n this.FKMLs.push(kml);\r\n end;\r\nend;\r\n\r\nprocedure TGoogleMaps.AddMarker(Lat, Lon: double; Shape: TGoogleMarkerShape;\r\n Color: TColor; BorderColor: TColor; Scale: Double; CustomShape: string; Title: string);\r\nvar\r\n map: TJSHTMLElement;\r\n clr: string;\r\n bclr: string;\r\n pth: string;\r\n scl: string;\r\n ptr: pointer;\r\nbegin\r\n ptr := @HandleMarkerClick;\r\n map := GetMap;\r\n clr := ColorToHTML(Color);\r\n bclr := ColorToHTML(BorderColor);\r\n scl := StringReplace(FloatToStr(Scale), ',', '.', []);\r\n\r\n case Shape of\r\n msPin: pth:= 'M 0,0 C -2,-20 -10,-22 -10,-30 A 10,10 0 1,1 10,-30 C 10,-22 2,-20 0,0 z';\r\n msPinDot: pth := 'M 0,0 C -2,-20 -10,-22 -10,-30 A 10,10 0 1,1 10,-30 C 10,-22 2,-20 0,0 z M -2,-30 a 2,2 0 1,1 4,0 2,2 0 1,1 -4,0';\r\n msFlag: pth := 'M 0,0 -1,-2 V -43 H 1 V -2 z M 1,-40 H 30 V -20 H 1 z';\r\n msBookmark: pth := 'M17 3h-10c-1.1 0-1.99.9-1.99 2l-.01 16 7-3 7 3v-16c0-1.1-.9-2-2-2z';\r\n msFlagSmall: pth := 'M14.4 6l-.4-2h-9v17h2v-7h5.6l.4 2h7v-10z';\r\n msHome: pth := 'M10 20v-6h4v6h5v-8h3l-10-9-10 9h3v8z';\r\n msFavorite: pth := 'M12 21.35l-1.45-1.32c-5.15-4.67-8.55-7.75-8.55-11.53 0-3.08 2.42-5.5 5.5-5.5 1.74 0 3.41.81 4.5 2.09 1.09-1.28 2.76-2.09 4.5-2.09 3.08 0 5.5 2.42 5.5 5.5 0 3.78-3.4 6.86-8.55 11.54l-1.45 1.31z';\r\n msStar: pth := 'M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z';\r\n msCustom: pth := CustomShape;\r\n end;\r\n\r\n asm\r\n function pinSymbol(color, bcolor, scale) {\r\n return {\r\n path: pth,\r\n fillColor: color,\r\n fillOpacity: 1,\r\n strokeColor: bcolor,\r\n strokeWeight: 1,\r\n scale: parseFloat(scale),\r\n };\r\n }\r\n var myLatLng = {lat: Lat, lng: Lon};\r\n var marker = new google.maps.Marker({\r\n position: myLatLng,\r\n map: map,\r\n title: Title,\r\n icon: pinSymbol(clr, bclr, scl)\r\n });\r\n marker.idx = this.FMarkers.length;\r\n marker.addListener('click', function() { ptr(marker); } );\r\n\r\n this.FMarkers.push(marker);\r\n end;\r\nend;\r\n\r\nprocedure TGoogleMaps.BindEvents;\r\nvar\r\n map: TJSHTMLElement;\r\n ptr1,ptr2,ptr3,ptr4,ptr5: pointer;\r\n dirsvc, dirdispl: TJSElement;\r\nbegin\r\n inherited;\r\n\r\n if IsUpdating then\r\n Exit;\r\n\r\n map := GetMap;\r\n\r\n if Assigned(map) and not FBound and not (csDesigning in ComponentState) then\r\n begin\r\n ptr1 := @HandleMapClick;\r\n ptr2 := @HandleMapDblClick;\r\n ptr3 := @HandleMapPan;\r\n ptr4 := @HandleMapZoom;\r\n ptr5 := @HandleMapIdle;\r\n\r\n asm\r\n this.FMarkers = [];\r\n this.FPolygons = [];\r\n this.FPolylines = [];\r\n this.FCircles = [];\r\n this.FRectangles = [];\r\n this.FKMLs = [];\r\n end;\r\n\r\n\r\n asm\r\n dirsvc = new google.maps.DirectionsService;\r\n dirdispl = new google.maps.DirectionsRenderer;\r\n dirdispl.setMap(map);\r\n map.addListener('click', ptr1);\r\n map.addListener('dblclick', ptr2);\r\n map.addListener('center_changed',ptr3);\r\n map.addListener('zoom_changed',ptr4);\r\n map.addListener('tilesloaded',ptr5);\r\n end;\r\n\r\n FDirectionsService := dirsvc;\r\n FDirectionsDisplay := dirdispl;\r\n\r\n FBound := true;\r\n end;\r\nend;\r\n{$HINTS ON}\r\n\r\n\r\nprocedure TGoogleMaps.ClearCircles;\r\nbegin\r\n asm\r\n for (var i = 0; i < this.FCircles.length; i++) {\r\n this.FCircles[i].setMap(null);\r\n }\r\n this.FMarkers = [];\r\n end;\r\nend;\r\n\r\nprocedure TGoogleMaps.ClearKMLs;\r\nbegin\r\n asm\r\n for (var i = 0; i < this.FKMLs.length; i++) {\r\n this.FKMLs[i].setMap(null);\r\n }\r\n this.FKMLs = [];\r\n end;\r\nend;\r\n\r\nprocedure TGoogleMaps.ClearMarkers;\r\nbegin\r\n asm\r\n for (var i = 0; i < this.FMarkers.length; i++) {\r\n this.FMarkers[i].setMap(null);\r\n }\r\n this.FMarkers = [];\r\n end;\r\nend;\r\n\r\nprocedure TGoogleMaps.ClearPolygons;\r\nbegin\r\n asm\r\n for (var i = 0; i < this.FPolygons.length; i++) {\r\n this.FPolygons[i].setMap(null);\r\n }\r\n this.FPolyLines = [];\r\n end;\r\nend;\r\n\r\nprocedure TGoogleMaps.ClearPolyLines;\r\nbegin\r\n asm\r\n for (var i = 0; i < this.FPolylines.length; i++) {\r\n this.FPolylines[i].setMap(null);\r\n }\r\n this.FPolyLines = [];\r\n end;\r\nend;\r\n\r\nprocedure TGoogleMaps.ClearRectangles;\r\nbegin\r\n asm\r\n for (var i = 0; i < this.FRectangles.length; i++) {\r\n this.FRectangles[i].setMap(null);\r\n }\r\n this.FRectangles = [];\r\n end;\r\nend;\r\n\r\nfunction TGoogleMaps.CreateElement: TJSElement;\r\nbegin\r\n FDirectionsService := nil;\r\n FDirectionsDisplay := nil;\r\n\r\n Result := document.createElement('DIV');\r\n Result.setAttribute('id', GetID);\r\n FMap := nil;\r\nend;\r\n\r\nprocedure TGoogleMaps.CreateInitialize;\r\nbegin\r\n inherited;\r\n FOptions := TGoogleMapsOptions.Create(Self);\r\n Width := 400;\r\n Height := 300;\r\nend;\r\n\r\nfunction TGoogleMaps.Distance(Lon1, Lat1, Lon2, Lat2: double): double;\r\nbegin\r\n Result := 0;\r\n asm\r\n var R = 3958.8; // Radius of the Earth in miles\r\n var rlat1 = Lat1 * (Math.PI/180); // Convert degrees to radians\r\n var rlat2 = Lat2 * (Math.PI/180); // Convert degrees to radians\r\n var difflat = rlat2-rlat1; // Radian difference (latitudes)\r\n var difflon = (Lon2-Lon1) * (Math.PI/180); // Radian difference (longitudes)\r\n var d = 2 * R * Math.asin(Math.sqrt(Math.sin(difflat/2)*Math.sin(difflat/2)+Math.cos(rlat1)*Math.cos(rlat2)*Math.sin(difflon/2)*Math.sin(difflon/2)));\r\n Result = d;\r\n end;\r\nend;\r\n\r\nfunction TGoogleMaps.DoLoaded(Event: TEventListenerEvent): boolean;\r\nbegin\r\n BindEvents;\r\n Result := true;\r\n\r\n Options.SetMapStyle(Options.MapStyle);\r\n\r\n if Cursor <> crDefault then\r\n SetControlCursor(Cursor);\r\n\r\n if Assigned(OnMapLoaded) then\r\n OnMapLoaded(Self);\r\nend;\r\n\r\n{$HINTS OFF}\r\nprocedure TGoogleMaps.FitBounds(LatMin, LonMin, LatMax, LonMax: double);\r\nvar\r\n map: TJSHTMLElement;\r\nbegin\r\n map := GetMap;\r\n\r\n if Assigned(map) and GoogleLoaded then\r\n begin\r\n asm\r\n var ne = new google.maps.LatLng(LatMax, LonMax);\r\n var sw = new google.maps.LatLng(LatMin, LonMin);\r\n var bounds = new google.maps.LatLngBounds(sw,ne);\r\n map.fitBounds(bounds);\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TGoogleMaps.Loaded;\r\nbegin\r\n inherited;\r\nend;\r\n\r\nprocedure TGoogleMaps.MoveMarker(AIndex: integer; NewLat, NewLon: double);\r\nvar\r\n marker: JSValue;\r\nbegin\r\n marker := Markers[AIndex];\r\n asm\r\n var latlng = new google.maps.LatLng(NewLat,NewLon);\r\n marker.setPosition(latlng);\r\n end;\r\nend;\r\n{$HINTS ON}\r\n\r\n\r\nprocedure TGoogleMaps.GeoCode(const Address: string);\r\nvar\r\n FURL: string;\r\nbegin\r\n FReq := TJSXMLHttpRequest.new;\r\n FReq.addEventListener('load', @HandleResponse);\r\n FReq.addEventListener('abort',@HandleAbort);\r\n\r\n FURL := 'https://maps.googleapis.com/maps/api/geocode/json?address=' + encodeURIComponent(Address) +'&key=' + APIKey;\r\n FReq.open('GET', FURL);\r\n FReq.send;\r\nend;\r\n\r\n{$HINTS OFF}\r\nprocedure TGoogleMaps.PanTo(Lat, Lon: double);\r\nvar\r\n map: TJSHTMLElement;\r\nbegin\r\n map := GetMap;\r\n if Assigned(map) and GoogleLoaded then\r\n begin\r\n asm\r\n map.panTo(new google.maps.LatLng(Lat, Lon));\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TGoogleMaps.PanToBounds(Lat1, Lon1, Lat2, Lon2: double);\r\nvar\r\n bounds: JSValue;\r\n map: TJSHTMLElement;\r\nbegin\r\n map := GetMap;\r\n if Assigned(map) and GoogleLoaded then\r\n begin\r\n bounds := GetBBox(Lon1,Lat1,Lon2,Lat2);\r\n asm\r\n map.panToBounds(bounds);\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TGoogleMaps.GetMap: TJSHTMLElement;\r\nvar\r\n map: TJSHTMLElement;\r\n id: string;\r\nbegin\r\n if Assigned(FMap) then\r\n Result := FMap\r\n else\r\n begin\r\n map := nil;\r\n\r\n id := GetID;\r\n asm\r\n var el = document.getElementById(id);\r\n if (el != null) {\r\n map = el.gMap;\r\n }\r\n end;\r\n\r\n Result := map;\r\n if Assigned(map) then\r\n FMap := Result;\r\n end;\r\nend;\r\n\r\nfunction TGoogleMaps.GetBounds(var NorthEastLat, NorthEastLon, SouthWestLat,\r\n SouthWestLon: Double): Boolean;\r\nvar\r\n neLon, neLat, swLon, swLat: String;\r\nbegin\r\n Result := false;\r\n NorthEastLon := -1;\r\n NorthEastLat := -1;\r\n SouthWestLon := -1;\r\n SouthWestLat := -1;\r\n\r\n asm\r\n neLon = map.getBounds().getNorthEast().lng().toString();\r\n neLat = map.getBounds().getNorthEast().lat().toString();\r\n swLon = map.getBounds().getSouthWest().lng().toString();\r\n swLat = map.getBounds().getSouthWest().lat().toString();\r\n end;\r\n\r\n if (neLon <> '') and (neLat <> '') and (swLon <> '') and (swLat <> '') then\r\n begin\r\n NorthEastLon := StrToFloat(swLon);\r\n NorthEastLat := StrToFloat(swLat);\r\n SouthWestLon := StrToFloat(swLon);\r\n SouthWestLat := StrToFloat(swLat);\r\n Result := true;\r\n end;\r\nend;\r\n\r\nfunction TGoogleMaps.GetBBox(Lon1, Lat1, Lon2, Lat2: double): JSValue;\r\nvar\r\n SW,NE: JSValue;\r\nbegin\r\n SW := GetCoord(Lon1,Lat1);\r\n NE := GetCoord(Lon2,Lat2);\r\n\r\n asm\r\n Result = new google.maps.LatLngBounds(SW,NE);\r\n end;\r\nend;\r\n\r\nfunction TGoogleMaps.GetCenter(var Lat, Lon: Double): Boolean;\r\nvar\r\n sLon, sLat: String;\r\nbegin\r\n Result := false;\r\n Lon := -1;\r\n Lat := -1;\r\n\r\n asm\r\n sLon = map.getCenter().lng().toString();\r\n sLat = map.getCenter().lat().toString();\r\n end;\r\n\r\n if (sLon <> '') and (sLat <> '') then\r\n begin\r\n Lon := StrToFloat(sLon);\r\n Lat := StrToFloat(sLat);\r\n Result := true;\r\n end;\r\nend;\r\n\r\nfunction TGoogleMaps.GetCircle(AIndex: integer): TJSObject;\r\nvar\r\n res: TJSObject;\r\nbegin\r\n asm\r\n res = this.FCircles[AIndex];\r\n end;\r\n\r\n Result := res;\r\nend;\r\n\r\nfunction TGoogleMaps.GetCoord(Lon, Lat: double): JSValue;\r\nbegin\r\n asm\r\n Result = new google.maps.LatLng(Lat,Lon);\r\n end;\r\nend;\r\n\r\nfunction TGoogleMaps.GetMarker(AIndex: integer): TJSObject;\r\nvar\r\n res: TJSObject;\r\nbegin\r\n asm\r\n res = this.FMarkers[AIndex];\r\n end;\r\n\r\n Result := res;\r\nend;\r\n\r\nfunction TGoogleMaps.GetPolygon(AIndex: integer): TJSObject;\r\nvar\r\n res: TJSObject;\r\nbegin\r\n asm\r\n res = this.FPolygon[AIndex];\r\n end;\r\n\r\n Result := res;\r\nend;\r\n\r\nfunction TGoogleMaps.GetPolyline(AIndex: integer): TJSObject;\r\nvar\r\n res: TJSObject;\r\nbegin\r\n asm\r\n res = this.FPolyline[AIndex];\r\n end;\r\n\r\n Result := res;\r\nend;\r\n\r\nfunction TGoogleMaps.GetRectangle(AIndex: integer): TJSObject;\r\nvar\r\n res: TJSObject;\r\nbegin\r\n asm\r\n res = this.FGetRectangle[AIndex];\r\n end;\r\n\r\n Result := res;\r\nend;\r\n\r\nfunction TGoogleMaps.GoogleLoaded: boolean;\r\nvar\r\n res: boolean;\r\nbegin\r\n res := false;\r\n\r\n asm\r\n if (typeof google === 'object' && typeof google.maps === 'object')\r\n {\r\n res = true;\r\n }\r\n end;\r\n\r\n Result := res;\r\nend;\r\n\r\nfunction TGoogleMaps.HandleAbort(Event: TEventListenerEvent): boolean;\r\nbegin\r\n //\r\n Result := true;\r\nend;\r\n\r\nprocedure TGoogleMaps.HandleCircleClick(e: TJSEvent);\r\nvar\r\n idx: integer;\r\n LObjRec: TJSObjectRecord;\r\nbegin\r\n asm\r\n idx = e.idx;\r\n end;\r\n\r\n if Assigned(OnCircleClick) then\r\n begin\r\n LObjRec.jsobject := TJSObject(e);\r\n OnCircleClick(Self, idx, LObjRec);\r\n end;\r\nend;\r\n\r\nprocedure TGoogleMaps.HandleKMLClick(e: TJSEvent);\r\nvar\r\n idx: integer;\r\n LObjRec: TJSObjectRecord;\r\nbegin\r\n asm\r\n idx = e.idx;\r\n end;\r\n\r\n if Assigned(OnKMLClick) then\r\n begin\r\n LObjRec.jsobject := TJSObject(e);\r\n OnKMLClick(Self, idx, LObjRec);\r\n end;\r\nend;\r\n\r\nprocedure TGoogleMaps.HandleRectangleClick(e: TJSEvent);\r\nvar\r\n idx: integer;\r\n LObjRec: TJSObjectRecord;\r\nbegin\r\n asm\r\n idx = e.idx;\r\n end;\r\n\r\n if Assigned(OnRectangleClick) then\r\n begin\r\n LObjRec.jsobject := TJSObject(e);\r\n OnRectangleClick(Self, idx, LObjRec);\r\n end;\r\nend;\r\n\r\nprocedure TGoogleMaps.HandleMapClick(e: TJSEvent);\r\nvar\r\n lon,lat: double;\r\nbegin\r\n asm\r\n lon = e.latLng.lng();\r\n lat = e.latLng.lat();\r\n end;\r\n\r\n if Assigned(OnMapClick) then\r\n OnMapClick(Self, lon, lat);\r\nend;\r\n\r\nprocedure TGoogleMaps.HandleMapDblClick(e: TJSEvent);\r\nvar\r\n lon,lat: double;\r\nbegin\r\n asm\r\n lon = e.latLng.lng();\r\n lat = e.latLng.lat();\r\n end;\r\n\r\n if Assigned(OnMapDblClick) then\r\n OnMapDblClick(Self, lon, lat);\r\nend;\r\n\r\nprocedure TGoogleMaps.HandleMapIdle(e: TJSEvent);\r\nbegin\r\n if Assigned(OnMapIdle) then\r\n OnMapIdle(Self);\r\nend;\r\n\r\nprocedure TGoogleMaps.HandleMapPan(e: TJSEvent);\r\nvar\r\n lon,lat: double;\r\nbegin\r\n asm\r\n var c = map.getCenter();\r\n lon = c.lng();\r\n lat = c.lat();\r\n end;\r\n\r\n if Assigned(OnMapPan) then\r\n OnMapPan(Self, lon, lat);\r\nend;\r\n\r\nprocedure TGoogleMaps.HandleMapZoom(e: TJSEvent);\r\nvar\r\n map: TJSHTMLElement;\r\n zoom: integer;\r\nbegin\r\n map := GetMap;\r\n asm\r\n zoom = map.getZoom();\r\n end;\r\n if Assigned(OnMapZoom) then\r\n OnMapZoom(Self, zoom);\r\nend;\r\n\r\nprocedure TGoogleMaps.HandleMarkerClick(e: TJSEvent);\r\nvar\r\n idx: integer;\r\n LObjRec: TJSObjectRecord;\r\nbegin\r\n asm\r\n idx = e.idx;\r\n end;\r\n\r\n if Assigned(OnMarkerClick) then\r\n begin\r\n LObjRec.jsobject := TJSObject(e);\r\n OnMarkerClick(Self, idx, LObjRec);\r\n end;\r\nend;\r\n\r\n\r\nprocedure TGoogleMaps.HandlePolygonClick(e: TJSEvent);\r\nvar\r\n idx: integer;\r\n LObjRec: TJSObjectRecord;\r\nbegin\r\n asm\r\n idx = e.idx;\r\n end;\r\n\r\n if Assigned(OnPolygonClick) then\r\n begin\r\n LObjRec.jsobject := TJSObject(e);\r\n OnPolygonClick(Self, idx, LObjRec);\r\n end;\r\nend;\r\n\r\nprocedure TGoogleMaps.HandlePolylineClick(e: TJSEvent);\r\nvar\r\n idx: integer;\r\n LObjRec: TJSObjectRecord;\r\nbegin\r\n asm\r\n idx = e.idx;\r\n end;\r\n\r\n if Assigned(OnPolylineClick) then\r\n begin\r\n LObjRec.jsobject := TJSObject(e);\r\n OnPolylineClick(Self, idx, LObjRec);\r\n end;\r\nend;\r\n\r\nfunction TGoogleMaps.HandleResponse(Event: TEventListenerEvent): boolean;\r\nvar\r\n fnd: boolean;\r\n reslat, reslon: double;\r\nbegin\r\n Result := true;\r\n fnd := false;\r\n\r\n asm\r\n var s = Event.target.responseText;\r\n var js = JSON.parse(s);\r\n if (js.status == \"OK\") {\r\n fnd = true;\r\n var lat = js.results[0].geometry.location.lat;\r\n var lng = js.results[0].geometry.location.lng;\r\n reslon = lng;\r\n reslat = lat;\r\n }\r\n end;\r\n\r\n if fnd and Assigned(OnGeoCoded) then\r\n begin\r\n OnGeoCoded(Self, reslon, reslat);\r\n end;\r\nend;\r\n\r\nprocedure TGoogleMaps.RemoveDirections;\r\nvar\r\n dirdispl: TJSElement;\r\nbegin\r\n if not Assigned(FDirectionsDisplay) then\r\n BindEvents;\r\n\r\n dirdispl := FDirectionsDisplay;\r\n\r\n asm\r\n dirdispl.setMap(null);\r\n end;\r\nend;\r\n{$HINTS ON}\r\n\r\n\r\nprocedure TGoogleMaps.SetAPIKey(const Value: string);\r\nbegin\r\n if FAPIKey <> Value then\r\n begin\r\n FAPIKey := Value;\r\n UpdateElement;\r\n end;\r\nend;\r\n\r\n{$HINTS OFF}\r\nprocedure TGoogleMaps.SetCenter(Lat, Lon: double);\r\nvar\r\n map: TJSHTMLElement;\r\nbegin\r\n map := GetMap;\r\n if Assigned(map) then\r\n begin\r\n asm\r\n map.setCenter(new google.maps.LatLng(Lat, Lon));\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TGoogleMaps.SetDoubleClickZoom(AValue: Boolean);\r\nvar\r\n map: TJSHTMLElement;\r\nbegin\r\n map := GetMap;\r\n if Assigned(map) then\r\n begin\r\n asm\r\n map.setOptions( {disableDoubleClickZoom:!AValue} );\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TGoogleMaps.SetDraggable(AValue: Boolean);\r\nvar\r\n map: TJSHTMLElement;\r\nbegin\r\n map := GetMap;\r\n if Assigned(map) then\r\n begin\r\n asm\r\n map.setOptions( {draggable:AValue} );\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TGoogleMaps.SetHeading(AHeading: double);\r\nvar\r\n map: TJSHTMLElement;\r\nbegin\r\n map := GetMap;\r\n if Assigned(map) then\r\n begin\r\n asm\r\n map.setHeading(AHeading);\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TGoogleMaps.SetMapID(const Value: string);\r\nbegin\r\n if FMapID <> Value then\r\n begin\r\n FMapID := Value;\r\n UpdateElement;\r\n end;\r\nend;\r\n\r\nprocedure TGoogleMaps.SetMapRender(const Value: TGoogleMapsRender);\r\nbegin\r\n if FMapRender <> Value then\r\n begin\r\n FMapRender := Value;\r\n UpdateElement;\r\n end;\r\nend;\r\n\r\nprocedure TGoogleMaps.SetMapType(AMapType: TGoogleMapType);\r\nvar\r\n map: TJSHTMLElement;\r\n smt: string;\r\nbegin\r\n map := GetMap;\r\n\r\n case AMapType of\r\n mtDefault: smt := 'roadmap';\r\n mtSatellite: smt := 'satellite';\r\n mtHybrid: smt := 'hybrid';\r\n mtTerrain: smt := 'terrain';\r\n end;\r\n\r\n asm\r\n map.setMapTypeId(smt);\r\n end;\r\nend;\r\n\r\nprocedure TGoogleMaps.RemoveCircle(AIndex: Integer);\r\nbegin\r\n asm\r\n if (AIndex < this.FPolygons.length)\r\n {\r\n this.FCircles[AIndex].setMap(null);\r\n this.FCircles.splice(AIndex, 1);\r\n }\r\n end;\r\nend;\r\n\r\n\r\nprocedure TGoogleMaps.RemoveMarker(AIndex: Integer);\r\nbegin\r\n asm\r\n if (AIndex < this.FMarkers.length)\r\n {\r\n this.FMarkers[AIndex].setMap(null);\r\n this.FMarkers.splice(AIndex, 1);\r\n }\r\n end;\r\nend;\r\n\r\nprocedure TGoogleMaps.RemovePolygon(AIndex: Integer);\r\nbegin\r\n asm\r\n if (AIndex < this.FPolygons.length)\r\n {\r\n this.FPolygons[AIndex].setMap(null);\r\n this.FPolygons.splice(AIndex, 1);\r\n }\r\n end;\r\nend;\r\n\r\nprocedure TGoogleMaps.RemovePolyline(AIndex: Integer);\r\nbegin\r\n asm\r\n if (AIndex < this.FPolylines.length)\r\n {\r\n this.FPolylines[AIndex].setMap(null);\r\n this.FPolylines.splice(AIndex, 1);\r\n }\r\n end;\r\nend;\r\n\r\nprocedure TGoogleMaps.RemoveRectangle(AIndex: Integer);\r\nbegin\r\n asm\r\n if (AIndex < this.FPolygons.length)\r\n {\r\n this.FRectangles[AIndex].setMap(null);\r\n this.FRectangles.splice(AIndex, 1);\r\n }\r\n end;\r\nend;\r\n\r\nprocedure TGoogleMaps.SetMarkerIcon(AIndex: Integer; Url: string);\r\nbegin\r\n asm\r\n if (AIndex < this.FMarkers.length)\r\n {\r\n this.FMarkers[AIndex].setIcon(Url);\r\n }\r\n end;\r\nend;\r\n\r\nprocedure TGoogleMaps.SetMarkerLocation(AIndex: Integer; Lat, Lon: Double);\r\nbegin\r\n asm\r\n if (AIndex < this.FMarkers.length)\r\n {\r\n this.FMarkers[AIndex].setPosition(new google.maps.LatLng(Lat, Lon));\r\n }\r\n end;\r\nend;\r\n\r\nprocedure TGoogleMaps.SetMarkerTitle(AIndex: Integer; ATitle: string);\r\nbegin\r\n asm\r\n if (AIndex < this.FMarkers.length)\r\n {\r\n this.FMarkers[AIndex].setTitle(ATitle);\r\n }\r\n end;\r\nend;\r\n\r\nprocedure TGoogleMaps.SetPolygonColors(AIndex: Integer; AFillColor,\r\n AStrokeColor: TColor);\r\nvar\r\n clrF, clrS: string;\r\nbegin\r\n clrF := ColorToHTML(AFillColor);\r\n clrS := ColorToHTML(AStrokeColor);\r\n asm\r\n if (AIndex < this.FPolygons.length)\r\n {\r\n this.FPolygons[AIndex].setOptions({ fillColor: clrF, strokeColor: clrS });\r\n }\r\n end;\r\nend;\r\n\r\nprocedure TGoogleMaps.SetPolygonPoints(AIndex: Integer; Points: TJSArray);\r\nbegin\r\n asm\r\n if (AIndex < this.FPolygons.length)\r\n {\r\n this.FPolygons[AIndex].setOptions({ path: Points });\r\n }\r\n end;\r\nend;\r\n\r\nprocedure TGoogleMaps.SetPolylineColor(AIndex: Integer; AColor: TColor);\r\nvar\r\n clr: string;\r\nbegin\r\n clr := ColorToHTML(AColor);\r\n asm\r\n if (AIndex < this.FPolylines.length)\r\n {\r\n this.FPolylines[AIndex].setOptions({ strokeColor: clr });\r\n }\r\n end;\r\nend;\r\n\r\nprocedure TGoogleMaps.SetPolylinePoints(AIndex: Integer; Points: TJSArray);\r\nbegin\r\n asm\r\n if (AIndex < this.FPolylines.length)\r\n {\r\n this.FPolylines[AIndex].setOptions({ path: Points });\r\n }\r\n end;\r\nend;\r\n\r\nprocedure TGoogleMaps.SetRectangleColors(AIndex: Integer; AFillColor,\r\n AStrokeColor: TColor);\r\nvar\r\n clrF, clrS: string;\r\nbegin\r\n clrF := ColorToHTML(AFillColor);\r\n clrS := ColorToHTML(AStrokeColor);\r\n asm\r\n if (AIndex < this.FRectangles.length)\r\n {\r\n this.FRectangles[AIndex].setOptions({ fillColor: clrF, strokeColor: clrS });\r\n }\r\n end;\r\nend;\r\n\r\nprocedure TGoogleMaps.SetRectangleLocation(AIndex: Integer; NorthEastLat,\r\n NorthEastLon, SouthWestLat, SouthWestLon: double);\r\nbegin\r\n asm\r\n if (AIndex < this.FRectangles.length)\r\n {\r\n var NELatLng = {lat: NorthEastLat, lng: NorthEastLon};\r\n var SWLatLng = {lat: SouthWestLat, lng: SouthWestLon};\r\n this.FRectangles[AIndex].setOptions({ bounds: new google.maps.LatLngBounds(NELatLng, SWLatLng) });\r\n }\r\n end;\r\nend;\r\n\r\nprocedure TGoogleMaps.SetCircleCenter(AIndex: Integer; Lat, Lon: Double);\r\nbegin\r\n asm\r\n if (AIndex < this.FCircles.length)\r\n {\r\n this.FCircles[AIndex].setCenter(new google.maps.LatLng(Lat, Lon));\r\n }\r\n end;\r\nend;\r\n\r\nprocedure TGoogleMaps.SetCircleColors(AIndex: Integer; AFillColor,\r\n AStrokeColor: TColor);\r\nvar\r\n clrF, clrS: string;\r\nbegin\r\n clrF := ColorToHTML(AFillColor);\r\n clrS := ColorToHTML(AStrokeColor);\r\n asm\r\n if (AIndex < this.FCircles.length)\r\n {\r\n this.FCircles[AIndex].setOptions({ fillColor: clrF, strokeColor: clrS });\r\n }\r\n end;\r\nend;\r\n\r\nprocedure TGoogleMaps.SetCircleRadius(AIndex, Radius: Integer);\r\nbegin\r\n asm\r\n if (AIndex < this.FCircles.length)\r\n {\r\n this.FCircles[AIndex].setRadius(Radius);\r\n }\r\n end;\r\nend;\r\n\r\nprocedure TGoogleMaps.SetControlCursor(const Value: TCursor);\r\nvar\r\n map: TJSHTMLElement;\r\n s: string;\r\nbegin\r\n inherited;\r\n\r\n map := GetMap;\r\n if Value = crDefault then\r\n s := ''''''\r\n else\r\n s := GetHTMLCursorName(Value);\r\n\r\n if Assigned(map) then\r\n begin\r\n asm\r\n map.setOptions({draggableCursor: s});\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TGoogleMaps.SetScrollWheel(AValue: Boolean);\r\nvar\r\n map: TJSHTMLElement;\r\nbegin\r\n map := GetMap;\r\n asm\r\n map.setOptions( {scrollWheel:AValue} );\r\n end;\r\nend;\r\n\r\nprocedure TGoogleMaps.SetTilt(ATilt: double);\r\nvar\r\n map: TJSHTMLElement;\r\nbegin\r\n map := GetMap;\r\n if Assigned(map) then\r\n begin\r\n asm\r\n map.setTitle(ATilt);\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TGoogleMaps.SetZoom(Zoom: Integer);\r\nvar\r\n map: TJSHTMLElement;\r\nbegin\r\n map := GetMap;\r\n if Assigned(map) then\r\n begin\r\n asm\r\n map.setZoom(Zoom);\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TGoogleMaps.ShowDirections(SourceLon, SourceLat, DestLon,\r\n DestLat: double; ATravelMode: TGoogleTravelMode = tmDriving;\r\n WayPoints: TStringList = nil; OptimizeWayPoints: Boolean = False;\r\n AvoidHighways: Boolean = False; AvoidTolls: Boolean = False);\r\nvar\r\n dirsvc,dirdispl,map: TJSElement;\r\n tm: string;\r\n wp: TJSArray;\r\n I: Integer;\r\nbegin\r\n if not Assigned(FDirectionsDisplay) then\r\n BindEvents;\r\n\r\n dirsvc := FDirectionsService;\r\n dirdispl := FDirectionsDisplay;\r\n map := GetMap;\r\n tm := TravelModeStr(ATravelMode);\r\n wp := TJSArray.New;\r\n if WayPoints <> nil then\r\n begin\r\n for I := 0 to WayPoints.Count - 1 do\r\n wp.Push(New(['location', WayPoints[I]]));\r\n end;\r\n\r\n asm\r\n var sourcelatlon = new google.maps.LatLng(SourceLat, SourceLon);\r\n var destlatlon = new google.maps.LatLng(DestLat, DestLon);\r\n\r\n dirdispl.setMap(map);\r\n dirsvc.route({\r\n origin: sourcelatlon,\r\n destination: destlatlon,\r\n waypoints: wp,\r\n optimizeWaypoints: OptimizeWayPoints,\r\n avoidHighways: AvoidHighways,\r\n avoidTolls: AvoidTolls,\r\n travelMode: tm\r\n }, function(response, status) {\r\n if (status === 'OK') {\r\n dirdispl.setDirections(response);\r\n } else {\r\n window.alert('Directions request failed due to ' + status);\r\n }\r\n });\r\n end;\r\nend;\r\n\r\nprocedure TGoogleMaps.HideStreetView;\r\nvar\r\n map: TJSElement;\r\nbegin\r\n map := GetMap;\r\n asm\r\n map.streetView.setVisible(false);\r\n end;\r\nend;\r\n\r\nprocedure TGoogleMaps.ShowStreetView(Lat, Lon: Double; Heading, Zoom,\r\n Pitch: Integer);\r\nvar\r\n map: TJSElement;\r\n mapid: string;\r\nbegin\r\n map := GetMap;\r\n mapid := GetID;\r\n asm\r\n var LatLng = {lat: Lat, lng: Lon};\r\n var panorama = new google.maps.StreetViewPanorama(\r\n document.getElementById(mapid), {\r\n position: LatLng,\r\n pov: {\r\n heading: Heading,\r\n zoom: Zoom,\r\n pitch: Pitch\r\n }\r\n });\r\n map.setStreetView(panorama);\r\n end;\r\nend;\r\n\r\nprocedure TGoogleMaps.ShowDirections(Source, Destination: string;\r\n ATravelMode: TGoogleTravelMode; WayPoints: TStringList; OptimizeWayPoints,\r\n AvoidHighways, AvoidTolls: Boolean);\r\nvar\r\n dirsvc,dirdispl,map: TJSElement;\r\n tm: string;\r\n wp: TJSArray;\r\n I: Integer;\r\nbegin\r\n if not Assigned(FDirectionsDisplay) then\r\n BindEvents;\r\n\r\n dirsvc := FDirectionsService;\r\n dirdispl := FDirectionsDisplay;\r\n map := GetMap;\r\n tm := TravelModeStr(ATravelMode);\r\n wp := TJSArray.New;\r\n if WayPoints <> nil then\r\n begin\r\n for I := 0 to WayPoints.Count - 1 do\r\n wp.Push(New(['location', WayPoints[I]]));\r\n end;\r\n\r\n asm\r\n dirdispl.setMap(map);\r\n\r\n dirsvc.route({\r\n origin: Source,\r\n destination: Destination,\r\n waypoints: wp,\r\n optimizeWaypoints: OptimizeWayPoints,\r\n avoidHighways: AvoidHighways,\r\n avoidTolls: AvoidTolls,\r\n travelMode: tm\r\n }, function(response, status) {\r\n if (status === 'OK') {\r\n dirdispl.setDirections(response);\r\n } else {\r\n window.alert('Directions request failed due to ' + status);\r\n }\r\n });\r\n end;\r\nend;\r\n\r\nfunction TGoogleMaps.TravelModeStr(ATravelMode: TGoogleTravelMode): string;\r\nbegin\r\n Result := 'DRIVING';\r\n case ATravelMode of\r\n tmDriving: Result := 'DRIVING';\r\n tmWalking: Result := 'WALKING';\r\n tmBicycling: Result := 'BICYCLING';\r\n tmTransit: Result := 'TRANSIT';\r\n end;\r\nend;\r\n\r\nprocedure TGoogleMaps.UpdateElement;\r\nvar\r\n map: TJSHTMLElement;\r\n id: string;\r\n srcurl: string;\r\n scriptsrc: string;\r\n mapidstr: string;\r\n mapbeta: string;\r\n scr,scro: TJSElement;\r\n sp: TJSHTMLElement;\r\n\r\nbegin\r\n inherited;\r\n\r\n if IsUpdating then\r\n Exit;\r\n\r\n if FUpdateCount > 0 then\r\n Exit;\r\n\r\n if IsLinked and (csLoading in ComponentState) then\r\n Exit;\r\n\r\n if ((not FCode) and (FAPIKey <> '')) or (FAPIKey <> FOldAPIKey) then\r\n begin\r\n FCode := true;\r\n id := GetID;\r\n FOldAPIKey := FAPIKey;\r\n\r\n scr := document.getElementById('scrgooglemaps');\r\n if Assigned(scr) then\r\n begin\r\n document.head.removeChild(scr);\r\n end;\r\n\r\n scro := document.getElementById('scrogooglemaps');\r\n if Assigned(scro) then\r\n begin\r\n document.head.removeChild(scro);\r\n end;\r\n\r\n if (MapRender = mrVector) and (MapID <> '') then\r\n mapbeta := 'v=beta&';\r\n\r\n mapidstr := '';\r\n if MapID <> '' then\r\n mapidstr := 'mapId:'''+MapID+''','+#13#10;\r\n\r\n srcurl := 'https://maps.googleapis.com/maps/api/js?'+mapbeta+'key=' + FAPIKey + '&callback=initMap'+id;\r\n\r\n scriptsrc := 'var gmapserror = false;'+#13#10+\r\n 'function initMap'+id+'() { '+#13#10+\r\n 'var el = document.getElementById(\"'+id+'\");'+#13#10+\r\n 'if (el == null) { alert(\"Google Maps DIV element not found!\"); return; }'+#13#10+\r\n 'map = new google.maps.Map(el, {'+#13#10+\r\n 'center: {lat: ' + StringReplace(FloatToStr(Options.DefaultLatitude), ',', '.', [rfReplaceAll]) + ', lng: ' + StringReplace(FloatToStr(Options.DefaultLongitude), ',', '.', [rfReplaceAll]) + '},'+#13#10+\r\n mapidstr+\r\n 'zoom: ' + IntToStr(Options.DefaultZoomLevel) + '});'+#13#10+\r\n 'el.gMap = map;'+#13#10+\r\n '}';\r\n\r\n scr := document.createElement('script');\r\n scr.addEventListener('load',@DoLoaded);\r\n asm\r\n scr.defer = true;\r\n scr.async = true;\r\n scr.src = srcurl;\r\n scr.type = 'text/javascript';\r\n end;\r\n\r\n document.head.appendChild(scr);\r\n scr['id'] := 'scrgooglemaps';\r\n\r\n scro := document.createElement('script');\r\n TJSHTMLElement(scro).innerHTML := scriptsrc;\r\n document.head.appendChild(scro);\r\n scro['id'] := 'scrogooglemaps';\r\n\r\n end\r\n else if Assigned(ElementHandle) then\r\n begin\r\n ElementHandle.style.setProperty('border', '1px solid gray');\r\n ElementHandle.style.setProperty('background-color', '#eee');\r\n if (ElementHandle.childElementCount = 0) then\r\n begin\r\n sp := TJSHTMLElement(document.createElement('SPAN'));\r\n\r\n srcurl := '
Set the Google Maps JavaScript API key via WebGoogleMaps.APIKey in order to see the map.
'+\r\n 'Request the key via this page';\r\n sp.innerHTML := srcurl;\r\n ElementHandle.appendChild(sp);\r\n end;\r\n end;\r\nend;\r\n{$HINTS ON}\r\n\r\n{ TTwitterFeed }\r\n\r\nfunction TTwitterFeed.CreateElement: TJSElement;\r\nbegin\r\n Result := document.createElement('SPAN');\r\nend;\r\n\r\nprocedure TTwitterFeed.CreateInitialize;\r\nbegin\r\n inherited;\r\n Width := 400;\r\n Height := 300;\r\nend;\r\n\r\nprocedure TTwitterFeed.SetFeed(const Value: string);\r\nbegin\r\n FFeed := Value;\r\n FUpdatedFeed := false;\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TTwitterFeed.SetFeedLinkText(const Value: string);\r\nbegin\r\n FFeedLinkText := Value;\r\n UpdateElement;\r\nend;\r\n\r\n{$HINTS OFF}\r\nprocedure TTwitterFeed.UpdateElement;\r\nvar\r\n srcurl,img: string;\r\n script: TJSElement;\r\nbegin\r\n inherited;\r\n\r\n if Assigned(ElementHandle) and not IsUpdating then\r\n begin\r\n srcurl := 'https://platform.twitter.com/widgets.js';\r\n\r\n script := document.getElementById(TWITTERSCRIPTID);\r\n\r\n if not Assigned(script) then\r\n begin\r\n script := document.createElement('script');\r\n script['id'] := TWITTERSCRIPTID;\r\n asm\r\n script.async = true;\r\n end;\r\n script['type'] := 'text/javascript';\r\n script['charset'] := 'utf-8';\r\n script['src'] := srcurl;\r\n document.head.appendChild(script);\r\n end;\r\n end;\r\n\r\n if Assigned(ElementHandle) and not IsUpdating and not FUpdatedFeed then\r\n begin\r\n if (Feed <> '') and not (csDesigning in ComponentState) then\r\n begin\r\n srcurl := ''+ FeedLinkText + '';\r\n\r\n BorderStyle := bsNone;\r\n ElementHandle.innerHTML := srcurl;\r\n asm\r\n if (typeof twttr !== 'undefined') {\r\n twttr.widgets.load() }\r\n end;\r\n FUpdatedFeed := true;\r\n end\r\n else\r\n begin\r\n img := 'data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4NCjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIg0KICAgd2lkdGg9IjMwMCINCiAgIGhlaWdodD0iMzAwIj4NCjxwYX'+\r\n 'RoIGQ9Im0gMjUwLDg3Ljk3NCBjIC03LjM1OCwzLjI2NCAtMTUuMjY3LDUuNDY5IC0yMy41NjYsNi40NjEgOC40NzEsLTUuMDc4IDE0Ljk3OCwtMTMuMTE5IDE4LjA0MSwtMjIuNzAxIC03LjkyOSw0LjcwMyAtMTYuNzEsOC4xMTcgLTI2LjA1Ny'+\r\n 'w5Ljk1NyAtNy40ODQsLTcuOTc1IC0xOC4xNDgsLTE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\n end;\r\n end;\r\n\r\n if Assigned(ElementHandle) then\r\n ElementHandle.style.setProperty('overflow-y','auto');\r\nend;\r\n{$HINTS ON}\r\n\r\n{ TBrowserControl }\r\n\r\nprocedure TBrowserControl.BindEvents;\r\nvar\r\n eh: TJSEventTarget;\r\nbegin\r\n inherited;\r\n if Assigned(ElementBindHandle) then\r\n begin\r\n eh := ElementBindHandle;\r\n eh.addEventListener('load', FLoadPtr);\r\n end;\r\nend;\r\n\r\nprocedure TBrowserControl.ClearMethodPointers;\r\nbegin\r\n inherited;\r\n FLoadPtr := nil;\r\nend;\r\n\r\nfunction TBrowserControl.CreateElement: TJSElement;\r\nbegin\r\n Result := document.createElement('IFRAME');\r\nend;\r\n\r\nprocedure TBrowserControl.CreateInitialize;\r\nbegin\r\n inherited;\r\n Width := 400;\r\n Height := 300;\r\nend;\r\n\r\n{$HINTS OFF}\r\nfunction TBrowserControl.CurrentURL: string;\r\nvar\r\n url: string;\r\n el: TJSElement;\r\nbegin\r\n el := ElementHandle;\r\n\r\n asm\r\n url = el.contentWindow.location;\r\n end;\r\n\r\n Result := url;\r\nend;\r\n\r\nprocedure TBrowserControl.DoLoad(Event: TJSEvent);\r\nbegin\r\n if Assigned(OnLoad) then\r\n OnLoad(Self, Event);\r\nend;\r\n\r\nprocedure TBrowserControl.GetMethodPointers;\r\nbegin\r\n inherited;\r\n FLoadPtr := @DoLoad;\r\nend;\r\n\r\n{$HINTS ON}\r\n\r\nprocedure TBrowserControl.Navigate(const AURL: string);\r\nbegin\r\n URL := AURL;\r\nend;\r\n\r\nprocedure TBrowserControl.SetReferrerPolicy(\r\n const Value: TBrowserReferrerPolicy);\r\nbegin\r\n FReferrerPolicy := Value;\r\n UpdateElementVisual;\r\nend;\r\n\r\nprocedure TBrowserControl.SetSandbox(const Value: TBrowserSandboxTypes);\r\nbegin\r\n FSandbox := Value;\r\n UpdateElementVisual;\r\nend;\r\n\r\nprocedure TBrowserControl.SetURL(const Value: string);\r\nvar\r\n el: TJSHTMLElement;\r\nbegin\r\n FURL := Value;\r\n el := ElementHandle;\r\n el.setAttribute('src',Value);\r\nend;\r\n\r\nprocedure TBrowserControl.UnBindEvents;\r\nvar\r\n eh: TJSEventTarget;\r\nbegin\r\n inherited;\r\n if Assigned(ElementBindHandle) then\r\n begin\r\n eh := ElementBindHandle;\r\n eh.removeEventListener('load', FLoadPtr);\r\n end;\r\nend;\r\n\r\nprocedure TBrowserControl.UpdateElementVisual;\r\nvar\r\n SandboxStr: string;\r\n\r\n procedure AppendStr(var s: string; appstr: string);\r\n begin\r\n if s = '' then\r\n s := appstr\r\n else\r\n s := s + ' ' + appstr;\r\n end;\r\n\r\nbegin\r\n inherited;\r\n\r\n\r\n if BorderStyle = bsSingle then\r\n ElementHandle.style.setProperty('border','1px solid silver')\r\n else\r\n ElementHandle.style.setProperty('border','0px');\r\n\r\n SandboxStr := '';\r\n\r\n if stAllowForms in Sandbox then\r\n AppendStr(SandboxStr, 'allow-forms');\r\n if stAllowModals in Sandbox then\r\n AppendStr(SandboxStr, 'allow-modals');\r\n if stAllowOrientationLock in Sandbox then\r\n AppendStr(SandboxStr, 'allow-orientation-lock');\r\n if stAllowPointerLock in Sandbox then\r\n AppendStr(SandboxStr, 'allow-pointer-lock');\r\n if stAllowPopups in Sandbox then\r\n AppendStr(SandboxStr, 'allow-popups');\r\n if stAllowPopupsToEscapeSandbox in Sandbox then\r\n AppendStr(SandboxStr, 'allow-popups-to-escape-sandbox');\r\n if stAllowPresentation in Sandbox then\r\n AppendStr(SandboxStr, 'allow-presentation');\r\n if stAllowSameOrigin in Sandbox then\r\n AppendStr(SandboxStr, 'allow-same-origin');\r\n if stAllowScripts in Sandbox then\r\n AppendStr(SandboxStr, 'allow-scripts');\r\n if stAllowTopNavigation in Sandbox then\r\n AppendStr(SandboxStr, 'allow-top-navigation');\r\n if stAllowTopNavigationByUserActivation in Sandbox then\r\n AppendStr(SandboxStr, 'allow-top-navigation-by-user-activation');\r\n\r\n if SandboxStr <> '' then\r\n begin\r\n ElementHandle.setAttribute('sandbox',SandboxStr);\r\n end;\r\n\r\n case ReferrerPolicy of\r\n rfNoReferrer: ElementHandle.setAttribute('referrerpolicy','no-referrer');\r\n rfNoReferrerWhenDowngrade: ElementHandle.setAttribute('referrerpolicy','no-referrer-when-downgrade');\r\n rfOrigin: ElementHandle.setAttribute('referrerpolicy','origin');\r\n rfOriginWhenCrossOrigin: ElementHandle.setAttribute('referrerpolicy','origin-when-cross-origin');\r\n rfUnsafeUrl: ElementHandle.setAttribute('referrerpolicy','unsafe-url');\r\n end;\r\nend;\r\n\r\n{ TGoogleDrive }\r\n\r\nfunction TGoogleDrive.CreateElement: TJSElement;\r\nbegin\r\n Result := document.createElement('DIV');\r\n FFrameHandle := document.createElement('IFRAME');\r\n Result.appendChild(FFrameHandle);\r\n FFrameHandle.setAttribute('frameborder','0');\r\nend;\r\n\r\nprocedure TGoogleDrive.CreateInitialize;\r\nbegin\r\n inherited;\r\n Width := 400;\r\n Height := 300;\r\nend;\r\n\r\nprocedure TGoogleDrive.SetFolderID(const Value: string);\r\nbegin\r\n if (FFolderID <> Value) then\r\n begin\r\n FFolderID := Value;\r\n UpdateElement;\r\n end;\r\nend;\r\n\r\nprocedure TGoogleDrive.SetView(const Value: TDriveView);\r\nbegin\r\n if (FView <> Value) then\r\n begin\r\n FView := Value;\r\n UpdateElement;\r\n end;\r\nend;\r\n\r\nprocedure TGoogleDrive.UpdateElement;\r\nvar\r\n vs,img: string;\r\nbegin\r\n inherited;\r\n\r\n case View of\r\n dvList: vs := 'list';\r\n dvGrid: vs := 'grid';\r\n end;\r\n\r\n if Assigned(ElementHandle) then\r\n begin\r\n if FolderID <> '' then\r\n begin\r\n FFrameHandle.setAttribute('src','https://drive.google.com/embeddedfolderview?id='+ FolderID + '&embedded=true#' + vs);\r\n TJSHTMLElement(FFrameHandle).style.setProperty('border','0');\r\n end\r\n else\r\n// if (csDesigning in ComponentState) then\r\n begin\r\n img := 'data:image/svg+xml;base64,PD94bW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sbC1ydWxlPSJldmVub2RkIiBwb2ludHM9IjAsODIuNjY3IDIxLjMzNSwxMjAgNjQsNDUuMzMzIDQyLjY2Niw4ICAgICIvPjwvZz48L2c+PC9nPjwvc3ZnPg==';\r\n\r\n RenderDesigning(ClassName, Container, Self, True, Img);\r\n end;\r\n end;\r\nend;\r\n\r\n\r\n{ THTMLDiv }\r\n\r\nfunction THTMLDiv.CreateElement: TJSElement;\r\nbegin\r\n Result := document.createElement('DIV');\r\nend;\r\n\r\nprocedure THTMLDiv.CreateInitialize;\r\nbegin\r\n FHTML := TStringList.Create;\r\n FHTML.SkipLastLineBreak := true;\r\n (FHTML as TStringList).OnChange := HTMLChanged;\r\n\r\n inherited;\r\n\r\n ControlStyle := ControlStyle + [csAcceptsControls];\r\n ClipChildren := false;\r\n TabStop := false;\r\n\r\n if (csDesigning in ComponentState) then\r\n begin\r\n Width := 240;\r\n Height := 160;\r\n end;\r\nend;\r\n\r\ndestructor THTMLDiv.Destroy;\r\nbegin\r\n FHTML.Free;\r\n inherited;\r\nend;\r\n\r\nprocedure THTMLDiv.HTMLChanged(Sender: TObject);\r\nbegin\r\n UpdateElementData;\r\nend;\r\n\r\nprocedure THTMLDiv.SetHTML(const Value: TStrings);\r\nbegin\r\n FHTML.Assign(Value);\r\nend;\r\n\r\nprocedure THTMLDiv.UpdateElementData;\r\nbegin\r\n inherited;\r\n if Assigned(ElementHandle) then\r\n begin\r\n if (FOldText <> '') or (FHTML.Text <> '') then\r\n ElementHandle.innerHTML := FHTML.Text;\r\n FOldText := FHTML.Text;\r\n end\r\n else\r\n begin\r\n if not IsLinked and (csDesigning in ComponentState) then\r\n RenderDesigning(ClassName, Container, Self, True);\r\n end;\r\nend;\r\n\r\n{ THTMLSpan }\r\n\r\nfunction THTMLSpan.CreateElement: TJSElement;\r\nbegin\r\n Result := document.createElement('SPAN');\r\nend;\r\n\r\nprocedure THTMLSpan.CreateInitialize;\r\nbegin\r\n FHTML := TStringList.Create;\r\n (FHTML as TStringList).OnChange := HTMLChanged;\r\n\r\n inherited;\r\n\r\n ControlStyle := ControlStyle + [csAcceptsControls];\r\n TabStop := false;\r\n ClipChildren := false;\r\n\r\n if (csDesigning in ComponentState) then\r\n begin\r\n Width := 240;\r\n Height := 160;\r\n end;\r\nend;\r\n\r\ndestructor THTMLSpan.Destroy;\r\nbegin\r\n FHTML.Free;\r\n inherited;\r\nend;\r\n\r\nprocedure THTMLSpan.HTMLChanged(Sender: TObject);\r\nbegin\r\n UpdateElementData;\r\nend;\r\n\r\nprocedure THTMLSpan.SetHTML(const Value: TStrings);\r\nbegin\r\n FHTML.Assign(Value);\r\nend;\r\n\r\nprocedure THTMLSpan.UpdateElementData;\r\nbegin\r\n inherited;\r\n\r\n if Assigned(ElementHandle) then\r\n begin\r\n if (FOldText <> '') or (FHTML.Text <> '') then\r\n ElementHandle.innerHTML := FHTML.Text;\r\n FOldText := FHTML.Text;\r\n end\r\n else\r\n begin\r\n if not IsLinked and (csDesigning in ComponentState) then\r\n RenderDesigning(ClassName, Container, Self, True);\r\n end;\r\nend;\r\n\r\n{ THTMLAnchor }\r\n\r\nfunction THTMLAnchor.CreateElement: TJSElement;\r\nbegin\r\n Result := document.createElement('A');\r\nend;\r\n\r\nprocedure THTMLAnchor.CreateInitialize;\r\nbegin\r\n inherited;\r\n Caption := 'WebHTMLAnchor';\r\nend;\r\n\r\nfunction THTMLAnchor.HandleDoClick(Event: TJSMouseEvent): Boolean;\r\nbegin\r\n if Assigned(OnClick) then\r\n begin\r\n Event.preventDefault();\r\n StopPropagation;\r\n Result := false;\r\n OnClick(Self);\r\n end\r\n else\r\n Result := inherited;\r\nend;\r\n\r\nprocedure THTMLAnchor.SetCaption(const Value: string);\r\nbegin\r\n inherited SetCaption(Value);\r\n UpdateElementData;\r\nend;\r\n\r\nprocedure THTMLAnchor.SetHref(const Value: string);\r\nbegin\r\n FHref := Value;\r\n UpdateElementData;\r\nend;\r\n\r\nprocedure THTMLAnchor.SetTarget(const Value: string);\r\nbegin\r\n FTarget := Value;\r\n UpdateElementData;\r\nend;\r\n\r\nprocedure THTMLAnchor.UpdateElementData;\r\nbegin\r\n inherited;\r\n\r\n if Assigned(ElementHandle) then\r\n begin\r\n if Caption <> '' then\r\n ElementHandle.innerHTML := Caption;\r\n ElementHandle.setAttribute('href', FHref);\r\n ElementHandle.setAttribute('target', FTarget);\r\n end;\r\nend;\r\n\r\n{ TURLValidator }\r\n\r\nprocedure TURLValidator.HandleResult(IsValid: boolean);\r\nbegin\r\n if Assigned(OnValidated) then\r\n OnValidated(Self, IsValid);\r\nend;\r\n\r\n{$HINTS OFF}\r\nprocedure TURLValidator.Validate;\r\nvar\r\n s: string;\r\n ptr: pointer;\r\nbegin\r\n s := URL;\r\n ptr := @HandleResult;\r\n asm\r\n var request = new XMLHttpRequest();\r\n request.open('GET', s, true);\r\n request.onreadystatechange = function(){\r\n if (request.readyState === 4){\r\n ptr(request.status === 200);\r\n }\r\n };\r\n request.send();\r\n end;\r\nend;\r\n{$HINTS ON}\r\n\r\n{ TGoogleMapsOptions }\r\n\r\nprocedure TGoogleMapsOptions.Assign(Source: TPersistent);\r\nbegin\r\n inherited;\r\n FCustomStyle := (Source as TGoogleMapsOptions).CustomStyle;\r\n FMapStyle := (Source as TGoogleMapsOptions).MapStyle;\r\n FDefaultLatitude := (Source as TGoogleMapsOptions).DefaultLatitude;\r\n FDefaultLongitude := (Source as TGoogleMapsOptions).DefaultLongitude;\r\n FDefaultZoomLevel := (Source as TGoogleMapsOptions).DefaultZoomLevel;\r\nend;\r\n\r\nconstructor TGoogleMapsOptions.Create(AGoogleMaps: TGoogleMaps);\r\nbegin\r\n inherited Create;\r\n FCustomStyle := TStringList.Create;\r\n FMapStyle := mstDefault;\r\n FDefaultLatitude := -34.397;\r\n FDefaultLongitude := 150.644;\r\n FDefaultZoomLevel := 8;\r\n FOwner := AGoogleMaps;\r\nend;\r\n\r\ndestructor TGoogleMapsOptions.Destroy;\r\nbegin\r\n FCustomStyle.Free;\r\n inherited;\r\nend;\r\n\r\nprocedure TGoogleMapsOptions.SetCustomStyle(const Value: TStringList);\r\nbegin\r\n FCustomStyle.Assign(Value);\r\nend;\r\n\r\nprocedure TGoogleMapsOptions.SetDefaultLatitude(const Value: Double);\r\nbegin\r\n if FDefaultLatitude <> Value then\r\n begin\r\n FDefaultLatitude := Value;\r\n FOwner.UpdateElement;\r\n FOwner.PanTo(DefaultLatitude, DefaultLongitude);\r\n end;\r\nend;\r\n\r\nprocedure TGoogleMapsOptions.SetDefaultLongitude(const Value: Double);\r\nbegin\r\n if FDefaultLongitude <> Value then\r\n begin\r\n FDefaultLongitude := Value;\r\n FOwner.UpdateElement;\r\n FOwner.PanTo(DefaultLatitude, DefaultLongitude);\r\n end;\r\nend;\r\n\r\nprocedure TGoogleMapsOptions.SetDefaultZoomLevel(const Value: Integer);\r\nbegin\r\n if (FDefaultZoomLevel <> Value) and (Value >= 0) and (Value <= 21) then\r\n begin\r\n FDefaultZoomLevel := Value;\r\n FOwner.UpdateElement;\r\n FOwner.SetZoom(Value);\r\n end;\r\nend;\r\n\r\n\r\n{$HINTS OFF}\r\nprocedure TGoogleMapsOptions.SetMapStyle(const Value: TGoogleMapStyle);\r\nvar\r\n map: TJSHTMLElement;\r\n cstyle: string;\r\n ostyle: TJSObject;\r\nbegin\r\n FMapStyle := Value;\r\n map := FOwner.GetMap;\r\n\r\n if not Assigned(map) then\r\n Exit;\r\n\r\n if FMapStyle = mstNightMode then\r\n begin\r\n asm\r\n var myStyle =\r\n [\r\n {\r\n \"elementType\": \"geometry\",\r\n \"stylers\": [\r\n {\r\n \"color\": \"#242f3e\"\r\n }\r\n ]\r\n },\r\n {\r\n \"elementType\": \"labels.text.fill\",\r\n \"stylers\": [\r\n {\r\n \"color\": \"#746855\"\r\n }\r\n ]\r\n },\r\n {\r\n \"elementType\": \"labels.text.stroke\",\r\n \"stylers\": [\r\n {\r\n \"color\": \"#242f3e\"\r\n }\r\n ]\r\n },\r\n {\r\n \"featureType\": \"administrative.locality\",\r\n \"elementType\": \"labels.text.fill\",\r\n \"stylers\": [\r\n {\r\n \"color\": \"#d59563\"\r\n }\r\n ]\r\n },\r\n {\r\n \"featureType\": \"poi\",\r\n \"elementType\": \"labels.text.fill\",\r\n \"stylers\": [\r\n {\r\n \"color\": \"#d59563\"\r\n }\r\n ]\r\n },\r\n {\r\n \"featureType\": \"poi.park\",\r\n \"elementType\": \"geometry\",\r\n \"stylers\": [\r\n {\r\n \"color\": \"#263c3f\"\r\n }\r\n ]\r\n },\r\n {\r\n \"featureType\": \"poi.park\",\r\n \"elementType\": \"labels.text.fill\",\r\n \"stylers\": [\r\n {\r\n \"color\": \"#6b9a76\"\r\n }\r\n ]\r\n },\r\n {\r\n \"featureType\": \"road\",\r\n \"elementType\": \"geometry\",\r\n \"stylers\": [\r\n {\r\n \"color\": \"#38414e\"\r\n }\r\n ]\r\n },\r\n {\r\n \"featureType\": \"road\",\r\n \"elementType\": \"geometry.stroke\",\r\n \"stylers\": [\r\n {\r\n \"color\": \"#212a37\"\r\n }\r\n ]\r\n },\r\n {\r\n \"featureType\": \"road\",\r\n \"elementType\": \"labels.text.fill\",\r\n \"stylers\": [\r\n {\r\n \"color\": \"#9ca5b3\"\r\n }\r\n ]\r\n },\r\n {\r\n \"featureType\": \"road.highway\",\r\n \"elementType\": \"geometry\",\r\n \"stylers\": [\r\n {\r\n \"color\": \"#746855\"\r\n }\r\n ]\r\n },\r\n {\r\n \"featureType\": \"road.highway\",\r\n \"elementType\": \"geometry.stroke\",\r\n \"stylers\": [\r\n {\r\n \"color\": \"#1f2835\"\r\n }\r\n ]\r\n },\r\n {\r\n \"featureType\": \"road.highway\",\r\n \"elementType\": \"labels.text.fill\",\r\n \"stylers\": [\r\n {\r\n \"color\": \"#f3d19c\"\r\n }\r\n ]\r\n },\r\n {\r\n \"featureType\": \"transit\",\r\n \"elementType\": \"geometry\",\r\n \"stylers\": [\r\n {\r\n \"color\": \"#2f3948\"\r\n }\r\n ]\r\n },\r\n {\r\n \"featureType\": \"transit.station\",\r\n \"elementType\": \"labels.text.fill\",\r\n \"stylers\": [\r\n {\r\n \"color\": \"#d59563\"\r\n }\r\n ]\r\n },\r\n {\r\n \"featureType\": \"water\",\r\n \"elementType\": \"geometry\",\r\n \"stylers\": [\r\n {\r\n \"color\": \"#17263c\"\r\n }\r\n ]\r\n },\r\n {\r\n \"featureType\": \"water\",\r\n \"elementType\": \"labels.text.fill\",\r\n \"stylers\": [\r\n {\r\n \"color\": \"#515c6d\"\r\n }\r\n ]\r\n },\r\n {\r\n \"featureType\": \"water\",\r\n \"elementType\": \"labels.text.stroke\",\r\n \"stylers\": [\r\n {\r\n \"color\": \"#17263c\"\r\n }\r\n ]\r\n }\r\n ];\r\n\r\n map.setOptions({styles: myStyle});\r\n end;\r\n end\r\n else if (FMapStyle = mstCustom) and (CustomStyle.Text <> '') then\r\n begin\r\n cstyle := CustomStyle.Text;\r\n try\r\n ostyle := TJSObject(TJSJSON.Parse(cstyle));\r\n asm\r\n map.setOptions({styles: ostyle});\r\n end;\r\n except\r\n\r\n end;\r\n end\r\n else\r\n begin\r\n asm\r\n map.setOptions({styles: []});\r\n end;\r\n end;\r\nend;\r\n{$HINTS ON}\r\n\r\n\r\n\r\n{ TShare }\r\n\r\nfunction TShare.CanShareFiles: boolean;\r\nvar\r\n res: boolean;\r\nbegin\r\n res := false;\r\n asm\r\n if (navigator.share) {\r\n try\r\n {\r\n res = navigator.canShare;\r\n }\r\n catch(err)\r\n {\r\n }\r\n }\r\n end;\r\n Result := res;\r\nend;\r\n\r\nfunction TShare.Share(ATitle, AText, AURL: string): boolean;\r\nvar\r\n res: boolean;\r\nbegin\r\n res := false;\r\n asm\r\n if (navigator.share) {\r\n res = true;\r\n navigator.share({\r\n title: ATitle,\r\n text: AText,\r\n url: AURL });\r\n }\r\n end;\r\n Result := res;\r\nend;\r\n\r\nfunction TShare.Execute: boolean;\r\nbegin\r\n Result := Share(FTitle, FText, FURL);\r\nend;\r\n\r\nfunction TShare.Share(ATitle, AText, AURL: string; AFiles: TJSHTMLFileArray): boolean;\r\nvar\r\n res: boolean;\r\nbegin\r\n res := false;\r\n\r\n asm\r\n if (navigator.canShare && navigator.canShare({ files: AFiles })) {\r\n res = true;\r\n navigator.share({\r\n files: AFiles,\r\n title: ATitle,\r\n text: AText });\r\n }\r\n end;\r\n Result := res;\r\nend;\r\n\r\n{ TDeviceOrientation }\r\n\r\n{$HINTS OFF}\r\nfunction TDeviceOrientation.DoHandleOrientationEvent(e: TJSEvent): boolean;\r\nvar\r\n s: double;\r\n compass: JSValue;\r\nbegin\r\n s := 0.0;\r\n asm\r\n compass = e.webkitCompassHeading || Math.abs(e.alpha - 360);\r\n var d = 0.0;\r\n s = d + compass;\r\n end;\r\n\r\n if Assigned(OnHeadingChange) then\r\n OnHeadingChange(Self, s);\r\nend;\r\n\r\nfunction TDeviceOrientation.Enabled: boolean;\r\nbegin\r\n asm\r\n Result = window.DeviceOrientationEvent != null;\r\n end;\r\nend;\r\n\r\nprocedure TDeviceOrientation.Start;\r\nvar\r\n os: TOperatingSystem;\r\n ptr: pointer;\r\n\r\n procedure HandleDeny;\r\n begin\r\n if Assigned(OnError) then\r\n OnError(Self, oeDenied);\r\n end;\r\n\r\n procedure HandleError;\r\n begin\r\n if Assigned(OnError) then\r\n OnError(Self, oeNotSupported);\r\n end;\r\n\r\n procedure HandleSuccess;\r\n begin\r\n FStarted := true;\r\n if Assigned(OnInitialized) then\r\n OnInitialized(Self);\r\n end;\r\n\r\nbegin\r\n os := GetOperatingSystem;\r\n\r\n FOrientationPtr := @DoHandleOrientationEvent;\r\n\r\n ptr := FOrientationPtr;\r\n\r\n if (os in [osiOS,osmacOS]) then\r\n begin\r\n asm\r\n if (DeviceOrientationEvent==null) return;\r\n if (DeviceOrientationEvent.requestPermission==null) return;\r\n\r\n DeviceOrientationEvent.requestPermission().then((response) => {\r\n if (response === \"granted\") {\r\n window.addEventListener(\"deviceorientation\", ptr, true);\r\n HandleSuccess();\r\n } else {\r\n HandleDeny();\r\n }\r\n })\r\n .catch(() => HandleError());\r\n end;\r\n end\r\n else\r\n begin\r\n asm\r\n window.addEventListener(\"deviceorientationabsolute\", ptr, true);\r\n HandleSuccess();\r\n end;\r\n end;\r\nend;\r\n{$HINTS ON}\r\n\r\n\r\n{ TWebSpeechSynthesis }\r\n\r\nprocedure TSpeechSynthesis.Cancel;\r\nbegin\r\n asm\r\n window.speechSynthesis.cancel();\r\n end;\r\nend;\r\n\r\nconstructor TSpeechSynthesis.Create(AOwner: TComponent);\r\nbegin\r\n inherited;\r\n FVolume := 1;\r\n FRate := 1;\r\n FPitch := 1;\r\n FVoices := TStringList.Create;\r\n\r\n if Supported then\r\n GetVoices;\r\nend;\r\n\r\ndestructor TSpeechSynthesis.Destroy;\r\nbegin\r\n FVoices.Free;\r\n inherited;\r\nend;\r\n\r\n{$HINTS OFF}\r\n\r\nfunction TSpeechSynthesis.GetVoices: TStrings;\r\nvar\r\n sl: TStrings;\r\n\r\n procedure VoicesReady;\r\n begin\r\n if Assigned(OnVoicesReady) then\r\n OnVoicesReady(Self);\r\n end;\r\n\r\nbegin\r\n sl := FVoices;\r\n\r\n if (1<0) then\r\n VoicesReady;\r\n\r\n asm\r\n function populateVoiceList()\r\n {\r\n \tvar voices = speechSynthesis.getVoices();\r\n // console.log(voices);\r\n // Loop through each of the voices.\r\n \tvoices.forEach(function(voice, i) {\r\n sl.Add(voice.name);\r\n //console.log(voice.name);\r\n \t});\r\n if (voices.length > 0) { VoicesReady(); }\r\n\r\n }\r\n populateVoiceList();\r\n if (window.speechSynthesis.onvoiceschanged !== undefined) {\r\n speechSynthesis.onvoiceschanged = populateVoiceList;\r\n }\r\n end;\r\nend;\r\n\r\nfunction TSpeechSynthesis.IsSpeaking: boolean;\r\nvar\r\n res: boolean;\r\nbegin\r\n asm\r\n res = window.speechSynthesis.speaking;\r\n end;\r\n\r\n Result := res;\r\nend;\r\n\r\nprocedure TSpeechSynthesis.SetPitch(const Value: single);\r\nbegin\r\n if (Value >=0) and (Value <= 10) then\r\n FPitch := Value;\r\nend;\r\n\r\nprocedure TSpeechSynthesis.SetRate(const Value: single);\r\nbegin\r\n if (Value >= 0) and (Value <= 2) then\r\n FRate := Value;\r\nend;\r\n\r\nprocedure TSpeechSynthesis.SetVoice(const Value: string);\r\nbegin\r\n FVoice := Value;\r\nend;\r\n\r\nprocedure TSpeechSynthesis.SetVolume(const Value: single);\r\nbegin\r\n if (Value >= 0) and (Value <= 1) then\r\n FVolume := Value;\r\nend;\r\n\r\nprocedure TSpeechSynthesis.Speak(AText: string);\r\nvar\r\n v,r,p: single;\r\n avoice: string;\r\nbegin\r\n v := FVolume;\r\n r := FRate;\r\n p := FPitch;\r\n avoice := FVoice;\r\n asm\r\n // Create a new instance of SpeechSynthesisUtterance.\r\n \tvar msg = new SpeechSynthesisUtterance();\r\n\r\n // Set the text.\r\n \tmsg.text = AText;\r\n\r\n // Set the attributes.\r\n\t msg.volume = v;\r\n \tmsg.rate = r;\r\n \tmsg.pitch = p;\r\n\r\n // If a voice has been selected, find the voice and set the\r\n // utterance instance's voice attribute.\r\n \tif (avoice != \"\") {\r\n \t\tmsg.voice = speechSynthesis.getVoices().filter(function(voice) { return voice.name == avoice; })[0];\r\n \t}\r\n\r\n // Queue this utterance.\r\n\t window.speechSynthesis.speak(msg);\r\n end;\r\nend;\r\n\r\nfunction TSpeechSynthesis.Supported: boolean;\r\nvar\r\n res: boolean;\r\nbegin\r\n res := false;\r\n asm\r\n if ('speechSynthesis' in window) { res = true; }\r\n end;\r\n Result := res;\r\nend;\r\n{$HINTS ON}\r\n\r\n{ TConsoleLog }\r\n\r\nprocedure TConsoleLog.Clear;\r\nbegin\r\n FLog.innerHTML := '';\r\nend;\r\n\r\n{$HINTS OFF}\r\nfunction TConsoleLog.CreateElement: TJSElement;\r\nvar\r\n el,ellog: TJSHTMLElement;\r\n LAutoScroll: boolean;\r\nbegin\r\n LAutoScroll := FAutoScroll;\r\n el := TJSHTMLElement(document.createElement('DIV'));\r\n ellog := TJSHTMLElement(document.createElement('PRE'));\r\n el.appendChild(ellog);\r\n\r\n Result := el;\r\n FLog := ellog;\r\n\r\n if (csDesigning in ComponentState) then\r\n Exit;\r\n\r\n AddControlStyle(\r\n '.log-warn { color: orange }'+CRLF+\r\n '.log-error { color: red }'+CRLF+\r\n '.log-info { color: skyblue }'+CRLF+\r\n '.log-log { color: silver }'+CRLF+\r\n '.log-warn, .log-error { font-weight: bold; }'\r\n );\r\n\r\n AddControlScriptSource(\r\n ' function unfixLoggingFunc(name) {' + CRLF +\r\n ' console[name] = console[\"old\" + name];' + CRLF +\r\n ' }'+CRLF+\r\n 'function unwireLogging() {' + CRLF +\r\n ' unfixLoggingFunc(\"log\");' + CRLF +\r\n ' unfixLoggingFunc(\"debug\");' + CRLF +\r\n ' unfixLoggingFunc(\"warn\");' + CRLF +\r\n ' unfixLoggingFunc(\"error\");' + CRLF +\r\n ' unfixLoggingFunc(\"info\");' + CRLF +\r\n '}' + CRLF +\r\n 'function rewireLoggingToElement(eleLocator, eleOverflowLocator, autoScroll) {' + CRLF +\r\n ' fixLoggingFunc(\"log\");' + CRLF +\r\n ' fixLoggingFunc(\"debug\");' + CRLF +\r\n ' fixLoggingFunc(\"warn\");' + CRLF +\r\n ' fixLoggingFunc(\"error\");' + CRLF +\r\n ' fixLoggingFunc(\"info\");' + CRLF +\r\n '' + CRLF +\r\n ' function fixLoggingFunc(name) {' + CRLF +\r\n ' console[\"old\" + name] = console[name];' + CRLF +\r\n ' console[name] = function(...arguments) {' + CRLF +\r\n ' const output = produceOutput(name, arguments);' + CRLF +\r\n ' const eleLog = eleLocator;' + CRLF +\r\n '' + CRLF +\r\n ' if (autoScroll) {' + CRLF +\r\n ' const eleContainerLog = eleOverflowLocator;' + CRLF +\r\n ' const isScrolledToBottom = eleContainerLog.scrollHeight - eleContainerLog.clientHeight <= eleContainerLog.scrollTop + 1;' + CRLF +\r\n ' eleLog.innerHTML += output + \"
\";' + CRLF +\r\n ' if (isScrolledToBottom) {' + CRLF +\r\n ' eleContainerLog.scrollTop = eleContainerLog.scrollHeight - eleContainerLog.clientHeight;' + CRLF +\r\n ' }' + CRLF +\r\n ' } else {' + CRLF +\r\n ' eleLog.innerHTML += output + \"
\";' + CRLF +\r\n ' }' + CRLF +\r\n '' + CRLF +\r\n ' console[\"old\" + name].apply(undefined, arguments);' + CRLF +\r\n ' };' + CRLF +\r\n ' }' + CRLF +\r\n '' + CRLF +\r\n ' function produceOutput(name, args) {' + CRLF +\r\n ' return args.reduce((output, arg) => {' + CRLF +\r\n ' return output +' + CRLF +\r\n ' \"\" +' + CRLF +\r\n ' (typeof arg === \"object\" && (JSON || {}).stringify ? JSON.stringify(arg) : arg) +' + CRLF +\r\n ' \" \";' + CRLF +\r\n ' }, \"\");' + CRLF +\r\n ' }' + CRLF +\r\n '}'\r\n );\r\n\r\n asm\r\n rewireLoggingToElement(ellog, el, LAutoScroll);\r\n end;\r\n\r\n FInit := true;\r\nend;\r\n{$HINTS ON}\r\n\r\nprocedure TConsoleLog.CreateInitialize;\r\nbegin\r\n inherited;\r\n FAutoScroll := true;\r\nend;\r\n\r\ndestructor TConsoleLog.Destroy;\r\nbegin\r\n if FInit then\r\n begin\r\n asm\r\n unwireLogging();\r\n end;\r\n end;\r\n\r\n inherited;\r\nend;\r\n\r\nprocedure TConsoleLog.UpdateElement;\r\nbegin\r\n inherited;\r\n if Assigned(ElementHandle) then\r\n ElementHandle.style.setProperty('overflow','auto');\r\nend;\r\n\r\n{ TLeafletMaps }\r\n\r\n{$HINTS OFF}\r\nprocedure TLeafletMaps.AddCircle(Lat, Lon: double; Radius: Integer; AFillColor,\r\n AStrokeColor: TColor; AWidth: Integer; AOpacity: double);\r\nvar\r\n fillcolor,strokecolor: string;\r\n circle: JSValue;\r\nbegin\r\n fillcolor := ColorToHTML(AFillColor);\r\n strokecolor := ColorToHTML(AStrokeColor);\r\n\r\n asm\r\n var center = [Lat, Lon];\r\n // Create and add the rectangle to the map\r\n circle = L.circle(center, {radius: Radius, color: strokecolor, weight: AWidth, fillcolor: fillcolor, fillopacity: AOpacity}).addTo(this.FMapObject);\r\n end;\r\n FCircles.Add(circle);\r\nend;\r\n{$HINTS ON}\r\n\r\nprocedure TLeafletMaps.AddMarker(Lat, Lon: Double; ID: string = ''; Title: string = ''; Popup: string = '');\r\nbegin\r\n if Assigned(FMarkergroup) then\r\n begin\r\n\r\n asm\r\n var mrkr = L.marker([Lat, Lon]).addTo(this.FMarkerGroup);\r\n // Optionally, you can add a popup to the marker\r\n if (Title != \"\") {\r\n mrkr.bindTooltip(Title); }\r\n if (Popup != \"\") {\r\n mrkr.bindPopup(Title); }\r\n mrkr.myCustomId = ID;\r\n mrkr.on('click', this.FMarkerClickPtr);\r\n end;\r\n end;\r\nend;\r\n\r\n{$HINTS OFF}\r\nprocedure TLeafletMaps.AddPolygon(Points: TJSArray; AFillColor,\r\n AStrokeColor: TColor; AWidth: Integer; AOpacity: Double);\r\nvar\r\n Fillcolor,Strokecolor: string;\r\n poly: JSValue;\r\nbegin\r\n Strokecolor := ColorToHTML(AStrokeColor);\r\n Fillcolor := ColorToHTML(AFillColor);\r\n asm\r\n poly = L.polygon(Points, {color: Strokecolor, fillcolor: Fillcolor, fillopacity: AOpacity, weight: AWidth}).addTo(this.FMapObject);\r\n end;\r\n FPolygons.Add(poly);\r\nend;\r\n\r\nprocedure TLeafletMaps.AddPolyLine(Points: TJSArray; AColor: TColor;\r\n AWidth: integer; AOpacity: Double);\r\nvar\r\n strokecolor: string;\r\n polyline: JSValue;\r\nbegin\r\n strokecolor := ColorToHTML(AColor);\r\n asm\r\n polyline = L.polyline(Points, {color: strokecolor, weight: AWidth}).addTo(this.FMapObject);\r\n end;\r\n FPolylines.Add(polyline);\r\nend;\r\n\r\nprocedure TLeafletMaps.AddRectangle(NorthEastLat, NorthEastLon, SouthWestLat,\r\n SouthWestLon: double; AFillColor, AStrokeColor: TColor; AWidth: integer;\r\n AOpacity: double);\r\nvar\r\n Fillcolor,Strokecolor: string;\r\n rect: JSValue;\r\nbegin\r\n Fillcolor := ColorToHTML(AFillColor);\r\n Strokecolor := ColorToHTML(AStrokeColor);\r\n asm\r\n var bounds = [[NorthEastLat, NorthEastLon], [SouthWestLat, SouthWestLon]];\r\n // Create and add the rectangle to the map\r\n rect = L.rectangle(bounds, {color: Strokecolor, weight: AWidth, fillcolor: Fillcolor, fillopacity: AOpacity}).addTo(this.FMapObject);\r\n end;\r\n FRectangles.Add(rect);\r\nend;\r\n{$HINTS OFF}\r\n\r\nprocedure TLeafletMaps.BindEvents;\r\nbegin\r\n inherited;\r\nend;\r\n\r\nprocedure TLeafletMaps.ClearCircles;\r\nvar\r\n i: integer;\r\n c: JSValue;\r\nbegin\r\n for i := 0 to FCircles.Count - 1 do\r\n begin\r\n c := JSValue(FCircles.Items[i]);\r\n asm\r\n this.FMapObject.removeLayer(c);\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TLeafletMaps.ClearMarkers;\r\nbegin\r\n asm\r\n this.FMarkerGroup.clearLayers();\r\n end;\r\nend;\r\n\r\nprocedure TLeafletMaps.ClearMethodPointers;\r\nbegin\r\n inherited;\r\n FMapClickPtr := nil;\r\n FMapDblClickPtr := nil;\r\n FMapPanPtr := nil;\r\n FMapZoomPtr := nil;\r\n FMarkerClickPtr := nil;\r\nend;\r\n\r\nprocedure TLeafletMaps.ClearPolygons;\r\nvar\r\n i: integer;\r\n c: JSValue;\r\nbegin\r\n for i := 0 to FPolygons.Count - 1 do\r\n begin\r\n c := JSValue(FPolygons.Items[i]);\r\n asm\r\n this.FMapObject.removeLayer(c);\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TLeafletMaps.ClearPolylines;\r\nvar\r\n i: integer;\r\n c: JSValue;\r\nbegin\r\n for i := 0 to FPolylines.Count - 1 do\r\n begin\r\n c := JSValue(FPolylines.Items[i]);\r\n asm\r\n this.FMapObject.removeLayer(c);\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TLeafletMaps.ClearRectangles;\r\nvar\r\n i: integer;\r\n c: JSValue;\r\nbegin\r\n for i := 0 to FRectangles.Count - 1 do\r\n begin\r\n c := JSValue(FRectangles.Items[i]);\r\n asm\r\n this.FMapObject.removeLayer(c);\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TLeafletMaps.CreateElement: TJSElement;\r\nbegin\r\n Result := document.createElement('DIV');\r\n Result.setAttribute('id', GetID);\r\n FMap := nil;\r\nend;\r\n\r\nprocedure TLeafletMaps.CreateInitialize;\r\nbegin\r\n inherited;\r\n FCircles := TList.Create;\r\n FRectangles := TList.Create;\r\n FPolygons := TList.Create;\r\n FPolylines := TList.Create;\r\n FOptions := TLeafletMapsOptions.Create(Self);\r\nend;\r\n\r\ndestructor TLeafletMaps.Destroy;\r\nbegin\r\n FCircles.Free;\r\n FRectangles.Free;\r\n FPolygons.Free;\r\n FPolylines.Free;\r\n FOptions.Free;\r\n inherited;\r\nend;\r\n\r\nfunction TLeafletMaps.Distance(Lon1, Lat1, Lon2, Lat2: double): double;\r\nbegin\r\n if Assigned(FMapObject) then\r\n begin\r\n asm\r\n var pt1 = L.latLng(Lat1,Lon1);\r\n var pt2 = L.latLng(Lat2,Lon2);\r\n Result = pt1.distanceTo(pt2);\r\n end;\r\n end\r\n else\r\n raise Exception.Create(LMapNotCreated);\r\nend;\r\n\r\nprocedure TLeafletMaps.DoHandleMapClick(AEvent: JSValue);\r\nvar\r\n Lon,Lat: double;\r\nbegin\r\n asm\r\n Lat = AEvent.latlng.lat;\r\n Lon = AEvent.latlng.lng;\r\n end;\r\n\r\n if Assigned(OnMapClick) then\r\n OnMapClick(Self,Lon,Lat);\r\nend;\r\n\r\nprocedure TLeafletMaps.DoHandleMapDblClick(AEvent: JSValue);\r\nvar\r\n Lon,Lat: double;\r\nbegin\r\n asm\r\n Lat = AEvent.latlng.lat;\r\n Lon = AEvent.latlng.lng;\r\n end;\r\n\r\n if Assigned(OnMapDblClick) then\r\n OnMapDblClick(Self,Lon,Lat);\r\nend;\r\n\r\nprocedure TLeafletMaps.DoHandleMapPan(AEvent: JSValue);\r\nvar\r\n Lon,Lat: double;\r\nbegin\r\n asm\r\n var center = this.FMapObject.getCenter();\r\n Lon = center.lng;\r\n Lat = center.lat;\r\n end;\r\n\r\n if Assigned(OnMapPan) then\r\n OnMapPan(Self,Lat,Lon);\r\nend;\r\n\r\nprocedure TLeafletMaps.DoHandleMapZoom(AEvent: JSValue);\r\nvar\r\n zoom: integer;\r\nbegin\r\n asm\r\n zoom = this.FMapObject.getZoom();\r\n end;\r\n\r\n if Assigned(OnMapZoom) then\r\n OnMapZoom(Self, zoom);\r\nend;\r\n\r\nprocedure TLeafletMaps.DoHandleMarkerclick(AEvent: JSValue);\r\nvar\r\n Lon,Lat: double;\r\n ID: string;\r\n\r\nbegin\r\n asm\r\n Lon = AEvent.latlng.lng;\r\n Lat = AEvent.latlng.lat;\r\n ID = AEvent.target.myCustomId;\r\n end;\r\n\r\n if Assigned(OnMarkerClick) then\r\n OnMarkerClick(Self, Lon, Lat, ID);\r\nend;\r\n\r\nfunction TLeafletMaps.GetCenter(var Lat, Lon: Double): Boolean;\r\nvar\r\n la,lo: double;\r\nbegin\r\n Result := false;\r\n\r\n if not Assigned(FMapObject) then\r\n Exit;\r\n\r\n asm\r\n var center = this.FMapObject.getCenter();\r\n la = center.lat;\r\n lo = center.lng;\r\n end;\r\n\r\n Lat := la;\r\n Lon := lo;\r\n\r\n Result := true;\r\nend;\r\n\r\nfunction TLeafletMaps.GetMap: TJSHTMLElement;\r\nbegin\r\n Result := FMap;\r\nend;\r\n\r\nprocedure TLeafletMaps.GetMethodPointers;\r\nbegin\r\n inherited;\r\n FMapClickPtr := @DoHandleMapClick;\r\n FMapDblClickPtr := @DoHandleMapDblClick;\r\n FMapPanPtr := @DoHandleMapPan;\r\n FMapZoomPtr := @DoHandleMapZoom;\r\n FMarkerClickPtr := @DoHandleMarkerClick;\r\nend;\r\n\r\nfunction TLeafletMaps.HandleDoMouseDown(Event: TJSMouseEvent): Boolean;\r\nvar\r\n me: TJSMouseEvent;\r\nbegin\r\n asm\r\n me = Event.originalEvent;\r\n end;\r\n if not Assigned(me) then\r\n inherited HandleDoMouseDown(Event);\r\nend;\r\n\r\nfunction TLeafletMaps.HandleDoMouseMove(Event: TJSMouseEvent): Boolean;\r\nvar\r\n me: TJSMouseEvent;\r\nbegin\r\n asm\r\n me = Event.originalEvent;\r\n end;\r\n\r\n if not Assigned(me) then\r\n inherited HandleDoMouseMove(Event);\r\nend;\r\n\r\nfunction TLeafletMaps.HandleDoMouseUp(Event: TJSMouseEvent): Boolean;\r\nvar\r\n me: TJSMouseEvent;\r\nbegin\r\n asm\r\n me = Event.originalEvent;\r\n end;\r\n\r\n if not Assigned(me) then\r\n inherited HandleDoMouseUp(Event);\r\nend;\r\n\r\nprocedure TLeafletMaps.InitScript;\r\nvar\r\n id: string;\r\n el: TJSElement;\r\nbegin\r\n inherited;\r\n\r\n id := GetID;\r\n el := document.getElementById(id);\r\n if not Assigned(el) then\r\n Exit;\r\n\r\n if not Assigned(FMapObject) and Assigned(FMapZoomPtr) and Assigned(FMapPanPtr) and Assigned(FMapClickPtr) and Assigned(FMapDblClickPtr)\r\n and Assigned(FMarkerClickPtr) then\r\n begin\r\n asm\r\n this.FMapObject = L.map(id, {zoomControl: false}).setView([51.505, -0.09], 13);\r\n\r\n // Add an OpenStreetMap tile layer\r\n L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {\r\n maxZoom: 19,\r\n attribution: '© OpenStreetMap contributors'\r\n }).addTo(this.FMapObject);\r\n\r\n this.FMapObject.on(\"click\", this.FMapClickPtr);\r\n this.FMapObject.on(\"dblclick\", this.FMapDblClickPtr);\r\n this.FMapObject.on(\"dragend\", this.FMapPanPtr);\r\n this.FMapObject.on(\"zoomend\", this.FMapZoomPtr);\r\n this.FMarkerGroup = L.layerGroup().addTo(this.FMapObject);\r\n this.FZoomControl = L.control.zoom({\r\n position: 'topleft' // You can specify the position as 'topleft', 'topright', 'bottomleft', or 'bottomright'\r\n }).addTo(this.FMapObject);\r\n\r\n var map = this.FMapObject;\r\n\r\n setTimeout(function() { map.invalidateSize(); }, 200);\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TLeafletMaps.SetBoundsInt(X, Y, AWidth, AHeight: Integer);\r\nbegin\r\n inherited;\r\n if Assigned(FMapObject) then\r\n begin\r\n asm\r\n this.FMapObject.invalidateSize();\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TLeafletMaps.SetCenter(Lat, Lon: Double);\r\nbegin\r\n asm\r\n this.FMapObject.setView([Lat,Lon]);\r\n this.FMapObject.invalidateSize();\r\n end;\r\nend;\r\n\r\nprocedure TLeafletMaps.SetOptions(const Value: TLeafletMapsOptions);\r\nbegin\r\n FOptions.Assign(Value);\r\nend;\r\n\r\nprocedure TLeafletMaps.SetZoom(Zoom: integer);\r\nbegin\r\n asm\r\n this.FMapObject.setZoom(Zoom);\r\n this.FMapObject.invalidateSize();\r\n end;\r\nend;\r\n\r\nprocedure TLeafletMaps.LatLonToXY(Lat, Lon: double; var X, Y: integer);\r\nvar\r\n px,py: integer;\r\nbegin\r\n if Assigned(FMapObject) then\r\n begin\r\n asm\r\n var latLng = L.latLng(Lat,Lon);\r\n var point = this.FMapObject.latLngToContainerPoint(latLng);\r\n px = point.x;\r\n py = point.y;\r\n end;\r\n\r\n X := px;\r\n Y := py;\r\n end\r\n else\r\n raise Exception.Create(LMapNotCreated);\r\nend;\r\n\r\nprocedure TLeafletMaps.XYToLatLon(X, Y: integer; var Lat, Lon: double);\r\nvar\r\n la,lo:double;\r\nbegin\r\n if Assigned(FMapObject) then\r\n begin\r\n asm\r\n var point = L.point(X, Y);\r\n var latLng = this.FMapObject.containerPointToLatLng(point);\r\n la = latLng.lat;\r\n lo = latLng.lng;\r\n end;\r\n\r\n Lat := la;\r\n Lon := lo;\r\n end\r\n else\r\n raise Exception.Create(LMapNotCreated);\r\nend;\r\n\r\nprocedure TLeafletMaps.SetZoomControl(const Value: TLeafletZoom);\r\nvar\r\n s: string;\r\nbegin\r\n if not Assigned(FMapObject) then\r\n Exit;\r\n\r\n if not Assigned(FZoomControl) then\r\n Exit;\r\n\r\n case Value of\r\n lzTopLeft: s := 'topleft';\r\n lzTopRight: s := 'topright';\r\n lzBottomLeft: s := 'bottomleft';\r\n lzBottomRight: s := 'bottomright';\r\n end;\r\n\r\n asm\r\n this.FZoomControl.remove();\r\n end;\r\n\r\n if Value <> lzNone then\r\n begin\r\n asm\r\n this.FZoomControl = L.control.zoom({\r\n position: s // Choose: 'topleft', 'topright', 'bottomleft', 'bottomright'\r\n }).addTo(this.FMapObject);\r\n\r\n this.FMapObject.invalidateSize();\r\n end;\r\n end;\r\nend;\r\n\r\nfunction GPXToCoordinates(AGPXData: string): TJSArray;\r\nbegin\r\n Result := nil;\r\n asm\r\n var parser = new DOMParser();\r\n var xmlDoc = parser.parseFromString(AGPXData, \"application/xml\");\r\n\r\n var trkpts = xmlDoc.getElementsByTagName(\"trkpt\");\r\n if (trkpts.length == 0) {\r\n trkpts = xmlDoc.getElementsByTagName(\"rtept\");\r\n }\r\n\r\n var coordinates = [];\r\n\r\n for (var i = 0; i < trkpts.length; i++) {\r\n var trkpt = trkpts[i];\r\n var lat = trkpt.getAttribute(\"lat\");\r\n var lon = trkpt.getAttribute(\"lon\");\r\n var coord = [];\r\n coord.push(parseFloat(lat));\r\n coord.push(parseFloat(lon));\r\n //coordinates.push({ latitude: parseFloat(lat), longitude: parseFloat(lon) });\r\n coordinates.push(coord);\r\n }\r\n return coordinates;\r\n end;\r\nend;\r\n\r\n{ TLeafletMapsOptions }\r\n\r\nprocedure TLeafletMapsOptions.Assign(Source: TPersistent);\r\nbegin\r\n if (Source is TLeafletMapsOptions) then\r\n begin\r\n FDefaultLatitude := (Source as TLeafletMapsOptions).DefaultLatitude;\r\n FDefaultLongitude := (Source as TLeafletMapsOptions).DefaultLongitude;\r\n FDefaultZoomLevel := (Source as TLeafletMapsOptions).DefaultZoomLevel;\r\n FZoomControl := (Source as TLeafletMapsOptions).ZoomControl;\r\n end;\r\nend;\r\n\r\nconstructor TLeafletMapsOptions.Create(AOwner: TLeafletMaps);\r\nbegin\r\n FOwner := AOwner;\r\n FDefaultLatitude := -34.397;\r\n FDefaultLongitude := 150.644;\r\n FDefaultZoomLevel := 13;\r\n FZoomControl := lzTopLeft;\r\nend;\r\n\r\nprocedure TLeafletMapsOptions.SetDefaultLatitude(const Value: Double);\r\nbegin\r\n FDefaultLatitude := Value;\r\n if Assigned(FOwner) then\r\n FOwner.SetCenter(FDefaultLatitude, FDefaultLongitude);\r\nend;\r\n\r\nprocedure TLeafletMapsOptions.SetDefaultLongitude(const Value: Double);\r\nbegin\r\n FDefaultLongitude := Value;\r\n if Assigned(FOwner) then\r\n FOwner.SetCenter(FDefaultLatitude, FDefaultLongitude);\r\nend;\r\n\r\nprocedure TLeafletMapsOptions.SetDefaultZoomLevel(const Value: Integer);\r\nbegin\r\n FDefaultZoomLevel := Value;\r\n if Assigned(FOwner) then\r\n FOwner.SetZoom(FDefaultZoomLevel);\r\nend;\r\n\r\nprocedure TLeafletMapsOptions.SetZoomControl(const Value: TLeafletZoom);\r\nbegin\r\n FZoomControl := Value;\r\n if Assigned(FOwner) then\r\n FOwner.SetZoomControl(Value);\r\nend;\r\n\r\nend.\r\n","{********************************************************************}\r\n{ }\r\n{ written by TMS Software }\r\n{ Copyright (c) 2018 - 2020 }\r\n{ Email : info@tmssoftware.com }\r\n{ Web : http://www.tmssoftware.com }\r\n{ }\r\n{ The source code is given as is. The author is not responsible }\r\n{ for any possible damage done due to the use of this code. }\r\n{ The complete source code remains property of the author and may }\r\n{ not be distributed, published, given or sold in any form as such. }\r\n{ No parts of the source code can be included in any other component }\r\n{ or application without written authorization of the author. }\r\n{********************************************************************}\r\n\r\nunit jsdelphisystem;\r\n\r\ninterface\r\n\r\nimplementation\r\n\r\nend.\r\n","{********************************************************************}\r\n{ }\r\n{ written by TMS Software }\r\n{ copyright (c) 2018 - 2024 }\r\n{ Email : info@tmssoftware.com }\r\n{ Web : http://www.tmssoftware.com }\r\n{ }\r\n{ The source code is given as is. The author is not responsible }\r\n{ for any possible damage done due to the use of this code. }\r\n{ The complete source code remains property of the author and may }\r\n{ not be distributed, published, given or sold in any form as such. }\r\n{ No parts of the source code can be included in any other component }\r\n{ or application without written authorization of the author. }\r\n{********************************************************************}\r\n\r\nunit WEBLib.Mask;\r\n\r\n{$DEFINE NOPP}\r\n\r\ninterface\r\n\r\nuses\r\n Classes, SysUtils, StrUtils, WEBLib.Controls, WEBLib.StdCtrls, Web;\r\n\r\ntype\r\n TMaskedState = set of (mStateMasked, mStateReEnter, mStateDBSetText);\r\n\r\n TMaskedText = type string;\r\n TEditMask = type string;\r\n\r\n TCustomMaskEdit = class(TEdit)\r\n private\r\n FEditMask: TEditMask;\r\n FMaskBlank: Char;\r\n FMaxChars: Integer;\r\n FMaskState: TMaskedState;\r\n FCaretPos: Integer;\r\n FOldValue: string;\r\n FEditText: string;\r\n function GetEditText: string;\r\n procedure SetEditText(const Value: string);\r\n function AddEditFormat(const Value: string; Active: Boolean): string;\r\n function RemoveEditFormat(const Value: string): string;\r\n procedure ArrowKeys(CharCode: Word; Shift: TShiftState);\r\n procedure CursorInc(CursorPos: Integer; Incr: Integer);\r\n function CursorDec(CursorPos: Integer): Integer;\r\n procedure DeleteKeys(CharCode: Word);\r\n function DeleteSelection(var Value: string; Offset: Integer;\r\n Len: Integer): Boolean;\r\n procedure HomeEndKeys(CharCode: Word; Shift: TShiftState);\r\n function CharKeys(var CharCode: Char): Boolean;\r\n function InputChar(var NewChar: Char; Offset: Integer): Boolean;\r\n function DoInputChar(var NewChar: Char; MaskOffset: Integer): Boolean;\r\n function FindLiteralChar (MaskOffset: Integer; InChar: Char): Integer;\r\n protected\r\n procedure SetEditMask(const Value: TEditMask);\r\n function GetMasked: Boolean;\r\n function GetTextLen: integer;\r\n function EditCanModify: boolean; virtual;\r\n procedure ReformatText(const NewMask: string);\r\n procedure KeyDown(var Key: Word; Shift: TShiftState); override;\r\n procedure KeyUp(var Key: Word; Shift: TShiftState); override;\r\n procedure KeyPress(var Key: Char); override;\r\n procedure MouseUp(Button: TMouseButton; Shift: TShiftState; X,Y: Integer); override;\r\n procedure CheckCursor;\r\n procedure Reset; virtual;\r\n procedure Loaded; override;\r\n procedure DoEnter; override;\r\n procedure InitCSSLibrary(ALibrary: TCSSLibrary); override;\r\n public\r\n procedure CreateInitialize; override;\r\n procedure GetSel(var ASelStart: Integer; var ASelStop: Integer);\r\n procedure SetSel(ASelStart: Integer; ASelStop: Integer);\r\n procedure SetCursor(Pos: Integer);\r\n\r\n property EditMask: TEditMask read FEditMask write SetEditMask;\r\n property EditText: string read GetEditText write SetEditText;\r\n\r\n function GetFirstEditChar: Integer;\r\n function GetLastEditChar: Integer;\r\n function GetNextEditChar(Offset: Integer): Integer;\r\n function GetPriorEditChar(Offset: Integer): Integer;\r\n function GetMaxChars: Integer;\r\n property IsMasked: Boolean read GetMasked;\r\n end;\r\n\r\n TMaskEdit = class(TCustomMaskEdit)\r\n published\r\n property EditMask;\r\n property ElementClassName;\r\n property ElementID;\r\n property ElementFont;\r\n property ElementPosition;\r\n end;\r\n\r\n TWebMaskEdit = class(TMaskEdit);\r\n\r\nimplementation\r\n\r\nuses\r\n Math, WEBLib.WebTools;\r\n\r\ntype\r\n TMaskCharType = (mcNone, mcLiteral, mcIntlLiteral, mcDirective, mcMask,\r\n mcMaskOpt, mcFieldSeparator, mcField);\r\n\r\n TMaskInstructions = set of (miReverseDir, miUpperCase, miLowerCase,\r\n miLiteralChar);\r\n\r\nconst\r\n dMaskReverse = '!';\r\n dMaskUpperCase = '>';\r\n dMaskLowerCase = '<';\r\n dMaskLiteral = '\\';\r\n\r\n cMaskAlpha = 'L';\r\n cMaskAlphaOpt = 'l';\r\n cMaskAlphaNum = 'A';\r\n cMaskAlphaNumOpt = 'a';\r\n cMaskAscii = 'C';\r\n cMaskAsciiOpt = 'c';\r\n cMaskNumeric = '0';\r\n cMaskNumericOpt = '9';\r\n cMaskNumSymOpt = '#';\r\n cMaskTimeSeparator = ':';\r\n cMaskDateSeparator = '/';\r\n mskSeparator = ';';\r\n mskBlank = '_';\r\n\r\nfunction IsCharAlpha(IChar: Char): boolean;\r\nbegin\r\n Result := ((IChar >= 'a') and (IChar <= 'z')) or\r\n ((IChar >= 'A') and (IChar <= 'Z'));\r\nend;\r\n\r\nfunction IsCharAlphaNumeric(IChar: Char): boolean;\r\nbegin\r\n Result := ((IChar >= 'a') and (IChar <= 'z')) or\r\n ((IChar >= 'A') and (IChar <= 'Z')) or\r\n ((IChar >= '0') and (IChar <= '9'));\r\nend;\r\n\r\nfunction GetMaskCharType(const EditMask: string; MaskOffset: Integer): TMaskCharType;\r\nvar\r\n MaskChar: Char;\r\nbegin\r\n Result := mcLiteral;\r\n MaskChar := #0;\r\n if MaskOffset <= Length(EditMask) then\r\n MaskChar := EditMask[MaskOffset];\r\n if MaskOffset > Length(EditMask) then\r\n Result := mcNone\r\n else if (MaskOffset > 1) and (EditMask[MaskOffset - 1] = dMaskLiteral) and\r\n not ((MaskOffset > 2) and (EditMask[MaskOffset - 2] = dMaskLiteral)) then\r\n Result := mcLiteral\r\n else if (MaskChar = mskSeparator) and\r\n (Length(EditMask) >= 4) and\r\n (MaskOffset > Length(EditMask) - 4) then\r\n Result := mcFieldSeparator\r\n else if (Length(EditMask) >= 4) and\r\n (MaskOffset > (Length(EditMask) - 4)) and\r\n (EditMask[MaskOffset - 1] = mskSeparator) and\r\n not ((MaskOffset > 2) and (EditMask[MaskOffset - 2] = dMaskLiteral)) then\r\n Result := mcField\r\n\r\n else if MaskChar in [cMaskTimeSeparator, cMaskDateSeparator] then\r\n Result := mcIntlLiteral\r\n\r\n else if MaskChar in [dMaskReverse, dMaskUpperCase, dMaskLowerCase,\r\n dMaskLiteral] then\r\n Result := mcDirective\r\n\r\n else if MaskChar in [cMaskAlphaOpt, cMaskAlphaNumOpt, cMaskAsciiOpt,\r\n cMaskNumSymOpt, cMaskNumericOpt] then\r\n Result := mcMaskOpt\r\n\r\n else if MaskChar in [cMaskAlpha, cMaskAlphaNum, cMaskAscii, cMaskNumeric] then\r\n Result := mcMask;\r\nend;\r\n\r\n\r\nfunction GetMaskInstructions(const EditMask: string; MaskOffset: Integer): TMaskInstructions;\r\nvar\r\n I: Integer;\r\n MaskChar: Char;\r\nbegin\r\n Result := [];\r\n for I := 0 to Length(EditMask) - 1 do\r\n begin\r\n MaskChar := EditMask[I+1];\r\n if (MaskChar = dMaskReverse) then\r\n Result := Result + [miReverseDir]\r\n else\r\n if (MaskChar = dMaskLowerCase) and (I < MaskOffset-1) then\r\n begin\r\n Result := Result - [miUpperCase] + [miLowerCase];\r\n end\r\n else\r\n if (MaskChar = dMaskUpperCase) and (I < MaskOffset-1) then\r\n begin\r\n Result := Result - [miLowerCase];\r\n if not ((I > 0) and (EditMask[I] = dMaskLowerCase)) then\r\n Result := Result + [miUpperCase];\r\n end;\r\n end;\r\n if GetMaskCharType(EditMask, MaskOffset) = mcLiteral then\r\n Result := Result + [miLiteralChar];\r\nend;\r\n\r\nfunction GetFormatSettingsChar(IChar: Char): Char;\r\nbegin\r\n Result := IChar;\r\n case IChar of\r\n cMaskTimeSeparator: Result := Char(FormatSettings.TimeSeparator);\r\n cMaskDateSeparator: Result := Char(FormatSettings.DateSeparator);\r\n end;\r\nend;\r\n\r\nfunction MaskOffsetToString(const EditMask: String; MaskOffset: Integer): string;\r\nvar\r\n I: Integer;\r\n CType: TMaskCharType;\r\nbegin\r\n Result := '';\r\n for I := 1 to MaskOffset do\r\n begin\r\n CType := GetMaskCharType(EditMask, I);\r\n if not (CType in [mcDirective, mcField, mcFieldSeparator]) then\r\n Result := Result + EditMask[I];\r\n end;\r\nend;\r\n\r\nfunction MaskOffsetToOffset(const EditMask: String; MaskOffset: Integer): Integer;\r\nbegin\r\n Result := Length(MaskOffsetToString(Editmask, MaskOffset));\r\nend;\r\n\r\nfunction OffsetToMaskOffset(const EditMask: string; Offset: Integer): Integer;\r\nvar\r\n I: Integer;\r\n Count: Integer;\r\n MaxChars: Integer;\r\nbegin\r\n MaxChars := MaskOffsetToOffset(EditMask, Length(EditMask));\r\n if Offset > MaxChars then\r\n begin\r\n Result := -1;\r\n Exit;\r\n end;\r\n\r\n Result := 0;\r\n Count := Offset;\r\n for I := 1 to Length(EditMask) do\r\n begin\r\n Inc(Result);\r\n if not (mcDirective = GetMaskCharType(EditMask, I)) then\r\n begin\r\n Dec(Count);\r\n if Count < 0 then\r\n Exit;\r\n end;\r\n end;\r\nend;\r\n\r\nfunction FormatMaskedText(const EditMask: string; const Value: string; Blank: Char): string;\r\nvar\r\n I: Integer;\r\n Offset, MaskOffset: Integer;\r\n CType: TMaskCharType;\r\n Dir: TMaskInstructions;\r\nbegin\r\n Result := Value;\r\n Dir := GetMaskInstructions(EditMask, 1);\r\n\r\n if not (miReverseDir in Dir) then\r\n begin\r\n { starting at the beginning, insert literal chars in the string\r\n and add spaces on the end }\r\n Offset := 1;\r\n for MaskOffset := 1 to Length(EditMask) do\r\n begin\r\n CType := GetMaskCharType(EditMask, MaskOffset);\r\n\r\n if CType in [mcLiteral, mcIntlLiteral] then\r\n begin\r\n Result := Copy(Result, 1, Offset - 1) +\r\n GetFormatSettingsChar(EditMask[MaskOffset]) +\r\n Copy(Result, Offset, Length(Result) - Offset + 1);\r\n Inc(Offset);\r\n end\r\n else if CType in [mcMask, mcMaskOpt] then\r\n begin\r\n if Offset > Length(Result) then\r\n Result := Result + Blank;\r\n Inc(Offset);\r\n end;\r\n end;\r\n end\r\n else\r\n begin\r\n { starting at the end, insert literal chars in the string\r\n and add spaces at the beginning }\r\n Offset := Length(Result);\r\n for I := 0 to (Length(EditMask) - 1) do\r\n begin\r\n MaskOffset := Length(EditMask) - I;\r\n CType := GetMaskCharType(EditMask, MaskOffset);\r\n\r\n if CType in [mcLiteral, mcIntlLiteral] then\r\n begin\r\n Result := Copy(Result, 1, Offset) +\r\n GetFormatSettingsChar(EditMask[MaskOffset]) +\r\n Copy(Result, Offset + 1, Length(Result) - Offset);\r\n end\r\n else if CType in [mcMask, mcMaskOpt] then\r\n begin\r\n if Offset < 1 then\r\n Result := Blank + Result\r\n else\r\n Dec(Offset);\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\nfunction IsLiteralChar(const EditMask: string; Offset: Integer): Boolean;\r\nvar\r\n MaskOffset: Integer;\r\n CType: TMaskCharType;\r\nbegin\r\n Result := False;\r\n MaskOffset := OffsetToMaskOffset(EditMask, Offset);\r\n if MaskOffset >= 0 then\r\n begin\r\n CType := GetMaskCharType(EditMask, MaskOffset);\r\n Result := CType in [mcLiteral, mcIntlLiteral];\r\n end;\r\nend;\r\n\r\nfunction GetMaskBlank(const EditMask: string): Char;\r\nbegin\r\n Result := mskBlank;\r\n if Length(EditMask) >= 4 then\r\n begin\r\n if (GetMaskCharType(EditMask, Length(EditMask) - 1) = mcFieldSeparator) then\r\n begin\r\n if (GetMaskCharType(EditMask, Length(EditMask) - 2) = mcFieldSeparator) or\r\n (GetMaskCharType(EditMask, Length(EditMask) - 3) = mcFieldSeparator) then\r\n begin\r\n Result := EditMask[Length(EditMask)];\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\n{ TCustomMaskEdit }\r\n\r\nfunction TCustomMaskEdit.AddEditFormat(const Value: string;\r\n Active: Boolean): string;\r\nbegin\r\n if not Active then\r\n Result := FormatMaskedText(EditMask, Value, ' ')\r\n else\r\n Result := FormatMaskedText(EditMask, Value, FMaskBlank);\r\nend;\r\n\r\nprocedure TCustomMaskEdit.ArrowKeys(CharCode: Word; Shift: TShiftState);\r\nvar\r\n ASelStart, ASelStop : Integer;\r\nbegin\r\n if (ssCtrl in Shift) then Exit;\r\n GetSel(ASelStart, ASelStop);\r\n if (ssShift in Shift) then\r\n begin\r\n if (CharCode = VK_RIGHT) then\r\n begin\r\n Inc(FCaretPos);\r\n if (ASelStop = ASelStart + 1) then\r\n begin\r\n SetSel(ASelStart, ASelStop); {reset caret to end of string}\r\n Inc(FCaretPos);\r\n end;\r\n if FCaretPos > FMaxChars then FCaretPos := FMaxChars;\r\n end\r\n else {if (CharCode = VK_LEFT) then}\r\n begin\r\n Dec(FCaretPos);\r\n if (ASelStop = ASelStart + 2) and\r\n (FCaretPos > ASelStart) then\r\n begin\r\n SetSel(ASelStart + 1, ASelStart + 1); {reset caret to show up at start}\r\n Dec(FCaretPos);\r\n end;\r\n if FCaretPos < 0 then FCaretPos := 0;\r\n end;\r\n end\r\n else\r\n begin\r\n if (ASelStop - ASelStart) > 1 then\r\n begin\r\n if ASelStop = FCaretPos then\r\n Dec(FCaretPos);\r\n SetCursor(FCaretPos);\r\n end\r\n else if (CharCode = VK_LEFT) then\r\n CursorDec(ASelStart)\r\n else { if (CharCode = VK_RIGHT) then }\r\n begin\r\n if ASelStop = ASelStart then\r\n SetCursor(ASelStart)\r\n else\r\n CursorInc(ASelStart, 1);\r\n end;\r\n end;\r\n\r\nend;\r\n\r\nfunction TCustomMaskEdit.CharKeys(var CharCode: Char): Boolean;\r\nvar\r\n ASelStart, ASelStop : Integer;\r\n Txt: string;\r\nbegin\r\n Result := False;\r\n\r\n GetSel(ASelStart, ASelStop);\r\n\r\n if (ASelStop - ASelStart) > 1 then\r\n begin\r\n DeleteKeys(VK_DELETE);\r\n ASelStart := GetNextEditChar(ASelStart);\r\n SetCursor(ASelStart);\r\n end;\r\n\r\n Result := InputChar(CharCode, ASelStart);\r\n\r\n if Result then\r\n begin\r\n Txt := CharCode;\r\n\r\n Text := Copy(Text, 1, ASelStart) + Txt + Copy(Text, ASelStop + 1, Length(Text));\r\n\r\n CursorInc(ASelStart, 1);\r\n end;\r\nend;\r\n\r\nprocedure TCustomMaskEdit.CheckCursor;\r\nvar\r\n ASelStart, ASelStop: Integer;\r\nbegin\r\n if not HandleAllocated then Exit;\r\n if (IsMasked) then\r\n begin\r\n GetSel(ASelStart, ASelStop);\r\n if ASelStart = ASelStop then\r\n SetCursor(ASelStart);\r\n end;\r\nend;\r\n\r\nprocedure TCustomMaskEdit.CreateInitialize;\r\nbegin\r\n inherited;\r\n Height := 25;\r\nend;\r\n\r\nfunction TCustomMaskEdit.CursorDec(CursorPos: Integer): integer;\r\nvar\r\n nuPos: Integer;\r\nbegin\r\n Result := 0;\r\n\r\n if CursorPos > 0 then\r\n begin\r\n nuPos := CursorPos;\r\n Dec(nuPos);\r\n nuPos := GetPriorEditChar(nuPos);\r\n SetCursor(NuPos);\r\n Result := NuPos;\r\n end;\r\nend;\r\n\r\nprocedure TCustomMaskEdit.CursorInc(CursorPos, Incr: Integer);\r\nvar\r\n NuPos: Integer;\r\nbegin\r\n if (CursorPos < Length(Text)) then\r\n begin\r\n NuPos := CursorPos + Incr;\r\n NuPos := GetNextEditChar(NuPos);\r\n if IsLiteralChar(EditMask, nuPos) then\r\n NuPos := CursorPos;\r\n SetCursor(NuPos);\r\n end;\r\nend;\r\n\r\nprocedure TCustomMaskEdit.DeleteKeys(CharCode: Word);\r\nvar\r\n ASelStart, ASelStop: Integer;\r\n Str, Orig: string;\r\nbegin\r\n GetSel(ASelStart, ASelStop);\r\n\r\n if (ASelStop - ASelStart) < 1 then Exit;\r\n\r\n Str := Text;\r\n Orig := Text;\r\n\r\n DeleteSelection(Str, ASelStart, ASelStop - ASelStart);\r\n\r\n Str := Copy(Str, ASelStart + 1, ASelStop - ASelStart);\r\n\r\n Str := Copy(Orig, 1, ASelStart) + Str + Copy(Orig, ASelStop + 1, Length(Orig));\r\n\r\n Text := Str;\r\n\r\n SetCursor(ASelStart);\r\n Change;\r\nend;\r\n\r\nfunction TCustomMaskEdit.DeleteSelection(var Value: string; Offset,\r\n Len: Integer): Boolean;\r\nvar\r\n EndDel: Integer;\r\n StrOffset, MaskOffset, Temp: Integer;\r\n CType: TMaskCharType;\r\nbegin\r\n Result := True;\r\n if Len = 0 then Exit;\r\n\r\n StrOffset := Offset + 1;\r\n EndDel := StrOffset + Len;\r\n Temp := OffsetToMaskOffset(EditMask, Offset);\r\n if Temp < 0 then Exit;\r\n for MaskOffset := Temp to Length(EditMask) do\r\n begin\r\n CType := GetMaskCharType(EditMask, MaskOffset);\r\n if CType in [mcLiteral, mcIntlLiteral] then\r\n Inc(StrOffset)\r\n else if CType in [mcMask, mcMaskOpt] then\r\n begin\r\n Value[StrOffset] := FMaskBlank;\r\n Inc(StrOffset);\r\n end;\r\n if StrOffset >= EndDel then Break;\r\n end;\r\nend;\r\n\r\nprocedure TCustomMaskEdit.DoEnter;\r\nbegin\r\n inherited;\r\n SelStart := 0;\r\n SelLength := 1;\r\nend;\r\n\r\nfunction TCustomMaskEdit.DoInputChar(var NewChar: Char;\r\n MaskOffset: Integer): Boolean;\r\nvar\r\n Instr: TMaskInstructions;\r\n Str: string;\r\n CType: TMaskCharType;\r\n\r\nbegin\r\n Result := True;\r\n CType := GetMaskCharType(EditMask, MaskOffset);\r\n if CType in [mcLiteral, mcIntlLiteral] then\r\n NewChar := GetFormatSettingsChar(EditMask[MaskOffset])\r\n else\r\n begin\r\n Instr := GetMaskInstructions(EditMask, MaskOffset);\r\n case EditMask[MaskOffset] of\r\n cMaskNumeric, cMaskNumericOpt:\r\n begin\r\n if not ((NewChar >= '0') and (NewChar <= '9')) then\r\n Result := False;\r\n end;\r\n cMaskNumSymOpt:\r\n begin\r\n if not (((NewChar >= '0') and (NewChar <= '9')) or\r\n (NewChar = ' ') or(NewChar = '+') or(NewChar = '-')) then\r\n Result := False;\r\n end;\r\n cMaskAscii, cMaskAsciiOpt:\r\n begin\r\n if IsCharAlpha(NewChar) then\r\n begin\r\n Str := ' ';\r\n Str[1] := NewChar;\r\n if (miUpperCase in Instr) then\r\n Str := UpperCase(Str)\r\n else if miLowerCase in Instr then\r\n Str := LowerCase(Str);\r\n NewChar := Str[1];\r\n end;\r\n end;\r\n cMaskAlpha, cMaskAlphaOpt, cMaskAlphaNum, cMaskAlphaNumOpt:\r\n begin\r\n Str := ' ';\r\n Str[1] := NewChar;\r\n if not IsCharAlpha(NewChar) then\r\n begin\r\n Result := False;\r\n if ((EditMask[MaskOffset] = cMaskAlphaNum) or\r\n (EditMask[MaskOffset] = cMaskAlphaNumOpt)) and\r\n (IsCharAlphaNumeric(NewChar)) then\r\n Result := True;\r\n end\r\n else if miUpperCase in Instr then\r\n Str := UpperCase(Str)\r\n else if miLowerCase in Instr then\r\n Str := LowerCase(Str);\r\n NewChar := Str[1];\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TCustomMaskEdit.EditCanModify: boolean;\r\nbegin\r\n Result := not ReadOnly;\r\nend;\r\n\r\nfunction TCustomMaskEdit.FindLiteralChar(MaskOffset: Integer;\r\n InChar: Char): Integer;\r\nvar\r\n CType: TMaskCharType;\r\n LitChar: Char;\r\nbegin\r\n Result := -1;\r\n while MaskOffset < Length(EditMask) do\r\n begin\r\n Inc(MaskOffset);\r\n CType := GetMaskCharType(EditMask, MaskOffset);\r\n if CType in [mcLiteral, mcIntlLiteral] then\r\n begin\r\n LitChar := EditMask[MaskOffset];\r\n if CType = mcIntlLiteral then\r\n LitChar := GetFormatSettingsChar(LitChar);\r\n if LitChar = InChar then\r\n Result := MaskOffset;\r\n Exit;\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TCustomMaskEdit.GetEditText: string;\r\nbegin\r\n Result := RemoveEditFormat(inherited Text);\r\nend;\r\n\r\nfunction TCustomMaskEdit.GetFirstEditChar: Integer;\r\nbegin\r\n Result := 0;\r\n if IsMasked then\r\n Result := GetNextEditChar(0);\r\nend;\r\n\r\nfunction TCustomMaskEdit.GetLastEditChar: Integer;\r\nbegin\r\n Result := GetMaxChars;\r\n if IsMasked then\r\n Result := GetPriorEditChar(Result - 1);\r\nend;\r\n\r\nfunction TCustomMaskEdit.GetMasked: Boolean;\r\nbegin\r\n Result := EditMask <> '';\r\nend;\r\n\r\nfunction TCustomMaskEdit.GetMaxChars: Integer;\r\nbegin\r\n if IsMasked then\r\n Result := FMaxChars\r\n else\r\n Result := GetTextLen;\r\nend;\r\n\r\nfunction TCustomMaskEdit.GetNextEditChar(Offset: Integer): Integer;\r\nbegin\r\n Result := Offset;\r\n while (Result < FMaxChars) and (IsLiteralChar(EditMask, Result)) do\r\n Inc(Result);\r\nend;\r\n\r\nfunction TCustomMaskEdit.GetPriorEditChar(Offset: Integer): Integer;\r\nbegin\r\n Result := Offset;\r\n while (Result >= 0) and (IsLiteralChar(EditMask, Result)) do\r\n Dec(Result);\r\n if Result < 0 then\r\n Result := GetNextEditChar(Result);\r\nend;\r\n\r\nprocedure TCustomMaskEdit.GetSel(var ASelStart, ASelStop: Integer);\r\nbegin\r\n ASelStart := SelStart;\r\n ASelStop := SelStart + SelLength;\r\nend;\r\n\r\nfunction TCustomMaskEdit.GetTextLen: integer;\r\nbegin\r\n Result := Length(Text);\r\nend;\r\n\r\nprocedure TCustomMaskEdit.HomeEndKeys(CharCode: Word; Shift: TShiftState);\r\nvar\r\n ASelStart, ASelStop : Integer;\r\nbegin\r\n GetSel(ASelStart, ASelStop);\r\n if (CharCode = VK_HOME) then\r\n begin\r\n if (ssShift in Shift) then\r\n begin\r\n if (ASelStart <> FCaretPos) and (ASelStop <> (ASelStart + 1)) then\r\n ASelStop := ASelStart + 1;\r\n SetSel(0, ASelStop);\r\n CheckCursor;\r\n end\r\n else\r\n SetCursor(0);\r\n FCaretPos := 0;\r\n end\r\n else\r\n begin\r\n if (ssShift in Shift) then\r\n begin\r\n if (ASelStop <> FCaretPos) and (ASelStop <> (ASelStart + 1)) then\r\n ASelStart := ASelStop - 1;\r\n SetSel(ASelStart, FMaxChars);\r\n CheckCursor;\r\n end\r\n else\r\n SetCursor(FMaxChars - 1);\r\n FCaretPos := FMaxChars;\r\n end;\r\n\r\nend;\r\n\r\nprocedure TCustomMaskEdit.InitCSSLibrary(ALibrary: TCSSLibrary);\r\nbegin\r\n if (ALibrary = cssBootstrap) then\r\n begin\r\n ElementClassName := 'form-control';\r\n ElementFont := efCSS;\r\n HeightStyle := ssAuto;\r\n end;\r\nend;\r\n\r\nfunction TCustomMaskEdit.InputChar(var NewChar: Char; Offset: Integer): Boolean;\r\nvar\r\n MaskOffset: Integer;\r\n CType: TMaskCharType;\r\n InChar: Char;\r\nbegin\r\n Result := True;\r\n\r\n if EditMask <> '' then\r\n begin\r\n Result := False;\r\n if Offset < FMaxChars then\r\n begin\r\n MaskOffset := OffsetToMaskOffset(EditMask, Offset);\r\n if MaskOffset >= 0 then\r\n begin\r\n CType := GetMaskCharType(EditMask, MaskOffset);\r\n InChar := NewChar;\r\n Result := DoInputChar(NewChar, MaskOffset);\r\n if not Result and (CType in [mcMask, mcMaskOpt]) then\r\n begin\r\n MaskOffset := FindLiteralChar (MaskOffset, InChar);\r\n if MaskOffset > 0 then\r\n begin\r\n MaskOffset := MaskOffsetToOffset(EditMask, MaskOffset);\r\n SetCursor (MaskOffset);\r\n Exit;\r\n end;\r\n end;\r\n end;\r\n end;\r\n end;\r\n if not Result and (NewChar <> #13) and (NewChar <> #27) then\r\n begin\r\n MessageBeep(0)\r\n end\r\n else\r\n Change;\r\nend;\r\n\r\nprocedure TCustomMaskEdit.KeyDown(var Key: Word; Shift: TShiftState);\r\nbegin\r\n inherited KeyDown(Key, Shift);\r\n\r\n if (Key in [VK_LEFT, VK_RIGHT, VK_HOME, VK_END]) then\r\n begin\r\n PreventDefault;\r\n StopPropagation;\r\n end;\r\n\r\n if IsMasked and (Key <> 0) and not (ssAlt in Shift) then\r\n begin\r\n if not (Key in [VK_LEFT, VK_RIGHT, VK_HOME, VK_END]) then\r\n begin\r\n if SelLength > 1 then\r\n begin\r\n SelStart := 0;\r\n SelLength := 1;\r\n end;\r\n end;\r\n\r\n if (Key = VK_LEFT) or(Key = VK_RIGHT) then\r\n begin\r\n ArrowKeys(Key, Shift);\r\n if not ((ssShift in Shift) or (ssCtrl in Shift)) then\r\n Key := 0;\r\n Exit;\r\n end\r\n else if (Key = VK_UP) or(Key = VK_DOWN) then\r\n begin\r\n Key := 0;\r\n Exit;\r\n end\r\n else if (Key = VK_HOME) or(Key = VK_END) then\r\n begin\r\n HomeEndKeys(Key, Shift);\r\n Key := 0;\r\n Exit;\r\n end\r\n else if ((Key = VK_DELETE) and not (ssShift in Shift)) or\r\n (Key = VK_BACK) then\r\n begin\r\n if EditCanModify then\r\n DeleteKeys(Key);\r\n\r\n if not (Key = VK_BACK) then\r\n begin\r\n Key := 0;\r\n PreventDefault;\r\n StopPropagation;\r\n end;\r\n Exit;\r\n end;\r\n CheckCursor;\r\n end;\r\nend;\r\n\r\nprocedure TCustomMaskEdit.KeyPress(var Key: Char);\r\nbegin\r\n inherited KeyPress(Key);\r\n\r\n if IsMasked and (Key <> #0) and not CharInSet(Key, [^V, ^X, ^C, #8]) then\r\n begin\r\n CharKeys(Key);\r\n Key := #0;\r\n PreventDefault;\r\n StopPropagation;\r\n end;\r\nend;\r\n\r\nprocedure TCustomMaskEdit.KeyUp(var Key: Word; Shift: TShiftState);\r\nbegin\r\n inherited KeyUp(Key, Shift);\r\n\r\n if IsMasked and (Key <> 0) then\r\n begin\r\n if ((Key = VK_LEFT) or(Key = VK_RIGHT)) and (ssCtrl in Shift) then\r\n CheckCursor;\r\n end;\r\nend;\r\n\r\nprocedure TCustomMaskEdit.Loaded;\r\nbegin\r\n inherited;\r\n //Text := FEditText;\r\nend;\r\n\r\nprocedure TCustomMaskEdit.MouseUp(Button: TMouseButton; Shift: TShiftState; X,\r\n Y: Integer);\r\nbegin\r\n inherited;\r\nend;\r\n\r\nprocedure TCustomMaskEdit.ReformatText(const NewMask: string);\r\nvar\r\n OldText: string;\r\nbegin\r\n OldText := RemoveEditFormat(EditText);\r\n FEditMask := NewMask;\r\n FMaxChars := MaskOffsetToOffset(EditMask, Length(NewMask));\r\n FMaskBlank := GetMaskBlank(NewMask);\r\n// OldText := AddEditFormat(OldText, True);\r\n EditText := OldText;\r\nend;\r\n\r\nfunction TCustomMaskEdit.RemoveEditFormat(const Value: string): string;\r\nvar\r\n I: Integer;\r\n OldLen: Integer;\r\n Offset, MaskOffset: Integer;\r\n CType: TMaskCharType;\r\n Dir: TMaskInstructions;\r\nbegin\r\n Offset := 1;\r\n Result := Value;\r\n for MaskOffset := 1 to Length(EditMask) do\r\n begin\r\n CType := GetMaskCharType(EditMask, MaskOffset);\r\n\r\n if CType in [mcLiteral, mcIntlLiteral] then\r\n Result := Copy(Result, 1, Offset - 1) +\r\n Copy(Result, Offset + 1, Length(Result) - Offset);\r\n if CType in [mcMask, mcMaskOpt] then Inc(Offset);\r\n end;\r\n\r\n Dir := GetMaskInstructions(EditMask, 1);\r\n if miReverseDir in Dir then\r\n begin\r\n Offset := 1;\r\n for I := 1 to Length(Result) do\r\n begin\r\n if Result[I] = FMaskBlank then\r\n Inc(Offset)\r\n else\r\n break;\r\n end;\r\n if Offset <> 1 then\r\n Result := Copy(Result, Offset, Length(Result) - Offset + 1);\r\n end\r\n else begin\r\n OldLen := Length(Result);\r\n for I := 1 to OldLen do\r\n begin\r\n if Result[OldLen - I + 1] = FMaskBlank then\r\n SetLength(Result, Length(Result) - 1)\r\n else Break;\r\n end;\r\n end;\r\n if FMaskBlank <> ' ' then\r\n begin\r\n OldLen := Length(Result);\r\n for I := 1 to OldLen do\r\n begin\r\n if Result[I] = FMaskBlank then\r\n Result[I] := ' ';\r\n if I > OldLen then Break;\r\n end;\r\n end;\r\n\r\nend;\r\n\r\nprocedure TCustomMaskEdit.Reset;\r\nbegin\r\n EditText := FOldValue;\r\nend;\r\n\r\nprocedure TCustomMaskEdit.SetCursor(Pos: Integer);\r\nbegin\r\n SetSel(Pos,Pos + 1);\r\nend;\r\n\r\nprocedure TCustomMaskEdit.SetEditMask(const Value: TEditMask);\r\nvar\r\n SelStart, SelStop: Integer;\r\nbegin\r\n if Value <> EditMask then\r\n begin\r\n if (csDesigning in ComponentState) and (Value <> '') and\r\n not (csLoading in ComponentState) then\r\n EditText := '';\r\n\r\n if HandleAllocated then GetSel(SelStart, SelStop);\r\n\r\n ReformatText(Value);\r\n Exclude(FMaskState, mStateMasked);\r\n\r\n if EditMask <> '' then\r\n Include(FMaskState, mStateMasked);\r\n\r\n inherited MaxLength := 0;\r\n\r\n if IsMasked and (FMaxChars > 0) then\r\n begin\r\n inherited MaxLength := FMaxChars;\r\n end;\r\n\r\n if HandleAllocated and Focused and\r\n not (csDesigning in ComponentState) then\r\n SetCursor(SelStart);\r\n end;\r\nend;\r\n\r\nprocedure TCustomMaskEdit.SetEditText(const Value: string);\r\nbegin\r\n FEditText := AddEditFormat(Value, True);\r\n inherited Text := FEditText;\r\nend;\r\n\r\nprocedure TCustomMaskEdit.SetSel(ASelStart, ASelStop: Integer);\r\nbegin\r\n SelStart := ASelStart;\r\n SelLength := Max(1,ASelStop - ASelStart);\r\nend;\r\n\r\nend.\r\n","unit WEBLib.Ctrls.SVG;\r\n\r\ninterface\r\n\r\nconst\r\n ICON_SEARCH = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAPJJREFUOE+l0i0sR1EUAPDfv0ka0UemEhUzhU0yjea'+\r\n 'j0YxJiCrDRqFoPpqPbjRTbHRVQLO73bfd//Mue3s3nt3zO+eee1oanlbDfFXAJFYwFPF77OCyqlgZ2MYqXnEdE8bQjy2sl5EUCJXPcYQlfMXLHdjFHMKdtk5S4A49GEiSi4IBecYbRtMu'+\r\n 'UuADJ1jIDHYfM+j8CzjFfAY4wBS6csAtev95wgvGc8AELnCMxdIQ9zCLaZzlgBDfxFocVvqNfTHpKQ7xvUCqFil0soxhfOMRh9jAINqQOqvcjZuIPBSbWgcIXQfkCp8YCYG6wK8fbgz8A'+\r\n 'H9+LhG4lkRRAAAAAElFTkSuQmCC';\r\n\r\n ICON_SEARCH_SVG = 'data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/PjxzdmcgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAwIDAgMzIgMzIiIGlkPSJHbHlwaCIgdmV'+\r\n 'yc2lvbj0iMS4xIiB2aWV3Qm94PSIwIDA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yNCAyNCIgd2lkdGg9IjI0cHgiIHhtbDpzcGFjZT0icHJlc2VydmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2'+\r\n 'ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiPjxnPjxnPjxwYXRoIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTEyLDRDNC4wNjMsNC0wLjAxMiwxMi0wL'+\r\n 'jAxMiwxMlMzLjA2MywyMCwxMiwyMCAgICBjOC4wOTMsMCwxMi4wMTEtNy45NjksMTIuMDExLTcuOTY5UzIwLjA2Miw0LDEyLDR6IE0xMi4wMTgsMTdjLTIuOTAyLDAtNS0yLjE4OC01LT'+\r\n 'VjMC0yLjgxMywyLjA5OC01LDUtNWMyLjkwMiwwLDUsMi4xODcsNSw1ICAgIEMxNy4wMTgsMTQuODEyLDE0LjkyLDE3LDEyLjAxOCwxN3ogTTEyLjAxOCw5Yy0xLjY1OCwwLjAwMy0zLDE'+\r\n 'uMzkzLTMsM2MwLDEuNjA2LDEuMzQyLDMsMywzYzEuNjU4LDAsMy0xLjM5NSwzLTMgICAgQzE1LjAxOCwxMC4zOTIsMTMuNjc2LDguOTk3LDEyLjAxOCw5eiIgZmlsbC1ydWxlPSJldmVu'+\r\n 'b2RkIi8+PC9nPjwvZz48L3N2Zz4=';\r\n\r\nimplementation\r\n\r\nend.\r\n","{********************************************************************}\r\n{ }\r\n{ written by TMS Software }\r\n{ Copyright (c) 2018 - 2025 }\r\n{ Email : info@tmssoftware.com }\r\n{ Web : http://www.tmssoftware.com }\r\n{ }\r\n{ The source code is given as is. The author is not responsible }\r\n{ for any possible damage done due to the use of this code. }\r\n{ The complete source code remains property of the author and may }\r\n{ not be distributed, published, given or sold in any form as such. }\r\n{ No parts of the source code can be included in any other component }\r\n{ or application without written authorization of the author. }\r\n{********************************************************************}\r\n\r\nunit WEBLib.Grids;\r\n\r\n{$DEFINE NOPP}\r\n\r\ninterface\r\n\r\n{$HINTS OFF}\r\n\r\nuses\r\n Classes, JS, WEBLib.Controls, WEBLib.Graphics, Web, DB, jsdelphisystem,\r\n WEBLib.Menus, WEBLib.StdCtrls, WEBLib.Mask, WEBLib.Ctrls.SVG, Types;\r\n\r\ntype\r\n{\r\n TJSTable = class external name 'Table' (TJSNode)\r\n private\r\n FRows : TJSElement; external name 'rows';\r\n\r\n public\r\n\r\n end;\r\n}\r\n TInitMethod = (imRandom, imLinear);\r\n\r\n TGridRect = record\r\n Left, Top, Right, Bottom: Longint;\r\n end;\r\n\r\n TGridCoord = record\r\n X: Longint;\r\n Y: Longint;\r\n end;\r\n\r\n TGridOption = (goFixedVertLine, goFixedHorzLine, goVertLine, goHorzLine,\r\n goRangeSelect, goDrawFocusSelected, goRowSizing, goColSizing, goRowMoving,\r\n goColMoving, goEditing, goTabs, goRowSelect, goAlwaysShowEditor,\r\n goThumbTracking, goFixedColClick, goFixedRowClick, goFixedHotTrack,goFixedRowDefAlign);\r\n\r\n TGridDrawState = set of (gdSelected, gdFocused, gdFixed, gdRowSelected,\r\n gdHotTrack, gdPressed);\r\n\r\n TGridSortIndicator = (siNone, siAscending, siDescending);\r\n\r\n TGridCellEditor = (geText, geNumber, geDate, geTime, geRange, geColor, geWeek, geMonth, geURL, geEmail, geTel, geMask, geCombo, geMemo, geNone, geCustom);\r\n\r\n TGridOptions = set of TGridOption;\r\n\r\n TGridGetCellDataEvent = procedure(Sender: TObject; ACol,ARow: integer; AField: TField; var AValue: string) of object;\r\n\r\n TGridGetCellClassEvent = procedure(Sender: TObject; ACol,ARow: integer; AField: TField; AValue: string; var AClassName: string) of object;\r\n\r\n TGridGetCellChildrenEvent = procedure(Sender: TObject; ACol,ARow: integer; AField: TField; AValue: string; AElement: TJSHTMLElementRecord) of object;\r\n\r\n TGridGetCellEditorEvent = procedure(Sender: TObject; ACol,ARow: integer; var AEditor: TGridCellEditor) of object;\r\n\r\n TGridRequestEvent = procedure(Sender: TObject; ARequest: TJSXMLHttpRequestRecord) of object;\r\n\r\n TGridSortClickEvent = procedure(Sender: TObject; ACol,ARow: integer; ASortIndicator: TGridSortIndicator) of object;\r\n\r\n TDrawCellEvent = procedure(Sender: TObject; ACol, ARow: Longint; Rect: TRect; State: TGridDrawState) of object;\r\n\r\n TGetEditEvent = procedure(Sender: TObject; ACol, ARow: Longint; var Value: string) of object;\r\n TSetEditEvent = procedure(Sender: TObject; ACol, ARow: Longint; const Value: string) of object;\r\n\r\n TSetEditControlValueEvent = procedure(Sender: TObject; ACol, ARow: Longint; AControl: TControl; const Value: string) of object;\r\n TGetEditControlValueEvent = procedure(Sender: TObject; ACol, ARow: Longint; AControl: TControl; var Value: string) of object;\r\n\r\n TCustomGrid = class(TWebCustomControl)\r\n private\r\n FRowCount: integer;\r\n FColCount: integer;\r\n function GetCells(ACol, ARow: integer): string; virtual;\r\n procedure SetCells(ACol, ARow: integer; const Value: string); virtual;\r\n function GetCellsArray: TJSArray;\r\n procedure SetCellsArray(const Value: TJSArray);\r\n protected\r\n function ColOffset: integer; virtual;\r\n function RowOffset: integer; virtual;\r\n procedure SetColCount(const Value: integer); virtual;\r\n procedure SetRowCount(const Value: integer); virtual;\r\n procedure GridChanged; virtual;\r\n procedure RowCountChanged(delta: integer); virtual;\r\n procedure ColCountChanged(delta: integer); virtual;\r\n property RowCount: integer read FRowCount write SetRowCount;\r\n property ColCount: integer read FColCount write SetColCount;\r\n public\r\n property CellsArray: TJSArray read GetCellsArray write SetCellsArray;\r\n property Visible;\r\n procedure Clear; virtual;\r\n property Cells[ACol,ARow: integer]: string read GetCells write SetCells;\r\n property BorderColor;\r\n end;\r\n\r\n // for VCL design-time compatibility\r\n TGridDrawingStyle = (gdsClassic, gdsThemed, gdsGradient);\r\n\r\n TCellEvent = procedure(Sender: TObject; ACol, ARow: integer) of object;\r\n TCellCheckEvent = procedure(Sender: TObject; ACol, ARow: integer; Checked: boolean) of object;\r\n TCellCanEditEvent = procedure(Sender: TObject; ACol,ARow: integer; var CanEdit: boolean) of object;\r\n\r\n TSelectCellEvent = procedure(Sender: TObject; ACol, ARow: integer; var CanSelect: boolean) of object;\r\n TColumnSizedEvent = procedure(Sender: TObject; ACol: integer) of object;\r\n\r\n TGridRange = class(TPersistent)\r\n private\r\n FMax: single;\r\n FMin: single;\r\n FStep: single;\r\n public\r\n constructor Create;\r\n procedure Assign(Source: TPersistent); override;\r\n published\r\n property Min: single read FMin write FMin default 0;\r\n property Max: single read FMax write FMax default 100;\r\n property Step: single read FStep write FStep default 1;\r\n end;\r\n\r\n TObjectRow = TList;\r\n\r\n TCustomStringGrid = class(TCustomGrid, ITMSFNCDataBinderGrid)\r\n private\r\n FReq: TJSXMLHttpRequest;\r\n FDataNode: string;\r\n FOrigVal: string;\r\n FGrid: TJSElement;\r\n FFixedColor: TColor;\r\n FFixedColRow: TJSElement;\r\n FFixedRow: TJSElement;\r\n FFixedCol: TJSElement;\r\n FNormalCells: TJSElement;\r\n FDefaultColAlignment: TAlignment;\r\n FDefaultRowHeight: integer;\r\n FDefaultColWidth: integer;\r\n FColWidths: TList;\r\n FRowHeights: TList;\r\n FColAlignments: TList;\r\n FSelectedCell: TJSElement;\r\n FEdit: TJSHTMLElement;\r\n FFixedCols: integer;\r\n FFixedRows: integer;\r\n FEditMode: boolean;\r\n FBlockFocus: boolean;\r\n FOnSelectCell: TSelectCellEvent;\r\n FOnTopLeftChanged: TNotifyEvent;\r\n FOptions: TGridOptions;\r\n FDelimiter: char;\r\n FLoadFixed: boolean;\r\n FSelection: TGridRect;\r\n FStartCell: TGridCoord;\r\n FOnHttpRequestError: TNotifyEvent;\r\n FOnHttpRequestSuccess: TNotifyEvent;\r\n FOnGetCellClass: TGridGetCellClassEvent;\r\n FOnGetCellData: TGridGetCellDataEvent;\r\n FOnGetCellChildren: TGridGetCellChildrenEvent;\r\n FScrollBars: TScrollStyle;\r\n FSelMouseDown: boolean;\r\n FStyleElements: TStyleElements;\r\n FDefaultDrawing: boolean;\r\n FDragCursor: TCursor;\r\n FDragKind: TDragKind;\r\n FGradientStartColor: TColor;\r\n FGradientEndColor: TColor;\r\n FEditCol: integer;\r\n FEditRow: integer;\r\n FEditType: TGridCellEditor;\r\n FFixedFont: TFont;\r\n FCtl3D: boolean;\r\n FParentCtl3D: boolean;\r\n FOnGetEditText: TGetEditEvent;\r\n FOnSetEditText: TSetEditEvent;\r\n FOnHttpRequest: TGridRequestEvent;\r\n FOnCheckClick: TCellCheckEvent;\r\n FOnFixedCellClick: TCellEvent;\r\n FOnValidateEdit: TGetEditEvent;\r\n FHandleEditBlurPtr: pointer;\r\n FHandleEditKeypressPtr: pointer;\r\n FHandleCheckClickPtr: pointer;\r\n FHandleButtonClickPtr: pointer;\r\n FHandleMouseDownPtr: pointer;\r\n FHandleMouseMovePtr: pointer;\r\n FHandleMouseUpPtr: pointer;\r\n FHandleFocusPtr: pointer;\r\n FHandleBlurPtr: pointer;\r\n FHandleFixedClickPtr: pointer;\r\n FHandleClickPtr: pointer;\r\n FDrawingStyle: TGridDrawingStyle;\r\n FOnCanEditCell: TCellCanEditEvent;\r\n FOnColumnSized: TColumnSizedEvent;\r\n FRows: TStringList;\r\n FRowsIndex: integer;\r\n FOnGetCellEditor: TGridGetCellEditorEvent;\r\n FCombo: TWebComboBox;\r\n FMemo: TWebMemo;\r\n FMask: TWebMaskEdit;\r\n FEditMask: TEditMask;\r\n FComboBoxItems: TStrings;\r\n FRange: TGridRange;\r\n FShowSelection: boolean;\r\n FOnClickCell: TCellEvent;\r\n FElementTableClassName: string;\r\n FGridLineColor: TColor;\r\n FSelectionTextColor: TColor;\r\n FSelectionColor: TColor;\r\n FWordWrap: boolean;\r\n FOnButtonClick: TCellEvent;\r\n FSortIndex: integer;\r\n FSortDirection: TGridSortIndicator;\r\n FOnSortClick: TGridSortClickEvent;\r\n FHasMergedCells: boolean;\r\n FObjectRows: TList;\r\n FEditAdvance: boolean;\r\n FEditControl: TControl;\r\n FOrigID: string;\r\n FOnSetEditControlValue: TSetEditControlValueEvent;\r\n FOnGetEditControlValue: TGetEditControlValueEvent;\r\n FOnDblClickCell: TCellEvent;\r\n function GetCells(ACol, ARow: integer): string; override;\r\n procedure SetCells(ACol, ARow: integer; const Value: string); override;\r\n procedure SetFixedCols(const Value: integer);\r\n procedure SetFixedRows(const Value: integer);\r\n procedure SetColor(AValue: TColor); override;\r\n function GetColWidths(ACol: integer): integer;\r\n function GetRowHeights(ARow: integer): integer;\r\n procedure SetColWidths(ACol: integer; const Value: integer);\r\n procedure SetRowHeights(ARow: integer; const Value: integer);\r\n procedure SetDefaultColWidth(const Value: integer);\r\n procedure SetDefaultRowHeight(const Value: integer);\r\n function GetCol: integer;\r\n function GetRow: integer;\r\n procedure SetCol(const Value: integer);\r\n procedure SetRow(const Value: integer);\r\n function GetCellElements(ACol, ARow: integer): TJSHTMLElement;\r\n function GetCheckElement(ACol, ARow: integer): TJSHTMLElement;\r\n function GetCanvasElement(ACol, ARow: integer): TJSHTMLElement;\r\n function GetButtonElement(ACol, ARow: integer): TJSHTMLElement;\r\n function GetProgressElement(ACol, ARow: integer): TJSHTMLElement;\r\n function GetSelection: TGridRect;\r\n procedure SetSelection(const Value: TGridRect);\r\n function GetLeftCol: integer;\r\n function GetTopRow: integer;\r\n procedure SetLeftCol(const Value: integer);\r\n procedure SetTopRow(const Value: integer);\r\n procedure SetFixedColor(const Value: TColor);\r\n procedure SetFixedTextColor(const Value: TColor);\r\n function GetFixedTextColor: TColor;\r\n function GetVisibleColCount: integer;\r\n function GetVisibleRowCount: integer;\r\n function GetRows(Index: integer): TStrings;\r\n procedure SetRows(Index: integer; const Value: TStrings);\r\n procedure RowsChanged(Sender: TObject);\r\n function GetCheckState(ACol, ARow: integer): boolean;\r\n procedure SetCheckState(ACol, ARow: integer; const Value: boolean);\r\n function GetCheckEnabled(ACol, ARow: integer): boolean;\r\n procedure SetCheckEnabled(ACol, ARow: integer; const Value: boolean);\r\n procedure SetRange(const Value: TGridRange);\r\n procedure SetElementTableClassName(const Value: string);\r\n procedure SetGridLineColor(const Value: TColor);\r\n procedure SetSelectionColor(const Value: TColor);\r\n procedure SetSelectionTextColor(const Value: TColor);\r\n function GetColAlignments(ACol: integer): TAlignment;\r\n procedure SetColAlignments(ACol: integer; const Value: TAlignment);\r\n procedure SetAlignAttr(AAlign: TAlignment; AElement: TJSElement);\r\n procedure SetSortIndex(const Value: integer);\r\n procedure SetDefaultColAlignment(const Value: TAlignment);\r\n function GetObjects(ACol, ARow: integer): TObject;\r\n procedure SetObjects(ACol, ARow: integer; const Value: TObject);\r\n procedure SetFixedFont(const Value: TFont);\r\n protected\r\n // ITMSFNCDataBinderGrid interface\r\n function GetDataRowCount: Integer;\r\n procedure ClearData;\r\n procedure SetDataColumnCount(AValue: Integer);\r\n procedure SetDataRowCount(AValue: Integer);\r\n procedure SetDataValue(AColumn, ARow: Integer; AValue: string);\r\n procedure SetDataHeader(AColumn: Integer; AValue: string);\r\n procedure DataBeginUpdate;\r\n procedure DataEndUpdate;\r\n procedure DataInsertRow(AInsertPosition: Integer);\r\n procedure FontChanged; override;\r\n procedure UnbindEvents; override;\r\n procedure FixedFontChanged(Sender: TObject); virtual;\r\n\r\n function StylePrefix: string;\r\n function ColOffset: integer; override;\r\n function RowOffset: integer; override;\r\n function CellColSpan(ACol,ARow: integer): integer;\r\n function CellRowSpan(ACol,ARow: integer): integer;\r\n function CellRealElement(const ACol,ARow: integer): TJSHTMLElement;\r\n procedure CellRealCoords(AElement: TJSHTMLElement;var ACol: integer; var ARow: integer);\r\n function GetDirectCellElements(ACol, ARow: integer): TJSHTMLElement;\r\n\r\n procedure MouseMove(Shift: TShiftState; X,Y: Integer); override;\r\n function HandleClick(Event: TJSEvent): Boolean; virtual;\r\n function HandleFixedClick(Event: TJSEvent): Boolean; virtual;\r\n function HandleMouseDown(Event: TJSMouseEvent): Boolean; virtual;\r\n function HandleMouseMove(Event: TJSMouseEvent): Boolean; virtual;\r\n function HandleMouseUp(Event: TJSMouseEvent): Boolean; virtual;\r\n function HandleKeyDown(Event: TJSKeyboardEvent): boolean; virtual;\r\n function HandleTableFocus(Event: TJSEvent): Boolean; virtual;\r\n function HandleTableBlur(Event: TJSEvent): Boolean; virtual;\r\n function HandleScroll(Event: TJSEvent): Boolean; virtual;\r\n function HandleEditBlur(Event: TJSEvent): Boolean; virtual;\r\n function HandleEditKeyPress(Event: TJSKeyboardEvent): boolean; virtual;\r\n\r\n procedure HandleComboExit(Sender: TObject);\r\n procedure HandleComboKeyPress(Sender: TObject; var Key: Char);\r\n procedure HandleMaskExit(Sender: TObject);\r\n procedure HandleMaskKeyPress(Sender: TObject; var Key: Char);\r\n procedure HandleMemoExit(Sender: TObject);\r\n procedure HandleMemoKeyPress(Sender: TObject; var Key: Char);\r\n\r\n function HandleCheckBoxClick(Event: TJSEvent): Boolean; virtual;\r\n function HandleButtonClick(Event: TJSEvent): Boolean; virtual;\r\n function HandleDoMouseUp(Event: TJSMouseEvent): Boolean; override;\r\n function HandleDoMouseMove(Event: TJSMouseEvent): Boolean; override;\r\n function HandleDoClick(Event: TJSMouseEvent): Boolean; override;\r\n function HandleDoDblClick(Event: TJSMouseEvent): Boolean; override;\r\n function DoHttpLoadJson(Event: TEventListenerEvent): boolean; virtual;\r\n function DoHttpLoadCsv(Event: TEventListenerEvent): boolean; virtual;\r\n function DoHttpAbort(Event: TEventListenerEvent): boolean; virtual;\r\n procedure DoHttpRequest(ARequest: TJSXMLHttpRequest); virtual;\r\n procedure DoCheckClick(ACol, ARow: Longint; Checked: boolean); virtual;\r\n procedure DoButtonClick(ACol, ARow: Longint); virtual;\r\n procedure DoSortClick(ACol, ARow: Longint; ASortIndicator: TGridSortIndicator); virtual;\r\n function GetEditText(ACol, ARow: Longint): string; virtual;\r\n procedure SetEditText(ACol, ARow: Longint; const AValue: string); virtual;\r\n\r\n procedure SetEditControlValue(ACol,ARow: Longint; AControl: TControl; AValue: string); virtual;\r\n procedure GetEditControlValue(ACol,ARow: Longint; AControl: TControl; var AValue: string); virtual;\r\n procedure DoEditControlExit(Sender: TObject); virtual;\r\n\r\n procedure GetCellData(ACol,ARow: integer; AField: TField; var AValue: string); virtual;\r\n procedure GetCellClassName(ACol,ARow: integer; AField: TField; AValue: string; var AClassName: string); virtual;\r\n procedure GetCellChildren(ACol,ARow: integer; AField: TField; AValue: string; AElement: TJSHTMLElement); virtual;\r\n procedure GetCellEditor(const ACol,ARow: integer; var AEditor: TGridCellEditor); virtual;\r\n procedure AddSelection(ACell: TJSElement); virtual;\r\n procedure RemoveSelection(ACell: TJSElement); virtual;\r\n procedure BindCellChildren(ACol,ARow: integer; AElement: TJSHTMLElement); virtual;\r\n procedure UnBindCellChildren(ACol,ARow: integer; AElement: TJSHTMLElement); virtual;\r\n procedure DoBoundsChange; override;\r\n procedure DoColumnSized(AColumn: integer); virtual;\r\n procedure LoadFromStringList(AStrings: TStrings);\r\n function GetGridCSS(id: string): string; virtual;\r\n procedure RenderGrid;\r\n procedure ReRenderGrid;\r\n procedure RenderGridSize;\r\n procedure RenderGridScript;\r\n procedure UpdateGridSize;\r\n procedure UpdateGridAlignment;\r\n procedure BindEvents; override;\r\n procedure Resize; override;\r\n procedure DoEnter; override;\r\n procedure DoExit; override;\r\n procedure GridChanged; override;\r\n function CreateElement: TJSElement; override;\r\n procedure UpdateElement; override;\r\n procedure UpdateElementVisual; override;\r\n function FixedColWidth: integer;\r\n function FixedRowHeight: integer;\r\n function NormalColWidth: integer;\r\n function NormalRowHeight: integer;\r\n function FocusedCell: TJSElement;\r\n function CanSelect(ACol, ARow: integer): boolean; virtual;\r\n function CanRowAdvance: boolean; virtual;\r\n function HasSelection: boolean;\r\n procedure UpdateCell(ACol, ARow: integer; var AValue: string); virtual;\r\n procedure ValidateCell(ACol, ARow: integer; var AValue: string); virtual;\r\n procedure TopLeftChanged; virtual;\r\n procedure RowCountChanged(delta: integer); override;\r\n procedure ColCountChanged(delta: integer); override;\r\n procedure ClearMethodPointers; override;\r\n procedure GetMethodPointers; override;\r\n procedure StartEdit(ch: string); virtual;\r\n function StopEdit: string; virtual;\r\n function CanEditCell(ACol,ARow: integer): boolean; virtual;\r\n procedure ChangeRow; virtual;\r\n property ColCount;\r\n property RowCount;\r\n property OriginalValue: string read FOrigVal;\r\n property OnHttpRequestError: TNotifyEvent read FOnHttpRequestError write FOnHttpRequestError;\r\n property OnHttpRequestSuccess: TNotifyEvent read FOnHttpRequestSuccess write FOnHttpRequestSuccess;\r\n property OnHttpRequest: TGridRequestEvent read FOnHttpRequest write FOnHttpRequest;\r\n procedure EnableColResize;\r\n procedure EnableDrag; override;\r\n procedure DisableDrag; override;\r\n procedure BindCellButton(ACol,ARow: integer; AElement: TJSHTMLElement); virtual;\r\n procedure InitCSSLibrary(ALibrary: TCSSLibrary); override;\r\n public\r\n constructor Create(AOwner: TComponent); override; overload;\r\n destructor Destroy; override;\r\n procedure CreateInitialize; override;\r\n procedure SetFocus; override;\r\n procedure ShowEdit; virtual;\r\n procedure HideEdit(Advance: boolean = false); virtual;\r\n procedure CancelEdit; virtual;\r\n procedure Clear; override;\r\n procedure ClearSelection;\r\n property Rows[Index: integer]: TStrings read GetRows write SetRows;\r\n procedure InitSample(AInitMethod: TInitMethod);\r\n property Ctl3D: boolean read FCtl3D write FCtl3D;\r\n property ParentCtl3D: boolean read FParentCtl3D write FParentCtl3D;\r\n property Col: integer read GetCol write SetCol;\r\n property Row: integer read GetRow write SetRow;\r\n property Selection: TGridRect read GetSelection write SetSelection;\r\n property EditMode: boolean read FEditMode;\r\n property EditControl: TControl read FEditControl write FEditControl;\r\n property SortIndex: integer read FSortIndex write SetSortIndex;\r\n property SortDirection: TGridSortIndicator read FSortDirection;\r\n procedure Sort(AColumn: integer; ADirection: TGridSortIndicator);\r\n procedure MouseToCell(X,Y: integer; var C, R: integer);\r\n procedure LoadFromJSON(const AURL: string; ADataNode: string = ''); overload;\r\n procedure LoadFromJSON(AJSON: TJSObject; ADataNode: string = ''); overload;\r\n function LoadFromJSONAsync(const AURL: string; ADataNode: string = ''): TJSPromise;\r\n procedure LoadFromCSV(const AURL: string; Delimiter: char = ';'; LoadFixed: boolean = false);\r\n function LoadFromCSVAsync(const AURL: string; Delimiter: char = ';'; LoadFixed: boolean = false): TJSPromise;\r\n procedure LoadFromStrings(AStrings: TStrings; Delimiter: char = ';'; LoadFixed: boolean = false);\r\n procedure SaveToCSV(const AFileName: string; Delimiter: char = ';'; SaveFixed: boolean = false);\r\n procedure SaveToStrings(AStrings: TStrings; Delimiter: char = ';'; SaveFixed: boolean = false);\r\n procedure SelectCell(ACol, ARow: integer); virtual;\r\n procedure InsertRow(const Index: integer);\r\n procedure RemoveRow(const Index: integer);\r\n procedure InsertColumn(const Index: integer);\r\n procedure RemoveColumn(const Index: integer);\r\n property CellElements[ACol,ARow: integer]: TJSHTMLElement read GetCellElements;\r\n property ColAlignments[ACol: integer]: TAlignment read GetColAlignments write SetColAlignments;\r\n property ColWidths[ACol: integer]: integer read GetColWidths write SetColWidths;\r\n property RowHeights[ARow: integer]: integer read GetRowHeights write SetRowHeights;\r\n property FixedColRow: TJSElement read FFixedColRow;\r\n property FixedCol: TJSElement read FFixedCol;\r\n property FixedRow: TJSElement read FFixedRow;\r\n property TopRow: integer read GetTopRow write SetTopRow;\r\n property LeftCol: integer read GetLeftCol write SetLeftCol;\r\n property VisibleRowCount: integer read GetVisibleRowCount;\r\n property VisibleColCount: integer read GetVisibleColCount;\r\n\r\n procedure AddCheckBox(const ACol,ARow: integer; AState: boolean = false);\r\n procedure RemoveCheckBox(const ACol,ARow: integer);\r\n function HasCheckBox(const ACol,ARow: integer): boolean;\r\n procedure AddButton(ACol,ARow: integer; AText: string; AStyle: string = '');\r\n procedure RemoveButton(const ACol,ARow: integer);\r\n function HasButton(const ACol,ARow: integer): boolean;\r\n\r\n procedure AddCanvas(const ACol,ARow: integer);\r\n procedure RemoveCanvas(const ACol,ARow: integer);\r\n function HasCanvas(const ACol,ARow: integer): boolean;\r\n function GetCanvas(const ACol,ARow: integer): TJSHTMLCanvasElement;\r\n\r\n procedure AddSortIndicator(const ACol,ARow: integer; AIndicator: TGridSortIndicator);\r\n procedure SelectSortIndicator(const ACol,ARow: integer; ASelect: boolean);\r\n procedure SetSortIndicator(const ACol,ARow: integer; AIndicator: TGridSortIndicator);\r\n function HasSortIndicator(const ACol, ARow: integer): boolean;\r\n procedure RemoveSortIndicator(const ACol, ARow: integer);\r\n\r\n procedure AddProgress(ACol,ARow: integer; APosition: integer; AStyle: string = '');\r\n procedure SetProgress(ACol,ARow: integer; APosition: integer);\r\n procedure RemoveProgress(const ACol,ARow: integer);\r\n function HasProgress(const ACol,ARow: integer): boolean;\r\n\r\n function HasVertScrollBar: boolean; override;\r\n function HasHorzScrollBar: boolean; override;\r\n property CheckState[ACol,ARow: integer]: boolean read GetCheckState write SetCheckState;\r\n property CheckEnabled[ACol,ARow: integer]: boolean read GetCheckEnabled write SetCheckEnabled;\r\n\r\n procedure MergeCells(const ACol,ARow, NumCol,NumRow: integer);\r\n procedure SplitCells(const ACol,ARow: integer);\r\n function IsMergedCell(const ACol,ARow: integer; var NumCol,NumRow: integer): boolean;\r\n\r\n property ComboBoxItems: TStrings read FComboBoxItems;\r\n property Objects[ACol,ARow: integer]: TObject read GetObjects write SetObjects;\r\n\r\n // for design-time VCL class compatibility\r\n property DefaultDrawing: boolean read FDefaultDrawing write FDefaultDrawing;\r\n property DragCursor: TCursor read FDragCursor write FDragCursor;\r\n property DragKind: TDragKind read FDragKind write FDragKind;\r\n property DrawingStyle: TGridDrawingStyle read FDrawingStyle write FDrawingStyle;\r\n property GradientEndColor: TColor read FGradientEndColor write FGradientEndColor;\r\n property GradientStartColor: TColor read FGradientStartColor write FGradientStartColor;\r\n property FixedTextColor: TColor read GetFixedTextColor write SetFixedTextColor default clBlack;\r\n published\r\n property Align;\r\n property AlignWithMargins;\r\n property Anchors;\r\n property BiDiMode;\r\n property BorderColor;\r\n property BorderStyle;\r\n property Color default clWindow;\r\n property DragMode;\r\n property DefaultColAlignment: TAlignment read FDefaultColAlignment write SetDefaultColAlignment default taLeftJustify;\r\n property DefaultColWidth: integer read FDefaultColWidth write SetDefaultColWidth default 64;\r\n property DefaultRowHeight: integer read FDefaultRowHeight write SetDefaultRowHeight default 24;\r\n property EditAdvance: boolean read FEditAdvance write FEditAdvance default false;\r\n property EditMask: TEditMask read FEditMask write FEditMask;\r\n\r\n property ElementID;\r\n property ElementClassName;\r\n property ElementFont;\r\n property ElementPosition;\r\n property ElementTableClassName: string read FElementTableClassName write SetElementTableClassName;\r\n property FixedRows: integer read FFixedRows write SetFixedRows default 1;\r\n property FixedCols: integer read FFixedCols write SetFixedCols default 1;\r\n property FixedColor: TColor read FFixedColor write SetFixedColor default clBtnFace;\r\n property FixedFont: TFont read FFixedFont write SetFixedFont;\r\n property Font;\r\n property GridLineColor: TColor read FGridLineColor write SetGridLineColor default clSilver;\r\n property Height;\r\n property HeightPercent;\r\n property HeightStyle;\r\n property Margins;\r\n property Options: TGridOptions read FOptions write FOptions;\r\n property ParentFont;\r\n property ParentBiDiMode;\r\n property PopupMenu;\r\n property RangeEdit: TGridRange read FRange write SetRange;\r\n property Scrollbars: TScrollStyle read FScrollBars write FScrollBars default ssBoth;\r\n property SelectionColor: TColor read FSelectionColor write SetSelectionColor default $FF8F5B;\r\n property SelectionTextColor: TColor read FSelectionTextColor write SetSelectionTextColor default $FFFFFF;\r\n property ShowSelection: boolean read FShowSelection write FShowSelection default true;\r\n property StyleElements: TStyleElements read FStyleElements write FStyleElements;\r\n property TabOrder;\r\n\r\n property Visible;\r\n property Width;\r\n property WidthPercent;\r\n property WidthStyle;\r\n property WordWrap: boolean read FWordWrap write FWordWrap default false;\r\n\r\n property OnClick;\r\n property OnClickCell: TCellEvent read FOnClickCell write FOnClickCell;\r\n property OnDblClick;\r\n property OnDblClickCell: TCellEvent read FOnDblClickCell write FOnDblClickCell;\r\n property OnEnter;\r\n property OnExit;\r\n property OnMouseWheelDown;\r\n property OnMouseWheelUp;\r\n property OnCanEditCell: TCellCanEditEvent read FOnCanEditCell write FOnCanEditCell;\r\n property OnColumnSized: TColumnSizedEvent read FOnColumnSized write FOnColumnSized;\r\n property OnGetCellData: TGridGetCellDataEvent read FOnGetCellData write FOnGetCellData;\r\n property OnGetCellChildren: TGridGetCellChildrenEvent read FOnGetCellChildren write FOnGetCellChildren;\r\n property OnGetCellClass: TGridGetCellClassEvent read FOnGetCellClass write FOnGetCellClass;\r\n property OnGetCellEditor: TGridGetCellEditorEvent read FOnGetCellEditor write FOnGetCellEditor;\r\n property OnButtonClick: TCellEvent read FOnButtonClick write FOnButtonClick;\r\n property OnCheckClick: TCellCheckEvent read FOnCheckClick write FOnCheckClick;\r\n property OnFixedCellClick: TCellEvent read FOnFixedCellClick write FOnFixedCellClick;\r\n property OnGetEditText: TGetEditEvent read FOnGetEditText write FOnGetEditText;\r\n property OnSetEditText: TSetEditEvent read FOnSetEditText write FOnSetEditText;\r\n\r\n property OnSetEditControlValue: TSetEditControlValueEvent read FOnSetEditControlValue write FOnSetEditControlValue;\r\n property OnGetEditControlValue: TGetEditCOntrolValueEvent read FOnGetEditControlValue write FOnGetEditControlValue;\r\n\r\n property OnSelectCell: TSelectCellEvent read FOnSelectCell write FOnSelectCell;\r\n property OnSortClick: TGridSortClickEvent read FOnSortClick write FOnSortClick;\r\n property OnTopLeftChanged: TNotifyEvent read FOnTopLeftChanged write FOnTopLeftChanged;\r\n property OnValidateEdit: TGetEditEvent read FOnValidateEdit write FOnValidateEdit;\r\n property OnDragDrop;\r\n property OnDragOver;\r\n property OnEndDrag;\r\n property OnStartDrag;\r\n end;\r\n\r\n TStringGrid = class(TCustomStringGrid)\r\n published\r\n property ColCount;\r\n property RowCount;\r\n property OnHttpRequestError;\r\n property OnHttpRequestSuccess;\r\n end;\r\n\r\n TWebStringGrid = class(TStringGrid);\r\n\r\n TCustomTableControl = class;\r\n\r\n TTablePager = (tpNone, tpDropDown, tpLink, tpButton, tpList, tpPrevNext);\r\n TTablePagerAlign = (paRight, paCenter, paLeft);\r\n\r\n TTableControlHeader = class(TPersistent)\r\n private\r\n FPageEventPtr: pointer;\r\n FFilterEventPtr: pointer;\r\n FSearchEventPtr: pointer;\r\n FOwner: TCustomTableControl;\r\n FElement: TJSHTMLElement;\r\n FPagerElement: TJSHTMLElement;\r\n FSearchElement: TJSHTMLElement;\r\n FFilterElement: TJSHTMLElement;\r\n FSearchInput: TJSHTMLElement;\r\n FFilterInput: TJSHTMLElement;\r\n FVisible: boolean;\r\n FCaption: string;\r\n FSearchValue: string;\r\n FFilterValue: string;\r\n FOnChange: TNotifyEvent;\r\n FPager: TTablePager;\r\n FButtonElementClassName: TElementClassName;\r\n FLinkElementClassName: TElementClassName;\r\n FDropDownElementClassName: TElementClassName;\r\n FListElementClassName: TElementClassName;\r\n FListItemElementClassName: TElementClassName;\r\n FInputElementClassName: TElementClassName;\r\n FFilterColumn: integer;\r\n FSearch: boolean;\r\n FFilter: boolean;\r\n FButtonActiveElementClassName: TElementClassName;\r\n FLinkActiveElementClassName: TElementClassName;\r\n FListLinkElementClassName: TElementClassName;\r\n FPagerAlign: TTablePagerAlign;\r\n procedure SetCaption(const Value: string);\r\n procedure SetVisible(const Value: boolean);\r\n procedure SetPager(const Value: TTablePager);\r\n procedure SetPagerAlign(const Value: TTablePagerAlign);\r\n protected\r\n procedure Changed; virtual;\r\n procedure Update(PageSize, RowCount, ActivePage: integer);\r\n function HandlePagerClick(Event: TJSInputEvent): Boolean; virtual;\r\n function HandleSearchClick(Event: TJSInputEvent): Boolean; virtual;\r\n function HandleFilterClick(Event: TJSInputEvent): Boolean; virtual;\r\n public\r\n constructor Create(AOwner: TCustomTableControl);\r\n procedure Assign(Source: TPersistent); override;\r\n property OnChange: TNotifyEvent read FOnChange write FOnChange;\r\n property Element: TJSHTMLElement read FElement;\r\n published\r\n property FilterColumn: integer read FFilterColumn write FFilterColumn default 0;\r\n property Filter: boolean read FFilter write FFilter default false;\r\n property Search: boolean read FSearch write FSearch default false;\r\n property ButtonActiveElementClassName: TElementClassName read FButtonActiveElementClassName write FButtonActiveElementClassName;\r\n property ButtonElementClassName: TElementClassName read FButtonElementClassName write FButtonElementClassName;\r\n property DropDownElementClassName: TElementClassName read FDropDownElementClassName write FDropDownElementClassName;\r\n property InputElementClassName: TElementClassName read FInputElementClassName write FInputElementClassName;\r\n property LinkActiveElementClassName: TElementClassName read FLinkActiveElementClassName write FLinkActiveElementClassName;\r\n property LinkElementClassName: TElementClassName read FLinkElementClassName write FLinkElementClassName;\r\n property ListElementClassName: TElementClassName read FListElementClassName write FListElementClassName;\r\n property ListLinkElementClassName: TElementClassName read FListLinkElementClassName write FListLinkElementClassName;\r\n property ListItemElementClassName: TElementClassName read FListItemElementClassName write FListItemElementClassName;\r\n property Caption: string read FCaption write SetCaption;\r\n property Pager: TTablePager read FPager write SetPager;\r\n property PagerAlign: TTablePagerAlign read FPagerAlign write SetPagerAlign default paRight;\r\n property Visible: boolean read FVisible write SetVisible default false;\r\n end;\r\n\r\n TTableControlPaging = class(TPersistent)\r\n private\r\n FOwner: TCustomTableControl;\r\n FSize: integer;\r\n FIndex: integer;\r\n FEnabled: boolean;\r\n FActivePage: integer;\r\n FPageCount: integer;\r\n procedure SetIndex(const Value: integer);\r\n procedure SetSize(const Value: integer);\r\n procedure SetEnabled(const Value: boolean);\r\n public\r\n constructor Create(AOwner: TCustomTableControl);\r\n procedure Assign(Source: TPersistent); override;\r\n property ActivePage: integer read FActivePage;\r\n property PageCount: integer read FPageCount;\r\n published\r\n property Enabled: boolean read FEnabled write SetEnabled default false;\r\n property Index: integer read FActivePage write SetIndex default 0;\r\n property Size: integer read FSize write SetSize default 10;\r\n end;\r\n\r\n TTableControlOptions = class(TPersistent)\r\n private\r\n FOwner: TCustomTableControl;\r\n FScrollVertical: boolean;\r\n FResizeColumns: boolean;\r\n FAutoCellURL: boolean;\r\n FAutoCellEmail: boolean;\r\n FAutoCellImage: boolean;\r\n FCellBorderColor: TColor;\r\n FCellBorders: boolean;\r\n FAutoNumAlign: boolean;\r\n FImageAlign: TAlignment;\r\n FImageWidth: integer;\r\n procedure SetResizeColumns(const Value: boolean);\r\n procedure SetCellBorderColor(const Value: TColor);\r\n procedure SetCellBorders(const Value: boolean);\r\n procedure SetScrollVertical(const Value: boolean);\r\n public\r\n constructor Create(AOwner: TCustomTableControl);\r\n procedure Assign(Source: TPersistent); override;\r\n published\r\n property AutoCellEmail: boolean read FAutoCellEmail write FAutoCellEmail default false;\r\n property AutoCellURL: boolean read FAutoCellURL write FAutoCellURL default false;\r\n property AutoCellImage: boolean read FAutoCellImage write FAutoCellImage default false;\r\n property AutoNumAlign: boolean read FAutoNumAlign write FAutoNumAlign default false;\r\n property CellBorders: boolean read FCellBorders write SetCellBorders default false;\r\n property CellBorderColor: TColor read FCellBorderColor write SetCellBorderColor default clSilver;\r\n property ImageAlign: TAlignment read FImageAlign write FImageAlign default taLeftJustify;\r\n property ImageWidth: integer read FImageWidth write FImageWidth default 0;\r\n property ScrollVertical: boolean read FScrollVertical write SetScrollVertical default false;\r\n property ResizeColumns: boolean read FResizeColumns write SetResizeColumns default false;\r\n end;\r\n\r\n TPageSelectEvent = procedure(Sender: TObject; NewPage: integer; var Allow: boolean; var DefaultSelect: boolean) of object;\r\n\r\n TCustomTableControl = class(TCustomGrid, ITMSFNCDataBinderGrid)\r\n private\r\n FReq: TJSXMLHttpRequest;\r\n FDataNode: string;\r\n FData: JSValue;\r\n FUnfiltered: JSValue;\r\n FTable: TJSElement;\r\n FBody: TJSElement;\r\n FRowHeader: boolean;\r\n FColHeader: boolean;\r\n FDelimiter: char;\r\n FLoadFixed: boolean;\r\n FFindCol, FFindRow: integer;\r\n FFindCase: boolean;\r\n FFindCondition: string;\r\n FElementHeaderClassName: TElementClassName;\r\n FElementTableClassName: TElementClassName;\r\n FOnHttpRequestError: TNotifyEvent;\r\n FOnHttpRequestSuccess: TNotifyEvent;\r\n FOnDblClickCell: TCellEvent;\r\n FOnClickCell: TCellEvent;\r\n FOptions: TTableControlOptions;\r\n FOnGetCellClass: TGridGetCellClassEvent;\r\n FOnGetCellData: TGridGetCellDataEvent;\r\n FOnGetCellChildren: TGridGetCellChildrenEvent;\r\n FOnHttpRequest: TGridRequestEvent;\r\n FOnCheckClick: TCellCheckEvent;\r\n FOnButtonClick: TCellEvent;\r\n FHandleCheckClickPtr: pointer;\r\n FHandleButtonClickPtr: pointer;\r\n FOnSortClick: TGridSortClickEvent;\r\n FSortIndex: integer;\r\n FSortDirection: TGridSortIndicator;\r\n FElementSelectionClassName: TElementClassName;\r\n FElementRowSelectClassName: TElementClassName;\r\n FRowIndex: integer;\r\n FSelectionTextColor: TColor;\r\n FSelectionColor: TColor;\r\n FHeader: TTableControlHeader;\r\n FFooter: TTableControlHeader;\r\n FPaging: TTableControlPaging;\r\n FOnSelectPage: TPageSelectEvent;\r\n FHiddenCols: TStringList;\r\n FWordWrap: boolean;\r\n function GetCells(col, row: integer): string; override;\r\n procedure SetCells(col, row: integer; const Value: string); override;\r\n function GetRowClassName(row: integer): TElementClassName;\r\n procedure SetRowClassName(row: integer; const Value: TElementClassName);\r\n function GetCellElement(col, row: integer): TJSHTMLElement;\r\n function GetCheckElement(ACol, ARow: integer): TJSHTMLElement;\r\n function GetButtonElement(ACol, ARow: integer): TJSHTMLElement;\r\n function GetProgressElement(ACol, ARow: integer): TJSHTMLElement;\r\n procedure SetOptions(const Value: TTableControlOptions);\r\n procedure SetElementHeaderClassName(const Value: TElementClassName);\r\n procedure SetElementTableClassName(const Value: TElementClassName);\r\n procedure SetColHeader(const Value: boolean);\r\n procedure SetRowHeader(const Value: boolean);\r\n procedure SetSortIndex(const Value: integer);\r\n procedure SetRowIndex(const Value: integer);\r\n procedure SetSelectionColor(const Value: TColor);\r\n procedure SetSelectionTextColor(const Value: TColor);\r\n procedure SetFooter(const Value: TTableControlHeader);\r\n procedure SetHeader(const Value: TTableControlHeader);\r\n procedure SetPaging(const Value: TTableControlPaging);\r\n procedure SetTableCell(ACol,ARow: integer; ACell: TJSHTMLElement; const Value: string);\r\n function GetColWidth(const ACol: integer): integer;\r\n procedure SetColWidth(const ACol: integer; AWidth: integer);\r\n procedure SetWordWrap(const AValue: boolean);\r\n protected\r\n // ITMSFNCDataBinderGrid interface\r\n function GetDataRowCount: Integer;\r\n procedure ClearData;\r\n procedure SetDataColumnCount(AValue: Integer);\r\n procedure SetDataRowCount(AValue: Integer);\r\n procedure SetDataValue(AColumn, ARow: Integer; AValue: string);\r\n procedure SetDataHeader(AColumn: Integer; AValue: string);\r\n procedure DataBeginUpdate;\r\n procedure DataEndUpdate;\r\n procedure DataInsertRow(AInsertPosition: Integer);\r\n procedure ClearMethodPointers; override;\r\n procedure GetMethodPointers; override;\r\n function HandleDoKeyPress(Event: TJSKeyBoardEvent): Boolean; override;\r\n\r\n function ColOffset: integer; override;\r\n function RowOffset: integer; override;\r\n\r\n function HandleDoClick(Event: TJSMouseEvent): Boolean; override;\r\n function HandleDoDblClick(Event: TJSMouseEvent): Boolean; override;\r\n function HandleCheckBoxClick(Event: TJSEvent): Boolean; virtual;\r\n function HandleButtonClick(Event: TJSEvent): Boolean; virtual;\r\n function HandleDoMouseUp(Event: TJSMouseEvent): Boolean; override;\r\n function HandleDoMouseMove(Event: TJSMouseEvent): Boolean; override;\r\n function HandleDoMouseDown(Event: TJSMouseEvent): Boolean; override;\r\n procedure DoCheckClick(ACol, ARow: Longint; Checked: boolean); virtual;\r\n procedure DoButtonClick(ACol, ARow: integer); virtual;\r\n procedure DoSortClick(ACol, ARow: Longint; ASortIndicator: TGridSortIndicator); virtual;\r\n function DoHttpLoadJson(Event: TEventListenerEvent): boolean; virtual;\r\n function DoHttpLoadPageJson(Event: TEventListenerEvent): boolean; virtual;\r\n function DoHttpLoadCsv(Event: TEventListenerEvent): boolean; virtual;\r\n function DoHttpAbort(Event: TEventListenerEvent): boolean; virtual;\r\n procedure DoHttpRequest(ARequest: TJSXMLHttpRequest); virtual;\r\n procedure GetCellData(ACol,ARow: integer; AField: TField; var AValue: string); virtual;\r\n procedure GetCellClassName(ACol,ARow: integer; AField: TField; AValue: string; var AClassName: string); virtual;\r\n procedure GetCellChildren(ACol,ARow: integer; AField: TField; AValue: string; AElement: TJSHTMLElement); virtual;\r\n procedure BindCellCheckBox(ACol,ARow: integer; AElement: TJSHTMLElement); virtual;\r\n procedure BindCellButton(ACol,ARow: integer; AElement: TJSHTMLElement); virtual;\r\n procedure RenderGrid;\r\n procedure ReRenderGrid;\r\n procedure RenderGridBorders;\r\n procedure RenderGridData;\r\n procedure RenderGridScript;\r\n procedure RenderHeaderFooter;\r\n procedure BindEvents; override;\r\n procedure KeyDown(var Key: Word; Shift: TShiftState); override;\r\n function CreateElement: TJSElement; override;\r\n procedure UpdateElement; override;\r\n procedure SetRowCount(const Value: integer); override;\r\n procedure SetColCount(const Value: integer); override;\r\n procedure RowCountChanged(delta: integer); override;\r\n procedure ColCountChanged(delta: integer); override;\r\n procedure LoadFromStringList(AStrings: TStrings);\r\n property OnHttpRequestError: TNotifyEvent read FOnHttpRequestError write FOnHttpRequestError;\r\n property OnHttpRequestSuccess: TNotifyEvent read FOnHttpRequestSuccess write FOnHttpRequestSuccess;\r\n property OnHttpRequest: TGridRequestEvent read FOnHttpRequest write FOnHttpRequest;\r\n property RowCount;\r\n property ColCount;\r\n procedure EnableColResize;\r\n procedure EnableDrag; override;\r\n procedure DisableDrag; override;\r\n function FindFrom(ACol,ARow: integer; Condition: string; CaseSensitive: boolean = true; AllCells: boolean = false): TGridCoord;\r\n function RenderRowCount: integer;\r\n function InVisiblePage(var ARow: integer): boolean;\r\n procedure DoSelectPage(AIndex: integer);\r\n procedure SelectPage(AIndex: integer; DoDefault: boolean = true);\r\n procedure Loaded; override;\r\n procedure InitCSSLibrary(ALibrary: TCSSLibrary); override;\r\n public\r\n constructor Create(AOwner: TComponent); override; overload;\r\n procedure CreateInitialize; override;\r\n destructor Destroy; override;\r\n procedure Invalidate; override;\r\n procedure LogData;\r\n procedure InitSample(AInitMethod: TInitMethod);\r\n procedure LoadFromJSON(const AURL: string; ADataNode: string = ''); overload;\r\n procedure LoadFromJSON(AJSON: TJSObject; ADataNode: string = ''); overload;\r\n function LoadFromJSONAsync(const AURL: string; ADataNode: string = ''): TJSPromise;\r\n procedure LoadPageFromJSON(const AURL: string; ADataNode: string = ''); overload;\r\n procedure LoadPageFromJSON(AJSON: TJSObject; ADataNode: string = ''); overload;\r\n function LoadPageFromJSONAsync(const AURL: string; ADataNode: string = ''): TJSPromise;\r\n procedure LoadFromCSV(const AURL: string; Delimiter: char = ';'; LoadFixed: boolean = false);\r\n function LoadFromCSVAsync(const AURL: string; Delimiter: char = ';'; LoadFixed: boolean = false): TJSPromise;\r\n procedure LoadFromStrings(AStrings: TStrings; Delimiter: char = ';'; LoadFixed: boolean = false);\r\n procedure SaveToCSV(const AFileName: string; Delimiter: char = ';'; SaveFixed: boolean = false);\r\n procedure SaveToStrings(AStrings: TStrings; Delimiter: char = ';'; SaveFixed: boolean = false);\r\n procedure AddCheckBox(ACol, ARow: integer; Checked: boolean = false);\r\n procedure RemoveCheckBox(ACol, ARow: integer);\r\n procedure AddCheckBoxColumn(ACol: integer; Checked: boolean = false);\r\n function HasCheckBox(ACol,ARow: integer): boolean;\r\n procedure AddButton(ACol,ARow: integer; AText: string; AStyle: string = '');\r\n procedure AddButtonColumn(ACol: integer; AText: string; AStyle: string = '');\r\n procedure RemoveButton(ACol,ARow: integer);\r\n function HasButton(ACol,ARow: integer): boolean;\r\n\r\n procedure AddSortIndicator(const ACol,ARow: integer; AIndicator: TGridSortIndicator);\r\n procedure SelectSortIndicator(const ACol,ARow: integer; ASelect: boolean);\r\n procedure SetSortIndicator(const ACol,ARow: integer; AIndicator: TGridSortIndicator);\r\n function HasSortIndicator(const ACol, ARow: integer): boolean;\r\n procedure RemoveSortIndicator(const ACol, ARow: integer);\r\n\r\n procedure AddProgress(ACol,ARow: integer; APosition: integer; AStyle: string = '');\r\n procedure SetProgress(ACol,ARow: integer; APosition: integer);\r\n procedure RemoveProgress(const ACol,ARow: integer);\r\n function HasProgress(const ACol,ARow: integer): boolean;\r\n\r\n procedure Clear; override;\r\n property CellElements[col,row: integer]: TJSHTMLElement read GetCellElement;\r\n property ColWidths[col: integer]: integer read GetColWidth write SetColWidth;\r\n property RowClassName[row: integer]: TElementClassName read GetRowClassName write SetRowClassName;\r\n procedure InsertRow(Index: integer);\r\n procedure RemoveRow(Index: integer);\r\n\r\n procedure SetFilter(Column: integer; Condition: string; CaseSensitive: boolean = true);\r\n procedure RemoveFilter;\r\n procedure ScrollRowInView(ARow: integer);\r\n procedure SelectCell(ACol,ARow: integer);\r\n function FindCell(Condition: string; CaseSensitive: boolean = true; AllCells: boolean = false): TGridCoord;\r\n function FindNext: TGridCoord;\r\n\r\n procedure HideColumn(const Index: integer);\r\n procedure UnHideColumn(const Index: integer);\r\n function IsHiddenColumn(const Index: integer): boolean;\r\n procedure HideRow(const Index: integer);\r\n procedure UnHideRow(const Index: integer);\r\n\r\n procedure Sort(AColumn: integer; ADirection: TGridSortIndicator);\r\n property SortIndex: integer read FSortIndex write SetSortIndex;\r\n property SortDirection: TGridSortIndicator read FSortDirection;\r\n property RowIndex: integer read FRowIndex write SetRowIndex;\r\n published\r\n property Align;\r\n property AlignWithMargins;\r\n property Anchors;\r\n property BorderColor;\r\n property BorderStyle;\r\n property Color;\r\n property DragMode;\r\n property ElementClassName;\r\n property ElementFont;\r\n property ElementID;\r\n property ElementPosition;\r\n property ElementHeaderClassName: TElementClassName read FElementHeaderClassName write SetElementHeaderClassName;\r\n property ElementRowSelectClassName: TElementClassName read FElementRowSelectClassName write FElementRowSelectClassName;\r\n property ElementSelectionClassName: TElementClassName read FElementSelectionClassName write FElementSelectionClassName;\r\n property ElementTableClassName: TElementClassName read FElementTableClassName write SetElementTableClassName;\r\n property Enabled default false;\r\n property Font;\r\n property Footer: TTableControlHeader read FFooter write SetFooter;\r\n property Header: TTableControlHeader read FHeader write SetHeader;\r\n property Height;\r\n property HeightPercent;\r\n property HeightStyle;\r\n property Margins;\r\n property RowHeader: boolean read FRowHeader write SetRowHeader default true;\r\n property ColHeader: boolean read FColHeader write SetColHeader default true;\r\n property Options: TTableControlOptions read FOptions write SetOptions;\r\n property Paging: TTableControlPaging read FPaging write SetPaging;\r\n property ParentBiDiMode;\r\n property PopupMenu;\r\n property SelectionColor: TColor read FSelectionColor write SetSelectionColor default $FF8F5B;\r\n property SelectionTextColor: TColor read FSelectionTextColor write SetSelectionTextColor default clWhite;\r\n property Visible;\r\n property Width;\r\n property WidthPercent;\r\n property WidthStyle;\r\n property WordWrap: boolean read FWordWrap write SetWordWrap default false;\r\n property OnButtonClick: TCellEvent read FOnButtonClick write FOnButtonClick;\r\n property OnCheckClick: TCellCheckEvent read FOnCheckClick write FOnCheckClick;\r\n property OnClick;\r\n property OnClickCell: TCellEvent read FOnClickCell write FOnClickCell;\r\n property OnDblClickCell: TCellEvent read FOnDblClickCell write FOnDblClickCell;\r\n property OnDblClick;\r\n property OnGetCellData: TGridGetCellDataEvent read FOnGetCellData write FOnGetCellData;\r\n property OnGetCellChildren: TGridGetCellChildrenEvent read FOnGetCellChildren write FOnGetCellChildren;\r\n property OnGetCellClass: TGridGetCellClassEvent read FOnGetCellClass write FOnGetCellClass;\r\n property OnSortClick: TGridSortClickEvent read FOnSortClick write FOnSortClick;\r\n property OnDragDrop;\r\n property OnDragOver;\r\n property OnEndDrag;\r\n property OnSelectPage: TPageSelectEvent read FOnSelectPage write FOnSelectPage;\r\n property OnStartDrag;\r\n end;\r\n\r\n TTableControl = class(TCustomTableControl)\r\n published\r\n property RowCount;\r\n property ColCount;\r\n property OnHttpRequestError;\r\n property OnHttpRequestSuccess;\r\n end;\r\n\r\n TWebTableControl = class(TTableControl);\r\n\r\n TResponsiveGridItem = class(TCollectionItem)\r\n private\r\n FHTML: string;\r\n FElementHandle: TJSHTMLElement;\r\n FTag: integer;\r\n FItemObject: TObject;\r\n FVisible: boolean;\r\n FJSONObject: JSValue;\r\n FSelected: boolean;\r\n FRecNo: integer;\r\n procedure SetHTML(const Value: string);\r\n procedure SetVisible(const Value: boolean);\r\n function GetJSONElementValue(id: string): string;\r\n procedure SetSelected(const Value: boolean);\r\n protected\r\n property RecNo: integer read FRecNo write FRecNo;\r\n public\r\n constructor Create(ACollection: TCollection); override;\r\n destructor Destroy; override;\r\n property ElementHandle: TJSHTMLElement read FElementHandle;\r\n property ItemObject: TObject read FItemObject write FItemObject;\r\n property JSONElement: JSValue read FJSONObject write FJSONObject;\r\n property JSONElementValue[id: string]: string read GetJSONElementValue;\r\n property Selected: boolean read FSelected write SetSelected;\r\n published\r\n property HTML: string read FHTML write SetHTML;\r\n property Tag: integer read FTag write FTag default 0;\r\n property Visible: boolean read FVisible write SetVisible default true;\r\n end;\r\n\r\n TResponsiveGridItemEvent = procedure(Sender: TObject; Index: integer) of object;\r\n\r\n TResponsiveGridItemTemplateEvent = procedure(Sender: TObject; Index: integer; ItemData: string; var ATemplate: string) of object;\r\n\r\n TResponsiveGridItemFieldValueEvent = procedure(Sender: TObject; Index: integer; AFieldName: string; var AValue: string) of object;\r\n\r\n TResponsiveGrid = class;\r\n\r\n TResponsiveGridItems = class(TOwnedCollection)\r\n private\r\n FOnItemDelete: TResponsiveGridItemEvent;\r\n FOnItemUpdate: TResponsiveGridItemEvent;\r\n FOnItemInsert: TResponsiveGridItemEvent;\r\n FOnItemAdd: TResponsiveGridItemEvent;\r\n FOnItemClear: TNotifyEvent;\r\n FGrid: TResponsiveGrid;\r\n function GetItem(Index: integer): TResponsiveGridItem;\r\n procedure SetItem(Index: integer; const Value: TResponsiveGridItem);\r\n protected\r\n procedure DoItemClear; virtual;\r\n procedure DoItemAdd(Index: integer); virtual;\r\n procedure DoItemDelete(Index: integer); virtual;\r\n procedure DoItemInsert(Index: integer); virtual;\r\n procedure DoItemUpdate(Index: integer); virtual;\r\n property OnItemAdd: TResponsiveGridItemEvent read FOnItemAdd write FOnItemAdd;\r\n property OnItemUpdate: TResponsiveGridItemEvent read FOnItemUpdate write FOnItemUpdate;\r\n property OnItemDelete: TResponsiveGridItemEvent read FOnItemDelete write FOnItemDelete;\r\n property OnItemInsert: TResponsiveGridItemEvent read FOnItemInsert write FOnItemInsert;\r\n property OnItemClear: TNotifyEvent read FOnItemClear write FOnItemClear;\r\n procedure Update(Item: TCollectionItem); override;\r\n property Grid: TResponsiveGrid read FGrid;\r\n public\r\n constructor Create(AOwner: TComponent);\r\n procedure Clear;\r\n procedure Delete(Index: integer);\r\n function Add: TResponsiveGridItem; overload;\r\n function Add(HTML: string): TResponsiveGridItem; overload;\r\n function Insert(Index: integer): TResponsiveGridItem;\r\n property Items[Index: integer]: TResponsiveGridItem read GetItem write SetItem; default;\r\n end;\r\n\r\n TResponsiveGridTemplateOrder = (toColumn, toRow);\r\n\r\n TResponsiveGridOptions = class(TPersistent)\r\n private\r\n FItemWidthMin: integer;\r\n FItemHeight: integer;\r\n FItemGap: integer;\r\n FScrollVertical: boolean;\r\n FItemClassName: string;\r\n FItemColor: TColor;\r\n FItemBorderColor: TColor;\r\n FItemHoverColor: TColor;\r\n FItemHoverBorderColor: TColor;\r\n FOnChange: TNotifyEvent;\r\n FItemPadding: integer;\r\n FItemTemplate: string;\r\n FItemSelectedBorderColor: TColor;\r\n FItemSelectedTextColor: TColor;\r\n FItemSelectedColor: TColor;\r\n FMultiSelect: boolean;\r\n FOrder: TResponsiveGridTemplateOrder;\r\n procedure SetItemBorderColor(const Value: TColor);\r\n procedure SetItemColor(const Value: TColor);\r\n procedure SetItemGap(const Value: integer);\r\n procedure SetItemHeight(const Value: integer);\r\n procedure SetItemHoverBorderColor(const Value: TColor);\r\n procedure SetItemHoverColor(const Value: TColor);\r\n procedure SetItemWidthMin(const Value: integer);\r\n procedure SetScrollVertical(const Value: boolean);\r\n procedure SetItemPadding(const Value: integer);\r\n procedure SetItemTemplate(const Value: string);\r\n procedure SetItemSelectedBorderColor(const Value: TColor);\r\n procedure SetItemSelectedColor(const Value: TColor);\r\n procedure SetItemSelectedTextColor(const Value: TColor);\r\n protected\r\n procedure Changed;\r\n public\r\n constructor Create;\r\n procedure Assign(Source: TPersistent); override;\r\n published\r\n property ItemClassName: string read FItemClassName write FItemClassName;\r\n property ItemColor: TColor read FItemColor write SetItemColor default clNone;\r\n property ItemBorderColor: TColor read FItemBorderColor write SetItemBorderColor default clNone;\r\n property ItemGap: integer read FItemGap write SetItemGap default 10;\r\n property ItemHeight: integer read FItemHeight write SetItemHeight default 100;\r\n property ItemHoverColor: TColor read FItemHoverColor write SetItemHoverColor default clNone;\r\n property ItemHoverBorderColor: TColor read FItemHoverBorderColor write SetItemHoverBorderColor default clNone;\r\n property ItemSelectedColor: TColor read FItemSelectedColor write SetItemSelectedColor default clNone;\r\n property ItemSelectedBorderColor: TColor read FItemSelectedBorderColor write SetItemSelectedBorderColor default clNone;\r\n property ItemSelectedTextColor: TColor read FItemSelectedTextColor write SetItemSelectedTextColor default clNone;\r\n property ItemPadding: integer read FItemPadding write SetItemPadding default 0;\r\n property ItemTemplate: string read FItemTemplate write SetItemTemplate;\r\n property ItemWidthMin: integer read FItemWidthMin write SetItemWidthMin default 100;\r\n property MultiSelect: boolean read FMultiSelect write FMultiSelect default false;\r\n property Order: TResponsiveGridTemplateOrder read FOrder write FOrder default toColumn;\r\n property ScrollVertical: boolean read FScrollVertical write SetScrollVertical default True;\r\n property OnChange: TNotifyEvent read FOnChange write FOnChange;\r\n end;\r\n\r\n TResponsiveGrid = class(TWebCustomControl)\r\n private\r\n FDesignTime: boolean;\r\n FReq: TJSXMLHttpRequest;\r\n FDataNode: string;\r\n FOptions: TResponsiveGridOptions;\r\n FItems: TResponsiveGridItems;\r\n FOnItemDblClick: TResponsiveGridItemEvent;\r\n FOnItemClick: TResponsiveGridItemEvent;\r\n FOnHttpRequestError: TNotifyEvent;\r\n FOnHttpRequestSuccess: TNotifyEvent;\r\n FOnItemCreated: TResponsiveGridItemEvent;\r\n FOnItemGetFieldValue: TResponsiveGridItemFieldValueEvent;\r\n FItemIndex: integer;\r\n FDelimiter: char;\r\n FOnHttpRequest: TGridRequestEvent;\r\n FListElement: TJSHTMLElement;\r\n FOnItemGetTemplate: TResponsiveGridItemTemplateEvent;\r\n procedure SetOptions(const Value: TResponsiveGridOptions);\r\n procedure SetItems(const Value: TResponsiveGridItems);\r\n procedure SetItemIndex(const Value: integer);\r\n protected\r\n function DoHttpLoadJson(Event: TEventListenerEvent): boolean; virtual;\r\n function DoHttpLoadCsv(Event: TEventListenerEvent): boolean; virtual;\r\n function DoHttpAbort(Event: TEventListenerEvent): boolean; virtual;\r\n procedure DoHttpRequest(ARequest: TJSXMLHttpRequest); virtual;\r\n procedure DoItemCreated(Index: integer); virtual;\r\n procedure DoItemGetFieldValue(Index: integer; AFieldName: string; var AValue: string); virtual;\r\n procedure DoItemGetTemplate(Index: integer; ItemData: string; var ATemplate: string); virtual;\r\n\r\n procedure HandleDoItemClick(Index: integer); virtual;\r\n procedure HandleDoItemDblClick(Index: integer); virtual;\r\n function TargetIsParent(tgt,el: TJSElement): boolean; virtual;\r\n function HandleDoMouseEnter(Event: TJSMouseEvent): Boolean; override;\r\n function HandleDoClick(Event: TJSMouseEvent): Boolean; override;\r\n function HandleDoDblClick(Event: TJSMouseEvent): Boolean; override;\r\n procedure HandleItemAdd(Sender: TObject; Index: integer);\r\n procedure HandleItemUpdate(Sender: TObject; Index: integer);\r\n procedure HandleItemDelete(Sender: TObject; Index: integer);\r\n procedure HandleItemInsert(Sender: TObject; Index: integer);\r\n procedure HandleItemClear(Sender: TObject);\r\n procedure OptionsChanged(Sender: TObject); virtual;\r\n procedure FontChanged; override;\r\n function CreateElement: TJSElement; override;\r\n procedure CreateControl; override;\r\n procedure BindElement; override;\r\n procedure UpdateElement; override;\r\n procedure RenderGrid;\r\n procedure Loaded; override;\r\n function GetStyleName: string;\r\n procedure InitCSSLibrary(ALibrary: TCSSLibrary); override;\r\n public\r\n constructor Create(AOwner: TComponent); override; overload;\r\n procedure CreateInitialize; override;\r\n destructor Destroy; override;\r\n procedure LoadFromJSON(const AURL: string; ADataNode: string = ''); overload;\r\n procedure LoadFromJSON(ASJON: TJSObject; ADataNode: string = ''); overload;\r\n procedure LoadFromCSV(const AURL: string; Delimiter: char = ';');\r\n function ListElementHandle: TJSElement;\r\n function ItemByTag(ATag: integer): TResponsiveGridItem;\r\n published\r\n property Align;\r\n property AlignWithMargins;\r\n property Anchors;\r\n property ElementID;\r\n property ElementClassName;\r\n property ElementFont;\r\n property ElementPosition;\r\n property Font;\r\n property Height;\r\n property HeightPercent;\r\n property HeightStyle;\r\n\r\n property ItemIndex: integer read FItemIndex write SetItemIndex default -1;\r\n property Items: TResponsiveGridItems read FItems write SetItems;\r\n property Margins;\r\n property Options: TResponsiveGridOptions read FOptions write SetOptions;\r\n property ParentFont;\r\n property PopupMenu;\r\n property Visible;\r\n property Width;\r\n property WidthPercent;\r\n property WidthStyle;\r\n property OnClick;\r\n property OnDblClick;\r\n property OnMouseDown;\r\n property OnMouseUp;\r\n property OnMouseMove;\r\n property OnMouseLeave;\r\n property OnMouseEnter;\r\n property OnItemCreated: TResponsiveGridItemEvent read FOnItemCreated write FOnItemCreated;\r\n property OnItemGetFieldValue: TResponsiveGridItemFieldValueEvent read FOnItemGetFieldValue write FOnItemGetFieldValue;\r\n property OnItemGetTemplate: TResponsiveGridItemTemplateEvent read FOnItemGetTemplate write FOnItemGetTemplate;\r\n property OnItemClick: TResponsiveGridItemEvent read FOnItemClick write FOnItemClick;\r\n property OnItemDblClick: TResponsiveGridItemEvent read FOnItemDblClick write FOnItemDblClick;\r\n property OnHttpRequestError: TNotifyEvent read FOnHttpRequestError write FOnHttpRequestError;\r\n property OnHttpRequestSuccess: TNotifyEvent read FOnHttpRequestSuccess write FOnHttpRequestSuccess;\r\n property OnHttpRequest: TGridRequestEvent read FOnHttpRequest write FOnHttpRequest;\r\n end;\r\n\r\n TWebResponsiveGrid = class(TResponsiveGrid);\r\n\r\nfunction GridRect(Left,Top,Right,Bottom: integer): TGridRect;\r\n\r\nimplementation\r\n\r\nuses\r\n SysUtils, Math, WEBLib.Utils, WEBLib.WebTools, WEBLib.Forms;\r\n\r\nconst\r\n GlyphAscending = '▲';\r\n GlyphDescending = '▼';\r\n CELLPADDING = 0;\r\n\r\nfunction GridRect(Left,Top,Right,Bottom: integer): TGridRect;\r\nbegin\r\n Result.Left := Left;\r\n Result.Top := Top;\r\n Result.Right := Right;\r\n Result.Bottom := Bottom;\r\nend;\r\n\r\n{ TCustomStringGrid }\r\n\r\nprocedure TCustomStringGrid.AddButton(ACol, ARow: integer; AText,\r\n AStyle: string);\r\nvar\r\n s, ct: string;\r\n el: TJSHTMLElement;\r\nbegin\r\n if (ARow >= 0) and (ACol >= 0) and not HasCheckBox(ACol,ARow) then\r\n begin\r\n ct := Cells[ACol, ARow];\r\n if ct <> '' then\r\n ct := ' ' + ct;\r\n\r\n s := '';\r\n\r\n Cells[ACol,ARow] := s + ct;\r\n\r\n el := CellElements[ACol, ARow];\r\n BindCellButton(ACol, ARow, el);\r\n end;\r\nend;\r\n\r\nprocedure TCustomStringGrid.AddCheckBox(const ACol, ARow: integer; AState: boolean = false);\r\nvar\r\n chk: TJSElement;\r\nbegin\r\n if (ACol < ColCount) and (ARow < RowCount) then\r\n begin\r\n if not HasCheckBox(ACol,ARow) then\r\n begin\r\n chk := document.createElement('INPUT');\r\n chk['type'] := 'checkbox';\r\n\r\n asm\r\n chk.checked = AState;\r\n end;\r\n\r\n CellElements[ACol,ARow].insertBefore(chk, CellElements[ACol,ARow].firstChild);\r\n chk.addEventListener('click',FHandleCheckClickPtr);\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TCustomStringGrid.AddCanvas(const ACol, ARow: integer);\r\nvar\r\n el: TJSHTMLElement;\r\n w,h: integer;\r\nbegin\r\n if (ACol < ColCount) and (ARow < RowCount) then\r\n begin\r\n if not HasCanvas(ACol,ARow) then\r\n begin\r\n w := ColWidths[ACol];\r\n h := RowHeights[ARow];\r\n el := TJSHTMLElement(document.createElement('CANVAS'));\r\n el['width'] := w.toString+'px';\r\n el['height'] := (h-1).toString+'px';\r\n el.style.setProperty('display','block');\r\n CellElements[ACol,ARow].insertBefore(el, CellElements[ACol,ARow].firstChild);\r\n end;\r\n end;\r\n\r\nend;\r\n\r\nprocedure TCustomStringGrid.AddProgress(ACol, ARow, APosition: integer;\r\n AStyle: string);\r\nvar\r\n prog: TJSElement;\r\nbegin\r\n if (ACol < ColCount) and (ARow < RowCount) then\r\n begin\r\n if not HasProgress(ACol,ARow) then\r\n begin\r\n prog := document.createElement('PROGRESS');\r\n prog['max'] := '100';\r\n prog['value'] := APosition.toString;\r\n TJSHTMLElement(prog).style.setProperty('width','100%');\r\n if AStyle <> '' then\r\n prog['class'] := AStyle;\r\n CellElements[ACol,ARow].insertBefore(prog, CellElements[ACol,ARow].firstChild);\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TCustomStringGrid.AddSelection(ACell: TJSElement);\r\nbegin\r\n if ShowSelection then\r\n begin\r\n ACell.classlist.Add('selected');\r\n end;\r\nend;\r\n\r\nprocedure TCustomStringGrid.AddSortIndicator(const ACol, ARow: integer;\r\n AIndicator: TGridSortIndicator);\r\nvar\r\n s,sid: string;\r\n sp: integer;\r\nbegin\r\n s := Cells[ACol,ARow];\r\n sp := pos(' 0 then\r\n s := Copy(s, 1, sp - 1);\r\n\r\n sid := Name + 'si'+ACol.ToString+'_'+ARow.ToString;\r\n\r\n case AIndicator of\r\n siNone: Cells[ACol,ARow] := s;\r\n siAscending: Cells[ACol,ARow] := s + ''+GlyphAscending+'';\r\n siDescending: Cells[ACol,ARow] := s + ''+GlyphDescending+'';\r\n end;\r\nend;\r\n\r\nprocedure TCustomStringGrid.BindCellButton(ACol, ARow: integer;\r\n AElement: TJSHTMLElement);\r\nvar\r\n el: TJSHTMLElement;\r\nbegin\r\n el := TJSHTMLElement(AElement.firstChild);\r\n if Assigned(el) and (el.tagName = 'BUTTON') then\r\n begin\r\n el.addEventListener('click', FHandleButtonClickPtr);\r\n end;\r\nend;\r\n\r\nprocedure TCustomStringGrid.BindCellChildren(ACol, ARow: integer; AElement: TJSHTMLElement);\r\nvar\r\n el: TJSHTMLElement;\r\nbegin\r\n el := TJSHTMLElement(AElement.firstChild);\r\n\r\n if Assigned(el) and (el.tagName = 'INPUT') then\r\n begin\r\n if el.hasAttribute('type') and (lowercase(el.getAttribute('TYPE'))= 'checkbox') then\r\n begin\r\n el.addEventListener('click', FHandleCheckClickPtr);\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TCustomStringGrid.UnBindCellChildren(ACol, ARow: integer; AElement: TJSHTMLElement);\r\nvar\r\n el: TJSHTMLElement;\r\nbegin\r\n el := TJSHTMLElement(AElement.firstChild);\r\n\r\n if Assigned(el) and (el.tagName = 'INPUT') then\r\n begin\r\n if el.hasAttribute('type') and (lowercase(el.getAttribute('TYPE'))= 'checkbox') then\r\n begin\r\n el.removeEventListener('click', FHandleCheckClickPtr);\r\n end;\r\n end;\r\nend;\r\n\r\n\r\nprocedure TCustomStringGrid.BindEvents;\r\nbegin\r\n inherited;\r\n RenderGridScript;\r\nend;\r\n\r\nprocedure TCustomStringGrid.CancelEdit;\r\nvar\r\n eh: TJSHTMLElement;\r\nbegin\r\n if EditMode then\r\n begin\r\n if FEditType = geCombo then\r\n begin\r\n eh := FCombo.ElementHandle;\r\n end\r\n else\r\n if FEditType = geMemo then\r\n begin\r\n eh := FMemo.ElementHandle;\r\n end\r\n else\r\n if FEditType = geMask then\r\n begin\r\n eh := FMask.ElementHandle;\r\n end\r\n else\r\n begin\r\n eh := FEdit;\r\n end;\r\n\r\n FEditMode := false;\r\n\r\n ValidateCell(FEditCol, FEditRow, FOrigVal);\r\n\r\n if FSelectedCell.contains(eh) then\r\n FSelectedCell.removeChild(eh);\r\n\r\n FSelectedCell.innerHTML := FOrigVal;\r\n UpdateCell(FEditCol, FEditRow, FOrigVal);\r\n\r\n if not (goRowSelect in Options) then\r\n begin\r\n AddSelection(FSelectedCell);\r\n end;\r\n\r\n SetEditText(FEditCol, FEditRow, FOrigVal);\r\n\r\n FBlockFocus := true;\r\n\r\n TJSHTMLElement(FNormalCells).focus();\r\n end;\r\nend;\r\n\r\nfunction TCustomStringGrid.CanEditCell(ACol, ARow: integer): boolean;\r\nvar\r\n CanEdit: boolean;\r\nbegin\r\n CanEdit := true;\r\n if Assigned(OnCanEditCell) then\r\n OnCanEditCell(Self, ACol, ARow, CanEdit);\r\n\r\n Result := CanEdit;\r\nend;\r\n\r\nfunction TCustomStringGrid.CanRowAdvance: boolean;\r\nbegin\r\n Result := true;\r\nend;\r\n\r\nfunction TCustomStringGrid.CanSelect(ACol, ARow: integer): boolean;\r\nbegin\r\n Result := true;\r\n if Assigned(OnSelectCell) then\r\n OnSelectCell(Self, ACol, ARow, Result);\r\nend;\r\n\r\nfunction TCustomStringGrid.CellColSpan(ACol, ARow: integer): integer;\r\nvar\r\n el: TJSHTMLElement;\r\n s: string;\r\n e: integer;\r\nbegin\r\n Result := 0;\r\n\r\n el := CellRealElement(ACol,ARow);\r\n if Assigned(el) then\r\n begin\r\n s := el['colspan'];\r\n val(s,Result,e);\r\n end;\r\nend;\r\n\r\n\r\nfunction TCustomStringGrid.CellRealElement(const ACol, ARow: integer):TJSHTMLElement;\r\nvar\r\n el: TJSHTMLElement;\r\n t: TJSElement;\r\n c,r: integer;\r\nbegin\r\n if (ACol < FixedCols) and (ARow < FixedRows) then\r\n begin\r\n t := FFixedColRow;\r\n c := ACol;\r\n r := ARow;\r\n end\r\n else\r\n if (ACol < FixedCols) and (ARow >= FixedRows) then\r\n begin\r\n t := FFixedCol;\r\n c := ACol;\r\n r := ARow - FixedRows;\r\n end\r\n else\r\n if (ACol >= FixedCols) and (ARow < FixedRows) then\r\n begin\r\n t := FFixedRow;\r\n c := ACol - FixedCols;\r\n r := ARow;\r\n end\r\n else\r\n begin\r\n t := FNormalCells;\r\n c := ACol - FixedCols;\r\n r := ARow - FixedRows;\r\n end;\r\n\r\n el := nil;\r\n\r\n if FHasMergedCells then\r\n begin\r\n asm\r\n var getTableCell = function (table, x, y) {\r\n var m = [], row, cell, xx, tx, ty, xxx, yyy;\r\n for(yyy = 0; yyy < table.rows.length; yyy++) {\r\n row = table.rows[yyy];\r\n for(xxx = 0; xxx < row.cells.length; xxx++) {\r\n cell = row.cells[xxx];\r\n xx = xxx;\r\n for(; m[yyy] && m[yyy][xx]; ++xx) {}\r\n for(tx = xx; tx < xx + cell.colSpan; ++tx) {\r\n for(ty = yyy; ty < yyy + cell.rowSpan; ++ty) {\r\n if (!m[ty])\r\n m[ty] = [];\r\n m[ty][tx] = true;\r\n }\r\n }\r\n if (xx <= x && x < xx + cell.colSpan && yyy <= y && y < yyy + cell.rowSpan)\r\n return cell;\r\n }\r\n }\r\n return null;\r\n };\r\n el = getTableCell(t, c, r);\r\n end;\r\n end\r\n else\r\n begin\r\n asm\r\n el = t.rows[r].cells[c];\r\n end;\r\n end;\r\n\r\n Result := el;\r\nend;\r\n\r\nprocedure TCustomStringGrid.CellRealCoords(AElement: TJSHTMLElement;var ACol,ARow: integer);\r\nvar\r\n allcells: array of array of TJSHTMLElement;\r\n el: TJSHTMLElement;\r\n i,j: integer;\r\nbegin\r\n ACol := -1;\r\n ARow := -1;\r\n\r\n SetLength(allcells, ColCount, RowCount);\r\n\r\n for i := 0 to ColCount - 1 do\r\n begin\r\n for j := 0 to RowCount - 1 do\r\n begin\r\n allcells[i,j] := CellRealElement(i,j);\r\n end;\r\n end;\r\n\r\n for i := 0 to ColCount - 1 do\r\n begin\r\n for j := 0 to RowCount - 1 do\r\n begin\r\n if allcells[i,j] = AElement then\r\n begin\r\n ACol := i - FixedCols;\r\n ARow := j - FixedRows;\r\n break;\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TCustomStringGrid.CellRowSpan(ACol, ARow: integer): integer;\r\nvar\r\n el: TJSHTMLElement;\r\n s: string;\r\n e: integer;\r\nbegin\r\n Result := 0;\r\n\r\n el := CellRealElement(ACol,ARow);\r\n if Assigned(el) then\r\n begin\r\n s := el['rowspan'];\r\n val(s,Result,e);\r\n end;\r\nend;\r\n\r\nprocedure TCustomStringGrid.ChangeRow;\r\nbegin\r\n //\r\nend;\r\n\r\nprocedure TCustomStringGrid.Clear;\r\nvar\r\n c,r: integer;\r\nbegin\r\n for c := 0 to ColCount - 1 do\r\n for r := 0 to Rowcount - 1 do\r\n begin\r\n if HasButton(c,r) then\r\n RemoveButton(c,r);\r\n if HasCheckBox(c,r) then\r\n RemoveCheckBox(c,r);\r\n\r\n Cells[c,r] := '';\r\n end;\r\nend;\r\n\r\nprocedure TCustomStringGrid.ClearData;\r\nbegin\r\n Clear;\r\n RowCount := FixedRows + 5;\r\n ColCount := FixedCols + 5;\r\nend;\r\n\r\nprocedure TCustomStringGrid.ClearMethodPointers;\r\nbegin\r\n inherited;\r\n FHandleEditBlurPtr := nil;\r\n FHandleEditKeypressPtr := nil;\r\n FHandleCheckClickPtr := nil;\r\n FHandleButtonClickPtr := nil;\r\n FHandleMouseDownPtr := nil;\r\n FHandleMouseUpPtr := nil;\r\n FHandleMouseMovePtr := nil;\r\n FHandleFixedClickPtr := nil;\r\n FHandleBlurPtr := nil;\r\n FHandleFocusPtr := nil;\r\n FHandleClickPtr := nil;\r\nend;\r\n\r\n\r\nprocedure TCustomStringGrid.ClearSelection;\r\nvar\r\n rselect: boolean;\r\n tr: TJSElement;\r\nbegin\r\n rselect := (goRowSelect in Options);\r\n\r\n if Assigned(FSelectedCell) and rselect then\r\n begin\r\n tr := FSelectedCell.parentElement;\r\n RemoveSelection(tr);\r\n end;\r\n\r\n Selection := GridRect(0,0,0,0);\r\n\r\n if Assigned(FSelectedCell) then\r\n begin\r\n RemoveSelection(FSelectedCell);\r\n end;\r\n\r\nend;\r\n\r\nprocedure TCustomStringGrid.ColCountChanged(delta: integer);\r\nvar\r\n c: integer;\r\nbegin\r\n if IsUpdating and (csLoading in ComponentState) then\r\n Exit;\r\n\r\n if not Assigned(FNormalCells) then\r\n Exit;\r\n\r\n if delta > 0 then\r\n begin\r\n\r\n asm\r\n var i = 0;\r\n var j = 0;\r\n var k = 0;\r\n var tr = undefined;\r\n var td = undefined;\r\n var sizediv,div = undefined;\r\n\r\n var l = this.FNormalCells.rows.length;\r\n\r\n for(j = 0; j < l; j++)\r\n {\r\n tr = this.FNormalCells.rows[j];\r\n\r\n k = tr.cells.length;\r\n\r\n for(i = 0; i < delta; i++)\r\n {\r\n tr.insertCell(k);\r\n }\r\n }\r\n\r\n for(j = 0; j < this.FFixedRows; j++)\r\n {\r\n k = this.FFixedRow.rows[j].cells.length;\r\n\r\n for(i = 0; i < delta; i++)\r\n {\r\n td = this.FFixedRow.rows[j].insertCell(k);\r\n td.setAttribute('class','fixed');\r\n div = document.createElement(\"DIV\");\r\n div.style = 'position:relative;height:100%;width:100%';\r\n td.appendChild(div);\r\n sizediv = document.createElement(\"DIV\");\r\n sizediv.style = 'position:absolute;height:100%;width:5px;margin-right:-5px;left:100%;top:0px;cursor:w-resize;z-index:999;';\r\n div.appendChild(sizediv);\r\n }\r\n }\r\n end;\r\n\r\n for c := 1 to delta do\r\n begin\r\n ColWidths[ColCount - c] := DefaultColWidth;\r\n end;\r\n\r\n if DragMode = dmAutomatic then\r\n EnableDrag;\r\n end;\r\n\r\n if delta < 0 then\r\n begin\r\n\r\n asm\r\n var i = 0;\r\n var j = 0;\r\n var k = 0;\r\n var tr = undefined;\r\n\r\n var l = this.FNormalCells.rows.length;\r\n\r\n for(j = 0; j < l; j++)\r\n {\r\n tr = this.FNormalCells.rows[j];\r\n\r\n k = tr.cells.length;\r\n\r\n for(i = 0; i < -delta; i++)\r\n {\r\n tr.deleteCell(k - i - 1);\r\n }\r\n }\r\n\r\n if (this.FFixedRows > 0) {\r\n\r\n k = this.FFixedRow.rows[0].cells.length;\r\n\r\n for(i = 0; i < -delta; i++)\r\n {\r\n this.FFixedRow.rows[0].deleteCell(k- i - 1);\r\n }\r\n }\r\n end;\r\n\r\n if ColCount > 0 then\r\n ColWidths[ColCount - 1] := ColWidths[ColCount - 1];\r\n end;\r\nend;\r\n\r\nfunction TCustomStringGrid.ColOffset: integer;\r\nbegin\r\n Result := FixedCols;\r\nend;\r\n\r\nconstructor TCustomStringGrid.Create(AOwner: TComponent);\r\nbegin\r\n inherited;\r\n DrawingStyle := gdsThemed;\r\nend;\r\n\r\nfunction TCustomStringGrid.CreateElement: TJSElement;\r\nbegin\r\n Result := document.createElement('SPAN');\r\n FGrid := nil;\r\nend;\r\n\r\nprocedure TCustomStringGrid.CreateInitialize;\r\nbegin\r\n inherited;\r\n FEditAdvance := false;\r\n FColWidths := TList.Create;\r\n FRowHeights := TList.Create;\r\n FColAlignments := TList.Create;\r\n FObjectRows := TList.Create;\r\n FRows := TStringList.Create;\r\n FRows.OnChange := RowsChanged;\r\n FComboBoxItems := TStringList.Create;\r\n FRange := TGridRange.Create;\r\n FHasMergedCells := false;\r\n FDefaultColAlignment := taLeftJustify;\r\n FStartCell.X := -1;\r\n FStartCell.Y := -1;\r\n FFixedColor := clBtnFace;\r\n FRowCount := 5;\r\n FColCount := 5;\r\n FColor := clWindow;\r\n FFixedCols := 1;\r\n FFixedRows := 1;\r\n FDefaultColWidth := 64;\r\n FDefaultRowHeight := 22;\r\n FShowSelection := true;\r\n ElementFont := efProperty;\r\n ElementPosition := epAbsolute;\r\n ScrollBars := ssBoth;\r\n FGridLineColor := clSilver;\r\n FSelectionColor := $FF8F5B;\r\n FSelectionTextColor := $FFFFFF;\r\n Options := [goHorzLine, goVertLine, goRangeSelect];\r\n FFixedFont := TFont.Create;\r\n FFixedFont.OnChange := FixedFontChanged;\r\n if (csDesigning in ComponentState) then\r\n begin\r\n Width := 400;\r\n Height := 300;\r\n end;\r\nend;\r\n\r\nprocedure TCustomStringGrid.DataBeginUpdate;\r\nbegin\r\nend;\r\n\r\nprocedure TCustomStringGrid.DataEndUpdate;\r\nbegin\r\nend;\r\n\r\nprocedure TCustomStringGrid.DataInsertRow(AInsertPosition: Integer);\r\nbegin\r\n InsertRow(AInsertPosition);\r\nend;\r\n\r\ndestructor TCustomStringGrid.Destroy;\r\nvar\r\n i: integer;\r\n LObjr: TObjectRow;\r\nbegin\r\n FRange.Free;\r\n FColWidths.Free;\r\n FColAlignments.Free;\r\n FRowHeights.Free;\r\n FRows.Free;\r\n FFixedFont.Free;\r\n\r\n for i := 0 to FObjectRows.Count - 1 do\r\n begin\r\n LObjr := TObjectRow(FObjectRows[i]);\r\n LObjr.Free;\r\n end;\r\n FObjectRows.Clear;\r\n\r\n FObjectRows.Free;\r\n FComboBoxItems.Free;\r\n if Assigned(FCombo) then\r\n FCombo.Free;\r\n if Assigned(FMask) then\r\n FMask.Free;\r\n inherited;\r\nend;\r\n\r\nprocedure TCustomStringGrid.DisableDrag;\r\n procedure RemoveDraggableAttribute(AElement: TJSElement);\r\n var\r\n I: Integer;\r\n begin\r\n for I := 0 to AElement.children.length - 1 do\r\n begin\r\n if TJSElement(AElement.children[I]).tagName = 'TD' then\r\n begin\r\n TJSElement(AElement.children[I]).removeAttribute('draggable');\r\n RemoveDraggableAttribute(TJSElement(AElement.children[I]));\r\n end\r\n else\r\n RemoveDraggableAttribute(TJSElement(AElement.children[I]));\r\n end;\r\n end;\r\nbegin\r\n if not Assigned(Container) then\r\n Exit;\r\n\r\n RemoveDraggableAttribute(Container);\r\nend;\r\n\r\nfunction TCustomStringGrid.DoHttpLoadCsv(Event: TEventListenerEvent): boolean;\r\nvar\r\n sl: TStringList;\r\n req: TJSXMLHttpRequest;\r\nbegin\r\n req := TJSXMLHttpRequest(Event.target);\r\n\r\n if (req.status >= 200) and (req.status <= 208) then\r\n begin\r\n sl := TStringList.Create;\r\n\r\n sl.Text := req.responseText;\r\n\r\n try\r\n LoadFromStringList(sl);\r\n finally\r\n sl.Free;\r\n end;\r\n\r\n if Assigned(OnHttpRequestSuccess) then\r\n OnHttpRequestSuccess(Self);\r\n end;\r\n\r\n Result := true;\r\nend;\r\n\r\nprocedure TCustomStringGrid.LoadFromJSON(AJSON: TJSObject; ADataNode: string = '');\r\nvar\r\n JO: JSValue;\r\n JA: TJSArray;\r\n r,c: integer;\r\n arow: string;\r\n sl: TStringList;\r\n ce: TJSHTMLElement;\r\n cd, cn: string;\r\n\r\nbegin\r\n if ADataNode <> '' then\r\n JA := TJSArray(AJSON.Properties[ADataNode])\r\n else\r\n JA := TJSArray(AJSON);\r\n\r\n if Assigned(JA) then\r\n begin\r\n sl := TStringList.Create;\r\n\r\n Clear;\r\n\r\n RowCount := JA.length + FixedRows;\r\n\r\n for r := 0 to JA.length - 1 do\r\n begin\r\n JO := JA.Elements[r];\r\n\r\n c := 0;\r\n arow := '';\r\n\r\n asm\r\n var x = undefined;\r\n for (x in JO) {\r\n arow += \"|\" + JO[x];\r\n c++;\r\n }\r\n end;\r\n\r\n Delete(arow, 1, 1);\r\n sl.StrictDelimiter := true;\r\n sl.Delimiter := '|';\r\n sl.DelimitedText := arow;\r\n if ColCount < sl.Count then\r\n ColCount := sl.Count + FixedCols;\r\n\r\n for c := 0 to sl.Count - 1 do\r\n begin\r\n cd := sl.Strings[c];\r\n GetCellData(FixedCols + c, FixedRows + r, nil, cd);\r\n Cells[FixedCols + c, FixedRows + r] := cd;\r\n\r\n cn := '';\r\n ce := CellElements[FixedCols + c, FixedRows + r];\r\n GetCellChildren(FixedCols + c, FixedRows + r, nil, cd, ce);\r\n GetCellClassName(FixedCols + c, FixedRows + r, nil, cd, cn);\r\n if cn <> '' then\r\n ce.setAttribute('class',cn);\r\n end;\r\n end;\r\n\r\n sl.Free;\r\n end;\r\n\r\n UpdateGridSize;\r\n UpdateGridAlignment;\r\nend;\r\n\r\nfunction TCustomStringGrid.LoadFromJSONAsync(const AURL: string; ADataNode: string = ''): TJSPromise;\r\nbegin\r\n Result := TJSPromise.new(\r\n procedure(ASuccess, AFailed: TJSPromiseResolver)\r\n\r\n function DoLoad(Event: TEventListenerEvent): boolean;\r\n begin\r\n if DoHttpLoadJson(Event) then\r\n ASuccess(TJSXMLHttpRequest(Event.target))\r\n else\r\n AFailed(TJSXMLHttpRequest(Event.target));\r\n Result := true;\r\n end;\r\n\r\n function DoError(Event: TEventListenerEvent): boolean;\r\n begin\r\n AFailed(TJSXMLHttpRequest(Event.target));\r\n Result := true;\r\n end;\r\n\r\n begin\r\n FDataNode := ADataNode;\r\n FReq := TJSXMLHttpRequest.new;\r\n FReq.addEventListener('load',@DoLoad);\r\n FReq.addEventListener('abort',@DoError);\r\n FReq.addEventListener('timeout',@DoError);\r\n FReq.addEventListener('error',@DoError);\r\n\r\n FReq.open('GET', AURL);\r\n DoHttpRequest(FReq);\r\n FReq.send;\r\n end);\r\nend;\r\n\r\nprocedure TCustomStringGrid.LoadFromStringList(AStrings: TStrings);\r\nvar\r\n arow: TStringList;\r\n i,j,maxcol: integer;\r\n sr,sc: integer;\r\n cd, cn: string;\r\n ce: TJSHTMLElement;\r\n\r\nbegin\r\n if FLoadFixed then\r\n RowCount := AStrings.Count\r\n else\r\n RowCount := AStrings.Count + FixedRows;\r\n\r\n arow := TStringList.Create;\r\n\r\n sc := FixedCols;\r\n sr := FixedRows;\r\n\r\n if FLoadFixed then\r\n begin\r\n sr := 0;\r\n sc := 0;\r\n end;\r\n\r\n maxcol := 0;\r\n\r\n try\r\n for i := 0 to AStrings.Count - 1 do\r\n begin\r\n arow.StrictDelimiter := true;\r\n arow.Delimiter := FDelimiter;\r\n arow.DelimitedText := AStrings.Strings[i];\r\n\r\n if arow.Count > maxcol then\r\n maxcol := arow.Count;\r\n\r\n if arow.Count > ColCount - sc then\r\n ColCount := arow.Count + sc;\r\n\r\n for j := 0 to arow.Count - 1 do\r\n begin\r\n cd := arow.Strings[j];\r\n GetCellData(j + sc, i + sr, nil, cd);\r\n Cells[j + sc, i + sr] := cd;\r\n\r\n ce := CellElements[j + sc, i + sr];\r\n\r\n GetCellChildren(j + sc, i + sr, nil, cd, ce);\r\n\r\n cn := '';\r\n GetCellClassName(j + sc, i + sr, nil, cd, cn);\r\n if cn <> '' then\r\n ce.setAttribute('class',cn);\r\n end;\r\n end;\r\n finally\r\n arow.Free;\r\n end;\r\n\r\n if maxcol < ColCount - sc then\r\n ColCount := maxcol + sc;\r\nend;\r\n\r\nprocedure TCustomStringGrid.LoadFromStrings(AStrings: TStrings; Delimiter: char;\r\n LoadFixed: boolean);\r\nbegin\r\n FDelimiter := Delimiter;\r\n FLoadFixed := LoadFixed;\r\n\r\n LoadFromStringList(AStrings);\r\nend;\r\n\r\n{$HINTS OFF}\r\nfunction TCustomStringGrid.DoHttpLoadJson(Event: TEventListenerEvent): boolean;\r\nvar\r\n J: TJSObject;\r\n req: TJSXMLHttpRequest;\r\nbegin\r\n req := TJSXMLHttpRequest(Event.target);\r\n\r\n if (req.status >= 200) and (req.status <= 208) then\r\n begin\r\n J := TJSJSON.parseObject(req.responseText);\r\n\r\n LoadFromJSON(J, FDataNode);\r\n\r\n if Assigned(OnHttpRequestSuccess) then\r\n OnHttpRequestSuccess(Self);\r\n end;\r\n\r\n Result := true;\r\nend;\r\n\r\n\r\nprocedure TCustomStringGrid.DoHttpRequest(ARequest: TJSXMLHttpRequest);\r\nvar\r\n LRequestRec: TJSXMLHttpRequestRecord;\r\nbegin\r\n if Assigned(OnHttpRequest) then\r\n begin\r\n LRequestRec.req := ARequest;\r\n OnHttpRequest(Self, LRequestRec);\r\n end;\r\nend;\r\n\r\nprocedure TCustomStringGrid.DoSortClick(ACol, ARow: Longint;\r\n ASortIndicator: TGridSortIndicator);\r\nvar\r\n i: integer;\r\nbegin\r\n FSortIndex := ACol;\r\n\r\n for i := 0 to ColCount - 1 do\r\n begin\r\n SelectSortIndicator(i,ARow,i = ACol);\r\n end;\r\n\r\n FSortDirection := ASortIndicator;\r\n\r\n if Assigned(OnSortClick) then\r\n OnSortClick(Self, ACol, ARow, ASortIndicator);\r\n\r\n Sort(ACol, ASortIndicator);\r\nend;\r\n\r\nprocedure TCustomStringGrid.EnableColResize;\r\nvar\r\n TableName: string;\r\n ResizeEnabled: Boolean;\r\nbegin\r\n if not (csDesigning in ComponentState) then\r\n begin\r\n TableName := GetID + 'tblResizeRow';\r\n\r\n ResizeEnabled := (goColSizing in Options);\r\n\r\n asm\r\n TMSStringGridresizableGrid(TableName, ResizeEnabled);\r\n end;\r\n\r\n TableName := GetID + 'tblResizeFixedRow';\r\n ResizeEnabled := (goColSizing in Options);\r\n asm\r\n TMSStringGridresizableGrid(TableName, ResizeEnabled);\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TCustomStringGrid.EnableDrag;\r\n procedure AddDraggableAttribute(AElement: TJSElement);\r\n var\r\n I: Integer;\r\n begin\r\n for I := 0 to AElement.children.length - 1 do\r\n begin\r\n if TJSElement(AElement.children[I]).tagName = 'TD' then\r\n begin\r\n TJSElement(AElement.children[I]).Attrs['draggable'] := 'true';\r\n AddDraggableAttribute(TJSElement(AElement.children[I]));\r\n end\r\n else\r\n AddDraggableAttribute(TJSElement(AElement.children[I]));\r\n end;\r\n end;\r\nbegin\r\n if not Assigned(Container) then\r\n Exit;\r\n\r\n AddDraggableAttribute(Container);\r\nend;\r\n\r\n{$HINTS ON}\r\n\r\nprocedure TCustomStringGrid.DoBoundsChange;\r\nvar\r\n fw,fh,nwvis,nhvis: integer;\r\n\r\nbegin\r\n inherited;\r\n\r\n if Assigned(ElementHandle) then\r\n begin\r\n UpdateGridSize;\r\n\r\n fw := FixedColWidth;\r\n fh := FixedRowHeight;\r\n\r\n nwvis := Width - fw;\r\n nhvis := Height - fh;\r\n\r\n if Assigned(FNormalCells) then\r\n begin\r\n TJSHTMLElement(FNormalCells.parentElement.parentElement).style.setProperty('width',inttostr(nwvis)+'px');\r\n TJSHTMLElement(FNormalCells.parentElement.parentElement).style.setProperty('height',inttostr(nhvis)+'px');\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TCustomStringGrid.DoButtonClick(ACol, ARow: Longint);\r\nbegin\r\n if Assigned(OnButtonClick) then\r\n OnButtonClick(Self, ACol, ARow);\r\nend;\r\n\r\nprocedure TCustomStringGrid.DoCheckClick(ACol, ARow: Longint; Checked: boolean);\r\nbegin\r\n if Assigned(OnCheckClick) then\r\n OnCheckClick(Self, ACol, ARow, Checked);\r\nend;\r\n\r\nprocedure TCustomStringGrid.DoColumnSized(AColumn: integer);\r\nbegin\r\n if Assigned(OnColumnSized) then\r\n OnColumnSized(Self, AColumn);\r\nend;\r\n\r\nprocedure TCustomStringGrid.DoEditControlExit(Sender: TObject);\r\nbegin\r\n HideEdit;\r\nend;\r\n\r\nprocedure TCustomStringGrid.DoEnter;\r\nbegin\r\n// focus is handled at NormalCells level\r\nend;\r\n\r\nprocedure TCustomStringGrid.DoExit;\r\nbegin\r\n// focus is handled at NormalCells level\r\nend;\r\n\r\nfunction TCustomStringGrid.DoHttpAbort(Event: TEventListenerEvent): boolean;\r\nbegin\r\n if Assigned(OnHttpRequestError) then\r\n OnHttpRequestError(Self);\r\n\r\n Result := true;\r\nend;\r\n\r\nfunction TCustomStringGrid.FixedColWidth: integer;\r\nvar\r\n i: integer;\r\nbegin\r\n Result := 0;\r\n\r\n for i := 0 to FixedCols - 1 do\r\n Result := Result + ColWidths[i] - CELLPADDING;\r\nend;\r\n\r\nprocedure TCustomStringGrid.FixedFontChanged(Sender: TObject);\r\nbegin\r\n AddInstanceStyle(StylePrefix + FOrigID, GetGridCSS(FOrigID + 'tbl'));\r\n UpdateElementVisual;\r\nend;\r\n\r\nfunction TCustomStringGrid.FixedRowHeight: integer;\r\nvar\r\n i: integer;\r\nbegin\r\n Result := 0;\r\n\r\n for i := 0 to FixedRows - 1 do\r\n Result := Result + RowHeights[i];\r\nend;\r\n\r\nfunction TCustomStringGrid.FocusedCell: TJSElement;\r\nbegin\r\n Result := FSelectedCell;\r\nend;\r\n\r\nprocedure TCustomStringGrid.FontChanged;\r\nbegin\r\n inherited;\r\n UpdateElement;\r\nend;\r\n\r\nfunction TCustomStringGrid.GetButtonElement(ACol,\r\n ARow: integer): TJSHTMLElement;\r\nvar\r\n el: TJSElement;\r\nbegin\r\n Result := nil;\r\n\r\n if (ACol < ColCount) and (ARow < RowCount) then\r\n begin\r\n el := TJSElement(CellElements[ACol,ARow].firstChild);\r\n if Assigned(el) and (el is TJSElement) then\r\n begin\r\n if (uppercase(el.tagName) = 'BUTTON') then\r\n begin\r\n Result := TJSHTMLElement(el);\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TCustomStringGrid.GetCellChildren(ACol, ARow: integer; AField: TField;\r\n AValue: string; AElement: TJSHTMLElement);\r\nvar\r\n LElementRec: TJSHTMLElementRecord;\r\nbegin\r\n if Assigned(OnGetCellChildren) then\r\n begin\r\n LElementRec.element := AElement;\r\n OnGetCellChildren(Self, ACol, ARow, AField, AValue, LElementRec);\r\n end;\r\nend;\r\n\r\nprocedure TCustomStringGrid.GetCellClassName(ACol, ARow: integer;\r\n AField: TField; AValue: string; var AClassName: string);\r\nbegin\r\n if Assigned(OnGetCellClass) then\r\n OnGetCellClass(Self, ACol, ARow, AField, AValue, AClassName);\r\nend;\r\n\r\nprocedure TCustomStringGrid.GetCellData(ACol, ARow: integer; AField: TField;\r\n var AValue: string);\r\nbegin\r\n if Assigned(OnGetCellData) then\r\n OnGetCellData(Self, ACol, ARow, AField, AValue);\r\nend;\r\n\r\n{$HINTS OFF}\r\nprocedure TCustomStringGrid.GetCellEditor(const ACol, ARow: integer;\r\n var AEditor: TGridCellEditor);\r\nbegin\r\n if Assigned(OnGetCellEditor) then\r\n OnGetCellEditor(Self, ACol, ARow, AEditor);\r\nend;\r\n\r\nfunction TCustomStringGrid.GetCellElements(ACol, ARow: integer): TJSHTMLElement;\r\n(*\r\nvar\r\n rc,rr: integer;\r\n res: TJSHTMLElement;\r\n*)\r\nbegin\r\n Result := CellRealElement(ACol,ARow);\r\n(*\r\n Exit;\r\n\r\n res := nil;\r\n if (ACol < FixedCols) and (ARow >= FixedRows) then\r\n begin\r\n rr := ARow - FixedRows;\r\n rc := ACol;\r\n\r\n asm\r\n res = this.FFixedCol.rows[rr].cells[rc];\r\n end;\r\n end;\r\n\r\n if (ARow < FixedRows) and (ACol >= FixedCols) then\r\n begin\r\n rc := ACol - FixedCols;\r\n rr := ARow;\r\n\r\n asm\r\n res = this.FFixedRow.rows[rr].cells[rc];\r\n end;\r\n end;\r\n\r\n if (ACol < FixedCols) and (ARow < FixedRows) then\r\n begin\r\n rr := ARow;\r\n rc := ACol;\r\n asm\r\n res = this.FFixedColRow.rows[rr].cells[rc];\r\n end;\r\n end;\r\n\r\n if (ACol >= FixedCols) and (ARow >= FixedRows) and (ARow < RowCount) and (ACol < ColCount) then\r\n begin\r\n rc := ACol - FixedCols;\r\n rr := ARow - FixedRows;\r\n asm\r\n res = this.FNormalCells.rows[rr].cells[rc];\r\n end;\r\n end;\r\n\r\n Result := res;\r\n*)\r\nend;\r\n\r\n\r\nfunction TCustomStringGrid.GetDirectCellElements(ACol, ARow: integer): TJSHTMLElement;\r\nvar\r\n rc,rr: integer;\r\n res: TJSHTMLElement;\r\nbegin\r\n res := nil;\r\n\r\n if (ACol < FixedCols) and (ARow >= FixedRows) then\r\n begin\r\n rr := ARow - FixedRows;\r\n rc := ACol;\r\n\r\n asm\r\n res = this.FFixedCol.rows[rr].cells[rc];\r\n end;\r\n end;\r\n\r\n if (ARow < FixedRows) and (ACol >= FixedCols) then\r\n begin\r\n rc := ACol - FixedCols;\r\n rr := ARow;\r\n\r\n asm\r\n res = this.FFixedRow.rows[rr].cells[rc];\r\n end;\r\n end;\r\n\r\n if (ACol < FixedCols) and (ARow < FixedRows) then\r\n begin\r\n rr := ARow;\r\n rc := ACol;\r\n asm\r\n res = this.FFixedColRow.rows[rr].cells[rc];\r\n end;\r\n end;\r\n\r\n if (ACol >= FixedCols) and (ARow >= FixedRows) and (ARow < RowCount) and (ACol < ColCount) then\r\n begin\r\n rc := ACol - FixedCols;\r\n rr := ARow - FixedRows;\r\n asm\r\n res = this.FNormalCells.rows[rr].cells[rc];\r\n end;\r\n end;\r\n\r\n Result := res;\r\nend;\r\n\r\n{$HINTS ON}\r\n\r\nfunction TCustomStringGrid.GetCells(ACol, ARow: integer): string;\r\nvar\r\n td: TJSHTMLElement;\r\nbegin\r\n td := CellRealElement(ACol,ARow);\r\n\r\n if not Assigned(td) then\r\n begin\r\n Result := '';\r\n Exit;\r\n end;\r\n\r\n if WordWrap then\r\n begin\r\n if Assigned(td.firstChild) then\r\n td := TJSHTMLElement(td.firstChild);\r\n end;\r\n\r\n Result := td.textContent;\r\nend;\r\n\r\nfunction TCustomStringGrid.GetCheckElement(ACol, ARow: integer): TJSHTMLElement;\r\nvar\r\n el: TJSElement;\r\nbegin\r\n Result := nil;\r\n\r\n if (ACol < ColCount) and (ARow < RowCount) then\r\n begin\r\n el := TJSElement(CellElements[ACol,ARow].firstChild);\r\n if Assigned(el) and (el is TJSElement) then\r\n begin\r\n if el.hasAttribute('type') and (uppercase(el['type']) = 'CHECKBOX') then\r\n begin\r\n Result := TJSHTMLElement(el);\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TCustomStringGrid.GetCanvasElement(ACol, ARow: integer): TJSHTMLElement;\r\nvar\r\n el: TJSElement;\r\nbegin\r\n Result := nil;\r\n\r\n if (ACol < ColCount) and (ARow < RowCount) then\r\n begin\r\n el := TJSElement(CellElements[ACol,ARow].firstChild);\r\n\r\n if Assigned(el) and (el is TJSElement) then\r\n begin\r\n if Uppercase(el.tagName) = 'CANVAS' then\r\n begin\r\n Result := TJSHTMLElement(el);\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\n\r\nfunction TCustomStringGrid.GetCheckState(ACol, ARow: integer): boolean;\r\nvar\r\n el: TJSElement;\r\n res: boolean;\r\nbegin\r\n Result := false;\r\n\r\n if (ACol < ColCount) and (ARow < RowCount) then\r\n begin\r\n el := GetCheckElement(ACol,ARow);\r\n if Assigned(el) then\r\n begin\r\n asm\r\n res = el.checked;\r\n end;\r\n Result := res;\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TCustomStringGrid.GetCheckEnabled(ACol, ARow: integer): boolean;\r\nvar\r\n el: TJSElement;\r\n res: boolean;\r\nbegin\r\n Result := false;\r\n\r\n if (ACol < ColCount) and (ARow < RowCount) then\r\n begin\r\n el := GetCheckElement(ACol,ARow);\r\n if Assigned(el) then\r\n begin\r\n asm\r\n res = el.disabled;\r\n end;\r\n Result := not res;\r\n end;\r\n end;\r\nend;\r\n\r\n\r\nfunction TCustomStringGrid.GetCol: integer;\r\nvar\r\n res: integer;\r\nbegin\r\n res := -1;\r\n if Assigned(FSelectedCell) then\r\n begin\r\n asm\r\n res = this.FSelectedCell.cellIndex;\r\n end;\r\n res := res + FixedCols;\r\n end;\r\n\r\n Result := res;\r\nend;\r\n\r\nfunction TCustomStringGrid.GetColAlignments(ACol: integer): TAlignment;\r\nbegin\r\n if ACol < FColAlignments.Count then\r\n Result := TAlignment(FColAlignments.Items[ACol])\r\n else\r\n Result := DefaultColAlignment;\r\nend;\r\n\r\nfunction TCustomStringGrid.GetColWidths(ACol: integer): integer;\r\nbegin\r\n if ACol < FColWidths.Count then\r\n Result := integer(FColWidths.Items[ACol])\r\n else\r\n Result := DefaultColWidth;\r\nend;\r\n\r\nfunction TCustomStringGrid.GetDataRowCount: Integer;\r\nbegin\r\n Result := RowCount - FixedRows;\r\nend;\r\n\r\nprocedure TCustomStringGrid.GetEditControlValue(ACol, ARow: Longint;\r\n AControl: TControl; var AValue: string);\r\nbegin\r\n if Assigned(OnGetEditControlValue) then\r\n OnGetEditControlValue(Self, ACol, ARow, AControl, AValue);\r\nend;\r\n\r\nfunction TCustomStringGrid.GetEditText(ACol, ARow: Longint): string;\r\nbegin\r\n Result := Cells[ACol,ARow];\r\n\r\n if Assigned(OnGetEditText) then\r\n OnGetEditText(Self, ACol, ARow, Result);\r\nend;\r\n\r\nfunction TCustomStringGrid.GetFixedTextColor: TColor;\r\nbegin\r\n Result := FFixedFont.Color;\r\nend;\r\n\r\nfunction TCustomStringGrid.GetGridCSS(id: string): string;\r\nvar\r\n ff: string;\r\nbegin\r\n Result := '';\r\n\r\n if ElementTableClassName <> '' then\r\n Exit;\r\n\r\n if not (goVertLine in Options) then\r\n Result := 'border-left: 0px; border-right: 0px;';\r\n\r\n if not (goHorzLine in Options) then\r\n Result := Result + 'border-top: 0px; border-bottom: 0px;';\r\n\r\n if ElementFont = efProperty then\r\n begin\r\n Result := Result + CSSFont(Font);\r\n ff := CSSFont(FixedFont);\r\n end;\r\n\r\n Result := 'table#' + id + ' td { overflow: hidden; text-overflow: ellipsis; white-space:nowrap; border: solid 1px '+ ColorToHTML(GridLineColor) +'; padding: 0px;' + Result + '} '+#13+\r\n 'table#'+id+' td.fixed {'+ ff + '} '+#13+\r\n 'table#'+id+' td.selected { background-color: '+ ColorToHTML(SelectionColor)+ '; color: '+ ColorToHTML(SelectionTextColor)+';} '+#13+\r\n 'table#'+id+' tr.selected { background-color: '+ ColorToHTML(SelectionColor)+ '; color: '+ ColorToHTML(SelectionTextColor)+';} '+#13+\r\n// 'table#'+id+'NormalCellTable td { padding:2px;} '+#13+\r\n// 'table#'+id+'ResizeFixedRowTable td { padding:2px;} '+#13+\r\n// 'table#'+id+'ResizeRowTable td { padding:2px;} '+#13+\r\n// 'table#'+id+'ResizeFixedColTable td { padding:2px;} '+#13+\r\n 'table#'+id+' DIV.cell {word-wrap: normal; white-space: normal; text-overflow: clip; } ';\r\nend;\r\n\r\nfunction TCustomStringGrid.GetLeftCol: integer;\r\nvar\r\n i,w,l: integer;\r\nbegin\r\n Result := FixedCols;\r\n\r\n if Assigned(FNormalCells) then\r\n begin\r\n l := FNormalCells.parentElement.parentElement.scrollLeft;\r\n w := 0;\r\n for i := FixedCols to ColCount - 1 do\r\n begin\r\n if l <= w then\r\n begin\r\n Result := i;\r\n break;\r\n end;\r\n w := w + ColWidths[i] + 1 - CELLPADDING;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TCustomStringGrid.GetMethodPointers;\r\nbegin\r\n inherited;\r\n FHandleEditBlurPtr := @HandleEditBlur;\r\n FHandleEditKeypressPtr := @HandleEditKeypress;\r\n FHandleCheckClickPtr := @HandleCheckBoxClick;\r\n FHandleButtonClickPtr := @HandleButtonClick;\r\n FHandleMouseDownPtr := @HandleMouseDown;\r\n FHandleMouseUpPtr := @HandleMouseUp;\r\n FHandleMouseMovePtr := @HandleMouseMove;\r\n FHandleFixedClickPtr := @HandleFixedClick;\r\n FHandleFocusPtr := @HandleTableFocus;\r\n FHandleBlurPtr := @HandleTableBlur;\r\n FHandleClickPtr := @HandleClick;\r\nend;\r\n\r\nfunction TCustomStringGrid.GetObjects(ACol, ARow: integer): TObject;\r\nvar\r\n LObjr: TObjectRow;\r\nbegin\r\n Result := nil;\r\n\r\n if FObjectRows.Count > ARow then\r\n begin\r\n LObjr := TObjectRow(FObjectRows[ARow]);\r\n if LObjr.Count > ACol then\r\n Result := TObject(LObjr[ACol]);\r\n end;\r\nend;\r\n\r\nfunction TCustomStringGrid.GetProgressElement(ACol,\r\n ARow: integer): TJSHTMLElement;\r\nvar\r\n el: TJSElement;\r\nbegin\r\n Result := nil;\r\n\r\n if (ACol < ColCount) and (ARow < RowCount) then\r\n begin\r\n el := TJSElement(CellElements[ACol,ARow].firstChild);\r\n if Assigned(el) and (el is TJSElement) then\r\n begin\r\n if (uppercase(el.tagName) = 'PROGRESS') then\r\n begin\r\n Result := TJSHTMLElement(el);\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TCustomStringGrid.GetRow: integer;\r\nvar\r\n res: integer;\r\nbegin\r\n res := -1;\r\n if Assigned(FSelectedCell) then\r\n begin\r\n asm\r\n res = this.FSelectedCell.parentElement.rowIndex;\r\n end;\r\n res := res + FixedRows;\r\n end;\r\n\r\n Result := res;\r\nend;\r\n\r\nfunction TCustomStringGrid.GetRowHeights(ARow: integer): integer;\r\nbegin\r\n if ARow < FRowHeights.Count then\r\n Result := integer(FRowHeights.Items[ARow])\r\n else\r\n Result := DefaultRowHeight;\r\nend;\r\n\r\nfunction TCustomStringGrid.GetRows(Index: integer): TStrings;\r\nvar\r\n i: integer;\r\nbegin\r\n if (Index >= 0) and (Index < RowCount) then\r\n begin\r\n FRowsIndex := Index;\r\n FRows.Clear;\r\n for i := 0 to ColCount - 1 do\r\n FRows.Add(Cells[i,Index]);\r\n\r\n Result := FRows;\r\n end\r\n else\r\n raise Exception.Create('Invalid row index');\r\nend;\r\n\r\nfunction TCustomStringGrid.GetSelection: TGridRect;\r\nbegin\r\n Result := FSelection;\r\nend;\r\n\r\nfunction TCustomStringGrid.GetTopRow: integer;\r\nvar\r\n pixVal: integer;\r\nbegin\r\n Result := FixedRows;\r\n\r\n if Assigned(FNormalCells) and (pixVal >= 0) then\r\n begin\r\n pixVal := FNormalCells.parentElement.parentElement.scrollTop;\r\n\r\n Result := FixedRows + pixVal div DefaultRowHeight;\r\n end;\r\nend;\r\n\r\nfunction TCustomStringGrid.GetVisibleColCount: integer;\r\nvar\r\n i: integer;\r\n el: TJSHTMLElement;\r\n cr,gr: TJSDOMRect;\r\nbegin\r\n i := LeftCol;\r\n\r\n gr := ElementHandle.getBoundingClientRect;\r\n\r\n while i < ColCount do\r\n begin\r\n el := CellElements[i,FixedRows];\r\n cr := el.getBoundingClientRect;\r\n if cr.Right > gr.Right then\r\n break;\r\n inc(i);\r\n end;\r\n\r\n Result := i - LeftCol;\r\nend;\r\n\r\nfunction TCustomStringGrid.GetVisibleRowCount: integer;\r\nvar\r\n i: integer;\r\n el: TJSHTMLElement;\r\n cr,gr: TJSDOMRect;\r\nbegin\r\n i := TopRow;\r\n\r\n gr := ElementHandle.getBoundingClientRect;\r\n\r\n while i < RowCount do\r\n begin\r\n el := CellElements[FixedCols,i];\r\n cr := el.getBoundingClientRect;\r\n if cr.Bottom > gr.Bottom then\r\n break;\r\n inc(i);\r\n end;\r\n\r\n Result := i - TopRow;\r\nend;\r\n\r\nprocedure TCustomStringGrid.GridChanged;\r\nbegin\r\n inherited;\r\n FSelectedCell := nil;\r\n UpdateGridSize;\r\n UpdateGridAlignment;\r\nend;\r\n\r\n{$HINTS OFF}\r\nfunction TCustomStringGrid.HandleButtonClick(Event: TJSEvent): Boolean;\r\nvar\r\n rindex, cindex: integer;\r\n chk: boolean;\r\nbegin\r\n rindex := -1;\r\n cindex := -1;\r\n\r\n asm\r\n var el = Event.target;\r\n var d = el.parentElement;\r\n if (d.tagName.toLowerCase() == 'td')\r\n {\r\n cindex = d.cellIndex;\r\n var tr = d.parentElement;\r\n rindex = tr.rowIndex;\r\n }\r\n end;\r\n\r\n if (rindex <> -1) and (cindex <> -1) then\r\n begin\r\n DoButtonClick(cindex + FixedCols, rindex + FixedRows);\r\n end;\r\nend;\r\n\r\nfunction TCustomStringGrid.HandleCheckBoxClick(Event: TJSEvent): Boolean;\r\nvar\r\n rindex, cindex: integer;\r\n chk: boolean;\r\nbegin\r\n rindex := -1;\r\n cindex := -1;\r\n\r\n asm\r\n var el = Event.target;\r\n chk = el.checked;\r\n var d = el.parentElement;\r\n if (d.tagName.toLowerCase() == 'td')\r\n {\r\n cindex = d.cellIndex;\r\n var tr = d.parentElement;\r\n rindex = tr.rowIndex;\r\n }\r\n end;\r\n\r\n if (rindex <> -1) and (cindex <> -1) then\r\n begin\r\n if not CanEditCell(cindex + FixedCols, rindex + FixedRows) then\r\n // undo checkbox change from click\r\n asm\r\n var el = Event.target;\r\n el.checked = (!el.checked);\r\n end\r\n else\r\n DoCheckClick(cindex + FixedCols, rindex + FixedRows, chk);\r\n end;\r\nend;\r\n\r\nfunction TCustomStringGrid.HandleFixedClick(Event: TJSEvent): Boolean;\r\nvar\r\n rindex,cindex: integer;\r\n rselect: boolean;\r\n tbl: TJSHTMLElement;\r\n ACol,ARow: integer;\r\n tgt: TJSHTMLElement;\r\n tag: string;\r\n sd: TGridSortIndicator;\r\n\r\nbegin\r\n Result := true;\r\n\r\n rselect := (goRowSelect in Options);\r\n rindex := -1;\r\n cindex := -1;\r\n\r\n sd := siNone;\r\n\r\n asm\r\n tgt = Event.target;\r\n end;\r\n\r\n if tgt.tagName = 'SPAN' then\r\n begin\r\n if tgt['sort']= 'up' then\r\n begin\r\n sd := siAscending;\r\n end\r\n else\r\n if tgt['sort']= 'dn' then\r\n begin\r\n sd := siDescending;\r\n end;\r\n end;\r\n\r\n repeat\r\n asm\r\n tag = tgt.tagName.toLowerCase();\r\n if (tag != 'td')\r\n {\r\n tgt = tgt.parentElement;\r\n }\r\n end;\r\n until (tag = 'td') or (tgt = nil);\r\n\r\n\r\n asm\r\n if (tag == 'td')\r\n {\r\n cindex = tgt.cellIndex;\r\n var tr = tgt.parentElement;\r\n rindex = tr.rowIndex;\r\n tbl = tr.parentElement;\r\n tbl = tbl.parentElement;\r\n }\r\n end;\r\n\r\n if (cindex = -1) or (rindex = -1) then\r\n Exit;\r\n\r\n ACol := cindex;\r\n ARow := rindex;\r\n\r\n if tbl = FFixedCol then\r\n begin\r\n ARow := rindex + FixedRows;\r\n end;\r\n\r\n if tbl = FFixedRow then\r\n begin\r\n ACol := cindex + FixedCols;\r\n end;\r\n\r\n if sd = siAscending then\r\n begin\r\n DoSortClick(ACol,ARow,siDescending);\r\n SetSortIndicator(ACol,ARow, siDescending);\r\n end\r\n else\r\n if sd = siDescending then\r\n begin\r\n DoSortClick(ACol,ARow, siAscending);\r\n SetSortIndicator(ACol,ARow, siAscending);\r\n end;\r\n\r\n if Assigned(OnFixedCellClick) then\r\n OnFixedCellClick(Self, ACol, ARow);\r\nend;\r\n\r\nfunction TCustomStringGrid.HandleClick(Event: TJSEvent): Boolean;\r\nvar\r\n rindex,cindex: integer;\r\n rselect: boolean;\r\n tr: TJSElement;\r\n tgt: TJSHTMLElement;\r\n tag,starttag: string;\r\nbegin\r\n Result := true;\r\n\r\n if not Enabled then\r\n Exit;\r\n\r\n rselect := (goRowSelect in Options);\r\n rindex := -1;\r\n cindex := -1;\r\n\r\n asm\r\n tgt = Event.target;\r\n starttag = tgt.tagName.toLowerCase();\r\n end;\r\n\r\n if (starttag = 'tr') or (starttag = 'tbody') then\r\n Exit;\r\n\r\n repeat\r\n asm\r\n tag = tgt.tagName.toLowerCase();\r\n if (tag != 'td')\r\n {\r\n tgt = tgt.parentElement;\r\n }\r\n end;\r\n until (tag = 'td') or (tgt = nil);\r\n\r\n asm\r\n if (tag == 'td')\r\n {\r\n cindex = tgt.cellIndex;\r\n var tr = tgt.parentElement;\r\n rindex = tr.rowIndex;\r\n }\r\n end;\r\n\r\n if (tag = 'td') and FHasMergedCells then\r\n begin\r\n CellRealCoords(tgt, cindex, rindex);\r\n end;\r\n\r\n if (cindex = -1) or (rindex = -1) then\r\n Exit;\r\n\r\n if not CanSelect(cindex + FixedCols, rindex + FixedRows) then\r\n begin\r\n Exit;\r\n end;\r\n\r\n SelectCell(cindex + FixedCols, rindex + FixedRows);\r\n\r\n if Assigned(OnClickCell) and Enabled then\r\n begin\r\n OnClickCell(Self, cindex + FixedCols, rindex + FixedRows);\r\n end;\r\n\r\n if Assigned(FSelectedCell) then\r\n begin\r\n if FSelMouseDown then\r\n begin\r\n if (goEditing in Options) and CanEditCell(Col,Row) then\r\n begin\r\n ShowEdit;\r\n Exit;\r\n end;\r\n end\r\n else\r\n begin\r\n if rselect then\r\n begin\r\n tr := FSelectedCell.parentElement;\r\n RemoveSelection(tr);\r\n end\r\n else\r\n RemoveSelection(FSelectedCell);\r\n end;\r\n end;\r\n\r\n if (tag = 'td') then\r\n begin\r\n tr := tgt.parentElement;\r\n FSelectedCell := tgt;\r\n\r\n if (rselect) then\r\n AddSelection(tr)\r\n else\r\n AddSelection(tgt);\r\n end;\r\nend;\r\n\r\nprocedure TCustomStringGrid.HandleComboExit(Sender: TObject);\r\nbegin\r\n if EditMode then\r\n HideEdit;\r\nend;\r\n\r\nprocedure TCustomStringGrid.HandleComboKeyPress(Sender: TObject; var Key: Char);\r\nbegin\r\n if Assigned(OnKeyPress) then\r\n OnKeyPress(Self, Key);\r\n\r\n if (Ord(Key) = 27) then\r\n CancelEdit;\r\n if (Ord(Key) = 13) then\r\n HideEdit(EditAdvance);\r\nend;\r\n\r\nfunction TCustomStringGrid.HandleDoClick(Event: TJSMouseEvent): Boolean;\r\nbegin\r\n Result := inherited;\r\n if not EditMode and Assigned(FNormalCells) then\r\n TJSHTMLElement(FNormalCells).focus();\r\nend;\r\n\r\nfunction TCustomStringGrid.HandleDoDblClick(Event: TJSMouseEvent): Boolean;\r\nvar\r\n c,r,fc,fr: integer;\r\n el,pel: TJSElement;\r\nbegin\r\n inherited;\r\n\r\n el := Event.targetElement;\r\n\r\n while Assigned(el) and (el <> Self.ElementHandle) and\r\n not ((el.tagName = 'TD') or (el.tagName = 'TH')) do\r\n el := el.ParentElement;\r\n\r\n if Assigned(el) and (el.tagName = 'TD') or (el.tagName = 'TH') then\r\n begin\r\n asm\r\n c = el.cellIndex;\r\n var tr = el.parentElement;\r\n r = tr.rowIndex;\r\n pel = el.parentElement;\r\n if (pel) {\r\n pel = pel.parentElement; }\r\n if (pel) {\r\n pel = pel.parentElement; }\r\n end;\r\n\r\n if not (el.classList.contains('fixed')) then\r\n begin\r\n fc := FixedCols;\r\n fr := FixedRows;\r\n end;\r\n\r\n if Assigned(pel) then\r\n begin\r\n if pos('ResizeRowTable', pel.id) > 0 then\r\n fc := FixedCols;\r\n if pos('FixedColTable', pel.id) > 0 then\r\n fr := FixedRows;\r\n end;\r\n\r\n if Assigned(OnDblClickCell) then\r\n OnDblClickCell(Self, c + fc, r + fr);\r\n end;\r\n Result := true;\r\n\r\nend;\r\n\r\nfunction TCustomStringGrid.HandleDoMouseMove(Event: TJSMouseEvent): Boolean;\r\nvar\r\n CtrlName: string;\r\n IsAutoWidth: Boolean;\r\nbegin\r\n inherited;\r\n\r\n CtrlName := GetID + 'tbl';\r\n IsAutoWidth := (WidthStyle in [ssAuto]);\r\n asm\r\n TMSStringGridID = CtrlName;\r\n TMSStringGridautoWidth = IsAutoWidth;\r\n GridNormalCells = this.FNormalCells;\r\n GridFixedCells = this.FFixedRow;\r\n GridFixedColCells = this.FFixedCol;\r\n GridFixedColRows = this.FFixedColRow;\r\n GridColWidths = this.FColWidths;\r\n GridFixedCols = this.FFixedCols;\r\n TMSStringGridresizeColumn(Event);\r\n end;\r\n\r\n Result := True;\r\nend;\r\n\r\nfunction TCustomStringGrid.HandleDoMouseUp(Event: TJSMouseEvent): Boolean;\r\nvar\r\n res: integer;\r\nbegin\r\n inherited;\r\n\r\n asm\r\n res = TMSGridLastColSize;\r\n if (!res) {\r\n res = TMSStringGridisSizing(); }\r\n TMSStringGridresetResize();\r\n end;\r\n\r\n if res >= 0 then\r\n DoColumnSized(res);\r\n\r\n Result := True;\r\nend;\r\n\r\n{$HINTS ON}\r\n\r\nfunction TCustomStringGrid.HandleEditBlur(Event: TJSEvent): Boolean;\r\nbegin\r\n if FEditMode then\r\n begin\r\n HideEdit;\r\n end;\r\n Result := true;\r\nend;\r\n\r\nfunction TCustomStringGrid.HandleEditKeyPress(Event: TJSKeyboardEvent): boolean;\r\nvar\r\n c: char;\r\nbegin\r\n Event.cancelBubble := true;\r\n Event.stopPropagation;\r\n Result := true;\r\n\r\n if IsKeyCharacter(Event.Key) then\r\n begin\r\n c := Chr(GetKeyCode(Event.Key, false));\r\n if Assigned(OnKeyPress) then\r\n OnKeyPress(Self, c);\r\n end;\r\nend;\r\n\r\nfunction TCustomStringGrid.HandleKeyDown(Event: TJSKeyboardEvent): boolean;\r\nvar\r\n k: Word;\r\n newcol,newrow: integer;\r\n ss: TShiftState;\r\n undef: boolean;\r\n ischar: boolean;\r\nbegin\r\n Result := true;\r\n if not Enabled then\r\n Exit;\r\n\r\n Event.cancelBubble := true;\r\n\r\n Event.StopPropagation;\r\n\r\n k := 0;\r\n ischar := false;\r\n\r\n asm\r\n undef = (Event.key == undefined);\r\n end;\r\n\r\n if (Uppercase(Event.key) = 'UNIDENTIFIED') then\r\n Exit;\r\n\r\n if not undef then\r\n begin\r\n k := GetKeyCode(Event.Key);\r\n\r\n ischar := length(Event.Key) = 1;\r\n\r\n ss := GetKeyboardEventShiftState(Event);\r\n\r\n if Assigned(OnKeyDown) then\r\n OnKeyDown(Self, k, ss);\r\n end;\r\n\r\n newrow := Row;\r\n newcol := Col;\r\n\r\n if (newrow = -1) and (newcol = -1) and (ColCount > FixedCols) and (RowCount > FixedRows) then\r\n begin\r\n newcol := FixedCols;\r\n newrow := FixedRows;\r\n Col := FixedCols;\r\n Row := FixedRows;\r\n TJSHTMLElement(FNormalCells).focus;\r\n end;\r\n\r\n //ss := GetKeyboardEventShiftState(Event);\r\n\r\n // Up, Down, PageUp, PageDn\r\n if (k in [38, 40, 33, 34]) and not ischar then\r\n begin\r\n Event.preventDefault;\r\n HideEdit;\r\n ChangeRow;\r\n end;\r\n\r\n // Home, End, Left, Right should only work when not in edit mode\r\n if not EditMode and (k in [35, 36, 37, 39]) and not ischar then\r\n begin\r\n Event.preventDefault;\r\n HideEdit;\r\n end;\r\n\r\n // ESC\r\n if (k = 27) and not ischar then\r\n begin\r\n CancelEdit;\r\n end;\r\n\r\n if not EditMode and not ischar and Event.shiftKey and not ((k >= 48) and (k <= 122)) and (goRangeSelect in Options) then\r\n begin\r\n // End\r\n if (k = 35) then\r\n begin\r\n Row := RowCount - 1;\r\n Selection := GridRect(Col, newrow, Col, Row);\r\n\r\n if Row >= TopRow + VisibleRowCount then\r\n TopRow := Row - VisibleRowCount;\r\n end;\r\n\r\n // Home\r\n if (k = 36) then\r\n begin\r\n Row := FixedRows;\r\n Selection := GridRect(Col, newrow, Col, Row);\r\n\r\n if Row < TopRow then\r\n TopRow := FixedRows;\r\n end;\r\n\r\n // arrow Up\r\n if (k = 38) and (Row > FixedRows) then\r\n begin\r\n if Row = min(Selection.Top, Selection.Bottom) then\r\n newrow := max(Selection.Top, Selection.Bottom)\r\n else\r\n newrow := min(Selection.Top, Selection.Bottom);\r\n\r\n Row := Row - 1;\r\n Selection := GridRect(Selection.Left, newrow, Selection.Right, Row);\r\n\r\n if Row < TopRow then\r\n TopRow := TopRow - 1;\r\n end;\r\n\r\n // arrow Down\r\n if (k = 40) and (Row < RowCount - 1) then\r\n begin\r\n if Row = max(Selection.Top, Selection.Bottom) then\r\n newrow := min(Selection.Top, Selection.Bottom)\r\n else\r\n newrow := max(Selection.Top, Selection.Bottom);\r\n\r\n Row := Row + 1;\r\n Selection := GridRect(Selection.Left, newrow, Selection.Right, Row);\r\n\r\n if Row > TopRow + VisibleRowCount then\r\n TopRow := TopRow + 1;\r\n end;\r\n\r\n // arrow Left\r\n if (k = 37) and (Col > FixedCols) then\r\n begin\r\n if Col = min(Selection.Left, Selection.Right) then\r\n newcol := max(Selection.Left, Selection.Right)\r\n else\r\n newcol := min(Selection.Left, Selection.Right);\r\n\r\n Col := Col - 1;\r\n Selection := GridRect(newcol, Selection.Top, Col, Selection.Bottom);\r\n\r\n if Col < LeftCol then\r\n LeftCol := LeftCol - 1;\r\n end;\r\n\r\n // arrow Right\r\n if (k = 39) and (Col < ColCount - 1) then\r\n begin\r\n if Col = max(Selection.Left, Selection.Right) then\r\n newcol := min(Selection.Left, Selection.Right)\r\n else\r\n newcol := max(Selection.Left, Selection.Right);\r\n\r\n Col := Col + 1;\r\n\r\n Selection := GridRect(newcol, Selection.Top, Col, Selection.Bottom);\r\n\r\n if Col >= LeftCol + VisibleColCount then\r\n LeftCol := LeftCol + 1;\r\n end;\r\n end\r\n else\r\n begin\r\n // End\r\n if (k = 35) and not ischar then\r\n begin\r\n newrow := RowCount - 1;\r\n end;\r\n\r\n // Home\r\n if (k = 36) and not ischar then\r\n begin\r\n newrow := FixedRows;\r\n end;\r\n\r\n // PgUp\r\n if (k = 34) and not ischar then\r\n begin\r\n if (Row + 4 <= RowCount - 1) then\r\n begin\r\n newrow := Row + 4;\r\n end\r\n else\r\n begin\r\n newrow := RowCount - 1;\r\n end;\r\n end;\r\n\r\n // PgDn\r\n if (k = 33) and not ischar then\r\n begin\r\n if Row - 4 > FixedRows then\r\n begin\r\n newrow := Row - 4\r\n end\r\n else\r\n begin\r\n newrow := FixedRows;\r\n end;\r\n end;\r\n\r\n // arrow Up\r\n if not EditMode and (k = 38) and (Row > FixedRows) and not ischar then\r\n begin\r\n newrow := Row - 1;\r\n end;\r\n\r\n // arrow Down\r\n if not EditMode and (k = 40) and (Row < RowCount - 1) and not ischar then\r\n begin\r\n newrow := Row + 1;\r\n end;\r\n\r\n // arrow Left\r\n if not EditMode and (k = 37) and (Col > FixedCols) and not ischar then\r\n begin\r\n newcol := Col - 1;\r\n end;\r\n\r\n // arrow Right\r\n if not EditMode and (k = 39) and (Col < ColCount - 1) and not ischar then\r\n begin\r\n newcol := Col + 1;\r\n end;\r\n\r\n if not EditMode and CanSelect(newcol,newrow) and not ischar then\r\n begin\r\n SelectCell(newcol,newrow);\r\n\r\n if (k = 38) and (Row < TopRow) then\r\n TopRow := TopRow - 1;\r\n\r\n if (k = 33) and (Row < TopRow) then\r\n TopRow := Row;\r\n\r\n if (k = 34) and (Row >= TopRow + VisibleRowCount) then\r\n TopRow := Row;\r\n\r\n if (k = 40) and (Row >= TopRow + VisibleRowCount) then\r\n TopRow := TopRow + 1;\r\n\r\n if (k = 37) and (Col < LeftCol) then\r\n LeftCol := LeftCol - 1;\r\n\r\n if (k = 39) and (Col >= LeftCol + VisibleColCount) then\r\n LeftCol := LeftCol + 1;\r\n\r\n if (k = 35) then\r\n TopRow := Row - VisibleRowCount;\r\n\r\n if (k = 36) then\r\n TopRow := FixedRows;\r\n end;\r\n\r\n // F2\r\n if (k = 113) and not EditMode and (goEditing in Options) and CanEditCell(Col,Row) then\r\n begin\r\n ShowEdit;\r\n end;\r\n\r\n if ((k >= 32) and (k <= 112)) and ischar and not EditMode and (goEditing in Options) and CanEditCell(Col,Row) then\r\n begin\r\n StartEdit(Event.Key);\r\n end;\r\n\r\n if (k = 13) and (goEditing in Options) and CanEditCell(Col,Row) then\r\n begin\r\n if EditMode then\r\n begin\r\n HideEdit(EditAdvance);\r\n end\r\n else\r\n ShowEdit;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TCustomStringGrid.HandleMaskExit(Sender: TObject);\r\nbegin\r\n if EditMode then\r\n HideEdit;\r\nend;\r\n\r\nprocedure TCustomStringGrid.HandleMemoExit(Sender: TObject);\r\nbegin\r\n if EditMode then\r\n HideEdit;\r\nend;\r\n\r\n\r\nprocedure TCustomStringGrid.HandleMaskKeyPress(Sender: TObject; var Key: Char);\r\nbegin\r\n if Assigned(OnKeyPress) then\r\n OnKeyPress(Self, Key);\r\n\r\n if (Ord(Key) = 27) then\r\n CancelEdit;\r\n\r\n if (Ord(Key) = 13) then\r\n HideEdit(EditAdvance);\r\nend;\r\n\r\nprocedure TCustomStringGrid.HandleMemoKeyPress(Sender: TObject; var Key: Char);\r\nbegin\r\n if Assigned(OnKeyPress) then\r\n OnKeyPress(Self, Key);\r\n\r\n if (Ord(Key) = 27) then\r\n CancelEdit;\r\nend;\r\n\r\nfunction TCustomStringGrid.HandleMouseDown(Event: TJSMouseEvent): Boolean;\r\nvar\r\n rindex, cindex: integer;\r\n l, t: Single;\r\n ss: TShiftState;\r\n mb: TMouseButton;\r\n el: TJSHTMLElement;\r\n ww: boolean;\r\nbegin\r\n Result := true;\r\n\r\n if not Enabled then\r\n Exit;\r\n\r\n mb := GetMouseEventButton(Event);\r\n\r\n if mb <> mbLeft then\r\n Exit;\r\n\r\n rindex := -1;\r\n cindex := -1;\r\n\r\n el := TJSHTMLElement(Event.target);\r\n ww := WordWrap;\r\n\r\n if ww and (Lowercase(el.tagName)= 'div') then\r\n begin\r\n el := TJSHTMLElement(el.parentElement);\r\n end;\r\n\r\n asm\r\n if (el.tagName.toLowerCase() == 'td')\r\n {\r\n cindex = el.cellIndex;\r\n var tr = el.parentElement;\r\n rindex = tr.rowIndex;\r\n }\r\n end;\r\n\r\n FSelMouseDown := el = FSelectedCell;\r\n\r\n if Assigned(FSelectedCell) and not FSelMouseDown and (cindex <> -1) and (rindex <> -1) then\r\n begin\r\n HideEdit;\r\n end;\r\n\r\n if not CanSelect(cindex + FixedCols, rindex + FixedRows) then\r\n Exit;\r\n\r\n if (cindex >= 0) and (rindex >= 0) then\r\n begin\r\n if (goRowSelect in Options) then\r\n Selection := GridRect(FixedCols, rindex + FixedRows, ColCount - 1, rindex + FixedRows)\r\n else\r\n Selection := GridRect(cindex + FixedCols, rindex + FixedRows, cindex + FixedCols, rindex + FixedRows);\r\n\r\n if (goRangeSelect in Options) then\r\n begin\r\n FStartCell.X := cindex + FixedCols;\r\n FStartCell.Y := rindex + FixedRows;\r\n end\r\n else\r\n begin\r\n FStartCell.X := -1;\r\n FStartCell.Y := -1;\r\n end;\r\n end;\r\n\r\n XYToClient(Event.clientX, Event.clientY, l, t);\r\n\r\n ss := GetMouseEventShiftState(Event);\r\n\r\n MouseDown(mb, ss, Trunc(l), Trunc(t));\r\nend;\r\n\r\nfunction TCustomStringGrid.HandleScroll(Event: TJSEvent): Boolean;\r\nbegin\r\n if FixedCols > 0 then\r\n begin\r\n FFixedCol.parentElement.scrollTop := FNormalCells.parentElement.parentElement.scrollTop;\r\n end;\r\n\r\n if FixedRows > 0 then\r\n FFixedRow.parentElement.parentElement.scrollLeft := FNormalCells.parentElement.parentElement.scrollLeft;\r\n\r\n TopLeftChanged;\r\n\r\n Result := true;\r\nend;\r\n\r\nfunction TCustomStringGrid.HandleTableBlur(Event: TJSEvent): Boolean;\r\nbegin\r\n Result := true;\r\n\r\n if Assigned(OnExit) and not EditMode then\r\n OnExit(Self);\r\nend;\r\n\r\nfunction TCustomStringGrid.HandleTableFocus(Event: TJSEvent): Boolean;\r\nbegin\r\n Result := true;\r\n if not Enabled then\r\n Exit;\r\n\r\n if Assigned(OnEnter) and not FBlockFocus then\r\n OnEnter(Self);\r\n\r\n FBlockFocus := false;\r\n\r\n if (Col = -1) and (Row = -1) and not HasSelection and (FixedCols < ColCount) and (FixedRows < RowCount) and CanSelect(FixedCols, FixedRows) then\r\n begin\r\n SelectCell(FixedCols, FixedRows);\r\n end;\r\nend;\r\n\r\nfunction TCustomStringGrid.HasButton(const ACol, ARow: integer): boolean;\r\nvar\r\n el: TJSElement;\r\nbegin\r\n Result := false;\r\n if (ACol < ColCount) and (ARow < RowCount) then\r\n begin\r\n el := GetButtonElement(ACol,ARow);\r\n Result := Assigned(el);\r\n end;\r\nend;\r\n\r\nfunction TCustomStringGrid.HasCheckBox(const ACol, ARow: integer): boolean;\r\nvar\r\n el: TJSElement;\r\nbegin\r\n Result := false;\r\n if (ACol < ColCount) and (ARow < RowCount) then\r\n begin\r\n el := GetCheckElement(ACol,ARow);\r\n Result := Assigned(el);\r\n end;\r\nend;\r\n\r\nfunction TCustomStringGrid.HasCanvas(const ACol, ARow: integer): boolean;\r\nvar\r\n el: TJSElement;\r\nbegin\r\n Result := false;\r\n if (ACol < ColCount) and (ARow < RowCount) then\r\n begin\r\n el := GetCanvasElement(ACol,ARow);\r\n Result := Assigned(el);\r\n end;\r\nend;\r\n\r\nfunction TCustomStringGrid.GetCanvas(const ACol,ARow: integer): TJSHTMLCanvasElement;\r\nvar\r\n el: TJSElement;\r\nbegin\r\n Result := nil;\r\n if (ACol < ColCount) and (ARow < RowCount) then\r\n begin\r\n el := GetCanvasElement(ACol,ARow);\r\n if Assigned(el) then\r\n Result := TJSHTMLCanvasElement(el);\r\n end;\r\nend;\r\n\r\nfunction TCustomStringGrid.HasHorzScrollBar: boolean;\r\nbegin\r\n Result := false;\r\n if Assigned(FNormalCells.parentElement) then\r\n begin\r\n Result := FNormalCells.parentElement.parentElement.clientWidth < FNormalCells.parentElement.scrollWidth;\r\n end;\r\nend;\r\n\r\nfunction TCustomStringGrid.HasProgress(const ACol, ARow: integer): boolean;\r\nvar\r\n el: TJSElement;\r\nbegin\r\n Result := false;\r\n if (ACol < ColCount) and (ARow < RowCount) then\r\n begin\r\n el := GetProgressElement(ACol,ARow);\r\n Result := Assigned(el);\r\n end;\r\nend;\r\n\r\nfunction TCustomStringGrid.HasSelection: boolean;\r\nbegin\r\n Result := not ((Selection.Left = 0) and (Selection.Top = 0) and (Selection.Right = 0) and (Selection.Bottom = 0));\r\nend;\r\n\r\nfunction TCustomStringGrid.HasSortIndicator(const ACol, ARow: integer): boolean;\r\nvar\r\n el: TJSElement;\r\n sid: string;\r\n\r\nbegin\r\n sid := Name + 'si'+ACol.ToString+'_'+ARow.ToString;\r\n\r\n el := document.getElementById(sid);\r\n\r\n Result := Assigned(el);\r\nend;\r\n\r\nfunction TCustomStringGrid.HasVertScrollBar: boolean;\r\nbegin\r\n Result := false;\r\n if Assigned(FNormalCells.parentElement) then\r\n begin\r\n Result := FNormalCells.parentElement.parentElement.clientHeight < FNormalCells.parentElement.scrollHeight;\r\n end;\r\nend;\r\n\r\nprocedure TCustomStringGrid.HideEdit(Advance: boolean = false);\r\nvar\r\n val,cval: string;\r\n eh: TJSHTMLElement;\r\n rh: integer;\r\nbegin\r\n if EditMode then\r\n begin\r\n FEditMode := false;\r\n\r\n if FEditType = geCombo then\r\n begin\r\n val := FCombo.Text;\r\n eh := FCombo.ElementHandle;\r\n end\r\n else\r\n if FEditType = geMemo then\r\n begin\r\n val := FMemo.Lines.Text;\r\n eh := FMemo.ElementHandle;\r\n end\r\n else\r\n if FEditType = geMask then\r\n begin\r\n val := FMask.Text;\r\n eh := FMask.ElementHandle;\r\n end\r\n else\r\n if FEditType = geCustom then\r\n begin\r\n GetEditControlValue(FEditCol, FEditRow, FEditControl, val);\r\n eh := FEditControl.ElementHandle;\r\n TJSHTMLElement(FSelectedCell).style.removeProperty('vertical-align');\r\n end\r\n else\r\n begin\r\n val := (FEdit as TJSHTMLInputElement).value;\r\n eh := FEdit;\r\n end;\r\n\r\n ValidateCell(FEditCol, FEditRow, val);\r\n\r\n if FSelectedCell.contains(eh) then\r\n FSelectedCell.removeChild(eh);\r\n\r\n cval := val;\r\n\r\n if WordWrap then\r\n begin\r\n rh := RowHeights[FEditRow] - 2;\r\n cval := '
'+ cval + '
';\r\n end;\r\n\r\n FSelectedCell.innerHTML := cval;\r\n\r\n UpdateCell(FEditCol, FEditRow, val);\r\n\r\n if not (goRowSelect in Options) then\r\n AddSelection(FSelectedCell);\r\n\r\n SetEditText(FEditCol, FEditRow, val);\r\n\r\n FBlockFocus := true;\r\n\r\n TJSHTMLElement(FNormalCells).focus();\r\n\r\n if Advance then\r\n begin\r\n RemoveSelection(FSelectedCell);\r\n if Col < ColCount - 1 then\r\n Col := Col + 1\r\n else\r\n begin\r\n if CanRowAdvance then\r\n begin\r\n if Row < RowCount - 1 then\r\n begin\r\n Col := FixedCols;\r\n Row := Row + 1;\r\n end\r\n else\r\n begin\r\n Col := FixedCols;\r\n Row := FixedRows;\r\n end;\r\n end\r\n else\r\n Exit;\r\n end;\r\n\r\n if CanEditCell(Col,Row) then\r\n StartEdit('');\r\n end;\r\n\r\n end;\r\nend;\r\n\r\nprocedure TCustomStringGrid.InitCSSLibrary(ALibrary: TCSSLibrary);\r\nbegin\r\n if (ALibrary = cssBootstrap) then\r\n begin\r\n ElementFont := efCSS;\r\n end;\r\nend;\r\n\r\nprocedure TCustomStringGrid.InitSample(AInitMethod: TInitMethod);\r\nvar\r\n i,j: integer;\r\nbegin\r\n for i := 0 to RowCount - 1 do\r\n begin\r\n for j := 0 to ColCount - 1 do\r\n begin\r\n case AInitMethod of\r\n imRandom:\r\n Cells[j,i] := IntToStr(Random(100));\r\n imLinear:\r\n Cells[j,i] := IntToStr(j)+':'+IntToStr(i);\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\n{$HINTS OFF}\r\nprocedure TCustomStringGrid.InsertColumn(const Index: integer);\r\nvar\r\n i,fc: integer;\r\nbegin\r\n fc := FixedCols;\r\n\r\n asm\r\n var tr;\r\n var td;\r\n end;\r\n\r\n if Index < FixedCols then\r\n begin\r\n if FixedRows > 0 then\r\n begin\r\n for i := 0 to FixedRows - 1 do\r\n begin\r\n asm\r\n tr = this.FFixedColRow.rows[i];\r\n td = tr.insertCell(Index);\r\n end;\r\n end;\r\n end;\r\n\r\n for i := 0 to RowCount - 1 - FixedRows do\r\n begin\r\n asm\r\n tr = this.FFixedCol.rows[i];\r\n td = tr.insertCell(Index);\r\n end;\r\n end;\r\n\r\n FFixedCols := FixedCols + 1;\r\n end\r\n else\r\n begin\r\n if FixedRows > 0 then\r\n begin\r\n for i := 0 to FixedRows - 1 do\r\n begin\r\n asm\r\n tr = this.FFixedRow.rows[i];\r\n td = tr.insertCell(Index - fc);\r\n end;\r\n end;\r\n end;\r\n\r\n for i := 0 to RowCount - 1 - FixedRows do\r\n begin\r\n asm\r\n tr = this.FNormalCells.rows[i];\r\n td = tr.insertCell(Index - fc);\r\n end;\r\n end;\r\n end;\r\n\r\n FColCount := FColCount + 1;\r\n\r\n for i := ColCount - 1 downto Index do\r\n begin\r\n if Index > 0 then\r\n ColWidths[i] := ColWidths[i - 1];\r\n end;\r\n\r\n ColWidths[Index] := DefaultColWidth;\r\nend;\r\n\r\nprocedure TCustomStringGrid.InsertRow(const Index: integer);\r\nvar\r\n i,fr: integer;\r\n\r\nbegin\r\n fr := FixedRows;\r\n\r\n asm\r\n var tr;\r\n var td;\r\n end;\r\n\r\n if Index < FixedRows then\r\n begin\r\n if FixedCols > 0 then\r\n begin\r\n asm\r\n tr = this.FFixedColRow.insertRow(Index-fr);\r\n td = tr.insertCell(i-1);\r\n end;\r\n\r\n for i := 0 to FixedCols - 1 do\r\n begin\r\n asm\r\n td = tr.insertCell(i-1);\r\n end;\r\n end;\r\n end;\r\n\r\n asm\r\n tr = this.FFixedRow.insertRow(Index);\r\n end;\r\n for i := FixedCols to ColCount - 1 do\r\n begin\r\n asm\r\n tr.insertCell(i-1);\r\n end;\r\n end;\r\n FFixedRows := FFixedRows + 1;\r\n end\r\n else\r\n if Index >= FixedRows then\r\n begin\r\n if FixedCols > 0 then\r\n begin\r\n asm\r\n tr = this.FFixedCol.insertRow(Index-fr);\r\n end;\r\n\r\n for i := 0 to FixedCols - 1 do\r\n begin\r\n asm\r\n td = tr.insertCell(i-1);\r\n end;\r\n end;\r\n end;\r\n\r\n asm\r\n tr = this.FNormalCells.insertRow(Index-fr);\r\n end;\r\n\r\n for i := FixedCols to ColCount - 1 do\r\n begin\r\n asm\r\n tr.insertCell(i-1);\r\n end;\r\n end;\r\n end;\r\n\r\n FRowCount := FRowCount + 1;\r\n RowHeights[Index] := DefaultRowHeight;\r\n\r\n UpdateGridSize;\r\n UpdateGridAlignment;\r\nend;\r\n\r\nfunction TCustomStringGrid.IsMergedCell(const ACol, ARow: integer; var NumCol,\r\n NumRow: integer): boolean;\r\nbegin\r\n NumCol := CellColSpan(ACol,ARow);\r\n NumRow := CellRowSpan(ACol,ARow);\r\n\r\n Result := (NumCol > 1) or (NumRow > 1);\r\nend;\r\n\r\n{$HINTS ON}\r\n\r\nprocedure TCustomStringGrid.MouseToCell(X,Y: integer; var C, R: integer);\r\nvar\r\n DocX,DocY: single;\r\n el: TJSHTMLElement;\r\n cindex,rindex: integer;\r\n frm: TCustomForm;\r\nbegin\r\n cindex := -1;\r\n rindex := -1;\r\n\r\n ClientToXY(X,Y,DocX,DocY);\r\n\r\n frm := GetParentForm(Self);\r\n if frm.Popup then\r\n begin\r\n DocX := DocX - frm.Left;\r\n DocY := DocY - frm.Top;\r\n end;\r\n\r\n el := TJSHTMLElement(document.elementFromPoint(Round(DocX),Round(DocY)));\r\n\r\n if Assigned(el) then\r\n begin\r\n asm\r\n if (el.tagName.toLowerCase() == 'td')\r\n {\r\n cindex = el.cellIndex;\r\n var tr = el.parentElement;\r\n rindex = tr.rowIndex;\r\n\r\n if (tr.parentElement.parentElement == this.FNormalCells)\r\n {\r\n rindex = rindex + this.FFixedRows;\r\n cindex = cindex + this.FFixedCols;\r\n }\r\n if (tr.parentElement.parentElement == this.FFixedCol)\r\n {\r\n rindex = rindex + this.FFixedRows;\r\n }\r\n if (tr.parentElement.parentElement == this.FFixedRow)\r\n {\r\n cindex = cindex + this.FFixedCols;\r\n }\r\n }\r\n end;\r\n\r\n end;\r\n R := rindex;\r\n C := cindex;\r\nend;\r\n\r\nprocedure TCustomStringGrid.SaveToStrings(AStrings: TStrings; Delimiter: char = ';'; SaveFixed: boolean = false);\r\nvar\r\n r,c: integer;\r\n fr,fc: integer;\r\n s,rowstr: string;\r\nbegin\r\n fr := 0;\r\n fc := 0;\r\n if not SaveFixed then\r\n fc := FixedCols;\r\n\r\n if not SaveFixed then\r\n fr := FixedRows;\r\n\r\n for r := fr to RowCount - 1 do\r\n begin\r\n rowstr := '';\r\n for c := fc to ColCount - 1 do\r\n begin\r\n s := Cells[c,r];\r\n s := stringreplace(s,'\"','\"\"',[rfReplaceAll]);\r\n\r\n if (pos(Delimiter,s) > 0) or (pos(#13, s) > 0) then\r\n begin\r\n s := '\"' + s + '\"';\r\n end;\r\n\r\n if s = '' then\r\n s := '\"\"';\r\n\r\n if rowstr = '' then\r\n rowstr := s\r\n else\r\n rowstr := rowstr + Delimiter + s;\r\n end;\r\n AStrings.Add(rowstr);\r\n end;\r\nend;\r\n\r\nprocedure TCustomStringGrid.SaveToCSV(const AFileName: string; Delimiter: char = ';'; SaveFixed: boolean = false);\r\nvar\r\n sl: TStringList;\r\nbegin\r\n sl := TStringList.Create;\r\n try\r\n SaveToStrings(sl, Delimiter, SaveFixed);\r\n sl.SaveToFile(AFileName);\r\n finally\r\n sl.Free;\r\n end;\r\nend;\r\n\r\n\r\nprocedure TCustomStringGrid.LoadFromCSV(const AURL: string; Delimiter: char = ';'; LoadFixed: boolean = false);\r\nbegin\r\n FDelimiter := Delimiter;\r\n FLoadFixed := LoadFixed;\r\n\r\n FReq := TJSXMLHttpRequest.new;\r\n FReq.addEventListener('load',@DoHttpLoadCsv);\r\n FReq.addEventListener('abort',@DoHttpAbort);\r\n FReq.open('GET', AURL);\r\n DoHttpRequest(FReq);\r\n FReq.send;\r\nend;\r\n\r\nfunction TCustomStringGrid.LoadFromCSVAsync(const AURL: string; Delimiter: char = ';'; LoadFixed: boolean = false): TJSPromise;\r\nbegin\r\n Result := TJSPromise.new(\r\n procedure(ASuccess, AFailed: TJSPromiseResolver)\r\n\r\n function DoLoad(Event: TEventListenerEvent): boolean;\r\n begin\r\n if DoHttpLoadCsv(Event) then\r\n ASuccess(TJSXMLHttpRequest(Event.target))\r\n else\r\n AFailed(TJSXMLHttpRequest(Event.target));\r\n Result := true;\r\n end;\r\n\r\n function DoError(Event: TEventListenerEvent): boolean;\r\n begin\r\n AFailed(TJSXMLHttpRequest(Event.target));\r\n Result := true;\r\n end;\r\n\r\n begin\r\n FDelimiter := Delimiter;\r\n FLoadFixed := LoadFixed;\r\n FReq := TJSXMLHttpRequest.new;\r\n FReq.addEventListener('load',@DoLoad);\r\n FReq.addEventListener('abort',@DoError);\r\n FReq.addEventListener('timeout',@DoError);\r\n FReq.addEventListener('error',@DoError);\r\n\r\n FReq.open('GET', AURL);\r\n DoHttpRequest(FReq);\r\n FReq.send;\r\n end);\r\n\r\nend;\r\n\r\nprocedure TCustomStringGrid.LoadFromJSON(const AURL: string; ADataNode: string = '');\r\nbegin\r\n FDataNode := ADataNode;\r\n FReq := TJSXMLHttpRequest.new;\r\n FReq.addEventListener('load',@DoHttpLoadJson);\r\n FReq.addEventListener('abort',@DoHttpAbort);\r\n FReq.open('GET', AURL);\r\n DoHttpRequest(FReq);\r\n FReq.send;\r\nend;\r\n\r\n{$HINTS OFF}\r\nprocedure TCustomStringGrid.MergeCells(const ACol, ARow, NumCol,\r\n NumRow: integer);\r\nvar\r\n i: integer;\r\n j: integer;\r\n el,mel: TJSHTMLElement;\r\n cw: integer;\r\nbegin\r\n FHasMergedCells := true;\r\n mel := CellRealElement(ACol,ARow);\r\n\r\n for i := NumCol downto 1 do\r\n begin\r\n for j := NumRow downto 1 do\r\n begin\r\n if (i>1) or (j>1) then\r\n begin\r\n el := CellRealElement(ACol + i - 1,ARow + j - 1);\r\n asm\r\n el.remove();\r\n end;\r\n end;\r\n end;\r\n end;\r\n\r\n if NumCol > 1 then\r\n mel['colspan'] := NumCol.ToString;\r\n if NumRow > 1 then\r\n mel['rowspan'] := NumRow.ToString;\r\n\r\n if ARow in [0,1] then\r\n begin\r\n cw := 0;\r\n for i := ACol to ACol + NumCol - 1 do\r\n begin\r\n cw := cw + ColWidths[i] - CELLPADDING;\r\n if ((ARow = 0) and (goFixedVertLine in Options)) or\r\n ((ARow = 1) and (goVertLine in Options)) then\r\n if NumCol > 1 then\r\n inc(cw);\r\n end;\r\n\r\n mel.style.setProperty('width', cw.ToString+'px');\r\n mel.style.setProperty('max-width', cw.ToString+'px');\r\n end;\r\nend;\r\n{$HINTS ON}\r\n\r\nprocedure TCustomStringGrid.SplitCells(const ACol, ARow: integer);\r\nvar\r\n el,td,split: TJSElement;\r\n i,j,NumRow,NumCol: integer;\r\nbegin\r\n if IsMergedCell(ACol,ARow, NumCol,NumRow) then\r\n begin\r\n split := CellRealElement(ACol,ARow);\r\n\r\n for i := 1 to Max(1,NumRow) do\r\n begin\r\n el := CellRealElement(ACol + NumCol,ARow + i - 1);\r\n\r\n for j := 1 to Max(1,NumCol) do\r\n begin\r\n if (j = 1) and (i = 1) then\r\n Continue;\r\n td := document.createElement('TD');\r\n el.parentNode.InsertBefore(td,el);\r\n end;\r\n end;\r\n\r\n split['colspan'] := '';\r\n split['rowspan'] := '';\r\n\r\n if ARow = 0 then\r\n begin\r\n for i := ACol to ACol + NumCol - 1 do\r\n ColWidths[i] := ColWidths[i];\r\n end;\r\n end;\r\nend;\r\n\r\n\r\nprocedure TCustomStringGrid.MouseMove(Shift: TShiftState; X, Y: Integer);\r\nbegin\r\n inherited;\r\n if (FStartCell.X <> -1) and (FStartCell.Y <> -1) then\r\n begin\r\n if (Y > Height - 10) then\r\n begin\r\n TopRow := TopRow + 1;\r\n Selection := GridRect(Selection.Left, min(Selection.Top, Selection.Bottom), Selection.Right, max(Selection.Top, Selection.Bottom) + 1);\r\n end;\r\n\r\n if (FixedRows > 0) and (Y < RowHeights[0]) and (TopRow > FixedRows) then\r\n begin\r\n TopRow := TopRow - 1;\r\n Selection := GridRect(Selection.Left, min(Selection.Top, Selection.Bottom) - 1, Selection.Right, max(Selection.Top, Selection.Bottom));\r\n end;\r\n\r\n if (X > Width - 10) then\r\n begin\r\n LeftCol := LeftCol + 1;\r\n Selection := GridRect(min(Selection.Left, Selection.Right), Selection.Top, max(Selection.Left, Selection.Right) + 1, Selection.Bottom);\r\n end;\r\n\r\n if (FixedCols > 0) and (X < ColWidths[0]) and (LeftCol > FixedCols) then\r\n begin\r\n LeftCol := LeftCol - 1;\r\n Selection := GridRect(min(Selection.Left, Selection.Right) - 1, Selection.Top, max(Selection.Left, Selection.Right), Selection.Bottom);\r\n end;\r\n\r\n end;\r\nend;\r\n\r\nfunction TCustomStringGrid.NormalColWidth: integer;\r\nvar\r\n i: integer;\r\nbegin\r\n Result := 1;\r\n\r\n for i := FixedCols to ColCount - 1 do\r\n Result := Result + ColWidths[i] + 1 - CELLPADDING;\r\nend;\r\n\r\nfunction TCustomStringGrid.NormalRowHeight: integer;\r\nvar\r\n i: integer;\r\nbegin\r\n Result := 0;\r\n\r\n for i := FixedRows to RowCount - 1 do\r\n Result := Result + RowHeights[i];\r\nend;\r\n\r\n\r\n{$HINTS OFF}\r\nprocedure TCustomStringGrid.RemoveButton(const ACol, ARow: integer);\r\nvar\r\n el: TJSElement;\r\nbegin\r\n if (ACol < ColCount) and (ARow < RowCount) then\r\n begin\r\n el := GetButtonElement(ACol,ARow);\r\n if Assigned(el) then\r\n begin\r\n el.removeEventListener('click',FHandleCheckClickPtr);\r\n asm\r\n el.remove();\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TCustomStringGrid.RemoveCanvas(const ACol, ARow: integer);\r\nvar\r\n el: TJSElement;\r\nbegin\r\n if (ACol < ColCount) and (ARow < RowCount) then\r\n begin\r\n el := GetCanvasElement(ACol,ARow);\r\n if Assigned(el) then\r\n begin\r\n asm\r\n el.remove();\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\n\r\nprocedure TCustomStringGrid.RemoveCheckBox(const ACol, ARow: integer);\r\nvar\r\n el: TJSElement;\r\nbegin\r\n if (ACol < ColCount) and (ARow < RowCount) then\r\n begin\r\n el := GetCheckElement(ACol,ARow);\r\n if Assigned(el) then\r\n begin\r\n el.removeEventListener('click',FHandleCheckClickPtr);\r\n asm\r\n el.remove();\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TCustomStringGrid.RemoveColumn(const Index: integer);\r\nvar\r\n i,fc: integer;\r\nbegin\r\n fc := FixedCols;\r\n\r\n asm\r\n var tr;\r\n var td;\r\n end;\r\n\r\n if Index < FixedCols then\r\n begin\r\n if FixedRows > 0 then\r\n begin\r\n for i := 0 to FixedRows - 1 do\r\n begin\r\n asm\r\n tr = this.FFixedColRow.rows[i];\r\n td = tr.deleteCell(Index);\r\n end;\r\n end;\r\n end;\r\n\r\n for i := 0 to RowCount - 1 - FixedRows do\r\n begin\r\n asm\r\n tr = this.FFixedCol.rows[i];\r\n td = tr.deleteCell(Index);\r\n end;\r\n end;\r\n\r\n FFixedCols := FixedCols - 1;\r\n end\r\n else\r\n begin\r\n if FixedRows > 0 then\r\n begin\r\n for i := 0 to FixedRows - 1 do\r\n begin\r\n asm\r\n tr = this.FFixedRow.rows[i];\r\n td = tr.deleteCell(Index - fc);\r\n end;\r\n end;\r\n end;\r\n\r\n for i := 0 to RowCount - 1 - FixedRows do\r\n begin\r\n asm\r\n tr = this.FNormalCells.rows[i];\r\n td = tr.deleteCell(Index - fc);\r\n end;\r\n end;\r\n end;\r\n\r\n FColCount := FColCount - 1;\r\n\r\n for i := Index to ColCount - 1 do\r\n begin\r\n ColWidths[i] := ColWidths[i + 1];\r\n end;\r\nend;\r\n\r\nprocedure TCustomStringGrid.RemoveProgress(const ACol, ARow: integer);\r\nvar\r\n el: TJSElement;\r\nbegin\r\n if (ACol < ColCount) and (ARow < RowCount) then\r\n begin\r\n el := GetProgressElement(ACol,ARow);\r\n asm\r\n el.remove();\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TCustomStringGrid.RemoveRow(const Index: integer);\r\nvar\r\n td,tr: TJSHTMLElement;\r\n fr: integer;\r\n i: integer;\r\nbegin\r\n if Index >= RowCount then\r\n raise Exception.Create('Invalid row index');\r\n\r\n fr := FFixedRows;\r\n\r\n if Index < FixedRows then\r\n begin\r\n if FixedCols > 0 then\r\n begin\r\n asm\r\n this.FFixedColRow.deleteRow(Index);\r\n end;\r\n end;\r\n\r\n asm\r\n this.FFixedRow.deleteRow(Index);\r\n end;\r\n\r\n end\r\n else\r\n begin\r\n if FixedCols > 0 then\r\n begin\r\n asm\r\n this.FFixedCol.deleteRow(Index -fr);\r\n end;\r\n end;\r\n\r\n asm\r\n this.FNormalCells.deleteRow(Index - fr);\r\n end;\r\n end;\r\n\r\n if FRowHeights.Count = RowCount then\r\n FRowHeights.Delete(Index);\r\n\r\n FRowCount := FRowCount - 1;\r\n\r\n RowHeights[0] := RowHeights[0];\r\n\r\n UpdateGridSize;\r\n UpdateGridAlignment;\r\nend;\r\n\r\nprocedure TCustomStringGrid.RemoveSelection(ACell: TJSElement);\r\nbegin\r\n if ShowSelection then\r\n ACell.classlist.remove('selected');\r\nend;\r\n\r\nprocedure TCustomStringGrid.RemoveSortIndicator(const ACol, ARow: integer);\r\nvar\r\n el: TJSElement;\r\n sid: string;\r\n\r\nbegin\r\n sid := Name + 'si'+ACol.ToString+'_'+ARow.ToString;\r\n\r\n el := document.getElementById(sid);\r\n\r\n if Assigned(el) then\r\n el.parentElement.removeChild(el);\r\nend;\r\n\r\nprocedure TCustomStringGrid.RenderGrid;\r\nvar\r\n res: TJSHTMLElement;\r\n i,j,k,fw,fh,nw,nh,nwvis,nhvis,nwvisnoscroll,nhvisnoscroll: integer;\r\n tr, td, span, cellspan: TJSElement;\r\n fixcol,fixtxtcol: string;\r\n dynstyle: string;\r\n vscroll,hscroll: boolean;\r\n LAutoSizeW, LAutoSizeH: boolean;\r\n ControlName: string;\r\nbegin\r\n while FColWidths.Count <= ColCount do\r\n FColWidths.Add(DefaultColWidth);\r\n\r\n if FOrigID = '' then\r\n begin\r\n FOrigID := GetID;\r\n if FOrigID = '' then\r\n FOrigID := Name;\r\n end;\r\n\r\n if not Assigned(FGrid) then\r\n begin\r\n if IsLinked and Assigned(ElementHandle.firstElementChild) then\r\n begin\r\n res := TJSHTMLElement(ElementHandle.firstElementChild);\r\n end\r\n else\r\n res := TJSHTMLElement(document.createElement('TABLE'));\r\n\r\n res.setAttribute('id', FOrigID + 'tbl');\r\n\r\n if ElementTableClassName = '' then\r\n begin\r\n res.setAttribute('class','table.' + StylePrefix + Name);\r\n res.style.setProperty('border-collapse','collapse');\r\n res.style.setProperty('border-spacing','0px');\r\n res.style.setProperty('border','0px');\r\n end\r\n else\r\n res.setAttribute('class',ElementTableClassName);\r\n\r\n FGrid := res;\r\n\r\n SetHTMLElementFont(res, Font, not ((ElementClassName = '') and (ElementFont = efProperty)) );\r\n\r\n AddInstanceStyle(StylePrefix + FOrigID, GetGridCSS(FOrigID + 'tbl'));\r\n end\r\n else\r\n Exit;\r\n\r\n LAutoSizeW := WidthStyle = ssAuto;\r\n LAutoSizeH := HeightStyle = ssAuto;\r\n ControlName := FOrigID + 'tbl';\r\n\r\n asm\r\n var td = undefined;\r\n var tr = undefined;\r\n var span = undefined;\r\n var cellspan = undefined;\r\n this.FFixedColRow = document.createElement('TABLE');\r\n this.FFixedColRow.setAttribute('id', ControlName + 'ResizeFixedRowTable');\r\n this.FFixedColRow.style.setProperty('border-collapse','collapse');\r\n this.FFixedColRow.style.setProperty('border-spacing','0px');\r\n\r\n this.FFixedCol = document.createElement('TABLE');\r\n this.FFixedCol.setAttribute('id', ControlName + 'ResizeFixedColTable');\r\n this.FFixedCol.style.setProperty('border-collapse','collapse');\r\n this.FFixedCol.style.setProperty('border-spacing','0px');\r\n\r\n this.FFixedRow = document.createElement('TABLE');\r\n this.FFixedRow.setAttribute('id', ControlName + 'ResizeRowTable');\r\n this.FFixedRow.style.setProperty('border-collapse','collapse');\r\n this.FFixedRow.style.setProperty('border-spacing','0px');\r\n this.FFixedRow.style.setProperty('border','0px');\r\n\r\n this.FNormalCells = document.createElement('TABLE');\r\n this.FNormalCells.setAttribute('id', ControlName + 'NormalCellTable');\r\n this.FNormalCells.style.setProperty('border-collapse','collapse');\r\n this.FNormalCells.style.setProperty('border-spacing','0px');\r\n end;\r\n\r\n // make normal grid cells focusable\r\n FNormalCells.setAttribute('tabindex',IntToStr(TabOrder));\r\n TJSHTMLElement(FNormalCells).style.setProperty('outline','none');\r\n FNormalCells.addEventListener('click',FHandleClickPtr);\r\n FNormalCells.addEventListener('mousedown',FHandleMouseDownPtr);\r\n FNormalCells.addEventListener('mousemove',FHandleMouseMovePtr);\r\n FNormalCells.addEventListener('mouseup',FHandleMouseUpPtr);\r\n\r\n FFixedCol.addEventListener('click',FHandleFixedClickPtr);\r\n FFixedRow.addEventListener('click',FHandleFixedClickPtr);\r\n FFixedColRow.addEventListener('click',FHandleFixedClickPtr);\r\n\r\n ElementHandle.appendChild(res);\r\n\r\n fw := FixedColWidth;\r\n fh := FixedRowHeight;\r\n\r\n nw := NormalColWidth;\r\n nh := NormalRowHeight;\r\n\r\n nwvis := Width - FixedColWidth;\r\n nhvis := Height - FixedRowHeight;\r\n\r\n if BorderStyle = bsSingle then\r\n begin\r\n nwvis := nwvis - 2;\r\n nhvis := nhvis - 2;\r\n end;\r\n\r\n nwvisnoscroll := nwvis - GetScrollBarWidth;\r\n\r\n if FixedColWidth + NormalColWidth < Width then\r\n nhvisnoscroll := nhvis\r\n else\r\n nhvisnoscroll := nhvis - GetScrollBarHeight;\r\n\r\n if FFixedColor <> clNone then\r\n fixcol := ColorToHTML(FFixedColor);\r\n if FixedTextColor <> clNone then\r\n fixtxtcol := ColorToHTML(FixedTextColor);\r\n\r\n // insert the main four grid cells\r\n asm\r\n tr = res.insertRow(0);\r\n td = tr.insertCell(0);\r\n td.style.border = \"0px\";\r\n td = tr.insertCell(1);\r\n td.style.border = \"0px\";\r\n tr = res.insertRow(1);\r\n td = tr.insertCell(0);\r\n td.style.border = \"0px\";\r\n td = tr.insertCell(1);\r\n td.style.border = \"0px\";\r\n end;\r\n\r\n // fill fixedrow cells\r\n if FixedRows > 0 then\r\n begin\r\n k := 0;\r\n\r\n // fixedcol/fixedrow\r\n if FixedCols > 0 then\r\n begin\r\n k := 1;\r\n asm\r\n td = res.rows[0].cells[0];\r\n span = document.createElement('DIV');\r\n// span.style.width = fw + \"px\";\r\n span.style.height = fh + \"px\";\r\n span.style.overflow = \"hidden\";\r\n span.style.backgroundColor = fixcol;\r\n span.style.color = fixtxtcol;\r\n td.appendChild(span);\r\n span.appendChild(this.FFixedColRow);\r\n end;\r\n end\r\n else\r\n begin\r\n asm\r\n td = res.rows[0].cells[0];\r\n td.style.border = \"0px\";\r\n td = res.rows[1].cells[0];\r\n td.style.border = \"0px\";\r\n end;\r\n\r\n end;\r\n\r\n //\r\n asm\r\n td = res.rows[0].cells[1];\r\n td.style.backgroundColor = fixcol;\r\n td.style.color = fixtxtcol;\r\n\r\n span = document.createElement('DIV');\r\n span.style.height = fh + \"px\";\r\n if (!LAutoSizeW) {\r\n span.style.width = nwvis + \"px\";\r\n }\r\n\r\n span.style.overflow = \"hidden\";\r\n span.style.backgroundColor = fixcol;\r\n span.style.color = fixtxtcol;\r\n\r\n td.appendChild(span);\r\n\r\n cellspan = document.createElement('DIV');\r\n cellspan.style.height = fh + \"px\";\r\n if (!LAutoSizeW) {\r\n cellspan.style.width = nw + \"px\";\r\n }\r\n\r\n span.appendChild(cellspan);\r\n cellspan.appendChild(this.FFixedRow);\r\n end;\r\n\r\n if (FixedCols > 0) then\r\n begin\r\n for i := 0 to FixedRows - 1 do\r\n begin\r\n asm\r\n tr = this.FFixedColRow.insertRow(i);\r\n end;\r\n\r\n for j := 0 to FixedCols - 1 do\r\n begin\r\n asm\r\n td = tr.insertCell(j);\r\n td.setAttribute('class','fixed');\r\n end;\r\n\r\n SetAlignAttr(ColAlignments[j], td);\r\n end;\r\n end;\r\n end;\r\n\r\n // fill top cell\r\n for i := 0 to FixedRows - 1 do\r\n begin\r\n asm\r\n tr = this.FFixedRow.insertRow(i);\r\n end;\r\n\r\n for j := FixedCols to ColCount - 1 do\r\n begin\r\n k := j - FixedCols;\r\n asm\r\n td = tr.insertCell(k);\r\n td.setAttribute('class','fixed');\r\n end;\r\n\r\n SetAlignAttr(ColAlignments[j], td);\r\n end;\r\n end;\r\n end;\r\n\r\n k := 0;\r\n\r\n // fill left cell\r\n if FixedCols > 0 then\r\n begin\r\n k := 1;\r\n asm\r\n //tr = res.insertRow(res.rows.length);\r\n //td = tr.insertCell(0);\r\n\r\n td = res.rows[1].cells[0];\r\n\r\n td.style.backgroundColor = fixcol;\r\n td.style.color = fixtxtcol;\r\n td.setAttribute('class','fixed');\r\n\r\n span = document.createElement('DIV');\r\n if (!LAutoSizeW) {\r\n //span.style.width = fw + \"px\";\r\n }\r\n span.style.height = nhvisnoscroll + \"px\";\r\n span.style.overflow = \"hidden\";\r\n span.style.backgroundColor = fixcol;\r\n span.style.color = fixtxtcol;\r\n\r\n td.setAttribute('valign','top');\r\n\r\n td.appendChild(span);\r\n span.appendChild(this.FFixedCol);\r\n\r\n end;\r\n\r\n SetAlignAttr(ColAlignments[0], td);\r\n\r\n for i := FixedRows to RowCount - 1 do\r\n begin\r\n j := i - FixedRows;\r\n asm\r\n tr = this.FFixedCol.insertRow(j);\r\n end;\r\n\r\n for j := 0 to FixedCols - 1 do\r\n begin\r\n asm\r\n td = tr.insertCell(j);\r\n td.setAttribute('class','fixed');\r\n end;\r\n\r\n SetAlignAttr(ColAlignments[j], td);\r\n\r\n //TJSHTMLElement(td).innerHTML := inttostr(j)+':'+inttostr(i);\r\n end;\r\n end;\r\n end;\r\n\r\n if FixedCols = 0 then\r\n begin\r\n asm\r\n //tr = res.insertRow(res.rows.length);\r\n //td = tr.insertCell(0);\r\n td = res.rows[1].cells[1];\r\n end\r\n end\r\n else\r\n begin\r\n asm\r\n //tr = res.rows[1];\r\n //td = tr.insertCell(1);\r\n td = res.rows[1].cells[1];\r\n end;\r\n end;\r\n\r\n vscroll := ((ssVertical = ScrollBars) or (ssBoth = ScrollBars));\r\n hscroll := ((ssHorizontal = ScrollBars) or (ssBoth = ScrollBars));\r\n\r\n asm\r\n span = document.createElement('DIV');\r\n // span.style.backgroundColor = \"#FFFFFF\";\r\n\r\n if (vscroll) {\r\n span.style.overflowY = \"auto\";\r\n }\r\n else\r\n {\r\n span.style.overflowY = \"hidden\";\r\n }\r\n\r\n if (hscroll) {\r\n span.style.overflowX = \"auto\";\r\n }\r\n else {\r\n span.style.overflowX = \"hidden\";\r\n }\r\n\r\n if (!LAutoSizeW) {\r\n span.style.width = nwvis + \"px\";\r\n }\r\n\r\n if (LAutoSizeH) {\r\n span.style.overflow = \"\";\r\n }\r\n\r\n span.style.height = nhvis + \"px\";\r\n td.appendChild(span);\r\n\r\n cellspan = document.createElement('DIV');\r\n if (!LAutoSizeW) {\r\n cellspan.style.width = nw + \"px\"; }\r\n cellspan.style.height = nh + \"px\";\r\n span.parentElement.style.verticalAlign = \"top\";\r\n span.appendChild(cellspan);\r\n cellspan.appendChild(this.FNormalCells);\r\n end;\r\n\r\n span.addEventListener('scroll',@HandleScroll);\r\n\r\n for i := FixedRows to RowCount - 1 do\r\n begin\r\n k := i - FixedRows;\r\n asm\r\n tr = this.FNormalCells.insertRow(k);\r\n end;\r\n\r\n for j := FixedCols to ColCount - 1 do\r\n begin\r\n k := j - FixedCols;\r\n\r\n asm\r\n td = tr.insertCell(k);\r\n end;\r\n\r\n SetAlignAttr(ColAlignments[j], td);\r\n end;\r\n end;\r\n\r\n FNormalCells.parentElement.parentElement.addEventListener('keydown',@HandleKeydown);\r\n FNormalCells.addEventListener('focus',FHandleFocusPtr);\r\n FNormalCells.addEventListener('blur',FHandleBlurPtr);\r\n\r\n EnableColResize;\r\n\r\n if DragMode = dmAutomatic then\r\n EnableDrag;\r\nend;\r\n\r\nprocedure TCustomStringGrid.RenderGridScript;\r\nbegin\r\n AddControlScriptSource(\r\n 'var TMSStringGridpageX,TMSStringGridcurCol,TMSStringGridnxtCol,TMSStringGridcurColWidth,TMSStringGridnxtColWidth,TMSStringGridautoWidth,GridNormalCells,GridFixedCells,GridFixedColCells,GridFixedColRows,GridColWidths,GridFixedCols,TMSStringGridCurID;'+\r\n 'var TMSStringGridTable,TMSStringGridcurTableWidth,TMSStringGridID,TMSStringGridFullWidth,TMSGridLastColSize;'+\r\n 'TMSStringGridautoWidth = false;'+\r\n 'TMSStringGridCurID = \"\";'+\r\n 'ResizeMainGrid = true;'+\r\n\r\n 'function TMSStringGridupdateColSize(Cells, Col) {'+\r\n ' if (Cells){'+\r\n ' for (i = 0; i < Cells.rows.length; i++){'+\r\n ' td = Cells.rows[i].cells[Col.cellIndex];'+\r\n ' td.style.position = \"relative\";'+\r\n ' td.style.width = Col.style.width;'+\r\n ' td.style.maxWidth = Col.style.width;'+\r\n ' }'+\r\n ' }'+\r\n '}'+\r\n\r\n 'function TMSStringGridresizeColumn(e) {'+\r\n ' if ((TMSStringGridcurCol) && (TMSStringGridCurID.indexOf(TMSStringGridID) == 0)) {'+\r\n\r\n ' var diffX = e.pageX - TMSStringGridpageX;'+\r\n\r\n ' newColWidth = (TMSStringGridcurColWidth + diffX);'+\r\n ' if (newColWidth < 10)'+\r\n ' newColWidth = 10;'+\r\n\r\n ' if (TMSStringGridCurID.indexOf(\"ResizeRow\") > 0) {'+\r\n //resize normal columns\r\n '\t TMSStringGridcurCol.style.width = newColWidth + \"px\";'+\r\n '\t TMSStringGridcurCol.style.maxWidth = TMSStringGridcurCol.style.width;'+\r\n ' GridColWidths.Put(TMSStringGridcurCol.cellIndex + GridFixedCols, parseInt(TMSStringGridcurCol.style.width));'+\r\n ' TMSStringGridupdateColSize(GridFixedCells, TMSStringGridcurCol);'+\r\n ' TMSStringGridupdateColSize(GridNormalCells, TMSStringGridcurCol);'+\r\n\r\n ' TMSStringGridcurTable.style.width = (TMSStringGridcurTableWidth + diffX) + \"px\";'+\r\n ' GridNormalCells.style.width = (TMSStringGridcurTableWidth + diffX) + \"px\";'+\r\n ' } else {'+\r\n //resize fixed columns\r\n ' TMSStringGridfullWidth = document.getElementById(TMSStringGridID).offsetWidth;'+\r\n ' newCellsWidth = (TMSStringGridfullWidth - (TMSStringGridcurTableWidth + diffX));'+\r\n\r\n ' if ((newCellsWidth > 10) && (newColWidth > 10)) {'+\r\n '\t TMSStringGridcurCol.style.width = newColWidth + \"px\";'+\r\n '\t TMSStringGridcurCol.style.maxWidth = TMSStringGridcurCol.style.width;'+\r\n ' TMSStringGridupdateColSize(GridFixedColRows, TMSStringGridcurCol);'+\r\n ' TMSStringGridupdateColSize(GridFixedColCells, TMSStringGridcurCol);'+\r\n ' GridColWidths.Put(TMSStringGridcurCol.cellIndex, parseInt(TMSStringGridcurCol.style.width));'+\r\n ' TMSStringGridcurTable.style.width = (TMSStringGridcurTableWidth + diffX) + \"px\";'+\r\n ' GridFixedColCells.style.width = (TMSStringGridcurTableWidth + diffX) + \"px\";'+\r\n\r\n ' if ((!TMSStringGridautoWidth) && (newColWidth > 10)){' +\r\n ' GridFixedCells.parentElement.style.width = newCellsWidth + \"px\";'+\r\n ' GridFixedCells.parentElement.parentElement.style.width = newCellsWidth + \"px\";'+\r\n\r\n ' GridNormalCells.parentElement.style.width = newCellsWidth + \"px\";'+\r\n ' GridNormalCells.parentElement.parentElement.style.width = newCellsWidth + \"px\";'+\r\n ' }'+\r\n ' }'+\r\n ' }'+\r\n ' }'+\r\n ' }'+\r\n\r\n 'function TMSStringGridisSizing() {'+\r\n ' if ((TMSStringGridcurCol) && (TMSStringGridCurID.indexOf(TMSStringGridID) == 0))'+\r\n ' {' +\r\n ' if (TMSStringGridCurID.indexOf(\"ResizeRow\") > 0)'+\r\n ' {' +\r\n ' return(TMSStringGridcurCol.cellIndex + GridFixedCols)'+\r\n ' }' +\r\n ' else'+\r\n ' {' +\r\n ' return(TMSStringGridcurCol.cellIndex)'+\r\n ' }' +\r\n ' }'+\r\n ' else { return -1; }'+\r\n ' }' +\r\n\r\n 'function TMSStringGridresetResize() {'+\r\n ' TMSStringGridID = \"\";'+\r\n ' TMSStringGridFullWidth = undefined;'+\r\n ' TMSStringGridCurID = \"\";'+\r\n ' TMSStringGridcurCol = undefined;'+\r\n ' TMSStringGridnxtCol = undefined;'+\r\n ' TMSStringGridpageX = undefined;'+\r\n ' TMSStringGridnxtColWidth = undefined;'+\r\n ' TMSStringGridcurColWidth = undefined;'+\r\n ' TMSStringGridautoWidth = false;'+\r\n ' GridFixedCells = undefined;'+\r\n ' GridFixedColCells = undefined;'+\r\n ' GridFixedColRows = undefined;'+\r\n ' GridNormalCells = undefined;'+\r\n ' GridColWidths = undefined;'+\r\n ' GridFixedCols = undefined;'+\r\n ' }'+\r\n\r\n ' function divmousedown(e) {'+\r\n ' TMSStringGridCurID = e.target.id;'+\r\n ' TMSStringGridcurCol = e.target.parentElement;'+\r\n ' TMSStringGridnxtCol = TMSStringGridcurCol.nextElementSibling;'+\r\n ' TMSStringGridpageX = e.pageX;'+\r\n\r\n ' TMSStringGridcurTable = TMSStringGridcurCol.parentElement.parentElement.parentElement;'+\r\n ' TMSStringGridcurTableWidth = TMSStringGridcurTable.offsetWidth;'+\r\n\r\n ' TMSStringGridcurColWidth = TMSStringGridcurCol.offsetWidth;'+\r\n ' if (TMSStringGridnxtCol)'+\r\n ' TMSStringGridnxtColWidth = TMSStringGridnxtCol.offsetWidth;'+\r\n ' }'+#13#10+\r\n ' function divmouseover(e) {'+\r\n ' e.target.style.borderRight = \"2px solid #0000ff\";}'+#13#10+\r\n\r\n ' function divmouseout(e) {'+\r\n ' e.target.style.borderRight = \"\";}'+#13#10+\r\n\r\n ' function divmouseup(e) {'+\r\n ' TMSGridLastColSize = TMSStringGridisSizing();'+#13#10+\r\n ' TMSStringGridresetResize();}'+#13#10+\r\n\r\n 'function TMSStringGridresizableGrid(tablename, enabled) {'+\r\n ' var table = document.getElementById(tablename + \"Table\");'+\r\n ' if (!table) return;' +\r\n ' var row = table.getElementsByTagName(\"tr\")[0],'+\r\n ' cols = row ? row.children : undefined;'+\r\n ' if (!cols) return;'+\r\n ' for (var i=0;i 0) and (WidthStyle = ssAbsolute) then\r\n begin\r\n asm\r\n var td = this.FGrid.rows[0].cells[1];\r\n if (td!=null) {\r\n var span = td.firstChild;\r\n span.style.width = nwvisnoscroll + \"px\";\r\n span.style.overflow = \"hidden\";\r\n }\r\n end;\r\n end;\r\n\r\n if (FixedCols > 0) and (HeightStyle = ssAbsolute) then\r\n begin\r\n asm\r\n var td = this.FGrid.rows[1].cells[0];\r\n if (td!=null) {\r\n var span = td.firstChild;\r\n span.style.height = nhvisnoscroll + \"px\";\r\n span.style.overflow = \"hidden\";\r\n }\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TCustomStringGrid.Resize;\r\nbegin\r\n inherited;\r\n RenderGridSize;\r\nend;\r\n\r\nprocedure TCustomStringGrid.RowCountChanged(delta: integer);\r\nvar\r\n r: integer;\r\n fr,fc: integer;\r\n nh: integer;\r\n\r\n procedure SetColAlign(column: integer; td: TJSHTMLElement);\r\n begin\r\n SetAlignAttr(ColAlignments[column], td);\r\n end;\r\n\r\nbegin\r\n if IsUpdating and (csLoading in ComponentState) then\r\n Exit;\r\n\r\n if not Assigned(FNormalCells) then\r\n Exit;\r\n\r\n fr := FixedRows;\r\n fc := FixedCols;\r\n\r\n nh := NormalRowHeight;\r\n\r\n if (1 < 0) then // to avoid issue with pas2js code optimization\r\n SetColAlign(0,nil);\r\n\r\n\r\n if delta > 0 then\r\n begin\r\n\r\n asm\r\n var i = 0;\r\n var j = 0;\r\n var tr = undefined;\r\n var td = undefined;\r\n var l = this.FNormalCells.rows.length;\r\n\r\n this.FNormalCells.parentElement.style.setProperty('height', nh + 'px');\r\n\r\n for(i = 0;i < delta; i++)\r\n {\r\n tr = this.FNormalCells.insertRow(l);\r\n for(j = this.FFixedCols; j < this.FColCount; j++)\r\n {\r\n td = tr.insertCell(0);\r\n SetColAlign(j, td);\r\n }\r\n\r\n if (fc > 0) {\r\n tr = this.FFixedCol.insertRow(l);\r\n for(j = 0; j < this.FFixedCols; j++)\r\n {\r\n td = tr.insertCell(0);\r\n td.setAttribute('class','fixed');\r\n SetColAlign(j, td);\r\n }\r\n }\r\n }\r\n end;\r\n\r\n BeginUpdate;\r\n\r\n for r := 1 to delta do\r\n begin\r\n RowHeights[RowCount - r] := DefaultRowHeight;\r\n end;\r\n\r\n if DragMode = dmAutomatic then\r\n EnableDrag;\r\n\r\n EndUpdate;\r\n end;\r\n\r\n if delta < 0 then\r\n begin\r\n asm\r\n var i = 0;\r\n var l = this.FNormalCells.rows.length;\r\n\r\n if (l > 0) {\r\n\r\n for(i = 0;i < -delta; i++)\r\n {\r\n this.FNormalCells.deleteRow(l - i - 1);\r\n\r\n if (fc > 0) {\r\n this.FFixedCol.deleteRow(l - i - 1);\r\n }\r\n }\r\n }\r\n end;\r\n\r\n if RowCount > 0 then\r\n RowHeights[RowCount - 1] := RowHeights[RowCount - 1];\r\n end;\r\nend;\r\n\r\nfunction TCustomStringGrid.RowOffset: integer;\r\nbegin\r\n Result := FixedRows;\r\nend;\r\n\r\nprocedure TCustomStringGrid.RowsChanged(Sender: TObject);\r\nbegin\r\n SetRows(FRowsIndex, FRows);\r\nend;\r\n\r\nprocedure TCustomStringGrid.SelectCell(ACol, ARow: integer);\r\nvar\r\n rc,rr: integer;\r\nbegin\r\n Selection := GridRect(ACol, ARow, ACol, ARow);\r\n\r\n rc := ACol - FixedCols;\r\n rr := ARow - FixedRows;\r\n\r\n if (rc >= 0) and (rr >= 0) then\r\n begin\r\n asm\r\n //if all rows are deleted then no indicator is displayed\r\n if (this.FNormalCells.rows.length <= 0)\r\n {\r\n this.FSelectedCell = null;\r\n this.UpdateIndicator(this.FFixedRows);\r\n return;\r\n }\r\n this.FSelectedCell = this.FNormalCells.rows[rr].cells[rc];\r\n end;\r\n end\r\n else\r\n begin\r\n asm\r\n this.FSelectedCell = null;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TCustomStringGrid.SelectSortIndicator(const ACol, ARow: integer;\r\n ASelect: boolean);\r\nvar\r\n el: TJSElement;\r\n sid: string;\r\n\r\nbegin\r\n sid := Name + 'si'+ACol.ToString+'_'+ARow.ToString;\r\n\r\n el := document.getElementById(sid);\r\n\r\n if Assigned(el) then\r\n begin\r\n if ASelect then\r\n TJSHTMLElement(el).style.setProperty('color',ColorToHTML(SelectionColor))\r\n else\r\n TJSHTMLElement(el).style.removeProperty('color');\r\n end;\r\nend;\r\n\r\nprocedure TCustomStringGrid.SetAlignAttr(AAlign: TAlignment;\r\n AElement: TJSElement);\r\nbegin\r\n case AAlign of\r\n taLeftJustify: AElement.removeAttribute('align');\r\n taCenter: AElement['align'] := 'center';\r\n taRightJustify: AElement['align'] := 'right';\r\n end;\r\nend;\r\n\r\nprocedure TCustomStringGrid.SetCells(ACol, ARow: integer; const Value: string);\r\nvar\r\n rc,rr,rh: integer;\r\n StrVal, cn: string;\r\n el: TJSHTMLElement;\r\n\r\nbegin\r\n if (ARow < 0) or (ACol < 0) then\r\n Exit;\r\n\r\n StrVal := Value;\r\n if pos(#13, Value) > 0 then\r\n begin\r\n StrVal := StringReplace(StrVal, #13, '
', [rfReplaceAll]);\r\n StrVal := StringReplace(StrVal, #10, '
', [rfReplaceAll]);\r\n end\r\n else\r\n if pos(#10, Value) > 0 then\r\n begin\r\n StrVal := StringReplace(StrVal, #10, '
', [rfReplaceAll]);\r\n end;\r\n\r\n if WordWrap then\r\n begin\r\n rh := RowHeights[ARow] - 2;\r\n StrVal := '
' + StrVal + '
';\r\n end;\r\n\r\n el := CellRealElement(ACol,ARow);\r\n if Assigned(el) then\r\n begin\r\n el.innerHTML := StrVal;\r\n\r\n cn := '';\r\n GetCellClassName(ACol, ARow, nil, StrVal, cn);\r\n if cn <> '' then\r\n el.setAttribute('class',cn);\r\n end;\r\n\r\n (*\r\n\r\n if (ACol < FixedCols) and (ARow >= FixedRows) then\r\n begin\r\n rr := ARow - FixedRows;\r\n rc := ACol;\r\n\r\n asm\r\n var td = this.FFixedCol.rows[rr].cells[rc];\r\n td.innerHTML = StrVal;\r\n end;\r\n end;\r\n\r\n if (ARow < FixedRows) and (ACol >= FixedCols) then\r\n begin\r\n rc := ACol - FixedCols;\r\n rr := ARow;\r\n\r\n if Assigned(FFixedRow) then\r\n begin\r\n asm\r\n var tr = this.FFixedRow.rows[rr];\r\n if (tr != undefined) {\r\n var td = tr.cells[rc];\r\n td.innerHTML = StrVal;\r\n }\r\n end;\r\n end;\r\n end;\r\n\r\n if (ACol < FixedCols) and (ARow < FixedRows) then\r\n begin\r\n rc := ACol;\r\n rr := ARow;\r\n\r\n asm\r\n var td = this.FFixedColRow.rows[rr].cells[rc];\r\n td.innerHTML = StrVal;\r\n end;\r\n end;\r\n\r\n if (ACol >= FixedCols) and (ARow >= FixedRows) then\r\n begin\r\n rc := ACol - FixedCols;\r\n rr := ARow - FixedRows;\r\n asm\r\n var td = this.FNormalCells.rows[rr].cells[rc];\r\n td.innerHTML = StrVal;\r\n end;\r\n end;\r\n *)\r\n\r\n if ARow = 0 then\r\n EnableColResize;\r\nend;\r\n\r\nprocedure TCustomStringGrid.SetCheckState(ACol, ARow: integer;\r\n const Value: boolean);\r\nvar\r\n el: TJSHTMLElement;\r\nbegin\r\n if (ACol < ColCount) and (ARow < RowCount) then\r\n begin\r\n el := GetCheckElement(ACol,ARow);\r\n asm\r\n el.checked = Value;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TCustomStringGrid.SetCheckEnabled(ACol, ARow: integer;\r\n const Value: boolean);\r\nvar\r\n el: TJSHTMLElement;\r\n v: boolean;\r\nbegin\r\n if (ACol < ColCount) and (ARow < RowCount) then\r\n begin\r\n v := not Value;\r\n el := GetCheckElement(ACol,ARow);\r\n asm\r\n el.disabled = v;\r\n end;\r\n end;\r\nend;\r\n\r\n\r\nprocedure TCustomStringGrid.SetCol(const Value: integer);\r\nvar\r\n r,c: integer;\r\n td: TJSElement;\r\nbegin\r\n if (Value < ColCount) and (Value >= FixedCols) then\r\n begin\r\n if Assigned(FSelectedCell) then\r\n begin\r\n RemoveSelection(FSelectedCell);\r\n end;\r\n\r\n c := Value - FixedCols;\r\n r := Row - FixedRows;\r\n if r < 0 then\r\n r := 0;\r\n\r\n asm\r\n var tr = this.FNormalCells.rows[r];\r\n td = tr.cells[c];\r\n end;\r\n\r\n AddSelection(td);\r\n FSelectedCell := td;\r\n\r\n asm\r\n var pardiv = this.FNormalCells.parentElement.parentElement;\r\n\r\n if (td.offsetLeft < pardiv.scrollLeft) {\r\n pardiv.scrollLeft = td.offsetLeft;\r\n }\r\n\r\n if (td.offsetLeft + td.offsetWidth - pardiv.scrollLeft > pardiv.offsetWidth) {\r\n pardiv.scrollLeft = pardiv.scrollLeft + td.offsetWidth;\r\n }\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TCustomStringGrid.SetColAlignments(ACol: integer;\r\n const Value: TAlignment);\r\nbegin\r\n while FColAlignments.Count <= ACol do\r\n FColAlignments.Add(taLeftJustify);\r\n FColAlignments[ACol] := Value;\r\n UpdateGridAlignment;\r\nend;\r\n\r\nprocedure TCustomStringGrid.SetColWidths(ACol: integer; const Value: integer);\r\nvar\r\n fcw: integer;\r\n nw, nwvis, nwvisnoscroll: integer;\r\n LAutoSizeW: boolean;\r\nbegin\r\n while FColWidths.Count <= ACol do\r\n FColWidths.Add(DefaultColWidth);\r\n\r\n FColWidths[ACol] := Value;\r\n\r\n if IsUpdating then\r\n Exit;\r\n\r\n if not Assigned(FGrid) then\r\n Exit;\r\n\r\n LAutoSizeW := WidthStyle = ssAuto;\r\n nw := NormalColWidth;\r\n nwvis := Width - FixedColWidth;\r\n nwvisnoscroll := nwvis - GetScrollBarWidth;\r\n\r\n if ACol < FixedCols then\r\n begin\r\n fcw := FixedColWidth;\r\n asm\r\n var tr = this.FGrid.rows[0];\r\n if (tr != undefined) {\r\n var td = tr.cells[0];\r\n if (td != undefined) {\r\n td.style.width = fcw + \"px\";\r\n if (td.firstChild != undefined) {\r\n td.firstChild.style.width = fcw + \"px\"; }\r\n }\r\n }\r\n\r\n tr = this.FGrid.rows[1];\r\n if (tr != undefined) {\r\n td = tr.cells[0];\r\n if (td != undefined) {\r\n td.style.width = fcw + \"px\";\r\n if (td.firstChild != undefined) {\r\n td.firstChild.style.width = fcw + \"px\"; }\r\n }\r\n\r\n tr = this.FFixedColRow.rows[0];\r\n if (tr != undefined) {\r\n\r\n td = tr.cells[0];\r\n if (td != undefined) {\r\n td.style.width = fcw + \"px\";\r\n }\r\n }\r\n }\r\n tr = this.FFixedCol.rows[0];\r\n if (tr != undefined) {\r\n\r\n td = tr.cells[0];\r\n if (td != undefined) {\r\n td.style.width = fcw + \"px\";\r\n }\r\n }\r\n end;\r\n end;\r\n\r\n if ACol >= FixedCols then\r\n begin\r\n ACol := ACol - FixedCols;\r\n\r\n asm\r\n var tr = this.FFixedRow.rows[0];\r\n if (tr != undefined) {\r\n var td = tr.cells[ACol];\r\n td.style.width = Value + \"px\";\r\n td.style.maxwidth = Value + \"px\";\r\n\r\n if (this.FNormalCells.rows.length > 0)\r\n {\r\n var td = this.FNormalCells.rows[0].cells[ACol];\r\n td.style.width = Value + \"px\";\r\n td.style.maxwidth = Value + \"px\";\r\n }\r\n }\r\n end;\r\n end;\r\n\r\n asm\r\n var tr = this.FGrid.rows[0];\r\n if (tr != undefined) {\r\n var td = tr.cells[1];\r\n if ((td.firstChild != undefined) && (!LAutoSizeW)) {\r\n td.firstChild.style.width = nwvisnoscroll + \"px\";\r\n td.firstChild.firstChild.style.width = nw + \"px\";\r\n }\r\n }\r\n tr = this.FGrid.rows[1];\r\n if (tr != undefined) {\r\n td = tr.cells[1];\r\n if ((td.firstChild != undefined) && (!LAutoSizeW)) {\r\n td.firstChild.style.width = nwvis + \"px\";\r\n td.firstChild.firstChild.style.width = nw + \"px\";\r\n }\r\n }\r\n end;\r\n\r\n UpdateGridSize;\r\nend;\r\n{$HINTS ON}\r\n\r\n\r\nprocedure TCustomStringGrid.SetDataColumnCount(AValue: Integer);\r\nbegin\r\n ColCount := FixedCols + AValue;\r\nend;\r\n\r\nprocedure TCustomStringGrid.SetDataHeader(AColumn: Integer; AValue: string);\r\nbegin\r\n if FixedRows > 0 then\r\n Cells[AColumn + FixedCols, FixedRows - 1] := AValue;\r\nend;\r\n\r\nprocedure TCustomStringGrid.SetDataRowCount(AValue: Integer);\r\nbegin\r\n RowCount := FixedRows + AValue;\r\nend;\r\n\r\nprocedure TCustomStringGrid.SetDataValue(AColumn, ARow: Integer;\r\n AValue: string);\r\nbegin\r\n Cells[AColumn + FixedCols, ARow + FixedRows] := AValue;\r\nend;\r\n\r\nprocedure TCustomStringGrid.SetDefaultColAlignment(const Value: TAlignment);\r\nbegin\r\n if (FDefaultColAlignment <> Value) then\r\n begin\r\n FDefaultColAlignment := Value;\r\n if not (csloading in ComponentState) then\r\n ReRenderGrid;\r\n end;\r\nend;\r\n\r\nprocedure TCustomStringGrid.SetDefaultColWidth(const Value: integer);\r\nvar\r\n i: integer;\r\nbegin\r\n FDefaultColWidth := Value;\r\n\r\n for i := 0 to ColCount - 1 do\r\n ColWidths[i] := Value;\r\nend;\r\n\r\nprocedure TCustomStringGrid.SetDefaultRowHeight(const Value: integer);\r\nvar\r\n i: integer;\r\nbegin\r\n FDefaultRowHeight := Value;\r\n for i := 0 to RowCount - 1 do\r\n RowHeights[i] := Value;\r\nend;\r\n\r\nprocedure TCustomStringGrid.SetEditControlValue(ACol, ARow: Longint;\r\n AControl: TControl; AValue: string);\r\nbegin\r\n if Assigned(OnSetEditControlValue) then\r\n OnSetEditControlValue(Self, ACol, ARow, AControl, AValue);\r\nend;\r\n\r\nprocedure TCustomStringGrid.SetEditText(ACol, ARow: Longint;\r\n const AValue: string);\r\nbegin\r\n if Assigned(OnSetEditText) then\r\n OnSetEditText(Self, ACol, ARow, AValue);\r\nend;\r\n\r\nprocedure TCustomStringGrid.SetElementTableClassName(const Value: string);\r\nbegin\r\n if (FElementTableClassName <> Value) then\r\n begin\r\n FElementTableClassName := Value;\r\n\r\n if not IsUpdating then\r\n ReRenderGrid;\r\n end;\r\nend;\r\n\r\nprocedure TCustomStringGrid.SetFixedColor(const Value: TColor);\r\nbegin\r\n if (FFixedColor <> Value) then\r\n begin\r\n FFixedColor := Value;\r\n UpdateElementVisual;\r\n end;\r\nend;\r\n\r\nprocedure TCustomStringGrid.ReRenderGrid;\r\nbegin\r\n if not IsLinked and Assigned(FGrid) and Assigned(FGrid.firstElementChild) then\r\n begin\r\n FGrid.removeChild(FGrid.firstChild);\r\n end;\r\n FGrid := nil;\r\n RenderGrid;\r\n UpdateGridSize;\r\n UpdateGridAlignment;\r\nend;\r\n\r\nprocedure TCustomStringGrid.SetFixedCols(const Value: integer);\r\nbegin\r\n if (FFixedCols <> Value) then\r\n begin\r\n FFixedCols := Value;\r\n\r\n if not IsUpdating then\r\n ReRenderGrid;\r\n end;\r\nend;\r\n\r\nprocedure TCustomStringGrid.SetFixedFont(const Value: TFont);\r\nbegin\r\n FFixedFont.Assign(Value);\r\nend;\r\n\r\nprocedure TCustomStringGrid.SetFixedRows(const Value: integer);\r\nbegin\r\n if (FFixedRows <> Value) then\r\n begin\r\n FFixedRows := Value;\r\n\r\n if not IsUpdating then\r\n ReRenderGrid;\r\n end;\r\nend;\r\n\r\nprocedure TCustomStringGrid.SetColor(AValue: TColor);\r\nbegin\r\n if (FColor <> AValue) then\r\n begin\r\n FColor := AValue;\r\n UpdateElement;\r\n end;\r\nend;\r\n\r\nprocedure TCustomStringGrid.SetFixedTextColor(const Value: TColor);\r\nbegin\r\n if (FixedFont.Color <> Value) then\r\n begin\r\n FixedFont.Color := Value;\r\n UpdateElementVisual;\r\n end;\r\nend;\r\n\r\nprocedure TCustomStringGrid.SetFocus;\r\nbegin\r\n if Assigned(FNormalCells) then\r\n TJSHTMLElement(FNormalCells).focus();\r\nend;\r\n\r\nprocedure TCustomStringGrid.SetGridLineColor(const Value: TColor);\r\nbegin\r\n if (FGridLineColor <> Value) then\r\n begin\r\n FGridLineColor := Value;\r\n UpdateElement;\r\n end;\r\nend;\r\n\r\nprocedure TCustomStringGrid.SetLeftCol(const Value: integer);\r\nvar\r\n i,w: integer;\r\nbegin\r\n w := 0;\r\n for i := FixedCols to Value - 1 do\r\n w := w + ColWidths[i] + 1 - CELLPADDING;\r\n\r\n if Assigned(FNormalCells) then\r\n begin\r\n FNormalCells.parentElement.parentElement.scrollLeft := w;\r\n if FixedCols > 0 then\r\n FFixedCol.parentElement.parentElement.scrollLeft := w;\r\n end;\r\nend;\r\n\r\nprocedure TCustomStringGrid.SetObjects(ACol, ARow: integer;\r\n const Value: TObject);\r\nvar\r\n LObjr: TObjectRow;\r\nbegin\r\n while FObjectRows.Count <= ARow do\r\n begin\r\n LObjr := TObjectRow.Create;\r\n FObjectRows.Add(LObjr);\r\n end;\r\n\r\n LObjr := TObjectRow(FObjectRows[ARow]);\r\n\r\n while LObjr.Count <= ACol do\r\n begin\r\n LObjr.Add(nil);\r\n end;\r\n\r\n LObjr[ACol] := Value;\r\nend;\r\n\r\nprocedure TCustomStringGrid.SetProgress(ACol, ARow, APosition: integer);\r\nvar\r\n el: TJSElement;\r\nbegin\r\n if (ACol < ColCount) and (ARow < RowCount) then\r\n begin\r\n el := GetProgressElement(ACol,ARow);\r\n if Assigned(el) then\r\n begin\r\n el['value'] := APosition.ToString;\r\n end;\r\n end;\r\nend;\r\n\r\n{$HINTS OFF}\r\n\r\nprocedure TCustomStringGrid.SetRange(const Value: TGridRange);\r\nbegin\r\n FRange.Assign(Value);\r\nend;\r\n\r\nprocedure TCustomStringGrid.SetRow(const Value: integer);\r\nvar\r\n r,c,sh: integer;\r\n rselect: boolean;\r\n tr,td: TJSElement;\r\nbegin\r\n if (Value < RowCount) and (Value >= FixedRows) then\r\n begin\r\n rselect := (goRowSelect in Options);\r\n\r\n if Assigned(FSelectedCell) and rselect then\r\n begin\r\n tr := FSelectedCell.parentElement;\r\n RemoveSelection(tr);\r\n end;\r\n\r\n if Assigned(FSelectedCell) then\r\n begin\r\n RemoveSelection(FSelectedCell);\r\n end;\r\n\r\n c := Col - FixedCols;\r\n if c < 0 then\r\n c := 0;\r\n\r\n r := Value - FixedRows;\r\n\r\n if FixedColWidth + NormalColWidth < Width then\r\n sh := 0\r\n else\r\n sh := GetScrollBarHeight;\r\n\r\n asm\r\n tr = this.FNormalCells.rows[r];\r\n td = tr.cells[c];\r\n end;\r\n\r\n if (rselect) then\r\n begin\r\n if not isUndefined(FSelectedCell) then\r\n RemoveSelection(FSelectedCell);\r\n\r\n AddSelection(tr);\r\n FSelectedCell := td;\r\n end\r\n else\r\n begin\r\n FSelectedCell := td;\r\n AddSelection(FSelectedCell);\r\n end;\r\n\r\n asm\r\n var pardiv = this.FNormalCells.parentElement.parentElement;\r\n\r\n if (td.offsetTop < pardiv.scrollTop) {\r\n pardiv.scrollTop = td.offsetTop;\r\n }\r\n\r\n if (td.offsetHeight>0) {\r\n while (td.offsetTop + td.offsetHeight - pardiv.scrollTop > pardiv.offsetHeight - sh) {\r\n pardiv.scrollTop = pardiv.scrollTop + td.offsetHeight;\r\n }\r\n }\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TCustomStringGrid.SetRowHeights(ARow: integer; const Value: integer);\r\nvar\r\n frh,rh: integer;\r\n fh, nh, nhvis, nhvisnoscroll: integer;\r\nbegin\r\n while FRowHeights.Count <= ARow do\r\n FRowHeights.Add(DefaultRowHeight);\r\n\r\n FRowHeights[ARow] := Value;\r\n\r\n if IsUpdating then\r\n Exit;\r\n\r\n if not Assigned(FGrid) then\r\n Exit;\r\n\r\n fh := FixedRowHeight;\r\n\r\n nh := NormalRowHeight;\r\n\r\n nhvis := Height - FixedRowHeight;\r\n\r\n nhvisnoscroll := nhvis - GetScrollBarHeight;\r\n\r\n if ARow < FixedRows then\r\n begin\r\n frh := FixedRowHeight;\r\n asm\r\n var tr = this.FGrid.rows[0];\r\n if (tr != undefined) {\r\n tr.style.height = frh + \"px\";\r\n var td = tr.cells[0];\r\n if (td != undefined) {\r\n var fc = td.firstChild;\r\n if (fc != undefined) {\r\n fc.style.height = frh + \"px\";\r\n }\r\n td = tr.cells[1];\r\n fc = td.firstChild;\r\n if (fc != undefined) {\r\n fc.style.height = frh + \"px\";\r\n }\r\n }\r\n }\r\n\r\n tr = this.FFixedColRow.rows[0];\r\n if (tr != undefined) {\r\n tr = tr.cells[0];\r\n if (tr != undefined) {\r\n tr.style.height = Value + \"px\";\r\n tr = this.FFixedRow.rows[ARow].cells[0];\r\n if (tr != undefined) {\r\n tr.style.height = Value + \"px\"; }\r\n }\r\n }\r\n end;\r\n end;\r\n\r\n\r\n if ARow >= FixedRows then\r\n begin\r\n ARow := ARow - FixedRows;\r\n\r\n rh := Value;\r\n if HasHorzScrollBar and HasVertScrollBar and (ARow = RowCount - 1) then\r\n rh := Value + FNormalCells.parentElement.scrollHeight;\r\n\r\n asm\r\n var tr = this.FFixedCol.rows[ARow];\r\n if (tr != undefined) {\r\n tr.style.height = Value + \"px\";\r\n var tr = this.FNormalCells.rows[ARow];\r\n\r\n if (tr != undefined) {\r\n tr.style.height = rh + \"px\"; }\r\n }\r\n end;\r\n end;\r\n\r\n asm\r\n var td = this.FGrid.rows[1].cells[0];\r\n if (td.firstChild) {\r\n td.firstChild.style.height = nhvisnoscroll + \"px\";\r\n td.firstChild.firstChild.style.height = nh + \"px\";\r\n }\r\n\r\n td = this.FGrid.rows[1].cells[1];\r\n if (td.firstChild) {\r\n td.firstChild.style.height = nhvis + \"px\";\r\n td.firstChild.firstChild.style.height = nh + \"px\";\r\n }\r\n end;\r\nend;\r\n\r\nprocedure TCustomStringGrid.SetRows(Index: integer; const Value: TStrings);\r\nvar\r\n i: integer;\r\nbegin\r\n if (Index >= 0) and (Index < RowCount) then\r\n begin\r\n for i := 0 to ColCount - 1 do\r\n begin\r\n if i < Value.Count then\r\n Cells[i,Index] := Value[i];\r\n end;\r\n end\r\n else\r\n raise Exception.Create('Invalid row index');\r\nend;\r\n\r\nprocedure TCustomStringGrid.SetSelection(const Value: TGridRect);\r\nvar\r\n c,r,rc,rr: integer;\r\n sel: boolean;\r\n left,right,top,bottom: integer;\r\n tr,td: TJSElement;\r\n\r\nbegin\r\n FSelection := Value;\r\n\r\n left := Value.Left;\r\n right := Value.Right;\r\n\r\n if Value.Left > Value.Right then\r\n begin\r\n left := Value.Right;\r\n right := Value.Left;\r\n end;\r\n\r\n top := Value.Top;\r\n bottom := Value.Bottom;\r\n\r\n if Value.Top > Value.Bottom then\r\n begin\r\n top := Value.Bottom;\r\n bottom := Value.Top;\r\n end;\r\n\r\n for r := FixedRows to RowCount - 1 do\r\n begin\r\n if goRowSelect in Options then\r\n begin\r\n rr := r - FixedRows;\r\n sel := (r >= top) and (r <= bottom);\r\n\r\n if sel then\r\n begin\r\n asm\r\n tr = this.FNormalCells.rows[rr];\r\n end;\r\n AddSelection(tr);\r\n end\r\n else\r\n begin\r\n asm\r\n tr = this.FNormalCells.rows[rr];\r\n end;\r\n RemoveSelection(tr);\r\n end;\r\n end\r\n else\r\n for c := FixedCols to ColCount - 1 do\r\n begin\r\n rc := c - FixedCols;\r\n rr := r - FixedRows;\r\n\r\n sel := (c >= left) and (c <= right) and (r >= top) and (r <= bottom);\r\n\r\n if sel then\r\n begin\r\n asm\r\n td = this.FNormalCells.rows[rr].cells[rc];\r\n end;\r\n if Assigned(td) then\r\n AddSelection(td);\r\n end\r\n else\r\n begin\r\n asm\r\n td = this.FNormalCells.rows[rr].cells[rc];\r\n end;\r\n if Assigned(td) then\r\n RemoveSelection(td);\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TCustomStringGrid.SetSelectionColor(const Value: TColor);\r\nbegin\r\n if (FSelectionColor <> Value) then\r\n begin\r\n FSelectionColor := Value;\r\n UpdateElement;\r\n end;\r\nend;\r\n\r\nprocedure TCustomStringGrid.SetSelectionTextColor(const Value: TColor);\r\nbegin\r\n if (FSelectionTextColor <> Value) then\r\n begin\r\n FSelectionTextColor := Value;\r\n UpdateElement;\r\n end;\r\nend;\r\n\r\nprocedure TCustomStringGrid.SetSortIndex(const Value: integer);\r\nvar\r\n i: integer;\r\nbegin\r\n FSortIndex := Value;\r\n for i := 0 to ColCount - 1 do\r\n begin\r\n SelectSortIndicator(i, 0, i = FSortIndex);\r\n end;\r\nend;\r\n\r\nprocedure TCustomStringGrid.SetSortIndicator(const ACol, ARow: integer;\r\n AIndicator: TGridSortIndicator);\r\nvar\r\n el: TJSElement;\r\n sid: string;\r\n\r\nbegin\r\n sid := Name + 'si'+ACol.ToString+'_'+ARow.ToString;\r\n\r\n el := document.getElementById(sid);\r\n\r\n if Assigned(el) then\r\n begin\r\n if AIndicator = siAscending then\r\n begin\r\n TJSHTMLElement(el).innerHTML := GlyphAscending;\r\n el['sort'] := 'up';\r\n end\r\n else\r\n begin\r\n TJSHTMLElement(el).innerHTML := GlyphDescending;\r\n el['sort'] := 'dn';\r\n end;\r\n end;\r\n\r\nend;\r\n\r\nprocedure TCustomStringGrid.SetTopRow(const Value: integer);\r\nvar\r\n pixVal: integer;\r\nbegin\r\n pixVal := (Value - FixedRows) * DefaultRowHeight;\r\n if Assigned(FNormalCells) and (pixVal >= 0) then\r\n begin\r\n FNormalCells.parentElement.parentElement.scrollTop := pixVal;\r\n if FixedCols > 0 then\r\n FFixedCol.parentElement.parentElement.scrollTop := pixVal;\r\n end;\r\nend;\r\n\r\nprocedure TCustomStringGrid.ShowEdit;\r\nbegin\r\n StartEdit('');\r\nend;\r\n\r\n\r\nprocedure TCustomStringGrid.Sort(AColumn: integer;\r\n ADirection: TGridSortIndicator);\r\nvar\r\n colidx: integer;\r\n grid: TJSElement;\r\n asc: boolean;\r\nbegin\r\n grid := FNormalCells;\r\n asc := ADirection = siAscending;\r\n colidx := AColumn - FixedCols;\r\n\r\n asm\r\n const getCellValue = (tr, idx) => tr.children[idx].innerText || tr.children[idx].textContent;\r\n const comparer = (idx, asc) => (a, b) => ((v1, v2) =>\r\n v1 !== '' && v2 !== '' && !isNaN(v1) && !isNaN(v2) ? v1 - v2 : v1.toString().localeCompare(v2)\r\n )(getCellValue(asc ? a : b, idx), getCellValue(asc ? b : a, idx));\r\n\r\n const table = grid;\r\n Array.from(table.querySelectorAll('tr:nth-child(n+1)'))\r\n .sort(comparer(colidx, asc))\r\n .forEach(tr => table.appendChild(tr) );\r\n end;\r\nend;\r\n\r\nprocedure TCustomStringGrid.StartEdit(ch: string);\r\nvar\r\n created: boolean;\r\n eh: TJSHTMLElement;\r\n s: string;\r\n dorange: boolean;\r\nbegin\r\n // https://developer.mozilla.org/en-US/docs/Learn/Forms/HTML5_input_types\r\n // default editor\r\n if WordWrap then\r\n FEditType := geMemo\r\n else\r\n FEditType := geText;\r\n\r\n GetCellEditor(Col,Row, FEditType);\r\n\r\n if FEditType = geNone then\r\n Exit;\r\n\r\n eh := ElementHandle;\r\n\r\n FEditRow := Row;\r\n FEditCol := Col;\r\n\r\n FEditMode := true;\r\n\r\n s := GetEditText(Col,Row);\r\n\r\n FOrigVal := s;\r\n\r\n if FEditType = geCombo then\r\n begin\r\n if not Assigned(FCombo) then\r\n begin\r\n FCombo := TWebComboBox.Create(Self);\r\n FCombo.ElementPosition := epRelative;\r\n FCombo.WidthStyle := ssPercent;\r\n FCombo.WidthPercent := 100;\r\n FCombo.HeightStyle := ssPercent;\r\n FCombo.HeightPercent := 100;\r\n FCombo.Parent := Self;\r\n FCombo.OnExit := HandleComboExit;\r\n FCombo.OnKeyPress := HandleComboKeyPress;\r\n end;\r\n\r\n FCombo.Items.Assign(FComboBoxItems);\r\n FCombo.Text := s;\r\n FSelectedCell.innerHTML := '';\r\n FSelectedCell.appendChild(FCombo.ElementHandle);\r\n FCombo.SetFocus;\r\n RemoveSelection(FSelectedCell);\r\n Exit;\r\n end;\r\n\r\n if FEditType = geMemo then\r\n begin\r\n if not Assigned(FMemo) then\r\n begin\r\n FMemo := TWebMemo.Create(Self);\r\n FMemo.ElementPosition := epRelative;\r\n FMemo.WidthStyle := ssPercent;\r\n FMemo.WidthPercent := 100;\r\n FMemo.BorderStyle := bsNone;\r\n FMemo.Parent := Self;\r\n FMemo.ElementHandle.style.setProperty('outline','none');\r\n FMemo.OnExit := HandleMemoExit;\r\n FMemo.OnKeyPress := HandleMemoKeyPress;\r\n end;\r\n\r\n FMemo.Height := RowHeights[FEditRow] - 3;\r\n FMemo.Lines.Text := s;\r\n FSelectedCell.innerHTML := '';\r\n TJSHTMLElement(FSelectedCell).style.setProperty('justify-content','top');\r\n TJSHTMLElement(FSelectedCell).style.setProperty('vertical-align','top');\r\n FSelectedCell.appendChild(FMemo.ElementHandle);\r\n FMemo.SetFocus;\r\n RemoveSelection(FSelectedCell);\r\n Exit;\r\n end;\r\n\r\n if FEditType = geCustom then\r\n begin\r\n FEditControl.ElementPosition := epRelative;\r\n FEditControl.WidthStyle := ssPercent;\r\n FEditControl.WidthPercent := 100;\r\n FEditControl.Parent := Self;\r\n FEditControl.OnExit := DoEditControlExit;\r\n\r\n SetEditControlValue(FEditCol, FEditRow, FEditControl, s);\r\n\r\n FSelectedCell.innerHTML := '';\r\n TJSHTMLElement(FSelectedCell).style.setProperty('justify-content','top');\r\n TJSHTMLElement(FSelectedCell).style.setProperty('vertical-align','top');\r\n FSelectedCell.appendChild(FEditControl.ElementHandle);\r\n RemoveSelection(FSelectedCell);\r\n Exit;\r\n end;\r\n\r\n\r\n if FEditType = geMask then\r\n begin\r\n if not Assigned(FMask) then\r\n begin\r\n FMask := TWebMaskEdit.Create(Self);\r\n FMask.ElementPosition := epRelative;\r\n FMask.WidthStyle := ssPercent;\r\n FMask.WidthPercent := 100;\r\n FMask.HeightStyle := ssPercent;\r\n FMask.HeightPercent := 100;\r\n FMask.Parent := Self;\r\n FMask.OnExit := HandleMaskExit;\r\n FMask.OnKeyPress := HandleMaskKeyPress;\r\n end;\r\n\r\n FMask.EditMask := EditMask;\r\n FMask.Text := s;\r\n FSelectedCell.innerHTML := '';\r\n FSelectedCell.appendChild(FMask.ElementHandle);\r\n FMask.SetFocus;\r\n FMask.SetSelection(0,Length(s));\r\n RemoveSelection(FSelectedCell);\r\n Exit;\r\n end;\r\n\r\n created := false;\r\n\r\n asm\r\n if (this.FEdit == undefined) {\r\n this.FEdit = document.createElement('INPUT');\r\n this.FEdit.style.setProperty('box-sizing','border-box');\r\n this.FEdit.style.setProperty('-webkit-box-sizing','border-box');\r\n this.FEdit.style.setProperty('-moz-box-sizing','border-box');\r\n this.FEdit.style.setProperty('outline', 'none');\r\n this.FEdit.style.setProperty('border-style', 'none');\r\n\r\n created = true;\r\n }\r\n this.FEdit.removeAttribute(\"type\");\r\n end;\r\n\r\n case FEditType of\r\n geURL: FEdit['type'] := 'URL';\r\n geDate: FEdit['type'] := 'DATE';\r\n geTime: FEdit['type'] := 'TIME';\r\n geRange:\r\n begin\r\n FEdit['type'] := 'RANGE';\r\n FEdit['min'] := NumAttribute(RangeEdit.min);\r\n FEdit['max'] := NumAttribute(RangeEdit.max);\r\n FEdit['step'] := NumAttribute(RangeEdit.step);\r\n end;\r\n geEMail: FEdit['type'] := 'EMAIL';\r\n geNumber: FEdit['type'] := 'NUMBER';\r\n geTel: FEdit['type'] := 'TEL';\r\n geColor: FEdit['type'] := 'COLOR';\r\n end;\r\n\r\n dorange := (FEditType = geText);\r\n\r\n asm\r\n this.FEdit.removeAttribute(\"min\");\r\n this.FEdit.removeAttribute(\"max\");\r\n this.FEdit.removeAttribute(\"step\");\r\n\r\n if (ch != '') {\r\n this.FEdit.value = \"\";\r\n }\r\n else {\r\n this.FEdit.value = s;\r\n }\r\n\r\n this.FEdit.style.width = \"100%\";\r\n this.FEdit.style.height = \"100%\";\r\n this.FEdit.style.fontFamily = eh.style.fontFamily;\r\n this.FEdit.style.fontSize = eh.style.fontSize;\r\n\r\n if (dorange) {\r\n this.FEdit.setSelectionRange(0, this.FEdit.value.length)\r\n }\r\n\r\n this.FSelectedCell.innerHTML = \"\";\r\n this.FSelectedCell.appendChild(this.FEdit);\r\n end;\r\n\r\n asm\r\n this.FEdit.focus();\r\n end;\r\n\r\n RemoveSelection(FSelectedCell);\r\n\r\n if created then\r\n begin\r\n FEdit.addEventListener('blur', FHandleEditBlurPtr);\r\n FEdit.addEventListener('keypress', FHandleEditKeypressPtr);\r\n end;\r\nend;\r\n\r\nfunction TCustomStringGrid.StopEdit: string;\r\nvar\r\n val: string;\r\n eh: TJSHTMLElement;\r\nbegin\r\n Result := '';\r\n\r\n if FEditMode then\r\n begin\r\n FEditMode := false;\r\n\r\n if FEditType = geCombo then\r\n begin\r\n val := FCombo.Text;\r\n eh := FCombo.ElementHandle;\r\n end\r\n else\r\n if FEditType = geMask then\r\n begin\r\n val := FMask.Text;\r\n eh := FMask.ElementHandle;\r\n end\r\n else\r\n begin\r\n val := (FEdit as TJSHTMLInputElement).value;\r\n eh := FEdit;\r\n end;\r\n\r\n ValidateCell(FEditCol, FEditRow, val);\r\n\r\n if FSelectedCell.contains(eh) then\r\n FSelectedCell.removeChild(eh);\r\n\r\n FSelectedCell.innerHTML := val;\r\n Result := val;\r\n\r\n UpdateCell(FEditCol, FEditRow, val);\r\n if not (goRowSelect in Options) then\r\n begin\r\n AddSelection(FSelectedCell);\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TCustomStringGrid.StylePrefix: string;\r\nvar\r\n frm: TCustomForm;\r\nbegin\r\n Result := '';\r\n frm := GetParentForm(Self);\r\n if Assigned(frm) then\r\n Result := frm.ClassName;\r\nend;\r\n\r\nprocedure TCustomStringGrid.TopLeftChanged;\r\nbegin\r\n if Assigned(OnTopLeftChanged) then\r\n OnTopLeftChanged(Self);\r\nend;\r\n\r\nprocedure TCustomStringGrid.UnbindEvents;\r\nbegin\r\n inherited;\r\n\r\n if Assigned(FNormalCells) then\r\n begin\r\n FNormalCells.removeEventListener('mousedown',FHandleMouseDownPtr);\r\n FNormalCells.removeEventListener('mouseup',FHandleMouseUpPtr);\r\n FNormalCells.removeEventListener('mousemove',FHandleMouseMovePtr);\r\n FNormalCells.removeEventListener('click',FHandleClickPtr);\r\n end;\r\n\r\n if Assigned(FFixedCol) then\r\n FFixedCol.removeEventListener('click',FHandleFixedClickPtr);\r\n\r\n if Assigned(FFixedRow) then\r\n FFixedRow.removeEventListener('click',FHandleFixedClickPtr);\r\n\r\n if Assigned(FFixedColRow) then\r\n FFixedColRow.removeEventListener('click',FHandleFixedClickPtr);\r\nend;\r\n\r\nprocedure TCustomStringGrid.UpdateCell(ACol, ARow: integer; var AValue: string);\r\nbegin\r\n\r\nend;\r\n\r\nprocedure TCustomStringGrid.UpdateElement;\r\nvar\r\n clr: string;\r\nbegin\r\n inherited;\r\n\r\n if IsUpdating then\r\n Exit;\r\n\r\n if Assigned(ElementHandle) then\r\n begin\r\n if (Color <> clWindow) and (Color <> clNone) then\r\n ElementHandle.style.setProperty('background-color', ColorToHTML(Color));\r\n\r\n if Assigned(FGrid) then\r\n begin\r\n SetHTMLElementFont(TJSHTMLElement(FGrid), Font, not ((ElementClassName = '') and (ElementFont = efProperty)) );\r\n end;\r\n\r\n ElementHandle.style.setProperty('overflow', 'hidden');\r\n\r\n if (BorderStyle = bsSingle) and not (BorderColor = clNone) and (ElementClassName = '') and not IsLinked then\r\n begin\r\n ElementHandle.style.setProperty('border', '1px solid '+ ColorToHTML(BorderColor));\r\n// BorderWidth := 1;\r\n end\r\n else\r\n begin\r\n ElementHandle.style.setProperty('border', '');\r\n// BorderWidth := 0;\r\n end;\r\n\r\n RenderGrid;\r\n\r\n clr := ColorToHTML(Color);\r\n\r\n if Color <> clWindow then\r\n begin\r\n // background color stringgrid (DIV & TBODY)\r\n asm\r\n var bd = this.FNormalCells.tBodies[0];\r\n if (bd != undefined) {\r\n this.FNormalCells.tBodies[0].style.setProperty('background-color', clr);\r\n }\r\n this.FNormalCells.parentElement.parentElement.style.setProperty('background-color', clr);\r\n end;\r\n end;\r\n\r\n if FOrigID = '' then\r\n begin\r\n FOrigID := GetID;\r\n if FOrigID = '' then\r\n FOrigID := Name;\r\n end;\r\n\r\n AddInstanceStyle(StylePrefix + FOrigID, GetGridCSS(FOrigID + 'tbl'));\r\n\r\n UpdateGridSize;\r\n UpdateGridAlignment;\r\n end;\r\nend;\r\n\r\nprocedure TCustomStringGrid.UpdateElementVisual;\r\nvar\r\n fixcol,fixtxtcol: string;\r\nbegin\r\n inherited;\r\n\r\n if IsUpdating then\r\n Exit;\r\n\r\n if Assigned(ElementHandle) and Assigned(FGrid) then\r\n begin\r\n fixcol := ColorToHTML(FFixedColor);\r\n fixtxtcol := ColorToHTML(FixedTextColor);\r\n\r\n if (FixedCols > 0) and (FixedRows > 0) then\r\n begin\r\n asm\r\n this.FFixedColRow.parentElement.style.setProperty('background-color',fixcol);\r\n this.FFixedColRow.parentElement.style.setProperty('color',fixtxtcol);\r\n end;\r\n end;\r\n\r\n if (FixedCols > 0) then\r\n begin\r\n asm\r\n this.FFixedCol.parentElement.style.setProperty('background-color',fixcol);\r\n this.FFixedCol.parentElement.style.setProperty('color',fixtxtcol);\r\n\r\n if (this.FFixedCol.parentElement.parentElement) {\r\n this.FFixedCol.parentElement.parentElement.style.setProperty('background-color',fixcol);\r\n this.FFixedCol.parentElement.parentElement.style.setProperty('color',fixtxtcol);\r\n }\r\n end;\r\n end;\r\n\r\n if (FixedRows > 0) then\r\n begin\r\n asm\r\n this.FFixedRow.parentElement.style.setProperty('background-color',fixcol);\r\n this.FFixedRow.parentElement.style.setProperty('color',fixtxtcol);\r\n this.FFixedRow.parentElement.parentElement.style.setProperty('background-color',fixcol);\r\n this.FFixedRow.parentElement.parentElement.style.setProperty('color',fixtxtcol);\r\n if (this.FFixedRow.parentElement.parentElement.parentElement) {\r\n this.FFixedRow.parentElement.parentElement.parentElement.style.setProperty('background-color',fixcol);\r\n this.FFixedRow.parentElement.parentElement.parentElement.style.setProperty('color',fixtxtcol);\r\n }\r\n end;\r\n end;\r\n end;\r\n\r\nend;\r\n\r\nprocedure TCustomStringGrid.UpdateGridAlignment;\r\nvar\r\n i,j,k,l,cw,rh: integer;\r\n al: TAlignment;\r\n\r\nbegin\r\n if not Assigned(ElementHandle) then\r\n Exit;\r\n\r\n if IsUpdating then\r\n Exit;\r\n\r\n if (RowCount = 0) or (ColCount = 0) then\r\n Exit;\r\n\r\n if FColAlignments.Count = 0 then\r\n Exit;\r\n\r\n for i := 0 to FixedCols - 1 do\r\n begin\r\n al := ColAlignments[i];\r\n j := i; // avoid that the optimizer removes j variable\r\n\r\n if (FixedRows > 0) and (FixedCols > 0) then\r\n begin\r\n\r\n asm\r\n for (j = 0; j < this.FFixedColRow.rows.length; j ++){\r\n var tr = this.FFixedColRow.rows[j];\r\n if (tr) {\r\n var td = tr.cells[i];\r\n if (td) {\r\n this.SetAlignAttr(al, td);\r\n }\r\n }\r\n }\r\n end;\r\n end;\r\n\r\n if (FixedCols > 0) then\r\n begin\r\n asm\r\n for (j = 0; j < this.FFixedCol.rows.length; j ++){\r\n var tr = this.FFixedCol.rows[j];\r\n if (tr) {\r\n var td = tr.cells[i];\r\n if (td) {\r\n this.SetAlignAttr(al, td);\r\n }\r\n }\r\n }\r\n end;\r\n end;\r\n end;\r\n\r\n for i := FixedCols to ColCount - 1 do\r\n begin\r\n al := ColAlignments[i];\r\n\r\n k := i - FixedCols;\r\n j := i; // avoid that the optimizer removes j variable\r\n\r\n if (FixedRows > 0) then\r\n begin\r\n asm\r\n //if (this.FFixedRow.rows.length > 0) {\r\n for (j = 0; j < this.FFixedRow.rows.length; j++) {\r\n var tr = this.FFixedRow.rows[j];\r\n if (tr) {\r\n var td = tr.cells[k];\r\n if (td) {\r\n this.SetAlignAttr(al, td);\r\n }\r\n }\r\n }\r\n end;\r\n end;\r\n\r\n asm\r\n for (j = 0; j < this.FNormalCells.rows.length; j++) {\r\n var tr = this.FNormalCells.rows[j];\r\n if (tr) {\r\n var td = tr.cells[k];\r\n if (td) {\r\n this.SetAlignAttr(al, td);\r\n }\r\n }\r\n }\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TCustomStringGrid.UpdateGridSize;\r\nvar\r\n i,j,k,l,cw,rh,frh: integer;\r\n\r\nbegin\r\n if not Assigned(ElementHandle) then\r\n Exit;\r\n\r\n if not Assigned(Parent) then\r\n Exit;\r\n\r\n if IsUpdating then\r\n Exit;\r\n\r\n if (RowCount = 0) or (ColCount = 0) then\r\n Exit;\r\n\r\n for i := 0 to FixedCols - 1 do\r\n begin\r\n cw := ColWidths[i] - CELLPADDING;\r\n\r\n if (FixedRows > 0) and (FixedCols > 0) then\r\n begin\r\n asm\r\n for (j = 0; j < this.FFixedColRow.rows.length; j ++){\r\n var tr = this.FFixedColRow.rows[j];\r\n if (tr) {\r\n var td = tr.cells[i];\r\n if (td) {\r\n td.style.width = cw + \"px\";\r\n td.style.maxWidth = cw + \"px\";\r\n }\r\n }\r\n }\r\n end;\r\n end;\r\n\r\n if (FixedCols > 0) then\r\n begin\r\n asm\r\n for (j = 0; j < this.FFixedCol.rows.length; j ++){\r\n var tr = this.FFixedCol.rows[j];\r\n if (tr) {\r\n var td = tr.cells[i];\r\n if (td) {\r\n td.style.width = cw + \"px\";\r\n td.style.maxWidth = cw + \"px\";\r\n }\r\n }\r\n }\r\n end;\r\n end;\r\n end;\r\n\r\n for i := 0 to FixedRows - 1 do\r\n begin\r\n rh := RowHeights[i];\r\n\r\n if FixedCols > 0 then\r\n begin\r\n asm\r\n var tr = this.FFixedColRow.rows[i];\r\n if (tr) {\r\n tr.style.height = rh + \"px\";\r\n }\r\n end;\r\n end;\r\n\r\n asm\r\n var tr = this.FFixedRow.rows[i];\r\n if (tr) {\r\n tr.style.height = rh + \"px\";\r\n }\r\n end;\r\n end;\r\n\r\n for i := FixedCols to ColCount - 1 do\r\n begin\r\n cw := ColWidths[i] - CELLPADDING;\r\n\r\n k := i - FixedCols;\r\n\r\n if (FixedRows > 0) then\r\n begin\r\n asm\r\n //if (this.FFixedRow.rows.length > 0) {\r\n for (i = 0; i < this.FFixedRow.rows.length; i++) {\r\n var tr = this.FFixedRow.rows[i];\r\n if (tr) {\r\n var td = tr.cells[k];\r\n if (td) {\r\n td.style.width = cw + \"px\";\r\n td.style.maxWidth = cw + \"px\";\r\n }\r\n }\r\n }\r\n end;\r\n end;\r\n\r\n asm\r\n if (this.FNormalCells.rows.length > 0) {\r\n var tr = this.FNormalCells.rows[0];\r\n if (tr) {\r\n var td = tr.cells[k];\r\n if (td) {\r\n td.style.width = cw + \"px\";\r\n td.style.maxWidth = cw + \"px\";\r\n }\r\n }\r\n }\r\n end;\r\n end;\r\n\r\n for i := FixedRows to RowCount - 1 do\r\n begin\r\n k := i - FixedRows;\r\n rh := RowHeights[i];\r\n\r\n for j := FixedCols to ColCount - 1 do\r\n begin\r\n l := j - FixedCols;\r\n cw := ColWidths[j] - CELLPADDING;\r\n\r\n frh := rh;\r\n\r\n if (i = RowCount - 1) and HasHorzScrollBar and HasVertScrollBar then\r\n begin\r\n frh := rh + 20; //FNormalCells.parentElement.scrollheight;\r\n end;\r\n\r\n if FixedCols > 0 then\r\n begin\r\n asm\r\n var tr = this.FFixedCol.rows[k];\r\n if (tr) {\r\n tr.style.height = frh + \"px\";\r\n }\r\n end;\r\n\r\n if (i = RowCount - 1) and HasHorzScrollBar and HasVertScrollBar then\r\n begin\r\n asm\r\n var td = this.FFixedCol.rows[k].cells[0];\r\n if (td) {\r\n td.style.setProperty(\"vertical-align\",\"top\");\r\n }\r\n end;\r\n end;\r\n end;\r\n\r\n asm\r\n var tr = this.FNormalCells.rows[k];\r\n if (tr) {\r\n tr.style.height = rh + \"px\";\r\n\r\n td = tr.cells[l];\r\n if (td) {\r\n td.style.maxWidth = cw + \"px\";\r\n }\r\n }\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\n\r\nprocedure TCustomStringGrid.ValidateCell(ACol, ARow: integer;\r\n var AValue: string);\r\nbegin\r\n if Assigned(OnValidateEdit) then\r\n OnValidateEdit(Self, ACol, ARow, AValue);\r\nend;\r\n\r\n{$HINTS ON}\r\n\r\nfunction TCustomStringGrid.HandleMouseMove(Event: TJSMouseEvent): Boolean;\r\nvar\r\n rindex, cindex: integer;\r\n l, t: Single;\r\n ss: TShiftState;\r\nbegin\r\n rindex := -1;\r\n cindex := -1;\r\n\r\n asm\r\n if (Event.target.tagName.toLowerCase() == 'td')\r\n {\r\n cindex = Event.target.cellIndex;\r\n var tr = Event.target.parentElement;\r\n rindex = tr.rowIndex;\r\n }\r\n end;\r\n\r\n if (cindex >= 0) and (rindex >= 0) and (FStartCell.X >= 0) and (FStartCell.Y >= 0) then\r\n Selection := GridRect(FStartCell.X, FStartCell.Y, cindex + FixedCols, rindex + FixedRows);\r\n\r\n Result := true;\r\n\r\n XYToClient(Event.clientX, Event.clientY, l, t);\r\n\r\n ss := GetMouseEventShiftState(Event);\r\n\r\n MouseMove(ss, Trunc(l), Trunc(t));\r\nend;\r\n\r\nfunction TCustomStringGrid.HandleMouseUp(Event: TJSMouseEvent): Boolean;\r\nvar\r\n l, t: Single;\r\n ss: TShiftState;\r\n mb: TMouseButton;\r\nbegin\r\n asm\r\n TMSStringGridresetResize();\r\n end;\r\n\r\n FStartCell.X := -1;\r\n FStartCell.Y := -1;\r\n Result := false;\r\n\r\n Event.stopPropagation;\r\n Event.cancelBubble := true;\r\n\r\n XYToClient(Event.clientX, Event.clientY, l, t);\r\n\r\n ss := GetMouseEventShiftState(Event);\r\n mb := GetMouseEventButton(Event);\r\n\r\n MouseUp(mb, ss, Trunc(l), Trunc(t));\r\n\r\nend;\r\n\r\n{ TCustomGrid }\r\n\r\nprocedure TCustomGrid.Clear;\r\nbegin\r\n//\r\nend;\r\n\r\nprocedure TCustomGrid.ColCountChanged(delta: integer);\r\nbegin\r\nend;\r\n\r\nfunction TCustomGrid.ColOffset: integer;\r\nbegin\r\n Result := 0;\r\nend;\r\n\r\nfunction TCustomGrid.GetCells(ACol, ARow: integer): string;\r\nbegin\r\n Result := '';\r\nend;\r\n\r\nfunction TCustomGrid.GetCellsArray: TJSArray;\r\nvar\r\n i,j: integer;\r\n row: TJSArray;\r\n s:string;\r\nbegin\r\n Result := TJSArray.new;\r\n\r\n for i := RowOffset to RowCount - 1 do\r\n begin\r\n row := TJSArray.new;\r\n\r\n for j := ColOffset to ColCount - 1 do\r\n begin\r\n s := Cells[j,i];\r\n row.push(s);\r\n end;\r\n Result.push(row);\r\n end;\r\nend;\r\n\r\nprocedure TCustomGrid.GridChanged;\r\nbegin\r\n //\r\nend;\r\n\r\nprocedure TCustomGrid.RowCountChanged(delta: integer);\r\nbegin\r\nend;\r\n\r\nfunction TCustomGrid.RowOffset: integer;\r\nbegin\r\n Result := 0;\r\nend;\r\n\r\nprocedure TCustomGrid.SetCells(ACol, ARow: integer; const Value: string);\r\nbegin\r\n//\r\nend;\r\n\r\nprocedure TCustomGrid.SetColCount(const Value: integer);\r\nvar\r\n delta: integer;\r\nbegin\r\n if (FColCount <> Value) and (Value >= 0) then\r\n begin\r\n delta := Value - FColCount;\r\n FColCount := Value;\r\n if Assigned(ElementHandle) then\r\n begin\r\n ColCountChanged(delta);\r\n GridChanged;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TCustomGrid.SetRowCount(const Value: integer);\r\nvar\r\n delta: integer;\r\nbegin\r\n if (FRowCount <> Value) and (Value >= 0) then\r\n begin\r\n delta := Value - FRowCount;\r\n FRowCount := Value;\r\n if Assigned(ElementHandle) then\r\n begin\r\n RowCountChanged(delta);\r\n GridChanged;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TCustomGrid.SetCellsArray(const Value: TJSArray);\r\nvar\r\n i,j: integer;\r\n ja: TJSArray;\r\n jv: JSValue;\r\nbegin\r\n if Value.length + RowOffset > RowCount then\r\n RowCount := Value.length + RowOffset;\r\n\r\n for i := 0 to Value.length - 1 do\r\n begin\r\n ja := TJSArray(Value.elements[i]);\r\n if (ja is TJSArray) then\r\n begin\r\n if ja.length + ColOffset > ColCount then\r\n ColCount := ja.length + ColOffset;\r\n\r\n for j := 0 to ja.length - 1 do\r\n begin\r\n jv := ja.Elements[j];\r\n Cells[j + ColOffset,i + RowOffset] := js.toString(jv);\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\n{ TCustomTableControl }\r\n\r\n{$HINTS OFF}\r\nprocedure TCustomTableControl.AddButton(ACol, ARow: integer; AText: string; AStyle: string);\r\nvar\r\n s, ct: string;\r\n el: TJSHTMLElement;\r\nbegin\r\n if (ARow >= 0) and (ACol >= 0) and not HasCheckBox(ACol,ARow) then\r\n begin\r\n ct := Cells[ACol, ARow];\r\n if ct <> '' then\r\n ct := ' ' + ct;\r\n\r\n s := '';\r\n\r\n Cells[ACol,ARow] := s + ct;\r\n\r\n el := CellElements[ACol, ARow];\r\n BindCellButton(ACol, ARow, el);\r\n end;\r\n\r\nend;\r\n\r\nprocedure TCustomTableControl.AddButtonColumn(ACol: integer; AText,\r\n AStyle: string);\r\nvar\r\n i,s: integer;\r\nbegin\r\n s := 0;\r\n if RowHeader then\r\n s := 1;\r\n\r\n for i := s to RowCount - 1 do\r\n AddButton(ACol, i, AText, AStyle);\r\nend;\r\n\r\nprocedure TCustomTableControl.AddCheckBox(ACol, ARow: integer;\r\n Checked: boolean = false);\r\nvar\r\n s, ct: string;\r\n el: TJSHTMLElement;\r\nbegin\r\n if (ARow >= 0) and (ACol >= 0) and not HasCheckBox(ACol,ARow) then\r\n begin\r\n ct := Cells[ACol, ARow];\r\n if ct <> '' then\r\n ct := ' ' + ct;\r\n\r\n s := '';\r\n Cells[ACol,ARow] := s + ct;\r\n\r\n el := CellElements[ACol, ARow];\r\n BindCellCheckBox(ACol, ARow, el);\r\n end;\r\nend;\r\n\r\nprocedure TCustomTableControl.AddCheckBoxColumn(ACol: integer;\r\n Checked: boolean = false);\r\nvar\r\n i,s: integer;\r\nbegin\r\n s := 0;\r\n if RowHeader then\r\n s := 1;\r\n\r\n for i := s to RowCount - 1 do\r\n AddCheckBox(ACol, i, Checked);\r\nend;\r\n\r\nprocedure TCustomTableControl.AddProgress(ACol, ARow, APosition: integer;\r\n AStyle: string);\r\nvar\r\n prog: TJSElement;\r\nbegin\r\n if (ACol < ColCount) and (ARow < RowCount) then\r\n begin\r\n if not HasProgress(ACol,ARow) then\r\n begin\r\n prog := document.createElement('PROGRESS');\r\n prog['max'] := '100';\r\n prog['value'] := APosition.toString;\r\n TJSHTMLElement(prog).style.setProperty('width','100%');\r\n if AStyle <> '' then\r\n prog['class'] := AStyle;\r\n CellElements[ACol,ARow].insertBefore(prog, CellElements[ACol,ARow].firstChild);\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TCustomTableControl.AddSortIndicator(const ACol, ARow: integer;\r\n AIndicator: TGridSortIndicator);\r\nvar\r\n s,sid: string;\r\n sp: integer;\r\nbegin\r\n s := Cells[ACol,ARow];\r\n sp := pos(' 0 then\r\n s := Copy(s, 1, sp - 1);\r\n\r\n sid := Name + 'si'+ACol.ToString+'_'+ARow.ToString;\r\n\r\n case AIndicator of\r\n siNone: Cells[ACol,ARow] := s;\r\n siAscending: Cells[ACol,ARow] := s + ''+GlyphAscending+'';\r\n siDescending: Cells[ACol,ARow] := s + ''+GlyphDescending+'';\r\n end;\r\n\r\nend;\r\n\r\nprocedure TCustomTableControl.BindCellButton(ACol, ARow: integer;\r\n AElement: TJSHTMLElement);\r\nvar\r\n el: TJSHTMLElement;\r\nbegin\r\n el := TJSHTMLElement(AElement.firstChild);\r\n if Assigned(el) and (el.tagName = 'DIV') then\r\n el := TJSHTMLElement(el.firstChild);\r\n\r\n if Assigned(el) and (el.tagName = 'BUTTON') then\r\n begin\r\n el.addEventListener('click', FHandleButtonClickPtr);\r\n end;\r\nend;\r\n\r\nprocedure TCustomTableControl.BindCellCheckBox(ACol, ARow: integer;\r\n AElement: TJSHTMLElement);\r\nvar\r\n el: TJSHTMLElement;\r\nbegin\r\n el := TJSHTMLElement(AElement.firstChild);\r\n\r\n if Assigned(el) and (el.tagName = 'DIV') then\r\n el := TJSHTMLElement(el.firstChild);\r\n\r\n if Assigned(el) and (el.tagName = 'INPUT') then\r\n begin\r\n if (lowercase(el.getAttribute('TYPE'))= 'checkbox') then\r\n begin\r\n el.addEventListener('click', FHandleCheckClickPtr);\r\n end;\r\n end;\r\n\r\nend;\r\n\r\nprocedure TCustomTableControl.BindEvents;\r\nbegin\r\n inherited;\r\n RenderGridScript;\r\nend;\r\n\r\nprocedure TCustomTableControl.Clear;\r\nvar\r\n i,j: integer;\r\nbegin\r\n for i := 0 to RowCount - 1 do\r\n for j := 0 to ColCount - 1 do\r\n begin\r\n Cells[j,i] := '';\r\n end;\r\nend;\r\n\r\nprocedure TCustomTableControl.ClearData;\r\nbegin\r\n Clear;\r\nend;\r\n\r\nprocedure TCustomTableControl.ClearMethodPointers;\r\nbegin\r\n inherited;\r\n FHandleCheckClickPtr := nil;\r\n FHandleButtonClickPtr := nil;\r\nend;\r\n\r\nprocedure TCustomTableControl.ColCountChanged(delta: integer);\r\nvar\r\n c,fromrow, torow: integer;\r\n dtb,cc: string;\r\n\r\nbegin\r\n if IsUpdating or not Assigned(FTable) then\r\n Exit;\r\n\r\n cc := '';\r\n dtb := '';\r\n if (csDesigning in ComponentState) then\r\n begin\r\n dtb := '1px dashed gray';\r\n cc := ' ';\r\n end;\r\n\r\n fromrow := 0;\r\n torow := RenderRowCount;\r\n\r\n if RowHeader then\r\n torow := torow + 1;\r\n\r\n if Header.Visible then\r\n begin\r\n Header.FElement.setAttribute('colspan',ColCount.ToString);\r\n fromrow := 1;\r\n torow := torow + 1;\r\n end;\r\n\r\n if Footer.Visible then\r\n begin\r\n Footer.FElement.setAttribute('colspan',ColCount.ToString);\r\n end;\r\n\r\n if delta > 0 then\r\n begin\r\n asm\r\n var i = 0;\r\n var j = 0;\r\n var k = 0;\r\n var tr = undefined;\r\n var td = undefined;\r\n\r\n for(j = fromrow; j < torow; j++)\r\n {\r\n tr = this.FTable.rows[j];\r\n\r\n if (tr == undefined) { continue; }\r\n\r\n k = tr.cells.length;\r\n\r\n for(i = 0; i < delta; i++)\r\n {\r\n if ((j == fromrow) && (this.FRowHeader))\r\n {\r\n var th = document.createElement('th');\r\n th.setAttribute('scope','col');\r\n tr.appendChild(th);\r\n this.SetTableCell(i,j,th,cc);\r\n }\r\n else\r\n {\r\n if ((tr.cells.length == 0) && (this.FColHeader))\r\n {\r\n var th = document.createElement('th');\r\n th.setAttribute('scope','row');\r\n this.SetTableCell(i,j,th, cc);\r\n tr.appendChild(th);\r\n }\r\n else\r\n {\r\n td = tr.insertCell();\r\n td = tr.cells[k];\r\n this.SetTableCell(i,j,td, cc);\r\n }\r\n }\r\n }\r\n }\r\n end;\r\n\r\n if DragMode = dmAutomatic then\r\n EnableDrag;\r\n end;\r\n\r\n if delta < 0 then\r\n begin\r\n asm\r\n var i = 0;\r\n var j = 0;\r\n var k = 0;\r\n var tr = undefined;\r\n\r\n for(j = fromrow; j < torow; j++)\r\n {\r\n tr = this.FTable.rows[j];\r\n\r\n if (tr == undefined) { continue; }\r\n\r\n k = tr.cells.length;\r\n\r\n for(i = 0; i < -delta; i++)\r\n {\r\n if ((k - i - 1 < k) && (k - i - 1 >= 0)) {\r\n tr.deleteCell(k - i - 1);\r\n }\r\n }\r\n }\r\n end;\r\n end;\r\n\r\nend;\r\n{$HINTS ON}\r\n\r\nfunction TCustomTableControl.ColOffset: integer;\r\nbegin\r\n if ColHeader then\r\n Result := 1\r\n else\r\n Result := 0;\r\nend;\r\n\r\nconstructor TCustomTableControl.Create(AOwner: TComponent);\r\nbegin\r\n FHeader := nil;\r\n FFooter := nil;\r\n\r\n inherited;\r\n TabStop := false;\r\nend;\r\n\r\nfunction TCustomTableControl.CreateElement: TJSElement;\r\nbegin\r\n Result := document.createElement('DIV');\r\n FTable := nil;\r\nend;\r\n\r\nprocedure TCustomTableControl.CreateInitialize;\r\nbegin\r\n inherited;\r\n FOptions := TTableControlOptions.Create(Self);\r\n\r\n FData := nil;\r\n FUnfiltered := nil;\r\n if (FData = nil) then\r\n begin\r\n if not Assigned(FHeader) then\r\n FHeader := TTableControlHeader.Create(Self);\r\n if not Assigned(FFooter) then\r\n FFooter := TTableControlHeader.Create(Self);\r\n\r\n FPaging := TTableControlPaging.Create(Self);\r\n FHiddenCols := TStringList.Create;\r\n FHiddenCols.Duplicates := dupIgnore;\r\n end;\r\n asm\r\n this.FData = [];\r\n this.FData.length = 11;\r\n var i;\r\n for(i=0;i<11;i++) {\r\n if (this.FData[i] == null) this.FData[i] = [];\r\n\r\n this.FData[i].length = 5;\r\n }\r\n end;\r\n\r\n// Color := clWindow;\r\n // TabStop := false;\r\n FColCount := 5;\r\n FRowCount := 10;\r\n FRowHeader := true;\r\n FColHeader := true;\r\n FRowIndex := -1;\r\n FSelectionColor := $FF8F5B;\r\n FSelectionTextColor := $FFFFFF;\r\n Enabled := true;\r\n\r\n if (csDesigning in ComponentState) then\r\n begin\r\n Width := 400;\r\n Height := 300;\r\n end;\r\nend;\r\n\r\nprocedure TCustomTableControl.DataBeginUpdate;\r\nbegin\r\n //\r\nend;\r\n\r\nprocedure TCustomTableControl.DataEndUpdate;\r\nbegin\r\n //\r\nend;\r\n\r\nprocedure TCustomTableControl.DataInsertRow(AInsertPosition: Integer);\r\nbegin\r\n InsertRow(AInsertPosition);\r\nend;\r\n\r\ndestructor TCustomTableControl.Destroy;\r\nbegin\r\n FHiddenCols.Free;\r\n FOptions.Free;\r\n FHeader.Free;\r\n FFooter.Free;\r\n FPaging.Free;\r\n inherited;\r\nend;\r\n\r\nprocedure TCustomTableControl.DisableDrag;\r\n procedure RemoveDraggableAttribute(AElement: TJSElement);\r\n var\r\n I: Integer;\r\n begin\r\n for I := 0 to AElement.children.length - 1 do\r\n begin\r\n if TJSElement(AElement.children[I]).tagName = 'TD' then\r\n begin\r\n TJSElement(AElement.children[I]).removeAttribute('draggable');\r\n RemoveDraggableAttribute(TJSElement(AElement.children[I]));\r\n end\r\n else\r\n RemoveDraggableAttribute(TJSElement(AElement.children[I]));\r\n end;\r\n end;\r\nbegin\r\n if not Assigned(Container) then\r\n Exit;\r\n\r\n RemoveDraggableAttribute(Container);\r\nend;\r\n\r\nprocedure TCustomTableControl.DoButtonClick(ACol, ARow: integer);\r\nbegin\r\n if Assigned(OnButtonClick) then\r\n OnButtonClick(Self, ACol, ARow);\r\nend;\r\n\r\nprocedure TCustomTableControl.DoCheckClick(ACol, ARow: Longint;\r\n Checked: boolean);\r\nbegin\r\n if Assigned(OnCheckClick) then\r\n OnCheckClick(Self, ACol, ARow, Checked);\r\nend;\r\n\r\nfunction TCustomTableControl.DoHttpAbort(Event: TEventListenerEvent): boolean;\r\nbegin\r\n if Assigned(OnHttpRequestError) then\r\n OnHttpRequestError(Self);\r\n\r\n Result := true;\r\nend;\r\n\r\nfunction TCustomTableControl.DoHttpLoadCsv(Event: TEventListenerEvent): boolean;\r\nvar\r\n sl: TStringList;\r\n req: TJSXMLHttpRequest;\r\nbegin\r\n req := TJSXMLHttpRequest(Event.target);\r\n\r\n if (req.status >= 200) and (req.status <= 208) then\r\n begin\r\n sl := TStringList.Create;\r\n sl.Text := req.responseText;\r\n\r\n try\r\n LoadFromStringList(sl);\r\n finally\r\n sl.Free;\r\n end;\r\n\r\n if Assigned(OnHttpRequestSuccess) then\r\n OnHttpRequestSuccess(Self);\r\n end;\r\n\r\n Result := true;\r\nend;\r\n\r\n{$HINTS OFF}\r\nfunction TCustomTableControl.DoHttpLoadJson(Event: TEventListenerEvent): boolean;\r\nvar\r\n J: TJSObject;\r\n req: TJSXMLHttpRequest;\r\n\r\nbegin\r\n req := TJSXMLHttpRequest(Event.target);\r\n\r\n if (req.status >= 200) and (req.status <= 208) then\r\n begin\r\n J := TJSJSON.parseObject(req.responseText);\r\n\r\n LoadFromJSON(J, FDataNode);\r\n\r\n if Assigned(OnHttpRequestSuccess) then\r\n OnHttpRequestSuccess(Self);\r\n end;\r\n\r\n Result := true;\r\nend;\r\n\r\nfunction TCustomTableControl.DoHttpLoadPageJson(Event: TEventListenerEvent): boolean;\r\nvar\r\n J: TJSObject;\r\n req: TJSXMLHttpRequest;\r\n\r\nbegin\r\n req := TJSXMLHttpRequest(Event.target);\r\n\r\n if (req.status >= 200) and (req.status <= 208) then\r\n begin\r\n J := TJSJSON.parseObject(req.responseText);\r\n\r\n LoadPageFromJSON(J, FDataNode);\r\n\r\n if Assigned(OnHttpRequestSuccess) then\r\n OnHttpRequestSuccess(Self);\r\n end;\r\n\r\n Result := true;\r\nend;\r\n\r\n\r\nprocedure TCustomTableControl.DoHttpRequest(ARequest: TJSXMLHttpRequest);\r\nvar\r\n LRequestRec: TJSXMLHttpRequestRecord;\r\nbegin\r\n if Assigned(OnHttpRequest) then\r\n begin\r\n LRequestRec.req := ARequest;\r\n OnHttpRequest(Self, LRequestRec);\r\n end;\r\nend;\r\n\r\nprocedure TCustomTableControl.DoSelectPage(AIndex: integer);\r\nvar\r\n Allow: boolean;\r\n DoDefault: boolean;\r\n\r\nbegin\r\n Allow := true;\r\n DoDefault := true;\r\n\r\n if Assigned(OnSelectPage) then\r\n OnSelectPage(Self, AIndex, Allow, DoDefault);\r\n\r\n if Allow then\r\n SelectPage(AIndex, DoDefault);\r\nend;\r\n\r\nprocedure TCustomTableControl.DoSortClick(ACol, ARow: Longint;\r\n ASortIndicator: TGridSortIndicator);\r\nvar\r\n i: integer;\r\nbegin\r\n FSortIndex := ACol;\r\n\r\n for i := 0 to ColCount - 1 do\r\n begin\r\n SelectSortIndicator(i,ARow,i = ACol);\r\n end;\r\n\r\n FSortDirection := ASortIndicator;\r\n\r\n if Assigned(OnSortClick) then\r\n OnSortClick(Self, ACol, ARow, ASortIndicator);\r\n\r\n Sort(ACol, ASortIndicator);\r\nend;\r\n\r\nprocedure TCustomTableControl.EnableColResize;\r\nvar\r\n TableName: string;\r\n ResizeEnabled: Boolean;\r\n ridx: integer;\r\nbegin\r\n TableName := Name;\r\n ResizeEnabled := Options.ResizeColumns;\r\n\r\n if not (csDesigning in ComponentState) then\r\n begin\r\n if Header.Visible then\r\n ridx := 1\r\n else\r\n ridx := 0;\r\n\r\n asm\r\n resizableGrid(TableName, ResizeEnabled, ridx);\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TCustomTableControl.EnableDrag;\r\n procedure AddDraggableAttribute(AElement: TJSElement);\r\n var\r\n I: Integer;\r\n begin\r\n for I := 0 to AElement.children.length - 1 do\r\n begin\r\n if TJSElement(AElement.children[I]).tagName = 'TD' then\r\n begin\r\n TJSElement(AElement.children[I]).Attrs['draggable'] := 'true';\r\n AddDraggableAttribute(TJSElement(AElement.children[I]));\r\n end\r\n else\r\n AddDraggableAttribute(TJSElement(AElement.children[I]));\r\n end;\r\n end;\r\nbegin\r\n if not Assigned(Container) then\r\n Exit;\r\n\r\n AddDraggableAttribute(Container);\r\nend;\r\n\r\nfunction TCustomTableControl.FindCell(Condition: string; CaseSensitive: boolean = true; AllCells: boolean = false): TGridCoord;\r\nvar\r\n i,j: integer;\r\nbegin\r\n if ColHeader and not AllCells then\r\n i := 1\r\n else\r\n i := 0;\r\n\r\n if RowHeader then\r\n j := 1\r\n else\r\n j := 0;\r\n\r\n FFindCase := CaseSensitive;\r\n FFindCondition := Condition;\r\n\r\n Result := FindFrom(i,j,Condition, CaseSensitive, AllCells);\r\nend;\r\n\r\nfunction TCustomTableControl.FindFrom(ACol, ARow: integer; Condition: string; CaseSensitive: boolean = true; AllCells: boolean = false): TGridCoord;\r\nvar\r\n i,j,r,pg: integer;\r\n sr,sc: integer;\r\n cd: string;\r\n found: boolean;\r\nbegin\r\n sc := ACol;\r\n\r\n Result.X := -1;\r\n Result.Y := -1;\r\n\r\n for i := ARow to RowCount - 1 do\r\n begin\r\n for j := sc to ColCount - 1 do\r\n begin\r\n asm\r\n cd = this.FData[i][j];\r\n found = (cd != undefined);\r\n end;\r\n\r\n if found and MatchStr('*' + Condition + '*', cd, CaseSensitive) then\r\n begin\r\n Result.X := j;\r\n Result.Y := i;\r\n FFindCol := j;\r\n FFindRow := i;\r\n\r\n if Paging.Enabled then\r\n begin\r\n pg := (i - ARow) div Paging.Size;\r\n SelectPage(pg);\r\n FFindRow := i mod Paging.Size;\r\n if FFindRow < ARow then\r\n FFindRow := Paging.Size;\r\n Result.Y := FFindRow;\r\n end;\r\n\r\n ScrollRowInView(FFindRow);\r\n SelectCell(j,FFindRow);\r\n Exit;\r\n end;\r\n end;\r\n\r\n if ColHeader and not AllCells then\r\n sc := 1\r\n else\r\n sc := 0;\r\n end;\r\nend;\r\n\r\nfunction TCustomTableControl.FindNext: TGridCoord;\r\nbegin\r\n if FFindCol + 1 = RowCount then\r\n begin\r\n if ColHeader then\r\n FFindCol := 1\r\n else\r\n FFindCol := 0;\r\n FFindRow := FFindRow + 1;\r\n end\r\n else\r\n FFindCol := FFindCol + 1;\r\n\r\n Result := FindFrom(FFindCol, FFindRow, FFindCondition, FFindCase);\r\nend;\r\n\r\n{$HINTS ON}\r\n\r\nfunction TCustomTableControl.GetButtonElement(ACol,\r\n ARow: integer): TJSHTMLElement;\r\nvar\r\n el: TJSElement;\r\nbegin\r\n Result := nil;\r\n\r\n if (ACol < ColCount) and (ARow < RowCount) then\r\n begin\r\n el := CellElements[ACol,ARow];\r\n el := TJSElement(el.firstChild);\r\n if Assigned(el) and (el.tagName = 'DIV') then\r\n el := TJSElement(el.firstChild);\r\n\r\n if Assigned(el) and (el.tagName = 'BUTTON') then\r\n begin\r\n Result := TJSHTMLElement(el);\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TCustomTableControl.GetCellChildren(ACol, ARow: integer;\r\n AField: TField; AValue: string; AElement: TJSHTMLElement);\r\nvar\r\n LElementRec: TJSHTMLElementRecord;\r\nbegin\r\n if Assigned(OnGetCellChildren) then\r\n begin\r\n LElementRec.element := AElement;\r\n OnGetCellChildren(Self, ACol, ARow, AField, AValue, LElementRec);\r\n end;\r\nend;\r\n\r\nprocedure TCustomTableControl.GetCellClassName(ACol, ARow: integer;\r\n AField: TField; AValue: string; var AClassName: string);\r\nbegin\r\n if Assigned(OnGetCellClass) then\r\n OnGetCellClass(Self, ACol, ARow, AField, AValue, AClassName);\r\nend;\r\n\r\nprocedure TCustomTableControl.GetCellData(ACol, ARow: integer; AField: TField;\r\n var AValue: string);\r\nbegin\r\n if Assigned(OnGetCellData) then\r\n OnGetCellData(Self, ACol, ARow, AField, AValue);\r\nend;\r\n\r\nfunction TCustomTableControl.GetCellElement(col, row: integer): TJSHTMLElement;\r\nvar\r\n res: TJSHTMLElement;\r\n rh,fr: integer;\r\nbegin\r\n res := nil;\r\n\r\n rh := 0;\r\n if Header.Visible then\r\n rh := 1;\r\n\r\n fr := 0;\r\n if ColHeader then\r\n fr := 1;\r\n\r\n if (col >= 0) and (row >= 0) and (col < ColCount) and (row <= RenderRowCount + rh + fr) and Assigned(FTable) then\r\n begin\r\n asm\r\n if ((this.FTable.rows.length > row + rh) && (this.FTable.rows[row + rh].cells.length > col)) {\r\n res = this.FTable.rows[row + rh].cells[col];\r\n }\r\n end;\r\n end;\r\n\r\n Result := res;\r\nend;\r\n\r\nfunction TCustomTableControl.GetCells(Col, Row: integer): string;\r\nvar\r\n res: string;\r\n hdr,trc: integer;\r\nbegin\r\n Result := '';\r\n\r\n hdr := 0;\r\n if Header.Visible then\r\n hdr := 1;\r\n\r\n trc := RenderRowCount;\r\n if RowHeader then\r\n inc(trc);\r\n\r\n if (col >= 0) and (row >= 0) and (col < ColCount) {and (row < trc)} and (hdr < 2) then\r\n begin\r\n asm\r\n// res = this.FData[row][col];\r\n// if (res == undefined) {\r\n var td = this.FTable.rows[row + hdr].cells[col];\r\n //res = td.innerHTML;\r\n\r\n res = td.textContent;\r\n if (td.childElementCount > 0) {\r\n if (td.firstChild.tagName == 'DIV')\r\n res = td.firstChild.textContent;\r\n }\r\n// }\r\n end;\r\n\r\n Result := res;\r\n end;\r\nend;\r\n\r\nfunction TCustomTableControl.GetCheckElement(ACol,\r\n ARow: integer): TJSHTMLElement;\r\nvar\r\n el: TJSElement;\r\n s: string;\r\nbegin\r\n Result := nil;\r\n\r\n if (ACol < ColCount) and (ARow < RowCount) then\r\n begin\r\n el := TJSElement(CellElements[ACol,ARow].firstChild);\r\n\r\n if Assigned(el) and (el is TJSElement) and (uppercase(el.tagName) = 'DIV') then\r\n el := TJSElement(el.firstChild);\r\n\r\n if Assigned(el) and (el is TJSElement) then\r\n begin\r\n s := '';\r\n if el.hasAttribute('type') then\r\n s := el.getAttribute('type');\r\n\r\n if (s<>'') and (uppercase(s) = 'CHECKBOX') then\r\n begin\r\n Result := TJSHTMLElement(el);\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TCustomTableControl.GetDataRowCount: Integer;\r\nbegin\r\n if RowHeader or (Paging.Enabled = false) then\r\n Result := RowCount - 1\r\n else\r\n Result := RowCount;\r\nend;\r\n\r\nprocedure TCustomTableControl.GetMethodPointers;\r\nbegin\r\n inherited;\r\n FHandleCheckClickPtr := @HandleCheckBoxClick;\r\n FHandleButtonClickPtr := @HandleButtonClick;\r\nend;\r\n\r\nfunction TCustomTableControl.GetProgressElement(ACol,\r\n ARow: integer): TJSHTMLElement;\r\nvar\r\n el: TJSElement;\r\nbegin\r\n Result := nil;\r\n\r\n if (ACol < ColCount) and (ARow < RowCount) then\r\n begin\r\n el := TJSElement(CellElements[ACol,ARow].firstChild);\r\n if Assigned(el) and (el is TJSElement) then\r\n begin\r\n if (uppercase(el.tagName) = 'PROGRESS') then\r\n begin\r\n Result := TJSHTMLElement(el);\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TCustomTableControl.GetRowClassName(row: integer): TElementClassName;\r\nvar\r\n res: string;\r\nbegin\r\n res := '';\r\n\r\n if (row >= 0) and (row < RowCount) then\r\n begin\r\n asm\r\n var tr = this.FTable.rows[row];\r\n res = tr.getAttribute('class');\r\n end;\r\n end;\r\n\r\n Result := res;\r\nend;\r\n\r\nfunction TCustomTableControl.HandleButtonClick(Event: TJSEvent): Boolean;\r\nvar\r\n rindex, cindex: integer;\r\nbegin\r\n Result := true;\r\n rindex := -1;\r\n cindex := -1;\r\n\r\n asm\r\n var el = Event.target;\r\n var d = el.parentElement;\r\n if (d.tagName.toLowerCase() == 'div') {\r\n d = d.parentElement;\r\n }\r\n\r\n if (d.tagName.toLowerCase() == 'td') {\r\n cindex = d.cellIndex;\r\n var tr = d.parentElement;\r\n rindex = tr.rowIndex;\r\n }\r\n end;\r\n\r\n if Paging.Enabled then\r\n begin\r\n rindex := rindex + Paging.Index * Paging.Size;\r\n end;\r\n\r\n if (rindex <> -1) and (cindex <> -1) then\r\n begin\r\n DoButtonClick(cindex, rindex);\r\n end;\r\nend;\r\n\r\nfunction TCustomTableControl.HandleCheckBoxClick(Event: TJSEvent): Boolean;\r\nvar\r\n rindex, cindex: integer;\r\n chk: boolean;\r\nbegin\r\n Result := true;\r\n rindex := -1;\r\n cindex := -1;\r\n\r\n asm\r\n var el = Event.target;\r\n chk = el.checked;\r\n var d = el.parentElement;\r\n if (d.tagName.toLowerCase() == 'div')\r\n {\r\n d = d.parentElement;\r\n }\r\n if (d.tagName.toLowerCase() == 'td')\r\n {\r\n cindex = d.cellIndex;\r\n var tr = d.parentElement;\r\n rindex = tr.rowIndex;\r\n }\r\n end;\r\n\r\n if Paging.Enabled then\r\n begin\r\n rindex := rindex + Paging.Index * Paging.Size;\r\n end;\r\n\r\n if (rindex <> -1) and (cindex <> -1) then\r\n begin\r\n DoCheckClick(cindex, rindex, chk);\r\n end;\r\nend;\r\n\r\nfunction TCustomTableControl.HandleDoClick(Event: TJSMouseEvent): Boolean;\r\nvar\r\n c,r: integer;\r\n tgt: TJSElement;\r\n sd: TGridSortIndicator;\r\n tag,s: string;\r\n\r\nbegin\r\n tgt := Event.targetElement;\r\n\r\n if Uppercase(tgt.tagName) = 'BUTTON' then\r\n begin\r\n// HandleButtonClick(Event);\r\n// inherited;\r\n Exit;\r\n end;\r\n\r\n if Uppercase(tgt.tagName) = 'INPUT' then\r\n begin\r\n s := tgt['type'];\r\n if Assigned(s) and (uppercase(s) = 'CHECKBOX') then\r\n begin\r\n// HandleCheckBoxClick(Event);\r\n// inherited;\r\n Exit;\r\n end;\r\n end;\r\n\r\n\r\n sd := siNone;\r\n\r\n if tgt.tagName = 'SPAN' then\r\n begin\r\n if tgt['sort']= 'up' then\r\n begin\r\n sd := siAscending;\r\n end\r\n else\r\n if tgt['sort']= 'dn' then\r\n begin\r\n sd := siDescending;\r\n end;\r\n end;\r\n\r\n repeat\r\n asm\r\n tag = tgt.tagName.toLowerCase();\r\n end;\r\n if (tag <> 'td') and (tag <> 'th') then\r\n tgt := tgt.parentElement;\r\n until (tag = 'td') or (tag = 'th') or (tgt = nil);\r\n\r\n if (tag = 'td') or (tag = 'th') then\r\n begin\r\n asm\r\n c = tgt.cellIndex;\r\n var tr = tgt.parentElement;\r\n r = tr.rowIndex;\r\n end;\r\n\r\n if Header.Visible then\r\n dec(r);\r\n\r\n// // handle row selection\r\n// if (tag = 'td') and Enabled then\r\n// begin\r\n// RowIndex := r;\r\n// end;\r\n\r\n if Paging.Enabled then\r\n begin\r\n r := r + Paging.Index * Paging.Size;\r\n end;\r\n\r\n if Assigned(OnClickCell) and (sd = siNone) and Enabled then\r\n OnClickCell(Self, c, r);\r\n end;\r\n\r\n if sd = siAscending then\r\n begin\r\n DoSortClick(c,r,siDescending);\r\n SetSortIndicator(c,r, siDescending);\r\n end\r\n else\r\n if sd = siDescending then\r\n begin\r\n DoSortClick(c,r, siAscending);\r\n SetSortIndicator(c,r, siAscending);\r\n end;\r\n\r\n if Assigned(OnClick) then\r\n OnClick(Self);\r\n\r\n Result := true;\r\nend;\r\n\r\nfunction TCustomTableControl.HandleDoDblClick(Event: TJSMouseEvent): Boolean;\r\nvar\r\n c,r: integer;\r\n el: TJSElement;\r\nbegin\r\n el := Event.targetElement;\r\n\r\n if (el.tagName = 'TD') or (el.tagName = 'TH') then\r\n begin\r\n asm\r\n c = el.cellIndex;\r\n var tr = el.parentElement;\r\n r = tr.rowIndex;\r\n end;\r\n\r\n if Paging.Enabled then\r\n begin\r\n r := r + Paging.Index * Paging.Size;\r\n end;\r\n\r\n if Assigned(OnDblClickCell) then\r\n OnDblClickCell(Self, c, r);\r\n end;\r\n Result := true;\r\nend;\r\n\r\nfunction TCustomTableControl.HandleDoKeyPress(Event: TJSKeyBoardEvent): Boolean;\r\nbegin\r\n inherited;\r\n\r\n Result := true;\r\nend;\r\n\r\n{$HINTS OFF}\r\nfunction TCustomTableControl.HandleDoMouseDown(Event: TJSMouseEvent): Boolean;\r\nvar\r\n r,maxr: integer;\r\n tgt,tr: TJSElement;\r\n sd: TGridSortIndicator;\r\n tag: string;\r\n\r\nbegin\r\n Result := true;\r\n\r\n if not Enabled then\r\n Exit;\r\n\r\n tgt := Event.targetElement;\r\n tag := '';\r\n sd := siNone;\r\n tr := nil;\r\n\r\n repeat\r\n asm\r\n tag = tgt.tagName.toLowerCase();\r\n end;\r\n if (tag <> 'td') and (tag <> 'th') then\r\n tgt := tgt.parentElement;\r\n until (tag = 'td') or (tag = 'th') or (tgt = nil);\r\n\r\n if (tag = 'td') or (tag = 'th') then\r\n begin\r\n asm\r\n tr = tgt.parentElement;\r\n r = tr.rowIndex;\r\n end;\r\n if Header.Visible then\r\n dec(r);\r\n\r\n if Paging.Enabled then\r\n maxr := Paging.Size\r\n else\r\n maxr := RowCount;\r\n\r\n if r > maxr then\r\n Exit;\r\n\r\n // handle row selection\r\n if (tag = 'td') or (tag = 'th') and Enabled then\r\n begin\r\n asm\r\n tag = tr.parentElement.tagName.toLowerCase();\r\n end;\r\n if tag <> 'thead' then // can't select fixed col\r\n RowIndex := r;\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TCustomTableControl.HandleDoMouseMove(Event: TJSMouseEvent): Boolean;\r\nvar\r\n IsAutoWidth: Boolean;\r\nbegin\r\n inherited;\r\n\r\n IsAutoWidth := (WidthStyle in [ssAuto]);\r\n asm\r\n autoWidth = IsAutoWidth;\r\n resizeColumn(Event);\r\n end;\r\n\r\n Result := True;\r\nend;\r\n{$HINTS ON}\r\n\r\nfunction TCustomTableControl.HandleDoMouseUp(Event: TJSMouseEvent): Boolean;\r\nbegin\r\n inherited;\r\n\r\n asm\r\n resetResize();\r\n end;\r\n\r\n Result := True;\r\nend;\r\n\r\nfunction TCustomTableControl.HasCheckBox(ACol, ARow: integer): boolean;\r\nvar\r\n el: TJSElement;\r\nbegin\r\n Result := false;\r\n if (ACol < ColCount) and (ARow < RowCount) then\r\n begin\r\n el := GetCheckElement(ACol,ARow);\r\n Result := Assigned(el);\r\n end;\r\nend;\r\n\r\nfunction TCustomTableControl.HasProgress(const ACol, ARow: integer): boolean;\r\nvar\r\n el: TJSElement;\r\nbegin\r\n Result := false;\r\n if (ACol < ColCount) and (ARow < RowCount) then\r\n begin\r\n el := GetProgressElement(ACol,ARow);\r\n Result := Assigned(el);\r\n end;\r\nend;\r\n\r\nfunction TCustomTableControl.HasSortIndicator(const ACol,\r\n ARow: integer): boolean;\r\nvar\r\n el: TJSElement;\r\n sid: string;\r\n\r\nbegin\r\n sid := Name + 'si'+ACol.ToString+'_'+ARow.ToString;\r\n\r\n el := document.getElementById(sid);\r\n\r\n Result := Assigned(el);\r\nend;\r\n\r\nprocedure TCustomTableControl.InitSample(AInitMethod: TInitMethod);\r\nvar\r\n i,j: integer;\r\n trc: integer;\r\nbegin\r\n trc := RenderRowCount;\r\n\r\n if RowHeader then\r\n inc(trc);\r\n\r\n for i := 0 to trc - 1 do\r\n begin\r\n for j := 0 to ColCount - 1 do\r\n begin\r\n case AInitMethod of\r\n imRandom:\r\n Cells[j,i] := IntToStr(Random(100));\r\n imLinear:\r\n Cells[j,i] := IntToStr(j)+':'+IntToStr(i);\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\n{$HINTS OFF}\r\nprocedure TCustomTableControl.HideColumn(const Index: integer);\r\nvar\r\n i,fr: integer;\r\n tr,td: TJSHTMLElement;\r\n\r\nbegin\r\n if (Index <0) or (Index > ColCount) then\r\n Exit;\r\n\r\n if Footer.Visible then\r\n fr := 1\r\n else\r\n fr := 0;\r\n\r\n asm\r\n for(i=0; i < this.FTable.rows.length - fr; i++)\r\n {\r\n tr = this.FTable.rows[i];\r\n td = tr.cells[Index];\r\n td.style.setProperty('display','none');\r\n }\r\n end;\r\n\r\n FHiddenCols.Add(Index.ToString);\r\nend;\r\n\r\nfunction TCustomTableControl.IsHiddenColumn(const Index: integer): boolean;\r\nbegin\r\n Result := FHiddenCols.IndexOf(Index.ToString) <> -1;\r\nend;\r\n\r\nprocedure TCustomTableControl.UnHideColumn(const Index: integer);\r\nvar\r\n i,idx: integer;\r\n tr,td: TJSHTMLElement;\r\nbegin\r\n if (Index <0) or (Index > ColCount) then\r\n Exit;\r\n\r\n idx := FHiddenCols.IndexOf(Index.ToString);\r\n\r\n if idx = -1 then\r\n Exit;\r\n\r\n FHiddenCols.Delete(idx);\r\n\r\n asm\r\n for(i=0; i RowCount) then\r\n Exit;\r\n\r\n if not Assigned(FTable) then\r\n Exit;\r\n\r\n asm\r\n var tr = this.FTable.rows[Index];\r\n tr.style.setProperty('display','none');\r\n end;\r\nend;\r\n\r\nprocedure TCustomTableControl.UnHideRow(const Index: integer);\r\nbegin\r\n if (Index <0) or (Index > RowCount) then\r\n Exit;\r\n\r\n asm\r\n var tr = this.FTable.rows[Index];\r\n tr.style.removeProperty('display');\r\n end;\r\nend;\r\n\r\nprocedure TCustomTableControl.InsertRow(Index: integer);\r\nvar\r\n i,cnt: integer;\r\n ch: boolean;\r\nbegin\r\n if (Index <0) or (Index > RowCount) then\r\n Exit;\r\n\r\n cnt := ColCount;\r\n ch := ColHeader;\r\n\r\n asm\r\n var tr = this.FTable.insertRow(Index);\r\n\r\n for(i = 0; i < cnt; i++)\r\n {\r\n if ((i == 0) && (ch)) {\r\n var th = document.createElement('th');\r\n th.setAttribute('scope','row');\r\n tr.appendChild(th);\r\n }\r\n else\r\n {\r\n tr.insertCell();\r\n }\r\n }\r\n end;\r\nend;\r\n\r\nprocedure TCustomTableControl.Invalidate;\r\nbegin\r\n inherited;\r\n\r\n if not (csloading in ComponentState) then\r\n Exit;\r\n\r\n Rerendergrid;\r\n if Header.Visible then\r\n Header.Update(Paging.Size, RowCount, Paging.Index);\r\n\r\n if Footer.Visible then\r\n Footer.Update(Paging.Size, RowCount, Paging.Index);\r\nend;\r\n\r\nfunction TCustomTableControl.InVisiblePage(var ARow: integer): boolean;\r\nbegin\r\n if Paging.Enabled then\r\n begin\r\n Result := (ARow >= Paging.Size * Paging.Index) and (ARow < Paging.Size * (Paging.Index + 1));\r\n ARow := ARow - (Paging.Size * Paging.Index);\r\n end\r\n else\r\n Result := ARow <= RowCount;\r\nend;\r\n\r\nprocedure TCustomTableControl.KeyDown(var Key: Word; Shift: TShiftState);\r\nvar\r\n fr: integer;\r\nbegin\r\n inherited;\r\n\r\n if not Enabled then\r\n Exit;\r\n\r\n fr := 0;\r\n if RowHeader then\r\n fr := 1;\r\n\r\n if Key = VK_UP then\r\n RowIndex := Max(fr, RowIndex - 1);\r\n\r\n if Key = VK_DOWN then\r\n RowIndex := Min(RowCount - 1, RowIndex + 1);\r\n\r\n if Key = VK_HOME then\r\n RowIndex := fr;\r\n\r\n if Key = VK_END then\r\n RowIndex := RowCount - 1;\r\n\r\n if Key = VK_NEXT then\r\n RowIndex := Min(RowCount - 1, RowIndex + 4);\r\n\r\n if Key = VK_PRIOR then\r\n RowIndex := Max(fr, RowIndex - 4);\r\nend;\r\n\r\n{$HINTS ON}\r\n\r\nprocedure TCustomTableControl.LoadFromStringList(AStrings: TStrings);\r\nvar\r\n firstrow: integer;\r\n arow: TStringList;\r\n i,j,cr: integer;\r\n cd, cn: string;\r\n ce: TJSHTMLElement;\r\n\r\nbegin\r\n if RowHeader and not FLoadFixed then\r\n firstrow := 1\r\n else\r\n firstrow := 0;\r\n\r\n RowCount := AStrings.Count + firstrow;\r\n\r\n arow := TStringList.Create;\r\n\r\n try\r\n for i := 0 to AStrings.Count - 1 do\r\n begin\r\n arow.StrictDelimiter := true;\r\n arow.Delimiter := FDelimiter;\r\n arow.DelimitedText := AStrings.Strings[i];\r\n\r\n if arow.Count > ColCount then\r\n ColCount := arow.Count;\r\n\r\n for j := 0 to arow.Count - 1 do\r\n begin\r\n cd := arow.Strings[j];\r\n GetCellData(j, i + firstrow, nil, cd);\r\n\r\n Cells[j, i + firstrow] := cd;\r\n\r\n cr := i + firstrow;\r\n if InVisiblePage(cr) then\r\n begin\r\n ce := CellElements[j, cr];\r\n\r\n GetCellChildren(j, cr, nil, cd, ce);\r\n\r\n cn := '';\r\n GetCellClassName(j, cr, nil, cd, cn);\r\n if cn <> '' then\r\n ce.setAttribute('class',cn);\r\n end;\r\n end;\r\n end;\r\n finally\r\n arow.Free;\r\n end;\r\n\r\nend;\r\n\r\nprocedure TCustomTableControl.LoadFromStrings(AStrings: TStrings; Delimiter: char = ';'; LoadFixed: boolean = false);\r\nbegin\r\n FDelimiter := Delimiter;\r\n FLoadFixed := LoadFixed;\r\n\r\n LoadFromStringList(AStrings);\r\nend;\r\n\r\nprocedure TCustomTableControl.Loaded;\r\nbegin\r\n inherited;\r\nend;\r\n\r\nprocedure TCustomTableControl.LoadFromCSV(const AURL: string; Delimiter: char = ';'; LoadFixed: boolean = false);\r\nbegin\r\n FDelimiter := Delimiter;\r\n FLoadFixed := LoadFixed;\r\n\r\n FReq := TJSXMLHttpRequest.new;\r\n FReq.addEventListener('load',@DoHttpLoadCsv);\r\n FReq.addEventListener('abort',@DoHttpAbort);\r\n FReq.open('GET', AURL);\r\n DoHttpRequest(FReq);\r\n FReq.send;\r\nend;\r\n\r\nfunction TCustomTableControl.LoadFromCSVAsync(const AURL: string; Delimiter: char = ';'; LoadFixed: boolean = false): TJSPromise;\r\nbegin\r\n Result := TJSPromise.new(\r\n procedure(ASuccess, AFailed: TJSPromiseResolver)\r\n\r\n function DoLoad(Event: TEventListenerEvent): boolean;\r\n begin\r\n if DoHttpLoadCsv(Event) then\r\n ASuccess(TJSXMLHttpRequest(Event.target))\r\n else\r\n AFailed(TJSXMLHttpRequest(Event.target));\r\n Result := true;\r\n end;\r\n\r\n function DoError(Event: TEventListenerEvent): boolean;\r\n begin\r\n AFailed(TJSXMLHttpRequest(Event.target));\r\n Result := true;\r\n end;\r\n\r\n begin\r\n FDelimiter := Delimiter;\r\n FLoadFixed := LoadFixed;\r\n FReq := TJSXMLHttpRequest.new;\r\n FReq.addEventListener('load',@DoLoad);\r\n FReq.addEventListener('abort',@DoError);\r\n FReq.addEventListener('timeout',@DoError);\r\n FReq.addEventListener('error',@DoError);\r\n\r\n FReq.open('GET', AURL);\r\n DoHttpRequest(FReq);\r\n FReq.send;\r\n end);\r\nend;\r\n\r\nprocedure TCustomTableControl.LoadFromJSON(const AURL: string; ADataNode: string = '');\r\nbegin\r\n FDataNode := ADataNode;\r\n FReq := TJSXMLHttpRequest.new;\r\n FReq.addEventListener('load',@DoHttpLoadJson);\r\n FReq.addEventListener('abort',@DoHttpAbort);\r\n FReq.open('GET', AURL);\r\n DoHttpRequest(FReq);\r\n FReq.send;\r\nend;\r\n\r\nprocedure TCustomTableControl.LoadPageFromJSON(const AURL: string; ADataNode: string = '');\r\nbegin\r\n FDataNode := ADataNode;\r\n FReq := TJSXMLHttpRequest.new;\r\n FReq.addEventListener('load',@DoHttpLoadPageJson);\r\n FReq.addEventListener('abort',@DoHttpAbort);\r\n FReq.open('GET', AURL);\r\n DoHttpRequest(FReq);\r\n FReq.send;\r\nend;\r\n\r\nfunction TCustomTableControl.LoadFromJSONAsync(const AURL: string; ADataNode: string = ''): TJSPromise;\r\nbegin\r\n Result := TJSPromise.new(\r\n procedure(ASuccess, AFailed: TJSPromiseResolver)\r\n\r\n function DoLoad(Event: TEventListenerEvent): boolean;\r\n begin\r\n if DoHttpLoadJson(Event) then\r\n ASuccess(TJSXMLHttpRequest(Event.target))\r\n else\r\n AFailed(TJSXMLHttpRequest(Event.target));\r\n Result := true;\r\n end;\r\n\r\n function DoError(Event: TEventListenerEvent): boolean;\r\n begin\r\n AFailed(TJSXMLHttpRequest(Event.target));\r\n Result := true;\r\n end;\r\n\r\n begin\r\n FDataNode := ADataNode;\r\n FReq := TJSXMLHttpRequest.new;\r\n FReq.addEventListener('load',@DoLoad);\r\n FReq.addEventListener('abort',@DoError);\r\n FReq.addEventListener('timeout',@DoError);\r\n FReq.addEventListener('error',@DoError);\r\n\r\n FReq.open('GET', AURL);\r\n DoHttpRequest(FReq);\r\n FReq.send;\r\n end);\r\nend;\r\n\r\nfunction TCustomTableControl.LoadPageFromJSONAsync(const AURL: string; ADataNode: string = ''): TJSPromise;\r\nbegin\r\n Result := TJSPromise.new(\r\n procedure(ASuccess, AFailed: TJSPromiseResolver)\r\n\r\n function DoLoad(Event: TEventListenerEvent): boolean;\r\n begin\r\n if DoHttpLoadPageJson(Event) then\r\n ASuccess(TJSXMLHttpRequest(Event.target))\r\n else\r\n AFailed(TJSXMLHttpRequest(Event.target));\r\n Result := true;\r\n end;\r\n\r\n function DoError(Event: TEventListenerEvent): boolean;\r\n begin\r\n AFailed(TJSXMLHttpRequest(Event.target));\r\n Result := true;\r\n end;\r\n\r\n begin\r\n FDataNode := ADataNode;\r\n FReq := TJSXMLHttpRequest.new;\r\n FReq.addEventListener('load',@DoLoad);\r\n FReq.addEventListener('abort',@DoError);\r\n FReq.addEventListener('timeout',@DoError);\r\n FReq.addEventListener('error',@DoError);\r\n\r\n FReq.open('GET', AURL);\r\n DoHttpRequest(FReq);\r\n FReq.send;\r\n end);\r\nend;\r\n\r\n\r\n{$HINTS OFF}\r\n\r\nprocedure TCustomTableControl.LoadFromJSON(AJSON: TJSObject; ADataNode: string = '');\r\nvar\r\n JO: JSValue;\r\n JA: TJSArray;\r\n r,c,cr,firstrow: integer;\r\n arow: string;\r\n sl: TStringList;\r\n cd,cn: string;\r\n ce: TJSHTMLElement;\r\n p: boolean;\r\nbegin\r\n if ADataNode <> '' then\r\n JA := TJSArray(AJSON.Properties[ADataNode])\r\n else\r\n JA := TJSArray(AJSON);\r\n\r\n if Assigned(JA) then\r\n begin\r\n p := Paging.Enabled;\r\n Paging.Enabled := false;\r\n\r\n sl := TStringList.Create;\r\n\r\n firstrow := 0;\r\n\r\n if RowHeader then\r\n firstrow := 1;\r\n\r\n RowCount := JA.length + firstrow;\r\n\r\n for r := 0 to JA.length - 1 do\r\n begin\r\n JO := JA.Elements[r];\r\n c := 0;\r\n arow := '';\r\n\r\n asm\r\n var x = undefined;\r\n for (x in JO) {\r\n arow += \"|\" + JO[x];\r\n c++;\r\n }\r\n end;\r\n\r\n Delete(arow, 1, 1);\r\n sl.StrictDelimiter := true;\r\n sl.Delimiter := '|';\r\n sl.DelimitedText := arow;\r\n if ColCount < sl.Count then\r\n ColCount := sl.Count;\r\n\r\n for c := 0 to sl.Count - 1 do\r\n begin\r\n cd := sl.Strings[c];\r\n GetCellData(c, r + firstrow, nil, cd);\r\n\r\n Cells[c, r + firstrow] := cd;\r\n\r\n cr := r;\r\n\r\n if InVisiblePage(cr) then\r\n begin\r\n cr := cr + firstrow;\r\n ce := CellElements[c, cr];\r\n\r\n GetCellChildren(c, cr, nil, cd, ce);\r\n\r\n cn := '';\r\n GetCellClassName(c, cr, nil, cd, cn);\r\n if cn <> '' then\r\n ce.setAttribute('class',cn);\r\n end;\r\n end;\r\n\r\n Paging.Enabled := p;\r\n end;\r\n\r\n sl.Free;\r\n end;\r\nend;\r\n\r\nprocedure TCustomTableControl.LoadPageFromJSON(AJSON: TJSObject; ADataNode: string = '');\r\nvar\r\n JO: JSValue;\r\n JA: TJSArray;\r\n r,c,cr,firstrow: integer;\r\n arow: string;\r\n sl: TStringList;\r\n cd,cn: string;\r\n ce: TJSHTMLElement;\r\n p: boolean;\r\nbegin\r\n if ADataNode <> '' then\r\n JA := TJSArray(AJSON.Properties[ADataNode])\r\n else\r\n JA := TJSArray(AJSON);\r\n\r\n if Assigned(JA) then\r\n begin\r\n sl := TStringList.Create;\r\n\r\n firstrow := Paging.Index * Paging.Size;\r\n\r\n if RowHeader then\r\n firstrow := firstrow + 1;\r\n\r\n for r := 0 to JA.length - 1 do\r\n begin\r\n JO := JA.Elements[r];\r\n c := 0;\r\n arow := '';\r\n\r\n asm\r\n var x = undefined;\r\n for (x in JO) {\r\n arow += \"|\" + JO[x];\r\n c++;\r\n }\r\n end;\r\n\r\n Delete(arow, 1, 1);\r\n sl.StrictDelimiter := true;\r\n sl.Delimiter := '|';\r\n sl.DelimitedText := arow;\r\n if ColCount < sl.Count then\r\n ColCount := sl.Count;\r\n\r\n for c := 0 to sl.Count - 1 do\r\n begin\r\n cd := sl.Strings[c];\r\n GetCellData(c, r + firstrow, nil, cd);\r\n\r\n Cells[c, r + firstrow] := cd;\r\n\r\n cr := r;\r\n\r\n if InVisiblePage(cr) then\r\n begin\r\n cr := cr + firstrow;\r\n ce := CellElements[c, cr];\r\n\r\n GetCellChildren(c, cr, nil, cd, ce);\r\n\r\n cn := '';\r\n GetCellClassName(c, cr, nil, cd, cn);\r\n if cn <> '' then\r\n ce.setAttribute('class',cn);\r\n end;\r\n end;\r\n end;\r\n\r\n sl.Free;\r\n end;\r\nend;\r\n\r\n\r\nfunction TCustomTableControl.HasButton(ACol, ARow: integer): boolean;\r\nvar\r\n el: TJSElement;\r\nbegin\r\n Result := false;\r\n\r\n if (ACol < ColCount) and (ARow < RowCount) then\r\n begin\r\n el := GetButtonElement(ACol,ARow);\r\n if Assigned(el) then\r\n begin\r\n Result := true;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TCustomTableControl.RemoveButton(ACol, ARow: integer);\r\nvar\r\n el: TJSElement;\r\nbegin\r\n if (ACol < ColCount) and (ARow < RowCount) then\r\n begin\r\n el := GetButtonElement(ACol,ARow);\r\n if Assigned(el) then\r\n begin\r\n el.removeEventListener('click',FHandleCheckClickPtr);\r\n asm\r\n el.remove();\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TCustomTableControl.RemoveCheckBox(ACol, ARow: integer);\r\nvar\r\n el: TJSElement;\r\nbegin\r\n if (ACol < ColCount) and (ARow < RowCount) then\r\n begin\r\n el := GetCheckElement(ACol,ARow);\r\n if Assigned(el) then\r\n begin\r\n el.removeEventListener('click',FHandleCheckClickPtr);\r\n asm\r\n el.remove();\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TCustomTableControl.RemoveFilter;\r\nvar\r\n r,rs,l: integer;\r\n tr: TJSHTMLElement;\r\nbegin\r\n if Assigned(FTable) then\r\n begin\r\n if ColHeader then\r\n rs := 1\r\n else\r\n rs := 0;\r\n\r\n if Paging.Enabled then\r\n begin\r\n if Assigned(FUnfiltered) then\r\n begin\r\n asm\r\n this.FData = Array.from(this.FUnfiltered);\r\n end;\r\n FUnfiltered := nil;\r\n end;\r\n asm\r\n l = this.FData.length;\r\n end;\r\n\r\n RowCount := l;\r\n SelectPage(Paging.ActivePage, true);\r\n end\r\n else\r\n begin\r\n for r := rs to RowCount - 1 do\r\n begin\r\n asm\r\n tr = this.FTable.rows[r];\r\n end;\r\n tr.style.removeProperty('display');\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TCustomTableControl.RemoveProgress(const ACol, ARow: integer);\r\nvar\r\n el: TJSElement;\r\nbegin\r\n if (ACol < ColCount) and (ARow < RowCount) then\r\n begin\r\n el := GetProgressElement(ACol,ARow);\r\n asm\r\n el.remove();\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TCustomTableControl.RemoveRow(Index: integer);\r\nbegin\r\n if (Index <0) or (Index >= RowCount) then\r\n Exit;\r\n\r\n asm\r\n var tr = this.FTable.deleteRow(Index);\r\n end;\r\n\r\nend;\r\n\r\nprocedure TCustomTableControl.RemoveSortIndicator(const ACol, ARow: integer);\r\nvar\r\n el: TJSElement;\r\n sid: string;\r\n\r\nbegin\r\n sid := Name + 'si'+ACol.ToString+'_'+ARow.ToString;\r\n\r\n el := document.getElementById(sid);\r\n\r\n if Assigned(el) then\r\n el.parentElement.removeChild(el);\r\nend;\r\n\r\nprocedure TCustomTableControl.RenderGrid;\r\nvar\r\n i: integer;\r\n table,tbody,th: TJSHTMLElement;\r\n frows, fcols, fhc,rc: integer;\r\n rh,ch: boolean;\r\n headclass,cc,headcaption: string;\r\n ridx: integer;\r\n\r\nbegin\r\n if not Assigned(FTable) then\r\n begin\r\n FTable := document.createElement('TABLE');\r\n ElementHandle.appendChild(FTable);\r\n\r\n SetHTMLElementFont(TJSHTMLElement(FTable), Font, not ((ElementClassName = '') and (ElementFont = efProperty)) );\r\n\r\n table := TJSHTMLElement(FTable);\r\n table.setAttribute('id', Name + 'Table');\r\n table.style.setProperty('vertical-align','middle');\r\n\r\n frows := RenderRowCount;\r\n\r\n fcols := ColCount;\r\n rh := RowHeader;\r\n ch := ColHeader;\r\n rc := RowCount;\r\n\r\n cc := '';\r\n ridx := 0;\r\n fhc := 0;\r\n\r\n if (ElementTableClassName = '') then\r\n begin\r\n table.style.setProperty('border-collapse','collapse');\r\n table.setAttribute('border','0');\r\n table.setAttribute('cellpadding','0');\r\n table.setAttribute('cellspacing','0');\r\n table.setAttribute('width','100%');\r\n table.setAttribute('table-layout','fixed');\r\n table.setAttribute('height','100%');\r\n end\r\n else\r\n begin\r\n table.setAttribute('class',ElementTableClassName);\r\n end;\r\n\r\n headclass := ElementHeaderClassName;\r\n\r\n asm\r\n while (table.firstChild) {\r\n table.removeChild(table.firstChild);\r\n }\r\n end;\r\n\r\n Header.FElement := nil;\r\n\r\n if Header.Visible then\r\n begin\r\n inc(ridx);\r\n headcaption := Header.Caption;\r\n\r\n asm\r\n var theader = table.createTHead();\r\n\r\n if (headclass != \"\")\r\n {\r\n theader.setAttribute(\"class\", headclass);\r\n }\r\n\r\n var tr = theader.insertRow(0);\r\n th = document.createElement('th');\r\n tr.appendChild(th);\r\n th.setAttribute('colspan',fcols);\r\n th.setAttribute('vertical-align','middle');\r\n if (headcaption != '') {\r\n th.innerHTML = '
'+headcaption+'
'; }\r\n end;\r\n Header.FElement := th;\r\n end;\r\n\r\n\r\n asm\r\n var i = 0;\r\n var j = 0;\r\n\r\n if (rh)\r\n {\r\n fhc++;\r\n\r\n var theader = table.createTHead();\r\n\r\n if (headclass != \"\")\r\n {\r\n theader.setAttribute(\"class\", headclass);\r\n }\r\n\r\n var tr = theader.insertRow(ridx);\r\n\r\n for(i=0; i < fcols; i++)\r\n {\r\n if (rc > 0) {\r\n cc = this.FData[0][i];\r\n if (cc == undefined) { cc = \"\";}\r\n }\r\n else\r\n {\r\n cc = \"\";\r\n }\r\n var th = document.createElement('th');\r\n th.setAttribute('scope','col');\r\n this.SetTableCell(i,0, th, cc);\r\n tr.appendChild(th);\r\n }\r\n }\r\n\r\n tbody = table.appendChild(document.createElement('tbody'));\r\n\r\n for(i=0; i < frows; i++)\r\n {\r\n if (i + fhc >= this.FData.length) { break; }\r\n\r\n var tr = tbody.insertRow(tbody.length);\r\n\r\n for(j=0; j < fcols; j++)\r\n {\r\n cc = this.FData[i+fhc][j];\r\n if (cc == undefined) { cc = \"\";}\r\n\r\n if ((j == 0) && (ch))\r\n {\r\n var th = document.createElement('th');\r\n th.setAttribute('scope','row');\r\n tr.appendChild(th);\r\n this.SetTableCell(j,i + fhc,th, cc);\r\n }\r\n else\r\n {\r\n tr.insertCell();\r\n var td = tr.cells[j];\r\n this.SetTableCell(j,i + fhc,td, cc);\r\n }\r\n }\r\n }\r\n end;\r\n\r\n FBody := tbody;\r\n\r\n Footer.FElement := nil;\r\n\r\n if Footer.Visible then\r\n begin\r\n inc(ridx);\r\n headcaption := Footer.Caption;\r\n asm\r\n var theader = table.createTFoot();\r\n\r\n if (headclass != \"\")\r\n {\r\n theader.setAttribute(\"class\", headclass);\r\n }\r\n\r\n var tr = theader.insertRow(0);\r\n th = document.createElement('th');\r\n tr.appendChild(th);\r\n th.setAttribute('colspan',fcols);\r\n// th['colspan'] = fcols;\r\n th.innerHTML = headcaption;\r\n end;\r\n Footer.FElement := th;\r\n end;\r\n\r\n if DragMode = dmAutomatic then\r\n EnableDrag;\r\n end;\r\n\r\n if not Options.ResizeColumns then\r\n begin\r\n // update column widths\r\n// for i := 0 to ColCount - 1 do\r\n// ColWidths[i] := ColWidths[i];\r\n end;\r\n\r\n EnableColResize;\r\n\r\n if FHiddenCols.Count > 0 then\r\n begin\r\n for i := 0 to ColCount - 1 do\r\n begin\r\n if IsHiddenColumn(i) then\r\n HideColumn(i);\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TCustomTableControl.RenderGridData;\r\nvar\r\n i,j: integer;\r\nbegin\r\n for i := 0 to ColCount - 1 do\r\n for j := 0 to RowCount - 1 do\r\n Cells[i,j] := Cells[i,j];\r\nend;\r\n\r\nprocedure TCustomTableControl.RenderHeaderFooter;\r\nbegin\r\n if Header.Visible then\r\n Header.Update(Paging.Size, RowCount, Paging.Index);\r\n\r\n if Footer.Visible then\r\n Footer.Update(Paging.Size, RowCount, Paging.Index);\r\nend;\r\n\r\nprocedure TCustomTableControl.RenderGridScript;\r\nbegin\r\n AddControlScriptSource(\r\n 'var pageX,curCol,nxtCol,curColWidth,nxtColWidth,autoWidth,curTable,curTableWidth;'+\r\n 'autoWidth = false;'+\r\n\r\n 'function resizeColumn(e) {'+\r\n ' if (curCol) {'+\r\n ' var diffX = e.pageX - pageX;'+\r\n '\t\tif ((nxtCol) && (!autoWidth)){'+\r\n '\t\t nxtCol.style.width = (nxtColWidth - diffX)+\"px\";'+\r\n ' } else {'+\r\n// ' curTable.style.width = (curTableWidth + diffX) + \"px\";'+\r\n ' }'+\r\n ' newColWidth = (curColWidth + diffX);'+\r\n ' if (newColWidth < 10)'+\r\n ' newColWidth = 10;'+\r\n '\t curCol.style.width = newColWidth + \"px\";'+\r\n ' }'+\r\n ' }'+\r\n\r\n 'function resetResize() {'+\r\n ' curCol = undefined;'+\r\n ' nxtCol = undefined;'+\r\n ' pageX = undefined;'+\r\n ' nxtColWidth = undefined;'+\r\n ' curColWidth = undefined;'+\r\n ' curTable = undefined;'+\r\n ' curTableWidth = undefined;'+\r\n ' }'+\r\n\r\n 'function resizableGrid(tablename, enabled,ridx) {'+\r\n ' var table = document.getElementById(tablename + \"Table\");'+\r\n ' if (!table) return;' +\r\n ' var row = table.getElementsByTagName(\"tr\")[ridx],'+\r\n ' cols = row ? row.children : undefined;'+\r\n ' if (!cols) return;'+\r\n\r\n ' for (var i=0;i 0) then\r\n Result := Paging.Size\r\n else\r\n begin\r\n if RowHeader then\r\n Result := RowCount - 1\r\n else\r\n Result := RowCount;\r\n end;\r\nend;\r\n\r\nprocedure TCustomTableControl.ReRenderGrid;\r\nbegin\r\n if not Assigned(ElementHandle) or IsUpdating then\r\n Exit;\r\n\r\n if Assigned(FTable) then\r\n FTable.parentElement.removeChild(FTable);\r\n\r\n FTable := nil;\r\n RenderGrid;\r\n RenderHeaderFooter;\r\nend;\r\n\r\nprocedure TCustomTableControl.RowCountChanged(delta: integer);\r\nvar\r\n r: integer;\r\n tbody: TJSElement;\r\nbegin\r\n if not Assigned(FTable) then\r\n Exit;\r\n\r\n tbody := FBody;\r\n\r\n if (delta > 0) then\r\n begin\r\n\r\n asm\r\n var i = 0;\r\n var j = 0;\r\n var tr = undefined;\r\n var l = tbody.rows.length;\r\n\r\n for(i = 0;i < delta; i++)\r\n {\r\n tr = tbody.insertRow(l);\r\n for(j = 0; j < this.FColCount; j++)\r\n {\r\n\r\n if ((j == 0) && (this.FColHeader))\r\n {\r\n var th = document.createElement('th');\r\n th.setAttribute('scope','row');\r\n tr.appendChild(th);\r\n }\r\n else\r\n {\r\n tr.insertCell();\r\n }\r\n }\r\n }\r\n end;\r\n\r\n if DragMode = dmAutomatic then\r\n EnableDrag;\r\n end;\r\n\r\n if delta < 0 then\r\n begin\r\n asm\r\n var i = 0;\r\n var l = this.FBody.rows.length;\r\n if (l < -delta) return;\r\n for(i = 0;i < -delta; i++) {\r\n this.FBody.deleteRow(l - i - 1);\r\n }\r\n end;\r\n end;\r\nend;\r\n{$HINTS ON}\r\n\r\nfunction TCustomTableControl.RowOffset: integer;\r\nbegin\r\n if RowHeader then\r\n Result := 1\r\n else\r\n Result := 0;\r\nend;\r\n\r\nprocedure TCustomTableControl.SaveToCSV(const AFileName: string;\r\n Delimiter: char; SaveFixed: boolean);\r\nvar\r\n sl: TStringList;\r\nbegin\r\n sl := TStringList.Create;\r\n try\r\n SaveToStrings(sl, Delimiter, SaveFixed);\r\n sl.SaveToFile(AFileName);\r\n finally\r\n sl.Free;\r\n end;\r\nend;\r\n\r\nprocedure TCustomTableControl.SaveToStrings(AStrings: TStrings; Delimiter: char;\r\n SaveFixed: boolean);\r\nvar\r\n r,c: integer;\r\n fr,fc: integer;\r\n s,rowstr: string;\r\nbegin\r\n fr := 0;\r\n fc := 0;\r\n\r\n if not SaveFixed and ColHeader then\r\n fc := 1;\r\n\r\n if not SaveFixed and RowHeader then\r\n fr := 1;\r\n\r\n for r := fr to RowCount - 1 do\r\n begin\r\n rowstr := '';\r\n for c := fc to ColCount - 1 do\r\n begin\r\n s := Cells[c,r];\r\n s := stringreplace(s,'\"','\"\"',[rfReplaceAll]);\r\n\r\n if (pos(Delimiter,s) > 0) or (pos(#13, s) > 0) then\r\n begin\r\n s := '\"' + s + '\"';\r\n end;\r\n\r\n if s = '' then\r\n s := '\"\"';\r\n\r\n if rowstr = '' then\r\n rowstr := s\r\n else\r\n rowstr := rowstr + Delimiter + s;\r\n end;\r\n AStrings.Add(rowstr);\r\n end;\r\nend;\r\n\r\nprocedure TCustomTableControl.ScrollRowInView(ARow: integer);\r\nbegin\r\n if (ARow < RowCount) and Assigned(FTable) then\r\n begin\r\n asm\r\n this.FTable.rows[ARow].scrollIntoView({\r\n behavior: 'smooth',\r\n block: 'center'\r\n });\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TCustomTableControl.SelectCell(ACol, ARow: integer);\r\nvar\r\n el: TJSElement;\r\nbegin\r\n if (ARow < RowCount) and (ACol < ColCount) then\r\n begin\r\n el := CellElements[ACol,ARow];\r\n if Assigned(el) then\r\n SelectElementContents(el);\r\n end;\r\nend;\r\n\r\n{$HINTS OFF}\r\nprocedure TCustomTableControl.SelectPage(AIndex: integer; DoDefault: boolean = true);\r\nvar\r\n i,j,delta,offset,hdr: integer;\r\n tr,td: TJSHTMLElement;\r\n s: string;\r\n\r\nbegin\r\n if Paging.Enabled then\r\n begin\r\n Paging.FActivePage := AIndex;\r\n td := nil;\r\n RenderHeaderFooter;\r\n\r\n if DoDefault then\r\n begin\r\n if RowHeader then\r\n delta := 1\r\n else\r\n delta := 0;\r\n\r\n if Header.Visible then\r\n hdr := 1\r\n else\r\n hdr := 0;\r\n\r\n offset := AIndex * Paging.Size;\r\n\r\n for i := 0 to Paging.Size - 1 do\r\n begin\r\n asm\r\n tr = this.FTable.rows[i + delta + hdr];\r\n end;\r\n if Assigned(tr) then\r\n begin\r\n if (offset + i + delta >= RowCount) then\r\n begin\r\n asm\r\n tr.style.setProperty('display','none');\r\n end;\r\n continue;\r\n end;\r\n\r\n s := '';\r\n\r\n for j := 0 to ColCount - 1 do\r\n begin\r\n asm\r\n s = this.FData[offset + i + delta][j];\r\n if (s != undefined) {\r\n td = tr.cells[j];\r\n this.SetTableCell(j,i+delta,td,s);\r\n }\r\n tr.style.removeProperty('display');\r\n end;\r\n end;\r\n end;\r\n end;\r\n end;\r\n end;\r\nend;\r\n{$HINTS ON}\r\n\r\nprocedure TCustomTableControl.SelectSortIndicator(const ACol, ARow: integer;\r\n ASelect: boolean);\r\nvar\r\n el: TJSElement;\r\n sid: string;\r\n\r\nbegin\r\n sid := Name + 'si'+ACol.ToString+'_'+ARow.ToString;\r\n\r\n el := document.getElementById(sid);\r\n\r\n if Assigned(el) then\r\n begin\r\n if ElementSelectionClassName = '' then\r\n begin\r\n if ASelect then\r\n TJSHTMLElement(el).style.setProperty('color',ColorToHTML($FF8F5B))\r\n else\r\n TJSHTMLElement(el).style.removeProperty('color');\r\n end\r\n else\r\n begin\r\n if ASelect then\r\n TJSHTMLElement(el).classlist.Add(ElementSelectionClassName)\r\n else\r\n TJSHTMLElement(el).classlist.Remove(ElementSelectionClassName);\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TCustomTableControl.SetCells(col, row: integer; const Value: string);\r\nvar\r\n trc: integer;\r\n td: TJSHTMLElement;\r\nbegin\r\n if not Assigned(FTable) then\r\n Exit;\r\n\r\n trc := RowCount;\r\n if RowHeader then\r\n inc(trc);\r\n\r\n if (col >= 0) and (row >= 0) and (col < ColCount) and (row <= trc) then\r\n begin\r\n if (row = 0) then\r\n EnableColResize;\r\n\r\n asm\r\n if (row < this.FData.length) {\r\n this.FData[row][col] = Value;\r\n }\r\n end;\r\n\r\n if RowHeader then\r\n row := row - 1;\r\n\r\n if InVisiblePage(row) or ((row = -1) and RowHeader) then\r\n begin\r\n if Header.Visible then\r\n inc(row);\r\n if RowHeader then\r\n row := row + 1;\r\n\r\n asm\r\n td = this.FTable.rows[row].cells[col];\r\n end;\r\n\r\n SetTableCell(col,row,td, Value);\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TCustomTableControl.SetWordWrap(const AValue: boolean);\r\nbegin\r\n if FWordWrap <> AValue then\r\n begin\r\n FWordWrap := AValue;\r\n if Assigned(FTable) then\r\n begin\r\n if not (csloading in ComponentState) then\r\n ReRenderGrid;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TCustomTableControl.SetColCount(const Value: integer);\r\nbegin\r\n inherited;\r\n\r\n asm\r\n var i;\r\n for(i=0; i < this.FData.length; i++)\r\n {\r\n if (this.FData[i] == null) this.FData[i] = [];\r\n\r\n this.FData[i].length = Value;\r\n }\r\n end;\r\nend;\r\n\r\nprocedure TCustomTableControl.SetColHeader(const Value: boolean);\r\nbegin\r\n if FColHeader <> Value then\r\n begin\r\n FColHeader := Value;\r\n if Assigned(FTable) then\r\n begin\r\n if not (csloading in ComponentState) then\r\n ReRenderGrid;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TCustomTableControl.SetDataColumnCount(AValue: Integer);\r\nbegin\r\n if RowHeader then\r\n ColCount := AValue + 1\r\n else\r\n ColCount := AValue;\r\nend;\r\n\r\nprocedure TCustomTableControl.SetDataHeader(AColumn: Integer; AValue: string);\r\nvar\r\n d: integer;\r\nbegin\r\n if not ColHeader then\r\n Exit;\r\n\r\n d := 0;\r\n if RowHeader then\r\n d := 1;\r\n\r\n Cells[AColumn + d, 0] := AValue;\r\nend;\r\n\r\nprocedure TCustomTableControl.SetDataRowCount(AValue: Integer);\r\nbegin\r\n if ColHeader then\r\n RowCount := AValue + 1\r\n else\r\n RowCount := AValue;\r\nend;\r\n\r\nprocedure TCustomTableControl.SetDataValue(AColumn, ARow: Integer;\r\n AValue: string);\r\nvar\r\n dc,dr: integer;\r\nbegin\r\n dc := 0;\r\n dr := 0;\r\n\r\n if RowHeader then\r\n dc := 1;\r\n if ColHeader then\r\n dr := 1;\r\n\r\n Cells[AColumn + dc, ARow + dr] := AValue;\r\nend;\r\n\r\nprocedure TCustomTableControl.SetElementHeaderClassName(\r\n const Value: TElementClassName);\r\nvar\r\n head: TJSHTMLElement;\r\nbegin\r\n if (FElementHeaderClassName <> Value) then\r\n begin\r\n FElementHeaderClassName := Value;\r\n if Assigned(FTable) then\r\n begin\r\n head := TJSHTMLElement(FTable.firstChild);\r\n if Assigned(head) and (head.tagName = 'THEAD') then\r\n head.setAttribute('class',ElementHeaderClassName);\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TCustomTableControl.SetElementTableClassName(\r\n const Value: TElementClassName);\r\nbegin\r\n if (FElementTableClassName <> Value) then\r\n begin\r\n FElementTableClassName := Value;\r\n if Assigned(FTable) then\r\n FTable.setAttribute('class',ElementTableClassName);\r\n end;\r\nend;\r\n\r\nprocedure TCustomTableControl.SetFilter(Column: integer; Condition: string; CaseSensitive: boolean = true);\r\nvar\r\n r,rs,hdr,l: integer;\r\n tr: TJSHTMLElement;\r\n s: string;\r\nbegin\r\n if Assigned(FTable) then\r\n begin\r\n if Condition = '' then\r\n begin\r\n RemoveFilter;\r\n Exit;\r\n end;\r\n\r\n hdr := 0;\r\n rs := 0;\r\n\r\n if RowHeader then\r\n rs := 1;\r\n\r\n if Header.Visible then\r\n hdr := 1;\r\n\r\n if Paging.Enabled then\r\n begin\r\n if not Assigned(FUnfiltered) then\r\n begin\r\n asm\r\n this.FUnfiltered = Array.from(this.FData);\r\n end;\r\n end;\r\n\r\n for r := RowCount - 1 downto rs do\r\n begin\r\n asm\r\n s = this.FData[r][Column];\r\n end;\r\n\r\n if not MatchStr(Condition, s, CaseSensitive) and (hdr < 2) then\r\n begin\r\n asm\r\n this.FData.splice(r,1);\r\n end;\r\n end;\r\n end;\r\n\r\n asm\r\n l = this.FData.length;\r\n end;\r\n\r\n RowCount := l;\r\n\r\n SelectPage(Paging.ActivePage, true);\r\n end\r\n else\r\n begin\r\n\r\n for r := rs to RowCount - 1 do\r\n begin\r\n if not MatchStr(Condition, Cells[Column, r], CaseSensitive) and (hdr < 2) then\r\n begin\r\n asm\r\n tr = this.FTable.rows[r + hdr];\r\n end;\r\n tr.style.setProperty('display','none');\r\n end;\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TCustomTableControl.SetFooter(const Value: TTableControlHeader);\r\nbegin\r\n FFooter.Assign(Value);\r\nend;\r\n\r\nprocedure TCustomTableControl.SetHeader(const Value: TTableControlHeader);\r\nbegin\r\n FHeader.Assign(Value);\r\nend;\r\n\r\nprocedure TCustomTableControl.SetOptions(const Value: TTableControlOptions);\r\nbegin\r\n FOptions.Assign(Value);\r\nend;\r\n\r\nprocedure TCustomTableControl.SetPaging(const Value: TTableControlPaging);\r\nbegin\r\n FPaging.Assign(Value);\r\nend;\r\n\r\nprocedure TCustomTableControl.SetProgress(ACol, ARow, APosition: integer);\r\nvar\r\n el: TJSElement;\r\nbegin\r\n if (ACol < ColCount) and (ARow < RowCount) then\r\n begin\r\n el := GetProgressElement(ACol,ARow);\r\n if Assigned(el) then\r\n begin\r\n el['value'] := APosition.ToString;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TCustomTableControl.SetRowClassName(row: integer; const Value: TElementClassName);\r\nbegin\r\n if (row >= 0) and (row < RowCount) then\r\n begin\r\n asm\r\n var tr = this.FTable.rows[row];\r\n tr.setAttribute('class',Value);\r\n end;\r\n end;\r\nend;\r\n\r\n{$HINTS OFF}\r\nprocedure TCustomTableControl.SetRowCount(const Value: integer);\r\nvar\r\n delta: integer;\r\n trc,trh,i: integer;\r\n\r\nbegin\r\n if (FRowCount <> Value) and (Value >= 0) then\r\n begin\r\n trc := Value;\r\n// if RowHeader then\r\n// inc(trc);\r\n// if Header.Visible then\r\n// inc(trc);\r\n asm\r\n this.FData.length = trc;\r\n var i;\r\n\r\n for(i = 0; i < this.FData.length; i++) {\r\n if (this.FData[i] == null) {\r\n this.FData[i] = [];\r\n this.FData[i].length = this.FColCount;\r\n }\r\n }\r\n end;\r\n// if Paging.Enabled then\r\n// begin\r\n// trc := 0;\r\n// if RowHeader then\r\n// inc(trc);\r\n//\r\n// delta := Min(Paging.Size + trc, Value) - FRowCount\r\n// end\r\n// else\r\n delta := Value - FRowCount;\r\n\r\n if (FRowcount = 0) and RowHeader then\r\n delta := Value - 1;\r\n\r\n FRowCount := Value;\r\n RowCountChanged(delta);\r\n GridChanged;\r\n\r\n if Paging.Enabled then\r\n begin\r\n trc := 0;\r\n trh := 0;\r\n if RowHeader then\r\n inc(trc);\r\n if Header.Visible then\r\n inc(trh);\r\n\r\n for i := Paging.Size + trc + trh to RowCount - 1 + trh do\r\n begin\r\n HideRow(i);\r\n end;\r\n end;\r\n\r\n if (Header.Pager <> tpNone) then\r\n Header.Update(Paging.Size, RowCount, Paging.Index);\r\n\r\n if (Footer.Pager <> tpNone) then\r\n Footer.Update(Paging.Size, RowCount, Paging.Index);\r\n end;\r\nend;\r\n{$HINTS ON}\r\n\r\nprocedure TCustomTableControl.SetRowHeader(const Value: boolean);\r\nbegin\r\n if (FRowHeader <> Value) then\r\n begin\r\n FRowHeader := Value;\r\n if Assigned(FTable) then\r\n begin\r\n if not (csloading in ComponentState) then\r\n ReRenderGrid;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TCustomTableControl.SetRowIndex(const Value: integer);\r\nvar\r\n el: TJSElement;\r\nbegin\r\n if FRowIndex <> -1 then\r\n begin\r\n el := CellElements[0,FRowIndex];\r\n if Assigned(el) then\r\n begin\r\n if ElementRowSelectClassName = '' then\r\n begin\r\n TJSHTMLElement(el.parentElement).style.removeProperty('color');\r\n TJSHTMLElement(el.parentElement).style.removeProperty('background-color');\r\n end\r\n else\r\n el.parentElement.className := '';\r\n end;\r\n end;\r\n\r\n FRowIndex := Value;\r\n\r\n if (FRowIndex <> -1) then\r\n begin\r\n el := CellElements[0,FRowIndex];\r\n\r\n if Assigned(el) then\r\n begin\r\n if ElementRowSelectClassName = '' then\r\n begin\r\n if (SelectionTextColor <> clNone) then\r\n TJSHTMLElement(el.parentElement).style.setProperty('color', ColorToHTML(SelectionTextColor));\r\n if (SelectionColor <> clNone) then\r\n TJSHTMLElement(el.parentElement).style.setProperty('background-color',ColorToHTML(SelectionColor));\r\n end\r\n else\r\n TJSHTMLElement(el.parentElement).classList.add(ElementRowSelectClassName);\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TCustomTableControl.SetSelectionColor(const Value: TColor);\r\nbegin\r\n if (FSelectionColor <> Value) then\r\n begin\r\n FSelectionColor := Value;\r\n UpdateElement;\r\n end;\r\nend;\r\n\r\nprocedure TCustomTableControl.SetSelectionTextColor(const Value: TColor);\r\nbegin\r\n if (FSelectionTextColor <> Value) then\r\n begin\r\n FSelectionTextColor := Value;\r\n UpdateElement;\r\n end;\r\nend;\r\n\r\nprocedure TCustomTableControl.SetSortIndex(const Value: integer);\r\nbegin\r\n FSortIndex := Value;\r\nend;\r\n\r\nprocedure TCustomTableControl.SetSortIndicator(const ACol, ARow: integer;\r\n AIndicator: TGridSortIndicator);\r\nvar\r\n el: TJSElement;\r\n sid: string;\r\n\r\nbegin\r\n sid := Name + 'si'+ACol.ToString+'_'+ARow.ToString;\r\n\r\n el := document.getElementById(sid);\r\n\r\n if Assigned(el) then\r\n begin\r\n if AIndicator = siAscending then\r\n begin\r\n TJSHTMLElement(el).innerHTML := GlyphAscending;\r\n el['sort'] := 'up';\r\n end\r\n else\r\n begin\r\n TJSHTMLElement(el).innerHTML := GlyphDescending;\r\n el['sort'] := 'dn';\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TCustomTableControl.SetColWidth(const ACol: integer; AWidth: integer);\r\nvar\r\n td,el: TJSHTMLElement;\r\n i: integer;\r\nbegin\r\n if (ACol < ColCount) and (ACol >= 0) then\r\n begin\r\n if AWidth > 0 then\r\n begin\r\n for i := 0 to RenderRowCount do\r\n begin\r\n td := nil;\r\n td := CellElements[ACol,i];\r\n if Assigned(td) then\r\n begin\r\n td.style.setProperty('width', AWidth.ToString+'px');\r\n td.style.setProperty('max-width', AWidth.ToString+'px');\r\n el := TJSHTMLElement(td.firstChild);\r\n if Assigned(el) and (el.tagName = 'DIV') then\r\n begin\r\n el.style.setProperty('width', AWidth.ToString+'px');\r\n el.style.setProperty('max-width', AWidth.ToString+'px');\r\n end;\r\n end;\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\n{$HINTS OFF}\r\n\r\nfunction TCustomTableControl.GetColWidth(const ACol: integer): integer;\r\nvar\r\n td: TJSHTMLElement;\r\n w: integer;\r\nbegin\r\n Result := 0;\r\n\r\n if (ACol < ColCount) and (ACol >= 0) then\r\n begin\r\n td := CellElements[ACol,0];\r\n asm\r\n w = td.offsetWidth;\r\n end;\r\n\r\n Result := w;\r\n end;\r\nend;\r\n\r\nprocedure TCustomTableControl.RenderGridBorders;\r\nvar\r\n i,j: integer;\r\n td: TJSHTMLElement;\r\n clr: string;\r\nbegin\r\n for i := 0 to ColCount - 1 do\r\n for j := 0 to RenderRowCount do\r\n begin\r\n td := CellElements[i,j];\r\n if Assigned(td) then\r\n begin\r\n if Options.CellBorders then\r\n begin\r\n clr := ColorToHTML(Options.CellBorderColor);\r\n asm\r\n td.style.borderRight = \"1px solid \" + clr;\r\n td.style.borderBottom = \"1px solid \" + clr;\r\n end;\r\n end\r\n else\r\n begin\r\n asm\r\n td.style.borderRight = \"\";\r\n td.style.borderBottom = \"\";\r\n end;\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TCustomTableControl.LogData;\r\nbegin\r\n console.log(FData);\r\nend;\r\n\r\nprocedure TCustomTableControl.InitCSSLibrary(ALibrary: TCSSLibrary);\r\nbegin\r\n if (ALibrary = cssBootstrap) then\r\n begin\r\n ElementFont := efCSS;\r\n\r\n ElementHeaderClassName := 'thead-light';\r\n ElementTableClassName := 'table table-striped table-bordered table-hover';\r\n\r\n if not Assigned(FHeader) then\r\n FHeader := TTableControlHeader.Create(Self);\r\n\r\n FHeader.ButtonActiveElementClassName := 'btn btn-primary';\r\n FHeader.ButtonElementClassName := 'btn btn-light';\r\n FHeader.LinkActiveElementClassName := 'link-primary';\r\n FHeader.LinkElementClassName := 'link-secondary';\r\n FHeader.ListElementClassName := 'pagination';\r\n FHeader.ListLinkElementClassName := 'page-link';\r\n FHeader.ListItemElementClassName := 'page-item';\r\n FHeader.DropDownElementClassName := 'form-control';\r\n FHeader.InputElementClassName := 'form-control';\r\n\r\n if not Assigned(FFooter) then\r\n FFooter := TTableControlHeader.Create(Self);\r\n\r\n FFooter.ButtonActiveElementClassName := 'btn btn-primary';\r\n FFooter.ButtonElementClassName := 'btn btn-light';\r\n FFooter.LinkActiveElementClassName := 'link-primary';\r\n FFooter.LinkElementClassName := 'link-secondary';\r\n FFooter.ListElementClassName := 'pagination';\r\n FFooter.ListLinkElementClassName := 'page-link';\r\n FFooter.ListItemElementClassName := 'page-item';\r\n FFooter.DropDownElementClassName := 'form-control';\r\n FFooter.InputElementClassName := 'form-control';\r\n end;\r\nend;\r\n\r\nprocedure TCustomTableControl.SetTableCell(ACol,AROw: integer; ACell: TJSHTMLElement;\r\n const Value: string);\r\nvar\r\n clr,td,cn: string;\r\n topcell: TJSHTMLElement;\r\n\r\n function IsEmail(s: string): boolean;\r\n var\r\n res: boolean;\r\n begin\r\n asm\r\n var re = /\\S+@\\S+\\.\\S+/;\r\n res = re.test(s);\r\n end;\r\n Result := res;\r\n end;\r\n\r\n function IsImgUrl(url: string): boolean;\r\n var\r\n res:boolean;\r\n begin\r\n asm\r\n res = /\\.(jpg|jpeg|png|webp|avif|gif)$/.test(url)\r\n end;\r\n Result := res;\r\n end;\r\n\r\n function IsValidHttpUrl(s: string): boolean;\r\n begin\r\n asm\r\n try {\r\n url = new URL(s);\r\n } catch (_) {\r\n return false;\r\n }\r\n return url.protocol === \"http:\" || url.protocol === \"https:\";\r\n end;\r\n end;\r\n\r\n function IsNum(str: string): boolean;\r\n begin\r\n asm\r\n if (typeof str != \"string\") return false // we only process strings!\r\n return !isNaN(str) && // use type coercion to parse the _entirety_ of the string (`parseFloat` alone does not do this)...\r\n !isNaN(parseFloat(str)) // ...and ensure strings of whitespace fail\r\n end;\r\n end;\r\n\r\nbegin\r\n if (csDesigning in ComponentState) and (ElementTableClassName = '') and not Options.CellBorders then\r\n begin\r\n asm\r\n ACell.style.borderRight = \"1px dashed gray\";\r\n ACell.style.borderBottom = \"1px dashed gray\";\r\n ACell.innerHTML = \" \";\r\n end;\r\n Exit;\r\n end;\r\n\r\n if Options.AutoCellEmail and IsEmail(Value) then\r\n td := ''+Value+''\r\n else\r\n if Options.AutoCellImage and IsImgURL(Value) then\r\n begin\r\n if Options.ImageWidth > 0 then\r\n td := ''\r\n else\r\n td := '';\r\n\r\n case Options.ImageAlign of\r\n taCenter: ACell['align'] := 'center';\r\n taRightJustify: ACell['align'] := 'right';\r\n end;\r\n\r\n end\r\n else\r\n if Options.AutoCellURL and IsValidHttpURL(Value) then\r\n td := ''+Value+''\r\n else\r\n begin\r\n td := Value;\r\n if Options.AutoNumAlign and IsNum(Value) then\r\n ACell['align'] := 'right';\r\n end;\r\n\r\n if WordWrap then\r\n ACell.innerHTML := td\r\n else\r\n ACell.innerHTML := '
'+td+'
';\r\n\r\n// ACell.innerHTML := td;\r\n\r\n if (ElementTableClassName = '') and Options.CellBorders then\r\n begin\r\n clr := ColorToHTML(Options.CellBorderColor);\r\n asm\r\n ACell.style.borderRight = \"1px solid \" + clr;\r\n ACell.style.borderBottom = \"1px solid \" + clr;\r\n end;\r\n end;\r\n\r\n cn := '';\r\n GetCellClassName(ACol,ARow, nil, Value, cn);\r\n if cn <> '' then\r\n ACell.setAttribute('class',cn);\r\nend;\r\n\r\n\r\nprocedure TCustomTableControl.Sort(AColumn: integer;\r\n ADirection: TGridSortIndicator);\r\nvar\r\n colidx: integer;\r\n grid: TJSElement;\r\n asc,rh: boolean;\r\n fixrow: JSValue;\r\nbegin\r\n if not Assigned(FTable) then\r\n Exit;\r\n\r\n grid := TJSElement(FTable.children[1]); // get table TBODY\r\n\r\n asc := ADirection = siAscending;\r\n\r\n// if ColHeader then\r\n// colidx := AColumn - 1\r\n// else\r\n colidx := AColumn;\r\n\r\n if Paging.Enabled then\r\n begin\r\n rh := RowHeader;\r\n\r\n asm\r\n if (rh) fixrow = this.FData[0];\r\n\r\n const getCellValue = (tr, idx) => tr[idx];\r\n const comparer = (idx, asc) => (a, b) => ((v1, v2) =>\r\n v1 !== '' && v2 !== '' && !isNaN(v1) && !isNaN(v2) ? v1 - v2 : v1.toString().localeCompare(v2)\r\n )(getCellValue(asc ? a : b, idx), getCellValue(asc ? b : a, idx));\r\n\r\n var arr = Array.from(this.FData);\r\n if (rh) arr.shift();\r\n arr.sort(comparer(colidx, asc));\r\n if (rh) arr.splice(0,0,fixrow);\r\n this.FData = arr;\r\n end;\r\n\r\n SelectPage(Paging.ActivePage, true);\r\n end\r\n else\r\n begin\r\n\r\n asm\r\n const getCellValue = (tr, idx) => tr.children[idx].innerText || tr.children[idx].textContent;\r\n const comparer = (idx, asc) => (a, b) => ((v1, v2) =>\r\n v1 !== '' && v2 !== '' && !isNaN(v1) && !isNaN(v2) ? v1 - v2 : v1.toString().localeCompare(v2)\r\n )(getCellValue(asc ? a : b, idx), getCellValue(asc ? b : a, idx));\r\n\r\n const table = grid;\r\n\r\n Array.from(table.querySelectorAll('tr'))\r\n .sort(comparer(colidx, asc))\r\n .forEach(tr => table.appendChild(tr) );\r\n end;\r\n\r\n end;\r\nend;\r\n{$HINTS ON}\r\n\r\nprocedure TCustomTableControl.UpdateElement;\r\nbegin\r\n inherited;\r\n\r\n if IsUpdating then\r\n Exit;\r\n\r\n if Assigned(ElementHandle) then\r\n begin\r\n if Options.ScrollVertical then\r\n ElementHandle.style.setProperty('overflow-y','scroll')\r\n else\r\n ElementHandle.style.setProperty('height','');\r\n\r\n if (csDesigning in ComponentState) then\r\n begin\r\n ElementHandle.style.setProperty('width', IntToStr(Width) + 'px');\r\n ElementHandle.style.setProperty('height', IntToStr(Height) + 'px');\r\n end;\r\n\r\n // allow selection in labels\r\n ElementHandle.style.setProperty('user-select', '');\r\n\r\n // allow default caret on text\r\n if Cursor = crDefault then\r\n ElementHandle.style.setProperty('cursor', '');\r\n\r\n if (BorderStyle = bsSingle) and (BorderColor <> clNone) and (ElementClassName = '') and (ElementTableClassName = '') and not IsLinked then\r\n ElementHandle.style.setProperty('border', '1px ' + ColorToHTML(BorderColor)+' solid')\r\n else\r\n ElementHandle.style.setProperty('border', '');\r\n\r\n if (Color <> clNone) and (Color <> clWindow) then\r\n ElementHandle.style.setProperty('background-color', ColorToHTML(Color))\r\n else\r\n ElementHandle.style.setProperty('background-color', '');\r\n\r\n RenderGrid;\r\n end;\r\nend;\r\n\r\n\r\n{ TResponsiveGridItem }\r\n\r\nconstructor TResponsiveGridItem.Create(ACollection: TCollection);\r\nbegin\r\n inherited;\r\n FVisible := true;\r\nend;\r\n\r\ndestructor TResponsiveGridItem.Destroy;\r\nbegin\r\n (Collection as TResponsiveGridItems).DoItemDelete(Index);\r\n inherited;\r\nend;\r\n\r\n{$HINTS OFF}\r\nfunction TResponsiveGridItem.GetJSONElementValue(id: string): string;\r\nvar\r\n res: string;\r\n JO: JSValue;\r\nbegin\r\n JO := FJSONObject;\r\n asm\r\n res = JO[id];\r\n end;\r\n Result := res;\r\nend;\r\n{$HINTS ON}\r\n\r\nprocedure TResponsiveGridItem.SetHTML(const Value: string);\r\nbegin\r\n FHTML := Value;\r\n Changed(false);\r\nend;\r\n\r\nprocedure TResponsiveGridItem.SetSelected(const Value: boolean);\r\nvar\r\n LStyleName: string;\r\nbegin\r\n FSelected := Value;\r\n\r\n LStyleName := (Collection as TResponsiveGridItems).Grid.GetStyleName;\r\n\r\n if FSelected then\r\n ElementHandle.classList.add(LStyleName+'_Selected')\r\n else\r\n ElementHandle.classList.remove(LStyleName+'_Selected');\r\nend;\r\n\r\nprocedure TResponsiveGridItem.SetVisible(const Value: boolean);\r\nbegin\r\n if FVisible <> Value then\r\n begin\r\n FVisible := Value;\r\n if Assigned(ElementHandle) then\r\n begin\r\n if FVisible then\r\n ElementHandle.style.removeProperty('display')\r\n else\r\n ElementHandle.style.setProperty('display','none');\r\n end;\r\n end;\r\nend;\r\n\r\n{ TResponsiveGridItems }\r\n\r\nfunction TResponsiveGridItems.Add: TResponsiveGridItem;\r\nbegin\r\n Result := TResponsiveGridItem(inherited Add);\r\n DoItemAdd(Result.Index);\r\nend;\r\n\r\nfunction TResponsiveGridItems.Add(HTML: string): TResponsiveGridItem;\r\nbegin\r\n Result := TResponsiveGridItem(inherited Add);\r\n Result.FHTML := HTML;\r\n DoItemAdd(Result.Index);\r\nend;\r\n\r\nprocedure TResponsiveGridItems.Clear;\r\nbegin\r\n inherited Clear;\r\n DoItemClear;\r\nend;\r\n\r\nconstructor TResponsiveGridItems.Create(AOwner: TComponent);\r\nbegin\r\n inherited Create(AOwner, TResponsiveGridItem);\r\n FGrid := TResponsiveGrid(AOwner);\r\nend;\r\n\r\nprocedure TResponsiveGridItems.Delete(Index: integer);\r\nbegin\r\n inherited Delete(Index);\r\nend;\r\n\r\nprocedure TResponsiveGridItems.DoItemAdd(Index: integer);\r\nbegin\r\n if Assigned(OnItemAdd) then\r\n OnItemAdd(Self, Index);\r\nend;\r\n\r\nprocedure TResponsiveGridItems.DoItemClear;\r\nbegin\r\n if Assigned(OnItemClear) then\r\n OnItemClear(Self);\r\nend;\r\n\r\nprocedure TResponsiveGridItems.DoItemDelete(Index: integer);\r\nbegin\r\n if Assigned(OnItemDelete) then\r\n OnItemDelete(Self, Index);\r\nend;\r\n\r\nprocedure TResponsiveGridItems.DoItemInsert(Index: integer);\r\nbegin\r\n if Assigned(OnItemInsert) then\r\n OnItemInsert(Self, Index);\r\nend;\r\n\r\nprocedure TResponsiveGridItems.DoItemUpdate(Index: integer);\r\nbegin\r\n if Assigned(OnItemUpdate) then\r\n OnItemUpdate(Self, Index);\r\nend;\r\n\r\nfunction TResponsiveGridItems.GetItem(Index: integer): TResponsiveGridItem;\r\nbegin\r\n Result := TResponsiveGridItem(inherited Items[Index]);\r\nend;\r\n\r\nfunction TResponsiveGridItems.Insert(Index: integer): TResponsiveGridItem;\r\nbegin\r\n Result := TResponsiveGridItem(inherited Insert(Index));\r\n DoItemInsert(Result.Index);\r\nend;\r\n\r\nprocedure TResponsiveGridItems.SetItem(Index: integer;\r\n const Value: TResponsiveGridItem);\r\nbegin\r\n inherited Items[Index] := Value;\r\nend;\r\n\r\nprocedure TResponsiveGridItems.Update(Item: TCollectionItem);\r\nbegin\r\n inherited;\r\n if Assigned(Item) then\r\n DoItemUpdate(Item.Index);\r\nend;\r\n\r\n{ TResponsiveGrid }\r\n\r\nprocedure TResponsiveGrid.BindElement;\r\nbegin\r\n inherited;\r\nend;\r\n\r\nconstructor TResponsiveGrid.Create(AOwner: TComponent);\r\nbegin\r\n inherited;\r\nend;\r\n\r\nfunction TResponsiveGrid.CreateElement: TJSElement;\r\nbegin\r\n Result := document.createElement('DIV');\r\nend;\r\n\r\nprocedure TResponsiveGrid.CreateInitialize;\r\nbegin\r\n inherited;\r\n\r\n FDesignTime := (csDesigning in ComponentState) and not\r\n ((csReading in Owner.ComponentState) or (csLoading in Owner.ComponentState));\r\n\r\n FListElement := nil;\r\n FItemIndex := -1;\r\n\r\n FOptions := TResponsiveGridOptions.Create;\r\n FOptions.OnChange := OptionsChanged;\r\n FItems := TResponsiveGridItems.Create(Self);\r\n FItems.PropName := 'Items';\r\n\r\n if FDesignTime then\r\n begin\r\n Items.Clear;\r\n Items.Add;\r\n Items.Add;\r\n Items.Add;\r\n end;\r\n\r\n FItems.OnItemAdd := HandleItemAdd;\r\n FItems.OnItemUpdate := HandleItemUpdate;\r\n FItems.OnItemDelete := HandleItemDelete;\r\n FItems.OnItemInsert := HandleItemInsert;\r\n FItems.OnItemClear := HandleItemClear;\r\n\r\n if (csDesigning in ComponentState) then\r\n begin\r\n Width := 400;\r\n Height := 300;\r\n end;\r\n\r\nend;\r\n\r\nprocedure TResponsiveGrid.CreateControl;\r\nbegin\r\n inherited;\r\nend;\r\n\r\ndestructor TResponsiveGrid.Destroy;\r\nbegin\r\n FOptions.Free;\r\n FItems.Free;\r\n inherited;\r\nend;\r\n\r\nfunction TResponsiveGrid.DoHttpAbort(Event: TEventListenerEvent): boolean;\r\nbegin\r\n if Assigned(OnHttpRequestError) then\r\n OnHttpRequestError(Self);\r\n Result := true;\r\nend;\r\n\r\nfunction TResponsiveGrid.DoHttpLoadCsv(Event: TEventListenerEvent): boolean;\r\nvar\r\n sl,arow,columns: TStringList;\r\n i,c: integer;\r\n itm: TResponsiveGridItem;\r\n ident,html, htmlvalue: string;\r\n req: TJSXMLHttpRequest;\r\n\r\nbegin\r\n req := TJSXMLHttpRequest(Event.target);\r\n\r\n if (req.status >= 200) and (req.status <= 208) then\r\n begin\r\n sl := TStringList.Create;\r\n sl.Text := req.responseText;\r\n\r\n arow := TStringList.Create;\r\n arow.StrictDelimiter := true;\r\n arow.Delimiter := FDelimiter;\r\n\r\n if sl.Count > 0 then\r\n begin\r\n columns := TStringList.Create;\r\n columns.StrictDelimiter := true;\r\n columns.Delimiter := FDelimiter;\r\n columns.DelimitedText := sl.Strings[0];\r\n\r\n for i := 0 to sl.Count - 1 do\r\n begin\r\n arow.DelimitedText := sl.Strings[i];\r\n\r\n if Options.ItemTemplate = '' then\r\n begin\r\n Items.Add.HTML := arow.CommaText;\r\n end\r\n else\r\n begin\r\n itm := Items.Add(' ');\r\n\r\n html := Options.ItemTemplate;\r\n\r\n DoItemGetTemplate(i, arow.CommaText ,html);\r\n\r\n ident := '(%ITEMINDEX%)';\r\n if pos(ident, html) > 0 then\r\n begin\r\n html := StringReplace(html, ident, inttostr(itm.Index), [rfReplaceAll]);\r\n end;\r\n\r\n for c := 0 to arow.Count - 1 do\r\n begin\r\n ident := '(%' + columns.Strings[c] + '%)';\r\n if Pos(ident, html) > 0 then\r\n begin\r\n htmlvalue := '';\r\n if c < arow.Count then\r\n htmlvalue := arow.Strings[c];\r\n\r\n DoItemGetFieldValue(itm.Index, columns.Strings[c], htmlvalue);\r\n html := StringReplace(html, ident, htmlvalue, [rfReplaceAll]);\r\n end;\r\n end;\r\n\r\n itm.HTML := html;\r\n\r\n DoItemCreated(itm.Index);\r\n end;\r\n end;\r\n\r\n columns.Free;\r\n end;\r\n\r\n arow.Free;\r\n sl.Free;\r\n end;\r\n\r\n Result := true;\r\nend;\r\n\r\n{$HINTS OFF}\r\nfunction TResponsiveGrid.DoHttpLoadJson(Event: TEventListenerEvent): boolean;\r\nvar\r\n J: TJSObject;\r\n req: TJSXMLHttpRequest;\r\n\r\nbegin\r\n req := TJSXMLHttpRequest(Event.target);\r\n\r\n if (req.status >= 200) and (req.status <= 208) then\r\n begin\r\n Items.Clear;\r\n\r\n J := TJSJSON.parseObject(req.responseText);\r\n\r\n LoadFromJSON(J, FDataNode);\r\n\r\n if Assigned(OnHttpRequestSuccess) then\r\n OnHttpRequestSuccess(Self);\r\n end;\r\n\r\n Result := true;\r\nend;\r\n\r\nprocedure TResponsiveGrid.DoHttpRequest(ARequest: TJSXMLHttpRequest);\r\nvar\r\n LRequestRec: TJSXMLHttpRequestRecord;\r\nbegin\r\n if Assigned(OnHttpRequest) then\r\n begin\r\n LRequestRec.req := ARequest;\r\n OnHttpRequest(Self, LRequestRec);\r\n end;\r\nend;\r\n\r\n{$HINTS ON}\r\n\r\nprocedure TResponsiveGrid.DoItemCreated(Index: integer);\r\nbegin\r\n if Assigned(OnItemCreated) then\r\n OnItemCreated(Self, Index);\r\nend;\r\n\r\nprocedure TResponsiveGrid.DoItemGetFieldValue(Index: integer;\r\n AFieldName: string; var AValue: string);\r\nbegin\r\n if Assigned(OnItemGetFieldValue) then\r\n OnItemGetFieldValue(Self, Index, AFieldName, AValue);\r\nend;\r\n\r\nprocedure TResponsiveGrid.DoItemGetTemplate(Index: integer; ItemData: string;\r\n var ATemplate: string);\r\nbegin\r\n if Assigned(OnItemGetTemplate) then\r\n OnItemGetTemplate(Self, Index, ItemData, ATemplate);\r\nend;\r\n\r\nprocedure TResponsiveGrid.FontChanged;\r\nbegin\r\n inherited;\r\n UpdateElement;\r\nend;\r\n\r\nfunction TResponsiveGrid.GetStyleName: string;\r\nbegin\r\n if Assigned(Parent) then\r\n Result := Parent.Name + '_' + Name\r\n else\r\n Result := Name;\r\nend;\r\n\r\nfunction TResponsiveGrid.TargetIsParent(tgt,el: TJSElement): boolean;\r\nvar\r\n pe: TJSElement;\r\nbegin\r\n Result := false;\r\n pe := tgt;\r\n repeat\r\n if el = pe then\r\n begin\r\n Result := true;\r\n break;\r\n end;\r\n pe := pe.parentElement;\r\n\r\n until not Assigned(pe);\r\nend;\r\n\r\nfunction TResponsiveGrid.HandleDoClick(Event: TJSMouseEvent): Boolean;\r\nvar\r\n i: integer;\r\n el: TJSHTMLElement;\r\n LStyleName: string;\r\nbegin\r\n Result := inherited HandleDoClick(Event);\r\n\r\n LStyleName := GetStyleName;\r\n\r\n for i := 0 to Items.Count - 1 do\r\n begin\r\n el := TJSHTMLElement(ListElementHandle.children.Items[i]);\r\n if Assigned(el) then\r\n begin\r\n // search HTML DIV element in list that is clicked\r\n if TargetIsParent(Event.targetElement, el) then\r\n begin\r\n if Options.MultiSelect then\r\n begin\r\n if Items[i].Selected then\r\n begin\r\n el.classList.remove(LStyleName+'_Selected');\r\n end\r\n else\r\n begin\r\n el.classList.add(LStyleName+'_Selected');\r\n end;\r\n Items[i].FSelected := not Items[i].FSelected;\r\n end\r\n else\r\n begin\r\n FItemIndex := i;\r\n el.classList.add(LStyleName+'_Selected');\r\n end;\r\n HandleDoItemClick(i);\r\n end\r\n else\r\n if not Options.MultiSelect then\r\n el.classList.remove(LStyleName+'_Selected');\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TResponsiveGrid.HandleDoDblClick(Event: TJSMouseEvent): Boolean;\r\nvar\r\n i: integer;\r\n el: TJSHTMLElement;\r\nbegin\r\n Result := inherited HandleDoClick(Event);\r\n\r\n for i := 0 to Items.Count - 1 do\r\n begin\r\n el := TJSHTMLElement(ListElementHandle.children.Items[i]);\r\n\r\n if TargetIsParent(Event.targetElement, el) then\r\n begin\r\n HandleDoItemDblClick(i);\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TResponsiveGrid.HandleDoItemClick(Index: integer);\r\nbegin\r\n if Assigned(OnItemClick) then\r\n OnItemClick(Self, Index);\r\nend;\r\n\r\nprocedure TResponsiveGrid.HandleDoItemDblClick(Index: integer);\r\nbegin\r\n if Assigned(OnItemDblClick) then\r\n OnItemDblClick(Self, Index);\r\nend;\r\n\r\nfunction TResponsiveGrid.HandleDoMouseEnter(Event: TJSMouseEvent): Boolean;\r\nbegin\r\n Result := inherited HandleDoMouseEnter(Event);\r\nend;\r\n\r\nprocedure TResponsiveGrid.HandleItemAdd(Sender: TObject; Index: integer);\r\nvar\r\n el: TJSHTMLElement;\r\nbegin\r\n if Items.Items[Index].FHTML = '' then\r\n Items.Items[Index].FHTML := Options.ItemTemplate;\r\n\r\n el := TJSHTMLElement(document.createElement('DIV'));\r\n Items.Items[Index].FElementHandle := el;\r\n\r\n ListElementHandle.appendChild(el);\r\n\r\n // already load when it has no template data fields\r\n if pos('(%',Items.Items[Index].HTML) = 0 then\r\n el.innerHTML := Items.Items[Index].HTML;\r\n\r\n if Options.ItemClassName <> '' then\r\n el.setAttribute('class',Options.ItemClassName);\r\nend;\r\n\r\nprocedure TResponsiveGrid.HandleItemClear(Sender: TObject);\r\nvar\r\n i: integer;\r\nbegin\r\n for i := ListElementHandle.childElementCount - 1 downto 0 do\r\n begin\r\n ListElementHandle.removeChild(ListElementHandle.children.items[0]);\r\n end;\r\nend;\r\n\r\nprocedure TResponsiveGrid.HandleItemDelete(Sender: TObject; Index: integer);\r\nbegin\r\n if Assigned(ListElementHandle) then\r\n begin\r\n ListElementHandle.removeChild(ListElementHandle.children.Items[Index]);\r\n end;\r\nend;\r\n\r\nprocedure TResponsiveGrid.HandleItemInsert(Sender: TObject; Index: integer);\r\nvar\r\n el: TJSHTMLElement;\r\nbegin\r\n Items.Items[Index].FHTML := Options.ItemTemplate;\r\n\r\n el := TJSHTMLElement(document.createElement('DIV'));\r\n Items.Items[Index].FElementHandle := el;\r\n\r\n if Items.Count <= 1 then\r\n ListElementHandle.appendChild(el)\r\n else\r\n ListElementHandle.insertBefore(el, ListElementHandle.children.Items[Index]);\r\n\r\n el.innerHTML := Items.Items[Index].HTML;\r\n if Options.ItemClassName <> '' then\r\n el.setAttribute('class',Options.ItemClassName);\r\nend;\r\n\r\nprocedure TResponsiveGrid.HandleItemUpdate(Sender: TObject; Index: integer);\r\nvar\r\n el: TJSHTMLElement;\r\nbegin\r\n if Assigned(ListElementHandle) then\r\n begin\r\n el := TJSHTMLElement(ListElementHandle.children.Items[Index]);\r\n if not Assigned(el) then\r\n begin\r\n HandleItemInsert(Self, Index);\r\n end\r\n else\r\n el.innerHTML := Items.Items[Index].HTML;\r\n end;\r\nend;\r\n\r\nprocedure TResponsiveGrid.InitCSSLibrary(ALibrary: TCSSLibrary);\r\nbegin\r\n if (ALibrary = cssBootstrap) then\r\n begin\r\n ElementFont := efCSS;\r\n end;\r\nend;\r\n\r\nfunction TResponsiveGrid.ItemByTag(ATag: integer): TResponsiveGridItem;\r\nvar\r\n i: integer;\r\nbegin\r\n Result := nil;\r\n\r\n for I := 0 to Items.Count - 1 do\r\n begin\r\n if Items[I].Tag = ATag then\r\n begin\r\n Result := Items[I];\r\n Break;\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TResponsiveGrid.ListElementHandle: TJSElement;\r\nbegin\r\n if not Assigned(FListElement) then\r\n begin\r\n FListElement := TJSHTMLElement(document.createElement('DIV'));\r\n FListElement['width'] := '100%';\r\n ElementHandle.appendChild(FListElement);\r\n Result := FListElement;\r\n end\r\n else\r\n Result := FListElement;\r\nend;\r\n\r\nprocedure TResponsiveGrid.Loaded;\r\nbegin\r\n inherited;\r\n RenderGrid;\r\nend;\r\n\r\nprocedure TResponsiveGrid.LoadFromCSV(const AURL: string; Delimiter: char = ';');\r\nbegin\r\n FDelimiter := Delimiter;\r\n\r\n FReq := TJSXMLHttpRequest.new;\r\n FReq.addEventListener('load',@DoHttpLoadCsv);\r\n FReq.addEventListener('abort',@DoHttpAbort);\r\n FReq.open('GET', AURL);\r\n DoHttpRequest(FReq);\r\n FReq.send;\r\nend;\r\n\r\nprocedure TResponsiveGrid.LoadFromJSON(const AURL: string; ADataNode: string);\r\nbegin\r\n FDataNode := ADataNode;\r\n FReq := TJSXMLHttpRequest.new;\r\n FReq.addEventListener('load',@DoHttpLoadJson);\r\n FReq.addEventListener('abort',@DoHttpAbort);\r\n FReq.open('GET', AURL);\r\n DoHttpRequest(FReq);\r\n FReq.send;\r\nend;\r\n\r\nprocedure TResponsiveGrid.LoadFromJSON(ASJON: TJSObject; ADataNode: string = '');\r\nvar\r\n JO: JSValue;\r\n JA: TJSArray;\r\n r,c: integer;\r\n arow,ident,html, htmlvalue: string;\r\n sl: TStringList;\r\n itm: TResponsiveGridItem;\r\n\r\nbegin\r\n if ADataNode <> '' then\r\n JA := TJSArray(ASJON.Properties[ADataNode])\r\n else\r\n JA := TJSArray(ASJON);\r\n\r\n if Assigned(JA) then\r\n begin\r\n sl := TStringList.Create;\r\n\r\n //RowCount := JA.length + FixedRows;\r\n\r\n for r := 0 to JA.length - 1 do\r\n begin\r\n // array element\r\n JO := JA.Elements[r];\r\n\r\n c := 0;\r\n arow := '';\r\n\r\n asm\r\n var x = undefined;\r\n for (x in JO) {\r\n arow += \"|\" + x + \"=\" + JO[x];\r\n c++;\r\n }\r\n end;\r\n\r\n Delete(arow, 1, 1);\r\n sl.StrictDelimiter := true;\r\n sl.Delimiter := '|';\r\n sl.DelimitedText := arow;\r\n\r\n itm := Items.Add;\r\n itm.JSONElement := JO;\r\n\r\n if Options.ItemTemplate = '' then\r\n begin\r\n itm.HTML := sl.CommaText;\r\n end\r\n else\r\n begin\r\n html := Options.ItemTemplate;\r\n\r\n DoItemGetTemplate(r, sl.CommaText ,html);\r\n\r\n ident := '(%ITEMINDEX%)';\r\n if pos(ident, html) > 0 then\r\n begin\r\n html := StringReplace(html, ident, inttostr(itm.Index), [rfReplaceAll]);\r\n end;\r\n\r\n for c := 0 to sl.Count - 1 do\r\n begin\r\n ident := '(%' + sl.Names[c] + '%)';\r\n\r\n if Pos(ident, html) > 0 then\r\n begin\r\n htmlvalue := sl.Values[sl.Names[c]];\r\n DoItemGetFieldValue(itm.Index, sl.Names[c], htmlvalue);\r\n html := StringReplace(html, ident, htmlvalue, [rfReplaceAll]);\r\n end;\r\n end;\r\n\r\n itm.HTML := html;\r\n\r\n DoItemCreated(itm.Index);\r\n end;\r\n end;\r\n\r\n sl.Free;\r\n end;\r\nend;\r\n\r\nprocedure TResponsiveGrid.OptionsChanged(Sender: TObject);\r\nbegin\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TResponsiveGrid.RenderGrid;\r\nvar\r\n i: integer;\r\n el: TJSHTMLElement;\r\nbegin\r\n if (csDestroying in ComponentState) then\r\n Exit;\r\n\r\n if not Assigned(ListElementHandle) then\r\n Exit;\r\n\r\n // clear previous items\r\n while ListElementHandle.childElementCount > 0 do\r\n begin\r\n ListElementHandle.removeChild(ListElementHandle.firstChild);\r\n end;\r\n\r\n // refresh items\r\n for i := 0 to Items.Count - 1 do\r\n begin\r\n el := TJSHTMLElement(document.createElement('DIV'));\r\n el.style.setProperty('position', 'relative');\r\n Items[i].FElementHandle := el;\r\n ListElementHandle.appendChild(el);\r\n el.innerHTML := Items[i].HTML;\r\n if Options.ItemClassName <> '' then\r\n el.setAttribute('class',Options.ItemClassName);\r\n end;\r\nend;\r\n\r\nprocedure TResponsiveGrid.SetItemIndex(const Value: integer);\r\nvar\r\n el: TJSHTMLElement;\r\n i: integer;\r\n LStyleName: string;\r\nbegin\r\n FItemIndex := Value;\r\n\r\n if (csLoading in ComponentState) then\r\n Exit;\r\n\r\n LStyleName := GetStyleName;\r\n\r\n for i := 0 to Items.Count - 1 do\r\n begin\r\n el := TJSHTMLElement(ListElementHandle.children.Items[i]);\r\n if (i = FItemIndex) then\r\n begin\r\n el.setAttribute('class',Options.ItemClassName + ' ' + LStyleName+'_Selected');\r\n end\r\n else\r\n el.setAttribute('class',Options.ItemClassName);\r\n end;\r\nend;\r\n\r\nprocedure TResponsiveGrid.SetItems(const Value: TResponsiveGridItems);\r\nbegin\r\n FItems.Assign(Value);\r\nend;\r\n\r\nprocedure TResponsiveGrid.SetOptions(const Value: TResponsiveGridOptions);\r\nbegin\r\n FOptions.Assign(Value);\r\nend;\r\n\r\nprocedure TResponsiveGrid.UpdateElement;\r\nconst\r\n cssimportant = ' !important; ';\r\nvar\r\n s, fs: string;\r\n ITMWIDTHMIN: string;\r\n ITMGAP: string;\r\n ITMHEIGHT: string;\r\n itemstyle, itemstylehover, itemstyleselected: string;\r\n LStyleName: string;\r\n LTemplate: string;\r\nbegin\r\n inherited;\r\n\r\n if IsUpdating then\r\n Exit;\r\n\r\n if (csLoading in ComponentState) then\r\n Exit;\r\n\r\n if Assigned(ElementHandle) then\r\n begin\r\n ITMWIDTHMIN := IntToStr(Options.ItemWidthMin);\r\n ITMHEIGHT := IntToStr(Options.ItemHeight);\r\n ITMGAP := IntToStr(Options.ItemGap);\r\n\r\n LStyleName := GetStyleName;\r\n\r\n ListElementHandle.setAttribute('class', LStyleName);\r\n\r\n fs := '';\r\n\r\n if (ElementClassName = '') and (ElementFont = efProperty) then\r\n fs := CSSFont(Self.Font);\r\n\r\n itemstyle := '';\r\n itemstylehover := '';\r\n itemstyleselected := '';\r\n\r\n if Options.ItemColor <> clNone then\r\n begin\r\n itemstyle := 'background-color:'+ColorToHTML(Options.ItemColor)+';';\r\n end;\r\n\r\n if (csDesigning in ComponentState) and (Options.ItemBorderColor = clNone) then\r\n itemstyle := itemstyle + 'border: 1px dotted silver;'\r\n else if (Options.ItemBorderColor <> clNone) then\r\n itemstyle := itemstyle + 'border: 1px solid ' + ColorToHTML(Options.ItemBorderColor)+';';\r\n\r\n if Options.ItemPadding <> 0 then\r\n itemstyle := itemstyle + 'padding:' + IntToStr(Options.ItemPadding)+'px;';\r\n\r\n if Options.ItemHoverColor <> clNone then\r\n itemstylehover := 'background-color:' + ColorToHTML(Options.ItemHoverColor) + cssimportant;\r\n\r\n if Options.ItemHoverBorderColor <> clNone then\r\n itemstylehover := itemstylehover + 'border: 1px solid '+ColorToHTML(Options.ItemHoverBorderColor) + cssimportant;\r\n\r\n if Options.ItemSelectedColor <> clNone then\r\n itemstyleselected := 'background-color:' + ColorToHTML(Options.ItemSelectedColor) + cssimportant;\r\n\r\n if Options.ItemSelectedBorderColor <> clNone then\r\n itemstyleselected := itemstyleselected + 'border: 1px solid '+ColorToHTML(Options.ItemSelectedBorderColor)+';';\r\n\r\n if Options.ItemSelectedTextColor <> clNone then\r\n itemstyleselected := itemstyleselected + 'color:'+ColorToHTML(Options.ItemSelectedTextColor)+';';\r\n\r\n if Options.ScrollVertical then\r\n ElementHandle.style.removeProperty('overflow-y')\r\n else\r\n ElementHandle.style.setProperty('overflow-y','hidden');\r\n\r\n if Options.Order = toColumn then\r\n LTemplate := 'grid-template-columns'\r\n else\r\n begin\r\n LTemplate := 'grid-auto-flow: column; height: ' + Height.ToString + 'px; grid-template-rows';\r\n ITMWIDTHMIN := IntToStr(Options.ItemHeight);\r\n ElementHandle.style.setProperty('overflow-x','auto');\r\n end;\r\n\r\n s := '.'+LStyleName+' {'+\r\n 'display: grid; ' + LTemplate + ': repeat(auto-fill, minmax('+ ITMWIDTHMIN +'px, 1fr));'+\r\n ' grid-gap: '+ ITMGAP + 'px;'+\r\n '}' + #13\r\n + '.'+LStyleName+' > div { ' + itemstyle +'height: '+ ITMHEIGHT + 'px; ' + fs +' }'+#13\r\n + '.'+LStyleName+' > div:hover {' + itemstylehover + ' '+ fs + ' }'+#13\r\n + '.'+LStyleName+'_Selected {' + itemstyleselected + 'height: '+ ITMHEIGHT + 'px;' + fs + '}'+#13;\r\n\r\n AddInstanceStyle(LStyleName+'_style', s);\r\n end;\r\n\r\n RenderGrid;\r\nend;\r\n\r\n{ TResponsiveGridOptions }\r\n\r\nprocedure TResponsiveGridOptions.Assign(Source: TPersistent);\r\nbegin\r\n if (Source is TResponsiveGridOptions) then\r\n begin\r\n FItemWidthMin := (Source as TResponsiveGridOptions).ItemWidthMin;\r\n FItemHeight := (Source as TResponsiveGridOptions).ItemHeight;\r\n FMultiSelect := (Source as TResponsiveGridOptions).MultiSelect;\r\n FOrder := (Source as TResponsiveGridOptions).Order;\r\n end;\r\nend;\r\n\r\nprocedure TResponsiveGridOptions.Changed;\r\nbegin\r\n if Assigned(OnChange) then\r\n OnChange(Self);\r\nend;\r\n\r\nconstructor TResponsiveGridOptions.Create;\r\nbegin\r\n inherited;\r\n FItemWidthMin := 100;\r\n FItemHeight := 100;\r\n FItemGap := 10;\r\n FScrollVertical := true;\r\n FItemColor := clNone;\r\n FItemBorderColor := clNone;\r\n FItemHoverColor := clNone;\r\n FItemHoverBorderColor := clNone;\r\n FItemSelectedColor := clNone;\r\n FItemSelectedBorderColor := clNone;\r\n FItemSelectedTextColor := clNone;\r\n FOrder := toColumn;\r\nend;\r\n\r\nprocedure TResponsiveGridOptions.SetItemBorderColor(const Value: TColor);\r\nbegin\r\n if (FItemBorderColor <> Value) then\r\n begin\r\n FItemBorderColor := Value;\r\n Changed;\r\n end;\r\nend;\r\n\r\nprocedure TResponsiveGridOptions.SetItemColor(const Value: TColor);\r\nbegin\r\n if (FItemColor <> Value) then\r\n begin\r\n FItemColor := Value;\r\n Changed;\r\n end;\r\nend;\r\n\r\nprocedure TResponsiveGridOptions.SetItemGap(const Value: integer);\r\nbegin\r\n if (FItemGap <> Value) then\r\n begin\r\n FItemGap := Value;\r\n Changed;\r\n end;\r\nend;\r\n\r\nprocedure TResponsiveGridOptions.SetItemHeight(const Value: integer);\r\nbegin\r\n if (FItemHeight <> Value) then\r\n begin\r\n FItemHeight := Value;\r\n Changed;\r\n end;\r\nend;\r\n\r\nprocedure TResponsiveGridOptions.SetItemHoverBorderColor(const Value: TColor);\r\nbegin\r\n if (FItemHoverBorderColor <> Value) then\r\n begin\r\n FItemHoverBorderColor := Value;\r\n Changed;\r\n end;\r\nend;\r\n\r\nprocedure TResponsiveGridOptions.SetItemHoverColor(const Value: TColor);\r\nbegin\r\n if (FItemHoverColor <> Value) then\r\n begin\r\n FItemHoverColor := Value;\r\n Changed;\r\n end;\r\nend;\r\n\r\nprocedure TResponsiveGridOptions.SetItemPadding(const Value: integer);\r\nbegin\r\n if (FItemPadding <> Value) then\r\n begin\r\n FItemPadding := Value;\r\n Changed;\r\n end;\r\nend;\r\n\r\nprocedure TResponsiveGridOptions.SetItemSelectedBorderColor(\r\n const Value: TColor);\r\nbegin\r\n if FItemSelectedBorderColor <> Value then\r\n begin\r\n FItemSelectedBorderColor := Value;\r\n Changed;\r\n end;\r\nend;\r\n\r\nprocedure TResponsiveGridOptions.SetItemSelectedColor(const Value: TColor);\r\nbegin\r\n if (FItemSelectedColor <> Value) then\r\n begin\r\n FItemSelectedColor := Value;\r\n Changed;\r\n end;\r\nend;\r\n\r\nprocedure TResponsiveGridOptions.SetItemSelectedTextColor(const Value: TColor);\r\nbegin\r\n if (FItemSelectedTextColor <> Value) then\r\n begin\r\n FItemSelectedTextColor := Value;\r\n Changed;\r\n end;\r\nend;\r\n\r\nprocedure TResponsiveGridOptions.SetItemTemplate(const Value: string);\r\nbegin\r\n if (FItemTemplate <> Value) then\r\n begin\r\n FItemTemplate := Value;\r\n Changed;\r\n end;\r\nend;\r\n\r\nprocedure TResponsiveGridOptions.SetItemWidthMin(const Value: integer);\r\nbegin\r\n if (FItemWidthMin <> Value) then\r\n begin\r\n FItemWidthMin := Value;\r\n Changed;\r\n end;\r\nend;\r\n\r\nprocedure TResponsiveGridOptions.SetScrollVertical(const Value: boolean);\r\nbegin\r\n if (FScrollVertical <> Value) then\r\n begin\r\n FScrollVertical := Value;\r\n Changed;\r\n end;\r\nend;\r\n\r\n{$HINTS ON}\r\n\r\n{ TTableControlOptions }\r\n\r\nprocedure TTableControlOptions.Assign(Source: TPersistent);\r\nbegin\r\n if (Source is TTableControlOptions) then\r\n begin\r\n FScrollVertical := (Source as TTableControlOptions).ScrollVertical;\r\n FResizeColumns := (Source as TTableControlOptions).ResizeColumns;\r\n FAutoCellURL := (Source as TTableControlOptions).AutoCellURL;\r\n FAutoCellEmail := (Source as TTableControlOptions).AutoCellEmail;\r\n FAutoCellImage := (Source as TTableControlOptions).AutoCellImage;\r\n FAutoNumAlign := (Source as TTableControlOptions).AutoNumAlign;\r\n FCellBorders := (Source as TTableControlOptions).CellBorders;\r\n FCellBorderColor := (Source as TTableControlOptions).CellBorderColor;\r\n FImageWidth := (Source as TTableControlOptions).ImageWidth;\r\n FImageAlign := (Source as TTableControlOptions).ImageAlign;\r\n end;\r\nend;\r\n\r\nconstructor TTableControlOptions.Create(AOwner: TCustomTableControl);\r\nbegin\r\n inherited;\r\n FOwner := AOwner;\r\n FCellBorderColor := clSilver;\r\n FImageAlign := taLeftJustify;\r\n FImageWidth := 0;\r\nend;\r\n\r\nprocedure TTableControlOptions.SetCellBorderColor(const Value: TColor);\r\nbegin\r\n FCellBorderColor := Value;\r\n FOwner.RenderGridBorders;\r\nend;\r\n\r\nprocedure TTableControlOptions.SetCellBorders(const Value: boolean);\r\nbegin\r\n FCellBorders := Value;\r\n FOwner.RenderGridBorders;\r\nend;\r\n\r\nprocedure TTableControlOptions.SetResizeColumns(const Value: boolean);\r\nbegin\r\n FResizeColumns := Value;\r\n FOwner.EnableColResize;\r\nend;\r\n\r\nprocedure TTableControlOptions.SetScrollVertical(const Value: boolean);\r\nbegin\r\n FScrollVertical := Value;\r\n FOwner.UpdateElement;\r\nend;\r\n\r\n{ TGridRange }\r\n\r\nprocedure TGridRange.Assign(Source: TPersistent);\r\nbegin\r\n if (Source is TGridRange) then\r\n begin\r\n FMax := (Source as TGridRange).Max;\r\n FMin := (Source as TGridRange).Min;\r\n FStep := (Source as TGridRange).Step;\r\n end;\r\nend;\r\n\r\nconstructor TGridRange.Create;\r\nbegin\r\n inherited;\r\n FMin := 0;\r\n FMax := 100;\r\n FStep := 1;\r\nend;\r\n\r\n{ TTableControlHeader }\r\n\r\nprocedure TTableControlHeader.Assign(Source: TPersistent);\r\nbegin\r\n if (Source is TTableControlHeader) then\r\n begin\r\n FCaption := (Source as TTableControlHeader).Caption;\r\n FVisible := (Source as TTableControlHeader).Visible;\r\n FPager := (Source as TTableControlHeader).Pager;\r\n FPagerAlign := (Source as TTableControlHeader).PagerAlign;\r\n FButtonActiveElementClassName := (Source as TTableControlHeader).ButtonActiveElementClassName;\r\n FButtonElementClassName := (Source as TTableControlHeader).ButtonElementClassName;\r\n FLinkActiveElementClassName := (Source as TTableControlHeader).LinkActiveElementClassName;\r\n FLinkElementClassName := (Source as TTableControlHeader).LinkElementClassName;\r\n FDropDownElementClassName := (Source as TTableControlHeader).DropDownElementClassName;\r\n FInputElementClassName := (Source as TTableControlHeader).InputElementClassName;\r\n FFilterColumn := (Source as TTableControlHeader).FilterColumn;\r\n FFilter := (Source as TTableControlHeader).Filter;\r\n FSearch := (Source as TTableControlHeader).Search;\r\n FListElementClassName := (Source as TTableControlHeader).ListElementClassName;\r\n FListItemElementClassName := (Source as TTableControlHeader).ListItemElementClassName;\r\n FListLinkElementClassName := (Source as TTableControlHeader).ListLinkElementClassName;\r\n end;\r\nend;\r\n\r\nprocedure TTableControlHeader.Changed;\r\nbegin\r\n if Assigned(OnChange) then\r\n OnChange(Self);\r\nend;\r\n\r\nconstructor TTableControlHeader.Create(AOwner: TCustomTableControl);\r\nbegin\r\n inherited Create;\r\n FOwner := AOwner;\r\n FPagerElement := nil;\r\n FPagerAlign := paRight;\r\n FPageEventPtr := @HandlePagerClick;\r\n FSearchEventPtr := @HandleSearchClick;\r\n FFilterEventPtr := @HandleFilterClick;\r\nend;\r\n\r\nfunction TTableControlHeader.HandleFilterClick(Event: TJSInputEvent): Boolean;\r\nvar\r\n cond: string;\r\nbegin\r\n asm\r\n cond = this.FFilterInput.value;\r\n end;\r\n if (cond = '') or (cond <> FFilterValue) then\r\n FOwner.RemoveFilter;\r\n\r\n if (cond <> '') then\r\n begin\r\n FFilterValue := cond;\r\n FOwner.SetFilter(FilterColumn, FFilterValue);\r\n end;\r\n Result := true;\r\nend;\r\n\r\nfunction TTableControlHeader.HandlePagerClick(Event: TJSInputEvent): Boolean;\r\nvar\r\n idx: integer;\r\n s: string;\r\nbegin\r\n Event.preventDefault;\r\n Event.stopPropagation;\r\n\r\n Result := true;\r\n\r\n if Pager = tpDropDown then\r\n begin\r\n asm\r\n idx = this.FPagerElement.selectedIndex;\r\n end;\r\n end\r\n else\r\n if Pager = tpPrevNext then\r\n begin\r\n s := TJSElement(Event.target).getAttribute('data');\r\n idx := StrToInt(s);\r\n\r\n case idx of\r\n 0: if FOwner.Paging.ActivePage > 0 then\r\n idx := 0\r\n else\r\n Exit;\r\n 1: if FOwner.Paging.ActivePage > 0 then\r\n idx := FOwner.Paging.ActivePage - 1\r\n else\r\n Exit;\r\n 2: if FOwner.Paging.ActivePage < FOwner.Paging.PageCount - 1 then\r\n idx := FOwner.Paging.ActivePage + 1\r\n else\r\n Exit;\r\n 3: if FOwner.Paging.ActivePage < FOwner.Paging.PageCount - 1 then\r\n idx := FOwner.Paging.PageCount - 1\r\n else\r\n Exit;\r\n end;\r\n end\r\n else\r\n begin\r\n s := TJSElement(Event.target).getAttribute('data');\r\n idx := StrToInt(s);\r\n end;\r\n\r\n FOwner.DoSelectPage(idx);\r\nend;\r\n\r\nfunction TTableControlHeader.HandleSearchClick(Event: TJSInputEvent): Boolean;\r\nvar\r\n cond: string;\r\nbegin\r\n asm\r\n cond = this.FSearchInput.value;\r\n end;\r\n\r\n if (cond <> '') and (cond <> FSearchValue) then\r\n begin\r\n FSearchValue := cond;\r\n FOwner.FindCell(FSearchValue);\r\n end\r\n else\r\n FOwner.FindNext;\r\n//FindCell(Condition: string; CaseSensitive: boolean = true; AllCells: boolean = false): TGridCoord;\r\n\r\n Result := true;\r\nend;\r\n\r\nprocedure TTableControlHeader.SetCaption(const Value: string);\r\nbegin\r\n if FCaption <> Value then\r\n begin\r\n FCaption := Value;\r\n FOwner.RenderGrid;\r\n end;\r\nend;\r\n\r\nprocedure TTableControlHeader.SetPager(const Value: TTablePager);\r\nbegin\r\n if (FPager <> Value) then\r\n begin\r\n FPager := Value;\r\n Update(FOwner.Paging.Size, FOwner.RowCount, FOwner.Paging.Index);\r\n end;\r\nend;\r\n\r\nprocedure TTableControlHeader.SetPagerAlign(const Value: TTablePagerAlign);\r\nbegin\r\n if (FPagerAlign <> Value) then\r\n begin\r\n FPagerAlign := Value;\r\n FOwner.ReRenderGrid;\r\n end;\r\nend;\r\n\r\nprocedure TTableControlHeader.SetVisible(const Value: boolean);\r\nbegin\r\n if FVisible <> Value then\r\n begin\r\n FVisible := Value;\r\n FOwner.ReRenderGrid;\r\n end;\r\nend;\r\n\r\nprocedure TTableControlHeader.Update(PageSize, RowCount, ActivePage: integer);\r\nvar\r\n opt: TJSHTMLOptionElement;\r\n lnk,itm,btn: TJSHTMLElement;\r\n i,numpages: integer;\r\n trc: integer;\r\nbegin\r\n if not Assigned(FElement) then\r\n Exit;\r\n\r\n if Assigned(FSearchElement) then\r\n begin\r\n FSearchElement.parentElement.removeChild(FSearchElement);\r\n FSearchElement := nil;\r\n end;\r\n if Assigned(FFilterElement) then\r\n begin\r\n FFilterElement.parentElement.removeChild(FFilterElement);\r\n FFilterElement := nil;\r\n end;\r\n\r\n if Search then\r\n begin\r\n FSearchElement := TJSHTMLElement(document.createElement('DIV'));\r\n FSearchElement.style.setProperty('float','left');\r\n FSearchInput := TJSHTMLElement(document.createElement('INPUT'));\r\n if InputElementClassName <> '' then\r\n FSearchInput['class'] := InputElementClassName;\r\n FSearchInput.style.setProperty('display','inline');\r\n FSearchInput.style.setProperty('width','auto');\r\n\r\n btn := TJSHTMLElement(document.createElement('IMG'));\r\n btn['src'] := ICON_SEARCH;\r\n btn.style.setProperty('vertical-align','middle');\r\n btn.style.setProperty('margin-right','10px');\r\n FSearchElement.appendChild(FSearchInput);\r\n FSearchElement.appendChild(btn);\r\n FElement.appendChild(FSearchElement);\r\n btn.addEventListener('click',FSearchEventPtr);\r\n TJSHTMLInputElement(FSearchInput).value := FSearchValue;\r\n end;\r\n\r\n if Filter then\r\n begin\r\n FFilterElement := TJSHTMLElement(document.createElement('DIV'));\r\n FFilterElement.style.setProperty('float','left');\r\n FFilterInput := TJSHTMLElement(document.createElement('INPUT'));\r\n if InputElementClassName <> '' then\r\n FFilterInput['class'] := InputElementClassName;\r\n FFilterInput.style.setProperty('display','inline');\r\n FFilterInput.style.setProperty('width','auto');\r\n\r\n btn := TJSHTMLElement(document.createElement('IMG'));\r\n btn['src'] := ICON_FILTER;\r\n btn.style.setProperty('vertical-align','middle');\r\n btn.style.setProperty('margin-right','10px');\r\n FFilterElement.appendChild(FFilterInput);\r\n FFilterElement.appendChild(btn);\r\n FElement.appendChild(FFilterElement);\r\n btn.addEventListener('click',FFilterEventPtr);\r\n TJSHTMLInputElement(FFilterInput).value := FFilterValue;\r\n end;\r\n\r\n trc := 0;\r\n if FOwner.RowHeader then\r\n inc(trc);\r\n\r\n numpages := (RowCount - trc) div PageSize;\r\n\r\n if (RowCount - trc) mod PageSize > 0 then\r\n inc(numpages);\r\n\r\n FOwner.Paging.FPageCount := numpages;\r\n\r\n if Assigned(FPagerElement) then\r\n begin\r\n FPagerElement.parentElement.removeChild(FPagerElement);\r\n FPagerElement := nil;\r\n end;\r\n\r\n if not FOwner.Paging.Enabled then\r\n Exit;\r\n\r\n if FPager = tpDropDown then\r\n begin\r\n FPagerElement := TJSHTMLElement(document.createElement('SELECT'));\r\n\r\n if DropDownElementClassName <> '' then\r\n FPagerElement['class'] := DropDownElementClassName;\r\n\r\n FPagerElement.addEventListener('change',FPageEventPtr);\r\n\r\n for i := 0 to numpages - 1 do\r\n begin\r\n opt := TJSHTMLOptionElement(document.createElement('option'));\r\n opt.text := (i + 1).ToString;\r\n opt['data'] := i.ToString;\r\n if i = ActivePage then\r\n opt['selected'] := 'selected';\r\n\r\n TJSHTMLSelectElement(FPagerElement).add(opt);\r\n end;\r\n\r\n case FPagerAlign of\r\n paRight: FPagerElement.style.setProperty('float','right');\r\n paLeft: FPagerElement.style.setProperty('float','left');\r\n paCenter:\r\n begin\r\n FPagerElement.style.removeProperty('float');\r\n FPagerElement.style.setProperty('max-width','content');\r\n FPagerElement.style.setProperty('margin-left','auto');\r\n FPagerElement.style.setProperty('margin-right','auto');\r\n end;\r\n end;\r\n\r\n FPagerElement.style.setProperty('display','inline');\r\n FPagerElement.style.setProperty('width','auto');\r\n FElement.appendChild(FPagerElement);\r\n end;\r\n\r\n if FPager = tpLink then\r\n begin\r\n FPagerElement := TJSHTMLElement(document.createElement('DIV'));\r\n\r\n for i := 0 to numpages - 1 do\r\n begin\r\n lnk := TJSHTMLOptionElement(document.createElement('A'));\r\n lnk.innerHTML := (i + 1).ToString;\r\n lnk['href'] := '#';\r\n if LinkElementClassName <> '' then\r\n begin\r\n\r\n if (i = ActivePage) and (LinkActiveElementClassName <> '') then\r\n lnk['class'] := LinkActiveElementClassName\r\n else\r\n lnk['class'] := LinkElementClassName;\r\n end;\r\n lnk.style.setProperty('margin-right','4px');\r\n lnk.style.setProperty('display','inline');\r\n lnk['data'] := i.ToString;\r\n\r\n lnk.addEventListener('click',FPageEventPtr);\r\n FPagerElement.appendChild(lnk);\r\n end;\r\n\r\n case FPagerAlign of\r\n paRight: FPagerElement.style.setProperty('float','right');\r\n paLeft: FPagerElement.style.setProperty('float','left');\r\n paCenter:\r\n begin\r\n FPagerElement.style.removeProperty('float');\r\n FPagerElement.style.setProperty('max-width','content');\r\n FPagerElement.style.setProperty('margin-left','auto');\r\n FPagerElement.style.setProperty('margin-right','auto');\r\n end;\r\n end;\r\n FElement.appendChild(FPagerElement);\r\n end;\r\n\r\n if FPager = tpButton then\r\n begin\r\n FPagerElement := TJSHTMLElement(document.createElement('DIV'));\r\n\r\n for i := 0 to numpages - 1 do\r\n begin\r\n lnk := TJSHTMLOptionElement(document.createElement('BUTTON'));\r\n lnk.innerHTML := (i + 1).ToString;\r\n if ButtonElementClassName <> '' then\r\n begin\r\n if (i = ActivePage) and (ButtonActiveElementClassName <> '') then\r\n lnk['class'] := ButtonActiveElementClassName\r\n else\r\n lnk['class'] := ButtonElementClassName;\r\n end;\r\n lnk['data'] := i.ToString;\r\n lnk.addEventListener('click',FPageEventPtr);\r\n lnk.style.setProperty('margin-right','4px');\r\n FPagerElement.appendChild(lnk);\r\n end;\r\n\r\n case FPagerAlign of\r\n paRight: FPagerElement.style.setProperty('float','right');\r\n paLeft: FPagerElement.style.setProperty('float','left');\r\n paCenter:\r\n begin\r\n FPagerElement.style.removeProperty('float');\r\n FPagerElement.style.setProperty('max-width','content');\r\n FPagerElement.style.setProperty('margin-left','auto');\r\n FPagerElement.style.setProperty('margin-right','auto');\r\n end;\r\n end;\r\n\r\n FElement.appendChild(FPagerElement);\r\n end;\r\n\r\n if FPager = tpPrevNext then\r\n begin\r\n FPagerElement := TJSHTMLElement(document.createElement('DIV'));\r\n\r\n lnk := TJSHTMLOptionElement(document.createElement('BUTTON'));\r\n lnk.innerHTML := '«';\r\n lnk['data'] := '0';\r\n if ButtonElementClassName <> '' then\r\n lnk['class'] := ButtonElementClassName;\r\n lnk.addEventListener('click',FPageEventPtr);\r\n lnk.style.setProperty('margin-right','4px');\r\n\r\n if FOwner.Paging.ActivePage = 0 then\r\n lnk.setAttribute('disabled','');\r\n\r\n FPagerElement.appendChild(lnk);\r\n\r\n lnk := TJSHTMLOptionElement(document.createElement('BUTTON'));\r\n lnk.innerHTML := '‹';\r\n lnk['data'] := '1';\r\n if ButtonElementClassName <> '' then\r\n lnk['class'] := ButtonElementClassName;\r\n lnk.addEventListener('click',FPageEventPtr);\r\n lnk.style.setProperty('margin-right','4px');\r\n\r\n if FOwner.Paging.ActivePage = 0 then\r\n lnk.setAttribute('disabled','');\r\n\r\n FPagerElement.appendChild(lnk);\r\n\r\n lnk := TJSHTMLOptionElement(document.createElement('BUTTON'));\r\n lnk.innerHTML := '›';\r\n lnk['data'] := '2';\r\n if ButtonElementClassName <> '' then\r\n lnk['class'] := ButtonElementClassName;\r\n lnk.addEventListener('click',FPageEventPtr);\r\n lnk.style.setProperty('margin-right','4px');\r\n\r\n if FOwner.Paging.ActivePage = FOwner.Paging.PageCount then\r\n lnk.setAttribute('disabled','');\r\n\r\n FPagerElement.appendChild(lnk);\r\n\r\n lnk := TJSHTMLOptionElement(document.createElement('BUTTON'));\r\n lnk.innerHTML := '»';\r\n lnk['data'] := '3';\r\n lnk.addEventListener('click',FPageEventPtr);\r\n if ButtonElementClassName <> '' then\r\n lnk['class'] := ButtonElementClassName;\r\n lnk.style.setProperty('margin-right','4px');\r\n FPagerElement.appendChild(lnk);\r\n case FPagerAlign of\r\n paRight: FPagerElement.style.setProperty('float','right');\r\n paLeft: FPagerElement.style.setProperty('float','left');\r\n paCenter:\r\n begin\r\n FPagerElement.style.removeProperty('float');\r\n FPagerElement.style.setProperty('max-width','content');\r\n FPagerElement.style.setProperty('margin-left','auto');\r\n FPagerElement.style.setProperty('margin-right','auto');\r\n end;\r\n end;\r\n\r\n\r\n if FOwner.Paging.ActivePage = FOwner.Paging.PageCount then\r\n lnk.setAttribute('disabled','');\r\n\r\n FElement.appendChild(FPagerElement);\r\n end;\r\n\r\n\r\n if FPager = tpList then\r\n begin\r\n FPagerElement := TJSHTMLElement(document.createElement('UL'));\r\n\r\n if ListElementClassName <> '' then\r\n FPagerElement['class'] := ListElementClassName;\r\n\r\n FPagerElement.style.setProperty('margin','0px');\r\n\r\n for i := 0 to numpages - 1 do\r\n begin\r\n itm := TJSHTMLOptionElement(document.createElement('LI'));\r\n if ListItemElementClassName <> '' then\r\n begin\r\n if i = ActivePage then\r\n itm['class'] := ListItemElementClassName + ' active'\r\n else\r\n itm['class'] := ListItemElementClassName;\r\n end;\r\n\r\n lnk := TJSHTMLOptionElement(document.createElement('A'));\r\n lnk.innerHTML := (i + 1).ToString;\r\n lnk['href'] := '#';\r\n lnk['data'] := i.ToString;\r\n lnk.addEventListener('click',FPageEventPtr);\r\n\r\n if ListLinkElementClassName <> '' then\r\n lnk['class'] := ListLinkElementClassName;\r\n\r\n itm.appendChild(lnk);\r\n\r\n FPagerElement.appendChild(itm);\r\n end;\r\n\r\n case FPagerAlign of\r\n paRight: FPagerElement.style.setProperty('float','right');\r\n paLeft: FPagerElement.style.setProperty('float','left');\r\n paCenter:\r\n begin\r\n FPagerElement.style.removeProperty('float');\r\n FPagerElement.style.setProperty('max-width','content');\r\n FPagerElement.style.setProperty('margin-left','auto');\r\n FPagerElement.style.setProperty('margin-right','auto');\r\n end;\r\n end;\r\n\r\n FElement.appendChild(FPagerElement);\r\n end;\r\nend;\r\n\r\n{ TTableControlPaging }\r\n\r\nprocedure TTableControlPaging.Assign(Source: TPersistent);\r\nbegin\r\n if (Source is TTableControlPaging) then\r\n begin\r\n FEnabled := (Source as TTableControlPaging).Enabled;\r\n FSize := (Source as TTableControlPaging).Size;\r\n FIndex := (Source as TTableControlPaging).Index;\r\n end;\r\nend;\r\n\r\nconstructor TTableControlPaging.Create(AOwner: TCustomTableControl);\r\nbegin\r\n inherited Create;\r\n FOwner := AOwner;\r\n FSize := 10;\r\n FIndex := 0;\r\nend;\r\n\r\nprocedure TTableControlPaging.SetEnabled(const Value: boolean);\r\nvar\r\n rh: integer;\r\nbegin\r\n if FEnabled <> Value then\r\n begin\r\n FEnabled := Value;\r\n\r\n rh := 0;\r\n\r\n if FOwner.RowHeader then\r\n rh := 1;\r\n\r\n if FEnabled then\r\n FOwner.RowCountChanged(FSize + rh - FOwner.RowCount)\r\n else\r\n FOwner.RowCountChanged(FOwner.RowCount - FSize - rh);\r\n\r\n FOwner.ReRenderGrid;\r\n// FOwner.GridChanged;\r\n end;\r\nend;\r\n\r\nprocedure TTableControlPaging.SetIndex(const Value: integer);\r\nbegin\r\n if (FIndex <> Value) and (Value >= 0) then\r\n begin\r\n if FOwner.Paging.Size <> 0 then\r\n if not (Value < FOwner.RowCount div FOwner.Paging.Size) then\r\n Exit;\r\n\r\n FActivePage := Value;\r\n FIndex := Value;\r\n FOwner.DoSelectPage(FIndex);\r\n end;\r\nend;\r\n\r\nprocedure TTableControlPaging.SetSize(const Value: integer);\r\nvar\r\n FOldSize: integer;\r\nbegin\r\n if (FSize <> Value) then\r\n begin\r\n FOldSize := FSize;\r\n FSize := Value;\r\n FOwner.RowCountChanged(FSize - FOldSize);\r\n FOwner.GridChanged;\r\n end;\r\nend;\r\n\r\nend.\r\n","{********************************************************************}\r\n{ }\r\n{ written by TMS Software }\r\n{ copyright (c) 2018 - 2024 }\r\n{ Email : info@tmssoftware.com }\r\n{ Web : http://www.tmssoftware.com }\r\n{ }\r\n{ The source code is given as is. The author is not responsible }\r\n{ for any possible damage done due to the use of this code. }\r\n{ The complete source code remains property of the author and may }\r\n{ not be distributed, published, given or sold in any form as such. }\r\n{ No parts of the source code can be included in any other component }\r\n{ or application without written authorization of the author. }\r\n{********************************************************************}\r\n\r\nunit WEBLib.EditAutocomplete;\r\n\r\n{$modeswitch externalclass}\r\n\r\n{$DEFINE NOPP}\r\n\r\ninterface\r\n\r\nuses\r\n Classes, SysUtils, Types, WEBLib.Controls, WEBLib.StdCtrls, WEBLib.Graphics,\r\n Web, JS;\r\n\r\ntype\r\n TEditAutoCompleteLookupType = (ltFirstCharacter, ltAnywhere);\r\n\r\n TEditAutoCompleteRenderItemEventArgs = class(TPersistent)\r\n private\r\n FItemElement: TJSHTMLElement;\r\n FItemIndex: Integer;\r\n public\r\n property ItemIndex: Integer read FItemIndex write FItemIndex;\r\n property ItemElement: TJSHTMLElement read FItemElement write FItemElement;\r\n end;\r\n\r\n TEditAutoCompleteRenderItemEvent = procedure(Sender: TObject; Args: TEditAutoCompleteRenderItemEventArgs) of object;\r\n TEditAutoCompleteLookupUpdateEvent = procedure(Sender: TObject; Items: TJSArray; Lookup: string) of object;\r\n\r\n\r\n TEditAutoCompleteSelectEventArgs = class(TPersistent)\r\n private\r\n FItemIndex: Integer;\r\n public\r\n property ItemIndex: Integer read FItemIndex write FItemIndex;\r\n end;\r\n\r\n TEditAutoCompleteSelectEvent = procedure(Sender: TObject; Args: TEditAutoCompleteSelectEventArgs) of object;\r\n\r\n TEditAutoComplete = class(TCustomInput)\r\n private\r\n FText: string;\r\n FItemIndex: Integer;\r\n FItems: TStringList;\r\n FPopupHeight: Integer;\r\n FActiveItemClassName: string;\r\n FPopupClassName: string;\r\n FItemClassName: string;\r\n FOnRenderItem: TEditAutoCompleteRenderItemEvent;\r\n FOnSelect: TEditAutoCompleteSelectEvent;\r\n FTextHint: string;\r\n FReadOnly: boolean;\r\n FCharCase: TEditCharCase;\r\n FOnChange: TNotifyEvent;\r\n FLookupCaseSensitive: Boolean;\r\n FlookupMinLength: Integer;\r\n FLookupType: TEditAutoCompleteLookupType;\r\n FInputElement: TJSHTMLInputElement;\r\n FAutoSelect: boolean;\r\n FOnLookupUpdate: TEditAutoCompleteLookupUpdateEvent;\r\n procedure AddScript(Script: string);\r\n function GetText: string;\r\n procedure SetText(const Value: string);\r\n procedure SetItems(const Value: TStringList);\r\n function GetItemIndex: Integer;\r\n procedure SetItemIndex(const Value: Integer);\r\n procedure SetPopupHeight(const Value: Integer);\r\n procedure SetActiveItemClassName(const Value: string);\r\n procedure SetItemClassName(const Value: string);\r\n procedure SetPopupClassName(const Value: string);\r\n procedure SetTextHint(const Value: string);\r\n procedure SetReadOnly(const Value: boolean);\r\n procedure SetCharcase(const Value: TEditCharCase);\r\n function GetElementInputHandle: TJSHTMLInputElement;\r\n procedure SetLookupCaseSensitive(const Value: Boolean);\r\n procedure SetLookupMinLength(const Value: Integer);\r\n procedure SetLookupType(const Value: TEditAutoCompleteLookupType);\r\n protected\r\n function CreateElement: TJSElement; override;\r\n procedure UpdateElement; override;\r\n procedure GetValuesUpdate(Items: TJSArray; Lookup: string);\r\n procedure BindEvents; override;\r\n function HandleRenderItem(Item: TJSHTMLElement; Index: Integer): TJSHTMLElement;\r\n function HandleSelect(Index: Integer): Boolean;\r\n function HandleDoChange(Event: TJSMouseEvent): Boolean; virtual;\r\n procedure InitCSSLibrary(ALibrary: TCSSLibrary); override;\r\n public\r\n procedure CreateInitialize; override;\r\n destructor Destroy; override;\r\n procedure SetFocus; override;\r\n property ElementInputHandle: TJSHTMLInputElement read GetElementInputHandle;\r\n procedure Change; virtual;\r\n procedure Refresh; virtual;\r\n published\r\n property Align;\r\n property AlignWithMargins;\r\n property Anchors;\r\n property AutoSelect: boolean read FAutoSelect write FAutoSelect default false;\r\n property BorderStyle;\r\n property Color;\r\n property CharCase: TEditCharCase read FCharCase write SetCharcase default wecNormal;\r\n property ElementClassName;\r\n property ElementID;\r\n property ElementFont;\r\n property ElementPosition;\r\n property Enabled;\r\n property Font;\r\n property Height;\r\n property HeightPercent;\r\n property HeightStyle;\r\n property Hint;\r\n property Left;\r\n property Margins;\r\n property ReadOnly: boolean read FReadOnly write SetReadOnly default False;\r\n property ShowFocus;\r\n property ShowHint;\r\n property TextHint: string read FTextHint write SetTextHint;\r\n property TabStop;\r\n property TabOrder;\r\n property Visible;\r\n property Width;\r\n property WidthPercent;\r\n property WidthStyle;\r\n property OnChange: TNotifyEvent read FOnChange write FOnChange;\r\n property OnClick;\r\n property OnDblClick;\r\n property OnKeyDown;\r\n property OnKeyPress;\r\n property OnKeyUp;\r\n property OnMouseDown;\r\n property OnMouseUp;\r\n property OnMouseMove;\r\n property OnMouseLeave;\r\n property OnMouseEnter;\r\n property OnEnter;\r\n property OnExit;\r\n\r\n property Items: TStringList read FItems write SetItems;\r\n property ItemIndex: Integer read GetItemIndex write SetItemIndex default -1;\r\n property Text: string read GetText write SetText;\r\n property PopupHeight: Integer read FPopupHeight write SetPopupHeight default 0;\r\n property PopupClassName: string read FPopupClassName write SetPopupClassName;\r\n property ItemClassName: string read FItemClassName write SetItemClassName;\r\n property ActiveItemClassName: string read FActiveItemClassName write SetActiveItemClassName;\r\n property LookupType: TEditAutoCompleteLookupType read FLookupType write SetLookupType default ltFirstCharacter;\r\n property LookupCaseSensitive: Boolean read FLookupCaseSensitive write SetLookupCaseSensitive default False;\r\n property LookupMinLength: Integer read FlookupMinLength write SetLookupMinLength default 1;\r\n\r\n\r\n property OnRenderItem: TEditAutoCompleteRenderItemEvent read FOnRenderItem write FOnRenderItem;\r\n property OnSelect: TEditAutoCompleteSelectEvent read FOnSelect write FOnSelect;\r\n property OnLookupUpdate: TEditAutoCompleteLookupUpdateEvent read FOnLookupUpdate write FOnLookupUpdate;\r\n end;\r\n\r\n TWebEditAutoComplete = class(TEditAutoComplete);\r\n\r\nimplementation\r\n\r\n\r\n{ TEditAutoComplete }\r\n\r\nprocedure TEditAutoComplete.BindEvents;\r\nvar\r\n eh: TJSEventTarget;\r\nbegin\r\n if Assigned(ElementInputHandle) then\r\n begin\r\n eh := ElementInputHandle;\r\n\r\n eh.addEventListener('input',@HandleDoChange);\r\n eh.addEventListener('click',@HandleDoClick);\r\n eh.addEventListener('dblclick',@HandleDoDblClick);\r\n eh.addEventListener('mousedown',@HandleDoMouseDown);\r\n eh.addEventListener('mouseup',@HandleDoMouseUp);\r\n eh.addEventListener('mousemove',@HandleDoMouseMove);\r\n eh.addEventListener('mouseleave',@HandleDoMouseLeave);\r\n eh.addEventListener('mouseenter',@HandleDoMouseEnter);\r\n eh.addEventListener('keydown',@HandleDoKeyDown);\r\n eh.addEventListener('keyup',@HandleDoKeyUp);\r\n eh.addEventListener('keypress',@HandleDoKeyPress);\r\n eh.addEventListener('focus',@HandleDoEnter);\r\n eh.addEventListener('blur',@HandleDoExit);\r\n end;\r\nend;\r\n\r\nprocedure TEditAutoComplete.Change;\r\nbegin\r\n if Assigned(ElementHandle) then\r\n FText := ElementInputHandle.value;\r\n\r\n if Assigned(OnChange) then\r\n OnChange(Self);\r\nend;\r\n\r\nfunction TEditAutoComplete.CreateElement: TJSElement;\r\nbegin\r\n Result := document.createElement('DIV');\r\nend;\r\n\r\nprocedure TEditAutoComplete.CreateInitialize;\r\nbegin\r\n FItems := TStringList.Create;\r\n FText := '';\r\n FItemIndex := -1;\r\n FPopupHeight := 0;\r\n FPopupClassName := '';\r\n FItemClassName := '';\r\n FActiveItemClassName := '';\r\n FLookupType := ltFirstCharacter;\r\n FLookupMinLength := 1;\r\n FLookupCaseSensitive := False;\r\n FAutoSelect := false;\r\n\r\n inherited;\r\n\r\n TabStop := True;\r\n ReadOnly := False;\r\n ElementFont := efProperty;\r\n CharCase := wecNormal;\r\n Width := 121;\r\n Height := 25;\r\n\r\n if (1 < 0) then\r\n GetValuesUpdate(nil,''); // enure this method does not get optimized away\r\nend;\r\n\r\ndestructor TEditAutoComplete.Destroy;\r\nbegin\r\n FItems.Free;\r\n inherited;\r\nend;\r\n\r\nfunction TEditAutoComplete.GetElementInputHandle: TJSHTMLInputElement;\r\nbegin\r\n Result := TJSHTMLInputElement(ElementHandle.childNodes[0]);\r\nend;\r\n\r\nfunction TEditAutoComplete.GetItemIndex: Integer;\r\nbegin\r\n Result := FItemIndex;\r\n\r\n if not Assigned(ElementHandle) then\r\n Exit;\r\n\r\n Result := Items.IndexOf(Text);\r\nend;\r\n\r\nfunction TEditAutoComplete.GetText: string;\r\nvar\r\n input: TJSHTMLInputElement;\r\nbegin\r\n Result := FText;\r\n\r\n if not Assigned(ElementHandle) then\r\n Exit;\r\n\r\n input := TJSHTMLInputElement(ElementHandle.childNodes[0]);\r\n if Assigned(input) then\r\n Result := input.value;\r\nend;\r\n\r\nprocedure TEditAutoComplete.GetValuesUpdate(Items: TJSArray; Lookup: string);\r\nbegin\r\n if Assigned(OnLookupUpdate) then\r\n OnLookupUpdate(Self, Items, Lookup);\r\nend;\r\n\r\nfunction TEditAutoComplete.HandleDoChange(Event: TJSMouseEvent): Boolean;\r\nbegin\r\n Change;\r\n Result := True;\r\nend;\r\n\r\nfunction TEditAutoComplete.HandleRenderItem(Item: TJSHTMLElement; Index: Integer): TJSHTMLElement;\r\nvar\r\n Args: TEditAutoCompleteRenderItemEventArgs;\r\nbegin\r\n if Assigned(OnRenderItem) then\r\n begin\r\n Args := TEditAutoCompleteRenderItemEventArgs.Create;\r\n Args.ItemElement := Item;\r\n Args.ItemIndex := Index;\r\n OnRenderItem(Self, Args);\r\n Args.Free;\r\n end;\r\n Result := Item;\r\nend;\r\n\r\nfunction TEditAutoComplete.HandleSelect(Index: Integer): Boolean;\r\nvar\r\n Args: TEditAutoCompleteSelectEventArgs;\r\nbegin\r\n if Assigned(OnSelect) then\r\n begin\r\n Args := TEditAutoCompleteSelectEventArgs.Create;\r\n Args.ItemIndex := Index;\r\n OnSelect(Self, Args);\r\n Args.Free;\r\n end;\r\n if AutoSelect then\r\n FInputElement.select;\r\n\r\n Result := True;\r\nend;\r\n\r\nprocedure TEditAutoComplete.InitCSSLibrary(ALibrary: TCSSLibrary);\r\nbegin\r\n if (ALibrary = cssBootstrap) then\r\n begin\r\n ElementClassName := 'form-control';\r\n ElementFont := efCSS;\r\n HeightStyle := ssAuto;\r\n end;\r\nend;\r\n\r\nprocedure TEditAutoComplete.Refresh;\r\nbegin\r\n //\r\nend;\r\n\r\nprocedure TEditAutoComplete.SetActiveItemClassName(const Value: string);\r\nbegin\r\n if FActiveItemClassName <> Value then\r\n begin\r\n FActiveItemClassName := Value;\r\n UpdateElement;\r\n end;\r\nend;\r\n\r\nprocedure TEditAutoComplete.SetCharcase(const Value: TEditCharCase);\r\nbegin\r\n if FCharCase <> Value then\r\n begin\r\n FCharCase := Value;\r\n UpdateElement;\r\n end;\r\nend;\r\n\r\nprocedure TEditAutoComplete.SetFocus;\r\nvar\r\n input: TJSHTMLInputElement;\r\nbegin\r\n input := TJSHTMLInputElement(ElementHandle.childNodes[0]);\r\n if Assigned(input) then\r\n begin\r\n input.focus();\r\n end\r\n else\r\n inherited;\r\nend;\r\n\r\nprocedure TEditAutoComplete.SetItemClassName(const Value: string);\r\nbegin\r\n if FItemClassName <> Value then\r\n begin\r\n FItemClassName := Value;\r\n UpdateElement;\r\n end;\r\nend;\r\n\r\nprocedure TEditAutoComplete.SetItemIndex(const Value: Integer);\r\nbegin\r\n if (FItemIndex <> Value) and (Value < Items.Count) then\r\n begin\r\n FItemIndex := Value;\r\n if FItemIndex >= 0 then\r\n Text := Items[FItemIndex]\r\n else\r\n Text := '';\r\n UpdateElement;\r\n end;\r\n\r\n if Value = -100 then\r\n begin\r\n HandleRenderItem(nil,-100);\r\n HandleSelect(-100);\r\n end;\r\n\r\nend;\r\n\r\nprocedure TEditAutoComplete.SetItems(const Value: TStringList);\r\nbegin\r\n FItems.Assign(Value);\r\nend;\r\n\r\nprocedure TEditAutoComplete.SetLookupCaseSensitive(const Value: Boolean);\r\nbegin\r\n if FlookupCaseSensitive <> Value then\r\n begin\r\n FLookupCaseSensitive := Value;\r\n UpdateElement;\r\n end;\r\nend;\r\n\r\nprocedure TEditAutoComplete.SetLookupMinLength(const Value: Integer);\r\nbegin\r\n if (FLookupMinLength <> Value) and (Value > 0) then\r\n begin\r\n FlookupMinLength := Value;\r\n UpdateElement;\r\n end;\r\nend;\r\n\r\nprocedure TEditAutoComplete.SetLookupType(\r\n const Value: TEditAutoCompleteLookupType);\r\nbegin\r\n if FLookupType <> Value then\r\n begin\r\n FLookupType := Value;\r\n UpdateElement;\r\n end;\r\nend;\r\n\r\nprocedure TEditAutoComplete.SetPopupClassName(const Value: string);\r\nbegin\r\n if FPopupClassName <> Value then\r\n begin\r\n FPopupClassName := Value;\r\n UpdateElement;\r\n end;\r\nend;\r\n\r\nprocedure TEditAutoComplete.SetPopupHeight(const Value: Integer);\r\nbegin\r\n if FPopupHeight <> Value then\r\n begin\r\n FPopupHeight := Value;\r\n UpdateElement;\r\n end;\r\nend;\r\n\r\nprocedure TEditAutoComplete.SetReadOnly(const Value: boolean);\r\nbegin\r\n if FReadOnly <> Value then\r\n begin\r\n FReadOnly := Value;\r\n UpdateElement;\r\n end;\r\nend;\r\n\r\nprocedure TEditAutoComplete.SetText(const Value: string);\r\nbegin\r\n if FText <> Value then\r\n begin\r\n FText := Value;\r\n UpdateElement;\r\n end;\r\nend;\r\n\r\nprocedure TEditAutoComplete.SetTextHint(const Value: string);\r\nbegin\r\n if FTextHint <> Value then\r\n begin\r\n FTextHint := Value;\r\n UpdateElement;\r\n end;\r\nend;\r\n\r\nprocedure TEditAutoComplete.AddScript(Script: string);\r\nbegin\r\n asm\r\n var scrObj = document.createElement('script');\r\n scrObj.innerHTML = Script;\r\n document.head.appendChild(scrObj);\r\n end;\r\nend;\r\n\r\n{$HINTS OFF}\r\nprocedure TEditAutoComplete.UpdateElement;\r\nvar\r\n elid, sstyle: string;\r\n classpopup, classitem, classactive: string;\r\n newel: TJSHTMLElement;\r\n itemdata: TJSArray;\r\n I: Integer;\r\n spopup, tabindex: string;\r\n cl: TObject;\r\n\r\nbegin\r\n inherited;\r\n\r\n if IsUpdating then\r\n Exit;\r\n\r\n if not Assigned(ElementHandle) then\r\n Exit;\r\n\r\n elid := ElementID + '_input';\r\n\r\n if PopupClassName = '' then\r\n classpopup := ElementID + '_autocomplete-items'\r\n else\r\n classpopup := PopupClassName;\r\n\r\n if ItemClassName = '' then\r\n classitem := ElementID + '_autocomplete-item'\r\n else\r\n classitem := ItemClassName;\r\n\r\n if ActiveItemClassName = '' then\r\n classactive := ElementID + '_active-item'\r\n else\r\n classactive := ActiveItemClassName;\r\n\r\n ElementHandle.style.setProperty('overflow', 'visible');\r\n ElementHandle.setAttribute('tabindex', '-1');\r\n ElementHandle.removeAttribute('class');\r\n while ElementHandle.hasChildNodes do\r\n ElementHandle.removeChild(ElementHandle.firstChild);\r\n\r\n newel := TJSHTMLElement(document.createElement('input'));\r\n\r\n FInputElement := TJSHTMLInputElement(newel);\r\n\r\n if ElementClassName <> '' then\r\n newel.setAttribute('class', ElementClassName);\r\n newel.setAttribute('type', 'text');\r\n newel.setAttribute('id', elid);\r\n newel.setAttribute('autocomplete','off');\r\n newel.style.setProperty('width', '100%');\r\n newel.style.setProperty('height', '100%');\r\n\r\n if Enabled then\r\n newel.removeAttribute('disabled')\r\n else\r\n newel.setAttribute('disabled', 'true');\r\n\r\n if ReadOnly then\r\n newel.setAttribute('readonly', 'true')\r\n else\r\n newel.removeAttribute('readonly');\r\n\r\n if TabStop then\r\n tabindex := IntToStr(TabOrder)\r\n else\r\n tabindex := '-1';\r\n newel.setAttribute('tabindex', tabindex);\r\n\r\n newel.setAttribute('placeholder', TextHint);\r\n\r\n newel.style.setProperty('background-color', ColorToHtml(color));\r\n\r\n if ElementClassName = '' then\r\n begin\r\n if Enabled and (ElementFont = efProperty) then\r\n newel.style.setProperty('color', ColorToHtml(Font.Color));\r\n end;\r\n\r\n SetHTMLElementFont(newel, Font, not ((ElementClassName = '') and (ElementFont = efProperty)));\r\n\r\n case CharCase of\r\n wecUpperCase: newel.style.setProperty('text-transform', 'uppercase');\r\n wecLowerCase: newel.style.setProperty('text-transform', 'lowercase');\r\n wecMixedCase: newel.style.setProperty('text-transform', 'capitalize');\r\n wecNormal: newel.style.setProperty('text-transform', 'initial');\r\n end;\r\n\r\n// newel.style.setProperty('width', IntToStr(Width) + 'px');\r\n// newel.style.setProperty('height', IntToStr(Height) + 'px');\r\n newel.style.setProperty('box-sizing', 'border-box');\r\n newel.setAttribute('value', Text);\r\n ElementHandle.appendChild(newel);\r\n\r\n newel := TJSHTMLElement(document.createElement('input'));\r\n newel.setAttribute('type', 'hidden');\r\n newel.setAttribute('id', elid + 'index');\r\n ElementHandle.appendChild(newel);\r\n\r\n BindEvents;\r\n\r\n if PopupHeight > 0 then\r\n begin\r\n spopup :=\r\n ' max-height: ' + IntToStr(PopupHeight) + 'px;' + #13 +\r\n ' overflow: auto;' + #13;\r\n end;\r\n\r\n sstyle :=\r\n '#' + ElementID + ' input[type=text] {' + #13 +\r\n ' width: 100%;' + #13 +\r\n '}' + #13 +\r\n\r\n '.' + classpopup + ' {' + #13 +\r\n ' position: absolute;' + #13 +\r\n ' z-index: 99;' + #13 +\r\n ' top: 100%;' + #13 +\r\n ' min-width: 100%;' + #13 +\r\n// ' width: 100%;' + #13 +\r\n ' left: 0;' + #13 +\r\n// ' right: 0;' + #13 +\r\n spopup;\r\n\r\n if PopupClassName = '' then\r\n begin\r\n sstyle := sstyle +\r\n ' background-color: #fff;' + #13 +\r\n ' border: 1px solid #d4d4d4;'\r\n end;\r\n\r\n sstyle := sstyle +\r\n '}' + #13;\r\n\r\n if ItemClassName = '' then\r\n begin\r\n sstyle := sstyle +\r\n '.' + classitem + ' {' + #13 +\r\n ' padding: 10px;' + #13 +\r\n ' cursor: pointer;' + #13 +\r\n ' border-bottom: 1px solid #d4d4d4;' + #13 +\r\n '}' + #13 +\r\n\r\n '.' + classitem + ':hover {' + #13 +\r\n ' background-color: #e9e9e9 !important;' + #13 +\r\n '}' + #13;\r\n end;\r\n\r\n if ActiveItemClassName = '' then\r\n begin\r\n sstyle := sstyle +\r\n '.' + classactive + ' {' + #13 +\r\n ' background-color: #e9e9e9 !important;' + #13 +\r\n ' color: #000;' + #13 +\r\n '}';\r\n end;\r\n\r\n AddInstanceStyle(sstyle);\r\n\r\n AddScript(\r\n 'function doautocomplete(obj, inp, hinp, arr, myclass) {' + #13 +\r\n ' var currentFocus;' + #13 +\r\n ' inp.addEventListener(\"input\", function(e) {' + #13 +\r\n ' var a, b, i, h, lookup, minlength, cs, found, val = this.value;' + #13 +\r\n ' lookup = ' + IntToStr(Ord(LookupType)) + ';' + #13 +\r\n ' minlength = ' + IntToStr(LookupMinLength) + ';' + #13 +\r\n ' cs = ' + BoolToStr(LookupCaseSensitive) + ';' + #13 +\r\n\r\n ' ' + elid + 'closeAllLists();' + #13 +\r\n\r\n ' if (!val) { return false;}' + #13 +\r\n ' if (val.length < minlength) { return false;}' + #13 +\r\n\r\n ' currentFocus = -1;' + #13 +\r\n ' a = document.createElement(\"DIV\");' + #13 +\r\n ' a.setAttribute(\"id\", this.id + \"autocomplete-list\");' + #13 +\r\n ' a.setAttribute(\"class\", \"' + classpopup + '\");' + #13 +\r\n ' a.addEventListener(\"mousedown\", function (e) {' + #13 +\r\n ' e.preventDefault();' + #13 +\r\n ' });' + #13 +\r\n ' this.parentNode.appendChild(a);' + #13 +\r\n ' obj.GetValuesUpdate(arr, val);'+#13+\r\n ' for (i = 0; i < arr.length; i++) {' + #13 +\r\n ' var q = val;' + #13 +\r\n ' var l = arr[i];' + #13 +\r\n ' var s = l;' + #13 +\r\n ' if (!cs) {' + #13 +\r\n ' q = q.toUpperCase();' + #13 +\r\n ' l = l.toUpperCase();' + #13 +\r\n ' }' + #13 +\r\n\r\n ' found = false;' + #13 +\r\n ' if ((lookup == 0) && (l.substr(0, q.length) == q)) {' + #13 +\r\n ' found = true;' + #13 +\r\n ' s = \"\" + arr[i].substr(0, val.length) + \"\";' + #13 +\r\n ' s += arr[i].substr(val.length);' + #13 +\r\n ' }' + #13 +\r\n ' else if ((lookup == 1) && (l.indexOf(q) >= 0)) {' + #13 +\r\n ' found = true;' + #13 +\r\n ' s = arr[i].substr(0, l.indexOf(q));' + #13 +\r\n ' s += \"\" + arr[i].substr(l.indexOf(q), val.length) + \"\";' + #13 +\r\n ' s += arr[i].substr(l.indexOf(q) + val.length);' + #13 +\r\n ' }' + #13 +\r\n\r\n ' if (found) {' + #13 +\r\n ' b = document.createElement(\"DIV\");' + #13 +\r\n ' b.setAttribute(\"id\", this.id + \"|\" + i);' + #13 +\r\n ' b.setAttribute(\"class\", \"' + classitem + '\");' + #13 +\r\n ' b.innerHTML = s;' + #13 +\r\n ' b = myclass.HandleRenderItem(b, i);'+\r\n ' b.addEventListener(\"click\", function(e) {' + #13 +\r\n ' var selindex = this.id.substring(this.id.indexOf(\"|\") + 1, this.id.length);' + #13 +\r\n ' inp.value = arr[selindex]' + #13 +\r\n ' inp.focus();' + #13 +\r\n ' hinp.value = selindex;' + #13 +\r\n ' myclass.HandleSelect(selindex);'+\r\n ' ' + elid + 'closeAllLists();' + #13 +\r\n ' });' + #13 +\r\n ' a.appendChild(b);' + #13 +\r\n ' }' + #13 +\r\n ' }' + #13 +\r\n ' if (a.childNodes.length <= 0) ' + elid + 'closeAllLists();'+\r\n ' });' + #13 +\r\n\r\n ' inp.addEventListener(\"blur\", function(e) {' + #13 +\r\n ' ' + elid + 'closeAllLists(e.target, true);' + #13 +\r\n ' });' + #13 +\r\n\r\n ' inp.addEventListener(\"keydown\", function(e) {' + #13 +\r\n ' var popup = document.getElementById(this.id + \"autocomplete-list\");' + #13 +\r\n ' var x;' + #13 +\r\n ' if (popup) x = popup.getElementsByTagName(\"div\");' + #13 +\r\n ' if (x) {' + #13 +\r\n ' if (e.keyCode == 27) {' + #13 +\r\n ' ' + elid + 'closeAllLists(e.target, true);' + #13 +\r\n ' } else if (e.keyCode == 40) {' + #13 +\r\n ' currentFocus++;' + #13 +\r\n ' ' + elid + 'addActive(x);' + #13 +\r\n ' if ((x[currentFocus].offsetTop + x[currentFocus].offsetHeight) > (popup.offsetHeight + popup.scrollTop))' +\r\n ' popup.scrollTop = ((x[currentFocus].offsetTop + x[currentFocus].offsetHeight) - popup.offsetHeight);' + #13 +\r\n ' } else if (e.keyCode == 38) { ' + #13 +\r\n ' currentFocus--;' + #13 +\r\n ' ' + elid + 'addActive(x);' + #13 +\r\n ' if ((x[currentFocus].offsetTop) < (popup.scrollTop))' +\r\n ' popup.scrollTop = (x[currentFocus].offsetTop);' + #13 +\r\n ' } else if (e.keyCode == 13) {' + #13 +\r\n ' e.preventDefault();' + #13 +\r\n ' if (currentFocus > -1) {' + #13 +\r\n ' if (x) x[currentFocus].click();' + #13 +\r\n ' } else { '+elid +'closeAllLists(e.target,true);}' + #13 +\r\n ' }' + #13 +\r\n ' }' + #13 +\r\n ' });' + #13 +\r\n ' function ' + elid + 'addActive(x) {' + #13 +\r\n ' if (!x) return false;' + #13 +\r\n ' ' + elid + 'removeActive(x);' + #13 +\r\n ' if (currentFocus >= x.length) currentFocus = x.length - 1;' + #13 +\r\n ' if (currentFocus < 0) currentFocus = 0;' + #13 +\r\n ' x[currentFocus].classList.add(\"' + classactive + '\");' + #13 +\r\n ' }' + #13 +\r\n ' function ' + elid + 'removeActive(x) {' + #13 +\r\n ' for (var i = 0; i < x.length; i++) {' + #13 +\r\n ' x[i].classList.remove(\"' + classactive + '\");' + #13 +\r\n ' }' + #13 +\r\n ' }' + #13 +\r\n ' function ' + elid + 'closeAllLists(elmnt, doblur) {' + #13 +\r\n ' var x = document.getElementsByClassName(\"' + classpopup + '\");' + #13 +\r\n ' var isinput = (elmnt != inp);' + #13 +\r\n ' if (doblur) isinput = (elmnt == inp);' + #13 +\r\n ' for (var i = 0; i < x.length; i++) {' + #13 +\r\n ' if (elmnt != x[i] && isinput) {' + #13 +\r\n ' x[i].parentNode.removeChild(x[i]);' + #13 +\r\n ' }' + #13 +\r\n ' }' + #13 +\r\n ' }' + #13 +\r\n ' document.addEventListener(\"click\", function (e) {' + #13 +\r\n ' ' + elid + 'closeAllLists(e.target);' + #13 +\r\n ' });' + #13 +\r\n '}'\r\n );\r\n\r\n itemdata := TJSArray.new;\r\n for I := 0 to Items.Count - 1 do\r\n begin\r\n itemdata.push(Items[I]);\r\n end;\r\n\r\n cl := Self;\r\n asm\r\n //cl = this;\r\n var el = document.getElementById(elid);\r\n var elindex = document.getElementById(elid + 'index');\r\n if (el && elindex)\r\n doautocomplete(this, el, elindex, itemdata, cl);\r\n end;\r\nend;\r\n{$HINTS ON}\r\n\r\nend.\r\n","{********************************************************************}\r\n{ }\r\n{ written by TMS Software }\r\n{ Copyright (c) 2018 - 2024 }\r\n{ Email : info@tmssoftware.com }\r\n{ Web : http://www.tmssoftware.com }\r\n{ }\r\n{ The source code is given as is. The author is not responsible }\r\n{ for any possible damage done due to the use of this code. }\r\n{ The complete source code remains property of the author and may }\r\n{ not be distributed, published, given or sold in any form as such. }\r\n{ No parts of the source code can be included in any other component }\r\n{ or application without written authorization of the author. }\r\n{********************************************************************}\r\n\r\nunit WEBLib.Lists;\r\n\r\n{$DEFINE NOPP}\r\n\r\ninterface\r\n\r\nuses\r\n Classes, Web, WEBLib.Controls, WEBLib.Dialogs, WEBLib.Menus;\r\n\r\ntype\r\n TListItem = class;\r\n TListItems = class;\r\n TListControl = class;\r\n\r\n TListStyle = (lsNone, lsPagination, lsTabs, lsBreadcrumb, lsListGroup, lsListGroupHorizontal, lsNavPills, lsNavPillsHorizontal, lsDropDown);\r\n\r\n TListGetItemClassEvent = procedure(Sender: TObject; AItem: TListItem; var AClassName: string) of object;\r\n\r\n TListGetItemChildrenEvent = procedure(Sender: TObject; AItem: TListItem; AElement: TJSHTMLElementRecord) of object;\r\n\r\n TListItemEvent = procedure(Sender: TObject; AListItem: TListItem) of object;\r\n\r\n TListItem = class(TCollectionItem)\r\n private\r\n FItems: TListItems;\r\n FLink: string;\r\n FLinkTarget: string;\r\n FText: string;\r\n FItemClassName: TElementClassName;\r\n FLinkClassName: TElementClassName;\r\n FTag: integer;\r\n FListElement: TJSElement;\r\n FEnabled: boolean;\r\n FActive: boolean;\r\n FAutoCollaps: boolean;\r\n FHint: string;\r\n FHTMLChilds: integer;\r\n FBackupElement: TJSElement;\r\n FBackupCollapse: boolean;\r\n FLinkElement: TJSElement;\r\n FData: string;\r\n FAbsIndex: integer;\r\n procedure SetItems(const Value: TListItems);\r\n procedure SetLink(const Value: string);\r\n procedure SetText(const Value: string);\r\n procedure SetActive(const Value: boolean);\r\n procedure SetEnabled(const Value: boolean);\r\n procedure SetAutoCollaps(const Value: boolean);\r\n procedure SetHint(const Value: string);\r\n protected\r\n procedure SubItemsChanged(Sender: TObject); virtual;\r\n property AbsIndex: integer read FAbsIndex write FAbsIndex;\r\n public\r\n constructor Create(Collection: TCollection); override;\r\n destructor Destroy; override;\r\n procedure Assign(Source: TPersistent); override;\r\n function ItemId: string;\r\n procedure Store;\r\n procedure Restore;\r\n public\r\n property ListElement: TJSElement read FListElement;\r\n property LinkElement: TJSElement read FLinkElement;\r\n procedure AddLink(const AURL: string; ATarget: string = ''); overload;\r\n procedure AddLink(const AURL: string; ATarget: string; AClass: string); overload;\r\n function IsLink: boolean;\r\n function IsCollapsed: boolean;\r\n procedure Expand;\r\n procedure Collapse;\r\n property Data: string read FData write FData;\r\n published\r\n property Active: boolean read FActive write SetActive;\r\n property AutoCollaps: boolean read FAutoCollaps write SetAutoCollaps;\r\n property Enabled: boolean read FEnabled write SetEnabled;\r\n property Hint: string read FHint write SetHint;\r\n property ItemClassName: TElementClassName read FItemClassName write FItemClassName;\r\n property Items: TListItems read FItems write SetItems;\r\n property Link: string read FLink write SetLink;\r\n property LinkClassName: TElementClassName read FLinkClassName write FLinkClassName;\r\n property LinkTarget: string read FLinkTarget write FLinkTarget;\r\n property Tag: integer read FTag write FTag;\r\n property Text: string read FText write SetText;\r\n end;\r\n\r\n TListItems = class(TOwnedCollection)\r\n private\r\n FOnChange: TNotifyEvent;\r\n function GetItem(Index: integer): TListItem; reintroduce;\r\n procedure SetItem(Index: integer; const Value: TListItem);\r\n function GetListControl: TListControl;\r\n protected\r\n procedure Update(Item: TCollectionItem); override;\r\n procedure DoChanged; virtual;\r\n procedure Store;\r\n procedure Restore;\r\n public\r\n constructor Create(AOwner: TPersistent);\r\n function Add: TListItem; reintroduce;\r\n function Insert(Index: integer): TListItem; reintroduce;\r\n property Items[Index: integer]: TListItem read GetItem write SetItem; default;\r\n property ListControl: TListControl read GetListControl;\r\n property OnChange: TNotifyEvent read FOnChange write FOnChange;\r\n end;\r\n\r\n TListControl = class(TWebCustomControl)\r\n private\r\n FItems: TListItems;\r\n FElementListClassName: TElementClassName;\r\n FOnGetItemChildren: TListGetItemChildrenEvent;\r\n FOnGetItemClass: TListGetItemClassEvent;\r\n FOnItemDblClick: TListItemEvent;\r\n FOnItemClick: TListItemEvent;\r\n FDefaultItemClassName: string;\r\n FDefaultItemLinkClassName: string;\r\n FListStyle: TListStyle;\r\n FMultiSelect: boolean;\r\n FAutoSelect: boolean;\r\n procedure SetItems(const Value: TListItems);\r\n procedure SetListStyle(const Value: TListStyle);\r\n procedure SetElementListClassName(const Value: TElementClassName);\r\n function GetItemIndex: integer;\r\n procedure SetItemIndex(const Value: integer);\r\n protected\r\n function HandleDoClick(Event: TJSMouseEvent): Boolean; override;\r\n function HandleDoDblClick(Event: TJSMouseEvent): Boolean; override;\r\n function HandleDoAnchorClick(Event: TJSEvent): Boolean; virtual;\r\n procedure ItemsChanged(Sender: TObject); virtual;\r\n procedure ItemClick(AItem: TListItem); virtual;\r\n procedure ItemDblClick(AItem: TListItem); virtual;\r\n procedure GetItemClass(Item: TListItem; var AClass: string); virtual;\r\n procedure GetItemChildren(Item: TListItem; AElement: TJSHTMLElement); virtual;\r\n function CreateElement: TJSElement; override;\r\n procedure UpdateElement; override;\r\n procedure RenderList(AElement: TJSElement; Items: TListItems; var AIndex: integer);\r\n function ListItemByElement(AElement: TJSElement): TListItem;\r\n procedure EnableDrag; override;\r\n procedure DisableDrag; override;\r\n procedure InitCSSLibrary(ALibrary: TCSSLibrary); override;\r\n public\r\n constructor Create(AOwner: TComponent); override; overload;\r\n destructor Destroy; override;\r\n procedure CreateInitialize; override;\r\n function ListElement: TJSHTMLElement;\r\n procedure SetFilter(Condition: string; CaseSensitive: boolean = true);\r\n procedure RemoveFilter;\r\n property ItemIndex: integer read GetItemIndex write SetItemIndex;\r\n published\r\n property Align;\r\n property AlignWithMargins;\r\n property Anchors;\r\n property AutoSelect: boolean read FAutoSelect write FAutoSelect default false;\r\n property ChildOrder;\r\n property DefaultItemClassName: string read FDefaultItemClassName write FDefaultItemClassName;\r\n property DefaultItemLinkClassName: string read FDefaultItemLinkClassName write FDefaultItemLinkClassName;\r\n property DragMode;\r\n property ElementClassName;\r\n property ElementFont;\r\n property ElementID;\r\n property ElementPosition;\r\n property ElementListClassName: TElementClassName read FElementListClassName write SetElementListClassName;\r\n property HeightPercent;\r\n property HeightStyle;\r\n property Items: TListItems read FItems write SetItems;\r\n property Margins;\r\n property MultiSelect: boolean read FMultiSelect write FMultiSelect default false;\r\n property PopupMenu;\r\n property Style: TListStyle read FListStyle write SetListStyle;\r\n property Visible;\r\n property WidthPercent;\r\n property WidthStyle;\r\n\r\n property OnGetItemChildren: TListGetItemChildrenEvent read FOnGetItemChildren write FOnGetItemChildren;\r\n property OnGetItemClass: TListGetItemClassEvent read FOnGetItemClass write FOnGetItemClass;\r\n property OnItemClick: TListItemEvent read FOnItemClick write FOnItemClick;\r\n property OnItemDblClick: TListItemEvent read FOnItemDblClick write FOnItemDblClick;\r\n property OnDragDrop;\r\n property OnDragOver;\r\n property OnEndDrag;\r\n property OnStartDrag;\r\n end;\r\n\r\n TWebListControl = class(TListControl);\r\n\r\nimplementation\r\n\r\nuses\r\n SysUtils, WEBLib.Utils, WEBLib.Forms;\r\n\r\n{ TListItems }\r\n\r\nfunction TListItems.Add: TListItem;\r\nbegin\r\n Result := TListItem(inherited Add);\r\nend;\r\n\r\nconstructor TListItems.Create(AOwner: TPersistent);\r\nbegin\r\n inherited Create(AOwner, TListItem);\r\nend;\r\n\r\nprocedure TListItems.DoChanged;\r\nbegin\r\n if Assigned(OnChange) then\r\n OnChange(Self);\r\nend;\r\n\r\nfunction TListItems.GetItem(Index: integer): TListItem;\r\nbegin\r\n Result := TListItem(inherited Items[Index]);\r\nend;\r\n\r\nfunction TListItems.GetListControl: TListControl;\r\n\r\n function FindListControl(AOwner: TPersistent): TListControl;\r\n begin\r\n Result := nil;\r\n\r\n if AOwner is TListControl then\r\n Result := AOwner as TListControl\r\n else\r\n begin\r\n if Assigned(AOwner) and (AOwner is TListItem) then\r\n begin\r\n Result := FindListControl((AOwner as TListItem).Collection.Owner);\r\n end;\r\n end;\r\n end;\r\n\r\nbegin\r\n Result := FindListControl(Self.Owner);\r\nend;\r\n\r\nfunction TListItems.Insert(Index: integer): TListItem;\r\nbegin\r\n Result := TListItem(inherited Insert(Index));\r\nend;\r\n\r\nprocedure TListItems.Restore;\r\nvar\r\n i: integer;\r\nbegin\r\n for i := 0 to Count - 1 do\r\n Items[i].Restore;\r\nend;\r\n\r\nprocedure TListItems.SetItem(Index: integer; const Value: TListItem);\r\nbegin\r\n inherited Items[Index] := Value;\r\nend;\r\n\r\nprocedure TListItems.Store;\r\nvar\r\n i: integer;\r\nbegin\r\n for i := 0 to Count - 1 do\r\n Items[i].Store;\r\nend;\r\n\r\nprocedure TListItems.Update(Item: TCollectionItem);\r\nbegin\r\n inherited;\r\n DoChanged;\r\nend;\r\n\r\n{ TListItem }\r\n\r\nprocedure TListItem.AddLink(const AURL: string; ATarget: string);\r\nbegin\r\n AddLink(AURL, ATarget, '');\r\nend;\r\n\r\nprocedure TListItem.AddLink(const AURL: string; ATarget, AClass: string);\r\nbegin\r\n FLink := AURL;\r\n FLinkTarget := ATarget;\r\n FLinkClassName := AClass;\r\n Changed(false);\r\nend;\r\n\r\nprocedure TListItem.Assign(Source: TPersistent);\r\nbegin\r\n if (Source is TListItem) then\r\n begin\r\n FItemClassName := (Source as TListItem).ItemClassName;\r\n FText := (Source as TListItem).Text;\r\n FLink := (Source as TListItem).Link;\r\n FLinkClassName := (Source as TListItem).LinkClassName;\r\n FLinkTarget := (Source as TListItem).LinkTarget;\r\n FItems.Assign((Source as TListItem).Items);\r\n FTag := (Source as TListItem).Tag;\r\n FEnabled := (Source as TListItem).Enabled;\r\n FActive := (Source as TListItem).Active;\r\n FHint := (Source as TListItem).Hint;\r\n end;\r\nend;\r\n\r\nprocedure TListItem.Collapse;\r\nvar\r\n el: TJSElement;\r\nbegin\r\n if Assigned(FListElement) then\r\n begin\r\n el := FListElement.nextElementSibling;\r\n if Assigned(el) and (el.tagName = 'DIV') then\r\n begin\r\n if el.classList.contains('show') then\r\n el.classList.remove('show');\r\n end;\r\n end;\r\nend;\r\n\r\nconstructor TListItem.Create(Collection: TCollection);\r\nvar\r\n ctrl: TListControl;\r\nbegin\r\n FItems := TListItems.Create(Self);\r\n FItems.PropName := 'Items';\r\n FItems.OnChange := SubItemsChanged;\r\n inherited;\r\n FActive := false;\r\n FEnabled := true;\r\n FBackupElement := nil;\r\n ctrl := (Collection as TListItems).ListControl;\r\n\r\n if Assigned(ctrl) then\r\n begin\r\n FItemClassName := ctrl.DefaultItemClassName;\r\n FLinkClassName := ctrl.DefaultItemLinkClassName;\r\n end;\r\nend;\r\n\r\ndestructor TListItem.Destroy;\r\nbegin\r\n FItems.Free;\r\n inherited Destroy;\r\nend;\r\n\r\nprocedure TListItem.Expand;\r\nvar\r\n el: TJSElement;\r\nbegin\r\n if Assigned(FListElement) then\r\n begin\r\n el := FListElement.nextElementSibling;\r\n if Assigned(el) and (el.tagName = 'DIV') then\r\n begin\r\n if not el.classList.contains('show') then\r\n el.classList.add('show');\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TListItem.IsCollapsed: boolean;\r\nvar\r\n el: TJSElement;\r\nbegin\r\n Result := true;\r\n if Assigned(FListElement) then\r\n begin\r\n el := FListElement.nextElementSibling;\r\n if Assigned(el) and (el.tagName = 'DIV') then\r\n begin\r\n Result := not el.classList.contains('show');\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TListItem.IsLink: boolean;\r\nbegin\r\n Result := (Link <> '') {and (LinkClassName <> '')};\r\nend;\r\n\r\nfunction TListItem.ItemId: string;\r\nvar\r\n itm: TListItem;\r\n\r\n function IsSubItem(AItem: TListItem): boolean;\r\n begin\r\n Result := false;\r\n\r\n if Assigned(AItem.Collection) and Assigned(AItem.Collection.Owner) then\r\n begin\r\n Result := AItem.Collection.Owner is TListItem;\r\n end;\r\n end;\r\n\r\nbegin\r\n Result := IntToStr(Index);\r\n\r\n itm := Self;\r\n\r\n while IsSubItem(itm) do\r\n begin\r\n itm := itm.Collection.Owner as TListItem;\r\n Result := Result + '_' + IntToStr(Index);\r\n end;\r\nend;\r\n\r\nprocedure TListItem.Restore;\r\nvar\r\n i: integer;\r\nbegin\r\n if Assigned(FListElement) and Assigned(FBackupElement) then\r\n begin\r\n i := 0;\r\n\r\n while FBackupElement.childElementCount > 0 do\r\n begin\r\n if i >= FHTMLChilds then\r\n FListElement.appendChild(FBackupElement.firstElementChild)\r\n else\r\n FBackupElement.removeChild(FBackupElement.firstElementChild);\r\n end;\r\n end;\r\n\r\n if not FBackupCollapse then\r\n Expand;\r\n\r\n Items.Restore;\r\nend;\r\n\r\nprocedure TListItem.SetActive(const Value: boolean);\r\nbegin\r\n FActive := Value;\r\n Changed(false);\r\nend;\r\n\r\nprocedure TListItem.SetAutoCollaps(const Value: boolean);\r\nbegin\r\n FAutoCollaps := Value;\r\n Changed(false);\r\nend;\r\n\r\nprocedure TListItem.SetEnabled(const Value: boolean);\r\nbegin\r\n FEnabled := Value;\r\n Changed(false);\r\nend;\r\n\r\nprocedure TListItem.SetHint(const Value: string);\r\nbegin\r\n FHint := Value;\r\n Changed(false);\r\nend;\r\n\r\nprocedure TListItem.SetItems(const Value: TListItems);\r\nbegin\r\n FItems.Assign(Value);\r\nend;\r\n\r\nprocedure TListItem.SetLink(const Value: string);\r\nbegin\r\n FLink := Value;\r\n Changed(false);\r\nend;\r\n\r\nprocedure TListItem.SetText(const Value: string);\r\nbegin\r\n FText := Value;\r\n Changed(false);\r\nend;\r\n\r\nprocedure TListItem.Store;\r\nbegin\r\n if not Assigned(FBackupElement) then\r\n FBackupElement := document.createElement('SPAN');\r\n\r\n FBackupCollapse := IsCollapsed;\r\n\r\n if Assigned(FListElement) then\r\n while FListElement.childElementCount > 0 do\r\n begin\r\n FBackupElement.appendChild(FListElement.firstElementChild);\r\n end;\r\n\r\n Items.Store;\r\nend;\r\n\r\nprocedure TListItem.SubItemsChanged(Sender: TObject);\r\nbegin\r\n Changed(false);\r\nend;\r\n\r\n{ TListControl }\r\n\r\nconstructor TListControl.Create(AOwner: TComponent);\r\nbegin\r\n inherited;\r\n TabStop := false;\r\n WidthStyle := ssAbsolute;\r\n HeightStyle := ssAbsolute;\r\n WidthPercent := 100;\r\n HeightPercent := 100;\r\n ElementPosition := epAbsolute;\r\n Style := lsNone;\r\nend;\r\n\r\nfunction TListControl.CreateElement: TJSElement;\r\nbegin\r\n if Style = lsDropDown then\r\n Result := document.createElement('UL')\r\n else\r\n begin\r\n Result := document.createElement('DIV');\r\n Result.appendChild(document.createElement('UL'));\r\n end;\r\nend;\r\n\r\nprocedure TListControl.CreateInitialize;\r\nbegin\r\n inherited;\r\n\r\n FItems := TListItems.Create(Self);\r\n\r\n Width := 280;\r\n Height := 240;\r\n\r\n if DesignTime then\r\n begin\r\n FItems.Add.Text := 'Item 1';\r\n FItems.Add.Text := 'Item 2';\r\n FItems.Add.Text := 'Item 3';\r\n end;\r\n\r\n FItems.OnChange := ItemsChanged;\r\nend;\r\n\r\ndestructor TListControl.Destroy;\r\nbegin\r\n FItems.Free;\r\n inherited;\r\nend;\r\n\r\nprocedure TListControl.DisableDrag;\r\n procedure RemoveDraggableAttribute(AElement: TJSElement);\r\n var\r\n I: Integer;\r\n begin\r\n for I := 0 to AElement.children.length - 1 do\r\n begin\r\n if TJSElement(AElement.children[I]).tagName = 'LI' then\r\n begin\r\n TJSElement(AElement.children[I]).removeAttribute('draggable');\r\n RemoveDraggableAttribute(TJSElement(AElement.children[I]));\r\n end\r\n else\r\n RemoveDraggableAttribute(TJSElement(AElement.children[I]));\r\n end;\r\n end;\r\nbegin\r\n if not Assigned(Container) then\r\n Exit;\r\n\r\n RemoveDraggableAttribute(Container);\r\nend;\r\n\r\nprocedure TListControl.EnableDrag;\r\n procedure AddDraggableAttribute(AElement: TJSElement);\r\n var\r\n I: Integer;\r\n begin\r\n for I := 0 to AElement.children.length - 1 do\r\n begin\r\n if TJSElement(AElement.children[I]).tagName = 'LI' then\r\n begin\r\n TJSElement(AElement.children[I]).Attrs['draggable'] := 'true';\r\n AddDraggableAttribute(TJSElement(AElement.children[I]));\r\n end\r\n else\r\n AddDraggableAttribute(TJSElement(AElement.children[I]));\r\n end;\r\n end;\r\nbegin\r\n if not Assigned(Container) then\r\n Exit;\r\n\r\n AddDraggableAttribute(Container);\r\nend;\r\n\r\nprocedure TListControl.GetItemChildren(Item: TListItem;\r\n AElement: TJSHTMLElement);\r\nvar\r\n LElementRec: TJSHTMLElementRecord;\r\nbegin\r\n LElementRec.element := AElement;\r\n if Assigned(OnGetItemChildren) then\r\n OnGetItemChildren(Self, Item, LElementRec);\r\nend;\r\n\r\nprocedure TListControl.GetItemClass(Item: TListItem; var AClass: string);\r\nbegin\r\n if Assigned(OnGetItemClass) then\r\n OnGetItemClass(Self, Item, AClass);\r\nend;\r\n\r\nfunction TListControl.GetItemIndex: integer;\r\nvar\r\n i: integer;\r\nbegin\r\n Result := -1;\r\n\r\n for i := 0 to Items.Count - 1 do\r\n begin\r\n if Items[i].Active then\r\n begin\r\n Result := i;\r\n break;\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TListControl.HandleDoAnchorClick(Event: TJSEvent): Boolean;\r\nvar\r\n li: TListItem;\r\nbegin\r\n li := ListItemByElement(TJSElement(Event.targetElement.parentNode));\r\n\r\n if Assigned(li) then\r\n ItemClick(li);\r\n\r\n Result := false;\r\nend;\r\n\r\nfunction TListControl.HandleDoClick(Event: TJSMouseEvent): Boolean;\r\nvar\r\n li: TListItem;\r\nbegin\r\n if Assigned(OnItemClick) then\r\n begin\r\n event.preventDefault;\r\n event.stopPropagation;\r\n end;\r\n\r\n li := ListItemByElement(Event.targetElement);\r\n\r\n if Assigned(li) then\r\n begin\r\n\r\n if AutoSelect then\r\n begin\r\n if MultiSelect then\r\n li.Active := not li.Active\r\n else\r\n begin\r\n ItemIndex := li.AbsIndex;\r\n end;\r\n end;\r\n\r\n if Assigned(li) then\r\n ItemClick(li);\r\n end;\r\n\r\n Result := false;\r\nend;\r\n\r\nfunction TListControl.HandleDoDblClick(Event: TJSMouseEvent): Boolean;\r\nvar\r\n li: TListItem;\r\nbegin\r\n li := ListItemByElement(Event.targetElement);\r\n\r\n if Assigned(li) then\r\n ItemDblClick(li);\r\n\r\n Result := false;\r\nend;\r\n\r\nprocedure TListControl.InitCSSLibrary(ALibrary: TCSSLibrary);\r\nbegin\r\n if (ALibrary = cssBootstrap) then\r\n begin\r\n DefaultItemClassName := 'list-group-item';\r\n ElementListClassName := 'list-group';\r\n ElementFont := efCSS;\r\n HeightStyle := ssAuto;\r\n Style := lsListGroup;\r\n end;\r\nend;\r\n\r\nprocedure TListControl.ItemClick(AItem: TListItem);\r\nbegin\r\n if Assigned(OnItemClick) then\r\n OnItemClick(Self, AItem);\r\nend;\r\n\r\nprocedure TListControl.ItemDblClick(AItem: TListItem);\r\nbegin\r\n if Assigned(OnItemDblClick) then\r\n OnItemDblClick(Self, AItem);\r\nend;\r\n\r\nprocedure TListControl.ItemsChanged(Sender: TObject);\r\nvar\r\n ul: TJSElement;\r\n idx: integer;\r\nbegin\r\n if IsUpdating then\r\n Exit;\r\n\r\n if Assigned(ElementHandle) then\r\n begin\r\n ul := ListElement;\r\n\r\n if Assigned(ul) then\r\n begin\r\n if Style = lsListGroup then\r\n Items.Store;\r\n\r\n while Assigned(ul.firstChild) do\r\n ul.removeChild(ul.firstChild);\r\n\r\n if ElementListClassName <> '' then\r\n ul.setAttribute('class', ElementListClassName);\r\n\r\n idx := 0;\r\n RenderList(ul, Items, idx);\r\n\r\n if Style = lsListGroup then\r\n Items.Restore;\r\n end;\r\n\r\n if (csDesigning in ComponentState) then\r\n UpdateElement;\r\n end;\r\nend;\r\n\r\nfunction TListControl.ListElement: TJSHTMLElement;\r\nbegin\r\n Result := nil;\r\n\r\n if Assigned(ElementHandle) then\r\n begin\r\n if (ElementHandle.TagName = 'UL') then\r\n begin\r\n Result := ElementHandle;\r\n Exit;\r\n end;\r\n\r\n if IsLinked then\r\n begin\r\n if ElementHandle.TagName = 'UL' then\r\n begin\r\n Result := ElementHandle;\r\n Exit;\r\n end;\r\n end;\r\n\r\n if (ElementHandle.childElementCount > 0) then\r\n begin\r\n Result := TJSHTMLElement(ElementHandle.firstChild);\r\n end\r\n else\r\n begin\r\n Result := TJSHTMLElement(document.createElement('UL'));\r\n ElementHandle.insertAdjacentElement('afterbegin',Result);\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TListControl.ListItemByElement(AElement: TJSElement): TListItem;\r\n\r\n function SearchElement(AItems: TListItems): TListItem;\r\n var\r\n i: integer;\r\n begin\r\n Result := nil;\r\n\r\n for i := 0 to AItems.Count - 1 do\r\n begin\r\n\r\n if AItems[i].ListElement = AElement then\r\n begin\r\n Result := AItems[i];\r\n Break;\r\n end;\r\n\r\n if AItems[i].Items.Count > 0 then\r\n begin\r\n Result := SearchElement(AItems[i].Items);\r\n if Assigned(Result) then\r\n break;\r\n end;\r\n end;\r\n end;\r\n\r\nbegin\r\n Result := SearchElement(Items);\r\nend;\r\n\r\nprocedure TListControl.RemoveFilter;\r\nvar\r\n i: integer;\r\n el: TJSHTMLElement;\r\nbegin\r\n for i := 0 to Items.Count - 1 do\r\n begin\r\n el := TJSHTMLElement(Items[i].FListElement);\r\n el.style.removeProperty('display');\r\n end;\r\nend;\r\n\r\nprocedure TListControl.RenderList(AElement: TJSElement; Items: TListItems; var AIndex: integer);\r\nvar\r\n i: integer;\r\n ul,li,a,dv: TJSElement;\r\n aclass,datatoggle,datatarget: string;\r\n doins: boolean;\r\n el: TJSHTMLElement;\r\nbegin\r\n if not Assigned(AElement) then\r\n Exit;\r\n\r\n if Application.BootstrapVersion <> bv5 then\r\n begin\r\n datatoggle := 'data-toggle';\r\n datatarget := 'data-target';\r\n end\r\n else\r\n begin\r\n datatoggle := 'data-bs-toggle';\r\n datatarget := 'data-bs-target';\r\n end;\r\n\r\n for i := 0 to Items.Count - 1 do\r\n begin\r\n li := document.createElement('li');\r\n\r\n if DragMode = dmAutomatic then\r\n li['draggable'] := 'true';\r\n\r\n Items[i].FListElement := li;\r\n Items[i].FHTMLChilds := 0;\r\n\r\n aclass := Items[i].ItemClassName;\r\n\r\n GetItemClass(Items[i], aclass);\r\n\r\n if Items[i].Active and {not (Items[i].IsLink and} (Style <> lsNavPills) then\r\n aclass := aclass + ' active';\r\n\r\n if not Items[i].Enabled then\r\n aclass := aclass + ' disabled';\r\n\r\n if aclass <> '' then\r\n li.setAttribute('class',aclass);\r\n\r\n if Items[i].Hint <> '' then\r\n li.setAttribute('title',Items[i].Hint);\r\n\r\n if Items[i].IsLink or (Style = lsPagination) then\r\n begin\r\n doins := not Assigned(Items[i].LinkElement);\r\n if doins or not Items[i].IsLink then\r\n Items[i].FLinkElement := document.createElement('a');\r\n\r\n a := Items[i].LinkElement;\r\n\r\n a.innerHTML := Items[i].Text;\r\n\r\n aclass := Items[i].LinkClassName;\r\n if Items[i].Active then\r\n aclass := aclass + ' active';\r\n\r\n if (Items[i].LinkClassName <> '') then\r\n a.setAttribute('class',aclass);\r\n\r\n if (Items[i].Link = '') then\r\n a.setAttribute('href','#')\r\n else\r\n a.setAttribute('href',Items[i].Link);\r\n\r\n if (Items[i].LinkTarget <> '') then\r\n a.setAttribute('target',Items[i].LinkTarget);\r\n\r\n a.addEventListener('click',@HandleDoAnchorClick);\r\n\r\n if doins or not Items[i].IsLink then\r\n li.appendChild(a);\r\n end\r\n else\r\n begin\r\n li.innerHTML := Items[i].Text;\r\n // take elements in account inserted as HTML text to not restore\r\n Items[i].FHTMLChilds := li.childElementCount;\r\n end;\r\n\r\n el := TJSHTMLElement(li);\r\n\r\n GetItemChildren(Items[i], el);\r\n\r\n AElement.appendChild(li);\r\n\r\n Items[i].AbsIndex := AIndex;\r\n inc(AIndex);\r\n\r\n if Style <> lsTabs then\r\n begin\r\n\r\n if (Items[i].Items.Count > 0) then\r\n begin\r\n dv := document.createElement('div');\r\n\r\n if Items[i].AutoCollaps then\r\n dv.setAttribute('class','collapse');\r\n\r\n dv.setAttribute('id', GetID + Items[i].ItemId);\r\n AElement.appendChild(dv);\r\n\r\n if Items[i].AutoCollaps then\r\n begin\r\n li.setAttribute(datatoggle,'collapse');\r\n li.setAttribute(datatarget,'#' + GetID + Items[i].ItemId);\r\n end;\r\n\r\n ul := document.createElement('ul');\r\n dv.appendChild(ul);\r\n\r\n RenderList(ul, Items[i].Items, AIndex);\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TListControl.SetElementListClassName(const Value: TElementClassName);\r\nbegin\r\n FElementListClassName := Value;\r\n UpdateElement;\r\nend;\r\n\r\nprocedure TListControl.SetFilter(Condition: string; CaseSensitive: boolean = true);\r\nvar\r\n i: integer;\r\n el: TJSHTMLElement;\r\nbegin\r\n for i := 0 to Items.Count - 1 do\r\n begin\r\n el := TJSHTMLElement(Items[i].FListElement);\r\n if not MatchStr(Condition, Items[i].Text, CaseSensitive) then\r\n el.style.setProperty('display','none');\r\n end;\r\n\r\nend;\r\n\r\nprocedure TListControl.SetItemIndex(const Value: integer);\r\nvar\r\n i,j,v: integer;\r\nbegin\r\n BeginUpdate;\r\n\r\n v := 0;\r\n\r\n for i := 0 to Items.Count - 1 do\r\n begin\r\n Items[i].Active := (Value = v);\r\n inc(v);\r\n if Items[i].Items.Count > 0 then\r\n begin\r\n for j := 0 to Items[i].Items.Count - 1 do\r\n begin\r\n Items[i].Items[j].Active := (Value = v);\r\n inc(v);\r\n end;\r\n end;\r\n end;\r\n\r\n EndUpdate;\r\nend;\r\n\r\nprocedure TListControl.SetItems(const Value: TListItems);\r\nbegin\r\n FItems := Value;\r\nend;\r\n\r\nprocedure TListControl.SetListStyle(const Value: TListStyle);\r\nbegin\r\n FListStyle := Value;\r\n\r\n if IsUpdating then\r\n Exit;\r\n\r\n case FListStyle of\r\n lsPagination:\r\n begin\r\n DefaultItemClassName := 'page-item';\r\n DefaultItemLinkClassName := 'page-link';\r\n ElementListClassName := 'pagination';\r\n end;\r\n lsTabs:\r\n begin\r\n DefaultItemClassName := 'nav-item';\r\n DefaultItemLinkClassName := 'nav-link';\r\n ElementListClassName := 'nav nav-tabs';\r\n end;\r\n lsBreadcrumb:\r\n begin\r\n DefaultItemClassName := 'breadcrumb-item';\r\n DefaultItemLinkClassName := 'breadcrumb-link';\r\n ElementListClassName := 'breadcrumb';\r\n end;\r\n lsListGroup:\r\n begin\r\n DefaultItemClassName := 'list-group-item';\r\n DefaultItemLinkClassName := 'list-group-link';\r\n ElementListClassName := 'list-group';\r\n end;\r\n lsListGroupHorizontal:\r\n begin\r\n DefaultItemClassName := 'list-group-item';\r\n DefaultItemLinkClassName := 'list-group-link';\r\n ElementListClassName := 'list-group list-group-horizontal';\r\n end;\r\n lsNavPills:\r\n begin\r\n DefaultItemClassName := 'nav-item';\r\n DefaultItemLinkClassName := 'nav-link';\r\n ElementListClassName := 'nav nav-pills flex-column';\r\n end;\r\n lsNavPillsHorizontal:\r\n begin\r\n DefaultItemClassName := 'nav-item';\r\n DefaultItemLinkClassName := 'nav-link';\r\n ElementListClassName := 'nav nav-pills';\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TListControl.UpdateElement;\r\nvar\r\n ul: TJSElement;\r\n LLabel: TJSHTMLElement;\r\n LHasLabel: boolean;\r\n idx: integer;\r\n\r\nbegin\r\n inherited;\r\n\r\n if IsUpdating then\r\n Exit;\r\n\r\n if Assigned(ElementHandle) then\r\n begin\r\n if Items.Count > 0 then\r\n begin\r\n ElementHandle.style.removeProperty(CSSBackground);\r\n\r\n LLabel := TJSHTMLElement(ElementHandle.firstChild);\r\n LHasLabel := Assigned(LLabel) and (LLabel.tagName = 'DIV') and (LLabel.getAttribute('data-design') = '1');\r\n if LHasLabel then\r\n begin\r\n ElementHandle.removeChild(LLabel);\r\n end;\r\n\r\n ul := ListElement;\r\n\r\n if Assigned(ul) then\r\n begin\r\n if Style = lsListGroup then\r\n Items.Store;\r\n\r\n while Assigned(ul.firstChild) do\r\n ul.removeChild(ul.firstChild);\r\n\r\n if ElementListClassName <> '' then\r\n ul.setAttribute('class', ElementListClassName);\r\n\r\n ElementHandle.style.removeProperty('overflow');\r\n\r\n idx := 0;\r\n\r\n RenderList(ul, Items, idx);\r\n\r\n if Style = lsListGroup then\r\n Items.Restore;\r\n end;\r\n end\r\n else\r\n begin\r\n if not IsLinked and (csDesigning in ComponentState) then\r\n begin\r\n RenderDesigning('TWebListControl', Container, Self, True);\r\n end\r\n else\r\n begin\r\n ul := ListElement;\r\n if Assigned(ul) then\r\n while Assigned(ul.firstChild) do\r\n ul.removeChild(ul.firstChild);\r\n end;\r\n end;\r\n\r\n // allow scrollbar on lsListGroup style control\r\n if (Style in [lsListGroup]) then\r\n TJSHTMLElement(ElementHandle).style.setProperty('overflow','auto');\r\n end;\r\nend;\r\n\r\nend.\r\n","{********************************************************************}\r\n{ }\r\n{ written by TMS Software }\r\n{ copyright (c) 2022 - 2023 }\r\n{ Email : info@tmssoftware.com }\r\n{ Web : http://www.tmssoftware.com }\r\n{ }\r\n{ The source code is given as is. The author is not responsible }\r\n{ for any possible damage done due to the use of this code. }\r\n{ The complete source code remains property of the author and may }\r\n{ not be distributed, published, given or sold in any form as such. }\r\n{ No parts of the source code can be included in any other component }\r\n{ or application without written authorization of the author. }\r\n{********************************************************************}\r\nunit WEBLib.DropDown;\r\n\r\n{$DEFINE NOPP}\r\n\r\ninterface\r\n\r\n// overflow hidden of parent elements????\r\n// https://www.w3schools.com/howto/tryit.asp?filename=tryhow_css_js_dropdown_hover\r\n\r\nuses\r\n Classes, WEBLib.Controls, WEBLib.Forms, Web, JS, WEBLib.Menus, WEBLib.Graphics,\r\n WEBLib.Grids;\r\n\r\ntype\r\n TCustomDropDownControl = class(TWebCustomControl)\r\n private\r\n FDoClickLayer: pointer;\r\n FDoBtnClick: pointer;\r\n FLayer: TJSHTMLElement;\r\n FControl: TCustomControl;\r\n FDropDown: TJSHTMLElement;\r\n FTextElement: TJSHTMLElement;\r\n FButton: TJSHTMLElement;\r\n FOnCloseUp: TNotifyEvent;\r\n FOnDropDown: TNotifyEvent;\r\n FText: string;\r\n FAutoDropDown: boolean;\r\n FElementInputClassName: TElementClassName;\r\n FButtonImageURL: string;\r\n FDropDownHeight: integer;\r\n FDropDownWidth: integer;\r\n FDropDownColor: TColor;\r\n FDropDownShadow: boolean;\r\n FReadOnly: Boolean;\r\n FElementButtonClassName: TElementClassName;\r\n procedure SetText(const Value: string);\r\n function GetText: string;\r\n function GetDroppedDown: boolean;\r\n procedure SetButtonImageURL(const Value: string);\r\n procedure SetReadOnly(const Value: Boolean);\r\n procedure SetControl(const Value: TCustomControl);\r\n protected\r\n procedure UpdateElementVisual; override;\r\n procedure CreateInitialize; override;\r\n function HandleDoClickLayer(Event: TJSMouseEvent): Boolean; virtual;\r\n function HandleDoBtnClick(Event: TJSMouseEvent): Boolean; virtual;\r\n procedure Click; override;\r\n function HasEdit: boolean; virtual;\r\n procedure CreateChildElements(AContainer: TJSElement); override;\r\n function CreateElement: TJSElement; override;\r\n procedure ClearMethodPointers; override;\r\n procedure GetMethodPointers; override;\r\n procedure DoDropDown; virtual;\r\n procedure DoCloseUp; virtual;\r\n procedure BindEvents; override;\r\n procedure UnBindEvents; override;\r\n public\r\n procedure ShowDropDown; virtual;\r\n procedure HideDropDown; virtual;\r\n procedure ToggleDropDown; virtual;\r\n property DroppedDown: boolean read GetDroppedDown;\r\n property Text: string read GetText write SetText;\r\n property BorderStyle;\r\n property Control: TCustomControl read FControl write SetControl;\r\n property ElementInputClassName: TElementClassName read FElementInputClassName write FElementInputClassName;\r\n property ElementButtonClassName: TElementClassName read FElementButtonClassName write FElementButtonClassName;\r\n property ButtonImageURL: string read FButtonImageURL write SetButtonImageURL;\r\n published\r\n property AutoDropDown: boolean read FAutoDropDown write FAutoDropDown default false;\r\n property DropDownColor: TColor read FDropDownColor write FDropDownColor default clWhite;\r\n property DropDownWidth: integer read FDropDownWidth write FDropDownWidth default 0;\r\n property DropDownHeight: integer read FDropDownHeight write FDropDownHeight default 0;\r\n property DropDownShadow: boolean read FDropDownShadow write FDropDownShadow default true;\r\n property ReadOnly: Boolean read FReadOnly write SetReadOnly default false;\r\n property OnDropDown: TNotifyEvent read FOnDropDown write FOnDropDown;\r\n property OnCloseUp: TNotifyEvent read FOnCloseUp write FOnCloseUp;\r\n end;\r\n\r\n TDropDownControl = class(TCustomDropDownControl)\r\n published\r\n property Align;\r\n property AlignWithMargins;\r\n property Anchors;\r\n property BiDiMode;\r\n property BorderStyle;\r\n property ButtonImageURL;\r\n property ChildOrder;\r\n property Color;\r\n property Control;\r\n property DragMode;\r\n property Font;\r\n property ElementButtonClassName;\r\n property ElementClassName;\r\n property ElementID;\r\n property ElementFont;\r\n property ElementPosition;\r\n property Enabled;\r\n property Height;\r\n property HeightPercent;\r\n property HeightStyle;\r\n property Hint;\r\n property Left;\r\n property ParentColor;\r\n property ParentFont;\r\n property PopupMenu;\r\n property ReadOnly;\r\n property Role;\r\n property ShowFocus;\r\n property ShowHint;\r\n property TabOrder;\r\n property TabStop;\r\n property Text;\r\n property TextDirection;\r\n property Top;\r\n property Visible;\r\n property Width;\r\n property WidthPercent;\r\n property WidthStyle;\r\n property OnClick;\r\n property OnCloseUp;\r\n property OnDblClick;\r\n property OnDropDown;\r\n property OnKeyDown;\r\n property OnKeyPress;\r\n property OnKeyUp;\r\n property OnMouseDown;\r\n property OnMouseUp;\r\n property OnMouseMove;\r\n property OnMouseLeave;\r\n property OnMouseEnter;\r\n property OnMouseWheel;\r\n property OnEnter;\r\n property OnExit;\r\n property OnDragDrop;\r\n property OnDragOver;\r\n property OnEndDrag;\r\n property OnStartDrag;\r\n end;\r\n\r\n TWebDropDownControl = class(TDropDownControl);\r\n\r\n TEditDropDownControl = class(TCustomDropDownControl)\r\n private\r\n function GetEditElement: TJSHTMLElement;\r\n protected\r\n procedure KeyDown(var Key: Word; Shift: TShiftState); override;\r\n function GetElementBindHandle: TJSEventTarget; override;\r\n function HasEdit: boolean; override;\r\n public\r\n property EditElement: TJSHTMLElement read GetEditElement;\r\n published\r\n property Align;\r\n property AlignWithMargins;\r\n property Anchors;\r\n property BiDiMode;\r\n property BorderStyle;\r\n property ButtonImageURL;\r\n property ChildOrder;\r\n property Color;\r\n property Control;\r\n property DragMode;\r\n property Font;\r\n property ElementButtonClassName;\r\n property ElementClassName;\r\n property ElementInputClassName;\r\n property ElementID;\r\n property ElementFont;\r\n property ElementPosition;\r\n property Enabled;\r\n property Height;\r\n property HeightPercent;\r\n property HeightStyle;\r\n property Hint;\r\n property Left;\r\n property ParentColor;\r\n property ParentFont;\r\n property PopupMenu;\r\n property Role;\r\n property ShowFocus;\r\n property ShowHint;\r\n property TabOrder;\r\n property TabStop;\r\n property Text;\r\n property TextDirection;\r\n property Top;\r\n property Visible;\r\n property Width;\r\n property WidthPercent;\r\n property WidthStyle;\r\n property OnClick;\r\n property OnCloseUp;\r\n property OnDblClick;\r\n property OnDropDown;\r\n property OnKeyDown;\r\n property OnKeyPress;\r\n property OnKeyUp;\r\n property OnMouseDown;\r\n property OnMouseUp;\r\n property OnMouseMove;\r\n property OnMouseLeave;\r\n property OnMouseEnter;\r\n property OnMouseWheel;\r\n property OnEnter;\r\n property OnExit;\r\n property OnDragDrop;\r\n property OnDragOver;\r\n property OnEndDrag;\r\n property OnStartDrag;\r\n end;\r\n\r\n TWebEditDropDownControl = class(TEditDropDownControl);\r\n\r\n TTableOptions = class(TPersistent)\r\n private\r\n FOwner: TComponent;\r\n FElementSelectionClassName: TElementClassName;\r\n FElementFont: TELementFont;\r\n FElementHeaderClassName: TElementClassName;\r\n FElementRowSelectClassName: TElementClassName;\r\n FElementClassName: TELementClassName;\r\n FElementTableClassName: TElementClassName;\r\n FHeader: TTableControlHeader;\r\n FFooter: TTableControlHeader;\r\n FPaging: TTableControlPaging;\r\n FRowHeader: boolean;\r\n FSelectionTextColor: TColor;\r\n FSelectionColor: TColor;\r\n FColHeader: boolean;\r\n FScrollVertical: boolean;\r\n FResizeColumns: boolean;\r\n FAutoCellURL: boolean;\r\n FAutoCellEmail: boolean;\r\n FAutoCellImage: boolean;\r\n FCellBorderColor: TColor;\r\n FCellBorders: boolean;\r\n FImageAlign: TAlignment;\r\n FImageWidth: integer;\r\n procedure SetFooter(const Value: TTableControlHeader);\r\n procedure SetHeader(const Value: TTableControlHeader);\r\n procedure SetPaging(const Value: TTableControlPaging);\r\n public\r\n procedure Assign(Source: TPersistent); override;\r\n constructor Create(AOwner: TComponent);\r\n destructor Destroy; override;\r\n property Owner: TComponent read FOwner;\r\n published\r\n property AutoCellEmail: boolean read FAutoCellEmail write FAutoCellEmail default false;\r\n property AutoCellURL: boolean read FAutoCellURL write FAutoCellURL default false;\r\n property AutoCellImage: boolean read FAutoCellImage write FAutoCellImage default false;\r\n property CellBorders: boolean read FCellBorders write FCellBorders default false;\r\n property CellBorderColor: TColor read FCellBorderColor write FCellBorderColor default clSilver;\r\n property ColHeader: boolean read FColHeader write FColHeader default true;\r\n property ElementClassName: TELementClassName read FElementClassName write FElementClassName;\r\n property ElementFont: TELementFont read FElementFont write FElementFont;\r\n property ElementHeaderClassName: TElementClassName read FElementHeaderClassName write FElementHeaderClassName;\r\n property ElementRowSelectClassName: TElementClassName read FElementRowSelectClassName write FElementRowSelectClassName;\r\n property ElementSelectionClassName: TElementClassName read FElementSelectionClassName write FElementSelectionClassName;\r\n property ElementTableClassName: TElementClassName read FElementTableClassName write FElementTableClassName;\r\n property ImageAlign: TAlignment read FImageAlign write FImageAlign default taLeftJustify;\r\n property ImageWidth: integer read FImageWidth write FImageWidth default 0;\r\n property Header: TTableControlHeader read FHeader write SetHeader;\r\n property Footer: TTableControlHeader read FFooter write SetFooter;\r\n property Paging: TTableControlPaging read FPaging write SetPaging;\r\n property ResizeColumns: boolean read FResizeColumns write FResizeColumns default false;\r\n property RowHeader: boolean read FRowHeader write FRowHeader default true;\r\n property ScrollVertical: boolean read FScrollVertical write FScrollVertical default false;\r\n property SelectionColor: TColor read FSelectionColor write FSelectionColor default $00FF8F5B;\r\n property SelectionTextColor: TColor read FSelectionTextColor write FSelectionTextColor default clWhite;\r\n end;\r\n\r\n TEditDropDownTableControl = class(TEditDropDownControl)\r\n private\r\n FTableControl: TCustomTableControl;\r\n FEditColumn: integer;\r\n FTableOptions: TTableOptions;\r\n procedure SetTableOptions(const Value: TTableOptions);\r\n protected\r\n function CreateTable(AOwner: TComponent): TCustomTableControl; virtual;\r\n function GetTableControl: TWebTableControl;\r\n procedure CreateInitialize; override;\r\n procedure SetParent(AValue: TControl); override;\r\n procedure TableClickCell(Sender: TObject; ACol, ARow: integer);\r\n procedure TableKeyPress(Sender: TObject; var AChar: Char);\r\n procedure TableKeyDown(Sender: TObject; var AKey: Word; Shift: TShiftState);\r\n property TableControl: TCustomTableControl read FTableControl;\r\n public\r\n constructor Create(AOwner: TComponent); override;\r\n procedure ShowDropDown; override;\r\n destructor Destroy; override;\r\n property Table: TWebTableControl read GetTableControl;\r\n\r\n published\r\n property EditColumn: integer read FEditColumn write FEditColumn default 0;\r\n property TableOptions: TTableOptions read FTableOptions write SetTableOptions;\r\n end;\r\n\r\n TWebEditDropDownTableControl = class(TEditDropDownTableControl);\r\n\r\n\r\nimplementation\r\n\r\nuses\r\n SysUtils, Math;\r\n\r\n{ TWebDropDownControl }\r\n\r\nprocedure TCustomDropDownControl.BindEvents;\r\nbegin\r\n inherited;\r\n\r\n if HasEdit and Assigned(FButton) then\r\n FButton.addEventListener('click',FDoBtnClick);\r\nend;\r\n\r\nprocedure TCustomDropDownControl.ClearMethodPointers;\r\nbegin\r\n inherited;\r\n FDoClickLayer := nil;\r\n FDoBtnClick := nil;\r\nend;\r\n\r\nprocedure TCustomDropDownControl.Click;\r\nbegin\r\n inherited;\r\n\r\n if (ElementEvent.target = FButton) or (TJSElement(ElementEvent.target).parentElement = FButton) then\r\n begin\r\n ToggleDropDown;\r\n end\r\n else\r\n if AutoDropDown then\r\n ToggleDropDown;\r\nend;\r\n\r\nprocedure TCustomDropDownControl.CreateChildElements(AContainer: TJSElement);\r\nvar\r\n r: TJSDOMRect;\r\nbegin\r\n if HasEdit then\r\n begin\r\n FTextElement := TJSHTMLElement(document.createElement('INPUT'));\r\n FTextElement['type'] := 'TEXT';\r\n if ElementFont = efProperty then\r\n SetHTMLElementFont(FTextElement, Font, ElementFont = efCSS);\r\n end\r\n else\r\n begin\r\n FTextElement := TJSHTMLElement(document.createElement('DIV'));\r\n FTextElement['type'] := 'TEXT';\r\n FTextElement.style.setProperty('padding-left','2px');\r\n FTextElement.style.setProperty('padding-right','2px');\r\n FTextElement.style.setProperty('text-overflow','ellipsis');\r\n if ElementFont = efProperty then\r\n SetHTMLElementFont(FTextElement, Font, ElementFont = efCSS);\r\n end;\r\n\r\n FButton := TJSHTMLElement(document.createElement('DIV'));\r\n\r\n// TJSHTMLElement(FTextElement).style.setProperty('background-color','white');\r\n TJSHTMLElement(FTextElement).style.setProperty('display','inline-block');\r\n TJSHTMLElement(FTextElement).style.setProperty('width','calc(100% - 26px)');\r\n\r\n r := AContainer.getBoundingClientRect;\r\n if r.height = 0 then\r\n r.height := 26;\r\n\r\n TJSHTMLElement(FTextElement).style.setProperty('height',r.height.ToString+'px');\r\n TJSHTMLElement(FTextElement).style.setProperty('box-sizing','border-box');\r\n TJSHTMLElement(FTextElement).style.setProperty('line-height', r.height.ToString + 'px');\r\n TJSHTMLElement(FTextElement).style.setProperty('vertical-align','middle');\r\n\r\n TJSHTMLElement(FButton).style.setProperty('background-color','silver');\r\n TJSHTMLElement(FButton).style.setProperty('display','inline-block');\r\n TJSHTMLElement(FButton).style.setProperty('width','25px');\r\n TJSHTMLElement(FButton).style.setProperty('height', r.height.ToString +'px');\r\n TJSHTMLElement(FButton).style.setProperty('line-height', r.height.ToString + 'px');\r\n TJSHTMLElement(FButton).style.setProperty('text-align','center');\r\n TJSHTMLElement(FButton).style.setProperty('vertical-align','middle');\r\n TJSHTMLElement(FButton).style.setProperty('padding','0px!important');\r\n\r\n FDropDown := TJSHTMLElement(document.createElement('DIV'));\r\n TJSHTMLElement(FDropDown).style.setProperty('position','absolute');\r\n TJSHTMLElement(FDropDown).style.setProperty('display','none');\r\n TJSHTMLElement(FDropDown).style.setProperty('background-color','#f1f1f1');\r\n// TJSHTMLElement(FDropDown).style.setProperty('min-width','160px');\r\n TJSHTMLElement(FDropDown).style.setProperty('box-shadow','0px 8px 8px 0px rgba(0,0,0,0.2)');\r\n TJSHTMLElement(FDropDown).style.setProperty('z-index','1');\r\n// TJSHTMLElement(FDropDown).style.setProperty('min-height','200px');\r\n //FDropDOwn.innerHTML := 'hello world
more content
is here
in the dropdown';\r\n\r\n FTextElement.innerHTML := ' ';\r\n// FButton.innerHTML := '▼';\r\n\r\n AContainer.appendChild(FTextElement);\r\n AContainer.appendChild(FButton);\r\n\r\n FLayer := TJSHTMLElement(document.createElement('SPAN'));\r\n FLayer.style.setProperty('top', '0');\r\n FLayer.style.setProperty('left', '0');\r\n FLayer.style.setProperty('right', '0');\r\n FLayer.style.setProperty('bottom', '0');\r\n\r\n FLayer.style.setProperty('webkit-user-select', 'none');\r\n FLayer.style.setProperty('moz-user-select', 'none');\r\n FLayer.style.setProperty('khtml-user-select', 'none');\r\n FLayer.style.setProperty('ms-user-select', 'none');\r\n FLayer.style.setProperty('user-select', 'none');\r\n FLayer.style.setProperty('position', 'absolute');\r\n\r\n AddInstanceStyle('.arrow { border: solid black; border-width: 0 2px 2px 0; display: inline-block; padding: 2px;}'+#13#10+\r\n '.down { transform: rotate(45deg); -webkit-transform: rotate(45deg);};');\r\n\r\n FButton.innerHTML := '';\r\nend;\r\n\r\nfunction TCustomDropDownControl.CreateElement: TJSElement;\r\nbegin\r\n Result := document.createElement('DIV');\r\nend;\r\n\r\nprocedure TCustomDropDownControl.CreateInitialize;\r\nbegin\r\n inherited;\r\n FAutoDropDown := false;\r\n FDropDownColor := clWhite;\r\n FDropDownWidth := 0;\r\n FDropDownHeight := 0;\r\n FDropDownShadow := true;\r\nend;\r\n\r\nprocedure TCustomDropDownControl.DoCloseUp;\r\nbegin\r\n if Assigned(OnCloseUp) then\r\n OnCloseUp(Self);\r\nend;\r\n\r\nprocedure TCustomDropDownControl.DoDropDown;\r\nbegin\r\n if Assigned(OnDropDown) then\r\n OnDropDown(Self);\r\nend;\r\n\r\nfunction TCustomDropDownControl.GetDroppedDown: boolean;\r\nbegin\r\n Result := FDropDown.style.getPropertyValue('display') <> 'none';\r\nend;\r\n\r\nprocedure TCustomDropDownControl.GetMethodPointers;\r\nbegin\r\n inherited;\r\n if FDoClickLayer = nil then\r\n begin\r\n FDoClickLayer := @HandleDoClickLayer;\r\n FDoBtnClick := @HandleDoBtnClick;\r\n end;\r\nend;\r\n\r\nfunction TCustomDropDownControl.GetText: string;\r\nbegin\r\n Result := FText;\r\n\r\n if HasEdit then\r\n begin\r\n asm\r\n Result = this.FTextElement.value;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TCustomDropDownControl.SetButtonImageURL(const Value: string);\r\nbegin\r\n if (FButtonImageURL <> Value) then\r\n begin\r\n FButtonImageURL := Value;\r\n UpdateELement;\r\n end;\r\nend;\r\n\r\nprocedure TCustomDropDownControl.SetControl(const Value: TCustomControl);\r\nbegin\r\n FControl := Value;\r\n if Assigned(FControl) and not (csDesigning in ComponentState) then\r\n FControl.Visible := false;\r\nend;\r\n\r\nprocedure TCustomDropDownControl.SetReadOnly(const Value: Boolean);\r\nbegin\r\n if (FReadOnly <> Value) then\r\n begin\r\n FReadOnly := Value;\r\n UpdateElement;\r\n end;\r\nend;\r\n\r\nprocedure TCustomDropDownControl.SetText(const Value: string);\r\nbegin\r\n FText := Value;\r\n\r\n if HasEdit then\r\n begin\r\n asm\r\n this.FTextElement.value = Value;\r\n end;\r\n end\r\n else\r\n begin\r\n if Value <> '' then\r\n FTextElement.innerHTML := Value\r\n else\r\n FTextElement.innerHTML := ' ';\r\n end;\r\nend;\r\n\r\nprocedure TCustomDropDownControl.ShowDropDown;\r\nvar\r\n dr: TJSDOMRect;\r\n w,h: single;\r\nbegin\r\n if not Assigned(ElementHandle) then\r\n Exit;\r\n\r\n FLayer.style.setProperty('z-index', Application.MaxZIndexStr);\r\n document.body.appendChild(FLayer);\r\n\r\n FLayer.addEventListener('click',FDoClickLayer);\r\n\r\n FLayer.appendChild(FDropDown);\r\n\r\n FDropDown.style.setProperty('display','table');\r\n\r\n if Assigned(Control) then\r\n begin\r\n Control.Left := 0;\r\n Control.Top := 0;\r\n Control.ElementPosition := epRelative;\r\n Control.ElementFont := ElementFont;\r\n Control.Visible := true;\r\n\r\n dr := ElementHandle.getBoundingClientRect;\r\n\r\n FDropDown.style.setProperty('left', dr.Left.ToString + 'px');\r\n FDropDown.style.setProperty('top', dr.Bottom.ToString + 'px');\r\n\r\n dr := Control.ElementHandle.getBoundingClientRect;\r\n\r\n if DropDownWidth > 0 then\r\n w := DropDownWidth\r\n else\r\n begin\r\n if Assigned(Control) then\r\n begin\r\n w := Max(dr.Width, Control.Width);\r\n end\r\n else\r\n w := dr.width;\r\n end;\r\n\r\n if DropDownWidth > 0 then\r\n FDropDown.style.setProperty('width', w.ToString + 'px');\r\n\r\n if DropDownHeight > 0 then\r\n h := DropDownHeight\r\n else\r\n h := Max(dr.Height, Control.Height);\r\n\r\n FDropDown.style.setProperty('height', h.ToString + 'px');\r\n\r\n if DropDownColor <> clNone then\r\n FDropDown.style.setProperty('background-color', ColorToHTML(FDropDownColor));\r\n\r\n FDropDown.appendChild(Control.ElementHandle);\r\n end;\r\n\r\n if DropDownShadow then\r\n TJSHTMLElement(FDropDown).style.setProperty('box-shadow','0px 8px 8px 0px rgba(0,0,0,0.2)');\r\n\r\n DoDropDown;\r\nend;\r\n\r\nprocedure TCustomDropDownControl.ToggleDropDown;\r\nbegin\r\n if FDropDown.style.getPropertyValue('display') = 'none' then\r\n ShowDropDown\r\n else\r\n HideDropDown;\r\nend;\r\n\r\nprocedure TCustomDropDownControl.UnBindEvents;\r\nbegin\r\n inherited;\r\n\r\n if HasEdit and Assigned(FButton) then\r\n FButton.removeEventListener('click',FDoBtnClick);\r\nend;\r\n\r\n{$HINTS OFF}\r\nprocedure TCustomDropDownControl.UpdateElementVisual;\r\nvar\r\n h: integer;\r\n ro: boolean;\r\nbegin\r\n inherited;\r\n\r\n if not HasEdit and (BorderStyle = bsSingle) then\r\n ElementHandle.style.setProperty('border','1px solid silver');\r\n\r\n if HasEdit then\r\n begin\r\n ro := ReadOnly;\r\n asm\r\n this.FTextElement.readOnly = ro;\r\n end;\r\n end;\r\n\r\n ElementHandle.style.removeProperty('overflow');\r\n\r\n h := Height - 1;\r\n\r\n // ElementHandle.style.setProperty('padding','2px');\r\n SetHTMLElementFont(FTextElement, Font, ElementFont = efCSS);\r\n\r\n TJSHTMLElement(FTextElement).style.setProperty('line-height', h.ToString +'px');\r\n TJSHTMLElement(FTextElement).style.setProperty('height', h.ToString +'px');\r\n\r\n TJSHTMLElement(FButton).style.setProperty('height', h.ToString +'px');\r\n TJSHTMLElement(FButton).style.setProperty('line-height', h.ToString +'px');\r\n TJSHTMLElement(FButton).setAttribute('class', FElementButtonClassName);\r\n TJSHTMLElement(FButton).style.setProperty('padding', '0px');\r\n\r\n if FElementButtonClassName <> '' then\r\n TJSHTMLElement(FButton).style.removeProperty('background-color');\r\n\r\n if ButtonImageURL <> '' then\r\n FButton.innerHTML := ''\r\n else\r\n FButton.innerHTML := '';\r\n\r\n if FElementInputClassName <> '' then\r\n FTextElement.classList.add(FElementInputClassName)\r\n else\r\n if FTextElement.classList.contains(FElementInputClassName) then\r\n FTextElement.classList.remove(FElementInputClassName);\r\nend;\r\n{$HINTS ON}\r\n\r\nfunction TCustomDropDownControl.HandleDoBtnClick(Event: TJSMouseEvent): Boolean;\r\nbegin\r\n ToggleDropDown;\r\n Result := true;\r\nend;\r\n\r\nfunction TCustomDropDownControl.HandleDoClickLayer(Event: TJSMouseEvent): Boolean;\r\nbegin\r\n HideDropDown;\r\n Result := true;\r\nend;\r\n\r\nfunction TCustomDropDownControl.HasEdit: boolean;\r\nbegin\r\n Result := false;\r\nend;\r\n\r\nprocedure TCustomDropDownControl.HideDropDown;\r\nbegin\r\n DoCloseUp;\r\n FLayer.removeEventListener('click',FDoClickLayer);\r\n FLayer.parentElement.removeChild(FLayer);\r\n FDropDown.style.setProperty('display','none');\r\n FDropDown.parentElement.removeChild(FDropDown);\r\nend;\r\n\r\n{ TEditDropDownControl }\r\n\r\nfunction TEditDropDownControl.GetEditElement: TJSHTMLElement;\r\nbegin\r\n Result := TJSHTMLElement(FTextElement);\r\nend;\r\n\r\nfunction TEditDropDownControl.GetElementBindHandle: TJSEventTarget;\r\nbegin\r\n Result := TJSHTMLElement(FTextElement);\r\nend;\r\n\r\nfunction TEditDropDownControl.HasEdit: boolean;\r\nbegin\r\n Result := true;\r\nend;\r\n\r\nprocedure TEditDropDownControl.KeyDown(var Key: Word; Shift: TShiftState);\r\nbegin\r\n inherited;\r\n if Key = VK_F4 then\r\n ToggleDropDown;\r\nend;\r\n\r\n{ TEditDropDownTableControl }\r\n\r\nconstructor TEditDropDownTableControl.Create(AOwner: TComponent);\r\nbegin\r\n inherited;\r\nend;\r\n\r\nprocedure TEditDropDownTableControl.CreateInitialize;\r\nbegin\r\n inherited;\r\n FTableControl := CreateTable(Owner);\r\n FTableControl.Visible := false;\r\n FTableControl.Options.ScrollVertical := true;\r\n FTableControl.OnClickCell := TableClickCell;\r\n FTableControl.OnKeyPress := TableKeyPress;\r\n FTableControl.OnKeyDown := TableKeyDown;\r\n FTableControl.WidthStyle := ssAuto;\r\n Control := FTableControl;\r\n\r\n FTableOptions := TTableOptions.Create(FTableControl);\r\nend;\r\n\r\nfunction TEditDropDownTableControl.CreateTable(Aowner: TComponent): TCustomTableControl;\r\nbegin\r\n Result := TWebTableControl.Create(Owner);\r\nend;\r\n\r\ndestructor TEditDropDownTableControl.Destroy;\r\nbegin\r\n FTableControl.Free;\r\n FTableOptions.Free;\r\n inherited;\r\nend;\r\n\r\nfunction TEditDropDownTableControl.GetTableControl: TWebTableControl;\r\nbegin\r\n Result := TWebTableControl(FTableControl);\r\nend;\r\n\r\nprocedure TEditDropDownTableControl.SetParent(AValue: TControl);\r\nbegin\r\n inherited;\r\n if Assigned(FTableControl) and not (csDestroying in ComponentState) then\r\n begin\r\n FTableControl.Parent := AValue;\r\n FTableControl.InitSample(imLinear);\r\n end;\r\nend;\r\n\r\nprocedure TEditDropDownTableControl.SetTableOptions(const Value: TTableOptions);\r\nbegin\r\n FTableOptions.Assign(Value);\r\nend;\r\n\r\nprocedure TEditDropDownTableControl.ShowDropDown;\r\nvar\r\n gc: TGridCoord;\r\nbegin\r\n inherited;\r\n\r\n if DropDownWidth = 0 then\r\n FTableControl.WidthStyle := ssAuto\r\n else\r\n FTableControl.Width := DropDownWidth;\r\n\r\n if DropDownHeight = 0 then\r\n FTableControl.HeightStyle := ssAuto\r\n else\r\n FTableControl.Height := DropDownHeight;\r\n\r\n FTableControl.Options.AutoCellEMail := TableOptions.AutoCellEmail;\r\n FTableControl.Options.AutoCellURL := TableOptions.AutoCellURL;\r\n FTableControl.Options.AutoCellImage := TableOptions.AutoCellImage;\r\n FTableControl.Options.ScrollVertical := TableOptions.ScrollVertical;\r\n FTableControl.Options.ResizeColumns := TableOptions.ResizeColumns;\r\n FTableControl.Options.CellBorders := TableOptions.CellBorders;\r\n FTableControl.Options.CellBorderColor := TableOptions.CellBorderColor;\r\n FTableControl.Options.ImageAlign := TableOptions.ImageAlign;\r\n FTableControl.Options.ImageWidth := TableOptions.ImageWidth;\r\n\r\n FTableControl.ElementClassName := TableOptions.ElementClassName;\r\n FTableControl.ElementFont := TableOptions.ElementFont;\r\n FTableControl.ElementTableClassName := TableOptions.ElementTableClassName;\r\n FTableControl.ElementRowSelectClassName := TableOptions.ElementRowSelectClassName;\r\n FTableControl.ELementHeaderClassName := TableOptions.ElementHeaderClassName;\r\n FTableControl.ElementSelectionClassName := TableOptions.ElementSelectionClassName;\r\n\r\n FTableControl.Paging.Assign(TableOptions.Paging);\r\n FTableControl.Header.Assign(TableOptions.Header);\r\n FTableControl.Footer.Assign(TableOptions.Footer);\r\n\r\n FTableControl.Invalidate;\r\n\r\n gc := FTableControl.FindCell(Text, false, true);\r\n\r\n if (gc.X <> -1)and (gc.Y <> -1) then\r\n begin\r\n FTableControl.RowIndex := gc.Y;\r\n end;\r\n\r\n FTableControl.SetFocus;\r\nend;\r\n\r\nprocedure TEditDropDownTableControl.TableClickCell(Sender: TObject; ACol,\r\n ARow: integer);\r\nbegin\r\n Text := FTableControl.Cells[EditColumn, ARow];\r\n HideDropDown;\r\n EditElement.focus;\r\nend;\r\n\r\nprocedure TEditDropDownTableControl.TableKeyDown(Sender: TObject;\r\n var AKey: Word; Shift: TShiftState);\r\nbegin\r\n if AKey = VK_F4 then\r\n begin\r\n HideDropDown;\r\n EditElement.focus;\r\n end;\r\nend;\r\n\r\nprocedure TEditDropDownTableControl.TableKeyPress(Sender: TObject;\r\n var AChar: Char);\r\nbegin\r\n if AChar = #13 then\r\n begin\r\n TableClickCell(FTableControl, EditColumn, FTableControl.RowIndex);\r\n end;\r\nend;\r\n\r\n{ TTableOptions }\r\n\r\nprocedure TTableOptions.Assign(Source: TPersistent);\r\nbegin\r\n if (Source is TTableOptions) then\r\n begin\r\n FAutoCellURL := (Source as TTableOptions).AutoCellURL;\r\n FAutoCellImage := (Source as TTableOptions).AutoCellImage;\r\n FAutoCellEmail := (Source as TTableOptions).AutoCellEmail;\r\n FElementClassName := (Source as TTableOptions).ElementClassName;\r\n FElementFont := (Source as TTableOptions).ElementFont;\r\n FElementHeaderClassName := (Source as TTableOptions).ElementHeaderClassName;\r\n FElementRowSelectClassName := (Source as TTableOptions).ElementRowSelectClassName;\r\n FElementSelectionClassName := (Source as TTableOptions).ElementSelectionClassName;\r\n FElementTableClassName := (Source as TTableOptions).ElementTableClassName;\r\n FHeader.Assign((Source as TTableOptions).Header);\r\n FFooter.Assign((Source as TTableOptions).Footer);\r\n FPaging.Assign((Source as TTableOptions).Paging);\r\n FResizeColumns := (Source as TTableOptions).ResizeColumns;\r\n FColHeader := (Source as TTableOptions).ColHeader;\r\n FRowHeader := (Source as TTableOptions).RowHeader;\r\n FScrollVertical := (Source as TTableOptions).ScrollVertical;\r\n FSelectionColor := (Source as TTableOptions).SelectionColor;\r\n FSelectionTextColor := (Source as TTableOptions).SelectionTextColor;\r\n FCellBorders := (Source as TTableOptions).CellBorders;\r\n FCellBorderColor := (Source as TTableOptions).CellBorderColor;\r\n FImageWidth := (Source as TTableOptions).ImageWidth;\r\n FImageAlign := (Source as TTableOptions).ImageAlign;\r\n end;\r\nend;\r\n\r\nconstructor TTableOptions.Create(AOwner: TComponent);\r\nbegin\r\n FOwner := AOwner;\r\n FHeader := TTableControlHeader.Create(AOwner as TCustomTableControl);\r\n FFooter := TTableControlHeader.Create(AOwner as TCustomTableControl);\r\n FPaging := TTableControlPaging.Create(AOwner as TCustomTableControl);\r\n FRowHeader := true;\r\n FColHeader := true;\r\n FSelectionTextColor := clWhite;\r\n FSelectionColor := $00FF8F5B;\r\n FCellBorderColor := clSilver;\r\nend;\r\n\r\ndestructor TTableOptions.Destroy;\r\nbegin\r\n FPaging.Free;\r\n FHeader.Free;\r\n FFooter.Free;\r\n inherited;\r\nend;\r\n\r\nprocedure TTableOptions.SetFooter(const Value: TTableControlHeader);\r\nbegin\r\n FFooter.Assign(Value);\r\nend;\r\n\r\nprocedure TTableOptions.SetHeader(const Value: TTableControlHeader);\r\nbegin\r\n FHeader.Assign(Value);\r\nend;\r\n\r\nprocedure TTableOptions.SetPaging(const Value: TTableControlPaging);\r\nbegin\r\n FPaging.Assign(Value);\r\nend;\r\n\r\nend.\r\n","{********************************************************************}\r\n{ }\r\n{ written by TMS Software }\r\n{ copyright (c) 2018 - 2025 }\r\n{ Email : info@tmssoftware.com }\r\n{ Web : http://www.tmssoftware.com }\r\n{ }\r\n{ The source code is given as is. The author is not responsible }\r\n{ for any possible damage done due to the use of this code. }\r\n{ The complete source code remains property of the author and may }\r\n{ not be distributed, published, given or sold in any form as such. }\r\n{ No parts of the source code can be included in any other component }\r\n{ or application without written authorization of the author. }\r\n{********************************************************************}\r\n\r\nunit WEBLib.DBCtrls;\r\n\r\n{$DEFINE NOPP}\r\n\r\ninterface\r\n\r\nuses\r\n Classes, DB, SysUtils, WEBLib.Controls, WEBLib.StdCtrls, WEBLib.ExtCtrls,\r\n WEBLib.Buttons, WEBLib.Grids, WEBLib.Mask, WEBLib.EditAutoComplete, Web,\r\n WEBLib.REST, WEBLib.Lists, WEBLib.DropDown, WEBLib.Graphics;\r\n\r\ntype\r\n TWebLinkType = (wlHttp, wlMail, wlHttps, wlFTP);\r\n\r\n TNavigateBtn = (nbFirst, nbPrior, nbNext, nbLast,\r\n nbInsert, nbDelete, nbEdit, nbPost, nbCancel);\r\n\r\n TNavButtonSet = set of TNavigateBtn;\r\n\r\n TDataField = type string;\r\n\r\n TFieldDataLink = class(TDataLink)\r\n private\r\n FOnDataChange: TNotifyEvent;\r\n FOnUpdateData: TNotifyEvent;\r\n FOnActiveChange: TNotifyEvent;\r\n FField: TField;\r\n FFieldName: string;\r\n FModified: boolean;\r\n FOnEditingChanged: TNotifyEvent;\r\n protected\r\n procedure UpdateField;\r\n procedure ActiveChanged; override;\r\n //procedure DataEvent(Event: TDataEvent; Info: NativeInt); override;\r\n procedure EditingChanged; override;\r\n procedure RecordChanged(Field: TField); override;\r\n procedure UpdateData; override;\r\n public\r\n property Field: TField read FField write FField;\r\n procedure Modified;\r\n published\r\n property FieldName: string read FFieldName write FFieldName;\r\n property OnDataChange: TNotifyEvent read FOnDataChange write FOnDataChange;\r\n property OnUpdateData: TNotifyEvent read FOnUpdateData write FOnUpdateData;\r\n property OnActiveChange: TNotifyEvent read FOnActiveChange write FOnActiveChange;\r\n property OnEditingChanged: TNotifyEvent read FOnEditingChanged write FOnEditingChanged;\r\n end;\r\n\r\n TDataScrollEvent = procedure(Sender: TObject; Distance: integer) of object;\r\n\r\n TDBDataLink = class(TDataLink)\r\n private\r\n FOnActiveChange: TNotifyEvent;\r\n FOnDataChange: TNotifyEvent;\r\n FOnRecordChange: TNotifyEvent;\r\n FOnUpdateData: TNotifyEvent;\r\n FOnDataScroll: TDataScrollEvent;\r\n FFieldName: string;\r\n protected\r\n procedure DataSetChanged; override;\r\n procedure ActiveChanged; override;\r\n procedure RecordChanged(Field: TField); override;\r\n procedure DataSetScrolled(Distance: Longint); override;\r\n procedure UpdateData; override;\r\n public\r\n property FieldName: string read FFieldName write FFieldName;\r\n published\r\n property OnRecordChange: TNotifyEvent read FOnRecordChange write FOnRecordChange;\r\n property OnDataChange: TNotifyEvent read FOnDataChange write FOnDataChange;\r\n property OnDataScroll: TDataScrollEvent read FOnDataScroll write FOnDataScroll;\r\n property OnActiveChange: TNotifyEvent read FOnActiveChange write FOnActiveChange;\r\n property OnUpdateData: TNotifyEvent read FOnUpdateData write FOnUpdateData;\r\n end;\r\n\r\n TDBEditValidateEvent = procedure(Sender: TObject; var AValue: string; var Valid: boolean) of object;\r\n\r\n TDBEdit = class(TEdit)\r\n private\r\n FDataLink: TFieldDataLink;\r\n FEditChange: boolean;\r\n FOnValidate: TDBEditValidateEvent;\r\n protected\r\n procedure SetDataField(const Value: TDataField);\r\n procedure SetDataSource(const Value: TDataSource);\r\n function GetDataSource: TDataSource;\r\n function GetDataField: TDataField;\r\n procedure DataUpdate(Sender: TObject);\r\n procedure DataChange(Sender: TObject);\r\n procedure ActiveChange(Sender: TObject);\r\n function CheckDataSet: boolean; virtual;\r\n function EditCanModify: Boolean; virtual;\r\n function IsReadOnly: boolean; override;\r\n function IsEnabled: boolean; override;\r\n function GetDisplayText: string; override;\r\n procedure KeyDown(var Key: Word; Shift: TShiftState); override;\r\n procedure KeyPress(var Key: Char); override;\r\n procedure DoExit; override;\r\n function CanPaste(AValue: string): boolean; override;\r\n function CanCut: boolean; override;\r\n public\r\n procedure CreateInitialize; override;\r\n destructor Destroy; override;\r\n procedure Change; override;\r\n published\r\n property DataField: TDataField read GetDataField write SetDataField;\r\n property DataSource: TDataSource read GetDataSource write SetDataSource;\r\n property OnValidate: TDBEditValidateEvent read FOnValidate write FOnValidate;\r\n end;\r\n\r\n TWebDBEdit = class(TDBEdit);\r\n\r\n TDBEditBtn = class(TEditBtn)\r\n private\r\n FDataLink: TFieldDataLink;\r\n FEditChange: boolean;\r\n protected\r\n procedure SetDataField(const Value: TDataField);\r\n procedure SetDataSource(const Value: TDataSource);\r\n function GetDataSource: TDataSource;\r\n function GetDataField: TDataField;\r\n procedure DataUpdate(Sender: TObject);\r\n procedure DataChange(Sender: TObject);\r\n procedure ActiveChange(Sender: TObject);\r\n function CheckDataSet: boolean; virtual;\r\n function EditCanModify: Boolean; virtual;\r\n function IsReadOnly: boolean; override;\r\n function IsEnabled: boolean; override;\r\n function GetDisplayText: string; override;\r\n procedure KeyDown(var Key: Word; Shift: TShiftState); override;\r\n procedure KeyPress(var Key: Char); override;\r\n procedure DoExit; override;\r\n function CanPaste(AValue: string): boolean; override;\r\n function CanCut: boolean; override;\r\n public\r\n procedure CreateInitialize; override;\r\n destructor Destroy; override;\r\n procedure Change; override;\r\n published\r\n property DataField: TDataField read GetDataField write SetDataField;\r\n property DataSource: TDataSource read GetDataSource write SetDataSource;\r\n end;\r\n\r\n TWebDBEditBtn = class(TDBEditBtn);\r\n\r\n TDBMaskEdit = class(TMaskEdit)\r\n private\r\n FDataLink: TFieldDataLink;\r\n FEditChange: boolean;\r\n FFieldText: string;\r\n function GetDataField: TDataField;\r\n function GetDataSource: TDataSource;\r\n procedure SetDataField(const Value: TDataField);\r\n procedure SetDataSource(const Value: TDataSource);\r\n protected\r\n procedure DataUpdate(Sender: TObject);\r\n procedure DataChange(Sender: TObject);\r\n procedure ActiveChange(Sender: TObject);\r\n function CheckDataSet: boolean; virtual;\r\n function EditCanModify: Boolean; override;\r\n function IsReadOnly: boolean; override;\r\n function IsEnabled: boolean; override;\r\n function GetDisplayText: string; override;\r\n procedure KeyDown(var Key: Word; Shift: TShiftState); override;\r\n procedure KeyPress(var Key: Char); override;\r\n procedure DoExit; override;\r\n function CanPaste(AValue: string): boolean; override;\r\n function CanCut: boolean; override;\r\n public\r\n procedure CreateInitialize; override;\r\n destructor Destroy; override;\r\n procedure Change; override;\r\n published\r\n property DataField: TDataField read GetDataField write SetDataField;\r\n property DataSource: TDataSource read GetDataSource write SetDataSource;\r\n end;\r\n\r\n TWebDBMaskEdit = class(TDBMaskEdit);\r\n\r\n\r\n TDBLabel = class(TLabel)\r\n private\r\n FDataLink: TFieldDataLink;\r\n protected\r\n procedure SetDataField(const Value: TDataField);\r\n procedure SetDataSource(const Value: TDataSource);\r\n function GetDataSource: TDataSource;\r\n function GetDataField: TDataField;\r\n function CheckDataSet: boolean; virtual;\r\n function GetDisplayText: string; override;\r\n procedure DataUpdate(Sender: TObject);\r\n procedure DataChange(Sender: TObject);\r\n procedure ActiveChange(Sender: TObject);\r\n public\r\n procedure CreateInitialize; override;\r\n destructor Destroy; override;\r\n published\r\n property DataField: TDataField read GetDataField write SetDataField;\r\n property DataSource: TDataSource read GetDataSource write SetDataSource;\r\n end;\r\n\r\n TWebDBLabel = class(TDBLabel);\r\n\r\n TDBSpinEdit = class(TSpinEdit)\r\n private\r\n FDataLink: TFieldDataLink;\r\n FEditChange: boolean;\r\n protected\r\n procedure SetDataField(const Value: TDataField);\r\n procedure SetDataSource(const Value: TDataSource);\r\n function GetDataSource: TDataSource;\r\n function GetDataField: TDataField;\r\n procedure DataUpdate(Sender: TObject);\r\n procedure DataChange(Sender: TObject);\r\n procedure ActiveChange(Sender: TObject);\r\n function EditCanModify: Boolean; virtual;\r\n function IsReadOnly: boolean; override;\r\n function IsEnabled: boolean; override;\r\n function CheckDataSet: boolean; virtual;\r\n function GetDisplayText: string; override;\r\n procedure KeyDown(var Key: Word; Shift: TShiftState); override;\r\n procedure KeyPress(var Key: Char); override;\r\n procedure Change; override;\r\n procedure DoExit; override;\r\n public\r\n procedure CreateInitialize; override;\r\n destructor Destroy; override;\r\n published\r\n property DataField: TDataField read GetDataField write SetDataField;\r\n property DataSource: TDataSource read GetDataSource write SetDataSource;\r\n end;\r\n\r\n TWebDBSpinEdit = class(TDBSpinEdit);\r\n\r\n TDBCheckBox = class(TCheckBox)\r\n private\r\n FDataLink: TFieldDataLink;\r\n FEditChange: boolean;\r\n FValueChecked: string;\r\n FValueUnChecked: string;\r\n protected\r\n procedure SetDataField(const Value: TDataField);\r\n procedure SetDataSource(const Value: TDataSource);\r\n function GetDataSource: TDataSource;\r\n function GetDataField: TDataField;\r\n function CheckDataSet: boolean; virtual;\r\n function EditCanModify: Boolean; virtual;\r\n procedure DataUpdate(Sender: TObject);\r\n procedure DataChange(Sender: TObject);\r\n procedure ActiveChange(Sender: TObject);\r\n procedure EditingChanged(Sender: TObject);\r\n function IsEnabled: boolean; override;\r\n procedure Click; override;\r\n public\r\n procedure CreateInitialize; override;\r\n destructor Destroy; override;\r\n published\r\n property DataField: TDataField read GetDataField write SetDataField;\r\n property DataSource: TDataSource read GetDataSource write SetDataSource;\r\n property ValueChecked: string read FValueChecked write FValueChecked;\r\n property ValueUnChecked: string read FValueUnChecked write FValueUnChecked;\r\n end;\r\n\r\n TWebDBCheckBox = class(TDBCheckBox);\r\n\r\n TDBDateTimePicker = class(TDateTimePicker)\r\n private\r\n FDataLink: TFieldDataLink;\r\n FEditChange: boolean;\r\n protected\r\n procedure SetDataField(const Value: TDataField);\r\n procedure SetDataSource(const Value: TDataSource);\r\n function GetDataSource: TDataSource;\r\n function GetDataField: TDataField;\r\n function CheckDataSet: boolean; virtual;\r\n function EditCanModify: Boolean; virtual;\r\n procedure KeyDown(var Key: Word; Shift: TShiftState); override;\r\n procedure KeyPress(var Key: Char); override;\r\n procedure DataUpdate(Sender: TObject);\r\n procedure DataChange(Sender: TObject);\r\n procedure ActiveChange(Sender: TObject);\r\n procedure Change; override;\r\n function IsReadOnly: boolean; override;\r\n function IsEnabled: boolean; override;\r\n procedure DoExit; override;\r\n public\r\n procedure CreateInitialize; override;\r\n destructor Destroy; override;\r\n published\r\n property DataField: TDataField read GetDataField write SetDataField;\r\n property DataSource: TDataSource read GetDataSource write SetDataSource;\r\n end;\r\n\r\n TWebDBDateTimePicker = class(TDBDateTimePicker);\r\n\r\n\r\n TDBEditDropDownControl = class(TEditDropDownControl)\r\n private\r\n FDataLink: TFieldDataLink;\r\n FEditChange: boolean;\r\n protected\r\n procedure SetDataField(const Value: TDataField);\r\n procedure SetDataSource(const Value: TDataSource);\r\n function GetDataSource: TDataSource;\r\n function GetDataField: TDataField;\r\n procedure DataUpdate(Sender: TObject);\r\n procedure DataChange(Sender: TObject);\r\n procedure ActiveChange(Sender: TObject);\r\n function CheckDataSet: boolean; virtual;\r\n function EditCanModify: Boolean; virtual;\r\n function IsReadOnly: boolean;\r\n function IsEnabled: boolean; override;\r\n// function GetDisplayText: string; override;\r\n procedure KeyDown(var Key: Word; Shift: TShiftState); override;\r\n procedure KeyPress(var Key: Char); override;\r\n procedure DoExit; override;\r\n// function CanPaste(AValue: string): boolean; override;\r\n// function CanCut: boolean; override;\r\n public\r\n procedure CreateInitialize; override;\r\n destructor Destroy; override;\r\n// procedure Change; override;\r\n published\r\n property DataField: TDataField read GetDataField write SetDataField;\r\n property DataSource: TDataSource read GetDataSource write SetDataSource;\r\n end;\r\n\r\n TWebDBEditDropDownControl = class(TDBEditDropDownControl);\r\n\r\n\r\n TDBComboBox = class(TComboBox)\r\n private\r\n FDataLink: TFieldDataLink;\r\n FListLink: TFieldDataLink;\r\n FEditChange: boolean;\r\n FListChange: boolean;\r\n FListSync: boolean;\r\n procedure SetListField(const Value: string);\r\n procedure SetListSource(const Value: TDataSource);\r\n function GetListField: string;\r\n function GetListSource: TDataSource;\r\n protected\r\n procedure SetDataField(const Value: TDataField);\r\n procedure SetDataSource(const Value: TDataSource);\r\n function GetDataSource: TDataSource;\r\n function GetDataField: TDataField;\r\n function EditCanModify: Boolean; virtual;\r\n function CheckDataSet: boolean; virtual;\r\n procedure DataUpdate(Sender: TObject);\r\n procedure DataChange(Sender: TObject);\r\n procedure ActiveChange(Sender: TObject);\r\n procedure ListActiveChange(Sender: TObject);\r\n procedure ListDataChange(Sender: TObject);\r\n procedure Change; override;\r\n function IsEnabled: boolean; override;\r\n procedure DoExit; override;\r\n public\r\n procedure CreateInitialize; override;\r\n destructor Destroy; override;\r\n published\r\n property DataField: TDataField read GetDataField write SetDataField;\r\n property DataSource: TDataSource read GetDataSource write SetDataSource;\r\n property ListField: string read GetListField write SetListField;\r\n property ListSource: TDataSource read GetListSource write SetListSource;\r\n property ListSync: boolean read FListSync write FListSync default false;\r\n end;\r\n\r\n TWebDBComboBox = class(TDBComboBox);\r\n\r\n TDBLookupComboBox = class(TCustomLookupComboBox)\r\n private\r\n FDataLink: TFieldDataLink;\r\n FListLink: TFieldDataLink;\r\n FEditChange: boolean;\r\n FKeyField: TDataField;\r\n FListChanging: boolean;\r\n FFieldValue: string;\r\n FBlockChange: boolean;\r\n function GetListField: TDataField;\r\n function GetListSource: TDataSource;\r\n procedure SetListField(const Value: TDataField);\r\n procedure SetListSource(const Value: TDataSource);\r\n procedure SetDataField(const Value: TDataField);\r\n procedure SetDataSource(const Value: TDataSource);\r\n function GetDataSource: TDataSource;\r\n function GetDataField: TDataField;\r\n procedure SetKeyField(const Value: TDataField);\r\n protected\r\n procedure SetValue(const Value: string); override;\r\n procedure LoadListSource;\r\n function CheckDataSet: boolean; virtual;\r\n function CheckListDataSet: boolean; virtual;\r\n function EditCanModify: Boolean; virtual;\r\n procedure DataUpdate(Sender: TObject);\r\n procedure DataChange(Sender: TObject);\r\n procedure ActiveChange(Sender: TObject);\r\n procedure ListDataChange(Sender: TObject);\r\n procedure ListActiveChange(Sender: TObject);\r\n procedure Change; override;\r\n function IsEnabled: boolean; override;\r\n procedure DoExit; override;\r\n procedure SyncListSource; virtual;\r\n public\r\n procedure CreateInitialize; override;\r\n destructor Destroy; override;\r\n published\r\n property DataField: TDataField read GetDataField write SetDataField;\r\n property DataSource: TDataSource read GetDataSource write SetDataSource;\r\n property KeyField: TDataField read FKeyField write SetKeyField;\r\n property ListField: TDataField read GetListField write SetListField;\r\n property ListSource: TDataSource read GetListSource write SetListSource;\r\n end;\r\n\r\n TWebDBLookupComboBox = class(TDBLookupComboBox);\r\n\r\n TDBEditAutoComplete = class(TEditAutoComplete)\r\n private\r\n FDataLink: TFieldDataLink;\r\n FEditChange: boolean;\r\n protected\r\n procedure SetDataField(const Value: TDataField);\r\n procedure SetDataSource(const Value: TDataSource);\r\n function GetDataSource: TDataSource;\r\n function GetDataField: TDataField;\r\n function EditCanModify: Boolean; virtual;\r\n function CheckDataSet: boolean; virtual;\r\n procedure DataUpdate(Sender: TObject);\r\n procedure DataChange(Sender: TObject);\r\n procedure ActiveChange(Sender: TObject);\r\n procedure KeyDown(var Key: Word; Shift: TShiftState); override;\r\n procedure KeyPress(var Key: Char); override;\r\n procedure DoExit; override;\r\n public\r\n procedure CreateInitialize; override;\r\n destructor Destroy; override;\r\n procedure Change; override;\r\n published\r\n property DataField: TDataField read GetDataField write SetDataField;\r\n property DataSource: TDataSource read GetDataSource write SetDataSource;\r\n end;\r\n\r\n TWebDBEditAutoComplete = class(TDBEditAutoComplete);\r\n\r\n\r\n TDBRadioGroup = class(TRadioGroup)\r\n private\r\n FDataLink: TFieldDataLink;\r\n FEditChange: boolean;\r\n FValues: TStringList;\r\n protected\r\n procedure SetValues(const Value: TStringList);\r\n procedure SetDataField(const Value: TDataField);\r\n procedure SetDataSource(const Value: TDataSource);\r\n function GetDataSource: TDataSource;\r\n function GetDataField: TDataField;\r\n function CheckDataSet: boolean; virtual;\r\n function EditCanModify: Boolean; virtual;\r\n procedure DataUpdate(Sender: TObject);\r\n procedure DataChange(Sender: TObject);\r\n procedure ActiveChange(Sender: TObject);\r\n procedure Click; override;\r\n function IsEnabled: boolean; override;\r\n public\r\n procedure CreateInitialize; override;\r\n destructor Destroy; override;\r\n published\r\n property DataField: TDataField read GetDataField write SetDataField;\r\n property DataSource: TDataSource read GetDataSource write SetDataSource;\r\n property Values: TStringList read FValues write SetValues;\r\n end;\r\n\r\n TWebDBRadioGroup = class(TDBRadioGroup);\r\n\r\n TDBLinkLabel = class(TCustomLinkLabel)\r\n private\r\n FDataLink: TFieldDataLink;\r\n FEditChange: boolean;\r\n FLinkType: TWebLinkType;\r\n protected\r\n procedure SetDataField(const Value: TDataField);\r\n procedure SetDataSource(const Value: TDataSource);\r\n function GetDataSource: TDataSource;\r\n function GetDataField: TDataField;\r\n function CheckDataSet: boolean; virtual;\r\n function GetDisplayText: string; override;\r\n function EditCanModify: Boolean; virtual;\r\n procedure DataUpdate(Sender: TObject);\r\n procedure DataChange(Sender: TObject);\r\n procedure ActiveChange(Sender: TObject);\r\n procedure Click; override;\r\n public\r\n procedure CreateInitialize; override;\r\n destructor Destroy; override;\r\n published\r\n property DataField: TDataField read GetDataField write SetDataField;\r\n property DataSource: TDataSource read GetDataSource write SetDataSource;\r\n property LinkType: TWebLinkType read FLinkType write FLinkType;\r\n property ParentFont;\r\n end;\r\n\r\n TWebDBLinkLabel = class(TDBLinkLabel);\r\n\r\n TDBMemo = class(TMemo)\r\n private\r\n FDataLink: TFieldDataLink;\r\n FEditChange: boolean;\r\n protected\r\n procedure SetDataField(const Value: TDataField);\r\n procedure SetDataSource(const Value: TDataSource);\r\n function GetDataSource: TDataSource;\r\n function GetDataField: TDataField;\r\n function EditCanModify: Boolean; virtual;\r\n function IsReadOnly: boolean; override;\r\n function IsEnabled: boolean; override;\r\n function CheckDataSet: boolean; virtual;\r\n function GetDisplayText: string; override;\r\n procedure DataUpdate(Sender: TObject);\r\n procedure DataChange(Sender: TObject);\r\n procedure ActiveChange(Sender: TObject);\r\n procedure KeyDown(var Key: Word; Shift: TShiftState); override;\r\n procedure KeyPress(var Key: Char); override;\r\n function CanPaste(AValue: string): boolean; override;\r\n function CanCut: boolean; override;\r\n procedure DoExit; override;\r\n procedure Change; override;\r\n public\r\n procedure CreateInitialize; override;\r\n destructor Destroy; override;\r\n published\r\n property DataField: TDataField read GetDataField write SetDataField;\r\n property DataSource: TDataSource read GetDataSource write SetDataSource;\r\n end;\r\n\r\n TWebDBMemo = class(TDBMemo);\r\n\r\n TSetURLEvent = procedure(Sender: TObject; var AURL: string) of object;\r\n\r\n TDBImageControl = class(TCustomImageControl)\r\n private\r\n FDataLink: TFieldDataLink;\r\n FOnSetURL: TSetURLEvent;\r\n FBaseURL: string;\r\n function GetDataField: TDataField;\r\n function GetDataSource: TDataSource;\r\n procedure SetDataField(const Value: TDataField);\r\n procedure SetDataSource(const Value: TDataSource);\r\n protected\r\n procedure DataChange(Sender: TObject);\r\n procedure ActiveChange(Sender: TObject);\r\n public\r\n procedure CreateInitialize; override;\r\n destructor Destroy; override;\r\n published\r\n property BaseURL: string read FBaseURL write FBaseURL;\r\n property DataField: TDataField read GetDataField write SetDataField;\r\n property DataSource: TDataSource read GetDataSource write SetDataSource;\r\n property OnSetURL: TSetURLEvent read FOnSetURL write FOnSetURL;\r\n end;\r\n\r\n TWebDBImageControl = class(TDBImageControl);\r\n\r\n TDBNavigator = class(TToolBar)\r\n private\r\n FDataLink: TFieldDataLink;\r\n FFirstBtn: TSpeedButton;\r\n FPriorBtn: TSpeedButton;\r\n FNextBtn: TSpeedButton;\r\n FLastBtn: TSpeedButton;\r\n FEditBtn: TSpeedButton;\r\n FPostBtn: TSpeedButton;\r\n FInsertBtn: TSpeedButton;\r\n FDeleteBtn: TSpeedButton;\r\n FCancelBtn: TSpeedButton;\r\n FVisibleButtons: TNavButtonSet;\r\n FHints: TStringList;\r\n FImages: TStringList;\r\n FBtnID: string;\r\n FOnDelete: TNotifyEvent;\r\n FOnInsert: TNotifyEvent;\r\n FOnPost: TNotifyEvent;\r\n FOnFirst: TNotifyEvent;\r\n FOnEdit: TNotifyEvent;\r\n FOnNext: TNotifyEvent;\r\n FOnLast: TNotifyEvent;\r\n FOnPrior: TNotifyEvent;\r\n FMaterialGlyphColor: TColor;\r\n procedure SetVisibleButtons(const Value: TNavButtonSet);\r\n procedure SetHints(const Value: TStringList);\r\n procedure SetImages(const Value: TStringList);\r\n procedure SetMaterialGlyphColor(const Value: TColor);\r\n protected\r\n procedure UpdateButtons;\r\n procedure DataChange(Sender: TObject);\r\n procedure ActiveChange(Sender: TObject);\r\n procedure SetDataSource(const Value: TDataSource);\r\n function GetDataSource: TDataSource;\r\n procedure CreateButton(var btn: TSpeedButton; BtnID, Glyph: string; Index: integer);\r\n procedure UpdateImage(btn: TSpeedButton; Glyph: string; Index: integer);\r\n procedure HandleSpeedButtonClick(Sender: TObject); virtual;\r\n procedure HandleSpeedButtonMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X,Y: Integer); virtual;\r\n procedure UpdateElement; override;\r\n procedure Loaded; override;\r\n procedure GetChildren(Proc: TGetChildProc; Root: TComponent); override;\r\n procedure SetEnabled(Value: Boolean); override;\r\n procedure DoPost; virtual;\r\n procedure DoDelete; virtual;\r\n procedure DoInsert; virtual;\r\n procedure DoFirst; virtual;\r\n procedure DoLast; virtual;\r\n procedure DoEdit; virtual;\r\n procedure DoNext; virtual;\r\n procedure DoPrior; virtual;\r\n public\r\n procedure CreateInitialize; override;\r\n destructor Destroy; override;\r\n published\r\n property Enabled;\r\n property Hints: TStringList read FHints write SetHints;\r\n property Images: TStringList read FImages write SetImages;\r\n property MaterialGlyphColor: TColor read FMaterialGlyphColor write SetMaterialGlyphColor default clNone;\r\n property DataSource: TDataSource read GetDataSource write SetDataSource;\r\n property VisibleButtons: TNavButtonSet read FVisibleButtons write SetVisibleButtons;\r\n property OnDelete: TNotifyEvent read FOnDelete write FOnDelete;\r\n property OnEdit: TNotifyEvent read FOnEdit write FOnEdit;\r\n property OnFirst: TNotifyEvent read FOnFirst write FOnFirst;\r\n property OnInsert: TNotifyEvent read FOnInsert write FOnInsert;\r\n property OnLast: TNotifyEvent read FOnLast write FOnLast;\r\n property OnNext: TNotifyEvent read FOnNext write FOnNext;\r\n property OnPost: TNotifyEvent read FOnPost write FOnPost;\r\n property OnPrior: TNotifyEvent read FOnPrior write FOnPrior;\r\n end;\r\n\r\n TWebDBNavigator = class(TDBNavigator);\r\n\r\n TListItemFieldValueEvent = procedure(Sender: TObject; Index: integer; AFieldName: string; var AValue: string) of object;\r\n\r\n TDBListControl = class(TListControl)\r\n private\r\n FDataLink: TDBDataLink;\r\n FListLink: TDBDataLink;\r\n FItemTemplate: string;\r\n FOnListItemGetFieldValue: TListItemFieldValueEvent;\r\n function GetDataSource: TDataSource;\r\n function GetListSource: TDataSource;\r\n procedure SetDataField(const Value: TDataField);\r\n procedure SetDataSource(const Value: TDataSource);\r\n procedure SetListField(const Value: TDataField);\r\n procedure SetListSource(const Value: TDataSource);\r\n procedure SetItemTemplate(const Value: string);\r\n function GetDataField: TDataField;\r\n function GetListField: TDataField;\r\n protected\r\n procedure RecordChange(Sender: TObject);\r\n procedure DataUpdate(Sender: TObject);\r\n procedure DataChange(Sender: TObject);\r\n procedure ActiveChange(Sender: TObject);\r\n procedure ListActiveChange(Sender: TObject);\r\n procedure DoItemGetFieldValue(Index: integer; AFieldName: string; var AValue: string); virtual;\r\n public\r\n procedure CreateInitialize; override;\r\n destructor Destroy; override;\r\n\r\n property DataField: TDataField read GetDataField write SetDataField;\r\n property DataSource: TDataSource read GetDataSource write SetDataSource;\r\n property ItemTemplate: string read FItemTemplate write SetItemTemplate;\r\n property ListField: TDataField read GetListField write SetListField;\r\n property ListSource: TDataSource read GetListSource write SetListSource;\r\n property OnListItemGetFieldValue: TListItemFieldValueEvent read FOnListItemGetFieldValue write FOnListItemGetFieldValue;\r\n end;\r\n\r\n TWebDBListControl = class(TDBListControl);\r\n\r\n TColumnDataType = (cdText, cdImage, cdLink, cdCheck, cdRadio, cdExternalLink, cdMemo);\r\n\r\n TDBTableControl = class;\r\n\r\n TTableControlColumn = class(TCollectionItem)\r\n private\r\n FDataField: TDataField;\r\n FTitle: string;\r\n FDataType: TColumnDataType;\r\n FClassName: string;\r\n FTitleClassName: string;\r\n FTag: integer;\r\n FWidth: integer;\r\n procedure SetDataField(const Value: TDataField);\r\n procedure SetTitle(const Value: string);\r\n procedure SetWidth(const Value: integer);\r\n public\r\n procedure Assign(Source: TPersistent); override;\r\n published\r\n property ElementClassName: string read FClassName write FClassName;\r\n property DataField: TDataField read FDataField write SetDataField;\r\n property Title: string read FTitle write SetTitle;\r\n property TitleElementClassName: string read FTitleClassName write FTitleClassName;\r\n property DataType: TColumnDataType read FDataType write FDataType;\r\n property Tag: integer read FTag write FTag default 0;\r\n property Width: integer read FWidth write SetWidth default 0;\r\n end;\r\n\r\n TTableControlColumns = class(TOwnedCollection)\r\n private\r\n FOnChange: TNotifyEvent;\r\n function GetItem(Index: integer): TTableControlColumn; reintroduce;\r\n procedure SetItem(Index: integer; const Value: TTableControlColumn); reintroduce;\r\n protected\r\n procedure Changed; virtual; reintroduce;\r\n procedure Update(Item: TCollectionItem); override;\r\n public\r\n constructor Create(AOwner: TComponent); reintroduce;\r\n function Add: TTableControlColumn; reintroduce;\r\n function Insert(Index: integer): TTableControlColumn; reintroduce;\r\n property Items[Index: integer]: TTableControlColumn read GetItem write SetItem; default;\r\n property OnChange: TNotifyEvent read FOnChange write FOnChange;\r\n end;\r\n\r\n TDBTableControl = class(TCustomTableControl)\r\n private\r\n FDefaultFields: boolean;\r\n FDataLink: TDBDataLink;\r\n FColumns: TTableControlColumns;\r\n FDataChanging: boolean;\r\n procedure SetColumns(const Value: TTableControlColumns);\r\n protected\r\n procedure LoadData; virtual;\r\n procedure LoadRow(ARow: integer); virtual;\r\n procedure DataChange(Sender: TObject);\r\n procedure RecordChange(Sender: TObject);\r\n procedure ActiveChange(Sender: TObject);\r\n procedure SetDataSource(const Value: TDataSource);\r\n function GetDataSource: TDataSource;\r\n procedure Loaded; override;\r\n public\r\n procedure CreateInitialize; override;\r\n destructor Destroy; override;\r\n published\r\n property Columns: TTableControlColumns read FColumns write SetColumns;\r\n property DataSource: TDataSource read GetDataSource write SetDataSource;\r\n property ElementFont;\r\n property ElementClassName;\r\n property ElementId;\r\n property ElementPosition;\r\n end;\r\n\r\n TWebDBTableControl = class(TDBTableControl);\r\n\r\n TDBEditDropDownTableControl = class(TEditDropDownTableControl)\r\n private\r\n FDataLink: TFieldDataLink;\r\n FEditChange: boolean;\r\n\r\n function GetTableSource: TDataSource;\r\n procedure SetTableSource(const Value: TDataSource);\r\n function GetDBTableControl: TDBTableControl;\r\n function GetDataField: TDataField;\r\n function GetDataSource: TDataSource;\r\n procedure SetDataField(const Value: TDataField);\r\n procedure SetDataSource(const Value: TDataSource);\r\n protected\r\n function CreateTable(Aowner: TComponent): TCustomTableControl; override;\r\n\r\n procedure DataUpdate(Sender: TObject);\r\n procedure DataChange(Sender: TObject);\r\n procedure ActiveChange(Sender: TObject);\r\n function CheckDataSet: boolean; virtual;\r\n function EditCanModify: Boolean; virtual;\r\n function IsReadOnly: boolean;\r\n function IsEnabled: boolean; override;\r\n// function GetDisplayText: string; override;\r\n procedure KeyDown(var Key: Word; Shift: TShiftState); override;\r\n procedure KeyPress(var Key: Char); override;\r\n procedure DoExit; override;\r\n\r\n public\r\n procedure CreateInitialize; override;\r\n destructor Destroy; override;\r\n\r\n property Table: TDBTableControl read GetDBTableControl;\r\n published\r\n property TableSource: TDataSource read GetTableSource write SetTableSource;\r\n property DataField: TDataField read GetDataField write SetDataField;\r\n property DataSource: TDataSource read GetDataSource write SetDataSource;\r\n end;\r\n\r\n TWebDBEditDropDownTableControl = class(TDBEditDropDownTableControl);\r\n\r\n\r\n TDBResponsiveGrid = class(TResponsiveGrid)\r\n private\r\n FDataLink: TDBDataLink;\r\n FModifying: boolean;\r\n FRecordCount: integer;\r\n FOldState: TDatasetState;\r\n FDataChanging: boolean;\r\n protected\r\n procedure DataChange(Sender: TObject);\r\n procedure ActiveChange(Sender: TObject);\r\n procedure SetDataSource(const Value: TDataSource);\r\n function GetDataSource: TDataSource;\r\n procedure HandleDoItemClick(Index: integer); override;\r\n procedure LoadData; virtual;\r\n procedure OptionsChanged(Sender: TObject); override;\r\n public\r\n procedure CreateInitialize; override;\r\n destructor Destroy; override;\r\n procedure Refresh; virtual;\r\n published\r\n property DataSource: TDataSource read GetDataSource write SetDataSource;\r\n property ElementFont;\r\n property ElementClassName;\r\n property ElementId;\r\n property ElementPosition;\r\n end;\r\n\r\n TWebDBResponsiveGrid = class(TDBResponsiveGrid);\r\n\r\n TGridColumn = class(TCollectionItem)\r\n private\r\n FDataField: TDataField;\r\n FTitle: string;\r\n FWidth: integer;\r\n FDataType: TColumnDataType;\r\n FClassName: string;\r\n FTitleClassName: string;\r\n FSortIndicator: TGridSortIndicator;\r\n FEditor: TGridCellEditor;\r\n FEditMask: TEditMask;\r\n FComboBoxItems: TStrings;\r\n FTag: integer;\r\n FDBField: TField;\r\n FImageWidth: integer;\r\n FAlignment: TAlignment;\r\n FAutoFormatDateTime: boolean;\r\n procedure SetDataField(const Value: TDataField);\r\n procedure SetTitle(const Value: string);\r\n procedure SetWidth(const Value: integer);\r\n procedure SetSortIndicator(const Value: TGridSortIndicator);\r\n procedure SetComboBoxItems(const Value: TStrings);\r\n procedure SetAlignment(const Value: TAlignment);\r\n protected\r\n property DBField: TField read FDBField write FDBField;\r\n function GetDBField: TField;\r\n public\r\n procedure Assign(Source: TPersistent); override;\r\n constructor Create(Collection: TCollection); override;\r\n destructor Destroy; override;\r\n property SortIndicator: TGridSortIndicator read FSortIndicator write SetSortIndicator;\r\n published\r\n property Alignment: TAlignment read FAlignment write SetAlignment default taLeftJustify;\r\n property AutoFormatDateTime: boolean read FAutoFormatDateTime write FAutoFormatDateTime default true;\r\n property ComboBoxItems: TStrings read FComboBoxItems write SetComboBoxItems;\r\n property DataField: TDataField read FDataField write SetDataField;\r\n property DataType: TColumnDataType read FDataType write FDataType;\r\n property EditMask: TEditMask read FEditMask write FEditMask;\r\n property Editor: TGridCellEditor read FEditor write FEditor default geText;\r\n property ElementClassName: string read FClassName write FClassName;\r\n property ImageWidth: integer read FImageWidth write FImageWidth default 0;\r\n property Tag: integer read FTag write FTag default 0;\r\n property Title: string read FTitle write SetTitle;\r\n property TitleElementClassName: string read FTitleClassName write FTitleClassName;\r\n property Width: integer read FWidth write SetWidth default 64;\r\n end;\r\n\r\n TSortIndicatorChanged = procedure(Sender: TObject; ACol: integer; AIndicator: TGridSortIndicator) of object;\r\n\r\n TGridColumns = class(TOwnedCollection)\r\n private\r\n FOnChange: TNotifyEvent;\r\n FOnSortIndicatorChange: TSortIndicatorChanged;\r\n function GetItem(Index: integer): TGridColumn; reintroduce;\r\n procedure SetItem(Index: integer; const Value: TGridColumn); reintroduce;\r\n protected\r\n procedure Changed; virtual; reintroduce;\r\n procedure Update(Item: TCollectionItem); override;\r\n property OnSortIndicatorChange: TSortIndicatorChanged read FOnSortIndicatorChange write FOnSortIndicatorChange;\r\n public\r\n constructor Create(AOwner: TComponent); reintroduce;\r\n function Add: TGridColumn; reintroduce;\r\n function Insert(Index: integer): TGridColumn; reintroduce;\r\n property Items[Index: integer]: TGridColumn read GetItem write SetItem; default;\r\n property OnChange: TNotifyEvent read FOnChange write FOnChange;\r\n end;\r\n\r\n\r\n TDBGrid = class(TCustomStringGrid)\r\n private\r\n FDefaultFields: boolean;\r\n FModifying: boolean;\r\n FDataLink: TDBDataLink;\r\n FColumns: TGridColumns;\r\n FDataChanging: boolean;\r\n FOldState: TDatasetState;\r\n FOldFiltered: boolean;\r\n FOldIndicator: integer;\r\n FShowIndicator: boolean;\r\n function GetDataSource: TDataSource;\r\n procedure SetColumns(const Value: TGridColumns);\r\n procedure SetDataSource(const Value: TDataSource);\r\n procedure SetShowIndicator(const Value: boolean);\r\n procedure ReadStubProp(AReader: TReader);\r\n procedure WriteStubProp(AWriter: TWriter);\r\n protected\r\n procedure DefineProperties(AFiler: TFiler); override;\r\n procedure LoadData; virtual;\r\n procedure LoadRow(ARow: integer); virtual;\r\n procedure InsertData(ARow: Integer); virtual;\r\n procedure DataChange(Sender: TObject);\r\n procedure DataScroll(Sender: TObject; Distance: integer);\r\n procedure RecordChange(Sender: TObject);\r\n procedure ActiveChange(Sender: TObject);\r\n procedure ColumnsChanged(Sender: TObject);\r\n procedure UpdateData(Sender: TObject);\r\n procedure UpdateCell(ACol, ARow: integer; var AValue: string); override;\r\n procedure SelectCell(ACol, ARow: integer); override;\r\n procedure ChangeRow; override;\r\n procedure UpdateIndicator(ARow: integer);\r\n procedure DoCheckClick(ACol, ARow: Longint; Checked: boolean); override;\r\n procedure DoSortIndicatorChange(Sender: TObject; ACol: integer; AIndicator: TGridSortIndicator);\r\n function StopEdit: string; override;\r\n procedure CancelEdit; override;\r\n procedure StartEdit(ch: string); override;\r\n procedure Loaded; override;\r\n function CanEditCell(ACol,ARow: integer): boolean; override;\r\n function CanRowAdvance: boolean; override;\r\n procedure GetCellEditor(const ACol,ARow: integer; var AEditor: TGridCellEditor); override;\r\n procedure LoadComboItems(const ColIndex: integer; AField: TField);\r\n function GetLookupKey(const ColIndex: integer; AValue: string): string;\r\n public\r\n procedure CreateInitialize; override;\r\n destructor Destroy; override;\r\n procedure Refresh;\r\n procedure HideEdit(Advance: boolean = false); override;\r\n procedure ShowEdit; override;\r\n procedure EndUpdate; override;\r\n property RowCount;\r\n published\r\n property DragMode;\r\n property Columns: TGridColumns read FColumns write SetColumns;\r\n property DataSource: TDataSource read GetDataSource write SetDataSource;\r\n property ElementFont;\r\n property ElementClassName;\r\n property ElementId;\r\n property ElementPosition;\r\n property FixedFont;\r\n property Font;\r\n property ParentFont;\r\n property ShowIndicator: boolean read FShowIndicator write SetShowIndicator;\r\n property OnDragDrop;\r\n property OnDragOver;\r\n property OnEndDrag;\r\n property OnStartDrag;\r\n end;\r\n\r\n TWebDBGrid = class(TDBGrid);\r\n\r\nimplementation\r\n\r\nuses\r\n WEBLib.WebTools, Math;\r\n\r\ntype\r\n TResponsiveGridItemEx = class(TResponsiveGridItem);\r\n\r\nfunction CheckDB(ADataSource: TDataSource; ADataField: string; ADataLink: TDataLink): boolean;\r\nbegin\r\n Result := false;\r\n if Assigned(ADataSource) and (ADataSource.Enabled) and (ADataField <> '') then\r\n begin\r\n Result := Assigned(ADataLink.DataSet) and (ADataLink.DataSet.Active) and ((ADataLink.DataSet.RecordCount > 0) or (ADataLink.DataSet.State = dsInsert));\r\n end;\r\nend;\r\n\r\nfunction TableFieldToCellData(AElement: TJSHTMLElement; AField: TField; ColumnDataType: TColumnDataType; Enabled: boolean; AutoFormatDateTime: boolean = true; ImgWidth: integer = 0): string;\r\nvar\r\n b: boolean;\r\n fs,t,d,imgv: string;\r\n dt: TDateTime;\r\nbegin\r\n Result := '';\r\n\r\n case ColumnDataType of\r\n cdText,cdMemo:\r\n begin\r\n if (AField.DataType <> ftBlob) and TRESTClient.IsIsoDateTime(AField.AsString) and AutoFormatDateTime then\r\n begin\r\n dt := TRESTClient.IsoToDateTime(AField.AsString);\r\n\r\n if Frac(dt) = 0 then\r\n Result := DateToStr(dt)\r\n else\r\n if Int(dt) = 0 then\r\n Result := TimeToStr(dt)\r\n else\r\n Result := DateToStr(dt) +' ' + TimeToStr(dt);\r\n end\r\n else\r\n begin\r\n if ColumnDataType = cdMemo then\r\n begin\r\n try\r\n Result := window.atob(string(AField.AsJSValue))\r\n except\r\n Result := AField.DisplayText;\r\n end;\r\n end\r\n else\r\n begin\r\n if (AField.DataType in [ftDate,ftDateTime]) and ((AField as TDateTimeField).DisplayFormat = '') then // required format by inplace datepicker\r\n begin\r\n dt := AField.AsDateTime;\r\n if Frac(dt) = 0 then\r\n Result := FormatDateTime('YYYY-MM-dd', dt)\r\n else\r\n Result := FormatDateTime('YYYY-MM-dd hh:mm:ss', dt)\r\n end\r\n else\r\n Result := AField.DisplayText;\r\n end;\r\n end;\r\n end;\r\n cdImage:\r\n begin\r\n imgv := AField.DisplayText;\r\n if (imgv <> '') then\r\n begin\r\n if ImgWidth > 0 then\r\n Result := ''\r\n else\r\n Result := ''\r\n end;\r\n end;\r\n cdLink: Result := ''+ AField.DisplayText+'';\r\n cdExternalLink: Result := ''+ AField.DisplayText+'';\r\n cdCheck, cdRadio:\r\n begin\r\n if AField.DataType = ftBoolean then\r\n b := AField.AsBoolean\r\n else\r\n begin\r\n fs := LowerCase(AField.AsString);\r\n b := (fs = 'y') or (fs = 'true') or (fs = '1');\r\n end;\r\n\r\n if ColumnDataType = cdCheck then\r\n t := 'CHECKBOX'\r\n else\r\n t := 'RADIO';\r\n\r\n if not Enabled then\r\n d := ' DISABLED'\r\n else\r\n d := '';\r\n\r\n if b then\r\n Result := ''\r\n else\r\n Result := '';\r\n end;\r\n end;\r\nend;\r\n\r\nfunction FieldToCellData(AElement: TJSHTMLElement; AField: TField; Column: TGridColumn; Enabled: boolean): string;\r\nbegin\r\n Result := TableFieldToCellData(AElement, AField, Column.DataType, Enabled, Column.AutoFormatDateTime, Column.ImageWidth);\r\nend;\r\n\r\n\r\n{ TFieldDataLink }\r\n\r\nprocedure TFieldDataLink.UpdateField;\r\nbegin\r\n FField := nil;\r\n if Assigned(DataSource) and Assigned(DataSource.DataSet) and (FieldName <> '') then\r\n begin\r\n if DataSource.DataSet.Active then\r\n begin\r\n try\r\n FField := DataSource.DataSet.FieldByName(FieldName);\r\n except\r\n FField := nil;\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TFieldDataLink.ActiveChanged;\r\nbegin\r\n if not Active then\r\n FField := nil\r\n else\r\n UpdateField;\r\n\r\n if Assigned(OnActiveChange) then\r\n OnActiveChange(Self);\r\nend;\r\n\r\nprocedure TFieldDataLink.RecordChanged(Field: TField);\r\nbegin\r\n if (Field = nil) or (Field = FField) then\r\n begin\r\n if Assigned(FOnDataChange) then\r\n FOnDataChange(Self);\r\n end;\r\nend;\r\n\r\nprocedure TFieldDataLink.UpdateData;\r\nbegin\r\n if FModified then\r\n begin\r\n if (Field <> nil) and Assigned(FOnUpdateData) then\r\n FOnUpdateData(Self);\r\n FModified := False;\r\n end;\r\nend;\r\n\r\nprocedure TFieldDataLink.EditingChanged;\r\nbegin\r\n inherited;\r\n if Assigned(OnEditingChanged) then\r\n OnEditingChanged(Self);\r\nend;\r\n\r\nprocedure TFieldDataLink.Modified;\r\nbegin\r\n FModified := true;\r\nend;\r\n\r\n{ TDBEdit }\r\n\r\nfunction TDBEdit.GetDataField: TDataField;\r\nbegin\r\n Result := FDataLink.FieldName;\r\nend;\r\n\r\nprocedure TDBEdit.SetDataField(const Value: TDataField);\r\nbegin\r\n FDataLink.FieldName := Value;\r\n FDataLink.UpdateField;\r\n ActiveChange(Self);\r\nend;\r\n\r\nfunction TDBEdit.GetDataSource: TDataSource;\r\nbegin\r\n Result := FDataLink.DataSource;\r\nend;\r\n\r\nfunction TDBEdit.GetDisplayText: string;\r\nbegin\r\n if not CheckDataSet then\r\n Result := ''\r\n else\r\n Result := inherited GetDisplayText;\r\nend;\r\n\r\nfunction TDBEdit.IsEnabled: boolean;\r\nbegin\r\n Result := Enabled and CheckDataSet;\r\nend;\r\n\r\nfunction TDBEdit.IsReadOnly: boolean;\r\nbegin\r\n Result := ReadOnly or not CheckDataSet;\r\nend;\r\n\r\nprocedure TDBEdit.SetDataSource(const Value: TDataSource);\r\nbegin\r\n FDataLink.DataSource := Value;\r\nend;\r\n\r\nprocedure TDBEdit.CreateInitialize;\r\nbegin\r\n if not Assigned(FDataLink) then\r\n begin\r\n FDataLink := TFieldDataLink.Create;\r\n FDataLink.OnUpdateData := DataUpdate;\r\n FDataLink.OnDataChange := DataChange;\r\n FDataLink.OnActiveChange := ActiveChange;\r\n FEditChange := false;\r\n end;\r\n\r\n inherited;\r\nend;\r\n\r\ndestructor TDBEdit.Destroy;\r\nbegin\r\n FDataLink.Free;\r\n inherited;\r\nend;\r\n\r\nprocedure TDBEdit.DoExit;\r\nbegin\r\n if not FDataLink.ReadOnly then\r\n begin\r\n// try\r\n FEditChange := true;\r\n FDataLink.UpdateRecord; { tell data link to update database }\r\n\r\n// except\r\n// on Exception do\r\n// begin\r\n// SetFocus; { if it failed, don't let focus leave }\r\n// raise;\r\n// end;\r\n// end;\r\n end;\r\n\r\n inherited DoExit;\r\n\r\n FEditChange := false;\r\nend;\r\n\r\nfunction TDBEdit.CanCut: boolean;\r\nvar\r\n canedit: boolean;\r\nbegin\r\n if not CheckDataSet then\r\n Exit;\r\n\r\n if ReadOnly then\r\n begin\r\n Result := false;\r\n Exit;\r\n end;\r\n\r\n FEditChange := true;\r\n canedit := EditCanModify;\r\n FEditChange := false;\r\n\r\n if not canedit then\r\n begin\r\n Result := false;\r\n Exit;\r\n end\r\n else\r\n begin\r\n Result := inherited;\r\n FDataLink.Edit;\r\n end;\r\nend;\r\n\r\nfunction TDBEdit.CanPaste(AValue: string): boolean;\r\nbegin\r\n Result := CanCut;\r\nend;\r\n\r\nprocedure TDBEdit.DataUpdate(Sender: TObject);\r\nvar\r\n AValue: string;\r\n AValid: boolean;\r\nbegin\r\n AValue := Text;\r\n AValid := true;\r\n\r\n if Assigned(OnValidate) then\r\n OnValidate(Self, AValue, AValid);\r\n\r\n if AValid then\r\n begin\r\n if Assigned(FDataLink.Field) then\r\n begin\r\n if not Assigned(FDataLink.Field) then\r\n FDataLink.UpdateField;\r\n\r\n FDataLink.Field.AsString := AValue;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TDBEdit.DataChange(Sender: TObject);\r\nbegin\r\n if FEditChange then\r\n Exit;\r\n\r\n UpdateElement;\r\n\r\n if not Assigned(FDataLink.DataSet) then\r\n Exit;\r\n\r\n if not Assigned(FDataLink.Field) then\r\n FDataLink.UpdateField;\r\n\r\n if Assigned(FDataLink.Field) and not FDataLink.DataSet.IsEmpty then\r\n Text := FDataLink.Field.DisplayText\r\n else\r\n Text := '';\r\nend;\r\n\r\nprocedure TDBEdit.ActiveChange(Sender: TObject);\r\nbegin\r\n UpdateElement;\r\n\r\n if Assigned(FDataLink.DataSet) then\r\n begin\r\n if not FDataLink.DataSet.Active or not DataSource.Enabled then\r\n Text := ''\r\n else\r\n DataChange(Self);\r\n end;\r\nend;\r\n\r\nprocedure TDBEdit.KeyDown(var Key: Word; Shift: TShiftState);\r\nvar\r\n canedit: boolean;\r\n\r\nbegin\r\n if not CheckDataSet then\r\n Exit;\r\n\r\n if (Key = VK_DELETE) or (Key = VK_BACK) or ((Key = VK_INSERT) and (ssShift in Shift)) then\r\n begin\r\n FEditChange := true;\r\n canedit := EditCanModify;\r\n FEditChange := false;\r\n\r\n if not canedit then\r\n begin\r\n key := 0;\r\n inherited;\r\n Exit;\r\n end\r\n else\r\n begin\r\n inherited;\r\n FDataLink.Edit;\r\n end;\r\n end\r\n else\r\n inherited;\r\nend;\r\n\r\nprocedure TDBEdit.KeyPress(var Key: Char);\r\nvar\r\n canedit: boolean;\r\nbegin\r\n if not CheckDataSet or ReadOnly then\r\n begin\r\n inherited;\r\n Exit;\r\n end;\r\n\r\n if FDataLink.DataSet.ControlsDisabled then\r\n begin\r\n PreventDefault;\r\n StopPropagation;\r\n Exit;\r\n end;\r\n\r\n FEditChange := true;\r\n canedit := EditCanModify;\r\n FEditChange := false;\r\n\r\n if not canedit then\r\n begin\r\n Key := #0;\r\n Exit;\r\n end;\r\n\r\n if {((Key >= #32) and (FDataLink.Field <> nil) and\r\n not FDataLink.Field.IsValidChar(Key)) or} (FDataLink.ReadOnly) then\r\n begin\r\n Key := #0;\r\n end;\r\n\r\n inherited Keypress(Key);\r\nend;\r\n\r\nprocedure TDBEdit.Change;\r\nbegin\r\n inherited;\r\n\r\n if not CheckDataSet then\r\n Exit;\r\n\r\n if DataSource.AutoEdit or (DataSource.DataSet.State in [dsEdit,dsInsert]) then\r\n FDataLink.Modified;\r\nend;\r\n\r\nfunction TDBEdit.CheckDataSet: boolean;\r\nbegin\r\n Result := CheckDB(DataSource, DataField, FDataLink);\r\nend;\r\n\r\nfunction TDBEdit.EditCanModify: Boolean;\r\nbegin\r\n if Assigned(DataSource) then\r\n Result := not FDatalink.DataSet.ControlsDisabled and (DataSource.AutoEdit or (DataSource.DataSet.State in [dsEdit,dsInsert])) and FDataLink.Edit\r\n else\r\n Result := True;\r\nend;\r\n\r\n{ TDBLabel }\r\n\r\nfunction TDBLabel.GetDataField: TDataField;\r\nbegin\r\n Result := FDataLink.FieldName;\r\nend;\r\n\r\nprocedure TDBLabel.SetDataField(const Value: TDataField);\r\nbegin\r\n FDataLink.FieldName := Value;\r\n FDataLink.UpdateField;\r\n ActiveChange(Self);\r\nend;\r\n\r\nfunction TDBLabel.GetDataSource: TDataSource;\r\nbegin\r\n Result := FDataLink.DataSource;\r\nend;\r\n\r\n\r\nfunction TDBLabel.GetDisplayText: string;\r\nbegin\r\n if CheckDataSet then\r\n Result := inherited GetDisplayText\r\n else\r\n begin\r\n if (csDesigning in ComponentState) then\r\n Result := Self.Name;\r\n end;\r\nend;\r\n\r\nprocedure TDBLabel.SetDataSource(const Value: TDataSource);\r\nbegin\r\n FDataLink.DataSource := Value;\r\nend;\r\n\r\nfunction TDBLabel.CheckDataSet: boolean;\r\nbegin\r\n Result := CheckDB(DataSource, DataField, FDataLink);\r\nend;\r\n\r\nprocedure TDBLabel.CreateInitialize;\r\nbegin\r\n if not Assigned(FDataLink) then\r\n begin\r\n FDataLink := TFieldDataLink.Create;\r\n FDataLink.OnUpdateData := DataUpdate;\r\n FDataLink.OnDataChange := DataChange;\r\n FDataLink.OnActiveChange := ActiveChange;\r\n end;\r\n\r\n inherited;\r\nend;\r\n\r\ndestructor TDBLabel.Destroy;\r\nbegin\r\n FDataLink.Free;\r\n inherited;\r\nend;\r\n\r\nprocedure TDBLabel.DataUpdate(Sender: TObject);\r\nbegin\r\n// ShowMessage('data update');\r\n// if Assigned(FDataLink.Field) then\r\n// FDataLink.Field.Text := Caption;\r\nend;\r\n\r\nprocedure TDBLabel.DataChange(Sender: TObject);\r\nbegin\r\n if not Assigned(FDataLink.DataSet) then\r\n Exit;\r\n\r\n if not Assigned(FDataLink.Field) then\r\n FDataLink.UpdateField;\r\n\r\n if Assigned(FDataLink.Field) and not FDataLink.DataSet.IsEmpty then\r\n Caption := FDataLink.Field.DisplayText\r\n else\r\n Caption := '';\r\nend;\r\n\r\nprocedure TDBLabel.ActiveChange(Sender: TObject);\r\nbegin\r\n if Assigned(FDataLink.DataSet) then\r\n begin\r\n if not FDataLink.DataSet.Active or not DataSource.Enabled then\r\n Caption := ''\r\n else\r\n DataChange(Self);\r\n end;\r\nend;\r\n\r\n\r\n{ TDBNavigator }\r\n\r\nprocedure TDBNavigator.CreateInitialize;\r\nvar\r\n css: string;\r\nbegin\r\n inherited;\r\n\r\n ControlStyle := ControlStyle - [csAcceptsControls];\r\n\r\n css :=\r\n // Rules for sizing the icon.\r\n '.material-icons.md-18 { font-size: 18px; }'+\r\n '.material-icons.md-24 { font-size: 24px; }'+\r\n '.material-icons.md-36 { font-size: 36px; }'+\r\n '.material-icons.md-48 { font-size: 48px; }'+\r\n\r\n // Rules for using icons as black on a light background.\r\n '.material-icons.md-dark { color: rgba(0, 0, 0, 0.54); }'+\r\n '.material-icons.md-dark.md-inactive { color: rgba(255, 0, 0, 1); }'+\r\n\r\n // Rules for using icons as white on a dark background.\r\n '.material-icons.md-light { color: rgba(255, 255, 255, 1); }'+\r\n '.material-icons.md-light.md-inactive { color: rgba(128, 128, 128, 1); }';\r\n\r\n AddControlStyle(css);\r\n\r\n Width := 32*9;\r\n FMaterialGlyphColor := clNone;\r\n\r\n FImages := TStringList.Create;\r\n\r\n FHints := TStringList.Create;\r\n FHints.Add('First');\r\n FHints.Add('Prior');\r\n FHints.Add('Next');\r\n FHints.Add('Last');\r\n FHints.Add('Edit');\r\n FHints.Add('Post');\r\n FHints.Add('Insert');\r\n FHints.Add('Delete');\r\n FHints.Add('Cancel');\r\n\r\n if not Assigned(FDataLink) then\r\n begin\r\n FDataLink := TFieldDataLink.Create;\r\n FDataLink.OnDataChange := DataChange;\r\n FDataLink.OnActiveChange := ActiveChange;\r\n end;\r\n\r\n FBtnID := FindUniqueName('DBNavBtn');\r\n\r\n CreateButton(FFirstBtn, FBtnID + '_first', '',0);\r\n CreateButton(FPriorBtn, FBtnID + '_prior', '',1);\r\n CreateButton(FNextBtn, FBtnID + '_next', '',2);\r\n CreateButton(FLastBtn, FBtnID + '_last', '',3);\r\n\r\n CreateButton(FEditBtn, FBtnID + '_edit', '',4);\r\n CreateButton(FPostBtn, FBtnID + '_post', '',5);\r\n CreateButton(FInsertBtn, FBtnID + '_insert', '',6);\r\n CreateButton(FDeleteBtn, FBtnID + '_delete','',7);\r\n CreateButton(FCancelBtn, FBtnID + '_cancel','',8);\r\n\r\n FVisibleButtons := [nbFirst, nbPrior, nbNext, nbLast,\r\n nbInsert, nbDelete, nbEdit, nbPost, nbCancel];\r\n\r\n UpdateButtons;\r\nend;\r\n\r\ndestructor TDBNavigator.Destroy;\r\nbegin\r\n FDataLink.Free;\r\n FHints.Free;\r\n FImages.Free;\r\n inherited Destroy;\r\nend;\r\n\r\nprocedure TDBNavigator.DoDelete;\r\nbegin\r\n if Assigned(OnDelete) then\r\n OnDelete(Self);\r\nend;\r\n\r\nprocedure TDBNavigator.DoEdit;\r\nbegin\r\n if Assigned(OnEdit) then\r\n OnEdit(Self);\r\n\r\nend;\r\n\r\nprocedure TDBNavigator.DoFirst;\r\nbegin\r\n if Assigned(OnFirst) then\r\n OnFirst(Self);\r\nend;\r\n\r\nprocedure TDBNavigator.DoInsert;\r\nbegin\r\n if Assigned(OnInsert) then\r\n OnInsert(Self);\r\nend;\r\n\r\nprocedure TDBNavigator.DoLast;\r\nbegin\r\n if Assigned(OnLast) then\r\n OnLast(Self);\r\nend;\r\n\r\nprocedure TDBNavigator.DoNext;\r\nbegin\r\n if Assigned(OnNext) then\r\n OnNext(Self);\r\nend;\r\n\r\nprocedure TDBNavigator.DoPost;\r\nbegin\r\n if Assigned(OnPost) then\r\n OnPost(Self);\r\nend;\r\n\r\nprocedure TDBNavigator.DoPrior;\r\nbegin\r\n if Assigned(OnPrior) then\r\n OnPrior(Self);\r\nend;\r\n\r\nprocedure TDBNavigator.SetDataSource(const Value: TDataSource);\r\nbegin\r\n FDataLink.DataSource := Value;\r\nend;\r\n\r\nprocedure TDBNavigator.SetEnabled(Value: Boolean);\r\nbegin\r\n inherited;\r\n UpdateButtons;\r\nend;\r\n\r\nprocedure TDBNavigator.SetHints(const Value: TStringList);\r\nbegin\r\n FHints.Assign(Value);\r\n UpdateButtons;\r\nend;\r\n\r\nprocedure TDBNavigator.SetImages(const Value: TStringList);\r\nbegin\r\n FImages.Assign(Value);\r\n UpdateButtons;\r\nend;\r\n\r\nprocedure TDBNavigator.SetMaterialGlyphColor(const Value: TColor);\r\nbegin\r\n if (FMaterialGlyphColor <> Value) then\r\n begin\r\n FMaterialGlyphColor := Value;\r\n UpdateButtons;\r\n end;\r\nend;\r\n\r\nprocedure TDBNavigator.SetVisibleButtons(const Value: TNavButtonSet);\r\nbegin\r\n FVisibleButtons := Value;\r\n UpdateButtons;\r\nend;\r\n\r\nprocedure TDBNavigator.GetChildren(Proc: TGetChildProc; Root: TComponent);\r\nbegin\r\n // do nothing\r\nend;\r\n\r\nfunction TDBNavigator.GetDataSource: TDataSource;\r\nbegin\r\n Result := FDataLink.DataSource;\r\nend;\r\n\r\nprocedure TDBNavigator.CreateButton(var btn: TSpeedButton; BtnID, Glyph: string; Index: integer);\r\nbegin\r\n btn := TSpeedButton.Create(BtnID);\r\n btn.Flat := true;\r\n btn.Parent := Self;\r\n\r\n if (FImages.Count > Index) and (FImages[Index] <> '') then\r\n btn.GlyphURL := FImages[Index]\r\n else\r\n btn.MaterialGlyph := Glyph;\r\n\r\n btn.Width := 32;\r\n btn.Height := 24;\r\n btn.Align := alLeft;\r\n\r\n if FHints.Count > Index then\r\n begin\r\n btn.Hint := FHints[Index];\r\n end;\r\n btn.ShowHint := (FHints.Count > Index) and (btn.Hint <> '');\r\n btn.OnClick := HandleSpeedButtonClick;\r\n btn.OnMouseDown := HandleSpeedButtonMouseDown;\r\n btn.MaterialGlyphColor := FMaterialGlyphColor;\r\nend;\r\n\r\nprocedure TDBNavigator.UpdateButtons;\r\nbegin\r\n if Assigned(FDataLink) and Assigned(FDataLink.DataSource) and Assigned(FDataLink.DataSource.DataSet) and Assigned(FDataLink.DataSource.DataSet.Active) then\r\n begin\r\n FFirstBtn.Enabled := Enabled and (FDataLink.DataSet.Active and not FDataLink.DataSet.BOF);\r\n FPriorBtn.Enabled := Enabled and (FDataLink.DataSet.Active and not FDataLink.DataSet.BOF);\r\n FNextBtn.Enabled := Enabled and (FDataLink.DataSet.Active and not FDataLink.DataSet.EOF);\r\n FLastBtn.Enabled := Enabled and (FDataLink.DataSet.Active and not FDataLink.DataSet.EOF);\r\n FPostBtn.Enabled := Enabled and (FDataLink.DataSet.Active and (FDataLink.DataSet.State in [dsEdit, dsInsert]));\r\n FEditBtn.Enabled := Enabled and (FDataLink.DataSet.Active and (FDataLink.DataSet.State = dsBrowse) and not FDataLink.DataSet.IsEmpty);\r\n FInsertBtn.Enabled := Enabled and (FDataLink.DataSet.Active and not (FDataLink.DataSet.State = dsInsert));\r\n FDeleteBtn.Enabled := Enabled and (FDataLink.DataSet.Active and not FDataLink.DataSet.IsEmpty);\r\n FCancelBtn.Enabled := Enabled and (FDataLink.DataSet.Active and (FDataLink.DataSet.State in [dsInsert, dsEdit]));\r\n end\r\n else\r\n begin\r\n FFirstBtn.Enabled := false;\r\n FPriorBtn.Enabled := false;\r\n FNextBtn.Enabled := false;\r\n FLastBtn.Enabled := false;\r\n FEditBtn.Enabled := false;\r\n FPostBtn.Enabled := false;\r\n FInsertBtn.Enabled := false;\r\n FDeleteBtn.Enabled := false;\r\n FCancelBtn.Enabled := false;\r\n end;\r\n\r\n FFirstBtn.Visible := nbFirst in VisibleButtons;\r\n FPriorBtn.Visible := nbPrior in VisibleButtons;\r\n FNextBtn.Visible := nbNext in VisibleButtons;\r\n FLastBtn.Visible := nbLast in VisibleButtons;\r\n FEditBtn.Visible := nbEdit in VisibleButtons;\r\n FPostBtn.Visible := nbPost in VisibleButtons;\r\n FInsertBtn.Visible := nbInsert in VisibleButtons;\r\n FDeleteBtn.Visible := nbDelete in VisibleButtons;\r\n FCancelBtn.Visible := nbCancel in VisibleButtons;\r\n\r\n FFirstBtn.MaterialGlyphColor := FMaterialGlyphColor;\r\n FPriorBtn.MaterialGlyphColor := FMaterialGlyphColor;\r\n FNextBtn.MaterialGlyphColor := FMaterialGlyphColor;\r\n FLastBtn.MaterialGlyphColor := FMaterialGlyphColor;\r\n FEditBtn.MaterialGlyphColor := FMaterialGlyphColor;\r\n FPostBtn.MaterialGlyphColor := FMaterialGlyphColor;\r\n FInsertBtn.MaterialGlyphColor := FMaterialGlyphColor;\r\n FDeleteBtn.MaterialGlyphColor := FMaterialGlyphColor;\r\n FCancelBtn.MaterialGlyphColor := FMaterialGlyphColor;\r\n\r\n while FHints.Count < 9 do\r\n FHints.Add('');\r\n\r\n FFirstBtn.Hint := Hints.Strings[0];\r\n FPriorBtn.Hint := Hints.Strings[1];\r\n FNextBtn.Hint := Hints.Strings[2];\r\n FLastBtn.Hint := Hints.Strings[3];\r\n FEditBtn.Hint := Hints.Strings[4];\r\n FPostBtn.Hint := Hints.Strings[5];\r\n FInsertBtn.Hint := Hints.Strings[6];\r\n FDeleteBtn.Hint := Hints.Strings[7];\r\n FCancelBtn.Hint := Hints.Strings[8];\r\n\r\n UpdateImage(FFirstBtn, '', 0);\r\n UpdateImage(FPriorBtn, '', 1);\r\n UpdateImage(FNextBtn, '', 2);\r\n UpdateImage(FLastBtn, '', 3);\r\n\r\n UpdateImage(FEditBtn, '', 4);\r\n UpdateImage(FPostBtn, '', 5);\r\n UpdateImage(FInsertBtn, '', 6);\r\n UpdateImage(FDeleteBtn, '', 7);\r\n UpdateImage(FCancelBtn, '', 8);\r\nend;\r\n\r\nprocedure TDBNavigator.UpdateElement;\r\nbegin\r\n inherited;\r\n if not IsUpdating then\r\n AddControlLink('googlematerial', 'https://fonts.googleapis.com/icon?family=Material+Icons');\r\nend;\r\n\r\nprocedure TDBNavigator.UpdateImage(btn: TSpeedButton; Glyph: string; Index: integer);\r\nbegin\r\n if (FImages.Count > Index) and (FImages[Index] <> '') then\r\n begin\r\n btn.MaterialGlyph := '';\r\n btn.GlyphURL := FImages[Index];\r\n end\r\n else\r\n begin\r\n btn.MaterialGlyph := Glyph;\r\n btn.GlyphURL := '';\r\n end;\r\nend;\r\n\r\nprocedure TDBNavigator.HandleSpeedButtonClick(Sender: TObject);\r\nvar\r\n BID: string;\r\nbegin\r\n if Assigned(DataSource) and Assigned(DataSource.DataSet) then\r\n begin\r\n BID := TControl(Sender).GetID;\r\n\r\n if BID = FBtnID + '_first' then\r\n begin\r\n DoFirst;\r\n FDataLink.DataSet.First;\r\n end;\r\n\r\n if BID = FBtnID + '_prior' then\r\n begin\r\n DoPrior;\r\n FDataLink.DataSet.Prior;\r\n end;\r\n\r\n if BID = FBtnID + '_next' then\r\n begin\r\n DoNext;\r\n FDataLink.DataSet.Next;\r\n end;\r\n\r\n if BID = FBtnID + '_last' then\r\n begin\r\n DoLast;\r\n FDataLink.DataSet.Last;\r\n end;\r\n\r\n if BID = FBtnID + '_edit' then\r\n begin\r\n DoEdit;\r\n FDataLink.DataSet.Edit;\r\n end;\r\n\r\n if BID = FBtnID + '_insert' then\r\n begin\r\n DoInsert;\r\n FDataLink.DataSet.Insert;\r\n end;\r\n\r\n if BID = FBtnID + '_delete' then\r\n begin\r\n DoDelete;\r\n FDataLink.DataSet.Delete;\r\n end;\r\n\r\n if BID = FBtnID + '_post' then\r\n begin\r\n DoPost;\r\n FDataLink.DataSet.Post;\r\n end;\r\n\r\n if BID = FBtnID + '_cancel' then\r\n FDataLink.DataSet.Cancel;\r\n end;\r\nend;\r\n\r\nprocedure TDBNavigator.HandleSpeedButtonMouseDown(Sender: TObject;\r\n Button: TMouseButton; Shift: TShiftState; X, Y: Integer);\r\nbegin\r\n SetFocus;\r\nend;\r\n\r\nprocedure TDBNavigator.Loaded;\r\nbegin\r\n inherited;\r\n UpdateButtons;\r\nend;\r\n\r\nprocedure TDBNavigator.DataChange(Sender: TObject);\r\nbegin\r\n UpdateButtons;\r\nend;\r\n\r\nprocedure TDBNavigator.ActiveChange(Sender: TObject);\r\nbegin\r\n UpdateButtons;\r\nend;\r\n\r\n\r\n{ TDBSpinEdit }\r\n\r\nfunction TDBSpinEdit.GetDataField: TDataField;\r\nbegin\r\n Result := FDataLink.FieldName;\r\nend;\r\n\r\nprocedure TDBSpinEdit.SetDataField(const Value: TDataField);\r\nbegin\r\n FDataLink.FieldName := Value;\r\n FDataLink.UpdateField;\r\n ActiveChange(Self);\r\nend;\r\n\r\nfunction TDBSpinEdit.GetDataSource: TDataSource;\r\nbegin\r\n Result := FDataLink.DataSource;\r\nend;\r\n\r\nfunction TDBSpinEdit.GetDisplayText: string;\r\nbegin\r\n if not CheckDataSet then\r\n Result := ''\r\n else\r\n Result := inherited GetDisplayText;\r\nend;\r\n\r\nfunction TDBSpinEdit.IsEnabled: boolean;\r\nbegin\r\n Result := Enabled and CheckDataSet and (DataSource.AutoEdit or (DataSource.DataSet.State in [dsEdit,dsInsert]));\r\nend;\r\n\r\nfunction TDBSpinEdit.IsReadOnly: boolean;\r\nbegin\r\n Result := ReadOnly or not CheckDataSet;\r\nend;\r\n\r\nprocedure TDBSpinEdit.SetDataSource(const Value: TDataSource);\r\nbegin\r\n FDataLink.DataSource := Value;\r\nend;\r\n\r\nprocedure TDBSpinEdit.CreateInitialize;\r\nbegin\r\n if not Assigned(FDataLink) then\r\n begin\r\n FDataLink := TFieldDataLink.Create;\r\n FDataLink.OnUpdateData := DataUpdate;\r\n FDataLink.OnDataChange := DataChange;\r\n FDataLink.OnActiveChange := ActiveChange;\r\n FEditChange := false;\r\n end;\r\n\r\n inherited;\r\nend;\r\n\r\ndestructor TDBSpinEdit.Destroy;\r\nbegin\r\n FDataLink.Free;\r\n inherited;\r\nend;\r\n\r\nprocedure TDBSpinEdit.DoExit;\r\nbegin\r\n if not FDataLink.ReadOnly then\r\n begin\r\n// try\r\n FEditChange := true;\r\n FDataLink.UpdateRecord; { tell data link to update database }\r\n\r\n// except\r\n// on Exception do\r\n// begin\r\n// SetFocus; { if it failed, don't let focus leave }\r\n// raise;\r\n// end;\r\n// end;\r\n end;\r\n\r\n inherited DoExit;\r\n\r\n FEditChange := false;\r\nend;\r\n\r\nfunction TDBSpinEdit.EditCanModify: Boolean;\r\nbegin\r\n if Assigned(DataSource) then\r\n Result := not FDatalink.DataSet.ControlsDisabled and (DataSource.AutoEdit or (FDataLink.DataSet.State in [dsInsert, dsEdit])) and FDataLink.Edit\r\n else\r\n Result := true;\r\nend;\r\n\r\nprocedure TDBSpinEdit.DataUpdate(Sender: TObject);\r\nbegin\r\n if Assigned(FDataLink.Field) then\r\n begin\r\n if not Assigned(FDataLink.Field) then\r\n FDataLink.UpdateField;\r\n\r\n FDataLink.Field.AsInteger := Value;\r\n end;\r\nend;\r\n\r\nprocedure TDBSpinEdit.DataChange(Sender: TObject);\r\nbegin\r\n if FEditChange then\r\n Exit;\r\n\r\n if not Assigned(FDataLink.DataSet) then\r\n Exit;\r\n\r\n UpdateElement;\r\n\r\n if not Assigned(FDataLink.Field) then\r\n FDataLink.UpdateField;\r\n\r\n if Assigned(FDataLink.Field) and not FDataLink.DataSet.IsEmpty then\r\n Value := FDataLink.Field.AsInteger\r\n else\r\n Value := 0;\r\nend;\r\n\r\nprocedure TDBSpinEdit.ActiveChange(Sender: TObject);\r\nbegin\r\n if Assigned(FDataLink.DataSet) then\r\n begin\r\n if not FDataLink.DataSet.Active or not DataSource.Enabled then\r\n begin\r\n Text := '';\r\n Value := 0;\r\n end\r\n else\r\n DataChange(Self);\r\n end;\r\nend;\r\n\r\nprocedure TDBSpinEdit.KeyDown(var Key: Word; Shift: TShiftState);\r\nvar\r\n canedit: boolean;\r\n\r\nbegin\r\n if not Assigned(DataSource) then\r\n begin\r\n inherited;\r\n Exit;\r\n end;\r\n\r\n if not FDataLink.DataSet.Active or not DataSource.Enabled then\r\n begin\r\n inherited;\r\n Exit;\r\n end;\r\n\r\n if (Key = VK_DELETE) or (Key = VK_BACK) or ((Key = VK_INSERT) and (ssShift in Shift)) then\r\n begin\r\n FEditChange := true;\r\n canedit := EditCanModify;\r\n FEditChange := false;\r\n\r\n if not canedit then\r\n begin\r\n key := 0;\r\n inherited;\r\n Exit;\r\n end\r\n else\r\n begin\r\n inherited;\r\n FDataLink.Edit;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TDBSpinEdit.KeyPress(var Key: Char);\r\nvar\r\n canedit: boolean;\r\nbegin\r\n if not CheckDataSet or ReadOnly then\r\n begin\r\n inherited;\r\n Exit;\r\n end;\r\n\r\n if FDataLink.DataSet.ControlsDisabled then\r\n begin\r\n PreventDefault;\r\n StopPropagation;\r\n Exit;\r\n end;\r\n\r\n if not FDataLink.DataSet.Active or not DataSource.Enabled then\r\n begin\r\n inherited;\r\n Exit;\r\n end;\r\n\r\n FEditChange := true;\r\n canedit := EditCanModify;\r\n FEditChange := false;\r\n\r\n if not canedit then\r\n Exit;\r\n \r\n if {(Key >= #32) and (FDataLink.Field <> nil) and\r\n not FDataLink.Field.IsValidChar(Key) or} (FDataLink.ReadOnly) then\r\n begin\r\n Key := #0;\r\n end;\r\n\r\n inherited Keypress(Key);\r\nend;\r\n\r\nprocedure TDBSpinEdit.Change;\r\nvar\r\n canedit: boolean;\r\nbegin\r\n inherited;\r\n\r\n if not CheckDataSet then\r\n Exit;\r\n\r\n FEditChange := true;\r\n canedit := EditCanModify;\r\n FEditChange := false;\r\n\r\n if canedit then\r\n begin\r\n FDataLink.Edit;\r\n FDataLink.Modified;\r\n end;\r\nend;\r\n\r\nfunction TDBSpinEdit.CheckDataSet: boolean;\r\nbegin\r\n Result := CheckDB(DataSource, DataField, FDataLink);\r\nend;\r\n\r\n{ TDBCheckBox }\r\n\r\nprocedure TDBCheckBox.SetDataField(const Value: TDataField);\r\nbegin\r\n FDataLink.FieldName := Value;\r\n FDataLink.UpdateField;\r\n ActiveChange(Self);\r\nend;\r\n\r\nprocedure TDBCheckBox.SetDataSource(const Value: TDataSource);\r\nbegin\r\n FDatalink.DataSource := Value;\r\nend;\r\n\r\nfunction TDBCheckBox.GetDataSource: TDataSource;\r\nbegin\r\n Result := FDataLink.DataSource;\r\nend;\r\n\r\nfunction TDBCheckBox.IsEnabled: boolean;\r\nbegin\r\n Result := Enabled and CheckDataSet and (DataSource.AutoEdit or (DataSource.DataSet.State in [dsEdit,dsInsert]));\r\nend;\r\n\r\nfunction TDBCheckBox.GetDataField: TDataField;\r\nbegin\r\n Result := FDataLink.FieldName;\r\nend;\r\n\r\nprocedure TDBCheckBox.DataUpdate(Sender: TObject);\r\nbegin\r\n if Assigned(FDataLink.Field) then\r\n begin\r\n if not Assigned(FDataLink.Field) then\r\n FDataLink.UpdateField;\r\n\r\n if FDataLink.Field.DataType = ftString then\r\n begin\r\n if Checked then\r\n FDataLink.Field.AsString := ValueChecked\r\n else\r\n FDataLink.Field.AsString := ValueUnChecked;\r\n end\r\n else\r\n FDataLink.Field.AsBoolean := Checked;\r\n end;\r\nend;\r\n\r\nprocedure TDBCheckBox.DataChange(Sender: TObject);\r\nbegin\r\n UpdateElement;\r\n if FEditChange then\r\n Exit;\r\n\r\n if not Assigned(FDataLink.DataSet) then\r\n Exit;\r\n\r\n if not Assigned(FDataLink.Field) then\r\n FDataLink.UpdateField;\r\n\r\n if Assigned(FDataLink.Field) and not FDataLink.DataSet.IsEmpty then\r\n begin\r\n if FDataLink.Field.DataType = ftString then\r\n Checked := FDataLink.Field.AsString = ValueChecked\r\n else\r\n Checked := FDataLink.Field.AsBoolean;\r\n end\r\n else\r\n Checked := false;\r\nend;\r\n\r\nfunction TDBCheckBox.EditCanModify: Boolean;\r\nbegin\r\n if Assigned(DataSource) then\r\n Result := not FDatalink.DataSet.ControlsDisabled and (DataSource.AutoEdit or (FDataLink.DataSet.State in [dsEdit, dsInsert])) and FDataLink.Edit\r\n else\r\n Result := true;\r\nend;\r\n\r\nprocedure TDBCheckBox.EditingChanged(Sender: TObject);\r\nbegin\r\n if Assigned(FDataLink.Field) and not FDataLink.DataSet.IsEmpty then\r\n begin\r\n if (FDataLink.Field.DataType = ftString) and (ValueChecked <> '') and (ValueUnChecked <> '') then\r\n begin\r\n if (FDataLink.Field.AsString = '') then\r\n begin\r\n if Checked then\r\n FDataLink.Field.AsString := ValueChecked\r\n else\r\n FDataLink.Field.AsString := ValueUnChecked;\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TDBCheckBox.ActiveChange(Sender: TObject);\r\nbegin\r\n UpdateElement;\r\n if Assigned(FDataLink.DataSet) then\r\n begin\r\n if not FDataLink.DataSet.Active or not DataSource.Enabled then\r\n Checked := false\r\n else\r\n DataChange(Self);\r\n end;\r\nend;\r\n\r\nprocedure TDBCheckBox.CreateInitialize;\r\nbegin\r\n if not Assigned(FDataLink) then\r\n begin\r\n FDataLink := TFieldDataLink.Create;\r\n FDataLink.OnUpdateData := DataUpdate;\r\n FDataLink.OnDataChange := DataChange;\r\n FDataLink.OnActiveChange := ActiveChange;\r\n FDataLink.OnEditingChanged := EditingChanged;\r\n FEditChange := false;\r\n FValueChecked := 'True';\r\n FValueUnChecked := 'False';\r\n end;\r\n\r\n inherited;\r\nend;\r\n\r\ndestructor TDBCheckBox.Destroy; \r\nbegin\r\n FDataLink.Free;\r\n inherited Destroy;\r\nend;\r\n\r\nfunction TDBCheckBox.CheckDataSet: boolean;\r\nbegin\r\n Result := CheckDB(DataSource, DataField, FDataLink);\r\nend;\r\n\r\nprocedure TDBCheckBox.Click;\r\nvar\r\n canedit: boolean;\r\nbegin\r\n inherited;\r\n\r\n if not Assigned(DataSource) then\r\n Exit;\r\n\r\n if not FDataLink.DataSet.Active or not DataSource.Enabled then\r\n Exit;\r\n\r\n FEditChange := true;\r\n canedit := EditCanModify;\r\n FEditChange := false;\r\n\r\n if canedit then\r\n begin\r\n FDataLink.Edit;\r\n FDataLink.Modified;\r\n end;\r\nend;\r\n\r\n{ TDBDateTimePicker }\r\n\r\nprocedure TDBDateTimePicker.SetDataField(const Value: TDataField);\r\nbegin\r\n FDataLink.FieldName := Value;\r\n FDataLink.UpdateField;\r\n ActiveChange(Self);\r\nend;\r\n\r\nprocedure TDBDateTimePicker.SetDataSource(const Value: TDataSource);\r\nbegin\r\n FDatalink.DataSource := Value;\r\nend;\r\n\r\nfunction TDBDateTimePicker.GetDataSource: TDataSource;\r\nbegin\r\n Result := FDataLink.DataSource;\r\nend;\r\n\r\nfunction TDBDateTimePicker.IsEnabled: boolean;\r\nbegin\r\n Result := Enabled and CheckDataSet and (DataSource.AutoEdit or (DataSource.DataSet.State in [dsEdit,dsInsert]));\r\nend;\r\n\r\nfunction TDBDateTimePicker.IsReadOnly: boolean;\r\nbegin\r\n Result := ReadOnly or not CheckDataSet;\r\nend;\r\n\r\nprocedure TDBDateTimePicker.KeyDown(var Key: Word; Shift: TShiftState);\r\nvar\r\n canedit: boolean;\r\n\r\nbegin\r\n if not CheckDataSet then\r\n begin\r\n inherited;\r\n Exit;\r\n end;\r\n\r\n if not FDataLink.DataSet.Active or not DataSource.Enabled then\r\n begin\r\n inherited;\r\n Exit;\r\n end;\r\n\r\n if (Key = VK_DELETE) or (Key = VK_BACK) or ((Key = VK_INSERT) and (ssShift in Shift)) then\r\n begin\r\n FEditChange := true;\r\n canedit := EditCanModify;\r\n FEditChange := false;\r\n\r\n if not canedit then\r\n begin\r\n key := 0;\r\n inherited;\r\n Exit;\r\n end\r\n else\r\n begin\r\n inherited;\r\n FDataLink.Edit;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TDBDateTimePicker.KeyPress(var Key: Char);\r\nbegin\r\n if not CheckDataSet or ReadOnly then\r\n begin\r\n inherited;\r\n Exit;\r\n end;\r\n\r\n if FDataLink.DataSet.ControlsDisabled then\r\n begin\r\n PreventDefault;\r\n StopPropagation;\r\n Exit;\r\n end;\r\n\r\n inherited;\r\nend;\r\n\r\nfunction TDBDateTimePicker.GetDataField: TDataField;\r\nbegin\r\n Result := FDataLink.FieldName;\r\nend;\r\n\r\nprocedure TDBDateTimePicker.DataUpdate(Sender: TObject);\r\nbegin\r\n if Assigned(FDataLink.Field) then\r\n begin\r\n if not Assigned(FDataLink.Field) then\r\n FDataLink.UpdateField;\r\n\r\n FEditChange := true;\r\n\r\n FDataLink.Field.AsDateTime := DateTime;\r\n end;\r\n\r\n FEditChange := false;\r\nend;\r\n\r\nprocedure TDBDateTimePicker.DataChange(Sender: TObject);\r\nvar\r\n dt: TDateTime;\r\nbegin\r\n UpdateElement;\r\n\r\n if FEditChange then\r\n Exit;\r\n\r\n if not Assigned(FDataLink.DataSet) then\r\n Exit;\r\n\r\n if not Assigned(FDataLink.Field) then\r\n FDataLink.UpdateField;\r\n\r\n if Assigned(FDataLink.Field) and not FDataLink.DataSet.IsEmpty then\r\n begin\r\n if FDataLink.Field.AsString = '' then\r\n Clear\r\n else\r\n if TRESTClient.IsIsoDateTime(FDataLink.Field.AsString) then\r\n DateTime := TRESTClient.IsoToDateTime(FDataLink.Field.AsString)\r\n else\r\n if TryStrToDateTime(FDataLink.Field.AsString, dt) then\r\n DateTime := dt\r\n else\r\n Clear;\r\n end\r\n else\r\n begin\r\n Date := 0;\r\n Time := 0;\r\n end;\r\nend;\r\n\r\n\r\nfunction TDBDateTimePicker.EditCanModify: Boolean;\r\nbegin\r\n if Assigned(DataSource) then\r\n Result := not FDatalink.DataSet.ControlsDisabled and (DataSource.AutoEdit or (FDataLink.DataSet.State in [dsEdit, dsInsert])) and FDataLink.Edit\r\n else\r\n Result := true;\r\nend;\r\n\r\n\r\nprocedure TDBDateTimePicker.ActiveChange(Sender: TObject);\r\nbegin\r\n UpdateElement;\r\n\r\n if Assigned(FDataLink.DataSet) then\r\n begin\r\n if not FDataLink.DataSet.Active or not DataSource.Enabled then\r\n begin\r\n Date := Now;\r\n end\r\n else\r\n DataChange(Self);\r\n end;\r\nend;\r\n\r\nprocedure TDBDateTimePicker.Change;\r\nbegin\r\n inherited;\r\n\r\n if not CheckDataSet then\r\n Exit;\r\n\r\n if DataSource.AutoEdit or (DataSource.DataSet.State in [dsEdit, dsInsert]) then\r\n begin\r\n FEditChange := true;\r\n FDataLink.Edit;\r\n FDataLink.Modified;\r\n FEditChange := false;\r\n end;\r\nend;\r\n\r\nfunction TDBDateTimePicker.CheckDataSet: boolean;\r\nbegin\r\n Result := CheckDB(DataSource, DataField, FDataLink);\r\nend;\r\n\r\nprocedure TDBDateTimePicker.CreateInitialize;\r\nbegin\r\n if not Assigned(FDataLink) then\r\n begin\r\n FDataLink := TFieldDataLink.Create;\r\n FDataLink.OnUpdateData := DataUpdate;\r\n FDataLink.OnDataChange := DataChange;\r\n FDataLink.OnActiveChange := ActiveChange;\r\n FEditChange := false;\r\n end;\r\n\r\n inherited;\r\nend;\r\n\r\ndestructor TDBDateTimePicker.Destroy;\r\nbegin\r\n FDataLink.Free;\r\n inherited Destroy;\r\nend;\r\n\r\n\r\nprocedure TDBDateTimePicker.DoExit;\r\nbegin\r\n if not FDataLink.ReadOnly then\r\n begin\r\n// try\r\n FEditChange := true;\r\n FDataLink.UpdateRecord; { tell data link to update database }\r\n\r\n// except\r\n// on Exception do\r\n// begin\r\n// SetFocus; { if it failed, don't let focus leave }\r\n// raise;\r\n// end;\r\n// end;\r\n end;\r\n\r\n inherited DoExit;\r\n\r\n FEditChange := false;\r\nend;\r\n\r\n{ TDBComboBox }\r\n\r\nprocedure TDBComboBox.SetDataField(const Value: TDataField);\r\nbegin\r\n FDataLink.FieldName := Value;\r\n FDataLink.UpdateField;\r\n ActiveChange(Self);\r\nend;\r\n\r\nprocedure TDBComboBox.SetDataSource(const Value: TDataSource);\r\nbegin\r\n FDatalink.DataSource := Value;\r\nend;\r\n\r\nprocedure TDBComboBox.SetListField(const Value: string);\r\nbegin\r\n FListLink.FieldName := Value;\r\n ListActiveChange(Self);\r\nend;\r\n\r\nprocedure TDBComboBox.SetListSource(const Value: TDataSource);\r\nbegin\r\n FListLink.DataSource := Value;\r\nend;\r\n\r\nfunction TDBComboBox.GetDataSource: TDataSource;\r\nbegin\r\n Result := FDataLink.DataSource;\r\nend;\r\n\r\nfunction TDBComboBox.GetListField: string;\r\nbegin\r\n Result := FListLink.FieldName;\r\nend;\r\n\r\nfunction TDBComboBox.GetListSource: TDataSource;\r\nbegin\r\n Result := FListLink.DataSource;\r\nend;\r\n\r\nfunction TDBComboBox.IsEnabled: boolean;\r\nbegin\r\n Result := Enabled and CheckDataSet and (DataSource.AutoEdit or (DataSource.DataSet.State in [dsEdit,dsInsert]));\r\nend;\r\n\r\nprocedure TDBComboBox.ListDataChange(Sender: TObject);\r\nbegin\r\n if Assigned(FListLink.Field) and Assigned(FListLink.DataSet) and FListLink.DataSet.Active and not (FListLink.DataSet.State = dsInsert) and not FListChange then\r\n begin\r\n FListChange := true;\r\n ListActiveChange(Self);\r\n FListChange := false;\r\n end;\r\nend;\r\n\r\nprocedure TDBComboBox.ListActiveChange(Sender: TObject);\r\nvar\r\n fld: TField;\r\n bk: TBookmark;\r\nbegin\r\n if not Assigned(ListSource) then\r\n Exit;\r\n\r\n if Assigned(FListLink.Field) and Assigned(FListLink.DataSet) and FListLink.DataSet.Active and not FListLink.DataSet.IsEmpty then\r\n begin\r\n fld := FListLink.DataSet.FieldByName(FListLink.FieldName);\r\n\r\n if Assigned(fld) then\r\n begin\r\n FListLink.DataSet.DisableControls;\r\n bk := FListLink.DataSet.GetBookmark;\r\n Items.Clear;\r\n FListLink.DataSet.First;\r\n\r\n while not FListLink.DataSet.Eof do\r\n begin\r\n Items.Add(fld.DisplayText);\r\n FListLink.DataSet.Next;\r\n end;\r\n\r\n FListLink.DataSet.GotoBookmark(bk);\r\n DataChange(Self);\r\n FListLink.DataSet.EnableControls;\r\n\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TDBComboBox.GetDataField: TDataField;\r\nbegin\r\n Result := FDataLink.FieldName;\r\nend;\r\n\r\nprocedure TDBComboBox.DataUpdate(Sender: TObject);\r\nvar\r\n s: string;\r\nbegin\r\n if Assigned(FDataLink.Field) then\r\n begin\r\n if not Assigned(FDataLink.Field) then\r\n FDataLink.UpdateField;\r\n\r\n s := Text;\r\n // in case key/value pairs are found\r\n if (Pos(Items.NameValueSeparator, s) > 0) and not Assigned(ListSource) and (Style = csDropDownList) and (ItemIndex >= 0) then\r\n begin\r\n s := Items.Names[ItemIndex];\r\n end;\r\n\r\n FDataLink.Field.AsString := s;\r\n end;\r\nend;\r\n\r\nprocedure TDBComboBox.DataChange(Sender: TObject);\r\nbegin\r\n UpdateElement;\r\n\r\n if FEditChange then\r\n Exit;\r\n\r\n if not Assigned(DataSource) then\r\n Exit;\r\n\r\n if not Assigned(FDataLink.DataSet) then\r\n Exit;\r\n\r\n if not Assigned(FDataLink.Field) then\r\n FDataLink.UpdateField;\r\n\r\n if Assigned(FDataLink.Field) and not FDataLink.DataSet.IsEmpty then\r\n begin\r\n if Style = csDropDown then\r\n Text := FDataLink.Field.DisplayText\r\n else\r\n begin\r\n if (Items.Count > 0) and (Pos(Items.NameValueSeparator, Items[0]) > 0) and not Assigned(ListSource) then\r\n begin\r\n ItemIndex := Items.IndexOfName(FDataLink.Field.DisplayText);\r\n end\r\n else\r\n begin\r\n ItemIndex := Items.IndexOf(FDataLink.Field.DisplayText);\r\n end;\r\n end;\r\n end\r\n else\r\n ItemIndex := -1;\r\nend;\r\n\r\n\r\nfunction TDBComboBox.EditCanModify: Boolean;\r\nbegin\r\n if Assigned(DataSource) then\r\n Result := not FDatalink.DataSet.ControlsDisabled and (DataSource.AutoEdit or (FDataLink.DataSet.State in [dsEdit, dsInsert])) and FDataLink.Edit\r\n else\r\n Result := true;\r\nend;\r\n\r\nprocedure TDBComboBox.Change;\r\nbegin\r\n inherited;\r\n\r\n if not CheckDataSet then\r\n Exit;\r\n\r\n if DataSource.AutoEdit or (DataSource.DataSet.State in [dsEdit, dsInsert]) then\r\n begin\r\n FEditChange := true;\r\n FDataLink.Edit;\r\n FDataLink.Modified;\r\n\r\n if (ItemIndex <> -1) and (Style = csDropDownList) and Assigned(FListLink) and Assigned(FListLink.DataSet) and FListLink.DataSet.Active and ListSync then\r\n begin\r\n FListLink.DataSet.First;\r\n FListLink.DataSet.MoveBy(ItemIndex);\r\n end;\r\n\r\n FEditChange := false;\r\n end;\r\nend;\r\n\r\nfunction TDBComboBox.CheckDataSet: boolean;\r\nbegin\r\n Result := CheckDB(DataSource, DataField, FDataLink);\r\nend;\r\n\r\nprocedure TDBComboBox.ActiveChange(Sender: TObject);\r\nbegin\r\n UpdateElement;\r\n\r\n if Assigned(FDataLink.DataSet) then\r\n begin\r\n\r\n if not FDataLink.DataSet.Active or not DataSource.Enabled then\r\n begin\r\n Text := '';\r\n end\r\n else\r\n DataChange(Self);\r\n end;\r\nend;\r\n\r\nprocedure TDBComboBox.CreateInitialize;\r\nbegin\r\n if not Assigned(FDataLink) then\r\n begin\r\n FDataLink := TFieldDataLink.Create;\r\n FDataLink.OnUpdateData := DataUpdate;\r\n FDataLink.OnDataChange := DataChange;\r\n FDataLink.OnActiveChange := ActiveChange;\r\n\r\n FListLink := TFieldDataLink.Create;\r\n FListLink.OnActiveChange := ListActiveChange;\r\n FListLink.OnDataChange := ListDataChange;\r\n\r\n FEditChange := false;\r\n end;\r\n\r\n inherited;\r\nend;\r\n\r\ndestructor TDBComboBox.Destroy;\r\nbegin\r\n FDataLink.Free;\r\n FListLink.Free;\r\n inherited Destroy;\r\nend;\r\n\r\nprocedure TDBComboBox.DoExit;\r\nbegin\r\n if not FDataLink.ReadOnly then\r\n begin\r\n// try\r\n FEditChange := true;\r\n FDataLink.UpdateRecord; { tell data link to update database }\r\n\r\n// except\r\n// on Exception do\r\n// begin\r\n// SetFocus; { if it failed, don't let focus leave }\r\n// raise;\r\n// end;\r\n// end;\r\n end;\r\n\r\n inherited DoExit;\r\n\r\n FEditChange := false;\r\n\r\nend;\r\n\r\n{ TDBRadioGroup }\r\n\r\nprocedure TDBRadioGroup.SetDataField(const Value: TDataField);\r\nbegin\r\n FDataLink.FieldName := Value;\r\n FDataLink.UpdateField;\r\n ActiveChange(Self);\r\nend;\r\n\r\nprocedure TDBRadioGroup.SetDataSource(const Value: TDataSource);\r\nbegin\r\n FDatalink.DataSource := Value;\r\nend;\r\n\r\nfunction TDBRadioGroup.GetDataSource: TDataSource;\r\nbegin\r\n Result := FDataLink.DataSource;\r\nend;\r\n\r\nfunction TDBRadioGroup.IsEnabled: boolean;\r\nbegin\r\n Result := Enabled and CheckDataSet and (DataSource.AutoEdit or (FDataLink.DataSet.State in [dsEdit, dsInsert]));\r\nend;\r\n\r\nfunction TDBRadioGroup.GetDataField: TDataField;\r\nbegin\r\n Result := FDataLink.FieldName;\r\nend;\r\n\r\nprocedure TDBRadioGroup.DataUpdate(Sender: TObject);\r\nbegin\r\n if Assigned(FDataLink.Field) then\r\n begin\r\n if not Assigned(FDataLink.Field) then\r\n FDataLink.UpdateField;\r\n\r\n if FDataLink.Field.DataType = ftString then\r\n begin\r\n if Values.Count > ItemIndex then\r\n FDataLink.Field.AsString := Values[ItemIndex];\r\n end\r\n else\r\n FDataLink.Field.AsInteger := ItemIndex + 1;\r\n end;\r\nend;\r\n\r\nprocedure TDBRadioGroup.DataChange(Sender: TObject);\r\nbegin\r\n UpdateElement;\r\n\r\n if FEditChange then\r\n Exit;\r\n\r\n if not Assigned(FDataLink.DataSet) then\r\n Exit;\r\n\r\n if not Assigned(FDataLink.Field) then\r\n FDataLink.UpdateField;\r\n\r\n if Assigned(FDataLink.Field) and not FDataLink.DataSet.IsEmpty then\r\n begin\r\n if FDataLink.Field.DataType = ftString then\r\n begin\r\n ItemIndex := Values.IndexOf(FDataLink.Field.AsString);\r\n end\r\n else\r\n ItemIndex := FDataLink.Field.AsInteger - 1;\r\n end\r\n else\r\n ItemIndex := -1;\r\nend;\r\n\r\n\r\nfunction TDBRadioGroup.EditCanModify: Boolean;\r\nbegin\r\n if Assigned(DataSource) then\r\n Result := not FDatalink.DataSet.ControlsDisabled and (DataSource.AutoEdit or (FDataLink.DataSet.State in [dsEdit, dsInsert])) and FDataLink.Edit\r\n else\r\n Result := true;\r\nend;\r\n\r\nfunction TDBRadioGroup.CheckDataSet: boolean;\r\nbegin\r\n Result := CheckDB(DataSource, DataField, FDataLink);\r\nend;\r\n\r\nprocedure TDBRadioGroup.Click;\r\nbegin\r\n inherited;\r\n\r\n if not CheckDataSet then\r\n Exit;\r\n\r\n if DataSource.AutoEdit or (DataSource.DataSet.State in [dsEdit, dsInsert]) then\r\n begin\r\n FEditChange := true;\r\n FDataLink.Edit;\r\n FDataLink.Modified;\r\n FEditChange := false;\r\n end;\r\nend;\r\n\r\nprocedure TDBRadioGroup.ActiveChange(Sender: TObject);\r\nbegin\r\n UpdateElement;\r\n\r\n if Assigned(FDataLink.DataSet) then\r\n begin\r\n if not FDataLink.DataSet.Active or not DataSource.Enabled then\r\n begin\r\n ItemIndex := -1;\r\n end\r\n else\r\n DataChange(Self);\r\n end;\r\nend;\r\n\r\nprocedure TDBRadioGroup.CreateInitialize;\r\nbegin\r\n if not Assigned(FDataLink) then\r\n begin\r\n FDataLink := TFieldDataLink.Create;\r\n FDataLink.OnUpdateData := DataUpdate;\r\n FDataLink.OnDataChange := DataChange;\r\n FDataLink.OnActiveChange := ActiveChange;\r\n FEditChange := false;\r\n end;\r\n if not Assigned(FValues) then\r\n begin\r\n FValues := TStringList.Create;\r\n FValues.SkipLastLineBreak := true;\r\n end;\r\n\r\n inherited;\r\nend;\r\n\r\ndestructor TDBRadioGroup.Destroy; \r\nbegin\r\n FValues.Free;\r\n FDataLink.Free;\r\n inherited Destroy;\r\nend;\r\n\r\nprocedure TDBRadioGroup.SetValues(const Value: TStringList);\r\nbegin\r\n FValues.Assign(Value);\r\nend;\r\n\r\n\r\n{ TDBLinkLabel }\r\n\r\nprocedure TDBLinkLabel.SetDataField(const Value: TDataField);\r\nbegin\r\n FDataLink.FieldName := Value;\r\n FDataLink.UpdateField;\r\n ActiveChange(Self);\r\nend;\r\n\r\nprocedure TDBLinkLabel.SetDataSource(const Value: TDataSource);\r\nbegin\r\n FDatalink.DataSource := Value;\r\nend;\r\n\r\nfunction TDBLinkLabel.GetDataSource: TDataSource;\r\nbegin\r\n Result := FDataLink.DataSource;\r\nend;\r\n\r\nfunction TDBLinkLabel.GetDisplayText: string;\r\nbegin\r\n if CheckDataSet then\r\n Result := inherited GetDisplayText\r\n else\r\n begin\r\n if (csDesigning in ComponentState) then\r\n Result := Self.Name;\r\n end;\r\nend;\r\n\r\nfunction TDBLinkLabel.GetDataField: TDataField;\r\nbegin\r\n Result := FDataLink.FieldName;\r\nend;\r\n\r\nprocedure TDBLinkLabel.DataUpdate(Sender: TObject);\r\nbegin\r\n if Assigned(FDataLink.Field) then\r\n begin\r\n if not Assigned(FDataLink.Field) then\r\n FDataLink.UpdateField;\r\n end;\r\nend;\r\n\r\nprocedure TDBLinkLabel.DataChange(Sender: TObject);\r\nvar\r\n url, protocol, tgt: string;\r\nbegin\r\n if FEditChange then\r\n Exit;\r\n\r\n if not Assigned(FDataLink.DataSet) then\r\n Exit;\r\n\r\n if not Assigned(FDataLink.Field) then\r\n FDataLink.UpdateField;\r\n\r\n if Assigned(FDataLink.Field) and not FDataLink.DataSet.IsEmpty then\r\n begin\r\n case LinkType of\r\n wlHttp: protocol := 'http://';\r\n wlHttps: protocol := 'https://';\r\n wlMail: protocol := 'mailto:';\r\n wlFTP: protocol := 'ftp://';\r\n end;\r\n\r\n tgt := '';\r\n\r\n if Target = ltNewTab then\r\n tgt := ' target=\"_blank\"';\r\n\r\n url := '' + FDataLink.Field.DisplayText + '';\r\n\r\n Caption := url;\r\n end\r\n else\r\n Caption := '';\r\nend;\r\n\r\n\r\nfunction TDBLinkLabel.EditCanModify: Boolean; \r\nbegin\r\n Result := false;\r\nend;\r\n\r\nfunction TDBLinkLabel.CheckDataSet: boolean;\r\nbegin\r\n Result := CheckDB(DataSource, DataField, FDataLink);\r\nend;\r\n\r\nprocedure TDBLinkLabel.Click;\r\nbegin\r\n inherited;\r\nend;\r\n\r\nprocedure TDBLinkLabel.ActiveChange(Sender: TObject);\r\nbegin\r\n if Assigned(FDataLink.DataSet) then\r\n begin\r\n if not FDataLink.DataSet.Active or not DataSource.Enabled then \r\n begin\r\n Caption := '';\r\n end\r\n else\r\n DataChange(Self);\r\n end;\r\nend;\r\n\r\nprocedure TDBLinkLabel.CreateInitialize;\r\nbegin\r\n if not Assigned(FDataLink) then\r\n begin\r\n FDataLink := TFieldDataLink.Create;\r\n FDataLink.OnUpdateData := DataUpdate;\r\n FDataLink.OnDataChange := DataChange;\r\n FDataLink.OnActiveChange := ActiveChange;\r\n FEditChange := false;\r\n FLinkType := wlHttp;\r\n end;\r\n\r\n inherited;\r\nend;\r\n\r\ndestructor TDBLinkLabel.Destroy; \r\nbegin\r\n FDataLink.Free;\r\n inherited Destroy;\r\nend;\r\n\r\n\r\n\r\n{ TDBMemo }\r\n\r\nprocedure TDBMemo.ActiveChange(Sender: TObject);\r\nbegin\r\n UpdateElement;\r\n\r\n if Assigned(FDataLink.DataSet) then\r\n begin\r\n if not FDataLink.DataSet.Active or not DataSource.Enabled then\r\n Lines.Text := ''\r\n else\r\n DataChange(Self);\r\n end;\r\nend;\r\n\r\nfunction TDBMemo.CanCut: boolean;\r\nvar\r\n canedit: boolean;\r\nbegin\r\n if not CheckDataSet then\r\n Exit;\r\n\r\n if ReadOnly then\r\n begin\r\n Result := false;\r\n Exit;\r\n end;\r\n\r\n FEditChange := true;\r\n canedit := EditCanModify;\r\n FEditChange := false;\r\n\r\n if not canedit then\r\n begin\r\n Result := false;\r\n Exit;\r\n end\r\n else\r\n begin\r\n Result := inherited;\r\n FDataLink.Edit;\r\n end;\r\nend;\r\n\r\nfunction TDBMemo.CanPaste(AValue: string): boolean;\r\nbegin\r\n Result := CanCut;\r\nend;\r\n\r\nprocedure TDBMemo.Change;\r\nbegin\r\n inherited;\r\n\r\n if not CheckDataSet then\r\n Exit;\r\n\r\n if DataSource.AutoEdit or (DataSource.DataSet.State in [dsEdit,dsInsert]) then\r\n begin\r\n FEditChange := true;\r\n FDataLink.Edit;\r\n FDataLink.Modified;\r\n FEditChange := false;\r\n end;\r\nend;\r\n\r\nfunction TDBMemo.CheckDataSet: boolean;\r\nbegin\r\n Result := CheckDB(DataSource, DataField, FDataLink);\r\nend;\r\n\r\nprocedure TDBMemo.CreateInitialize;\r\nbegin\r\n if not Assigned(FDataLink) then\r\n begin\r\n FDataLink := TFieldDataLink.Create;\r\n FDataLink.OnUpdateData := DataUpdate;\r\n FDataLink.OnDataChange := DataChange;\r\n FDataLink.OnActiveChange := ActiveChange;\r\n FEditChange := false;\r\n end;\r\n\r\n inherited;\r\nend;\r\n\r\nprocedure TDBMemo.DataChange(Sender: TObject);\r\nbegin\r\n if FEditChange then\r\n Exit;\r\n\r\n UpdateElement;\r\n\r\n if not Assigned(FDataLink.DataSet) then\r\n Exit;\r\n\r\n if not Assigned(FDataLink.Field) then\r\n FDataLink.UpdateField;\r\n\r\n if Assigned(FDataLink.Field) and not FDataLink.DataSet.IsEmpty then\r\n begin\r\n if (FDataLink.Field is TBlobField) and not (FDataLink.Field is TMemoField) then\r\n begin\r\n try\r\n Lines.Text := window.atob(string(FDataLink.Field.AsJSValue));\r\n except\r\n Lines.Text := FDataLink.Field.DisplayText;\r\n end;\r\n end\r\n else\r\n begin\r\n Lines.Text := FDataLink.Field.DisplayText\r\n end;\r\n end\r\n else\r\n Lines.Text := '';\r\nend;\r\n\r\nprocedure TDBMemo.DataUpdate(Sender: TObject);\r\nbegin\r\n if Assigned(FDataLink.Field) then\r\n begin\r\n if not Assigned(FDataLink.Field) then\r\n FDataLink.UpdateField;\r\n\r\n if (FDataLink.Field is TBlobField) and not (FDataLink.Field is TMemoField) then\r\n begin\r\n FDataLink.Field.AsJSValue := window.btoa(Lines.Text);\r\n end\r\n else\r\n begin\r\n Lines.TextLineBreakStyle := tlbsCR;\r\n FDataLink.Field.AsString := Lines.Text;\r\n end;\r\n end;\r\nend;\r\n\r\ndestructor TDBMemo.Destroy;\r\nbegin\r\n FDataLink.Free;\r\n inherited;\r\nend;\r\n\r\nprocedure TDBMemo.DoExit;\r\nbegin\r\n if not FDataLink.ReadOnly then\r\n begin\r\n// try\r\n FEditChange := true;\r\n FDataLink.UpdateRecord; { tell data link to update database }\r\n\r\n// except\r\n// on Exception do\r\n// begin\r\n// SetFocus; { if it failed, don't let focus leave }\r\n// raise;\r\n// end;\r\n// end;\r\n end;\r\n\r\n inherited DoExit;\r\n\r\n FEditChange := false;\r\nend;\r\n\r\nfunction TDBMemo.EditCanModify: Boolean;\r\nbegin\r\n if Assigned(DataSource) then\r\n Result := not FDatalink.DataSet.ControlsDisabled and (DataSource.AutoEdit or (FDataLink.DataSet.State in [dsEdit, dsInsert])) and FDataLink.Edit\r\n else\r\n Result := true;\r\nend;\r\n\r\nfunction TDBMemo.GetDataField: TDataField;\r\nbegin\r\n Result := FDataLink.FieldName;\r\nend;\r\n\r\nfunction TDBMemo.GetDataSource: TDataSource;\r\nbegin\r\n Result := FDataLink.DataSource;\r\nend;\r\n\r\nfunction TDBMemo.GetDisplayText: string;\r\nbegin\r\n if not CheckDataSet then\r\n Result := ''\r\n else\r\n Result := inherited GetDisplayText;\r\nend;\r\n\r\nfunction TDBMemo.IsEnabled: boolean;\r\nbegin\r\n Result := Enabled and CheckDataSet;\r\nend;\r\n\r\nfunction TDBMemo.IsReadOnly: boolean;\r\nbegin\r\n Result := ReadOnly or not CheckDataSet;\r\nend;\r\n\r\nprocedure TDBMemo.KeyDown(var Key: Word; Shift: TShiftState);\r\nvar\r\n canedit: boolean;\r\n\r\nbegin\r\n if not CheckDataSet then\r\n Exit;\r\n\r\n if (Key = VK_DELETE) or (Key = VK_BACK) or ((Key = VK_INSERT) and (ssShift in Shift)) then\r\n begin\r\n FEditChange := true;\r\n canedit := EditCanModify;\r\n FEditChange := false;\r\n\r\n if not canedit then\r\n begin\r\n key := 0;\r\n inherited;\r\n Exit;\r\n end\r\n else\r\n begin\r\n inherited;\r\n FDataLink.Edit;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TDBMemo.KeyPress(var Key: Char);\r\nvar\r\n canedit: boolean;\r\nbegin\r\n if not CheckDataSet or ReadOnly then\r\n Exit;\r\n\r\n if FDataLink.DataSet.ControlsDisabled then\r\n begin\r\n PreventDefault;\r\n StopPropagation;\r\n Exit;\r\n end;\r\n\r\n FEditChange := true;\r\n canedit := EditCanModify;\r\n FEditChange := false;\r\n\r\n if not canedit then\r\n Exit;\r\n\r\n if {(Key >= #32) and (FDataLink.Field <> nil) and\r\n not FDataLink.Field.IsValidChar(Key) or} (FDataLink.ReadOnly) then\r\n begin\r\n Key := #0;\r\n end;\r\n\r\n inherited Keypress(Key);\r\nend;\r\n\r\nprocedure TDBMemo.SetDataField(const Value: TDataField);\r\nbegin\r\n FDataLink.FieldName := Value;\r\n FDataLink.UpdateField;\r\n ActiveChange(Self);\r\nend;\r\n\r\nprocedure TDBMemo.SetDataSource(const Value: TDataSource);\r\nbegin\r\n FDataLink.DataSource := Value;\r\nend;\r\n\r\n{ TDBTableControl }\r\n\r\nprocedure TDBTableControl.ActiveChange(Sender: TObject);\r\nbegin\r\n // load data here from dataset\r\n if not Assigned(DataSource) then\r\n Exit;\r\n\r\n if not Assigned(DataSource.DataSet) then\r\n Exit;\r\n\r\n if DataSource.Dataset.ControlsDisabled then\r\n Exit;\r\n\r\n if DataSource.DataSet.Active then\r\n begin\r\n FDataChanging := true;\r\n LoadData;\r\n FDataChanging := false;\r\n end\r\n else\r\n begin\r\n RowCount := 2;\r\n Clear;\r\n if FDefaultFields then\r\n Columns.Clear;\r\n end;\r\nend;\r\n\r\nprocedure TDBTableControl.CreateInitialize;\r\nbegin\r\n inherited;\r\n RowCount := 2;\r\n\r\n if not Assigned(FDataLink) then\r\n begin\r\n FDataLink := TDBDataLink.Create;\r\n FDataLink.OnActiveChange := ActiveChange;\r\n FDataLink.OnRecordChange := RecordChange;\r\n FDataLink.OnDataChange := DataChange;\r\n end;\r\n if not Assigned(FColumns) then\r\n begin\r\n FColumns := TTableControlColumns.Create(Self);\r\n FColumns.PropName := 'Columns';\r\n end;\r\n FDefaultFields := false;\r\n FDataChanging := false;\r\nend;\r\n\r\nprocedure TDBTableControl.DataChange(Sender: TObject);\r\nbegin\r\n if FDataChanging then\r\n Exit;\r\n\r\n FDataChanging := true;\r\n\r\n if Assigned(FDataLink.DataSource) and Assigned(FDataLink.DataSource.DataSet) and FDataLink.DataSource.DataSet.Active and (FDataLink.DataSource.DataSet.State = dsBrowse) then\r\n begin\r\n LoadData;\r\n end;\r\n\r\n FDataChanging := false;\r\nend;\r\n\r\nprocedure TDBTableControl.RecordChange(Sender: TObject);\r\nvar\r\n r: integer;\r\nbegin\r\n if Assigned(FDataLink.DataSource) and Assigned(FDataLink.DataSource.DataSet) and FDataLink.DataSource.DataSet.Active and (FDataLink.DataSource.DataSet.State = dsBrowse) then\r\n begin\r\n r := FDataLink.DataSource.DataSet.RecNo - 1;\r\n\r\n if r = -1 then\r\n Exit;\r\n\r\n if RowHeader then\r\n inc(r);\r\n\r\n if r < RowCount then\r\n LoadRow(r);\r\n end;\r\nend;\r\n\r\ndestructor TDBTableControl.Destroy;\r\nbegin\r\n FDataLink.Free;\r\n FColumns.Free;\r\n inherited;\r\nend;\r\n\r\nfunction TDBTableControl.GetDataSource: TDataSource;\r\nbegin\r\n Result := FDataLink.DataSource;\r\nend;\r\n\r\nprocedure TDBTableControl.LoadData;\r\nvar\r\n c,r,i: integer;\r\n lField: TField;\r\n noflds: boolean;\r\n cd,cn: string;\r\n ce: TJSHTMLElement;\r\n bk: TBookmark;\r\n isBOF, isEOF: boolean;\r\n scrollevent: TDataSetNotifyEvent;\r\nbegin\r\n isBOF := DataSource.DataSet.BOF;\r\n isEOF := DataSource.DataSet.EOF;\r\n\r\n bk := DataSource.DataSet.GetBookmark;\r\n\r\n DataSource.DataSet.DisableControls;\r\n\r\n scrollevent := DataSource.DataSet.AfterScroll;\r\n DataSource.DataSet.AfterScroll := nil;\r\n\r\n DataSource.DataSet.First;\r\n\r\n if RowHeader then\r\n r := 1\r\n else\r\n r := 0;\r\n\r\n noflds := true;\r\n\r\n for i := 0 to Columns.Count - 1 do\r\n begin\r\n if Columns[i].DataField <> '' then\r\n noflds := false;\r\n end;\r\n\r\n FDefaultFields := noflds;\r\n\r\n if noflds and (Columns.Count > 0) then\r\n begin\r\n for i := 0 to DataSource.DataSet.FieldCount - 1 do\r\n begin\r\n if i >= Columns.Count then\r\n Columns.Add;\r\n\r\n with Columns[i] do\r\n begin\r\n if DataField = '' then\r\n DataField := DataSource.DataSet.Fields[i].FieldName;\r\n if Title = '' then\r\n Title := DataSource.DataSet.Fields[i].DisplayLabel;\r\n end;\r\n end;\r\n end;\r\n\r\n if Columns.Count = 0 then\r\n begin\r\n for c := 0 to DataSource.DataSet.FieldCount - 1 do\r\n begin\r\n with Columns.Add do\r\n begin\r\n lField := DataSource.DataSet.Fields[c];\r\n DataField := lField.FieldName;\r\n Title := DataField;\r\n if (lField is TBlobField) and not (lField is TMemoField) then\r\n begin\r\n DataType := cdMemo;\r\n end;\r\n end;\r\n end;\r\n end;\r\n\r\n ColCount := Columns.Count;\r\n RowCount := DataSource.DataSet.RecordCount + r;\r\n\r\n if RowHeader then\r\n begin\r\n for c := 0 to ColCount - 1 do\r\n begin\r\n lField := nil;\r\n\r\n if (Columns[c].DataField <> '') then\r\n begin\r\n try\r\n lField := DataSource.DataSet.FieldByName(Columns[c].DataField);\r\n except\r\n lField := nil;\r\n end;\r\n end;\r\n\r\n cd := Columns[c].Title;\r\n\r\n GetCellData(c, 0, nil, cd);\r\n Cells[c, 0] := cd;\r\n\r\n cn := Columns[c].TitleElementClassName;\r\n\r\n ce := TJSHTMLElement(CellElements[c,0]);\r\n\r\n GetCellChildren(c, 0, lField, cd, ce);\r\n\r\n GetCellClassName(c, 0, lField, cd, cn);\r\n\r\n if Assigned(ce) and (cn <> '') then\r\n ce.setAttribute('class',cn);\r\n end;\r\n end;\r\n\r\n // load all rows\r\n\r\n while not DataSource.DataSet.EOF do\r\n begin\r\n LoadRow(r);\r\n inc(r);\r\n DataSource.DataSet.Next;\r\n end;\r\n\r\n if DataSource.DataSet.Filtered then\r\n RowCount := r;\r\n\r\n if DataSource.DataSet.BookmarkValid(bk) then\r\n DataSource.DataSet.GotoBookmark(bk);\r\n\r\n if isBOF then\r\n DataSource.DataSet.First;\r\n\r\n if isEOF then\r\n DataSource.DataSet.Last;\r\n\r\n DataSource.DataSet.EnableControls;\r\n DataSource.DataSet.AfterScroll := scrollevent;\r\nend;\r\n\r\nprocedure TDBTableControl.Loaded;\r\nbegin\r\n inherited;\r\n ColCount := Columns.Count;\r\n\r\n if Assigned(DataSource) and Assigned(DataSource.DataSet) and DataSource.DataSet.Active then\r\n begin\r\n FDataChanging := true;\r\n LoadData;\r\n FDataChanging := false;\r\n end;\r\nend;\r\n\r\nprocedure TDBTableControl.LoadRow(ARow: integer);\r\nvar\r\n c,r,cr: integer;\r\n lField: TField;\r\n cd,cn,wcss: string;\r\n ce: TJSHTMLElement;\r\n\r\nbegin\r\n c := 0;\r\n r := ARow;\r\n\r\n for c := 0 to ColCount - 1 do\r\n begin\r\n lField := nil;\r\n cd := '';\r\n wcss := '';\r\n\r\n cr := r;\r\n\r\n if Columns[c].Width > 0 then\r\n wcss := 'width:'+Columns[c].Width.Tostring+'px;overflow:hidden;text-overflow:ellipsis;max-width:'+Columns[c].Width.ToString+'px;white-space:nowrap';\r\n\r\n if (Columns[c].DataField <> '') then\r\n begin\r\n try\r\n lField := DataSource.DataSet.FieldByName(Columns[c].DataField);\r\n except\r\n lField := nil;\r\n end;\r\n if Assigned(lField) then\r\n cd := TableFieldToCellData(ce, lField, Columns[c].DataType, false);\r\n end;\r\n\r\n GetCellData(c,r,lField,cd);\r\n\r\n Cells[c,r] := cd;\r\n\r\n cn := Columns[c].ElementClassName;\r\n\r\n if InVisiblePage(cr) then\r\n begin\r\n ce := TJSHTMLElement(CellElements[c,cr]);\r\n\r\n if Assigned(ce) then\r\n begin\r\n\r\n if wcss <> '' then\r\n ce['style'] := wcss;\r\n\r\n GetCellChildren(c, r, lField, cd, ce);\r\n\r\n GetCellClassName(c, r, lField, cd, cn);\r\n\r\n if Assigned(ce) and (cn <> '') then\r\n ce.setAttribute('class',cn);\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TDBTableControl.SetColumns(const Value: TTableControlColumns);\r\nbegin\r\n FColumns.Assign(Value);\r\nend;\r\n\r\nprocedure TDBTableControl.SetDataSource(const Value: TDataSource);\r\nbegin\r\n FDataLink.DataSource := Value;\r\nend;\r\n\r\n{ TTableControlColumns }\r\n\r\nfunction TTableControlColumns.Add: TTableControlColumn;\r\nbegin\r\n Result := TTableControlColumn(inherited Add);\r\nend;\r\n\r\nprocedure TTableControlColumns.Changed;\r\nbegin\r\n if Assigned(OnChange) then\r\n OnChange(Self);\r\nend;\r\n\r\nconstructor TTableControlColumns.Create(AOwner: TComponent);\r\nbegin\r\n inherited Create(AOwner, TTableControlColumn);\r\nend;\r\n\r\nfunction TTableControlColumns.GetItem(Index: integer): TTableControlColumn;\r\nbegin\r\n Result := TTableControlColumn(inherited Items[Index]);\r\nend;\r\n\r\nfunction TTableControlColumns.Insert(Index: integer): TTableControlColumn;\r\nbegin\r\n Result := TTableControlColumn(inherited Insert(Index));\r\nend;\r\n\r\nprocedure TTableControlColumns.SetItem(Index: integer;\r\n const Value: TTableControlColumn);\r\nbegin\r\n inherited Items[Index] := Value;\r\nend;\r\n\r\nprocedure TTableControlColumns.Update(Item: TCollectionItem);\r\nbegin\r\n inherited;\r\n Changed;\r\nend;\r\n\r\n{ TDBDataLink }\r\n\r\nprocedure TDBDataLink.ActiveChanged;\r\nbegin\r\n inherited;\r\n if Assigned(OnActiveChange) then\r\n OnActiveChange(Self);\r\nend;\r\n\r\nprocedure TDBDataLink.DataSetScrolled(Distance: Longint);\r\nbegin\r\n inherited;\r\n if Assigned(OnDataScroll) then\r\n OnDataScroll(Self, Distance);\r\nend;\r\n\r\nprocedure TDBDataLink.DataSetChanged;\r\nbegin\r\n inherited;\r\n if Assigned(OnDataChange) then\r\n OnDataChange(Self);\r\nend;\r\n\r\nprocedure TDBDataLink.RecordChanged(Field: TField);\r\nbegin\r\n inherited;\r\n if Assigned(OnRecordChange) then\r\n OnRecordChange(Self);\r\nend;\r\n\r\nprocedure TDBDataLink.UpdateData;\r\nbegin\r\n inherited;\r\n if Assigned(OnUpdateData) then\r\n OnUpdateData(Self);\r\nend;\r\n\r\n{ TTableControlColumn }\r\n\r\nprocedure TTableControlColumn.Assign(Source: TPersistent);\r\nbegin\r\n if (Source is TTableControlColumn) then\r\n begin\r\n FClassName := (Source as TTableControlColumn).ElementClassName;\r\n FDataField := (Source as TTableControlColumn).DataField;\r\n FTitle := (Source as TTableControlColumn).Title;\r\n FTitleClassName := (Source as TTableControlColumn).TitleElementClassName;\r\n FDataType := (Source as TTableControlColumn).DataType;\r\n FTag := (Source as TTableControlColumn).Tag;\r\n FWidth := (Source as TTableControlColumn).Width;\r\n end;\r\nend;\r\n\r\nprocedure TTableControlColumn.SetDataField(const Value: TDataField);\r\nbegin\r\n if FDataField <> Value then\r\n begin\r\n FDataField := Value;\r\n (Collection as TTableControlColumns).Update(Self);\r\n end;\r\nend;\r\n\r\nprocedure TTableControlColumn.SetTitle(const Value: string);\r\nbegin\r\n if FTitle <> Value then\r\n begin\r\n FTitle := Value;\r\n (Collection as TTableControlColumns).Update(Self);\r\n end;\r\nend;\r\n\r\nprocedure TTableControlColumn.SetWidth(const Value: integer);\r\nbegin\r\n FWidth := Value;\r\n ((Collection as TTableControlColumns).Owner as TDBTableControl).ColWidths[Index] := FWidth;\r\nend;\r\n\r\n{ TDBImageControl }\r\n\r\nprocedure TDBImageControl.ActiveChange(Sender: TObject);\r\nbegin\r\n if Assigned(FDataLink.DataSet) then\r\n begin\r\n if not FDataLink.DataSet.Active or not DataSource.Enabled then\r\n URL := ''\r\n else\r\n DataChange(Self);\r\n end;\r\nend;\r\n\r\nprocedure TDBImageControl.CreateInitialize;\r\nbegin\r\n if not Assigned(FDataLink) then\r\n begin\r\n FDataLink := TFieldDataLink.Create;\r\n FDataLink.OnDataChange := DataChange;\r\n FDataLink.OnActiveChange := ActiveChange;\r\n end;\r\n\r\n inherited;\r\nend;\r\n\r\nprocedure TDBImageControl.DataChange(Sender: TObject);\r\nvar\r\n AURL, LContents: string;\r\nbegin\r\n if not Assigned(FDataLink.DataSet) then\r\n Exit;\r\n\r\n if not Assigned(FDataLink.Field) then\r\n FDataLink.UpdateField;\r\n\r\n if Assigned(FDataLink.Field) and not FDataLink.DataSet.IsEmpty then\r\n begin\r\n if (FDataLink.Field is TBlobField) then\r\n begin\r\n LContents := string(FDataLink.Field.AsJSValue);\r\n if (length(LContents) > 0) and (LContents <> 'null') then\r\n begin\r\n AURL := 'data:image/jpeg;base64,' + LContents;\r\n end \r\n else \r\n begin\r\n AURL := EmptyImage;\r\n end;\r\n end \r\n else \r\n begin\r\n AURL := BaseURL + FDataLink.Field.DisplayText;\r\n end;\r\n\r\n if Assigned(OnSetURL) then\r\n OnSetURL(Self, AURL);\r\n URL := AURL;\r\n end;\r\nend;\r\n\r\ndestructor TDBImageControl.Destroy;\r\nbegin\r\n FDataLink.Free;\r\n inherited;\r\nend;\r\n\r\nfunction TDBImageControl.GetDataField: TDataField;\r\nbegin\r\n Result := FDataLink.FieldName;\r\nend;\r\n\r\nfunction TDBImageControl.GetDataSource: TDataSource;\r\nbegin\r\n Result := FDataLink.DataSource;\r\nend;\r\n\r\nprocedure TDBImageControl.SetDataField(const Value: TDataField);\r\nbegin\r\n FDataLink.FieldName := Value;\r\n FDataLink.UpdateField;\r\n ActiveChange(Self);\r\nend;\r\n\r\nprocedure TDBImageControl.SetDataSource(const Value: TDataSource);\r\nbegin\r\n FDataLink.DataSource := Value;\r\nend;\r\n\r\n{ TDBResponsiveGrid }\r\n\r\nprocedure TDBResponsiveGrid.ActiveChange(Sender: TObject);\r\nbegin\r\n if Assigned(FDataLink.DataSource) and Assigned(FDataLink.DataSource.DataSet) and FDataLink.DataSource.DataSet.Active then\r\n begin\r\n FDataChanging := true;\r\n LoadData;\r\n FDataChanging := false;\r\n end\r\n else\r\n Items.Clear;\r\nend;\r\n\r\nprocedure TDBResponsiveGrid.CreateInitialize;\r\nbegin\r\n inherited;\r\n FDataChanging := false;\r\n if not Assigned(FDataLink) then\r\n begin\r\n FDataLink := TDBDataLink.Create;\r\n FDataLink.OnActiveChange := ActiveChange;\r\n FDataLink.OnRecordChange := DataChange;\r\n end;\r\n FModifying := false;\r\nend;\r\n\r\nprocedure TDBResponsiveGrid.DataChange(Sender: TObject);\r\nvar\r\n nstate: TDataSetState;\r\n i: integer;\r\nbegin\r\n if Assigned(FDataLink.DataSource) and Assigned(FDataLink.DataSource.DataSet) and FDataLink.DataSource.DataSet.Active and not FModifying then\r\n begin\r\n nstate := FOldState;\r\n FOldState := FDataLink.DataSet.State;\r\n\r\n if not FDataChanging and (FRecordCount <> FDataLink.DataSet.RecordCount) then\r\n begin\r\n FDataChanging := true;\r\n LoadData;\r\n FDataChanging := false;\r\n end\r\n else\r\n if not FDataChanging and (nstate = dsEdit) and (FDataLink.DataSet.State = dsBrowse) then\r\n begin\r\n FDataChanging := true;\r\n LoadData;\r\n FDataChanging := false;\r\n end;\r\n\r\n for i := 0 to Items.Count - 1 do\r\n begin\r\n if TResponsiveGridItemEx(Items[i]).RecNo = FDataLink.DataSource.DataSet.RecNo then\r\n begin\r\n ItemIndex := i;\r\n break;\r\n end;\r\n end;\r\n\r\n end;\r\nend;\r\n\r\ndestructor TDBResponsiveGrid.Destroy;\r\nbegin\r\n FDataLink.Free;\r\n inherited;\r\nend;\r\n\r\nfunction TDBResponsiveGrid.GetDataSource: TDataSource;\r\nbegin\r\n Result := FDataLink.DataSource;\r\nend;\r\n\r\nprocedure TDBResponsiveGrid.HandleDoItemClick(Index: integer);\r\nbegin\r\n if Assigned(FDataLink.DataSource) and Assigned(FDataLink.DataSource.DataSet) and FDataLink.DataSource.DataSet.Active then\r\n begin\r\n FModifying := true;\r\n\r\n if (Index >= 0) and (Index < Items.Count) then\r\n FDataLink.DataSource.DataSet.RecNo := TResponsiveGridItemEx(Items[Index]).RecNo;\r\n FModifying := false;\r\n end;\r\n inherited;\r\nend;\r\n\r\nprocedure TDBResponsiveGrid.Refresh;\r\nbegin\r\n LoadData;\r\nend;\r\n\r\nprocedure TDBResponsiveGrid.LoadData;\r\nvar\r\n html, ident, htmlvalue: string;\r\n c: integer;\r\n itm: TResponsiveGridItem;\r\n bk: TBookmark;\r\n scrollevent: TDataSetNotifyEvent;\r\n\r\nbegin\r\n // get the items from the dataset here\r\n if Assigned(FDataLink.DataSource) and Assigned(FDataLink.DataSource.DataSet) and FDataLink.DataSource.DataSet.Active then\r\n begin\r\n FDataLink.DataSource.DataSet.DisableControls;\r\n\r\n scrollevent := DataSource.DataSet.AfterScroll;\r\n DataSource.DataSet.AfterScroll := nil;\r\n\r\n bk := FDataLink.DataSet.GetBookmark;\r\n\r\n Items.Clear;\r\n\r\n FDataLink.DataSource.DataSet.First;\r\n\r\n while not FDataLink.DataSource.DataSet.EOF do\r\n begin\r\n itm := Items.Add;\r\n\r\n TResponsiveGridItemEx(itm).RecNo := FDataLink.DataSource.DataSet.RecNo;\r\n\r\n html := Options.ItemTemplate;\r\n\r\n ident := '(%ITEMINDEX%)';\r\n if pos(ident, html) > 0 then\r\n begin\r\n html := StringReplace(html, ident, inttostr(itm.Index), [rfReplaceAll]);\r\n end;\r\n\r\n for c := 0 to FDataLink.DataSource.DataSet.Fields.Count - 1 do\r\n begin\r\n ident := '(%' + FDataLink.DataSource.DataSet.Fields[c].FieldName + '%)';\r\n if Pos(Uppercase(ident), Uppercase(html)) > 0 then\r\n begin\r\n htmlvalue := FDataLink.DataSource.DataSet.Fields[c].DisplayText;\r\n DoItemGetFieldValue(itm.Index, FDataLink.DataSource.DataSet.Fields[c].FieldName, htmlvalue);\r\n html := StringReplace(html, ident, htmlvalue, [rfReplaceAll, rfIgnoreCase]);\r\n end;\r\n end;\r\n\r\n itm.HTML := html;\r\n\r\n DoItemCreated(itm.Index);\r\n\r\n FDataLink.DataSource.DataSet.Next;\r\n end;\r\n\r\n FRecordCount := FDataLink.DataSet.RecordCount;\r\n\r\n if DataSource.DataSet.BookmarkValid(bk) then\r\n FDataLink.DataSet.GotoBookMark(bk);\r\n\r\n FDataLink.DataSource.DataSet.EnableControls;\r\n\r\n DataSource.DataSet.AfterScroll := scrollevent;\r\n end\r\n else\r\n Items.Clear;\r\nend;\r\n\r\nprocedure TDBResponsiveGrid.OptionsChanged(Sender: TObject);\r\nbegin\r\n inherited;\r\n LoadData;\r\nend;\r\n\r\nprocedure TDBResponsiveGrid.SetDataSource(const Value: TDataSource);\r\nbegin\r\n FDataLink.DataSource := Value;\r\n LoadData;\r\nend;\r\n\r\n\r\n{ TGridColumn }\r\n\r\nprocedure TGridColumn.Assign(Source: TPersistent);\r\nbegin\r\n if (Source is TTableControlColumn) then\r\n begin\r\n FClassName := (Source as TGridColumn).ElementClassName;\r\n FDataField := (Source as TGridColumn).DataField;\r\n FTitle := (Source as TGridColumn).Title;\r\n FTitleClassName := (Source as TGridColumn).TitleElementClassName;\r\n FDataType := (Source as TGridColumn).DataType;\r\n FWidth := (Source as TGridColumn).Width;\r\n FEditor := (Source as TGridColumn).Editor;\r\n FEditMask := (Source as TGridColumn).EditMask;\r\n FComboBoxItems.Assign((Source as TGridColumn).ComboBoxItems);\r\n FTag := (Source as TGridColumn).Tag;\r\n FDBField := (Source as TGridColumn).DBField;\r\n FImageWidth := (Source as TGridColumn).ImageWidth;\r\n FAlignment := (Source as TGridColumn).Alignment;\r\n FAutoFormatDateTime := (Source as TGridColumn).AutoFormatDateTime;\r\n end;\r\nend;\r\n\r\nconstructor TGridColumn.Create(Collection: TCollection);\r\nbegin\r\n inherited;\r\n FWidth := 64;\r\n FDataType := cdText;\r\n FComboBoxItems := TStringList.Create;\r\n FAutoFormatDateTime := true;\r\nend;\r\n\r\ndestructor TGridColumn.Destroy;\r\nbegin\r\n FComboBoxItems.Free;\r\n inherited;\r\nend;\r\n\r\nfunction TGridColumn.GetDBField: TField;\r\nvar\r\n grd: TDBGrid;\r\nbegin\r\n if (DataField <> '') and (DBField = nil) then\r\n begin\r\n grd := TDBGrid((Collection as TGridColumns).Owner);\r\n if Assigned(grd) and Assigned(grd.DataSource) and Assigned(grd.DataSource.DataSet) then\r\n\r\n try\r\n DBField := grd.DataSource.DataSet.FieldByName(DataField);\r\n except\r\n DBField := nil;\r\n end;\r\n end;\r\n\r\n Result := DBField;\r\nend;\r\n\r\nprocedure TGridColumn.SetAlignment(const Value: TAlignment);\r\nvar\r\n grd: TDBGrid;\r\nbegin\r\n FAlignment := Value;\r\n grd := TDBGrid((Collection as TGridColumns).Owner);\r\n grd.ColAlignments[Index + grd.FixedCols] := FAlignment;\r\nend;\r\n\r\nprocedure TGridColumn.SetComboBoxItems(const Value: TStrings);\r\nbegin\r\n FComboBoxItems := Value;\r\nend;\r\n\r\nprocedure TGridColumn.SetDataField(const Value: TDataField);\r\nbegin\r\n if FDataField <> Value then\r\n begin\r\n FDataField := Value;\r\n (Collection as TGridColumns).Update(Self);\r\n FDBField := nil;\r\n end;\r\nend;\r\n\r\nprocedure TGridColumn.SetSortIndicator(const Value: TGridSortIndicator);\r\nvar\r\n i: integer;\r\nbegin\r\n for i := 0 to (Collection as TGridColumns).Count - 1 do\r\n begin\r\n if (Collection as TGridColumns).Items[i].FSortIndicator <> siNone then\r\n begin\r\n (Collection as TGridColumns).Items[i].FSortIndicator := siNone;\r\n if Assigned((Collection as TGridColumns).OnSortIndicatorChange) then\r\n (Collection as TGridColumns).OnSortIndicatorChange((Collection as TGridColumns), i, siNone);\r\n end;\r\n end;\r\n\r\n FSortIndicator := Value;\r\n\r\n if Assigned((Collection as TGridColumns).OnSortIndicatorChange) then\r\n (Collection as TGridColumns).OnSortIndicatorChange((Collection as TGridColumns), Index, FSortIndicator);\r\nend;\r\n\r\nprocedure TGridColumn.SetTitle(const Value: string);\r\nbegin\r\n if FTitle <> Value then\r\n begin\r\n FTitle := Value;\r\n (Collection as TGridColumns).Update(Self);\r\n end;\r\nend;\r\n\r\n\r\nprocedure TGridColumn.SetWidth(const Value: integer);\r\nbegin\r\n if (FWidth <> Value) then\r\n begin\r\n FWidth := Value;\r\n (Collection as TGridColumns).Update(Self);\r\n end;\r\nend;\r\n\r\n{ TGridColumns }\r\n\r\nfunction TGridColumns.Add: TGridColumn;\r\nbegin\r\n Result := TGridColumn(inherited Add);\r\nend;\r\n\r\nprocedure TGridColumns.Changed;\r\nbegin\r\n if Assigned(OnChange) then\r\n OnChange(Self);\r\nend;\r\n\r\nconstructor TGridColumns.Create(AOwner: TComponent);\r\nbegin\r\n inherited Create(AOwner, TGridColumn);\r\nend;\r\n\r\nfunction TGridColumns.GetItem(Index: integer): TGridColumn;\r\nbegin\r\n Result := TGridColumn(inherited Items[Index]);\r\nend;\r\n\r\nfunction TGridColumns.Insert(Index: integer): TGridColumn;\r\nbegin\r\n Result := TGridColumn(inherited Insert(Index));\r\nend;\r\n\r\nprocedure TGridColumns.SetItem(Index: integer;\r\n const Value: TGridColumn);\r\nbegin\r\n inherited Items[Index] := Value;\r\nend;\r\n\r\nprocedure TGridColumns.Update(Item: TCollectionItem);\r\nbegin\r\n inherited;\r\n Changed;\r\nend;\r\n\r\n{ TDBGrid }\r\n\r\nprocedure TDBGrid.ActiveChange(Sender: TObject);\r\nvar\r\n c: integer;\r\nbegin\r\n if Assigned(FDataLink.DataSource) and Assigned(FDataLink.DataSource.DataSet) and FDataLink.DataSource.DataSet.Active then\r\n begin\r\n FDataChanging := true;\r\n LoadData;\r\n FDataChanging := false;\r\n end\r\n else\r\n begin\r\n Clear;\r\n RowCount := FixedRows;\r\n if FDefaultFields then\r\n Columns.Clear;\r\n for c := 0 to Columns.Count - 1 do\r\n Columns[c].DBField := nil;\r\n\r\n FOldIndicator := -1;\r\n end;\r\nend;\r\n\r\nprocedure TDBGrid.CancelEdit;\r\nbegin\r\n inherited;\r\n if Assigned(FDataLink.DataSource) and Assigned(FDataLink.DataSource.DataSet) and FDataLink.DataSource.DataSet.Active then\r\n begin\r\n FDataLink.DataSource.DataSet.Cancel;\r\n end;\r\n\r\nend;\r\n\r\nfunction TDBGrid.CanEditCell(ACol, ARow: integer): boolean;\r\nvar\r\n fld: TField;\r\nbegin\r\n Result := inherited;\r\n\r\n if Result and (ACol - FixedCols < Columns.Count) and (ACol >= FixedCols) then\r\n begin\r\n fld := Columns[ACol - FixedCols].DBField;\r\n if Assigned(fld) and fld.readOnly then\r\n begin\r\n Result := false;\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TDBGrid.CanRowAdvance: boolean;\r\nbegin\r\n Result := false;\r\nend;\r\n\r\nprocedure TDBGrid.ChangeRow;\r\nbegin\r\n inherited;\r\nend;\r\n\r\nprocedure TDBGrid.ColumnsChanged(Sender: TObject);\r\nvar\r\n c: integer;\r\nbegin\r\n if not Assigned(ElementHandle) or IsUpdating then\r\n Exit;\r\n\r\n ColCount := Columns.Count + FixedCols;\r\n\r\n if (FixedRows > 0) and (RowCount > 0) then\r\n begin\r\n for c := 0 to Columns.Count - 1 do\r\n begin\r\n Cells[c + FixedCols, 0] := Columns[c].Title;\r\n ColWidths[c + FixedCols] := Columns[c].Width;\r\n end;\r\n end;\r\n\r\nend;\r\n\r\nprocedure TDBGrid.CreateInitialize;\r\nbegin\r\n inherited;\r\n if not Assigned(FDataLink) then\r\n begin\r\n FDataLink := TDBDataLink.Create;\r\n FDataLink.OnActiveChange := ActiveChange;\r\n FDataLink.OnRecordChange := RecordChange;\r\n FDataLink.OnDataChange := DataChange;\r\n FDataLink.OnUpdateData := UpdateData;\r\n FDataLink.OnDataScroll := DataScroll;\r\n end;\r\n if not Assigned(FColumns) then\r\n begin\r\n FColumns := TGridColumns.Create(Self);\r\n FColumns.OnChange := ColumnsChanged;\r\n FColumns.OnSortIndicatorChange := DoSortIndicatorChange;\r\n FColumns.PropName := 'Columns';\r\n end;\r\n FModifying := false;\r\n FDefaultFields := false;\r\n FDataChanging := false;\r\n FOldIndicator := -1;\r\n FShowIndicator := true;\r\nend;\r\n\r\nprocedure TDBGrid.DataChange(Sender: TObject);\r\nvar\r\n r: integer;\r\n LOldRow,LOldCol: integer;\r\n filterchange,appendmode: boolean;\r\nbegin\r\n if FDataChanging then\r\n Exit;\r\n\r\n if (FOldState <> FDataLink.DataSource.DataSet.State) and not FModifying then\r\n begin\r\n if EditMode and (FOldState in [dsEdit, dsInsert]) then\r\n begin\r\n StopEdit;\r\n end;\r\n\r\n // handle reindex\r\n if (FOldState in [dsInactive]) and (FDataLink.DataSource.DataSet.State = dsBrowse) then\r\n begin\r\n// if (RowCount <> FDataLink.DataSource.DataSet.RecordCount + FixedRows) then\r\n begin\r\n FDataChanging := true;\r\n LoadData;\r\n FDataChanging := false;\r\n FOldState := FDataLink.DataSource.DataSet.State;\r\n end;\r\n\r\n Exit;\r\n end;\r\n\r\n // handle after insert\r\n if (FOldState in [dsInsert]) then\r\n begin\r\n FDataChanging := true;\r\n LoadData;\r\n FDataChanging := false;\r\n FOldState := FDataLink.DataSource.DataSet.State;\r\n Exit;\r\n end;\r\n end;\r\n\r\n// handle sort - datasetchange and stays in dsBrowse state\r\n if (FOldState in [dsBrowse]) and (FDataLink.DataSource.DataSet.State = dsBrowse) then\r\n begin\r\n FDataChanging := true;\r\n LoadData;\r\n FDataChanging := false;\r\n FOldState := FDataLink.DataSource.DataSet.State;\r\n Exit;\r\n end;\r\n\r\n FOldState := FDataLink.DataSource.DataSet.State;\r\n\r\n if (FOldState in [{dsInsert,} dsEdit]) then\r\n Exit;\r\n\r\n FDataChanging := true;\r\n\r\n if Assigned(FDataLink.DataSource) and Assigned(FDataLink.DataSource.DataSet) and FDataLink.DataSource.DataSet.Active and not FModifying and not EditMode then\r\n begin\r\n filterchange := (FOldFiltered <> FDataLink.DataSource.DataSet.Filtered);\r\n\r\n if (RowCount <> FDataLink.DataSource.DataSet.RecordCount + FixedRows) or filterchange then\r\n begin\r\n FOldFiltered := FDataLink.DataSource.DataSet.Filtered;\r\n FModifying := true;\r\n\r\n LOldRow := Row;\r\n LOldCol := Col;\r\n\r\n FDataChanging := true;\r\n LoadData;\r\n FDataChanging := false;\r\n if filterchange then\r\n begin\r\n FDataLink.DataSource.DataSet.First;\r\n if RowCount > FixedRows then\r\n Row := FixedRows;\r\n end;\r\n\r\n FModifying := false;\r\n SelectCell(LOldCol,LOldRow);\r\n end\r\n else\r\n begin\r\n r := FixedRows + FDataLink.DataSource.DataSet.RecNo - 1;\r\n\r\n if (FOldState = dsInsert) then\r\n begin\r\n LOldCol := Col;\r\n RowCount := RowCount + 1;\r\n Row := Max(r, FixedRows);\r\n Col := LOldCol;\r\n\r\n // difference between Post & Insert -> skip this InsertData for an Append\r\n appendmode := not FDataLink.Bof and FDataLink.Eof;\r\n if not appendmode then\r\n InsertData(Row);\r\n //r := RowCount - 1;\r\n //Row := RowCount - 1;\r\n //LoadRow(Row);\r\n end\r\n else\r\n begin\r\n if (FOldState <> dsBrowse) or (FDataLink.DataSource.DataSet.State <> dsBrowse) then\r\n LoadData;\r\n\r\n Row := r;\r\n end;\r\n\r\n UpdateIndicator(r);\r\n end;\r\n end;\r\n\r\n FDataChanging := false;\r\nend;\r\n\r\nprocedure TDBGrid.DataScroll(Sender: TObject; Distance: integer);\r\nbegin\r\n if Assigned(FDataLink.DataSource) and Assigned(FDataLink.DataSource.DataSet) and FDataLink.DataSource.DataSet.Filtered then\r\n begin\r\n Row := Row + Distance;\r\n UpdateIndicator(Row);\r\n end;\r\nend;\r\n\r\nprocedure TDBGrid.RecordChange(Sender: TObject);\r\nvar\r\n r: integer;\r\nbegin\r\n if Assigned(FDataLink.DataSource) and Assigned(FDataLink.DataSource.DataSet) and FDataLink.DataSource.DataSet.Active then\r\n begin\r\n if not FModifying and not EditMode then\r\n begin\r\n if not FDataLink.DataSource.DataSet.Filtered then\r\n r := FixedRows + FDataLink.DataSource.DataSet.RecNo - 1;\r\n\r\n FOldState := dsOldValue;\r\n\r\n if FDataLink.DataSource.DataSet.State = dsInsert then\r\n begin\r\n\r\n end\r\n else\r\n if (r <= RowCount - 1) and not FDataLink.DataSource.DataSet.Filtered then\r\n begin\r\n Row := r;\r\n LoadRow(r);\r\n end\r\n else\r\n begin\r\n FModifying := true;\r\n LoadData;\r\n\r\n if not FDataLink.DataSource.DataSet.Filtered then\r\n Row := r;\r\n\r\n FModifying := false;\r\n end;\r\n\r\n if not FDataLink.DataSource.DataSet.Filtered then\r\n begin\r\n UpdateIndicator(r);\r\n end;\r\n end\r\n else\r\n begin\r\n if EditMode then\r\n LoadRow(Row);\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TDBGrid.Refresh;\r\nbegin\r\n LoadData;\r\nend;\r\n\r\nprocedure TDBGrid.ReadStubProp(AReader: TReader);\r\nbegin\r\nend;\r\n\r\nprocedure TDBGrid.WriteStubProp(AWriter: TWriter);\r\nbegin\r\nend;\r\n\r\nprocedure TDBGrid.DefineProperties(AFiler: TFiler);\r\nbegin\r\n inherited DefineProperties(AFiler);\r\n AFiler.DefineProperty('ColWidths', @ReadStubProp, @WriteStubProp, False);\r\n AFiler.DefineProperty('RowHeights', @ReadStubProp, @WriteStubProp, False);\r\n AFiler.DefineProperty('ColAligments', @ReadStubProp, @WriteStubProp, False);\r\nend;\r\n\r\ndestructor TDBGrid.Destroy;\r\nbegin\r\n FDataLink.Free;\r\n FColumns.Free;\r\n inherited;\r\nend;\r\n\r\nprocedure TDBGrid.DoCheckClick(ACol, ARow: Longint; Checked: boolean);\r\nvar\r\n insUpdate: boolean;\r\n fldName: string;\r\n fld: TField;\r\nbegin\r\n inherited;\r\n\r\n SelectCell(ACol,ARow);\r\n\r\n if Assigned(FDataLink.DataSource) and Assigned(FDataLink.DataSource.DataSet) and FDataLink.DataSource.DataSet.Active and (goEditing in Options) then\r\n begin\r\n insupdate := FDataLink.DataSource.DataSet.State in dsEditModes;\r\n fldName := Columns[ACol - FixedCols].DataField;\r\n\r\n if fldName <> '' then\r\n begin\r\n fld := nil;\r\n try\r\n fld := FDataLink.DataSource.DataSet.FieldByName(fldName);\r\n\r\n if not fld.ReadOnly then\r\n begin\r\n if not insupdate then\r\n FDataLink.DataSource.DataSet.Edit;\r\n\r\n fld.AsBoolean := Checked;\r\n end;\r\n except\r\n fld := nil;\r\n end;\r\n\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TDBGrid.DoSortIndicatorChange(Sender: TObject; ACol: integer;\r\n AIndicator: TGridSortIndicator);\r\nvar\r\n s: string;\r\nbegin\r\n s := Columns[ACol].Title;\r\n case AIndicator of\r\n siAscending: s := s + ' ▲';\r\n siDescending: s := s + ' ▼';\r\n end;\r\n Cells[ACol + FixedCols, 0] := s;\r\nend;\r\n\r\nprocedure TDBGrid.EndUpdate;\r\nbegin\r\n ColumnsChanged(Self);\r\n inherited;\r\nend;\r\n\r\nprocedure TDBGrid.GetCellEditor(const ACol, ARow: integer;\r\n var AEditor: TGridCellEditor);\r\nbegin\r\n if (ACol - FixedCols < Columns.Count) and (ACol >= FixedCols) then\r\n begin\r\n AEditor := Columns[ACol - FixedCols].Editor;\r\n ComboBoxItems.Assign(Columns[ACol - FixedCols].ComboBoxItems);\r\n EditMask := Columns[ACol - FixedCols].EditMask;\r\n end;\r\n\r\n inherited;\r\nend;\r\n\r\nfunction TDBGrid.GetDataSource: TDataSource;\r\nbegin\r\n Result := FDataLink.DataSource;\r\nend;\r\n\r\nprocedure TDBGrid.HideEdit(Advance: boolean = false);\r\nbegin\r\n inherited;\r\n UpdateIndicator(Row);\r\nend;\r\n\r\nprocedure TDBGrid.LoadComboItems(const ColIndex: integer; AField: TField);\r\nvar\r\n s,k: string;\r\n bk: TBookmark;\r\nbegin\r\n if AField.FieldKind = fkLookup then\r\n begin\r\n bk := AField.LookupDataSet.GetBookmark;\r\n AField.LookupDataSet.DisableControls;\r\n AField.LookupDataSet.First;\r\n\r\n Columns[ColIndex].ComboBoxItems.Clear;\r\n while not AField.LookupDataSet.Eof do\r\n begin\r\n s := AField.LookupDataSet.FieldByName(AField.LookupResultField).AsString;\r\n k := AField.LookupDataSet.FieldByName(AField.LookupKeyFields).AsString;\r\n Columns[ColIndex].ComboBoxItems.AddPair(s,k);\r\n AField.LookupDataSet.Next;\r\n end;\r\n AField.LookupDataSet.GotoBookmark(bk);\r\n AField.LookupDataSet.EnableControls;\r\n end;\r\n\r\nend;\r\n\r\nfunction TDBGrid.GetLookupKey(const ColIndex: integer; AValue: string): string;\r\nvar\r\n i: integer;\r\n LName, LValue: string;\r\nbegin\r\n Result := '';\r\n\r\n for i := 0 to Columns[ColIndex].ComboBoxItems.Count - 1 do\r\n begin\r\n Columns[ColIndex].ComboBoxItems.GetNameValue(i, LName, LValue);\r\n\r\n if LName = AValue then\r\n begin\r\n Result := LValue;\r\n Break;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TDBGrid.LoadData;\r\nvar\r\n c,r,i,subp: integer;\r\n bk: TBookmark;\r\n noflds: boolean;\r\n isBOF,isEOF: boolean;\r\n LTitle,cn, subclass: string;\r\n fld: TField;\r\n ce: TJSHTMLElement;\r\n ne: TDataSetNotifyEvent;\r\nbegin\r\n noflds := true;\r\n r := 0;\r\n\r\n for i := 0 to Columns.Count - 1 do\r\n begin\r\n if Columns[i].DataField <> '' then\r\n noflds := false;\r\n end;\r\n\r\n FDefaultFields := noflds;\r\n\r\n\r\n // only unbound columns found\r\n if noflds and (Columns.Count > 0) then\r\n begin\r\n Columns.BeginUpdate;\r\n\r\n for i := 0 to FDataLink.DataSet.FieldCount - 1 do\r\n begin\r\n\r\n if (FDataLink.DataSet.Fields[i].FieldKind = fkData) and (faHiddenCol in FDataLink.DataSet.Fields[i].FieldDef.Attributes) then\r\n Continue;\r\n\r\n if not FDataLink.DataSet.Fields[i].Visible then\r\n Continue;\r\n\r\n if i >= Columns.Count then\r\n Columns.Add;\r\n\r\n with Columns[i] do\r\n begin\r\n FDataField := FDataLink.DataSet.Fields[i].FieldName;\r\n FTitle := FDataLink.DataSet.Fields[i].DisplayLabel;\r\n\r\n if FDataLink.DataSet.Fields[i].FieldKind = fkLookup then\r\n begin\r\n Editor := geCombo;\r\n LoadComboItems(i, FDataLink.DataSet.Fields[i]);\r\n end;\r\n\r\n if (FDataLink.DataSet.Fields[i].DataType in [ftDate, ftDateTime]) then\r\n Editor := geDate;\r\n\r\n if (FDataLink.DataSet.Fields[i].DataType in [ftMemo]) then\r\n Editor := geMemo;\r\n\r\n if (FDataLink.DataSet.Fields[i].DataType in [ftBoolean]) then\r\n begin\r\n DataType := cdCheck;\r\n end;\r\n\r\n end;\r\n end;\r\n\r\n while (Columns.Count > FDataLink.DataSet.FieldCount) do\r\n begin\r\n Columns.Delete(Columns.Count - 1);\r\n end;\r\n end;\r\n\r\n if (Columns.Count = 0) then\r\n begin\r\n for i := 0 to FDataLink.DataSet.FieldCount - 1 do\r\n begin\r\n if (faHiddenCol in FDataLink.DataSet.Fields[i].FieldDef.Attributes) then\r\n Continue;\r\n\r\n with Columns.Add do\r\n begin\r\n FDataField := FDataLink.DataSet.Fields[i].FieldName;\r\n FTitle := FDataLink.DataSet.Fields[i].DisplayLabel;\r\n end;\r\n end;\r\n Columns.EndUpdate;\r\n end;\r\n\r\n\r\n ColCount := Columns.Count + FixedCols;\r\n\r\n RowCount := FDataLink.DataSource.DataSet.RecordCount + FixedRows;\r\n\r\n RenderGrid;\r\n\r\n isBOF := FDataLink.DataSet.Bof;\r\n isEOF := FDataLink.DataSet.Eof;\r\n\r\n FDataLink.DataSource.DataSet.DisableControls;\r\n\r\n bk := FDataLink.DataSet.GetBookmark;\r\n\r\n ne := FDataLink.DataSet.AfterScroll;\r\n FDataLink.DataSet.AfterScroll := nil;\r\n\r\n FDataLink.DataSource.DataSet.First;\r\n\r\n if FixedRows > 0 then\r\n begin\r\n for c := 0 to Columns.Count - 1 do\r\n begin\r\n LTitle := Columns[c].Title;\r\n case Columns[c].SortIndicator of\r\n siAscending: LTitle := LTitle + ' ▲';\r\n siDescending: LTitle := LTitle + ' ▼';\r\n end;\r\n\r\n Cells[c + FixedCols, r] := LTitle;\r\n\r\n if Columns[c].TitleElementClassName <> '' then\r\n begin\r\n ce := GetDirectCellElements(c + FixedCols, 0);\r\n\r\n if Assigned(ce) then\r\n begin\r\n subclass := Columns[c].TitleElementClassName;\r\n repeat\r\n subp := pos(' ', subclass);\r\n if subp > 0 then\r\n begin\r\n ce.classList.Add(copy(subclass,1,subp - 1));\r\n delete(subclass,1,subp);\r\n end\r\n else\r\n ce.classList.add(subclass);\r\n until subp = 0;\r\n end;\r\n end;\r\n\r\n fld := Columns[c].GetDBField;\r\n\r\n ce := GetDirectCellElements(c + FixedCols, 0);\r\n\r\n GetCellChildren(c + FixedCols, 0, fld, LTitle, ce);\r\n\r\n BindCellChildren(c + FixedCols, 0, ce);\r\n\r\n cn := Columns[c].TitleElementClassName;\r\n\r\n GetCellClassName(c + FixedCols, 0, fld, LTitle, cn);\r\n\r\n if Assigned(ce) and (cn <> '') then\r\n ce.setAttribute('class',cn);\r\n end;\r\n end;\r\n\r\n r := FixedRows;\r\n\r\n {\r\n FDataLink.BufferCount := FDataLink.DataSet.RecordCount;\r\n\r\n for i := 0 to FDataLink.RecordCount - 1 do\r\n begin\r\n FDataLink.ActiveRecord := i;\r\n LoadRow(i + FixedRows);\r\n end;\r\n\r\n FDataLink.ActiveRecord := 0;\r\n }\r\n\r\n while not FDataLink.DataSource.DataSet.EOF do\r\n begin\r\n LoadRow(r);\r\n inc(r);\r\n FDataLink.DataSource.DataSet.Next;\r\n end;\r\n\r\n if FDataLink.DataSource.DataSet.Filtered then\r\n RowCount := r;\r\n\r\n if DataSource.DataSet.BookmarkValid(bk) then\r\n FDataLink.DataSource.DataSet.GotoBookmark(bk);\r\n\r\n if isBOF then\r\n FDataLink.DataSource.DataSet.First;\r\n\r\n if isEOF then\r\n FDataLink.DataSource.DataSet.Last;\r\n\r\n FDataLink.DataSet.AfterScroll := ne;\r\n FDataLink.DataSource.DataSet.EnableControls;\r\nend;\r\n\r\nprocedure TDBGrid.Loaded;\r\nbegin\r\n inherited;\r\n ColumnsChanged(Self);\r\nend;\r\n\r\nprocedure TDBGrid.InsertData(ARow: Integer);\r\nvar\r\n R: Integer;\r\n C: Integer;\r\nbegin\r\n // move all cells down\r\n for R := RowCount - 1 downto ARow + 1 do\r\n begin\r\n for C := 0 to ColCount - 1 do\r\n begin\r\n if (C = 0) and (FixedCols > 0) then\r\n Cells[C, R] := ' '\r\n else\r\n Cells[C, R] := Cells[C, R-1];\r\n end;\r\n end;\r\n LoadRow(ARow);\r\nend;\r\n\r\nprocedure TDBGrid.LoadRow(ARow: integer);\r\nvar\r\n c,r: integer;\r\n fld: TField;\r\n cd,cn: string;\r\n ce: TJSHTMLElement;\r\n\r\nbegin\r\n if ARow < FixedRows then\r\n Exit;\r\n\r\n r := ARow;\r\n\r\n for c := 0 to Columns.Count - 1 do\r\n begin\r\n if EditMode and (c = Col - FixedCols) and (ARow = Row) then\r\n continue;\r\n\r\n cd := '';\r\n ce := GetDirectCellElements(c + FixedCols, r);\r\n\r\n UnBindCellChildren(c,r,ce);\r\n\r\n fld := Columns[c].GetDBField;\r\n\r\n if Assigned(fld) then\r\n begin\r\n cd := FieldToCellData(ce, fld, Columns[c], goEditing in Options);\r\n end;\r\n\r\n GetCellData(c, r, fld, cd);\r\n\r\n Cells[c + FixedCols, r] := cd;\r\n\r\n cn := Columns[c].ElementClassName;\r\n\r\n GetCellChildren(c, r, fld, cd, ce);\r\n\r\n BindCellChildren(c, r, ce);\r\n\r\n GetCellClassName(c, r, fld, cd, cn);\r\n\r\n if cn <> '' then\r\n ce.setAttribute('class',cn);\r\n end;\r\nend;\r\n\r\nprocedure TDBGrid.SelectCell(ACol, ARow: integer);\r\nvar\r\n LOldrow,d: integer;\r\nbegin\r\n LOldrow := Row;\r\n\r\n inherited;\r\n\r\n if Assigned(FDataLink.DataSource) and Assigned(FDataLink.DataSource.DataSet) and FDataLink.DataSource.DataSet.Active then\r\n begin\r\n if (ARow = LOldRow) or (LOldRow < 0) then\r\n Exit;\r\n\r\n FModifying := true;\r\n\r\n d := FDataLink.MoveBy(ARow - LOldRow);\r\n\r\n if d <> 0 then\r\n begin\r\n UpdateIndicator(ARow);\r\n end\r\n else\r\n begin\r\n // reload row when post failed\r\n LoadRow(LOldRow);\r\n UpdateIndicator(LOldRow);\r\n Row := LOldRow;\r\n end;\r\n\r\n FModifying := false;\r\n end;\r\nend;\r\n\r\nprocedure TDBGrid.SetColumns(const Value: TGridColumns);\r\nbegin\r\n FColumns.Assign(Value);\r\nend;\r\n\r\nprocedure TDBGrid.SetDataSource(const Value: TDataSource);\r\nbegin\r\n FDataLink.DataSource := Value;\r\nend;\r\n\r\nprocedure TDBGrid.SetShowIndicator(const Value: boolean);\r\nbegin\r\n FShowIndicator := Value;\r\n UpdateIndicator(Row);\r\nend;\r\n\r\nprocedure TDBGrid.ShowEdit;\r\nvar\r\n fldName: string;\r\n fld: TField;\r\nbegin\r\n if Assigned(FDataLink.DataSource) and Assigned(FDataLink.DataSource.DataSet) and FDataLink.DataSource.DataSet.Active then\r\n begin\r\n fldName := Columns[Col - FixedCols].DataField;\r\n\r\n if (fldName <> '') then\r\n begin\r\n fld := nil;\r\n\r\n try\r\n fld := FDataLink.DataSource.DataSet.FieldByName(fldName);\r\n except\r\n fld := nil;\r\n end;\r\n\r\n if Assigned(fld) and not fld.ReadOnly then\r\n begin\r\n FDataLink.DataSource.DataSet.Edit;\r\n inherited;\r\n end;\r\n end\r\n else\r\n inherited;\r\n end;\r\nend;\r\n\r\nprocedure TDBGrid.StartEdit(ch: string);\r\nvar\r\n lField: TField;\r\nbegin\r\n if (Col > 0) and (Col <= Columns.Count) then\r\n if Columns[Col - 1].DataType in [cdCheck, cdRadio] then\r\n Exit;\r\n\r\n if (Columns[Col - FixedCols].Editor = geCombo) then\r\n begin\r\n if Assigned(DataSource) and Assigned(DataSource.DataSet) and (DataSource.DataSet.Active) and (Columns[Col - FixedCols].DataField <> '') then\r\n begin\r\n try\r\n lField := DataSource.DataSet.FieldByName(Columns[Col - FixedCols].DataField);\r\n except\r\n lField := nil;\r\n end;\r\n\r\n if Assigned(lField) then\r\n LoadComboItems(col - FixedCols, lField);\r\n end;\r\n end;\r\n\r\n inherited StartEdit(ch);\r\n UpdateIndicator(Row);\r\nend;\r\n\r\nfunction TDBGrid.StopEdit: string;\r\nbegin\r\n Result := inherited StopEdit;\r\n UpdateIndicator(Row);\r\nend;\r\n\r\nprocedure TDBGrid.UpdateCell(ACol, ARow: integer; var AValue: string);\r\nvar\r\n fldName, fldValue: string;\r\n insupdate: boolean;\r\n fld: TField;\r\nbegin\r\n inherited;\r\n\r\n if Assigned(FDataLink.DataSource) and Assigned(FDataLink.DataSource.DataSet) and FDataLink.DataSource.DataSet.Active then\r\n begin\r\n insupdate := FDataLink.DataSource.DataSet.State in dsEditModes;\r\n fldName := Columns[ACol - FixedCols].DataField;\r\n\r\n if fldName <> '' then\r\n begin\r\n if not insupdate then\r\n begin\r\n FDataLink.DataSource.DataSet.Edit;\r\n end;\r\n\r\n fld := nil;\r\n\r\n try\r\n fld := FDataLink.DataSource.DataSet.FieldByName(fldName);\r\n\r\n if Assigned(fld) then\r\n begin\r\n if fld.FieldKind = fkLookup then\r\n begin\r\n fldValue := GetLookupKey(ACol - FixedCols, AValue);\r\n FDataLink.DataSource.DataSet.FieldByName(fld.KeyFields).AsString := fldValue;\r\n end\r\n else\r\n if fld.FieldKind <> fkCalculated then\r\n begin\r\n if fld.DataType in [ftDate, ftDateTime] then\r\n begin\r\n fld.AsDateTime := PickerDateToDate(AValue);\r\n end\r\n else\r\n begin\r\n if fld.AsString <> AValue then\r\n begin\r\n fld.AsString := AValue;\r\n end;\r\n end;\r\n end;\r\n end;\r\n except\r\n fld := nil;\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TDBGrid.UpdateData(Sender: TObject);\r\nbegin\r\n if FDataLink.DataSource.DataSet.State = dsInsert then\r\n begin\r\n HideEdit;\r\n end;\r\nend;\r\n\r\nprocedure TDBGrid.UpdateIndicator(ARow: integer);\r\nvar\r\n LSym: string;\r\nbegin\r\n if FixedCols = 0 then\r\n Exit;\r\n\r\n if (FOldIndicator <> ARow) or not FShowIndicator then\r\n begin\r\n if (FOldIndicator >= 0) and (FOldIndicator < RowCount) then\r\n Cells[0, FOldIndicator] := '';\r\n end;\r\n\r\n if FShowIndicator then\r\n begin\r\n if Assigned(FDataLink.DataSource) and Assigned(FDataLink.DataSource.DataSet) and FDataLink.DataSource.DataSet.Active and (Row >= FixedRows) then\r\n begin\r\n if EditMode or (FDataLink.DataSource.DataSet.State = dsEdit) then\r\n begin\r\n LSym := '✎'\r\n end\r\n else\r\n begin\r\n if FDataLink.DataSource.DataSet.State = dsInsert then\r\n LSym := '¦'\r\n else\r\n LSym := '▶';\r\n end;\r\n\r\n Cells[0, ARow] := ' ' + LSym;\r\n end;\r\n end;\r\n\r\n FOldIndicator := ARow;\r\nend;\r\n\r\n{ TDBMaskEdit }\r\n\r\nprocedure TDBMaskEdit.ActiveChange(Sender: TObject);\r\nbegin\r\n UpdateElement;\r\n\r\n if Assigned(FDataLink.DataSet) then\r\n begin\r\n if not FDataLink.DataSet.Active or not DataSource.Enabled then\r\n EditText := ''\r\n else\r\n DataChange(Self);\r\n end;\r\nend;\r\n\r\nfunction TDBMaskEdit.CanCut: boolean;\r\nvar\r\n canedit: boolean;\r\nbegin\r\n if not CheckDataSet then\r\n Exit;\r\n\r\n if ReadOnly then\r\n begin\r\n Result := false;\r\n Exit;\r\n end;\r\n\r\n FEditChange := true;\r\n canedit := EditCanModify;\r\n FEditChange := false;\r\n\r\n if not canedit then\r\n begin\r\n Result := false;\r\n Exit;\r\n end\r\n else\r\n begin\r\n Result := inherited;\r\n FDataLink.Edit;\r\n end;\r\nend;\r\n\r\nfunction TDBMaskEdit.CanPaste(AValue: string): boolean;\r\nbegin\r\n Result := CanCut;\r\nend;\r\n\r\nprocedure TDBMaskEdit.Change;\r\nbegin\r\n inherited;\r\n\r\n if not CheckDataSet then\r\n Exit;\r\n\r\n if DataSource.AutoEdit or (DataSource.DataSet.State in [dsInsert, dsEdit]) then\r\n begin\r\n FDataLink.Modified;\r\n end;\r\nend;\r\n\r\nfunction TDBMaskEdit.CheckDataSet: boolean;\r\nbegin\r\n Result := CheckDB(DataSource, DataField, FDataLink);\r\nend;\r\n\r\nprocedure TDBMaskEdit.CreateInitialize;\r\nbegin\r\n if not Assigned(FDataLink) then\r\n begin\r\n FDataLink := TFieldDataLink.Create;\r\n FDataLink.OnUpdateData := DataUpdate;\r\n FDataLink.OnDataChange := DataChange;\r\n FDataLink.OnActiveChange := ActiveChange;\r\n FEditChange := false;\r\n end;\r\n\r\n inherited;\r\nend;\r\n\r\nprocedure TDBMaskEdit.DataChange(Sender: TObject);\r\nbegin\r\n if FEditChange then\r\n Exit;\r\n\r\n if not Assigned(FDataLink.DataSet) then\r\n Exit;\r\n\r\n if not Assigned(FDataLink.Field) then\r\n FDataLink.UpdateField;\r\n\r\n if Assigned(FDataLink.Field) and not FDataLink.DataSet.IsEmpty then\r\n FFieldText := FDataLink.Field.DisplayText\r\n else\r\n FFieldText := '';\r\n\r\n EditText := FFieldText;\r\nend;\r\n\r\nprocedure TDBMaskEdit.DataUpdate(Sender: TObject);\r\nbegin\r\n if Assigned(FDataLink.Field) then\r\n begin\r\n if not Assigned(FDataLink.Field) then\r\n FDataLink.UpdateField;\r\n\r\n FDataLink.Field.AsString := EditText;\r\n end;\r\nend;\r\n\r\ndestructor TDBMaskEdit.Destroy;\r\nbegin\r\n FDataLink.Free;\r\n inherited;\r\nend;\r\n\r\nprocedure TDBMaskEdit.DoExit;\r\nbegin\r\n if not FDataLink.ReadOnly then\r\n begin\r\n FEditChange := true;\r\n FDataLink.UpdateRecord; // tell data link to update database\r\n end;\r\n\r\n inherited DoExit;\r\n\r\n FEditChange := false;\r\nend;\r\n\r\nfunction TDBMaskEdit.EditCanModify: Boolean;\r\nbegin\r\n if Assigned(DataSource) then\r\n Result := not FDatalink.DataSet.ControlsDisabled and (DataSource.AutoEdit or (FDataLink.DataSet.State in [dsEdit, dsInsert])) and FDataLink.Edit\r\n else\r\n Result := True;\r\nend;\r\n\r\nfunction TDBMaskEdit.GetDataField: TDataField;\r\nbegin\r\n Result := FDataLink.FieldName;\r\nend;\r\n\r\nfunction TDBMaskEdit.GetDataSource: TDataSource;\r\nbegin\r\n Result := FDataLink.DataSource;\r\nend;\r\n\r\nfunction TDBMaskEdit.GetDisplayText: string;\r\nbegin\r\n if not CheckDataSet then\r\n begin\r\n Result := '';\r\n end\r\n else\r\n Result := inherited GetDisplayText;\r\nend;\r\n\r\nfunction TDBMaskEdit.IsEnabled: boolean;\r\nbegin\r\n Result := Enabled and CheckDataSet;\r\nend;\r\n\r\nfunction TDBMaskEdit.IsReadOnly: boolean;\r\nbegin\r\n Result := ReadOnly or not CheckDataSet;\r\nend;\r\n\r\nprocedure TDBMaskEdit.KeyDown(var Key: Word; Shift: TShiftState);\r\nvar\r\n canedit: boolean;\r\nbegin\r\n if not CheckDataSet then\r\n Exit;\r\n\r\n if (Key = VK_DELETE) or (Key = VK_BACK) or ((Key = VK_INSERT) and (ssShift in Shift)) then\r\n begin\r\n FEditChange := true;\r\n canedit := EditCanModify;\r\n FEditChange := false;\r\n\r\n if not canedit then\r\n begin\r\n key := 0;\r\n inherited;\r\n Exit;\r\n end\r\n else\r\n begin\r\n inherited;\r\n FDataLink.Edit;\r\n end;\r\n end\r\n else\r\n inherited;\r\nend;\r\n\r\nprocedure TDBMaskEdit.KeyPress(var Key: Char);\r\nvar\r\n canedit: boolean;\r\nbegin\r\n if not CheckDataSet or ReadOnly then\r\n begin\r\n inherited;\r\n Exit;\r\n end;\r\n\r\n if FDataLink.DataSet.ControlsDisabled then\r\n begin\r\n PreventDefault;\r\n StopPropagation;\r\n Exit;\r\n end;\r\n\r\n FEditChange := true;\r\n canedit := EditCanModify;\r\n FEditChange := false;\r\n\r\n if not canedit then\r\n Exit;\r\n\r\n if {(Key >= #32) and (FDataLink.Field <> nil) and\r\n not FDataLink.Field.IsValidChar(Key) or} (FDataLink.ReadOnly) then\r\n begin\r\n Key := #0;\r\n end;\r\n\r\n inherited Keypress(Key);\r\nend;\r\n\r\nprocedure TDBMaskEdit.SetDataField(const Value: TDataField);\r\nbegin\r\n FDataLink.FieldName := Value;\r\n FDataLink.UpdateField;\r\n ActiveChange(Self);\r\nend;\r\n\r\nprocedure TDBMaskEdit.SetDataSource(const Value: TDataSource);\r\nbegin\r\n FDataLink.DataSource := Value;\r\n FDataLink.UpdateField;\r\nend;\r\n\r\n{ TDBEditAutoComplete }\r\n\r\nprocedure TDBEditAutoComplete.ActiveChange(Sender: TObject);\r\nbegin\r\n UpdateElement;\r\n\r\n if Assigned(FDataLink.DataSet) then\r\n begin\r\n if not FDataLink.DataSet.Active or not DataSource.Enabled then\r\n begin\r\n Text := '';\r\n end\r\n else\r\n DataChange(Self);\r\n end;\r\nend;\r\n\r\nprocedure TDBEditAutoComplete.Change;\r\nbegin\r\n inherited;\r\n\r\n if not CheckDataSet then\r\n Exit;\r\n\r\n if DataSource.AutoEdit or (DataSource.DataSet.State in [dsEdit,dsInsert]) then\r\n begin\r\n FDataLink.Edit;\r\n FDataLink.Modified;\r\n end;\r\nend;\r\n\r\nfunction TDBEditAutoComplete.CheckDataSet: boolean;\r\nbegin\r\n Result := CheckDB(DataSource, DataField, FDataLink);\r\nend;\r\n\r\nprocedure TDBEditAutoComplete.CreateInitialize;\r\nbegin\r\n if not Assigned(FDataLink) then\r\n begin\r\n FDataLink := TFieldDataLink.Create;\r\n FDataLink.OnUpdateData := DataUpdate;\r\n FDataLink.OnDataChange := DataChange;\r\n FDataLink.OnActiveChange := ActiveChange;\r\n FEditChange := false;\r\n end;\r\n\r\n inherited;\r\nend;\r\n\r\nprocedure TDBEditAutoComplete.DataChange(Sender: TObject);\r\nbegin\r\n UpdateElement;\r\n\r\n if FEditChange then\r\n Exit;\r\n\r\n if not Assigned(DataSource) then\r\n Exit;\r\n\r\n if not Assigned(FDataLink.DataSet) then\r\n Exit;\r\n\r\n if not Assigned(FDataLink.Field) then\r\n FDataLink.UpdateField;\r\n\r\n if Assigned(FDataLink.Field) and not FDataLink.DataSet.IsEmpty then\r\n Text := FDataLink.Field.DisplayText\r\n else\r\n Text := '';\r\nend;\r\n\r\nprocedure TDBEditAutoComplete.DataUpdate(Sender: TObject);\r\nbegin\r\n if Assigned(FDataLink.Field) then\r\n begin\r\n if not Assigned(FDataLink.Field) then\r\n FDataLink.UpdateField;\r\n\r\n FDataLink.Field.AsString := Text;\r\n end;\r\nend;\r\n\r\ndestructor TDBEditAutoComplete.Destroy;\r\nbegin\r\n FDataLink.Free;\r\n inherited;\r\nend;\r\n\r\nprocedure TDBEditAutoComplete.DoExit;\r\nbegin\r\n if not FDataLink.ReadOnly then\r\n begin\r\n FEditChange := true;\r\n FDataLink.UpdateRecord; { tell data link to update database }\r\n end;\r\n\r\n inherited DoExit;\r\n\r\n FEditChange := false;\r\nend;\r\n\r\nfunction TDBEditAutoComplete.EditCanModify: Boolean;\r\nbegin\r\n if Assigned(DataSource) then\r\n Result := not FDatalink.DataSet.ControlsDisabled and (DataSource.AutoEdit or (FDataLink.DataSet.State in [dsEdit, dsInsert])) and FDataLink.Edit\r\n else\r\n Result := true;\r\nend;\r\n\r\nfunction TDBEditAutoComplete.GetDataField: TDataField;\r\nbegin\r\n Result := FDataLink.FieldName;\r\nend;\r\n\r\nfunction TDBEditAutoComplete.GetDataSource: TDataSource;\r\nbegin\r\n Result := FDataLink.DataSource;\r\nend;\r\n\r\nprocedure TDBEditAutoComplete.KeyDown(var Key: Word; Shift: TShiftState);\r\nvar\r\n canedit: boolean;\r\n\r\nbegin\r\n if not CheckDataSet then\r\n Exit;\r\n\r\n if (Key = VK_DELETE) or (Key = VK_BACK) or ((Key = VK_INSERT) and (ssShift in Shift)) then\r\n begin\r\n FEditChange := true;\r\n canedit := EditCanModify;\r\n FEditChange := false;\r\n\r\n if not canedit then\r\n begin\r\n key := 0;\r\n inherited;\r\n Exit;\r\n end\r\n else\r\n begin\r\n inherited;\r\n FDataLink.Edit;\r\n end;\r\n end\r\n else\r\n inherited;\r\nend;\r\n\r\nprocedure TDBEditAutoComplete.KeyPress(var Key: Char);\r\nvar\r\n canedit: boolean;\r\nbegin\r\n if not CheckDataSet or ReadOnly then\r\n begin\r\n inherited;\r\n Exit;\r\n end;\r\n\r\n if FDataLink.DataSet.ControlsDisabled then\r\n begin\r\n PreventDefault;\r\n StopPropagation;\r\n Exit;\r\n end;\r\n\r\n FEditChange := true;\r\n canedit := EditCanModify;\r\n FEditChange := false;\r\n\r\n if not canedit then\r\n Exit;\r\n\r\n if (FDataLink.ReadOnly) then\r\n begin\r\n Key := #0;\r\n end;\r\n\r\n inherited Keypress(Key);\r\nend;\r\n\r\nprocedure TDBEditAutoComplete.SetDataField(const Value: TDataField);\r\nbegin\r\n FDataLink.FieldName := Value;\r\n FDataLink.UpdateField;\r\n ActiveChange(Self);\r\nend;\r\n\r\nprocedure TDBEditAutoComplete.SetDataSource(const Value: TDataSource);\r\nbegin\r\n FDataLink.DataSource := Value;\r\nend;\r\n\r\n{ TDBLookupComboBox }\r\n\r\nprocedure TDBLookupComboBox.ActiveChange(Sender: TObject);\r\nbegin\r\n UpdateElement;\r\n\r\n if Assigned(FDataLink.DataSet) then\r\n begin\r\n if not FDataLink.DataSet.Active or not DataSource.Enabled then\r\n begin\r\n ItemIndex := -1;\r\n end\r\n else\r\n DataChange(Self);\r\n end;\r\nend;\r\n\r\nprocedure TDBLookupComboBox.Change;\r\nvar\r\n fld: TField;\r\n chg: TNotifyEvent;\r\n idx: integer;\r\nbegin\r\n idx := ItemIndex;\r\n\r\n if not CheckDataSet then\r\n begin\r\n inherited;\r\n Exit;\r\n end;\r\n\r\n chg := OnChange;\r\n OnChange := nil;\r\n\r\n inherited;\r\n\r\n if CheckListDataSet then\r\n FListLink.DataSet.DisableControls;\r\n\r\n if DataSource.AutoEdit or (DataSource.DataSet.State in [dsEdit, dsInsert]) then\r\n begin\r\n FEditChange := true;\r\n FDataLink.Edit;\r\n fld := nil;\r\n try\r\n fld := FDataLink.DataSet.FieldByName(DataField);\r\n fld.AsString := Value;\r\n FDataLink.Modified;\r\n except\r\n end;\r\n FEditChange := false;\r\n end;\r\n\r\n SyncListSource;\r\n\r\n OnChange := chg;\r\n\r\n if CheckListDataSet then\r\n FListLink.DataSet.EnableControls;\r\n\r\n // ensure idnex in case other DB-aware controls affect it\r\n ItemIndex := idx;\r\n\r\n if Assigned(OnChange) then\r\n OnChange(Self);\r\nend;\r\n\r\nfunction TDBLookupComboBox.CheckDataSet: boolean;\r\nbegin\r\n Result := CheckDB(DataSource, DataField, FDataLink);\r\nend;\r\n\r\nfunction TDBLookupComboBox.CheckListDataSet: boolean;\r\nbegin\r\n Result := Assigned(FListLink.Field) and Assigned(FListLink.DataSet) and FListLink.DataSet.Active;\r\nend;\r\n\r\nprocedure TDBLookupComboBox.CreateInitialize;\r\nbegin\r\n if not Assigned(FDataLink) then\r\n begin\r\n FDataLink := TFieldDataLink.Create;\r\n FDataLink.OnUpdateData := DataUpdate;\r\n FDataLink.OnDataChange := DataChange;\r\n FDataLink.OnActiveChange := ActiveChange;\r\n\r\n FListLink := TFieldDataLink.Create;\r\n FListLink.OnActiveChange := ListActiveChange;\r\n FListLink.OnDataChange := ListDataChange;\r\n FListChanging := false;\r\n FEditChange := false;\r\n FBlockChange := false;\r\n end;\r\n\r\n inherited;\r\nend;\r\n\r\nprocedure TDBLookupComboBox.DataChange(Sender: TObject);\r\nbegin\r\n UpdateElement;\r\n\r\n if FEditChange then\r\n Exit;\r\n\r\n if not Assigned(DataSource) then\r\n Exit;\r\n\r\n if not Assigned(FDataLink.DataSet) then\r\n Exit;\r\n\r\n if not Assigned(FDataLink.Field) then\r\n FDataLink.UpdateField;\r\n\r\n if Assigned(FDataLink.Field) and not FDataLink.DataSet.IsEmpty then\r\n begin\r\n Value := FDataLink.Field.DisplayText;\r\n end\r\n else\r\n ItemIndex := -1;\r\n\r\n SyncListSource;\r\nend;\r\n\r\nprocedure TDBLookupComboBox.DataUpdate(Sender: TObject);\r\nbegin\r\n if Assigned(FDataLink.Field) then\r\n begin\r\n if not Assigned(FDataLink.Field) then\r\n FDataLink.UpdateField;\r\n\r\n FDataLink.Field.AsString := Value;\r\n end;\r\nend;\r\n\r\ndestructor TDBLookupComboBox.Destroy;\r\nbegin\r\n FDataLink.Free;\r\n FListLink.Free;\r\n inherited Destroy;\r\nend;\r\n\r\nprocedure TDBLookupComboBox.DoExit;\r\nbegin\r\n if not FDataLink.ReadOnly then\r\n begin\r\n// try\r\n FEditChange := true;\r\n FDataLink.UpdateRecord; { tell data link to update database }\r\n\r\n// except\r\n// on Exception do\r\n// begin\r\n// SetFocus; { if it failed, don't let focus leave }\r\n// raise;\r\n// end;\r\n// end;\r\n end;\r\n\r\n inherited DoExit;\r\n\r\n FEditChange := false;\r\nend;\r\n\r\nfunction TDBLookupComboBox.EditCanModify: Boolean;\r\nbegin\r\n if Assigned(DataSource) then\r\n Result := not FDatalink.DataSet.ControlsDisabled and (DataSource.AutoEdit or (FDataLink.DataSet.State in [dsEdit, dsInsert])) and FDataLink.Edit\r\n else\r\n Result := true;\r\nend;\r\n\r\nfunction TDBLookupComboBox.GetDataField: TDataField;\r\nbegin\r\n Result := FDataLink.FieldName;\r\nend;\r\n\r\nfunction TDBLookupComboBox.GetDataSource: TDataSource;\r\nbegin\r\n Result := FDataLink.DataSource;\r\nend;\r\n\r\nfunction TDBLookupComboBox.GetListField: TDataField;\r\nbegin\r\n Result := FListLink.FieldName;\r\nend;\r\n\r\nfunction TDBLookupComboBox.GetListSource: TDataSource;\r\nbegin\r\n Result := FListLink.DataSource;\r\nend;\r\n\r\nfunction TDBLookupComboBox.IsEnabled: boolean;\r\nbegin\r\n Result := Enabled and CheckDataSet;\r\nend;\r\n\r\nprocedure TDBLookupComboBox.ListActiveChange(Sender: TObject);\r\nbegin\r\n if not (csLoading in ComponentState) then\r\n LoadListSource;\r\nend;\r\n\r\nprocedure TDBLookupComboBox.ListDataChange(Sender: TObject);\r\nbegin\r\n if FBlockChange then\r\n Exit;\r\n\r\n if not (csLoading in ComponentState) then\r\n LoadListSource;\r\nend;\r\n\r\nprocedure TDBLookupComboBox.LoadListSource;\r\nvar\r\n kfld,lfld: TField;\r\n isBOF,isEOF: boolean;\r\n bk: TBookmark;\r\n ne: TDataSetNotifyEvent;\r\nbegin\r\n if Assigned(ListSource) and Assigned(ListSource.DataSet) and (ListSource.DataSet.Active) and (KeyField <> '') and (ListField <> '') and not FListChanging then\r\n begin\r\n FListChanging := true;\r\n try\r\n kfld := ListSource.Dataset.FieldByName(KeyField);\r\n lfld := ListSource.Dataset.FieldByName(ListField);\r\n except\r\n kfld := nil;\r\n lfld := nil;\r\n end;\r\n\r\n if Assigned(kfld) and Assigned(lfld) then\r\n begin\r\n isBOF := ListSource.DataSet.BOF;\r\n isEOF := ListSource.DataSet.EOF;\r\n\r\n ListSource.DataSet.DisableControls;\r\n\r\n bk := ListSource.DataSet.GetBookmark;\r\n\r\n LookupValues.BeginUpdate;\r\n LookupValues.Clear;\r\n\r\n ListSource.DataSet.First;\r\n\r\n while not ListSource.DataSet.EOF do\r\n begin\r\n LookupValues.AddPair(kfld.DisplayText, lfld.DisplayText);\r\n ListSource.DataSet.Next;\r\n end;\r\n\r\n LookupValues.EndUpdate;\r\n\r\n if ListSource.DataSet.BookmarkValid(bk) then\r\n ListSource.DataSet.GotoBookmark(bk);\r\n\r\n ne := ListSource.DataSet.AfterScroll;\r\n ListSource.DataSet.AfterScroll := nil;\r\n\r\n\r\n if isBOF then\r\n ListSource.DataSet.First;\r\n\r\n if isEOF then\r\n ListSource.DataSet.Last;\r\n\r\n DoUpdateList;\r\n\r\n ListSource.DataSet.AfterScroll := ne;\r\n ListSource.DataSet.EnableControls;\r\n end;\r\n FListChanging := false;\r\n end;\r\n\r\n // set value in case it was set prior to listsource being loaded\r\n if FFieldValue <> '' then\r\n Value := FFieldValue;\r\nend;\r\n\r\nprocedure TDBLookupComboBox.SetDataField(const Value: TDataField);\r\nbegin\r\n FDataLink.FieldName := Value;\r\n FDataLink.UpdateField;\r\n ActiveChange(Self);\r\nend;\r\n\r\nprocedure TDBLookupComboBox.SetDataSource(const Value: TDataSource);\r\nbegin\r\n if FDatalink.DataSource <> Value then\r\n begin\r\n FDatalink.DataSource := Value;\r\n LoadListSource;\r\n end;\r\nend;\r\n\r\nprocedure TDBLookupComboBox.SetKeyField(const Value: TDataField);\r\nbegin\r\n FKeyField := Value;\r\nend;\r\n\r\nprocedure TDBLookupComboBox.SetListField(const Value: TDataField);\r\nbegin\r\n FListLink.FieldName := Value;\r\nend;\r\n\r\nprocedure TDBLookupComboBox.SetListSource(const Value: TDataSource);\r\nbegin\r\n FListLink.DataSource := Value;\r\nend;\r\n\r\nprocedure TDBLookupComboBox.SetValue(const Value: string);\r\nbegin\r\n inherited;\r\n FFieldValue := Value;\r\nend;\r\n\r\nprocedure TDBLookupComboBox.SyncListSource;\r\nbegin\r\n if Assigned(FListLink.Field) and Assigned(FListLink.DataSet) and FListLink.DataSet.Active and not FListLink.DataSet.IsEmpty and (ItemIndex >= 0) then\r\n begin\r\n FBlockChange := true;\r\n FListLink.DataSet.First;\r\n FListLink.DataSet.MoveBy(ItemIndex);\r\n FBlockChange := false;\r\n end;\r\nend;\r\n\r\n{ TDBListControl }\r\n\r\nprocedure TDBListControl.ActiveChange(Sender: TObject);\r\nbegin\r\n\r\nend;\r\n\r\nprocedure TDBListControl.CreateInitialize;\r\nbegin\r\n inherited;\r\n\r\n if not Assigned(FDataLink) then\r\n begin\r\n FDataLink := TDBDataLink.Create;\r\n FDataLink.OnUpdateData := DataUpdate;\r\n FDataLink.OnDataChange := DataChange;\r\n FDataLink.OnActiveChange := ActiveChange;\r\n FDataLink.OnRecordChange := RecordChange;\r\n\r\n FListLink := TDBDataLink.Create;\r\n FListLink.OnActiveChange := ListActiveChange;\r\n end;\r\nend;\r\n\r\nprocedure TDBListControl.DataChange(Sender: TObject);\r\nbegin\r\n\r\nend;\r\n\r\nprocedure TDBListControl.DataUpdate(Sender: TObject);\r\nbegin\r\n\r\nend;\r\n\r\ndestructor TDBListControl.Destroy;\r\nbegin\r\n FDataLink.Free;\r\n FListLink.Free;\r\n inherited;\r\nend;\r\n\r\nprocedure TDBListControl.DoItemGetFieldValue(Index: integer; AFieldName: string;\r\n var AValue: string);\r\nbegin\r\n if Assigned(OnListItemGetFieldValue) then\r\n OnListItemGetFieldValue(Self, Index, AFieldName, AValue);\r\nend;\r\n\r\nfunction TDBListControl.GetDataField: TDataField;\r\nbegin\r\n Result := FDataLink.FieldName;\r\nend;\r\n\r\nfunction TDBListControl.GetDataSource: TDataSource;\r\nbegin\r\n Result := FDataLink.DataSource;\r\nend;\r\n\r\nfunction TDBListControl.GetListField: TDataField;\r\nbegin\r\n Result := FListLink.FieldName;\r\nend;\r\n\r\nfunction TDBListControl.GetListSource: TDataSource;\r\nbegin\r\n Result := FListLink.DataSource;\r\nend;\r\n\r\nprocedure TDBListControl.ListActiveChange(Sender: TObject);\r\nvar\r\n fld: TField;\r\n bk: TBookmark;\r\n itemtext,ident,html,htmlvalue: string;\r\n c: integer;\r\n itm: TListItem;\r\n ne: TDataSetNotifyEvent;\r\nbegin\r\n if not Assigned(ListSource) then\r\n Exit;\r\n\r\n if Assigned(FListLink.DataSet) and FListLink.DataSet.Active and not FListLink.DataSet.IsEmpty then\r\n begin\r\n fld := nil;\r\n if FListLink.FieldName <> '' then\r\n fld := FListLink.DataSet.FieldByName(FListLink.FieldName);\r\n\r\n if Assigned(fld) or (ItemTemplate <> '') then\r\n begin\r\n FListLink.DataSet.DisableControls;\r\n bk := FListLink.DataSet.GetBookmark;\r\n Items.Clear;\r\n\r\n ne := FListLink.DataSet.AfterScroll;\r\n FListLink.DataSet.AfterScroll := nil;\r\n\r\n FListLink.DataSet.First;\r\n\r\n while not FListLink.DataSet.Eof do\r\n begin\r\n itm := Items.Add;\r\n\r\n if ItemTemplate <> '' then\r\n begin\r\n html := ItemTemplate;\r\n\r\n if Assigned(fld) then\r\n begin\r\n itm.Data := fld.DisplayText;\r\n end;\r\n\r\n for c := 0 to FListLink.DataSource.DataSet.Fields.Count - 1 do\r\n begin\r\n ident := '(%' + FListLink.DataSource.DataSet.Fields[c].FieldName + '%)';\r\n if Pos(Uppercase(ident), Uppercase(html)) > 0 then\r\n begin\r\n htmlvalue := FListLink.DataSource.DataSet.Fields[c].DisplayText;\r\n DoItemGetFieldValue(itm.Index, FListLink.DataSource.DataSet.Fields[c].FieldName, htmlvalue);\r\n html := StringReplace(html, ident, htmlvalue, [rfReplaceAll, rfIgnoreCase]);\r\n end;\r\n end;\r\n\r\n itemtext := html;\r\n end\r\n else\r\n begin\r\n itemtext := fld.DisplayText;\r\n end;\r\n\r\n itm.Text := itemtext;\r\n FListLink.DataSet.Next;\r\n end;\r\n\r\n FListLink.DataSet.GotoBookmark(bk);\r\n\r\n FListLink.DataSet.AfterScroll := ne;\r\n FListLink.DataSet.EnableControls;\r\n end;\r\n end;\r\n\r\nend;\r\n\r\nprocedure TDBListControl.RecordChange(Sender: TObject);\r\nvar\r\n i: integer;\r\n dt: string;\r\nbegin\r\n if AutoSelect then\r\n begin\r\n if Assigned(FDataLink.DataSet) and FDataLink.DataSet.Active and not FDataLink.DataSet.IsEmpty then\r\n begin\r\n if (ListSource = DataSource) then\r\n ItemIndex := FDataLink.DataSet.RecNo - 1\r\n else\r\n if (DataField <> '') then\r\n begin\r\n dt := FDataLink.DataSet.FieldByName(DataField).DisplayText;\r\n\r\n for i := 0 to Items.Count - 1 do\r\n begin\r\n if Items[i].Data = dt then\r\n begin\r\n ItemIndex := i;\r\n break;\r\n end\r\n else\r\n if (Items[i].Text = dt) then\r\n begin\r\n ItemIndex := i;\r\n break;\r\n end;\r\n end;\r\n end;\r\n\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TDBListControl.SetDataField(const Value: TDataField);\r\nbegin\r\n FDataLink.FieldName := Value;\r\n ActiveChange(Self);\r\nend;\r\n\r\nprocedure TDBListControl.SetDataSource(const Value: TDataSource);\r\nbegin\r\n FDataLink.DataSource := Value;\r\nend;\r\n\r\nprocedure TDBListControl.SetItemTemplate(const Value: string);\r\nbegin\r\n FItemTemplate := Value;\r\nend;\r\n\r\nprocedure TDBListControl.SetListField(const Value: TDataField);\r\nbegin\r\n FListLink.FieldName := Value;\r\n ActiveChange(Self);\r\nend;\r\n\r\nprocedure TDBListControl.SetListSource(const Value: TDataSource);\r\nbegin\r\n FListLink.DataSource := Value;\r\nend;\r\n\r\n{ TDBEditBtn }\r\n\r\nprocedure TDBEditBtn.ActiveChange(Sender: TObject);\r\nbegin\r\n UpdateElement;\r\n\r\n if Assigned(FDataLink.DataSet) then\r\n begin\r\n if not FDataLink.DataSet.Active or not DataSource.Enabled then\r\n Text := ''\r\n else\r\n DataChange(Self);\r\n end;\r\nend;\r\n\r\nfunction TDBEditBtn.CanCut: boolean;\r\nvar\r\n canedit: boolean;\r\nbegin\r\n if not CheckDataSet then\r\n Exit;\r\n\r\n if ReadOnly then\r\n begin\r\n Result := false;\r\n Exit;\r\n end;\r\n\r\n FEditChange := true;\r\n canedit := EditCanModify;\r\n FEditChange := false;\r\n\r\n if not canedit then\r\n begin\r\n Result := false;\r\n Exit;\r\n end\r\n else\r\n begin\r\n Result := inherited;\r\n FDataLink.Edit;\r\n end;\r\nend;\r\n\r\nfunction TDBEditBtn.CanPaste(AValue: string): boolean;\r\nbegin\r\n Result := CanCut;\r\nend;\r\n\r\nprocedure TDBEditBtn.Change;\r\nbegin\r\n inherited;\r\n\r\n if not CheckDataSet then\r\n Exit;\r\n\r\n if DataSource.AutoEdit or (DataSource.DataSet.State in [dsEdit,dsInsert]) then\r\n FDataLink.Modified;\r\nend;\r\n\r\nfunction TDBEditBtn.CheckDataSet: boolean;\r\nbegin\r\n Result := CheckDB(DataSource, DataField, FDataLink);\r\nend;\r\n\r\nprocedure TDBEditBtn.CreateInitialize;\r\nbegin\r\n if not Assigned(FDataLink) then\r\n begin\r\n FDataLink := TFieldDataLink.Create;\r\n FDataLink.OnUpdateData := DataUpdate;\r\n FDataLink.OnDataChange := DataChange;\r\n FDataLink.OnActiveChange := ActiveChange;\r\n FEditChange := false;\r\n end;\r\n\r\n inherited;\r\nend;\r\n\r\nprocedure TDBEditBtn.DataChange(Sender: TObject);\r\nbegin\r\n if FEditChange then\r\n Exit;\r\n\r\n UpdateElement;\r\n\r\n if not Assigned(FDataLink.DataSet) then\r\n Exit;\r\n\r\n if not Assigned(FDataLink.Field) then\r\n FDataLink.UpdateField;\r\n\r\n if Assigned(FDataLink.Field) and not FDataLink.DataSet.IsEmpty then\r\n Text := FDataLink.Field.DisplayText\r\n else\r\n Text := '';\r\nend;\r\n\r\nprocedure TDBEditBtn.DataUpdate(Sender: TObject);\r\nbegin\r\n if Assigned(FDataLink.Field) then\r\n begin\r\n if not Assigned(FDataLink.Field) then\r\n FDataLink.UpdateField;\r\n\r\n FDataLink.Field.AsString := Text;\r\n end;\r\nend;\r\n\r\ndestructor TDBEditBtn.Destroy;\r\nbegin\r\n FDataLink.Free;\r\n inherited;\r\nend;\r\n\r\nprocedure TDBEditBtn.DoExit;\r\nbegin\r\n if not FDataLink.ReadOnly then\r\n begin\r\n FEditChange := true;\r\n FDataLink.UpdateRecord; { tell data link to update database }\r\n end;\r\n\r\n inherited DoExit;\r\n\r\n FEditChange := false;\r\nend;\r\n\r\nfunction TDBEditBtn.EditCanModify: Boolean;\r\nbegin\r\n if Assigned(DataSource) then\r\n Result := not FDatalink.DataSet.ControlsDisabled and (DataSource.AutoEdit or (DataSource.DataSet.State in [dsEdit,dsInsert])) and FDataLink.Edit\r\n else\r\n Result := True;\r\nend;\r\n\r\nfunction TDBEditBtn.GetDataField: TDataField;\r\nbegin\r\n Result := FDataLink.FieldName;\r\nend;\r\n\r\nfunction TDBEditBtn.GetDataSource: TDataSource;\r\nbegin\r\n Result := FDataLink.DataSource;\r\nend;\r\n\r\nfunction TDBEditBtn.GetDisplayText: string;\r\nbegin\r\n if not CheckDataSet then\r\n Result := ''\r\n else\r\n Result := inherited GetDisplayText;\r\nend;\r\n\r\nfunction TDBEditBtn.IsEnabled: boolean;\r\nbegin\r\n Result := Enabled and CheckDataSet;\r\nend;\r\n\r\nfunction TDBEditBtn.IsReadOnly: boolean;\r\nbegin\r\n Result := ReadOnly or not CheckDataSet;\r\nend;\r\n\r\nprocedure TDBEditBtn.KeyDown(var Key: Word; Shift: TShiftState);\r\nvar\r\n canedit: boolean;\r\n\r\nbegin\r\n if not CheckDataSet then\r\n Exit;\r\n\r\n if (Key = VK_DELETE) or (Key = VK_BACK) or ((Key = VK_INSERT) and (ssShift in Shift)) then\r\n begin\r\n FEditChange := true;\r\n canedit := EditCanModify;\r\n FEditChange := false;\r\n\r\n if not canedit then\r\n begin\r\n key := 0;\r\n inherited;\r\n Exit;\r\n end\r\n else\r\n begin\r\n inherited;\r\n FDataLink.Edit;\r\n end;\r\n end\r\n else\r\n inherited;\r\nend;\r\n\r\nprocedure TDBEditBtn.KeyPress(var Key: Char);\r\nvar\r\n canedit: boolean;\r\nbegin\r\n if not CheckDataSet or ReadOnly then\r\n begin\r\n inherited;\r\n Exit;\r\n end;\r\n\r\n if FDataLink.DataSet.ControlsDisabled then\r\n begin\r\n PreventDefault;\r\n StopPropagation;\r\n Exit;\r\n end;\r\n\r\n FEditChange := true;\r\n canedit := EditCanModify;\r\n FEditChange := false;\r\n\r\n if not canedit then\r\n begin\r\n Key := #0;\r\n Exit;\r\n end;\r\n\r\n if {((Key >= #32) and (FDataLink.Field <> nil) and\r\n not FDataLink.Field.IsValidChar(Key)) or} (FDataLink.ReadOnly) then\r\n begin\r\n Key := #0;\r\n end;\r\n\r\n inherited Keypress(Key);\r\nend;\r\n\r\nprocedure TDBEditBtn.SetDataField(const Value: TDataField);\r\nbegin\r\n FDataLink.FieldName := Value;\r\n FDataLink.UpdateField;\r\n ActiveChange(Self);\r\nend;\r\n\r\nprocedure TDBEditBtn.SetDataSource(const Value: TDataSource);\r\nbegin\r\n FDataLink.DataSource := Value;\r\nend;\r\n\r\n{ TDBEditDropDownControl }\r\n\r\nprocedure TDBEditDropDownControl.ActiveChange(Sender: TObject);\r\nbegin\r\n UpdateElement;\r\n\r\n if Assigned(FDataLink.DataSet) then\r\n begin\r\n if not FDataLink.DataSet.Active or not DataSource.Enabled then\r\n Text := ''\r\n else\r\n DataChange(Self);\r\n end;\r\nend;\r\n\r\n(*\r\nfunction TDBEditDropDownControl.CanCut: boolean;\r\nvar\r\n canedit: boolean;\r\nbegin\r\n if not CheckDataSet then\r\n Exit;\r\n\r\n if ReadOnly then\r\n begin\r\n Result := false;\r\n Exit;\r\n end;\r\n\r\n FEditChange := true;\r\n canedit := EditCanModify;\r\n FEditChange := false;\r\n\r\n if not canedit then\r\n begin\r\n Result := false;\r\n Exit;\r\n end\r\n else\r\n begin\r\n Result := inherited;\r\n FDataLink.Edit;\r\n end;\r\nend;\r\n\r\nfunction TDBEditDropDownControl.CanPaste(AValue: string): boolean;\r\nbegin\r\n Result := CanCut;\r\nend;\r\n\r\nprocedure TDBEditDropDownControl.Change;\r\nbegin\r\n inherited;\r\n\r\n if not CheckDataSet then\r\n Exit;\r\n\r\n if DataSource.AutoEdit or (DataSource.DataSet.State in [dsEdit,dsInsert]) then\r\n FDataLink.Modified;\r\nend;\r\n*)\r\n\r\nfunction TDBEditDropDownControl.CheckDataSet: boolean;\r\nbegin\r\n Result := CheckDB(DataSource, DataField, FDataLink);\r\nend;\r\n\r\nprocedure TDBEditDropDownControl.CreateInitialize;\r\nbegin\r\n if not Assigned(FDataLink) then\r\n begin\r\n FDataLink := TFieldDataLink.Create;\r\n FDataLink.OnUpdateData := DataUpdate;\r\n FDataLink.OnDataChange := DataChange;\r\n FDataLink.OnActiveChange := ActiveChange;\r\n FEditChange := false;\r\n end;\r\n\r\n inherited;\r\nend;\r\n\r\nprocedure TDBEditDropDownControl.DataChange(Sender: TObject);\r\nbegin\r\n if FEditChange then\r\n Exit;\r\n\r\n UpdateElement;\r\n\r\n if not Assigned(FDataLink.DataSet) then\r\n Exit;\r\n\r\n if not Assigned(FDataLink.Field) then\r\n FDataLink.UpdateField;\r\n\r\n if Assigned(FDataLink.Field) and not FDataLink.DataSet.IsEmpty then\r\n Text := FDataLink.Field.DisplayText\r\n else\r\n Text := '';\r\nend;\r\n\r\nprocedure TDBEditDropDownControl.DataUpdate(Sender: TObject);\r\nbegin\r\n if Assigned(FDataLink.Field) then\r\n begin\r\n if not Assigned(FDataLink.Field) then\r\n FDataLink.UpdateField;\r\n\r\n FDataLink.Field.AsString := Text;\r\n end;\r\nend;\r\n\r\ndestructor TDBEditDropDownControl.Destroy;\r\nbegin\r\n FDataLink.Free;\r\n inherited;\r\nend;\r\n\r\nprocedure TDBEditDropDownControl.DoExit;\r\nbegin\r\n if not FDataLink.ReadOnly then\r\n begin\r\n FEditChange := true;\r\n FDataLink.UpdateRecord; { tell data link to update database }\r\n end;\r\n\r\n inherited DoExit;\r\n\r\n FEditChange := false;\r\nend;\r\n\r\nfunction TDBEditDropDownControl.EditCanModify: Boolean;\r\nbegin\r\n if Assigned(DataSource) then\r\n Result := not FDatalink.DataSet.ControlsDisabled and (DataSource.AutoEdit or (DataSource.DataSet.State in [dsEdit,dsInsert])) and FDataLink.Edit\r\n else\r\n Result := True;\r\nend;\r\n\r\nfunction TDBEditDropDownControl.GetDataField: TDataField;\r\nbegin\r\n Result := FDataLink.FieldName;\r\nend;\r\n\r\nfunction TDBEditDropDownControl.GetDataSource: TDataSource;\r\nbegin\r\n Result := FDataLink.DataSource;\r\nend;\r\n\r\n(*\r\nfunction TDBEditDropDownControl.GetDisplayText: string;\r\nbegin\r\n if not CheckDataSet then\r\n Result := ''\r\n else\r\n Result := inherited GetDisplayText;\r\nend;\r\n*)\r\n\r\nfunction TDBEditDropDownControl.IsEnabled: boolean;\r\nbegin\r\n Result := Enabled and CheckDataSet;\r\nend;\r\n\r\nfunction TDBEditDropDownControl.IsReadOnly: boolean;\r\nbegin\r\n Result := ReadOnly or not CheckDataSet;\r\nend;\r\n\r\nprocedure TDBEditDropDownControl.KeyDown(var Key: Word; Shift: TShiftState);\r\nvar\r\n canedit: boolean;\r\n\r\nbegin\r\n if not CheckDataSet then\r\n Exit;\r\n\r\n if (Key = VK_DELETE) or (Key = VK_BACK) or ((Key = VK_INSERT) and (ssShift in Shift)) then\r\n begin\r\n FEditChange := true;\r\n canedit := EditCanModify;\r\n FEditChange := false;\r\n\r\n if not canedit then\r\n begin\r\n key := 0;\r\n inherited;\r\n Exit;\r\n end\r\n else\r\n begin\r\n inherited;\r\n FDataLink.Edit;\r\n end;\r\n end\r\n else\r\n inherited;\r\nend;\r\n\r\nprocedure TDBEditDropDownControl.KeyPress(var Key: Char);\r\nvar\r\n canedit: boolean;\r\nbegin\r\n if not CheckDataSet {or ReadOnly} then\r\n begin\r\n inherited;\r\n Exit;\r\n end;\r\n\r\n if FDataLink.DataSet.ControlsDisabled then\r\n begin\r\n PreventDefault;\r\n StopPropagation;\r\n Exit;\r\n end;\r\n\r\n FEditChange := true;\r\n canedit := EditCanModify;\r\n FEditChange := false;\r\n\r\n if not canedit then\r\n begin\r\n Key := #0;\r\n Exit;\r\n end;\r\n\r\n if {((Key >= #32) and (FDataLink.Field <> nil) and\r\n not FDataLink.Field.IsValidChar(Key)) or} (FDataLink.ReadOnly) then\r\n begin\r\n Key := #0;\r\n end;\r\n\r\n inherited Keypress(Key);\r\nend;\r\n\r\nprocedure TDBEditDropDownControl.SetDataField(const Value: TDataField);\r\nbegin\r\n FDataLink.FieldName := Value;\r\n FDataLink.UpdateField;\r\n ActiveChange(Self);\r\nend;\r\n\r\nprocedure TDBEditDropDownControl.SetDataSource(const Value: TDataSource);\r\nbegin\r\n FDataLink.DataSource := Value;\r\nend;\r\n\r\n{ TDBEditDropDownTableControl }\r\n\r\nprocedure TDBEditDropDownTableControl.ActiveChange(Sender: TObject);\r\nbegin\r\n UpdateElement;\r\n\r\n if Assigned(FDataLink.DataSet) then\r\n begin\r\n if not FDataLink.DataSet.Active or not DataSource.Enabled then\r\n Text := ''\r\n else\r\n DataChange(Self);\r\n end;\r\nend;\r\n\r\nfunction TDBEditDropDownTableControl.CheckDataSet: boolean;\r\nbegin\r\n Result := CheckDB(DataSource, DataField, FDataLink);\r\nend;\r\n\r\nprocedure TDBEditDropDownTableControl.CreateInitialize;\r\nbegin\r\n if not Assigned(FDataLink) then\r\n begin\r\n FDataLink := TFieldDataLink.Create;\r\n FDataLink.OnUpdateData := DataUpdate;\r\n FDataLink.OnDataChange := DataChange;\r\n FDataLink.OnActiveChange := ActiveChange;\r\n FEditChange := false;\r\n end;\r\n\r\n inherited;\r\nend;\r\n\r\nfunction TDBEditDropDownTableControl.CreateTable(\r\n Aowner: TComponent): TCustomTableControl;\r\nbegin\r\n Result := TWebDBTableControl.Create(AOwner);\r\nend;\r\n\r\nprocedure TDBEditDropDownTableControl.DataChange(Sender: TObject);\r\nbegin\r\n if FEditChange then\r\n Exit;\r\n\r\n UpdateElement;\r\n\r\n if not Assigned(FDataLink.DataSet) then\r\n Exit;\r\n\r\n if not Assigned(FDataLink.Field) then\r\n FDataLink.UpdateField;\r\n\r\n if Assigned(FDataLink.Field) and not FDataLink.DataSet.IsEmpty then\r\n Text := FDataLink.Field.DisplayText\r\n else\r\n Text := '';\r\nend;\r\n\r\nprocedure TDBEditDropDownTableControl.DataUpdate(Sender: TObject);\r\nbegin\r\n if Assigned(FDataLink.Field) then\r\n begin\r\n if not Assigned(FDataLink.Field) then\r\n FDataLink.UpdateField;\r\n\r\n FDataLink.Field.AsString := Text;\r\n end;\r\nend;\r\n\r\ndestructor TDBEditDropDownTableControl.Destroy;\r\nbegin\r\n FDataLink.Free;\r\n inherited;\r\nend;\r\n\r\nprocedure TDBEditDropDownTableControl.DoExit;\r\nbegin\r\n if not FDataLink.ReadOnly then\r\n begin\r\n FEditChange := true;\r\n FDataLink.UpdateRecord; { tell data link to update database }\r\n end;\r\n\r\n inherited DoExit;\r\n\r\n FEditChange := false;\r\nend;\r\n\r\nfunction TDBEditDropDownTableControl.EditCanModify: Boolean;\r\nbegin\r\n if Assigned(DataSource) then\r\n Result := not FDatalink.DataSet.ControlsDisabled and (DataSource.AutoEdit or (DataSource.DataSet.State in [dsEdit,dsInsert])) and FDataLink.Edit\r\n else\r\n Result := True;\r\nend;\r\n\r\nfunction TDBEditDropDownTableControl.GetDataField: TDataField;\r\nbegin\r\n Result := FDataLink.FieldName;\r\nend;\r\n\r\nfunction TDBEditDropDownTableControl.GetDataSource: TDataSource;\r\nbegin\r\n Result := FDataLink.DataSource;\r\nend;\r\n\r\nfunction TDBEditDropDownTableControl.GetDBTableControl: TDBTableControl;\r\nbegin\r\n Result := TDBTableControl(TableControl);\r\nend;\r\n\r\nfunction TDBEditDropDownTableControl.GetTableSource: TDataSource;\r\nbegin\r\n Result := GetDBTableControl.DataSource;\r\nend;\r\n\r\nfunction TDBEditDropDownTableControl.IsEnabled: boolean;\r\nbegin\r\n Result := Enabled and CheckDataSet;\r\nend;\r\n\r\nfunction TDBEditDropDownTableControl.IsReadOnly: boolean;\r\nbegin\r\n Result := ReadOnly or not CheckDataSet;\r\nend;\r\n\r\nprocedure TDBEditDropDownTableControl.KeyDown(var Key: Word;\r\n Shift: TShiftState);\r\nbegin\r\n inherited;\r\nend;\r\n\r\nprocedure TDBEditDropDownTableControl.KeyPress(var Key: Char);\r\nvar\r\n canedit: boolean;\r\nbegin\r\n if not CheckDataSet {or ReadOnly} then\r\n begin\r\n inherited;\r\n Exit;\r\n end;\r\n\r\n if FDataLink.DataSet.ControlsDisabled then\r\n begin\r\n PreventDefault;\r\n StopPropagation;\r\n Exit;\r\n end;\r\n\r\n FEditChange := true;\r\n canedit := EditCanModify;\r\n FEditChange := false;\r\n\r\n if not canedit then\r\n begin\r\n Key := #0;\r\n Exit;\r\n end;\r\n\r\n if {((Key >= #32) and (FDataLink.Field <> nil) and\r\n not FDataLink.Field.IsValidChar(Key)) or} (FDataLink.ReadOnly) then\r\n begin\r\n Key := #0;\r\n end;\r\n\r\n inherited Keypress(Key);\r\nend;\r\n\r\nprocedure TDBEditDropDownTableControl.SetDataField(const Value: TDataField);\r\nbegin\r\n FDataLink.FieldName := Value;\r\n FDataLink.UpdateField;\r\n ActiveChange(Self);\r\nend;\r\n\r\nprocedure TDBEditDropDownTableControl.SetDataSource(const Value: TDataSource);\r\nbegin\r\n FDataLink.DataSource := Value;\r\nend;\r\n\r\nprocedure TDBEditDropDownTableControl.SetTableSource(const Value: TDataSource);\r\nbegin\r\n GetDBTableControl.DataSource := Value;\r\nend;\r\n\r\nend.\r\n","{********************************************************************}\r\n{ }\r\n{ written by TMS Software }\r\n{ copyright (c) 2019 }\r\n{ Email : info@tmssoftware.com }\r\n{ Web : http://www.tmssoftware.com }\r\n{ }\r\n{ The source code is given as is. The author is not responsible }\r\n{ for any possible damage done due to the use of this code. }\r\n{ The complete source code remains property of the author and may }\r\n{ not be distributed, published, given or sold in any form as such. }\r\n{ No parts of the source code can be included in any other component }\r\n{ or application without written authorization of the author. }\r\n{********************************************************************}\r\n\r\nunit WEBLib.RegularExpressions;\r\n\r\ninterface\r\n\r\nuses js, web, sysutils, types;\r\n\r\ntype\r\n TRegExOption = (roNone, roIgnoreCase, roMultiLine,\r\n roSingleLine, roJSUnicode);\r\n\r\n TRegExOptions = set of TRegExOption;\r\n\r\n { Difference from Delphi TGroup:\r\n JS does not return Index and Length for a Group. So\r\n these propertiess are absent.\r\n }\r\n TGroup = record\r\n private\r\n FValue: String;\r\n FSuccess: Boolean;\r\n constructor Create(const AValue: String; ASuccess: Boolean);\r\n public\r\n property Value: String read FValue;\r\n property Success: Boolean read FSuccess;\r\n end;\r\n\r\n TGroupCollectionEnumerator = class;\r\n\r\n TGroupArray = array of TGroup;\r\n\r\n TGroupCollection = record\r\n private\r\n FList: TGroupArray;\r\n FNamedGroups: TJSObject;\r\n // Redesigned as in Pas2JS record constructor does not work properly\r\n // All New functions in this file are coded for this reason only\r\n class function New(execResultArray: TStringDynArray): TGroupCollection; static;\r\n function GetCount: Integer;\r\n function GetItem(Index: JSValue): TGroup;\r\n public\r\n function GetEnumerator: TGroupCollectionEnumerator;\r\n property Count: Integer read GetCount;\r\n property Item[Index: JSValue]: TGroup read GetItem; default;\r\n end;\r\n\r\n TGroupCollectionEnumerator = class\r\n private\r\n FCollection: TGroupCollection;\r\n FIndex: Integer;\r\n public\r\n constructor Create(const ACollection: TGroupCollection);\r\n function GetCurrent: TGroup;\r\n function MoveNext: Boolean;\r\n property Current: TGroup read GetCurrent;\r\n end;\r\n\r\n TMatch = record\r\n private\r\n FIndex: Integer;\r\n FLength: Integer;\r\n FSuccess: Boolean;\r\n FGroups: TGroupCollection;\r\n FValue: String;\r\n FInput: String;\r\n FJSRegExp: TJSRegexp;\r\n constructor Create(AJSRegExp: TJSRegexp; execResultArray: TStringDynArray); overload;\r\n class function New: TMatch; static;\r\n function GetGroups: TGroupCollection;\r\n public\r\n function NextMatch: TMatch;\r\n property Groups: TGroupCollection read GetGroups;\r\n property Index: Integer read FIndex;\r\n property Length: Integer read FLength;\r\n property Success: Boolean read FSuccess write FSuccess;\r\n property Value: String read FValue;\r\n end;\r\n\r\n TMatchCollectionEnumerator = class;\r\n\r\n TMatchArray = array of TMatch;\r\n\r\n TMatchCollection = record\r\n private\r\n FList: TMatchArray;\r\n // Redesigned as Constructor does not work properly for records\r\n class function New(aMatch: TMatch): TMatchCollection; static;\r\n function GetCount: Integer;\r\n function GetItem(Index: Integer): TMatch;\r\n public\r\n function GetEnumerator: TMatchCollectionEnumerator;\r\n property Count: Integer read GetCount;\r\n property Item[Index: Integer]: TMatch read GetItem; default;\r\n end;\r\n\r\n TMatchCollectionEnumerator = class\r\n private\r\n FCollection: TMatchCollection;\r\n FIndex: Integer;\r\n public\r\n constructor Create(const ACollection: TMatchCollection);\r\n function GetCurrent: TMatch;\r\n function MoveNext: Boolean;\r\n property Current: TMatch read GetCurrent;\r\n end;\r\n\r\n TMatchEvaluator = function(const Match: TMatch): String of object;\r\n\r\n TRegEx = record\r\n private\r\n FJSRegExp: TJSRegexp;\r\n FPattern: String;\r\n FOptions: TRegExOptions;\r\n FMatchEvaluator: TMatchEvaluator;\r\n\r\n function GetJSRegExFlags(AddJSFlags: String=''): String;\r\n Function DoOnReplace(Const match: String; offsetDontUse: Integer; InputDontUse: String) : String;\r\n public\r\n constructor Create(const Pattern: String); overload;\r\n constructor Create(const Pattern: String; Options: TRegExOptions); overload;\r\n\r\n function IsMatch(const Input: String): Boolean; overload;\r\n function IsMatch(const Input: String; StartPos: Integer): Boolean; overload;\r\n class function IsMatch(const Input, Pattern: String): Boolean; overload; static;\r\n class function IsMatch(const Input, Pattern: String; Options: TRegExOptions): Boolean; overload; static;\r\n\r\n class function Escape(const Str: String; UseWildCards: Boolean = False): String; static;\r\n\r\n function Match(const Input: String): TMatch; overload;\r\n function Match(const Input: String; StartPos: Integer): TMatch; overload;\r\n function Match(const Input: String; StartPos, Length: Integer): TMatch; overload;\r\n class function Match(const Input, Pattern: String): TMatch; overload; static;\r\n class function Match(const Input, Pattern: String; Options: TRegExOptions): TMatch; overload; static;\r\n\r\n function Matches(const Input: String): TMatchCollection; overload;\r\n function Matches(const Input: String; StartPos: Integer): TMatchCollection; overload;\r\n class function Matches(const Input, Pattern: String): TMatchCollection; overload; static;\r\n class function Matches(const Input, Pattern: String; Options: TRegExOptions): TMatchCollection; overload; static;\r\n\r\n function Replace(const Input, Replacement: String): String; overload;\r\n function Replace(const Input: String; Evaluator: TMatchEvaluator): String; overload;\r\n // Note: overloaded Replace functions with Count are not supported.\r\n class function Replace(const Input, Pattern, Replacement: String): String; overload; static;\r\n class function Replace(const Input, Pattern: String; Evaluator: TMatchEvaluator): String; overload; static;\r\n class function Replace(const Input, Pattern, Replacement: String; Options: TRegExOptions): String; overload; static;\r\n class function Replace(const Input, Pattern: String; Evaluator: TMatchEvaluator; Options: TRegExOptions): String; overload; static;\r\n\r\n function Split(const Input: String): TStringDynArray; overload;\r\n // Note: overloaded Split function with Count are not supported.\r\n class function Split(const Input, Pattern: String): TStringDynArray; overload; static;\r\n class function Split(const Input, Pattern: String; Options: TRegExOptions): TStringDynArray; overload; static;\r\n end;\r\n\r\nimplementation\r\n\r\nuses strutils;\r\n\r\nfunction GetJSExceptionDetails(ExceptObject: TObject; out errorName: String; out errorMsg: String): Boolean; forward;\r\nfunction FormatErrorMessage(errorName: String; errorMessage: String): String; forward;\r\n\r\n{ TGroup }\r\n\r\nconstructor TGroup.Create(const AValue: String; ASuccess: Boolean);\r\nbegin\r\n FValue := AValue;\r\n FSuccess := ASuccess;\r\nend;\r\n\r\n{ TGroupCollection }\r\n\r\nclass function TGroupCollection.New(execResultArray: TStringDynArray): TGroupCollection;\r\nvar\r\n arrayLength, i: Integer;\r\n resObject: TJSObject;\r\n svalue: String;\r\nbegin\r\n SetLength(Result.FList, 0);\r\n Result.FNamedGroups := TJSObject.new;\r\n if execResultArray = nil then\r\n exit;\r\n resObject := TJSObject(execResultArray);\r\n arrayLength := Integer(resObject['length']);\r\n SetLength(Result.FList, arrayLength);\r\n for i := 0 to arrayLength - 1 do\r\n begin\r\n // A group can be undefined\r\n if not isUndefined(execResultArray[i]) then\r\n svalue := execResultArray[i]\r\n else\r\n svalue := ''; // We add an empty group for undefined\r\n // group sent back. Delphi in some cases\r\n // does this and sometimes doesn't. Hence,\r\n // the decision.\r\n Result.FList[i] := TGroup.Create(svalue, True);\r\n end;\r\n if not isUndefined(resObject['groups']) then\r\n begin\r\n Result.FNamedGroups := TJSObject(resObject['groups']);\r\n end;\r\nend;\r\n\r\n\r\nfunction TGroupCollection.GetCount: Integer;\r\nbegin\r\n Result := Length(FList);\r\nend;\r\n\r\nfunction TGroupCollection.GetEnumerator: TGroupCollectionEnumerator;\r\nbegin\r\n Result := TGroupCollectionEnumerator.Create(Self);\r\nend;\r\n\r\nfunction TGroupCollection.GetItem(Index: JSValue): TGroup;\r\nvar\r\n LIndex: Integer;\r\nbegin\r\n Case GetValueType(Index) of\r\n jvtString:\r\n begin\r\n if isUndefined(FNamedGroups[String(Index)]) then\r\n Result := TGroup.Create('', False)\r\n else\r\n Result := TGroup.Create(String(FNamedGroups[String(Index)]), True);\r\n end;\r\n jvtInteger:\r\n begin\r\n LIndex := Integer(Index);\r\n Result := FList[LIndex];\r\n end;\r\n else\r\n raise Exception.Create('Invalid group index passed');\r\n end;\r\nend;\r\n\r\n{ TGroupCollectionEnumerator }\r\n\r\nconstructor TGroupCollectionEnumerator.Create(const ACollection: TGroupCollection);\r\nbegin\r\n FCollection := ACollection;\r\n FIndex := -1;\r\nend;\r\n\r\nfunction TGroupCollectionEnumerator.GetCurrent: TGroup;\r\nbegin\r\n Result := FCollection.Item[FIndex];\r\nend;\r\n\r\nfunction TGroupCollectionEnumerator.MoveNext: Boolean;\r\nbegin\r\n Result := FIndex < FCollection.Count - 1;\r\n if Result then\r\n Inc(FIndex);\r\nend;\r\n\r\n{ TMatch }\r\nconstructor TMatch.Create(AJSRegExp: TJSRegexp; execResultArray: TStringDynArray);\r\nvar\r\n resObject: TJSObject;\r\n str: String;\r\nbegin\r\n FJSRegExp := AJSRegExp;\r\n if execResultArray = nil then\r\n begin\r\n FValue := '';\r\n FIndex := 0;\r\n FLength := 0;\r\n FSuccess := False;\r\n end\r\n else\r\n begin\r\n resObject := TJSObject(execResultArray);\r\n FInput := String(resObject['input']);\r\n str := execResultArray[0];\r\n\r\n FValue := str;\r\n FIndex := Integer(resObject['index']) + 1; //Delphi index\r\n FLength := System.length(str);\r\n FSuccess := True;\r\n end;\r\n FGroups := TGroupCollection.New(execResultArray);\r\nend;\r\n\r\n// To create empty\r\nclass function TMatch.New: TMatch;\r\nbegin\r\n Result.FValue := '';\r\n Result.FIndex := 0;\r\n Result.FLength := 0;\r\n Result.FSuccess := False;\r\nend;\r\n\r\nfunction TMatch.GetGroups: TGroupCollection;\r\nbegin\r\n Result := FGroups;\r\nend;\r\n\r\nfunction TMatch.NextMatch: TMatch;\r\nvar\r\n execResultArray: TStringDynArray;\r\nbegin\r\n if FJSRegExp = nil then\r\n begin\r\n Result := TMatch.New;\r\n exit;\r\n end;\r\n execResultArray := FJSRegExp.exec(FInput);\r\n Result := TMatch.Create(FJSRegExp, execResultArray);\r\nend;\r\n\r\n{ TMatchCollection }\r\n\r\nclass function TMatchCollection.New(aMatch: TMatch): TMatchCollection;\r\nvar\r\n Count: Integer;\r\nbegin\r\n Count := 0;\r\n SetLength(Result.FList, 0);\r\n if not aMatch.Success then\r\n exit;\r\n while aMatch.Success do\r\n begin\r\n if Count mod 10 = 0 then\r\n SetLength(Result.FList, Length(Result.FList) + 10);\r\n Result.FList[Count] := aMatch;\r\n aMatch := aMatch.NextMatch;\r\n Inc(Count);\r\n end;\r\n if Length(Result.FList) > Count then\r\n SetLength(Result.FList, Count);\r\nend;\r\n\r\nfunction TMatchCollection.GetCount: Integer;\r\nbegin\r\n Result := Length(FList);\r\nend;\r\n\r\nfunction TMatchCollection.GetEnumerator: TMatchCollectionEnumerator;\r\nbegin\r\n Result := TMatchCollectionEnumerator.Create(Self);\r\nend;\r\n\r\nfunction TMatchCollection.GetItem(Index: Integer): TMatch;\r\nbegin\r\n if (Index >= 0) and (Index < Length(FList)) then\r\n Result := FList[Index]\r\n else\r\n raise Exception.Create('Invalid match collection index passed.');\r\nend;\r\n\r\n{ TMatchCollectionEnumerator }\r\n\r\nconstructor TMatchCollectionEnumerator.Create(const ACollection: TMatchCollection);\r\nbegin\r\n FCollection := ACollection;\r\n FIndex := -1;\r\nend;\r\n\r\nfunction TMatchCollectionEnumerator.GetCurrent: TMatch;\r\nbegin\r\n Result := FCollection.Item[FIndex];\r\nend;\r\n\r\nfunction TMatchCollectionEnumerator.MoveNext: Boolean;\r\nbegin\r\n Result := FIndex < FCollection.Count - 1;\r\n if Result then\r\n Inc(FIndex);\r\nend;\r\n\r\n{ TRegEx related }\r\n\r\nfunction GetJSExceptionDetails(ExceptObject: TObject; out errorName: String; out errorMsg: String): Boolean;\r\nvar\r\n erName, erMsg: String;\r\nbegin\r\n result := False;\r\n if ExceptObject is Exception then\r\n exit;\r\n result := True;\r\n asm\r\n erName = ExceptObject.name;\r\n erMsg = ExceptObject.message;\r\n end;\r\n errorName := erName;\r\n errorMsg := erMsg;\r\nend;\r\n\r\nfunction FormatErrorMessage(errorName: String; errorMessage: String): String;\r\nbegin\r\n Result := Format('%s: %s',\r\n [errorName, errorMessage]);\r\nend;\r\n\r\n{ TRegEx }\r\nfunction TRegEx.GetJSRegExFlags(AddJSFlags: String=''): String;\r\nbegin\r\n // Meaning of new JSflags\r\n // By Default: use g is required for our implementation\r\n // g means keep state (lastindex)\r\n // Used for IsMatch\r\n // y means sticky, compare exactly at lastindex\r\n Result := 'g' + AddJSFlags;\r\n if (roIgnoreCase in FOptions) then\r\n Result := Result + 'i';\r\n if (roMultiLine in FOptions) then\r\n Result := Result + 'm';\r\n if (roSingleLine in FOptions) then\r\n Result := Result + 's';\r\n if (roJSUnicode in FOptions) then\r\n Result := Result + 'u';\r\nend;\r\n\r\nconstructor TRegEx.Create(const Pattern: String);\r\nbegin\r\n Create(Pattern, []);\r\nend;\r\n\r\nfunction RemoveLineEnding(aPattern: String): String;\r\nbegin\r\n Result := TrimRightSet(APattern, [#10, #13]);\r\n Result := TrimLeftSet(Result, [#10, #13]);\r\nend;\r\n\r\nconstructor TRegEx.Create(const Pattern: String; Options: TRegExOptions); overload;\r\nvar\r\n exe: Exception;\r\n excName, excMsg: String;\r\nbegin\r\n FPattern := RemoveLineEnding(Pattern);\r\n FOptions := Options;\r\n try\r\n FJSRegExp := TJSRegexp.New(FPattern, GetJSRegExFlags);\r\n except\r\n asm\r\n exe = $e;\r\n end;\r\n if not GetJSExceptionDetails(exe, excName, excMsg) then\r\n raise exe;\r\n excMsg := FormatErrorMessage(excName, excMsg);\r\n raise Exception.Create(excmsg);\r\n end;\r\nend;\r\n\r\nfunction TRegEx.IsMatch(const Input: String): Boolean;\r\nbegin\r\n Result := IsMatch(input, 1); //Start at first position\r\nend;\r\n\r\nfunction TRegEx.IsMatch(const Input: String; StartPos: Integer): Boolean;\r\nvar\r\n exe: Exception;\r\n excName, excMsg: String;\r\nbegin\r\n try\r\n // We need to recreate the regexp object with sticky flag y\r\n FJSRegExp := TJSRegexp.New(FPattern, GetJSRegExFlags('y'));\r\n FJSRegExp.lastIndex := StartPos - 1; //Delphi pos starts at 1\r\n // We can not use test method as that does not honor flag y for\r\n // exact comparison. Instead, use exec and analyze result.\r\n Result := FJSRegExp.exec(input) <> nil;\r\n except\r\n asm\r\n exe = $e;\r\n end;\r\n if not GetJSExceptionDetails(exe, excName, excMsg) then\r\n raise exe;\r\n excMsg := FormatErrorMessage(excName, excMsg);\r\n raise Exception.Create(excmsg);\r\n end;\r\nend;\r\n\r\nclass function TRegEx.IsMatch(const Input, Pattern: String): Boolean;\r\nvar\r\n aRegEx: TRegEx;\r\nbegin\r\n aRegEx := TRegEx.Create(Pattern);\r\n Result := aRegEx.IsMatch(Input);\r\nend;\r\n\r\nclass function TRegEx.IsMatch(const Input, Pattern: String; Options: TRegExOptions): Boolean;\r\nvar\r\n aRegEx: TRegEx;\r\nbegin\r\n aRegEx := TRegEx.Create(Pattern, Options);\r\n Result := aRegEx.IsMatch(Input);\r\nend;\r\n\r\n// Straight from Delphi. Needs to be tested.\r\nclass function TRegEx.Escape(const Str: String; UseWildCards: Boolean): String;\r\nconst\r\n Special: array [1 .. 14] of String = ('\\', '[', ']', '^', '$', '.', '|', '?',\r\n '*', '+', '(', ')', '{', '}'); // do not localize\r\nvar\r\n I: Integer;\r\nbegin\r\n Result := Str;\r\n for I := Low(Special) to High(Special) do\r\n begin\r\n Result := StringReplace(Result, Special[I], '\\' + Special[I], [rfReplaceAll]); // do not localize\r\n end;\r\n // CRLF becomes \\r\\n\r\n Result := StringReplace(Result, #13#10, '\\r\\n', [rfReplaceAll]); // do not localize\r\n // LF becomes \\n\r\n Result := StringReplace(Result, #10, '\\n', [rfReplaceAll]); // do not localize\r\n\r\n // If we're matching wildcards, make them Regex Groups so we can read them back if necessary\r\n if UseWildCards then\r\n begin\r\n // Replace all \\*s with (.*)\r\n Result := StringReplace(Result, '\\*', '(.*)', [rfReplaceAll]); // do not localize\r\n // Replace any \\?s with (.)\r\n Result := StringReplace(Result, '\\?', '(.)', [rfReplaceAll]); // do not localize\r\n\r\n // Wildcards can be escaped as ** or ??\r\n // Change back any escaped wildcards\r\n Result := StringReplace(Result, '(.*)(.*)', '\\*', [rfReplaceAll]); // do not localize\r\n Result := StringReplace(Result, '(.)(.)', '\\?', [rfReplaceAll]); // do not localize\r\n end;\r\nend;\r\n\r\nfunction TRegEx.Match(const Input: String): TMatch;\r\nbegin\r\n Result := Match(Input, 1); //Start at first position\r\nend;\r\n\r\nfunction TRegEx.Match(const Input: String; StartPos: Integer): TMatch; overload;\r\nvar\r\n execResultArray: TStringDynArray;\r\nbegin\r\n FJSRegExp.lastIndex := StartPos - 1; //Delphi pos starts at 1\r\n execResultArray := FJSRegExp.exec(input);\r\n Result := TMatch.Create(FJSRegExp, execResultArray);\r\nend;\r\n\r\nfunction TRegEx.Match(const Input: String; StartPos, Length: Integer): TMatch; overload;\r\nvar\r\n substr: String;\r\nbegin\r\n substr := copy(input, 1, StartPos + Length-1);\r\n Result := Match(substr, StartPos);\r\nend;\r\n\r\nclass function TRegEx.Match(const Input, Pattern: String): TMatch;\r\nvar\r\n aRegEx: TRegEx;\r\nbegin\r\n aRegEx := TRegEx.Create(Pattern);\r\n Result := aRegEx.Match(Input);\r\nend;\r\n\r\nclass function TRegEx.Match(const Input, Pattern: String; Options: TRegExOptions): TMatch;\r\nvar\r\n aRegEx: TRegEx;\r\nbegin\r\n aRegEx := TRegEx.Create(Pattern, Options);\r\n Result := aRegEx.Match(Input);\r\nend;\r\n\r\nfunction TRegEx.Matches(const Input: String): TMatchCollection;\r\nbegin\r\n Result := Matches(Input, 1);\r\nend;\r\n\r\nfunction TRegEx.Matches(const Input: String; StartPos: Integer): TMatchCollection;\r\nvar\r\n aMatch: TMatch;\r\nbegin\r\n aMatch := Match(Input, StartPos);\r\n Result := TMatchCollection.New(aMatch);\r\nend;\r\n\r\nclass function TRegEx.Matches(const Input, Pattern: String): TMatchCollection;\r\nvar\r\n aRegEx: TRegEx;\r\nbegin\r\n aRegEx := TRegEx.Create(Pattern);\r\n Result := aRegEx.Matches(Input);\r\nend;\r\n\r\nclass function TRegEx.Matches(const Input, Pattern: String; Options: TRegExOptions): TMatchCollection;\r\nvar\r\n aRegEx: TRegEx;\r\nbegin\r\n aRegEx := TRegEx.Create(Pattern, Options);\r\n Result := aRegEx.Matches(Input);\r\nend;\r\n\r\nfunction TRegEx.Replace(const Input, Replacement: String): String;\r\nvar\r\n anStr: TJSString;\r\nbegin\r\n anStr := TJSString.New(Input);\r\n Result := anStr.replace(FJSRegExp, Replacement);\r\nend;\r\n\r\n// Note that information passed to offset and input will be wrong\r\n// because depending on groups present first group will come as offset parameter\r\n// and so on. There is no way we can create a match only from these arguments.\r\n// We rather inspect JSArguments to find what we need.\r\nFunction TRegEx.DoOnReplace(Const match: String; offsetDontUse: Integer; InputDontUse: String) : String;\r\nvar\r\n execResultArray: TStringDynArray;\r\n i, numArgs: Integer;\r\n aMatch: TMatch;\r\nbegin\r\n { we make up an array same as execResultArray from arguments\r\n so that a TMatch can be constructed from it by existing\r\n constructors.\r\n The indexes needed:\r\n 0 -- the match\r\n 1, n -- group strings found\r\n property index - offset of match\r\n property input -- Input String\r\n -------------\r\n Now, we inspect JSArguments array to see actual arguments\r\n passed to this function to get the groups which are not\r\n passed in actual arguments above.\r\n Logic: JSArguments array contains offset at n+1 and input at n+2\r\n So we simply copy length-2 elements and then add properties\r\n from the last 2 arguments of JSArguments\r\n }\r\n numArgs := JSArguments.length;\r\n setLength(execResultArray, numArgs-2);\r\n for i := 0 to length(execResultArray)-1 do\r\n execResultArray[i] := String(JSArguments[i]);\r\n TJSObject(execResultArray)['index'] := Integer(JSArguments[numArgs-2]);\r\n TJSObject(execResultArray)['input'] := String(JSArguments[numArgs-1]);\r\n\r\n aMatch := TMatch.Create(FJSRegExp, execResultArray);\r\n Result := FMatchEvaluator(aMatch);\r\nend;\r\n\r\nfunction TRegEx.Replace(const Input: String; Evaluator: TMatchEvaluator): String; overload;\r\nvar\r\n anStr: TJSString;\r\nbegin\r\n anStr := TJSString.New(Input);\r\n FMatchEvaluator := Evaluator;\r\n try\r\n Result := anStr.replace(FJSRegExp, @DoOnReplace);\r\n finally\r\n FMatchEvaluator := nil;\r\n end;\r\nend;\r\n\r\nclass function TRegEx.Replace(const Input, Pattern, Replacement: String): String;\r\nvar\r\n aRegEx: TRegEx;\r\nbegin\r\n aRegEx := TRegEx.Create(Pattern);\r\n Result := aRegEx.Replace(Input, Replacement);\r\nend;\r\n\r\nclass function TRegEx.Replace(const Input, Pattern: String; Evaluator: TMatchEvaluator): String;\r\nvar\r\n aRegEx: TRegEx;\r\nbegin\r\n aRegEx := TRegEx.Create(Pattern);\r\n Result := aRegEx.Replace(Input, Evaluator);\r\nend;\r\n\r\nclass function TRegEx.Replace(const Input, Pattern, Replacement: String; Options: TRegExOptions): String;\r\nvar\r\n aRegEx: TRegEx;\r\nbegin\r\n aRegEx := TRegEx.Create(Pattern, Options);\r\n Result := aRegEx.Replace(Input, Replacement);\r\nend;\r\n\r\nclass function TRegEx.Replace(const Input, Pattern: String; Evaluator: TMatchEvaluator; Options: TRegExOptions): String;\r\nvar\r\n aRegEx: TRegEx;\r\nbegin\r\n aRegEx := TRegEx.Create(Pattern, Options);\r\n Result := aRegEx.Replace(Input, Evaluator);\r\nend;\r\n\r\nfunction TRegEx.Split(const Input: String): TStringDynArray;\r\nvar\r\n anStr: TJSString;\r\nbegin\r\n anStr := TJSString.New(Input);\r\n Result := anStr.split(FJSRegExp);\r\nend;\r\n\r\nclass function TRegEx.Split(const Input, Pattern: String): TStringDynArray;\r\nvar\r\n aRegEx: TRegEx;\r\nbegin\r\n aRegEx := TRegEx.Create(Pattern);\r\n Result := aRegEx.Split(Input);\r\nend;\r\n\r\nclass function TRegEx.Split(const Input, Pattern: String; Options: TRegExOptions): TStringDynArray;\r\nvar\r\n aRegEx: TRegEx;\r\nbegin\r\n aRegEx := TRegEx.Create(Pattern, Options);\r\n Result := aRegEx.Split(Input);\r\nend;\r\n\r\nend.\r\n","{********************************************************************}\r\n{ }\r\n{ written by TMS Software }\r\n{ copyright (c) 2018 - 2025 }\r\n{ Email : info@tmssoftware.com }\r\n{ Web : http://www.tmssoftware.com }\r\n{ }\r\n{ The source code is given as is. The author is not responsible }\r\n{ for any possible damage done due to the use of this code. }\r\n{ The complete source code remains property of the author and may }\r\n{ not be distributed, published, given or sold in any form as such. }\r\n{ No parts of the source code can be included in any other component }\r\n{ or application without written authorization of the author. }\r\n{********************************************************************}\r\n\r\nunit WEBLib.CDS;\r\n\r\n{$DEFINE NOPP}\r\n\r\ninterface\r\n\r\nuses\r\n Classes, DB, jsondataset, Web, js, WEBLib.Controls, WEBLib.REST;\r\n\r\ntype\r\n TCustomClientDataSet = class;\r\n\r\n TClientDataSource = class(TDataSource)\r\n end;\r\n\r\n TConnectErrorEvent = procedure(Sender: TObject; ErrorCode: integer) of object;\r\n\r\n TURLType = (utGet,utPost,utPut,utDelete);\r\n\r\n TClientConnectionGetURLEvent = procedure(Sender: TObject; Dataset : TDataset; urlType : TURLType; Var URL : String) of object;\r\n\r\n TGetUpdatePayloadEvent = procedure(Sender : TObject; Dataset : TDataset; urlType : TURLType; Data : JSValue; out aPayLoad : String) of object;\r\n\r\n TGetDataPayloadEvent = procedure(Sender : TObject; Dataset : TDataset; urlType : TURLType; var aPayLoad : JSValue) of object;\r\n\r\n TProcessMetaDataEvent = procedure(Sender : TObject; Dataset : TDataset; FieldDefs : TFieldDefs; aMetaData : TJSObject) of object;\r\n\r\n TDataReceivedEvent = procedure(Sender: TObject; ARequest: TJSXMLHttpRequestRecord; var AResponse: string) of object;\r\n\r\n // for compatibility with Delphi code\r\n TWideStringField = class(TStringField);\r\n\r\n TClientConnection = class(TComponent)\r\n private\r\n FDataProxy: TDataProxy;\r\n FActive: boolean;\r\n FURI: string;\r\n FDS: TCustomClientDataSet;\r\n FDataNode: string;\r\n FAutoOpen: boolean;\r\n FUpdateCount: integer;\r\n FOnConnectError: TConnectErrorEvent;\r\n FBeforeConnect: TNotifyEvent;\r\n FAfterConnect: TNotifyEvent;\r\n FHeaders: TStringList;\r\n FPassword: string;\r\n FUser: string;\r\n FOnGetURL: TClientConnectionGetURLEvent;\r\n FPageParam: string;\r\n FOnGetUpdatePayLoad: TGetUpdatePayloadEvent;\r\n FAppendKeyToURL: boolean;\r\n FOnGetDataPayLoad: TGetDataPayloadEvent;\r\n FMetaDataNode: string;\r\n FOnProcessMetaData: TProcessMetadataEvent;\r\n FOnDataReceived: TDataReceivedEvent;\r\n FXHR: TJSXMLHttpRequest;\r\n FCommand: THTTPCommand;\r\n FCustomCommand: string;\r\n FPostData: string;\r\n FDelimiter: char;\r\n FSkipFirstCSVLine: boolean;\r\n FOpenResolver: TJSPromiseResolver;\r\n procedure SetHeaders(const Value: TStringList);\r\n function GetPageURL(aRequest: TDataRequest): String;\r\n function GetRecordUpdateURL(aRequest: TRecordUpdateDescriptor): String;\r\n function GetDataProxy: TDataProxy;\r\n procedure SetDataNode(const Value: string);\r\n procedure SetURI(const Value: string);\r\n function onError(Event: TEventListenerEvent): boolean; virtual;\r\n function onAbort(Event: TEventListenerEvent): boolean; virtual;\r\n function onLoad(Event: TEventListenerEvent): boolean; virtual;\r\n protected\r\n procedure SetActive(const Value: boolean);\r\n procedure ProcessMetadata(Dataset : TDataset; FieldDefs : TFieldDefs; aMetaData : TJSObject); virtual;\r\n function GetReadBaseURL(aRequest: TDataRequest): String; virtual;\r\n function GetUpdateBaseURL(aRequest: TRecordUpdateDescriptor): String; virtual;\r\n procedure RegisterDataSet(const value: TCustomClientDataSet);\r\n procedure DoOpenResolve(AResult: boolean); virtual;\r\n procedure DoAfterLoad(DataSet: TDataSet);\r\n procedure DoRequest; virtual;\r\n procedure DoConnect; virtual;\r\n procedure DoDisconnect; virtual;\r\n procedure DoBeforeConnect; virtual;\r\n procedure DoAfterConnect; virtual;\r\n procedure DoError(ErrorCode: integer);\r\n procedure DoDataReceived(ARequest: TJSXMLHttpRequest; var AResponse: string);\r\n procedure SetupRequest(aXHR: TJSXMLHttpRequest); virtual;\r\n function GetDataNode : String; virtual;\r\n function GetMetaDataNode : String; virtual;\r\n function DoGetDataProxy : TDataProxy; virtual;\r\n function GetUpdatePayLoad(aURLType : TURLType; aDataset : TDataset; AData : JSValue) : String; virtual;\r\n public\r\n constructor Create(AOwner: TComponent); override;\r\n destructor Destroy; override;\r\n procedure BeginUpdate; override;\r\n procedure EndUpdate; override;\r\n function Open: TJSPromise;\r\n procedure Close;\r\n procedure AfterLoadDFMValues; override;\r\n property DataProxy : TDataProxy Read GetDataProxy;\r\n class function StatusToURLType(aStatus : TUpdateStatus) : TURLType;\r\n published\r\n property Active: boolean read FActive write SetActive;\r\n property AppendKeyToURL : boolean read FAppendKeyToURL write FAppendKeyToURL default true;\r\n property AutoOpenDataSet: boolean read FAutoOpen write FAutoOpen default true;\r\n property Command: THTTPCommand read FCommand write FCommand default httpGET;\r\n property CustomCommand: string read FCustomCommand write FCustomCommand;\r\n property DataNode: string read FDataNode write SetDataNode;\r\n property Delimiter: char read FDelimiter write FDelimiter;\r\n property MetaDataNode: string read FMetaDataNode write FMetaDataNode;\r\n property PageParam: string read FPageParam write FPageParam;\r\n property PostData: string read FPostData write FPostData;\r\n property Headers: TStringList read FHeaders write SetHeaders;\r\n property Password: string read FPassword write FPassword;\r\n property SkipFirstCSVLine: boolean read FSkipFirstCSVLine write FSkipFirstCSVLine default false;\r\n property User: string read FUser write FUser;\r\n property URI: string read FURI write SetURI;\r\n property AfterConnect: TNotifyEvent read FAfterConnect write FAfterConnect;\r\n property BeforeConnect: TNotifyEvent read FBeforeConnect write FBeforeConnect;\r\n \tproperty OnConnectError: TConnectErrorEvent read FOnConnectError write FOnConnectError;\r\n property OnDataReceived: TDataReceivedEvent read FOnDataReceived write FOnDataReceived;\r\n property OnGetURL : TClientConnectionGetURLEvent Read FOnGetURL Write FOnGetURL;\r\n Property OnGetUpdatePayLoad : TGetUpdatePayloadEvent Read FOnGetUpdatePayLoad Write FOnGetUpdatePayLoad;\r\n Property OnGetDataPayload : TGetDataPayloadEvent Read FOnGetDataPayLoad Write FOnGetDataPayLoad;\r\n Property OnProcessMetaData : TProcessMetadataEvent Read FOnProcessMetaData Write FOnProcessMetaData;\r\n end;\r\n\r\n TWebClientConnection = class(TClientConnection);\r\n\r\n TWebClientDataProxy = class(TDataProxy)\r\n private\r\n FConnection: TClientConnection;\r\n protected\r\n procedure CheckBatchComplete(aBatch : TRecordUpdateBatch); virtual;\r\n public\r\n function GetUpdateDescriptorClass : TRecordUpdateDescriptorClass; override;\r\n function ProcessUpdateBatch(aBatch : TRecordUpdateBatch): Boolean; override;\r\n function DoGetData(aRequest: TDataRequest): Boolean; override;\r\n function GetDataRequest(aOptions: TLoadOptions; aAfterRequest: TDataRequestEvent; aAfterLoad: TDatasetLoadEvent) : TDataRequest; override;\r\n constructor Create(AOwner: TComponent); override;\r\n property Connection: TClientConnection read FConnection;\r\n end;\r\n\r\n TUpdateRecordEvent = procedure(Sender: TObject; ADescriptor: TRecordUpdateDescriptor) of object;\r\n\r\n TCustomClientDataSet = class(TBaseJSONDataSet)\r\n private\r\n FConnection: TClientConnection;\r\n FOnUpdateRecord: TUpdateRecordEvent;\r\n FUpdateCount: integer;\r\n FIDField: string;\r\n FuseServerMetadata: Boolean;\r\n FParams: TParams;\r\n FOpenResolver: TJSPromiseResolver;\r\n FPostResolver: TJSPromiseResolver;\r\n FInsertResolver: TJSPromiseResolver;\r\n FUpdateResolver: TJSPromiseResolver;\r\n FDeleteResolver: TJSPromiseResolver;\r\n procedure SetParams(const Value: TParams);\r\n function GetIndexDefs: TJSONIndexDefs;\r\n function GetIndexName: string;\r\n procedure SetIndexName(const Value: string);\r\n protected\r\n function GetStringFieldLength(F: TJSObject; AName: string; AIndex: Integer): integer; virtual;\r\n function StringToFieldType(S: String): TFieldType; virtual;\r\n Function DoResolveRecordUpdate(anUpdate: TRecordUpdateDescriptor): Boolean; override;\r\n procedure ResolveUpdateBatch(Sender: TObject; aBatch: TRecordUpdateBatch); override;\r\n Function DataPacketReceived(aRequest : TDataRequest) : Boolean; override;\r\n procedure DoOpenResolve(AResult: boolean); virtual;\r\n procedure DoPostResolve(AResult: boolean); virtual;\r\n procedure DoInsertResolve(AResult: boolean); virtual;\r\n procedure DoUpdateResolve(AResult: boolean); virtual;\r\n procedure DoDeleteResolve(AResult: boolean); virtual;\r\n procedure DoUpdateRecord(ADescriptor: TRecordUpdateDescriptor); virtual;\r\n procedure MetaDataToFieldDefs; override;\r\n procedure SetConnection(const Value: TClientConnection);\r\n function CreateFieldMapper : TJSONFieldMapper; override;\r\n procedure InitFieldDefs; override;\r\n procedure InternalInitFieldDefs; override;\r\n procedure FieldDefsFromRows(aRows: TJSArray);\r\n procedure DoAfterOpen; override;\r\n procedure DoAfterPost; override;\r\n procedure DoAfterInsert; override;\r\n procedure DoAfterDelete; override;\r\n function DoGetDataProxy: TDataProxy; override;\r\n property Connection: TClientConnection read FConnection write SetConnection;\r\n property OnUpdateRecord: TUpdateRecordEvent read FOnUpdateRecord write FOnUpdateRecord;\r\n property Params: TParams Read FParams Write SetParams;\r\n property IDField: string read FIDField write FIDField;\r\n property UseServerMetadata: Boolean Read FuseServerMetadata Write FuseServerMetadata;\r\n procedure SetActive(Value: Boolean); override;\r\n public\r\n constructor Create(AOwner: TComponent); override;\r\n destructor Destroy; override;\r\n function OpenAsync: TJSPromise;\r\n function PostAsync: TJSPromise; virtual;\r\n function InsertAsync: TJSPromise;\r\n function AppendAsync: TJSPromise;\r\n function DeleteAsync: TJSPromise; virtual;\r\n function ApplyUpdatesAsync: TJSPromise;\r\n procedure BeginUpdate; override;\r\n procedure EndUpdate; override;\r\n procedure AfterLoadDFMValues; override;\r\n procedure GetChildren(Proc: TGetChildProc; Root: TComponent); override;\r\n procedure EmptyDataSet;\r\n property Rows;\r\n property DataProxy;\r\n procedure Refresh; reintroduce;\r\n property Indexes;\r\n property IndexDefs: TJSONIndexDefs read GetIndexDefs;\r\n property IndexName: string read GetIndexName write SetIndexName;\r\n property FieldDefs;\r\n property ActiveIndex;\r\n property Active;\r\n published\r\n end;\r\n\r\n TClientDataSet = class(TCustomClientDataSet)\r\n public\r\n property IDField: string read FIDField write FIDField;\r\n published\r\n property Active;\r\n property Connection;\r\n property Params;\r\n\r\n property BeforeOpen;\r\n property AfterOpen;\r\n property BeforeClose;\r\n property AfterClose;\r\n property BeforeInsert;\r\n property AfterInsert;\r\n property BeforeEdit;\r\n property AfterEdit;\r\n property BeforePost;\r\n property AfterPost;\r\n property BeforeCancel;\r\n property AfterCancel;\r\n property BeforeDelete;\r\n property AfterDelete;\r\n property BeforeScroll;\r\n property AfterScroll;\r\n property OnCalcFields;\r\n property OnDeleteError;\r\n property OnEditError;\r\n property OnFilterRecord;\r\n property OnNewRecord;\r\n property OnPostError;\r\n property OnUpdateRecord;\r\n end;\r\n\r\n\r\n TWebClientDataSet = class(TClientDataSet);\r\n\r\nimplementation\r\n\r\nuses\r\n SysUtils, Types, WEBLib.Dialogs;\r\n\r\ntype\r\n { TWebClientDataRequest }\r\n\r\n TWebClientDataRequest = Class(TDataRequest)\r\n private\r\n FXHR: TJSXMLHttpRequest;\r\n FConnection: TClientConnection;\r\n protected\r\n function onError(Event: TEventListenerEvent): boolean; virtual;\r\n function onAbort(Event: TEventListenerEvent): boolean; virtual;\r\n function onLoad(Event: TEventListenerEvent): boolean; virtual;\r\n function TransformResult: JSValue; virtual;\r\n property Connection : TClientConnection read FConnection;\r\n end;\r\n\r\n { TWebClientUpdateRequest }\r\n\r\n TWebClientUpdateRequest = Class(TRecordUpdateDescriptor)\r\n private\r\n FXHR: TJSXMLHttpRequest;\r\n FBatch: TRecordUpdateBatch;\r\n FConnection: TClientConnection;\r\n protected\r\n function TransformResult: JSValue; virtual;\r\n function onError(Event: TEventListenerEvent): boolean; virtual;\r\n function onAbort(Event: TEventListenerEvent): boolean; virtual;\r\n function onLoad(Event: TEventListenerEvent): boolean; virtual;\r\n property Connection : TClientConnection read FConnection;\r\n end;\r\n\r\n{ TClientDataSet }\r\n\r\nprocedure TCustomClientDataSet.AfterLoadDFMValues;\r\nbegin\r\n inherited;\r\n\r\n InitFieldDefs;\r\nend;\r\n\r\nfunction TCustomClientDataSet.AppendAsync: TJSPromise;\r\nbegin\r\n Result := TJSPromise.new(\r\n procedure(ASuccess, AFailed: TJSPromiseResolver)\r\n begin\r\n FInsertResolver := ASuccess;\r\n Self.Append;\r\n end)\r\nend;\r\n\r\nprocedure TCustomClientDataSet.BeginUpdate;\r\nbegin\r\n inherited;\r\n inc(FUpdateCount);\r\nend;\r\n\r\nconstructor TCustomClientDataSet.Create(AOwner: TComponent);\r\nbegin\r\n inherited;\r\n FParams := TParams.Create(TParam);\r\nend;\r\n\r\nfunction TCustomClientDataSet.CreateFieldMapper : TJSONFieldMapper;\r\nbegin\r\n Result := TJSONObjectFieldMapper.Create;\r\nend;\r\n\r\nfunction TCustomClientDataSet.OpenAsync: TJSPromise;\r\nbegin\r\n Result := TJSPromise.new(\r\n procedure(ASuccess, AFailed: TJSPromiseResolver)\r\n begin\r\n FOpenResolver := ASuccess;\r\n Self.Open;\r\n end)\r\nend;\r\n\r\nfunction TCustomClientDataSet.PostAsync: TJSPromise;\r\nbegin\r\n Result := TJSPromise.new(\r\n procedure(ASuccess, AFailed: TJSPromiseResolver)\r\n begin\r\n FPostResolver := ASuccess;\r\n Self.Post;\r\n end)\r\nend;\r\n\r\nfunction TCustomClientDataSet.DeleteAsync: TJSPromise;\r\nbegin\r\n Result := TJSPromise.new(\r\n procedure(ASuccess, AFailed: TJSPromiseResolver)\r\n begin\r\n FDeleteResolver := ASuccess;\r\n Self.Delete;\r\n end)\r\nend;\r\n\r\n\r\nfunction TCustomClientDataSet.InsertAsync: TJSPromise;\r\nbegin\r\n Result := TJSPromise.new(\r\n procedure(ASuccess, AFailed: TJSPromiseResolver)\r\n begin\r\n FInsertResolver := ASuccess;\r\n Self.Insert;\r\n end)\r\nend;\r\n\r\nfunction TCustomClientDataSet.ApplyUpdatesAsync: TJSPromise;\r\nbegin\r\n Result := TJSPromise.new(\r\n procedure(ASuccess, AFailed: TJSPromiseResolver)\r\n begin\r\n FUpdateResolver := ASuccess;\r\n Self.ApplyUpdates;\r\n end)\r\nend;\r\n\r\nprocedure TCustomClientDataSet.ResolveUpdateBatch(Sender: TObject; aBatch: TRecordUpdateBatch);\r\nvar\r\n i: integer;\r\n res: boolean;\r\nbegin\r\n inherited;\r\n\r\n res := aBatch.List.Count > 0;\r\n\r\n for i := 0 to aBatch.List.Count - 1 do\r\n begin\r\n if Assigned(aBatch.List[i]) and (aBatch.List[i].ResolveStatus <> rsResolved) then\r\n res := false;\r\n end;\r\n\r\n DoUpdateResolve(res);\r\nend;\r\n\r\nfunction TCustomClientDataSet.DoResolveRecordUpdate(anUpdate: TRecordUpdateDescriptor): Boolean;\r\nvar\r\n D: JSValue;\r\n O: TJSObject;\r\n A: TJSArray;\r\n I,RecordIndex: Integer;\r\n Root,FN,subn: string;\r\n\r\nbegin\r\n Result := True;\r\n\r\n if anUpdate.Status = usDeleted then\r\n Exit;\r\n\r\n D := anUpdate.ServerData;\r\n\r\n If isNull(D) then\r\n Exit;\r\n\r\n if not isNumber(AnUpdate.Bookmark.Data) then\r\n Exit(False);\r\n\r\n RecordIndex := Integer(AnUpdate.Bookmark.Data);\r\n\r\n If isString(D) then\r\n O := TJSOBject(TJSJSON.Parse(String(D)))\r\n else if isObject(D) then\r\n O := TJSOBject(D)\r\n else\r\n Exit(False);\r\n\r\n Root := Connection.DataNode; // Maybe allow this to be set in the data packet ?\r\n\r\n while Pos('\\', root) > 0 do\r\n begin\r\n subn := Copy(root, 1, pos('\\', root) - 1);\r\n root := Copy(root, pos('\\',root) + 1, Length(root));\r\n O := TJSObject(O[subn]);\r\n end;\r\n\r\n if not isArray(O[Root]) then\r\n Exit(False);\r\n\r\n A := TJSArray(O[Root]);\r\n if A.Length = 1 then\r\n begin\r\n O := TJSObject(A[0]);\r\n for I := 0 to Fields.Count - 1 do\r\n begin\r\n FN := Fields[i].FieldName;\r\n if O.hasOwnProperty(FN) then\r\n FieldMapper.SetJSONDataForField(Fields[i],Rows[RecordIndex],O[FN]);\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TCustomClientDataSet.DataPacketReceived(aRequest: TDataRequest): Boolean;\r\nvar\r\n O,MD: TJSObject;\r\n V: JSValue;\r\n A: TJSArray;\r\n lmetadata,Root,subn,s: string;\r\n isjson: boolean;\r\n sl,lines: TStringList;\r\n fl,l,c,flds: integer;\r\n\r\nbegin\r\n Result := False;\r\n if isNull(aRequest.Data) then\r\n Exit;\r\n\r\n O := nil;\r\n A := nil;\r\n\r\n if isString(aRequest.Data) then\r\n begin\r\n isjson := true;\r\n s := Trim(string(aRequest.Data));\r\n if (Length(s) > 1) then\r\n begin\r\n if (s[1] <> '[') and (s[1] <> '{') then\r\n isjson := false;\r\n end;\r\n\r\n if not isjson then\r\n begin\r\n sl := TStringList.Create;\r\n lines := TStringList.Create;\r\n lines.Delimiter := Connection.Delimiter;\r\n lines.StrictDelimiter := true;\r\n sl.Text := string(aRequest.Data);\r\n A := TJSArray.new;\r\n A.Length := sl.Count;\r\n fl := 0;\r\n if Connection.SkipFirstCSVLine then\r\n fl := 1;\r\n\r\n for l := fl to sl.Count - 1 do\r\n begin\r\n A[l] := TJSArray.new;\r\n lines.DelimitedText := sl.Strings[l];\r\n flds := lines.Count;\r\n\r\n o := TJSObject.new;\r\n for c := 0 to lines.Count - 1 do\r\n begin\r\n o.Properties['column'+c.ToString] := lines[c];\r\n end;\r\n\r\n A[l] := o;\r\n end;\r\n\r\n Result := (A <> nil) and (A.Length > 0);\r\n\r\n if Assigned(A) and (A.Length > 0) and Assigned(FieldDefs) and (FieldDefs.Count = 0) then\r\n begin\r\n for l := 0 to flds - 1 do\r\n FieldDefs.Add('column'+l.toString, ftString, 255);\r\n\r\n AddToRows(A);\r\n end;\r\n\r\n lines.Free;\r\n sl.Free;\r\n Exit;\r\n end;\r\n end;\r\n\r\n // Check the raw result\r\n if isString(aRequest.Data) then\r\n begin\r\n V := TJSJSON.Parse(string(aRequest.Data));\r\n if isArray(V) then\r\n begin\r\n A := TJSArray(V);\r\n end\r\n else\r\n if isObject(V) then\r\n O := TJSOBject(V);\r\n end\r\n else\r\n if isArray(aRequest.Data) then\r\n begin\r\n A := TJSArray(aRequest.Data);\r\n end\r\n else if isObject(aRequest.Data) then\r\n begin\r\n O := TJSOBject(aRequest.Data);\r\n end\r\n else\r\n DatabaseError('Cannot handle data packet');\r\n\r\n // At this point, either O or A is set.\r\n // If we have an object, examine it and extract the data\r\n if Assigned(O) then\r\n begin\r\n // Some defaults\r\n root := Connection.GetDataNode;\r\n lmetadata := Connection.GetMetaDataNode;\r\n\r\n while Pos('\\', root) > 0 do\r\n begin\r\n subn := Copy(root, 1, pos('\\', root) - 1);\r\n root := Copy(root, pos('\\',root) + 1, Length(root));\r\n O := TJSObject(O[subn]);\r\n end;\r\n\r\n if (IDField='') then\r\n idField := 'id';\r\n\r\n // Check metadata\r\n if useServerMetadata and O.hasOwnProperty(lMetaData) and isObject(o[lMetaData]) then\r\n begin\r\n MD := TJSObject(o[lMetaData]);\r\n if not Active then // Load fields from metadata\r\n metaData := MD;\r\n // We must always check this one...\r\n if MD.hasOwnProperty('root') and isString(MD['root']) then\r\n Root := string(metaData['root']);\r\n if MD.hasOwnProperty('idField') and isString(MD['idField']) then\r\n IDField := string(MD['idField']);\r\n end;\r\n\r\n if (Root <> '') and O.hasOwnProperty(Root) and isArray(o[Root]) then\r\n A := TJSArray(o[Root]);\r\n end;\r\n\r\n if Assigned(A) and (A.Length > 0) and Assigned(FieldDefs) and (FieldDefs.Count = 0) then\r\n begin\r\n FieldDefsFromRows(A);\r\n end;\r\n\r\n // If we have an array, add to data\r\n Result := (A <> nil) and (A.Length > 0);\r\n\r\n if Result then\r\n AddToRows(A);\r\nend;\r\n\r\ndestructor TCustomClientDataSet.Destroy;\r\nbegin\r\n FreeAndNil(FParams);\r\n inherited;\r\nend;\r\n\r\nfunction TCustomClientDataSet.DoGetDataProxy: TDataProxy;\r\nbegin\r\n if Assigned(Connection) then\r\n Result := Connection.DataProxy\r\n else\r\n Result := nil;\r\nend;\r\n\r\nprocedure TCustomClientDataSet.DoInsertResolve(AResult: boolean);\r\nbegin\r\n if Assigned(FInsertResolver) then\r\n FInsertResolver(AResult);\r\nend;\r\n\r\nprocedure TCustomClientDataSet.DoUpdateResolve(AResult: boolean);\r\nbegin\r\n if Assigned(FUpdateResolver) then\r\n FUpdateResolver(AResult);\r\nend;\r\n\r\nprocedure TCustomClientDataSet.DoOpenResolve(AResult: boolean);\r\nbegin\r\n if Assigned(FOpenResolver) then\r\n begin\r\n FOpenResolver(AResult);\r\n FOpenResolver := nil; // ensure one time call\r\n end;\r\nend;\r\n\r\nprocedure TCustomClientDataSet.DoPostResolve(AResult: boolean);\r\nbegin\r\n if Assigned(FPostResolver) then\r\n FPostResolver(AResult);\r\nend;\r\n\r\nprocedure TCustomClientDataSet.DoDeleteResolve(AResult: boolean);\r\nbegin\r\n if Assigned(FDeleteResolver) then\r\n FDeleteResolver(AResult);\r\nend;\r\n\r\nprocedure TCustomClientDataSet.DoUpdateRecord(ADescriptor: TRecordUpdateDescriptor);\r\nbegin\r\n if Assigned(OnUpdateRecord) then\r\n OnUpdateRecord(Self, ADescriptor);\r\nend;\r\n\r\nprocedure TCustomClientDataSet.EmptyDataSet;\r\nbegin\r\n First;\r\n while not Eof do\r\n Delete;\r\nend;\r\n\r\nprocedure TCustomClientDataSet.EndUpdate;\r\nbegin\r\n inherited;\r\n if FUpdateCount > 0 then\r\n dec(FUpdateCount);\r\nend;\r\n\r\nprocedure TCustomClientDataSet.FieldDefsFromRows(aRows : TJSArray);\r\nvar\r\n J: TJSObject;\r\n JV: JSValue;\r\n strArr: TStringDynArray;\r\n i: integer;\r\n\r\nbegin\r\n if (FieldDefs.Count = 0) and Assigned(aRows) and (aRows.Length > 0) then\r\n begin\r\n J := TJSObject(aRows.Elements[0]);\r\n strArr := TJSObject.getOwnPropertyNames(J);\r\n\r\n for i := 0 to Length(strArr) - 1 do\r\n begin\r\n JV := J.Properties[strArr[i]];\r\n\r\n if isString(JV) then\r\n FieldDefs.Add(strArr[i],ftString,255);\r\n\r\n if isNumber(JV) then\r\n FieldDefs.Add(strArr[i],ftFloat);\r\n\r\n if isBoolean(JV) then\r\n FieldDefs.Add(strArr[i],ftBoolean);\r\n\r\n if isDate(JV) then\r\n FieldDefs.Add(strArr[i],ftDate);\r\n\r\n if isNull(JV) then\r\n FieldDefs.Add(strArr[i],ftString,255);\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TCustomClientDataSet.InitFieldDefs;\r\n\r\n procedure HandleChildField(Child: TComponent);\r\n begin\r\n if Child is TStringField then\r\n FieldDefs.Add((Child as TStringField).FieldName, ftString, (Child as TStringField).Size);\r\n\r\n if Child is TBooleanField then\r\n FieldDefs.Add((Child as TBooleanField).FieldName, ftBoolean, 0);\r\n\r\n if Child is TAutoIncField then\r\n FieldDefs.Add((Child as TAutoIncField).FieldName, ftAutoInc, 0)\r\n else\r\n if Child is TIntegerField then\r\n FieldDefs.Add((Child as TIntegerField).FieldName, ftInteger, 0)\r\n else\r\n if Child is TLargeIntField then\r\n FieldDefs.Add((Child as TLargeIntField).FieldName, ftLargeInt, 0)\r\n else\r\n if Child is TFloatField then\r\n FieldDefs.Add((Child as TFloatField).FieldName, ftFloat, 0)\r\n else\r\n if Child is TNumericField then\r\n FieldDefs.Add((Child as TNumericField).FieldName, ftInteger, 0);\r\n\r\n\r\n if Child is TDateField then\r\n FieldDefs.Add((Child as TDateField).FieldName, ftDate, 0)\r\n else if Child is TTimeField then\r\n FieldDefs.Add((Child as TTimeField).FieldName, ftDate, 0)\r\n else if Child is TDateTimeField then\r\n FieldDefs.Add((Child as TDateTimeField).FieldName, ftDateTime, 0);\r\n\r\n if Child is TMemoField then\r\n FieldDefs.Add((Child as TMemoField).FieldName, ftMemo, 0)\r\n else\r\n if Child is TBlobField then\r\n FieldDefs.Add((Child as TBlobField).FieldName, ftBlob, 0);\r\n end;\r\n\r\nbegin\r\n FieldDefs.Clear;\r\n GetChildren(@HandleChildField, Self);\r\nend;\r\n\r\nprocedure TCustomClientDataSet.InternalInitFieldDefs;\r\nbegin\r\n if (FieldDefs.Count = 0) and Assigned(Rows) and (Rows.Length > 0) then\r\n begin\r\n FieldDefsFromRows(Rows);\r\n end;\r\n\r\n inherited;\r\nend;\r\n\r\nprocedure TCustomClientDataSet.DoAfterDelete;\r\nbegin\r\n inherited;\r\n DoDeleteResolve(true);\r\nend;\r\n\r\nprocedure TCustomClientDataSet.DoAfterInsert;\r\nbegin\r\n inherited;\r\n\r\n DoInsertResolve(true);\r\nend;\r\n\r\nprocedure TCustomClientDataSet.DoAfterOpen;\r\nbegin\r\n inherited;\r\n\r\n DoOpenResolve(true);\r\n\r\n if Assigned(Connection) and Connection.AutoOpenDataSet then\r\n begin\r\n Connection.DoAfterConnect;\r\n end;\r\nend;\r\n\r\nprocedure TCustomClientDataSet.DoAfterPost;\r\nbegin\r\n inherited;\r\n DoPostResolve(true);\r\nend;\r\n\r\nprocedure TCustomClientDataSet.Refresh;\r\nbegin\r\n if Assigned(Connection) then\r\n Connection.DoConnect;\r\nend;\r\n\r\nprocedure TCustomClientDataSet.SetActive(Value: Boolean);\r\nbegin\r\n if (csLoading in ComponentState) then\r\n Exit;\r\n\r\n// if (Fields.Count = 0) and (Assigned(FieldDefs) and (Fielddefs.Count = 0)) then\r\n// Exit;\r\n\r\n inherited;\r\nend;\r\n\r\nprocedure TCustomClientDataSet.SetConnection(const Value: TClientConnection);\r\nbegin\r\n FConnection := Value;\r\n if Assigned(Value) then\r\n Value.RegisterDataSet(Self);\r\nend;\r\n\r\nprocedure TCustomClientDataSet.SetIndexName(const Value: string);\r\nbegin\r\n ActiveIndex := Value;\r\nend;\r\n\r\nprocedure TCustomClientDataSet.SetParams(const Value: TParams);\r\nbegin\r\n FParams.Assign(Value);\r\nend;\r\n\r\nfunction TCustomClientDataSet.StringToFieldType(S: String): TFieldType;\r\nbegin\r\n if (s = 'int') then\r\n Result := ftInteger\r\n else if (s = 'bigint') then\r\n Result := ftLargeInt\r\n else if (s = 'float') then\r\n Result := ftFloat\r\n else if (s = 'bool') then\r\n Result := ftBoolean\r\n else if (s = 'date') then\r\n Result := ftDate\r\n else if (s = 'datetime') then\r\n Result := ftDateTime\r\n else if (s = 'time') then\r\n Result := ftTime\r\n else if (s = 'blob') then\r\n Result := ftBlob\r\n else if (s = 'string') then\r\n Result := ftString\r\n else\r\n Result := ftString\r\nend;\r\n\r\nprocedure TCustomClientDataSet.MetaDataToFieldDefs;\r\nvar\r\n A: TJSArray;\r\n F: TJSObject;\r\n I,FS: Integer;\r\n N: string;\r\n ft: TFieldType;\r\n D: JSValue;\r\n\r\nbegin\r\n FieldDefs.Clear;\r\n\r\n // Allow user to do it.\r\n Connection.ProcessMetaData(Self,FieldDefs,MetaData);\r\n\r\n if FieldDefs.Count > 0 then\r\n Exit;\r\n\r\n D := Metadata.Properties['fields'];\r\n\r\n if not IsArray(D) then\r\n raise EJSONDataset.Create('Invalid metadata object');\r\n\r\n A := TJSArray(D);\r\n for I := 0 to A.Length - 1 do\r\n begin\r\n if not isObject(A[i]) then\r\n raise EJSONDataset.CreateFmt('Field definition %d in metadata is not an object',[i]);\r\n\r\n F := TJSObject(A[i]);\r\n D := F.Properties['name'];\r\n if not isString(D) then\r\n raise EJSONDataset.CreateFmt('Field definition %d in has no or invalid name property',[i]);\r\n\r\n N := String(D);\r\n D := F.Properties['type'];\r\n\r\n if IsNull(D) or isUndefined(D) then\r\n ft := ftstring\r\n else\r\n if not isString(D) then\r\n begin\r\n raise EJSONDataset.CreateFmt('Field definition %d in has invalid type property',[i])\r\n end\r\n else\r\n begin\r\n ft := StringToFieldType(String(D));\r\n end;\r\n\r\n if (ft = ftString) then\r\n fs := GetStringFieldLength(F,N,I)\r\n else\r\n fs := 0;\r\n FieldDefs.Add(N,ft,fs);\r\n end;\r\nend;\r\n\r\nprocedure TCustomClientDataSet.GetChildren(Proc: TGetChildProc;\r\n Root: TComponent);\r\nvar\r\n i:integer;\r\nbegin\r\n for i := 0 to Fields.Count - 1 do\r\n begin\r\n if (Fields[i].Owner = Root) or (Fields[i].DataSet = Root) or (Root = nil) then\r\n begin\r\n if Fields[i].Name = '' then\r\n Fields[i].Name := Name + Fields[i].FieldName;\r\n\r\n Proc(Fields[i]);\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TCustomClientDataSet.GetIndexDefs: TJSONIndexDefs;\r\nbegin\r\n Result := Indexes;\r\nend;\r\n\r\nfunction TCustomClientDataSet.GetIndexName: string;\r\nbegin\r\n Result := ActiveIndex;\r\nend;\r\n\r\nfunction TCustomClientDataSet.GetStringFieldLength(F: TJSObject; AName: String; AIndex: Integer): integer;\r\nvar\r\n I,L: Integer;\r\n D: JSValue;\r\n\r\nbegin\r\n Result := 0;\r\n D := F.Properties['maxLen'];\r\n if not jsIsNan(toNumber(D)) then\r\n begin\r\n Result := Trunc(toNumber(D));\r\n if (Result <= 0) then\r\n DatabaseErrorFmt('Invalid maximum length specifier for field %s',[AName],Self)\r\n end\r\n else\r\n begin\r\n for I := 0 to Rows.Length - 1 do\r\n begin\r\n D := FieldMapper.GetJSONDataForField(Aname,AIndex,Rows[i]);\r\n if isString(D) then\r\n begin\r\n l := Length(String(D));\r\n if L > Result then\r\n Result := L;\r\n end;\r\n end;\r\n end;\r\n\r\n if (Result = 0) then\r\n Result := 20;\r\nend;\r\n\r\n\r\n{ TClientConnection }\r\n\r\nprocedure TClientConnection.SetActive(const Value: boolean);\r\nbegin\r\n if (FActive <> Value) then\r\n begin\r\n FActive := Value;\r\n\r\n if FUpdateCount > 0 then\r\n Exit;\r\n\r\n if (csLoading in ComponentState) then\r\n Exit;\r\n\r\n if Value then\r\n begin\r\n if (FURI <> '') then\r\n DoConnect;\r\n end\r\n else\r\n DoDisconnect;\r\n end;\r\nend;\r\n\r\nprocedure TClientConnection.SetDataNode(const Value: string);\r\nbegin\r\n if (FDataNode <> Value) and (FUpdateCount = 0) then\r\n Active := false;\r\n\r\n FDataNode := Value;\r\nend;\r\n\r\nprocedure TClientConnection.DoConnect;\r\nbegin\r\n if Assigned(FDS) then\r\n begin\r\n DoBeforeConnect;\r\n if FAutoOpen then\r\n begin\r\n FDS.Active := false;\r\n FDS.AfterLoad := DoAfterLoad;\r\n FDS.Load([], nil);\r\n end\r\n else\r\n begin\r\n DoRequest;\r\n end;\r\n end\r\n else\r\n DoRequest;\r\nend;\r\n\r\nprocedure TClientConnection.DoOpenResolve(AResult: boolean);\r\nbegin\r\n if Assigned(FOpenResolver) then\r\n FOpenResolver(AResult);\r\nend;\r\n\r\nprocedure TClientConnection.DoAfterLoad(Dataset: TDataSet);\r\nbegin\r\n DoOpenResolve(True);\r\nend;\r\n\r\nprocedure TClientConnection.DoRequest;\r\nvar\r\n cmd: string;\r\nbegin\r\n FXHR := TJSXMLHttpRequest.New;\r\n FXHR.AddEventListener('load', @onLoad);\r\n FXHR.AddEventListener('abort', @onAbort);\r\n FXHR.AddEventListener('error', @onError);\r\n\r\n cmd := HTTPCommand(FCommand, FCustomCommand);\r\n\r\n FXHR.open(cmd,URI);\r\n SetupRequest(FXHR);\r\n FXHR.setRequestHeader('content-type','application/json');\r\n\r\n if PostData <> '' then\r\n FXHR.send(PostData)\r\n else\r\n FXHR.send();\r\nend;\r\n\r\nprocedure TClientConnection.DoDataReceived(ARequest: TJSXMLHttpRequest;\r\n var AResponse: string);\r\nvar\r\n LRequestRec: TJSXMLHttpRequestRecord;\r\nbegin\r\n if Assigned(OnDataReceived) then\r\n begin\r\n LRequestRec.req := ARequest;\r\n OnDataReceived(Self, LRequestRec, AResponse);\r\n end;\r\nend;\r\n\r\nprocedure TClientConnection.DoDisconnect;\r\nbegin\r\n if Assigned(FDS) then\r\n begin\r\n if FAutoOpen then\r\n FDS.Active := false;\r\n end;\r\nend;\r\n\r\nprocedure TClientConnection.SetHeaders(const Value: TStringList);\r\nbegin\r\n FHeaders.Assign(Value);\r\nend;\r\n\r\nprocedure TClientConnection.RegisterDataSet(const Value: TCustomClientDataSet);\r\nbegin\r\n FDS := Value;\r\nend;\r\n\r\nprocedure TClientConnection.AfterLoadDFMValues;\r\nbegin\r\n inherited;\r\n\r\n if FActive and (URI <> '') then\r\n DoConnect;\r\nend;\r\n\r\nprocedure TClientConnection.BeginUpdate;\r\nbegin\r\n inherited;\r\n inc(FUpdateCount);\r\nend;\r\n\r\nprocedure TClientConnection.Close;\r\nbegin\r\n SetActive(False);\r\nend;\r\n\r\nconstructor TClientConnection.Create(AOwner: TComponent);\r\nbegin\r\n inherited;\r\n FActive := false;\r\n FDS := nil;\r\n FAutoOpen := true;\r\n FCommand := httpGET;\r\n FHeaders := TStringList.Create;\r\n FDelimiter := ';';\r\n FSkipFirstCSVLine := false;\r\n AppendKeyToURL := True;\r\nend;\r\n\r\ndestructor TClientConnection.Destroy;\r\nbegin\r\n FHeaders.Free;\r\n inherited;\r\nend;\r\n\r\nprocedure TClientConnection.DoAfterConnect;\r\nbegin\r\n if Assigned(AfterConnect) then\r\n AfterConnect(Self);\r\nend;\r\n\r\nprocedure TClientConnection.DoBeforeConnect;\r\nbegin\r\n if Assigned(BeforeConnect) then\r\n BeforeConnect(Self);\r\nend;\r\n\r\nprocedure TClientConnection.DoError(ErrorCode: integer);\r\nbegin\r\n if Assigned(OnConnectError) then\r\n OnConnectError(Self, ErrorCode);\r\n\r\n DoOpenResolve(False);\r\n\r\n raise Exception.Create('Error connecting to URI ' + FURI);\r\nend;\r\n\r\nprocedure TClientConnection.EndUpdate;\r\nbegin\r\n inherited;\r\n if (FUpdateCount > 0) then\r\n dec(FUpdateCount);\r\nend;\r\n\r\n{ TWebClientUpdateRequest }\r\n\r\nfunction TWebClientUpdateRequest.onAbort(Event: TEventListenerEvent): boolean;\r\nbegin\r\n if Assigned(Connection) then\r\n Connection.DoError(FXHR.Status);\r\n\r\n ResolveFailed(FXHR.StatusText);\r\n Result := False;\r\nend;\r\n\r\nfunction TWebClientUpdateRequest.onError(Event: TEventListenerEvent): boolean;\r\nbegin\r\n if Assigned(Connection) then\r\n Connection.DoError(FXHR.Status);\r\n ResolveFailed(FXHR.StatusText);\r\n Result := False;\r\nend;\r\n\r\nfunction TWebClientUpdateRequest.onLoad(Event: TEventListenerEvent): boolean;\r\nbegin\r\n if (FXHR.Status div 100) = 2 then\r\n begin\r\n Resolve(TransFormResult);\r\n Result := True;\r\n end\r\n else\r\n ResolveFailed(FXHR.StatusText);\r\n\r\n (Proxy as TWebClientDataProxy).CheckBatchComplete(FBatch);\r\nend;\r\n\r\nfunction TWebClientUpdateRequest.TransformResult: JSValue;\r\nbegin\r\n Result := FXHR.response;\r\n if Assigned(Connection) and Assigned(Connection.OnGetDataPayload) then\r\n FConnection.OnGetDataPayload(FConnection,Dataset,TClientConnection.StatusToURLtype(Self.Status),Result);\r\nend;\r\n\r\n{ TWebClientDataRequest }\r\n\r\nfunction TWebClientDataRequest.TransformResult: JSValue;\r\nvar\r\n s: string;\r\nbegin\r\n Result := FXHR.response;\r\n\r\n if Assigned(Connection) and Assigned(Connection.OnDataReceived) then\r\n begin\r\n asm\r\n s = this.FXHR.responseText;\r\n end;\r\n FConnection.DoDataReceived(FXHR, s);\r\n end;\r\n\r\n if Assigned(Connection) and Assigned(Connection.OnGetDataPayload) then\r\n begin\r\n FConnection.OnGetDataPayload(FConnection,Dataset, utGet, Result);\r\n end;\r\nend;\r\n\r\nfunction TWebClientDataRequest.onAbort(Event: TEventListenerEvent): boolean;\r\nbegin\r\n Success := rrFail;\r\n\r\n if Assigned(Connection) then\r\n Connection.DoError(FXHR.Status);\r\n\r\n DoAfterRequest;\r\n Result := True;\r\nend;\r\n\r\nfunction TWebClientDataRequest.onError(Event: TEventListenerEvent): boolean;\r\nbegin\r\n Success := rrFail;\r\n\r\n if Assigned(Connection) then\r\n Connection.DoError(FXHR.Status);\r\n\r\n DoAfterRequest;\r\n Result := True;\r\nend;\r\n\r\nfunction TWebClientDataRequest.onLoad(Event: TEventListenerEvent): boolean;\r\nbegin\r\n if (FXHR.Status = 200) then\r\n begin\r\n Data := TransformResult;\r\n Success := rrOK;\r\n end\r\n else\r\n begin\r\n Data := nil;\r\n if (loAtEOF in LoadOptions) and (FXHR.Status = 404) then\r\n Success := rrEOF\r\n else\r\n begin\r\n Success := rrFail;\r\n ErrorMsg := FXHR.StatusText;\r\n end;\r\n\r\n if Assigned(Connection) then\r\n Connection.DoError(FXHR.Status);\r\n end;\r\n\r\n DoAfterRequest;\r\n Result := True;\r\nend;\r\n\r\n{ TRESTConnection }\r\n\r\nfunction TClientConnection.GetDataNode: String;\r\nbegin\r\n Result := fDataNode;\r\n if Result = '' then\r\n Result := 'data';\r\nend;\r\n\r\nfunction TClientConnection.GetDataProxy: TDataProxy;\r\nbegin\r\n if (FDataProxy=Nil) then\r\n FDataProxy := DoGetDataProxy;\r\n Result := FDataProxy;\r\nend;\r\n\r\n\r\nfunction TClientConnection.GetMetaDataNode: String;\r\nbegin\r\n Result := fMetaDataNode;\r\n if Result = '' then\r\n Result := 'metaData';\r\nend;\r\n\r\nprocedure TClientConnection.SetupRequest(aXHR: TJSXMLHttpRequest);\r\nvar\r\n I : Integer;\r\n headname, headvalue : string;\r\n\r\nbegin\r\n // always set this, security measure, enforcing use of CORS\r\n if User <> '' then\r\n aXHR.setRequestHeader('X-Requested-With', 'XMLHttpRequest');\r\n\r\n for i := 0 to FHeaders.Count - 1 do\r\n begin\r\n FHeaders.GetNameValue(i, headname, headvalue);\r\n aXHR.setRequestHeader(headname, headvalue);\r\n end;\r\n\r\n // We set the Authorization header here, not in XHR.open.\r\n // This way we can switch to other forms of authentication (OAuth2).\r\n if (User<>'') then\r\n aXHR.setRequestHeader('Authorization', 'Basic '+window.btoa(User+':'+Password));\r\nend;\r\n\r\nprocedure TClientConnection.SetURI(const Value: string);\r\nbegin\r\n if (FURI <> Value) and (FUpdateCount = 0) then\r\n Active := false;\r\n\r\n FURI := Value;\r\nend;\r\n\r\nclass function TClientConnection.StatusToURLType(aStatus : TUpdateStatus): TURLType;\r\nbegin\r\n case aStatus of\r\n usModified : Result := utPut;\r\n usDeleted : Result := utDelete;\r\n usInserted : Result := utPost;\r\n else\r\n Result := utGet;\r\n end;\r\nend;\r\n\r\nfunction TClientConnection.GetReadBaseURL(aRequest: TDataRequest): String;\r\nbegin\r\n Result := URI;\r\n if Assigned(FOnGetURL) then\r\n FOnGetURL(Self, aRequest.Dataset,utGet,Result);\r\nend;\r\n\r\nfunction TClientConnection.GetPageURL(aRequest: TDataRequest): String;\r\nvar\r\n URL : String;\r\n\r\nbegin\r\n URL := GetReadBaseURL(aRequest);\r\n if (PageParam <> '') then\r\n begin\r\n if Pos('?',URL)<>0 then\r\n URL := URL + '&'\r\n else\r\n URL := URL + '?';\r\n URL := URL + PageParam + '=' + IntToStr(ARequest.RequestID-1);\r\n end;\r\n Result := URL;\r\nend;\r\n\r\nfunction TClientConnection.GetUpdateBaseURL(aRequest: TRecordUpdateDescriptor): String;\r\nbegin\r\n Result := URI;\r\n if Assigned(FOnGetURL) then\r\n FOnGetURL(Self,aRequest.Dataset,StatusToURLType(aRequest.Status),Result);\r\nend;\r\n\r\nfunction TClientConnection.GetUpdatePayLoad(aURLType: TURLType; aDataset: TDataset; AData: JSValue): String;\r\nbegin\r\n if Assigned(FOnGetUpdatePayLoad) then\r\n FOnGetUpdatePayLoad(Self,aDataset,aUrlType,aData,Result)\r\n else\r\n begin\r\n if aURLType in [utPost,utPut] then\r\n Result := TJSJSON.Stringify(aData)\r\n else\r\n Result := '';\r\n end;\r\nend;\r\n\r\nfunction TClientConnection.onAbort(Event: TEventListenerEvent): boolean;\r\nbegin\r\n if Assigned(OnConnectError) then\r\n begin\r\n OnConnectError(Self, FXHR.Status);\r\n end;\r\n Result := true;\r\nend;\r\n\r\nfunction TClientConnection.onError(Event: TEventListenerEvent): boolean;\r\nbegin\r\n if Assigned(OnConnectError) then\r\n begin\r\n OnConnectError(Self, FXHR.Status);\r\n end;\r\n Result := true;\r\nend;\r\n\r\nfunction TClientConnection.onLoad(Event: TEventListenerEvent): boolean;\r\nvar\r\n rec: TJSXMLHttpRequestRecord;\r\n s: string;\r\nbegin\r\n if Assigned(OnDataReceived) then\r\n begin\r\n rec.req := FXHR;\r\n s := FXHR.responseText;\r\n OnDataReceived(Self, rec, s);\r\n end;\r\n Result := true;\r\nend;\r\n\r\nfunction TClientConnection.Open: TJSPromise;\r\nbegin\r\n Result := TJSPromise.new(\r\n procedure(ASuccess, AFailed: TJSPromiseResolver)\r\n begin\r\n FOpenResolver := ASuccess;\r\n\r\n if (FUpdateCount > 0) or (csLoading in ComponentState) then\r\n ASuccess(false)\r\n else\r\n SetActive(true);\r\n end\r\n )\r\nend;\r\n\r\nprocedure TClientConnection.ProcessMetadata(Dataset: TDataset; FieldDefs: TFieldDefs; aMetaData: TJSObject);\r\nbegin\r\n if Assigned(OnProcessMetaData) then\r\n OnProcessMetaData(Self,Dataset,FieldDefs,aMetaData);\r\nend;\r\n\r\nfunction TClientConnection.GetRecordUpdateURL(aRequest: TRecordUpdateDescriptor): String;\r\nvar\r\n I: integer;\r\n Base,KeyField,KeyValue,Qry: string;\r\n\r\nbegin\r\n KeyField := '';\r\n Result := '';\r\n Base := GetUpdateBaseURL(aRequest);\r\n\r\n if not (AppendKeyToURL and (aRequest.Status in [usModified,usDeleted])) then\r\n Exit(Base);\r\n\r\n I := Pos('?',Base);\r\n if I > 0 then\r\n begin\r\n Qry := Copy(Base,I,Length(Base)-I+1);\r\n Base := Copy(Base,1,I-1);\r\n end;\r\n\r\n // For update & delete we need to append the key field value.\r\n // Key field is IDField. If that is empty, we look for a field with providerFlags that contains pfKey\r\n KeyField := (aRequest.Dataset as TClientDataset).IDField;\r\n I := aRequest.Dataset.Fields.Count - 1;\r\n\r\n while (KeyField = '') and (I >= 0) do\r\n begin\r\n if pfInKey in aRequest.Dataset.Fields[i].ProviderFlags then\r\n KeyField:=aRequest.Dataset.Fields[i].FieldName;\r\n Dec(I);\r\n end;\r\n\r\n if (KeyField = '') then\r\n DatabaseError('No key field',aRequest.Dataset);\r\n\r\n KeyValue := TJSJSON.stringify(TJSObject(aRequest.Data)[KeyField]);\r\n if (Base<>'') and (Base[Length(Base)]<>'/') then\r\n Base := Base + '/';\r\n\r\n Result := Base + KeyValue + Qry;\r\nend;\r\n\r\nfunction TClientConnection.DoGetDataProxy: TDataProxy;\r\nbegin\r\n Result := TWebClientDataProxy.Create(Self);\r\nend;\r\n\r\n{ TRESTDataProxy }\r\n\r\nprocedure TWebClientDataProxy.CheckBatchComplete(aBatch: TRecordUpdateBatch);\r\nvar\r\n BatchOK : Boolean;\r\n I : Integer;\r\n\r\nbegin\r\n BatchOK := True;\r\n I := aBatch.List.Count - 1;\r\n while BatchOK and (I >= 0) do\r\n begin\r\n BatchOK := aBatch.List[I].ResolveStatus in [rsResolved, rsResolveFailed];\r\n Dec(I);\r\n end;\r\n\r\n if BatchOK and Assigned(aBatch.OnResolve) then\r\n begin\r\n aBatch.OnResolve(Self, aBatch);\r\n end;\r\nend;\r\n\r\nfunction TWebClientDataProxy.GetUpdateDescriptorClass: TRecordUpdateDescriptorClass;\r\nbegin\r\n Result := TWebClientUpdateRequest;\r\nend;\r\n\r\nfunction TWebClientDataProxy.ProcessUpdateBatch(aBatch: TRecordUpdateBatch): Boolean;\r\n\r\nVar\r\n R : TWebClientUpdateRequest;\r\n i : Integer;\r\n Method,URl : String;\r\n S : String;\r\n\r\nbegin\r\n Result := false;\r\n for I := 0 to aBatch.List.Count - 1 do\r\n begin\r\n R := aBatch.List[i] as TWebClientUpdateRequest;\r\n R.FConnection := Self.FConnection;\r\n R.FBatch := aBatch;\r\n R.FXHR := TJSXMLHttpRequest.New;\r\n R.FXHR.AddEventListener('load',@R.onLoad);\r\n R.FXHR.AddEventListener('abort',@R.onAbort);\r\n R.FXHR.AddEventListener('error',@R.onError);\r\n URL := FConnection.GetRecordUpdateURL(R);\r\n\r\n case R.Status of\r\n usInserted: Method := 'POST';\r\n usModified: Method := 'PUT';\r\n usDeleted: Method := 'DELETE';\r\n end;\r\n R.FXHR.open(Method,URL);\r\n Connection.SetupRequest(R.FXHR);\r\n R.FXHR.setRequestHeader('content-type','application/json');\r\n S := Connection.GetUpdatePayload(TClientConnection.StatusToURLType(R.Status),R.Dataset,R.Data);\r\n\r\n if R.Status in [usInserted,usModified] then\r\n R.FXHR.Send(S)\r\n else\r\n R.FXHR.Send(S);\r\n end;\r\n Result:=True;\r\nend;\r\n\r\nfunction TWebClientDataProxy.DoGetData(aRequest: TDataRequest): Boolean;\r\nvar\r\n R: TWebClientDataRequest;\r\n URL,cmd: String;\r\n\r\nbegin\r\n Result := False;\r\n R := aRequest as TWebClientDataRequest;\r\n R.FXHR := TJSXMLHttpRequest.New;\r\n URL := Connection.GetPageURL(aRequest);\r\n\r\n if (URL = '') then\r\n begin\r\n if loAtEOF in R.LoadOptions then\r\n R.Success := rrEOF\r\n else\r\n begin\r\n R.Success := rrFail;\r\n R.ErrorMsg := 'No URL to get data';\r\n R.DoAfterRequest; // This will free request !\r\n end;\r\n end\r\n else\r\n begin\r\n if (loAtEOF in R.LoadOptions) and (Connection.PageParam='') then\r\n R.Success := rrEOF\r\n else\r\n begin\r\n // We're setting the credentials header ourselves.\r\n // Firefox does not like it when you set it in open() and manually add the header.\r\n // In general, the API should be switched to fetch()\r\n\r\n cmd := HTTPCommand(Connection.Command, Connection.CustomCommand);\r\n\r\n R.FXHR.open(cmd, URL, true);\r\n Connection.SetupRequest(R.FXHR);\r\n\r\n// window.onError:=function(e : TJSErrorEvent) : boolean begin console.log(e) end;\r\n R.FXHR.AddEventListener('load',@R.onLoad);\r\n R.FXHR.AddEventListener('abort',@R.onAbort);\r\n R.FXHR.AddEventListener('error',@R.onError);\r\n // https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS/Errors/CORSNotSupportingCredentials\r\n// R.FXHR.withCredentials:=true;\r\n\r\n if Connection.PostData <> '' then\r\n R.FXHR.send(Connection.PostData)\r\n else\r\n R.FXHR.send;\r\n end;\r\n Result := True;\r\n end;\r\nend;\r\n\r\nfunction TWebClientDataProxy.GetDataRequest(aOptions: TLoadOptions; aAfterRequest: TDataRequestEvent; aAfterLoad: TDatasetLoadEvent): TDataRequest;\r\nbegin\r\n Result := TWebClientDataRequest.Create(Self,aOptions, aAfterRequest,aAfterLoad);\r\n TWebClientDataRequest(Result).FConnection:=Self.FConnection;\r\nend;\r\n\r\nconstructor TWebClientDataProxy.Create(AOwner: TComponent);\r\nbegin\r\n Inherited;\r\n\r\n If AOwner is TClientConnection then\r\n FConnection := TClientConnection(aOwner);\r\nend;\r\n\r\n\r\nend.","{********************************************************************}\r\n{ }\r\n{ written by TMS Software }\r\n{ copyright (c) 2016 - 2025 }\r\n{ Email : info@tmssoftware.com }\r\n{ Web : http://www.tmssoftware.com }\r\n{ }\r\n{ The source code is given as is. The author is not responsible }\r\n{ for any possible damage done due to the use of this code. }\r\n{ The complete source code remains property of the author and may }\r\n{ not be distributed, published, given or sold in any form as such. }\r\n{ No parts of the source code can be included in any other component }\r\n{ or application without written authorization of the author. }\r\n{********************************************************************}\r\n\r\nunit WEBLib.TMSFNCUtils;\r\n\r\n{$I WEBLib.TMSFNCDefines.inc}\r\n\r\n{$HPPEMIT ''}\r\n{$HPPEMIT '#pragma comment(lib, \"wininet\")'}\r\n{$IFDEF WIN32}\r\n{$HPPEMIT '#pragma comment(lib, \"urlmon\")'}\r\n{$ENDIF}\r\n{$HPPEMIT ''}\r\n\r\n{$IFDEF WEBLIB}\r\n{$DEFINE LCLWEBLIB}\r\n{$ENDIF}\r\n\r\n{$IFDEF LCLLIB}\r\n{$DEFINE LCLWEBLIB}\r\n{$ENDIF}\r\n\r\n{$IFDEF FNCLIB}\r\n{$DEFINE JSONSUPPORT}\r\n{$ELSE}\r\n{$IFDEF WEBLIB}\r\n{$DEFINE JSONSUPPORT}\r\n{$ELSE}\r\n{$HINTS OFF}\r\n{$IF COMPILERVERSION > 27}\r\n{$DEFINE JSONSUPPORT}\r\n{$IFEND}\r\n{$HINTS ON}\r\n{$ENDIF}\r\n{$ENDIF}\r\n\r\n{$IFDEF VCLLIB}\r\n{$HINTS OFF}\r\n{$IF COMPILERVERSION >= 23}\r\n{$DEFINE VCLSTYLESENABLED}\r\n{$IFEND}\r\n{$HINTS ON}\r\n{$ENDIF}\r\n\r\ninterface\r\n\r\nuses\r\n {$IFDEF MSWINDOWS}\r\n Windows,\r\n {$ENDIF}\r\n Classes, SysUtils, Types, WEBLib.Graphics, WEBLib.TMSFNCTypes, WEBLib.Controls, WEBLib.Forms\r\n {$IFNDEF LCLWEBLIB}\r\n {$IFDEF FNCLIB}\r\n {$HINTS OFF}\r\n {$IF COMPILERVERSION >= 30}\r\n ,FMX.ImgList\r\n {$IFEND}\r\n {$HINTS ON}\r\n {$ENDIF}\r\n {$ENDIF}\r\n {$IFDEF FMXLIB}\r\n ,FMX.Types, WEBLib.Dialogs\r\n {$IFDEF LINUX}\r\n {$IF COMPILERVERSION > 35}\r\n ,Curl\r\n {$ELSE}\r\n ,Linuxapi.Curl\r\n {$IFEND}\r\n {$HINTS ON}\r\n ,Posix.SysTypes\r\n {$ENDIF}\r\n {$IFDEF ANDROID}\r\n ,AndroidApi.JNI.App\r\n {$ENDIF}\r\n {$IFDEF MACOS}\r\n ,MacApi.ObjectiveC, MacApi.ObjcRuntime\r\n {$IFDEF IOS}\r\n ,iOSApi.Foundation\r\n {$ELSE}\r\n ,MacApi.Foundation\r\n {$ENDIF}\r\n {$ENDIF}\r\n {$ENDIF}\r\n {$IFNDEF LCLLIB}\r\n {$IFNDEF WEBLIB}\r\n ,Rtti, Generics.Collections\r\n {$ENDIF}\r\n {$IFNDEF WEBLIB}\r\n {$HINTS OFF}\r\n {$IF COMPILERVERSION > 22}\r\n ,UITypes\r\n {$IFEND}\r\n {$HINTS ON}\r\n {$ENDIF}\r\n {$ENDIF}\r\n {$IFDEF VCLLIB}\r\n ,JPEG, PngImage, GifImg\r\n {$IFDEF VCLSTYLESENABLED}\r\n ,VCL.Themes\r\n {$ENDIF}\r\n {$ENDIF}\r\n {$IFDEF CMNLIB}\r\n ,Dialogs\r\n {$ENDIF}\r\n {$IFDEF WEBLIB}\r\n ,JS, WEBLib.Dialogs, WEBLib.JSON, web\r\n {$ENDIF}\r\n {$IFDEF JSONSUPPORT}\r\n {$IFNDEF WEBLIB}\r\n {$IFNDEF LCLLIB}\r\n {$HINTS OFF}\r\n {$IF COMPILERVERSION > 26}\r\n ,JSON\r\n {$ELSE}\r\n ,DBXJSON\r\n {$IFEND}\r\n {$HINTS ON}\r\n {$ELSE}\r\n ,fpjson, jsparser\r\n {$ENDIF}\r\n {$ENDIF}\r\n {$ENDIF}\r\n ;\r\n\r\nconst\r\n PthDel = {$IFDEF MSWINDOWS} '\\'; {$ELSE} '/'; {$ENDIF}\r\n{$IFNDEF LCLLIB}\r\n FPC_FULLVERSION = 0;\r\n{$ENDIF}\r\n\r\ntype\r\n TTMSFNCUtilsCharSet = array of char;\r\n\r\n {$IFDEF FNCLIB}\r\n {$IFDEF WEBLIB}\r\n TTMSFNCUtilsFile = record\r\n Data: TJSUint8Array;\r\n Name: string;\r\n end;\r\n TTMSFNCUtilsLoadFile = TJSBlob;\r\n {$ELSE}\r\n TTMSFNCUtilsFile = string;\r\n TTMSFNCUtilsLoadFile = string;\r\n {$ENDIF}\r\n\r\n TTMSFNCUtilsLoadFileCompleteEvent = {$IFNDEF LCLWEBLIB}reference to {$ENDIF}procedure(const AFile: TTMSFNCUtilsFile){$IFDEF LCLWEBLIB} of object{$ENDIF};\r\n {$ENDIF}\r\n\r\n {$IFNDEF FNCLIB}\r\n TTMSFNCUtilsFile = string;\r\n {$ENDIF}\r\n\r\n TTMSFNCUtilsFileCallBackEvent = {$IFNDEF LCLWEBLIB}reference to {$ENDIF}procedure(const AFile: string; const AResult: Boolean){$IFDEF LCLWEBLIB} of object{$ENDIF};\r\n\r\n TTMSFNCUtils = class\r\n private\r\n {$IFDEF FMXLIB}\r\n {$IFDEF LINUX}\r\n class var FDownloadStream: TMemoryStream;\r\n class function CurlReadData(buffer: Pointer; size: size_t; nitems: size_t; instream: Pointer): size_t; cdecl; static;\r\n {$ENDIF}\r\n {$ENDIF}\r\n {$IFDEF FNCLIB}\r\n class procedure GetTimeZoneInfo(ADateTime: TDateTime; var ABias: Integer; var ABiasDay: Integer; var AIsDaylight: Boolean);\r\n {$ENDIF}\r\n public\r\n {$HINTS OFF}\r\n {$WARNINGS OFF}\r\n {$IFDEF LCLLIB}\r\n {$IF FPC_FULLVERSION = 30200}\r\n generic class function IfElse(ACondition: Boolean; AResultTRUE, AResultFALSE: T): T;\r\n {$IFEND}\r\n {$ENDIF}\r\n {$HINTS ON}\r\n {$WARNINGS ON}\r\n\r\n {$IFNDEF LCLLIB}\r\n class function IfElse(ACondition: Boolean; AResultTRUE, AResultFALSE: T): T;\r\n {$ENDIF}\r\n class procedure OpenURL(AURL: string);\r\n class procedure OpenFile(AFile: string; {%H-}AControlReference: TControl = nil);\r\n class procedure GetFonts(FontList: TStringList);\r\n class procedure SetFontSize(AFont: TFont; ASize: Single; AScaleFactor: Single = 1);\r\n class procedure ScaleForCurrentDPI(AForm: TCustomForm);\r\n class procedure ScaleForDPI(AControl: TControl; ADPI: Integer);\r\n class function GetHInstance: NativeUInt;\r\n class function IsHTMLUnicode(AValue: UnicodeString): Boolean;\r\n class function IsHTML(AValue: string): Boolean;\r\n class function GetDocumentsPath: string;\r\n class function GetAppPath: string;\r\n class function GetTempPath: string;\r\n class function GetMousePos: TPointF;\r\n class function IsHighDPIScale({%H-}AOwner: TComponent = nil; ADefaultDPI: Integer = -1): Boolean;\r\n class function GetDPIScale({%H-}AOwner: TComponent = nil; ADefaultDPI: Integer = -1): Single;\r\n class function AddBackslash(const AValue: string): string;\r\n class function AddForwardslash(const AValue: string): string;\r\n class function GetResourceStream(AResourceName: string): TResourceStream; overload;\r\n class function GetResourceStream(AResourceName: string; AInstance: NativeUInt): TResourceStream; overload;\r\n class function Clone(AComponent: TComponent): TComponent;\r\n class function HTMLStrip(AHTML: string): string;\r\n class function VarPos(ASubValue, AValue: string; var AResult: Integer): Integer;\r\n class function VarPosNoCase(ASubValue, AValue: string; var AResult: Integer): Integer;\r\n class function CharInStr(s: string; Index: Integer): Char;\r\n class function HexStrToBytes(const AValue: string): TBytes;\r\n class function URLDecode(const AURL: string; const ATrim: Boolean = True): string;\r\n class function URLEncode(const AURL: string): string;\r\n class function EnDeCrypt(const AValue: String): String;\r\n class function SaveBitmapToHexStr(const ABitmap: TTMSFNCBitmapHelperClass): string;\r\n class function SaveStreamToHexStr(const AStream: TStream): string;\r\n class function SaveBitmapToBase64(const ABitmap: TTMSFNCBitmapHelperClass; const AURL: Boolean = False): string;\r\n class function SaveStreamToBase64(const AStream: TStream; const AURL: Boolean = False): string;\r\n class function CreateBitmapFromHexStr(const AHexStr: string): TTMSFNCBitmap;\r\n class function CreateBitmapFromBase64(const ABase64: string; const AURL: Boolean = False): TTMSFNCBitmap;\r\n class function MulDivInt(nNumber, nNumerator, nDenominator: Integer): Integer; overload;\r\n class function MulDivSingle(nNumber, nNumerator, nDenominator: Single): Single; overload;\r\n class function FormatBytesAsString(ASize: Extended): String;\r\n class function GetImageType(AData: TStream; AResetPosition: Boolean = True): string; overload;\r\n {$IFNDEF WEBLIB}\r\n class function GetImageType(ABitmap: TTMSFNCBitmap; AResetPosition: Boolean = True): string; overload;\r\n {$IFDEF FNCLIB}\r\n {$IFNDEF LCLLIB}\r\n {$HINTS OFF}\r\n {$IF COMPILERVERSION >= 30}\r\n class procedure LoadBitmapFromImageList(ABitmap: TTMSFNCBitmap; AImageList: TCustomImageList; AIndex: Integer);\r\n {$IFEND}\r\n {$HINTS ON}\r\n {$ENDIF}\r\n {$ENDIF}\r\n {$ENDIF}\r\n class procedure LoadBitmapFromHexStr(const AHexStr: string; const ABitmap: TTMSFNCBitmapHelperClass);\r\n class procedure LoadStreamFromHexStr(const AHexStr: string; const AStream: TStream);\r\n class procedure LoadBitmapFromBase64(const ABase64: string; const ABitmap: TTMSFNCBitmapHelperClass; const AURL: Boolean = False);\r\n class procedure LoadStreamFromBase64(const ABase64: string; const AStream: TStream; const AURL: Boolean = False);\r\n {$IFDEF CMNLIB}\r\n class function ConvertBitmapToJPEGStream(ABitmap: TTMSFNCBitmapHelperClass; AQuality: Single = 1.0; ABackgroundColor: TColor = clWhite): TMemoryStream;\r\n class function FindGraphicClass(const Buffer; const {%H-}BufferSize: Int64; out GraphicClass: TGraphicClass): Boolean;\r\n {$ENDIF}\r\n {$IFDEF FMXLIB}\r\n class function ConvertBitmapToJPEGStream(ABitmap: TTMSFNCBitmapHelperClass; AQuality: Single = 1.0; ABackgroundColor: TAlphaColor = TAlphaColorRec.White): TMemoryStream;\r\n {$ENDIF}\r\n {$IFDEF WEBLIB}\r\n class function ConvertBitmapToJPEGStream(ABitmap: TTMSFNCBitmapHelperClass; AQuality: Single = 1.0; ABackgroundColor: TColor = clWhite): TMemoryStream;\r\n {$ENDIF}\r\n class procedure Split(const ADelimiter: Char; AInput: string; const AStrings: TStrings; const AClearEmptyStrings: Boolean = False);\r\n class procedure Log(const AMessage: string); overload;\r\n class function EpochToDateTime(const AEpoch: string): TDateTime;\r\n {$IFDEF FNCLIB}\r\n {$IFNDEF LCLLIB}\r\n class procedure SplitURL(AURL: string; var AHost: string; var APath: string; var AQuery: string; var APort: Integer);\r\n {$ENDIF}\r\n class procedure PlayAudio(AAudioBase64: string);\r\n class function DateTimeToISO(const ADateTime: TDateTime; AAddDelimiters: Boolean = False; AAddMilliSeconds: Boolean = False): string;\r\n class function DateToISO(const ADate: TDate; AAddDelimiters: Boolean = False): string;\r\n class function ISOToDateTime(const AISOString: string; AIsUTC: Boolean = False): TDateTime;\r\n class function ISOToDate(const AISOString: string): TDate;\r\n class function DateTimeToUTC(const ADateTime: TDateTime): string;\r\n class function DateTimeToMilliSeconds(const ADateTime: TDateTime): Int64;\r\n class function GetMimeType(AFile: string): string; overload;\r\n class function GetMimeType(AData: TStream; AResetPosition: Boolean = True): string; overload;\r\n class function GetFileExtension(AMime: string): string;\r\n class function FileToBase64(const AFile: TTMSFNCUtilsFile): string;\r\n class procedure LoadFile(const AFile: TTMSFNCUtilsLoadFile; const ALoadFileComplete: TTMSFNCUtilsLoadFileCompleteEvent);\r\n class function Decode64(const AValue: string; const AURL: Boolean = False): string; overload;\r\n class function Encode64(const AValue: string; const AURL: Boolean = False): string; overload;\r\n class function Encode64(const AValue: TBytes; const AURL: Boolean = False): string; overload; \r\n {$ENDIF}\r\n {$IFDEF JSONSUPPORT}\r\n class procedure Log(const AObject: TObject); overload;\r\n class function GetJSONProp(AJSONValue: TJSONValue; APropertyName: string): string;\r\n class function GetJSONValueAsBoolean(AJSONValue: TJSONValue): Boolean;\r\n class function GetJSONValueAsString(AJSONValue: TJSONValue): string;\r\n class function GetJSONValue(AJSONValue: TJSONValue; APropertyName: string): TJSONValue;\r\n class function FindJSONValue(AJSONValue: TJSONValue; APath: string): TJSONValue;\r\n class function GetJSONDoubleValue(AJSONValue: TJSONValue; APropertyName: string): Double;\r\n class function GetJSONValueAsDouble(AJSONValue: TJSONValue): Double;\r\n class function GetJSONIntegerValue(AJSONValue: TJSONValue; APropertyName: string): Integer;\r\n class function GetJSONValueAsInteger(AJSONValue: TJSONValue): Integer;\r\n class function IsJSONTrue(AJSONValue: TJSONValue): Boolean;\r\n class function IsJSONFalse(AJSONValue: TJSONValue): Boolean;\r\n class function GetJSONArraySize(AJSONArray: TJSONArray): Integer;\r\n class function GetJSONArrayItem(AJSONArray: TJSONArray; AIndex: Integer): TJSONValue;\r\n class function GetJSONObjectSize(AJSONObject: TJSONObject): Integer;\r\n class function GetJSONObjectItem(AJSONObject: TJSONObject; AIndex: Integer): TJSONValue;\r\n class function GetJSONObjectName(AJSONObject: TJSONObject; AIndex: Integer): string;\r\n class function ParseJSON(AJSON: string): TJSONValue;\r\n class function IsJSON(AJSON: string): Boolean;\r\n {$ENDIF}\r\n class function StrToFloatDot(AValue: string): Double;\r\n class function FloatToStrDot(AValue: Double): string;\r\n class function TryStrToFloatDot(AValue: string; var AResult: Double): Boolean;\r\n class function Decode64ToBytes(const AValue: string; const AURL: Boolean = False): TBytes; overload;\r\n class function MatchStrEx(AValue1, AValue2: string; ACaseSensitive: Boolean): Boolean; overload;\r\n class function MatchStrEx(AValue: string; AArray: array of string; ACaseSensitive: Boolean; AExpression: Boolean = True): Boolean; overload;\r\n class function MatchStr(AValue1, AValue2:string; ACaseSensitive: Boolean): Boolean;\r\n class function GetStrIdx(AValue: string; AArray: array of string; ACaseSensitive: Boolean; AExpression: Boolean = True): Integer;\r\n class function StripLogicSpaces(AValue: string): string;\r\n class function FirstChar(ACharset: TTMSFNCUtilsCharSet; AValue: string; var spos: Integer): char;\r\n class function CharInSet(ch: Char; ACharSet: TTMSFNCUtilsCharSet): boolean; overload;\r\n class function AddCharSet(ACharSet1, ACharSet2: TTMSFNCUtilsCharSet): TTMSFNCUtilsCharSet;\r\n class function SubCharSet(ACharSet1, ACharSet2: TTMSFNCUtilsCharSet): TTMSFNCUtilsCharSet;\r\n class function IsLetterOrDigit(AChar: Char): Boolean;\r\n class function AlphaCharSet: TTMSFNCUtilsCharSet;\r\n class function NumericCharSet: TTMSFNCUtilsCharSet;\r\n class function CreateCharSet(AValue: string): TTMSFNCUtilsCharSet;\r\n class function IsDate(AValue: string; var ADate: TDateTime): boolean;\r\n class function IPos(su,s:string):Integer;\r\n class function UnFixMarkup(su:string; SpecialChars: boolean = true; SpecialCharsOnly: Boolean = False): string;\r\n class function FixMarkup(su:string;SpecialChars: boolean = true): string;\r\n class function TagReplaceString(const Srch,Repl:string;var Dest:string):Boolean;\r\n class function Matches(s0a, s1a: PChar): Boolean; overload;\r\n {$IFNDEF WEBLIB}\r\n class function Matches(s0a, s1a: string): Boolean; overload;\r\n {$ENDIF}\r\n class function StripThousandSep(ps: string): String;\r\n class function ClosingParenthesis(s1: string): Integer;\r\n class function GetMarkupIndex(const Markup: string): integer;\r\n class function GetSpecialChar(const Value: integer): UnicodeString;\r\n class function IndexOfTextInArray(const AText: string; const AValues: array of string): Integer;\r\n {$IFDEF MACOS}\r\n class function NSStrEx(AString: String): NSString;\r\n {$ENDIF}\r\n {$IFDEF FMXLIB}\r\n class function GetParentForm(AControl: TFMXObject): TCustomForm;\r\n {$ENDIF}\r\n {$IFDEF CMNLIB}\r\n class function GetParentForm(AControl: TControl): TCustomForm;\r\n {$ENDIF}\r\n {$IFDEF WEBLIB}\r\n class function GetParentForm(AControl: TControl): TCustomForm;\r\n {$ENDIF}\r\n class function GetOwnerForm(AComponent: TComponent): TCustomForm;\r\n class function &Message(const AMessage: string): Integer; overload;\r\n class function &Message(const AMessage: string; const ADialogType: TMsgDlgType; const AButtons: TMsgDlgButtons; const AHelpContext: LongInt): Integer; overload;\r\n class function SelectFile(var AFileName: string; const ADefaultFolder: string = ''; const AFilter: string = ''; const ACallBack: TTMSFNCUtilsFileCallBackEvent = nil): Boolean;\r\n class function SaveFile(var AFileName: string; const AFilter: string = ''; const ACallBack: TTMSFNCUtilsFileCallBackEvent = nil): Boolean;\r\n class function EscapeString(const AValue: string): string;\r\n class function UnescapeString(const AValue: string): string;\r\n class function DownloadImage(AURL: string): TMemoryStream;\r\n class function GetBestDelimiter(ALine1, Aline2: string; ACheckDecimalSeperator: Boolean = True): Char;\r\n {$IFDEF VCLLIB}\r\n {$IF COMPILERVERSION > 22.0}\r\n class function CheckVCLStylesEnabled(AStyleServices: TCustomStyleServices; ADesigning: Boolean): Boolean;\r\n {$IFEND}\r\n {$ENDIF}\r\n end;\r\n\r\n {$IFNDEF WEBLIB}\r\n TTMSFNCComponentHelper = class helper for TComponent\r\n function GetVersionNumber(AMaj, AMin, ARel, ABld: ShortInt): string;\r\n end;\r\n {$ENDIF}\r\n\r\n {$IFDEF CMNLIB}\r\n TTMSFNCControlHelper = class helper for TControl\r\n function MakeScreenshot: TTMSFNCBitmap;\r\n end;\r\n {$ENDIF}\r\n\r\n TTMSFNCClipBoardFormat = (cfText, cfRTF, cfHTML, cfBitmap, cfBitmapWin, cfStream, cfRichTextStream);\r\n\r\n TTMSFNCClipBoard = class\r\n private\r\n {$IFDEF WEBLIB}\r\n class var FClipboardData: string;\r\n {$ENDIF}\r\n protected\r\n {$IFDEF FMXLIB}\r\n {$IFDEF MSWINDOWS}\r\n class function isTextFormat(AFormat: Cardinal): Boolean; virtual;\r\n class function isStreamFormat(AFormat: Cardinal): Boolean; virtual;\r\n {$ELSE}\r\n class function isTextFormat(AFormat: String): Boolean; virtual;\r\n class function isStreamFormat(AFormat: String): Boolean; virtual;\r\n {$ENDIF}\r\n {$ENDIF}\r\n public\r\n {$IFDEF FMXLIB}\r\n {$IFDEF MSWINDOWS}\r\n class function GetFormat(AFormat: TTMSFNCClipBoardFormat): Cardinal; virtual;\r\n class procedure SetValues(AValues: TArray; AFormats: TArray); virtual;\r\n class procedure SetValue(AValue: TValue; AFormat: Cardinal); virtual;\r\n class function GetValue(AFormat: Cardinal): TValue; virtual;\r\n class function GetCustomValue(AFormat: Cardinal; AData: Pointer): TValue; virtual;\r\n class procedure SetCustomValue(AFormat: Cardinal; AValue: TValue; var AData: Pointer); virtual;\r\n class function AllocateCustomValue(AFormat: Cardinal; AValue: TValue): THandle; virtual;\r\n {$ELSE}\r\n class function GetFormat(AFormat: TTMSFNCClipBoardFormat): string; virtual;\r\n class procedure SetValues(AValues: TArray; AFormats: TArray); virtual;\r\n class procedure SetValue(AValue: TValue; AFormat: String); virtual;\r\n class function GetValue(AFormat: String): TValue; virtual;\r\n {$IFDEF MACOS}\r\n class function GetCustomValue(AFormat: String; AData: NSData): TValue; virtual;\r\n class function SetCustomValue(AFormat: String; AValue: TValue): NSData; virtual;\r\n {$ELSE}\r\n class function GetCustomValue(AFormat: String; AData: Pointer): TValue; virtual;\r\n class function SetCustomValue(AFormat: String; AValue: TValue): Pointer; virtual;\r\n {$ENDIF}\r\n {$ENDIF}\r\n {$IFDEF MSWINDOWS}\r\n class procedure SetBitmapWin(ABitmap: TTMSFNCBitmap); virtual;\r\n class function GetBitmapWin: TTMSFNCBitmap; virtual;\r\n {$ENDIF}\r\n {$IFDEF MSWINDOWS}\r\n class function HasFormat(AFormat: Cardinal): Boolean; overload; virtual;\r\n {$ELSE}\r\n class function HasFormat(AFormat: String): Boolean; overload; virtual;\r\n {$ENDIF}\r\n {$ENDIF}\r\n\r\n {$IFDEF CMNLIB}\r\n class function GetFormat(AFormat: TTMSFNCClipBoardFormat): string; virtual;\r\n {$ENDIF}\r\n class function HasFormat(AFormat: TTMSFNCClipBoardFormat): Boolean; overload; virtual;\r\n class function HasContent: Boolean; virtual;\r\n class procedure Clear; virtual;\r\n class procedure SetText(AText: String); virtual;\r\n class function GetText: String; virtual;\r\n class procedure SetStream(AStream: TMemoryStream); virtual;\r\n class function GetStream: TMemoryStream; virtual;\r\n class procedure SetBitmap(ABitmap: TTMSFNCBitmap); virtual;\r\n class function GetBitmap: TTMSFNCBitmap; virtual;\r\n class procedure SetRichTextStream(AStream: TMemoryStream); virtual;\r\n class function GetRichTextStream: TMemoryStream; virtual;\r\n class procedure SetRTF(ARTF: String); virtual;\r\n class function GetRTF: String; virtual;\r\n class procedure SetHTML(AHTML: String); virtual;\r\n class function GetHTML: String; virtual;\r\n end;\r\n\r\n{$EXTERNALSYM Hiword}\r\nfunction Hiword(L: DWORD): Word;\r\n{$EXTERNALSYM LoWord}\r\nfunction LoWord(L: DWORD): Word;\r\n{$EXTERNALSYM MakeWord}\r\nfunction MakeWord(b1,b2: Integer): Integer;\r\n{$EXTERNALSYM MakeLong}\r\nfunction MakeLong(i1,i2: Integer): Integer;\r\n{$IFDEF FNCLIB}\r\n{$IFDEF WEBLIB}\r\nfunction CreateUploadFile(AName: string; AData: TJSUint8Array): TTMSFNCUtilsFile;\r\n{$ENDIF}\r\n{$ENDIF}\r\n\r\n{$IFDEF FNCLIB}\r\nfunction ExtractFileNameEx(AFile: TTMSFNCUtilsFile): string;\r\nfunction GetMimeTypeEx(AFile: TTMSFNCUtilsFile): string;\r\n{$ENDIF}\r\n\r\n{$IFDEF ANDROID}\r\nfunction SharedActivityEx: JActivity;\r\n{$ENDIF}\r\n\r\nvar\r\n CF_FNCSTREAM: Word;\r\n CF_FNCRICHTEXTSTREAM: Word;\r\n CF_FNCRTF: Word;\r\n CF_FNCBITMAP: Word;\r\n {$IFDEF FMXLIB}\r\n CF_FNCBITMAPWIN: Word;\r\n {$ENDIF}\r\n CF_FNCHTML: Word;\r\n FNCFormatSettings: TFormatSettings;\r\n\r\nimplementation\r\n\r\n{$IFDEF WEBLIB}\r\nuses\r\n DateUtils\r\n {$IFDEF ELECTRON}\r\n ,WEBLib.Electron, libelectron\r\n {$ENDIF}\r\n ;\r\n{$ENDIF}\r\n{$IFNDEF WEBLIB}\r\nuses\r\n {$IFDEF MSWINDOWS}\r\n {$IFDEF FMXLIB}\r\n FMX.Platform.Win,\r\n {$ENDIF}\r\n MMSystem,\r\n {$IFNDEF LCLLIB}\r\n WinInet, ShellApi, AnsiStrings\r\n {$ENDIF}\r\n {$IFDEF VCLLIB}\r\n ,ShlObj, ComObj\r\n {$ENDIF}\r\n {$ENDIF}\r\n {$IFDEF MACOS}\r\n {$IFDEF IOS}\r\n iOSApi.UIKit, iOSApi.AVFoundation, iOSApi.CocoaTypes, FMX.Platform.iOS\r\n {$ELSE}\r\n MacApi.AppKit, MacAPI.CocoaTypes, MacApi.AVFoundation\r\n {$ENDIF}\r\n ,MacApi.Helpers\r\n {$ENDIF}\r\n {$IFDEF ANDROID}\r\n AndroidApi.JNI, AndroidApi.JNI.Webkit, AndroidApi.IOUtils, AndroidApi.JNI.GraphicsContentViewText, AndroidApi.JNIBridge,\r\n AndroidApi.JNI.Net, AndroidApi.Helpers, FMX.Helpers.Android, AndroidApi.JNI.JavaTypes, AndroidApi.Log,\r\n AndroidApi.JNI.Media\r\n {$ENDIF}\r\n {$IFDEF FMXLIB}\r\n {$IFDEF LINUX}\r\n StrUtils, FMX.Clipboard, FMUX.Api\r\n {$ENDIF}\r\n ,FMX.Platform, FMX.Surfaces, FMX.MultiResBitmap\r\n {$HINTS OFF}\r\n {$IF COMPILERVERSION > 28}\r\n ,FMX.Utils\r\n {$IFEND}\r\n {$IF COMPILERVERSION > 30}\r\n {$IFDEF FMXMOBILE}\r\n ,FMX.DialogService.Async\r\n {$ELSE}\r\n ,FMX.DialogService.Sync\r\n {$ENDIF}\r\n {$IFEND}\r\n {$HINTS ON}\r\n {$ENDIF}\r\n {$IFDEF LCLLIB}\r\n LCLIntF, LCLType, StrUtils\r\n {$ENDIF}\r\n {$IFDEF CMNLIB}\r\n ,ClipBrd\r\n {$ENDIF}\r\n {$IFNDEF LINUX}\r\n {$IFNDEF LCLLIB}\r\n ,StrUtils\r\n {$ENDIF}\r\n {$ENDIF}\r\n {$IFDEF LCLLIB}\r\n ,FPHTTPClient, Base64\r\n {$IFDEF UNIX}\r\n ,unixutil\r\n {$ENDIF}\r\n {$ENDIF}\r\n ,DateUtils\r\n {$IFNDEF LCLWEBLIB}\r\n ,IOUtils\r\n {$HINTS OFF}\r\n {$IF COMPILERVERSION > 27}\r\n ,System.NetEncoding\r\n {$ELSE}\r\n ,EncdDecd\r\n {$IFEND}\r\n {$HINTS ON}\r\n {$IFDEF FNCLIB}\r\n ,System.TimeSpan\r\n {$ENDIF}\r\n {$ENDIF}\r\n ;\r\n{$ENDIF}\r\n\r\nconst\r\n HTMLNumSpecialChar = 92;\r\n JSONNumSpecialChar = 7;\r\n\r\nvar\r\n HTMLEncodedChar : array[1..HTMLNumSpecialChar] of unicodestring = ('&','<','>','\"',' ',\r\n 'é','è','ë','ê',\r\n 'ó','ò','ö','ô',\r\n 'í','ì','ï','î',\r\n 'ú','ù','ü','û',\r\n 'á','à','ä','â',\r\n 'É','È','Ë','Ê',\r\n 'Ó','Ò','Ö','Ô',\r\n 'Í','Ì','Ï','Î',\r\n 'Ú','Ù','Ü','Û',\r\n 'Á','À','Ä','Â',\r\n 'ç','Ç','ø','Ø',\r\n 'å','Å','©','®',\r\n '€','«','»','ã',\r\n 'Ã','õ','Õ','™',\r\n '§','¶','ß','£',\r\n '$','§','‰','¶',\r\n '''','¥','¤','¢',\r\n '±','¡','°','ý','Ý',\r\n '¼','½','¾','Æ',\r\n 'æ','Ñ','ñ','Ð',\r\n\t\t\t\t\t\t '´','µ','¶','·','²','³');\r\n\r\n HTMLSpecialChar : array[1..HTMLNumSpecialChar] of string = ('&','<','>','"',' ',\r\n 'é','è','ë','ê',\r\n 'ó','ò','ö','ô',\r\n 'í','ì','ï','î',\r\n 'ú','ù','ü','û',\r\n 'á','à','ä','â',\r\n 'É','È','Ë','Ê',\r\n 'Ó','Ò','Ö','Ô',\r\n 'Í','Ì','Ï','Î',\r\n 'Ú','Ù','Ü','Û',\r\n 'Á','À','Ä','Â',\r\n 'ç','Ç','ø','Ø',\r\n 'å','Å','©','®',\r\n '€','«','»','ã',\r\n 'Ã','õ','Õ',\r\n '™','§','¶','ß',\r\n '£','$','§',\r\n '‰','¶',''',\r\n '¥','¤','¢','±',\r\n '¡','°','ý','Ý',\r\n '¼', '½', '¾','Æ',\r\n 'æ','Ñ','ñ','Ð',\r\n '´','µ','¶',\r\n '·','²','³');\r\n\r\n JSONSpecialChar: array[1..JSONNumSpecialChar] of char = ('\"','\\',#8,#12,#10,#13,#9);\r\n\r\n JSONEncodedSpecialChar: array[1..JSONNumSpecialChar] of string = ('\\u0022','\\u005C','\\u0008','\\u000C','\\u000A','\\u000D','\\u0009');\r\n\r\n{$IFDEF ANDROID}\r\n FContentClipboardManager: JContent_ClipboardManager;\r\n FClipboardManager: JClipboardManager;\r\n{$ENDIF}\r\n\r\n{$IFDEF FNCLIB}\r\n FMimeTypes: TStringList;\r\n\r\nfunction ExtractFileNameEx(AFile: TTMSFNCUtilsFile): string;\r\nbegin\r\n {$IFNDEF WEBLIB}\r\n Result := ExtractFileName(AFile);\r\n {$ENDIF}\r\n {$IFDEF WEBLIB}\r\n Result := AFile.Name;\r\n {$ENDIF}\r\nend;\r\n\r\nfunction GetMimeTypeEx(AFile: TTMSFNCUtilsFile): string;\r\nbegin\r\n {$IFNDEF WEBLIB}\r\n Result := TTMSFNCUtils.GetMimeType(AFile)\r\n {$ENDIF}\r\n {$IFDEF WEBLIB}\r\n Result := TTMSFNCUtils.GetMimeType(AFile.Name);\r\n {$ENDIF}\r\nend;\r\n{$ENDIF}\r\n\r\nfunction Hiword(L: DWORD): Word;\r\nbegin\r\n Result := L shr 16;\r\nend;\r\n\r\nfunction LoWord(L: DWORD): Word;\r\nbegin\r\n Result := L AND $FFFF;\r\nend;\r\n\r\nfunction MakeWord(b1,b2: Integer): Integer;\r\nbegin\r\n Result := b1 or b2 shl 8;\r\nend;\r\n\r\nfunction MakeLong(i1,i2: Integer): Integer;\r\nbegin\r\n Result := i1 or i2 shl 16;\r\nend;\r\n\r\n{$IFDEF FNCLIB}\r\n{$IFDEF WEBLIB}\r\nfunction CreateUploadFile(AName: string; AData: TJSUint8Array): TTMSFNCUtilsFile;\r\nbegin\r\n Result.Data := AData;\r\n Result.Name := AName;\r\nend;\r\n{$ENDIF}\r\n{$ENDIF}\r\n\r\n{$IFDEF ANDROID}\r\ntype\r\n JHttpURLConnection = interface;\r\n JURLConnection = interface;\r\n JURL = interface;\r\n\r\n JURLClass = interface(JObjectClass)\r\n ['{3E1A363B-FA2A-4399-A0C7-24DFC255E133}']\r\n {class} function init(spec: JString): JURL; cdecl; overload;\r\n end;\r\n\r\n [JavaSignature('java/net/URL')]\r\n JURL = interface(JObject)\r\n ['{BCC8860A-E48B-4894-95A9-26B3AFDF3EDC}']\r\n function openConnection: JURLConnection; cdecl; overload;\r\n end;\r\n TJURL = class(TJavaGenericImport) end;\r\n\r\n JURLConnectionClass = interface(JObjectClass)\r\n ['{969FF7F8-7B73-491C-A621-855E197B0B6B}']\r\n end;\r\n\r\n [JavaSignature('java/net/URLConnection')]\r\n JURLConnection = interface(JObject)\r\n ['{F50D6528-AE5E-4862-89A1-CAE44274AED9}']\r\n function getHeaderField(key: JString): JString; cdecl; overload;\r\n end;\r\n TJURLConnection = class(TJavaGenericImport) end;\r\n\r\n JHttpURLConnectionClass = interface(JURLConnectionClass)\r\n ['{D80190E4-FBCC-4286-9E39-42F45C58E7D9}']\r\n end;\r\n [JavaSignature('java/net/HttpURLConnection')]\r\n JHttpURLConnection = interface(JURLConnection)\r\n ['{57A25834-F65A-4078-8B73-1C566DF70536}']\r\n procedure setRequestMethod(method: JString); cdecl;\r\n procedure setDoInput(newValue: Boolean); cdecl;\r\n procedure setDoOutput(newValue: Boolean); cdecl;\r\n function getOutputStream: JOutputStream; cdecl;\r\n function getInputStream: JInputStream; cdecl;\r\n function getResponseCode: Integer; cdecl;\r\n end;\r\n TJHttpURLConnection = class(TJavaGenericImport) end;\r\n\r\ntype\r\n TTMSFNCUtilsFileMode = (ufmOpen, ufmSave);\r\n\r\n TTMSFNCUtilsDialogDismissListener = class(TJavaLocal, JDialogInterface_OnDismissListener)\r\n public\r\n procedure onDismiss(dialog: JDialogInterface); cdecl;\r\n end;\r\n\r\n TTMSFNCUtilsDialogSelectDirectoryListener = class(TJavaLocal, JDialogInterface_OnClickListener)\r\n public\r\n procedure onClick(dialog: JDialogInterface; which: Integer); cdecl;\r\n end;\r\n\r\n TTMSFNCUtilsDialogSelectFileListener = class(TJavaLocal, JDialogInterface_OnClickListener)\r\n public\r\n procedure onClick(dialog: JDialogInterface; which: Integer); cdecl;\r\n end;\r\n\r\nvar\r\n FFileExt: string;\r\n FFileMode: TTMSFNCUtilsFileMode;\r\n FSelectedFile: String;\r\n FCallBack: TTMSFNCUtilsFileCallBackEvent;\r\n FDialogBuilder: JAlertDialog_Builder;\r\n FDialog: JDialog;\r\n FCurrentPath: JFile;\r\n FFileList: TJavaObjectArray;\r\n FDirectoryListener: TTMSFNCUtilsDialogSelectDirectoryListener;\r\n FSelectFileListener: TTMSFNCUtilsDialogSelectFileListener;\r\n FFilter: string;\r\n FDismissListener: TTMSFNCUtilsDialogDismissListener;\r\n\r\nfunction SharedActivityEx: JActivity;\r\nbegin\r\n {$HINTS OFF}\r\n {$IF COMPILERVERSION > 29}\r\n Result := TAndroidHelper.Activity;\r\n {$ELSE}\r\n Result := SharedActivity;\r\n {$IFEND}\r\n {$HINTS ON}\r\nend;\r\n\r\nprocedure LoadFileList(APath: JFile; AFilter: string);\r\nvar\r\n l, lf: TList;\r\n a, c: TArray;\r\n I, K: Integer;\r\n s: string;\r\n SR: TSearchRec;\r\n fn: string;\r\n chk: Boolean;\r\nbegin\r\n FCurrentPath := APath;\r\n l := TList.Create;\r\n if APath.exists then\r\n begin\r\n lf := TList.Create;\r\n\r\n a := AFilter.Split(['|']);\r\n\r\n for I := 0 to Length(a) - 1 do\r\n begin\r\n if Odd(I) then\r\n begin\r\n c := a[I].Split([';']);\r\n for K := 0 to Length(c) - 1 do\r\n begin\r\n s := c[K].Replace('*', '');\r\n if not lf.Contains(s) then\r\n lf.Add(s);\r\n end;\r\n end;\r\n end;\r\n\r\n if APath.getParentFile <> nil then\r\n l.Add('..');\r\n\r\n fn := TTMSFNCUtils.AddBackslash(JStringToString(APath.getPath)) + '*';\r\n k := FindFirst(fn, faAnyFile, SR);\r\n while K = 0 do\r\n begin\r\n chk := (sr.Name <> '.') and (sr.Name <> '..');\r\n chk := chk and (lf.Contains(ExtractFileExt(sr.Name)) or (lf.Count = 0) or ((lf.Count = 1) and (lf[0] = '.')) or (sr.Attr and 16 = 16));\r\n\r\n if chk then\r\n begin\r\n l.Add(ExtractFilePath(fn) + SR.Name);\r\n end;\r\n\r\n K := FindNext(SR);\r\n end;\r\n FindClose(SR);\r\n\r\n lf.Free;\r\n end;\r\n\r\n FFileList := TJavaObjectArray.Create(l.Count);\r\n for I := 0 to l.Count - 1 do\r\n FFileList.Items[I] := StrToJCharSequence(l[I]);\r\n\r\n l.Free;\r\nend;\r\n\r\nprocedure ShowDialog(AFile: JFile);\r\nbegin\r\n FDialogBuilder := TJAlertDialog_Builder.JavaClass.init(SharedActivityEx);\r\n FDialogBuilder.setTitle(StrToJCharSequence(JStringToString(AFile.getPath)));\r\n if FFileMode = ufmSave then\r\n FDialogBuilder.setPositiveButton(StrToJCharSequence('Save'), FDirectoryListener);\r\n FDialogBuilder.setItems(FFileList, FSelectFileListener);\r\n FDialog := FDialogBuilder.create;\r\n FDialog.setOnDismissListener(FDismissListener);\r\n FDialog.show;\r\nend;\r\n{$ENDIF}\r\n\r\n{$IFDEF MACOS}\r\n{$IFDEF IOS}\r\nconst\r\n UIDocumentPickerModeImport = 0;\r\n UIDocumentPickerModeOpen = 1;\r\n UIDocumentPickerModeExportToService = 2;\r\n UIDocumentPickerModeMoveToService = 3;\r\n\r\ntype\r\n UIDocumentPickerViewController = interface;\r\n\r\n UIDocumentPickerDelegate = interface(IObjectiveC)\r\n ['{B978C4EB-8C88-4D80-B5B6-3AB33B7831DC}']\r\n procedure documentPicker(controller: UIDocumentPickerViewController; didPickDocumentsAtURLs: NSArray); cdecl;\r\n procedure documentPickerWasCancelled(controller: UIDocumentPickerViewController); cdecl;\r\n end;\r\n\r\n UIDocumentPickerMode = NSUInteger;\r\n\r\n UIDocumentPickerViewControllerClass = interface(UIViewControllerClass)\r\n ['{C67E60F0-F8AB-49BB-B264-9F20D14276DA}']\r\n end;\r\n UIDocumentPickerViewController = interface(UIViewController)\r\n ['{548F924F-2E33-4F77-8947-1B9D3F49A794}']\r\n function initWithDocumentTypes(allowedUTIs: NSArray; inMode: UIDocumentPickerMode): Pointer; cdecl;\r\n function initWithURL(url: NSURL; inMode: UIDocumentPickerMode): Pointer; cdecl;\r\n function initWithURLs(urls: NSArray; inMode: UIDocumentPickerMode): Pointer; cdecl;\r\n procedure setAllowsMultipleSelection(allowsMultipleSelection: Boolean); cdecl;\r\n function allowsMultipleSelection: Boolean; cdecl;\r\n procedure setDocumentPickerMode(documentPickerMode: UIDocumentPickerMode); cdecl;\r\n function documentPickerMode: UIDocumentPickerMode; cdecl;\r\n procedure setDelegate(delegate: Pointer); cdecl;\r\n function delegate: Pointer; cdecl;\r\n end;\r\n TUIDocumentPickerViewController = class(TOCGenericImport) end;\r\n\r\n TTMSFNCUtilsFileMode = (ufmOpen, ufmSave);\r\n\r\n TUIDocumentPickerDelegate = class(TOCLocal, UIDocumentPickerDelegate)\r\n public\r\n procedure documentPicker(controller: UIDocumentPickerViewController; didPickDocumentsAtURLs: NSArray); cdecl;\r\n procedure documentPickerWasCancelled(controller: UIDocumentPickerViewController); cdecl;\r\n end;\r\n\r\nvar\r\n FFileExt: string;\r\n FFileMode: TTMSFNCUtilsFileMode;\r\n FSelectedFile: String;\r\n FCallBack: TTMSFNCUtilsFileCallBackEvent;\r\n FDocumentPickerDelegate: TUIDocumentPickerDelegate;\r\n FDocumentPicker: UIDocumentPickerViewController;\r\n\r\nfunction GetSharedApplication: UIApplication;\r\nbegin\r\n Result := TUIApplication.Wrap(TUIApplication.OCClass.sharedApplication);\r\nend;\r\n\r\n{$ENDIF}\r\nclass function TTMSFNCUtils.NSStrEx(AString: String): NSString;\r\nbegin\r\n Result := StrToNSStr(AString);\r\nend;\r\n\r\nconst\r\n libFoundation = '/System/Library/Frameworks/Foundation.framework/Foundation';\r\n libMobileCoreServices = '/System/Library/Frameworks/MobileCoreServices.framework/MobileCoreServices';\r\n\r\nprocedure NSLog(format: Pointer); cdecl; varargs; external libFoundation name _PU + 'NSLog';\r\n{$ENDIF}\r\n\r\n{ TTMSFNCUtils }\r\n\r\nclass function TTMSFNCUtils.IPos(su,s:string):Integer;\r\nbegin\r\n Result := Pos(UpperCase(su),UpperCase(s));\r\nend;\r\n\r\nclass function TTMSFNCUtils.TagReplaceString(const Srch,Repl:string;var Dest:string):Boolean;\r\nvar\r\n i: Integer;\r\nbegin\r\n i := IPos(srch,dest);\r\n if i > 0 then\r\n begin\r\n Result := True;\r\n Delete(Dest,i,Length(Srch));\r\n Dest := Copy(Dest,1,i-1) + Repl + Copy(Dest,i,Length(Dest));\r\n end\r\n else\r\n Result := False;\r\nend;\r\n\r\nclass function TTMSFNCUtils.SaveFile(var AFileName: string; const AFilter: string = ''; const ACallBack: TTMSFNCUtilsFileCallBackEvent = nil): Boolean;\r\n{$IFNDEF WEBLIB}\r\n{$IFNDEF FMXMOBILE}\r\nvar\r\n s: TSaveDialog;\r\n ext: string;\r\n{$ENDIF}\r\n{$IFDEF FMXMOBILE}\r\n{$IFDEF IOS}\r\nvar\r\n f: string;\r\n u: NSURL;\r\n{$ENDIF}\r\n{$IFDEF ANDROID}\r\nvar\r\n f: string;\r\n{$ENDIF}\r\n{$ENDIF}\r\nbegin\r\n Result := False;\r\n {$IFDEF FMXMOBILE}\r\n {$IFDEF IOS}\r\n FCallBack := ACallBack;\r\n f := AFileName;\r\n\r\n if ExtractFilePath(f) = '' then\r\n f := TTMSFNCUtils.GetDocumentsPath + PthDel + f;\r\n\r\n FFileExt := ExtractFileName(AFileName);\r\n FFileMode := ufmSave;\r\n if Assigned(FDocumentPickerDelegate) then\r\n FDocumentPickerDelegate.Free;\r\n\r\n FDocumentPickerDelegate := TUIDocumentPickerDelegate.Create;\r\n\r\n if not FileExists(f) then\r\n FileCreate(f);\r\n\r\n u := TNSURL.Wrap(TNSURL.OCClass.fileURLWithPath(TTMSFNCUtils.NSStrEx(f)));\r\n FDocumentPicker := TUIDocumentPickerViewController.Wrap(TUIDocumentPickerViewController.Wrap(TUIDocumentPickerViewController.OCClass.alloc).initWithURL(u, UIDocumentPickerModeExportToService));\r\n FDocumentPicker.setDelegate(FDocumentPickerDelegate.GetObjectID);\r\n GetSharedApplication.keyWindow.rootViewController.presentViewController(FDocumentPicker, False, nil);\r\n FDocumentPicker.release;\r\n {$ENDIF}\r\n {$IFDEF ANDROID}\r\n FCallBack := ACallBack;\r\n FFileExt := ExtractFileName(AFileName);\r\n\r\n FFileMode := ufmSave;\r\n\r\n FDirectoryListener := TTMSFNCUtilsDialogSelectDirectoryListener.Create;\r\n FSelectFileListener := TTMSFNCUtilsDialogSelectFileListener.Create;\r\n FDismissListener := TTMSFNCUtilsDialogDismissListener.Create;\r\n\r\n FFilter := AFilter;\r\n if ExtractFilePath(AFileName) = '' then\r\n f := AddBackslash(TTMSFNCUtils.GetDocumentsPath)\r\n else\r\n f := AddBackslash(ExtractFilePath(AFileName));\r\n\r\n FSelectedFile := f + FFileExt;\r\n\r\n FCurrentPath := TJFile.JavaClass.init(StringToJString(f));\r\n LoadFileList(FCurrentPath, FFilter);\r\n CallInUIThreadAndWaitFinishing(\r\n procedure\r\n begin\r\n ShowDialog(FCurrentPath);\r\n end\r\n );\r\n {$ENDIF}\r\n {$ENDIF}\r\n {$IFNDEF FMXMOBILE}\r\n s := TSaveDialog.Create(Application);\r\n try\r\n ext := ExtractFileExt(AFileName);\r\n s.Filter := AFilter;\r\n if ExtractFilePath(AFileName) = '' then\r\n s.InitialDir := AddBackslash(TTMSFNCUtils.GetDocumentsPath)\r\n else\r\n s.InitialDir := AddBackslash(ExtractFilePath(AFileName));\r\n s.Options := s.Options + [TOpenOption.ofOverwritePrompt];\r\n s.FileName := ExtractFileName(AFileName);\r\n if s.Execute then\r\n begin\r\n AFileName := s.FileName;\r\n if ExtractFileExt(s.FileName) = '' then\r\n AFileName := AFileName + ext;\r\n Result := True;\r\n end;\r\n\r\n if Assigned(ACallBack) then\r\n ACallBack(AFileName, Result);\r\n finally\r\n s.Free;\r\n end;\r\n {$ENDIF}\r\n{$ENDIF}\r\n{$IFDEF WEBLIB}\r\nbegin\r\n Result := True;\r\n{$ENDIF}\r\nend;\r\n\r\nclass function TTMSFNCUtils.EnDeCrypt(const AValue: String): String;\r\nvar\r\n r: string;\r\n i: Integer;\r\n c: Char;\r\n b: Byte;\r\nbegin\r\n r := '';\r\n {$IFDEF ZEROSTRINGINDEX}\r\n for i := 0 to Length(AValue) - 1 do\r\n {$ELSE}\r\n for i := 1 to Length(AValue) do\r\n {$ENDIF}\r\n begin\r\n b := Ord(AValue[i]);\r\n b := (b and $E0) + ((b and $1F) xor 5);\r\n c := chr(b);\r\n r := r + c;\r\n end;\r\n\r\n Result := r;\r\nend;\r\n\r\nclass function TTMSFNCUtils.EscapeString(const AValue: string): string;\r\nvar\r\n res: string;\r\n ch: char;\r\n i: integer;\r\n\r\n function EscapeSpecialChar(ch: char; var s: string): boolean;\r\n var\r\n i: integer;\r\n begin\r\n Result := false;\r\n s := '';\r\n\r\n for i := 1 to JSONNumSpecialChar do\r\n begin\r\n if ch = JSONSpecialChar[i] then\r\n begin\r\n s := JSONEncodedSpecialChar[i];\r\n Result := True;\r\n Break;\r\n end;\r\n end;\r\n end;\r\n\r\nbegin\r\n Result := '';\r\n for i := 1 to length(AValue) do\r\n begin\r\n ch := CharInStr(AValue, i);\r\n\r\n if ch > #127 then\r\n Result := Result + '\\u' + IntToHex(ord(ch),4)\r\n else\r\n begin\r\n res := '';\r\n if EscapeSpecialChar(ch, res) then\r\n Result := Result + res\r\n else\r\n Result := Result + ch\r\n end;\r\n end;\r\nend;\r\n\r\nclass function TTMSFNCUtils.UnescapeString(const AValue: string): string;\r\nvar\r\n i: Integer;\r\n j: Integer;\r\n c: Integer;\r\n o: Integer;\r\n s: string;\r\n x: Integer;\r\nbegin\r\n SetLength(s, Length(AValue));\r\n {$IFDEF ZEROSTRINGINDEX}\r\n o := 1;\r\n {$ENDIF}\r\n {$IFNDEF ZEROSTRINGINDEX}\r\n o := 0;\r\n {$ENDIF}\r\n i := 1;\r\n j := 1;\r\n while i <= Length(AValue) do\r\n begin\r\n if AValue[i - o] = '\\' then\r\n begin\r\n if i < Length(AValue) then\r\n begin\r\n if AValue[i + 1 - o] = '\\' then\r\n begin\r\n x := j - o;\r\n s[x] := '\\';\r\n inc(i, 2);\r\n end\r\n else if AValue[i + 1 - o] = '/' then\r\n begin\r\n x := j - o;\r\n s[x] := '/';\r\n inc(i, 2);\r\n end\r\n else if AValue[i + 1 - o] = 'b' then\r\n begin\r\n x := j - o;\r\n s[x] := #$8;\r\n inc(i, 2);\r\n end\r\n else if AValue[i + 1 - o] = 'f' then\r\n begin\r\n x := j - o;\r\n s[x] := #$c;\r\n inc(i, 2);\r\n end\r\n else if AValue[i + 1 - o] = 'n' then\r\n begin\r\n x := j - o;\r\n s[x] := #$a;\r\n inc(i, 2);\r\n end\r\n else if AValue[i + 1 - o] = 'r' then\r\n begin\r\n x := j - o;\r\n s[x] := #$d;\r\n inc(i, 2);\r\n end\r\n else if AValue[i + 1 - o] = 't' then\r\n begin\r\n x := j - o;\r\n s[x] := #$9;\r\n inc(i, 2);\r\n end\r\n else if AValue[i + 1 - o] = '\"' then\r\n begin\r\n x := j - o;\r\n s[x] := '\"';\r\n inc(i, 2);\r\n end\r\n else if (AValue[i + 1 - o] = 'u') and (i + 1 + 4 <= Length(AValue)) and TryStrToInt('$' + string(Copy(AValue, i + 2, 4)), c) then\r\n begin\r\n inc(i, 6);\r\n x := j - o;\r\n {$IFDEF WEBLIB}\r\n s[x] := Chr(c);\r\n {$ENDIF}\r\n {$IFNDEF WEBLIB}\r\n s[x] := Char(c);\r\n {$ENDIF}\r\n end\r\n else\r\n raise Exception.CreateFmt('Invalid code at position %s', [IntToStr(i)]);\r\n end\r\n else\r\n raise Exception.Create('Unexpected end of string');\r\n end\r\n else\r\n begin\r\n x := j - o;\r\n s[x] := AValue[i - o];\r\n inc(i);\r\n end;\r\n inc(j);\r\n end;\r\n SetLength(s, j - 1);\r\n\r\n Result := s;\r\nend;\r\n\r\nclass function TTMSFNCUtils.SelectFile(var AFileName: string; const ADefaultFolder: string = ''; const AFilter: string = ''; const ACallBack: TTMSFNCUtilsFileCallBackEvent = nil): Boolean;\r\n{$IFNDEF WEBLIB}\r\n{$IFNDEF FMXMOBILE}\r\nvar\r\n o: TOpenDialog;\r\n{$ENDIF}\r\n{$IFDEF FMXMOBILE}\r\n{$IFDEF IOS}\r\nvar\r\n arr: NSArray;\r\n arritems: array of Pointer;\r\n{$ENDIF}\r\n{$IFDEF ANDROID}\r\nvar\r\n f: string;\r\n{$ENDIF}\r\n{$ENDIF}\r\nbegin\r\n Result := False;\r\n {$IFDEF FMXMOBILE}\r\n {$IFDEF IOS}\r\n FCallBack := ACallBack;\r\n FFileMode := ufmOpen;\r\n if Assigned(FDocumentPickerDelegate) then\r\n FDocumentPickerDelegate.Free;\r\n\r\n FDocumentPickerDelegate := TUIDocumentPickerDelegate.Create;\r\n SetLength(arrItems, 3);\r\n arrItems[0] := (CocoaNSStringConst(libMobileCoreServices, 'kUTTypeContent') as ILocalObject).GetObjectID;\r\n arrItems[1] := (CocoaNSStringConst(libMobileCoreServices, 'kUTTypeData') as ILocalObject).GetObjectID;\r\n arrItems[2] := (CocoaNSStringConst(libMobileCoreServices, 'kUTTypeItem') as ILocalObject).GetObjectID;\r\n arr := TNSArray.Wrap(TNSArray.OCClass.arrayWithObjects(@arritems[0], Length(arritems)));\r\n FDocumentPicker := TUIDocumentPickerViewController.Wrap(TUIDocumentPickerViewController.Wrap(TUIDocumentPickerViewController.OCClass.alloc).initWithDocumentTypes(arr, UIDocumentPickerModeImport));\r\n FDocumentPicker.setDocumentPickerMode(UIDocumentPickerModeImport);\r\n FDocumentPicker.setDelegate(FDocumentPickerDelegate.GetObjectID);\r\n GetSharedApplication.keyWindow.rootViewController.presentViewController(FDocumentPicker, False, nil);\r\n FDocumentPicker.release;\r\n {$ENDIF}\r\n {$IFDEF ANDROID}\r\n FCallBack := ACallBack;\r\n FFileMode := ufmOpen;\r\n\r\n FSelectFileListener := TTMSFNCUtilsDialogSelectFileListener.Create;\r\n FDismissListener := TTMSFNCUtilsDialogDismissListener.Create;\r\n\r\n FFilter := AFilter;\r\n if ADefaultFolder = '' then\r\n f := AddBackslash(TTMSFNCUtils.GetDocumentsPath)\r\n else\r\n f := AddBackslash(ADefaultFolder);\r\n\r\n FCurrentPath := TJFile.JavaClass.init(StringToJString(f));\r\n LoadFileList(FCurrentPath, FFilter);\r\n CallInUIThreadAndWaitFinishing(\r\n procedure\r\n begin\r\n ShowDialog(FCurrentPath);\r\n end\r\n );\r\n {$ENDIF}\r\n {$ENDIF}\r\n {$IFNDEF FMXMOBILE}\r\n o := TOpenDialog.Create(Application);\r\n try\r\n o.Options := [TOpenOption.ofFileMustExist];\r\n if ADefaultFolder = '' then\r\n o.InitialDir := AddBackslash(TTMSFNCUtils.GetDocumentsPath)\r\n else\r\n o.InitialDir := AddBackslash(ADefaultFolder);\r\n o.Filter := AFilter;\r\n if o.Execute then\r\n begin\r\n AFileName := o.FileName;\r\n Result := True;\r\n end;\r\n\r\n if Assigned(ACallBack) then\r\n ACallBack(AFileName, Result);\r\n finally\r\n o.Free;\r\n end;\r\n {$ENDIF}\r\n{$ENDIF}\r\n{$IFDEF WEBLIB}\r\nbegin\r\n Result := True;\r\n if Assigned(ACallBack) then\r\n ACallBack(AFileName, Result);\r\n{$ENDIF}\r\nend;\r\n\r\nclass function TTMSFNCUtils.&Message(const AMessage: string): Integer;\r\nbegin\r\n Result := TTMSFNCUtils.&Message(AMessage, TMsgDlgType.mtInformation, [TMsgDlgBtn.mbOK], 0);\r\nend;\r\n\r\nclass function TTMSFNCUtils.&Message(const AMessage: string; const ADialogType: TMsgDlgType; const AButtons: TMsgDlgButtons; const AHelpContext: LongInt): Integer;\r\nbegin\r\n{$IFNDEF WEBLIB}\r\n {$IFDEF FMXMOBILE}\r\n {$HINTS OFF}\r\n {$IF COMPILERVERSION > 30}\r\n TDialogServiceAsync.MessageDialog(AMessage, ADialogType, AButtons, TMsgDlgBtn.mbYes, AHelpContext);\r\n Result := mrOk;\r\n {$ELSE}\r\n Result := mrOk;\r\n {$IFEND}\r\n {$HINTS ON}\r\n {$ELSE}\r\n {$IFDEF LCLLIB}\r\n Result := MessageDlg(AMessage, ADialogType, AButtons, AHelpContext);\r\n {$ELSE}\r\n {$HINTS OFF}\r\n {$IF COMPILERVERSION > 30}\r\n {$IFDEF FMXLIB}\r\n Result := TDialogServiceSync.MessageDialog(AMessage, ADialogType, AButtons, TMsgDlgBtn.mbYes, AHelpContext);\r\n {$ELSE}\r\n Result := MessageDlg(AMessage, ADialogType, AButtons, AHelpContext);\r\n {$ENDIF}\r\n {$ELSE}\r\n Result := MessageDlg(AMessage, ADialogType, AButtons, AHelpContext);\r\n {$IFEND}\r\n {$HINTS ON}\r\n {$ENDIF}\r\n {$ENDIF}\r\n{$ENDIF}\r\n{$IFDEF WEBLIB}\r\n Result := 0;\r\n if ((TMsgDlgBtn.mbOK in AButtons) and (TMsgDlgBtn.mbCancel in AButtons)) or ((TMsgDlgBtn.mbYes in AButtons) and (TMsgDlgBtn.mbNo in AButtons)) then\r\n begin\r\n asm\r\n if (window.confirm(AMessage))\r\n {\r\n return 1\r\n }\r\n else\r\n {\r\n return 2\r\n }\r\n end;\r\n end\r\n else\r\n begin\r\n asm\r\n window.alert(AMessage);\r\n return 1\r\n end;\r\n end;\r\n{$ENDIF}\r\nend;\r\n\r\nclass function TTMSFNCUtils.NumericCharSet: TTMSFNCUtilsCharSet;\r\nvar\r\n ch: char;\r\n i: integer;\r\nbegin\r\n SetLength(Result,10);\r\n i := 0;\r\n\r\n for ch := '0' to '9' do\r\n begin\r\n Result[i] := ch;\r\n inc(i);\r\n end;\r\nend;\r\n\r\nclass function TTMSFNCUtils.CreateCharSet(AValue: string): TTMSFNCUtilsCharSet;\r\nvar\r\n i: integer;\r\nbegin\r\n SetLength(Result, Length(AValue));\r\n\r\n for i := 1 to Length(AValue) do\r\n begin\r\n Result[i - 1] := CharInStr(AValue, i);\r\n end;\r\nend;\r\n\r\n{$IFDEF FMXLIB}\r\n{$IFDEF LINUX}\r\nclass function TTMSFNCUtils.CurlReadData(buffer: Pointer; size, nitems: size_t;\r\n instream: Pointer): size_t; cdecl;\r\nvar\r\n l: Integer;\r\nbegin\r\n if instream <> nil then\r\n begin\r\n l := nitems * size;\r\n Result := FDownloadStream.Write(buffer^, l);\r\n end\r\n else\r\n Result := 0;\r\nend;\r\n{$ENDIF}\r\n{$ENDIF}\r\n\r\n{$IFDEF FNCLIB}\r\nclass procedure TTMSFNCUtils.GetTimeZoneInfo(ADateTime: TDateTime; var ABias: Integer; var ABiasDay: Integer; var AIsDaylight: Boolean);\r\nvar\r\n {$IFDEF UNIX}\r\n {$IFDEF FMXLIB}\r\n lTimeZone: TTimeZone;\r\n {$ENDIF}\r\n {$IFDEF LCLLIB}\r\n lTimeZone: Boolean;\r\n {$ENDIF}\r\n {$ENDIF}\r\n {$IFDEF MACOS}\r\n lTimeZone: NSTimeZone;\r\n {$ENDIF}\r\n {$IFDEF ANDROID}\r\n lTimeZone: JTimeZone;\r\n {$ENDIF}\r\n {$IFDEF MSWINDOWS}\r\n {$IFNDEF LCLLIB}\r\n lTimeZone: TTimeZone;\r\n {$ELSE}\r\n lTimeZone: TTimeZoneInformation;\r\n {$ENDIF}\r\n {$ENDIF}\r\n {$IFDEF WEBLIB}\r\n bias, biasday: Integer;\r\n isDaylight: Boolean;\r\n {$ENDIF}\r\nbegin\r\n {$IFDEF MACOS}\r\n lTimeZone := TNSTimeZone.Wrap(TNSTimeZone.OCClass.systemTimeZone);\r\n AIsDaylight := lTimeZone.isDaylightSavingTime;\r\n ABias := Round(lTimeZone.secondsFromGMT / 3600);\r\n ABiasday := Round(lTimeZone.daylightSavingTimeOffset / 3600);\r\n {$ENDIF}\r\n {$IFDEF ANDROID}\r\n lTimeZone := TJTimeZone.JavaClass.getDefault;\r\n AIsDaylight := lTimeZone.useDaylightTime;\r\n ABias := Round(lTimeZone.getRawOffset / 3600 / 1000);\r\n ABiasday := Round(lTimeZone.getDSTSavings / 3600 / 1000);\r\n {$ENDIF}\r\n {$IFDEF MSWINDOWS}\r\n {$IFNDEF LCLLIB}\r\n AIsDayLight := False;\r\n ABiasDay := 0;\r\n lTimeZone := TTimeZone.Local;\r\n ABias := Trunc(LTimeZone.GetUTCOffset(ADateTime).Negate.TotalMinutes);\r\n {$ELSE}\r\n AIsDayLight := (GetTimeZoneInformation(lTimeZone) = TIME_ZONE_ID_DAYLIGHT);\r\n ABias := lTimeZone.Bias;\r\n ABiasday := lTimeZone.DaylightBias;\r\n {$ENDIF}\r\n {$ENDIF}\r\n {$IFDEF UNIX}\r\n AIsDayLight := False;\r\n ABiasday := 0;\r\n {$IFDEF FMXLIB}\r\n lTimeZone := TTimeZone.Local;\r\n ABias := Round(LTimeZone.GetUtcOffset(Now).Negate.TotalMilliseconds);\r\n {$ELSE}\r\n ABias := -Tzseconds div 3600;\r\n {$ENDIF}\r\n {$ENDIF}\r\n {$IFDEF WEBLIB}\r\n asm\r\n Date.prototype.stdTimezoneOffset = function () {\r\n var jan = new Date(this.getFullYear(), 0, 1);\r\n var jul = new Date(this.getFullYear(), 6, 1);\r\n return Math.max(jan.getTimezoneOffset(), jul.getTimezoneOffset());\r\n }\r\n\r\n Date.prototype.isDstObserved = function () {\r\n return this.getTimezoneOffset() < this.stdTimezoneOffset();\r\n }\r\n var dt = new Date();\r\n bias = dt.getTimezoneOffset();\r\n biasday = dt.stdTimezoneOffset();\r\n isDaylight = dt.isDstObserved();\r\n end;\r\n\r\n ABias := bias;\r\n ABiasDay := biasday;\r\n AIsDaylight := isDaylight;\r\n {$ENDIF}\r\nend;\r\n\r\nclass function TTMSFNCUtils.DateTimeToMilliSeconds(const ADateTime: TDateTime): Int64;\r\nvar\r\n bias: Integer;\r\n biasday: Integer;\r\n isDayLight: Boolean;\r\nconst\r\n UnixStartDate: TDateTime = 25569;\r\nbegin\r\n bias := 0;\r\n biasday := 0;\r\n isDayLight := False;\r\n GetTimeZoneInfo(ADateTime, bias, biasday, isDayLight);\r\n\r\n if isDayLight then\r\n Result := MilliSecondsBetween(IncHour(ADateTime, (bias + biasday) div 60), UnixStartDate)\r\n else\r\n Result := MilliSecondsBetween(IncHour(ADateTime, bias div 60), UnixStartDate)\r\nend;\r\n\r\nclass function TTMSFNCUtils.DateTimeToUTC(const ADateTime: TDateTime): string;\r\nvar\r\n da,mo,ye,ho,mi,se,ms:word;\r\n bias: Integer;\r\n biasday: Integer;\r\n isDayLight: Boolean;\r\n\r\n function IntToZStr(i,l: Integer):string;\r\n var\r\n Res: string;\r\n begin\r\n Res := IntToStr(i);\r\n while Length(Res) 0 then\r\n begin\r\n if Bias <= 0 then\r\n Result := Result + '+' + IntToZStr((-bias) div 60,2) + ':00'\r\n else\r\n Result := Result + '-' + IntToZStr((bias) div 60,2) + ':00';\r\n end\r\n else\r\n Result := Result + '+00:00';\r\n end;\r\nend;\r\n\r\nclass function TTMSFNCUtils.ISOToDate(const AISOString: string): TDate;\r\nvar\r\n da,mo,ye: Word;\r\n err: Integer;\r\n s: string;\r\nbegin\r\n s := AISOString;\r\n Val(Copy(s,1,4),ye,err);\r\n Val(Copy(s,6,2),mo,err);\r\n Val(Copy(s,9,2),da,err);\r\n\r\n if ye < 1 then\r\n ye := 1;\r\n if mo < 1 then\r\n mo := 1;\r\n if da < 1 then\r\n da := 1;\r\n\r\n Result := EncodeDate(ye,mo,da) + EncodeTime(0,0,0,0);\r\nend;\r\n\r\n{$HINTS OFF}\r\nclass function TTMSFNCUtils.ISOToDateTime(const AISOString: string; AIsUTC: Boolean): TDateTime;\r\nconst\r\n STimePrefix: Char = 'T';\r\nvar\r\n TimeString, DateString: string;\r\n TimePosition, SignPosition: Integer;\r\n da,mo,ye,ho,mi,se: Word;\r\n HourOffset, MinuteOffset: Integer;\r\n err: Integer;\r\n sign: string;\r\n s: string;\r\n dt, dtt: TDateTime;\r\n\r\n function AdjustDateTime(const ADate: TDateTime; AHourOffset, AMinuteOffset:Integer): TDateTime;\r\n var\r\n AdjustDT: TDateTime;\r\n BiasLocal: Int64;\r\n BiasTime: Int64;\r\n BiasHour: Integer;\r\n BiasMins: Integer;\r\n BiasDT: TDateTime;\r\n {$IFNDEF LCLWEBLIB}\r\n TZ: TTimeZone;\r\n {$ENDIF}\r\n {$IFDEF LCLLIB}\r\n {$IFDEF MSWINDOWS}\r\n TZ: TTimeZoneInformation;\r\n {$ENDIF}\r\n {$ENDIF}\r\n begin\r\n Result := ADate;\r\n if AIsUTC then\r\n begin\r\n { If we have an offset, adjust time to go back to UTC }\r\n if (AHourOffset <> 0) or (AMinuteOffset <> 0) then\r\n begin\r\n AdjustDT := EncodeTime(Abs(AHourOffset), Abs(AMinuteOffset), 0, 0);\r\n if ((AHourOffset * MinsPerHour) + AMinuteOffset) > 0 then\r\n Result := Result - AdjustDT\r\n else\r\n Result := Result + AdjustDT;\r\n end;\r\n end\r\n else\r\n begin\r\n {$IFNDEF LCLWEBLIB}\r\n TZ := TTimeZone.Local;\r\n BiasLocal := Trunc(TZ.GetUTCOffset(Result).Negate.TotalMinutes);\r\n {$ENDIF}\r\n {$IFDEF LCLLIB}\r\n {$IFDEF MSWINDOWS}\r\n GetTimeZoneInformation(TZ);\r\n BiasLocal := TZ.Bias;\r\n {$ENDIF}\r\n {$IFDEF UNIX}\r\n BiasLocal := -Tzseconds div 60;\r\n {$ENDIF}\r\n {$ENDIF}\r\n {$IFDEF WEBLIB}\r\n asm\r\n var dt = new Date();\r\n BiasLocal = dt.getTimezoneOffset();\r\n end;\r\n {$ENDIF}\r\n\r\n BiasTime := (AHourOffset * MinsPerHour) + AMinuteOffset;\r\n if (BiasLocal + BiasTime) = 0 then\r\n Exit;\r\n\r\n BiasLocal := BiasLocal + BiasTime;\r\n BiasHour := Abs(BiasLocal) div MinsPerHour;\r\n BiasMins := Abs(BiasLocal) mod MinsPerHour;\r\n BiasDT := EncodeTime(BiasHour, BiasMins, 0, 0);\r\n if (BiasLocal > 0) then\r\n Result := Result - BiasDT\r\n else\r\n Result := Result + BiasDT;\r\n end;\r\n end;\r\nbegin\r\n Result := 0;\r\n\r\n s := AISOString;\r\n\r\n HourOffset := 0;\r\n MinuteOffset := 0;\r\n TimePosition := Pos(STimePrefix, s);\r\n if TimePosition >= 0 then\r\n begin\r\n DateString := Copy(s, 0, TimePosition);\r\n TimeString := Copy(s, TimePosition + 1, Length(s));\r\n end;\r\n\r\n Val(Copy(s,1,4),ye,err);\r\n if err > 0 then\r\n Exit;\r\n\r\n Val(Copy(s,6,2),mo,err);\r\n if err > 0 then\r\n Exit;\r\n\r\n Val(Copy(s,9,2),da,err);\r\n if err > 0 then\r\n Exit;\r\n\r\n Val(Copy(s,12,2),ho,err);\r\n if err > 0 then\r\n Exit;\r\n\r\n Val(Copy(s,15,2),mi,err);\r\n if err > 0 then\r\n Exit;\r\n\r\n Val(Copy(s,18,2),se,err);\r\n if err > 0 then\r\n Exit;\r\n\r\n if ye < 1 then\r\n ye := 1;\r\n if mo < 1 then\r\n mo := 1;\r\n if da < 1 then\r\n da := 1;\r\n\r\n //Get TimeOffset from Iso string\r\n if Pos('.', s) > 0 then\r\n SignPosition := 24\r\n else\r\n SignPosition := 20;\r\n\r\n if Length(s) > SignPosition then\r\n begin\r\n sign := Copy(s,SignPosition,1);\r\n\r\n if (sign = '-') or (sign = '+') then\r\n begin\r\n Val(Copy(s,SignPosition + 1,2), HourOffset, err);\r\n if err > 0 then\r\n Exit;\r\n\r\n Val(Copy(s,SignPosition + 4,2), MinuteOffset, err);\r\n if err > 0 then\r\n Exit;\r\n\r\n if sign = '-' then\r\n begin\r\n HourOffset := HourOffset * -1;\r\n MinuteOffset := MinuteOffset * -1;\r\n end;\r\n end;\r\n end;\r\n\r\n if TryEncodeDate(ye, mo, da, dt) and TryEncodeTime(ho, mi, se, 0, dtt) then\r\n begin\r\n Result := dt + dtt;\r\n Result := AdjustDateTime(Result, HourOffset, MinuteOffset);\r\n end;\r\nend;\r\n{$HINTS ON}\r\n\r\nclass function TTMSFNCUtils.DateToISO(const ADate: TDate; AAddDelimiters: Boolean = False): string;\r\nvar\r\n da, mo, ye: Word;\r\n dd: string;\r\n\r\n function IntToZStr(i, l: Integer): string;\r\n var\r\n Res: string;\r\n begin\r\n Res := IntToStr(i);\r\n while Length(Res) < l do\r\n Res := '0' + Res;\r\n\r\n Result := Res;\r\n end;\r\nbegin\r\n if AAddDelimiters then\r\n dd := '-';\r\n\r\n DecodeDate(ADate, ye, mo, da);\r\n\r\n Result := IntToZStr(ye,4) + dd + IntToZStr(mo,2) + dd + IntToZStr(da,2);;\r\nend;\r\n\r\nclass function TTMSFNCUtils.DateTimeToISO(const ADateTime: TDateTime; AAddDelimiters: Boolean = False; AAddMilliSeconds: Boolean = False): string;\r\nvar\r\n da, mo, ye, ho, mi, se, ms: Word;\r\n dd, td, msec: string;\r\n\r\n function IntToZStr(i, l: Integer): string;\r\n var\r\n Res: string;\r\n begin\r\n Res := IntToStr(i);\r\n while Length(Res) < l do\r\n Res := '0' + Res;\r\n\r\n Result := Res;\r\n end;\r\nbegin\r\n if AAddDelimiters then\r\n begin\r\n dd := '-';\r\n td := ':';\r\n end;\r\n\r\n DecodeDate(ADateTime, ye, mo, da);\r\n DecodeTime(ADateTime, ho, mi, se, ms);\r\n\r\n if AAddMilliSeconds then\r\n msec := '.' + IntToZStr(ms, 3) + 'Z';\r\n\r\n Result := IntToZStr(ye,4) + dd + IntToZStr(mo,2) + dd + IntToZStr(da,2) + 'T' +\r\n IntToZStr(ho,2) + td + IntToZStr(mi,2) + td + IntToZStr(se,2) + msec;\r\nend;\r\n{$ENDIF}\r\n\r\n\r\nclass function TTMSFNCUtils.GetBestDelimiter(ALine1, Aline2: string; ACheckDecimalSeperator: Boolean = True): Char;\r\nconst\r\n CSVSeparators: array[1..10] of char = (',',';','#',#9,'|','@','*','-','+','&');\r\nvar\r\n I: Integer;\r\n parts1, parts2: Integer;\r\n maxParts, maxBackup: integer;\r\n Del, DelBackup, SplitChar: char;\r\n s: TStringList;\r\nbegin\r\n Del := #0;\r\n DelBackup := ',';\r\n parts2 := -1;\r\n maxParts := 0;\r\n maxBackup := 0;\r\n\r\n for I := 1 to Length(CSVSeparators) do\r\n begin\r\n SplitChar := CSVSeparators[I];\r\n s := TStringList.Create;\r\n try\r\n TTMSFNCUtils.Split(SplitChar, ALine1, s);\r\n parts1 := s.Count;\r\n\r\n if (Aline2 <> '') then\r\n begin\r\n TTMSFNCUtils.Split(SplitChar, ALine2, s);\r\n parts2 := s.Count;\r\n end;\r\n if not ACheckDecimalSeperator or (SplitChar <> FormatSettings.DecimalSeparator) then\r\n begin\r\n if (parts2 > 0) and (parts1 = parts2) then\r\n begin\r\n if (parts1 > maxParts) then\r\n begin\r\n Del := SplitChar;\r\n maxParts := parts1;\r\n end;\r\n end\r\n else\r\n begin\r\n if (parts1 > maxBackup) then\r\n begin\r\n DelBackup := SplitChar;\r\n maxBackup := parts1;\r\n end;\r\n end;\r\n end;\r\n finally\r\n s.Free;\r\n end;\r\n end;\r\n\r\n if Del <> #0 then\r\n Result := Del\r\n else\r\n Result := DelBackup;\r\nend;\r\n\r\nclass function TTMSFNCUtils.DownloadImage(AURL: string): TMemoryStream;\r\n{$IFDEF LCLLIB}\r\nbegin\r\n try\r\n Result := TMemoryStream.Create;\r\n TFPHTTPClient.SimpleGet(AURL, Result);\r\n finally\r\n end;\r\n{$ENDIF}\r\n{$IFNDEF LCLLIB}\r\n{$IFDEF MACOS}\r\nvar\r\n req: NSMutableURLRequest;\r\n nurl: NSURL;\r\n res: Pointer;\r\n resdata: NSData;\r\nbegin\r\n Result := TMemoryStream.Create;\r\n try\r\n nurl := TNSURL.Wrap(TNSURL.OCClass.URLWithString(TTMSFNCUtils.NSStrEx(AURL)));\r\n req := TNSMutableURLRequest.Wrap(TNSMutableURLRequest.OCClass.requestWithURL(nurl, NSURLRequestUseProtocolCachePolicy, 60.0));\r\n req.setHTTPMethod(TTMSFNCUtils.NSStrEx('GET'));\r\n\r\n res := nil;\r\n resdata := TNSURLConnection.OCClass.sendSynchronousRequest(req, @res, nil);\r\n if Assigned(resdata) and Assigned(res) then\r\n begin\r\n if not UTF8ToString(TNSString.Wrap(TNSHTTPURLResponse.Wrap(res).allHeaderFields.valueForKey(TTMSFNCUtils.NSStrEx('Content-Type'))).UTF8String).StartsWith('image/') then\r\n Exit;\r\n\r\n {$HINTS OFF}\r\n {$IF COMPILERVERSION > 31}\r\n Result.Write(resdata.bytes^, resdata.length);\r\n {$ELSE}\r\n Result.Write(resdata.bytes, resdata.length);\r\n {$IFEND}\r\n {$HINTS ON}\r\n end;\r\n finally\r\n end;\r\n{$ELSE}\r\n{$IFDEF ANDROID}\r\n var\r\n urlCon: JHttpURLConnection;\r\n u: JURL;\r\n r: Integer;\r\n data: TJavaArray;\r\n bs: JByteArrayOutputStream;\r\n ip: JInputStream;\r\n begin\r\n Result := TMemoryStream.Create;\r\n try\r\n u := TJURL.JavaClass.init(StringToJString(AURL));\r\n urlCon := TJHttpURLConnection.Wrap((u.openConnection as ILocalObject).GetObjectID);\r\n urlCon.setDoInput(True);\r\n urlCon.setDoOutput(False);\r\n urlCon.setRequestMethod(StringToJString('GET'));\r\n\r\n if not urlCon.getHeaderField(StringToJString('Content-Type')).startsWith(StringToJString('image/')) then\r\n Exit;\r\n\r\n if (urlCon.getResponseCode in [200, 201]) then\r\n begin\r\n bs := TJByteArrayOutputStream.JavaClass.init;\r\n ip := urlCon.getInputStream;\r\n r := ip.read();\r\n while r <> -1 do\r\n begin\r\n bs.write(r);\r\n r := ip.read();\r\n end;\r\n\r\n data := bs.toByteArray;\r\n Result := TMemoryStream.Create;\r\n Result.WriteBuffer(data.Data^, bs.size);\r\n bs.close;\r\n end;\r\n finally\r\n end;\r\n{$ELSE}\r\n{$IFDEF LINUX}\r\n{$IFDEF FMXLIB}\r\nvar\r\n r: PCURL;\r\n{$ENDIF}\r\nbegin\r\n {$IFDEF FMXLIB}\r\n FDownloadStream := TMemoryStream.Create;\r\n Result := FDownloadStream;\r\n curl_global_init(CURL_GLOBAL_DEFAULT);\r\n r := curl_easy_init;\r\n\r\n curl_easy_setopt(r, CURLOPT_CERTINFO, 1);\r\n curl_easy_setopt(r, CURLOPT_TCP_KEEPALIVE, 1);\r\n curl_easy_setopt(r, CURLOPT_NOPROGRESS, 1);\r\n curl_easy_setopt(r, CURLOPT_CONNECTTIMEOUT_MS, LongInt(60000));\r\n curl_easy_setopt(r, CURLOPT_TIMEOUT_MS, LongInt(120000));\r\n curl_easy_setopt(r, CURLOPT_WRITEFUNCTION, @CurlReadData);\r\n curl_easy_setopt(r, CURLOPT_WRITEDATA, Self);\r\n\r\n curl_easy_setopt(r, CURLOPT_URL, UTF8String(AURL));\r\n\r\n curl_easy_setopt(r, CURLOPT_CUSTOMREQUEST, PUTF8Char(UTF8String('GET')));\r\n\r\n curl_easy_perform(r);\r\n\r\n curl_easy_cleanup(r);\r\n\r\n curl_global_cleanup;\r\n {$ELSE}\r\n Result := TMemoryStream.Create;\r\n {$ENDIF}\r\n{$ELSE}\r\n{$IFNDEF WEBLIB}\r\nvar\r\n UrlHandle: HINTERNET;\r\n Buffer: array[0..1024] of AnsiChar;\r\n BytesRead: DWORD;\r\n lpdwlen,lpdwidx,lpdword: DWORD;\r\n cbuf: array[0..255] of char;\r\n p: Pointer;\r\nbegin\r\n Result := TMemoryStream.Create;\r\n\r\n p := InternetOpen('TTMSFNCUtils', INTERNET_OPEN_TYPE_PRECONFIG, nil, nil, 0);\r\n\r\n if Assigned(p) then\r\n begin\r\n UrlHandle := InternetOpenUrl(p, PChar(AURL), nil, 0, INTERNET_FLAG_PRAGMA_NOCACHE or INTERNET_FLAG_NO_CACHE_WRITE or INTERNET_FLAG_RELOAD, 0);\r\n\r\n if Assigned(UrlHandle) then\r\n begin\r\n lpdwlen := SizeOf(cbuf);\r\n lpdwidx := 0;\r\n HttpQueryInfo(UrlHandle, HTTP_QUERY_CONTENT_TYPE,@cbuf,lpdwlen,lpdwidx);\r\n\r\n if Pos('IMAGE',UpperCase(StrPas(cbuf))) = 0 then\r\n begin\r\n InternetCloseHandle(UrlHandle);\r\n Exit;\r\n end;\r\n\r\n lpdword := 0;\r\n lpdwlen := 4;\r\n lpdwidx := 0;\r\n\r\n HttpQueryInfo(URLHandle,HTTP_QUERY_CONTENT_LENGTH,@lpdword,lpdwlen,lpdwidx);\r\n\r\n try\r\n FillChar(Buffer, SizeOf(Buffer), 0);\r\n repeat\r\n FillChar(Buffer, SizeOf(Buffer), 0);\r\n InternetReadFile(UrlHandle, @Buffer, SizeOf(Buffer), BytesRead);\r\n Result.Write(buffer, bytesread);\r\n until BytesRead = 0;\r\n finally\r\n end;\r\n InternetCloseHandle(UrlHandle);\r\n end\r\n else\r\n raise Exception.CreateFmt('Cannot open URL %s', [AUrl]);\r\n end\r\n else\r\n raise Exception.Create('Unable to initialize Wininet');\r\n{$ENDIF}\r\n{$IFDEF WEBLIB}\r\nbegin\r\n Result := nil;\r\n{$ENDIF}\r\n{$ENDIF}\r\n{$ENDIF}\r\n{$ENDIF}\r\n{$ENDIF}\r\nend;\r\n\r\n{$HINTS OFF}\r\n{$WARNINGS OFF}\r\n{$IFDEF LCLLIB}\r\n{$IF FPC_FULLVERSION = 30200}\r\ngeneric class function TTMSFNCUtils.IfElse(ACondition: Boolean; AResultTRUE,\r\n AResultFALSE: T): T;\r\nbegin\r\n if ACondition then\r\n Result := AResultTRUE\r\n else\r\n Result := AResultFALSE;\r\nend;\r\n{$IFEND}\r\n{$ENDIF}\r\n{$HINTS ON}\r\n{$WARNINGS ON}\r\n\r\n{$IFNDEF LCLLIB}\r\nclass function TTMSFNCUtils.IfElse(ACondition: Boolean; AResultTRUE,\r\n AResultFALSE: T): T;\r\nbegin\r\n if ACondition then\r\n Result := AResultTRUE\r\n else\r\n Result := AResultFALSE;\r\nend;\r\n{$ENDIF}\r\n\r\nclass function TTMSFNCUtils.IndexOfTextInArray(const AText: string; const AValues: array of string): Integer;\r\nvar\r\n I: Integer;\r\nbegin\r\n Result := -1;\r\n for I := Low(AValues) to High(AValues) do\r\n if SameText(AText, AValues[I]) then\r\n begin\r\n if (pos('cute', AText) > 0) or (pos('grave', AText) > 0) or (pos('uml', AText) > 0) or (pos('circ', AText) > 0) or (pos('tilde', AText) > 0) or (pos('ring', AText) > 0) or (pos('cedil', AText) > 0) then\r\n begin\r\n if (AText = AValues[I]) then\r\n begin\r\n Result := I;\r\n Break;\r\n end;\r\n end\r\n else\r\n begin\r\n Result := I;\r\n Break;\r\n end;\r\n end;\r\nend;\r\n\r\nclass function TTMSFNCUtils.GetMarkupIndex(const Markup: string): integer;\r\nbegin\r\n Result := IndexOfTextInArray(Markup, HTMLSpecialChar);\r\nend;\r\n\r\nclass function TTMSFNCUtils.GetSpecialChar(const Value: integer): UnicodeString;\r\nbegin\r\n Result := HTMLEncodedChar[Value];\r\nend;\r\n\r\nclass function TTMSFNCUtils.GetStrIdx(AValue: string; AArray: array of string; ACaseSensitive: Boolean; AExpression: Boolean = True): Integer;\r\nvar\r\n I: Integer;\r\nbegin\r\n Result := -1;\r\n for I := Low(AArray) to High(AArray) do\r\n begin\r\n if not AExpression then\r\n begin\r\n if (ACaseSensitive and (AValue = AArray[I])) or ((ACaseSensitive = False) and (UpperCase(AValue) = UpperCase(AArray[I]))) then\r\n begin\r\n Result := I;\r\n Break;\r\n end;\r\n end\r\n else if MatchStr(AValue, AArray[I], ACaseSensitive) then\r\n begin\r\n Result := I;\r\n Break;\r\n end;\r\n end;\r\nend;\r\n\r\nclass function TTMSFNCUtils.UnFixMarkup(su:string;SpecialChars: boolean = true; SpecialCharsOnly: Boolean = False):string;\r\nvar\r\n i: integer;\r\nbegin\r\n if not SpecialCharsOnly then\r\n begin\r\n while Pos('<',su) > 0 do\r\n begin\r\n TagReplacestring('<','<',su);\r\n end;\r\n\r\n while Pos('>',su) > 0 do\r\n begin\r\n TagReplacestring('>','>',su);\r\n end;\r\n\r\n while Pos('&',su) > 0 do\r\n begin\r\n TagReplacestring('&','&',su);\r\n end;\r\n\r\n while Pos('"',su) > 0 do\r\n begin\r\n TagReplacestring('"','\"',su);\r\n end;\r\n end;\r\n\r\n if SpecialChars then\r\n begin\r\n for i := 4 to HTMLNumSpecialChar do\r\n begin\r\n while Pos(string(HTMLSpecialChar[i]),su) > 0 do\r\n begin\r\n TagReplacestring(string(HTMLSpecialChar[i]),string(HTMLEncodedChar[i]),su);\r\n end;\r\n end;\r\n end;\r\n\r\n Result := su;\r\nend;\r\n\r\nclass function TTMSFNCUtils.FixMarkup(su:string;SpecialChars: boolean = true): string;\r\nvar\r\n i: integer;\r\n res: string;\r\n {$IFNDEF LCLLIB}\r\n ch: char;\r\n {$ENDIF}\r\n {$IFDEF LCLLIB}\r\n ch: PChar;\r\n unicode: cardinal;\r\n {$ENDIF}\r\n\r\n {$IFDEF LCLLIB}\r\n function UTF8CodepointToUnicode(p: PChar; out CodepointLen: integer): Cardinal;\r\n { if p=nil then CodepointLen=0 otherwise CodepointLen>0\r\n If there is an encoding error the Result is 0 and CodepointLen=1.\r\n Use UTF8FixBroken to fix UTF-8 encoding.\r\n It does not check if the codepoint is defined in the Unicode tables.\r\n }\r\n begin\r\n if p<>nil then begin\r\n if ord(p^)<%11000000 then begin\r\n // regular single byte character (#0 is a normal char, this is pascal ;)\r\n Result:=ord(p^);\r\n CodepointLen:=1;\r\n end\r\n else if ((ord(p^) and %11100000) = %11000000) then begin\r\n // starts with %110 => could be double byte character\r\n if (ord(p[1]) and %11000000) = %10000000 then begin\r\n CodepointLen:=2;\r\n Result:=((ord(p^) and %00011111) shl 6) or (ord(p[1]) and %00111111);\r\n if Result<(1 shl 7) then begin\r\n // wrong encoded, could be an XSS attack\r\n Result:=0;\r\n end;\r\n end else begin\r\n Result:=ord(p^);\r\n CodepointLen:=1;\r\n end;\r\n end\r\n else if ((ord(p^) and %11110000) = %11100000) then begin\r\n // starts with %1110 => could be triple byte character\r\n if ((ord(p[1]) and %11000000) = %10000000)\r\n and ((ord(p[2]) and %11000000) = %10000000) then begin\r\n CodepointLen:=3;\r\n Result:=((ord(p^) and %00011111) shl 12)\r\n or ((ord(p[1]) and %00111111) shl 6)\r\n or (ord(p[2]) and %00111111);\r\n if Result<(1 shl 11) then begin\r\n // wrong encoded, could be an XSS attack\r\n Result:=0;\r\n end;\r\n end else begin\r\n Result:=ord(p^);\r\n CodepointLen:=1;\r\n end;\r\n end\r\n else if ((ord(p^) and %11111000) = %11110000) then begin\r\n // starts with %11110 => could be 4 byte character\r\n if ((ord(p[1]) and %11000000) = %10000000)\r\n and ((ord(p[2]) and %11000000) = %10000000)\r\n and ((ord(p[3]) and %11000000) = %10000000) then begin\r\n CodepointLen:=4;\r\n Result:=((ord(p^) and %00001111) shl 18)\r\n or ((ord(p[1]) and %00111111) shl 12)\r\n or ((ord(p[2]) and %00111111) shl 6)\r\n or (ord(p[3]) and %00111111);\r\n if Result<(1 shl 16) then begin\r\n // wrong encoded, could be an XSS attack\r\n Result:=0;\r\n end;\r\n end else begin\r\n Result:=ord(p^);\r\n CodepointLen:=1;\r\n end;\r\n end\r\n else begin\r\n // invalid character\r\n Result:=ord(p^);\r\n CodepointLen:=1;\r\n end;\r\n end else begin\r\n Result:=0;\r\n CodepointLen:=0;\r\n end;\r\n end;\r\n\r\n {$ENDIF}\r\nbegin\r\n while Pos('&',su) > 0 do\r\n begin\r\n TagReplacestring('&','*amp;',su);\r\n end;\r\n\r\n while Pos('*amp;',su) > 0 do\r\n begin\r\n TagReplacestring('*amp;','&',su);\r\n end;\r\n\r\n while Pos('\"',su) > 0 do\r\n begin\r\n TagReplacestring('\"','"',su);\r\n end;\r\n\r\n while Pos('<',su) > 0 do\r\n begin\r\n TagReplacestring('<','<',su);\r\n end;\r\n\r\n while Pos('>',su) > 0 do\r\n begin\r\n TagReplacestring('>','>',su);\r\n end;\r\n\r\n if SpecialChars then\r\n begin\r\n for i := 4 to HTMLNumSpecialChar do\r\n begin\r\n while Pos(string(HTMLEncodedChar[i]),su) > 0 do\r\n begin\r\n TagReplacestring(string(HTMLEncodedChar[i]),string(HTMLSpecialChar[i]),su);\r\n end;\r\n end;\r\n\r\n res := '';\r\n\r\n {$IFDEF LCLLIB}\r\n ch := PChar(su);\r\n repeat\r\n unicode := UTF8CodepointToUnicode(ch,i);\r\n\r\n if unicode > 256 then\r\n res := res + '&#' + IntToStr(unicode)+ ';'\r\n else\r\n if unicode > 0 then\r\n res := res + Chr(unicode);\r\n\r\n inc(ch,i);\r\n until (i = 0) or (unicode = 0);\r\n {$ENDIF}\r\n\r\n {$IFNDEF LCLLIB}\r\n for i := 1 to Length(su) do\r\n begin\r\n ch := CharInStr(su, i);\r\n if ord(ch) > 256 then\r\n res := res + '&#'+IntToStr(ord(ch))+';'\r\n else\r\n res := res + ch;\r\n end;\r\n {$ENDIF}\r\n\r\n su := res;\r\n end;\r\n\r\n Result := su;\r\nend;\r\n\r\n{$IFNDEF WEBLIB}\r\nclass function TTMSFNCUtils.GetImageType(ABitmap: TTMSFNCBitmap; AResetPosition: Boolean = True): string;\r\nvar\r\n ms: TMemoryStream;\r\nbegin\r\n ms := TMemoryStream.Create;\r\n try\r\n ABitmap.SaveToStream(ms);\r\n Result := TTMSFNCUtils.GetImageType(ms);\r\n finally\r\n ms.Free;\r\n end;\r\nend;\r\n{$ENDIF}\r\n\r\nclass function TTMSFNCUtils.GetImageType(AData: TStream; AResetPosition: Boolean = True): string;\r\n{$IFDEF WEBLIB}\r\nbegin\r\n Result := '';\r\n raise Exception.Create('Implement GetImageType');\r\n{$ENDIF}\r\n{$IFNDEF WEBLIB}\r\nvar\r\n LBuffer : array[0..4] of byte;\r\n I: Integer;\r\n LOldPos: Int64;\r\n\r\ntype\r\n TImageData = record\r\n DataType: String;\r\n Length: Integer;\r\n Header: array[0..3] of Byte;\r\n end;\r\nconst\r\n MaxImageDataLength = 4;\r\n ImageData: array[0..13] of TImageData = (\r\n (DataType: '.gif'; Length: 3; Header: (71,73,70,0)),\r\n (DataType: '.bmp'; Length: 2; Header: (66,77,0,0)),\r\n (DataType: '.png'; Length: 4; Header: (137,80,78,71)),\r\n (DataType: '.tiff'; Length: 3; Header: (73,73,42,0)),\r\n (DataType: '.tiff'; Length: 3; Header: (77,77,42,0)),\r\n (DataType: '.jpg'; Length: 4; Header: (255,216,255,229)),\r\n (DataType: '.jpg'; Length: 4; Header: (255,216,255,224)),\r\n (DataType: '.jpg'; Length: 4; Header: (255,216,255,225)),\r\n (DataType: '.jpg'; Length: 4; Header: (255,216,255,226)),\r\n (DataType: '.jpg'; Length: 4; Header: (255,216,255,219)),\r\n (DataType: '.psd'; Length: 4; Header: (56, 66, 80, 83)),\r\n (DataType: '.webp'; Length: 4; Header: (82, 73, 70, 70)),\r\n (DataType: '.unknown'; Length: 4; Header: (0,0,1,0)),\r\n (DataType: '.empty'; Length: 4; Header: (0,0,0,0))\r\n );\r\nbegin\r\n Result := '';\r\n LOldPos := AData.Position;\r\n try\r\n if AResetPosition then\r\n AData.Position := 0;\r\n\r\n if AData.Read(LBuffer[0], MaxImageDataLength) = MaxImageDataLength then\r\n begin\r\n for I := Low(ImageData) to High(ImageData) do\r\n begin\r\n if (CompareMem(@ImageData[I].Header[0], @LBuffer[0], ImageData[i].Length) ) then\r\n begin\r\n Result := ImageData[I].DataType;\r\n break;\r\n end;\r\n end;\r\n end;\r\n finally\r\n AData.Position := LOldPos;\r\n end;\r\n {$ENDIF}\r\nend;\r\n\r\nclass function TTMSFNCUtils.FormatBytesAsString(ASize: Extended): String;\r\nconst\r\n Measure: Array[0..4] of String = ('Bytes', 'KB', 'MB', 'GB', 'TB');\r\nvar\r\n NewSize: Extended;\r\n i: Integer;\r\nbegin\r\n Result := '';\r\n\r\n if ASize > -1 then\r\n begin\r\n i := 0;\r\n NewSize := ASize;\r\n\r\n while (NewSize >= 1024) do\r\n begin\r\n NewSize := NewSize / 1024;\r\n Inc(i);\r\n end;\r\n\r\n case i of\r\n 0: Result := FloatToStr(NewSize);\r\n 1, 2, 3, 4: Result := FormatFloat('0.00', NewSize);\r\n else\r\n Result := FloatToStr(NewSize);\r\n end;\r\n\r\n Result := Result + #32 + Measure[i];\r\n end;\r\nend;\r\n\r\nclass function TTMSFNCUtils.GetOwnerForm(AComponent: TComponent): TCustomForm;\r\nvar\r\n c: TComponent;\r\nbegin\r\n Result := nil;\r\n c := AComponent;\r\n if not Assigned(c) then\r\n Exit;\r\n\r\n if c.Owner is TCustomForm then\r\n Result := c.Owner as TCustomForm\r\n else\r\n Result := GetOwnerForm(c.Owner);\r\nend;\r\n\r\n{$IFDEF FMXLIB}\r\nclass function TTMSFNCUtils.GetParentForm(AControl: TFMXObject): TCustomForm;\r\nvar\r\n c: TFMXObject;\r\n{$ENDIF}\r\n{$IFDEF CMNLIB}\r\nclass function TTMSFNCUtils.GetParentForm(AControl: TControl): TCustomForm;\r\n{$ENDIF}\r\n{$IFDEF WEBLIB}\r\nclass function TTMSFNCUtils.GetParentForm(AControl: TControl): TCustomForm;\r\nvar\r\n c: TControl;\r\n{$ENDIF}\r\nbegin\r\n{$IFDEF FMXLIB}\r\n Result := nil;\r\n c := AControl;\r\n if not Assigned(c) then\r\n Exit;\r\n\r\n if c.Parent is TCustomForm then\r\n Result := c.Parent as TCustomForm\r\n else\r\n Result := GetParentForm(c.Parent);\r\n{$ENDIF}\r\n{$IFDEF CMNLIB}\r\n {$IFDEF VCLLIB}\r\n Result := VCL.Forms.GetParentForm(AControl);\r\n {$ELSE}\r\n Result := Forms.GetParentForm(AControl);\r\n {$ENDIF}\r\n{$ENDIF}\r\n{$IFDEF WEBLIB}\r\n Result := nil;\r\n c := AControl;\r\n if not Assigned(c) then\r\n Exit;\r\n\r\n if c.Parent is TCustomForm then\r\n Result := c.Parent as TCustomForm\r\n else\r\n Result := GetParentForm(c.Parent);\r\n{$ENDIF}\r\nend;\r\n\r\n{$IFDEF VCLLIB}\r\nfunction CalculateDPIScale(Scaled: boolean; AHDC: HDC): single; overload;\r\nvar\r\n FDPI: integer;\r\nbegin\r\n Result:= 1.0;\r\n if Scaled then\r\n begin\r\n if AHDC = 0 then\r\n AHDC:= GetDC(0);\r\n try\r\n FDPI := GetDeviceCaps(AHDC, LOGPIXELSX);\r\n if FDPI <> 96 then\r\n Result:= FDPI / 96;\r\n finally\r\n if AHDC = 0 then\r\n ReleaseDC(0, AHDC);\r\n end;\r\n end;\r\nend;\r\n\r\ntype\r\n TDPIControlProtected = class(TControl);\r\n TDPICustomFormProtected = class(TCustomForm);\r\n\r\nfunction CalculateDPIScale(AForm: TCustomForm; AHDC: HDC; ADefaultDPI: Integer = 0): single; overload;\r\nbegin\r\n Result := 1.0;\r\n if Assigned(AForm) then\r\n begin\r\n {$HINTS OFF}\r\n {$IF COMPILERVERSION >= 31}\r\n if Assigned(AForm) and TDPICustomFormProtected(AForm).Scaled then\r\n begin\r\n if ADefaultDPI > 0 then\r\n Result := TDPICustomFormProtected(AForm).Monitor.PixelsPerInch / ADefaultDPI\r\n else\r\n begin\r\n {$IF COMPILERVERSION > 34}\r\n Result := TDPICustomFormProtected(AForm).Monitor.PixelsPerInch / AForm.PixelsPerInch\r\n {$ELSE}\r\n Result := TDPICustomFormProtected(AForm).Monitor.PixelsPerInch / 96\r\n {$IFEND}\r\n end;\r\n end\r\n else\r\n {$IFEND}\r\n {$HINTS ON}\r\n Result := CalculateDPIScale(TDPICustomFormProtected(AForm).Scaled, AHDC);\r\n end;\r\nend;\r\n{$ENDIF}\r\n\r\nclass function TTMSFNCUtils.CharInStr(s: string; Index: Integer): Char;\r\nbegin\r\n Result := #0;\r\n if (Index > 0) and (Index <= Length(s)) then\r\n begin\r\n {$IFDEF ZEROSTRINGINDEX}\r\n dec(Index);\r\n {$ENDIF}\r\n Result := s[Index]\r\n end;\r\nend;\r\n\r\nclass function TTMSFNCUtils.Clone(AComponent: TComponent): TComponent;\r\n{$IFDEF WEBLIB}\r\nbegin\r\n Result := nil;\r\n raise Exception.Create('Implement Clone');\r\n{$ENDIF}\r\n{$IFNDEF WEBLIB}\r\nvar\r\n S: TStream;\r\n SaveName: string;\r\n Reader: TReader;\r\nbegin\r\n S := TMemoryStream.Create;\r\n try\r\n { store }\r\n SaveName := AComponent.Name;\r\n AComponent.Name := '';\r\n S.WriteComponent(AComponent);\r\n AComponent.Name := SaveName;\r\n S.Position := 0;\r\n { load }\r\n try\r\n Reader := TReader.Create(S, 4096);\r\n try\r\n Result := Reader.ReadRootComponent(nil);\r\n finally\r\n Reader.Free;\r\n end;\r\n finally\r\n end;\r\n finally\r\n S.Free;\r\n end;\r\n{$ENDIF}\r\nend;\r\n\r\nclass function TTMSFNCUtils.GetTempPath: string;\r\nbegin\r\n {$IFDEF WEBLIB}\r\n Result := '';\r\n {$ELSE}\r\n {$IFDEF LCLLIB}\r\n Result := GetTempDir;\r\n {$ELSE}\r\n Result := TPath.GetTempPath;\r\n {$ENDIF}\r\n {$ENDIF}\r\nend;\r\nclass function TTMSFNCUtils.GetAppPath: String;\r\nbegin\r\n {$IFDEF WEBLIB}\r\n Result := 'file://'\r\n {$ENDIF}\r\n {$IFNDEF WEBLIB}\r\n Result := ExtractFilePath(ParamStr(0));\r\n {$ENDIF}\r\nend;\r\n\r\nclass function TTMSFNCUtils.GetDocumentsPath: string;\r\n{$IFDEF VCLLIB}\r\nvar\r\n szBuffer: array [0..MAX_PATH] of Char;\r\n{$ENDIF}\r\nbegin\r\n {$IFDEF FMXLIB}\r\n Result := TPath.GetDocumentsPath;\r\n {$ENDIF}\r\n {$IFDEF LCLLIB}\r\n Result := GetUserDir + PathDelim + 'Documents';\r\n {$ENDIF}\r\n {$IFDEF VCLLIB}\r\n OleCheck(SHGetFolderPath(0, $0005, 0, 0, szBuffer));\r\n Result := szBuffer;\r\n {$ENDIF}\r\n {$IFDEF WEBLIB}\r\n Result := '';\r\n {$ENDIF}\r\nend;\r\n\r\nclass function TTMSFNCUtils.GetMousePos: TPointF;\r\n{$IFDEF FMXLIB}\r\nvar\r\n m: IFMXMouseService;\r\n{$ENDIF}\r\n{$IFDEF WEBLIB}\r\nvar\r\n p: TPoint;\r\n{$ENDIF}\r\nbegin\r\n Result := PointF(-1, -1);\r\n {$IFDEF FMXLIB}\r\n if TPlatformServices.Current.SupportsPlatformService(IFMXMouseService, IInterface(m)) then\r\n Result := m.GetMousePos;\r\n {$ENDIF}\r\n {$IFDEF CMNLIB}\r\n Result := PointF(Mouse.CursorPos.X, Mouse.CursorPos.Y);\r\n {$ENDIF}\r\n {$IFDEF WEBLIB}\r\n p := WEBLib.Controls.GetMousePos;\r\n Result := PointF(p.X, p.Y);\r\n {$ENDIF}\r\nend;\r\n\r\nclass function TTMSFNCUtils.AddForwardslash(const AValue: string): string;\r\nbegin\r\n {$IFDEF ZEROSTRINGINDEX}\r\n if (Length(AValue) >= 1) and (AValue[Length(AValue) - 1] <> '/') then\r\n {$ELSE}\r\n if (Length(AValue) >= 1) and (AValue[Length(AValue)] <> '/') then\r\n {$ENDIF}\r\n Result := AValue + '/'\r\n else\r\n Result := AValue;\r\nend;\r\n\r\nclass function TTMSFNCUtils.AddBackslash(const AValue: string): string;\r\nbegin\r\n {$IFDEF ZEROSTRINGINDEX}\r\n if (Length(AValue) >= 1) and (AValue[Length(AValue) - 1] <> PthDel) then\r\n {$ELSE}\r\n if (Length(AValue) >= 1) and (AValue[Length(AValue)] <> PthDel) then\r\n {$ENDIF}\r\n Result := AValue + PthDel\r\n else\r\n Result := AValue;\r\nend;\r\n\r\nclass procedure TTMSFNCUtils.ScaleForDPI(AControl: TControl; ADPI: Integer);\r\nbegin\r\n {$IFDEF VCLLIB}\r\n {$HINTS OFF}\r\n {$IF COMPILERVERSION >= 33}\r\n if Assigned(AControl) then\r\n AControl.ScaleForPPI(ADPI)\r\n {$IFEND}\r\n {$HINTS ON}\r\n {$ENDIF}\r\nend;\r\n\r\nclass procedure TTMSFNCUtils.ScaleForCurrentDPI(AForm: TCustomForm);\r\n{$IFDEF VCLLIB}\r\n{$HINTS OFF}\r\n{$IF COMPILERVERSION >= 33}\r\nvar\r\n sc: Single;\r\n\r\n procedure ScaleControlsForCurrentDPI(AControl: TControl);\r\n var\r\n I: Integer;\r\n cw: TWinControl;\r\n c: TDPIControlProtected;\r\n begin\r\n if AControl is TWinControl then\r\n begin\r\n cw := (AControl as TWinControl);\r\n for I := 0 to cw.ControlCount - 1 do\r\n ScaleControlsForCurrentDPI(cw.Controls[I]);\r\n end;\r\n\r\n if (AControl is TControl) and not (AControl is TCustomForm) then\r\n begin\r\n c := TDPIControlProtected(AControl);\r\n c.Font.Height := TTMSFNCUtils.MulDivInt(c.Font.Height, 96, c.Font.PixelsPerInch);\r\n end;\r\n end;\r\n{$IFEND}\r\n{$HINTS ON}\r\n{$ENDIF}\r\nbegin\r\n if Assigned(AForm) then\r\n begin\r\n {$IFDEF VCLLIB}\r\n {$HINTS OFF}\r\n {$IF COMPILERVERSION >= 33}\r\n ScaleControlsForCurrentDPI(AForm);\r\n TDPICustomFormProtected(AForm).ScaleForCurrentDPI;\r\n if AForm.ClassName = 'TTMSFNCCustomPopupForm' then\r\n Exit;\r\n\r\n sc := TTMSFNCUtils.GetDPIScale(AForm, 96);\r\n AForm.Width := Round(AForm.Width * sc);\r\n AForm.Height := Round(AForm.Height * sc);\r\n {$IFEND}\r\n {$HINTS ON}\r\n {$ENDIF}\r\n end;\r\nend;\r\n\r\nclass function TTMSFNCUtils.GetDPIScale(AOwner: TComponent = nil; ADefaultDPI: Integer = -1): Single;\r\n{$IFDEF FMXLIB}\r\n {$IFDEF MSWINDOWS}\r\n {$HINTS OFF}\r\n {$IF COMPILERVERSION >= 31}\r\nvar\r\n frm: TCustomForm;\r\n {$IFEND}\r\n {$HINTS ON}\r\n {$ELSE}\r\nvar\r\n ScreenSvc: IFMXScreenService;\r\n {$ENDIF}\r\n{$ENDIF}\r\n{$IFDEF VCLLIB}\r\nvar\r\n frm: TCustomform;\r\n{$ENDIF}\r\nbegin\r\n {$IFDEF FMXLIB}\r\n Result := 1.0;\r\n {$IFDEF MSWINDOWS}\r\n {$HINTS OFF}\r\n {$IF COMPILERVERSION >= 31}\r\n if Assigned(AOwner) and (AOwner is TCustomForm) then\r\n Result := WindowHandleToPlatform((AOwner as TCustomForm).Handle).Scale\r\n else if Assigned(AOwner) then\r\n begin\r\n frm := nil;\r\n if AOwner is TControl then\r\n frm := GetParentForm(AOwner as TControl);\r\n\r\n if not Assigned(frm) then\r\n frm := GetOwnerForm(AOwner);\r\n\r\n if Assigned(frm) then\r\n Result := WindowHandleToPlatform(frm.Handle).Scale;\r\n end\r\n else if Assigned(Application.MainForm) then\r\n Result := WindowHandleToPlatform(Application.MainForm.Handle).Scale\r\n {$IFEND}\r\n {$HINTS ON}\r\n {$ELSE}\r\n if TPlatformServices.Current.SupportsPlatformService(IFMXScreenService, IInterface(ScreenSvc)) then\r\n Result := ScreenSvc.GetScreenScale;\r\n {$ENDIF}\r\n {$ENDIF}\r\n {$IFDEF VCLLIB}\r\n Result := 1.0;\r\n if Assigned(AOwner) and (AOwner is TCustomForm) and Assigned((AOwner as TCustomForm).Canvas) then\r\n Result := CalculateDPIScale((AOwner as TCustomForm), (AOwner as TCustomForm).Canvas.Handle, ADefaultDPI)\r\n else if Assigned(AOwner) then\r\n begin\r\n frm := nil;\r\n if AOwner is TControl then\r\n frm := GetParentForm(AOwner as TControl);\r\n\r\n if not Assigned(frm) then\r\n frm := GetOwnerForm(AOwner);\r\n\r\n if Assigned(frm) and Assigned(frm.Canvas) then\r\n Result := CalculateDPIScale(frm, frm.Canvas.Handle, ADefaultDPI);\r\n end\r\n else if Assigned(Application.MainForm) and Assigned(Application.MainForm.Canvas) then\r\n Result := CalculateDPIScale(Application.MainForm, Application.MainForm.Canvas.Handle, ADefaultDPI)\r\n {$ENDIF}\r\n {$IFDEF LCLLIB}\r\n {$IFDEF MSWINDOWS}\r\n Result := Screen.PixelsPerInch / 96;\r\n {$ENDIF}\r\n {$IFDEF DARWIN}\r\n Result := Screen.PixelsPerInch / 72;\r\n {$ENDIF}\r\n {$IFDEF LINUX}\r\n Result := Screen.PixelsPerInch / 96;\r\n {$ENDIF}\r\n {$ENDIF}\r\n {$IFDEF WEBLIB}\r\n Result := 1.0;\r\n {$ENDIF}\r\nend;\r\n\r\nclass function TTMSFNCUtils.IsHighDPIScale({%H-}AOwner: TComponent = nil; ADefaultDPI: Integer = -1): Boolean;\r\nbegin\r\n Result := GetDPIScale(AOwner, ADefaultDPI) > 1;\r\nend;\r\n\r\nclass function TTMSFNCUtils.IsHTMLUnicode(AValue: UnicodeString): Boolean;\r\nbegin\r\n {$IFDEF LCLLIB}\r\n Result := IsHTML(UTF8Encode(AValue));\r\n {$ENDIF}\r\n {$IFNDEF LCLLIB}\r\n Result := IsHTML(AValue);\r\n {$ENDIF}\r\nend;\r\n\r\nclass function TTMSFNCUtils.IsHTML(AValue: string): Boolean;\r\nbegin\r\n Result := (Pos(' 0) or (Pos('/>', AValue) > 0) or (Pos('
', UpperCase(AValue)) > 0);\r\nend;\r\n\r\nclass procedure TTMSFNCUtils.OpenFile(AFile: string; AControlReference: TControl = nil);\r\n{$IFDEF ANDROID}\r\nvar\r\n i: JIntent;\r\n ext: string;\r\n mm: JMimeTypeMap;\r\n f: JFile;\r\n u: Jnet_Uri;\r\n{$ENDIF}\r\n{$IFDEF IOS}\r\nvar\r\n docController: UIDocumentInteractionController;\r\n url: NSURL;\r\n r: NSRect;\r\n vw: UIView;\r\n frm: TCommonCustomForm;\r\n pt: TPointF;\r\n{$ENDIF}\r\nbegin\r\n {$IFDEF FMXLIB}\r\n {$IFDEF LINUX}\r\n FmuxOpenFile(PChar(AFile));\r\n {$ENDIF}\r\n {$IFDEF MACOS}\r\n {$IFDEF IOS}\r\n frm := Application.MainForm;\r\n if Assigned(frm) then\r\n begin\r\n url := TNSURL.Wrap(TNSURL.OCClass.fileURLWithPath(NSStrEx(AFile)));\r\n docController := TUIDocumentInteractionController.Wrap(TUIDocumentInteractionController.OCClass.interactionControllerWithURL(url));\r\n docController.retain;\r\n vw := WindowHandleToPlatform(frm.Handle).View;\r\n if Assigned(AControlReference) then\r\n begin\r\n pt := AControlReference.LocalToAbsolute(AControlReference.Position.Point);\r\n r.origin.x := pt.X;\r\n r.origin.Y := pt.Y;\r\n r.size.Width := AControlReference.Width;\r\n r.size.Height := AControlReference.Height;\r\n end\r\n else\r\n begin\r\n r := vw.frame;\r\n r.origin.x := (r.size.width - 1) / 2;\r\n r.origin.y := (r.size.height - 1) / 2;\r\n r.size.width := 1;\r\n r.size.height := 1;\r\n end;\r\n\r\n docController.presentOpenInMenuFromRect(r, vw, TRUE);\r\n end;\r\n {$ELSE}\r\n TNSWorkspace.Wrap(TNSWorkspace.OCClass.sharedWorkspace).openFile(NSStrEx(AFile));\r\n {$ENDIF}\r\n {$ENDIF}\r\n\r\n {$IFDEF ANDROID}\r\n i := TJIntent.Create;\r\n i.setAction(TJIntent.JavaClass.ACTION_VIEW);\r\n f := TJFile.JavaClass.init(StringToJString(AFile));\r\n\r\n {$HINTS OFF}\r\n {$IF COMPILERVERSION > 33}\r\n u := JFileToJURI(f);\r\n {$ELSE}\r\n u := TJnet_uri.JavaClass.fromFile(f);\r\n {$IFEND}\r\n {$HINTS ON}\r\n\r\n ext := StringReplace(ExtractFileExt(AFile).ToLower, '.', '', []);\r\n mm := TJMimeTypeMap.JavaClass.getSingleton;\r\n\r\n i.setFlags(TJIntent.JavaClass.FLAG_GRANT_READ_URI_PERMISSION);\r\n i.setDataAndType(u, mm.getMimeTypeFromExtension(StringToJString(ext)));\r\n SharedActivityEx.startActivity(i);\r\n {$ENDIF}\r\n {$ENDIF}\r\n\r\n {$IFNDEF LCLLIB}\r\n {$IFDEF MSWINDOWS}\r\n ShellExecute(0,PChar('open'),PChar(AFile),PChar(''),PChar(''), SW_NORMAL);\r\n {$ENDIF}\r\n {$ENDIF}\r\n\r\n {$IFDEF LCLLIB}\r\n OpenDocument(AFile);\r\n {$ENDIF}\r\n\r\n {$IFDEF WEBLIB}\r\n {$IFDEF ELECTRON}\r\n if isElectron then\r\n ElectronShell.OpenItem(AFile);\r\n {$ENDIF}\r\n {$ENDIF}\r\nend;\r\n\r\nclass procedure TTMSFNCUtils.OpenURL(AURL: string);\r\n{$IFDEF ANDROID}\r\nvar\r\n i: JIntent;\r\n{$ENDIF}\r\nbegin\r\n {$IFDEF FMXLIB}\r\n {$IFDEF LINUX}\r\n FmuxOpenUrl(PChar(AURL));\r\n {$ENDIF}\r\n {$IFDEF MACOS}\r\n {$IFDEF IOS}\r\n TUIApplication.Wrap(TUIApplication.OCClass.sharedApplication).openURL(TNSURL.Wrap(TNSURL.OCClass.URLWithString(NSStrEx(AUrl))));\r\n {$ELSE}\r\n TNSWorkspace.Wrap(TNSWorkspace.OCClass.sharedWorkspace).openURL(TNSURL.Wrap(TNSURL.OCClass.URLWithString(NSStrEx(AUrl))));\r\n {$ENDIF}\r\n {$ENDIF}\r\n\r\n {$IFDEF ANDROID}\r\n i := TJIntent.Create;\r\n i.setAction(TJIntent.JavaClass.ACTION_VIEW);\r\n i.setData(StrToJURI(AURL));\r\n SharedActivityEx.startActivity(i);\r\n {$ENDIF}\r\n {$ENDIF}\r\n\r\n {$IFDEF LCLLIB}\r\n LCLIntF.OpenURL(AURL);\r\n {$ENDIF}\r\n\r\n {$IFNDEF LCLLIB}\r\n {$IFDEF MSWINDOWS}\r\n ShellExecute(0,PChar('open'),PChar(AURL),PChar(''),PChar(''), SW_NORMAL);\r\n {$ENDIF}\r\n {$ENDIF}\r\n\r\n {$IFDEF WEBLIB}\r\n {$IFDEF ELECTRON}\r\n if isElectron then\r\n begin\r\n ElectronShell.OpenExternal(AURL);\r\n end\r\n else\r\n {$ENDIF}\r\n begin\r\n asm\r\n window.open(AURL, '_blank');\r\n end;\r\n end;\r\n {$ENDIF}\r\nend;\r\n\r\n{$IFDEF FNCLIB}\r\n{$HINTS OFF}\r\nclass procedure TTMSFNCUtils.PlayAudio(AAudioBase64: string);\r\nvar\r\n {$IFNDEF ANDROID}\r\n {$IFNDEF WEBLIB}\r\n ms: TMemoryStream;\r\n b: TBytes;\r\n {$ENDIF}\r\n {$ENDIF}\r\n {$IFDEF MACOS}\r\n d: NSData;\r\n p: AVAudioPlayer;\r\n {$ENDIF}\r\n {$IFDEF ANDROID}\r\n p: JMediaPlayer;\r\n {$ENDIF}\r\n {$IFDEF WEBLIB}\r\n b64: string;\r\n {$ENDIF}\r\nbegin\r\n {$IFNDEF ANDROID}\r\n {$IFNDEF WEBLIB}\r\n ms := TMemoryStream.Create;\r\n {$ENDIF}\r\n {$ENDIF}\r\n try\r\n {$IFNDEF ANDROID}\r\n {$IFNDEF WEBLIB}\r\n b := Decode64ToBytes(AAudioBase64);\r\n ms.Write(b, Length(b));\r\n ms.Position := 0;\r\n {$ENDIF}\r\n {$ENDIF}\r\n {$IFDEF MSWINDOWS}\r\n sndPlaySound(ms.Memory, SND_NODEFAULT or SND_ASYNC or SND_MEMORY);\r\n {$ENDIF}\r\n {$IFDEF MACOS}\r\n d := TNSData.Wrap(TNSData.OCClass.dataWithBytes(ms.Memory, ms.Size));\r\n p := TAVAudioPlayer.Wrap(TAVAudioPlayer.Wrap(TAVAudioPlayer.OCClass.alloc).initWithData(d, nil));\r\n p.play;\r\n {$ENDIF}\r\n {$IFDEF ANDROID}\r\n p := TJMediaPlayer.JavaClass.init;\r\n p.setDataSource(StringToJString('data:audio/wav;base64,' + AAudioBase64));\r\n p.prepare;\r\n p.start;\r\n {$ENDIF}\r\n {$IFDEF UNIX}\r\n raise Exception.Create('Implement PlayAudio');\r\n {$ENDIF}\r\n {$IFDEF WEBLIB}\r\n b64 := AAudioBase64;\r\n try\r\n asm\r\n var snd = new Audio(\"data:audio/wav;base64,\" + b64);\r\n snd.play();\r\n end;\r\n finally\r\n end;\r\n {$ENDIF}\r\n finally\r\n {$IFNDEF ANDROID}\r\n {$IFNDEF WEBLIB}\r\n ms.Free;\r\n {$ENDIF}\r\n {$ENDIF}\r\n end;\r\nend;\r\n{$HINTS ON}\r\n{$ENDIF}\r\n\r\n{$IFDEF JSONSUPPORT}\r\nclass function TTMSFNCUtils.IsJSON(AJSON: string): Boolean;\r\nvar\r\n v: TJSONValue;\r\nbegin\r\n v := ParseJSON(AJSON);\r\n Result := False;\r\n if Assigned(v) then\r\n begin\r\n Result := True;\r\n v.Free;\r\n end;\r\nend;\r\n\r\nclass function TTMSFNCUtils.ParseJSON(AJSON: string): TJSONValue;\r\nbegin\r\n {$IFDEF LCLLIB}\r\n Result := GetJSON(AJSON);\r\n {$ELSE}\r\n Result := TJSONObject.ParseJSONValue(AJSON);\r\n {$ENDIF}\r\nend;\r\n\r\nclass function TTMSFNCUtils.GetJSONValueAsInteger(AJSONValue: TJSONValue): Integer;\r\nvar\r\n v: TJSONValue;\r\nbegin\r\n Result := 0;\r\n v := AJSONValue;\r\n if Assigned(v) and (v is TJSONNumber) then\r\n begin\r\n {$IFDEF LCLLIB}\r\n Result := (v as TJSONNumber).Value;\r\n {$ELSE}\r\n Result := (v as TJSONNumber).AsInt;\r\n {$ENDIF}\r\n end;\r\nend;\r\n\r\nclass function TTMSFNCUtils.GetJSONValueAsDouble(AJSONValue: TJSONValue): Double;\r\nvar\r\n v: TJSONValue;\r\nbegin\r\n Result := 0;\r\n v := AJSONValue;\r\n if Assigned(v) and (v is TJSONNumber) then\r\n begin\r\n {$IFDEF LCLLIB}\r\n Result := (v as TJSONNumber).AsFloat;\r\n {$ELSE}\r\n Result := (v as TJSONNumber).AsDouble;\r\n {$ENDIF}\r\n end;\r\nend;\r\n\r\nclass function TTMSFNCUtils.GetJSONDoubleValue(AJSONValue: TJSONValue; APropertyName: string): Double;\r\nbegin\r\n Result := GetJSONValueAsDouble(GetJSONValue(AJSONValue, APropertyName))\r\nend;\r\n\r\nclass function TTMSFNCUtils.IsJSONTrue(AJSONValue: TJSONValue): Boolean;\r\nbegin\r\n Result := False;\r\n if Assigned(AJSONValue) then\r\n Result := AJSONValue.Value = 'true';\r\nend;\r\n\r\nclass function TTMSFNCUtils.IsJSONFalse(AJSONValue: TJSONValue): Boolean;\r\nbegin\r\n Result := False;\r\n if Assigned(AJSONValue) then\r\n Result := AJSONValue.Value = 'false';\r\nend;\r\n\r\nclass function TTMSFNCUtils.GetJSONIntegerValue(AJSONValue: TJSONValue; APropertyName: string): Integer;\r\nbegin\r\n Result := GetJSONValueAsInteger(GetJSONValue(AJSONValue, APropertyName))\r\nend;\r\n\r\nclass function TTMSFNCUtils.GetJSONValueAsBoolean(AJSONValue: TJSONValue): Boolean;\r\nbegin\r\n Result := False;\r\n if Assigned(AJSONValue) then\r\n begin\r\n {$IFDEF LCLLIB}\r\n if AJSONValue is TJSONBoolean then\r\n Result := (AJSONValue as TJSONBoolean).Value;\r\n {$ELSE}\r\n Result := (AJSONValue is TJSONTrue);\r\n {$ENDIF}\r\n end;\r\nend;\r\n\r\nclass function TTMSFNCUtils.GetJSONValueAsString(AJSONValue: TJSONValue): string;\r\nbegin\r\n Result := '';\r\n if Assigned(AJSONValue) then\r\n begin\r\n {$IFDEF LCLLIB}\r\n Result := AJSONValue.FormatJSON(AsCompressedJSON);\r\n {$ENDIF}\r\n {$IFNDEF LCLLIB}\r\n Result := AJSONValue.ToString\r\n {$ENDIF}\r\n end;\r\nend;\r\n\r\n{$IFNDEF LCLLIB}\r\n{$HINTS OFF}\r\n{$IF COMPILERVERSION > 26}\r\ntype\r\n TJSONValueOpen = class(TJSONValue);\r\n{$IFEND}\r\n{$HINTS ON}\r\n{$ENDIF}\r\n\r\nclass function TTMSFNCUtils.FindJSONValue(AJSONValue: TJSONValue;\r\n APath: string): TJSONValue;\r\nbegin\r\n Result := nil;\r\n try\r\n if Assigned(AJSONValue) then\r\n begin\r\n {$IFDEF LCLLIB}\r\n Result := AJSONValue.FindPath(APath);\r\n {$ELSE}\r\n {$HINTS OFF}\r\n {$IF COMPILERVERSION > 26}\r\n Result := TJSONValueOpen(AJSONValue).FindValue(APath);\r\n {$ELSE}\r\n Result := GetJSONValue(AJSONValue, APath);\r\n {$IFEND}\r\n {$HINTS ON}\r\n {$ENDIF}\r\n end;\r\n except\r\n end;\r\nend;\r\n\r\nclass function TTMSFNCUtils.GetJSONValue(AJSONValue: TJSONValue;\r\n APropertyName: string): TJSONValue;\r\nbegin\r\n Result := nil;\r\n try\r\n if AJSONValue is TJSONObject then\r\n begin\r\n {$IFDEF LCLLIB}\r\n Result := (AJSONValue as TJSONObject).Find(APropertyName);\r\n {$ELSE}\r\n {$HINTS OFF}\r\n {$IF COMPILERVERSION > 26}\r\n Result := (AJSONValue as TJSONObject).Values[APropertyName];\r\n {$ELSE}\r\n Result := (AJSONValue as TJSONObject).GetValue(APropertyName);\r\n {$IFEND}\r\n {$HINTS ON}\r\n {$ENDIF}\r\n end;\r\n except\r\n end;\r\nend;\r\n\r\nclass function TTMSFNCUtils.GetJSONArraySize(AJSONArray: TJSONArray): Integer;\r\nbegin\r\n {$IFNDEF LCLWEBLIB}\r\n {$HINTS OFF}\r\n {$IF COMPILERVERSION > 26}\r\n Result := AJSONArray.Count;\r\n {$ELSE}\r\n Result := AJSONArray.Size;\r\n {$IFEND}\r\n {$HINTS ON}\r\n {$ELSE}\r\n Result := AJSONArray.Count;\r\n {$ENDIF}\r\nend;\r\n\r\nclass function TTMSFNCUtils.GetJSONArrayItem(AJSONArray: TJSONArray; AIndex: Integer): TJSONValue;\r\nbegin\r\n Result := nil;\r\n if (AIndex >= 0) and (AIndex <= GetJSONArraySize(AJSONArray) - 1) then\r\n begin\r\n {$IFNDEF LCLWEBLIB}\r\n {$HINTS OFF}\r\n {$IF COMPILERVERSION > 26}\r\n Result := AJSONArray.Items[AIndex];\r\n {$ELSE}\r\n Result := AJSONArray.Get(AIndex);\r\n {$IFEND}\r\n {$HINTS ON}\r\n {$ELSE}\r\n Result := AJSONArray.Items[AIndex];\r\n {$ENDIF}\r\n end;\r\nend;\r\n\r\nclass function TTMSFNCUtils.GetJSONObjectSize(AJSONObject: TJSONObject): Integer;\r\nbegin\r\n {$IFNDEF LCLWEBLIB}\r\n {$HINTS OFF}\r\n {$IF COMPILERVERSION > 26}\r\n Result := AJSONObject.Count;\r\n {$ELSE}\r\n Result := AJSONObject.Size;\r\n {$IFEND}\r\n {$HINTS ON}\r\n {$ELSE}\r\n Result := AJSONObject.Count;\r\n {$ENDIF}\r\nend;\r\n\r\nclass function TTMSFNCUtils.GetJSONObjectName(AJSONObject: TJSONObject; AIndex: Integer): string;\r\n{$IFNDEF LCLLIB}\r\nvar\r\n p: TJSONPair;\r\n{$ENDIF}\r\nbegin\r\n Result := '';\r\n if (AIndex >= 0) and (AIndex <= GetJSONObjectSize(AJSONObject) - 1) then\r\n begin\r\n {$IFDEF LCLLIB}\r\n Result := AJSONObject.Names[AIndex];\r\n {$ELSE}\r\n {$IFDEF WEBLIB}\r\n p := AJSONObject.Get(AIndex);\r\n {$ENDIF}\r\n {$IFNDEF WEBLIB}\r\n {$HINTS OFF}\r\n {$IF COMPILERVERSION > 26}\r\n p := AJSONObject.Pairs[AIndex];\r\n {$ELSE}\r\n p := AJSONObject.Get(AIndex);\r\n {$IFEND}\r\n {$HINTS ON}\r\n {$ENDIF}\r\n if Assigned(p) then\r\n Result := p.JsonString.Value;\r\n {$ENDIF}\r\n end;\r\nend;\r\n\r\nclass function TTMSFNCUtils.GetJSONObjectItem(AJSONObject: TJSONObject; AIndex: Integer): TJSONValue;\r\n{$IFNDEF LCLWEBLIB}\r\nvar\r\n p: TJSONPair;\r\n{$ENDIF}\r\nbegin\r\n Result := nil;\r\n if (AIndex >= 0) and (AIndex <= GetJSONObjectSize(AJSONObject) - 1) then\r\n begin\r\n {$IFDEF LCLWEBLIB}\r\n Result := AJSONObject.Items[AIndex];\r\n {$ELSE}\r\n {$HINTS OFF}\r\n {$IF COMPILERVERSION > 26}\r\n p := AJSONObject.Pairs[AIndex];\r\n {$ELSE}\r\n p := AJSONObject.Get(AIndex);\r\n {$IFEND}\r\n {$HINTS ON}\r\n if Assigned(p) then\r\n Result := p.JsonValue;\r\n {$ENDIF}\r\n end;\r\nend;\r\n\r\nclass function TTMSFNCUtils.GetJSONProp(AJSONValue: TJSONValue;\r\n APropertyName: string): string;\r\nvar\r\n v: TJSONValue;\r\nbegin\r\n Result := '';\r\n v := GetJSONValue(AJSONValue, APropertyName);\r\n if Assigned(v) and not (v is TJSONNull) then\r\n Result := v.Value;\r\nend;\r\n{$ENDIF}\r\n\r\nclass function TTMSFNCUtils.GetHInstance: NativeUInt;\r\nbegin\r\n Result := HInstance;\r\nend;\r\n\r\n{$IFDEF WEBLIB}\r\nclass procedure TTMSFNCUtils.GetFonts(FontList: TStringList);\r\nbegin\r\n FontList.BeginUpdate;\r\n FontList.Add('Arial');\r\n FontList.Add('Tahoma');\r\n FontList.Add('SimSun');\r\n FontList.Add('Arial Unicode MS');\r\n FontList.Add('Helvetica');\r\n FontList.Add('Times New Roman');\r\n FontList.Add('Times');\r\n FontList.Add('Courier New');\r\n FontList.Add('Courier');\r\n FontList.Add('Verdana');\r\n FontList.Add('Georgia');\r\n FontList.Add('Palatino');\r\n FontList.Add('Garamond');\r\n FontList.Add('Bookman');\r\n FontList.Add('Comic Sans MS');\r\n FontList.Add('Trebuchet MS');\r\n FontList.Add('Arial Black');\r\n FontList.Add('Impact');\r\n FontList.Add('Roboto');\r\n FontList.Sort;\r\n FontList.EndUpdate;\r\nend;\r\n{$ENDIF}\r\n\r\n{$IFNDEF LCLLIB}\r\n{$IFDEF MSWINDOWS}\r\nfunction EnumFontsProc(var LogFont: TLogFont; var TextMetric: TTextMetric;\r\n FontType: Integer; Data: Pointer): Integer; stdcall;\r\nvar\r\n S: TStrings;\r\n Temp: string;\r\nbegin\r\n S := TStrings(Data);\r\n Temp := LogFont.lfFaceName;\r\n if (S.Count = 0) or (AnsiCompareText(S[S.Count-1], Temp) <> 0) then\r\n S.Add(Temp);\r\n Result := 1;\r\nend;\r\n\r\nclass procedure TTMSFNCUtils.GetFonts(FontList: TStringList);\r\nvar\r\n DC: HDC;\r\n LFont: TLogFont;\r\nbegin\r\n FontList.BeginUpdate;\r\n FontList.Clear;\r\n DC := GetDC(0);\r\n FillChar(LFont, sizeof(LFont), 0);\r\n LFont.lfCharset := DEFAULT_CHARSET;\r\n EnumFontFamiliesEx(DC, LFont, @EnumFontsProc, LPARAM(FontList), 0);\r\n ReleaseDC(0, DC);\r\n FontList.Sort;\r\n FontList.EndUpdate;\r\nend;\r\n{$ENDIF}\r\n\r\n{$IFDEF LINUX}\r\nclass procedure TTMSFNCUtils.GetFonts(FontList: TStringList);\r\nvar\r\n I: Integer;\r\nbegin\r\n FontList.BeginUpdate;\r\n FontList.Clear;\r\n for I := 0 to FmuxGetFontCount - 1 do\r\n FontList.Add(FmuxGetFontName(I));\r\n FontList.Sort;\r\n FontList.EndUpdate;\r\nend;\r\n{$ENDIF}\r\n\r\n{$IFDEF MACOS}\r\nclass procedure TTMSFNCUtils.GetFonts(FontList: TStringList);\r\n{$IFDEF IOS}\r\nvar\r\n arr: NSArray;\r\n I: Integer;\r\n lItem: NSString;\r\nbegin\r\n FontList.BeginUpdate;\r\n FontList.Clear;\r\n arr := TUIFont.OCClass.familyNames;\r\n arr := arr.sortedArrayUsingSelector(sel_getUid('localizedCaseInsensitiveCompare:'));\r\n\r\n for I := 0 to arr.count - 1 do\r\n begin\r\n lItem := TNSString.Wrap(arr.objectAtIndex(i));\r\n FontList.Add(String(lItem.UTF8String));\r\n end;\r\n FontList.Sort;\r\n FontList.EndUpdate;\r\nend;\r\n{$ELSE}\r\nvar\r\n fManager: NsFontManager;\r\n list: NSArray;\r\n lItem: NSString;\r\n i: Integer;\r\nbegin\r\n FontList.BeginUpdate;\r\n FontList.Clear;\r\n fManager := TNsFontManager.Wrap(TNsFontManager.OCClass.sharedFontManager);\r\n list := fManager.availableFontFamilies;\r\n if (List <> nil) and (List.count > 0) then\r\n begin\r\n for i := 0 to List.Count-1 do\r\n begin\r\n lItem := TNSString.Wrap(List.objectAtIndex(i));\r\n FontList.Add(String(lItem.UTF8String));\r\n end;\r\n end;\r\n FontList.Sort;\r\n FontList.EndUpdate;\r\nend;\r\n{$ENDIF}\r\n{$ENDIF}\r\n\r\n{$IFDEF ANDROID}\r\nclass procedure TTMSFNCUtils.GetFonts(FontList: TStringList);\r\nbegin\r\n FontList.BeginUpdate;\r\n FontList.Clear;\r\n FontList.Add('Roboto');\r\n FontList.Add('Droid Sans');\r\n FontList.Add('Droid Serif');\r\n FontList.Add('Droid Sans Mono');\r\n FontList.Sort;\r\n FontList.EndUpdate;\r\nend;\r\n{$ENDIF}\r\n{$ELSE}\r\nclass procedure TTMSFNCUtils.GetFonts(FontList: TStringList);\r\nbegin\r\n FontList.Assign(Screen.Fonts);\r\nend;\r\n{$ENDIF}\r\n\r\nclass procedure TTMSFNCUtils.SetFontSize(AFont: TFont; ASize: Single; AScaleFactor: Single = 1);\r\nbegin\r\n {$IFDEF FMXLIB}\r\n AFont.Size := ASize * AScaleFactor;\r\n {$ENDIF}\r\n {$IFDEF WEBLIB}\r\n AFont.Size := Round(ASize / 96 * 72);\r\n {$ENDIF}\r\n {$IFDEF CMNLIB}\r\n AFont.Height := -TTMSFNCUtils.MulDivInt(Round(ASize / 96 * 72), Round(96 * AScaleFactor), 72);\r\n {$ENDIF}\r\nend;\r\n\r\n{$IFDEF VCLLIB}\r\n{$IF COMPILERVERSION > 22.0}\r\n{$HINTS OFF}\r\nclass function TTMSFNCUtils.CheckVCLStylesEnabled(AStyleServices: TCustomStyleServices; ADesigning: Boolean): Boolean;\r\nbegin\r\n {$IFDEF VCLSTYLESENABLED}\r\n {$IF COMPILERVERSION > 33.0}\r\n Result := AStyleServices.Enabled and (not ADesigning and (AStyleServices.Name <> 'Windows')) or (ADesigning and (AStyleServices.Name <> 'Windows10') and (AStyleServices.Name <> 'Mountain_Mist'));\r\n {$ELSE}\r\n Result := AStyleServices.Enabled and (AStyleServices.Name <> 'Windows');\r\n {$IFEND}\r\n {$ELSE}\r\n Result := False;\r\n {$ENDIF}\r\nend;\r\n{$HINTS ON}\r\n{$IFEND}\r\n{$ENDIF}\r\n\r\n{$IFDEF CMNLIB}\r\nclass function TTMSFNCUtils.FindGraphicClass(const Buffer; const BufferSize: Int64;\r\n out GraphicClass: TGraphicClass): Boolean;\r\nvar\r\n {$IFDEF VCLLIB}\r\n LongWords: array[Byte] of LongWord absolute Buffer;\r\n {$ENDIF}\r\n Words: array[Byte] of Word absolute Buffer;\r\nbegin\r\n GraphicClass := nil;\r\n\r\n if BufferSize = 0 then\r\n begin\r\n Result := False;\r\n Exit;\r\n end;\r\n\r\n {$IFDEF VCLLIB}\r\n case Words[0] of\r\n $4D42: GraphicClass := TBitmap;\r\n $D8FF: GraphicClass := TJPEGImage;\r\n $4949: if Words[1] = $002A then GraphicClass := TWicImage; //i.e., TIFF\r\n $4D4D: if Words[1] = $2A00 then GraphicClass := TWicImage; //i.e., TIFF\r\n else\r\n if Int64(Buffer) = $A1A0A0D474E5089 then\r\n GraphicClass := TPNGImage\r\n else if LongWords[0] = $9AC6CDD7 then\r\n GraphicClass := TMetafile\r\n else if (LongWords[0] = 1) and (LongWords[10] = $464D4520) then\r\n GraphicClass := TMetafile\r\n {$HINTS OFF}\r\n {$IF COMPILERVERSION > 24}\r\n else if AnsiStrings.StrLComp(PAnsiChar(@Buffer), 'GIF', 3) = 0 then\r\n {$ELSE}\r\n else if StrLComp(PAnsiChar(@Buffer), 'GIF', 3) = 0 then\r\n {$IFEND}\r\n GraphicClass := TGIFImage\r\n {$HINTS ON}\r\n else if Words[1] = 1 then\r\n GraphicClass := TIcon;\r\n end;\r\n {$ENDIF}\r\n {$IFDEF LCLLIB}\r\n case Words[0] of\r\n $4D42: GraphicClass := GetGraphicClassForFileExtension('bmp');\r\n $D8FF: GraphicClass := GetGraphicClassForFileExtension('jpeg');\r\n $4949: if Words[1] = $002A then GraphicClass := GetGraphicClassForFileExtension('tiff');\r\n $4D4D: if Words[1] = $2A00 then GraphicClass := GetGraphicClassForFileExtension('tiff');\r\n else\r\n if Int64(Buffer) = $A1A0A0D474E5089 then\r\n GraphicClass := GetGraphicClassForFileExtension('png')\r\n else if StrLComp(PAnsiChar(@Buffer), 'GIF', 3) = 0 then\r\n GraphicClass := GetGraphicClassForFileExtension('gif')\r\n else if Words[1] = 1 then\r\n GraphicClass := GetGraphicClassForFileExtension('ico');\r\n end;\r\n {$ENDIF}\r\n Result := (GraphicClass <> nil);\r\nend;\r\n{$ENDIF}\r\n\r\n{$HINTS OFF}\r\nclass function TTMSFNCUtils.SaveStreamToBase64(const AStream: TStream; const AURL: Boolean = False): string;\r\nvar\r\n s: string;\r\n a: TBytes;\r\n {$IFNDEF FNCLIB}\r\n {$IF COMPILERVERSION > 27}\r\n b: TBase64Encoding;\r\n {$IFEND}\r\n {$ENDIF}\r\nbegin\r\n s := '';\r\n Result := '';\r\n if (AStream.Size < 1) then\r\n Exit;\r\n\r\n AStream.Position := 0;\r\n SetLength(a, AStream.Size);\r\n AStream.Read(a, AStream.Size);\r\n\r\n {$IFDEF FNCLIB}\r\n Result := TTMSFNCUtils.Encode64(a, AURL);\r\n {$ELSE}\r\n {$IFDEF WEBLIB}\r\n Result := s;\r\n {$ENDIF}\r\n {$IF COMPILERVERSION > 27}\r\n b := TBase64Encoding.Create(0);\r\n try\r\n Result := b.EncodeBytesToString(a);\r\n if AURL then\r\n begin\r\n Result := StringReplace(Result, '+', '-', [rfReplaceAll, rfIgnoreCase]);\r\n Result := StringReplace(Result, '/', '_', [rfReplaceAll, rfIgnoreCase]);\r\n Result := StringReplace(Result, '=', '', [rfReplaceAll, rfIgnoreCase]);\r\n end;\r\n finally\r\n b.Free;\r\n end;\r\n {$IFEND}\r\n {$ENDIF}\r\nend;\r\n{$HINTS ON}\r\n\r\nclass function TTMSFNCUtils.SaveStreamToHexStr(const AStream: TStream): string;\r\nvar\r\n s: string;\r\n K: Integer;\r\n bt: TBytes;\r\nbegin\r\n s := '';\r\n AStream.Position := 0;\r\n for K := 1 to AStream.Size do\r\n begin\r\n SetLength(bt, 1);\r\n AStream.Read(bt, 1);\r\n s := s + IntToHex(bt[0], 2);\r\n end;\r\n Result := s;\r\nend;\r\n\r\n{$HINTS OFF}\r\nclass function TTMSFNCUtils.SaveBitmapToBase64(const ABitmap: TTMSFNCBitmapHelperClass; const AURL: Boolean = False): string;\r\nvar\r\n ms: TMemoryStream;\r\n s: string;\r\n {$IFDEF WEBLIB}\r\n img: TJSObject;\r\n ss: TStringStream;\r\n {$ENDIF}\r\nbegin\r\n ms := TMemoryStream.Create;\r\n try\r\n s := '';\r\n {$IFDEF CMNLIB}\r\n if Assigned(ABitmap.Graphic) and not ABitmap.Graphic.Empty then\r\n begin\r\n ABitmap.Graphic.SaveToStream(ms);\r\n {$ENDIF}\r\n {$IFDEF FMXLIB}\r\n if not ABitmap.IsEmpty then\r\n begin\r\n ABitmap.SaveToStream(ms);\r\n {$ENDIF}\r\n {$IFDEF WEBLIB}\r\n if not ABitmap.Empty then\r\n begin\r\n img := ABitmap.Image;\r\n asm\r\n var canvas = document.createElement(\"canvas\");\r\n canvas.width = img.width;\r\n canvas.height = img.height;\r\n var ctx = canvas.getContext(\"2d\");\r\n ctx.drawImage(img, 0, 0);\r\n var dataURL = canvas.toDataURL(\"image/png\");\r\n s = dataURL;\r\n end;\r\n {$ENDIF}\r\n {$IFNDEF WEBLIB}\r\n s := SaveStreamToBase64(ms);\r\n {$ENDIF}\r\n end;\r\n Result := s;\r\n finally\r\n ms.Free;\r\n end;\r\nend;\r\n\r\nclass function TTMSFNCUtils.SaveBitmapToHexStr(const ABitmap: TTMSFNCBitmapHelperClass): string;\r\nvar\r\n ms: TMemoryStream;\r\n s: string;\r\n {$IFDEF WEBLIB}\r\n img: TJSObject;\r\n ss: TStringStream;\r\n {$ENDIF}\r\nbegin\r\n ms := TMemoryStream.Create;\r\n try\r\n s := '';\r\n {$IFDEF CMNLIB}\r\n if Assigned(ABitmap.Graphic) and not ABitmap.Graphic.Empty then\r\n begin\r\n ABitmap.Graphic.SaveToStream(ms);\r\n {$ENDIF}\r\n {$IFDEF FMXLIB}\r\n if not ABitmap.IsEmpty then\r\n begin\r\n ABitmap.SaveToStream(ms);\r\n {$ENDIF}\r\n {$IFDEF WEBLIB}\r\n if not ABitmap.Empty then\r\n begin\r\n img := ABitmap.Image;\r\n asm\r\n var canvas = document.createElement(\"canvas\");\r\n canvas.width = img.width;\r\n canvas.height = img.height;\r\n var ctx = canvas.getContext(\"2d\");\r\n ctx.drawImage(img, 0, 0);\r\n var dataURL = canvas.toDataURL(\"image/png\");\r\n s = dataURL;\r\n end;\r\n\r\n ss := TStringStream.Create(s);\r\n try\r\n s := SaveStreamToHexStr(ss);\r\n finally\r\n ss.Free;\r\n end;\r\n {$ENDIF}\r\n {$IFNDEF WEBLIB}\r\n s := SaveStreamToHexStr(ms);\r\n {$ENDIF}\r\n end;\r\n Result := s;\r\n finally\r\n ms.Free;\r\n end;\r\nend;\r\n{$HINTS ON}\r\n\r\nclass function TTMSFNCUtils.MulDivSingle(nNumber, nNumerator, nDenominator: Single): Single;\r\nbegin\r\n if nDenominator = 0 then\r\n Result := -1\r\n else\r\n Result := nNumber * nNumerator / nDenominator;\r\nend;\r\n\r\nclass function TTMSFNCUtils.MulDivInt(nNumber, nNumerator, nDenominator: Integer): Integer;\r\n function MathRound(AValue: Extended): Int64;\r\n begin\r\n if AValue >= 0 then\r\n Result := Trunc(AValue + 0.5)\r\n else\r\n Result := Trunc(AValue - 0.5);\r\n end;\r\nbegin\r\n if nDenominator = 0 then\r\n Result := -1\r\n else\r\n Result := MathRound(Int64(nNumber) * Int64(nNumerator) / nDenominator);\r\nend;\r\n\r\nclass function TTMSFNCUtils.CreateBitmapFromHexStr(const AHexStr: string): TTMSFNCBitmap;\r\nbegin\r\n Result := TTMSFNCBitmap.Create;\r\n LoadBitmapFromHexStr(AHexStr, Result);\r\nend;\r\n\r\nclass function TTMSFNCUtils.CreateBitmapFromBase64(const ABase64: string; const AURL: Boolean = False): TTMSFNCBitmap;\r\nbegin\r\n Result := TTMSFNCBitmap.Create;\r\n LoadBitmapFromBase64(ABase64, Result, AURL);\r\nend;\r\n\r\n{$IFNDEF WEBLIB}\r\n{$IFDEF FNCLIB}\r\n{$IFNDEF LCLLIB}\r\n{$HINTS OFF}\r\n{$IF COMPILERVERSION >= 30}\r\nclass procedure TTMSFNCUtils.LoadBitmapFromImageList(ABitmap: TTMSFNCBitmap; AImageList: TCustomImageList; AIndex: Integer);\r\n{$IFDEF FMXLIB}\r\nvar\r\n b: TCustomBitmapItem;\r\n{$ENDIF}\r\n{$IFDEF VCLLIB}\r\nvar\r\n b: TBitmap;\r\n p: Pointer;\r\n{$ENDIF}\r\n{$IFDEF LCLLIB}\r\nvar\r\n b: TBitmap;\r\n{$ENDIF}\r\nbegin\r\n {$IFDEF FMXLIB}\r\n if (AIndex >= 0) and (AIndex <= AImageList.Source.Count - 1) then\r\n begin\r\n b := AImageList.Source[AIndex].MultiResBitmap.ItemByScale(1.0, False, True);\r\n if Assigned(b) then\r\n ABitmap.Assign(b.Bitmap);\r\n end;\r\n {$ENDIF}\r\n {$IFDEF LCLLIB}\r\n b := TBitmap.Create;\r\n try\r\n AImageList.GetBitmap(AIndex, b);\r\n ABitmap.Assign(b);\r\n finally\r\n b.Free;\r\n end;\r\n {$ENDIF}\r\n {$IFDEF VCLLIB}\r\n b := TBitmap.Create;\r\n try\r\n b.PixelFormat := pf32Bit;\r\n b.Width := AImageList.Width;\r\n b.Height := AImageList.Height;\r\n b.HandleType := bmDIB;\r\n b.IgnorePalette := true;\r\n b.AlphaFormat := afIgnored;\r\n\r\n p := b.ScanLine[AImageList.Height - 1];\r\n ZeroMemory(p, AImageList.Width * AImageList.Height * 4);\r\n\r\n b.TransparentColor := $FFFFFE;\r\n b.Transparent := True;\r\n\r\n b.Canvas.Brush.Color := b.TransparentColor;\r\n b.Canvas.FillRect(Rect(0,0, b.Width, b.Height));\r\n\r\n AImageList.Draw(b.Canvas, 0, 0, AIndex);\r\n\r\n ABitmap.Assign(b);\r\n finally\r\n b.Free;\r\n end;\r\n {$ENDIF}\r\nend;\r\n{$IFEND}\r\n{$HINTS ON}\r\n{$ENDIF}\r\n{$ENDIF}\r\n{$ENDIF}\r\n\r\nclass procedure TTMSFNCUtils.LoadBitmapFromHexStr(const AHexStr: string; const ABitmap: TTMSFNCBitmapHelperClass);\r\nvar\r\n sst, sb: TStringStream;\r\n bst: TBytesStream;\r\n M: Integer;\r\n bt: TBytes;\r\n {$IFDEF VCLLIB}\r\n p: TGraphic;\r\n gcc: TGraphicClass;\r\n {$ENDIF}\r\n {$IFDEF LCLLIB}\r\n I: Integer;\r\n {$ENDIF}\r\n hx: string;\r\nbegin\r\n sst := TStringStream.Create(AHexStr);\r\n bst := TBytesStream.Create;\r\n try\r\n for M := 1 to sst.Size div 2 do\r\n begin\r\n bt := HexStrToBytes(sst.ReadString(2));\r\n\r\n {$IFNDEF WEBLIB}\r\n {$HINTS OFF}\r\n {$WARNINGS OFF}\r\n {$IFDEF LCLLIB}\r\n {$IF FPC_FULLVERSION = 30200}\r\n //BUG IN TStringStream in FPC 3.2\r\n sst.Position := sst.Position + 2;\r\n {$IFEND}\r\n {$ENDIF}\r\n {$HINTS ON}\r\n {$WARNINGS ON}\r\n {$ENDIF}\r\n\r\n {$IFDEF LCLLIB}\r\n for I := 0 to Length(bt) - 1 do\r\n bst.WriteByte(bt[I]);\r\n {$ENDIF}\r\n {$IFNDEF LCLLIB}\r\n bst.Write(bt, Length(bt));\r\n {$ENDIF}\r\n end;\r\n\r\n bst.Position := 0;\r\n\r\n hx := '';\r\n sb := TStringStream.Create('');\r\n try\r\n sb.CopyFrom(bst, bst.Size);\r\n hx := sb.DataString;\r\n finally\r\n sb.Free;\r\n end;\r\n\r\n if not (Pos(';base64,', hx) > 0) then\r\n begin\r\n {$IFDEF VCLLIB}\r\n if TTMSFNCUtils.FindGraphicClass(bst.Memory^, bst.Size, gcc) then\r\n begin\r\n p := gcc.Create;\r\n try\r\n bst.Position := 0;\r\n p.LoadFromStream(bst);\r\n ABitmap.Assign(p)\r\n {$ENDIF}\r\n\r\n {$IFNDEF VCLLIB}\r\n ABitmap.LoadFromStream(bst);\r\n {$ENDIF}\r\n\r\n {$IFDEF VCLLIB}\r\n finally\r\n p.Free;\r\n end;\r\n end;\r\n {$ENDIF}\r\n end\r\n else\r\n begin\r\n {$IFDEF WEBLIB}\r\n ABitmap.LoadFromResource(hx);\r\n {$ENDIF}\r\n {$IFNDEF WEBLIB}\r\n //\r\n {$ENDIF}\r\n end;\r\n\r\n finally\r\n sst.Free;\r\n bst.Free;\r\n end;\r\nend;\r\n\r\nclass procedure TTMSFNCUtils.LoadBitmapFromBase64(const ABase64: string; const ABitmap: TTMSFNCBitmapHelperClass; const AURL: Boolean = False);\r\nvar\r\n {$IFNDEF WEBLIB}\r\n m: TMemoryStream;\r\n {$ENDIF}\r\n s: string;\r\nbegin\r\n s := ABase64;\r\n {$IFDEF WEBLIB}\r\n if not (Pos(';base64,', s) > 0) then\r\n s := 'data:image/png;base64,' + s;\r\n\r\n ABitmap.LoadFromResource(s);\r\n {$ENDIF}\r\n {$IFNDEF WEBLIB}\r\n m := TMemoryStream.Create;\r\n try\r\n if Pos(';base64,', s) > 0 then\r\n Delete(s, 1, Pos(';base64,', s) + 7);\r\n\r\n TTMSFNCUtils.LoadStreamFromBase64(s, m, AURL);\r\n m.Position := 0;\r\n ABitmap.LoadFromStream(m);\r\n finally\r\n m.Free;\r\n end;\r\n {$ENDIF}\r\nend;\r\n\r\nclass procedure TTMSFNCUtils.LoadStreamFromBase64(const ABase64: string; const AStream: TStream; const AURL: Boolean = False);\r\nvar\r\n b: TBytes;\r\nbegin\r\n b := TTMSFNCUtils.Decode64ToBytes(ABase64, AURL);\r\n AStream.Write(b, Length(b));\r\nend;\r\n\r\nclass procedure TTMSFNCUtils.LoadStreamFromHexStr(const AHexStr: string;\r\n const AStream: TStream);\r\nvar\r\n sst: TStringStream;\r\n bst: TBytesStream;\r\n M: Integer;\r\n bt: TBytes;\r\n {$IFDEF LCLLIB}\r\n I: Integer;\r\n {$ENDIF}\r\nbegin\r\n sst := TStringStream.Create(AHexStr);\r\n bst := TBytesStream.Create;\r\n try\r\n for M := 1 to sst.Size div 2 do\r\n begin\r\n bt := HexStrToBytes(sst.ReadString(2));\r\n\r\n {$IFNDEF WEBLIB}\r\n {$HINTS OFF}\r\n {$WARNINGS OFF}\r\n {$IFDEF LCLLIB}\r\n {$IF FPC_FULLVERSION = 30200}\r\n //BUG IN TStringStream in FPC 3.2\r\n sst.Position := sst.Position + 2;\r\n {$IFEND}\r\n {$ENDIF}\r\n {$HINTS ON}\r\n {$WARNINGS ON}\r\n {$ENDIF}\r\n\r\n {$IFDEF LCLLIB}\r\n for I := 0 to Length(bt) - 1 do\r\n bst.WriteByte(bt[I]);\r\n {$ENDIF}\r\n {$IFNDEF LCLLIB}\r\n bst.Write(bt, Length(bt));\r\n {$ENDIF}\r\n end;\r\n\r\n bst.Position := 0;\r\n AStream.CopyFrom(bst, bst.Size);\r\n finally\r\n sst.Free;\r\n bst.Free;\r\n end;\r\nend;\r\n\r\nclass function TTMSFNCUtils.EpochToDateTime(const AEpoch: string): TDateTime;\r\nvar\r\n dw: integer;\r\nbegin\r\n dw := StrToInt(AEpoch);\r\n Result := UnixToDateTime(dw);\r\nend;\r\n\r\n{$HINTS OFF}\r\n{$IFDEF JSONSUPPORT}\r\nclass procedure TTMSFNCUtils.Log(const AObject: TObject);\r\nbegin\r\n {$IFDEF WEBLIB}\r\n console.log(AObject);\r\n {$ELSE}\r\n Log(AObject.JSON);\r\n {$ENDIF}\r\nend;\r\n{$ENDIF}\r\n\r\nclass procedure TTMSFNCUtils.Log(const AMessage: string);\r\n{$IFDEF ANDROID}\r\nvar\r\n msh: TMarshaller;\r\n{$ENDIF}\r\n{$IFDEF WEBLIB}\r\nvar\r\n m: string;\r\n{$ENDIF}\r\nbegin\r\n {$IFDEF UNIX}\r\n {$IFDEF FMXLIB}\r\n FMX.Types.Log.d(AMessage);\r\n {$ENDIF}\r\n {$IFDEF LCLLIB}\r\n {$ENDIF}\r\n {$ENDIF}\r\n {$IFDEF MSWINDOWS}\r\n OutputDebugString(PChar(AMessage));\r\n {$ENDIF}\r\n {$IFDEF ANDROID}\r\n LOGI(msh.AsAnsi(AMessage).ToPointer);\r\n {$ENDIF}\r\n {$IFDEF MACOS}\r\n NSLog((NSStrEx(AMessage) as ILocalObject).GetObjectID);\r\n {$ENDIF}\r\n {$IFDEF WEBLIB}\r\n m := AMessage;\r\n asm\r\n console.log(m);\r\n end;\r\n {$ENDIF}\r\nend;\r\n{$HINTS ON}\r\n\r\n{$IFDEF FNCLIB}\r\nclass function TTMSFNCUtils.GetMimeType(AData: TStream; AResetPosition: Boolean = True): string;\r\n{$IFDEF WEBLIB}\r\nbegin\r\n Result := '';\r\n raise Exception.Create('Implement GetMimeType');\r\n{$ENDIF}\r\n{$IFNDEF WEBLIB}\r\nvar\r\n LBuffer : array[0..4] of byte;\r\n I: Integer;\r\n LOldPos: Int64;\r\n\r\ntype\r\n TFileData = record\r\n DataType: String;\r\n Length: Integer;\r\n Header: array[0..3] of Byte;\r\n end;\r\nconst\r\n MaxFileDataLength = 4;\r\n FileData: array[0..15] of TFileData = (\r\n (DataType: '.zip'; Length: 4; Header: (80,75,7,8)),\r\n (DataType: '.zip'; Length: 4; Header: (80,75,5,6)),\r\n (DataType: '.zip'; Length: 4; Header: (80,75,3,4)),\r\n (DataType: '.pdf'; Length: 4; Header: (37,80,68,70)),\r\n (DataType: '.gif'; Length: 3; Header: (71,73,70,0)),\r\n (DataType: '.bmp'; Length: 2; Header: (66,77,0,0)),\r\n (DataType: '.png'; Length: 4; Header: (137,80,78,71)),\r\n (DataType: '.tiff'; Length: 3; Header: (73,73,42,0)),\r\n (DataType: '.tiff'; Length: 3; Header: (77,77,42,0)),\r\n (DataType: '.jpg'; Length: 4; Header: (255,216,255,224)),\r\n (DataType: '.jpg'; Length: 4; Header: (255,216,255,225)),\r\n (DataType: '.jpg'; Length: 4; Header: (255,216,255,219)),\r\n (DataType: '.psd'; Length: 4; Header: (56, 66, 80, 83)),\r\n (DataType: '.webp'; Length: 4; Header: (82, 73, 70, 70)),\r\n (DataType: '.unknown'; Length: 4; Header: (0,0,1,0)),\r\n (DataType: '.empty'; Length: 4; Header: (0,0,0,0))\r\n );\r\nbegin\r\n Result := '';\r\n LOldPos := AData.Position;\r\n try\r\n if AResetPosition then\r\n AData.Position := 0;\r\n\r\n if AData.Read(LBuffer[0], MaxFileDataLength) = MaxFileDataLength then\r\n begin\r\n for I := Low(FileData) to High(FileData) do\r\n begin\r\n if (CompareMem(@FileData[I].Header[0], @LBuffer[0], FileData[i].Length) ) then\r\n begin\r\n Result := TTMSFNCUtils.GetMimeType(FileData[I].DataType);\r\n break;\r\n end;\r\n end;\r\n end;\r\n finally\r\n AData.Position := LOldPos;\r\n end;\r\n {$ENDIF}\r\nend;\r\n\r\nclass function TTMSFNCUtils.GetMimeType(AFile: string): string;\r\nvar\r\n e: string;\r\nbegin\r\n e := ExtractFileExt(AFile);\r\n e := LowerCase(Trim(e));\r\n if (e <> '') and (e[{$IFDEF ZEROSTRINGINDEX}0{$ELSE}1{$ENDIF}] = '.') then\r\n e := Copy(e, 2, Length(e) - 1);\r\n\r\n Result := '';\r\n if Assigned(FMimeTypes) then\r\n Result := FMimeTypes.Values[e];\r\n\r\n if Result = '' then\r\n Result := 'application/octet-stream';\r\nend;\r\n\r\nclass function TTMSFNCUtils.GetFileExtension(AMime: string): string;\r\nvar\r\n I: Integer;\r\n e: string;\r\nbegin\r\n e := LowerCase(AMime);\r\n Result := '';\r\n if Assigned(FMimeTypes) then\r\n begin\r\n for I := 0 to FMimeTypes.Count - 1 do\r\n begin\r\n if FMimeTypes.ValueFromIndex[I] = e then\r\n begin\r\n Result := FMimeTypes.Names[I];\r\n Exit;\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\n{$HINTS OFF}\r\nclass function TTMSFNCUtils.Encode64(const AValue: TBytes; const AURL: Boolean = False): string;\r\nvar\r\n s: string;\r\n v: TBytes;\r\n {$IFNDEF LCLWEBLIB}\r\n {$IF COMPILERVERSION > 27}\r\n b: TBase64Encoding;\r\n {$IFEND}\r\n {$ENDIF}\r\n {$IFDEF LCLLIB}\r\n Outstream: TStringStream;\r\n Encoder: TBase64EncodingStream;\r\n {$ENDIF}\r\nbegin\r\n Result := '';\r\n if Length(AValue) = 0 then\r\n Exit;\r\n\r\n v := AValue;\r\n {$IFNDEF LCLWEBLIB}\r\n {$IF COMPILERVERSION > 27}\r\n b := TBase64Encoding.Create(0);\r\n try\r\n s := b.EncodeBytesToString(v);\r\n finally\r\n b.Free;\r\n end;\r\n {$IFEND}\r\n {$ELSE}\r\n {$IFDEF LCLLIB}\r\n Outstream := TStringStream.Create('');\r\n try\r\n Encoder := TBase64EncodingStream.create(outstream);\r\n try\r\n Encoder.Write(v[0], Length(v));\r\n finally\r\n Encoder.Free;\r\n end;\r\n s := Outstream.DataString;\r\n finally\r\n Outstream.free;\r\n end;\r\n {$ENDIF}\r\n {$IFDEF WEBLIB}\r\n s := '';\r\n asm\r\n function _arrayBufferToBase64( buffer ) {\r\n var binary = '';\r\n var bytes = new Uint8Array( buffer );\r\n var len = bytes.byteLength;\r\n for (var i = 0; i < len; i++) {\r\n binary += String.fromCharCode( bytes[ i ] );\r\n }\r\n return window.btoa( binary );\r\n }\r\n\r\n s = _arrayBufferToBase64(v);\r\n end;\r\n {$ENDIF}\r\n {$ENDIF}\r\n if AURL then\r\n begin\r\n s := StringReplace(s, '+', '-', [rfReplaceAll, rfIgnoreCase]);\r\n s := StringReplace(s, '/', '_', [rfReplaceAll, rfIgnoreCase]);\r\n s := StringReplace(s, '=', '', [rfReplaceAll, rfIgnoreCase]);\r\n end;\r\n Result := s;\r\nend;\r\n{$HINTS ON}\r\n\r\n{$HINTS OFF}\r\nclass function TTMSFNCUtils.Encode64(const AValue: string; const AURL: Boolean = False): string;\r\nvar\r\n s, v: string;\r\n {$IFNDEF LCLWEBLIB}\r\n {$IF COMPILERVERSION > 27}\r\n b: TBase64Encoding;\r\n {$IFEND}\r\n {$ENDIF}\r\nbegin\r\n Result := '';\r\n if Length(AValue) = 0 then\r\n Exit;\r\n\r\n v := AValue;\r\n {$IFNDEF LCLWEBLIB}\r\n {$IF COMPILERVERSION > 27}\r\n b := TBase64Encoding.Create(0);\r\n try\r\n s := b.Encode(v);\r\n finally\r\n b.Free;\r\n end;\r\n {$IFEND}\r\n {$ELSE}\r\n {$IFDEF LCLLIB}\r\n s := EncodeStringBase64(v);\r\n {$ENDIF}\r\n {$IFDEF WEBLIB}\r\n asm\r\n function b64EncodeUnicode(str) {\r\n return btoa(encodeURIComponent(str).replace(/%([0-9A-F]{2})/g,\r\n function toSolidBytes(match, p1) {\r\n return String.fromCharCode('0x' + p1);\r\n }));\r\n }\r\n s = b64EncodeUnicode(v);\r\n end;\r\n {$ENDIF}\r\n {$ENDIF}\r\n if AURL then\r\n begin\r\n s := StringReplace(s, '+', '-', [rfReplaceAll, rfIgnoreCase]);\r\n s := StringReplace(s, '/', '_', [rfReplaceAll, rfIgnoreCase]);\r\n s := StringReplace(s, '=', '', [rfReplaceAll, rfIgnoreCase]);\r\n end;\r\n Result := s;\r\nend;\r\n{$HINTS ON}\r\n\r\nclass function TTMSFNCUtils.FileToBase64(const AFile: TTMSFNCUtilsFile): string;\r\nvar\r\n s: string;\r\n{$IFNDEF WEBLIB}\r\n b: TBytesStream;\r\n bf: TBytes;\r\n{$ENDIF}\r\nbegin\r\n {$IFDEF WEBLIB}\r\n asm\r\n function uint8ToString(buf) {\r\n var i, length, out = '';\r\n for (i = 0, length = buf.length; i < length; i += 1) {\r\n out += String.fromCharCode(buf[i]);\r\n }\r\n return out;\r\n }\r\n s = btoa(uint8ToString(AFile.Data));\r\n end;\r\n\r\n {$ENDIF}\r\n {$IFNDEF WEBLIB}\r\n b := TBytesStream.Create;\r\n try\r\n b.LoadFromFile(AFile);\r\n bf := b.Bytes;\r\n SetLength(bf, b.Size);\r\n s := TTMSFNCUtils.Encode64(bf, False);\r\n finally\r\n b.Free;\r\n end;\r\n {$ENDIF}\r\n\r\n Result := s;\r\nend;\r\n\r\n{$HINTS OFF}\r\nclass procedure TTMSFNCUtils.LoadFile(const AFile: TTMSFNCUtilsLoadFile; const ALoadFileComplete: TTMSFNCUtilsLoadFileCompleteEvent);\r\n{$IFDEF WEBLIB}\r\nvar\r\n f: TJSBlob;\r\n c: TTMSFNCUtilsLoadFileCompleteEvent;\r\n ua: TJSUInt8Array;\r\n{$ENDIF}\r\nbegin\r\n {$IFNDEF WEBLIB}\r\n if Assigned(ALoadFileComplete) then\r\n ALoadFileComplete(AFile);\r\n {$ENDIF}\r\n {$IFDEF WEBLIB}\r\n\r\n //workaround for TMS WEB Core compiler with optimization flag\r\n if (1 < 0) then\r\n CreateUploadFile('file', ua);\r\n //\r\n\r\n f := AFile;\r\n c := ALoadFileComplete;\r\n asm\r\n var reader = new FileReader();\r\n\r\n reader.onload = function(e) {\r\n var s = new Uint8Array(reader.result);\r\n var fn = pas[\"WEBLib.TMSFNCUtils\"].CreateUploadFile(f.name, s);\r\n if (c){\r\n c(fn);\r\n }\r\n }\r\n\r\n reader.readAsArrayBuffer(f);\r\n end;\r\n {$ENDIF}\r\nend;\r\n{$HINTS ON}\r\n{$ENDIF}\r\n\r\nclass function TTMSFNCUtils.TryStrToFloatDot(AValue: string; var AResult: Double): Boolean;\r\nbegin\r\n Result := TryStrToFloat(AValue, AResult, FNCFormatSettings);\r\nend;\r\n\r\nclass function TTMSFNCUtils.StrToFloatDot(AValue: string): Double;\r\nbegin\r\n Result := StrToFloat(AValue, FNCFormatSettings);\r\nend;\r\n\r\nclass function TTMSFNCUtils.FloatToStrDot(AValue: Double): string;\r\nbegin\r\n Result := FloatToStr(AValue, FNCFormatSettings);\r\nend;\r\n\r\nclass function TTMSFNCUtils.Decode64ToBytes(const AValue: string; const AURL: Boolean = False): TBytes;\r\nvar\r\n s: string;\r\n {$IFNDEF LCLWEBLIB}\r\n {$HINTS OFF}\r\n {$IF COMPILERVERSION > 27}\r\n b: TBase64Encoding;\r\n {$IFEND}\r\n {$HINTS ON}\r\n {$ENDIF}\r\n {$IFDEF LCLWEBLIB}\r\n ss: TStringStream;\r\n {$IFDEF LCLLIB}\r\n bs: TBytes;\r\n {$ENDIF}\r\n {$ENDIF}\r\nbegin\r\n Result := nil;\r\n if Length(AValue) = 0 then\r\n Exit;\r\n\r\n s := AValue;\r\n if AURL then\r\n begin\r\n s := s + StringOfChar('=', Length (s) mod 4);\r\n s := StringReplace(s, '-', '+', [rfReplaceAll]);\r\n s := StringReplace(s, '_', '/', [rfReplaceAll]);\r\n end;\r\n {$IFNDEF LCLWEBLIB}\r\n {$HINTS OFF}\r\n {$IF COMPILERVERSION > 27}\r\n b := TBase64Encoding.Create(0);\r\n try\r\n Result := b.DecodeStringToBytes(s);\r\n finally\r\n b.Free;\r\n end;\r\n {$ELSE}\r\n Result := DecodeBase64(AnsiString(s));\r\n {$IFEND}\r\n {$HINTS ON}\r\n {$ELSE}\r\n {$IFDEF LCLLIB}\r\n s := DecodeStringBase64(s);\r\n {$ENDIF}\r\n {$IFDEF WEBLIB}\r\n asm\r\n function b64DecodeUnicode(str) {\r\n var binary_string = window.atob(str);\r\n return binary_string;\r\n }\r\n s = b64DecodeUnicode(s);\r\n end;\r\n {$ENDIF}\r\n ss := TStringStream.Create(''{$IFDEF WEBLIB}, TEncoding.UTF8{$ENDIF});\r\n try\r\n ss.WriteString(s);\r\n {$IFDEF LCLLIB}\r\n ss.Position := 0;\r\n SetLength(bs, ss.Size);\r\n ss.ReadBuffer(Pointer(bs)^, Length(bs));\r\n Result := bs;\r\n {$ELSE}\r\n Result := ss.Bytes;\r\n {$ENDIF}\r\n finally\r\n ss.Free;\r\n end;\r\n {$ENDIF}\r\nend;\r\n\r\n{$IFDEF FNCLIB}\r\n\r\nclass function TTMSFNCUtils.Decode64(const AValue: string; const AURL: Boolean = False): string;\r\nvar\r\n s: string;\r\n {$IFNDEF LCLWEBLIB}\r\n {$HINTS OFF}\r\n {$IF COMPILERVERSION > 27}\r\n b: TBase64Encoding;\r\n {$IFEND}\r\n {$HINTS ON}\r\n {$ENDIF}\r\nbegin\r\n Result := '';\r\n if Length(AValue) = 0 then\r\n Exit;\r\n\r\n s := AValue;\r\n if AURL then\r\n begin\r\n s := s + StringOfChar('=', Length (s) mod 4);\r\n s := StringReplace(s, '-', '+', [rfReplaceAll]);\r\n s := StringReplace(s, '_', '/', [rfReplaceAll]);\r\n end;\r\n {$IFNDEF LCLWEBLIB}\r\n {$HINTS OFF}\r\n {$IF COMPILERVERSION > 27}\r\n b := TBase64Encoding.Create(0);\r\n try\r\n Result := b.Decode(s);\r\n finally\r\n b.Free;\r\n end;\r\n {$IFEND}\r\n {$HINTS ON}\r\n {$ELSE}\r\n {$IFDEF LCLLIB}\r\n Result := DecodeStringBase64(s);\r\n {$ENDIF}\r\n {$IFDEF WEBLIB}\r\n asm\r\n function b64DecodeUnicode(str) {\r\n var binary_string = window.atob(str);\r\n return binary_string;\r\n }\r\n return b64DecodeUnicode(s);\r\n end;\r\n {$ENDIF}\r\n {$ENDIF}\r\nend;\r\n{$ENDIF}\r\n\r\nclass function TTMSFNCUtils.URLDecode(const AURL: string; const ATrim: Boolean = True): string;\r\n{$IFNDEF WEBLIB}\r\nconst\r\n HexDigit = '0123456789ABCDEF';\r\nvar\r\n i: Integer;\r\n res: string;\r\n ch1,ch2: integer;\r\n sab: TBytes;\r\n sabc: integer;\r\n{$ENDIF}\r\nbegin\r\n if AURL = '' then\r\n begin\r\n Result := '';\r\n Exit;\r\n end;\r\n\r\n {$IFDEF WEBLIB}\r\n Result := decodeURIComponent(AURL);\r\n {$ENDIF}\r\n {$IFNDEF WEBLIB}\r\n {$IFDEF ZEROSTRINGINDEX}\r\n i := 0;\r\n {$ELSE}\r\n i := 1;\r\n {$ENDIF}\r\n\r\n sabc := 0;\r\n\r\n SetLength(sab,length(AURL) * 2);\r\n\r\n while i <= Length(AURL) do\r\n begin\r\n if AURL[i] = '%' then\r\n begin\r\n if i + 2 <= Length(AURL) then\r\n begin\r\n ch1 := Pos(AURL[i + 1], HexDigit);\r\n ch2 := Pos(AURL[i + 2], HexDigit);\r\n\r\n if (ch1 > 0) and (ch2 > 0) then\r\n begin\r\n dec(ch1);\r\n dec(ch2);\r\n ch1 := (ch1 shl 4) + ch2;\r\n\r\n sab[sabc] := ch1;\r\n inc(sabc);\r\n end;\r\n inc(i,2);\r\n end;\r\n end\r\n else\r\n begin\r\n sab[sabc] := ord(AURL[i]);\r\n inc(sabc);\r\n end;\r\n inc(i);\r\n end;\r\n\r\n {$RANGECHECKS OFF}\r\n if sabc <= Length(sab) then\r\n sab[sabc] := 0;\r\n\r\n if sabc + 1 <= Length(sab) then\r\n sab[sabc + 1] := 0;\r\n {$RANGECHECKS ON}\r\n\r\n {$IFDEF LCLLIB}\r\n res := UTF8Encode(TEncoding.UTF8.GetString(sab));\r\n {$ENDIF}\r\n {$IFNDEF LCLLIB}\r\n res := TEncoding.UTF8.GetString(sab);\r\n {$ENDIF}\r\n\r\n Result := res;\r\n if ATrim then\r\n Result := Trim(Result);\r\n {$ENDIF}\r\nend;\r\n\r\nclass function TTMSFNCUtils.URLEncode(const AURL: string): string;\r\n{$IFNDEF WEBLIB}\r\nvar\r\n I: Integer;\r\n B: TBytes;\r\n c: Char;\r\n{$ENDIF}\r\nbegin\r\n {$IFDEF WEBLIB}\r\n Result := encodeURIComponent(AURL);\r\n {$ENDIF}\r\n {$IFNDEF WEBLIB}\r\n Result := '';\r\n {$IFDEF LCLLIB}\r\n B := TEncoding.UTF8.GetBytes(UTF8Decode(AURL));\r\n {$ENDIF}\r\n {$IFNDEF LCLLIB}\r\n B := TEncoding.UTF8.GetBytes(AURL);\r\n {$ENDIF}\r\n\r\n for I := Low(B) to High(B) do\r\n begin\r\n c := Chr(B[I]);\r\n case c of\r\n 'A'..'Z', 'a'..'z', '0'..'9', '-', '_', '.':\r\n Result := Result + c\r\n else\r\n Result := Result + '%' + IntToHex(Ord(B[I]),2);\r\n end;\r\n end;\r\n {$ENDIF}\r\nend;\r\n\r\nclass function TTMSFNCUtils.HexStrToBytes(const AValue: string): TBytes;\r\nvar\r\n il, idx: Integer;\r\n b: TBytes;\r\nbegin\r\n Result := nil;\r\n SetLength(b, Length(AValue) div 2);\r\n il := 1;\r\n idx := 0;\r\n while il <= Length(AValue) do\r\n begin\r\n b[idx] := StrToInt('$' + AValue[il{$IFDEF ZEROSTRINGINDEX}-1{$ENDIF}] + AValue[il{$IFNDEF ZEROSTRINGINDEX} + 1{$ENDIF}]);\r\n il := il + 2;\r\n idx := idx + 1;\r\n end;\r\n Result := b;\r\nend;\r\n\r\nclass function TTMSFNCUtils.AddCharSet(ACharSet1,\r\n ACharSet2: TTMSFNCUtilsCharSet): TTMSFNCUtilsCharSet;\r\nvar\r\n l,j: integer;\r\nbegin\r\n l := Length(ACharSet1)+Length(ACharSet2);\r\n SetLength(Result,l);\r\n l := 0;\r\n\r\n for j := 0 to High(ACharSet1) do\r\n begin\r\n Result[l] := ACharSet1[j];\r\n inc(l);\r\n end;\r\n\r\n for j := 0 to High(ACharSet2) do\r\n begin\r\n Result[l] := ACharSet2[j];\r\n inc(l);\r\n end;\r\nend;\r\n\r\nclass function TTMSFNCUtils.IsLetterOrDigit(AChar: Char): Boolean;\r\nbegin\r\n Result := TTMSFNCUtils.CharInSet(AChar, NumericCharSet) or TTMSFNCUtils.CharInSet(AChar, AlphaCharSet);\r\nend;\r\n\r\nclass function TTMSFNCUtils.AlphaCharSet: TTMSFNCUtilsCharSet;\r\nvar\r\n i: integer;\r\n ch: char;\r\nbegin\r\n SetLength(Result,52);\r\n i := 0;\r\n\r\n for ch := 'a' to 'z' do\r\n begin\r\n Result[i] := ch;\r\n inc(i);\r\n end;\r\n\r\n for ch := 'A' to 'Z' do\r\n begin\r\n Result[i] := ch;\r\n inc(i);\r\n end;\r\n\r\nend;\r\n\r\nclass function TTMSFNCUtils.CharInSet(ch: Char; ACharset: TTMSFNCUtilsCharSet): boolean;\r\nvar\r\n j: integer;\r\nbegin\r\n Result := false;\r\n for j := 0 to High(ACharSet) do\r\n begin\r\n if ch = ACharSet[j] then\r\n begin\r\n result := true;\r\n break;\r\n end;\r\n end;\r\nend;\r\n\r\nclass function TTMSFNCUtils.FirstChar(ACharset: TTMSFNCUtilsCharSet; AValue: string; var spos: Integer): char;\r\nvar\r\n i:Integer;\r\n q: Integer;\r\n j: Integer;\r\nbegin\r\n {$IFDEF ZEROSTRINGINDEX}\r\n j := 1;\r\n {$ELSE}\r\n j := 0;\r\n {$ENDIF}\r\n i := 1;\r\n q := 0;\r\n spos := -1;\r\n Result := #0;\r\n\r\n while i <= Length(AValue) do\r\n begin\r\n if AValue[i - j] = '\"' then\r\n inc(q);\r\n\r\n if (CharInSet(AValue[i - j], ACharSet)) and not Odd(q) then\r\n begin\r\n spos := i;\r\n Result := AValue[i - j];\r\n Break;\r\n end;\r\n Inc(i);\r\n end;\r\nend;\r\n\r\nclass function TTMSFNCUtils.StripLogicSpaces(AValue: string): string;\r\nvar\r\n i, k: integer;\r\n q: integer;\r\nbegin\r\n q := 0;\r\n {$IFDEF ZEROSTRINGINDEX}\r\n i := 0;\r\n k := length(AValue) - 1;\r\n {$ELSE}\r\n i := 1;\r\n k := length(AValue);\r\n {$ENDIF}\r\n Result := '';\r\n\r\n while (i <= k) do\r\n begin\r\n if AValue[i] = '\"' then\r\n inc(q);\r\n\r\n if (AValue[i] = ' ') then\r\n begin\r\n if Odd(q) then\r\n Result := Result + AValue[i];\r\n end\r\n else\r\n Result := Result + AValue[i];\r\n\r\n inc(i);\r\n end;\r\nend;\r\n\r\nclass function TTMSFNCUtils.ClosingParenthesis(s1: string): integer;\r\nvar\r\n i,j,k,r: integer;\r\nbegin\r\n r := 0;\r\n j := 0;\r\n k := 0;\r\n {$IFDEF ZEROSTRINGINDEX}\r\n i := 0;\r\n {$ELSE}\r\n i := 1;\r\n {$ENDIF}\r\n\r\n while (i <= length(s1)) do\r\n begin\r\n if (s1[i] = ')') then\r\n inc(k);\r\n\r\n if (s1[i] = '(') then\r\n inc(j);\r\n\r\n if (s1[i] = ')') and (j = k) then\r\n begin\r\n r := i;\r\n break;\r\n end;\r\n\r\n inc(i);\r\n end;\r\n\r\n Result := r;\r\nend;\r\n\r\n{$IFDEF FMXLIB}\r\nclass function TTMSFNCUtils.ConvertBitmapToJPEGStream(ABitmap: TTMSFNCBitmapHelperClass; AQuality: Single = 1.0; ABackgroundColor: TAlphaColor = TAlphaColorRec.White): TMemoryStream;\r\n{$ENDIF}\r\n{$IFDEF CMNLIB}\r\nclass function TTMSFNCUtils.ConvertBitmapToJPEGStream(ABitmap: TTMSFNCBitmapHelperClass; AQuality: Single = 1.0; ABackgroundColor: TColor = clWhite): TMemoryStream;\r\n{$ENDIF}\r\n{$IFDEF WEBLIB}\r\nclass function TTMSFNCUtils.ConvertBitmapToJPEGStream(ABitmap: TTMSFNCBitmapHelperClass; AQuality: Single = 1.0; ABackgroundColor: TColor = clWhite): TMemoryStream;\r\nbegin\r\n Result := nil;\r\n raise Exception.Create('ConvertBitmapToJPEGStream');\r\n{$ENDIF}\r\n{$IFNDEF WEBLIB}\r\nvar\r\n ms: TMemoryStream;\r\n bmp: TBitmap;\r\n{$IFDEF FMXLIB}\r\n s: TBitmapSurface;\r\n sp: TBitmapCodecSaveParams;\r\n{$ENDIF}\r\n{$IFDEF CMNLIB}\r\n gcc: TGraphicClass;\r\n bms: TMemoryStream;\r\n p: TGraphic;\r\n img: TJPEGImage;\r\n{$ENDIF}\r\nbegin\r\n Result := nil;\r\n {$IFDEF FMXLIB}\r\n s := TBitmapSurface.Create;\r\n bmp := TBitmap.Create;\r\n try\r\n bmp.Width := ABitmap.Width;\r\n bmp.Height := ABitmap.Height;\r\n if (ABackgroundColor <> TAlphaColorRec.Null) and (Integer(ABackgroundColor) <> -1) then\r\n bmp.Clear(ABackgroundColor)\r\n else\r\n bmp.Clear(TAlphaColorRec.White);\r\n bmp.Canvas.BeginScene;\r\n bmp.Canvas.DrawBitmap(ABitmap, RectF(0, 0, bmp.Width, bmp.Height), RectF(0, 0, bmp.Width, bmp.Height), 1);\r\n bmp.Canvas.EndScene;\r\n s.Assign(bmp);\r\n sp.Quality := Round(AQuality * 100);\r\n ms := TMemoryStream.Create;\r\n if TBitmapCodecManager.SaveToStream(ms, s, '.jpeg', @sp) then\r\n Result := ms;\r\n finally\r\n bmp.Free;\r\n s.Free;\r\n end;\r\n {$ENDIF}\r\n {$IFDEF CMNLIB}\r\n bms := TMemoryStream.Create;\r\n ABitmap.SaveToStream(bms);\r\n try\r\n if FindGraphicClass(bms.Memory^, bms.Size, gcc) then\r\n begin\r\n if gcc = TJPEGImage then\r\n begin\r\n ms := TMemoryStream.Create;\r\n ms.LoadFromStream(bms);\r\n Result := ms;\r\n end\r\n else\r\n begin\r\n p := gcc.Create;\r\n img := TJPEGImage.Create;\r\n img.CompressionQuality := Round(AQuality * 100);\r\n bmp := TBitmap.Create;\r\n try\r\n bms.Position := 0;\r\n p.LoadFromStream(bms);\r\n bmp.Width := p.Width;\r\n bmp.Height := p.Height;\r\n if (ABackgroundColor <> clNone) and (Integer(ABackgroundColor) <> -1) then\r\n bmp.Canvas.Brush.Color := ABackgroundColor\r\n else\r\n bmp.Canvas.Brush.Color := clWhite;\r\n bmp.Canvas.FillRect(Rect(0, 0, bmp.Width, bmp.Height));\r\n bmp.Canvas.Draw(0, 0, p);\r\n img.Assign(bmp);\r\n ms := TMemoryStream.Create;\r\n img.SaveToStream(ms);\r\n Result := ms;\r\n finally\r\n bmp.Free;\r\n img.Free;\r\n p.Free;\r\n end;\r\n end;\r\n end;\r\n finally\r\n bms.Free;\r\n end;\r\n {$ENDIF}\r\n{$ENDIF}\r\nend;\r\n\r\nclass function TTMSFNCUtils.StripThousandSep(ps: string): string;\r\nvar\r\n i: Integer;\r\n s: string;\r\nbegin\r\n Result := '';\r\n s := ps;\r\n for i := 1 to Length(s) do\r\n begin\r\n if s[i] = FormatSettings.DecimalSeparator then\r\n Result := Result + '.' else\r\n if s[i] <> FormatSettings.ThousandSeparator then\r\n Result := Result + s[i];\r\n end;\r\nend;\r\n\r\nclass function TTMSFNCUtils.SubCharSet(ACharSet1,\r\n ACharSet2: TTMSFNCUtilsCharSet): TTMSFNCUtilsCharSet;\r\nvar\r\n i,j,l: integer;\r\n found: boolean;\r\nbegin\r\n l := 0;\r\n SetLength(Result,l);\r\n\r\n for i := 0 to Length(ACharSet1) - 1 do\r\n begin\r\n found := false;\r\n for j := 0 to Length(ACharSet2) - 1 do\r\n begin\r\n if ACharSet1[i] = ACharSet2[j] then\r\n begin\r\n found := true;\r\n break;\r\n end;\r\n end;\r\n\r\n if not found then\r\n begin\r\n inc(l);\r\n SetLength(Result,l);\r\n Result[l - 1] := ACharSet1[i];\r\n end;\r\n end;\r\nend;\r\n\r\nclass function TTMSFNCUtils.IsDate(AValue: string; var ADate: TDateTime):boolean;\r\nvar\r\n su, ts: string;\r\n da,mo,ye,ho,mi,se: Word;\r\n err: Integer;\r\n dp,mp,yp,vp: Integer;\r\nbegin\r\n Result := False;\r\n\r\n ts := '';\r\n\r\n su := UpperCase(FormatSettings.ShortDateFormat);\r\n dp := pos('D',su);\r\n mp := pos('M',su);\r\n yp := pos('Y',su);\r\n\r\n da := 0;\r\n mo := 0;\r\n ye := 0;\r\n ho := 0;\r\n mi := 0;\r\n se := 0;\r\n\r\n vp := -1;\r\n if TTMSFNCUtils.VarPos(FormatSettings.DateSeparator,AValue,vp)>0 then\r\n begin\r\n su := Copy(AValue,1,vp - 1);\r\n\r\n if (dp0 then Exit;\r\n Delete(AValue,1,vp);\r\n\r\n if TTMSFNCUtils.VarPos(FormatSettings.DateSeparator,AValue,vp)>0 then\r\n begin\r\n su := Copy(AValue,1,vp - 1);\r\n\r\n if ((dp>mp) and (dpyp) and (dpdp) and (mpyp) and (mpmp) and (ypdp) and (yp0 then Exit;\r\n Delete(AValue,1,vp);\r\n\r\n AValue := Trim(AValue);\r\n\r\n if TTMSFNCUtils.VarPos(' ',AValue, vp) > 0 then // there is space to separate date & time\r\n begin\r\n ts := copy(AValue, vp, length(AValue));\r\n AValue := copy(AValue, 1, vp - 1);\r\n end;\r\n\r\n if (dp>mp) and\r\n (dp>yp) then\r\n val(AValue,da,err)\r\n else\r\n if (mp>dp) and\r\n (mp>yp) then\r\n val(AValue,mo,err)\r\n else\r\n if (yp>mp) and\r\n (yp>dp) then\r\n val(AValue,ye,err);\r\n\r\n if err<>0 then Exit;\r\n if (da>31) then Exit;\r\n if (mo>12) then Exit;\r\n\r\n if (ts <> '') then // there is a time part\r\n begin\r\n if TTMSFNCUtils.VarPos(FormatSettings.TimeSeparator,ts,vp)>0 then\r\n begin\r\n su := Copy(ts,1,vp - 1); // hour part\r\n val(su,ho,err);\r\n\r\n if (err <> 0) then Exit;\r\n if (ho > 23) then Exit;\r\n\r\n Delete(ts,1,vp);\r\n\r\n if TTMSFNCUtils.VarPos(FormatSettings.TimeSeparator,ts,vp)>0 then // there is a second part\r\n begin\r\n su := Copy(ts,1,vp - 1); // minute part\r\n val(su,mi,err);\r\n\r\n if err <> 0 then Exit;\r\n Delete(ts,1,vp);\r\n\r\n val(ts,se,err); // second part\r\n if (err <> 0) then Exit;\r\n if (se > 60) then Exit;\r\n end\r\n else\r\n begin\r\n val(su,mi,err); // minute part\r\n if (err <> 0) then Exit;\r\n end;\r\n\r\n if (mi > 59) then Exit;\r\n\r\n Result := true;\r\n end;\r\n end\r\n else\r\n Result := True;\r\n\r\n try\r\n ADate := EncodeDate(ye,mo,da) + EncodeTime(ho,mi,se,0);\r\n except\r\n Result := False;\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\nclass function TTMSFNCUtils.Matches(s0a, s1a: PChar): Boolean;\r\n{$IFNDEF WEBLIB}\r\nbegin\r\n Result := Matches(string(s0a), string(s1a));\r\nend;\r\n\r\nclass function TTMSFNCUtils.Matches(s0a, s1a: string): Boolean;\r\n{$ENDIF}\r\nconst\r\n larger = '>';\r\n smaller = '<';\r\n logand = '&';\r\n logor = '^';\r\n asterix = '*';\r\n qmark = '?';\r\n negation = '!';\r\n\r\nvar\r\n matching: boolean;\r\n done: boolean;\r\n len: longint;\r\n lastchar: char;\r\n s0,s1,s2,s3: integer;\r\n oksmaller,oklarger,negflag: boolean;\r\n compstr: string;\r\n flag1,flag2,flag3: boolean;\r\n equal: boolean;\r\n n1,n2: double;\r\n code1, code2: Integer;\r\n dt1,dt2: TDateTime;\r\n q, i: integer;\r\nbegin\r\n {$RANGECHECKS OFF}\r\n {$IFDEF ZEROSTRINGINDEX}\r\n i := 1;\r\n {$ENDIF}\r\n {$IFNDEF ZEROSTRINGINDEX}\r\n i := 0;\r\n {$ENDIF}\r\n\r\n oksmaller := True;\r\n oklarger := True;\r\n flag1 := False;\r\n flag2 := False;\r\n flag3 := False;\r\n negflag := False;\r\n equal := False;\r\n\r\n { [<>] string [&|] [<>] string }\r\n\r\n // do larger than or larger than or equal\r\n\r\n s2 := Pos(larger,s0a);\r\n\r\n if s2 <> 0 then\r\n begin\r\n inc(s2);\r\n if (s0a[s2 - i] = '=') then\r\n begin\r\n Equal := True;\r\n inc(s2);\r\n end;\r\n\r\n while (s0a[s2 - i] = ' ') do\r\n inc(s2);\r\n\r\n s3 := s2;\r\n len := 0;\r\n\r\n lastchar := #0;\r\n\r\n q := 0;\r\n\r\n while ((s2 - i <= Length(s0a)) and (s0a[s2 - i] <> ' ')) and (s2 <= Length(s0a)) and (odd(q) or ((s0a[s2 - i] <> '&') and (s0a[s2 - i] <> '|'))) do\r\n begin\r\n if (s0a[s2 - i] = '\"') then\r\n inc(q);\r\n\r\n if (len = 0) and (s0a[s2 - i] = '\"') then\r\n inc(s3)\r\n else\r\n inc(len);\r\n\r\n lastchar := s0a[s2 - i];\r\n inc(s2);\r\n\r\n if (s2 - i <= Length(s0a)) and (s0a[s2 - i] = ' ') and odd(q) then // skip space if between quotes\r\n begin\r\n lastchar := s0a[s2 - i];\r\n inc(s2);\r\n end;\r\n end;\r\n\r\n if (len > 0) and (lastchar = '\"') then\r\n dec(len);\r\n\r\n compstr := Copy(s0a,s3,len);\r\n\r\n //StrLCopy(compstr,s3,len);\r\n\r\n Val(TTMSFNCUtils.StripThousandSep(s1a),n1,code1);\r\n Val(TTMSFNCUtils.StripThousandSep(compstr),n2,code2);\r\n\r\n dt2 := 0;\r\n if TTMSFNCUtils.IsDate(compstr,dt2) then\r\n code2 := 1;\r\n\r\n dt1 := 0;\r\n if TTMSFNCUtils.IsDate(s1a,dt1) then\r\n code1 := 1;\r\n\r\n if (code1 = 0) and (code2 = 0) then {both are numeric types}\r\n begin\r\n if equal then\r\n oklarger := n1 >= n2\r\n else\r\n oklarger := n1 > n2;\r\n end\r\n else\r\n begin\r\n if TTMSFNCUtils.IsDate(compstr,dt2) and TTMSFNCUtils.IsDate(s1a,dt1) then\r\n begin\r\n if equal then\r\n oklarger := dt1 >= dt2\r\n else\r\n oklarger := dt1 > dt2;\r\n end\r\n else\r\n begin\r\n if equal then\r\n oklarger := (CompareStr(compstr,s1a)<=0)\r\n else\r\n oklarger := (CompareStr(compstr,s1a)<0);\r\n end;\r\n end;\r\n flag1 := True;\r\n end;\r\n\r\n equal := False;\r\n\r\n // do smaller than or smaller than or equal\r\n s2 := Pos(smaller, s0a);\r\n if (s2 <> 0) then\r\n begin\r\n inc(s2);\r\n if (s0a[s2 - i] = '=') then\r\n begin\r\n equal := True;\r\n inc(s2);\r\n end;\r\n\r\n lastchar := #0;\r\n\r\n while (s2 - i <= Length(s0a)) and (s0a[s2 - i] =' ') do inc(s2);\r\n s3 := s2;\r\n len := 0;\r\n q := 0;\r\n\r\n while (s2 - i <= Length(s0a)) and (s0a[s2 - i] <> ' ') and (s2 <= Length(s0a)) and (odd(q) or ((s0a[s2 - i] <> '&') and (s0a[s2 - i] <> '|'))) do\r\n begin\r\n if s0a[s2 - i] = '\"' then\r\n inc(q);\r\n\r\n if (len = 0) and (s0a[s2 - i] = '\"') then\r\n inc(s3)\r\n else\r\n inc(len);\r\n\r\n lastchar := s0a[s2 - i];\r\n inc(s2);\r\n end;\r\n\r\n if (len > 0) and (lastchar = '\"') then\r\n dec(len);\r\n\r\n compstr := copy(s0a, s3, len);\r\n\r\n Val(TTMSFNCUtils.StripThousandSep(s1a),n1,code1);\r\n Val(TTMSFNCUtils.StripThousandSep(compstr),n2,code2);\r\n if TTMSFNCUtils.IsDate(compstr,dt2) then code2 := 1;\r\n if TTMSFNCUtils.IsDate(s1a,dt1) then code1 := 1;\r\n\r\n if (code1 = 0) and (code2 = 0) then // both are numeric types\r\n begin\r\n if equal then\r\n oksmaller := n1 <= n2\r\n else\r\n oksmaller := n1 < n2;\r\n end\r\n else\r\n begin\r\n // check for dates here ?\r\n if TTMSFNCUtils.IsDate(compstr, dt2) and TTMSFNCUtils.IsDate(s1a, dt1) then\r\n begin\r\n if equal then\r\n oksmaller := dt1 <= dt2\r\n else\r\n oksmaller := dt1 < dt2;\r\n end\r\n else\r\n begin\r\n if equal then\r\n oksmaller := (CompareStr(compstr,s1a)>=0)\r\n else\r\n oksmaller := (CompareStr(compstr,s1a)>0);\r\n end;\r\n end;\r\n\r\n flag2 := True;\r\n end;\r\n\r\n s2 := Pos(negation, s0a);\r\n\r\n if (s2 <> 0) then\r\n begin\r\n inc(s2);\r\n while (s0a[s2 - i] = ' ') do\r\n inc(s2);\r\n s3 := s2;\r\n len := 0;\r\n\r\n lastchar := #0;\r\n q := 0;\r\n\r\n while (s0a[s2 - i] <> ' ') and (s2 <= length(s0a)) and (odd(q) or ((s0a[s2 - i] <> '&') and (s0a[s2 - i] <> '|'))) do\r\n begin\r\n if (s0a[s2 - i] = '\"') then\r\n inc(q);\r\n\r\n if (len = 0) and (s0a[s2 - i] = '\"') then\r\n inc(s3)\r\n else\r\n inc(len);\r\n\r\n lastchar := s0a[s2 - i];\r\n inc(s2);\r\n end;\r\n\r\n if (len > 0) and (lastchar = '\"') then\r\n dec(len);\r\n\r\n compstr := copy(s0a, s3, len);\r\n flag3 := True;\r\n end;\r\n\r\n if (flag3) then\r\n begin\r\n if Pos(larger, s0a) = 0 then\r\n flag1 := flag3;\r\n if Pos(smaller, s0a) = 0 then\r\n flag2 := flag3;\r\n end;\r\n\r\n if (Pos(logor, s0a) <> 0) then\r\n if flag1 or flag2 then\r\n begin\r\n matches := oksmaller or oklarger;\r\n Exit;\r\n end;\r\n\r\n if (Pos(logand, s0a) <> 0) then\r\n if flag1 and flag2 then\r\n begin\r\n matches := oksmaller and oklarger;\r\n Exit;\r\n end;\r\n\r\n if ((Pos(larger, s0a) <> 0) and (oklarger)) or\r\n ((Pos(smaller, s0a) <> 0) and (oksmaller)) then\r\n begin\r\n matches := True;\r\n Exit;\r\n end;\r\n\r\n s0 := 1;\r\n s1 := 1;\r\n\r\n done := (s0a = '') or (s1a = '');\r\n\r\n Matching := True;\r\n\r\n while not done and matching do\r\n begin\r\n case s0a[s0 - i] of\r\n qmark:\r\n begin\r\n matching := s1 <= Length(s1a);\r\n if matching then\r\n begin\r\n inc(s0);\r\n inc(s1);\r\n end;\r\n end;\r\n negation:\r\n begin\r\n negflag:=True;\r\n inc(s0);\r\n end;\r\n '\"':\r\n begin\r\n inc(s0);\r\n end;\r\n asterix:\r\n begin\r\n repeat\r\n inc(s0)\r\n until (s0 - i > Length(s0a)) or (s0a[s0 - i] <> asterix);\r\n len := Length(s1a) - s1;\r\n inc(s1,len);\r\n matching := matches(copy(s0a,s0,Length(s0a)),Copy(s1a, s1, Length(s1a)));\r\n\r\n while (len >= 0) and not matching do\r\n begin\r\n dec(s1);\r\n dec(len);\r\n matching := matches(copy(s0a,s0,Length(s0a)),Copy(s1a, s1, Length(s1a)));\r\n end;\r\n if matching then\r\n begin\r\n s0 := Length(s0a)+1;\r\n s1 := Length(s1a)+1;\r\n end;\r\n end;\r\n else\r\n begin\r\n if (s0 <= Length(s0a)) and (s1 <= Length(s1a)) then\r\n matching := s0a[s0 - i] = s1a[s1 - i]\r\n else\r\n matching := false;\r\n\r\n if matching then\r\n begin\r\n inc(s0);\r\n inc(s1);\r\n end;\r\n end;\r\n end;\r\n\r\n Done := (s0 > Length(s0a)) and (s1 > Length(s1a));\r\n end;\r\n\r\n if negflag then\r\n Matches := not matching\r\n else\r\n Matches := matching;\r\n\r\n {$RANGECHECKS ON}\r\nend;\r\n\r\nclass function TTMSFNCUtils.MatchStr(AValue1, AValue2:string; ACaseSensitive:Boolean):Boolean;\r\nbegin\r\n if ACaseSensitive then\r\n Result := Matches(PChar(AValue1),PChar(AValue2))\r\n else\r\n Result := Matches(PChar(AnsiUpperCase(AValue1)),PChar(AnsiUpperCase(AValue2)));\r\nend;\r\n\r\nclass function TTMSFNCUtils.MatchStrEx(AValue: string; AArray: array of string; ACaseSensitive: Boolean; AExpression: Boolean = True): Boolean;\r\nbegin\r\n Result := GetStrIdx(AValue, AArray, ACaseSensitive, AExpression) <> -1;\r\nend;\r\n\r\nclass function TTMSFNCUtils.MatchStrEx(AValue1, AValue2: string; ACaseSensitive: Boolean): Boolean;\r\nvar\r\n ch,lastop: Char;\r\n sep,cp: Integer;\r\n res,newres: Boolean;\r\n CharArray: TTMSFNCUtilsCharSet;\r\nbegin\r\n AValue1 := Trim(AValue1);\r\n AValue1 := StripLogicSpaces(AValue1);\r\n\r\n sep := -1;\r\n if TTMSFNCUtils.VarPos('=', AValue1, sep) = 1 then\r\n Delete(AValue1, sep, 1);\r\n\r\n LastOp := #0;\r\n Res := True;\r\n\r\n SetLength(CharArray,5);\r\n CharArray[0] := '(';\r\n CharArray[1] := ';';\r\n CharArray[2] := '^';\r\n CharArray[3] := '&';\r\n CharArray[4] := '|';\r\n\r\n if (AValue1 = '') then\r\n begin\r\n Result := (AValue2 = '');\r\n Exit;\r\n end;\r\n\r\n if (AValue1 <> '*') and (AValue2 = '') then\r\n begin\r\n Result := False;\r\n Exit;\r\n end;\r\n\r\n repeat\r\n ch := FirstChar(CharArray, AValue1, sep);\r\n if ch <> #0 then\r\n begin\r\n {$IFDEF ZEROSTRINGINDEX}\r\n if (length(AValue1) > 0) and (AValue1[0] = '(') and (pos('(',AValue1) > 0) then\r\n {$ELSE}\r\n if (length(AValue1) > 0) and (AValue1[1] = '(') and (pos('(',AValue1) > 0) then\r\n {$ENDIF}\r\n begin\r\n cp := ClosingParenthesis(AValue1);\r\n NewRes := MatchStrEx(copy(AValue1,2,cp - 2),AValue2,ACaseSensitive);\r\n delete(AValue1,1,cp);\r\n end\r\n else\r\n begin\r\n NewRes := MatchStr(Copy(AValue1,1,sep - 1),AValue2,ACaseSensitive);\r\n Delete(AValue1,1,sep);\r\n end;\r\n\r\n if LastOp = #0 then\r\n Res := NewRes\r\n else\r\n case LastOp of\r\n ';','^','|':Res := Res or NewRes;\r\n '&':Res := Res and NewRes;\r\n end;\r\n\r\n LastOp := ch;\r\n end;\r\n\r\n until (ch = #0);\r\n\r\n NewRes := MatchStr(AValue1, AValue2, ACaseSensitive);\r\n\r\n if LastOp = #0 then\r\n Res := NewRes\r\n else\r\n case LastOp of\r\n ';','^','|':Res := Res or NewRes;\r\n '&':Res := Res and NewRes;\r\n end;\r\n\r\n Result := Res;\r\nend;\r\n\r\n{$IFDEF FNCLIB}\r\n{$IFNDEF LCLLIB}\r\nclass procedure TTMSFNCUtils.SplitURL(AURL: string; var AHost: string; var APath: string; var AQuery: string; var APort: Integer);\r\nvar\r\n p, off, portVal: Integer;\r\nbegin\r\n p := Pos('?', AURL);\r\n if p > 0 then\r\n begin\r\n AQuery := Copy(AURL, p + 1, Length(AURL));\r\n AURL := Copy(AURL, 0, p - 1);\r\n end\r\n else\r\n AQuery := '';\r\n\r\n if (Pos('http', LowerCase(AURL)) = 0) then\r\n AURL := 'https://' + AURL;\r\n off := 9;\r\n\r\n {$IFNDEF LCLLIB}\r\n p := Pos('/', AURL, off);\r\n {$ENDIF}\r\n {$IFDEF LCLLIB}\r\n p := PosEx('/', AURL, off);\r\n {$ENDIF}\r\n if p > 0 then\r\n begin\r\n APath := Copy(AURL, p, Length(AURL));\r\n AURL := Copy(AURL, 0, p - 1);\r\n end\r\n else\r\n APath := '';\r\n\r\n {$IFNDEF LCLLIB}\r\n p := Pos(':', AURL, off);\r\n {$ENDIF}\r\n {$IFDEF LCLLIB}\r\n p := PosEx(':', AURL, off);\r\n {$ENDIF}\r\n\r\n if p > 0 then\r\n begin\r\n portVal := 0;\r\n TryStrToInt(Copy(AURL, p + 1, Length(AURL)), portVal);\r\n APort := portVal;\r\n AURL := AURL.Substring(0, p - 1);\r\n end\r\n else\r\n APort := 0;\r\n\r\n AHost := AURL;\r\nend;\r\n{$ENDIF}\r\n{$ENDIF}\r\n\r\nclass procedure TTMSFNCUtils.Split(const ADelimiter: Char; AInput: string; const AStrings: TStrings; const AClearEmptyStrings: Boolean = False);\r\nvar\r\n C: Integer;\r\nbegin\r\n AStrings.Clear;\r\n AStrings.Delimiter := ADelimiter;\r\n AStrings.StrictDelimiter := True;\r\n AStrings.DelimitedText := AInput;\r\n\r\n if AClearEmptyStrings then\r\n begin\r\n for C := AStrings.Count - 1 downto 0 do\r\n if AStrings[C] = '' then\r\n AStrings.Delete(C);\r\n end;\r\nend;\r\n\r\nclass function TTMSFNCUtils.VarPos(ASubValue, AValue: string; var AResult: Integer): Integer;\r\nbegin\r\n AResult := Pos(ASubValue, AValue);\r\n Result := AResult;\r\nend;\r\n\r\nclass function TTMSFNCUtils.VarPosNoCase(ASubValue, AValue: string;\r\n var AResult: Integer): Integer;\r\nbegin\r\n AResult := Pos(Uppercase(ASubValue), Uppercase(AValue));\r\n Result := AResult;\r\nend;\r\n\r\nclass function TTMSFNCUtils.HTMLStrip(AHTML: string): string;\r\nvar\r\n TagPos: integer;\r\nbegin\r\n Result := '';\r\n // replace line breaks by linefeeds\r\n while (pos('
',uppercase(AHTML))>0) do\r\n AHTML := StringReplace(AHTML,'
',chr(13)+chr(10),[rfIgnoreCase]);\r\n\r\n while (pos('
',uppercase(AHTML))>0) do\r\n AHTML := StringReplace(AHTML,'
',chr(13)+chr(10),[rfIgnoreCase]);\r\n\r\n TagPos := 0;\r\n {remove all other tags}\r\n while (VarPos('<',AHTML,TagPos) > 0) do\r\n begin\r\n Result := Result + Copy(AHTML,1,TagPos-1);\r\n if (VarPos('>',AHTML,TagPos)>0) then\r\n Delete(AHTML,1,TagPos)\r\n else\r\n Break;\r\n end;\r\n Result := Result + AHTML;\r\nend;\r\n\r\nclass function TTMSFNCUtils.GetResourceStream(AResourceName: string): TResourceStream;\r\nbegin\r\n Result := GetResourceStream(AResourceName, GetHInstance);\r\nend;\r\n\r\nclass function TTMSFNCUtils.GetResourceStream(AResourceName: string; AInstance: NativeUInt): TResourceStream;\r\n{$IFDEF WEBLIB}\r\nbegin\r\n Result := nil;\r\n{$ENDIF}\r\n{$IFNDEF WEBLIB}\r\nvar\r\n hst: NativeUInt;\r\n function FindRCData(ModuleHandle: HMODULE; Name: string): boolean;\r\n begin\r\n Result := FindResource(ModuleHandle, PChar(Name), PChar(RT_RCDATA)) <> 0;\r\n end;\r\nbegin\r\n Result := nil;\r\n hst := AInstance;\r\n if FindRCData(hst, AResourceName) then\r\n Result := TResourceStream.Create(hst, AResourceName, RT_RCDATA);\r\n{$ENDIF}\r\nend;\r\n\r\n{$IFNDEF WEBLIB}\r\n\r\n{ TTMSFNCComponentHelper }\r\n\r\nfunction TTMSFNCComponentHelper.GetVersionNumber(AMaj, AMin, ARel,\r\n ABld: ShortInt): string;\r\nvar\r\n vn: Integer;\r\nbegin\r\n vn := MakeLong(MakeWord(ABld, ARel),MakeWord(AMin, AMaj));\r\n Result := IntToStr(Hi(Hiword(vn)))+'.'+IntToStr(Lo(Hiword(vn)))+'.'+IntToStr(Hi(Loword(vn)))+'.'+IntToStr(Lo(Loword(vn)));\r\nend;\r\n{$ENDIF}\r\n\r\n{$IFDEF CMNLIB}\r\n\r\n{ TTMSFNCControlHelper }\r\n\r\nfunction TTMSFNCControlHelper.MakeScreenshot: TTMSFNCBitmap;\r\nvar\r\n {$IFDEF VCLLIB}\r\n bmp: VCL.Graphics.TBitmap;\r\n {$ELSE}\r\n bmp: Graphics.TBitmap;\r\n {$ENDIF}\r\nbegin\r\n {$IFDEF VCLLIB}\r\n bmp := VCL.Graphics.TBitmap.Create;\r\n {$ELSE}\r\n bmp := Graphics.TBitmap.Create;\r\n {$ENDIF}\r\n bmp.PixelFormat := pf24bit;\r\n bmp.TransparentMode := tmFixed;\r\n bmp.Transparent := True;\r\n bmp.TransparentColor := Color;\r\n bmp.SetSize(Width, Height);\r\n Result := TTMSFNCBitmap.Create;\r\n try\r\n if (Self is TWinControl) and (Self as TWinControl).HandleAllocated then\r\n begin\r\n bmp.Canvas.Lock;\r\n bmp.Canvas.Brush.Color := Color;\r\n bmp.Canvas.Brush.Style := bsSolid;\r\n bmp.Canvas.FillRect(Rect(0, 0, Width, Height));\r\n TWinControl(Self).PaintTo(bmp.Canvas.Handle, 0, 0);\r\n bmp.Canvas.Unlock;\r\n end;\r\n\r\n Result.Assign(bmp);\r\n finally\r\n bmp.Free;\r\n end;\r\nend;\r\n\r\n{$ENDIF}\r\n\r\n{ TTMSFNCClipBoard }\r\n\r\n{$IFDEF FMXLIB}\r\n\r\nclass procedure TTMSFNCClipBoard.Clear;\r\n{$IFDEF MACOS}\r\nvar\r\n{$IFDEF IOS}\r\n pb: UIPasteboard;\r\n{$ELSE}\r\n pb: NSPasteboard;\r\n{$ENDIF}\r\n{$ENDIF}\r\n{$IFDEF ANDROID}\r\nvar\r\n clip: IFMXClipboardService;\r\n{$ENDIF}\r\n{$IFDEF UNIX}\r\n{$IFDEF FMXLIB}\r\nvar\r\n clip: IFMXClipboardService;\r\n{$ENDIF}\r\n{$ENDIF}\r\nbegin\r\n {$IFDEF MSWINDOWS}\r\n OpenClipboard(0);\r\n try\r\n EmptyClipboard;\r\n finally\r\n CloseClipBoard;\r\n end;\r\n {$ENDIF}\r\n {$IFDEF MACOS}\r\n {$IFDEF IOS}\r\n pb := TUIPasteboard.Wrap(TUIPasteboard.OCClass.generalPasteboard);\r\n pb.setData(nil, CocoaNSStringConst(libUIKit, 'UIPasteboardNameGeneral'));\r\n {$ELSE}\r\n pb := TNSPasteboard.Wrap(TNSPasteboard.OCClass.generalPasteboard);\r\n pb.clearContents;\r\n {$ENDIF}\r\n {$ENDIF}\r\n {$IFDEF ANDROID}\r\n if TPlatformServices.Current.SupportsPlatformService(IFMXClipboardService, IInterface(clip)) then\r\n clip.SetClipboard('');\r\n {$ENDIF}\r\n {$IFDEF UNIX}\r\n {$IFDEF FMXLIB}\r\n if TPlatformServices.Current.SupportsPlatformService(IFMXClipboardService, IInterface(clip)) then\r\n clip.SetClipboard('');\r\n {$ENDIF}\r\n {$ENDIF}\r\nend;\r\n\r\nclass function TTMSFNCClipBoard.GetHTML: String;\r\nvar\r\n val: TValue;\r\nbegin\r\n Result := '';\r\n val := GetValue(GetFormat(TTMSFNCClipBoardFormat.cfHTML));\r\n if not val.IsEmpty and val.IsType then\r\n Result := val.AsType;\r\nend;\r\n\r\n{$IFDEF MSWINDOWS}\r\nclass function TTMSFNCClipBoard.IsTextFormat(AFormat: Cardinal): Boolean;\r\n{$ELSE}\r\nclass function TTMSFNCClipBoard.IsTextFormat(AFormat: String): Boolean;\r\n{$ENDIF}\r\nbegin\r\n Result := (AFormat = GetFormat(TTMSFNCClipBoardFormat.cfText))\r\n or (AFormat = GetFormat(TTMSFNCClipBoardFormat.cfRTF))\r\n or (AFormat = GetFormat(TTMSFNCClipBoardFormat.cfHTML));\r\nend;\r\n\r\n{$IFDEF MSWINDOWS}\r\nclass function TTMSFNCClipBoard.IsStreamFormat(AFormat: Cardinal): Boolean;\r\n{$ELSE}\r\nclass function TTMSFNCClipBoard.IsStreamFormat(AFormat: String): Boolean;\r\n{$ENDIF}\r\nbegin\r\n Result := (AFormat = GetFormat(TTMSFNCClipBoardFormat.cfStream)) or (AFormat = GetFormat(TTMSFNCClipBoardFormat.cfBitmap))\r\n or (AFormat = GetFormat(TTMSFNCClipBoardFormat.cfRichTextStream));\r\nend;\r\n\r\n{$IFDEF MSWINDOWS}\r\nclass function TTMSFNCClipBoard.GetFormat(AFormat: TTMSFNCClipBoardFormat): Cardinal;\r\nbegin\r\n case AFormat of\r\n TTMSFNCClipBoardFormat.cfText: Result := CF_TEXT;\r\n TTMSFNCClipBoardFormat.cfRTF: Result := CF_FNCRTF;\r\n TTMSFNCClipBoardFormat.cfHTML: Result := CF_FNCHTML;\r\n TTMSFNCClipBoardFormat.cfStream: Result := CF_FNCSTREAM;\r\n TTMSFNCClipBoardFormat.cfBitmap: Result := CF_FNCBITMAP;\r\n TTMSFNCClipBoardFormat.cfBitmapWin: Result := CF_FNCBITMAPWIN;\r\n TTMSFNCClipBoardFormat.cfRichTextStream: Result := CF_FNCRICHTEXTSTREAM;\r\n else\r\n Result := 0;\r\n end;\r\nend;\r\n{$ELSE}\r\n{$IFDEF ANDROID}\r\nclass function TTMSFNCClipBoard.GetFormat(AFormat: TTMSFNCClipBoardFormat): string;\r\nbegin\r\n Result := '';\r\n case AFormat of\r\n TTMSFNCClipBoardFormat.cfText: Result := JStringToString(TJClipDescription.JavaClass.MIMETYPE_TEXT_PLAIN);\r\n TTMSFNCClipBoardFormat.cfRTF, TTMSFNCClipBoardFormat.cfHTML: Result := JStringToString(TJClipDescription.JavaClass.MIMETYPE_TEXT_HTML);\r\n TTMSFNCClipBoardFormat.cfStream, TTMSFNCClipBoardformat.cfBitmap, TTMSFNCClipBoardFormat.cfRichTextStream: Result := JStringToString(TJClipDescription.JavaClass.MIMETYPE_TEXT_INTENT);\r\n end;\r\nend;\r\n{$ELSE}\r\nclass function TTMSFNCClipBoard.GetFormat(AFormat: TTMSFNCClipBoardFormat): string;\r\nbegin\r\n Result := '';\r\n case AFormat of\r\n TTMSFNCClipBoardFormat.cfText: Result := 'public.utf8-plain-text';\r\n TTMSFNCClipBoardFormat.cfRTF: Result := 'public.rtf';\r\n TTMSFNCClipBoardFormat.cfHTML: Result := 'public.html';\r\n TTMSFNCClipBoardFormat.cfStream: Result := 'TTMSFNCClipBoard.StreamFormat';\r\n {$IFDEF IOS}\r\n TTMSFNCClipBoardFormat.cfBitmap: Result := 'public.png';\r\n {$ELSE}\r\n TTMSFNCClipBoardFormat.cfBitmap: Result := 'public.image';\r\n {$ENDIF}\r\n TTMSFNCClipBoardFormat.cfRichTextStream: Result := 'TTMSFNCClipBoard.RichEditorText';\r\n end;\r\nend;\r\n{$ENDIF}\r\n{$ENDIF}\r\n\r\nclass function TTMSFNCClipBoard.GetRTF: String;\r\nvar\r\n val: TValue;\r\nbegin\r\n Result := '';\r\n val := GetValue(GetFormat(TTMSFNCClipBoardFormat.cfRTF));\r\n if not val.IsEmpty and val.IsType then\r\n Result := val.AsType;\r\nend;\r\n\r\nclass function TTMSFNCClipBoard.GetBitmap: TTMSFNCBitmap;\r\nvar\r\n val: TValue;\r\n ms: TMemoryStream;\r\nbegin\r\n Result := nil;\r\n val := GetValue(GetFormat(TTMSFNCClipBoardFormat.cfBitmap));\r\n if not val.IsEmpty and val.IsType then\r\n begin\r\n Result := TTMSFNCBitmap.Create;\r\n Result.LoadFromStream(val.AsType);\r\n ms := val.AsType;\r\n ms.Free;\r\n end;\r\nend;\r\n\r\nclass function TTMSFNCClipBoard.GetStream: TMemoryStream;\r\nvar\r\n val: TValue;\r\nbegin\r\n Result := nil;\r\n val := GetValue(GetFormat(TTMSFNCClipBoardFormat.cfStream));\r\n if not val.IsEmpty and val.IsType then\r\n Result := val.AsType;\r\nend;\r\n\r\nclass function TTMSFNCClipBoard.GetRichTextStream: TMemoryStream;\r\nvar\r\n val: TValue;\r\nbegin\r\n Result := nil;\r\n val := GetValue(GetFormat(TTMSFNCClipBoardFormat.cfRichTextStream));\r\n if not val.IsEmpty and val.IsType then\r\n Result := val.AsType;\r\nend;\r\n\r\nclass function TTMSFNCClipBoard.GetText: String;\r\nvar\r\n val: TValue;\r\nbegin\r\n Result := '';\r\n val := GetValue(GetFormat(TTMSFNCClipBoardFormat.cfText));\r\n if not val.IsEmpty and val.IsType then\r\n Result := val.AsType;\r\nend;\r\n\r\n{$IFDEF MSWINDOWS}\r\nclass function TTMSFNCClipBoard.AllocateCustomValue(AFormat: Cardinal; AValue: TValue): THandle;\r\nbegin\r\n Result := 0;\r\nend;\r\n\r\nclass procedure TTMSFNCClipBoard.SetCustomValue(AFormat: Cardinal; AValue: TValue; var AData: Pointer);\r\n{$ELSE}\r\n{$IFDEF MACOS}\r\nclass function TTMSFNCClipBoard.SetCustomValue(AFormat: String; AValue: TValue): NSData;\r\n{$ELSE}\r\nclass function TTMSFNCClipBoard.SetCustomValue(AFormat: String; AValue: TValue): Pointer;\r\n{$ENDIF}\r\n{$ENDIF}\r\nbegin\r\n {$IFNDEF MSWINDOWS}\r\n Result := nil;\r\n {$ENDIF}\r\nend;\r\n\r\n{$IFDEF MSWINDOWS}\r\nclass function TTMSFNCClipBoard.GetCustomValue(AFormat: Cardinal; AData: Pointer): TValue;\r\n{$ELSE}\r\n{$IFDEF MACOS}\r\nclass function TTMSFNCClipBoard.GetCustomValue(AFormat: String; AData: NSData): TValue;\r\n{$ELSE}\r\nclass function TTMSFNCClipBoard.GetCustomValue(AFormat: String; AData: Pointer): TValue;\r\n{$ENDIF}\r\n{$ENDIF}\r\nbegin\r\n Result := nil;\r\nend;\r\n\r\n{$OVERFLOWCHECKS OFF}\r\n{$RANGECHECKS OFF}\r\n{$IFDEF MSWINDOWS}\r\nclass function TTMSFNCClipBoard.GetValue(AFormat: Cardinal): TValue;\r\n{$ELSE}\r\nclass function TTMSFNCClipBoard.GetValue(AFormat: String): TValue;\r\n{$ENDIF}\r\n{$IFDEF MACOS}\r\nvar\r\n dt: NSData;\r\n str: NSString;\r\n I: Integer;\r\n arr: NSArray;\r\n{$IFDEF IOS}\r\n dtObj: NSObject;\r\n dtp: Pointer;\r\n pb: UIPasteboard;\r\n dic: NSDictionary;\r\n K: Integer;\r\n kp: Pointer;\r\n key: String;\r\n{$ELSE}\r\n pb: NSPasteboard;\r\n pbit: NSPasteboardItem;\r\n{$ENDIF}\r\n{$ENDIF}\r\n{$IFDEF MSWINDOWS}\r\nvar\r\n hMem: THandle;\r\n pMem: Pointer;\r\n txt: string;\r\n{$ENDIF}\r\n{$IFDEF ANDROID}\r\nvar\r\n c: JClipData;\r\n ci: JClipData_Item;\r\n int: JIntent;\r\n bt: TJavaArray;\r\n{$ENDIF}\r\n{$IFDEF UNIX}\r\n{$IFDEF FMXLIB}\r\nvar\r\n clip: IFMXExtendedClipboardService;\r\n b: TBitmap;\r\n bs: TBitmapSurface;\r\n{$ENDIF}\r\n{$ENDIF}\r\nbegin\r\n Result := nil;\r\n {$IFDEF MACOS}\r\n {$IFDEF IOS}\r\n pb := TUIPasteboard.Wrap(TUIPasteboard.OCClass.generalPasteboard);\r\n arr := pb.items;\r\n for I := 0 to arr.count - 1 do\r\n begin\r\n dic := TNSDictionary.Wrap(arr.objectAtIndex(I));\r\n for K := 0 to dic.allKeys.count - 1 do\r\n begin\r\n kp := dic.allKeys.objectAtIndex(K);\r\n key := UTF8ToString(TNSString.Wrap(kp).UTF8String);\r\n if key = AFormat then\r\n begin\r\n dtp := dic.objectForKey(kp);\r\n dtobj := TNSObject.Wrap(dtp);\r\n if isStreamFormat(AFormat) then\r\n begin\r\n dt := TNSData.Wrap(dtp);\r\n if Assigned(dt) then\r\n begin\r\n Result := TMemoryStream.Create;\r\n Result.AsType.Write(dt.bytes^, dt.length);\r\n Result.AsType.Position := 0;\r\n Exit;\r\n end;\r\n end\r\n else if isTextFormat(AFormat) then\r\n begin\r\n str := TNSString.Wrap(dtp);\r\n Result := UTF8ToString(str.UTF8String);\r\n Exit;\r\n end\r\n else\r\n Result := GetCustomValue(AFormat, TNSData.Wrap(dtp));\r\n end;\r\n end;\r\n end;\r\n {$ELSE}\r\n pb := TNSPasteboard.Wrap(TNSPasteboard.OCClass.generalPasteboard);\r\n arr := pb.pasteboardItems;\r\n for I := 0 to arr.count - 1 do\r\n begin\r\n pbit := TNSPasteboardItem.Wrap(arr.objectAtIndex(I));\r\n if isTextFormat(AFormat) then\r\n begin\r\n str := pbit.stringForType(TTMSFNCUtils.NSStrEx(AFormat));\r\n if Assigned(str) then\r\n begin\r\n Result := UTF8ToString(str.UTF8String);\r\n Exit;\r\n end;\r\n end\r\n else if isStreamFormat(AFormat) then\r\n begin\r\n if AFormat = 'public.image' then\r\n begin\r\n dt := pbit.dataForType(TTMSFNCUtils.NSStrEx('public.png'));\r\n if not Assigned(dt) then\r\n begin\r\n dt := pbit.dataForType(TTMSFNCUtils.NSStrEx('public.tiff'));\r\n if not Assigned(dt) then\r\n dt := pbit.dataForType(TTMSFNCUtils.NSStrEx('public.jpeg'));\r\n end;\r\n end\r\n else\r\n dt := pbit.dataForType(TTMSFNCUtils.NSStrEx(AFormat));\r\n\r\n if Assigned(dt) then\r\n begin\r\n Result := TMemoryStream.Create;\r\n Result.AsType.Write(dt.bytes^, dt.length);\r\n Result.AsType.Position := 0;\r\n Exit;\r\n end;\r\n end\r\n else\r\n Result := GetCustomValue(AFormat, pbit.dataForType(TTMSFNCUtils.NSStrEx(AFormat)));\r\n end;\r\n {$ENDIF}\r\n{$ENDIF}\r\n{$OVERFLOWCHECKS ON}\r\n{$RANGECHECKS ON}\r\n\r\n{$IFDEF UNIX}\r\n{$IFDEF FMXLIB}\r\nif TPlatformServices.Current.SupportsPlatformService(IFMXExtendedClipBoardService, IInterface(clip)) then\r\nbegin\r\n if AFormat = GetFormat(TTMSFNCClipBoardFormat.cfBitmap) then\r\n begin\r\n Result := TMemoryStream.Create;\r\n b := TBitmap.Create;\r\n bs := nil;\r\n try\r\n bs := clip.GetImage;\r\n b.Assign(bs);\r\n b.SaveToStream(Result.AsType);\r\n finally\r\n if Assigned(bs) then\r\n bs.Free;\r\n b.Free;\r\n end;\r\n end\r\n else if isStreamFormat(AFormat) then\r\n begin\r\n Result := TMemoryStream.Create;\r\n clip.GetCustomFormat(AFormat, Result.AsType);\r\n end\r\n else if isTextFormat(AFormat) then\r\n Result := clip.GetText;\r\nend;\r\n{$ENDIF}\r\n{$ENDIF}\r\n\r\n{$IFDEF MSWINDOWS}\r\n if AFormat = CF_TEXT then\r\n begin\r\n if HasFormat(CF_UNICODETEXT) then\r\n AFormat := CF_UNICODETEXT;\r\n end;\r\n\r\n OpenClipboard(0);\r\n try\r\n hMem := GetClipboardData(AFormat);\r\n finally\r\n CloseClipboard;\r\n end;\r\n\r\n if hMem <> 0 then\r\n begin\r\n pMem := GlobalLock(hMem);\r\n if pMem <> nil then\r\n begin\r\n try\r\n if isStreamFormat(AFormat) then\r\n begin\r\n Result := TMemoryStream.Create;\r\n Result.AsType.Write(pMem^, GlobalSize(hMem));\r\n Result.AsType.Position := 0;\r\n end\r\n else if isTextFormat(AFormat) or (AFormat = CF_UNICODETEXT) then\r\n begin\r\n if AFormat = CF_UNICODETEXT then\r\n txt := PChar(pMem)\r\n else\r\n txt := UTF8ToString(pMem);\r\n\r\n Result := txt;\r\n end\r\n else\r\n Result := GetCustomValue(AFormat, pMem);\r\n finally\r\n GlobalUnlock(hMem);\r\n end;\r\n end;\r\n end;\r\n{$ENDIF}\r\n\r\n{$IFDEF ANDROID}\r\n if Assigned(FClipboardManager) and isTextFormat(AFormat) then\r\n Result := JCharSequenceToStr(FClipboardManager.getText)\r\n else if Assigned(FContentClipboardManager) then\r\n begin\r\n if isStreamFormat(AFormat) then\r\n begin\r\n c := FContentClipboardManager.getPrimaryClip;\r\n if Assigned(c) then\r\n begin\r\n ci := c.getItemAt(0);\r\n if Assigned(ci) then\r\n begin\r\n int := ci.getIntent;\r\n if int <> nil then\r\n begin\r\n bt := int.getByteArrayExtra(StringToJString(AFormat));\r\n Result := TMemoryStream.Create;\r\n Result.AsType.Write(bt.Data^, bt.Length);\r\n Result.AsType.Position := 0;\r\n end;\r\n end;\r\n end;\r\n end\r\n else if isTextFormat(AFormat) then\r\n begin\r\n Result := JCharSequenceToStr(FContentClipboardManager.getText);\r\n end;\r\n end;\r\n{$ENDIF}\r\nend;\r\n\r\nclass function TTMSFNCClipBoard.HasFormat(AFormat: TTMSFNCClipBoardFormat): Boolean;\r\nbegin\r\n Result := HasFormat(GetFormat(AFormat));\r\nend;\r\n\r\n{$OVERFLOWCHECKS OFF}\r\n{$RANGECHECKS OFF}\r\n{$IFDEF MSWINDOWS}\r\nclass function TTMSFNCClipBoard.HasFormat(AFormat: Cardinal): Boolean;\r\nbegin\r\n Result := False;\r\n try\r\n OpenClipboard(0);\r\n Result := Boolean(IsClipboardFormatAvailable(AFormat));\r\n CloseClipboard;\r\n except\r\n end;\r\nend;\r\n{$ELSE}\r\nclass function TTMSFNCClipBoard.HasFormat(AFormat: String): Boolean;\r\n {$IFDEF MACOS}\r\n {$IFDEF IOS}\r\nvar\r\n I, K: Integer;\r\n kp: Pointer;\r\n key: String;\r\n pb: UIPasteBoard;\r\n arr: NSArray;\r\n dic: NSDictionary;\r\n {$ELSE}\r\nvar\r\n I: NSUInteger;\r\n pb: NSPasteBoard;\r\n pbi: NSPasteboardItem;\r\n str: NSString;\r\n {$ENDIF}\r\n {$ELSE}\r\n {$IFDEF ANDROID}\r\nvar\r\n c: JClipData;\r\n int: JIntent;\r\n ci: JClipData_Item;\r\n {$ENDIF}\r\n {$ENDIF}\r\n {$IFDEF UNIX}\r\n {$IFDEF FMXLIB}\r\nvar\r\n clip: IFMXExtendedClipboardService;\r\n {$ENDIF}\r\n {$ENDIF}\r\nbegin\r\n Result := False;\r\n {$IFDEF MACOS}\r\n {$IFDEF IOS}\r\n pb := TUIPasteboard.Wrap(TUIPasteboard.OCClass.generalPasteboard);\r\n arr := pb.items;\r\n for I := 0 to arr.count - 1 do\r\n begin\r\n dic := TNSDictionary.Wrap(arr.objectAtIndex(I));\r\n for K := 0 to dic.allKeys.count - 1 do\r\n begin\r\n kp := dic.allKeys.objectAtIndex(K);\r\n key := UTF8ToString(TNSString.Wrap(kp).UTF8String);\r\n if key = AFormat then\r\n begin\r\n Result := True;\r\n Exit;\r\n end;\r\n end;\r\n end;\r\n {$ELSE}\r\n pb := TNSPasteboard.Wrap(TNSPasteboard.OCClass.generalPasteboard);\r\n for I := 0 to pb.pasteboardItems.count - 1 do\r\n begin\r\n pbi := TNSPasteboardItem.Wrap(pb.pasteboardItems.objectAtIndex(I));\r\n str := pbi.availableTypeFromArray(TNSArray.Wrap(TNSArray.OCClass.arrayWithObject((TTMSFNCUtils.NSStrEx(AFormat) as ILocalObject).GetObjectID)));\r\n if Assigned(str) then\r\n begin\r\n Result := True;\r\n Exit;\r\n end;\r\n end;\r\n {$ENDIF}\r\n {$ELSE}\r\n {$IFDEF ANDROID}\r\n if Assigned(FClipboardManager) and (AFormat = JStringToString(TJClipDescription.JavaClass.MIMETYPE_TEXT_PLAIN)) then\r\n Result := FClipboardManager.hasText\r\n else if Assigned(FContentClipboardManager) then\r\n begin\r\n if FContentClipboardManager.hasPrimaryClip then\r\n begin\r\n if isStreamFormat(AFormat) then\r\n begin\r\n c := FContentClipboardManager.getPrimaryClip;\r\n if Assigned(c) then\r\n begin\r\n ci := c.getItemAt(0);\r\n if Assigned(ci) then\r\n begin\r\n int := ci.getIntent;\r\n if int <> nil then\r\n Result := int.hasExtra(StringToJString(AFormat));\r\n end;\r\n end;\r\n end\r\n else if isTextFormat(AFormat) then\r\n Result := FContentClipboardManager.hasText;\r\n end;\r\n end;\r\n {$ENDIF}\r\n {$ENDIF}\r\n\r\n {$IFDEF UNIX}\r\n {$IFDEF FMXLIB}\r\n if TPlatformServices.Current.SupportsPlatformService(IFMXExtendedClipBoardService, IInterface(clip)) then\r\n begin\r\n if AFormat = GetFormat(TTMSFNCClipBoardFormat.cfBitmap) then\r\n Result := clip.HasImage\r\n else if isStreamFormat(AFormat) then\r\n Result := clip.HasCustomFormat(AFormat)\r\n else if isTextFormat(AFormat) then\r\n Result := clip.HasText;\r\n end;\r\n {$ENDIF}\r\n {$ENDIF}\r\nend;\r\n{$ENDIF}\r\n{$OVERFLOWCHECKS ON}\r\n{$RANGECHECKS ON}\r\n\r\nclass procedure TTMSFNCClipBoard.SetHTML(AHTML: String);\r\nbegin\r\n SetValue(AHTML, GetFormat(TTMSFNCClipBoardFormat.cfHTML));\r\nend;\r\n\r\nclass procedure TTMSFNCClipBoard.SetRTF(ARTF: String);\r\nbegin\r\n SetValue(ARTF, GetFormat(TTMSFNCClipBoardFormat.cfRTF));\r\nend;\r\n\r\nclass procedure TTMSFNCClipBoard.SetStream(AStream: TMemoryStream);\r\nbegin\r\n SetValue(AStream, GetFormat(TTMSFNCClipBoardFormat.cfStream));\r\nend;\r\n\r\n{$IFDEF MSWINDOWS}\r\nclass function TTMSFNCClipBoard.GetBitmapWin: TTMSFNCBitmap;\r\nvar\r\n Header: TBitmapFileHeader;\r\n DataHandle: HGLOBAL;\r\n BitmapInfoPtr: PBitmapV5Header;\r\n Stream: TMemoryStream;\r\nbegin\r\n Result := nil;\r\n OpenClipboard(0);\r\n DataHandle := GetClipboardData(CF_DIB);\r\n BitmapInfoPtr := nil;\r\n if DataHandle <> 0 then\r\n BitmapInfoPtr := GlobalLock(DataHandle);\r\n\r\n if Assigned(BitmapInfoPtr) then\r\n begin\r\n Stream := TMemoryStream.Create;\r\n try\r\n FillChar(Header, SizeOf(Header), 0);\r\n Header.bfType := $4D42;\r\n Header.bfSize := SizeOf(Header) + GlobalSize(DataHandle);\r\n Header.bfOffBits := SizeOf(Header) + BitmapInfoPtr.bV5Size;\r\n Stream.WriteBuffer(Header, SizeOf(Header));\r\n Stream.WriteBuffer(BitmapInfoPtr^, Header.bfSize - SizeOf(Header));\r\n Stream.Position := 0;\r\n Result := TTMSFNCBitmap.Create;\r\n Result.LoadFromStream(Stream);\r\n finally\r\n GlobalUnlock(DataHandle);\r\n Stream.Free;\r\n CloseClipboard;\r\n end;\r\n end;\r\nend;\r\n\r\nclass procedure TTMSFNCClipBoard.SetBitmapWin(ABitmap: TTMSFNCBitmap);\r\nvar\r\n Data: THandle;\r\n DataPtr: Pointer;\r\n BitmapHeader: TBitmapInfoHeader;\r\n BitmapData: TBitmapData;\r\n I, J: Integer;\r\n DIBDataPtr: Pointer;\r\nbegin\r\n OpenClipboard(0);\r\n try\r\n FillChar(BitmapHeader, SizeOf(BitmapHeader), 0);\r\n BitmapHeader.biSize := SizeOf(TBitmapInfoHeader);\r\n BitmapHeader.biPlanes := 1;\r\n BitmapHeader.biBitCount := 32;\r\n BitmapHeader.biCompression := BI_RGB;\r\n\r\n BitmapHeader.biWidth := ABitmap.Width;\r\n BitmapHeader.biHeight := ABitmap.Height;\r\n BitmapHeader.biSizeImage := ABitmap.BytesPerPixel * ABitmap.Width * ABitmap.Height;\r\n\r\n if BitmapHeader.biWidth <= 0 then\r\n BitmapHeader.biWidth := 1;\r\n if BitmapHeader.biHeight <= 0 then\r\n BitmapHeader.biHeight := 1;\r\n\r\n Data := GlobalAlloc(GMEM_MOVEABLE + GMEM_DDESHARE, BitmapHeader.biWidth * Abs(BitmapHeader.biHeight) * 4 + SizeOf(BitmapHeader));\r\n try\r\n DataPtr := GlobalLock(Data);\r\n try\r\n Move(BitmapHeader, DataPtr^, SizeOf(BitmapHeader));\r\n DIBDataPtr := @(PByteArray(DataPtr)[SizeOf(BitmapHeader)]);\r\n\r\n if ABitmap.Map(TMapAccess.Read, BitmapData) then\r\n try\r\n if BitmapData.PixelFormat = TPixelFormat.BGRA then\r\n for I := 0 to ABitmap.Height - 1 do\r\n Move(PAlphaColorArray(BitmapData.Data)[I * (BitmapData.Pitch div 4)],\r\n PAlphaColorArray(DIBDataPtr)[(ABitmap.Height - 1 - I) * ABitmap.Width], ABitmap.Width * 4)\r\n else\r\n for I := 0 to ABitmap.Height - 1 do\r\n for J := 0 to ABitmap.Width - 1 do\r\n PAlphaColorArray(DIBDataPtr)[(ABitmap.Height - 1 - I) * ABitmap.Width + J] :=\r\n BitmapData.GetPixel(J, I);\r\n finally\r\n ABitmap.Unmap(BitmapData);\r\n end;\r\n finally\r\n GlobalUnlock(Data);\r\n end;\r\n SetClipboardData(CF_DIB, Data);\r\n except\r\n GlobalFree(Data);\r\n raise;\r\n end;\r\n finally\r\n CloseClipboard;\r\n end;\r\nend;\r\n\r\n{$ENDIF}\r\n\r\nclass procedure TTMSFNCClipBoard.SetBitmap(ABitmap: TTMSFNCBitmap);\r\nvar\r\n ms: TMemoryStream;\r\nbegin\r\n ms := TMemoryStream.Create;\r\n try\r\n ABitmap.SaveToStream(ms);\r\n SetValue(ms, GetFormat(TTMSFNCClipBoardFormat.cfBitmap));\r\n finally\r\n ms.Free;\r\n end;\r\nend;\r\n\r\nclass procedure TTMSFNCClipBoard.SetRichTextStream(AStream: TMemoryStream);\r\nbegin\r\n SetValue(AStream, GetFormat(TTMSFNCClipBoardFormat.cfRichTextStream));\r\nend;\r\n\r\nclass procedure TTMSFNCClipBoard.SetText(AText: String);\r\nbegin\r\n SetValue(AText, GetFormat(TTMSFNCClipBoardFormat.cfText));\r\nend;\r\n\r\n{$IFDEF MSWINDOWS}\r\nclass procedure TTMSFNCClipBoard.SetValues(AValues: TArray; AFormats: TArray);\r\n{$ELSE}\r\nclass procedure TTMSFNCClipBoard.SetValues(AValues: TArray; AFormats: TArray);\r\n{$ENDIF}\r\n{$IFDEF MACOS}\r\nvar\r\n{$IFDEF IOS}\r\n pb: UIPasteboard;\r\n dic: NSMutableDictionary;\r\n pValue: Pointer;\r\n{$ELSE}\r\n pb: NSPasteboard;\r\n m: NSMutableArray;\r\n{$ENDIF}\r\n MemoryStream: TMemoryStream;\r\n I: Integer;\r\n{$ENDIF}\r\n{$IFDEF MSWINDOWS}\r\nvar\r\n hMem: THandle;\r\n pMem: Pointer;\r\n txt: string;\r\n l: integer;\r\n I: Integer;\r\n{$ENDIF}\r\n{$IFDEF ANDROID}\r\nvar\r\n c: JClipData;\r\n int: JIntent;\r\n bt: TJavaArray;\r\n I: Integer;\r\n{$ENDIF}\r\n{$IFDEF UNIX}\r\n{$IFDEF FMXLIB}\r\nvar\r\n clip: IFMXExtendedClipboardService;\r\n bs: TBitmapSurface;\r\n b: TBitmap;\r\n I: Integer;\r\n{$ENDIF}\r\n{$ENDIF}\r\nbegin\r\n for I := 0 to Length(AValues) - 1 do\r\n begin\r\n if AValues[I].IsObject then\r\n begin\r\n if AValues[I].IsType then\r\n AValues[I].AsType.Position := 0;\r\n end;\r\n end;\r\n\r\n {$IFDEF MACOS}\r\n {$IFDEF IOS}\r\n pb := TUIPasteboard.Wrap(TUIPasteboard.OCClass.generalPasteboard);\r\n\r\n dic := TNSMutableDictionary.Wrap(TNSMutableDictionary.Wrap(TNSMutableDictionary.OCClass.alloc).init);\r\n\r\n for I := 0 to Length(AValues) - 1 do\r\n begin\r\n if AValues[I].IsType then\r\n begin\r\n MemoryStream := TMemoryStream.Create;\r\n try\r\n MemoryStream.CopyFrom(AValues[I].AsType, AValues[I].AsType.Size - AValues[I].AsType.Position);\r\n MemoryStream.Position := 0;\r\n pValue := TNSData.OCClass.dataWithBytes(MemoryStream.Memory, MemoryStream.Size);\r\n finally\r\n MemoryStream.Free;\r\n end;\r\n end\r\n else if AValues[I].IsType then\r\n pValue := (TTMSFNCUtils.NSStrEx(AValues[I].AsType) as ILocalObject).GetObjectID\r\n else\r\n pValue := (SetCustomValue(AFormats[I], AValues[I]) as ILocalObject).GetObjectID;\r\n\r\n if Assigned(pValue) then\r\n dic.setValue(pValue, TTMSFNCUtils.NSStrEx(AFormats[I]));\r\n end;\r\n\r\n pb.addItems(TNSArray.Wrap(TNSArray.OCClass.arrayWithObject((dic as ILocalObject).GetObjectID)));\r\n {$ELSE}\r\n pb := TNSPasteboard.Wrap(TNSPasteboard.OCClass.generalPasteboard);\r\n m := TNSMutableArray.Wrap(TNSMutableArray.Wrap(TNSMutableArray.OCClass.alloc).init);\r\n for I := 0 to Length(AFormats) - 1 do\r\n m.addObject((TTMSFNCUtils.NSStrEx(AFormats[I]) as ILocalObject).GetObjectID);\r\n\r\n pb.declareTypes(m, nil);\r\n\r\n m.release;\r\n\r\n for I := 0 to Length(AValues) - 1 do\r\n begin\r\n if AValues[I].IsType then\r\n begin\r\n MemoryStream := TMemoryStream.Create;\r\n try\r\n MemoryStream.CopyFrom(AValues[I].AsType, AValues[I].AsType.Size - AValues[I].AsType.Position);\r\n MemoryStream.Position := 0;\r\n pb.setData(TNSData.Wrap(TNSData.OCClass.dataWithBytes(MemoryStream.Memory, MemoryStream.Size)), TTMSFNCUtils.NSStrEx(AFormats[I]))\r\n finally\r\n MemoryStream.Free;\r\n end;\r\n end\r\n else if AValues[I].IsType then\r\n pb.setData(TTMSFNCUtils.NSStrEx(AValues[I].AsType).dataUsingEncoding(NSUTF8StringEncoding), TTMSFNCUtils.NSStrEx(AFormats[I]))\r\n else\r\n pb.setData(SetCustomValue(AFormats[I], AValues[I]), TTMSFNCUtils.NSStrEx(AFormats[I]));\r\n end;\r\n {$ENDIF}\r\n{$ENDIF}\r\n\r\n{$IFDEF MSWINDOWS}\r\n for I := 0 to Length(AValues) - 1 do\r\n begin\r\n if AValues[I].IsObject and AValues[I].IsType then\r\n hMem := GlobalAlloc(GHND or GMEM_DDESHARE, AValues[I].AsType.Size)\r\n else if AValues[I].IsType then\r\n begin\r\n txt := AValues[I].AsString;\r\n if AFormats[I] = CF_FNCRTF then\r\n begin\r\n l := Length(txt) + 1;\r\n hMem := GlobalAlloc(GHND or GMEM_DDESHARE, l)\r\n end\r\n else\r\n begin\r\n l := ByteLength(txt) + SizeOf(Char);\r\n hMem := GlobalAlloc(GHND or GMEM_DDESHARE, l)\r\n end;\r\n end\r\n else\r\n hMem := AllocateCustomValue(AFormats[I], AValues[I]);\r\n\r\n if hMem <> 0 then\r\n begin\r\n pMem := GlobalLock(hMem);\r\n if pMem <> nil then\r\n begin\r\n try\r\n if AValues[I].IsObject and AValues[I].IsType then\r\n begin\r\n AValues[I].AsType.Read(pMem^, AValues[I].AsType.Size);\r\n AValues[I].AsType.Position := 0;\r\n end\r\n else if AValues[I].IsType then\r\n begin\r\n if AFormats[I] = CF_FNCRTF then\r\n begin\r\n {$HINTS OFF}\r\n {$IF COMPILERVERSION > 24}\r\n AnsiStrings.StrCopy(pMem, PAnsiChar(AnsiString(txt)));\r\n {$ELSE}\r\n StrCopy(PAnsiChar(pMem), PAnsiChar(AnsiString(txt)));\r\n {$IFEND}\r\n {$HINTS ON}\r\n end\r\n else\r\n begin\r\n if AFormats[I] = CF_TEXT then\r\n AFormats[I] := CF_UNICODETEXT;\r\n\r\n Move(PChar(txt)^, pMem^, ByteLength(txt) + SizeOf(Char));\r\n end;\r\n end\r\n else\r\n SetCustomValue(AFormats[I], AValues[I], pMem);\r\n finally\r\n GlobalUnlock(hMem);\r\n end;\r\n OpenClipboard(0);\r\n try\r\n SetClipboardData(AFormats[I], hmem);\r\n finally\r\n CloseClipboard;\r\n end;\r\n end\r\n else\r\n begin\r\n GlobalFree(hMem);\r\n end;\r\n end;\r\n end;\r\n{$ENDIF}\r\n\r\n{$IFDEF ANDROID}\r\n for I := 0 to Length(AValues) - 1 do\r\n begin\r\n if Assigned(FClipboardManager) and AValues[I].IsType then\r\n FClipboardManager.setText(StrToJCharSequence(AValues[I].AsType))\r\n else if Assigned(FContentClipboardManager) then\r\n begin\r\n if AValues[I].IsType then\r\n begin\r\n int := TJIntent.Create;\r\n bt := TJavaArray.Create(AValues[I].AsType.Size - AValues[I].AsType.Position);\r\n try\r\n AValues[I].AsType.Read(bt.Data^, AValues[I].AsType.Size - AValues[I].AsType.Position);\r\n int.putExtra(StringToJString(AFormats[I]), bt);\r\n c := TJClipData.JavaClass.newIntent(StrToJCharSequence('Stream'), int);\r\n FContentClipboardManager.setPrimaryClip(c);\r\n finally\r\n bt.Free;\r\n end;\r\n end\r\n else if AValues[I].IsType then\r\n begin\r\n if AFormats[I] = GetFormat(cfHTML) then\r\n c := TJClipData.JavaClass.newHtmlText(StrToJCharSequence(AFormats[I]), StrToJCharSequence(TTMSFNCUtils.HTMLStrip(AValues[I].AsType)), StringToJString(AValues[I].AsType))\r\n else\r\n c := TJClipData.JavaClass.newPlainText(StrToJCharSequence(AFormats[I]), StrToJCharSequence(AValues[I].AsType));\r\n\r\n FContentClipboardManager.setPrimaryClip(c);\r\n end;\r\n end;\r\n end;\r\n{$ENDIF}\r\n\r\n{$IFDEF UNIX}\r\n{$IFDEF FMXLIB}\r\n if TPlatformServices.Current.SupportsPlatformService(IFMXExtendedClipBoardService, IInterface(clip)) then\r\n begin\r\n for I := 0 to Length(AValues) - 1 do\r\n begin\r\n if AValues[I].IsType then\r\n begin\r\n bs := TBitmapSurface.Create;\r\n try\r\n bs.Assign(AValues[I].AsType);\r\n clip.SetImage(bs);\r\n finally\r\n bs.Free;\r\n end;\r\n end\r\n else if AValues[I].IsType then\r\n begin\r\n if AFormats[I] = GetFormat(cfBitmap) then\r\n begin\r\n b := TBitmap.Create;\r\n bs := TBitmapSurface.Create;\r\n try\r\n b.LoadFromStream(AValues[I].AsType);\r\n bs.Assign(b);\r\n clip.SetImage(bs);\r\n finally\r\n b.Free;\r\n bs.Free;\r\n end;\r\n end\r\n else\r\n clip.SetCustomFormat(AFormats[I], AValues[I].AsType)\r\n end\r\n else if AValues[I].IsType then\r\n clip.SetText(AValues[I].AsType);\r\n end;\r\n end;\r\n{$ENDIF}\r\n{$ENDIF}\r\nend;\r\n\r\n{$IFDEF MSWINDOWS}\r\nclass procedure TTMSFNCClipBoard.SetValue(AValue: TValue; AFormat: Cardinal);\r\n{$ELSE}\r\nclass procedure TTMSFNCClipBoard.SetValue(AValue: TValue; AFormat: String);\r\n{$ENDIF}\r\nbegin\r\n SetValues([AValue], [AFormat]);\r\nend;\r\n{$ENDIF}\r\n\r\n{$IFDEF WEBLIB}\r\nclass function TTMSFNCClipBoard.GetBitmap: TTMSFNCBitmap;\r\nbegin\r\n Result := nil;\r\n raise Exception.Create('GetBitmap not supported');\r\nend;\r\n\r\nclass procedure TTMSFNCClipBoard.SetBitmap(ABitmap: TTMSFNCBitmap);\r\nbegin\r\n raise Exception.Create('SetBitmap not supported');\r\nend;\r\n\r\nclass function TTMSFNCClipBoard.GetRichTextStream: TMemoryStream;\r\nbegin\r\n Result := nil;\r\n raise Exception.Create('GetRichTextStream not supported');\r\nend;\r\n\r\nclass procedure TTMSFNCClipBoard.SetRichTextStream(AStream: TMemoryStream);\r\nbegin\r\n raise Exception.Create('SetRichTextStream not supported');\r\nend;\r\n\r\nclass function TTMSFNCClipBoard.GetStream: TMemoryStream;\r\nbegin\r\n Result := nil;\r\n raise Exception.Create('GetStream not supported');\r\nend;\r\n\r\nclass procedure TTMSFNCClipBoard.SetStream(AStream: TMemoryStream);\r\nbegin\r\n raise Exception.Create('SetStream not supported');\r\nend;\r\n\r\nclass function TTMSFNCClipBoard.GetRTF: string;\r\nbegin\r\n Result := '';\r\n raise Exception.Create('GetRTF not supported');\r\nend;\r\n\r\nclass procedure TTMSFNCClipBoard.SetRTF(ARTF: String);\r\nbegin\r\n raise Exception.Create('SetRTF not supported');\r\nend;\r\n\r\nclass function TTMSFNCClipBoard.GetHTML: string;\r\nbegin\r\n Result := '';\r\n raise Exception.Create('GetHTML not supported');\r\nend;\r\n\r\nclass procedure TTMSFNCClipBoard.SetHTML(AHTML: String);\r\nbegin\r\n raise Exception.Create('SetHTML not supported');\r\nend;\r\n\r\nclass function TTMSFNCClipBoard.GetText: string;\r\nbegin\r\n Result := FClipboardData;\r\nend;\r\n\r\nclass procedure TTMSFNCClipBoard.SetText(AText: String);\r\nbegin\r\n FClipboardData := AText;\r\n\r\n asm\r\n window.navigator.clipboard.writeText(AText);\r\n end;\r\nend;\r\n\r\nclass procedure TTMSFNCClipBoard.Clear;\r\nbegin\r\nend;\r\n\r\nclass function TTMSFNCClipBoard.HasFormat(AFormat: TTMSFNCClipBoardFormat): Boolean;\r\nbegin\r\n Result := True;\r\nend;\r\n{$ENDIF}\r\n\r\n{$IFDEF CMNLIB}\r\nclass function TTMSFNCClipBoard.HasFormat(AFormat: TTMSFNCClipBoardFormat): Boolean;\r\nbegin\r\n Result := False;\r\n case AFormat of\r\n TTMSFNCClipBoardFormat.cfText: Result := Clipboard.HasFormat(CF_TEXT);\r\n TTMSFNCClipBoardFormat.cfRTF: Result := Clipboard.HasFormat(CF_FNCRTF);\r\n TTMSFNCClipBoardFormat.cfHTML: Result := Clipboard.HasFormat(CF_FNCHTML);\r\n TTMSFNCClipBoardFormat.cfStream: Result := Clipboard.HasFormat(CF_FNCSTREAM);\r\n TTMSFNCClipBoardFormat.cfBitmap: Result := Clipboard.HasFormat(CF_FNCBITMAP);\r\n TTMSFNCClipBoardFormat.cfRichTextStream: Result := Clipboard.HasFormat(CF_FNCRICHTEXTSTREAM);\r\n end;\r\nend;\r\n\r\nclass function TTMSFNCClipBoard.GetFormat(AFormat: TTMSFNCClipBoardFormat): string;\r\nbegin\r\n Result := '';\r\n {$IFDEF MSWINDOWS}\r\n case AFormat of\r\n TTMSFNCClipBoardFormat.cfText: Result := 'text/plain';\r\n TTMSFNCClipBoardFormat.cfRTF: Result := 'Rich Text Format';\r\n TTMSFNCClipBoardFormat.cfHTML: Result := 'HTML Format';\r\n TTMSFNCClipBoardFormat.cfStream: Result := 'TTMSFNCClipBoard.StreamFormat';\r\n TTMSFNCClipBoardFormat.cfBitmap: Result := 'Delphi Picture';\r\n TTMSFNCClipBoardFormat.cfRichTextStream: Result := 'RichEditorText';\r\n end;\r\n {$ENDIF}\r\n {$IFDEF UNIX}\r\n case AFormat of\r\n TTMSFNCClipBoardFormat.cfText: Result := 'text/plain';\r\n TTMSFNCClipBoardFormat.cfRTF: Result := 'text/richtext';\r\n TTMSFNCClipBoardFormat.cfHTML: Result := 'text/html';\r\n TTMSFNCClipBoardFormat.cfStream: Result := 'TTMSFNCClipBoard.StreamFormat';\r\n TTMSFNCClipBoardFormat.cfBitmap: Result := 'Delphi Picture';\r\n TTMSFNCClipBoardFormat.cfRichTextStream: Result := 'RichEditorText';\r\n end;\r\n {$ENDIF}\r\nend;\r\n\r\nclass procedure TTMSFNCClipBoard.Clear;\r\nbegin\r\n Clipboard.Clear;\r\nend;\r\n\r\nclass procedure TTMSFNCClipBoard.SetText(AText: String);\r\nbegin\r\n {$IFDEF VCLLIB}\r\n Clipboard.AsText := AText;\r\n {$ENDIF}\r\n {$IFDEF LCLLIB}\r\n Clipboard.SetTextBuf(PChar(AText));\r\n {$ENDIF}\r\nend;\r\n\r\nclass function TTMSFNCClipBoard.GetText: String;\r\nbegin\r\n Result := Clipboard.AsText;\r\nend;\r\n\r\nclass procedure TTMSFNCClipBoard.SetStream(AStream: TMemoryStream);\r\n{$IFDEF VCLLIB}\r\nvar\r\n Data: THandle;\r\n DataPtr: Pointer;\r\nbegin\r\n Clipboard.Open;\r\n try\r\n Data := GlobalAlloc(GMEM_MOVEABLE + GMEM_DDESHARE, AStream.Size);\r\n try\r\n DataPtr := GlobalLock(Data);\r\n try\r\n Move(AStream.Memory^, DataPtr^, AStream.Size);\r\n SetClipboardData(CF_FNCSTREAM, Data);\r\n finally\r\n GlobalUnlock(Data);\r\n end;\r\n except\r\n GlobalFree(Data);\r\n raise;\r\n end;\r\n finally\r\n Clipboard.Close;\r\n end;\r\n{$ENDIF}\r\n{$IFDEF LCLLIB}\r\nbegin\r\n Clipboard.Open;\r\n try\r\n Clipboard.AddFormat(CF_FNCSTREAM, AStream);\r\n finally\r\n Clipboard.Close;\r\n end;\r\n{$ENDIF}\r\nend;\r\n\r\nclass function TTMSFNCClipBoard.GetStream: TMemoryStream;\r\n{$IFDEF VCLLIB}\r\nvar\r\n DataPtr: Pointer;\r\n Data: THandle;\r\nbegin\r\n Result := nil;\r\n Clipboard.Open;\r\n try\r\n Data := GetClipboardData(CF_FNCSTREAM);\r\n if Data <> 0 then\r\n begin\r\n DataPtr := GlobalLock(Data);\r\n if Assigned(DataPtr) then\r\n begin\r\n Result := TMemoryStream.Create;\r\n Result.WriteBuffer(DataPtr^, GlobalSize(Data));\r\n Result.Position := 0;\r\n end;\r\n end;\r\n finally\r\n Clipboard.Close;\r\n end;\r\n{$ENDIF}\r\n{$IFDEF LCLLIB}\r\nvar\r\n fmt: TClipboardFormat;\r\nbegin\r\n Result := nil;\r\n fmt := Clipboard.FindFormatID(GetFormat(cfStream));\r\n if fmt <> 0 then\r\n begin\r\n Result := TMemoryStream.Create;\r\n Clipboard.GetFormat(fmt, Result);\r\n Result.Position := 0;\r\n end;\r\n{$ENDIF}\r\nend;\r\n\r\nclass procedure TTMSFNCClipBoard.SetBitmap(ABitmap: TTMSFNCBitmap);\r\n{$IFDEF VCLLIB}\r\nvar\r\n pic: TGraphic;\r\n ms, ds: TMemoryStream;\r\n gcc: TGraphicClass;\r\nbegin\r\n pic := nil;\r\n\r\n if IsBitmapEmpty(ABitmap) then\r\n Exit;\r\n\r\n ds := TMemoryStream.Create;\r\n try\r\n ABitmap.SaveToStream(ds);\r\n ds.Position := 0;\r\n if TTMSFNCUtils.FindGraphicClass(ds.Memory^, ds.Size, gcc) then\r\n pic := gcc.Create;\r\n finally\r\n ds.Free;\r\n end;\r\n\r\n if Assigned(pic) then\r\n begin\r\n try\r\n ms := TMemoryStream.Create;\r\n try\r\n ABitmap.SaveToStream(ms);\r\n ms.Position := 0;\r\n pic.LoadFromStream(ms);\r\n finally\r\n ms.Free;\r\n end;\r\n\r\n Clipboard.Open;\r\n try\r\n Clipboard.Assign(pic);\r\n finally\r\n Clipboard.Close;\r\n end;\r\n\r\n finally\r\n pic.Free;\r\n end;\r\n end;\r\n{$ENDIF}\r\n{$IFDEF LCLLIB}\r\nbegin\r\n if IsBitmapEmpty(ABitmap) then\r\n Exit;\r\n\r\n ClipBoard.Open;\r\n try\r\n ClipBoard.Assign(ABitmap.Graphic);\r\n finally\r\n ClipBoard.Close;\r\n end;\r\n{$ENDIF}\r\nend;\r\n\r\nclass function TTMSFNCClipBoard.GetBitmap: TTMSFNCBitmap;\r\nbegin\r\n Result := TTMSFNCBitmap.Create;\r\n Result.Assign(Clipboard);\r\nend;\r\n\r\nclass procedure TTMSFNCClipBoard.SetRichTextStream(AStream: TMemoryStream);\r\n{$IFDEF VCLLIB}\r\nvar\r\n Data: THandle;\r\n DataPtr: Pointer;\r\nbegin\r\n Clipboard.Open;\r\n try\r\n Data := GlobalAlloc(GMEM_MOVEABLE + GMEM_DDESHARE, AStream.Size);\r\n try\r\n DataPtr := GlobalLock(Data);\r\n try\r\n Move(AStream.Memory^, DataPtr^, AStream.Size);\r\n SetClipboardData(CF_FNCRICHTEXTSTREAM, Data);\r\n finally\r\n GlobalUnlock(Data);\r\n end;\r\n except\r\n GlobalFree(Data);\r\n raise;\r\n end;\r\n finally\r\n Clipboard.Close;\r\n end;\r\n{$ENDIF}\r\n{$IFDEF LCLLIB}\r\nbegin\r\n Clipboard.Open;\r\n try\r\n Clipboard.AddFormat(CF_FNCRICHTEXTSTREAM, AStream);\r\n finally\r\n Clipboard.Close;\r\n end;\r\n{$ENDIF}\r\nend;\r\n\r\nclass function TTMSFNCClipBoard.GetRichTextStream: TMemoryStream;\r\n{$IFDEF VCLLIB}\r\nvar\r\n DataPtr: Pointer;\r\n Data: THandle;\r\nbegin\r\n Result := nil;\r\n Clipboard.Open;\r\n try\r\n Data := GetClipboardData(CF_FNCRICHTEXTSTREAM);\r\n if Data <> 0 then\r\n begin\r\n DataPtr := GlobalLock(Data);\r\n if Assigned(DataPtr) then\r\n begin\r\n Result := TMemoryStream.Create;\r\n Result.WriteBuffer(DataPtr^, GlobalSize(Data));\r\n Result.Position := 0;\r\n end;\r\n end;\r\n finally\r\n Clipboard.Close;\r\n end;\r\n{$ENDIF}\r\n{$IFDEF LCLLIB}\r\nvar\r\n fmt: TClipboardFormat;\r\nbegin\r\n Result := nil;\r\n fmt := Clipboard.FindFormatID(GetFormat(cfRichTextStream));\r\n if fmt <> 0 then\r\n begin\r\n Result := TMemoryStream.Create;\r\n Clipboard.GetFormat(fmt, Result);\r\n Result.Position := 0;\r\n end;\r\n{$ENDIF}\r\nend;\r\n\r\nclass procedure TTMSFNCClipBoard.SetRTF(ARTF: String);\r\n{$IFDEF VCLLIB}\r\nvar\r\n rtfstr: ansistring;\r\n MemHandleRTF: THandle;\r\nbegin\r\n Clipboard.Open;\r\n try\r\n rtfstr := ansistring(ARTF);\r\n\r\n MemHandleRTF := GlobalAlloc(GHND or GMEM_SHARE, Length(rtfstr) + 1);\r\n\r\n if (MemHandleRTF <> 0) then\r\n begin\r\n {$HINTS OFF}\r\n {$IF COMPILERVERSION > 24}\r\n AnsiStrings.StrCopy(GlobalLock(MemHandleRTF), PAnsiChar(rtfstr));\r\n {$ELSE}\r\n StrCopy(PAnsiChar(GlobalLock(MemHandleRTF)), PAnsiChar(rtfstr));\r\n {$IFEND}\r\n {$HINTS ON}\r\n GlobalUnlock(MemHandleRTF);\r\n SetClipboardData(CF_FNCRTF, MemHandleRTF);\r\n end;\r\n finally\r\n Clipboard.Close;\r\n end;\r\n{$ENDIF}\r\n{$IFDEF LCLLIB}\r\nbegin\r\n Clipboard.Open;\r\n try\r\n Clipboard.AddFormat(CF_FNCRTF, ARTF[1], Length(ARTF));\r\n finally\r\n Clipboard.Close;\r\n end;\r\n{$ENDIF}\r\nend;\r\n\r\nclass function TTMSFNCClipBoard.GetRTF: String;\r\n{$IFDEF VCLLIB}\r\nvar\r\n hClip: THandle;\r\n bufptr: Pointer;\r\n mstream: TStringStream;\r\nbegin\r\n Result := '';\r\n Clipboard.Open;\r\n try\r\n HClip := Clipboard.GetAsHandle(CF_FNCRTF);\r\n bufptr := GlobalLock(HClip);\r\n if bufptr <> nil then\r\n begin\r\n try\r\n mstream := TStringStream.Create('');\r\n try\r\n mstream.WriteBuffer(bufptr^, GlobalSize(HClip));\r\n Result := mstream.DataString;\r\n finally\r\n mstream.Free;\r\n end;\r\n finally\r\n GlobalUnlock(HClip);\r\n end;\r\n end;\r\n finally\r\n Clipboard.Close;\r\n end;\r\n{$ENDIF}\r\n{$IFDEF LCLLIB}\r\nvar\r\n fmt: TClipboardFormat;\r\n ms: TMemoryStream;\r\n sz: int64;\r\nbegin\r\n Result := '';\r\n fmt := Clipboard.FindFormatID(GetFormat(cfRTF));\r\n if fmt <> 0 then\r\n begin\r\n ms := TMemoryStream.Create;\r\n try\r\n if Clipboard.GetFormat(fmt, ms) then\r\n begin\r\n sz := ms.Size;\r\n if (sz > 0) and (PChar(ms.Memory)[sz - 1]=#0) then\r\n Dec(sz);\r\n\r\n ms.Position := 0;\r\n SetLength(Result, sz);\r\n if sz > 0 then\r\n ms.Read(Result[1], sz);\r\n end;\r\n finally\r\n ms.Free;\r\n end;\r\n end;\r\n{$ENDIF}\r\nend;\r\n\r\nclass procedure TTMSFNCClipBoard.SetHTML(AHTML: String);\r\n{$IFDEF VCLLIB}\r\nvar\r\n htmlstr: ansistring;\r\n MemHandleHTML: THandle;\r\nbegin\r\n htmlstr := AnsiString(AHTML);\r\n htmlstr := AnsiString('Version:0.9'#13#10\r\n +'StartHTML:71'#13#10\r\n +'EndHTML:'+inttostr(length(htmlstr) + 71)+#13#10\r\n +'StartFragment:140'#13#10\r\n +'EndFragment:'+inttostr(length(htmlstr)+ 142)+#13#10\r\n +'' +#13#10\r\n +''#13#10\r\n +''#13#10\r\n +'The HTML Clipboard'#13#10\r\n +''#13#10\r\n +''#13#10\r\n +''#13#10\r\n +''#13#10)\r\n + htmlstr + AnsiString(#13#10\r\n +''#13#10\r\n +''#13#10\r\n +''#13#10);\r\n\r\n Clipboard.Open;\r\n try\r\n MemHandleHTML := GlobalAlloc(GHND or GMEM_SHARE, Length(htmlstr) + 1);\r\n\r\n if (MemHandleHTML <> 0) then\r\n begin\r\n {$HINTS OFF}\r\n {$IF COMPILERVERSION > 24}\r\n AnsiStrings.StrCopy(GlobalLock(MemHandleHTML), PAnsiChar(htmlstr));\r\n {$ELSE}\r\n StrCopy(PAnsiChar(GlobalLock(MemHandleHTML)), PAnsiChar(htmlstr));\r\n {$IFEND}\r\n {$HINTS ON}\r\n GlobalUnlock(MemHandleHTML);\r\n SetClipboardData(CF_FNCHTML, MemHandleHTML);\r\n end;\r\n finally\r\n Clipboard.Close;\r\n end;\r\n{$ENDIF}\r\n{$IFDEF LCLLIB}\r\n{$IFDEF MSWINDOWS}\r\nconst\r\n nhdr = 'Version:0.9' + #13#10 +\r\n 'StartHTML:%.10d' + #13#10+\r\n 'EndHTML:%.10d' + #13#10+\r\n 'StartFragment:%.10d' + #13#10+\r\n 'EndFragment:%.10d' + #13#10;\r\n hdr = '';\r\n ftr1 = '';\r\n ftr2 = '';\r\n{$ENDIF}\r\nvar\r\n HTMLSource : String;\r\n {$IFDEF MSWINDOWS}\r\n iStartHTML: Integer;\r\n iStartFragment: Integer;\r\n iEndFragment: Integer;\r\n iEndHTML: Integer;\r\n {$ENDIF}\r\nbegin\r\n {$IFDEF MSWINDOWS}\r\n iStartHTML := 105;\r\n iStartFragment := iStartHTML + Length(nhdr);\r\n iEndFragment := iStartFragment + Length(AHTML) + Length(ftr1);\r\n iEndHTML := iEndFragment + Length(ftr2);\r\n HTMLSource := Format(nhdr, [iStartHTML, iEndHTML, iStartFragment,\r\n iEndFragment]) + hdr + AHTML + ftr1 + ftr2;\r\n {$ELSE}\r\n HTMLSource := AHTML;\r\n {$ENDIF}\r\n\r\n Clipboard.Open;\r\n try\r\n Clipboard.AddFormat(CF_FNCHTML, HTMLSource[1], Length(HTMLSource));\r\n finally\r\n Clipboard.Close;\r\n end;\r\n{$ENDIF}\r\nend;\r\n\r\nclass function TTMSFNCClipBoard.GetHTML: String;\r\n{$IFDEF VCLLIB}\r\nvar\r\n hclip: THandle;\r\n bufptr: Pointer;\r\n mstream: TStringStream;\r\nbegin\r\n Result := '';\r\n Clipboard.Open;\r\n try\r\n HClip := Clipboard.GetAsHandle(CF_FNCHTML);\r\n bufptr := GlobalLock(HClip);\r\n if bufptr <> nil then\r\n begin\r\n try\r\n mstream := TStringStream.Create('');\r\n try\r\n mstream.WriteBuffer(bufptr^, GlobalSize(HClip));\r\n Result := UTF8ToString(RawByteString(mstream.DataString));\r\n finally\r\n mstream.Free;\r\n end;\r\n finally\r\n GlobalUnlock(HClip);\r\n end;\r\n end;\r\n finally\r\n Clipboard.Close;\r\n end;\r\n{$ENDIF}\r\n{$IFDEF LCLLIB}\r\nvar\r\n fmt: TClipboardFormat;\r\n ms: TMemoryStream;\r\n sz: int64;\r\nbegin\r\n Result := '';\r\n fmt := Clipboard.FindFormatID(GetFormat(cfHTML));\r\n if fmt <> 0 then\r\n begin\r\n ms := TMemoryStream.Create;\r\n try\r\n if Clipboard.GetFormat(fmt, ms) then\r\n begin\r\n sz := ms.Size;\r\n if (sz > 0) and (PChar(ms.Memory)[sz-1]=#0) then\r\n Dec(sz);\r\n\r\n ms.Position := 0;\r\n SetLength(Result, sz);\r\n if sz > 0 then\r\n ms.Read(Result[1], sz);\r\n end;\r\n finally\r\n ms.Free;\r\n end;\r\n end;\r\n{$ENDIF}\r\nend;\r\n\r\n{$ENDIF}\r\n\r\nclass function TTMSFNCClipBoard.HasContent: Boolean;\r\nbegin\r\n Result := HasFormat(TTMSFNCClipBoardFormat.cfText)\r\n or HasFormat(TTMSFNCClipBoardFormat.cfRTF)\r\n or HasFormat(TTMSFNCClipBoardFormat.cfBitmap)\r\n or HasFormat(TTMSFNCClipBoardFormat.cfBitmapWin)\r\n or HasFormat(TTMSFNCClipBoardFormat.cfRichTextStream)\r\n or HasFormat(TTMSFNCClipBoardFormat.cfStream);\r\nend;\r\n\r\n{$IFDEF ANDROID}\r\nprocedure TTMSFNCUtilsDialogSelectFileListener.onClick(dialog: JDialogInterface; which: Integer);\r\nvar\r\n f: JFile;\r\n s: JCharSequence;\r\n fn: string;\r\nbegin\r\n s := FFileList.Items[which];\r\n if JCharSequenceToStr(s) = '..' then\r\n f := FCurrentPath.getParentFile\r\n else\r\n f := TJFile.JavaClass.init(s.toString);\r\n\r\n if f.isDirectory then\r\n begin\r\n if FFileMode = ufmSave then\r\n FSelectedFile := JStringToString(f.toString);\r\n\r\n LoadFileList(f, FFilter);\r\n FDialog.cancel;\r\n FDialog.dismiss;\r\n CallInUIThreadAndWaitFinishing(\r\n procedure\r\n begin\r\n ShowDialog(f);\r\n end\r\n );\r\n end\r\n else\r\n begin\r\n FSelectedFile := JStringToString(f.toString);\r\n fn := FSelectedFile;\r\n if FFileMode = ufmSave then\r\n begin\r\n if ExtractFileExt(FSelectedFile) = '' then\r\n fn := TTMSFNCUtils.AddBackslash(fn) + FFileExt;\r\n end;\r\n\r\n FSelectedFile := fn;\r\n\r\n if Assigned(FCallBack) then\r\n begin\r\n FCallBack(fn, True);\r\n FCallBack := nil;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCUtilsDialogDismissListener.onDismiss(dialog: JDialogInterface);\r\nbegin\r\n if Assigned(FCallBack) then\r\n begin\r\n FCallBack('', False);\r\n FCallBack := nil;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCUtilsDialogSelectDirectoryListener.onClick(dialog: JDialogInterface; which: Integer);\r\nbegin\r\n if Assigned(FCallBack) then\r\n begin\r\n FCallBack(FSelectedFile, true);\r\n FCallBack := nil;\r\n end;\r\nend;\r\n{$ENDIF}\r\n\r\n{$IFDEF IOS}\r\n\r\n{ TUIDocumentPickerDelegate }\r\n\r\nprocedure TUIDocumentPickerDelegate.documentPicker(\r\n controller: UIDocumentPickerViewController; didPickDocumentsAtURLs: NSArray);\r\nvar\r\n fn: string;\r\nbegin\r\n if didPickDocumentsAtURLs.count > 0 then\r\n begin\r\n FSelectedFile := UTF8ToString(TNSURL.Wrap(didPickDocumentsAtURLs.objectAtIndex(0)).path.UTF8String);\r\n fn := FSelectedFile;\r\n if FFileMode = ufmSave then\r\n begin\r\n if ExtractFileExt(FSelectedFile) = '' then\r\n fn := TTMSFNCUtils.AddBackslash(fn) + FFileExt;\r\n end;\r\n\r\n if Assigned(FCallBack) then\r\n begin\r\n FCallBack(fn, True);\r\n FCallBack := nil;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TUIDocumentPickerDelegate.documentPickerWasCancelled(\r\n controller: UIDocumentPickerViewController);\r\nbegin\r\n if Assigned(FCallBack) then\r\n begin\r\n FCallBack('', False);\r\n FCallBack := nil;\r\n end;\r\nend;\r\n{$ENDIF}\r\n\r\n{$IFDEF ANDROID}\r\nprocedure InitializeClipboard;\r\nvar\r\n us: JObject;\r\nbegin\r\n us := SharedActivityEx.getSystemService(TJContext.JavaClass.CLIPBOARD_SERVICE);\r\n if us <> nil then\r\n begin\r\n if JStringToString(us.getClass.getName) = 'android.content.ClipboardManager' then\r\n FContentClipboardManager := TJcontent_ClipboardManager.Wrap((us as ILocalObject).GetObjectID)\r\n else if JStringToString(us.getClass.getName) = 'android.text.ClipboardManager' then\r\n FClipboardManager := TJClipboardManager.Wrap((us as ILocalObject).GetObjectID);\r\n end;\r\nend;\r\n\r\n{$ENDIF}\r\n\r\n{$IFDEF FNCLIB}\r\nprocedure RegisterMimeTypes;\r\n procedure AddType(AExt, AMimeType: string);\r\n begin\r\n FMimeTypes.Add(AExt + FMimeTypes.NameValueSeparator + AMimeType);\r\n end;\r\nbegin\r\n AddType('ez', 'application/andrew-inset');\r\n AddType('aw', 'application/applixware');\r\n AddType('atom', 'application/atom+xml');\r\n AddType('atomcat', 'application/atomcat+xml');\r\n AddType('atomsvc', 'application/atomsvc+xml');\r\n AddType('bson', 'application/bson');\r\n AddType('ccxml', 'application/ccxml+xml');\r\n AddType('cdmia', 'application/cdmi-capability');\r\n AddType('cdmic', 'application/cdmi-container');\r\n AddType('cdmid', 'application/cdmi-domain');\r\n AddType('cdmio', 'application/cdmi-object');\r\n AddType('cdmiq', 'application/cdmi-queue');\r\n AddType('cu', 'application/cu-seeme');\r\n AddType('davmount', 'application/davmount+xml');\r\n AddType('dbk', 'application/docbook+xml');\r\n AddType('dssc', 'application/dssc+der');\r\n AddType('xdssc', 'application/dssc+xml');\r\n AddType('ecma', 'application/ecmascript');\r\n AddType('emma', 'application/emma+xml');\r\n AddType('epub', 'application/epub+zip');\r\n AddType('exi', 'application/exi');\r\n AddType('pfr', 'application/font-tdpfr');\r\n AddType('gml', 'application/gml+xml');\r\n AddType('gpx', 'application/gpx+xml');\r\n AddType('gxf', 'application/gxf');\r\n AddType('stk', 'application/hyperstudio');\r\n AddType('ink', 'application/inkml+xml');\r\n AddType('inkml', 'application/inkml+xml');\r\n AddType('ipfix', 'application/ipfix');\r\n AddType('jar', 'application/java-archive');\r\n AddType('ser', 'application/java-serialized-object');\r\n AddType('class', 'application/java-vm');\r\n AddType('js', 'application/javascript');\r\n AddType('json', 'application/json');\r\n AddType('jsonml', 'application/jsonml+json');\r\n AddType('lostxml', 'application/lost+xml');\r\n AddType('hqx', 'application/mac-binhex40');\r\n AddType('cpt', 'application/mac-compactpro');\r\n AddType('mads', 'application/mads+xml');\r\n AddType('mrc', 'application/marc');\r\n AddType('mrcx', 'application/marcxml+xml');\r\n AddType('ma', 'application/mathematica');\r\n AddType('nb', 'application/mathematica');\r\n AddType('mb', 'application/mathematica');\r\n AddType('mathml', 'application/mathml+xml');\r\n AddType('mbox', 'application/mbox');\r\n AddType('mscml', 'application/mediaservercontrol+xml');\r\n AddType('metalink', 'application/metalink+xml');\r\n AddType('meta4', 'application/metalink4+xml');\r\n AddType('mets', 'application/mets+xml');\r\n AddType('mods', 'application/mods+xml');\r\n AddType('m21', 'application/mp21');\r\n AddType('mp21', 'application/mp21');\r\n AddType('mp4s', 'application/mp4');\r\n AddType('doc', 'application/msword');\r\n AddType('dot', 'application/msword');\r\n AddType('mxf', 'application/mxf');\r\n AddType('bin', 'application/octet-stream');\r\n AddType('bpk', 'application/octet-stream');\r\n AddType('class', 'application/octet-stream');\r\n AddType('deploy', 'application/octet-stream');\r\n AddType('dist', 'application/octet-stream');\r\n AddType('distz', 'application/octet-stream');\r\n AddType('dmg', 'application/octet-stream');\r\n AddType('dms', 'application/octet-stream');\r\n AddType('dump', 'application/octet-stream');\r\n AddType('elc', 'application/octet-stream');\r\n AddType('iso', 'application/octet-stream');\r\n AddType('lha', 'application/octet-stream');\r\n AddType('lrf', 'application/octet-stream');\r\n AddType('lzh', 'application/octet-stream');\r\n AddType('mar', 'application/octet-stream');\r\n AddType('pkg', 'application/octet-stream');\r\n AddType('so', 'application/octet-stream');\r\n AddType('oda', 'application/oda');\r\n AddType('opf', 'application/oebps-package+xml');\r\n AddType('ogx', 'application/ogg');\r\n AddType('omdoc', 'application/omdoc+xml');\r\n AddType('onetoc', 'application/onenote');\r\n AddType('onetoc2', 'application/onenote');\r\n AddType('onetmp', 'application/onenote');\r\n AddType('onepkg', 'application/onenote');\r\n AddType('oxps', 'application/oxps');\r\n AddType('xer', 'application/patch-ops-error+xml');\r\n AddType('pdf', 'application/pdf');\r\n AddType('pgp', 'application/pgp-encrypted');\r\n AddType('asc', 'application/pgp-signature');\r\n AddType('sig', 'application/pgp-signature');\r\n AddType('prf', 'application/pics-rules');\r\n AddType('p10', 'application/pkcs10');\r\n AddType('p7m', 'application/pkcs7-mime');\r\n AddType('p7c', 'application/pkcs7-mime');\r\n AddType('p7s', 'application/pkcs7-signature');\r\n AddType('p8', 'application/pkcs8');\r\n AddType('ac', 'application/pkix-attr-cert');\r\n AddType('cer', 'application/pkix-cert');\r\n AddType('crl', 'application/pkix-crl');\r\n AddType('pkipath', 'application/pkix-pkipath');\r\n AddType('pki', 'application/pkixcmp');\r\n AddType('pls', 'application/pls+xml');\r\n AddType('ai', 'application/postscript');\r\n AddType('eps', 'application/postscript');\r\n AddType('ps', 'application/postscript');\r\n AddType('cww', 'application/prs.cww');\r\n AddType('pskcxml', 'application/pskc+xml');\r\n AddType('rdf', 'application/rdf+xml');\r\n AddType('rif', 'application/reginfo+xml');\r\n AddType('rnc', 'application/relax-ng-compact-syntax');\r\n AddType('rl', 'application/resource-lists+xml');\r\n AddType('rld', 'application/resource-lists-diff+xml');\r\n AddType('rs', 'application/rls-services+xml');\r\n AddType('gbr', 'application/rpki-ghostbusters');\r\n AddType('mft', 'application/rpki-manifest');\r\n AddType('roa', 'application/rpki-roa');\r\n AddType('rsd', 'application/rsd+xml');\r\n AddType('rss', 'application/rss+xml');\r\n AddType('rtf', 'application/rtf');\r\n AddType('sbml', 'application/sbml+xml');\r\n AddType('scq', 'application/scvp-cv-request');\r\n AddType('scs', 'application/scvp-cv-response');\r\n AddType('spq', 'application/scvp-vp-request');\r\n AddType('spp', 'application/scvp-vp-response');\r\n AddType('sdp', 'application/sdp');\r\n AddType('setpay', 'application/set-payment-initiation');\r\n AddType('setreg', 'application/set-registration-initiation');\r\n AddType('shf', 'application/shf+xml');\r\n AddType('smi', 'application/smil+xml');\r\n AddType('smil', 'application/smil+xml');\r\n AddType('soap', 'application/soap+xml');\r\n AddType('rq', 'application/sparql-query');\r\n AddType('srx', 'application/sparql-results+xml');\r\n AddType('gram', 'application/srgs');\r\n AddType('grxml', 'application/srgs+xml');\r\n AddType('sru', 'application/sru+xml');\r\n AddType('ssdl', 'application/ssdl+xml');\r\n AddType('ssml', 'application/ssml+xml');\r\n AddType('tei', 'application/tei+xml');\r\n AddType('teicorpus', 'application/tei+xml');\r\n AddType('tfi', 'application/thraud+xml');\r\n AddType('tsd', 'application/timestamped-data');\r\n AddType('plb', 'application/vnd.3gpp.pic-bw-large');\r\n AddType('psb', 'application/vnd.3gpp.pic-bw-small');\r\n AddType('pvb', 'application/vnd.3gpp.pic-bw-var');\r\n AddType('tcap', 'application/vnd.3gpp2.tcap');\r\n AddType('pwn', 'application/vnd.3m.post-it-notes');\r\n AddType('aso', 'application/vnd.accpac.simply.aso');\r\n AddType('imp', 'application/vnd.accpac.simply.imp');\r\n AddType('acu', 'application/vnd.acucobol');\r\n AddType('atc', 'application/vnd.acucorp');\r\n AddType('acutc', 'application/vnd.acucorp');\r\n AddType('air', 'application/vnd.adobe.air-application-installer-package+zip');\r\n AddType('fcdt', 'application/vnd.adobe.formscentral.fcdt');\r\n AddType('fxp', 'application/vnd.adobe.fxp');\r\n AddType('fxpl', 'application/vnd.adobe.fxp');\r\n AddType('xdp', 'application/vnd.adobe.xdp+xml');\r\n AddType('xfdf', 'application/vnd.adobe.xfdf');\r\n AddType('ahead', 'application/vnd.ahead.space');\r\n AddType('azf', 'application/vnd.airzip.filesecure.azf');\r\n AddType('azs', 'application/vnd.airzip.filesecure.azs');\r\n AddType('azw', 'application/vnd.amazon.ebook');\r\n AddType('acc', 'application/vnd.americandynamics.acc');\r\n AddType('ami', 'application/vnd.amiga.ami');\r\n AddType('apk', 'application/vnd.android.package-archive');\r\n AddType('cii', 'application/vnd.anser-web-certificate-issue-initiation');\r\n AddType('fti', 'application/vnd.anser-web-funds-transfer-initiation');\r\n AddType('atx', 'application/vnd.antix.game-component');\r\n AddType('mpkg', 'application/vnd.apple.installer+xml');\r\n AddType('m3u8', 'application/vnd.apple.mpegurl');\r\n AddType('swi', 'application/vnd.aristanetworks.swi');\r\n AddType('iota', 'application/vnd.astraea-software.iota');\r\n AddType('aep', 'application/vnd.audiograph');\r\n AddType('mpm', 'application/vnd.blueice.multipass');\r\n AddType('bmi', 'application/vnd.bmi');\r\n AddType('rep', 'application/vnd.businessobjects');\r\n AddType('cdxml', 'application/vnd.chemdraw+xml');\r\n AddType('mmd', 'application/vnd.chipnuts.karaoke-mmd');\r\n AddType('cdy', 'application/vnd.cinderella');\r\n AddType('cla', 'application/vnd.claymore');\r\n AddType('rp9', 'application/vnd.cloanto.rp9');\r\n AddType('c4g', 'application/vnd.clonk.c4group');\r\n AddType('c4d', 'application/vnd.clonk.c4group');\r\n AddType('c4f', 'application/vnd.clonk.c4group');\r\n AddType('c4p', 'application/vnd.clonk.c4group');\r\n AddType('c4u', 'application/vnd.clonk.c4group');\r\n AddType('c11amc', 'application/vnd.cluetrust.cartomobile-config');\r\n AddType('c11amz', 'application/vnd.cluetrust.cartomobile-config-pkg');\r\n AddType('csp', 'application/vnd.commonspace');\r\n AddType('cdbcmsg', 'application/vnd.contact.cmsg');\r\n AddType('cmc', 'application/vnd.cosmocaller');\r\n AddType('clkx', 'application/vnd.crick.clicker');\r\n AddType('clkk', 'application/vnd.crick.clicker.keyboard');\r\n AddType('clkp', 'application/vnd.crick.clicker.palette');\r\n AddType('clkt', 'application/vnd.crick.clicker.template');\r\n AddType('clkw', 'application/vnd.crick.clicker.wordbank');\r\n AddType('wbs', 'application/vnd.criticaltools.wbs+xml');\r\n AddType('pml', 'application/vnd.ctc-posml');\r\n AddType('ppd', 'application/vnd.cups-ppd');\r\n AddType('car', 'application/vnd.curl.car');\r\n AddType('pcurl', 'application/vnd.curl.pcurl');\r\n AddType('dart', 'application/vnd.dart');\r\n AddType('rdz', 'application/vnd.data-vision.rdz');\r\n AddType('uvf', 'application/vnd.dece.data');\r\n AddType('uvvf', 'application/vnd.dece.data');\r\n AddType('uvd', 'application/vnd.dece.data');\r\n AddType('uvvd', 'application/vnd.dece.data');\r\n AddType('uvt', 'application/vnd.dece.ttml+xml');\r\n AddType('uvvt', 'application/vnd.dece.ttml+xml');\r\n AddType('uvx', 'application/vnd.dece.unspecified');\r\n AddType('uvvx', 'application/vnd.dece.unspecified');\r\n AddType('uvz', 'application/vnd.dece.zip');\r\n AddType('uvvz', 'application/vnd.dece.zip');\r\n AddType('fe_launch', 'application/vnd.denovo.fcselayout-link');\r\n AddType('dna', 'application/vnd.dna');\r\n AddType('mlp', 'application/vnd.dolby.mlp');\r\n AddType('dpg', 'application/vnd.dpgraph');\r\n AddType('dfac', 'application/vnd.dreamfactory');\r\n AddType('kpxx', 'application/vnd.ds-keypoint');\r\n AddType('ait', 'application/vnd.dvb.ait');\r\n AddType('svc', 'application/vnd.dvb.service');\r\n AddType('geo', 'application/vnd.dynageo');\r\n AddType('mag', 'application/vnd.ecowin.chart');\r\n AddType('nml', 'application/vnd.enliven');\r\n AddType('esf', 'application/vnd.epson.esf');\r\n AddType('msf', 'application/vnd.epson.msf');\r\n AddType('qam', 'application/vnd.epson.quickanime');\r\n AddType('slt', 'application/vnd.epson.salt');\r\n AddType('ssf', 'application/vnd.epson.ssf');\r\n AddType('es3', 'application/vnd.eszigno3+xml');\r\n AddType('et3', 'application/vnd.eszigno3+xml');\r\n AddType('ez2', 'application/vnd.ezpix-album');\r\n AddType('ez3', 'application/vnd.ezpix-package');\r\n AddType('fdf', 'application/vnd.fdf');\r\n AddType('mseed', 'application/vnd.fdsn.mseed');\r\n AddType('seed', 'application/vnd.fdsn.seed');\r\n AddType('dataless', 'application/vnd.fdsn.seed');\r\n AddType('json', 'application/vnd.firedac.json');\r\n AddType('xml', 'application/vnd.firedac.xml');\r\n AddType('bin', 'application/vnd.firedac.bin');\r\n AddType('gph', 'application/vnd.flographit');\r\n AddType('ftc', 'application/vnd.fluxtime.clip');\r\n AddType('fm', 'application/vnd.framemaker');\r\n AddType('frame', 'application/vnd.framemaker');\r\n AddType('maker', 'application/vnd.framemaker');\r\n AddType('book', 'application/vnd.framemaker');\r\n AddType('fnc', 'application/vnd.frogans.fnc');\r\n AddType('ltf', 'application/vnd.frogans.ltf');\r\n AddType('fsc', 'application/vnd.fsc.weblaunch');\r\n AddType('oas', 'application/vnd.fujitsu.oasys');\r\n AddType('oa2', 'application/vnd.fujitsu.oasys2');\r\n AddType('oa3', 'application/vnd.fujitsu.oasys3');\r\n AddType('fg5', 'application/vnd.fujitsu.oasysgp');\r\n AddType('bh2', 'application/vnd.fujitsu.oasysprs');\r\n AddType('ddd', 'application/vnd.fujixerox.ddd');\r\n AddType('xdw', 'application/vnd.fujixerox.docuworks');\r\n AddType('xbd', 'application/vnd.fujixerox.docuworks.binder');\r\n AddType('fzs', 'application/vnd.fuzzysheet');\r\n AddType('txd', 'application/vnd.genomatix.tuxedo');\r\n AddType('ggb', 'application/vnd.geogebra.file');\r\n AddType('ggt', 'application/vnd.geogebra.tool');\r\n AddType('gex', 'application/vnd.geometry-explorer');\r\n AddType('gre', 'application/vnd.geometry-explorer');\r\n AddType('gxt', 'application/vnd.geonext');\r\n AddType('g2w', 'application/vnd.geoplan');\r\n AddType('g3w', 'application/vnd.geospace');\r\n AddType('gmx', 'application/vnd.gmx');\r\n AddType('kml', 'application/vnd.google-earth.kml+xml');\r\n AddType('kmz', 'application/vnd.google-earth.kmz');\r\n AddType('gqf', 'application/vnd.grafeq');\r\n AddType('gqs', 'application/vnd.grafeq');\r\n AddType('gac', 'application/vnd.groove-account');\r\n AddType('ghf', 'application/vnd.groove-help');\r\n AddType('gim', 'application/vnd.groove-identity-message');\r\n AddType('grv', 'application/vnd.groove-injector');\r\n AddType('gtm', 'application/vnd.groove-tool-message');\r\n AddType('tpl', 'application/vnd.groove-tool-template');\r\n AddType('vcg', 'application/vnd.groove-vcard');\r\n AddType('hal', 'application/vnd.hal+xml');\r\n AddType('zmm', 'application/vnd.handheld-entertainment+xml');\r\n AddType('hbci', 'application/vnd.hbci');\r\n AddType('les', 'application/vnd.hhe.lesson-player');\r\n AddType('hpgl', 'application/vnd.hp-hpgl');\r\n AddType('hpid', 'application/vnd.hp-hpid');\r\n AddType('hps', 'application/vnd.hp-hps');\r\n AddType('jlt', 'application/vnd.hp-jlyt');\r\n AddType('pcl', 'application/vnd.hp-pcl');\r\n AddType('pclxl', 'application/vnd.hp-pclxl');\r\n AddType('sfd-hdstx', 'application/vnd.hydrostatix.sof-data');\r\n AddType('mpy', 'application/vnd.ibm.minipay');\r\n AddType('afp', 'application/vnd.ibm.modcap');\r\n AddType('listafp', 'application/vnd.ibm.modcap');\r\n AddType('list3820', 'application/vnd.ibm.modcap');\r\n AddType('irm', 'application/vnd.ibm.rights-management');\r\n AddType('sc', 'application/vnd.ibm.secure-container');\r\n AddType('icc', 'application/vnd.iccprofile');\r\n AddType('icm', 'application/vnd.iccprofile');\r\n AddType('igl', 'application/vnd.igloader');\r\n AddType('ivp', 'application/vnd.immervision-ivp');\r\n AddType('ivu', 'application/vnd.immervision-ivu');\r\n AddType('igm', 'application/vnd.insors.igm');\r\n AddType('xpw', 'application/vnd.intercon.formnet');\r\n AddType('xpx', 'application/vnd.intercon.formnet');\r\n AddType('i2g', 'application/vnd.intergeo');\r\n AddType('qbo', 'application/vnd.intu.qbo');\r\n AddType('qfx', 'application/vnd.intu.qfx');\r\n AddType('rcprofile', 'application/vnd.ipunplugged.rcprofile');\r\n AddType('irp', 'application/vnd.irepository.package+xml');\r\n AddType('xpr', 'application/vnd.is-xpr');\r\n AddType('fcs', 'application/vnd.isac.fcs');\r\n AddType('jam', 'application/vnd.jam');\r\n AddType('rms', 'application/vnd.jcp.javame.midlet-rms');\r\n AddType('jisp', 'application/vnd.jisp');\r\n AddType('joda', 'application/vnd.joost.joda-archive');\r\n AddType('ktz', 'application/vnd.kahootz');\r\n AddType('ktr', 'application/vnd.kahootz');\r\n AddType('karbon', 'application/vnd.kde.karbon');\r\n AddType('chrt', 'application/vnd.kde.kchart');\r\n AddType('kfo', 'application/vnd.kde.kformula');\r\n AddType('flw', 'application/vnd.kde.kivio');\r\n AddType('kon', 'application/vnd.kde.kontour');\r\n AddType('kpr', 'application/vnd.kde.kpresenter');\r\n AddType('kpt', 'application/vnd.kde.kpresenter');\r\n AddType('ksp', 'application/vnd.kde.kspread');\r\n AddType('kwd', 'application/vnd.kde.kword');\r\n AddType('kwt', 'application/vnd.kde.kword');\r\n AddType('htke', 'application/vnd.kenameaapp');\r\n AddType('kia', 'application/vnd.kidspiration');\r\n AddType('kne', 'application/vnd.kinar');\r\n AddType('knp', 'application/vnd.kinar');\r\n AddType('skp', 'application/vnd.koan');\r\n AddType('skd', 'application/vnd.koan');\r\n AddType('skt', 'application/vnd.koan');\r\n AddType('skm', 'application/vnd.koan');\r\n AddType('sse', 'application/vnd.kodak-descriptor');\r\n AddType('lasxml', 'application/vnd.las.las+xml');\r\n AddType('lbd', 'application/vnd.llamagraphics.life-balance.desktop');\r\n AddType('lbe', 'application/vnd.llamagraphics.life-balance.exchange+xml');\r\n AddType('123', 'application/vnd.lotus-1-2-3');\r\n AddType('apr', 'application/vnd.lotus-approach');\r\n AddType('pre', 'application/vnd.lotus-freelance');\r\n AddType('nsf', 'application/vnd.lotus-notes');\r\n AddType('org', 'application/vnd.lotus-organizer');\r\n AddType('scm', 'application/vnd.lotus-screencam');\r\n AddType('lwp', 'application/vnd.lotus-wordpro');\r\n AddType('portpkg', 'application/vnd.macports.portpkg');\r\n AddType('mcd', 'application/vnd.mcd');\r\n AddType('mc1', 'application/vnd.medcalcdata');\r\n AddType('cdkey', 'application/vnd.mediastation.cdkey');\r\n AddType('mwf', 'application/vnd.mfer');\r\n AddType('mfm', 'application/vnd.mfmp');\r\n AddType('flo', 'application/vnd.micrografx.flo');\r\n AddType('igx', 'application/vnd.micrografx.igx');\r\n AddType('mif', 'application/vnd.mif');\r\n AddType('daf', 'application/vnd.mobius.daf');\r\n AddType('dis', 'application/vnd.mobius.dis');\r\n AddType('mbk', 'application/vnd.mobius.mbk');\r\n AddType('mqy', 'application/vnd.mobius.mqy');\r\n AddType('msl', 'application/vnd.mobius.msl');\r\n AddType('plc', 'application/vnd.mobius.plc');\r\n AddType('txf', 'application/vnd.mobius.txf');\r\n AddType('mpn', 'application/vnd.mophun.application');\r\n AddType('mpc', 'application/vnd.mophun.certificate');\r\n AddType('xul', 'application/vnd.mozilla.xul+xml');\r\n AddType('cil', 'application/vnd.ms-artgalry');\r\n AddType('cab', 'application/vnd.ms-cab-compressed');\r\n AddType('xls', 'application/vnd.ms-excel');\r\n AddType('xlm', 'application/vnd.ms-excel');\r\n AddType('xla', 'application/vnd.ms-excel');\r\n AddType('xlc', 'application/vnd.ms-excel');\r\n AddType('xlt', 'application/vnd.ms-excel');\r\n AddType('xlw', 'application/vnd.ms-excel');\r\n AddType('xlam', 'application/vnd.ms-excel.addin.macroenabled.12');\r\n AddType('xlsb', 'application/vnd.ms-excel.sheet.binary.macroenabled.12');\r\n AddType('xlsm', 'application/vnd.ms-excel.sheet.macroenabled.12');\r\n AddType('xltm', 'application/vnd.ms-excel.template.macroenabled.12');\r\n AddType('eot', 'application/vnd.ms-fontobject');\r\n AddType('chm', 'application/vnd.ms-htmlhelp');\r\n AddType('ims', 'application/vnd.ms-ims');\r\n AddType('lrm', 'application/vnd.ms-lrm');\r\n AddType('thmx', 'application/vnd.ms-officetheme');\r\n AddType('cat', 'application/vnd.ms-pki.seccat');\r\n AddType('stl', 'application/vnd.ms-pki.stl');\r\n AddType('ppt', 'application/vnd.ms-powerpoint');\r\n AddType('pps', 'application/vnd.ms-powerpoint');\r\n AddType('pot', 'application/vnd.ms-powerpoint');\r\n AddType('ppam', 'application/vnd.ms-powerpoint.addin.macroenabled.12');\r\n AddType('pptm', 'application/vnd.ms-powerpoint.presentation.macroenabled.12');\r\n AddType('sldm', 'application/vnd.ms-powerpoint.slide.macroenabled.12');\r\n AddType('ppsm', 'application/vnd.ms-powerpoint.slideshow.macroenabled.12');\r\n AddType('potm', 'application/vnd.ms-powerpoint.template.macroenabled.12');\r\n AddType('mpp', 'application/vnd.ms-project');\r\n AddType('mpt', 'application/vnd.ms-project');\r\n AddType('docm', 'application/vnd.ms-word.document.macroenabled.12');\r\n AddType('dotm', 'application/vnd.ms-word.template.macroenabled.12');\r\n AddType('wps', 'application/vnd.ms-works');\r\n AddType('wks', 'application/vnd.ms-works');\r\n AddType('wcm', 'application/vnd.ms-works');\r\n AddType('wdb', 'application/vnd.ms-works');\r\n AddType('wpl', 'application/vnd.ms-wpl');\r\n AddType('xps', 'application/vnd.ms-xpsdocument');\r\n AddType('mseq', 'application/vnd.mseq');\r\n AddType('mus', 'application/vnd.musician');\r\n AddType('msty', 'application/vnd.muvee.style');\r\n AddType('taglet', 'application/vnd.mynfc');\r\n AddType('nlu', 'application/vnd.neurolanguage.nlu');\r\n AddType('ntf', 'application/vnd.nitf');\r\n AddType('nitf', 'application/vnd.nitf');\r\n AddType('nnd', 'application/vnd.noblenet-directory');\r\n AddType('nns', 'application/vnd.noblenet-sealer');\r\n AddType('nnw', 'application/vnd.noblenet-web');\r\n AddType('ngdat', 'application/vnd.nokia.n-gage.data');\r\n AddType('n-gage', 'application/vnd.nokia.n-gage.symbian.install');\r\n AddType('rpst', 'application/vnd.nokia.radio-preset');\r\n AddType('rpss', 'application/vnd.nokia.radio-presets');\r\n AddType('edm', 'application/vnd.novadigm.edm');\r\n AddType('edx', 'application/vnd.novadigm.edx');\r\n AddType('FExt', 'application/vnd.novadigm.FExt');\r\n AddType('odc', 'application/vnd.oasis.opendocument.chart');\r\n AddType('otc', 'application/vnd.oasis.opendocument.chart-template');\r\n AddType('odb', 'application/vnd.oasis.opendocument.database');\r\n AddType('odf', 'application/vnd.oasis.opendocument.formula');\r\n AddType('odft', 'application/vnd.oasis.opendocument.formula-template');\r\n AddType('odg', 'application/vnd.oasis.opendocument.graphics');\r\n AddType('otg', 'application/vnd.oasis.opendocument.graphics-template');\r\n AddType('odi', 'application/vnd.oasis.opendocument.image');\r\n AddType('oti', 'application/vnd.oasis.opendocument.image-template');\r\n AddType('odp', 'application/vnd.oasis.opendocument.presentation');\r\n AddType('otp', 'application/vnd.oasis.opendocument.presentation-template');\r\n AddType('ods', 'application/vnd.oasis.opendocument.spreadsheet');\r\n AddType('ots', 'application/vnd.oasis.opendocument.spreadsheet-template');\r\n AddType('odt', 'application/vnd.oasis.opendocument.text');\r\n AddType('odm', 'application/vnd.oasis.opendocument.text-master');\r\n AddType('ott', 'application/vnd.oasis.opendocument.text-template');\r\n AddType('oth', 'application/vnd.oasis.opendocument.text-web');\r\n AddType('xo', 'application/vnd.olpc-sugar');\r\n AddType('dd2', 'application/vnd.oma.dd2+xml');\r\n AddType('oxt', 'application/vnd.openofficeorg.extension');\r\n AddType('pptx', 'application/vnd.openxmlformats-officedocument.presentationml.presentation');\r\n AddType('sldx', 'application/vnd.openxmlformats-officedocument.presentationml.slide');\r\n AddType('ppsx', 'application/vnd.openxmlformats-officedocument.presentationml.slideshow');\r\n AddType('potx', 'application/vnd.openxmlformats-officedocument.presentationml.template');\r\n AddType('xlsx', 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet');\r\n AddType('xltx', 'application/vnd.openxmlformats-officedocument.spreadsheetml.template');\r\n AddType('docx', 'application/vnd.openxmlformats-officedocument.wordprocessingml.document');\r\n AddType('dotx', 'application/vnd.openxmlformats-officedocument.wordprocessingml.template');\r\n AddType('mgp', 'application/vnd.osgeo.mapguide.package');\r\n AddType('dp', 'application/vnd.osgi.dp');\r\n AddType('esa', 'application/vnd.osgi.subsystem');\r\n AddType('pdb', 'application/vnd.palm');\r\n AddType('pqa', 'application/vnd.palm');\r\n AddType('oprc', 'application/vnd.palm');\r\n AddType('paw', 'application/vnd.pawaafile');\r\n AddType('str', 'application/vnd.pg.format');\r\n AddType('ei6', 'application/vnd.pg.osasli');\r\n AddType('efif', 'application/vnd.picsel');\r\n AddType('wg', 'application/vnd.pmi.widget');\r\n AddType('plf', 'application/vnd.pocketlearn');\r\n AddType('pbd', 'application/vnd.powerbuilder6');\r\n AddType('box', 'application/vnd.previewsystems.box');\r\n AddType('mgz', 'application/vnd.proteus.magazine');\r\n AddType('qps', 'application/vnd.publishare-delta-tree');\r\n AddType('ptid', 'application/vnd.pvi.ptid1');\r\n AddType('qxd', 'application/vnd.quark.quarkxpress');\r\n AddType('qxt', 'application/vnd.quark.quarkxpress');\r\n AddType('qwd', 'application/vnd.quark.quarkxpress');\r\n AddType('qwt', 'application/vnd.quark.quarkxpress');\r\n AddType('qxl', 'application/vnd.quark.quarkxpress');\r\n AddType('qxb', 'application/vnd.quark.quarkxpress');\r\n AddType('bed', 'application/vnd.realvnc.bed');\r\n AddType('mxl', 'application/vnd.recordare.musicxml');\r\n AddType('musicxml', 'application/vnd.recordare.musicxml+xml');\r\n AddType('cryptonote', 'application/vnd.rig.cryptonote');\r\n AddType('cod', 'application/vnd.rim.cod');\r\n AddType('rm', 'application/vnd.rn-realmedia');\r\n AddType('rmvb', 'application/vnd.rn-realmedia-vbr');\r\n AddType('link66', 'application/vnd.route66.link66+xml');\r\n AddType('st', 'application/vnd.sailingtracker.track');\r\n AddType('see', 'application/vnd.seemail');\r\n AddType('sema', 'application/vnd.sema');\r\n AddType('semd', 'application/vnd.semd');\r\n AddType('semf', 'application/vnd.semf');\r\n AddType('ifm', 'application/vnd.shana.informed.formdata');\r\n AddType('itp', 'application/vnd.shana.informed.formtemplate');\r\n AddType('iif', 'application/vnd.shana.informed.interchange');\r\n AddType('ipk', 'application/vnd.shana.informed.package');\r\n AddType('twd', 'application/vnd.simtech-mindmapper');\r\n AddType('twds', 'application/vnd.simtech-mindmapper');\r\n AddType('mmf', 'application/vnd.smaf');\r\n AddType('teacher', 'application/vnd.smart.teacher');\r\n AddType('sdkm', 'application/vnd.solent.sdkm+xml');\r\n AddType('sdkd', 'application/vnd.solent.sdkm+xml');\r\n AddType('dxp', 'application/vnd.spotfire.dxp');\r\n AddType('sfs', 'application/vnd.spotfire.sfs');\r\n AddType('sdc', 'application/vnd.stardivision.calc');\r\n AddType('sda', 'application/vnd.stardivision.draw');\r\n AddType('sdd', 'application/vnd.stardivision.impress');\r\n AddType('smf', 'application/vnd.stardivision.math');\r\n AddType('sdw', 'application/vnd.stardivision.writer');\r\n AddType('vor', 'application/vnd.stardivision.writer');\r\n AddType('sgl', 'application/vnd.stardivision.writer-global');\r\n AddType('smzip', 'application/vnd.stepmania.package');\r\n AddType('sm', 'application/vnd.stepmania.stepchart');\r\n AddType('sxc', 'application/vnd.sun.xml.calc');\r\n AddType('stc', 'application/vnd.sun.xml.calc.template');\r\n AddType('sxd', 'application/vnd.sun.xml.draw');\r\n AddType('std', 'application/vnd.sun.xml.draw.template');\r\n AddType('sxi', 'application/vnd.sun.xml.impress');\r\n AddType('sti', 'application/vnd.sun.xml.impress.template');\r\n AddType('sxm', 'application/vnd.sun.xml.math');\r\n AddType('sxw', 'application/vnd.sun.xml.writer');\r\n AddType('sxg', 'application/vnd.sun.xml.writer.global');\r\n AddType('stw', 'application/vnd.sun.xml.writer.template');\r\n AddType('sus', 'application/vnd.sus-calendar');\r\n AddType('susp', 'application/vnd.sus-calendar');\r\n AddType('svd', 'application/vnd.svd');\r\n AddType('sis', 'application/vnd.symbian.install');\r\n AddType('sisx', 'application/vnd.symbian.install');\r\n AddType('xsm', 'application/vnd.syncml+xml');\r\n AddType('bdm', 'application/vnd.syncml.dm+wbxml');\r\n AddType('xdm', 'application/vnd.syncml.dm+xml');\r\n AddType('tao', 'application/vnd.tao.intent-module-archive');\r\n AddType('pcap', 'application/vnd.tcpdump.pcap');\r\n AddType('cap', 'application/vnd.tcpdump.pcap');\r\n AddType('dmp', 'application/vnd.tcpdump.pcap');\r\n AddType('tmo', 'application/vnd.tmobile-livetv');\r\n AddType('tpt', 'application/vnd.trid.tpt');\r\n AddType('mxs', 'application/vnd.triscape.mxs');\r\n AddType('tra', 'application/vnd.trueapp');\r\n AddType('ufd', 'application/vnd.ufdl');\r\n AddType('ufdl', 'application/vnd.ufdl');\r\n AddType('utz', 'application/vnd.uiq.theme');\r\n AddType('umj', 'application/vnd.umajin');\r\n AddType('unityweb', 'application/vnd.unity');\r\n AddType('uoml', 'application/vnd.uoml+xml');\r\n AddType('vcx', 'application/vnd.vcx');\r\n AddType('vsd', 'application/vnd.visio');\r\n AddType('vst', 'application/vnd.visio');\r\n AddType('vss', 'application/vnd.visio');\r\n AddType('vsw', 'application/vnd.visio');\r\n AddType('vis', 'application/vnd.visionary');\r\n AddType('vsf', 'application/vnd.vsf');\r\n AddType('wbxml', 'application/vnd.wap.wbxml');\r\n AddType('wmlc', 'application/vnd.wap.wmlc');\r\n AddType('wmlsc', 'application/vnd.wap.wmlscriptc');\r\n AddType('wtb', 'application/vnd.webturbo');\r\n AddType('nbp', 'application/vnd.wolfram.player');\r\n AddType('wpd', 'application/vnd.wordperfect');\r\n AddType('wqd', 'application/vnd.wqd');\r\n AddType('stf', 'application/vnd.wt.stf');\r\n AddType('xar', 'application/vnd.xara');\r\n AddType('xfdl', 'application/vnd.xfdl');\r\n AddType('hvd', 'application/vnd.yamaha.hv-dic');\r\n AddType('hvs', 'application/vnd.yamaha.hv-script');\r\n AddType('hvp', 'application/vnd.yamaha.hv-voice');\r\n AddType('osf', 'application/vnd.yamaha.openscoreformat');\r\n AddType('osfpvg', 'application/vnd.yamaha.openscoreformat.osfpvg+xml');\r\n AddType('saf', 'application/vnd.yamaha.smaf-audio');\r\n AddType('spf', 'application/vnd.yamaha.smaf-phrase');\r\n AddType('cmp', 'application/vnd.yellowriver-custom-menu');\r\n AddType('zir', 'application/vnd.zul');\r\n AddType('zirz', 'application/vnd.zul');\r\n AddType('zaz', 'application/vnd.zzazz.deck+xml');\r\n AddType('vxml', 'application/voicexml+xml');\r\n AddType('wgt', 'application/widget');\r\n AddType('hlp', 'application/winhlp');\r\n AddType('wsdl', 'application/wsdl+xml');\r\n AddType('wspolicy', 'application/wspolicy+xml');\r\n AddType('7z', 'application/x-7z-compressed');\r\n AddType('abw', 'application/x-abiword');\r\n AddType('ace', 'application/x-ace-compressed');\r\n AddType('dmg', 'application/x-apple-diskimage');\r\n AddType('aab', 'application/x-authorware-bin');\r\n AddType('x32', 'application/x-authorware-bin');\r\n AddType('u32', 'application/x-authorware-bin');\r\n AddType('vox', 'application/x-authorware-bin');\r\n AddType('aam', 'application/x-authorware-map');\r\n AddType('aas', 'application/x-authorware-seg');\r\n AddType('bcpio', 'application/x-bcpio');\r\n AddType('torrent', 'application/x-bittorrent');\r\n AddType('blb', 'application/x-blorb');\r\n AddType('blorb', 'application/x-blorb');\r\n AddType('bz', 'application/x-bzip');\r\n AddType('bz2', 'application/x-bzip2');\r\n AddType('boz', 'application/x-bzip2');\r\n AddType('cbr', 'application/x-cbr');\r\n AddType('cba', 'application/x-cbr');\r\n AddType('cbt', 'application/x-cbr');\r\n AddType('cbz', 'application/x-cbr');\r\n AddType('cb7', 'application/x-cbr');\r\n AddType('vcd', 'application/x-cdlink');\r\n AddType('cfs', 'application/x-cfs-compressed');\r\n AddType('chat', 'application/x-chat');\r\n AddType('pgn', 'application/x-chess-pgn');\r\n AddType('nsc', 'application/x-conference');\r\n AddType('cpio', 'application/x-cpio');\r\n AddType('csh', 'application/x-csh');\r\n AddType('deb', 'application/x-debian-package');\r\n AddType('udeb', 'application/x-debian-package');\r\n AddType('dgc', 'application/x-dgc-compressed');\r\n AddType('dir', 'application/x-director');\r\n AddType('dcr', 'application/x-director');\r\n AddType('dxr', 'application/x-director');\r\n AddType('cst', 'application/x-director');\r\n AddType('cct', 'application/x-director');\r\n AddType('cxt', 'application/x-director');\r\n AddType('w3d', 'application/x-director');\r\n AddType('fgd', 'application/x-director');\r\n AddType('swa', 'application/x-director');\r\n AddType('wad', 'application/x-doom');\r\n AddType('ncx', 'application/x-dtbncx+xml');\r\n AddType('dtb', 'application/x-dtbook+xml');\r\n AddType('res', 'application/x-dtbresource+xml');\r\n AddType('dvi', 'application/x-dvi');\r\n AddType('evy', 'application/x-envoy');\r\n AddType('eva', 'application/x-eva');\r\n AddType('bdf', 'application/x-font-bdf');\r\n AddType('gsf', 'application/x-font-ghostscript');\r\n AddType('psf', 'application/x-font-linux-psf');\r\n AddType('otf', 'application/x-font-otf');\r\n AddType('pcf', 'application/x-font-pcf');\r\n AddType('snf', 'application/x-font-snf');\r\n AddType('ttf', 'application/x-font-ttf');\r\n AddType('ttc', 'application/x-font-ttf');\r\n AddType('pfa', 'application/x-font-type1');\r\n AddType('pfb', 'application/x-font-type1');\r\n AddType('pfm', 'application/x-font-type1');\r\n AddType('afm', 'application/x-font-type1');\r\n AddType('woff', 'application/x-font-woff');\r\n AddType('arc', 'application/x-freearc');\r\n AddType('spl', 'application/x-futuresplash');\r\n AddType('gca', 'application/x-gca-compressed');\r\n AddType('ulx', 'application/x-glulx');\r\n AddType('gnumeric', 'application/x-gnumeric');\r\n AddType('gramps', 'application/x-gramps-xml');\r\n AddType('gtar', 'application/x-gtar');\r\n AddType('hdf', 'application/x-hdf');\r\n AddType('install', 'application/x-install-instructions');\r\n AddType('iso', 'application/x-iso9660-image');\r\n AddType('jnlp', 'application/x-java-jnlp-file');\r\n AddType('latex', 'application/x-latex');\r\n AddType('lzh', 'application/x-lzh-compressed');\r\n AddType('lha', 'application/x-lzh-compressed');\r\n AddType('mie', 'application/x-mie');\r\n AddType('prc', 'application/x-mobipocket-ebook');\r\n AddType('mobi', 'application/x-mobipocket-ebook');\r\n AddType('application', 'application/x-ms-application');\r\n AddType('lnk', 'application/x-ms-shortcut');\r\n AddType('wmd', 'application/x-ms-wmd');\r\n AddType('wmz', 'application/x-ms-wmz');\r\n AddType('xbap', 'application/x-ms-xbap');\r\n AddType('mdb', 'application/x-msaccess');\r\n AddType('obd', 'application/x-msbinder');\r\n AddType('crd', 'application/x-mscardfile');\r\n AddType('clp', 'application/x-msclip');\r\n AddType('exe', 'application/x-msdownload');\r\n AddType('dll', 'application/x-msdownload');\r\n AddType('com', 'application/x-msdownload');\r\n AddType('bat', 'application/x-msdownload');\r\n AddType('msi', 'application/x-msdownload');\r\n AddType('mvb', 'application/x-msmediaview');\r\n AddType('m13', 'application/x-msmediaview');\r\n AddType('m14', 'application/x-msmediaview');\r\n AddType('wmf', 'application/x-msmetafile');\r\n AddType('wmz', 'application/x-msmetafile');\r\n AddType('emf', 'application/x-msmetafile');\r\n AddType('emz', 'application/x-msmetafile');\r\n AddType('mny', 'application/x-msmoney');\r\n AddType('pub', 'application/x-mspublisher');\r\n AddType('scd', 'application/x-msschedule');\r\n AddType('trm', 'application/x-msterminal');\r\n AddType('wri', 'application/x-mswrite');\r\n AddType('nc', 'application/x-netcdf');\r\n AddType('cdf', 'application/x-netcdf');\r\n AddType('nzb', 'application/x-nzb');\r\n AddType('p12', 'application/x-pkcs12');\r\n AddType('pfx', 'application/x-pkcs12');\r\n AddType('p7b', 'application/x-pkcs7-certificates');\r\n AddType('spc', 'application/x-pkcs7-certificates');\r\n AddType('p7r', 'application/x-pkcs7-certreqresp');\r\n AddType('rar', 'application/x-rar-compressed');\r\n AddType('ris', 'application/x-research-info-systems');\r\n AddType('sh', 'application/x-sh');\r\n AddType('shar', 'application/x-shar');\r\n AddType('swf', 'application/x-shockwave-flash');\r\n AddType('xap', 'application/x-silverlight-app');\r\n AddType('sql', 'application/x-sql');\r\n AddType('sit', 'application/x-stuffit');\r\n AddType('sitx', 'application/x-stuffitx');\r\n AddType('srt', 'application/x-subrip');\r\n AddType('sv4cpio', 'application/x-sv4cpio');\r\n AddType('sv4crc', 'application/x-sv4crc');\r\n AddType('t3', 'application/x-t3vm-image');\r\n AddType('gam', 'application/x-tads');\r\n AddType('tar', 'application/x-tar');\r\n AddType('tcl', 'application/x-tcl');\r\n AddType('tex', 'application/x-tex');\r\n AddType('tfm', 'application/x-tex-tfm');\r\n AddType('texinfo', 'application/x-texinfo');\r\n AddType('texi', 'application/x-texinfo');\r\n AddType('obj', 'application/x-tgif');\r\n AddType('ustar', 'application/x-ustar');\r\n AddType('src', 'application/x-wais-source');\r\n AddType('der', 'application/x-x509-ca-cert');\r\n AddType('crt', 'application/x-x509-ca-cert');\r\n AddType('fig', 'application/x-xfig');\r\n AddType('xlf', 'application/x-xliff+xml');\r\n AddType('xpi', 'application/x-xpinstall');\r\n AddType('xz', 'application/x-xz');\r\n AddType('z1', 'application/x-zmachine');\r\n AddType('z2', 'application/x-zmachine');\r\n AddType('z3', 'application/x-zmachine');\r\n AddType('z4', 'application/x-zmachine');\r\n AddType('z5', 'application/x-zmachine');\r\n AddType('z6', 'application/x-zmachine');\r\n AddType('z7', 'application/x-zmachine');\r\n AddType('z8', 'application/x-zmachine');\r\n AddType('xaml', 'application/xaml+xml');\r\n AddType('xdf', 'application/xcap-diff+xml');\r\n AddType('xenc', 'application/xenc+xml');\r\n AddType('xhtml', 'application/xhtml+xml');\r\n AddType('xht', 'application/xhtml+xml');\r\n AddType('xml', 'application/xml');\r\n AddType('xsl', 'application/xml');\r\n AddType('dtd', 'application/xml-dtd');\r\n AddType('xop', 'application/xop+xml');\r\n AddType('xpl', 'application/xproc+xml');\r\n AddType('xslt', 'application/xslt+xml');\r\n AddType('xspf', 'application/xspf+xml');\r\n AddType('mxml', 'application/xv+xml');\r\n AddType('xhvml', 'application/xv+xml');\r\n AddType('xvml', 'application/xv+xml');\r\n AddType('xvm', 'application/xv+xml');\r\n AddType('yang', 'application/yang');\r\n AddType('yin', 'application/yin+xml');\r\n AddType('zip', 'application/zip');\r\n AddType('adp', 'audio/adpcm');\r\n AddType('au', 'audio/basic');\r\n AddType('snd', 'audio/basic');\r\n AddType('mid', 'audio/midi');\r\n AddType('midi', 'audio/midi');\r\n AddType('kar', 'audio/midi');\r\n AddType('rmi', 'audio/midi');\r\n AddType('mp4a', 'audio/mp4');\r\n AddType('mpga', 'audio/mpeg');\r\n AddType('mp2', 'audio/mpeg');\r\n AddType('mp2a', 'audio/mpeg');\r\n AddType('mp3', 'audio/mpeg');\r\n AddType('m2a', 'audio/mpeg');\r\n AddType('m3a', 'audio/mpeg');\r\n AddType('oga', 'audio/ogg');\r\n AddType('ogg', 'audio/ogg');\r\n AddType('spx', 'audio/ogg');\r\n AddType('s3m', 'audio/s3m');\r\n AddType('sil', 'audio/silk');\r\n AddType('uva', 'audio/vnd.dece.audio');\r\n AddType('uvva', 'audio/vnd.dece.audio');\r\n AddType('eol', 'audio/vnd.digital-winds');\r\n AddType('dra', 'audio/vnd.dra');\r\n AddType('dts', 'audio/vnd.dts');\r\n AddType('dtshd', 'audio/vnd.dts.hd');\r\n AddType('lvp', 'audio/vnd.lucent.voice');\r\n AddType('pya', 'audio/vnd.ms-playready.media.pya');\r\n AddType('ecelp4800', 'audio/vnd.nuera.ecelp4800');\r\n AddType('ecelp7470', 'audio/vnd.nuera.ecelp7470');\r\n AddType('ecelp9600', 'audio/vnd.nuera.ecelp9600');\r\n AddType('rip', 'audio/vnd.rip');\r\n AddType('weba', 'audio/webm');\r\n AddType('aac', 'audio/aac');\r\n AddType('aif', 'audio/x-aiff');\r\n AddType('aiff', 'audio/x-aiff');\r\n AddType('aifc', 'audio/x-aiff');\r\n AddType('caf', 'audio/x-caf');\r\n AddType('flac', 'audio/x-flac');\r\n AddType('mka', 'audio/x-matroska');\r\n AddType('m3u', 'audio/x-mpegurl');\r\n AddType('wax', 'audio/x-ms-wax');\r\n AddType('wma', 'audio/x-ms-wma');\r\n AddType('ram', 'audio/x-pn-realaudio');\r\n AddType('ra', 'audio/x-pn-realaudio');\r\n AddType('rmp', 'audio/x-pn-realaudio-plugin');\r\n AddType('wav', 'audio/x-wav');\r\n AddType('xm', 'audio/xm');\r\n AddType('cdx', 'chemical/x-cdx');\r\n AddType('cif', 'chemical/x-cif');\r\n AddType('cmdf', 'chemical/x-cmdf');\r\n AddType('cml', 'chemical/x-cml');\r\n AddType('csml', 'chemical/x-csml');\r\n AddType('xyz', 'chemical/x-xyz');\r\n AddType('bmp', 'image/bmp');\r\n AddType('cgm', 'image/cgm');\r\n AddType('g3', 'image/g3fax');\r\n AddType('gif', 'image/gif');\r\n AddType('ief', 'image/ief');\r\n AddType('jpeg', 'image/jpeg');\r\n AddType('jpg', 'image/jpeg');\r\n AddType('jpe', 'image/jpeg');\r\n AddType('ktx', 'image/ktx');\r\n AddType('png', 'image/png');\r\n AddType('btif', 'image/prs.btif');\r\n AddType('sgi', 'image/sgi');\r\n AddType('svg', 'image/svg+xml');\r\n AddType('svgz', 'image/svg+xml');\r\n AddType('tiff', 'image/tiff');\r\n AddType('tif', 'image/tiff');\r\n AddType('psd', 'image/vnd.adobe.photoshop');\r\n AddType('uvi', 'image/vnd.dece.graphic');\r\n AddType('uvvi', 'image/vnd.dece.graphic');\r\n AddType('uvg', 'image/vnd.dece.graphic');\r\n AddType('uvvg', 'image/vnd.dece.graphic');\r\n AddType('sub', 'image/vnd.dvb.subtitle');\r\n AddType('djvu', 'image/vnd.djvu');\r\n AddType('djv', 'image/vnd.djvu');\r\n AddType('dwg', 'image/vnd.dwg');\r\n AddType('dxf', 'image/vnd.dxf');\r\n AddType('fbs', 'image/vnd.fastbidsheet');\r\n AddType('fpx', 'image/vnd.fpx');\r\n AddType('fst', 'image/vnd.fst');\r\n AddType('mmr', 'image/vnd.fujixerox.edmics-mmr');\r\n AddType('rlc', 'image/vnd.fujixerox.edmics-rlc');\r\n AddType('mdi', 'image/vnd.ms-modi');\r\n AddType('wdp', 'image/vnd.ms-photo');\r\n AddType('npx', 'image/vnd.net-fpx');\r\n AddType('wbmp', 'image/vnd.wap.wbmp');\r\n AddType('xif', 'image/vnd.xiff');\r\n AddType('webp', 'image/webp');\r\n AddType('3ds', 'image/x-3ds');\r\n AddType('ras', 'image/x-cmu-raster');\r\n AddType('cmx', 'image/x-cmx');\r\n AddType('fh', 'image/x-freehand');\r\n AddType('fhc', 'image/x-freehand');\r\n AddType('fh4', 'image/x-freehand');\r\n AddType('fh5', 'image/x-freehand');\r\n AddType('fh7', 'image/x-freehand');\r\n AddType('ico', 'image/x-icon');\r\n AddType('sid', 'image/x-mrsid-image');\r\n AddType('pcx', 'image/x-pcx');\r\n AddType('pic', 'image/x-pict');\r\n AddType('pct', 'image/x-pict');\r\n AddType('pnm', 'image/x-portable-anymap');\r\n AddType('pbm', 'image/x-portable-bitmap');\r\n AddType('pgm', 'image/x-portable-graymap');\r\n AddType('ppm', 'image/x-portable-pixmap');\r\n AddType('rgb', 'image/x-rgb');\r\n AddType('tga', 'image/x-tga');\r\n AddType('xbm', 'image/x-xbitmap');\r\n AddType('xpm', 'image/x-xpixmap');\r\n AddType('xwd', 'image/x-xwindowdump');\r\n AddType('eml', 'message/rfc822');\r\n AddType('mime', 'message/rfc822');\r\n AddType('igs', 'model/iges');\r\n AddType('iges', 'model/iges');\r\n AddType('msh', 'model/mesh');\r\n AddType('mesh', 'model/mesh');\r\n AddType('silo', 'model/mesh');\r\n AddType('dae', 'model/vnd.collada+xml');\r\n AddType('dwf', 'model/vnd.dwf');\r\n AddType('gdl', 'model/vnd.gdl');\r\n AddType('gtw', 'model/vnd.gtw');\r\n AddType('mts', 'model/vnd.mts');\r\n AddType('vtu', 'model/vnd.vtu');\r\n AddType('wrl', 'model/vrml');\r\n AddType('vrml', 'model/vrml');\r\n AddType('x3db', 'model/x3d+binary');\r\n AddType('x3dbz', 'model/x3d+binary');\r\n AddType('x3dv', 'model/x3d+vrml');\r\n AddType('x3dvz', 'model/x3d+vrml');\r\n AddType('x3d', 'model/x3d+xml');\r\n AddType('x3dz', 'model/x3d+xml');\r\n AddType('appcache', 'text/cache-manifest');\r\n AddType('ics', 'text/calendar');\r\n AddType('ifb', 'text/calendar');\r\n AddType('cmd', 'text/cmd');\r\n AddType('css', 'text/css');\r\n AddType('csv', 'text/csv');\r\n AddType('html', 'text/html');\r\n AddType('htm', 'text/html');\r\n AddType('n3', 'text/n3');\r\n AddType('txt', 'text/plain');\r\n AddType('text', 'text/plain');\r\n AddType('conf', 'text/plain');\r\n AddType('def', 'text/plain');\r\n AddType('list', 'text/plain');\r\n AddType('log', 'text/plain');\r\n AddType('in', 'text/plain');\r\n AddType('js', 'text/plain');\r\n AddType('dsc', 'text/prs.lines.tag');\r\n AddType('rtx', 'text/richtext');\r\n AddType('sgml', 'text/sgml');\r\n AddType('sgm', 'text/sgml');\r\n AddType('tsv', 'text/tab-separated-values');\r\n AddType('t', 'text/troff');\r\n AddType('tr', 'text/troff');\r\n AddType('roff', 'text/troff');\r\n AddType('man', 'text/troff');\r\n AddType('me', 'text/troff');\r\n AddType('ms', 'text/troff');\r\n AddType('ttl', 'text/turtle');\r\n AddType('uri', 'text/uri-list');\r\n AddType('uris', 'text/uri-list');\r\n AddType('urls', 'text/uri-list');\r\n AddType('vcard', 'text/vcard');\r\n AddType('curl', 'text/vnd.curl');\r\n AddType('dcurl', 'text/vnd.curl.dcurl');\r\n AddType('scurl', 'text/vnd.curl.scurl');\r\n AddType('mcurl', 'text/vnd.curl.mcurl');\r\n AddType('sub', 'text/vnd.dvb.subtitle');\r\n AddType('fly', 'text/vnd.fly');\r\n AddType('flx', 'text/vnd.fmi.flexstor');\r\n AddType('gv', 'text/vnd.graphviz');\r\n AddType('3dml', 'text/vnd.in3d.3dml');\r\n AddType('spot', 'text/vnd.in3d.spot');\r\n AddType('jad', 'text/vnd.sun.j2me.app-descriptor');\r\n AddType('wml', 'text/vnd.wap.wml');\r\n AddType('wmls', 'text/vnd.wap.wmlscript');\r\n AddType('s', 'text/x-asm');\r\n AddType('asm', 'text/x-asm');\r\n AddType('c', 'text/x-c');\r\n AddType('cc', 'text/x-c');\r\n AddType('cxx', 'text/x-c');\r\n AddType('cpp', 'text/x-c');\r\n AddType('h', 'text/x-c');\r\n AddType('hh', 'text/x-c');\r\n AddType('dic', 'text/x-c');\r\n AddType('f', 'text/x-fortran');\r\n AddType('for', 'text/x-fortran');\r\n AddType('f77', 'text/x-fortran');\r\n AddType('f90', 'text/x-fortran');\r\n AddType('java', 'text/x-java-source');\r\n AddType('opml', 'text/x-opml');\r\n AddType('p', 'text/x-pascal');\r\n AddType('pas', 'text/x-pascal');\r\n AddType('nfo', 'text/x-nfo');\r\n AddType('etx', 'text/x-setext');\r\n AddType('sfv', 'text/x-sfv');\r\n AddType('uu', 'text/x-uuencode');\r\n AddType('vcs', 'text/x-vcalendar');\r\n AddType('vcf', 'text/x-vcard');\r\n AddType('xml', 'text/xml');\r\n AddType('xsl', 'text/xml');\r\n AddType('dtd', 'text/xml-dtd');\r\n AddType('3gp', 'video/3gpp');\r\n AddType('3g2', 'video/3gpp2');\r\n AddType('h261', 'video/h261');\r\n AddType('h263', 'video/h263');\r\n AddType('h264', 'video/h264');\r\n AddType('jpgv', 'video/jpeg');\r\n AddType('jpm', 'video/jpm');\r\n AddType('jpgm', 'video/jpm');\r\n AddType('mj2', 'video/mj2');\r\n AddType('mjp2', 'video/mj2');\r\n AddType('mp4', 'video/mp4');\r\n AddType('mp4v', 'video/mp4');\r\n AddType('mpg4', 'video/mp4');\r\n AddType('mpeg', 'video/mpeg');\r\n AddType('mpg', 'video/mpeg');\r\n AddType('mpe', 'video/mpeg');\r\n AddType('m1v', 'video/mpeg');\r\n AddType('m2v', 'video/mpeg');\r\n AddType('ogv', 'video/ogg');\r\n AddType('qt', 'video/quicktime');\r\n AddType('mov', 'video/quicktime');\r\n AddType('uvh', 'video/vnd.dece.hd');\r\n AddType('uvvh', 'video/vnd.dece.hd');\r\n AddType('uvm', 'video/vnd.dece.mobile');\r\n AddType('uvvm', 'video/vnd.dece.mobile');\r\n AddType('uvp', 'video/vnd.dece.pd');\r\n AddType('uvvp', 'video/vnd.dece.pd');\r\n AddType('uvs', 'video/vnd.dece.sd');\r\n AddType('uvvs', 'video/vnd.dece.sd');\r\n AddType('uvv', 'video/vnd.dece.video');\r\n AddType('uvvv', 'video/vnd.dece.video');\r\n AddType('dvb', 'video/vnd.dvb.file');\r\n AddType('fvt', 'video/vnd.fvt');\r\n AddType('mxu', 'video/vnd.mpegurl');\r\n AddType('m4u', 'video/vnd.mpegurl');\r\n AddType('pyv', 'video/vnd.ms-playready.media.pyv');\r\n AddType('uvu', 'video/vnd.uvvu.mp4');\r\n AddType('uvvu', 'video/vnd.uvvu.mp4');\r\n AddType('viv', 'video/vnd.vivo');\r\n AddType('webm', 'video/webm');\r\n AddType('f4v', 'video/x-f4v');\r\n AddType('fli', 'video/x-fli');\r\n AddType('flv', 'video/x-flv');\r\n AddType('m4v', 'video/x-m4v');\r\n AddType('mkv', 'video/x-matroska');\r\n AddType('mk3d', 'video/x-matroska');\r\n AddType('mks', 'video/x-matroska');\r\n AddType('mng', 'video/x-mng');\r\n AddType('asf', 'video/x-ms-asf');\r\n AddType('asx', 'video/x-ms-asf');\r\n AddType('vob', 'video/x-ms-vob');\r\n AddType('wm', 'video/x-ms-wm');\r\n AddType('wmv', 'video/x-ms-wmv');\r\n AddType('wmx', 'video/x-ms-wmx');\r\n AddType('wvx', 'video/x-ms-wvx');\r\n AddType('avi', 'video/x-msvideo');\r\n AddType('movie', 'video/x-sgi-movie');\r\n AddType('smv', 'video/x-smv');\r\n AddType('ice', 'x-conference/x-cooltalk');\r\nend;\r\n{$ENDIF}\r\n\r\n{$IFDEF FNCLIB}\r\n{$IFDEF MACOS}\r\n{$IFNDEF IOS}\r\nvar\r\n AVFoundationModule: HMODULE;\r\n{$ENDIF}\r\n{$ENDIF}\r\n{$ENDIF}\r\n\r\ninitialization\r\n{$IFDEF UNIX}\r\n{$IFDEF FMXLIB}\r\nvar\r\n clip: IFMXExtendedClipboardService;\r\n{$ENDIF}\r\n{$ENDIF}\r\nbegin\r\n {$IFDEF ANDROID}\r\n InitializeClipboard;\r\n {$ENDIF}\r\n\r\n {$IFNDEF LCLLIB}\r\n FNCFormatSettings := TFormatSettings.Create;\r\n {$ELSE}\r\n FNCFormatSettings := FormatSettings;\r\n {$ENDIF}\r\n FNCFormatSettings.DecimalSeparator := '.';\r\n FNCFormatSettings.ThousandSeparator := ',';\r\n\r\n {$IFDEF FNCLIB}\r\n FMimeTypes := TStringList.Create;\r\n RegisterMimeTypes;\r\n {$ENDIF}\r\n\r\n {$IFNDEF WEBLIB}\r\n {$IFNDEF LCLLIB}\r\n if not IsConsole then\r\n {$ENDIF}\r\n begin\r\n {$IFNDEF LCLLIB}\r\n {$IFDEF MSWINDOWS}\r\n CF_FNCRICHTEXTSTREAM := RegisterClipboardFormat('RichEditorText');\r\n CF_FNCSTREAM := RegisterClipboardFormat('TTMSFNCClipBoard.StreamFormat');\r\n {$IFDEF FMXLIB}\r\n CF_FNCBITMAP := RegisterClipboardFormat('PNG');\r\n CF_FNCBITMAPWIN := CF_BITMAP;\r\n {$ENDIF}\r\n {$IFDEF VCLLIB}\r\n CF_FNCBITMAP := CF_BITMAP;\r\n {$ENDIF}\r\n CF_FNCRTF := RegisterClipboardFormat('Rich Text Format');\r\n CF_FNCHTML := RegisterClipboardFormat('HTML Format');\r\n {$ENDIF}\r\n {$ENDIF}\r\n\r\n {$IFDEF LCLLIB}\r\n {$IFNDEF DARWIN}\r\n CF_FNCRICHTEXTSTREAM := RegisterClipboardFormat('RichEditorText');\r\n CF_FNCSTREAM := RegisterClipboardFormat('TTMSFNCClipBoard.StreamFormat');\r\n CF_FNCBITMAP := CF_PICTURE;\r\n CF_FNCRTF := RegisterClipboardFormat(TTMSFNCClipBoard.GetFormat(TTMSFNCClipBoardFormat.cfRTF));\r\n CF_FNCHTML := RegisterClipboardFormat(TTMSFNCClipBoard.GetFormat(TTMSFNCClipBoardFormat.cfHTML));\r\n {$ENDIF}\r\n {$ENDIF}\r\n end;\r\n {$ENDIF}\r\n\r\n {$IFDEF UNIX}\r\n {$IFDEF FMXLIB}\r\n if TPlatformServices.Current.SupportsPlatformService(IFMXExtendedClipBoardService, IInterface(clip)) then\r\n begin\r\n clip.RegisterCustomFormat('RichEditorText');\r\n clip.RegisterCustomFormat('TTMSFNCClipBoard.StreamFormat');\r\n end;\r\n {$ENDIF}\r\n {$ENDIF}\r\n\r\n {$IFDEF FNCLIB}\r\n {$IFDEF MACOS}\r\n {$IFNDEF IOS}\r\n AVFoundationModule := LoadLibrary(libAVFoundation);\r\n {$ENDIF}\r\n {$ENDIF}\r\n {$ENDIF}\r\nend;\r\n\r\n{$IFNDEF WEBLIB}\r\n{$IFDEF FNCLIB}\r\nfinalization\r\n{$IFDEF UNIX}\r\n{$IFDEF FMXLIB}\r\nvar\r\n clip: IFMXExtendedClipboardService;\r\n{$ENDIF}\r\n{$ENDIF}\r\nbegin\r\n {$IFDEF UNIX}\r\n {$IFDEF FMXLIB}\r\n if TPlatformServices.Current.SupportsPlatformService(IFMXExtendedClipBoardService, IInterface(clip)) then\r\n begin\r\n clip.UnregisterCustomFormat('RichEditorText');\r\n clip.UnregisterCustomFormat('TTMSFNCClipBoard.StreamFormat');\r\n end;\r\n {$ENDIF}\r\n {$ENDIF}\r\n\r\n FMimeTypes.Free;\r\n {$IFDEF MACOS}\r\n {$IFNDEF IOS}\r\n FreeLibrary(AVFoundationModule);\r\n {$ENDIF}\r\n {$ENDIF}\r\nend;\r\n{$ENDIF}\r\n{$ENDIF}\r\n\r\nend.\r\n\r\n\r\n","{********************************************************************}\r\n{ }\r\n{ written by TMS Software }\r\n{ copyright (c) 2017 - 2021 \t\t }\r\n{ Email : info@tmssoftware.com }\r\n{ Web : http://www.tmssoftware.com }\r\n{ }\r\n{ The source code is given as is. The author is not responsible }\r\n{ for any possible damage done due to the use of this code. }\r\n{ The complete source code remains property of the author and may }\r\n{ not be distributed, published, given or sold in any form as such. }\r\n{ No parts of the source code can be included in any other component }\r\n{ or application without written authorization of the author. }\r\n{********************************************************************}\r\n\r\nunit Variants;\r\n\r\ninterface\r\n\r\nimplementation\r\n\r\nend.","{********************************************************************}\r\n{ }\r\n{ written by TMS Software }\r\n{ copyright (c) 2017 - 2021 }\r\n{ Email : info@tmssoftware.com }\r\n{ Web : http://www.tmssoftware.com }\r\n{ }\r\n{ The source code is given as is. The author is not responsible }\r\n{ for any possible damage done due to the use of this code. }\r\n{ The complete source code remains property of the author and may }\r\n{ not be distributed, published, given or sold in any form as such. }\r\n{ No parts of the source code can be included in any other component }\r\n{ or application without written authorization of the author. }\r\n{********************************************************************}\r\n\r\nunit WEBLib.TMSFNCJSONReader;\r\n\r\n{$I WEBLib.TMSFNCDefines.inc}\r\n\r\n{$IFDEF WEBLIB}\r\n{$DEFINE LCLWEBLIB}\r\n{$ENDIF}\r\n\r\n{$IFDEF LCLLIB}\r\n{$DEFINE LCLWEBLIB}\r\n{$ENDIF}\r\n\r\n{$SCOPEDENUMS ON}\r\n{$INLINE ON}{$R-}{$Q-}\r\n\r\ninterface\r\n\r\nuses\r\n {$IFNDEF LCLWEBLIB}\r\n Generics.Collections,\r\n {$ENDIF}\r\n Classes, SysUtils, WEBLib.TMSFNCTypes;\r\n\r\ntype\r\n TTMSFNCJSONStreamReader = class\r\n public\r\n type\r\n EInvalidJsonInput = class(Exception)\r\n public\r\n constructor Create;\r\n end;\r\n EInternalError = class(Exception)\r\n public\r\n constructor Create;\r\n end;\r\n EEndOfInputReached = class(Exception)\r\n public\r\n constructor Create;\r\n end;\r\n private\r\n var\r\n FStream: TStream;\r\n FReadStream: TStringStream;\r\n public\r\n constructor Create(const aStream: TStream);\r\n destructor Destroy; override;\r\n function NextChar: char; inline;\r\n function PeekChar: char; inline;\r\n function ReadChar: char; inline;\r\n procedure Backup(const {%H-}c: char);\r\n procedure MoveNext(const Count: integer = 1); inline;\r\n function Eof: boolean; inline;\r\n end;\r\n\r\n TTMSFNCJSONToken = (jstoBeginObject, jstoEndObject, jstoBeginArray, jstoEndArray,\r\n jstoName, jstoBoolean, jstoNull, jstoText, jstoNumber, jstoEOF);\r\n\r\n TTMSFNCJSONReader = class\r\n private\r\n type\r\n TTMSFNCJSONState = (jstNone, jstBeginObject, jstEndObject, jstBeginArray, jstEndArray, jstTrue, jstFalse,\r\n jstNull, jstDoubleQuoted, jstBuffered, jstDoubleQuotedName, jstInt64, jstNumber, jstEOF);\r\n TTMSFNCJSONNumberState = (jnstNone, jnstSign, jnstDigit, jnstDecimal, jnstFraction, jnstExpE, jnstExpSign, jnstExpDigit);\r\n TTMSFNCJSONScope = (jscEmptyDocument, jscEmptyArray, jscEmptyObject, jscNonEmptyDocument,\r\n jscNonEmptyArray, jscNonEmptyObject, jscDanglingName);\r\n public\r\n type\r\n EInvalidStateException = class(Exception)\r\n public\r\n constructor Create(const AState: TTMSFNCJSONState);\r\n end;\r\n EUnterminatedArray = class(Exception)\r\n public\r\n constructor Create;\r\n end;\r\n EUnterminatedObject = class(Exception)\r\n public\r\n constructor Create;\r\n end;\r\n ENameExpected = class(Exception)\r\n public\r\n constructor Create;\r\n end;\r\n EColonExpected = class(Exception)\r\n public\r\n constructor Create;\r\n end;\r\n EReaderClosed = class(Exception)\r\n public\r\n constructor Create;\r\n end;\r\n EMultipleRootNotAllowed = class(Exception)\r\n public\r\n constructor Create;\r\n end;\r\n EExpectedValue = class(Exception)\r\n public\r\n constructor Create;\r\n end;\r\n EObjectOrArrayExpected = class(Exception)\r\n public\r\n constructor Create;\r\n end;\r\n ETooManyDepthLevels = class(Exception)\r\n public\r\n constructor Create;\r\n end;\r\n EInvalidEscaped = class(Exception)\r\n public\r\n constructor Create;\r\n end;\r\n const\r\n MaxNumberBuffer = 255;\r\n MaxStackSize = 255;\r\n private\r\n FReader: TTMSFNCJSONStreamReader;\r\n FStack: array[0..MaxStackSize] of TTMSFNCJSONScope;\r\n FStackSize: integer;\r\n FPeeked: TTMSFNCJSONState;\r\n FPeekedInt64: Int64;\r\n FPeekedNumber: array[0..MaxNumberBuffer] of Char;\r\n FPeekedString: string;\r\n function NextPeek: TTMSFNCJSONState; inline;\r\n procedure CheckState(const State: TTMSFNCJSONState); inline;\r\n procedure SkipChar;\r\n function IsLiteral(C: Char): boolean;\r\n function IsDigit(C: Char): boolean; inline;\r\n function DoPeek: TTMSFNCJSONState;\r\n procedure PushScope(const Scope: TTMSFNCJSONScope);\r\n function NextNonWhitespace: Char;\r\n function ReadChar: Char;\r\n function PeekKeyword: TTMSFNCJSONState;\r\n function PeekNumber: TTMSFNCJSONState;\r\n function InternalReadQuoted(const BuildString: boolean): string;\r\n function ReadQuoted: string;\r\n procedure SkipQuoted;\r\n private\r\n function SkipWhitespaceUntilEnd: boolean;\r\n public\r\n constructor Create(const AStream: TStream);\r\n destructor Destroy; override;\r\n procedure ReadBeginArray;\r\n procedure ReadEndArray;\r\n procedure ReadBeginObject;\r\n procedure ReadEndObject;\r\n function PeekName: string;\r\n function ReadName: string;\r\n function ReadString: string;\r\n function ReadBoolean: boolean;\r\n function ReadDouble: double;\r\n function ReadInt64: Int64;\r\n function ReadInteger: integer;\r\n procedure SkipValue;\r\n procedure ReadNull;\r\n function HasNext: boolean;\r\n function HasInt64: Boolean;\r\n function HasDouble: Boolean;\r\n function HasBoolean: Boolean;\r\n function HasString: Boolean;\r\n function Peek: TTMSFNCJSONToken;\r\n function IsNull: boolean;\r\n function Eof: boolean;\r\n end;\r\n\r\nimplementation\r\n\r\nuses\r\n WEBLib.TMSFNCUtils;\r\n\r\nconst\r\n Wspace: Set of byte = [$20, $A, $D, $9, $C];\r\n\r\n{$IFNDEF LCLWEBLIB}\r\nconst\r\n FPC_FULLVERSION = 0;\r\n{$ENDIF}\r\n\r\nfunction ArrayOfCharToString(AArray: array of char): string;\r\n{$IFDEF WEBLIB}\r\nvar\r\n I: Integer;\r\n{$ENDIF}\r\nbegin\r\n {$IFDEF WEBLIB}\r\n Result := '';\r\n for I := 0 to Length(AArray) - 1 do\r\n begin\r\n if AArray[I] = #0 then\r\n Break;\r\n\r\n Result := Result + AArray[I];\r\n end;\r\n {$ENDIF}\r\n {$IFNDEF WEBLIB}\r\n Result := string(AArray);\r\n {$ENDIF}\r\nend;\r\n\r\n{ TTMSFNCJSONReader }\r\n\r\nconstructor TTMSFNCJSONReader.Create(const aStream: TStream);\r\nbegin\r\n inherited Create;\r\n FReader := TTMSFNCJSONStreamReader.Create(aStream);\r\n FPeeked := TTMSFNCJSONState.jstNone;\r\n FStack[0] := TTMSFNCJSONScope.jscEmptyDocument;\r\n FStackSize := 1;\r\nend;\r\n\r\ndestructor TTMSFNCJSONReader.Destroy;\r\nbegin\r\n FReader.Free;\r\n inherited;\r\nend;\r\n\r\nfunction TTMSFNCJSONReader.Eof: boolean;\r\nbegin\r\n Result := (Peek = TTMSFNCJSONToken.jstoEOF);\r\nend;\r\n\r\nfunction TTMSFNCJSONReader.Peek: TTMSFNCJSONToken;\r\nbegin\r\n case NextPeek of\r\n TTMSFNCJSONState.jstBeginObject:\r\n Result := TTMSFNCJSONToken.jstoBeginObject;\r\n\r\n TTMSFNCJSONState.jstEndObject:\r\n Result := TTMSFNCJSONToken.jstoEndObject;\r\n\r\n TTMSFNCJSONState.jstBeginArray:\r\n Result := TTMSFNCJSONToken.jstoBeginArray;\r\n\r\n TTMSFNCJSONState.jstEndArray:\r\n Result := TTMSFNCJSONToken.jstoEndArray;\r\n\r\n TTMSFNCJSONState.jstDoubleQuotedName:\r\n Result := TTMSFNCJSONToken.jstoName;\r\n\r\n TTMSFNCJSONState.jstTrue,\r\n TTMSFNCJSONState.jstFalse:\r\n Result := TTMSFNCJSONToken.jstoBoolean;\r\n\r\n TTMSFNCJSONState.jstNull:\r\n Result := TTMSFNCJSONToken.jstoNull;\r\n\r\n TTMSFNCJSONState.jstDoubleQuoted,\r\n TTMSFNCJSONState.jstBuffered:\r\n Result := TTMSFNCJSONToken.jstoText;\r\n\r\n TTMSFNCJSONState.jstInt64,\r\n TTMSFNCJSONState.jstNumber:\r\n Result := TTMSFNCJSONToken.jstoNumber;\r\n\r\n TTMSFNCJSONState.jstEOF:\r\n Result := TTMSFNCJSONToken.jstoEOF;\r\n else\r\n Assert(false);\r\n Result := TTMSFNCJSONToken.jstoEOF;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCJSONReader.PeekKeyword: TTMSFNCJSONState;\r\nbegin\r\n case FReader.PeekChar of\r\n 't', 'T':\r\n begin\r\n FReader.MoveNext;\r\n case FReader.NextChar of\r\n 'r', 'R': case FReader.NextChar of\r\n 'u', 'U': case FReader.NextChar of\r\n 'e', 'E':\r\n if FReader.EOF or not IsLiteral(FReader.PeekChar) then\r\n Exit(TTMSFNCJSONState.jstTrue);\r\n end;\r\n end;\r\n end;\r\n end;\r\n 'f', 'F':\r\n begin\r\n FReader.MoveNext;\r\n case FReader.NextChar of\r\n 'a', 'A': case FReader.NextChar of\r\n 'l', 'L': case FReader.NextChar of\r\n 's', 'S': case FReader.NextChar of\r\n 'e', 'E':\r\n if FReader.EOF or not IsLiteral(FReader.PeekChar) then\r\n Exit(TTMSFNCJSONState.jstFalse);\r\n end;\r\n end;\r\n end;\r\n end;\r\n end;\r\n 'n', 'N':\r\n begin\r\n FReader.MoveNext;\r\n case FReader.NextChar of\r\n 'u', 'U': case FReader.NextChar of\r\n 'l', 'L': case FReader.NextChar of\r\n 'l', 'L':\r\n if FReader.EOF or not IsLiteral(FReader.PeekChar) then\r\n Exit(TTMSFNCJSONState.jstNull);\r\n end;\r\n end;\r\n end;\r\n end;\r\n else\r\n Exit(TTMSFNCJSONState.jstNone);\r\n end;\r\n raise EExpectedValue.Create;\r\nend;\r\n\r\nfunction TTMSFNCJSONReader.PeekName: string;\r\nvar\r\n p: Int64;\r\nbegin\r\n p := FReader.FReadStream.Position;\r\n Result := ReadQuoted;\r\n FReader.FReadStream.Position := p;\r\nend;\r\n\r\nfunction TTMSFNCJSONReader.PeekNumber: TTMSFNCJSONState;\r\nconst\r\n MinIncompleteInteger = Low(Int64) div 10;\r\nvar\r\n Last: TTMSFNCJSONNumberState;\r\n Negative: boolean;\r\n FitsInInt64: boolean;\r\n Value: Int64;\r\n NewValue: Int64;\r\n C: Char;\r\n BufIndex: integer;\r\nbegin\r\n C := FReader.PeekChar;\r\n if (C <> '-') and not IsDigit(C) then\r\n Exit(TTMSFNCJSONState.jstNone);\r\n\r\n Negative := false;\r\n FitsInInt64 := true;\r\n Last := TTMSFNCJSONNumberState.jnstNone;\r\n BufIndex := 0;\r\n Value := -1;\r\n repeat\r\n if BufIndex >= MaxNumberBuffer then\r\n raise EExpectedValue.Create;\r\n C := FReader.NextChar;\r\n FPeekedNumber[BufIndex] := C;\r\n Inc(BufIndex);\r\n case C of\r\n '-':\r\n if Last = TTMSFNCJSONNumberState.jnstNone then\r\n begin\r\n Negative := true;\r\n Last := TTMSFNCJSONNumberState.jnstSign;\r\n Continue;\r\n end\r\n else\r\n if Last = TTMSFNCJSONNumberState.jnstExpE then\r\n begin\r\n Last := TTMSFNCJSONNumberState.jnstExpSign;\r\n Continue;\r\n end\r\n else\r\n raise EExpectedValue.Create;\r\n '+':\r\n if Last = TTMSFNCJSONNumberState.jnstExpE then\r\n begin\r\n Last := TTMSFNCJSONNumberState.jnstExpSign;\r\n Continue;\r\n end\r\n else\r\n raise EExpectedValue.Create;\r\n 'e', 'E':\r\n if Last in [TTMSFNCJSONNumberState.jnstDigit, TTMSFNCJSONNumberState.jnstFraction] then\r\n begin\r\n Last := TTMSFNCJSONNumberState.jnstExpE;\r\n Continue;\r\n end\r\n else\r\n raise EExpectedValue.Create;\r\n '.':\r\n if Last = TTMSFNCJSONNumberState.jnstDigit then\r\n begin\r\n Last := TTMSFNCJSONNumberState.jnstDecimal;\r\n Continue;\r\n end\r\n else\r\n raise EExpectedValue.Create;\r\n else\r\n if not IsDigit(C) then\r\n if not IsLiteral(C) then\r\n begin\r\n FReader.Backup(C);\r\n Dec(BufIndex);\r\n Break;\r\n end\r\n else\r\n raise EExpectedValue.Create;\r\n\r\n if Last in [TTMSFNCJSONNumberState.jnstSign, TTMSFNCJSONNumberState.jnstNone] then\r\n begin\r\n Value := -(Ord(C) - 48);\r\n Last := TTMSFNCJSONNumberState.jnstDigit\r\n end\r\n else\r\n if Last = TTMSFNCJSONNumberState.jnstDigit then\r\n begin\r\n if Value = 0 then\r\n raise EExpectedValue.Create;\r\n NewValue := Value * 10 - (Ord(C) - 48);\r\n FitsInInt64 := FitsInInt64 and (\r\n (Value > MinIncompleteInteger)\r\n or ((Value = MinIncompleteInteger) and (NewValue < Value))\r\n );\r\n Value := NewValue;\r\n end\r\n else\r\n if Last = TTMSFNCJSONNumberState.jnstDecimal then\r\n Last := TTMSFNCJSONNumberState.jnstFraction\r\n else\r\n if Last in [TTMSFNCJSONNumberState.jnstExpE, TTMSFNCJSONNumberState.jnstExpSign] then\r\n Last := TTMSFNCJSONNumberState.jnstExpDigit;\r\n end;\r\n until false;\r\n\r\n if (Last = TTMSFNCJSONNumberState.jnstDigit) and FitsInInt64 and ((Value <> Low(Int64)) or Negative) then\r\n begin\r\n if Negative then\r\n FPeekedInt64 := Value\r\n else\r\n FPeekedInt64 := -Value;\r\n Exit(TTMSFNCJSONState.jstInt64);\r\n end\r\n else\r\n if Last in [TTMSFNCJSONNumberState.jnstDigit, TTMSFNCJSONNumberState.jnstFraction, TTMSFNCJSONNumberState.jnstExpDigit] then\r\n begin\r\n FPeekedNumber[BufIndex] := #0;\r\n Exit(TTMSFNCJSONState.jstNumber);\r\n end\r\n else\r\n raise EExpectedValue.Create;\r\nend;\r\n\r\nprocedure TTMSFNCJSONReader.PushScope(const Scope: TTMSFNCJSONScope);\r\nbegin\r\n if FStackSize > MaxStackSize then\r\n raise ETooManyDepthLevels.Create;\r\n FStack[FStackSize] := Scope;\r\n Inc(FStackSize);\r\nend;\r\n\r\nfunction TTMSFNCJSONReader.HasBoolean: Boolean;\r\nbegin\r\n Result := (Peek in [TTMSFNCJSONToken.jstoBoolean]);\r\nend;\r\n\r\nfunction TTMSFNCJSONReader.HasDouble: Boolean;\r\nbegin\r\n Result := (NextPeek in [TTMSFNCJSONState.jstNumber]);\r\nend;\r\n\r\nfunction TTMSFNCJSONReader.HasInt64: Boolean;\r\nbegin\r\n Result := (NextPeek in [TTMSFNCJSONState.jstInt64]);\r\nend;\r\n\r\nfunction TTMSFNCJSONReader.HasNext: boolean;\r\nbegin\r\n Result := not (NextPeek in [TTMSFNCJSONState.jstEndObject, TTMSFNCJSONState.jstEndArray]);\r\nend;\r\n\r\nfunction TTMSFNCJSONReader.HasString: Boolean;\r\nbegin\r\n Result := (Peek in [TTMSFNCJSONToken.jstoText]);\r\nend;\r\n\r\nfunction TTMSFNCJSONReader.IsDigit(C: Char): boolean;\r\nbegin\r\n Result := (C <= #255) and CharIsNumber(C);\r\nend;\r\n\r\nfunction TTMSFNCJSONReader.IsLiteral(C: Char): boolean;\r\nbegin\r\n Result := not TTMSFNCUtils.CharInSet(C, TTMSFNCUtils.CreateCharSet('/\\;#{}[]:,'' '#13#10#12#9));\r\nend;\r\n\r\nfunction TTMSFNCJSONReader.IsNull: boolean;\r\nbegin\r\n Result := (Peek = TTMSFNCJSONToken.jstoNull);\r\nend;\r\n\r\nfunction TTMSFNCJSONReader.NextNonWhitespace: Char;\r\nvar\r\n s: Char;\r\n p: Int64;\r\nbegin\r\n p := FReader.FReadStream.Position;\r\n Result := #0;\r\n s := ReadChar;\r\n repeat\r\n if (s > #32) or not (Ord(s) in Wspace) then\r\n begin\r\n FReader.FReadStream.Position := p;\r\n Exit(s);\r\n end;\r\n\r\n s := ReadChar;\r\n until FReader.Eof;\r\n FReader.FReadStream.Position := p;\r\nend;\r\n\r\nfunction TTMSFNCJSONReader.NextPeek: TTMSFNCJSONState;\r\nbegin\r\n if FPeeked = TTMSFNCJSONState.jstNone then\r\n FPeeked := DoPeek;\r\n Result := FPeeked;\r\nend;\r\n\r\nprocedure TTMSFNCJSONReader.SkipQuoted;\r\nbegin\r\n InternalReadQuoted(false);\r\nend;\r\n\r\nprocedure TTMSFNCJSONReader.SkipValue;\r\nvar\r\n Count: integer;\r\nbegin\r\n Count := 0;\r\n repeat\r\n case NextPeek of\r\n TTMSFNCJSONState.jstBeginArray:\r\n begin\r\n PushScope(TTMSFNCJSONScope.jscEmptyArray);\r\n Inc(Count);\r\n end;\r\n TTMSFNCJSONState.jstBeginObject:\r\n begin\r\n PushScope(TTMSFNCJSONScope.jscEmptyObject);\r\n Inc(Count);\r\n end;\r\n TTMSFNCJSONState.jstEndArray, TTMSFNCJSONState.jstEndObject:\r\n begin\r\n Dec(FStackSize);\r\n Dec(Count);\r\n end;\r\n TTMSFNCJSONState.jstDoubleQuoted, TTMSFNCJSONState.jstDoubleQuotedName:\r\n SkipQuoted;\r\n end;\r\n FPeeked := TTMSFNCJSONState.jstNone;\r\n until Count <= 0;\r\nend;\r\n\r\nprocedure TTMSFNCJSONReader.SkipChar;\r\nbegin\r\n FReader.MoveNext;\r\n while Ord(FReader.PeekChar) in Wspace do\r\n FReader.MoveNext;\r\nend;\r\n\r\nfunction TTMSFNCJSONReader.DoPeek: TTMSFNCJSONState;\r\nvar\r\n FPeekStack: TTMSFNCJSONScope;\r\n C: Char;\r\nbegin\r\n FPeekStack := FStack[FStackSize - 1];\r\n if FPeekStack = TTMSFNCJSONScope.jscEmptyArray then\r\n FStack[FStackSize - 1] := TTMSFNCJSONScope.jscNonEmptyArray\r\n else\r\n if FPeekStack = TTMSFNCJSONScope.jscNonEmptyArray then\r\n begin\r\n C := NextNonWhitespace;\r\n case C of\r\n ']':\r\n begin\r\n while Ord(FReader.PeekChar) in Wspace do\r\n FReader.MoveNext;\r\n\r\n SkipChar;\r\n FPeeked := TTMSFNCJSONState.jstEndArray;\r\n Exit(FPeeked);\r\n end;\r\n ',':\r\n SkipChar;\r\n else\r\n raise EUnterminatedArray.Create;\r\n end;\r\n end\r\n else\r\n if FPeekStack in [TTMSFNCJSONScope.jscEmptyObject, TTMSFNCJSONScope.jscNonEmptyObject] then\r\n begin\r\n FStack[FStackSize - 1] := TTMSFNCJSONScope.jscDanglingName;\r\n if FPeekStack = TTMSFNCJSONScope.jscNonEmptyObject then\r\n begin\r\n C := NextNonWhitespace;\r\n case C of\r\n '}':\r\n begin\r\n while Ord(FReader.PeekChar) in Wspace do\r\n FReader.MoveNext;\r\n\r\n SkipChar;\r\n FPeeked := TTMSFNCJSONState.jstEndObject;\r\n Exit(FPeeked);\r\n end;\r\n ',': SkipChar;\r\n else\r\n raise EUnterminatedObject.Create;\r\n end;\r\n end;\r\n C := NextNonWhitespace;\r\n case C of\r\n '\"':\r\n begin\r\n SkipChar;\r\n FPeeked := TTMSFNCJSONState.jstDoubleQuotedName;\r\n Exit(FPeeked);\r\n end;\r\n '}':\r\n if FPeekStack <> TTMSFNCJSONScope.jscNonEmptyObject then\r\n begin\r\n SkipChar;\r\n FPeeked := TTMSFNCJSONState.jstEndObject;\r\n Exit(FPeeked);\r\n end else\r\n raise ENameExpected.Create;\r\n else\r\n raise ENameExpected.Create;\r\n end;\r\n end\r\n else\r\n if FPeekStack = TTMSFNCJSONScope.jscDanglingName then\r\n begin\r\n FStack[FStackSize - 1] := TTMSFNCJSONScope.jscNonEmptyObject;\r\n C := NextNonWhitespace;\r\n if C = ':' then\r\n SkipChar\r\n else\r\n raise EColonExpected.Create;\r\n end\r\n else\r\n if FPeekStack = TTMSFNCJSONScope.jscEmptyDocument then\r\n FStack[FStackSize - 1] := TTMSFNCJSONScope.jscNonEmptyDocument\r\n else\r\n if FPeekStack = TTMSFNCJSONScope.jscNonEmptyDocument then\r\n begin\r\n if SkipWhitespaceUntilEnd then\r\n begin\r\n FPeeked := TTMSFNCJSONState.jstEOF;\r\n Exit(FPeeked);\r\n end else\r\n raise EMultipleRootNotAllowed.Create;\r\n end;\r\n\r\n C := NextNonWhitespace;\r\n case C of\r\n ']':\r\n if FPeekStack = TTMSFNCJSONScope.jscEmptyArray then\r\n begin\r\n SkipChar;\r\n FPeeked := TTMSFNCJSONState.jstEndArray;\r\n Exit(FPeeked);\r\n end else\r\n raise EExpectedValue.Create;\r\n '\"':\r\n begin\r\n if FStackSize = 1 then\r\n raise EObjectOrArrayExpected.Create;\r\n SkipChar;\r\n FPeeked := TTMSFNCJSONState.jstDoubleQuoted;\r\n Exit(FPeeked);\r\n end;\r\n '[':\r\n begin\r\n SkipChar;\r\n FPeeked := TTMSFNCJSONState.jstBeginArray;\r\n Exit(FPeeked);\r\n end;\r\n '{':\r\n begin\r\n SkipChar;\r\n FPeeked := TTMSFNCJSONState.jstBeginObject;\r\n Exit(FPeeked);\r\n end;\r\n end;\r\n\r\n if FStackSize = 1 then\r\n raise EObjectOrArrayExpected.Create;\r\n\r\n Result := PeekKeyword;\r\n if Result <> TTMSFNCJSONState.jstNone then\r\n Exit;\r\n Result := PeekNumber;\r\n if Result <> TTMSFNCJSONState.jstNone then\r\n Exit;\r\n raise EExpectedValue.Create;\r\nend;\r\n\r\nfunction TTMSFNCJSONReader.SkipWhitespaceUntilEnd: boolean;\r\nvar\r\n s: Char;\r\n p: Int64;\r\nbegin\r\n p := FReader.FReadStream.Position;\r\n Result := True;\r\n s := ReadChar;\r\n repeat\r\n if (s > #32) or not (Ord(s) in Wspace) then\r\n begin\r\n FReader.FReadStream.Position := p;\r\n Exit(false);\r\n end;\r\n\r\n s := ReadChar;\r\n until FReader.Eof;\r\n FReader.FReadStream.Position := p;\r\nend;\r\n\r\nprocedure TTMSFNCJSONReader.CheckState(const State: TTMSFNCJSONState);\r\nbegin\r\n if NextPeek <> State then\r\n raise EInvalidStateException.Create(State);\r\nend;\r\n\r\nprocedure TTMSFNCJSONReader.ReadBeginArray;\r\nbegin\r\n CheckState(TTMSFNCJSONState.jstBeginArray);\r\n PushScope(TTMSFNCJSONScope.jscEmptyArray);\r\n FPeeked := TTMSFNCJSONState.jstNone;\r\nend;\r\n\r\nprocedure TTMSFNCJSONReader.ReadEndArray;\r\nbegin\r\n CheckState(TTMSFNCJSONState.jstEndArray);\r\n Dec(FStackSize);\r\n FPeeked := TTMSFNCJSONState.jstNone;\r\nend;\r\n\r\nfunction TTMSFNCJSONReader.ReadBoolean: boolean;\r\nbegin\r\n case NextPeek of\r\n TTMSFNCJSONState.jstTrue:\r\n Result := True;\r\n TTMSFNCJSONState.jstFalse:\r\n Result := False;\r\n else\r\n raise EInvalidStateException.Create(TTMSFNCJSONState.jstTrue);\r\n end;\r\n FPeeked := TTMSFNCJSONState.jstNone;\r\nend;\r\n\r\nfunction TTMSFNCJSONReader.ReadChar: Char;\r\nbegin\r\n Result := FReader.ReadChar;\r\nend;\r\n\r\nfunction TTMSFNCJSONReader.ReadDouble: double;\r\nbegin\r\n case NextPeek of\r\n TTMSFNCJSONState.jstInt64:\r\n begin\r\n FPeeked := TTMSFNCJSONState.jstNone;\r\n Exit(FPeekedInt64);\r\n end;\r\n TTMSFNCJSONState.jstNumber:\r\n begin\r\n if TTMSFNCUtils.TryStrToFloatDot(ArrayOfCharToString(FPeekedNumber), Result) then\r\n begin\r\n FPeeked := TTMSFNCJSONState.jstNone;\r\n Exit;\r\n end else\r\n FPeekedString := ArrayOfCharToString(FPeekedNumber);\r\n end;\r\n TTMSFNCJSONState.jstDoubleQuoted:\r\n FPeekedString := ReadQuoted;\r\n TTMSFNCJSONState.jstBuffered: ;\r\n else\r\n raise EInvalidStateException.Create(TTMSFNCJSONState.jstNumber);\r\n end;\r\n\r\n FPeeked := TTMSFNCJSONState.jstBuffered;\r\n Result := TTMSFNCUtils.StrToFloatDot(FPeekedString);\r\n FPeekedString := '';\r\n FPeeked := TTMSFNCJSONState.jstNone;\r\nend;\r\n\r\nfunction TTMSFNCJSONReader.ReadInt64: Int64;\r\nvar\r\n AsDouble: double;\r\nbegin\r\n case NextPeek of\r\n TTMSFNCJSONState.jstInt64:\r\n begin\r\n FPeeked := TTMSFNCJSONState.jstNone;\r\n Exit(FPeekedInt64);\r\n end;\r\n TTMSFNCJSONState.jstNumber:\r\n begin\r\n if TryStrToInt64(ArrayOfCharToString(FPeekedNumber), Result) then\r\n begin\r\n FPeeked := TTMSFNCJSONState.jstNone;\r\n Exit;\r\n end else\r\n FPeekedString := ArrayOfCharToString(FPeekedNumber);\r\n end;\r\n TTMSFNCJSONState.jstDoubleQuoted:\r\n begin\r\n FPeekedString := ReadQuoted;\r\n if TryStrToInt64(FPeekedString, Result) then\r\n begin\r\n FPeeked := TTMSFNCJSONState.jstNone;\r\n Exit;\r\n end;\r\n end;\r\n TTMSFNCJSONState.jstBuffered: ;\r\n else\r\n raise EInvalidStateException.Create(TTMSFNCJSONState.jstInt64);\r\n end;\r\n\r\n FPeeked := TTMSFNCJSONState.jstBuffered;\r\n AsDouble := TTMSFNCUtils.StrToFloatDot(FPeekedString);\r\n Result := Round(AsDouble);\r\n if AsDouble <> Result then\r\n raise EInvalidStateException.Create(TTMSFNCJSONState.jstInt64);\r\n FPeekedString := '';\r\n FPeeked := TTMSFNCJSONState.jstNone;\r\nend;\r\n\r\nfunction TTMSFNCJSONReader.ReadInteger: integer;\r\nvar\r\n AsDouble: double;\r\nbegin\r\n case NextPeek of\r\n TTMSFNCJSONState.jstInt64:\r\n begin\r\n Result := Integer(FPeekedInt64);\r\n if Result <> FPeekedInt64 then\r\n raise EInvalidStateException.Create(TTMSFNCJSONState.jstInt64);\r\n FPeeked := TTMSFNCJSONState.jstNone;\r\n Exit;\r\n end;\r\n TTMSFNCJSONState.jstNumber:\r\n begin\r\n if TryStrToInt(ArrayOfCharToString(FPeekedNumber), Result) then\r\n begin\r\n FPeeked := TTMSFNCJSONState.jstNone;\r\n Exit;\r\n end else\r\n FPeekedString := ArrayOfCharToString(FPeekedNumber);\r\n end;\r\n TTMSFNCJSONState.jstDoubleQuoted:\r\n begin\r\n FPeekedString := ReadQuoted;\r\n if TryStrToInt(FPeekedString, Result) then\r\n begin\r\n FPeeked := TTMSFNCJSONState.jstNone;\r\n Exit;\r\n end;\r\n end;\r\n TTMSFNCJSONState.jstBuffered: ;\r\n else\r\n raise EInvalidStateException.Create(TTMSFNCJSONState.jstInt64); // todo\r\n end;\r\n\r\n FPeeked := TTMSFNCJSONState.jstBuffered;\r\n AsDouble := TTMSFNCUtils.StrToFloatDot(FPeekedString);\r\n Result := Round(AsDouble);\r\n if AsDouble <> Result then\r\n raise EInvalidStateException.Create(TTMSFNCJSONState.jstInt64);\r\n FPeekedString := '';\r\n FPeeked := TTMSFNCJSONState.jstNone;\r\nend;\r\n\r\nfunction TTMSFNCJSONReader.ReadName: string;\r\nbegin\r\n CheckState(TTMSFNCJSONState.jstDoubleQuotedName);\r\n FPeeked := TTMSFNCJSONState.jstNone;\r\n Result := ReadQuoted;\r\nend;\r\n\r\nprocedure TTMSFNCJSONReader.ReadNull;\r\nbegin\r\n CheckState(TTMSFNCJSONState.jstNull);\r\n FPeeked := TTMSFNCJSONState.jstNone;\r\nend;\r\n\r\nprocedure TTMSFNCJSONReader.ReadBeginObject;\r\nbegin\r\n CheckState(TTMSFNCJSONState.jstBeginObject);\r\n PushScope(TTMSFNCJSONScope.jscEmptyObject);\r\n FPeeked := TTMSFNCJSONState.jstNone;\r\nend;\r\n\r\nprocedure TTMSFNCJSONReader.ReadEndObject;\r\nbegin\r\n CheckState(TTMSFNCJSONState.jstEndObject);\r\n Dec(FStackSize);\r\n FPeeked := TTMSFNCJSONState.jstNone;\r\nend;\r\n\r\nfunction TTMSFNCJSONReader.ReadQuoted: string;\r\nbegin\r\n Result := InternalReadQuoted(true);\r\nend;\r\n\r\nfunction TTMSFNCJSONReader.InternalReadQuoted(const BuildString: boolean): string;\r\nvar\r\n pc, c: String;\r\n s: string;\r\nbegin\r\n Result := '';\r\n s := '';\r\n pc := '';\r\n while not FReader.Eof do\r\n begin\r\n c := ReadChar;\r\n if (c = '\"') and (pc <> '\\') then\r\n Break\r\n else\r\n s := s + c;\r\n\r\n pc := c;\r\n end;\r\n\r\n if BuildString then\r\n Result := s;\r\nend;\r\n\r\nfunction TTMSFNCJSONReader.ReadString: string;\r\nbegin\r\n case NextPeek of\r\n TTMSFNCJSONState.jstDoubleQuoted:\r\n Result := ReadQuoted;\r\n TTMSFNCJSONState.jstInt64:\r\n Result := IntToStr(FPeekedInt64);\r\n TTMSFNCJSONState.jstNumber:\r\n Result := ArrayOfCharToString(FPeekedNumber);\r\n TTMSFNCJSONState.jstBuffered:\r\n Result := FPeekedString;\r\n else\r\n raise EInvalidStateException.Create(TTMSFNCJSONState.jstDoubleQuoted);\r\n end;\r\n FPeeked := TTMSFNCJSONState.jstNone;\r\n\r\n Result := TTMSFNCUtils.UnescapeString(Result);\r\nend;\r\n\r\n{ TTMSFNCJSONStreamReader }\r\n\r\nconstructor TTMSFNCJSONStreamReader.Create(const aStream: TStream);\r\nbegin\r\n FStream := aStream;\r\n FReadStream := TStringStream.Create(''{$IFDEF WEBLIB}, TEncoding.Ansi{$ENDIF});\r\n FReadStream.CopyFrom(FStream, FStream.Size);\r\n FReadStream.Position := 0;\r\nend;\r\n\r\ndestructor TTMSFNCJSONStreamReader.Destroy;\r\nbegin\r\n FReadStream.Free;\r\n inherited;\r\nend;\r\n\r\nfunction TTMSFNCJSONStreamReader.NextChar: char;\r\nbegin\r\n if (Eof) then\r\n raise EEndOfInputReached.Create;\r\n Result := ReadChar;\r\nend;\r\n\r\nfunction TTMSFNCJSONStreamReader.PeekChar: char;\r\nvar\r\n p: Int64;\r\nbegin\r\n p := FReadStream.Position;\r\n Result := ReadChar;\r\n FReadStream.Position := p;\r\nend;\r\n\r\nfunction TTMSFNCJSONStreamReader.ReadChar: char;\r\nvar\r\n i: Integer;\r\n s: string;\r\nbegin\r\n Result := #0;\r\n {$IFDEF ZEROSTRINGINDEX}\r\n i := 0;\r\n {$ELSE}\r\n i := 1;\r\n {$ENDIF}\r\n if FReadStream.Position < FReadStream.Size then\r\n begin\r\n s := FReadStream.ReadString(1);\r\n {$IFNDEF WEBLIB}\r\n {$HINTS OFF}\r\n {$WARNINGS OFF}\r\n {$IFDEF LCLLIB}\r\n {$IF FPC_FULLVERSION = 30200}\r\n //BUG IN TStringStream in FPC 3.2\r\n FReadStream.Position := FReadStream.Position + 1;\r\n {$IFEND}\r\n {$ENDIF}\r\n {$HINTS ON}\r\n {$WARNINGS ON}\r\n {$ENDIF}\r\n if (s <> '') {$IFDEF WEBLIB} and Assigned(s) {$ENDIF} then\r\n Result := s[i]\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCJSONStreamReader.Backup(const c: char);\r\nbegin\r\n FReadStream.Position := FReadStream.Position - 1;\r\nend;\r\n\r\nprocedure TTMSFNCJSONStreamReader.MoveNext(const Count: integer = 1);\r\nbegin\r\n FReadStream.Position := FReadStream.Position + Count;\r\nend;\r\n\r\nfunction TTMSFNCJSONStreamReader.Eof: boolean;\r\nbegin\r\n Result := FReadStream.Position = FReadStream.Size;\r\nend;\r\n\r\n{ TTMSFNCJSONReader.EInvalidStateException }\r\n\r\nconstructor TTMSFNCJSONReader.EInvalidStateException.Create(const AState: TTMSFNCJSONState);\r\nbegin\r\n inherited CreateFmt('Invalid Json parser state. Expected state: %d', [Ord(AState)]);\r\nend;\r\n\r\n{ TTMSFNCJSONReader.EUnterminatedArray }\r\n\r\nconstructor TTMSFNCJSONReader.EUnterminatedArray.Create;\r\nbegin\r\n inherited Create('Unterminated array');\r\nend;\r\n\r\n{ TTMSFNCJSONReader.EUnterminatedObject }\r\n\r\nconstructor TTMSFNCJSONReader.EUnterminatedObject.Create;\r\nbegin\r\n inherited Create('Unterminated object');\r\nend;\r\n\r\n{ TTMSFNCJSONReader.ENameExpected }\r\n\r\nconstructor TTMSFNCJSONReader.ENameExpected.Create;\r\nbegin\r\n inherited Create('Name expected');\r\nend;\r\n\r\n{ TTMSFNCJSONReader.EColonExpected }\r\n\r\nconstructor TTMSFNCJSONReader.EColonExpected.Create;\r\nbegin\r\n inherited Create('Colon expected');\r\nend;\r\n\r\n{ TTMSFNCJSONReader.EReaderClosed }\r\n\r\nconstructor TTMSFNCJSONReader.EReaderClosed.Create;\r\nbegin\r\n inherited Create('Reader already closed');\r\nend;\r\n\r\n{ TTMSFNCJSONReader.EMultipleRootNotAllowed }\r\n\r\nconstructor TTMSFNCJSONReader.EMultipleRootNotAllowed.Create;\r\nbegin\r\n inherited Create('Multiple root values not allowed');\r\nend;\r\n\r\n{ TTMSFNCJSONReader.EExpectedValue }\r\n\r\nconstructor TTMSFNCJSONReader.EExpectedValue.Create;\r\nbegin\r\n inherited Create('Value expected but invalid character found');\r\nend;\r\n\r\n{ TTMSFNCJSONReader.EObjectOrArrayExpected }\r\n\r\nconstructor TTMSFNCJSONReader.EObjectOrArrayExpected.Create;\r\nbegin\r\n inherited Create('Object or array expected as top-level value');\r\nend;\r\n\r\n{ TTMSFNCJSONReader.ETooManyDepthLevels }\r\n\r\nconstructor TTMSFNCJSONReader.ETooManyDepthLevels.Create;\r\nbegin\r\n inherited Create('Maximum level of nested structured reached.');\r\nend;\r\n\r\n{ TTMSFNCJSONStreamReader.EInvalidJsonInput }\r\n\r\nconstructor TTMSFNCJSONStreamReader.EInvalidJsonInput.Create;\r\nbegin\r\n inherited Create('Invalid JSON Input');\r\nend;\r\n\r\n{ TTMSFNCJSONStreamReader.EInternalError }\r\n\r\nconstructor TTMSFNCJSONStreamReader.EInternalError.Create;\r\nbegin\r\n inherited Create('JSON stream reader internal error');\r\nend;\r\n\r\n{ TTMSFNCJSONStreamReader.EEndOfInputReached }\r\n\r\nconstructor TTMSFNCJSONStreamReader.EEndOfInputReached.Create;\r\nbegin\r\n inherited Create('End of JSON input reached.');\r\nend;\r\n\r\n{ TTMSFNCJSONReader.EInvalidEscaped }\r\n\r\nconstructor TTMSFNCJSONReader.EInvalidEscaped.Create;\r\nbegin\r\n inherited Create('Invalid escaped sequence');\r\nend;\r\n\r\nend.\r\n","{********************************************************************}\r\n{ }\r\n{ written by TMS Software }\r\n{ copyright (c) 2017 - 2021 }\r\n{ Email : info@tmssoftware.com }\r\n{ Web : http://www.tmssoftware.com }\r\n{ }\r\n{ The source code is given as is. The author is not responsible }\r\n{ for any possible damage done due to the use of this code. }\r\n{ The complete source code remains property of the author and may }\r\n{ not be distributed, published, given or sold in any form as such. }\r\n{ No parts of the source code can be included in any other component }\r\n{ or application without written authorization of the author. }\r\n{********************************************************************}\r\n\r\nunit WEBLib.TMSFNCJSONWriter;\r\n\r\n{$I WEBLib.TMSFNCDefines.inc}\r\n\r\n{$IFDEF WEBLIB}\r\n{$DEFINE LCLWEBLIB}\r\n{$ENDIF}\r\n\r\n{$IFDEF LCLLIB}\r\n{$DEFINE LCLWEBLIB}\r\n{$ENDIF}\r\n\r\n{$INLINE ON}{$R-}{$Q-}\r\n\r\ninterface\r\n\r\nuses\r\n {$IFNDEF LCLWEBLIB}\r\n Generics.Collections,\r\n {$ENDIF}\r\n Classes, SysUtils, WEBLib.TMSFNCTypes;\r\n\r\ntype\r\n TTMSFNCJSONStreamWriter = class\r\n private\r\n var\r\n FStream: TStream;\r\n FWriteStream: TStringStream;\r\n public\r\n constructor Create(AStream: TStream);\r\n destructor Destroy; override;\r\n procedure Write(const Value: string);\r\n end;\r\n\r\n TTMSFNCJSONWriter = class\r\n public\r\n type\r\n ECannotWriteName = class(Exception)\r\n public\r\n constructor Create;\r\n end;\r\n EMultipleRootNotAllowed = class(Exception)\r\n public\r\n constructor Create;\r\n end;\r\n EObjectOrArrayExpected = class(Exception)\r\n public\r\n constructor Create;\r\n end;\r\n EInvalidNesting = class(Exception)\r\n public\r\n constructor Create;\r\n end;\r\n EMissingValue = class(Exception)\r\n public\r\n constructor Create;\r\n end;\r\n ETooManyDepthLevels = class(Exception)\r\n public\r\n constructor Create;\r\n end;\r\n EEmptyJson = class(Exception)\r\n public\r\n constructor Create;\r\n end;\r\n EEmptyName = class(Exception)\r\n public\r\n constructor Create;\r\n end;\r\n private\r\n type\r\n TTMSFNCJSONScope = (jscEmptyDocument, jscEmptyArray, jscEmptyObject, jscNonEmptyDocument,\r\n jscNonEmptyArray, jscNonEmptyObject, jscDanglingName);\r\n const\r\n MaxStackSize = 255;\r\n private\r\n FWriter: TTMSFNCJSONStreamWriter;\r\n FStack: array[0..MaxStackSize] of TTMSFNCJSONScope;\r\n FStackSize: integer;\r\n FIndent: string;\r\n FSeparator: string;\r\n FDeferredName: string;\r\n procedure SetIndentLength(const Value: integer);\r\n function GetIndentLength: integer;\r\n function OpenItem(const Empty: TTMSFNCJSONScope; const OpenBracket: string): TTMSFNCJSONWriter;\r\n function CloseItem(const Empty, NonEmpty: TTMSFNCJSONScope; const CloseBracket: string): TTMSFNCJSONWriter;\r\n procedure PushScope(const Scope: TTMSFNCJSONScope); inline;\r\n function PeekScope: TTMSFNCJSONScope; inline;\r\n procedure ReplaceTop(const Scope: TTMSFNCJSONScope); inline;\r\n procedure WriteDeferredName; inline;\r\n procedure InternalWriteString(const Value: string);\r\n procedure NewLine; inline;\r\n procedure BeforeName;\r\n procedure BeforeValue(const Root: boolean);\r\n public\r\n constructor Create(const AStream: TStream);\r\n destructor Destroy; override;\r\n function WriteBeginArray: TTMSFNCJSONWriter;\r\n function WriteEndArray: TTMSFNCJSONWriter;\r\n function WriteBeginObject: TTMSFNCJSONWriter;\r\n function WriteEndObject: TTMSFNCJSONWriter;\r\n function WriteName(const Name: string): TTMSFNCJSONWriter;\r\n function WriteString(const Value: string): TTMSFNCJSONWriter;\r\n function WriteRawString(const Value: string): TTMSFNCJSONWriter;\r\n function WriteBoolean(const Value: boolean): TTMSFNCJSONWriter;\r\n function WriteNull: TTMSFNCJSONWriter;\r\n function WriteDouble(const Value: double): TTMSFNCJSONWriter;\r\n function WriteInteger(const Value: Int64): TTMSFNCJSONWriter;\r\n procedure Close;\r\n property IndentLength: integer read GetIndentLength write SetIndentLength;\r\n end;\r\n\r\nimplementation\r\n\r\nuses\r\n WEBLib.TMSFNCUtils;\r\n\r\n{ TTMSFNCJSONWriter }\r\n\r\nprocedure TTMSFNCJSONWriter.BeforeName;\r\nbegin\r\n case PeekScope of\r\n TTMSFNCJSONScope.jscNonEmptyObject: FWriter.Write(',');\r\n TTMSFNCJSONScope.jscEmptyObject: ;\r\n else\r\n raise ECannotWriteName.Create;\r\n end;\r\n NewLine;\r\n ReplaceTop(TTMSFNCJSONScope.jscDanglingName);\r\nend;\r\n\r\nprocedure TTMSFNCJSONWriter.BeforeValue(const Root: boolean);\r\nbegin\r\n case PeekScope of\r\n TTMSFNCJSONScope.jscNonEmptyDocument:\r\n raise EMultipleRootNotAllowed.Create;\r\n TTMSFNCJSONScope.jscEmptyDocument:\r\n begin\r\n if not Root then\r\n raise EObjectOrArrayExpected.Create;\r\n ReplaceTop(TTMSFNCJSONScope.jscNonEmptyDocument);\r\n end;\r\n TTMSFNCJSONScope.jscEmptyArray:\r\n begin\r\n ReplaceTop(TTMSFNCJSONScope.jscNonEmptyArray);\r\n NewLine;\r\n end;\r\n TTMSFNCJSONScope.jscNonEmptyArray:\r\n begin\r\n FWriter.Write(',');\r\n NewLine;\r\n end;\r\n TTMSFNCJSONScope.jscDanglingName:\r\n begin\r\n FWriter.Write(FSeparator);\r\n ReplaceTop(TTMSFNCJSONScope.jscNonEmptyObject);\r\n end;\r\n else\r\n raise EInvalidNesting.Create;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCJSONWriter.CloseItem(const Empty, NonEmpty: TTMSFNCJSONScope;\r\n const CloseBracket: string): TTMSFNCJSONWriter;\r\nvar\r\n Context: TTMSFNCJSONScope;\r\nbegin\r\n Context := PeekScope;\r\n if not (Context in [Empty, NonEmpty]) then\r\n raise EInvalidNesting.Create;\r\n if FDeferredName <> '' then\r\n raise EMissingValue.Create;\r\n Dec(FStackSize);\r\n if Context = NonEmpty then\r\n NewLine;\r\n FWriter.Write(CloseBracket);\r\n Result := Self;\r\nend;\r\n\r\nprocedure TTMSFNCJSONWriter.Close;\r\nbegin\r\n if (FStackSize > 1) or ((FStackSize = 1) and (PeekScope <> TTMSFNCJSONScope.jscNonEmptyDocument)) then\r\n raise EInvalidNesting.Create;\r\nend;\r\n\r\nconstructor TTMSFNCJSONWriter.Create(const aStream: TStream);\r\nbegin\r\n inherited Create;\r\n FWriter := TTMSFNCJSONStreamWriter.Create(aStream);\r\n FSeparator := ':';\r\n PushScope(TTMSFNCJSONScope.jscEmptyDocument);\r\nend;\r\n\r\ndestructor TTMSFNCJSONWriter.Destroy;\r\nbegin\r\n FWriter.Free;\r\n inherited;\r\nend;\r\n\r\nprocedure TTMSFNCJSONWriter.NewLine;\r\nvar\r\n I: integer;\r\nbegin\r\n if FIndent <> '' then\r\n begin\r\n FWriter.Write(#13#10);\r\n for I := 1 to FStackSize - 1 do\r\n FWriter.Write(FIndent);\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCJSONWriter.OpenItem(const Empty: TTMSFNCJSONScope;\r\n const OpenBracket: string): TTMSFNCJSONWriter;\r\nbegin\r\n BeforeValue(true);\r\n PushScope(Empty);\r\n FWriter.Write(OpenBracket);\r\n Result := Self;\r\nend;\r\n\r\nfunction TTMSFNCJSONWriter.PeekScope: TTMSFNCJSONScope;\r\nbegin\r\n if FStackSize = 0 then\r\n raise EEmptyJson.Create;\r\n Result := FStack[FStackSize - 1];\r\nend;\r\n\r\nprocedure TTMSFNCJSONWriter.PushScope(const Scope: TTMSFNCJSONScope);\r\nbegin\r\n if FStackSize > MaxStackSize then\r\n raise ETooManyDepthLevels.Create;\r\n FStack[FStackSize] := Scope;\r\n Inc(FStackSize);\r\nend;\r\n\r\nprocedure TTMSFNCJSONWriter.ReplaceTop(const Scope: TTMSFNCJSONScope);\r\nbegin\r\n if FStackSize = 0 then\r\n raise EEmptyJson.Create;\r\n FStack[FStackSize - 1] := Scope;\r\nend;\r\n\r\nprocedure TTMSFNCJSONWriter.SetIndentLength(const Value: integer);\r\nbegin\r\n if Value <= 0 then\r\n begin\r\n FIndent := '';\r\n FSeparator := ':';\r\n end else\r\n begin\r\n FIndent := StringOfChar(#32, Value);\r\n FSeparator := ': ';\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCJSONWriter.GetIndentLength: integer;\r\nbegin\r\n Result := Length(FIndent);\r\nend;\r\n\r\nprocedure TTMSFNCJSONWriter.InternalWriteString(const Value: string);\r\nbegin\r\n FWriter.Write('\"');\r\n FWriter.Write(TTMSFNCUtils.EscapeString(Value));\r\n FWriter.Write('\"');\r\nend;\r\n\r\nfunction TTMSFNCJSONWriter.WriteString(const Value: string): TTMSFNCJSONWriter;\r\nbegin\r\n WriteDeferredName;\r\n BeforeValue(false);\r\n InternalWriteString(Value);\r\n Result := Self;\r\nend;\r\n\r\nfunction TTMSFNCJSONWriter.WriteEndArray: TTMSFNCJSONWriter;\r\nbegin\r\n Result := CloseItem(TTMSFNCJSONScope.jscEmptyArray, TTMSFNCJSONScope.jscNonEmptyArray, ']');\r\nend;\r\n\r\nfunction TTMSFNCJSONWriter.WriteEndObject: TTMSFNCJSONWriter;\r\nbegin\r\n Result := CloseItem(TTMSFNCJSONScope.jscEmptyObject, TTMSFNCJSONScope.jscNonEmptyObject, '}');\r\nend;\r\n\r\nfunction TTMSFNCJSONWriter.WriteBeginArray: TTMSFNCJSONWriter;\r\nbegin\r\n WriteDeferredName;\r\n Result := OpenItem(TTMSFNCJSONScope.jscEmptyArray, '[');\r\nend;\r\n\r\nfunction TTMSFNCJSONWriter.WriteBeginObject: TTMSFNCJSONWriter;\r\nbegin\r\n WriteDeferredName;\r\n Result := OpenItem(TTMSFNCJSONScope.jscEmptyObject, '{');\r\nend;\r\n\r\nfunction TTMSFNCJSONWriter.WriteBoolean(const Value: boolean): TTMSFNCJSONWriter;\r\nbegin\r\n WriteDeferredName;\r\n BeforeValue(false);\r\n if Value then\r\n FWriter.Write('true')\r\n else\r\n FWriter.Write('false');\r\n Result := Self;\r\nend;\r\n\r\nprocedure TTMSFNCJSONWriter.WriteDeferredName;\r\nbegin\r\n if FDeferredName <> '' then\r\n begin\r\n BeforeName;\r\n InternalWriteString(FDeferredName);\r\n FDeferredName := '';\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCJSONWriter.WriteDouble(const Value: double): TTMSFNCJSONWriter;\r\nbegin\r\n WriteDeferredName;\r\n BeforeValue(false);\r\n FWriter.Write(TTMSFNCUtils.FloatToStrDot(Value));\r\n Result := Self;\r\nend;\r\n\r\nfunction TTMSFNCJSONWriter.WriteName(const Name: string): TTMSFNCJSONWriter;\r\nbegin\r\n if Name = '' then\r\n raise EEmptyName.Create;\r\n if FDeferredName <> '' then\r\n raise EMissingValue.Create;\r\n if FStackSize = 0 then\r\n raise EEmptyJson.Create;\r\n FDeferredName := Name;\r\n Result := Self;\r\nend;\r\n\r\nfunction TTMSFNCJSONWriter.WriteNull: TTMSFNCJSONWriter;\r\nbegin\r\n WriteDeferredName;\r\n BeforeValue(false);\r\n FWriter.Write('null');\r\n Result := Self;\r\nend;\r\n\r\nfunction TTMSFNCJSONWriter.WriteRawString(const Value: string): TTMSFNCJSONWriter;\r\nbegin\r\n WriteDeferredName;\r\n BeforeValue(false);\r\n FWriter.Write('\"');\r\n FWriter.Write(Value);\r\n FWriter.Write('\"');\r\n Result := Self;\r\nend;\r\n\r\nfunction TTMSFNCJSONWriter.WriteInteger(const Value: Int64): TTMSFNCJSONWriter;\r\nbegin\r\n WriteDeferredName;\r\n BeforeValue(false);\r\n FWriter.Write(IntToStr(Value));\r\n Result := Self;\r\nend;\r\n\r\n{ TTMSFNCJSONStreamWriter }\r\n\r\nconstructor TTMSFNCJSONStreamWriter.Create(aStream: TStream);\r\nbegin\r\n FStream := aStream;\r\n FWriteStream := TStringStream.Create(''{$IFDEF WEBLIB}, TEncoding.Ansi{$ENDIF});\r\nend;\r\n\r\ndestructor TTMSFNCJSONStreamWriter.Destroy;\r\nbegin\r\n try\r\n FWriteStream.Position := 0;\r\n FStream.CopyFrom(FWritestream, FWriteStream.Size);\r\n finally\r\n FWriteStream.Free;\r\n end;\r\n inherited;\r\nend;\r\n\r\nprocedure TTMSFNCJSONStreamWriter.Write(const Value: string);\r\nbegin\r\n FWriteStream.WriteString(Value);\r\nend;\r\n\r\n{ TTMSFNCJSONWriter.ECannotWriteName }\r\n\r\nconstructor TTMSFNCJSONWriter.ECannotWriteName.Create;\r\nbegin\r\n inherited Create('Cannot write name in current Json scope');\r\nend;\r\n\r\n{ TTMSFNCJSONWriter.EMultipleRootNotAllowed }\r\n\r\nconstructor TTMSFNCJSONWriter.EMultipleRootNotAllowed.Create;\r\nbegin\r\n inherited Create('Multiple root values not allowed');\r\nend;\r\n\r\n{ TTMSFNCJSONWriter.EObjectOrArrayExpected }\r\n\r\nconstructor TTMSFNCJSONWriter.EObjectOrArrayExpected.Create;\r\nbegin\r\n inherited Create('Object or array expected as top-level value');\r\nend;\r\n\r\n{ TTMSFNCJSONWriter.EInvalidNesting }\r\n\r\nconstructor TTMSFNCJSONWriter.EInvalidNesting.Create;\r\nbegin\r\n inherited Create('Invalid nesting. Not all arrays/objects were properly closed.');\r\nend;\r\n\r\n{ TTMSFNCJSONWriter.EMissingValue }\r\n\r\nconstructor TTMSFNCJSONWriter.EMissingValue.Create;\r\nbegin\r\n inherited Create('Json value missing');\r\nend;\r\n\r\n{ TTMSFNCJSONWriter.ETooManyDepthLevels }\r\n\r\nconstructor TTMSFNCJSONWriter.ETooManyDepthLevels.Create;\r\nbegin\r\n inherited Create('Maximum level of nested structured reached.');\r\nend;\r\n\r\n{ TTMSFNCJSONWriter.EEmptyJson }\r\n\r\nconstructor TTMSFNCJSONWriter.EEmptyJson.Create;\r\nbegin\r\n inherited Create('Json is still empty. Cannot perform operation.');\r\nend;\r\n\r\n{ TTMSFNCJSONWriter.EEmptyName }\r\n\r\nconstructor TTMSFNCJSONWriter.EEmptyName.Create;\r\nbegin\r\n inherited Create('Cannot write empty name');\r\nend;\r\n\r\nend.\r\n","{********************************************************************}\r\n{ }\r\n{ written by TMS Software }\r\n{ copyright (c) 2023 }\r\n{ Email : info@tmssoftware.com }\r\n{ Web : http://www.tmssoftware.com }\r\n{ }\r\n{ The source code is given as is. The author is not responsible }\r\n{ for any possible damage done due to the use of this code. }\r\n{ The complete source code remains property of the author and may }\r\n{ not be distributed, published, given or sold in any form as such. }\r\n{ No parts of the source code can be included in any other component }\r\n{ or application without written authorization of the author. }\r\n{********************************************************************}\r\n\r\nunit WEBLib.TMSFNCTypes;\r\n\r\n{$I WEBLib.TMSFNCDefines.inc}\r\n\r\n{$IFNDEF WEBLIB}\r\n{$HINTS OFF}\r\n{$IFDEF LCLLIB}\r\n{$DEFINE USETRECTF}\r\n{$ENDIF}\r\n{$IFDEF VCLLIB}\r\n{$IF COMPILERVERSION < 23}\r\n{$DEFINE USETRECTF}\r\n{$IFEND}\r\n{$ENDIF}\r\n{$HINTS ON}\r\n{$ENDIF}\r\n\r\n{$IFDEF WEBLIB}\r\n{$DEFINE USETRECTF}\r\n{$ENDIF}\r\n\r\n{$IFDEF FMXLIB}\r\n{$DEFINE FMXWEBLIB}\r\n{$ENDIF}\r\n{$IFDEF CMNLIB}\r\n{$DEFINE CMNWEBLIB}\r\n{$ENDIF}\r\n{$IFDEF WEBLIB}\r\n{$DEFINE CMNWEBLIB}\r\n{$DEFINE FMXWEBLIB}\r\n{$DEFINE LCLWEBLIB}\r\n{$ENDIF}\r\n\r\n{$IFDEF LCLLIB}\r\n{$DEFINE USEOWNEDCOLLECTION}\r\n{$DEFINE LCLWEBLIB}\r\n{$ENDIF}\r\n\r\n{$IFNDEF LCLWEBLIB}\r\n{$HINTS OFF}\r\n{$IF COMPILERVERSION > 22}\r\n{$DEFINE USEOWNEDCOLLECTION}\r\n{$IFEND}\r\n{$HINTS ON}\r\n{$ENDIF}\r\n\r\n{$DEFINE SVGSUPPORT}\r\n\r\n{$IFNDEF LCLWEBLIB}\r\n{$HINTS OFF}\r\n{$IF COMPILERVERSION > 25}\r\n{$DEFINE SUPPORTSHELPERS}\r\n{$IFEND}\r\n{$HINTS ON}\r\n{$ELSE}\r\n{$DEFINE SUPPORTSHELPERS}\r\n{$ENDIF}\r\n\r\n{$IFDEF FNCLIB}\r\n{$DEFINE JSONSUPPORT}\r\n{$ELSE}\r\n{$HINTS OFF}\r\n{$IF COMPILERVERSION > 27}\r\n{$DEFINE JSONSUPPORT}\r\n{$IFEND}\r\n{$HINTS ON}\r\n{$ENDIF}\r\n\r\ninterface\r\n\r\nuses\r\n {$IFDEF VCLLIB}\r\n Windows,\r\n {$IFDEF SVGSUPPORT}\r\n {$HINTS OFF}\r\n {$IF COMPILERVERSION >= 33}\r\n Vcl.BaseImageCollection,\r\n {$IFEND}\r\n {$HINTS ON}\r\n {$ENDIF}\r\n {$ENDIF}\r\n {$IFNDEF LCLWEBLIB}\r\n {$HINTS OFF}\r\n {$IF COMPILERVERSION > 22}\r\n UITypes,\r\n {$IFEND}\r\n {$HINTS ON}\r\n {$ENDIF}\r\n {$IFDEF LCLLIB}\r\n LCLType,\r\n {$ENDIF}\r\n Types, Classes, WEBLib.Graphics\r\n ,SysUtils, WEBLib.Controls, Math\r\n {$IFDEF WEBLIB}\r\n ,WEBLib.JSON\r\n {$ENDIF}\r\n {$IFDEF JSONSUPPORT}\r\n {$IFNDEF WEBLIB}\r\n {$IFNDEF LCLLIB}\r\n {$HINTS OFF}\r\n {$IF COMPILERVERSION > 26}\r\n ,JSON\r\n {$ELSE}\r\n ,DBXJSON\r\n {$IFEND}\r\n {$HINTS ON}\r\n {$ELSE}\r\n ,fpjson\r\n {$ENDIF}\r\n {$ENDIF}\r\n {$ENDIF}\r\n ;\r\n\r\ntype\r\n ITMSFNCProductInfo = interface\r\n ['{C53329EA-7B3A-4507-AD9E-88ACD6A85054}']\r\n function GetVersion: string;\r\n function GetDocURL: string;\r\n function GetTipsURL: string;\r\n end;\r\n\r\nconst\r\n TTMSFNCBaseDocURL = 'https://download.tmssoftware.com/doc/';\r\n TTMSFNCBaseTipsURL = 'https://www.tmssoftware.com/site/tmsfnccore.asp?s=faq';\r\n {$IFNDEF WEBLIB}\r\n {$HINTS OFF}\r\n {$ENDIF}\r\n {$IFNDEF LCLLIB}\r\n {$IF COMPILERVERSION > 28}\r\n pidWeb = $10000;\r\n {$ELSE}\r\n pidWeb = $1000;\r\n {$IFEND}\r\n {$ENDIF}\r\n {$IFNDEF WEBLIB}\r\n {$HINTS ON}\r\n {$ENDIF}\r\n {$IFDEF FMXLIB}\r\n {$HINTS OFF}\r\n TMSPlatformsDesktop = pidWin32 or pidWin64{$IF COMPILERVERSION > 35} or pidWin64x{$IFEND} or pidOSX32{$IF COMPILERVERSION > 34} or pidOSXArm64{$IFEND}{$IF COMPILERVERSION > 32} or pidOSX64{$IFEND}{$IF COMPILERVERSION > 33} or pidLinux64{$IFEND};\r\n TMSPlatforms = pidWin32 or pidWin64{$IF COMPILERVERSION > 35} or pidWin64x{$IFEND} or pidOSX32{$IF COMPILERVERSION > 34} or pidOSXArm64{$IFEND}{$IF COMPILERVERSION > 33} or pidLinux64{$IFEND} or {$IF COMPILERVERSION > 32}pidOSX64 or pidiOSSimulator32 or pidiOSSimulator64{$ELSE}pidiOSSimulator{$IFEND} or {$IF COMPILERVERSION > 28}pidiOSDevice32 or pidiOSDevice64{$ELSE}pidiOSDevice{$IFEND}\r\n or {$IF COMPILERVERSION > 32}{$IF COMPILERVERSION > 34}pidAndroidArm32 or pidAndroidArm64{$ELSE}pidAndroid32Arm or pidAndroid64Arm{$IFEND}{$ELSE}pidAndroid{$IFEND};\r\n {$HINTS ON}\r\n TMSPlatformsWeb = TMSPlatforms{$IFDEF FNCLIB} or pidWeb{$ENDIF};\r\n TMSPlatformsWebDesktop = TMSPlatformsDesktop{$IFDEF FNCLIB} or pidWeb{$ENDIF};\r\n KEY_CANCEL = VKCANCEL;\r\n KEY_CONTROL = VKCONTROL;\r\n KEY_SHIFT = VKSHIFT;\r\n KEY_ESCAPE = VKESCAPE;\r\n KEY_INSERT = VKINSERT;\r\n KEY_DELETE = VKDELETE;\r\n KEY_TAB = VKTAB;\r\n KEY_SUBTRACT = VKSUBTRACT;\r\n KEY_ADD = VKADD;\r\n KEY_MULTIPLY = VKMULTIPLY;\r\n KEY_DIVIDE = VKDIVIDE;\r\n KEY_PRIOR = VKPRIOR;\r\n KEY_NEXT = VKNEXT;\r\n KEY_UP = VKUP;\r\n KEY_DOWN = VKDOWN;\r\n KEY_RIGHT = VKRIGHT;\r\n KEY_LEFT = VKLEFT;\r\n KEY_HOME = VKHOME;\r\n KEY_END = VKEND;\r\n KEY_RETURN = VKRETURN;\r\n KEY_SPACE = VKSPACE;\r\n KEY_MENU = VKMENU;\r\n KEY_BACK = VKBACK;\r\n KEY_F1 = VKF1;\r\n KEY_F2 = VKF2;\r\n KEY_F3 = VKF3;\r\n KEY_F4 = VKF4;\r\n KEY_F5 = VKF5;\r\n KEY_F6 = VKF6;\r\n KEY_F7 = VKF7;\r\n KEY_F8 = VKF8;\r\n KEY_F9 = VKF9;\r\n KEY_F10 = VKF10;\r\n KEY_F11 = VKF11;\r\n KEY_F12 = VKF12;\r\n {$ENDIF}\r\n {$IFDEF CMNWEBLIB}\r\n {$IFNDEF LCLLIB}\r\n {$IFNDEF WEBLIB}\r\n {$HINTS OFF}\r\n {$ENDIF}\r\n {$IF COMPILERVERSION > 22}\r\n TMSPlatformsDesktop = pidWin32 or pidWin64{$IF COMPILERVERSION > 35} or pidWin64x{$IFEND};\r\n TMSPlatforms = pidWin32 or pidWin64{$IF COMPILERVERSION > 35} or pidWin64x{$IFEND};\r\n TMSPlatformsWeb = TMSPlatforms{$IFDEF FNCLIB} or pidWeb{$ENDIF};\r\n TMSPlatformsWebDesktop = TMSPlatformsDesktop{$IFDEF FNCLIB} or pidWeb{$ENDIF};\r\n {$ELSE}\r\n ssCommand = ssCtrl;\r\n TMSPlatformsDesktop = 0;\r\n TMSPlatforms = 0;\r\n TMSPlatformsWeb = 0;\r\n TMSPlatformsWebDesktop = 0;\r\n {$IFEND}\r\n {$IFNDEF WEBLIB}\r\n {$HINTS ON}\r\n {$ENDIF}\r\n {$ENDIF}\r\n {$IFDEF LCLLIB}\r\n ssCommand = ssCtrl;\r\n {$ENDIF}\r\n KEY_CANCEL = VK_CANCEL;\r\n KEY_CONTROL = VK_CONTROL;\r\n KEY_SHIFT = VK_SHIFT;\r\n KEY_ESCAPE = VK_ESCAPE;\r\n KEY_INSERT = VK_INSERT;\r\n KEY_DELETE = VK_DELETE;\r\n KEY_TAB = VK_TAB;\r\n KEY_SUBTRACT = VK_SUBTRACT;\r\n KEY_ADD = VK_ADD;\r\n KEY_MULTIPLY = VK_MULTIPLY;\r\n KEY_DIVIDE = VK_DIVIDE;\r\n KEY_PRIOR = VK_PRIOR;\r\n KEY_NEXT = VK_NEXT;\r\n KEY_UP = VK_UP;\r\n KEY_DOWN = VK_DOWN;\r\n KEY_RIGHT = VK_RIGHT;\r\n KEY_LEFT = VK_LEFT;\r\n KEY_HOME = VK_HOME;\r\n KEY_END = VK_END;\r\n KEY_RETURN = VK_RETURN;\r\n KEY_SPACE = VK_SPACE;\r\n KEY_MENU = VK_MENU;\r\n KEY_BACK = VK_BACK;\r\n KEY_F1 = VK_F1;\r\n KEY_F2 = VK_F2;\r\n KEY_F3 = VK_F3;\r\n KEY_F4 = VK_F4;\r\n KEY_F5 = VK_F5;\r\n KEY_F6 = VK_F6;\r\n KEY_F7 = VK_F7;\r\n KEY_F8 = VK_F8;\r\n KEY_F9 = VK_F9;\r\n KEY_F10 = VK_F10;\r\n KEY_F11 = VK_F11;\r\n KEY_F12 = VK_F12;\r\n {$ENDIF}\r\n\r\n{$IFDEF WEBLIB}\r\nconst\r\n SReadError = 'Stream read error';\r\n SWriteError = 'Stream write error';\r\n{$ENDIF}\r\n\r\ntype\r\n {$IFDEF WEBLIB}\r\n TResourceStream = TObject;\r\n\r\n TTMSFNCStreamLoadedEvent = reference to procedure;\r\n\r\n TTMSFNCMemoryStream = class helper for TCustomMemoryStream\r\n private\r\n function GetBytes: TBytes;\r\n public\r\n procedure OpenFile(FileType: string);\r\n procedure SaveToFile(FileName: string);\r\n property Bytes: TBytes read GetBytes;\r\n end;\r\n\r\n PChar = string;\r\n {$ENDIF}\r\n\r\n {$IFDEF LCLLIB}\r\n TJSONValue = TJSONData;\r\n {$ENDIF}\r\n\r\n TTMSFNCMouseButton = TMouseButton;\r\n\r\n {$IFDEF USETRECTF}\r\n {$IFNDEF WEBLIB}\r\n PSizeF = ^TSizeF;\r\n {$ENDIF}\r\n TSizeF = record\r\n cx: Single;\r\n cy: Single;\r\n {$IFNDEF WEBLIB}\r\n public\r\n property Width: Single read cx write cx;\r\n property Height: Single read cy write cy;\r\n {$ENDIF}\r\n end;\r\n\r\n {$IFNDEF WEBLIB}\r\n TPointFType = array [0..1] of Single;\r\n PPointF = ^TPointF;\r\n {$ENDIF}\r\n TPointF = record\r\n {$IFDEF WEBLIB}\r\n X, Y: Single;\r\n {$ENDIF}\r\n {$IFNDEF WEBLIB}\r\n function Length: Single;\r\n procedure Offset(const ADeltaX, ADeltaY: Single);\r\n case Integer of\r\n 0: (V: TPointFType;);\r\n 1: (X: Single;\r\n Y: Single;);\r\n {$ENDIF}\r\n end;\r\n\r\n {$IFNDEF WEBLIB}\r\n PRectF = ^TRectF;\r\n {$ENDIF}\r\n TRectF = record\r\n {$IFNDEF WEBLIB}\r\n private\r\n function GetWidth: Single;\r\n procedure SetWidth(const Value: Single);\r\n function GetHeight: Single;\r\n procedure SetHeight(const Value: Single);\r\n function GetSize: TSizeF;\r\n procedure SetSize(const Value: TSizeF);\r\n public\r\n procedure Offset(const DX, DY: Single);\r\n procedure Inflate(const DX, DY: Single);\r\n function CenterAt(const ADesignatedArea: TRectF): TRectF;\r\n function SnapToPixel(const AScale: Single; const APlaceBetweenPixels: Boolean): TRectF;\r\n function FitInto(const ADesignatedArea: TRectF; out Ratio: Single): TRectF; overload;\r\n function FitInto(const ADesignatedArea: TRectF): TRectF; overload;\r\n function IsEmpty: Boolean;\r\n function IntersectsWith(const R: TRectF): Boolean;\r\n function CenterPoint: TPointF;\r\n function Empty: TRectF;\r\n property Width: Single read GetWidth write SetWidth;\r\n property Height: Single read GetHeight write SetHeight;\r\n property Size: TSizeF read GetSize write SetSize;\r\n case Integer of\r\n 0: (Left, Top, Right, Bottom: Single);\r\n 1: (TopLeft, BottomRight: TPointF);\r\n {$ENDIF}\r\n {$IFDEF WEBLIB}\r\n Left, Top, Right, Bottom: Single;\r\n {$ENDIF}\r\n end;\r\n {$ENDIF}\r\n\r\n TTMSFNCBitmap = class;\r\n\r\n {$IFDEF FMXLIB}\r\n TTMSFNCSVGImportColor = TAlphaColor;\r\n {$ENDIF}\r\n {$IFNDEF FMXLIB}\r\n TTMSFNCSVGImportColor = TColor;\r\n {$ENDIF}\r\n\r\n TTMSFNCSVGImport = class(TPersistent)\r\n private\r\n FRotationAngle: Single;\r\n FViewRect: TRectF;\r\n FGrayScale: Boolean;\r\n FCustomFillColor: TTMSFNCSVGImportColor;\r\n FCustomStrokeColor: TTMSFNCSVGImportColor;\r\n FTintColor: TTMSFNCSVGImportColor;\r\n FCustomOpacity: Single;\r\n public\r\n function HasElements: Boolean; virtual; abstract;\r\n function ElementCount: Integer; virtual; abstract;\r\n function GenerateBitmap(AWidth: Single = - 1; AHeight: Single = -1): TTMSFNCBitmap; virtual; abstract;\r\n constructor Create; virtual;\r\n procedure Clear; virtual; abstract;\r\n procedure Draw(const ACanvas: TCanvas; ARect: TRectF; ANative: Boolean = False); virtual; abstract;\r\n procedure LoadFromText(const AText: string); virtual; abstract;\r\n procedure LoadFromFile(const AFile: string); virtual; abstract;\r\n procedure LoadFromStream(const AStream: TStream); virtual; abstract;\r\n procedure SaveToStream(const AStream: TStream); virtual; abstract;\r\n procedure SaveToFile(const AFile: string); virtual; abstract;\r\n property ViewRect: TRectF read FViewRect write FViewRect;\r\n published\r\n property GrayScale: Boolean read FGrayScale write FGrayScale default False;\r\n property CustomFillColor: TTMSFNCSVGImportColor read FCustomFillColor write FCustomFillColor;\r\n property CustomStrokeColor: TTMSFNCSVGImportColor read FCustomStrokeColor write FCustomStrokeColor;\r\n property TintColor: TTMSFNCSVGImportColor read FTintColor write FTintColor;\r\n property CustomOpacity: Single read FCustomOpacity write FCustomOpacity;\r\n property RotationAngle: Single read FRotationAngle write FRotationAngle;\r\n end;\r\n\r\n {$IFDEF CMNLIB}\r\n TTMSFNCSVGBitmap = class(TGraphic)\r\n strict private\r\n FSVG: TTMSFNCSVGImport;\r\n FStream: TMemoryStream;\r\n FFileName: TFileName;\r\n procedure SetFileName(const Value: TFileName);\r\n protected\r\n function GetEmpty: Boolean; override;\r\n function GetWidth: Integer; override;\r\n function GetHeight: Integer; override;\r\n procedure ReadData(Stream: TStream); override;\r\n procedure WriteData(Stream: TStream); override;\r\n {$IFDEF LCLLIB}\r\n procedure SetWidth(Value: Integer); override;\r\n procedure SetHeight(Value: Integer); override;\r\n procedure SetTransparent(Value: Boolean); override;\r\n function GetTransparent: Boolean; override;\r\n {$ENDIF}\r\n public\r\n constructor Create; override;\r\n destructor Destroy; override;\r\n {$IFDEF VCLLIB}\r\n {$HINTS OFF}\r\n {$IF COMPILERVERSION >= 32}\r\n class function CanLoadFromStream(Stream: TStream): Boolean; override;\r\n {$IFEND}\r\n {$HINTS ON}\r\n {$ENDIF}\r\n {$IFDEF LCLLIB}\r\n class function IsStreamFormatSupported(Stream: TStream): Boolean; override;\r\n {$ENDIF} \r\n function HasSVG: Boolean; virtual;\r\n procedure Draw(ACanvas: TCanvas; const Rect: TRect); override;\r\n procedure Clear;\r\n procedure Assign(Source: TPersistent); override;\r\n procedure AssignTo(Dest: TPersistent); override;\r\n procedure LoadFromFile(const Filename: String); override;\r\n procedure LoadFromStream(Stream: TStream); override;\r\n procedure SaveToStream(Stream: TStream); override;\r\n procedure SaveToFile(const FileName: String); override;\r\n property FileName: TFileName read FFileName write SetFileName;\r\n property SVG: TTMSFNCSVGImport read FSVG;\r\n end;\r\n\r\n {$IFDEF SVGSUPPORT}\r\n\r\n {$IFNDEF FNCLIB}\r\n TTMSFNCSVGBitmap = class(TTMSFNCSVGBitmap);\r\n {$ENDIF}\r\n\r\n {$IFDEF VCLLIB}\r\n {$HINTS OFF}\r\n {$IF COMPILERVERSION >= 33}\r\n TTMSFNCSVGImageCollectionItem = class(TCollectionItem)\r\n private\r\n FRotationAngle: Single;\r\n FData: TPicture;\r\n FName: String;\r\n FGrayScale: Boolean;\r\n FCustomFillColor: TTMSFNCSVGImportColor;\r\n FCustomStrokeColor: TTMSFNCSVGImportColor;\r\n FTintColor: TTMSFNCSVGImportColor;\r\n FCustomOpacity: Single;\r\n procedure SetData(const Value: TPicture);\r\n procedure SetName(const Value: String);\r\n function IsTintColorStored: Boolean;\r\n function IsCustomFillColorStored: Boolean;\r\n function IsCustomStrokeColorStored: Boolean;\r\n function IsCustomOpacityStored: Boolean;\r\n function IsRotationAngleStored: Boolean;\r\n public\r\n constructor Create(ACollection: TCollection); override;\r\n procedure Assign(Source: TPersistent); override;\r\n function GetDisplayName: string; override;\r\n destructor Destroy; override;\r\n published\r\n property Data: TPicture read FData write SetData;\r\n property Name: String read FName write SetName;\r\n property GrayScale: Boolean read FGrayScale write FGrayScale default False;\r\n property TintColor: TTMSFNCSVGImportColor read FTintColor write FTintColor stored IsTintColorStored nodefault;\r\n property CustomFillColor: TTMSFNCSVGImportColor read FCustomFillColor write FCustomFillColor stored IsCustomFillColorStored nodefault;\r\n property CustomStrokeColor: TTMSFNCSVGImportColor read FCustomStrokeColor write FCustomStrokeColor stored IsCustomStrokeColorStored nodefault;\r\n property CustomOpacity: Single read FCustomOpacity write FCustomOpacity stored IsCustomOpacityStored nodefault;\r\n property RotationAngle: Single read FRotationAngle write FRotationAngle stored IsRotationAngleStored nodefault;\r\n end;\r\n\r\n TTMSFNCSVGImageCollectionItems = class(TOwnedCollection)\r\n private\r\n function GetItem(Index: Integer): TTMSFNCSVGImageCollectionItem;\r\n procedure SetItem(Index: Integer; Value: TTMSFNCSVGImageCollectionItem);\r\n public\r\n function Add: TTMSFNCSVGImageCollectionItem;\r\n property Items[Index: Integer]: TTMSFNCSVGImageCollectionItem read GetItem write SetItem; default;\r\n end;\r\n\r\n TTMSFNCSVGImageCollection = class(TCustomImageCollection)\r\n private\r\n FImages: TTMSFNCSVGImageCollectionItems;\r\n procedure SetImages(const Value: TTMSFNCSVGImageCollectionItems);\r\n protected\r\n function GetCount: Integer; override;\r\n public\r\n constructor Create(AOwner: TComponent); override;\r\n destructor Destroy; override;\r\n procedure Assign(Source: TPersistent); override;\r\n procedure Draw(ACanvas: TCanvas; ARect: TRect; AIndex: Integer; AProportional: Boolean = False); overload; override;\r\n procedure Draw(ACanvas: TCanvas; X, Y: Integer; AIndex: Integer; AProportional: Boolean = False); overload; virtual;\r\n function IsIndexAvailable(AIndex: Integer): Boolean; override;\r\n function GetIndexByName(const AName: String): Integer; override;\r\n function GetNameByIndex(AIndex: Integer): String; override;\r\n function GetItemByIndex(AIndex: Integer): TTMSFNCSVGImageCollectionItem; virtual;\r\n function GetBitmap(AIndex: Integer; AWidth, AHeight: Integer): TBitmap; overload; override;\r\n published\r\n property Images: TTMSFNCSVGImageCollectionItems read FImages write SetImages;\r\n end;\r\n {$IFEND}\r\n {$HINTS ON}\r\n {$ENDIF}\r\n {$ENDIF}\r\n {$ENDIF}\r\n\r\n {$IFDEF FMXLIB}\r\n TTMSFNCDrawBitmap = TBitmap;\r\n TTMSFNCBitmapHelperClass = TBitmap;\r\n TTMSFNCBitmap = class(TBitmap)\r\n private\r\n FSVG: TTMSFNCSVGImport;\r\n procedure ReadSVG(Stream: TStream);\r\n procedure WriteSVG(Stream: TStream);\r\n protected\r\n procedure DefineProperties(Filer: TFiler); override;\r\n public\r\n procedure Draw(ACanvas: TCanvas; const Rect: TRectF); virtual;\r\n constructor CreateFromStream(const AStream: TStream); override;\r\n constructor CreateFromFile(const AFileName: string); override;\r\n function HasSVG: Boolean; virtual;\r\n destructor Destroy; override;\r\n procedure Assign(Source: TPersistent); override;\r\n procedure LoadFromFile(const AFileName: string); virtual;\r\n procedure LoadFromStream(Stream: TStream); virtual;\r\n procedure LoadFromBase64(const ABase64: string); virtual;\r\n procedure LoadFromSVG(const ASVG: string); virtual;\r\n procedure SaveToStream(Stream: TStream); virtual;\r\n procedure SaveToFile(const AFilename: string); virtual;\r\n function SaveToBase64: string; virtual;\r\n property SVG: TTMSFNCSVGImport read FSVG;\r\n end;\r\n {$ENDIF}\r\n {$IFDEF CMNLIB}\r\n TTMSFNCDrawBitmap = TGraphic;\r\n TTMSFNCBitmapHelperClass = TPicture;\r\n TTMSFNCBitmap = class(TPicture)\r\n {$IFDEF SVGSUPPORT}\r\n private\r\n function GetSVG: TTMSFNCSVGImport;\r\n public\r\n function HasSVG: Boolean; virtual;\r\n property SVG: TTMSFNCSVGImport read GetSVG;\r\n {$ENDIF}\r\n end;\r\n {$ENDIF}\r\n {$IFDEF WEBLIB}\r\n TTMSFNCBitmap = class(TBitmap)\r\n public\r\n constructor CreateFromStream(const AStream: TStream); virtual;\r\n end;\r\n TTMSFNCDrawBitmap = TGraphic;\r\n TTMSFNCBitmapHelperClass = TGraphic;\r\n {$ENDIF}\r\n\r\n {$IFNDEF LCLLIB}\r\n {$IFNDEF USETRECTF}\r\n TRectFHelper = record helper for TRectF\r\n function CenterAt(const ADesignatedArea: TRectF): TRectF;\r\n function SnapToPixel(const AScale: Single; const APlaceBetweenPixels: Boolean): TRectF;\r\n function FitInto(const ADesignatedArea: TRectF; out Ratio: Single): TRectF; overload;\r\n function FitInto(const ADesignatedArea: TRectF): TRectF; overload;\r\n end;\r\n {$ENDIF}\r\n {$ENDIF}\r\n\r\n {$IFNDEF WEBLIB}\r\n TTMSFNCBitmapHelper = class helper for TTMSFNCBitmapHelperClass\r\n procedure LoadFromSVG(ASVG: string);\r\n procedure LoadFromBase64(ABase64: string);\r\n procedure LoadFromURL(AURL: String); overload;\r\n procedure LoadFromURL(AURL: String; {%H-}AInstance: NativeUInt); overload;\r\n procedure LoadFromResource(AResourceName: String); overload;\r\n procedure LoadFromResource(AResourceName: String; {%H-}AInstance: NativeUInt); overload;\r\n function SaveToBase64: string;\r\n {$IFDEF CMNLIB}\r\n {$IFDEF VCLLIB}\r\n {$HINTS OFF}\r\n {$IF COMPILERVERSION < 32}\r\n procedure SaveToStream(AStream: TStream);\r\n procedure LoadFromStream(AStream: TStream);\r\n {$IFEND}\r\n {$HINTS ON}\r\n {$ENDIF}\r\n class function CreateFromFile(AFileName: string): TTMSFNCBitmap; overload;\r\n class function CreateFromStream(AStream: TStream): TTMSFNCBitmap; overload;\r\n {$ENDIF}\r\n class function CreateFromResource(AResourceName: string): TTMSFNCBitmap; overload;\r\n class function CreateFromResource(AResourceName: string; {%H-}AInstance: NativeUInt): TTMSFNCBitmap; overload;\r\n class function CreateFromURL(AURL: string): TTMSFNCBitmap; overload;\r\n class function CreateFromURL(AURL: string; {%H-}AInstance: NativeUInt): TTMSFNCBitmap; overload;\r\n class function CreateFromBase64(ABase64: string): TTMSFNCBitmap;\r\n class function CreateFromSVG(ASVG: string): TTMSFNCBitmap;\r\n end;\r\n {$ENDIF}\r\n\r\n {$IFDEF SUPPORTSHELPERS}\r\n TTMSFNCObjectExcludePropertyListArray = array of string;\r\n\r\n TTMSFNCObjectHelper = class helper for TObject\r\n {$IFDEF JSONSUPPORT}\r\n private\r\n function ToJSONValue: TJSONValue;\r\n {$ENDIF}\r\n {$IFDEF JSONSUPPORT}\r\n public\r\n property JSONValue: TJSONValue read ToJSONValue;\r\n {$ENDIF}\r\n function ToJSON(AExcludedProperties: TTMSFNCObjectExcludePropertyListArray): string; overload;\r\n function ToJSON: string; overload;\r\n procedure FromJSON(const Value: string);\r\n property JSON: string read ToJSON write FromJSON;\r\n procedure Log;\r\n procedure SaveToJSONFile(const AFileName: string);\r\n procedure LoadFromJSONFile(const AFileName: string);\r\n procedure SaveToJSONStream(const AStream: TStream);\r\n procedure LoadFromJSONStream(const AStream: TStream);\r\n end;\r\n\r\n {$IFDEF JSONSUPPORT}\r\n TTMSFNCJSONValueHelper = class helper for TJSONValue\r\n private\r\n function GetProperties(AName: string): TJSONValue;\r\n function GetAsArray: TJSONArray;\r\n function GetAsString: string;\r\n function GetAsDouble: Double;\r\n function GetAsInteger: Integer;\r\n function GetAsBoolean: Boolean;\r\n public\r\n property Properties[AName: string]: TJSONValue read GetProperties; default;\r\n property AsArray: TJSONArray read GetAsArray;\r\n property AsString: string read GetAsString;\r\n property AsDouble: Double read GetAsDouble;\r\n property AsInteger: Integer read GetAsInteger;\r\n property AsBoolean: Boolean read GetAsBoolean;\r\n function Find(const APath: string): TJSONValue;\r\n end;\r\n\r\n TTMSFNCJSONArrayHelper = class helper for TJSONArray\r\n private\r\n function GetValues(AIndex: Integer): TJSONValue;\r\n function GetLength: Integer;\r\n public\r\n property Values[AIndex: Integer]: TJSONValue read GetValues; default;\r\n property Length: Integer read GetLength;\r\n end;\r\n {$ENDIF}\r\n {$ENDIF}\r\n\r\n TTMSFNCMargins = class(TPersistent)\r\n private\r\n FRight: Single;\r\n FBottom: Single;\r\n FTop: Single;\r\n FLeft: Single;\r\n FOnChange: TNotifyEvent;\r\n procedure SetBottom(const Value: Single);\r\n procedure SetLeft(const Value: Single);\r\n procedure SetRight(const Value: Single);\r\n procedure SetTop(const Value: Single);\r\n function IsLeftStored: Boolean;\r\n function IsTopStored: Boolean;\r\n function IsRightStored: Boolean;\r\n function IsBottomStored: Boolean;\r\n protected\r\n procedure Changed;\r\n public\r\n constructor Create; overload;\r\n constructor Create(const ARect: TRectF); overload;\r\n procedure Assign(Source: TPersistent); override;\r\n function Empty: Boolean;\r\n function Rect: TRectF;\r\n function PaddingRect(const R: TRectF): TRectF;\r\n published\r\n property Left: Single read FLeft write SetLeft stored IsLeftStored nodefault;\r\n property Top: Single read FTop write SetTop stored IsTopStored nodefault;\r\n property Right: Single read FRight write SetRight stored IsRightStored nodefault;\r\n property Bottom: Single read FBottom write SetBottom stored IsBottomStored nodefault;\r\n property OnChange: TNotifyEvent read FOnChange write FOnChange;\r\n end;\r\n\r\n TTMSFNCPoint = class(TPersistent)\r\n private\r\n FY: Single;\r\n FX: Single;\r\n FOnChange: TNotifyEvent;\r\n procedure SetX(const Value: Single);\r\n procedure SetY(const Value: Single);\r\n function IsXStored: Boolean;\r\n function IsYStored: Boolean;\r\n protected\r\n procedure Changed;\r\n public\r\n constructor Create; overload;\r\n constructor Create(const APoint: TPointF); overload;\r\n procedure Assign(Source: TPersistent); override;\r\n published\r\n property X: Single read FX write SetX stored IsXStored nodefault;\r\n property Y: Single read FY write SetY stored IsYStored nodefault;\r\n property OnChange: TNotifyEvent read FOnChange write FOnChange;\r\n end;\r\n\r\n {$IFNDEF LIMITEDGRAPHICSMODE}\r\n TTMSFNCScaledBitmap = class(TCollectionItem)\r\n private\r\n FBitmap: TTMSFNCBitmap;\r\n FScale: Single;\r\n FBitmapName: string;\r\n function IsScaleStored: Boolean;\r\n procedure SetBitmap(const Value: TTMSFNCBitmap);\r\n procedure SetScale(const Value: Single);\r\n procedure SetBitmapName(const Value: string);\r\n protected\r\n procedure BitmapChanged(Sender: TObject);\r\n public\r\n constructor Create(ACollection: TCollection); override;\r\n destructor Destroy; override;\r\n procedure Assign(Source: TPersistent); override;\r\n published\r\n property Bitmap: TTMSFNCBitmap read FBitmap write SetBitmap;\r\n property BitmapName: string read FBitmapName write SetBitmapName;\r\n property Scale: Single read FScale write SetScale stored IsScaleStored nodefault;\r\n end;\r\n\r\n TTMSFNCScaledBitmaps = class(TOwnedCollection)\r\n private\r\n FOnChange: TNotifyEvent;\r\n function GetItems(Index: Integer): TTMSFNCScaledBitmap;\r\n procedure SetItems(Index: Integer; const Value: TTMSFNCScaledBitmap);\r\n function GetBitmap(Scale: Single): TTMSFNCBitmap;\r\n procedure SetBitmap(Scale: Single; const Value: TTMSFNCBitmap);\r\n protected\r\n procedure Update(Item: TCollectionItem); override;\r\n public\r\n constructor Create(AOwner: TPersistent);\r\n property OnChange: TNotifyEvent read FOnChange write FOnChange;\r\n function Add(Scale: Single = 1.0): TTMSFNCScaledBitmap; overload;\r\n {$IFNDEF WEBLIB}\r\n function AddBitmapFromFile(FileName: string; Scale: Single = 1.0): TTMSFNCScaledBitmap;\r\n {$ENDIF}\r\n function AddBitmapFromResource(ResourceName: String; Scale: Single = 1.0): TTMSFNCScaledBitmap; overload;\r\n function AddBitmapFromResource(ResourceName: String; AInstance: NativeUInt; Scale: Single = 1.0): TTMSFNCScaledBitmap; overload;\r\n function AddBitmap(Bitmap: TTMSFNCBitmap; Scale: Single = 1.0): TTMSFNCScaledBitmap;\r\n function AddBitmapName(BitmapName: string; Scale: Single = 1.0): TTMSFNCScaledBitmap;\r\n function AddDrawBitmap(Bitmap: TTMSFNCDrawBitmap; Scale: Single = 1.0): TTMSFNCScaledBitmap;\r\n function Insert(Index: Integer): TTMSFNCScaledBitmap; overload;\r\n function Insert(Index: Integer; Scale: Single): TTMSFNCScaledBitmap; overload;\r\n function GetBitmapByScale(Scale: Single): TTMSFNCBitmap;\r\n function GetItemByScale(Scale: Single): TTMSFNCScaledBitmap;\r\n property Items[Index: Integer]: TTMSFNCScaledBitmap read GetItems write SetItems; default;\r\n property Bitmaps[Scale: Single]: TTMSFNCBitmap read GetBitmap write SetBitmap;\r\n end;\r\n {$ENDIF}\r\n\r\n TTMSFNCPictureFormat = (pfBMP, pfGIF, pfJPG, pfPNG, pfICO, pfTiff, pfMetaFile, pfNone);\r\n\r\n ITMSFNCCustomEditor = interface\r\n ['{CC0C60B7-75F3-47CE-8A7F-8005A19F12E8}']\r\n procedure SetText(AValue: String);\r\n procedure SetSelStart(AValue: Integer);\r\n procedure SetSelLength(AValue: Integer);\r\n function GetTextLength: Integer;\r\n end;\r\n\r\n {$IFDEF USEOWNEDCOLLECTION}\r\n {$IFDEF LCLLIB}generic {$ENDIF}TTMSFNCOwnedCollection = class(TOwnedCollection)\r\n public type\r\n TTMSFNCCollection = {$IFDEF LCLLIB}specialize {$ENDIF}TTMSFNCOwnedCollection;\r\n\r\n TEnumerator = class\r\n private\r\n FIndex: Integer;\r\n FCol: TTMSFNCCollection;\r\n public\r\n constructor Create(ACol: TTMSFNCCollection);\r\n function GetCurrent: T;\r\n function MoveNext: Boolean;\r\n property Current: T read GetCurrent;\r\n end;\r\n public\r\n function GetEnumerator: TEnumerator;\r\n function GetItem(AIndex: Integer): T;\r\n end;\r\n {$ELSE}\r\n TTMSFNCOwnedCollection = class(TOwnedCollection);\r\n {$ENDIF}\r\n\r\n {$IFNDEF WEBLIB}\r\n TTMSFNCPersistent = class(TInterfacedPersistent);\r\n {$ENDIF}\r\n {$IFDEF WEBLIB}\r\n TTMSFNCPersistent = class(TPersistent);\r\n {$ENDIF}\r\n\r\n TTMSFNCValueRelationShip = TValueRelationShip;\r\n\r\nprocedure InflateRectEx(var R: TRectF; DX, DY: Single);\r\nfunction ConvertToRectF(const Rect: TRect): TRectF; overload;\r\nfunction ConvertToRectF(const Rect: TRectF): TRectF; overload;\r\nfunction ConvertToRect(const Rect: TRectF): TRect; overload;\r\nfunction ConvertToRect(const Rect: TRect): TRect; overload;\r\nfunction ConvertToSizeF(const Size: TSize): TSizeF; overload;\r\nfunction ConvertToSizeF(const Size: TSizeF): TSizeF; overload;\r\nfunction ConvertToSize(const Size: TSizeF): TSize; overload;\r\nfunction ConvertToSize(const Size: TSize): TSize; overload;\r\nfunction ConvertToPointF(const Point: TPoint): TPointF; overload;\r\nfunction ConvertToPointF(const Point: TPointF): TPointF; overload;\r\nfunction ConvertToPoint(const Point: TPointF): TPoint; overload;\r\nfunction ConvertToPoint(const Point: TPoint): TPoint; overload;\r\nfunction OffsetRectEx(var R: TRect; DX, DY: Integer): Boolean; overload;\r\nfunction OffsetRectEx(var R: TRectF; DX, DY: Single): Boolean; overload;\r\nfunction PtInRectEx(const Rect: TRectF; const P: TPointF): Boolean;\r\nfunction IntersectRectEx(const Rect1: TRectF; const Rect2: TRectF): Boolean; overload;\r\nfunction IntersectRectEx(out Rect: TRectF; const R1, R2: TRectF): Boolean; overload;\r\nfunction EqualRectEx(const R1, R2: TRectF): Boolean; overload;\r\nfunction EqualRectEx(const R1, R2: TRect): Boolean; overload;\r\nfunction RectWidthEx(const Rect: TRect): Integer; overload;\r\nfunction RectWidthEx(const Rect: TRectF): Single; overload;\r\nfunction RectHeightEx(const Rect: TRect): Integer; overload;\r\nfunction RectHeightEx(const Rect: TRectF): Single; overload;\r\nfunction RectCenterEx(var R: TRect; const B: TRect): TRect; overload;\r\nfunction RectCenterEx(var R: TRectF; const B: TRectF): TRectF; overload;\r\nfunction RectCenterAtEx(const Rect: TRectF; const ADesignatedArea: TRectF): TRectF;\r\nfunction RectSnapToPixelEx(const Rect: TRectF; const AScale: Single; const APlaceBetweenPixels: Boolean): TRectF;\r\nfunction RectFitIntoEx(const Rect: TRectF; const ADesignatedArea: TRectF; out Ratio: Single): TRectF; overload;\r\nfunction RectFitIntoEx(const Rect: TRectF; const ADesignatedArea: TRectF): TRectF; overload;\r\nfunction GetPointLength(const Point: TPointF): Single;\r\nfunction MakeRectF(Left, Top, Width, Height: Single): TRectF;\r\nfunction CenterPointEx(const R: TRectF): TPointF;\r\nfunction CompareValueEx(const A, B: Extended; Epsilon: Extended = 0): TTMSFNCValueRelationship;\r\nfunction RectIsEmpty(const R: TRectF): Boolean;\r\nfunction EmptyRect: TRectF;\r\nfunction RectIntersectsWithEx(const ARect: TRectF; const R: TRectF): Boolean;\r\n{$IFDEF USETRECTF}\r\nfunction RectF(Left, Top, Right, Bottom: Single): TRectF; {$IFNDEF WEBLIB}inline; {$ENDIF}overload;\r\nfunction PointF(X, Y: Single): TPointF; {$IFNDEF WEBLIB}inline; {$ENDIF}overload;\r\n{$ENDIF}\r\nfunction BitmapToDrawBitmap(ABitmap: TTMSFNCBitmapHelperClass): TTMSFNCDrawBitmap; overload;\r\nfunction IsBitmapEmpty(ABitmap: TTMSFNCBitmapHelperClass): Boolean;\r\nfunction CharInArray(AChar: Char; ACharArray: array of char): Boolean;\r\nfunction CharIsNumber(AChar: Char): Boolean;\r\nfunction CharIsLetter(AChar: Char): Boolean;\r\nfunction CharIsHex(AChar: Char): Boolean;\r\nfunction CharIsLetterOrNumber(AChar: Char): Boolean;\r\n{$IFDEF WEBLIB}\r\nfunction VarToStr(const S: string): string;\r\nfunction VarToDateTime(const S: string): TDateTime;\r\nfunction AnsiPos(const Substr, S: string): Integer;\r\nfunction AnsiUpperCase(const S: string): string;\r\nfunction AnsiLowerCase(const S: string): string;\r\nfunction HInstance: Integer;\r\n{$ENDIF}\r\nfunction CreateNewGUID: string;\r\n\r\nimplementation\r\n\r\nuses\r\n WEBLib.TMSFNCUtils, WEBLib.TMSFNCPersistence\r\n {$IFNDEF WEBLIB}\r\n {$IFDEF SVGSUPPORT}\r\n ,WEBLib.TMSFNCGraphicsSVGEngine\r\n {$ENDIF}\r\n {$ENDIF}\r\n {$IFDEF WEBLIB}\r\n ,JS\r\n {$IFDEF ELECTRON}\r\n ,WEBLib.Electron, libelectron\r\n {$ENDIF}\r\n {$ENDIF}\r\n {$IFDEF VCLLIB}\r\n ,AnsiStrings\r\n {$ENDIF}\r\n {$IFDEF VCLLIB}\r\n ,PNGImage, JPEG, GifImg\r\n {$ENDIF}\r\n {$IFNDEF LCLWEBLIB}\r\n {$HINTS OFF}\r\n {$IF COMPILERVERSION > 24}\r\n ,Character\r\n {$IFEND}\r\n {$HINTS ON}\r\n {$ENDIF}\r\n {$IFDEF CMNLIB}\r\n ,Masks\r\n {$ENDIF}\r\n ;\r\n\r\n{$IFDEF SVGSUPPORT}\r\n{$IFDEF VCLLIB}\r\n{$HINTS OFF}\r\n{$IF COMPILERVERSION >= 33}\r\n\r\n{$IFDEF FNCLIB}\r\n{$R 'TMSFNCSVGImageCollection.res'}\r\n{$ENDIF}\r\n\r\n{$IFEND}\r\n{$HINTS ON}\r\n{$ENDIF}\r\n{$ENDIF}\r\n\r\n{$IFDEF WEBLIB}\r\nfunction VarToStr(const S: string): string;\r\nbegin\r\n Result := S;\r\nend;\r\n\r\nfunction VarToDateTime(const S: string): TDateTime;\r\nbegin\r\n Result := StrToDateTime(S);\r\nend;\r\n\r\nfunction HInstance: Integer;\r\nbegin\r\n Result := 0;\r\nend;\r\n\r\nfunction AnsiUpperCase(const S: string): string;\r\nbegin\r\n Result := UpperCase(S);\r\nend;\r\n\r\nfunction AnsiLowercase(const S: string): string;\r\nbegin\r\n Result := LowerCase(S);\r\nend;\r\n\r\nfunction AnsiPos(const Substr, S: string): Integer;\r\nbegin\r\n Result := Pos(SubStr, S);\r\nend;\r\n{$ENDIF}\r\n\r\nfunction CreateNewGUID: string;\r\n{$IFDEF LCLWEBLIB}\r\nvar\r\n g: TGUID;\r\n{$ENDIF}\r\nbegin\r\n {$IFNDEF LCLWEBLIB}\r\n Result := TGuid.NewGuid.ToString;\r\n {$ENDIF}\r\n {$IFDEF LCLWEBLIB}\r\n CreateGUID(g);\r\n Result := GUIDToString(g);\r\n {$ENDIF}\r\nend;\r\n\r\nfunction CharIsHex(AChar: Char): Boolean;\r\nbegin\r\n {$IFNDEF LCLWEBLIB}\r\n {$HINTS OFF}\r\n {$WARNINGS OFF}\r\n {$IF COMPILERVERSION > 24}\r\n Result := AChar.IsNumber or AChar.IsInArray(['a', 'b', 'c', 'd', 'e', 'f']) or AChar.IsInArray(['A', 'B', 'C', 'D', 'E', 'F']);\r\n {$ELSE}\r\n Result := (AChar in ['0'..'9']) or (AChar in ['a'..'f']) or (AChar in ['A'..'F']);\r\n {$IFEND}\r\n {$WARNINGS ON}\r\n {$HINTS ON}\r\n {$ENDIF}\r\n {$IFDEF LCLWEBLIB}\r\n Result := (AChar in ['0'..'9']) or (AChar in ['a'..'f']) or (AChar in ['A'..'F']);\r\n {$ENDIF}\r\nend;\r\n\r\nfunction CharIsLetter(AChar: Char): Boolean;\r\nbegin\r\n {$IFNDEF LCLWEBLIB}\r\n {$HINTS OFF}\r\n {$WARNINGS OFF}\r\n {$IF COMPILERVERSION > 24}\r\n Result := AChar.IsLetter;\r\n {$ELSE}\r\n Result := (AChar in ['a'..'z']) or (AChar in ['A'..'Z']);\r\n {$IFEND}\r\n {$WARNINGS ON}\r\n {$HINTS ON}\r\n {$ENDIF}\r\n {$IFDEF LCLWEBLIB}\r\n Result := (AChar in ['a'..'z']) or (AChar in ['A'..'Z']);\r\n {$ENDIF}\r\nend;\r\n\r\nfunction CharIsNumber(AChar: Char): Boolean;\r\nbegin\r\n {$IFNDEF LCLWEBLIB}\r\n {$HINTS OFF}\r\n {$WARNINGS OFF}\r\n {$IF COMPILERVERSION > 24}\r\n Result := AChar.IsNumber;\r\n {$ELSE}\r\n Result := (AChar in ['0'..'9']);\r\n {$IFEND}\r\n {$WARNINGS ON}\r\n {$HINTS ON}\r\n {$ENDIF}\r\n {$IFDEF LCLWEBLIB}\r\n Result := (AChar in ['0'..'9']);\r\n {$ENDIF}\r\nend;\r\n\r\nfunction CharIsLetterOrNumber(AChar: Char): Boolean;\r\nbegin\r\n Result := CharIsLetter(AChar) or CharIsNumber(AChar);\r\nend;\r\n\r\nfunction CharInArray(AChar: Char; ACharArray: array of char): Boolean;\r\nvar\r\n ch: Char;\r\n I: Integer;\r\nbegin\r\n Result := False;\r\n for I := 0 to Length(ACharArray) - 1 do\r\n begin\r\n ch := ACharArray[I];\r\n if ch = AChar then\r\n begin\r\n Result := True;\r\n Exit;\r\n end;\r\n end;\r\nend;\r\n\r\nfunction IsBitmapEmpty(ABitmap: TTMSFNCBitmapHelperClass): Boolean;\r\nvar\r\n b: TTMSFNCDrawBitmap;\r\nbegin\r\n Result := True;\r\n if Assigned(ABitmap) then\r\n begin\r\n b := BitmapToDrawBitmap(ABitmap);\r\n if Assigned(b) then\r\n begin\r\n {$IFDEF CMNLIB}\r\n Result := b.Empty;\r\n {$ENDIF}\r\n {$IFDEF WEBLIB}\r\n Result := b.Empty;\r\n {$ENDIF}\r\n {$IFDEF FMXLIB}\r\n Result := b.IsEmpty\r\n {$ENDIF}\r\n end;\r\n end;\r\nend;\r\n\r\nfunction BitmapToDrawBitmap(ABitmap: TTMSFNCBitmapHelperClass): TTMSFNCDrawBitmap;\r\nbegin\r\n Result := nil;\r\n if Assigned(ABitmap) then\r\n begin\r\n {$IFDEF CMNLIB}\r\n Result := ABitmap.Graphic;\r\n {$ENDIF}\r\n {$IFDEF WEBLIB}\r\n Result := ABitmap;\r\n {$ENDIF}\r\n {$IFDEF FMXLIB}\r\n Result := ABitmap;\r\n {$ENDIF}\r\n end;\r\nend;\r\n\r\n{$IFNDEF WEBLIB}\r\n\r\n{ TTMSFNCBitmapHelper }\r\n\r\nclass function TTMSFNCBitmapHelper.CreateFromResource(AResourceName: String): TTMSFNCBitmap;\r\nbegin\r\n Result := CreateFromResource(AResourceName, TTMSFNCUtils.GetHInstance);\r\nend;\r\n\r\nclass function TTMSFNCBitmapHelper.CreateFromResource(AResourceName: String; AInstance: NativeUInt): TTMSFNCBitmap;\r\nbegin\r\n Result := TTMSFNCBitmap.Create;\r\n Result.LoadFromResource(AResourceName, AInstance);\r\nend;\r\n\r\nclass function TTMSFNCBitmapHelper.CreateFromBase64(ABase64: string): TTMSFNCBitmap;\r\nbegin\r\n Result := TTMSFNCBitmap.Create;\r\n Result.LoadFromBase64(ABase64);\r\nend;\r\n\r\nclass function TTMSFNCBitmapHelper.CreateFromSVG(ASVG: string): TTMSFNCBitmap;\r\nbegin\r\n Result := TTMSFNCBitmap.Create;\r\n Result.LoadFromSVG(ASVG);\r\nend;\r\n\r\nclass function TTMSFNCBitmapHelper.CreateFromURL(AURL: String): TTMSFNCBitmap;\r\nbegin\r\n Result := CreateFromURL(AURL, TTMSFNCUtils.GetHInstance);\r\nend;\r\n\r\nclass function TTMSFNCBitmapHelper.CreateFromURL(AURL: String; AInstance: NativeUInt): TTMSFNCBitmap;\r\nbegin\r\n Result := TTMSFNCBitmap.Create;\r\n Result.LoadFromURL(AURL, AInstance);\r\nend;\r\n\r\n{$IFDEF CMNLIB}\r\n{$IFDEF VCLLIB}\r\n{$HINTS OFF}\r\n{$IF COMPILERVERSION < 32}\r\nprocedure TTMSFNCBitmapHelper.SaveToStream(AStream: TStream);\r\nbegin\r\n if Graphic <> nil then Graphic.SaveToStream(AStream);\r\nend;\r\n\r\nprocedure TTMSFNCBitmapHelper.LoadFromStream(AStream: TStream);\r\nvar\r\n GraphicClass: TGraphicClass;\r\n ms: TMemoryStream;\r\n ng: TGraphic;\r\nbegin\r\n ms := TMemoryStream.Create;\r\n try\r\n AStream.Position := 0;\r\n ms.LoadFromStream(AStream);\r\n ms.Position := 0;\r\n if TTMSFNCUtils.FindGraphicClass(ms.Memory^, ms.Size, GraphicClass) then\r\n begin\r\n if GraphicClass <> nil then\r\n begin\r\n ng := GraphicClass.Create;\r\n try\r\n ng.LoadFromStream(ms);\r\n Graphic := ng;\r\n finally\r\n ng.Free;\r\n end;\r\n end;\r\n end;\r\n finally\r\n ms.Free;\r\n end;\r\nend;\r\n{$IFEND}\r\n{$HINTS ON}\r\n{$ENDIF}\r\n\r\nclass function TTMSFNCBitmapHelper.CreateFromFile(AFileName: string): TTMSFNCBitmap;\r\nbegin\r\n Result := TTMSFNCBitmap.Create;\r\n Result.LoadFromFile(AFileName);\r\nend;\r\n\r\nclass function TTMSFNCBitmapHelper.CreateFromStream(AStream: TStream): TTMSFNCBitmap;\r\nbegin\r\n Result := TTMSFNCBitmap.Create;\r\n Result.LoadFromStream(AStream);\r\nend;\r\n{$ENDIF}\r\n\r\nfunction TTMSFNCBitmapHelper.SaveToBase64: string;\r\nbegin\r\n Result := TTMSFNCUtils.SaveBitmapToBase64(Self);\r\nend;\r\n\r\nprocedure TTMSFNCBitmapHelper.LoadFromBase64(ABase64: string);\r\nbegin\r\n TTMSFNCUtils.LoadBitmapFromBase64(ABase64, Self);\r\nend;\r\n\r\nprocedure TTMSFNCBitmapHelper.LoadFromSVG(ASVG: string);\r\nvar\r\n ms: TStringStream;\r\nbegin\r\n ms := TStringStream.Create(ASVG);\r\n try\r\n if Assigned(ms) then\r\n begin\r\n ms.Position := 0;\r\n (Self as TTMSFNCBitmap).LoadFromStream(ms);\r\n end;\r\n finally\r\n if Assigned(ms) then\r\n ms.Free;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCBitmapHelper.LoadFromURL(AURL: String);\r\nbegin\r\n LoadFromURL(AURL, TTMSFNCUtils.GetHInstance);\r\nend;\r\n\r\nprocedure TTMSFNCBitmapHelper.LoadFromURL(AURL: String; AInstance: NativeUInt);\r\nvar\r\n ms: TMemoryStream;\r\nbegin\r\n if Pos('HTTP', Uppercase(AURL)) <> 1 then\r\n begin\r\n LoadFromFile(AURL);\r\n Exit;\r\n end;\r\n\r\n ms := TTMSFNCUtils.DownloadImage(AURL);\r\n try\r\n if Assigned(ms) then\r\n begin\r\n ms.Position := 0;\r\n (Self as TTMSFNCBitmap).LoadFromStream(ms);\r\n end;\r\n finally\r\n if Assigned(ms) then\r\n ms.Free;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCBitmapHelper.LoadFromResource(AResourceName: String);\r\nbegin\r\n LoadFromResource(AResourceName, TTMSFNCUtils.GetHInstance);\r\nend;\r\n\r\nprocedure TTMSFNCBitmapHelper.LoadFromResource(AResourceName: String; AInstance: NativeUInt);\r\nvar\r\n r: TResourceStream;\r\nbegin\r\n r := nil;\r\n try\r\n r := TTMSFNCUtils.GetResourceStream(AResourceName, AInstance);\r\n if Assigned(r) then\r\n begin\r\n if Self is TTMSFNCBitmap then\r\n (Self as TTMSFNCBitmap).LoadFromStream(r)\r\n else\r\n Self.LoadFromStream(r);\r\n end;\r\n finally\r\n if Assigned(r) then\r\n r.Free;\r\n end;\r\nend;\r\n{$ENDIF}\r\n\r\n{$IFDEF USETRECTF}\r\n\r\n{ TRectF }\r\n\r\n{$IFNDEF WEBLIB}\r\nfunction TRectF.GetSize: TSizeF;\r\nbegin\r\n Result.cx := Width;\r\n Result.cy := Height;\r\nend;\r\n\r\nprocedure TRectF.SetSize(const Value: TSizeF);\r\nbegin\r\n Width := Value.cx;\r\n Height := Value.cy;\r\nend;\r\n\r\nfunction TRectF.GetHeight: Single;\r\nbegin\r\n Result := Self.Bottom - Self.Top;\r\nend;\r\n\r\nprocedure TRectF.SetHeight(const Value: Single);\r\nbegin\r\n Self.Bottom := Self.Top + Value;\r\nend;\r\n\r\nfunction TRectF.GetWidth: Single;\r\nbegin\r\n Result := Self.Right - Self.Left;\r\nend;\r\n\r\nprocedure TRectF.SetWidth(const Value: Single);\r\nbegin\r\n Self.Right := Self.Left + Value;\r\nend;\r\n\r\nfunction TRectF.CenterPoint: TPointF;\r\nbegin\r\n Result.X := (Right - Left) / 2.0 + Left;\r\n Result.Y := (Bottom - Top) / 2.0 + Top;\r\nend;\r\n\r\nfunction TRectF.IntersectsWith(const R: TRectF): Boolean;\r\nbegin\r\n Result := not ( (Self.BottomRight.X < R.TopLeft.X) or\r\n (Self.BottomRight.Y < R.TopLeft.Y) or\r\n (R.BottomRight.X < Self.TopLeft.X) or\r\n (R.BottomRight.Y < Self.TopLeft.Y) );\r\nend;\r\n\r\nprocedure TRectF.Offset(const DX, DY: Single);\r\nbegin\r\n TopLeft.Offset(DX, DY);\r\n BottomRight.Offset(DX, DY);\r\nend;\r\n\r\nprocedure TRectF.Inflate(const DX, DY: Single);\r\nbegin\r\n TopLeft.Offset(-DX, -DY);\r\n BottomRight.Offset(DX, DY);\r\nend;\r\n\r\nfunction TRectF.Empty: TRectF;\r\nbegin\r\n Result.Left := 0;\r\n Result.Top := 0;\r\n Result.Right := 0;\r\n Result.Bottom := 0;\r\nend;\r\n\r\nfunction TRectF.IsEmpty: Boolean;\r\nbegin\r\n Result := (Right < Left) or SameValue(Right, Left)\r\n or (Bottom < Top) or SameValue(Bottom, Top);\r\nend;\r\n{$ENDIF}\r\n\r\n{$IFNDEF WEBLIB}\r\nprocedure TPointF.Offset(const ADeltaX, ADeltaY: Single);\r\nbegin\r\n Self.X := Self.X + ADeltaX;\r\n Self.Y := Self.Y + ADeltaY;\r\nend;\r\n\r\nfunction TPointF.Length: Single;\r\nbegin\r\n Result := Sqrt(Sqr(X) + Sqr(Y));\r\nend;\r\n{$ENDIF}\r\n\r\nfunction PtInRectEx(const Rect: TRectF; const P: TPointF): Boolean;\r\nbegin\r\n Result := (P.X >= Rect.Left) and (P.X < Rect.Right) and (P.Y >= Rect.Top)\r\n and (P.Y < Rect.Bottom);\r\nend;\r\n\r\nfunction PointF(X, Y: Single): TPointF;\r\nbegin\r\n Result.X := X;\r\n Result.Y := Y;\r\nend;\r\n\r\nfunction OffsetRectEx(var R: TRect; DX, DY: Integer): Boolean;\r\nbegin\r\n {$IFNDEF WEBLIB}\r\n if @R <> nil then\r\n {$ENDIF}\r\n begin\r\n R.Left := R.Left + DX;\r\n R.Right := R.Right + DX;\r\n R.Top := R.Top + DY;\r\n R.Bottom := R.Bottom + DY;\r\n Result := True;\r\n end\r\n {$IFNDEF WEBLIB}\r\n else\r\n Result := False;\r\n {$ENDIF}\r\nend;\r\n\r\nfunction OffsetRectEx(var R: TRectF; DX, DY: Single): Boolean;\r\nbegin\r\n {$IFNDEF WEBLIB}\r\n if @R <> nil then\r\n {$ENDIF}\r\n begin\r\n R.Left := R.Left + DX;\r\n R.Right := R.Right + DX;\r\n R.Top := R.Top + DY;\r\n R.Bottom := R.Bottom + DY;\r\n Result := True;\r\n end\r\n {$IFNDEF WEBLIB}\r\n else\r\n Result := False;\r\n {$ENDIF}\r\nend;\r\n\r\nfunction RectF(Left, Top, Right, Bottom: Single): TRectF;\r\nbegin\r\n Result.Left := Left;\r\n Result.Top := Top;\r\n Result.Bottom := Bottom;\r\n Result.Right := Right;\r\nend;\r\n\r\nprocedure InflateRectEx(var R: TRectF; DX, DY: Single);\r\nbegin\r\n R.Left := R.Left - DX;\r\n R.Right := R.Right + DX;\r\n R.Top := R.Top - DY;\r\n R.Bottom := R.Bottom + DY;\r\nend;\r\n\r\nfunction IntersectRectEx(const Rect1: TRectF; const Rect2: TRectF): Boolean;\r\nbegin\r\n Result := (Rect1.Left < Rect2.Right)\r\n and (Rect1.Right > Rect2.Left)\r\n and (Rect1.Top < Rect2.Bottom)\r\n and (Rect1.Bottom > Rect2.Top);\r\nend;\r\n\r\nfunction EqualRectEx(const R1, R2: TRect): Boolean;\r\nbegin\r\n Result := (R1.Left = R2.Left) and (R1.Right = R2.Right) and\r\n (R1.Top = R2.Top) and (R1.Bottom = R2.Bottom);\r\nend;\r\n\r\nfunction EqualRectEx(const R1, R2: TRectF): Boolean;\r\nbegin\r\n Result := (R1.Left = R2.Left) and (R1.Right = R2.Right) and\r\n (R1.Top = R2.Top) and (R1.Bottom = R2.Bottom);\r\nend;\r\n\r\n{$ELSE}\r\n\r\nfunction EqualRectEx(const R1, R2: TRect): Boolean;\r\nbegin\r\n Result := EqualRect(R1, R2);\r\nend;\r\n\r\nfunction EqualRectEx(const R1, R2: TRectF): Boolean;\r\nbegin\r\n Result := EqualRect(R1, R2);\r\nend;\r\n\r\nfunction IntersectRectEx(const Rect1: TRectF; const Rect2: TRectF): Boolean;\r\nbegin\r\n Result := IntersectRect(Rect1, Rect2);\r\nend;\r\n\r\nfunction OffsetRectEx(var R: TRect; DX, DY: Integer): Boolean;\r\nbegin\r\n Result := OffsetRect(R, DX, DY);\r\nend;\r\n\r\nfunction OffsetRectEx(var R: TRectF; DX, DY: Single): Boolean;\r\nbegin\r\n Result := OffsetRect(R, DX, DY);\r\nend;\r\n\r\nprocedure InflateRectEx(var R: TRectF; DX, DY: Single);\r\nbegin\r\n InflateRect(R, DX, DY);\r\nend;\r\n\r\nfunction PtInRectEx(const Rect: TRectF; const P: TPointF): Boolean;\r\nbegin\r\n Result := PtInRect(Rect, P);\r\nend;\r\n\r\n{$ENDIF}\r\n\r\n{$IFNDEF WEBLIB}\r\nfunction {$IFDEF USETRECTF}TRectF{$ELSE}{$IFNDEF LCLLIB}TRectFHelper{$ELSE}TRectF{$ENDIF}{$ENDIF}.FitInto(const ADesignatedArea: TRectF; out Ratio: Single): TRectF;\r\nbegin\r\n if (ADesignatedArea.Width <= 0) or (ADesignatedArea.Height <= 0) then\r\n begin\r\n Ratio := 1;\r\n Exit(Self);\r\n end;\r\n\r\n if (Self.Width / ADesignatedArea.Width) > (Self.Height / ADesignatedArea.Height) then\r\n Ratio := Self.Width / ADesignatedArea.Width\r\n else\r\n Ratio := Self.Height / ADesignatedArea.Height;\r\n\r\n Result := RectF(0, 0, Self.Width / Ratio, Self.Height / Ratio);\r\n RectCenterEx(Result, ADesignatedArea);\r\nend;\r\n\r\nfunction {$IFDEF USETRECTF}TRectF{$ELSE}{$IFNDEF LCLLIB}TRectFHelper{$ELSE}TRectF{$ENDIF}{$ENDIF}.FitInto(const ADesignatedArea: TRectF): TRectF;\r\nvar\r\n Ratio: Single;\r\nbegin\r\n Result := FitInto(ADesignatedArea, Ratio);\r\nend;\r\n\r\nfunction {$IFDEF USETRECTF}TRectF{$ELSE}{$IFNDEF LCLLIB}TRectFHelper{$ELSE}TRectF{$ENDIF}{$ENDIF}.CenterAt(const ADesignatedArea: TRectF): TRectF;\r\nbegin\r\n Result := Self;\r\n RectCenterEx(Result, ADesignatedArea);\r\nend;\r\n\r\nfunction {$IFDEF USETRECTF}TRectF{$ELSE}{$IFNDEF LCLLIB}TRectFHelper{$ELSE}TRectF{$ENDIF}{$ENDIF}.SnapToPixel(const AScale: Single; const APlaceBetweenPixels: Boolean): TRectF;\r\nvar\r\n LScale, HalfPixel: Single;\r\nbegin\r\n if AScale <= 0 then\r\n LScale := 1\r\n else\r\n LScale := AScale;\r\n Result.Left := System.Trunc(Self.Left * LScale) / LScale;\r\n Result.Top := System.Trunc(Self.Top * LScale) / LScale;\r\n Result.Width := System.Round(Self.Width * LScale) / LScale;\r\n Result.Height := System.Round(Self.Height * LScale) / LScale;\r\n if APlaceBetweenPixels then\r\n begin\r\n HalfPixel := 1 / (2 * LScale);\r\n Result.Offset(HalfPixel, HalfPixel);\r\n end;\r\nend;\r\n{$ENDIF}\r\n\r\nfunction RectWidthEx(const Rect: TRect): Integer;\r\nbegin\r\n Result := Rect.Right - Rect.Left;\r\nend;\r\n\r\nfunction RectHeightEx(const Rect: TRect): Integer;\r\nbegin\r\n Result := Rect.Bottom - Rect.Top;\r\nend;\r\n\r\nfunction RectWidthEx(const Rect: TRectF): Single;\r\nbegin\r\n Result := Rect.Right - Rect.Left;\r\nend;\r\n\r\nfunction RectHeightEx(const Rect: TRectF): Single;\r\nbegin\r\n Result := Rect.Bottom - Rect.Top;\r\nend;\r\n\r\nfunction RectCenterAtEx(const Rect: TRectF; const ADesignatedArea: TRectF): TRectF;\r\nbegin\r\n Result := Rect;\r\n RectCenterEx(Result, ADesignatedArea);\r\nend;\r\n\r\nfunction RectSnapToPixelEx(const Rect: TRectF; const AScale: Single; const APlaceBetweenPixels: Boolean): TRectF;\r\nvar\r\n LScale, HalfPixel: Single;\r\nbegin\r\n if AScale <= 0 then\r\n LScale := 1\r\n else\r\n LScale := AScale;\r\n Result.Left := Trunc(Rect.Left * LScale) / LScale;\r\n Result.Top := Trunc(Rect.Top * LScale) / LScale;\r\n Result.Right := Result.Left + Round((Rect.Right - Rect.Left) * LScale) / LScale;\r\n Result.Bottom := Result.Top + Round((Rect.Bottom - Rect.Top) * LScale) / LScale;\r\n if APlaceBetweenPixels then\r\n begin\r\n HalfPixel := 1 / (2 * LScale);\r\n OffsetRectEx(Result, HalfPixel, HalfPixel);\r\n end;\r\nend;\r\n\r\nfunction RectFitIntoEx(const Rect: TRectF; const ADesignatedArea: TRectF; out Ratio: Single): TRectF;\r\nbegin\r\n if (ADesignatedArea.Right - ADesignatedArea.Left <= 0) or (ADesignatedArea.Bottom - ADesignatedArea.Top <= 0) then\r\n begin\r\n Ratio := 1;\r\n Exit(Rect);\r\n end;\r\n\r\n if ((Rect.Right - Rect.Left) / (ADesignatedArea.Right - ADesignatedArea.Left)) > ((Rect.Bottom - Rect.Top) / (ADesignatedArea.Bottom - ADesignatedArea.Top)) then\r\n Ratio := (Rect.Right - Rect.Left) / (ADesignatedArea.Right - ADesignatedArea.Left)\r\n else\r\n Ratio := (Rect.Bottom - Rect.Top) / (ADesignatedArea.Bottom - ADesignatedArea.Top);\r\n\r\n Result := RectF(0, 0, (Rect.Right - Rect.Left) / Ratio, (Rect.Bottom - Rect.Top) / Ratio);\r\n RectCenterEx(Result, ADesignatedArea);\r\nend;\r\n\r\nfunction RectFitIntoEx(const Rect: TRectF; const ADesignatedArea: TRectF): TRectF;\r\nvar\r\n Ratio: Single;\r\nbegin\r\n Result := RectFitIntoEx(Rect, ADesignatedArea, Ratio);\r\nend;\r\n\r\nfunction RectCenterEx(var R: TRect; const B: TRect): TRect;\r\nbegin\r\n OffsetRectEx(R, -R.Left, -R.Top);\r\n OffsetRectEx(R, (RectWidthEx(B) - RectWidthEx(R)) div 2, (RectHeightEx(B) - RectHeightEx(R)) div 2);\r\n OffsetRectEx(R, B.Left, B.Top);\r\n Result := R;\r\nend;\r\n\r\nfunction RectCenterEx(var R: TRectF; const B: TRectF): TRectF;\r\nbegin\r\n OffsetRectEx(R, -R.Left, -R.Top);\r\n OffsetRectEx(R, Round((RectWidthEx(B) - RectWidthEx(R)) / 2), Round((RectHeightEx(B) - RectHeightEx(R)) / 2));\r\n OffsetRectEx(R, B.Left, B.Top);\r\n Result := R;\r\nend;\r\n\r\nfunction IntersectRectEx(out Rect: TRectF; const R1, R2: TRectF): Boolean;\r\nvar\r\n tmpRect: TRectF;\r\nbegin\r\n tmpRect := R1;\r\n if R2.Left > R1.Left then tmpRect.Left := R2.Left;\r\n if R2.Top > R1.Top then tmpRect.Top := R2.Top;\r\n if R2.Right < R1.Right then tmpRect.Right := R2.Right;\r\n if R2.Bottom < R1.Bottom then tmpRect.Bottom := R2.Bottom;\r\n {$IFDEF WEBLIB}\r\n Result := not RectIsEmpty(tmpRect);\r\n {$ENDIF}\r\n {$IFNDEF WEBLIB}\r\n Result := not tmpRect.IsEmpty;\r\n {$ENDIF}\r\n if not Result then\r\n begin\r\n tmpRect.Top := 0.0;\r\n tmpRect.Bottom := 0.0;\r\n tmpRect.Left := 0.0;\r\n tmpRect.Right := 0.0;\r\n end;\r\n Rect := tmpRect;\r\nend;\r\n\r\nfunction EmptyRect: TRectF;\r\nbegin\r\n Result := RectF(0, 0, 0, 0);\r\nend;\r\n\r\nfunction RectIsEmpty(const R: TRectF): Boolean;\r\nbegin\r\n Result := (R.Right < R.Left) or SameValue(R.Right, R.Left)\r\n or (R.Bottom < R.Top) or SameValue(R.Bottom, R.Top);\r\nend;\r\n\r\nfunction CompareValueEx(const A, B: Extended; Epsilon: Extended = 0): TTMSFNCValueRelationShip;\r\nbegin\r\n if SameValue(A, B, Epsilon) then\r\n Result := EqualsValue\r\n else if A < B then\r\n Result := LessThanValue\r\n else\r\n Result := GreaterThanValue;\r\nend;\r\n\r\nfunction RectIntersectsWithEx(const ARect: TRectF; const R: TRectF): Boolean;\r\nbegin\r\n Result := (ARect.Left < R.Right)\r\n and (ARect.Right > R.Left)\r\n and (ARect.Top < R.Bottom)\r\n and (ARect.Bottom > R.Top);\r\nend;\r\n\r\nfunction CenterPointEx(const R: TRectF): TPointF;\r\nbegin\r\n Result.X := (R.Right - R.Left) / 2.0 + R.Left;\r\n Result.Y := (R.Bottom - R.Top) / 2.0 + R.Top;\r\nend;\r\n\r\nfunction MakeRectF(Left, Top, Width, Height: Single): TRectF;\r\nbegin\r\n Result.Left := Left;\r\n Result.Top := Top;\r\n {$IFDEF WEBLIB}\r\n Result.Right := Left + Width;\r\n Result.Bottom := Top + Height;\r\n {$ENDIF}\r\n {$IFNDEF WEBLIB}\r\n Result.Width := Width;\r\n Result.Height := Height;\r\n {$ENDIF}\r\nend;\r\n\r\nfunction GetPointLength(const Point: TPointF): Single;\r\nbegin\r\n Result := Sqrt(Sqr(Point.X) + Sqr(Point.Y));\r\nend;\r\n\r\nfunction ConvertToRect(const Rect: TRect): TRect;\r\nbegin\r\n Result := Rect;\r\nend;\r\n\r\nfunction ConvertToRect(const Rect: TRectF): TRect;\r\nbegin\r\n Result.Left := Round(Rect.Left);\r\n Result.Top := Round(Rect.Top);\r\n Result.Right := Round(Rect.Right);\r\n Result.Bottom := Round(Rect.Bottom);\r\nend;\r\n\r\nfunction ConvertToRectF(const Rect: TRectF): TRectF;\r\nbegin\r\n Result := Rect;\r\nend;\r\n\r\nfunction ConvertToRectF(const Rect: TRect): TRectF;\r\nbegin\r\n Result.Left := Rect.Left;\r\n Result.Top := Rect.Top;\r\n Result.Right := Rect.Right;\r\n Result.Bottom := Rect.Bottom;\r\nend;\r\n\r\nfunction ConvertToPoint(const Point: TPoint): TPoint;\r\nbegin\r\n Result := Point;\r\nend;\r\n\r\nfunction ConvertToPoint(const Point: TPointF): TPoint;\r\nbegin\r\n Result.X := Round(Point.X);\r\n Result.Y := Round(Point.Y);\r\nend;\r\n\r\nfunction ConvertToPointF(const Point: TPointF): TPointF;\r\nbegin\r\n Result := Point;\r\nend;\r\n\r\nfunction ConvertToPointF(const Point: TPoint): TPointF;\r\nbegin\r\n Result.X := Point.X;\r\n Result.Y := Point.Y;\r\nend;\r\n\r\nfunction ConvertToSize(const Size: TSize): TSize;\r\nbegin\r\n Result := Size;\r\nend;\r\n\r\nfunction ConvertToSize(const Size: TSizeF): TSize;\r\nbegin\r\n Result.cx := Round(Size.cx);\r\n Result.cy := Round(Size.cy);\r\nend;\r\n\r\nfunction ConvertToSizeF(const Size: TSizeF): TSizeF;\r\nbegin\r\n Result := Size;\r\nend;\r\n\r\nfunction ConvertToSizeF(const Size: TSize): TSizeF;\r\nbegin\r\n Result.cx := Size.cx;\r\n Result.cy := Size.cy;\r\nend;\r\n\r\n{ TTMSFNCMargins }\r\n\r\nprocedure TTMSFNCMargins.Assign(Source: TPersistent);\r\nbegin\r\n if Source is TTMSFNCMargins then\r\n begin\r\n FLeft := (Source as TTMSFNCMargins).Left;\r\n FTop := (Source as TTMSFNCMargins).Top;\r\n FRight := (Source as TTMSFNCMargins).Right;\r\n FBottom := (Source as TTMSFNCMargins).Bottom;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCMargins.Changed;\r\nbegin\r\n if Assigned(OnChange) then\r\n OnChange(Self);\r\nend;\r\n\r\nconstructor TTMSFNCMargins.Create(const ARect: TRectF);\r\nbegin\r\n FLeft := ARect.Left;\r\n FBottom := ARect.Bottom;\r\n FRight := ARect.Right;\r\n FTop := ARect.Top;\r\nend;\r\n\r\nconstructor TTMSFNCMargins.Create;\r\nbegin\r\n FLeft := 0;\r\n FBottom := 0;\r\n FRight := 0;\r\n FTop := 0;\r\nend;\r\n\r\nfunction TTMSFNCMargins.Empty: Boolean;\r\nvar\r\n r: TRectF;\r\nbegin\r\n r := RectF(Left, Top, Right, Bottom);\r\n {$IFDEF WEBLIB}\r\n Result := RectIsEmpty(R);\r\n {$ENDIF}\r\n {$IFNDEF WEBLIB}\r\n Result := R.IsEmpty;\r\n {$ENDIF}\r\nend;\r\n\r\nprocedure TTMSFNCMargins.SetBottom(const Value: Single);\r\nbegin\r\n if FBottom <> Value then\r\n begin\r\n FBottom := Value;\r\n Changed;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCMargins.SetLeft(const Value: Single);\r\nbegin\r\n if FLeft <> Value then\r\n begin\r\n FLeft := Value;\r\n Changed;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCMargins.SetRight(const Value: Single);\r\nbegin\r\n if FRight <> Value then\r\n begin\r\n FRight := Value;\r\n Changed;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCMargins.SetTop(const Value: Single);\r\nbegin\r\n if FTop <> Value then\r\n begin\r\n FTop := Value;\r\n Changed;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCMargins.IsLeftStored: Boolean;\r\nbegin\r\n Result := Left <> 0;\r\nend;\r\n\r\nfunction TTMSFNCMargins.IsTopStored: Boolean;\r\nbegin\r\n Result := Top <> 0;\r\nend;\r\n\r\nfunction TTMSFNCMargins.PaddingRect(const R: TRectF): TRectF;\r\nbegin\r\n Result := RectF(R.Left + FLeft, R.Top + FTop, R.Right - FRight, R.Bottom - FBottom);\r\nend;\r\n\r\nfunction TTMSFNCMargins.Rect: TRectF;\r\nbegin\r\n Result := RectF(Left, Top, Right, Bottom);\r\nend;\r\n\r\nfunction TTMSFNCMargins.IsBottomStored: Boolean;\r\nbegin\r\n Result := Bottom <> 0;\r\nend;\r\n\r\nfunction TTMSFNCMargins.IsRightStored: Boolean;\r\nbegin\r\n Result := Right <> 0;\r\nend;\r\n\r\n{ TTMSFNCPoint }\r\n\r\nprocedure TTMSFNCPoint.Assign(Source: TPersistent);\r\nbegin\r\n if Source is TTMSFNCPoint then\r\n begin\r\n FX := (Source as TTMSFNCPoint).X;\r\n FY := (Source as TTMSFNCPoint).Y;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCPoint.Changed;\r\nbegin\r\n if Assigned(OnChange) then\r\n OnChange(Self);\r\nend;\r\n\r\nconstructor TTMSFNCPoint.Create(const APoint: TPointF);\r\nbegin\r\n FX := APoint.X;\r\n FY := APoint.Y;\r\nend;\r\n\r\nconstructor TTMSFNCPoint.Create;\r\nbegin\r\n FX := 0;\r\n FY := 0;\r\nend;\r\n\r\nprocedure TTMSFNCPoint.SetX(const Value: Single);\r\nbegin\r\n if FX <> Value then\r\n begin\r\n FX := Value;\r\n Changed;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCPoint.SetY(const Value: Single);\r\nbegin\r\n if FY <> Value then\r\n begin\r\n FY := Value;\r\n Changed;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCPoint.IsXStored: Boolean;\r\nbegin\r\n Result := X <> 0;\r\nend;\r\n\r\nfunction TTMSFNCPoint.IsYStored: Boolean;\r\nbegin\r\n Result := Y <> 0;\r\nend;\r\n\r\n{$IFNDEF LIMITEDGRAPHICSMODE}\r\n\r\n{ TTMSFNCScaledBitmap }\r\n\r\nprocedure TTMSFNCScaledBitmap.Assign(Source: TPersistent);\r\nbegin\r\n if Source is TTMSFNCScaledBitmap then\r\n begin\r\n FBitmap.Assign((Source as TTMSFNCScaledBitmap).Bitmap);\r\n FBitmapName := (Source as TTMSFNCScaledBitmap).BitmapName;\r\n FScale := (Source as TTMSFNCScaledBitmap).Scale;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCScaledBitmap.BitmapChanged(Sender: TObject);\r\nbegin\r\n Changed(False);\r\nend;\r\n\r\nconstructor TTMSFNCScaledBitmap.Create(ACollection: TCollection);\r\nbegin\r\n inherited;\r\n FBitmap := TTMSFNCBitmap.Create;\r\n FBitmap.OnChange := @BitmapChanged;\r\n FScale := 1.0;\r\nend;\r\n\r\ndestructor TTMSFNCScaledBitmap.Destroy;\r\nbegin\r\n FBitmap.Free;\r\n inherited;\r\nend;\r\n\r\nfunction TTMSFNCScaledBitmap.IsScaleStored: Boolean;\r\nbegin\r\n Result := Scale <> 1.0;\r\nend;\r\n\r\nprocedure TTMSFNCScaledBitmap.SetBitmap(const Value: TTMSFNCBitmap);\r\nbegin\r\n if FBitmap <> Value then\r\n begin\r\n FBitmap.Assign(Value);\r\n Changed(False);\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCScaledBitmap.SetBitmapName(const Value: string);\r\nbegin\r\n if FBitmapName <> Value then\r\n begin\r\n FBitmapName := Value;\r\n Changed(False);\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCScaledBitmap.SetScale(const Value: Single);\r\nbegin\r\n if FScale <> Value then\r\n begin\r\n FScale := Value;\r\n Changed(False);\r\n end;\r\nend;\r\n\r\n{ TTMSFNCScaledBitmaps }\r\n\r\nfunction TTMSFNCScaledBitmaps.Add(Scale: Single = 1.0): TTMSFNCScaledBitmap;\r\nbegin\r\n Result := TTMSFNCScaledBitmap(inherited Add);\r\n Result.Scale := Scale;\r\nend;\r\n\r\nfunction TTMSFNCScaledBitmaps.AddBitmap(Bitmap: TTMSFNCBitmap; Scale: Single = 1.0): TTMSFNCScaledBitmap;\r\nbegin\r\n Result := Add(Scale);\r\n Result.Bitmap.Assign(Bitmap);\r\nend;\r\n\r\n{$IFNDEF WEBLIB}\r\nfunction TTMSFNCScaledBitmaps.AddBitmapFromFile(FileName: string;\r\n Scale: Single): TTMSFNCScaledBitmap;\r\nbegin\r\n Result := Add(Scale);\r\n Result.Bitmap.LoadFromFile(FileName);\r\nend;\r\n{$ENDIF}\r\n\r\nfunction TTMSFNCScaledBitmaps.AddBitmapFromResource(ResourceName: String; Scale: Single = 1.0): TTMSFNCScaledBitmap;\r\nbegin\r\n {$IFDEF WEBLIB}\r\n Result := AddBitmapFromResource(ResourceName, 0, Scale);\r\n {$ENDIF}\r\n {$IFNDEF WEBLIB}\r\n Result := AddBitmapFromResource(ResourceName, HInstance, Scale);\r\n {$ENDIF}\r\nend;\r\n\r\nfunction TTMSFNCScaledBitmaps.AddBitmapFromResource(ResourceName: String; AInstance: NativeUInt; Scale: Single = 1.0): TTMSFNCScaledBitmap;\r\nbegin\r\n Result := Add(Scale);\r\n Result.Bitmap.LoadFromResource(ResourceName, AInstance);\r\nend;\r\n\r\nfunction TTMSFNCScaledBitmaps.AddBitmapName(BitmapName: string; Scale: Single = 1.0): TTMSFNCScaledBitmap;\r\nbegin\r\n Result := Add(Scale);\r\n Result.BitmapName := BitmapName;\r\nend;\r\n\r\nfunction TTMSFNCScaledBitmaps.AddDrawBitmap(Bitmap: TTMSFNCDrawBitmap;\r\n Scale: Single): TTMSFNCScaledBitmap;\r\nbegin\r\n Result := Add(Scale);\r\n Result.Bitmap.Assign(Bitmap);\r\nend;\r\n\r\nconstructor TTMSFNCScaledBitmaps.Create(AOwner: TPersistent);\r\nbegin\r\n inherited Create(AOwner, TTMSFNCScaledBitmap);\r\nend;\r\n\r\nfunction TTMSFNCScaledBitmaps.GetBitmap(Scale: Single): TTMSFNCBitmap;\r\nbegin\r\n Result := GetBitmapByScale(Scale);\r\nend;\r\n\r\nfunction TTMSFNCScaledBitmaps.GetBitmapByScale(\r\n Scale: Single): TTMSFNCBitmap;\r\nvar\r\n it: TTMSFNCScaledBitmap;\r\nbegin\r\n Result := nil;\r\n it := GetItemByScale(Scale);\r\n if Assigned(it) then\r\n Result := it.Bitmap;\r\nend;\r\n\r\nfunction TTMSFNCScaledBitmaps.GetItemByScale(Scale: Single): TTMSFNCScaledBitmap;\r\nvar\r\n I: Integer;\r\n cl: TTMSFNCScaledBitmap;\r\n it: TTMSFNCScaledBitmap;\r\n mx: Single;\r\nbegin\r\n Result := nil;\r\n cl := nil;\r\n mx := 0;\r\n for I := 0 to Count - 1 do\r\n begin\r\n it := Items[I];\r\n if it.Scale = Scale then\r\n begin\r\n Result := it;\r\n Break;\r\n end\r\n else if (it.Scale <> Scale) and (it.Scale > mx) then\r\n begin\r\n cl := it;\r\n mx := it.Scale;\r\n end;\r\n end;\r\n\r\n if Result = nil then\r\n Result := cl;\r\nend;\r\n\r\nfunction TTMSFNCScaledBitmaps.GetItems(Index: Integer): TTMSFNCScaledBitmap;\r\nbegin\r\n Result := TTMSFNCScaledBitmap(inherited Items[Index]);\r\nend;\r\n\r\nfunction TTMSFNCScaledBitmaps.Insert(Index: Integer;\r\n Scale: Single): TTMSFNCScaledBitmap;\r\nbegin\r\n Result := TTMSFNCScaledBitmap(inherited Insert(Index));\r\n Result.Scale := Scale;\r\nend;\r\n\r\nfunction TTMSFNCScaledBitmaps.Insert(Index: integer): TTMSFNCScaledBitmap;\r\nbegin\r\n Result := TTMSFNCScaledBitmap(inherited Insert(Index));\r\nend;\r\n\r\nprocedure TTMSFNCScaledBitmaps.SetBitmap(Scale: Single;\r\n const Value: TTMSFNCBitmap);\r\nvar\r\n b: TTMSFNCScaledBitmap;\r\nbegin\r\n b := GetItemByScale(Scale);\r\n if not Assigned(b) then\r\n b := Add(Scale);\r\n\r\n b.Bitmap.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCScaledBitmaps.SetItems(Index: Integer; const Value: TTMSFNCScaledBitmap);\r\nbegin\r\n inherited Items[Index] := Value;\r\nend;\r\n\r\nprocedure TTMSFNCScaledBitmaps.Update(Item: TCollectionItem);\r\nbegin\r\n inherited;\r\n if Assigned(FOnChange) then\r\n FOnChange(Self);\r\nend;\r\n\r\n{$ENDIF}\r\n\r\n{$IFDEF WEBLIB}\r\nfunction TTMSFNCMemoryStream.GetBytes: TBytes;\r\nvar\r\n p: Int64;\r\n b: TBytes;\r\nbegin\r\n p := Position;\r\n Position := 0;\r\n SetLength(b, Size);\r\n Read(b, 0, Length(b));\r\n Result := b;\r\n Position := p;\r\nend;\r\n\r\n{$HINTS OFF}\r\nprocedure TTMSFNCMemoryStream.OpenFile(FileType: string);\r\nvar\r\n b: TBytes;\r\n s: string;\r\n f: string;\r\nbegin\r\n {$IFDEF FNCLIB}\r\n f := 'tmp.' + TTMSFNCUtils.GetFileExtension(FileType);\r\n {$ENDIF}\r\n\r\n {$IFDEF ELECTRON}\r\n if isElectron then\r\n begin\r\n s := ElectronPath.GetTemp + PathDelim + f;\r\n SaveToFile(s);\r\n ElectronShell.OpenItem(s);\r\n end\r\n else\r\n {$ENDIF}\r\n begin\r\n b := Bytes;\r\n s := FileType;\r\n asm\r\n var file = new Blob([new Uint8Array(b)], {type: s});\r\n var fileURL = window.URL.createObjectURL(file);\r\n if (window.navigator && window.navigator.msSaveOrOpenBlob) {\r\n window.navigator.msSaveOrOpenBlob(file, f);\r\n return;\r\n }\r\n window.open(fileURL);\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCMemoryStream.SaveToFile(FileName: string);\r\nvar\r\n s: string;\r\n b: TBytes;\r\n {$IFDEF ELECTRON}\r\n nfs: TNodeFS;\r\n {$ENDIF}\r\nbegin\r\n s := FileName;\r\n b := Bytes;\r\n {$IFDEF ELECTRON}\r\n nfs := FS;\r\n {$ENDIF}\r\n asm\r\n var userAgent = navigator.userAgent.toLowerCase();\r\n if (userAgent.indexOf('electron/') > -1) {\r\n var arr = new Uint8Array(b);\r\n nfs.writeFileSync(s, arr);\r\n } else {\r\n var newBlob = new Blob([new Uint8Array(b)], {type: \"octet/stream\"})\r\n\r\n if (window.navigator && window.navigator.msSaveOrOpenBlob) {\r\n window.navigator.msSaveOrOpenBlob(newBlob, s);\r\n return;\r\n }\r\n\r\n const data = window.URL.createObjectURL(newBlob);\r\n var link = document.createElement('a');\r\n link.href = data;\r\n link.download = s;\r\n document.body.appendChild(link);\r\n link.click();\r\n setTimeout(function(){\r\n document.body.removeChild(link);\r\n window.URL.revokeObjectURL(data);\r\n }, 100);\r\n }\r\n end;\r\nend;\r\n{$HINTS ON}\r\n{$ENDIF}\r\n\r\n{$IFDEF USEOWNEDCOLLECTION}\r\n\r\n{ TTMSFNCOwnedCollection.TEnumerator }\r\n\r\nconstructor TTMSFNCOwnedCollection{$IFNDEF LCLLIB}{$ENDIF}.TEnumerator.Create(ACol: TTMSFNCCollection);\r\nbegin\r\n inherited Create;\r\n FIndex := -1;\r\n FCol := ACol;\r\nend;\r\n\r\nfunction TTMSFNCOwnedCollection{$IFNDEF LCLLIB}{$ENDIF}.TEnumerator.GetCurrent: T;\r\nbegin\r\n Result := FCol.GetItem(FIndex);\r\nend;\r\n\r\nfunction TTMSFNCOwnedCollection{$IFNDEF LCLLIB}{$ENDIF}.TEnumerator.MoveNext: Boolean;\r\nbegin\r\n Result := FIndex < FCol.Count - 1;\r\n if Result then\r\n Inc(FIndex);\r\nend;\r\n\r\n{ TTMSFNCOwnedCollection }\r\n\r\nfunction TTMSFNCOwnedCollection{$IFNDEF LCLLIB}{$ENDIF}.GetEnumerator: TEnumerator;\r\nbegin\r\n Result := TEnumerator.Create(Self);\r\nend;\r\n\r\nfunction TTMSFNCOwnedCollection{$IFNDEF LCLLIB}{$ENDIF}.GetItem(AIndex: Integer): T;\r\nbegin\r\n Result := Items[AIndex] as T;\r\nend;\r\n{$ENDIF}\r\n\r\n{$IFDEF WEBLIB}\r\nconstructor TTMSFNCBitmap.CreateFromStream(const AStream: TStream);\r\nbegin\r\n Create;\r\n LoadFromStream(AStream);\r\nend;\r\n{$ENDIF}\r\n\r\n{$IFDEF FMXLIB}\r\nconstructor TTMSFNCBitmap.CreateFromStream(const AStream: TStream);\r\nbegin\r\n Create;\r\n LoadFromStream(AStream);\r\nend;\r\n\r\nconstructor TTMSFNCBitmap.CreateFromFile(const AFileName: string);\r\nbegin\r\n Create;\r\n LoadFromFile(AFileName);\r\nend;\r\n\r\ndestructor TTMSFNCBitmap.Destroy;\r\nbegin\r\n FreeAndNil(FSVG);\r\n inherited;\r\nend;\r\n\r\nprocedure TTMSFNCBitmap.Assign(Source: TPersistent);\r\nvar\r\n ms: TMemoryStream;\r\nbegin\r\n inherited Assign(Source);\r\n if (Source is TTMSFNCBitmap) and Assigned((Source as TTMSFNCBitmap).SVG) then\r\n begin\r\n ms := TMemoryStream.Create;\r\n try\r\n {$IFDEF SVGSUPPORT}\r\n TTMSFNCGraphicsSVGImport((Source as TTMSFNCBitmap).SVG).SaveToStream(ms);\r\n {$ENDIF}\r\n ms.Position := 0;\r\n LoadFromStream(ms);\r\n finally\r\n ms.Free;\r\n end;\r\n end\r\n else if (Source = nil) or ((Source is TTMSFNCBitmap) and (Source as TTMSFNCBitmap).IsEmpty) then\r\n FreeAndNil(FSVG);\r\nend;\r\n\r\nprocedure TTMSFNCBitmap.DefineProperties(Filer: TFiler);\r\n function DoWrite: Boolean;\r\n begin\r\n Result := False;\r\n {$IFDEF SVGSUPPORT}\r\n if Assigned(FSVG) then\r\n Result := TTMSFNCGraphicsSVGImport(FSVG).HasElements;\r\n {$ENDIF}\r\n end;\r\n\r\nbegin\r\n inherited;\r\n Filer.DefineBinaryProperty('SVG', ReadSVG, WriteSVG, DoWrite);\r\nend;\r\n\r\nprocedure TTMSFNCBitmap.ReadSVG(Stream: TStream);\r\nbegin\r\n LoadFromStream(Stream);\r\nend;\r\n\r\nprocedure TTMSFNCBitmap.WriteSVG(Stream: TStream);\r\nbegin\r\n SaveToStream(Stream);\r\nend;\r\n\r\nprocedure TTMSFNCBitmap.SaveToFile(const AFileName: string);\r\nvar\r\n Stream: TFileStream;\r\nbegin\r\n Stream := TFileStream.Create(AFileName, fmCreate);\r\n try\r\n SaveToStream(Stream);\r\n finally\r\n Stream.Free;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCBitmap.LoadFromFile(const AFileName: string);\r\nvar\r\n Stream: TFileStream;\r\nbegin\r\n Stream := TFileStream.Create(AFileName, fmOpenRead);\r\n try\r\n LoadFromStream(Stream);\r\n finally\r\n Stream.Free;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCBitmap.Draw(ACanvas: TCanvas; const Rect: TRectF);\r\nbegin\r\n if not HasSVG then\r\n begin\r\n ACanvas.DrawBitmap(Self, RectF(0, 0, Width, Height), Rect, 1);\r\n Exit;\r\n end;\r\n\r\n {$IFDEF SVGSUPPORT}\r\n if Assigned(SVG) then\r\n TTMSFNCGraphicsSVGImport(SVG).Draw(ACanvas, Rect{$IFDEF CMNLIB}, True{$ENDIF});\r\n {$ENDIF}\r\nend;\r\n\r\nfunction TTMSFNCBitmap.HasSVG: Boolean;\r\nbegin\r\n Result := Assigned(SVG) {$IFDEF SVGSUPPORT} and TTMSFNCGraphicsSVGImport(SVG).HasElements{$ENDIF};\r\nend;\r\n\r\nprocedure TTMSFNCBitmap.SaveToStream(Stream: TStream);\r\nbegin\r\n {$IFDEF SVGSUPPORT}\r\n if Assigned(FSVG) then\r\n TTMSFNCGraphicsSVGImport(FSVG).SaveToStream(Stream)\r\n else\r\n {$ENDIF}\r\n inherited SaveToStream(Stream);\r\nend;\r\n\r\nfunction TTMSFNCBitmap.SaveToBase64: string;\r\nbegin\r\n Result := TTMSFNCUtils.SaveBitmapToBase64(Self);\r\nend;\r\n\r\nprocedure TTMSFNCBitmap.LoadFromBase64(const ABase64: string);\r\nbegin\r\n TTMSFNCUtils.LoadBitmapFromBase64(ABase64, Self);\r\nend;\r\n\r\nprocedure TTMSFNCBitmap.LoadFromSVG(const ASVG: string);\r\nbegin\r\n {$IFDEF SVGSUPPORT}\r\n if not Assigned(FSVG) then\r\n FSVG := TTMSFNCGraphicsSVGImport.Create;\r\n\r\n TTMSFNCGraphicsSVGImport(FSVG).LoadFromText(ASVG);\r\n inherited Assign(TTMSFNCGraphicsSVGImport(FSVG).GenerateBitmap);\r\n {$ENDIF}\r\nend;\r\n\r\nprocedure TTMSFNCBitmap.LoadFromStream(Stream: TStream);\r\nvar\r\n s: string;\r\nbegin\r\n s := TTMSFNCUtils.GetImageType(Stream, False);\r\n if s <> '' then\r\n begin\r\n FreeAndNil(FSVG);\r\n inherited LoadFromStream(Stream);\r\n end\r\n else\r\n begin\r\n {$IFDEF SVGSUPPORT}\r\n if not Assigned(FSVG) then\r\n FSVG := TTMSFNCGraphicsSVGImport.Create;\r\n\r\n TTMSFNCGraphicsSVGImport(FSVG).LoadFromStream(Stream);\r\n inherited Assign(TTMSFNCGraphicsSVGImport(FSVG).GenerateBitmap);\r\n {$ENDIF}\r\n end;\r\nend;\r\n{$ENDIF}\r\n\r\n{$IFDEF SUPPORTSHELPERS}\r\n{$IFDEF JSONSUPPORT}\r\n\r\n{ TTMSFNCJSONValueHelper }\r\n\r\nfunction TTMSFNCJSONValueHelper.GetProperties(AName: string): TJSONValue;\r\nbegin\r\n Result := TTMSFNCUtils.GetJSONValue(Self, AName);\r\nend;\r\n\r\nfunction TTMSFNCJSONValueHelper.GetAsString: string;\r\nbegin\r\n Result := '';\r\n if Assigned(Self) then\r\n Result := Self.Value;\r\nend;\r\n\r\nfunction TTMSFNCJSONValueHelper.Find(const APath: string): TJSONValue;\r\nbegin\r\n Result := TTMSFNCUtils.FindJSONValue(Self, APath);\r\nend;\r\n\r\nfunction TTMSFNCJSONValueHelper.GetAsBoolean: Boolean;\r\nbegin\r\n Result := TTMSFNCUtils.GetJSONValueAsBoolean(Self);\r\nend;\r\n\r\nfunction TTMSFNCJSONValueHelper.GetAsInteger: Integer;\r\nbegin\r\n Result := TTMSFNCUtils.GetJSONValueAsInteger(Self);\r\nend;\r\n\r\nfunction TTMSFNCJSONValueHelper.GetAsDouble: Double;\r\nbegin\r\n Result := TTMSFNCUtils.GetJSONValueAsDouble(Self);\r\nend;\r\n\r\nfunction TTMSFNCJSONValueHelper.GetAsArray: TJSONArray;\r\nbegin\r\n Result := nil;\r\n if Self is TJSONArray then\r\n Result := (Self as TJSONArray);\r\nend;\r\n\r\n{ TTMSFNCJSONArrayHelper }\r\n\r\nfunction TTMSFNCJSONArrayHelper.GetLength: Integer;\r\nbegin\r\n Result := TTMSFNCUtils.GetJSONArraySize(Self);\r\nend;\r\n\r\nfunction TTMSFNCJSONArrayHelper.GetValues(AIndex: Integer): TJSONValue;\r\nbegin\r\n Result := TTMSFNCUtils.GetJSONArrayItem(Self, AIndex);\r\nend;\r\n{$ENDIF}\r\n\r\n{ TTMSFNCObjectHelper }\r\n\r\nprocedure TTMSFNCObjectHelper.FromJSON(const Value: string);\r\nvar\r\n s: TStringStream;\r\n cs: string;\r\n obj: TObject;\r\nbegin\r\n s := TStringStream.Create(Value{$IFDEF WEBLIB}, TEncoding.Ansi{$ENDIF});\r\n try\r\n obj := TTMSFNCPersistence.IOReference;\r\n cs := TTMSFNCPersistence.ClassTypeVariable;\r\n TTMSFNCPersistence.ClassTypeVariable := '';\r\n TTMSFNCPersistence.IOReference := Self;\r\n TTMSFNCPersistence.LoadSettingsFromStream(Self, s);\r\n TTMSFNCPersistence.ClassTypeVariable := cs;\r\n TTMSFNCPersistence.IOReference := obj;\r\n finally\r\n s.Free;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCObjectHelper.Log;\r\nbegin\r\n TTMSFNCUtils.Log(JSON);\r\nend;\r\n\r\nprocedure TTMSFNCObjectHelper.LoadFromJSONStream(const AStream: TStream);\r\nbegin\r\n TTMSFNCPersistence.LoadSettingsFromStream(Self, AStream);\r\nend;\r\n\r\nprocedure TTMSFNCObjectHelper.SaveToJSONStream(const AStream: TStream);\r\nbegin\r\n TTMSFNCPersistence.SaveSettingsToStream(Self, AStream);\r\nend;\r\n\r\n{$IFDEF JSONSUPPORT}\r\nfunction TTMSFNCObjectHelper.ToJSONValue: TJSONValue;\r\nbegin\r\n Result := TTMSFNCUtils.ParseJSON(JSON);\r\nend;\r\n{$ENDIF}\r\n\r\nfunction TTMSFNCObjectHelper.ToJSON(\r\n AExcludedProperties: TTMSFNCObjectExcludePropertyListArray): string;\r\nvar\r\n s: TStringStream;\r\n p: TTMSFNCPersistence;\r\n arr: TTMSFNCExcludePropertyListArray;\r\n I: Integer;\r\n ep: TTMSFNCExcludePropertyListArray;\r\nbegin\r\n SetLength(arr, Length(AExcludedProperties));\r\n for I := 0 to Length(AExcludedProperties) - 1 do\r\n arr[I] := AExcludedProperties[I];\r\n\r\n s := TStringStream.Create(''{$IFDEF WEBLIB}, TEncoding.Ansi{$ENDIF});\r\n\r\n p := TTMSFNCPersistence.Create;\r\n try\r\n ep := p.ExcludeProperties;\r\n p.ExcludeProperties := arr;\r\n p.SaveSettingsToStream(Self, s);\r\n p.ExcludeProperties := ep;\r\n Result := s.DataString;\r\n finally\r\n p.Free;\r\n s.Free;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCObjectHelper.LoadFromJSONFile(const AFileName: string);\r\nbegin\r\n TTMSFNCPersistence.LoadSettingsFromFile(Self, AFileName);\r\nend;\r\n\r\nprocedure TTMSFNCObjectHelper.SaveToJSONFile(const AFileName: string);\r\nbegin\r\n TTMSFNCPersistence.SaveSettingsToFile(Self, AFileName);\r\nend;\r\n\r\nfunction TTMSFNCObjectHelper.ToJSON: string;\r\nvar\r\n s: TStringStream;\r\nbegin\r\n s := TStringStream.Create(''{$IFDEF WEBLIB}, TEncoding.Ansi{$ENDIF});\r\n try\r\n TTMSFNCPersistence.SaveSettingsToStream(Self, s);\r\n Result := s.DataString;\r\n finally\r\n s.Free;\r\n end;\r\nend;\r\n{$ENDIF}\r\n\r\n{ TTMSFNCSVGImport }\r\n\r\nconstructor TTMSFNCSVGImport.Create;\r\nbegin\r\n FRotationAngle := 0;\r\n FCustomOpacity := -1;\r\n {$IFDEF FMXLIB}\r\n FCustomFillColor := $00000000;\r\n FCustomStrokeColor := $00000000;\r\n FTintColor := $00000000;\r\n {$ENDIF}\r\n {$IFNDEF FMXLIB}\r\n FCustomFillColor := -1;\r\n FCustomStrokeColor := -1;\r\n FTintColor := -1;\r\n {$ENDIF}\r\nend;\r\n\r\n{$IFDEF CMNLIB}\r\n\r\n{ TTMSFNCBitmap }\r\n\r\n{$IFDEF SVGSUPPORT}\r\nfunction TTMSFNCBitmap.GetSVG: TTMSFNCSVGImport;\r\nbegin\r\n Result := nil;\r\n if HasSVG then\r\n Result := (Graphic as TTMSFNCSVGBitmap).SVG;\r\nend;\r\n\r\nfunction TTMSFNCBitmap.HasSVG: Boolean;\r\nbegin\r\n Result := Assigned(Graphic) and (Graphic is TTMSFNCSVGBitmap) and (Graphic as TTMSFNCSVGBitmap).HasSVG;\r\nend;\r\n{$ENDIF}\r\n\r\n{ TTMSFNCSVGBitmap }\r\n\r\n{$IFDEF LCLLIB}\r\nclass function TTMSFNCSVGBitmap.IsStreamFormatSupported(Stream: TStream): Boolean;\r\nbegin\r\n Result := TTMSFNCUtils.GetImageType(Stream, False) = '';\r\nend;\r\n{$ENDIF} \r\n\r\n{$IFDEF VCLLIB}\r\n{$HINTS OFF}\r\n{$IF COMPILERVERSION >= 32}\r\nclass function TTMSFNCSVGBitmap.CanLoadFromStream(Stream: TStream): Boolean;\r\nbegin\r\n Result := TTMSFNCUtils.GetImageType(Stream, False) = '';\r\nend;\r\n{$IFEND}\r\n{$HINTS ON}\r\n{$ENDIF}\r\n\r\nconstructor TTMSFNCSVGBitmap.Create;\r\nbegin\r\n inherited;\r\n {$IFDEF SVGSUPPORT}\r\n FSVG := TTMSFNCGraphicsSVGImport.Create;\r\n {$ENDIF}\r\n FStream := TMemoryStream.Create;\r\nend;\r\n\r\ndestructor TTMSFNCSVGBitmap.Destroy;\r\nbegin\r\n FreeAndNil(FSVG);\r\n FreeAndNil(FStream);\r\n inherited;\r\nend;\r\n\r\nprocedure TTMSFNCSVGBitmap.Clear;\r\nbegin\r\n if Assigned(FSVG) then\r\n FSVG.Clear;\r\n\r\n FFileName := '';\r\n Changed(Self);\r\nend;\r\n\r\nprocedure TTMSFNCSVGBitmap.Assign(Source: TPersistent);\r\nbegin\r\n if (Source is TTMSFNCSVGBitmap) then\r\n begin\r\n try\r\n FSVG.Clear;\r\n FStream.Clear;\r\n FStream.LoadFromStream(TTMSFNCSVGBitmap(Source).FStream);\r\n {$IFDEF SVGSUPPORT}\r\n TTMSFNCGraphicsSVGImport(FSVG).LoadFromStream(FStream);\r\n {$ENDIF}\r\n except\r\n end;\r\n Changed(Self);\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCSVGBitmap.HasSVG: Boolean;\r\nbegin\r\n Result := Assigned(SVG){$IFDEF SVGSUPPORT} and TTMSFNCGraphicsSVGImport(SVG).HasElements{$ENDIF};\r\nend;\r\n\r\nprocedure TTMSFNCSVGBitmap.AssignTo(Dest: TPersistent);\r\nbegin\r\n if Dest is TTMSFNCSVGBitmap then\r\n TTMSFNCSVGBitmap(Dest).Assign(Self);\r\nend;\r\n\r\nprocedure TTMSFNCSVGBitmap.SetFileName(const Value: TFileName);\r\nbegin\r\n if Value = FFileName then\r\n Exit;\r\n\r\n LoadFromFile(Value);\r\nend;\r\n\r\nprocedure TTMSFNCSVGBitmap.ReadData(Stream: TStream);\r\nvar\r\n Size: LongInt;\r\nbegin\r\n Stream.Read(Size, SizeOf(Size));\r\n FStream.Clear;\r\n if Stream.Size > 0 then\r\n begin\r\n FStream.CopyFrom(Stream, Size);\r\n {$IFDEF SVGSUPPORT}\r\n TTMSFNCGraphicsSVGImport(SVG).LoadFromStream(FStream);\r\n {$ENDIF}\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCSVGBitmap.WriteData(Stream: TStream);\r\nvar\r\n Size: LongInt;\r\nbegin\r\n Size := FStream.Size;\r\n Stream.Write(Size, SizeOf(Size));\r\n FStream.Position := 0;\r\n FStream.SaveToStream(Stream);\r\nend;\r\n\r\nprocedure TTMSFNCSVGBitmap.Draw(ACanvas: TCanvas; const Rect: TRect);\r\n {$IFDEF SVGSUPPORT}\r\nvar\r\n r: TRectF;\r\n si: TTMSFNCGraphicsSVGImport;\r\n {$ENDIF}\r\nbegin\r\n if not Assigned(FSVG) then\r\n Exit;\r\n\r\n if Empty then\r\n Exit;\r\n\r\n {$IFDEF SVGSUPPORT}\r\n si := TTMSFNCGraphicsSVGImport(FSVG);\r\n r := ConvertToRectF(Rect);\r\n si.Draw(ACanvas, r{$IFDEF CMNLIB}, True{$ENDIF});\r\n {$ENDIF}\r\nend;\r\n\r\nfunction TTMSFNCSVGBitmap.GetEmpty: Boolean;\r\nbegin\r\n Result := True;\r\n {$IFDEF SVGSUPPORT}\r\n if Assigned(FSVG) then\r\n Result := not TTMSFNCGraphicsSVGImport(FSVG).HasElements;\r\n {$ENDIF}\r\nend;\r\n\r\n{$IFDEF LCLLIB}\r\nprocedure TTMSFNCSVGBitmap.SetTransparent(Value: Boolean);\r\nbegin\r\nend;\r\n\r\nfunction TTMSFNCSVGBitmap.GetTransparent: Boolean;\r\nbegin\r\n Result := False;\r\nend;\r\n\r\nprocedure TTMSFNCSVGBitmap.SetWidth(Value: Integer);\r\nbegin\r\nend;\r\n\r\nprocedure TTMSFNCSVGBitmap.SetHeight(Value: Integer);\r\nbegin\r\nend;\r\n{$ENDIF}\r\n\r\nfunction TTMSFNCSVGBitmap.GetWidth: Integer;\r\nbegin\r\n Result := 0;\r\n {$IFDEF SVGSUPPORT}\r\n if Assigned(FSVG) then\r\n Result := Round((TTMSFNCGraphicsSVGImport(FSVG).ViewRect.Right - TTMSFNCGraphicsSVGImport(FSVG).ViewRect.Left) * TTMSFNCUtils.GetDPIScale);\r\n {$ENDIF}\r\nend;\r\n\r\nfunction TTMSFNCSVGBitmap.GetHeight: Integer;\r\nbegin\r\n Result := 0;\r\n {$IFDEF SVGSUPPORT}\r\n if Assigned(FSVG) then\r\n Result := Round((TTMSFNCGraphicsSVGImport(FSVG).ViewRect.Bottom - TTMSFNCGraphicsSVGImport(FSVG).ViewRect.Top) * TTMSFNCUtils.GetDPIScale);\r\n {$ENDIF}\r\nend;\r\n\r\nprocedure TTMSFNCSVGBitmap.SaveToFile(const FileName: String);\r\nvar\r\n Stream: TStream;\r\nbegin\r\n if not Assigned(FSVG) then\r\n Exit;\r\n\r\n Stream := TFileStream.Create(Filename, fmCreate);\r\n try\r\n SaveToStream(Stream);\r\n finally\r\n Stream.Free;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCSVGBitmap.LoadFromFile(const Filename: String);\r\nbegin\r\n if not Assigned(FSVG) then\r\n Exit;\r\n\r\n FStream.Clear;\r\n FStream.LoadFromFile(FileName);\r\n {$IFDEF SVGSUPPORT}\r\n TTMSFNCGraphicsSVGImport(FSVG).LoadFromStream(FStream);\r\n {$ENDIF}\r\n Changed(Self);\r\nend;\r\n\r\nprocedure TTMSFNCSVGBitmap.LoadFromStream(Stream: TStream);\r\nbegin\r\n if not Assigned(FSVG) or not Assigned(Stream) then\r\n Exit;\r\n\r\n try\r\n FFileName := '';\r\n FStream.LoadFromStream(Stream);\r\n {$IFDEF SVGSUPPORT}\r\n TTMSFNCGraphicsSVGImport(FSVG).LoadFromStream(FStream);\r\n {$ENDIF}\r\n except\r\n end;\r\n Changed(Self);\r\nend;\r\n\r\nprocedure TTMSFNCSVGBitmap.SaveToStream(Stream: TStream);\r\nbegin\r\n if Assigned(Stream) then\r\n begin\r\n FStream.Position := 0;\r\n FStream.SaveToStream(Stream);\r\n end;\r\nend;\r\n\r\n{$IFDEF SVGSUPPORT}\r\n{$IFDEF VCLLIB}\r\n{$HINTS OFF}\r\n{$IF COMPILERVERSION >= 33}\r\n\r\n{ TTMSFNCSVGImageCollection }\r\n\r\nprocedure TTMSFNCSVGImageCollection.Assign(Source: TPersistent);\r\nbegin\r\n if Source is TTMSFNCSVGImageCollection then\r\n FImages.Assign((Source as TTMSFNCSVGImageCollection).FImages)\r\n else\r\n inherited;\r\nend;\r\n\r\nconstructor TTMSFNCSVGImageCollection.Create(AOwner: TComponent);\r\nbegin\r\n inherited;\r\n FImages := TTMSFNCSVGImageCollectionItems.Create(Self, TTMSFNCSVGImageCollectionItem);\r\nend;\r\n\r\ndestructor TTMSFNCSVGImageCollection.Destroy;\r\nbegin\r\n FImages.Free;\r\n inherited;\r\nend;\r\n\r\nprocedure TTMSFNCSVGImageCollection.Draw(ACanvas: TCanvas; X, Y, AIndex: Integer;\r\n AProportional: Boolean);\r\nvar\r\n it: TTMSFNCSVGImageCollectionItem;\r\nbegin\r\n it := GetItemByIndex(AIndex);\r\n if Assigned(it) then\r\n Draw(ACanvas, Bounds(X, Y, it.Data.Width, it.Data.Height), AIndex, AProportional);\r\nend;\r\n\r\nprocedure TTMSFNCSVGImageCollection.Draw(ACanvas: TCanvas; ARect: TRect;\r\n AIndex: Integer; AProportional: Boolean);\r\nvar\r\n it: TTMSFNCSVGImageCollectionItem;\r\n {$IFDEF SVGSUPPORT}\r\n si: TTMSFNCGraphicsSVGImport;\r\n {$ENDIF}\r\n r: TRect;\r\n\r\n function UpdateRectForProportionalSize(ARect: TRect; AWidth, AHeight: Integer; AStretch: Boolean): TRect;\r\n var\r\n w, h, cw, ch: Integer;\r\n xyaspect: Double;\r\n begin\r\n Result := ARect;\r\n if AWidth * AHeight = 0 then\r\n Exit;\r\n\r\n w := AWidth;\r\n h := AHeight;\r\n cw := ARect.Width;\r\n ch := ARect.Height;\r\n\r\n if AStretch or ((w > cw) or (h > ch)) then\r\n begin\r\n xyaspect := w / h;\r\n if w > h then\r\n begin\r\n w := cw;\r\n h := Trunc(cw / xyaspect);\r\n if h > ch then\r\n begin\r\n h := ch;\r\n w := Trunc(ch * xyaspect);\r\n end;\r\n end\r\n else\r\n begin\r\n h := ch;\r\n w := Trunc(ch * xyaspect);\r\n if w > cw then\r\n begin\r\n w := cw;\r\n h := Trunc(cw / xyaspect);\r\n end;\r\n end;\r\n end;\r\n\r\n Result := Rect(0, 0, w, h);\r\n OffsetRect(Result, ARect.Left + (cw - w) div 2, ARect.Top + (ch - h) div 2);\r\n end;\r\nbegin\r\n if (AIndex >= 0) and (AIndex < Count) then\r\n begin\r\n it := Images[AIndex];\r\n if Assigned(it.Data.Graphic) then\r\n begin\r\n r := ARect;\r\n if AProportional then\r\n r := UpdateRectForProportionalSize(r, it.Data.Width, it.Data.Height, False);\r\n\r\n if (it.Data.Graphic is TTMSFNCSVGBitmap) then\r\n begin\r\n {$IFDEF SVGSUPPORT}\r\n si := TTMSFNCGraphicsSVGImport((it.Data.Graphic as TTMSFNCSVGBitmap).SVG);\r\n si.GrayScale := it.GrayScale;\r\n si.CustomFillColor := it.CustomFillColor;\r\n si.CustomStrokeColor := it.CustomStrokeColor;\r\n si.TintColor := it.TintColor;\r\n si.CustomOpacity := it.CustomOpacity;\r\n \tsi.RotationAngle := it.RotationAngle;\r\n si.Draw(ACanvas, ConvertToRectF(r), True);\r\n {$ENDIF}\r\n end\r\n else\r\n ACanvas.StretchDraw(r, it.Data.Graphic);\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCSVGImageCollection.GetBitmap(AIndex, AWidth,\r\n AHeight: Integer): TBitmap;\r\nvar\r\n it: TTMSFNCSVGImageCollectionItem;\r\n {$IFDEF SVGSUPPORT}\r\n si: TTMSFNCGraphicsSVGImport;\r\n {$ENDIF}\r\n p: Pointer;\r\nbegin\r\n Result := nil;\r\n if (AIndex >= 0) and (AIndex < Count) then\r\n begin\r\n it := Images[AIndex];\r\n if Assigned(it.Data.Graphic) then\r\n begin\r\n Result := TBitmap.Create;\r\n Result.PixelFormat := pf32Bit;\r\n Result.Width := AWidth;\r\n Result.Height := AHeight;\r\n Result.HandleType := bmDIB;\r\n Result.IgnorePalette := true;\r\n Result.AlphaFormat := afIgnored;\r\n\r\n p := Result.ScanLine[AHeight - 1];\r\n ZeroMemory(p, AWidth * AHeight * 4);\r\n\r\n if (it.Data.Graphic is TTMSFNCSVGBitmap) then\r\n begin\r\n {$IFDEF SVGSUPPORT}\r\n si := TTMSFNCGraphicsSVGImport((it.Data.Graphic as TTMSFNCSVGBitmap).SVG);\r\n si.GrayScale := it.GrayScale;\r\n si.CustomFillColor := it.CustomFillColor;\r\n si.CustomStrokeColor := it.CustomStrokeColor;\r\n si.TintColor := it.TintColor;\r\n si.CustomOpacity := it.CustomOpacity;\r\n\tsi.RotationAngle := it.RotationAngle;\r\n si.Draw(Result.Canvas, RectF(0, 0, AWidth, AHeight), True)\r\n {$ENDIF}\r\n end\r\n else\r\n Result.Canvas.StretchDraw(Bounds(0, 0, AWidth, AHeight), it.Data.Graphic);\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCSVGImageCollection.GetCount: Integer;\r\nbegin\r\n Result := FImages.Count;\r\nend;\r\n\r\nfunction TTMSFNCSVGImageCollection.GetIndexByName(const AName: String): Integer;\r\nvar\r\n I: Integer;\r\n S: String;\r\nbegin\r\n Result := -1;\r\n S := LowerCase(AName);\r\n for I := 0 to FImages.Count - 1 do\r\n if LowerCase(FImages[I].Name) = S then\r\n Exit(I);\r\nend;\r\n\r\nfunction TTMSFNCSVGImageCollection.GetItemByIndex(\r\n AIndex: Integer): TTMSFNCSVGImageCollectionItem;\r\nbegin\r\n Result := nil;\r\n if (AIndex >= 0) and (AIndex < Count) then\r\n Result := Images[AIndex];\r\nend;\r\n\r\nfunction TTMSFNCSVGImageCollection.GetNameByIndex(AIndex: Integer): String;\r\nbegin\r\n Result := '';\r\n if (AIndex >= 0) and (AIndex < Count) then\r\n Result := Images[AIndex].Name;\r\nend;\r\n\r\nfunction TTMSFNCSVGImageCollection.IsIndexAvailable(AIndex: Integer): Boolean;\r\nbegin\r\n Result := (Count > 0) and (AIndex >= 0) and (AIndex < Count);\r\nend;\r\n\r\nprocedure TTMSFNCSVGImageCollection.SetImages(const Value: TTMSFNCSVGImageCollectionItems);\r\nbegin\r\n FImages.Assign(Value);\r\nend;\r\n\r\n{ TTMSFNCSVGImageCollectionItem }\r\n\r\nconstructor TTMSFNCSVGImageCollectionItem.Create(ACollection: TCollection);\r\nbegin\r\n inherited;\r\n FData := TPicture.Create;\r\n FName := '';\r\n FGrayScale := False;\r\n FCustomFillColor := -1;\r\n FCustomStrokeColor := -1;\r\n FTintColor := -1;\r\n FCustomOpacity := -1;\r\n FRotationAngle := 0;\r\nend;\r\n\r\nfunction TTMSFNCSVGImageCollectionItem.IsCustomFillColorStored: Boolean;\r\nbegin\r\n Result := CustomFillColor <> -1;\r\nend;\r\n\r\nfunction TTMSFNCSVGImageCollectionItem.IsRotationAngleStored: Boolean;\r\nbegin\r\n Result := RotationAngle <> 0;\r\nend;\r\n\r\nfunction TTMSFNCSVGImageCollectionItem.IsTintColorStored: Boolean;\r\nbegin\r\n Result := TintColor <> -1;\r\nend;\r\n\r\nfunction TTMSFNCSVGImageCollectionItem.IsCustomStrokeColorStored: Boolean;\r\nbegin\r\n Result := CustomStrokeColor <> -1;\r\nend;\r\n\r\nfunction TTMSFNCSVGImageCollectionItem.IsCustomOpacityStored: Boolean;\r\nbegin\r\n Result := CustomOpacity <> -1;\r\nend;\r\n\r\nprocedure TTMSFNCSVGImageCollectionItem.Assign(Source: TPersistent);\r\nbegin\r\n if Source is TTMSFNCSVGImageCollectionItem then\r\n begin\r\n FRotationAngle := (Source as TTMSFNCSVGImageCollectionItem).RotationAngle;\r\n FData.Assign((Source as TTMSFNCSVGImageCollectionItem).Data);\r\n FName := (Source as TTMSFNCSVGImageCollectionItem).Name;\r\n FGrayScale := (Source as TTMSFNCSVGImageCollectionItem).GrayScale;\r\n FCustomFillColor := (Source as TTMSFNCSVGImageCollectionItem).CustomFillColor;\r\n FCustomStrokeColor := (Source as TTMSFNCSVGImageCollectionItem).CustomStrokeColor;\r\n FTintColor := (Source as TTMSFNCSVGImageCollectionItem).TintColor;\r\n FCustomOpacity := (Source as TTMSFNCSVGImageCollectionItem).CustomOpacity;\r\n end\r\n else\r\n inherited;\r\nend;\r\n\r\nfunction TTMSFNCSVGImageCollectionItem.GetDisplayName: string;\r\nbegin\r\n if FName <> '' then\r\n Result := FName\r\n {$IFDEF WEBLIB}\r\n else\r\n Result := '';\r\n {$ENDIF}\r\n {$IFNDEF WEBLIB}\r\n else\r\n Result := inherited;\r\n {$ENDIF}\r\nend;\r\n\r\ndestructor TTMSFNCSVGImageCollectionItem.Destroy;\r\nbegin\r\n FData.Free;\r\n inherited;\r\nend;\r\n\r\nprocedure TTMSFNCSVGImageCollectionItem.SetData(const Value: TPicture);\r\nbegin\r\n FData.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCSVGImageCollectionItem.SetName(const Value: String);\r\nbegin\r\n FName := Value;\r\nend;\r\n\r\n{ TTMSFNCSVGImageCollectionItems }\r\n\r\nfunction TTMSFNCSVGImageCollectionItems.GetItem(Index: Integer): TTMSFNCSVGImageCollectionItem;\r\nbegin\r\n Result := TTMSFNCSVGImageCollectionItem(inherited GetItem(Index));\r\nend;\r\n\r\nprocedure TTMSFNCSVGImageCollectionItems.SetItem(Index: Integer; Value: TTMSFNCSVGImageCollectionItem);\r\nbegin\r\n inherited SetItem(Index, Value);\r\nend;\r\n\r\nfunction TTMSFNCSVGImageCollectionItems.Add: TTMSFNCSVGImageCollectionItem;\r\nbegin\r\n Result := TTMSFNCSVGImageCollectionItem(inherited Add);\r\nend;\r\n{$IFEND}\r\n{$HINTS ON}\r\n{$ENDIF}\r\n\r\nfunction IsGraphicClassRegistered(const FileExt: String): Boolean;\r\nvar\r\n Ext: String;\r\n List: TStringList;\r\n I: Integer;\r\nbegin\r\n Result := False;\r\n Ext := FileExt;\r\n List := TStringList.Create;\r\n try\r\n List.Delimiter := ';';\r\n List.StrictDelimiter := True;\r\n List.DelimitedText := GraphicFileMask(TGraphic);\r\n for I := 0 to List.Count-1 do\r\n begin\r\n if MatchesMask(FileExt, List[I]) then\r\n begin\r\n Result := True;\r\n Exit;\r\n end;\r\n end;\r\n finally\r\n List.Free;\r\n end;\r\nend;\r\n\r\ninitialization\r\nbegin\r\n if not Assigned(GetClass(TTMSFNCSVGBitmap.ClassName)) then\r\n begin\r\n RegisterClass(TTMSFNCSVGBitmap);\r\n TPicture.RegisterFileFormat('SVG', 'Scalable Vector Graphics', TTMSFNCSVGBitmap);\r\n end;\r\nend;\r\n\r\nfinalization\r\nbegin\r\n TPicture.UnregisterGraphicClass(TTMSFNCSVGBitmap);\r\n UnRegisterClass(TTMSFNCSVGBitmap);\r\nend;\r\n{$ENDIF}\r\n{$ENDIF}\r\n\r\nend.\r\n\r\n","{********************************************************************}\r\n{ }\r\n{ written by TMS Software }\r\n{ copyright (c) 2016 - 2021 }\r\n{ Email : info@tmssoftware.com }\r\n{ Web : http://www.tmssoftware.com }\r\n{ }\r\n{ The source code is given as is. The author is not responsible }\r\n{ for any possible damage done due to the use of this code. }\r\n{ The complete source code remains property of the author and may }\r\n{ not be distributed, published, given or sold in any form as such. }\r\n{ No parts of the source code can be included in any other component }\r\n{ or application without written authorization of the author. }\r\n{********************************************************************}\r\n\r\nunit WEBLib.TMSFNCGraphicsTypes;\r\n\r\n{$I WEBLib.TMSFNCDefines.inc}\r\n\r\n{$IFDEF CMNLIB}\r\n{$DEFINE USECOMMONCOLORS}\r\n{$DEFINE CMNWEBLIB}\r\n{$ENDIF}\r\n{$IFDEF WEBLIB}\r\n{$DEFINE USECOMMONCOLORS}\r\n{$DEFINE CMNWEBLIB}\r\n{$DEFINE FMXWEBLIB}\r\n{$ENDIF}\r\n{$IFDEF FMXLIB}\r\n{$DEFINE FMXWEBLIB}\r\n{$ENDIF}\r\n\r\n{$IFDEF WEBLIB}\r\n{$DEFINE LCLWEBLIB}\r\n{$ENDIF}\r\n{$IFDEF LCLLIB}\r\n{$DEFINE LCLWEBLIB}\r\n{$DEFINE USEOWNEDCOLLECTION}\r\n{$ENDIF}\r\n\r\n{$IFNDEF LCLWEBLIB}\r\n{$HINTS OFF}\r\n{$IF COMPILERVERSION > 22}\r\n{$DEFINE USEOWNEDCOLLECTION}\r\n{$IFEND}\r\n{$HINTS ON}\r\n{$ENDIF}\r\n\r\ninterface\r\n\r\nuses\r\n {$IFDEF MSWINDOWS}\r\n Windows,\r\n {$ENDIF}\r\n Classes, Types, WEBLib.TMSFNCTypes, WEBLib.Graphics\r\n {$IFNDEF LCLWEBLIB}\r\n {$HINTS OFF}\r\n {$IF COMPILERVERSION > 22}\r\n ,UITypes\r\n {$IFEND}\r\n {$HINTS ON}\r\n ,Generics.Collections\r\n {$ENDIF}\r\n {$IFDEF LCLLIB}\r\n ,fgl\r\n {$ENDIF}\r\n ;\r\n\r\nconst\r\n {$IFNDEF LCLLIB}\r\n FPC_FULLVERSION = 0;\r\n {$ENDIF}\r\n PathScale = 1E-4;\r\n PathFontSize = 1E-2;\r\n PathPosition = 1E-3;\r\n PathAngle = 1E-4;\r\n\r\n {$IFDEF FMXLIB}\r\n gcAlpha = $FF000000;\r\n gcAliceblue = gcAlpha or $F0F8FF;\r\n gcAntiquewhite = gcAlpha or $FAEBD7;\r\n gcAqua = gcAlpha or $00FFFF;\r\n gcAquamarine = gcAlpha or $7FFFD4;\r\n gcAzure = gcAlpha or $F0FFFF;\r\n gcBeige = gcAlpha or $F5F5DC;\r\n gcBisque = gcAlpha or $FFE4C4;\r\n gcBlack = gcAlpha or $000000;\r\n gcBlanchedalmond = gcAlpha or $FFEBCD;\r\n gcBlue = gcAlpha or $0000FF;\r\n gcBlueviolet = gcAlpha or $8A2BE2;\r\n gcBrown = gcAlpha or $A52A2A;\r\n gcBurlywood = gcAlpha or $DEB887;\r\n gcCadetblue = gcAlpha or $5F9EA0;\r\n gcChartreuse = gcAlpha or $7FFF00;\r\n gcChocolate = gcAlpha or $D2691E;\r\n gcCoral = gcAlpha or $FF7F50;\r\n gcCornflowerblue = gcAlpha or $6495ED;\r\n gcCornsilk = gcAlpha or $FFF8DC;\r\n gcCrimson = gcAlpha or $DC143C;\r\n gcCyan = gcAlpha or $00FFFF;\r\n gcDarkblue = gcAlpha or $00008B;\r\n gcDarkcyan = gcAlpha or $008B8B;\r\n gcDarkgoldenrod = gcAlpha or $B8860B;\r\n gcDarkgray = gcAlpha or $A9A9A9;\r\n gcDarkgreen = gcAlpha or $006400;\r\n gcDarkgrey = gcAlpha or $A9A9A9;\r\n gcDarkkhaki = gcAlpha or $BDB76B;\r\n gcDarkmagenta = gcAlpha or $8B008B;\r\n gcDarkolivegreen = gcAlpha or $556B2F;\r\n gcDarkorange = gcAlpha or $FF8C00;\r\n gcDarkorchid = gcAlpha or $9932CC;\r\n gcDarkred = gcAlpha or $8B0000;\r\n gcDarksalmon = gcAlpha or $E9967A;\r\n gcDarkseagreen = gcAlpha or $8FBC8F;\r\n gcDarkslateblue = gcAlpha or $483D8B;\r\n gcDarkslategray = gcAlpha or $2F4F4F;\r\n gcDarkslategrey = gcAlpha or $2F4F4F;\r\n gcDarkturquoise = gcAlpha or $00CED1;\r\n gcDarkviolet = gcAlpha or $9400D3;\r\n gcDeeppink = gcAlpha or $FF1493;\r\n gcDeepskyblue = gcAlpha or $00BFFF;\r\n gcDimgray = gcAlpha or $696969;\r\n gcDimgrey = gcAlpha or $696969;\r\n gcDodgerblue = gcAlpha or $1E90FF;\r\n gcFirebrick = gcAlpha or $B22222;\r\n gcFloralwhite = gcAlpha or $FFFAF0;\r\n gcForestgreen = gcAlpha or $228B22;\r\n gcFuchsia = gcAlpha or $FF00FF;\r\n gcGainsboro = gcAlpha or $DCDCDC;\r\n gcGhostwhite = gcAlpha or $F8F8FF;\r\n gcGold = gcAlpha or $FFD700;\r\n gcGoldenrod = gcAlpha or $DAA520;\r\n gcGray = gcAlpha or $808080;\r\n gcGreen = gcAlpha or $008000;\r\n gcGreenyellow = gcAlpha or $ADFF2F;\r\n gcGrey = gcAlpha or $808080;\r\n gcHoneydew = gcAlpha or $F0FFF0;\r\n gcHotpink = gcAlpha or $FF69B4;\r\n gcIndianred = gcAlpha or $CD5C5C;\r\n gcIndigo = gcAlpha or $4B0082;\r\n gcIvory = gcAlpha or $FFFFF0;\r\n gcKhaki = gcAlpha or $F0E68C;\r\n gcLavender = gcAlpha or $E6E6FA;\r\n gcLavenderblush = gcAlpha or $FFF0F5;\r\n gcLawngreen = gcAlpha or $7CFC00;\r\n gcLemonchiffon = gcAlpha or $FFFACD;\r\n gcLightblue = gcAlpha or $ADD8E6;\r\n gcLightcoral = gcAlpha or $F08080;\r\n gcLightcyan = gcAlpha or $E0FFFF;\r\n gcLightgoldenrodyellow = gcAlpha or $FAFAD2;\r\n gcLightgray = gcAlpha or $D3D3D3;\r\n gcLightgreen = gcAlpha or $90EE90;\r\n gcLightgrey = gcAlpha or $D3D3D3;\r\n gcLightpink = gcAlpha or $FFB6C1;\r\n gcLightsalmon = gcAlpha or $FFA07A;\r\n gcLightseagreen = gcAlpha or $20B2AA;\r\n gcLightskyblue = gcAlpha or $87CEFA;\r\n gcLightslategray = gcAlpha or $778899;\r\n gcLightslategrey = gcAlpha or $778899;\r\n gcLightsteelblue = gcAlpha or $B0C4DE;\r\n gcLightyellow = gcAlpha or $FFFFE0;\r\n gcLtGray = gcAlpha or $C0C0C0;\r\n gcMedGray = gcAlpha or $A0A0A0;\r\n gcDkGray = gcAlpha or $808080;\r\n gcMoneyGreen = gcAlpha or $C0DCC0;\r\n gcLegacySkyBlue = gcAlpha or $F0CAA6;\r\n gcCream = gcAlpha or $F0FBFF;\r\n gcLime = gcAlpha or $00FF00;\r\n gcLimegreen = gcAlpha or $32CD32;\r\n gcLinen = gcAlpha or $FAF0E6;\r\n gcMagenta = gcAlpha or $FF00FF;\r\n gcMaroon = gcAlpha or $800000;\r\n gcMediumaquamarine = gcAlpha or $66CDAA;\r\n gcMediumblue = gcAlpha or $0000CD;\r\n gcMediumorchid = gcAlpha or $BA55D3;\r\n gcMediumpurple = gcAlpha or $9370DB;\r\n gcMediumseagreen = gcAlpha or $3CB371;\r\n gcMediumslateblue = gcAlpha or $7B68EE;\r\n gcMediumspringgreen = gcAlpha or $00FA9A;\r\n gcMediumturquoise = gcAlpha or $48D1CC;\r\n gcMediumvioletred = gcAlpha or $C71585;\r\n gcMidnightblue = gcAlpha or $191970;\r\n gcMintcream = gcAlpha or $F5FFFA;\r\n gcMistyrose = gcAlpha or $FFE4E1;\r\n gcMoccasin = gcAlpha or $FFE4B5;\r\n gcNavajowhite = gcAlpha or $FFDEAD;\r\n gcNavy = gcAlpha or $000080;\r\n gcOldlace = gcAlpha or $FDF5E6;\r\n gcOlive = gcAlpha or $808000;\r\n gcOlivedrab = gcAlpha or $6B8E23;\r\n gcOrange = gcAlpha or $FFA500;\r\n gcOrangered = gcAlpha or $FF4500;\r\n gcOrchid = gcAlpha or $DA70D6;\r\n gcPalegoldenrod = gcAlpha or $EEE8AA;\r\n gcPalegreen = gcAlpha or $98FB98;\r\n gcPaleturquoise = gcAlpha or $AFEEEE;\r\n gcPalevioletred = gcAlpha or $DB7093;\r\n gcPapayawhip = gcAlpha or $FFEFD5;\r\n gcPeachpuff = gcAlpha or $FFDAB9;\r\n gcPeru = gcAlpha or $CD853F;\r\n gcPink = gcAlpha or $FFC0CB;\r\n gcPlum = gcAlpha or $DDA0DD;\r\n gcPowderblue = gcAlpha or $B0E0E6;\r\n gcPurple = gcAlpha or $800080;\r\n gcRed = gcAlpha or $FF0000;\r\n gcRosybrown = gcAlpha or $BC8F8F;\r\n gcRoyalblue = gcAlpha or $4169E1;\r\n gcSaddlebrown = gcAlpha or $8B4513;\r\n gcSalmon = gcAlpha or $FA8072;\r\n gcSandybrown = gcAlpha or $F4A460;\r\n gcSeagreen = gcAlpha or $2E8B57;\r\n gcSeashell = gcAlpha or $FFF5EE;\r\n gcSienna = gcAlpha or $A0522D;\r\n gcSilver = gcAlpha or $C0C0C0;\r\n gcSkyblue = gcAlpha or $87CEEB;\r\n gcSlateblue = gcAlpha or $6A5ACD;\r\n gcSlategray = gcAlpha or $708090;\r\n gcSlategrey = gcAlpha or $708090;\r\n gcSnow = gcAlpha or $FFFAFA;\r\n gcSpringgreen = gcAlpha or $00FF7F;\r\n gcSteelblue = gcAlpha or $4682B4;\r\n gcTan = gcAlpha or $D2B48C;\r\n gcTeal = gcAlpha or $008080;\r\n gcThistle = gcAlpha or $D8BFD8;\r\n gcTomato = gcAlpha or $FF6347;\r\n gcTurquoise = gcAlpha or $40E0D0;\r\n gcViolet = gcAlpha or $EE82EE;\r\n gcWheat = gcAlpha or $F5DEB3;\r\n gcWhite = gcAlpha or $FFFFFF;\r\n gcWhitesmoke = gcAlpha or $F5F5F5;\r\n gcYellow = gcAlpha or $FFFF00;\r\n gcYellowgreen = gcAlpha or $9ACD32;\r\n gcNull = $00000000;\r\n {$ENDIF}\r\n {$IFDEF USECOMMONCOLORS}\r\n gcAliceblue = $FFF8F0;\r\n gcAntiquewhite = $D7EBFA;\r\n gcAqua = $FFFF00;\r\n gcAquamarine = $D4FF7F;\r\n gcAzure = $FFFFF0;\r\n gcBeige = $DCF5F5;\r\n gcBisque = $C4E4FF;\r\n gcBlack = $000000;\r\n gcBlanchedalmond = $CDEBFF;\r\n gcBlue = $FF0000;\r\n gcBlueviolet = $E22B8A;\r\n gcBrown = $2A2AA5;\r\n gcBurlywood = $87B8DE;\r\n gcCadetblue = $A09E5F;\r\n gcChartreuse = $00FF7F;\r\n gcChocolate = $1E69D2;\r\n gcCoral = $507FFF;\r\n gcCornflowerblue = $ED9564;\r\n gcCornsilk = $DCF8FF;\r\n gcCrimson = $3C14DC;\r\n gcCyan = $FFFF00;\r\n gcDarkblue = $8B0000;\r\n gcDarkcyan = $8B8B00;\r\n gcDarkgoldenrod = $0B86B8;\r\n gcDarkgray = $A9A9A9;\r\n gcDarkgreen = $006400;\r\n gcDarkgrey = $A9A9A9;\r\n gcDarkkhaki = $6BB7BD;\r\n gcDarkmagenta = $8B008B;\r\n gcDarkolivegreen = $2F6B55;\r\n gcDarkorange = $008CFF;\r\n gcDarkorchid = $CC3299;\r\n gcDarkred = $00008B;\r\n gcDarksalmon = $7A96E9;\r\n gcDarkseagreen = $8FBC8F;\r\n gcDarkslateblue = $8B3D48;\r\n gcDarkslategray = $4F4F2F;\r\n gcDarkslategrey = $4F4F2F;\r\n gcDarkturquoise = $D1CE00;\r\n gcDarkviolet = $D30094;\r\n gcDeeppink = $9314FF;\r\n gcDeepskyblue = $FFBF00;\r\n gcDimgray = $696969;\r\n gcDimgrey = $696969;\r\n gcDodgerblue = $FF901E;\r\n gcFirebrick = $2222B2;\r\n gcFloralwhite = $F0FAFF;\r\n gcForestgreen = $228B22;\r\n gcFuchsia = $FF00FF;\r\n gcGainsboro = $DCDCDC;\r\n gcGhostwhite = $FFF8F8;\r\n gcGold = $00D7FF;\r\n gcGoldenrod = $20A5DA;\r\n gcGray = $808080;\r\n gcGreen = $008000;\r\n gcGreenyellow = $2FFFAD;\r\n gcGrey = $808080;\r\n gcHoneydew = $F0FFF0;\r\n gcHotpink = $B469FF;\r\n gcIndianred = $5C5CCD;\r\n gcIndigo = $82004B;\r\n gcIvory = $F0FFFF;\r\n gcKhaki = $8CE6F0;\r\n gcLavender = $FAE6E6;\r\n gcLavenderblush = $F5F0FF;\r\n gcLawngreen = $00FC7C;\r\n gcLemonchiffon = $CDFAFF;\r\n gcLightblue = $E6D8AD;\r\n gcLightcoral = $8080F0;\r\n gcLightcyan = $FFFFE0;\r\n gcLightgoldenrodyellow = $D2FAFA;\r\n gcLightgray = $D3D3D3;\r\n gcLightgreen = $90EE90;\r\n gcLightgrey = $D3D3D3;\r\n gcLightpink = $C1B6FF;\r\n gcLightsalmon = $7AA0FF;\r\n gcLightseagreen = $AAB220;\r\n gcLightskyblue = $FACE87;\r\n gcLightslategray = $998877;\r\n gcLightslategrey = $998877;\r\n gcLightsteelblue = $DEC4B0;\r\n gcLightyellow = $E0FFFF;\r\n gcLtGray = $C0C0C0;\r\n gcMedGray = $A4A0A0;\r\n gcDkGray = $808080;\r\n gcMoneyGreen = $C0DCC0;\r\n gcLegacySkyBlue = $F0CAA6;\r\n gcCream = $F0FBFF;\r\n gcLime = $00FF00;\r\n gcLimegreen = $32CD32;\r\n gcLinen = $E6F0FA;\r\n gcMagenta = $FF00FF;\r\n gcMaroon = $000080;\r\n gcMediumaquamarine = $AACD66;\r\n gcMediumblue = $CD0000;\r\n gcMediumorchid = $D355BA;\r\n gcMediumpurple = $DB7093;\r\n gcMediumseagreen = $71B33C;\r\n gcMediumslateblue = $EE687B;\r\n gcMediumspringgreen = $9AFA00;\r\n gcMediumturquoise = $CCD148;\r\n gcMediumvioletred = $8515C7;\r\n gcMidnightblue = $701919;\r\n gcMintcream = $FAFFF5;\r\n gcMistyrose = $E1E4FF;\r\n gcMoccasin = $B5E4FF;\r\n gcNavajowhite = $ADDEFF;\r\n gcNavy = $800000;\r\n gcOldlace = $E6F5FD;\r\n gcOlive = $008080;\r\n gcOlivedrab = $238E6B;\r\n gcOrange = $00A5FF;\r\n gcOrangered = $0045FF;\r\n gcOrchid = $D670DA;\r\n gcPalegoldenrod = $AAE8EE;\r\n gcPalegreen = $98FB98;\r\n gcPaleturquoise = $EEEEAF;\r\n gcPalevioletred = $9370DB;\r\n gcPapayawhip = $D5EFFF;\r\n gcPeachpuff = $B9DAFF;\r\n gcPeru = $3F85CD;\r\n gcPink = $CBC0FF;\r\n gcPlum = $DDA0DD;\r\n gcPowderblue = $E6E0B0;\r\n gcPurple = $800080;\r\n gcRed = $0000FF;\r\n gcRosybrown = $8F8FBC;\r\n gcRoyalblue = $E16941;\r\n gcSaddlebrown = $13458B;\r\n gcSalmon = $7280FA;\r\n gcSandybrown = $60A4F4;\r\n gcSeagreen = $578B2E;\r\n gcSeashell = $EEF5FF;\r\n gcSienna = $2D52A0;\r\n gcSilver = $C0C0C0;\r\n gcSkyblue = $EBCE87;\r\n gcSlateblue = $CD5A6A;\r\n gcSlategray = $908070;\r\n gcSlategrey = $908070;\r\n gcSnow = $FAFAFF;\r\n gcSpringgreen = $7FFF00;\r\n gcSteelblue = $B48246;\r\n gcTan = $8CB4D2;\r\n gcTeal = $808000;\r\n gcThistle = $D8BFD8;\r\n gcTomato = $4763FF;\r\n gcTurquoise = $D0E040;\r\n gcViolet = $EE82EE;\r\n gcWheat = $B3DEF5;\r\n gcWhite = $FFFFFF;\r\n gcWhitesmoke = $F5F5F5;\r\n gcYellow = $00FFFF;\r\n gcYellowgreen = $32CD9A;\r\n gcNull = -1;\r\n {$ENDIF}\r\n\r\ntype\r\n {$IFDEF FMXLIB}\r\n TTMSFNCGraphicsColor = TAlphaColor;\r\n {$ENDIF}\r\n {$IFDEF CMNWEBLIB}\r\n TTMSFNCGraphicsColor = TColor;\r\n {$ENDIF}\r\n\r\n TTMSFNCGraphicsColorEntry = record\r\n Value: TTMSFNCGraphicsColor;\r\n Name: PChar;\r\n end;\r\n\r\nconst\r\n TMSFNCGraphicsColorCount = 154;\r\n {$IFNDEF WEBLIB}\r\n TMSFNCGraphicsColors: array[0..TMSFNCGraphicsColorCount - 1] of TTMSFNCGraphicsColorEntry = (\r\n (Value: gcAliceblue; Name:'gcAliceblue'),\r\n (Value: gcAntiquewhite; Name:'gcAntiquewhite'),\r\n (Value: gcAqua; Name:'gcAqua'),\r\n (Value: gcAquamarine; Name:'gcAquamarine'),\r\n (Value: gcAzure; Name:'gcAzure'),\r\n (Value: gcBeige; Name:'gcBeige'),\r\n (Value: gcBisque; Name:'gcBisque'),\r\n (Value: gcBlack; Name:'gcBlack'),\r\n (Value: gcBlanchedalmond; Name:'gcBlanchedalmond'),\r\n (Value: gcBlue; Name:'gcBlue'),\r\n (Value: gcBlueviolet; Name:'gcBlueviolet'),\r\n (Value: gcBrown; Name:'gcBrown'),\r\n (Value: gcBurlywood; Name:'gcBurlywood'),\r\n (Value: gcCadetblue; Name:'gcCadetblue'),\r\n (Value: gcChartreuse; Name:'gcChartreuse'),\r\n (Value: gcChocolate; Name:'gcChocolate'),\r\n (Value: gcCoral; Name:'gcCoral'),\r\n (Value: gcCornflowerblue; Name:'gcCornflowerblue'),\r\n (Value: gcCornsilk; Name:'gcCornsilk'),\r\n (Value: gcCrimson; Name:'gcCrimson'),\r\n (Value: gcCyan; Name:'gcCyan'),\r\n (Value: gcDarkblue; Name:'gcDarkblue'),\r\n (Value: gcDarkcyan; Name:'gcDarkcyan'),\r\n (Value: gcDarkgoldenrod; Name:'gcDarkgoldenrod'),\r\n (Value: gcDarkgray; Name:'gcDarkgray'),\r\n (Value: gcDarkgreen; Name:'gcDarkgreen'),\r\n (Value: gcDarkgrey; Name:'gcDarkgrey'),\r\n (Value: gcDarkkhaki; Name:'gcDarkkhaki'),\r\n (Value: gcDarkmagenta; Name:'gcDarkmagenta'),\r\n (Value: gcDarkolivegreen; Name:'gcDarkolivegreen'),\r\n (Value: gcDarkorange; Name:'gcDarkorange'),\r\n (Value: gcDarkorchid; Name:'gcDarkorchid'),\r\n (Value: gcDarkred; Name:'gcDarkred'),\r\n (Value: gcDarksalmon; Name:'gcDarksalmon'),\r\n (Value: gcDarkseagreen; Name:'gcDarkseagreen'),\r\n (Value: gcDarkslateblue; Name:'gcDarkslateblue'),\r\n (Value: gcDarkslategray; Name:'gcDarkslategray'),\r\n (Value: gcDarkslategrey; Name:'gcDarkslategrey'),\r\n (Value: gcDarkturquoise; Name:'gcDarkturquoise'),\r\n (Value: gcDarkviolet; Name:'gcDarkviolet'),\r\n (Value: gcDeeppink; Name:'gcDeeppink'),\r\n (Value: gcDeepskyblue; Name:'gcDeepskyblue'),\r\n (Value: gcDimgray; Name:'gcDimgray'),\r\n (Value: gcDimgrey; Name:'gcDimgray'),\r\n (Value: gcDodgerblue; Name:'gcDodgerblue'),\r\n (Value: gcFirebrick; Name:'gcFirebrick'),\r\n (Value: gcFloralwhite; Name:'gcFloralwhite'),\r\n (Value: gcForestgreen; Name:'gcForestgreen'),\r\n (Value: gcFuchsia; Name:'gcFuchsia'),\r\n (Value: gcGainsboro; Name:'gcGainsboro'),\r\n (Value: gcGhostwhite; Name:'gcGhostwhite'),\r\n (Value: gcGold; Name:'gcGold'),\r\n (Value: gcGoldenrod; Name:'gcGoldenrod'),\r\n (Value: gcGray; Name:'gcGray'),\r\n (Value: gcGreen; Name:'gcGreen'),\r\n (Value: gcGreenyellow; Name:'gcGreenyellow'),\r\n (Value: gcGrey; Name:'gcGrey'),\r\n (Value: gcHoneydew; Name:'gcHoneydew'),\r\n (Value: gcHotpink; Name:'gcHotpink'),\r\n (Value: gcIndianred; Name:'gcIndianred'),\r\n (Value: gcIndigo; Name:'gcIndigo'),\r\n (Value: gcIvory; Name:'gcIvory'),\r\n (Value: gcKhaki; Name:'gcKhaki'),\r\n (Value: gcLavender; Name:'gcLavender'),\r\n (Value: gcLavenderblush; Name:'gcLavenderblush'),\r\n (Value: gcLawngreen; Name:'gcLawngreen'),\r\n (Value: gcLemonchiffon; Name:'gcLemonchiffon'),\r\n (Value: gcLightblue; Name:'gcLightblue'),\r\n (Value: gcLightcoral; Name:'gcLightcoral'),\r\n (Value: gcLightcyan; Name:'gcLightcyan'),\r\n (Value: gcLightgoldenrodyellow; Name:'gcLightgoldenrodyellow'),\r\n (Value: gcLightgray; Name:'gcLightgray'),\r\n (Value: gcLightgreen; Name:'gcLightgreen'),\r\n (Value: gcLightgrey; Name:'gcLightgrey'),\r\n (Value: gcLightpink; Name:'gcLightpink'),\r\n (Value: gcLightsalmon; Name:'gcLightsalmon'),\r\n (Value: gcLightseagreen; Name:'gcLightseagreen'),\r\n (Value: gcLightskyblue; Name:'gcLightskyblue'),\r\n (Value: gcLightslategray; Name:'gcLightslategray'),\r\n (Value: gcLightslategrey; Name:'gcLightslategrey'),\r\n (Value: gcLightsteelblue; Name:'gcLightsteelblue'),\r\n (Value: gcLightyellow; Name:'gcLightyellow'),\r\n (Value: gcLtGray; Name:'gcLtGray'),\r\n (Value: gcMedGray; Name:'gcMedGray'),\r\n (Value: gcDkGray; Name:'gcDkGray'),\r\n (Value: gcMoneyGreen; Name:'gcMoneyGreen'),\r\n (Value: gcLegacySkyBlue; Name:'gcLegacySkyBlue'),\r\n (Value: gcCream; Name:'gcCream'),\r\n (Value: gcLime; Name:'gcLime'),\r\n (Value: gcLimegreen; Name:'gcLimegreen'),\r\n (Value: gcLinen; Name:'gcLinen'),\r\n (Value: gcMagenta; Name:'gcMagenta'),\r\n (Value: gcMaroon; Name:'gcMaroon'),\r\n (Value: gcMediumaquamarine; Name:'gcMediumaquamarine'),\r\n (Value: gcMediumblue; Name:'gcMediumblue'),\r\n (Value: gcMediumorchid; Name:'gcMediumorchid'),\r\n (Value: gcMediumpurple; Name:'gcMediumpurple'),\r\n (Value: gcMediumseagreen; Name:'gcMediumseagreen'),\r\n (Value: gcMediumslateblue; Name:'gcMediumslateblue'),\r\n (Value: gcMediumspringgreen; Name:'gcMediumspringgreen'),\r\n (Value: gcMediumturquoise; Name:'gcMediumturquoise'),\r\n (Value: gcMediumvioletred; Name:'gcMediumvioletred'),\r\n (Value: gcMidnightblue; Name:'gcMidnightblue'),\r\n (Value: gcMintcream; Name:'gcMintcream'),\r\n (Value: gcMistyrose; Name:'gcMistyrose'),\r\n (Value: gcMoccasin; Name:'gcMoccasin'),\r\n (Value: gcNavajowhite; Name:'gcNavajowhite'),\r\n (Value: gcNavy; Name:'gcNavy'),\r\n (Value: gcOldlace; Name:'gcOldlace'),\r\n (Value: gcOlive; Name:'gcOlive'),\r\n (Value: gcOlivedrab; Name:'gcOlivedrab'),\r\n (Value: gcOrange; Name:'gcOrange'),\r\n (Value: gcOrangered; Name:'gcOrangered'),\r\n (Value: gcOrchid; Name:'gcOrchid'),\r\n (Value: gcPalegoldenrod; Name:'gcPalegoldenrod'),\r\n (Value: gcPalegreen; Name:'gcPalegreen'),\r\n (Value: gcPaleturquoise; Name:'gcPaleturquoise'),\r\n (Value: gcPalevioletred; Name:'gcPalevioletred'),\r\n (Value: gcPapayawhip; Name:'gcPapayawhip'),\r\n (Value: gcPeachpuff; Name:'gcPeachpuff'),\r\n (Value: gcPeru; Name:'gcPeru'),\r\n (Value: gcPink; Name:'gcPink'),\r\n (Value: gcPlum; Name:'gcPlum'),\r\n (Value: gcPowderblue; Name:'gcPowderblue'),\r\n (Value: gcPurple; Name:'gcPurple'),\r\n (Value: gcRed; Name:'gcRed'),\r\n (Value: gcRosybrown; Name:'gcRosybrown'),\r\n (Value: gcRoyalblue; Name:'gcRoyalblue'),\r\n (Value: gcSaddlebrown; Name:'gcSaddlebrown'),\r\n (Value: gcSalmon; Name:'gcSalmon'),\r\n (Value: gcSandybrown; Name:'gcSandybrown'),\r\n (Value: gcSeagreen; Name:'gcSeagreen'),\r\n (Value: gcSeashell; Name:'gcSeashell'),\r\n (Value: gcSienna; Name:'gcSienna'),\r\n (Value: gcSilver; Name:'gcSilver'),\r\n (Value: gcSkyblue; Name:'gcSkyblue'),\r\n (Value: gcSlateblue; Name:'gcSlateblue'),\r\n (Value: gcSlategray; Name:'gcSlategray'),\r\n (Value: gcSlategrey; Name:'gcSlategrey'),\r\n (Value: gcSnow; Name:'gcSnow'),\r\n (Value: gcSpringgreen; Name:'gcSpringgreen'),\r\n (Value: gcSteelblue; Name:'gcSteelblue'),\r\n (Value: gcTan; Name:'gcTan'),\r\n (Value: gcTeal; Name:'gcTeal'),\r\n (Value: gcThistle; Name:'gcThistle'),\r\n (Value: gcTomato; Name:'gcTomato'),\r\n (Value: gcTurquoise; Name:'gcTurquoise'),\r\n (Value: gcViolet; Name:'gcViolet'),\r\n (Value: gcWheat; Name:'gcWheat'),\r\n (Value: gcWhite; Name:'gcWhite'),\r\n (Value: gcWhitesmoke; Name:'gcWhitesmoke'),\r\n (Value: gcYellow; Name:'gcYellow'),\r\n (Value: gcYellowgreen; Name:'gcYellowgreen'),\r\n (Value: gcNull; Name:'gcNull'));\r\n {$ENDIF}\r\n\r\ntype\r\n TTMSFNCGraphicsStrokeKind = (gskNone, gskSolid, gskDash, gskDot, gskDashDot, gskDashDotDot);\r\n TTMSFNCGraphicsTextureMode = (gtmOriginal, gtmFit, gtmStretch, gtmCenter, gtmTile);\r\n TTMSFNCGraphicsFillKind = (gfkNone, gfkSolid, gfkGradient, gfkTexture);\r\n TTMSFNCGraphicsFillGradientMode = (gfgmDefault, gfgmCollection);\r\n TTMSFNCGraphicsFillGradientType = (gfgtLinear, gfgtRadial);\r\n TTMSFNCGraphicsFillOrientation = (gfoHorizontal, gfoVertical, gfoCustom);\r\n TTMSFNCGraphicsTextAlign = (gtaCenter, gtaLeading, gtaTrailing);\r\n TTMSFNCGraphicsTextTrimming = (gttNone, gttCharacter, gttWord);\r\n TTMSFNCGraphicsSide = (gsLeft, gsTop, gsRight, gsBottom);\r\n TTMSFNCGraphicsSides = set of TTMSFNCGraphicsSide;\r\n TTMSFNCGraphicsTextQuality = (gtqDefault, gtqAntiAliasing, gtqClearType);\r\n\r\nconst\r\n AllSides = [gsLeft, gsTop, gsRight, gsBottom];\r\n Epsilon: Single = 1E-40;\r\n\r\ntype\r\n {$IFNDEF WEBLIB}\r\n TTMSFNCGraphicsVectorArray = array [0..2] of Single;\r\n\r\n TTMSFNCGraphicsVector = record\r\n case Integer of\r\n 0: (V: TTMSFNCGraphicsVectorArray;);\r\n 1: (X: Single;\r\n Y: Single;\r\n W: Single;);\r\n end;\r\n\r\n TTMSFNCGraphicsMatrixArray = array [0..2] of TTMSFNCGraphicsVector;\r\n\r\n TTMSFNCGraphicsMatrix = record\r\n private\r\n function Scale(const AFactor: Single): TTMSFNCGraphicsMatrix;\r\n public\r\n class function Identity: TTMSFNCGraphicsMatrix; static;\r\n class function CreateRotation(const AAngle: Single): TTMSFNCGraphicsMatrix; static;\r\n class function CreateScaling(const AScaleX, AScaleY: Single): TTMSFNCGraphicsMatrix; static;\r\n class function CreateTranslation(const ADeltaX, ADeltaY: Single): TTMSFNCGraphicsMatrix; static;\r\n {$IFDEF LCLLIB}\r\n class operator *(const AMatrix1, AMatrix2: TTMSFNCGraphicsMatrix): TTMSFNCGraphicsMatrix;\r\n class operator *(const APoint: TPointF; const AMatrix: TTMSFNCGraphicsMatrix): TPointF;\r\n {$ENDIF}\r\n {$IFNDEF LCLLIB}\r\n class operator Multiply(const AMatrix1, AMatrix2: TTMSFNCGraphicsMatrix): TTMSFNCGraphicsMatrix;\r\n class operator Multiply(const APoint: TPointF; const AMatrix: TTMSFNCGraphicsMatrix): TPointF;\r\n {$ENDIF}\r\n\r\n function Determinant: Single;\r\n function Adjoint: TTMSFNCGraphicsMatrix;\r\n function Inverse: TTMSFNCGraphicsMatrix;\r\n\r\n case Integer of\r\n 0: (M: TTMSFNCGraphicsMatrixArray;);\r\n 1: (m11, m12, m13: Single;\r\n m21, m22, m23: Single;\r\n m31, m32, m33: Single);\r\n end;\r\n {$ENDIF}\r\n\r\n {$IFDEF WEBLIB}\r\n TTMSFNCGraphicsMatrix = record\r\n m11, m12, m13: Single;\r\n m21, m22, m23: Single;\r\n m31, m32, m33: Single;\r\n end;\r\n {$ENDIF}\r\n\r\n TTMSFNCGraphicsStroke = class;\r\n TTMSFNCGraphicsFill = class;\r\n TTMSFNCGraphicsFont = class;\r\n\r\n TTMSFNCGraphicsSaveState = class(TPersistent)\r\n private\r\n {$IFDEF CMNWEBLIB}\r\n FSaveDC: Integer;\r\n {$ENDIF}\r\n {$IFDEF FMXLIB}\r\n FSaveDC: TCanvasSaveState;\r\n {$ENDIF}\r\n FFont: TTMSFNCGraphicsFont;\r\n FStroke: TTMSFNCGraphicsStroke;\r\n FFill: TTMSFNCGraphicsFill;\r\n FCustomSaveDC: NativeUInt;\r\n procedure SetStroke(const Value: TTMSFNCGraphicsStroke);\r\n procedure SetFill(const Value: TTMSFNCGraphicsFill);\r\n procedure SetFont(const Value: TTMSFNCGraphicsFont);\r\n public\r\n constructor Create;\r\n destructor Destroy; override;\r\n property Stroke: TTMSFNCGraphicsStroke read FStroke write SetStroke;\r\n property Fill: TTMSFNCGraphicsFill read FFill write SetFill;\r\n property Font: TTMSFNCGraphicsFont read FFont write SetFont;\r\n property CustomSaveDC: NativeUInt read FCustomSaveDC write FCustomSaveDC;\r\n {$IFDEF CMNWEBLIB}\r\n property SaveDC: Integer read FSaveDC write FSaveDC;\r\n {$ENDIF}\r\n {$IFDEF FMXLIB}\r\n property SaveDC: TCanvasSaveState read FSaveDC write FSaveDC;\r\n {$ENDIF}\r\n end;\r\n\r\n TTMSFNCGraphicsFillGradientItem = class(TCollectionItem)\r\n private\r\n FColor: TTMSFNCGraphicsColor;\r\n FPosition: Single;\r\n FOpacity: Single;\r\n function IsPositionStored: Boolean;\r\n procedure SetColor(const Value: TTMSFNCGraphicsColor);\r\n procedure SetPosition(const Value: Single);\r\n function IsOpacityStored: Boolean;\r\n procedure SetOpacity(const Value: Single);\r\n protected\r\n procedure UpdateGradient;\r\n public\r\n constructor Create(ACollection: TCollection); override;\r\n procedure Assign(Source: TPersistent); override;\r\n published\r\n property Opacity: Single read FOpacity write SetOpacity stored IsOpacityStored nodefault;\r\n property Color: TTMSFNCGraphicsColor read FColor write SetColor default gcWhite;\r\n property Position: Single read FPosition write SetPosition stored IsPositionStored nodefault;\r\n end;\r\n\r\n TTMSFNCCustomGraphicsFill = class;\r\n\r\n {$IFDEF WEBLIB}\r\n TTMSFNCGraphicsFillGradientItems = class(TTMSFNCOwnedCollection)\r\n {$ENDIF}\r\n {$IFNDEF WEBLIB}\r\n {$IFDEF USEOWNEDCOLLECTION}\r\n TTMSFNCGraphicsFillGradientItems = class({$IFDEF LCLLIB}specialize {$ENDIF}TTMSFNCOwnedCollection)\r\n {$ELSE}\r\n TTMSFNCGraphicsFillGradientItems = class({$IFDEF LCLLIB}specialize {$ENDIF}TTMSFNCOwnedCollection)\r\n {$ENDIF}\r\n {$ENDIF}\r\n private\r\n FOwner: TTMSFNCCustomGraphicsFill;\r\n function GetItemEx(Index: Integer): TTMSFNCGraphicsFillGradientItem;\r\n procedure SetItemEx(Index: Integer; const Value: TTMSFNCGraphicsFillGradientItem);\r\n protected\r\n procedure UpdateGradient;\r\n function GetGradientClass: TCollectionItemClass; virtual;\r\n public\r\n constructor Create(AOwner: TTMSFNCCustomGraphicsFill);\r\n function Add: TTMSFNCGraphicsFillGradientItem; {$IFDEF WEBLIB}reintroduce;{$ENDIF}\r\n function Insert(index: Integer): TTMSFNCGraphicsFillGradientItem;{$IFDEF WEBLIB}reintroduce;{$ENDIF}\r\n property Items[Index: Integer]: TTMSFNCGraphicsFillGradientItem read GetItemEx write SetItemEx; default;\r\n end;\r\n\r\n TTMSFNCCustomGraphicsFill = class(TPersistent)\r\n private\r\n FUpdateCount: Integer;\r\n FOnChanged: TNotifyEvent;\r\n FOrientation: TTMSFNCGraphicsFillOrientation;\r\n FKind: TTMSFNCGraphicsFillKind;\r\n FDefaultKind: TTMSFNCGraphicsFillKind;\r\n FColor: TTMSFNCGraphicsColor;\r\n FDefaultColor: TTMSFNCGraphicsColor;\r\n FColorTo: TTMSFNCGraphicsColor;\r\n FColorMirror: TTMSFNCGraphicsColor;\r\n FColorMirrorTo: TTMSFNCGraphicsColor;\r\n FDefaultColorTo: TTMSFNCGraphicsColor;\r\n FDefaultColorMirror: TTMSFNCGraphicsColor;\r\n FDefaultColorMirrorTo: TTMSFNCGraphicsColor;\r\n FOpacity: Single;\r\n FTexture: TTMSFNCBitmap;\r\n FTextureMode: TTMSFNCGraphicsTextureMode;\r\n FGradientMode: TTMSFNCGraphicsFillGradientMode;\r\n FGradientItems: TTMSFNCGraphicsFillGradientItems;\r\n FGradientType: TTMSFNCGraphicsFillGradientType;\r\n FGradientAngle: Single;\r\n FGradientCenterPoint: TPointF;\r\n FGradientCenterColor: TTMSFNCGraphicsColor;\r\n FGradientMatrix: TTMSFNCGraphicsMatrix;\r\n procedure SetKind(const Value: TTMSFNCGraphicsFillKind);\r\n procedure SetOrientation(const Value: TTMSFNCGraphicsFillOrientation);\r\n procedure SetColor(const Value: TTMSFNCGraphicsColor);\r\n procedure SetColorTo(const Value: TTMSFNCGraphicsColor);\r\n procedure SetColorMirror(const Value: TTMSFNCGraphicsColor);\r\n procedure SetColorMirrorTo(const Value: TTMSFNCGraphicsColor);\r\n procedure SetOpacity(const Value: Single);\r\n function IsOpacityStored: Boolean;\r\n procedure SetTexture(const Value: TTMSFNCBitmap);\r\n procedure SetTextureMode(const Value: TTMSFNCGraphicsTextureMode);\r\n procedure SetGradientItems(const Value: TTMSFNCGraphicsFillGradientItems);\r\n procedure SetGradientMode(const Value: TTMSFNCGraphicsFillGradientMode);\r\n procedure SetGradientType(const Value: TTMSFNCGraphicsFillGradientType);\r\n function IsGradientAngleStored: Boolean;\r\n procedure SetGradientAngle(const Value: Single);\r\n procedure SetGradientCenterPoint(const Value: TPointF);\r\n procedure SetGradientCenterColor(const Value: TTMSFNCGraphicsColor);\r\n function IsColorStored: Boolean;\r\n function IsKindStored: Boolean;\r\n function IsColorMirrorStored: Boolean;\r\n function IsColorMirrorToStored: Boolean;\r\n function IsColorToStored: Boolean;\r\n protected\r\n procedure Changed;\r\n procedure TextureChanged(Sender: TObject);\r\n property OnChanged: TNotifyEvent read FOnChanged write FOnChanged;\r\n property GradientAngle: Single read FGradientAngle write SetGradientAngle stored IsGradientAngleStored nodefault;\r\n property GradientType: TTMSFNCGraphicsFillGradientType read FGradientType write SetGradientType default gfgtLinear;\r\n property GradientMode: TTMSFNCGraphicsFillGradientMode read FGradientMode write SetGradientMode default gfgmDefault;\r\n property GradientItems: TTMSFNCGraphicsFillGradientItems read FGradientItems write SetGradientItems;\r\n property GradientCenterPoint: TPointF read FGradientCenterPoint write SetGradientCenterPoint;\r\n property GradientMatrix: TTMSFNCGraphicsMatrix read FGradientMatrix write FGradientMatrix;\r\n property GradientCenterColor: TTMSFNCGraphicsColor read FGradientCenterColor write SetGradientCenterColor default gcNull;\r\n property GradientOrientation: TTMSFNCGraphicsFillOrientation read FOrientation write SetOrientation default gfoVertical;\r\n property Kind: TTMSFNCGraphicsFillKind read FKind write SetKind stored IsKindStored nodefault;\r\n property Orientation: TTMSFNCGraphicsFillOrientation read FOrientation write SetOrientation default gfoVertical;\r\n property Color: TTMSFNCGraphicsColor read FColor write SetColor stored IsColorStored nodefault;\r\n property ColorTo: TTMSFNCGraphicsColor read FColorTo write SetColorTo stored IsColorToStored nodefault;\r\n property ColorMirror: TTMSFNCGraphicsColor read FColorMirror write SetColorMirror stored IsColorMirrorStored nodefault;\r\n property ColorMirrorTo: TTMSFNCGraphicsColor read FColorMirrorTo write SetColorMirrorTo stored IsColorMirrorToStored nodefault;\r\n property Opacity: Single read FOpacity write SetOpacity stored IsOpacityStored nodefault;\r\n property Texture: TTMSFNCBitmap read FTexture write SetTexture;\r\n property TextureMode: TTMSFNCGraphicsTextureMode read FTextureMode write SetTextureMode default gtmStretch;\r\n public\r\n constructor Create(const AKind: TTMSFNCGraphicsFillKind = gfkSolid; const AColor: TTMSFNCGraphicsColor = gcWhite; const AColorTo: TTMSFNCGraphicsColor = gcGray; const AColorMirror: TTMSFNCGraphicsColor = gcNull; const AColorMirrorTo: TTMSFNCGraphicsColor = gcNull); virtual;\r\n destructor Destroy; override;\r\n procedure Assign(Source: TPersistent); override;\r\n procedure BeginUpdate; virtual;\r\n procedure EndUpdate; virtual;\r\n procedure ClearGradientItems; virtual;\r\n function AddGradientItem(AColor: TTMSFNCGraphicsColor; APosition: Single; AOpacity: Single = 1.0): TTMSFNCGraphicsFillGradientItem; virtual;\r\n end;\r\n\r\n TTMSFNCGraphicsFill = class(TTMSFNCCustomGraphicsFill)\r\n public\r\n {$IFDEF CMNWEBLIB}\r\n property Opacity;\r\n {$ENDIF}\r\n property GradientMatrix;\r\n property GradientAngle;\r\n property GradientType;\r\n property GradientMode;\r\n property GradientItems;\r\n property GradientCenterPoint;\r\n property GradientCenterColor;\r\n property GradientOrientation;\r\n published\r\n property OnChanged;\r\n property Kind;\r\n property Orientation;\r\n property Color;\r\n property ColorTo;\r\n property ColorMirror;\r\n property ColorMirrorTo;\r\n property TextureMode;\r\n property Texture;\r\n {$IFDEF FMXLIB}\r\n property Opacity;\r\n {$ENDIF}\r\n end;\r\n\r\n TTMSFNCGraphicsFont = class(TFont)\r\n private\r\n FUpdateCount: Integer;\r\n FOnChanged: TNotifyEvent;\r\n {$IFDEF FMXLIB}\r\n FHeight: Integer;\r\n FColor: TTMSFNCGraphicsColor;\r\n procedure SetColor(const Value: TTMSFNCGraphicsColor);\r\n procedure SetName(const Value: string);\r\n function GetName: string;\r\n function IsNameStored: Boolean;\r\n {$ENDIF}\r\n protected\r\n procedure DoChanged(Sender: TObject); {$IFDEF FMXLIB}reintroduce;{$ENDIF}\r\n {$IFDEF CMNWEBLIB}\r\n {$IFDEF LCLLIB}\r\n procedure Changed; override;\r\n {$ENDIF}\r\n {$ENDIF}\r\n public\r\n {$IFNDEF LCLLIB}\r\n constructor Create; virtual;\r\n {$ENDIF}\r\n {$IFDEF LCLLIB}\r\n constructor Create; override;\r\n {$ENDIF}\r\n procedure Assign(Source: TPersistent); override;\r\n procedure AssignSource(Source: TPersistent); virtual;\r\n {$IFDEF FMXLIB}\r\n property Height: Integer read FHeight write FHeight;\r\n published\r\n property Color: TTMSFNCGraphicsColor read FColor write SetColor default gcBlack;\r\n property Name: string read GetName write SetName stored IsNameStored;\r\n {$ENDIF}\r\n property OnChanged: TNotifyEvent read FOnChanged write FOnChanged;\r\n procedure BeginUpdate; virtual;\r\n procedure EndUpdate; virtual;\r\n end;\r\n\r\n TTMSFNCAppearanceGlobalFontType = (aftNone, aftColor, aftSize, aftName, aftScale, aftStyle);\r\n\r\n ITMSFNCAppearanceGlobalFont = interface\r\n ['{85CF4F6B-3FF9-4CB7-AD6A-7FC477ED5462}']\r\n procedure SetFonts(ASetType: TTMSFNCAppearanceGlobalFontType);\r\n end;\r\n\r\n TTMSFNCAppearanceGlobalFont = class(TPersistent)\r\n private\r\n FOwner: TPersistent;\r\n FColor: TTMSFNCGraphicsColor;\r\n FSize: Single;\r\n FName: String;\r\n FScale: Double;\r\n FOldScale: Double;\r\n FStyle: TFontStyles;\r\n procedure SetColor(const Value: TTMSFNCGraphicsColor);\r\n procedure SetSize(const Value: Single);\r\n procedure SetName(const Value: String);\r\n procedure SetScale(const Value: Double);\r\n procedure SetStyle(const Value: TFontStyles);\r\n function IsNameStored: Boolean;\r\n function IsScaleStored: Boolean;\r\n function IsSizeStored: Boolean;\r\n function IsStyleStored: Boolean;\r\n protected\r\n procedure SetFonts(ASetType: TTMSFNCAppearanceGlobalFontType);\r\n public\r\n constructor Create(AOwner: TPersistent);\r\n destructor Destroy; override;\r\n procedure Assign(Source: TPersistent); override;\r\n procedure ApplyChange(AFont: TTMSFNCGraphicsFont; ASetType: TTMSFNCAppearanceGlobalFontType);\r\n function GetOldScale: Double;\r\n published\r\n property Color: TTMSFNCGraphicsColor read FColor write SetColor default gcNull;\r\n property Size: Single read FSize write SetSize stored IsSizeStored;\r\n property Name: String read FName write SetName stored IsNameStored;\r\n property Scale: Double read FScale write SetScale stored IsScaleStored;\r\n property Style: TFontStyles read FStyle write SetStyle stored IsStyleStored;\r\n end;\r\n\r\n TTMSFNCCustomGraphicsStroke = class(TPersistent)\r\n private\r\n FUpdateCount: Integer;\r\n FOnChanged: TNotifyEvent;\r\n FKind: TTMSFNCGraphicsStrokeKind;\r\n FColor: TTMSFNCGraphicsColor;\r\n FWidth: Single;\r\n FOpacity: Single;\r\n FDefaultKind: TTMSFNCGraphicsStrokeKind;\r\n FDefaultColor: TTMSFNCGraphicsColor;\r\n procedure SetKind(const Value: TTMSFNCGraphicsStrokeKind);\r\n procedure SetColor(const Value: TTMSFNCGraphicsColor);\r\n procedure SetWidth(const Value: Single);\r\n procedure SetOpacity(const Value: Single);\r\n function IsOpacityStored: Boolean;\r\n function IsWidthStored: Boolean;\r\n function IsKindStored: Boolean;\r\n function IsColorStored: Boolean;\r\n protected\r\n procedure Changed;\r\n property OnChanged: TNotifyEvent read FOnChanged write FOnChanged;\r\n property Kind: TTMSFNCGraphicsStrokeKind read FKind write SetKind stored IsKindStored nodefault;\r\n property Color: TTMSFNCGraphicsColor read FColor write SetColor stored IsColorStored nodefault;\r\n property Width: Single read FWidth write SetWidth stored IsWidthStored nodefault;\r\n property Opacity: Single read FOpacity write SetOpacity stored IsOpacityStored nodefault;\r\n public\r\n constructor Create(const AKind: TTMSFNCGraphicsStrokeKind = gskSolid; const AColor: TTMSFNCGraphicsColor = gcSilver); virtual;\r\n procedure Assign(Source: TPersistent); override;\r\n procedure BeginUpdate; virtual;\r\n procedure EndUpdate; virtual;\r\n end;\r\n\r\n TTMSFNCGraphicsStroke = class(TTMSFNCCustomGraphicsStroke)\r\n public\r\n {$IFDEF CMNWEBLIB}\r\n property Opacity;\r\n {$ENDIF}\r\n published\r\n property OnChanged;\r\n property Kind;\r\n property Color;\r\n property Width;\r\n {$IFDEF FMXLIB}\r\n property Opacity;\r\n {$ENDIF}\r\n end;\r\n\r\n TTMSFNCGraphicsPathPolygon = array of TPointF;\r\n\r\n TTMSFNCGraphicsPathPointKind = (gppMoveTo, gppLineTo, gppCurveTo, gppClose);\r\n\r\n TTMSFNCGraphicsPathCubicBezier = array[0..3] of TPointF;\r\n\r\n TTMSFNCGraphicsPathPoint = record\r\n Kind: TTMSFNCGraphicsPathPointKind;\r\n {$IFNDEF WEBLIB}\r\n {$HINTS OFF}\r\n {$WARNINGS OFF}\r\n {$IF FPC_FULLVERSION < 30000}\r\n Dummy: Boolean;\r\n {$IFEND}\r\n {$HINTS ON}\r\n {$WARNINGS ON}\r\n {$ENDIF}\r\n Point: TPointF;\r\n {$IFDEF LCLLIB}\r\n class operator = (z1, z2 : TTMSFNCGraphicsPathPoint) b : Boolean;\r\n {$ENDIF}\r\n end;\r\n\r\n TTMSFNCGraphicsPathDrawMode = (pdmPolygon, pdmPolyline, pdmPath);\r\n\r\n {$IFDEF WEBLIB}\r\n TTMSFNCGraphicsPathPoints = class(TList)\r\n private\r\n function GetItem(Index: Integer): TTMSFNCGraphicsPathPoint;\r\n procedure SetItem(Index: Integer; const Value: TTMSFNCGraphicsPathPoint);\r\n public\r\n property Items[Index: Integer]: TTMSFNCGraphicsPathPoint read GetItem write SetItem; default;\r\n end;\r\n {$ENDIF}\r\n {$IFNDEF WEBLIB}\r\n TTMSFNCGraphicsPathPoints = class(TList);\r\n {$ENDIF}\r\n\r\n TTMSFNCGraphicsCorner = (gcTopLeft, gcTopRight, gcBottomLeft, gcBottomRight);\r\n TTMSFNCGraphicsCorners = set of TTMSFNCGraphicsCorner;\r\n\r\n TTMSFNCGraphicsPath = class(TPersistent)\r\n private\r\n FStartPoint: TPointF;\r\n FClippable: Boolean;\r\n FPoints: TTMSFNCGraphicsPathPoints;\r\n procedure CalculateBezierCoefficients(const Bezier: TTMSFNCGraphicsPathCubicBezier; out AX, BX, CX, AY, BY, CY: Double);\r\n function GetCount: Integer;\r\n function GetPoint(AIndex: Integer): TTMSFNCGraphicsPathPoint;\r\n public\r\n constructor Create; virtual;\r\n destructor Destroy; override;\r\n procedure Assign(Source: TPersistent); override;\r\n function LastPoint: TPointF;\r\n function IsPointVisible(const P: TPointF): Boolean;\r\n function IsRectVisible(const R: TRectF): Boolean;\r\n function PointOnBezier(const StartPoint: TPointF; const AX, BX, CX, AY, BY, CY, T: Double): TPointF;\r\n function CreateBezier(const Bezier: TTMSFNCGraphicsPathCubicBezier; const PointCount: Integer): TTMSFNCGraphicsPathPolygon;\r\n function GetBounds: TRectF;\r\n function IsClippable: Boolean;\r\n procedure MoveTo(const P: TPointF);\r\n procedure LineTo(const P: TPointF);\r\n procedure CurveTo(const ControlPoint1, ControlPoint2, EndPoint: TPointF);\r\n procedure SmoothCurveTo(const ControlPoint2, EndPoint: TPointF);\r\n procedure QuadCurveTo(const ControlPoint, EndPoint: TPointF);\r\n procedure AddPolygon(const APolygon: TTMSFNCGraphicsPathPolygon);\r\n procedure ClosePath;\r\n procedure AddLine(const StartPoint, EndPoint: TPointF);\r\n procedure AddEllipse(const ARect: TRectF);\r\n procedure AddRectangle(const ARect: TRectF; ARoundingX: Single = 0.0; ARoundingY: Single = 0.0; ACorners: TTMSFNCGraphicsCorners = [gcTopLeft, gcTopRight, gcBottomLeft, gcBottomRight]);\r\n procedure AddArc(const Center, Radius: TPointF; StartAngle, SweepAngle: Single);\r\n procedure AddPath(APath: TTMSFNCGraphicsPath);\r\n procedure ApplyMatrix(AMatrix: TTMSFNCGraphicsMatrix);\r\n procedure Clear;\r\n procedure Flatten(const Flatness: Single = 0.25);\r\n procedure FlattenToPolygon(var Polygon: TTMSFNCGraphicsPathPolygon; const Flatness: Single = 0.25);\r\n property Count: Integer read GetCount;\r\n property Points[AIndex: Integer]: TTMSFNCGraphicsPathPoint read GetPoint; default;\r\n property PathData: TTMSFNCGraphicsPathPoints read FPoints;\r\n property Clippable: Boolean read FClippable write FClippable;\r\n end;\r\n\r\n TTMSFNCGraphicsColorObject = class\r\n private\r\n FColor: TTMSFNCGraphicsColor;\r\n public\r\n constructor Create(AColor: TTMSFNCGraphicsColor);\r\n property Color: TTMSFNCGraphicsColor read FColor write FColor;\r\n end;\r\n\r\n TTMSFNCGraphicsModifyRectMode = (gcrmNone, gcrmExpandAll, gcrmShrinkAll, gcrmShiftRightAndExpandHeight, gcrmShiftDownAndExpandWidth,\r\n gcrmShiftRightAndShrinkHeight, gcrmShiftRightDown, gcrmShiftRightUp, gcrmShiftLeftUp, gcrmShiftLeftDown, gcrmShiftUpAndExpandWidth,\r\n gcrmShiftLeftAndExpandHeight);\r\n TTMSFNCGraphicsModifyPointMode = (gcpmNone, gcpmLeftUp, gcpmRightDown, gcpmLeftDown, gcpmRightUp);\r\n TTMSFNCGraphicsExpanderState = (gesCollapsed, gesExpanded);\r\n TTMSFNCGraphicsCompactState = (gcsCollapsed, gcsExpanded);\r\n\r\n {$IFDEF LCLWEBLIB}\r\n TTMSFNCGraphicsColorList = class(TStringList)\r\n public\r\n procedure AddOrSetValue(AKey: string; AValue: TTMSFNCGraphicsColorObject);\r\n function TryGetValue(AKey: string; var AValue: TTMSFNCGraphicsColorObject): Boolean;\r\n end;\r\n {$ELSE}\r\n TTMSFNCGraphicsColorList = class(TObjectDictionary);\r\n {$ENDIF}\r\n\r\nfunction ModifyRect(const ARect: TRectF; const {%H-}ARectMode: TTMSFNCGraphicsModifyRectMode): TRectF;\r\nfunction ModifyPoint(const APoint: TPointF; const {%H-}APointMode: TTMSFNCGraphicsModifyPointMode): TPointF;\r\nfunction MakeGraphicsColor(ARed, AGreen, ABlue: Byte{$IFDEF FMXLIB};AAlpha: Byte = 255{$ENDIF}): TTMSFNCGraphicsColor;\r\nfunction Lighter(AColor: TTMSFNCGraphicsColor; APercent: Byte): TTMSFNCGraphicsColor;\r\nfunction Darker(AColor: TTMSFNCGraphicsColor; APercent: Byte): TTMSFNCGraphicsColor;\r\nfunction Blend(AColor1: TTMSFNCGraphicsColor; AColor2: TTMSFNCGraphicsColor; ALevel: Byte): TTMSFNCGraphicsColor;\r\nfunction ColorLookup: TTMSFNCGraphicsColorList;\r\nfunction PointInPoly(APoint: TPointF; APolygon: TTMSFNCGraphicsPathPolygon): Boolean;\r\nfunction RectInPoly(ARect: TRectF; APolygon: TTMSFNCGraphicsPathPolygon): Boolean;\r\nfunction PolyInRect(APolygon: TTMSFNCGraphicsPathPolygon; ARect: TRectF): Boolean;\r\n{$IFDEF CMNWEBLIB}\r\n{$IFDEF WEBLIB}\r\nprocedure DrawGradient(ACanvas: TCanvas; AColor, AColorTo: TColor; ARect: TRectF; ARounding: Single; ACorners: TTMSFNCGraphicsCorners; ADirection: Boolean);\r\n{$ENDIF}\r\n{$IFNDEF WEBLIB}\r\nprocedure DrawGradient(ACanvas: TCanvas; AColor, AColorTo: TColor; ARect: TRect; ARounding: Single; ACorners: TTMSFNCGraphicsCorners; ADirection: Boolean);\r\n{$ENDIF}\r\n{$ENDIF}\r\n\r\nfunction IsMatrixEmpty(const AMatrix: TTMSFNCGraphicsMatrix): Boolean;\r\nfunction MatrixEmpty: TTMSFNCGraphicsMatrix;\r\nfunction MatrixIdentity: TTMSFNCGraphicsMatrix;\r\nfunction MatrixCreateRotation(const AAngle: Single): TTMSFNCGraphicsMatrix;\r\nfunction MatrixCreateScaling(const AScaleX, AScaleY: Single): TTMSFNCGraphicsMatrix;\r\nfunction MatrixCreateTranslation(const ADeltaX, ADeltaY: Single): TTMSFNCGraphicsMatrix;\r\nfunction MatrixMultiply(const AMatrix1, AMatrix2: TTMSFNCGraphicsMatrix): TTMSFNCGraphicsMatrix; overload;\r\nfunction MatrixMultiply(const APoint: TPointF; const AMatrix: TTMSFNCGraphicsMatrix): TPointF; overload;\r\n\r\nimplementation\r\n\r\nuses\r\n WEBLib.TMSFNCUtils, SysUtils, Math\r\n {$IFDEF FMXLIB}\r\n ,UIConsts\r\n {$ENDIF}\r\n {$IFDEF LCLLIB}\r\n {$IFNDEF MSWINDOWS}\r\n ,LCLIntF\r\n {$ENDIF}\r\n {$ENDIF}\r\n ;\r\n\r\nvar\r\n FColorLookup: TTMSFNCGraphicsColorList;\r\n\r\nfunction IsMatrixEmpty(const AMatrix: TTMSFNCGraphicsMatrix): Boolean;\r\nbegin\r\n Result := (AMatrix.m11 = 0) and\r\n (AMatrix.m12 = 0) and\r\n (AMatrix.m13 = 0) and\r\n (AMatrix.m21 = 0) and\r\n (AMatrix.m22 = 0) and\r\n (AMatrix.m23 = 0) and\r\n (AMatrix.m31 = 0) and\r\n (AMatrix.m32 = 0) and\r\n (AMatrix.m33 = 0);\r\n\r\nend;\r\n\r\nfunction MatrixIdentity: TTMSFNCGraphicsMatrix;\r\nbegin\r\n Result.m11 := 1;\r\n Result.m12 := 0;\r\n Result.m13 := 0;\r\n Result.m21 := 0;\r\n Result.m22 := 1;\r\n Result.m23 := 0;\r\n Result.m31 := 0;\r\n Result.m32 := 0;\r\n Result.m33 := 1;\r\nend;\r\n\r\nfunction MatrixEmpty: TTMSFNCGraphicsMatrix;\r\nbegin\r\n Result.m11 := 0;\r\n Result.m12 := 0;\r\n Result.m13 := 0;\r\n Result.m21 := 0;\r\n Result.m22 := 0;\r\n Result.m23 := 0;\r\n Result.m31 := 0;\r\n Result.m32 := 0;\r\n Result.m33 := 0;\r\nend;\r\n\r\nfunction MatrixCreateRotation(const AAngle: Single): TTMSFNCGraphicsMatrix;\r\nvar\r\n S, C: Single;\r\nbegin\r\n S := Sin(AAngle);\r\n C := Cos(AAngle);\r\n Result := MatrixIdentity;\r\n Result.m11 := C;\r\n Result.m12 := S;\r\n Result.m21 := -S;\r\n Result.m22 := C;\r\nend;\r\n\r\nfunction MatrixCreateScaling(const AScaleX, AScaleY: Single): TTMSFNCGraphicsMatrix;\r\nbegin\r\n Result := MatrixIdentity;\r\n Result.m11 := AScaleX;\r\n Result.m22 := AScaleY;\r\nend;\r\n\r\nfunction MatrixCreateTranslation(const ADeltaX, ADeltaY: Single): TTMSFNCGraphicsMatrix;\r\nbegin\r\n Result := MatrixIdentity;\r\n Result.m31 := ADeltaX;\r\n Result.m32 := ADeltaY;\r\nend;\r\n\r\nfunction MatrixMultiply(const APoint: TPointF; const AMatrix: TTMSFNCGraphicsMatrix): TPointF;\r\nbegin\r\n Result.X := APoint.X * AMatrix.m11 + APoint.Y * AMatrix.m21 + AMatrix.m31;\r\n Result.Y := APoint.X * AMatrix.m12 + APoint.Y * AMatrix.m22 + AMatrix.m32;\r\nend;\r\n\r\nfunction MatrixMultiply(const AMatrix1, AMatrix2: TTMSFNCGraphicsMatrix): TTMSFNCGraphicsMatrix;\r\nbegin\r\n Result.m11 := AMatrix1.m11 * AMatrix2.m11 + AMatrix1.m12 * AMatrix2.m21 + AMatrix1.m13 * AMatrix2.m31;\r\n Result.m12 := AMatrix1.m11 * AMatrix2.m12 + AMatrix1.m12 * AMatrix2.m22 + AMatrix1.m13 * AMatrix2.m32;\r\n Result.m13 := AMatrix1.m11 * AMatrix2.m13 + AMatrix1.m12 * AMatrix2.m23 + AMatrix1.m13 * AMatrix2.m33;\r\n Result.m21 := AMatrix1.m21 * AMatrix2.m11 + AMatrix1.m22 * AMatrix2.m21 + AMatrix1.m23 * AMatrix2.m31;\r\n Result.m22 := AMatrix1.m21 * AMatrix2.m12 + AMatrix1.m22 * AMatrix2.m22 + AMatrix1.m23 * AMatrix2.m32;\r\n Result.m23 := AMatrix1.m21 * AMatrix2.m13 + AMatrix1.m22 * AMatrix2.m23 + AMatrix1.m23 * AMatrix2.m33;\r\n Result.m31 := AMatrix1.m31 * AMatrix2.m11 + AMatrix1.m32 * AMatrix2.m21 + AMatrix1.m33 * AMatrix2.m31;\r\n Result.m32 := AMatrix1.m31 * AMatrix2.m12 + AMatrix1.m32 * AMatrix2.m22 + AMatrix1.m33 * AMatrix2.m32;\r\n Result.m33 := AMatrix1.m31 * AMatrix2.m13 + AMatrix1.m32 * AMatrix2.m23 + AMatrix1.m33 * AMatrix2.m33;\r\nend;\r\n\r\nfunction ModifyRect(const ARect: TRectF; const ARectMode: TTMSFNCGraphicsModifyRectMode): TRectF;\r\nbegin\r\n Result := ARect;\r\n {$IFDEF FMXWEBLIB}\r\n case ARectMode of\r\n gcrmExpandAll: Result := RectF(int(Result.Left) - 0.5, int(Result.Top) - 0.5, int(Result.Right) + 0.5, int(Result.Bottom) + 0.5);\r\n gcrmShrinkAll: Result := RectF(int(Result.Left) + 0.5, int(Result.Top) + 0.5, int(Result.Right) - 0.5, int(Result.Bottom) - 0.5);\r\n gcrmShiftRightAndExpandHeight: Result := RectF(int(Result.Left) + 0.5, int(Result.Top) - 0.5, int(Result.Right) + 0.5, int(Result.Bottom) + 0.5);\r\n gcrmShiftRightDown: Result := RectF(int(Result.Left) + 0.5, int(Result.Top) + 0.5, int(Result.Right) + 0.5, int(Result.Bottom) + 0.5);\r\n gcrmShiftRightAndShrinkHeight: Result := RectF(int(Result.Left) + 0.5, int(Result.Top) + 0.5, int(Result.Right) + 0.5, int(Result.Bottom) - 0.5);\r\n gcrmShiftDownAndExpandWidth: Result := RectF(int(Result.Left) - 0.5, int(Result.Top) + 0.5, int(Result.Right) + 0.5, int(Result.Bottom) + 0.5);\r\n gcrmShiftUpAndExpandWidth: Result := RectF(int(Result.Left) - 0.5, int(Result.Top) - 0.5, int(Result.Right) + 0.5, int(Result.Bottom) - 0.5);\r\n gcrmShiftRightUp: Result := RectF(Int(Result.Left) + 0.5, Int(Result.Top) - 0.5, Int(Result.Right) + 0.5, Int(Result.Bottom) - 0.5);\r\n gcrmShiftLeftUp: Result := RectF(Int(Result.Left) - 0.5, Int(Result.Top) - 0.5, Int(Result.Right) - 0.5, Int(Result.Bottom) - 0.5);\r\n gcrmShiftLeftDown: Result := RectF(Int(Result.Left) - 0.5, Int(Result.Top) + 0.5, Int(Result.Right) - 0.5, Int(Result.Bottom) + 0.5);\r\n gcrmShiftLeftAndExpandHeight: Result := RectF(int(Result.Left) - 0.5, int(Result.Top) - 0.5, int(Result.Right) - 0.5, int(Result.Bottom) + 0.5);\r\n end;\r\n {$ENDIF}\r\nend;\r\n\r\nfunction ModifyPoint(const APoint: TPointF; const APointMode: TTMSFNCGraphicsModifyPointMode): TPointF;\r\nbegin\r\n Result := APoint;\r\n {$IFDEF FMXWEBLIB}\r\n case APointMode of\r\n gcpmRightDown: Result := PointF(Int(Result.X) + 0.5, Int(Result.Y) + 0.5);\r\n gcpmLeftUp: Result := PointF(Int(Result.X) - 0.5, Int(Result.Y) - 0.5);\r\n gcpmRightUp: Result := PointF(Int(Result.X) + 0.5, Int(Result.Y) - 0.5);\r\n gcpmLeftDown: Result := PointF(Int(Result.X) - 0.5, Int(Result.Y) + 0.5);\r\n end;\r\n {$ENDIF}\r\nend;\r\n\r\nfunction ColorLookup: TTMSFNCGraphicsColorList;\r\nbegin\r\n Result := FColorLookup;\r\nend;\r\n\r\nfunction PolyInRect(APolygon: TTMSFNCGraphicsPathPolygon; ARect: TRectF): Boolean;\r\nvar\r\n I: Integer;\r\nbegin\r\n Result := False;\r\n for I := 0 to Length(APolygon) - 1 do\r\n begin\r\n if PtInRectEx(ARect, APolygon[I]) then\r\n begin\r\n Result := True;\r\n Exit;\r\n end;\r\n end;\r\nend;\r\n\r\nfunction RectInPoly(ARect: TRectF; APolygon: TTMSFNCGraphicsPathPolygon): Boolean;\r\nbegin\r\n Result := PointInPoly(PointF(ARect.Left, ARect.Top), APolygon)\r\n or PointInPoly(PointF(ARect.Right, ARect.Top), APolygon)\r\n or PointInPoly(PointF(ARect.Left, ARect.Bottom), APolygon)\r\n or PointInPoly(PointF(ARect.Right, ARect.Bottom), APolygon);\r\nend;\r\n\r\nfunction PointInPoly(APoint: TPointF; APolygon: TTMSFNCGraphicsPathPolygon): Boolean;\r\nvar\r\n minX, maxX, minY, maxY: Double;\r\n I, J: Integer;\r\n q: TPointF;\r\n pt, ptn: TPointF;\r\n inside, chk: Boolean;\r\n calc: Double;\r\n chkc: Boolean;\r\nbegin\r\n Result := False;\r\n if Length(APolygon) = 0 then\r\n Exit;\r\n\r\n minX := APolygon[0].X;\r\n maxX := APolygon[0].X;\r\n minY := APolygon[0].Y;\r\n maxY := APolygon[0].Y;\r\n\r\n for I := 1 to Length(APolygon) - 1 do\r\n begin\r\n q := APolygon[I];\r\n minX := Min(q.X, minX);\r\n maxX := Max(q.X, maxX);\r\n minY := Min(q.Y, minY);\r\n maxY := Max(q.Y, maxY);\r\n end;\r\n\r\n if (APoint.X < minX) or (APoint.X > maxX) or (APoint.Y < minY) or (APoint.Y > maxY) then\r\n begin\r\n Result := False;\r\n Exit;\r\n end;\r\n\r\n inside := False;\r\n J := Length(APolygon) - 1;\r\n for I := 0 to Length(APolygon) - 1 do\r\n begin\r\n pt := APolygon[I];\r\n ptn := APolygon[J];\r\n chk := (pt.Y > APoint.Y) <> (ptn.Y > APoint.Y);\r\n if (ptn.Y - pt.Y) <> 0 then\r\n begin\r\n calc := (ptn.X - pt.X) * (APoint.Y - pt.Y) / (ptn.Y - pt.Y) + pt.X;\r\n chkc := APoint.X < calc;\r\n if chk and chkc then\r\n inside := not inside;\r\n end;\r\n\r\n j := I;\r\n end;\r\n Result := inside;\r\nend;\r\n\r\nfunction Blend(AColor1: TTMSFNCGraphicsColor; AColor2: TTMSFNCGraphicsColor; ALevel: Byte): TTMSFNCGraphicsColor;\r\nvar\r\n c1, c2: Int64;\r\n r, g, b, v1, v2: byte;\r\nbegin\r\n ALevel := Round(2.55 * ALevel);\r\n {$IFDEF CMNWEBLIB}\r\n c1 := ColorToRGB(AColor1);\r\n c2 := ColorToRGB(AColor2);\r\n {$ENDIF}\r\n {$IFDEF FMXLIB}\r\n c1 := AColor1;\r\n c2 := AColor2;\r\n {$ENDIF}\r\n v1 := Byte(c1);\r\n v2 := Byte(c2);\r\n r := Max(0, Min(255, ALevel * (v1 - v2) shr 8 + v2));\r\n v1 := Byte(c1 shr 8);\r\n v2 := Byte(c2 shr 8);\r\n g := Max(0, Min(255, ALevel * (v1 - v2) shr 8 + v2));\r\n v1 := Byte(c1 shr 16);\r\n v2 := Byte(c2 shr 16);\r\n b := Max(0, Min(255, ALevel * (v1 - v2) shr 8 + v2));\r\n {$IFDEF CMNWEBLIB}\r\n Result := (b shl 16) + (g shl 8) + r;\r\n {$ENDIF}\r\n {$IFDEF FMXLIB}\r\n Result := MakeGraphicsColor(r, g, b);\r\n {$ENDIF}\r\nend;\r\n\r\nfunction Lighter(AColor: TTMSFNCGraphicsColor; APercent: Byte): TTMSFNCGraphicsColor;\r\nvar\r\n r, g, b: Byte;\r\nbegin\r\n {$IFDEF CMNWEBLIB}\r\n AColor := ColorToRGB(AColor);\r\n r := GetRValue(AColor);\r\n g := GetGValue(AColor);\r\n b := GetBValue(AColor);\r\n {$ENDIF}\r\n {$IFDEF FMXLIB}\r\n r := TAlphaColorRec(AColor).R;\r\n g := TAlphaColorRec(AColor).G;\r\n b := TAlphaColorRec(AColor).B;\r\n {$ENDIF}\r\n\r\n {$RANGECHECKS OFF}\r\n r := r + Min(255, TTMSFNCUtils.MulDivInt(255 - r, APercent, 100));\r\n g := g + Min(255, TTMSFNCUtils.MulDivInt(255 - g, APercent, 100));\r\n b := b + Min(255, TTMSFNCUtils.MulDivInt(255 - b, APercent, 100));\r\n {$RANGECHECKS ON}\r\n\r\n {$IFDEF FMXLIB}\r\n Result := MakeGraphicsColor(r, g, b, TAlphaColorRec(AColor).A);\r\n {$ENDIF}\r\n\r\n {$IFDEF CMNWEBLIB}\r\n Result := MakeGraphicsColor(r, g, b);\r\n {$ENDIF}\r\nend;\r\n\r\nfunction Darker(AColor: TTMSFNCGraphicsColor; APercent: Byte): TTMSFNCGraphicsColor;\r\nvar\r\n r, g, b: Byte;\r\nbegin\r\n {$IFDEF CMNWEBLIB}\r\n AColor := ColorToRGB(AColor);\r\n r := GetRValue(AColor);\r\n g := GetGValue(AColor);\r\n b := GetBValue(AColor);\r\n {$ENDIF}\r\n {$IFDEF FMXLIB}\r\n r := TAlphaColorRec(AColor).R;\r\n g := TAlphaColorRec(AColor).G;\r\n b := TAlphaColorRec(AColor).B;\r\n {$ENDIF}\r\n\r\n {$RANGECHECKS OFF}\r\n r := r - Max(0, TTMSFNCUtils.MulDivInt(255 - r, APercent, 100));\r\n g := g - Max(0, TTMSFNCUtils.MulDivInt(255 - g, APercent, 100));\r\n b := b - Max(0, TTMSFNCUtils.MulDivInt(255 - b, APercent, 100));\r\n {$RANGECHECKS ON}\r\n\r\n {$IFDEF FMXLIB}\r\n Result := MakeGraphicsColor(r, g, b, TAlphaColorRec(AColor).A);\r\n {$ENDIF}\r\n\r\n {$IFDEF CMNWEBLIB}\r\n Result := MakeGraphicsColor(r, g, b);\r\n {$ENDIF}\r\nend;\r\n\r\n{$IFDEF CMNWEBLIB}\r\n{$IFDEF WEBLIB}\r\nprocedure DrawGradient(ACanvas: TCanvas; AColor, AColorTo: TColor;\r\n ARect: TRectF; ARounding: Single; ACorners: TTMSFNCGraphicsCorners; ADirection: Boolean);\r\n{$ENDIF}\r\n{$IFNDEF WEBLIB}\r\nprocedure DrawGradient(ACanvas: TCanvas; AColor, AColorTo: TColor;\r\n ARect: TRect; ARounding: Single; ACorners: TTMSFNCGraphicsCorners; ADirection: Boolean);\r\n{$ENDIF}\r\nvar\r\n diffr,startr,endr: Integer;\r\n diffg,startg,endg: Integer;\r\n diffb,startb,endb: Integer;\r\n si: Integer;\r\n rstepr,rstepg,rstepb,rstepw: Single;\r\n i,stepw: Word;\r\n oldp, oldb: TColor;\r\n Steps: Integer;\r\n {$IFDEF WEBLIB}\r\n R, dr: TRectF;\r\n iend: Single;\r\n {$ENDIF}\r\n {$IFNDEF WEBLIB}\r\n R, dr: TRect;\r\n iend: Integer;\r\n {$ENDIF}\r\n a: Single;\r\n oldps: TPenStyle;\r\n oldbs: TBrushStyle;\r\nbegin\r\n R := ARect;\r\n\r\n {$IFDEF WEBLIB}\r\n if ADirection then\r\n Steps := Round(R.Right - R.Left)\r\n else\r\n Steps := Round(R.Bottom - R.Top);\r\n {$ENDIF}\r\n {$IFNDEF WEBLIB}\r\n if ADirection then\r\n Steps := R.Right - R.Left\r\n else\r\n Steps := R.Bottom - R.Top;\r\n {$ENDIF}\r\n\r\n if Steps = 0 then\r\n Steps := 1;\r\n\r\n AColor := ColorToRGB(AColor);\r\n AColorTo := ColorToRGB(AColorTo);\r\n\r\n startr := (AColor and $0000FF);\r\n startg := (AColor and $00FF00) shr 8;\r\n startb := (AColor and $FF0000) shr 16;\r\n\r\n endr := (AColorTo and $0000FF);\r\n endg := (AColorTo and $00FF00) shr 8;\r\n endb := (AColorTo and $FF0000) shr 16;\r\n\r\n diffr := endr - startr;\r\n diffg := endg - startg;\r\n diffb := endb - startb;\r\n\r\n rstepr := diffr / steps;\r\n rstepg := diffg / steps;\r\n rstepb := diffb / steps;\r\n\r\n if ADirection then\r\n rstepw := (R.Right - R.Left) / Steps\r\n else\r\n rstepw := (R.Bottom - R.Top) / Steps;\r\n\r\n with ACanvas do\r\n begin\r\n oldb := Brush.Color;\r\n oldbs := Brush.Style;\r\n oldp := Pen.Color;\r\n oldps := Pen.Style;\r\n Pen.Style := psSolid;\r\n Brush.Style := bsSolid;\r\n for i := 0 to Steps - 1 do\r\n begin\r\n endr := startr + Round(rstepr*i);\r\n endg := startg + Round(rstepg*i);\r\n endb := startb + Round(rstepb*i);\r\n stepw := Round(i*rstepw);\r\n Pen.Color := endr + (endg shl 8) + (endb shl 16);\r\n Brush.Color := Pen.Color;\r\n\r\n if ADirection then\r\n begin\r\n si := Trunc(rstepw);\r\n iend := R.Left + stepw + si;\r\n iend := Min(iend, R.Right);\r\n\r\n dr := r;\r\n\r\n if (I <= ARounding) and ((gcTopLeft in ACorners) or (gcBottomLeft in ACorners)) then\r\n begin\r\n a := SQRT(Power(ARounding, 2) - Power(ARounding - I, 2));\r\n\r\n if (gcTopLeft in ACorners) then\r\n dr.Top := dr.Top + Round(ARounding - a);\r\n\r\n if (gcBottomLeft in ACorners) then\r\n dr.Bottom := dr.Bottom - Round(ARounding - a);\r\n end\r\n else if (I >= Steps - ARounding) and ((gcBottomRight in ACorners) or (gcTopRight in ACorners)) then\r\n begin\r\n a := SQRT(Power(ARounding, 2) - Power(ARounding - (Steps - I), 2));\r\n\r\n if (gcTopRight in ACorners) then\r\n dr.Top := dr.Top + Round(ARounding - a);\r\n\r\n if (gcBottomRight in ACorners) then\r\n dr.Bottom := dr.Bottom - Round(ARounding - a);\r\n end;\r\n\r\n Rectangle(dr.Left + stepw, dr.Top, iend, dr.Bottom)\r\n end\r\n else\r\n begin\r\n si := Trunc(rstepw);\r\n iend := R.Top + stepw + si;\r\n iend := Min(iend, r.Bottom);\r\n\r\n dr := r;\r\n\r\n if (I <= ARounding) and ((gcTopLeft in ACorners) or (gcTopRight in ACorners)) then\r\n begin\r\n a := SQRT(Power(ARounding, 2) - Power(ARounding - I, 2));\r\n\r\n if (gcTopLeft in ACorners) then\r\n dr.Left := dr.Left + Round(ARounding - a);\r\n\r\n if (gcTopRight in ACorners) then\r\n dr.Right := dr.Right - Round(ARounding - a);\r\n end\r\n else if (I >= Steps - ARounding) and ((gcBottomLeft in ACorners) or (gcBottomRight in ACorners)) then\r\n begin\r\n a := SQRT(Power(ARounding, 2) - Power(ARounding - (Steps - I), 2));\r\n\r\n if (gcBottomLeft in ACorners) then\r\n dr.Left := dr.Left + Round(ARounding - a);\r\n\r\n if (gcBottomRight in ACorners) then\r\n dr.Right := dr.Right - Round(ARounding - a);\r\n end;\r\n\r\n Rectangle(dr.Left, dr.Top + stepw, dr.Right, iend);\r\n end;\r\n end;\r\n Brush.Color := oldb;\r\n Brush.Style := oldbs;\r\n Pen.Color := oldp;\r\n Pen.style := oldps;\r\n end;\r\nend;\r\n{$ENDIF}\r\n\r\nfunction MakeGraphicsColor(ARed, AGreen, ABlue: Byte{$IFDEF FMXLIB};AAlpha: Byte = 255{$ENDIF}): TTMSFNCGraphicsColor;\r\nbegin\r\n {$IFDEF FMXLIB}\r\n Result := MakeColor(ARed, AGreen, ABlue, AAlpha);\r\n {$ENDIF}\r\n {$IFDEF VCLLIB}\r\n Result := RGB(ARed, AGreen, ABlue);\r\n {$ENDIF}\r\n {$IFDEF LCLLIB}\r\n Result := RGBToColor(ARed, AGreen, ABlue);\r\n {$ENDIF}\r\n {$IFDEF WEBLIB}\r\n Result := RGB(ARed, AGreen, ABlue);\r\n {$ENDIF}\r\nend;\r\n\r\n{ TTMSFNCGraphicsFont }\r\n\r\nprocedure TTMSFNCGraphicsFont.BeginUpdate;\r\nbegin\r\n Inc(FUpdateCount);\r\nend;\r\n\r\nconstructor TTMSFNCGraphicsFont.Create;\r\nbegin\r\n inherited Create;\r\n {$IFDEF FMXLIB}\r\n FColor := gcBlack;\r\n inherited OnChanged := DoChanged;\r\n {$ENDIF}\r\n {$IFDEF CMNWEBLIB}\r\n Height := -12;\r\n OnChange := @DoChanged;\r\n {$ENDIF}\r\nend;\r\n\r\nprocedure TTMSFNCGraphicsFont.EndUpdate;\r\nbegin\r\n Dec(FUpdateCount);\r\n DoChanged(Self);\r\nend;\r\n\r\n{$IFDEF CMNWEBLIB}\r\n{$IFDEF LCLLIB}\r\nprocedure TTMSFNCGraphicsFont.Changed;\r\nbegin\r\n inherited;\r\n DoChanged(Self);\r\nend;\r\n{$ENDIF}\r\n{$ENDIF}\r\n\r\nprocedure TTMSFNCGraphicsFont.DoChanged(Sender: TObject);\r\nbegin\r\n if Assigned(OnChanged) and (FUpdateCount = 0) then\r\n OnChanged(Self);\r\nend;\r\n\r\nprocedure TTMSFNCGraphicsFont.AssignSource(Source: TPersistent);\r\nbegin\r\n Assign(Source);\r\nend;\r\n\r\nprocedure TTMSFNCGraphicsFont.Assign(Source: TPersistent);\r\nbegin\r\n inherited Assign(Source);\r\n {$IFDEF FMXLIB}\r\n if Source is TTMSFNCGraphicsFont then\r\n FColor := (Source as TTMSFNCGraphicsFont).Color;\r\n {$ENDIF}\r\n DoChanged(Self);\r\nend;\r\n\r\n{$IFDEF FMXLIB}\r\nfunction TTMSFNCGraphicsFont.IsNameStored: Boolean;\r\nbegin\r\n Result := Name <> DefaultFamily;\r\nend;\r\n\r\nprocedure TTMSFNCGraphicsFont.SetName(const Value: string);\r\nbegin\r\n Family := Value;\r\nend;\r\n\r\nfunction TTMSFNCGraphicsFont.GetName: string;\r\nbegin\r\n Result := Family;\r\nend;\r\n\r\nprocedure TTMSFNCGraphicsFont.SetColor(const Value: TTMSFNCGraphicsColor);\r\nbegin\r\n if FColor <> Value then\r\n begin\r\n FColor := Value;\r\n {$IFDEF CMNWEBLIB}\r\n if FColor = clNone then\r\n FColor := gcNull\r\n else if FColor = clDefault then\r\n FColor := clBtnFace;\r\n {$ENDIF}\r\n DoChanged(Self);\r\n end;\r\nend;\r\n\r\n{$ENDIF}\r\n\r\n{ TTMSFNCGraphicsSaveState }\r\n\r\nconstructor TTMSFNCGraphicsSaveState.Create;\r\nbegin\r\n inherited;\r\n FFill := TTMSFNCGraphicsFill.Create;\r\n FStroke := TTMSFNCGraphicsStroke.Create;\r\n FFont := TTMSFNCGraphicsFont.Create;\r\nend;\r\n\r\ndestructor TTMSFNCGraphicsSaveState.Destroy;\r\nbegin\r\n FFill.Free;\r\n FStroke.Free;\r\n FFont.Free;\r\n inherited;\r\nend;\r\n\r\nprocedure TTMSFNCGraphicsSaveState.SetFill(const Value: TTMSFNCGraphicsFill);\r\nbegin\r\n FFill.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCGraphicsSaveState.SetFont(const Value: TTMSFNCGraphicsFont);\r\nbegin\r\n FFont.AssignSource(Value);\r\nend;\r\n\r\nprocedure TTMSFNCGraphicsSaveState.SetStroke(const Value: TTMSFNCGraphicsStroke);\r\nbegin\r\n FStroke.Assign(Value);\r\nend;\r\n\r\n{ TTMSFNCCustomGraphicsFill }\r\n\r\nfunction TTMSFNCCustomGraphicsFill.AddGradientItem(AColor: TTMSFNCGraphicsColor;\r\n APosition, AOpacity: Single): TTMSFNCGraphicsFillGradientItem;\r\nbegin\r\n Result := GradientItems.Add;\r\n Result.Color := AColor;\r\n Result.Position := APosition;\r\n Result.Opacity := AOpacity;\r\nend;\r\n\r\nprocedure TTMSFNCCustomGraphicsFill.Assign(Source: TPersistent);\r\nbegin\r\n if Source is TTMSFNCCustomGraphicsFill then\r\n begin\r\n FColor := (Source as TTMSFNCCustomGraphicsFill).Color;\r\n FColorTo := (Source as TTMSFNCCustomGraphicsFill).ColorTo;\r\n FColorMirror := (Source as TTMSFNCCustomGraphicsFill).ColorMirror;\r\n FColorMirrorTo := (Source as TTMSFNCCustomGraphicsFill).ColorMirrorTo;\r\n FKind := (Source as TTMSFNCCustomGraphicsFill).Kind;\r\n FOrientation := (Source as TTMSFNCCustomGraphicsFill).Orientation;\r\n FOpacity := (Source as TTMSFNCCustomGraphicsFill).Opacity;\r\n FTexture.Assign((Source as TTMSFNCCustomGraphicsFill).Texture);\r\n FTextureMode := (Source as TTMSFNCCustomGraphicsFill).TextureMode;\r\n FGradientMode := (Source as TTMSFNCCustomGraphicsFill).GradientMode;\r\n FGradientAngle := (Source as TTMSFNCCustomGraphicsFill).GradientAngle;\r\n FGradientCenterPoint := (Source as TTMSFNCCustomGraphicsFill).GradientCenterPoint;\r\n FGradientItems.Assign((Source as TTMSFNCCustomGraphicsFill).GradientItems);\r\n FGradientType := (Source as TTMSFNCCustomGraphicsFill).GradientType;\r\n FGradientCenterColor := (Source as TTMSFNCCustomGraphicsFill).GradientCenterColor;\r\n end\r\n else if Source is TTMSFNCCustomGraphicsStroke then\r\n begin\r\n FColor := (Source as TTMSFNCCustomGraphicsStroke).Color;\r\n FColorTo := gcNull;\r\n FColorMirror := gcNull;\r\n FColorMirrorTo := gcNull;\r\n FKind := gfkSolid;\r\n FOrientation := gfoVertical;\r\n FOpacity := 1;\r\n end;\r\n Changed;\r\nend;\r\n\r\nprocedure TTMSFNCCustomGraphicsFill.BeginUpdate;\r\nbegin\r\n inc(FUpdateCount);\r\nend;\r\n\r\nprocedure TTMSFNCCustomGraphicsFill.Changed;\r\nbegin\r\n if Assigned(OnChanged) and (FUpdateCount = 0) then\r\n OnChanged(Self);\r\nend;\r\n\r\nprocedure TTMSFNCCustomGraphicsFill.ClearGradientItems;\r\nbegin\r\n GradientItems.Clear;\r\nend;\r\n\r\nconstructor TTMSFNCCustomGraphicsFill.Create(const AKind: TTMSFNCGraphicsFillKind = gfkSolid; const AColor: TTMSFNCGraphicsColor = gcWhite; const AColorTo: TTMSFNCGraphicsColor = gcGray; const AColorMirror: TTMSFNCGraphicsColor = gcNull; const AColorMirrorTo: TTMSFNCGraphicsColor = gcNull);\r\nbegin\r\n FGradientItems := TTMSFNCGraphicsFillGradientItems.Create(Self);\r\n FKind := AKind;\r\n FDefaultKind := AKind;\r\n FGradientMatrix := MatrixIdentity;\r\n FGradientCenterColor := gcNull;\r\n FGradientMode := gfgmDefault;\r\n FGradientAngle := 0.0;\r\n FGradientCenterPoint := PointF(0, 0);\r\n FGradientType := gfgtLinear;\r\n FColor := AColor;\r\n FDefaultColor := AColor;\r\n FOpacity := 1;\r\n FOrientation := gfoVertical;\r\n FColorTo := AColorTo;\r\n FColorMirror := AColorMirror;\r\n FColorMirrorTo := AColorMirrorto;\r\n FDefaultColorTo := AColorTo;\r\n FDefaultColorMirror := AColorMirror;\r\n FDefaultColorMirrorTo := AColorMirrorTo;\r\n FTextureMode := gtmStretch;\r\n FTexture := TTMSFNCBitmap.Create;\r\n FTexture.OnChange := @TextureChanged;\r\nend;\r\n\r\ndestructor TTMSFNCCustomGraphicsFill.Destroy;\r\nbegin\r\n FTexture.Free;\r\n FGradientItems.Free;\r\n inherited;\r\nend;\r\n\r\nprocedure TTMSFNCCustomGraphicsFill.EndUpdate;\r\nbegin\r\n Dec(FUpdateCount);\r\n Changed;\r\nend;\r\n\r\nprocedure TTMSFNCCustomGraphicsFill.SetColor(const Value: TTMSFNCGraphicsColor);\r\nbegin\r\n if FColor <> Value then\r\n begin\r\n FColor := Value;\r\n {$IFDEF CMNWEBLIB}\r\n if FColor = clNone then\r\n FColor := gcNull\r\n else if FColor = clDefault then\r\n FColor := clBtnFace;\r\n {$ENDIF}\r\n Changed;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomGraphicsFill.SetColorTo(const Value: TTMSFNCGraphicsColor);\r\nbegin\r\n if FColorTo <> Value then\r\n begin\r\n FColorTo := Value;\r\n {$IFDEF CMNWEBLIB}\r\n if FColorTo = clNone then\r\n FColorTo := gcNull\r\n else if FColorTo = clDefault then\r\n FColorTo := clBtnFace;\r\n {$ENDIF}\r\n Changed;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomGraphicsFill.SetGradientAngle(const Value: Single);\r\nbegin\r\n if FGradientAngle <> Value then\r\n begin\r\n FGradientAngle := Value;\r\n Changed;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomGraphicsFill.SetGradientCenterColor(\r\n const Value: TTMSFNCGraphicsColor);\r\nbegin\r\n if FGradientCenterColor <> Value then\r\n begin\r\n FGradientCenterColor := Value;\r\n Changed;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomGraphicsFill.SetGradientCenterPoint(\r\n const Value: TPointF);\r\nbegin\r\n FGradientCenterPoint := Value;\r\n Changed;\r\nend;\r\n\r\nprocedure TTMSFNCCustomGraphicsFill.SetGradientItems(\r\n const Value: TTMSFNCGraphicsFillGradientItems);\r\nbegin\r\n FGradientItems.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCCustomGraphicsFill.SetGradientMode(\r\n const Value: TTMSFNCGraphicsFillGradientMode);\r\nbegin\r\n if FGradientMode <> Value then\r\n begin\r\n FGradientMode := Value;\r\n Changed;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomGraphicsFill.SetGradientType(\r\n const Value: TTMSFNCGraphicsFillGradientType);\r\nbegin\r\n if FGradientType <> Value then\r\n begin\r\n FGradientType := Value;\r\n Changed;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomGraphicsFill.SetColorMirror(const Value: TTMSFNCGraphicsColor);\r\nbegin\r\n if FColorMirror <> Value then\r\n begin\r\n FColorMirror := Value;\r\n {$IFDEF CMNWEBLIB}\r\n if FColorMirror = clNone then\r\n FColorMirror := gcNull\r\n else if FColorMirror = clDefault then\r\n FColorMirror := clBtnFace;\r\n {$ENDIF}\r\n Changed;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomGraphicsFill.SetColorMirrorTo(const Value: TTMSFNCGraphicsColor);\r\nbegin\r\n if FColorMirrorTo <> Value then\r\n begin\r\n FColorMirrorTo := Value;\r\n {$IFDEF CMNWEBLIB}\r\n if FColorMirrorTo = clNone then\r\n FColorMirrorTo := gcNull\r\n else if FColorMirrorTo = clDefault then\r\n FColorMirrorTo := clBtnFace;\r\n {$ENDIF}\r\n Changed;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomGraphicsFill.SetKind(const Value: TTMSFNCGraphicsFillKind);\r\nbegin\r\n if FKind <> Value then\r\n begin\r\n FKind := Value;\r\n Changed;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomGraphicsFill.SetOrientation(const Value: TTMSFNCGraphicsFillOrientation);\r\nbegin\r\n if FOrientation <> Value then\r\n begin\r\n FOrientation := Value;\r\n Changed;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomGraphicsFill.SetTexture(const Value: TTMSFNCBitmap);\r\nbegin\r\n if FTexture <> Value then\r\n begin\r\n FTexture.Assign(Value);\r\n Changed;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomGraphicsFill.SetTextureMode(\r\n const Value: TTMSFNCGraphicsTextureMode);\r\nbegin\r\n if FTextureMode <> Value then\r\n begin\r\n FTextureMode := Value;\r\n Changed;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomGraphicsFill.TextureChanged(Sender: TObject);\r\nbegin\r\n Changed;\r\nend;\r\n\r\nprocedure TTMSFNCCustomGraphicsFill.SetOpacity(const Value: Single);\r\nbegin\r\n if FOpacity <> Value then\r\n begin\r\n FOpacity := Value;\r\n Changed;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCCustomGraphicsFill.IsColorMirrorStored: Boolean;\r\nbegin\r\n Result := ColorMirror <> FDefaultColorMirror;\r\nend;\r\n\r\nfunction TTMSFNCCustomGraphicsFill.IsColorMirrorToStored: Boolean;\r\nbegin\r\n Result := ColorMirrorTo <> FDefaultColorMirrorTo;\r\nend;\r\n\r\nfunction TTMSFNCCustomGraphicsFill.IsColorStored: Boolean;\r\nbegin\r\n Result := Color <> FDefaultColor;\r\nend;\r\n\r\nfunction TTMSFNCCustomGraphicsFill.IsColorToStored: Boolean;\r\nbegin\r\n Result := ColorTo <> FDefaultColorTo;\r\nend;\r\n\r\nfunction TTMSFNCCustomGraphicsFill.IsGradientAngleStored: Boolean;\r\nbegin\r\n Result := GradientAngle <> 0;\r\nend;\r\n\r\nfunction TTMSFNCCustomGraphicsFill.IsKindStored: Boolean;\r\nbegin\r\n Result := Kind <> FDefaultKind;\r\nend;\r\n\r\nfunction TTMSFNCCustomGraphicsFill.IsOpacityStored: Boolean;\r\nbegin\r\n Result := Opacity <> 1;\r\nend;\r\n\r\n{ TTMSFNCGraphicsFillGradientItems }\r\n\r\nfunction TTMSFNCGraphicsFillGradientItems.Add: TTMSFNCGraphicsFillGradientItem;\r\nbegin\r\n Result := TTMSFNCGraphicsFillGradientItem(inherited Add);\r\nend;\r\n\r\nconstructor TTMSFNCGraphicsFillGradientItems.Create(AOwner: TTMSFNCCustomGraphicsFill);\r\nbegin\r\n inherited Create(AOwner, GetGradientClass);\r\n FOwner := AOwner;\r\nend;\r\n\r\nfunction TTMSFNCGraphicsFillGradientItems.GetGradientClass: TCollectionItemClass;\r\nbegin\r\n Result := TTMSFNCGraphicsFillGradientItem;\r\nend;\r\n\r\nfunction TTMSFNCGraphicsFillGradientItems.GetItemEx(Index: Integer): TTMSFNCGraphicsFillGradientItem;\r\nbegin\r\n Result := TTMSFNCGraphicsFillGradientItem(inherited Items[Index]);\r\nend;\r\n\r\nfunction TTMSFNCGraphicsFillGradientItems.Insert(index: Integer): TTMSFNCGraphicsFillGradientItem;\r\nbegin\r\n Result := TTMSFNCGraphicsFillGradientItem(inherited Insert(Index));\r\nend;\r\n\r\nprocedure TTMSFNCGraphicsFillGradientItems.SetItemEx(Index: Integer; const Value: TTMSFNCGraphicsFillGradientItem);\r\nbegin\r\n inherited SetItem(Index, Value);\r\nend;\r\n\r\nprocedure TTMSFNCGraphicsFillGradientItems.UpdateGradient;\r\nbegin\r\n if Assigned(FOwner) then\r\n FOwner.Changed;\r\nend;\r\n\r\n{ TTMSFNCCustomGraphicsStroke }\r\n\r\nprocedure TTMSFNCCustomGraphicsStroke.Assign(Source: TPersistent);\r\nbegin\r\n if Source is TTMSFNCCustomGraphicsStroke then\r\n begin\r\n FColor := (Source as TTMSFNCCustomGraphicsStroke).Color;\r\n FKind := (Source as TTMSFNCCustomGraphicsStroke).Kind;\r\n FOpacity := (Source as TTMSFNCCustomGraphicsStroke).Opacity;\r\n FWidth := (Source as TTMSFNCCustomGraphicsStroke).Width;\r\n end\r\n else if Source is TTMSFNCCustomGraphicsFill then\r\n begin\r\n FColor := (Source as TTMSFNCCustomGraphicsFill).Color;\r\n FKind := gskSolid;\r\n FOpacity := 1;\r\n FWidth := 1;\r\n end;\r\n Changed;\r\nend;\r\n\r\nprocedure TTMSFNCCustomGraphicsStroke.BeginUpdate;\r\nbegin\r\n Inc(FUpdateCount);\r\nend;\r\n\r\nprocedure TTMSFNCCustomGraphicsStroke.Changed;\r\nbegin\r\n if Assigned(OnChanged) and (FUpdateCount = 0) then\r\n OnChanged(Self);\r\nend;\r\n\r\nconstructor TTMSFNCCustomGraphicsStroke.Create(const AKind: TTMSFNCGraphicsStrokeKind = gskSolid; const AColor: TTMSFNCGraphicsColor = gcSilver);\r\nbegin\r\n FKind := AKind;\r\n FDefaultKind := AKind;\r\n FColor := AColor;\r\n FDefaultColor := AColor;\r\n FOpacity := 1;\r\n FWidth := 1;\r\nend;\r\n\r\nprocedure TTMSFNCCustomGraphicsStroke.EndUpdate;\r\nbegin\r\n Dec(FUpdateCount);\r\n Changed;\r\nend;\r\n\r\nfunction TTMSFNCCustomGraphicsStroke.IsWidthStored: Boolean;\r\nbegin\r\n Result := Width <> 1;\r\nend;\r\n\r\nprocedure TTMSFNCCustomGraphicsStroke.SetColor(const Value: TTMSFNCGraphicsColor);\r\nbegin\r\n if FColor <> Value then\r\n begin\r\n FColor := Value;\r\n {$IFDEF CMNWEBLIB}\r\n if FColor = clNone then\r\n FColor := gcNull\r\n else if FColor = clDefault then\r\n FColor := clBtnFace;\r\n {$ENDIF}\r\n Changed;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomGraphicsStroke.SetKind(const Value: TTMSFNCGraphicsStrokeKind);\r\nbegin\r\n if FKind <> Value then\r\n begin\r\n FKind := Value;\r\n Changed;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomGraphicsStroke.SetOpacity(const Value: Single);\r\nbegin\r\n if FOpacity <> Value then\r\n begin\r\n FOpacity := Value;\r\n Changed;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCCustomGraphicsStroke.IsColorStored: Boolean;\r\nbegin\r\n Result := Color <> FDefaultColor;\r\nend;\r\n\r\nfunction TTMSFNCCustomGraphicsStroke.IsKindStored: Boolean;\r\nbegin\r\n Result := Kind <> FDefaultKind;\r\nend;\r\n\r\nfunction TTMSFNCCustomGraphicsStroke.IsOpacityStored: Boolean;\r\nbegin\r\n Result := Opacity <> 1;\r\nend;\r\n\r\nprocedure TTMSFNCCustomGraphicsStroke.SetWidth(const Value: Single);\r\nbegin\r\n if FWidth <> Value then\r\n begin\r\n FWidth := Value;\r\n Changed;\r\n end;\r\nend;\r\n\r\n{ TTMSFNCGraphicsPath }\r\n\r\nconstructor TTMSFNCGraphicsPath.Create;\r\nbegin\r\n inherited Create;\r\n FPoints := TTMSFNCGraphicsPathPoints.Create;\r\nend;\r\n\r\ndestructor TTMSFNCGraphicsPath.Destroy;\r\nbegin\r\n FPoints.Free;\r\n inherited;\r\nend;\r\n\r\nprocedure TTMSFNCGraphicsPath.Assign(Source: TPersistent);\r\nvar\r\n I: Integer;\r\nbegin\r\n if Source is TTMSFNCGraphicsPath then\r\n begin\r\n FPoints.Count := TTMSFNCGraphicsPath(Source).Count;\r\n for I := 0 to TTMSFNCGraphicsPath(Source).Count - 1 do\r\n FPoints[I] := TTMSFNCGraphicsPath(Source)[I];\r\n end\r\n else\r\n inherited\r\nend;\r\n\r\nfunction TTMSFNCGraphicsPath.GetBounds: TRectF;\r\nconst\r\n SmallAmount = 0.001;\r\nvar\r\n I: Integer;\r\n pt: TTMSFNCGraphicsPathPoint;\r\nbegin\r\n if PathData.Count < 1 then\r\n Exit(RectF(0, 0, 0, 0));\r\n Result := RectF($FFFF, $FFFF, -$FFFF, -$FFFF);\r\n for I := 0 to PathData.Count - 1 do\r\n begin\r\n pt := PathData[I];\r\n if pt.Kind = TTMSFNCGraphicsPathPointKind.gppClose then\r\n Continue;\r\n\r\n if pt.Point.X < Result.Left then\r\n Result.Left := pt.Point.X;\r\n if pt.Point.X > Result.Right then\r\n Result.Right := pt.Point.X;\r\n if pt.Point.Y < Result.Top then\r\n Result.Top := pt.Point.Y;\r\n if pt.Point.Y > Result.Bottom then\r\n Result.Bottom := pt.Point.Y;\r\n end;\r\n // add small amount\r\n {$IFDEF WEBLIB}\r\n if SameValue(Result.Right - Result.Left, 0, SmallAmount) then\r\n Result.Right := Result.Left + SmallAmount;\r\n if SameValue(Result.Bottom - Result.Top, 0, SmallAmount) then\r\n Result.Bottom := Result.Top + SmallAmount;\r\n {$ENDIF}\r\n {$IFNDEF WEBLIB}\r\n if SameValue(Result.Width, 0, SmallAmount) then\r\n Result.Right := Result.Left + SmallAmount;\r\n if SameValue(Result.Height, 0, SmallAmount) then\r\n Result.Bottom := Result.Top + SmallAmount;\r\n {$ENDIF}\r\nend;\r\n\r\nfunction TTMSFNCGraphicsPath.GetCount: Integer;\r\nbegin\r\n Result := FPoints.Count;\r\nend;\r\n\r\nfunction TTMSFNCGraphicsPath.GetPoint(AIndex: Integer): TTMSFNCGraphicsPathPoint;\r\nbegin\r\n Result := TTMSFNCGraphicsPathPoint(FPoints[AIndex]);\r\nend;\r\n\r\nfunction TTMSFNCGraphicsPath.IsClippable: Boolean;\r\nbegin\r\n Result := FClippable;\r\nend;\r\n\r\nfunction TTMSFNCGraphicsPath.IsPointVisible(const P: TPointF): Boolean;\r\nvar\r\n pt: TTMSFNCGraphicsPathPolygon;\r\nbegin\r\n SetLength(pt, 0);\r\n FlattenToPolygon(pt);\r\n Result := PointInPoly(p, pt);\r\nend;\r\n\r\nfunction TTMSFNCGraphicsPath.IsRectVisible(const R: TRectF): Boolean;\r\nvar\r\n pt: TTMSFNCGraphicsPathPolygon;\r\nbegin\r\n SetLength(pt, 0);\r\n FlattenToPolygon(pt);\r\n Result := PolyInRect(pt, R);\r\nend;\r\n\r\nfunction TTMSFNCGraphicsPath.LastPoint: TPointF;\r\nbegin\r\n if Count > 0 then\r\n Result := FPoints[FPoints.Count - 1].Point\r\n else\r\n begin\r\n Result := PointF(0, 0);\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCGraphicsPath.MoveTo(const P: TPointF);\r\nvar\r\n pt: TTMSFNCGraphicsPathPoint;\r\nbegin\r\n pt.Kind := gppMoveTo;\r\n pt.Point := p;\r\n FPoints.Add(pt);\r\n FStartPoint := FPoints[FPoints.Count - 1].Point;\r\nend;\r\n\r\nprocedure TTMSFNCGraphicsPath.LineTo(const P: TPointF);\r\nvar\r\n pt: TTMSFNCGraphicsPathPoint;\r\nbegin\r\n pt.Kind := gppLineTo;\r\n pt.Point := p;\r\n FPoints.Add(pt);\r\n if (P.X = FStartPoint.X) and (P.Y = FStartPoint.Y) then\r\n FClippable := True;\r\nend;\r\n\r\nprocedure TTMSFNCGraphicsPath.QuadCurveTo(const ControlPoint, EndPoint: TPointF);\r\nconst\r\n OneThird = 1 / 3;\r\n TwoThirds = 2 / 3;\r\nvar\r\n LP, CP1, CP2: TPointF;\r\nbegin\r\n LP := LastPoint;\r\n CP1.X := OneThird * LP.X + TwoThirds * ControlPoint.X;\r\n CP1.Y := OneThird * LP.Y + TwoThirds * ControlPoint.Y;\r\n CP2.X := TwoThirds * ControlPoint.X + OneThird * EndPoint.X;\r\n CP2.Y := TwoThirds * ControlPoint.Y + OneThird * EndPoint.Y;\r\n CurveTo(CP1, CP2, EndPoint);\r\nend;\r\n\r\nprocedure TTMSFNCGraphicsPath.CurveTo(const ControlPoint1, ControlPoint2, EndPoint: TPointF);\r\nvar\r\n pt: TTMSFNCGraphicsPathPoint;\r\nbegin\r\n pt.Kind := gppCurveTo;\r\n pt.Point := ControlPoint1;\r\n FPoints.Add(pt);\r\n pt.Kind := gppCurveTo;\r\n pt.Point := ControlPoint2;\r\n FPoints.Add(pt);\r\n pt.Kind := gppCurveTo;\r\n pt.Point := EndPoint;\r\n FPoints.Add(pt);\r\nend;\r\n\r\nprocedure TTMSFNCGraphicsPath.SmoothCurveTo(const ControlPoint2, EndPoint: TPointF);\r\nvar\r\n ControlPoint1: TPointF;\r\nbegin\r\n if Count > 2 then\r\n begin\r\n ControlPoint1.X := LastPoint.X + (LastPoint.X - FPoints[FPoints.Count - 2].Point.X);\r\n ControlPoint1.Y := LastPoint.Y + (LastPoint.Y - FPoints[FPoints.Count - 2].Point.Y);\r\n end\r\n else\r\n ControlPoint1 := ControlPoint2;\r\n CurveTo(ControlPoint1, ControlPoint2, EndPoint);\r\nend;\r\n\r\nprocedure TTMSFNCGraphicsPath.ClosePath;\r\nvar\r\n pt: TTMSFNCGraphicsPathPoint;\r\nbegin\r\n pt.Kind := gppClose;\r\n pt.Point := FStartPoint;\r\n FPoints.Add(pt);\r\n FClippable := True;\r\nend;\r\n\r\nprocedure TTMSFNCGraphicsPath.AddPath(APath: TTMSFNCGraphicsPath);\r\nvar\r\n I: Integer;\r\nbegin\r\n FPoints.Capacity := FPoints.Count + APath.Count;\r\n for I := 0 to APath.Count - 1 do\r\n FPoints.Add(APath.Points[I]);\r\nend;\r\n\r\nprocedure TTMSFNCGraphicsPath.AddPolygon(\r\n const APolygon: TTMSFNCGraphicsPathPolygon);\r\nvar\r\n I: Integer;\r\nbegin\r\n for I := 0 to Length(APolygon) - 1 do\r\n LineTo(APolygon[I]);\r\nend;\r\n\r\nprocedure TTMSFNCGraphicsPath.Clear;\r\nbegin\r\n FPoints.Clear;\r\nend;\r\n\r\nprocedure TTMSFNCGraphicsPath.CalculateBezierCoefficients(const Bezier: TTMSFNCGraphicsPathCubicBezier; out AX, BX, CX, AY, BY, CY: Double);\r\nbegin\r\n CX := 3 * (Bezier[1].X - Bezier[0].X);\r\n CY := 3 * (Bezier[1].Y - Bezier[0].Y);\r\n BX := 3 * (Bezier[2].X - Bezier[1].X) - CX;\r\n BY := 3 * (Bezier[2].Y - Bezier[1].Y) - CY;\r\n AX := Bezier[3].X - Bezier[0].X - CX - BX;\r\n AY := Bezier[3].Y - Bezier[0].Y - CY - BY;\r\nend;\r\n\r\nfunction TTMSFNCGraphicsPath.PointOnBezier(const StartPoint: TPointF; const AX, BX, CX, AY, BY, CY, T: Double): TPointF;\r\nvar\r\n SquareT, CubeT: Single;\r\nbegin\r\n SquareT := T * T;\r\n CubeT := SquareT * T;\r\n Result.X := (AX * CubeT) + (BX * SquareT) + (CX * T) + StartPoint.X;\r\n Result.Y := (AY * CubeT) + (BY * SquareT) + (CY * T) + StartPoint.Y;\r\nend;\r\n\r\nfunction TTMSFNCGraphicsPath.CreateBezier(const Bezier: TTMSFNCGraphicsPathCubicBezier; const PointCount: Integer): TTMSFNCGraphicsPathPolygon;\r\nvar\r\n AX, BX, CX, AY, BY, CY, DT, T: Double;\r\n I: Integer;\r\nbegin\r\n if PointCount = 0 then\r\n Exit;\r\n DT := 1 / (1 * PointCount - 1);\r\n T := 0;\r\n SetLength(Result, PointCount);\r\n CalculateBezierCoefficients(Bezier, AX, BX, CX, AY, BY, CY);\r\n for I := 0 to PointCount - 1 do\r\n begin\r\n Result[I] := PointOnBezier(Bezier[0], AX, BX, CX, AY, BY, CY, T);\r\n T := T + DT;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCGraphicsPath.Flatten(const Flatness: Single);\r\nvar\r\n J, I: Integer;\r\n BPts: TTMSFNCGraphicsPathPolygon;\r\n B: TTMSFNCGraphicsPathCubicBezier;\r\n F, Len: Single;\r\n SegCount: Integer;\r\n OldPathData: TTMSFNCGraphicsPathPoints;\r\n CurPoint: TPointF;\r\n x: TPointF;\r\nbegin\r\n if FPoints.Count > 0 then\r\n begin\r\n F := Max(Flatness, 0.05);\r\n OldPathData := TTMSFNCGraphicsPathPoints.Create;\r\n try\r\n OldPathData.Count := FPoints.Count;\r\n for J := 0 to FPoints.Count - 1 do\r\n OldPathData.Add(FPoints[J]);\r\n FPoints.Clear;\r\n J := 0;\r\n while J < OldPathData.Count do\r\n begin\r\n case OldPathData[J].Kind of\r\n gppMoveTo:\r\n begin\r\n MoveTo(OldPathData[J].Point);\r\n CurPoint := OldPathData[J].Point;\r\n end;\r\n gppLineTo:\r\n begin\r\n LineTo(OldPathData[J].Point);\r\n CurPoint := OldPathData[J].Point;\r\n end;\r\n gppCurveTo:\r\n begin\r\n B[0] := CurPoint;\r\n B[1] := OldPathData[J].Point;\r\n Inc(J);\r\n B[2] := OldPathData[J].Point;\r\n Inc(J);\r\n B[3] := OldPathData[J].Point;\r\n BPts := CreateBezier(B, 6);\r\n Len := 0;\r\n for I := 0 to High(BPts) - 1 do\r\n begin\r\n x.X := BPts[I].X - BPts[I + 1].X;\r\n x.Y := BPts[I].Y - BPts[I + 1].Y;\r\n Len := Len + GetPointLength(x);\r\n end;\r\n SegCount := Round(Len / F);\r\n if SegCount < 2 then\r\n LineTo(B[3])\r\n else\r\n begin\r\n BPts := CreateBezier(B, SegCount);\r\n for I := 0 to High(BPts) do\r\n LineTo(BPts[I]);\r\n CurPoint := OldPathData[J].Point;\r\n end;\r\n end;\r\n gppClose:\r\n ClosePath;\r\n end;\r\n Inc(J);\r\n end;\r\n finally\r\n OldPathData.Free;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCGraphicsPath.FlattenToPolygon(var Polygon: TTMSFNCGraphicsPathPolygon; const Flatness: Single = 0.25);\r\n\r\n procedure AddPoint(const P: TPointF);\r\n begin\r\n if (Length(Polygon) > 0) and (SameValue(P.X, Polygon[High(Polygon)].X, PathPosition) and SameValue(P.Y,\r\n Polygon[High(Polygon)].Y, PathPosition)) then\r\n Exit;\r\n SetLength(Polygon, Length(Polygon) + 1);\r\n Polygon[High(Polygon)] := P;\r\n end;\r\n\r\nvar\r\n J, I: Integer;\r\n BPts: TTMSFNCGraphicsPathPolygon;\r\n B: TTMSFNCGraphicsPathCubicBezier;\r\n SP, CurPoint, X: TPointF;\r\n F, Len: Single;\r\n SegCount: Integer;\r\nbegin\r\n SetLength(Polygon, 0);\r\n if FPoints.Count > 0 then\r\n begin\r\n F := Max(Flatness, 0.05);\r\n J := 0;\r\n while J < FPoints.Count do\r\n begin\r\n case FPoints[J].Kind of\r\n gppMoveTo:\r\n begin\r\n AddPoint(FPoints[J].Point);\r\n CurPoint := FPoints[J].Point;\r\n SP := CurPoint;\r\n end;\r\n gppLineTo:\r\n begin\r\n AddPoint(FPoints[J].Point);\r\n CurPoint := FPoints[J].Point;\r\n end;\r\n gppCurveTo:\r\n begin\r\n B[0] := CurPoint;\r\n B[1] := FPoints[J].Point;\r\n Inc(J);\r\n B[2] := FPoints[J].Point;\r\n Inc(J);\r\n B[3] := FPoints[J].Point;\r\n BPts := CreateBezier(B, 6);\r\n Len := 0;\r\n for I := 0 to High(BPts) - 1 do\r\n begin\r\n x.X := BPts[I].X - BPts[I + 1].X;\r\n x.Y := BPts[I].Y - BPts[I + 1].Y;\r\n Len := Len + GetPointLength(x);\r\n end;\r\n SegCount := Round(Len / F);\r\n if SegCount < 2 then\r\n begin\r\n AddPoint(B[0]);\r\n AddPoint(B[3]);\r\n end\r\n else\r\n begin\r\n BPts := CreateBezier(B, SegCount);\r\n for I := 0 to High(BPts) do\r\n AddPoint(BPts[I]);\r\n end;\r\n CurPoint := FPoints[J].Point;\r\n end;\r\n gppClose:\r\n begin\r\n AddPoint(SP);\r\n end;\r\n end;\r\n Inc(J);\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCGraphicsPath.AddEllipse(const ARect: TRectF);\r\nvar\r\n CX, CY, PX, PY: Single;\r\n c: Single;\r\nbegin\r\n c := 0.5522847498;\r\n CX := (ARect.Left + ARect.Right) / 2;\r\n CY := (ARect.Top + ARect.Bottom) / 2;\r\n PX := c * ((ARect.Right - ARect.Left) / 2);\r\n PY := c * ((ARect.Bottom - ARect.Top) / 2);\r\n MoveTo(PointF(ARect.Left, CY));\r\n CurveTo(PointF(ARect.Left, CY - PY), PointF(CX - PX, ARect.Top), PointF(CX, ARect.Top));\r\n CurveTo(PointF(CX + PX, ARect.Top), PointF(ARect.Right, CY - PY), PointF(ARect.Right, CY));\r\n CurveTo(PointF(ARect.Right, CY + PY), PointF(CX + PX, ARect.Bottom), PointF(CX, ARect.Bottom));\r\n CurveTo(PointF(CX - PX, ARect.Bottom), PointF(ARect.Left, CY + PY), PointF(ARect.Left, CY));\r\n FClippable := True;\r\nend;\r\n\r\nprocedure TTMSFNCGraphicsPath.AddLine(const StartPoint, EndPoint: TPointF);\r\nbegin\r\n if Count = 0 then\r\n MoveTo(StartPoint)\r\n else\r\n LineTo(StartPoint);\r\n\r\n LineTo(EndPoint);\r\nend;\r\n\r\nprocedure TTMSFNCGraphicsPath.AddRectangle(const ARect: TRectF; ARoundingX: Single = 0.0; ARoundingY: Single = 0.0; ACorners: TTMSFNCGraphicsCorners = [gcTopLeft, gcTopRight, gcBottomLeft, gcBottomRight]);\r\nbegin\r\n if (ARoundingX = 0.0) and (ARoundingY = 0.0) then\r\n begin\r\n MoveTo(PointF(ARect.Left, ARect.Top));\r\n LineTo(PointF(ARect.Right, ARect.Top));\r\n LineTo(PointF(ARect.Right, ARect.Bottom));\r\n LineTo(PointF(ARect.Left, ARect.Bottom));\r\n end\r\n else\r\n begin\r\n if gcBottomLeft in ACorners then\r\n begin\r\n MoveTo(PointF(ARect.Left + ARoundingX, ARect.Bottom));\r\n AddArc(PointF(ARect.Left + ARoundingX, ARect.Bottom - ARoundingY), PointF(ARoundingX, ARoundingY), -270, 90);\r\n LineTo(PointF(ARect.Left, ARect.Bottom - ARoundingY));\r\n end\r\n else\r\n begin\r\n MoveTo(PointF(ARect.Left, ARect.Bottom));\r\n end;\r\n\r\n if gcTopLeft in ACorners then\r\n begin\r\n LineTo(PointF(ARect.Left, ARect.Top + ARoundingY));\r\n AddArc(PointF(ARect.Left + ARoundingX, ARect.Top + ARoundingY), PointF(ARoundingX, ARoundingY), -180, 90);\r\n LineTo(PointF(ARect.Left + ARoundingX, ARect.Top));\r\n end\r\n else\r\n LineTo(PointF(ARect.Left, ARect.Top));\r\n\r\n if gcTopRight in ACorners then\r\n begin\r\n LineTo(PointF(ARect.Right - ARoundingX, ARect.Top));\r\n AddArc(PointF(ARect.Right - ARoundingX, ARect.Top + ARoundingY), PointF(ARoundingX, ARoundingY), -90, 90);\r\n LineTo(PointF(ARect.Right, ARect.Top + ARoundingY));\r\n end\r\n else\r\n LineTo(PointF(ARect.Right, ARect.Top));\r\n\r\n if gcBottomRight in ACorners then\r\n begin\r\n LineTo(PointF(ARect.Right, ARect.Bottom - ARoundingY));\r\n AddArc(PointF(ARect.Right - ARoundingX, ARect.Bottom - ARoundingY), PointF(ARoundingX, ARoundingY), 0, 90);\r\n LineTo(PointF(ARect.Right - ARoundingX, ARect.Bottom));\r\n end\r\n else\r\n LineTo(PointF(ARect.Right, ARect.Bottom));\r\n\r\n if gcBottomLeft in ACorners then\r\n LineTo(PointF(ARect.Left + ARoundingX, ARect.Bottom))\r\n else\r\n LineTo(PointF(ARect.Left, ARect.Bottom));\r\n end;\r\n\r\n ClosePath;\r\n FClippable := True;\r\nend;\r\n\r\nprocedure TTMSFNCGraphicsPath.ApplyMatrix(AMatrix: TTMSFNCGraphicsMatrix);\r\nvar\r\n I: Integer;\r\n pt: TTMSFNCGraphicsPathPoint;\r\nbegin\r\n if PathData.Count > 0 then\r\n begin\r\n for I := 0 to PathData.Count - 1 do\r\n begin\r\n if PathData[I].Kind in [TTMSFNCGraphicsPathPointKind.gppMoveTo, TTMSFNCGraphicsPathPointKind.gppLineTo, TTMSFNCGraphicsPathPointKind.gppCurveTo] then\r\n begin\r\n pt := PathData[I];\r\n pt.Point := MatrixMultiply(pt.Point, AMatrix);\r\n PathData[I] := pt;\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure DrawArcWithBezier(Path: TTMSFNCGraphicsPath; CenterX, CenterY, RadiusX, RadiusY, StartAngle, SweepRange: Single;\r\n UseMoveTo: Boolean);\r\nvar\r\n Coord: array of TPointF;\r\n Pts: array of TPointF;\r\n A, X, Y: Single;\r\n {$IFDEF LCLLIB}\r\n C, B, CC, SS: Extended;\r\n {$ELSE}\r\n C, B, CC, SS: Single;\r\n {$ENDIF}\r\n I: Integer;\r\nbegin\r\n if SweepRange = 0 then\r\n begin\r\n if UseMoveTo then\r\n begin\r\n if Path.FPoints.Count < 1 then\r\n Path.MoveTo(PointF(CenterX + RadiusX * Cos(StartAngle), CenterY - RadiusY * Sin(StartAngle)))\r\n else\r\n Path.LineTo(PointF(CenterX + RadiusX * Cos(StartAngle), CenterY - RadiusY * Sin(StartAngle)));\r\n end;\r\n Path.LineTo(PointF(CenterX + RadiusX * Cos(StartAngle), CenterY - RadiusY * Sin(StartAngle)));\r\n Exit;\r\n end;\r\n {$IFDEF WEBLIB}\r\n B := Sin(SweepRange / 2);\r\n C := Cos(SweepRange / 2);\r\n {$ENDIF}\r\n {$IFNDEF WEBLIB}\r\n SinCos(SweepRange / 2, B, C);\r\n {$ENDIF}\r\n A := 1 - C;\r\n X := A * 4 / 3;\r\n Y := B - X * C / B;\r\n {$IFDEF WEBLIB}\r\n SS := Sin(StartAngle + SweepRange / 2);\r\n CC := Cos(StartAngle + SweepRange / 2);\r\n {$ENDIF}\r\n {$IFNDEF WEBLIB}\r\n SinCos(StartAngle + SweepRange / 2, SS, CC);\r\n {$ENDIF}\r\n SetLength(Coord, 4);\r\n Coord[0] := PointF(C, -B);\r\n Coord[1] := PointF(C + X, -Y);\r\n Coord[2] := PointF(C + X, Y);\r\n Coord[3] := PointF(C, B);\r\n SetLength(Pts, 4);\r\n for I := 0 to 3 do\r\n begin\r\n Pts[I] := PointF(CenterX + RadiusX * (Coord[I].X * CC - Coord[I].Y * SS), CenterY + RadiusY * (Coord[I].X *\r\n SS + Coord[I].Y * CC));\r\n end;\r\n if UseMoveTo then\r\n begin\r\n if Path.FPoints.Count < 1 then\r\n Path.MoveTo(Pts[0])\r\n else\r\n Path.LineTo(Pts[0]);\r\n end;\r\n Path.CurveTo(Pts[1], Pts[2], Pts[3]);\r\nend;\r\n\r\nprocedure TTMSFNCGraphicsPath.AddArc(const Center, Radius: TPointF; StartAngle, SweepAngle: Single);\r\nconst\r\n BezierArcAngleEpsilon = 0.01;\r\n MinSweepAngle = 1E-10;\r\nvar\r\n UseMoveTo: Boolean;\r\n I: Integer;\r\n F: Single;\r\n TotalSweep, LocalSweep, PrevSweep: Single;\r\n Done: Boolean;\r\nbegin\r\n StartAngle := DegToRad(StartAngle);\r\n SweepAngle := DegToRad(SweepAngle);\r\n I := Trunc(StartAngle / (2 * Pi));\r\n F := StartAngle - (I * 2 * Pi);\r\n StartAngle := F;\r\n if SweepAngle >= 2 * Pi then\r\n SweepAngle := 2 * Pi;\r\n if SweepAngle <= -2 * Pi then\r\n SweepAngle := -2 * Pi;\r\n if Abs(SweepAngle) < MinSweepAngle then\r\n Exit;\r\n TotalSweep := 0;\r\n Done := False;\r\n UseMoveTo := True;\r\n repeat\r\n if SweepAngle < 0 then\r\n begin\r\n PrevSweep := TotalSweep;\r\n LocalSweep := -Pi / 2;\r\n TotalSweep := TotalSweep - (Pi / 2);\r\n if TotalSweep <= SweepAngle + BezierArcAngleEpsilon then\r\n begin\r\n LocalSweep := SweepAngle - PrevSweep;\r\n Done := True;\r\n end;\r\n end\r\n else\r\n begin\r\n PrevSweep := TotalSweep;\r\n LocalSweep := Pi / 2;\r\n TotalSweep := TotalSweep + (Pi / 2);\r\n if TotalSweep >= SweepAngle - BezierArcAngleEpsilon then\r\n begin\r\n LocalSweep := SweepAngle - PrevSweep;\r\n Done := True;\r\n end;\r\n end;\r\n DrawArcWithBezier(Self, Center.X, Center.Y, Radius.X, Radius.Y, StartAngle, LocalSweep, UseMoveTo);\r\n UseMoveTo := False;\r\n StartAngle := StartAngle + LocalSweep;\r\n until Done;\r\nend;\r\n\r\n{ TTMSFNCGraphicsPathPoint }\r\n\r\n{$IFDEF LCLLIB}\r\nclass operator TTMSFNCGraphicsPathPoint.=(z1, z2: TTMSFNCGraphicsPathPoint)b: boolean;\r\nbegin\r\n Result := z1 = z2;\r\nend;\r\n{$ENDIF}\r\n\r\n{$IFNDEF WEBLIB}\r\n\r\n{ TTMSFNCGraphicsMatrix }\r\n\r\nclass function TTMSFNCGraphicsMatrix.CreateRotation(const AAngle: Single): TTMSFNCGraphicsMatrix;\r\nvar\r\n S, C: Single;\r\nbegin\r\n S := Sin(AAngle);\r\n C := Cos(AAngle);\r\n Result := Identity;\r\n Result.m11 := C;\r\n Result.m12 := S;\r\n Result.m21 := -S;\r\n Result.m22 := C;\r\nend;\r\n\r\nclass function TTMSFNCGraphicsMatrix.CreateScaling(const AScaleX, AScaleY: Single): TTMSFNCGraphicsMatrix;\r\nbegin\r\n Result := Identity;\r\n Result.m11 := AScaleX;\r\n Result.m22 := AScaleY;\r\nend;\r\n\r\nclass function TTMSFNCGraphicsMatrix.CreateTranslation(const ADeltaX, ADeltaY: Single): TTMSFNCGraphicsMatrix;\r\nbegin\r\n Result := Identity;\r\n Result.m31 := ADeltaX;\r\n Result.m32 := ADeltaY;\r\nend;\r\n\r\nfunction TTMSFNCGraphicsMatrix.Scale(const AFactor: Single): TTMSFNCGraphicsMatrix;\r\nvar\r\n I: Integer;\r\nbegin\r\n for I := 0 to 2 do\r\n begin\r\n Result.M[I].V[0] := Self.M[I].V[0] * AFactor;\r\n Result.M[I].V[1] := Self.M[I].V[1] * AFactor;\r\n Result.M[I].V[2] := Self.M[I].V[2] * AFactor;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCGraphicsMatrix.Determinant: Single;\r\nbegin\r\n Result := Self.M[0].V[0] * (Self.M[1].V[1] * Self.M[2].V[2] - Self.M[2].V[1] * Self.M[1].V[2]) - Self.M[0].V[1]\r\n * (Self.M[1].V[0] * Self.M[2].V[2] - Self.M[2].V[0] * Self.M[1].V[2]) + Self.M[0].V[2] * (Self.M[1].V[0]\r\n * Self.M[2].V[1] - Self.M[2].V[0] * Self.M[1].V[1]);\r\nend;\r\n\r\nfunction TTMSFNCGraphicsMatrix.Adjoint: TTMSFNCGraphicsMatrix;\r\nvar\r\n a1, a2, a3, b1, b2, b3, c1, c2, c3: Single;\r\nbegin\r\n a1 := Self.M[0].V[0];\r\n a2 := Self.M[0].V[1];\r\n a3 := Self.M[0].V[2];\r\n b1 := Self.M[1].V[0];\r\n b2 := Self.M[1].V[1];\r\n b3 := Self.M[1].V[2];\r\n c1 := Self.M[2].V[0];\r\n c2 := Self.M[2].V[1];\r\n c3 := Self.M[2].V[2];\r\n\r\n Result.M[0].V[0] := (b2 * c3 - c2 * b3);\r\n Result.M[1].V[0] := -(b1 * c3 - c1 * b3);\r\n Result.M[2].V[0] := (b1 * c2 - c1 * b2);\r\n\r\n Result.M[0].V[1] := -(a2 * c3 - c2 * a3);\r\n Result.M[1].V[1] := (a1 * c3 - c1 * a3);\r\n Result.M[2].V[1] := -(a1 * c2 - c1 * a2);\r\n\r\n Result.M[0].V[2] := (a2 * b3 - b2 * a3);\r\n Result.M[1].V[2] := -(a1 * b3 - b1 * a3);\r\n Result.M[2].V[2] := (a1 * b2 - b1 * a2);\r\nend;\r\n\r\nclass function TTMSFNCGraphicsMatrix.Identity: TTMSFNCGraphicsMatrix;\r\nbegin\r\n Result.m11 := 1;\r\n Result.m12 := 0;\r\n Result.m13 := 0;\r\n Result.m21 := 0;\r\n Result.m22 := 1;\r\n Result.m23 := 0;\r\n Result.m31 := 0;\r\n Result.m32 := 0;\r\n Result.m33 := 1;\r\nend;\r\n\r\nfunction TTMSFNCGraphicsMatrix.Inverse: TTMSFNCGraphicsMatrix;\r\nconst\r\n DefaultValue: TTMSFNCGraphicsMatrix = (m11: 1.0; m12: 0.0; m13: 0.0; m21: 0.0; m22: 1.0; m23: 0.0; m31: 0.0; m32: 0.0; m33: 1.0);\r\nvar\r\n Det: Single;\r\nbegin\r\n Det := Self.Determinant;\r\n if Abs(Det) < Epsilon then\r\n Result := DefaultValue\r\n else\r\n Result:= Self.Adjoint.Scale(1 / Det);\r\nend;\r\n\r\n{$IFDEF LCLLIB}\r\nclass operator TTMSFNCGraphicsMatrix.*(const APoint: TPointF;\r\n const AMatrix: TTMSFNCGraphicsMatrix): TPointF;\r\n{$ENDIF}\r\n{$IFNDEF LCLLIB}\r\nclass operator TTMSFNCGraphicsMatrix.Multiply(const APoint: TPointF;\r\n const AMatrix: TTMSFNCGraphicsMatrix): TPointF;\r\n{$ENDIF}\r\nbegin\r\n Result.X := APoint.X * AMatrix.M[0].V[0] + APoint.Y * AMatrix.M[1].V[0]\r\n + AMatrix.M[2].V[0];\r\n Result.Y := APoint.X * AMatrix.M[0].V[1] + APoint.Y * AMatrix.M[1].V[1]\r\n + AMatrix.M[2].V[1];\r\nend;\r\n\r\n{$IFDEF LCLLIB}\r\nclass operator TTMSFNCGraphicsMatrix.*(const AMatrix1, AMatrix2: TTMSFNCGraphicsMatrix): TTMSFNCGraphicsMatrix;\r\n{$ENDIF}\r\n{$IFNDEF LCLLIB}\r\nclass operator TTMSFNCGraphicsMatrix.Multiply(const AMatrix1, AMatrix2: TTMSFNCGraphicsMatrix): TTMSFNCGraphicsMatrix;\r\n{$ENDIF}\r\nbegin\r\n Result.m11 := AMatrix1.m11 * AMatrix2.m11 + AMatrix1.m12 * AMatrix2.m21 + AMatrix1.m13 * AMatrix2.m31;\r\n Result.m12 := AMatrix1.m11 * AMatrix2.m12 + AMatrix1.m12 * AMatrix2.m22 + AMatrix1.m13 * AMatrix2.m32;\r\n Result.m13 := AMatrix1.m11 * AMatrix2.m13 + AMatrix1.m12 * AMatrix2.m23 + AMatrix1.m13 * AMatrix2.m33;\r\n Result.m21 := AMatrix1.m21 * AMatrix2.m11 + AMatrix1.m22 * AMatrix2.m21 + AMatrix1.m23 * AMatrix2.m31;\r\n Result.m22 := AMatrix1.m21 * AMatrix2.m12 + AMatrix1.m22 * AMatrix2.m22 + AMatrix1.m23 * AMatrix2.m32;\r\n Result.m23 := AMatrix1.m21 * AMatrix2.m13 + AMatrix1.m22 * AMatrix2.m23 + AMatrix1.m23 * AMatrix2.m33;\r\n Result.m31 := AMatrix1.m31 * AMatrix2.m11 + AMatrix1.m32 * AMatrix2.m21 + AMatrix1.m33 * AMatrix2.m31;\r\n Result.m32 := AMatrix1.m31 * AMatrix2.m12 + AMatrix1.m32 * AMatrix2.m22 + AMatrix1.m33 * AMatrix2.m32;\r\n Result.m33 := AMatrix1.m31 * AMatrix2.m13 + AMatrix1.m32 * AMatrix2.m23 + AMatrix1.m33 * AMatrix2.m33;\r\nend;\r\n{$ENDIF}\r\n\r\n{$IFDEF WEBLIB}\r\nfunction TTMSFNCGraphicsPathPoints.GetItem(Index: Integer): TTMSFNCGraphicsPathPoint;\r\nbegin\r\n Result := TTMSFNCGraphicsPathPoint(inherited Items[Index]);\r\nend;\r\n\r\nprocedure TTMSFNCGraphicsPathPoints.SetItem(Index: Integer; const Value: TTMSFNCGraphicsPathPoint);\r\nvar\r\n v: TTMSFNCGraphicsPathPoint;\r\nbegin\r\n v := Value;\r\n inherited Items[Index] := v;\r\nend;\r\n{$ENDIF}\r\n\r\n{ TTMSFNCGraphicsColorObject }\r\n\r\nconstructor TTMSFNCGraphicsColorObject.Create(AColor: TTMSFNCGraphicsColor);\r\nbegin\r\n FColor := AColor;\r\nend;\r\n\r\n{ TTMSFNCGraphicsFillGradientItem }\r\n\r\nprocedure TTMSFNCGraphicsFillGradientItem.Assign(Source: TPersistent);\r\nbegin\r\n if Source is TTMSFNCGraphicsFillGradientItem then\r\n begin\r\n FColor := (Source as TTMSFNCGraphicsFillGradientItem).Color;\r\n FOpacity := (Source as TTMSFNCGraphicsFillGradientItem).Opacity;\r\n FPosition := (Source as TTMSFNCGraphicsFillGradientItem).Position;\r\n end\r\n else\r\n inherited;\r\nend;\r\n\r\nconstructor TTMSFNCGraphicsFillGradientItem.Create(ACollection: TCollection);\r\nbegin\r\n inherited;\r\n FColor := gcWhite;\r\n FPosition := 0.0;\r\n FOpacity := 1.0;\r\nend;\r\n\r\nfunction TTMSFNCGraphicsFillGradientItem.IsOpacityStored: Boolean;\r\nbegin\r\n Result := Opacity <> 1.0;\r\nend;\r\n\r\nfunction TTMSFNCGraphicsFillGradientItem.IsPositionStored: Boolean;\r\nbegin\r\n Result := Position <> 0.0;\r\nend;\r\n\r\nprocedure TTMSFNCGraphicsFillGradientItem.SetColor(\r\n const Value: TTMSFNCGraphicsColor);\r\nbegin\r\n if FColor <> Value then\r\n begin\r\n FColor := Value;\r\n UpdateGradient;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCGraphicsFillGradientItem.SetOpacity(const Value: Single);\r\nbegin\r\n if FOpacity <> Value then\r\n begin\r\n FOpacity := Value;\r\n UpdateGradient;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCGraphicsFillGradientItem.SetPosition(const Value: Single);\r\nbegin\r\n if FPosition <> Value then\r\n begin\r\n FPosition := Value;\r\n UpdateGradient;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCGraphicsFillGradientItem.UpdateGradient;\r\nbegin\r\n if (Collection is TTMSFNCGraphicsFillGradientItems) then\r\n (Collection as TTMSFNCGraphicsFillGradientItems).UpdateGradient;\r\nend;\r\n\r\n{ TTMSFNCAppearanceGlobalFont }\r\n\r\nconstructor TTMSFNCAppearanceGlobalFont.Create(AOwner: TPersistent);\r\nbegin\r\n FOwner := AOwner;\r\n FColor := gcNull;\r\n FSize := 0;\r\n FScale := 1;\r\n FName := '';\r\n FStyle := [];\r\nend;\r\n\r\ndestructor TTMSFNCAppearanceGlobalFont.Destroy;\r\nbegin\r\n inherited;\r\nend;\r\n\r\nfunction TTMSFNCAppearanceGlobalFont.GetOldScale: Double;\r\nbegin\r\n Result := FOldScale;\r\nend;\r\n\r\nfunction TTMSFNCAppearanceGlobalFont.IsNameStored: Boolean;\r\nbegin\r\n Result := Name <> '';\r\nend;\r\n\r\nfunction TTMSFNCAppearanceGlobalFont.IsScaleStored: Boolean;\r\nbegin\r\n Result := Scale <> 1;\r\nend;\r\n\r\nfunction TTMSFNCAppearanceGlobalFont.IsSizeStored: Boolean;\r\nbegin\r\n Result := Size <> 0;\r\nend;\r\n\r\nfunction TTMSFNCAppearanceGlobalFont.IsStyleStored: Boolean;\r\nbegin\r\n Result := Style <> [];\r\nend;\r\n\r\nprocedure TTMSFNCAppearanceGlobalFont.Assign(Source: TPersistent);\r\nbegin\r\n if (Source is TTMSFNCAppearanceGlobalFont) then\r\n begin\r\n Color := (Source as TTMSFNCAppearanceGlobalFont).Color;\r\n Size := (Source as TTMSFNCAppearanceGlobalFont).Size;\r\n Name := (Source as TTMSFNCAppearanceGlobalFont).Name;\r\n Scale := (Source as TTMSFNCAppearanceGlobalFont).Scale;\r\n Style := (Source as TTMSFNCAppearanceGlobalFont).Style;\r\n end\r\n else\r\n inherited;\r\nend;\r\n\r\nprocedure TTMSFNCAppearanceGlobalFont.SetColor(const Value: TTMSFNCGraphicsColor);\r\nbegin\r\n if FColor <> Value then\r\n begin\r\n FColor := Value;\r\n\r\n SetFonts(aftColor);\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCAppearanceGlobalFont.SetSize(const Value: Single);\r\nbegin\r\n if FSize <> Value then\r\n begin\r\n FSize := Value;\r\n\r\n SetFonts(aftSize);\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCAppearanceGlobalFont.SetName(const Value: String);\r\nbegin\r\n if FName <> Value then\r\n begin\r\n FName := Value;\r\n\r\n SetFonts(aftName);\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCAppearanceGlobalFont.SetScale(const Value: Double);\r\nbegin\r\n if FScale <> Value then\r\n begin\r\n FOldScale := FScale;\r\n FScale := Value;\r\n\r\n SetFonts(aftScale);\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCAppearanceGlobalFont.SetStyle(const Value: TFontStyles);\r\nbegin\r\n if FStyle <> Value then\r\n begin\r\n FStyle := Value;\r\n\r\n SetFonts(aftStyle);\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCAppearanceGlobalFont.ApplyChange(AFont: TTMSFNCGraphicsFont; ASetType: TTMSFNCAppearanceGlobalFontType);\r\nbegin\r\n if Assigned(AFont) then\r\n begin\r\n case ASetType of\r\n aftColor: AFont.Color := FColor;\r\n aftSize: AFont.Size := {$IFNDEF FMXLIB}Round({$ENDIF}FSize{$IFNDEF FMXLIB}){$ENDIF};\r\n aftName: AFont.Name := FName;\r\n aftScale:\r\n begin\r\n {$IFDEF FMXLIB}\r\n AFont.Size := Round(AFont.Size * FScale / FOldScale);\r\n {$ENDIF}\r\n {$IFNDEF FMXLIB}\r\n AFont.Height := Round(AFont.Height * FScale / FOldScale);\r\n {$ENDIF}\r\n end;\r\n aftStyle: AFont.Style := FStyle;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCAppearanceGlobalFont.SetFonts(ASetType: TTMSFNCAppearanceGlobalFontType);\r\nvar\r\n fi: ITMSFNCAppearanceGlobalFont;\r\nbegin\r\n if Supports(FOwner, ITMSFNCAppearanceGlobalFont, fi) then\r\n fi.SetFonts(ASetType)\r\n else\r\n begin\r\n //Algemeen font zoek algoritme\r\n end;\r\nend;\r\n\r\n{$IFDEF LCLWEBLIB}\r\n\r\n{ TTMSFNCGraphicsColorList }\r\n\r\nprocedure TTMSFNCGraphicsColorList.AddOrSetValue(AKey: string;\r\n AValue: TTMSFNCGraphicsColorObject);\r\nvar\r\n I: Integer;\r\n it: TObject;\r\nbegin\r\n it := nil;\r\n for I := 0 to Count - 1 do\r\n begin\r\n if AKey = Self[I] then\r\n begin\r\n it := Objects[I];\r\n Break;\r\n end;\r\n end;\r\n\r\n if not Assigned(it) then\r\n begin\r\n AddObject(AKey, AValue);\r\n end\r\n else\r\n Objects[I] := AValue;\r\nend;\r\n\r\nfunction TTMSFNCGraphicsColorList.TryGetValue(AKey: string;\r\n var AValue: TTMSFNCGraphicsColorObject): Boolean;\r\nvar\r\n I: Integer;\r\nbegin\r\n Result := False;\r\n for I := 0 to Count - 1 do\r\n begin\r\n if AKey = Self[I] then\r\n begin\r\n AValue := Objects[I] as TTMSFNCGraphicsColorObject;\r\n Result := True;\r\n Break;\r\n end;\r\n end;\r\nend;\r\n\r\n{$ENDIF}\r\n\r\ninitialization\r\nbegin\r\n FColorLookup := TTMSFNCGraphicsColorList.Create{$IFNDEF LCLWEBLIB}([doOwnsValues]){$ENDIF};\r\n FColorLookup.AddOrSetValue('aliceblue', TTMSFNCGraphicsColorObject.Create(gcaliceblue));\r\n FColorLookup.AddOrSetValue('antiquewhite', TTMSFNCGraphicsColorObject.Create(gcantiquewhite));\r\n FColorLookup.AddOrSetValue('aqua', TTMSFNCGraphicsColorObject.Create(gcaqua));\r\n FColorLookup.AddOrSetValue('aquamarine', TTMSFNCGraphicsColorObject.Create(gcaquamarine));\r\n FColorLookup.AddOrSetValue('azure', TTMSFNCGraphicsColorObject.Create(gcazure));\r\n FColorLookup.AddOrSetValue('beige', TTMSFNCGraphicsColorObject.Create(gcbeige));\r\n FColorLookup.AddOrSetValue('bisque', TTMSFNCGraphicsColorObject.Create(gcbisque));\r\n FColorLookup.AddOrSetValue('black', TTMSFNCGraphicsColorObject.Create(gcblack));\r\n FColorLookup.AddOrSetValue('blanchedalmond', TTMSFNCGraphicsColorObject.Create(gcblanchedalmond));\r\n FColorLookup.AddOrSetValue('blue', TTMSFNCGraphicsColorObject.Create(gcblue));\r\n FColorLookup.AddOrSetValue('blueviolet', TTMSFNCGraphicsColorObject.Create(gcblueviolet));\r\n FColorLookup.AddOrSetValue('brown', TTMSFNCGraphicsColorObject.Create(gcbrown));\r\n FColorLookup.AddOrSetValue('burlywood', TTMSFNCGraphicsColorObject.Create(gcburlywood));\r\n FColorLookup.AddOrSetValue('cadetblue', TTMSFNCGraphicsColorObject.Create(gccadetblue));\r\n FColorLookup.AddOrSetValue('chartreuse', TTMSFNCGraphicsColorObject.Create(gcchartreuse));\r\n FColorLookup.AddOrSetValue('chocolate', TTMSFNCGraphicsColorObject.Create(gcchocolate));\r\n FColorLookup.AddOrSetValue('coral', TTMSFNCGraphicsColorObject.Create(gccoral));\r\n FColorLookup.AddOrSetValue('cornflowerblue', TTMSFNCGraphicsColorObject.Create(gccornflowerblue));\r\n FColorLookup.AddOrSetValue('cornsilk', TTMSFNCGraphicsColorObject.Create(gccornsilk));\r\n FColorLookup.AddOrSetValue('crimson', TTMSFNCGraphicsColorObject.Create(gccrimson));\r\n FColorLookup.AddOrSetValue('cyan', TTMSFNCGraphicsColorObject.Create(gccyan));\r\n FColorLookup.AddOrSetValue('darkblue', TTMSFNCGraphicsColorObject.Create(gcdarkblue));\r\n FColorLookup.AddOrSetValue('darkcyan', TTMSFNCGraphicsColorObject.Create(gcdarkcyan));\r\n FColorLookup.AddOrSetValue('darkgoldenrod', TTMSFNCGraphicsColorObject.Create(gcdarkgoldenrod));\r\n FColorLookup.AddOrSetValue('darkgray', TTMSFNCGraphicsColorObject.Create(gcdarkgray));\r\n FColorLookup.AddOrSetValue('darkgreen', TTMSFNCGraphicsColorObject.Create(gcdarkgreen));\r\n FColorLookup.AddOrSetValue('darkgrey', TTMSFNCGraphicsColorObject.Create(gcdarkgrey));\r\n FColorLookup.AddOrSetValue('darkkhaki', TTMSFNCGraphicsColorObject.Create(gcdarkkhaki));\r\n FColorLookup.AddOrSetValue('darkmagenta', TTMSFNCGraphicsColorObject.Create(gcdarkmagenta));\r\n FColorLookup.AddOrSetValue('darkolivegreen', TTMSFNCGraphicsColorObject.Create(gcdarkolivegreen));\r\n FColorLookup.AddOrSetValue('darkorange', TTMSFNCGraphicsColorObject.Create(gcdarkorange));\r\n FColorLookup.AddOrSetValue('darkorchid', TTMSFNCGraphicsColorObject.Create(gcdarkorchid));\r\n FColorLookup.AddOrSetValue('darkred', TTMSFNCGraphicsColorObject.Create(gcdarkred));\r\n FColorLookup.AddOrSetValue('darksalmon', TTMSFNCGraphicsColorObject.Create(gcdarksalmon));\r\n FColorLookup.AddOrSetValue('darkseagreen', TTMSFNCGraphicsColorObject.Create(gcdarkseagreen));\r\n FColorLookup.AddOrSetValue('darkslateblue', TTMSFNCGraphicsColorObject.Create(gcdarkslateblue));\r\n FColorLookup.AddOrSetValue('darkslategray', TTMSFNCGraphicsColorObject.Create(gcdarkslategray));\r\n FColorLookup.AddOrSetValue('darkslategrey', TTMSFNCGraphicsColorObject.Create(gcdarkslategrey));\r\n FColorLookup.AddOrSetValue('darkturquoise', TTMSFNCGraphicsColorObject.Create(gcdarkturquoise));\r\n FColorLookup.AddOrSetValue('darkviolet', TTMSFNCGraphicsColorObject.Create(gcdarkviolet));\r\n FColorLookup.AddOrSetValue('deeppink', TTMSFNCGraphicsColorObject.Create(gcdeeppink));\r\n FColorLookup.AddOrSetValue('deepskyblue', TTMSFNCGraphicsColorObject.Create(gcdeepskyblue));\r\n FColorLookup.AddOrSetValue('dimgray', TTMSFNCGraphicsColorObject.Create(gcdimgray));\r\n FColorLookup.AddOrSetValue('dimgrey', TTMSFNCGraphicsColorObject.Create(gcdimgrey));\r\n FColorLookup.AddOrSetValue('dodgerblue', TTMSFNCGraphicsColorObject.Create(gcdodgerblue));\r\n FColorLookup.AddOrSetValue('firebrick', TTMSFNCGraphicsColorObject.Create(gcfirebrick));\r\n FColorLookup.AddOrSetValue('floralwhite', TTMSFNCGraphicsColorObject.Create(gcfloralwhite));\r\n FColorLookup.AddOrSetValue('forestgreen', TTMSFNCGraphicsColorObject.Create(gcforestgreen));\r\n FColorLookup.AddOrSetValue('fuchsia', TTMSFNCGraphicsColorObject.Create(gcfuchsia));\r\n FColorLookup.AddOrSetValue('gainsboro', TTMSFNCGraphicsColorObject.Create(gcgainsboro));\r\n FColorLookup.AddOrSetValue('ghostwhite', TTMSFNCGraphicsColorObject.Create(gcghostwhite));\r\n FColorLookup.AddOrSetValue('gold', TTMSFNCGraphicsColorObject.Create(gcgold));\r\n FColorLookup.AddOrSetValue('goldenrod', TTMSFNCGraphicsColorObject.Create(gcgoldenrod));\r\n FColorLookup.AddOrSetValue('gray', TTMSFNCGraphicsColorObject.Create(gcgray));\r\n FColorLookup.AddOrSetValue('green', TTMSFNCGraphicsColorObject.Create(gcgreen));\r\n FColorLookup.AddOrSetValue('greenyellow', TTMSFNCGraphicsColorObject.Create(gcgreenyellow));\r\n FColorLookup.AddOrSetValue('grey', TTMSFNCGraphicsColorObject.Create(gcgrey));\r\n FColorLookup.AddOrSetValue('honeydew', TTMSFNCGraphicsColorObject.Create(gchoneydew));\r\n FColorLookup.AddOrSetValue('hotpink', TTMSFNCGraphicsColorObject.Create(gchotpink));\r\n FColorLookup.AddOrSetValue('indianred', TTMSFNCGraphicsColorObject.Create(gcindianred));\r\n FColorLookup.AddOrSetValue('indigo', TTMSFNCGraphicsColorObject.Create(gcindigo));\r\n FColorLookup.AddOrSetValue('ivory', TTMSFNCGraphicsColorObject.Create(gcivory));\r\n FColorLookup.AddOrSetValue('khaki', TTMSFNCGraphicsColorObject.Create(gckhaki));\r\n FColorLookup.AddOrSetValue('lavender', TTMSFNCGraphicsColorObject.Create(gcLavender));\r\n FColorLookup.AddOrSetValue('lavenderblush', TTMSFNCGraphicsColorObject.Create(gcLavenderblush));\r\n FColorLookup.AddOrSetValue('lawngreen', TTMSFNCGraphicsColorObject.Create(gcLawngreen));\r\n FColorLookup.AddOrSetValue('lemonchiffon', TTMSFNCGraphicsColorObject.Create(gclemonchiffon));\r\n FColorLookup.AddOrSetValue('lightblue', TTMSFNCGraphicsColorObject.Create(gclightblue));\r\n FColorLookup.AddOrSetValue('lightcoral', TTMSFNCGraphicsColorObject.Create(gclightcoral));\r\n FColorLookup.AddOrSetValue('lightcyan', TTMSFNCGraphicsColorObject.Create(gclightcyan));\r\n FColorLookup.AddOrSetValue('lightgoldenrodyellow', TTMSFNCGraphicsColorObject.Create(gclightgoldenrodyellow));\r\n FColorLookup.AddOrSetValue('lightgray', TTMSFNCGraphicsColorObject.Create(gclightgray));\r\n FColorLookup.AddOrSetValue('lightgreen', TTMSFNCGraphicsColorObject.Create(gclightgreen));\r\n FColorLookup.AddOrSetValue('lightgrey', TTMSFNCGraphicsColorObject.Create(gclightgrey));\r\n FColorLookup.AddOrSetValue('lightpink', TTMSFNCGraphicsColorObject.Create(gclightpink));\r\n FColorLookup.AddOrSetValue('lightsalmon', TTMSFNCGraphicsColorObject.Create(gclightsalmon));\r\n FColorLookup.AddOrSetValue('lightseagreen', TTMSFNCGraphicsColorObject.Create(gclightseagreen));\r\n FColorLookup.AddOrSetValue('lightskyblue', TTMSFNCGraphicsColorObject.Create(gclightskyblue));\r\n FColorLookup.AddOrSetValue('lightslategray', TTMSFNCGraphicsColorObject.Create(gclightslategray));\r\n FColorLookup.AddOrSetValue('lightslategrey', TTMSFNCGraphicsColorObject.Create(gclightslategrey));\r\n FColorLookup.AddOrSetValue('lightsteelblue', TTMSFNCGraphicsColorObject.Create(gclightsteelblue));\r\n FColorLookup.AddOrSetValue('lightyellow', TTMSFNCGraphicsColorObject.Create(gclightyellow));\r\n FColorLookup.AddOrSetValue('lime', TTMSFNCGraphicsColorObject.Create(gclime));\r\n FColorLookup.AddOrSetValue('limegreen', TTMSFNCGraphicsColorObject.Create(gclimegreen));\r\n FColorLookup.AddOrSetValue('linen', TTMSFNCGraphicsColorObject.Create(gclinen));\r\n FColorLookup.AddOrSetValue('magenta', TTMSFNCGraphicsColorObject.Create(gcmagenta));\r\n FColorLookup.AddOrSetValue('maroon', TTMSFNCGraphicsColorObject.Create(gcmaroon));\r\n FColorLookup.AddOrSetValue('mediumaquamarine', TTMSFNCGraphicsColorObject.Create(gcmediumaquamarine));\r\n FColorLookup.AddOrSetValue('mediumblue', TTMSFNCGraphicsColorObject.Create(gcmediumblue));\r\n FColorLookup.AddOrSetValue('mediumorchid', TTMSFNCGraphicsColorObject.Create(gcmediumorchid));\r\n FColorLookup.AddOrSetValue('mediumpurple', TTMSFNCGraphicsColorObject.Create(gcmediumpurple));\r\n FColorLookup.AddOrSetValue('mediumseagreen', TTMSFNCGraphicsColorObject.Create(gcmediumseagreen));\r\n FColorLookup.AddOrSetValue('mediumslateblue', TTMSFNCGraphicsColorObject.Create(gcmediumslateblue));\r\n FColorLookup.AddOrSetValue('mediumspringgreen', TTMSFNCGraphicsColorObject.Create(gcmediumspringgreen));\r\n FColorLookup.AddOrSetValue('mediumturquoise', TTMSFNCGraphicsColorObject.Create(gcmediumturquoise));\r\n FColorLookup.AddOrSetValue('mediumvioletred', TTMSFNCGraphicsColorObject.Create(gcmediumvioletred));\r\n FColorLookup.AddOrSetValue('midnightblue', TTMSFNCGraphicsColorObject.Create(gcmidnightblue));\r\n FColorLookup.AddOrSetValue('mintcream', TTMSFNCGraphicsColorObject.Create(gcmintcream));\r\n FColorLookup.AddOrSetValue('mistyrose', TTMSFNCGraphicsColorObject.Create(gcmistyrose));\r\n FColorLookup.AddOrSetValue('moccasin', TTMSFNCGraphicsColorObject.Create(gcmoccasin));\r\n FColorLookup.AddOrSetValue('navajowhite', TTMSFNCGraphicsColorObject.Create(gcnavajowhite));\r\n FColorLookup.AddOrSetValue('navy', TTMSFNCGraphicsColorObject.Create(gcnavy));\r\n FColorLookup.AddOrSetValue('oldlace', TTMSFNCGraphicsColorObject.Create(gcoldlace));\r\n FColorLookup.AddOrSetValue('olive', TTMSFNCGraphicsColorObject.Create(gcolive));\r\n FColorLookup.AddOrSetValue('olivedrab', TTMSFNCGraphicsColorObject.Create(gcolivedrab));\r\n FColorLookup.AddOrSetValue('orange', TTMSFNCGraphicsColorObject.Create(gcorange));\r\n FColorLookup.AddOrSetValue('orangered', TTMSFNCGraphicsColorObject.Create(gcorangered));\r\n FColorLookup.AddOrSetValue('orchid', TTMSFNCGraphicsColorObject.Create(gcorchid));\r\n FColorLookup.AddOrSetValue('palegoldenrod', TTMSFNCGraphicsColorObject.Create(gcpalegoldenrod));\r\n FColorLookup.AddOrSetValue('palegreen', TTMSFNCGraphicsColorObject.Create(gcpalegreen));\r\n FColorLookup.AddOrSetValue('paleturquoise', TTMSFNCGraphicsColorObject.Create(gcpaleturquoise));\r\n FColorLookup.AddOrSetValue('palevioletred', TTMSFNCGraphicsColorObject.Create(gcpalevioletred));\r\n FColorLookup.AddOrSetValue('papayawhip', TTMSFNCGraphicsColorObject.Create(gcpapayawhip));\r\n FColorLookup.AddOrSetValue('peachpuff', TTMSFNCGraphicsColorObject.Create(gcpeachpuff));\r\n FColorLookup.AddOrSetValue('peru', TTMSFNCGraphicsColorObject.Create(gcperu));\r\n FColorLookup.AddOrSetValue('pink', TTMSFNCGraphicsColorObject.Create(gcpink));\r\n FColorLookup.AddOrSetValue('plum', TTMSFNCGraphicsColorObject.Create(gcplum));\r\n FColorLookup.AddOrSetValue('powderblue', TTMSFNCGraphicsColorObject.Create(gcpowderblue));\r\n FColorLookup.AddOrSetValue('purple', TTMSFNCGraphicsColorObject.Create(gcpurple));\r\n FColorLookup.AddOrSetValue('red', TTMSFNCGraphicsColorObject.Create(gcred));\r\n FColorLookup.AddOrSetValue('rosybrown', TTMSFNCGraphicsColorObject.Create(gcrosybrown));\r\n FColorLookup.AddOrSetValue('royalblue', TTMSFNCGraphicsColorObject.Create(gcroyalblue));\r\n FColorLookup.AddOrSetValue('saddlebrown', TTMSFNCGraphicsColorObject.Create(gcsaddlebrown));\r\n FColorLookup.AddOrSetValue('salmon', TTMSFNCGraphicsColorObject.Create(gcsalmon));\r\n FColorLookup.AddOrSetValue('sandybrown', TTMSFNCGraphicsColorObject.Create(gcsandybrown));\r\n FColorLookup.AddOrSetValue('seagreen', TTMSFNCGraphicsColorObject.Create(gcseagreen));\r\n FColorLookup.AddOrSetValue('seashell', TTMSFNCGraphicsColorObject.Create(gcseashell));\r\n FColorLookup.AddOrSetValue('sienna', TTMSFNCGraphicsColorObject.Create(gcsienna));\r\n FColorLookup.AddOrSetValue('skyblue', TTMSFNCGraphicsColorObject.Create(gcskyblue));\r\n FColorLookup.AddOrSetValue('slateblue', TTMSFNCGraphicsColorObject.Create(gcslateblue));\r\n FColorLookup.AddOrSetValue('slategray', TTMSFNCGraphicsColorObject.Create(gcslategray));\r\n FColorLookup.AddOrSetValue('slategrey', TTMSFNCGraphicsColorObject.Create(gcslategrey));\r\n FColorLookup.AddOrSetValue('snow', TTMSFNCGraphicsColorObject.Create(gcsnow));\r\n FColorLookup.AddOrSetValue('springgreen', TTMSFNCGraphicsColorObject.Create(gcspringgreen));\r\n FColorLookup.AddOrSetValue('steelblue', TTMSFNCGraphicsColorObject.Create(gcsteelblue));\r\n FColorLookup.AddOrSetValue('violet', TTMSFNCGraphicsColorObject.Create(gcviolet));\r\n FColorLookup.AddOrSetValue('thistle', TTMSFNCGraphicsColorObject.Create(gcthistle));\r\n FColorLookup.AddOrSetValue('tan', TTMSFNCGraphicsColorObject.Create(gctan));\r\n FColorLookup.AddOrSetValue('tomato', TTMSFNCGraphicsColorObject.Create(gctomato));\r\n FColorLookup.AddOrSetValue('turquoise', TTMSFNCGraphicsColorObject.Create(gcturquoise));\r\n FColorLookup.AddOrSetValue('wheat', TTMSFNCGraphicsColorObject.Create(gcwheat));\r\n FColorLookup.AddOrSetValue('whitesmoke', TTMSFNCGraphicsColorObject.Create(gcwhitesmoke));\r\n FColorLookup.AddOrSetValue('yellowgreen', TTMSFNCGraphicsColorObject.Create(gcyellowgreen));\r\n FColorLookup.AddOrSetValue('red', TTMSFNCGraphicsColorObject.Create(gcred));\r\n FColorLookup.AddOrSetValue('black', TTMSFNCGraphicsColorObject.Create(gcblack));\r\n FColorLookup.AddOrSetValue('blue', TTMSFNCGraphicsColorObject.Create(gcblue));\r\n FColorLookup.AddOrSetValue('green', TTMSFNCGraphicsColorObject.Create(gcgreen));\r\n FColorLookup.AddOrSetValue('aqua', TTMSFNCGraphicsColorObject.Create(gcaqua));\r\n FColorLookup.AddOrSetValue('yellow', TTMSFNCGraphicsColorObject.Create(gcyellow));\r\n FColorLookup.AddOrSetValue('fuchsia', TTMSFNCGraphicsColorObject.Create(gcfuchsia));\r\n FColorLookup.AddOrSetValue('white', TTMSFNCGraphicsColorObject.Create(gcwhite));\r\n FColorLookup.AddOrSetValue('lime', TTMSFNCGraphicsColorObject.Create(gclime));\r\n FColorLookup.AddOrSetValue('silver', TTMSFNCGraphicsColorObject.Create(gcsilver));\r\n FColorLookup.AddOrSetValue('gray', TTMSFNCGraphicsColorObject.Create(gcgray));\r\n FColorLookup.AddOrSetValue('olive', TTMSFNCGraphicsColorObject.Create(gcolive));\r\n FColorLookup.AddOrSetValue('navy', TTMSFNCGraphicsColorObject.Create(gcnavy));\r\n FColorLookup.AddOrSetValue('purple', TTMSFNCGraphicsColorObject.Create(gcpurple));\r\n FColorLookup.AddOrSetValue('teal', TTMSFNCGraphicsColorObject.Create(gcteal));\r\n FColorLookup.AddOrSetValue('orange', TTMSFNCGraphicsColorObject.Create(gcorange));\r\n FColorLookup.AddOrSetValue('maroon', TTMSFNCGraphicsColorObject.Create(gcmaroon));\r\nend;\r\n\r\n{$IFNDEF WEBLIB}\r\nfinalization\r\nbegin\r\n FreeAndNil(FColorLookup);\r\nend;\r\n{$ENDIF}\r\n\r\nend.\r\n","{********************************************************************}\r\n{ }\r\n{ written by TMS Software }\r\n{ copyright (c) 2016 - 2025 }\r\n{ Email : info@tmssoftware.com }\r\n{ Web : http://www.tmssoftware.com }\r\n{ }\r\n{ The source code is given as is. The author is not responsible }\r\n{ for any possible damage done due to the use of this code. }\r\n{ The complete source code remains property of the author and may }\r\n{ not be distributed, published, given or sold in any form as such. }\r\n{ No parts of the source code can be included in any other component }\r\n{ or application without written authorization of the author. }\r\n{********************************************************************}\r\n\r\nunit WEBLib.TMSFNCCustomComponent;\r\n\r\n{$I WEBLib.TMSFNCDefines.inc}\r\n\r\n{$IFDEF CMNLIB}\r\n{$DEFINE CMNWEBLIB}\r\n{$ENDIF}\r\n{$IFDEF WEBLIB}\r\n{$DEFINE CMNWEBLIB}\r\n{$ENDIF}\r\n\r\n{$IFDEF FNCLIB}\r\n{$DEFINE USETRIAL}\r\n{$ELSE}\r\n{$IFDEF FMXLIB}\r\n{$DEFINE USETRIAL}\r\n{$ENDIF}\r\n{$ENDIF}\r\n\r\ninterface\r\n\r\nuses\r\n {$IFDEF MSWINDOWS}\r\n {%H-}Windows,\r\n {$ENDIF}\r\n Classes, WEBLib.Controls, WEBLib.TMSFNCTypes\r\n ,WEBLib.TMSFNCPersistence\r\n {$IFNDEF FNCLIB}\r\n {$IFDEF VCLLIB}\r\n {$IFDEF FREEWARE}\r\n ,TMSTrial\r\n {$ENDIF}\r\n {$ENDIF}\r\n {$ENDIF}\r\n ,TypInfo;\r\n\r\ntype\r\n TTMSFNCCustomComponentCanSavePropertyEvent = procedure(Sender: TObject; AObject: TObject; APropertyName: string; APropertyType: TTypeKind; var ACanSave: Boolean) of object;\r\n TTMSFNCCustomComponentCanLoadPropertyEvent = procedure(Sender: TObject; AObject: TObject; APropertyName: string; APropertyType: TTypeKind; var ACanLoad: Boolean) of object;\r\n\r\n {$IFDEF CMNWEBLIB}\r\n TTMSFNCNameLabel = class(TCustomControl)\r\n {$ELSE}\r\n TTMSFNCNameLabel = class(TControl)\r\n {$ENDIF}\r\n private\r\n function GetText: string;\r\n protected\r\n procedure Paint; override;\r\n public\r\n {$IFDEF FMXLIB}\r\n procedure SetBounds(X, Y, AWidth, AHeight: Single); override;\r\n {$ENDIF}\r\n {$IFDEF CMNWEBLIB}\r\n procedure SetBounds(X, Y, {%H-}AWidth, {%H-}AHeight: Integer); override;\r\n {$ENDIF}\r\n\r\n property Text: string read GetText;\r\n end;\r\n\r\n {$IFDEF CMNWEBLIB}\r\n TTMSFNCCustomComponent = class(TCustomControl, ITMSFNCProductInfo, ITMSFNCPersistence)\r\n private\r\n FStored: Boolean;\r\n {$ELSE}\r\n TTMSFNCCustomComponent = class(TControl, ITMSFNCProductInfo, ITMSFNCPersistence)\r\n {$ENDIF}\r\n private\r\n class var FBlockPersistenceInterface: Boolean;\r\n private\r\n FNameLabel: TTMSFNCNameLabel;\r\n FDesigntimeFormPixelsPerInch: Integer;\r\n FAppearancePersisting: Boolean;\r\n FAdaptToStyle: Boolean;\r\n FOnCanSaveProperty: TTMSFNCCustomComponentCanSavePropertyEvent;\r\n FOnCanLoadProperty: TTMSFNCCustomComponentCanLoadPropertyEvent;\r\n protected\r\n {$IFDEF WEBLIB}\r\n class function GetVersionNumber(AMaj, AMin, ARel, ABld: ShortInt): string;\r\n {$ENDIF}\r\n procedure DoCanSaveProperty(AObject: TObject; APropertyName: string; APropertyType: TTypeKind; var ACanSave: Boolean); virtual;\r\n procedure DoCanLoadProperty(AObject: TObject; APropertyName: string; APropertyType: TTypeKind; var ACanLoad: Boolean); virtual;\r\n function IsAppearanceProperty({%H-}AObject: TObject; {%H-}APropertyName: string; {%H-}APropertyType: TTypeKind): Boolean; virtual;\r\n function CanSaveProperty({%H-}AObject: TObject; {%H-}APropertyName: string; {%H-}APropertyType: TTypeKind): Boolean; virtual;\r\n function CanLoadProperty({%H-}AObject: TObject; {%H-}APropertyName: string; {%H-}APropertyType: TTypeKind): Boolean; virtual;\r\n function GetVersion: string; virtual;\r\n function GetDocURL: string; virtual;\r\n function GetTipsURL: string; virtual;\r\n function GetInstance: NativeUInt; virtual;\r\n {$IFDEF VCLLIB}\r\n {$HINTS OFF}\r\n {$IF COMPILERVERSION > 30}\r\n procedure ChangeScale(M, D: Integer; isDpiChange: Boolean); override;\r\n {$ELSE}\r\n procedure ChangeScale(M, D: Integer); override;\r\n {$IFEND}\r\n {$HINTS ON}\r\n {$ENDIF}\r\n procedure ChangeDPIScale({%H-}M, {%H-}D: Integer); virtual;\r\n procedure SetAdaptToStyle(const Value: Boolean); virtual;\r\n procedure Paint; override;\r\n procedure Loaded; override;\r\n procedure RealignLabel;\r\n procedure RegisterRuntimeClasses; virtual;\r\n procedure Notification(AComponent: TComponent; Operation: TOperation); override;\r\n property AdaptToStyle: Boolean read FAdaptToStyle write SetAdaptToStyle default False;\r\n public\r\n constructor Create(AOwner: TComponent); override;\r\n procedure SetName(const Value: TComponentName); override;\r\n {$IFDEF FMXLIB}\r\n procedure SetBounds(X, Y, AWidth, AHeight: Single); override;\r\n {$ENDIF}\r\n {$IFDEF CMNWEBLIB}\r\n procedure SetBounds(X, Y, {%H-}AWidth, {%H-}AHeight: Integer); override;\r\n property Stored: Boolean read FStored write FStored;\r\n {$ENDIF}\r\n {$IFDEF FMXLIB}\r\n {$HINTS OFF}\r\n {$IF COMPILERVERSION = 28}\r\n procedure BeginUpdate; virtual;\r\n procedure EndUpdate; virtual;\r\n {$IFEND}\r\n {$HINTS ON}\r\n {$ENDIF}\r\n {$IFDEF CMNWEBLIB}\r\n {$IFDEF WEBLIB}\r\n procedure BeginUpdate; override;\r\n procedure EndUpdate; override;\r\n {$ENDIF}\r\n {$IFNDEF WEBLIB}\r\n procedure BeginUpdate; virtual;\r\n procedure EndUpdate; virtual;\r\n {$ENDIF}\r\n {$ENDIF}\r\n function IsDesignTime: Boolean; virtual;\r\n function IsLoading: Boolean; virtual;\r\n function IsReading: Boolean; virtual;\r\n function IsDesigning: Boolean; virtual;\r\n function IsDestroying: Boolean; virtual;\r\n procedure SaveSettingsToFile(AFileName: string; AAppearanceOnly: Boolean = False); virtual;\r\n procedure LoadSettingsFromFile(AFileName: string); virtual;\r\n procedure SaveSettingsToStream(AStream: TStream; AAppearanceOnly: Boolean = False); virtual;\r\n procedure LoadSettingsFromStream(AStream: TStream); virtual;\r\n class property BlockPersistenceInterface: Boolean read FBlockPersistenceInterface write FBlockPersistenceInterface;\r\n property DesigntimeFormPixelsPerInch: Integer read FDesigntimeFormPixelsPerInch;\r\n published\r\n {$IFDEF FMXLIB}\r\n {$HINTS OFF}\r\n {$IF COMPILERVERSION > 27}\r\n property Size;\r\n {$IFEND}\r\n {$HINTS ON}\r\n property Position;\r\n {$ENDIF}\r\n property Visible {$IFDEF CMNLIB}default False{$ENDIF};\r\n property Width;\r\n property Height;\r\n property OnCanSaveProperty: TTMSFNCCustomComponentCanSavePropertyEvent read FOnCanSaveProperty write FOnCanSaveProperty;\r\n property OnCanLoadProperty: TTMSFNCCustomComponentCanLoadPropertyEvent read FOnCanLoadProperty write FOnCanLoadProperty;\r\n end;\r\n\r\n TTMSFNCCustomComponentClass = class of TTMSFNCCustomComponent;\r\n\r\nimplementation\r\n\r\nuses\r\n WEBLib.TMSFNCUtils, WEBLib.Forms, SysUtils, WEBLib.TMSFNCGraphics,\r\n WEBLib.Graphics, WEBLib.TMSFNCGraphicsTypes\r\n {$IFNDEF LCLLIB}\r\n ,Types\r\n {$ENDIF}\r\n {$IFDEF VCLLIB}\r\n ,PngImage\r\n {$ENDIF}\r\n {$IFDEF WEBLIB}\r\n ,WEBLib.DesignIntf\r\n {$ENDIF}\r\n {$IFDEF USETRIAL}\r\n {$IFNDEF LCLLIB}\r\n {$IFNDEF WEBLIB}\r\n {$IFNDEF FMXMOBILE}\r\n {$IFDEF FREEWARE}\r\n {$IFDEF MACOS}\r\n ,MacApi.AppKit, MacApi.Foundation, MacApi.Helpers\r\n {$ENDIF}\r\n {$IFDEF MSWINDOWS}\r\n ,System.Win.Registry, WinApi.ShellApi\r\n {$ENDIF}\r\n {$IFDEF FMXLIB}\r\n ,UITypes, FMX.Types, WEBLib.StdCtrls, FMX.Objects, UIConsts\r\n {$ENDIF}\r\n {$IFDEF VCLLIB}\r\n ,VCL.StdCtrls, VCL.ExtCtrls\r\n {$ENDIF}\r\n {$ENDIF}\r\n {$ENDIF}\r\n {$ENDIF}\r\n {$ENDIF}\r\n {$ENDIF}\r\n ;\r\n\r\n{ TTMSFNCCustomComponent }\r\n\r\n{$IFDEF VCLLIB}\r\n{$HINTS OFF}\r\n{$IF COMPILERVERSION > 30}\r\nprocedure TTMSFNCCustomComponent.ChangeScale(M, D: Integer; isDpiChange: Boolean);\r\n{$ELSE}\r\nprocedure TTMSFNCCustomComponent.ChangeScale(M, D: Integer);\r\n{$IFEND}\r\nbegin\r\n inherited;\r\n ChangeDPIScale(M, D);\r\nend;\r\n{$HINTS ON}\r\n{$ENDIF}\r\n\r\nprocedure TTMSFNCCustomComponent.ChangeDPIScale({%H-}M, {%H-}D: Integer);\r\nbegin\r\nend;\r\n\r\n{$IFDEF WEBLIB}\r\nclass function TTMSFNCCustomComponent.GetVersionNumber(AMaj, AMin, ARel, ABld: ShortInt): string;\r\nbegin\r\n Result := '';\r\nend;\r\n{$ENDIF}\r\n\r\nfunction TTMSFNCCustomComponent.IsAppearanceProperty(AObject: TObject; APropertyName: string; APropertyType: TTypeKind): Boolean;\r\nbegin\r\n Result := False;\r\nend;\r\n\r\nfunction TTMSFNCCustomComponent.CanSaveProperty(AObject: TObject; APropertyName: string; APropertyType: TTypeKind): Boolean;\r\nbegin\r\n if (AObject = Self) and not BlockPersistenceInterface then\r\n Result := (TTMSFNCUtils.IndexOfTextInArray(APropertyName, ExcludePropertyList) = -1)\r\n else\r\n Result := True;\r\n\r\n if FAppearancePersisting then\r\n Result := Result and IsAppearanceProperty(AObject, APropertyName, APropertyType);\r\n\r\n DoCanSaveProperty(AObject, APropertyName, APropertyType, Result);\r\nend;\r\n\r\nfunction TTMSFNCCustomComponent.CanLoadProperty(AObject: TObject; APropertyName: string; APropertyType: TTypeKind): Boolean;\r\nbegin\r\n if (AObject = Self) and not BlockPersistenceInterface then\r\n Result := (TTMSFNCUtils.IndexOfTextInArray(APropertyName, ExcludePropertyList) = -1)\r\n else\r\n Result := True;\r\n\r\n DoCanLoadProperty(AObject, APropertyName, APropertyType, Result);\r\nend;\r\n\r\nconstructor TTMSFNCCustomComponent.Create(AOwner: TComponent);\r\nvar\r\n ppi: Integer;\r\n{$IFDEF VCLLIB}\r\n{$HINTS OFF}\r\n{$IF COMPILERVERSION > 34}\r\n f: TCustomForm;\r\n{$IFEND}\r\n{$HINTS ON}\r\n{$ENDIF}\r\nbegin\r\n inherited;\r\n ppi := 96;\r\n {$IFDEF VCLLIB}\r\n {$HINTS OFF}\r\n {$IF COMPILERVERSION > 34}\r\n f := TTMSFNCUtils.GetOwnerForm(Self);\r\n if Assigned(f) then\r\n ppi := f.PixelsPerInch;\r\n {$IFEND}\r\n {$HINTS ON}\r\n {$ENDIF}\r\n\r\n FDesigntimeFormPixelsPerInch := ppi;\r\n\r\n Width := 26;\r\n Height := 26;\r\n\r\n if not IsDesigning then\r\n RegisterRuntimeClasses;\r\nend;\r\n\r\nprocedure TTMSFNCCustomComponent.DoCanLoadProperty(AObject: TObject;\r\n APropertyName: string; APropertyType: TTypeKind; var ACanLoad: Boolean);\r\nbegin\r\n if Assigned(OnCanLoadProperty) then\r\n OnCanLoadProperty(Self, AObject, APropertyName, APropertyType, ACanLoad);\r\nend;\r\n\r\nprocedure TTMSFNCCustomComponent.DoCanSaveProperty(AObject: TObject;\r\n APropertyName: string; APropertyType: TTypeKind; var ACanSave: Boolean);\r\nbegin\r\n if Assigned(OnCanSaveProperty) then\r\n OnCanSaveProperty(Self, AObject, APropertyName, APropertyType, ACanSave);\r\nend;\r\n\r\nfunction TTMSFNCCustomComponent.GetDocURL: string;\r\nbegin\r\n Result := TTMSFNCBaseDocURL;\r\nend;\r\n\r\nfunction TTMSFNCCustomComponent.GetInstance: NativeUInt;\r\nbegin\r\n Result := HInstance;\r\nend;\r\n\r\nfunction TTMSFNCCustomComponent.GetTipsURL: string;\r\nbegin\r\n Result := TTMSFNCBaseTipsURL;\r\nend;\r\n\r\nfunction TTMSFNCCustomComponent.GetVersion: string;\r\nbegin\r\n Result := '';\r\nend;\r\n\r\nfunction TTMSFNCCustomComponent.IsDesignTime: Boolean;\r\nbegin\r\n Result := False;\r\n if Assigned(Owner) then\r\n Result := IsDesigning and not ((csReading in Owner.ComponentState) or (csLoading in Owner.ComponentState));\r\nend;\r\n\r\nfunction TTMSFNCCustomComponent.IsReading: Boolean;\r\nbegin\r\n Result := (csReading in Owner.ComponentState);\r\nend;\r\n\r\nfunction TTMSFNCCustomComponent.IsDesigning: Boolean;\r\nbegin\r\n Result := ((csDesigning in ComponentState) {$IFDEF WEBLIB}or Assigned(VSIDE){$ENDIF});\r\nend;\r\n\r\nfunction TTMSFNCCustomComponent.IsDestroying: Boolean;\r\nbegin\r\n Result := (csDestroying in ComponentState);\r\nend;\r\n\r\nfunction TTMSFNCCustomComponent.IsLoading: Boolean;\r\nbegin\r\n Result := (csLoading in Owner.ComponentState);\r\nend;\r\n\r\nprocedure TTMSFNCCustomComponent.Loaded;\r\nbegin\r\n inherited;\r\n RealignLabel;\r\n\r\n if not (csDesigning in ComponentState) then\r\n Visible := False;\r\nend;\r\n\r\nprocedure TTMSFNCCustomComponent.SaveSettingsToFile(AFileName: string; AAppearanceOnly: Boolean = False);\r\nbegin\r\n FAppearancePersisting := AAppearanceOnly;\r\n TTMSFNCPersistence.SaveSettingsToFile(Self, AFileName);\r\n FAppearancePersisting := False;\r\nend;\r\n\r\nprocedure TTMSFNCCustomComponent.LoadSettingsFromFile(AFileName: string);\r\nbegin\r\n TTMSFNCPersistence.LoadSettingsFromFile(Self, AFileName);\r\nend;\r\n\r\nprocedure TTMSFNCCustomComponent.SaveSettingsToStream(AStream: TStream; AAppearanceOnly: Boolean = False);\r\nbegin\r\n FAppearancePersisting := AAppearanceOnly;\r\n TTMSFNCPersistence.SaveSettingsToStream(Self, AStream);\r\n FAppearancePersisting := False;\r\nend;\r\n\r\nprocedure TTMSFNCCustomComponent.LoadSettingsFromStream(AStream: TStream);\r\nbegin\r\n TTMSFNCPersistence.LoadSettingsFromStream(Self, AStream);\r\nend;\r\n\r\nprocedure TTMSFNCCustomComponent.Notification(AComponent: TComponent;\r\n Operation: TOperation);\r\nbegin\r\n inherited;\r\n\r\n if (AComponent = FNameLabel) and (Operation = opRemove) then\r\n FNameLabel := nil;\r\nend;\r\n\r\n{$IFDEF FMXLIB}\r\n{$HINTS OFF}\r\n{$IF COMPILERVERSION = 28}\r\nprocedure TTMSFNCCustomComponent.BeginUpdate;\r\nbegin\r\nend;\r\n\r\nprocedure TTMSFNCCustomComponent.EndUpdate;\r\nbegin\r\nend;\r\n{$IFEND}\r\n{$HINTS ON}\r\n{$ENDIF}\r\n\r\n{$IFDEF CMNWEBLIB}\r\nprocedure TTMSFNCCustomComponent.BeginUpdate;\r\nbegin\r\n {$IFDEF WEBLIB}\r\n inherited;\r\n {$ENDIF}\r\nend;\r\n\r\nprocedure TTMSFNCCustomComponent.EndUpdate;\r\nbegin\r\n {$IFDEF WEBLIB}\r\n inherited;\r\n {$ENDIF}\r\nend;\r\n{$ENDIF}\r\n\r\nprocedure TTMSFNCCustomComponent.Paint;\r\nvar\r\n {$IFDEF VCLLIB}\r\n png: TPngImage;\r\n {$ENDIF}\r\n pic: TTMSFNCBitmap;\r\n g: TTMSFNCGraphics;\r\n r: TResourceStream;\r\n {$IFDEF WEBLIB}\r\n rc: TRegisteredComponent;\r\n {$ENDIF}\r\n {$IFNDEF WEBLIB}\r\n c: TClass;\r\n {$ENDIF}\r\nbegin\r\n inherited;\r\n r := nil;\r\n pic := TTMSFNCBitmap.Create;\r\n {$IFDEF VCLLIB}\r\n png := TPNGImage.Create;\r\n {$ENDIF}\r\n g := TTMSFNCGraphics.Create(Canvas);\r\n try\r\n g.Stroke.Kind := gskSolid;\r\n g.Stroke.Color := gcBlack;\r\n g.DrawRectangle(RectF(0, 0, Width, Height));\r\n\r\n {$IFNDEF WEBLIB}\r\n r := TTMSFNCUtils.GetResourceStream(UpperCase(ClassName), GetInstance);\r\n c := ClassParent;\r\n while Assigned(c) and not Assigned(r) do\r\n begin\r\n r := TTMSFNCUtils.GetResourceStream(UpperCase(c.ClassName), GetInstance);\r\n c := c.ClassParent;\r\n end;\r\n\r\n if Assigned(r) then\r\n begin\r\n {$IFDEF VCLLIB}\r\n png.LoadFromStream(r);\r\n pic.Assign(png);\r\n {$ELSE}\r\n pic.LoadFromStream(r);\r\n {$ENDIF}\r\n end;\r\n {$ENDIF}\r\n\r\n {$IFDEF WEBLIB}\r\n rc := GetRegisteredComponent(ClassName);\r\n if Assigned(rc) then\r\n pic.LoadFromResource(rc.Icon);\r\n {$ENDIF}\r\n\r\n g.DrawBitmap(RectF(2, 2, Width - 2, Height - 2), pic, True, True);\r\n finally\r\n if Assigned(r) then\r\n r.Free;\r\n\r\n pic.Free;\r\n {$IFDEF VCLLIB}\r\n png.Free;\r\n {$ENDIF}\r\n g.Free;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomComponent.RealignLabel;\r\nbegin\r\n if Assigned(FNameLabel) then\r\n FNameLabel.SetBounds(Left, Top, Width, Height);\r\nend;\r\n\r\nprocedure TTMSFNCCustomComponent.RegisterRuntimeClasses;\r\nbegin\r\nend;\r\n\r\nprocedure TTMSFNCCustomComponent.SetAdaptToStyle(const Value: Boolean);\r\nbegin\r\n FAdaptToStyle := Value;\r\nend;\r\n\r\nprocedure TTMSFNCCustomComponent.SetName(const Value: TComponentName);\r\nbegin\r\n inherited;\r\n if not Assigned(FNameLabel) and (csDesigning in ComponentState) and (Owner is TCustomForm) then\r\n begin\r\n FNameLabel := TTMSFNCNameLabel.Create(Self);\r\n {$IFDEF VCLLIB}\r\n if Owner is TWinControl then\r\n FNameLabel.Parent := Owner as TWinControl;\r\n {$ELSE}\r\n FNameLabel.Parent := Self;\r\n {$ENDIF}\r\n\r\n FNameLabel.TabStop := False;\r\n {$IFDEF FMXLIB}\r\n FNameLabel.HitTest := False;\r\n FNameLabel.Stored := False;\r\n {$ENDIF}\r\n end;\r\n\r\n RealignLabel;\r\nend;\r\n\r\n{$IFDEF FMXLIB}\r\nprocedure TTMSFNCCustomComponent.SetBounds(X, Y, AWidth, AHeight: Single);\r\n{$ENDIF}\r\n{$IFDEF CMNWEBLIB}\r\nprocedure TTMSFNCCustomComponent.SetBounds(X, Y, AWidth, AHeight: Integer);\r\n{$ENDIF}\r\nvar\r\n sc: Single;\r\nbegin\r\n sc := FDesigntimeFormPixelsPerInch / 96;\r\n inherited SetBounds(X, Y, Round(26 * sc), Round(26 * sc));\r\n\r\n RealignLabel;\r\nend;\r\n\r\n{ TTMSFNCNameLabel }\r\n\r\n{$IFDEF FMXLIB}\r\nprocedure TTMSFNCNameLabel.SetBounds(X, Y, AWidth, AHeight: Single);\r\n{$ENDIF}\r\n{$IFDEF CMNWEBLIB}\r\nprocedure TTMSFNCNameLabel.SetBounds(X, Y, AWidth, AHeight: Integer);\r\n{$ENDIF}\r\nvar\r\n l, t, w, h: Single;\r\n sc: Integer;\r\n sz: TSizeF;\r\n g: TTMSFNCGraphics;\r\n c: TControl;\r\nbegin\r\n g := TTMSFNCGraphics.CreateBitmapCanvas();\r\n try\r\n sc := 6;\r\n if Assigned(Owner) and (Owner is TTMSFNCCustomComponent) then\r\n begin\r\n g.Font.Height := TTMSFNCUtils.MulDivInt(g.Font.Height, (Owner as TTMSFNCCustomComponent).FDesigntimeFormPixelsPerInch, 96);\r\n sc := TTMSFNCUtils.MulDivInt(sc, (Owner as TTMSFNCCustomComponent).FDesigntimeFormPixelsPerInch, 96);\r\n end;\r\n\r\n sz := g.CalculateTextSize(Text);\r\n w := sz.cx + sc;\r\n h := sz.cy + sc;\r\n finally\r\n g.Free;\r\n end;\r\n\r\n if Assigned(Owner) and (Owner is TControl) then\r\n begin\r\n c := (Owner as TControl);\r\n {$IFDEF VCLLIB}\r\n l := (Owner as TControl).Left + c.Width / 2 - w / 2;\r\n t := (Owner as TControl).Top + c.Height;\r\n {$ELSE}\r\n l := c.Width / 2 - w / 2;\r\n t := c.Height;\r\n {$ENDIF}\r\n end\r\n else\r\n begin\r\n l := X;\r\n t := Y;\r\n end;\r\n\r\n inherited SetBounds(Round(l), Round(t), Round(w), Round(h));\r\nend;\r\n\r\nfunction TTMSFNCNameLabel.GetText: string;\r\nbegin\r\n Result := '';\r\n if Assigned(Owner) then\r\n Result := Owner.Name;\r\nend;\r\n\r\nprocedure TTMSFNCNameLabel.Paint;\r\nvar\r\n g: TTMSFNCGraphics;\r\nbegin\r\n inherited;\r\n g := TTMSFNCGraphics.Create(Canvas);\r\n try\r\n g.Stroke.Kind := gskSolid;\r\n g.Stroke.Color := gcBlack;\r\n g.Fill.Kind := gfkSolid;\r\n g.Fill.Color := gcWhite;\r\n\r\n g.DrawRectangle(RectF(0, 0, Width, Height));\r\n\r\n if Assigned(Owner) and (Owner is TTMSFNCCustomComponent) then\r\n g.Font.Height := TTMSFNCUtils.MulDivInt(g.Font.Height, (Owner as TTMSFNCCustomComponent).FDesigntimeFormPixelsPerInch, 96);\r\n\r\n g.DrawText(RectF(0, 0, Width, Height), Text, False, gtaCenter, gtaCenter);\r\n\r\n finally\r\n g.Free;\r\n end;\r\nend;\r\n\r\n{$IFDEF USETRIAL}\r\n{$IFNDEF WEBLIB}\r\n{$IFNDEF LCLLIB}\r\n{$IFNDEF FMXMOBILE}\r\n{$IFDEF FREEWARE}\r\nconst TMSPRODUCTOFFSET = 700;\r\n{$I TMSProductTrial.inc}\r\n{$ENDIF}\r\n{$ENDIF}\r\n{$ENDIF}\r\n{$ENDIF}\r\n{$ENDIF}\r\n\r\nend.\r\n","{********************************************************************}\r\n{ }\r\n{ written by TMS Software }\r\n{ copyright (c) 2016 - 2021 }\r\n{ Email : info@tmssoftware.com }\r\n{ Web : http://www.tmssoftware.com }\r\n{ }\r\n{ The source code is given as is. The author is not responsible }\r\n{ for any possible damage done due to the use of this code. }\r\n{ The complete source code remains property of the author and may }\r\n{ not be distributed, published, given or sold in any form as such. }\r\n{ No parts of the source code can be included in any other component }\r\n{ or application without written authorization of the author. }\r\n{********************************************************************}\r\n\r\nunit WEBLib.TMSFNCGraphics;\r\n\r\n{$I WEBLib.TMSFNCDefines.inc}\r\n\r\n{$IFDEF CMNLIB}\r\n{$DEFINE CMNWEBLIB}\r\n{$ENDIF}\r\n{$IFDEF WEBLIB}\r\n{$DEFINE CMNWEBLIB}\r\n{$ENDIF}\r\n\r\n{$DEFINE SVGSUPPORT}\r\n\r\n{$IFDEF WEBLIB}\r\n{$DEFINE LCLWEBLIB}\r\n{$ENDIF}\r\n{$IFDEF LCLLIB}\r\n{$DEFINE LCLWEBLIB}\r\n{$ENDIF}\r\n\r\ninterface\r\n\r\nuses\r\n {$IFDEF MSWINDOWS}\r\n Windows,\r\n {$ENDIF}\r\n Classes, WEBLib.TMSFNCGraphicsTypes, WEBLib.Graphics,\r\n {$IFDEF WEBLIB}\r\n JS,\r\n {$ENDIF}\r\n {$IFNDEF LIMITEDGRAPHICSMODE}\r\n WEBLib.TMSFNCBitmapContainer,\r\n {$ENDIF}\r\n Types, WEBLib.TMSFNCTypes\r\n {$IFDEF CMNLIB}\r\n ,FMX.ImgList\r\n {$ENDIF}\r\n {$IFNDEF LCLWEBLIB}\r\n {$HINTS OFF}\r\n {$IF COMPILERVERSION > 22}\r\n ,UITypes\r\n {$IFEND}\r\n {$HINTS ON}\r\n {$ENDIF}\r\n ;\r\n\r\ntype\r\n TTMSFNCGraphics = class;\r\n\r\n TTMSFNCGraphicsContext = class\r\n private\r\n {$IFDEF AUTOREFCOUNT}\r\n [Weak]FGraphics: TTMSFNCGraphics;\r\n {$ELSE}\r\n FGraphics: TTMSFNCGraphics;\r\n {$ENDIF}\r\n function GetCanvas: TCanvas;\r\n function GetGraphics: TTMSFNCGraphics;\r\n protected\r\n function GetNativeCanvas: Pointer; virtual; abstract;\r\n public\r\n constructor Create(const AGraphics: TTMSFNCGraphics); virtual;\r\n function CreatePath: Pointer; virtual; abstract;\r\n function ConvertToPath(APath: TTMSFNCGraphicsPath; const Flatness: Single = 0.25): Pointer;\r\n function GetFillColor: TTMSFNCGraphicsColor; virtual; abstract;\r\n function CalculateText(AText: string; ARect: TRectF; AWordWrapping: Boolean): TRectF; virtual; abstract;\r\n function SetTextAngle(ARect: TRectF; AAngle: Single): TRectF; virtual; abstract;\r\n function GetMatrix: TTMSFNCGraphicsMatrix; virtual; abstract;\r\n procedure Render; virtual; abstract;\r\n procedure PathOpen(APath: Pointer); virtual; abstract;\r\n procedure PathMoveTo(APath: Pointer; APoint: TPointF); virtual; abstract;\r\n procedure PathLineTo(APath: Pointer; APoint: TPointF); virtual; abstract;\r\n procedure SetScale(AScale: Single); virtual; abstract;\r\n procedure PathClose(APath: Pointer); virtual; abstract;\r\n procedure ResetClip; virtual; abstract;\r\n procedure ResetTransform; virtual; abstract;\r\n procedure ScaleTransform(AX, AY: Single); virtual; abstract;\r\n procedure RotateTransform(AAngle: Single); virtual; abstract;\r\n procedure TranslateTransform(AX, AY: Single); virtual; abstract;\r\n procedure SetTextQuality(ATextQuality: TTMSFNCGraphicsTextQuality); virtual; abstract;\r\n procedure SetAntiAliasing(AAntiAliasing: Boolean); virtual; abstract;\r\n procedure SetShowAcceleratorChar(AShowAcceleratorChar: Boolean); virtual; abstract;\r\n procedure SetSize(AWidth, AHeight: Single); virtual; abstract;\r\n procedure ResetTextAngle(AAngle: Single); virtual; abstract;\r\n procedure BeginScene; virtual; abstract;\r\n procedure EndScene; virtual; abstract;\r\n procedure BeginPrinting; virtual; abstract;\r\n procedure EndPrinting; virtual; abstract;\r\n procedure StartSpecialPen; virtual; abstract;\r\n procedure StopSpecialPen; virtual; abstract;\r\n procedure RestoreState(AState: TTMSFNCGraphicsSaveState); virtual; abstract;\r\n procedure SaveState(AState: TTMSFNCGraphicsSaveState); virtual; abstract;\r\n procedure SetFontSize(ASize: Integer); virtual; abstract;\r\n procedure SetFontColor(AColor: TTMSFNCGraphicsColor); virtual; abstract;\r\n procedure SetFontName(AName: string); virtual; abstract;\r\n procedure SetFont(AFont: TTMSFNCGraphicsFont); virtual; abstract;\r\n procedure SetFontStyles(AStyle: TFontStyles); virtual; abstract;\r\n procedure SetMatrix(AMatrix: TTMSFNCGraphicsMatrix); virtual; abstract;\r\n procedure SetFill(AFill: TTMSFNCGraphicsFill); virtual; abstract;\r\n procedure SetFillKind(AKind: TTMSFNCGraphicsFillKind); virtual; abstract;\r\n procedure SetFillColor(AColor: TTMSFNCGraphicsColor); virtual; abstract;\r\n procedure SetStroke(AStroke: TTMSFNCGraphicsStroke); virtual; abstract;\r\n procedure SetStrokeKind(AKind: TTMSFNCGraphicsStrokeKind); virtual; abstract;\r\n procedure SetStrokeColor(AColor: TTMSFNCGraphicsColor); virtual; abstract;\r\n procedure SetStrokeWidth(AWidth: Single); virtual; abstract;\r\n procedure DrawLine(AStroke: TTMSFNCGraphicsStroke; AFromPoint: TPointF; AToPoint: TPointF; AModifyPointModeFrom: TTMSFNCGraphicsModifyPointMode = gcpmRightDown; AModifyPointModeTo: TTMSFNCGraphicsModifyPointMode = gcpmRightDown); virtual; abstract;\r\n procedure DrawPolygon(AStroke: TTMSFNCGraphicsStroke; APolygon: TTMSFNCGraphicsPathPolygon); virtual; abstract;\r\n procedure FillPolygon(AFill: TTMSFNCGraphicsFill; APolygon: TTMSFNCGraphicsPathPolygon); virtual; abstract;\r\n procedure DrawPolyline(AStroke: TTMSFNCGraphicsStroke; APolyline: TTMSFNCGraphicsPathPolygon); virtual; abstract;\r\n procedure FillPolyline(AFill: TTMSFNCGraphicsFill; APolyline: TTMSFNCGraphicsPathPolygon); virtual; abstract;\r\n procedure FillArc(AFill: TTMSFNCGraphicsFill; ACenter, ARadius: TPointF; AStartAngle, ASweepAngle: Single); virtual; abstract;\r\n procedure DrawArc(AStroke: TTMSFNCGraphicsStroke; ACenter, ARadius: TPointF; AStartAngle, ASweepAngle: Single); virtual; abstract;\r\n procedure FillRect(AFill: TTMSFNCGraphicsFill; ARect: TRectF; AModifyRectMode: TTMSFNCGraphicsModifyRectMode = gcrmShrinkAll); virtual; abstract;\r\n procedure DrawRect(AStroke: TTMSFNCGraphicsStroke; ARect: TRectF; ASides: TTMSFNCGraphicsSides; AModifyRectMode: TTMSFNCGraphicsModifyRectMode = gcrmShrinkAll); virtual; abstract;\r\n procedure FillRoundRect(AFill: TTMSFNCGraphicsFill; ARect: TRectF; ARounding: Single; ACorners: TTMSFNCGraphicsCorners; AModifyRectMode: TTMSFNCGraphicsModifyRectMode = gcrmShrinkAll); virtual; abstract;\r\n procedure DrawRoundRect(AStroke: TTMSFNCGraphicsStroke; ARect: TRectF; ARounding: Single; ACorners: TTMSFNCGraphicsCorners; AModifyRectMode: TTMSFNCGraphicsModifyRectMode = gcrmShrinkAll); virtual; abstract;\r\n procedure FillEllipse(AFill: TTMSFNCGraphicsFill; ARect: TRectF; AModifyRectMode: TTMSFNCGraphicsModifyRectMode = gcrmShrinkAll); virtual; abstract;\r\n procedure DrawEllipse(AStroke: TTMSFNCGraphicsStroke; ARect: TRectF; AModifyRectMode: TTMSFNCGraphicsModifyRectMode = gcrmShrinkAll); virtual; abstract;\r\n procedure DrawBitmap(ABitmap: TTMSFNCDrawBitmap; ASrcRect, ADstRect: TRectF; AOpacity: Single); virtual; abstract;\r\n procedure ClipRect(ARect: TRectF); virtual; abstract;\r\n procedure ClipPath(APath: TTMSFNCGraphicsPath); virtual; abstract;\r\n procedure DrawFocusPath(AStroke: TTMSFNCGraphicsStroke; APath: TTMSFNCGraphicsPath; AColor: TTMSFNCGraphicsColor); virtual; abstract;\r\n procedure DrawFocusRectangle(AStroke: TTMSFNCGraphicsStroke; ARect: TRectF; AColor: TTMSFNCGraphicsColor; AModifyRectMode: TTMSFNCGraphicsModifyRectMode = gcrmShrinkAll); virtual; abstract;\r\n procedure DrawText(AText: string; ARect: TRectF; AWordWrapping: Boolean; AHorizontalAlign, AVerticalAlign: TTMSFNCGraphicsTextAlign; ATrimming: TTMSFNCGraphicsTextTrimming; AAngle: Single); virtual; abstract;\r\n procedure DrawPath(AStroke: TTMSFNCGraphicsStroke; APath: TTMSFNCGraphicsPath; APathMode: TTMSFNCGraphicsPathDrawMode = pdmPolygon); virtual; abstract;\r\n procedure FillPath(AFill: TTMSFNCGraphicsFill; APath: TTMSFNCGraphicsPath; APathMode: TTMSFNCGraphicsPathDrawMode = pdmPolygon); virtual; abstract;\r\n property Canvas: TCanvas read GetCanvas;\r\n property NativeCanvas: Pointer read GetNativeCanvas;\r\n property Graphics: TTMSFNCGraphics read GetGraphics;\r\n end;\r\n\r\n TTMSFNCGraphicsContextClass = class of TTMSFNCGraphicsContext;\r\n\r\n TTMSFNCGraphics = class\r\n private\r\n FSaveFont: TTMSFNCGraphicsFont;\r\n FActiveCanvas: TCanvas;\r\n FBlockUpdate: Integer;\r\n FNative: Boolean;\r\n FContextNative, FContextGeneral: TTMSFNCGraphicsContext;\r\n FBitmap: TBitmap;\r\n FFill: TTMSFNCGraphicsFill;\r\n FStroke: TTMSFNCGraphicsStroke;\r\n FFont: TTMSFNCGraphicsFont;\r\n {$IFNDEF LIMITEDGRAPHICSMODE}\r\n FHighlightColor: TTMSFNCGraphicsColor;\r\n FOptimizedHTMLDrawing: Boolean;\r\n FHighlightTextColor: TTMSFNCGraphicsColor;\r\n FHighlightFontStyles: TFontStyles;\r\n FURLUnderline: Boolean;\r\n FURLColor: TTMSFNCGraphicsColor;\r\n FBitmapContainer: TTMSFNCBitmapContainer;\r\n {$IFDEF CMNLIB}\r\n FImageList: TCustomImageList;\r\n {$ENDIF}\r\n {$ENDIF}\r\n function GetCanvas: TCanvas;\r\n function GetContext: TTMSFNCGraphicsContext;\r\n protected\r\n procedure FontChanged(Sender: TObject);\r\n procedure FillChanged(Sender: TObject);\r\n procedure StrokeChanged(Sender: TObject);\r\n procedure InitializeDefaultAppearance;\r\n function InternalDrawBitmapPartSync(ASourceLeft: Double; ASourceTop: Double; ASourceRight: Double; ASourceBottom: Double; ADestinationLeft: Double; ADestinationTop: Double;\r\n ADestinationRight: Double; ADestinationBottom: Double; ABitmap: TTMSFNCBitmapHelperClass; AAspectRatio: Boolean = True; AStretch: Boolean = False;\r\n ACenter: Boolean = True; ACropping: Boolean = False): {$IFDEF WEBLIB}TJSPromise{$ELSE}TTMSFNCBitmap{$ENDIF};\r\n function InternalCalculateText(AText: String; ARect: TRectF; AWordWrapping: Boolean = False{$IFNDEF LIMITEDGRAPHICSMODE}; ASupportHTML: Boolean = True{$ENDIF}): TRectF; overload; virtual;\r\n function InternalDrawText(ARect: TRectF; AText: String; var AControlID: String; var AControlValue: String; var AControlType: string;AWordWrapping: Boolean = False; AHorizontalAlign: TTMSFNCGraphicsTextAlign = gtaLeading; AVerticalAlign: TTMSFNCGraphicsTextAlign = gtaCenter; ATrimming: TTMSFNCGraphicsTextTrimming = gttNone; AAngle: Single = 0;\r\n AMinWidth: Single = -1; AMinHeight: Single = -1 {$IFNDEF LIMITEDGRAPHICSMODE};ASupportHTML: Boolean = True; ATestAnchor: Boolean = False; AX: Single = -1; AY: Single = - 1{$ENDIF}): String; overload; virtual;\r\n procedure DrawTexture(ARect: TRectF; ATexture: TTMSFNCBitmap; ATextureMode: TTMSFNCGraphicsTextureMode);\r\n {$IFDEF SVGSUPPORT}\r\n function DrawSVG(ABitmap: TTMSFNCBitmapHelperClass; ARect: TRectF): Boolean;\r\n function HasSVG(ABitmap: TTMSFNCBitmapHelperClass): Boolean;\r\n {$ENDIF}\r\n class procedure ConvertBitmapToGrayScale(ABitmap: TTMSFNCBitmap);\r\n public class var\r\n DefaultSelectionFillColor: TTMSFNCGraphicsColor;\r\n DefaultTextFontColor: TTMSFNCGraphicsColor;\r\n DefaultPopupFillColor: TTMSFNCGraphicsColor;\r\n DefaultPopupStrokeColor: TTMSFNCGraphicsColor;\r\n DefaultButtonStrokeColorFocused: TTMSFNCGraphicsColor;\r\n DefaultButtonFillColorFocused: TTMSFNCGraphicsColor;\r\n DefaultButtonStrokeColorDisabled: TTMSFNCGraphicsColor;\r\n DefaultButtonFillColorDisabled: TTMSFNCGraphicsColor;\r\n DefaultButtonStrokeColor: TTMSFNCGraphicsColor;\r\n DefaultButtonFillColor: TTMSFNCGraphicsColor;\r\n public\r\n constructor Create(ACanvas: TCanvas; ANative: Boolean = False); virtual;\r\n constructor CreateNative(ACanvas: TCanvas); virtual;\r\n constructor CreateBitmapCanvas(AWidth: Integer = 1; AHeight: Integer = 1; ANative: Boolean = False; {%H-}AHighDPI: Boolean = True); virtual;\r\n constructor CreateNativeBitmapCanvas(AWidth: Integer = 1; AHeight: Integer = 1); virtual;\r\n destructor Destroy; override;\r\n function GetMatrix: TTMSFNCGraphicsMatrix; virtual;\r\n procedure StartSpecialPen;\r\n procedure StopSpecialPen;\r\n procedure BeginPrinting; virtual;\r\n procedure EndPrinting; virtual;\r\n procedure BeginScene; virtual;\r\n procedure EndScene; virtual;\r\n procedure SetMatrix(const AMatrix: TTMSFNCGraphicsMatrix); virtual;\r\n procedure Assign(Source: TTMSFNCGraphics); virtual;\r\n procedure SetFill(AFill: TTMSFNCGraphicsFill); virtual;\r\n procedure SetStroke(AStroke: TTMSFNCGraphicsStroke); virtual;\r\n procedure RestoreState(AState: TTMSFNCGraphicsSaveState; ACanvasOnly: Boolean = False); virtual;\r\n procedure SetFillKind(AKind: TTMSFNCGraphicsFillKind); virtual;\r\n procedure SetFillColor(AColor: TTMSFNCGraphicsColor); virtual;\r\n procedure SetFontColor(AColor: TTMSFNCGraphicsColor); virtual;\r\n procedure SetFontName(AName: string); virtual;\r\n procedure SetFont(AFont: TTMSFNCGraphicsFont); virtual;\r\n procedure SetFontSize(ASize: Integer); virtual;\r\n procedure SetFontStyles(AStyle: TFontStyles); virtual;\r\n procedure SetStrokeKind(AKind: TTMSFNCGraphicsStrokeKind); virtual;\r\n procedure SetStrokeColor(AColor: TTMSFNCGraphicsColor); virtual;\r\n procedure SetStrokeWidth(AWidth: Single); virtual;\r\n procedure DrawLine(AFromPoint: TPoint; AToPoint: TPoint; {%H-}AModifyPointModeFrom: TTMSFNCGraphicsModifyPointMode = gcpmRightDown; {%H-}AModifyPointModeTo: TTMSFNCGraphicsModifyPointMode = gcpmRightDown); overload; virtual;\r\n procedure DrawLine(AFromPoint: TPointF; AToPoint: TPointF; {%H-}AModifyPointModeFrom: TTMSFNCGraphicsModifyPointMode = gcpmRightDown; {%H-}AModifyPointModeTo: TTMSFNCGraphicsModifyPointMode = gcpmRightDown); overload; virtual;\r\n procedure DrawFocusRectangle(ALeft, ATop, ARight, ABottom: Integer; AColor: TTMSFNCGraphicsColor = gcBlack; {%H-}AModifyRectMode: TTMSFNCGraphicsModifyRectMode = gcrmShrinkAll); overload; virtual;\r\n procedure DrawFocusRectangle(ARect: TRect; AColor: TTMSFNCGraphicsColor = gcBlack; {%H-}AModifyRectMode: TTMSFNCGraphicsModifyRectMode = gcrmShrinkAll); overload; virtual;\r\n procedure DrawFocusRectangle(ALeft, ATop, ARight, ABottom: Double; AColor: TTMSFNCGraphicsColor = gcBlack; {%H-}AModifyRectMode: TTMSFNCGraphicsModifyRectMode = gcrmShrinkAll); overload; virtual;\r\n procedure DrawFocusRectangle(ARect: TRectF; AColor: TTMSFNCGraphicsColor = gcBlack; {%H-}AModifyRectMode: TTMSFNCGraphicsModifyRectMode = gcrmShrinkAll); overload; virtual;\r\n procedure DrawFocusPath(APath: TTMSFNCGraphicsPath; AColor: TTMSFNCGraphicsColor = gcBlack); virtual;\r\n procedure DrawPolygon(APolygon: TTMSFNCGraphicsPathPolygon); virtual;\r\n procedure DrawPolyline(APolyline: TTMSFNCGraphicsPathPolygon); virtual;\r\n procedure DrawPath(APath: TTMSFNCGraphicsPath; APathMode: TTMSFNCGraphicsPathDrawMode = pdmPolygon); virtual;\r\n procedure DrawArc(const Center, Radius: TPointF; StartAngle, SweepAngle: Single); overload; virtual;\r\n procedure DrawArc(const Center, Radius: TPoint; StartAngle, SweepAngle: Integer); overload; virtual;\r\n procedure DrawRectangle(ALeft, ATop, ARight, ABottom: Double; {%H-}AModifyRectMode: TTMSFNCGraphicsModifyRectMode = gcrmShrinkAll); overload; virtual;\r\n procedure DrawRectangle(ALeft, ATop, ARight, ABottom: Double; ASides: TTMSFNCGraphicsSides; {%H-}AModifyRectMode: TTMSFNCGraphicsModifyRectMode = gcrmShrinkAll); overload; virtual;\r\n procedure DrawEllipse(ALeft, ATop, ARight, ABottom: Double; {%H-}AModifyRectMode: TTMSFNCGraphicsModifyRectMode = gcrmShrinkAll); overload; virtual;\r\n procedure DrawRectangle(ARect: TRectF; {%H-}AModifyRectMode: TTMSFNCGraphicsModifyRectMode = gcrmShrinkAll); overload; virtual;\r\n procedure DrawRectangle(ARect: TRectF; ASides: TTMSFNCGraphicsSides; {%H-}AModifyRectMode: TTMSFNCGraphicsModifyRectMode = gcrmShrinkAll); overload; virtual;\r\n procedure DrawRectangle(ALeft, ATop, ARight, ABottom: Integer; {%H-}AModifyRectMode: TTMSFNCGraphicsModifyRectMode = gcrmShrinkAll); overload; virtual;\r\n procedure DrawRectangle(ALeft, ATop, ARight, ABottom: Integer; ASides: TTMSFNCGraphicsSides; {%H-}AModifyRectMode: TTMSFNCGraphicsModifyRectMode = gcrmShrinkAll); overload; virtual;\r\n procedure DrawEllipse(ALeft, ATop, ARight, ABottom: Integer; {%H-}AModifyRectMode: TTMSFNCGraphicsModifyRectMode = gcrmShrinkAll); overload; virtual;\r\n procedure DrawRectangle(ARect: TRect; {%H-}AModifyRectMode: TTMSFNCGraphicsModifyRectMode = gcrmShrinkAll); overload; virtual;\r\n procedure DrawRectangle(ARect: TRect; ASides: TTMSFNCGraphicsSides; {%H-}AModifyRectMode: TTMSFNCGraphicsModifyRectMode = gcrmShrinkAll); overload; virtual;\r\n procedure DrawRoundRectangle(ALeft, ATop, ARight, ABottom: Double; ARounding: Single = 10; ACorners: TTMSFNCGraphicsCorners = [gcTopLeft, gcTopRight, gcBottomLeft, gcBottomRight]; {%H-}AModifyRectMode: TTMSFNCGraphicsModifyRectMode = gcrmShrinkAll); overload; virtual;\r\n procedure DrawRoundRectangle(ARect: TRectF; ARounding: Single = 10; ACorners: TTMSFNCGraphicsCorners = [gcTopLeft, gcTopRight, gcBottomLeft, gcBottomRight]; {%H-}AModifyRectMode: TTMSFNCGraphicsModifyRectMode = gcrmShrinkAll); overload; virtual;\r\n procedure DrawRoundRectangle(ALeft, ATop, ARight, ABottom: Integer; ARounding: Integer = 10; ACorners: TTMSFNCGraphicsCorners = [gcTopLeft, gcTopRight, gcBottomLeft, gcBottomRight]; {%H-}AModifyRectMode: TTMSFNCGraphicsModifyRectMode = gcrmShrinkAll); overload; virtual;\r\n procedure DrawRoundRectangle(ARect: TRect; ARounding: Integer = 10; ACorners: TTMSFNCGraphicsCorners = [gcTopLeft, gcTopRight, gcBottomLeft, gcBottomRight]; {%H-}AModifyRectMode: TTMSFNCGraphicsModifyRectMode = gcrmShrinkAll); overload; virtual;\r\n procedure DrawEllipse(ARect: TRectF; {%H-}AModifyRectMode: TTMSFNCGraphicsModifyRectMode = gcrmShrinkAll); overload; virtual;\r\n procedure DrawBitmapPart(ASourceLeft, ASourceTop, ASourceRight, ASourceBottom: Double; ADestinationLeft, ADestinationTop, ADestinationRight, ADestinationBottom: Double;\r\n ABitmap: TTMSFNCBitmapHelperClass; AAspectRatio: Boolean = True; AStretch: Boolean = False; ACenter: Boolean = True; ACropping: Boolean = False); overload; virtual;\r\n procedure DrawBitmapPart(ASourceRect: TRectF; ADestinationRect: TRectF; ABitmap: TTMSFNCBitmapHelperClass; AAspectRatio: Boolean = True;\r\n AStretch: Boolean = False; ACenter: Boolean = True; ACropping: Boolean = False); overload; virtual;\r\n procedure DrawBitmap(ALeft, ATop, ARight, ABottom: Double; ABitmap: TTMSFNCBitmapHelperClass; AAspectRatio: Boolean = True;\r\n AStretch: Boolean = False; ACenter: Boolean = True; ACropping: Boolean = False); overload; virtual;\r\n procedure DrawBitmap(ARect: TRectF; ABitmap: TTMSFNCBitmapHelperClass; AAspectRatio: Boolean = True;\r\n AStretch: Boolean = False; ACenter: Boolean = True; ACropping: Boolean = False); overload; virtual;\r\n procedure DrawEllipse(ARect: TRect; {%H-}AModifyRectMode: TTMSFNCGraphicsModifyRectMode = gcrmShrinkAll); overload; virtual;\r\n procedure DrawBitmapPart(ASourceLeft, ASourceTop, ASourceRight, ASourceBottom: Integer; ADestinationLeft, ADestinationTop, ADestinationRight, ADestinationBottom: Integer;\r\n ABitmap: TTMSFNCBitmapHelperClass; AAspectRatio: Boolean = True; AStretch: Boolean = False; ACenter: Boolean = True; ACropping: Boolean = False); overload; virtual;\r\n procedure DrawBitmapPart(ASourceRect: TRect; ADestinationRect: TRect; ABitmap: TTMSFNCBitmapHelperClass; AAspectRatio: Boolean = True;\r\n AStretch: Boolean = False; ACenter: Boolean = True; ACropping: Boolean = False); overload; virtual;\r\n procedure DrawBitmap(ALeft, ATop, ARight, ABottom: Integer; ABitmap: TTMSFNCBitmapHelperClass; AAspectRatio: Boolean = True;\r\n AStretch: Boolean = False; ACenter: Boolean = True; ACropping: Boolean = False); overload; virtual;\r\n procedure DrawBitmap(ARect: TRect; ABitmap: TTMSFNCBitmapHelperClass; AAspectRatio: Boolean = True;\r\n AStretch: Boolean = False; ACenter: Boolean = True; ACropping: Boolean = False); overload; virtual;\r\n procedure DrawBitmap(ALeft, ATop: Integer; ABitmap: TTMSFNCBitmapHelperClass); overload; virtual;\r\n procedure DrawBitmap(ALeft, ATop: Single; ABitmap: TTMSFNCBitmapHelperClass); overload; virtual;\r\n procedure DrawCheckBox(ARect: TRectF; AChecked: Boolean = False; AFocused: Boolean = False; AEnabled: Boolean = True; AScaleFactor: Single = 1.0); overload; virtual;\r\n procedure DrawButton(ARect: TRectF; ADown: Boolean = False; AFocused: Boolean = False; AEnabled: Boolean = True; AAdaptToStyle: Boolean = True; AScaleFactor: Single = 1.0); overload; virtual;\r\n procedure DrawCloseButton(ARect: TRectF; ADown: Boolean = False; AFocused: Boolean = False; AEnabled: Boolean = True; AAdaptToStyle: Boolean = True; AScaleFactor: Single = 1.0); overload; virtual;\r\n procedure DrawExpanderButton(ARect: TRectF; AState: TTMSFNCGraphicsExpanderState = gesExpanded; ADown: Boolean = False; AFocused: Boolean = False; AEnabled: Boolean = True; AAdaptToStyle: Boolean = True; AScaleFactor: Single = 1.0); overload; virtual;\r\n procedure DrawCompactButton(ARect: TRectF; AState: TTMSFNCGraphicsCompactState = gcsExpanded; ADown: Boolean = False; AFocused: Boolean = False; AEnabled: Boolean = True; AAdaptToStyle: Boolean = True; AScaleFactor: Single = 1.0); overload; virtual;\r\n procedure DrawDropDownButton(ARect: TRectF; ADown: Boolean = False; AFocused: Boolean = False; AEnabled: Boolean = True; ACenter: Boolean = False; AAdaptToStyle: Boolean = True; AScaleFactor: Single = 1.0); overload; virtual;\r\n procedure DrawRadioButton(ARect: TRectF; AChecked: Boolean = False; AFocused: Boolean = False; AEnabled: Boolean = True; AScaleFactor: Single = 1.0); overload; virtual;\r\n procedure DrawProgressBar(ARect: TRectF; AValue: Single; AFormat: string = '%.0f%%'; AMax: Single = 100; AColor: TTMSFNCGraphicsColor = gcYellowgreen; ATextColor: TTMSFNCGraphicsColor = gcBlack; AShowText: Boolean = True; AEnabled: Boolean = True; AScaleFactor: Single = 1.0); overload; virtual;\r\n procedure DrawCheckBox(ARect: TRect; AChecked: Boolean = False; AFocused: Boolean = False; AEnabled: Boolean = True; AScaleFactor: Single = 1.0); overload; virtual;\r\n procedure DrawButton(ARect: TRect; ADown: Boolean = False; AFocused: Boolean = False; AEnabled: Boolean = True; AAdaptToStyle: Boolean = True; AScaleFactor: Single = 1.0); overload; virtual;\r\n procedure DrawCloseButton(ARect: TRect; ADown: Boolean = False; AFocused: Boolean = False; AEnabled: Boolean = True; AAdaptToStyle: Boolean = True; AScaleFactor: Single = 1.0); overload; virtual;\r\n procedure DrawExpanderButton(ARect: TRect; AState: TTMSFNCGraphicsExpanderState = gesExpanded; ADown: Boolean = False; AFocused: Boolean = False; AEnabled: Boolean = True; AAdaptToStyle: Boolean = True; AScaleFactor: Single = 1.0); overload; virtual;\r\n procedure DrawCompactButton(ARect: TRect; AState: TTMSFNCGraphicsCompactState = gcsExpanded; ADown: Boolean = False; AFocused: Boolean = False; AEnabled: Boolean = True; AAdaptToStyle: Boolean = True; AScaleFactor: Single = 1.0); overload; virtual;\r\n procedure DrawDropDownButton(ARect: TRect; ADown: Boolean = False; AFocused: Boolean = False; AEnabled: Boolean = True; ACenter: Boolean = False; AAdaptToStyle: Boolean = True; AScaleFactor: Single = 1.0); overload; virtual;\r\n procedure DrawRadioButton(ARect: TRect; AChecked: Boolean = False; AFocused: Boolean = False; AEnabled: Boolean = True; AScaleFactor: Single = 1.0); overload; virtual;\r\n procedure DrawProgressBar(ARect: TRect; AValue: Single; AFormat: string = '%.0f%%'; AMax: Single = 100; AColor: TTMSFNCGraphicsColor = gcYellowgreen; ATextColor: TTMSFNCGraphicsColor = gcBlack; AShowText: Boolean = True; AEnabled: Boolean = True; AScaleFactor: Single = 1.0); overload; virtual;\r\n {$IFNDEF LIMITEDGRAPHICSMODE}\r\n procedure DrawBitmapWithName(ALeft, ATop, ARight, ABottom: Double; ABitmapName: string; AApplyScale: Boolean = False; AScale: Single = 0; AAspectRatio: Boolean = True;\r\n AStretch: Boolean = False; ACenter: Boolean = True; ACropping: Boolean = False); overload; virtual;\r\n procedure DrawBitmapWithName(ARect: TRectF; ABitmapName: string; AApplyScale: Boolean = False; AScale: Single = 0; AAspectRatio: Boolean = True;\r\n AStretch: Boolean = False; ACenter: Boolean = True; ACropping: Boolean = False); overload; virtual;\r\n procedure DrawScaledBitmap(ARect: TRectF; ABitmaps: TTMSFNCScaledBitmaps; AScale: Single = 0; AAspectRatio: Boolean = True;\r\n AStretch: Boolean = False; ACenter: Boolean = True; ACropping: Boolean = False); overload; virtual;\r\n procedure DrawScaledBitmap(ALeft, ATop, ARight, ABottom: Double; ABitmaps: TTMSFNCScaledBitmaps; AScale: Single = 0; AAspectRatio: Boolean = True;\r\n AStretch: Boolean = False; ACenter: Boolean = True; ACropping: Boolean = False); overload; virtual;\r\n procedure DrawBitmapWithName(ALeft, ATop, ARight, ABottom: Integer; ABitmapName: string; AApplyScale: Boolean = False; AScale: Single = 0; AAspectRatio: Boolean = True;\r\n AStretch: Boolean = False; ACenter: Boolean = True; ACropping: Boolean = False); overload; virtual;\r\n procedure DrawBitmapWithName(ARect: TRect; ABitmapName: string; AApplyScale: Boolean = False; AScale: Single = 0; AAspectRatio: Boolean = True;\r\n AStretch: Boolean = False; ACenter: Boolean = True; ACropping: Boolean = False); overload; virtual;\r\n procedure DrawScaledBitmap(ARect: TRect; ABitmaps: TTMSFNCScaledBitmaps; AScale: Single = 0; AAspectRatio: Boolean = True;\r\n AStretch: Boolean = False; ACenter: Boolean = True; ACropping: Boolean = False); overload; virtual;\r\n procedure DrawScaledBitmap(ALeft, ATop, ARight, ABottom: Integer; ABitmaps: TTMSFNCScaledBitmaps; AScale: Single = 0; AAspectRatio: Boolean = True;\r\n AStretch: Boolean = False; ACenter: Boolean = True; ACropping: Boolean = False); overload; virtual;\r\n {$ENDIF}\r\n function GetBitmapDrawRectangle(ALeft, ATop, ARight, ABottom: Double; ABitmap: TTMSFNCBitmapHelperClass; AAspectRatio: Boolean = True;\r\n AStretch: Boolean = False; ACenter: Boolean = True; ACropping: Boolean = False): TRectF; overload; virtual;\r\n function GetBitmapDrawRectangle(ARect: TRectF; ABitmap: TTMSFNCBitmapHelperClass; AAspectRatio: Boolean = True;\r\n AStretch: Boolean = False; ACenter: Boolean = True; ACropping: Boolean = False): TRectF; overload; virtual;\r\n function GetBitmapDrawRectangle(ALeft, ATop, ARight, ABottom: Integer; ABitmap: TTMSFNCBitmapHelperClass; AAspectRatio: Boolean = True;\r\n AStretch: Boolean = False; ACenter: Boolean = True; ACropping: Boolean = False): TRect; overload; virtual;\r\n function GetBitmapDrawRectangle(ARect: TRect; ABitmap: TTMSFNCBitmapHelperClass; AAspectRatio: Boolean = True;\r\n AStretch: Boolean = False; ACenter: Boolean = True; ACropping: Boolean = False): TRect; overload; virtual;\r\n procedure ClipRect(ARect: TRectF); overload; virtual;\r\n function DrawBitmapPartSync(ASourceLeft: Double; ASourceTop: Double; ASourceRight: Double; ASourceBottom: Double; ADestinationLeft: Double; ADestinationTop: Double;\r\n ADestinationRight: Double; ADestinationBottom: Double; ABitmap: TTMSFNCBitmapHelperClass; AAspectRatio: Boolean = True; AStretch: Boolean = False;\r\n ACenter: Boolean = True; ACropping: Boolean = False): TTMSFNCBitmap; virtual; {$IFDEF WEBLIB} async;{$ENDIF}\r\n function CalculateTextSize(AText: string; ARect: TRectF; AWordWrapping: Boolean = False{$IFNDEF LIMITEDGRAPHICSMODE}; ASupportHTML: Boolean = True{$ENDIF}): TSizeF; overload; virtual;\r\n function CalculateTextWidth(AText: string; ARect: TRectF; AWordWrapping: Boolean = False{$IFNDEF LIMITEDGRAPHICSMODE}; ASupportHTML: Boolean = True{$ENDIF}): Single; overload; virtual;\r\n function CalculateTextHeight(AText: string; ARect: TRectF; AWordWrapping: Boolean = False{$IFNDEF LIMITEDGRAPHICSMODE}; ASupportHTML: Boolean = True{$ENDIF}): Single; overload; virtual;\r\n function CalculateText(AText: String; ARect: TRectF; AWordWrapping: Boolean = False{$IFNDEF LIMITEDGRAPHICSMODE}; ASupportHTML: Boolean = True{$ENDIF}): TRectF; overload; virtual;\r\n function CalculateTextSize(AText: string): TSizeF; overload; virtual;\r\n function CalculateTextWidth(AText: string): Single; overload; virtual;\r\n function CalculateTextHeight(AText: string): Single; overload; virtual;\r\n function CalculateText(AText: String): TRectF; overload; virtual;\r\n procedure ClipRect(ARect: TRect); overload; virtual;\r\n function CalculateTextSize(AText: string; ARect: TRect; AWordWrapping: Boolean = False{$IFNDEF LIMITEDGRAPHICSMODE}; ASupportHTML: Boolean = True{$ENDIF}): TSize; overload; virtual;\r\n function CalculateTextWidth(AText: string; ARect: TRect; AWordWrapping: Boolean = False{$IFNDEF LIMITEDGRAPHICSMODE}; ASupportHTML: Boolean = True{$ENDIF}): Integer; overload; virtual;\r\n function CalculateTextHeight(AText: string; ARect: TRect; AWordWrapping: Boolean = False{$IFNDEF LIMITEDGRAPHICSMODE}; ASupportHTML: Boolean = True{$ENDIF}): Integer; overload; virtual;\r\n function CalculateText(AText: String; ARect: TRect; AWordWrapping: Boolean = False{$IFNDEF LIMITEDGRAPHICSMODE}; ASupportHTML: Boolean = True{$ENDIF}): TRect; overload; virtual;\r\n function CalculateTextSizeInt(AText: string): TSize; overload; virtual;\r\n function CalculateTextWidthInt(AText: string): Integer; overload; virtual;\r\n function CalculateTextHeightInt(AText: string): Integer; overload; virtual;\r\n function CalculateTextInt(AText: String): TRect; overload; virtual;\r\n function DrawText(APoint: TPointF; AText: String; AAngle: Single = 0 {$IFNDEF LIMITEDGRAPHICSMODE};ASupportHTML: Boolean = True; ATestAnchor: Boolean = False; AX: Single = -1; AY: Single = - 1{$ENDIF}): String; overload; virtual;\r\n function DrawText(ARect: TRectF; AText: String; AWordWrapping: Boolean = False; AHorizontalAlign: TTMSFNCGraphicsTextAlign = gtaLeading; AVerticalAlign: TTMSFNCGraphicsTextAlign = gtaCenter; ATrimming: TTMSFNCGraphicsTextTrimming = gttNone; AAngle: Single = 0;\r\n AMinWidth: Single = -1; AMinHeight: Single = -1 {$IFNDEF LIMITEDGRAPHICSMODE};ASupportHTML: Boolean = True; ATestAnchor: Boolean = False; AX: Single = -1; AY: Single = - 1{$ENDIF}): String; overload; virtual;\r\n function DrawText(ALeft, ATop, ARight, ABottom: Double; AText: String; AWordWrapping: Boolean = False; AHorizontalAlign: TTMSFNCGraphicsTextAlign = gtaLeading; AVerticalAlign: TTMSFNCGraphicsTextAlign = gtaCenter; ATrimming: TTMSFNCGraphicsTextTrimming = gttNone; AAngle: Single = 0;\r\n AMinWidth: Single = -1; AMinHeight: Single = -1 {$IFNDEF LIMITEDGRAPHICSMODE};ASupportHTML: Boolean = True; ATestAnchor: Boolean = False; AX: Single = -1; AY: Single = - 1{$ENDIF}): String; overload; virtual;\r\n function DrawText(ARect: TRect; AText: String; AWordWrapping: Boolean = False; AHorizontalAlign: TTMSFNCGraphicsTextAlign = gtaLeading; AVerticalAlign: TTMSFNCGraphicsTextAlign = gtaCenter; ATrimming: TTMSFNCGraphicsTextTrimming = gttNone; AAngle: Single = 0;\r\n AMinWidth: Single = -1; AMinHeight: Single = -1 {$IFNDEF LIMITEDGRAPHICSMODE};ASupportHTML: Boolean = True; ATestAnchor: Boolean = False; AX: Single = -1; AY: Single = - 1{$ENDIF}): String; overload; virtual;\r\n function DrawText(ALeft, ATop, ARight, ABottom: Integer; AText: String; AWordWrapping: Boolean = False; AHorizontalAlign: TTMSFNCGraphicsTextAlign = gtaLeading; AVerticalAlign: TTMSFNCGraphicsTextAlign = gtaCenter; ATrimming: TTMSFNCGraphicsTextTrimming = gttNone; AAngle: Single = 0;\r\n AMinWidth: Single = -1; AMinHeight: Single = -1 {$IFNDEF LIMITEDGRAPHICSMODE};ASupportHTML: Boolean = True; ATestAnchor: Boolean = False; AX: Single = -1; AY: Single = - 1{$ENDIF}): String; overload; virtual;\r\n function DrawText(ARect: TRectF; AText: String; var AControlID: String; var AControlValue: String; var AControlType: string;AWordWrapping: Boolean = False; AHorizontalAlign: TTMSFNCGraphicsTextAlign = gtaLeading; AVerticalAlign: TTMSFNCGraphicsTextAlign = gtaCenter; ATrimming: TTMSFNCGraphicsTextTrimming = gttNone; AAngle: Single = 0;\r\n AMinWidth: Single = -1; AMinHeight: Single = -1 {$IFNDEF LIMITEDGRAPHICSMODE};ASupportHTML: Boolean = True; ATestAnchor: Boolean = False; AX: Single = -1; AY: Single = - 1{$ENDIF}): String; overload; virtual;\r\n function DrawText(ALeft, ATop, ARight, ABottom: Double; AText: String; var AControlID: String; var AControlValue: String; var AControlType: string; AWordWrapping: Boolean = False; AHorizontalAlign: TTMSFNCGraphicsTextAlign = gtaLeading; AVerticalAlign: TTMSFNCGraphicsTextAlign = gtaCenter; ATrimming: TTMSFNCGraphicsTextTrimming = gttNone; AAngle: Single = 0;\r\n AMinWidth: Single = -1; AMinHeight: Single = -1 {$IFNDEF LIMITEDGRAPHICSMODE};ASupportHTML: Boolean = True; ATestAnchor: Boolean = False; AX: Single = -1; AY: Single = - 1{$ENDIF}): String; overload; virtual;\r\n function DrawText(ARect: TRect; AText: String; var AControlID: String; var AControlValue: String; var AControlType: string; AWordWrapping: Boolean = False; AHorizontalAlign: TTMSFNCGraphicsTextAlign = gtaLeading; AVerticalAlign: TTMSFNCGraphicsTextAlign = gtaCenter; ATrimming: TTMSFNCGraphicsTextTrimming = gttNone; AAngle: Single = 0;\r\n AMinWidth: Single = -1; AMinHeight: Single = -1 {$IFNDEF LIMITEDGRAPHICSMODE};ASupportHTML: Boolean = True; ATestAnchor: Boolean = False; AX: Single = -1; AY: Single = - 1{$ENDIF}): String; overload; virtual;\r\n function DrawText(ALeft, ATop, ARight, ABottom: Integer; AText: String; var AControlID: String; var AControlValue: String; var AControlType: string; AWordWrapping: Boolean = False; AHorizontalAlign: TTMSFNCGraphicsTextAlign = gtaLeading; AVerticalAlign: TTMSFNCGraphicsTextAlign = gtaCenter; ATrimming: TTMSFNCGraphicsTextTrimming = gttNone; AAngle: Single = 0;\r\n AMinWidth: Single = -1; AMinHeight: Single = -1 {$IFNDEF LIMITEDGRAPHICSMODE};ASupportHTML: Boolean = True; ATestAnchor: Boolean = False; AX: Single = -1; AY: Single = - 1{$ENDIF}): String; overload; virtual;\r\n function SaveState(ACanvasOnly: Boolean = False): TTMSFNCGraphicsSaveState; virtual;\r\n property Fill: TTMSFNCGraphicsFill read FFill;\r\n property Stroke: TTMSFNCGraphicsStroke read FStroke;\r\n property Font: TTMSFNCGraphicsFont read FFont;\r\n property Canvas: TCanvas read GetCanvas;\r\n property Context: TTMSFNCGraphicsContext read GetContext;\r\n property Bitmap: TBitmap read FBitmap;\r\n {$IFNDEF LIMITEDGRAPHICSMODE}\r\n property OptimizedHTMLDrawing: Boolean read FOptimizedHTMLDrawing write FOptimizedHTMLDrawing;\r\n property HighlightColor: TTMSFNCGraphicsColor read FHighlightColor write FHighlightColor;\r\n property HighlightTextColor: TTMSFNCGraphicsColor read FHighlightTextColor write FHighlightTextColor;\r\n property HighlightFontStyle: TFontStyles read FHighlightFontStyles write FHighlightFontStyles;\r\n {$IFDEF CMNLIB}\r\n property ImageList: TCustomImageList read FImageList write FImageList;\r\n {$ENDIF}\r\n property BitmapContainer: TTMSFNCBitmapContainer read FBitmapContainer write FBitmapContainer;\r\n property URLColor: TTMSFNCGraphicsColor read FURLColor write FURLColor default gcBlue;\r\n property URLUnderline: Boolean read FURLUnderline write FURLUnderline default True;\r\n class function ApplyHilight(AText, AHilight, ATag: string; ADoCase: Boolean): string;\r\n class function GetBitmapFromBitmapContainer(ABitmapContainer: TTMSFNCBitmapContainer; AName: string; AApplyScale: Boolean = False; AScale: Single = 0): TTMSFNCBitmap; virtual;\r\n class function GetScaledBitmap(ABitmaps: TTMSFNCScaledBitmaps; AScale: Single = 0; ABitmapContainer: TTMSFNCBitmapContainer = nil): TTMSFNCBitmap;\r\n {$ENDIF}\r\n class procedure GetAspectSize(var AWidth: Single; var AHeight: Single; AOriginalWidth: Single; AOriginalHeight: Single; ANewWidth: Single; ANewHeight: Single; AAspectRatio: Boolean = True;\r\n AStretch: Boolean = False; ACropping: Boolean = False); virtual;\r\n class procedure DrawSample(ACanvas: TCanvas; ARect: TRectF); virtual;\r\n class procedure SetDefaultGraphicColors; virtual;\r\n class function PointInCircle(APoint: TPointF; ACenter: TPointF; const ARadius: Single): Boolean; virtual;\r\n class function PointInPath(APoint: TPointF; APath: TTMSFNCGraphicsPath): Boolean; overload; virtual;\r\n class function PointInPath(APoint: TPoint; APath: TTMSFNCGraphicsPath): Boolean; overload; virtual;\r\n class function PointInPolygon(APoint: TPointF; APolygon: TTMSFNCGraphicsPathPolygon): Boolean; overload; virtual;\r\n class function PointInPolygon(APoint: TPoint; APolygon: TTMSFNCGraphicsPathPolygon): Boolean; overload; virtual;\r\n class function PointInRect(APoint: TPointF; ARect: TRectF): Boolean; overload; virtual;\r\n class function PointInRect(APoint: TPoint; ARect: TRect): Boolean; overload; virtual;\r\n class function GetColorRed(AColor: TTMSFNCGraphicsColor): Byte; virtual;\r\n class function GetColorGreen(AColor: TTMSFNCGraphicsColor): Byte; virtual;\r\n class function GetColorBlue(AColor: TTMSFNCGraphicsColor): Byte; virtual;\r\n {$IFDEF FMXLIB}\r\n class function GetColorAlpha(AColor: TTMSFNCGraphicsColor): Byte; virtual;\r\n {$ENDIF}\r\n class function ColorToHTML(AColor: TTMSFNCGraphicsColor): string; virtual;\r\n class function HTMLToColor(AHTML: string): TTMSFNCGraphicsColor; virtual;\r\n class function TextToColor(AText: string): TTMSFNCGraphicsColor; virtual;\r\n end;\r\n\r\n ITMSFNCGraphicsExport = interface\r\n ['{481CA803-8B50-4545-B212-57AC0D065D09}']\r\n procedure &Export({%H-}AGraphics: TTMSFNCGraphics; {%H-}ARect: TRectF);\r\n procedure ApplyExportScale(AScale: Single);\r\n procedure ResetExportScale;\r\n procedure SetExportRect(AExportRect: TRectF);\r\n end;\r\n\r\n{$IFDEF WEBLIB}\r\nconst\r\n TMSFNCGRAPHICSCLOSE = 'data:image/PNG;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJ'+\r\n 'cEhZcwAACxIAAAsSAdLdfvwAAAAYdEVYdFNvZnR3YXJlAHBhaW50Lm5ldCA0LjAuOWwzfk4AAABVSURBVDhPYxh+'+\r\n 'QBSI/0OYWAFIThjCxA5ACmAYHeCTQwHYFGITwwuQNSBjkgBFmkGAIgNAGv5BaZINQdYMA0Qbgk0zDBBlCCiR4FMA'+\r\n 'khOCMIcJYGAAAHvVMBv6PIFYAAAAAElFTkSuQmCC';\r\n TMSFNCGRAPHICSDOWN = 'data:image/PNG;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEwAACxMBA'+\r\n 'JqcGAAAAGdJREFUOI3tzjsOwjAURNGDUqSgTxU5K2AVrJtswjUsgHSR0qdxAZZFPrS+3ZvRzBsqf9MUtBtazJk+oM'+\r\n 'e0VTriiZCFX8nbpENMgfARjsn74vKj5IFruhfc8d6z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'w47MjosHfsvM7DlzY1JhGN6TQQGBM2bEOgke8IU60tGY4SYlqWGHT7wgC/PPT/SNoFDxH1owKyclWyrawsYJczwj8J'+\r\n 'O1tR4+oFX8OGONtpLLWGCPA47Q7H78ogqd06yoPXeg4qQCTfaDR1x3ZxuapYsl3NDWJnjCtUjcThNTuKHL6cPNM2yj'+\r\n 'hHfMMMQ/tNoGuoNYkeiTwwBjvCKPBlS8QuzFWPoU8QadQ29TY3qbFXxH/Ru2oYKbhww7kSdMXQD8wIToOQZE/AAAAA'+\r\n 'BJRU5ErkJggg==';\r\n TMSFNCGRAPHICSRIGHT = 'data:image/PNG;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEwAACxMB'+\r\n 'AJqcGAAAAFNJREFUOI3tzzsSQFAQRNFDqSezHUuwYBJLsBuhEomE4/ll3HBq+nY1PxENRrS5xzK4L1jPSiISesxP'+\r\n 'JcORJJqwU9xthjrX/ko4mpBQocN0tf1rbDeZDIfcSud0AAAAAElFTkSuQmCC';\r\n TMSFNCGRAPHICSLEFT = 'data:image/PNG;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEwAACxMBA'+\r\n 'JqcGAAAAEpJREFUOI3lzKENgEAQAMEJBkkIDdDTSxp6gqMyCkB8IQgMFdwZAutn+U19Bi84MUbxhZrBawSXB+8RDD'+\r\n 'MaDkyvmQyZyYYuOvh6N24uDUKEV//MAAAAAElFTkSuQmCC';\r\n TMSFNCGRAPHICSEXPAND = 'data:image/PNG;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAHCAYAAADEUlfTAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAOvwAADr8'+\r\n 'BOAVTJAAAABh0RVh0U29mdHdhcmUAcGFpbnQubmV0IDQuMC4zjOaXUAAAACVJREFUGFdj+P//P07MEB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\r\nimplementation\r\n\r\nuses\r\n SysUtils, Math\r\n {$IFNDEF WEBLIB}\r\n {$IFDEF SVGSUPPORT}\r\n ,WEBLib.TMSFNCGraphicsSVGEngine\r\n {$ENDIF}\r\n {$ENDIF}\r\n ,WEBLib.TMSFNCUtils\r\n {$IFNDEF LIMITEDGRAPHICSMODE}\r\n ,WEBLib.TMSFNCHTMLEngine\r\n {$ENDIF}\r\n ,WEBLib.TMSFNCGraphics.General\r\n {$IFDEF WEBLIB}\r\n ,WEBLib.TMSFNCGraphics.WEB\r\n {$ENDIF}\r\n {$IFDEF MSWINDOWS}\r\n ,WEBLib.TMSFNCGraphics.Win\r\n {$ENDIF}\r\n {$IFDEF MACOS}\r\n {$IFDEF IOS}\r\n ,WEBLib.TMSFNCGraphics.iOS\r\n {$ENDIF}\r\n {$IFNDEF IOS}\r\n ,WEBLib.TMSFNCGraphics.Mac\r\n {$ENDIF}\r\n {$ENDIF}\r\n {$IFDEF ANDROID}\r\n ,WEBLib.TMSFNCGraphics.Android\r\n {$ENDIF}\r\n {$IFDEF UNIX}\r\n ,WEBLib.TMSFNCGraphics.Unix\r\n {$ENDIF}\r\n {$IFDEF LCLLIB}\r\n {$IFNDEF MSWINDOWS}\r\n ,LCLIntF\r\n {$ENDIF}\r\n {$ENDIF}\r\n ;\r\n\r\n{$IFNDEF LIMITEDGRAPHICSMODE}\r\n{$R TMSFNCGraphics.res}\r\n{$ENDIF}\r\n\r\nprocedure TTMSFNCGraphics.EndPrinting;\r\nbegin\r\n Context.EndPrinting;\r\nend;\r\n\r\nprocedure TTMSFNCGraphics.EndScene;\r\nbegin\r\n Context.EndScene;\r\nend;\r\n\r\nprocedure TTMSFNCGraphics.BeginPrinting;\r\nbegin\r\n Context.BeginPrinting;\r\nend;\r\n\r\nprocedure TTMSFNCGraphics.BeginScene;\r\nbegin\r\n Context.BeginScene;\r\nend;\r\n\r\nconstructor TTMSFNCGraphics.CreateNativeBitmapCanvas(AWidth: Integer = 1; AHeight: Integer = 1);\r\nbegin\r\n CreateBitmapCanvas(AWidth, AHeight, True);\r\nend;\r\n\r\nconstructor TTMSFNCGraphics.CreateBitmapCanvas(AWidth: Integer = 1; AHeight: Integer = 1; ANative: Boolean = False; AHighDPI: Boolean = True);\r\nbegin\r\n FNative := ANative;\r\n FBitmap := TBitmap.Create{$IFDEF FMXLIB}(AWidth, AHeight){$ENDIF};\r\n {$IFDEF FMXLIB}\r\n if AHighDPI then\r\n FBitmap.BitmapScale := TTMSFNCUtils.GetDPIScale;\r\n {$ENDIF}\r\n FBitmap.Width := AWidth;\r\n FBitmap.Height := AHeight;\r\n FActiveCanvas := FBitmap.Canvas;\r\n if not ANative then\r\n begin\r\n FContextGeneral := TTMSFNCGraphicsContextGeneral.Create(Self);\r\n FContextGeneral.SetSize(AWidth, AHeight);\r\n end\r\n else\r\n begin\r\n FContextNative := GetNativeContextClass.Create(Self);\r\n FContextNative.SetSize(AWidth, AHeight);\r\n end;\r\n\r\n FFill := TTMSFNCGraphicsFill.Create;\r\n FFill.OnChanged := @FillChanged;\r\n FStroke := TTMSFNCGraphicsStroke.Create;\r\n FStroke.OnChanged := @StrokeChanged;\r\n FFont := TTMSFNCGraphicsFont.Create;\r\n FFont.OnChanged := @FontChanged;\r\n InitializeDefaultAppearance;\r\nend;\r\n\r\nconstructor TTMSFNCGraphics.CreateNative(ACanvas: TCanvas);\r\nbegin\r\n Create(ACanvas, True);\r\nend;\r\n\r\nconstructor TTMSFNCGraphics.Create(ACanvas: TCanvas; ANative: Boolean = False);\r\nbegin\r\n FNative := ANative;\r\n FActiveCanvas := ACanvas;\r\n if not ANative then\r\n begin\r\n FContextGeneral := TTMSFNCGraphicsContextGeneral.Create(Self);\r\n FContextGeneral.SetSize(1, 1);\r\n end\r\n else\r\n begin\r\n FContextNative := GetNativeContextClass.Create(Self);\r\n FContextNative.SetSize(1, 1);\r\n end;\r\n\r\n FSaveFont := TTMSFNCGraphicsFont.Create;\r\n if Assigned(ACanvas) then\r\n FSaveFont.Assign(ACanvas.Font);\r\n\r\n FFill := TTMSFNCGraphicsFill.Create;\r\n FFill.OnChanged := @FillChanged;\r\n FStroke := TTMSFNCGraphicsStroke.Create;\r\n FStroke.OnChanged := @StrokeChanged;\r\n FFont := TTMSFNCGraphicsFont.Create;\r\n FFont.OnChanged := @FontChanged;\r\n {$IFNDEF LIMITEDGRAPHICSMODE}\r\n FHighlightColor := gcBlue;\r\n FHighlightTextColor := gcWhite;\r\n FHighlightFontStyles := [];\r\n {$eNDIF}\r\n\r\n InitializeDefaultAppearance;\r\nend;\r\n\r\nprocedure TTMSFNCGraphics.RestoreState(AState: TTMSFNCGraphicsSaveState; ACanvasOnly: Boolean = False);\r\nbegin\r\n if not ACanvasOnly then\r\n begin\r\n SetFill(AState.Fill);\r\n SetStroke(AState.Stroke);\r\n SetFont(AState.Font);\r\n end;\r\n\r\n Context.RestoreState(AState);\r\n\r\n AState.Free;\r\nend;\r\n\r\nfunction TTMSFNCGraphics.SaveState(ACanvasOnly: Boolean = False): TTMSFNCGraphicsSaveState;\r\nbegin\r\n Result := TTMSFNCGraphicsSaveState.Create;\r\n\r\n if not ACanvasOnly then\r\n begin\r\n Result.Fill.Assign(FFill);\r\n Result.Stroke.Assign(FStroke);\r\n Result.Font.AssignSource(FFont);\r\n end;\r\n\r\n Context.SaveState(Result);\r\nend;\r\n\r\nprocedure TTMSFNCGraphics.StopSpecialPen;\r\nbegin\r\n Context.StopSpecialPen;\r\nend;\r\n\r\nprocedure TTMSFNCGraphics.StartSpecialPen;\r\nbegin\r\n Context.StartSpecialPen;\r\nend;\r\n\r\nprocedure TTMSFNCGraphics.Assign(Source: TTMSFNCGraphics);\r\nbegin\r\n if Source is TTMSFNCGraphics then\r\n begin\r\n FFill.BeginUpdate;\r\n FFill.Assign((Source as TTMSFNCGraphics).Fill);\r\n FFill.EndUpdate;\r\n FStroke.BeginUpdate;\r\n FStroke.Assign((Source as TTMSFNCGraphics).Stroke);\r\n FStroke.EndUpdate;\r\n FFont.BeginUpdate;\r\n FFont.AssignSource((Source as TTMSFNCGraphics).Font);\r\n FFont.EndUpdate;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCGraphics.SetFill(AFill: TTMSFNCGraphicsFill);\r\nbegin\r\n if FBlockUpdate > 0 then\r\n Exit;\r\n\r\n Inc(FBlockUpdate);\r\n Context.SetFill(AFill);\r\n FFill.Assign(AFill);\r\n Dec(FBlockUpdate);\r\nend;\r\n\r\nprocedure TTMSFNCGraphics.SetFillKind(AKind: TTMSFNCGraphicsFillKind);\r\nbegin\r\n if FBlockUpdate > 0 then\r\n Exit;\r\n\r\n Inc(FBlockUpdate);\r\n Context.SetFillKind(AKind);\r\n FFill.Kind := AKind;\r\n Dec(FBlockUpdate);\r\nend;\r\n\r\nprocedure TTMSFNCGraphics.SetFillColor(AColor: TTMSFNCGraphicsColor);\r\nbegin\r\n if FBlockUpdate > 0 then\r\n Exit;\r\n\r\n Inc(FBlockUpdate);\r\n Context.SetFillColor(AColor);\r\n FFill.Color := AColor;\r\n Dec(FBlockUpdate);\r\nend;\r\n\r\nprocedure TTMSFNCGraphics.SetStrokeKind(AKind: TTMSFNCGraphicsStrokeKind);\r\nbegin\r\n if FBlockUpdate > 0 then\r\n Exit;\r\n\r\n Inc(FBlockUpdate);\r\n Context.SetStrokeKind(AKind);\r\n FStroke.Kind := AKind;\r\n Dec(FBlockUpdate);\r\nend;\r\n\r\nprocedure TTMSFNCGraphics.SetStroke(AStroke: TTMSFNCGraphicsStroke);\r\nbegin\r\n if FBlockUpdate > 0 then\r\n Exit;\r\n\r\n Inc(FBlockUpdate);\r\n Context.SetStroke(AStroke);\r\n FStroke.Assign(AStroke);\r\n Dec(FBlockUpdate);\r\nend;\r\n\r\nprocedure TTMSFNCGraphics.SetStrokeWidth(AWidth: Single);\r\nbegin\r\n if FBlockUpdate > 0 then\r\n Exit;\r\n\r\n Inc(FBlockUpdate);\r\n Context.SetStrokeWidth(AWidth);\r\n FStroke.Width := AWidth;\r\n Dec(FBlockUpdate);\r\nend;\r\n\r\nprocedure TTMSFNCGraphics.SetStrokeColor(AColor: TTMSFNCGraphicsColor);\r\nbegin\r\n if FBlockUpdate > 0 then\r\n Exit;\r\n\r\n Inc(FBlockUpdate);\r\n Context.SetStrokeColor(AColor);\r\n FStroke.Color := AColor;\r\n Dec(FBlockUpdate);\r\nend;\r\n\r\nprocedure TTMSFNCGraphics.DrawLine(AFromPoint: TPoint; AToPoint: TPoint; AModifyPointModeFrom: TTMSFNCGraphicsModifyPointMode = gcpmRightDown;\r\n AModifyPointModeTo: TTMSFNCGraphicsModifyPointMode = gcpmRightDown);\r\nbegin\r\n DrawLine(ConvertToPointF(AFromPoint), ConvertToPointF(AToPoint), AModifyPointModeFrom, AModifyPointModeTo);\r\nend;\r\n\r\nprocedure TTMSFNCGraphics.DrawLine(AFromPoint: TPointF; AToPoint: TPointF; AModifyPointModeFrom: TTMSFNCGraphicsModifyPointMode = gcpmRightDown;\r\n AModifyPointModeTo: TTMSFNCGraphicsModifyPointMode = gcpmRightDown);\r\nbegin\r\n if (FStroke.Color <> gcNull) and (FStroke.Kind <> gskNone) then\r\n Context.DrawLine(FStroke, AFromPoint, AToPoint, AModifyPointModeFrom, AModifyPointModeTo);\r\nend;\r\n\r\nprocedure TTMSFNCGraphics.DrawPolyline(APolyline: TTMSFNCGraphicsPathPolygon);\r\nbegin\r\n if (FFill.Color <> gcNull) and (FFill.Kind <> gfkNone) then\r\n Context.FillPolyline(FFill, APolyline);\r\n\r\n if (FStroke.Color <> gcNull) and (FStroke.Kind <> gskNone) then\r\n Context.DrawPolyline(FStroke, APolyline);\r\nend;\r\n\r\nprocedure TTMSFNCGraphics.DrawPolygon(APolygon: TTMSFNCGraphicsPathPolygon);\r\nvar\r\n pth: TTMSFNCGraphicsPath;\r\nbegin\r\n if ((FFill.Color <> gcNull) and (FFill.Kind <> gfkNone)) or (FFill.Kind = gfkTexture) then\r\n begin\r\n case FFill.Kind of\r\n gfkTexture:\r\n begin\r\n pth := TTMSFNCGraphicsPath.Create;\r\n try\r\n pth.AddPolygon(APolygon);\r\n DrawTexture(pth.GetBounds, FFill.Texture, FFill.TextureMode);\r\n finally\r\n pth.Free;\r\n end;\r\n end;\r\n else\r\n Context.FillPolygon(FFill, APolygon);\r\n end;\r\n end;\r\n\r\n if (FStroke.Color <> gcNull) and (FStroke.Kind <> gskNone) then\r\n Context.DrawPolygon(FStroke, APolygon);\r\nend;\r\n\r\nprocedure TTMSFNCGraphics.DrawPath(APath: TTMSFNCGraphicsPath; APathMode: TTMSFNCGraphicsPathDrawMode = pdmPolygon);\r\nbegin\r\n if ((FFill.Color <> gcNull) and (FFill.Kind <> gfkNone)) or (FFill.Kind = gfkTexture) then\r\n begin\r\n case FFill.Kind of\r\n gfkTexture: DrawTexture(APath.GetBounds, FFill.Texture, FFill.TextureMode);\r\n else\r\n Context.FillPath(FFill, APath, APathMode);\r\n end;\r\n end;\r\n\r\n if (FStroke.Color <> gcNull) and (FStroke.Kind <> gskNone) then\r\n Context.DrawPath(FStroke, APath, APathMode);\r\nend;\r\n\r\nprocedure TTMSFNCGraphics.DrawArc(const Center: TPoint; const Radius: TPoint; StartAngle: Integer; SweepAngle: Integer);\r\nbegin\r\n DrawArc(ConvertToPointF(Center), ConvertToPointF(Radius), StartAngle, SweepAngle);\r\nend;\r\n\r\nprocedure TTMSFNCGraphics.DrawArc(const Center: TPointF; const Radius: TPointF; StartAngle: Single; SweepAngle: Single);\r\nvar\r\n pth: TTMSFNCGraphicsPath;\r\nbegin\r\n if (FFill.Color <> gcNull) and (FFill.Kind <> gfkNone) then\r\n begin\r\n case FFill.Kind of\r\n gfkTexture:\r\n begin\r\n pth := TTMSFNCGraphicsPath.Create;\r\n try\r\n pth.AddArc(Center, Radius, StartAngle, SweepAngle);\r\n DrawTexture(pth.GetBounds, FFill.Texture, FFill.TextureMode);\r\n finally\r\n pth.Free;\r\n end;\r\n end;\r\n else\r\n Context.FillArc(FFill, Center, Radius, StartAngle, SweepAngle);\r\n end;\r\n end;\r\n\r\n if (FStroke.Color <> gcNull) and (FStroke.Kind <> gskNone) then\r\n Context.DrawArc(FStroke, Center, Radius, StartAngle, SweepAngle);\r\nend;\r\n\r\nprocedure TTMSFNCGraphics.DrawRoundRectangle(ARect: TRect; ARounding: Integer = 10; ACorners: TTMSFNCGraphicsCorners = [gcTopLeft, gcTopRight, gcBottomLeft, gcBottomRight]; AModifyRectMode: TTMSFNCGraphicsModifyRectMode = gcrmShrinkAll);\r\nbegin\r\n DrawRoundRectangle(ConvertToRectF(ARect), ARounding, ACorners);\r\nend;\r\n\r\nprocedure TTMSFNCGraphics.DrawRoundRectangle(ARect: TRectF; ARounding: Single = 10; ACorners: TTMSFNCGraphicsCorners = [gcTopLeft, gcTopRight, gcBottomLeft, gcBottomRight]; AModifyRectMode: TTMSFNCGraphicsModifyRectMode = gcrmShrinkAll);\r\nbegin\r\n DrawRoundRectangle(ARect.Left, ARect.Top, ARect.Right, ARect.Bottom, ARounding, ACorners, AModifyRectMode);\r\nend;\r\n\r\nprocedure TTMSFNCGraphics.DrawRectangle(ALeft: Integer; ATop: Integer; ARight: Integer; ABottom: Integer; AModifyRectMode: TTMSFNCGraphicsModifyRectMode = gcrmShrinkAll);\r\nbegin\r\n DrawRectangle(RectF(ALeft, ATop, ARight, ABottom), AModifyRectMode);\r\nend;\r\n\r\nprocedure TTMSFNCGraphics.DrawRectangle(ALeft: Double; ATop: Double; ARight: Double; ABottom: Double; AModifyRectMode: TTMSFNCGraphicsModifyRectMode = gcrmShrinkAll);\r\nbegin\r\n DrawRectangle(ALeft, ATop, ARight, ABottom, AllSides, AModifyRectMode);\r\nend;\r\n\r\nprocedure TTMSFNCGraphics.DrawRectangle(ALeft: Integer; ATop: Integer; ARight: Integer; ABottom: Integer; ASides: TTMSFNCGraphicsSides; AModifyRectMode: TTMSFNCGraphicsModifyRectMode = gcrmShrinkAll);\r\nbegin\r\n DrawRectangle(RectF(ALeft, ATop, ARight, ABottom), ASides, AModifyRectMode);\r\nend;\r\n\r\nprocedure TTMSFNCGraphics.DrawRectangle(ALeft: Double; ATop: Double; ARight: Double; ABottom: Double; ASides: TTMSFNCGraphicsSides; AModifyRectMode: TTMSFNCGraphicsModifyRectMode = gcrmShrinkAll);\r\nvar\r\n r: TRectF;\r\n pth: TTMSFNCGraphicsPath;\r\nbegin\r\n r := RectF(ALeft, ATop, ARight, ABottom);\r\n if ((FFill.Color <> gcNull) and (FFill.Kind <> gfkNone)) or (FFill.Kind = gfkTexture) then\r\n begin\r\n case FFill.Kind of\r\n gfkTexture:\r\n begin\r\n pth := TTMSFNCGraphicsPath.Create;\r\n try\r\n pth.AddRectangle(r);\r\n DrawTexture(r, FFill.Texture, FFill.TextureMode);\r\n finally\r\n pth.Free;\r\n end;\r\n end;\r\n else\r\n Context.FillRect(FFill, r, AModifyRectMode);\r\n end;\r\n end;\r\n\r\n if (FStroke.Color <> gcNull) and (FStroke.Kind <> gskNone) then\r\n Context.DrawRect(FStroke, r, ASides, AModifyRectMode);\r\nend;\r\n\r\nprocedure TTMSFNCGraphics.DrawRoundRectangle(ALeft: Integer; ATop: Integer; ARight: Integer; ABottom: Integer; ARounding: Integer = 10; ACorners: TTMSFNCGraphicsCorners = [gcTopLeft, gcTopRight, gcBottomLeft, gcBottomRight]; AModifyRectMode: TTMSFNCGraphicsModifyRectMode = gcrmShrinkAll);\r\nbegin\r\n DrawRoundRectangle(RectF(ALeft, ATop, ARight, ABottom), ARounding, ACorners);\r\nend;\r\n\r\nprocedure TTMSFNCGraphics.DrawRoundRectangle(ALeft: Double; ATop: Double; ARight: Double; ABottom: Double; ARounding: Single = 10; ACorners: TTMSFNCGraphicsCorners = [gcTopLeft, gcTopRight, gcBottomLeft, gcBottomRight]; AModifyRectMode: TTMSFNCGraphicsModifyRectMode = gcrmShrinkAll);\r\nvar\r\n r: TRectF;\r\n rc: Single;\r\n pth: TTMSFNCGraphicsPath;\r\nbegin\r\n r := RectF(ALeft, ATop, ARight, ABottom);\r\n if ((FFill.Color <> gcNull) and (FFill.Kind <> gfkNone)) or (FFill.Kind = gfkTexture) then\r\n begin\r\n case FFill.Kind of\r\n gfkTexture:\r\n begin\r\n pth := TTMSFNCGraphicsPath.Create;\r\n try\r\n rc := ARounding;\r\n if gcBottomLeft in ACorners then\r\n begin\r\n pth.MoveTo(PointF(r.Left + rc, r.Bottom));\r\n pth.AddArc(PointF(r.Left + rc, r.Bottom - rc), PointF(rc, rc), -270, 90);\r\n pth.LineTo(PointF(r.Left, r.Bottom - rc));\r\n end\r\n else\r\n begin\r\n pth.MoveTo(PointF(r.Left, r.Bottom));\r\n end;\r\n\r\n if gcTopLeft in ACorners then\r\n begin\r\n pth.LineTo(PointF(r.Left, r.Top + rc));\r\n pth.AddArc(PointF(r.Left + rc, r.Top + rc), PointF(rc, rc), -180, 90);\r\n pth.LineTo(PointF(r.Left + rc, r.Top));\r\n end\r\n else\r\n pth.LineTo(PointF(r.Left, r.Top));\r\n\r\n if gcTopRight in ACorners then\r\n begin\r\n pth.LineTo(PointF(r.Right - rc, r.Top));\r\n pth.AddArc(PointF(r.Right - rc, r.Top + rc), PointF(rc, rc), -90, 90);\r\n pth.LineTo(PointF(r.Right, r.Top + rc));\r\n end\r\n else\r\n pth.LineTo(PointF(r.Right, r.Top));\r\n\r\n if gcBottomRight in ACorners then\r\n begin\r\n pth.LineTo(PointF(r.Right, r.Bottom - rc));\r\n pth.AddArc(PointF(r.Right - rc, r.Bottom - rc), PointF(rc, rc), 0, 90);\r\n pth.LineTo(PointF(r.Right - rc, r.Bottom));\r\n end\r\n else\r\n pth.LineTo(PointF(r.Right, r.Bottom));\r\n\r\n if gcBottomLeft in ACorners then\r\n pth.LineTo(PointF(r.Left + rc, r.Bottom))\r\n else\r\n pth.LineTo(PointF(r.Left, r.Bottom));\r\n\r\n pth.ClosePath;\r\n\r\n DrawTexture(r, FFill.Texture, FFill.TextureMode);\r\n finally\r\n pth.Free;\r\n end;\r\n end;\r\n else\r\n Context.FillRoundRect(FFill, r, ARounding, ACorners, AModifyRectMode);\r\n end;\r\n end;\r\n\r\n if (FStroke.Color <> gcNull) and (FStroke.Kind <> gskNone) then\r\n Context.DrawRoundRect(FStroke, r, ARounding, ACorners, AModifyRectMode);\r\nend;\r\n\r\nprocedure TTMSFNCGraphics.DrawRectangle(ARect: TRect; ASides: TTMSFNCGraphicsSides; AModifyRectMode: TTMSFNCGraphicsModifyRectMode = gcrmShrinkAll);\r\nbegin\r\n DrawRectangle(ConvertToRectF(ARect), ASides, AModifyRectMode);\r\nend;\r\n\r\nprocedure TTMSFNCGraphics.DrawRectangle(ARect: TRectF; ASides: TTMSFNCGraphicsSides; AModifyRectMode: TTMSFNCGraphicsModifyRectMode = gcrmShrinkAll);\r\nbegin\r\n DrawRectangle(ARect.Left, ARect.Top, ARect.Right, ARect.Bottom, ASides, AModifyRectMode);\r\nend;\r\n\r\nprocedure TTMSFNCGraphics.DrawRectangle(ARect: TRect; AModifyRectMode: TTMSFNCGraphicsModifyRectMode = gcrmShrinkAll);\r\nbegin\r\n DrawRectangle(ConvertToRectF(ARect), AModifyRectMode);\r\nend;\r\n\r\nprocedure TTMSFNCGraphics.DrawRectangle(ARect: TRectF; AModifyRectMode: TTMSFNCGraphicsModifyRectMode = gcrmShrinkAll);\r\nbegin\r\n DrawRectangle(ARect.Left, ARect.Top, ARect.Right, ARect.Bottom, AModifyRectMode);\r\nend;\r\n\r\nprocedure TTMSFNCGraphics.SetFontSize(ASize: Integer);\r\nbegin\r\n if FBlockUpdate > 0 then\r\n Exit;\r\n\r\n Inc(FBlockUpdate);\r\n Context.SetFontSize(ASize);\r\n FFont.Size := ASize;\r\n Dec(FBlockUpdate);\r\nend;\r\n\r\nfunction TTMSFNCGraphics.GetMatrix: TTMSFNCGraphicsMatrix;\r\nbegin\r\n Result := Context.GetMatrix;\r\nend;\r\n\r\nprocedure TTMSFNCGraphics.SetMatrix(const AMatrix: TTMSFNCGraphicsMatrix);\r\nbegin\r\n Context.SetMatrix(AMatrix);\r\nend;\r\n\r\nprocedure TTMSFNCGraphics.SetFontColor(AColor: TTMSFNCGraphicsColor);\r\nbegin\r\n if FBlockUpdate > 0 then\r\n Exit;\r\n\r\n Inc(FBlockUpdate);\r\n Context.SetFontColor(AColor);\r\n FFont.Color := AColor;\r\n Dec(FBlockUpdate);\r\nend;\r\n\r\nprocedure TTMSFNCGraphics.SetFontName(AName: string);\r\nbegin\r\n if FBlockUpdate > 0 then\r\n Exit;\r\n\r\n Inc(FBlockUpdate);\r\n Context.SetFontName(AName);\r\n FFont.Name := AName;\r\n Dec(FBlockUpdate);\r\nend;\r\n\r\nprocedure TTMSFNCGraphics.SetFont(AFont: TTMSFNCGraphicsFont);\r\nbegin\r\n if FBlockUpdate > 0 then\r\n Exit;\r\n\r\n Inc(FBlockUpdate);\r\n Context.SetFont(AFont);\r\n FFont.AssignSource(AFont);\r\n Dec(FBlockUpdate);\r\nend;\r\n\r\nprocedure TTMSFNCGraphics.SetFontStyles(AStyle: TFontStyles);\r\nbegin\r\n if FBlockUpdate > 0 then\r\n Exit;\r\n\r\n Inc(FBlockUpdate);\r\n Context.SetFontStyles(AStyle);\r\n FFont.Style := AStyle;\r\n Dec(FBlockUpdate);\r\nend;\r\n\r\ndestructor TTMSFNCGraphics.Destroy;\r\nbegin\r\n if Assigned(FContextNative) then\r\n begin\r\n FContextNative.Free;\r\n FContextNative := nil;\r\n end;\r\n\r\n if Assigned(FContextGeneral) then\r\n begin\r\n FContextGeneral.Free;\r\n FContextGeneral := nil;\r\n end;\r\n\r\n if Assigned(FFont) then\r\n begin\r\n FFont.Free;\r\n FFont := nil;\r\n end;\r\n\r\n if Assigned(FSaveFont) and Assigned(FActiveCanvas) then\r\n begin\r\n FActiveCanvas.Font.Assign(FSaveFont);\r\n FSaveFont.Free;\r\n FSaveFont := nil;\r\n end;\r\n\r\n if Assigned(FFill) then\r\n begin\r\n FFill.OnChanged := nil;\r\n FFill.Free;\r\n FFill := nil;\r\n end;\r\n\r\n if Assigned(FStroke) then\r\n begin\r\n FStroke.OnChanged := nil;\r\n FStroke.Free;\r\n FStroke := nil;\r\n end;\r\n\r\n {$IFNDEF LIMITEDGRAPHICSMODE}\r\n FBitmapContainer := nil;\r\n {$IFDEF CMNLIB}\r\n FImageList := nil;\r\n {$ENDIF}\r\n {$ENDIF}\r\n\r\n if Assigned(FBitmap) then\r\n begin\r\n FBitmap.Free;\r\n FBitmap := nil;\r\n end;\r\n\r\n inherited;\r\nend;\r\n\r\nprocedure TTMSFNCGraphics.DrawCloseButton(ARect: TRect; ADown: Boolean = False; AFocused: Boolean = False; AEnabled: Boolean = True; AAdaptToStyle: Boolean = True; AScaleFactor: Single = 1.0);\r\nbegin\r\n DrawCloseButton(ConvertToRectF(ARect), ADown, AFocused, AEnabled, AAdaptToStyle, AScaleFactor);\r\nend;\r\n\r\nprocedure TTMSFNCGraphics.DrawCloseButton(ARect: TRectF; ADown: Boolean = False; AFocused: Boolean = False; AEnabled: Boolean = True; AAdaptToStyle: Boolean = True; AScaleFactor: Single = 1.0);\r\nvar\r\n bmp: TTMSFNCBitmapHelperClass;\r\n bmpa: TBitmap;\r\n r: TRectF;\r\n g: TTMSFNCGraphics;\r\nbegin\r\n DrawButton(ARect, ADown, AFocused, AEnabled, AAdaptToStyle, AScaleFactor);\r\n if AAdaptToStyle then\r\n begin\r\n bmpa := TBitmap.Create;\r\n bmpa.SetSize(Round(16 * AScaleFactor), Round(16 * AScaleFactor));\r\n {$IFDEF CMNLIB}\r\n bmpa.TransparentMode := tmFixed;\r\n bmpa.Transparent := True;\r\n bmpa.TransparentColor := gcWhite;\r\n {$ENDIF}\r\n g := TTMSFNCGraphics.Create(bmpa.Canvas);\r\n try\r\n g.BeginScene;\r\n {$IFDEF CMNLIB}\r\n g.Fill.Color := gcWhite;\r\n g.Fill.Kind := gfkSolid;\r\n g.Stroke.Kind := gskSolid;\r\n g.Stroke.Color := gcWhite;\r\n g.DrawRectangle(0, 0, bmpa.Width, bmpa.Height);\r\n {$ENDIF}\r\n g.Stroke.Kind := gskSolid;\r\n g.Stroke.Color := TTMSFNCGraphics.DefaultSelectionFillColor;\r\n g.Stroke.Width := 2;\r\n g.DrawLine(PointF(3 * AScaleFactor, 3 * AScaleFactor), PointF(12 * AScaleFactor, 12 * AScaleFactor), gcpmRightDown);\r\n g.DrawLine(PointF(3 * AScaleFactor, 12 * AScaleFactor), PointF(12 * AScaleFactor, 3 * AScaleFactor), gcpmRightDown);\r\n finally\r\n g.EndScene;\r\n g.Free;\r\n end;\r\n\r\n try\r\n r := ARect;\r\n bmp := TTMSFNCBitmap.Create;\r\n try\r\n bmp.Assign(bmpa);\r\n DrawBitmap(r, bmp);\r\n finally\r\n bmp.Free;\r\n end;\r\n finally\r\n bmpa.Free;\r\n end;\r\n end\r\n else\r\n begin\r\n bmp := TTMSFNCBitmap.CreateFromResource(TMSFNCGRAPHICSCLOSESVG);\r\n\r\n try\r\n r := ARect;\r\n InflateRectEx(r, - 6 * AScaleFactor, - 6 * AScaleFactor);\r\n DrawBitmap(r, bmp);\r\n finally\r\n bmp.Free;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCGraphics.DrawExpanderButton(ARect: TRect; AState: TTMSFNCGraphicsExpanderState = gesExpanded; ADown: Boolean = False; AFocused: Boolean = False; AEnabled: Boolean = True; AAdaptToStyle: Boolean = True; AScaleFactor: Single = 1.0);\r\nbegin\r\n DrawExpanderButton(ConvertToRectF(ARect), AState, ADown, AFocused, AEnabled, AAdaptToStyle, AScaleFactor);\r\nend;\r\n\r\nprocedure TTMSFNCGraphics.DrawExpanderButton(ARect: TRectF; AState: TTMSFNCGraphicsExpanderState = gesExpanded; ADown: Boolean = False; AFocused: Boolean = False; AEnabled: Boolean = True; AAdaptToStyle: Boolean = True; AScaleFactor: Single = 1.0);\r\nvar\r\n bmpa: TBitmap;\r\n bmp: TTMSFNCBitmapHelperClass;\r\n r: TRectF;\r\n g: TTMSFNCGraphics;\r\nbegin\r\n DrawButton(ARect, ADown, AFocused, AEnabled, AAdaptToStyle, AScaleFactor);\r\n if AAdaptToStyle then\r\n begin\r\n bmpa := TBitmap.Create;\r\n bmpa.SetSize(Round(16 * AScaleFactor), Round(16 * AScaleFactor));\r\n {$IFDEF CMNLIB}\r\n bmpa.TransparentMode := tmFixed;\r\n bmpa.Transparent := True;\r\n bmpa.TransparentColor := gcWhite;\r\n {$ENDIF}\r\n g := TTMSFNCGraphics.Create(bmpa.Canvas);\r\n try\r\n g.BeginScene;\r\n {$IFDEF CMNLIB}\r\n g.Fill.Color := gcWhite;\r\n g.Fill.Kind := gfkSolid;\r\n g.Stroke.Kind := gskSolid;\r\n g.Stroke.Color := gcWhite;\r\n g.DrawRectangle(0, 0, bmpa.Width, bmpa.Height);\r\n {$ENDIF}\r\n g.Stroke.Kind := gskSolid;\r\n g.Stroke.Width := 2;\r\n g.Stroke.Color := TTMSFNCGraphics.DefaultSelectionFillColor;\r\n case AState of\r\n gesCollapsed:\r\n begin\r\n g.DrawLine(PointF(5 * AScaleFactor, 6 * AScaleFactor), PointF(8 * AScaleFactor, 9 * AScaleFactor), gcpmRightDown);\r\n g.DrawLine(PointF(8 * AScaleFactor, 9 * AScaleFactor), PointF(11 * AScaleFactor, 6 * AScaleFactor), gcpmRightDown);\r\n end;\r\n gesExpanded:\r\n begin\r\n g.DrawLine(PointF(5 * AScaleFactor, 9 * AScaleFactor), PointF(8 * AScaleFactor, 6 * AScaleFactor), gcpmRightDown);\r\n g.DrawLine(PointF(8 * AScaleFactor, 6 * AScaleFactor), PointF(11 * AScaleFactor, 9 * AScaleFactor), gcpmRightDown);\r\n end;\r\n end;\r\n finally\r\n g.EndScene;\r\n g.Free;\r\n end;\r\n\r\n if Assigned(bmpa) then\r\n begin\r\n try\r\n r := ARect;\r\n bmp := TTMSFNCBitmap.Create;\r\n try\r\n bmp.Assign(bmpa);\r\n DrawBitmap(r, bmp);\r\n finally\r\n bmp.Free;\r\n end;\r\n finally\r\n bmpa.Free;\r\n end;\r\n end;\r\n end\r\n else\r\n begin\r\n case AState of\r\n gesCollapsed: bmp := TTMSFNCBitmap.CreateFromResource(TMSFNCGRAPHICSDOWNSVG);\r\n gesExpanded: bmp := TTMSFNCBitmap.CreateFromResource(TMSFNCGRAPHICSUPSVG);\r\n else\r\n bmp := nil;\r\n end;\r\n\r\n if Assigned(bmp) then\r\n begin\r\n try\r\n r := ARect;\r\n InflateRectEx(r, -4 * AScaleFactor, -4 * AScaleFactor);\r\n DrawBitmap(r, bmp);\r\n finally\r\n bmp.Free;\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCGraphics.DrawCompactButton(ARect: TRect; AState: TTMSFNCGraphicsCompactState = gcsExpanded; ADown: Boolean = False; AFocused: Boolean = False; AEnabled: Boolean = True; AAdaptToStyle: Boolean = True; AScaleFactor: Single = 1.0);\r\nbegin\r\n DrawCompactButton(ConvertToRectF(ARect), AState, ADown, AFocused, AEnabled, AAdaptToStyle, AScaleFactor);\r\nend;\r\n\r\nprocedure TTMSFNCGraphics.DrawCompactButton(ARect: TRectF; AState: TTMSFNCGraphicsCompactState = gcsExpanded; ADown: Boolean = False; AFocused: Boolean = False; AEnabled: Boolean = True; AAdaptToStyle: Boolean = True; AScaleFactor: Single = 1.0);\r\nvar\r\n bmpa: TBitmap;\r\n bmp: TTMSFNCBitmapHelperClass;\r\n r: TRectF;\r\n g: TTMSFNCGraphics;\r\nbegin\r\n DrawButton(ARect, ADown, AFocused, AEnabled, AAdaptToStyle, AScaleFactor);\r\n if AAdaptToStyle then\r\n begin\r\n bmpa := TBitmap.Create;\r\n bmpa.SetSize(Round(16 * AScaleFactor), Round(16 * AScaleFactor));\r\n {$IFDEF CMNLIB}\r\n bmpa.TransparentMode := tmFixed;\r\n bmpa.Transparent := True;\r\n bmpa.TransparentColor := gcWhite;\r\n {$ENDIF}\r\n g := TTMSFNCGraphics.Create(bmpa.Canvas);\r\n try\r\n g.BeginScene;\r\n {$IFDEF CMNLIB}\r\n g.Fill.Color := gcWhite;\r\n g.Fill.Kind := gfkSolid;\r\n g.Stroke.Kind := gskSolid;\r\n g.Stroke.Color := gcWhite;\r\n g.DrawRectangle(0, 0, bmpa.Width, bmpa.Height);\r\n {$ENDIF}\r\n g.Stroke.Kind := gskSolid;\r\n g.Stroke.Width := 2;\r\n g.Stroke.Color := TTMSFNCGraphics.DefaultSelectionFillColor;\r\n case AState of\r\n gcsCollapsed:\r\n begin\r\n g.DrawLine(PointF(6 * AScaleFactor, 5 * AScaleFactor), PointF(9 * AScaleFactor, 8 * AScaleFactor), gcpmRightDown);\r\n g.DrawLine(PointF(9 * AScaleFactor, 8 * AScaleFactor), PointF(6 * AScaleFactor, 11 * AScaleFactor), gcpmRightDown);\r\n end;\r\n gcsExpanded:\r\n begin\r\n g.DrawLine(PointF(9 * AScaleFactor, 5 * AScaleFactor), PointF(6 * AScaleFactor, 8 * AScaleFactor), gcpmRightDown);\r\n g.DrawLine(PointF(6 * AScaleFactor, 8 * AScaleFactor), PointF(9 * AScaleFactor, 11 * AScaleFactor), gcpmRightDown);\r\n end;\r\n end;\r\n finally\r\n g.EndScene;\r\n g.Free;\r\n end;\r\n\r\n if Assigned(bmpa) then\r\n begin\r\n try\r\n r := ARect;\r\n bmp := TTMSFNCBitmap.Create;\r\n try\r\n bmp.Assign(bmpa);\r\n DrawBitmap(r, bmp);\r\n finally\r\n bmp.Free;\r\n end;\r\n finally\r\n bmpa.Free;\r\n end;\r\n end;\r\n end\r\n else\r\n begin\r\n case AState of\r\n gcsCollapsed: bmp := TTMSFNCBitmap.CreateFromResource(TMSFNCGRAPHICSRIGHTSVG);\r\n gcsExpanded: bmp := TTMSFNCBitmap.CreateFromResource(TMSFNCGRAPHICSLEFTSVG);\r\n else\r\n bmp := nil;\r\n end;\r\n\r\n if Assigned(bmp) then\r\n begin\r\n try\r\n r := ARect;\r\n InflateRectEx(r, -4 * AScaleFactor, -4 * AScaleFactor);\r\n DrawBitmap(r, bmp);\r\n finally\r\n bmp.Free;\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCGraphics.DrawDropDownButton(ARect: TRect; ADown: Boolean = False; AFocused: Boolean = False; AEnabled: Boolean = True; ACenter: Boolean = False; AAdaptToStyle: Boolean = True; AScaleFactor: Single = 1.0);\r\nbegin\r\n DrawDropDownButton(ConvertToRectF(ARect), ADown, AFocused, AEnabled, ACenter, AAdaptToStyle, AScaleFactor);\r\nend;\r\n\r\nprocedure TTMSFNCGraphics.DrawDropDownButton(ARect: TRectF; ADown: Boolean = False; AFocused: Boolean = False; AEnabled: Boolean = True; ACenter: Boolean = False; AAdaptToStyle: Boolean = True; AScaleFactor: Single = 1.0);\r\nvar\r\n bmp: TTMSFNCBitmapHelperClass;\r\n bmpa: TBitmap;\r\n r: TRectF;\r\n g: TTMSFNCGraphics;\r\nbegin\r\n DrawButton(ARect, ADown, AFocused, AEnabled, AAdaptToStyle);\r\n if AAdaptToStyle then\r\n begin\r\n bmpa := TBitmap.Create;\r\n bmpa.SetSize(Round(7 * AScaleFactor), Round(7 * AScaleFactor));\r\n {$IFDEF CMNLIB}\r\n bmpa.TransparentMode := tmFixed;\r\n bmpa.Transparent := True;\r\n bmpa.TransparentColor := gcWhite;\r\n {$ENDIF}\r\n g := TTMSFNCGraphics.Create(bmpa.Canvas);\r\n try\r\n g.BeginScene;\r\n {$IFDEF CMNLIB}\r\n g.Fill.Color := gcWhite;\r\n g.Fill.Kind := gfkSolid;\r\n g.Stroke.Kind := gskSolid;\r\n g.Stroke.Color := gcWhite;\r\n g.DrawRectangle(0, 0, bmpa.Width, bmpa.Height);\r\n {$ENDIF}\r\n g.Stroke.Kind := gskSolid;\r\n g.Stroke.Color := TTMSFNCGraphics.DefaultSelectionFillColor;\r\n g.DrawLine(PointF(0, 1 * AScaleFactor), PointF(6 * AScaleFactor, 1 * AScaleFactor), gcpmRightDown);\r\n g.DrawLine(PointF(0, 2 * AScaleFactor), PointF(6 * AScaleFactor, 2 * AScaleFactor), gcpmRightDown);\r\n g.DrawLine(PointF(1 * AScaleFactor, 3 * AScaleFactor), PointF(5 * AScaleFactor, 3 * AScaleFactor), gcpmRightDown);\r\n g.DrawLine(PointF(2 * AScaleFactor, 4 * AScaleFactor), PointF(4 * AScaleFactor, 4 * AScaleFactor), gcpmRightDown);\r\n g.DrawLine(PointF(3 * AScaleFactor, 5 * AScaleFactor), PointF(3 * AScaleFactor, 5 * AScaleFactor), gcpmRightDown);\r\n finally\r\n g.EndScene;\r\n g.Free;\r\n end;\r\n\r\n try\r\n if (ARect.Right - bmpa.Width - 10 * AScaleFactor > ARect.Left) and not ACenter then\r\n r := RectF(ARect.Right - bmpa.Width - 10 * AScaleFactor, ARect.Top, ARect.Right, ARect.Bottom)\r\n else\r\n r := ARect;\r\n\r\n bmp := TTMSFNCBitmap.Create;\r\n try\r\n bmp.Assign(bmpa);\r\n DrawBitmap(r, bmp);\r\n finally\r\n bmp.Free;\r\n end;\r\n finally\r\n bmpa.Free;\r\n end;\r\n end\r\n else\r\n begin\r\n bmp := TTMSFNCBitmap.Create;\r\n bmp.LoadFromResource(TMSFNCGRAPHICSEXPANDSVG);\r\n\r\n try\r\n if not ACenter then\r\n begin\r\n r := RectF(ARect.Right - (16 * AScaleFactor), ARect.Top, ARect.Right - 2 * AScaleFactor, ARect.Bottom);\r\n InflateRectEx(r, - 2 * AScaleFactor, - 2 * AScaleFactor);\r\n end\r\n else\r\n begin\r\n r := ARect;\r\n InflateRectEx(r, - 4 * AScaleFactor, - 4 * AScaleFactor);\r\n end;\r\n\r\n DrawBitmap(r, bmp);\r\n finally\r\n bmp.Free;\r\n end;\r\n end;\r\nend;\r\n\r\n\r\nprocedure TTMSFNCGraphics.DrawButton(ARect: TRect; ADown: Boolean = False; AFocused: Boolean = False; AEnabled: Boolean = True; AAdaptToStyle: Boolean = True; AScaleFactor: Single = 1.0);\r\nbegin\r\n DrawButton(ConvertToRectF(ARect), ADown, AFocused, AEnabled, AAdaptToStyle, AScaleFactor);\r\nend;\r\n\r\nprocedure TTMSFNCGraphics.DrawButton(ARect: TRectF; ADown: Boolean = False; AFocused: Boolean = False; AEnabled: Boolean = True; AAdaptToStyle: Boolean = True; AScaleFactor: Single = 1.0);\r\nvar\r\n r: TRectF;\r\nbegin\r\n r := ARect;\r\n Stroke.Kind := gskSolid;\r\n Stroke.Width := 1;\r\n Fill.Kind := gfkSolid;\r\n\r\n if AAdaptToStyle then\r\n begin\r\n if AEnabled then\r\n begin\r\n if not AFocused then\r\n begin\r\n Stroke.Color := TTMSFNCGraphics.DefaultButtonStrokeColor;\r\n Fill.Color := TTMSFNCGraphics.DefaultButtonFillColor;\r\n end\r\n else\r\n begin\r\n Stroke.Color := TTMSFNCGraphics.DefaultButtonStrokeColorFocused;\r\n Fill.Color := TTMSFNCGraphics.DefaultButtonFillColorFocused;\r\n end;\r\n end\r\n else\r\n begin\r\n Stroke.Color := TTMSFNCGraphics.DefaultButtonStrokeColorDisabled;\r\n Fill.Color := TTMSFNCGraphics.DefaultButtonFillColorDisabled;\r\n end;\r\n end\r\n else\r\n begin\r\n if AEnabled then\r\n begin\r\n if not AFocused then\r\n begin\r\n Stroke.Color := gcDarkGray;\r\n Fill.Color := MakeGraphicsColor(225, 225, 225);\r\n end\r\n else\r\n begin\r\n Stroke.Color := MakeGraphicsColor(60, 127, 177);\r\n Fill.Color := MakeGraphicsColor(229, 241, 251);\r\n end;\r\n end\r\n else\r\n begin\r\n Stroke.Color := gcDarkGray;\r\n Fill.Color := gcLightgray;\r\n end;\r\n end;\r\n\r\n DrawRectangle(r);\r\n InflateRectEx(r, -1, -1);\r\n Fill.Kind := gfkNone;\r\n\r\n if not ADown then\r\n Stroke.Color := Fill.Color\r\n else\r\n Stroke.Color := Lighter(Stroke.Color, 40);\r\n\r\n DrawRectangle(r);\r\nend;\r\n\r\nprocedure TTMSFNCGraphics.DrawCheckBox(ARect: TRect; AChecked: Boolean = False; AFocused: Boolean = False; AEnabled: Boolean = True; AScaleFactor: Single = 1.0);\r\nbegin\r\n DrawCheckBox(ConvertToRectF(ARect), AChecked, AFocused, AEnabled, AScaleFactor);\r\nend;\r\n\r\nprocedure TTMSFNCGraphics.DrawCheckBox(ARect: TRectF; AChecked: Boolean = False; AFocused: Boolean = False; AEnabled: Boolean = True; AScaleFactor: Single = 1.0);\r\nvar\r\n c: TTMSFNCGraphicsColor;\r\n r: TRectF;\r\nbegin\r\n r := ARect;\r\n InflateRectEx(r, -1, -1);\r\n\r\n if AEnabled then\r\n begin\r\n if AFocused then\r\n c := gcSteelBlue\r\n else\r\n c := gcBlack;\r\n end\r\n else\r\n c := gcDarkgray;\r\n\r\n Fill.Kind := gfkSolid;\r\n if AEnabled then\r\n Fill.Color := Lighter(gcLightgray, 85)\r\n else\r\n Fill.Color := gcLightgray;\r\n\r\n Stroke.Width := 1;\r\n Stroke.Kind := gskSolid;\r\n Stroke.Color := c;\r\n DrawRectangle(r);\r\n InflateRectEx(r, -(r.Right - r.Left) / 5, -(r.Bottom - r.Top) / 5);\r\n Stroke.Width := 2;\r\n Stroke.Color := c;\r\n if AChecked then\r\n begin\r\n {$IFDEF FMXLIB}\r\n DrawLine(PointF(r.Left + 1, r.Top + 1), PointF(r.Right - 1, r.Bottom - 1));\r\n DrawLine(PointF(r.Right - 1, r.Top + 1), PointF(r.Left + 1, r.Bottom - 1));\r\n {$ENDIF}\r\n {$IFDEF CMNWEBLIB}\r\n DrawLine(PointF(r.Left, r.Top), PointF(r.Right - 1, r.Bottom - 1));\r\n DrawLine(PointF(r.Right - 1, r.Top), PointF(r.Left, r.Bottom - 1));\r\n {$ENDIF}\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCGraphics.DrawProgressBar(ARect: TRect; AValue: Single; AFormat: string = '%.0f%%'; AMax: Single = 100; AColor: TTMSFNCGraphicsColor = gcYellowgreen; ATextColor: TTMSFNCGraphicsColor = gcBlack; AShowText: Boolean = True; AEnabled: Boolean = True; AScaleFactor: Single = 1.0);\r\nbegin\r\n DrawProgressBar(ConvertToRectF(ARect), AValue, AFormat, AMax, AColor, ATextColor, AShowText, AEnabled, AScaleFactor);\r\nend;\r\n\r\nprocedure TTMSFNCGraphics.DrawProgressBar(ARect: TRectF; AValue: Single; AFormat: string = '%.0f%%'; AMax: Single = 100; AColor: TTMSFNCGraphicsColor = gcYellowgreen; ATextColor: TTMSFNCGraphicsColor = gcBlack; AShowText: Boolean = True; AEnabled: Boolean = True; AScaleFactor: Single = 1.0);\r\nvar\r\n r, rp: TRectF;\r\n v: Single;\r\n tc, fc: TTMSFNCGraphicsColor;\r\nbegin\r\n r := ARect;\r\n rp := r;\r\n\r\n fc := Fill.Color;\r\n if AEnabled then\r\n Fill.Color := Lighter(gcLightGray, 75)\r\n else\r\n Fill.Color := gcLightGray;\r\n\r\n Fill.Kind := gfkSolid;\r\n Stroke.Kind := gskSolid;\r\n Stroke.Color := gcDarkgray;\r\n\r\n DrawRectangle(r);\r\n\r\n v := Max(0, Min(AValue, AMax));\r\n\r\n if (v >= 0) and (v <= AMax) and (AMax > 0) then\r\n begin\r\n InflateRectEx(rp, -1, -1);\r\n rp.Right := rp.Left + (rp.Right - r.Left) * v / AMax;\r\n\r\n Fill.Color := AColor;\r\n Stroke.Color := Fill.Color;\r\n\r\n DrawRectangle(rp);\r\n\r\n if AShowText then\r\n begin\r\n tc := Font.Color;\r\n Font.Color := ATextColor;\r\n DrawText(r, Format(AFormat, [v / AMax * 100]), False, gtaCenter, gtaCenter);\r\n Font.Color := tc;\r\n end;\r\n end;\r\n\r\n Fill.Color := fc;\r\n\r\nend;\r\n\r\nprocedure TTMSFNCGraphics.DrawRadioButton(ARect: TRect; AChecked: Boolean = False; AFocused: Boolean = False; AEnabled: Boolean = True; AScaleFactor: Single = 1.0);\r\nbegin\r\n DrawRadioButton(ConvertToRectF(ARect), AChecked, AFocused, AEnabled, AScaleFactor);\r\nend;\r\n\r\nprocedure TTMSFNCGraphics.DrawRadioButton(ARect: TRectF; AChecked: Boolean = False; AFocused: Boolean = False; AEnabled: Boolean = True; AScaleFactor: Single = 1.0);\r\nvar\r\n c: TTMSFNCGraphicsColor;\r\n r: TRectF;\r\nbegin\r\n r := ARect;\r\n InflateRectEx(r, -1, -1);\r\n\r\n if AEnabled then\r\n begin\r\n if AFocused then\r\n c := gcSteelBlue\r\n else\r\n c := gcBlack;\r\n end\r\n else\r\n c := gcDarkgray;\r\n\r\n Fill.Kind := gfkSolid;\r\n if AEnabled then\r\n Fill.Color := Lighter(gcLightgray, 85)\r\n else\r\n Fill.Color := gcLightgray;\r\n\r\n Stroke.Kind := gskSolid;\r\n Stroke.Width := 1;\r\n Stroke.Color := c;\r\n DrawEllipse(r);\r\n InflateRectEx(r, -(r.Right - r.Left) / 5, -(r.Bottom - r.Top) / 5);\r\n Fill.Kind := gfkSolid;\r\n Fill.Color := c;\r\n if AChecked then\r\n begin\r\n DrawEllipse(r);\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCGraphics.DrawBitmap(ALeft, ATop: Single; ABitmap: TTMSFNCBitmapHelperClass);\r\nbegin\r\n DrawBitmap(RectF(ALeft, ATop, ALeft + ABitmap.Width, ATop + ABitmap.Height), ABitmap);\r\nend;\r\n\r\nprocedure TTMSFNCGraphics.DrawBitmap(ALeft, ATop: Integer; ABitmap: TTMSFNCBitmapHelperClass);\r\nbegin\r\n DrawBitmap(Rect(ALeft, ATop, ALeft + ABitmap.Width, ATop + ABitmap.Height), ABitmap);\r\nend;\r\n\r\nprocedure TTMSFNCGraphics.DrawBitmap(ARect: TRect; ABitmap: TTMSFNCBitmapHelperClass; AAspectRatio: Boolean = True;\r\n AStretch: Boolean = False; ACenter: Boolean = True; ACropping: Boolean = False);\r\nbegin\r\n DrawBitmap(ConvertToRectF(ARect), ABitmap, AAspectRatio, AStretch, ACenter, ACropping);\r\nend;\r\n\r\nprocedure TTMSFNCGraphics.DrawBitmap(ARect: TRectF; ABitmap: TTMSFNCBitmapHelperClass; AAspectRatio: Boolean = True;\r\n AStretch: Boolean = False; ACenter: Boolean = True; ACropping: Boolean = False);\r\nbegin\r\n DrawBitmap(ARect.Left, ARect.Top, ARect.Right, ARect.Bottom, ABitmap, AAspectRatio, AStretch, ACenter, ACropping);\r\nend;\r\n\r\nprocedure TTMSFNCGraphics.DrawBitmap(ALeft: Integer; ATop: Integer; ARight: Integer; ABottom: Integer; ABitmap: TTMSFNCBitmapHelperClass; AAspectRatio: Boolean = True;\r\n AStretch: Boolean = False; ACenter: Boolean = True; ACropping: Boolean = False);\r\nbegin\r\n DrawBitmap(RectF(ALeft, ATop, ARight, ABottom), ABitmap, AAspectRatio, AStretch, ACenter, ACropping);\r\nend;\r\n\r\nprocedure TTMSFNCGraphics.DrawBitmap(ALeft: Double; ATop: Double; ARight: Double; ABottom: Double; ABitmap: TTMSFNCBitmapHelperClass; AAspectRatio: Boolean = True;\r\n AStretch: Boolean = False; ACenter: Boolean = True; ACropping: Boolean = False);\r\nvar\r\n r: TRectF;\r\nbegin\r\n if not Assigned(ABitmap) then\r\n Exit;\r\n\r\n r := RectF(ALeft, ATop, ARight, ABottom);\r\n r := GetBitmapDrawRectangle(r, ABitmap, AAspectRatio, AStretch, ACenter, ACropping);\r\n\r\n {$IFDEF SVGSUPPORT}\r\n if not DrawSVG(ABitmap, r) then\r\n {$ENDIF}\r\n Context.DrawBitmap(BitmapToDrawBitmap(ABitmap), RectF(0, 0, ABitmap.Width, ABitmap.Height), r, 1);\r\nend;\r\n\r\nfunction TTMSFNCGraphics.InternalDrawBitmapPartSync(ASourceLeft: Double; ASourceTop: Double; ASourceRight: Double; ASourceBottom: Double; ADestinationLeft: Double; ADestinationTop: Double;\r\n ADestinationRight: Double; ADestinationBottom: Double; ABitmap: TTMSFNCBitmapHelperClass; AAspectRatio: Boolean = True; AStretch: Boolean = False;\r\n ACenter: Boolean = True; ACropping: Boolean = False): {$IFDEF WEBLIB}TJSPromise{$ELSE}TTMSFNCBitmap{$ENDIF};\r\nvar\r\n r, rs: TRectF;\r\n {$IFNDEF WEBLIB}\r\n g: TTMSFNCGraphics;\r\n bmp: TTMSFNCBitmap;\r\n {$ENDIF}\r\nbegin\r\n Result := nil;\r\n r := RectF(ADestinationLeft, ADestinationTop, ADestinationRight, ADestinationBottom);\r\n rs := RectF(ASourceLeft, ASourceTop, ASourceRight, ASourceBottom);\r\n if RectIsEmpty(r) or RectIsEmpty(rs) then\r\n Exit;\r\n\r\n {$IFDEF SVGSUPPORT}\r\n if not HasSVG(ABitmap) then\r\n {$ENDIF}\r\n begin\r\n {$IFDEF WEBLIB}\r\n Result := TJSPromise.New(\r\n procedure(AResolve, AReject : TJSPromiseResolver)\r\n var\r\n bmp: TTMSFNCBitmap;\r\n g: TTMSFNCGraphics;\r\n begin\r\n {$ENDIF}\r\n g := TTMSFNCGraphics.CreateBitmapCanvas(Round(ASourceRight - ASourceLeft), Round(ASourceBottom - ASourceTop), FNative);\r\n try\r\n g.BeginScene;\r\n g.DrawBitmap(-ASourceLeft, -ASourceTop, -ASourceLeft + g.Bitmap.Width, -ASourceTop + g.Bitmap.Height, ABitmap, False, False, False, False);\r\n g.EndScene;\r\n bmp := TTMSFNCBitmap.Create;\r\n bmp.Assign(g.Bitmap);\r\n {$IFDEF WEBLIB}\r\n AResolve(bmp);\r\n {$ELSE}\r\n Result := bmp;\r\n {$ENDIF}\r\n finally\r\n g.Free;\r\n end;\r\n {$IFDEF WEBLIB}\r\n end);\r\n {$ENDIF}\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCGraphics.DrawBitmapPartSync(ASourceLeft: Double; ASourceTop: Double; ASourceRight: Double; ASourceBottom: Double; ADestinationLeft: Double; ADestinationTop: Double;\r\n ADestinationRight: Double; ADestinationBottom: Double; ABitmap: TTMSFNCBitmapHelperClass; AAspectRatio: Boolean = True; AStretch: Boolean = False;\r\n ACenter: Boolean = True; ACropping: Boolean = False): TTMSFNCBitmap;\r\nbegin\r\n Result := {$IFDEF WEBLIB}await(TTMSFNCBitmap,{$ENDIF} InternalDrawBitmapPartSync(ASourceLeft, ASourceTop, ASourceRight, ASourceBottom,\r\n ADestinationLeft, ADestinationTop, ADestinationRight, ADestinationBottom, ABitmap, AAspectRatio, AStretch, ACenter, ACropping){$IFDEF WEBLIB}){$ENDIF};\r\nend;\r\n\r\nprocedure TTMSFNCGraphics.DrawBitmapPart(ASourceRect: TRect; ADestinationRect: TRect; ABitmap: TTMSFNCBitmapHelperClass; AAspectRatio: Boolean = True;\r\n AStretch: Boolean = False; ACenter: Boolean = True; ACropping: Boolean = False);\r\nbegin\r\n DrawBitmapPart(ConvertToRectF(ASourceRect), ConvertToRectF(ADestinationRect), ABitmap, AAspectRatio, AStretch, ACenter, ACropping);\r\nend;\r\n\r\nprocedure TTMSFNCGraphics.DrawBitmapPart(ASourceRect: TRectF; ADestinationRect: TRectF; ABitmap: TTMSFNCBitmapHelperClass; AAspectRatio: Boolean = True;\r\n AStretch: Boolean = False; ACenter: Boolean = True; ACropping: Boolean = False);\r\nbegin\r\n DrawBitmapPart(ASourceRect.Left, ASourceRect.Top, ASourceRect.Right, ASourceRect.Bottom, ADestinationRect.Left, ADestinationRect.Top, ADestinationRect.Right, ADestinationRect.Bottom,\r\n ABitmap, AAspectRatio, AStretch, ACenter, ACropping);\r\nend;\r\n\r\nprocedure TTMSFNCGraphics.DrawBitmapPart(ASourceLeft: Integer; ASourceTop: Integer; ASourceRight: Integer; ASourceBottom: Integer; ADestinationLeft: Integer; ADestinationTop: Integer;\r\n ADestinationRight: Integer; ADestinationBottom: Integer; ABitmap: TTMSFNCBitmapHelperClass; AAspectRatio: Boolean = True; AStretch: Boolean = False;\r\n ACenter: Boolean = True; ACropping: Boolean = False);\r\nbegin\r\n DrawBitmapPart(RectF(ASourceLeft, ASourceTop, ASourceRight, ASourceBottom), RectF(ADestinationLeft, ADestinationTop, ADestinationRight, ADestinationBottom), ABitmap, AAspectRatio, AStretch, ACenter, ACropping);\r\nend;\r\n\r\nprocedure TTMSFNCGraphics.DrawBitmapPart(ASourceLeft: Double; ASourceTop: Double; ASourceRight: Double; ASourceBottom: Double; ADestinationLeft: Double; ADestinationTop: Double;\r\n ADestinationRight: Double; ADestinationBottom: Double; ABitmap: TTMSFNCBitmapHelperClass; AAspectRatio: Boolean = True; AStretch: Boolean = False;\r\n ACenter: Boolean = True; ACropping: Boolean = False);\r\nvar\r\n r, rs: TRectF;\r\n g: TTMSFNCGraphics;\r\n bmp: TTMSFNCBitmap;\r\nbegin\r\n r := RectF(ADestinationLeft, ADestinationTop, ADestinationRight, ADestinationBottom);\r\n rs := RectF(ASourceLeft, ASourceTop, ASourceRight, ASourceBottom);\r\n if RectIsEmpty(r) or RectIsEmpty(rs) then\r\n Exit;\r\n\r\n {$IFDEF SVGSUPPORT}\r\n if not DrawSVG(ABitmap, r) then\r\n {$ENDIF}\r\n begin\r\n g := TTMSFNCGraphics.CreateBitmapCanvas(Round(ASourceRight - ASourceLeft), Round(ASourceBottom - ASourceTop), FNative);\r\n try\r\n g.BeginScene;\r\n g.DrawBitmap(-ASourceLeft, -ASourceTop, -ASourceLeft + g.Bitmap.Width, -ASourceTop + g.Bitmap.Height, ABitmap, False, False, False, False);\r\n g.EndScene;\r\n bmp := TTMSFNCBitmap.Create;\r\n try\r\n bmp.Assign(g.Bitmap);\r\n DrawBitmap(r, bmp, AAspectRatio, AStretch, ACenter, ACropping);\r\n finally\r\n bmp.Free;\r\n end;\r\n finally\r\n g.Free;\r\n end;\r\n end;\r\nend;\r\n\r\nclass procedure TTMSFNCGraphics.GetAspectSize(var AWidth: Single; var AHeight: Single; AOriginalWidth: Single; AOriginalHeight: Single; ANewWidth: Single; ANewHeight: Single;\r\n AAspectRatio: Boolean = True; AStretch: Boolean = False; ACropping: Boolean = False);\r\nvar\r\n arc, ar: Single;\r\nbegin\r\n if AAspectRatio then\r\n begin\r\n if (AOriginalWidth > 0) and (AOriginalHeight > 0) and (ANewWidth > 0) and (ANewHeight > 0) then\r\n begin\r\n if (AOriginalWidth < ANewWidth) and (AOriginalHeight < ANewHeight) and (not AStretch) then\r\n begin\r\n AWidth := AOriginalWidth;\r\n AHeight := AOriginalHeight;\r\n end\r\n else\r\n begin\r\n if AOriginalWidth / AOriginalHeight < ANewWidth / ANewHeight then\r\n begin\r\n AHeight := ANewHeight;\r\n AWidth := ANewHeight * AOriginalWidth / AOriginalHeight;\r\n end\r\n else\r\n begin\r\n AWidth := ANewWidth;\r\n AHeight := ANewWidth * AOriginalHeight / AOriginalWidth;\r\n end;\r\n end;\r\n end\r\n else\r\n begin\r\n AWidth := 0;\r\n AHeight := 0;\r\n end;\r\n end\r\n else\r\n begin\r\n if AStretch then\r\n begin\r\n AWidth := ANewWidth;\r\n AHeight := ANewHeight;\r\n end\r\n else\r\n begin\r\n AWidth := AOriginalWidth;\r\n AHeight := AOriginalHeight;\r\n\r\n if ACropping then\r\n begin\r\n if (AWidth >= AHeight) and (AWidth > 0) then\r\n begin\r\n AHeight := AOriginalWidth / AWidth * AHeight;\r\n AWidth := AOriginalWidth;\r\n end\r\n else\r\n if (AHeight >= AWidth) and (AHeight > 0) then\r\n begin\r\n AWidth := AOriginalHeight / AHeight * AWidth;\r\n AHeight := AOriginalHeight;\r\n end;\r\n\r\n if AHeight = 0 then\r\n ar := 1\r\n else\r\n ar := AWidth / AHeight;\r\n\r\n if AOriginalHeight = 0 then\r\n arc := 1\r\n else\r\n arc := AOriginalWidth / AOriginalHeight;\r\n\r\n if (ar < 1) or (arc > ar) then\r\n begin\r\n AHeight := AOriginalWidth / ar;\r\n AWidth := AOriginalWidth;\r\n end\r\n else\r\n begin\r\n AWidth := ar * AOriginalHeight;\r\n AHeight := AOriginalHeight;\r\n end;\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCGraphics.GetBitmapDrawRectangle(ALeft: Integer; ATop: Integer; ARight: Integer; ABottom: Integer; ABitmap: TTMSFNCBitmapHelperClass;\r\n AAspectRatio: Boolean = True; AStretch: Boolean = False; ACenter: Boolean = True; ACropping: Boolean = False): TRect;\r\nbegin\r\n Result := ConvertToRect(GetBitmapDrawRectangle(RectF(ALeft, ATop, ARight, ABottom), ABitmap, AAspectRatio, AStretch, ACenter, ACropping));\r\nend;\r\n\r\nfunction TTMSFNCGraphics.GetBitmapDrawRectangle(ALeft: Double; ATop: Double; ARight: Double; ABottom: Double; ABitmap: TTMSFNCBitmapHelperClass;\r\n AAspectRatio: Boolean = True; AStretch: Boolean = False; ACenter: Boolean = True; ACropping: Boolean = False): TRectF;\r\nvar\r\n bmp: TTMSFNCBitmapHelperClass;\r\n rdest: TRectF;\r\n w, h: Single;\r\n x, y: Single;\r\nbegin\r\n Result := RectF(0, 0, 0, 0);\r\n bmp := ABitmap;\r\n if Assigned(bmp) then\r\n begin\r\n x := 0;\r\n y := 0;\r\n w := 0;\r\n h := 0;\r\n GetAspectSize(w, h, bmp.Width, bmp.Height, ARight - ALeft, ABottom - ATop, AAspectRatio, AStretch, ACropping);\r\n if ACenter or ACropping then\r\n begin\r\n x := Round((ARight - ALeft - w) / 2);\r\n y := Round((ABottom - ATop - h) / 2);\r\n end;\r\n\r\n rdest := RectF(ALeft + x, ATop + y, ALeft + x + w, ATop + y + h);\r\n Result := rdest;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCGraphics.GetBitmapDrawRectangle(ARect: TRect; ABitmap: TTMSFNCBitmapHelperClass;\r\n AAspectRatio: Boolean = True; AStretch: Boolean = False; ACenter: Boolean = True; ACropping: Boolean = False): TRect;\r\nbegin\r\n Result := ConvertToRect(GetBitmapDrawRectangle(ConvertToRectF(ARect), ABitmap, AAspectRatio, AStretch, ACenter, ACropping));\r\nend;\r\n\r\nfunction TTMSFNCGraphics.GetBitmapDrawRectangle(ARect: TRectF; ABitmap: TTMSFNCBitmapHelperClass;\r\n AAspectRatio: Boolean = True; AStretch: Boolean = False; ACenter: Boolean = True; ACropping: Boolean = False): TRectF;\r\nbegin\r\n Result := GetBitmapDrawRectangle(ARect.Left, ARect.Top, ARect.Right, ARect.Bottom, ABitmap, AAspectRatio, AStretch, ACenter, ACropping);\r\nend;\r\n\r\nfunction TTMSFNCGraphics.GetContext: TTMSFNCGraphicsContext;\r\nbegin\r\n if FNative then\r\n Result := FContextNative\r\n else\r\n Result := FContextGeneral;\r\nend;\r\n\r\nfunction TTMSFNCGraphics.GetCanvas: TCanvas;\r\nbegin\r\n Result := FActiveCanvas;\r\nend;\r\n\r\n{$IFNDEF LIMITEDGRAPHICSMODE}\r\nclass function TTMSFNCGraphics.GetScaledBitmap(ABitmaps: TTMSFNCScaledBitmaps; AScale: Single = 0; ABitmapContainer: TTMSFNCBitmapContainer = nil): TTMSFNCBitmap;\r\nvar\r\n b: TTMSFNCScaledBitmap;\r\n bmp: TTMSFNCBitmap;\r\nbegin\r\n Result := nil;\r\n if Assigned(ABitmaps) then\r\n begin\r\n if AScale > 0 then\r\n b := ABitmaps.GetItemByScale(AScale)\r\n else\r\n b := ABitmaps.GetItemByScale(TTMSFNCUtils.GetDPIScale);\r\n\r\n if Assigned(b) then\r\n begin\r\n if Assigned(b.Bitmap) and not IsBitmapEmpty(b.Bitmap) then\r\n Result := b.Bitmap\r\n else\r\n begin\r\n bmp := GetBitmapFromBitmapContainer(ABitmapContainer, b.BitmapName, True, AScale);\r\n if Assigned(bmp) and not IsBitmapEmpty(bmp) then\r\n Result := bmp\r\n else\r\n begin\r\n bmp := GetBitmapFromBitmapContainer(ABitmapContainer, b.BitmapName, False);\r\n if Assigned(bmp) and not IsBitmapEmpty(bmp) then\r\n Result := bmp\r\n end;\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\nclass function TTMSFNCGraphics.ApplyHilight(AText: string; AHilight: string; ATag: string; ADoCase: Boolean): String;\r\nbegin\r\n Result := HiLight(AText, AHilight, ATag, ADoCase, False);\r\nend;\r\n\r\nclass function TTMSFNCGraphics.GetBitmapFromBitmapContainer(ABitmapContainer: TTMSFNCBitmapContainer; AName: string; AApplyScale: Boolean = False; AScale: Single = 0): TTMSFNCBitmap;\r\nbegin\r\n Result := nil;\r\n if Assigned(ABitmapContainer) and (AName <> '') then\r\n begin\r\n if AApplyScale then\r\n begin\r\n if AScale > 0 then\r\n Result := TTMSFNCBitmap(ABitmapContainer.FindBitmap(AName + '_' + FloatToStr(AScale)))\r\n else\r\n Result := TTMSFNCBitmap(ABitmapContainer.FindBitmap(AName + '_' + FloatToStr(TTMSFNCUtils.GetDPIScale)));\r\n end;\r\n\r\n if not Assigned(Result) then\r\n Result := TTMSFNCBitmap(ABitmapContainer.FindBitmap(AName));\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCGraphics.DrawBitmapWithName(ARect: TRect; ABitmapName: string; AApplyScale: Boolean = False; AScale: Single = 0;\r\n AAspectRatio: Boolean = True; AStretch: Boolean = False; ACenter: Boolean = True; ACropping: Boolean = False);\r\nbegin\r\n DrawBitmapWithName(ConvertToRectF(ARect), ABitmapName, AApplyScale, AScale, AAspectRatio, AStretch, ACenter, ACropping);\r\nend;\r\n\r\nprocedure TTMSFNCGraphics.DrawBitmapWithName(ARect: TRectF; ABitmapName: string; AApplyScale: Boolean = False; AScale: Single = 0;\r\n AAspectRatio: Boolean = True; AStretch: Boolean = False; ACenter: Boolean = True; ACropping: Boolean = False);\r\nvar\r\n b: TTMSFNCBitmap;\r\nbegin\r\n b := GetBitmapFromBitmapContainer(FBitmapContainer, ABitmapName, AApplyScale, AScale);\r\n if Assigned(b) then\r\n DrawBitmap(ARect, b, AAspectRatio, AStretch, ACenter, ACropping);\r\nend;\r\n\r\nprocedure TTMSFNCGraphics.DrawBitmapWithName(ALeft: Integer; ATop: Integer; ARight: Integer; ABottom: Integer; ABitmapName: string;\r\n AApplyScale: Boolean = False; AScale: Single = 0; AAspectRatio: Boolean = True; AStretch: Boolean = False; ACenter: Boolean = True;\r\n ACropping: Boolean = False);\r\nbegin\r\n DrawBitmapWithName(RectF(ALeft, ATop, ARight, ABottom), ABitmapName, AApplyScale, AScale, AAspectRatio, AStretch, ACenter, ACropping);\r\nend;\r\n\r\nprocedure TTMSFNCGraphics.DrawBitmapWithName(ALeft: Double; ATop: Double; ARight: Double; ABottom: Double; ABitmapName: string;\r\n AApplyScale: Boolean = False; AScale: Single = 0; AAspectRatio: Boolean = True; AStretch: Boolean = False; ACenter: Boolean = True;\r\n ACropping: Boolean = False);\r\nvar\r\n b: TTMSFNCBitmap;\r\nbegin\r\n b := GetBitmapFromBitmapContainer(FBitmapContainer, ABitmapName, AApplyScale, AScale);\r\n if Assigned(b) then\r\n DrawBitmap(ALeft, ATop, ARight, ABottom, b, AAspectRatio, AStretch, ACenter, ACropping);\r\nend;\r\n\r\nprocedure TTMSFNCGraphics.DrawScaledBitmap(ARect: TRect; ABitmaps: TTMSFNCScaledBitmaps; AScale: Single = 0;\r\n AAspectRatio: Boolean = True; AStretch: Boolean = False; ACenter: Boolean = True; ACropping: Boolean = False);\r\nbegin\r\n DrawScaledBitmap(ConvertToRectF(ARect), ABitmaps, AScale, AAspectRatio, AStretch, ACenter, ACropping);\r\nend;\r\n\r\nprocedure TTMSFNCGraphics.DrawScaledBitmap(ARect: TRectF; ABitmaps: TTMSFNCScaledBitmaps; AScale: Single = 0;\r\n AAspectRatio: Boolean = True; AStretch: Boolean = False; ACenter: Boolean = True; ACropping: Boolean = False);\r\nvar\r\n b: TTMSFNCScaledBitmap;\r\n bmp: TTMSFNCBitmap;\r\nbegin\r\n if Assigned(ABitmaps) then\r\n begin\r\n if AScale > 0 then\r\n b := ABitmaps.GetItemByScale(AScale)\r\n else\r\n b := ABitmaps.GetItemByScale(TTMSFNCUtils.GetDPIScale);\r\n\r\n if Assigned(b) then\r\n begin\r\n if Assigned(b.Bitmap) and not IsBitmapEmpty(b.Bitmap) then\r\n DrawBitmap(ARect, b.Bitmap, AAspectRatio, AStretch, ACenter, ACropping)\r\n else\r\n begin\r\n bmp := GetBitmapFromBitmapContainer(FBitmapContainer, b.BitmapName, True, AScale);\r\n if Assigned(bmp) and not IsBitmapEmpty(bmp) then\r\n DrawBitmap(ARect, bmp, AAspectRatio, AStretch, ACenter, ACropping)\r\n else\r\n DrawBitmapWithName(ARect, b.BitmapName, False, b.Scale, AAspectRatio, AStretch, ACenter, ACropping);\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCGraphics.DrawScaledBitmap(ALeft: Integer; ATop: Integer; ARight: Integer; ABottom: Integer; ABitmaps: TTMSFNCScaledBitmaps; AScale: Single = 0;\r\n AAspectRatio: Boolean = True; AStretch: Boolean = False; ACenter: Boolean = True; ACropping: Boolean = False);\r\nbegin\r\n DrawScaledBitmap(RectF(ALeft, ATop, ARight, ABottom), ABitmaps, AScale, AAspectRatio, AStretch, ACenter, ACropping);\r\nend;\r\n\r\n{$IFDEF SVGSUPPORT}\r\nfunction TTMSFNCGraphics.HasSVG(ABitmap: TTMSFNCBitmapHelperClass): Boolean;\r\n{$IFNDEF WEBLIB}\r\nvar\r\n si: TTMSFNCGraphicsSVGImport;\r\n{$ENDIF}\r\nbegin\r\n Result := False;\r\n {$IFNDEF WEBLIB}\r\n if (ABitmap is TTMSFNCBitmap) then\r\n begin\r\n si := nil;\r\n {$IFDEF FMXLIB}\r\n if Assigned((ABitmap as TTMSFNCBitmap).SVG) then\r\n si := TTMSFNCGraphicsSVGImport((ABitmap as TTMSFNCBitmap).SVG);\r\n {$ENDIF}\r\n {$IFDEF CMNLIB}\r\n if Assigned(ABitmap.Graphic) and (ABitmap.Graphic is TTMSFNCSVGBitmap) then\r\n si := TTMSFNCGraphicsSVGImport((ABitmap.Graphic as TTMSFNCSVGBitmap).SVG);\r\n {$ENDIF}\r\n\r\n if Assigned(si) and si.HasElements then\r\n Result := True;\r\n end;\r\n {$ENDIF}\r\nend;\r\n\r\nfunction TTMSFNCGraphics.DrawSVG(ABitmap: TTMSFNCBitmapHelperClass;\r\n ARect: TRectF): Boolean;\r\n{$IFNDEF WEBLIB}\r\nvar\r\n si: TTMSFNCGraphicsSVGImport;\r\n{$ENDIF}\r\nbegin\r\n Result := False;\r\n {$IFNDEF WEBLIB}\r\n if (ABitmap is TTMSFNCBitmap) then\r\n begin\r\n si := nil;\r\n {$IFDEF FMXLIB}\r\n if Assigned((ABitmap as TTMSFNCBitmap).SVG) then\r\n si := TTMSFNCGraphicsSVGImport((ABitmap as TTMSFNCBitmap).SVG);\r\n {$ENDIF}\r\n {$IFDEF CMNLIB}\r\n if Assigned(ABitmap.Graphic) and (ABitmap.Graphic is TTMSFNCSVGBitmap) then\r\n si := TTMSFNCGraphicsSVGImport((ABitmap.Graphic as TTMSFNCSVGBitmap).SVG);\r\n {$ENDIF}\r\n\r\n if Assigned(si) and si.HasElements then\r\n begin\r\n si.Draw(Self, ARect{$IFDEF CMNLIB}, True{$ELSE}, FNative, not FNative{$ENDIF});\r\n Result := True;\r\n end;\r\n end;\r\n {$ENDIF}\r\nend;\r\n{$ENDIF}\r\n\r\nprocedure TTMSFNCGraphics.DrawScaledBitmap(ALeft: Double; ATop: Double; ARight: Double; ABottom: Double; ABitmaps: TTMSFNCScaledBitmaps; AScale: Single = 0;\r\n AAspectRatio: Boolean = True; AStretch: Boolean = False; ACenter: Boolean = True; ACropping: Boolean = False);\r\nvar\r\n b: TTMSFNCScaledBitmap;\r\n bmp: TTMSFNCBitmap;\r\nbegin\r\n if Assigned(ABitmaps) then\r\n begin\r\n if AScale > 0 then\r\n b := ABitmaps.GetItemByScale(AScale)\r\n else\r\n b := ABitmaps.GetItemByScale(TTMSFNCUtils.GetDPIScale);\r\n\r\n if Assigned(b) then\r\n begin\r\n if Assigned(b.Bitmap) and not IsBitmapEmpty(b.Bitmap) then\r\n DrawBitmap(ALeft, ATop, ARight, ABottom, b.Bitmap, AAspectRatio, AStretch, ACenter, ACropping)\r\n else\r\n begin\r\n bmp := GetBitmapFromBitmapContainer(FBitmapContainer, b.BitmapName, True, AScale);\r\n if Assigned(bmp) and not IsBitmapEmpty(bmp) then\r\n DrawBitmap(ALeft, ATop, ARight, ABottom, bmp, AAspectRatio, AStretch, ACenter, ACropping)\r\n else\r\n DrawBitmapWithName(ALeft, ATop, ARight, ABottom, b.BitmapName, False, b.Scale, AAspectRatio, AStretch, ACenter, ACropping);\r\n end;\r\n end;\r\n end;\r\nend;\r\n{$ENDIF}\r\n\r\nprocedure TTMSFNCGraphics.ClipRect(ARect: TRect);\r\nbegin\r\n ClipRect(ConvertToRect(ARect));\r\nend;\r\n\r\nprocedure TTMSFNCGraphics.ClipRect(ARect: TRectF);\r\nbegin\r\n Context.ClipRect(ARect);\r\nend;\r\n\r\nprocedure TTMSFNCGraphics.DrawFocusPath(APath: TTMSFNCGraphicsPath; AColor: TTMSFNCGraphicsColor = gcBlack);\r\nbegin\r\n Context.DrawFocusPath(FStroke, APath, AColor);\r\nend;\r\n\r\nprocedure TTMSFNCGraphics.DrawFocusRectangle(ALeft: Integer; ATop: Integer; ARight: Integer; ABottom: Integer; AColor: TTMSFNCGraphicsColor = gcBlack; AModifyRectMode: TTMSFNCGraphicsModifyRectMode = gcrmShrinkAll);\r\nbegin\r\n DrawFocusRectangle(Rect(ALeft, ATop, ARight, ABottom), AColor, AModifyRectMode);\r\nend;\r\n\r\nprocedure TTMSFNCGraphics.DrawFocusRectangle(ALeft: Double; ATop: Double; ARight: Double; ABottom: Double; AColor: TTMSFNCGraphicsColor = gcBlack; AModifyRectMode: TTMSFNCGraphicsModifyRectMode = gcrmShrinkAll);\r\nvar\r\n r: TRectF;\r\nbegin\r\n r := RectF(ALeft, ATop, ARight, ABottom);\r\n Context.DrawFocusRectangle(FStroke, r, AColor, AModifyRectMode);\r\nend;\r\n\r\nprocedure TTMSFNCGraphics.DrawFocusRectangle(ARect: TRect; AColor: TTMSFNCGraphicsColor = gcBlack; AModifyRectMode: TTMSFNCGraphicsModifyRectMode = gcrmShrinkAll);\r\nbegin\r\n DrawFocusRectangle(ConvertToRectF(ARect), AColor, AModifyRectMode);\r\nend;\r\n\r\nprocedure TTMSFNCGraphics.DrawFocusRectangle(ARect: TRectF; AColor: TTMSFNCGraphicsColor = gcBlack; AModifyRectMode: TTMSFNCGraphicsModifyRectMode = gcrmShrinkAll);\r\nbegin\r\n DrawFocusRectangle(ARect.Left, ARect.Top, ARect.Right, ARect.Bottom, AColor, AModifyRectMode);\r\nend;\r\n\r\nprocedure TTMSFNCGraphics.FontChanged(Sender: TObject);\r\nbegin\r\n SetFont(Sender as TTMSFNCGraphicsFont);\r\nend;\r\n\r\nprocedure TTMSFNCGraphics.StrokeChanged(Sender: TObject);\r\nbegin\r\n SetStroke(Sender as TTMSFNCGraphicsStroke);\r\nend;\r\n\r\nprocedure TTMSFNCGraphics.FillChanged(Sender: TObject);\r\nbegin\r\n SetFill(Sender as TTMSFNCGraphicsFill);\r\nend;\r\n\r\nfunction TTMSFNCGraphics.DrawText(ALeft, ATop, ARight, ABottom: Integer; AText: String; AWordWrapping: Boolean = False; AHorizontalAlign: TTMSFNCGraphicsTextAlign = gtaLeading;\r\n AVerticalAlign: TTMSFNCGraphicsTextAlign = gtaCenter; ATrimming: TTMSFNCGraphicsTextTrimming = gttNone; AAngle: Single = 0;\r\n AMinWidth: Single = -1; AMinHeight: Single = -1{$IFNDEF LIMITEDGRAPHICSMODE};ASupportHTML: Boolean = True; ATestAnchor: Boolean = False; AX: Single = -1; AY: Single = - 1{$ENDIF}): String;\r\nvar\r\n AControlID, AControlValue, AControlType: string;\r\nbegin\r\n AControlID := '';\r\n AControlValue := '';\r\n AControlType := '';\r\n Result := DrawText(RectF(ALeft, ATop, ARight, ABottom), AText, AControlID, AControlValue, AControlType, AWordWrapping, AHorizontalAlign, AVerticalAlign, ATrimming,\r\n AAngle, AMinWidth, AMinHeight{$IFNDEF LIMITEDGRAPHICSMODE}, ASupportHTML, ATestAnchor, AX, AY{$ENDIF});\r\nend;\r\n\r\nfunction TTMSFNCGraphics.DrawText(ALeft, ATop, ARight, ABottom: Double; AText: String; AWordWrapping: Boolean = False; AHorizontalAlign: TTMSFNCGraphicsTextAlign = gtaLeading;\r\n AVerticalAlign: TTMSFNCGraphicsTextAlign = gtaCenter; ATrimming: TTMSFNCGraphicsTextTrimming = gttNone; AAngle: Single = 0;\r\n AMinWidth: Single = -1; AMinHeight: Single = -1{$IFNDEF LIMITEDGRAPHICSMODE};ASupportHTML: Boolean = True; ATestAnchor: Boolean = False; AX: Single = -1; AY: Single = - 1{$ENDIF}): String;\r\nvar\r\n AControlID, AControlValue, AControlType: string;\r\nbegin\r\n AControlID := '';\r\n AControlValue := '';\r\n AControlType := '';\r\n Result := DrawText(RectF(ALeft, ATop, ARight, ABottom), AText, AControlID, AControlValue, AControlType, AWordWrapping, AHorizontalAlign, AVerticalAlign, ATrimming,\r\n AAngle, AMinWidth, AMinHeight{$IFNDEF LIMITEDGRAPHICSMODE}, ASupportHTML, ATestAnchor, AX, AY{$ENDIF});\r\nend;\r\n\r\nfunction TTMSFNCGraphics.DrawText(ALeft, ATop, ARight, ABottom: Integer; AText: String; var AControlID: string; var AControlValue: string; var AControlType: string; AWordWrapping: Boolean = False; AHorizontalAlign: TTMSFNCGraphicsTextAlign = gtaLeading;\r\n AVerticalAlign: TTMSFNCGraphicsTextAlign = gtaCenter; ATrimming: TTMSFNCGraphicsTextTrimming = gttNone; AAngle: Single = 0;\r\n AMinWidth: Single = -1; AMinHeight: Single = -1{$IFNDEF LIMITEDGRAPHICSMODE};ASupportHTML: Boolean = True; ATestAnchor: Boolean = False; AX: Single = -1; AY: Single = - 1{$ENDIF}): String;\r\nbegin\r\n Result := DrawText(RectF(ALeft, ATop, ARight, ABottom), AText, AControlID, AControlValue, AControlType, AWordWrapping, AHorizontalAlign, AVerticalAlign, ATrimming,\r\n AAngle, AMinWidth, AMinHeight{$IFNDEF LIMITEDGRAPHICSMODE}, ASupportHTML, ATestAnchor, AX, AY{$ENDIF});\r\nend;\r\n\r\nfunction TTMSFNCGraphics.DrawText(ALeft, ATop, ARight, ABottom: Double; AText: String; var AControlID: string; var AControlValue: string; var AControlType: string; AWordWrapping: Boolean = False; AHorizontalAlign: TTMSFNCGraphicsTextAlign = gtaLeading;\r\n AVerticalAlign: TTMSFNCGraphicsTextAlign = gtaCenter; ATrimming: TTMSFNCGraphicsTextTrimming = gttNone; AAngle: Single = 0;\r\n AMinWidth: Single = -1; AMinHeight: Single = -1{$IFNDEF LIMITEDGRAPHICSMODE};ASupportHTML: Boolean = True; ATestAnchor: Boolean = False; AX: Single = -1; AY: Single = - 1{$ENDIF}): String;\r\nbegin\r\n Result := DrawText(RectF(ALeft, ATop, ARight, ABottom), AText, AControlID, AControlValue, AControlType, AWordWrapping, AHorizontalAlign, AVerticalAlign, ATrimming,\r\n AAngle, AMinWidth, AMinHeight{$IFNDEF LIMITEDGRAPHICSMODE}, ASupportHTML, ATestAnchor, AX, AY{$ENDIF});\r\nend;\r\n\r\nprocedure TTMSFNCGraphics.InitializeDefaultAppearance;\r\nbegin\r\n {$IFNDEF LIMITEDGRAPHICSMODE}\r\n FURLColor := gcBlue;\r\n FURLUnderline := True;\r\n {$ENDIF}\r\n SetFill(Fill);\r\n SetStroke(Stroke);\r\n SetFont(Font);\r\nend;\r\n\r\n{$IFDEF FMXLIB}\r\nclass function TTMSFNCGraphics.GetColorAlpha(AColor: TTMSFNCGraphicsColor): Byte;\r\nbegin\r\n Result := TAlphaColorRec(AColor).A;\r\nend;\r\n{$ENDIF}\r\n\r\nclass function TTMSFNCGraphics.GetColorRed(AColor: TTMSFNCGraphicsColor): Byte;\r\nbegin\r\n {$IFDEF FMXLIB}\r\n Result := TAlphaColorRec(AColor).R;\r\n {$ENDIF}\r\n {$IFDEF CMNWEBLIB}\r\n AColor := ColorToRGB(AColor);\r\n Result := GetRValue(AColor);\r\n {$ENDIF}\r\nend;\r\n\r\nclass function TTMSFNCGraphics.GetColorGreen(AColor: TTMSFNCGraphicsColor): Byte;\r\nbegin\r\n {$IFDEF FMXLIB}\r\n Result := TAlphaColorRec(AColor).G;\r\n {$ENDIF}\r\n {$IFDEF CMNWEBLIB}\r\n AColor := ColorToRGB(AColor);\r\n Result := GetGValue(AColor);\r\n {$ENDIF}\r\nend;\r\n\r\nclass function TTMSFNCGraphics.GetColorBlue(AColor: TTMSFNCGraphicsColor): Byte;\r\nbegin\r\n {$IFDEF FMXLIB}\r\n Result := TAlphaColorRec(AColor).B;\r\n {$ENDIF}\r\n {$IFDEF CMNWEBLIB}\r\n AColor := ColorToRGB(AColor);\r\n Result := GetBValue(AColor);\r\n {$ENDIF}\r\nend;\r\n\r\nclass function TTMSFNCGraphics.TextToColor(AText: string): TTMSFNCGraphicsColor;\r\nvar\r\n s: string;\r\n c: TTMSFNCGraphicsColorList;\r\n v: TTMSFNCGraphicsColorObject;\r\nbegin\r\n s := AText;\r\n\r\n s := LowerCase(s);\r\n if pos('cl',s) = 1 then\r\n Delete(s,1,2);\r\n\r\n if pos('cla',s) = 1 then\r\n Delete(s,1,3);\r\n\r\n if pos('gc',s) = 1 then\r\n Delete(s,1,2);\r\n\r\n Result := gcBlack;\r\n c := ColorLookup;\r\n if Assigned(c) then\r\n begin\r\n if c.TryGetValue(s, v) then\r\n Result := v.Color;\r\n end;\r\nend;\r\n\r\nclass function TTMSFNCGraphics.HTMLToColor(AHTML: string): TTMSFNCGraphicsColor;\r\nvar\r\n r,g,b: Integer;\r\nbegin\r\n Result := gcNull;\r\n if AHTML = '' then\r\n Exit;\r\n\r\n if Length(AHTML) = 4 then\r\n begin\r\n r := StrToInt('$' + Copy(AHTML,2,1) + Copy(AHTML,2,1));\r\n g := StrToInt('$' + Copy(AHTML,3,1) + Copy(AHTML,3,1));\r\n b := StrToInt('$' + Copy(AHTML,4,1) + Copy(AHTML,4,1));\r\n end\r\n else\r\n begin\r\n r := StrToInt('$' + Copy(AHTML,2,2));\r\n g := StrToInt('$' + Copy(AHTML,4,2));\r\n b := StrToInt('$' + Copy(AHTML,6,2));\r\n end;\r\n\r\n{$IFDEF CMNWEBLIB}\r\n Result := RGB(r, g, b);\r\n{$ELSE}\r\n Result := MakeGraphicsColor(r, g, b);\r\n{$ENDIF}\r\nend;\r\n\r\nclass function TTMSFNCGraphics.ColorToHTML(AColor: TTMSFNCGraphicsColor): string;\r\nconst\r\n HTMLHexColor = '#RRGGBB';\r\n HexDigit: array[0..$F] of Char = '0123456789ABCDEF';\r\nvar\r\n c: TTMSFNCGraphicsColor;\r\n i: Integer;\r\nbegin\r\n {$IFDEF ZEROSTRINGINDEX}\r\n i := 0;\r\n {$ELSE}\r\n i := 1;\r\n {$ENDIF}\r\n\r\n {$IFDEF FMXLIB}\r\n c := AColor;\r\n {$ENDIF}\r\n {$IFNDEF FMXLIB}\r\n c := ColorToRGB(AColor);\r\n {$ENDIF}\r\n Result := HtmlHexColor;\r\n Result[1 + i] := HexDigit[GetColorRed(c) shr 4];\r\n Result[2 + i] := HexDigit[GetColorRed(c) and $F];\r\n Result[3 + i] := HexDigit[GetColorGreen(c) shr 4];\r\n Result[4 + i] := HexDigit[GetColorGreen(c) and $F];\r\n Result[5 + i] := HexDigit[GetColorBlue(c) shr 4];\r\n Result[6 + i] := HexDigit[GetColorBlue(c) and $F];\r\nend;\r\n\r\nprocedure TTMSFNCGraphics.DrawTexture(ARect: TRectF; ATexture: TTMSFNCBitmap; ATextureMode: TTMSFNCGraphicsTextureMode);\r\nvar\r\n LR, R, IR: TRectF;\r\n I, J: Integer;\r\nbegin\r\n if IsBitmapEmpty(ATexture) then\r\n Exit;\r\n\r\n LR := ARect;\r\n case ATextureMode of\r\n gtmOriginal:\r\n begin\r\n R := RectF(ARect.Left, ARect.Top, ARect.Left + ATexture.Width, ARect.Top + ATexture.Height);\r\n IntersectRectEx(IR, LR, R);\r\n DrawBitmapPart(RectF(0, 0, (IR.Right - IR.Left), (IR.Bottom - IR.Top)), RectF(R.Left, R.Top, R.Left + (IR.Right - IR.Left), R.Top + (IR.Bottom - IR.Top)), ATexture, False, False, False, False);\r\n end;\r\n gtmFit:\r\n begin\r\n R := RectF(0, 0, ATexture.Width, ATexture.Height);\r\n R := RectSnapToPixelEx(RectFitIntoEx(R, ARect), 1, False);\r\n DrawBitmapPart(RectF(0, 0, ATexture.Width, ATexture.Height), R, ATexture, False, True, False, False);\r\n end;\r\n gtmStretch: DrawBitmapPart(RectF(0, 0, ATexture.Width, ATexture.Height), ARect, ATexture, False, True, False, False);\r\n gtmTile:\r\n begin\r\n for I := 0 to Trunc((LR.Right - LR.Left) / ATexture.Width) + 1 do\r\n begin\r\n for J := 0 to Trunc((LR.Bottom - LR.Top) / ATexture.Height) + 1 do\r\n begin\r\n R := RectF(LR.Left, LR.Top, LR.Left + ATexture.Width, LR.Top + ATexture.Height);\r\n OffsetRectEx(R, I * ATexture.Width, J * ATexture.Height);\r\n IntersectRectEx(IR, LR, R);\r\n if IntersectRectEx(IR, R) then\r\n DrawBitmap(RectF(R.Left, R.Top, (R.Left + (IR.Right - IR.Left)), (R.Top + (IR.Bottom - IR.Top))), ATexture, False, False, False, False);\r\n end;\r\n end;\r\n end;\r\n gtmCenter:\r\n begin\r\n R := RectF(0, 0, ATexture.Width, ATexture.Height);\r\n R := RectSnapToPixelEx(RectCenterAtEx(R, ARect), 1, False);\r\n DrawBitmapPart(RectF(0, 0, ATexture.Width, ATexture.Height), R, ATexture, True, False, True, False);\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCGraphics.DrawText(ARect: TRect; AText: String; AWordWrapping: Boolean = False; AHorizontalAlign: TTMSFNCGraphicsTextAlign = gtaLeading;\r\n AVerticalAlign: TTMSFNCGraphicsTextAlign = gtaCenter; ATrimming: TTMSFNCGraphicsTextTrimming = gttNone; AAngle: Single = 0;\r\n AMinWidth: Single = -1; AMinHeight: Single = -1{$IFNDEF LIMITEDGRAPHICSMODE};ASupportHTML: Boolean = True; ATestAnchor: Boolean = False; AX: Single = -1; AY: Single = - 1{$ENDIF}): String;\r\nvar\r\n AControlID, AControlValue, AControlType: string;\r\nbegin\r\n AControlID := '';\r\n AControlValue := '';\r\n AControlType := '';\r\n Result := DrawText(ConvertToRectF(ARect), AText, AControlID, AControlValue, AControlType, AWordWrapping, AHorizontalAlign, AVerticalAlign, ATrimming, AAngle, AMinWidth, AMinHeight{$IFNDEF LIMITEDGRAPHICSMODE}, ASupportHTML, ATestAnchor, AX, AY{$ENDIF});\r\nend;\r\n\r\nfunction TTMSFNCGraphics.DrawText(ARect: TRect; AText: String; var AControlID: string; var AControlValue: string; var AControlType: string; AWordWrapping: Boolean = False; AHorizontalAlign: TTMSFNCGraphicsTextAlign = gtaLeading;\r\n AVerticalAlign: TTMSFNCGraphicsTextAlign = gtaCenter; ATrimming: TTMSFNCGraphicsTextTrimming = gttNone; AAngle: Single = 0;\r\n AMinWidth: Single = -1; AMinHeight: Single = -1{$IFNDEF LIMITEDGRAPHICSMODE};ASupportHTML: Boolean = True; ATestAnchor: Boolean = False; AX: Single = -1; AY: Single = - 1{$ENDIF}): String;\r\nbegin\r\n Result := DrawText(ConvertToRectF(ARect), AText, AControlID, AControlValue, AControlType, AWordWrapping, AHorizontalAlign, AVerticalAlign, ATrimming, AAngle, AMinWidth, AMinHeight{$IFNDEF LIMITEDGRAPHICSMODE}, ASupportHTML, ATestAnchor, AX, AY{$ENDIF});\r\nend;\r\n\r\nfunction TTMSFNCGraphics.DrawText(APoint: TPointF; AText: String; AAngle: Single = 0{$IFNDEF LIMITEDGRAPHICSMODE};ASupportHTML: Boolean = True; ATestAnchor: Boolean = False; AX: Single = -1; AY: Single = - 1{$ENDIF}): String;\r\nvar\r\n AControlID, AControlValue, AControlType: string;\r\nbegin\r\n AControlID := '';\r\n AControlValue := '';\r\n AControlType := '';\r\n\r\n Result := DrawText(RectF(APoint.X, APoint.Y, APoint.X + 10000, APoint.Y + 10000), AText, AControlID, AControlValue, AControlType, False, gtaLeading, gtaLeading, gttNone, AAngle, -1, -1{$IFNDEF LIMITEDGRAPHICSMODE}, ASupportHTML, ATestAnchor, AX, AY{$ENDIF});\r\nend;\r\n\r\nfunction TTMSFNCGraphics.DrawText(ARect: TRectF; AText: String; AWordWrapping: Boolean = False;AHorizontalAlign: TTMSFNCGraphicsTextAlign = gtaLeading;\r\n AVerticalAlign: TTMSFNCGraphicsTextAlign = gtaCenter; ATrimming: TTMSFNCGraphicsTextTrimming = gttNone; AAngle: Single = 0;\r\n AMinWidth: Single = -1; AMinHeight: Single = -1{$IFNDEF LIMITEDGRAPHICSMODE};ASupportHTML: Boolean = True; ATestAnchor: Boolean = False; AX: Single = -1; AY: Single = - 1{$ENDIF}): String;\r\nvar\r\n AControlID, AControlValue, AControlType: string;\r\nbegin\r\n AControlID := '';\r\n AControlValue := '';\r\n AControlType := '';\r\n Result := DrawText(ARect, AText, AControlID, AControlValue, AControlType, AWordWrapping, AHorizontalAlign, AVerticalAlign, ATrimming, AAngle, AMinWidth, AMinHeight{$IFNDEF LIMITEDGRAPHICSMODE}, ASupportHTML, ATestAnchor, AX, AY{$ENDIF});\r\nend;\r\n\r\nfunction TTMSFNCGraphics.DrawText(ARect: TRectF; AText: String; var AControlID: string; var AControlValue: string; var AControlType: string; AWordWrapping: Boolean = False;AHorizontalAlign: TTMSFNCGraphicsTextAlign = gtaLeading;\r\n AVerticalAlign: TTMSFNCGraphicsTextAlign = gtaCenter; ATrimming: TTMSFNCGraphicsTextTrimming = gttNone; AAngle: Single = 0;\r\n AMinWidth: Single = -1; AMinHeight: Single = -1{$IFNDEF LIMITEDGRAPHICSMODE};ASupportHTML: Boolean = True; ATestAnchor: Boolean = False; AX: Single = -1; AY: Single = - 1{$ENDIF}): String;\r\nvar\r\n lst: TStringList;\r\n i, l, p: Integer;\r\n b: Boolean;\r\n r, rd: TRectF;\r\nconst\r\n arr: array[0..1] of string = ('
', '
');\r\nbegin\r\n rd := ARect;\r\n\r\n {$IFNDEF LIMITEDGRAPHICSMODE}\r\n b := (not ATestAnchor) and OptimizedHTMLDrawing;\r\n {$ELSE}\r\n b := false;\r\n {$ENDIF}\r\n\r\n b := b and TTMSFNCUtils.IsHTML(AText);\r\n\r\n if b then\r\n begin\r\n for I := 0 to Length(arr) - 1 do\r\n begin\r\n p := Pos(arr[I], UpperCase(AText));\r\n l := Length(arr[I]);\r\n end;\r\n\r\n if (p > 0) and (l > 0) then\r\n begin\r\n lst := TStringList.Create;\r\n try\r\n lst.LineBreak := Copy(AText, p, l);\r\n lst.Text := AText;\r\n\r\n for I := 0 to lst.Count - 1 do\r\n begin\r\n r := CalculateText(lst[I], rd, AWordWrapping{$IFNDEF LIMITEDGRAPHICSMODE}, ASupportHTML{$ENDIF});\r\n InternalDrawText(RectF(r.Left, r.Top, r.Right + 1, r.Bottom), lst[I], AControlID, AControlValue, AControlType, AWordWrapping, AHorizontalAlign, AVerticalAlign,\r\n ATrimming, AAngle, AMinWidth, AMinHeight{$IFNDEF LIMITEDGRAPHICSMODE}, ASupportHTML, ATestAnchor, AX, AY{$ENDIF});\r\n\r\n rd.Top := rd.Top + (r.Bottom - r.Top);\r\n rd.Bottom := rd.Bottom + (r.Bottom - r.Top);\r\n end;\r\n\r\n finally\r\n lst.Free;\r\n end;\r\n end\r\n else\r\n b := False;\r\n end;\r\n\r\n if not b then\r\n begin\r\n Result := InternalDrawText(ARect, AText, AControlID, AControlValue, AControlType, AWordWrapping, AHorizontalAlign, AVerticalAlign,\r\n ATrimming, AAngle, AMinWidth, AMinHeight{$IFNDEF LIMITEDGRAPHICSMODE}, ASupportHTML, ATestAnchor, AX, AY{$ENDIF});\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCGraphics.InternalDrawText(ARect: TRectF; AText: String; var AControlID: string; var AControlValue: string; var AControlType: string; AWordWrapping: Boolean = False;AHorizontalAlign: TTMSFNCGraphicsTextAlign = gtaLeading;\r\n AVerticalAlign: TTMSFNCGraphicsTextAlign = gtaCenter; ATrimming: TTMSFNCGraphicsTextTrimming = gttNone; AAngle: Single = 0;\r\n AMinWidth: Single = -1; AMinHeight: Single = -1{$IFNDEF LIMITEDGRAPHICSMODE};ASupportHTML: Boolean = True; ATestAnchor: Boolean = False; AX: Single = -1; AY: Single = - 1{$ENDIF}): String;\r\nvar\r\n{$IFNDEF LIMITEDGRAPHICSMODE}\r\n a, s: String;\r\n fa: String;\r\n XSize, YSize: Single;\r\n hl, ml: Integer;\r\n hr, cr: TRectF;\r\n xs, ys: Single;\r\n lc: Integer;\r\n htmlr: TRectF;\r\n isanchor: boolean;\r\n st: TTMSFNCGraphicsSaveState;\r\n{$ENDIF}\r\n oldc: TTMSFNCGraphicsColor;\r\nbegin\r\n inherited;\r\n\r\n oldc := Context.GetFillColor;\r\n Context.SetFillColor(FFont.Color);\r\n\r\n {$IFDEF WEBLIB}\r\n if (AMinHeight > -1) and (ARect.Bottom - ARect.Top < AMinHeight) then\r\n ARect.Bottom := ARect.Top + AMinHeight;\r\n\r\n if (AMinWidth > -1) and (ARect.Right - ARect.Left < AMinWidth) then\r\n ARect.Right := ARect.Left + AMinWidth;\r\n {$ENDIF}\r\n {$IFNDEF WEBLIB}\r\n if (AMinHeight > -1) and (ARect.Height < AMinHeight) then\r\n ARect.Height := AMinHeight;\r\n\r\n if (AMinWidth > -1) and (ARect.Width < AMinWidth) then\r\n ARect.Width := AMinWidth;\r\n {$ENDIF}\r\n\r\n ARect := Context.SetTextAngle(ARect, AAngle);\r\n\r\n Result := '';\r\n\r\n {$IFNDEF LIMITEDGRAPHICSMODE}\r\n if ((Pos(' 0) or (Pos('/>', AText) > 0) or (Pos('
', UpperCase(AText)) > 0)) and ASupportHTML then\r\n begin\r\n hr := RectF(0, 0, 0, 0);\r\n XSize := 0;\r\n YSize := 0;\r\n hl := -1;\r\n ml := -1;\r\n fa := '';\r\n s := '';\r\n a := '';\r\n lc := 0;\r\n cr := RectF(0, 0, 0, 0);\r\n AControlID := '';\r\n AControlValue := '';\r\n AControlType := '';\r\n HTMLDrawEx(Self, AText, ARect,0, 0,-1,-1,0,False,True,False,False,False,False,AWordWrapping,False, '', 1.0,URLColor,\r\n gcNull,gcNull,gcNull,a,s,fa,XSize,YSize,hl,ml,hr, cr, AControlID, AControlValue, AControlType, lc, 0, FBitmapContainer, 1, URLUnderline{$IFDEF CMNLIB}, FImageList{$ENDIF},\r\n HighlightColor, HighlightTextColor, HighlightFontStyle);\r\n\r\n YSize := YSize + 1;\r\n XSize := XSize + 1;\r\n\r\n if (AWordWrapping and (lc <= 1)) or (not AWordWrapping) then\r\n begin\r\n xs := ARect.Left;\r\n ys := ARect.Top;\r\n\r\n case AHorizontalAlign of\r\n gtaCenter: xs := xs + ((ARect.Right - ARect.Left) - XSize) / 2;\r\n gtaTrailing: xs := ARect.Left + (ARect.Right - ARect.Left) - XSize;\r\n end;\r\n\r\n case AVerticalAlign of\r\n gtaCenter: ys := ys + ((ARect.Bottom - ARect.Top) - YSize) / 2;\r\n gtaTrailing: ys := ys + (ARect.Bottom - ARect.Top) - YSize;\r\n end;\r\n\r\n htmlr := RectF(xs, ys, xs + XSize, ys + YSize);\r\n end\r\n else\r\n htmlr := ARect;\r\n\r\n st := SaveState(True);\r\n ClipRect(ARect);\r\n isanchor := HTMLDrawEx(Self, AText, htmlr,Round(AX), Round(AY),-1,-1,0,ATestAnchor,False,False,False,False,False,AWordWrapping,False, '', 1.0,URLColor,\r\n gcNull,gcNull,gcNull,a,s,fa,XSize,YSize,hl,ml,hr,cr, AControlID, AControlValue, AControlType, lc, 0, FBitmapContainer, 1, URLUnderline{$IFDEF CMNLIB}, FImageList{$ENDIF},\r\n HighlightColor, HighlightTextColor, HighlightFontStyle);\r\n RestoreState(st, True);\r\n\r\n if isanchor then\r\n Result := a;\r\n end\r\n else if not ATestAnchor then\r\n {$ENDIF}\r\n Context.DrawText(AText, ARect, AWordWrapping, AHorizontalAlign, AVerticalAlign, ATrimming, AAngle);\r\n\r\n Context.ResetTextAngle(AAngle);\r\n Context.SetFillColor(oldc);\r\nend;\r\n\r\nprocedure TTMSFNCGraphics.DrawEllipse(ALeft: Integer; ATop: Integer; ARight: Integer; ABottom: Integer; AModifyRectMode: TTMSFNCGraphicsModifyRectMode = gcrmShrinkAll);\r\nbegin\r\n DrawEllipse(RectF(ALeft, ATop, ARight, ABottom), AModifyRectMode);\r\nend;\r\n\r\nprocedure TTMSFNCGraphics.DrawEllipse(ALeft: Double; ATop: Double; ARight: Double; ABottom: Double; AModifyRectMode: TTMSFNCGraphicsModifyRectMode = gcrmShrinkAll);\r\nvar\r\n r: TRectF;\r\n pth: TTMSFNCGraphicsPath;\r\nbegin\r\n r := RectF(ALeft, ATop, ARight, ABottom);\r\n if ((FFill.Color <> gcNull) and (FFill.Kind <> gfkNone)) or (FFill.Kind = gfkTexture) then\r\n begin\r\n case FFill.Kind of\r\n gfkTexture:\r\n begin\r\n pth := TTMSFNCGraphicsPath.Create;\r\n try\r\n pth.AddEllipse(r);\r\n DrawTexture(r, FFill.Texture, FFill.TextureMode);\r\n finally\r\n pth.Free;\r\n end;\r\n end;\r\n else\r\n Context.FillEllipse(FFill, r, AModifyRectMode);\r\n end;\r\n end;\r\n\r\n if (FStroke.Color <> gcNull) and (FStroke.Kind <> gskNone) then\r\n Context.DrawEllipse(FStroke, r, AModifyRectMode);\r\nend;\r\n\r\nclass procedure TTMSFNCGraphics.SetDefaultGraphicColors;\r\nbegin\r\n TTMSFNCGraphics.DefaultPopupFillColor := gcWhite;\r\n TTMSFNCGraphics.DefaultPopupStrokeColor := gcSilver;\r\n TTMSFNCGraphics.DefaultButtonFillColor := MakeGraphicsColor(225, 225, 225);\r\n TTMSFNCGraphics.DefaultButtonStrokeColor := gcDarkgray;\r\n TTMSFNCGraphics.DefaultTextFontColor := gcBlack;\r\n TTMSFNCGraphics.DefaultSelectionFillColor := gcBlack;\r\n TTMSFNCGraphics.DefaultButtonFillColorFocused := MakeGraphicsColor(229, 241, 251);\r\n TTMSFNCGraphics.DefaultButtonStrokeColorFocused := MakeGraphicsColor(60, 127, 177);\r\n TTMSFNCGraphics.DefaultButtonStrokeColorDisabled := gcDarkGray;\r\n TTMSFNCGraphics.DefaultButtonFillColorDisabled := gcLightgray;\r\nend;\r\n\r\n{$HINTS OFF}\r\nclass procedure TTMSFNCGraphics.ConvertBitmapToGrayScale(ABitmap: TTMSFNCBitmap);\r\ntype\r\n TTMSFNCGraphicsColorToGrayscale = (ctgLightness, ctgAverage, ctgLuminosity);\r\n\r\n function MinColor(const A, B, C: Integer): Integer;\r\n begin\r\n Result := Min(A, Min(B, C));\r\n end;\r\n\r\n function MaxColor(const A, B, C: Integer): Integer;\r\n begin\r\n Result := Max(A, Max(B, C));\r\n end;\r\n\r\n function ColorToGray(AColor: TTMSFNCGraphicsColor; AMode: TTMSFNCGraphicsColorToGrayscale = ctgLuminosity): TTMSFNCGraphicsColor;\r\n var\r\n R, G, B, X: Byte;\r\n {$IFNDEF CMNLIB}\r\n A: Byte;\r\n {$ENDIF}\r\n begin\r\n {$IFDEF FMXLIB}\r\n R := TAlphaColorRec(AColor).R;\r\n G := TAlphaColorRec(AColor).G;\r\n B := TAlphaColorRec(AColor).B;\r\n A := TAlphaColorRec(AColor).A;\r\n {$ENDIF}\r\n {$IFDEF CMNLIB}\r\n R := AColor and $FF;\r\n G := (AColor and $FF00) shr 8;\r\n B := (AColor and $FF0000) shr 16;\r\n {$ENDIF}\r\n case AMode of\r\n ctgLightness: X := (MaxColor(R, G, B) + MinColor(R, G, B)) div 2;\r\n ctgAverage: X := (R + G + B) div 3;\r\n ctgLuminosity: X := Round(0.21 *R + 0.71*G + 0.07*B);\r\n else\r\n X := 0;\r\n end;\r\n {$IFDEF FMXLIB}\r\n Result := MakeGraphicsColor(X, X, X, A);\r\n {$ENDIF}\r\n {$IFDEF CMNLIB}\r\n Result := TTMSFNCGraphicsColor(RGB(X, X, X));\r\n {$ENDIF}\r\n end;\r\n\r\nvar\r\n I, J: Integer;\r\n {$IFDEF FMXLIB}\r\n m: TBitmapData;\r\n {$ENDIF}\r\nbegin\r\n if Assigned(ABitmap) and not IsBitmapEmpty(ABitmap) then\r\n begin\r\n {$IFDEF FMXLIB}\r\n if ABitmap.Map(TMapAccess.ReadWrite, m) then\r\n begin\r\n {$ENDIF}\r\n {$IFDEF CMNLIB}\r\n begin\r\n {$ENDIF}\r\n {$IFDEF WEBLIB}\r\n begin\r\n {$ENDIF}\r\n for I := 0 to ABitmap.Width - 1 do\r\n begin\r\n for J := 0 to ABitmap.Height - 1 do\r\n begin\r\n {$IFDEF CMNLIB}\r\n ABitmap.Bitmap.Canvas.Pixels[I, J] := ColorToGray(ABitmap.Bitmap.Canvas.Pixels[I, J]);\r\n {$ENDIF}\r\n {$IFDEF FMXLIB}\r\n m.SetPixel(I, J, ColorToGray(m.GetPixel(I, J)));\r\n {$ENDIF}\r\n end;\r\n end;\r\n {$IFDEF FMXLIB}\r\n ABitmap.Unmap(m);\r\n {$ENDIF}\r\n end;\r\n end;\r\nend;\r\n{$HINTS ON}\r\n\r\nclass procedure TTMSFNCGraphics.DrawSample(ACanvas: TCanvas; ARect: TRectF);\r\nvar\r\n g: TTMSFNCGraphics;\r\nbegin\r\n g := TTMSFNCGraphics.Create(ACanvas);\r\n try\r\n g.Font.Name := 'Courier New';\r\n g.Font.Size := 20;\r\n g.Font.Color := gcWhite;\r\n g.Fill.Kind := gfkGradient;\r\n g.Fill.Color := gcDarkorange;\r\n g.Fill.ColorTo := gcSteelblue;\r\n g.Stroke.Color := gcDarkblue;\r\n g.DrawRectangle(ARect);\r\n g.DrawText(ARect, 'Sample', False, gtaCenter);\r\n finally\r\n g.Free;\r\n end;\r\nend;\r\n\r\nclass function TTMSFNCGraphics.PointInPolygon(APoint: TPoint; APolygon: TTMSFNCGraphicsPathPolygon): Boolean;\r\nbegin\r\n Result := PointInPolygon(ConvertToPointF(APoint), APolygon);\r\nend;\r\n\r\nclass function TTMSFNCGraphics.PointInPolygon(APoint: TPointF; APolygon: TTMSFNCGraphicsPathPolygon): Boolean;\r\nbegin\r\n Result := PointInPoly(APoint, APolygon);\r\nend;\r\n\r\nclass function TTMSFNCGraphics.PointInRect(APoint: TPoint; ARect: TRect): Boolean;\r\nbegin\r\n Result := PointInRect(ConvertToPointF(APoint), ConvertToRectF(ARect));\r\nend;\r\n\r\nclass function TTMSFNCGraphics.PointInRect(APoint: TPointF; ARect: TRectF): Boolean;\r\nbegin\r\n Result := PtInRectEx(ARect, APoint);\r\nend;\r\n\r\nclass function TTMSFNCGraphics.PointInCircle(APoint, ACenter: TPointF; const ARadius: Single): Boolean;\r\nbegin\r\n if ARadius > 0 then\r\n Result := Sqr((APoint.X - ACenter.X) / ARadius) + Sqr((APoint.Y - ACenter.Y) / ARadius) <= 1\r\n else\r\n Result := False;\r\nend;\r\n\r\nclass function TTMSFNCGraphics.PointInPath(APoint: TPoint; APath: TTMSFNCGraphicsPath): Boolean;\r\nbegin\r\n Result := PointInPath(ConvertToPointF(APoint), APath);\r\nend;\r\n\r\nclass function TTMSFNCGraphics.PointInPath(APoint: TPointF; APath: TTMSFNCGraphicsPath): Boolean;\r\nbegin\r\n Result := APath.IsPointVisible(APoint);\r\nend;\r\n\r\nfunction TTMSFNCGraphics.CalculateTextSizeInt(AText: String): TSize;\r\nbegin\r\n Result := ConvertToSize(CalculateTextSize(AText));\r\nend;\r\n\r\nfunction TTMSFNCGraphics.CalculateTextSize(AText: String): TSizeF;\r\nbegin\r\n Result := CalculateTextSize(AText, RectF(0, 0, 10000, 10000));\r\nend;\r\n\r\nfunction TTMSFNCGraphics.CalculateTextHeightInt(AText: String): Integer;\r\nbegin\r\n Result := Round(CalculateTextHeight(AText));\r\nend;\r\n\r\nfunction TTMSFNCGraphics.CalculateTextHeight(AText: String): Single;\r\nbegin\r\n Result := CalculateTextHeight(AText, RectF(0, 0, 10000, 10000));\r\nend;\r\n\r\nfunction TTMSFNCGraphics.CalculateTextWidthInt(AText: String): Integer;\r\nbegin\r\n Result := Round(CalculateTextWidth(AText));\r\nend;\r\n\r\nfunction TTMSFNCGraphics.CalculateTextWidth(AText: String): Single;\r\nbegin\r\n Result := CalculateTextWidth(AText, RectF(0, 0, 10000, 10000));\r\nend;\r\n\r\nfunction TTMSFNCGraphics.CalculateTextSize(AText: String; ARect: TRect; AWordWrapping: Boolean = False{$IFNDEF LIMITEDGRAPHICSMODE}; ASupportHTML: Boolean = True{$ENDIF}): TSize;\r\nbegin\r\n Result := ConvertToSize(CalculateTextSize(AText, ConvertToRectF(ARect), AWordWrapping{$IFNDEF LIMITEDGRAPHICSMODE}, ASupportHTML{$ENDIF}));\r\nend;\r\n\r\nfunction TTMSFNCGraphics.CalculateTextSize(AText: String; ARect: TRectF; AWordWrapping: Boolean = False{$IFNDEF LIMITEDGRAPHICSMODE}; ASupportHTML: Boolean = True{$ENDIF}): TSizeF;\r\nvar\r\n r: TRectF;\r\nbegin\r\n r := CalculateText(AText, ARect, AWordWrapping{$IFNDEF LIMITEDGRAPHICSMODE}, ASupportHTML{$ENDIF});\r\n Result.cx := r.Right - r.Left;\r\n Result.cy := r.Bottom - r.Top;\r\nend;\r\n\r\nfunction TTMSFNCGraphics.CalculateTextHeight(AText: String; ARect: TRect; AWordWrapping: Boolean = False{$IFNDEF LIMITEDGRAPHICSMODE}; ASupportHTML: Boolean = True{$ENDIF}): Integer;\r\nbegin\r\n Result := Round(CalculateTextHeight(AText, ConvertToRectF(ARect), AWordWrapping{$IFNDEF LIMITEDGRAPHICSMODE}, ASupportHTML{$ENDIF}));\r\nend;\r\n\r\nfunction TTMSFNCGraphics.CalculateTextHeight(AText: String; ARect: TRectF; AWordWrapping: Boolean = False{$IFNDEF LIMITEDGRAPHICSMODE}; ASupportHTML: Boolean = True{$ENDIF}): Single;\r\nvar\r\n r: TRectF;\r\nbegin\r\n r := CalculateText(AText, ARect, AWordWrapping{$IFNDEF LIMITEDGRAPHICSMODE}, ASupportHTML{$ENDIF});\r\n Result := r.Bottom - r.Top;\r\nend;\r\n\r\nfunction TTMSFNCGraphics.CalculateTextWidth(AText: String; ARect: TRect; AWordWrapping: Boolean = False{$IFNDEF LIMITEDGRAPHICSMODE}; ASupportHTML: Boolean = True{$ENDIF}): Integer;\r\nbegin\r\n Result := Round(CalculateTextWidth(AText, ConvertToRectF(ARect), AWordWrapping{$IFNDEF LIMITEDGRAPHICSMODE}, ASupportHTML{$ENDIF}));\r\nend;\r\n\r\nfunction TTMSFNCGraphics.CalculateTextWidth(AText: String; ARect: TRectF; AWordWrapping: Boolean = False{$IFNDEF LIMITEDGRAPHICSMODE}; ASupportHTML: Boolean = True{$ENDIF}): Single;\r\nvar\r\n r: TRectF;\r\nbegin\r\n r := CalculateText(AText, ARect, AWordWrapping{$IFNDEF LIMITEDGRAPHICSMODE}, ASupportHTML{$ENDIF});\r\n Result := r.Right - r.Left;\r\nend;\r\n\r\nfunction TTMSFNCGraphics.CalculateTextInt(AText: String): TRect;\r\nbegin\r\n Result := ConvertToRect(CalculateText(AText));\r\nend;\r\n\r\nfunction TTMSFNCGraphics.CalculateText(AText: String): TRectF;\r\nbegin\r\n Result := CalculateText(AText, RectF(0, 0, 10000, 10000));\r\nend;\r\n\r\nfunction TTMSFNCGraphics.CalculateText(AText: String;\r\n ARect: TRect; AWordWrapping: Boolean = False{$IFNDEF LIMITEDGRAPHICSMODE}; ASupportHTML: Boolean = True{$ENDIF}): TRect;\r\nbegin\r\n Result := ConvertToRect(CalculateText(AText, ConvertToRectF(ARect), AWordWrapping{$IFNDEF LIMITEDGRAPHICSMODE}, ASupportHTML{$ENDIF}));\r\nend;\r\n\r\nfunction TTMSFNCGraphics.CalculateText(AText: String;\r\n ARect: TRectF; AWordWrapping: Boolean = False{$IFNDEF LIMITEDGRAPHICSMODE}; ASupportHTML: Boolean = True{$ENDIF}): TRectF;\r\nvar\r\n lst: TStringList;\r\n i, l, p: Integer;\r\n b: Boolean;\r\n r: TRectF;\r\n y: Single;\r\nconst\r\n arr: array[0..1] of string = ('
', '
');\r\nbegin\r\n Result := ARect;\r\n\r\n {$IFNDEF LIMITEDGRAPHICSMODE}\r\n b := OptimizedHTMLDrawing and TTMSFNCUtils.IsHTML(AText);\r\n {$ELSE}\r\n b := False;\r\n {$ENDIF}\r\n\r\n if b then\r\n begin\r\n for I := 0 to Length(arr) - 1 do\r\n begin\r\n p := Pos(arr[I], UpperCase(AText));\r\n l := Length(arr[I]);\r\n end;\r\n\r\n if (p > 0) and (l > 0) then\r\n begin\r\n lst := TStringList.Create;\r\n try\r\n lst.LineBreak := Copy(AText, p, l);\r\n lst.Text := AText;\r\n\r\n y := 0;\r\n for I := 0 to lst.Count - 1 do\r\n begin\r\n r := InternalCalculateText(lst[I], ARect, AWordWrapping{$IFNDEF LIMITEDGRAPHICSMODE}, ASupportHTML{$ENDIF});\r\n y := y + (r.Bottom - r.Top);\r\n end;\r\n\r\n Result.Bottom := Result.Top + y;\r\n\r\n finally\r\n lst.Free;\r\n end;\r\n end\r\n else\r\n b := False;\r\n end;\r\n\r\n if not b then\r\n Result := InternalCalculateText(AText, ARect, AWordWrapping{$IFNDEF LIMITEDGRAPHICSMODE}, ASupportHTML{$ENDIF});\r\nend;\r\n\r\nfunction TTMSFNCGraphics.InternalCalculateText(AText: String;\r\n ARect: TRectF; AWordWrapping: Boolean = False{$IFNDEF LIMITEDGRAPHICSMODE}; ASupportHTML: Boolean = True{$ENDIF}): TRectF;\r\n{$IFNDEF LIMITEDGRAPHICSMODE}\r\nvar\r\n a, s: String;\r\n fa: String;\r\n XSize, YSize: Single;\r\n hl, ml: Integer;\r\n hr, cr: TRectF;\r\n lc: Integer;\r\n AControlID, AControlType, AControlValue: string;\r\n{$ENDIF}\r\nbegin\r\n Result := ARect;\r\n\r\n if Round(Result.Right - Result.Left) <= 0 then\r\n begin\r\n Result.Bottom := Result.Top;\r\n Exit;\r\n end;\r\n\r\n if AText <> '' then\r\n begin\r\n {$IFNDEF LIMITEDGRAPHICSMODE}\r\n if ASupportHTML and ((Pos(' 0) or (Pos('/>', AText) > 0) or (Pos('
', UpperCase(AText)) > 0)) then\r\n begin\r\n hr := RectF(0, 0, 0, 0);\r\n XSize := 0;\r\n YSize := 0;\r\n hl := -1;\r\n ml := -1;\r\n fa := '';\r\n s := '';\r\n a := '';\r\n lc := 0;\r\n cr := RectF(0, 0, 0, 0);\r\n AControlID := '';\r\n AControlValue := '';\r\n AControlType := '';\r\n HTMLDrawEx(Self, AText, ARect, 0, 0,-1,-1,0,False,True,False,False,False,False,AWordWrapping,False, '', 1.0,URLColor,\r\n gcNull,gcNull,gcNull,a,s,fa,XSize,YSize,hl,ml,hr,cr, AControlID, AControlValue, AControlType, lc, 0, FBitmapContainer, 1, URLUnderline{$IFDEF CMNLIB}, FImageList{$ENDIF},\r\n HighlightColor, HighlightTextColor, HighlightFontStyle);\r\n\r\n YSize := YSize + 1;\r\n\r\n Result.Right := Result.Left + XSize;\r\n Result.Bottom := Result.Top + YSize;\r\n end\r\n else\r\n {$ENDIF}\r\n begin\r\n Result := Context.CalculateText(AText, ARect, AWordWrapping);\r\n Result.Bottom := Result.Bottom + 1;\r\n end;\r\n end\r\n else\r\n begin\r\n Result.Right := Result.Left;\r\n Result.Bottom := Result.Top;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCGraphics.DrawEllipse(ARect: TRect; AModifyRectMode: TTMSFNCGraphicsModifyRectMode = gcrmShrinkAll);\r\nbegin\r\n DrawEllipse(ConvertToRectF(ARect), AModifyRectMode);\r\nend;\r\n\r\nprocedure TTMSFNCGraphics.DrawEllipse(ARect: TRectF; AModifyRectMode: TTMSFNCGraphicsModifyRectMode = gcrmShrinkAll);\r\nbegin\r\n DrawEllipse(ARect.Left, ARect.Top, ARect.Right, ARect.Bottom, AModifyRectMode);\r\nend;\r\n\r\n{ TTMSFNCGraphicsContext }\r\n\r\nfunction TTMSFNCGraphicsContext.ConvertToPath(APath: TTMSFNCGraphicsPath; const Flatness: Single = 0.25): Pointer;\r\nvar\r\n J, I: Integer;\r\n BPts: TTMSFNCGraphicsPathPolygon;\r\n B: TTMSFNCGraphicsPathCubicBezier;\r\n F, Len: Single;\r\n SegCount: Integer;\r\n CurPoint: TPointF;\r\n x: TPointF;\r\nbegin\r\n Result := CreatePath;\r\n if APath.Count > 0 then\r\n begin\r\n F := Max(Flatness, 0.05);\r\n J := 0;\r\n while J < APath.Count do\r\n begin\r\n case APath[J].Kind of\r\n gppMoveTo:\r\n begin\r\n PathOpen(Result);\r\n PathMoveTo(Result, APath[J].Point);\r\n CurPoint := APath[J].Point;\r\n end;\r\n gppLineTo:\r\n begin\r\n PathLineTo(Result, APath[J].Point);\r\n CurPoint := APath[J].Point;\r\n end;\r\n gppCurveTo:\r\n begin\r\n B[0] := CurPoint;\r\n B[1] := APath[J].Point;\r\n Inc(J);\r\n B[2] := APath[J].Point;\r\n Inc(J);\r\n B[3] := APath[J].Point;\r\n BPts := APath.CreateBezier(B, 6);\r\n Len := 0;\r\n for I := 0 to High(BPts) - 1 do\r\n begin\r\n x.X := BPts[I].X - BPts[I + 1].X;\r\n x.Y := BPts[I].Y - BPts[I + 1].Y;\r\n Len := Len + GetPointLength(x);\r\n end;\r\n SegCount := Round(Len / F);\r\n if SegCount < 2 then\r\n PathLineTo(Result, B[3])\r\n else\r\n begin\r\n BPts := APath.CreateBezier(B, SegCount);\r\n for I := 0 to High(BPts) do\r\n PathLineTo(Result, BPts[I]);\r\n CurPoint := APath[J].Point;\r\n end;\r\n end;\r\n gppClose: PathClose(Result);\r\n end;\r\n Inc(J);\r\n end;\r\n end;\r\nend;\r\n\r\nconstructor TTMSFNCGraphicsContext.Create(const AGraphics: TTMSFNCGraphics);\r\nbegin\r\n FGraphics := AGraphics;\r\nend;\r\n\r\nfunction TTMSFNCGraphicsContext.GetGraphics: TTMSFNCGraphics;\r\nbegin\r\n Result := FGraphics;\r\nend;\r\n\r\nfunction TTMSFNCGraphicsContext.GetCanvas: TCanvas;\r\nbegin\r\n Result := nil;\r\n if Assigned(Graphics) then\r\n Result := Graphics.Canvas;\r\nend;\r\n\r\n{$IFDEF WEBLIB}\r\ninitialization\r\nbegin\r\n TTMSFNCBitmap.CreateFromResource(TMSFNCGRAPHICSCLOSE);\r\n TTMSFNCBitmap.CreateFromResource(TMSFNCGRAPHICSDOWN);\r\n TTMSFNCBitmap.CreateFromResource(TMSFNCGRAPHICSRIGHT);\r\n TTMSFNCBitmap.CreateFromResource(TMSFNCGRAPHICSLEFT);\r\n TTMSFNCBitmap.CreateFromResource(TMSFNCGRAPHICSEXPAND);\r\n TTMSFNCBitmap.CreateFromResource(TMSFNCGRAPHICSPIN);\r\n TTMSFNCBitmap.CreateFromResource(TMSFNCGRAPHICSPIN2);\r\n TTMSFNCBitmap.CreateFromResource(TMSFNCGRAPHICSDOWN);\r\n TTMSFNCBitmap.CreateFromResource(TMSFNCGRAPHICSDOWN2);\r\n TTMSFNCBitmap.CreateFromResource(TMSFNCGRAPHICSUP);\r\n TTMSFNCBitmap.CreateFromResource(TMSFNCGRAPHICSUP2);\r\n TTMSFNCBitmap.CreateFromResource(TMSFNCGRAPHICSEXPANDSVG);\r\n TTMSFNCBitmap.CreateFromResource(TMSFNCGRAPHICSUPSVG);\r\n TTMSFNCBitmap.CreateFromResource(TMSFNCGRAPHICSRIGHTSVG);\r\n TTMSFNCBitmap.CreateFromResource(TMSFNCGRAPHICSLEFTSVG);\r\n TTMSFNCBitmap.CreateFromResource(TMSFNCGRAPHICSDOWNSVG);\r\n TTMSFNCBitmap.CreateFromResource(TMSFNCGRAPHICSCLOSESVG);\r\nend;\r\n{$ENDIF}\r\n\r\nend.\r\n","{********************************************************************}\r\n{ }\r\n{ written by TMS Software }\r\n{ copyright (c) 2016 - 2025 }\r\n{ Email : info@tmssoftware.com }\r\n{ Web : https//www.tmssoftware.com }\r\n{ }\r\n{ The source code is given as is. The author is not responsible }\r\n{ for any possible damage done due to the use of this code. }\r\n{ The complete source code remains property of the author and may }\r\n{ not be distributed, published, given or sold in any form as such. }\r\n{ No parts of the source code can be included in any other component }\r\n{ or application without written authorization of the author. }\r\n{********************************************************************}\r\n\r\nunit WEBLib.TMSFNCBitmapContainer;\r\n\r\n{$I WEBLib.TMSFNCDefines.inc}\r\n\r\ninterface\r\n\r\nuses\r\n Classes, WEBLib.TMSFNCTypes, WEBLib.TMSFNCCustomComponent, WEBLib.Controls\r\n {$IFNDEF WEBLIB}\r\n {$IFNDEF LCLLIB}\r\n , Generics.Collections\r\n {$ENDIF}\r\n {$IFDEF LCLLIB}\r\n , fgl\r\n {$ENDIF}\r\n {$ENDIF}\r\n ;\r\n\r\nconst\r\n MAJ_VER = 1; // Major version nr.\r\n MIN_VER = 0; // Minor version nr.\r\n REL_VER = 0; // Release nr.\r\n BLD_VER = 0; // Build nr.\r\n\r\n // version history\r\n // v1.0.0.0 : First Release\r\n\r\ntype\r\n TTMSFNCBitmapContainer = class;\r\n\r\n TTMSFNCBitmapItem = class;\r\n\r\n ITMSFNCBitmapContainer = interface\r\n ['{ED26710D-395F-4971-8AC9-A31083BF2A3C}']\r\n procedure SetBitmapContainer(const Value: TTMSFNCBitmapContainer);\r\n function GetBitmapContainer: TTMSFNCBitmapContainer;\r\n property BitmapContainer: TTMSFNCBitmapContainer read GetBitmapContainer write SetBitmapContainer;\r\n end;\r\n\r\n ITMSFNCBitmapContainerGetItem = interface\r\n ['{98F65D59-B40C-4574-AF9C-3CA68E86AE10}']\r\n function ItemCount: Integer;\r\n function GetItem(AIndex: Integer): TTMSFNCBitmapItem;\r\n end;\r\n\r\n TTMSFNCBitmapItem = class(TCollectionItem)\r\n private\r\n FBitmap: TTMSFNCBitmap;\r\n FTag: NativeInt;\r\n FName: string;\r\n procedure SetBitmap(const Value: TTMSFNCBitmap);\r\n public\r\n constructor Create(ACollection: TCollection); override;\r\n destructor Destroy; override;\r\n procedure DoBitmapChanged(Sender: TObject); virtual;\r\n procedure Assign(Source: TPersistent); override;\r\n function GetDisplayName: string; override;\r\n published\r\n property Bitmap: TTMSFNCBitmap read FBitmap write SetBitmap;\r\n property Name: string read FName write FName;\r\n property Tag: NativeInt read FTag write FTag;\r\n end;\r\n\r\n TTMSFNCBitmapCollection = class(TOwnedCollection)\r\n private\r\n FOwner: TTMSFNCBitmapContainer;\r\n function GetItemEx(Index: Integer): TTMSFNCBitmapItem;\r\n procedure SetItemEx(Index: Integer; const Value: TTMSFNCBitmapItem);\r\n protected\r\n function GetBitmapItemClass: TCollectionItemClass; virtual;\r\n public\r\n constructor Create(AOwner: TTMSFNCBitmapContainer);\r\n function Add: TTMSFNCBitmapItem;\r\n function Insert(index: Integer): TTMSFNCBitmapItem;\r\n property Items[Index: Integer]: TTMSFNCBitmapItem read GetItemEx write SetItemEx; default;\r\n end;\r\n\r\n {$IFDEF WEBLIB}\r\n TControlList = class(TList);\r\n {$ENDIF}\r\n {$IFNDEF WEBLIB}\r\n TControlList = class(TList);\r\n {$ENDIF}\r\n\r\n {$IFDEF FMXLIB}\r\n TWinControl = TControl;\r\n {$ENDIF}\r\n\r\n {$IFNDEF LCLLIB}\r\n [ComponentPlatformsAttribute(TMSPlatformsWeb)]\r\n {$ENDIF}\r\n TTMSFNCBitmapContainer = class(TTMSFNCCustomComponent, ITMSFNCBitmapContainerGetItem)\r\n private\r\n FControls: TControlList;\r\n FItems: TTMSFNCBitmapCollection;\r\n FOnBitmapChanged: TNotifyEvent;\r\n procedure SetItems(const Value: TTMSFNCBitmapCollection);\r\n function GetBitmapName(AIndex: Integer): String;\r\n function GetBitmap(AIndex: Integer): TTMSFNCBitmap;\r\n function GetItems: TTMSFNCBitmapCollection;\r\n protected\r\n function GetInstance: NativeUInt; override;\r\n function GetVersion: string; override;\r\n function CreateItems: TTMSFNCBitmapCollection; virtual;\r\n procedure RegisterRuntimeClasses; override;\r\n procedure Notification(AComponent: TComponent; Operation: TOperation); override;\r\n procedure DoBitmapChanged(Sender: TObject);\r\n procedure InvalidateMembers(AControl: TWinControl); virtual;\r\n public\r\n constructor Create; reintroduce; overload; virtual;\r\n constructor Create(AOwner: TComponent); overload; override;\r\n destructor Destroy; override;\r\n procedure Assign(Source: TPersistent); override;\r\n procedure Changed; virtual;\r\n procedure RegisterControl(AControl: TControl);\r\n procedure FindBitmap(i: Integer; ABitmap: TTMSFNCBitmap); overload; virtual;\r\n function GetItem(AIndex: Integer): TTMSFNCBitmapItem; virtual;\r\n function FindBitmap(s: string): TTMSFNCBitmap; overload; virtual;\r\n function ItemCount: Integer;\r\n function RandomBitmapName: string;\r\n function RandomBitmap: TTMSFNCBitmap;\r\n procedure AddFromURL({%H-}URL, {%H-}BitmapName: string); virtual;\r\n procedure AddFromResource(ResourceName, BitmapName: string; AInstance: NativeUInt); overload;\r\n procedure AddFromResource(ResourceName, BitmapName: string); overload;\r\n procedure AddFromFile(FileName, BitmapName: String);\r\n {$IFNDEF WEBLIB}\r\n procedure AddFromFolder(AFolder: string);\r\n {$ENDIF}\r\n property BitmapNames[AIndex: Integer]: String read GetBitmapName;\r\n property Bitmaps[AIndex: Integer]: TTMSFNCBitmap read GetBitmap;\r\n published\r\n property Items: TTMSFNCBitmapCollection read GetItems write SetItems;\r\n property Version: string read GetVersion;\r\n property OnBitmapChanged: TNotifyEvent read FOnBitmapChanged write FOnBitmapChanged;\r\n end;\r\n\r\nimplementation\r\n\r\nuses\r\n TypInfo, WEBLib.Forms, SysUtils, WEBLib.TMSFNCUtils\r\n {$IFDEF FMXLIB}\r\n ,FMX.Types\r\n {$ENDIF}\r\n ;\r\n\r\n{$R 'TMSFNCBitmapContainer.res'}\r\n\r\n{$IFDEF FMXLIB}\r\ntype\r\n TCustomFormHelper = class helper for TCustomForm\r\n private\r\n function GetControlCount: Integer;\r\n function GetControls(AIndex: Integer): TWinControl;\r\n public\r\n property ControlCount: Integer read GetControlCount;\r\n property Controls[Index: Integer]: TWinControl read GetControls;\r\n end;\r\n {$ENDIF}\r\n\r\n{ TTMSFNCBitmapItem }\r\n\r\nprocedure TTMSFNCBitmapItem.Assign(Source: TPersistent);\r\nbegin\r\n Name := (Source as TTMSFNCBitmapItem).Name;\r\n Tag := (Source as TTMSFNCBitmapItem).Tag;\r\n Bitmap.Assign((Source as TTMSFNCBitmapItem).Bitmap)\r\nend;\r\n\r\nconstructor TTMSFNCBitmapItem.Create(ACollection: TCollection);\r\nbegin\r\n inherited;\r\n FBitmap := TTMSFNCBitmap.Create;\r\n FBitmap.OnChange := @DoBitmapChanged;\r\n FName := 'Item' + IntToStr(Collection.Count);\r\nend;\r\n\r\ndestructor TTMSFNCBitmapItem.Destroy;\r\nbegin\r\n FBitmap.Free;\r\n inherited;\r\nend;\r\n\r\nprocedure TTMSFNCBitmapItem.DoBitmapChanged(Sender: TObject);\r\nbegin\r\n if (Collection is TTMSFNCBitmapCollection) then\r\n begin\r\n if Assigned((Collection as TTMSFNCBitmapCollection).FOwner) then\r\n (Collection as TTMSFNCBitmapCollection).FOwner.DoBitmapChanged(Self);\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCBitmapItem.GetDisplayName: string;\r\nbegin\r\n if FName <> '' then\r\n Result := FName\r\n {$IFDEF WEBLIB}\r\n else\r\n Result := '';\r\n {$ENDIF}\r\n {$IFNDEF WEBLIB}\r\n else\r\n Result := inherited;\r\n {$ENDIF}\r\nend;\r\n\r\nprocedure TTMSFNCBitmapItem.SetBitmap(const Value: TTMSFNCBitmap);\r\nbegin\r\n FBitmap.Assign(Value);\r\nend;\r\n\r\n{ TTMSFNCBitmapCollection }\r\n\r\nfunction TTMSFNCBitmapCollection.Add: TTMSFNCBitmapItem;\r\nbegin\r\n Result := TTMSFNCBitmapItem(inherited Add);\r\nend;\r\n\r\nconstructor TTMSFNCBitmapCollection.Create(AOwner: TTMSFNCBitmapContainer);\r\nbegin\r\n inherited Create(AOwner, GetBitmapItemClass);\r\n FOwner := AOwner;\r\nend;\r\n\r\nfunction TTMSFNCBitmapCollection.GetBitmapItemClass: TCollectionItemClass;\r\nbegin\r\n Result := TTMSFNCBitmapItem;\r\nend;\r\n\r\nfunction TTMSFNCBitmapCollection.GetItemEx(Index: Integer): TTMSFNCBitmapItem;\r\nbegin\r\n Result := TTMSFNCBitmapItem(inherited Items[Index]);\r\nend;\r\n\r\nfunction TTMSFNCBitmapCollection.Insert(index: Integer): TTMSFNCBitmapItem;\r\nbegin\r\n Result := TTMSFNCBitmapItem(inherited Insert(Index));\r\nend;\r\n\r\nprocedure TTMSFNCBitmapCollection.SetItemEx(Index: Integer; const Value: TTMSFNCBitmapItem);\r\nbegin\r\n inherited SetItem(Index, Value);\r\nend;\r\n\r\n{ TTMSFNCBitmapContainer }\r\n\r\nprocedure TTMSFNCBitmapContainer.AddFromFile(FileName, BitmapName: string);\r\nvar\r\n bmpi: TTMSFNCBitmapItem;\r\nbegin\r\n bmpi := Items.Add;\r\n bmpi.Bitmap.LoadFromFile(FileName);\r\n bmpi.Name := BitmapName;\r\nend;\r\n\r\n{$IFNDEF WEBLIB}\r\nprocedure TTMSFNCBitmapContainer.AddFromFolder(AFolder: string);\r\nvar\r\n SR: TSearchRec;\r\n\r\n procedure AddToList(s: string);\r\n begin\r\n with Items.Add do\r\n begin\r\n try\r\n Bitmap.LoadFromFile(s);\r\n Name := ExtractFileName(s);\r\n except\r\n Bitmap.Assign(nil);\r\n end;\r\n end;\r\n end;\r\n\r\nbegin\r\n if FindFirst(AFolder,faAnyFile and not faDirectory,SR) = 0 then\r\n begin\r\n AddToList(ExtractFilePath(AFolder) + SR.Name);\r\n while FindNext(SR) = 0 do\r\n AddToList(ExtractFilePath(AFolder) + SR.Name);\r\n end;\r\n FindClose(SR);\r\nend;\r\n{$ENDIF}\r\n\r\nprocedure TTMSFNCBitmapContainer.AddFromURL(URL, BitmapName: string);\r\n{$IFDEF WEBLIB}\r\nvar\r\n bmpi: TTMSFNCBitmapItem;\r\n{$ENDIF}\r\nbegin\r\n {$IFDEF WEBLIB}\r\n bmpi := Self.Items.Add;\r\n bmpi.Bitmap.LoadFromURL(URL);\r\n bmpi.Name := BitmapName;\r\n {$ENDIF}\r\nend;\r\n\r\nprocedure TTMSFNCBitmapContainer.Assign(Source: TPersistent);\r\nbegin\r\n if (Source is TTMSFNCBitmapContainer) then\r\n begin\r\n FItems.Assign((Source as TTMSFNCBitmapContainer).Items);\r\n end\r\n else\r\n inherited;\r\nend;\r\n\r\nprocedure TTMSFNCBitmapContainer.AddFromResource(ResourceName, BitmapName: string; AInstance: NativeUInt);\r\nvar\r\n bmpi: TTMSFNCBitmapItem;\r\nbegin\r\n bmpi := Items.Add;\r\n bmpi.Bitmap.LoadFromResource(ResourceName, AInstance);\r\n bmpi.Name := BitmapName;\r\nend;\r\n\r\nprocedure TTMSFNCBitmapContainer.AddFromResource(ResourceName, BitmapName: string);\r\nbegin\r\n AddFromResource(ResourceName, BitmapName, GetInstance);\r\nend;\r\n\r\nprocedure TTMSFNCBitmapContainer.Changed;\r\nvar\r\n i: integer;\r\nbegin\r\n for i := 0 to FControls.Count - 1 do\r\n {$IFDEF FMXLIB}\r\n FControls.Items[i].Invalidate;\r\n {$ENDIF}\r\n {$IFDEF CMNLIB}\r\n FControls.Items[i].Invalidate;\r\n {$ENDIF}\r\nend;\r\n\r\nconstructor TTMSFNCBitmapContainer.Create(AOwner: TComponent);\r\nbegin\r\n inherited;\r\n FItems := CreateItems;\r\n FControls := TControlList.Create;\r\nend;\r\n\r\nconstructor TTMSFNCBitmapContainer.Create;\r\nbegin\r\n Create(nil);\r\nend;\r\n\r\nfunction TTMSFNCBitmapContainer.CreateItems: TTMSFNCBitmapCollection;\r\nbegin\r\n Result := TTMSFNCBitmapCollection.Create(Self);\r\nend;\r\n\r\ndestructor TTMSFNCBitmapContainer.Destroy;\r\nbegin\r\n FreeAndNil(FControls);\r\n FItems.Free;\r\n inherited;\r\nend;\r\n\r\nprocedure TTMSFNCBitmapContainer.DoBitmapChanged(Sender: TObject);\r\nvar\r\n f: TCustomForm;\r\n I: Integer;\r\nbegin\r\n f := TTMSFNCUtils.GetParentForm(Self);\r\n if Assigned(f) then\r\n begin\r\n for I := 0 to f.ControlCount - 1 do\r\n if f.Controls[I] is TWinControl then\r\n InvalidateMembers(f.Controls[I] as TWinControl);\r\n end;\r\n\r\n if Assigned(OnBitmapChanged) then\r\n OnBitmapChanged(Self);\r\nend;\r\n\r\nprocedure TTMSFNCBitmapContainer.FindBitmap(i: Integer; ABitmap: TTMSFNCBitmap);\r\nbegin\r\n if (i >= 0) and (i <= Items.Count - 1) then\r\n ABitmap.Assign(Items[I].Bitmap);\r\nend;\r\n\r\nfunction TTMSFNCBitmapContainer.FindBitmap(s: string): TTMSFNCBitmap;\r\nvar\r\n i: Integer;\r\nbegin\r\n Result := nil;\r\n s := Uppercase(s);\r\n i := 1;\r\n while i <= Items.Count do\r\n begin\r\n if Uppercase(Items[i - 1].Name) = s then\r\n begin\r\n Result := Items[i - 1].Bitmap;\r\n Break;\r\n end;\r\n Inc(i);\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCBitmapContainer.SetItems(const Value: TTMSFNCBitmapCollection);\r\nbegin\r\n FItems.Assign(Value);\r\nend;\r\n\r\nfunction TTMSFNCBitmapContainer.GetBitmap(AIndex: Integer): TTMSFNCBitmap;\r\nbegin\r\n Result := nil;\r\n if (AIndex >= 0) and (AIndex <= Items.Count - 1) then\r\n Result := Items[AIndex].Bitmap;\r\nend;\r\n\r\nfunction TTMSFNCBitmapContainer.GetBitmapName(AIndex: Integer): String;\r\nbegin\r\n Result := '';\r\n if (AIndex >= 0) and (AIndex <= Items.Count - 1) then\r\n Result := Items[AIndex].Name;\r\nend;\r\n\r\nfunction TTMSFNCBitmapContainer.GetInstance: NativeUInt;\r\nbegin\r\n Result := HInstance;\r\nend;\r\n\r\nfunction TTMSFNCBitmapContainer.GetItem(AIndex: Integer): TTMSFNCBitmapItem;\r\nbegin\r\n Result := nil;\r\n if (AIndex >= 0) and (AIndex <= ItemCount - 1) then\r\n Result := Items[AIndex];\r\nend;\r\n\r\nfunction TTMSFNCBitmapContainer.GetItems: TTMSFNCBitmapCollection;\r\nbegin\r\n Result := FItems;\r\nend;\r\n\r\nfunction TTMSFNCBitmapContainer.GetVersion: string;\r\nbegin\r\n Result := GetVersionNumber(MAJ_VER, MIN_VER, REL_VER, BLD_VER);\r\nend;\r\n\r\nprocedure TTMSFNCBitmapContainer.InvalidateMembers(AControl: TWinControl);\r\nvar\r\n I: Integer;\r\nbegin\r\n if not Assigned(AControl) then\r\n Exit;\r\n\r\n if Assigned(GetPropInfo(AControl, 'BitmapContainer')) then\r\n AControl.Invalidate;\r\n\r\n for I := 0 to AControl.ControlCount - 1 do\r\n begin\r\n if AControl.Controls[I] is TWinControl then\r\n InvalidateMembers(AControl.Controls[I] as TWinControl);\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCBitmapContainer.ItemCount: Integer;\r\nbegin\r\n Result := Items.Count;\r\nend;\r\n\r\nprocedure TTMSFNCBitmapContainer.Notification(AComponent: TComponent;\r\n Operation: TOperation);\r\nvar\r\n i: integer;\r\nbegin\r\n inherited;\r\n if (Operation = opRemove) and Assigned(FControls) then\r\n begin\r\n for i := FControls.Count - 1 downto 0 do\r\n begin\r\n if (FControls.Items[i] = AComponent) then\r\n FControls.Delete(i);\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCBitmapContainer.RandomBitmap: TTMSFNCBitmap;\r\nbegin\r\n Result := Bitmaps[Random(ItemCount)];\r\nend;\r\n\r\nfunction TTMSFNCBitmapContainer.RandomBitmapName: string;\r\nbegin\r\n Result := BitmapNames[Random(ItemCount)];\r\nend;\r\n\r\nprocedure TTMSFNCBitmapContainer.RegisterControl(\r\n AControl: TControl);\r\nbegin\r\n FControls.Add(AControl);\r\nend;\r\n\r\nprocedure TTMSFNCBitmapContainer.RegisterRuntimeClasses;\r\nbegin\r\n RegisterClass(TTMSFNCBitmapContainer);\r\nend;\r\n\r\n{$IFDEF FMXLIB}\r\n\r\n{ TCustomFormHelper }\r\n\r\nfunction TCustomFormHelper.GetControls(AIndex: Integer): TWinControl;\r\nvar\r\n c: TFmxObject;\r\nbegin\r\n Result := nil;\r\n c := Children[AIndex];\r\n if c is TWinControl then\r\n Result := c as TWinControl;\r\nend;\r\n\r\nfunction TCustomFormHelper.GetControlCount: Integer;\r\nbegin\r\n Result := ChildrenCount;\r\nend;\r\n\r\n{$ENDIF}\r\n\r\nend.\r\n","{********************************************************************}\r\n{ written by TMS Software }\r\n{ copyright (c) 2016 - 2023 }\r\n{ Email : info@tmssoftware.com }\r\n{ Web : http://www.tmssoftware.com }\r\n{ }\r\n{ The source code is given as is. The author is not responsible }\r\n{ for any possible damage done due to the use of this code. }\r\n{ The complete source code remains property of the author and may }\r\n{ not be distributed, published, given or sold in any form as such. }\r\n{ No parts of the source code can be included in any other component }\r\n{ or application without written authorization of the author. }\r\n{********************************************************************}\r\n\r\nunit WEBLib.TMSFNCHTMLEngine;\r\n\r\n{$I WEBLib.TMSFNCDefines.inc}\r\n\r\n{$IFDEF WEBLIB}\r\n{$DEFINE LCLWEBLIB}\r\n{$ENDIF}\r\n\r\n{$IFDEF LCLLIB}\r\n{$DEFINE LCLWEBLIB}\r\n{$ENDIF}\r\n\r\ninterface\r\n\r\nuses\r\n Classes, WEBLib.TMSFNCGraphics, Types, WEBLib.Graphics,\r\n WEBLib.TMSFNCTypes, WEBLib.TMSFNCBitmapContainer, WEBLib.TMSFNCGraphicsTypes\r\n {$IFDEF CMNLIB}\r\n , FMX.ImgList\r\n {$ENDIF}\r\n {$IFNDEF LCLWEBLIB}\r\n {$HINTS OFF}\r\n {$IF COMPILERVERSION > 22}\r\n , UITypes\r\n {$IFEND}\r\n {$HINTS ON}\r\n {$ENDIF}\r\n ;\r\n\r\nvar\r\n TMSFNCHTMLENGINE_ATTR_DELIM: char = '\"';\r\n\r\nfunction HTMLDrawEx(AGraphics: TTMSFNCGraphics; s:string; fr:TRectF;\r\n XPos,YPos,FocusLink,HoverLink,ShadowOffset: Integer;\r\n CheckHotSpot,CheckHeight,{%H-}Print,Selected,Blink,HoverStyle,WordWrap: Boolean;\r\n {%H-}ResFactor:Double;\r\n URLColor,HoverColor,HoverFontColor,ShadowColor: TTMSFNCGraphicsColor;\r\n var AnchorVal,StripVal,FocusAnchor: string;\r\n var XSize,YSize: single; var HyperLinks,MouseLink: Integer;\r\n var HoverRect:TRectF;var LineCount: Integer; LineSpacing: Integer;\r\n BitmapContainer: TTMSFNCBitmapContainer; {%H-}Opacity: Single; HyperLinkUnderline: Boolean = True{$IFDEF CMNLIB}; ImageList: TCustomImageList = nil{$ENDIF};\r\n HighlightColor: TTMSFNCGraphicsColor = gcBlue;\r\n HighlightTextColor: TTMSFNCGraphicsColor = gcWhite;\r\n HighlightTextStyle: TFontStyles = []\r\n ): Boolean; overload;\r\n\r\nfunction HTMLDrawEx(AGraphics: TTMSFNCGraphics; s:string; fr:TRectF;\r\n XPos,YPos,FocusLink,HoverLink,ShadowOffset: Integer;\r\n CheckHotSpot,CheckHeight,{%H-}Print,Selected,Blink,HoverStyle,WordWrap, Down: Boolean;\r\n DownID: string;\r\n {%H-}ResFactor:Double;\r\n URLColor,HoverColor,HoverFontColor,ShadowColor: TTMSFNCGraphicsColor;\r\n var AnchorVal,StripVal,FocusAnchor: string;\r\n var XSize,YSize: single; var HyperLinks,MouseLink: Integer;\r\n var HoverRect, ControlRect:TRectF;var CID,CV,CT: string; var LineCount: Integer; LineSpacing: Integer;\r\n BitmapContainer: TTMSFNCBitmapContainer; {%H-}Opacity: Single; HyperLinkUnderline: Boolean = True{$IFDEF CMNLIB}; ImageList: TCustomImageList = nil{$ENDIF};\r\n HighlightColor: TTMSFNCGraphicsColor = gcBlue;\r\n HighlightTextColor: TTMSFNCGraphicsColor = gcWhite;\r\n HighlightTextStyle: TFontStyles = []\r\n ): Boolean; overload;\r\n\r\nfunction HiLight(s,h,tag:string;DoCase,FullText:boolean):string;\r\nfunction UnHiLight(s,tag:string):string;\r\nfunction GetControlValue(HTML,ControlID:string;var ControlValue:String): Boolean;\r\nfunction GetControlProp(HTML,ControlID:string): string;\r\nfunction GetControlMaxLen(HTML,ControlID:string): integer;\r\nfunction SetControlValue(var HTML:string;ControlID,ControlValue:string): Boolean;\r\nfunction ClearRadioControls(HTML: string): string;\r\nfunction GetNextControlID(HTML:string; ControlID: string): string;\r\nfunction HasHTMLControl(HTML: string): boolean;\r\nprocedure ParseControl(Tag: string; var ControlType,ControlID,ControlValue,ControlWidth,ControlHeight,ControlProp,ControlLen:string);\r\n\r\nimplementation\r\n\r\nuses\r\n SysUtils, WEBLib.TMSFNCUtils\r\n {$IFDEF LCLLIB}\r\n ,LCLIntF\r\n {$ENDIF}\r\n {$IFDEF VCLLIB}\r\n ,Windows\r\n {$ENDIF}\r\n {$IFNDEF LCLLIB}\r\n {$HINTS OFF}\r\n {$IF COMPILERVERSION > 29}\r\n ,Character\r\n {$IFEND}\r\n {$HINTS ON}\r\n {$ENDIF}\r\n ;\r\n\r\nfunction VarIPos(su,s:string;var Res:Integer):Integer;\r\nbegin\r\n Res := Pos(su, Uppercase(s));\r\n Result := Res;\r\nend;\r\n\r\nfunction HTMLStripAll(s:string):string;\r\nvar\r\n TagPos, PTP: integer;\r\nbegin\r\n Result := '';\r\n\r\n // remove all tags\r\n while (TTMSFNCUtils.VarPos('<',s,TagPos)>0) do\r\n begin\r\n PTP := TagPos;\r\n if (TTMSFNCUtils.VarPos('>',s,TagPos) > PTP) then\r\n begin\r\n Result := Result + Copy(s,1,PTP - 1);\r\n Delete(s,1,TagPos)\r\n end\r\n else\r\n Break;\r\n end;\r\n Result := Result + s;\r\nend;\r\n\r\nfunction HiLight(s,h,tag:string; DoCase,FullText:boolean):string;\r\nvar\r\n hs: string;\r\n l,k,m: Integer;\r\n IsHTML: Boolean;\r\nbegin\r\n // This code removes other highlighting, i.e. all \"<\"+Tag+\">\" and \"\"\r\n // - this will avoid a \"duplicate\" highlighting as this could lead to highlight\r\n // unappropriated parts of a text or confuse a user\r\n // To avoid case sensitivity I use the fast ASCII version of Uppercase function\r\n // as this is good enough for all tags (they can’t contain international characters)\r\n tag := Uppercase(tag); // an upper-case version of a tag used in the rest of the function\r\n hs := Uppercase(s); // an upper-case version of the searched text\r\n // I repeatedly look for \"<\"+tag+\">\" and remove it from both upper-case (hs) and original (s)\r\n // version of the searched text. This part can be better optimized, but in most cases\r\n // the highlight tag won’t be presented in the searched text or it will be there only once.\r\n\r\n l := Pos('<' + tag + '>',hs);\r\n while (l > 0) do\r\n begin\r\n Delete(s, l, Length(tag) + 2);\r\n Delete(hs, l, Length(tag) + 2);\r\n l := Pos('<' + tag + '>',hs);\r\n end;\r\n\r\n // Same for \"\"\r\n l := Pos('',hs);\r\n while (l > 0) do\r\n begin\r\n Delete(s, l, Length(tag) + 3);\r\n Delete(hs, l, Length(tag) + 3);\r\n l := Pos('',hs);\r\n end;\r\n\r\n // This code is little confusing as it is not always clear when the text is HTML and when\r\n // is just a plain text. Some parts of TAdvStringGrid code recognizes HTML text by a presence\r\n // of \" 0);\r\n // For HTML version I need to create a plain text version without all tags and special characters\r\n // converted to the normal ones.\r\n if IsHTML then\r\n hs := TTMSFNCUtils.UnFixMarkup(HTMLStripAll(s), true)\r\n\r\n else hs := s;\r\n // For non-case-sensitive search I need the upper-case version.\r\n if not DoCase then\r\n hs := AnsiUppercase(hs);\r\n\r\n // I will clear the result as I need to add handled parts to it, to avoid an extra variable.\r\n Result := '';\r\n\r\n // When the full text search is provided (i.e. both texts must match) I need just to compare\r\n // h and hs. If they match I can highlight the whole text.\r\n if FullText then\r\n begin\r\n // This works for both html and plain texts, but for HTML version the version with tags\r\n // should be included in the result opposite to plain text version where we need the version\r\n // with fixed special characters\r\n if (h = hs) then\r\n if (IsHTML) then s := '<' + tag + '>' + s + ''\r\n else s := '<' + tag + '>' + TTMSFNCUtils.FixMarkup(s) + '';\r\n end\r\n else\r\n if not IsHTML then\r\n begin\r\n // The plain-text partial search is little more complicated. Mainly I need to convert all special\r\n // characters to the HTML version when the highlighting is applied. Otherwise I need to keep the\r\n // original plain-text version as there is not tag in the text and it will be handled as plain text.\r\n l := Pos(h, hs);\r\n if (l > 0) then\r\n begin\r\n repeat\r\n Result := Result + TTMSFNCUtils.FixMarkup(Copy(s, 1, l - 1), false) + '<' + tag + '>' + TTMSFNCUtils.FixMarkup(Copy(s, l, Length(h)), false) + '';\r\n Delete(s, 1, l + length(h) - 1);\r\n Delete(hs, 1, l + length(h) - 1);\r\n l := Pos(h, hs);\r\n until (l = 0);\r\n s := TTMSFNCUtils.FixMarkup(s, false);\r\n end;\r\n end\r\n else\r\n begin\r\n // The last and more complex processing for HTML texts. The main idea is to find the text fh (i.e.\r\n // h with fixed special characters) in the searched text hs (i.e. s without tags). When I found\r\n // a matching, I will copy everything from the original text up to the matching location including\r\n // tags.\r\n // Try to find a matching and store it to L.\r\n l := Pos(h, hs);\r\n while (l > 0) do\r\n begin\r\n // Some matching was found, I can safely delete everything up to the end of matching\r\n // from hs (s without tags)\r\n Delete(hs, 1, l + length(h) - 1);\r\n // Now I need to move a part of s before the matching to the Result.\r\n // But it still can contain both tags and special characters!\r\n repeat\r\n // Try to find a start of the first tag or special character in remaining part of s, if it exists.\r\n k := pos('<', s);\r\n m := pos('&', s);\r\n //m := 0;\r\n // Move all text, all tags up to the matching and all special characters before the matching\r\n // to the result. Keep on mind the tags are not calculated, but special characters are handled as\r\n // a single character.\r\n while ((k > 0) and (k <= l)) or ((m > 0) and (m < l)) do\r\n begin\r\n // We need to move the part of S before the matching and the tag/special character into the result,\r\n // whatever of them is the first.\r\n if (k > 0) and ((m <= 0) or (k < m)) then\r\n begin\r\n Result := Result + copy(s, 1, k - 1);\r\n Delete(s, 1, k - 1);\r\n l := l - (k - 1);\r\n m := m - (k - 1);\r\n k := pos('>', s);\r\n if (k = 0) then k := Length(s);\r\n Result := Result + copy(s, 1, k);\r\n Delete(s, 1, k);\r\n m := m - k;\r\n k := pos('<', s);\r\n end\r\n else\r\n begin\r\n Result := Result + copy(s, 1, m - 1);\r\n Delete(s, 1, m - 1);\r\n l := l - (m - 1) - 1; // -1 = special character\r\n k := k - (m - 1);\r\n m := pos(';', s);\r\n l := l - m + 1;\r\n if (m = 0) then m := Length(s);\r\n Result := Result + copy(s, 1, m);\r\n Delete(s, 1, m);\r\n k := k - m;\r\n m := pos('&', s);\r\n end;\r\n end;\r\n // No more tags or special characters were found or they lie after a start of the matching or the\r\n // special character is the first character of the matching. I can move a part of S before\r\n // the matching to Result and start highlighting adding \"<\"+tag+\">\"\r\n Result := Result + copy(s, 1, l - 1) + '<' + tag + '>';\r\n Delete(s, 1, l - 1);\r\n // Now I will exclude the deleted part of s from the position of the first tag/spec.char\r\n // to re-use the values.\r\n k := k - (l - 1);\r\n m := m - (l - 1);\r\n // Store the length of matching text. Again, it can contain other tags.\r\n l := Length(h);\r\n // While there exists some tag in the matching text, move part of S before the tag into the result,\r\n // move the tag and try to find another one, until no one is found, it lies behind the matching text\r\n // or the end of S is reached (the last condition should never occur)\r\n while (((k > 0) and (k <= l)) or ((m > 0) and (m <= l))) and (l > 0) and (s <> '') do\r\n begin\r\n if (k > 0) and ((m <= 0) or (k < m)) then\r\n begin\r\n Result := Result + copy(s, 1, k - 1);\r\n Delete(s, 1, k - 1);\r\n l := l - (k - 1);\r\n m := m - (k - 1);\r\n k := pos('>', s);\r\n if (k = 0) then k := Length(s);\r\n Result := Result + copy(s, 1, k);\r\n // A special handling to keep highlighting after tag\r\n if (Uppercase(copy(s, 1, 6)) = '<' + tag + '>';\r\n Delete(s, 1, k);\r\n m := m - k;\r\n k := pos('<', s);\r\n end\r\n else\r\n begin\r\n Result := Result + copy(s, 1, m - 1);\r\n Delete(s, 1, m - 1);\r\n l := l - (m - 1) - 1; // -1 = special character\r\n k := k - (m - 1);\r\n m := pos(';', s);\r\n if (m = 0) then m := Length(s);\r\n Result := Result + copy(s, 1, m);\r\n Delete(s, 1, m);\r\n k := k - m;\r\n m := pos('&', s);\r\n end;\r\n end;\r\n // L contains resting characters to move from S to the result. We don't need any other testing now.\r\n if (l > 0) then\r\n begin\r\n Result := Result + copy(s, 1, l);\r\n Delete(s, 1, l);\r\n end;\r\n // The whole matching was moved to result, so we must \"close\" highlighting now.\r\n Result := Result + '';\r\n l := 0;\r\n // Continue until whole string before the matching and the matching are moved\r\n // from S into the result.\r\n until (l = 0);\r\n // Now try to find another matching.\r\n l := Pos(h, hs);\r\n end;\r\n end;\r\n // S contains an unhandled part of the original text without any other matching.\r\n // - for full-text and plain-text matching the variable S can contain pre-processed\r\n // values as the handling was different\r\n Result := Result + s;\r\nend;\r\n\r\nfunction UnHiLight(s,tag:string):string;\r\nvar\r\n IsHTML, WasHTML: Boolean;\r\nbegin\r\n Result := '';\r\n // replace line breaks by linefeeds\r\n WasHTML := (Pos(' 0);\r\n\r\n tag := Uppercase(tag);\r\n while Pos('<' + tag + '>', Uppercase(s)) > 0 do s := StringReplace(s,'<' + tag + '>','',[rfIgnoreCase]);\r\n while Pos('', Uppercase(s)) > 0 do s := StringReplace(s,'','',[rfIgnoreCase]);\r\n\r\n IsHTML := (Pos(' 0);\r\n if WasHTML and not IsHTML then\r\n s := TTMSFNCUtils.UnFixMarkup(s, false);\r\n\r\n Result := s;\r\nend;\r\n\r\nfunction IStrToInt(s:string):Integer;\r\nvar\r\n {%H-}Err,Res: Integer;\r\nbegin\r\n Val(s,Res,Err);\r\n Result := Res;\r\nend;\r\n\r\nfunction DBTagStrip(s:string):string;\r\nvar\r\n i,j: Integer;\r\nbegin\r\n i := Pos('<#',s);\r\n if i > 0 then\r\n begin\r\n Result := Copy(s,1,i - 1);\r\n Delete(s,1,i);\r\n j := Pos('>',s);\r\n if j > 0 then\r\n Delete(s,j,1);\r\n Result := Result + s;\r\n end\r\n else\r\n Result := s;\r\nend;\r\n\r\nfunction HexVal(s:string): Integer;\r\nvar\r\n i,j: Integer;\r\nbegin\r\n if Length(s) < 2 then\r\n begin\r\n Result := 0;\r\n Exit;\r\n end;\r\n\r\n {$IFDEF ZEROSTRINGINDEX}\r\n if s[0] >= 'A' then\r\n i := ord(s[0]) - ord('A') + 10\r\n else\r\n i := ord(s[0]) - ord('0');\r\n\r\n if s[1] >= 'A' then\r\n j := ord(s[1]) - ord('A') + 10\r\n else\r\n j := ord(s[1]) - ord('0');\r\n {$ELSE}\r\n if s[1] >= 'A' then\r\n i := ord(s[1]) - ord('A') + 10\r\n else\r\n i := ord(s[1]) - ord('0');\r\n\r\n if s[2] >= 'A' then\r\n j := ord(s[2]) - ord('A') + 10\r\n else\r\n j := ord(s[2]) - ord('0');\r\n {$ENDIF}\r\n\r\n Result := i shl 4 + j;\r\nend;\r\n\r\nfunction UnicodeTagStrip(s: string): string;\r\nvar\r\n i,j,k,e,nn: Integer;\r\n su,res: string;\r\n w: integer;\r\n ishex: boolean;\r\n\r\n function NonNum(aval: string; dohex: boolean): integer;\r\n var\r\n i,ofs: integer;\r\n begin\r\n if dohex then\r\n ofs := 4\r\n else\r\n ofs := 3;\r\n\r\n Result := ofs;\r\n\r\n for i := ofs to length(aval) do\r\n begin\r\n if not ((aval[i{$IFDEF ZEROSTRINGINDEX} -1 {$ENDIF}] >= '0') and (aval[i{$IFDEF ZEROSTRINGINDEX} -1 {$ENDIF}] <= '9')) then\r\n begin\r\n Result := i;\r\n break;\r\n end;\r\n\r\n if (dohex and not ((aval[i{$IFDEF ZEROSTRINGINDEX} -1 {$ENDIF}] >= 'A') and (aval[i{$IFDEF ZEROSTRINGINDEX} -1 {$ENDIF}] <='F')))\r\n and (dohex and not ((aval[i{$IFDEF ZEROSTRINGINDEX} -1 {$ENDIF}] >= 'a') and (aval[i{$IFDEF ZEROSTRINGINDEX} -1 {$ENDIF}] <='f'))) then\r\n begin\r\n Result := i;\r\n break;\r\n end;\r\n end;\r\n end;\r\n\r\nbegin\r\n\r\n res := '';\r\n repeat\r\n i := Pos('&#',s);\r\n k := Pos('&&#',s);\r\n if (k = i - 1) and (k <> 0) then\r\n i := 0;\r\n\r\n if (i > 0) then\r\n begin\r\n res := res + Copy(s,1,i - 1);\r\n Delete(s,1,i - 1);\r\n ishex := pos('&#x',s) = 1;\r\n\r\n j := Pos(';',s);\r\n\r\n if j > 7 then\r\n begin\r\n nn := NonNum(s, ishex);\r\n j := nn;\r\n end;\r\n\r\n if (j > 0) then\r\n begin\r\n if ishex then\r\n begin\r\n su := Copy(s,4,j - 4);\r\n try\r\n w := HexVal(su);\r\n e := 0;\r\n except\r\n w := 0;\r\n end;\r\n end\r\n else\r\n begin\r\n su := Copy(s,3,j - 3);\r\n val(su, w, e);\r\n end;\r\n\r\n if (length(su)> 0) and (length(su) <= 6) and (e = 0) then\r\n begin\r\n {$IFNDEF LCLLIB}\r\n {$HINTS OFF}\r\n {$IF COMPILERVERSION > 29}\r\n if W >= 126980 then\r\n res := res + ''\r\n else\r\n {$IFEND}\r\n {$HINTS ON}\r\n {$ENDIF}\r\n res := res + chr(w);\r\n\r\n Delete(s,1,j);\r\n end;\r\n end\r\n else\r\n begin\r\n res := res + '&#';\r\n Delete(s,1,2);\r\n end;\r\n end\r\n else\r\n res := res + s;\r\n until i <= 0;\r\n\r\n Result := res;\r\nend;\r\n\r\nfunction CRLFStrip(s:string;break:boolean):string;\r\nvar\r\n i: Integer;\r\nbegin\r\n Result := '';\r\n {$IFDEF ZEROSTRINGINDEX}\r\n for i := 0 to Length(s) - 1 do\r\n {$ELSE}\r\n for i := 1 to Length(s) do\r\n {$ENDIF}\r\n begin\r\n if not ( (s[i] = #13) or (s[i] = #10)) then\r\n Result := Result + s[i]\r\n else\r\n if (s[i] = #13) and break then\r\n Result := Result + '
';\r\n end;\r\nend;\r\n\r\nprocedure ParseControl(Tag: string; var ControlType,ControlID,ControlValue,ControlWidth,ControlHeight,ControlProp,ControlLen:string);\r\nvar\r\n Prop: string;\r\n vp: integer;\r\nbegin\r\n ControlType := '';\r\n ControlWidth := '';\r\n ControlHeight := '';\r\n ControlValue := '';\r\n ControlID := '';\r\n ControlProp := '';\r\n ControlLen := '';\r\n\r\n vp := 0;\r\n if VarIPos('TYPE=',Tag,vp) > 0 then\r\n begin\r\n Prop := Copy(Tag,vp + 1,Length(Tag));\r\n Prop := Copy(Prop,Pos(TMSFNCHTMLENGINE_ATTR_DELIM,Prop) + 1,Length(Prop));\r\n Prop := Copy(Prop,1,Pos(TMSFNCHTMLENGINE_ATTR_DELIM,Prop) - 1);\r\n ControlType := Uppercase(Prop);\r\n end;\r\n\r\n if VarIPos('WIDTH=',Tag,vp) > 0 then\r\n begin\r\n Prop := Copy(Tag,vp + 1,Length(Tag));\r\n Prop := Copy(Prop,Pos(TMSFNCHTMLENGINE_ATTR_DELIM,Prop) + 1,Length(Prop));\r\n Prop := Copy(Prop,1,Pos(TMSFNCHTMLENGINE_ATTR_DELIM,Prop) - 1);\r\n ControlWidth := Prop;\r\n end;\r\n\r\n if VarIPos('HEIGHT=',Tag,vp) > 0 then\r\n begin\r\n Prop := Copy(Tag,vp + 1,Length(Tag));\r\n Prop := Copy(Prop,Pos(TMSFNCHTMLENGINE_ATTR_DELIM,Prop) + 1,Length(Prop));\r\n Prop := Copy(Prop,1,Pos(TMSFNCHTMLENGINE_ATTR_DELIM,Prop) - 1);\r\n ControlHeight := Prop;\r\n end;\r\n\r\n if VarIPos('ID=',Tag,vp) > 0 then\r\n begin\r\n Prop := Copy(Tag,vp + 1,Length(Tag));\r\n Prop := Copy(Prop,Pos(TMSFNCHTMLENGINE_ATTR_DELIM,Prop) + 1,Length(Prop));\r\n Prop := Copy(Prop,1,Pos(TMSFNCHTMLENGINE_ATTR_DELIM,Prop) - 1);\r\n ControlID := Prop;\r\n end;\r\n\r\n if VarIPos('VALUE=',Tag,vp) > 0 then\r\n begin\r\n Prop := Copy(Tag,vp + 1,Length(Tag));\r\n Prop := Copy(Prop,Pos(TMSFNCHTMLENGINE_ATTR_DELIM,Prop) + 1,Length(Prop));\r\n Prop := Copy(Prop,1,Pos(TMSFNCHTMLENGINE_ATTR_DELIM,Prop) - 1);\r\n ControlValue := TTMSFNCUtils.UnFixMarkup(Prop);\r\n end;\r\n\r\n if VarIPos('PROP=',Tag,vp) > 0 then\r\n begin\r\n Prop := Copy(Tag,vp + 1,Length(Tag));\r\n Prop := Copy(Prop,Pos(TMSFNCHTMLENGINE_ATTR_DELIM,Prop) + 1,Length(Prop));\r\n Prop := Copy(Prop,1,Pos(TMSFNCHTMLENGINE_ATTR_DELIM,Prop) - 1);\r\n ControlProp := TTMSFNCUtils.UnFixMarkup(Prop);\r\n end;\r\n\r\n if VarIPos('MAXLEN=',Tag,vp) > 0 then\r\n begin\r\n Prop := Copy(Tag,vp + 1,Length(Tag));\r\n Prop := Copy(Prop,Pos(TMSFNCHTMLENGINE_ATTR_DELIM,Prop) + 1,Length(Prop));\r\n Prop := Copy(Prop,1,Pos(TMSFNCHTMLENGINE_ATTR_DELIM,Prop) - 1);\r\n ControlLen := Prop;\r\n end;\r\nend;\r\n\r\nfunction HasHTMLControl(HTML: string): boolean;\r\nvar\r\n lp: Integer;\r\nbegin\r\n lp := 0;\r\n Result := VarIPos(' 0;\r\nend;\r\n\r\nfunction GetNextControlID(HTML, ControlID:string): string;\r\nvar\r\n lp: Integer;\r\n Tag,CType,CID,CV,CW,CH,CP,CL: string;\r\n flg: boolean;\r\nbegin\r\n Result := '';\r\n flg := ControlID = '';\r\n\r\n lp := 0;\r\n while VarIPos(' 0 do\r\n begin\r\n Delete(html,1,lp);\r\n Tag := Copy(html,1,Pos('>',html));\r\n CType := '';\r\n CID := '';\r\n CV := '';\r\n CW := '';\r\n CH := '';\r\n CP := '';\r\n CL := '';\r\n ParseControl(Tag,CType,CID,CV,CW,CH,CP,CL);\r\n\r\n if flg and (CType <> 'BUTTON') and (CType <> 'CHECK') and (CType <> 'RADIO') then\r\n begin\r\n Result := CID;\r\n Exit;\r\n end;\r\n\r\n if (ControlID = CID) then\r\n flg := true;\r\n end;\r\nend;\r\n\r\nfunction GetControlValue(HTML,ControlID:string;var ControlValue:String): Boolean;\r\nvar\r\n lp: Integer;\r\n Tag,CType,CID,CV,CW,CH,CP,CL: string;\r\nbegin\r\n Result := False;\r\n lp := 0;\r\n while VarIPos(' 0 do\r\n begin\r\n Delete(html,1,lp);\r\n Tag := Copy(html,1,Pos('>',html));\r\n CType := '';\r\n CID := '';\r\n CV := '';\r\n CW := '';\r\n CH := '';\r\n CP := '';\r\n CL := '';\r\n ParseControl(Tag,CType,CID,CV,CW,CH,CP,CL);\r\n if (ControlID = CID) then\r\n begin\r\n ControlValue := CV;\r\n Result := True;\r\n Exit;\r\n end;\r\n end;\r\nend;\r\n\r\nfunction GetControlProp(HTML,ControlID:string): string;\r\nvar\r\n lp: Integer;\r\n Tag,CType,CID,CV,CW,CH,CP,CL: string;\r\nbegin\r\n Result := '';\r\n lp := 0;\r\n while VarIPos(' 0 do\r\n begin\r\n Delete(html,1,lp);\r\n Tag := Copy(html,1,Pos('>',html));\r\n CType := '';\r\n CID := '';\r\n CV := '';\r\n CW := '';\r\n CH := '';\r\n CP := '';\r\n CL := '';\r\n ParseControl(Tag,CType,CID,CV,CW,CH,CP,CL);\r\n if (ControlID = CID) then\r\n begin\r\n Result := CP;\r\n Exit;\r\n end;\r\n end;\r\nend;\r\n\r\nfunction GetControlMaxLen(HTML,ControlID:string): integer;\r\nvar\r\n lp, {%H-}e: Integer;\r\n Tag,CType,CID,CV,CW,CH,CP,CL: string;\r\nbegin\r\n Result := 0;\r\n lp := 0;\r\n e := 0;\r\n while VarIPos(' 0 do\r\n begin\r\n Delete(html,1,lp);\r\n Tag := Copy(html,1,Pos('>',html));\r\n CType := '';\r\n CID := '';\r\n CV := '';\r\n CW := '';\r\n CH := '';\r\n CP := '';\r\n CL := '';\r\n ParseControl(Tag,CType,CID,CV,CW,CH,CP,CL);\r\n\r\n if (ControlID = CID) then\r\n begin\r\n val(CL,Result,e);\r\n Exit;\r\n end;\r\n end;\r\nend;\r\n\r\nfunction SetControlValue(var HTML:string;ControlID,ControlValue:string): Boolean;\r\nvar\r\n lp: Integer;\r\n Tag,Temp,CType,CID,CV,CW,CH,CP,CL: string;\r\nbegin\r\n Result := False;\r\n Temp := '';\r\n ControlValue := TTMSFNCUtils.FixMarkup(ControlValue);\r\n lp := 0;\r\n while VarIPos(' 0 do\r\n begin\r\n Temp := Temp + Copy(html,1,lp);\r\n Delete(html,1,lp);\r\n Tag := Copy(html,1,Pos('>',html));\r\n CType := '';\r\n CID := '';\r\n CV := '';\r\n CW := '';\r\n CH := '';\r\n CP := '';\r\n CL := '';\r\n ParseControl(Tag,CType,CID,CV,CW,CH,CP,CL);\r\n if (ControlID = CID) then\r\n begin\r\n Temp := Temp + 'CONTROL ID='+TMSFNCHTMLENGINE_ATTR_DELIM+ControlID+TMSFNCHTMLENGINE_ATTR_DELIM+' VALUE='+TMSFNCHTMLENGINE_ATTR_DELIM+ControlValue+TMSFNCHTMLENGINE_ATTR_DELIM+' WIDTH='+TMSFNCHTMLENGINE_ATTR_DELIM+CW+TMSFNCHTMLENGINE_ATTR_DELIM+' TYPE=' + TMSFNCHTMLENGINE_ATTR_DELIM +CType+TMSFNCHTMLENGINE_ATTR_DELIM;\r\n if (CP <> '') then\r\n Temp := Temp + ' PROP='+TMSFNCHTMLENGINE_ATTR_DELIM+TTMSFNCUtils.FixMarkup(CP)+TMSFNCHTMLENGINE_ATTR_DELIM;\r\n if (CL <> '') then\r\n Temp := Temp + ' MAXLEN='+TMSFNCHTMLENGINE_ATTR_DELIM+CL+TMSFNCHTMLENGINE_ATTR_DELIM;\r\n\r\n Temp := Temp + '>';\r\n html := Temp + Copy(html,pos('>',html)+1,Length(html));\r\n Result := True;\r\n Exit;\r\n end;\r\n end;\r\nend;\r\n\r\nfunction ClearRadioControls(HTML: string): string;\r\nvar\r\n lp: Integer;\r\n Tag,CType,CID,CV,CW,CH,CP,CL: string;\r\n sl: TStringList;\r\n s: string;\r\nbegin\r\n Result := '';\r\n\r\n s := HTML;\r\n\r\n sl := TStringList.Create;\r\n lp := 0;\r\n while VarIPos(' 0 do\r\n begin\r\n Delete(html,1,lp);\r\n Tag := Copy(html,1,Pos('>',html));\r\n CType := '';\r\n CID := '';\r\n CV := '';\r\n CW := '';\r\n CH := '';\r\n CP := '';\r\n CL := '';\r\n ParseControl(Tag,CType,CID,CV,CW,CH,CP,CL);\r\n\r\n if CType = 'RADIO' then\r\n sl.Add(CID);\r\n end;\r\n\r\n for lp := 0 to sl.Count - 1 do\r\n begin\r\n SetControlValue(s, sl.Strings[lp], 'FALSE');\r\n end;\r\n\r\n sl.Free;\r\n Result := s;\r\nend;\r\n\r\nfunction IsCJKChar(const C: Char): Boolean;\r\nbegin\r\n Result := False;\r\n if C < #10000 then Exit;\r\n\r\n case Integer(C) of\r\n $4E00..$9FFF,\r\n $3400..$4DBF,\r\n $20000..$2A6DF,\r\n $2A700..$2B73F,\r\n $2B740..$2B81F,\r\n $2B820..$2CEAF,\r\n $F900..$FAFF,\r\n $2F800..$2FA1F: Result := True;\r\n end;\r\nend;\r\n\r\nfunction PosBreak(const A: string): Integer;\r\nvar\r\n I: Integer;\r\n C: Char;\r\nbegin\r\n Result := 0;\r\n\r\n {$IFDEF ZEROSTRINGINDEX}\r\n for i := 0 to Length(A) - 1 do\r\n {$ELSE}\r\n for I := 1 to Length(A) do\r\n {$ENDIF}\r\n begin\r\n C := A[I];\r\n if TTMSFNCUtils.CharInSet(C, TTMSFNCUtils.CreateCharSet(' ')) or IsCJKChar(C) then\r\n begin\r\n Result := I;\r\n Break;\r\n end;\r\n end;\r\nend;\r\n\r\n{$HINTS OFF}\r\nfunction HTMLDrawEx(AGraphics: TTMSFNCGraphics; s:string; fr:TRectF;\r\n XPos,YPos,FocusLink,HoverLink,ShadowOffset: Integer;\r\n CheckHotSpot,CheckHeight,{%H-}Print,Selected,Blink,HoverStyle,WordWrap, Down: Boolean;\r\n DownID: string;\r\n {%H-}ResFactor:Double;\r\n URLColor,HoverColor,HoverFontColor,ShadowColor: TTMSFNCGraphicsColor;\r\n var AnchorVal,StripVal,FocusAnchor: string;\r\n var XSize,YSize: single; var HyperLinks,MouseLink: Integer;\r\n var HoverRect, ControlRect:TRectF;var CID,CV,CT: string; var LineCount: Integer; LineSpacing: Integer;\r\n BitmapContainer: TTMSFNCBitmapContainer; {%H-}Opacity: Single; HyperLinkUnderline: Boolean = True{$IFDEF CMNLIB}; ImageList: TCustomImageList = nil{$ENDIF};\r\n HighlightColor: TTMSFNCGraphicsColor = gcBlue;\r\n HighlightTextColor: TTMSFNCGraphicsColor = gcWhite;\r\n HighlightTextStyle: TFontStyles = []\r\n ): Boolean;\r\n\r\ntype\r\n TFloatStyle = (fsNone, fsLeft, fsRight);\r\n\r\nvar\r\n su: string;\r\n r,dr: TRectF;\r\n hr,rr: TRectF;\r\n htmlwidth,htmlheight,txtheight, ch: Single;\r\n rh: TRectF;\r\n Align: TAlignment;\r\n PIndent: Integer;\r\n OldFont: TTMSFNCGraphicsFont;\r\n OldFontColor: TTMSFNCGraphicsColor;\r\n CalcFont: TTMSFNCGraphicsFont;\r\n CalcFontColor: TTMSFNCGraphicsColor;\r\n DrawFont: TTMSFNCGraphicsFont;\r\n DrawFontCOlor: TTMSFNCGraphicsColor;\r\n FontColor: TTMSFNCGraphicsColor;\r\n OldPenColor: TTMSFNCGraphicsColor;\r\n OldPenKind: TTMSFNCGraphicsStrokeKind;\r\n OldCalcFont: TTMSFNCGraphicsFont;\r\n OldCalcFontColor: TTMSFNCGraphicsColor;\r\n BkColor,BGColor: TTMSFNCGraphicsColor;\r\n OldDrawFont: TTMSFNCGraphicsFont;\r\n OldDrawFontColor: TTMSFNCGraphicsColor;\r\n Hotspot, ImageHotspot: Boolean;\r\n Anchor,OldAnchor,MouseInAnchor,Error: Boolean;\r\n blnkKind: TTMSFNCGraphicsFillKind;\r\n paracolor,pencolor,blnkcolor,hifcol,hibcol: TTMSFNCGraphicsColor;\r\n LastAnchor,OldAnchorVal,LType: string;\r\n IMGSize: TPoint;\r\n isSup,isSub,isPara,isShad: Boolean;\r\n hlcount,licount: Integer;\r\n imgali: single;\r\n subh, suph: Single;\r\n ListIndex: Integer;\r\n Invisible: Boolean;\r\n FoundTag: Boolean;\r\n nnFit: Integer;\r\n inspoint: Integer;\r\n hifStyles: TFontStyles;\r\n AltImg,ImgIdx,OldImgIdx: Integer;\r\n ColL,ColB: TTMSFNCGraphicsColor;\r\n ofsx,newofsx: integer;\r\n FHot: Boolean;\r\n floatrect: TRect;\r\n floatpt: TPoint;\r\n txtfloat,txtfloatbefore: TFloatStyle;\r\n imgfloat: TFloatStyle;\r\n\r\n function HTMLDrawLine(AGraphics: TTMSFNCGraphics; var s:string;r: TRectF;Calc:Boolean;\r\n var w,h,subh,suph,imgali:Single;var Align:TAlignment; var PIndent: Integer;\r\n XPos,YPos:Integer;var Hotspot,ImageHotSpot:Boolean;OffsetX: integer; var NewOffsetX: integer; var floatrect: TRect; var txtfloat: TFloatStyle):string;\r\n var\r\n su,Res,TagProp,Prop,Tagp,LineText,dsu:string;\r\n cr, ir: TRectF;\r\n fs: TFontStyles;\r\n {$IFDEF CMNLIB}\r\n crc: TRect;\r\n {$ENDIF}\r\n linebreak,imgbreak,linkbreak: Boolean;\r\n indent,bmpx,bmpy,imgw,imgh: Integer;\r\n err: integer;\r\n sw, th, errs: Single;\r\n rh: TRectF;\r\n TagPos,SpacePos,o,l: Integer;\r\n bmp: TTMSFNCBitmap;\r\n bmpcreated: boolean;\r\n NewColor: TTMSFNCGraphicsColor;\r\n TagWidth,TagHeight,WordLen: Integer;\r\n WordWidth: Single;\r\n TagChar: Char;\r\n LengthFits: Boolean;\r\n ptf1,ptf2: TPointF;\r\n imgalign,imgoffs, imgth: integer;\r\n ControlType,ControlWidth,ControlHeight,ControlID,ControlValue,ControlProp,ControlLen: string;\r\n begin\r\n Result := '';\r\n LineText := '';\r\n WordWidth := 0;\r\n r.Bottom := r.Bottom - Subh;\r\n\r\n w := 0;\r\n sw := 0;\r\n\r\n LineBreak := False;\r\n ImgBreak := False;\r\n LinkBreak := False;\r\n HotSpot := False;\r\n ImageHotSpot := False;\r\n\r\n// r.Left := r.Left + offsetX;\r\n\r\n cr := r;\r\n res := '';\r\n\r\n if not Calc then\r\n cr.Left := cr.Left + OffsetX;\r\n\r\n if isPara and not Calc then\r\n begin\r\n Pencolor := AGraphics.Stroke.Color;\r\n AGraphics.Stroke.Color := AGraphics.Fill.Color;\r\n// AGraphics.Fill.Kind := gfkNone;\r\n AGraphics.Stroke.Kind := gskSolid;\r\n\r\n AGraphics.DrawRectangle(Rectf(fr.Left,r.Top,fr.Right,r.Top + h));\r\n end;\r\n\r\n while (Length(s) > 0) and not LineBreak and not ImgBreak do\r\n begin\r\n // get next word or till next HTML tag\r\n TagPos := Pos('<',s);\r\n\r\n if WordWrap then\r\n SpacePos := PosBreak(s)\r\n// SpacePos := Pos(' ', s)\r\n else\r\n SpacePos := 0;\r\n\r\n if (Tagpos > 0) and ((SpacePos > TagPos) or (SpacePos = 0)) then\r\n su := Copy(s,1,TagPos - 1)\r\n else\r\n begin\r\n if SpacePos > 0 then\r\n su := Copy(s,1,SpacePos)\r\n else\r\n su := s;\r\n end;\r\n\r\n WordLen := Length(su);\r\n\r\n while Pos(' ',su) > 0 do\r\n begin\r\n TTMSFNCUtils.TagReplacestring(' ',' ',su);\r\n end;\r\n\r\n while Pos('<',su) > 0 do\r\n begin\r\n TTMSFNCUtils.TagReplacestring('<','<',su);\r\n end;\r\n\r\n while Pos('>',su) > 0 do\r\n begin\r\n TTMSFNCUtils.TagReplacestring('>','>',su);\r\n end;\r\n\r\n //WordLenEx := Length(su);\r\n\r\n if WordLen > 0 then\r\n begin\r\n rh := AGraphics.CalculateText(su, RectF(0, 0, 10000, 10000), False, False);\r\n th := rh.Bottom - rh.Top;\r\n\r\n if isSub and (subh < (th / 4)) then subh := th / 4;\r\n if isSup and (suph < (th / 4)) then suph := th / 4;\r\n\r\n if th > h then\r\n h := th;\r\n\r\n StripVal := StripVal + su;\r\n\r\n if Invisible then\r\n Delete(s,1,WordLen);\r\n\r\n if not Invisible then\r\n begin\r\n // draw mode\r\n if not Calc then\r\n begin\r\n if isSup then\r\n cr.Bottom := cr.Bottom - suph;\r\n\r\n if isSub then\r\n cr.Bottom := cr.Bottom + subh;\r\n\r\n cr.Bottom := cr.Bottom - imgali;\r\n\r\n rh := AGraphics.CalculateText(su, RectF(0, 0, 10000, 10000), False, False);\r\n errs := rh.Right - rh.Left;\r\n\r\n if BkColor <> gcNull then\r\n begin\r\n AGraphics.Fill.Color := BkColor;\r\n AGraphics.Stroke.Color := BkColor;\r\n AGraphics.Fill.Kind := gfkSolid;\r\n AGraphics.Stroke.Kind := gskSolid;\r\n rh := AGraphics.CalculateText('gh');\r\n AGraphics.DrawRectangle(RectF(cr.Left, cr.Top, cr.Left + errs, cr.Top + (rh.Bottom - rh.Top)));\r\n end;\r\n\r\n BKColor := gcNull;\r\n\r\n if isShad then\r\n begin\r\n OffsetRectEx(cr,ShadowOffset,ShadowOffset);\r\n AGraphics.Font.Color := ShadowColor;\r\n AGraphics.DrawText(cr, su, False, gtaLeading, gtaCenter, gttNone, 0, -1, -1{$IFNDEF LIMITEDGRAPHICSMODE}, False{$ENDIF});\r\n OffsetRectEx(cr,-ShadowOffset,-ShadowOffset);\r\n AGraphics.Font.Color := OldFontColor;\r\n end;\r\n\r\n //errs := cr.Right;\r\n\r\n {$IFDEF ZEROSTRINGINDEX}\r\n if (su <> '') and (su[length(su)-1] = ' ') and Anchor then\r\n {$ELSE}\r\n if (su <> '') and (su[length(su)] = ' ') and Anchor then\r\n {$ENDIF}\r\n dsu := su + #0\r\n else\r\n dsu := su;\r\n\r\n AGraphics.Font.Color := FontColor;\r\n AGraphics.DrawText(cr, dsu, False, gtaLeading, gtaCenter, gttNone, 0, -1, -1{$IFNDEF LIMITEDGRAPHICSMODE}, False{$ENDIF});\r\n\r\n cr.Right := cr.Left + errs;\r\n\r\n if Anchor and (Hyperlinks - 1 = FocusLink) then\r\n FocusAnchor := LastAnchor;\r\n\r\n if Error then\r\n begin\r\n AGraphics.Stroke.Color := gcRed;\r\n AGraphics.Stroke.Kind := gskSolid;\r\n AGraphics.Stroke.Width := 1;\r\n\r\n l := Round((cr.Left / 2) * 2);\r\n if (l mod 4)=0 then o := 2 else o := 0;\r\n\r\n while l < cr.Right do\r\n begin\r\n ptf1 := PointF(l,r.Bottom + o - 1);\r\n if o = 2 then o := 0 else o := 2;\r\n ptf2 := PointF(l + 2, r.Bottom + o - 1);\r\n AGraphics.DrawLine(ptf1, ptf2);\r\n Inc(l,2);\r\n end;\r\n end;\r\n\r\n cr.Left := cr.Right;\r\n cr.Right := r.Right;\r\n cr.Bottom := r.Bottom;\r\n cr.Top := r.Top;\r\n end\r\n else\r\n begin\r\n cr := r; //reinitialized each time !\r\n\r\n rh := AGraphics.CalculateText(su, RectF(0, 0, 10000, 10000), False, False);\r\n cr.Right := cr.Left + (rh.Right - rh.Left);\r\n\r\n // preparations for editing purposes\r\n if (ypos > cr.Top) and (ypos < cr.bottom) and (xpos > w) then {scan charpos here}\r\n begin\r\n //this will get the character pos of the insertion point\r\n nnfit := 0;\r\n if nnfit = WordLen then\r\n InsPoint := InsPoint + WordLen\r\n else\r\n InsPoint := InsPoint + nnfit;\r\n end;\r\n\r\n //end of preparations for editing purposes\r\n\r\n // Calculated text width\r\n WordWidth := cr.Right - cr.Left;\r\n w := w + WordWidth;\r\n\r\n //errs := XPos - cr.Left;\r\n //errs := r.Right - XPos - cr.Left;\r\n\r\n if (XPos - cr.Left >= w - WordWidth) and (XPos - cr.Left <= w) and Anchor then\r\n begin\r\n HotSpot := True;\r\n if (YPos > cr.Top){ and (YPos < cr.Bottom)} then\r\n begin\r\n Anchorval := LastAnchor;\r\n MouseInAnchor := True;\r\n end;\r\n end;\r\n end;\r\n\r\n LengthFits := (w + PIndent < r.Right - r.Left - OfsX + 1) or (r.Right - r.Left - OfsX <= WordWidth);\r\n\r\n// if not LengthFits and\r\n// ((Length(LineText) > 0) and (LineText[Length(LineText)] <> ' ')) then\r\n// LengthFits := True;\r\n\r\n LineText := LineText + su;\r\n\r\n// if not LengthFits and not Wordwrap then\r\n// begin\r\n// LineBreak := true;\r\n// end;\r\n\r\n if LengthFits or not WordWrap then\r\n begin\r\n Res := Res + Copy(s,1,WordLen);\r\n\r\n //if not LengthFits and Calc and (LineText <> su) then\r\n // s := '';\r\n\r\n Delete(s,1,WordLen);\r\n\r\n if Length(su) >= WordLen then\r\n begin\r\n\r\n if Copy(su, WordLen, 1) = ' ' then\r\n begin\r\n rh := AGraphics.CalculateText(' ');\r\n sw := (rh.Right - rh.Left);\r\n end\r\n else\r\n sw := 0;\r\n end\r\n else\r\n sw := 0;\r\n end\r\n else\r\n begin\r\n LineBreak := True;\r\n w := w - WordWidth;\r\n end;\r\n end;\r\n end;\r\n\r\n TagPos := Pos('<',s);\r\n\r\n if (TagPos = 1) and (Length(s) <= 2) then\r\n s := '';\r\n\r\n if not LineBreak and (TagPos = 1) and (Length(s) > 2) then\r\n begin\r\n {$IFDEF ZEROSTRINGINDEX}\r\n if (s[1] = '/') and (Length(s) > 3) then\r\n {$ELSE}\r\n if (s[2] = '/') and (Length(s) > 3) then\r\n {$ENDIF}\r\n begin\r\n {$IFDEF ZEROSTRINGINDEX}\r\n case UpCase(s[2]) of\r\n {$ELSE}\r\n case UpCase(s[3]) of\r\n {$ENDIF}\r\n 'A':begin\r\n if (not HoverStyle or (Hoverlink = Hyperlinks)) and not Calc then\r\n begin\r\n AGraphics.Font.Style := AGraphics.Font.Style - [TFontStyle.fsUnderline];\r\n if Hovercolor <> gcNull then\r\n BkColor := HoverColor;\r\n if HoverFontColor <> gcNull then\r\n FontColor := HoverFontColor;\r\n end;\r\n\r\n if not Selected then\r\n FontColor := OldFontColor;\r\n\r\n Anchor := False;\r\n\r\n if MouseInAnchor then\r\n begin\r\n hr.Bottom := r.Bottom;\r\n hr.Right := r.Left + w;\r\n if r.Top <> hr.Top then\r\n begin\r\n hr.Left := r.Left;\r\n hr.Top := r.Top;\r\n end;\r\n\r\n HoverRect := hr;\r\n MouseLink := HyperLinks;\r\n MouseInAnchor := False;\r\n end;\r\n\r\n if Focuslink = Hyperlinks - 1 then\r\n begin\r\n rr.Right := cr.Left;\r\n rr.Bottom := cr.Bottom - ImgAli;\r\n rh := AGraphics.CalculateText('gh');\r\n rr.Top := rr.Bottom - (rh.Bottom - rh.Top);\r\n InflateRectEx(rr,1,0);\r\n //if not Calc then AGraphics.DrawFocusRect(rr);\r\n end;\r\n end;\r\n 'E':begin\r\n if not Calc then\r\n Error := False;\r\n end;\r\n 'B':begin\r\n {$IFDEF ZEROSTRINGINDEX}\r\n if s[3] <> '>' then\r\n {$ELSE}\r\n if s[4] <> '>' then\r\n {$ENDIF}\r\n FontColor := OldFontColor\r\n else\r\n AGraphics.Font.Style := AGraphics.Font.Style - [TFontStyle.fsBold];\r\n end;\r\n 'S':begin\r\n {$IFDEF ZEROSTRINGINDEX}\r\n TagChar := UpCase(s[3]);\r\n {$ELSE}\r\n TagChar := UpCase(s[4]);\r\n {$ENDIF}\r\n\r\n if (TagChar = 'U') then\r\n begin\r\n isSup := False;\r\n isSub := False;\r\n end\r\n else\r\n if (TagChar = 'H') then\r\n isShad := False\r\n else\r\n AGraphics.Font.Style := AGraphics.Font.Style - [TFontStyle.fsStrikeOut];\r\n end;\r\n 'F':begin\r\n AGraphics.Font.Name := OldFont.Name;\r\n AGraphics.Font.Size := OldFont.Size;\r\n if not Calc and not Selected then\r\n begin\r\n FontColor := OldFontColor;\r\n AGraphics.Fill.Color := BGColor;\r\n end;\r\n end;\r\n 'H':begin\r\n if not Calc then\r\n begin\r\n FontColor := hifCol;\r\n BkColor := hibCol;\r\n AGraphics.Font.Style := hifStyles;\r\n AGraphics.Fill.Color := hibCol;\r\n end;\r\n end;\r\n 'I':begin\r\n AGraphics.Font.Style := AGraphics.Font.Style - [TFontStyle.fsItalic];\r\n end;\r\n 'L':begin\r\n LineBreak := True;\r\n end;\r\n 'O':begin\r\n NewOffsetX := 0;\r\n end;\r\n 'P':begin\r\n LineBreak := True;\r\n if not Calc then\r\n begin\r\n AGraphics.Fill.Color := ParaColor;\r\n isPara := false;\r\n end;\r\n end;\r\n 'U':begin\r\n {$IFDEF ZEROSTRINGINDEX}\r\n if (s[3] <> '>') and (ListIndex > 0) then\r\n {$ELSE}\r\n if (s[4] <> '>') and (ListIndex > 0) then\r\n {$ENDIF}\r\n Dec(Listindex)\r\n else\r\n AGraphics.Font.Style := AGraphics.Font.Style - [TFontStyle.fsUnderline];\r\n end;\r\n 'R':begin\r\n //EndRotated(Canvas);\r\n end;\r\n 'Z':Invisible := False;\r\n end;\r\n end\r\n else\r\n begin\r\n {$IFDEF ZEROSTRINGINDEX}\r\n case Upcase(s[1]) of\r\n {$ELSE}\r\n case Upcase(s[2]) of\r\n {$ENDIF}\r\n 'A':begin\r\n // only do this when at hover position in xpos,ypos\r\n if (FocusLink = HyperLinks) and not Calc then\r\n begin\r\n rr.Left := cr.Left;\r\n rr.Top := cr.Top;\r\n end;\r\n\r\n Inc(HyperLinks);\r\n if (not HoverStyle or (Hoverlink = HyperLinks)) and not Calc then\r\n begin\r\n if HyperLinkUnderline then\r\n AGraphics.Font.Style := AGraphics.Font.Style + [TFontStyle.fsUnderline];\r\n\r\n if (Hovercolor <> gcNull) and not Calc then\r\n BkColor := HoverColor;\r\n\r\n if HoverFontColor <> gcNull then\r\n FontColor := HoverFontColor;\r\n end;\r\n\r\n if not Selected and ((HoverFontColor = gcNull) or (HoverLink <> HyperLinks) or not HoverStyle) then\r\n begin\r\n OldFontColor := FontColor;\r\n FontColor := URLColor;\r\n end;\r\n\r\n TagProp := Copy(s,3,Pos('>',s) - 1); // \r\n Prop := Copy(TagProp,Pos('\"',TagProp) + 1,Length(TagProp));\r\n Prop := Copy(Prop,1,Pos('\"',Prop) - 1);\r\n LastAnchor := Prop;\r\n Anchor := True;\r\n\r\n hr.Left := w;\r\n hr.Top := r.Top;\r\n end;\r\n 'B':begin\r\n {$IFDEF ZEROSTRINGINDEX}\r\n TagChar := Upcase(s[2]);\r\n {$ELSE}\r\n TagChar := Upcase(s[3]);\r\n {$ENDIF}\r\n case TagChar of\r\n '>': AGraphics.Font.Style := AGraphics.Font.Style + [TFontStyle.fsBold]; // tag\r\n 'R': //
tag\r\n begin\r\n LineBreak := true;\r\n StripVal := StripVal + #13;\r\n end;\r\n 'L': if not Blink then\r\n FontColor := BlnkColor; // tag\r\n 'O':\r\n begin\r\n\r\n bmpy := 0;\r\n Res := Res + Copy(s,1,pos('>',s));\r\n if not Calc and not Selected then\r\n begin\r\n TagProp := Uppercase(Copy(s,6,pos('>',s)-1));\r\n\r\n if (Pos('BACKGROUND',TagProp) > 0) then\r\n begin\r\n Prop := Copy(TagProp,Pos('BACKGROUND',TagProp)+10,Length(TagProp));\r\n Prop := Copy(Prop,Pos('\"',Prop)+1,Length(prop));\r\n Prop := Copy(Prop,1,Pos('\"',Prop)-1);\r\n\r\n if Pos('IDX:', UpperCase(Prop)) > 0 then\r\n begin\r\n Delete(Prop, 1, 4);\r\n (*\r\n if Assigned(FImages) and (IStrToInt(Prop) < FImages.Count) then\r\n begin\r\n IMGSize.X := MulDiv(FImages.Width, GetDeviceCaps(AGraphics.Handle, LOGPIXELSX), 96);\r\n IMGSize.Y := MulDiv(FImages.Height, GetDeviceCaps(AGraphics.Handle, LOGPIXELSY), 96);\r\n\r\n if not Calc and not Print then\r\n FImages.Draw(Canvas, CR.Left, CR.Top, IStrToInt(Prop), True);\r\n\r\n if not Calc and Print then\r\n begin\r\n CR.Right := CR.Left + Round(resfactor * FImages.Width);\r\n CR.Bottom := CR.Top + Round(resfactor * FImages.Height);\r\n\r\n ABitmap := TBitmap.Create;\r\n FImages.GetBitmap(IStrToInt(Prop), ABitmap);\r\n PrintBitmap(Canvas, CR, ABitmap);\r\n ABitmap.Free;\r\n CR := r;\r\n end;\r\n end;\r\n *)\r\n end;\r\n\r\n bmp := nil;\r\n bmpcreated := false;\r\n\r\n if (Pos(':',Prop) = 0) and Assigned(BitmapContainer) then\r\n begin\r\n bmp := TTMSFNCBitmap(BitmapContainer.FindBitmap(Prop));\r\n end;\r\n\r\n {$IFNDEF WEBLIB}\r\n if (Pos('FILE://',Uppercase(Prop)) > 0) then\r\n begin\r\n Delete(Prop,1,7);\r\n\r\n if FileExists(Prop) then\r\n begin\r\n bmp := TTMSFNCBitmap.Create;\r\n bmp.LoadFromFile(Prop);\r\n bmpcreated := true;\r\n end;\r\n end;\r\n {$ENDIF}\r\n {$IFDEF WEBLIB}\r\n if (Pos('URL://',Uppercase(Prop)) > 0) then\r\n begin\r\n Delete(Prop,1,6);\r\n bmp := TTMSFNCBitmap(TTMSFNCBitmap.CreateFromURL(Prop));\r\n bmpcreated := true;\r\n end;\r\n {$ENDIF}\r\n\r\n if Assigned(bmp) then\r\n begin\r\n if not IsBitmapEmpty(bmp) and (bmp.Width > 0) and (bmp.Height > 0) then\r\n begin\r\n // do the tiling here\r\n //hrgn := CreateRectRgn(fr.left, fr.top, fr.right,fr.bottom);\r\n //SelectClipRgn(AGraphics.Handle, hrgn);\r\n while (bmpy < fr.bottom-fr.top) do\r\n begin\r\n bmpx := 0;\r\n while (bmpx < fr.right - fr.left) do\r\n begin\r\n AGraphics.DrawBitmap(RectF(Round(fr.left+bmpx),Round(fr.top+bmpy), Round(fr.Left + bmpx) + bmp.Width,Round(fr.top+bmpy) + bmp.Height), bmp);\r\n //AGraphics.Draw(fr.left+bmpx,fr.top+bmpy,bmp);\r\n bmpx := bmpx + bmp.width;\r\n end;\r\n bmpy := bmpy + bmp.height;\r\n end;\r\n //SelectClipRgn(AGraphics.handle, 0);\r\n //DeleteObject(hrgn);\r\n end;\r\n\r\n if bmpcreated then\r\n bmp.Free;\r\n end; //end of bmp <> nil\r\n end; //end of background\r\n\r\n if (Pos('BGTOPLEFT', TagProp) > 0) then\r\n begin\r\n Prop := Copy(TagProp, Pos('BGTOPLEFT', TagProp) + 10, Length(TagProp));\r\n Prop := Copy(Prop, Pos('\"', Prop) + 1, Length(Prop));\r\n Prop := Copy(Prop, 1, Pos('\"', Prop) - 1);\r\n\r\n bmp := nil;\r\n\r\n if (Pos(':', Prop) = 0) and Assigned(BitmapContainer) then\r\n begin\r\n bmp := TTMSFNCBitmap(BitmapContainer.FindBitmap(Prop));\r\n end;\r\n\r\n if Assigned(bmp) then\r\n begin\r\n if not IsBitmapEmpty(bmp) and (bmp.Width > 0) and (bmp.Height > 0) then\r\n begin\r\n AGraphics.DrawBitmap(RectF(Round(fr.Left), Round(fr.Top + bmpy),Round(fr.Left) + bmp.Width ,Round(fr.Top) + bmp.Height), bmp);\r\n end;\r\n end;\r\n end; //end of bgtopleft\r\n\r\n if (Pos('BGTOPRIGHT', TagProp) > 0) then\r\n begin\r\n Prop := Copy(TagProp, Pos('BGTOPRIGHT', TagProp) + 10, Length(TagProp));\r\n Prop := Copy(Prop, Pos('\"', Prop) + 1, Length(Prop));\r\n Prop := Copy(Prop, 1, Pos('\"', Prop) - 1);\r\n\r\n bmp := nil;\r\n\r\n if (Pos(':', Prop) = 0) and Assigned(BitmapContainer) then\r\n begin\r\n bmp := TTMSFNCBitmap(BitmapContainer.FindBitmap(Prop));\r\n end;\r\n\r\n\r\n if Assigned(bmp) then\r\n begin\r\n if not IsBitmapEmpty(bmp) and (bmp.Width > 0) and (bmp.Height > 0) then\r\n begin\r\n AGraphics.DrawBitmap(RectF(Round(fr.Right) - bmp.Width, Round(fr.Top + bmpy), Round(fr.Right), Round(fr.Top) + bmp.Height ), bmp);\r\n end;\r\n end;\r\n end; //end of bgtopright\r\n\r\n if TTMSFNCUtils.VarPos('BGCOLOR',TagProp,TagPos) > 0 then\r\n begin\r\n Prop := Copy(TagProp,TagPos + 5,Length(TagProp));\r\n Prop := Copy(Prop,Pos('\"',Prop) + 1,Length(Prop));\r\n Prop := Copy(Prop,1,Pos('\"',Prop) - 1);\r\n\r\n NewColor := gcNull;\r\n\r\n if Length(Prop) > 0 then\r\n begin\r\n {$IFDEF ZEROSTRINGINDEX}\r\n if Prop[0] = '#' then\r\n {$ELSE}\r\n if Prop[1] = '#' then\r\n {$ENDIF}\r\n NewColor := TTMSFNCGraphics.HTMLToColor(Prop)\r\n else\r\n begin\r\n {$IFDEF WEBLIB}\r\n NewColor := TTMSFNCGraphics.TextToColor(LowerCase(prop));\r\n {$ENDIF}\r\n {$IFNDEF WEBLIB}\r\n NewColor := TTMSFNCGraphics.TextToColor(AnsiLowerCase(prop));\r\n {$ENDIF}\r\n end;\r\n end;\r\n\r\n if TTMSFNCUtils.VarPos('BGCOLORTO',TagProp,TagPos) > 0 then\r\n begin\r\n Prop := Copy(TagProp,TagPos + 5,Length(TagProp));\r\n Prop := Copy(Prop,Pos('\"',Prop) + 1,Length(Prop));\r\n Prop := Copy(Prop,1,Pos('\"',Prop) - 1);\r\n\r\n Prop := 'H';\r\n if TTMSFNCUtils.VarPos('DIR',TagProp,TagPos) > 0 then\r\n begin\r\n Prop := Copy(TagProp,TagPos + 3,Length(TagProp));\r\n Prop := Copy(Prop,Pos('\"',Prop) + 1,Length(Prop));\r\n Prop := Copy(Prop,1,Pos('\"',Prop) - 1);\r\n end;\r\n\r\n AGraphics.Stroke.Color := Newcolor;\r\n //DrawHTMLGradient(Canvas,NewColor,NewColorTo,clNone,64,Rect(fr.left,fr.top,fr.right,fr.bottom),Prop = 'H');\r\n //AGraphics.Brush.Style := bsClear\r\n end\r\n else\r\n begin\r\n BGColor := AGraphics.Fill.Color;\r\n AGraphics.Fill.Color := NewColor;\r\n PenColor:=AGraphics.Stroke.Color;\r\n AGraphics.Stroke.Color := Newcolor;\r\n AGraphics.Fill.Kind := gfkSolid;\r\n AGraphics.Stroke.Kind := gskSolid;\r\n AGraphics.DrawRectangle(Rectf(fr.left - 2,fr.top,fr.right,fr.bottom));\r\n AGraphics.Stroke.Color := PenColor;\r\n end;\r\n end;\r\n end;\r\n end;\r\n end;\r\n end;\r\n 'E':begin\r\n if not Calc then\r\n Error := True;\r\n end;\r\n 'C':begin\r\n TagProp := Copy(s,9,pos('>',s)-1);\r\n ControlType := '';\r\n ControlID := '';\r\n ControlValue := '';\r\n ControlWidth := '';\r\n ControlHeight := '';\r\n ControlProp := '';\r\n ControlLen := '';\r\n ParseControl(TagProp,ControlType,ControlID,ControlValue,ControlWidth,ControlHeight,ControlProp,ControlLen);\r\n\r\n ch := 25;\r\n\r\n if ControlHeight <> '' then\r\n begin\r\n val(ControlHeight,ch,err);\r\n if err <> 0 then\r\n ch := 25;\r\n end;\r\n\r\n if (ControlWidth <> '') or (ControlType = 'CHECK') or (ControlType = 'RADIO') then\r\n begin\r\n val(ControlWidth,Indent,err);\r\n\r\n if err = 0 then\r\n begin\r\n IMGSize.x := Indent;\r\n IMGSize.y := Round(AGraphics.CalculateTextHeight('gh')) + 10;\r\n end;\r\n\r\n if (ControlType = 'CHECK') or (ControlType = 'RADIO') then\r\n h := 16\r\n else\r\n h := 23;\r\n\r\n if (ch > 25) then\r\n h := ch - 2;\r\n\r\n if not Calc then\r\n begin\r\n if (ControlType = 'EDIT') or (ControlType = 'PASSWORD') or (ControlType = 'MASK') then\r\n begin\r\n end;\r\n\r\n if ControlType = 'COMBO' then\r\n begin\r\n end;\r\n\r\n if ControlType = 'CHECK' then\r\n begin\r\n IMGSize.x := Round(16 * ResFactor) + 2;\r\n IMGSize.y := IMGSize.x;\r\n Indent := IMGSize.x;\r\n ir := RectF(cr.Left + 1, cr.Top + ((cr.Bottom - cr.Top) - (ImgSize.Y - 2)) / 2, cr.Left + IMGSize.X - 1, cr.Top + ((cr.Bottom - cr.Top) - (ImgSize.Y - 2)) / 2 + (IMGSize.Y - 2));\r\n ir := RectF(Round(ir.Left), Round(ir.Top), Round(ir.Right), Round(ir.Bottom));\r\n AGraphics.DrawCheckBox(ir, UpperCase(ControlValue) = 'TRUE', (Down and (DownID = ControlID)), True);\r\n end;\r\n\r\n if ControlType = 'RADIO' then\r\n begin\r\n IMGSize.x := Round(16 * ResFactor) + 2;\r\n IMGSize.y := IMGSize.x;\r\n Indent := IMGSize.x;\r\n ir := RectF(cr.Left + 1, cr.Top + ((cr.Bottom - cr.Top) - (ImgSize.Y - 2)) / 2, cr.Left + IMGSize.X - 1, cr.Top + ((cr.Bottom - cr.Top) - (ImgSize.Y - 2)) / 2 + (IMGSize.Y - 2));\r\n ir := RectF(Round(ir.Left), Round(ir.Top), Round(ir.Right), Round(ir.Bottom));\r\n AGraphics.DrawRadioButton(ir, UpperCase(ControlValue) = 'TRUE', (Down and (DownID = ControlID)), True);\r\n end;\r\n\r\n if ControlType = 'BUTTON' then\r\n begin\r\n IMGSize.y := 22;\r\n ir := RectF(cr.Left + 2,cr.Top + ((cr.Bottom - cr.Top) - IMGSize.Y) / 2,cr.Left + Indent -2, cr.Top + ((cr.Bottom - cr.Top) - IMGSize.Y) / 2+ IMGSize.Y);\r\n FHot := PtInRectEx(ir, PointF(XPos, YPos));\r\n ir := RectF(Round(ir.Left), Round(ir.Top), Round(ir.Right), Round(ir.Bottom));\r\n AGraphics.DrawButton(ir, Down and (DownID = ControlID), FHot, True);\r\n InflateRectEx(ir,-2,-2);\r\n AGraphics.DrawText(ir, ControlValue, False, gtaCenter, gtaCenter);\r\n end;\r\n end;\r\n\r\n if (ControlType = 'BUTTON') then\r\n IMGSize.y := 22;\r\n\r\n if (ControlType = 'COMBO') then\r\n IMGSize.y := 25;\r\n\r\n if (ControlType = 'CHECK') or (ControlType = 'RADIO') then\r\n begin\r\n IMGSize.x := Round(16 * ResFactor) + 2;\r\n IMGSize.y := IMGSize.X;\r\n end;\r\n\r\n if ((XPos - r.Left > w) and (XPos - r.Left < w + IMGSize.x) and\r\n (YPos > cr.Top) and (YPos < cr.Top + IMGSize.Y)) or\r\n (CheckHotSpot and (CID = ControlID)) then\r\n begin\r\n ImageHotSpot := True;\r\n AnchorVal := 'ctrl';\r\n AltImg := ImgIdx;\r\n\r\n ir.Left := r.left + w;\r\n ir.Right := ir.Left + ImgSize.X;\r\n ir.Top := cR.Top;\r\n ir.Bottom := cr.top + ImgSize.Y;\r\n\r\n ControlRect := ir;\r\n CV := ControlValue;\r\n CID := ControlID;\r\n CT := ControlType;\r\n end;\r\n\r\n if (w + IMGSize.x > r.Right-r.Left) and\r\n (IMGSize.x < r.Right - r.Left) then\r\n begin\r\n ImgBreak := True;\r\n end\r\n else\r\n begin\r\n w := w + IMGSize.x;\r\n cr.left := cr.left + IMGSize.x;\r\n if IMGSize.y > h then\r\n h := IMGSize.y;\r\n end;\r\n end;\r\n end;\r\n 'H':begin\r\n {$IFDEF ZEROSTRINGINDEX}\r\n case Upcase(s[2]) of\r\n {$ELSE}\r\n case Upcase(s[3]) of\r\n {$ENDIF}\r\n 'R':\r\n begin\r\n LineBreak := True;\r\n if not Calc then\r\n begin\r\n TagProp := Copy(s,4,Pos('>',s) - 1);\r\n\r\n NewColor := gcBlack;\r\n\r\n if TTMSFNCUtils.VarPos('COLOR',Uppercase(TagProp),TagPos) > 0 then\r\n begin\r\n Prop := Copy(TagProp,TagPos+5,Length(TagProp));\r\n Prop := Copy(Prop,Pos('\"',prop)+1,Length(Prop));\r\n Prop := Copy(Prop,1,Pos('\"',prop)-1);\r\n\r\n if Length(Prop) > 0 then\r\n begin\r\n {$IFDEF ZEROSTRINGINDEX}\r\n if Prop[0] = '#' then\r\n {$ELSE}\r\n if Prop[1] = '#' then\r\n {$ENDIF}\r\n NewColor := TTMSFNCGraphics.HTMLToColor(Prop)\r\n else\r\n begin\r\n {$IFDEF WEBLIB}\r\n NewColor := TTMSFNCGraphics.TextToColor(LowerCase(prop));\r\n {$ENDIF}\r\n {$IFNDEF WEBLIB}\r\n NewColor := TTMSFNCGraphics.TextToColor(AnsiLowerCase(prop));\r\n {$ENDIF}\r\n end;\r\n end;\r\n end;\r\n\r\n AGraphics.Stroke.Kind := gskSolid;\r\n Pencolor := AGraphics.Stroke.color;\r\n AGraphics.Stroke.Color := Newcolor;\r\n ptf1 := PointF(r.Left, cr.Bottom + 1);\r\n ptf2 := PointF(r.Right, cr.Bottom + 1);\r\n AGraphics.Stroke.Kind := gskSolid;\r\n AGraphics.DrawLine(ptf1,ptf2);\r\n AGraphics.Stroke.Color := Pencolor;\r\n end;\r\n end;\r\n 'I':\r\n begin\r\n if not Calc then\r\n begin\r\n hifCol := FontColor;\r\n hibCol := BkColor;\r\n hifStyles := AGraphics.Font.Style;\r\n BkColor := HighlightColor;\r\n FontColor := HighlightTextColor;\r\n end;\r\n AGraphics.Font.Style := HighlightTextStyle;\r\n end;\r\n end;\r\n end;\r\n 'I':begin\r\n {$IFDEF ZEROSTRINGINDEX}\r\n TagChar := Upcase(s[2]);\r\n {$ELSE}\r\n TagChar := Upcase(s[3]);\r\n {$ENDIF}\r\n\r\n if TagChar = '>' then // tag\r\n AGraphics.Font.Style := AGraphics.Font.Style + [TFontStyle.fsItalic]\r\n else\r\n if TagChar = 'N' then // tag\r\n begin\r\n TagProp := Copy(s,3,pos('>',s) - 1);\r\n\r\n Prop := Copy(TagProp,TTMSFNCUtils.ipos('x',TagProp) + 2,Length(TagProp));\r\n Prop := Copy(Prop,Pos('\"',Prop) + 1,Length(prop));\r\n Prop := Copy(Prop,1,Pos('\"',Prop) - 1);\r\n\r\n val(Prop,indent,err);\r\n if err = 0 then\r\n begin\r\n if indent > w then\r\n begin\r\n w := Indent;\r\n cr.left := fr.left + Indent;\r\n end;\r\n end;\r\n end\r\n else\r\n if TagChar = 'M' then\r\n begin\r\n imgalign := 0;\r\n imgoffs := 0;\r\n imgfloat := fsNone;\r\n imgth := Round(AGraphics.CalculateTextHeight('gh'));\r\n inc(ImgIdx);\r\n\r\n ir := cr;\r\n\r\n TagProp := Copy(s,3,Pos('>',s) - 1);\r\n Prop := Copy(TagProp,Pos('SRC',Uppercase(TagProp)) + 4,Length(TagProp));\r\n Prop := Copy(Prop,Pos('\"',Prop) + 1,Length(Prop));\r\n Prop := Copy(Prop,1,Pos('\"',Prop) - 1);\r\n\r\n TagProp := Uppercase(TagProp);\r\n\r\n if (Pos('ALT',TagProp) > 0) and (AltImg = ImgIdx) then\r\n begin\r\n Prop := Copy(TagProp,Pos('ALT',TagProp) + 4,Length(TagProp));\r\n Prop := Copy(Prop,Pos('\"',Prop) + 1,Length(Prop));\r\n Prop := Copy(Prop,1,Pos('\"',Prop) - 1);\r\n end;\r\n\r\n TagWidth := 0;\r\n TagHeight := 0;\r\n\r\n if Pos('WIDTH',TagProp) > 0 then\r\n begin\r\n Tagp := Copy(TagProp,Pos('WIDTH',TagProp) + 6,Length(TagProp));\r\n Tagp := Copy(Tagp,Pos('\"',tagp) + 1,Length(Tagp));\r\n Tagp := Copy(Tagp,1,Pos('\"',tagp) - 1);\r\n Val(Tagp,TagWidth,Err);\r\n if Pos('%', tagp) > 0 then\r\n TagWidth := Round(TagWidth / 100 * (cr.Right - cr.Left));\r\n end;\r\n\r\n if Pos('HEIGHT',TagProp) > 0 then\r\n begin\r\n Tagp := Copy(TagProp,TTMSFNCUtils.ipos('HEIGHT',TagProp) + 7,Length(TagProp));\r\n Tagp := Copy(Tagp,pos('\"',Tagp) + 1,Length(Tagp));\r\n Tagp := Copy(Tagp,1,pos('\"',Tagp) - 1);\r\n Val(Tagp,TagHeight,Err);\r\n if Pos('%', tagp) > 0 then\r\n TagHeight := Round(TagHeight / 100 * (cr.Bottom - cr.Top));\r\n end;\r\n\r\n if Pos('ALIGN',TagProp) > 0 then\r\n begin\r\n Tagp := Copy(TagProp,TTMSFNCUtils.ipos('ALIGN',TagProp) + 6,Length(TagProp));\r\n Tagp := Copy(Tagp,pos('\"',Tagp) + 1,Length(Tagp));\r\n Tagp := Copy(Tagp,1,pos('\"',Tagp) - 1);\r\n\r\n if TagP = 'MIDDLE' then\r\n imgalign := 1;\r\n\r\n if TagP = 'TOP' then\r\n imgalign := 2;\r\n end;\r\n\r\n if Pos('FLOAT',TagProp) > 0 then\r\n begin\r\n Tagp := Copy(TagProp,TTMSFNCUtils.ipos('FLOAT',TagProp) + 6,Length(TagProp));\r\n Tagp := Copy(Tagp,pos('\"',Tagp) + 1,Length(Tagp));\r\n Tagp := Copy(Tagp,1,pos('\"',Tagp) - 1);\r\n\r\n if TagP = 'LEFT' then\r\n begin\r\n imgfloat := fsLeft;\r\n ir.left := fr.Left;\r\n end;\r\n\r\n if TagP = 'RIGHT' then\r\n imgfloat := fsRight;\r\n end;\r\n\r\n IMGSize.x := 0;\r\n IMGSize.y := 0;\r\n\r\n if Pos('IDX:',Uppercase(Prop)) > 0 then\r\n begin\r\n Delete(Prop,1,4);\r\n {$IFDEF CMNLIB}\r\n if Assigned(ImageList) and (IStrToInt(Prop) < ImageList.Count) then\r\n begin\r\n {$IFDEF FMXLIB}\r\n {$ENDIF}\r\n {$IFDEF CMNLIB}\r\n {$IFDEF VCLLIB}\r\n IMGSize.x := MulDiv(ImageList.Width,GetDeviceCaps(AGraphics.Canvas.Handle,LOGPIXELSX),96);\r\n IMGSize.y := MulDiv(ImageList.Height,GetDeviceCaps(AGraphics.Canvas.Handle,LOGPIXELSY),96);\r\n {$ENDIF}\r\n {$IFDEF LCLLIB}\r\n IMGSize.x := ImageList.Width;\r\n IMGSize.y := ImageList.Height;\r\n {$ENDIF}\r\n\r\n if (imgth > ImageList.Height) then\r\n begin\r\n if imgalign = 0 then // bottom\r\n imgoffs := (imgth - ImageList.Height);\r\n\r\n if imgalign = 1 then // center\r\n imgoffs := (imgth - ImageList.Height) div 2;\r\n end;\r\n\r\n if not Calc and not Print then\r\n begin\r\n crc := ConvertToRect(ir);\r\n ImageList.Draw(AGraphics.Canvas,crc.Left,crc.Top + imgoffs,IStrToInt(Prop),True);\r\n end;\r\n {$ENDIF}\r\n end;\r\n {$ENDIF}\r\n end;\r\n\r\n bmp := nil;\r\n bmpcreated := false;\r\n\r\n if (Pos(':',Prop) = 0) and Assigned(BitmapContainer) then\r\n begin\r\n bmp := TTMSFNCBitmap(BitmapContainer.FindBitmap(Prop));\r\n end;\r\n\r\n {$IFNDEF WEBLIB}\r\n if (Pos('FILE://',Uppercase(Prop)) > 0) then\r\n begin\r\n Delete(Prop,1,7);\r\n\r\n if FileExists(Prop) then\r\n begin\r\n bmp := TTMSFNCBitmap.Create;\r\n bmp.LoadFromFile(Prop);\r\n bmpcreated := true;\r\n end;\r\n end;\r\n {$ENDIF}\r\n {$IFDEF WEBLIB}\r\n if (Pos('URL://',Uppercase(Prop)) > 0) then\r\n begin\r\n Delete(Prop,1,6);\r\n bmp := TTMSFNCBitmap(TTMSFNCBitmap.CreateFromURL(Prop));\r\n bmpcreated := true;\r\n end;\r\n {$ENDIF}\r\n\r\n if Pos('DATA:',Uppercase(Prop)) > 0 then\r\n begin\r\n if Pos('BASE64,', Uppercase(Prop)) > 0 then\r\n begin\r\n Delete(Prop, 1, Pos('BASE64,', Uppercase(Prop)) + 6);\r\n bmp := TTMSFNCBitmap.Create;\r\n TTMSFNCUtils.LoadBitmapFromBase64(Prop, bmp);\r\n bmpcreated := true;\r\n end;\r\n end;\r\n\r\n imgw := 0;\r\n imgh := 0;\r\n\r\n if Assigned(bmp) then\r\n begin\r\n if not IsBitmapEmpty(bmp) then\r\n begin\r\n if (TagWidth > 0) and (TagHeight > 0) then\r\n begin\r\n imgw := TagWidth;\r\n imgh := TagHeight;\r\n end;\r\n if (TagWidth > 0) and (TagHeight = 0) then\r\n begin\r\n imgw := TagWidth;\r\n imgh := Round(TagWidth/bmp.Width * bmp.Height);\r\n end;\r\n if (TagWidth = 0) and (TagHeight > 0) then\r\n begin\r\n imgw := Round(TagHeight/bmp.Height * bmp.Width);\r\n imgh := TagHeight;\r\n end;\r\n if (TagWidth = 0) and (TagHeight = 0) then\r\n begin\r\n imgw := bmp.Width;\r\n imgh := bmp.Height;\r\n end;\r\n\r\n if imgfloat = fsRight then\r\n ir.Left := r.Right - imgw;\r\n\r\n if not Calc {and not Print} then\r\n begin\r\n if (TagWidth > 0) or (TagHeight > 0) then\r\n begin\r\n AGraphics.DrawBitmap(RectF(Round(ir.Left),Round(ir.Top),Round(ir.Left) + imgw,Round(ir.Top) + imgh), bmp);\r\n end\r\n else\r\n if (TagWidth > 0) and (TagHeight = 0) then\r\n begin\r\n AGraphics.DrawBitmap(RectF(Round(ir.Left),Round(ir.Top),Round(ir.Left) + TagWidth,Round(ir.Top) + TagHeight),bmp);\r\n end\r\n else\r\n begin\r\n AGraphics.DrawBitmap(RectF(Round(ir.Left),Round(ir.Top),Round(ir.Left) + bmp.Width, Round(ir.Top) + bmp.Height),bmp);\r\n end;\r\n end;\r\n\r\n if (TagWidth > 0) or (TagHeight > 0) then\r\n begin\r\n IMGSize.x := imgw;\r\n IMGSize.y := imgh;\r\n end\r\n else\r\n begin\r\n IMGSize.x := bmp.Width;\r\n IMGSize.y := bmp.Height;\r\n end;\r\n end;\r\n\r\n if bmpcreated then\r\n bmp.Free;\r\n end;\r\n\r\n if (XPos - r.Left > w) and (XPos - r.Left < w + IMGSize.x) and\r\n (YPos > cr.Top) and (YPos < cr.Top + IMGSize.Y) and Anchor then\r\n begin\r\n ImageHotSpot := True;\r\n AnchorVal := LastAnchor;\r\n AltImg := ImgIdx;\r\n end;\r\n\r\n if (w + IMGSize.x > r.Right-r.Left) and\r\n (IMGSize.x < r.Right - r.Left) then\r\n begin\r\n ImgBreak := True;\r\n end\r\n else\r\n begin\r\n w := w + IMGSize.x + 2;\r\n cr.left := cr.left + IMGSize.x + 2;\r\n if IMGSize.y > h then\r\n h := IMGSize.y;\r\n end;\r\n\r\n if Pos('ALIGN',TagProp) > 0 then\r\n begin\r\n if Pos('\"TOP',TagProp) > 0 then\r\n begin\r\n rh := AGraphics.CalculateText('gh');\r\n ImgAli := h - (rh.Bottom - rh.Top);\r\n end\r\n else\r\n begin\r\n if Pos('\"MIDDLE',TagProp) > 0 then\r\n begin\r\n rh := AGraphics.CalculateText('gh');\r\n ImgAli := (h - (rh.Bottom - rh.Top)) / 2;\r\n end;\r\n end;\r\n end;\r\n\r\n if (Pos('WRAP',TagProp) > 0) then\r\n begin\r\n rh := AGraphics.CalculateText('gh');\r\n h := rh.Bottom - rh.Top;\r\n ImgAli := 0;\r\n end;\r\n\r\n if imgfloat = fsLeft then\r\n begin\r\n rh := AGraphics.CalculateText('gh');\r\n ImgAli := h - (rh.Bottom - rh.Top);\r\n floatrect.left := imgw;\r\n floatrect.bottom := imgh;\r\n if not calc then\r\n begin\r\n rh := AGraphics.CalculateText('gh');\r\n h := (rh.Bottom - rh.Top);\r\n end;\r\n end;\r\n\r\n if imgfloat = fsRight then\r\n begin\r\n rh := AGraphics.CalculateText('gh');\r\n ImgAli := h - (rh.Bottom - rh.Top);\r\n floatrect.right := imgw;\r\n floatrect.bottom := imgh;\r\n if not calc then\r\n begin\r\n rh := AGraphics.CalculateText('gh');\r\n h := rh.Bottom - rh.Top;\r\n end;\r\n w := fr.Right;\r\n end;\r\n\r\n end;\r\n end;\r\n 'L':begin\r\n NewColor := gcNull;\r\n LType := '';\r\n\r\n if (TTMSFNCUtils.VarPos('>',s,TagPos)>0) then\r\n begin\r\n TagProp := Uppercase(Copy(s,3,TagPos-1));\r\n\r\n if TTMSFNCUtils.VarPos('TYPE',TagProp,TagPos) > 0 then\r\n begin\r\n Prop := Copy(TagProp,TagPos+4,Length(TagProp));\r\n Prop := Copy(Prop,Pos('\"',prop)+1,Length(Prop));\r\n Prop := Copy(Prop,1,Pos('\"',prop)-1);\r\n LType := Prop;\r\n end;\r\n if TTMSFNCUtils.VarPos('COLOR',TagProp,TagPos) > 0 then\r\n begin\r\n Prop := Copy(TagProp,TagPos+5,Length(TagProp));\r\n Prop := Copy(Prop,Pos('\"',prop)+1,Length(Prop));\r\n Prop := Copy(Prop,1,Pos('\"',prop)-1);\r\n\r\n if Length(Prop) > 0 then\r\n begin\r\n {$IFDEF ZEROSTRINGINDEX}\r\n if Prop[0] = '#' then\r\n {$ELSE}\r\n if Prop[1] = '#' then\r\n {$ENDIF}\r\n NewColor := TTMSFNCGraphics.HTMLToColor(Prop)\r\n else\r\n NewColor := TTMSFNCGraphics.TextToColor(prop);\r\n end;\r\n end;\r\n end;\r\n\r\n w := w + 12 * ListIndex;\r\n if Linkbreak then\r\n Imgbreak := True else Linkbreak := True;\r\n\r\n cr.left := cr.left + 12 * (ListIndex - 1);\r\n\r\n if not calc and not Invisible then\r\n begin\r\n if LType = '' then\r\n begin\r\n if (NewColor <> gcNull) then\r\n begin\r\n ColL := AGraphics.Font.Color;\r\n FontColor := NewColor;\r\n end;\r\n Prop := AGraphics.Font.Name;\r\n fs := AGraphics.Font.Style;\r\n AGraphics.Font.Style := [];\r\n\r\n if Odd(ListIndex) then\r\n AGraphics.DrawText(cr, {$IFDEF MSWINDOWS}Chr($2022){$ELSE}'•'{$ENDIF}, False, gtaLeading, gtaCenter, gttNone, 0, -1, -1{$IFNDEF LIMITEDGRAPHICSMODE}, False{$ENDIF})\r\n else\r\n AGraphics.DrawText(cr, 'o', False, gtaLeading, gtaCenter, gttNone, 0, -1, -1{$IFNDEF LIMITEDGRAPHICSMODE}, False{$ENDIF});\r\n\r\n AGraphics.Font.Name := prop;\r\n AGraphics.Font.Style := fs;\r\n if NewColor <> gcNull then\r\n FontColor := ColL;\r\n end\r\n else\r\n begin\r\n ColB := gcNull;\r\n\r\n if LTYPE = 'SQUARE' then\r\n begin\r\n ColB := AGraphics.Fill.Color;\r\n AGraphics.Stroke.Color := NewColor;\r\n AGraphics.Fill.Color := NewColor;\r\n AGraphics.Fill.Kind := gfkSolid;\r\n AGraphics.Stroke.Kind := gskSolid;\r\n AGraphics.DrawRectangle(RectF(cr.Left, cr.Top + 2, cr.Left + 8, cr.Top + 10));\r\n AGraphics.Fill.Color := ColB;\r\n end;\r\n\r\n if LTYPE = 'CIRCLE' then\r\n begin\r\n ColB := AGraphics.Fill.Color;\r\n AGraphics.Stroke.Color := NewColor;\r\n AGraphics.Fill.Color := NewColor;\r\n AGraphics.Fill.Kind := gfkSolid;\r\n AGraphics.Stroke.Kind := gskSolid;\r\n AGraphics.DrawEllipse(RectF(cr.Left, cr.Top + 2, cr.Left + 8, cr.Top + 10));\r\n AGraphics.Fill.Color := ColB;\r\n end;\r\n end;\r\n end;\r\n cr.Left := cr.Left + 12;\r\n end;\r\n 'U':begin\r\n {$IFDEF ZEROSTRINGINDEX}\r\n if s[2] <> '>' then\r\n {$ELSE}\r\n if s[3] <> '>' then\r\n {$ENDIF}\r\n begin\r\n Inc(ListIndex);\r\n if w > 0 then\r\n LineBreak := true;\r\n end\r\n else\r\n AGraphics.Font.Style := AGraphics.Font.Style + [TFontStyle.fsUnderline];\r\n end;\r\n 'O':begin\r\n {$IFDEF ZEROSTRINGINDEX}\r\n TagChar := Upcase(s[2]);\r\n {$ELSE}\r\n TagChar := Upcase(s[3]);\r\n {$ENDIF}\r\n if TagChar = 'F' then // tag\r\n begin\r\n TagProp := Copy(s,3,pos('>',s) - 1);\r\n Prop := Copy(TagProp,TTMSFNCUtils.ipos('x',TagProp) + 2,Length(TagProp));\r\n Prop := Copy(Prop,Pos('\"',Prop) + 1,Length(prop));\r\n Prop := Copy(Prop,1,Pos('\"',Prop) - 1);\r\n val(Prop,NewOffsetX,err);\r\n cr.Left := NewOffsetX;\r\n w := NewOffsetX;\r\n end\r\n end;\r\n 'P':begin\r\n if (TTMSFNCUtils.VarPos('>',s,TagPos)>0) then\r\n begin\r\n TagProp := Uppercase(Copy(s,3,TagPos-1));\r\n\r\n if TTMSFNCUtils.VarPos('ALIGN',TagProp,TagPos) > 0 then\r\n begin\r\n Prop := Copy(TagProp,TagPos+5,Length(TagProp));\r\n Prop := Copy(Prop,Pos('\"',prop)+1,Length(Prop));\r\n Prop := Copy(Prop,1,Pos('\"',prop)-1);\r\n\r\n if Pos('RIGHT',Prop) > 0 then Align := taRightJustify;\r\n if Pos('LEFT',Prop) > 0 then Align := taLeftJustify;\r\n if Pos('CENTER',Prop) > 0 then Align := taCenter;\r\n end;\r\n\r\n if TTMSFNCUtils.VarPos('INDENT',TagProp,TagPos) > 0 then\r\n begin\r\n Prop := Copy(TagProp,TagPos+6,Length(TagProp));\r\n Prop := Copy(Prop,Pos('\"',prop)+1,Length(Prop));\r\n Prop := Copy(Prop,1,Pos('\"',prop)-1);\r\n PIndent := IStrToInt(Prop);\r\n end;\r\n\r\n if TTMSFNCUtils.VarPos('FLOAT',TagProp,TagPos) > 0 then\r\n begin\r\n Prop := Copy(TagProp,TagPos+5,Length(TagProp));\r\n Prop := Copy(Prop,Pos('\"',prop)+1,Length(Prop));\r\n Prop := Copy(Prop,1,Pos('\"',prop)-1);\r\n\r\n if Prop = 'LEFT' then\r\n txtfloat := fsLeft;\r\n\r\n if Prop = 'RIGHT' then\r\n txtfloat := fsRight;\r\n\r\n floatpt := Point(Round(r.Left), Round(r.Top));\r\n end;\r\n\r\n if TTMSFNCUtils.VarPos('BGCOLOR',TagProp,TagPos) > 0 then\r\n begin\r\n Prop := Copy(TagProp,TagPos + 5,Length(TagProp));\r\n Prop := Copy(Prop,Pos('\"',Prop) + 1,Length(Prop));\r\n Prop := Copy(Prop,1,Pos('\"',Prop) - 1);\r\n\r\n NewColor := gcNull;\r\n\r\n if Length(Prop) > 0 then\r\n begin\r\n {$IFDEF ZEROSTRINGINDEX}\r\n if Prop[0] = '#' then\r\n {$ELSE}\r\n if Prop[1] = '#' then\r\n {$ENDIF}\r\n NewColor := TTMSFNCGraphics.HTMLToColor(Prop)\r\n else\r\n NewColor := TTMSFNCGraphics.TextToColor(prop);\r\n end;\r\n\r\n if TTMSFNCUtils.VarPos('BGCOLORTO',TagProp,TagPos) > 0 then\r\n begin\r\n Prop := Copy(TagProp,TagPos + 5,Length(TagProp));\r\n Prop := Copy(Prop,Pos('\"',Prop) + 1,Length(Prop));\r\n Prop := Copy(Prop,1,Pos('\"',Prop) - 1);\r\n\r\n if not Calc then\r\n begin\r\n isPara := True;\r\n AGraphics.Stroke.Color := Newcolor;\r\n\r\n //DrawHTMLGradient(Canvas,NewColor,NewColorTo,clNone,64,Rect(fr.left,r.top,fr.right,r.bottom+2),true);\r\n //AGraphics.Brush.Style := bsClear\r\n end;\r\n end\r\n else\r\n begin\r\n if not Calc then\r\n begin\r\n isPara := True;\r\n paracolor := AGraphics.Fill.Color;\r\n //if AGraphics.Brush.Style = bsClear then ParaColor := clNone;\r\n AGraphics.Fill.color := NewColor;\r\n PenColor := AGraphics.Stroke.Color;\r\n AGraphics.Stroke.Color := Newcolor;\r\n AGraphics.Fill.Kind := gfkSolid;\r\n AGraphics.Stroke.Kind := gskSolid;\r\n AGraphics.DrawRectangle(RectF(fr.left,r.top,fr.right,r.bottom));\r\n end;\r\n end;\r\n end;\r\n end;\r\n end;\r\n 'F':begin\r\n if (TTMSFNCUtils.VarPos('>',s,TagPos)>0) then\r\n begin\r\n if AGraphics.Fill.Kind = gfkNone then\r\n BGColor := gcNull\r\n else\r\n BGColor := AGraphics.Fill.Color;\r\n\r\n TagProp := UpperCase(Copy(s,6,TagPos-6));\r\n\r\n if (TTMSFNCUtils.VarPos('FACE',TagProp,TagPos) > 0) then\r\n begin\r\n Prop := Copy(TagProp,TagPos+4,Length(TagProp));\r\n Prop := Copy(prop,pos('\"',prop)+1,Length(prop));\r\n Prop := Copy(prop,1,pos('\"',prop)-1);\r\n AGraphics.Font.Name := Prop;\r\n end;\r\n\r\n if (TTMSFNCUtils.VarPos(' COLOR',TagProp,TagPos) > 0) and not Selected then\r\n begin\r\n Prop := Copy(TagProp,TagPos+6,Length(TagProp));\r\n Prop := Copy(Prop,Pos('\"',prop)+1,Length(prop));\r\n Prop := Copy(Prop,1,Pos('\"',prop)-1);\r\n if AGraphics.Fill.Color <> gcNull then\r\n OldFontColor := AGraphics.Font.Color\r\n else\r\n OldFontColor := gcBlack;\r\n\r\n if Length(Prop) > 0 then\r\n begin\r\n {$IFDEF ZEROSTRINGINDEX}\r\n if Prop[0] = '#' then\r\n {$ELSE}\r\n if Prop[1] = '#' then\r\n {$ENDIF}\r\n FontColor := TTMSFNCGraphics.HTMLToColor(Prop)\r\n else\r\n FontColor := TTMSFNCGraphics.TextToColor(Prop);\r\n end;\r\n end;\r\n\r\n if (TTMSFNCUtils.VarPos('BGCOLOR',TagProp,TagPos)>0) and not Calc and not Selected then\r\n begin\r\n Prop := Copy(TagProp,TagPos+7,Length(TagProp));\r\n Prop := Copy(prop,pos('\"',prop)+1,Length(prop));\r\n Prop := Copy(prop,1,pos('\"',prop)-1);\r\n\r\n if Length(Prop) > 0 then\r\n begin\r\n {$IFDEF ZEROSTRINGINDEX}\r\n if Prop[0] = '#' then\r\n {$ELSE}\r\n if Prop[1] = '#' then\r\n {$ENDIF}\r\n BkColor := TTMSFNCGraphics.HTMLToColor(Prop)\r\n else\r\n BkColor := TTMSFNCGraphics.TextToColor(prop);\r\n end;\r\n end;\r\n\r\n if (TTMSFNCUtils.VarPos('STYLE',TagProp,TagPos)>0) then\r\n begin\r\n Prop := Copy(TagProp,TagPos+5,Length(TagProp));\r\n Prop := Copy(Prop,Pos('=',Prop)+1,Length(Prop));\r\n Prop := Copy(Prop,Pos('\"',Prop)+1,Length(Prop));\r\n\r\n if Pos('FONT-SIZE:', Uppercase(Prop)) > 0 then\r\n begin\r\n Delete(Prop, 1, 10);\r\n\r\n if pos('PT', UpperCase(Prop)) > 0 then\r\n begin\r\n Prop := Trim(Copy(Prop,1, Pos('PT',Uppercase(Prop))-1));\r\n TTMSFNCUtils.SetFontSize(AGraphics.Font, IStrToInt(Prop));\r\n end;\r\n end;\r\n end\r\n else\r\n begin\r\n if (TTMSFNCUtils.VarPos('SIZE',TagProp,TagPos)>0) then\r\n begin\r\n Prop := Copy(TagProp,TagPos+4,Length(TagProp));\r\n Prop := Copy(Prop,Pos('=',Prop)+1,Length(Prop));\r\n Prop := Copy(Prop,Pos('\"',Prop)+1,Length(Prop));\r\n Prop := Copy(Prop,1,Pos('\"',Prop) - 1);\r\n\r\n case IStrToInt(Prop) of\r\n 1: TTMSFNCUtils.SetFontSize(AGraphics.Font, 8);\r\n 2: TTMSFNCUtils.SetFontSize(AGraphics.Font, 10);\r\n 3: TTMSFNCUtils.SetFontSize(AGraphics.Font, 12);\r\n 4: TTMSFNCUtils.SetFontSize(AGraphics.Font, 14);\r\n 5: TTMSFNCUtils.SetFontSize(AGraphics.Font, 16);\r\n else\r\n TTMSFNCUtils.SetFontSize(AGraphics.Font, IStrToInt(Prop));\r\n end;\r\n end;\r\n end;\r\n end;\r\n end;\r\n 'S':begin\r\n {$IFDEF ZEROSTRINGINDEX}\r\n TagChar := Upcase(s[2]);\r\n {$ELSE}\r\n TagChar := Upcase(s[3]);\r\n {$ENDIF}\r\n\r\n if TagChar = '>' then\r\n AGraphics.Font.Style := AGraphics.Font.Style + [TFontStyle.fsStrikeOut]\r\n else\r\n begin\r\n if TagChar = 'H' then\r\n isShad := True\r\n else\r\n begin\r\n if TTMSFNCUtils.ipos('',s)=1 then\r\n isSub := True\r\n else\r\n if TTMSFNCUtils.ipos('',s)=1 then\r\n isSup := True;\r\n end;\r\n end;\r\n end;\r\n 'R':begin\r\n TagProp := Copy(s,3,pos('>',s)-1);\r\n prop := Copy(TagProp,TTMSFNCUtils.ipos('a',TagProp)+2,Length(TagProp));\r\n prop := Copy(prop,pos('\"',prop)+1,Length(prop));\r\n prop := Copy(prop,1,pos('\"',prop)-1);\r\n //StartRotated(Canvas,indent);\r\n end;\r\n 'Z':Invisible := True;\r\n end;\r\n end;\r\n\r\n if (TTMSFNCUtils.VarPos('>',s,TagPos)>0) and not ImgBreak then\r\n begin\r\n Res := Res + Copy(s,1,TagPos);\r\n Delete(s,1,TagPos);\r\n end\r\n else\r\n if not Imgbreak then\r\n Delete(s,1,Length(s));\r\n end;\r\n end;\r\n\r\n w := w - sw;\r\n\r\n if w > xsize then\r\n xsize := w + 2;\r\n\r\n if (FocusLink = Hyperlinks - 1) and Anchor and not Calc then\r\n begin\r\n rr.Right := cr.Left;\r\n rr.Bottom := cr.Bottom;\r\n InflateRectEx(rr,1,0);\r\n //if not Calc then\r\n // AGraphics.DrawFocusRect(rr);\r\n rr.Left := r.Left + 1;\r\n rr.Top := rr.Bottom;\r\n end;\r\n\r\n Result := Res;\r\n end;\r\n\r\nbegin\r\n Anchor := False;\r\n Error := False;\r\n OldFont := TTMSFNCGraphicsFont.Create;\r\n OldFont.AssignSource(AGraphics.Font);\r\n OldFontColor := AGraphics.Font.Color;\r\n DrawFont := TTMSFNCGraphicsFont.Create;\r\n DrawFont.AssignSource(AGraphics.Font);\r\n DrawFontColor := AGraphics.Font.Color;\r\n CalcFont := TTMSFNCGraphicsFont.Create;\r\n CalcFont.AssignSource(AGraphics.Font);\r\n CalcFontColor := AGraphics.Font.Color;\r\n OldDrawfont := TTMSFNCGraphicsFont.Create;\r\n OldDrawFont.AssignSource(AGraphics.Font);\r\n OldDrawFontColor := AGraphics.Font.Color;\r\n OldCalcFont := TTMSFNCGraphicsFont.Create;\r\n OldCalcFont.AssignSource(AGraphics.Font);\r\n OldCalcFontColor := AGraphics.Font.Color;\r\n BlnkColor := AGraphics.Fill.color;\r\n OldPenColor := AGraphics.Stroke.Color;\r\n blnkKind := AGraphics.Fill.Kind;\r\n oldPenKind := AGraphics.Stroke.Kind;\r\n BGColor := gcNull;\r\n BkColor := gcNull;\r\n ParaColor := gcNull;\r\n isPara := False;\r\n isShad := False;\r\n Invisible := False;\r\n\r\n ControlRect := RectF(0,0,0,0);\r\n CV := '';\r\n CT := '';\r\n if not CheckHotSpot then\r\n CID := '';\r\n\r\n OfsX := 0;\r\n NewOfsX := 0;\r\n\r\n txtfloat := fsNone;\r\n floatrect := Rect(0,0,0,0);\r\n\r\n Result := False;\r\n\r\n r := fr;\r\n\r\n Align := taLeftJustify;\r\n PIndent := 0;\r\n\r\n XSize := 0;\r\n YSize := 0;\r\n HyperLinks := 0;\r\n HlCount := 0;\r\n ListIndex := 0;\r\n LiCount := 0;\r\n StripVal := '';\r\n FocusAnchor := '';\r\n MouseLink := -1;\r\n MouseInAnchor := False;\r\n\r\n ImgIdx := 0;\r\n AltImg := -1;\r\n\r\n if Pos('&',s) > 0 then\r\n begin\r\n s := TTMSFNCUtils.UnFixMarkup(s, true, true);\r\n repeat\r\n Foundtag := False;\r\n if TTMSFNCUtils.TagReplacestring('&','&',s) then Foundtag := True;\r\n until not Foundtag;\r\n end;\r\n\r\n s := DBTagStrip(s);\r\n s := UnicodeTagStrip(s);\r\n s := CRLFStrip(s,True);\r\n\r\n InsPoint := 0;\r\n LineCount := 0;\r\n\r\n while Length(s) > 0 do\r\n begin\r\n //calculate part of the HTML text fitting on the next line\r\n OldFont.AssignSource(OldCalcFont);\r\n OldFontColor := OldCalcFontColor;\r\n AGraphics.Font.AssignSource(CalcFont);\r\n FontColor := CalcFontColor;\r\n OldAnchor := Anchor;\r\n OldAnchorVal := LastAnchor;\r\n suph := 0;\r\n subh := 0;\r\n imgali := 0;\r\n isSup := False;\r\n isSub := False;\r\n HotSpot := False;\r\n ImageHotSpot := False;\r\n HTMLWidth := 0;\r\n rh := AGraphics.CalculateText('gh');\r\n HtmlHeight := rh.Bottom - rh.Top;\r\n txtHeight := HtmlHeight;\r\n\r\n OldImgIdx := ImgIdx;\r\n\r\n s := Trim(s);\r\n\r\n txtfloatbefore := txtfloat;\r\n\r\n su := HTMLDrawLine(AGraphics,s,r,True,HtmlWidth,HtmlHeight,subh,suph,imgali,Align,PIndent,XPos,YPos,HotSpot,ImageHotSpot,ofsx,newofsx, floatrect,txtfloat);\r\n Inc(LineCount);\r\n\r\n Anchor := OldAnchor;\r\n LastAnchor := OldAnchorVal;\r\n\r\n CalcFont.AssignSource(AGraphics.Font);\r\n CalcFontColor := AGraphics.Font.Color;\r\n OldCalcFont.AssignSource(OldFont);\r\n OldCalcFontColor := OldFontColor;\r\n\r\n HTMLHeight := HTMLHeight + LineSpacing;\r\n\r\n dr := r;\r\n\r\n case Align of\r\n taCenter:if (r.right - r.left - htmlwidth > 0) then\r\n dr.left := r.left+((r.right - r.left - htmlwidth) / 2);\r\n taRightJustify:if r.right - htmlwidth > r.left then\r\n dr.left := r.right - htmlwidth;\r\n end;\r\n\r\n dr.Left := dr.Left + PIndent;\r\n dr.Right := dr.Right + PIndent;\r\n\r\n dr.Bottom := dr.Top + HtmlHeight + Subh + Suph;\r\n\r\n if not CheckHeight then\r\n begin\r\n OldFont.AssignSource(OldDrawFont);\r\n OldFontColor := OldDrawFontColor;\r\n AGraphics.Font.AssignSource(DrawFont);\r\n FontColor := DrawFontColor;\r\n\r\n HyperLinks := HlCount;\r\n ListIndex := LiCount;\r\n ImgIdx := OldImgIdx;\r\n\r\n HTMLDrawLine(AGraphics,su,dr,CheckHotSpot,HtmlWidth,HtmlHeight,subh,suph,ImgAli,Align,PIndent,XPos,YPos,HotSpot,ImageHotspot,ofsx,newofsx, floatrect,txtfloat);\r\n\r\n HlCount := HyperLinks;\r\n LiCount := ListIndex;\r\n\r\n r.left := fr.Left + floatrect.left;\r\n\r\n r.right := fr.Right - floatrect.right;\r\n\r\n if dr.Top > floatrect.bottom then\r\n begin\r\n floatrect.Left := 0;\r\n floatrect.Right := 0;\r\n r.Left := fr.Left;\r\n end;\r\n\r\n rh := AGraphics.CalculateText('gh');\r\n\r\n if (HotSpot and\r\n (YPos > dr.Bottom - ImgAli - (rh.Bottom - rh.Top)) and\r\n (YPos < dr.Bottom - ImgAli)) or ImageHotSpot then\r\n begin\r\n Result := True;\r\n end;\r\n\r\n ofsx := newofsx;\r\n\r\n DrawFont.AssignSource(AGraphics.Font);\r\n DrawFontColor := FontColor;\r\n OldDrawFont.AssignSource(OldFont);\r\n OldDrawFontColor := OldFontColor;\r\n end;\r\n\r\n if (txtfloat <> fsNone) and (txtfloat <> txtfloatbefore) then\r\n begin\r\n r.Left := floatpt.x;\r\n r.Top := floatpt.y;\r\n txtfloat := fsNone;\r\n end\r\n else\r\n begin\r\n r.top := r.top + HtmlHeight + subh + suph;\r\n ysize := ysize + HtmlHeight + subh + suph;\r\n end;\r\n\r\n //do not draw below bottom\r\n if (r.top + TxtHeight > r.bottom + 1) and not CheckHeight then\r\n s := '';\r\n end;\r\n\r\n if (ysize = 0) then\r\n begin\r\n rh := AGraphics.CalculateText('gh');\r\n ysize := rh.Bottom - rh.Top;\r\n end;\r\n\r\n //ysize := ysize + 2;\r\n\r\n InsPoint := InsPoint shr 1;\r\n\r\n AGraphics.Stroke.Kind := OldPenKind;\r\n AGraphics.Fill.Kind := blnkKind;\r\n AGraphics.Stroke.Color := OldPenColor;\r\n AGraphics.Fill.Color := BlnkColor;\r\n AGraphics.Font.AssignSource(OldFont);\r\n OldFont.Free;\r\n DrawFont.Free;\r\n CalcFont.Free;\r\n OldDrawfont.Free;\r\n OldCalcfont.Free;\r\nend;\r\n\r\nfunction HTMLDrawEx(AGraphics: TTMSFNCGraphics; s:string; fr:TRectF;\r\n XPos,YPos,FocusLink,HoverLink,ShadowOffset: Integer;\r\n CheckHotSpot,CheckHeight,{%H-}Print,Selected,Blink,HoverStyle,WordWrap: Boolean;\r\n {%H-}ResFactor:Double;\r\n URLColor,HoverColor,HoverFontColor,ShadowColor: TTMSFNCGraphicsColor;\r\n var AnchorVal,StripVal,FocusAnchor: string;\r\n var XSize,YSize: single; var HyperLinks,MouseLink: Integer;\r\n var HoverRect: TRectF; var LineCount: Integer; LineSpacing: Integer;\r\n BitmapContainer: TTMSFNCBitmapContainer; {%H-}Opacity: Single; HyperLinkUnderline: Boolean = True{$IFDEF CMNLIB}; ImageList: TCustomImageList = nil{$ENDIF};\r\n HighlightColor: TTMSFNCGraphicsColor = gcBlue;\r\n HighlightTextColor: TTMSFNCGraphicsColor = gcWhite;\r\n HighlightTextStyle: TFontStyles = []\r\n ): Boolean;\r\nvar\r\n cr: TRectF;\r\n cid: string;\r\n cv: string;\r\n ct: string;\r\nbegin\r\n cid := '';\r\n cv := '';\r\n ct := '';\r\n cr := RectF(0, 0, 0, 0);\r\n Result := HTMLDrawEx(AGraphics, s, fr, XPos, YPos, FocusLink, HoverLink, ShadowOffset, CheckHotSpot, CheckHeight, Print, Selected, Blink, HoverStyle, WordWrap, False, '',\r\n ResFactor, URLColor, HoverColor, HoverFontColor, ShadowColor, AnchorVal, StripVal, FocusAnchor, XSize, YSize, HyperLinks, MouseLink, HoverRect, cr, cid, cv, ct, LineCount, LineSpacing, BitmapContainer,\r\n Opacity, HyperLinkUnderline{$IFDEF CMNLIB}, ImageList{$ENDIF}, HighlightColor, HighlightTextColor, HighlightTextStyle);\r\nend;\r\n\r\n{$HINTS ON}\r\n\r\nend.\r\n","{********************************************************************}\r\n{ }\r\n{ written by TMS Software }\r\n{ copyright (c) 2017 - 2021 }\r\n{ Email : info@tmssoftware.com }\r\n{ Web : http://www.tmssoftware.com }\r\n{ }\r\n{ The source code is given as is. The author is not responsible }\r\n{ for any possible damage done due to the use of this code. }\r\n{ The complete source code remains property of the author and may }\r\n{ not be distributed, published, given or sold in any form as such. }\r\n{ No parts of the source code can be included in any other component }\r\n{ or application without written authorization of the author. }\r\n{********************************************************************}\r\n\r\nunit WEBLib.TMSFNCGraphics.General;\r\n\r\n{$I WEBLib.TMSFNCDefines.inc}\r\n\r\n{$IFDEF FMXLIB}\r\n{$IFDEF MSWINDOWS}\r\n{$DEFINE FMXWINDOWS}\r\n{$ENDIF}\r\n{$ENDIF}\r\n\r\n{$IFDEF FMXLIB}\r\n{$DEFINE FMXWEBLIB}\r\n{$ENDIF}\r\n{$IFDEF CMNLIB}\r\n{$DEFINE CMNWEBLIB}\r\n{$ENDIF}\r\n{$IFDEF WEBLIB}\r\n{$DEFINE CMNWEBLIB}\r\n{$DEFINE FMXWEBLIB}\r\n{$ENDIF}\r\n\r\n{$IFDEF WEBLIB}\r\n{$DEFINE LCLWEBLIB}\r\n{$ENDIF}\r\n{$IFDEF LCLLIB}\r\n{$DEFINE LCLWEBLIB}\r\n{$ENDIF}\r\n\r\n{$IFDEF FMXLIB}\r\n{$DEFINE SUPPORTSACCELERATORS}\r\n{$ENDIF}\r\n\r\ninterface\r\n\r\nuses\r\n {$IFDEF MSWINDOWS}\r\n Windows,\r\n {$ENDIF}\r\n Classes, WEBLib.TMSFNCGraphicsTypes,\r\n Types, WEBLib.Graphics, WEBLib.TMSFNCGraphics,\r\n WEBLib.TMSFNCTypes\r\n {$IFDEF FMXLIB}\r\n ,FMX.Types, FMX.TextLayout, System.Math.Vectors\r\n {$ENDIF}\r\n {$IFNDEF LCLWEBLIB}\r\n {$HINTS OFF}\r\n {$IF COMPILERVERSION > 22}\r\n ,UITypes\r\n {$IFEND}\r\n {$HINTS ON}\r\n {$ENDIF}\r\n ;\r\n\r\ntype\r\n TTMSFNCGraphicsContextGeneral = class(TTMSFNCGraphicsContext)\r\n private\r\n FPrinting: Boolean;\r\n {$IFNDEF WEBLIB}\r\n {%H-}FShowAcceleratorChar: Boolean;\r\n {$ENDIF}\r\n {$IFDEF CMNLIB}\r\n FOldPenHandle: THandle;\r\n {$ENDIF}\r\n {$IFDEF CMNWEBLIB}\r\n FOldPenStyle: TPenStyle;\r\n FOldPenWidth: Integer;\r\n {$ENDIF}\r\n {$IFDEF FMXLIB}\r\n FMatrix: TMatrix;\r\n FMatrixSaved: Boolean;\r\n FTextMatrix: TMatrix;\r\n FTextLayout: TTextLayout;\r\n {$ENDIF}\r\n protected\r\n function GetNativeCanvas: Pointer; override;\r\n {$IFDEF CMNWEBLIB}\r\n {$IFDEF WEBLIB}\r\n procedure DrawRotatedText(ACanvas: TCanvas; ARect: TRectF; AText: String; AAngle: Single; AHorizontalAlign, AVerticalAlign: TTMSFNCGraphicsTextAlign);\r\n {$ENDIF}\r\n {$IFNDEF WEBLIB}\r\n procedure DrawRotatedText(ACanvas: TCanvas; ARect: TRect; AText: String; AAngle: Single; AHorizontalAlign, AVerticalAlign: TTMSFNCGraphicsTextAlign);\r\n {$ENDIF}\r\n {$ENDIF}\r\n {$IFDEF FMXWINDOWS}\r\n function CalculateTextWin(AText: string; ARect: TRectF; AWordWrapping: Boolean): TRectF; virtual;\r\n {$ENDIF}\r\n {$IFDEF FMXLIB}\r\n procedure SaveMatrix;\r\n procedure RestoreMatrix;\r\n {$IFDEF SUPPORTSACCELERATORS}\r\n function SupportsAcceleratorChar: Boolean;\r\n {$ENDIF}\r\n {$ENDIF}\r\n public\r\n destructor Destroy; override;\r\n function GetFillColor: TTMSFNCGraphicsColor; override;\r\n function CalculateText(AText: string; ARect: TRectF; AWordWrapping: Boolean): TRectF; override;\r\n function SetTextAngle(ARect: TRectF; {%H-}AAngle: Single): TRectF; override;\r\n function CreatePath: Pointer; override;\r\n function GetMatrix: TTMSFNCGraphicsMatrix; override;\r\n procedure Render; override;\r\n procedure PathOpen({%H-}APath: Pointer); override;\r\n procedure PathMoveTo(APath: Pointer; APoint: TPointF); override;\r\n procedure PathLineTo(APath: Pointer; APoint: TPointF); override;\r\n procedure PathClose(APath: Pointer); override;\r\n procedure ResetTransform; override;\r\n procedure ResetClip; override;\r\n procedure ScaleTransform({%H-}AX, {%H-}AY: Single); override;\r\n procedure RotateTransform({%H-}AAngle: Single); override;\r\n procedure TranslateTransform({%H-}AX, {%H-}AY: Single); override;\r\n procedure SetTextQuality({%H-}ATextQuality: TTMSFNCGraphicsTextQuality); override;\r\n procedure SetAntiAliasing({%H-}AAntiAliasing: Boolean); override;\r\n procedure SetShowAcceleratorChar({%H-}AShowAcceleratorChar: Boolean); override;\r\n procedure SetSize({%H-}AWidth, {%H-}AHeight: Single); override;\r\n procedure ResetTextAngle({%H-}AAngle: Single); override;\r\n procedure BeginScene; override;\r\n procedure EndScene; override;\r\n procedure BeginPrinting; override;\r\n procedure EndPrinting; override;\r\n procedure StartSpecialPen; override;\r\n procedure StopSpecialPen; override;\r\n procedure RestoreState(AState: TTMSFNCGraphicsSaveState); override;\r\n procedure SaveState({%H-}AState: TTMSFNCGraphicsSaveState); override;\r\n procedure SetMatrix(AMatrix: TTMSFNCGraphicsMatrix); override;\r\n procedure SetScale(AScale: Single); override;\r\n procedure SetFontSize(ASize: Integer); override;\r\n procedure SetFontColor(AColor: TTMSFNCGraphicsColor); override;\r\n procedure SetFontName(AName: string); override;\r\n procedure SetFont(AFont: TTMSFNCGraphicsFont); override;\r\n procedure SetFontStyles(AStyle: TFontStyles); override;\r\n procedure SetFill(AFill: TTMSFNCGraphicsFill); override;\r\n procedure SetFillKind(AKind: TTMSFNCGraphicsFillKind); override;\r\n procedure SetFillColor(AColor: TTMSFNCGraphicsColor); override;\r\n procedure SetStroke(AStroke: TTMSFNCGraphicsStroke); override;\r\n procedure SetStrokeKind(AKind: TTMSFNCGraphicsStrokeKind); override;\r\n procedure SetStrokeColor(AColor: TTMSFNCGraphicsColor); override;\r\n procedure SetStrokeWidth(AWidth: Single); override;\r\n procedure DrawLine({%H-}AStroke: TTMSFNCGraphicsStroke; AFromPoint: TPointF; AToPoint: TPointF; {%H-}AModifyPointModeFrom: TTMSFNCGraphicsModifyPointMode = gcpmRightDown; {%H-}AModifyPointModeTo: TTMSFNCGraphicsModifyPointMode = gcpmRightDown); override;\r\n procedure DrawPolygon({%H-}AStroke: TTMSFNCGraphicsStroke; APolygon: TTMSFNCGraphicsPathPolygon); override;\r\n procedure FillPolygon({%H-}AFill: TTMSFNCGraphicsFill; APolygon: TTMSFNCGraphicsPathPolygon); override;\r\n procedure DrawPolyline({%H-}AStroke: TTMSFNCGraphicsStroke; APolyline: TTMSFNCGraphicsPathPolygon); override;\r\n procedure FillPolyline({%H-}AFill: TTMSFNCGraphicsFill; APolyline: TTMSFNCGraphicsPathPolygon); override;\r\n procedure FillArc({%H-}AFill: TTMSFNCGraphicsFill; ACenter, ARadius: TPointF; AStartAngle, ASweepAngle: Single); override;\r\n procedure DrawArc({%H-}AStroke: TTMSFNCGraphicsStroke; ACenter, ARadius: TPointF; AStartAngle, ASweepAngle: Single); override;\r\n procedure FillRect({%H-}AFill: TTMSFNCGraphicsFill; ARect: TRectF; {%H-}AModifyRectMode: TTMSFNCGraphicsModifyRectMode = gcrmShrinkAll); override;\r\n procedure DrawRect({%H-}AStroke: TTMSFNCGraphicsStroke; ARect: TRectF; ASides: TTMSFNCGraphicsSides; {%H-}AModifyRectMode: TTMSFNCGraphicsModifyRectMode = gcrmShrinkAll); override;\r\n procedure FillRoundRect({%H-}AFill: TTMSFNCGraphicsFill; ARect: TRectF; ARounding: Single; ACorners: TTMSFNCGraphicsCorners; {%H-}AModifyRectMode: TTMSFNCGraphicsModifyRectMode = gcrmShrinkAll); override;\r\n procedure DrawRoundRect({%H-}AStroke: TTMSFNCGraphicsStroke; ARect: TRectF; ARounding: Single; ACorners: TTMSFNCGraphicsCorners; {%H-}AModifyRectMode: TTMSFNCGraphicsModifyRectMode = gcrmShrinkAll); override;\r\n procedure FillEllipse({%H-}AFill: TTMSFNCGraphicsFill; ARect: TRectF; {%H-}AModifyRectMode: TTMSFNCGraphicsModifyRectMode = gcrmShrinkAll); override;\r\n procedure DrawEllipse({%H-}AStroke: TTMSFNCGraphicsStroke; ARect: TRectF; {%H-}AModifyRectMode: TTMSFNCGraphicsModifyRectMode = gcrmShrinkAll); override;\r\n procedure DrawBitmap(ABitmap: TTMSFNCDrawBitmap; {%H-}ASrcRect, ADstRect: TRectF; {%H-}AOpacity: Single); override;\r\n procedure ClipRect(ARect: TRectF); override;\r\n procedure ClipPath({%H-}APath: TTMSFNCGraphicsPath); override;\r\n procedure DrawFocusPath({%H-}AStroke: TTMSFNCGraphicsStroke; APath: TTMSFNCGraphicsPath; AColor: TTMSFNCGraphicsColor); override;\r\n procedure DrawFocusRectangle({%H-}AStroke: TTMSFNCGraphicsStroke; ARect: TRectF; AColor: TTMSFNCGraphicsColor; {%H-}AModifyRectMode: TTMSFNCGraphicsModifyRectMode = gcrmShrinkAll); override;\r\n procedure DrawText(AText: string; ARect: TRectF; AWordWrapping: Boolean; AHorizontalAlign, AVerticalAlign: TTMSFNCGraphicsTextAlign; ATrimming: TTMSFNCGraphicsTextTrimming; AAngle: Single); override;\r\n procedure DrawPath({%H-}AStroke: TTMSFNCGraphicsStroke; APath: TTMSFNCGraphicsPath; APathMode: TTMSFNCGraphicsPathDrawMode = pdmPolygon); override;\r\n procedure FillPath({%H-}AFill: TTMSFNCGraphicsFill; APath: TTMSFNCGraphicsPath; APathMode: TTMSFNCGraphicsPathDrawMode = pdmPolygon); override;\r\n end;\r\n\r\nfunction GetNativeContextClass: TTMSFNCGraphicsContextClass;\r\n\r\nimplementation\r\n\r\nuses\r\n Math\r\n {$IFDEF SUPPORTSACCELERATORS}\r\n ,Character, FMX.Platform, FMX.AcceleratorKey, FMX.FontGlyphs\r\n {$ENDIF}\r\n {$IFDEF FMXWINDOWS}\r\n ,SysUtils, WinApi.D2D1, WinApi.D3D10, WinApi.Dxgi,WinApi.DxgiFormat,\r\n WinApi.ActiveX, FMX.Canvas.D2D, Winapi.D3D10_1,\r\n FMX.Consts\r\n {$ENDIF}\r\n {$IFDEF LCLLIB}\r\n ,LCLIntF, LCLType\r\n {$ENDIF}\r\n ;\r\n\r\n{$IFDEF MSWINDOWS}\r\n{$IFDEF LCLLIB}\r\nfunction AbortPath(_para1:HDC):WINBOOL; external 'gdi32' name 'AbortPath';\r\n{$ENDIF}\r\n{$ENDIF}\r\n\r\n{$IFDEF FMXWINDOWS}\r\ntype\r\n TDirect3DLevel = (lUndetermined, lUnsupported, lDirect3D10, lDirect3D10_1);\r\n TDirect3DSupport = (sUndetermined, sDirect3D10Legacy, sDirect3D10, sDirect3D10_1);\r\n\r\nvar\r\n FSharedDevice: ID3D10Device;\r\n FSharedDXGIFactory: IDXGIFactory;\r\n FSharedFactory: ID2D1Factory;\r\n FSharedDWriteFactory: IDWriteFactory;\r\n FDirect3DLevel: TDirect3DLevel;\r\n FDirect3DSupport: TDirect3DSupport;\r\n FDirect3DHardware: Boolean;\r\n{$ENDIF}\r\n\r\n{$IFDEF FMXWINDOWS}\r\nfunction TTMSFNCGraphicsContextGeneral.CalculateTextWin(AText: string; ARect: TRectF; AWordWrapping: Boolean): TRectF;\r\nvar\r\n TextRange: TDWriteTextRange;\r\n TextFormat: IDWriteTextFormat;\r\n LocaleName: string;\r\n TrimOptions: TDwriteTrimming;\r\n TrimmingSign: IDWriteInlineObject;\r\n FLayout: IDWriteTextLayout;\r\n FMetrics: TDWriteTextMetrics;\r\n FOverhangMetrics: TDwriteOverhangMetrics;\r\n PrevFPUState: TArithmeticExceptionMask;\r\n\r\n procedure SaveClearFPUState;\r\n begin\r\n PrevFPUState:= GetExceptionMask;\r\n SetExceptionMask(exAllArithmeticExceptions);\r\n end;\r\n\r\n procedure RestoreFPUState;\r\n begin\r\n SetExceptionMask(PrevFPUState);\r\n end;\r\n\r\n function D2FontWeight(const Style: TFontStyles): TDWriteFontWeight; inline;\r\n begin\r\n Result := DWRITE_FONT_WEIGHT_REGULAR;\r\n if TFontStyle.fsBold in Style then\r\n Result := DWRITE_FONT_WEIGHT_BOLD;\r\n end;\r\n\r\n function D2FontStyle(const Style: TFontStyles): TDWriteFontStyle; inline;\r\n begin\r\n Result := DWRITE_FONT_STYLE_NORMAL;\r\n if TFontStyle.fsItalic in Style then\r\n Result := DWRITE_FONT_STYLE_OBLIQUE;\r\n end;\r\n\r\n procedure UpdateDirect3DLevel;\r\n var\r\n DXLib: THandle;\r\n begin\r\n if FDirect3DLevel = TDirect3DLevel.lUndetermined then\r\n begin\r\n {$HINTS OFF}\r\n if {$IF COMPILERVERSION > 27}GlobalUseDX{$ELSE}GlobalUseDX10{$IFEND} then\r\n {$HINTS ON}\r\n begin\r\n FDirect3DLevel := TDirect3DLevel.lUndetermined;\r\n\r\n // Direct3D 10.1\r\n DXLib := LoadLibrary(D3D10_1_dll);\r\n if DXLib <> 0 then\r\n try\r\n if GetProcAddress(DXLib, 'D3D10CreateDevice1') <> nil then\r\n FDirect3DLevel := TDirect3DLevel.lDirect3D10_1;\r\n finally\r\n FreeLibrary(DXLib);\r\n end;\r\n\r\n if FDirect3DLevel = TDirect3DLevel.lUndetermined then\r\n begin // Direct3D 10.0\r\n DXLib := LoadLibrary(D3D10dll);\r\n if DXLib <> 0 then\r\n try\r\n if GetProcAddress(DXLib, 'D3D10CreateDevice') <> nil then\r\n FDirect3DLevel := TDirect3DLevel.lDirect3D10;\r\n finally\r\n FreeLibrary(DXLib);\r\n end;\r\n end;\r\n\r\n if FDirect3DLevel = TDirect3DLevel.lUndetermined then\r\n FDirect3DLevel := TDirect3DLevel.lUnsupported;\r\n end\r\n else\r\n FDirect3DLevel := TDirect3DLevel.lUnsupported;\r\n end;\r\n end;\r\n\r\n procedure CreateDirect3DDevice;\r\n\r\n function CreateDevice(const DriverType: D3D10_DRIVER_TYPE): HResult;\r\n var\r\n Flags: Cardinal;\r\n begin\r\n Result := S_OK;\r\n Flags := D3D10_CREATE_DEVICE_BGRA_SUPPORT;\r\n\r\n if FDirect3DLevel = TDirect3DLevel.lDirect3D10_1 then\r\n begin\r\n // Direct3D 10.1 with full hardware support\r\n Result := D3D10CreateDevice1(nil, DriverType, 0, Flags, D3D10_FEATURE_LEVEL_10_1,\r\n D3D10_1_SDK_VERSION, ID3D10Device1(FSharedDevice));\r\n\r\n if Succeeded(Result) then\r\n FDirect3DSupport := TDirect3DSupport.sDirect3D10_1;\r\n\r\n if Failed(Result) then\r\n begin\r\n // Direct3D 10.1 with hardware support of 10.0\r\n Result := D3D10CreateDevice1(nil, DriverType, 0, Flags, D3D10_FEATURE_LEVEL_10_0,\r\n D3D10_1_SDK_VERSION, ID3D10Device1(FSharedDevice));\r\n\r\n if Succeeded(Result) then\r\n FDirect3DSupport := TDirect3DSupport.sDirect3D10;\r\n end;\r\n end;\r\n\r\n if (FDirect3DLevel = TDirect3DLevel.lDirect3D10) or Failed(Result) then\r\n begin\r\n // Legacy Direct3D 10.0 (on unpatched version of Vista)\r\n Result := D3D10CreateDevice(nil, DriverType, 0, Flags, D3D10_SDK_VERSION, FSharedDevice);\r\n\r\n if Succeeded(Result) then\r\n begin\r\n FDirect3DLevel := TDirect3DLevel.lDirect3D10;\r\n FDirect3DSupport := TDirect3DSupport.sDirect3D10Legacy;\r\n end;\r\n end;\r\n end;\r\n\r\nvar\r\n Res: HResult;\r\nbegin\r\n if FDirect3DLevel < TDirect3DLevel.lDirect3D10 then\r\n raise Exception.CreateFmt('Cannot determine Direct3D support level.', [ClassType]);\r\n\r\n SaveClearFPUState;\r\n try\r\n {$HINTS OFF}\r\n if {$IF COMPILERVERSION > 27}GlobalUseDXSoftware{$ELSE}GlobalUseDX10Software{$IFEND} then\r\n {$HINTS ON}\r\n begin\r\n Res := CreateDevice(D3D10_DRIVER_TYPE_WARP);\r\n if Failed(Res) then\r\n begin\r\n // WARP device might not be supported on pre-DX10.1 system, which may still support DX10 in hardware.\r\n Res := CreateDevice(D3D10_DRIVER_TYPE_HARDWARE);\r\n if Succeeded(Res) then\r\n FDirect3DHardware := True;\r\n end\r\n else\r\n FDirect3DHardware := False;\r\n end\r\n else\r\n begin\r\n Res := CreateDevice(D3D10_DRIVER_TYPE_HARDWARE);\r\n if Failed(Res) then\r\n begin\r\n Res := CreateDevice(D3D10_DRIVER_TYPE_WARP);\r\n if Succeeded(Res) then\r\n FDirect3DHardware := False;\r\n end\r\n else\r\n FDirect3DHardware := True;\r\n end;\r\n\r\n if Failed(Res) then\r\n raise ECannotCreateD3DDevice.CreateFmt(SCannotCreateD3DDevice, [ClassType]);\r\n finally\r\n RestoreFPUState;\r\n end;\r\nend;\r\n\r\nprocedure AcquireDXGIFactory;\r\nvar\r\n DXGIDevice: IDXGIDevice;\r\n DXGIAdapter: IDXGIAdapter;\r\nbegin\r\n if Succeeded(FSharedDevice.QueryInterface(IDXGIDevice, DXGIDevice)) and (DXGIDevice <> nil) and\r\n Succeeded(DXGIDevice.GetParent(IDXGIAdapter, DXGIAdapter)) and (DXGIAdapter <> nil) then\r\n DXGIAdapter.GetParent(IDXGIFactory, FSharedDXGIFactory);\r\nend;\r\n\r\nprocedure CreateDirect2DFactory;\r\nvar\r\n FactoryOptions: PD2D1FactoryOptions;\r\n Res: HResult;\r\nbegin\r\n FactoryOptions := nil;\r\n Res := D2D1CreateFactory(D2D1_FACTORY_TYPE_MULTI_THREADED, ID2D1Factory, FactoryOptions, FSharedFactory);\r\n if Failed(Res) or (FSharedFactory = nil) then\r\n raise Exception.CreateFmt('Cannot create Direct2D Factory object for ''%s''.', [ClassType]);\r\n\r\n if Failed(DWriteCreateFactory(DWRITE_FACTORY_TYPE_SHARED, IDWriteFactory, IUnknown(FSharedDWriteFactory))) then\r\n raise Exception.CreateFmt('Cannot create DirectWrite Factory object for ''%s''.', [ClassType]);\r\nend;\r\n\r\nprocedure CreateSharedResources;\r\nbegin\r\n UpdateDirect3DLevel;\r\n if FSharedDevice = nil then\r\n begin\r\n CreateDirect3DDevice;\r\n AcquireDXGIFactory;\r\n end;\r\n if FSharedFactory = nil then\r\n CreateDirect2DFactory;\r\nend;\r\n\r\nfunction SharedDWriteFactory: IDWriteFactory;\r\nbegin\r\n if FSharedDWriteFactory = nil then\r\n CreateSharedResources;\r\n Result := FSharedDWriteFactory;\r\nend;\r\n\r\nvar\r\n r: TRectF;\r\n dwVersion:Dword;\r\n dwWindowsMajorVersion: Dword;\r\nbegin\r\n dwVersion := GetVersion;\r\n dwWindowsMajorVersion := DWORD(LOBYTE(LOWORD(dwVersion)));\r\n if (dwWindowsMajorVersion = 5) then\r\n begin\r\n r := ARect;\r\n Canvas.MeasureText(r, AText, AWordWrapping, [], TTextAlign.Leading, TTextAlign.Leading);\r\n Result := r;\r\n end\r\n else\r\n begin\r\n Result := RectF(0, 0, 0, 0);\r\n FLayout := nil;\r\n if Succeeded(SharedDWriteFactory.CreateTextFormat(PChar(Canvas.Font.Family), nil, D2FontWeight(Canvas.Font.Style),\r\n D2FontStyle(Canvas.Font.Style), DWRITE_FONT_STRETCH_NORMAL, Canvas.Font.Size, PChar(LocaleName), TextFormat)) then\r\n try\r\n TextFormat.SetReadingDirection(DWRITE_READING_DIRECTION_LEFT_TO_RIGHT);\r\n\r\n if not AWordWrapping then\r\n TextFormat.SetWordWrapping(DWRITE_WORD_WRAPPING_NO_WRAP)\r\n else\r\n TextFormat.SetWordWrapping(DWRITE_WORD_WRAPPING_WRAP);\r\n\r\n FillChar(TrimOptions, SizeOf(TDwriteTrimming), 0);\r\n TrimOptions.granularity := DWRITE_TRIMMING_GRANULARITY_NONE;\r\n\r\n TrimmingSign := nil;\r\n TextFormat.SetTrimming(TrimOptions, TrimmingSign);\r\n TrimmingSign := nil;\r\n\r\n if Succeeded(SharedDWriteFactory.CreateTextLayout(PChar(AText), AText.Length, TextFormat, ARect.Width,\r\n ARect.Height, FLayout)) then\r\n begin\r\n TextRange.StartPosition := 0;\r\n TextRange.Length := AText.Length;\r\n FLayout.SetStrikethrough(TFontStyle.fsStrikeOut in Canvas.Font.Style, TextRange);\r\n FLayout.SetUnderline(TFontStyle.fsUnderline in Canvas.Font.Style, TextRange);\r\n FLayout.GetMetrics(FMetrics);\r\n FLayout.GetOverhangMetrics(FOverhangMetrics);\r\n\r\n Result := TRectF.Create(FMetrics.left, FMetrics.top,\r\n FMetrics.left + {Max(}FMetrics.widthIncludingTrailingWhitespace{, FOverhangMetrics.Right + AMaxRect.Width)},\r\n FMetrics.top + Min(FMetrics.height, FMetrics.layoutHeight));\r\n Result.Offset(ARect.TopLeft);\r\n if FMetrics.top < 0 then\r\n Result.Offset(0, Abs(FMetrics.top));\r\n end;\r\n finally\r\n TextFormat := nil;\r\n end;\r\n end;\r\nend;\r\n{$ENDIF}\r\n\r\n{$IFDEF FMXLIB}\r\n{$IFDEF SUPPORTSACCELERATORS}\r\nfunction TTMSFNCGraphicsContextGeneral.SupportsAcceleratorChar: Boolean;\r\nvar\r\n ak: IFMXAcceleratorKeyRegistryService;\r\nbegin\r\n Result := TPlatformServices.Current.SupportsPlatformService(IFMXAcceleratorKeyRegistryService, ak);\r\nend;\r\n{$ENDIF}\r\n\r\nprocedure TTMSFNCGraphicsContextGeneral.SaveMatrix;\r\nbegin\r\n if not FMatrixSaved then\r\n begin\r\n FMatrixSaved := True;\r\n FMatrix := Canvas.Matrix;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCGraphicsContextGeneral.RestoreMatrix;\r\nbegin\r\n if FMatrixSaved then\r\n begin\r\n FMatrixSaved := False;\r\n Canvas.SetMatrix(FMatrix);\r\n end;\r\nend;\r\n{$ENDIF}\r\n\r\n{$HINTS OFF}\r\n{$IFDEF CMNWEBLIB}\r\n{$IFDEF WEBLIB}\r\nprocedure TTMSFNCGraphicsContextGeneral.DrawRotatedText(ACanvas: TCanvas; ARect: TRectF; AText: String; AAngle: Single; AHorizontalAlign, AVerticalAlign: TTMSFNCGraphicsTextAlign);\r\n{$ENDIF}\r\n{$IFNDEF WEBLIB}\r\nprocedure TTMSFNCGraphicsContextGeneral.DrawRotatedText(ACanvas: TCanvas; ARect: TRect; AText: String; AAngle: Single; AHorizontalAlign, AVerticalAlign: TTMSFNCGraphicsTextAlign);\r\n{$ENDIF}\r\nvar\r\n tw, th: Single;\r\n so: Integer;\r\n s: String;\r\n xs, ys, angle: Single;\r\n {$IFDEF WEBLIB}\r\n ha: TAlignment;\r\n va: TVerticalAlignment;\r\n r: TCanvasRectF;\r\n {$ENDIF}\r\nbegin\r\n s := AText;\r\n angle := -10 * AAngle;\r\n {$IFDEF CMNLIB}\r\n so := ACanvas.Font.Orientation;\r\n ACanvas.Font.Orientation := Round(angle);\r\n {$ENDIF}\r\n\r\n xs := ARect.Left;\r\n ys := ARect.Top;\r\n tw := ACanvas.TextWidth(s);\r\n th := ACanvas.TextHeight(s);\r\n\r\n {$IFDEF CMNLIB}\r\n if angle < 0 then\r\n begin\r\n case AHorizontalAlign of\r\n gtaCenter: ys := ys + (ARect.Bottom - ARect.Top - tw) / 2;\r\n gtaTrailing: ys := ys + (ARect.Bottom - ARect.Top - tw);\r\n end;\r\n\r\n case AVerticalAlign of\r\n gtaCenter: xs := xs + (ARect.Right - ARect.Left) / 2 + th / 2;\r\n gtaLeading: xs := xs + (ARect.Right - ARect.Left);\r\n gtaTrailing: xs := xs + th;\r\n end;\r\n end\r\n else\r\n begin\r\n case AHorizontalAlign of\r\n gtaCenter: ys := ys + (ARect.Bottom - ARect.Top - tw) / 2 + tw;\r\n gtaLeading: ys := ys + (ARect.Bottom - ARect.Top);\r\n gtaTrailing: ys := ys + tw;\r\n end;\r\n\r\n case AVerticalAlign of\r\n gtaCenter: xs := xs + (ARect.Right - ARect.Left) / 2 - th / 2;\r\n gtaTrailing: xs := xs + (ARect.Right - ARect.Left - th);\r\n end;\r\n end;\r\n {$ENDIF}\r\n\r\n {$IFDEF WEBLIB}\r\n case AHorizontalAlign of\r\n gtaLeading: ha := taLeftJustify;\r\n gtaCenter: ha := taCenter;\r\n gtaTrailing: ha := taRightJustify;\r\n end;\r\n\r\n case AVerticalAlign of\r\n gtaCenter: va := taVerticalCenter;\r\n gtaLeading: va := taAlignTop;\r\n gtaTrailing: va := taAlignBottom;\r\n end;\r\n\r\n r := CreateCanvasRectF(ARect.Left, ARect.Top, ARect.Right, ARect.Bottom);\r\n\r\n ACanvas.TextRect(r, s, False, False, ha, va);\r\n {$ENDIF}\r\n {$IFNDEF WEBLIB}\r\n ACanvas.TextOut(Round(xs), Round(ys), s);\r\n {$ENDIF}\r\n {$IFDEF CMNLIB}\r\n ACanvas.Font.Orientation := so;\r\n {$ENDIF}\r\nend;\r\n{$ENDIF}\r\n{$HINTS ON}\r\n\r\n{ TTMSFNCGraphicsContext }\r\n\r\nprocedure TTMSFNCGraphicsContextGeneral.BeginPrinting;\r\nbegin\r\n FPrinting := True;\r\nend;\r\n\r\nprocedure TTMSFNCGraphicsContextGeneral.BeginScene;\r\nbegin\r\n {$IFDEF FMXWEBLIB}\r\n if Assigned(Canvas) then\r\n begin\r\n Canvas.BeginScene;\r\n {$IFDEF FMXLIB}\r\n Canvas.Clear(gcNull);\r\n {$ELSE}\r\n Canvas.Clear;\r\n {$ENDIF}\r\n end;\r\n {$ENDIF}\r\nend;\r\n\r\n{$IFDEF SUPPORTSACCELERATORS}\r\nprocedure ExtractAcceleratorKey(const AText: string; out Key: Char; out KeyIndex: Integer);\r\nconst\r\n AcceleratorChar = '&';\r\nvar\r\n I: Integer;\r\n LIndexOfAcceleratorChar: Integer;\r\n LCorrection: Integer;\r\nbegin\r\n LIndexOfAcceleratorChar := -1;\r\n LCorrection := 0;\r\n I := Low(AText);\r\n while I < High(AText) do\r\n begin\r\n if (AText[I] = AcceleratorChar) and not (AText[I + 1].IsWhiteSpace) then\r\n if AText[I + 1] <> AcceleratorChar then\r\n begin\r\n LIndexOfAcceleratorChar := I;\r\n Break;\r\n end\r\n else\r\n begin\r\n Inc(LCorrection);\r\n Inc(I);\r\n end;\r\n Inc(I);\r\n end;\r\n\r\n if LIndexOfAcceleratorChar >= 0 then\r\n begin\r\n Key := AText[LIndexOfAcceleratorChar + Low(string)].ToLower;\r\n KeyIndex := LIndexOfAcceleratorChar - LCorrection - Low(string);\r\n end\r\n else\r\n begin\r\n Key := #0;;\r\n KeyIndex := -1;\r\n end;\r\nend;\r\n\r\nfunction ValidateUnderlinePoints(ACanvas: TCanvas; ALayout: TTextLayout; AKeyIndex: Integer; var AUnderlineBeginPoint: TPointF; var AUnderlineEndPoint: TPointF): Boolean;\r\nvar\r\n LRange: TTextRange;\r\n LBounds: TRegion;\r\n LBaseLine: Single;\r\n LRect: TRectF;\r\nbegin\r\n LBaseline := TFontGlyphManager.Current.GetBaseline(ALayout.Font, ACanvas.Scale);\r\n LRange.Pos := AKeyIndex;\r\n LRange.Length := 1;\r\n LBounds := ALayout.RegionForRange(LRange);\r\n LRect := LBounds[0];\r\n LRect.Intersect(ALayout.TextRect);\r\n if LRect.IsEmpty then\r\n Exit(False);\r\n AUnderlineBeginPoint := TPointF.Create(LRect.Left, LRect.Top + LBaseLine);\r\n AUnderlineEndPoint := TPointF.Create(LRect.Right, LRect.Top + LBaseLine);\r\n\r\n // Perform some corrections depending on the canvas type\r\n AUnderlineBeginPoint.Y := Ceil(AUnderlineBeginPoint.Y) + 1.5;\r\n AUnderlineEndPoint.Y := Ceil(AUnderlineEndPoint.Y) + 1.5;\r\n\r\n if GlobalUseGPUCanvas then\r\n begin\r\n AUnderlineBeginPoint.X := AUnderlineBeginPoint.X + 0.5;\r\n AUnderlineEndPoint.X := AUnderlineEndPoint.X - 0.5;\r\n end\r\n else\r\n if GlobalUseDirect2D then\r\n begin\r\n AUnderlineBeginPoint.X := AUnderlineBeginPoint.X + 1;\r\n AUnderlineEndPoint.X := AUnderlineEndPoint.X - 1;\r\n end\r\n else\r\n begin\r\n AUnderlineBeginPoint.X := AUnderlineBeginPoint.X + 1;\r\n AUnderlineEndPoint.X := AUnderlineEndPoint.X - 2;\r\n end;\r\n\r\n if AUnderlineBeginPoint.X <= AUnderlineEndPoint.X then\r\n AUnderlineEndPoint.X := AUnderlineEndPoint.X + 1;\r\n\r\n Result := True;\r\nend;\r\n\r\nprocedure DrawUnderline(ACanvas: TCanvas; ALayout: TTextLayout; AKeyIndex: Integer; const AColor: TAlphaColor; const AnOpacity: Single);\r\nvar\r\n ulb, ule: TPointF;\r\n b: TStrokeBrush;\r\nbegin\r\n if not ValidateUnderlinePoints(ACanvas, ALayout, AKeyIndex, ulb, ule) then\r\n Exit;\r\n\r\n b := TStrokeBrush.Create(TBrushKind.Solid, AColor);\r\n try\r\n ACanvas.DrawLine(ulb, ule, AnOpacity, b);\r\n finally\r\n b.Free;\r\n end;\r\nend;\r\n{$ENDIF}\r\n\r\nfunction TTMSFNCGraphicsContextGeneral.CalculateText(AText: string; ARect: TRectF;\r\n AWordWrapping: Boolean): TRectF;\r\n{$IFDEF CMNWEBLIB}\r\nvar\r\n {$IFDEF VCLLIB}\r\n r: TRect;\r\n dstyle: TTextFormat;\r\n {$ENDIF}\r\n {$IFDEF LCLLIB}\r\n r: TRect;\r\n dstyle: Word;\r\n {$ENDIF}\r\n {$IFDEF WEBLIB}\r\n r: TCanvasRectF;\r\n {$ENDIF}\r\n{$ENDIF}\r\n{$IFDEF FMXLIB}\r\nvar\r\n s: string;\r\n ki: Integer;\r\n k: Char;\r\n{$ENDIF}\r\nbegin\r\n {$IFDEF FMXLIB}\r\n Result := ARect;\r\n s := AText;\r\n {$IFDEF SUPPORTSACCELERATORS}\r\n ki := -1;\r\n if FShowAcceleratorChar and SupportsAcceleratorChar then\r\n begin\r\n ExtractAcceleratorKey(s, k, ki);\r\n s := DelAmp(s);\r\n end;\r\n {$ENDIF}\r\n\r\n {$IFDEF FMXWINDOWS}\r\n Result := CalculateTextWin(s, Result, AWordWrapping)\r\n {$ELSE}\r\n Canvas.MeasureText(Result, s, AWordWrapping, [], TTextAlign.Leading, TTextAlign.Leading)\r\n {$ENDIF}\r\n {$ENDIF}\r\n {$IFDEF CMNWEBLIB}\r\n {$IFDEF WEBLIB}\r\n r := CreateCanvasRectF(ARect.Left, ARect.Top, ARect.Right, ARect.Bottom);\r\n r := Canvas.TextRect(r, AText, AWordWrapping, True);\r\n {$ENDIF}\r\n {$IFDEF VCLLIB}\r\n r := Rect(Round(ARect.Left), Round(ARect.Top), Round(ARect.Right), Round(ARect.Bottom));\r\n dstyle := [tfCalcRect];\r\n if AWordWrapping then\r\n dstyle := dstyle + [tfWordBreak]\r\n else\r\n dstyle := dstyle + [tfSingleLine];\r\n\r\n if not FShowAcceleratorChar then\r\n dstyle := dstyle + [tfNoPrefix];\r\n\r\n Canvas.TextRect(r, AText, dstyle);\r\n {$ENDIF}\r\n {$IFDEF LCLLIB}\r\n r := Rect(Round(ARect.Left), Round(ARect.Top), Round(ARect.Right), Round(ARect.Bottom));\r\n dstyle := DT_CALCRECT;\r\n if AWordWrapping then\r\n dstyle := dstyle or DT_WORDBREAK\r\n else\r\n dstyle := dstyle or DT_SINGLELINE;\r\n\r\n if not FShowAcceleratorChar then\r\n dstyle := dstyle or DT_NOPREFIX;\r\n\r\n LCLIntF.DrawText(Canvas.Handle, PChar(AText), Length(AText), r, dstyle);\r\n {$ENDIF}\r\n Result := RectF(r.Left, r.Top, r.Right, r.Bottom);\r\n {$ENDIF}\r\nend;\r\n\r\nprocedure TTMSFNCGraphicsContextGeneral.ClipPath(APath: TTMSFNCGraphicsPath);\r\nbegin\r\n if Assigned(APath) then\r\n begin\r\n {$IFDEF WEBLIB}\r\n Canvas.PathBegin;\r\n ConvertToPath(APath);\r\n Canvas.Clip;\r\n {$ELSE}\r\n ClipRect(APath.GetBounds);\r\n {$ENDIF}\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCGraphicsContextGeneral.ClipRect(ARect: TRectF);\r\nbegin\r\n {$IFDEF FMXLIB}\r\n Canvas.IntersectClipRect(ARect);\r\n {$ENDIF}\r\n {$IFDEF CMNWEBLIB}\r\n {$IFDEF VCLLIB}\r\n IntersectClipRect(Canvas.Handle, Round(ARect.Left), Round(ARect.Top), Round(ARect.Right), Round(ARect.Bottom));\r\n {$ENDIF}\r\n {$IFDEF LCLLIB}\r\n Canvas.Clipping := True;\r\n Canvas.ClipRect := Rect(Round(ARect.Left), Round(ARect.Top), Round(ARect.Right), Round(ARect.Bottom));\r\n {$ENDIF}\r\n {$IFDEF WEBLIB}\r\n Canvas.ClipRect := CreateCanvasRectF(ARect.Left, ARect.Top, ARect.Right, ARect.Bottom);\r\n {$ENDIF}\r\n {$ENDIF}\r\nend;\r\n\r\nfunction TTMSFNCGraphicsContextGeneral.CreatePath: Pointer;\r\nbegin\r\n {$IFDEF FMXLIB}\r\n Result := TPathData.Create;\r\n {$ENDIF}\r\n {$IFDEF CMNLIB}\r\n {$IFDEF MSWINDOWS}\r\n Result := nil;\r\n {$ENDIF}\r\n {$ENDIF}\r\n {$IFDEF WEBLIB}\r\n Result := nil;\r\n {$ENDIF}\r\nend;\r\n\r\ndestructor TTMSFNCGraphicsContextGeneral.Destroy;\r\nbegin\r\n {$IFDEF FMXLIB}\r\n if Assigned(FTextLayout) then\r\n begin\r\n FTextLayout.Free;\r\n FTextLayout := nil;\r\n end;\r\n {$ENDIF}\r\n\r\n inherited;\r\nend;\r\n\r\nprocedure TTMSFNCGraphicsContextGeneral.DrawArc(AStroke: TTMSFNCGraphicsStroke; ACenter, ARadius: TPointF; AStartAngle, ASweepAngle: Single);\r\n{$IFDEF CMNWEBLIB}\r\nvar\r\n {$IFDEF CMNLIB}\r\n x, y, xs, ys, sx, sy, sxs, sys: Integer;\r\n {$ENDIF}\r\n bs: TBrushStyle;\r\n c: TTMSFNCGraphicsColor;\r\n{$ENDIF}\r\nbegin\r\n {$IFDEF FMXLIB}\r\n Canvas.DrawArc(ACenter, ARadius, AStartAngle, ASweepAngle, AStroke.Opacity);\r\n {$ENDIF}\r\n {$IFDEF CMNWEBLIB}\r\n {$IFNDEF WEBLIB}\r\n sx := Floor(ACenter.X - ARadius.X);\r\n sy := Floor(ACenter.Y - ARadius.Y);\r\n sxs := Floor(ACenter.X + ARadius.X);\r\n sys := Floor(ACenter.Y + ARadius.Y);\r\n\r\n x := Floor(ACenter.X + (ARadius.X * COS(DegToRad(-AStartAngle - ASweepAngle))));\r\n y := Floor(ACenter.Y - (ARadius.Y * SIN(DegToRad(-AStartAngle - ASweepAngle))));\r\n xs := Floor(ACenter.X + (ARadius.X * COS(DegToRad(-AStartAngle))));\r\n ys := Floor(ACenter.Y - (ARadius.Y * SIN(DegToRad(- AStartAngle))));\r\n {$ENDIF}\r\n c := Canvas.Brush.Color;\r\n bs := Canvas.Brush.Style;\r\n Canvas.Brush.Style := bsClear;\r\n {$IFNDEF WEBLIB}\r\n Canvas.Arc(sx, sy, sxs, sys, x, y, xs, ys);\r\n {$ENDIF}\r\n {$IFDEF WEBLIB}\r\n Canvas.AngleArc(ACenter.X, ACenter.Y, ARadius.X, DegToRad(AStartAngle), DegToRad(ASweepAngle));\r\n {$ENDIF}\r\n Canvas.Brush.Style := bs;\r\n Canvas.Brush.Color := c;\r\n {$ENDIF}\r\nend;\r\n\r\nprocedure TTMSFNCGraphicsContextGeneral.DrawBitmap(ABitmap: TTMSFNCDrawBitmap; ASrcRect, ADstRect: TRectF; AOpacity: Single);\r\nbegin\r\n {$IFDEF FMXLIB}\r\n Canvas.DrawBitmap(ABitmap, ASrcRect, ADstRect, AOpacity, True);\r\n {$ENDIF}\r\n {$IFDEF CMNWEBLIB}\r\n {$IFDEF WEBLIB}\r\n Canvas.StretchDraw(CreateCanvasRectF(ADstRect.Left, ADstRect.Top, ADstRect.Right, ADstRect.Bottom), ABitmap);\r\n {$ENDIF}\r\n {$IFNDEF WEBLIB}\r\n Canvas.StretchDraw(Bounds(Round(ADstRect.Left), Round(ADstRect.Top), Round(ADstRect.Right - ADstRect.Left), Round(ADstRect.Bottom - ADstRect.Top)), ABitmap);\r\n {$ENDIF}\r\n {$ENDIF}\r\nend;\r\n\r\nprocedure TTMSFNCGraphicsContextGeneral.DrawEllipse(AStroke: TTMSFNCGraphicsStroke; ARect: TRectF;\r\n AModifyRectMode: TTMSFNCGraphicsModifyRectMode);\r\nvar\r\n{$IFDEF FMXLIB}\r\n r: TRectF;\r\n{$ENDIF}\r\n{$IFDEF CMNWEBLIB}\r\n{$IFDEF WEBLIB}\r\n r: TCanvasRectF;\r\n{$ENDIF}\r\n{$IFNDEF WEBLIB}\r\n r: TRect;\r\n{$ENDIF}\r\n bs: TBrushStyle;\r\n c: TTMSFNCGraphicsColor;\r\n{$ENDIF}\r\nbegin\r\n ARect := ModifyRect(ARect, AModifyRectMode);\r\n {$IFDEF FMXLIB}\r\n r := ARect;\r\n Canvas.DrawEllipse(r, AStroke.Opacity);\r\n {$ENDIF}\r\n {$IFDEF CMNWEBLIB}\r\n {$IFDEF WEBLIB}\r\n r := CreateCanvasRectF(ARect.Left, ARect.Top, ARect.Right, ARect.Bottom);\r\n {$ENDIF}\r\n {$IFNDEF WEBLIB}\r\n r := Rect(Round(ARect.Left), Round(ARect.Top), Round(ARect.Right), Round(ARect.Bottom));\r\n {$ENDIF}\r\n c := Canvas.Brush.Color;\r\n bs := Canvas.Brush.Style;\r\n Canvas.Brush.Style := bsClear;\r\n Canvas.Ellipse(r);\r\n Canvas.Brush.Style := bs;\r\n Canvas.Brush.Color := c;\r\n {$ENDIF}\r\nend;\r\n\r\nprocedure TTMSFNCGraphicsContextGeneral.DrawFocusPath(AStroke: TTMSFNCGraphicsStroke; APath: TTMSFNCGraphicsPath; AColor: TTMSFNCGraphicsColor);\r\n{$IFDEF CMNWEBLIB}\r\nvar\r\n bs: TBrushStyle;\r\n c: TTMSFNCGraphicsColor;\r\n{$ENDIF}\r\nbegin\r\n {$IFDEF FMXLIB}\r\n Canvas.Stroke.Kind := TBrushKind.Solid;\r\n Canvas.Stroke.Color := AColor;\r\n {$HINTS OFF}\r\n {$IF COMPILERVERSION > 31}\r\n Canvas.Stroke.Dash := TStrokeDash.Dot;\r\n {$ELSE}\r\n Canvas.StrokeDash := TStrokeDash.Dot;\r\n {$IFEND}\r\n {$HINTS ON}\r\n DrawPath(AStroke, APath);\r\n {$ENDIF}\r\n {$IFDEF CMNWEBLIB}\r\n c := Canvas.Brush.Color;\r\n bs := Canvas.Brush.Style;\r\n Canvas.Brush.Style := bsClear;\r\n Canvas.Pen.Color := AColor;\r\n StartSpecialPen;\r\n DrawPath(AStroke, APath);\r\n StopSpecialPen;\r\n Canvas.Brush.Color := c;\r\n Canvas.Brush.Style := bs;\r\n {$ENDIF}\r\nend;\r\n\r\nprocedure TTMSFNCGraphicsContextGeneral.DrawFocusRectangle(AStroke: TTMSFNCGraphicsStroke; ARect: TRectF; AColor: TTMSFNCGraphicsColor; AModifyRectMode: TTMSFNCGraphicsModifyRectMode);\r\nvar\r\n{$IFDEF FMXLIB}\r\n r: TRectF;\r\n{$ENDIF}\r\n{$IFDEF CMNWEBLIB}\r\n{$IFDEF WEBLIB}\r\n r: TCanvasRectF;\r\n{$ENDIF}\r\n{$IFNDEF WEBLIB}\r\n r: TRect;\r\n{$ENDIF}\r\n c: TTMSFNCGraphicsColor;\r\n bs: TBrushStyle;\r\n{$ENDIF}\r\nbegin\r\n ARect := ModifyRect(ARect, AModifyRectMode);\r\n {$IFDEF FMXLIB}\r\n r := ARect;\r\n Canvas.Stroke.Thickness := 1;\r\n Canvas.Stroke.Kind := TBrushKind.Solid;\r\n Canvas.Stroke.Color := AColor;\r\n {$HINTS OFF}\r\n {$IF COMPILERVERSION > 31}\r\n Canvas.Stroke.Dash := TStrokeDash.Dot;\r\n {$ELSE}\r\n Canvas.StrokeDash := TStrokeDash.Dot;\r\n {$IFEND}\r\n {$HINTS ON}\r\n Canvas.DrawRect(r, 0, 0, AllCorners, 1);\r\n {$ENDIF}\r\n {$IFDEF CMNWEBLIB}\r\n {$IFDEF WEBLIB}\r\n r := CreateCanvasRectF(ARect.Left, ARect.Top, ARect.Right, ARect.Bottom);\r\n {$ENDIF}\r\n {$IFNDEF WEBLIB}\r\n r := Rect(Round(ARect.Left), Round(ARect.Top), Round(ARect.Right), Round(ARect.Bottom));\r\n {$ENDIF}\r\n c := Canvas.Brush.Color;\r\n bs := Canvas.Brush.Style;\r\n Canvas.Brush.Style := bsClear;\r\n Canvas.Pen.Color := AColor;\r\n StartSpecialPen;\r\n Canvas.Rectangle(r);\r\n StopSpecialPen;\r\n Canvas.Brush.Color := c;\r\n Canvas.Brush.Style := bs;\r\n {$ENDIF}\r\nend;\r\n\r\nprocedure TTMSFNCGraphicsContextGeneral.DrawLine(AStroke: TTMSFNCGraphicsStroke; AFromPoint, AToPoint: TPointF;\r\n AModifyPointModeFrom, AModifyPointModeTo: TTMSFNCGraphicsModifyPointMode);\r\nbegin\r\n {$IFDEF FMXLIB}\r\n AFromPoint := ModifyPoint(AFromPoint, AModifyPointModeFrom);\r\n AToPoint := ModifyPoint(AToPoint, AModifyPointModeTo);\r\n Canvas.DrawLine(AFromPoint, AToPoint, AStroke.Opacity);\r\n {$ENDIF}\r\n {$IFDEF CMNWEBLIB}\r\n {$IFDEF WEBLIB}\r\n Canvas.MoveTo(AFromPoint.X, AFromPoint.Y);\r\n Canvas.LineTo(AToPoint.X, AToPoint.Y);\r\n {$ENDIF}\r\n {$IFNDEF WEBLIB}\r\n Canvas.MoveTo(Round(AFromPoint.X), Round(AFromPoint.Y));\r\n Canvas.LineTo(Round(AToPoint.X), Round(AToPoint.Y));\r\n {$ENDIF}\r\n {$ENDIF}\r\nend;\r\n\r\nprocedure TTMSFNCGraphicsContextGeneral.DrawPath(AStroke: TTMSFNCGraphicsStroke; APath: TTMSFNCGraphicsPath;\r\n APathMode: TTMSFNCGraphicsPathDrawMode = pdmPolygon);\r\nvar\r\n p: TTMSFNCGraphicsPathPolygon;\r\n {$IFDEF FMXLIB}\r\n pth: TPathData;\r\n {$ENDIF}\r\nbegin\r\n if Assigned(APath) then\r\n begin\r\n if APathMode = pdmPath then\r\n begin\r\n {$IFDEF FMXLIB}\r\n pth := TPathData(ConvertToPath(APath));\r\n try\r\n Canvas.DrawPath(pth, AStroke.Opacity);\r\n finally\r\n pth.Free;\r\n end;\r\n {$ENDIF}\r\n {$IFDEF CMNLIB}\r\n {$IFDEF MSWINDOWS}\r\n BeginPath(Canvas.Handle);\r\n ConvertToPath(APath);\r\n EndPath(Canvas.Handle);\r\n Windows.StrokePath(Canvas.Handle);\r\n AbortPath(Canvas.Handle);\r\n {$ENDIF}\r\n {$ENDIF}\r\n {$IFDEF WEBLIB}\r\n Canvas.PathBegin;\r\n ConvertToPath(APath);\r\n Canvas.PathStroke;\r\n {$ENDIF}\r\n end\r\n else\r\n begin\r\n SetLength(p, 0);\r\n APath.FlattenToPolygon(p);\r\n case APathMode of\r\n pdmPolygon: DrawPolygon(AStroke, p);\r\n pdmPolyline: DrawPolyline(AStroke, p);\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCGraphicsContextGeneral.DrawPolygon(AStroke: TTMSFNCGraphicsStroke; APolygon: TTMSFNCGraphicsPathPolygon);\r\n{$IFDEF CMNWEBLIB}\r\nvar\r\n{$IFDEF WEBLIB}\r\n pts: array of TCanvasPointF;\r\n{$ENDIF}\r\n{$IFNDEF WEBLIB}\r\n pts: array of TPoint;\r\n{$ENDIF}\r\n I: Integer;\r\n bs: TBrushStyle;\r\n c: TTMSFNCGraphicsColor;\r\n{$ENDIF}\r\nbegin\r\n {$IFDEF FMXLIB}\r\n Canvas.DrawPolygon(TPolygon(APolygon), AStroke.Opacity);\r\n {$ENDIF}\r\n {$IFDEF CMNWEBLIB}\r\n SetLength(pts, Length(APolygon));\r\n for I := 0 to Length(APolygon) - 1 do\r\n begin\r\n {$IFDEF WEBLIB}\r\n pts[I] := CreateCanvasPointF(APolygon[I].X, APolygon[I].Y);\r\n {$ENDIF}\r\n {$IFNDEF WEBLIB}\r\n pts[I] := Point(Round(APolygon[I].X), Round(APolygon[I].Y));\r\n {$ENDIF}\r\n end;\r\n\r\n c := Canvas.Brush.Color;\r\n bs := Canvas.Brush.Style;\r\n Canvas.Brush.Style := bsClear;\r\n Canvas.Polygon(pts);\r\n Canvas.Brush.Style := bs;\r\n Canvas.Brush.Color := c;\r\n {$ENDIF}\r\nend;\r\n\r\nprocedure TTMSFNCGraphicsContextGeneral.DrawPolyline(AStroke: TTMSFNCGraphicsStroke; APolyline: TTMSFNCGraphicsPathPolygon);\r\nvar\r\n I: Integer;\r\n{$IFDEF CMNWEBLIB}\r\n{$IFDEF WEBLIB}\r\n pts: array of TCanvasPointF;\r\n{$ENDIF}\r\n{$IFNDEF WEBLIB}\r\n pts: array of TPoint;\r\n{$ENDIF}\r\n bs: TBrushStyle;\r\n c: TTMSFNCGraphicsColor;\r\n{$ENDIF}\r\nbegin\r\n {$IFDEF FMXLIB}\r\n for I := 0 to High(APolyline) - 1 do\r\n DrawLine(AStroke, APolyline[I], APolyline[I + 1]);\r\n {$ENDIF}\r\n {$IFDEF CMNWEBLIB}\r\n SetLength(pts, Length(APolyline));\r\n for I := 0 to Length(APolyline) - 1 do\r\n begin\r\n {$IFDEF WEBLIB}\r\n pts[I] := CreateCanvasPointF(APolyline[I].X, APolyline[I].Y);\r\n {$ENDIF}\r\n {$IFNDEF WEBLIB}\r\n pts[I] := Point(Round(APolyline[I].X), Round(APolyline[I].Y));\r\n {$ENDIF}\r\n end;\r\n\r\n c := Canvas.Brush.Color;\r\n bs := Canvas.Brush.Style;\r\n Canvas.Brush.Style := bsClear;\r\n Canvas.Polyline(pts);\r\n Canvas.Brush.Style := bs;\r\n Canvas.Brush.Color := c;\r\n {$ENDIF}\r\nend;\r\n\r\nprocedure TTMSFNCGraphicsContextGeneral.DrawRect(AStroke: TTMSFNCGraphicsStroke; ARect: TRectF; ASides: TTMSFNCGraphicsSides; AModifyRectMode: TTMSFNCGraphicsModifyRectMode);\r\nvar\r\n{$IFDEF FMXWEBLIB}\r\n r: TRectF;\r\n{$ENDIF}\r\n{$IFDEF CMNLIB}\r\n r: TRect;\r\n{$ENDIF}\r\nbegin\r\n ARect := ModifyRect(ARect, AModifyRectMode);\r\n {$IFDEF FMXWEBLIB}\r\n r := ARect;\r\n if gsTop in ASides then\r\n DrawLine(AStroke, PointF(r.Left, r.Top), PointF(r.Right, r.Top));\r\n if gsLeft in ASides then\r\n DrawLine(AStroke, PointF(r.Left, r.Top), PointF(r.Left, r.Bottom));\r\n if gsBottom in ASides then\r\n DrawLine(AStroke, PointF(r.Left, r.Bottom), PointF(r.Right, r.Bottom));\r\n if gsRight in ASides then\r\n DrawLine(AStroke, PointF(r.Right, r.Top), PointF(r.Right, r.Bottom));\r\n {$ENDIF}\r\n {$IFDEF CMNLIB}\r\n r := Rect(Round(ARect.Left), Round(ARect.Top), Round(ARect.Right), Round(ARect.Bottom));\r\n if gsTop in ASides then\r\n DrawLine(AStroke, PointF(r.Left, r.Top), PointF(r.Right - 1, r.Top));\r\n if gsLeft in ASides then\r\n DrawLine(AStroke, PointF(r.Left, r.Top), PointF(r.Left, r.Bottom - 1));\r\n if gsBottom in ASides then\r\n DrawLine(AStroke, PointF(r.Left, r.Bottom - 1), PointF(r.Right - 1, r.Bottom - 1));\r\n if gsRight in ASides then\r\n DrawLine(AStroke, PointF(r.Right - 1, r.Top), PointF(r.Right - 1, r.Bottom));\r\n {$ENDIF}\r\nend;\r\n\r\nprocedure TTMSFNCGraphicsContextGeneral.DrawRoundRect(AStroke: TTMSFNCGraphicsStroke; ARect: TRectF; ARounding: Single;\r\n ACorners: TTMSFNCGraphicsCorners; AModifyRectMode: TTMSFNCGraphicsModifyRectMode);\r\nvar\r\n{$IFDEF FMXLIB}\r\n r: TRectF;\r\n c: TCorners;\r\n{$ENDIF}\r\n{$IFDEF CMNWEBLIB}\r\n {$IFDEF WEBLIB}\r\n r, rg: TCanvasRectF;\r\n rc: Single;\r\n {$ENDIF}\r\n {$IFNDEF WEBLIB}\r\n r, rg: TRect;\r\n rc: Integer;\r\n {$ENDIF}\r\n cl: TTMSFNCGraphicsColor;\r\n bs: TBrushStyle;\r\n\r\n {$IFDEF WEBLIB}\r\n procedure CanvasArc(ACanvas: TCanvas; Center, Radius: TPointF; StartAngle, SweepAngle: Integer);\r\n begin\r\n ACanvas.AngleArc(Center.X, Center.Y, Radius.X, DegToRad(StartAngle), DegToRad(SweepAngle));\r\n {$ENDIF}\r\n {$IFNDEF WEBLIB}\r\n procedure CanvasArc(ACanvas: TCanvas; Center, Radius: TPoint; StartAngle, SweepAngle: Integer);\r\n var\r\n sx, sy, sxs, sys, x, y, xs, ys: Integer;\r\n begin\r\n sx := Center.X - Radius.X;\r\n sy := Center.Y - Radius.Y;\r\n sxs := Center.X + Radius.X;\r\n sys := Center.Y + Radius.Y;\r\n\r\n x := Center.X + Round(Radius.X * COS(DegToRad(-StartAngle - SweepAngle)));\r\n y := Center.Y - Round(Radius.Y * SIN(DegToRad(-StartAngle - SweepAngle)));\r\n xs := Center.X + Round(Radius.X * COS(DegToRad(-StartAngle)));\r\n ys := Center.Y - Round(Radius.Y * SIN(DegToRad(- StartAngle)));\r\n\r\n ACanvas.Arc(sx, sy, sxs, sys, x, y, xs, ys);\r\n {$ENDIF}\r\n end;\r\n{$ENDIF}\r\nbegin\r\n ARect := ModifyRect(ARect, AModifyRectMode);\r\n {$IFDEF FMXLIB}\r\n r := ARect;\r\n\r\n c := [];\r\n if gcTopLeft in ACorners then\r\n c := c + [TCorner.TopLeft];\r\n\r\n if gcTopRight in ACorners then\r\n c := c + [TCorner.TopRight];\r\n\r\n if gcBottomLeft in ACorners then\r\n c := c + [TCorner.BottomLeft];\r\n\r\n if gcBottomRight in ACorners then\r\n c := c + [TCorner.BottomRight];\r\n\r\n Canvas.DrawRect(r, ARounding, ARounding, c, AStroke.Opacity);\r\n {$ENDIF}\r\n {$IFDEF CMNWEBLIB}\r\n {$IFDEF WEBLIB}\r\n r := CreateCanvasRectF(ARect.Left, ARect.Top, ARect.Right, ARect.Bottom);\r\n {$ENDIF}\r\n {$IFNDEF WEBLIB}\r\n r := Rect(Round(ARect.Left), Round(ARect.Top), Round(ARect.Right), Round(ARect.Bottom));\r\n {$ENDIF}\r\n\r\n rg := r;\r\n rg.Bottom := rg.Bottom - 1;\r\n rg.Right := rg.Right - 1;\r\n\r\n cl := Canvas.Brush.Color;\r\n bs := Canvas.Brush.Style;\r\n Canvas.Brush.Style := bsClear;\r\n\r\n rc := Round(ARounding);\r\n if ACorners = [gcTopLeft, gcTopRight, gcBottomLeft, gcBottomRight] then\r\n Canvas.RoundRect(r, rc * 2, rc * 2)\r\n else if ACorners = [] then\r\n Canvas.Rectangle(r)\r\n else\r\n begin\r\n {$IFNDEF WEBLIB}\r\n r.Right := r.Right - 1;\r\n r.Bottom := r.Bottom - 1;\r\n rc := rc - 1;\r\n {$ENDIF}\r\n if gcBottomLeft in ACorners then\r\n begin\r\n Canvas.MoveTo(r.Left + rc, r.Bottom);\r\n {$IFDEF WEBLIB}\r\n CanvasArc(Canvas, PointF(r.Left + rc, r.Bottom - rc), PointF(rc, rc), -270, 90);\r\n {$ENDIF}\r\n {$IFNDEF WEBLIB}\r\n CanvasArc(Canvas, Point(r.Left + rc, r.Bottom - rc), Point(rc, rc), -270, 90);\r\n {$ENDIF}\r\n Canvas.MoveTo(r.Left, r.Bottom - rc);\r\n end\r\n else\r\n begin\r\n Canvas.MoveTo(r.Left, r.Bottom);\r\n end;\r\n\r\n if gcTopLeft in ACorners then\r\n begin\r\n {$IFDEF WEBLIB}\r\n Canvas.LineTo(r.Left, r.Top + rc);\r\n CanvasArc(Canvas, PointF(r.Left + rc, r.Top + rc), PointF(rc, rc), -180, 90);\r\n {$ENDIF}\r\n {$IFNDEF WEBLIB}\r\n Canvas.LineTo(r.Left, r.Top + rc - 2);\r\n CanvasArc(Canvas, Point(r.Left + rc, r.Top + rc), Point(rc, rc), -180, 90);\r\n {$ENDIF}\r\n Canvas.MoveTo(r.Left + rc, r.Top);\r\n end\r\n else\r\n Canvas.LineTo(r.Left, r.Top);\r\n\r\n if gcTopRight in ACorners then\r\n begin\r\n Canvas.LineTo(r.Right - rc, r.Top);\r\n {$IFDEF WEBLIB}\r\n CanvasArc(Canvas, PointF(r.Right - rc, r.Top + rc), PointF(rc, rc), -90, 90);\r\n {$ENDIF}\r\n {$IFNDEF WEBLIB}\r\n CanvasArc(Canvas, Point(r.Right - rc, r.Top + rc), Point(rc, rc), -90, 90);\r\n {$ENDIF}\r\n Canvas.MoveTo(r.Right, r.Top + rc);\r\n end\r\n else\r\n Canvas.LineTo(r.Right, r.Top);\r\n\r\n if gcBottomRight in ACorners then\r\n begin\r\n {$IFDEF WEBLIB}\r\n Canvas.LineTo(r.Right, r.Bottom - rc);\r\n CanvasArc(Canvas, PointF(r.Right - rc, r.Bottom - rc), PointF(rc, rc), 0, 90);\r\n {$ENDIF}\r\n {$IFNDEF WEBLIB}\r\n Canvas.LineTo(r.Right, r.Bottom - rc + 1);\r\n CanvasArc(Canvas, Point(r.Right - rc, r.Bottom - rc + 1), Point(rc, rc), 0, 90);\r\n {$ENDIF}\r\n Canvas.MoveTo(r.Right - rc, r.Bottom);\r\n end\r\n else\r\n begin\r\n Canvas.LineTo(r.Right, r.Bottom);\r\n end;\r\n\r\n if gcBottomLeft in ACorners then\r\n begin\r\n {$IFDEF WEBLIB}\r\n Canvas.LineTo(r.Left + rc, r.Bottom)\r\n {$ENDIF}\r\n {$IFNDEF WEBLIB}\r\n Canvas.LineTo(r.Left + rc - 2, r.Bottom)\r\n {$ENDIF}\r\n end\r\n else\r\n Canvas.LineTo(r.Left, r.Bottom);\r\n end;\r\n\r\n Canvas.Brush.Color := cl;\r\n Canvas.Brush.Style := bs;\r\n {$ENDIF}\r\nend;\r\n\r\nprocedure TTMSFNCGraphicsContextGeneral.DrawText(AText: string; ARect: TRectF;\r\n AWordWrapping: Boolean; AHorizontalAlign,\r\n AVerticalAlign: TTMSFNCGraphicsTextAlign;\r\n ATrimming: TTMSFNCGraphicsTextTrimming; AAngle: Single);\r\n{$IFDEF CMNWEBLIB}\r\nvar\r\n rcalc: TRectF;\r\n rh: Integer;\r\n {$IFDEF WEBLIB}\r\n r: TRectF;\r\n st: TTMSFNCGraphicsSaveState;\r\n {$ENDIF}\r\n {$IFNDEF WEBLIB}\r\n r: TRect;\r\n {$ENDIF}\r\n {$IFDEF LCLLIB}\r\n {%H-}dstyle: TTextStyle;\r\n {$IFNDEF MSWINDOWS} \r\n crr: TRect;\r\n {$ENDIF}\r\n {$ENDIF}\r\n {$IFDEF VCLLIB}\r\n dstyle: TTextFormat;\r\n {$ENDIF}\r\n c: TTMSFNCGraphicsColor;\r\n bs: TBrushStyle;\r\n{$ENDIF}\r\n{$IFDEF FMXLIB}\r\nvar\r\n ha, va: TTextAlign;\r\n s: string;\r\n {$IFDEF SUPPORTSACCELERATORS}\r\n k: Char;\r\n ki: Integer;\r\n {$ENDIF}\r\n\r\n{$ENDIF}\r\n\r\nbegin\r\n {$IFDEF FMXLIB}\r\n if FPrinting then\r\n begin\r\n ha := TTextAlign.Leading;\r\n va := TTextAlign.Leading;\r\n\r\n case AHorizontalAlign of\r\n gtaCenter: ha := TTextAlign.Center;\r\n gtaTrailing: ha := TTextAlign.Trailing;\r\n end;\r\n\r\n case AVerticalAlign of\r\n gtaCenter: va := TTextAlign.Center;\r\n gtaTrailing: va := TTextAlign.Trailing;\r\n end;\r\n\r\n Canvas.FillText(ARect, AText, AWordWrapping, 255, [], ha, va);\r\n\r\n Exit;\r\n end;\r\n {$ENDIF}\r\n\r\n {$IFDEF FMXLIB}\r\n s := AText;\r\n {$IFDEF SUPPORTSACCELERATORS}\r\n ki := -1;\r\n if FShowAcceleratorChar and SupportsAcceleratorChar then\r\n begin\r\n ExtractAcceleratorKey(s, k, ki);\r\n s := DelAmp(s);\r\n end;\r\n {$ENDIF}\r\n\r\n if not Assigned(FTextLayout) then\r\n FTextLayout := TTextLayoutManager.DefaultTextLayout.Create(Canvas);\r\n\r\n FTextLayout.BeginUpdate;\r\n try\r\n FTextLayout.TopLeft := PointF(Round(ARect.Left), Round(ARect.Top));\r\n FTextLayout.Text := s;\r\n FTextLayout.MaxSize := PointF(Round(ARect.Width), Round(ARect.Height));\r\n FTextLayout.WordWrap := AWordWrapping;\r\n FTextLayout.Opacity := 1;\r\n FTextLayout.HorizontalAlign := TTextAlign(Integer(AHorizontalAlign));\r\n FTextLayout.VerticalAlign := TTextAlign(Integer(AVerticalAlign));\r\n FTextLayout.Font.Assign(Canvas.Font);\r\n FTextLayout.Color := Canvas.Fill.Color;\r\n if not AWordWrapping then\r\n FTextLayout.Trimming := TTextTrimming(Integer(ATrimming))\r\n else\r\n FTextLayout.Trimming := TTextTrimming.None;\r\n finally\r\n FTextLayout.EndUpdate;\r\n end;\r\n FTextLayout.RenderLayout(Canvas);\r\n\r\n {$IFDEF SUPPORTSACCELERATORS}\r\n if ki >= 0 then\r\n DrawUnderline(Canvas, FTextLayout, ki, FTextLayout.Color, FTextLayout.Opacity);\r\n {$ENDIF}\r\n\r\n {$ENDIF}\r\n\r\n {$IFDEF CMNWEBLIB}\r\n c := Canvas.Brush.Color;\r\n bs := Canvas.Brush.Style;\r\n Canvas.Brush.Style := bsClear;\r\n\r\n {$IFDEF WEBLIB}\r\n r := RectF(ARect.Left, ARect.Top, ARect.Right, ARect.Bottom);\r\n {$ENDIF}\r\n {$IFNDEF WEBLIB}\r\n r := Rect(Round(ARect.Left), Round(ARect.Top), Round(ARect.Right), Round(ARect.Bottom));\r\n {$ENDIF}\r\n {$IFDEF VCLLIB}\r\n dstyle := [];\r\n if AWordWrapping then\r\n dstyle := dstyle + [tfWordBreak]\r\n else\r\n dstyle := dstyle + [tfSingleLine];\r\n\r\n if not FShowAcceleratorChar then\r\n dstyle := dstyle + [tfNoPrefix];\r\n\r\n case AHorizontalAlign of\r\n gtaCenter: dstyle := dstyle + [tfCenter];\r\n gtaLeading: dstyle := dstyle + [tfLeft];\r\n gtaTrailing: dstyle := dstyle + [tfRight];\r\n end;\r\n\r\n case AVerticalAlign of\r\n gtaCenter: dstyle := dstyle + [tfVerticalCenter];\r\n gtaLeading: dstyle := dstyle + [tfTop];\r\n gtaTrailing: dstyle := dstyle + [tfBottom];\r\n end;\r\n\r\n case ATrimming of\r\n gttCharacter: dstyle := dstyle + [tfEndEllipsis];\r\n {$HINTS OFF}\r\n {$IF COMPILERVERSION > 22}\r\n gttWord: dstyle := dstyle + [tfWordEllipsis];\r\n {$IFEND}\r\n {$HINTS ON}\r\n end;\r\n {$ENDIF}\r\n\r\n {$IFDEF LCLLIB}\r\n dStyle.RightToLeft := False;\r\n dStyle.WordBreak := AWordWrapping;\r\n dStyle.SingleLine := not AWordWrapping;\r\n dStyle.Clipping := True;\r\n dStyle.EndEllipsis := False;\r\n dStyle.SystemFont := False;\r\n dStyle.ShowPrefix := FShowAcceleratorChar;\r\n\r\n case AHorizontalAlign of\r\n gtaCenter: dstyle.Alignment := taCenter;\r\n gtaLeading: dstyle.Alignment := taLeftJustify;\r\n gtaTrailing: dstyle.Alignment := taRightJustify;\r\n end;\r\n\r\n case AVerticalAlign of\r\n gtaCenter: dstyle.Layout := tlCenter;\r\n gtaLeading: dstyle.Layout := tlTop;\r\n gtaTrailing: dstyle.Layout := tlBottom;\r\n end;\r\n\r\n case ATrimming of\r\n gttCharacter: dstyle.EndEllipsis := True;\r\n end;\r\n {$ENDIF}\r\n\r\n if AWordWrapping then\r\n begin\r\n case AVerticalAlign of\r\n gtaCenter:\r\n begin\r\n rcalc := CalculateText(AText, ARect, AWordWrapping);\r\n rh := Round(rcalc.Bottom - rcalc.Top);\r\n {$IFDEF WEBLIB}\r\n r.Top := r.Top + Max(0, ((r.Bottom - r.Top) - rh) / 2);\r\n {$ENDIF}\r\n {$IFNDEF WEBLIB}\r\n r.Top := r.Top + Max(0, ((r.Bottom - r.Top) - rh) div 2);\r\n {$ENDIF}\r\n r.Bottom := Max(0, Min(Round(ARect.Bottom), r.Top + rh));\r\n end;\r\n gtaTrailing:\r\n begin\r\n rcalc := CalculateText(AText, ARect, AWordWrapping);\r\n rh := Round(rcalc.Bottom - rcalc.Top);\r\n r.Top := r.Bottom - rh;\r\n r.Bottom := r.Top + rh;\r\n end;\r\n end;\r\n end;\r\n\r\n if AAngle <> 0 then\r\n DrawRotatedText(Canvas, r, AText, AAngle, AHorizontalAlign, AVerticalAlign)\r\n else\r\n begin\r\n {$IFDEF GDIPLUSDRAWING}\r\n b := CreateGDIPFontFill(Font);\r\n ft := CreateGDIPFont(Font);\r\n sf := CreateGPStringFormat(AHorizontalAlign, AVerticalAlign, AWordWrapping);\r\n try\r\n rt := MakeRect(ARect.Left, ARect.Top, ARect.Width, ARect.Height);\r\n FGDIPCanvas.DrawString(AText, Length(AText), ft, rt, sf, b);\r\n finally\r\n sf.Free;\r\n ft.Free;\r\n b.Free;\r\n end;\r\n {$ENDIF}\r\n {$IFNDEF GDIPLUSDRAWING}\r\n {$IFDEF WEBLIB}\r\n st := TTMSFNCGraphicsSaveState.Create;\r\n try\r\n SaveState(st);\r\n ClipRect(r);\r\n case AHorizontalAlign of\r\n gtaLeading:\r\n begin\r\n case AVerticalAlign of\r\n gtaLeading: Canvas.TextRect(CreateCanvasRectF(r.Left, r.Top, r.Right, r.Bottom), AText, AWordWrapping, False, taLeftJustify, taAlignTop);\r\n gtaCenter: Canvas.TextRect(CreateCanvasRectF(r.Left, r.Top, r.Right, r.Bottom), AText, AWordWrapping, False, taLeftJustify, taVerticalCenter);\r\n gtaTrailing: Canvas.TextRect(CreateCanvasRectF(r.Left, r.Top, r.Right, r.Bottom), AText, AWordWrapping, False, taLeftJustify, taAlignBottom);\r\n end;\r\n end;\r\n gtaCenter:\r\n begin\r\n case AVerticalAlign of\r\n gtaLeading: Canvas.TextRect(CreateCanvasRectF(r.Left, r.Top, r.Right, r.Bottom), AText, AWordWrapping, False, taCenter, taAlignTop);\r\n gtaCenter: Canvas.TextRect(CreateCanvasRectF(r.Left, r.Top, r.Right, r.Bottom), AText, AWordWrapping, False, taCenter, taVerticalCenter);\r\n gtaTrailing: Canvas.TextRect(CreateCanvasRectF(r.Left, r.Top, r.Right, r.Bottom), AText, AWordWrapping, False, taCenter, taAlignBottom);\r\n end;\r\n end;\r\n gtaTrailing:\r\n begin\r\n case AVerticalAlign of\r\n gtaLeading: Canvas.TextRect(CreateCanvasRectF(r.Left, r.Top, r.Right, r.Bottom), AText, AWordWrapping, False, taRightJustify, taAlignTop);\r\n gtaCenter: Canvas.TextRect(CreateCanvasRectF(r.Left, r.Top, r.Right, r.Bottom), AText, AWordWrapping, False, taRightJustify, taVerticalCenter);\r\n gtaTrailing: Canvas.TextRect(CreateCanvasRectF(r.Left, r.Top, r.Right, r.Bottom), AText, AWordWrapping, False, taRightJustify, taAlignBottom);\r\n end;\r\n end;\r\n end;\r\n finally\r\n RestoreState(st);\r\n end;\r\n {$ENDIF}\r\n {$IFDEF VCLLIB}\r\n Canvas.TextRect(r, AText, dstyle);\r\n {$ENDIF}\r\n {$IFDEF LCLLIB}\r\n {$IFNDEF MSWINDOWS}\r\n crr := Rect(0, 0, 0, 0);\r\n if not Canvas.Clipping or (IntersectRect(crr, Canvas.ClipRect, r) and Canvas.Clipping) then\r\n {$ENDIF}\r\n Canvas.TextRect(r, r.Left, r.Top, AText, dstyle);\r\n {$ENDIF}\r\n {$ENDIF}\r\n end;\r\n\r\n Canvas.Brush.Color := c;\r\n Canvas.Brush.Style := bs;\r\n {$ENDIF}\r\nend;\r\n\r\nprocedure TTMSFNCGraphicsContextGeneral.EndPrinting;\r\nbegin\r\n if FPrinting then\r\n FPrinting := False;\r\nend;\r\n\r\nprocedure TTMSFNCGraphicsContextGeneral.EndScene;\r\nbegin\r\n {$IFDEF FMXWEBLIB}\r\n Canvas.EndScene;\r\n {$ENDIF}\r\nend;\r\n\r\nprocedure TTMSFNCGraphicsContextGeneral.FillArc(AFill: TTMSFNCGraphicsFill; ACenter, ARadius: TPointF; AStartAngle, ASweepAngle: Single);\r\n{$IFDEF CMNWEBLIB}\r\nvar\r\n {$IFNDEF WEBLIB}\r\n x, y, xs, ys, sx, sy, sxs, sys: Integer;\r\n {$ENDIF}\r\n ps: TPenStyle;\r\n{$ENDIF}\r\nbegin\r\n {$IFDEF FMXLIB}\r\n Canvas.FillArc(ACenter, ARadius, AStartAngle, ASweepAngle, AFill.Opacity);\r\n {$ENDIF}\r\n {$IFDEF CMNWEBLIB}\r\n {$IFNDEF WEBLIB}\r\n sx := Floor(ACenter.X - ARadius.X);\r\n sy := Floor(ACenter.Y - ARadius.Y);\r\n sxs := Floor(ACenter.X + ARadius.X);\r\n sys := Floor(ACenter.Y + ARadius.Y);\r\n\r\n x := Floor(ACenter.X + (ARadius.X * COS(DegToRad(-AStartAngle - ASweepAngle))));\r\n y := Floor(ACenter.Y - (ARadius.Y * SIN(DegToRad(-AStartAngle - ASweepAngle))));\r\n xs := Floor(ACenter.X + (ARadius.X * COS(DegToRad(-AStartAngle))));\r\n ys := Floor(ACenter.Y - (ARadius.Y * SIN(DegToRad(- AStartAngle))));\r\n {$ENDIF}\r\n\r\n ps := Canvas.Pen.Style;\r\n Canvas.Pen.Style := psClear;\r\n {$IFNDEF WEBLIB}\r\n Canvas.Arc(sx, sy, sxs, sys, x, y, xs, ys);\r\n {$ENDIF}\r\n {$IFDEF WEBLIB}\r\n Canvas.AngleArc(ACenter.X, ACenter.Y, ARadius.X, DegToRad(AStartAngle), DegToRad(ASweepAngle));\r\n {$ENDIF}\r\n Canvas.Pen.Style := ps;\r\n {$ENDIF}\r\nend;\r\n\r\nprocedure TTMSFNCGraphicsContextGeneral.FillEllipse(AFill: TTMSFNCGraphicsFill; ARect: TRectF; AModifyRectMode: TTMSFNCGraphicsModifyRectMode);\r\nvar\r\n{$IFDEF FMXLIB}\r\n r: TRectF;\r\n{$ENDIF}\r\n{$IFDEF CMNWEBLIB}\r\n{$IFDEF WEBLIB}\r\n r: TCanvasRectF;\r\n{$ENDIF}\r\n{$IFNDEF WEBLIB}\r\n r: TRect;\r\n{$ENDIF}\r\n ps: TPenStyle;\r\n{$ENDIF}\r\nbegin\r\n ARect := ModifyRect(ARect, AModifyRectMode);\r\n {$IFDEF FMXLIB}\r\n r := ARect;\r\n Canvas.FillEllipse(r, AFill.Opacity);\r\n {$ENDIF}\r\n {$IFDEF CMNWEBLIB}\r\n {$IFDEF WEBLIB}\r\n r := CreateCanvasRectF(ARect.Left, ARect.Top, ARect.Right, ARect.Bottom);\r\n {$ENDIF}\r\n {$IFNDEF WEBLIB}\r\n r := Rect(Round(ARect.Left), Round(ARect.Top), Round(ARect.Right), Round(ARect.Bottom));\r\n {$ENDIF}\r\n\r\n ps := Canvas.Pen.Style;\r\n Canvas.Pen.Style := psClear;\r\n Canvas.Ellipse(r);\r\n Canvas.Pen.Style := ps;\r\n {$ENDIF}\r\nend;\r\n\r\nprocedure TTMSFNCGraphicsContextGeneral.FillPath(AFill: TTMSFNCGraphicsFill;\r\n APath: TTMSFNCGraphicsPath; APathMode: TTMSFNCGraphicsPathDrawMode = pdmPolygon);\r\nvar\r\n p: TTMSFNCGraphicsPathPolygon;\r\n {$IFDEF FMXLIB}\r\n pth: TPathData;\r\n {$ENDIF}\r\nbegin\r\n if Assigned(APath) then\r\n begin\r\n if APathMode = pdmPath then\r\n begin\r\n {$IFDEF FMXLIB}\r\n pth := TPathData(ConvertToPath(APath));\r\n try\r\n Canvas.FillPath(pth, AFill.Opacity);\r\n finally\r\n pth.Free;\r\n end;\r\n {$ENDIF}\r\n {$IFDEF CMNLIB}\r\n {$IFDEF MSWINDOWS}\r\n BeginPath(Canvas.Handle);\r\n ConvertToPath(APath);\r\n EndPath(Canvas.Handle);\r\n Windows.FillPath(Canvas.Handle);\r\n AbortPath(Canvas.Handle);\r\n {$ENDIF}\r\n {$ENDIF}\r\n {$IFDEF WEBLIB}\r\n Canvas.PathBegin;\r\n ConvertToPath(APath);\r\n Canvas.PathFill;\r\n {$ENDIF}\r\n end\r\n else\r\n begin\r\n SetLength(p, 0);\r\n APath.FlattenToPolygon(p);\r\n case APathMode of\r\n pdmPolygon: FillPolygon(AFill, p);\r\n pdmPolyline, pdmPath: FillPolyline(AFill, p);\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCGraphicsContextGeneral.FillPolygon(AFill: TTMSFNCGraphicsFill; APolygon: TTMSFNCGraphicsPathPolygon);\r\n{$IFDEF CMNWEBLIB}\r\nvar\r\n {$IFDEF WEBLIB}\r\n pts: array of TCanvasPointF;\r\n {$ENDIF}\r\n {$IFNDEF WEBLIB}\r\n pts: array of TPoint;\r\n {$ENDIF}\r\n I: Integer;\r\n ps: TPenStyle;\r\n{$ENDIF}\r\nbegin\r\n {$IFDEF FMXLIB}\r\n Canvas.FillPolygon(TPolygon(APolygon), AFill.Opacity);\r\n {$ENDIF}\r\n {$IFDEF CMNWEBLIB}\r\n SetLength(pts, Length(APolygon));\r\n for I := 0 to Length(APolygon) - 1 do\r\n begin\r\n {$IFDEF WEBLIB}\r\n pts[I] := CreateCanvasPointF(APolygon[I].X, APolygon[I].Y);\r\n {$ENDIF}\r\n {$IFNDEF WEBLIB}\r\n pts[I] := Point(Round(APolygon[I].X), Round(APolygon[I].Y));\r\n {$ENDIF}\r\n end;\r\n\r\n ps := Canvas.Pen.Style;\r\n Canvas.Pen.Style := psClear;\r\n Canvas.Polygon(pts);\r\n Canvas.Pen.Style := ps;\r\n {$ENDIF}\r\nend;\r\n\r\nprocedure TTMSFNCGraphicsContextGeneral.FillPolyline(AFill: TTMSFNCGraphicsFill; APolyline: TTMSFNCGraphicsPathPolygon);\r\n{$IFDEF CMNWEBLIB}\r\nvar\r\n {$IFDEF WEBLIB}\r\n pts: array of TCanvasPointF;\r\n {$ENDIF}\r\n {$IFNDEF WEBLIB}\r\n pts: array of TPoint;\r\n {$ENDIF}\r\n I: Integer;\r\n ps: TPenStyle;\r\n{$ENDIF}\r\nbegin\r\n {$IFDEF FMXLIB}\r\n Canvas.FillPolygon(TPolygon(APolyline), AFill.Opacity);\r\n {$ENDIF}\r\n {$IFDEF CMNWEBLIB}\r\n SetLength(pts, Length(APolyline));\r\n for I := 0 to Length(APolyline) - 1 do\r\n begin\r\n {$IFDEF WEBLIB}\r\n pts[I] := CreateCanvasPointF(APolyline[I].X, APolyline[I].Y);\r\n {$ENDIF}\r\n {$IFNDEF WEBLIB}\r\n pts[I] := Point(Round(APolyline[I].X), Round(APolyline[I].Y));\r\n {$ENDIF}\r\n end;\r\n\r\n ps := Canvas.Pen.Style;\r\n Canvas.Pen.Style := psClear;\r\n Canvas.Polyline(pts);\r\n Canvas.Pen.Style := ps;\r\n {$ENDIF}\r\nend;\r\n\r\nprocedure TTMSFNCGraphicsContextGeneral.FillRect(AFill: TTMSFNCGraphicsFill; ARect: TRectF; AModifyRectMode: TTMSFNCGraphicsModifyRectMode);\r\nvar\r\n{$IFDEF FMXLIB}\r\n r: TRectF;\r\n{$ENDIF}\r\n{$IFDEF CMNWEBLIB}\r\n {$IFDEF WEBLIB}\r\n r: TRectF;\r\n {$ENDIF}\r\n {$IFNDEF WEBLIB}\r\n r: TRect;\r\n {$ENDIF}\r\n c: TTMSFNCGraphicsColor;\r\n bs: TBrushStyle;\r\n ps: TPenStyle;\r\n{$ENDIF}\r\nbegin\r\n ARect := ModifyRect(ARect, AModifyRectMode);\r\n {$IFDEF FMXLIB}\r\n r := ARect;\r\n Canvas.FillRect(r, 0, 0, AllCorners, AFill.Opacity);\r\n {$ENDIF}\r\n {$IFDEF CMNWEBLIB}\r\n {$IFDEF WEBLIB}\r\n r := RectF(ARect.Left, ARect.Top, ARect.Right, ARect.Bottom);\r\n {$ENDIF}\r\n {$IFNDEF WEBLIB}\r\n r := Rect(Round(ARect.Left), Round(ARect.Top), Round(ARect.Right), Round(ARect.Bottom));\r\n {$ENDIF}\r\n\r\n c := gcNull;\r\n bs := bsClear;\r\n if (AFill.Kind = gfkGradient) then\r\n begin\r\n if (AFill.Color <> gcNull) and (AFill.ColorTo <> gcNull) then\r\n begin\r\n if (AFill.ColorMirror <> gcNull) and (AFill.ColorMirrorTo <> gcNull) then\r\n begin\r\n case AFill.Orientation of\r\n gfoHorizontal:\r\n begin\r\n {$IFDEF WEBLIB}\r\n DrawGradient(Canvas, AFill.Color, AFill.ColorTo, RectF(r.Left, r.Top, r.Left + (r.Right - r.Left) / 2, r.Bottom), 0, [], True);\r\n DrawGradient(Canvas, AFill.ColorMirror, AFill.ColorMirrorTo, RectF(r.Left + (r.Right - r.Left) / 2, r.Top, r.Right, r.Bottom), 0, [], True);\r\n {$ENDIF}\r\n {$IFNDEF WEBLIB}\r\n DrawGradient(Canvas, AFill.Color, AFill.ColorTo, Rect(r.Left, r.Top, r.Left + (r.Right - r.Left) div 2, r.Bottom), 0, [], True);\r\n DrawGradient(Canvas, AFill.ColorMirror, AFill.ColorMirrorTo, Rect(r.Left + (r.Right - r.Left) div 2, r.Top, r.Right, r.Bottom), 0, [], True);\r\n {$ENDIF}\r\n end;\r\n gfoVertical:\r\n begin\r\n {$IFDEF WEBLIB}\r\n DrawGradient(Canvas, AFill.Color, AFill.ColorTo, RectF(r.Left, r.Top, r.Right, r.Top + (r.Bottom - r.Top) / 2), 0, [], False);\r\n DrawGradient(Canvas, AFill.ColorMirror, AFill.ColorMirrorTo, RectF(r.Left, r.Top + (r.Bottom - r.Top) / 2, r.Right, r.Bottom), 0, [], False);\r\n {$ENDIF}\r\n {$IFNDEF WEBLIB}\r\n DrawGradient(Canvas, AFill.Color, AFill.ColorTo, Rect(r.Left, r.Top, r.Right, r.Top + (r.Bottom - r.Top) div 2), 0, [], False);\r\n DrawGradient(Canvas, AFill.ColorMirror, AFill.ColorMirrorTo, Rect(r.Left, r.Top + (r.Bottom - r.Top) div 2, r.Right, r.Bottom), 0, [], False);\r\n {$ENDIF}\r\n end;\r\n end;\r\n end\r\n else\r\n DrawGradient(Canvas, AFill.Color, AFill.ColorTo, r, 0, [], AFill.Orientation = gfoHorizontal);\r\n end;\r\n\r\n c := Canvas.Brush.Color;\r\n bs := Canvas.Brush.Style;\r\n Canvas.Brush.Style := bsClear;\r\n end;\r\n\r\n ps := Canvas.Pen.Style;\r\n Canvas.Pen.Style := psClear;\r\n if (AFill.Color <> gcNull) and (AFill.Kind = gfkSolid) then\r\n begin\r\n {$IFDEF WEBLIB}\r\n Canvas.Rectangle(CreateCanvasRectF(r.Left, r.Top, r.Right, r.Bottom));\r\n {$ENDIF}\r\n {$IFNDEF WEBLIB}\r\n Canvas.Rectangle(r);\r\n {$ENDIF}\r\n end;\r\n Canvas.Pen.Style := ps;\r\n\r\n if AFill.Kind = gfkGradient then\r\n begin\r\n Canvas.Brush.Color := c;\r\n Canvas.Brush.Style := bs;\r\n end;\r\n {$ENDIF}\r\nend;\r\n\r\nprocedure TTMSFNCGraphicsContextGeneral.FillRoundRect(AFill: TTMSFNCGraphicsFill; ARect: TRectF; ARounding: Single;\r\n ACorners: TTMSFNCGraphicsCorners; AModifyRectMode: TTMSFNCGraphicsModifyRectMode);\r\nvar\r\n{$IFDEF FMXLIB}\r\n r: TRectF;\r\n c: TCorners;\r\n{$ENDIF}\r\n{$IFDEF CMNWEBLIB}\r\n {$IFDEF WEBLIB}\r\n r, rg: TRectF;\r\n {$ENDIF}\r\n {$IFNDEF WEBLIB}\r\n r, rg: TRect;\r\n {$ENDIF}\r\n c: TTMSFNCGraphicsCorners;\r\n{$ENDIF}\r\nbegin\r\n ARect := ModifyRect(ARect, AModifyRectMode);\r\n {$IFDEF FMXLIB}\r\n r := ARect;\r\n\r\n c := [];\r\n if gcTopLeft in ACorners then\r\n c := c + [TCorner.TopLeft];\r\n\r\n if gcTopRight in ACorners then\r\n c := c + [TCorner.TopRight];\r\n\r\n if gcBottomLeft in ACorners then\r\n c := c + [TCorner.BottomLeft];\r\n\r\n if gcBottomRight in ACorners then\r\n c := c + [TCorner.BottomRight];\r\n\r\n Canvas.FillRect(r, ARounding, ARounding, c, AFill.Opacity);\r\n {$ENDIF}\r\n {$IFDEF CMNWEBLIB}\r\n {$IFDEF WEBLIB}\r\n r := RectF(ARect.Left, ARect.Top, ARect.Right, ARect.Bottom);\r\n {$ENDIF}\r\n {$IFNDEF WEBLIB}\r\n r := Rect(Round(ARect.Left), Round(ARect.Top), Round(ARect.Right), Round(ARect.Bottom));\r\n {$ENDIF}\r\n\r\n rg := r;\r\n rg.Bottom := rg.Bottom - 1;\r\n rg.Right := rg.Right - 1;\r\n\r\n if (AFill.Kind = gfkGradient) then\r\n begin\r\n if (AFill.Color <> gcNull) and (AFill.ColorTo <> gcNull) then\r\n begin\r\n if (AFill.ColorMirror <> gcNull) and (AFill.ColorMirrorTo <> gcNull) then\r\n begin\r\n case AFill.Orientation of\r\n gfoHorizontal:\r\n begin\r\n c := [];\r\n if gcTopLeft in ACorners then\r\n c := c + [gcTopLeft];\r\n if gcBottomLeft in ACorners then\r\n c := c + [gcBottomLeft];\r\n\r\n {$IFDEF WEBLIB}\r\n DrawGradient(Canvas, AFill.Color, AFill.ColorTo, RectF(rg.Left, rg.Top, rg.Left + (rg.Right - rg.Left) / 2, r.Bottom), ARounding, c, True);\r\n {$ENDIF}\r\n {$IFNDEF WEBLIB}\r\n DrawGradient(Canvas, AFill.Color, AFill.ColorTo, Rect(rg.Left, rg.Top, rg.Left + (rg.Right - rg.Left) div 2, r.Bottom), ARounding, c, True);\r\n {$ENDIF}\r\n\r\n c := [];\r\n if gcTopRight in ACorners then\r\n c := c + [gcTopRight];\r\n if gcBottomRight in ACorners then\r\n c := c + [gcBottomRight];\r\n\r\n {$IFDEF WEBLIB}\r\n DrawGradient(Canvas, AFill.ColorMirror, AFill.ColorMirrorTo, RectF(rg.Left + (rg.Right - r.Left) / 2, rg.Top, rg.Right, rg.Bottom), ARounding, c, True);\r\n {$ENDIF}\r\n {$IFNDEF WEBLIB}\r\n DrawGradient(Canvas, AFill.ColorMirror, AFill.ColorMirrorTo, Rect(rg.Left + (rg.Right - r.Left) div 2, rg.Top, rg.Right, rg.Bottom), ARounding, c, True);\r\n {$ENDIF}\r\n end;\r\n gfoVertical:\r\n begin\r\n c := [];\r\n if gcTopLeft in ACorners then\r\n c := c + [gcTopLeft];\r\n if gcTopRight in ACorners then\r\n c := c + [gcTopRight];\r\n\r\n {$IFDEF WEBLIB}\r\n DrawGradient(Canvas, AFill.Color, AFill.ColorTo, RectF(rg.Left, rg.Top, rg.Right, rg.Top + (rg.Bottom - rg.Top) / 2), ARounding, c, False);\r\n {$ENDIF}\r\n {$IFNDEF WEBLIB}\r\n DrawGradient(Canvas, AFill.Color, AFill.ColorTo, Rect(rg.Left, rg.Top, rg.Right, rg.Top + (rg.Bottom - rg.Top) div 2), ARounding, c, False);\r\n {$ENDIF}\r\n\r\n c := [];\r\n if gcBottomLeft in ACorners then\r\n c := c + [gcBottomLeft];\r\n if gcBottomRight in ACorners then\r\n c := c + [gcBottomRight];\r\n\r\n {$IFDEF WEBLIB}\r\n DrawGradient(Canvas, AFill.ColorMirror, AFill.ColorMirrorTo, RectF(rg.Left, rg.Top + (rg.Bottom - rg.Top) / 2, rg.Right, rg.Bottom), ARounding, c, False);\r\n {$ENDIF}\r\n {$IFNDEF WEBLIB}\r\n DrawGradient(Canvas, AFill.ColorMirror, AFill.ColorMirrorTo, Rect(rg.Left, rg.Top + (rg.Bottom - rg.Top) div 2, rg.Right, rg.Bottom), ARounding, c, False);\r\n {$ENDIF}\r\n end;\r\n end;\r\n end\r\n else\r\n DrawGradient(Canvas, AFill.Color, AFill.ColorTo, rg, ARounding, ACorners, AFill.Orientation = gfoHorizontal);\r\n end;\r\n end\r\n else if (AFill.Color <> gcNull) and (AFill.Kind = gfkSolid) then\r\n DrawGradient(Canvas, AFill.Color, AFill.Color, r, ARounding, ACorners, AFill.Orientation = gfoHorizontal);\r\n {$ENDIF}\r\nend;\r\n\r\nprocedure TTMSFNCGraphicsContextGeneral.StartSpecialPen;\r\n{$IFDEF CMNLIB}\r\n{$IFNDEF DARWIN}\r\nvar\r\n hpen: THandle;\r\n lb: TLogBrush;\r\n{$ENDIF}\r\n{$ENDIF}\r\nbegin\r\n {$IFDEF CMNWEBLIB}\r\n {$IFNDEF WEBLIB}\r\n if FPrinting then\r\n {$ENDIF}\r\n begin\r\n FOldPenStyle := Canvas.Pen.Style;\r\n FOldPenWidth := Canvas.Pen.Width;\r\n Canvas.Pen.Style := psDot;\r\n Canvas.Pen.Width := 1;\r\n end\r\n {$IFNDEF WEBLIB}\r\n {$IFNDEF DARWIN}\r\n else\r\n begin\r\n lb.lbColor := ColorToRGB(Canvas.Pen.Color);\r\n lb.lbStyle := BS_SOLID;\r\n\r\n hpen := ExtCreatePen(PS_COSMETIC or PS_ALTERNATE, 1, lb, 0, nil);\r\n FOldPenHandle := SelectObject(Canvas.Handle, hpen);\r\n end;\r\n {$ENDIF}\r\n {$ENDIF}\r\n {$ENDIF}\r\nend;\r\n\r\nprocedure TTMSFNCGraphicsContextGeneral.StopSpecialPen;\r\nbegin\r\n {$IFDEF CMNWEBLIB}\r\n {$IFNDEF WEBLIB}\r\n if FPrinting then\r\n {$ENDIF}\r\n begin\r\n Canvas.Pen.Style := FOldPenStyle;\r\n Canvas.Pen.Width := FOldPenWidth;\r\n end\r\n {$IFNDEF WEBLIB}\r\n {$IFNDEF DARWIN}\r\n else\r\n begin\r\n DeleteObject(SelectObject(Canvas.Handle, FOldPenHandle));\r\n end;\r\n {$ENDIF}\r\n {$ENDIF}\r\n {$ENDIF}\r\nend;\r\n\r\nprocedure TTMSFNCGraphicsContextGeneral.TranslateTransform(AX, AY: Single);\r\n{$IFDEF WEBLIB}\r\nvar\r\n m: TTMSFNCGraphicsMatrix;\r\n{$ENDIF}\r\nbegin\r\n {$IFDEF FMXLIB}\r\n SaveMatrix;\r\n Canvas.MultiplyMatrix(TMatrix.CreateTranslation(AX, AY));\r\n {$ENDIF}\r\n {$IFDEF WEBLIB}\r\n m := MatrixCreateTranslation(AX, AY);\r\n Canvas.Transform(m.m11, m.m12, m.m21, m.m22, m.m31, m.m32);\r\n {$ENDIF}\r\nend;\r\n\r\nfunction TTMSFNCGraphicsContextGeneral.GetFillColor: TTMSFNCGraphicsColor;\r\nbegin\r\n {$IFDEF FMXLIB}\r\n Result := Canvas.Fill.Color;\r\n {$ENDIF}\r\n {$IFNDEF FMXLIB}\r\n Result := Canvas.Brush.Color;\r\n {$ENDIF}\r\nend;\r\n\r\nfunction TTMSFNCGraphicsContextGeneral.GetMatrix: TTMSFNCGraphicsMatrix;\r\n{$IFDEF FMXLIB}\r\nvar\r\n M: TMatrix;\r\n{$ENDIF}\r\nbegin\r\n Result := MatrixIdentity;\r\n {$IFDEF FMXLIB}\r\n M := Canvas.Matrix;\r\n Result.m11 := M.m11;\r\n Result.m12 := M.m12;\r\n Result.m13 := M.m13;\r\n Result.m21 := M.m21;\r\n Result.m22 := M.m22;\r\n Result.m23 := M.m23;\r\n Result.m31 := M.m31;\r\n Result.m32 := M.m32;\r\n Result.m33 := M.m33;\r\n {$ENDIF}\r\nend;\r\n\r\nfunction TTMSFNCGraphicsContextGeneral.GetNativeCanvas: Pointer;\r\nbegin\r\n Result := Canvas;\r\nend;\r\n\r\nprocedure TTMSFNCGraphicsContextGeneral.PathClose(APath: Pointer);\r\nbegin\r\n {$IFDEF FMXLIB}\r\n TPathData(APath).ClosePath;\r\n {$ENDIF}\r\n {$IFDEF CMNLIB}\r\n {$IFDEF MSWINDOWS}\r\n CloseFigure(Canvas.Handle);\r\n {$ENDIF}\r\n {$ENDIF}\r\n {$IFDEF WEBLIB}\r\n Canvas.PathClose;\r\n {$ENDIF}\r\nend;\r\n\r\nprocedure TTMSFNCGraphicsContextGeneral.PathLineTo(APath: Pointer;\r\n APoint: TPointF);\r\nbegin\r\n {$IFDEF FMXLIB}\r\n TPathData(APath).LineTo(APoint);\r\n {$ENDIF}\r\n {$IFDEF CMNLIB}\r\n {$IFDEF MSWINDOWS}\r\n Canvas.LineTo(Round(APoint.X), Round(APoint.Y));;\r\n {$ENDIF}\r\n {$ENDIF}\r\n {$IFDEF WEBLIB}\r\n Canvas.PathLineTo(APoint.X, APoint.Y);\r\n {$ENDIF}\r\nend;\r\n\r\nprocedure TTMSFNCGraphicsContextGeneral.PathMoveTo(APath: Pointer;\r\n APoint: TPointF);\r\nbegin\r\n {$IFDEF FMXLIB}\r\n TPathData(APath).MoveTo(APoint);\r\n {$ENDIF}\r\n {$IFDEF CMNLIB}\r\n {$IFDEF MSWINDOWS}\r\n Canvas.MoveTo(Round(APoint.X), Round(APoint.Y));\r\n {$ENDIF}\r\n {$ENDIF}\r\n {$IFDEF WEBLIB}\r\n Canvas.PathMoveTo(APoint.X, APoint.Y);\r\n {$ENDIF}\r\nend;\r\n\r\nprocedure TTMSFNCGraphicsContextGeneral.PathOpen(APath: Pointer);\r\nbegin\r\n\r\nend;\r\n\r\nprocedure TTMSFNCGraphicsContextGeneral.Render;\r\nbegin\r\n\r\nend;\r\n\r\nprocedure TTMSFNCGraphicsContextGeneral.ResetClip;\r\nbegin\r\n {$IFDEF WEBLIB}\r\n RestoreState(nil);\r\n {$ENDIF}\r\nend;\r\n\r\nprocedure TTMSFNCGraphicsContextGeneral.ResetTextAngle(AAngle: Single);\r\nbegin\r\n {$IFDEF FMXLIB}\r\n if AAngle <> 0 then\r\n Canvas.SetMatrix(FTextMatrix);\r\n {$ENDIF}\r\n {$IFDEF WEBLIB}\r\n if AAngle <> 0 then\r\n Canvas.SetTransform(1, 0, 0, 1, 0, 0);\r\n {$ENDIF}\r\nend;\r\n\r\nprocedure TTMSFNCGraphicsContextGeneral.ResetTransform;\r\nbegin\r\n {$IFDEF FMXLIB}\r\n RestoreMatrix;\r\n {$ENDIF}\r\n {$IFDEF WEBLIB}\r\n Canvas.SetTransform(1, 0, 0, 1, 0, 0);\r\n {$ENDIF}\r\nend;\r\n\r\nprocedure TTMSFNCGraphicsContextGeneral.RestoreState(AState: TTMSFNCGraphicsSaveState);\r\nbegin\r\n {$IFDEF CMNWEBLIB}\r\n {$IFDEF VCLLIB}\r\n RestoreDC(Canvas.Handle, AState.SaveDC);\r\n {$ENDIF}\r\n {$IFDEF LCLLIB}\r\n Canvas.Clipping := False;\r\n Canvas.RestoreHandleState;\r\n {$ENDIF}\r\n if Assigned(AState) then\r\n AState.SaveDC := 0;\r\n {$ENDIF}\r\n {$IFDEF FMXLIB}\r\n Canvas.RestoreState(AState.SaveDC);\r\n AState.SaveDC := nil;\r\n {$ENDIF}\r\n {$IFDEF WEBLIB}\r\n Canvas.Restore;\r\n {$ENDIF}\r\n\r\n {$IFNDEF GDIPLUSDRAWING}\r\n {$IFDEF CMNWEBLIB}\r\n Canvas.Refresh;\r\n {$ENDIF}\r\n {$ENDIF}\r\nend;\r\n\r\nprocedure TTMSFNCGraphicsContextGeneral.RotateTransform(AAngle: Single);\r\n{$IFDEF WEBLIB}\r\nvar\r\n m: TTMSFNCGraphicsMatrix;\r\n{$ENDIF}\r\nbegin\r\n {$IFDEF FMXLIB}\r\n SaveMatrix;\r\n Canvas.MultiplyMatrix(TMatrix.CreateRotation(DegToRad(AAngle)));\r\n {$ENDIF}\r\n {$IFDEF WEBLIB}\r\n m := MatrixCreateRotation(DegToRad(AAngle));\r\n Canvas.Transform(m.m11, m.m12, m.m21, m.m22, m.m31, m.m32);\r\n {$ENDIF}\r\nend;\r\n\r\nprocedure TTMSFNCGraphicsContextGeneral.SaveState(AState: TTMSFNCGraphicsSaveState);\r\nbegin\r\n {$IFDEF CMNWEBLIB}\r\n Canvas.Refresh;\r\n {$ENDIF}\r\n {$IFDEF FMXLIB}\r\n AState.SaveDC := Canvas.SaveState;\r\n {$ENDIF}\r\n {$IFDEF VCLLIB}\r\n AState.SaveDC := SaveDC(Canvas.Handle);\r\n {$ENDIF}\r\n {$IFDEF LCLLIB}\r\n Canvas.SaveHandleState;\r\n {$ENDIF}\r\n {$IFDEF WEBLIB}\r\n Canvas.Save;\r\n {$ENDIF}\r\nend;\r\n\r\nprocedure TTMSFNCGraphicsContextGeneral.ScaleTransform(AX, AY: Single);\r\n{$IFDEF WEBLIB}\r\nvar\r\n m: TTMSFNCGraphicsMatrix;\r\n{$ENDIF}\r\nbegin\r\n {$IFDEF FMXLIB}\r\n SaveMatrix;\r\n Canvas.MultiplyMatrix(TMatrix.CreateScaling(AX, AY));\r\n {$ENDIF}\r\n {$IFDEF WEBLIB}\r\n m := MatrixCreateScaling(AX, AY);\r\n Canvas.Transform(m.m11, m.m12, m.m21, m.m22, m.m31, m.m32);\r\n {$ENDIF}\r\nend;\r\n\r\nfunction TTMSFNCGraphicsContextGeneral.SetTextAngle(ARect: TRectF; AAngle: Single): TRectF;\r\n{$IFDEF FMXWEBLIB}\r\nvar\r\n ar: Single;\r\n cx: TPointF;\r\n {$IFDEF FMXLIB}\r\n rm: TMatrix;\r\n {$ENDIF}\r\n c, s: Single;\r\n w, cw, h, ch: Single;\r\n{$ENDIF}\r\nbegin\r\n Result := ARect;\r\n {$IFDEF FMXWEBLIB}\r\n if AAngle <> 0 then\r\n begin\r\n ar := DegToRad(AAngle);\r\n cx.X := Result.Left + (Result.Right - Result.Left) / 2;\r\n cx.Y := Result.Top + (Result.Bottom - Result.Top) / 2;\r\n {$IFDEF FMXLIB}\r\n FTextMatrix := Canvas.Matrix;\r\n rm := TMatrix.CreateRotation(ar) * TMatrix.CreateTranslation(cx.X, cx.Y);\r\n Canvas.MultiplyMatrix(rm);\r\n {$ENDIF}\r\n {$IFDEF WEBLIB}\r\n Canvas.Transform(Cos(ar), Sin(ar), -Sin(ar), Cos(ar), cx.X, cx.Y);\r\n {$ENDIF}\r\n\r\n w := Result.Right - Result.Left;\r\n h := Result.Bottom - Result.Top;\r\n c := Cos(ar);\r\n s := Sin(ar);\r\n\r\n cw := (Abs(w * c) + Abs(h * s));\r\n ch := (Abs(w * s) + Abs(h * c));\r\n\r\n Result := RectF(-cw / 2, -ch / 2, cw / 2, ch / 2);\r\n end;\r\n {$ENDIF}\r\nend;\r\n\r\nprocedure TTMSFNCGraphicsContextGeneral.SetTextQuality(\r\n ATextQuality: TTMSFNCGraphicsTextQuality);\r\nbegin\r\nend;\r\n\r\nprocedure TTMSFNCGraphicsContextGeneral.SetSize(AWidth, AHeight: Single);\r\nbegin\r\nend;\r\n\r\nprocedure TTMSFNCGraphicsContextGeneral.SetShowAcceleratorChar(AShowAcceleratorChar: Boolean);\r\nbegin\r\n {$IFNDEF WEBLIB}\r\n FShowAcceleratorChar := AShowAcceleratorChar;\r\n {$ENDIF}\r\nend;\r\n\r\nprocedure TTMSFNCGraphicsContextGeneral.SetAntiAliasing(AAntiAliasing: Boolean);\r\nbegin\r\nend;\r\n\r\nprocedure TTMSFNCGraphicsContextGeneral.SetFill(AFill: TTMSFNCGraphicsFill);\r\n{$IFDEF FMXLIB}\r\nvar\r\n pt: TGradientPoint;\r\n{$ENDIF}\r\nbegin\r\n {$IFDEF FMXLIB}\r\n Canvas.Fill.Color := AFill.Color;\r\n case AFill.Kind of\r\n gfkSolid:\r\n begin\r\n Canvas.Fill.Kind := TBrushKind.Solid;\r\n end;\r\n gfkGradient:\r\n begin\r\n Canvas.Fill.Kind := TBrushKind.Gradient;\r\n Canvas.Fill.Gradient.Points.Clear;\r\n\r\n if (AFill.ColorMirror <> gcNull) and (AFill.ColorMirrorTo <> gcNull) then\r\n begin\r\n pt := TGradientPoint(Canvas.Fill.Gradient.Points.Add);\r\n pt.Color := AFill.Color;\r\n pt.Offset := 0;\r\n\r\n pt := TGradientPoint(Canvas.Fill.Gradient.Points.Add);\r\n pt.Color := AFill.ColorTo;\r\n pt.Offset := 0.5;\r\n\r\n pt := TGradientPoint(Canvas.Fill.Gradient.Points.Add);\r\n pt.Color := AFill.ColorMirror;\r\n pt.Offset := 0.5;\r\n\r\n pt := TGradientPoint(Canvas.Fill.Gradient.Points.Add);\r\n pt.Color := AFill.ColorMirrorTo;\r\n pt.Offset := 1;\r\n end\r\n else\r\n begin\r\n pt := TGradientPoint(Canvas.Fill.Gradient.Points.Add);\r\n pt.Color := AFill.Color;\r\n pt.Offset := 0;\r\n\r\n pt := TGradientPoint(Canvas.Fill.Gradient.Points.Add);\r\n pt.Color := AFill.ColorTo;\r\n pt.Offset := 1;\r\n end;\r\n\r\n case AFill.Orientation of\r\n gfoHorizontal:\r\n begin\r\n Canvas.Fill.Gradient.StartPosition.Point := PointF(0, 0.5);\r\n Canvas.Fill.Gradient.StopPosition.Point := PointF(1, 0.5);\r\n end;\r\n gfoVertical:\r\n begin\r\n Canvas.Fill.Gradient.StartPosition.Point := PointF(0.5, 0);\r\n Canvas.Fill.Gradient.StopPosition.Point := PointF(0.5, 1);\r\n end;\r\n end;\r\n end\r\n else\r\n Canvas.Fill.Kind := TBrushKind.None;\r\n end;\r\n {$ENDIF}\r\n {$IFDEF CMNWEBLIB}\r\n Canvas.Brush.Color := AFill.Color;\r\n {$IFDEF WEBLIB}\r\n Canvas.Brush.Gradient := bgNone;\r\n Canvas.Brush.ClearGradient;\r\n {$ENDIF}\r\n case AFill.Kind of\r\n {$IFDEF WEBLIB}\r\n gfkSolid: Canvas.Brush.Style := bsSolid;\r\n gfkGradient:\r\n begin\r\n Canvas.Brush.ClearGradient;\r\n\r\n if (AFill.ColorMirror <> gcNull) and (AFill.ColorMirrorTo <> gcNull) then\r\n begin\r\n Canvas.Brush.AddGradientColor(AFill.Color, 0);\r\n Canvas.Brush.AddGradientColor(AFill.ColorTo, 0.5);\r\n Canvas.Brush.AddGradientColor(AFill.ColorMirror, 0.5);\r\n Canvas.Brush.AddGradientColor(AFill.ColorMirrorTo, 1);\r\n end\r\n else\r\n begin\r\n Canvas.Brush.AddGradientColor(AFill.Color, 0);\r\n Canvas.Brush.AddGradientColor(AFill.ColorTo, 1);\r\n end;\r\n\r\n case AFill.Orientation of\r\n gfoHorizontal: Canvas.Brush.Gradient := bgLinearHorz;\r\n gfoVertical: Canvas.Brush.Gradient := bgLinearVert;\r\n end;\r\n end;\r\n {$ELSE}\r\n gfkSolid, gfkGradient: Canvas.Brush.Style := bsSolid;\r\n {$ENDIF}\r\n gfkNone: Canvas.Brush.Style := bsClear;\r\n end;\r\n {$ENDIF}\r\nend;\r\n\r\nprocedure TTMSFNCGraphicsContextGeneral.SetFillColor(AColor: TTMSFNCGraphicsColor);\r\nbegin\r\n {$IFDEF FMXLIB}\r\n Canvas.Fill.Color := AColor;\r\n {$ENDIF}\r\n {$IFDEF CMNWEBLIB}\r\n Canvas.Brush.Color := AColor;\r\n {$ENDIF}\r\nend;\r\n\r\nprocedure TTMSFNCGraphicsContextGeneral.SetFillKind(AKind: TTMSFNCGraphicsFillKind);\r\nbegin\r\n {$IFDEF FMXLIB}\r\n Canvas.Fill.Kind := TBrushKind(Integer(AKind));\r\n {$ENDIF}\r\n {$IFDEF CMNWEBLIB}\r\n case AKind of\r\n gfkNone: Canvas.Brush.Style := bsClear;\r\n gfkSolid, gfkGradient: Canvas.Brush.Style := bsSolid;\r\n end;\r\n {$ENDIF}\r\nend;\r\n\r\nprocedure TTMSFNCGraphicsContextGeneral.SetFont(AFont: TTMSFNCGraphicsFont);\r\nbegin\r\n Canvas.Font.Assign(AFont);\r\nend;\r\n\r\nprocedure TTMSFNCGraphicsContextGeneral.SetFontColor(AColor: TTMSFNCGraphicsColor);\r\nbegin\r\n {$IFDEF FMXLIB}\r\n Canvas.Fill.Color := AColor;\r\n {$ENDIF}\r\n {$IFDEF CMNWEBLIB}\r\n Canvas.Font.Color := AColor;\r\n {$ENDIF}\r\nend;\r\n\r\nprocedure TTMSFNCGraphicsContextGeneral.SetFontName(AName: string);\r\nbegin\r\n {$IFDEF FMXLIB}\r\n Canvas.Font.Family := AName;\r\n {$ENDIF}\r\n {$IFDEF CMNWEBLIB}\r\n Canvas.Font.Name := AName;\r\n {$ENDIF}\r\nend;\r\n\r\nprocedure TTMSFNCGraphicsContextGeneral.SetFontSize(ASize: Integer);\r\nbegin\r\n Canvas.Font.Size := ASize;\r\nend;\r\n\r\nprocedure TTMSFNCGraphicsContextGeneral.SetFontStyles(AStyle: TFontStyles);\r\nbegin\r\n Canvas.Font.Style := AStyle;\r\nend;\r\n\r\nprocedure TTMSFNCGraphicsContextGeneral.SetScale(AScale: Single);\r\nbegin\r\nend;\r\n\r\nprocedure TTMSFNCGraphicsContextGeneral.SetMatrix(\r\n AMatrix: TTMSFNCGraphicsMatrix);\r\n{$IFDEF FMXLIB}\r\nvar\r\n M: TMatrix;\r\n{$ENDIF}\r\nbegin\r\n {$IFDEF FMXLIB}\r\n M := TMatrix.Identity;\r\n M.m11 := AMatrix.m11;\r\n M.m12 := AMatrix.m12;\r\n M.m13 := AMatrix.m13;\r\n M.m21 := AMatrix.m21;\r\n M.m22 := AMatrix.m22;\r\n M.m23 := AMatrix.m23;\r\n M.m31 := AMatrix.m31;\r\n M.m32 := AMatrix.m32;\r\n M.m33 := AMatrix.m33;\r\n Canvas.SetMatrix(M);\r\n {$ENDIF}\r\nend;\r\n\r\nprocedure TTMSFNCGraphicsContextGeneral.SetStroke(AStroke: TTMSFNCGraphicsStroke);\r\nbegin\r\n {$IFDEF FMXLIB}\r\n Canvas.Stroke.Color := AStroke.Color;\r\n Canvas.Stroke.Thickness := AStroke.Width;\r\n case AStroke.Kind of\r\n gskSolid:\r\n begin\r\n Canvas.Stroke.Kind := TBrushKind.Solid;\r\n Canvas.Stroke.Dash := TStrokeDash.Solid;\r\n end;\r\n gskNone: Canvas.Stroke.Kind := TBrushKind.None;\r\n else\r\n Canvas.Stroke.Kind := TBrushKind.Solid;\r\n end;\r\n\r\n case AStroke.Kind of\r\n gskDash: Canvas.Stroke.Dash := TStrokeDash.Dash;\r\n gskDot: Canvas.Stroke.Dash := TStrokeDash.Dot;\r\n gskDashDot: Canvas.Stroke.Dash := TStrokeDash.DashDot;\r\n gskDashDotDot: Canvas.Stroke.Dash := TStrokeDash.DashDotDot;\r\n end;\r\n {$ENDIF}\r\n {$IFDEF CMNWEBLIB}\r\n Canvas.Pen.Color := AStroke.Color;\r\n Canvas.Pen.Width := Round(AStroke.Width);\r\n case AStroke.Kind of\r\n gskSolid: Canvas.Pen.Style := psSolid;\r\n gskNone: Canvas.Pen.Style := psClear;\r\n gskDash: Canvas.Pen.Style := psDash;\r\n gskDot: Canvas.Pen.Style := psDot;\r\n gskDashDot: Canvas.Pen.Style := psDashDot;\r\n gskDashDotDot: Canvas.Pen.Style := psDashDotDot;\r\n end;\r\n {$ENDIF}\r\nend;\r\n\r\nprocedure TTMSFNCGraphicsContextGeneral.SetStrokeColor(AColor: TTMSFNCGraphicsColor);\r\nbegin\r\n {$IFDEF FMXLIB}\r\n Canvas.Stroke.Color := AColor;\r\n {$ENDIF}\r\n {$IFDEF CMNWEBLIB}\r\n Canvas.Pen.Color := AColor;\r\n {$ENDIF}\r\nend;\r\n\r\nprocedure TTMSFNCGraphicsContextGeneral.SetStrokeKind(\r\n AKind: TTMSFNCGraphicsStrokeKind);\r\nbegin\r\n {$IFDEF FMXLIB}\r\n case AKind of\r\n gskNone: Canvas.Stroke.Kind := TBrushKind.None;\r\n gskSolid:\r\n begin\r\n {$HINTS OFF}\r\n {$IF COMPILERVERSION > 31}\r\n Canvas.Stroke.Dash := TStrokeDash.Solid;\r\n {$ELSE}\r\n Canvas.StrokeDash := TStrokeDash.Solid;\r\n {$IFEND}\r\n {$HINTS ON}\r\n Canvas.Stroke.Kind := TBrushKind.Solid;\r\n end;\r\n gskDash:\r\n begin\r\n {$HINTS OFF}\r\n {$IF COMPILERVERSION > 31}\r\n Canvas.Stroke.Dash := TStrokeDash.Dash;\r\n {$ELSE}\r\n Canvas.StrokeDash := TStrokeDash.Dash;\r\n {$IFEND}\r\n {$HINTS ON}\r\n Canvas.Stroke.Kind := TBrushKind.Solid;\r\n end;\r\n gskDot:\r\n begin\r\n {$HINTS OFF}\r\n {$IF COMPILERVERSION > 31}\r\n Canvas.Stroke.Dash := TStrokeDash.Dot;\r\n {$ELSE}\r\n Canvas.StrokeDash := TStrokeDash.Dot;\r\n {$IFEND}\r\n {$HINTS ON}\r\n Canvas.Stroke.Kind := TBrushKind.Solid;\r\n end;\r\n gskDashDot:\r\n begin\r\n {$HINTS OFF}\r\n {$IF COMPILERVERSION > 31}\r\n Canvas.Stroke.Dash := TStrokeDash.DashDot;\r\n {$ELSE}\r\n Canvas.StrokeDash := TStrokeDash.DashDot;\r\n {$IFEND}\r\n {$HINTS ON}\r\n Canvas.Stroke.Kind := TBrushKind.Solid;\r\n end;\r\n gskDashDotDot:\r\n begin\r\n {$HINTS OFF}\r\n {$IF COMPILERVERSION > 31}\r\n Canvas.Stroke.Dash := TStrokeDash.DashDotDot;\r\n {$ELSE}\r\n Canvas.StrokeDash := TStrokeDash.DashDotDot;\r\n {$IFEND}\r\n {$HINTS ON}\r\n Canvas.Stroke.Kind := TBrushKind.Solid;\r\n end;\r\n end;\r\n {$ENDIF}\r\n {$IFDEF CMNWEBLIB}\r\n case AKind of\r\n gskNone: Canvas.Pen.Style := psClear;\r\n gskSolid: Canvas.Pen.Style := psSolid;\r\n gskDash: Canvas.Pen.Style := psDash;\r\n gskDot: Canvas.Pen.Style := psDot;\r\n gskDashDot: Canvas.Pen.Style := psDashDot;\r\n gskDashDotDot: Canvas.Pen.Style := psDashDotDot;\r\n end;\r\n {$ENDIF}\r\nend;\r\n\r\nprocedure TTMSFNCGraphicsContextGeneral.SetStrokeWidth(AWidth: Single);\r\nbegin\r\n {$IFDEF FMXLIB}\r\n Canvas.Stroke.Thickness := AWidth;\r\n {$ENDIF}\r\n {$IFDEF CMNWEBLIB}\r\n Canvas.Pen.Width := Round(AWidth);\r\n {$ENDIF}\r\nend;\r\n\r\nfunction GetNativeContextClass: TTMSFNCGraphicsContextClass;\r\nbegin\r\n Result := TTMSFNCGraphicsContextGeneral;\r\nend;\r\n\r\nend.\r\n","{********************************************************************}\r\n{ }\r\n{ written by TMS Software }\r\n{ copyright (c) 2017 - 2021 }\r\n{ Email : info@tmssoftware.com }\r\n{ Web : http://www.tmssoftware.com }\r\n{ }\r\n{ The source code is given as is. The author is not responsible }\r\n{ for any possible damage done due to the use of this code. }\r\n{ The complete source code remains property of the author and may }\r\n{ not be distributed, published, given or sold in any form as such. }\r\n{ No parts of the source code can be included in any other component }\r\n{ or application without written authorization of the author. }\r\n{********************************************************************}\r\n\r\nunit WEBLib.TMSFNCGraphics.WEB;\r\n\r\n{$I WEBLib.TMSFNCDefines.inc}\r\n\r\ninterface\r\n\r\n{$IFDEF WEBLIB}\r\n\r\nuses\r\n Classes, WEBLib.TMSFNCGraphicsTypes, WEBLib.TMSFNCUtils, {%H-}Types, WEBLib.TMSFNCTypes,\r\n WEBLib.TMSFNCGraphics, WEBLib.Graphics;\r\n\r\ntype\r\n TTMSFNCGraphicsContextWEB = class(TTMSFNCGraphicsContext)\r\n private\r\n FActivePath: TTMSFNCGraphicsPath;\r\n FScale: Single;\r\n FNeedsRendering: Boolean;\r\n FFont: TTMSFNCGraphicsFont;\r\n FFill: TTMSFNCGraphicsFill;\r\n FStroke: TTMSFNCGraphicsStroke;\r\n FContextSize: TSizeF;\r\n FNCanvas: Pointer;\r\n FBitmap: TBitmap;\r\n protected\r\n function GetNativeCanvas: Pointer; override;\r\n procedure DestroyResources;\r\n function DrawTextInternal(AText: String; ARect: TRectF; {%H-}AWordWrap: Boolean; AHorizontalAlignment: TTMSFNCGraphicsTextAlign; ACalculate: Boolean): TRectF;\r\n procedure DrawLinearGradient(ARect: TRectF);\r\n procedure FontChanged(Sender: TObject);\r\n procedure FillChanged(Sender: TObject);\r\n procedure StrokeChanged(Sender: TObject);\r\n procedure RestoreContext;\r\n procedure SaveContext;\r\n procedure ApplyStroke;\r\n procedure ApplyFill;\r\n public\r\n constructor Create(const AGraphics: TTMSFNCGraphics); override;\r\n destructor Destroy; override;\r\n function GetFillColor: TTMSFNCGraphicsColor; override;\r\n function CalculateText(AText: string; ARect: TRectF; AWordWrapping: Boolean): TRectF; override;\r\n function SetTextAngle(ARect: TRectF; {%H-}AAngle: Single): TRectF; override;\r\n function CreatePath: Pointer; override;\r\n function GetMatrix: TTMSFNCGraphicsMatrix; override;\r\n procedure Render; override;\r\n procedure PathOpen({%H-}APath: Pointer); override;\r\n procedure PathMoveTo({%H-}APath: Pointer; APoint: TPointF); override;\r\n procedure PathLineTo({%H-}APath: Pointer; APoint: TPointF); override;\r\n procedure PathClose({%H-}APath: Pointer); override;\r\n procedure ResetClip; override;\r\n procedure ResetTransform; override;\r\n procedure ScaleTransform(AX, AY: Single); override;\r\n procedure RotateTransform(AAngle: Single); override;\r\n procedure TranslateTransform(AX, AY: Single); override;\r\n procedure SetTextQuality({%H-}ATextQuality: TTMSFNCGraphicsTextQuality); override;\r\n procedure SetAntiAliasing(AAntiAliasing: Boolean); override;\r\n procedure SetShowAcceleratorChar({%H-}AShowAcceleratorChar: Boolean); override;\r\n procedure SetSize(AWidth, AHeight: Single); override;\r\n procedure SetMatrix(AMatrix: TTMSFNCGraphicsMatrix); override;\r\n procedure SetScale(AScale: Single); override;\r\n procedure ResetTextAngle({%H-}AAngle: Single); override;\r\n procedure BeginScene; override;\r\n procedure EndScene; override;\r\n procedure BeginPrinting; override;\r\n procedure EndPrinting; override;\r\n procedure StartSpecialPen; override;\r\n procedure StopSpecialPen; override;\r\n procedure RestoreState({%H-}AState: TTMSFNCGraphicsSaveState); override;\r\n procedure SaveState({%H-}AState: TTMSFNCGraphicsSaveState); override;\r\n procedure SetFontSize(ASize: Integer); override;\r\n procedure SetFontColor(AColor: TTMSFNCGraphicsColor); override;\r\n procedure SetFontName(AName: string); override;\r\n procedure SetFont(AFont: TTMSFNCGraphicsFont); override;\r\n procedure SetFontStyles(AStyle: TFontStyles); override;\r\n procedure SetFill(AFill: TTMSFNCGraphicsFill); override;\r\n procedure SetFillKind(AKind: TTMSFNCGraphicsFillKind); override;\r\n procedure SetFillColor(AColor: TTMSFNCGraphicsColor); override;\r\n procedure SetStroke(AStroke: TTMSFNCGraphicsStroke); override;\r\n procedure SetStrokeKind(AKind: TTMSFNCGraphicsStrokeKind); override;\r\n procedure SetStrokeColor(AColor: TTMSFNCGraphicsColor); override;\r\n procedure SetStrokeWidth(AWidth: Single); override;\r\n procedure DrawLine({%H-}AStroke: TTMSFNCGraphicsStroke; AFromPoint: TPointF; AToPoint: TPointF; {%H-}AModifyPointModeFrom: TTMSFNCGraphicsModifyPointMode = gcpmRightDown; {%H-}AModifyPointModeTo: TTMSFNCGraphicsModifyPointMode = gcpmRightDown); override;\r\n procedure DrawPolygon({%H-}AStroke: TTMSFNCGraphicsStroke; APolygon: TTMSFNCGraphicsPathPolygon); override;\r\n procedure FillPolygon({%H-}AFill: TTMSFNCGraphicsFill; APolygon: TTMSFNCGraphicsPathPolygon); override;\r\n procedure DrawPolyline({%H-}AStroke: TTMSFNCGraphicsStroke; APolyline: TTMSFNCGraphicsPathPolygon); override;\r\n procedure FillPolyline({%H-}AFill: TTMSFNCGraphicsFill; APolyline: TTMSFNCGraphicsPathPolygon); override;\r\n procedure FillArc({%H-}AFill: TTMSFNCGraphicsFill; {%H-}ACenter, {%H-}ARadius: TPointF; {%H-}AStartAngle, {%H-}ASweepAngle: Single); override;\r\n procedure DrawArc({%H-}AStroke: TTMSFNCGraphicsStroke; ACenter, ARadius: TPointF; AStartAngle, ASweepAngle: Single); override;\r\n procedure FillRect({%H-}AFill: TTMSFNCGraphicsFill; ARect: TRectF; {%H-}AModifyRectMode: TTMSFNCGraphicsModifyRectMode = gcrmShrinkAll); override;\r\n procedure DrawRect({%H-}AStroke: TTMSFNCGraphicsStroke; ARect: TRectF; ASides: TTMSFNCGraphicsSides; {%H-}AModifyRectMode: TTMSFNCGraphicsModifyRectMode = gcrmShrinkAll); override;\r\n procedure FillRoundRect({%H-}AFill: TTMSFNCGraphicsFill; ARect: TRectF; ARounding: Single; ACorners: TTMSFNCGraphicsCorners; {%H-}AModifyRectMode: TTMSFNCGraphicsModifyRectMode = gcrmShrinkAll); override;\r\n procedure DrawRoundRect({%H-}AStroke: TTMSFNCGraphicsStroke; ARect: TRectF; ARounding: Single; ACorners: TTMSFNCGraphicsCorners; {%H-}AModifyRectMode: TTMSFNCGraphicsModifyRectMode = gcrmShrinkAll); override;\r\n procedure FillEllipse({%H-}AFill: TTMSFNCGraphicsFill; ARect: TRectF; {%H-}AModifyRectMode: TTMSFNCGraphicsModifyRectMode = gcrmShrinkAll); override;\r\n procedure DrawEllipse({%H-}AStroke: TTMSFNCGraphicsStroke; ARect: TRectF; {%H-}AModifyRectMode: TTMSFNCGraphicsModifyRectMode = gcrmShrinkAll); override;\r\n procedure DrawBitmap(ABitmap: TTMSFNCDrawBitmap; {%H-}ASrcRect, ADstRect: TRectF; {%H-}AOpacity: Single); override;\r\n procedure ClipRect(ARect: TRectF); override;\r\n procedure ClipPath({%H-}APath: TTMSFNCGraphicsPath); override;\r\n procedure DrawFocusPath({%H-}AStroke: TTMSFNCGraphicsStroke; {%H-}APath: TTMSFNCGraphicsPath; {%H-}AColor: TTMSFNCGraphicsColor); override;\r\n procedure DrawFocusRectangle({%H-}AStroke: TTMSFNCGraphicsStroke; {%H-}ARect: TRectF; {%H-}AColor: TTMSFNCGraphicsColor; {%H-}AModifyRectMode: TTMSFNCGraphicsModifyRectMode = gcrmShrinkAll); override;\r\n procedure DrawText(AText: string; ARect: TRectF; AWordWrapping: Boolean; AHorizontalAlign, AVerticalAlign: TTMSFNCGraphicsTextAlign; {%H-}ATrimming: TTMSFNCGraphicsTextTrimming; {%H-}AAngle: Single); override;\r\n procedure DrawPath({%H-}AStroke: TTMSFNCGraphicsStroke; APath: TTMSFNCGraphicsPath; APathMode: TTMSFNCGraphicsPathDrawMode = pdmPolygon); override;\r\n procedure FillPath({%H-}AFill: TTMSFNCGraphicsFill; APath: TTMSFNCGraphicsPath; APathMode: TTMSFNCGraphicsPathDrawMode = pdmPolygon); override;\r\n end;\r\n\r\nfunction GetNativeContextClass: TTMSFNCGraphicsContextClass;\r\n\r\n{$ENDIF}\r\n\r\nimplementation\r\n\r\n{$IFDEF WEBLIB}\r\n\r\nuses\r\n SysUtils, Math;\r\n\r\nfunction GetNativeContextClass: TTMSFNCGraphicsContextClass;\r\nbegin\r\n Result := TTMSFNCGraphicsContextWEB;\r\nend;\r\n\r\n{ TTMSFNCGraphicsContextWEB }\r\n\r\nprocedure TTMSFNCGraphicsContextWEB.ApplyFill;\r\nbegin\r\n if not Assigned(FNCanvas) then\r\n Exit;\r\n\r\n case FFill.Kind of\r\n gfkSolid:\r\n begin\r\n// cairo_set_source_rgba(FNCanvas, TTMSFNCGraphics.GetColorRed(FFill.Color) / 255, TTMSFNCGraphics.GetColorGreen(FFill.Color) / 255,\r\n// TTMSFNCGraphics.GetColorBlue(FFill.Color) / 255, FFill.Opacity);\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCGraphicsContextWEB.GetMatrix: TTMSFNCGraphicsMatrix;\r\nbegin\r\n Result := MatrixEmpty;\r\nend;\r\n\r\nprocedure TTMSFNCGraphicsContextWEB.SetScale(AScale: single);\r\nbegin\r\n FScale := AScale;\r\nend;\r\n\r\nprocedure TTMSFNCGraphicsContextWEB.SetMatrix(AMatrix: TTMSFNCGraphicsMatrix);\r\nbegin\r\nend;\r\n\r\nprocedure TTMSFNCGraphicsContextWEB.ApplyStroke;\r\n//var\r\n// f: array of Double;\r\nbegin\r\n if not Assigned(FNCanvas) then\r\n Exit;\r\n\r\n// cairo_set_line_width(FNCanvas, FStroke.Width);\r\n// cairo_set_source_rgba(FNCanvas, TTMSFNCGraphics.GetColorRed(FStroke.Color) / 255, TTMSFNCGraphics.GetColorGreen(FStroke.Color) / 255,\r\n// TTMSFNCGraphics.GetColorBlue(FStroke.Color) / 255, FStroke.Opacity);\r\n\r\n// case FStroke.Kind of\r\n// gskSolid, gskNone: cairo_set_dash(FNCanvas, nil,0, 0);\r\n// gskDash:\r\n// begin\r\n// SetLength(f, 2);\r\n// f[0] := 3;\r\n// f[1] := 1;\r\n// cairo_set_dash(FNCanvas, @f[0], Length(f), 0);\r\n// end;\r\n// gskDot:\r\n// begin\r\n// SetLength(f, 2);\r\n// f[0] := 1;\r\n// f[1] := 1;\r\n// cairo_set_dash(FNCanvas, @f[0], Length(f), 0);\r\n// end;\r\n// gskDashDot:\r\n// begin\r\n// SetLength(f, 4);\r\n// f[0] := 3;\r\n// f[1] := 1;\r\n// f[2] := 1;\r\n// f[3] := 1;\r\n// cairo_set_dash(FNCanvas, @f[0], Length(f), 0);\r\n// end;\r\n// gskDashDotDot:\r\n// begin\r\n// SetLength(f, 6);\r\n// f[0] := 3;\r\n// f[1] := 1;\r\n// f[2] := 1;\r\n// f[3] := 1;\r\n// f[4] := 1;\r\n// f[5] := 1;\r\n// cairo_set_dash(FNCanvas, @f[0], Length(f), 0);\r\n// end;\r\n// end;\r\nend;\r\n\r\nprocedure TTMSFNCGraphicsContextWEB.BeginPrinting;\r\nbegin\r\nend;\r\n\r\nprocedure TTMSFNCGraphicsContextWEB.EndPrinting;\r\nbegin\r\nend;\r\n\r\nprocedure TTMSFNCGraphicsContextWEB.BeginScene;\r\nbegin\r\n if not Assigned(FNCanvas) then\r\n Exit;\r\nend;\r\n\r\nfunction TTMSFNCGraphicsContextWEB.CalculateText(AText: string; ARect: TRectF;\r\n AWordWrapping: Boolean): TRectF;\r\nbegin\r\n Result := RectF(0, 0, 0, 0);\r\n if not Assigned(FNCanvas) then\r\n Exit;\r\n\r\n SaveContext;\r\n Result := DrawTextInternal(AText, ARect, AWordWrapping, gtaLeading, True);\r\n RestoreContext;\r\nend;\r\n\r\nprocedure TTMSFNCGraphicsContextWEB.ClipPath(APath: TTMSFNCGraphicsPath);\r\n//var\r\n// pth: ^cairo_path_t;\r\nbegin\r\n if not Assigned(FNCanvas) then\r\n Exit;\r\n\r\n// pth := ConvertToPath(APath);\r\n try\r\n SaveContext;\r\n// cairo_append_path(FNCanvas, pth);\r\n// cairo_clip(FNCanvas);\r\n finally\r\n\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCGraphicsContextWEB.ClipRect(ARect: TRectF);\r\nbegin\r\n if not Assigned(FNCanvas) then\r\n Exit;\r\n\r\n SaveContext;\r\n// cairo_new_path(FNCanvas);\r\n// cairo_rectangle(FNCanvas, ARect.Left, ARect.Top, ARect.Width, ARect.Height);\r\n// cairo_clip(FNCanvas);\r\nend;\r\n\r\nconstructor TTMSFNCGraphicsContextWEB.Create(const AGraphics: TTMSFNCGraphics);\r\nbegin\r\n inherited;\r\n FScale := TTMSFNCUtils.GetDPIScale;\r\n FNeedsRendering := True;\r\n FContextSize.cx := 0;\r\n FContextSize.cy := 0;\r\n FFont := TTMSFNCGraphicsFont.Create;\r\n FFont.OnChanged := @FontChanged;\r\n FStroke := TTMSFNCGraphicsStroke.Create;\r\n FStroke.OnChanged := @StrokeChanged;\r\n FFill := TTMSFNCGraphicsFill.Create;\r\n FFill.OnChanged := @FillChanged;\r\nend;\r\n\r\nfunction TTMSFNCGraphicsContextWEB.CreatePath: Pointer;\r\nbegin\r\n Result := nil;\r\n// cairo_new_path(FNCanvas);\r\n// Result := cairo_copy_path(FNCanvas);\r\nend;\r\n\r\ndestructor TTMSFNCGraphicsContextWEB.Destroy;\r\nbegin\r\n Render;\r\n\r\n if Assigned(FFont) then\r\n begin\r\n FFont.Free;\r\n FFont := nil;\r\n end;\r\n\r\n if Assigned(FFill) then\r\n begin\r\n FFill.Free;\r\n FFill := nil;\r\n end;\r\n\r\n if Assigned(FStroke) then\r\n begin\r\n FStroke.Free;\r\n FStroke := nil;\r\n end;\r\n\r\n DestroyResources;\r\n inherited;\r\nend;\r\n\r\nprocedure TTMSFNCGraphicsContextWEB.DestroyResources;\r\nbegin\r\n if Assigned(FNCanvas) then\r\n begin\r\n RestoreContext;\r\n// cairo_destroy(FNCanvas);\r\n FNCanvas := nil;\r\n end;\r\n\r\n if Assigned(FBitmap) then\r\n begin\r\n FBitmap.Free;\r\n FBitmap := nil;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCGraphicsContextWEB.DrawArc(AStroke: TTMSFNCGraphicsStroke;\r\n ACenter, ARadius: TPointF; AStartAngle, ASweepAngle: Single);\r\nbegin\r\n if not Assigned(FNCanvas) then\r\n Exit;\r\n\r\n SaveContext;\r\n// cairo_new_path(FNCanvas);\r\n// cairo_arc(FNCanvas, ACenter.X, ACenter.Y, ARadius.X, DegToRad(AStartAngle), DegToRad(AStartAngle + ASweepAngle));\r\n ApplyStroke;\r\n// cairo_stroke(FNCanvas);\r\n RestoreContext;\r\nend;\r\n\r\nprocedure TTMSFNCGraphicsContextWEB.DrawBitmap(ABitmap: TTMSFNCDrawBitmap;\r\n ASrcRect, ADstRect: TRectF; AOpacity: Single);\r\n//var\r\n// R: TRectF;\r\n// img: Pcairo_surface_t;\r\n//\r\n// function GraphicToARGB32(Source: TGraphic; buf: PByte): Boolean;\r\n// var\r\n// p: PDWord;\r\n// x, y: Integer;\r\n// c: TFPColor;\r\n// Img: TLazIntfImage;\r\n// begin\r\n// Img := TRasterImage(Source).CreateIntfImage;\r\n// try\r\n// if Img.DataDescription.Format = ricfNone then begin\r\n// Result := False;\r\n// Exit;\r\n// end;\r\n// p := Pointer(buf);\r\n// for y := 0 to Source.Height-1 do begin\r\n// for x := 0 to Source.Width-1 do begin\r\n// c := Img.Colors[x, y];\r\n// p^ := Hi(c.alpha) shl 24 + Hi(c.red) shl 16 + Hi(c.green) shl 8 + Hi(c.blue);\r\n// inc(p);\r\n// end;\r\n// end;\r\n// finally\r\n// Img.Free;\r\n// end;\r\n// Result := True;\r\n// end;\r\n\r\n// function CreateCairoImage: Pcairo_surface_t;\r\n// var\r\n// buf: PByte;\r\n// begin\r\n// try\r\n// buf := GetMem(ABitmap.Width*ABitmap.Height*4);\r\n//\r\n// if not GraphicToARGB32(ABitmap, buf) then\r\n// Exit;\r\n//\r\n// Result := cairo_image_surface_create_for_data(buf, CAIRO_FORMAT_ARGB32, ABitmap.Width, ABitmap.Height, ABitmap.Width * 4);\r\n// finally\r\n// Freemem(buf);\r\n// end;\r\n// end;\r\nbegin\r\n if not Assigned(ABitmap) or not Assigned(FNCanvas) then\r\n Exit;\r\n\r\n SaveContext;\r\n// R := ADstRect;\r\n// img := CreateCairoImage;\r\n try\r\n// cairo_translate(FNCanvas, R.Left, R.Top);\r\n// cairo_scale(FNCanvas, r.Width / ABitmap.Width, r.Height / ABitmap.Height);\r\n// cairo_set_source_surface(FNCanvas, img, 0, 0);\r\n// cairo_paint(FNCanvas);\r\n finally\r\n// cairo_surface_destroy(img);\r\n end;\r\n RestoreContext;\r\nend;\r\n\r\nprocedure TTMSFNCGraphicsContextWEB.DrawEllipse(AStroke: TTMSFNCGraphicsStroke;\r\n ARect: TRectF; AModifyRectMode: TTMSFNCGraphicsModifyRectMode);\r\n//var\r\n// r: TRectF;\r\nbegin\r\n if not Assigned(FNCanvas) then\r\n Exit;\r\n\r\n// r := ARect;\r\n SaveContext;\r\n// cairo_new_path(FNCanvas);\r\n// cairo_arc(FNCanvas, r.Left + r.Width / 2, r.Top + r.Height / 2, r.Width / 2, 0, 2 * PI);\r\n ApplyStroke;\r\n// cairo_stroke(FNCanvas);\r\n RestoreContext;\r\nend;\r\n\r\nprocedure TTMSFNCGraphicsContextWEB.DrawFocusPath(\r\n AStroke: TTMSFNCGraphicsStroke; APath: TTMSFNCGraphicsPath;\r\n AColor: TTMSFNCGraphicsColor);\r\nbegin\r\n if not Assigned(FNCanvas) then\r\n Exit;\r\nend;\r\n\r\nprocedure TTMSFNCGraphicsContextWEB.DrawFocusRectangle(\r\n AStroke: TTMSFNCGraphicsStroke; ARect: TRectF; AColor: TTMSFNCGraphicsColor;\r\n AModifyRectMode: TTMSFNCGraphicsModifyRectMode);\r\nbegin\r\n if not Assigned(FNCanvas) then\r\n Exit;\r\n\r\nend;\r\n\r\nprocedure TTMSFNCGraphicsContextWEB.DrawLine(AStroke: TTMSFNCGraphicsStroke;\r\n AFromPoint: TPointF; AToPoint: TPointF;\r\n AModifyPointModeFrom: TTMSFNCGraphicsModifyPointMode;\r\n AModifyPointModeTo: TTMSFNCGraphicsModifyPointMode);\r\nbegin\r\n if not Assigned(FNCanvas) then\r\n Exit;\r\n\r\n SaveContext;\r\n// cairo_new_path(FNCanvas);\r\n// cairo_move_to(FNCanvas, AFromPoint.X, AFromPoint.Y);\r\n// cairo_line_to(FNCanvas, AToPoint.X, AToPoint.Y);\r\n// cairo_stroke(FNCanvas);\r\n RestoreContext;\r\nend;\r\n\r\nprocedure TTMSFNCGraphicsContextWEB.DrawLinearGradient(ARect: TRectF);\r\n//var\r\n// pat: Pcairo_pattern_t;\r\nbegin\r\n if not Assigned(FNCanvas) then\r\n Exit;\r\n\r\n case FFill.Orientation of\r\n gfoHorizontal: {pat := cairo_pattern_create_linear(ARect.Left, ARect.Top + ARect.Height / 2, ARect.Right, ARect.Top + ARect.Height / 2)};\r\n gfoVertical: {pat := cairo_pattern_create_linear(ARect.Left + ARect.Width / 2, ARect.Top, ARect.Left + ARect.Width / 2, ARect.Bottom)};\r\n end;\r\n\r\n if (FFill.ColorTo <> gcnull) and (FFill.ColorMirror <> gcNull) then\r\n begin\r\n// cairo_pattern_add_color_stop_rgba(pat, 0, TTMSFNCGraphics.GetColorRed(FFill.Color) / 255, TTMSFNCGraphics.GetColorGreen(FFill.Color) / 255, TTMSFNCGraphics.GetColorBlue(FFill.Color) / 255, FFill.Opacity);\r\n// cairo_pattern_add_color_stop_rgba(pat, 0.5, TTMSFNCGraphics.GetColorRed(FFill.ColorTo) / 255, TTMSFNCGraphics.GetColorGreen(FFill.ColorTo) / 255, TTMSFNCGraphics.GetColorBlue(FFill.ColorTo) / 255, FFill.Opacity);\r\n// cairo_pattern_add_color_stop_rgba(pat, 0.5, TTMSFNCGraphics.GetColorRed(FFill.ColorMirror) / 255, TTMSFNCGraphics.GetColorGreen(FFill.ColorMirror) / 255, TTMSFNCGraphics.GetColorBlue(FFill.ColorMirror) / 255, FFill.Opacity);\r\n// cairo_pattern_add_color_stop_rgba(pat, 1, TTMSFNCGraphics.GetColorRed(FFill.ColorMirrorTo) / 255, TTMSFNCGraphics.GetColorGreen(FFill.ColorMirrorTo) / 255, TTMSFNCGraphics.GetColorBlue(FFill.ColorMirrorTo) / 255, FFill.Opacity);\r\n end\r\n else if FFill.ColorTo <> gcNull then\r\n begin\r\n// cairo_pattern_add_color_stop_rgba(pat, 0, TTMSFNCGraphics.GetColorRed(FFill.Color) / 255, TTMSFNCGraphics.GetColorGreen(FFill.Color) / 255, TTMSFNCGraphics.GetColorBlue(FFill.Color) / 255, FFill.Opacity);\r\n// cairo_pattern_add_color_stop_rgba(pat, 1, TTMSFNCGraphics.GetColorRed(FFill.ColorTo) / 255, TTMSFNCGraphics.GetColorGreen(FFill.ColorTo) / 255, TTMSFNCGraphics.GetColorBlue(FFill.ColorTo) / 255, FFill.Opacity);\r\n end;\r\n\r\n// cairo_rectangle(FNCanvas, ARect.Left, ARect.Top, ARect.Width, ARect.Height);\r\n// cairo_set_source(FNCanvas, pat);\r\n// cairo_fill(FNCanvas);\r\n// cairo_pattern_destroy(pat);\r\nend;\r\n\r\nprocedure TTMSFNCGraphicsContextWEB.DrawPath(AStroke: TTMSFNCGraphicsStroke;\r\n APath: TTMSFNCGraphicsPath; APathMode: TTMSFNCGraphicsPathDrawMode);\r\nvar\r\n p: TTMSFNCGraphicsPathPolygon;\r\nbegin\r\n if Assigned(APath) then\r\n begin\r\n FActivePath := APath;\r\n SetLength(p, 0);\r\n APath.FlattenToPolygon(p);\r\n case APathMode of\r\n pdmPolygon: DrawPolygon(AStroke, p);\r\n pdmPolyline: DrawPolyline(AStroke, p);\r\n end;\r\n FActivePath := nil;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCGraphicsContextWEB.DrawPolygon(AStroke: TTMSFNCGraphicsStroke;\r\n APolygon: TTMSFNCGraphicsPathPolygon);\r\n//var\r\n// I: Integer;\r\nbegin\r\n if not Assigned(FNCanvas) then\r\n Exit;\r\n\r\n if Length(APolygon) = 0 then\r\n Exit;\r\n\r\n SaveContext;\r\n// cairo_new_path(FNCanvas);\r\n// cairo_move_to(FNCanvas, APolygon[0].X, APolygon[0].Y);\r\n// for I := 1 to Length(APolygon) - 1 do\r\n// cairo_line_to(FNCanvas, APolygon[I].X, APolygon[I].Y);\r\n// cairo_close_path(FNCanvas);\r\n ApplyStroke;\r\n// cairo_stroke(FNCanvas);\r\n RestoreContext;\r\nend;\r\n\r\nprocedure TTMSFNCGraphicsContextWEB.DrawPolyline(AStroke: TTMSFNCGraphicsStroke;\r\n APolyline: TTMSFNCGraphicsPathPolygon);\r\n//var\r\n// I: Integer;\r\nbegin\r\n if not Assigned(FNCanvas) then\r\n Exit;\r\n\r\n if Length(APolyline) = 0 then\r\n Exit;\r\n\r\n SaveContext;\r\n// cairo_new_path(FNCanvas);\r\n// cairo_move_to(FNCanvas, APolyline[0].X, APolyline[0].Y);\r\n// for I := 1 to Length(APolyline) - 1 do\r\n// cairo_line_to(FNCanvas, APolyline[I].X, APolyline[I].Y);\r\n ApplyStroke;\r\n// cairo_stroke(FNCanvas);\r\n RestoreContext;\r\nend;\r\n\r\nprocedure TTMSFNCGraphicsContextWEB.DrawRect(AStroke: TTMSFNCGraphicsStroke;\r\n ARect: TRectF; ASides: TTMSFNCGraphicsSides;\r\n AModifyRectMode: TTMSFNCGraphicsModifyRectMode);\r\nvar\r\n r: TRectF;\r\nbegin\r\n if not Assigned(FNCanvas) then\r\n Exit;\r\n\r\n r := ARect;\r\n if gsTop in ASides then\r\n DrawLine(AStroke, PointF(r.Left, r.Top), PointF(r.Right, r.Top));\r\n if gsLeft in ASides then\r\n DrawLine(AStroke, PointF(r.Left, r.Top), PointF(r.Left, r.Bottom));\r\n if gsBottom in ASides then\r\n DrawLine(AStroke, PointF(r.Left, r.Bottom), PointF(r.Right, r.Bottom));\r\n if gsRight in ASides then\r\n DrawLine(AStroke, PointF(r.Right, r.Top), PointF(r.Right, r.Bottom));\r\nend;\r\n\r\nprocedure TTMSFNCGraphicsContextWEB.DrawRoundRect(\r\n AStroke: TTMSFNCGraphicsStroke; ARect: TRectF; ARounding: Single;\r\n ACorners: TTMSFNCGraphicsCorners;\r\n AModifyRectMode: TTMSFNCGraphicsModifyRectMode);\r\nvar\r\n pth: TTMSFNCGraphicsPath;\r\n r: TRectF;\r\n rc: Single;\r\nbegin\r\n r := ARect;\r\n rc := ARounding;\r\n\r\n pth := TTMSFNCGraphicsPath.Create;\r\n try\r\n if gcBottomLeft in ACorners then\r\n begin\r\n pth.MoveTo(PointF(r.Left + rc, r.Bottom));\r\n pth.AddArc(PointF(r.Left + rc, r.Bottom - rc), PointF(rc, rc), -270, 90);\r\n pth.LineTo(PointF(r.Left, r.Bottom - rc));\r\n end\r\n else\r\n begin\r\n pth.MoveTo(PointF(r.Left, r.Bottom));\r\n end;\r\n\r\n if gcTopLeft in ACorners then\r\n begin\r\n pth.LineTo(PointF(r.Left, r.Top + rc));\r\n pth.AddArc(PointF(r.Left + rc, r.Top + rc), PointF(rc, rc), -180, 90);\r\n pth.LineTo(PointF(r.Left + rc, r.Top));\r\n end\r\n else\r\n pth.LineTo(PointF(r.Left, r.Top));\r\n\r\n if gcTopRight in ACorners then\r\n begin\r\n pth.LineTo(PointF(r.Right - rc, r.Top));\r\n pth.AddArc(PointF(r.Right - rc, r.Top + rc), PointF(rc, rc), -90, 90);\r\n pth.LineTo(PointF(r.Right, r.Top + rc));\r\n end\r\n else\r\n pth.LineTo(PointF(r.Right, r.Top));\r\n\r\n if gcBottomRight in ACorners then\r\n begin\r\n pth.LineTo(PointF(r.Right, r.Bottom - rc));\r\n pth.AddArc(PointF(r.Right - rc, r.Bottom - rc), PointF(rc, rc), 0, 90);\r\n pth.LineTo(PointF(r.Right - rc, r.Bottom));\r\n end\r\n else\r\n pth.LineTo(PointF(r.Right, r.Bottom));\r\n\r\n if gcBottomLeft in ACorners then\r\n pth.LineTo(PointF(r.Left + rc, r.Bottom))\r\n else\r\n pth.LineTo(PointF(r.Left, r.Bottom));\r\n\r\n pth.ClosePath;\r\n\r\n DrawPath(FStroke, pth);\r\n finally\r\n pth.Free;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCGraphicsContextWEB.DrawText(AText: string; ARect: TRectF;\r\n AWordWrapping: Boolean; AHorizontalAlign,\r\n AVerticalAlign: TTMSFNCGraphicsTextAlign;\r\n ATrimming: TTMSFNCGraphicsTextTrimming; AAngle: Single);\r\nvar\r\n R: TRectF;\r\nbegin\r\n if not Assigned(FNCanvas) then\r\n Exit;\r\n\r\n SaveContext;\r\n R := DrawTextInternal(AText, ARect, AWordWrapping, AHorizontalAlign, True);\r\n case AVerticalAlign of\r\n gtaCenter: DrawTextInternal(AText, RectF(ARect.Left, ARect.Top + ((ARect.Bottom - ARect.Top) - (r.Bottom - r.Top)) / 2, ARect.Right, ARect.Top + ((ARect.Bottom - ARect.Top) - (r.Bottom - r.Top)) / 2 + (r.Bottom - r.Top)), AWordWrapping, AHorizontalAlign, False);\r\n gtaLeading: DrawTextInternal(AText, RectF(ARect.Left, ARect.Top, ARect.Right, ARect.Top + (r.Bottom - r.Top)), AWordWrapping, AHorizontalAlign, False);\r\n gtaTrailing: DrawTextInternal(AText, RectF(ARect.Left, ARect.Bottom - (r.Bottom - r.Top), ARect.Right, ARect.Bottom), AWordWrapping, AHorizontalAlign, False);\r\n end;\r\n RestoreContext;\r\nend;\r\n\r\nprocedure TTMSFNCGraphicsContextWEB.EndScene;\r\nbegin\r\n if not Assigned(FNCanvas) then\r\n Exit;\r\n\r\n Render;\r\nend;\r\n\r\nprocedure TTMSFNCGraphicsContextWEB.FillArc(AFill: TTMSFNCGraphicsFill; ACenter,\r\n ARadius: TPointF; AStartAngle, ASweepAngle: Single);\r\nbegin\r\n if not Assigned(FNCanvas) then\r\n Exit;\r\n\r\n SaveContext;\r\n// cairo_new_path(FNCanvas);\r\n// cairo_arc(FNCanvas, ACenter.X, ACenter.Y, ARadius.X, DegToRad(AStartAngle), DegToRad(AStartAngle + ASweepAngle));\r\n case AFill.Kind of\r\n gfkSolid:\r\n begin\r\n ApplyFill;\r\n// cairo_fill(FNCanvas);\r\n end;\r\n gfkGradient:\r\n begin\r\n// cairo_clip(FNCanvas);\r\n DrawLinearGradient(RectF(ACenter.X - ARadius.X, ACenter.Y - ARadius.Y, ACenter.X + ARadius.X, ACenter.Y + ARadius.Y));\r\n end;\r\n end;\r\n RestoreContext;\r\nend;\r\n\r\nprocedure TTMSFNCGraphicsContextWEB.FillChanged(Sender: TObject);\r\nbegin\r\n if not Assigned(FNCanvas) then\r\n Exit;\r\n\r\n ApplyFill;\r\nend;\r\n\r\nprocedure TTMSFNCGraphicsContextWEB.FillEllipse(AFill: TTMSFNCGraphicsFill;\r\n ARect: TRectF; AModifyRectMode: TTMSFNCGraphicsModifyRectMode);\r\nvar\r\n r: TRectF;\r\nbegin\r\n if not Assigned(FNCanvas) then\r\n Exit;\r\n\r\n r := ARect;\r\n SaveContext;\r\n// cairo_new_path(FNCanvas);\r\n// cairo_arc(FNCanvas, r.Left + r.Width / 2, r.Top + r.Height / 2, r.Width / 2, 0, 2 * PI);\r\n case AFill.Kind of\r\n gfkSolid:\r\n begin\r\n ApplyFill;\r\n// cairo_fill(FNCanvas);\r\n end;\r\n gfkGradient:\r\n begin\r\n// cairo_clip(FNCanvas);\r\n DrawLinearGradient(r);\r\n end;\r\n end;\r\n RestoreContext;\r\nend;\r\n\r\nprocedure TTMSFNCGraphicsContextWEB.FillPath(AFill: TTMSFNCGraphicsFill;\r\n APath: TTMSFNCGraphicsPath; APathMode: TTMSFNCGraphicsPathDrawMode);\r\nvar\r\n p: TTMSFNCGraphicsPathPolygon;\r\nbegin\r\n if Assigned(APath) then\r\n begin\r\n FActivePath := APath;\r\n SetLength(p, 0);\r\n APath.FlattenToPolygon(p);\r\n case APathMode of\r\n pdmPolygon: FillPolygon(AFill, p);\r\n pdmPolyline: FillPolyline(AFill, p);\r\n end;\r\n FActivePath := nil;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCGraphicsContextWEB.FillPolygon(AFill: TTMSFNCGraphicsFill;\r\n APolygon: TTMSFNCGraphicsPathPolygon);\r\n//var\r\n// I: Integer;\r\nbegin\r\n if not Assigned(FNCanvas) then\r\n Exit;\r\n\r\n if Length(Apolygon) = 0 then\r\n Exit;\r\n\r\n SaveContext;\r\n// cairo_new_path(FNCanvas);\r\n// cairo_move_to(FNCanvas, APolygon[0].X, APolygon[0].Y);\r\n// for I := 1 to Length(APolygon) - 1 do\r\n// cairo_line_to(FNCanvas, APolygon[I].X, APolygon[I].Y);\r\n// cairo_close_path(FNCanvas);\r\n case AFill.Kind of\r\n gfkSolid:\r\n begin\r\n ApplyFill;\r\n// cairo_fill(FNCanvas);\r\n end;\r\n gfkGradient:\r\n begin\r\n// cairo_clip(FNCanvas);\r\n if Assigned(FActivePath) then\r\n DrawLinearGradient(FActivePath.GetBounds);\r\n end;\r\n end;\r\n RestoreContext;\r\nend;\r\n\r\nprocedure TTMSFNCGraphicsContextWEB.FillPolyline(AFill: TTMSFNCGraphicsFill;\r\n APolyline: TTMSFNCGraphicsPathPolygon);\r\n//var\r\n// I: Integer;\r\nbegin\r\n if not Assigned(FNCanvas) then\r\n Exit;\r\n\r\n if Length(APolyline) = 0 then\r\n Exit;\r\n\r\n SaveContext;\r\n// cairo_new_path(FNCanvas);\r\n// cairo_move_to(FNCanvas, APolyline[0].X, APolyline[0].Y);\r\n// for I := 1 to Length(APolyline) - 1 do\r\n// cairo_line_to(FNCanvas, APolyline[I].X, APolyline[I].Y);\r\n case AFill.Kind of\r\n gfkSolid:\r\n begin\r\n ApplyFill;\r\n// cairo_fill(FNCanvas);\r\n end;\r\n gfkGradient:\r\n begin\r\n// cairo_clip(FNCanvas);\r\n if Assigned(FActivePath) then\r\n DrawLinearGradient(FActivePath.GetBounds);\r\n end;\r\n end;\r\n RestoreContext;\r\nend;\r\n\r\nprocedure TTMSFNCGraphicsContextWEB.FillRect(AFill: TTMSFNCGraphicsFill;\r\n ARect: TRectF; AModifyRectMode: TTMSFNCGraphicsModifyRectMode);\r\nvar\r\n r: TRectF;\r\nbegin\r\n if not Assigned(FNCanvas) then\r\n Exit;\r\n\r\n r := ARect;\r\n SaveContext;\r\n// cairo_new_path(FNCanvas);\r\n// cairo_rectangle(FNCanvas, r.Left, r.Top, r.Width, r.Height);\r\n case AFill.Kind of\r\n gfkSolid:\r\n begin\r\n ApplyFill;\r\n// cairo_fill(FNCanvas);\r\n end;\r\n gfkGradient:\r\n begin\r\n// cairo_clip(FNCanvas);\r\n DrawLinearGradient(r);\r\n end;\r\n end;\r\n RestoreContext;\r\nend;\r\n\r\nprocedure TTMSFNCGraphicsContextWEB.FillRoundRect(AFill: TTMSFNCGraphicsFill;\r\n ARect: TRectF; ARounding: Single; ACorners: TTMSFNCGraphicsCorners;\r\n AModifyRectMode: TTMSFNCGraphicsModifyRectMode);\r\nvar\r\n pth: TTMSFNCGraphicsPath;\r\n r: TRectF;\r\n rc: Single;\r\nbegin\r\n r := ARect;\r\n rc := ARounding;\r\n\r\n pth := TTMSFNCGraphicsPath.Create;\r\n try\r\n if gcBottomLeft in ACorners then\r\n begin\r\n pth.MoveTo(PointF(r.Left + rc, r.Bottom));\r\n pth.AddArc(PointF(r.Left + rc, r.Bottom - rc), PointF(rc, rc), -270, 90);\r\n pth.LineTo(PointF(r.Left, r.Bottom - rc));\r\n end\r\n else\r\n begin\r\n pth.MoveTo(PointF(r.Left, r.Bottom));\r\n end;\r\n\r\n if gcTopLeft in ACorners then\r\n begin\r\n pth.LineTo(PointF(r.Left, r.Top + rc));\r\n pth.AddArc(PointF(r.Left + rc, r.Top + rc), PointF(rc, rc), -180, 90);\r\n pth.LineTo(PointF(r.Left + rc, r.Top));\r\n end\r\n else\r\n pth.LineTo(PointF(r.Left, r.Top));\r\n\r\n if gcTopRight in ACorners then\r\n begin\r\n pth.LineTo(PointF(r.Right - rc, r.Top));\r\n pth.AddArc(PointF(r.Right - rc, r.Top + rc), PointF(rc, rc), -90, 90);\r\n pth.LineTo(PointF(r.Right, r.Top + rc));\r\n end\r\n else\r\n pth.LineTo(PointF(r.Right, r.Top));\r\n\r\n if gcBottomRight in ACorners then\r\n begin\r\n pth.LineTo(PointF(r.Right, r.Bottom - rc));\r\n pth.AddArc(PointF(r.Right - rc, r.Bottom - rc), PointF(rc, rc), 0, 90);\r\n pth.LineTo(PointF(r.Right - rc, r.Bottom));\r\n end\r\n else\r\n pth.LineTo(PointF(r.Right, r.Bottom));\r\n\r\n if gcBottomLeft in ACorners then\r\n pth.LineTo(PointF(r.Left + rc, r.Bottom))\r\n else\r\n pth.LineTo(PointF(r.Left, r.Bottom));\r\n\r\n pth.ClosePath;\r\n\r\n FillPath(FFill, pth);\r\n finally\r\n pth.Free;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCGraphicsContextWEB.FontChanged(Sender: TObject);\r\nbegin\r\nend;\r\n\r\nfunction TTMSFNCGraphicsContextWEB.GetFillColor: TTMSFNCGraphicsColor;\r\nbegin\r\n Result := Graphics.Fill.Color;\r\nend;\r\n\r\nfunction TTMSFNCGraphicsContextWEB.GetNativeCanvas: Pointer;\r\nbegin\r\n Result := FNCanvas;\r\nend;\r\n\r\nprocedure TTMSFNCGraphicsContextWEB.PathClose(APath: Pointer);\r\nbegin\r\n// cairo_close_path(FNCanvas);\r\nend;\r\n\r\nprocedure TTMSFNCGraphicsContextWEB.PathLineTo(APath: Pointer; APoint: TPointF);\r\nbegin\r\n// cairo_line_to(FNCanvas, APoint.X, APoint.Y);\r\nend;\r\n\r\nprocedure TTMSFNCGraphicsContextWEB.PathMoveTo(APath: Pointer; APoint: TPointF);\r\nbegin\r\n// cairo_move_to(FNCanvas, APoint.X, APoint.Y);\r\nend;\r\n\r\nprocedure TTMSFNCGraphicsContextWEB.PathOpen(APath: Pointer);\r\nbegin\r\nend;\r\n\r\nprocedure TTMSFNCGraphicsContextWEB.Render;\r\nbegin\r\n if not FNeedsRendering then\r\n Exit;\r\n\r\n// if Assigned(FNCanvas) and Assigned(FBitmap) then\r\n// Canvas.Draw(0, 0, FBitmap);\r\n\r\n FNeedsRendering := False;\r\n DestroyResources;\r\nend;\r\n\r\nprocedure TTMSFNCGraphicsContextWEB.ResetClip;\r\nbegin\r\n if not Assigned(FNCanvas) then\r\n Exit;\r\n\r\n RestoreContext;\r\nend;\r\n\r\nprocedure TTMSFNCGraphicsContextWEB.ResetTextAngle(AAngle: Single);\r\nbegin\r\n if not Assigned(FNCanvas) then\r\n Exit;\r\n\r\n if AAngle <> 0 then\r\n RestoreContext;\r\nend;\r\n\r\nprocedure TTMSFNCGraphicsContextWEB.ResetTransform;\r\nbegin\r\n if not Assigned(FNCanvas) then\r\n Exit;\r\n\r\n RestoreContext;\r\n SaveContext;\r\nend;\r\n\r\nprocedure TTMSFNCGraphicsContextWEB.RestoreState(\r\n AState: TTMSFNCGraphicsSaveState);\r\nbegin\r\n if not Assigned(FNCanvas) then\r\n Exit;\r\n\r\n RestoreContext;\r\nend;\r\n\r\nprocedure TTMSFNCGraphicsContextWEB.RotateTransform(AAngle: Single);\r\nbegin\r\n if not Assigned(FNCanvas) then\r\n Exit;\r\n\r\n// cairo_rotate(FNCanvas, DegToRad(AAngle));\r\nend;\r\n\r\nfunction TTMSFNCGraphicsContextWEB.DrawTextInternal(AText: String; ARect: TRectF; AWordWrap: Boolean; AHorizontalAlignment: TTMSFNCGraphicsTextAlign; ACalculate: Boolean): TRectF;\r\nvar\r\n i: Integer;\r\n s, sn: string;\r\n// st: string;\r\n l: Integer;\r\n w, mw: Single;\r\n f: Boolean;\r\n //p: Integer;\r\n tw: Single;\r\n th: Single;\r\n lcnt: Integer;\r\n rs: TRectF;\r\n fws: Single;\r\n// te: cairo_text_extents_t;\r\n// ths: Single;\r\n\r\n procedure ApplyFont;\r\n// var\r\n// slant: cairo_font_slant_t;\r\n// weight: cairo_font_weight_t;\r\n// fn: string;\r\n// sz: Single;\r\n begin\r\n// fn := FFont.Name;\r\n// if (fn = '') or (UpperCase(fn) = 'DEFAULT') then\r\n// fn := 'sans-serif';\r\n//\r\n// sz := FFont.Size;\r\n// if sz = 0 then\r\n// sz := 12;\r\n//\r\n// if fsBold in FFont.Style then\r\n// weight := CAIRO_FONT_WEIGHT_BOLD\r\n// else\r\n// weight := CAIRO_FONT_WEIGHT_NORMAL;\r\n//\r\n// if fsItalic in FFont.Style then\r\n// slant := CAIRO_FONT_SLANT_ITALIC\r\n// else\r\n// slant := CAIRO_FONT_SLANT_NORMAL;\r\n//\r\n// cairo_select_font_face(FNCanvas, PChar(fn), slant, weight);\r\n// cairo_set_font_size(FNCanvas, sz * 1.3);\r\n// cairo_set_source_rgb(FNCanvas, TTMSFNCGraphics.GetColorRed(FFont.Color) / 255, TTMSFNCGraphics.GetColorGreen(FFont.Color) / 255,\r\n// TTMSFNCGraphics.GetColorBlue(FFont.Color) / 255);\r\n end;\r\n\r\n function FindNextWord(AText: String; var APos: Integer): String;\r\n var\r\n l: integer;\r\n i: integer;\r\n begin\r\n Result := '';\r\n\r\n l := Length(AText);\r\n if APos > l then\r\n Exit;\r\n\r\n i := APos;\r\n while True do\r\n begin\r\n if ((AText[i] = #10) and (AText[i - 1] = #13)) or ((AText[i] = #13) and (AText[i - 1] = #10)) or (AText[i] = ' ') then\r\n begin\r\n if AText[i] = ' ' then\r\n Result := Copy(AText, APos, i - (APos - 1))\r\n else\r\n Result := Copy(AText, APos, i - APos);\r\n\r\n Break;\r\n end\r\n else if (AText[i] = #10) or (AText[i] = #13) or (AText[i] = ' ') then\r\n begin\r\n result := Copy(AText, APos, i - (APos - 1));\r\n Break;\r\n end\r\n else if i >= l then\r\n begin\r\n result := Copy(AText, APos, i - (APos - 1));\r\n Break;\r\n end\r\n else\r\n inc(i);\r\n end;\r\n\r\n APos := i + 1;\r\n end;\r\nbegin\r\n ApplyFont;\r\n if not AWordWrap then\r\n begin\r\n// cairo_text_extents(FNCanvas, PChar(AText), @te);\r\n if not ACalculate then\r\n begin\r\n// case AHorizontalAlignment of\r\n// gtaCenter: cairo_move_to(FNCanvas, ARect.Left + (ARect.Width - te.x_advance) / 2, ARect.Top + te.height);\r\n// gtaLeading: cairo_move_to(FNCanvas, ARect.Left, ARect.Top + te.height);\r\n// gtaTrailing: cairo_move_to(FNCanvas, ARect.Right - te.x_advance, ARect.Top + te.height);\r\n// end;\r\n// cairo_show_text(FNCanvas, PChar(AText));\r\n end;\r\n// Result := RectF(ARect.Left, ARect.Top, ARect.Left + te.x_advance, ARect.Top + te.Height);\r\n end\r\n else\r\n begin\r\n rs := ARect;\r\n\r\n mw := 0;\r\n i := 1;\r\n// ths := FFont.Size * 0.5;\r\n lcnt := 0;\r\n fws := 0;\r\n tw := 0;\r\n s := FindNextWord(AText, i);\r\n// cairo_text_extents(FNCanvas, PChar(s), @te);\r\n// w := te.x_advance;\r\n// th := te.Height + ths;\r\n\r\n mw := mw + w;\r\n if (Length(s) > 0) and (s[Length(s)] = ' ') then\r\n mw := mw + fws;\r\n\r\n while i <= Length(AText) do\r\n begin\r\n l := Length(s);\r\n if (l >= 2) and (((s[l] = #10) and (s[l - 1] = #13)) or ((s[l] = #13) and (s[l - 1] = #10))) then\r\n begin\r\n s := Copy(s, 1, l - 2);\r\n f := True;\r\n end\r\n else if (l >= 1) and ((s[l] = #10) or (s[l] = #13)) then\r\n begin\r\n s := Copy(s, 1, l - 1);\r\n f := True;\r\n end\r\n else\r\n f := False;\r\n\r\n sn := FindNextWord(AText, i);\r\n// cairo_text_extents(FNCanvas, PChar(sn), @te);\r\n// w := te.x_advance;\r\n// th := Max(th, te.Height + ths);\r\n\r\n if (ARect.Left + mw + w > ARect.Right) or f then\r\n begin\r\n if s <> '' then\r\n begin\r\n// p := Length(s);\r\n// st := Copy(s, 1, p);\r\n\r\n Inc(lcnt);\r\n if mw > tw then\r\n tw := mw;\r\n\r\n if not ACalculate then\r\n begin\r\n// case AHorizontalAlignment of\r\n// gtaCenter: cairo_move_to(FNCanvas, ARect.Left + (ARect.Width - mw) / 2, ARect.Top + th);\r\n// gtaLeading: cairo_move_to(FNCanvas, ARect.Left, ARect.Top + th);\r\n// gtaTrailing: cairo_move_to(FNCanvas, ARect.Right - mw, ARect.Top + th);\r\n// end;\r\n// cairo_show_text(FNCanvas, PChar(st));\r\n end;\r\n\r\n mw := 0;\r\n end;\r\n\r\n s := '';\r\n\r\n ARect.Top := ARect.Top + th;\r\n if (Trunc(ARect.Top) > Trunc(ARect.Bottom - th)) and not ACalculate then\r\n Break;\r\n end;\r\n\r\n mw := mw + w;\r\n if (Length(sn) > 0) and (sn[Length(sn)] = ' ') then\r\n mw := mw + fws;\r\n s := s + sn;\r\n end;\r\n\r\n if s <> '' then\r\n begin\r\n// p := Length(s);\r\n// st := Copy(s, 1, p);\r\n Inc(lcnt);\r\n if mw > tw then\r\n tw := mw;\r\n\r\n if not ACalculate then\r\n begin\r\n// case AHorizontalAlignment of\r\n// gtaCenter: cairo_move_to(FNCanvas, ARect.Left + (ARect.Width - mw) / 2, ARect.Top + th);\r\n// gtaLeading: cairo_move_to(FNCanvas, ARect.Left, ARect.Top + th);\r\n// gtaTrailing: cairo_move_to(FNCanvas, ARect.Right - mw, ARect.Top + th);\r\n// end;\r\n// cairo_show_text(FNCanvas, PChar(st));\r\n end;\r\n end;\r\n\r\n Result := RectF(rs.Left, rs.Top, rs.Left + tw, rs.Top + lcnt * th);\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCGraphicsContextWEB.SaveContext;\r\nbegin\r\n if not Assigned(FNCanvas) then\r\n Exit;\r\n\r\n// cairo_save(FNCanvas);\r\nend;\r\n\r\nprocedure TTMSFNCGraphicsContextWEB.RestoreContext;\r\nbegin\r\n if not Assigned(FNCanvas) then\r\n Exit;\r\n\r\n// cairo_restore(FNCanvas);\r\nend;\r\n\r\nprocedure TTMSFNCGraphicsContextWEB.SaveState(AState: TTMSFNCGraphicsSaveState);\r\nbegin\r\n if not Assigned(FNCanvas) then\r\n Exit;\r\n\r\n SaveContext;\r\nend;\r\n\r\nprocedure TTMSFNCGraphicsContextWEB.ScaleTransform(AX, AY: Single);\r\nbegin\r\n if not Assigned(FNCanvas) then\r\n Exit;\r\n\r\n// cairo_scale(FNCanvas, AX, AY);\r\nend;\r\n\r\nprocedure TTMSFNCGraphicsContextWEB.SetSize(AWidth, AHeight: Single);\r\nbegin\r\n FContextSize.cx := AWidth;\r\n FContextSize.cy := AHeight;\r\n\r\n DestroyResources;\r\n\r\n FBitmap := TBitmap.Create;\r\n// FBitmap.SetSize(Round(AWidth * FScale), Round(AHeight * FScale));\r\n// FBitmap.Canvas.Brush.Style := bsSolid;\r\n// FBitmap.Canvas.Brush.Color := gcWhite;\r\n// FBitmap.Canvas.FillRect(0, 0, FBitmap.Width, FBitmap.Height);\r\n\r\n// {$IFDEF LINUX}\r\n// {$IFDEF LCLGTK2}\r\n// FNCanvas := gdk_cairo_create(TGtkDeviceContext(FBitmap.Canvas.Handle).Drawable);\r\n// {$ENDIF}\r\n// {$ENDIF}\r\n// {$IFDEF DARWIN}\r\n// FNCanvas := nil;\r\n// {$ENDIF}\r\n ScaleTransform(FScale, FScale);\r\n SaveContext;\r\nend;\r\n\r\nprocedure TTMSFNCGraphicsContextWEB.SetTextQuality(ATextQuality: TTMSFNCGraphicsTextQuality);\r\nbegin\r\nend;\r\n\r\nprocedure TTMSFNCGraphicsContextWEB.SetShowAcceleratorChar(AShowAcceleratorChar: Boolean);\r\nbegin\r\nend;\r\n\r\nprocedure TTMSFNCGraphicsContextWEB.SetAntiAliasing(AAntiAliasing: Boolean);\r\nbegin\r\n if not Assigned(FNCanvas) then\r\n Exit;\r\n\r\n// if AAntiAliasing then\r\n// begin\r\n// {$IFDEF LINUX}\r\n// cairo_set_antialias(FNCanvas, CAIRO_ANTIALIAS_BEST);\r\n// {$ENDIF}\r\n// {$IFDEF DARWIN}\r\n// cairo_set_antialias(FNCanvas, CAIRO_ANTIALIAS_DEFAULT);\r\n// {$ENDIF}\r\n// end\r\n// else\r\n// cairo_set_antialias(FNCanvas, CAIRO_ANTIALIAS_NONE);\r\nend;\r\n\r\nprocedure TTMSFNCGraphicsContextWEB.SetFill(AFill: TTMSFNCGraphicsFill);\r\nbegin\r\n if not Assigned(FNCanvas) then\r\n Exit;\r\n\r\n FFill.Assign(AFill);\r\nend;\r\n\r\nprocedure TTMSFNCGraphicsContextWEB.SetFillColor(AColor: TTMSFNCGraphicsColor);\r\nbegin\r\n if not Assigned(FNCanvas) then\r\n Exit;\r\n\r\n FFill.Color := AColor;\r\nend;\r\n\r\nprocedure TTMSFNCGraphicsContextWEB.SetFillKind(AKind: TTMSFNCGraphicsFillKind);\r\nbegin\r\n if not Assigned(FNCanvas) then\r\n Exit;\r\n\r\n FFill.Kind := AKind;\r\nend;\r\n\r\nprocedure TTMSFNCGraphicsContextWEB.SetFont(AFont: TTMSFNCGraphicsFont);\r\nbegin\r\n if not Assigned(FNCanvas) then\r\n Exit;\r\n\r\n FFont.AssignSource(AFont);\r\nend;\r\n\r\nprocedure TTMSFNCGraphicsContextWEB.SetFontColor(AColor: TTMSFNCGraphicsColor);\r\nbegin\r\n if not Assigned(FNCanvas) then\r\n Exit;\r\n\r\n FFont.Color := AColor;\r\nend;\r\n\r\nprocedure TTMSFNCGraphicsContextWEB.SetFontName(AName: string);\r\nbegin\r\n if not Assigned(FNCanvas) then\r\n Exit;\r\n\r\n FFont.Name := AName;\r\nend;\r\n\r\nprocedure TTMSFNCGraphicsContextWEB.SetFontSize(ASize: Integer);\r\nbegin\r\n if not Assigned(FNCanvas) then\r\n Exit;\r\n\r\n FFont.Size := ASize;\r\nend;\r\n\r\nprocedure TTMSFNCGraphicsContextWEB.SetFontStyles(AStyle: TFontStyles);\r\nbegin\r\n if not Assigned(FNCanvas) then\r\n Exit;\r\n\r\n FFont.Style := AStyle;\r\nend;\r\n\r\nprocedure TTMSFNCGraphicsContextWEB.SetStroke(AStroke: TTMSFNCGraphicsStroke);\r\nbegin\r\n if not Assigned(FNCanvas) then\r\n Exit;\r\n\r\n FStroke.Assign(AStroke);\r\nend;\r\n\r\nprocedure TTMSFNCGraphicsContextWEB.SetStrokeColor(\r\n AColor: TTMSFNCGraphicsColor);\r\nbegin\r\n if not Assigned(FNCanvas) then\r\n Exit;\r\n\r\n FStroke.Color := AColor;\r\nend;\r\n\r\nprocedure TTMSFNCGraphicsContextWEB.SetStrokeKind(\r\n AKind: TTMSFNCGraphicsStrokeKind);\r\nbegin\r\n if not Assigned(FNCanvas) then\r\n Exit;\r\n\r\n FStroke.Kind := AKind;\r\nend;\r\n\r\nprocedure TTMSFNCGraphicsContextWEB.SetStrokeWidth(AWidth: Single);\r\nbegin\r\n if not Assigned(FNCanvas) then\r\n Exit;\r\n\r\n FStroke.Width := AWidth;\r\nend;\r\n\r\nfunction TTMSFNCGraphicsContextWEB.SetTextAngle(ARect: TRectF;\r\n AAngle: Single): TRectF;\r\nvar\r\n ar: Single;\r\n cx: TPointF;\r\n w, h, c, s, cw, ch: Single;\r\nbegin\r\n Result := ARect;\r\n if not Assigned(FNCanvas) then\r\n Exit;\r\n\r\n if AAngle <> 0 then\r\n begin\r\n ar := DegToRad(AAngle);\r\n cx.X := Result.Left + (Result.Right - Result.Left) / 2;\r\n cx.Y := Result.Top + (Result.Bottom - Result.Top) / 2;\r\n\r\n SaveContext;\r\n\r\n// cairo_translate(FNCanvas, cx.X, cx.Y);\r\n// cairo_rotate(FNCanvas, ar);\r\n\r\n w := Result.Right - Result.Left;\r\n h := Result.Bottom - Result.Top;\r\n c := Cos(ar);\r\n s := Sin(ar);\r\n\r\n cw := (Abs(w * c) + Abs(h * s));\r\n ch := (Abs(w * s) + Abs(h * c));\r\n\r\n Result := RectF(-cw / 2, -ch / 2, cw / 2, ch / 2);\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCGraphicsContextWEB.StartSpecialPen;\r\nbegin\r\n if not Assigned(FNCanvas) then\r\n Exit;\r\nend;\r\n\r\nprocedure TTMSFNCGraphicsContextWEB.StopSpecialPen;\r\nbegin\r\n if not Assigned(FNCanvas) then\r\n Exit;\r\nend;\r\n\r\nprocedure TTMSFNCGraphicsContextWEB.StrokeChanged(Sender: TObject);\r\nbegin\r\n if not Assigned(FNCanvas) then\r\n Exit;\r\n\r\n ApplyStroke;\r\nend;\r\n\r\nprocedure TTMSFNCGraphicsContextWEB.TranslateTransform(AX, AY: Single);\r\nbegin\r\n if not Assigned(FNCanvas) then\r\n Exit;\r\n\r\n// cairo_translate(FNCanvas, AX, AY);\r\nend;\r\n\r\n{$ENDIF}\r\n\r\nend.\r\n","{********************************************************************}\r\n{ }\r\n{ written by TMS Software }\r\n{ copyright (c) 2016 - 2021 }\r\n{ Email : info@tmssoftware.com }\r\n{ Web : http://www.tmssoftware.com }\r\n{ }\r\n{ The source code is given as is. The author is not responsible }\r\n{ for any possible damage done due to the use of this code. }\r\n{ The complete source code remains property of the author and may }\r\n{ not be distributed, published, given or sold in any form as such. }\r\n{ No parts of the source code can be included in any other component }\r\n{ or application without written authorization of the author. }\r\n{********************************************************************}\r\n\r\nunit WEBLib.TMSFNCStyles;\r\n\r\n{$I WEBLib.TMSFNCDefines.inc}\r\n\r\n{$IFDEF VCLLIB}\r\n{$HINTS OFF}\r\n{$IF COMPILERVERSION > 22}\r\n{$DEFINE VCLSTYLESENABLED}\r\n{$IFEND}\r\n{$ENDIF}\r\n\r\ninterface\r\n\r\nuses\r\n Classes, WEBLib.Graphics, WEBLib.Controls, WEBLib.Forms, WEBLib.TMSFNCTypes, WEBLib.TMSFNCCustomComponent, WEBLib.TMSFNCGraphicsTypes\r\n {$IFDEF FMXLIB}\r\n ,FMX.Types, UITypes\r\n {$ENDIF}\r\n {$IFDEF VCLSTYLESENABLED}\r\n ,VCL.Themes\r\n {$ENDIF}\r\n {$IFDEF WEBLIB}\r\n ,js\r\n {$ENDIF}\r\n {$IFDEF FNCLIB}\r\n {$IFDEF WEBLIB}\r\n ,WEBLIB.JSON\r\n {$ENDIF}\r\n {$IFNDEF WEBLIB}\r\n {$IFNDEF LCLLIB}\r\n {$HINTS OFF}\r\n {$IF COMPILERVERSION > 26}\r\n ,JSON\r\n {$ELSE}\r\n ,DBXJSON\r\n {$IFEND}\r\n {$HINTS ON}\r\n {$ELSE}\r\n ,fpjson, jsparser\r\n {$ENDIF}\r\n {$ENDIF}\r\n {$ENDIF}\r\n ;\r\n\r\ntype\r\n ITMSFNCAdaptToStyle = interface\r\n ['{3EFF288D-3927-4E86-8E9D-EF684B501C9E}']\r\n function GetAdaptToStyle: Boolean;\r\n procedure SetAdaptToStyle(const Value: Boolean);\r\n property AdaptToStyle: Boolean read GetAdaptToStyle write SetAdaptToStyle;\r\n end;\r\n\r\n TTMSFNCStyles = class\r\n private class var\r\n {$IFDEF FMXLIB}\r\n FScene: IScene;\r\n {$ENDIF}\r\n protected\r\n {$IFDEF FMXLIB}\r\n class function ExtractColor(ABitmap: TBitmap): TTMSFNCGraphicsColor; virtual;\r\n class function ExtractColorTo(ABitmap: TBitmap): TTMSFNCGraphicsColor; virtual;\r\n {$ENDIF}\r\n {$IFDEF WEBLIB}\r\n class function ExtractColor(AValue: string): TTMSFNCGraphicsColor; virtual;\r\n class function ExtractColorTo(AValue: string): TTMSFNCGraphicsColor; virtual;\r\n class function ExtractFontName(AValue: string): string; virtual;\r\n {$ENDIF}\r\n {$IFDEF VCLSTYLESENABLED}\r\n class function ExtractColor(AElement: TThemedElementDetails): TTMSFNCGraphicsColor; virtual;\r\n class function ExtractColorTo(AElement: TThemedElementDetails): TTMSFNCGraphicsColor; virtual;\r\n {$ENDIF}\r\n {$IFDEF FMXLIB}\r\n class function ParseBrush(ABrush: TBrush; ASecondColor: Boolean): TTMSFNCGraphicsColor; virtual;\r\n class function GetStyleSceneObject: TFmxObject; virtual;\r\n class function GetStyleBackgroundFill(AStyle: TFmxObject): TBrush; virtual;\r\n class function GetStyleBackgroundStroke(AStyle: TFmxObject): TStrokeBrush; virtual;\r\n class function GetStyleDefaultButtonFill(AStyle: TFmxObject): TBrush; virtual;\r\n class function GetStyleDefaultButtonStroke(AStyle: TFmxObject): TStrokeBrush; virtual;\r\n class function GetStyleEditTextColor(AStyle: TFmxObject): TAlphaColor; virtual;\r\n class function GetStyleEditFill(AStyle: TFmxObject): TBrush; virtual;\r\n class function GetStyleEditStroke(AStyle: TFmxObject): TStrokeBrush; virtual;\r\n class function GetStyleHeaderFill(AStyle: TFmxObject): TBrush; virtual;\r\n class function GetStyleHeaderStroke(AStyle: TFmxObject): TStrokeBrush; virtual;\r\n class function GetStyleSelectionFill(AStyle: TFmxObject): TBrush; virtual;\r\n class function GetStyleAlternativeSelectionFill(AStyle: TFmxObject): TBrush; virtual;\r\n class function GetStyleAlternativeBackgroundFill(AStyle: TFmxObject): TBrush; virtual;\r\n class function GetStyleAlternativeBackgroundStroke(AStyle: TFmxObject): TStrokeBrush; virtual;\r\n class function GetStyleFocusFill(AStyle: TFmxObject): TBrush; virtual;\r\n class function GetStyleLineFill(AStyle: TFmxObject): TBrush; virtual;\r\n class function GetStyleTextFont(AStyle: TFmxObject): TFont; virtual;\r\n class function GetStyleTextColor(AStyle: TFmxObject): TAlphaColor; virtual;\r\n class function GetStyleAlternateBackgroundFill(AStyle: TFmxObject): TBrush; virtual;\r\n class function IsTransparentStyle(AStyle: TFmxObject): Boolean; virtual;\r\n {$ENDIF}\r\n {$IFDEF WEBLIB}\r\n class function GetStyleBackgroundFill: string; virtual;\r\n class function GetStyleBackgroundStroke: string; virtual;\r\n class function GetStyleDefaultButtonFill: string; virtual;\r\n class function GetStyleDefaultButtonStroke: string; virtual;\r\n class function GetStyleEditTextColor: string; virtual;\r\n class function GetStyleEditFill: string; virtual;\r\n class function GetStyleEditStroke: string; virtual;\r\n class function GetStyleHeaderFill: string; virtual;\r\n class function GetStyleHeaderStroke: string; virtual;\r\n class function GetStyleSelectionFill: string; virtual;\r\n class function GetStyleAlternativeSelectionFill: string; virtual;\r\n class function GetStyleAlternativeBackgroundFill: string; virtual;\r\n class function GetStyleAlternativeBackgroundStroke: string; virtual;\r\n class function GetStyleFocusFill: string; virtual;\r\n class function GetStyleLineFill: string; virtual;\r\n class function GetStyleTextFont: string; virtual;\r\n class function GetStyleTextColor: string; virtual;\r\n class function GetStyleAlternateBackgroundFill: string; virtual;\r\n {$ENDIF}\r\n public\r\n {$IFDEF FMXLIB}\r\n class procedure SetActiveScene(AScene: IScene); virtual;\r\n {$ENDIF}\r\n {$IFDEF WEBLIB}\r\n class function FindCSSStyleRule(ARuleName: string): TJSObject; virtual;\r\n class function FindCSSStyleProperty(ARuleName, APropertyName: string): string; virtual;\r\n {$ENDIF}\r\n class function StyleServicesEnabled: Boolean; virtual;\r\n class function GetStyleLineFillColor(var {%H-}AColor: TTMSFNCGraphicsColor): Boolean; virtual;\r\n class function GetStyleBackgroundFillColor(var {%H-}AColor: TTMSFNCGraphicsColor): Boolean; virtual;\r\n class function GetStyleBackgroundFillColorTo(var {%H-}AColor: TTMSFNCGraphicsColor): Boolean; virtual;\r\n class function GetStyleAlternativeBackgroundFillColor(var {%H-}AColor: TTMSFNCGraphicsColor): Boolean; virtual;\r\n class function GetStyleAlternativeBackgroundFillColorTo(var {%H-}AColor: TTMSFNCGraphicsColor): Boolean; virtual;\r\n class function GetStyleBackgroundStrokeColor(var {%H-}AColor: TTMSFNCGraphicsColor): Boolean; virtual;\r\n class function GetStyleHeaderFillColor(var {%H-}AColor: TTMSFNCGraphicsColor): Boolean; virtual;\r\n class function GetStyleHeaderFillColorTo(var {%H-}AColor: TTMSFNCGraphicsColor): Boolean; virtual;\r\n class function GetStyleHeaderStrokeColor(var {%H-}AColor: TTMSFNCGraphicsColor): Boolean; virtual;\r\n class function GetStyleSelectionFillColor(var {%H-}AColor: TTMSFNCGraphicsColor): Boolean; virtual;\r\n class function GetStyleSelectionFillColorTo(var {%H-}AColor: TTMSFNCGraphicsColor): Boolean; virtual;\r\n class function GetStyleTextFontColor(var {%H-}AColor: TTMSFNCGraphicsColor): Boolean; virtual;\r\n class function GetStyleAlternativeTextFontColor(var {%H-}AColor: TTMSFNCGraphicsColor): Boolean; virtual;\r\n class function GetStyleDefaultButtonFillColor(var {%H-}AColor: TTMSFNCGraphicsColor): Boolean; virtual;\r\n class function GetStyleDefaultButtonStrokeColor(var {%H-}AColor: TTMSFNCGraphicsColor): Boolean; virtual;\r\n end;\r\n\r\n {$IFDEF FNCLIB}\r\n TTMSFNCStylesManagerCanLoadStyleEvent = procedure(Sender: TObject; AStyle: string; AComponent: TComponent; var ACanLoadStyle: Boolean) of object;\r\n TTMSFNCStylesManagerStyleLoadedEvent = procedure(Sender: TObject; AStyle: string; AComponent: TComponent) of object;\r\n\r\n TTMSFNCStylesManagerFileArray = array of string;\r\n\r\n TTMSFNCStylesManagerComponentArray = array of TComponent;\r\n\r\n ITMSFNCStylesManager = interface\r\n ['{88852C7F-B7B5-4FFA-BB47-6D95600CB1F3}']\r\n function GetSubComponentArray: TTMSFNCStylesManagerComponentArray;\r\n end;\r\n\r\n TTMSFNCStylesManagerOptions = class(TPersistent)\r\n private\r\n FAdaptFormColor: Boolean;\r\n public\r\n constructor Create; virtual;\r\n published\r\n property AdaptFormColor: Boolean read FAdaptFormColor write FAdaptFormColor default True;\r\n end;\r\n\r\n {$IFNDEF LCLLIB}\r\n [ComponentPlatformsAttribute(TMSPlatformsWeb)]\r\n {$ENDIF}\r\n TTMSFNCStylesManager = class(TTMSFNCCustomComponent)\r\n private\r\n {$IFDEF WEBLIB}\r\n FComponents: TTMSFNCStylesManagerComponentArray;\r\n {$ENDIF}\r\n FStyle: string;\r\n FStyleResource: string;\r\n FStyleForm: TCustomForm;\r\n FOnCanLoadStyle: TTMSFNCStylesManagerCanLoadStyleEvent;\r\n FOnStyleLoaded: TTMSFNCStylesManagerStyleLoadedEvent;\r\n FOptions: TTMSFNCStylesManagerOptions;\r\n procedure SetStyle(const Value: string);\r\n procedure SetStyleResource(const Value: string);\r\n procedure SetOptions(const Value: TTMSFNCStylesManagerOptions);\r\n protected\r\n function GetDocURL: string; override;\r\n procedure InternalLoadStyleFromJSONValue(AJSONValue: TJSONValue; AComponents: TTMSFNCStylesManagerComponentArray);\r\n procedure InternalLoadStyle(AValue: string; AComponents: TTMSFNCStylesManagerComponentArray);\r\n procedure DoCanLoadStyle(AStyle: string; AComponent: TComponent; var ACanLoadStyle: Boolean); virtual;\r\n procedure DoStyleLoaded(AStyle: string; AComponent: TComponent); virtual;\r\n public\r\n constructor Create(AOwner: TComponent); override;\r\n destructor Destroy; override;\r\n procedure LoadStyleFromText(AText: string); overload; virtual;\r\n procedure LoadStyleFromStream(AStream: TStream); overload; virtual;\r\n procedure LoadStyleFromFile(AFile: string); overload; virtual;\r\n procedure LoadStyleFromText(AText: string; AComponents: TTMSFNCStylesManagerComponentArray); overload; virtual;\r\n procedure LoadStyleFromStream(AStream: TStream; AComponents: TTMSFNCStylesManagerComponentArray); overload; virtual;\r\n procedure LoadStyleFromFile(AFile: string; AComponents: TTMSFNCStylesManagerComponentArray); overload; virtual;\r\n {$IFNDEF WEBLIB}\r\n procedure LoadStyleFromResource(AResourceName: string; AComponents: TTMSFNCStylesManagerComponentArray); overload; virtual;\r\n procedure LoadStyleFromResource(AResourceName: string); overload; virtual;\r\n function GetStyleFromResource(AResourceName: string): string; virtual;\r\n function GetStyleFromFile(AFile: string): string; virtual;\r\n function CombineStyles(AFiles: TTMSFNCStylesManagerFileArray): string; virtual;\r\n {$ELSE}\r\n procedure LoadStyleFromURL(AURL: string; AComponents: TTMSFNCStylesManagerComponentArray); overload; virtual;\r\n procedure LoadStyleFromURL(AURL: string); overload; virtual;\r\n {$ENDIF}\r\n property StyleForm: TCustomForm read FStyleForm write FStyleForm;\r\n published\r\n property Options: TTMSFNCStylesManagerOptions read FOptions write SetOptions;\r\n property Style: string read FStyle write SetStyle;\r\n property StyleResource: string read FStyleResource write SetStyleResource;\r\n property OnCanLoadStyle: TTMSFNCStylesManagerCanLoadStyleEvent read FOnCanLoadStyle write FOnCanLoadStyle;\r\n property OnStyleLoaded: TTMSFNCStylesManagerStyleLoadedEvent read FOnStyleLoaded write FOnStyleLoaded;\r\n end;\r\n {$ENDIF}\r\n\r\nvar\r\n CSSStyleFileName: string = '';\r\n\r\nimplementation\r\n\r\nuses\r\n WEBLib.TMSFNCUtils, SysUtils, WEBLib.TMSFNCPersistence, WEBLib.TMSFNCGraphics\r\n {$IFDEF FMXLIB}\r\n ,UIConsts, FMX.Objects, FMX.Styles, FMX.Styles.Objects, Types\r\n {$ENDIF}\r\n ;\r\n\r\n{$IFDEF FNCLIB}\r\n{$R 'TMSFNCStyles.res'}\r\n{$ENDIF}\r\n\r\n{$IFDEF FMXLIB}\r\n\r\nclass function TTMSFNCStyles.ParseBrush(ABrush: TBrush; ASecondColor: Boolean): TTMSFNCGraphicsColor;\r\nbegin\r\n case ABrush.Kind of\r\n TBrushKind.None, TBrushKind.Resource: Result := gcNull;\r\n TBrushKind.Solid: Result := ABrush.Color;\r\n TBrushKind.Gradient:\r\n begin\r\n if ABrush.Gradient.Points.Count > 0 then\r\n begin\r\n if ASecondColor then\r\n Result := ABrush.Gradient.Points[1].Color\r\n else\r\n Result := ABrush.Gradient.Points[0].Color;\r\n end\r\n else\r\n Result := ABrush.Color;\r\n end;\r\n TBrushKind.Bitmap:\r\n begin\r\n if ASecondColor then\r\n Result := ExtractColorTo(ABrush.Bitmap.Bitmap)\r\n else\r\n Result := ExtractColor(ABrush.Bitmap.Bitmap);\r\n end;\r\n else\r\n Result := gcNull;\r\n end;\r\nend;\r\n\r\nclass function TTMSFNCStyles.GetStyleSceneObject: TFmxObject;\r\nvar\r\n frm: TCommonCustomForm;\r\nbegin\r\n if Assigned(TTMSFNCStyles.FScene) and Assigned(TTMSFNCStyles.FScene.GetObject) and (TTMSFNCStyles.FScene.GetObject.ClassName <> 'TTMSFNCCustomPopupForm') then\r\n begin\r\n if Assigned(TTMSFNCStyles.FScene.StyleBook) then\r\n Result := TTMSFNCStyles.FScene.StyleBook.Style\r\n else\r\n Result := TStyleManager.ActiveStyleForScene(TTMSFNCStyles.FScene);\r\n end\r\n else\r\n begin\r\n frm := Screen.ActiveForm;\r\n if not Assigned(frm) then\r\n frm := Application.MainForm;\r\n\r\n if Assigned(frm) and Assigned(frm.StyleBook) then\r\n Result := frm.StyleBook.Style\r\n else\r\n Result := TStyleManager.ActiveStyle(nil);\r\n end;\r\nend;\r\n\r\nclass function TTMSFNCStyles.IsTransparentStyle(\r\n AStyle: TFmxObject): Boolean;\r\nvar\r\n st: TStyleDescription;\r\nbegin\r\n Result := False;\r\n st := TStyleManager.FindStyleDescriptor(AStyle);\r\n if Assigned(st) then\r\n Result := LowerCase(st.Title) = 'transparent';\r\nend;\r\n\r\nclass function TTMSFNCStyles.GetStyleAlternateBackgroundFill(\r\n AStyle: TFmxObject): TBrush;\r\nvar\r\n st, stobj: TFmxObject;\r\n f: TBrush;\r\nbegin\r\n f := TBrush.Create(TBrushKind.Solid, claNull);\r\n Result := f;\r\n if Assigned(AStyle) then\r\n begin\r\n st := AStyle.FindStyleResource('gridstyle');\r\n if Assigned(st) then\r\n begin\r\n stobj := st.FindStyleResource('alternatingrowbackground');\r\n if (Assigned(stobj) and (stobj is TBrushObject)) then\r\n f.Assign((stobj as TBrushObject).Brush);\r\n end;\r\n end;\r\nend;\r\n\r\nclass function TTMSFNCStyles.GetStyleAlternativeSelectionFill(\r\n AStyle: TFmxObject): TBrush;\r\nvar\r\n st, stobj: TFmxObject;\r\n f: TBrush;\r\n bmp: TBitmap;\r\nbegin\r\n f := TBrush.Create(TBrushKind.Solid, claNull);\r\n Result := f;\r\n if Assigned(AStyle) then\r\n begin\r\n st := AStyle.FindStyleResource('memostyle');\r\n if Assigned(st) then\r\n begin\r\n stobj := st.FindStyleResource('selection');\r\n if Assigned(stobj) then\r\n begin\r\n if (stobj is TRectangle) then\r\n f.Assign((stobj as TRectangle).Fill)\r\n else if (stobj is TBrushObject) then\r\n f.Assign((stobj as TBrushObject).Brush)\r\n else if stobj is TCustomStyleObject then\r\n begin\r\n f.Kind := TBrushKind.Bitmap;\r\n f.Bitmap.WrapMode := TWrapMode.TileStretch;\r\n bmp := TBitmap.Create(Round(200), Round(200));\r\n if bmp.Canvas.BeginScene then\r\n begin\r\n (stobj as TCustomStyleObject).DrawToCanvas(bmp.Canvas, RectF(-10, -10, bmp.Width + 10, bmp.Height + 10));\r\n bmp.Canvas.EndScene;\r\n end;\r\n f.Bitmap.Bitmap.Assign(bmp);\r\n bmp.Free;\r\n end;\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\nclass function TTMSFNCStyles.GetStyleDefaultButtonFill(\r\n AStyle: TFmxObject): TBrush;\r\nvar\r\n st, stobj: TFmxObject;\r\n f: TBrush;\r\n bmp: TBitmap;\r\nbegin\r\n f := TBrush.Create(TBrushKind.Solid, claNull);\r\n Result := f;\r\n if Assigned(AStyle) then\r\n begin\r\n st := AStyle.FindStyleResource('buttonstyle');\r\n if Assigned(st) then\r\n begin\r\n stobj := st.FindStyleResource('background');\r\n if Assigned(stobj) then\r\n begin\r\n if (stobj is TRectangle) then\r\n f.Assign((stobj as TRectangle).Fill)\r\n else if stobj is TCustomStyleObject then\r\n begin\r\n f.Kind := TBrushKind.Bitmap;\r\n f.Bitmap.WrapMode := TWrapMode.TileStretch;\r\n bmp := TBitmap.Create(Round(200), Round(200));\r\n if bmp.Canvas.BeginScene then\r\n begin\r\n (stobj as TCustomStyleObject).DrawToCanvas(bmp.Canvas, RectF(-10, -10, bmp.Width + 10, bmp.Height + 10));\r\n bmp.Canvas.EndScene;\r\n end;\r\n f.Bitmap.Bitmap.Assign(bmp);\r\n bmp.Free;\r\n end;\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\nclass function TTMSFNCStyles.GetStyleBackgroundFill(\r\n AStyle: TFmxObject): TBrush;\r\nvar\r\n st, stobj: TFmxObject;\r\n f: TBrush;\r\n bmp: TBitmap;\r\nbegin\r\n f := TBrush.Create(TBrushKind.Solid, claNull);\r\n Result := f;\r\n if Assigned(AStyle) then\r\n begin\r\n st := AStyle.FindStyleResource('gridstyle');\r\n if Assigned(st) then\r\n begin\r\n stobj := st.FindStyleResource('background');\r\n if Assigned(stobj) then\r\n begin\r\n if (stobj is TRectangle) then\r\n f.Assign((stobj as TRectangle).Fill)\r\n else if stobj is TCustomStyleObject then\r\n begin\r\n f.Kind := TBrushKind.Bitmap;\r\n f.Bitmap.WrapMode := TWrapMode.TileStretch;\r\n bmp := TBitmap.Create(Round(200), Round(200));\r\n if bmp.Canvas.BeginScene then\r\n begin\r\n (stobj as TCustomStyleObject).DrawToCanvas(bmp.Canvas, RectF(-10, -10, bmp.Width + 10, bmp.Height + 10));\r\n bmp.Canvas.EndScene;\r\n end;\r\n f.Bitmap.Bitmap.Assign(bmp);\r\n bmp.Free;\r\n end;\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\nclass function TTMSFNCStyles.GetStyleDefaultButtonStroke(\r\n AStyle: TFmxObject): TStrokeBrush;\r\nvar\r\n st, stobj: TFmxObject;\r\n s: TStrokeBrush;\r\nbegin\r\n s := TStrokeBrush.Create(TBrushKind.Solid, claDarkGray);\r\n Result := s;\r\n if Assigned(AStyle) then\r\n begin\r\n st := AStyle.FindStyleResource('buttonstyle');\r\n if Assigned(st) then\r\n begin\r\n stobj := st.FindStyleResource('background');\r\n if Assigned(stobj) then\r\n begin\r\n if (stobj is TRectangle) then\r\n s.Assign((stobj as TRectangle).Stroke);\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\nclass function TTMSFNCStyles.GetStyleBackgroundStroke(\r\n AStyle: TFmxObject): TStrokeBrush;\r\nvar\r\n st, stobj: TFmxObject;\r\n s: TStrokeBrush;\r\nbegin\r\n s := TStrokeBrush.Create(TBrushKind.Solid, claDarkGray);\r\n Result := s;\r\n if Assigned(AStyle) then\r\n begin\r\n st := AStyle.FindStyleResource('gridstyle');\r\n if Assigned(st) then\r\n begin\r\n stobj := st.FindStyleResource('background');\r\n if Assigned(stobj) then\r\n begin\r\n if (stobj is TRectangle) then\r\n s.Assign((stobj as TRectangle).Stroke);\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\nclass function TTMSFNCStyles.GetStyleAlternativeBackgroundFill(\r\n AStyle: TFmxObject): TBrush;\r\nvar\r\n st, stobj: TFmxObject;\r\n f: TBrush;\r\n bmp: TBitmap;\r\nbegin\r\n f := TBrush.Create(TBrushKind.Solid, claNull);\r\n Result := f;\r\n if Assigned(AStyle) then\r\n begin\r\n st := AStyle.FindStyleResource('memostyle');\r\n if Assigned(st) then\r\n begin\r\n stobj := st.FindStyleResource('background');\r\n if Assigned(stobj) then\r\n begin\r\n if (stobj is TRectangle) then\r\n f.Assign((stobj as TRectangle).Fill)\r\n else if stobj is TCustomStyleObject then\r\n begin\r\n f.Kind := TBrushKind.Bitmap;\r\n f.Bitmap.WrapMode := TWrapMode.TileStretch;\r\n bmp := TBitmap.Create(Round(200), Round(200));\r\n if bmp.Canvas.BeginScene then\r\n begin\r\n (stobj as TCustomStyleObject).DrawToCanvas(bmp.Canvas, RectF(-10, -10, bmp.Width + 10, bmp.Height + 10));\r\n bmp.Canvas.EndScene;\r\n end;\r\n f.Bitmap.Bitmap.Assign(bmp);\r\n bmp.Free;\r\n end;\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\nclass function TTMSFNCStyles.GetStyleAlternativeBackgroundStroke(\r\n AStyle: TFmxObject): TStrokeBrush;\r\nvar\r\n st, stobj: TFmxObject;\r\n s: TStrokeBrush;\r\nbegin\r\n s := TStrokeBrush.Create(TBrushKind.Solid, claDarkGray);\r\n Result := s;\r\n if Assigned(AStyle) then\r\n begin\r\n st := AStyle.FindStyleResource('memostyle');\r\n if Assigned(st) then\r\n begin\r\n stobj := st.FindStyleResource('foreground');\r\n if Assigned(stobj) then\r\n begin\r\n if (stobj is TBrushObject) then\r\n s.Assign((stobj as TBrushObject).Brush);\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\nclass function TTMSFNCStyles.GetStyleEditTextColor(AStyle: TFmxObject): TAlphaColor;\r\nvar\r\n st, stobj: TFMXObject;\r\nbegin\r\n Result := claBlack;\r\n if Assigned(AStyle) then\r\n begin\r\n st := AStyle.FindStyleResource('editstyle');\r\n if Assigned(st) then\r\n begin\r\n stobj := st.FindStyleResource('foreground');\r\n if (Assigned(stobj) and (stobj is TBrushObject)) then\r\n begin\r\n if (Assigned(stobj) and (stobj is TBrushObject)) then\r\n Result := (stobj as TBrushObject).Brush.Color;\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\nclass function TTMSFNCStyles.GetStyleEditFill(\r\n AStyle: TFmxObject): TBrush;\r\nvar\r\n st, stobj: TFmxObject;\r\n f: TBrush;\r\n bmp: TBitmap;\r\nbegin\r\n f := TBrush.Create(TBrushKind.Solid, claNull);\r\n Result := f;\r\n if Assigned(AStyle) then\r\n begin\r\n st := AStyle.FindStyleResource('editstyle');\r\n if Assigned(st) then\r\n begin\r\n stobj := st.FindStyleResource('background');\r\n if Assigned(stobj) then\r\n begin\r\n if (stobj is TRectangle) then\r\n f.Assign((stobj as TRectangle).Fill)\r\n else if stobj is TCustomStyleObject then\r\n begin\r\n f.Kind := TBrushKind.Bitmap;\r\n f.Bitmap.WrapMode := TWrapMode.TileStretch;\r\n bmp := TBitmap.Create(Round(200), Round(200));\r\n if bmp.Canvas.BeginScene then\r\n begin\r\n (stobj as TCustomStyleObject).DrawToCanvas(bmp.Canvas, RectF(-10, -10, bmp.Width + 10, bmp.Height + 10));\r\n bmp.Canvas.EndScene;\r\n end;\r\n f.Bitmap.Bitmap.Assign(bmp);\r\n bmp.Free;\r\n end;\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\nclass function TTMSFNCStyles.GetStyleEditStroke(\r\n AStyle: TFmxObject): TStrokeBrush;\r\nvar\r\n st, stobj: TFmxObject;\r\n s: TStrokeBrush;\r\nbegin\r\n s := TStrokeBrush.Create(TBrushKind.Solid, claDarkGray);\r\n Result := s;\r\n if Assigned(AStyle) then\r\n begin\r\n st := AStyle.FindStyleResource('editstyle');\r\n if Assigned(st) then\r\n begin\r\n stobj := st.FindStyleResource('background');\r\n if Assigned(stobj) then\r\n begin\r\n if (stobj is TRectangle) then\r\n s.Assign((stobj as TRectangle).Stroke);\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\nclass function TTMSFNCStyles.GetStyleFocusFill(AStyle: TFmxObject): TBrush;\r\nvar\r\n st, stobj: TFmxObject;\r\n f: TBrush;\r\n bmp: TBitmap;\r\nbegin\r\n f := TBrush.Create(TBrushKind.Solid, claNull);\r\n Result := f;\r\n if Assigned(AStyle) then\r\n begin\r\n st := AStyle.FindStyleResource('gridstyle');\r\n if Assigned(st) then\r\n begin\r\n stobj := st.FindStyleResource('focus');\r\n if Assigned(stobj) then\r\n begin\r\n if (stobj is TRectangle) then\r\n f.Assign((stobj as TRectangle).Fill)\r\n else if stobj is TCustomStyleObject then\r\n begin\r\n f.Kind := TBrushKind.Bitmap;\r\n f.Bitmap.WrapMode := TWrapMode.TileStretch;\r\n bmp := TBitmap.Create(Round(200), Round(200));\r\n if bmp.Canvas.BeginScene then\r\n begin\r\n (stobj as TCustomStyleObject).DrawToCanvas(bmp.Canvas, RectF(-10, -10, bmp.Width + 10, bmp.Height + 10));\r\n bmp.Canvas.EndScene;\r\n end;\r\n f.Bitmap.Bitmap.Assign(bmp);\r\n bmp.Free;\r\n end;\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\nclass function TTMSFNCStyles.GetStyleHeaderFill(\r\n AStyle: TFmxObject): TBrush;\r\nvar\r\n st, stobj: TFmxObject;\r\n f: TBrush;\r\n bmp: TBitmap;\r\nbegin\r\n f := TBrush.Create(TBrushKind.Solid, claNull);\r\n Result := f;\r\n if Assigned(AStyle) then\r\n begin\r\n st := AStyle.FindStyleResource('headeritemstyle');\r\n if Assigned(st) then\r\n begin\r\n stobj := st.FindStyleResource('background');\r\n if Assigned(stobj) then\r\n begin\r\n if (stobj is TRectangle) then\r\n f.Assign((stobj as TRectangle).Fill)\r\n else if stobj is TButtonStyleObject then\r\n begin\r\n f.Kind := TBrushKind.Bitmap;\r\n f.Bitmap.WrapMode := TWrapMode.TileStretch;\r\n bmp := TBitmap.Create(Round(200), Round(200));\r\n if bmp.Canvas.BeginScene then\r\n begin\r\n (stobj as TButtonStyleObject).DrawToCanvas(bmp.Canvas, RectF(-10, -10, bmp.Width + 10, bmp.Height + 10));\r\n bmp.Canvas.EndScene;\r\n end;\r\n f.Bitmap.Bitmap.Assign(bmp);\r\n bmp.Free;\r\n end;\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\nclass function TTMSFNCStyles.GetStyleHeaderStroke(\r\n AStyle: TFmxObject): TStrokeBrush;\r\nvar\r\n st, stobj: TFmxObject;\r\n s: TStrokeBrush;\r\nbegin\r\n s := TStrokeBrush.Create(TBrushKind.Solid, claDarkGray);\r\n Result := s;\r\n if Assigned(AStyle) then\r\n begin\r\n st := AStyle.FindStyleResource('headeritemstyle');\r\n if Assigned(st) then\r\n begin\r\n stobj := st.FindStyleResource('background');\r\n if Assigned(stobj) then\r\n begin\r\n if (stobj is TRectangle) then\r\n s.Assign((stobj as TRectangle).Stroke);\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\nclass function TTMSFNCStyles.GetStyleLineFill(AStyle: TFmxObject): TBrush;\r\nvar\r\n st, stobj: TFmxObject;\r\n f: TBrush;\r\n bmp: TBitmap;\r\nbegin\r\n f := TBrush.Create(TBrushKind.Solid, claNull);\r\n Result := f;\r\n if Assigned(AStyle) then\r\n begin\r\n st := AStyle.FindStyleResource('gridstyle');\r\n if Assigned(st) then\r\n begin\r\n stobj := st.FindStyleResource('linefill');\r\n if Assigned(stobj) then\r\n begin\r\n if (stobj is TBrushObject) then\r\n f.Assign((stobj as TBrushObject).Brush)\r\n else if stobj is TCustomStyleObject then\r\n begin\r\n f.Kind := TBrushKind.Bitmap;\r\n f.Bitmap.WrapMode := TWrapMode.TileStretch;\r\n bmp := TBitmap.Create(Round(200), Round(200));\r\n if bmp.Canvas.BeginScene then\r\n begin\r\n (stobj as TCustomStyleObject).DrawToCanvas(bmp.Canvas, RectF(-10, -10, bmp.Width + 10, bmp.Height + 10));\r\n bmp.Canvas.EndScene;\r\n end;\r\n f.Bitmap.Bitmap.Assign(bmp);\r\n bmp.Free;\r\n end;\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\nclass function TTMSFNCStyles.GetStyleSelectionFill(\r\n AStyle: TFmxObject): TBrush;\r\nvar\r\n st, stobj: TFmxObject;\r\n f: TBrush;\r\n bmp: TBitmap;\r\nbegin\r\n f := TBrush.Create(TBrushKind.Solid, claNull);\r\n Result := f;\r\n if Assigned(AStyle) then\r\n begin\r\n st := AStyle.FindStyleResource('gridstyle');\r\n if Assigned(st) then\r\n begin\r\n stobj := st.FindStyleResource('selection');\r\n if Assigned(stobj) then\r\n begin\r\n if (stobj is TRectangle) then\r\n f.Assign((stobj as TRectangle).Fill)\r\n else if (stobj is TBrushObject) then\r\n f.Assign((stobj as TBrushObject).Brush)\r\n else if stobj is TCustomStyleObject then\r\n begin\r\n f.Kind := TBrushKind.Bitmap;\r\n f.Bitmap.WrapMode := TWrapMode.TileStretch;\r\n bmp := TBitmap.Create(Round(200), Round(200));\r\n if bmp.Canvas.BeginScene then\r\n begin\r\n (stobj as TCustomStyleObject).DrawToCanvas(bmp.Canvas, RectF(-10, -10, bmp.Width + 10, bmp.Height + 10));\r\n bmp.Canvas.EndScene;\r\n end;\r\n f.Bitmap.Bitmap.Assign(bmp);\r\n bmp.Free;\r\n end;\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\nclass function TTMSFNCStyles.GetStyleTextColor(\r\n AStyle: TFmxObject): TAlphaColor;\r\nvar\r\n st, stobj: TFmxObject;\r\nbegin\r\n Result := claBlack;\r\n if Assigned(AStyle) then\r\n begin\r\n st := AStyle.FindStyleResource('headeritemstyle');\r\n if Assigned(st) then\r\n begin\r\n stobj := st.FindStyleResource('text');\r\n if (Assigned(stobj) and (stobj is TText)) then\r\n Result := (stobj as TText).TextSettings.FontColor;\r\n end;\r\n end;\r\nend;\r\n\r\nclass function TTMSFNCStyles.GetStyleTextFont(AStyle: TFmxObject): TFont;\r\nvar\r\n st, stobj: TFmxObject;\r\nbegin\r\n Result := TFont.Create;\r\n if Assigned(AStyle) then\r\n begin\r\n st := AStyle.FindStyleResource('headeritemstyle');\r\n if Assigned(st) then\r\n begin\r\n stobj := st.FindStyleResource('text');\r\n if (Assigned(stobj) and (stobj is TText)) then\r\n Result.Assign((stobj as TText).TextSettings.Font);\r\n end;\r\n end;\r\nend;\r\n{$ENDIF}\r\n\r\n{ TTMSFNCStyles }\r\n\r\n{$IFDEF FMXLIB}\r\nclass function TTMSFNCStyles.ExtractColor(\r\n ABitmap: TBitmap): TTMSFNCGraphicsColor;\r\nvar\r\n dt: TBitmapData;\r\nbegin\r\n Result := gcNull;\r\n if not Assigned(ABitmap) then\r\n Exit;\r\n if ABitmap.Map(TMapAccess.Read, dt) then\r\n begin\r\n Result := dt.GetPixel(dt.Width div 2, 1);\r\n ABitmap.Unmap(dt);\r\n end;\r\nend;\r\n\r\nclass function TTMSFNCStyles.ExtractColorTo(\r\n ABitmap: TBitmap): TTMSFNCGraphicsColor;\r\nvar\r\n dt: TBitmapData;\r\nbegin\r\n Result := gcNull;\r\n if not Assigned(ABitmap) then\r\n Exit;\r\n if ABitmap.Map(TMapAccess.Read, dt) then\r\n begin\r\n Result := dt.GetPixel(dt.Width div 2, dt.Height - 1);\r\n ABitmap.Unmap(dt);\r\n end;\r\nend;\r\n{$ENDIF}\r\n\r\n{$IFDEF WEBLIB}\r\n\r\nclass function TTMSFNCStyles.GetStyleBackgroundFill: string;\r\nbegin\r\n Result := FindCSSStyleProperty('.TMSFNCGridStyle', 'background');\r\nend;\r\n\r\nclass function TTMSFNCStyles.GetStyleBackgroundStroke: string;\r\nbegin\r\n Result := FindCSSStyleProperty('.TMSFNCGridStyle', 'border-color');\r\nend;\r\n\r\nclass function TTMSFNCStyles.GetStyleDefaultButtonFill: string;\r\nbegin\r\n Result := FindCSSStyleProperty('.TMSFNCButtonStyle', 'background');\r\nend;\r\n\r\nclass function TTMSFNCStyles.GetStyleDefaultButtonStroke: string;\r\nbegin\r\n Result := FindCSSStyleProperty('.TMSFNCButtonStyle', 'border-color');\r\nend;\r\n\r\nclass function TTMSFNCStyles.GetStyleEditTextColor: string;\r\nbegin\r\n Result := FindCSSStyleProperty('.TMSFNCEditStyle', '--foreground');\r\nend;\r\n\r\nclass function TTMSFNCStyles.GetStyleEditFill: string;\r\nbegin\r\n Result := FindCSSStyleProperty('.TMSFNCEditStyle', 'background');\r\nend;\r\n\r\nclass function TTMSFNCStyles.GetStyleEditStroke: string;\r\nbegin\r\n Result := FindCSSStyleProperty('.TMSFNCStyle', 'border-color');\r\nend;\r\n\r\nclass function TTMSFNCStyles.GetStyleHeaderFill: string;\r\nbegin\r\n Result := FindCSSStyleProperty('.TMSFNCHeaderItemStyle', 'background');\r\nend;\r\n\r\nclass function TTMSFNCStyles.GetStyleHeaderStroke: string;\r\nbegin\r\n Result := FindCSSStyleProperty('.TMSFNCHeaderItemStyle', 'border-color');\r\nend;\r\n\r\nclass function TTMSFNCStyles.GetStyleSelectionFill: string;\r\nbegin\r\n Result := FindCSSStyleProperty('.TMSFNCGridStyle', '--selection');\r\nend;\r\n\r\nclass function TTMSFNCStyles.GetStyleAlternativeSelectionFill: string;\r\nbegin\r\n Result := FindCSSStyleProperty('.TMSFNCMemoStyle', '--selection');\r\nend;\r\n\r\nclass function TTMSFNCStyles.GetStyleAlternativeBackgroundFill: string;\r\nbegin\r\n Result := FindCSSStyleProperty('.TMSFNCMemoStyle', 'background');\r\nend;\r\n\r\nclass function TTMSFNCStyles.GetStyleAlternativeBackgroundStroke: string;\r\nbegin\r\n Result := FindCSSStyleProperty('.TMSFNCMemoStyle', 'border-color');\r\nend;\r\n\r\nclass function TTMSFNCStyles.GetStyleFocusFill: string;\r\nbegin\r\n Result := FindCSSStyleProperty('.TMSFNCGridStyle', '--focus');\r\nend;\r\n\r\nclass function TTMSFNCStyles.GetStyleLineFill: string;\r\nbegin\r\n Result := FindCSSStyleProperty('.TMSFNCGridStyle', '--linefill');\r\nend;\r\n\r\nclass function TTMSFNCStyles.GetStyleTextFont: string;\r\nbegin\r\n Result := FindCSSStyleProperty('.TMSFNCHeaderItemStyle', 'font-family');\r\nend;\r\n\r\nclass function TTMSFNCStyles.GetStyleTextColor: string;\r\nbegin\r\n Result := FindCSSStyleProperty('.TMSFNCHeaderItemStyle', 'color');\r\nend;\r\n\r\nclass function TTMSFNCStyles.GetStyleAlternateBackgroundFill: string;\r\nbegin\r\n Result := FindCSSStyleProperty('.TMSFNCGridStyle', '--alternatingrowbackground');\r\nend;\r\n\r\nclass function TTMSFNCStyles.ExtractColor(AValue: string): TTMSFNCGraphicsColor;\r\nvar\r\n s, s2: string;\r\n sl: TStringList;\r\n p, p2: Integer;\r\n\r\n function ParseValue(AValue: string): Integer;\r\n begin\r\n Result := StrToInt(Trim(StringReplace(AValue, 'rgb(', '', [rfReplaceAll])))\r\n end;\r\nbegin\r\n Result := gcNull;\r\n if AValue <> '' then\r\n begin\r\n s := LowerCase(StringReplace(AValue, ' ', '', [rfReplaceAll]));\r\n if Pos('linear-gradient', s) = 1 then\r\n begin\r\n p := Pos('rgb', s);\r\n if p = 0 then\r\n p := Pos('#', s);\r\n p2 := Pos(')', s, p);\r\n s2 := Copy(s, p, p2 - p + 1);\r\n p := Pos('rgb', s, p2);\r\n if p = 0 then\r\n p := Pos('#', s);\r\n p2 := Pos(')', s, p);\r\n Result := ExtractColor(s2);\r\n end\r\n else if Pos('rgb', s) = 1 then\r\n begin\r\n sl := TStringList.Create;\r\n try\r\n sl.Delimiter := ',';\r\n sl.DelimitedText := s;\r\n Result := MakeGraphicsColor(ParseValue(sl[0]), ParseValue(sl[1]), ParseValue(sl[2]));\r\n finally\r\n sl.Free;\r\n end;\r\n end\r\n else if Pos('#', s) = 1 then\r\n Result := HexToColor(s);\r\n end;\r\nend;\r\n\r\nclass function TTMSFNCStyles.ExtractColorTo(AValue: string): TTMSFNCGraphicsColor;\r\nvar\r\n s, s3: string;\r\n sl: TStringList;\r\n p, p2: Integer;\r\n\r\n function ParseValue(AValue: string): Integer;\r\n begin\r\n Result := StrToInt(Trim(StringReplace(AValue, 'rgb(', '', [rfReplaceAll])))\r\n end;\r\nbegin\r\n Result := gcNull;\r\n if AValue <> '' then\r\n begin\r\n s := LowerCase(StringReplace(AValue, ' ', '', [rfReplaceAll]));\r\n if Pos('linear-gradient', s) = 1 then\r\n begin\r\n p := Pos('rgb', s);\r\n if p = 0 then\r\n p := Pos('#', s);\r\n p2 := Pos(')', s, p);\r\n //s2 := Copy(s, p, p2 - p + 1);\r\n p := Pos('rgb', s, p2);\r\n if p = 0 then\r\n p := Pos('#', s);\r\n p2 := Pos(')', s, p);\r\n s3 := Copy(s, p, p2 - p + 1);\r\n Result := ExtractColor(s3);\r\n end\r\n else if Pos('rgb', s) = 1 then\r\n begin\r\n sl := TStringList.Create;\r\n try\r\n sl.Delimiter := ',';\r\n sl.DelimitedText := s;\r\n Result := MakeGraphicsColor(ParseValue(sl[0]), ParseValue(sl[1]), ParseValue(sl[2]));\r\n finally\r\n sl.Free;\r\n end;\r\n end\r\n else if Pos('#', s) = 1 then\r\n Result := HexToColor(s);\r\n end;\r\nend;\r\n\r\nclass function TTMSFNCStyles.ExtractFontName(AValue: string): string;\r\nbegin\r\n Result := AValue;\r\nend;\r\n\r\n{$HINTS OFF}\r\nclass function TTMSFNCStyles.FindCSSStyleProperty(ARuleName, APropertyName: string): string;\r\nvar\r\n j: TJSObject;\r\n s: string;\r\n v: string;\r\nbegin\r\n Result := '';\r\n j := FindCSSStyleRule(ARuleName);\r\n if Assigned(j) then\r\n begin\r\n s := APropertyName;\r\n asm\r\n v = j.style.getPropertyValue(s);\r\n end;\r\n Result := v;\r\n end;\r\nend;\r\n\r\nclass function TTMSFNCStyles.FindCSSStyleRule(ARuleName: string): TJSObject;\r\nvar\r\n s, f: string;\r\nbegin\r\n Result := nil;\r\n s := ARuleName;\r\n f := CSSStyleFileName;\r\n asm\r\n for (var i = 0; i < document.styleSheets.length; i++){\r\n var fn = document.styleSheets[i].href;\r\n if (fn != null) {\r\n if (f == fn.substring(fn.lastIndexOf('/')+1)){\r\n var classes = document.styleSheets[i].rules || document.styleSheets[i].cssRules;\r\n for (var x = 0; x < classes.length; x++) {\r\n if (classes[x].selectorText !== undefined) {\r\n if (classes[x].selectorText.startsWith(s)) {\r\n return classes[x];\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n end;\r\nend;\r\n{$HINTS ON}\r\n{$ENDIF}\r\n\r\n{$IFDEF VCLSTYLESENABLED}\r\nclass function TTMSFNCStyles.ExtractColor(AElement: TThemedElementDetails): TTMSFNCGraphicsColor;\r\nvar\r\n bmp: TBitmap;\r\nbegin\r\n bmp := TBitmap.Create;\r\n try\r\n bmp.SetSize(200, 200);\r\n StyleServices.DrawElement(bmp.Canvas.Handle, AElement, Rect(0, 0, 200, 200));\r\n Result := bmp.Canvas.Pixels[bmp.Width div 2, 2];\r\n finally\r\n bmp.Free;\r\n end;\r\nend;\r\n\r\nclass function TTMSFNCStyles.ExtractColorTo(AElement: TThemedElementDetails): TTMSFNCGraphicsColor;\r\nvar\r\n bmp: TBitmap;\r\nbegin\r\n bmp := TBitmap.Create;\r\n try\r\n bmp.SetSize(200, 200);\r\n StyleServices.DrawElement(bmp.Canvas.Handle, AElement, Rect(0, 0, 200, 200));\r\n Result := bmp.Canvas.Pixels[bmp.Width div 2, bmp.Height - 2];\r\n finally\r\n bmp.Free;\r\n end;\r\nend;\r\n{$ENDIF}\r\n\r\nclass function TTMSFNCStyles.GetStyleBackgroundFillColor(var AColor: TTMSFNCGraphicsColor): Boolean;\r\n{$IFDEF FMXLIB}\r\nvar\r\n f: TBrush;\r\n{$ENDIF}\r\n{$IFDEF VCLSTYLESENABLED}\r\nvar\r\n l: TThemedElementDetails;\r\n c: TColor;\r\n{$ENDIF}\r\n{$IFDEF WEBLIB}\r\nvar\r\n f: string;\r\n c: TTMSFNCGraphicsColor;\r\n{$ENDIF}\r\nbegin\r\n Result := False;\r\n if StyleServicesEnabled then\r\n begin\r\n {$IFDEF FMXLIB}\r\n f := GetStyleBackgroundFill(GetStyleSceneObject);\r\n if Assigned(f) then\r\n begin\r\n AColor := ParseBrush(f, False);\r\n Result := AColor <> claNull;\r\n f.Free;\r\n end;\r\n {$ENDIF}\r\n {$IFDEF VCLSTYLESENABLED}\r\n l := StyleServices.GetElementDetails(tgCellNormal);\r\n c := clNone;\r\n StyleServices.GetElementColor(l, ecFillColor, c);\r\n if c = clNone then\r\n c := ExtractColor(l);\r\n\r\n AColor := c;\r\n Result := c <> clNone;\r\n {$ENDIF}\r\n {$IFDEF WEBLIB}\r\n f := GetStyleBackgroundFill;\r\n if f <> '' then\r\n begin\r\n c := ExtractColor(f);\r\n AColor := c;\r\n Result := c <> gcNull;\r\n end;\r\n {$ENDIF}\r\n end;\r\nend;\r\n\r\nclass function TTMSFNCStyles.GetStyleBackgroundFillColorTo(var AColor: TTMSFNCGraphicsColor): Boolean;\r\n{$IFDEF FMXLIB}\r\nvar\r\n f: TBrush;\r\n{$ENDIF}\r\n{$IFDEF VCLSTYLESENABLED}\r\nvar\r\n l: TThemedElementDetails;\r\n c: TColor;\r\n{$ENDIF}\r\n{$IFDEF WEBLIB}\r\nvar\r\n f: string;\r\n c: TTMSFNCGraphicsColor;\r\n{$ENDIF}\r\nbegin\r\n Result := False;\r\n if StyleServicesEnabled then\r\n begin\r\n {$IFDEF FMXLIB}\r\n f := GetStyleBackgroundFill(GetStyleSceneObject);\r\n if Assigned(f) then\r\n begin\r\n AColor := ParseBrush(f, True);\r\n Result := AColor <> claNull;\r\n f.Free;\r\n end;\r\n {$ENDIF}\r\n {$IFDEF VCLSTYLESENABLED}\r\n l := StyleServices.GetElementDetails(tgGradientCellNormal);\r\n c := clNone;\r\n StyleServices.GetElementColor(l, ecFillColor, c);\r\n if c = clNone then\r\n c := ExtractColorTo(l);\r\n\r\n AColor := c;\r\n Result := c <> clNone;\r\n {$ENDIF}\r\n {$IFDEF WEBLIB}\r\n f := GetStyleBackgroundFill;\r\n if f <> '' then\r\n begin\r\n c := ExtractColorTo(f);\r\n AColor := c;\r\n Result := c <> gcNull;\r\n end;\r\n {$ENDIF}\r\n end;\r\nend;\r\n\r\nclass function TTMSFNCStyles.GetStyleAlternativeBackgroundFillColor(var AColor: TTMSFNCGraphicsColor): Boolean;\r\n{$IFDEF FMXLIB}\r\nvar\r\n f: TBrush;\r\n{$ENDIF}\r\n{$IFDEF VCLSTYLESENABLED}\r\nvar\r\n l: TThemedElementDetails;\r\n c: TColor;\r\n{$ENDIF}\r\n{$IFDEF WEBLIB}\r\nvar\r\n f: string;\r\n c: TTMSFNCGraphicsColor;\r\n{$ENDIF}\r\nbegin\r\n Result := False;\r\n if StyleServicesEnabled then\r\n begin\r\n {$IFDEF FMXLIB}\r\n f := GetStyleAlternativeBackgroundFill(GetStyleSceneObject);\r\n if Assigned(f) then\r\n begin\r\n AColor := ParseBrush(f, False);\r\n Result := AColor <> claNull;\r\n f.Free;\r\n end;\r\n {$ENDIF}\r\n {$IFDEF VCLSTYLESENABLED}\r\n l := StyleServices.GetElementDetails(teBackgroundNormal);\r\n c := ExtractColor(l);\r\n AColor := c;\r\n Result := c <> clNone;\r\n {$ENDIF}\r\n {$IFDEF WEBLIB}\r\n f := GetStyleAlternativeBackgroundFill;\r\n if f <> '' then\r\n begin\r\n c := ExtractColor(f);\r\n AColor := c;\r\n Result := c <> gcNull;\r\n end;\r\n {$ENDIF}\r\n end;\r\nend;\r\n\r\nclass function TTMSFNCStyles.GetStyleAlternativeBackgroundFillColorTo(var AColor: TTMSFNCGraphicsColor): Boolean;\r\n{$IFDEF FMXLIB}\r\nvar\r\n f: TBrush;\r\n{$ENDIF}\r\n{$IFDEF VCLSTYLESENABLED}\r\nvar\r\n l: TThemedElementDetails;\r\n c: TColor;\r\n{$ENDIF}\r\n{$IFDEF WEBLIB}\r\nvar\r\n f: string;\r\n c: TTMSFNCGraphicsColor;\r\n{$ENDIF}\r\nbegin\r\n Result := False;\r\n if StyleServicesEnabled then\r\n begin\r\n {$IFDEF FMXLIB}\r\n f := GetStyleAlternativeBackgroundFill(GetStyleSceneObject);\r\n if Assigned(f) then\r\n begin\r\n AColor := ParseBrush(f, True);\r\n Result := AColor <> claNull;\r\n f.Free;\r\n end;\r\n {$ENDIF}\r\n {$IFDEF VCLSTYLESENABLED}\r\n l := StyleServices.GetElementDetails(teBackgroundNormal);\r\n c := clNone;\r\n StyleServices.GetElementColor(l, ecGradientColor1, c);\r\n AColor := c;\r\n Result := c <> clNone;\r\n {$ENDIF}\r\n {$IFDEF WEBLIB}\r\n f := GetStyleAlternativeBackgroundFill;\r\n if f <> '' then\r\n begin\r\n c := ExtractColorTo(f);\r\n AColor := c;\r\n Result := c <> gcNull;\r\n end;\r\n {$ENDIF}\r\n end;\r\nend;\r\n\r\nclass function TTMSFNCStyles.GetStyleBackgroundStrokeColor(var AColor: TTMSFNCGraphicsColor): Boolean;\r\n{$IFDEF FMXLIB}\r\nvar\r\n s: TStrokeBrush;\r\n{$ENDIF}\r\n{$IFDEF VCLSTYLESENABLED}\r\nvar\r\n l: TThemedElementDetails;\r\n c: TColor;\r\n{$ENDIF}\r\n{$IFDEF WEBLIB}\r\nvar\r\n f: string;\r\n c: TTMSFNCGraphicsColor;\r\n{$ENDIF}\r\nbegin\r\n Result := False;\r\n if StyleServicesEnabled then\r\n begin\r\n {$IFDEF FMXLIB}\r\n s := GetStyleBackgroundStroke(GetStyleSceneObject);\r\n if Assigned(s) then\r\n begin\r\n AColor := ParseBrush(s, False);\r\n Result := AColor <> claNull;\r\n s.Free;\r\n end;\r\n {$ENDIF}\r\n {$IFDEF VCLSTYLESENABLED}\r\n l := StyleServices.GetElementDetails(tgCellNormal);\r\n c := clNone;\r\n StyleServices.GetElementColor(l, ecBorderColor, c);\r\n AColor := c;\r\n Result := c <> clNone;\r\n {$ENDIF}\r\n {$IFDEF WEBLIB}\r\n f := GetStyleBackgroundStroke;\r\n if f <> '' then\r\n begin\r\n c := ExtractColor(f);\r\n AColor := c;\r\n Result := c <> gcNull;\r\n end;\r\n {$ENDIF}\r\n end;\r\nend;\r\n\r\nclass function TTMSFNCStyles.GetStyleDefaultButtonFillColor(var AColor: TTMSFNCGraphicsColor): Boolean;\r\n{$IFDEF FMXLIB}\r\nvar\r\n f: TBrush;\r\n{$ENDIF}\r\n{$IFDEF VCLSTYLESENABLED}\r\nvar\r\n l: TThemedElementDetails;\r\n c: TColor;\r\n{$ENDIF}\r\n{$IFDEF WEBLIB}\r\nvar\r\n f: string;\r\n c: TTMSFNCGraphicsColor;\r\n{$ENDIF}\r\nbegin\r\n Result := False;\r\n if StyleServicesEnabled then\r\n begin\r\n {$IFDEF FMXLIB}\r\n f := GetStyleDefaultButtonFill(GetStyleSceneObject);\r\n if Assigned(f) then\r\n begin\r\n AColor := ParseBrush(f, False);\r\n Result := AColor <> claNull;\r\n f.Free;\r\n end;\r\n {$ENDIF}\r\n {$IFDEF VCLSTYLESENABLED}\r\n l := StyleServices.GetElementDetails(tcbButtonNormal);\r\n c := ExtractColor(l);\r\n AColor := c;\r\n Result := c <> clNone;\r\n {$ENDIF}\r\n {$IFDEF WEBLIB}\r\n f := GetStyleDefaultButtonFill;\r\n if f <> '' then\r\n begin\r\n c := ExtractColor(f);\r\n AColor := c;\r\n Result := c <> gcNull;\r\n end;\r\n {$ENDIF}\r\n end;\r\nend;\r\n\r\nclass function TTMSFNCStyles.GetStyleDefaultButtonStrokeColor(var AColor: TTMSFNCGraphicsColor): Boolean;\r\n{$IFDEF FMXLIB}\r\nvar\r\n s: TStrokeBrush;\r\n{$ENDIF}\r\n{$IFDEF VCLSTYLESENABLED}\r\nvar\r\n l: TThemedElementDetails;\r\n c: TColor;\r\n{$ENDIF}\r\n{$IFDEF WEBLIB}\r\nvar\r\n f: string;\r\n c: TTMSFNCGraphicsColor;\r\n{$ENDIF}\r\nbegin\r\n Result := False;\r\n if StyleServicesEnabled then\r\n begin\r\n {$IFDEF FMXLIB}\r\n s := GetStyleDefaultButtonStroke(GetStyleSceneObject);\r\n if Assigned(s) then\r\n begin\r\n AColor := ParseBrush(s, False);\r\n Result := AColor <> claNull;\r\n s.Free;\r\n end;\r\n {$ENDIF}\r\n {$IFDEF VCLSTYLESENABLED}\r\n l := StyleServices.GetElementDetails(tcbButtonNormal);\r\n c := clNone;\r\n StyleServices.GetElementColor(l, ecBorderColor, c);\r\n AColor := c;\r\n Result := c <> clNone;\r\n {$ENDIF}\r\n {$IFDEF WEBLIB}\r\n f := GetStyleDefaultButtonStroke;\r\n if f <> '' then\r\n begin\r\n c := ExtractColor(f);\r\n AColor := c;\r\n Result := c <> gcNull;\r\n end;\r\n {$ENDIF}\r\n end;\r\nend;\r\n\r\nclass function TTMSFNCStyles.GetStyleHeaderFillColor(var AColor: TTMSFNCGraphicsColor): Boolean;\r\n{$IFDEF FMXLIB}\r\nvar\r\n f: TBrush;\r\n{$ENDIF}\r\n{$IFDEF VCLSTYLESENABLED}\r\nvar\r\n l: TThemedElementDetails;\r\n c: TColor;\r\n{$ENDIF}\r\n{$IFDEF WEBLIB}\r\nvar\r\n f: string;\r\n c: TTMSFNCGraphicsColor;\r\n{$ENDIF}\r\nbegin\r\n Result := False;\r\n if StyleServicesEnabled then\r\n begin\r\n {$IFDEF FMXLIB}\r\n f := GetStyleHeaderFill(GetStyleSceneObject);\r\n if Assigned(f) then\r\n begin\r\n AColor := ParseBrush(f, False);\r\n Result := AColor <> claNull;\r\n f.Free;\r\n end;\r\n {$ENDIF}\r\n {$IFDEF VCLSTYLESENABLED}\r\n l := StyleServices.GetElementDetails(tgFixedCellNormal);\r\n c := ExtractColor(l);\r\n AColor := c;\r\n Result := c <> clNone;\r\n {$ENDIF}\r\n {$IFDEF WEBLIB}\r\n f := GetStyleHeaderFill;\r\n if f <> '' then\r\n begin\r\n c := ExtractColor(f);\r\n AColor := c;\r\n Result := c <> gcNull;\r\n end;\r\n {$ENDIF}\r\n end;\r\nend;\r\n\r\nclass function TTMSFNCStyles.GetStyleHeaderFillColorTo(var AColor: TTMSFNCGraphicsColor): Boolean;\r\n{$IFDEF FMXLIB}\r\nvar\r\n f: TBrush;\r\n{$ENDIF}\r\n{$IFDEF VCLSTYLESENABLED}\r\nvar\r\n l: TThemedElementDetails;\r\n c: TColor;\r\n{$ENDIF}\r\n{$IFDEF WEBLIB}\r\nvar\r\n f: string;\r\n c: TTMSFNCGraphicsColor;\r\n{$ENDIF}\r\nbegin\r\n Result := False;\r\n if StyleServicesEnabled then\r\n begin\r\n {$IFDEF FMXLIB}\r\n f := GetStyleHeaderFill(GetStyleSceneObject);\r\n if Assigned(f) then\r\n begin\r\n AColor := ParseBrush(f, True);\r\n Result := AColor <> claNull;\r\n f.Free;\r\n end;\r\n {$ENDIF}\r\n {$IFDEF VCLSTYLESENABLED}\r\n l := StyleServices.GetElementDetails(tgFixedCellNormal);\r\n c := ExtractColorTo(l);\r\n AColor := c;\r\n Result := c <> clNone;\r\n {$ENDIF}\r\n {$IFDEF WEBLIB}\r\n f := GetStyleHeaderFill;\r\n if f <> '' then\r\n begin\r\n c := ExtractColorTo(f);\r\n AColor := c;\r\n Result := c <> gcNull;\r\n end;\r\n {$ENDIF}\r\n end;\r\nend;\r\n\r\nclass function TTMSFNCStyles.GetStyleHeaderStrokeColor(var AColor: TTMSFNCGraphicsColor): Boolean;\r\n{$IFDEF FMXLIB}\r\nvar\r\n s: TStrokeBrush;\r\n{$ENDIF}\r\n{$IFDEF VCLSTYLESENABLED}\r\nvar\r\n l: TThemedElementDetails;\r\n c: TColor;\r\n{$ENDIF}\r\n{$IFDEF WEBLIB}\r\nvar\r\n f: string;\r\n c: TTMSFNCGraphicsColor;\r\n{$ENDIF}\r\nbegin\r\n Result := False;\r\n if StyleServicesEnabled then\r\n begin\r\n {$IFDEF FMXLIB}\r\n s := GetStyleHeaderStroke(GetStyleSceneObject);\r\n if Assigned(s) then\r\n begin\r\n AColor := ParseBrush(s, False);\r\n Result := AColor <> claNull;\r\n s.Free;\r\n end;\r\n {$ENDIF}\r\n {$IFDEF VCLSTYLESENABLED}\r\n l := StyleServices.GetElementDetails(tgFixedCellNormal);\r\n c := clNone;\r\n StyleServices.GetElementColor(l, ecBorderColor, c);\r\n AColor := c;\r\n Result := c <> clNone;\r\n {$ENDIF}\r\n {$IFDEF WEBLIB}\r\n f := GetStyleHeaderStroke;\r\n if f <> '' then\r\n begin\r\n c := ExtractColor(f);\r\n AColor := c;\r\n Result := c <> gcNull;\r\n end;\r\n {$ENDIF}\r\n end;\r\nend;\r\n\r\nclass function TTMSFNCStyles.GetStyleLineFillColor(\r\n var AColor: TTMSFNCGraphicsColor): Boolean;\r\n{$IFDEF FMXLIB}\r\nvar\r\n f: TBrush;\r\n{$ENDIF}\r\n{$IFDEF VCLSTYLESENABLED}\r\nvar\r\n l: TThemedElementDetails;\r\n c: TColor;\r\n{$ENDIF}\r\n{$IFDEF WEBLIB}\r\nvar\r\n f: string;\r\n c: TTMSFNCGraphicsColor;\r\n{$ENDIF}\r\nbegin\r\n Result := False;\r\n if StyleServicesEnabled then\r\n begin\r\n {$IFDEF FMXLIB}\r\n f := GetStyleLineFill(GetStyleSceneObject);\r\n if Assigned(f) then\r\n begin\r\n AColor := ParseBrush(f, False);\r\n Result := AColor <> claNull;\r\n f.Free;\r\n end;\r\n {$ENDIF}\r\n {$IFDEF VCLSTYLESENABLED}\r\n l := StyleServices.GetElementDetails(tgCellNormal);\r\n c := clNone;\r\n StyleServices.GetElementColor(l, ecBorderColor, c);\r\n AColor := c;\r\n Result := c <> clNone;\r\n {$ENDIF}\r\n {$IFDEF WEBLIB}\r\n f := GetStyleLineFill;\r\n if f <> '' then\r\n begin\r\n c := ExtractColor(f);\r\n AColor := c;\r\n Result := c <> gcNull;\r\n end;\r\n {$ENDIF}\r\n end;\r\nend;\r\n\r\nclass function TTMSFNCStyles.GetStyleSelectionFillColor(var AColor: TTMSFNCGraphicsColor): Boolean;\r\n{$IFDEF FMXLIB}\r\nvar\r\n f: TBrush;\r\n{$ENDIF}\r\n{$IFDEF VCLSTYLESENABLED}\r\nvar\r\n l: TThemedElementDetails;\r\n c: TColor;\r\n{$ENDIF}\r\n{$IFDEF WEBLIB}\r\nvar\r\n f: string;\r\n c: TTMSFNCGraphicsColor;\r\n{$ENDIF}\r\nbegin\r\n Result := False;\r\n if StyleServicesEnabled then\r\n begin\r\n {$IFDEF FMXLIB}\r\n f := GetStyleSelectionFill(GetStyleSceneObject);\r\n if Assigned(f) then\r\n begin\r\n AColor := ParseBrush(f, False);\r\n Result := AColor <> claNull;\r\n f.Free;\r\n end;\r\n {$ENDIF}\r\n {$IFDEF VCLSTYLESENABLED}\r\n l := StyleServices.GetElementDetails(tgCellSelected);\r\n c := clNone;\r\n StyleServices.GetElementColor(l, ecFillColor, c);\r\n c := ExtractColor(l);\r\n AColor := c;\r\n Result := c <> clNone;\r\n {$ENDIF}\r\n {$IFDEF WEBLIB}\r\n f := GetStyleSelectionFill;\r\n if f <> '' then\r\n begin\r\n c := ExtractColor(f);\r\n AColor := c;\r\n Result := c <> gcNull;\r\n end;\r\n {$ENDIF}\r\n end;\r\nend;\r\n\r\nclass function TTMSFNCStyles.GetStyleSelectionFillColorTo(var AColor: TTMSFNCGraphicsColor): Boolean;\r\n{$IFDEF FMXLIB}\r\nvar\r\n f: TBrush;\r\n{$ENDIF}\r\n{$IFDEF VCLSTYLESENABLED}\r\nvar\r\n l: TThemedElementDetails;\r\n c: TColor;\r\n{$ENDIF}\r\n{$IFDEF WEBLIB}\r\nvar\r\n f: string;\r\n c: TTMSFNCGraphicsColor;\r\n{$ENDIF}\r\nbegin\r\n Result := False;\r\n if StyleServicesEnabled then\r\n begin\r\n {$IFDEF FMXLIB}\r\n f := GetStyleSelectionFill(GetStyleSceneObject);\r\n if Assigned(f) then\r\n begin\r\n AColor := ParseBrush(f, True);\r\n Result := AColor <> claNull;\r\n f.Free;\r\n end;\r\n {$ENDIF}\r\n {$IFDEF VCLSTYLESENABLED}\r\n l := StyleServices.GetElementDetails(tgCellSelected);\r\n c := clNone;\r\n StyleServices.GetElementColor(l, ecFillColor, c);\r\n c := ExtractColorTo(l);\r\n AColor := c;\r\n Result := c <> clNone;\r\n {$ENDIF}\r\n {$IFDEF WEBLIB}\r\n f := GetStyleSelectionFill;\r\n if f <> '' then\r\n begin\r\n c := ExtractColorTo(f);\r\n AColor := c;\r\n Result := c <> gcNull;\r\n end;\r\n {$ENDIF}\r\n end;\r\nend;\r\n\r\nclass function TTMSFNCStyles.GetStyleTextFontColor(var AColor: TTMSFNCGraphicsColor): Boolean;\r\n{$IFDEF VCLSTYLESENABLED}\r\nvar\r\n l: TThemedElementDetails;\r\n c: TColor;\r\n{$ENDIF}\r\n{$IFDEF WEBLIB}\r\nvar\r\n f: string;\r\n c: TTMSFNCGraphicsColor;\r\n{$ENDIF}\r\nbegin\r\n Result := False;\r\n if StyleServicesEnabled then\r\n begin\r\n {$IFDEF FMXLIB}\r\n AColor := GetStyleTextColor(GetStyleSceneObject);\r\n Result := AColor <> claNull;\r\n {$ENDIF}\r\n {$IFDEF VCLSTYLESENABLED}\r\n AColor := gcBlack;\r\n l := StyleServices.GetElementDetails(tgCellNormal);\r\n c := clNone;\r\n StyleServices.GetElementColor(l, ecTextColor, c);\r\n AColor := c;\r\n Result := c <> clNone;\r\n {$ENDIF}\r\n {$IFDEF WEBLIB}\r\n f := GetStyleTextColor;\r\n if f <> '' then\r\n begin\r\n c := ExtractColor(f);\r\n AColor := c;\r\n Result := c <> gcNull;\r\n end;\r\n {$ENDIF}\r\n end;\r\nend;\r\n\r\nclass function TTMSFNCStyles.GetStyleAlternativeTextFontColor(var AColor: TTMSFNCGraphicsColor): Boolean;\r\n{$IFDEF VCLSTYLESENABLED}\r\nvar\r\n l: TThemedElementDetails;\r\n c: TColor;\r\n{$ENDIF}\r\n{$IFDEF WEBLIB}\r\nvar\r\n f: string;\r\n c: TTMSFNCGraphicsColor;\r\n{$ENDIF}\r\nbegin\r\n Result := False;\r\n if StyleServicesEnabled then\r\n begin\r\n {$IFDEF FMXLIB}\r\n AColor := GetStyleEditTextColor(GetStyleSceneObject);\r\n Result := AColor <> claNull;\r\n {$ENDIF}\r\n {$IFDEF VCLSTYLESENABLED}\r\n AColor := gcBlack;\r\n l := StyleServices.GetElementDetails(tgCellSelected);\r\n c := clNone;\r\n StyleServices.GetElementColor(l, ecTextColor, c);\r\n AColor := c;\r\n Result := c <> clNone;\r\n {$ENDIF}\r\n {$IFDEF WEBLIB}\r\n f := GetStyleEditTextColor;\r\n if f <> '' then\r\n begin\r\n c := ExtractColor(f);\r\n AColor := c;\r\n Result := c <> gcNull;\r\n end;\r\n {$ENDIF}\r\n end;\r\nend;\r\n\r\n{$IFDEF FMXLIB}\r\nclass procedure TTMSFNCStyles.SetActiveScene(AScene: IScene);\r\nbegin\r\n if Assigned(AScene) and Assigned(AScene.GetObject) and (AScene.GetObject.ClassName <> 'TTMSFNCCustomPopupForm') then\r\n FScene := AScene\r\n else if not Assigned(AScene) then\r\n FScene := nil;\r\nend;\r\n{$ENDIF}\r\n\r\nclass function TTMSFNCStyles.StyleServicesEnabled: Boolean;\r\n{$IFDEF FMXLIB}\r\nvar\r\n s: TFmxObject;\r\n{$ENDIF}\r\nbegin\r\n {$IFDEF WEBLIB}\r\n Result := True;\r\n {$ENDIF}\r\n {$IFDEF LCLLIB}\r\n Result := False;\r\n {$ENDIF}\r\n {$IFDEF FMXLIB}\r\n s := GetStyleSceneObject;\r\n Result := Assigned(s);\r\n {$ENDIF}\r\n {$IFDEF VCLLIB}\r\n {$IFDEF VCLSTYLESENABLED}\r\n {$HINTS OFF}\r\n {$IF COMPILERVERSION >= 34}\r\n Result := StyleServices.Enabled and (StyleServices.Name <> 'Windows') and (StyleServices.Name <> 'Windows10');\r\n {$IFEND}\r\n {$IF COMPILERVERSION < 34}\r\n Result := (StyleServices.Enabled) and (StyleServices.Name <> 'Windows');\r\n {$IFEND}\r\n {$HINTS ON}\r\n {$ENDIF}\r\n {$IFNDEF VCLSTYLESENABLED}\r\n Result := False;\r\n {$ENDIF}\r\n {$ENDIF}\r\nend;\r\n\r\n{$IFDEF FNCLIB}\r\n\r\n{ TTMSFNCStyleManager }\r\n\r\nfunction TTMSFNCStylesManager.GetDocURL: string;\r\nbegin\r\n Result := TTMSFNCBaseDocURL + 'tmsfnccore/components/ttmsfncstyling';\r\nend;\r\n\r\nprocedure TTMSFNCStylesManager.DoCanLoadStyle(AStyle: string;\r\n AComponent: TComponent; var ACanLoadStyle: Boolean);\r\nbegin\r\n if Assigned(OnCanLoadStyle) then\r\n OnCanLoadStyle(Self, AStyle, AComponent, ACanLoadStyle);\r\nend;\r\n\r\nconstructor TTMSFNCStylesManager.Create(AOwner: TComponent);\r\nbegin\r\n inherited;\r\n FOptions := TTMSFNCStylesManagerOptions.Create;\r\nend;\r\n\r\ndestructor TTMSFNCStylesManager.Destroy;\r\nbegin\r\n FOptions.Free;\r\n inherited;\r\nend;\r\n\r\nprocedure TTMSFNCStylesManager.DoStyleLoaded(AStyle: string;\r\n AComponent: TComponent);\r\nbegin\r\n if Assigned(OnStyleLoaded) then\r\n OnStyleLoaded(Self, AStyle, AComponent);\r\nend;\r\n\r\nprocedure TTMSFNCStylesManager.InternalLoadStyle(AValue: string; AComponents: TTMSFNCStylesManagerComponentArray);\r\nvar\r\n v, jv, va, fc: TJSONValue;\r\n fcs: string;\r\n ja: TJSONArray;\r\n I: Integer;\r\n f: TCustomForm;\r\n c: TTMSFNCGraphicsColor;\r\nbegin\r\n v := TTMSFNCUtils.ParseJSON(AValue);\r\n if Assigned(v) then\r\n begin\r\n try\r\n if Options.AdaptFormColor then\r\n begin\r\n fc := TTMSFNCUtils.GetJSONValue(v, 'FormColor');\r\n if Assigned(fc) then\r\n begin\r\n fcs := TTMSFNCUtils.GetJSONProp(v, 'FormColor');\r\n f := StyleForm;\r\n if not Assigned(f) then\r\n f := TTMSFNCUtils.GetOwnerForm(Self);\r\n\r\n if Assigned(f) then\r\n begin\r\n c := TTMSFNCGraphics.HTMLToColor(fcs);\r\n {$IFDEF FMXLIB}\r\n f.Fill.Kind := TBrushKind.Solid;\r\n f.Fill.Color := c;\r\n {$ELSE}\r\n f.Color := c;\r\n {$ENDIF}\r\n end;\r\n end;\r\n end;\r\n\r\n va := TTMSFNCUtils.GetJSONValue(v, 'Styles');\r\n if va is TJSONArray then\r\n begin\r\n ja := va as TJSONArray;\r\n for I := 0 to TTMSFNCUtils.GetJSONArraySize(ja) - 1 do\r\n begin\r\n jv := TTMSFNCUtils.GetJSONArrayItem(ja, I);\r\n if Assigned(jv) then\r\n InternalLoadStyleFromJSONValue(jv, AComponents);\r\n end;\r\n end\r\n else\r\n begin\r\n if Assigned(v) then\r\n InternalLoadStyleFromJSONValue(v, AComponents);\r\n end;\r\n finally\r\n v.Free;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCStylesManager.InternalLoadStyleFromJSONValue(\r\n AJSONValue: TJSONValue; AComponents: TTMSFNCStylesManagerComponentArray);\r\nvar\r\n ct: string;\r\n I, K: Integer;\r\n f: TCustomForm;\r\n io: ITMSFNCPersistence;\r\n s: TStringStream;\r\n st: string;\r\n b: Boolean;\r\n sm: ITMSFNCStylesManager;\r\n arr: TTMSFNCStylesManagerComponentArray;\r\n\r\n function IsComponentInArray(AComponent: TComponent): Boolean;\r\n var\r\n K: Integer;\r\n begin\r\n if Assigned(AComponents) and (Length(AComponents) = 0) or not Assigned(AComponents) then\r\n Result := True\r\n else\r\n begin\r\n Result := False;\r\n for K := 0 to Length(AComponents) - 1 do\r\n begin\r\n if AComponents[K] = AComponent then\r\n begin\r\n Result := True;\r\n Break;\r\n end;\r\n end;\r\n end;\r\n end;\r\n\r\n procedure ApplyStyleToComponent(AComponent: TComponent);\r\n begin\r\n if not Assigned(AComponent) then\r\n Exit;\r\n\r\n if (AComponent.ClassName = ct) and IsComponentInArray(AComponent) then\r\n begin\r\n if Supports(AComponent, ITMSFNCPersistence, io) then\r\n begin\r\n st := TTMSFNCUtils.GetJSONValueAsString(AJSONValue);\r\n b := True;\r\n DoCanLoadStyle(st, AComponent, b);\r\n if b then\r\n begin\r\n s := TStringStream.Create(st{$IFDEF WEBLIB}, TEncoding.Ansi{$ENDIF});\r\n try\r\n io.LoadSettingsFromStream(s);\r\n finally\r\n s.Free;\r\n end;\r\n\r\n DoStyleLoaded(st, AComponent);\r\n end;\r\n end;\r\n end;\r\n end;\r\nbegin\r\n f := StyleForm;\r\n if not Assigned(f) then\r\n f := TTMSFNCUtils.GetOwnerForm(Self);\r\n\r\n if not Assigned(f) then\r\n Exit;\r\n\r\n if Assigned(AJSONValue) then\r\n begin\r\n ct := TTMSFNCUtils.GetJSONProp(AJSONValue, TTMSFNCPersistence.ClassTypeVariable);\r\n if ct <> '' then\r\n begin\r\n for I := f.ComponentCount - 1 downto 0 do\r\n begin\r\n ApplyStyleToComponent(f.Components[I]);\r\n if Supports(f.Components[I], ITMSFNCStylesManager, sm) then\r\n begin\r\n arr := sm.GetSubComponentArray;\r\n for K := 0 to Length(arr) - 1 do\r\n ApplyStyleToComponent(arr[K]);\r\n end;\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\n{$IFNDEF WEBLIB}\r\nfunction TTMSFNCStylesManager.CombineStyles(AFiles: TTMSFNCStylesManagerFileArray): string;\r\nvar\r\n I: Integer;\r\n sl: TStringList;\r\nbegin\r\n Result := '';\r\n if Length(AFiles) = 0 then\r\n Exit;\r\n\r\n Result := '{';\r\n Result := Result + '\"Styles\": [';\r\n sl := TStringList.Create;\r\n try\r\n for I := 0 to Length(AFiles) - 1 do\r\n begin\r\n if FileExists(AFiles[I]) then\r\n sl.LoadFromFile(AFiles[I])\r\n else\r\n sl.Text := AFiles[I];\r\n\r\n Result := Result + sl.Text;\r\n if I < Length(AFiles) - 1 then\r\n Result := Result + ',';\r\n end;\r\n finally\r\n sl.Free;\r\n end;\r\n Result := Result + ']}';\r\nend;\r\n\r\nfunction TTMSFNCStylesManager.GetStyleFromFile(AFile: string): string;\r\nvar\r\n ss: {$IFDEF LCLLIB}TStringList{$ELSE}TStringStream{$ENDIF};\r\nbegin\r\n Result := '';\r\n {$IFNDEF WEBLIB}\r\n if not FileExists(AFile) then\r\n Exit;\r\n {$ENDIF}\r\n\r\n ss := {$IFDEF LCLLIB}TStringList{$ELSE}TStringStream{$ENDIF}.Create;\r\n try\r\n {$IFNDEF WEBLIB}\r\n ss.LoadFromFile(AFile);\r\n Result := {$IFDEF LCLLIB}ss.Text{$ELSE}ss.DataString{$ENDIF};\r\n {$ENDIF}\r\n finally\r\n {$IFNDEF WEBLIB}\r\n ss.Free;\r\n {$ENDIF}\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCStylesManager.GetStyleFromResource(AResourceName: string): string;\r\nvar\r\n r: TResourceStream;\r\n ss: {$IFDEF LCLLIB}TStringList{$ELSE}TStringStream{$ENDIF};\r\nbegin\r\n Result := '';\r\n r := nil;\r\n try\r\n r := TTMSFNCUtils.GetResourceStream(AResourceName, HInstance);\r\n if Assigned(r) then\r\n begin\r\n ss := {$IFDEF LCLLIB}TStringList{$ELSE}TStringStream{$ENDIF}.Create;\r\n try\r\n ss.LoadFromStream(r);\r\n Result := {$IFDEF LCLLIB}ss.Text{$ELSE}ss.DataString{$ENDIF};\r\n finally\r\n ss.Free;\r\n end;\r\n end;\r\n finally\r\n if Assigned(r) then\r\n r.Free;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCStylesManager.LoadStyleFromResource(AResourceName: string; AComponents: TTMSFNCStylesManagerComponentArray);\r\nvar\r\n r: TResourceStream;\r\nbegin\r\n r := nil;\r\n try\r\n r := TTMSFNCUtils.GetResourceStream(AResourceName, HInstance);\r\n if Assigned(r) then\r\n LoadStyleFromStream(r, AComponents);\r\n finally\r\n if Assigned(r) then\r\n r.Free;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCStylesManager.LoadStyleFromResource(AResourceName: string);\r\nvar\r\n a: TTMSFNCStylesManagerComponentArray;\r\nbegin\r\n SetLength(a, 0);\r\n LoadStyleFromResource(AResourceName, a);\r\nend;\r\n{$ENDIF}\r\n\r\n{$IFDEF WEBLIB}\r\nprocedure TTMSFNCStylesManager.LoadStyleFromURL(AURL: string);\r\nvar\r\n a: TTMSFNCStylesManagerComponentArray;\r\nbegin\r\n SetLength(a, 0);\r\n LoadStyleFromFile(AURL, a);\r\nend;\r\n\r\nprocedure TTMSFNCStylesManager.LoadStyleFromURL(AURL: string; AComponents: TTMSFNCStylesManagerComponentArray);\r\nbegin\r\n LoadStyleFromFile(AURL, AComponents);\r\nend;\r\n{$ENDIF}\r\n\r\nprocedure TTMSFNCStylesManager.LoadStyleFromFile(AFile: string);\r\nvar\r\n a: TTMSFNCStylesManagerComponentArray;\r\nbegin\r\n SetLength(a, 0);\r\n LoadStyleFromFile(AFile, a);\r\nend;\r\n\r\nprocedure TTMSFNCStylesManager.LoadStyleFromFile(AFile: string; AComponents: TTMSFNCStylesManagerComponentArray);\r\nvar\r\n ss: {$IFDEF LCLLIB}TStringList{$ELSE}TStringStream{$ENDIF};\r\nbegin\r\n {$IFNDEF WEBLIB}\r\n if not FileExists(AFile) then\r\n Exit;\r\n {$ENDIF}\r\n\r\n ss := {$IFDEF LCLLIB}TStringList{$ELSE}TStringStream{$ENDIF}.Create;\r\n try\r\n {$IFDEF WEBLIB}\r\n FComponents := AComponents;\r\n {$ENDIF}\r\n ss.LoadFromFile(AFile {$IFDEF WEBLIB}, procedure begin{$ELSE});{$ENDIF}\r\n InternalLoadStyle({$IFDEF LCLLIB}ss.Text{$ELSE}ss.DataString{$ENDIF}, AComponents);\r\n {$IFDEF WEBLIB}\r\n ss.Free;\r\n end);\r\n {$ENDIF}\r\n finally\r\n {$IFNDEF WEBLIB}\r\n ss.Free;\r\n {$ENDIF}\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCStylesManager.LoadStyleFromStream(AStream: TStream);\r\nvar\r\n a: TTMSFNCStylesManagerComponentArray;\r\nbegin\r\n SetLength(a, 0);\r\n LoadStyleFromStream(AStream, a);\r\nend;\r\n\r\nprocedure TTMSFNCStylesManager.LoadStyleFromStream(AStream: TStream; AComponents: TTMSFNCStylesManagerComponentArray);\r\nvar\r\n ss: {$IFDEF LCLLIB}TStringList{$ELSE}TStringStream{$ENDIF};\r\nbegin\r\n ss := {$IFDEF LCLLIB}TStringList{$ELSE}TStringStream{$ENDIF}.Create;\r\n try\r\n ss.LoadFromStream(AStream);\r\n InternalLoadStyle({$IFDEF LCLLIB}ss.Text{$ELSE}ss.DataString{$ENDIF}, AComponents);\r\n finally\r\n ss.Free;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCStylesManager.LoadStyleFromText(AText: string);\r\nvar\r\n a: TTMSFNCStylesManagerComponentArray;\r\nbegin\r\n SetLength(a, 0);\r\n InternalLoadStyle(AText, a);\r\nend;\r\n\r\nprocedure TTMSFNCStylesManager.LoadStyleFromText(AText: string; AComponents: TTMSFNCStylesManagerComponentArray);\r\nbegin\r\n InternalLoadStyle(AText, AComponents);\r\nend;\r\n\r\nprocedure TTMSFNCStylesManager.SetStyle(const Value: string);\r\nbegin\r\n if FStyle <> Value then\r\n begin\r\n FStyle := Value;\r\n LoadStyleFromFile(FStyle);\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCStylesManager.SetOptions(const Value: TTMSFNCStylesManagerOptions);\r\nbegin\r\n FOptions.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCStylesManager.SetStyleResource(const Value: string);\r\nbegin\r\n if FStyleResource <> Value then\r\n begin\r\n FStyleResource := Value;\r\n if FStyleResource <> '' then\r\n begin\r\n {$IFNDEF WEBLIB}\r\n LoadStyleFromResource('TTMSFNCSTYLE_' + FStyleResource);\r\n {$ENDIF}\r\n end;\r\n end;\r\nend;\r\n\r\nconstructor TTMSFNCStylesManagerOptions.Create;\r\nbegin\r\n FAdaptFormColor := True;\r\nend;\r\n\r\n{$ENDIF}\r\n\r\nend.\r\n","{********************************************************************}\r\n{ }\r\n{ written by TMS Software }\r\n{ copyright (c) 2017 - 2021 }\r\n{ Email : info@tmssoftware.com }\r\n{ Web : http://www.tmssoftware.com }\r\n{ }\r\n{ The source code is given as is. The author is not responsible }\r\n{ for any possible damage done due to the use of this code. }\r\n{ The complete source code remains property of the author and may }\r\n{ not be distributed, published, given or sold in any form as such. }\r\n{ No parts of the source code can be included in any other component }\r\n{ or application without written authorization of the author. }\r\n{********************************************************************}\r\n\r\nunit WEBLib.TMSFNCUndo;\r\n\r\n{$I WEBLib.TMSFNCDefines.inc}\r\n\r\ninterface\r\n\r\nuses\r\n Classes, WEBLib.TMSFNCTypes;\r\n\r\ntype\r\n TTMSFNCUndoStackItem = class(TCollectionItem)\r\n private\r\n FActionName: string;\r\n FState: TStream;\r\n FObj: TObject;\r\n public\r\n constructor Create(ACollection: TCollection); override;\r\n destructor Destroy; override;\r\n property ActionName: string read FActionName write FActionName;\r\n property Obj: TObject read FObj write FObj;\r\n property State: TStream read FState;\r\n end;\r\n\r\n TTMSFNCUndoManager = class(TCollection)\r\n private\r\n FCurrent: integer;\r\n FObject: TObject;\r\n FMaxStackCount: Integer;\r\n function GetStackItem(Index: Integer): TTMSFNCUndoStackItem;\r\n public\r\n function NextUndoAction: string;\r\n function NextRedoAction: string;\r\n function CanUndo: Boolean;\r\n function CanRedo: Boolean;\r\n procedure Undo;\r\n procedure Redo;\r\n procedure ClearUndoStack;\r\n procedure PushState(const {%H-}AActionName: string);\r\n constructor Create(AObject: TObject);\r\n property MaxStackCount: Integer read FMaxStackCount write FMaxStackCount default 20;\r\n property Stack[Index: Integer]: TTMSFNCUndoStackItem read GetStackItem; default;\r\n end;\r\n\r\nimplementation\r\n\r\nuses\r\n SysUtils,\r\n WEBLib.TMSFNCPersistence;\r\n\r\n{ TTMSFNCUndoStackItem }\r\n\r\nconstructor TTMSFNCUndoStackItem.Create(ACollection: TCollection);\r\nbegin\r\n inherited Create(ACollection);\r\n FState := TMemoryStream.Create;\r\nend;\r\n\r\ndestructor TTMSFNCUndoStackItem.Destroy;\r\nbegin\r\n FState.Free;\r\n inherited;\r\nend;\r\n\r\n{ TTMSFNCUndoManager }\r\n\r\nfunction TTMSFNCUndoManager.CanRedo: Boolean;\r\nbegin\r\n Result := (FCurrent < Count - 1) and (Count > 0);\r\nend;\r\n\r\nfunction TTMSFNCUndoManager.CanUndo: Boolean;\r\nbegin\r\n Result := (FCurrent > 0) and (Count > 0);\r\nend;\r\n\r\nprocedure TTMSFNCUndoManager.ClearUndoStack;\r\nbegin\r\n Clear;\r\n FCurrent := -1;\r\n PushState('');\r\nend;\r\n\r\nconstructor TTMSFNCUndoManager.Create(AObject: TObject);\r\nbegin\r\n inherited Create(TTMSFNCUndoStackItem);\r\n FObject := AObject;\r\n FMaxStackCount := 20;\r\n FCurrent := -1;\r\nend;\r\n\r\nfunction TTMSFNCUndoManager.GetStackItem(Index: Integer): TTMSFNCUndoStackItem;\r\nbegin\r\n Result := nil;\r\n if (Index > -1) and (Index < Count) then\r\n Result := TTMSFNCUndoStackItem(Items[Index]);\r\nend;\r\n\r\nfunction TTMSFNCUndoManager.NextUndoAction: string;\r\nbegin\r\n Result := '';\r\n if (FCurrent > -1) and (FCurrent < Count) then\r\n Result := TTMSFNCUndoStackItem(Items[FCurrent]).ActionName;\r\nend;\r\n\r\nfunction TTMSFNCUndoManager.NextRedoAction: string;\r\nbegin\r\n Result := '';\r\n if (FCurrent >= -1) and (FCurrent < Count - 1) then\r\n Result := TTMSFNCUndoStackItem(Items[FCurrent + 1]).ActionName;\r\nend;\r\n\r\nprocedure TTMSFNCUndoManager.Undo;\r\nvar\r\n p: ITMSFNCPersistence;\r\nbegin\r\n if (FCurrent > 0) and (FCurrent <= Count) then\r\n begin\r\n with TTMSFNCUndoStackItem(Items[FCurrent - 1]) do\r\n begin\r\n FState.Position := 0;\r\n if Supports(FObject, ITMSFNCPersistence, p) then\r\n p.LoadSettingsFromStream(FState)\r\n else\r\n TTMSFNCPersistence.LoadSettingsFromStream(FObject, FState);\r\n end;\r\n Dec(FCurrent);\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCUndoManager.Redo;\r\nvar\r\n p: ITMSFNCPersistence;\r\nbegin\r\n if (FCurrent >= -1) and (FCurrent < Count - 1) then\r\n begin\r\n with TTMSFNCUndoStackItem(Items[FCurrent + 1]) do\r\n begin\r\n FState.Position := 0;\r\n if Supports(FObject, ITMSFNCPersistence, p) then\r\n p.LoadSettingsFromStream(FState)\r\n else\r\n TTMSFNCPersistence.LoadSettingsFromStream(FObject, FState);\r\n end;\r\n Inc(FCurrent);\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCUndoManager.PushState(const AActionName: string);\r\nvar\r\n p: ITMSFNCPersistence;\r\n it: TCollectionItem;\r\nbegin\r\n while FCurrent < Count - 1 do\r\n begin\r\n it := Items[Count - 1];\r\n it.Free;\r\n end;\r\n\r\n with TTMSFNCUndoStackItem(Add) do\r\n begin\r\n ActionName := AActionName;\r\n if Supports(FObject, ITMSFNCPersistence, p) then\r\n p.SaveSettingsToStream(FState)\r\n else\r\n TTMSFNCPersistence.SaveSettingsToStream(FObject, FState);\r\n Inc(FCurrent);\r\n end;\r\n if Count > MaxStackCount then\r\n begin\r\n Delete(0);\r\n dec(FCurrent);\r\n end;\r\nend;\r\n\r\nend.\r\n","{********************************************************************}\r\n{ }\r\n{ written by TMS Software }\r\n{ copyright (c) 2016 - 2024 }\r\n{ Email : info@tmssoftware.com }\r\n{ Web : https://www.tmssoftware.com }\r\n{ }\r\n{ The source code is given as is. The author is not responsible }\r\n{ for any possible damage done due to the use of this code. }\r\n{ The complete source code remains property of the author and may }\r\n{ not be distributed, published, given or sold in any form as such. }\r\n{ No parts of the source code can be included in any other component }\r\n{ or application without written authorization of the author. }\r\n{********************************************************************}\r\n\r\nunit WEBLib.TMSFNCCustomControl;\r\n\r\n{$WARNINGS OFF}\r\n\r\n{$I WEBLib.TMSFNCDefines.inc}\r\n\r\n{$IFDEF CMNLIB}\r\n{$DEFINE CMNWEBLIB}\r\n{$ENDIF}\r\n{$IFDEF WEBLIB}\r\n{$DEFINE CMNWEBLIB}\r\n{$DEFINE LCLWEBLIB}\r\n{$DEFINE VCLWEBLIB}\r\n{$ENDIF}\r\n{$IFDEF LCLLIB}\r\n{$DEFINE LCLWEBLIB}\r\n{$ENDIF}\r\n{$IFDEF VCLLIB}\r\n{$DEFINE VCLWEBLIB}\r\n{$ENDIF}\r\n\r\n{$IFDEF FMXMOBILE}\r\n{$DEFINE DRAWTRIAL}\r\n{$ENDIF}\r\n\r\n{$IFDEF WEBLIB}\r\n{$DEFINE DRAWTRIAL}\r\n{$ENDIF}\r\n\r\n{$IFDEF FNCLIB}\r\n{$DEFINE USETRIAL}\r\n\r\n{$IFDEF VCLLIB}\r\n{$HINTS OFF}\r\n{$IF COMPILERVERSION > 34}\r\n{$DEFINE VCLSTYLESENABLED}\r\n{$IFEND}\r\n{$HINTS ON}\r\n{$ENDIF}\r\n\r\n{$ELSE}\r\n{$IFDEF FMXLIB}\r\n{$DEFINE USETRIAL}\r\n{$ENDIF}\r\n{$ENDIF}\r\n\r\ninterface\r\n\r\nuses\r\n {$IFDEF MSWINDOWS}\r\n {%H-}Windows,\r\n {$ENDIF}\r\n Classes, WEBLib.Controls, WEBLib.TMSFNCGraphics, WEBLib.Graphics, WEBLib.TMSFNCStyles\r\n ,WEBLib.TMSFNCPersistence, WEBLib.TMSFNCUndo\r\n {$IFNDEF WEBLIB}\r\n {$IFDEF FNCLIB}\r\n ,WEBLib.TMSFNCHint\r\n {$ELSE}\r\n {$IFDEF VCLLIB}\r\n {$IFDEF FREEWARE}\r\n ,TMSTrial\r\n {$ENDIF}\r\n {$ENDIF}\r\n {$ENDIF}\r\n {$ENDIF}\r\n ,Types, WEBLib.TMSFNCGraphicsTypes, WEBLib.TMSFNCTypes, TypInfo, WEBLib.Forms\r\n {$IFDEF VCLLIB}\r\n ,Messages\r\n {$ENDIF}\r\n {$IFDEF WEBLIB}\r\n ,WEBLib.Menus\r\n {$ENDIF}\r\n {$IFNDEF LCLLIB}\r\n {$IFNDEF WEBLIB}\r\n {$HINTS OFF}\r\n {$IF COMPILERVERSION > 22}\r\n ,UITypes\r\n {$IFEND}\r\n {$HINTS ON}\r\n ,Generics.Collections\r\n {$ENDIF}\r\n {$ENDIF}\r\n {$IFDEF LCLLIB}\r\n ,LMessages, LCLType, {%H-}LCLIntF, fgl\r\n {$ENDIF}\r\n {$IFDEF FMXLIB}\r\n ,FMX.Types, Messaging\r\n {$ENDIF}\r\n ;\r\n\r\n {$IFNDEF LCLLIB}\r\nconst\r\n FPC_FULLVERSION = 0;\r\n {$ENDIF}\r\n\r\ntype\r\n {$IFDEF FNCLIB}\r\n {$IFNDEF WEBLIB}\r\n ITMSFNCShortCutHint = interface\r\n ['{A3E21A73-163A-4617-841B-8E0A62BF41B0}']\r\n function HasShortCut(AShortCut: string): Boolean;\r\n function HandleShortCut(AShortCut: string): Boolean;\r\n function GetShortCutHint: string;\r\n function IsShortCutHintActive: Boolean;\r\n procedure ShowShortCutHint;\r\n procedure CancelShortCutHint(AClearShortCutHintString: Boolean = True);\r\n procedure SetShortCutHint(const Value: string);\r\n property ShortCutHint: string read GetShortCutHint write SetShortCutHint;\r\n end;\r\n {$ENDIF}\r\n {$ENDIF}\r\n\r\n {$IFNDEF LCLWEBLIB}\r\n FNCJSLibReferenceAttribute = class(TCustomAttribute)\r\n strict private\r\n FAttrs: string;\r\n FCSSs: string;\r\n FDesc: string;\r\n FSrcs: string;\r\n public\r\n constructor Create(const AScrs: string); overload;\r\n constructor Create(const AScrs, ACSSs: string); overload;\r\n constructor Create(const AScrs, ACSSs, AAttrs: string); overload;\r\n constructor Create(const AScrs, ACSSs, AAttrs, ADesc: string); overload;\r\n property Attrs: string read FAttrs;\r\n property CSSs: string read FCSSs;\r\n property Desc: string read FDesc;\r\n property Srcs: string read FSrcs;\r\n end;\r\n {$ENDIF}\r\n\r\n TTMSFNCCustomDesignerForm = class(TForm);\r\n\r\n TTMSFNCCustomControl = class;\r\n\r\n TTMSFNCControlAlignment = (caNone, caTop, caBottom, caLeft, caRight, caClient);\r\n TTMSFNCControlPosition = (cpTopLeft, cpTopCenter, cpTopRight, cpCenterLeft, cpCenterCenter, cpCenterRight, cpBottomLeft, cpBottomCenter, cpBottomRight);\r\n\r\n {$IFDEF FNCLIB}\r\n {$IFNDEF WEBLIB}\r\n TTMSFNCCustomControlShortCutWindowList = TObjectList;\r\n {$ENDIF}\r\n {$ENDIF}\r\n\r\n TTMSFNCCustomControlDropFiles = class\r\n private\r\n FFiles: TStringList;\r\n function GetFiles: TStringList;\r\n public\r\n destructor Destroy; override;\r\n property Files: TStringList read GetFiles;\r\n end;\r\n\r\n {$IFDEF FMXLIB}\r\n TTMSFNCCustomControlBaseCommon = class(TControl, ITMSFNCAdaptToStyle, ITMSFNCProductInfo {$IFDEF FNCLIB}, ITMSFNCShortCutHint{$ENDIF})\r\n {$ENDIF}\r\n {$IFDEF CMNWEBLIB}\r\n TTMSFNCCustomControlBaseCommon = class({$IFDEF WEBLIB}TWebCustomControl{$ELSE}TCustomControl{$ENDIF}, ITMSFNCAdaptToStyle, ITMSFNCProductInfo {$IFNDEF WEBLIB}{$IFDEF FNCLIB}, ITMSFNCShortCutHint{$ENDIF}{$ENDIF}) {NOPP}\r\n {$ENDIF}\r\n private\r\n {$IFDEF FMXLIB}\r\n {$IFDEF MSWINDOWS}\r\n FMessageHandler: HWND;\r\n {$ENDIF}\r\n {$ENDIF}\r\n FResourceScaleFactor: Single;\r\n FPaintScaleFactor: Single;\r\n FDesigntimeFormPixelsPerInch: Integer;\r\n {$IFDEF CMNWEBLIB}\r\n FAllowFocus: Boolean;\r\n {$ENDIF}\r\n {$IFDEF FNCLIB}\r\n FShortCutHint: string;\r\n {$IFNDEF WEBLIB}\r\n FShortCutLimitation: string;\r\n FShortCutWindowList: TTMSFNCCustomControlShortCutWindowList;\r\n {$ENDIF}\r\n {$ENDIF}\r\n FAcceptDropFiles: Boolean;\r\n FAllowGetChildren: Boolean;\r\n FAdaptToStyle: Boolean;\r\n FAdaptedToStyle: Boolean;\r\n FTransparent: Boolean;\r\n FBufferedPainting: Boolean;\r\n FNativeCanvas: Boolean;\r\n FAntiAliasing: Boolean;\r\n FOptimizedHTMLDrawing: Boolean;\r\n FShowAcceleratorChar: Boolean;\r\n FTextQuality: TTMSFNCGraphicsTextQuality;\r\n FOnInternalDblClick: TNotifyEvent;\r\n FOnInternalMouseDown: TNotifyEvent;\r\n FOnInternalMouseMove: TNotifyEvent;\r\n FOnInternalMouseUp: TNotifyEvent;\r\n function GetAllowFocus: Boolean;\r\n {$IFDEF FNCLIB}\r\n function GetShortCutHint: string;\r\n {$ENDIF}\r\n function GetControlAlignment: TTMSFNCControlAlignment;\r\n procedure SetAcceptDropFiles(const Value: Boolean);\r\n procedure SetAllowFocus(const Value: Boolean);\r\n procedure SetControlAlignment(const Value: TTMSFNCControlAlignment);\r\n procedure SetAntiAliasing(const Value: Boolean);\r\n procedure SetOptimizedHTMLDrawing(const Value: Boolean);\r\n procedure SetShowAcceleratorChar(const Value: Boolean);\r\n procedure SetNativeCanvas(const Value: Boolean);\r\n procedure SetTextQuality(const Value: TTMSFNCGraphicsTextQuality);\r\n {$IFDEF FNCLIB}\r\n procedure SetShortCutHint(const Value: string);\r\n {$ENDIF}\r\n protected\r\n function GetVersion: string; virtual;\r\n function GetDocURL: string; virtual;\r\n function GetTipsURL: string; virtual;\r\n function HandleDesignHitTest(const APoint: TPoint): Boolean; virtual;\r\n function GetClientMousePos: TPointF; virtual;\r\n function ConvertScreenToClient(APoint: TPointF): TPointF; virtual;\r\n function ConvertClientToScreen(APoint: TPointF): TPointF; virtual;\r\n function GetDragObjectScreenShot: TTMSFNCBitmap; virtual;\r\n function GetAdaptToStyle: Boolean; virtual;\r\n {$IFDEF FMXLIB}\r\n procedure SetEnabled(const Value: Boolean); override;\r\n {$ENDIF}\r\n {$IFNDEF FMXLIB}\r\n procedure SetEnabled(Value: Boolean); override;\r\n {$ENDIF}\r\n {$IFDEF FNCLIB}\r\n {$IFNDEF WEBLIB}\r\n function HasShortCut(AShortCut: string): Boolean; virtual;\r\n function HandleShortCut(AShortCut: string): Boolean; virtual;\r\n function ExecuteShortCutMethod(AShortCut: string): Boolean; virtual;\r\n function IsShortCutHintActive: Boolean; virtual;\r\n {$ENDIF}\r\n {$ENDIF}\r\n {$IFDEF FMXLIB}\r\n procedure SetParent(const Value: TFmxObject); override;\r\n procedure Loaded; override;\r\n {$ENDIF}\r\n procedure CalcFactor;\r\n procedure ChangeDPIScale({%H-}M, {%H-}D: Integer); virtual;\r\n procedure DestroyGraphicElements; virtual; abstract;\r\n procedure SetDefaultGraphicColors; virtual;\r\n procedure SetAdaptToStyle(const Value: Boolean); virtual;\r\n procedure CancelHint; virtual;\r\n procedure BeginDrag; virtual;{$IFDEF WEBLIB}reintroduce;{$ENDIF}\r\n procedure InitializeStyle;\r\n procedure ApplyStyle; virtual;\r\n procedure ResetToDefaultStyle; virtual;\r\n procedure HandleMouseLeave; virtual;\r\n procedure HandleMouseEnter; virtual;\r\n procedure HandleMouseDown({%H-}Button: TTMSFNCMouseButton; {%H-}Shift: TShiftState; {%H-}X, {%H-}Y: Single); virtual;\r\n procedure HandleMouseMove({%H-}Shift: TShiftState; {%H-}X, {%H-}Y: Single); virtual;\r\n procedure HandleDblClick({%H-}X, {%H-}Y: Single); virtual;\r\n procedure HandleMouseUp({%H-}Button: TTMSFNCMouseButton; {%H-}Shift: TShiftState; {%H-}X, {%H-}Y: Single); virtual;\r\n procedure HandleKeyPress(var {%H-}Key: Char); virtual;\r\n {$IFDEF VCLLIB}\r\n procedure HandleTransparentDrawing(ADC: HDC); virtual;\r\n {$ENDIF}\r\n {$IFDEF LCLLIB}\r\n procedure HandleUTF8KeyPress(var {%$H-}UTF8Key: TUTF8Char); virtual;\r\n {$ENDIF}\r\n procedure HandleKeyDown(var {%H-}Key: Word; {%H-}Shift: TShiftState); virtual;\r\n procedure HandleDialogKey(var {%H-}Key: Word; {%H-}Shift: TShiftState); virtual;\r\n procedure HandleKeyUp(var {%H-}Key: Word; {%H-}Shift: TShiftState); virtual;\r\n procedure HandleMouseWheel({%H-}Shift: TShiftState; {%H-}WheelDelta: Integer; var {%H-}Handled: Boolean); virtual;\r\n procedure HandleDragOver(const {%H-}Source: TObject; const {%H-}Point: TPointF; var {%H-}Accept: Boolean); virtual;\r\n procedure HandleDragDrop(const {%H-}Source: TObject; const {%H-}Point: TPointF); virtual;\r\n {$IFDEF FNCLIB}\r\n {$IFNDEF WEBLIB}\r\n procedure GetShortCutHints(AShortCutHints: TStringList); virtual;\r\n procedure ShowShortCutHint; virtual;\r\n procedure CustomizeShortCut({%H-}AShortCutWindow: TTMSFNCHint; {%H-}AShortCut: string; {%H-}AShortCutRect: TRectF; var {%H-}AShortCutPosition: TPointF); virtual;\r\n procedure CancelShortCutHint(AClearShortCutHintString: Boolean = True); virtual;\r\n {$ENDIF}\r\n {$ENDIF}\r\n property AcceptDropFiles: Boolean read FAcceptDropFiles write SetAcceptDropFiles default False;\r\n property AdaptToStyle: Boolean read GetAdaptToStyle write SetAdaptToStyle default False;\r\n property Transparent: Boolean read FTransparent write FTransparent default False;\r\n property BufferedPainting: Boolean read FBufferedPainting write FBufferedPainting default False;\r\n property NativeCanvas: Boolean read FNativeCanvas write SetNativeCanvas default False;\r\n property AntiAliasing: Boolean read FAntiAliasing write SetAntiAliasing default True;\r\n property OptimizedHTMLDrawing: Boolean read FOptimizedHTMLDrawing write SetOptimizedHTMLDrawing default True;\r\n property ShowAcceleratorChar: Boolean read FShowAcceleratorChar write SetShowAcceleratorChar default True;\r\n property TextQuality: TTMSFNCGraphicsTextQuality read FTextQuality write SetTextQuality default gtqAntiAliasing;\r\n property OnInternalMouseDown: TNotifyEvent read FOnInternalMouseDown write FOnInternalMouseDown;\r\n property OnInternalMouseUp: TNotifyEvent read FOnInternalMouseUp write FOnInternalMouseUp;\r\n property OnInternalMouseMove: TNotifyEvent read FOnInternalMouseMove write FOnInternalMouseMove;\r\n property OnInternalDblClick: TNotifyEvent read FOnInternalDblClick write FOnInternalDblClick;\r\n {$IFDEF FNCLIB}\r\n property ShortCutHint: string read GetShortCutHint write SetShortCutHint;\r\n {$ENDIF}\r\n property AllowGetChildren: Boolean read FAllowGetChildren write FAllowGetChildren default False;\r\n public\r\n constructor Create(AOwner: TComponent); override;\r\n destructor Destroy; override;\r\n property AllowFocus: Boolean read GetAllowFocus write SetAllowFocus default True;\r\n property Canvas;\r\n property ControlAlignment: TTMSFNCControlAlignment read GetControlAlignment write SetControlAlignment default caNone;\r\n procedure SetControlMargins(ALeft, ATop, ARight, ABottom: Single);\r\n procedure GetControlMargins(var ALeft, ATop, ARight, ABottom: Single);\r\n\r\n function ScaleResourceValue(const Value: Integer): Integer; overload;\r\n function ScaleResourceValue(const Value: Double): Double; overload;\r\n\r\n function ScalePaintValue(const Value: Integer): Integer; overload;\r\n function ScalePaintValue(const Value: Double): Double; overload;\r\n\r\n property ResourceScaleFactor: Single read FResourceScaleFactor;\r\n property PaintScaleFactor: Single read FPaintScaleFactor;\r\n property DesigntimeFormPixelsPerInch: Integer read FDesigntimeFormPixelsPerInch;\r\n\r\n {$IFDEF FMXLIB}\r\n procedure SetBounds(X, Y, AWidth, AHeight: Single); override;\r\n {$ENDIF}\r\n end;\r\n\r\n {$IFDEF FMXLIB}\r\n TTMSFNCCustomControlBase = class(TTMSFNCCustomControlBaseCommon)\r\n private\r\n FStyleChangedId: Integer;\r\n function GetL: Single;\r\n function GetT: Single;\r\n procedure SetTop(const Value: Single);\r\n procedure SetLeft(const Value: Single);\r\n protected\r\n procedure StyleChangedHandler(const Sender: TObject; const Msg: TMessage); virtual;\r\n procedure DoMouseEnter; override;\r\n procedure DoMouseLeave; override;\r\n procedure DragOver(const Data: TDragObject; const Point: TPointF; var Operation: TDragOperation); override;\r\n procedure DragDrop(const Data: TDragObject; const Point: TPointF); override;\r\n procedure MouseDown(Button: TTMSFNCMouseButton; Shift: TShiftState; X, Y: Single); override;\r\n procedure MouseMove(Shift: TShiftState; X, Y: Single); override;\r\n procedure MouseUp(Button: TTMSFNCMouseButton; Shift: TShiftState; X, Y: Single); override;\r\n procedure KeyDown(var Key: Word; var KeyChar: WideChar; Shift: TShiftState); override;\r\n procedure KeyUp(var Key: Word; var KeyChar: WideChar; Shift: TShiftState); override;\r\n procedure DialogKey(var Key: Word; Shift: TShiftState); override;\r\n procedure MouseWheel(Shift: TShiftState; WheelDelta: Integer; var Handled: Boolean); override;\r\n procedure DblClick; override;\r\n {$HINTS OFF}\r\n {$IF COMPILERVERSION < 30}\r\n function GetHintString: String; virtual;\r\n function HasHint: Boolean; virtual;\r\n {$IFEND}\r\n {$IF COMPILERVERSION = 28}\r\n procedure BeginUpdate; virtual;\r\n procedure EndUpdate; virtual;\r\n {$IFEND}\r\n {$HINTS ON}\r\n public\r\n property Left: Single read GetL write SetLeft;\r\n property Top: Single read GetT write SetTop;\r\n procedure Invalidate; virtual;\r\n procedure SetNewScene(AScene: IScene); override;\r\n constructor Create(AOwner: TComponent); override;\r\n destructor Destroy; override;\r\n end;\r\n {$ENDIF}\r\n\r\n {$IFDEF CMNWEBLIB}\r\n TTMSFNCCustomControlBase = class(TTMSFNCCustomControlBaseCommon)\r\n private\r\n FStored: Boolean;\r\n FHitTest: Boolean;\r\n {$IFDEF VCLLIB}\r\n procedure WMDropFiles(var Message: TWMDropFiles); message WM_DROPFILES;\r\n procedure WMGetDlgCode(var Message: TWMGetDlgCode); message WM_GETDLGCODE;\r\n procedure WMEraseBkGnd(var Message: TWMEraseBkGnd); message WM_ERASEBKGND;\r\n procedure WMPaint(var Message: TWMPaint); message WM_PAINT;\r\n procedure CMMouseLeave(var Message: TMessage); message CM_MOUSELEAVE;\r\n procedure CMMouseEnter(var Message: TMessage); message CM_MOUSEENTER;\r\n procedure CMFocusChanged(var Message: TCMFocusChanged); message CM_FOCUSCHANGED;\r\n procedure CMHintShow(var Message: TMessage); message CM_HINTSHOW;\r\n procedure WMNCHitTest(var Message: TWMNCHitTest); message WM_NCHITTEST;\r\n procedure CMDesignHitTest(var Message: TCMDesignHitTest); message CM_DESIGNHITTEST;\r\n {$HINTS OFF}\r\n {$IF COMPILERVERSION > 22}\r\n procedure CMStyleChanged(var Message: TMessage); message CM_STYLECHANGED;\r\n {$IFEND}\r\n {$HINTS ON}\r\n {$ENDIF}\r\n {$IFDEF LCLLIB}\r\n procedure WMGetDlgCode(var {%H-}Message: TLMNoParams); message LM_GETDLGCODE;\r\n {$IFDEF MSWINDOWS}\r\n procedure WMEraseBkGnd(var {%H-}Message: TLMEraseBkGnd); message LM_ERASEBKGND;\r\n procedure WMPaint(var {%H-}Message: TLMPaint); message LM_PAINT;\r\n {$ENDIF}\r\n procedure WMMouseWheel(var {%H-}Message: TLMMouseEvent); message LM_MOUSEWHEEL;\r\n procedure CMMouseLeave(var {%H-}Message: TLMNoParams); message CM_MOUSELEAVE;\r\n procedure CMMouseEnter(var {%H-}Message: TLMNoParams); message CM_MOUSEENTER;\r\n procedure CMFocusChanged(var {%H-}Message: TLMessage); message CM_FOCUSCHANGED;\r\n procedure CMHintShow(var {%H-}Message: TLMessage); message CM_HINTSHOW;\r\n procedure WMNCHitTest(var Message: TLMessage) ; message LM_NCHITTEST;\r\n {$HINTS OFF}\r\n {$IF FPC_FULLVERSION < 30000}\r\n procedure WMLButtonDBLCLK(var Message: TLMLButtonDblClk); message LM_LBUTTONDBLCLK;\r\n {$IFEND}\r\n {$HINTS ON}\r\n {$ENDIF}\r\n {$IFDEF WEBLIB}\r\n procedure MouseWheel(Shift: TShiftState; WheelDelta: Integer; var Handled: Boolean); override;\r\n procedure DoMouseLeave; override;\r\n procedure DoMouseEnter; override;\r\n {$ENDIF}\r\n protected\r\n function GetLocalRect: TRectF; virtual;\r\n function GetHintString: String; virtual;\r\n function HasHint: Boolean; virtual;\r\n procedure MouseDown(Button: TTMSFNCMouseButton; Shift: TShiftState; X, Y: Integer); override;\r\n procedure MouseMove(Shift: TShiftState; X, Y: Integer); override;\r\n procedure MouseUp(Button: TTMSFNCMouseButton; Shift: TShiftState; X, Y: Integer); override;\r\n procedure DragOver(Source: TObject; X, Y: Integer; State: TDragState; var Accept: Boolean); override;\r\n procedure KeyDown(var Key: Word; Shift: TShiftState); override;\r\n {$IFDEF LCLLIB}\r\n procedure UTF8KeyPress(var UTF8Key: TUTF8Char); override;\r\n {$ENDIF}\r\n procedure KeyPress(var Key: Char); override;\r\n procedure KeyUp(var Key: Word; Shift: TShiftState); override;\r\n procedure DblClick; override;\r\n {$IFDEF VCLLIB}\r\n function DoMouseWheel(Shift: TShiftState; WheelDelta: Integer; MousePos: TPoint): Boolean; override;\r\n {$HINTS OFF}\r\n {$IF COMPILERVERSION > 30}\r\n procedure ChangeScale(M, D: Integer; isDpiChange: Boolean); override;\r\n {$ELSE}\r\n procedure ChangeScale(M, D: Integer); override;\r\n {$IFEND}\r\n {$HINTS ON}\r\n {$ENDIF}\r\n public\r\n constructor Create(AOwner: TComponent); override;\r\n {$IFDEF WEBLIB}\r\n procedure BeginUpdate; override;\r\n procedure EndUpdate; override;\r\n {$ENDIF}\r\n {$IFNDEF WEBLIB}\r\n procedure BeginUpdate; virtual;\r\n procedure EndUpdate; virtual;\r\n {$ENDIF}\r\n procedure DragDrop(Source: TObject; X, Y: Integer); override;\r\n function CanFocus: Boolean; override;\r\n property LocalRect: TRectF read GetLocalRect;\r\n property Stored: Boolean read FStored write FStored default True;\r\n property HitTest: Boolean read FHitTest write FHitTest default True;\r\n end;\r\n {$ENDIF}\r\n\r\n TTMSFNCCustomControlBeforeDrawEvent = procedure(Sender: TObject; AGraphics: TTMSFNCGraphics; ARect: TRectF; var ADefaultDraw: Boolean) of object;\r\n TTMSFNCCustomControlAfterDrawEvent = procedure(Sender: TObject; AGraphics: TTMSFNCGraphics; ARect: TRectF) of object;\r\n TTMSFNCCustomControlCanSavePropertyEvent = procedure(Sender: TObject; AObject: TObject; APropertyName: string; APropertyType: TTypeKind; var ACanSave: Boolean) of object;\r\n TTMSFNCCustomControlCanLoadPropertyEvent = procedure(Sender: TObject; AObject: TObject; APropertyName: string; APropertyType: TTypeKind; var ACanLoad: Boolean) of object;\r\n\r\n TTMSFNCCustomControl = class(TTMSFNCCustomControlBase, ITMSFNCGraphicsExport, ITMSFNCPersistence)\r\n private\r\n class var FBlockPersistenceInterface: Boolean;\r\n private\r\n FBlockInvalidate: Boolean;\r\n FAppearancePersisting: Boolean;\r\n FExporting: Boolean;\r\n FExportRect: TRectF;\r\n FOnBeforeDraw: TTMSFNCCustomControlBeforeDrawEvent;\r\n FOnAfterDraw: TTMSFNCCustomControlAfterDrawEvent;\r\n FOnCanSaveProperty: TTMSFNCCustomControlCanSavePropertyEvent;\r\n FOnCanLoadProperty: TTMSFNCCustomControlCanLoadPropertyEvent;\r\n {$IFDEF FMXLIB}\r\n FColor: TTMSFNCGraphicsColor;\r\n {$ENDIF}\r\n FCheckedChk, FUnCheckedChk, FCheckedFocusChk, FUnCheckedFocusChk, FCheckedDisabledChk, FUnCheckedDisabledChk: TTMSFNCBitmapHelperClass;\r\n FCheckedRd, FUnCheckedRd, FCheckedFocusRd, FUnCheckedFocusRd, FCheckedDisabledRd, FUnCheckedDisabledRd: TTMSFNCBitmapHelperClass;\r\n FDownBtn, FNormalBtn, FDownFocusBtn, FNormalFocusBtn, FNormalDisabledBtn: TTMSFNCBitmapHelperClass;\r\n FFill: TTMSFNCGraphicsFill;\r\n FStroke: TTMSFNCGraphicsStroke;\r\n FDataPointer: Pointer;\r\n FDataBoolean: Boolean;\r\n FDataString: String;\r\n FDataObject: TObject;\r\n FDataInteger: NativeInt;\r\n FUndoManager: TTMSFNCUndoManager;\r\n function GetUndoManager: TTMSFNCUndoManager;\r\n procedure SetFill(const Value: TTMSFNCGraphicsFill);\r\n procedure SetStroke(const Value: TTMSFNCGraphicsStroke);\r\n {$IFDEF FMXLIB}\r\n procedure SetColor(const Value: TTMSFNCGraphicsColor);\r\n {$ENDIF}\r\n protected\r\n {$IFDEF WEBLIB}\r\n class function GetVersionNumber(AMaj, AMin, ARel, ABld: ShortInt): string;\r\n {$ENDIF}\r\n function IsAppearanceProperty({%H-}AObject: TObject; {%H-}APropertyName: string; {%H-}APropertyType: TTypeKind): Boolean; virtual;\r\n function CanSaveProperty({%H-}AObject: TObject; {%H-}APropertyName: string; {%H-}APropertyType: TTypeKind): Boolean; virtual;\r\n function CanLoadProperty({%H-}AObject: TObject; {%H-}APropertyName: string; {%H-}APropertyType: TTypeKind): Boolean; virtual;\r\n function GetVersion: string; override;\r\n function LocalToScreenEx(APoint: TPointF): TPointF; virtual;\r\n function ScreenToLocalEx(APoint: TPointF): TPointF; virtual;\r\n function GetContentRect: TRectF; virtual;\r\n function GetControlRect: TRectF; virtual;\r\n function GetLocalRect: TRectF; override;\r\n function IsExporting: Boolean; virtual;\r\n {$IFDEF CMNLIB}\r\n function GetTransparentColor: TTMSFNCGraphicsColor; virtual;\r\n {$ENDIF}\r\n {$IFDEF WEBLIB}\r\n procedure SetColor(AValue: TColor); override;\r\n {$ENDIF}\r\n procedure ChangeDPIScale({%H-}M, {%H-}D: Integer); override;\r\n procedure RegisterRuntimeClasses; virtual;\r\n procedure &Export({%H-}AGraphics: TTMSFNCGraphics; {%H-}ARect: TRectF); virtual;\r\n procedure SetExportRect(ARect: TRectF); virtual;\r\n procedure ApplyExportScale(AScale: Single); virtual;\r\n procedure ResetExportScale; virtual;\r\n procedure BeforeExport; virtual;\r\n procedure AfterExport; virtual;\r\n procedure ApplyStyle; override;\r\n procedure ResetToDefaultStyle; override;\r\n procedure DestroyGraphicElements; override;\r\n {$IFDEF FMXLIB}\r\n procedure TurnOffAnimation(chk: TFmxObject); virtual;\r\n {$ENDIF}\r\n {$IFDEF LCLLIB}\r\n procedure DoSetBounds(ALeft, ATop, AWidth, AHeight: Integer); override;\r\n {$ENDIF}\r\n {$IFDEF VCLLIB}\r\n procedure CreateWnd; override;\r\n {$ENDIF}\r\n procedure UpdateControlAfterResize; virtual;\r\n procedure CreateCheckBoxBitmaps; virtual;\r\n procedure CreateRadioButtonBitmaps; virtual;\r\n procedure CreateButtonBitmaps(AWidth, AHeight: Single); virtual;\r\n procedure DoBeforeDraw(AGraphics: TTMSFNCGraphics; ARect: TRectF; var ADefaultDraw: Boolean); virtual;\r\n procedure DoAfterDraw(AGraphics: TTMSFNCGraphics; ARect: TRectF); virtual;\r\n procedure DoCanSaveProperty(AObject: TObject; APropertyName: string; APropertyType: TTypeKind; var ACanSave: Boolean); virtual;\r\n procedure DoCanLoadProperty(AObject: TObject; APropertyName: string; APropertyType: TTypeKind; var ACanLoad: Boolean); virtual;\r\n procedure DrawBackground(AGraphics: TTMSFNCGraphics; {%H-}ARect: TRectF); virtual;\r\n procedure StrokeChanged(Sender: TObject);\r\n procedure FillChanged(Sender: TObject);\r\n procedure Draw({%H-}AGraphics: TTMSFNCGraphics; {%H-}ARect: TRectF); virtual;\r\n procedure DrawControl; virtual;\r\n procedure DoBitmapChanged(Sender: TObject);\r\n {$IFDEF DRAWTRIAL}\r\n {$IFDEF FREEWARE}\r\n procedure DrawTrial(AGraphics: TTMSFNCGraphics; {%H-}ARect: TRectF); virtual;\r\n {$ENDIF}\r\n {$ENDIF}\r\n property Fill: TTMSFNCGraphicsFill read FFill write SetFill;\r\n property Stroke: TTMSFNCGraphicsStroke read FStroke write SetStroke;\r\n procedure CaptureEx; virtual;\r\n procedure ReleaseCaptureEx; virtual;\r\n public\r\n procedure Assign(Source: TPersistent); override;\r\n constructor Create(AOwner: TComponent); override;\r\n destructor Destroy; override;\r\n function GetCheckBoxBitmap(AChecked: Boolean = False; AFocused: Boolean = False; AEnabled: Boolean = True): TTMSFNCBitmapHelperClass; virtual;\r\n function GetRadioButtonBitmap(AChecked: Boolean = False; AFocused: Boolean = False; AEnabled: Boolean = True): TTMSFNCBitmapHelperClass; virtual;\r\n function GetButtonBitmap(AWidth, AHeight: Single; ADown: Boolean = False; AFocused: Boolean = False; AEnabled: Boolean = True): TTMSFNCBitmapHelperClass; virtual;\r\n function IsDesignTime: Boolean; virtual;\r\n function IsLoading: Boolean; virtual;\r\n function IsReading: Boolean; virtual;\r\n function IsDesigning: Boolean; virtual;\r\n function IsDesignerForm: Boolean; virtual;\r\n function IsDestroying: Boolean; virtual;\r\n procedure SaveSettingsToFile(AFileName: string; AAppearanceOnly: Boolean = False); virtual;\r\n procedure LoadSettingsFromFile(AFileName: string); virtual;\r\n procedure SaveSettingsToStream(AStream: TStream; AAppearanceOnly: Boolean = False); virtual;\r\n procedure LoadSettingsFromStream(AStream: TStream); virtual;\r\n procedure DisableBackground;\r\n procedure EnableBackground;\r\n procedure DisableFill;\r\n procedure EnableFill;\r\n procedure DisableStroke;\r\n procedure EnableStroke;\r\n procedure Resize; override;\r\n procedure Paint; override;\r\n property DataPointer: Pointer read FDataPointer write FDataPointer;\r\n property DataBoolean: Boolean read FDataBoolean write FDataBoolean;\r\n property DataObject: TObject read FDataObject write FDataObject;\r\n property DataString: String read FDataString write FDataString;\r\n property DataInteger: NativeInt read FDataInteger write FDataInteger;\r\n property UndoManager: TTMSFNCUndoManager read GetUndoManager;\r\n class property BlockPersistenceInterface: Boolean read FBlockPersistenceInterface write FBlockPersistenceInterface;\r\n property BlockInvalidate: Boolean read FBlockInvalidate write FBlockInvalidate;\r\n published\r\n property AdaptToStyle;\r\n property AllowFocus default True;\r\n {$IFDEF FMXLIB}\r\n property Anchors;\r\n property Hint;\r\n property ShowHint;\r\n property Color: TTMSFNCGraphicsColor read FColor write SetColor default gcWhite;\r\n property Align;\r\n property CanParentFocus;\r\n property ClipChildren default True;\r\n property ClipParent default False;\r\n property DisableFocusEffect default True;\r\n property DragMode default TDragMode.dmManual;\r\n property EnableDragHighlight default True;\r\n property Enabled default True;\r\n property Height;\r\n property HitTest default True;\r\n property Locked default False;\r\n property Padding;\r\n property Opacity;\r\n property Margins;\r\n property PopupMenu;\r\n property Position;\r\n property RotationAngle;\r\n property RotationCenter;\r\n property Scale;\r\n {$HINTS OFF}\r\n {$IF COMPILERVERSION > 27}\r\n property Size;\r\n {$IFEND}\r\n {$HINTS ON}\r\n property TabOrder;\r\n property TabStop default True;\r\n property TouchTargetExpansion;\r\n property Visible default True;\r\n property Width;\r\n property OnApplyStyleLookup;\r\n property OnDragEnter;\r\n property OnDragLeave;\r\n property OnDragOver;\r\n property OnDragDrop;\r\n property OnDragEnd;\r\n property OnKeyDown;\r\n property OnKeyUp;\r\n property OnCanFocus;\r\n property OnClick;\r\n property OnDblClick;\r\n property OnEnter;\r\n property OnExit;\r\n property OnMouseDown;\r\n property OnMouseMove;\r\n property OnMouseUp;\r\n property OnMouseWheel;\r\n property OnMouseEnter;\r\n property OnMouseLeave;\r\n property OnResize;\r\n {$ENDIF}\r\n\r\n {$IFDEF CMNLIB}\r\n property Align;\r\n {$IFDEF LCLLIB}\r\n property BorderSpacing;\r\n {$ENDIF}\r\n {$IFNDEF LCLLIB}\r\n property BevelEdges;\r\n property BevelInner;\r\n property BevelKind;\r\n property BevelOuter;\r\n property BevelWidth;\r\n property Ctl3D;\r\n property ParentCtl3D;\r\n property ParentDoubleBuffered;\r\n {$HINTS OFF}\r\n {$IF COMPILERVERSION > 23}\r\n property StyleElements;\r\n {$IFEND}\r\n {$HINTS ON}\r\n property Touch;\r\n property OnGesture;\r\n property OnMouseActivate;\r\n {$ENDIF}\r\n property Anchors;\r\n property BiDiMode;\r\n property Color default gcWhite;\r\n property Constraints;\r\n property DoubleBuffered;\r\n property DragCursor;\r\n property DragKind;\r\n property DragMode;\r\n property Enabled;\r\n property Font;\r\n property TabStop default True;\r\n property ParentBiDiMode;\r\n property ParentColor default False;\r\n property ParentFont;\r\n property ParentShowHint;\r\n property PopupMenu;\r\n property ShowHint;\r\n property Hint;\r\n property TabOrder;\r\n property Visible;\r\n property OnClick;\r\n property OnContextPopup;\r\n property OnDblClick;\r\n property OnDragDrop;\r\n property OnDragOver;\r\n property OnEndDock;\r\n property OnEndDrag;\r\n property OnEnter;\r\n property OnExit;\r\n property OnKeyDown;\r\n property OnKeyPress;\r\n property OnKeyUp;\r\n property OnMouseDown;\r\n property OnMouseEnter;\r\n property OnMouseLeave;\r\n property OnMouseMove;\r\n property OnMouseUp;\r\n property OnMouseWheelDown;\r\n property OnMouseWheelUp;\r\n property OnStartDock;\r\n property OnStartDrag;\r\n property OnResize;\r\n {$ENDIF}\r\n {$IFDEF WEBLIB}\r\n property Align;\r\n property AlignWithMargins;\r\n property Anchors;\r\n property BiDiMode;\r\n property BorderStyle;\r\n property Center;\r\n property ChildOrder;\r\n property Color;\r\n property DragMode;\r\n property DoubleBuffered;\r\n property ElementClassName;\r\n property ElementID;\r\n property ElementFont;\r\n property ElementPosition;\r\n property Enabled;\r\n property Font;\r\n property Height;\r\n property HeightPercent;\r\n property HeightStyle;\r\n property Hint;\r\n property Left;\r\n property Margins;\r\n property PopupMenu;\r\n property ParentDoubleBuffered;\r\n property ParentFont;\r\n property Role;\r\n property TabStop;\r\n property ShowHint;\r\n property TabOrder;\r\n property Top;\r\n property Width;\r\n property WidthPercent;\r\n property WidthStyle;\r\n property Visible;\r\n property OnClick;\r\n property OnDblClick;\r\n property OnEnter;\r\n property OnExit;\r\n property OnKeyDown;\r\n property OnKeyPress;\r\n property OnKeyUp;\r\n property OnMouseDown;\r\n property OnMouseEnter;\r\n property OnMouseLeave;\r\n property OnMouseMove;\r\n property OnMouseUp;\r\n property OnMouseWheel;\r\n property OnMouseWheelUp;\r\n property OnMouseWheelDown;\r\n property OnDragOver;\r\n property OnDragDrop;\r\n property OnResize;\r\n {$ENDIF}\r\n property ShowAcceleratorChar;\r\n property OnBeforeDraw: TTMSFNCCustomControlBeforeDrawEvent read FOnBeforeDraw write FOnBeforeDraw;\r\n property OnAfterDraw: TTMSFNCCustomControlAfterDrawEvent read FOnAfterDraw write FOnAfterDraw;\r\n property OnCanSaveProperty: TTMSFNCCustomControlCanSavePropertyEvent read FOnCanSaveProperty write FOnCanSaveProperty;\r\n property OnCanLoadProperty: TTMSFNCCustomControlCanLoadPropertyEvent read FOnCanLoadProperty write FOnCanLoadProperty;\r\n end;\r\n\r\n TTMSFNCCustomControlClass = class of TTMSFNCCustomControl;\r\n\r\n TTMSFNCControl = class(TTMSFNCCustomControl)\r\n protected\r\n procedure RegisterRuntimeClasses; override;\r\n end;\r\n\r\nfunction IsSourceDropFiles(ASource: TObject): Boolean;\r\nfunction AsSourceDropFiles(ASource: TObject): TTMSFNCCustomControlDropFiles;\r\n\r\nimplementation\r\n\r\nuses\r\n WEBLib.TMSFNCUtils, SysUtils\r\n {$IFNDEF LCLLIB}\r\n ,WEBLib.StdCtrls\r\n {$IFDEF MSWINDOWS}\r\n ,WinApi.ShellApi\r\n {$ENDIF} \r\n {$ENDIF}\r\n {$IFDEF VCLSTYLESENABLED}\r\n ,VCL.Themes\r\n {$ENDIF}\r\n {$IFDEF FMXLIB}\r\n ,FMX.Platform, FMX.Ani\r\n {$ENDIF}\r\n\r\n {$IFDEF VCLLIB}\r\n ,WEBLib.TMSFNCXPVS\r\n {$ENDIF}\r\n {$IFDEF USETRIAL}\r\n {$IFNDEF LCLLIB}\r\n {$IFNDEF WEBLIB}\r\n {$IFNDEF FMXMOBILE}\r\n {$IFDEF FREEWARE}\r\n {$IFDEF MSWINDOWS}\r\n ,System.Win.Registry\r\n {$ENDIF}\r\n {$IFDEF MACOS}\r\n ,MacApi.AppKit, MacApi.Foundation, MacApi.Helpers\r\n {$ENDIF}\r\n {$IFDEF FMXLIB}\r\n ,FMX.Objects, UIConsts\r\n {$ENDIF}\r\n {$IFDEF VCLLIB}\r\n ,VCL.ExtCtrls\r\n {$ENDIF}\r\n {$ENDIF}\r\n {$ENDIF}\r\n {$ENDIF}\r\n {$ENDIF}\r\n {$ENDIF}\r\n ;\r\n\r\n{$IFDEF CMNLIB}\r\ntype\r\n TWinControlProtected = class(TWinControl)\r\n public\r\n procedure PaintCtrls(DC: HDC; First: TControl);\r\n end;\r\n{$ENDIF}\r\n\r\n{$IFDEF CMNLIB}\r\nfunction CreateShiftStateEx: TShiftState;\r\nbegin\r\n Result := [];\r\n if GetKeyState(VK_SHIFT) < 0 then\r\n Include(Result, ssShift);\r\n if GetKeyState(VK_CONTROL) < 0 then\r\n Include(Result, ssCtrl);\r\n if GetKeyState(VK_MENU) < 0 then\r\n Include(Result, ssAlt);\r\nend;\r\n{$ENDIF}\r\n\r\nfunction IsSourceDropFiles(ASource: TObject): Boolean;\r\nbegin\r\n Result := ASource is TTMSFNCCustomControlDropFiles;\r\nend;\r\n\r\nfunction AsSourceDropFiles(ASource: TObject): TTMSFNCCustomControlDropFiles;\r\nbegin\r\n Result := ASource as TTMSFNCCustomControlDropFiles;\r\nend;\r\n\r\n{ TTMSFNCCustomControlDropFiles }\r\n\r\ndestructor TTMSFNCCustomControlDropFiles.Destroy;\r\nbegin\r\n FreeAndNil(FFiles);\r\nend;\r\n\r\nfunction TTMSFNCCustomControlDropFiles.GetFiles: TStringList;\r\nbegin\r\n if not Assigned(FFiles) then\r\n FFiles := TStringList.Create;\r\n\r\n Result := FFiles;\r\nend;\r\n\r\n{ TTMSFNCCustomControlBaseCommon }\r\n\r\nprocedure TTMSFNCCustomControlBaseCommon.SetAdaptToStyle(const Value: Boolean);\r\nbegin\r\n FAdaptToStyle := Value;\r\n InitializeStyle;\r\nend;\r\n\r\n{$IFDEF FMXLIB}\r\nprocedure TTMSFNCCustomControlBaseCommon.Loaded;\r\nbegin\r\n CalcFactor;\r\n inherited;\r\nend;\r\n\r\nprocedure TTMSFNCCustomControlBaseCommon.SetBounds(X, Y, AWidth, AHeight: Single);\r\nbegin\r\n CalcFactor;\r\n inherited;\r\nend;\r\n\r\nprocedure TTMSFNCCustomControlBaseCommon.SetParent(const Value: TFmxObject);\r\nbegin\r\n CalcFactor;\r\n inherited;\r\nend;\r\n{$ENDIF}\r\n\r\nprocedure TTMSFNCCustomControlBaseCommon.CalcFactor;\r\nbegin\r\n FResourceScaleFactor := TTMSFNCUtils.GetDPIScale(Self, 96);\r\n {$IFDEF FMXLIB}\r\n FPaintScaleFactor := 1.0;\r\n {$ELSE}\r\n FPaintScaleFactor := FResourceScaleFactor;\r\n {$ENDIF}\r\nend;\r\n\r\nprocedure TTMSFNCCustomControlBaseCommon.ChangeDPIScale(M, D: Integer);\r\nbegin\r\n\r\nend;\r\n\r\nfunction TTMSFNCCustomControlBaseCommon.GetAdaptToStyle: Boolean;\r\nbegin\r\n Result := FAdaptToStyle;\r\nend;\r\n\r\nprocedure TTMSFNCCustomControlBaseCommon.ApplyStyle;\r\nbegin\r\n\r\nend;\r\n\r\nprocedure TTMSFNCCustomControlBaseCommon.ResetToDefaultStyle;\r\nbegin\r\n\r\nend;\r\n\r\nprocedure TTMSFNCCustomControlBaseCommon.SetDefaultGraphicColors;\r\nvar\r\n c: TTMSFNCGraphicsColor;\r\nbegin\r\n c := gcNull;\r\n if TTMSFNCStyles.GetStyleBackgroundFillColor(c) then\r\n TTMSFNCGraphics.DefaultPopupFillColor := c\r\n else\r\n TTMSFNCGraphics.DefaultPopupFillColor := gcWhite;\r\n\r\n c := gcNull;\r\n if TTMSFNCStyles.GetStyleBackgroundStrokeColor(c) then\r\n TTMSFNCGraphics.DefaultPopupStrokeColor := c\r\n else\r\n TTMSFNCGraphics.DefaultPopupStrokeColor := gcSilver;\r\n\r\n c := gcNull;\r\n if TTMSFNCStyles.GetStyleDefaultButtonFillColor(c) then\r\n TTMSFNCGraphics.DefaultButtonFillColor := c\r\n else\r\n TTMSFNCGraphics.DefaultButtonFillColor := MakeGraphicsColor(225, 225, 225);\r\n\r\n c := gcNull;\r\n if TTMSFNCStyles.GetStyleLineFillColor(c) then\r\n TTMSFNCGraphics.DefaultButtonStrokeColor := c\r\n else\r\n TTMSFNCGraphics.DefaultButtonStrokeColor := gcDarkgray;\r\n\r\n c := gcNull;\r\n if TTMSFNCStyles.GetStyleTextFontColor(c) then\r\n TTMSFNCGraphics.DefaultTextFontColor := c\r\n else\r\n TTMSFNCGraphics.DefaultTextFontColor := gcBlack;\r\n\r\n c := gcNull;\r\n if TTMSFNCStyles.GetStyleSelectionFillColor(c) then\r\n begin\r\n TTMSFNCGraphics.DefaultSelectionFillColor := c;\r\n TTMSFNCGraphics.DefaultButtonFillColorFocused := Blend(c, TTMSFNCGraphics.DefaultButtonFillColor, 25);\r\n TTMSFNCGraphics.DefaultButtonStrokeColorFocused := Blend(c, TTMSFNCGraphics.DefaultButtonStrokeColor, 30);\r\n end\r\n else\r\n begin\r\n TTMSFNCGraphics.DefaultSelectionFillColor := gcBlack;\r\n TTMSFNCGraphics.DefaultButtonFillColorFocused := MakeGraphicsColor(229, 241, 251);\r\n TTMSFNCGraphics.DefaultButtonStrokeColorFocused := MakeGraphicsColor(60, 127, 177);\r\n end;\r\n\r\n TTMSFNCGraphics.DefaultButtonStrokeColorDisabled := gcDarkGray;\r\n TTMSFNCGraphics.DefaultButtonFillColorDisabled := gcLightgray;\r\nend;\r\n\r\nprocedure TTMSFNCCustomControlBaseCommon.InitializeStyle;\r\nbegin\r\n {$IFDEF FMXLIB}\r\n TTMSFNCStyles.SetActiveScene(Scene);\r\n {$ENDIF}\r\n SetDefaultGraphicColors;\r\n DestroyGraphicElements;\r\n if AdaptToStyle then\r\n begin\r\n FAdaptedToStyle := True;\r\n ApplyStyle;\r\n end\r\n else if FAdaptedToStyle then\r\n begin\r\n ResetToDefaultStyle;\r\n FAdaptedToStyle := False;\r\n end;\r\n\r\n Invalidate;\r\nend;\r\n\r\nfunction TTMSFNCCustomControlBaseCommon.GetVersion: string;\r\nbegin\r\n Result := '';\r\nend;\r\n\r\nfunction TTMSFNCCustomControlBaseCommon.GetDocURL: string;\r\nbegin\r\n Result := TTMSFNCBaseDocURL;\r\nend;\r\n\r\nfunction TTMSFNCCustomControlBaseCommon.HandleDesignHitTest(const APoint: TPoint): Boolean;\r\nbegin\r\n Result := False;\r\nend;\r\n\r\nfunction TTMSFNCCustomControlBaseCommon.GetTipsURL: string;\r\nbegin\r\n Result := TTMSFNCBaseTipsURL;\r\nend;\r\n\r\nfunction TTMSFNCCustomControlBaseCommon.GetClientMousePos: TPointF;\r\nbegin\r\n Result := ConvertScreenToClient(TTMSFNCUtils.GetMousePos);\r\nend;\r\n\r\n{$IFDEF CMNWEBLIB}\r\nfunction TTMSFNCCustomControlBaseCommon.ConvertClientToScreen(APoint: TPointF): TPointF;\r\nvar\r\n p: TPoint;\r\nbegin\r\n p := ClientToScreen(Point(Round(APoint.X), Round(APoint.Y)));\r\n Result := PointF(p.X, p.Y);\r\nend;\r\n{$ENDIF}\r\n\r\n{$IFDEF FMXLIB}\r\nfunction TTMSFNCCustomControlBaseCommon.ConvertClientToScreen(APoint: TPointF): TPointF;\r\nbegin\r\n Result := LocalToScreen(APoint);\r\nend;\r\n{$ENDIF}\r\n\r\n{$IFDEF CMNWEBLIB}\r\nfunction TTMSFNCCustomControlBaseCommon.ConvertScreenToClient(APoint: TPointF): TPointF;\r\nvar\r\n p: TPoint;\r\nbegin\r\n p := ScreenToClient(Point(Round(APoint.X), Round(APoint.Y)));\r\n Result := PointF(p.X, p.Y);\r\nend;\r\n{$ENDIF}\r\n\r\n{$IFDEF FMXLIB}\r\nfunction TTMSFNCCustomControlBaseCommon.ConvertScreenToClient(APoint: TPointF): TPointF;\r\nbegin\r\n Result := ScreenToLocal(APoint);\r\nend;\r\n{$ENDIF}\r\n\r\nconstructor TTMSFNCCustomControlBaseCommon.Create(AOwner: TComponent);\r\nvar\r\n ppi: Integer;\r\n{$IFDEF VCLLIB}\r\n{$HINTS OFF}\r\n{$IF COMPILERVERSION > 34}\r\n f: TCustomForm;\r\n{$IFEND}\r\n{$HINTS ON}\r\n{$ENDIF}\r\nbegin\r\n inherited;\r\n ppi := 96;\r\n {$IFDEF VCLLIB}\r\n {$HINTS OFF}\r\n {$IF COMPILERVERSION > 34}\r\n f := TTMSFNCUtils.GetOwnerForm(Self);\r\n if Assigned(f) then\r\n ppi := f.PixelsPerInch;\r\n {$IFEND}\r\n {$HINTS ON}\r\n {$ENDIF}\r\n\r\n FDesigntimeFormPixelsPerInch := ppi;\r\n\r\n FPaintScaleFactor := 1.0;\r\n FResourceScaleFactor := 1.0;\r\n {$IFDEF FNCLIB}\r\n {$IFNDEF WEBLIB}\r\n FShortCutWindowList := TTMSFNCCustomControlShortCutWindowList.Create;\r\n {$ENDIF}\r\n {$ENDIF}\r\n SetDefaultGraphicColors;\r\n FAdaptToStyle := False;\r\n FAdaptedToStyle := False;\r\n FAcceptDropFiles := False;\r\n FTransparent := False;\r\n FNativeCanvas := False;\r\n FBufferedPainting := False;\r\n FAntiAliasing := True;\r\n FOptimizedHTMLDrawing := True;\r\n FShowAcceleratorChar := True;\r\n FTextQuality := gtqAntiAliasing;\r\n {$IFDEF CMNWEBLIB}\r\n FAllowFocus := True;\r\n {$ENDIF}\r\nend;\r\n\r\ndestructor TTMSFNCCustomControlBaseCommon.Destroy;\r\nbegin\r\n {$IFDEF FNCLIB}\r\n {$IFNDEF WEBLIB}\r\n CancelShortCutHint;\r\n FShortCutWindowList.Free;\r\n {$ENDIF}\r\n {$ENDIF}\r\n\r\n {$IFDEF FMXLIB}\r\n {$IFDEF MSWINDOWS}\r\n DeallocateHWnd(FMessageHandler);\r\n {$ENDIF}\r\n {$ENDIF}\r\n inherited;\r\nend;\r\n\r\nfunction TTMSFNCCustomControlBaseCommon.GetAllowFocus: Boolean;\r\nbegin\r\n {$IFDEF FMXLIB}\r\n Result := CanFocus;\r\n {$ENDIF}\r\n {$IFDEF CMNWEBLIB}\r\n Result := FAllowFocus;\r\n {$ENDIF}\r\nend;\r\n\r\nprocedure TTMSFNCCustomControlBaseCommon.SetAcceptDropFiles(const Value: Boolean);\r\nbegin\r\n if FAcceptDropFiles <> Value then\r\n begin\r\n FAcceptDropFiles := Value;\r\n {$IFDEF VCLLIB}\r\n DragAcceptFiles(Handle, FAcceptDropFiles);\r\n {$ENDIF}\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomControlBaseCommon.SetAllowFocus(const Value: Boolean);\r\nbegin\r\n {$IFDEF FMXLIB}\r\n CanFocus := Value;\r\n {$ENDIF}\r\n {$IFDEF CMNWEBLIB}\r\n FAllowFocus := Value;\r\n {$ENDIF}\r\nend;\r\n\r\n{$IFDEF FNCLIB}\r\nfunction TTMSFNCCustomControlBaseCommon.GetShortCutHint: string;\r\nbegin\r\n Result := FShortCutHint;\r\nend;\r\n\r\nprocedure TTMSFNCCustomControlBaseCommon.SetShortCutHint(const Value: string);\r\nbegin\r\n FShortCutHint := Value;\r\nend;\r\n\r\n{$IFNDEF WEBLIB}\r\nfunction TTMSFNCCustomControlBaseCommon.IsShortCutHintActive: Boolean;\r\nbegin\r\n Result := FShortCutWindowList.Count > 0;\r\nend;\r\n\r\nprocedure TTMSFNCCustomControlBaseCommon.CancelShortCutHint(AClearShortCutHintString: Boolean = True);\r\nbegin\r\n FShortCutWindowList.Clear;\r\n if AClearShortCutHintString then\r\n FShortCutLimitation := '';\r\nend;\r\n\r\nprocedure TTMSFNCCustomControlBaseCommon.CustomizeShortCut(AShortCutWindow: TTMSFNCHint; AShortCut: string; AShortCutRect: TRectF; var AShortCutPosition: TPointF);\r\nbegin\r\n\r\nend;\r\n\r\nprocedure TTMSFNCCustomControlBaseCommon.GetShortCutHints(AShortCutHints: TStringList);\r\nbegin\r\n AShortCutHints.Add(ShortCutHint);\r\nend;\r\n\r\nprocedure TTMSFNCCustomControlBaseCommon.ShowShortCutHint;\r\nvar\r\n pt: TPointF;\r\n r: TRect;\r\n I: Integer;\r\n h: TTMSFNCHint;\r\n s: string;\r\n l: TStringList;\r\nbegin\r\n CancelShortCutHint(False);\r\n l := TStringList.Create;\r\n try\r\n GetShortCutHints(l);\r\n\r\n for I := 0 to l.Count - 1 do\r\n begin\r\n s := l[I];\r\n if (s <> '') and ((Pos(FShortCutLimitation, s) > 0) or (FShortCutLimitation = '')) then\r\n begin\r\n h := TTMSFNCHint.Create(Self);\r\n r := h.Calculate(s);\r\n pt := PointF((Width - (r.Right - r.Left)) / 2, Height - (r.Bottom - r.Top) / 2);\r\n CustomizeShortCut(h, s, ConvertToRectF(r), pt);\r\n pt := ConvertClientToScreen(pt);\r\n h.ShowHintAt(s, Round(pt.X), Round(pt.Y));\r\n FShortCutWindowList.Add(h);\r\n end;\r\n end;\r\n finally\r\n l.Free;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCCustomControlBaseCommon.ExecuteShortCutMethod(AShortCut: String): Boolean;\r\nbegin\r\n Result := False;\r\n if AShortCut = ShortCutHint then\r\n begin\r\n Click;\r\n Result := True;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCCustomControlBaseCommon.HasShortCut(AShortCut: string): Boolean;\r\nvar\r\n sl: TStringList;\r\n i: Integer;\r\n s: string;\r\nbegin\r\n Result := False;\r\n sl := TStringList.Create;\r\n try\r\n GetShortCutHints(sl);\r\n for I := 0 to sl.Count - 1 do\r\n begin\r\n s := sl[I];\r\n if (s <> '') and ((Pos(AShortCut, s) = 1) or (AShortCut = '')) then\r\n begin\r\n Result := True;\r\n Break;\r\n end;\r\n end;\r\n finally\r\n sl.Free;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCCustomControlBaseCommon.HandleShortCut(AShortcut: string): Boolean;\r\nvar\r\n sl: TStringList;\r\n s: string;\r\n I: Integer;\r\n b: Boolean;\r\nbegin\r\n Result := False;\r\n if not Enabled then\r\n Exit;\r\n\r\n Result := ExecuteShortCutMethod(AShortCut);\r\n if Result then\r\n begin\r\n CancelShortCutHint;\r\n FShortCutLimitation := '';\r\n end\r\n else\r\n begin\r\n FShortCutLimitation := AShortCut;\r\n sl := TStringList.Create;\r\n try\r\n GetShortCutHints(sl);\r\n b := False;\r\n for I := 0 to sl.Count - 1 do\r\n begin\r\n s := sl[I];\r\n if (s <> '') and ((Pos(FShortCutLimitation, s) = 1) or (FShortCutLimitation = '')) then\r\n begin\r\n b := True;\r\n Break;\r\n end;\r\n end;\r\n\r\n if b then\r\n ShowShortCutHint\r\n else\r\n CancelShortCutHint;\r\n finally\r\n sl.Free;\r\n end;\r\n end;\r\nend;\r\n{$ENDIF}\r\n{$ENDIF}\r\n\r\nprocedure TTMSFNCCustomControlBaseCommon.SetTextQuality(const Value: TTMSFNCGraphicsTextQuality);\r\nbegin\r\n if FTextQuality <> Value then\r\n begin\r\n FTextQuality := Value;\r\n Invalidate;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomControlBaseCommon.SetNativeCanvas(const Value: Boolean);\r\nbegin\r\n if FNativeCanvas <> Value then\r\n begin\r\n FNativeCanvas := Value;\r\n Invalidate;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomControlBaseCommon.SetAntiAliasing(const Value: Boolean);\r\nbegin\r\n if FAntiAliasing <> Value then\r\n begin\r\n FAntiAliasing := Value;\r\n Invalidate;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomControlBaseCommon.SetOptimizedHTMLDrawing(const Value: Boolean);\r\nbegin\r\n if FOptimizedHTMLDrawing <> Value then\r\n begin\r\n FOptimizedHTMLDrawing := Value;\r\n Invalidate;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomControlBaseCommon.SetShowAcceleratorChar(const Value: Boolean);\r\nbegin\r\n if FShowAcceleratorChar <> Value then\r\n begin\r\n FShowAcceleratorChar := Value;\r\n Invalidate;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCCustomControlBaseCommon.GetControlAlignment: TTMSFNCControlAlignment;\r\nbegin\r\n Result := caNone;\r\n {$IFDEF FMXLIB}\r\n case Align of\r\n TAlignLayout.None: Result := caNone;\r\n TAlignLayout.Top: Result := caTop;\r\n TAlignLayout.Bottom: Result := caBottom;\r\n TAlignLayout.Left: Result := caLeft;\r\n TAlignLayout.Right: Result := caRight;\r\n TAlignLayout.Client: Result := caClient;\r\n end;\r\n {$ENDIF}\r\n {$IFDEF CMNWEBLIB}\r\n case Align of\r\n alNone: Result := caNone;\r\n alTop: Result := caTop;\r\n alBottom: Result := caBottom;\r\n alLeft: Result := caLeft;\r\n alRight: Result := caRight;\r\n alClient: Result := caClient;\r\n end;\r\n {$ENDIF}\r\nend;\r\n\r\nprocedure TTMSFNCCustomControlBaseCommon.SetControlAlignment(const Value: TTMSFNCControlAlignment);\r\nbegin\r\n {$IFDEF FMXLIB}\r\n case Value of\r\n caNone: Align := TAlignLayout.None;\r\n caTop: Align := TAlignLayout.Top;\r\n caBottom: Align := TAlignLayout.Bottom;\r\n caLeft: Align := TAlignLayout.Left;\r\n caRight: Align := TAlignLayout.Right;\r\n caClient: Align := TAlignLayout.Client;\r\n end;\r\n {$ENDIF}\r\n {$IFDEF CMNWEBLIB}\r\n case Value of\r\n caNone: Align := alNone;\r\n caTop: Align := alTop;\r\n caBottom: Align := alBottom;\r\n caLeft: Align := alLeft;\r\n caRight: Align := alRight;\r\n caClient: Align := alClient;\r\n end;\r\n {$ENDIF}\r\nend;\r\n\r\n{$IFDEF VCLLIB}\r\nprocedure TTMSFNCCustomControlBaseCommon.HandleTransparentDrawing(ADC: HDC);\r\nbegin\r\n //\r\nend;\r\n{$ENDIF}\r\n\r\nprocedure TTMSFNCCustomControlBaseCommon.HandleMouseLeave;\r\nbegin\r\n\r\nend;\r\n\r\nprocedure TTMSFNCCustomControlBaseCommon.HandleMouseEnter;\r\nbegin\r\n\r\nend;\r\n\r\nprocedure TTMSFNCCustomControlBaseCommon.HandleMouseDown(Button: TTMSFNCMouseButton; Shift: TShiftState; X: Single; Y: Single);\r\nbegin\r\n\r\nend;\r\n\r\nprocedure TTMSFNCCustomControlBaseCommon.HandleMouseMove(Shift: TShiftState; X: Single; Y: Single);\r\nbegin\r\n\r\nend;\r\n\r\nprocedure TTMSFNCCustomControlBaseCommon.HandleDblClick(X: Single; Y: Single);\r\nbegin\r\n\r\nend;\r\n\r\nprocedure TTMSFNCCustomControlBaseCommon.HandleDragOver(const Source: TObject; const Point: TPointF; var Accept: Boolean);\r\nbegin\r\n\r\nend;\r\n\r\nprocedure TTMSFNCCustomControlBaseCommon.HandleDragDrop(const Source: TObject; const Point: TPointF);\r\nbegin\r\nend;\r\n\r\nprocedure TTMSFNCCustomControlBaseCommon.HandleMouseUp(Button: TTMSFNCMouseButton; Shift: TShiftState; X: Single; Y: Single);\r\nbegin\r\n\r\nend;\r\n\r\n{$IFDEF LCLLIB}\r\nprocedure TTMSFNCCustomControlBaseCommon.HandleUTF8KeyPress(var {%$H-}UTF8Key: TUTF8Char);\r\nbegin\r\nend;\r\n{$ENDIF}\r\n\r\nprocedure TTMSFNCCustomControlBaseCommon.HandleKeyPress(var Key: Char);\r\nbegin\r\n\r\nend;\r\n\r\nprocedure TTMSFNCCustomControlBaseCommon.HandleKeyDown(var Key: Word; Shift: TShiftState);\r\nbegin\r\n\r\nend;\r\n\r\nprocedure TTMSFNCCustomControlBaseCommon.HandleDialogKey(var Key: Word; Shift: TShiftState);\r\nbegin\r\n\r\nend;\r\n\r\nprocedure TTMSFNCCustomControlBaseCommon.HandleKeyUp(var Key: Word; Shift: TShiftState);\r\nbegin\r\n\r\nend;\r\n\r\nprocedure TTMSFNCCustomControlBaseCommon.HandleMouseWheel(Shift: TShiftState; WheelDelta: Integer; var Handled: Boolean);\r\nbegin\r\n\r\nend;\r\n\r\n{$IFDEF FMXLIB}\r\nprocedure TTMSFNCCustomControlBase.StyleChangedHandler(const Sender: TObject; const Msg: TMessage);\r\nbegin\r\n InitializeStyle;\r\nend;\r\n\r\nconstructor TTMSFNCCustomControlBase.Create(AOwner: TComponent);\r\nbegin\r\n inherited;\r\n FStyleChangedId := TMessageManager.DefaultManager.SubscribeToMessage(TStyleChangedMessage, StyleChangedHandler);\r\nend;\r\n\r\ndestructor TTMSFNCCustomControlBase.Destroy;\r\nvar\r\n frm: TCustomForm;\r\nbegin\r\n frm := TTMSFNCUtils.GetOwnerForm(Self);\r\n if Assigned(frm) and (csDestroying in frm.ComponentState) then\r\n TTMSFNCStyles.SetActiveScene(nil);\r\n\r\n TMessageManager.DefaultManager.Unsubscribe(TStyleChangedMessage, FStyleChangedId);\r\n inherited;\r\nend;\r\n\r\nprocedure TTMSFNCCustomControlBase.Invalidate;\r\nbegin\r\n Invalidate;\r\nend;\r\n\r\n{$HINTS OFF}\r\n{$IF COMPILERVERSION < 30}\r\nfunction TTMSFNCCustomControlBase.GetHintString: String;\r\nbegin\r\n Result := '';\r\nend;\r\n\r\nfunction TTMSFNCCustomControlBase.HasHint: Boolean;\r\nbegin\r\n Result := False;\r\nend;\r\n{$IFEND}\r\n{$HINTS ON}\r\n\r\nfunction TTMSFNCCustomControlBase.GetL: Single;\r\nbegin\r\n Result := Position.X;\r\nend;\r\n\r\nfunction TTMSFNCCustomControlBase.GetT: Single;\r\nbegin\r\n Result := Position.Y;\r\nend;\r\n\r\nprocedure TTMSFNCCustomControlBase.SetTop(const Value: Single);\r\nbegin\r\n Position.Y := Value;\r\nend;\r\n\r\nprocedure TTMSFNCCustomControlBase.SetLeft(const Value: Single);\r\nbegin\r\n Position.X := Value;\r\nend;\r\n\r\n{$HINTS OFF}\r\n{$IF COMPILERVERSION = 28}\r\nprocedure TTMSFNCCustomControlBase.BeginUpdate;\r\nbegin\r\nend;\r\n\r\nprocedure TTMSFNCCustomControlBase.EndUpdate;\r\nbegin\r\nend;\r\n{$IFEND}\r\n{$HINTS ON}\r\n\r\nprocedure TTMSFNCCustomControlBase.KeyDown(var Key: Word; var KeyChar: WideChar;\r\n Shift: TShiftState);\r\nbegin\r\n inherited;\r\n if KeyChar = ' ' then\r\n Key := KEY_SPACE;\r\n\r\n if KeyChar = '-' then\r\n Key := KEY_SUBTRACT;\r\n\r\n if KeyChar = '+' then\r\n Key := KEY_ADD;\r\n\r\n if KeyChar = '*' then\r\n Key := KEY_MULTIPLY;\r\n\r\n if KeyChar = '/' then\r\n Key := KEY_DIVIDE;\r\n\r\n HandleKeyPress(KeyChar);\r\n HandleKeyDown(Key, Shift);\r\nend;\r\n\r\nprocedure TTMSFNCCustomControlBase.KeyUp(var Key: Word; var KeyChar: WideChar;\r\n Shift: TShiftState);\r\nbegin\r\n inherited;\r\n if KeyChar = ' ' then\r\n Key := KEY_SPACE;\r\n\r\n HandleKeyUp(Key, Shift);\r\nend;\r\n\r\nprocedure TTMSFNCCustomControlBase.DialogKey(var Key: Word; Shift: TShiftState);\r\nbegin\r\n inherited;\r\n HandleDialogKey(Key, Shift);\r\nend;\r\n\r\nprocedure TTMSFNCCustomControlBase.DragOver(const Data: TDragObject; const Point: TPointF; var Operation: TDragOperation);\r\nvar\r\n b: Boolean;\r\n s: TObject;\r\n df: TTMSFNCCustomControlDropFiles;\r\n I: Integer;\r\nbegin\r\n inherited;\r\n\r\n try\r\n s := nil;\r\n df := nil;\r\n if Assigned(Data.Source) then\r\n s := Data.Source\r\n else if (Length(Data.Files) > 0) and AcceptDropFiles then\r\n begin\r\n df := TTMSFNCCustomControlDropFiles.Create;\r\n for I := 0 to Length(Data.Files) - 1 do\r\n df.Files.Add(Data.Files[I]);\r\n\r\n s := df;\r\n end;\r\n\r\n if s = nil then\r\n Exit;\r\n\r\n b := Operation <> TDragOperation.None;\r\n HandleDragOver(s, Point, b);\r\n if b then\r\n begin\r\n if Assigned(df) then\r\n Operation := TDragOperation.Copy\r\n else\r\n Operation := TDragOperation.Move;\r\n end;\r\n\r\n finally\r\n FreeAndNil(df);\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomControlBase.DragDrop(const Data: TDragObject; const Point: TPointF);\r\nvar\r\n s: TObject;\r\n df: TTMSFNCCustomControlDropFiles;\r\n I: Integer;\r\nbegin\r\n inherited;\r\n\r\n try\r\n s := nil;\r\n df := nil;\r\n if Assigned(Data.Source) then\r\n s := Data.Source\r\n else if (Length(Data.Files) > 0) and AcceptDropFiles then\r\n begin\r\n df := TTMSFNCCustomControlDropFiles.Create;\r\n for I := 0 to Length(Data.Files) - 1 do\r\n df.Files.Add(Data.Files[I]);\r\n\r\n s := df;\r\n end;\r\n\r\n if s = nil then\r\n Exit;\r\n\r\n HandleDragDrop(s, Point);\r\n\r\n finally\r\n FreeAndNil(df);\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomControlBase.MouseDown(Button: TTMSFNCMouseButton; Shift: TShiftState; X,\r\n Y: Single);\r\nbegin\r\n inherited;\r\n HandleMouseDown(Button, Shift, X, Y);\r\n if Assigned(OnInternalMouseDown) then\r\n OnInternalMouseDown(Self);\r\nend;\r\n\r\nprocedure TTMSFNCCustomControlBase.MouseMove(Shift: TShiftState; X, Y: Single);\r\nbegin\r\n inherited;\r\n HandleMouseMove(Shift, X, Y);\r\n if Assigned(OnInternalMouseMove) then\r\n OnInternalMouseMove(Self);\r\nend;\r\n\r\nprocedure TTMSFNCCustomControlBase.MouseUp(Button: TTMSFNCMouseButton; Shift: TShiftState; X,\r\n Y: Single);\r\nbegin\r\n inherited;\r\n HandleMouseUp(Button, Shift, X, Y);\r\n if Assigned(OnInternalMouseUp) then\r\n OnInternalMouseUp(Self);\r\nend;\r\n\r\nprocedure TTMSFNCCustomControlBase.MouseWheel(Shift: TShiftState; WheelDelta: Integer;\r\n var Handled: Boolean);\r\nbegin\r\n inherited;\r\n HandleMouseWheel(Shift, WheelDelta, Handled);\r\nend;\r\n\r\nprocedure TTMSFNCCustomControlBase.DoMouseEnter;\r\nbegin\r\n inherited;\r\n HandleMouseEnter;\r\nend;\r\n\r\nprocedure TTMSFNCCustomControlBase.SetNewScene(AScene: IScene);\r\nbegin\r\n inherited;\r\n TTMSFNCStyles.SetActiveScene(AScene);\r\nend;\r\n\r\nprocedure TTMSFNCCustomControlBase.DoMouseLeave;\r\nbegin\r\n inherited;\r\n HandleMouseLeave;\r\nend;\r\n\r\n{$ENDIF}\r\n\r\nprocedure TTMSFNCCustomControlBase.DblClick;\r\nvar\r\n pf: TPointF;\r\nbegin\r\n inherited;\r\n pf := ConvertScreenToClient(TTMSFNCUtils.GetMousePos);\r\n HandleDblClick(pf.X, pf.Y);\r\n if Assigned(OnInternalDblClick) then\r\n OnInternalDblClick(Self);\r\nend;\r\n\r\n{$IFDEF CMNWEBLIB}\r\n\r\n{$IFDEF VCLLIB}\r\n{$HINTS OFF}\r\n{$IF COMPILERVERSION > 30}\r\nprocedure TTMSFNCCustomControlBase.ChangeScale(M, D: Integer; isDpiChange: Boolean);\r\n{$ELSE}\r\nprocedure TTMSFNCCustomControlBase.ChangeScale(M, D: Integer);\r\n{$IFEND}\r\nbegin\r\n inherited;\r\n CalcFactor;\r\n ChangeDPIScale(M, D);\r\nend;\r\n{$HINTS ON}\r\n{$ENDIF}\r\n\r\n{$IFDEF LCLLIB}\r\nprocedure TTMSFNCCustomControlBase.UTF8KeyPress(var UTF8Key: TUTF8Char);\r\nbegin\r\n inherited;\r\n HandleUTF8KeyPress(UTF8Key);\r\nend;\r\n{$ENDIF}\r\n\r\nprocedure TTMSFNCCustomControlBase.KeyPress(var Key: Char);\r\nbegin\r\n inherited;\r\n HandleKeyPress(Key);\r\nend;\r\n\r\nprocedure TTMSFNCCustomControlBase.KeyDown(var Key: Word; Shift: TShiftState);\r\n{$IFNDEF WEBLIB}\r\nvar\r\n Ctrl: TWinControl;\r\n{$ENDIF}\r\nbegin\r\n inherited;\r\n HandleDialogKey(Key, Shift);\r\n HandleKeyDown(Key, Shift);\r\n if Key = KEY_TAB then\r\n begin\r\n {$IFNDEF WEBLIB}\r\n if ssShift in Shift then\r\n Ctrl := TWinControlProtected(Self.Parent).FindNextControl(Self, False, True, True)\r\n else\r\n Ctrl := TWinControlProtected(Self.Parent).FindNextControl(Self, True, True, True);\r\n\r\n if Assigned(Ctrl) and Ctrl.CanFocus then\r\n Ctrl.SetFocus;\r\n {$ENDIF}\r\n end;\r\n\r\n {$IFDEF LCLLIB}\r\n {$IFDEF UNIX}\r\n case Key of\r\n KEY_UP, KEY_DOWN: Key := 0;\r\n end;\r\n {$ENDIF}\r\n {$ENDIF}\r\nend;\r\n\r\nprocedure TTMSFNCCustomControlBase.KeyUp(var Key: Word; Shift: TShiftState);\r\nbegin\r\n inherited;\r\n HandleKeyUp(Key, Shift);\r\nend;\r\n\r\nprocedure TTMSFNCCustomControlBase.DragOver(Source: TObject; X, Y: Integer; State: TDragState; var Accept: Boolean);\r\nbegin\r\n inherited;\r\n HandleDragOver(Source, PointF(X, Y), Accept);\r\nend;\r\n\r\nprocedure TTMSFNCCustomControlBase.DragDrop(Source: TObject; X, Y: Integer);\r\nbegin\r\n inherited;\r\n HandleDragDrop(Source, PointF(X, Y));\r\nend;\r\n\r\nprocedure TTMSFNCCustomControlBase.MouseDown(Button: TTMSFNCMouseButton; Shift: TShiftState; X,\r\n Y: Integer);\r\nbegin\r\n inherited;\r\n HandleMouseDown(Button, Shift, X, Y);\r\n if Assigned(OnInternalMouseDown) then\r\n OnInternalMouseDown(Self);\r\nend;\r\n\r\nprocedure TTMSFNCCustomControlBase.MouseMove(Shift: TShiftState; X, Y: Integer);\r\nbegin\r\n inherited;\r\n HandleMouseMove(Shift, X, Y);\r\n if Assigned(OnInternalMouseMove) then\r\n OnInternalMouseMove(Self);\r\nend;\r\n\r\nprocedure TTMSFNCCustomControlBase.MouseUp(Button: TTMSFNCMouseButton; Shift: TShiftState; X,\r\n Y: Integer);\r\nbegin\r\n inherited;\r\n HandleMouseUp(Button, Shift, X, Y);\r\n if Assigned(OnInternalMouseUp) then\r\n OnInternalMouseUp(Self);\r\nend;\r\n\r\n{$IFNDEF WEBLIB}\r\n\r\n{ TWinControlProtected }\r\n\r\nprocedure TWinControlProtected.PaintCtrls(DC: HDC; First: TControl);\r\nbegin\r\n PaintControls(DC, First);\r\nend;\r\n{$ENDIF}\r\n\r\n{$IFDEF VCLLIB}\r\nprocedure TTMSFNCCustomControlBase.CMHintShow(var Message: TMessage);\r\nvar\r\n h: String;\r\nbegin\r\n with TCMHintShow(Message).HintInfo^ do\r\n begin\r\n if HasHint then\r\n begin\r\n h := GetHintString;\r\n HintStr := h;\r\n ReshowTimeout := 0;\r\n end;\r\n end;\r\nend;\r\n\r\n{$HINTS OFF}\r\n{$IF COMPILERVERSION > 22}\r\nprocedure TTMSFNCCustomControlBase.CMStyleChanged(var Message: TMessage);\r\nbegin\r\n InitializeStyle;\r\nend;\r\n{$IFEND}\r\n{$HINTS ON}\r\n\r\nprocedure TTMSFNCCustomControlBase.CMDesignHitTest(var Message: TCMDesignHitTest);\r\nvar\r\n P: TPoint;\r\nbegin\r\n inherited;\r\n GetCursorPos(P);\r\n P := ScreenToClient(P);\r\n if HandleDesignHitTest(P) then\r\n Message.Result := 1;\r\nend;\r\n\r\nprocedure TTMSFNCCustomControlBase.WMNCHitTest(var Message: TWMNCHitTest);\r\nbegin\r\n if not HitTest then\r\n Message.Result := HTTRANSPARENT\r\n else\r\n inherited;\r\nend;\r\n\r\nprocedure TTMSFNCCustomControlBase.WMPaint(var Message: TWMPaint);\r\nvar\r\n DC, MemDC: HDC;\r\n MemBitmap, OldBitmap: HBITMAP;\r\n PS: TPaintStruct;\r\n dbl: boolean;\r\n p: TPoint;\r\n i: integer;\r\nbegin\r\n if not Transparent then\r\n begin\r\n inherited;\r\n Exit;\r\n end;\r\n\r\n if Assigned(Parent) then\r\n begin\r\n DC := Message.DC;\r\n if DC <> 0 then\r\n begin\r\n dbl := Parent.DoubleBuffered;\r\n if (Parent is TCustomForm) then\r\n Parent.DoubleBuffered := false;\r\n i := SaveDC(DC);\r\n p := ClientOrigin;\r\n Windows.ScreenToClient(Parent.Handle, p);\r\n p.x := -p.x;\r\n p.y := -p.y;\r\n MoveWindowOrg(DC, p.x, p.y);\r\n SendMessage(Parent.Handle, WM_ERASEBKGND, DC, 0);\r\n SendMessage(Parent.Handle, WM_PAINT, DC, 0);\r\n if (Parent is TWinControlProtected) then\r\n (Parent as TWinControlProtected).PaintCtrls(DC, nil);\r\n MoveWindowOrg(DC, -p.x, -p.y);\r\n HandleTransparentDrawing(DC);\r\n RestoreDC(DC, i);\r\n Parent.DoubleBuffered := dbl;\r\n end;\r\n end;\r\n\r\n if not DoubleBuffered or (Message.DC <> 0) then\r\n begin\r\n if not (csCustomPaint in ControlState) and (ControlCount = 0) then\r\n inherited\r\n else\r\n PaintHandler(Message);\r\n end\r\n else\r\n begin\r\n DC := GetDC(0);\r\n MemBitmap := CreateCompatibleBitmap(DC, ClientRect.Right, ClientRect.Bottom);\r\n ReleaseDC(0, DC);\r\n MemDC := CreateCompatibleDC(0);\r\n OldBitmap := SelectObject(MemDC, MemBitmap);\r\n try\r\n DC := BeginPaint(Handle, PS);\r\n Perform(WM_ERASEBKGND, MemDC, 0);\r\n Message.DC := MemDC;\r\n WMPaint(Message);\r\n Message.DC := 0;\r\n BitBlt(DC, 0, 0, ClientRect.Right, ClientRect.Bottom, MemDC, 0, 0, SRCCOPY);\r\n EndPaint(Handle, PS);\r\n finally\r\n SelectObject(MemDC, OldBitmap);\r\n DeleteDC(MemDC);\r\n DeleteObject(MemBitmap);\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomControlBase.WMEraseBkGnd(var Message: TWMEraseBkGnd);\r\nbegin\r\n if Transparent then\r\n Message.Result := 1\r\n else\r\n inherited;\r\nend;\r\n\r\nprocedure TTMSFNCCustomControlBase.WMDropFiles(var Message: TWMDropFiles);\r\nvar\r\n LCount: Integer;\r\n LFileName: array[0..MAX_PATH - 1] of Char;\r\n I: Integer;\r\n pt: TPoint;\r\n df: TTMSFNCCustomControlDropFiles;\r\n a: Boolean;\r\nbegin\r\n if not AcceptDropFiles then\r\n Exit;\r\n\r\n LCount := DragQueryFile(Message.Drop, $FFFFFFFF, LFileName, MAX_PATH);\r\n if LCount = 0 then\r\n Exit;\r\n\r\n df := TTMSFNCCustomControlDropFiles.Create;\r\n try\r\n for I := 0 to LCount - 1 do\r\n begin\r\n if DragQueryFile(Message.Drop, I, LFileName, MAX_PATH) <> 0 then\r\n df.Files.Add(LFileName);\r\n end;\r\n\r\n DragQueryPoint(Message.Drop, pt);\r\n\r\n a := True;\r\n DragOver(df, pt.X, pt.Y, dsDragMove, a);\r\n if a then\r\n DragDrop(df, pt.X, pt.Y);\r\n\r\n finally\r\n FreeAndNil(df);\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomControlBase.WMGetDlgCode(var Message: TWMGetDlgCode);\r\nbegin\r\n if TabStop then\r\n Message.result := DLGC_WANTALLKEYS or DLGC_WANTARROWS\r\n else\r\n Message.result := DLGC_WANTALLKEYS or DLGC_WANTARROWS or DLGC_WANTTAB;\r\nend;\r\n\r\nfunction TTMSFNCCustomControlBase.DoMouseWheel(Shift: TShiftState; WheelDelta: Integer; MousePos: TPoint): Boolean;\r\nvar\r\n b: Boolean;\r\nbegin\r\n Result := inherited;\r\n b := Result;\r\n HandleMouseWheel(Shift, WheelDelta, b);\r\n Result := b;\r\nend;\r\n\r\nprocedure TTMSFNCCustomControlBase.CMFocusChanged(var Message: TCMFocusChanged);\r\nbegin\r\n Invalidate;\r\nend;\r\n\r\nprocedure TTMSFNCCustomControlBase.CMMouseLeave(var Message: TMessage);\r\nbegin\r\n inherited;\r\n HandleMouseLeave;\r\nend;\r\n\r\nprocedure TTMSFNCCustomControlBase.CMMouseEnter(var Message: TMessage);\r\nbegin\r\n inherited;\r\n HandleMouseEnter;\r\nend;\r\n{$ENDIF}\r\n\r\n{$IFDEF WEBLIB}\r\nprocedure TTMSFNCCustomControlBase.DoMouseEnter;\r\nbegin\r\n inherited;\r\n HandleMouseEnter;\r\nend;\r\n\r\nprocedure TTMSFNCCustomControlBase.DoMouseLeave;\r\nbegin\r\n inherited;\r\n HandleMouseLeave;\r\nend;\r\n\r\nprocedure TTMSFNCCustomControlBase.MouseWheel(Shift: TShiftState; WheelDelta: Integer; var Handled: Boolean);\r\nbegin\r\n inherited;\r\n HandleMouseWheel(Shift, WheelDelta, Handled);\r\nend;\r\n{$ENDIF}\r\n\r\n{$IFDEF LCLLIB}\r\nprocedure TTMSFNCCustomControlBase.CMFocusChanged(var Message: TLMessage);\r\nbegin\r\n Invalidate;\r\nend;\r\n\r\nprocedure TTMSFNCCustomControlBase.CMMouseLeave(var Message: TLMNoParams);\r\nbegin\r\n HandleMouseLeave;\r\nend;\r\n\r\nprocedure TTMSFNCCustomControlBase.CMMouseEnter(var Message: TLMNoParams);\r\nbegin\r\n HandleMouseEnter;\r\nend;\r\n\r\nprocedure TTMSFNCCustomControlBase.CMHintShow(var Message: TLMessage);\r\nvar\r\n h: String;\r\nbegin\r\n with TCMHintShow(Message).HintInfo^ do\r\n begin\r\n if HasHint then\r\n begin\r\n h := GetHintString;\r\n HintStr := h;\r\n ReshowTimeout := 0;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomControlBase.WMNCHitTest(var Message: TLMessage);\r\nbegin\r\n if not HitTest then\r\n Message.Result := HTTRANSPARENT\r\n else\r\n inherited;\r\nend;\r\n\r\n{$HINTS OFF}\r\n{$IF FPC_FULLVERSION < 30000}\r\nprocedure TTMSFNCCustomControlBase.WMLButtonDBLCLK(var Message: TLMLButtonDblClk);\r\nvar\r\n MP: TPoint;\r\nbegin\r\n if (csCaptureMouse in ControlStyle) and (mbLeft in CaptureMouseButtons) then\r\n begin\r\n MouseCapture := True;\r\n end;\r\n // first send a dblclick\r\n if csClickEvents in ControlStyle then DblClick;\r\n // then send the mousedown\r\n if not (csNoStdEvents in ControlStyle) then\r\n begin\r\n MP := GetMousePosFromMessage(Message.Pos);\r\n MouseDown(mbLeft, KeysToShiftState(Message.Keys) + [ssDouble], MP.X, MP.Y);\r\n end;\r\nend;\r\n{$IFEND}\r\n{$HINTS ON}\r\n\r\n{$IFDEF MSWINDOWS}\r\nprocedure TTMSFNCCustomControlBase.WMPaint(var Message: TLMPaint);\r\nvar\r\n DC, MemDC: HDC;\r\n MemBitmap, OldBitmap: HBITMAP;\r\n PS: TPaintStruct;\r\n dbl: boolean;\r\n p: TPoint;\r\n i: integer;\r\nbegin\r\n if not Transparent then\r\n begin\r\n inherited;\r\n Exit;\r\n end;\r\n\r\n if Assigned(Parent) then\r\n begin\r\n DC := Message.DC;\r\n if DC <> 0 then\r\n begin\r\n i := SaveDC(DC);\r\n p := ClientOrigin;\r\n Windows.ScreenToClient(Parent.Handle, p);\r\n p.x := -p.x;\r\n p.y := -p.y;\r\n MoveWindowOrg(DC, p.x, p.y);\r\n SendMessage(Parent.Handle, WM_ERASEBKGND, DC, 0);\r\n SendMessage(Parent.Handle, WM_PAINT, DC, 0);\r\n if (Parent is TWinControlProtected) then\r\n (Parent as TWinControlProtected).PaintCtrls(DC, nil);\r\n RestoreDC(DC, i);\r\n end;\r\n end;\r\n\r\n if not DoubleBuffered or (Message.DC <> 0) then\r\n begin\r\n if not (csCustomPaint in ControlState) and (ControlCount = 0) then\r\n inherited\r\n else\r\n PaintHandler(Message);\r\n end\r\n else\r\n begin\r\n DC := GetDC(0);\r\n MemBitmap := CreateCompatibleBitmap(DC, ClientRect.Right, ClientRect.Bottom);\r\n ReleaseDC(0, DC);\r\n MemDC := CreateCompatibleDC(0);\r\n OldBitmap := SelectObject(MemDC, MemBitmap);\r\n try\r\n DC := BeginPaint(Handle, PS);\r\n Perform(WM_ERASEBKGND, MemDC, 0);\r\n Message.DC := MemDC;\r\n WMPaint(Message);\r\n Message.DC := 0;\r\n BitBlt(DC, 0, 0, ClientRect.Right, ClientRect.Bottom, MemDC, 0, 0, SRCCOPY);\r\n EndPaint(Handle, PS);\r\n finally\r\n SelectObject(MemDC, OldBitmap);\r\n DeleteDC(MemDC);\r\n DeleteObject(MemBitmap);\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomControlBase.WMEraseBkGnd(var Message: TLMEraseBkGnd);\r\nbegin\r\n if Transparent then\r\n Message.Result := 1\r\n else\r\n inherited;\r\nend;\r\n{$ENDIF}\r\n\r\nprocedure TTMSFNCCustomControlBase.WMGetDlgCode(var Message: TLMNoParams);\r\nbegin\r\n if TabStop then\r\n Message.result := DLGC_WANTALLKEYS or DLGC_WANTARROWS\r\n else\r\n Message.result := DLGC_WANTALLKEYS or DLGC_WANTARROWS or DLGC_WANTTAB;\r\nend;\r\n\r\nprocedure TTMSFNCCustomControlBase.WMMouseWheel(var Message: TLMMouseEvent);\r\nvar\r\n b: Boolean;\r\nbegin\r\n b := Message.Result > 0;\r\n HandleMouseWheel(CreateShiftStateEx, Message.WheelDelta, b);\r\n if b then\r\n Message.Result := 1;\r\n inherited;\r\nend;\r\n{$ENDIF}\r\n\r\nfunction TTMSFNCCustomControlBase.CanFocus: Boolean;\r\nbegin\r\n Result := inherited CanFocus;\r\n Result := Result and AllowFocus;\r\nend;\r\n\r\nprocedure TTMSFNCCustomControlBase.BeginUpdate;\r\nbegin\r\n {$IFDEF WEBLIB}\r\n inherited;\r\n {$ENDIF}\r\nend;\r\n\r\nprocedure TTMSFNCCustomControlBase.EndUpdate;\r\nbegin\r\n {$IFDEF WEBLIB}\r\n inherited;\r\n {$ENDIF}\r\nend;\r\n\r\nfunction TTMSFNCCustomControlBase.GetLocalRect: TRectF;\r\nbegin\r\n Result := RectF(0, 0, Width, Height);\r\nend;\r\n\r\nconstructor TTMSFNCCustomControlBase.Create(AOwner: TComponent);\r\nbegin\r\n inherited;\r\n FHitTest := True;\r\n FStored := True;\r\n {$IFNDEF WEBLIB}\r\n DoubleBuffered := True;\r\n {$ENDIF}\r\n ControlStyle := ControlStyle + [csAcceptsControls];\r\nend;\r\n{$ENDIF}\r\n\r\n{$IFDEF VCLLIB}\r\nprocedure TTMSFNCCustomControl.CreateWnd;\r\nbegin\r\n inherited;\r\n CreateCheckBoxBitmaps;\r\n CreateRadioButtonBitmaps;\r\nend;\r\n{$ENDIF}\r\n\r\n{$IFDEF WEBLIB}\r\nclass function TTMSFNCCustomControl.GetVersionNumber(AMaj, AMin, ARel, ABld: ShortInt): string;\r\nbegin\r\n Result := '';\r\nend;\r\n{$ENDIF}\r\n\r\nprocedure TTMSFNCCustomControl.DisableBackground;\r\nbegin\r\n FFill.Kind := gfkNone;\r\n FStroke.Kind := gskNone;\r\n {$IFDEF CMNLIB}\r\n Color := clBtnFace;\r\n ParentColor := False;\r\n {$ENDIF}\r\n {$IFDEF WEBLIB}\r\n Color := clNone;\r\n {$ENDIF}\r\nend;\r\n\r\nprocedure TTMSFNCCustomControl.EnableBackground;\r\nbegin\r\n FFill.Kind := gfkSolid;\r\n FStroke.Kind := gskSolid;\r\nend;\r\n\r\nprocedure TTMSFNCCustomControl.DisableStroke;\r\nbegin\r\n FStroke.Kind := gskNone;\r\nend;\r\n\r\n{$IFDEF LCLLIB}\r\nprocedure TTMSFNCCustomControl.DoSetBounds(ALeft, ATop, AWidth,\r\n AHeight: Integer);\r\nbegin\r\n inherited DoSetBounds(ALeft, ATop, AWidth, AHeight);\r\n UpdateControlAfterResize;\r\nend;\r\n{$ENDIF}\r\n\r\n{$IFDEF WEBLIB}\r\nprocedure TTMSFNCCustomControl.SetColor(AValue: TColor);\r\nbegin\r\n inherited;\r\n if Assigned(Fill) then\r\n Fill.Color := AValue;\r\n Invalidate;\r\nend;\r\n{$ENDIF}\r\n\r\n{$IFDEF FMXLIB}\r\nprocedure TTMSFNCCustomControl.SetColor(const Value: TTMSFNCGraphicsColor);\r\nbegin\r\n if FColor <> Value then\r\n begin\r\n FColor := Value;\r\n Fill.Color := Color;\r\n Invalidate;\r\n end;\r\nend;\r\n{$ENDIF}\r\n\r\nprocedure TTMSFNCCustomControl.Resize;\r\nbegin\r\n inherited;\r\n {$IFNDEF LCLLIB}\r\n UpdateControlAfterResize;\r\n {$ENDIF}\r\nend;\r\n\r\nprocedure TTMSFNCCustomControl.EnableStroke;\r\nbegin\r\n FStroke.Kind := gskSolid;\r\nend;\r\n\r\nprocedure TTMSFNCCustomControl.DisableFill;\r\nbegin\r\n FFill.Kind := gfkNone;\r\nend;\r\n\r\nprocedure TTMSFNCCustomControl.EnableFill;\r\nbegin\r\n FFill.Kind := gfkSolid;\r\nend;\r\n\r\nprocedure TTMSFNCCustomControl.Assign(Source: TPersistent);\r\nbegin\r\n if Source is TTMSFNCCustomControl then\r\n begin\r\n FFill.Assign((Source as TTMSFNCCustomControl).Fill);\r\n FStroke.Assign((Source as TTMSFNCCustomControl).Stroke);\r\n end\r\n else\r\n inherited;\r\nend;\r\n\r\nconstructor TTMSFNCCustomControl.Create(AOwner: TComponent);\r\nbegin\r\n inherited;\r\n {$IFDEF FMXLIB}\r\n FColor := gcWhite;\r\n CanFocus := True;\r\n ClipChildren := True;\r\n DisableFocusEffect := True;\r\n {$ENDIF}\r\n {$IFDEF CMNWEBLIB}\r\n {$IFNDEF WEBLIB}\r\n ParentColor := False;\r\n {$ENDIF}\r\n Color := gcWhite;\r\n {$ENDIF}\r\n {$IFDEF WEBLIB}\r\n LinkTouchEvents := True;\r\n AllowTouch := False;\r\n {$ENDIF}\r\n TabStop := True;\r\n FFill := TTMSFNCGraphicsFill.Create;\r\n FStroke := TTMSFNCGraphicsStroke.Create;\r\n FFill.OnChanged := @FillChanged;\r\n FStroke.OnChanged := @StrokeChanged;\r\n\r\n if not IsDesignerForm then\r\n RegisterRuntimeClasses;\r\nend;\r\n\r\ndestructor TTMSFNCCustomControl.Destroy;\r\nbegin\r\n if Assigned(FUndoManager) then\r\n begin\r\n FUndoManager.Free;\r\n FUndoManager := nil;\r\n end;\r\n\r\n if Assigned(FDownBtn) then\r\n begin\r\n FDownBtn.Free;\r\n FDownBtn := nil;\r\n end;\r\n\r\n if Assigned(FNormalBtn) then\r\n begin\r\n FNormalBtn.Free;\r\n FNormalBtn := nil;\r\n end;\r\n\r\n if Assigned(FDownFocusBtn) then\r\n begin\r\n FDownFocusBtn.Free;\r\n FDownFocusBtn := nil;\r\n end;\r\n\r\n if Assigned(FNormalFocusBtn) then\r\n begin\r\n FNormalFocusBtn.Free;\r\n FNormalFocusBtn := nil;\r\n end;\r\n\r\n if Assigned(FNormalDisabledBtn) then\r\n begin\r\n FNormalDisabledBtn.Free;\r\n FNormalDisabledBtn := nil;\r\n end;\r\n\r\n if Assigned(FCheckedChk) then\r\n begin\r\n FCheckedChk.Free;\r\n FCheckedChk := nil;\r\n end;\r\n\r\n if Assigned(FCheckedFocusChk) then\r\n begin\r\n FCheckedFocusChk.Free;\r\n FCheckedFocusChk := nil;\r\n end;\r\n\r\n if Assigned(FUnCheckedDisabledChk) then\r\n begin\r\n FUnCheckedDisabledChk.Free;\r\n FUnCheckedDisabledChk := nil;\r\n end;\r\n\r\n if Assigned(FCheckedDisabledChk) then\r\n begin\r\n FCheckedDisabledChk.Free;\r\n FCheckedDisabledChk := nil;\r\n end;\r\n\r\n if Assigned(FUnCheckedChk) then\r\n begin\r\n FUnCheckedChk.Free;\r\n FUnCheckedChk := nil;\r\n end;\r\n\r\n if Assigned(FUnCheckedFocusChk) then\r\n begin\r\n FUnCheckedFocusChk.Free;\r\n FUnCheckedFocusChk := nil;\r\n end;\r\n\r\n if Assigned(FCheckedRd) then\r\n begin\r\n FCheckedRd.Free;\r\n FCheckedRd := nil;\r\n end;\r\n\r\n if Assigned(FCheckedFocusRd) then\r\n begin\r\n FCheckedFocusRd.Free;\r\n FCheckedFocusRd := nil;\r\n end;\r\n\r\n if Assigned(FUnCheckedRd) then\r\n begin\r\n FUnCheckedRd.Free;\r\n FUnCheckedRd := nil;\r\n end;\r\n\r\n if Assigned(FUnCheckedFocusRd) then\r\n begin\r\n FUnCheckedFocusRd.Free;\r\n FUnCheckedFocusRd := nil;\r\n end;\r\n\r\n if Assigned(FUnCheckedDisabledRd) then\r\n begin\r\n FUnCheckedDisabledRd.Free;\r\n FUnCheckedDisabledRd := nil;\r\n end;\r\n\r\n if Assigned(FCheckedDisabledRd) then\r\n begin\r\n FCheckedDisabledRd.Free;\r\n FCheckedDisabledRd := nil;\r\n end;\r\n\r\n FFill.Free;\r\n FStroke.Free;\r\n\r\n inherited;\r\nend;\r\n\r\nfunction TTMSFNCCustomControl.GetUndoManager: TTMSFNCUndoManager;\r\nbegin\r\n if not Assigned(FUndoManager) then\r\n FUndoManager := TTMSFNCUndoManager.Create(Self);\r\n\r\n Result := FUndoManager;\r\nend;\r\n\r\nprocedure TTMSFNCCustomControl.SetFill(const Value: TTMSFNCGraphicsFill);\r\nbegin\r\n FFill.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCCustomControl.SetStroke(const Value: TTMSFNCGraphicsStroke);\r\nbegin\r\n FStroke.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCCustomControl.DoCanSaveProperty(AObject: TObject; APropertyName: string; APropertyType: TTypeKind; var ACanSave: Boolean);\r\nbegin\r\n if Assigned(OnCanSaveProperty) then\r\n OnCanSaveProperty(Self, AObject, APropertyName, APropertyType, ACanSave);\r\nend;\r\n\r\nprocedure TTMSFNCCustomControl.DoCanLoadProperty(AObject: TObject; APropertyName: string; APropertyType: TTypeKind; var ACanLoad: Boolean);\r\nbegin\r\n if Assigned(OnCanLoadProperty) then\r\n OnCanLoadProperty(Self, AObject, APropertyName, APropertyType, ACanLoad);\r\nend;\r\n\r\nprocedure TTMSFNCCustomControl.DoBeforeDraw(AGraphics: TTMSFNCGraphics; ARect: TRectF; var ADefaultDraw: Boolean);\r\nbegin\r\n if Assigned(OnBeforeDraw) then\r\n OnBeforeDraw(Self, AGraphics, ARect, ADefaultDraw);\r\nend;\r\n\r\nprocedure TTMSFNCCustomControl.DoAfterDraw(AGraphics: TTMSFNCGraphics; ARect: TRectF);\r\nbegin\r\n if Assigned(OnAfterDraw) then\r\n OnAfterDraw(Self, AGraphics, ARect);\r\nend;\r\n\r\nprocedure TTMSFNCCustomControl.DrawBackground(AGraphics: TTMSFNCGraphics; ARect: TRectF);\r\nbegin\r\n AGraphics.Fill.Assign(Fill);\r\n AGraphics.Fill.Color := Color;\r\n AGraphics.Stroke.Assign(Stroke);\r\n AGraphics.DrawRectangle(ARect);\r\nend;\r\n\r\n{$IFDEF DRAWTRIAL}\r\n{$IFDEF FREEWARE}\r\nprocedure TTMSFNCCustomControl.DrawTrial(AGraphics: TTMSFNCGraphics; {%H-}ARect: TRectF);\r\nvar\r\n s: String;\r\nbegin\r\n if not (Parent is TTMSFNCCustomControl) then\r\n begin\r\n InflateRectEx(ARect, -5, -5);\r\n AGraphics.Font.Color := gcRed;\r\n TTMSFNCUtils.SetFontSize(AGraphics.Font, 10);\r\n s := ClassName + ' Trial ' + GetVersion;\r\n AGraphics.DrawText(ARect, s, False, gtaTrailing, gtaTrailing);\r\n end;\r\nend;\r\n{$ENDIF}\r\n{$ENDIF}\r\n\r\nprocedure TTMSFNCCustomControl.DrawControl;\r\nvar\r\n g, gbmp: TTMSFNCGraphics;\r\n r: TRectF;\r\n df: Boolean;\r\n bmp: TTMSFNCBitmap;\r\n {$IFDEF FMXLIB}\r\n sc: Single;\r\n {$ENDIF}\r\nbegin\r\n if BufferedPainting then\r\n begin\r\n {$IFDEF FMXLIB}\r\n sc := TTMSFNCUtils.GetDPIScale;\r\n g := TTMSFNCGraphics.CreateBitmapCanvas(Round(Width * sc), Round(Height * sc), NativeCanvas);\r\n {$ENDIF}\r\n {$IFDEF CMNWEBLIB}\r\n g := TTMSFNCGraphics.CreateBitmapCanvas(Width, Height, NativeCanvas);\r\n {$ENDIF}\r\n g.BeginScene;\r\n end\r\n else\r\n g := TTMSFNCGraphics.Create(Canvas, NativeCanvas);\r\n\r\n {$IFNDEF LIMITEDGRAPHICSMODE}\r\n g.OptimizedHTMLDrawing := OptimizedHTMLDrawing;\r\n {$ENDIF}\r\n g.Context.SetSize(Width, Height);\r\n g.Context.SetAntiAliasing(AntiAliasing);\r\n g.Context.SetShowAcceleratorChar(ShowAcceleratorChar);\r\n g.Context.SetTextQuality(TextQuality);\r\n try\r\n r := RectF(0, 0, Width, Height);\r\n df := True;\r\n DoBeforeDraw(g, r, df);\r\n if df then\r\n begin\r\n DrawBackground(g, r);\r\n Draw(g, r);\r\n DoAfterDraw(g, r);\r\n end;\r\n {$IFDEF DRAWTRIAL}\r\n {$IFDEF FREEWARE}\r\n DrawTrial(g, r);\r\n {$ENDIF}\r\n {$ENDIF}\r\n\r\n if BufferedPainting then\r\n g.EndScene;\r\n\r\n g.Context.Render;\r\n\r\n if BufferedPainting then\r\n begin\r\n bmp := TTMSFNCBitmap.Create;\r\n try\r\n bmp.Assign(g.Bitmap);\r\n gbmp := TTMSFNCGraphics.Create(Canvas, False);\r\n try\r\n gbmp.Context.SetSize(Width, Height);\r\n gbmp.Context.SetAntiAliasing(AntiAliasing);\r\n gbmp.Context.SetShowAcceleratorChar(ShowAcceleratorChar);\r\n gbmp.Context.SetTextQuality(TextQuality);\r\n gbmp.DrawBitmap(r, bmp);\r\n finally\r\n gbmp.Free;\r\n end;\r\n finally\r\n bmp.Free;\r\n end;\r\n end;\r\n finally\r\n g.Free;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomControl.Draw(AGraphics: TTMSFNCGraphics; ARect: TRectF);\r\nbegin\r\n\r\nend;\r\n\r\nprocedure TTMSFNCCustomControl.Paint;\r\nbegin\r\n {$IFDEF FMXLIB}\r\n CalcFactor;\r\n {$ENDIF}\r\n inherited;\r\n DrawControl;\r\nend;\r\n\r\nprocedure TTMSFNCCustomControl.StrokeChanged(Sender: TObject);\r\nbegin\r\n Invalidate;\r\nend;\r\n\r\nprocedure TTMSFNCCustomControl.FillChanged(Sender: TObject);\r\nbegin\r\n {$IFDEF FMXLIB}\r\n FColor := Fill.Color;\r\n {$ENDIF}\r\n {$IFDEF CMNWEBLIB}\r\n if (Fill.Kind <> gfkNone) and (Fill.Kind <> gfkTexture) and (Fill.Color <> gcNull) then\r\n Color := Fill.Color\r\n else\r\n {$IFDEF WEBLIB}\r\n Color := clNone;\r\n {$ELSE}\r\n Color := clBtnFace;\r\n {$ENDIF}\r\n {$ENDIF}\r\n Invalidate;\r\nend;\r\n\r\nprocedure TTMSFNCCustomControl.UpdateControlAfterResize;\r\nbegin\r\n\r\nend;\r\n\r\nprocedure TTMSFNCCustomControl.DoBitmapChanged(Sender: TObject);\r\nbegin\r\n {$IFDEF WEBLIB}\r\n if FBlockInvalidate then\r\n Exit;\r\n FBlockInvalidate := True;\r\n Invalidate;\r\n FBlockInvalidate := False;\r\n {$ENDIF}\r\nend;\r\n\r\n{$IFDEF CMNLIB}\r\nfunction TTMSFNCCustomControl.GetTransparentColor: TTMSFNCGraphicsColor;\r\nvar\r\n c: TTMSFNCGraphicsColor;\r\nbegin\r\n Result := $FFFFFE;\r\n if TTMSFNCStyles.GetStyleBackgroundFillColorTo(c) then\r\n Result := c;\r\nend;\r\n{$ENDIF}\r\n\r\nprocedure TTMSFNCCustomControl.CreateCheckBoxBitmaps;\r\nvar\r\n{$IFDEF FMXLIB}\r\n chk: TCheckBox;\r\n f: TCommonCustomForm;\r\n fo: IControl;\r\n{$ENDIF}\r\n{$IFDEF CMNWEBLIB}\r\n {$IFNDEF LCLWEBLIB}\r\n rc: TRect;\r\n dChecked: Cardinal;\r\n hth: HTHEME;\r\n ThemeStyle: DWord;\r\n {$ENDIF}\r\n {$IFDEF LCLWEBLIB}\r\n g: TTMSFNCGraphics;\r\n {$ENDIF}\r\n {$IFDEF VCLSTYLESENABLED}\r\n lDetails: TThemedElementDetails;\r\n {$ENDIF}\r\n bmp: TBitmap;\r\n sc: Single;\r\n{$ENDIF}\r\nbegin\r\n {$IFDEF CMNWEBLIB}\r\n sc := ResourceScaleFactor;\r\n {$ENDIF}\r\n\r\n if Assigned(FCheckedFocusChk) then\r\n begin\r\n FCheckedFocusChk.Free;\r\n FCheckedFocusChk := nil;\r\n end;\r\n\r\n if Assigned(FUnCheckedChk) then\r\n begin\r\n FUnCheckedChk.Free;\r\n FUnCheckedChk := nil;\r\n end;\r\n\r\n if Assigned(FCheckedChk) then\r\n begin\r\n FCheckedChk.Free;\r\n FCheckedChk := nil;\r\n end;\r\n\r\n if Assigned(FUnCheckedFocusChk) then\r\n begin\r\n FUnCheckedFocusChk.Free;\r\n FUnCheckedFocusChk := nil;\r\n end;\r\n\r\n if Assigned(FUnCheckedDisabledChk) then\r\n begin\r\n FUnCheckedDisabledChk.Free;\r\n FUnCheckedDisabledChk := nil;\r\n end;\r\n\r\n if Assigned(FCheckedDisabledChk) then\r\n begin\r\n FCheckedDisabledChk.Free;\r\n FCheckedDisabledChk := nil;\r\n end;\r\n\r\n {$IFDEF FMXLIB}\r\n chk := TCheckBox.Create(Self);\r\n chk.Width := chk.Height;\r\n chk.Text := '';\r\n chk.Parent := Self;\r\n chk.IsChecked := false;\r\n chk.NeedStyleLookup;\r\n chk.ApplyStyleLookup;\r\n\r\n {$IFDEF FMXMOBILE}\r\n chk.Width := 25;\r\n chk.Height := 25;\r\n {$ENDIF}\r\n\r\n TurnOffAnimation(chk);\r\n FUnCheckedChk := chk.MakeScreenshot;\r\n chk.IsChecked := true;\r\n FCheckedChk := chk.MakeScreenshot;\r\n chk.Enabled := False;\r\n chk.IsChecked := False;\r\n FUnCheckedDisabledChk := chk.MakeScreenshot;\r\n chk.IsChecked := True;\r\n FCheckedDisabledChk := chk.MakeScreenshot;\r\n chk.Enabled := True;\r\n\r\n f := TTMSFNCUtils.GetParentForm(Self);\r\n fo := nil;\r\n if Assigned(f) then\r\n fo := f.Focused;\r\n\r\n chk.SetFocus;\r\n chk.IsChecked := false;\r\n FUnCheckedFocusChk := chk.MakeScreenshot;\r\n chk.IsChecked := true;\r\n FCheckedFocusChk := chk.MakeScreenshot;\r\n chk.Parent := nil;\r\n chk.Free;\r\n\r\n if Assigned(fo) then\r\n fo.SetFocus;\r\n {$ENDIF}\r\n\r\n {$IFDEF CMNWEBLIB}\r\n bmp := TBitmap.Create;\r\n {$IFDEF VCLLIB}\r\n rc := Bounds(0, 0, Round(16 * sc), Round(16 * sc));\r\n {$ENDIF}\r\n {$IFDEF LCLWEBLIB}\r\n g := TTMSFNCGraphics.Create(bmp.Canvas);\r\n {$ENDIF}\r\n try\r\n {$IFNDEF WEBLIB}\r\n bmp.PixelFormat := pf24bit;\r\n bmp.TransparentMode := tmFixed;\r\n bmp.Transparent := True;\r\n bmp.TransparentColor := GetTransparentColor;\r\n {$ENDIF}\r\n bmp.SetSize(Round(16 * sc), Round(16 * sc));\r\n\r\n FUnCheckedChk := TTMSFNCBitmap.Create;\r\n FUnCheckedChk.OnChange := @DoBitmapChanged;\r\n\r\n {$IFDEF VCLLIB}\r\n bmp.Canvas.Brush.Color := GetTransparentColor;\r\n bmp.Canvas.Brush.Style := bsSolid;\r\n bmp.Canvas.FillRect(rc);\r\n\r\n {$IFDEF VCLSTYLESENABLED}\r\n if TTMSFNCStyles.StyleServicesEnabled then\r\n begin\r\n lDetails := StyleServices.GetElementDetails(tbCheckBoxUncheckedNormal);\r\n StyleServices.DrawElement(bmp.Canvas.Handle, lDetails, rc, nil, Round(96*sc));\r\n end\r\n else\r\n {$ENDIF}\r\n begin\r\n DChecked := DFCS_BUTTONCHECK;\r\n ThemeStyle := CBS_UNCHECKEDNORMAL;\r\n if IsThemeActive and Self.HandleAllocated then\r\n begin\r\n if Assigned(OpenThemeDataForDpi) then\r\n hth := OpenThemeDataForDpi(Self.Handle,'button', Round(96*sc))\r\n else\r\n hth := OpenThemeData(Self.Handle, 'button');\r\n DrawThemeBackground(hth, bmp.Canvas.Handle, BP_CHECKBOX, ThemeStyle,@rc,nil);\r\n CloseThemeData(hth);\r\n end\r\n else\r\n DrawFrameControl(bmp.Canvas.Handle,rc,DFC_BUTTON, DChecked);\r\n end;\r\n {$ENDIF}\r\n {$IFDEF LCLWEBLIB}\r\n g.Fill.Kind := gfkSolid;\r\n g.Fill.Color := gcWhite;\r\n g.Stroke.Kind := gskSolid;\r\n g.Stroke.Color := gcWhite;\r\n g.DrawRectangle(RectF(0, 0, bmp.Width, bmp.Height));\r\n g.DrawCheckBox(RectF(0, 0, bmp.Width, bmp.Height), False, False, True);\r\n {$ENDIF}\r\n\r\n FUnCheckedChk.Assign(bmp);\r\n\r\n FCheckedChk := TTMSFNCBitmap.Create;\r\n FCheckedChk.OnChange := @DoBitmapChanged;\r\n\r\n {$IFDEF VCLLIB}\r\n bmp.Canvas.Brush.Color := GetTransparentColor;\r\n bmp.Canvas.Brush.Style := bsSolid;\r\n bmp.Canvas.FillRect(rc);\r\n\r\n {$IFDEF VCLSTYLESENABLED}\r\n if TTMSFNCStyles.StyleServicesEnabled then\r\n begin\r\n lDetails := StyleServices.GetElementDetails(tbCheckBoxCheckedNormal);\r\n StyleServices.DrawElement(bmp.Canvas.Handle, lDetails, rc, nil, Round(96*sc));\r\n end\r\n else\r\n {$ENDIF}\r\n begin\r\n DChecked := DFCS_BUTTONCHECK or DFCS_CHECKED;\r\n ThemeStyle := CBS_CHECKEDNORMAL;\r\n if IsThemeActive and Self.HandleAllocated then\r\n begin\r\n if Assigned(OpenThemeDataForDpi) then\r\n hth := OpenThemeDataForDpi(Self.Handle,'button', Round(96*sc))\r\n else\r\n hth := OpenThemeData(Self.Handle, 'button');\r\n DrawThemeBackground(hth, bmp.Canvas.Handle, BP_CHECKBOX, ThemeStyle,@rc,nil);\r\n CloseThemeData(hth);\r\n end\r\n else\r\n DrawFrameControl(bmp.Canvas.Handle,rc,DFC_BUTTON, DChecked);\r\n end;\r\n {$ENDIF}\r\n {$IFDEF LCLWEBLIB}\r\n g.Fill.Kind := gfkSolid;\r\n g.Fill.Color := gcWhite;\r\n g.Stroke.Kind := gskSolid;\r\n g.Stroke.Color := gcWhite;\r\n g.DrawRectangle(RectF(0, 0, bmp.Width, bmp.Height));\r\n g.DrawCheckBox(RectF(0, 0, bmp.Width, bmp.Height), True, False, True);\r\n {$ENDIF}\r\n\r\n FCheckedChk.Assign(bmp);\r\n\r\n FUnCheckedFocusChk := TTMSFNCBitmap.Create;\r\n FUnCheckedFocusChk.OnChange := @DoBitmapChanged;\r\n\r\n {$IFDEF VCLLIB}\r\n bmp.Canvas.Brush.Color := GetTransparentColor;\r\n bmp.Canvas.Brush.Style := bsSolid;\r\n bmp.Canvas.FillRect(rc);\r\n\r\n {$IFDEF VCLSTYLESENABLED}\r\n if TTMSFNCStyles.StyleServicesEnabled then\r\n begin\r\n lDetails := StyleServices.GetElementDetails(tbCheckBoxUncheckedHot);\r\n StyleServices.DrawElement(bmp.Canvas.Handle, lDetails, rc, nil, Round(96*sc));\r\n end\r\n else\r\n {$ENDIF}\r\n begin\r\n DChecked := DFCS_BUTTONCHECK or DFCS_HOT;\r\n ThemeStyle := CBS_UNCHECKEDHOT;\r\n if IsThemeActive and Self.HandleAllocated then\r\n begin\r\n if Assigned(OpenThemeDataForDpi) then\r\n hth := OpenThemeDataForDpi(Self.Handle,'button', Round(96*sc))\r\n else\r\n hth := OpenThemeData(Self.Handle, 'button');\r\n DrawThemeBackground(hth, bmp.Canvas.Handle, BP_CHECKBOX, ThemeStyle,@rc,nil);\r\n CloseThemeData(hth);\r\n end\r\n else\r\n DrawFrameControl(bmp.Canvas.Handle,rc,DFC_BUTTON, DChecked);\r\n end;\r\n {$ENDIF}\r\n {$IFDEF LCLWEBLIB}\r\n g.Fill.Kind := gfkSolid;\r\n g.Fill.Color := gcWhite;\r\n g.Stroke.Kind := gskSolid;\r\n g.Stroke.Color := gcWhite;\r\n g.DrawRectangle(RectF(0, 0, bmp.Width, bmp.Height));\r\n g.DrawCheckBox(RectF(0, 0, bmp.Width, bmp.Height), False, True, True);\r\n {$ENDIF}\r\n\r\n FUnCheckedFocusChk.Assign(bmp);\r\n\r\n FCheckedFocusChk := TTMSFNCBitmap.Create;\r\n FCheckedFocusChk.OnChange := @DoBitmapChanged;\r\n\r\n {$IFDEF VCLLIB}\r\n bmp.Canvas.Brush.Color := GetTransparentColor;\r\n bmp.Canvas.Brush.Style := bsSolid;\r\n bmp.Canvas.FillRect(rc);\r\n\r\n {$IFDEF VCLSTYLESENABLED}\r\n if TTMSFNCStyles.StyleServicesEnabled then\r\n begin\r\n lDetails := StyleServices.GetElementDetails(tbCheckBoxCheckedHot);\r\n StyleServices.DrawElement(bmp.Canvas.Handle, lDetails, rc, nil, Round(96*sc));\r\n end\r\n else\r\n {$ENDIF}\r\n begin\r\n DChecked := DFCS_BUTTONCHECK or DFCS_CHECKED or DFCS_HOT;\r\n ThemeStyle := CBS_CHECKEDHOT;\r\n if IsThemeActive and Self.HandleAllocated then\r\n begin\r\n if Assigned(OpenThemeDataForDpi) then\r\n hth := OpenThemeDataForDpi(Self.Handle,'button', Round(96*sc))\r\n else\r\n hth := OpenThemeData(Self.Handle, 'button');\r\n DrawThemeBackground(hth, bmp.Canvas.Handle, BP_CHECKBOX, ThemeStyle,@rc,nil);\r\n CloseThemeData(hth);\r\n end\r\n else\r\n DrawFrameControl(bmp.Canvas.Handle,rc,DFC_BUTTON, DChecked);\r\n end;\r\n {$ENDIF}\r\n {$IFDEF LCLWEBLIB}\r\n g.Fill.Kind := gfkSolid;\r\n g.Fill.Color := gcWhite;\r\n g.Stroke.Kind := gskSolid;\r\n g.Stroke.Color := gcWhite;\r\n g.DrawRectangle(RectF(0, 0, bmp.Width, bmp.Height));\r\n g.DrawCheckBox(RectF(0, 0, bmp.Width, bmp.Height), True, True, True);\r\n {$ENDIF}\r\n\r\n FCheckedFocusChk.Assign(bmp);\r\n\r\n FUnCheckedDisabledChk := TTMSFNCBitmap.Create;\r\n FUnCheckedDisabledChk.OnChange := @DoBitmapChanged;\r\n\r\n {$IFDEF VCLLIB}\r\n bmp.Canvas.Brush.Color := GetTransparentColor;\r\n bmp.Canvas.Brush.Style := bsSolid;\r\n bmp.Canvas.FillRect(rc);\r\n\r\n {$IFDEF VCLSTYLESENABLED}\r\n if TTMSFNCStyles.StyleServicesEnabled then\r\n begin\r\n lDetails := StyleServices.GetElementDetails(tbCheckBoxUncheckedDisabled);\r\n StyleServices.DrawElement(bmp.Canvas.Handle, lDetails, rc, nil, Round(96*sc));\r\n end\r\n else\r\n {$ENDIF}\r\n begin\r\n DChecked := DFCS_BUTTONCHECK or DFCS_INACTIVE;\r\n ThemeStyle := CBS_UNCHECKEDDISABLED;\r\n if IsThemeActive and Self.HandleAllocated then\r\n begin\r\n if Assigned(OpenThemeDataForDpi) then\r\n hth := OpenThemeDataForDpi(Self.Handle,'button', Round(96*sc))\r\n else\r\n hth := OpenThemeData(Self.Handle, 'button');\r\n DrawThemeBackground(hth, bmp.Canvas.Handle, BP_CHECKBOX, ThemeStyle,@rc,nil);\r\n CloseThemeData(hth);\r\n end\r\n else\r\n DrawFrameControl(bmp.Canvas.Handle,rc,DFC_BUTTON, DChecked);\r\n end;\r\n {$ENDIF}\r\n {$IFDEF LCLWEBLIB}\r\n g.Fill.Kind := gfkSolid;\r\n g.Fill.Color := gcWhite;\r\n g.Stroke.Kind := gskSolid;\r\n g.Stroke.Color := gcWhite;\r\n g.DrawRectangle(RectF(0, 0, bmp.Width, bmp.Height));\r\n g.DrawCheckBox(RectF(0, 0, bmp.Width, bmp.Height), False, False, False);\r\n {$ENDIF}\r\n\r\n FUnCheckedDisabledChk.Assign(bmp);\r\n\r\n FCheckedDisabledChk := TTMSFNCBitmap.Create;\r\n FCheckedDisabledChk.OnChange := @DoBitmapChanged;\r\n\r\n {$IFDEF VCLLIB}\r\n bmp.Canvas.Brush.Color := GetTransparentColor;\r\n bmp.Canvas.Brush.Style := bsSolid;\r\n bmp.Canvas.FillRect(rc);\r\n\r\n {$IFDEF VCLSTYLESENABLED}\r\n if TTMSFNCStyles.StyleServicesEnabled then\r\n begin\r\n lDetails := StyleServices.GetElementDetails(tbCheckBoxCheckedDisabled);\r\n StyleServices.DrawElement(bmp.Canvas.Handle, lDetails, rc, nil, Round(96*sc));\r\n end\r\n else\r\n {$ENDIF}\r\n begin\r\n DChecked := DFCS_BUTTONCHECK or DFCS_CHECKED or DFCS_INACTIVE;\r\n ThemeStyle := CBS_CHECKEDDISABLED;\r\n if IsThemeActive and Self.HandleAllocated then\r\n begin\r\n if Assigned(OpenThemeDataForDpi) then\r\n hth := OpenThemeDataForDpi(Self.Handle,'button', Round(96*sc))\r\n else\r\n hth := OpenThemeData(Self.Handle, 'button');\r\n DrawThemeBackground(hth, bmp.Canvas.Handle, BP_CHECKBOX, ThemeStyle,@rc,nil);\r\n CloseThemeData(hth);\r\n end\r\n else\r\n DrawFrameControl(bmp.Canvas.Handle,rc,DFC_BUTTON, DChecked);\r\n end;\r\n {$ENDIF}\r\n {$IFDEF LCLWEBLIB}\r\n g.Fill.Kind := gfkSolid;\r\n g.Fill.Color := gcWhite;\r\n g.Stroke.Kind := gskSolid;\r\n g.Stroke.Color := gcWhite;\r\n g.DrawRectangle(RectF(0, 0, bmp.Width, bmp.Height));\r\n g.DrawCheckBox(RectF(0, 0, bmp.Width, bmp.Height), True, False, False);\r\n {$ENDIF}\r\n\r\n FCheckedDisabledChk.Assign(bmp);\r\n finally\r\n {$IFDEF LCLWEBLIB}\r\n g.Free;\r\n {$ENDIF}\r\n bmp.Free;\r\n end;\r\n {$ENDIF}\r\nend;\r\n\r\nprocedure TTMSFNCCustomControl.CreateButtonBitmaps(AWidth, AHeight: Single);\r\nvar\r\n{$IFDEF FMXLIB}\r\n btn: TButton;\r\n f: TCommonCustomForm;\r\n fo: IControl;\r\n{$ENDIF}\r\n{$IFDEF CMNWEBLIB}\r\n {$IFNDEF LCLWEBLIB}\r\n rc: TRect;\r\n dChecked: Cardinal;\r\n hth: HTHEME;\r\n ThemeStyle: DWord;\r\n {$ENDIF}\r\n {$IFDEF LCLWEBLIB}\r\n g: TTMSFNCGraphics;\r\n {$ENDIF}\r\n {$IFDEF VCLSTYLESENABLED}\r\n lDetails: TThemedElementDetails;\r\n {$ENDIF}\r\n bmp: TBitmap;\r\n sc: Single;\r\n{$ENDIF}\r\nbegin\r\n {$IFDEF CMNWEBLIB}\r\n sc := ResourceScaleFactor;\r\n {$ENDIF}\r\n\r\n if Assigned(FDownBtn) then\r\n begin\r\n FDownBtn.Free;\r\n FDownBtn := nil;\r\n end;\r\n\r\n if Assigned(FNormalBtn) then\r\n begin\r\n FNormalBtn.Free;\r\n FNormalBtn := nil;\r\n end;\r\n\r\n if Assigned(FDownFocusBtn) then\r\n begin\r\n FDownFocusBtn.Free;\r\n FDownFocusBtn := nil;\r\n end;\r\n\r\n if Assigned(FNormalFocusBtn) then\r\n begin\r\n FNormalFocusBtn.Free;\r\n FNormalFocusBtn := nil;\r\n end;\r\n\r\n if Assigned(FNormalDisabledBtn) then\r\n begin\r\n FNormalDisabledBtn.Free;\r\n FNormalDisabledBtn := nil;\r\n end;\r\n\r\n {$IFDEF FMXLIB}\r\n btn := TButton.Create(Self);\r\n btn.Width := AWidth;\r\n btn.Height := AHeight;\r\n btn.Text := '';\r\n btn.Parent := Self;\r\n btn.StaysPressed := True;\r\n btn.IsPressed := False;\r\n btn.NeedStyleLookup;\r\n btn.ApplyStyleLookup;\r\n\r\n TurnOffAnimation(btn);\r\n FNormalBtn := btn.MakeScreenshot;\r\n btn.IsPressed := true;\r\n FDownBtn := btn.MakeScreenshot;\r\n btn.Enabled := False;\r\n btn.IsPressed := False;\r\n FNormalDisabledBtn := btn.MakeScreenshot;\r\n btn.Enabled := True;\r\n\r\n f := TTMSFNCUtils.GetParentForm(Self);\r\n fo := nil;\r\n if Assigned(f) then\r\n fo := f.Focused;\r\n\r\n btn.SetFocus;\r\n btn.IsPressed := false;\r\n FNormalFocusBtn := btn.MakeScreenshot;\r\n btn.IsPressed := true;\r\n FDownFocusBtn := btn.MakeScreenshot;\r\n btn.Parent := nil;\r\n btn.Free;\r\n\r\n if Assigned(fo) then\r\n fo.SetFocus;\r\n {$ENDIF}\r\n\r\n {$IFDEF CMNWEBLIB}\r\n bmp := TBitmap.Create;\r\n {$IFDEF VCLLIB}\r\n rc := Bounds(0, 0, Round(AWidth * sc), Round(AHeight * sc));\r\n {$ENDIF}\r\n {$IFDEF LCLWEBLIB}\r\n g := TTMSFNCGraphics.Create(bmp.Canvas);\r\n {$ENDIF}\r\n try\r\n {$IFNDEF WEBLIB}\r\n bmp.PixelFormat := pf24bit;\r\n bmp.TransparentMode := tmFixed;\r\n bmp.Transparent := True;\r\n bmp.TransparentColor := GetTransparentColor;\r\n {$ENDIF}\r\n bmp.SetSize(Round(AWidth * sc), Round(AHeight * sc));\r\n\r\n FNormalBtn := TTMSFNCBitmap.Create;\r\n FNormalBtn.OnChange := @DoBitmapChanged;\r\n\r\n {$IFDEF VCLLIB}\r\n bmp.Canvas.Brush.Color := GetTransparentColor;\r\n bmp.Canvas.Brush.Style := bsSolid;\r\n bmp.Canvas.FillRect(rc);\r\n\r\n {$IFDEF VCLSTYLESENABLED}\r\n if TTMSFNCStyles.StyleServicesEnabled then\r\n begin\r\n lDetails := StyleServices.GetElementDetails(ttbButtonNormal);\r\n StyleServices.DrawElement(bmp.Canvas.Handle, lDetails, rc, nil, Round(96*sc));\r\n end\r\n else\r\n {$ENDIF}\r\n begin\r\n DChecked := DFCS_BUTTONPUSH;\r\n ThemeStyle := PBS_NORMAL;\r\n if IsThemeActive and Self.HandleAllocated then\r\n begin\r\n if Assigned(OpenThemeDataForDpi) then\r\n hth := OpenThemeDataForDpi(Self.Handle,'button', Round(96*sc))\r\n else\r\n hth := OpenThemeData(Self.Handle, 'button');\r\n DrawThemeBackground(hth, bmp.Canvas.Handle, BP_PUSHBUTTON, ThemeStyle,@rc,nil);\r\n CloseThemeData(hth);\r\n end\r\n else\r\n DrawFrameControl(bmp.Canvas.Handle,rc, DFC_BUTTON, DChecked);\r\n end;\r\n {$ENDIF}\r\n {$IFDEF LCLWEBLIB}\r\n g.Fill.Kind := gfkSolid;\r\n g.Fill.Color := gcWhite;\r\n g.Stroke.Kind := gskSolid;\r\n g.Stroke.Color := gcWhite;\r\n g.DrawRectangle(RectF(0, 0, bmp.Width, bmp.Height));\r\n g.DrawButton(RectF(0, 0, bmp.Width, bmp.Height), False, False, True, AdaptToStyle);\r\n {$ENDIF}\r\n\r\n FNormalBtn.Assign(bmp);\r\n\r\n FDownBtn := TTMSFNCBitmap.Create;\r\n FDownBtn.OnChange := @DoBitmapChanged;\r\n\r\n {$IFDEF VCLLIB}\r\n bmp.Canvas.Brush.Color := GetTransparentColor;\r\n bmp.Canvas.Brush.Style := bsSolid;\r\n bmp.Canvas.FillRect(rc);\r\n\r\n {$IFDEF VCLSTYLESENABLED}\r\n if TTMSFNCStyles.StyleServicesEnabled then\r\n begin\r\n lDetails := StyleServices.GetElementDetails(ttbButtonPressed);\r\n StyleServices.DrawElement(bmp.Canvas.Handle, lDetails, rc, nil, Round(96*sc));\r\n end\r\n else\r\n {$ENDIF}\r\n begin\r\n DChecked := DFCS_BUTTONPUSH or DFCS_PUSHED;\r\n ThemeStyle := PBS_PRESSED;\r\n if IsThemeActive and Self.HandleAllocated then\r\n begin\r\n if Assigned(OpenThemeDataForDpi) then\r\n hth := OpenThemeDataForDpi(Self.Handle,'button', Round(96*sc))\r\n else\r\n hth := OpenThemeData(Self.Handle, 'button');\r\n DrawThemeBackground(hth, bmp.Canvas.Handle, BP_PUSHBUTTON, ThemeStyle,@rc,nil);\r\n CloseThemeData(hth);\r\n end\r\n else\r\n DrawFrameControl(bmp.Canvas.Handle,rc, DFC_BUTTON, DChecked);\r\n end;\r\n {$ENDIF}\r\n {$IFDEF LCLWEBLIB}\r\n g.Fill.Kind := gfkSolid;\r\n g.Fill.Color := gcWhite;\r\n g.Stroke.Kind := gskSolid;\r\n g.Stroke.Color := gcWhite;\r\n g.DrawRectangle(RectF(0, 0, bmp.Width, bmp.Height));\r\n g.DrawButton(RectF(0, 0, bmp.Width, bmp.Height), True, False, True, AdaptToStyle);\r\n {$ENDIF}\r\n\r\n FDownBtn.Assign(bmp);\r\n\r\n FNormalFocusBtn := TTMSFNCBitmap.Create;\r\n FNormalFocusBtn.OnChange := @DoBitmapChanged;\r\n\r\n {$IFDEF VCLLIB}\r\n bmp.Canvas.Brush.Color := GetTransparentColor;\r\n bmp.Canvas.Brush.Style := bsSolid;\r\n bmp.Canvas.FillRect(rc);\r\n\r\n {$IFDEF VCLSTYLESENABLED}\r\n if TTMSFNCStyles.StyleServicesEnabled then\r\n begin\r\n lDetails := StyleServices.GetElementDetails(ttbButtonHot);\r\n StyleServices.DrawElement(bmp.Canvas.Handle, lDetails, rc, nil, Round(96*sc));\r\n end\r\n else\r\n {$ENDIF}\r\n begin\r\n DChecked := DFCS_BUTTONPUSH or DFCS_HOT;\r\n ThemeStyle := PBS_HOT;\r\n if IsThemeActive and Self.HandleAllocated then\r\n begin\r\n if Assigned(OpenThemeDataForDpi) then\r\n hth := OpenThemeDataForDpi(Self.Handle,'button', Round(96*sc))\r\n else\r\n hth := OpenThemeData(Self.Handle, 'button');\r\n DrawThemeBackground(hth, bmp.Canvas.Handle, BP_PUSHBUTTON, ThemeStyle,@rc,nil);\r\n CloseThemeData(hth);\r\n end\r\n else\r\n DrawFrameControl(bmp.Canvas.Handle,rc, DFC_BUTTON, DChecked);\r\n end;\r\n {$ENDIF}\r\n {$IFDEF LCLWEBLIB}\r\n g.Fill.Kind := gfkSolid;\r\n g.Fill.Color := gcWhite;\r\n g.Stroke.Kind := gskSolid;\r\n g.Stroke.Color := gcWhite;\r\n g.DrawRectangle(RectF(0, 0, bmp.Width, bmp.Height));\r\n g.DrawButton(RectF(0, 0, bmp.Width, bmp.Height), True, True, True, AdaptToStyle);\r\n {$ENDIF}\r\n\r\n FNormalFocusBtn.Assign(bmp);\r\n\r\n FDownFocusBtn := TTMSFNCBitmap.Create;\r\n FDownFocusBtn.OnChange := @DoBitmapChanged;\r\n\r\n {$IFDEF VCLLIB}\r\n bmp.Canvas.Brush.Color := GetTransparentColor;\r\n bmp.Canvas.Brush.Style := bsSolid;\r\n bmp.Canvas.FillRect(rc);\r\n\r\n {$IFDEF VCLSTYLESENABLED}\r\n if TTMSFNCStyles.StyleServicesEnabled then\r\n begin\r\n lDetails := StyleServices.GetElementDetails(ttbButtonPressed);\r\n StyleServices.DrawElement(bmp.Canvas.Handle, lDetails, rc, nil, Round(96*sc));\r\n end\r\n else\r\n {$ENDIF}\r\n begin\r\n DChecked := DFCS_BUTTONPUSH or DFCS_PUSHED or DFCS_HOT;\r\n ThemeStyle := PBS_HOT or PBS_PRESSED;\r\n if IsThemeActive and Self.HandleAllocated then\r\n begin\r\n if Assigned(OpenThemeDataForDpi) then\r\n hth := OpenThemeDataForDpi(Self.Handle,'button', Round(96*sc))\r\n else\r\n hth := OpenThemeData(Self.Handle, 'button');\r\n DrawThemeBackground(hth, bmp.Canvas.Handle, BP_PUSHBUTTON, ThemeStyle,@rc,nil);\r\n CloseThemeData(hth);\r\n end\r\n else\r\n DrawFrameControl(bmp.Canvas.Handle,rc, DFC_BUTTON, DChecked);\r\n end;\r\n {$ENDIF}\r\n {$IFDEF LCLWEBLIB}\r\n g.Fill.Kind := gfkSolid;\r\n g.Fill.Color := gcWhite;\r\n g.Stroke.Kind := gskSolid;\r\n g.Stroke.Color := gcWhite;\r\n g.DrawRectangle(RectF(0, 0, bmp.Width, bmp.Height));\r\n g.DrawButton(RectF(0, 0, bmp.Width, bmp.Height), False, True, True, AdaptToStyle);\r\n {$ENDIF}\r\n\r\n FDownFocusBtn.Assign(bmp);\r\n\r\n FNormalDisabledBtn := TTMSFNCBitmap.Create;\r\n FNormalDisabledBtn.OnChange := @DoBitmapChanged;\r\n\r\n {$IFDEF VCLLIB}\r\n bmp.Canvas.Brush.Color := GetTransparentColor;\r\n bmp.Canvas.Brush.Style := bsSolid;\r\n bmp.Canvas.FillRect(rc);\r\n\r\n {$IFDEF VCLSTYLESENABLED}\r\n if TTMSFNCStyles.StyleServicesEnabled then\r\n begin\r\n lDetails := StyleServices.GetElementDetails(ttbButtonDisabled);\r\n StyleServices.DrawElement(bmp.Canvas.Handle, lDetails, rc, nil, Round(96*sc));\r\n end\r\n else\r\n {$ENDIF}\r\n begin\r\n DChecked := DFCS_BUTTONPUSH or DFCS_INACTIVE;\r\n ThemeStyle := PBS_DISABLED;\r\n if IsThemeActive and Self.HandleAllocated then\r\n begin\r\n if Assigned(OpenThemeDataForDpi) then\r\n hth := OpenThemeDataForDpi(Self.Handle,'button', Round(96*sc))\r\n else\r\n hth := OpenThemeData(Self.Handle, 'button');\r\n DrawThemeBackground(hth, bmp.Canvas.Handle, BP_PUSHBUTTON, ThemeStyle,@rc,nil);\r\n CloseThemeData(hth);\r\n end\r\n else\r\n DrawFrameControl(bmp.Canvas.Handle,rc, DFC_BUTTON, DChecked);\r\n end;\r\n {$ENDIF}\r\n {$IFDEF LCLWEBLIB}\r\n g.Fill.Kind := gfkSolid;\r\n g.Fill.Color := gcWhite;\r\n g.Stroke.Kind := gskSolid;\r\n g.Stroke.Color := gcWhite;\r\n g.DrawRectangle(RectF(0, 0, bmp.Width, bmp.Height));\r\n g.DrawButton(RectF(0, 0, bmp.Width, bmp.Height), False, False, False, AdaptToStyle);\r\n {$ENDIF}\r\n\r\n FNormalDisabledBtn.Assign(bmp);\r\n finally\r\n {$IFDEF LCLWEBLIB}\r\n g.Free;\r\n {$ENDIF}\r\n bmp.Free;\r\n end;\r\n {$ENDIF}\r\nend;\r\n\r\nprocedure TTMSFNCCustomControl.CreateRadioButtonBitmaps;\r\nvar\r\n{$IFDEF FMXLIB}\r\n Rd: TRadioButton;\r\n f: TCommonCustomForm;\r\n fo: IControl;\r\n{$ENDIF}\r\n{$IFDEF CMNWEBLIB}\r\n {$IFNDEF LCLWEBLIB}\r\n rc: TRect;\r\n dChecked: Cardinal;\r\n hth: HTHEME;\r\n ThemeStyle: DWord;\r\n {$ENDIF}\r\n {$IFDEF LCLWEBLIB}\r\n g: TTMSFNCGraphics;\r\n {$ENDIF}\r\n {$IFDEF VCLSTYLESENABLED}\r\n lDetails: TThemedElementDetails;\r\n {$ENDIF}\r\n bmp: TBitmap;\r\n sc: Single;\r\n{$ENDIF}\r\nbegin\r\n {$IFDEF CMNWEBLIB}\r\n sc := ResourceScaleFactor;\r\n {$ENDIF}\r\n\r\n if Assigned(FCheckedFocusRd) then\r\n begin\r\n FCheckedFocusRd.Free;\r\n FCheckedFocusRd := nil;\r\n end;\r\n\r\n if Assigned(FUnCheckedRd) then\r\n begin\r\n FUnCheckedRd.Free;\r\n FUnCheckedRd := nil;\r\n end;\r\n\r\n if Assigned(FCheckedRd) then\r\n begin\r\n FCheckedRd.Free;\r\n FCheckedRd := nil;\r\n end;\r\n\r\n if Assigned(FUnCheckedFocusRd) then\r\n begin\r\n FUnCheckedFocusRd.Free;\r\n FUnCheckedFocusRd := nil;\r\n end;\r\n\r\n if Assigned(FUnCheckedDisabledRd) then\r\n begin\r\n FUnCheckedDisabledRd.Free;\r\n FUnCheckedDisabledRd := nil;\r\n end;\r\n\r\n if Assigned(FCheckedDisabledRd) then\r\n begin\r\n FCheckedDisabledRd.Free;\r\n FCheckedDisabledRd := nil;\r\n end;\r\n\r\n {$IFDEF FMXLIB}\r\n Rd := TRadioButton.Create(Self);\r\n Rd.Width := Rd.Height;\r\n Rd.Text := '';\r\n Rd.Parent := Self;\r\n Rd.IsChecked := false;\r\n Rd.NeedStyleLookup;\r\n Rd.ApplyStyleLookup;\r\n\r\n {$IFDEF FMXMOBILE}\r\n Rd.Width := 25;\r\n Rd.Height := 25;\r\n {$ENDIF}\r\n\r\n TurnOffAnimation(Rd);\r\n FUnCheckedRd := Rd.MakeScreenshot;\r\n Rd.IsChecked := true;\r\n FCheckedRd := Rd.MakeScreenshot;\r\n Rd.Enabled := False;\r\n Rd.IsChecked := False;\r\n FUnCheckedDisabledRd := Rd.MakeScreenshot;\r\n Rd.IsChecked := true;\r\n FCheckedDisabledRd := Rd.MakeScreenshot;\r\n Rd.Enabled := True;\r\n\r\n f := TTMSFNCUtils.GetParentForm(Self);\r\n fo := nil;\r\n if Assigned(f) then\r\n fo := f.Focused;\r\n\r\n Rd.SetFocus;\r\n Rd.IsChecked := false;\r\n FUnCheckedFocusRd := Rd.MakeScreenshot;\r\n Rd.IsChecked := true;\r\n FCheckedFocusRd := Rd.MakeScreenshot;\r\n Rd.Parent := nil;\r\n Rd.Free;\r\n\r\n if Assigned(fo) then\r\n fo.SetFocus;\r\n {$ENDIF}\r\n\r\n {$IFDEF CMNWEBLIB}\r\n bmp := TBitmap.Create;\r\n {$IFDEF VCLLIB}\r\n rc := Bounds(0, 0, Round(16 * sc), Round(16 * sc));\r\n {$ENDIF}\r\n {$IFDEF LCLWEBLIB}\r\n g := TTMSFNCGraphics.Create(bmp.Canvas);\r\n {$ENDIF}\r\n try\r\n {$IFNDEF WEBLIB}\r\n bmp.PixelFormat := pf24bit;\r\n bmp.TransparentMode := tmFixed;\r\n bmp.Transparent := True;\r\n bmp.TransparentColor := GetTransparentColor;\r\n {$ENDIF}\r\n bmp.SetSize(Round(16 * sc), Round(16 * sc));\r\n\r\n FUnCheckedRd := TTMSFNCBitmap.Create;\r\n FUnCheckedRd.OnChange := @DoBitmapChanged;\r\n\r\n {$IFDEF VCLLIB}\r\n bmp.Canvas.Brush.Color := GetTransparentColor;\r\n bmp.Canvas.Brush.Style := bsSolid;\r\n bmp.Canvas.FillRect(rc);\r\n\r\n {$IFDEF VCLSTYLESENABLED}\r\n if TTMSFNCStyles.StyleServicesEnabled then\r\n begin\r\n lDetails := StyleServices.GetElementDetails(tbRadioButtonUncheckedNormal);\r\n StyleServices.DrawElement(bmp.Canvas.Handle, lDetails, rc, nil, Round(96*sc));\r\n end\r\n else\r\n {$ENDIF}\r\n begin\r\n DChecked := DFCS_BUTTONRADIO;\r\n ThemeStyle := RBS_UNCHECKEDNORMAL;\r\n if IsThemeActive and Self.HandleAllocated then\r\n begin\r\n if Assigned(OpenThemeDataForDpi) then\r\n hth := OpenThemeDataForDpi(Self.Handle,'button', Round(96*sc))\r\n else\r\n hth := OpenThemeData(Self.Handle, 'button');\r\n DrawThemeBackground(hth, bmp.Canvas.Handle, BP_RADIOBUTTON, ThemeStyle,@rc,nil);\r\n CloseThemeData(hth);\r\n end\r\n else\r\n DrawFrameControl(bmp.Canvas.Handle,rc,DFC_BUTTON, DChecked);\r\n end;\r\n {$ENDIF}\r\n {$IFDEF LCLWEBLIB}\r\n g.Fill.Kind := gfkSolid;\r\n g.Fill.Color := gcWhite;\r\n g.Stroke.Kind := gskSolid;\r\n g.Stroke.Color := gcWhite;\r\n g.DrawRectangle(RectF(0, 0, bmp.Width, bmp.Height));\r\n g.DrawRadioButton(RectF(0, 0, bmp.Width, bmp.Height), False, False, True);\r\n {$ENDIF}\r\n\r\n FUnCheckedRd.Assign(bmp);\r\n\r\n FCheckedRd := TTMSFNCBitmap.Create;\r\n FCheckedRd.OnChange := @DoBitmapChanged;\r\n\r\n {$IFDEF VCLLIB}\r\n bmp.Canvas.Brush.Color := GetTransparentColor;\r\n bmp.Canvas.Brush.Style := bsSolid;\r\n bmp.Canvas.FillRect(rc);\r\n\r\n {$IFDEF VCLSTYLESENABLED}\r\n if TTMSFNCStyles.StyleServicesEnabled then\r\n begin\r\n lDetails := StyleServices.GetElementDetails(tbRadioButtonCheckedNormal);\r\n StyleServices.DrawElement(bmp.Canvas.Handle, lDetails, rc, nil, Round(96*sc));\r\n end\r\n else\r\n {$ENDIF}\r\n begin\r\n DChecked := DFCS_BUTTONRADIO or DFCS_CHECKED;\r\n ThemeStyle := RBS_CHECKEDNORMAL;\r\n if IsThemeActive and Self.HandleAllocated then\r\n begin\r\n if Assigned(OpenThemeDataForDpi) then\r\n hth := OpenThemeDataForDpi(Self.Handle,'button', Round(96*sc))\r\n else\r\n hth := OpenThemeData(Self.Handle, 'button');\r\n DrawThemeBackground(hth, bmp.Canvas.Handle, BP_RADIOBUTTON, ThemeStyle,@rc,nil);\r\n CloseThemeData(hth);\r\n end\r\n else\r\n DrawFrameControl(bmp.Canvas.Handle,rc,DFC_BUTTON, DChecked);\r\n end;\r\n {$ENDIF}\r\n {$IFDEF LCLWEBLIB}\r\n g.Fill.Kind := gfkSolid;\r\n g.Fill.Color := gcWhite;\r\n g.Stroke.Kind := gskSolid;\r\n g.Stroke.Color := gcWhite;\r\n g.DrawRectangle(RectF(0, 0, bmp.Width, bmp.Height));\r\n g.DrawRadioButton(RectF(0, 0, bmp.Width, bmp.Height), True, False, True);\r\n {$ENDIF}\r\n\r\n FCheckedRd.Assign(bmp);\r\n\r\n FUnCheckedFocusRd := TTMSFNCBitmap.Create;\r\n FUnCheckedFocusRd.OnChange := @DoBitmapChanged;\r\n\r\n {$IFDEF VCLLIB}\r\n bmp.Canvas.Brush.Color := GetTransparentColor;\r\n bmp.Canvas.Brush.Style := bsSolid;\r\n bmp.Canvas.FillRect(rc);\r\n\r\n {$IFDEF VCLSTYLESENABLED}\r\n if TTMSFNCStyles.StyleServicesEnabled then\r\n begin\r\n lDetails := StyleServices.GetElementDetails(tbRadioButtonUncheckedHot);\r\n StyleServices.DrawElement(bmp.Canvas.Handle, lDetails, rc, nil, Round(96*sc));\r\n end\r\n else\r\n {$ENDIF}\r\n begin\r\n DChecked := DFCS_BUTTONRADIO or DFCS_HOT;\r\n ThemeStyle := RBS_UNCHECKEDHOT;\r\n if IsThemeActive and Self.HandleAllocated then\r\n begin\r\n if Assigned(OpenThemeDataForDpi) then\r\n hth := OpenThemeDataForDpi(Self.Handle,'button', Round(96*sc))\r\n else\r\n hth := OpenThemeData(Self.Handle, 'button');\r\n DrawThemeBackground(hth, bmp.Canvas.Handle, BP_RADIOBUTTON, ThemeStyle,@rc,nil);\r\n CloseThemeData(hth);\r\n end\r\n else\r\n DrawFrameControl(bmp.Canvas.Handle,rc,DFC_BUTTON, DChecked);\r\n end;\r\n {$ENDIF}\r\n {$IFDEF LCLWEBLIB}\r\n g.Fill.Kind := gfkSolid;\r\n g.Fill.Color := gcWhite;\r\n g.Stroke.Kind := gskSolid;\r\n g.Stroke.Color := gcWhite;\r\n g.DrawRectangle(RectF(0, 0, bmp.Width, bmp.Height));\r\n g.DrawRadioButton(RectF(0, 0, bmp.Width, bmp.Height), False, True, True);\r\n {$ENDIF}\r\n\r\n FUnCheckedFocusRd.Assign(bmp);\r\n\r\n FCheckedFocusRd := TTMSFNCBitmap.Create;\r\n FCheckedFocusRd.OnChange := @DoBitmapChanged;\r\n\r\n {$IFDEF VCLLIB}\r\n bmp.Canvas.Brush.Color := GetTransparentColor;\r\n bmp.Canvas.Brush.Style := bsSolid;\r\n bmp.Canvas.FillRect(rc);\r\n\r\n {$IFDEF VCLSTYLESENABLED}\r\n if TTMSFNCStyles.StyleServicesEnabled then\r\n begin\r\n lDetails := StyleServices.GetElementDetails(tbRadioButtonCheckedHot);\r\n StyleServices.DrawElement(bmp.Canvas.Handle, lDetails, rc, nil, Round(96*sc));\r\n end\r\n else\r\n {$ENDIF}\r\n begin\r\n DChecked := DFCS_BUTTONRADIO or DFCS_CHECKED or DFCS_HOT;\r\n ThemeStyle := RBS_CHECKEDHOT;\r\n if IsThemeActive and Self.HandleAllocated then\r\n begin\r\n if Assigned(OpenThemeDataForDpi) then\r\n hth := OpenThemeDataForDpi(Self.Handle,'button', Round(96*sc))\r\n else\r\n hth := OpenThemeData(Self.Handle, 'button');\r\n DrawThemeBackground(hth, bmp.Canvas.Handle, BP_RADIOBUTTON, ThemeStyle,@rc,nil);\r\n CloseThemeData(hth);\r\n end\r\n else\r\n DrawFrameControl(bmp.Canvas.Handle,rc,DFC_BUTTON, DChecked);\r\n end;\r\n {$ENDIF}\r\n {$IFDEF LCLWEBLIB}\r\n g.Fill.Kind := gfkSolid;\r\n g.Fill.Color := gcWhite;\r\n g.Stroke.Kind := gskSolid;\r\n g.Stroke.Color := gcWhite;\r\n g.DrawRectangle(RectF(0, 0, bmp.Width, bmp.Height));\r\n g.DrawRadioButton(RectF(0, 0, bmp.Width, bmp.Height), True, True, True);\r\n {$ENDIF}\r\n\r\n FCheckedFocusRd.Assign(bmp);\r\n\r\n FUnCheckedDisabledRd := TTMSFNCBitmap.Create;\r\n FUnCheckedDisabledRd.OnChange := @DoBitmapChanged;\r\n\r\n {$IFDEF VCLLIB}\r\n bmp.Canvas.Brush.Color := GetTransparentColor;\r\n bmp.Canvas.Brush.Style := bsSolid;\r\n bmp.Canvas.FillRect(rc);\r\n\r\n {$IFDEF VCLSTYLESENABLED}\r\n if TTMSFNCStyles.StyleServicesEnabled then\r\n begin\r\n lDetails := StyleServices.GetElementDetails(tbRadioButtonUncheckedDisabled);\r\n StyleServices.DrawElement(bmp.Canvas.Handle, lDetails, rc, nil, Round(96*sc));\r\n end\r\n else\r\n {$ENDIF}\r\n begin\r\n DChecked := DFCS_BUTTONRADIO or DFCS_INACTIVE;\r\n ThemeStyle := RBS_UNCHECKEDDISABLED;\r\n if IsThemeActive and Self.HandleAllocated then\r\n begin\r\n if Assigned(OpenThemeDataForDpi) then\r\n hth := OpenThemeDataForDpi(Self.Handle,'button', Round(96*sc))\r\n else\r\n hth := OpenThemeData(Self.Handle, 'button');\r\n DrawThemeBackground(hth, bmp.Canvas.Handle, BP_RADIOBUTTON, ThemeStyle,@rc,nil);\r\n CloseThemeData(hth);\r\n end\r\n else\r\n DrawFrameControl(bmp.Canvas.Handle,rc,DFC_BUTTON, DChecked);\r\n end;\r\n {$ENDIF}\r\n {$IFDEF LCLWEBLIB}\r\n g.Fill.Kind := gfkSolid;\r\n g.Fill.Color := gcWhite;\r\n g.Stroke.Kind := gskSolid;\r\n g.Stroke.Color := gcWhite;\r\n g.DrawRectangle(RectF(0, 0, bmp.Width, bmp.Height));\r\n g.DrawRadioButton(RectF(0, 0, bmp.Width, bmp.Height), False, False, False);\r\n {$ENDIF}\r\n\r\n FUnCheckedDisabledRd.Assign(bmp);\r\n\r\n FCheckedDisabledRd := TTMSFNCBitmap.Create;\r\n FCheckedDisabledRd.OnChange := @DoBitmapChanged;\r\n\r\n {$IFDEF VCLLIB}\r\n bmp.Canvas.Brush.Color := GetTransparentColor;\r\n bmp.Canvas.Brush.Style := bsSolid;\r\n bmp.Canvas.FillRect(rc);\r\n\r\n {$IFDEF VCLSTYLESENABLED}\r\n if TTMSFNCStyles.StyleServicesEnabled then\r\n begin\r\n lDetails := StyleServices.GetElementDetails(tbRadioButtonCheckedDisabled);\r\n StyleServices.DrawElement(bmp.Canvas.Handle, lDetails, rc, nil, Round(96*sc));\r\n end\r\n else\r\n {$ENDIF}\r\n begin\r\n DChecked := DFCS_BUTTONRADIO or DFCS_CHECKED or DFCS_INACTIVE;\r\n ThemeStyle := RBS_CHECKEDDISABLED;\r\n if IsThemeActive and Self.HandleAllocated then\r\n begin\r\n if Assigned(OpenThemeDataForDpi) then\r\n hth := OpenThemeDataForDpi(Self.Handle,'button', Round(96*sc))\r\n else\r\n hth := OpenThemeData(Self.Handle, 'button');\r\n DrawThemeBackground(hth, bmp.Canvas.Handle, BP_RADIOBUTTON, ThemeStyle,@rc,nil);\r\n CloseThemeData(hth);\r\n end\r\n else\r\n DrawFrameControl(bmp.Canvas.Handle,rc,DFC_BUTTON, DChecked);\r\n end;\r\n {$ENDIF}\r\n {$IFDEF LCLWEBLIB}\r\n g.Fill.Kind := gfkSolid;\r\n g.Fill.Color := gcWhite;\r\n g.Stroke.Kind := gskSolid;\r\n g.Stroke.Color := gcWhite;\r\n g.DrawRectangle(RectF(0, 0, bmp.Width, bmp.Height));\r\n g.DrawRadioButton(RectF(0, 0, bmp.Width, bmp.Height), True, False, False);\r\n {$ENDIF}\r\n\r\n FCheckedDisabledRd.Assign(bmp);\r\n finally\r\n {$IFDEF LCLWEBLIB}\r\n g.Free;\r\n {$ENDIF}\r\n bmp.Free;\r\n end;\r\n {$ENDIF}\r\nend;\r\n\r\nfunction TTMSFNCCustomControl.GetButtonBitmap(AWidth, AHeight: Single; ADown: Boolean = False; AFocused: Boolean = False; AEnabled: Boolean = True): TTMSFNCBitmapHelperClass;\r\nbegin\r\n CreateButtonBitmaps(AWidth, AHeight);\r\n\r\n if ADown then\r\n begin\r\n if AEnabled then\r\n begin\r\n if AFocused then\r\n Result := FDownFocusBtn\r\n else\r\n Result := FDownBtn;\r\n end\r\n else\r\n Result := FNormalDisabledBtn;\r\n end\r\n else\r\n begin\r\n if AEnabled then\r\n begin\r\n if AFocused then\r\n Result := FNormalFocusBtn\r\n else\r\n Result := FNormalBtn;\r\n end\r\n else\r\n Result := FNormalDisabledBtn;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCCustomControl.GetCheckBoxBitmap(AChecked: Boolean; AFocused: Boolean; AEnabled: Boolean): TTMSFNCBitmapHelperClass;\r\nbegin\r\n if (not Assigned(FCheckedChk) or not Assigned(FCheckedFocusChk) or not Assigned(FUnCheckedChk)\r\n or not Assigned(FUnCheckedFocusChk) or not Assigned(FCheckedDisabledChk) or not Assigned(FUnCheckedDisabledChk)) then\r\n CreateCheckBoxBitmaps;\r\n\r\n if AChecked then\r\n begin\r\n if AEnabled then\r\n begin\r\n if AFocused then\r\n Result := FCheckedFocusChk\r\n else\r\n Result := FCheckedChk;\r\n end\r\n else\r\n Result := FCheckedDisabledChk;\r\n end\r\n else\r\n begin\r\n if AEnabled then\r\n begin\r\n if AFocused then\r\n Result := FUnCheckedFocusChk\r\n else\r\n Result := FUnCheckedChk;\r\n end\r\n else\r\n Result := FUnCheckedDisabledChk;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCCustomControl.GetRadioButtonBitmap(AChecked: Boolean; AFocused: Boolean; AEnabled: Boolean): TTMSFNCBitmapHelperClass;\r\nbegin\r\n if (not Assigned(FCheckedRd) or not Assigned(FCheckedFocusRd) or not Assigned(FUnCheckedRd)\r\n or not Assigned(FUnCheckedFocusRd) or not Assigned(FCheckedDisabledRd) or not Assigned(FUnCheckedDisabledRd)) then\r\n CreateRadioButtonBitmaps;\r\n\r\n if AChecked then\r\n begin\r\n if AEnabled then\r\n begin\r\n if AFocused then\r\n Result := FCheckedFocusRd\r\n else\r\n Result := FCheckedRd;\r\n end\r\n else\r\n Result := FCheckedDisabledRd;\r\n end\r\n else\r\n begin\r\n if AEnabled then\r\n begin\r\n if AFocused then\r\n Result := FUnCheckedFocusRd\r\n else\r\n Result := FUnCheckedRd;\r\n end\r\n else\r\n Result := FUnCheckedDisabledRd;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCCustomControl.IsDesignTime: Boolean;\r\nbegin\r\n Result := False;\r\n if Assigned(Owner) then\r\n Result := IsDesigning and not ((csReading in Owner.ComponentState) or (csLoading in Owner.ComponentState));\r\nend;\r\n\r\nfunction TTMSFNCCustomControl.IsReading: Boolean;\r\nbegin\r\n Result := False;\r\n if Assigned(Owner) then\r\n Result := (csReading in Owner.ComponentState);\r\nend;\r\n\r\nfunction TTMSFNCCustomControl.IsDesigning: Boolean;\r\nbegin\r\n Result := ((csDesigning in ComponentState) {$IFDEF WEBLIB}or Assigned(VSIDE){$ENDIF});\r\nend;\r\n\r\nfunction TTMSFNCCustomControl.IsDesignerForm: Boolean;\r\nvar\r\n frm: TCustomForm;\r\nbegin\r\n frm := TTMSFNCUtils.GetOwnerForm(Self);\r\n Result := IsDesigning;\r\n if Assigned(frm) then\r\n Result := Result or (frm is TTMSFNCCustomDesignerForm);\r\nend;\r\n\r\nfunction TTMSFNCCustomControl.IsDestroying: Boolean;\r\nbegin\r\n Result := (csDestroying in ComponentState);\r\nend;\r\n\r\nfunction TTMSFNCCustomControl.IsLoading: Boolean;\r\nbegin\r\n Result := False;\r\n if Assigned(Owner) then\r\n Result := (csLoading in Owner.ComponentState)\r\nend;\r\n\r\nprocedure TTMSFNCCustomControl.ResetToDefaultStyle;\r\nbegin\r\n inherited;\r\n Fill.Color := gcWhite;\r\n Stroke.Color := gcSilver;\r\nend;\r\n\r\nprocedure TTMSFNCCustomControl.ChangeDPIScale({%H-}M, {%H-}D: Integer);\r\nbegin\r\n inherited;\r\n if not IsLoading then\r\n begin\r\n CreateCheckBoxBitmaps;\r\n CreateRadioButtonBitmaps;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomControl.RegisterRuntimeClasses;\r\nbegin\r\n\r\nend;\r\n\r\nprocedure TTMSFNCCustomControl.ApplyExportScale(AScale: Single);\r\nbegin\r\nend;\r\n\r\nprocedure TTMSFNCCustomControl.ResetExportScale;\r\nbegin\r\nend;\r\n\r\nprocedure TTMSFNCCustomControl.SetExportRect(ARect: TRectF);\r\nbegin\r\n FExportRect := ARect;\r\nend;\r\n\r\nprocedure TTMSFNCCustomControl.&Export({%H-}AGraphics: TTMSFNCGraphics; {%H-}ARect: TRectF);\r\nbegin\r\n FExporting := True;\r\n SetExportRect(ARect);\r\n BeforeExport;\r\n Draw(AGraphics, ARect);\r\n FExporting := False;\r\n AfterExport;\r\nend;\r\n\r\nprocedure TTMSFNCCustomControl.ApplyStyle;\r\nvar\r\n c: TTMSFNCGraphicsColor;\r\nbegin\r\n inherited;\r\n c := gcNull;\r\n if TTMSFNCStyles.GetStyleBackgroundFillColor(c) then\r\n Fill.Color := c;\r\n\r\n c := gcNull;\r\n if TTMSFNCStyles.GetStyleLineFillColor(c) then\r\n Stroke.Color := c;\r\nend;\r\n\r\nprocedure TTMSFNCCustomControl.DestroyGraphicElements;\r\nbegin\r\n if Assigned(FDownBtn) then\r\n begin\r\n FDownBtn.Free;\r\n FDownBtn := nil;\r\n end;\r\n\r\n if Assigned(FNormalBtn) then\r\n begin\r\n FNormalBtn.Free;\r\n FNormalBtn := nil;\r\n end;\r\n\r\n if Assigned(FDownFocusBtn) then\r\n begin\r\n FDownFocusBtn.Free;\r\n FDownFocusBtn := nil;\r\n end;\r\n\r\n if Assigned(FNormalFocusBtn) then\r\n begin\r\n FNormalFocusBtn.Free;\r\n FNormalFocusBtn := nil;\r\n end;\r\n\r\n if Assigned(FNormalDisabledBtn) then\r\n begin\r\n FNormalDisabledBtn.Free;\r\n FNormalDisabledBtn := nil;\r\n end;\r\n\r\n if Assigned(FCheckedChk) then\r\n begin\r\n FCheckedChk.Free;\r\n FCheckedChk := nil;\r\n end;\r\n\r\n if Assigned(FCheckedFocusChk) then\r\n begin\r\n FCheckedFocusChk.Free;\r\n FCheckedFocusChk := nil;\r\n end;\r\n\r\n if Assigned(FUnCheckedDisabledChk) then\r\n begin\r\n FUnCheckedDisabledChk.Free;\r\n FUnCheckedDisabledChk := nil;\r\n end;\r\n\r\n if Assigned(FCheckedDisabledChk) then\r\n begin\r\n FCheckedDisabledChk.Free;\r\n FCheckedDisabledChk := nil;\r\n end;\r\n\r\n if Assigned(FUnCheckedChk) then\r\n begin\r\n FUnCheckedChk.Free;\r\n FUnCheckedChk := nil;\r\n end;\r\n\r\n if Assigned(FUnCheckedFocusChk) then\r\n begin\r\n FUnCheckedFocusChk.Free;\r\n FUnCheckedFocusChk := nil;\r\n end;\r\n\r\n if Assigned(FCheckedRd) then\r\n begin\r\n FCheckedRd.Free;\r\n FCheckedRd := nil;\r\n end;\r\n\r\n if Assigned(FCheckedFocusRd) then\r\n begin\r\n FCheckedFocusRd.Free;\r\n FCheckedFocusRd := nil;\r\n end;\r\n\r\n if Assigned(FUnCheckedRd) then\r\n begin\r\n FUnCheckedRd.Free;\r\n FUnCheckedRd := nil;\r\n end;\r\n\r\n if Assigned(FUnCheckedFocusRd) then\r\n begin\r\n FUnCheckedFocusRd.Free;\r\n FUnCheckedFocusRd := nil;\r\n end;\r\n\r\n if Assigned(FUnCheckedDisabledRd) then\r\n begin\r\n FUnCheckedDisabledRd.Free;\r\n FUnCheckedDisabledRd := nil;\r\n end;\r\n\r\n if Assigned(FCheckedDisabledRd) then\r\n begin\r\n FCheckedDisabledRd.Free;\r\n FCheckedDisabledRd := nil;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomControl.AfterExport;\r\nbegin\r\nend;\r\n\r\nprocedure TTMSFNCCustomControl.BeforeExport;\r\nbegin\r\nend;\r\n\r\nfunction TTMSFNCCustomControl.IsExporting: Boolean;\r\nbegin\r\n Result := FExporting;\r\nend;\r\n\r\nfunction TTMSFNCCustomControl.GetLocalRect: TRectF;\r\nbegin\r\n if IsExporting then\r\n Result := FExportRect\r\n else\r\n Result := inherited;\r\nend;\r\n\r\nfunction TTMSFNCCustomControl.GetControlRect: TRectF;\r\nbegin\r\n if IsExporting then\r\n Result := FExportRect\r\n else\r\n Result := RectF(0, 0, Width, Height);\r\nend;\r\n\r\nfunction TTMSFNCCustomControl.GetContentRect: TRectF;\r\nbegin\r\n Result := GetControlRect;\r\nend;\r\n\r\nfunction TTMSFNCCustomControl.GetVersion: String;\r\nbegin\r\n Result := '';\r\nend;\r\n\r\nfunction TTMSFNCCustomControl.IsAppearanceProperty(AObject: TObject; APropertyName: string; APropertyType: TTypeKind): Boolean;\r\nvar\r\n Prop: TTMSFNCPropertyInfo;\r\n pName, cn: string;\r\nbegin\r\n Result := False;\r\n Prop := GetPropInfo(AObject, APropertyName);\r\n if Assigned(Prop) then\r\n begin\r\n pName := TTMSFNCPersistence.GetPropInfoName(Prop);\r\n\r\n cn := TTMSFNCPersistence.GetPropInfoTypeName(Prop);\r\n Result := (cn = 'TAlphaColor') or (cn = 'TColor') or (cn = 'TGraphicsColor') or\r\n (cn = 'TTMSFNCGraphicsFill') or (cn = 'TTMSFNCGraphicsStroke') or (Pos('Appearance', pName) > 0);\r\n\r\n Result := Result or (APropertyName = 'Fill') or (APropertyName = 'Stroke') or (APropertyName = 'Font');\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCCustomControl.CanSaveProperty(AObject: TObject; APropertyName: string; APropertyType: TTypeKind): Boolean;\r\nbegin\r\n if (AObject = Self) and not BlockPersistenceInterface then\r\n Result := (TTMSFNCUtils.IndexOfTextInArray(APropertyName, ExcludePropertyList) = -1)\r\n else\r\n Result := True;\r\n\r\n if FAppearancePersisting then\r\n Result := Result and IsAppearanceProperty(AObject, APropertyName, APropertyType);\r\n\r\n DoCanSaveProperty(AObject, APropertyName, APropertyType, Result);\r\nend;\r\n\r\nfunction TTMSFNCCustomControl.CanLoadProperty(AObject: TObject; APropertyName: string; APropertyType: TTypeKind): Boolean;\r\nbegin\r\n if (AObject = Self) and not BlockPersistenceInterface then\r\n Result := (TTMSFNCUtils.IndexOfTextInArray(APropertyName, ExcludePropertyList) = -1)\r\n else\r\n Result := True;\r\n\r\n DoCanLoadProperty(AObject, APropertyName, APropertyType, Result);\r\nend;\r\n\r\nprocedure TTMSFNCCustomControl.SaveSettingsToFile(AFileName: string; AAppearanceOnly: Boolean = False);\r\nbegin\r\n FAppearancePersisting := AAppearanceOnly;\r\n TTMSFNCPersistence.SaveSettingsToFile(Self, AFileName);\r\n FAppearancePersisting := False;\r\nend;\r\n\r\nprocedure TTMSFNCCustomControl.LoadSettingsFromFile(AFileName: string);\r\nbegin\r\n BeginUpdate;\r\n TTMSFNCPersistence.LoadSettingsFromFile(Self, AFileName);\r\n EndUpdate;\r\n Invalidate;\r\nend;\r\n\r\nprocedure TTMSFNCCustomControl.SaveSettingsToStream(AStream: TStream; AAppearanceOnly: Boolean = False);\r\nbegin\r\n FAppearancePersisting := AAppearanceOnly;\r\n TTMSFNCPersistence.SaveSettingsToStream(Self, AStream);\r\n FAppearancePersisting := False;\r\nend;\r\n\r\nprocedure TTMSFNCCustomControl.LoadSettingsFromStream(AStream: TStream);\r\nbegin\r\n BeginUpdate;\r\n TTMSFNCPersistence.LoadSettingsFromStream(Self, AStream);\r\n EndUpdate;\r\n Invalidate;\r\nend;\r\n\r\nfunction TTMSFNCCustomControl.LocalToScreenEx(APoint: TPointF): TPointF;\r\n{$IFDEF CMNWEBLIB}\r\nvar\r\n pt: TPoint;\r\n{$ENDIF}\r\nbegin\r\n {$IFDEF FMXLIB}\r\n Result := LocalToScreen(APoint);\r\n {$ENDIF}\r\n {$IFDEF CMNWEBLIB}\r\n pt := ClientToScreen(Point(Round(APoint.X), Round(APoint.Y)));\r\n Result := PointF(pt.X, pt.Y);\r\n {$ENDIF}\r\nend;\r\n\r\nfunction TTMSFNCCustomControl.ScreenToLocalEx(APoint: TPointF): TPointF;\r\n{$IFDEF CMNWEBLIB}\r\nvar\r\n pt: TPoint;\r\n{$ENDIF}\r\nbegin\r\n {$IFDEF FMXLIB}\r\n Result := ScreenToLocal(APoint);\r\n {$ENDIF}\r\n {$IFDEF CMNWEBLIB}\r\n pt := ScreenToClient(Point(Round(APoint.X), Round(APoint.Y)));\r\n Result := PointF(pt.X, pt.Y);\r\n {$ENDIF}\r\nend;\r\n\r\n{$IFDEF FMXLIB}\r\nprocedure TTMSFNCCustomControl.TurnOffAnimation(chk: TFmxObject);\r\nvar\r\n I: Integer;\r\nbegin\r\n if Assigned(chk) then\r\n begin\r\n if chk is TAnimation then\r\n (chk as TAnimation).Duration := 0;\r\n\r\n for I := 0 to chk.ChildrenCount - 1 do\r\n begin\r\n TurnOffAnimation(chk.Children[I]);\r\n end;\r\n end;\r\nend;\r\n{$ENDIF}\r\n\r\nprocedure TTMSFNCCustomControl.CaptureEx;\r\nbegin\r\n {$IFDEF FMXLIB}\r\n Capture;\r\n {$ENDIF}\r\n {$IFDEF VCLLIB}\r\n SetCapture(Self.Handle);\r\n {$ENDIF}\r\n {$IFDEF LCLLIB}\r\n MouseCapture := True;\r\n {$ENDIF}\r\n {$IFDEF WEBLIB}\r\n Capture;\r\n {$ENDIF}\r\nend;\r\n\r\nprocedure TTMSFNCCustomControl.ReleaseCaptureEx;\r\nbegin\r\n {$IFNDEF LCLLIB}\r\n {$IFNDEF WEBLIB}\r\n ReleaseCapture;\r\n {$ENDIF}\r\n {$ENDIF}\r\n {$IFDEF LCLLIB}\r\n MouseCapture := False;\r\n {$ENDIF}\r\n {$IFDEF WEBLIB}\r\n ReleaseCapture;\r\n {$ENDIF}\r\nend;\r\n\r\nfunction TTMSFNCCustomControlBaseCommon.ScaleResourceValue(const Value: Integer): Integer;\r\nbegin\r\n Result := TTMSFNCUtils.MulDivInt(Value, Round(FResourceScaleFactor * 100), 100);\r\nend;\r\n\r\nfunction TTMSFNCCustomControlBaseCommon.ScaleResourceValue(const Value: Double): Double;\r\nbegin\r\n Result := Value * FResourceScaleFactor;\r\nend;\r\n\r\n{$IFDEF FMXLIB}\r\nprocedure TTMSFNCCustomControlBaseCommon.SetEnabled(const Value: Boolean);\r\n{$ENDIF}\r\n{$IFNDEF FMXLIB}\r\nprocedure TTMSFNCCustomControlBaseCommon.SetEnabled(Value: Boolean);\r\n{$ENDIF}\r\nbegin\r\n inherited;\r\n\r\n Invalidate;\r\nend;\r\n\r\nfunction TTMSFNCCustomControlBaseCommon.ScalePaintValue(const Value: Integer): Integer;\r\nbegin\r\n {$IFDEF FMXLIB}\r\n Result := Value;\r\n {$ELSE}\r\n Result := TTMSFNCUtils.MulDivInt(Value, Round(FPaintScaleFactor * 100), 100);\r\n {$ENDIF}\r\nend;\r\n\r\nfunction TTMSFNCCustomControlBaseCommon.ScalePaintValue(const Value: Double): Double;\r\nbegin\r\n {$IFDEF FMXLIB}\r\n Result := Value;\r\n {$ELSE}\r\n Result := Value * FPaintScaleFactor;\r\n {$ENDIF}\r\nend;\r\n\r\nprocedure TTMSFNCCustomControlBaseCommon.GetControlMargins(var ALeft: Single; var ATop: Single; var ARight: Single; var ABottom: Single);\r\nbegin\r\n {$IFNDEF LCLLIB}\r\n {$IFDEF VCLWEBLIB}\r\n if not AlignWithMargins then\r\n Exit;\r\n {$ENDIF}\r\n ALeft := Margins.Left;\r\n ATop := Margins.Top;\r\n ARight := Margins.Right;\r\n ABottom := Margins.Bottom;\r\n {$ENDIF}\r\n {$IFDEF LCLLIB}\r\n ALeft := BorderSpacing.Left;\r\n ATop := BorderSpacing.Top;\r\n ARight := BorderSpacing.Right;\r\n ABottom := BorderSpacing.Bottom;\r\n {$ENDIF}\r\nend;\r\n\r\nprocedure TTMSFNCCustomControlBaseCommon.SetControlMargins(ALeft: Single; ATop: Single; ARight: Single; ABottom: Single);\r\nbegin\r\n {$IFDEF FMXLIB}\r\n Margins.Left := ALeft;\r\n Margins.Top := ATop;\r\n Margins.Right := ARight;\r\n Margins.Bottom := ABottom;\r\n {$ENDIF}\r\n {$IFDEF VCLWEBLIB}\r\n AlignWithMargins := True;\r\n Margins.Left := Round(ALeft);\r\n Margins.Top := Round(ATop);\r\n Margins.Right := Round(ARight);\r\n Margins.Bottom := Round(ABottom);\r\n {$ENDIF}\r\n {$IFDEF LCLLIB}\r\n BorderSpacing.Left := Round(ALeft);\r\n BorderSpacing.Top := Round(ATop);\r\n BorderSpacing.Right := Round(ARight);\r\n BorderSpacing.Bottom := Round(ABottom);\r\n {$ENDIF}\r\nend;\r\n\r\nprocedure TTMSFNCCustomControlBaseCommon.BeginDrag;\r\n{$IFDEF FMXLIB}\r\n{$HINTS OFF}\r\n{$IF COMPILERVERSION > 27}\r\nvar\r\n DragImage: TTMSFNCBitmap;\r\n pt: TPointF;\r\nbegin\r\n DragImage := TTMSFNCBitmap.Create;\r\n DragImage.Width := 1;\r\n DragImage.Height := 1;\r\n try\r\n pt := GetClientMousePos;\r\n MouseUp(TMouseButton.mbLeft, [], pt.X, pt.Y);\r\n Root.BeginInternalDrag(Self, DragImage);\r\n finally\r\n DragImage.Free;\r\n end;\r\n{$IFEND}\r\n{$IF COMPILERVERSION <= 27}\r\nbegin\r\n{$IFEND}\r\n{$HINTS ON}\r\n{$ENDIF}\r\n{$IFDEF CMNLIB}\r\nbegin\r\n inherited BeginDrag(True);\r\n{$ENDIF}\r\n{$IFDEF WEBLIB}\r\nbegin\r\n{$ENDIF}\r\nend;\r\n\r\n{$IFDEF FMXLIB}\r\nprocedure TTMSFNCCustomControlBaseCommon.CancelHint;\r\nbegin\r\n {$HINTS OFF}\r\n {$IF COMPILERVERSION > 29}\r\n Application.CancelHint;\r\n {$IFEND}\r\n {$HINTS ON}\r\nend;\r\n{$ENDIF}\r\n\r\nfunction TTMSFNCCustomControlBaseCommon.GetDragObjectScreenShot: TTMSFNCBitmap;\r\nbegin\r\n Result := nil;\r\nend;\r\n\r\n{$IFDEF CMNWEBLIB}\r\nprocedure TTMSFNCCustomControlBaseCommon.CancelHint;\r\nbegin\r\n {$IFNDEF WEBLIB}\r\n Application.CancelHint;\r\n {$ENDIF}\r\nend;\r\n\r\nfunction TTMSFNCCustomControlBase.GetHintString: string;\r\nbegin\r\n Result := '';\r\nend;\r\n\r\nfunction TTMSFNCCustomControlBase.HasHint: Boolean;\r\nbegin\r\n Result := False;\r\nend;\r\n{$ENDIF}\r\n\r\n{$IFNDEF LCLWEBLIB}\r\n\r\n{ FNCJSLibReferenceAttribute }\r\n\r\nconstructor FNCJSLibReferenceAttribute.Create(const AScrs: string);\r\nbegin\r\n inherited Create;\r\n FSrcs := AScrs;\r\nend;\r\n\r\nconstructor FNCJSLibReferenceAttribute.Create(const AScrs, ACSSs: string);\r\nbegin\r\n Create(AScrs);\r\n FCSSs := ACSSs;\r\nend;\r\n\r\nconstructor FNCJSLibReferenceAttribute.Create(const AScrs, ACSSs, AAttrs: string);\r\nbegin\r\n Create(AScrs, ACSSs);\r\n FAttrs := AAttrs;\r\nend;\r\n\r\nconstructor FNCJSLibReferenceAttribute.Create(const AScrs, ACSSs, AAttrs, ADesc: string);\r\nbegin\r\n Create(AScrs, ACSSs, AAttrs);\r\n FDesc := ADesc;\r\nend;\r\n\r\n{$ENDIF}\r\n\r\n{ TTMSFNCControl }\r\n\r\nprocedure TTMSFNCControl.RegisterRuntimeClasses;\r\nbegin\r\n inherited;\r\n RegisterClass(TTMSFNCControl);\r\nend;\r\n\r\n{$IFDEF USETRIAL}\r\n{$IFNDEF WEBLIB}\r\n{$IFNDEF LCLLIB}\r\n{$IFNDEF FMXMOBILE}\r\n{$IFDEF FREEWARE}\r\nconst TMSPRODUCTOFFSET = 700;\r\n{$I TMSProductTrial.inc}\r\n{$ENDIF}\r\n{$ENDIF}\r\n{$ENDIF}\r\n{$ENDIF}\r\n{$ENDIF}\r\n\r\n{$WARNINGS ON}\r\n\r\nend.\r\n\r\n","{********************************************************************}\r\n{ }\r\n{ written by TMS Software }\r\n{ copyright (c) 2016 - 2021 }\r\n{ Email : info@tmssoftware.com }\r\n{ Web : https://www.tmssoftware.com }\r\n{ }\r\n{ The source code is given as is. The author is not responsible }\r\n{ for any possible damage done due to the use of this code. }\r\n{ The complete source code remains property of the author and may }\r\n{ not be distributed, published, given or sold in any form as such. }\r\n{ No parts of the source code can be included in any other component }\r\n{ or application without written authorization of the author. }\r\n{********************************************************************}\r\n\r\nunit WEBLib.TMSFNCScrollBar;\r\n\r\n{$I WEBLib.TMSFNCDefines.inc}\r\n\r\n{$IFDEF WEBLIB}\r\n{$DEFINE LCLWEBLIB}\r\n{$ENDIF}\r\n{$IFDEF LCLLIB}\r\n{$DEFINE LCLWEBLIB}\r\n{$ENDIF}\r\n\r\ninterface\r\n\r\nuses\r\n Classes, WEBLib.TMSFNCCustomControl, WEBLib.ExtCtrls,\r\n WEBLib.TMSFNCTypes, WEBLib.TMSFNCGraphics, WEBLib.Controls,\r\n WEBLib.TMSFNCGraphicsTypes\r\n {$IFDEF FMXLIB}\r\n ,FMX.Types\r\n {$ENDIF}\r\n {$IFNDEF LCLWEBLIB}\r\n {$HINTS OFF}\r\n {$IF COMPILERVERSION > 22}\r\n ,UITypes\r\n {$IFEND}\r\n {$HINTS ON}\r\n ,Types\r\n {$ENDIF}\r\n ;\r\n\r\ntype\r\n TTMSFNCCustomScrollBar = class;\r\n\r\n TTMSFNCScrollBarAppearance = class(TPersistent)\r\n private\r\n FOwner: TTMSFNCCustomScrollBar;\r\n FScrollButtonSize: Single;\r\n FThumbButtonSize: Single;\r\n FOnChange: TNotifyEvent;\r\n FFixedThumb: Boolean;\r\n FArrowColor: TTMSFNCGraphicsColor;\r\n FThumbStroke: TTMSFNCGraphicsStroke;\r\n FThumbButtonRightDownStroke: TTMSFNCGraphicsStroke;\r\n FThumbFill: TTMSFNCGraphicsFill;\r\n FThumbButtonLeftFill: TTMSFNCGraphicsFill;\r\n FScrollButtonLeftHoverFill: TTMSFNCGraphicsFill;\r\n FScrollButtonLeftStroke: TTMSFNCGraphicsStroke;\r\n FScrollButtonRightFill: TTMSFNCGraphicsFill;\r\n FThumbButtonLeftHoverFill: TTMSFNCGraphicsFill;\r\n FThumbButtonLeftStroke: TTMSFNCGraphicsStroke;\r\n FScrollButtonLeftHoverStroke: TTMSFNCGraphicsStroke;\r\n FThumbButtonRightFill: TTMSFNCGraphicsFill;\r\n FScrollButtonRightHoverFill: TTMSFNCGraphicsFill;\r\n FScrollButtonRightStroke: TTMSFNCGraphicsStroke;\r\n FThumbButtonLeftHoverStroke: TTMSFNCGraphicsStroke;\r\n FScrollButtonLeftDownFill: TTMSFNCGraphicsFill;\r\n FThumbButtonRightHoverFill: TTMSFNCGraphicsFill;\r\n FThumbButtonRightStroke: TTMSFNCGraphicsStroke;\r\n FScrollButtonRightHoverStroke: TTMSFNCGraphicsStroke;\r\n FThumbButtonLeftDownFill: TTMSFNCGraphicsFill;\r\n FScrollButtonLeftDownStroke: TTMSFNCGraphicsStroke;\r\n FThumbButtonRightHoverStroke: TTMSFNCGraphicsStroke;\r\n FScrollButtonRightDownFill: TTMSFNCGraphicsFill;\r\n FThumbButtonLeftDownStroke: TTMSFNCGraphicsStroke;\r\n FThumbButtonRightDownFill: TTMSFNCGraphicsFill;\r\n FScrollButtonRightDownStroke: TTMSFNCGraphicsStroke;\r\n FScrollButtonLeftFill: TTMSFNCGraphicsFill;\r\n procedure SetThumbButtonSize(const Value: Single);\r\n procedure SetFixedThumb(const Value: Boolean);\r\n procedure SetArrowColor(const Value: TTMSFNCGraphicsColor);\r\n procedure SetScrollButtonLeftDownFill(const Value: TTMSFNCGraphicsFill);\r\n procedure SetScrollButtonLeftDownStroke(const Value: TTMSFNCGraphicsStroke);\r\n procedure SetScrollButtonLeftFill(const Value: TTMSFNCGraphicsFill);\r\n procedure SetScrollButtonLeftHoverFill(const Value: TTMSFNCGraphicsFill);\r\n procedure SetScrollButtonLeftHoverStroke(\r\n const Value: TTMSFNCGraphicsStroke);\r\n procedure SetScrollButtonLeftStroke(const Value: TTMSFNCGraphicsStroke);\r\n procedure SetScrollButtonRightDownFill(const Value: TTMSFNCGraphicsFill);\r\n procedure SetScrollButtonRightDownStroke(\r\n const Value: TTMSFNCGraphicsStroke);\r\n procedure SetScrollButtonRightFill(const Value: TTMSFNCGraphicsFill);\r\n procedure SetScrollButtonRightHoverFill(const Value: TTMSFNCGraphicsFill);\r\n procedure SetScrollButtonRightHoverStroke(\r\n const Value: TTMSFNCGraphicsStroke);\r\n procedure SetScrollButtonRightStroke(const Value: TTMSFNCGraphicsStroke);\r\n procedure SetScrollButtonSize(const Value: Single);\r\n procedure SetThumbButtonLeftDownFill(const Value: TTMSFNCGraphicsFill);\r\n procedure SetThumbButtonLeftDownStroke(const Value: TTMSFNCGraphicsStroke);\r\n procedure SetThumbButtonLeftFill(const Value: TTMSFNCGraphicsFill);\r\n procedure SetThumbButtonLeftHoverFill(const Value: TTMSFNCGraphicsFill);\r\n procedure SetThumbButtonLeftHoverStroke(const Value: TTMSFNCGraphicsStroke);\r\n procedure SetThumbButtonLeftStroke(const Value: TTMSFNCGraphicsStroke);\r\n procedure SetThumbButtonRightDownFill(const Value: TTMSFNCGraphicsFill);\r\n procedure SetThumbButtonRightDownStroke(const Value: TTMSFNCGraphicsStroke);\r\n procedure SetThumbButtonRightFill(const Value: TTMSFNCGraphicsFill);\r\n procedure SetThumbButtonRightHoverFill(const Value: TTMSFNCGraphicsFill);\r\n procedure SetThumbButtonRightHoverStroke(\r\n const Value: TTMSFNCGraphicsStroke);\r\n procedure SetThumbButtonRightStroke(const Value: TTMSFNCGraphicsStroke);\r\n procedure SetThumbFill(const Value: TTMSFNCGraphicsFill);\r\n procedure SetThumbStroke(const Value: TTMSFNCGraphicsStroke);\r\n function IsScrollButtonSizeStored: Boolean;\r\n function IsThumbButtonSizeStored: Boolean;\r\n protected\r\n procedure Changed;\r\n procedure FillChanged(Sender: TObject);\r\n procedure StrokeChanged(Sender: TObject);\r\n public\r\n constructor Create(AOwner: TTMSFNCCustomScrollBar);\r\n destructor Destroy; override;\r\n procedure Assign(Source: TPersistent); override;\r\n function GetThumbButtonSize: Single;\r\n published\r\n property ThumbFill: TTMSFNCGraphicsFill read FThumbFill write SetThumbFill;\r\n property ScrollButtonLeftFill: TTMSFNCGraphicsFill read FScrollButtonLeftFill write SetScrollButtonLeftFill;\r\n property ScrollButtonRightFill: TTMSFNCGraphicsFill read FScrollButtonRightFill write SetScrollButtonRightFill;\r\n property ScrollButtonLeftHoverFill: TTMSFNCGraphicsFill read FScrollButtonLeftHoverFill write SetScrollButtonLeftHoverFill;\r\n property ScrollButtonRightHoverFill: TTMSFNCGraphicsFill read FScrollButtonRightHoverFill write SetScrollButtonRightHoverFill;\r\n property ScrollButtonLeftDownFill: TTMSFNCGraphicsFill read FScrollButtonLeftDownFill write SetScrollButtonLeftDownFill;\r\n property ScrollButtonRightDownFill: TTMSFNCGraphicsFill read FScrollButtonRightDownFill write SetScrollButtonRightDownFill;\r\n property ThumbButtonLeftFill: TTMSFNCGraphicsFill read FThumbButtonLeftFill write SetThumbButtonLeftFill;\r\n property ThumbButtonRightFill: TTMSFNCGraphicsFill read FThumbButtonRightFill write SetThumbButtonRightFill;\r\n property ThumbButtonLeftHoverFill: TTMSFNCGraphicsFill read FThumbButtonLeftHoverFill write SetThumbButtonLeftHoverFill;\r\n property ThumbButtonRightHoverFill: TTMSFNCGraphicsFill read FThumbButtonRightHoverFill write SetThumbButtonRightHoverFill;\r\n property ThumbButtonLeftDownFill: TTMSFNCGraphicsFill read FThumbButtonLeftDownFill write SetThumbButtonLeftDownFill;\r\n property ThumbButtonRightDownFill: TTMSFNCGraphicsFill read FThumbButtonRightDownFill write SetThumbButtonRightDownFill;\r\n property ThumbStroke: TTMSFNCGraphicsStroke read FThumbStroke write SetThumbStroke;\r\n property ScrollButtonLeftStroke: TTMSFNCGraphicsStroke read FScrollButtonLeftStroke write SetScrollButtonLeftStroke;\r\n property ScrollButtonRightStroke: TTMSFNCGraphicsStroke read FScrollButtonRightStroke write SetScrollButtonRightStroke;\r\n property ScrollButtonLeftHoverStroke: TTMSFNCGraphicsStroke read FScrollButtonLeftHoverStroke write SetScrollButtonLeftHoverStroke;\r\n property ScrollButtonRightHoverStroke: TTMSFNCGraphicsStroke read FScrollButtonRightHoverStroke write SetScrollButtonRightHoverStroke;\r\n property ScrollButtonLeftDownStroke: TTMSFNCGraphicsStroke read FScrollButtonLeftDownStroke write SetScrollButtonLeftDownStroke;\r\n property ScrollButtonRightDownStroke: TTMSFNCGraphicsStroke read FScrollButtonRightDownStroke write SetScrollButtonRightDownStroke;\r\n property ThumbButtonLeftStroke: TTMSFNCGraphicsStroke read FThumbButtonLeftStroke write SetThumbButtonLeftStroke;\r\n property ThumbButtonRightStroke: TTMSFNCGraphicsStroke read FThumbButtonRightStroke write SetThumbButtonRightStroke;\r\n property ThumbButtonLeftHoverStroke: TTMSFNCGraphicsStroke read FThumbButtonLeftHoverStroke write SetThumbButtonLeftHoverStroke;\r\n property ThumbButtonRightHoverStroke: TTMSFNCGraphicsStroke read FThumbButtonRightHoverStroke write SetThumbButtonRightHoverStroke;\r\n property ThumbButtonLeftDownStroke: TTMSFNCGraphicsStroke read FThumbButtonLeftDownStroke write SetThumbButtonLeftDownStroke;\r\n property ThumbButtonRightDownStroke: TTMSFNCGraphicsStroke read FThumbButtonRightDownStroke write SetThumbButtonRightDownStroke;\r\n property ThumbButtonSize: Single read FThumbButtonSize write SetThumbButtonSize stored IsThumbButtonSizeStored nodefault;\r\n property ScrollButtonSize: Single read FScrollButtonSize write SetScrollButtonSize stored IsScrollButtonSizeStored nodefault;\r\n property FixedThumb: Boolean read FFixedThumb write SetFixedThumb default False;\r\n property ArrowColor: TTMSFNCGraphicsColor read FArrowColor write SetArrowColor default gcBlack;\r\n property OnChange: TNotifyEvent read FOnChange write FOnChange;\r\n end;\r\n\r\n TTMSFNCScrollBarMode = (sbmNone, sbmScroll, sbmChangePageSize);\r\n\r\n TTMSFNCScrollBarHoveredButton = (shbNone, shbScrollMin, shbScrollMax, shbThumbMin, shbThumbMax);\r\n\r\n TTMSFNCScrollBarDownButton = (sdbNone, sdbScrollMin, sdbScrollMax, sdbThumbMin, sdbThumbMax);\r\n\r\n TTMSFNCScrollButtonChange = (sbcNone, sbcSmallSubstract, sbcSmallAdd, sbcLargeSubstract, sbcLargeAdd);\r\n\r\n TTMSFNCScrollBarValueChanged = procedure(Sender: TObject; Value: Double) of object;\r\n\r\n TTMSFNCScrollBarPageSizeChanged = procedure(Sender: TObject; PageSize: Double) of object;\r\n\r\n TTMSFNCScrollBarKind = (sbkHorizontal, sbkVertical);\r\n\r\n TTMSFNCCustomScrollBar = class(TTMSFNCCustomControl)\r\n private\r\n FBlockChange: Boolean;\r\n FNeedsChange: Boolean;\r\n FSavedPageSize: Double;\r\n FDesignTime, FMinThumb, FMaxThumb: Boolean;\r\n FMx, FMy, FCx, FCy: Double;\r\n FTimer: TTimer;\r\n FTime: integer;\r\n FScrollBarMode: TTMSFNCScrollBarMode;\r\n FScrollButtonChange: TTMSFNCScrollButtonChange;\r\n FHoveredButton: TTMSFNCScrollBarHoveredButton;\r\n FDownButton: TTMSFNCScrollBarDownButton;\r\n FKind: TTMSFNCScrollBarKind;\r\n FValue, FTempValue: Double;\r\n FMin: Double;\r\n FMax: Double;\r\n FPageSize: Double;\r\n FSmallChange: Double;\r\n FLargeChange: Double;\r\n FAppearance: TTMSFNCScrollBarAppearance;\r\n FOnValueChange: TTMSFNCScrollBarValueChanged;\r\n FOnPageSizeChanged: TTMSFNCScrollBarPageSizeChanged;\r\n FTracking: Boolean;\r\n procedure SetAppearance(const Value: TTMSFNCScrollBarAppearance);\r\n procedure SetKind(Value: TTMSFNCScrollBarKind);\r\n procedure SetMax(const Value: Double);\r\n procedure SetMin(const Value: Double);\r\n procedure SetValue(const Value: Double);\r\n procedure SetPageSize(const Value: Double);\r\n function IsLargeChangeStored: Boolean;\r\n function IsMaxStored: Boolean;\r\n function IsMinStored: Boolean;\r\n function IsPageSizeStored: Boolean;\r\n function IsSmallChangeStored: Boolean;\r\n function IsValueStored: Boolean;\r\n procedure SetTracking(const Value: Boolean);\r\n protected\r\n procedure ChangeDPIScale(M, D: Integer); override;\r\n procedure ApplyStyle; override;\r\n procedure ResetToDefaultStyle; override;\r\n procedure HandleKeyDown(var Key: Word; Shift: TShiftState); override;\r\n procedure HandleMouseDown(Button: TMouseButton; Shift: TShiftState; X, Y: Single); override;\r\n procedure HandleMouseMove(Shift: TShiftState; X, Y: Single); override;\r\n procedure HandleMouseUp(Button: TMouseButton; Shift: TShiftState; X, Y: Single); override;\r\n procedure HandleMouseLeave; override;\r\n procedure HandleMouseEnter; override;\r\n procedure HandleMouseWheel(Shift: TShiftState; WheelDelta: Integer; var Handled: Boolean); override;\r\n procedure Changed;\r\n procedure AppearanceChanged(Sender: TObject);\r\n procedure TimerChanged(Sender: TObject);\r\n function GetCalculationRect: TRectF; virtual;\r\n function GetDocURL: string; override;\r\n function GetMinScrollButton: TRectF;\r\n function GetMaxScrollButton: TRectF;\r\n function GetMinThumbButton: TRectF;\r\n function GetMaxThumbButton: TRectF;\r\n function GetScrollRectangle: TRectF;\r\n function GetScrollSize: Double;\r\n function GetScrollAreaMin: TRectF;\r\n function GetScrollAreaMax: TRectF;\r\n function GetThumbRectangle: TRectF;\r\n function GetValue: Double; overload;\r\n function GetValue(XYPos: Double): Double; overload;\r\n function GetRange: Double;\r\n function MouseOnThumbButtons(X, Y: Double): Boolean;\r\n function MouseOnThumb(X, Y: Double): Boolean;\r\n procedure DrawScrollButtons(g: TTMSFNCGraphics);\r\n procedure DrawThumb(g: TTMSFNCGraphics);\r\n procedure DrawThumbButtons(g: TTMSFNCGraphics);\r\n procedure DrawArrow(g: TTMSFNCGraphics; r: TRectF; ALeft: Boolean);\r\n procedure Draw(AGraphics: TTMSFNCGraphics; ARect: TRectF); override;\r\n property Appearance: TTMSFNCScrollBarAppearance read FAppearance write SetAppearance;\r\n property Kind: TTMSFNCScrollBarKind read FKind write SetKind default sbkVertical;\r\n property LargeChange: Double read FLargeChange write FLargeChange stored IsLargeChangeStored nodefault;\r\n property Max: Double read FMax write SetMax stored IsMaxStored nodefault;\r\n property Min: Double read FMin write SetMin stored IsMinStored nodefault;\r\n property PageSize: Double read FPageSize write SetPageSize stored IsPageSizeStored nodefault;\r\n property Value: Double read FValue write SetValue stored IsValueStored nodefault;\r\n property SmallChange: Double read FSmallChange write FSmallChange stored IsSmallChangeStored nodefault;\r\n property Tracking: Boolean read FTracking write SetTracking default True;\r\n property OnValueChanged: TTMSFNCScrollBarValueChanged read FOnValueChange write FOnValueChange;\r\n property OnPageSizeChanged: TTMSFNCScrollBarPageSizeChanged read FOnPageSizeChanged write FOnPageSizeChanged;\r\n public\r\n constructor Create(AOwner: TComponent); override;\r\n destructor Destroy; override;\r\n procedure Assign(Source: TPersistent); override;\r\n end;\r\n\r\n {$IFNDEF LCLLIB}\r\n [ComponentPlatformsAttribute(TMSPlatformsWeb)]\r\n {$ENDIF}\r\n TTMSFNCScrollBar = class(TTMSFNCCustomScrollBar)\r\n protected\r\n procedure RegisterRuntimeClasses; override;\r\n published\r\n property Fill;\r\n property Stroke;\r\n property Appearance;\r\n property Kind;\r\n property LargeChange;\r\n property Max;\r\n property Tracking;\r\n property Min;\r\n property PageSize;\r\n property Value;\r\n property SmallChange;\r\n property OnValueChanged;\r\n property OnPageSizeChanged;\r\n end;\r\n\r\nimplementation\r\n\r\nuses\r\n Math, SysUtils, WEBLib.TMSFNCStyles, WEBLib.TMSFNCUtils;\r\n\r\n{ TTMSFNCScrollBarAppearance }\r\n\r\nprocedure TTMSFNCScrollBarAppearance.Assign(Source: TPersistent);\r\nbegin\r\n if (Source is TTMSFNCScrollBarAppearance) then\r\n begin\r\n FThumbFill.Assign((Source as TTMSFNCScrollBarAppearance).ThumbFill);\r\n FScrollButtonSize := (Source as TTMSFNCScrollBarAppearance).ScrollButtonSize;\r\n FThumbButtonSize := (Source as TTMSFNCScrollBarAppearance).ThumbButtonSize;\r\n FThumbStroke.Assign((Source as TTMSFNCScrollBarAppearance).ThumbStroke);\r\n FThumbButtonLeftFill.Assign((Source as TTMSFNCScrollBarAppearance).ThumbButtonLeftFill);\r\n FThumbButtonLeftHoverFill.Assign((Source as TTMSFNCScrollBarAppearance).ThumbButtonLeftHoverFill);\r\n FThumbButtonLeftDownFill.Assign((Source as TTMSFNCScrollBarAppearance).ThumbButtonLeftDownFill);\r\n FThumbButtonRightFill.Assign((Source as TTMSFNCScrollBarAppearance).ThumbButtonRightFill);\r\n FThumbButtonRightDownFill.Assign((Source as TTMSFNCScrollBarAppearance).ThumbButtonRightDownFill);\r\n FThumbButtonRightHoverFill.Assign((Source as TTMSFNCScrollBarAppearance).ThumbButtonRightHoverFill);\r\n FScrollButtonLeftFill.Assign((Source as TTMSFNCScrollBarAppearance).ScrollButtonLeftFill);\r\n FScrollButtonLeftHoverFill.Assign((Source as TTMSFNCScrollBarAppearance).ScrollButtonLeftHoverFill);\r\n FScrollButtonLeftDownFill.Assign((Source as TTMSFNCScrollBarAppearance).ScrollButtonLeftDownFill);\r\n FScrollButtonRightFill.Assign((Source as TTMSFNCScrollBarAppearance).ScrollButtonRightFill);\r\n FScrollButtonRightDownFill.Assign((Source as TTMSFNCScrollBarAppearance).ScrollButtonRightDownFill);\r\n FScrollButtonRightHoverFill.Assign((Source as TTMSFNCScrollBarAppearance).ScrollButtonRightHoverFill);\r\n FThumbButtonLeftStroke.Assign((Source as TTMSFNCScrollBarAppearance).ThumbButtonLeftStroke);\r\n FThumbButtonLeftHoverStroke.Assign((Source as TTMSFNCScrollBarAppearance).ThumbButtonLeftHoverStroke);\r\n FThumbButtonLeftDownStroke.Assign((Source as TTMSFNCScrollBarAppearance).ThumbButtonLeftDownStroke);\r\n FThumbButtonRightStroke.Assign((Source as TTMSFNCScrollBarAppearance).ThumbButtonRightStroke);\r\n FThumbButtonRightDownStroke.Assign((Source as TTMSFNCScrollBarAppearance).ThumbButtonRightDownStroke);\r\n FThumbButtonRightHoverStroke.Assign((Source as TTMSFNCScrollBarAppearance).ThumbButtonRightHoverStroke);\r\n FScrollButtonLeftStroke.Assign((Source as TTMSFNCScrollBarAppearance).ScrollButtonLeftStroke);\r\n FScrollButtonLeftHoverStroke.Assign((Source as TTMSFNCScrollBarAppearance).ScrollButtonLeftHoverStroke);\r\n FScrollButtonLeftDownStroke.Assign((Source as TTMSFNCScrollBarAppearance).ScrollButtonLeftDownStroke);\r\n FScrollButtonRightStroke.Assign((Source as TTMSFNCScrollBarAppearance).ScrollButtonRightStroke);\r\n FScrollButtonRightDownStroke.Assign((Source as TTMSFNCScrollBarAppearance).ScrollButtonRightDownStroke);\r\n FScrollButtonRightHoverStroke.Assign((Source as TTMSFNCScrollBarAppearance).ScrollButtonRightHoverStroke);\r\n Changed;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCScrollBarAppearance.Changed;\r\nbegin\r\n FOwner.Changed;\r\nend;\r\n\r\nconstructor TTMSFNCScrollBarAppearance.Create(AOwner: TTMSFNCCustomScrollBar);\r\nbegin\r\n FOwner := AOwner;\r\n FThumbFill := TTMSFNCGraphicsFill.Create(gfkSolid, MakeGraphicsColor(225, 225, 225));\r\n FThumbFill.OnChanged := @FillChanged;\r\n FThumbButtonLeftFill := TTMSFNCGraphicsFill.Create(gfkSolid, MakeGraphicsColor(225, 225, 225));\r\n FThumbButtonLeftFill.OnChanged := @FillChanged;\r\n FThumbButtonRightFill := TTMSFNCGraphicsFill.Create(gfkSolid, MakeGraphicsColor(225, 225, 225));\r\n FThumbButtonRightFill.OnChanged := @FillChanged;\r\n FThumbButtonLeftHoverFill := TTMSFNCGraphicsFill.Create(gfkSolid, MakeGraphicsColor(229, 241, 251));\r\n FThumbButtonLeftHoverFill.OnChanged := @FillChanged;\r\n FThumbButtonRightHoverFill := TTMSFNCGraphicsFill.Create(gfkSolid, MakeGraphicsColor(229, 241, 251));\r\n FThumbButtonRightHoverFill.OnChanged := @FillChanged;\r\n FThumbButtonLeftDownFill := TTMSFNCGraphicsFill.Create(gfkSolid, Darker(MakeGraphicsColor(229, 241, 251), 40));\r\n FThumbButtonLeftDownFill.OnChanged := @FillChanged;\r\n FThumbButtonRightDownFill := TTMSFNCGraphicsFill.Create(gfkSolid, Darker(MakeGraphicsColor(229, 241, 251), 40));\r\n FThumbButtonRightDownFill.OnChanged := @FillChanged;\r\n\r\n FScrollButtonLeftFill := TTMSFNCGraphicsFill.Create(gfkSolid, MakeGraphicsColor(225, 225, 225));\r\n FScrollButtonLeftFill.OnChanged := @FillChanged;\r\n FScrollButtonRightFill := TTMSFNCGraphicsFill.Create(gfkSolid, MakeGraphicsColor(225, 225, 225));\r\n FScrollButtonRightFill.OnChanged := @FillChanged;\r\n FScrollButtonLeftHoverFill := TTMSFNCGraphicsFill.Create(gfkSolid, MakeGraphicsColor(229, 241, 251));\r\n FScrollButtonLeftHoverFill.OnChanged := @FillChanged;\r\n FScrollButtonRightHoverFill := TTMSFNCGraphicsFill.Create(gfkSolid, MakeGraphicsColor(229, 241, 251));\r\n FScrollButtonRightHoverFill.OnChanged := @FillChanged;\r\n FScrollButtonLeftDownFill := TTMSFNCGraphicsFill.Create(gfkSolid, Darker(MakeGraphicsColor(229, 241, 251), 40));\r\n FScrollButtonLeftDownFill.OnChanged := @FillChanged;\r\n FScrollButtonRightDownFill := TTMSFNCGraphicsFill.Create(gfkSolid, Darker(MakeGraphicsColor(229, 241, 251), 40));\r\n FScrollButtonRightDownFill.OnChanged := @FillChanged;\r\n\r\n FThumbStroke := TTMSFNCGraphicsStroke.Create(gskSolid, Darker(gcDarkGray, 40));\r\n FThumbStroke.OnChanged := @StrokeChanged;\r\n FThumbButtonLeftStroke := TTMSFNCGraphicsStroke.Create(gskSolid, Darker(gcDarkGray, 40));\r\n FThumbButtonLeftStroke.OnChanged := @StrokeChanged;\r\n FThumbButtonRightStroke := TTMSFNCGraphicsStroke.Create(gskSolid, Darker(gcDarkGray, 40));\r\n FThumbButtonRightStroke.OnChanged := @StrokeChanged;\r\n FThumbButtonLeftHoverStroke := TTMSFNCGraphicsStroke.Create(gskSolid, MakeGraphicsColor(60, 127, 177));\r\n FThumbButtonLeftHoverStroke.OnChanged := @StrokeChanged;\r\n FThumbButtonRightHoverStroke := TTMSFNCGraphicsStroke.Create(gskSolid, MakeGraphicsColor(60, 127, 177));\r\n FThumbButtonRightHoverStroke.OnChanged := @StrokeChanged;\r\n FThumbButtonLeftDownStroke := TTMSFNCGraphicsStroke.Create(gskSolid, MakeGraphicsColor(60, 127, 177));\r\n FThumbButtonLeftDownStroke.OnChanged := @StrokeChanged;\r\n FThumbButtonRightDownStroke := TTMSFNCGraphicsStroke.Create(gskSolid, MakeGraphicsColor(60, 127, 177));\r\n FThumbButtonRightDownStroke.OnChanged := @StrokeChanged;\r\n\r\n FScrollButtonLeftStroke := TTMSFNCGraphicsStroke.Create(gskSolid, Darker(gcDarkGray, 40));\r\n FScrollButtonLeftStroke.OnChanged := @StrokeChanged;\r\n FScrollButtonRightStroke := TTMSFNCGraphicsStroke.Create(gskSolid, Darker(gcDarkGray, 40));\r\n FScrollButtonRightStroke.OnChanged := @StrokeChanged;\r\n FScrollButtonLeftHoverStroke := TTMSFNCGraphicsStroke.Create(gskSolid, MakeGraphicsColor(60, 127, 177));\r\n FScrollButtonLeftHoverStroke.OnChanged := @StrokeChanged;\r\n FScrollButtonRightHoverStroke := TTMSFNCGraphicsStroke.Create(gskSolid, MakeGraphicsColor(60, 127, 177));\r\n FScrollButtonRightHoverStroke.OnChanged := @StrokeChanged;\r\n FScrollButtonLeftDownStroke := TTMSFNCGraphicsStroke.Create(gskSolid, MakeGraphicsColor(60, 127, 177));\r\n FScrollButtonLeftDownStroke.OnChanged := @StrokeChanged;\r\n FScrollButtonRightDownStroke := TTMSFNCGraphicsStroke.Create(gskSolid, MakeGraphicsColor(60, 127, 177));\r\n FScrollButtonRightDownStroke.OnChanged := @StrokeChanged;\r\n\r\n FArrowColor := gcBlack;\r\n\r\n FFixedThumb := False;\r\n FThumbButtonSize := 18;\r\n FScrollButtonSize := 18;\r\nend;\r\n\r\ndestructor TTMSFNCScrollBarAppearance.Destroy;\r\nbegin\r\n FThumbFill.Free;\r\n FScrollButtonLeftFill.Free;\r\n FScrollButtonRightFill.Free;\r\n FScrollButtonLeftHoverFill.Free;\r\n FScrollButtonRightHoverFill.Free;\r\n FScrollButtonLeftDownFill.Free;\r\n FScrollButtonRightDownFill.Free;\r\n FThumbButtonLeftFill.Free;\r\n FThumbButtonRightFill.Free;\r\n FThumbButtonLeftHoverFill.Free;\r\n FThumbButtonRightHoverFill.Free;\r\n FThumbButtonLeftDownFill.Free;\r\n FThumbButtonRightDownFill.Free;\r\n FThumbStroke.Free;\r\n FScrollButtonLeftStroke.Free;\r\n FScrollButtonRightStroke.Free;\r\n FScrollButtonLeftHoverStroke.Free;\r\n FScrollButtonRightHoverStroke.Free;\r\n FScrollButtonLeftDownStroke.Free;\r\n FScrollButtonRightDownStroke.Free;\r\n FThumbButtonLeftStroke.Free;\r\n FThumbButtonRightStroke.Free;\r\n FThumbButtonLeftHoverStroke.Free;\r\n FThumbButtonRightHoverStroke.Free;\r\n FThumbButtonLeftDownStroke.Free;\r\n FThumbButtonRightDownStroke.Free;\r\n inherited;\r\nend;\r\n\r\nprocedure TTMSFNCScrollBarAppearance.FillChanged(Sender: TObject);\r\nbegin\r\n Changed;\r\nend;\r\n\r\nfunction TTMSFNCScrollBarAppearance.GetThumbButtonSize: Single;\r\nbegin\r\n if FixedThumb then\r\n Result := 0\r\n else\r\n Result := ThumbButtonSize;\r\nend;\r\n\r\nfunction TTMSFNCScrollBarAppearance.IsScrollButtonSizeStored: Boolean;\r\nbegin\r\n Result := ScrollButtonSize <> 18;\r\nend;\r\n\r\nfunction TTMSFNCScrollBarAppearance.IsThumbButtonSizeStored: Boolean;\r\nbegin\r\n Result := ThumbButtonSize <> 18;\r\nend;\r\n\r\nprocedure TTMSFNCScrollBarAppearance.SetArrowColor(const Value: TTMSFNCGraphicsColor);\r\nbegin\r\n if FArrowColor <> Value then\r\n begin\r\n FArrowColor := Value;\r\n Changed;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCScrollBarAppearance.SetFixedThumb(const Value: Boolean);\r\nbegin\r\n if FFixedThumb <> value then\r\n begin\r\n FFixedThumb := Value;\r\n Changed;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCScrollBarAppearance.SetScrollButtonLeftDownFill(\r\n const Value: TTMSFNCGraphicsFill);\r\nbegin\r\n FScrollButtonLeftDownFill.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCScrollBarAppearance.SetScrollButtonLeftDownStroke(\r\n const Value: TTMSFNCGraphicsStroke);\r\nbegin\r\n FScrollButtonLeftDownStroke.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCScrollBarAppearance.SetScrollButtonLeftFill(\r\n const Value: TTMSFNCGraphicsFill);\r\nbegin\r\n FScrollButtonLeftFill.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCScrollBarAppearance.SetScrollButtonLeftHoverFill(\r\n const Value: TTMSFNCGraphicsFill);\r\nbegin\r\n FScrollButtonLeftHoverFill.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCScrollBarAppearance.SetScrollButtonLeftHoverStroke(\r\n const Value: TTMSFNCGraphicsStroke);\r\nbegin\r\n FScrollButtonLeftHoverStroke.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCScrollBarAppearance.SetScrollButtonLeftStroke(\r\n const Value: TTMSFNCGraphicsStroke);\r\nbegin\r\n FScrollButtonLeftStroke.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCScrollBarAppearance.SetScrollButtonRightDownFill(\r\n const Value: TTMSFNCGraphicsFill);\r\nbegin\r\n FScrollButtonRightDownFill.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCScrollBarAppearance.SetScrollButtonRightDownStroke(\r\n const Value: TTMSFNCGraphicsStroke);\r\nbegin\r\n FScrollButtonRightDownStroke.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCScrollBarAppearance.SetScrollButtonRightFill(\r\n const Value: TTMSFNCGraphicsFill);\r\nbegin\r\n FScrollButtonRightFill.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCScrollBarAppearance.SetScrollButtonRightHoverFill(\r\n const Value: TTMSFNCGraphicsFill);\r\nbegin\r\n FScrollButtonRightHoverFill.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCScrollBarAppearance.SetScrollButtonRightHoverStroke(\r\n const Value: TTMSFNCGraphicsStroke);\r\nbegin\r\n FScrollButtonRightHoverStroke.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCScrollBarAppearance.SetScrollButtonRightStroke(\r\n const Value: TTMSFNCGraphicsStroke);\r\nbegin\r\n FScrollButtonRightStroke.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCScrollBarAppearance.SetScrollButtonSize(const Value: Single);\r\nbegin\r\n if FScrollButtonSize <> Value then\r\n begin\r\n FScrollButtonSize := Value;\r\n Changed;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCScrollBarAppearance.SetThumbButtonLeftDownFill(\r\n const Value: TTMSFNCGraphicsFill);\r\nbegin\r\n FThumbButtonLeftDownFill.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCScrollBarAppearance.SetThumbButtonLeftDownStroke(\r\n const Value: TTMSFNCGraphicsStroke);\r\nbegin\r\n FThumbButtonLeftDownStroke.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCScrollBarAppearance.SetThumbButtonLeftFill(\r\n const Value: TTMSFNCGraphicsFill);\r\nbegin\r\n FThumbButtonLeftFill.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCScrollBarAppearance.SetThumbButtonLeftHoverFill(\r\n const Value: TTMSFNCGraphicsFill);\r\nbegin\r\n FThumbButtonLeftHoverFill.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCScrollBarAppearance.SetThumbButtonLeftHoverStroke(\r\n const Value: TTMSFNCGraphicsStroke);\r\nbegin\r\n FThumbButtonLeftHoverStroke.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCScrollBarAppearance.SetThumbButtonLeftStroke(\r\n const Value: TTMSFNCGraphicsStroke);\r\nbegin\r\n FThumbButtonLeftStroke.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCScrollBarAppearance.SetThumbButtonRightDownFill(\r\n const Value: TTMSFNCGraphicsFill);\r\nbegin\r\n FThumbButtonRightDownFill.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCScrollBarAppearance.SetThumbButtonRightDownStroke(\r\n const Value: TTMSFNCGraphicsStroke);\r\nbegin\r\n FThumbButtonRightDownStroke.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCScrollBarAppearance.SetThumbButtonRightFill(\r\n const Value: TTMSFNCGraphicsFill);\r\nbegin\r\n FThumbButtonRightFill.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCScrollBarAppearance.SetThumbButtonRightHoverFill(\r\n const Value: TTMSFNCGraphicsFill);\r\nbegin\r\n FThumbButtonRightHoverFill.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCScrollBarAppearance.SetThumbButtonRightHoverStroke(\r\n const Value: TTMSFNCGraphicsStroke);\r\nbegin\r\n FThumbButtonRightHoverStroke.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCScrollBarAppearance.SetThumbButtonRightStroke(\r\n const Value: TTMSFNCGraphicsStroke);\r\nbegin\r\n FThumbButtonRightStroke.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCScrollBarAppearance.SetThumbButtonSize(\r\n const Value: Single);\r\nbegin\r\n if FThumbButtonSize <> value then\r\n begin\r\n FThumbButtonSize := Value;\r\n Changed;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCScrollBarAppearance.SetThumbFill(\r\n const Value: TTMSFNCGraphicsFill);\r\nbegin\r\n FThumbFill.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCScrollBarAppearance.SetThumbStroke(\r\n const Value: TTMSFNCGraphicsStroke);\r\nbegin\r\n FThumbStroke.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCScrollBarAppearance.StrokeChanged(Sender: TObject);\r\nbegin\r\n Changed;\r\nend;\r\n\r\nprocedure TTMSFNCCustomScrollBar.AppearanceChanged(Sender: TObject);\r\nbegin\r\n Changed;\r\nend;\r\n\r\nprocedure TTMSFNCCustomScrollBar.ApplyStyle;\r\nvar\r\n c: TTMSFNCGraphicsColor;\r\nbegin\r\n inherited;\r\n\r\n c := gcNull;\r\n if TTMSFNCStyles.GetStyleBackgroundFillColor(c) then\r\n begin\r\n Appearance.ThumbFill.Color := c;\r\n Appearance.ThumbButtonLeftFill.Color := c;\r\n Appearance.ThumbButtonRightFill.Color := c;\r\n Appearance.ScrollButtonLeftFill.Color := c;\r\n Appearance.ScrollButtonRightFill.Color := c;\r\n end;\r\n\r\n c := gcNull;\r\n if TTMSFNCStyles.GetStyleLineFillColor(c) then\r\n begin\r\n Appearance.ThumbStroke.Color := c;\r\n Appearance.ThumbButtonLeftStroke.Color := c;\r\n Appearance.ThumbButtonRightStroke.Color := c;\r\n Appearance.ScrollButtonLeftStroke.Color := c;\r\n Appearance.ScrollButtonRightStroke.Color := c;\r\n Appearance.ThumbButtonLeftHoverStroke.Color := c;\r\n Appearance.ThumbButtonRightHoverStroke.Color := c;\r\n Appearance.ScrollButtonLeftHoverStroke.Color := c;\r\n Appearance.ScrollButtonRightHoverStroke.Color := c;\r\n Appearance.ThumbButtonLeftDownStroke.Color := c;\r\n Appearance.ThumbButtonRightDownStroke.Color := c;\r\n Appearance.ScrollButtonLeftDownStroke.Color := c;\r\n Appearance.ScrollButtonRightDownStroke.Color := c;\r\n end;\r\n\r\n c := gcNull;\r\n if TTMSFNCStyles.GetStyleSelectionFillColor(c) then\r\n begin\r\n Appearance.ThumbButtonLeftHoverFill.Color := Blend(Fill.Color, c, 70);\r\n Appearance.ThumbButtonRightHoverFill.Color := Blend(Fill.Color, c, 70);\r\n Appearance.ScrollButtonLeftHoverFill.Color := Blend(Fill.Color, c, 70);\r\n Appearance.ScrollButtonRightHoverFill.Color := Blend(Fill.Color, c, 70);\r\n Appearance.ThumbButtonLeftDownFill.Color := Blend(Fill.Color, c, 50);\r\n Appearance.ThumbButtonRightDownFill.Color := Blend(Fill.Color, c, 50);\r\n Appearance.ScrollButtonLeftDownFill.Color := Blend(Fill.Color, c, 50);\r\n Appearance.ScrollButtonRightDownFill.Color := Blend(Fill.Color, c, 50);\r\n Appearance.ArrowColor := c;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomScrollBar.Assign(Source: TPersistent);\r\nbegin\r\n if (Source is TTMSFNCScrollBar) then\r\n begin\r\n FKind := (Source as TTMSFNCScrollBar).Kind;\r\n FValue := (Source as TTMSFNCScrollBar).Value;\r\n FMin := (Source as TTMSFNCScrollBar).Min;\r\n FMax := (Source as TTMSFNCScrollBar).Max;\r\n FPageSize := (Source as TTMSFNCScrollBar).PageSize;\r\n FSmallChange := (Source as TTMSFNCScrollBar).SmallChange;\r\n FLargeChange := (Source as TTMSFNCScrollBar).LargeChange;\r\n FAppearance.Assign((Source as TTMSFNCScrollBar).Appearance);\r\n FTracking := (Source as TTMSFNCScrollBar).Tracking;\r\n Changed;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomScrollBar.Changed;\r\nbegin\r\n Invalidate;\r\nend;\r\n\r\nprocedure TTMSFNCCustomScrollBar.ChangeDPIScale(M, D: Integer);\r\nbegin\r\n inherited;\r\n BeginUpdate;\r\n\r\n FAppearance.FScrollButtonSize := TTMSFNCUtils.MulDivSingle(FAppearance.ScrollButtonSize, M, D);\r\n FAppearance.FThumbButtonSize := TTMSFNCUtils.MulDivSingle(FAppearance.FThumbButtonSize, M, D);\r\n\r\n EndUpdate;\r\nend;\r\n\r\nprocedure TTMSFNCCustomScrollBar.HandleMouseLeave;\r\nbegin\r\n inherited;\r\n FTimer.Enabled := false;\r\n FTime := 0;\r\n FScrollBarMode := sbmNone;\r\n FScrollButtonChange := sbcNone;\r\n FMinThumb := false;\r\n FMaxThumb := false;\r\n FDownButton := sdbNone;\r\n FHoveredButton := shbNone;\r\n Changed;\r\nend;\r\n\r\nconstructor TTMSFNCCustomScrollBar.Create(AOwner: TComponent);\r\nbegin\r\n inherited;\r\n\r\n {$IFDEF CMNLIB}\r\n {$IFDEF MSWINDOWS}\r\n NativeCanvas := True;\r\n {$ENDIF}\r\n {$ENDIF}\r\n\r\n FTracking := True;\r\n FDesignTime := IsDesignTime;\r\n if FDesignTime then\r\n begin\r\n Fill.Color := Lighter(MakeGraphicsColor(225, 225, 225), 40);\r\n Stroke.Color := Darker(gcDarkGray, 40);\r\n end;\r\n Height := 121;\r\n Width := 18;\r\n FKind := sbkVertical;\r\n FValue := 0;\r\n FMin := 0;\r\n FMax := 100;\r\n FSmallChange := 1;\r\n FLargeChange := 20;\r\n FAppearance := TTMSFNCScrollBarAppearance.Create(Self);\r\n FAppearance.OnChange := @AppearanceChanged;\r\n FPageSize := 20;\r\n {$IFDEF WEBLIB}\r\n FTimer := TTimer.Create(nil);\r\n {$ELSE}\r\n FTimer := TTimer.Create(Self);\r\n {$ENDIF}\r\n FTimer.OnTimer := TimerChanged;\r\n FTimer.Interval := 100;\r\nend;\r\n\r\ndestructor TTMSFNCCustomScrollBar.Destroy;\r\nbegin\r\n FAppearance.Free;\r\n FTimer.Free;\r\n inherited;\r\nend;\r\n\r\nprocedure TTMSFNCCustomScrollBar.DrawArrow(g: TTMSFNCGraphics; r: TRectF; ALeft: Boolean);\r\nbegin\r\n g.Stroke.Color := Appearance.ArrowColor;\r\n if Kind = sbkVertical then\r\n begin\r\n InflateRectEx(r, 0, -4);\r\n if not ALeft then\r\n begin\r\n g.DrawLine(PointF(r.Left + ((r.Right - R.Left) / 2), r.Top + ((r.Bottom - R.Top) / 3 * 2)), PointF(r.Left + ((r.Right - R.Left) / 3), r.Top + ((r.Bottom - R.Top) / 3)));\r\n g.DrawLine(PointF(r.Left + ((r.Right - R.Left) / 2), r.Top + ((r.Bottom - R.Top) / 3 * 2)), PointF(r.Left + ((r.Right - R.Left) / 3 * 2), r.Top + ((r.Bottom - R.Top) / 3)));\r\n end\r\n else\r\n begin\r\n g.DrawLine(PointF(r.Left + ((r.Right - R.Left) / 2), r.Top + ((r.Bottom - R.Top) / 3)), PointF(r.Left + ((r.Right - R.Left) / 3), r.Top + ((r.Bottom - R.Top) / 3 * 2)));\r\n g.DrawLine(PointF(r.Left + ((r.Right - R.Left) / 2), r.Top + ((r.Bottom - R.Top) / 3)), PointF(r.Left + ((r.Right - R.Left) / 3 * 2), r.Top + ((r.Bottom - R.Top) / 3 * 2)));\r\n end;\r\n end\r\n else\r\n begin\r\n InflateRectEx(r, -4, 0);\r\n if not ALeft then\r\n begin\r\n g.DrawLine(PointF(r.Left + ((r.Right - R.Left) / 3), r.Top + ((r.Bottom - R.Top) / 3)), PointF(r.Left + ((r.Right - R.Left) / 3 * 2), r.Top + ((r.Bottom - R.Top) / 2)));\r\n g.DrawLine(PointF(r.Left + ((r.Right - R.Left) / 3), r.Top + ((r.Bottom - R.Top) / 3 * 2)), PointF(r.Left + ((r.Right - R.Left) / 3 * 2), r.Top + ((r.Bottom - R.Top) / 2)));\r\n end\r\n else\r\n begin\r\n g.DrawLine(PointF(r.Left + ((r.Right - R.Left) / 3 * 2), r.Top + ((r.Bottom - R.Top) / 3)), PointF(r.Left + ((r.Right - R.Left) / 3), r.Top + ((r.Bottom - R.Top) / 2)));\r\n g.DrawLine(PointF(r.Left + ((r.Right - R.Left) / 3 * 2), r.Top + ((r.Bottom - R.Top) / 3 * 2)), PointF(r.Left + ((r.Right - R.Left) / 3), r.Top + ((r.Bottom - R.Top) / 2)));\r\n end;\r\n end;\r\nend;\r\n\r\n\r\nprocedure TTMSFNCCustomScrollBar.DrawScrollButtons(g: TTMSFNCGraphics);\r\nvar\r\n flmin, flmax: TTMSFNCGraphicsFill;\r\n stmin, stmax: TTMSFNCGraphicsStroke;\r\nbegin\r\n if Appearance.ScrollButtonSize <= 0 then\r\n Exit;\r\n\r\n flmin := Appearance.ScrollButtonLeftFill;\r\n flmax := Appearance.ScrollButtonRightFill;\r\n stmin := Appearance.ScrollButtonLeftStroke;\r\n stmax := Appearance.ScrollButtonRightStroke;\r\n\r\n if FDownButton = sdbScrollMin then\r\n begin\r\n flmin := Appearance.ScrollButtonLeftDownFill;\r\n stmin := Appearance.ScrollButtonLeftDownStroke;\r\n end\r\n else if FHoveredButton = shbScrollMin then\r\n begin\r\n flmin := Appearance.ScrollButtonLeftHoverFill;\r\n stmin := Appearance.ScrollButtonLeftHoverStroke;\r\n end;\r\n\r\n g.Fill.Assign(flmin);\r\n g.Stroke.Assign(stmin);\r\n g.DrawRectangle(GetMinScrollButton);\r\n\r\n if FDownButton = sdbScrollMax then\r\n begin\r\n flmax := Appearance.ScrollButtonRightDownFill;\r\n stmax := Appearance.ScrollButtonRightDownStroke;\r\n end\r\n else if FHoveredButton = shbScrollMax then\r\n begin\r\n flmax := Appearance.ScrollButtonRightHoverFill;\r\n stmax := Appearance.ScrollButtonRightHoverStroke;\r\n end;\r\n\r\n g.Fill.Assign(flmax);\r\n g.Stroke.Assign(stmax);\r\n g.DrawRectangle(GetMaxScrollButton);\r\n\r\n DrawArrow(g, GetMinScrollButton, true);\r\n DrawArrow(g, GetMaxScrollButton, false);\r\nend;\r\n\r\nprocedure TTMSFNCCustomScrollBar.DrawThumb(g: TTMSFNCGraphics);\r\nbegin\r\n g.Fill.Assign(Appearance.ThumbFill);\r\n g.Stroke.Assign(Appearance.ThumbStroke);\r\n g.DrawRectangle(GetThumbRectangle);\r\n if not Appearance.FixedThumb then\r\n DrawThumbButtons(g);\r\nend;\r\n\r\nprocedure TTMSFNCCustomScrollBar.DrawThumbButtons(g: TTMSFNCGraphics);\r\nvar\r\n flmin, flmax: TTMSFNCGraphicsFill;\r\n stmin, stmax: TTMSFNCGraphicsStroke;\r\nbegin\r\n if Appearance.ThumbButtonSize <= 0 then\r\n Exit;\r\n\r\n flmin := Appearance.ThumbButtonLeftFill;\r\n flmax := Appearance.ThumbButtonRightFill;\r\n stmin := Appearance.ThumbButtonLeftStroke;\r\n stmax := Appearance.ThumbButtonRightStroke;\r\n\r\n if FDownButton = sdbThumbMin then\r\n begin\r\n flmin := Appearance.ThumbButtonLeftDownFill;\r\n stmin := Appearance.ThumbButtonLeftDownStroke;\r\n end\r\n else if FHoveredButton = shbThumbMin then\r\n begin\r\n flmin := Appearance.ThumbButtonLeftHoverFill;\r\n stmin := Appearance.ThumbButtonLeftHoverStroke;\r\n end;\r\n\r\n g.Fill.Assign(flmin);\r\n g.Stroke.Assign(stmin);\r\n g.DrawRectangle(GetMinThumbButton);\r\n\r\n if FDownButton = sdbThumbMax then\r\n begin\r\n flmax := Appearance.ThumbButtonRightDownFill;\r\n stmax := Appearance.ThumbButtonRightDownStroke;\r\n end\r\n else if FHoveredButton = shbThumbMax then\r\n begin\r\n flmax := Appearance.ThumbButtonRightHoverFill;\r\n stmax := Appearance.ThumbButtonRightHoverStroke;\r\n end;\r\n\r\n g.Fill.Assign(flmax);\r\n g.Stroke.Assign(stmax);\r\n g.DrawRectangle(GetMaxThumbButton);\r\n\r\n DrawArrow(g, GetMinThumbButton, true);\r\n DrawArrow(g, GetMaxThumbButton, false);\r\nend;\r\n\r\nfunction TTMSFNCCustomScrollBar.GetDocURL: string;\r\nbegin\r\n Result := TTMSFNCBaseDocURL + 'tmsfncuipack';\r\nend;\r\n\r\nfunction TTMSFNCCustomScrollBar.GetCalculationRect: TRectF;\r\nbegin\r\n Result := LocalRect;\r\nend;\r\n\r\nfunction TTMSFNCCustomScrollBar.GetMaxScrollButton: TRectF;\r\nvar\r\n r: TRectF;\r\nbegin\r\n r := GetCalculationRect;\r\n case Kind of\r\n sbkHorizontal: Result := MakeRectF(r.Right - Appearance.ScrollButtonSize, r.Top, Appearance.ScrollButtonSize, r.Bottom - r.Top);\r\n sbkVertical: Result := MakeRectF(r.Left, r.Bottom - Appearance.ScrollButtonSize, r.Right - r.Left, Appearance.ScrollButtonSize);\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCCustomScrollBar.GetMaxThumbButton: TRectF;\r\nvar\r\n r: TRectF;\r\nbegin\r\n r := GetThumbRectangle;\r\n case Kind of\r\n sbkHorizontal: Result := MakeRectF(r.Left + (r.Right - R.Left) - Appearance.GetThumbButtonSize, r.Top, Appearance.GetThumbButtonSize, (r.Bottom - R.Top));\r\n sbkVertical: Result := MakeRectF(r.Left, r.Top + (r.Bottom - R.Top) - Appearance.GetThumbButtonSize, (r.Right - R.Left), Appearance.GetThumbButtonSize);\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCCustomScrollBar.GetMinScrollButton: TRectF;\r\nvar\r\n r: TRectF;\r\nbegin\r\n r := GetCalculationRect;\r\n case Kind of\r\n sbkHorizontal: Result := MakeRectF(r.Left, r.Top, Appearance.ScrollButtonSize, r.Bottom - r.Top);\r\n sbkVertical: Result := MakeRectF(r.Left, r.Top, r.Right - r.Left, Appearance.ScrollButtonSize);\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCCustomScrollBar.GetMinThumbButton: TRectF;\r\nvar\r\n r: TRectF;\r\nbegin\r\n r := GetThumbRectangle;\r\n case Kind of\r\n sbkHorizontal: Result := MakeRectF(r.Left, r.Top, Appearance.GetThumbButtonSize, (r.Bottom - R.Top));\r\n sbkVertical: Result := MakeRectF(r.Left, r.Top, (r.Right - R.Left), Appearance.GetThumbButtonSize);\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCCustomScrollBar.GetValue(XYPos: Double): Double;\r\nvar\r\n v, s: Double;\r\n scr: TRectF;\r\nbegin\r\n scr := GetScrollRectangle;\r\n case Kind of\r\n sbkHorizontal: s := (scr.Right - scr.Left) - Math.Max(Appearance.GetThumbButtonSize * 2 + 10, ((scr.Right - scr.Left) / GetRange * PageSize));\r\n sbkVertical: s := (scr.Bottom - scr.Top) - Math.Max(Appearance.GetThumbButtonSize * 2 + 10, ((scr.Bottom - scr.Top) / GetRange * PageSize));\r\n else\r\n s := 0;\r\n end;\r\n\r\n if (max - min > 0) and (s > 0) then\r\n begin\r\n v := (XYPos / s) * (max - min - FPageSize) + min;\r\n Result := Math.Max(Math.Min(v, max - FPageSize), min);\r\n end\r\n else\r\n Result := 0;\r\nend;\r\n\r\nfunction TTMSFNCCustomScrollBar.GetValue: Double;\r\nvar\r\n s: Double;\r\n scr: TRectF;\r\nbegin\r\n Result := 0;\r\n scr := GetScrollRectangle;\r\n case Kind of\r\n sbkHorizontal: s := (scr.Right - scr.Left) - Math.Max(Appearance.GetThumbButtonSize * 2 + 10, ((scr.Right - scr.Left) / GetRange * PageSize));\r\n sbkVertical: s := (scr.Bottom - scr.Top) - Math.Max(Appearance.GetThumbButtonSize * 2 + 10, ((scr.Bottom - scr.Top) / GetRange * PageSize));\r\n else\r\n s := 0;\r\n end;\r\n\r\n if s <= 0 then\r\n Exit;\r\n\r\n if (Max - Min) > 0 then\r\n begin\r\n if Tracking then\r\n Result := Math.Min(((Value - Min) / (Max - Min - FPageSize)) * s, s)\r\n else\r\n Result := Math.Min(((FTempValue - Min) / (Max - Min - FPageSize)) * s, s)\r\n end\r\n else\r\n Result := Min;\r\nend;\r\n\r\nfunction TTMSFNCCustomScrollBar.GetRange: Double;\r\nbegin\r\n Result := Math.Max(2, Max - Min);\r\nend;\r\n\r\nfunction TTMSFNCCustomScrollBar.GetScrollAreaMin: TRectF;\r\nvar\r\n scr: TRectF;\r\n thr: TRectF;\r\nbegin\r\n scr := GetScrollRectangle;\r\n thr := GetThumbRectangle;\r\n case Kind of\r\n sbkHorizontal:\r\n begin\r\n Result.Left := scr.Left;\r\n Result.Top := scr.Top;\r\n Result.Right := Result.Left + (thr.Left - scr.Left);\r\n Result.Bottom := Result.Top + (scr.Bottom - scr.Top);\r\n end;\r\n sbkVertical:\r\n begin\r\n Result.Left := scr.Left;\r\n Result.Top := scr.Top;\r\n Result.Right := Result.Left + (scr.Right - scr.Left);\r\n Result.Bottom := Result.Top + (thr.Top - scr.Top);\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCCustomScrollBar.GetScrollAreaMax: TRectF;\r\nvar\r\n scr: TRectF;\r\n thr: TRectF;\r\nbegin\r\n scr := GetScrollRectangle;\r\n thr := GetThumbRectangle;\r\n case Kind of\r\n sbkHorizontal:\r\n begin\r\n Result.Left := thr.Left + (thr.Right - thr.Left);\r\n Result.Top := scr.Top;\r\n Result.Right := Result.Left + (scr.Right - scr.Left) - (thr.Right - thr.Left) - thr.Left + scr.Left;\r\n Result.Bottom := Result.Top + (scr.Bottom - scr.Top);\r\n end;\r\n sbkVertical:\r\n begin\r\n Result.Left := scr.Left;\r\n Result.Top := thr.Top + (thr.Bottom - thr.Top);\r\n Result.Right := Result.Left + (scr.Right - scr.Left);\r\n result.Bottom := Result.Top + (scr.Bottom - scr.Top) - (thr.Bottom - thr.Top) - thr.Top + scr.Top;\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCCustomScrollBar.GetScrollRectangle: TRectF;\r\nbegin\r\n case Kind of\r\n sbkHorizontal:\r\n begin\r\n Result.Left := GetMinScrollButton.Left + (GetMinScrollButton.Right - GetMinScrollButton.Left);\r\n Result.Top := GetMinScrollButton.Top;\r\n Result.Bottom := Result.Top + (GetMinScrollButton.Bottom - GetMinScrollButton.Top);\r\n Result.Right := GetMaxScrollButton.Left;\r\n end;\r\n sbkVertical:\r\n begin\r\n Result.Left := GetMinScrollButton.Left;\r\n Result.Top := GetMinScrollButton.Top + (GetMinScrollButton.Bottom - GetMinScrollButton.Top);\r\n Result.Bottom := GetMaxScrollButton.Top;\r\n Result.Right := Result.Left + (GetMinScrollButton.Right - GetMinScrollButton.Left);\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCCustomScrollBar.GetScrollSize: Double;\r\nbegin\r\n case Kind of\r\n sbkHorizontal: Result := (GetScrollRectangle.Right - GetScrollRectangle.Left) - (GetThumbRectangle.Right - GetThumbRectangle.Left);\r\n sbkVertical: Result := (GetScrollRectangle.Bottom - GetScrollRectangle.Top) - (GetThumbRectangle.Bottom - GetThumbRectangle.Top);\r\n else\r\n Result := 0;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCCustomScrollBar.GetThumbRectangle: TRectF;\r\nvar\r\n scr: TRectF;\r\n s: Double;\r\nbegin\r\n scr := GetScrollRectangle;\r\n case Kind of\r\n sbkHorizontal:\r\n begin\r\n s := (scr.Right - scr.Left) / GetRange * PageSize;\r\n Result.Left := scr.Left + GetValue;\r\n Result.Top := scr.Top;\r\n Result.Right := Result.Left + Math.Max(Appearance.GetThumbButtonSize * 2 + ScalePaintValue(10), s);\r\n Result.Bottom := Result.Top + (scr.Bottom - scr.Top);\r\n end;\r\n sbkVertical:\r\n begin\r\n s := (scr.Bottom - scr.Top) / GetRange * PageSize;\r\n Result.Left := scr.Left;\r\n Result.Top := scr.Top + GetValue;\r\n Result.Right := Result.Left + (scr.Right - scr.Left);\r\n Result.Bottom := Result.Top + Math.Max(Appearance.GetThumbButtonSize * 2 + ScalePaintValue(10), s);\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomScrollBar.HandleKeyDown(var Key: Word; Shift: TShiftState);\r\nbegin\r\n inherited;\r\n case Key of\r\n KEY_UP, KEY_LEFT: Value := Value - SmallChange;\r\n KEY_DOWN, KEY_RIGHT: Value := Value + SmallChange;\r\n KEY_HOME: Value := Min;\r\n KEY_END: Value := Max;\r\n KEY_PRIOR: Value := Value - LargeChange;\r\n KEY_NEXT: Value := Value + LargeChange;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomScrollBar.HandleMouseDown(Button: TMouseButton;\r\n Shift: TShiftState; X, Y: Single);\r\nbegin\r\n inherited;\r\n if Assigned(Parent) then\r\n CaptureEx;\r\n\r\n FCx := Abs(X - GetThumbRectangle.Left + GetScrollRectangle.Left);\r\n FCy := Abs(Y - GetThumbRectangle.Top + GetScrollRectangle.Top);\r\n FMx := X;\r\n FMy := Y;\r\n FSavedPageSize := PageSize;\r\n FTime := 0;\r\n FTimer.Enabled := true;\r\n if MouseOnThumbButtons(X, Y) then\r\n begin\r\n FScrollBarMode := sbmChangePageSize;\r\n FMinThumb := PtInRectEx(GetMinThumbButton, PointF(X, Y));\r\n FMaxThumb := PtInRectEx(GetMaxThumbButton, PointF(X, Y));\r\n end\r\n else if MouseOnThumb(X, Y) then\r\n FScrollBarMode := sbmScroll\r\n else if PtInRectEx(GetMinScrollButton, PointF(X, Y)) then\r\n FScrollButtonChange := sbcSmallSubstract\r\n else if PtInRectEx(GetMaxScrollButton, PointF(X, Y)) then\r\n FScrollButtonChange := sbcSmallAdd\r\n else if PtInRectEx(GetScrollAreaMin, PointF(X, Y)) then\r\n FScrollButtonChange := sbcLargeSubstract\r\n else if PtInRectEx(GetScrollAreaMax, PointF(X, Y)) then\r\n FScrollButtonChange := sbcLargeAdd;\r\n\r\n if PtInRectEx(GetMinThumbButton, PointF(X, Y)) and not (FDownButton = sdbThumbMin) then\r\n begin\r\n FDownButton := sdbThumbMin;\r\n Changed;\r\n end\r\n else if PtInRectEx(GetMaxThumbButton, PointF(X, Y)) and not (FDownButton = sdbThumbMax) then\r\n begin\r\n FDownButton := sdbThumbMax;\r\n Changed;\r\n end\r\n else if PtInRectEx(GetMinScrollButton, PointF(X, Y)) and not (FDownButton = sdbScrollMin) then\r\n begin\r\n FDownButton := sdbScrollMin;\r\n Changed;\r\n end\r\n else if PtInRectEx(GetMaxScrollButton, PointF(X, Y)) and not (FDownButton = sdbScrollMax) then\r\n begin\r\n FDownButton := sdbScrollMax;\r\n Changed;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomScrollBar.HandleMouseEnter;\r\nbegin\r\n inherited;\r\n\r\nend;\r\n\r\nprocedure TTMSFNCCustomScrollBar.HandleMouseMove(Shift: TShiftState; X, Y: Single);\r\nvar\r\n pos: Double;\r\n v: Double;\r\nbegin\r\n inherited;\r\n begin\r\n if FScrollBarMode = sbmChangePageSize then\r\n begin\r\n case Kind of\r\n sbkHorizontal: Cursor := crSizeWE;\r\n sbkVertical: Cursor := crSizeNS;\r\n end;\r\n\r\n case Kind of\r\n sbkHorizontal: pos := GetRange / (GetScrollRectangle.Right - GetScrollRectangle.Left) * (X - FMx);\r\n sbkVertical: pos := GetRange / (GetScrollRectangle.Bottom - GetScrollRectangle.Top) * (Y - FMy);\r\n else\r\n pos := 0;\r\n end;\r\n\r\n if FMinThumb then\r\n begin\r\n if Value - Min > 0 then\r\n PageSize := FSavedPageSize - pos * (GetRange / (Value - Min))\r\n else\r\n PageSize := FSavedPageSize - pos\r\n end\r\n else if FMaxThumb then\r\n begin\r\n if Value - Min < GetRange then\r\n PageSize := FSavedPageSize + pos * (GetRange / (Max - Value))\r\n else\r\n PageSize := FSavedPageSize + pos\r\n end;\r\n end\r\n else if (FScrollBarMode = sbmScroll) then\r\n begin\r\n case Kind of\r\n sbkHorizontal: pos := X - FCx;\r\n sbkVertical: pos := Y - FCy;\r\n else\r\n pos := 0;\r\n end;\r\n\r\n v := GetValue(pos);\r\n if Tracking then\r\n Value := v\r\n else\r\n begin\r\n FTempValue := v;\r\n Changed;\r\n end;\r\n end\r\n else if MouseOnThumbButtons(X, Y) then\r\n begin\r\n case Kind of\r\n sbkHorizontal: Cursor := crSizeWE;\r\n sbkVertical: Cursor := crSizeNS;\r\n end;\r\n end\r\n else\r\n begin\r\n Cursor := crDefault;\r\n end;\r\n end;\r\n\r\n if PtInRectEx(GetMinThumbButton, PointF(X, Y)) and not (FHoveredButton = shbThumbMin) then\r\n begin\r\n FHoveredButton := shbThumbMin;\r\n Changed;\r\n end\r\n else if PtInRectEx(GetMaxThumbButton, PointF(X, Y)) and not (FHoveredButton = shbThumbMax) then\r\n begin\r\n FHoveredButton := shbThumbMax;\r\n Changed;\r\n end\r\n else if PtInRectEx(GetMinScrollButton, PointF(X, Y)) and not (FHoveredButton = shbScrollMin) then\r\n begin\r\n FHoveredButton := shbScrollMin;\r\n Changed;\r\n end\r\n else if PtInRectEx(GetMaxScrollButton, PointF(X, Y)) and not (FHoveredButton = shbScrollMax) then\r\n begin\r\n FHoveredButton := shbScrollMax;\r\n Changed;\r\n end\r\n else if not PtInRectEx(GetMaxThumbButton, PointF(X, Y)) and not PtInRectEx(GetMinThumbButton, PointF(X, Y)) and not PtInRectEx(GetMaxScrollButton, PointF(X, Y))\r\n and not PtInRectEx(GetMinScrollButton, PointF(X, Y)) and (FHoveredButton <> shbNone) then\r\n begin\r\n FHoveredButton := shbNone;\r\n Changed;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCCustomScrollBar.MouseOnThumb(X, Y: Double): Boolean;\r\nbegin\r\n Result := PtInRectEx(GetThumbRectangle, PointF(X, Y));\r\nend;\r\n\r\nfunction TTMSFNCCustomScrollBar.MouseOnThumbButtons(X, Y: Double): Boolean;\r\nbegin\r\n Result := PtInRectEx(GetMinThumbButton, PointF(X, Y)) or PtInRectEx(GetMaxThumbButton, PointF(X, Y));\r\n Result := Result and not Appearance.FixedThumb;\r\nend;\r\n\r\nprocedure TTMSFNCCustomScrollBar.ResetToDefaultStyle;\r\nvar\r\n ia: TTMSFNCScrollBarAppearance;\r\nbegin\r\n inherited;\r\n ia := TTMSFNCScrollBarAppearance.Create(nil);\r\n try\r\n Appearance.Assign(ia);\r\n finally\r\n ia.Free;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomScrollBar.HandleMouseUp(Button: TMouseButton; Shift: TShiftState;\r\n X, Y: Single);\r\nbegin\r\n inherited;\r\n if Assigned(Parent) then\r\n ReleaseCaptureEx;\r\n\r\n if (FScrollBarMode = sbmScroll) and not Tracking then\r\n Value := FTempValue;\r\n\r\n if (FScrollBarMode = sbmNone) then\r\n begin\r\n if PtInRectEx(GetMinScrollButton, PointF(X, Y)) then\r\n Value := Value - SmallChange\r\n else if PtInRectEx(GetMaxScrollButton, PointF(X, Y)) then\r\n Value := Value + SmallChange\r\n else if PtInRectEx(GetScrollAreaMin, PointF(X, Y)) then\r\n Value := Value - LargeChange\r\n else if PtInRectEx(GetScrollAreaMax, PointF(X, Y)) then\r\n Value := Value + LargeChange;\r\n end;\r\n\r\n FDownButton := sdbNone;\r\n FMinThumb := false;\r\n FMaxThumb := false;\r\n FTimer.Enabled := false;\r\n FTime := 0;\r\n FScrollBarMode := sbmNone;\r\n Cursor := crDefault;\r\n FScrollButtonChange := sbcNone;\r\n Changed;\r\nend;\r\n\r\nprocedure TTMSFNCCustomScrollBar.HandleMouseWheel(Shift: TShiftState; WheelDelta: Integer; var Handled: Boolean);\r\nbegin\r\n inherited;\r\n if WheelDelta < 0 then\r\n Value := Value + LargeChange\r\n else\r\n Value := Value - LargeChange;\r\nend;\r\n\r\nfunction TTMSFNCCustomScrollBar.IsLargeChangeStored: Boolean;\r\nbegin\r\n Result := LargeChange <> 20;\r\nend;\r\n\r\nfunction TTMSFNCCustomScrollBar.IsMaxStored: Boolean;\r\nbegin\r\n Result := Max <> 100;\r\nend;\r\n\r\nfunction TTMSFNCCustomScrollBar.IsMinStored: Boolean;\r\nbegin\r\n Result := Min <> 0;\r\nend;\r\n\r\nfunction TTMSFNCCustomScrollBar.IsPageSizeStored: Boolean;\r\nbegin\r\n Result := PageSize <> 20;\r\nend;\r\n\r\nfunction TTMSFNCCustomScrollBar.IsSmallChangeStored: Boolean;\r\nbegin\r\n Result := SmallChange <> 1;\r\nend;\r\n\r\nfunction TTMSFNCCustomScrollBar.IsValueStored: Boolean;\r\nbegin\r\n Result := Value <> 0;\r\nend;\r\n\r\nprocedure TTMSFNCCustomScrollBar.Draw(AGraphics: TTMSFNCGraphics; ARect: TRectF);\r\nbegin\r\n inherited;\r\n DrawThumb(AGraphics);\r\n DrawScrollButtons(AGraphics);\r\nend;\r\n\r\nprocedure TTMSFNCCustomScrollBar.SetAppearance(\r\n const Value: TTMSFNCScrollBarAppearance);\r\nbegin\r\n if FAppearance <> value then\r\n begin\r\n FAppearance.Assign(Value);\r\n Changed;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomScrollBar.SetKind(Value: TTMSFNCScrollBarKind);\r\nbegin\r\n if FKind <> Value then\r\n begin\r\n FKind := Value;\r\n {$IFNDEF WEBLIB}\r\n if not (csLoading in ComponentState) then\r\n {$ENDIF}\r\n SetBounds(Left, Top, Height, Width){$IFDEF WEBLIB};{$ENDIF}\r\n {$IFNDEF WEBLIB}\r\n else\r\n FNeedsChange := True;\r\n {$ENDIF}\r\n Changed;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomScrollBar.SetMax(const Value: Double);\r\nbegin\r\n if FMax <> Value then\r\n begin\r\n FMax := Value;\r\n Changed;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomScrollBar.SetMin(const Value: Double);\r\nbegin\r\n if FMin <> Value then\r\n begin\r\n FMin := Value;\r\n Changed;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomScrollBar.SetPageSize(const Value: Double);\r\nbegin\r\n if FBlockChange then\r\n Exit;\r\n\r\n if FPageSize <> Value then\r\n begin\r\n FPageSize := Math.Max(Math.Min(GetRange, Value), 0);\r\n if Assigned(FOnPageSizeChanged) then\r\n begin\r\n FBlockChange := True;\r\n FOnPageSizeChanged(Self, PageSize);\r\n FBlockChange := False;\r\n end;\r\n Changed;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomScrollBar.SetTracking(const Value: Boolean);\r\nbegin\r\n if FTracking <> Value then\r\n begin\r\n FTracking := Value;\r\n Changed;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomScrollBar.SetValue(const Value: Double);\r\nbegin\r\n if FBlockChange then\r\n Exit;\r\n\r\n if FValue <> Value then\r\n begin\r\n FValue := Math.Min(Math.Max(Value, FMin), FMax - FPageSize);\r\n FTempValue := FValue;\r\n if Assigned(FOnValueChange) then\r\n begin\r\n FBlockChange := True;\r\n FOnValueChange(Self, Self.Value);\r\n FBlockChange := False;\r\n end;\r\n Changed;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomScrollBar.TimerChanged(Sender: TObject);\r\nbegin\r\n Inc(FTime);\r\n if FTime >= 4 then\r\n begin\r\n if FScrollButtonChange = sbcSmallSubstract then\r\n begin\r\n Value := Value - SmallChange;\r\n Changed;\r\n end\r\n else if FScrollButtonChange = sbcSmallAdd then\r\n begin\r\n Value := Value + SmallChange;\r\n Changed;\r\n end\r\n else if FScrollButtonChange = sbcLargeSubstract then\r\n begin\r\n Value := Value - LargeChange;\r\n Changed;\r\n end\r\n else if FScrollButtonChange = sbcLargeAdd then\r\n begin\r\n Value := Value + LargeChange;\r\n Changed;\r\n end;\r\n end;\r\nend;\r\n\r\n{ TTMSFNCScrollBar }\r\n\r\nprocedure TTMSFNCScrollBar.RegisterRuntimeClasses;\r\nbegin\r\n RegisterClass(TTMSFNCScrollBar);\r\nend;\r\n\r\nend.\r\n","{********************************************************************}\r\n{ }\r\n{ written by TMS Software }\r\n{ copyright (c) 2016 - 2024 }\r\n{ Email : info@tmssoftware.com }\r\n{ Web : http://www.tmssoftware.com }\r\n{ }\r\n{ The source code is given as is. The author is not responsible }\r\n{ for any possible damage done due to the use of this code. }\r\n{ The complete source code remains property of the author and may }\r\n{ not be distributed, published, given or sold in any form as such. }\r\n{ No parts of the source code can be included in any other component }\r\n{ or application without written authorization of the author. }\r\n{********************************************************************}\r\n\r\nunit WEBLib.TMSFNCTreeViewBase;\r\n\r\n{$I WEBLib.TMSFNCDefines.inc}\r\n\r\n{$IFDEF WEBLIB}\r\n{$DEFINE CMNWEBLIB}\r\n{$ENDIF}\r\n{$IFDEF CMNLIB}\r\n{$DEFINE CMNWEBLIB}\r\n{$ENDIF}\r\n\r\n{$IFNDEF LCLLIB}\r\n{$IFNDEF WEBLIB}\r\n{$HINTS OFF}\r\n{$IF COMPILERVERSION > 22}\r\n{$DEFINE USEOWNEDCOLLECTION}\r\n{$IFEND}\r\n{$HINTS ON}\r\n{$ENDIF}\r\n{$ENDIF}\r\n\r\n{$IFDEF LCLLIB}\r\n{$DEFINE USEOWNEDCOLLECTION}\r\n{$ENDIF}\r\n\r\n{$RANGECHECKS OFF}\r\n\r\ninterface\r\n\r\nuses\r\n {$IFDEF MSWINDOWS}\r\n Windows,\r\n {$ENDIF}\r\n Classes, WEBLib.TMSFNCCustomControl, WEBLib.TMSFNCScrollBar, WEBLib.StdCtrls,\r\n WEBLib.Controls, WEBLib.TMSFNCTypes\r\n {$IFNDEF LCLLIB}\r\n {$IFNDEF WEBLIB}\r\n {$HINTS OFF}\r\n {$IF COMPILERVERSION > 22}\r\n ,UITypes\r\n {$IFEND}\r\n {$HINTS ON}\r\n ,Types\r\n {$ENDIF}\r\n {$ENDIF}\r\n {$IFDEF FMXLIB}\r\n ,FMX.Types\r\n {$ENDIF}\r\n ;\r\n\r\nconst\r\n {$IFDEF LCLLIB}\r\n SWIPECOUNT = 300;\r\n DOWNCOUNT = 15;\r\n {$ELSE}\r\n {$IFDEF MSWINDOWS}\r\n SWIPECOUNT = 300;\r\n DOWNCOUNT = 15;\r\n {$ENDIF}\r\n {$IFDEF MACOS}\r\n {$IFDEF IOS}\r\n SWIPECOUNT = 300;\r\n DOWNCOUNT = 200;\r\n {$ELSE}\r\n SWIPECOUNT = 300;\r\n DOWNCOUNT = 200;\r\n {$ENDIF}\r\n {$ENDIF}\r\n {$IFDEF ANDROID}\r\n SWIPECOUNT = 300;\r\n DOWNCOUNT = 100;\r\n {$ENDIF}\r\n {$ENDIF}\r\n {$IFDEF FMXLIB}\r\n {$IFDEF LINUX}\r\n SWIPECOUNT = 300;\r\n DOWNCOUNT = 100;\r\n {$ENDIF}\r\n {$ENDIF}\r\n {$IFDEF WEBLIB}\r\n SWIPECOUNT = 300;\r\n DOWNCOUNT = 100;\r\n {$ENDIF}\r\n\r\ntype\r\n TTMSFNCTreeViewBase = class;\r\n\r\n TTMSFNCTreeViewDoubleListItem = class(TCollectionItem)\r\n private\r\n FOwner: TTMSFNCTreeViewBase;\r\n FValue: Double;\r\n FCellVal: Integer;\r\n procedure SetCellData(const Value: Double);\r\n public\r\n constructor Create(ACollection: TCollection); override;\r\n published\r\n property Value: Double read FValue write SeTCellData;\r\n property CellVal: Integer read FCellVal write FCellVal;\r\n end;\r\n\r\n {$IFNDEF USEOWNEDCOLLECTION}\r\n TTMSFNCTreeViewDoubleList = class(TTMSFNCOwnedCollection)\r\n {$ENDIF}\r\n {$IFDEF USEOWNEDCOLLECTION}\r\n TTMSFNCTreeViewDoubleList = class({$IFDEF LCLLIB}specialize {$ENDIF}TTMSFNCOwnedCollection)\r\n {$ENDIF}\r\n private\r\n FOwner: TTMSFNCTreeViewBase;\r\n FOnChange: TNotifyEvent;\r\n function GetItem(Index: Integer): TTMSFNCTreeViewDoubleListItem;\r\n procedure SetItem(Index: Integer; const Value: TTMSFNCTreeViewDoubleListItem);\r\n protected\r\n property OnChange: TNotifyEvent read FOnChange write FOnChange;\r\n public\r\n function IndexOf(ACellVal: Integer): Integer;\r\n constructor Create(AOwner: TTMSFNCTreeViewBase);\r\n property Items[Index: Integer]: TTMSFNCTreeViewDoubleListItem read GetItem write SetItem; default;\r\n function Add: TTMSFNCTreeViewDoubleListItem;\r\n function Insert(Index: Integer): TTMSFNCTreeViewDoubleListItem;\r\n end;\r\n\r\n TTMSFNCTreeViewScrollMode = (smPixelScrolling, smNodeScrolling);\r\n TTMSFNCTreeViewScrollUpdate = (suContinuous, suOnce);\r\n\r\n TTMSFNCTreeViewBase = class(TTMSFNCCustomControl)\r\n private\r\n FSaveHScrollPos, FSaveVScrollPos: Single;\r\n FTotalRowHeight: Double;\r\n FNodeListBuild: Boolean;\r\n FTotalColumnWidth: Double;\r\n FStartOffset: Double;\r\n FStartCol, FStopCol, FStartRow, FStopRow: Integer;\r\n FStartX, FStopX, FStartY, FStopY: Double;\r\n FBlockScrollingUpdate: Boolean;\r\n FUpdateCount: Integer;\r\n FVerticalScrollBar, FHorizontalScrollBar: TScrollBar;\r\n FCustomVerticalScrollBar, FCustomHorizontalScrollBar: TTMSFNCScrollBar;\r\n FRowCount: Integer;\r\n FColumnCount: Integer;\r\n FColumnW, FColumnP: TTMSFNCTreeViewDoubleList;\r\n FDefaultRowHeight: Double;\r\n FDefaultColumnWidth: Double;\r\n FVerticalScrollBarVisible: Boolean;\r\n FHorizontalScrollBarVisible: Boolean;\r\n FScrollMode: TTMSFNCTreeViewScrollMode;\r\n FIsMouseDown: Boolean;\r\n FDelayedLoading: Boolean;\r\n FStretchScrollBars: Boolean;\r\n FBlockUpdateNodeList: Boolean;\r\n FBlockUpdateNode: Boolean;\r\n FBlockRemoveNode: Integer;\r\n FBlockUserInput: Boolean;\r\n FBlockMouseClick: Boolean;\r\n FCustomScrollBars: Boolean;\r\n FScrollUpdate: TTMSFNCTreeViewScrollUpdate;\r\n FDefaultColumnMinWidth: Double;\r\n FColumnMinW: TTMSFNCTreeViewDoubleList;\r\n procedure SetColumnCount(const Value: Integer);\r\n procedure SetRowCount(const Value: Integer);\r\n procedure SetDefaultColumnWidth(const Value: Double);\r\n procedure SetDefaultRowHeight(const Value: Double);\r\n procedure SetHorizontalScrollBarVisible(const Value: Boolean);\r\n procedure SetVerticalScrollBarVisible(const Value: Boolean);\r\n procedure SetScrollMode(const Value: TTMSFNCTreeViewScrollMode);\r\n procedure SetColWidths(Col: Integer; const Value: Double);\r\n procedure SetColumnP(const Value: TTMSFNCTreeViewDoubleList);\r\n procedure SetColumnW(const Value: TTMSFNCTreeViewDoubleList);\r\n function GetColWidths(Col: integer): Double;\r\n function GetColPos(Col: integer): Double;\r\n procedure SetColPos(Col: Integer; const Value: Double);\r\n procedure SetStretchScrollBars(const Value: Boolean);\r\n procedure SetCustomScrollBars(const Value: Boolean);\r\n procedure SetScrollUpdate(const Value: TTMSFNCTreeViewScrollUpdate);\r\n function GetColMinWidths(Col: Integer): Double;\r\n procedure SetColMinWidths(Col: Integer; const Value: Double);\r\n procedure SetDefaultColumnMinWidth(const Value: Double);\r\n procedure SetColumnMinW(const Value: TTMSFNCTreeViewDoubleList);\r\n protected\r\n function ColumnStretchingActive: Boolean; virtual; abstract;\r\n procedure UpdateTreeView; virtual;\r\n procedure UpdateColumns; virtual; abstract;\r\n procedure AutoSizeColumnInternal(ACol: Integer; AUpdate: Boolean = False; ACallEventHandlers: Boolean = False); virtual; abstract;\r\n procedure UpdateVisualRange; virtual;\r\n procedure StretchColumn(AStretchAll: Boolean = True; ACol: Integer = -1; ANewWidth: Double = -1); virtual;\r\n procedure StopAnimationTimer; virtual; abstract;\r\n procedure Scroll(AHorizontalPos, AVerticalPos: Double); virtual;\r\n procedure UpdateDisplay; virtual;\r\n procedure VerticalScrollPositionChanged; virtual; abstract;\r\n procedure HorizontalScrollPositionChanged; virtual; abstract;\r\n procedure VScrollChanged(Sender: TObject);\r\n procedure HScrollChanged(Sender: TObject);\r\n procedure HCustomScrollChanged(Sender: TObject; {%H-}AValue: Double);\r\n procedure VCustomScrollChanged(Sender: TObject; {%H-}AValue: Double);\r\n procedure UpdateAutoSizing; virtual; abstract;\r\n procedure UpdateColumnRowCalculations(AUpdateTotalRowHeight: Boolean = True); virtual; abstract;\r\n procedure UpdateScrollBars(AUpdate: Boolean = True; ACalculate: Boolean = True);\r\n procedure UpdateCalculations; virtual; abstract;\r\n procedure ResetNodes(AUpdateAll: Boolean = True); virtual; abstract;\r\n procedure UpdateColumnsCache; virtual; abstract;\r\n procedure UpdateGroupsCache; virtual; abstract;\r\n procedure UpdateNodesCache(AUpdateNodes: Boolean = True; AResetNodes: Boolean = False); virtual; abstract;\r\n procedure UpdateTreeViewCache; virtual;\r\n procedure UpdateTreeViewDisplay; virtual;\r\n procedure Loaded; override;\r\n procedure SetHScrollValue(AValue: Single); virtual;\r\n procedure SetVScrollValue(AValue: Single); virtual;\r\n procedure UpdateControlAfterResize; override;\r\n function CanScrollDown: Boolean; virtual;\r\n function CanScrollUp: Boolean; virtual;\r\n function ScrollLimitation: Boolean; virtual;\r\n function IsColumnVisible({%H-}ACol: Integer): Boolean; virtual;\r\n function GetRowHeight({%H-}ARow: Integer): Double; virtual;\r\n function GetCalculationRect: TRectF; virtual;\r\n function GetContentRect: TRectF; override;\r\n function GetContentClipRect: TRectF; virtual;\r\n function GetHScrollValue: Single; virtual;\r\n function GetVScrollValue: Single; virtual;\r\n function GetVViewPortSize: Single; virtual;\r\n function GetHViewPortSize: Single; virtual;\r\n function GetVScrollOffset: Single; virtual;\r\n function GetColumnViewPortSize: Double; virtual;\r\n function GetRowViewPortSize: Double; virtual;\r\n property TotalColumnWidth: Double read FTotalColumnWidth write FTotalColumnWidth;\r\n property TotalRowHeight: Double read FTotalRowHeight write FTotalRowHeight;\r\n property IsMouseDown: Boolean read FIsMouseDown write FIsMouseDown;\r\n property BlockUserInput: Boolean read FBlockUserInput write FBlockUserInput;\r\n property BlockMouseClick: Boolean read FBlockMouseClick write FBlockMouseClick;\r\n property DefaultRowHeight: Double read FDefaultRowHeight write SetDefaultRowHeight;\r\n property DefaultColumnWidth: Double read FDefaultColumnWidth write SetDefaultColumnWidth;\r\n property DefaultColumnMinWidth: Double read FDefaultColumnMinWidth write SetDefaultColumnMinWidth;\r\n property HorizontalScrollBarVisible: Boolean read FHorizontalScrollBarVisible write SetHorizontalScrollBarVisible default True;\r\n property VerticalScrollBarVisible: Boolean read FVerticalScrollBarVisible write SetVerticalScrollBarVisible default True;\r\n property RowCount: Integer read FRowCount write SetRowCount;\r\n property ColumnCount: Integer read FColumnCount write SetColumnCount;\r\n property ScrollMode: TTMSFNCTreeViewScrollMode read FScrollMode write SetScrollMode default smPixelScrolling;\r\n property ScrollUpdate: TTMSFNCTreeViewScrollUpdate read FScrollUpdate write SetScrollUpdate default suContinuous;\r\n property CustomScrollBars: Boolean read FCustomScrollBars write SetCustomScrollBars default False;\r\n property ColumnPositions[Col: Integer]: Double read GetColPos write SetColPos;\r\n property ColumnWidths[Col: Integer]: Double read GetColWidths write SetColWidths;\r\n property ColumnMinWidths[Col: Integer]: Double read GetColMinWidths write SetColMinWidths;\r\n property ColumnW: TTMSFNCTreeViewDoubleList read FColumnW write SetColumnW;\r\n property ColumnMinW: TTMSFNCTreeViewDoubleList read FColumnMinW write SetColumnMinW;\r\n property ColumnP: TTMSFNCTreeViewDoubleList read FColumnP write SetColumnP;\r\n property UpdateCount: Integer read FUpdateCount write FUpdateCount;\r\n property BlockScrollingUpdate: Boolean read FBlockScrollingUpdate write FBlockScrollingUpdate;\r\n property StretchScrollBars: Boolean read FStretchScrollBars write SetStretchScrollBars default True;\r\n property BlockUpdateNodeList: Boolean read FBlockUpdateNodeList write FBlockUpdateNodeList;\r\n property BlockUpdateNode: Boolean read FBlockUpdateNode write FBlockUpdateNode;\r\n property NodeListBuild: Boolean read FNodeListBuild write FNodeListBuild;\r\n property BlockRemoveNode: Integer read FBlockRemoveNode write FBlockRemoveNode;\r\n public\r\n constructor Create(AOwner: TComponent); override;\r\n destructor Destroy; override;\r\n procedure Assign(Source: TPersistent); override;\r\n procedure Resize; override;\r\n procedure BeginUpdate; override;\r\n procedure EndUpdate; override;\r\n procedure SaveScrollPosition; virtual;\r\n procedure RestoreScrollPosition; virtual;\r\n procedure AutoSizeColumn(ACol: Integer); virtual;\r\n function GetVerticalScrollPosition: Double; virtual;\r\n function GetHorizontalScrollPosition: Double; virtual;\r\n function HorizontalScrollBar: TScrollBar;\r\n function VerticalScrollBar: TScrollBar;\r\n function CustomHorizontalScrollBar: TTMSFNCScrollBar;\r\n function CustomVerticalScrollBar: TTMSFNCScrollBar;\r\n function StartCol: Integer;\r\n function StopCol: Integer;\r\n function StartX: Double;\r\n function StopX: Double;\r\n function StartRow: Integer;\r\n function StartOffset: Double;\r\n function StopRow: Integer;\r\n function StartY: Double;\r\n function StopY: Double;\r\n function GetColumnWidth(AColumn: Integer): Double; virtual;\r\n function GetColumnPosition(AColumn: Integer): Double; virtual;\r\n function GetTotalColumnNodeWidth: Double; virtual;\r\n function GetTotalColumnWidth: Double; virtual;\r\n function GetTotalRowHeight: Double; virtual;\r\n end;\r\n\r\nimplementation\r\n\r\nuses\r\n Math, WEBLib.TMSFNCUtils, SysUtils, WEBLib.Forms;\r\n\r\n{ TTMSFNCTreeViewBase }\r\n\r\nprocedure TTMSFNCTreeViewBase.Assign(Source: TPersistent);\r\nbegin\r\n inherited;\r\n if Source is TTMSFNCTreeViewBase then\r\n begin\r\n FScrollMode := (Source as TTMSFNCTreeViewBase).ScrollMode;\r\n FStretchScrollBars := (Source as TTMSFNCTreeViewBase).StretchScrollBars;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewBase.RestoreScrollPosition;\r\nbegin\r\n Scroll(FSaveHScrollPos, FSaveVScrollPos);\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewBase.SaveScrollPosition;\r\nbegin\r\n FSaveHScrollPos := GetHScrollValue;\r\n FSaveVScrollPos := GetVScrollValue;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewBase.BeginUpdate;\r\nbegin\r\n inherited;\r\n Inc(FUpdateCount);\r\nend;\r\n\r\nfunction TTMSFNCTreeViewBase.CanScrollDown: Boolean;\r\nbegin\r\n Result := GetVerticalScrollPosition < GetTotalRowHeight - GetVViewPortSize;\r\nend;\r\n\r\nfunction TTMSFNCTreeViewBase.CanScrollUp: Boolean;\r\nbegin\r\n Result := GetVerticalScrollPosition > 0;\r\nend;\r\n\r\nconstructor TTMSFNCTreeViewBase.Create(AOwner: TComponent);\r\nbegin\r\n inherited;\r\n FDelayedLoading := False;\r\n\r\n FStretchScrollBars := True;\r\n\r\n FScrollUpdate := suContinuous;\r\n\r\n FCustomVerticalScrollBar := TTMSFNCScrollBar.Create(Self);\r\n FCustomVerticalScrollBar.Parent := Self;\r\n FCustomHorizontalScrollBar := TTMSFNCScrollBar.Create(Self);\r\n FCustomHorizontalScrollBar.Parent := Self;\r\n\r\n FVerticalScrollBar := TScrollBar.Create(Self);\r\n FVerticalScrollBar.Parent := Self;\r\n FHorizontalScrollBar := TScrollBar.Create(Self);\r\n FHorizontalScrollBar.Parent := Self;\r\n\r\n FCustomVerticalScrollBar.Appearance.ThumbButtonSize := 0;\r\n FCustomHorizontalScrollBar.Appearance.ThumbButtonSize := 0;\r\n\r\n {$IFDEF FMXLIB}\r\n FVerticalScrollBar.Stored := False;\r\n FHorizontalScrollBar.Stored := False;\r\n FCustomVerticalScrollBar.Stored := False;\r\n FCustomHorizontalScrollBar.Stored := False;\r\n FVerticalScrollBar.Orientation := TOrientation.Vertical;\r\n {$ENDIF}\r\n\r\n FCustomHorizontalScrollBar.Kind := sbkHorizontal;\r\n\r\n {$IFDEF CMNWEBLIB}\r\n FVerticalScrollBar.DoubleBuffered := False;\r\n FHorizontalScrollBar.DoubleBuffered := False;\r\n FVerticalScrollBar.Kind := sbVertical;\r\n {$ENDIF}\r\n\r\n FVerticalScrollBar.Visible := True;\r\n FHorizontalScrollBar.Visible := True;\r\n FCustomVerticalScrollBar.Visible := False;\r\n FCustomHorizontalScrollBar.Visible := False;\r\n FVerticalScrollBar.OnChange := @VScrollChanged;\r\n FHorizontalScrollBar.OnChange := @HScrollChanged;\r\n FCustomHorizontalScrollBar.OnValueChanged := HCustomScrollChanged;\r\n FCustomVerticalScrollBar.OnValueChanged := VCustomScrollChanged;\r\n\r\n FVerticalScrollBarVisible := True;\r\n FHorizontalScrollBarVisible := True;\r\n\r\n FScrollMode := smPixelScrolling;\r\n\r\n FColumnW := TTMSFNCTreeViewDoubleList.Create(Self);\r\n FColumnMinW := TTMSFNCTreeViewDoubleList.Create(Self);\r\n FColumnP := TTMSFNCTreeViewDoubleList.Create(Self);\r\n\r\n FDefaultRowHeight := 25;\r\n FDefaultColumnWidth := 75;\r\n FDefaultColumnMinWidth := 0;\r\n FColumnCount := 0;\r\n FRowCount := 0;\r\n FVerticalScrollBarVisible := True;\r\n FHorizontalScrollBarVisible := True;\r\nend;\r\n\r\nfunction TTMSFNCTreeViewBase.CustomHorizontalScrollBar: TTMSFNCScrollBar;\r\nbegin\r\n Result := FCustomHorizontalScrollBar;\r\nend;\r\n\r\nfunction TTMSFNCTreeViewBase.CustomVerticalScrollBar: TTMSFNCScrollBar;\r\nbegin\r\n Result := FCustomVerticalScrollBar;\r\nend;\r\n\r\ndestructor TTMSFNCTreeViewBase.Destroy;\r\nbegin\r\n FColumnP.Free;\r\n FColumnMinW.Free;\r\n FColumnW.Free;\r\n FCustomVerticalScrollBar.Free;\r\n FCustomHorizontalScrollBar.Free;\r\n FVerticalScrollBar.Free;\r\n FHorizontalScrollBar.Free;\r\n inherited;\r\nend;\r\n\r\nfunction TTMSFNCTreeViewBase.GetContentRect: TRectF;\r\nbegin\r\n Result := inherited GetContentRect;\r\n if CustomScrollBars then\r\n begin\r\n if CustomHorizontalScrollBar.Visible then\r\n Result.Bottom := Result.Bottom - CustomHorizontalScrollBar.Height - 1;\r\n\r\n if CustomVerticalScrollBar.Visible then\r\n Result.Right := Result.Right - CustomVerticalScrollBar.Width - 1;\r\n end\r\n else\r\n begin\r\n if HorizontalScrollBar.Visible then\r\n Result.Bottom := Result.Bottom - HorizontalScrollBar.Height - 1;\r\n\r\n if VerticalScrollBar.Visible then\r\n Result.Right := Result.Right - VerticalScrollBar.Width - 1;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCTreeViewBase.GetContentClipRect: TRectF;\r\nbegin\r\n Result := GetContentRect;\r\nend;\r\n\r\nfunction TTMSFNCTreeViewBase.GetCalculationRect: TRectF;\r\nbegin\r\n Result := LocalRect;\r\nend;\r\n\r\nfunction TTMSFNCTreeViewBase.GetHorizontalScrollPosition: Double;\r\nvar\r\n hVal, scrollh: Double;\r\nbegin\r\n hVal := GetHScrollValue;\r\n if ScrollMode = smNodeScrolling then\r\n begin\r\n scrollh := ColumnPositions[Round(hval)];\r\n hVal := scrollh;\r\n end;\r\n\r\n Result := hVal;\r\nend;\r\n\r\nfunction TTMSFNCTreeViewBase.GetHScrollValue: Single;\r\nbegin\r\n if CustomScrollBars then\r\n Result := Min(CustomHorizontalScrollBar.Max - CustomHorizontalScrollBar.PageSize, Max(0, CustomHorizontalScrollBar.Value))\r\n else\r\n begin\r\n {$IFDEF FMXLIB}\r\n Result := Min(HorizontalScrollBar.Max - HorizontalScrollBar.ViewportSize, Max(0, HorizontalScrollBar.Value));\r\n {$ENDIF}\r\n {$IFDEF CMNWEBLIB}\r\n {$IFNDEF LCLLIB}\r\n Result := Round(Min(HorizontalScrollBar.Max - HorizontalScrollBar.PageSize, Max(0, HorizontalScrollBar.Position)));\r\n {$ENDIF}\r\n {$IFDEF LCLLIB}\r\n {$IFDEF MSWINDOWS}\r\n Result := {%H-}Min(HorizontalScrollBar.Max - HorizontalScrollBar.PageSize, Max(0, Round(HorizontalScrollBar.Position)));\r\n {$ELSE}\r\n case ScrollMode of\r\n smPixelScrolling: Result := {%H-}Min(HorizontalScrollBar.Max, Max(0, Round(HorizontalScrollBar.Position - HorizontalScrollBar.Position * (HorizontalScrollBar.PageSize / HorizontalScrollBar.Max))));\r\n smNodeScrolling: Result := {%H-}Min(HorizontalScrollBar.Max, Max(0, Round(HorizontalScrollBar.Position)));\r\n end;\r\n {$ENDIF}\r\n {$ENDIF}\r\n {$ENDIF}\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCTreeViewBase.GetHViewPortSize: Single;\r\nbegin\r\n if CustomScrollBars then\r\n Result := CustomHorizontalScrollBar.PageSize\r\n else\r\n begin\r\n {$IFDEF FMXLIB}\r\n Result := HorizontalScrollBar.ViewportSize;\r\n {$ENDIF}\r\n {$IFDEF CMNWEBLIB}\r\n Result := HorizontalScrollBar.PageSize;\r\n {$ENDIF}\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCTreeViewBase.GetRowHeight(ARow: Integer): Double;\r\nbegin\r\n Result := 0;\r\nend;\r\n\r\nfunction TTMSFNCTreeViewBase.GetRowViewPortSize: Double;\r\nvar\r\n I,cnt: Integer;\r\n h: Double;\r\n ch: Double;\r\n r: TRectF;\r\nbegin\r\n r := GetContentRect;\r\n ch := r.Bottom - r.Top;\r\n Result := 0;\r\n h := 0;\r\n cnt := 0;\r\n for I := RowCount - 1 downto 0 do\r\n begin\r\n h := h + GetRowHeight(I);\r\n if h > ch then\r\n begin\r\n Result := Max(1, cnt);\r\n Break;\r\n end;\r\n Inc(cnt);\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCTreeViewBase.GetTotalColumnNodeWidth: Double;\r\nbegin\r\n Result := TotalColumnWidth;\r\nend;\r\n\r\nfunction TTMSFNCTreeViewBase.GetTotalColumnWidth: Double;\r\nbegin\r\n Result := TotalColumnWidth;\r\nend;\r\n\r\nfunction TTMSFNCTreeViewBase.GetTotalRowHeight: Double;\r\nbegin\r\n Result := TotalRowHeight;\r\nend;\r\n\r\nfunction TTMSFNCTreeViewBase.GetVerticalScrollPosition: Double;\r\nvar\r\n vVal{, scrollv}: Double;\r\nbegin\r\n vVal := GetVScrollValue;\r\n if ScrollMode = smNodeScrolling then\r\n begin\r\n// scrollv := RowPositions[Round(vval)];\r\n// vVal := scrollv;\r\n end;\r\n\r\n Result := vVal;\r\nend;\r\n\r\nfunction TTMSFNCTreeViewBase.GetVViewPortSize: Single;\r\nbegin\r\n if CustomScrollBars then\r\n Result := CustomVerticalScrollBar.PageSize\r\n else\r\n begin\r\n {$IFDEF FMXLIB}\r\n Result := VerticalScrollBar.ViewportSize;\r\n {$ENDIF}\r\n {$IFDEF CMNWEBLIB}\r\n Result := VerticalScrollBar.PageSize;\r\n {$ENDIF}\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCTreeViewBase.GetVScrollOffset: Single;\r\nbegin\r\n Result := 0;\r\nend;\r\n\r\nfunction TTMSFNCTreeViewBase.GetVScrollValue: Single;\r\nbegin\r\n if CustomScrollBars then\r\n Result := Min(CustomVerticalScrollBar.Max - CustomVerticalScrollBar.PageSize, Max(0, CustomVerticalScrollBar.Value))\r\n else\r\n begin\r\n {$IFDEF FMXLIB}\r\n Result := Min(VerticalScrollBar.Max - VerticalScrollBar.ViewportSize, Max(0, VerticalScrollBar.Value));\r\n {$ENDIF}\r\n {$IFDEF CMNWEBLIB}\r\n {$IFNDEF LCLLIB}\r\n Result := Round(Min(VerticalScrollBar.Max - VerticalScrollBar.PageSize, Max(0, VerticalScrollBar.Position)));\r\n {$ENDIF}\r\n {$IFDEF LCLLIB}\r\n {$IFDEF MSWINDOWS}\r\n Result := {%H-}Min(VerticalScrollBar.Max - VerticalScrollBar.PageSize, Max(0, Round(VerticalScrollBar.Position)));\r\n {$ELSE}\r\n case ScrollMode of\r\n smPixelScrolling: Result := {%H-}Min(VerticalScrollBar.Max, Max(0, Round(VerticalScrollBar.Position - VerticalScrollBar.Position * (VerticalScrollBar.PageSize / VerticalScrollBar.Max))));\r\n smNodeScrolling: Result := {%H-}Min(VerticalScrollBar.Max, Max(0, Round(VerticalScrollBar.Position)));\r\n end;\r\n {$ENDIF}\r\n {$ENDIF}\r\n {$ENDIF}\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewBase.HCustomScrollChanged(Sender: TObject;\r\n AValue: Double);\r\nbegin\r\n if FBlockScrollingUpdate or not CustomScrollBars then\r\n Exit;\r\n\r\n if not IsMouseDown then\r\n StopAnimationTimer;\r\n\r\n HorizontalScrollPositionChanged;\r\n SetHScrollValue(GetHScrollValue);\r\nend;\r\n\r\nfunction TTMSFNCTreeViewBase.HorizontalScrollBar: TScrollBar;\r\nbegin\r\n Result := FHorizontalScrollBar;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewBase.HScrollChanged(Sender: TObject);\r\nbegin\r\n if FBlockScrollingUpdate then\r\n Exit;\r\n\r\n if not IsMouseDown then\r\n StopAnimationTimer;\r\n\r\n HorizontalScrollPositionChanged;\r\nend;\r\n\r\nfunction TTMSFNCTreeViewBase.IsColumnVisible(ACol: Integer): Boolean;\r\nbegin\r\n Result := True;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewBase.Loaded;\r\nbegin\r\n inherited;\r\n UpdateTreeViewCache;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewBase.VCustomScrollChanged(Sender: TObject;\r\n AValue: Double);\r\nbegin\r\n if FBlockScrollingUpdate or not CustomScrollBars then\r\n Exit;\r\n\r\n if not IsMouseDown then\r\n StopAnimationTimer;\r\n\r\n VerticalScrollPositionChanged;\r\n SetVScrollValue(GetVScrollValue);\r\nend;\r\n\r\nfunction TTMSFNCTreeViewBase.VerticalScrollBar: TScrollBar;\r\nbegin\r\n Result := FVerticalScrollBar;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewBase.VScrollChanged(Sender: TObject);\r\nbegin\r\n if FBlockScrollingUpdate then\r\n Exit;\r\n\r\n if not IsMouseDown then\r\n StopAnimationTimer;\r\n\r\n VerticalScrollPositionChanged;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewBase.EndUpdate;\r\nbegin\r\n inherited;\r\n Dec(FUpdateCount);\r\n if FUpdateCount = 0 then\r\n UpdateTreeViewCache;\r\nend;\r\n\r\nfunction TTMSFNCTreeViewBase.GetColumnPosition(AColumn: Integer): Double;\r\nbegin\r\n Result := ColumnPositions[AColumn];\r\nend;\r\n\r\nfunction TTMSFNCTreeViewBase.GetColumnViewPortSize: Double;\r\nvar\r\n I,cnt: Integer;\r\n w: Double;\r\n cw: Double;\r\n r: TRectF;\r\nbegin\r\n r := GetContentRect;\r\n cw := r.Right - r.Left;\r\n Result := 0;\r\n w := 0;\r\n cnt := 0;\r\n for I := ColumnCount - 1 downto 0 do\r\n begin\r\n w := w + ColumnWidths[I];\r\n if w > cw then\r\n begin\r\n Result := Max(1, cnt);\r\n Break;\r\n end;\r\n Inc(cnt);\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCTreeViewBase.GetColumnWidth(AColumn: Integer): Double;\r\nbegin\r\n Result := ColumnWidths[AColumn];\r\nend;\r\n\r\nfunction TTMSFNCTreeViewBase.GetColWidths(Col: Integer): Double;\r\nvar\r\n idx: Integer;\r\nbegin\r\n idx := ColumnW.IndexOf(Col);\r\n if idx <> -1 then\r\n Result := ColumnW[idx].Value\r\n else\r\n Result := DefaultColumnWidth;\r\nend;\r\n\r\nfunction TTMSFNCTreeViewBase.GetColMinWidths(Col: Integer): Double;\r\nvar\r\n idx: Integer;\r\nbegin\r\n idx := ColumnMinW.IndexOf(Col);\r\n if idx <> -1 then\r\n Result := ColumnMinW[idx].Value\r\n else\r\n Result := DefaultColumnMinWidth;\r\nend;\r\n\r\nfunction TTMSFNCTreeViewBase.GetColPos(Col: Integer): Double;\r\nvar\r\n idx: Integer;\r\nbegin\r\n idx := ColumnP.IndexOf(Col);\r\n if idx <> -1 then\r\n Result := ColumnP[idx].Value\r\n else\r\n Result := -1;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewBase.Resize;\r\nbegin\r\n inherited;\r\n {$IFNDEF LCLLIB}\r\n UpdateControlAfterResize;\r\n {$ENDIF}\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewBase.Scroll(AHorizontalPos, AVerticalPos: Double);\r\nbegin\r\n FBlockScrollingUpdate := True;\r\n SetHScrollValue(AHorizontalPos);\r\n SetVScrollValue(AVerticalPos);\r\n FBlockScrollingUpdate := False;\r\n UpdateDisplay;\r\nend;\r\n\r\nfunction TTMSFNCTreeViewBase.ScrollLimitation: Boolean;\r\nbegin\r\n Result := False;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewBase.SetColumnCount(const Value: Integer);\r\nbegin\r\n if FColumnCount <> Value then\r\n FColumnCount := Value;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewBase.SetColumnMinW(const Value: TTMSFNCTreeViewDoubleList);\r\nbegin\r\n FColumnMinW.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewBase.SetColumnW(const Value: TTMSFNCTreeViewDoubleList);\r\nbegin\r\n FColumnW.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewBase.SetColumnP(const Value: TTMSFNCTreeViewDoubleList);\r\nbegin\r\n FColumnP.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewBase.SetColWidths(Col: Integer; const Value: Double);\r\nvar\r\n idx: Integer;\r\n c: TTMSFNCTreeViewDoubleListItem;\r\nbegin\r\n idx := ColumnW.IndexOf(Col);\r\n if (idx >= 0) and (idx <= ColumnW.Count - 1) then\r\n begin\r\n if Value = DefaultColumnWidth then\r\n ColumnW.Delete(idx)\r\n else\r\n begin\r\n ColumnW[idx].Value := Max(0, Value);\r\n ColumnW[idx].CellVal := Col;\r\n end;\r\n end\r\n else if Value <> DefaultColumnWidth then\r\n begin\r\n c := ColumnW.Add;\r\n c.Value := Max(0, Value);\r\n c.CellVal := Col;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewBase.SetCustomScrollBars(const Value: Boolean);\r\nbegin\r\n if FCustomScrollBars <> Value then\r\n begin\r\n FCustomScrollBars := Value;\r\n UpdateTreeViewCache;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewBase.SetColMinWidths(Col: Integer; const Value: Double);\r\nvar\r\n idx: Integer;\r\n c: TTMSFNCTreeViewDoubleListItem;\r\nbegin\r\n idx := ColumnMinW.IndexOf(Col);\r\n if (idx >= 0) and (idx <= ColumnMinW.Count - 1) then\r\n begin\r\n if Value = DefaultColumnMinWidth then\r\n ColumnMinW.Delete(idx)\r\n else\r\n begin\r\n ColumnMinW[idx].Value := Max(0, Value);\r\n ColumnMinW[idx].CellVal := Col;\r\n end;\r\n end\r\n else if Value <> DefaultColumnMinWidth then\r\n begin\r\n c := ColumnMinW.Add;\r\n c.Value := Max(0, Value);\r\n c.CellVal := Col;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewBase.SetColPos(Col: Integer; const Value: Double);\r\nvar\r\n idx: Integer;\r\n c: TTMSFNCTreeViewDoubleListItem;\r\nbegin\r\n idx := ColumnP.IndexOf(Col);\r\n if (idx >= 0) and (idx <= ColumnP.Count - 1) then\r\n begin\r\n if Value = -1 then\r\n ColumnP.Delete(idx)\r\n else\r\n begin\r\n ColumnP[idx].Value := Max(0, Value);\r\n ColumnP[idx].CellVal := Col;\r\n end;\r\n end\r\n else if Value <> -1 then\r\n begin\r\n c := ColumnP.Add;\r\n c.Value := Max(0, Value);\r\n c.CellVal := Col;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewBase.SetDefaultColumnMinWidth(const Value: Double);\r\nbegin\r\n if FDefaultColumnMinWidth <> Value then\r\n FDefaultColumnMinWidth := Value;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewBase.SetDefaultColumnWidth(const Value: Double);\r\nbegin\r\n if FDefaultColumnWidth <> Value then\r\n FDefaultColumnWidth := Value;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewBase.SetDefaultRowHeight(const Value: Double);\r\nbegin\r\n if FDefaultRowHeight <> Value then\r\n FDefaultRowHeight := Value;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewBase.SetHorizontalScrollBarVisible(\r\n const Value: Boolean);\r\nbegin\r\n if FHorizontalScrollBarVisible <> Value then\r\n begin\r\n FHorizontalScrollBarVisible := Value;\r\n UpdateTreeViewCache;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewBase.SetHScrollValue(AValue: Single);\r\nbegin\r\n if CustomScrollBars then\r\n begin\r\n if CustomHorizontalScrollBar.PageSize > 0 then\r\n CustomHorizontalScrollBar.Value := Min(CustomHorizontalScrollBar.Max - CustomHorizontalScrollBar.PageSize, Max(0, AValue));\r\n end\r\n else\r\n begin\r\n {$IFDEF FMXLIB}\r\n HorizontalScrollBar.Value := Min(HorizontalScrollBar.Max - HorizontalScrollBar.ViewportSize, Max(0, AValue));\r\n {$ENDIF}\r\n {$IFDEF VCLLIB}\r\n HorizontalScrollBar.Position := Min(HorizontalScrollBar.Max - HorizontalScrollBar.PageSize, Max(0, Round(AValue)));\r\n {$ENDIF}\r\n {$IFDEF WEBLIB}\r\n HorizontalScrollBar.Position := Round(Min(HorizontalScrollBar.Max - HorizontalScrollBar.PageSize, Max(0, AValue)));\r\n {$ENDIF}\r\n {$IFDEF LCLLIB}\r\n {$IFDEF MSWINDOWS}\r\n HorizontalScrollBar.Position := {%H-}Min(HorizontalScrollBar.Max - HorizontalScrollBar.PageSize, Max(0, Round(AValue)));\r\n {$ELSE}\r\n case ScrollMode of\r\n smPixelScrolling: HorizontalScrollBar.Position := {%H-}Min(HorizontalScrollBar.Max, Max(0, Round(AValue + AValue * (HorizontalScrollBar.PageSize / (HorizontalScrollBar.Max - HorizontalScrollBar.PageSize)))));\r\n smNodeScrolling: HorizontalScrollBar.Position := {%H-}Min(HorizontalScrollBar.Max - HorizontalScrollBar.PageSize, Max(0, Round(AValue)));\r\n end;\r\n {$ENDIF}\r\n {$ENDIF}\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewBase.SetRowCount(const Value: Integer);\r\nbegin\r\n if FRowCount <> Value then\r\n FRowCount := Value;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewBase.SetScrollMode(\r\n const Value: TTMSFNCTreeViewScrollMode);\r\nbegin\r\n if FScrollMode <> Value then\r\n begin\r\n FScrollMode := Value;\r\n UpdateTreeViewDisplay;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewBase.SetScrollUpdate(\r\n const Value: TTMSFNCTreeViewScrollUpdate);\r\nbegin\r\n if FScrollUpdate <> Value then\r\n begin\r\n FScrollUpdate := Value;\r\n if Assigned(FCustomVerticalScrollBar) then\r\n FCustomVerticalScrollBar.Tracking := ScrollUpdate = suContinuous;\r\n\r\n if Assigned(FCustomHorizontalScrollBar) then\r\n FCustomHorizontalScrollBar.Tracking := ScrollUpdate = suContinuous;\r\n\r\n UpdateTreeViewCache;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewBase.SetStretchScrollBars(const Value: Boolean);\r\nbegin\r\n if FStretchScrollBars <> Value then\r\n begin\r\n FStretchScrollBars := Value;\r\n UpdateTreeViewDisplay;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewBase.SetVerticalScrollBarVisible(\r\n const Value: Boolean);\r\nbegin\r\n if FVerticalScrollBarVisible <> Value then\r\n begin\r\n FVerticalScrollBarVisible := Value;\r\n UpdateTreeViewCache;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewBase.SetVScrollValue(AValue: Single);\r\nbegin\r\n if CustomScrollBars then\r\n begin\r\n if CustomVerticalScrollBar.PageSize > 0 then\r\n CustomVerticalScrollBar.Value := Min(CustomVerticalScrollBar.Max - CustomVerticalScrollBar.PageSize, Max(0, AValue));\r\n end\r\n else\r\n begin\r\n {$IFDEF FMXLIB}\r\n VerticalScrollBar.Value := Min(VerticalScrollBar.Max - VerticalScrollBar.ViewportSize, Max(0, AValue));\r\n {$ENDIF}\r\n {$IFDEF VCLLIB}\r\n VerticalScrollBar.Position := Min(VerticalScrollBar.Max - VerticalScrollBar.PageSize, Max(0, Round(AValue)));\r\n {$ENDIF}\r\n {$IFDEF WEBLIB}\r\n VerticalScrollBar.Position := Round(Min(VerticalScrollBar.Max - VerticalScrollBar.PageSize, Max(0, AValue)));\r\n {$ENDIF}\r\n {$IFDEF LCLLIB}\r\n {$IFDEF MSWINDOWS}\r\n VerticalScrollBar.Position := {%H-}Min(VerticalScrollBar.Max - VerticalScrollBar.PageSize, Max(0, Round(AValue)));\r\n {$ELSE}\r\n case ScrollMode of\r\n smPixelScrolling: VerticalScrollBar.Position := {%H-}Min(VerticalScrollBar.Max, Max(0, Round(AValue + AValue * (VerticalScrollBar.PageSize / (VerticalScrollBar.Max - VerticalScrollBar.PageSize)))));\r\n smNodeScrolling: VerticalScrollBar.Position := {%H-}Min(VerticalScrollBar.Max - VerticalScrollBar.PageSize, Max(0, Round(AValue)));\r\n end;\r\n {$ENDIF}\r\n {$ENDIF}\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCTreeViewBase.StartCol: Integer;\r\nbegin\r\n Result := FStartCol;\r\nend;\r\n\r\nfunction TTMSFNCTreeViewBase.StartOffset: Double;\r\nbegin\r\n Result := FStartOffset;\r\nend;\r\n\r\nfunction TTMSFNCTreeViewBase.StartRow: Integer;\r\nbegin\r\n Result := FStartRow;\r\nend;\r\n\r\nfunction TTMSFNCTreeViewBase.StartX: Double;\r\nbegin\r\n Result := FStartX;\r\nend;\r\n\r\nfunction TTMSFNCTreeViewBase.StartY: Double;\r\nbegin\r\n Result := FStartY;\r\nend;\r\n\r\nfunction TTMSFNCTreeViewBase.StopCol: Integer;\r\nbegin\r\n Result := FStopCol;\r\nend;\r\n\r\nfunction TTMSFNCTreeViewBase.StopRow: Integer;\r\nbegin\r\n Result := FStopRow;\r\nend;\r\n\r\nfunction TTMSFNCTreeViewBase.StopX: Double;\r\nbegin\r\n Result := FStopX;\r\nend;\r\n\r\nfunction TTMSFNCTreeViewBase.StopY: Double;\r\nbegin\r\n Result := FStopY;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewBase.StretchColumn(AStretchAll: Boolean = True; ACol: Integer = -1; ANewWidth: Double = -1);\r\nvar\r\n i: Integer;\r\n w, nw, d: Double;\r\n cnt: Integer;\r\n horz, vert: TScrollBar;\r\n r: TRectF;\r\nbegin\r\n horz := HorizontalScrollBar;\r\n vert := VerticalScrollBar;\r\n if not Assigned(vert) or not Assigned(horz) then\r\n Exit;\r\n\r\n if ANewWidth = -1 then\r\n begin\r\n r := GetContentRect;\r\n nw := r.Right - r.Left;\r\n end\r\n else\r\n nw := ANewWidth;\r\n\r\n cnt := 0;\r\n for I := 0 to ColumnCount - 1 do\r\n begin\r\n if IsColumnVisible(I) then\r\n cnt := cnt + 1;\r\n end;\r\n\r\n if ACol = - 1 then\r\n ACol := ColumnCount - 1;\r\n\r\n if (cnt = 0) then\r\n Exit;\r\n\r\n if (ACol >= ColumnCount) and not AStretchAll and not IsLoading then\r\n begin\r\n {$IFNDEF WEBLIB}\r\n raise Exception.Create('Stretch column index out of range');\r\n {$ENDIF}\r\n {$IFDEF WEBLIB}\r\n Exit;\r\n {$ENDIF}\r\n end;\r\n\r\n if ColumnCount = 1 then\r\n begin\r\n if IsColumnVisible(0) then\r\n ColumnWidths[0] := nw;\r\n\r\n Exit;\r\n end;\r\n\r\n w := 0;\r\n\r\n if AStretchAll then\r\n begin\r\n if (cnt > 0) then\r\n begin\r\n d := nw;\r\n\r\n w := d / cnt;\r\n\r\n for i := 0 to ColumnCount - 1 do\r\n begin\r\n if IsColumnVisible(i) then\r\n ColumnWidths[i] := Max(ColumnMinWidths[I], w);\r\n end;\r\n end;\r\n end\r\n else\r\n begin\r\n for i := 0 to ColumnCount - 1 do\r\n begin\r\n if (i <> ACol) and IsColumnVisible(i) then\r\n w := w + ColumnWidths[i];\r\n end;\r\n\r\n if IsColumnVisible(ACol) then\r\n ColumnWidths[ACol] := Max(ColumnMinWidths[ACol], (nw - w)) {- 1};\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewBase.AutoSizeColumn(ACol: Integer);\r\nbegin\r\n AutoSizeColumnInternal(ACol, True, True);\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewBase.UpdateVisualRange;\r\nvar\r\n c, r: Integer;\r\n xval, yval, yoffs: Double;\r\n cw, ch: Double;\r\n vpos, hpos: Double;\r\n cr: TRectF;\r\n rh: Double;\r\nbegin\r\n hpos := GetHorizontalScrollPosition;\r\n vpos := GetVerticalScrollPosition;\r\n yoffs := GetVScrollOffset;\r\n cr := GetContentRect;\r\n xval := -hpos;\r\n yval := -vpos;\r\n cw := cr.Right - cr.Left;\r\n ch := cr.Bottom - cr.Top;\r\n\r\n FStartCol := -1;\r\n FStartRow := -1;\r\n FStopCol := -1;\r\n FStopRow := -1;\r\n FStartX := cr.Left;\r\n FStopX := cr.Left;\r\n FStartY := cr.Top;\r\n FStopY := cr.Top;\r\n FStartOffset := 0;\r\n\r\n for c := 0 to ColumnCount - 1 do\r\n begin\r\n xval := xval + ColumnWidths[c];\r\n if (xval > 0) and (FStartCol = -1) then\r\n begin\r\n FStartCol := c;\r\n FStartX := FStartX + int(xval - ColumnWidths[c]);\r\n end;\r\n\r\n if (xval >= cw) and (FStopCol = -1) then\r\n begin\r\n FStopCol := c;\r\n FStopX := FStopX + int(xval);\r\n end;\r\n\r\n if (FStartCol > -1) and (FStopCol > -1) then\r\n Break;\r\n end;\r\n\r\n for r := 0 to RowCount - 1 do\r\n begin\r\n rh := GetRowHeight(r);\r\n yval := yval + rh;\r\n if (yval > -yoffs) and (FStartRow = -1) then\r\n begin\r\n FStartRow := r;\r\n FStartOffset := yval - rh;\r\n FStartY := FStartY + int(FStartOffset);\r\n end;\r\n\r\n if (yval >= ch) and (FStopRow = -1) then\r\n begin\r\n FStopRow := r;\r\n FStopY := FStopY + int(yval);\r\n end;\r\n\r\n if (FStartRow > -1) and (FStopRow > -1) then\r\n Break;\r\n end;\r\n\r\n if (FStartRow > -1) and (FStopRow = -1) then\r\n FStopRow := RowCount - 1;\r\n\r\n if (FStartCol > -1) and (FStopCol = -1) then\r\n FStopCol := ColumnCount - 1;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewBase.UpdateControlAfterResize;\r\nbegin\r\n if (UpdateCount > 0) or (csDestroying in ComponentState) or (csLoading in ComponentState) then\r\n Exit;\r\n\r\n ResetNodes;\r\n SaveScrollPosition;\r\n UpdateNodesCache(True, True);\r\n UpdateGroupsCache;\r\n UpdateColumnsCache;\r\n RestoreScrollPosition;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewBase.UpdateDisplay;\r\nbegin\r\n //ResetVisibleNodes;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewBase.UpdateTreeView;\r\nbegin\r\n SaveScrollPosition;\r\n UpdateNodesCache(True, True);\r\n RestoreScrollPosition;\r\n UpdateGroupsCache;\r\n UpdateColumnsCache;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewBase.UpdateTreeViewCache;\r\nbegin\r\n if (UpdateCount > 0) or BlockUpdateNode or (csDestroying in ComponentState) or (csLoading in ComponentState) then\r\n Exit;\r\n\r\n ResetNodes;\r\n UpdateCalculations;\r\n UpdateColumns;\r\n UpdateScrollBars;\r\n UpdateNodesCache(True, True);\r\n UpdateGroupsCache;\r\n UpdateColumnsCache;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewBase.UpdateTreeViewDisplay;\r\nbegin\r\n UpdateScrollBars;\r\n UpdateDisplay;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewBase.UpdateScrollBars(AUpdate: Boolean = True; ACalculate: Boolean = True);\r\nvar\r\n vs, hs: TScrollBar;\r\n vsc, hsc: TTMSFNCScrollBar;\r\n w, h: Double;\r\n cw, ch: Double;\r\n cr: TRectF;\r\n vmgr: TTMSFNCMargins;\r\n hmgr: TTMSFNCMargins;\r\nbegin\r\n if {$IFDEF FMXLIB} FBlockScrollingUpdate or {$ENDIF} (UpdateCount > 0) or (csDestroying in ComponentState) then\r\n Exit;\r\n\r\n FBlockScrollingUpdate := True;\r\n\r\n if ACalculate then\r\n begin\r\n UpdateAutoSizing;\r\n UpdateColumnRowCalculations;\r\n end;\r\n\r\n vs := VerticalScrollBar;\r\n hs := HorizontalScrollBar;\r\n vsc := CustomVerticalScrollBar;\r\n hsc := CustomHorizontalScrollBar;\r\n if Assigned(vs) and Assigned(hs) and Assigned(vsc) and Assigned(hsc) then\r\n begin\r\n if AUpdate then\r\n cr := GetCalculationRect\r\n else\r\n cr := GetContentRect;\r\n\r\n cw := cr.Right - cr.Left;\r\n ch := cr.Bottom - cr.Top;\r\n w := GetTotalColumnWidth;\r\n h := GetTotalRowHeight;\r\n\r\n hs.Visible := (w > 0) and (CompareValueEx(w, cw) = 1) and HorizontalScrollBarVisible and not ColumnStretchingActive and not CustomScrollBars;\r\n vs.Visible := (h > 0) and (CompareValueEx(h, ch) = 1) and VerticalScrollBarVisible and not CustomScrollBars;\r\n hsc.Visible := (w > 0) and (CompareValueEx(w, cw) = 1) and HorizontalScrollBarVisible and not ColumnStretchingActive and CustomScrollBars;\r\n vsc.Visible := (h > 0) and (CompareValueEx(h, ch) = 1) and VerticalScrollBarVisible and CustomScrollBars;\r\n\r\n {$IFDEF CMNWEBLIB}\r\n if vsc.Visible and CustomScrollBars then\r\n vsc.Parent := Self\r\n else\r\n vsc.Parent := nil;\r\n\r\n if hsc.Visible and CustomScrollBars then\r\n hsc.Parent := Self\r\n else\r\n hsc.Parent := nil;\r\n\r\n if vs.Visible and not CustomScrollBars then\r\n vs.Parent := Self\r\n else\r\n vs.Parent := nil;\r\n\r\n if hs.Visible and not CustomScrollBars then\r\n hs.Parent := Self\r\n else\r\n hs.Parent := nil;\r\n {$ENDIF}\r\n\r\n vmgr := TTMSFNCMargins.Create;\r\n hmgr := TTMSFNCMargins.Create;\r\n\r\n if CustomScrollBars then\r\n begin\r\n if vsc.Visible and StretchScrollBars then\r\n hmgr.Right := vsc.Width + 1\r\n else\r\n hmgr.Right := 1;\r\n end\r\n else\r\n begin\r\n if vs.Visible and StretchScrollBars then\r\n hmgr.Right := vs.Width + 1\r\n else\r\n hmgr.Right := 1;\r\n end;\r\n\r\n vmgr.Top := 1;\r\n vmgr.Right := 1;\r\n hmgr.Bottom := 1;\r\n hmgr.Left := 1;\r\n\r\n if CustomScrollBars then\r\n begin\r\n if hsc.Visible then\r\n vmgr.Bottom := hsc.Height + 1\r\n else\r\n vmgr.Bottom := 1;\r\n end\r\n else\r\n begin\r\n if hs.Visible then\r\n vmgr.Bottom := hs.Height + 1\r\n else\r\n vmgr.Bottom := 1;\r\n end;\r\n\r\n if not StretchScrollBars then\r\n begin\r\n cr := GetCalculationRect;\r\n hmgr.Left := hmgr.Left + cr.Left;\r\n hmgr.Right := hmgr.Right + (Width - cr.Right);\r\n vmgr.Top := vmgr.Top + cr.Top;\r\n vmgr.Bottom := vmgr.Bottom + (Height - cr.Bottom);\r\n end;\r\n\r\n {$IFDEF FMXLIB}\r\n hs.Position.X := hmgr.Left;\r\n hs.Position.Y := Height - hmgr.Bottom - hs.Height;\r\n vs.Position.X := Width - vmgr.Right - vs.Width;\r\n vs.Position.Y := vmgr.Top;\r\n hs.Width := Width - hmgr.Right - hmgr.Left;\r\n vs.Height := Height - vmgr.Bottom - vmgr.Top;\r\n hsc.Position.X := hmgr.Left;\r\n hsc.Position.Y := Height - hmgr.Bottom - hsc.Height;\r\n vsc.Position.X := Width - vmgr.Right - vsc.Width;\r\n vsc.Position.Y := vmgr.Top;\r\n hsc.Width := Width - hmgr.Right - hmgr.Left;\r\n vsc.Height := Height - vmgr.Bottom - vmgr.Top;\r\n {$ENDIF}\r\n {$IFDEF CMNWEBLIB}\r\n hs.Left := Round(hmgr.Left);\r\n hs.Top := Round(Height - hmgr.Bottom - hs.Height);\r\n vs.Left := Round(Width - vmgr.Right - vs.Width);\r\n vs.Top := Round(vmgr.Top);\r\n hs.Width := Round(Max(0, Width - hmgr.Right - hmgr.Left));\r\n vs.Height := Round(Max(0, Height - vmgr.Bottom - vmgr.Top));\r\n {$IFDEF MSWINDOWS}\r\n vs.Width := GetSystemMetrics(SM_CYVSCROLL);\r\n hs.Height := GetSystemMetrics(SM_CYHSCROLL);\r\n {$ENDIF}\r\n vs.Height := Round(Max(0, Height - vmgr.Bottom - vmgr.Top));\r\n hsc.Left := Round(hmgr.Left);\r\n hsc.Top := Round(Height - hmgr.Bottom - hsc.Height);\r\n vsc.Left := Round(Width - vmgr.Right - vsc.Width);\r\n vsc.Top := Round(vmgr.Top);\r\n hsc.Width := Round(Max(0, Width - hmgr.Right - hmgr.Left));\r\n vsc.Height := Round(Max(0, Height - vmgr.Bottom - vmgr.Top));\r\n {$ENDIF}\r\n\r\n hmgr.Free;\r\n vmgr.Free;\r\n\r\n cr := GetContentRect;\r\n cw := cr.Right - cr.Left;\r\n ch := cr.Bottom - cr.Top;\r\n\r\n {$IFDEF FMXLIB}\r\n if ScrollMode = smNodeScrolling then\r\n begin\r\n vs.ViewportSize := GetRowViewPortSize;\r\n vs.Max := RowCount;\r\n end\r\n else\r\n begin\r\n vs.ViewPortSize := Min(h, ch);\r\n vs.Max := h;\r\n vs.SmallChange := Round(DefaultRowHeight);\r\n vs.Value := Min(vs.Value, vs.Max - vs.ViewportSize);\r\n end;\r\n\r\n if ScrollMode = smNodeScrolling then\r\n begin\r\n hs.ViewportSize := GetColumnViewPortSize;\r\n hs.Max := ColumnCount;\r\n end\r\n else\r\n begin\r\n hs.ViewPortSize := Min(w, cw);\r\n hs.Max := w;\r\n hs.Value := Min(hs.Value, hs.Max - hs.ViewportSize);\r\n end;\r\n {$ENDIF}\r\n {$IFDEF CMNWEBLIB}\r\n if ScrollMode = smNodeScrolling then\r\n begin\r\n vs.PageSize := Round(Max(0, GetRowViewPortSize));\r\n vs.Max := Max(vs.PageSize, RowCount);\r\n end\r\n else\r\n begin\r\n vs.PageSize := Round(Max(0, Min(h, ch)));\r\n vs.Max := Round(Max(vs.PageSize, h));\r\n vs.SmallChange := Round(DefaultRowHeight);\r\n vs.LargeChange := Max(1, vs.PageSize);\r\n vs.Position := Min(vs.Position, vs.Max);\r\n end;\r\n\r\n if ScrollMode = smNodeScrolling then\r\n begin\r\n hs.PageSize := Round(Max(0, GetColumnViewPortSize));\r\n hs.Max := Max(hs.PageSize, ColumnCount);\r\n end\r\n else\r\n begin\r\n hs.PageSize := Round(Max(0, Min(w, cw)));\r\n hs.Max := Round(Max(hs.PageSize, w));\r\n hs.Position := Min(hs.Position, hs.Max);\r\n end;\r\n {$ENDIF}\r\n\r\n if ScrollMode = smNodeScrolling then\r\n begin\r\n vsc.PageSize := GetRowViewPortSize;\r\n vsc.Max := RowCount;\r\n end\r\n else\r\n begin\r\n vsc.PageSize := Min(h, ch);\r\n vsc.Max := h;\r\n vsc.SmallChange := Round(DefaultRowHeight);\r\n vsc.Value := Min(vsc.Value, vsc.Max - vsc.PageSize);\r\n end;\r\n\r\n if ScrollMode = smNodeScrolling then\r\n begin\r\n hsc.PageSize := GetColumnViewPortSize;\r\n hsc.Max := ColumnCount;\r\n end\r\n else\r\n begin\r\n hsc.PageSize := Min(w, cw);\r\n hsc.Max := w;\r\n hsc.Value := Min(hsc.Value, hsc.Max - hsc.PageSize);\r\n end;\r\n end;\r\n\r\n FBlockScrollingUpdate := False;\r\n\r\n if AUpdate then\r\n UpdateScrollBars(False, False);\r\nend;\r\n\r\n{ TTMSFNCTreeViewDoubleListItem }\r\n\r\nconstructor TTMSFNCTreeViewDoubleListItem.Create(ACollection: TCollection);\r\nbegin\r\n inherited;\r\n if Assigned(Collection) then\r\n FOwner := (Collection as TTMSFNCTreeViewDoubleList).FOwner;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewDoubleListItem.SetCellData(const Value: Double);\r\nbegin\r\n FValue := Value;\r\nend;\r\n\r\n{ TTMSFNCTreeViewDoubleList }\r\n\r\nfunction TTMSFNCTreeViewDoubleList.Add: TTMSFNCTreeViewDoubleListItem;\r\nbegin\r\n Result := TTMSFNCTreeViewDoubleListItem(inherited Add);\r\nend;\r\n\r\nconstructor TTMSFNCTreeViewDoubleList.Create(AOwner: TTMSFNCTreeViewBase);\r\nbegin\r\n inherited Create(AOwner, TTMSFNCTreeViewDoubleListItem);\r\n FOwner := AOwner;\r\nend;\r\n\r\nfunction TTMSFNCTreeViewDoubleList.GetItem(\r\n Index: Integer): TTMSFNCTreeViewDoubleListItem;\r\nbegin\r\n Result := TTMSFNCTreeViewDoubleListItem(inherited Items[Index]);\r\nend;\r\n\r\nfunction TTMSFNCTreeViewDoubleList.IndexOf(ACellVal: Integer): Integer;\r\nvar\r\n r: Integer;\r\nbegin\r\n Result := -1;\r\n for r := 0 to Count - 1 do\r\n begin\r\n if Items[r].CellVal = ACellVal then\r\n begin\r\n Result := r;\r\n Exit;\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCTreeViewDoubleList.Insert(\r\n Index: Integer): TTMSFNCTreeViewDoubleListItem;\r\nbegin\r\n Result := TTMSFNCTreeViewDoubleListItem(inherited Insert(Index));\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewDoubleList.SetItem(Index: Integer;\r\n const Value: TTMSFNCTreeViewDoubleListItem);\r\nbegin\r\n inherited Items[Index] := Value;\r\nend;\r\n\r\n\r\nend.\r\n","{********************************************************************}\r\n{ }\r\n{ written by TMS Software }\r\n{ copyright (c) 2016 - 2024 }\r\n{ Email : info@tmssoftware.com }\r\n{ Web : https://www.tmssoftware.com }\r\n{ }\r\n{ The source code is given as is. The author is not responsible }\r\n{ for any possible damage done due to the use of this code. }\r\n{ The complete source code remains property of the author and may }\r\n{ not be distributed, published, given or sold in any form as such. }\r\n{ No parts of the source code can be included in any other component }\r\n{ or application without written authorization of the author. }\r\n{********************************************************************}\r\n\r\nunit WEBLib.TMSFNCTreeViewData;\r\n\r\n{$I WEBLib.TMSFNCDefines.inc}\r\n\r\n{$IFDEF WEBLIB}\r\n{$DEFINE CMNWEBLIB}\r\n{$DEFINE LCLWEBLIB}\r\n{$ENDIF}\r\n{$IFDEF CMNLIB}\r\n{$DEFINE CMNWEBLIB}\r\n{$ENDIF}\r\n{$IFDEF LCLLIB}\r\n{$DEFINE LCLWEBLIB}\r\n{$ENDIF}\r\n\r\n{$IFNDEF LCLLIB}\r\n{$IFNDEF WEBLIB}\r\n{$HINTS OFF}\r\n{$IF COMPILERVERSION > 22}\r\n{$DEFINE USEOWNEDCOLLECTION}\r\n{$IFEND}\r\n{$HINTS ON}\r\n{$ENDIF}\r\n{$ENDIF}\r\n\r\n{$IFDEF LCLLIB}\r\n{$DEFINE USEOWNEDCOLLECTION}\r\n{$ENDIF}\r\n\r\ninterface\r\n\r\nuses\r\n Classes, WEBLib.TMSFNCTypes, WEBLib.TMSFNCGraphicsTypes,\r\n WEBLib.TMSFNCBitmapContainer, WEBLib.TMSFNCTreeViewBase\r\n {$IFNDEF LCLLIB}\r\n {$IFNDEF WEBLIB}\r\n ,Generics.Collections, Types\r\n {$ENDIF}\r\n {$ENDIF}\r\n {$IFDEF LCLLIB}\r\n ,fgl\r\n {$ENDIF}\r\n {$IFDEF WEBLIB}\r\n ,Contnrs\r\n {$ENDIF}\r\n ;\r\n\r\nresourcestring\r\n sTMSFNCTreeViewGroup = 'Group';\r\n sTMSFNCTreeViewColumn = 'Column';\r\n\r\nconst\r\n {$IFDEF FMXMOBILE}\r\n MAXLEVELDEPTH = 100;\r\n MAXNODECOUNT = 1000000;\r\n {$ELSE}\r\n MAXLEVELDEPTH = 100;\r\n MAXNODECOUNT = 2000000;\r\n {$ENDIF}\r\n\r\ntype\r\n TTMSFNCTreeViewCacheItem = class;\r\n TTMSFNCTreeViewData = class;\r\n TTMSFNCTreeViewGroup = class;\r\n TTMSFNCTreeViewColumn = class;\r\n\r\n TTMSFNCTreeViewNode = class;\r\n\r\n TTMSFNCTreeViewNodeScrollPosition = (tvnspTop, tvnspBottom, tvnspMiddle);\r\n\r\n TTMSFNCTreeViewVirtualNodeRemoveData = record\r\n RowIndex: Integer;\r\n Count: Integer;\r\n ParentNode: Integer;\r\n end;\r\n\r\n TTMSFNCArrayTRectF = array of TRectF;\r\n TTMSFNCArrayBoolean = array of Boolean;\r\n\r\n TTMSFNCTreeViewVirtualNode = class\r\n private\r\n FTreeView: TTMSFNCTreeViewData;\r\n FLevel: Integer;\r\n FAddedToVisibleList: Boolean;\r\n FChildren: Integer;\r\n FParentNode: Integer;\r\n FExpanded: Boolean;\r\n FTotalChildren: Integer;\r\n FIndex: Integer;\r\n FRow: Integer;\r\n FHeight: Double;\r\n FCalculated: Boolean;\r\n FCache: TTMSFNCTreeViewCacheItem;\r\n FTextRects: TTMSFNCArrayTRectF;\r\n FBitmapRects: TTMSFNCArrayTRectF;\r\n FExpandRects: TTMSFNCArrayTRectF;\r\n FCheckRects: TTMSFNCArrayTRectF;\r\n FCheckStates: TTMSFNCArrayBoolean;\r\n FNode: TTMSFNCTreeViewNode;\r\n FExtended: Boolean;\r\n FExtraRects: TTMSFNCArrayTRectF;\r\n FTitleRects: TTMSFNCArrayTRectF;\r\n FTitleHeight: Double;\r\n FTitleExtraRects: TTMSFNCArrayTRectF;\r\n FDataPointer: Pointer;\r\n FDataBoolean: Boolean;\r\n FDataString: String;\r\n FDataObject: TObject;\r\n FDataInteger: NativeInt;\r\n function GetText(AColumn: Integer): String;\r\n function GetTitle(AColumn: Integer): String;\r\n function GetTitleExpanded(AColumn: Integer): Boolean;\r\n protected\r\n property Cache: TTMSFNCTreeViewCacheItem read FCache;\r\n public\r\n function GetParent: TTMSFNCTreeViewVirtualNode; virtual;\r\n function GetChildCount: Integer; virtual;\r\n function GetPrevious: TTMSFNCTreeViewVirtualNode; virtual;\r\n function GetNext: TTMSFNCTreeViewVirtualNode; virtual;\r\n function GetPreviousChild(ANode: TTMSFNCTreeViewVirtualNode): TTMSFNCTreeViewVirtualNode; virtual;\r\n function GetNextChild(ANode: TTMSFNCTreeViewVirtualNode): TTMSFNCTreeViewVirtualNode; virtual;\r\n function GetNextSibling: TTMSFNCTreeViewVirtualNode; virtual;\r\n function GetPreviousSibling: TTMSFNCTreeViewVirtualNode; virtual;\r\n function GetFirstChild: TTMSFNCTreeViewVirtualNode; virtual;\r\n function GetLastChild: TTMSFNCTreeViewVirtualNode; virtual;\r\n procedure RemoveChildren; virtual;\r\n procedure Expand(ARecurse: Boolean = False); virtual;\r\n procedure Collapse(ARecurse: Boolean = False); virtual;\r\n\r\n property Children: Integer read FChildren;\r\n property TotalChildren: Integer read FTotalChildren;\r\n property Expanded: Boolean read FExpanded;\r\n property Extended: Boolean read FExtended;\r\n property Level: Integer read FLevel;\r\n property Row: Integer read FRow;\r\n property Calculated: Boolean read FCalculated;\r\n property Height: Double read FHeight;\r\n property TitleHeight: Double read FTitleHeight;\r\n property ParentNode: Integer read FParentNode;\r\n property Index: Integer read FIndex;\r\n property ExtraRects: TTMSFNCArrayTRectF read FExtraRects;\r\n property TextRects: TTMSFNCArrayTRectF read FTextRects;\r\n property TitleRects: TTMSFNCArrayTRectF read FTitleRects;\r\n property TitleExtraRects: TTMSFNCArrayTRectF read FTitleExtraRects;\r\n property BitmapRects: TTMSFNCArrayTRectF read FBitmapRects;\r\n property CheckRects: TTMSFNCArrayTRectF read FCheckRects;\r\n property ExpandRects: TTMSFNCArrayTRectF read FExpandRects;\r\n property CheckStates: TTMSFNCArrayBoolean read FCheckStates;\r\n property Node: TTMSFNCTreeViewNode read FNode;\r\n property Text[AColumn: Integer]: String read GetText;\r\n property Title[AColumn: Integer]: String read GetTitle;\r\n property TitleExpanded[AColumn: Integer]: Boolean read GetTitleExpanded;\r\n property Visible: Boolean read FAddedToVisibleList;\r\n\r\n property DataPointer: Pointer read FDataPointer write FDataPointer;\r\n property DataBoolean: Boolean read FDataBoolean write FDataBoolean;\r\n property DataObject: TObject read FDataObject write FDataObject;\r\n property DataString: String read FDataString write FDataString;\r\n property DataInteger: NativeInt read FDataInteger write FDataInteger;\r\n\r\n procedure CopyFrom(Source: TTMSFNCTreeViewVirtualNode); virtual;\r\n constructor Create(ATreeView: TTMSFNCTreeViewData);\r\n destructor Destroy; override;\r\n end;\r\n\r\n TTMSFNCTreeViewCacheItemKind = (ikNode, ikColumnTop, ikColumnBottom, ikGroupTop, ikGroupBottom);\r\n\r\n TTMSFNCTreeViewCacheItem = class\r\n private\r\n FRect: TRectF;\r\n FDrawRect: TRectF;\r\n FKind: TTMSFNCTreeViewCacheItemKind;\r\n FGroup: Integer;\r\n FColumn: Integer;\r\n FNode: TTMSFNCTreeViewVirtualNode;\r\n FRow: Integer;\r\n FCol: Integer;\r\n FStartColumn: Integer;\r\n FEndColumn: Integer;\r\n public\r\n class function CreateNode(ARect: TRectF; ANode: TTMSFNCTreeViewVirtualNode): TTMSFNCTreeViewCacheItem;\r\n class function CreateColumnTop(ARect: TRectF; AColumn: Integer): TTMSFNCTreeViewCacheItem;\r\n class function CreateGroupTop(ARect: TRectF; AGroup: Integer; AStartColumn, AEndColumn: Integer): TTMSFNCTreeViewCacheItem;\r\n class function CreateColumnBottom(ARect: TRectF; AColumn: Integer): TTMSFNCTreeViewCacheItem;\r\n class function CreateGroupBottom(ARect: TRectF; AGroup: Integer; AStartColumn, AEndColumn: Integer): TTMSFNCTreeViewCacheItem;\r\n\r\n property Rect: TRectF read FRect write FRect;\r\n property DrawRect: TRectF read FDrawRect write FDrawRect;\r\n property Kind: TTMSFNCTreeViewCacheItemKind read FKind write FKind;\r\n property Node: TTMSFNCTreeViewVirtualNode read FNode write FNode;\r\n property Group: Integer read FGroup write FGroup;\r\n property StartColumn: Integer read FStartColumn write FStartColumn;\r\n property EndColumn: Integer read FEndColumn write FEndColumn;\r\n property Column: Integer read FColumn write FColumn;\r\n property Col: Integer read FCol write FCol;\r\n property Row: Integer read FRow write FRow;\r\n destructor Destroy; override;\r\n end;\r\n\r\n {$IFDEF WEBLIB}\r\n TTMSFNCTreeViewCacheItemList = class(TList)\r\n private\r\n function GetItem(Index: Integer): TTMSFNCTreeViewCacheItem;\r\n procedure SetItem(Index: Integer; const Value: TTMSFNCTreeViewCacheItem);\r\n public\r\n property Items[Index: Integer]: TTMSFNCTreeViewCacheItem read GetItem write SetItem; default;\r\n end;\r\n TTMSFNCTreeViewIntegerList = class(TList)\r\n private\r\n function GetItem(Index: Integer): Integer;\r\n procedure SetItem(Index: Integer; const Value: Integer);\r\n public\r\n property Items[Index: Integer]: Integer read GetItem write SetItem; default;\r\n end;\r\n {$ENDIF}\r\n {$IFNDEF WEBLIB}\r\n TTMSFNCTreeViewCacheItemList = class(TList);\r\n TTMSFNCTreeViewIntegerList = class(TList);\r\n {$ENDIF}\r\n TTMSFNCTreeViewVirtualNodeArray = array of TTMSFNCTreeViewVirtualNode;\r\n\r\n TTMSFNCTreeViewColumnEditorType = (tcetEdit, tcetComboBox, tcetMemo, tcetNone);\r\n\r\n TTMSFNCTreeViewNodesSortMode = (nsmAscending, nsmDescending);\r\n TTMSFNCTreeViewNodesSortKind = (nskNone, nskAscending, nskDescending);\r\n TTMSFNCTreeViewColumnSorting = (tcsNone, tcsNormal, tcsRecursive, tcsNormalCaseSensitive, tcsRecursiveCaseSensitive);\r\n\r\n TTMSFNCTreeViewColumnFiltering = class(TPersistent)\r\n private\r\n FColumn: TTMSFNCTreeViewColumn;\r\n FEnabled: Boolean;\r\n FMultiColumn: boolean;\r\n FDropDownHeight: integer;\r\n FDropDownWidth: integer;\r\n FButtonSize: Single;\r\n procedure SetEnabled(const Value: Boolean);\r\n function IsButtonSizeStored: Boolean;\r\n procedure SetButtonSize(const Value: Single);\r\n public\r\n constructor Create(AColumn: TTMSFNCTreeViewColumn);\r\n destructor Destroy; override;\r\n procedure Assign(Source: TPersistent); override;\r\n published\r\n property Enabled: Boolean read FEnabled write SetEnabled default False;\r\n property DropDownWidth: integer read FDropDownWidth write FDropDownWidth default 100;\r\n property DropDownHeight: integer read FDropDownHeight write FDropDownHeight default 120;\r\n property MultiColumn: boolean read FMultiColumn write FMultiColumn default false;\r\n property ButtonSize: Single read FButtonSize write SetButtonSize stored IsButtonSizeStored nodefault;\r\n end;\r\n\r\n TTMSFNCTreeViewFilterOperation = (tfoSHORT, tfoNONE, tfoAND, tfoXOR, tfoOR);\r\n\r\n TTMSFNCTreeViewFilterData = class(TCollectionItem)\r\n private\r\n FColumn: SmallInt;\r\n FCondition: string;\r\n FCaseSensitive: Boolean;\r\n FSuffix: string;\r\n FPrefix: string;\r\n FOperation: TTMSFNCTreeViewFilterOperation;\r\n public\r\n constructor Create(ACollection: TCollection); override;\r\n procedure Assign(Source: TPersistent); override;\r\n published\r\n property Column: smallint read FColumn write FColumn;\r\n property Condition:string read FCondition write FCondition;\r\n property CaseSensitive: Boolean read FCaseSensitive write FCaseSensitive default True;\r\n property Prefix: string read FPrefix write FPrefix;\r\n property Suffix: string read FSuffix write FSuffix;\r\n property Operation: TTMSFNCTreeViewFilterOperation read FOperation write FOperation;\r\n end;\r\n\r\n {$IFNDEF USEOWNEDCOLLECTION}\r\n TTMSFNCTreeViewFilter = class(TTMSFNCOwnedCollection)\r\n {$ENDIF}\r\n {$IFDEF USEOWNEDCOLLECTION}\r\n TTMSFNCTreeViewFilter = class({$IFDEF LCLLIB}specialize {$ENDIF}TTMSFNCOwnedCollection)\r\n {$ENDIF}\r\n private\r\n FOwner: TTMSFNCTreeViewData;\r\n function GetItem(Index: Integer): TTMSFNCTreeViewFilterData;\r\n procedure SetItem(Index: Integer; const Value: TTMSFNCTreeViewFilterData);\r\n function GetColFilter(Col: Integer): TTMSFNCTreeViewFilterData;\r\n public\r\n constructor Create(AOwner: TTMSFNCTreeViewData);\r\n function Add: TTMSFNCTreeViewFilterData;\r\n function Insert(index: Integer): TTMSFNCTreeViewFilterData;\r\n property Items[Index: Integer]: TTMSFNCTreeViewFilterData read GetItem write SetItem; default;\r\n property ColumnFilter[Col: Integer]: TTMSFNCTreeViewFilterData read GetColFilter;\r\n function HasFilter(Col: integer): Boolean;\r\n procedure RemoveColumnFilter(Col: integer);\r\n end;\r\n\r\n TTMSFNCTreeViewColumn = class(TCollectionItem)\r\n private\r\n FSortKind: TTMSFNCTreeViewNodesSortKind;\r\n FTag: NativeInt;\r\n FDataString: String;\r\n FDataObject: TObject;\r\n FDataInteger: NativeInt;\r\n FTreeView: TTMSFNCTreeViewData;\r\n FText: String;\r\n FName: String;\r\n FDBKey: String;\r\n FDataBoolean: Boolean;\r\n FWordWrapping: Boolean;\r\n FVerticalTextAlign: TTMSFNCGraphicsTextAlign;\r\n FTrimming: TTMSFNCGraphicsTextTrimming;\r\n FHorizontalTextAlign: TTMSFNCGraphicsTextAlign;\r\n FWidth: Double;\r\n FVisible: Boolean;\r\n FUseDefaultAppearance: Boolean;\r\n FBottomFill: TTMSFNCGraphicsFill;\r\n FBottomStroke: TTMSFNCGraphicsStroke;\r\n FTopFill: TTMSFNCGraphicsFill;\r\n FTopStroke: TTMSFNCGraphicsStroke;\r\n FTopFont: TTMSFNCGraphicsFont;\r\n FBottomFont: TTMSFNCGraphicsFont;\r\n FFont: TTMSFNCGraphicsFont;\r\n FFill: TTMSFNCGraphicsFill;\r\n FStroke: TTMSFNCGraphicsStroke;\r\n FEditorType: TTMSFNCTreeViewColumnEditorType;\r\n FDisabledFontColor: TTMSFNCGraphicsColor;\r\n FSelectedFontColor: TTMSFNCGraphicsColor;\r\n FEditorItems: TStringList;\r\n FCustomEditor: Boolean;\r\n FSorting: TTMSFNCTreeViewColumnSorting;\r\n FSortIndex: Integer;\r\n FFiltering: TTMSFNCTreeViewColumnFiltering;\r\n FDataPointer: Pointer;\r\n FTitleTrimming: TTMSFNCGraphicsTextTrimming;\r\n FTitleHorizontalTextAlign: TTMSFNCGraphicsTextAlign;\r\n FTitleWordWrapping: Boolean;\r\n FTitleVerticalTextAlign: TTMSFNCGraphicsTextAlign;\r\n FDisabledTitleFontColor: TTMSFNCGraphicsColor;\r\n FSelectedTitleFontColor: TTMSFNCGraphicsColor;\r\n FTitleFont: TTMSFNCGraphicsFont;\r\n FExpanded: Boolean;\r\n FExpandable: Boolean;\r\n FExpandingButtonSize: Single;\r\n FHTMLTemplate: string;\r\n FMinimumWidth: Double;\r\n procedure SetText(const Value: String);\r\n procedure SetName(const Value: String);\r\n procedure SetHorizontalTextAlign(const Value: TTMSFNCGraphicsTextAlign);\r\n procedure SetTrimming(const Value: TTMSFNCGraphicsTextTrimming);\r\n procedure SetVerticalTextAlign(const Value: TTMSFNCGraphicsTextAlign);\r\n procedure SetWordWrapping(const Value: Boolean);\r\n procedure SetWidth(const Value: Double);\r\n procedure SetVisible(const Value: Boolean);\r\n procedure SetUseDefaultAppearance(const Value: Boolean);\r\n procedure SetBottomFill(const Value: TTMSFNCGraphicsFill);\r\n procedure SetBottomStroke(const Value: TTMSFNCGraphicsStroke);\r\n procedure SetTopFill(const Value: TTMSFNCGraphicsFill);\r\n procedure SetTopStroke(const Value: TTMSFNCGraphicsStroke);\r\n procedure SetBottomFont(const Value: TTMSFNCGraphicsFont);\r\n procedure SetTopFont(const Value: TTMSFNCGraphicsFont);\r\n procedure SetFill(const Value: TTMSFNCGraphicsFill);\r\n procedure SetFont(const Value: TTMSFNCGraphicsFont);\r\n procedure SetStroke(const Value: TTMSFNCGraphicsStroke);\r\n procedure SetEditorType(const Value: TTMSFNCTreeViewColumnEditorType);\r\n procedure SetDisabledFontColor(const Value: TTMSFNCGraphicsColor);\r\n procedure SetSelectedFontColor(const Value: TTMSFNCGraphicsColor);\r\n procedure SetEditorItems(const Value: TStringList);\r\n procedure SetSorting(const Value: TTMSFNCTreeViewColumnSorting);\r\n procedure SetSortKind(const Value: TTMSFNCTreeViewNodesSortKind);\r\n procedure SetSortIndex(const Value: Integer);\r\n procedure SetFiltering(const Value: TTMSFNCTreeViewColumnFiltering);\r\n procedure SetTitleHorizontalTextAlign(\r\n const Value: TTMSFNCGraphicsTextAlign);\r\n procedure SetTitleTrimming(const Value: TTMSFNCGraphicsTextTrimming);\r\n procedure SetTitleVerticalTextAlign(const Value: TTMSFNCGraphicsTextAlign);\r\n procedure SetTitleWordWrapping(const Value: Boolean);\r\n procedure SetDisabledTitleFontColor(const Value: TTMSFNCGraphicsColor);\r\n procedure SetSelectedTitleFontColor(const Value: TTMSFNCGraphicsColor);\r\n procedure SetTitleFont(const Value: TTMSFNCGraphicsFont);\r\n procedure SetExpanded(const Value: Boolean);\r\n procedure SetExpandable(const Value: Boolean);\r\n function IsExpandingButtonSizeStored: Boolean;\r\n procedure SetExpandingButtonSize(const Value: Single);\r\n procedure SetHTMLTemplate(const Value: string);\r\n procedure SetMinimumWidth(const Value: Double);\r\n protected\r\n procedure UpdateColumn;\r\n procedure Changed(Sender: TObject);\r\n function GetText: String; virtual;\r\n function GetColumnText: String; virtual;\r\n function GetDisplayName: string; override;\r\n property SortIndex: Integer read FSortIndex write SetSortIndex default -1;\r\n public\r\n function TreeView: TTMSFNCTreeViewData;\r\n constructor Create(ACollection: TCollection); override;\r\n destructor Destroy; override;\r\n procedure Assign(Source: TPersistent); override;\r\n procedure UpdateWidth(AWidth: Double); virtual;\r\n procedure Sort(ARecurse: Boolean = False; ACaseSensitive: Boolean = True; ASortingMode: TTMSFNCTreeViewNodesSortMode = nsmAscending); virtual;\r\n property DataPointer: Pointer read FDataPointer write FDataPointer;\r\n property DataBoolean: Boolean read FDataBoolean write FDataBoolean;\r\n property DataObject: TObject read FDataObject write FDataObject;\r\n property DataString: String read FDataString write FDataString;\r\n property DataInteger: NativeInt read FDataInteger write FDataInteger;\r\n property DBKey: String read FDBKey write FDBKey;\r\n property SortKind: TTMSFNCTreeViewNodesSortKind read FSortKind write SetSortKind default nskNone;\r\n property TitleHorizontalTextAlign: TTMSFNCGraphicsTextAlign read FTitleHorizontalTextAlign write SetTitleHorizontalTextAlign default gtaLeading;\r\n property TitleVerticalTextAlign: TTMSFNCGraphicsTextAlign read FTitleVerticalTextAlign write SetTitleVerticalTextAlign default gtaCenter;\r\n property TitleWordWrapping: Boolean read FTitleWordWrapping write SetTitleWordWrapping default False;\r\n property TitleTrimming: TTMSFNCGraphicsTextTrimming read FTitleTrimming write SetTitleTrimming default gttNone;\r\n property TitleFont: TTMSFNCGraphicsFont read FTitleFont write SetTitleFont;\r\n property SelectedTitleFontColor: TTMSFNCGraphicsColor read FSelectedTitleFontColor write SetSelectedTitleFontColor default gcWhite;\r\n property DisabledTitleFontColor: TTMSFNCGraphicsColor read FDisabledTitleFontColor write SetDisabledTitleFontColor default gcSilver;\r\n property Expandable: Boolean read FExpandable write SetExpandable default False;\r\n property Expanded: Boolean read FExpanded write SetExpanded default True;\r\n property ExpandingButtonSize: Single read FExpandingButtonSize write SetExpandingButtonSize stored IsExpandingButtonSizeStored nodefault;\r\n published\r\n property EditorType: TTMSFNCTreeViewColumnEditorType read FEditorType write SetEditorType default tcetNone;\r\n property EditorItems: TStringList read FEditorItems write SetEditorItems;\r\n property CustomEditor: Boolean read FCustomEditor write FCustomEditor default False;\r\n\r\n property Name: String read FName write SetName;\r\n property Text: String read FText write SetText;\r\n property Tag: NativeInt read FTag write FTag default 0;\r\n property HorizontalTextAlign: TTMSFNCGraphicsTextAlign read FHorizontalTextAlign write SetHorizontalTextAlign default gtaLeading;\r\n property VerticalTextAlign: TTMSFNCGraphicsTextAlign read FVerticalTextAlign write SetVerticalTextAlign default gtaCenter;\r\n property WordWrapping: Boolean read FWordWrapping write SetWordWrapping default False;\r\n property Trimming: TTMSFNCGraphicsTextTrimming read FTrimming write SetTrimming default gttNone;\r\n property MinimumWidth: Double read FMinimumWidth write SetMinimumWidth;\r\n property Width: Double read FWidth write SetWidth;\r\n property Visible: Boolean read FVisible write SetVisible default True;\r\n property UseDefaultAppearance: Boolean read FUseDefaultAppearance write SetUseDefaultAppearance default True;\r\n property Fill: TTMSFNCGraphicsFill read FFill write SetFill;\r\n property Stroke: TTMSFNCGraphicsStroke read FStroke write SetStroke;\r\n property Font: TTMSFNCGraphicsFont read FFont write SetFont;\r\n property SelectedFontColor: TTMSFNCGraphicsColor read FSelectedFontColor write SetSelectedFontColor default gcWhite;\r\n property DisabledFontColor: TTMSFNCGraphicsColor read FDisabledFontColor write SetDisabledFontColor default gcSilver;\r\n\r\n property TopFill: TTMSFNCGraphicsFill read FTopFill write SetTopFill;\r\n property TopStroke: TTMSFNCGraphicsStroke read FTopStroke write SetTopStroke;\r\n property TopFont: TTMSFNCGraphicsFont read FTopFont write SetTopFont;\r\n\r\n property BottomFill: TTMSFNCGraphicsFill read FBottomFill write SetBottomFill;\r\n property BottomStroke: TTMSFNCGraphicsStroke read FBottomStroke write SetBottomStroke;\r\n property BottomFont: TTMSFNCGraphicsFont read FBottomFont write SetBottomFont;\r\n property Sorting: TTMSFNCTreeViewColumnSorting read FSorting write SetSorting default tcsNone;\r\n property Filtering: TTMSFNCTreeViewColumnFiltering read FFiltering write SetFiltering;\r\n property HTMLTemplate: string read FHTMLTemplate write SetHTMLTemplate;\r\n end;\r\n\r\n {$IFNDEF USEOWNEDCOLLECTION}\r\n TTMSFNCTreeViewColumns = class(TTMSFNCOwnedCollection)\r\n {$ENDIF}\r\n {$IFDEF USEOWNEDCOLLECTION}\r\n TTMSFNCTreeViewColumns = class({$IFDEF LCLLIB}specialize {$ENDIF}TTMSFNCOwnedCollection)\r\n {$ENDIF}\r\n private\r\n FTreeView: TTMSFNCTreeViewData;\r\n function GetItem(Index: Integer): TTMSFNCTreeViewColumn;\r\n procedure SetItem(Index: Integer; const Value: TTMSFNCTreeViewColumn);\r\n protected\r\n function GetItemClass: TCollectionItemClass; virtual;\r\n public\r\n function TreeView: TTMSFNCTreeViewData;\r\n constructor Create(ATreeView: TTMSFNCTreeViewData);\r\n function Add: TTMSFNCTreeViewColumn; virtual;\r\n function Insert(Index: Integer): TTMSFNCTreeViewColumn;\r\n property Items[Index: Integer]: TTMSFNCTreeViewColumn read GetItem write SetItem; default;\r\n end;\r\n\r\n TTMSFNCTreeViewNodes = class;\r\n TTMSFNCTreeViewNodeCheckType = (tvntNone, tvntCheckBox, tvntRadioButton);\r\n\r\n TTMSFNCTreeViewNodeValue = class(TCollectionItem)\r\n private\r\n FTag: NativeInt;\r\n FDataString: String;\r\n FDataObject: TObject;\r\n FDataInteger: NativeInt;\r\n FTreeView: TTMSFNCTreeViewData;\r\n FNode: TTMSFNCTreeViewNode;\r\n FText: String;\r\n FDBKey: String;\r\n FDataBoolean: Boolean;\r\n FCheckType: TTMSFNCTreeViewNodeCheckType;\r\n FChecked: Boolean;\r\n FCollapsedIcon: TTMSFNCBitmap;\r\n FCollapsedIconLarge: TTMSFNCBitmap;\r\n FExpandedIcon: TTMSFNCBitmap;\r\n FExpandedIconLarge: TTMSFNCBitmap;\r\n FCollapsedIconName: String;\r\n FCollapsedIconLargeName: String;\r\n FExpandedIconName: String;\r\n FExpandedIconLargeName: String;\r\n FDataPointer: Pointer;\r\n FTitle: String;\r\n FTitleExpanded: Boolean;\r\n FHTMLTemplateItems: TStringList;\r\n procedure SetText(const Value: String);\r\n procedure UpdateNodeValue;\r\n procedure SetChecked(const Value: Boolean);\r\n procedure SetCheckType(const Value: TTMSFNCTreeViewNodeCheckType);\r\n procedure SetCollapsedIconLarge(const Value: TTMSFNCBitmap);\r\n procedure SetCollapsedIcon(const Value: TTMSFNCBitmap);\r\n procedure SetExpandedIconLarge(const Value: TTMSFNCBitmap);\r\n procedure SetExpandedIcon(const Value: TTMSFNCBitmap);\r\n procedure SetCollapsedIconLargeName(const Value: String);\r\n procedure SetCollapsedIconName(const Value: String);\r\n procedure SetExpandedIconLargeName(const Value: String);\r\n procedure SetExpandedIconName(const Value: String);\r\n function GetBitmapContainer: TTMSFNCBitmapContainer;\r\n procedure SetTitle(const Value: String);\r\n procedure SetTitleExpanded(const Value: Boolean);\r\n procedure SetHTMLTemplateItems(const Value: TStringList);\r\n protected\r\n procedure BitmapChanged(Sender: TObject);\r\n procedure TemplateItemsChanged(Sender: TObject);\r\n property Title: String read FTitle write SetTitle;\r\n property TitleExpanded: Boolean read FTitleExpanded write SetTitleExpanded default True;\r\n public\r\n function TreeView: TTMSFNCTreeViewData;\r\n function Node: TTMSFNCTreeViewNode;\r\n function GetText: string;\r\n constructor Create(ACollection: TCollection); override;\r\n destructor Destroy; override;\r\n procedure Assign(Source: TPersistent); override;\r\n procedure AssignData(Source: TPersistent); virtual;\r\n property BitmapContainer: TTMSFNCBitmapContainer read GetBitmapContainer;\r\n property DataPointer: Pointer read FDataPointer write FDataPointer;\r\n property DataBoolean: Boolean read FDataBoolean write FDataBoolean;\r\n property DataObject: TObject read FDataObject write FDataObject;\r\n property DataString: String read FDataString write FDataString;\r\n property DataInteger: NativeInt read FDataInteger write FDataInteger;\r\n property DBKey: String read FDBKey write FDBKey;\r\n published\r\n property Tag: NativeInt read FTag write FTag default 0;\r\n property Text: String read FText write SetText;\r\n property CollapsedIconName: String read FCollapsedIconName write SetCollapsedIconName;\r\n property CollapsedIconLargeName: String read FCollapsedIconLargeName write SetCollapsedIconLargeName;\r\n property ExpandedIconName: String read FExpandedIconName write SetExpandedIconName;\r\n property ExpandedIconLargeName: String read FExpandedIconLargeName write SetExpandedIconLargeName;\r\n\r\n property CollapsedIcon: TTMSFNCBitmap read FCollapsedIcon write SetCollapsedIcon;\r\n property CollapsedIconLarge: TTMSFNCBitmap read FCollapsedIconLarge write SetCollapsedIconLarge;\r\n property ExpandedIcon: TTMSFNCBitmap read FExpandedIcon write SetExpandedIcon;\r\n property ExpandedIconLarge: TTMSFNCBitmap read FExpandedIconLarge write SetExpandedIconLarge;\r\n property Checked: Boolean read FChecked write SetChecked default False;\r\n property CheckType: TTMSFNCTreeViewNodeCheckType read FCheckType write SetCheckType default tvntNone;\r\n property HTMLTemplateItems: TStringList read FHTMLTemplateItems write SetHTMLTemplateItems;\r\n end;\r\n\r\n {$IFNDEF USEOWNEDCOLLECTION}\r\n TTMSFNCTreeViewNodeValues = class(TTMSFNCOwnedCollection)\r\n {$ENDIF}\r\n {$IFDEF USEOWNEDCOLLECTION}\r\n TTMSFNCTreeViewNodeValues = class({$IFDEF LCLLIB}specialize {$ENDIF}TTMSFNCOwnedCollection)\r\n {$ENDIF}\r\n private\r\n FTreeView: TTMSFNCTreeViewData;\r\n FNode: TTMSFNCTreeViewNode;\r\n function GetItem(Index: Integer): TTMSFNCTreeViewNodeValue;\r\n procedure SetItem(Index: Integer; const Value: TTMSFNCTreeViewNodeValue);\r\n protected\r\n function GetItemClass: TCollectionItemClass; virtual;\r\n public\r\n function TreeView: TTMSFNCTreeViewData;\r\n function Node: TTMSFNCTreeViewNode;\r\n procedure UpdateChecked(AIndex: Integer; AValue: Boolean); virtual;\r\n constructor Create(ATreeView: TTMSFNCTreeViewData; ANode: TTMSFNCTreeViewNode);\r\n function Add: TTMSFNCTreeViewNodeValue;\r\n function Insert(Index: Integer): TTMSFNCTreeViewNodeValue;\r\n property Items[Index: Integer]: TTMSFNCTreeViewNodeValue read GetItem write SetItem; default;\r\n end;\r\n\r\n TTMSFNCTreeViewNodeTextValues = array of string;\r\n TTMSFNCTreeViewNodeCheckStates = array of Boolean;\r\n TTMSFNCTreeViewNodeCheckTypes = array of TTMSFNCTreeViewNodeCheckType;\r\n TTMSFNCTreeViewNodeIcons = array of TTMSFNCBitmap;\r\n TTMSFNCTreeViewNodeIconNames = array of string;\r\n\r\n TTMSFNCTreeViewNode = class(TCollectionItem)\r\n private\r\n FTag: NativeInt;\r\n FDataString: String;\r\n FDataObject: TObject;\r\n FDataInteger: NativeInt;\r\n FTreeView: TTMSFNCTreeViewData;\r\n FValues: TTMSFNCTreeViewNodeValues;\r\n FDBKey: String;\r\n FDataBoolean: Boolean;\r\n FNodes: TTMSFNCTreeViewNodes;\r\n FVirtualNode: TTMSFNCTreeViewVirtualNode;\r\n FExpanded: Boolean;\r\n FEnabled: Boolean;\r\n FExtended: Boolean;\r\n FDataPointer: Pointer;\r\n procedure SetValues(const Value: TTMSFNCTreeViewNodeValues);\r\n procedure SetNodes(const Value: TTMSFNCTreeViewNodes);\r\n procedure SetExpanded(const Value: Boolean);\r\n procedure SetEnabled(const Value: Boolean);\r\n procedure SetExtended(const Value: Boolean);\r\n function GetChecked(AColumn: integer): Boolean;\r\n procedure SetChecked(AColumn: integer; const Value: Boolean);\r\n function GetCheckType(AColumn: Integer): TTMSFNCTreeViewNodeCheckType;\r\n function GetCollapsedIcon(AColumn: Integer;\r\n ALarge: Boolean): TTMSFNCBitmap;\r\n function GetCollapsedIconName(AColumn: Integer;\r\n ALarge: Boolean): String;\r\n function GetExpandedIcon(AColumn: Integer;\r\n ALarge: Boolean): TTMSFNCBitmap;\r\n function GetExpandedIconName(AColumn: Integer;\r\n ALarge: Boolean): String;\r\n function GetText(AColumn: Integer): String;\r\n procedure SetCheckType(AColumn: Integer;\r\n const Value: TTMSFNCTreeViewNodeCheckType);\r\n procedure SetCollapsedIcon(AColumn: Integer; ALarge: Boolean;\r\n const Value: TTMSFNCBitmap);\r\n procedure SetCollapsedIconName(AColumn: Integer; ALarge: Boolean;\r\n const Value: String);\r\n procedure SetExpandedIcon(AColumn: Integer; ALarge: Boolean;\r\n const Value: TTMSFNCBitmap);\r\n procedure SetExpandedIconName(AColumn: Integer; ALarge: Boolean;\r\n const Value: String);\r\n procedure SetText(AColumn: Integer; const Value: String);\r\n function GetStrippedHTMLText(AColumn: Integer): String;\r\n protected\r\n procedure UpdateNode;\r\n function GetValueForColumn(AColumn: Integer): TTMSFNCTreeViewNodeValue; virtual;\r\n function CreateNodes: TTMSFNCTreeViewNodes; virtual;\r\n function CreateNodeValues: TTMSFNCTreeViewNodeValues; virtual;\r\n procedure SetIndex(Value: Integer); override;\r\n procedure ValuesChanged(Sender: TObject);\r\n public\r\n function TreeView: TTMSFNCTreeViewData;\r\n function GetParent: TTMSFNCTreeViewNode; virtual;\r\n function GetChildCount: Integer; virtual;\r\n function GetPrevious: TTMSFNCTreeViewNode; virtual;\r\n function GetNext: TTMSFNCTreeViewNode; virtual;\r\n function GetPreviousChild(ANode: TTMSFNCTreeViewNode): TTMSFNCTreeViewNode; virtual;\r\n function GetNextChild(ANode: TTMSFNCTreeViewNode): TTMSFNCTreeViewNode; virtual;\r\n function GetNextSibling: TTMSFNCTreeViewNode; virtual;\r\n function GetPreviousSibling: TTMSFNCTreeViewNode; virtual;\r\n function GetFirstChild: TTMSFNCTreeViewNode; virtual;\r\n function GetLastChild: TTMSFNCTreeViewNode; virtual;\r\n function SaveToString(ATextOnly: Boolean = True): String; virtual;\r\n procedure LoadFromString(AString: String); virtual;\r\n procedure RemoveChildren; virtual;\r\n procedure Expand(ARecurse: Boolean = False); virtual;\r\n procedure Collapse(ARecurse: Boolean = False); virtual;\r\n procedure MoveTo(ADestination: TTMSFNCTreeViewNode; AIndex: Integer = -1); virtual;\r\n procedure CopyTo(ADestination: TTMSFNCTreeViewNode; AIndex: Integer = -1); virtual;\r\n procedure SetTextValues(ATextValues: TTMSFNCTreeViewNodeTextValues); virtual;\r\n procedure SetCheckStates(ACheckStates: TTMSFNCTreeViewNodeCheckStates); virtual;\r\n procedure SetCheckTypes(ACheckTypes: TTMSFNCTreeViewNodeCheckTypes); virtual;\r\n procedure SetCollapsedIcons(AIcons: TTMSFNCTreeViewNodeIcons; ALarge: Boolean = False); virtual;\r\n procedure SetExpandedIcons(AIcons: TTMSFNCTreeViewNodeIcons; ALarge: Boolean = False); virtual;\r\n procedure SetCollapsedIconNames(AIconNames: TTMSFNCTreeViewNodeIconNames; ALarge: Boolean = False); virtual;\r\n procedure SetExpandedIconNames(AIconNames: TTMSFNCTreeViewNodeIconNames; ALarge: Boolean = False); virtual;\r\n constructor Create(ACollection: TCollection); override;\r\n destructor Destroy; override;\r\n procedure Assign(Source: TPersistent); override;\r\n procedure AssignData(Source: TPersistent); virtual;\r\n property DataPointer: Pointer read FDataPointer write FDataPointer;\r\n property DataBoolean: Boolean read FDataBoolean write FDataBoolean;\r\n property DataObject: TObject read FDataObject write FDataObject;\r\n property DataString: String read FDataString write FDataString;\r\n property DataInteger: NativeInt read FDataInteger write FDataInteger;\r\n property DBKey: String read FDBKey write FDBKey;\r\n property Checked[AColumn: Integer]: Boolean read GetChecked write SetChecked;\r\n property Text[AColumn: Integer]: String read GetText write SetText;\r\n property StrippedHTMLText[AColumn: Integer]: String read GetStrippedHTMLText;\r\n property CheckTypes[AColumn: Integer]: TTMSFNCTreeViewNodeCheckType read GetCheckType write SetCheckType;\r\n property ExpandedIcons[AColumn: Integer; ALarge: Boolean]: TTMSFNCBitmap read GetExpandedIcon write SetExpandedIcon;\r\n property CollapsedIcons[AColumn: Integer; ALarge: Boolean]: TTMSFNCBitmap read GetCollapsedIcon write SetCollapsedIcon;\r\n property ExpandedIconNames[AColumn: Integer; ALarge: Boolean]: String read GetExpandedIconName write SetExpandedIconName;\r\n property CollapsedIconNames[AColumn: Integer; ALarge: Boolean]: String read GetCollapsedIconName write SetCollapsedIconName;\r\n property VirtualNode: TTMSFNCTreeViewVirtualNode read FVirtualNode;\r\n published\r\n property Values: TTMSFNCTreeViewNodeValues read FValues write SetValues;\r\n property Expanded: Boolean read FExpanded write SetExpanded default False;\r\n property Enabled: Boolean read FEnabled write SetEnabled default True;\r\n property Extended: Boolean read FExtended write SetExtended default False;\r\n property Tag: NativeInt read FTag write FTag;\r\n property Nodes: TTMSFNCTreeViewNodes read FNodes write SetNodes;\r\n end;\r\n\r\n {$IFNDEF USEOWNEDCOLLECTION}\r\n TTMSFNCTreeViewNodes = class(TTMSFNCOwnedCollection)\r\n {$ENDIF}\r\n {$IFDEF USEOWNEDCOLLECTION}\r\n TTMSFNCTreeViewNodes = class({$IFDEF LCLLIB}specialize {$ENDIF}TTMSFNCOwnedCollection)\r\n {$ENDIF}\r\n private\r\n FTreeView: TTMSFNCTreeViewData;\r\n FNode: TTMSFNCTreeViewNode;\r\n function GetItem(Index: Integer): TTMSFNCTreeViewNode;\r\n procedure SetItem(Index: Integer; const Value: TTMSFNCTreeViewNode);\r\n protected\r\n function GetItemClass: TCollectionItemClass; virtual;\r\n function Compare(ANode1, ANode2: TTMSFNCTreeViewNode; AColumn: Integer = 0; ACaseSensitive: Boolean = True; ASortingMode: TTMSFNCTreeViewNodesSortMode = nsmAscending): Integer; virtual;\r\n procedure QuickSort(L, R: Integer; AColumn: Integer = 0; ACaseSensitive: Boolean = True; ASortingMode: TTMSFNCTreeViewNodesSortMode = nsmAscending); virtual;\r\n public\r\n function TreeView: TTMSFNCTreeViewData;\r\n function Node: TTMSFNCTreeViewNode;\r\n constructor Create(ATreeView: TTMSFNCTreeViewData; ANode: TTMSFNCTreeViewNode);\r\n destructor Destroy; override;\r\n function Add: TTMSFNCTreeViewNode;\r\n function Insert(Index: Integer): TTMSFNCTreeViewNode;\r\n property Items[Index: Integer]: TTMSFNCTreeViewNode read GetItem write SetItem; default;\r\n procedure Sort(AColumn: Integer = 0; ARecurse: Boolean = False; ACaseSensitive: Boolean = True; ASortingMode: TTMSFNCTreeViewNodesSortMode = nsmAscending; AClearNodeList: Boolean = True);\r\n end;\r\n\r\n TTMSFNCTreeViewGroup = class(TCollectionItem)\r\n private\r\n FTag: NativeInt;\r\n FDataString: String;\r\n FDataObject: TObject;\r\n FDataInteger: NativeInt;\r\n FTreeView: TTMSFNCTreeViewData;\r\n FText: String;\r\n FStartColumn: Integer;\r\n FEndColumn: Integer;\r\n FName: String;\r\n FDBKey: String;\r\n FDataBoolean: Boolean;\r\n FBottomFill: TTMSFNCGraphicsFill;\r\n FBottomStroke: TTMSFNCGraphicsStroke;\r\n FTopFill: TTMSFNCGraphicsFill;\r\n FTopStroke: TTMSFNCGraphicsStroke;\r\n FTopFont: TTMSFNCGraphicsFont;\r\n FBottomFont: TTMSFNCGraphicsFont;\r\n FUseDefaultAppearance: Boolean;\r\n FDataPointer: Pointer;\r\n procedure SetText(const Value: String);\r\n procedure SetStartColumn(const Value: Integer);\r\n procedure SetEndColumn(const Value: Integer);\r\n procedure SetName(const Value: String);\r\n procedure SetBottomFill(const Value: TTMSFNCGraphicsFill);\r\n procedure SetBottomStroke(const Value: TTMSFNCGraphicsStroke);\r\n procedure SetTopFill(const Value: TTMSFNCGraphicsFill);\r\n procedure SetTopStroke(const Value: TTMSFNCGraphicsStroke);\r\n procedure SetBottomFont(const Value: TTMSFNCGraphicsFont);\r\n procedure SetTopFont(const Value: TTMSFNCGraphicsFont);\r\n procedure SetUseDefaultAppearance(const Value: Boolean);\r\n protected\r\n procedure UpdateGroup;\r\n procedure Changed(Sender: TObject);\r\n public\r\n function TreeView: TTMSFNCTreeViewData;\r\n constructor Create(ACollection: TCollection); override;\r\n destructor Destroy; override;\r\n procedure Assign(Source: TPersistent); override;\r\n property DataPointer: Pointer read FDataPointer write FDataPointer;\r\n property DataBoolean: Boolean read FDataBoolean write FDataBoolean;\r\n property DataObject: TObject read FDataObject write FDataObject;\r\n property DataString: String read FDataString write FDataString;\r\n property DataInteger: NativeInt read FDataInteger write FDataInteger;\r\n property DBKey: String read FDBKey write FDBKey;\r\n function GetText: String; virtual;\r\n published\r\n property Name: String read FName write SetName;\r\n property Text: String read FText write SetText;\r\n property StartColumn: Integer read FStartColumn write SetStartColumn default 0;\r\n property EndColumn: Integer read FEndColumn write SetEndColumn default 0;\r\n property Tag: NativeInt read FTag write FTag default 0;\r\n property UseDefaultAppearance: Boolean read FUseDefaultAppearance write SetUseDefaultAppearance default True;\r\n\r\n property TopFill: TTMSFNCGraphicsFill read FTopFill write SetTopFill;\r\n property TopStroke: TTMSFNCGraphicsStroke read FTopStroke write SetTopStroke;\r\n property TopFont: TTMSFNCGraphicsFont read FTopFont write SetTopFont;\r\n\r\n property BottomFill: TTMSFNCGraphicsFill read FBottomFill write SetBottomFill;\r\n property BottomStroke: TTMSFNCGraphicsStroke read FBottomStroke write SetBottomStroke;\r\n property BottomFont: TTMSFNCGraphicsFont read FBottomFont write SetBottomFont;\r\n end;\r\n\r\n {$IFNDEF USEOWNEDCOLLECTION}\r\n TTMSFNCTreeViewGroups = class(TTMSFNCOwnedCollection)\r\n {$ENDIF}\r\n {$IFDEF USEOWNEDCOLLECTION}\r\n TTMSFNCTreeViewGroups = class({$IFDEF LCLLIB}specialize {$ENDIF}TTMSFNCOwnedCollection)\r\n {$ENDIF}\r\n private\r\n FTreeView: TTMSFNCTreeViewData;\r\n function GetItem(Index: Integer): TTMSFNCTreeViewGroup;\r\n procedure SetItem(Index: Integer; const Value: TTMSFNCTreeViewGroup);\r\n protected\r\n function GetItemClass: TCollectionItemClass; virtual;\r\n public\r\n function TreeView: TTMSFNCTreeViewData;\r\n constructor Create(ATreeView: TTMSFNCTreeViewData);\r\n function Add: TTMSFNCTreeViewGroup;\r\n function Insert(Index: Integer): TTMSFNCTreeViewGroup;\r\n property Items[Index: Integer]: TTMSFNCTreeViewGroup read GetItem write SetItem; default;\r\n end;\r\n\r\n TTMSFNCTreeViewNodeTextMode = (tntmDrawing, tntmEditing);\r\n {$IFDEF WEBLIB}\r\n TTMSFNCTreeViewNodeStructure = class(TObjectList)\r\n private\r\n function GetItem(Index: Integer): TTMSFNCTreeViewVirtualNode;\r\n procedure SetItem(Index: Integer; const Value: TTMSFNCTreeViewVirtualNode);\r\n public\r\n property Items[Index: Integer]: TTMSFNCTreeViewVirtualNode read GetItem write SetItem; default;\r\n end;\r\n TTMSFNCTreeViewVisibleNodes = class(TList)\r\n private\r\n function GetItem(Index: Integer): TTMSFNCTreeViewVirtualNode;\r\n procedure SetItem(Index: Integer; const Value: TTMSFNCTreeViewVirtualNode);\r\n public\r\n property Items[Index: Integer]: TTMSFNCTreeViewVirtualNode read GetItem write SetItem; default;\r\n end;\r\n {$ENDIF}\r\n {$IFNDEF WEBLIB}\r\n TTMSFNCTreeViewNodeStructure = class(TObjectList);\r\n TTMSFNCTreeViewVisibleNodes = class(TList);\r\n {$ENDIF}\r\n\r\n TTMSFNCTreeViewDisplayGroup = record\r\n StartColumn: Integer;\r\n EndColumn: Integer;\r\n {$IFDEF LCLLIB}\r\n class operator = (z1, z2 : TTMSFNCTreeViewDisplayGroup) b : boolean;\r\n {$ENDIF}\r\n end;\r\n\r\n {$IFDEF WEBLIB}\r\n TTMSFNCTreeViewDisplayGroups = class(TList)\r\n private\r\n function GetItem(Index: Integer): TTMSFNCTreeViewDisplayGroup;\r\n procedure SetItem(Index: Integer; const Value: TTMSFNCTreeViewDisplayGroup);\r\n public\r\n property Items[Index: Integer]: TTMSFNCTreeViewDisplayGroup read GetItem write SetItem; default;\r\n end;\r\n {$ENDIF}\r\n {$IFNDEF WEBLIB}\r\n TTMSFNCTreeViewDisplayGroups = class(TList);\r\n {$ENDIF}\r\n\r\n {$IFDEF FNCLIB}\r\n TTMSFNCTreeViewData = class(TTMSFNCTreeViewBase, ITMSFNCBitmapContainer)\r\n {$ENDIF}\r\n {$IFNDEF FNCLIB}\r\n TTMSFNCTreeViewData = class(TTMSFNCTreeViewBase)\r\n {$ENDIF}\r\n private\r\n FFilterApplied: Boolean;\r\n FBlockUpdate: Boolean;\r\n FNodeStructure: TTMSFNCTreeViewNodeStructure;\r\n FVisibleNodes: TTMSFNCTreeViewVisibleNodes;\r\n FColumns: TTMSFNCTreeViewColumns;\r\n FGroups: TTMSFNCTreeViewGroups;\r\n FNodes: TTMSFNCTreeViewNodes;\r\n FBitmapContainer: TTMSFNCBitmapContainer;\r\n FDisplayGroups: TTMSFNCTreeViewDisplayGroups;\r\n FFilter: TTMSFNCTreeViewFilter;\r\n FSortMode: TTMSFNCTreeViewNodesSortMode;\r\n procedure SetColumns(const Value: TTMSFNCTreeViewColumns);\r\n procedure SetGroups(const Value: TTMSFNCTreeViewGroups);\r\n procedure SetNodes(const Value: TTMSFNCTreeViewNodes);\r\n function GetBitmapContainer: TTMSFNCBitmapContainer;\r\n procedure SetBitmapContainer(const Value: TTMSFNCBitmapContainer);\r\n protected\r\n property BitmapContainer: TTMSFNCBitmapContainer read GetBitmapContainer write SetBitmapContainer;\r\n procedure Notification(AComponent: TComponent; Operation: TOperation); override;\r\n function CreateColumns: TTMSFNCTreeViewColumns; virtual;\r\n function CreateGroups: TTMSFNCTreeViewGroups; virtual;\r\n function CreateNodes: TTMSFNCTreeViewNodes; virtual;\r\n function GetInsertPosition(ANode: TTMSFNCTreeViewVirtualNode; ARoot: Boolean; AInsert: Boolean): Integer; virtual;\r\n function GetNodeFromNodeStructure(AIndex: Integer): TTMSFNCTreeViewVirtualNode; virtual;\r\n function MatchFilter(ANode: TTMSFNCTreeViewVirtualNode): Boolean; virtual;\r\n procedure BuildNodeList; virtual;\r\n procedure UpdateColumns; override;\r\n procedure BuildInternalNodeList(ANode: TTMSFNCTreeViewVirtualNode; AID: String; AParentNode: Integer; ANodeIndex: Integer; ALevel: Integer; AParentExpanded: Boolean; var ATotalChildren: Integer);\r\n procedure GetNodeForNodeData(ANode: TTMSFNCTreeViewVirtualNode); virtual;\r\n procedure DoGetNumberOfNodes(ANode: TTMSFNCTreeViewVirtualNode; var ANumberOfNodes: Integer); virtual;\r\n procedure DoGetColumnTrimming({%H-}AColumn: Integer; {%H-}AKind: TTMSFNCTreeViewCacheItemKind; var {%H-}ATrimming: TTMSFNCGraphicsTextTrimming); virtual;\r\n procedure DoGetColumnHorizontalTextAlign({%H-}AColumn: Integer; {%H-}AKind: TTMSFNCTreeViewCacheItemKind; var {%H-}AHorizontalTextAlign: TTMSFNCGraphicsTextAlign); virtual;\r\n procedure DoGetColumnVerticalTextAlign({%H-}AColumn: Integer; {%H-}AKind: TTMSFNCTreeViewCacheItemKind; var {%H-}AVerticalTextAlign: TTMSFNCGraphicsTextAlign); virtual;\r\n procedure DoGetColumnWordWrapping({%H-}AColumn: Integer; {%H-}AKind: TTMSFNCTreeViewCacheItemKind; var {%H-}AWordWrapping: Boolean); virtual;\r\n procedure DoGetNodeSides({%H-}ANode: TTMSFNCTreeViewVirtualNode; var {%H-}ASides: TTMSFNCGraphicsSides); virtual;\r\n procedure DoGetNodeText({%H-}ANode: TTMSFNCTreeViewVirtualNode; {%H-}AColumn: Integer; {%H-}AMode: TTMSFNCTreeViewNodeTextMode; var {%H-}AText: String); virtual;\r\n procedure DoGetNodeData(ANode: TTMSFNCTreeViewVirtualNode); virtual;\r\n procedure DoGetNodeTitle({%H-}ANode: TTMSFNCTreeViewVirtualNode; {%H-}AColumn: Integer; {%H-}AMode: TTMSFNCTreeViewNodeTextMode; var {%H-}ATitle: String); virtual;\r\n procedure DoGetNodeTitleExpanded({%H-}ANode: TTMSFNCTreeViewVirtualNode; {%H-}AColumn: Integer; var {%H-}AExpanded: Boolean); virtual;\r\n procedure DoGetNodeTrimming({%H-}ANode: TTMSFNCTreeViewVirtualNode; {%H-}AColumn: Integer; var {%H-}ATrimming: TTMSFNCGraphicsTextTrimming); virtual;\r\n procedure DoGetNodeHorizontalTextAlign({%H-}ANode: TTMSFNCTreeViewVirtualNode; {%H-}AColumn: Integer; var {%H-}AHorizontalTextAlign: TTMSFNCGraphicsTextAlign); virtual;\r\n procedure DoGetNodeVerticalTextAlign({%H-}ANode: TTMSFNCTreeViewVirtualNode; {%H-}AColumn: Integer; var {%H-}AVerticalTextAlign: TTMSFNCGraphicsTextAlign); virtual;\r\n procedure DoGetNodeWordWrapping({%H-}ANode: TTMSFNCTreeViewVirtualNode; {%H-}AColumn: Integer; var {%H-}AWordWrapping: Boolean); virtual;\r\n procedure DoGetNodeTitleTrimming({%H-}ANode: TTMSFNCTreeViewVirtualNode; {%H-}AColumn: Integer; var {%H-}ATrimming: TTMSFNCGraphicsTextTrimming); virtual;\r\n procedure DoGetNodeTitleHorizontalTextAlign({%H-}ANode: TTMSFNCTreeViewVirtualNode; {%H-}AColumn: Integer; var {%H-}AHorizontalTextAlign: TTMSFNCGraphicsTextAlign); virtual;\r\n procedure DoGetNodeTitleVerticalTextAlign({%H-}ANode: TTMSFNCTreeViewVirtualNode; {%H-}AColumn: Integer; var {%H-}AVerticalTextAlign: TTMSFNCGraphicsTextAlign); virtual;\r\n procedure DoGetNodeTitleWordWrapping({%H-}ANode: TTMSFNCTreeViewVirtualNode; {%H-}AColumn: Integer; var {%H-}AWordWrapping: Boolean); virtual;\r\n procedure DoGetNodeExtraSize({%H-}ANode: TTMSFNCTreeViewVirtualNode; {%H-}AColumn: Integer; var {%H-}AExtraSize: Single); virtual;\r\n procedure DoGetNodeTitleExtraSize({%H-}ANode: TTMSFNCTreeViewVirtualNode; {%H-}AColumn: Integer; var {%H-}ATitleExtraSize: Single); virtual;\r\n procedure DoGetNodeCheckType({%H-}ANode: TTMSFNCTreeViewVirtualNode; {%H-}AColumn: Integer; var {%H-}ACheckType: TTMSFNCTreeViewNodeCheckType); virtual;\r\n procedure DoGetNodeIcon({%H-}ANode: TTMSFNCTreeViewVirtualNode; {%H-}AColumn: Integer; {%H-}ALarge: Boolean; var {%H-}AIcon: TTMSFNCBitmap); virtual;\r\n procedure DoGetNodeIconSize({%H-}ANode: TTMSFNCTreeViewVirtualNode; {%H-}AColumn: Integer; {%H-}ALarge: Boolean; {%H-}AIcon: TTMSFNCBitmap; var {%H-}AIconWidth: Double; var {%H-}AIconHeight: Double); virtual;\r\n procedure DoGetNodeSelectedColor({%H-}ANode: TTMSFNCTreeViewVirtualNode; var {%H-}AColor: TTMSFNCGraphicsColor); virtual;\r\n procedure DoGetNodeDisabledColor({%H-}ANode: TTMSFNCTreeViewVirtualNode; var {%H-}AColor: TTMSFNCGraphicsColor); virtual;\r\n procedure DoGetNodeColor({%H-}ANode: TTMSFNCTreeViewVirtualNode; var {%H-}AColor: TTMSFNCGraphicsColor); virtual;\r\n procedure DoGetNodeSelectedTextColor({%H-}ANode: TTMSFNCTreeViewVirtualNode; {%H-}AColumn: Integer; var {%H-}ATextColor: TTMSFNCGraphicsColor); virtual;\r\n procedure DoGetNodeDisabledTextColor({%H-}ANode: TTMSFNCTreeViewVirtualNode; {%H-}AColumn: Integer; var {%H-}ATextColor: TTMSFNCGraphicsColor); virtual;\r\n procedure DoGetNodeSelectedTitleColor({%H-}ANode: TTMSFNCTreeViewVirtualNode; {%H-}AColumn: Integer; var {%H-}ATitleColor: TTMSFNCGraphicsColor); virtual;\r\n procedure DoGetNodeDisabledTitleColor({%H-}ANode: TTMSFNCTreeViewVirtualNode; {%H-}AColumn: Integer; var {%H-}ATitleColor: TTMSFNCGraphicsColor); virtual;\r\n procedure DoGetNodeTextColor({%H-}ANode: TTMSFNCTreeViewVirtualNode; {%H-}AColumn: Integer; var {%H-}ATextColor: TTMSFNCGraphicsColor); virtual;\r\n procedure DoGetNodeTitleColor({%H-}ANode: TTMSFNCTreeViewVirtualNode; {%H-}AColumn: Integer; var {%H-}ATitleColor: TTMSFNCGraphicsColor); virtual;\r\n procedure DoIsNodeExpanded({%H-}ANode: TTMSFNCTreeViewVirtualNode; var {%H-}AExpanded: Boolean); virtual;\r\n procedure DoIsNodeExtended({%H-}ANode: TTMSFNCTreeViewVirtualNode; var {%H-}AExtended: Boolean); virtual;\r\n procedure DoIsNodeChecked({%H-}ANode: TTMSFNCTreeViewVirtualNode; {%H-}AColumn: Integer; var {%H-}AChecked: Boolean); virtual;\r\n procedure DoIsNodeVisible({%H-}ANode: TTMSFNCTreeViewVirtualNode; var {%H-}AVisible: Boolean); virtual;\r\n procedure DoIsNodeEnabled({%H-}ANode: TTMSFNCTreeViewVirtualNode; var {%H-}AEnabled: Boolean); virtual;\r\n procedure DoNodeCompare({%H-}ANode1, {%H-}ANode2: TTMSFNCTreeViewNode; {%H-}AColumn: Integer; var {%H-}ACompareResult: Integer); virtual;\r\n procedure DoGetHTMLTemplateValue(ANodeValue: TTMSFNCTreeViewNodeValue; AName: string; var AValue: string); virtual;\r\n procedure DoGetHTMLTemplate(ANodeValue: TTMSFNCTreeViewNodeValue; AColumnIndex: Integer; var AHTMLTemplate: string); virtual;\r\n procedure ToggleCheckNodeInternal(ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer; ARecurse: Boolean = False); virtual;\r\n procedure CheckNodeInternal(ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer; ARecurse: Boolean = False); virtual;\r\n procedure UpdateCheckState({%H-}ANode: TTMSFNCTreeViewVirtualNode; {%H-}AColumn: Integer; {%H-}AChecked: Boolean); virtual;\r\n procedure UnCheckNodeInternal(ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer; ARecurse: Boolean = False); virtual;\r\n procedure ExpandNodeInternal(ANode: TTMSFNCTreeViewVirtualNode; ARecurse: Boolean = False); virtual;\r\n procedure CollapseNodeInternal(ANode: TTMSFNCTreeViewVirtualNode; ARecurse: Boolean = False); virtual;\r\n function RemoveNodeInternal(ANode: TTMSFNCTreeViewVirtualNode; AUpdateNodes: Boolean = True): TTMSFNCTreeViewVirtualNodeRemoveData; virtual;\r\n procedure ClearFocusedNode(ANode: TTMSFNCTreeViewVirtualNode); virtual; abstract;\r\n procedure UpdateNodesInternal(ANodeRemoveData: TTMSFNCTreeViewVirtualNodeRemoveData); virtual;\r\n procedure InsertNodeInternal(AParentNode: TTMSFNCTreeViewVirtualNode; AIndex, AInsertIndex: Integer; ANode: TTMSFNCTreeViewVirtualNode); virtual;\r\n procedure UpdateVisibleNodes(ANode: TTMSFNCTreeViewVirtualNode); virtual;\r\n procedure ToggleNodeInternal(ANode: TTMSFNCTreeViewVirtualNode; ARecurse: Boolean = False); virtual;\r\n procedure InsertItemInternal(AItem: TTMSFNCTreeViewNode); virtual;\r\n function IsVariableNodeHeight: Boolean; virtual; abstract;\r\n function RemoveItemInternal(AItem: TTMSFNCTreeViewNode; AUpdate: Boolean = True): TTMSFNCTreeViewVirtualNodeRemoveData; virtual;\r\n function GetNodesSpacing(ANode: TTMSFNCTreeViewVirtualNode): Single; virtual;\r\n function GetDefaultRowHeight(ANode: TTMSFNCTreeViewVirtualNode): Single; virtual;\r\n function GetVisibleNodeForIndex(AIndex: Integer): TTMSFNCTreeViewVirtualNode; virtual;\r\n procedure ToggleNode(ANode: TTMSFNCTreeViewNode); virtual;\r\n procedure UpdateNodeCalculated(ANode: TTMSFNCTreeViewVirtualNode; ACalculated: Boolean); virtual;\r\n procedure UpdateNodeHeight(ANode: TTMSFNCTreeViewVirtualNode; AHeight: Double); virtual;\r\n procedure UpdateNodeTitleHeight(ANode: TTMSFNCTreeViewVirtualNode; AHeight: Double); virtual;\r\n procedure UpdateNodeCheckStates(ANode: TTMSFNCTreeViewVirtualNode; ACheckStates: TTMSFNCArrayBoolean); virtual;\r\n procedure UpdateNodeBitmapRects(ANode: TTMSFNCTreeViewVirtualNode; ABitmapRects: TTMSFNCArrayTRectF); virtual;\r\n procedure UpdateNodeCheckRects(ANode: TTMSFNCTreeViewVirtualNode; ACheckRects: TTMSFNCArrayTRectF); virtual;\r\n procedure UpdateNodeExpandRects(ANode: TTMSFNCTreeViewVirtualNode; AExpandRects: TTMSFNCArrayTRectF); virtual;\r\n procedure UpdateNodeTextRects(ANode: TTMSFNCTreeViewVirtualNode; ATextRects: TTMSFNCArrayTRectF); virtual;\r\n procedure UpdateNodeTitleRects(ANode: TTMSFNCTreeViewVirtualNode; ATitleRects: TTMSFNCArrayTRectF); virtual;\r\n procedure UpdateNodeExtraRects(ANode: TTMSFNCTreeViewVirtualNode; AExtraRects: TTMSFNCArrayTRectF); virtual;\r\n procedure UpdateNodeTitleExtraRects(ANode: TTMSFNCTreeViewVirtualNode; ATitleExtraRects: TTMSFNCArrayTRectF); virtual;\r\n procedure UpdateNodeCacheReference(ANode: TTMSFNCTreeViewVirtualNode; ACache: TTMSFNCTreeViewCacheItem); virtual;\r\n procedure UpdateNodeExpanded(ANode: TTMSFNCTreeViewVirtualNode; AExpanded: Boolean); virtual;\r\n procedure UpdateNodeExtended(ANode: TTMSFNCTreeViewVirtualNode; AExtended: Boolean); virtual;\r\n procedure UpdateNodeTotalChildren(ANode: TTMSFNCTreeViewVirtualNode; ATotalChildren: Integer); virtual;\r\n procedure UpdateNodeChildren(ANode: TTMSFNCTreeViewVirtualNode; AChildren: Integer); virtual;\r\n procedure UpdateNodeIndex(ANode: TTMSFNCTreeViewVirtualNode; AIndex: Integer); virtual;\r\n procedure UpdateNodeRow(ANode: TTMSFNCTreeViewVirtualNode; ARow: Integer); virtual;\r\n procedure UpdateNodeLevel(ANode: TTMSFNCTreeViewVirtualNode; ALevel: Integer); virtual;\r\n procedure UpdateNodeParentNode(ANode: TTMSFNCTreeViewVirtualNode; AParentNode: Integer); virtual;\r\n procedure UpdateNode(ANode: TTMSFNCTreeViewVirtualNode); virtual;\r\n procedure CustomizeScrollPosition({%H-}ANode: TTMSFNCTreeViewVirtualNode; var {%H-}APosition, {%H-}ATopPosition: Double); virtual;\r\n function HTMLReplace(AValue: string; ANodeValue: TTMSFNCTreeViewNodeValue): string;\r\n function GetHTMLTemplate(AColumnIndex: Integer): string; virtual;\r\n property Columns: TTMSFNCTreeViewColumns read FColumns write SetColumns;\r\n property Groups: TTMSFNCTreeViewGroups read FGroups write SetGroups;\r\n property Nodes: TTMSFNCTreeViewNodes read FNodes write SetNodes;\r\n property DisplayGroups: TTMSFNCTreeViewDisplayGroups read FDisplayGroups;\r\n property BlockUpdate: Boolean read FBlockUpdate write FBlockUpdate;\r\n property NodeStructure: TTMSFNCTreeViewNodeStructure read FNodeStructure;\r\n property VisibleNodes: TTMSFNCTreeViewVisibleNodes read FVisibleNodes;\r\n public\r\n procedure Assign(Source: TPersistent); override;\r\n constructor Create(AOwner: TComponent); override;\r\n destructor Destroy; override;\r\n function IsColumnVisible(ACol: Integer): Boolean; override;\r\n function FindColumnByName(AName: String): TTMSFNCTreeViewColumn; virtual;\r\n function FindGroupByName(AName: String): TTMSFNCTreeViewGroup; virtual;\r\n function FindColumnIndexByName(AName: String): Integer; virtual;\r\n function FindGroupIndexByName(AName: String): Integer; virtual;\r\n\r\n procedure BeforeExport; override;\r\n procedure AfterExport; override;\r\n procedure ClearColumns; virtual;\r\n procedure ClearNodes; virtual;\r\n procedure ClearNodeList; virtual;\r\n procedure RemoveNodeFromSelection(ANode: TTMSFNCTreeViewVirtualNode); virtual; abstract;\r\n procedure AddNodeToSelection(ANode: TTMSFNCTreeViewVirtualNode); virtual; abstract;\r\n procedure RemoveVirtualNode(ANode: TTMSFNCTreeViewVirtualNode); virtual;\r\n procedure RemoveNode(ANode: TTMSFNCTreeViewNode); virtual;\r\n procedure ExpandNode(ANode: TTMSFNCTreeViewNode; ARecurse: Boolean = False); virtual;\r\n procedure MoveNode(ANode: TTMSFNCTreeViewNode; ADestinationNode: TTMSFNCTreeViewNode; AIndex: Integer = -1); virtual;\r\n procedure CopyNode(ANode: TTMSFNCTreeViewNode; ADestinationNode: TTMSFNCTreeViewNode; AIndex: Integer = -1); virtual;\r\n procedure ExpandAll; virtual;\r\n procedure CollapseAll; virtual;\r\n procedure ExpandAllVirtual; virtual;\r\n procedure CollapseAllVirtual; virtual;\r\n procedure ApplyFilter; virtual;\r\n procedure RemoveFilter; virtual;\r\n procedure RemoveFilters; virtual;\r\n procedure CollapseNode(ANode: TTMSFNCTreeViewNode; ARecurse: Boolean = False); virtual;\r\n procedure ToggleVirtualNode(ANode: TTMSFNCTreeViewVirtualNode; ARecurse: Boolean = False); virtual;\r\n procedure ExpandVirtualNode(ANode: TTMSFNCTreeViewVirtualNode; ARecurse: Boolean = False); virtual;\r\n procedure CollapseVirtualNode(ANode: TTMSFNCTreeViewVirtualNode; ARecurse: Boolean = False); virtual;\r\n procedure CheckNode(ANode: TTMSFNCTreeViewNode; AColumn: Integer; ARecurse: Boolean = False); virtual;\r\n procedure UnCheckNode(ANode: TTMSFNCTreeViewNode; AColumn: Integer; ARecurse: Boolean = False); virtual;\r\n procedure ToggleCheckNode(ANode: TTMSFNCTreeViewNode; AColumn: Integer; ARecurse: Boolean = False); virtual;\r\n\r\n procedure CheckVirtualNode(ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer; ARecurse: Boolean = False); virtual;\r\n procedure UnCheckVirtualNode(ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer; ARecurse: Boolean = False); virtual;\r\n procedure ToggleCheckVirtualNode(ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer; ARecurse: Boolean = False); virtual;\r\n\r\n procedure SetNodeTextValues(ANode: TTMSFNCTreeViewNode; ATextValues: TTMSFNCTreeViewNodeTextValues); virtual;\r\n procedure SetNodeCheckStates(ANode: TTMSFNCTreeViewNode; ACheckStates: TTMSFNCTreeViewNodeCheckStates); virtual;\r\n procedure SetNodeCheckTypes(ANode: TTMSFNCTreeViewNode; ACheckTypes: TTMSFNCTreeViewNodeCheckTypes); virtual;\r\n procedure SetNodeCollapsedIcons(ANode: TTMSFNCTreeViewNode; AIcons: TTMSFNCTreeViewNodeIcons; ALarge: Boolean = False); virtual;\r\n procedure SetNodeExpandedIcons(ANode: TTMSFNCTreeViewNode; AIcons: TTMSFNCTreeViewNodeIcons; ALarge: Boolean = False); virtual;\r\n procedure SetNodeCollapsedIconNames(ANode: TTMSFNCTreeViewNode; AIconNames: TTMSFNCTreeViewNodeIconNames; ALarge: Boolean = False); virtual;\r\n procedure SetNodeExpandedIconNames(ANode: TTMSFNCTreeViewNode; AIconNames: TTMSFNCTreeViewNodeIconNames; ALarge: Boolean = False); virtual;\r\n\r\n procedure RemoveVirtualNodeChildren(ANode: TTMSFNCTreeViewVirtualNode); virtual;\r\n procedure RemoveNodeChildren(ANode: TTMSFNCTreeViewNode); virtual;\r\n procedure ScrollToNode(ANode: TTMSFNCTreeViewNode; AScrollIfNotVisible: Boolean = False; AScrollPosition: TTMSFNCTreeViewNodeScrollPosition = tvnspTop; AForceScroll: Boolean = False); virtual;\r\n procedure ScrollToVirtualNode(ANode: TTMSFNCTreeViewVirtualNode; AScrollIfNotVisible: Boolean = False; AScrollPosition: TTMSFNCTreeViewNodeScrollPosition = tvnspTop; AForceScroll: Boolean = False); virtual;\r\n procedure ScrollToVirtualNodeInternal(ANode: TTMSFNCTreeViewVirtualNode; AScrollIfNotVisible: Boolean = False; AScrollPosition: TTMSFNCTreeViewNodeScrollPosition = tvnspTop; AForceScroll: Boolean = False); virtual;\r\n procedure ScrollToVirtualNodeRow(ARow: Integer; AScrollIfNotVisible: Boolean = False; AScrollPosition: TTMSFNCTreeViewNodeScrollPosition = tvnspTop; AForceScroll: Boolean = False); virtual;\r\n procedure ScrollToTop;\r\n procedure ScrollToBottom;\r\n\r\n function GetNodeForRow(ARow: Integer): TTMSFNCTreeViewVirtualNode; virtual;\r\n function AddNode(AParentNode: TTMSFNCTreeViewNode = nil): TTMSFNCTreeViewNode; virtual;\r\n function AddVirtualNode(AParentNode: TTMSFNCTreeViewVirtualNode = nil): TTMSFNCTreeViewVirtualNode; virtual;\r\n function GetParentVirtualNode(ANode: TTMSFNCTreeViewVirtualNode): TTMSFNCTreeViewVirtualNode; virtual;\r\n function GetParentNode(ANode: TTMSFNCTreeViewNode): TTMSFNCTreeViewNode; virtual;\r\n function GetVirtualNodeChildCount(ANode: TTMSFNCTreeViewVirtualNode): Integer; virtual;\r\n function GetTotalVirtualNodeCount: Integer; virtual;\r\n function GetTotalNodeCount: Integer; virtual;\r\n function GetNodeText(ANode: TTMSFNCTreeViewNode; AColumn: Integer): string; virtual;\r\n function GetVirtualNodeText(ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer): string; virtual;\r\n function GetNodeTitle(ANode: TTMSFNCTreeViewNode; AColumn: Integer): string; virtual;\r\n function GetVirtualNodeTitle(ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer): string; virtual;\r\n function GetVirtualNodeTitleExpanded(ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer): Boolean; virtual;\r\n function FindVirtualNodeByRow(ARow: Integer): TTMSFNCTreeViewVirtualNode; virtual;\r\n function FindNodeByRow(ARow: Integer): TTMSFNCTreeViewNode; virtual;\r\n function FindVirtualNodeByDBKey(ADBKey: String): TTMSFNCTreeViewVirtualNode; virtual;\r\n function FindNodeByDBKey(ADBKey: String): TTMSFNCTreeViewNode; virtual;\r\n function FindVirtualNodeByTextAndColumn(AText: string; AColumn: Integer; ARecurse: Boolean = False; ACaseSensitive: Boolean = True): TTMSFNCTreeViewVirtualNode; virtual;\r\n function FindNodeByTextAndColumn(AText: string; AColumn: Integer; ARecurse: Boolean = False; ACaseSensitive: Boolean = True): TTMSFNCTreeViewNode; virtual;\r\n function GetNodeChildCount(ANode: TTMSFNCTreeViewNode): Integer; virtual;\r\n function GetPreviousNode(ANode: TTMSFNCTreeViewNode): TTMSFNCTreeViewNode; virtual;\r\n function GetNextNode(ANode: TTMSFNCTreeViewNode): TTMSFNCTreeViewNode; virtual;\r\n function GetPreviousChildNode(ANode: TTMSFNCTreeViewNode; AStartNode: TTMSFNCTreeViewNode): TTMSFNCTreeViewNode; virtual;\r\n function GetNextChildNode(ANode: TTMSFNCTreeViewNode; AStartNode: TTMSFNCTreeViewNode): TTMSFNCTreeViewNode; virtual;\r\n function GetNextSiblingNode(ANode: TTMSFNCTreeViewNode): TTMSFNCTreeViewNode; virtual;\r\n function GetPreviousSiblingNode(ANode: TTMSFNCTreeViewNode): TTMSFNCTreeViewNode; virtual;\r\n function GetFirstChildNode(ANode: TTMSFNCTreeViewNode): TTMSFNCTreeViewNode; virtual;\r\n function GetLastChildNode(ANode: TTMSFNCTreeViewNode): TTMSFNCTreeViewNode; virtual;\r\n\r\n function GetPreviousVirtualNode(ANode: TTMSFNCTreeViewVirtualNode): TTMSFNCTreeViewVirtualNode; virtual;\r\n function GetNextVirtualNode(ANode: TTMSFNCTreeViewVirtualNode): TTMSFNCTreeViewVirtualNode; virtual;\r\n function GetPreviousChildVirtualNode({%H-}ANode: TTMSFNCTreeViewVirtualNode; AStartNode: TTMSFNCTreeViewVirtualNode): TTMSFNCTreeViewVirtualNode; virtual;\r\n function GetNextChildVirtualNode({%H-}ANode: TTMSFNCTreeViewVirtualNode; AStartNode: TTMSFNCTreeViewVirtualNode): TTMSFNCTreeViewVirtualNode; virtual;\r\n function GetNextSiblingVirtualNode({%H-}ANode: TTMSFNCTreeViewVirtualNode): TTMSFNCTreeViewVirtualNode; virtual;\r\n function GetPreviousSiblingVirtualNode({%H-}ANode: TTMSFNCTreeViewVirtualNode): TTMSFNCTreeViewVirtualNode; virtual;\r\n function GetFirstChildVirtualNode({%H-}ANode: TTMSFNCTreeViewVirtualNode): TTMSFNCTreeViewVirtualNode; virtual;\r\n function GetLastChildVirtualNode({%H-}ANode: TTMSFNCTreeViewVirtualNode): TTMSFNCTreeViewVirtualNode; virtual;\r\n\r\n function GetFirstRootNode: TTMSFNCTreeViewNode; virtual;\r\n function GetLastRootNode: TTMSFNCTreeViewNode; virtual;\r\n function GetLastNode: TTMSFNCTreeViewNode; virtual;\r\n function GetFirstRootVirtualNode: TTMSFNCTreeViewVirtualNode; virtual;\r\n function GetLastRootVirtualNode: TTMSFNCTreeViewVirtualNode; virtual;\r\n function GetLastVirtualNode: TTMSFNCTreeViewVirtualNode; virtual;\r\n function GetRootNodeByIndex(AIndex: Integer): TTMSFNCTreeViewNode; virtual;\r\n function GetRootVirtualNodeByIndex(AIndex: Integer): TTMSFNCTreeViewVirtualNode; virtual;\r\n\r\n function InsertNode(AIndex: Integer; AParentNode: TTMSFNCTreeViewNode = nil): TTMSFNCTreeViewNode; virtual;\r\n function InsertVirtualNode(AIndex: Integer; AParentNode: TTMSFNCTreeViewVirtualNode = nil): TTMSFNCTreeViewVirtualNode; virtual;\r\n\r\n property Filter: TTMSFNCTreeViewFilter read FFilter;\r\n property SortMode: TTMSFNCTreeViewNodesSortMode read FSortMode;\r\n end;\r\n\r\nfunction TranslateTextEx(AText: String): String;\r\n\r\nimplementation\r\n\r\nuses\r\n SysUtils, Math, WEBLib.TMSFNCUtils, WEBLib.Graphics\r\n {$IFDEF FMXLIB}\r\n , FMX.Types\r\n {$ENDIF}\r\n {$IFDEF VCLLIB}\r\n ,AnsiStrings\r\n {$ENDIF}\r\n ;\r\n\r\nfunction TranslateTextEx(AText: String): String;\r\nbegin\r\n {$IFDEF FMXLIB}\r\n Result := TranslateText(AText);\r\n {$ENDIF}\r\n {$IFDEF CMNWEBLIB}\r\n Result := AText;\r\n {$ENDIF}\r\nend;\r\n\r\n{$IFDEF LCLLIB}\r\nclass operator TTMSFNCTreeViewDisplayGroup.=(z1, z2: TTMSFNCTreeViewDisplayGroup)b: boolean;\r\nbegin\r\n Result := z1 = z2;\r\nend;\r\n{$ENDIF}\r\n\r\ntype\r\n {$HINTS OFF}\r\n TShadowedCollection = class(TPersistent)\r\n private\r\n {%H-}FItemClass: TCollectionItemClass;\r\n {$IFDEF LCLWEBLIB}\r\n FItems: TFPList;\r\n {$ENDIF}\r\n {$IFNDEF LCLWEBLIB}\r\n FItems: TList;\r\n {$ENDIF}\r\n end;\r\n {$HINTS ON}\r\n\r\n{ TTMSFNCTreeViewData }\r\n\r\nprocedure TTMSFNCTreeViewData.RemoveVirtualNode(ANode: TTMSFNCTreeViewVirtualNode);\r\nbegin\r\n RemoveNodeInternal(ANode);\r\nend; \r\n\r\nprocedure TTMSFNCTreeViewData.ToggleCheckNode(ANode: TTMSFNCTreeViewNode; AColumn: Integer; ARecurse: Boolean = False);\r\nbegin\r\n if Assigned(ANode) then\r\n ToggleCheckNodeInternal(ANode.VirtualNode, AColumn, ARecurse);\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewData.CheckNode(ANode: TTMSFNCTreeViewNode; AColumn: Integer; ARecurse: Boolean = False);\r\nbegin\r\n if Assigned(ANode) then\r\n CheckNodeInternal(ANode.VirtualNode, AColumn, ARecurse);\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewData.UnCheckNode(ANode: TTMSFNCTreeViewNode; AColumn: Integer; ARecurse: Boolean = False);\r\nbegin\r\n if Assigned(ANode) then\r\n UnCheckNodeInternal(ANode.VirtualNode, AColumn, ARecurse);\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewData.ToggleCheckVirtualNode(ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer; ARecurse: Boolean = False);\r\nbegin\r\n ToggleCheckNodeInternal(ANode, AColumn, ARecurse);\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewData.CheckVirtualNode(ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer; ARecurse: Boolean = False);\r\nbegin\r\n CheckNodeInternal(ANode, AColumn, ARecurse);\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewData.UnCheckVirtualNode(ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer; ARecurse: Boolean = False);\r\nbegin\r\n UnCheckNodeInternal(ANode, AColumn, ARecurse);\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewData.CollapseAll;\r\n procedure CollapseNodes(n: TTMSFNCTreeViewNodes);\r\n var\r\n I: Integer;\r\n begin\r\n for I := 0 to n.Count - 1 do\r\n begin\r\n n[I].FExpanded := False;\r\n CollapseNodes(n[I].Nodes);\r\n end;\r\n end;\r\nbegin\r\n CollapseNodes(Nodes);\r\n CollapseAllVirtual;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewData.CollapseAllVirtual;\r\nvar\r\n I: Integer;\r\n v: TTMSFNCTreeViewVirtualNode;\r\nbegin\r\n VisibleNodes.Clear;\r\n TotalRowHeight := 1;\r\n RowCount := 0;\r\n for I := 0 to NodeStructure.Count - 1 do\r\n begin\r\n v := GetNodeFromNodeStructure(I);\r\n if Assigned(v) then\r\n begin\r\n UpdateNodeExpanded(v, False);\r\n if v.ParentNode = -1 then\r\n begin\r\n VisibleNodes.Add(v);\r\n TotalRowHeight := TotalRowHeight + v.Height;\r\n RowCount := RowCount + 1;\r\n end;\r\n end;\r\n end;\r\n\r\n ResetNodes;\r\n UpdateTreeView;\r\n Invalidate;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewData.CollapseNode(ANode: TTMSFNCTreeViewNode; ARecurse: Boolean = False);\r\nbegin\r\n if Assigned(ANode) then\r\n CollapseVirtualNode(ANode.VirtualNode, ARecurse);\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewData.ToggleNode(ANode: TTMSFNCTreeViewNode);\r\nbegin\r\n if Assigned(ANode) then\r\n ToggleVirtualNode(ANode.VirtualNode);\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewData.ExpandAll;\r\n procedure ExpandNodes(n: TTMSFNCTreeViewNodes);\r\n var\r\n I: Integer;\r\n begin\r\n for I := 0 to n.Count - 1 do\r\n begin\r\n n[I].FExpanded := True;\r\n ExpandNodes(n[I].Nodes);\r\n end;\r\n end;\r\nbegin\r\n ExpandNodes(Nodes);\r\n ExpandAllVirtual;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewData.ExpandAllVirtual;\r\nvar\r\n I: Integer;\r\n v: TTMSFNCTreeViewVirtualNode;\r\nbegin\r\n VisibleNodes.Clear;\r\n TotalRowHeight := 1;\r\n RowCount := 0;\r\n for I := 0 to NodeStructure.Count - 1 do\r\n begin\r\n v := GetNodeFromNodeStructure(I);\r\n if Assigned(v) and (((MatchFilter(v) or v.FAddedToVisibleList) and FFilterApplied) or not FFilterApplied) then\r\n begin\r\n UpdateNodeExpanded(v, True);\r\n VisibleNodes.Add(v);\r\n TotalRowHeight := TotalRowHeight + v.Height;\r\n RowCount := RowCount + 1;\r\n end;\r\n end;\r\n\r\n ResetNodes;\r\n UpdateTreeView;\r\n Invalidate;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewData.ExpandNode(ANode: TTMSFNCTreeViewNode; ARecurse: Boolean = False);\r\nbegin\r\n if Assigned(ANode) then\r\n ExpandVirtualNode(ANode.VirtualNode, ARecurse);\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewData.CollapseVirtualNode(ANode: TTMSFNCTreeViewVirtualNode; ARecurse: Boolean = False);\r\nbegin\r\n CollapseNodeInternal(ANode, ARecurse);\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewData.CopyNode(ANode,\r\n ADestinationNode: TTMSFNCTreeViewNode; AIndex: Integer);\r\nvar\r\n n, nw: TTMSFNCTreeViewNode;\r\nbegin\r\n if ADestinationNode <> ANode then\r\n begin\r\n BeginUpdate;\r\n n := TTMSFNCTreeViewNode.Create(nil);\r\n n.Assign(ANode);\r\n\r\n if Assigned(ADestinationNode) then\r\n nw := ADestinationNode.Nodes.Add\r\n else\r\n nw := Nodes.Add;\r\n\r\n nw.Assign(n);\r\n n.Free;\r\n\r\n if Assigned(ADestinationNode) then\r\n begin\r\n if (AIndex >= 0) and (AIndex <= ADestinationNode.Nodes.Count - 1) then\r\n nw.Index := AIndex;\r\n end\r\n else\r\n begin\r\n if (AIndex >= 0) and (AIndex <= Nodes.Count - 1) then\r\n nw.Index := AIndex;\r\n end;\r\n\r\n EndUpdate;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewData.ToggleVirtualNode(ANode: TTMSFNCTreeViewVirtualNode; ARecurse: Boolean = False);\r\nbegin\r\n ToggleNodeInternal(ANode, ARecurse);\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewData.ExpandVirtualNode(ANode: TTMSFNCTreeViewVirtualNode; ARecurse: Boolean = False);\r\nbegin\r\n ExpandNodeInternal(ANode, ARecurse);\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewData.Assign(Source: TPersistent);\r\nbegin\r\n inherited;\r\n if Source is TTMSFNCTreeViewData then\r\n begin\r\n FColumns.Assign((Source as TTMSFNCTreeViewData).Columns);\r\n FGroups.Assign((Source as TTMSFNCTreeViewData).Groups);\r\n FNodes.Assign((Source as TTMSFNCTreeViewData).Nodes);\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewData.ClearColumns;\r\nbegin\r\n BeginUpdate;\r\n Columns.Clear;\r\n EndUpdate;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewData.ClearNodeList;\r\nbegin\r\n BeginUpdate;\r\n NodeListBuild := False;\r\n ClearFocusedNode(nil);\r\n EndUpdate;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewData.ClearNodes;\r\nbegin\r\n BeginUpdate;\r\n NodeListBuild := False;\r\n Nodes.Clear;\r\n ClearFocusedNode(nil);\r\n EndUpdate;\r\nend;\r\n\r\nconstructor TTMSFNCTreeViewData.Create(AOwner: TComponent);\r\nbegin\r\n inherited;\r\n FFilter := TTMSFNCTreeViewFilter.Create(Self);\r\n FNodeStructure := TTMSFNCTreeViewNodeStructure.Create;\r\n FVisibleNodes := TTMSFNCTreeViewVisibleNodes.Create;\r\n FDisplayGroups := TTMSFNCTreeViewDisplayGroups.Create;\r\n\r\n FNodes := CreateNodes;\r\n FColumns := CreateColumns;\r\n FGroups := CreateGroups;\r\nend;\r\n\r\nfunction TTMSFNCTreeViewData.CreateGroups: TTMSFNCTreeViewGroups;\r\nbegin\r\n Result := TTMSFNCTreeViewGroups.Create(Self);\r\nend;\r\n\r\nfunction TTMSFNCTreeViewData.GetNodeFromNodeStructure(AIndex: Integer): TTMSFNCTreeViewVirtualNode;\r\nbegin\r\n Result := nil;\r\n if (AIndex >= 0) and (AIndex <= NodeStructure.Count - 1) then\r\n Result := NodeStructure[AIndex];\r\nend;\r\n\r\nfunction TTMSFNCTreeViewData.GetNodesSpacing(ANode: TTMSFNCTreeViewVirtualNode): Single;\r\nbegin\r\n Result := 0;\r\nend;\r\n\r\nfunction TTMSFNCTreeViewData.GetNodeText(ANode: TTMSFNCTreeViewNode;\r\n AColumn: Integer): string;\r\nbegin\r\n Result := GetVirtualNodeText(ANode.VirtualNode, AColumn);\r\nend;\r\n\r\nfunction TTMSFNCTreeViewData.GetNodeTitle(ANode: TTMSFNCTreeViewNode;\r\n AColumn: Integer): string;\r\nbegin\r\n Result := GetVirtualNodeTitle(ANode.VirtualNode, AColumn);\r\nend;\r\n\r\nfunction TTMSFNCTreeViewData.GetParentNode(\r\n ANode: TTMSFNCTreeViewNode): TTMSFNCTreeViewNode;\r\nvar\r\n v: TTMSFNCTreeViewVirtualNode;\r\nbegin\r\n Result := nil;\r\n if Assigned(ANode) then\r\n begin\r\n v := GetParentVirtualNode(ANode.VirtualNode);\r\n if Assigned(v) then\r\n Result := v.Node;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCTreeViewData.GetPreviousChildNode(\r\n ANode: TTMSFNCTreeViewNode; AStartNode: TTMSFNCTreeViewNode): TTMSFNCTreeViewNode;\r\nvar\r\n v: TTMSFNCTreeViewVirtualNode;\r\nbegin\r\n Result := nil;\r\n if Assigned(ANode) and Assigned(AStartNode) then\r\n begin\r\n v := GetPreviousChildVirtualNode(ANode.VirtualNode, AStartNode.VirtualNode);\r\n if Assigned(v) then\r\n Result := v.Node;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCTreeViewData.GetPreviousChildVirtualNode(\r\n ANode: TTMSFNCTreeViewVirtualNode; AStartNode: TTMSFNCTreeViewVirtualNode): TTMSFNCTreeViewVirtualNode;\r\nbegin\r\n Result := GetPreviousSiblingVirtualNode(AStartNode);\r\nend;\r\n\r\nfunction TTMSFNCTreeViewData.GetPreviousNode(\r\n ANode: TTMSFNCTreeViewNode): TTMSFNCTreeViewNode;\r\nvar\r\n v: TTMSFNCTreeViewVirtualNode;\r\nbegin\r\n Result := nil;\r\n if Assigned(ANode) then\r\n begin\r\n v := GetPreviousVirtualNode(ANode.VirtualNode);\r\n if Assigned(v) then\r\n Result := v.Node;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCTreeViewData.GetPreviousSiblingNode(\r\n ANode: TTMSFNCTreeViewNode): TTMSFNCTreeViewNode;\r\nvar\r\n v: TTMSFNCTreeViewVirtualNode;\r\nbegin\r\n Result := nil;\r\n if Assigned(ANode) then\r\n begin\r\n v := GetPreviousSiblingVirtualNode(ANode.VirtualNode);\r\n if Assigned(v) then\r\n Result := v.Node;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCTreeViewData.GetPreviousSiblingVirtualNode(\r\n ANode: TTMSFNCTreeViewVirtualNode): TTMSFNCTreeViewVirtualNode;\r\nvar\r\n res: TTMSFNCTreeViewVirtualNode;\r\nbegin\r\n res := ANode;\r\n repeat\r\n res := GetPreviousVirtualNode(res);\r\n Result := res;\r\n until (Result = nil) or (Assigned(Result) and (Result.ParentNode = ANode.ParentNode));\r\nend;\r\n\r\nfunction TTMSFNCTreeViewData.GetPreviousVirtualNode(\r\n ANode: TTMSFNCTreeViewVirtualNode): TTMSFNCTreeViewVirtualNode;\r\nbegin\r\n Result := nil;\r\n if Assigned(ANode) then\r\n Result := GetNodeFromNodeStructure(ANode.Row - 1);\r\nend;\r\n\r\nfunction TTMSFNCTreeViewData.GetRootNodeByIndex(\r\n AIndex: Integer): TTMSFNCTreeViewNode;\r\nvar\r\n n: TTMSFNCTreeViewVirtualNode;\r\nbegin\r\n Result := nil;\r\n n := GetRootVirtualNodeByIndex(AIndex);\r\n if Assigned(n) then\r\n Result := n.Node;\r\nend;\r\n\r\nfunction TTMSFNCTreeViewData.GetRootVirtualNodeByIndex(\r\n AIndex: Integer): TTMSFNCTreeViewVirtualNode;\r\nvar\r\n I: Integer;\r\nbegin\r\n Result := nil;\r\n for I := 0 to NodeStructure.Count - 1 do\r\n begin\r\n if NodeStructure[I].Index = AIndex then\r\n begin\r\n Result := NodeStructure[I];\r\n Break;\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCTreeViewData.GetTotalNodeCount: Integer;\r\nbegin\r\n Result := GetTotalVirtualNodeCount;\r\nend;\r\n\r\nfunction TTMSFNCTreeViewData.GetTotalVirtualNodeCount: Integer;\r\nvar\r\n n: TTMSFNCTreeViewVirtualNode;\r\nbegin\r\n Result := 0;\r\n n := GetFirstRootVirtualNode;\r\n while Assigned(n) do\r\n begin\r\n Result := Result + n.TotalChildren + 1;\r\n n := n.GetNextSibling;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewData.InsertItemInternal(AItem: TTMSFNCTreeViewNode);\r\nvar\r\n pn: TTMSFNCTreeViewNode;\r\nbegin\r\n if (csDestroying in ComponentState) or not Assigned(AItem) or not NodeListBuild then\r\n Exit;\r\n\r\n pn := TTMSFNCTreeViewNodes(AItem.Collection).Node;\r\n if Assigned(pn) then\r\n InsertVirtualNode(AItem.Index, pn.VirtualNode)\r\n else\r\n InsertVirtualNode(AItem.Index);\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewData.RemoveFilter;\r\nbegin\r\n FFilterApplied := False;\r\n ClearNodeList;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewData.RemoveFilters;\r\nbegin\r\n Filter.Clear;\r\n RemoveFilter;\r\nend;\r\n\r\nfunction TTMSFNCTreeViewData.RemoveItemInternal(AItem: TTMSFNCTreeViewNode; AUpdate: Boolean = True): TTMSFNCTreeViewVirtualNodeRemoveData;\r\nbegin\r\n Result.RowIndex := -1;\r\n Result.Count := 0;\r\n Result.ParentNode := -1;\r\n\r\n if (csDestroying in ComponentState) or not Assigned(AItem) or not NodeListBuild then\r\n Exit;\r\n\r\n Result := RemoveNodeInternal(AItem.VirtualNode, AUpdate);\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewData.InsertNodeInternal(AParentNode: TTMSFNCTreeViewVirtualNode; AIndex, AInsertIndex: Integer; ANode: TTMSFNCTreeViewVirtualNode);\r\nvar\r\n I: Integer;\r\n pi: Integer;\r\n pv, rs: TTMSFNCTreeViewVirtualNode;\r\n cnt: Integer;\r\n vi: Boolean;\r\n chk: Boolean;\r\n chkst: TTMSFNCArrayBoolean;\r\n ins: Integer;\r\n exp, ext: Boolean;\r\n K: Integer;\r\nbegin\r\n if not NodeListBuild or (csDestroying in ComponentState) then\r\n Exit;\r\n\r\n if not Assigned(ANode) then\r\n begin\r\n ANode.Free;\r\n Exit;\r\n end;\r\n\r\n cnt := NodeStructure.Count;\r\n if Assigned(AParentNode) then\r\n begin\r\n pi := AParentNode.Row;\r\n if (pi >= 0) and (pi <= NodeStructure.Count - 1) then\r\n begin\r\n pv := GetNodeFromNodeStructure(pi);\r\n while Assigned(pv) do\r\n begin\r\n UpdateNodeTotalChildren(pv, pv.TotalChildren + 1);\r\n if pv.Row = AParentNode.Row then\r\n UpdateNodeChildren(pv, pv.Children + 1);\r\n\r\n pi := pv.ParentNode;\r\n pv := GetNodeFromNodeStructure(pi);\r\n end;\r\n end;\r\n end;\r\n\r\n UpdateNodeIndex(ANode, AIndex);\r\n UpdateNodeRow(ANode, AInsertIndex);\r\n\r\n if Assigned(AParentNode) then\r\n begin\r\n UpdateNodeParentNode(ANode, AParentNode.Row);\r\n UpdateNodeLevel(ANode, AParentNode.Level + 1);\r\n end\r\n else\r\n begin\r\n UpdateNodeParentNode(ANode, -1);\r\n UpdateNodeLevel(ANode, 0);\r\n end;\r\n\r\n UpdateNodeHeight(ANode, GetDefaultRowHeight(ANode));\r\n\r\n GetNodeForNodeData(ANode);\r\n\r\n exp := False;\r\n DoIsNodeExpanded(ANode, exp);\r\n UpdateNodeExpanded(ANode, exp);\r\n\r\n ext := False;\r\n DoIsNodeExtended(ANode, ext);\r\n UpdateNodeExtended(ANode, ext);\r\n\r\n SetLength(chkst, 0);\r\n for I := 0 to ColumnCount - 1 do\r\n begin\r\n chk := False;\r\n DoIsNodeChecked(ANode, I, chk);\r\n SetLength(chkst, Length(chkst) + 1);\r\n chkst[Length(chkst) - 1] := chk;\r\n end;\r\n\r\n UpdateNodeCheckStates(ANode, chkst);\r\n\r\n if (ANode.Row >= 0) and (ANode.Row < NodeStructure.Count) then\r\n NodeStructure.Insert(ANode.Row, ANode)\r\n else\r\n NodeStructure.Add(ANode);\r\n\r\n vi := True;\r\n if Assigned(AParentNode) then\r\n DoIsNodeVisible(AParentNode, vi);\r\n\r\n cnt := cnt - NodeStructure.Count;\r\n\r\n for I := ANode.Row + 1 to NodeStructure.Count - 1 do\r\n begin\r\n rs := GetNodeFromNodeStructure(I);\r\n if Assigned(rs) then\r\n begin\r\n UpdateNodeRow(rs, rs.Row - cnt);\r\n\r\n if rs.ParentNode > ANode.ParentNode then\r\n UpdateNodeParentNode(rs, rs.ParentNode - cnt);\r\n\r\n if rs.ParentNode = ANode.ParentNode then\r\n UpdateNodeIndex(rs, rs.Index + 1);\r\n\r\n GetNodeForNodeData(rs);\r\n\r\n exp := False;\r\n DoIsNodeExpanded(rs, exp);\r\n UpdateNodeExpanded(rs, exp);\r\n\r\n ext := False;\r\n DoIsNodeExtended(rs, ext);\r\n UpdateNodeExtended(rs, ext);\r\n\r\n SetLength(chkst, 0);\r\n for K := 0 to ColumnCount - 1 do\r\n begin\r\n chk := False;\r\n DoIsNodeChecked(RS, K, chk);\r\n SetLength(chkst, Length(chkst) + 1);\r\n chkst[Length(chkst) - 1] := chk;\r\n end;\r\n\r\n UpdateNodeCheckStates(rs, chkst);\r\n end;\r\n end;\r\n\r\n if not Assigned(AParentNode) or (Assigned(AParentNode) and AParentNode.Expanded and vi) then\r\n begin\r\n if not Assigned(AParentNode) then\r\n begin\r\n RowCount := RowCount + 1;\r\n TotalRowHeight := TotalRowHeight + GetDefaultRowHeight(ANode);\r\n ins := GetInsertPosition(ANode, True, True);\r\n if (ins >= 0) and (ins < VisibleNodes.Count) then\r\n VisibleNodes.Insert(ins, ANode)\r\n else\r\n VisibleNodes.Add(ANode);\r\n end\r\n else\r\n begin\r\n UpdateNodeExpanded(AParentNode, False);\r\n UpdateVisibleNodes(AParentNode);\r\n UpdateNodeExpanded(AParentNode, True);\r\n UpdateVisibleNodes(AParentNode);\r\n end;\r\n end;\r\n\r\n ResetNodes(False);\r\n UpdateTreeView;\r\n Invalidate;\r\nend;\r\n\r\nfunction TTMSFNCTreeViewData.CreateNodes: TTMSFNCTreeViewNodes;\r\nbegin\r\n Result := TTMSFNCTreeViewNodes.Create(Self, nil);\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewData.CustomizeScrollPosition(\r\n ANode: TTMSFNCTreeViewVirtualNode; var APosition, ATopPosition: Double);\r\nbegin\r\n\r\nend;\r\n\r\nfunction TTMSFNCTreeViewData.CreateColumns: TTMSFNCTreeViewColumns;\r\nbegin\r\n Result := TTMSFNCTreeViewColumns.Create(Self);\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewData.RemoveNodeChildren(ANode: TTMSFNCTreeViewNode);\r\nbegin\r\n if Assigned(ANode) then\r\n ANode.Nodes.Clear;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewData.RemoveVirtualNodeChildren(ANode: TTMSFNCTreeViewVirtualNode);\r\nvar\r\n I: Integer;\r\n s: TTMSFNCTreeViewVirtualNode;\r\nbegin\r\n if Assigned(ANode) then\r\n begin\r\n for I := ANode.TotalChildren - 1 downto 0 do\r\n begin\r\n s := GetNodeFromNodeStructure(ANode.Row + I);\r\n if Assigned(s) then\r\n RemoveVirtualNode(s); \r\n end;\r\n end;\r\nend;\r\n\r\ndestructor TTMSFNCTreeViewData.Destroy;\r\nbegin\r\n FFilter.Free;\r\n FDisplayGroups.Free;\r\n FNodeStructure.Free;\r\n FVisibleNodes.Free;\r\n FNodes.Free;\r\n FGroups.Free;\r\n FColumns.Free;\r\n inherited;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewData.DoGetColumnHorizontalTextAlign(AColumn: Integer; AKind: TTMSFNCTreeViewCacheItemKind; var AHorizontalTextAlign: TTMSFNCGraphicsTextAlign);\r\nbegin\r\n\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewData.DoGetColumnTrimming(AColumn: Integer; AKind: TTMSFNCTreeViewCacheItemKind; var ATrimming: TTMSFNCGraphicsTextTrimming);\r\nbegin\r\n\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewData.DoGetColumnVerticalTextAlign(AColumn: Integer; AKind: TTMSFNCTreeViewCacheItemKind; var AVerticalTextAlign: TTMSFNCGraphicsTextAlign);\r\nbegin\r\n\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewData.DoGetColumnWordWrapping(AColumn: Integer; AKind: TTMSFNCTreeViewCacheItemKind; var AWordWrapping: Boolean);\r\nbegin\r\n\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewData.DoGetHTMLTemplate(ANodeValue: TTMSFNCTreeViewNodeValue; AColumnIndex: Integer; var AHTMLTemplate: string);\r\nbegin\r\n\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewData.DoGetHTMLTemplateValue(ANodeValue: TTMSFNCTreeViewNodeValue; AName: string; var AValue: string);\r\nbegin\r\n\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewData.DoGetNodeCheckType(ANode: TTMSFNCTreeViewVirtualNode;\r\n AColumn: Integer; var ACheckType: TTMSFNCTreeViewNodeCheckType);\r\nvar\r\n it: TTMSFNCTreeViewNode;\r\nbegin\r\n it := ANode.Node;\r\n if Assigned(it) then\r\n begin\r\n if (AColumn >= 0) and (AColumn <= it.Values.Count - 1) then\r\n ACheckType := it.Values[AColumn].CheckType;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewData.DoGetNodeColor(ANode: TTMSFNCTreeViewVirtualNode; var AColor: TTMSFNCGraphicsColor);\r\nbegin\r\n\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewData.DoGetNodeData(ANode: TTMSFNCTreeViewVirtualNode);\r\nbegin\r\n\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewData.DoGetNodeDisabledColor(\r\n ANode: TTMSFNCTreeViewVirtualNode; var AColor: TTMSFNCGraphicsColor);\r\nbegin\r\n\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewData.DoGetNodeDisabledTextColor(\r\n ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer; var ATextColor: TTMSFNCGraphicsColor);\r\nbegin\r\n\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewData.DoGetNodeDisabledTitleColor(\r\n ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer;\r\n var ATitleColor: TTMSFNCGraphicsColor);\r\nbegin\r\n\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewData.DoGetNodeExtraSize(\r\n ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer; var AExtraSize: Single);\r\nbegin\r\n\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewData.DoGetNodeTitleExtraSize(\r\n ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer; var ATitleExtraSize: Single);\r\nbegin\r\n\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewData.BeforeExport;\r\nbegin\r\n inherited;\r\n ClearNodeList;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewData.BuildInternalNodeList(\r\n ANode: TTMSFNCTreeViewVirtualNode; AID: String; AParentNode: Integer; ANodeIndex: Integer; ALevel: Integer; AParentExpanded: Boolean; var ATotalChildren: Integer);\r\nvar\r\n I: Integer;\r\n nd: Integer;\r\n vi: Boolean;\r\n v: TTMSFNCTreeViewVirtualNode;\r\n exp: Boolean;\r\n tot: Integer;\r\n chk, ext: Boolean;\r\n chkst: TTMSFNCArrayBoolean;\r\n p: TTMSFNCTreeViewVirtualNode;\r\n l: TTMSFNCTreeViewVirtualNodeArray;\r\nbegin\r\n ANode.FRow := FNodeStructure.Count;\r\n ANode.FParentNode := AParentNode;\r\n ANode.FIndex := ANodeIndex;\r\n ANode.FLevel := ALevel;\r\n if AID <> 'ROOT' then\r\n GetNodeForNodeData(ANode);\r\n\r\n nd := 0;\r\n if (ALevel < MAXLEVELDEPTH) then\r\n DoGetNumberOfNodes(ANode, nd);\r\n\r\n ANode.FChildren := nd;\r\n\r\n ANode.FCalculated := False;\r\n ANode.FHeight := GetDefaultRowHeight(ANode);\r\n\r\n exp := False;\r\n if AID <> 'ROOT' then\r\n DoIsNodeExpanded(ANode, exp);\r\n ANode.FExpanded := exp;\r\n\r\n ext := False;\r\n DoIsNodeExtended(ANode, ext);\r\n UpdateNodeExtended(ANode, ext);\r\n\r\n SetLength(chkst, 0);\r\n if AID <> 'ROOT' then\r\n begin\r\n for I := 0 to ColumnCount - 1 do\r\n begin\r\n chk := False;\r\n DoIsNodeChecked(ANode, I, chk);\r\n SetLength(chkst, Length(chkst) + 1);\r\n chkst[Length(chkst) - 1] := chk;\r\n end;\r\n ANode.FCheckStates := chkst;\r\n end;\r\n\r\n if FFilterApplied then\r\n vi := MatchFilter(ANode)\r\n else\r\n vi := True;\r\n\r\n if AID <> 'ROOT' then\r\n DoIsNodeVisible(ANode, vi);\r\n\r\n tot := nd;\r\n\r\n if AID <> 'ROOT' then\r\n begin\r\n FNodeStructure.Add(ANode);\r\n if (AParentExpanded or (ANode.Level = 0)) and vi then\r\n begin\r\n if FFilterApplied then\r\n begin\r\n p := ANode.GetParent;\r\n l := nil;\r\n while Assigned(p) do\r\n begin\r\n if not p.FAddedToVisibleList then\r\n begin\r\n SetLength(l, Length(l) + 1);\r\n l[Length(l) - 1] := p;\r\n end;\r\n p := p.GetParent;\r\n end;\r\n\r\n for I := Length(l) - 1 downto 0 do\r\n begin\r\n FVisibleNodes.Add(l[I]);\r\n l[I].FAddedToVisibleList := True;\r\n end;\r\n end;\r\n\r\n FVisibleNodes.Add(ANode);\r\n ANode.FAddedToVisibleList := True;\r\n end;\r\n end;\r\n\r\n for I := 0 to nd - 1 do\r\n begin\r\n if FNodeStructure.Count = MAXNODECOUNT then\r\n Break;\r\n\r\n v := TTMSFNCTreeViewVirtualNode.Create(Self);\r\n if AID = 'ROOT' then\r\n BuildInternalNodeList(v, '', AParentNode, I, 0, exp, tot)\r\n else\r\n BuildInternalNodeList(v, '', ANode.Row, I, ANode.Level + 1, exp, tot);\r\n end;\r\n\r\n ATotalChildren := ATotalChildren + tot;\r\n\r\n if AID <> 'ROOT' then\r\n ANode.FTotalChildren := tot\r\n else\r\n ANode.Free;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewData.Notification(AComponent: TComponent;\r\n Operation: TOperation);\r\nbegin\r\n inherited;\r\n if (AComponent = FBitmapContainer) and (Operation = opRemove) then\r\n FBitmapContainer := nil;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewData.BuildNodeList;\r\nvar\r\n v: TTMSFNCTreeViewVirtualNode;\r\n c: Integer;\r\nbegin\r\n if NodeListBuild then\r\n Exit;\r\n\r\n FNodeStructure.Clear;\r\n FVisibleNodes.Clear;\r\n v := TTMSFNCTreeViewVirtualNode.Create(Self);\r\n TotalRowHeight := 1;\r\n RowCount := 0;\r\n c := 0;\r\n BuildInternalNodeList(v, 'ROOT', -1, -1, -1, True, c);\r\n RowCount := FVisibleNodes.Count;\r\n NodeListBuild := FNodeStructure.Count > 0;\r\nend;\r\n\r\nfunction TTMSFNCTreeViewData.GetNextChildNode(\r\n ANode: TTMSFNCTreeViewNode; AStartNode: TTMSFNCTreeViewNode): TTMSFNCTreeViewNode;\r\nvar\r\n v: TTMSFNCTreeViewVirtualNode;\r\nbegin\r\n Result := nil;\r\n if Assigned(ANode) and Assigned(AStartNode) then\r\n begin\r\n v := GetNextChildVirtualNode(ANode.VirtualNode, AStartNode.VirtualNode);\r\n if Assigned(v) then\r\n Result := v.Node;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCTreeViewData.GetNextChildVirtualNode(\r\n ANode: TTMSFNCTreeViewVirtualNode; AStartNode: TTMSFNCTreeViewVirtualNode): TTMSFNCTreeViewVirtualNode;\r\nbegin\r\n Result := GetNextSiblingVirtualNode(AStartNode);\r\nend;\r\n\r\nfunction TTMSFNCTreeViewData.GetNextNode(\r\n ANode: TTMSFNCTreeViewNode): TTMSFNCTreeViewNode;\r\nvar\r\n v: TTMSFNCTreeViewVirtualNode;\r\nbegin\r\n Result := nil;\r\n if Assigned(ANode) then\r\n begin\r\n v := GetNextVirtualNode(ANode.VirtualNode);\r\n if Assigned(v) then\r\n Result := v.Node;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCTreeViewData.GetNextSiblingNode(\r\n ANode: TTMSFNCTreeViewNode): TTMSFNCTreeViewNode;\r\nvar\r\n v: TTMSFNCTreeViewVirtualNode;\r\nbegin\r\n Result := nil;\r\n if Assigned(ANode) then\r\n begin\r\n v := GetNextSiblingVirtualNode(ANode.VirtualNode);\r\n if Assigned(v) then\r\n Result := v.Node;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCTreeViewData.GetNextSiblingVirtualNode(\r\n ANode: TTMSFNCTreeViewVirtualNode): TTMSFNCTreeViewVirtualNode;\r\nvar\r\n res: TTMSFNCTreeViewVirtualNode;\r\nbegin\r\n res := ANode;\r\n repeat\r\n res := GetNextVirtualNode(res);\r\n Result := res;\r\n until (Result = nil) or (Assigned(Result) and (Result.ParentNode = ANode.ParentNode));\r\nend;\r\n\r\nfunction TTMSFNCTreeViewData.GetNextVirtualNode(\r\n ANode: TTMSFNCTreeViewVirtualNode): TTMSFNCTreeViewVirtualNode;\r\nbegin\r\n Result := nil;\r\n if Assigned(ANode) then\r\n Result := GetNodeFromNodeStructure(ANode.Row + 1);\r\nend;\r\n\r\nfunction TTMSFNCTreeViewData.GetNodeChildCount(ANode: TTMSFNCTreeViewNode): Integer;\r\nbegin\r\n Result := 0;\r\n if Assigned(ANode) then\r\n Result := GetVirtualNodeChildCount(ANode.VirtualNode);\r\nend;\r\n\r\nfunction TTMSFNCTreeViewData.GetBitmapContainer: TTMSFNCBitmapContainer;\r\nbegin\r\n Result := FBitmapContainer;\r\nend;\r\n\r\nfunction TTMSFNCTreeViewData.GetDefaultRowHeight(\r\n ANode: TTMSFNCTreeViewVirtualNode): Single;\r\nbegin\r\n Result := DefaultRowHeight + GetNodesSpacing(ANode);\r\nend;\r\n\r\nfunction TTMSFNCTreeViewData.GetFirstChildNode(\r\n ANode: TTMSFNCTreeViewNode): TTMSFNCTreeViewNode;\r\nvar\r\n v: TTMSFNCTreeViewVirtualNode;\r\nbegin\r\n Result := nil;\r\n if Assigned(ANode) then\r\n begin\r\n v := GetFirstChildVirtualNode(ANode.VirtualNode);\r\n if Assigned(v) then\r\n Result := v.Node;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCTreeViewData.GetFirstChildVirtualNode(\r\n ANode: TTMSFNCTreeViewVirtualNode): TTMSFNCTreeViewVirtualNode;\r\nbegin\r\n Result := nil;\r\n if Assigned(ANode) and (ANode.Children > 0) then\r\n Result := GetNodeFromNodeStructure(ANode.Row + 1);\r\nend;\r\n\r\nfunction TTMSFNCTreeViewData.GetFirstRootNode: TTMSFNCTreeViewNode;\r\nvar\r\n n: TTMSFNCTreeViewVirtualNode;\r\nbegin\r\n Result := nil;\r\n n := GetFirstRootVirtualNode;\r\n if Assigned(n) then\r\n Result := n.Node;\r\nend;\r\n\r\nfunction TTMSFNCTreeViewData.GetFirstRootVirtualNode: TTMSFNCTreeViewVirtualNode;\r\nbegin\r\n Result := nil;\r\n if NodeStructure.Count > 0 then\r\n Result := NodeStructure[0];\r\nend;\r\n\r\nfunction TTMSFNCTreeViewData.GetHTMLTemplate(AColumnIndex: Integer): string;\r\nbegin\r\n Result := '';\r\nend;\r\n\r\nfunction TTMSFNCTreeViewData.GetInsertPosition(\r\n ANode: TTMSFNCTreeViewVirtualNode; ARoot: Boolean; AInsert: Boolean): Integer;\r\nvar\r\n prev: TTMSFNCTreeViewVirtualNode;\r\n I: Integer;\r\n r: Integer;\r\n n: TTMSFNCTreeViewVirtualNode;\r\nbegin\r\n Result := -1;\r\n if not Assigned(ANode) then\r\n Exit;\r\n\r\n if (ANode.Row = 0) then\r\n begin\r\n Result := 0;\r\n Exit;\r\n end;\r\n\r\n if AInsert then\r\n prev := GetNodeFromNodeStructure(ANode.Row - 1)\r\n else\r\n prev := GetNodeFromNodeStructure(ANode.Row);\r\n\r\n if ARoot then\r\n begin\r\n while Assigned(prev) and (prev.ParentNode >= 0) and (prev.ParentNode <= NodeStructure.Count - 1) do\r\n begin\r\n n := GetNodeFromNodeStructure(prev.ParentNode);\r\n if n <> prev then\r\n prev := n\r\n else\r\n Break;\r\n end;\r\n end;\r\n\r\n if Assigned(prev) then\r\n begin\r\n for I := 0 to VisibleNodes.Count - 1 do\r\n begin\r\n if AInsert then\r\n r := ANode.Row + 1\r\n else\r\n r := ANode.Row;\r\n\r\n if VisibleNodes[I].Row = r then\r\n begin\r\n Result := I;\r\n Break;\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCTreeViewData.GetLastChildNode(\r\n ANode: TTMSFNCTreeViewNode): TTMSFNCTreeViewNode;\r\nvar\r\n v: TTMSFNCTreeViewVirtualNode;\r\nbegin\r\n Result := nil;\r\n if Assigned(ANode) then\r\n begin\r\n v := GetLastChildVirtualNode(ANode.VirtualNode);\r\n if Assigned(v) then\r\n Result := v.Node;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCTreeViewData.GetLastChildVirtualNode(\r\n ANode: TTMSFNCTreeViewVirtualNode): TTMSFNCTreeViewVirtualNode;\r\nvar\r\n v: TTMSFNCTreeViewVirtualNode;\r\nbegin\r\n Result := GetFirstChildVirtualNode(ANode);\r\n if Assigned(Result) then\r\n begin\r\n v := Result;\r\n repeat\r\n Result := v;\r\n v := GetNextSiblingVirtualNode(v);\r\n until v = nil;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCTreeViewData.GetLastNode: TTMSFNCTreeViewNode;\r\nvar\r\n n: TTMSFNCTreeViewVirtualNode;\r\nbegin\r\n Result := nil;\r\n n := GetLastVirtualNode;\r\n if Assigned(n) then\r\n Result := n.Node;\r\nend;\r\n\r\nfunction TTMSFNCTreeViewData.GetLastRootNode: TTMSFNCTreeViewNode;\r\nvar\r\n n: TTMSFNCTreeViewVirtualNode;\r\nbegin\r\n Result := nil;\r\n n := GetLastRootVirtualNode;\r\n if Assigned(n) then\r\n Result := n.Node;\r\nend;\r\n\r\nfunction TTMSFNCTreeViewData.GetLastRootVirtualNode: TTMSFNCTreeViewVirtualNode;\r\nbegin\r\n Result := nil;\r\n if NodeStructure.Count > 0 then\r\n begin\r\n Result := NodeStructure[NodeStructure.Count - 1];\r\n while Assigned(Result) and (Result.ParentNode > -1) do\r\n Result := NodeStructure[Result.Row - 1];\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCTreeViewData.GetLastVirtualNode: TTMSFNCTreeViewVirtualNode;\r\nbegin\r\n Result := nil;\r\n if NodeStructure.Count > 0 then\r\n Result := NodeStructure[NodeStructure.Count - 1];\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewData.GetNodeForNodeData(\r\n ANode: TTMSFNCTreeViewVirtualNode);\r\nvar\r\n col: TTMSFNCTreeViewNodes;\r\n p: TTMSFNCTreeViewVirtualNode;\r\n it: TTMSFNCTreeViewNode;\r\nbegin\r\n if Assigned(ANode) then\r\n begin\r\n p := GetNodeFromNodeStructure(ANode.ParentNode);\r\n if Assigned(p) and Assigned(p.Node) then\r\n col := TTMSFNCTreeViewNodes(p.Node.Nodes)\r\n else\r\n col := Nodes;\r\n end\r\n else\r\n Exit;\r\n\r\n if Assigned(col) then\r\n begin\r\n if (ANode.Index >= 0) and (ANode.Index <= col.Count - 1) then\r\n begin\r\n it := col[ANode.Index];\r\n ANode.FNode := it;\r\n it.FVirtualNode := ANode;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewData.DoGetNodeHorizontalTextAlign(\r\n ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer;\r\n var AHorizontalTextAlign: TTMSFNCGraphicsTextAlign);\r\nbegin\r\n\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewData.DoGetNodeIcon(ANode: TTMSFNCTreeViewVirtualNode;\r\n AColumn: Integer; ALarge: Boolean; var AIcon: TTMSFNCBitmap);\r\nvar\r\n it: TTMSFNCTreeViewNode;\r\n v: TTMSFNCTreeViewNodeValue;\r\nbegin\r\n it := ANode.Node;\r\n if Assigned(it) then\r\n begin\r\n if (AColumn >= 0) and (AColumn <= it.Values.Count - 1) then\r\n begin\r\n v := it.Values[AColumn];\r\n if ANode.Expanded then\r\n begin\r\n if ALarge then\r\n begin\r\n if Assigned(BitmapContainer) and (v.ExpandedIconLargeName <> '') then\r\n AIcon := TTMSFNCBitmap(BitmapContainer.FindBitmap(v.ExpandedIconLargeName));\r\n\r\n if not Assigned(AIcon) then\r\n AIcon := v.ExpandedIconLarge;\r\n end\r\n else\r\n begin\r\n if Assigned(BitmapContainer) and (v.ExpandedIconName <> '') then\r\n AIcon := TTMSFNCBitmap(BitmapContainer.FindBitmap(v.ExpandedIconName));\r\n\r\n if not Assigned(AIcon) then\r\n AIcon := v.ExpandedIcon;\r\n end;\r\n end\r\n else\r\n begin\r\n if ALarge then\r\n begin\r\n if Assigned(BitmapContainer) and (v.CollapsedIconLargeName <> '') then\r\n AIcon := TTMSFNCBitmap(BitmapContainer.FindBitmap(v.CollapsedIconLargeName));\r\n\r\n if not Assigned(AIcon) then\r\n AIcon := v.CollapsedIconLarge;\r\n end\r\n else\r\n begin\r\n if Assigned(BitmapContainer) and (v.CollapsedIconName <> '') then\r\n AIcon := TTMSFNCBitmap(BitmapContainer.FindBitmap(v.CollapsedIconName));\r\n\r\n if not Assigned(AIcon) then\r\n AIcon := v.CollapsedIcon;\r\n end;\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewData.DoGetNodeIconSize(\r\n ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer; ALarge: Boolean;\r\n AIcon: TTMSFNCBitmap; var AIconWidth: Double; var AIconHeight: Double);\r\nbegin\r\n\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewData.DoGetNodeSelectedColor(\r\n ANode: TTMSFNCTreeViewVirtualNode; var AColor: TTMSFNCGraphicsColor);\r\nbegin\r\n\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewData.DoGetNodeSelectedTextColor(\r\n ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer; var ATextColor: TTMSFNCGraphicsColor);\r\nbegin\r\n\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewData.DoGetNodeSelectedTitleColor(\r\n ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer;\r\n var ATitleColor: TTMSFNCGraphicsColor);\r\nbegin\r\n\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewData.DoGetNodeSides(ANode: TTMSFNCTreeViewVirtualNode;\r\n var ASides: TTMSFNCGraphicsSides);\r\nbegin\r\n\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewData.DoGetNodeText(ANode: TTMSFNCTreeViewVirtualNode;\r\n AColumn: Integer; AMode: TTMSFNCTreeViewNodeTextMode; var AText: String);\r\nvar\r\n it: TTMSFNCTreeViewNode;\r\nbegin\r\n it := ANode.Node;\r\n if Assigned(it) then\r\n begin\r\n if (AColumn >= 0) and (AColumn <= it.Values.Count - 1) then\r\n AText := it.Values[AColumn].GetText;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewData.DoGetNodeTitleExpanded(ANode: TTMSFNCTreeViewVirtualNode;\r\n AColumn: Integer; var AExpanded: Boolean);\r\nvar\r\n it: TTMSFNCTreeViewNode;\r\nbegin\r\n it := ANode.Node;\r\n if Assigned(it) then\r\n begin\r\n if (AColumn >= 0) and (AColumn <= it.Values.Count - 1) then\r\n AExpanded := it.Values[AColumn].TitleExpanded;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewData.DoGetNodeTitle(ANode: TTMSFNCTreeViewVirtualNode;\r\n AColumn: Integer; AMode: TTMSFNCTreeViewNodeTextMode; var ATitle: String);\r\nvar\r\n it: TTMSFNCTreeViewNode;\r\nbegin\r\n it := ANode.Node;\r\n if Assigned(it) then\r\n begin\r\n if (AColumn >= 0) and (AColumn <= it.Values.Count - 1) then\r\n ATitle := it.Values[AColumn].Title;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewData.DoGetNodeTitleColor(\r\n ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer;\r\n var ATitleColor: TTMSFNCGraphicsColor);\r\nbegin\r\n\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewData.DoGetNodeTitleHorizontalTextAlign(\r\n ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer;\r\n var AHorizontalTextAlign: TTMSFNCGraphicsTextAlign);\r\nbegin\r\n\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewData.DoGetNodeTitleTrimming(\r\n ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer;\r\n var ATrimming: TTMSFNCGraphicsTextTrimming);\r\nbegin\r\n\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewData.DoGetNodeTitleVerticalTextAlign(\r\n ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer;\r\n var AVerticalTextAlign: TTMSFNCGraphicsTextAlign);\r\nbegin\r\n\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewData.DoGetNodeTitleWordWrapping(\r\n ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer;\r\n var AWordWrapping: Boolean);\r\nbegin\r\n\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewData.DoGetNodeTextColor(ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer;\r\n var ATextColor: TTMSFNCGraphicsColor);\r\nbegin\r\n\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewData.DoGetNodeTrimming(ANode: TTMSFNCTreeViewVirtualNode;\r\n AColumn: Integer; var ATrimming: TTMSFNCGraphicsTextTrimming);\r\nbegin\r\n\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewData.DoGetNodeVerticalTextAlign(\r\n ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer;\r\n var AVerticalTextAlign: TTMSFNCGraphicsTextAlign);\r\nbegin\r\n\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewData.DoGetNodeWordWrapping(\r\n ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer; var AWordWrapping: Boolean);\r\nbegin\r\n\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewData.DoGetNumberOfNodes(\r\n ANode: TTMSFNCTreeViewVirtualNode; var ANumberOfNodes: Integer);\r\nbegin\r\n if Assigned(ANode.Node) then\r\n ANumberOfNodes := ANode.Node.Nodes.Count\r\n else\r\n ANumberOfNodes := Nodes.Count;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewData.DoIsNodeChecked(ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer;\r\n var AChecked: Boolean);\r\nvar\r\n it: TTMSFNCTreeViewNode;\r\nbegin\r\n it := ANode.Node;\r\n if Assigned(it) then\r\n begin\r\n if (AColumn >= 0) and (AColumn <= it.Values.Count - 1) then\r\n AChecked := it.Values[AColumn].Checked;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewData.CheckNodeInternal(ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer; ARecurse: Boolean = False);\r\nvar\r\n chkt: TTMSFNCTreeViewNodeCheckType;\r\n pn, n: TTMSFNCTreeViewVirtualNode;\r\n st, stp: Integer;\r\n I: Integer;\r\n v: TTMSFNCTreeViewVirtualNode;\r\nbegin\r\n if not Assigned(ANode) then\r\n Exit;\r\n\r\n if (AColumn >= 0) and (AColumn <= Length(ANode.CheckStates) - 1) then\r\n begin\r\n ANode.CheckStates[AColumn] := True;\r\n UpdateCheckState(ANode, AColumn, ANode.CheckStates[AColumn]);\r\n end;\r\n\r\n if Assigned(ANode.Node) then\r\n begin\r\n if (AColumn >= 0) and (AColumn <= ANode.Node.Values.Count - 1) then\r\n ANode.Node.Values.UpdateChecked(AColumn, True);\r\n end;\r\n\r\n chkt := tvntNone;\r\n DoGetNodeCheckType(ANode, AColumn, chkt);\r\n if chkt = tvntRadioButton then\r\n begin\r\n pn := GetNodeFromNodeStructure(ANode.ParentNode);\r\n if Assigned(pn) then\r\n begin\r\n st := pn.Row + 1;\r\n stp := st + pn.TotalChildren;\r\n end\r\n else\r\n begin\r\n st := 0;\r\n stp := NodeStructure.Count;\r\n end;\r\n\r\n while st < stp do\r\n begin\r\n n := GetNodeFromNodeStructure(st);\r\n if Assigned(n) then\r\n begin\r\n if n <> ANode then\r\n begin\r\n chkt := tvntNone;\r\n DoGetNodeCheckType(n, AColumn, chkt);\r\n if chkt = tvntRadioButton then\r\n begin\r\n if (AColumn >= 0) and (AColumn <= Length(n.CheckStates) - 1) then\r\n begin\r\n n.CheckStates[AColumn] := False;\r\n UpdateCheckState(n, AColumn, n.CheckStates[AColumn]);\r\n end;\r\n\r\n if Assigned(n.Node) then\r\n begin\r\n if (AColumn >= 0) and (AColumn <= n.Node.Values.Count - 1) then\r\n n.Node.Values.UpdateChecked(AColumn, False);\r\n end;\r\n end;\r\n end;\r\n st := st + n.TotalChildren + 1;\r\n end\r\n else\r\n Break;\r\n end;\r\n end;\r\n\r\n if ARecurse then\r\n begin\r\n for I := ANode.Row + 1 to ANode.Row + ANode.TotalChildren do\r\n begin\r\n v := GetNodeFromNodeStructure(I);\r\n if Assigned(v) then\r\n CheckNodeInternal(v, AColumn, ARecurse);\r\n end;\r\n end;\r\n\r\n Invalidate;\r\nend;\r\n\r\nfunction TTMSFNCTreeViewData.InsertVirtualNode(AIndex: Integer; AParentNode: TTMSFNCTreeViewVirtualNode = nil): TTMSFNCTreeViewVirtualNode;\r\nvar\r\n v: TTMSFNCTreeViewVirtualNode;\r\n p, n, c: TTMSFNCTreeViewVirtualNode;\r\n I, idx: Integer;\r\nbegin\r\n Result := nil;\r\n if (csDestroying in ComponentState) or not NodeListBuild then\r\n Exit;\r\n\r\n v := TTMSFNCTreeViewVirtualNode.Create(Self);\r\n if Assigned(AParentNode) then\r\n begin\r\n idx := -1;\r\n I := AParentNode.Row + 1;\r\n while i <= AParentNode.Row + AParentNode.TotalChildren do\r\n begin\r\n n := GetNodeFromNodeStructure(I);\r\n if Assigned(n) then\r\n begin\r\n if (n.Index = AIndex) and (n.ParentNode = AParentNode.Row) then\r\n begin\r\n idx := n.Row;\r\n Break;\r\n end;\r\n I := I + n.Children + 1;\r\n end\r\n else\r\n Break;\r\n end;\r\n\r\n if idx = -1 then\r\n InsertNodeInternal(AParentNode, AIndex, AParentNode.Row + AParentNode.TotalChildren + 1, v)\r\n else\r\n InsertNodeInternal(AParentNode, AIndex, idx, v);\r\n end\r\n else\r\n begin\r\n p := nil;\r\n if NodeStructure.Count > 0 then\r\n begin\r\n p := GetNodeFromNodeStructure(NodeStructure.Count - 1);\r\n while Assigned(p) and (p.ParentNode >= 0) and (p.ParentNode <= NodeStructure.Count - 1) do\r\n p := GetNodeFromNodeStructure(p.ParentNode);\r\n end;\r\n\r\n if Assigned(p) then\r\n begin\r\n if AIndex > p.Index then\r\n InsertNodeInternal(nil, AIndex, p.Row + p.TotalChildren + 1, v)\r\n else\r\n begin\r\n n := nil;\r\n I := 0;\r\n while not Assigned(n) do\r\n begin\r\n c := GetNodeFromNodeStructure(I);\r\n if Assigned(c) then\r\n begin\r\n if c.Index = AIndex then\r\n begin\r\n n := c;\r\n Break;\r\n end\r\n else\r\n I := I + c.TotalChildren + 1;\r\n end\r\n else\r\n Break;\r\n end;\r\n\r\n if Assigned(n) then\r\n InsertNodeInternal(nil, AIndex, n.Row, v);\r\n end;\r\n end\r\n else\r\n InsertNodeInternal(nil, 0, 0, v);\r\n end;\r\n\r\n Result := v;\r\nend;\r\n\r\nfunction TTMSFNCTreeViewData.GetVirtualNodeChildCount(\r\n ANode: TTMSFNCTreeViewVirtualNode): Integer;\r\nbegin\r\n Result := 0;\r\n if Assigned(ANode) then\r\n Result := ANode.Children;\r\nend;\r\n\r\nfunction TTMSFNCTreeViewData.GetVirtualNodeTitleExpanded(\r\n ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer): Boolean;\r\nbegin\r\n Result := True;\r\n if Assigned(ANode) then\r\n begin\r\n Result := True;\r\n DoGetNodeTitleExpanded(ANode, AColumn, Result);\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCTreeViewData.GetVisibleNodeForIndex(\r\n AIndex: Integer): TTMSFNCTreeViewVirtualNode;\r\nbegin\r\n Result := nil;\r\n if (AIndex >= 0) and (AIndex <= VisibleNodes.Count - 1) then\r\n Result := VisibleNodes[AIndex];\r\nend;\r\n\r\nfunction TTMSFNCTreeViewData.HTMLReplace(AValue: string; ANodeValue: TTMSFNCTreeViewNodeValue): string;\r\nvar\r\n beforetag, aftertag, nm, vl: string;\r\n i, j: integer;\r\nbegin\r\n Result := '';\r\n if not Assigned(ANodeValue) then\r\n Exit;\r\n\r\n beforetag := '';\r\n\r\n while (Pos('<#', AValue) > 0) and (Pos('>', AValue) > 0) do\r\n begin\r\n i := pos('<#', AValue);\r\n beforetag := beforetag + copy(AValue, 1, i - 1); //part prior to the tag\r\n aftertag := copy(AValue, i, length(AValue)); //part after the tag\r\n j := pos('>', aftertag);\r\n nm := copy(aftertag, 1, j - 1);\r\n Delete(nm, 1, 2);\r\n Delete(AValue, 1, i + j - 1);\r\n vl := ANodeValue.HTMLTemplateItems.Values[nm];\r\n DoGetHTMLTemplateValue(ANodeValue, nm, vl);\r\n beforetag := beforetag + vl;\r\n end;\r\n\r\n Result := beforetag + AValue;\r\nend;\r\n\r\nfunction TTMSFNCTreeViewData.GetVirtualNodeText(\r\n ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer): string;\r\nbegin\r\n Result := '';\r\n if Assigned(ANode) then\r\n begin\r\n Result := '';\r\n DoGetNodeText(ANode, AColumn, tntmDrawing, Result);\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCTreeViewData.GetVirtualNodeTitle(\r\n ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer): string;\r\nbegin\r\n Result := '';\r\n if Assigned(ANode) then\r\n begin\r\n Result := '';\r\n DoGetNodeTitle(ANode, AColumn, tntmDrawing, Result);\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCTreeViewData.GetParentVirtualNode(ANode: TTMSFNCTreeViewVirtualNode): TTMSFNCTreeViewVirtualNode;\r\nbegin\r\n Result := nil;\r\n if Assigned(ANode) then\r\n Result := GetNodeFromNodeStructure(ANode.ParentNode);\r\nend;\r\n\r\nfunction TTMSFNCTreeViewData.AddVirtualNode(AParentNode: TTMSFNCTreeViewVirtualNode = nil): TTMSFNCTreeViewVirtualNode;\r\nvar\r\n p: TTMSFNCTreeViewVirtualNode;\r\n idx: Integer;\r\nbegin\r\n Result := nil;\r\n if (csDestroying in ComponentState) or not NodeListBuild then\r\n Exit;\r\n\r\n if Assigned(AParentNode) then\r\n begin\r\n idx := AParentNode.Children;\r\n end\r\n else\r\n begin\r\n p := nil;\r\n if NodeStructure.Count > 0 then\r\n begin\r\n p := GetNodeFromNodeStructure(NodeStructure.Count - 1);\r\n while Assigned(p) and (p.ParentNode >= 0) and (p.ParentNode <= NodeStructure.Count - 1) do\r\n p := GetNodeFromNodeStructure(p.ParentNode);\r\n end;\r\n\r\n idx := p.Index + 1;\r\n end;\r\n\r\n Result := InsertVirtualNode(idx, AParentNode);\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewData.AfterExport;\r\nbegin\r\n inherited;\r\n ClearNodeList;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewData.ApplyFilter;\r\nbegin\r\n FFilterApplied := True;\r\n ClearNodeList;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewData.SetNodeTextValues(ANode: TTMSFNCTreeViewNode; ATextValues: TTMSFNCTreeViewNodeTextValues);\r\nbegin\r\n if Assigned(ANode) then\r\n ANode.SetTextValues(ATextValues);\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewData.SetNodeExpandedIcons(ANode: TTMSFNCTreeViewNode; AIcons: TTMSFNCTreeViewNodeIcons; ALarge: Boolean = False);\r\nbegin\r\n if Assigned(ANode) then\r\n ANode.SetExpandedIcons(AIcons, ALarge);\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewData.SetNodeExpandedIconNames(ANode: TTMSFNCTreeViewNode; AIconNames: TTMSFNCTreeViewNodeIconNames; ALarge: Boolean = False);\r\nbegin\r\n if Assigned(ANode) then\r\n ANode.SetExpandedIconNames(AIconNames, ALarge);\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewData.SetNodeCollapsedIcons(ANode: TTMSFNCTreeViewNode; AIcons: TTMSFNCTreeViewNodeIcons; ALarge: Boolean = False);\r\nbegin\r\n if Assigned(ANode) then\r\n ANode.SetCollapsedIcons(AIcons, ALarge);\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewData.SetNodeCollapsedIconNames(ANode: TTMSFNCTreeViewNode; AIconNames: TTMSFNCTreeViewNodeIconNames; ALarge: Boolean = False);\r\nbegin\r\n if Assigned(ANode) then\r\n ANode.SetCollapsedIconNames(AIconNames, ALarge);\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewData.SetNodeCheckTypes(ANode: TTMSFNCTreeViewNode; ACheckTypes: TTMSFNCTreeViewNodeCheckTypes);\r\nbegin\r\n if Assigned(ANode) then\r\n ANode.SetCheckTypes(ACheckTypes);\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewData.SetNodeCheckStates(ANode: TTMSFNCTreeViewNode; ACheckStates: TTMSFNCTreeViewNodeCheckStates);\r\nbegin\r\n if Assigned(ANode) then\r\n ANode.SetCheckStates(ACheckStates);\r\nend;\r\n\r\nfunction TTMSFNCTreeViewData.AddNode(AParentNode: TTMSFNCTreeViewNode = nil): TTMSFNCTreeViewNode;\r\nbegin\r\n if Assigned(AParentNode) then\r\n Result := AParentNode.Nodes.Add\r\n else\r\n Result := Nodes.Add;\r\nend;\r\n\r\nfunction TTMSFNCTreeViewData.InsertNode(AIndex: Integer; AParentNode: TTMSFNCTreeViewNode = nil): TTMSFNCTreeViewNode;\r\nbegin\r\n if Assigned(AParentNode) then\r\n Result := AParentNode.Nodes.Insert(AIndex)\r\n else\r\n Result := Nodes.Insert(AIndex);\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewData.RemoveNode(ANode: TTMSFNCTreeViewNode);\r\nbegin\r\n if Assigned(ANode) then\r\n begin\r\n ANode.Free;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCTreeViewData.RemoveNodeInternal(ANode: TTMSFNCTreeViewVirtualNode; AUpdateNodes: Boolean = True): TTMSFNCTreeViewVirtualNodeRemoveData;\r\nvar\r\n I: Integer;\r\n R, pi: Integer;\r\n subv, pv, rs: TTMSFNCTreeViewVirtualNode;\r\n cnt: Integer;\r\n exp, ext: Boolean;\r\n chkst: TTMSFNCArrayBoolean;\r\n K: Integer;\r\n chk: Boolean;\r\nbegin\r\n if (csDestroying in ComponentState) or not NodeListBuild or not Assigned(ANode) then\r\n Exit;\r\n\r\n cnt := NodeStructure.Count;\r\n pv := GetNodeFromNodeStructure(ANode.ParentNode);\r\n while Assigned(pv) do\r\n begin\r\n UpdateNodeTotalChildren(pv, pv.TotalChildren - 1 - ANode.TotalChildren);\r\n if pv.Row = ANode.ParentNode then\r\n UpdateNodeChildren(pv, pv.Children - 1);\r\n\r\n pi := pv.ParentNode;\r\n pv := GetNodeFromNodeStructure(pi);\r\n end;\r\n\r\n for I := ANode.TotalChildren - 1 downto 0 do\r\n begin\r\n R := I + ANode.Row + 1;\r\n subv := GetNodeFromNodeStructure(R);\r\n if Assigned(subv) then\r\n begin\r\n if VisibleNodes.IndexOf(subv) > -1 then\r\n begin\r\n VisibleNodes.Remove(subv);\r\n TotalRowHeight := TotalRowHeight - subv.Height;\r\n RowCount := RowCount - 1;\r\n end;\r\n NodeStructure.Remove(subv);\r\n RemoveNodeFromSelection(subv);\r\n end;\r\n end;\r\n\r\n R := ANode.Row;\r\n pi := ANode.ParentNode;\r\n if VisibleNodes.IndexOf(ANode) > -1 then\r\n begin\r\n VisibleNodes.Remove(ANode);\r\n TotalRowHeight := TotalRowHeight - ANode.Height;\r\n RowCount := RowCount - 1;\r\n end;\r\n\r\n UpdateNodeChildren(ANode, ANode.Children - 1);\r\n UpdateNodeTotalChildren(ANode, ANode.TotalChildren - 1);\r\n ClearFocusedNode(ANode);\r\n NodeStructure.Remove(ANode);\r\n RemoveNodeFromSelection(ANode);\r\n\r\n cnt := cnt - NodeStructure.Count;\r\n Result.Count := cnt;\r\n Result.RowIndex := R;\r\n Result.ParentNode := pi;\r\n\r\n if AUpdateNodes then\r\n begin\r\n for I := R to NodeStructure.Count - 1 do\r\n begin\r\n rs := GetNodeFromNodeStructure(I);\r\n if Assigned(rs) then\r\n begin\r\n UpdateNodeRow(rs, rs.Row - cnt);\r\n\r\n if rs.ParentNode > pi then\r\n UpdateNodeParentNode(rs, rs.ParentNode - cnt);\r\n\r\n if rs.ParentNode = pi then\r\n UpdateNodeIndex(rs, rs.Index - 1);\r\n\r\n GetNodeForNodeData(rs);\r\n\r\n exp := False;\r\n DoIsNodeExpanded(rs, exp);\r\n UpdateNodeExpanded(rs, exp);\r\n\r\n ext := False;\r\n DoIsNodeExtended(rs, ext);\r\n UpdateNodeExtended(rs, ext);\r\n\r\n SetLength(chkst, 0);\r\n for K := 0 to ColumnCount - 1 do\r\n begin\r\n chk := False;\r\n DoIsNodeChecked(RS, K, chk);\r\n SetLength(chkst, Length(chkst) + 1);\r\n chkst[Length(chkst) - 1] := chk;\r\n end;\r\n\r\n UpdateNodeCheckStates(rs, chkst);\r\n end;\r\n end;\r\n\r\n if not FBlockUpdate then\r\n begin\r\n ResetNodes(False);\r\n UpdateTreeView;\r\n Invalidate;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewData.UpdateVisibleNodes(\r\n ANode: TTMSFNCTreeViewVirtualNode);\r\nvar\r\n add: Boolean;\r\n R, I, C, idx: Integer;\r\n subv: TTMSFNCTreeViewVirtualNode;\r\n en, vi, visub: Boolean;\r\nbegin\r\n add := ANode.Expanded;\r\n if add then\r\n begin\r\n idx := GetInsertPosition(ANode, ANode.ParentNode = -1, False);\r\n en := True;\r\n DoIsNodeEnabled(ANode, en);\r\n\r\n vi := True;\r\n DoIsNodeVisible(ANode, vi);\r\n\r\n if (idx <> -1) and vi and en then\r\n begin\r\n I := 0;\r\n C := idx + 1;\r\n while I < ANode.TotalChildren do\r\n begin\r\n R := I + ANode.Row + 1;\r\n subv := GetNodeFromNodeStructure(R);\r\n if Assigned(subv) and (((MatchFilter(subv) or subv.FAddedToVisibleList) and FFilterApplied) or not FFilterApplied) then\r\n begin\r\n visub := True;\r\n DoIsNodeVisible(subv, visub);\r\n if visub then\r\n begin\r\n if (C >= 0) and (C < VisibleNodes.Count) then\r\n VisibleNodes.Insert(C, subv)\r\n else\r\n VisibleNodes.Add(subv);\r\n\r\n if subv.Children = 0 then\r\n subv.FExpanded := True;\r\n\r\n TotalRowHeight := TotalRowHeight + subv.Height;\r\n RowCount := RowCount + 1;\r\n Inc(C);\r\n end;\r\n\r\n if not subv.Expanded or not visub then\r\n I := I + subv.TotalChildren;\r\n end;\r\n Inc(I);\r\n end;\r\n end;\r\n end\r\n else\r\n begin\r\n for I := 0 to ANode.TotalChildren - 1 do\r\n begin\r\n R := I + ANode.Row + 1;\r\n subv := GetNodeFromNodeStructure(R);\r\n if Assigned(subv) then\r\n begin\r\n UpdateNodeCalculated(subv, False);\r\n if VisibleNodes.IndexOf(subv) > -1 then\r\n begin\r\n VisibleNodes.Remove(subv);\r\n\r\n if subv.Children = 0 then\r\n subv.FExpanded := False;\r\n\r\n TotalRowHeight := TotalRowHeight - subv.Height;\r\n RowCount := RowCount - 1;\r\n end;\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewData.CollapseNodeInternal(ANode: TTMSFNCTreeViewVirtualNode; ARecurse: Boolean = False);\r\nvar\r\n I: Integer;\r\n v, n: TTMSFNCTreeViewVirtualNode;\r\nbegin\r\n if not Assigned(ANode) or not NodeListBuild or (csDestroying in ComponentState) then\r\n Exit;\r\n\r\n if not ANode.Expanded then\r\n begin\r\n if ARecurse then\r\n begin\r\n n := ANode.GetFirstChild;\r\n while Assigned(n) do\r\n begin\r\n CollapseNodeInternal(n, ARecurse);\r\n n := n.GetNextSibling;\r\n end;\r\n end;\r\n\r\n Exit;\r\n end;\r\n\r\n ANode.FExpanded := False;\r\n\r\n UpdateNodeExpanded(ANode, False);\r\n if ARecurse then\r\n begin\r\n for I := ANode.Row + 1 to ANode.Row + ANode.TotalChildren do\r\n begin\r\n v := GetNodeFromNodeStructure(I);\r\n if Assigned(v) then\r\n UpdateNodeExpanded(v, False);\r\n end;\r\n end;\r\n\r\n UpdateVisibleNodes(ANode);\r\n\r\n if not FBlockUpdate then\r\n begin\r\n ResetNodes(False);\r\n UpdateTreeView;\r\n Invalidate;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewData.DoIsNodeEnabled(ANode: TTMSFNCTreeViewVirtualNode;\r\n var AEnabled: Boolean);\r\nvar\r\n it: TTMSFNCTreeViewNode;\r\nbegin\r\n it := ANode.Node;\r\n if Assigned(it) then\r\n AEnabled := it.Enabled;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewData.DoIsNodeExpanded(ANode: TTMSFNCTreeViewVirtualNode;\r\n var AExpanded: Boolean);\r\nvar\r\n it: TTMSFNCTreeViewNode;\r\nbegin\r\n it := ANode.Node;\r\n if Assigned(it) then\r\n AExpanded := it.Expanded;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewData.DoIsNodeExtended(ANode: TTMSFNCTreeViewVirtualNode;\r\n var AExtended: Boolean);\r\nvar\r\n it: TTMSFNCTreeViewNode;\r\nbegin\r\n it := ANode.Node;\r\n if Assigned(it) then\r\n AExtended := it.Extended;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewData.DoIsNodeVisible(ANode: TTMSFNCTreeViewVirtualNode;\r\n var AVisible: Boolean);\r\nbegin\r\n\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewData.DoNodeCompare(ANode1, ANode2: TTMSFNCTreeViewNode; AColumn: Integer; var ACompareResult: Integer);\r\nbegin\r\n\r\nend;\r\n\r\nfunction TTMSFNCTreeViewData.FindGroupByName(AName: String): TTMSFNCTreeViewGroup;\r\nvar\r\n I: Integer;\r\n grp: TTMSFNCTreeViewGroup;\r\nbegin\r\n Result := nil;\r\n for I := 0 to Groups.Count - 1 do\r\n begin\r\n grp := Groups[I];\r\n if grp.Name = AName then\r\n begin\r\n Result := grp;\r\n Break;\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCTreeViewData.FindGroupIndexByName(AName: String): Integer;\r\nvar\r\n grp: TTMSFNCTreeViewGroup;\r\nbegin\r\n Result := -1;\r\n grp := FindGroupByName(AName);\r\n if Assigned(grp) then\r\n Result := grp.Index;\r\nend;\r\n\r\nfunction TTMSFNCTreeViewData.FindNodeByDBKey(\r\n ADBKey: string): TTMSFNCTreeViewNode;\r\nvar\r\n v: TTMSFNCTreeViewVirtualNode;\r\nbegin\r\n Result := nil;\r\n v := FindVirtualNodeByDBKey(ADBKey);\r\n if Assigned(v) then\r\n Result := v.Node;\r\nend;\r\n\r\nfunction TTMSFNCTreeViewData.FindNodeByRow(ARow: Integer): TTMSFNCTreeViewNode;\r\nvar\r\n v: TTMSFNCTreeViewVirtualNode;\r\nbegin\r\n Result := nil;\r\n v := FindVirtualNodeByRow(ARow);\r\n if Assigned(v) then\r\n Result := v.Node;\r\nend;\r\n\r\nfunction TTMSFNCTreeViewData.FindNodeByTextAndColumn(AText: string;\r\n AColumn: Integer; ARecurse, ACaseSensitive: Boolean): TTMSFNCTreeViewNode;\r\nvar\r\n v: TTMSFNCTreeViewVirtualNode;\r\nbegin\r\n Result := nil;\r\n v := FindVirtualNodeByTextAndColumn(AText, AColumn, ARecurse, ACaseSensitive);\r\n if Assigned(v) then\r\n Result := v.Node;\r\nend;\r\n\r\nfunction TTMSFNCTreeViewData.FindVirtualNodeByDBKey(\r\n ADBKey: string): TTMSFNCTreeViewVirtualNode;\r\nvar\r\n n: TTMSFNCTreeViewVirtualNode;\r\nbegin\r\n Result := nil;\r\n n := GetFirstRootVirtualNode;\r\n while Assigned(n) do\r\n begin\r\n if Assigned(n.Node) and (n.Node.DBKey = ADBKey) then\r\n begin\r\n Result := n;\r\n Break;\r\n end;\r\n n := n.GetNext;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCTreeViewData.FindVirtualNodeByRow(\r\n ARow: Integer): TTMSFNCTreeViewVirtualNode;\r\nvar\r\n n: TTMSFNCTreeViewVirtualNode;\r\nbegin\r\n Result := nil;\r\n n := GetFirstRootVirtualNode;\r\n while Assigned(n) do\r\n begin\r\n if n.Row = ARow then\r\n begin\r\n Result := n;\r\n Break;\r\n end;\r\n n := n.GetNext;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCTreeViewData.FindVirtualNodeByTextAndColumn(AText: string;\r\n AColumn: Integer; ARecurse,\r\n ACaseSensitive: Boolean): TTMSFNCTreeViewVirtualNode;\r\nvar\r\n n: TTMSFNCTreeViewVirtualNode;\r\n t: String;\r\nbegin\r\n Result := nil;\r\n n := GetFirstRootVirtualNode;\r\n while Assigned(n) do\r\n begin\r\n t := '';\r\n DoGetNodeText(n, AColumn, tntmDrawing, t);\r\n if TTMSFNCUtils.MatchStrEx(AText, t, ACaseSensitive) then\r\n begin\r\n Result := n;\r\n Break;\r\n end;\r\n\r\n if ARecurse then\r\n n := n.GetNext\r\n else\r\n n := n.GetNextSibling;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCTreeViewData.IsColumnVisible(ACol: Integer): Boolean;\r\nbegin\r\n Result := inherited IsColumnVisible(ACol);\r\n if (ACol >= 0) and (ACol <= Columns.Count - 1) then\r\n Result := Columns[ACol].Visible;\r\nend;\r\n\r\nfunction TTMSFNCTreeViewData.MatchFilter(ANode: TTMSFNCTreeViewVirtualNode): Boolean;\r\nvar\r\n i: Integer;\r\n s:string;\r\n temp: Boolean;\r\nbegin\r\n Result := True;\r\n for i := 1 to FFilter.Count do\r\n begin\r\n with FFilter.Items[i - 1] do\r\n begin\r\n s := '';\r\n DoGetNodeText(ANode, Column, tntmDrawing, s);\r\n s := TTMSFNCUtils.HTMLStrip(s);\r\n s := TTMSFNCUtils.UnFixMarkup(s);\r\n s := Trim(s);\r\n\r\n if Prefix <> '' then\r\n if Pos(Prefix,s) = 1 then\r\n Delete(s,1,Length(FFilter.Items[i - 1].Prefix));\r\n\r\n if Suffix <> '' then\r\n if Pos(Suffix,s) = 1 + Length(s) - Length(Suffix) then\r\n Delete(s,1 + Length(s) - Length(Suffix),Length(s));\r\n\r\n try\r\n temp := TTMSFNCUtils.MatchStrEx(Condition,s,CaseSensitive);\r\n except\r\n temp := false;\r\n end;\r\n\r\n case FFilter.Items[i - 1].Operation of\r\n tfoSHORT:\r\n begin\r\n Result := temp;\r\n if not Result then\r\n Break;\r\n end;\r\n tfoNONE: Result := temp;\r\n tfoAND: Result := Result AND temp;\r\n tfoOR: Result := Result OR temp;\r\n tfoXOR: Result := Result XOR temp;\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewData.MoveNode(ANode,\r\n ADestinationNode: TTMSFNCTreeViewNode; AIndex: Integer);\r\nvar\r\n n, np: TTMSFNCTreeViewNode;\r\nbegin\r\n if not Assigned(ANode) then\r\n Exit;\r\n\r\n if (ADestinationNode <> ANode) then\r\n begin\r\n if Assigned(ADestinationNode) then\r\n begin\r\n np := ADestinationNode.GetParent;\r\n\r\n while Assigned(np) do\r\n begin\r\n if np = ANode then\r\n Exit;\r\n\r\n np := np.GetParent;\r\n end;\r\n end;\r\n\r\n BeginUpdate;\r\n\r\n n := TTMSFNCTreeviewNode.Create(nil);\r\n\r\n if Assigned(ADestinationNode) then\r\n ANode.Collection := ADestinationNode.Nodes\r\n else\r\n ANode.Collection := Nodes;\r\n\r\n if Assigned(ADestinationNode) then\r\n begin\r\n if (AIndex >= 0) and (AIndex <= ADestinationNode.Nodes.Count - 1) then\r\n ANode.Index := AIndex\r\n else\r\n ANode.Index := ADestinationNode.Nodes.Count - 1;\r\n end\r\n else\r\n begin\r\n if (AIndex >= 0) and (AIndex <= Nodes.Count - 1) then\r\n ANode.Index := AIndex\r\n else\r\n ANode.Index := Nodes.Count - 1;\r\n end;\r\n\r\n n.Free;\r\n\r\n EndUpdate;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewData.ToggleCheckNodeInternal(ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer; ARecurse: Boolean = False);\r\nvar\r\n chk: Boolean;\r\nbegin\r\n if (csDestroying in ComponentState) or not Assigned(ANode) or not NodeListBuild then\r\n Exit;\r\n\r\n if (AColumn >= 0) and (AColumn <= Length(ANode.CheckStates) - 1) then\r\n begin\r\n chk := ANode.CheckStates[AColumn];\r\n if chk then\r\n UnCheckNodeInternal(ANode, AColumn, ARecurse)\r\n else\r\n CheckNodeInternal(ANode, AColumn, ARecurse);\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewData.ToggleNodeInternal(ANode: TTMSFNCTreeViewVirtualNode; ARecurse: Boolean = False);\r\nbegin\r\n if (csDestroying in ComponentState) or not Assigned(ANode) or not NodeListBuild then\r\n Exit;\r\n\r\n if ANode.Expanded then\r\n CollapseNodeInternal(ANode, ARecurse)\r\n else\r\n ExpandNodeInternal(ANode, ARecurse);\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewData.UnCheckNodeInternal(ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer; ARecurse: Boolean = False);\r\nvar\r\n chkt: TTMSFNCTreeViewNodeCheckType;\r\n I: Integer;\r\n v: TTMSFNCTreeViewVirtualNode;\r\nbegin\r\n if (csDestroying in ComponentState) or not Assigned(ANode) or not NodeListBuild then\r\n Exit;\r\n\r\n chkt := tvntNone;\r\n DoGetNodeCheckType(ANode, AColumn, chkt);\r\n if chkt = tvntCheckBox then\r\n begin\r\n if (AColumn >= 0) and (AColumn <= Length(ANode.CheckStates) - 1) then\r\n begin\r\n ANode.CheckStates[AColumn] := False;\r\n UpdateCheckState(ANode, AColumn, ANode.CheckStates[AColumn]);\r\n end;\r\n\r\n if Assigned(ANode.Node) then\r\n begin\r\n if (AColumn >= 0) and (AColumn <= ANode.Node.Values.Count - 1) then\r\n ANode.Node.Values.UpdateChecked(AColumn, False);\r\n end;\r\n end;\r\n\r\n if ARecurse then\r\n begin\r\n for I := ANode.Row + 1 to ANode.Row + ANode.TotalChildren do\r\n begin\r\n v := GetNodeFromNodeStructure(I);\r\n if Assigned(v) then\r\n UnCheckNodeInternal(v, AColumn, ARecurse);\r\n end;\r\n end;\r\n\r\n Invalidate;\r\nend;\r\n\r\n\r\nprocedure TTMSFNCTreeViewData.UpdateNodeCalculated(ANode: TTMSFNCTreeViewVirtualNode; ACalculated: Boolean);\r\nbegin\r\n ANode.FCalculated := ACalculated;\r\nend;\r\n\r\nfunction TTMSFNCTreeViewData.FindColumnByName(\r\n AName: String): TTMSFNCTreeViewColumn;\r\nvar\r\n I: Integer;\r\n res: TTMSFNCTreeViewColumn;\r\nbegin\r\n Result := nil;\r\n for I := 0 to ColumnCount - 1 do\r\n begin\r\n if (I >= 0) and (I <= Columns.Count - 1) then\r\n begin\r\n res := Columns[I];\r\n if res.Name = AName then\r\n begin\r\n Result := res;\r\n Break;\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCTreeViewData.FindColumnIndexByName(AName: String): Integer;\r\nvar\r\n res: TTMSFNCTreeViewColumn;\r\nbegin\r\n Result := -1;\r\n res := FindColumnByName(AName);\r\n if Assigned(res) then\r\n Result := res.Index;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewData.SetGroups(const Value: TTMSFNCTreeViewGroups);\r\nbegin\r\n FGroups.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewData.SetNodes(const Value: TTMSFNCTreeViewNodes);\r\nbegin\r\n FNodes.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewData.UpdateCheckState(\r\n ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer; AChecked: Boolean);\r\nbegin\r\n\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewData.UpdateColumns;\r\nvar\r\n I: Integer;\r\n c: TTMSFNCTreeViewColumn;\r\n g: TTMSFNCTreeViewGroup;\r\n grp: TTMSFNCTreeViewDisplayGroup;\r\nbegin\r\n if (UpdateCount > 0) or (csDestroying in ComponentState) then\r\n Exit;\r\n\r\n DisplayGroups.Clear;\r\n for I := 0 to Groups.Count - 1 do\r\n begin\r\n g := Groups[I];\r\n grp.StartColumn := Max(0, Min(g.StartColumn, Columns.Count - 1));\r\n grp.EndColumn := Max(0, Min(g.EndColumn, Columns.Count - 1));\r\n DisplayGroups.Add(grp);\r\n end;\r\n\r\n for I := 0 to Columns.Count - 1 do\r\n begin\r\n c := Columns[I];\r\n if c.Visible then\r\n begin\r\n ColumnWidths[I] := c.Width;\r\n ColumnMinWidths[I] := c.MinimumWidth;\r\n end\r\n else\r\n begin\r\n ColumnWidths[I] := 0;\r\n ColumnMinWidths[I] := 0;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewData.UpdateNode(ANode: TTMSFNCTreeViewVirtualNode);\r\nbegin\r\n if not Assigned(ANode) or (csDestroying in ComponentState) or not NodeListBuild then\r\n Exit;\r\n\r\n if BlockUpdateNode then\r\n Exit;\r\n\r\n ANode.FCalculated := False;\r\n\r\n if UpdateCount > 0 then\r\n Exit;\r\n\r\n UpdateNodesCache;\r\n Invalidate;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewData.UpdateNodeBitmapRects(\r\n ANode: TTMSFNCTreeViewVirtualNode; ABitmapRects: TTMSFNCArrayTRectF);\r\nbegin\r\n ANode.FBitmapRects := ABitmapRects;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewData.UpdateNodeCacheReference(\r\n ANode: TTMSFNCTreeViewVirtualNode; ACache: TTMSFNCTreeViewCacheItem);\r\nbegin\r\n ANode.FCache := ACache;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewData.UpdateNodeCheckRects(\r\n ANode: TTMSFNCTreeViewVirtualNode; ACheckRects: TTMSFNCArrayTRectF);\r\nbegin\r\n ANode.FCheckRects := ACheckRects;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewData.UpdateNodeCheckStates(\r\n ANode: TTMSFNCTreeViewVirtualNode; ACheckStates: TTMSFNCArrayBoolean);\r\nbegin\r\n ANode.FCheckStates := ACheckStates;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewData.UpdateNodeChildren(ANode: TTMSFNCTreeViewVirtualNode;\r\n AChildren: Integer);\r\nbegin\r\n ANode.FChildren := AChildren;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewData.UpdateNodeExpanded(ANode: TTMSFNCTreeViewVirtualNode;\r\n AExpanded: Boolean);\r\nbegin\r\n ANode.FExpanded := AExpanded;\r\n if Assigned(ANode.Node) then\r\n ANode.Node.FExpanded := AExpanded;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewData.UpdateNodeExpandRects(\r\n ANode: TTMSFNCTreeViewVirtualNode; AExpandRects: TTMSFNCArrayTRectF);\r\nbegin\r\n ANode.FExpandRects := AExpandRects;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewData.UpdateNodeExtended(\r\n ANode: TTMSFNCTreeViewVirtualNode; AExtended: Boolean);\r\nbegin\r\n ANode.FExtended := AExtended;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewData.UpdateNodeExtraRects(\r\n ANode: TTMSFNCTreeViewVirtualNode; AExtraRects: TTMSFNCArrayTRectF);\r\nbegin\r\n ANode.FExtraRects := AExtraRects;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewData.UpdateNodeHeight(ANode: TTMSFNCTreeViewVirtualNode;\r\n AHeight: Double);\r\nbegin\r\n ANode.FHeight := AHeight;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewData.ExpandNodeInternal(ANode: TTMSFNCTreeViewVirtualNode; ARecurse: Boolean = False);\r\nvar\r\n I: Integer;\r\n v, n: TTMSFNCTreeViewVirtualNode;\r\nbegin\r\n if (csDestroying in ComponentState) or not Assigned(ANode) then\r\n Exit;\r\n\r\n if ANode.Expanded then\r\n begin\r\n if ARecurse then\r\n begin\r\n n := ANode.GetFirstChild;\r\n while Assigned(n) do\r\n begin\r\n ExpandNodeInternal(n, ARecurse);\r\n n := n.GetNextSibling;\r\n end;\r\n end;\r\n\r\n Exit;\r\n end;\r\n\r\n ANode.FExpanded := True;\r\n\r\n UpdateNodeExpanded(ANode, True);\r\n if ARecurse then\r\n begin\r\n for I := ANode.Row + 1 to ANode.Row + ANode.TotalChildren do\r\n begin\r\n v := GetNodeFromNodeStructure(I);\r\n if Assigned(v) then\r\n UpdateNodeExpanded(v, True);\r\n end;\r\n end;\r\n UpdateVisibleNodes(ANode);\r\n if not FBlockUpdate then\r\n begin\r\n ResetNodes(False);\r\n UpdateTreeView;\r\n Invalidate;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewData.UpdateNodeIndex(ANode: TTMSFNCTreeViewVirtualNode;\r\n AIndex: Integer);\r\nbegin\r\n ANode.FIndex := AIndex;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewData.UpdateNodeLevel(ANode: TTMSFNCTreeViewVirtualNode;\r\n ALevel: Integer);\r\nbegin\r\n ANode.FLevel := ALevel;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewData.UpdateNodeParentNode(\r\n ANode: TTMSFNCTreeViewVirtualNode; AParentNode: Integer);\r\nbegin\r\n ANode.FParentNode := AParentNode;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewData.UpdateNodeRow(ANode: TTMSFNCTreeViewVirtualNode;\r\n ARow: Integer);\r\nbegin\r\n ANode.FRow := ARow;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewData.UpdateNodesInternal(ANodeRemoveData: TTMSFNCTreeViewVirtualNodeRemoveData);\r\nvar\r\n cnt: Integer;\r\n I, pi, R: Integer;\r\n rs: TTMSFNCTreeViewVirtualNode;\r\n ext, exp: Boolean;\r\n chkst: TTMSFNCArrayBoolean;\r\n K: Integer;\r\n chk: Boolean;\r\nbegin\r\n cnt := ANodeRemoveData.Count;\r\n pi := ANodeRemoveData.ParentNode;\r\n R := ANodeRemoveData.RowIndex;\r\n\r\n for I := R to NodeStructure.Count - 1 do\r\n begin\r\n rs := GetNodeFromNodeStructure(I);\r\n if Assigned(rs) then\r\n begin\r\n UpdateNodeRow(rs, rs.Row - cnt);\r\n\r\n if rs.ParentNode > pi then\r\n UpdateNodeParentNode(rs, rs.ParentNode - cnt);\r\n\r\n if rs.ParentNode = pi then\r\n UpdateNodeIndex(rs, rs.Index - 1);\r\n\r\n GetNodeForNodeData(rs);\r\n\r\n exp := False;\r\n DoIsNodeExpanded(rs, exp);\r\n UpdateNodeExpanded(rs, exp);\r\n\r\n ext := False;\r\n DoIsNodeExtended(rs, ext);\r\n UpdateNodeExtended(rs, ext);\r\n\r\n SetLength(chkst, 0);\r\n for K := 0 to ColumnCount - 1 do\r\n begin\r\n chk := False;\r\n DoIsNodeChecked(RS, K, chk);\r\n SetLength(chkst, Length(chkst) + 1);\r\n chkst[Length(chkst) - 1] := chk;\r\n end;\r\n\r\n UpdateNodeCheckStates(rs, chkst);\r\n end;\r\n end;\r\n\r\n if not FBlockUpdate then\r\n begin\r\n ResetNodes(False);\r\n UpdateTreeView;\r\n Invalidate;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewData.UpdateNodeTextRects(\r\n ANode: TTMSFNCTreeViewVirtualNode; ATextRects: TTMSFNCArrayTRectF);\r\nbegin\r\n ANode.FTextRects := ATextRects;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewData.UpdateNodeTitleHeight(\r\n ANode: TTMSFNCTreeViewVirtualNode; AHeight: Double);\r\nbegin\r\n ANode.FTitleHeight := AHeight;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewData.UpdateNodeTitleRects(\r\n ANode: TTMSFNCTreeViewVirtualNode; ATitleRects: TTMSFNCArrayTRectF);\r\nbegin\r\n ANode.FTitleRects := ATitleRects;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewData.UpdateNodeTitleExtraRects(\r\n ANode: TTMSFNCTreeViewVirtualNode; ATitleExtraRects: TTMSFNCArrayTRectF);\r\nbegin\r\n ANode.FTitleExtraRects := ATitleExtraRects;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewData.UpdateNodeTotalChildren(\r\n ANode: TTMSFNCTreeViewVirtualNode; ATotalChildren: Integer);\r\nbegin\r\n ANode.FTotalChildren := ATotalChildren;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewData.ScrollToBottom;\r\nbegin\r\n {$IFDEF FMXLIB}\r\n VerticalScrollBar.Value := VerticalScrollBar.Max;\r\n {$ENDIF}\r\n {$IFNDEF FMXLIB}\r\n VerticalScrollBar.Position := VerticalScrollBar.Max;\r\n {$ENDIF}\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewData.ScrollToNode(ANode: TTMSFNCTreeViewNode; AScrollIfNotVisible: Boolean = False; AScrollPosition: TTMSFNCTreeViewNodeScrollPosition = tvnspTop; AForceScroll: Boolean = False);\r\nbegin\r\n if Assigned(ANode) then\r\n ScrollToVirtualNode(ANode.VirtualNode, AScrollIfNotVisible, AScrollPosition, AForceScroll);\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewData.ScrollToTop;\r\nbegin\r\n {$IFDEF FMXLIB}\r\n VerticalScrollBar.Value := 0;\r\n {$ENDIF}\r\n {$IFNDEF FMXLIB}\r\n VerticalScrollBar.Position := 0;\r\n {$ENDIF}\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewData.ScrollToVirtualNode(\r\n ANode: TTMSFNCTreeViewVirtualNode; AScrollIfNotVisible: Boolean = False; AScrollPosition: TTMSFNCTreeViewNodeScrollPosition = tvnspTop; AForceScroll: Boolean = False);\r\nvar\r\n v: Single;\r\nbegin\r\n if not Assigned(ANode) then\r\n Exit;\r\n\r\n if IsVariableNodeHeight then\r\n begin\r\n// BeginUpdate;\r\n v := -1;\r\n while not ANode.Calculated and (v <> GetVerticalScrollPosition) and (ANode.Expanded or (ANode.Children = 0)) do\r\n begin\r\n ScrollToVirtualNodeInternal(ANode, AScrollIfNotVisible, AScrollPosition, AForceScroll);\r\n v := GetVerticalScrollPosition;\r\n end;\r\n// EndUpdate;\r\n end;\r\n\r\n ScrollToVirtualNodeInternal(ANode, AScrollIfNotVisible, AScrollPosition, AForceScroll);\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewData.ScrollToVirtualNodeInternal(ANode: TTMSFNCTreeViewVirtualNode; AScrollIfNotVisible: Boolean = False;\r\n AScrollPosition: TTMSFNCTreeViewNodeScrollPosition = tvnspTop; AForceScroll: Boolean = False);\r\nvar\r\n I, C: Integer;\r\n yp, ps: Double;\r\n v: TTMSFNCTreeViewVirtualNode;\r\nbegin\r\n yp := 0;\r\n c := 0;\r\n if Assigned(ANode) then\r\n begin\r\n for I := 0 to VisibleNodes.Count - 1 do\r\n begin\r\n v := VisibleNodes[I];\r\n if Assigned(v) then\r\n begin\r\n if v.Row = ANode.Row then\r\n Break;\r\n\r\n if v.Calculated then\r\n yp := yp + v.Height\r\n else\r\n Inc(c);\r\n end;\r\n end;\r\n\r\n yp := yp + GetDefaultRowHeight(nil) * c;\r\n ps := yp;\r\n case AScrollPosition of\r\n tvnspBottom: yp := yp - GetVViewPortSize + ANode.Height;\r\n tvnspMiddle: yp := yp - GetVViewPortSize / 2 + ANode.Height / 2;\r\n end;\r\n\r\n CustomizeScrollPosition(ANode, yp, ps);\r\n\r\n if AScrollIfNotVisible then\r\n begin\r\n if ((ps < Abs(GetVScrollValue)) or (ps + ANode.Height > Abs(GetVScrollValue) + GetVViewPortSize)) or AForceScroll then\r\n Scroll(GetHScrollValue, yp);\r\n end\r\n else\r\n begin\r\n Scroll(GetHScrollValue, yp);\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCTreeViewData.GetNodeForRow(\r\n ARow: Integer): TTMSFNCTreeViewVirtualNode;\r\nbegin\r\n Result := nil;\r\n if (ARow >= 0) and (ARow <= FNodeStructure.Count - 1) then\r\n Result := FNodeStructure[ARow];\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewData.ScrollToVirtualNodeRow(ARow: Integer;\r\n AScrollIfNotVisible: Boolean;\r\n AScrollPosition: TTMSFNCTreeViewNodeScrollPosition; AForceScroll: Boolean);\r\nvar\r\n n: TTMSFNCTreeViewVirtualNode;\r\nbegin\r\n n := GetNodeForRow(ARow);\r\n if Assigned(n) then\r\n ScrollToVirtualNode(n, AScrollIfNotVisible, AScrollPosition, AForceScroll);\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewData.SetBitmapContainer(\r\n const Value: TTMSFNCBitmapContainer);\r\nbegin\r\n FBitmapContainer := Value;\r\n Invalidate;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewData.SetColumns(const Value: TTMSFNCTreeViewColumns);\r\nbegin\r\n FColumns.Assign(Value);\r\nend;\r\n\r\n{ TTMSFNCTreeViewGroup }\r\n\r\nprocedure TTMSFNCTreeViewGroup.Assign(Source: TPersistent);\r\nbegin\r\n if Source is TTMSFNCTreeViewGroup then\r\n begin\r\n FTag := (Source as TTMSFNCTreeViewGroup).Tag;\r\n FText := (Source as TTMSFNCTreeViewGroup).Text;\r\n FStartColumn := (Source as TTMSFNCTreeViewGroup).StartColumn;\r\n FEndColumn := (Source as TTMSFNCTreeViewGroup).EndColumn;\r\n FUseDefaultAppearance := (Source as TTMSFNCTreeViewGroup).UseDefaultAppearance;\r\n FBottomFill.Assign((Source as TTMSFNCTreeViewGroup).BottomFill);\r\n FBottomFont.Assign((Source as TTMSFNCTreeViewGroup).BottomFont);\r\n FBottomStroke.Assign((Source as TTMSFNCTreeViewGroup).BottomStroke);\r\n FTopFill.Assign((Source as TTMSFNCTreeViewGroup).TopFill);\r\n FTopStroke.Assign((Source as TTMSFNCTreeViewGroup).TopStroke);\r\n FTopFont.Assign((Source as TTMSFNCTreeViewGroup).TopFont);\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewGroup.Changed(Sender: TObject);\r\nbegin\r\n UpdateGroup;\r\nend;\r\n\r\nconstructor TTMSFNCTreeViewGroup.Create(ACollection: TCollection);\r\nvar\r\n grp: TTMSFNCTreeViewGroup;\r\nbegin\r\n inherited;\r\n if Assigned(Collection) then\r\n begin\r\n FTreeView := (Collection as TTMSFNCTreeViewGroups).TreeView;\r\n FText := TranslateTextEx(sTMSFNCTreeViewGroup) + ' ' + inttostr(FTreeView.Groups.Count - 1);\r\n if FTreeView.Groups.Count < 2 then\r\n begin\r\n FStartColumn := 0;\r\n FEndColumn := 0\r\n end\r\n else\r\n begin\r\n grp := FTreeView.Groups[FTreeView.Groups.Count - 2];\r\n FStartColumn := grp.StartColumn + 1;\r\n FEndColumn := FStartColumn;\r\n end;\r\n end;\r\n\r\n FUseDefaultAppearance := True;\r\n\r\n FBottomFill := TTMSFNCGraphicsFill.Create(gfkNone, gcWhite);\r\n FBottomStroke := TTMSFNCGraphicsStroke.Create(gskSolid, gcDarkGray);\r\n FTopFill := TTMSFNCGraphicsFill.Create(gfkNone, gcWhite);\r\n FTopStroke := TTMSFNCGraphicsStroke.Create(gskSolid, gcGray);\r\n\r\n FTopFont := TTMSFNCGraphicsFont.Create;\r\n FBottomFont := TTMSFNCGraphicsFont.Create;\r\n\r\n FBottomFill.OnChanged := @Changed;\r\n FTopFill.OnChanged := @Changed;\r\n FBottomStroke.OnChanged := @Changed;\r\n FTopStroke.OnChanged := @Changed;\r\n\r\n {$IFDEF FMXLIB}\r\n FTopFont.OnChanged := @Changed;\r\n FBottomFont.OnChanged := @Changed;\r\n {$ENDIF}\r\n {$IFDEF CMNWEBLIB}\r\n FTopFont.OnChange := @Changed;\r\n FBottomFont.OnChange := @Changed;\r\n {$ENDIF}\r\n\r\n UpdateGroup;\r\nend;\r\n\r\ndestructor TTMSFNCTreeViewGroup.Destroy;\r\nbegin\r\n FTopFill.Free;\r\n FTopStroke.Free;\r\n FTopFont.Free;\r\n FBottomFill.Free;\r\n FBottomStroke.Free;\r\n FBottomFont.Free;\r\n inherited;\r\n UpdateGroup;\r\nend;\r\n\r\nfunction TTMSFNCTreeViewGroup.GetText: String;\r\nbegin\r\n Result := Text;\r\n if Result = '' then\r\n begin\r\n Result := Name;\r\n if Result = '' then\r\n Result := TranslateTextEx(sTMSFNCTreeViewGroup) + ' ' + inttostr(Index);\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCTreeViewGroup.TreeView: TTMSFNCTreeViewData;\r\nbegin\r\n Result := FTreeView;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewGroup.SetStartColumn(const Value: Integer);\r\nbegin\r\n if FStartColumn <> Value then\r\n begin\r\n FStartColumn := Value;\r\n UpdateGroup;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewGroup.SetEndColumn(const Value: Integer);\r\nbegin\r\n if FEndColumn <> Value then\r\n begin\r\n FEndColumn := Value;\r\n UpdateGroup;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewGroup.SetBottomFont(const Value: TTMSFNCGraphicsFont);\r\nbegin\r\n if FBottomFont <> Value then\r\n FBottomFont.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewGroup.SetBottomStroke(\r\n const Value: TTMSFNCGraphicsStroke);\r\nbegin\r\n if FBottomStroke <> Value then\r\n FBottomStroke.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewGroup.SetBottomFill(const Value: TTMSFNCGraphicsFill);\r\nbegin\r\n if FBottomFill <> Value then\r\n FBottomFill.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewGroup.SetTopFont(const Value: TTMSFNCGraphicsFont);\r\nbegin\r\n if FTopFont <> Value then\r\n FTopFont.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewGroup.SetTopStroke(\r\n const Value: TTMSFNCGraphicsStroke);\r\nbegin\r\n if FTopStroke <> Value then\r\n FTopStroke.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewGroup.SetUseDefaultAppearance(const Value: Boolean);\r\nbegin\r\n if FUseDefaultAppearance <> Value then\r\n begin\r\n FUseDefaultAppearance := Value;\r\n Changed(Self);\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewGroup.SetTopFill(const Value: TTMSFNCGraphicsFill);\r\nbegin\r\n if FTopFill <> Value then\r\n FTopFill.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewGroup.SetName(const Value: String);\r\nbegin\r\n if FName <> Value then\r\n begin\r\n FName := Value;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewGroup.SetText(const Value: String);\r\nbegin\r\n if FText <> Value then\r\n begin\r\n FText := Value;\r\n UpdateGroup;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewGroup.UpdateGroup;\r\nvar\r\n c: TTMSFNCTreeViewData;\r\nbegin\r\n c := TreeView;\r\n if Assigned(c) then\r\n begin\r\n c.UpdateColumns;\r\n c.UpdateTreeViewCache;\r\n end;\r\nend;\r\n\r\n{ TTMSFNCTreeViewGroups }\r\n\r\nfunction TTMSFNCTreeViewGroups.Add: TTMSFNCTreeViewGroup;\r\nbegin\r\n Result := TTMSFNCTreeViewGroup(inherited Add);\r\nend;\r\n\r\nconstructor TTMSFNCTreeViewGroups.Create(ATreeView: TTMSFNCTreeViewData);\r\nbegin\r\n inherited Create(ATreeView, GetItemClass);\r\n FTreeView := ATreeView;\r\nend;\r\n\r\nfunction TTMSFNCTreeViewGroups.GetItem(Index: Integer): TTMSFNCTreeViewGroup;\r\nbegin\r\n Result := TTMSFNCTreeViewGroup(inherited Items[Index]);\r\nend;\r\n\r\nfunction TTMSFNCTreeViewGroups.GetItemClass: TCollectionItemClass;\r\nbegin\r\n Result := TTMSFNCTreeViewGroup;\r\nend;\r\n\r\nfunction TTMSFNCTreeViewGroups.Insert(Index: Integer): TTMSFNCTreeViewGroup;\r\nbegin\r\n Result := TTMSFNCTreeViewGroup(inherited Insert(Index));\r\nend;\r\n\r\nfunction TTMSFNCTreeViewGroups.TreeView: TTMSFNCTreeViewData;\r\nbegin\r\n Result := FTreeView;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewGroups.SetItem(Index: Integer;\r\n const Value: TTMSFNCTreeViewGroup);\r\nbegin\r\n inherited Items[Index] := Value;\r\nend;\r\n\r\n{ TTMSFNCTreeViewNode }\r\n\r\nfunction TTMSFNCTreeViewNode.SaveToString(ATextOnly: Boolean = True): String;\r\nconst\r\n TabChar = #9;\r\nvar\r\n vn: TTMSFNCTreeViewVirtualNode;\r\n I: Integer;\r\nbegin\r\n if not Assigned(FTreeView) then\r\n Exit;\r\n\r\n vn := VirtualNode;\r\n Result := '';\r\n for I := 0 to vn.Level - 1 do\r\n Result := Result + TabChar;\r\n\r\n for I := 0 to FTreeView.ColumnCount - 1 do\r\n begin\r\n if ATextOnly then\r\n begin\r\n if I = FTreeView.ColumnCount - 1 then\r\n Result := Result + GetStrippedHTMLText(I)\r\n else\r\n Result := Result + GetStrippedHTMLText(I)+'{1}'\r\n end\r\n else\r\n begin\r\n if I = FTreeView.ColumnCount - 1 then\r\n Result := Result + Text[I]\r\n else\r\n Result := Result + Text[I]+'{1}'\r\n end;\r\n end;\r\n\r\n if not ATextOnly then\r\n Result := Result + '{0}';\r\n\r\n for I := 0 to FTreeView.ColumnCount - 1 do\r\n begin\r\n if not ATextOnly then\r\n begin\r\n Result := Result + IntToStr(Integer(CheckTypes[I])) + ';';\r\n Result := Result + BoolToStr(Checked[I]) + ';';\r\n Result := Result + ExpandedIconNames[I, False] + ';';\r\n Result := Result + ExpandedIconNames[I, True] + ';';\r\n Result := Result + CollapsedIconNames[I, False] + ';';\r\n Result := Result + CollapsedIconNames[I, True] + ';';\r\n Result := Result + TTMSFNCUtils.SaveBitmapToHexStr(ExpandedIcons[I, False]) + ';';\r\n Result := Result + TTMSFNCUtils.SaveBitmapToHexStr(ExpandedIcons[I, True]) + ';';\r\n Result := Result + TTMSFNCUtils.SaveBitmapToHexStr(CollapsedIcons[I, False]) + ';';\r\n if I = Values.Count - 1 then\r\n Result := Result + TTMSFNCUtils.SaveBitmapToHexStr(CollapsedIcons[I, True])\r\n else\r\n Result := Result + TTMSFNCUtils.SaveBitmapToHexStr(CollapsedIcons[I, True]) + '|';\r\n end;\r\n end;\r\n\r\n if not ATextOnly then\r\n begin\r\n Result := Result + '{0}';\r\n Result := Result + BoolToStr(Extended) + '{0}';\r\n Result := Result + BoolToStr(Enabled);\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewNode.SetChecked(AColumn: integer;\r\n const Value: Boolean);\r\nvar\r\n v: TTMSFNCTreeViewNodeValue;\r\nbegin\r\n v := GetValueForColumn(AColumn);\r\n if Assigned(v) then\r\n v.Checked := Value;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewNode.SetCheckStates(\r\n ACheckStates: TTMSFNCTreeViewNodeCheckStates);\r\nvar\r\n I: Integer;\r\nbegin\r\n for I := 0 to Length(ACheckStates) - 1 do\r\n Checked[I] := ACheckStates[I];\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewNode.SetCheckType(AColumn: Integer;\r\n const Value: TTMSFNCTreeViewNodeCheckType);\r\nvar\r\n v: TTMSFNCTreeViewNodeValue;\r\nbegin\r\n v := GetValueForColumn(AColumn);\r\n if Assigned(v) then\r\n v.CheckType := Value;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewNode.SetCheckTypes(\r\n ACheckTypes: TTMSFNCTreeViewNodeCheckTypes);\r\nvar\r\n I: Integer;\r\nbegin\r\n for I := 0 to Length(ACheckTypes) - 1 do\r\n CheckTypes[I] := ACheckTypes[I];\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewNode.SetCollapsedIconNames(\r\n AIconNames: TTMSFNCTreeViewNodeIconNames; ALarge: Boolean);\r\nvar\r\n I: Integer;\r\nbegin\r\n for I := 0 to Length(AIconNames) - 1 do\r\n CollapsedIconNames[I, ALarge] := AIconNames[I];\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewNode.SetCollapsedIcons(AIcons: TTMSFNCTreeViewNodeIcons;\r\n ALarge: Boolean);\r\nvar\r\n I: Integer;\r\nbegin\r\n for I := 0 to Length(AIcons) - 1 do\r\n CollapsedIcons[I, ALarge] := AIcons[I];\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewNode.SetCollapsedIcon(AColumn: Integer;\r\n ALarge: Boolean; const Value: TTMSFNCBitmap);\r\nvar\r\n v: TTMSFNCTreeViewNodeValue;\r\nbegin\r\n v := GetValueForColumn(AColumn);\r\n if Assigned(v) then\r\n begin\r\n if ALarge then\r\n v.CollapsedIconLarge.Assign(Value)\r\n else\r\n v.CollapsedIcon.Assign(Value);\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewNode.SetCollapsedIconName(AColumn: Integer;\r\n ALarge: Boolean; const Value: String);\r\nvar\r\n v: TTMSFNCTreeViewNodeValue;\r\nbegin\r\n v := GetValueForColumn(AColumn);\r\n if Assigned(v) then\r\n begin\r\n if ALarge then\r\n v.CollapsedIconLargeName := Value\r\n else\r\n v.CollapsedIconName := Value;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewNode.SetExpandedIconNames(\r\n AIconNames: TTMSFNCTreeViewNodeIconNames; ALarge: Boolean);\r\nvar\r\n I: Integer;\r\nbegin\r\n for I := 0 to Length(AIconNames) - 1 do\r\n ExpandedIconNames[I, ALarge] := AIconNames[I];\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewNode.SetExpandedIcons(AIcons: TTMSFNCTreeViewNodeIcons;\r\n ALarge: Boolean);\r\nvar\r\n I: Integer;\r\nbegin\r\n for I := 0 to Length(AIcons) - 1 do\r\n ExpandedIcons[I, ALarge] := AIcons[I];\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewNode.SetExpandedIcon(AColumn: Integer;\r\n ALarge: Boolean; const Value: TTMSFNCBitmap);\r\nvar\r\n v: TTMSFNCTreeViewNodeValue;\r\nbegin\r\n v := GetValueForColumn(AColumn);\r\n if Assigned(v) then\r\n begin\r\n if ALarge then\r\n v.ExpandedIconLarge.Assign(Value)\r\n else\r\n v.ExpandedIcon.Assign(Value);\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewNode.SetExpandedIconName(AColumn: Integer;\r\n ALarge: Boolean; const Value: String);\r\nvar\r\n v: TTMSFNCTreeViewNodeValue;\r\nbegin\r\n v := GetValueForColumn(AColumn);\r\n if Assigned(v) then\r\n begin\r\n if ALarge then\r\n v.ExpandedIconLargeName := Value\r\n else\r\n v.ExpandedIconName := Value;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewNode.SetText(AColumn: Integer; const Value: String);\r\nvar\r\n v: TTMSFNCTreeViewNodeValue;\r\nbegin\r\n v := GetValueForColumn(AColumn);\r\n if Assigned(v) then\r\n v.Text := Value;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewNode.SetTextValues(\r\n ATextValues: TTMSFNCTreeViewNodeTextValues);\r\nvar\r\n I: Integer;\r\nbegin\r\n for I := 0 to Length(ATextValues) - 1 do\r\n Text[I] := ATextValues[I];\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewNode.AssignData(Source: TPersistent);\r\nbegin\r\n if Source is TTMSFNCTreeViewNode then\r\n begin\r\n FDataString := (Source as TTMSFNCTreeViewNode).DataString;\r\n FDataBoolean := (Source as TTMSFNCTreeViewNode).DataBoolean;\r\n FDataObject := (Source as TTMSFNCTreeViewNode).DataObject;\r\n FDataInteger := (Source as TTMSFNCTreeViewNode).DataInteger;\r\n FDataPointer := (Source as TTMSFNCTreeViewNode).DataPointer;\r\n FDBKey := (Source as TTMSFNCTreeViewNode).DBKey;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewNode.Assign(Source: TPersistent);\r\nbegin\r\n if Source is TTMSFNCTreeViewNode then\r\n begin\r\n FTag := (Source as TTMSFNCTreeViewNode).Tag;\r\n FValues.Assign((Source as TTMSFNCTreeViewNode).Values);\r\n FExpanded := (Source as TTMSFNCTreeViewNode).Expanded;\r\n FExtended := (Source as TTMSFNCTreeViewNode).Extended;\r\n FEnabled := (Source as TTMSFNCTreeViewNode).Enabled;\r\n FNodes.Assign((Source as TTMSFNCTreeViewNode).Nodes);\r\n AssignData(Source);\r\n if Assigned(FTreeView) then\r\n begin\r\n if FExpanded then\r\n FTreeView.ExpandNode(Self)\r\n else\r\n FTreeView.CollapseNode(Self);\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewNode.Collapse(ARecurse: Boolean);\r\nbegin\r\n if Assigned(FTreeView) then\r\n FTreeView.CollapseNode(Self, ARecurse);\r\nend;\r\n\r\nconstructor TTMSFNCTreeViewNode.Create(ACollection: TCollection);\r\nbegin\r\n inherited;\r\n if Assigned(Collection) then\r\n FTreeView := (Collection as TTMSFNCTreeViewNodes).TreeView;\r\n FValues := CreateNodeValues;\r\n\r\n FExpanded := False;\r\n FExtended := False;\r\n FEnabled := True;\r\n FNodes := CreateNodes;\r\n if Assigned(FTreeView) then\r\n begin\r\n if FTreeView.NodeListBuild then\r\n FTreeView.InsertItemInternal(Self)\r\n else\r\n FTreeView.UpdateTreeViewCache;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCTreeViewNode.CreateNodes: TTMSFNCTreeViewNodes;\r\nbegin\r\n Result := TTMSFNCTreeViewNodes.Create(FTreeView, Self);\r\nend;\r\n\r\nfunction TTMSFNCTreeViewNode.CreateNodeValues: TTMSFNCTreeViewNodeValues;\r\nbegin\r\n Result := TTMSFNCTreeViewNodeValues.Create(FTreeView, Self);\r\nend;\r\n\r\ndestructor TTMSFNCTreeViewNode.Destroy;\r\nvar\r\n ru: TTMSFNCTreeViewVirtualNodeRemoveData;\r\nbegin\r\n ru.RowIndex := -1;\r\n ru.Count := 0;\r\n ru.ParentNode := -1;\r\n if Assigned(FTreeView) then\r\n begin\r\n if FTreeView.NodeListBuild and not (FTreeView.BlockRemoveNode > 0) then\r\n ru := FTreeView.RemoveItemInternal(Self, False);\r\n end;\r\n FVirtualNode := nil;\r\n\r\n if Assigned(FTreeView) then\r\n FTreeView.BlockRemoveNode := FTreeView.BlockRemoveNode + 1;\r\n FNodes.Free;\r\n if Assigned(FTreeView) then\r\n FTreeView.BlockRemoveNode := FTreeView.BlockRemoveNode - 1;\r\n FValues.Free;\r\n\r\n inherited;\r\n\r\n if (ru.RowIndex <> -1) then\r\n FTreeView.UpdateNodesInternal(ru);\r\n\r\n if Assigned(FTreeView) then\r\n FTreeView.UpdateTreeViewCache;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewNode.Expand(ARecurse: Boolean);\r\nbegin\r\n if Assigned(FTreeView) then\r\n FTreeView.ExpandNode(Self, ARecurse);\r\nend;\r\n\r\nfunction TTMSFNCTreeViewNode.GetChecked(AColumn: integer): Boolean;\r\nvar\r\n v: TTMSFNCTreeViewNodeValue;\r\nbegin\r\n Result := False;\r\n v := GetValueForColumn(AColumn);\r\n if Assigned(v) then\r\n Result := v.Checked;\r\nend;\r\n\r\nfunction TTMSFNCTreeViewNode.GetCheckType(\r\n AColumn: Integer): TTMSFNCTreeViewNodeCheckType;\r\nvar\r\n v: TTMSFNCTreeViewNodeValue;\r\nbegin\r\n Result := tvntNone;\r\n v := GetValueForColumn(AColumn);\r\n if Assigned(v) then\r\n Result := v.CheckType;\r\nend;\r\n\r\nfunction TTMSFNCTreeViewNode.GetChildCount: Integer;\r\nbegin\r\n Result := 0;\r\n if Assigned(FTreeView) then\r\n Result := FTreeView.GetNodeChildCount(Self);\r\nend;\r\n\r\nfunction TTMSFNCTreeViewNode.GetCollapsedIcon(AColumn: Integer;\r\n ALarge: Boolean): TTMSFNCBitmap;\r\nvar\r\n v: TTMSFNCTreeViewNodeValue;\r\nbegin\r\n Result := nil;\r\n v := GetValueForColumn(AColumn);\r\n if Assigned(v) then\r\n begin\r\n if ALarge then\r\n Result := v.CollapsedIconLarge\r\n else\r\n Result := v.CollapsedIcon;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCTreeViewNode.GetCollapsedIconName(AColumn: Integer;\r\n ALarge: Boolean): String;\r\nvar\r\n v: TTMSFNCTreeViewNodeValue;\r\nbegin\r\n Result := '';\r\n v := GetValueForColumn(AColumn);\r\n if Assigned(v) then\r\n begin\r\n if ALarge then\r\n Result := v.CollapsedIconLargeName\r\n else\r\n Result := v.CollapsedIconName;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCTreeViewNode.GetExpandedIcon(AColumn: Integer;\r\n ALarge: Boolean): TTMSFNCBitmap;\r\nvar\r\n v: TTMSFNCTreeViewNodeValue;\r\nbegin\r\n Result := nil;\r\n v := GetValueForColumn(AColumn);\r\n if Assigned(v) then\r\n begin\r\n if ALarge then\r\n Result := v.ExpandedIconLarge\r\n else\r\n Result := v.ExpandedIcon;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCTreeViewNode.GetExpandedIconName(AColumn: Integer;\r\n ALarge: Boolean): string;\r\nvar\r\n v: TTMSFNCTreeViewNodeValue;\r\nbegin\r\n Result := '';\r\n v := GetValueForColumn(AColumn);\r\n if Assigned(v) then\r\n begin\r\n if ALarge then\r\n Result := v.ExpandedIconLargeName\r\n else\r\n Result := v.ExpandedIconName;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCTreeViewNode.GetFirstChild: TTMSFNCTreeViewNode;\r\nbegin\r\n Result := nil;\r\n if Assigned(FTreeView) then\r\n Result := FTreeView.GetFirstChildNode(Self);\r\nend;\r\n\r\nfunction TTMSFNCTreeViewNode.GetLastChild: TTMSFNCTreeViewNode;\r\nbegin\r\n Result := nil;\r\n if Assigned(FTreeView) then\r\n Result := FTreeView.GetLastChildNode(Self);\r\nend;\r\n\r\nfunction TTMSFNCTreeViewNode.GetNext: TTMSFNCTreeViewNode;\r\nbegin\r\n Result := nil;\r\n if Assigned(FTreeView) then\r\n Result := FTreeView.GetNextNode(Self);\r\nend;\r\n\r\nfunction TTMSFNCTreeViewNode.GetNextChild(ANode: TTMSFNCTreeViewNode): TTMSFNCTreeViewNode;\r\nbegin\r\n Result := nil;\r\n if Assigned(FTreeView) then\r\n Result := FTreeView.GetNextChildNode(Self, ANode);\r\nend;\r\n\r\nfunction TTMSFNCTreeViewNode.GetNextSibling: TTMSFNCTreeViewNode;\r\nbegin\r\n Result := nil;\r\n if Assigned(FTreeView) then\r\n Result := FTreeView.GetNextSiblingNode(Self);\r\nend;\r\n\r\nfunction TTMSFNCTreeViewNode.GetParent: TTMSFNCTreeViewNode;\r\nbegin\r\n Result := nil;\r\n if Assigned(FTreeView) then\r\n Result := FTreeView.GetParentNode(Self);\r\nend;\r\n\r\nfunction TTMSFNCTreeViewNode.GetPrevious: TTMSFNCTreeViewNode;\r\nbegin\r\n Result := nil;\r\n if Assigned(FTreeView) then\r\n Result := FTreeView.GetPreviousNode(Self);\r\nend;\r\n\r\nfunction TTMSFNCTreeViewNode.GetPreviousChild(ANode: TTMSFNCTreeViewNode): TTMSFNCTreeViewNode;\r\nbegin\r\n Result := nil;\r\n if Assigned(FTreeView) then\r\n Result := FTreeView.GetPreviousChildNode(Self, ANode);\r\nend;\r\n\r\nfunction TTMSFNCTreeViewNode.GetPreviousSibling: TTMSFNCTreeViewNode;\r\nbegin\r\n Result := nil;\r\n if Assigned(FTreeView) then\r\n Result := FTreeView.GetPreviousSiblingNode(Self);\r\nend;\r\n\r\nfunction TTMSFNCTreeViewNode.GetStrippedHTMLText(AColumn: Integer): String;\r\nbegin\r\n Result := TTMSFNCUtils.HTMLStrip(Text[AColumn]);\r\nend;\r\n\r\nfunction TTMSFNCTreeViewNode.GetText(AColumn: Integer): String;\r\nvar\r\n v: TTMSFNCTreeViewNodeValue;\r\nbegin\r\n Result := '';\r\n v := GetValueForColumn(AColumn);\r\n if Assigned(v) then\r\n Result := v.Text;\r\nend;\r\n\r\nfunction TTMSFNCTreeViewNode.GetValueForColumn(\r\n AColumn: Integer): TTMSFNCTreeViewNodeValue;\r\nvar\r\n I: Integer;\r\nbegin\r\n Result := nil;\r\n if (AColumn >= 0) and (AColumn <= Values.Count - 1) then\r\n begin\r\n Result := Values[AColumn];\r\n Exit;\r\n end;\r\n\r\n FTreeView.BlockUpdateNode := True;\r\n for I := 0 to AColumn do\r\n begin\r\n if I > Values.Count - 1 then\r\n Result := Values.Add;\r\n end;\r\n FTreeView.BlockUpdateNode := False;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewNode.LoadFromString(AString: String);\r\nvar\r\n k, l: Integer;\r\n a: TStringList;\r\n c, s: TStringList;\r\n y: Integer;\r\n st: string;\r\n ps: Integer;\r\n subst: string;\r\nbegin\r\n a := TStringList.Create;\r\n try\r\n st := AString;\r\n while st <> '' do\r\n begin\r\n ps := Pos('{0}', st);\r\n if ps = 0 then\r\n begin\r\n a.Add(st);\r\n Break;\r\n end;\r\n subst := Copy(st, 1, ps - 1);\r\n a.Add(subst);\r\n Delete(st, 1, ps - 1 + Length('{0}'));\r\n end;\r\n\r\n for K := 0 to a.Count - 1 do\r\n begin\r\n if a[K] <> '' then\r\n begin\r\n if K = 0 then\r\n begin\r\n c := TStringList.Create;\r\n try\r\n st := a[K];\r\n while st <> '' do\r\n begin\r\n ps := Pos('{1}', st);\r\n if ps = 0 then\r\n begin\r\n c.Add(st);\r\n Break;\r\n end;\r\n subst := Copy(st, 1, ps - 1);\r\n c.Add(subst);\r\n Delete(st, 1, ps - 1 + Length('{0}'));\r\n end;\r\n\r\n for L := 0 to c.Count - 1 do\r\n begin\r\n if c[L] <> '' then\r\n Text[L] := c[L];\r\n end;\r\n finally\r\n c.free;\r\n end;\r\n end\r\n else if K = 1 then\r\n begin\r\n c := TStringList.Create;\r\n try\r\n TTMSFNCUtils.Split('|', a[K], c);\r\n for L := 0 to c.Count - 1 do\r\n begin\r\n s := TStringList.Create;\r\n try\r\n TTMSFNCUtils.Split(';', c[L], s);\r\n for y := 0 to s.Count - 1 do\r\n begin\r\n if s[y] <> '' then\r\n begin\r\n if y = 0 then\r\n CheckTypes[L] := TTMSFNCTreeViewNodeCheckType(StrToInt(s[y]))\r\n else if y = 1 then\r\n Checked[L] := StrToBool(s[y])\r\n else if y = 2 then\r\n ExpandedIconNames[L, False] := s[y]\r\n else if y = 3 then\r\n ExpandedIconNames[L, True] := s[y]\r\n else if y = 4 then\r\n CollapsedIconNames[L, False] := s[y]\r\n else if y = 5 then\r\n CollapsedIconNames[L, True] := s[y]\r\n else if (y = 6) or (y = 7) or (y = 8) or (y = 9) then\r\n begin\r\n if y = 6 then\r\n TTMSFNCUtils.LoadBitmapFromHexStr(s[y], ExpandedIcons[L, False])\r\n else if y = 7 then\r\n TTMSFNCUtils.LoadBitmapFromHexStr(s[y], ExpandedIcons[L, True])\r\n else if y = 8 then\r\n TTMSFNCUtils.LoadBitmapFromHexStr(s[y], CollapsedIcons[L, False])\r\n else\r\n TTMSFNCUtils.LoadBitmapFromHexStr(s[y], CollapsedIcons[L, True]);\r\n end;\r\n end;\r\n end;\r\n finally\r\n s.Free;\r\n end;\r\n end;\r\n finally\r\n c.Free;\r\n end;\r\n end\r\n else if K = 2 then\r\n Extended := StrToBool(a[K])\r\n else if K = 3 then\r\n Enabled := StrToBool(a[K]);\r\n end;\r\n end;\r\n finally\r\n a.Free;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewNode.CopyTo(ADestination: TTMSFNCTreeViewNode; AIndex: Integer = -1);\r\nbegin\r\n if Assigned(FTreeView) then\r\n FTreeView.CopyNode(Self, ADestination, AIndex);\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewNode.MoveTo(ADestination: TTMSFNCTreeViewNode; AIndex: Integer = -1);\r\nbegin\r\n if Assigned(FTreeView) then\r\n FTreeView.MoveNode(Self, ADestination, AIndex);\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewNode.RemoveChildren;\r\nbegin\r\n Nodes.Clear;\r\nend;\r\n\r\nfunction TTMSFNCTreeViewNode.TreeView: TTMSFNCTreeViewData;\r\nbegin\r\n Result := FTreeView;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewNode.SetEnabled(const Value: Boolean);\r\nbegin\r\n if FEnabled <> Value then\r\n begin\r\n FEnabled := Value;\r\n UpdateNode;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewNode.SetExpanded(const Value: Boolean);\r\nbegin\r\n if FExpanded <> Value then\r\n begin\r\n FExpanded := Value;\r\n if Assigned(FTreeView) then\r\n FTreeView.ToggleNode(Self);\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewNode.SetExtended(const Value: Boolean);\r\nbegin\r\n if FExtended <> Value then\r\n begin\r\n FExtended := Value;\r\n UpdateNode;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewNode.SetIndex(Value: Integer);\r\n\r\n procedure InsertSubNodes(ANodes: TTMSFNCTreeViewNodes);\r\n var\r\n I: Integer;\r\n begin\r\n for I := 0 to ANodes.Count - 1 do\r\n begin\r\n FTreeView.InsertItemInternal(ANodes[I]);\r\n InsertSubNodes(ANodes[I].Nodes);\r\n end;\r\n end;\r\n\r\nbegin\r\n inherited;\r\n if Assigned(FTreeView) then\r\n begin\r\n if FTreeView.NodeListBuild then\r\n begin\r\n FTreeView.RemoveItemInternal(Self);\r\n FTreeView.InsertItemInternal(Self);\r\n InsertSubNodes(Nodes);\r\n end\r\n else\r\n FTreeView.UpdateTreeViewCache;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewNode.SetNodes(const Value: TTMSFNCTreeViewNodes);\r\nbegin\r\n if FNodes <> Value then\r\n begin\r\n FNodes.Assign(Value);\r\n UpdateNode;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewNode.SetValues(const Value: TTMSFNCTreeViewNodeValues);\r\nbegin\r\n if FValues <> Value then\r\n begin\r\n FValues.Assign(Value);\r\n UpdateNode;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewNode.UpdateNode;\r\nvar\r\n c: TTMSFNCTreeViewData;\r\nbegin\r\n c := TreeView;\r\n if Assigned(c) then\r\n begin\r\n if FTreeView.NodeListBuild then\r\n c.UpdateNode(VirtualNode)\r\n else\r\n c.UpdateTreeViewCache;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewNode.ValuesChanged(Sender: TObject);\r\nbegin\r\n UpdateNode;\r\nend;\r\n\r\n{ TTMSFNCTreeViewNodes }\r\n\r\nfunction TTMSFNCTreeViewNodes.Add: TTMSFNCTreeViewNode;\r\nbegin\r\n Result := TTMSFNCTreeViewNode(inherited Add);\r\nend;\r\n\r\nfunction TTMSFNCTreeViewNodes.Compare(ANode1, ANode2: TTMSFNCTreeViewNode; AColumn: Integer = 0; ACaseSensitive: Boolean = True;\r\n ASortingMode: TTMSFNCTreeViewNodesSortMode = nsmAscending): Integer;\r\nvar\r\n td: TTMSFNCTreeViewData;\r\nbegin\r\n Result := 0;\r\n\r\n td := TreeView;\r\n if not Assigned(td) then\r\n Exit;\r\n\r\n if not ACaseSensitive then\r\n Result := AnsiCompareStr(UpperCase(ANode1.StrippedHTMLText[AColumn]), UpperCase(ANode2.StrippedHTMLText[AColumn]))\r\n else\r\n Result := AnsiCompareStr(ANode1.StrippedHTMLText[AColumn], ANode2.StrippedHTMLText[AColumn]);\r\n\r\n case ASortingMode of\r\n nsmDescending: Result := Result * -1;\r\n end;\r\n\r\n td.DoNodeCompare(ANode1, ANode2, AColumn, Result);\r\nend;\r\n\r\nconstructor TTMSFNCTreeViewNodes.Create(ATreeView: TTMSFNCTreeViewData; ANode: TTMSFNCTreeViewNode);\r\nbegin\r\n inherited Create(ATreeView, GetItemClass);\r\n FTreeView := ATreeView;\r\n FNode := ANode;\r\nend;\r\n\r\ndestructor TTMSFNCTreeViewNodes.Destroy;\r\nbegin\r\n FNode := nil;\r\n inherited;\r\nend;\r\n\r\nfunction TTMSFNCTreeViewNodes.GetItem(Index: Integer): TTMSFNCTreeViewNode;\r\nbegin\r\n Result := TTMSFNCTreeViewNode(inherited Items[Index]);\r\nend;\r\n\r\nfunction TTMSFNCTreeViewNodes.GetItemClass: TCollectionItemClass;\r\nbegin\r\n Result := TTMSFNCTreeViewNode;\r\nend;\r\n\r\nfunction TTMSFNCTreeViewNodes.Insert(Index: Integer): TTMSFNCTreeViewNode;\r\nbegin\r\n Result := TTMSFNCTreeViewNode(inherited Insert(Index));\r\nend;\r\n\r\nfunction TTMSFNCTreeViewNodes.Node: TTMSFNCTreeViewNode;\r\nbegin\r\n Result := FNode;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewNodes.QuickSort(L, R: Integer; AColumn: Integer = 0; ACaseSensitive: Boolean = True; ASortingMode: TTMSFNCTreeViewNodesSortMode = nsmAscending);\r\nvar\r\n I, J, p: Integer;\r\n {$IFDEF LCLWEBLIB}\r\n SortList: TFPList;\r\n\r\n procedure ExchangeItems(Index1, Index2: Integer);\r\n var\r\n {$IFDEF WEBLIB}\r\n Save: JSValue;\r\n {$ENDIF}\r\n {$IFNDEF WEBLIB}\r\n Save: Pointer;\r\n {$ENDIF}\r\n begin\r\n Save := SortList.Items[Index1];\r\n SortList.Items[Index1] := SortList.Items[Index2];\r\n SortList.Items[Index2] := Save;\r\n end;\r\n {$ENDIF}\r\n {$IFNDEF LCLWEBLIB}\r\n SortList: TList;\r\n\r\n procedure ExchangeItems(Index1, Index2: Integer);\r\n var\r\n Save: TCollectionItem;\r\n begin\r\n Save := SortList[Index1];\r\n SortList[Index1] := SortList[Index2];\r\n SortList[Index2] := Save;\r\n Save.Index := Index2;\r\n end;\r\n {$ENDIF}\r\nbegin\r\n //This cast allows us to get at the private elements in the base class\r\n {$IFNDEF WEBLIB}\r\n SortList := {%H-}TShadowedCollection(Self).FItems;\r\n {$ENDIF}\r\n {$IFDEF WEBLIB}\r\n SortList := Self.FPList;\r\n {$ENDIF}\r\n\r\n repeat\r\n I := L;\r\n J := R;\r\n P := (L + R) shr 1;\r\n repeat\r\n while Compare(Items[I], Items[P], AColumn, ACaseSensitive, ASortingMode) < 0 do\r\n Inc(I);\r\n while Compare(Items[J], Items[P], AColumn, ACaseSensitive, ASortingMode) > 0 do\r\n Dec(J);\r\n if I <= J then\r\n begin\r\n ExchangeItems(I, J);\r\n if P = I then\r\n P := J\r\n else if P = J then\r\n P := I;\r\n Inc(I);\r\n Dec(J);\r\n end;\r\n until I > J;\r\n if L < J then\r\n QuickSort(L, J, AColumn, ACaseSensitive, ASortingMode);\r\n L := I;\r\n until I >= R;\r\nend;\r\n\r\nfunction TTMSFNCTreeViewNodes.TreeView: TTMSFNCTreeViewData;\r\nbegin\r\n Result := FTreeView;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewNodes.SetItem(Index: Integer;\r\n const Value: TTMSFNCTreeViewNode);\r\nbegin\r\n inherited Items[Index] := Value;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewNodes.Sort(AColumn: Integer = 0; ARecurse: Boolean = False; ACaseSensitive: Boolean = True;\r\n ASortingMode: TTMSFNCTreeViewNodesSortMode = nsmAscending; AClearNodeList: Boolean = True);\r\nvar\r\n td: TTMSFNCTreeViewData;\r\n I: Integer;\r\nbegin\r\n td := TreeView;\r\n if Assigned(td) then\r\n begin\r\n td.FSortMode := ASortingMode;\r\n td.BeginUpdate;\r\n if AClearNodeList then\r\n td.ClearNodeList;\r\n BeginUpdate;\r\n if Count > 0 then\r\n begin\r\n QuickSort(0, Pred(Count), AColumn, ACaseSensitive, ASortingMode);\r\n if ARecurse then\r\n begin\r\n for I := 0 to Count - 1 do\r\n Self[I].Nodes.Sort(AColumn, ARecurse, ACaseSensitive, ASortingMode, AClearNodeList);\r\n end;\r\n end;\r\n EndUpdate;\r\n td.EndUpdate;\r\n end;\r\nend;\r\n\r\n{ TTMSFNCTreeViewColumn }\r\n\r\nprocedure TTMSFNCTreeViewColumn.Assign(Source: TPersistent);\r\nbegin\r\n if Source is TTMSFNCTreeViewColumn then\r\n begin\r\n FTag := (Source as TTMSFNCTreeViewColumn).Tag;\r\n FText := (Source as TTMSFNCTreeViewColumn).Text;\r\n FName := (Source as TTMSFNCTreeViewColumn).Name;\r\n FTrimming := (Source as TTMSFNCTreeViewColumn).Trimming;\r\n FWordWrapping := (Source as TTMSFNCTreeViewColumn).WordWrapping;\r\n FHorizontalTextAlign := (Source as TTMSFNCTreeViewColumn).HorizontalTextAlign;\r\n FVerticalTextAlign := (Source as TTMSFNCTreeViewColumn).VerticalTextAlign;\r\n FTitleTrimming := (Source as TTMSFNCTreeViewColumn).TitleTrimming;\r\n FTitleWordWrapping := (Source as TTMSFNCTreeViewColumn).TitleWordWrapping;\r\n FTitleHorizontalTextAlign := (Source as TTMSFNCTreeViewColumn).TitleHorizontalTextAlign;\r\n FTitleVerticalTextAlign := (Source as TTMSFNCTreeViewColumn).TitleVerticalTextAlign;\r\n FWidth := (Source as TTMSFNCTreeViewColumn).Width;\r\n FVisible := (Source as TTMSFNCTreeViewColumn).Visible;\r\n FUseDefaultAppearance := (Source as TTMSFNCTreeViewColumn).UseDefaultAppearance;\r\n FFill.Assign((Source as TTMSFNCTreeViewColumn).Fill);\r\n FDisabledFontColor := (Source as TTMSFNCTreeViewColumn).DisabledFontColor;\r\n FSelectedFontColor := (Source as TTMSFNCTreeViewColumn).SelectedFontColor;\r\n FDisabledTitleFontColor := (Source as TTMSFNCTreeViewColumn).DisabledTitleFontColor;\r\n FSelectedTitleFontColor := (Source as TTMSFNCTreeViewColumn).SelectedTitleFontColor;\r\n FTitleFont.Assign((Source as TTMSFNCTreeViewColumn).TitleFont);\r\n FFont.Assign((Source as TTMSFNCTreeViewColumn).Font);\r\n FStroke.Assign((Source as TTMSFNCTreeViewColumn).Stroke);\r\n FBottomFill.Assign((Source as TTMSFNCTreeViewColumn).BottomFill);\r\n FBottomFont.Assign((Source as TTMSFNCTreeViewColumn).BottomFont);\r\n FBottomStroke.Assign((Source as TTMSFNCTreeViewColumn).BottomStroke);\r\n FTopFill.Assign((Source as TTMSFNCTreeViewColumn).TopFill);\r\n FTopStroke.Assign((Source as TTMSFNCTreeViewColumn).TopStroke);\r\n FTopFont.Assign((Source as TTMSFNCTreeViewColumn).TopFont);\r\n FEditorType := (Source as TTMSFNCTreeViewColumn).EditorType;\r\n FEditorItems.Assign((Source as TTMSFNCTreeViewColumn).EditorItems);\r\n FCustomEditor := (Source as TTMSFNCTreeViewColumn).CustomEditor;\r\n FSorting := (Source as TTMSFNCTreeViewColumn).Sorting;\r\n FFiltering.Assign((Source as TTMSFNCTreeViewColumn).Filtering);\r\n FExpandingButtonSize := (Source as TTMSFNCTreeViewColumn).ExpandingButtonSize;\r\n FHTMLTemplate := (Source as TTMSFNCTreeViewColumn).HTMLTemplate;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewColumn.Changed(Sender: TObject);\r\nbegin\r\n UpdateColumn;\r\nend;\r\n\r\nconstructor TTMSFNCTreeViewColumn.Create(ACollection: TCollection);\r\nbegin\r\n inherited;\r\n if Assigned(Collection) then\r\n FTreeView := (Collection as TTMSFNCTreeViewColumns).TreeView;\r\n\r\n FSorting := tcsNone;\r\n FExpandingButtonSize := 15;\r\n FExpanded := True;\r\n FSortIndex := -1;\r\n FSortKind := nskNone;\r\n FFiltering := TTMSFNCTreeViewColumnFiltering.Create(Self);\r\n FEditorType := tcetNone;\r\n FWordWrapping := False;\r\n FTrimming := gttNone;\r\n FCustomEditor := False;\r\n FHorizontalTextAlign := gtaLeading;\r\n FVerticalTextAlign := gtaCenter;\r\n FTitleWordWrapping := False;\r\n FTitleTrimming := gttNone;\r\n FTitleHorizontalTextAlign := gtaLeading;\r\n FTitleVerticalTextAlign := gtaCenter;\r\n FEditorItems := TStringList.Create;\r\n if Assigned(Collection) then\r\n FText := TranslateTextEx(sTMSFNCTreeViewColumn) + ' ' + inttostr(Collection.Count - 1);\r\n\r\n FName := StringReplace(FText, ' ', '', [rfReplaceAll]);\r\n FWidth := 100;\r\n FVisible := True;\r\n FUseDefaultAppearance := True;\r\n\r\n FBottomFill := TTMSFNCGraphicsFill.Create(gfkNone, gcWhite);\r\n FBottomStroke := TTMSFNCGraphicsStroke.Create(gskSolid, gcDarkGray);\r\n FTopFill := TTMSFNCGraphicsFill.Create(gfkNone, gcWhite);\r\n FTopStroke := TTMSFNCGraphicsStroke.Create(gskSolid, gcDarkGray);\r\n\r\n FFill := TTMSFNCGraphicsFill.Create(gfkSolid, gcNull);\r\n FStroke := TTMSFNCGraphicsStroke.Create(gskSolid, gcDarkGray);\r\n\r\n FSelectedFontColor := gcWhite;\r\n FDisabledFontColor := gcSilver;\r\n\r\n FSelectedTitleFontColor := gcWhite;\r\n FDisabledTitleFontColor := gcSilver;\r\n\r\n FFont := TTMSFNCGraphicsFont.Create;\r\n FTitleFont := TTMSFNCGraphicsFont.Create;\r\n FTopFont := TTMSFNCGraphicsFont.Create;\r\n FBottomFont := TTMSFNCGraphicsFont.Create;\r\n\r\n FBottomFill.OnChanged := @Changed;\r\n FTopFill.OnChanged := @Changed;\r\n FBottomStroke.OnChanged := @Changed;\r\n FTopStroke.OnChanged := @Changed;\r\n FStroke.OnChanged := @Changed;\r\n FFill.OnChanged := @Changed;\r\n\r\n FFont.OnChanged := @Changed;\r\n FTitleFont.OnChanged := @Changed;\r\n FTopFont.OnChanged := @Changed;\r\n FBottomFont.OnChanged := @Changed;\r\n\r\n UpdateColumn;\r\nend;\r\n\r\ndestructor TTMSFNCTreeViewColumn.Destroy;\r\nbegin\r\n FFiltering.Free;\r\n FEditorItems.Free;\r\n FTopFill.Free;\r\n FTopStroke.Free;\r\n FTopFont.Free;\r\n FBottomFill.Free;\r\n FBottomStroke.Free;\r\n FBottomFont.Free;\r\n FFill.Free;\r\n FStroke.Free;\r\n FFont.Free;\r\n FTitleFont.Free;\r\n inherited;\r\n UpdateColumn;\r\nend;\r\n\r\nfunction TTMSFNCTreeViewColumn.GetColumnText: String;\r\nbegin\r\n Result := Text;\r\n if (Result = '') or (Pos(' 0) or (Pos('/>', Result) > 0) or (Pos('
', UpperCase(Result)) > 0) then\r\n begin\r\n Result := Name;\r\n if Result = '' then\r\n Result := TranslateTextEx(sTMSFNCTreeViewColumn) + ' ' + inttostr(Index);\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCTreeViewColumn.GetDisplayName: string;\r\nbegin\r\n if FName <> '' then\r\n Result := FName\r\n {$IFDEF WEBLIB}\r\n else\r\n Result := '';\r\n {$ENDIF}\r\n {$IFNDEF WEBLIB}\r\n else\r\n Result := inherited;\r\n {$ENDIF}\r\nend;\r\n\r\nfunction TTMSFNCTreeViewColumn.GetText: String;\r\nbegin\r\n Result := Text;\r\n if Result = '' then\r\n begin\r\n Result := Name;\r\n if Result = '' then\r\n Result := TranslateTextEx(sTMSFNCTreeViewColumn) + ' ' + inttostr(Index);\r\n end;\r\nend;\r\n\r\n{$HINTS OFF}\r\nfunction TTMSFNCTreeViewColumn.IsExpandingButtonSizeStored: Boolean;\r\nbegin\r\n Result := ExpandingButtonSize <> 15;\r\nend;\r\n{$HINTS ON}\r\n\r\nfunction TTMSFNCTreeViewColumn.TreeView: TTMSFNCTreeViewData;\r\nbegin\r\n Result := FTreeView;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewColumn.SetHorizontalTextAlign(\r\n const Value: TTMSFNCGraphicsTextAlign);\r\nbegin\r\n if FHorizontalTextAlign <> Value then\r\n begin\r\n FHorizontalTextAlign := Value;\r\n UpdateColumn;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewColumn.SetHTMLTemplate(const Value: string);\r\nbegin\r\n if FHTMLTemplate <> Value then\r\n begin\r\n FHTMLTemplate := Value;\r\n if Assigned(FTreeView) then\r\n FTreeView.UpdateTreeView;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewColumn.SetMinimumWidth(const Value: Double);\r\nbegin\r\n if FMinimumWidth <> Value then\r\n begin\r\n FMinimumWidth := Value;\r\n UpdateColumn;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewColumn.SetBottomFont(const Value: TTMSFNCGraphicsFont);\r\nbegin\r\n if FBottomFont <> Value then\r\n FBottomFont.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewColumn.SetBottomStroke(\r\n const Value: TTMSFNCGraphicsStroke);\r\nbegin\r\n if FBottomStroke <> Value then\r\n FBottomStroke.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewColumn.SetDisabledFontColor(\r\n const Value: TTMSFNCGraphicsColor);\r\nbegin\r\n if FDisabledFontColor <> Value then\r\n begin\r\n FDisabledFontColor := Value;\r\n Changed(Self);\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewColumn.SetDisabledTitleFontColor(\r\n const Value: TTMSFNCGraphicsColor);\r\nbegin\r\n if FDisabledTitleFontColor <> Value then\r\n begin\r\n FDisabledTitleFontColor := Value;\r\n UpdateColumn;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewColumn.SetEditorItems(const Value: TStringList);\r\nbegin\r\n FEditorItems.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewColumn.SetEditorType(\r\n const Value: TTMSFNCTreeViewColumnEditorType);\r\nbegin\r\n if FEditorType <> Value then\r\n FEditorType := Value;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewColumn.SetExpandable(const Value: Boolean);\r\nbegin\r\n if FExpandable <> Value then\r\n begin\r\n FExpandable := Value;\r\n UpdateColumn;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewColumn.SetExpanded(const Value: Boolean);\r\nbegin\r\n if FExpanded <> Value then\r\n begin\r\n FExpanded := Value;\r\n UpdateColumn;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewColumn.SetExpandingButtonSize(const Value: Single);\r\nbegin\r\n FExpandingButtonSize := Value;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewColumn.SetBottomFill(const Value: TTMSFNCGraphicsFill);\r\nbegin\r\n if FBottomFill <> Value then\r\n FBottomFill.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewColumn.SetFont(const Value: TTMSFNCGraphicsFont);\r\nbegin\r\n if FFont <> Value then\r\n FFont.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewColumn.SetSelectedFontColor(\r\n const Value: TTMSFNCGraphicsColor);\r\nbegin\r\n if FSelectedFontColor <> Value then\r\n begin\r\n FSelectedFontColor := Value;\r\n Changed(Self);\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewColumn.SetSelectedTitleFontColor(\r\n const Value: TTMSFNCGraphicsColor);\r\nbegin\r\n if FSelectedTitleFontColor <> value then\r\n begin\r\n FSelectedTitleFontColor := Value;\r\n Changed(Self);\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewColumn.SetSortIndex(const Value: Integer);\r\nbegin\r\n if FSortIndex <> Value then\r\n begin\r\n FSortIndex := Value;\r\n Changed(Self);\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewColumn.SetSorting(const Value: TTMSFNCTreeViewColumnSorting);\r\nbegin\r\n if FSorting <> Value then\r\n begin\r\n FSorting := Value;\r\n Changed(Self);\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewColumn.SetSortKind(\r\n const Value: TTMSFNCTreeViewNodesSortKind);\r\nbegin\r\n if FSortKind <> Value then\r\n begin\r\n FSortKind := Value;\r\n Changed(Self);\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewColumn.SetStroke(\r\n const Value: TTMSFNCGraphicsStroke);\r\nbegin\r\n if FStroke <> Value then\r\n FStroke.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewColumn.SetFill(const Value: TTMSFNCGraphicsFill);\r\nbegin\r\n if FFill <> Value then\r\n FFill.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewColumn.SetFiltering(\r\n const Value: TTMSFNCTreeViewColumnFiltering);\r\nbegin\r\n if FFiltering <> Value then\r\n FFiltering.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewColumn.SetTopFont(const Value: TTMSFNCGraphicsFont);\r\nbegin\r\n if FTopFont <> Value then\r\n FTopFont.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewColumn.SetTopStroke(\r\n const Value: TTMSFNCGraphicsStroke);\r\nbegin\r\n if FTopStroke <> Value then\r\n FTopStroke.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewColumn.SetTopFill(const Value: TTMSFNCGraphicsFill);\r\nbegin\r\n if FTopFill <> Value then\r\n FTopFill.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewColumn.SetName(const Value: String);\r\nbegin\r\n if FName <> Value then\r\n begin\r\n FName := Value;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewColumn.SetText(const Value: String);\r\nbegin\r\n if FText <> Value then\r\n begin\r\n FText := Value;\r\n UpdateColumn;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewColumn.SetTitleFont(const Value: TTMSFNCGraphicsFont);\r\nbegin\r\n if FTitleFont <> Value then\r\n FTitleFont.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewColumn.SetTitleHorizontalTextAlign(\r\n const Value: TTMSFNCGraphicsTextAlign);\r\nbegin\r\n if FTitleHorizontalTextAlign <> Value then\r\n begin\r\n FTitleHorizontalTextAlign := Value;\r\n UpdateColumn;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewColumn.SetTitleTrimming(\r\n const Value: TTMSFNCGraphicsTextTrimming);\r\nbegin\r\n if FTitleTrimming <> Value then\r\n begin\r\n FTitleTrimming := Value;\r\n UpdateColumn;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewColumn.SetTitleVerticalTextAlign(\r\n const Value: TTMSFNCGraphicsTextAlign);\r\nbegin\r\n if FTitleVerticalTextAlign <> Value then\r\n begin\r\n FTitleVerticalTextAlign := Value;\r\n UpdateColumn;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewColumn.SetTitleWordWrapping(const Value: Boolean);\r\nbegin\r\n if FTitleWordWrapping <> Value then\r\n begin\r\n FTitleWordWrapping := Value;\r\n UpdateColumn;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewColumn.SetTrimming(const Value: TTMSFNCGraphicsTextTrimming);\r\nbegin\r\n if FTrimming <> Value then\r\n begin\r\n FTrimming := Value;\r\n UpdateColumn;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewColumn.SetUseDefaultAppearance(const Value: Boolean);\r\nbegin\r\n if FUseDefaultAppearance <> Value then\r\n begin\r\n FUseDefaultAppearance := Value;\r\n UpdateColumn;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewColumn.SetVerticalTextAlign(\r\n const Value: TTMSFNCGraphicsTextAlign);\r\nbegin\r\n if FVerticalTextAlign <> Value then\r\n begin\r\n FVerticalTextAlign := Value;\r\n UpdateColumn;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewColumn.SetVisible(const Value: Boolean);\r\nbegin\r\n if FVisible <> Value then\r\n begin\r\n FVisible := Value;\r\n UpdateColumn;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewColumn.SetWidth(const Value: Double);\r\nbegin\r\n if FWidth <> Value then\r\n begin\r\n FWidth := Value;\r\n UpdateColumn;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewColumn.SetWordWrapping(const Value: Boolean);\r\nbegin\r\n if FWordWrapping <> Value then\r\n begin\r\n FWordWrapping := Value;\r\n UpdateColumn;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewColumn.Sort(ARecurse, ACaseSensitive: Boolean; ASortingMode: TTMSFNCTreeViewNodesSortMode);\r\nvar\r\n t: TTMSFNCTreeViewData;\r\nbegin\r\n t := TreeView;\r\n if Assigned(t) then\r\n t.Nodes.Sort(Index, ARecurse, ACaseSensitive, ASortingMode);\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewColumn.UpdateColumn;\r\nvar\r\n t: TTMSFNCTreeViewData;\r\nbegin\r\n t := TreeView;\r\n if Assigned(t) then\r\n begin\r\n t.UpdateColumns;\r\n t.UpdateTreeViewCache;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewColumn.UpdateWidth(AWidth: Double);\r\nbegin\r\n FWidth := AWidth;\r\nend;\r\n\r\n{ TTMSFNCTreeViewColumns }\r\n\r\nfunction TTMSFNCTreeViewColumns.Add: TTMSFNCTreeViewColumn;\r\nbegin\r\n Result := TTMSFNCTreeViewColumn(inherited Add);\r\nend;\r\n\r\nconstructor TTMSFNCTreeViewColumns.Create(ATreeView: TTMSFNCTreeViewData);\r\nbegin\r\n inherited Create(ATreeView, GetItemClass);\r\n FTreeView := ATreeView;\r\nend;\r\n\r\nfunction TTMSFNCTreeViewColumns.GetItem(Index: Integer): TTMSFNCTreeViewColumn;\r\nbegin\r\n Result := TTMSFNCTreeViewColumn(inherited Items[Index]);\r\nend;\r\n\r\nfunction TTMSFNCTreeViewColumns.GetItemClass: TCollectionItemClass;\r\nbegin\r\n Result := TTMSFNCTreeViewColumn;\r\nend;\r\n\r\nfunction TTMSFNCTreeViewColumns.Insert(Index: Integer): TTMSFNCTreeViewColumn;\r\nbegin\r\n Result := TTMSFNCTreeViewColumn(inherited Insert(Index));\r\nend;\r\n\r\nfunction TTMSFNCTreeViewColumns.TreeView: TTMSFNCTreeViewData;\r\nbegin\r\n Result := FTreeView;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewColumns.SetItem(Index: Integer;\r\n const Value: TTMSFNCTreeViewColumn);\r\nbegin\r\n inherited Items[Index] := Value;\r\nend;\r\n\r\n{ TTMSFNCTreeViewNodeValue }\r\n\r\nfunction TTMSFNCTreeViewNodeValue.GetBitmapContainer: TTMSFNCBitmapContainer;\r\nbegin\r\n Result := nil;\r\n if Assigned(FTreeView) then\r\n Result := FTreeView.BitmapContainer;\r\nend;\r\n\r\nfunction TTMSFNCTreeViewNodeValue.GetText: string;\r\nvar\r\n ht: string;\r\n s: string;\r\nbegin\r\n s := Text;\r\n if Assigned(FTreeView) then\r\n begin\r\n ht := FTreeView.GetHTMLTemplate(Index);\r\n FTreeView.DoGetHTMLTemplate(Self, Index, ht);\r\n if ht <> '' then\r\n s := FTreeView.HTMLReplace(ht, Self);\r\n end;\r\n\r\n Result := s;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewNodeValue.Assign(Source: TPersistent);\r\nbegin\r\n if Source is TTMSFNCTreeViewNodeValue then\r\n begin\r\n FTag := (Source as TTMSFNCTreeViewNodeValue).Tag;\r\n FText := (Source as TTMSFNCTreeViewNodeValue).Text;\r\n FTitleExpanded := (Source as TTMSFNCTreeViewNodeValue).TitleExpanded;\r\n FTitle := (Source as TTMSFNCTreeViewNodeValue).Title;\r\n FCheckType := (Source as TTMSFNCTreeViewNodeValue).CheckType;\r\n FChecked := (Source as TTMSFNCTreeViewNodeValue).Checked;\r\n FCollapsedIcon.Assign((Source as TTMSFNCTreeViewNodeValue).CollapsedIcon);\r\n FCollapsedIconLarge.Assign((Source as TTMSFNCTreeViewNodeValue).CollapsedIconLarge);\r\n FExpandedIcon.Assign((Source as TTMSFNCTreeViewNodeValue).ExpandedIcon);\r\n FExpandedIconLarge.Assign((Source as TTMSFNCTreeViewNodeValue).ExpandedIconLarge);\r\n FCollapsedIconName := (Source as TTMSFNCTreeViewNodeValue).CollapsedIconName;\r\n FCollapsedIconLargeName := (Source as TTMSFNCTreeViewNodeValue).CollapsedIconLargeName;\r\n FExpandedIconName := (Source as TTMSFNCTreeViewNodeValue).ExpandedIconName;\r\n FExpandedIconLargeName := (Source as TTMSFNCTreeViewNodeValue).ExpandedIconLargeName;\r\n FHTMLTemplateItems.Assign((Source as TTMSFNCTreeViewNodeValue).HTMLTemplateItems);\r\n AssignData(Source);\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewNodeValue.AssignData(Source: TPersistent);\r\nbegin\r\n if Source is TTMSFNCTreeViewNodeValue then\r\n begin\r\n FDataString := (Source as TTMSFNCTreeViewNodeValue).DataString;\r\n FDataPointer := (Source as TTMSFNCTreeViewNodeValue).DataPointer;\r\n FDataBoolean := (Source as TTMSFNCTreeViewNodeValue).DataBoolean;\r\n FDataObject := (Source as TTMSFNCTreeViewNodeValue).DataObject;\r\n FDataInteger := (Source as TTMSFNCTreeViewNodeValue).DataInteger;\r\n FDBKey := (Source as TTMSFNCTreeViewNodeValue).DBKey;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewNodeValue.BitmapChanged(Sender: TObject);\r\nbegin\r\n UpdateNodeValue;\r\nend;\r\n\r\nconstructor TTMSFNCTreeViewNodeValue.Create(ACollection: TCollection);\r\nbegin\r\n inherited;\r\n if Assigned(Collection) then\r\n begin\r\n FTreeView := (Collection as TTMSFNCTreeViewNodeValues).TreeView;\r\n FNode := (Collection as TTMSFNCTreeViewNodeValues).Node;\r\n end;\r\n FChecked := False;\r\n FTitleExpanded := True;\r\n FCheckType := tvntNone;\r\n FCollapsedIcon := TTMSFNCBitmap.Create;\r\n FCollapsedIcon.OnChange := @BitmapChanged;\r\n FExpandedIcon := TTMSFNCBitmap.Create;\r\n FExpandedIcon.OnChange := @BitmapChanged;\r\n\r\n FCollapsedIconLarge := TTMSFNCBitmap.Create;\r\n FCollapsedIconLarge.OnChange := @BitmapChanged;\r\n FExpandedIconLarge := TTMSFNCBitmap.Create;\r\n FExpandedIconLarge.OnChange := @BitmapChanged;\r\n\r\n FHTMLTemplateItems := TStringList.Create;\r\n FHTMLTemplateItems.OnChange := @TemplateItemsChanged;\r\n\r\n UpdateNodeValue;\r\nend;\r\n\r\ndestructor TTMSFNCTreeViewNodeValue.Destroy;\r\nbegin\r\n FHTMLTemplateItems.Free;\r\n FCollapsedIcon.Free;\r\n FCollapsedIconLarge.Free;\r\n FExpandedIcon.Free;\r\n FExpandedIconLarge.Free;\r\n inherited;\r\n UpdateNodeValue;\r\nend;\r\n\r\nfunction TTMSFNCTreeViewNodeValue.Node: TTMSFNCTreeViewNode;\r\nbegin\r\n Result := FNode;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewNodeValue.TemplateItemsChanged(Sender: TObject);\r\nbegin\r\n UpdateNodeValue;\r\nend;\r\n\r\nfunction TTMSFNCTreeViewNodeValue.TreeView: TTMSFNCTreeViewData;\r\nbegin\r\n Result := FTreeView;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewNodeValue.SetChecked(const Value: Boolean);\r\nvar\r\n chkst: TTMSFNCArrayBoolean;\r\n I: Integer;\r\n chk: Boolean;\r\n t: TTMSFNCTreeViewData;\r\n n: TTMSFNCTreeViewNode;\r\nbegin\r\n if FChecked <> Value then\r\n begin\r\n FChecked := Value;\r\n t := TreeView;\r\n n := Node;\r\n if Assigned(t) and Assigned(n) and Assigned(n.VirtualNode) then\r\n begin\r\n SetLength(chkst, 0);\r\n for I := 0 to t.ColumnCount - 1 do\r\n begin\r\n chk := False;\r\n TreeView.DoIsNodeChecked(Node.VirtualNode, I, chk);\r\n SetLength(chkst, Length(chkst) + 1);\r\n chkst[Length(chkst) - 1] := chk;\r\n end;\r\n\r\n TreeView.UpdateNodeCheckStates(Self.Node.VirtualNode, chkst);\r\n end;\r\n\r\n UpdateNodeValue;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewNodeValue.SetCheckType(\r\n const Value: TTMSFNCTreeViewNodeCheckType);\r\nbegin\r\n if FCheckType <> Value then\r\n begin\r\n FCheckType := Value;\r\n UpdateNodeValue;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewNodeValue.SetCollapsedIconName(const Value: String);\r\nbegin\r\n if FCollapsedIconName <> Value then\r\n begin\r\n FCollapsedIconName := Value;\r\n UpdateNodeValue;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewNodeValue.SetCollapsedIconLargeName(const Value: String);\r\nbegin\r\n if FCollapsedIconLargeName <> Value then\r\n begin\r\n FCollapsedIconLargeName := Value;\r\n UpdateNodeValue;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewNodeValue.SetExpandedIconName(const Value: String);\r\nbegin\r\n if FExpandedIconName <> Value then\r\n begin\r\n FExpandedIconName := Value;\r\n UpdateNodeValue;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewNodeValue.SetHTMLTemplateItems(const Value: TStringList);\r\nbegin\r\n if FHTMLTemplateItems <> Value then\r\n begin\r\n FHTMLTemplateItems.Assign(Value);\r\n UpdateNodeValue;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewNodeValue.SetExpandedIconLargeName(const Value: String);\r\nbegin\r\n if FExpandedIconLargeName <> Value then\r\n begin\r\n FExpandedIconLargeName := Value;\r\n UpdateNodeValue;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewNodeValue.SetTitleExpanded(const Value: Boolean);\r\nbegin\r\n if FTitleExpanded <> Value then\r\n begin\r\n FTitleExpanded := Value;\r\n UpdateNodeValue;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewNodeValue.SetCollapsedIcon(const Value: TTMSFNCBitmap);\r\nbegin\r\n if FCollapsedIcon <> Value then\r\n begin\r\n FCollapsedIcon.Assign(Value);\r\n UpdateNodeValue;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewNodeValue.SetCollapsedIconLarge(const Value: TTMSFNCBitmap);\r\nbegin\r\n if FCollapsedIconLarge <> Value then\r\n begin\r\n FCollapsedIconLarge.Assign(Value);\r\n UpdateNodeValue;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewNodeValue.SetExpandedIcon(const Value: TTMSFNCBitmap);\r\nbegin\r\n if FExpandedIcon <> Value then\r\n begin\r\n FExpandedIcon.Assign(Value);\r\n UpdateNodeValue;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewNodeValue.SetExpandedIconLarge(const Value: TTMSFNCBitmap);\r\nbegin\r\n if FExpandedIconLarge <> Value then\r\n begin\r\n FExpandedIconLarge.Assign(Value);\r\n UpdateNodeValue;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewNodeValue.SetText(const Value: String);\r\nbegin\r\n if FText <> Value then\r\n begin\r\n FText := Value;\r\n UpdateNodeValue;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewNodeValue.SetTitle(const Value: String);\r\nbegin\r\n if FTitle <> Value then\r\n begin\r\n FTitle := Value;\r\n UpdateNodeValue;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewNodeValue.UpdateNodeValue;\r\nvar\r\n c: TTMSFNCTreeViewData;\r\n n: TTMSFNCTreeViewNode;\r\nbegin\r\n c := TreeView;\r\n n := Node;\r\n if Assigned(c) and Assigned(n) then\r\n c.UpdateNode(n.VirtualNode);\r\nend;\r\n\r\n{ TTMSFNCTreeViewNodeValues }\r\n\r\nfunction TTMSFNCTreeViewNodeValues.Add: TTMSFNCTreeViewNodeValue;\r\nbegin\r\n Result := TTMSFNCTreeViewNodeValue(inherited Add);\r\nend;\r\n\r\nconstructor TTMSFNCTreeViewNodeValues.Create(ATreeView: TTMSFNCTreeViewData; ANode: TTMSFNCTreeViewNode);\r\nbegin\r\n inherited Create(ATreeView, GetItemClass);\r\n FTreeView := ATreeView;\r\n FNode := ANode;\r\nend;\r\n\r\nfunction TTMSFNCTreeViewNodeValues.GetItem(Index: Integer): TTMSFNCTreeViewNodeValue;\r\nbegin\r\n Result := TTMSFNCTreeViewNodeValue(inherited Items[Index]);\r\nend;\r\n\r\nfunction TTMSFNCTreeViewNodeValues.GetItemClass: TCollectionItemClass;\r\nbegin\r\n Result := TTMSFNCTreeViewNodeValue;\r\nend;\r\n\r\nfunction TTMSFNCTreeViewNodeValues.Insert(Index: Integer): TTMSFNCTreeViewNodeValue;\r\nbegin\r\n Result := TTMSFNCTreeViewNodeValue(inherited Insert(Index));\r\nend;\r\n\r\nfunction TTMSFNCTreeViewNodeValues.Node: TTMSFNCTreeViewNode;\r\nbegin\r\n Result := FNode;\r\nend;\r\n\r\nfunction TTMSFNCTreeViewNodeValues.TreeView: TTMSFNCTreeViewData;\r\nbegin\r\n Result := FTreeView;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewNodeValues.UpdateChecked(AIndex: Integer;\r\n AValue: Boolean);\r\nbegin\r\n if Assigned(FTreeView) then\r\n FTreeView.UpdateCount := FTreeView.UpdateCount + 1;\r\n Items[AIndex].Checked := AValue;\r\n if Assigned(FTreeView) then\r\n FTreeView.UpdateCount := FTreeView.UpdateCount - 1;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewNodeValues.SetItem(Index: Integer;\r\n const Value: TTMSFNCTreeViewNodeValue);\r\nbegin\r\n inherited Items[Index] := Value;\r\nend;\r\n\r\n{ TTMSFNCTreeViewCacheItem }\r\n\r\nclass function TTMSFNCTreeViewCacheItem.CreateGroupBottom(ARect: TRectF; AGroup: Integer; AStartColumn, AEndColumn: Integer): TTMSFNCTreeViewCacheItem;\r\nbegin\r\n Result := TTMSFNCTreeViewCacheItem.Create;\r\n Result.Kind := ikGroupBottom;\r\n Result.Group := AGroup;\r\n Result.StartColumn := AStartColumn;\r\n Result.EndColumn := AEndColumn;\r\n Result.Rect := ARect;\r\nend;\r\n\r\nclass function TTMSFNCTreeViewCacheItem.CreateGroupTop(\r\n ARect: TRectF; AGroup: Integer; AStartColumn, AEndColumn: Integer): TTMSFNCTreeViewCacheItem;\r\nbegin\r\n Result := TTMSFNCTreeViewCacheItem.Create;\r\n Result.Kind := ikGroupTop;\r\n Result.Group := AGroup;\r\n Result.StartColumn := AStartColumn;\r\n Result.EndColumn := AEndColumn;\r\n Result.Rect := ARect;\r\nend;\r\n\r\nclass function TTMSFNCTreeViewCacheItem.CreateNode(ARect: TRectF; ANode: TTMSFNCTreeViewVirtualNode): TTMSFNCTreeViewCacheItem;\r\nbegin\r\n Result := TTMSFNCTreeViewCacheItem.Create;\r\n Result.Kind := ikNode;\r\n Result.Rect := ARect;\r\n Result.Node := ANode;\r\nend;\r\n\r\nclass function TTMSFNCTreeViewCacheItem.CreateColumnTop(ARect: TRectF; AColumn: Integer): TTMSFNCTreeViewCacheItem;\r\nbegin\r\n Result := TTMSFNCTreeViewCacheItem.Create;\r\n Result.Kind := ikColumnTop;\r\n Result.Column := AColumn;\r\n Result.Rect := ARect;\r\nend;\r\n\r\nclass function TTMSFNCTreeViewCacheItem.CreateColumnBottom(ARect: TRectF; AColumn: Integer): TTMSFNCTreeViewCacheItem;\r\nbegin\r\n Result := TTMSFNCTreeViewCacheItem.Create;\r\n Result.Kind := ikColumnBottom;\r\n Result.Column := AColumn;\r\n Result.Rect := ARect;\r\nend;\r\n\r\ndestructor TTMSFNCTreeViewCacheItem.Destroy;\r\nbegin\r\n FNode := nil;\r\n inherited;\r\nend;\r\n\r\n{ TTMSFNCTreeViewVirtualNode }\r\n\r\nprocedure TTMSFNCTreeViewVirtualNode.Collapse(ARecurse: Boolean = False);\r\nbegin\r\n if Assigned(FTreeView) then\r\n FTreeView.CollapseVirtualNode(Self, ARecurse);\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewVirtualNode.CopyFrom(\r\n Source: TTMSFNCTreeViewVirtualNode);\r\nbegin\r\n if Assigned(Source) then\r\n begin\r\n FChildren := (Source as TTMSFNCTreeViewVirtualNode).Children;\r\n FTotalChildren := (Source as TTMSFNCTreeViewVirtualNode).TotalChildren;\r\n FExpanded := (Source as TTMSFNCTreeViewVirtualNode).Expanded;\r\n FExtended := (Source as TTMSFNCTreeViewVirtualNode).Extended;\r\n FLevel := (Source as TTMSFNCTreeViewVirtualNode).Level;\r\n FRow := (Source as TTMSFNCTreeViewVirtualNode).Row;\r\n FCalculated := (Source as TTMSFNCTreeViewVirtualNode).Calculated;\r\n FHeight := (Source as TTMSFNCTreeViewVirtualNode).Height;\r\n FParentNode := (Source as TTMSFNCTreeViewVirtualNode).ParentNode;\r\n FIndex := (Source as TTMSFNCTreeViewVirtualNode).Index;\r\n FTextRects := (Source as TTMSFNCTreeViewVirtualNode).TextRects;\r\n FExtraRects := (Source as TTMSFNCTreeViewVirtualNode).ExtraRects;\r\n FBitmapRects := (Source as TTMSFNCTreeViewVirtualNode).BitmapRects;\r\n FCheckRects := (Source as TTMSFNCTreeViewVirtualNode).CheckRects;\r\n FExpandRects := (Source as TTMSFNCTreeViewVirtualNode).ExpandRects;\r\n FCheckStates := (Source as TTMSFNCTreeViewVirtualNode).CheckStates;\r\n FNode := (Source as TTMSFNCTreeViewVirtualNode).Node;\r\n end;\r\nend;\r\n\r\nconstructor TTMSFNCTreeViewVirtualNode.Create(ATreeView: TTMSFNCTreeViewData);\r\nbegin\r\n FTreeView := ATreeView;\r\nend;\r\n\r\ndestructor TTMSFNCTreeViewVirtualNode.Destroy;\r\nbegin\r\n FCache := nil;\r\n FNode := nil;\r\n inherited;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewVirtualNode.Expand(ARecurse: Boolean = False);\r\nbegin\r\n if Assigned(FTreeView) then\r\n FTreeView.ExpandVirtualNode(Self, ARecurse);\r\nend;\r\n\r\nfunction TTMSFNCTreeViewVirtualNode.GetChildCount: Integer;\r\nbegin\r\n Result := 0;\r\n if Assigned(FTreeView) then\r\n Result := FTreeView.GetVirtualNodeChildCount(Self);\r\nend;\r\n\r\nfunction TTMSFNCTreeViewVirtualNode.GetTitleExpanded(AColumn: Integer): Boolean;\r\nbegin\r\n Result := True;\r\n if Assigned(FTreeView) then\r\n Result := FTreeView.GetVirtualNodeTitleExpanded(Self, AColumn);\r\nend;\r\n\r\nfunction TTMSFNCTreeViewVirtualNode.GetFirstChild: TTMSFNCTreeViewVirtualNode;\r\nbegin\r\n Result := nil;\r\n if Assigned(FTreeView) then\r\n Result := FTreeView.GetFirstChildVirtualNode(Self);\r\nend;\r\n\r\nfunction TTMSFNCTreeViewVirtualNode.GetLastChild: TTMSFNCTreeViewVirtualNode;\r\nbegin\r\n Result := nil;\r\n if Assigned(FTreeView) then\r\n Result := FTreeView.GetLastChildVirtualNode(Self);\r\nend;\r\n\r\nfunction TTMSFNCTreeViewVirtualNode.GetNext: TTMSFNCTreeViewVirtualNode;\r\nbegin\r\n Result := nil;\r\n if Assigned(FTreeView) then\r\n Result := FTreeView.GetNextVirtualNode(Self);\r\nend;\r\n\r\nfunction TTMSFNCTreeViewVirtualNode.GetNextChild(\r\n ANode: TTMSFNCTreeViewVirtualNode): TTMSFNCTreeViewVirtualNode;\r\nbegin\r\n Result := nil;\r\n if Assigned(FTreeView) then\r\n Result := FTreeView.GetNextChildVirtualNode(Self, ANode);\r\nend;\r\n\r\nfunction TTMSFNCTreeViewVirtualNode.GetNextSibling: TTMSFNCTreeViewVirtualNode;\r\nbegin\r\n Result := nil;\r\n if Assigned(FTreeView) then\r\n Result := FTreeView.GetNextSiblingVirtualNode(Self);\r\nend;\r\n\r\nfunction TTMSFNCTreeViewVirtualNode.GetParent: TTMSFNCTreeViewVirtualNode;\r\nbegin\r\n Result := nil;\r\n if Assigned(FTreeView) then\r\n Result := FTreeView.GetParentVirtualNode(Self);\r\nend;\r\n\r\nfunction TTMSFNCTreeViewVirtualNode.GetPrevious: TTMSFNCTreeViewVirtualNode;\r\nbegin\r\n Result := nil;\r\n if Assigned(FTreeView) then\r\n Result := FTreeView.GetPreviousVirtualNode(Self);\r\nend;\r\n\r\nfunction TTMSFNCTreeViewVirtualNode.GetPreviousChild(\r\n ANode: TTMSFNCTreeViewVirtualNode): TTMSFNCTreeViewVirtualNode;\r\nbegin\r\n Result := nil;\r\n if Assigned(FTreeView) then\r\n Result := FTreeView.GetPreviousChildVirtualNode(Self, ANode);\r\nend;\r\n\r\nfunction TTMSFNCTreeViewVirtualNode.GetPreviousSibling: TTMSFNCTreeViewVirtualNode;\r\nbegin\r\n Result := nil;\r\n if Assigned(FTreeView) then\r\n Result := FTreeView.GetPreviousSiblingVirtualNode(Self);\r\nend;\r\n\r\nfunction TTMSFNCTreeViewVirtualNode.GetText(AColumn: Integer): String;\r\nbegin\r\n Result := '';\r\n if Assigned(FTreeView) then\r\n Result := FTreeView.GetVirtualNodeText(Self, AColumn);\r\nend;\r\n\r\nfunction TTMSFNCTreeViewVirtualNode.GetTitle(AColumn: Integer): String;\r\nbegin\r\n Result := '';\r\n if Assigned(FTreeView) then\r\n Result := FTreeView.GetVirtualNodeTitle(Self, AColumn);\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewVirtualNode.RemoveChildren;\r\nbegin\r\n if Assigned(FTreeView) then\r\n FTreeView.RemoveVirtualNodeChildren(Self);\r\nend;\r\n\r\n{ TTMSFNCTreeViewColumnFiltering }\r\n\r\nprocedure TTMSFNCTreeViewColumnFiltering.Assign(Source: TPersistent);\r\nbegin\r\n if Source is TTMSFNCTreeViewColumnFiltering then\r\n begin\r\n FEnabled := (Source as TTMSFNCTreeViewColumnFiltering).Enabled;\r\n FDropDownWidth := (Source as TTMSFNCTreeViewColumnFiltering).DropDownWidth;\r\n FDropDownHeight := (Source as TTMSFNCTreeViewColumnFiltering).DropDownHeight;\r\n FMultiColumn := (Source as TTMSFNCTreeViewColumnFiltering).MultiColumn;\r\n FButtonSize := (Source as TTMSFNCTreeViewColumnFiltering).ButtonSize;\r\n end;\r\nend;\r\n\r\nconstructor TTMSFNCTreeViewColumnFiltering.Create(AColumn: TTMSFNCTreeViewColumn);\r\nbegin\r\n FColumn := AColumn;\r\n FEnabled := False;\r\n FDropDownWidth := 100;\r\n FDropDownHeight := 120;\r\n FMultiColumn := False;\r\n FButtonSize := 15;\r\nend;\r\n\r\ndestructor TTMSFNCTreeViewColumnFiltering.Destroy;\r\nbegin\r\n inherited;\r\nend;\r\n\r\nfunction TTMSFNCTreeViewColumnFiltering.IsButtonSizeStored: Boolean;\r\nbegin\r\n Result := ButtonSize <> 15;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewColumnFiltering.SetButtonSize(const Value: Single);\r\nbegin\r\n if FButtonSize <> Value then\r\n begin\r\n FButtonSize := Value;\r\n if Assigned(FColumn) then\r\n FColumn.UpdateColumn;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewColumnFiltering.SetEnabled(const Value: Boolean);\r\nbegin\r\n if FEnabled <> Value then\r\n begin\r\n FEnabled := Value;\r\n if Assigned(FColumn) then\r\n FColumn.UpdateColumn;\r\n end;\r\nend;\r\n\r\n{ TTMSFNCTreeViewFilterData }\r\n\r\nprocedure TTMSFNCTreeViewFilterData.Assign(Source: TPersistent);\r\nvar\r\n ASrcFilterData: TTMSFNCTreeViewFilterData;\r\nbegin\r\n ASrcFilterData := Source as TTMSFNCTreeViewFilterData;\r\n if Assigned(ASrcFilterData) then\r\n begin\r\n FColumn := ASrcFilterData.Column;\r\n FCondition := ASrcFilterData.Condition;\r\n FCaseSensitive := ASrcFilterData.CaseSensitive;\r\n FPrefix := ASrcFilterData.Prefix;\r\n FSuffix := ASrcFilterData.Suffix;\r\n FOperation := ASrcFilterData.Operation;\r\n end;\r\nend;\r\n\r\nconstructor TTMSFNCTreeViewFilterData.Create(ACollection: TCollection);\r\nbegin\r\n inherited;\r\n FCaseSensitive := True;\r\nend;\r\n\r\n{ TTMSFNCTreeViewFilter }\r\n\r\nfunction TTMSFNCTreeViewFilter.Add: TTMSFNCTreeViewFilterData;\r\nbegin\r\n Result := TTMSFNCTreeViewFilterData(inherited Add);\r\n if Count = 1 then\r\n Result.Operation := tfoNone\r\n else\r\n Result.Operation := tfoAND;\r\nend;\r\n\r\nconstructor TTMSFNCTreeViewFilter.Create(AOwner: TTMSFNCTreeViewData);\r\nbegin\r\n inherited Create(AOwner, TTMSFNCTreeViewFilterData);\r\n FOwner := AOwner;\r\nend;\r\n\r\nfunction TTMSFNCTreeViewFilter.GetColFilter(Col: Integer): TTMSFNCTreeViewFilterData;\r\nvar\r\n i: Integer;\r\nbegin\r\n for i := 1 to Count do\r\n begin\r\n if Items[i - 1].Column = Col then\r\n begin\r\n Result := Items[i - 1];\r\n Exit;\r\n end;\r\n end;\r\n Result := Add;\r\n Result.Column := Col;\r\nend;\r\n\r\nfunction TTMSFNCTreeViewFilter.GetItem(Index: Integer): TTMSFNCTreeViewFilterData;\r\nbegin\r\n Result := TTMSFNCTreeViewFilterData(inherited GetItem(Index));\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewFilter.RemoveColumnFilter(Col: integer);\r\nvar\r\n i: integer;\r\nbegin\r\n i := Count;\r\n\r\n while i > 0 do\r\n begin\r\n dec(i);\r\n if Items[i].Column = Col then\r\n Delete(i);\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCTreeViewFilter.HasFilter(Col: integer): Boolean;\r\nvar\r\n i: Integer;\r\nbegin\r\n Result := false;\r\n\r\n for i := 1 to Count do\r\n begin\r\n if Items[i - 1].Column = Col then\r\n begin\r\n Result := true;\r\n Break;\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCTreeViewFilter.Insert(index: Integer): TTMSFNCTreeViewFilterData;\r\nbegin\r\n Result := TTMSFNCTreeViewFilterData(inherited Insert(Index));\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewFilter.SetItem(Index: Integer; const Value: TTMSFNCTreeViewFilterData);\r\nbegin\r\n inherited SetItem(Index, Value);\r\nend;\r\n\r\n{$IFDEF WEBLIB}\r\nfunction TTMSFNCTreeViewCacheItemList.GetItem(Index: Integer): TTMSFNCTreeViewCacheItem;\r\nbegin\r\n Result := TTMSFNCTreeViewCacheItem(inherited Items[Index]);\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewCacheItemList.SetItem(Index: Integer; const Value: TTMSFNCTreeViewCacheItem);\r\nbegin\r\n inherited Items[Index] := Value;\r\nend;\r\n\r\nfunction TTMSFNCTreeViewIntegerList.GetItem(Index: Integer): Integer;\r\nbegin\r\n Result := Integer(inherited Items[Index]);\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewIntegerList.SetItem(Index: Integer; const Value: Integer);\r\nbegin\r\n inherited Items[Index] := Value;\r\nend;\r\n\r\nfunction TTMSFNCTreeViewNodeStructure.GetItem(Index: Integer): TTMSFNCTreeViewVirtualNode;\r\nbegin\r\n Result := TTMSFNCTreeViewVirtualNode(inherited Items[Index]);\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewNodeStructure.SetItem(Index: Integer; const Value: TTMSFNCTreeViewVirtualNode);\r\nbegin\r\n inherited Items[Index] := Value;\r\nend;\r\n\r\nfunction TTMSFNCTreeViewVisibleNodes.GetItem(Index: Integer): TTMSFNCTreeViewVirtualNode;\r\nbegin\r\n Result := TTMSFNCTreeViewVirtualNode(inherited Items[Index]);\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewVisibleNodes.SetItem(Index: Integer; const Value: TTMSFNCTreeViewVirtualNode);\r\nbegin\r\n inherited Items[Index] := Value;\r\nend;\r\n\r\nfunction TTMSFNCTreeViewDisplayGroups.GetItem(Index: Integer): TTMSFNCTreeViewDisplayGroup;\r\nbegin\r\n Result := TTMSFNCTreeViewDisplayGroup(inherited Items[Index]);\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewDisplayGroups.SetItem(Index: Integer; const Value: TTMSFNCTreeViewDisplayGroup);\r\nbegin\r\n inherited Items[Index] := Value;\r\nend;\r\n{$ENDIF}\r\n\r\nend.\r\n","{********************************************************************}\r\n{ }\r\n{ written by TMS Software }\r\n{ copyright (c) 2016 - 2024 }\r\n{ Email : info@tmssoftware.com }\r\n{ Web : https://www.tmssoftware.com }\r\n{ }\r\n{ The source code is given as is. The author is not responsible }\r\n{ for any possible damage done due to the use of this code. }\r\n{ The complete source code remains property of the author and may }\r\n{ not be distributed, published, given or sold in any form as such. }\r\n{ No parts of the source code can be included in any other component }\r\n{ or application without written authorization of the author. }\r\n{********************************************************************}\r\n\r\nunit WEBLib.TMSFNCPopup;\r\n\r\n{$I WEBLib.TMSFNCDefines.inc}\r\n\r\n{$IFDEF CMNLIB}\r\n{$DEFINE CMNWEBLIB}\r\n{$ENDIF}\r\n{$IFDEF WEBLIB}\r\n{$DEFINE CMNWEBLIB}\r\n{$DEFINE LCLWEBLIB}\r\n{$ENDIF}\r\n{$IFDEF LCLLIB}\r\n{$DEFINE LCLWEBLIB}\r\n{$ENDIF}\r\n\r\ninterface\r\n\r\nuses\r\n {$IFDEF MSWINDOWS}\r\n Windows,\r\n {$ENDIF}\r\n Classes, WEBLib.Controls, WEBLib.TMSFNCCustomComponent, WEBLib.TMSFNCGraphics, WEBLib.Graphics,\r\n WEBLib.TMSFNCTypes, WEBLib.TMSFNCGraphicsTypes, WEBLib.Forms, WEBLib.ExtCtrls\r\n {$IFNDEF LCLLIB}\r\n ,Types\r\n {$IFNDEF WEBLIB}\r\n {$HINTS OFF}\r\n {$IF COMPILERVERSION > 22}\r\n ,UITypes\r\n {$IFEND}\r\n {$HINTS ON}\r\n {$ENDIF}\r\n {$ENDIF}\r\n {$IFDEF WEBLIB}\r\n ,Web\r\n {$ENDIF}\r\n {$IFDEF FMXLIB}\r\n ,FMX.Types\r\n {$ENDIF}\r\n {$IFDEF VCLLIB}\r\n ,Messages\r\n {$ENDIF}\r\n {$IFDEF LCLLIB}\r\n {$IFNDEF MSWINDOWS}\r\n ,LMessages\r\n {$ENDIF}\r\n ,LCLType, LCLIntf\r\n {$ENDIF}\r\n ;\r\n\r\nconst\r\n MAJ_VER = 1; // Major version nr.\r\n MIN_VER = 0; // Minor version nr.\r\n REL_VER = 0; // Release nr.\r\n BLD_VER = 5; // Build nr.\r\n\r\n // version history\r\n // v1.0.0.0 : first release\r\n // v1.0.0.1 : Fixed: Issue with popup on Android\r\n // v1.0.0.2 : Fixed: Issue with multi-monitor screen detection\r\n // v1.0.0.3 : Fixed: Issue with multi-moniutor screen detection on LCL and VCL\r\n // v1.0.0.4 : Fixed: Issue with BeginScene error invoked when navigating away from the application\r\n // v1.0.0.5 : Fixed: Issue with retrieving parent in VCL\r\n\r\ntype\r\n TTMSFNCPopupPlacement = (ppBottom, ppTop, ppLeft, ppRight, ppCenter, ppBottomCenter, ppTopCenter, ppLeftCenter, ppRightCenter, ppAbsolute,\r\n ppMouse, ppMouseCenter, ppAboveMouse, ppAboveMouseCenter);\r\n\r\n TTMSFNCPopupPaint = procedure(Sender: TObject; AGraphics: TTMSFNCGraphics; ARect: TRectF) of object;\r\n\r\n TTMSFNCCustomPopupFormClass = class of TTMSFNCCustomPopupForm;\r\n\r\n TTMSFNCCustomPopup = class;\r\n\r\n TCustomPaintedForm = class(TCustomForm)\r\n {$IFDEF WEBLIB}\r\n private\r\n FPaintBox: TPaintBox;\r\n function GetCanvas: TCanvas;\r\n protected\r\n procedure DoPaint(Sender: TObject);\r\n procedure Paint; override;\r\n public\r\n procedure CreateCanvas;\r\n property Canvas: TCanvas read GetCanvas;\r\n {$ENDIF}\r\n end;\r\n\r\n TTMSFNCCustomPopupForm = class(TCustomPaintedForm)\r\n private\r\n FPreferedDisplayIndex: Integer;\r\n FHintWindow: Boolean;\r\n FTimer: TTimer;\r\n FFirstShow: Boolean;\r\n FOwner: TComponent;\r\n FShowModal: Boolean;\r\n FPlacement: TTMSFNCPopupPlacement;\r\n FRealPlacement: TTMSFNCPopupPlacement;\r\n FPlacementControl: TControl;\r\n FOffset: TPointF;\r\n FSize: TSizeF;\r\n FPlacementRectangle: TTMSFNCMargins;\r\n FScreenPlacementRect: TRectF;\r\n FPlacementChanged: Boolean;\r\n FDragWithParent: Boolean;\r\n FOnBeforeClose: TNotifyEvent;\r\n FOnBeforeShow: TNotifyEvent;\r\n FScreenContentRect: TRectF;\r\n FContentPadding: TTMSFNCMargins;\r\n FContentControl: TControl;\r\n FOnRealPlacementChanged: TNotifyEvent;\r\n FOnPopupPaint: TTMSFNCPopupPaint;\r\n procedure SetOffset(const Value: TPointF);\r\n procedure SetSize(const Value: TSizeF);\r\n procedure TimerProc(Sender: TObject);\r\n procedure SetPlacementRectangle(const Value: TTMSFNCMargins);\r\n procedure SetPlacement(const Value: TTMSFNCPopupPlacement);\r\n procedure SetPlacementControl(const Value: TControl);\r\n procedure SetDragWithParent(const Value: Boolean);\r\n procedure SetContentPadding(const Value: TTMSFNCMargins);\r\n procedure SetContentControl(const Value: TControl);\r\n function GetPopup: TTMSFNCCustomPopup;\r\n protected\r\n procedure DoBeforeShow; virtual;\r\n procedure DoBeforeClose; virtual;\r\n procedure UpdateBounds(LRect: TRectF); virtual;\r\n procedure DoClose(var CloseAction: TCloseAction); override;\r\n procedure DoApplyPlacement; virtual;\r\n procedure Loaded; override;\r\n procedure Updated; override;\r\n procedure HandleFocusedControl;\r\n function GetPopupParent: TControl;\r\n procedure Notification(AComponent: TComponent; Operation: TOperation); override;\r\n procedure DoRealPlacementChanged; virtual;\r\n property DragWithParent: Boolean read FDragWithParent write SetDragWithParent;\r\n property Popup: TTMSFNCCustomPopup read GetPopup;\r\n public\r\n {$IFDEF CMNWEBLIB}\r\n constructor CreateNew(AOwner: TComponent; Dummy: Integer = 0); override;\r\n {$ENDIF}\r\n {$IFDEF FMXLIB}\r\n constructor CreateNew(AOwner: TComponent; Dummy: NativeInt = 0); override;\r\n {$ENDIF}\r\n constructor Create(AOwner: TComponent; APlacementControl: TControl = nil); reintroduce;\r\n destructor Destroy; override;\r\n procedure ApplyPlacement; virtual;\r\n procedure KeyDown(var Key: Word; {$IFDEF FMXLIB}var KeyChar: WideChar;{$ENDIF} Shift: TShiftState); override;\r\n function CloseQuery: Boolean; override;\r\n property HintWindow: Boolean read FHintWindow write FHintWindow;\r\n property ContentControl: TControl read FContentControl write SetContentControl;\r\n property ContentPadding: TTMSFNCMargins read FContentPadding write SetContentPadding;\r\n property Offset: TPointF read FOffset write SetOffset;\r\n property Placement: TTMSFNCPopupPlacement read FPlacement write SetPlacement;\r\n property PlacementRectangle: TTMSFNCMargins read FPlacementRectangle write SetPlacementRectangle;\r\n property PlacementControl: TControl read FPlacementControl write SetPlacementControl;\r\n property RealPlacement: TTMSFNCPopupPlacement read FRealPlacement;\r\n property ScreenContentRect: TRectF read FScreenContentRect;\r\n property ScreenPlacementRect: TRectF read FScreenPlacementRect;\r\n property Size: TSizeF read FSize write SetSize;\r\n property OnBeforeShow: TNotifyEvent read FOnBeforeShow write FOnBeforeShow;\r\n property OnBeforeClose: TNotifyEvent read FOnBeforeClose write FOnBeforeClose;\r\n property OnRealPlacementChanged: TNotifyEvent read FOnRealPlacementChanged write FOnRealPlacementChanged;\r\n property OnPopupPaint: TTMSFNCPopupPaint read FOnPopupPaint write FOnPopupPaint;\r\n end;\r\n\r\n TTMSFNCCustomPopup = class(TTMSFNCCustomComponent)\r\n private\r\n FCloseTime: DWORD;\r\n FCheckTime: Boolean;\r\n FDestroyingPopup: Boolean;\r\n {$IFDEF FMXLIB}\r\n FPopup: TPopup;\r\n {$ENDIF}\r\n FOwner: TComponent;\r\n FCustomOwner: TComponent;\r\n FPlacementControl: TControl;\r\n FPopupForm: TTMSFNCCustomPopupForm;\r\n FStaysOpen: Boolean;\r\n FPlacement: TTMSFNCPopupPlacement;\r\n FPlacementRectangle: TTMSFNCMargins;\r\n FHorizontalOffset: Single;\r\n FVerticalOffset: Single;\r\n FDragWithParent: Boolean;\r\n FModalResult: TModalResult;\r\n FModal: Boolean;\r\n FOnClosePopup: TNotifyEvent;\r\n FOnPopup: TNotifyEvent;\r\n FPopupFormSize: TSizeF;\r\n FContentControl: TControl;\r\n FDropDownHeight: Single;\r\n FDropDownWidth: Single;\r\n FFocusable: Boolean;\r\n FFocusedControl: TControl;\r\n FOnPopupPaint: TTMSFNCPopupPaint;\r\n FOnPopupShown: TNotifyEvent;\r\n FIsOpen: Boolean;\r\n FFillColor: TTMSFNCGraphicsColor;\r\n FStrokeColor: TTMSFNCGraphicsColor;\r\n procedure SetIsOpen(const Value: Boolean);\r\n procedure SetPlacementRectangle(const Value: TTMSFNCMargins);\r\n procedure SetModalResult(const Value: TModalResult);\r\n procedure SetPlacementControl(const Value: TControl);\r\n procedure SetPlacement(const Value: TTMSFNCPopupPlacement);\r\n procedure SetDragWithParent(const Value: Boolean);\r\n procedure BeforeShowProc(Sender: TObject);\r\n procedure BeforeCloseProc(Sender: TObject);\r\n procedure CloseProc(Sender: TObject; var {%H-}CloseAction: TCloseAction);\r\n procedure ShowProc(Sender: TObject);\r\n procedure DeactivateProc(Sender: TObject);\r\n procedure SetPopupFormSize(const Value: TSizeF);\r\n procedure UpdatePopupSize;\r\n procedure SetContentControl(const Value: TControl);\r\n procedure SetDropDownHeight(const Value: Single);\r\n procedure SetDropDownWidth(const Value: Single);\r\n protected\r\n function GetInstance: NativeUInt; override;\r\n function GetDocURL: string; override;\r\n function GetVersion: String; override;\r\n {$IFDEF FNCLIB}\r\n procedure SetAdaptToStyle(const Value: Boolean); override;\r\n {$ENDIF}\r\n procedure ShowPopup(AModal: Boolean); virtual;\r\n procedure HandleFocusedControl;\r\n {$IFDEF FMXLIB}\r\n procedure FormPaint(Sender: TObject; Canvas: TCanvas; const ARect: TRectF);\r\n {$ENDIF}\r\n {$IFDEF CMNWEBLIB}\r\n procedure FormPaint(Sender: TObject);\r\n {$ENDIF}\r\n procedure DoPopupPaint(Sender: TObject; AGraphics: TTMSFNCGraphics; ARect: TRectF); virtual;\r\n procedure Notification(AComponent: TComponent; Operation: TOperation); override;\r\n procedure MarginsChanged(Sender: TObject);\r\n procedure DoClosePopup; virtual;\r\n procedure DoPopup; virtual;\r\n procedure DoPopupShown; virtual;\r\n procedure ClosePopup; virtual;\r\n procedure DoCreatePopup(const AShowModal: Boolean = False); virtual;\r\n procedure DestroyPopupForm; virtual;\r\n function GetPopupFormClass: TTMSFNCCustomPopupFormClass; virtual;\r\n function GetParent: TControl;\r\n function CreatePopupForm: TTMSFNCCustomPopupForm; virtual;\r\n property IsOpen: Boolean read FIsOpen write SetIsOpen;\r\n property ModalResult: TModalResult read FModalResult write SetModalResult;\r\n property PopupFormSize: TSizeF read FPopupFormSize write SetPopupFormSize;\r\n property DragWithParent: Boolean read FDragWithParent write SetDragWithParent default False;\r\n property PopupForm: TTMSFNCCustomPopupForm read FPopupForm;\r\n property StaysOpen: Boolean read FStaysOpen write FStaysOpen default False;\r\n property DropDownHeight: Single read FDropDownHeight write SetDropDownHeight;\r\n property DropDownWidth: Single read FDropDownWidth write SetDropDownWidth;\r\n property HorizontalOffset: Single read FHorizontalOffset write FHorizontalOffset;\r\n property Placement: TTMSFNCPopupPlacement read FPlacement write SetPlacement default ppBottom;\r\n property PlacementRectangle: TTMSFNCMargins read FPlacementRectangle write SetPlacementRectangle;\r\n property PlacementControl: TControl read FPlacementControl write SetPlacementControl;\r\n property VerticalOffset: Single read FVerticalOffset write FVerticalOffset;\r\n property FocusedControl: TControl read FFocusedControl write FFocusedControl;\r\n property ContentControl: TControl read FContentControl write SetContentControl;\r\n property OnClosePopup: TNotifyEvent read FOnClosePopup write FOnClosePopup;\r\n property OnPopupPaint: TTMSFNCPopupPaint read FOnPopupPaint write FOnPopupPaint;\r\n property OnPopup: TNotifyEvent read FOnPopup write FOnPopup;\r\n property CustomOwner: TComponent read FCustomOwner write FCustomOwner;\r\n property OnPopupShown: TNotifyEvent read FOnPopupShown write FOnPopupShown;\r\n property Version: String read GetVersion;\r\n public\r\n constructor Create(AOwner: TComponent); override;\r\n procedure Assign(Source: TPersistent); override;\r\n destructor Destroy; override;\r\n function HasPopupForm: Boolean;\r\n function PointInPopup(APoint: TPointF): Boolean; virtual;\r\n property FillColor: TTMSFNCGraphicsColor read FFillColor write FFillColor default gcNull;\r\n property StrokeColor: TTMSFNCGraphicsColor read FStrokeColor write FStrokeColor default gcNull;\r\n end;\r\n\r\n {$IFNDEF LCLLIB}\r\n [ComponentPlatformsAttribute(TMSPlatformsWeb)]\r\n {$ENDIF}\r\n TTMSFNCPopup = class(TTMSFNCCustomPopup)\r\n protected\r\n procedure RegisterRuntimeClasses; override;\r\n public\r\n function PopupModal: TModalResult; virtual;\r\n procedure Popup(const AShowModal: Boolean = False); virtual;\r\n property AdaptToStyle;\r\n property ModalResult;\r\n property IsOpen;\r\n property PopupFormSize;\r\n property DragWithParent;\r\n property PopupForm;\r\n published\r\n property StaysOpen;\r\n property DropDownHeight;\r\n property DropDownWidth;\r\n property HorizontalOffset;\r\n property Placement;\r\n property PlacementRectangle;\r\n property PlacementControl;\r\n property VerticalOffset;\r\n property FocusedControl;\r\n property ContentControl;\r\n property OnClosePopup;\r\n property OnPopupPaint;\r\n property OnPopup;\r\n property OnPopupShown;\r\n property Version;\r\n end;\r\n\r\n{$IFDEF CMNLIB}\r\n{$IFDEF MSWINDOWS}\r\ntype\r\n LInteger = LONG_PTR;\r\n IntPtr = Pointer;\r\n{$ENDIF}\r\n{$ENDIF}\r\n\r\ntype\r\n TTMSFNCCustomNonFocusablePopupForm = class(TTMSFNCCustomPopupForm)\r\n private\r\n {$IFDEF CMNLIB}\r\n {$IFDEF MSWINDOWS}\r\n procedure WMActivate(var Message: TWMActivate); message WM_ACTIVATE;\r\n procedure WMNCHitTest(var Message: TWMNCHitTest); message WM_NCHITTEST;\r\n {$ELSE}\r\n procedure WMActivate(var Message: TLMActivate); message LM_ACTIVATE;\r\n procedure WMNCHitTest(var Message: TLMessage); message LM_NCHITTEST;\r\n {$ENDIF}\r\n {$ENDIF}\r\n protected\r\n procedure UpdateBounds(LRect: TRectF); override;\r\n {$IFDEF CMNLIB}\r\n {$IFDEF MSWINDOWS}\r\n procedure CreateParams(var Params: TCreateParams); override;\r\n {$ENDIF}\r\n {$ENDIF}\r\n public\r\n {$IFDEF CMNLIB}\r\n {$IFDEF MSWINDOWS}\r\n constructor CreateNew(AOwner: TComponent; Dummy: Integer = 0); override;\r\n destructor Destroy; override;\r\n {$ENDIF}\r\n {$ENDIF}\r\n end;\r\n\r\n TTMSFNCCustomNonFocusablePopup = class(TTMSFNCCustomPopup)\r\n private\r\n {$IFDEF CMNLIB}\r\n FActiveWindow: HWND;\r\n {$ENDIF}\r\n protected\r\n procedure ActivatePreviousWindow; virtual;\r\n procedure ShowPopup({%H-}AModal: Boolean); override;\r\n function GetPopupFormClass: TTMSFNCCustomPopupFormClass; override;\r\n public\r\n constructor Create(AOwner: TComponent); override;\r\n destructor Destroy; override;\r\n end;\r\n\r\n TTMSFNCNonFocusablePopup = class(TTMSFNCCustomNonFocusablePopup)\r\n public\r\n procedure Deactivate; virtual;\r\n procedure Activate; virtual;\r\n published\r\n property ContentControl;\r\n property Placement;\r\n property PlacementRectangle;\r\n property PlacementControl;\r\n end;\r\n\r\nimplementation\r\n\r\nuses\r\n SysUtils, WEBLib.TMSFNCUtils, Math\r\n {$IFDEF FNCLIB}\r\n , WEBLib.TMSFNCStyles\r\n {$ENDIF} \r\n {$IFDEF FMXLIB}\r\n , FMX.Platform\r\n {$ENDIF}\r\n ;\r\n\r\n{$R TMSFNCPopup.res}\r\n\r\n{$IFDEF CMNLIB}\r\n{$IFDEF MSWINDOWS}\r\ntype\r\n WndProcRec = record\r\n FWindowHandle: HWND;\r\n FProc: LInteger;\r\n end;\r\n\r\nvar\r\n PrevWndProcs: array of WndProcRec;\r\n{$ENDIF}\r\n{$ENDIF}\r\n\r\nfunction GetTickCountX: DWORD;\r\nvar\r\n h, m, s, ms: Word;\r\nbegin\r\n DecodeTime(Now, h, m, s, ms);\r\n Result := ms + s * 1000 + m * 60 * 1000 + h * 60 * 60 * 1000;\r\nend;\r\n\r\n{ TTMSFNCPopup }\r\n\r\nconstructor TTMSFNCCustomPopup.Create(AOwner: TComponent);\r\nbegin\r\n inherited Create(AOwner);\r\n FOwner := AOwner;\r\n FPlacement := ppBottom;\r\n FFocusable := True;\r\n FStaysOpen := False;\r\n FPlacementRectangle := TTMSFNCMargins.Create;\r\n FPlacementRectangle.OnChange := @MarginsChanged;\r\n FFillColor := gcNull;\r\n FStrokeColor := gcNull;\r\nend;\r\n\r\ndestructor TTMSFNCCustomPopup.Destroy;\r\nbegin\r\n FContentControl := nil;\r\n ClosePopup;\r\n if HasPopupForm then\r\n begin\r\n FreeAndNil(FPopupForm);\r\n end;\r\n FreeAndNil(FPlacementRectangle);\r\n {$IFDEF FMXLIB}\r\n FreeAndNil(FPopup);\r\n {$ENDIF}\r\n inherited;\r\nend;\r\n\r\nprocedure TTMSFNCCustomPopup.DestroyPopupForm;\r\nbegin\r\n if Assigned(FPopupForm) then\r\n FPopupForm.Free;\r\nend;\r\n\r\nprocedure TTMSFNCCustomPopup.DeactivateProc(Sender: TObject);\r\n{$IFNDEF LCLWEBLIB}\r\nvar\r\n I: Integer;\r\n o: TComponent;\r\n f: TCustomForm;\r\n{$ENDIF}\r\nbegin\r\n if csDestroying in ComponentState then\r\n Exit;\r\n\r\n if Assigned(FPopupForm) and not FPopupForm.FShowModal and not StaysOpen then\r\n begin\r\n {$IFDEF FMXLIB}\r\n for I := 0 to Screen.FormCount - 1 do\r\n begin\r\n if (Screen.Forms[I] is TTMSFNCCustomPopupForm) then\r\n begin\r\n o := (Screen.Forms[I] as TTMSFNCCustomPopupForm).Popup.Owner;\r\n if Assigned(o) and (o is TControl) then\r\n begin\r\n f := TTMSFNCUtils.GetParentForm((o as TControl).Parent);\r\n\r\n if f = FPopupForm then\r\n Exit;\r\n end;\r\n end;\r\n end;\r\n\r\n {$ENDIF}\r\n {$IFDEF VCLLIB}\r\n for I := 0 to Screen.CustomFormCount - 1 do\r\n begin\r\n if (Screen.CustomForms[I] is TTMSFNCCustomPopupForm) then\r\n begin\r\n o := (Screen.CustomForms[I] as TTMSFNCCustomPopupForm).Popup.Owner;\r\n f := nil;\r\n if Assigned(o) and (o is TControl) then\r\n begin\r\n if o.HasParent then\r\n f := TTMSFNCUtils.GetParentForm((o as TControl).Parent)\r\n else if (o is TCustomForm) then\r\n f := TCustomForm(o);\r\n\r\n if f = FPopupForm then\r\n Exit;\r\n end;\r\n end;\r\n end;\r\n {$ENDIF}\r\n\r\n FPopupForm.Visible := False;\r\n FPopupForm.Close;\r\n FCloseTime := GetTickCountX;\r\n FCheckTime := True;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomPopup.HandleFocusedControl;\r\nvar\r\n frm: TCustomForm;\r\nbegin\r\n if Assigned(FPopupForm) and Assigned(FocusedControl) then\r\n begin\r\n if not FPopupForm.FShowModal then\r\n begin\r\n frm := TTMSFNCUtils.GetParentForm(FocusedControl);\r\n if Assigned(frm) and (frm <> FPopupForm) then\r\n begin\r\n {$IFDEF FMXLIB}\r\n frm.Activate;\r\n {$ENDIF}\r\n {$IFDEF CMNWEBLIB}\r\n frm.SetFocus;\r\n {$ENDIF}\r\n end;\r\n end;\r\n\r\n {$IFDEF FMXLIB}\r\n if FocusedControl.CanFocus then\r\n FocusedControl.SetFocus;\r\n {$ENDIF}\r\n {$IFDEF CMNLIB}\r\n if FocusedControl is TWinControl then\r\n begin\r\n if (FocusedControl as TWinControl).CanFocus then\r\n (FocusedControl as TWinControl).SetFocus;\r\n end;\r\n {$ENDIF}\r\n {$IFDEF WEBLIB}\r\n if FocusedControl is TControl then\r\n begin\r\n if (FocusedControl as TControl).CanFocus then\r\n (FocusedControl as TControl).SetFocus;\r\n end;\r\n {$ENDIF}\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCCustomPopup.HasPopupForm: Boolean;\r\nbegin\r\n Result := FPopupForm <> nil;\r\nend;\r\n\r\nprocedure TTMSFNCCustomPopup.MarginsChanged(Sender: TObject);\r\nbegin\r\n if (FPopupForm <> nil) then\r\n FPopupForm.PlacementRectangle := PlacementRectangle;\r\nend;\r\n\r\nfunction TTMSFNCCustomPopup.CreatePopupForm: TTMSFNCCustomPopupForm;\r\nvar\r\n NewForm: TTMSFNCCustomPopupForm;\r\n cls: TTMSFNCCustomPopupFormClass;\r\nbegin\r\n NewForm := nil;\r\n try\r\n cls := GetPopupFormClass;\r\n {$IFDEF FMXLIB}\r\n FPopup := TPopup.Create(Self);\r\n NewForm := cls.Create(FPopup, PlacementControl);\r\n {$ELSE}\r\n NewForm := cls.Create(Self, PlacementControl);\r\n {$ENDIF}\r\n except\r\n FreeAndNil(NewForm);\r\n Raise;\r\n end;\r\n Result := NewForm;\r\nend;\r\n\r\nprocedure TTMSFNCPopup.Popup(const AShowModal: Boolean = False);\r\nbegin\r\n DoCreatePopup(AShowModal);\r\nend;\r\n\r\nprocedure TTMSFNCCustomPopup.SetModalResult(const Value: TModalResult);\r\nbegin\r\n FModalResult := Value;\r\n if Assigned(FPopupForm) then\r\n FPopupForm.ModalResult := FModalResult;\r\nend;\r\n\r\nfunction TTMSFNCPopup.PopupModal: TModalResult;\r\nvar\r\n LStaysOpen : Boolean;\r\nbegin\r\n Result := 0;\r\n if FIsOpen then\r\n Exit;\r\n\r\n if HasPopupForm then\r\n FPopupForm.Close;\r\n\r\n LStaysOpen := FStaysOpen;\r\n try\r\n FStaysOpen := True;\r\n Popup(True);\r\n Result := FModalResult;\r\n IsOpen := False;\r\n finally\r\n FStaysOpen := LStaysOpen;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCPopup.RegisterRuntimeClasses;\r\nbegin\r\n inherited;\r\n RegisterClass(TTMSFNCPopup);\r\nend;\r\n\r\nprocedure TTMSFNCCustomPopup.ClosePopup;\r\nvar\r\n p: TControl;\r\nbegin\r\n if not HasPopupForm or FDestroyingPopup then\r\n Exit;\r\n\r\n FDestroyingPopup := True;\r\n if FModal and (FModalResult = 0) then\r\n begin\r\n ModalResult := mrCancel;\r\n Exit;\r\n end;\r\n\r\n FIsOpen := False;\r\n if Assigned(FContentControl) then\r\n begin\r\n p := GetParent;\r\n FContentControl.Visible := False;\r\n {$IFDEF FMXLIB}\r\n FContentControl.Parent := p;\r\n {$ENDIF}\r\n {$IFDEF CMNWEBLIB}\r\n if Assigned(p) and (p is TWinControl) then\r\n FContentControl.Parent := p as TWinControl\r\n else\r\n FContentControl.Parent := TTMSFNCUtils.GetParentForm(Self)\r\n {$ENDIF}\r\n end;\r\n\r\n if not (csDestroying in ComponentState) then\r\n begin\r\n if HasPopupForm then\r\n begin\r\n {$IFDEF FMXMOBILE}\r\n FPopupForm.Visible := False;\r\n {$ENDIF}\r\n if Self is TTMSFNCNonFocusablePopup then\r\n FPopupForm.Free;\r\n DoClosePopup;\r\n FPopupForm := nil;\r\n end;\r\n end;\r\n FDestroyingPopup := False;\r\nend;\r\n\r\nprocedure TTMSFNCCustomPopup.DoClosePopup;\r\nbegin\r\n if Assigned(FOnClosePopup) then\r\n FOnClosePopup(Self);\r\nend;\r\n\r\nprocedure TTMSFNCCustomPopup.DoCreatePopup(const AShowModal: Boolean = False);\r\n{$IFDEF FNCLIB}\r\nvar\r\n ia: ITMSFNCAdaptToStyle;\r\n{$ENDIF}\r\n{$IFNDEF FNCLIB}\r\n{$IFDEF VCLLIB}\r\nvar\r\n{$ENDIF}\r\n{$ENDIF}\r\n\r\n{$IFDEF VCLLIB}\r\n LPPI: Integer;\r\n\r\n function GetPPIForActiveForm: Integer;\r\n begin\r\n Result := Screen.PixelsPerInch;\r\n {$HINTS OFF}\r\n {$IF COMPILERVERSION >= 36}\r\n if (Screen.ActiveForm <> nil) and not (csDesigning in Screen.ActiveForm.ComponentState) then\r\n Result := Screen.ActiveForm.CurrentPPI\r\n else\r\n if Application.MainForm <> nil then\r\n Result := Application.MainForm.CurrentPPI;\r\n {$IFEND}\r\n {$HINTS ON}\r\n end;\r\n{$ENDIF}\r\n\r\nbegin\r\n if ((GetTickCountX - FCloseTime) < 200) and FCheckTime then\r\n begin\r\n FCheckTime := False;\r\n Exit;\r\n end;\r\n\r\n if FIsOpen then\r\n Exit;\r\n\r\n if HasPopupForm then\r\n FPopupForm.Close;\r\n\r\n FPopupForm := CreatePopupForm;\r\n try\r\n try\r\n {$IFDEF FMXLIB}\r\n {$IFDEF FMXMOBILE}\r\n if AShowModal then\r\n FPopupForm.FormStyle := TFormStyle.Normal;\r\n {$ENDIF}\r\n {$IFNDEF FMXMOBILE}\r\n {$IFDEF LINUX}\r\n FPopupForm.FormStyle := TFormStyle.Popup;\r\n {$ELSE}\r\n FPopupForm.FormStyle := TFormStyle.Normal;\r\n {$ENDIF}\r\n {$ENDIF}\r\n if Assigned(CustomOwner) and (CustomOwner is TFmxObject) then\r\n FPopupForm.Parent := (CustomOwner as TFmxObject)\r\n else if Assigned(Owner) and (Owner is TFmxObject) then\r\n FPopupForm.Parent := TFmxObject(Owner);\r\n {$ENDIF}\r\n\r\n {$IFDEF CMNWEBLIB}\r\n FPopupForm.FormStyle := fsStayOnTop;\r\n {$ENDIF}\r\n\r\n FPopupForm.OnPaint := FormPaint;\r\n FPopupForm.OnPopupPaint := DoPopupPaint;\r\n\r\n TComponent(FPopupForm).FreeNotification(Self);\r\n FPopupForm.Placement := Placement;\r\n FPopupForm.Offset := PointF(Self.HorizontalOffset, Self.VerticalOffset);\r\n FPopupForm.PlacementRectangle := Self.PlacementRectangle;\r\n FPopupForm.DragWithParent := DragWithParent;\r\n UpdatePopupSize;\r\n FPopupForm.OnDeactivate := DeactivateProc;\r\n FPopupForm.OnBeforeShow := BeforeShowProc;\r\n FPopupForm.OnBeforeClose := BeforeCloseProc;\r\n FPopupForm.OnClose := CloseProc;\r\n FPopupForm.OnShow := ShowProc;\r\n FPopupForm.FShowModal := AShowModal;\r\n\r\n {$IFDEF VCLLIB}\r\n LPPI := GetPPIForActiveForm;\r\n FPopupForm.ScaleForPPI(LPPI);\r\n {$HINTS OFF}\r\n {$IF COMPILERVERSION >= 36}\r\n FPopupForm.Font.IsDPIRelated := True;\r\n FPopupForm.Font.ScaleForDPI(LPPI);\r\n {$IFEND}\r\n {$HINTS ON}\r\n FPopupForm.Font.Assign(Screen.MessageFont);\r\n FPopupForm.Canvas.Font.Assign(FPopupForm.Font);\r\n {$ENDIF}\r\n\r\n FPopupForm.ContentControl := FContentControl;\r\n {$IFDEF FNCLIB}\r\n if Supports(FContentControl, ITMSFNCAdaptToStyle, ia) then\r\n ia.AdaptToStyle := AdaptToStyle;\r\n {$ENDIF}\r\n {$IFDEF FMXLIB}\r\n if Assigned(FContentControl) then\r\n FContentControl.Align := TAlignLayout.Client;\r\n {$ENDIF}\r\n {$IFDEF CMNWEBLIB}\r\n if Assigned(FContentControl) then\r\n FContentControl.Align := alClient;\r\n {$ENDIF}\r\n finally\r\n end;\r\n except\r\n FreeAndNil(FPopupForm);\r\n Raise;\r\n end;\r\n\r\n if (not (csDestroying in ComponentState)) then\r\n FPopupForm.DoBeforeShow;\r\n\r\n ShowPopup(AShowModal);\r\n {$IFDEF WEBLIB}\r\n if Assigned(OnPopupPaint) then\r\n FPopupForm.Paint;\r\n {$ENDIF}\r\nend;\r\n\r\nprocedure TTMSFNCCustomPopup.Notification(AComponent: TComponent; Operation: TOperation);\r\nbegin\r\n inherited;\r\n if Operation = opRemove then\r\n begin\r\n if AComponent = FContentControl then\r\n FContentControl := nil;\r\n\r\n if AComponent = FFocusedControl then\r\n FFocusedControl := nil;\r\n\r\n if (AComponent = FPopupForm) then\r\n FPopupForm := nil;\r\n if (AComponent = FPlacementControl) then\r\n begin\r\n FPlacementControl := nil;\r\n if HasPopupForm then\r\n FPopupForm.PlacementControl := nil;\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCCustomPopup.PointInPopup(APoint: TPointF): Boolean;\r\nbegin\r\n Result := False;\r\n if Assigned(FPopupForm) then\r\n Result := PtInRectEx(RectF(FPopupForm.Left, FPopupForm.Top, FPopupForm.Left + FPopupForm.Width, FPopupForm.Top + FPopupForm.Height), APoint);\r\nend;\r\n\r\nprocedure TTMSFNCCustomPopup.SetIsOpen(const Value: Boolean);\r\nvar\r\n b: Boolean;\r\nbegin\r\n if FIsOpen <> Value then\r\n begin\r\n b := False;\r\n {$IFDEF WEBLIB}\r\n asm\r\n b = (pas[\"WEBLib.Forms\"].VSIDE != null);\r\n end;\r\n {$ENDIF}\r\n\r\n if not b and (csDesigning in ComponentState) then\r\n begin\r\n FIsOpen := False;\r\n Exit;\r\n end;\r\n\r\n if Value then\r\n DoCreatePopup\r\n else\r\n begin\r\n if HasPopupForm then\r\n FPopupForm.Close\r\n else\r\n FIsOpen := Value;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomPopup.BeforeShowProc(Sender: TObject);\r\nbegin\r\n FIsOpen := True;\r\n DoPopup;\r\nend;\r\n\r\nprocedure TTMSFNCCustomPopup.UpdatePopupSize;\r\nvar\r\n LSize: TSizeF;\r\nbegin\r\n if FPopupForm <> nil then\r\n begin\r\n if (FPopupFormSize.cx > 0) then\r\n LSize.cx := FPopupFormSize.cx\r\n else\r\n LSize.cx := DropDownWidth;\r\n if (FPopupFormSize.cy > 0) then\r\n LSize.cy := FPopupFormSize.cy\r\n else\r\n LSize.cy := DropDownHeight;\r\n\r\n FPopupForm.Size := LSize;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomPopup.Assign(Source: TPersistent);\r\nbegin\r\n if Source is TTMSFNCCustomPopup then\r\n begin\r\n FModalResult := (Source as TTMSFNCCustomPopup).ModalResult;\r\n FPopupFormSize := (Source as TTMSFNCCustomPopup).PopupFormSize;\r\n FDragWithParent := (Source as TTMSFNCCustomPopup).DragWithParent;\r\n FStaysOpen := (Source as TTMSFNCCustomPopup).StaysOpen;\r\n FDropDownHeight := (Source as TTMSFNCCustomPopup).DropDownHeight;\r\n FDropDownWidth := (Source as TTMSFNCCustomPopup).DropDownWidth;\r\n FHorizontalOffset := (Source as TTMSFNCCustomPopup).HorizontalOffset;\r\n FPlacementControl := (Source as TTMSFNCCustomPopup).PlacementControl;\r\n FPlacement := (Source as TTMSFNCCustomPopup).Placement;\r\n FPlacementRectangle.Assign((Source as TTMSFNCCustomPopup).PlacementRectangle);\r\n FVerticalOffset := (Source as TTMSFNCCustomPopup).VerticalOffset;\r\n FFocusedControl := (Source as TTMSFNCCustomPopup).FocusedControl;\r\n FContentControl := (Source as TTMSFNCCustomPopup).ContentControl;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomPopup.BeforeCloseProc(Sender: TObject);\r\nbegin\r\n FIsOpen := False;\r\nend;\r\n\r\nprocedure TTMSFNCCustomPopup.CloseProc(Sender: TObject; var CloseAction: TCloseAction);\r\nbegin\r\n {$IFDEF FMXLIB}\r\n if Assigned(PopupForm) and (PopupForm.FormStyle = TFormStyle.Popup) then\r\n begin\r\n if not StaysOpen then\r\n ClosePopup\r\n {$IFNDEF LINUX}\r\n else\r\n CloseAction := TCloseAction.caNone;\r\n {$ENDIF}\r\n end\r\n else\r\n ClosePopup;\r\n {$ELSE}\r\n ClosePopup;\r\n {$ENDIF}\r\nend;\r\n\r\nprocedure TTMSFNCCustomPopup.DoPopup;\r\nbegin\r\n if Assigned(FOnPopup) then\r\n FOnPopup(Self);\r\nend;\r\n\r\nprocedure TTMSFNCCustomPopup.DoPopupPaint(Sender: TObject; AGraphics: TTMSFNCGraphics;\r\n ARect: TRectF);\r\nbegin\r\n if Assigned(OnPopupPaint) then\r\n OnPopupPaint(Self, AGraphics, ARect);\r\nend;\r\n\r\nprocedure TTMSFNCCustomPopup.DoPopupShown;\r\nbegin\r\n if Assigned(FOnPopupShown) then\r\n FOnPopupShown(Self);\r\nend;\r\n\r\n{$IFDEF FMXLIB}\r\nprocedure TTMSFNCCustomPopup.FormPaint(Sender: TObject; Canvas: TCanvas; const ARect: TRectF);\r\n{$ENDIF}\r\n{$IFDEF CMNWEBLIB}\r\nprocedure TTMSFNCCustomPopup.FormPaint(Sender: TObject);\r\n{$ENDIF}\r\nvar\r\n g: TTMSFNCGraphics;\r\n r: TRectF;\r\nbegin\r\n if Assigned(FPopupForm) then\r\n begin\r\n g := TTMSFNCGraphics.Create(FPopupForm.Canvas);\r\n g.BeginScene;\r\n try\r\n g.Fill.Kind := gfkSolid;\r\n g.Stroke.Kind := gskSolid;\r\n if (FillColor <> gcNull) and (StrokeColor <> gcNull) then\r\n begin\r\n g.Fill.Color := FillColor;\r\n g.Stroke.Color := StrokeColor;\r\n end\r\n else\r\n begin\r\n g.Fill.Color := TTMSFNCGraphics.DefaultPopupFillColor;\r\n g.Stroke.Color := TTMSFNCGraphics.DefaultPopupStrokeColor;\r\n end;\r\n\r\n r := RectF(0, 0, FPopupForm.Width, FPopupForm.Height);\r\n g.DrawRectangle(r);\r\n\r\n if Assigned(OnPopupPaint) then\r\n OnPopupPaint(Self, g, r);\r\n finally\r\n g.EndScene;\r\n g.Free;\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCCustomPopup.GetDocURL: string;\r\nbegin\r\n Result := 'https://download.tmssoftware.com/doc/tmsfncuipack/components/ttmsfncpopup';\r\nend;\r\n\r\nfunction TTMSFNCCustomPopup.GetInstance: NativeUInt;\r\nbegin\r\n Result := HInstance;\r\nend;\r\n\r\nfunction TTMSFNCCustomPopup.GetParent: TControl;\r\nbegin\r\n Result := PlacementControl;\r\n if not Assigned(Result) and (FOwner is TControl) then\r\n Result := FOwner as TControl;\r\nend;\r\n\r\nfunction TTMSFNCCustomPopup.GetPopupFormClass: TTMSFNCCustomPopupFormClass;\r\nbegin\r\n Result := TTMSFNCCustomPopupForm;\r\nend;\r\n\r\nfunction TTMSFNCCustomPopup.GetVersion: String;\r\nbegin\r\n Result := GetVersionNumber(MAJ_VER, MIN_VER, REL_VER, BLD_VER);\r\nend;\r\n\r\nprocedure TTMSFNCCustomPopup.SetPlacement(const Value: TTMSFNCPopupPlacement);\r\nbegin\r\n if FPlacement <> Value then\r\n begin\r\n FPlacement := Value;\r\n if HasPopupForm then\r\n PopupForm.Placement := FPlacement;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomPopup.SetPlacementRectangle(const Value: TTMSFNCMargins);\r\nbegin\r\n FPlacementRectangle.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCCustomPopup.SetPlacementControl(const Value: TControl);\r\nbegin\r\n if FPlacementControl <> Value then\r\n begin\r\n if FPlacementControl <> nil then\r\n FPlacementControl.RemoveFreeNotification(self);\r\n FPlacementControl := Value;\r\n if HasPopupForm then\r\n FPopupForm.PlacementControl := FPlacementControl;\r\n if FPlacementControl <> nil then\r\n FPlacementControl.FreeNotification(self);\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomPopup.SetPopupFormSize(const Value: TSizeF);\r\nbegin\r\n if (FPopupFormSize.cx <> Value.cx) or (FPopupFormSize.cy <> Value.cy) then\r\n begin\r\n FPopupFormSize := Value;\r\n UpdatePopupSize;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomPopup.ShowPopup(AModal: Boolean);\r\nbegin\r\n if AModal then\r\n FModalResult := FPopupForm.ShowModal\r\n else\r\n begin\r\n FPopupForm.Show;\r\n {$IFDEF CMNLIB}\r\n {$IFNDEF MSWINDOWS}\r\n BorderStyle := bsNone;\r\n BorderStyle := bsSingle;\r\n {$ENDIF}\r\n {$ENDIF}\r\n HandleFocusedControl;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomPopup.ShowProc(Sender: TObject);\r\nbegin\r\n if Assigned(FPopupForm) and FPopupForm.FShowModal then\r\n HandleFocusedControl;\r\n\r\n DoPopupShown;\r\nend;\r\n\r\n{$IFDEF FNCLIB}\r\nprocedure TTMSFNCCustomPopup.SetAdaptToStyle(const Value: Boolean);\r\nvar\r\n ia: ITMSFNCAdaptToStyle;\r\nbegin\r\n inherited;\r\n if Assigned(ContentControl) then\r\n begin\r\n if Supports(ContentControl, ITMSFNCAdaptToStyle, ia) then\r\n ia.AdaptToStyle := AdaptToStyle;\r\n end;\r\nend;\r\n{$ENDIF}\r\n\r\nprocedure TTMSFNCCustomPopup.SetContentControl(const Value: TControl);\r\nbegin\r\n if Value = nil then\r\n begin\r\n if Assigned(FContentControl) then\r\n FContentControl.Visible := True;\r\n end;\r\n\r\n FContentControl := Value;\r\n if Assigned(FContentControl) then\r\n begin\r\n FContentControl.Visible := False;\r\n DropDownWidth := FContentControl.Width;\r\n DropDownHeight := FContentControl.Height;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomPopup.SetDragWithParent(const Value: Boolean);\r\nbegin\r\n if FDragWithParent <> Value then\r\n begin\r\n FDragWithParent := Value;\r\n if HasPopupForm then\r\n FPopupForm.DragWithParent := FDragWithParent;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomPopup.SetDropDownHeight(const Value: Single);\r\nbegin\r\n if FDropDownHeight <> Value then\r\n begin\r\n FDropDownHeight := Value;\r\n if Assigned(PopupForm) then\r\n PopupForm.Height := Round(Value);\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomPopup.SetDropDownWidth(const Value: Single);\r\nbegin\r\n if FDropDownWidth <> Value then\r\n begin\r\n FDropDownWidth := Value;\r\n if Assigned(PopupForm) then\r\n PopupForm.Width := Round(Value);\r\n end;\r\nend;\r\n\r\n{$IFDEF WEBLIB}\r\n\r\n{ TCustomPaintedForm }\r\n\r\nprocedure TCustomPaintedForm.DoPaint(Sender: TObject);\r\nbegin\r\n Paint;\r\nend;\r\n\r\nprocedure TCustomPaintedForm.Paint;\r\nbegin\r\n inherited;\r\n if Assigned(OnPaint) then\r\n OnPaint(Self);\r\nend;\r\n\r\nprocedure TCustomPaintedForm.CreateCanvas;\r\nbegin\r\n if not Assigned(FPaintBox) then\r\n begin\r\n FPaintBox := TPaintBox.Create(Self);\r\n FPaintBox.Parent := Self;\r\n FPaintBox.Align := alClient;\r\n FPaintBox.OnPaint := DoPaint;\r\n end;\r\nend;\r\n\r\nfunction TCustomPaintedForm.GetCanvas: TCanvas;\r\nbegin\r\n CreateCanvas;\r\n Result := FPaintBox.Canvas;\r\nend;\r\n\r\n{$ENDIF}\r\n\r\n{ TTMSFNCCustomPopupForm }\r\n\r\nconstructor TTMSFNCCustomPopupForm.Create(AOwner: TComponent; APlacementControl: TControl = nil);\r\nbegin\r\n CreateNew(AOwner);\r\n try\r\n if APlacementControl <> nil then\r\n FPlacementControl := APlacementControl;\r\n if FPlacementControl <> nil then\r\n TComponent(FPlacementControl).FreeNotification(Self);\r\n finally\r\n end;\r\nend;\r\n\r\n{$IFDEF CMNWEBLIB}\r\nconstructor TTMSFNCCustomPopupForm.CreateNew(AOwner: TComponent; Dummy: Integer);\r\n{$ENDIF}\r\n{$IFDEF FMXLIB}\r\nconstructor TTMSFNCCustomPopupForm.CreateNew(AOwner: TComponent; Dummy: NativeInt);\r\n{$ENDIF}\r\n function FindUniqueFormName(const Name: string): string;\r\n var\r\n I: Integer;\r\n begin\r\n I := 0;\r\n Result := Name;\r\n while (FindGlobalComponent(Result) <> nil) or\r\n ((AOwner <> nil) and (AOwner.FindComponent(Result) <> nil)) do\r\n begin\r\n Inc(I);\r\n Result := Format('%s_%d', [Name, I]);\r\n end;\r\n end;\r\nbegin\r\n Name := FindUniqueFormName('CustomPopupForm');\r\n inherited;\r\n FPreferedDisplayIndex := -1;\r\n FOwner := AOwner;\r\n FDragWithParent := True;\r\n FPlacementRectangle := TTMSFNCMargins.Create;\r\n FContentPadding := TTMSFNCMargins.Create;\r\n FSize.cx := 320;\r\n FSize.cy := 200;\r\n FPlacement := ppBottom;\r\n FRealPlacement := FPlacement;\r\n Visible := False;\r\n try\r\n {$IFDEF FMXLIB}\r\n BeginUpdate;\r\n {$IFDEF FMXMOBILE}\r\n if Assigned(FOwner) and (FOwner is TPopup) and ((FOwner as TPopup).Owner is TTMSFNCCustomPopup) then\r\n if not ((FOwner as TPopup).Owner as TTMSFNCCustomPopup).StaysOpen then\r\n {$ENDIF}\r\n FormStyle := TFormStyle.Popup;\r\n\r\n Position := TFormPosition.Designed;\r\n BorderStyle := TFmxFormBorderStyle.None;\r\n {$ENDIF}\r\n {$IFDEF CMNLIB}\r\n KeyPreview := True;\r\n Position := poDesigned;\r\n BorderStyle := bsNone;\r\n BorderIcons := [];\r\n {$IFDEF VCLLIB}\r\n Ctl3D := False;\r\n {$ENDIF}\r\n {$ENDIF}\r\n {$IFDEF WEBLIB}\r\n Border := fbNone;\r\n Position := poDesigned;\r\n {$ENDIF}\r\n finally\r\n {$IFDEF FMXLIB}\r\n EndUpdate;\r\n {$ENDIF}\r\n end;\r\nend;\r\n\r\ndestructor TTMSFNCCustomPopupForm.Destroy;\r\nbegin\r\n FreeAndNil(FTimer);\r\n if FPlacementControl <> nil then\r\n begin\r\n TComponent(FPlacementControl).RemoveFreeNotification(Self);\r\n FPlacementControl := nil;\r\n end;\r\n FreeAndNil(FContentPadding);\r\n FreeAndNil(FPlacementRectangle);\r\n inherited;\r\nend;\r\n\r\nprocedure TTMSFNCCustomPopupForm.DoClose(var CloseAction: TCloseAction);\r\nbegin\r\n {$IFNDEF FMXLIB}\r\n CloseAction := TCloseAction.caFree;\r\n {$ENDIF}\r\n inherited;\r\n if CloseAction <> TCloseAction.caNone then\r\n begin\r\n if Assigned(FTimer) then\r\n FTimer.Enabled := False;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomPopupForm.DoRealPlacementChanged;\r\nbegin\r\n if Assigned(FOnRealPlacementChanged) then\r\n FOnRealPlacementChanged(Self);\r\nend;\r\n\r\nprocedure TTMSFNCCustomPopupForm.KeyDown(var Key: Word; {$IFDEF FMXLIB}var KeyChar: WideChar;{$ENDIF} Shift: TShiftState);\r\nbegin\r\n inherited;\r\n if Shift <> [] then\r\n Exit;\r\n\r\n case Key of\r\n KEY_ESCAPE, KEY_F4: Close;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCCustomPopupForm.GetPopup: TTMSFNCCustomPopup;\r\n{$IFDEF FMXLIB}\r\nvar\r\n p: TPopup;\r\n{$ENDIF}\r\nbegin\r\n Result := nil;\r\n if FOwner is TTMSFNCCustomPopup then\r\n Result := FOwner as TTMSFNCCustomPopup\r\n {$IFDEF FMXLIB}\r\n else if FOwner is TPopup then\r\n begin\r\n p := FOwner as TPopup;\r\n if p.Owner is TTMSFNCCustomPopup then\r\n Result := p.Owner as TTMSFNCCustomPopup;\r\n end;\r\n {$ENDIF}\r\nend;\r\n\r\nfunction TTMSFNCCustomPopupForm.GetPopupParent: TControl;\r\nbegin\r\n Result := nil;\r\n if Assigned(FOwner) and (FOwner is TTMSFNCCustomPopup) then\r\n Result := (FOwner as TTMSFNCCustomPopup).GetParent;\r\nend;\r\n\r\nprocedure TTMSFNCCustomPopupForm.HandleFocusedControl;\r\nbegin\r\n if Assigned(Popup) then\r\n Popup.HandleFocusedControl;\r\nend;\r\n\r\nfunction TTMSFNCCustomPopupForm.CloseQuery: Boolean;\r\nbegin\r\n Result := inherited CloseQuery;\r\n if Result and (not (csDestroying in ComponentState)) then\r\n DoBeforeClose;\r\nend;\r\n\r\nprocedure TTMSFNCCustomPopupForm.Notification(AComponent: TComponent; Operation: TOperation);\r\nbegin\r\n inherited;\r\n if Operation = opRemove then\r\n begin\r\n if AComponent = FPlacementControl then\r\n begin\r\n FPlacementControl := nil;\r\n ApplyPlacement;\r\n end;\r\n if AComponent = FContentControl then\r\n FContentControl := nil;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomPopupForm.SetDragWithParent(const Value: Boolean);\r\nbegin\r\n FDragWithParent := Value;\r\nend;\r\n\r\ntype\r\n TDPIControlProtected = class(TControl);\r\n\r\nprocedure TTMSFNCCustomPopupForm.SetContentControl(const Value: TControl);\r\nbegin\r\n if FContentControl <> Value then\r\n begin\r\n if FContentControl <> nil then\r\n TComponent(FContentControl).RemoveFreeNotification(Self);\r\n FContentControl := Value;\r\n if FContentControl <> nil then\r\n begin\r\n TComponent(FContentControl).FreeNotification(Self);\r\n try\r\n FContentControl.Parent := Self;\r\n {$IFDEF FMXLIB}\r\n FContentControl.Align := TAlignLayout.None;\r\n {$ENDIF}\r\n {$IFDEF CMNWEBLIB}\r\n FContentControl.Align := alNone;\r\n {$ENDIF}\r\n FContentControl.Visible := True;\r\n finally\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomPopupForm.SetContentPadding(const Value: TTMSFNCMargins);\r\nbegin\r\n FContentPadding.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCCustomPopupForm.SetOffset(const Value: TPointF);\r\nbegin\r\n if (FOffset.X <> Value.X) or (FOffset.Y <> Value.Y) then\r\n begin\r\n FOffset := Value;\r\n ApplyPlacement;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomPopupForm.SetPlacement(const Value: TTMSFNCPopupPlacement);\r\nbegin\r\n if FPlacement <> Value then\r\n begin\r\n FPlacement := Value;\r\n ApplyPlacement;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomPopupForm.SetPlacementRectangle(const Value: TTMSFNCMargins);\r\nbegin\r\n FPlacementRectangle.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCCustomPopupForm.SetPlacementControl(const Value: TControl);\r\nbegin\r\n if FPlacementControl <> Value then\r\n begin\r\n if FPlacementControl <> nil then\r\n TComponent(FPlacementControl).RemoveFreeNotification(self);\r\n FPlacementControl := Value;\r\n if FPlacementControl <> nil then\r\n TComponent(FPlacementControl).FreeNotification(Self);\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomPopupForm.SetSize(const Value: TSizeF);\r\nbegin\r\n if (FSize.cx <> Value.cx) or (FSize.cy <> Value.cy) then\r\n begin\r\n FSize := Value;\r\n ApplyPlacement;\r\n end;\r\nend;\r\n\r\n\r\nprocedure TTMSFNCCustomPopupForm.Loaded;\r\nbegin\r\n inherited;\r\n if FPlacementChanged then\r\n ApplyPlacement;\r\nend;\r\n\r\nprocedure TTMSFNCCustomPopupForm.UpdateBounds(LRect: TRectF);\r\nbegin\r\n SetBounds(Round(LRect.Left), Round(LRect.Top), Round(LRect.Right - LRect.Left), Round(LRect.Bottom - LRect.Top));\r\nend;\r\n\r\nprocedure TTMSFNCCustomPopupForm.Updated;\r\nbegin\r\n inherited;\r\n if FPlacementChanged then\r\n ApplyPlacement;\r\nend;\r\n\r\nprocedure TTMSFNCCustomPopupForm.DoApplyPlacement;\r\nvar\r\n Pos: TPointF;\r\n {$IFDEF FMXLIB}\r\n AbsolutePos: TPointF;\r\n MouseSvc: IFMXMouseService;\r\n {$ENDIF}\r\n {$IFDEF CMNWEBLIB}\r\n pt, AbsolutePos: TPoint;\r\n {$ENDIF}\r\n LRect: TRectF;\r\n LPlacement: TTMSFNCPopupPlacement;\r\n LOffset: TPointF;\r\n LStep: Byte;\r\n LSoGood: Boolean;\r\n SourceSize: TSizeF;\r\n PlacementByTarget: Boolean;\r\n function UpdateRectByScreen(var R: TRectF; cs: TComponentState): Boolean;\r\n var\r\n WorkareaRect: TRect;\r\n WorkareaRectF: TRectF;\r\n W, H: Single;\r\n {$IFDEF FMXLIB}\r\n P: TPointF;\r\n {$ENDIF}\r\n {$IFNDEF FMXLIB}\r\n P: TPoint;\r\n {$ENDIF}\r\n begin\r\n Result := True;\r\n R.Left := Round(R.Left);\r\n R.Top := Round(R.Top);\r\n R.Right := Round(R.Right);\r\n R.Bottom := Round(R.Bottom);\r\n {$IFDEF FMXLIB}\r\n {$HINTS OFF}\r\n {$IF COMPILERVERSION > 27}\r\n case LPlacement of\r\n ppAbsolute:\r\n WorkareaRect := ConvertToRect(Screen.DisplayFromRect(R).WorkareaRect);\r\n ppMouse, ppMouseCenter, ppAboveMouse, ppAboveMouseCenter:\r\n WorkareaRect := ConvertToRect(Screen.DisplayFromPoint(Screen.MousePos).WorkareaRect)\r\n else\r\n if not InRange(FPreferedDisplayIndex, 0, Screen.DisplayCount - 1) then\r\n begin\r\n if (PlacementControl <> nil) and (PlacementControl.Root is TCommonCustomForm) and\r\n TCommonCustomForm(PlacementControl.Root).Visible then\r\n begin\r\n P := PointF(PlacementControl.Width / 2, PlacementControl.Height / 2);\r\n P := PlacementControl.LocalToAbsolute(P);\r\n FPreferedDisplayIndex := Screen.DisplayFromForm(TCommonCustomForm(PlacementControl.Root), P).Index;\r\n end\r\n else\r\n FPreferedDisplayIndex := Screen.DisplayFromForm(Self).Index;\r\n end;\r\n WorkareaRect := ConvertToRect(Screen.Displays[FPreferedDisplayIndex].WorkareaRect);\r\n end;\r\n {$ELSE}\r\n WorkareaRect := Rect(0, 0, Screen.Size.Width, Screen.Size.Height);\r\n {$IFEND}\r\n {$HINTS ON}\r\n {$ENDIF}\r\n {$IFDEF WEBLIB}\r\n WorkareaRect.Left := 0;\r\n WorkareaRect.Top := 0;\r\n WorkareaRect.Right := WinWidth;\r\n WorkareaRect.Bottom := WinHeight;\r\n {$ENDIF}\r\n {$IFDEF CMNLIB}\r\n case LPlacement of\r\n ppAbsolute:\r\n WorkareaRect := Screen.MonitorFromRect(ConvertToRect(R)).WorkareaRect;\r\n ppMouse, ppMouseCenter, ppAboveMouse, ppAboveMouseCenter:\r\n WorkareaRect := Screen.MonitorFromPoint(ConvertToPoint(TTMSFNCUtils.GetMousePos)).WorkareaRect\r\n else\r\n if not InRange(FPreferedDisplayIndex, 0, Screen.MonitorCount - 1) then\r\n begin\r\n if (PlacementControl <> nil) and (TTMSFNCUtils.GetParentForm(PlacementControl) is TCustomForm) and\r\n TCustomForm(TTMSFNCUtils.GetParentForm(PlacementControl)).Visible then\r\n begin\r\n P := Point(PlacementControl.Width div 2, PlacementControl.Height div 2);\r\n P := PlacementControl.ClientToScreen(P);\r\n FPreferedDisplayIndex := Screen.MonitorFromWindow(TTMSFNCUtils.GetParentForm(PlacementControl).Handle).MonitorNum;\r\n end\r\n else\r\n FPreferedDisplayIndex := Screen.MonitorFromWindow(Self.Handle).MonitorNum;\r\n end;\r\n WorkareaRect := Screen.Monitors[FPreferedDisplayIndex].WorkareaRect;\r\n end;\r\n {$ENDIF}\r\n WorkareaRectF := RectF(WorkareaRect.Left - ContentPadding.Left, WorkareaRect.Top - ContentPadding.Top,\r\n WorkareaRect.Right + ContentPadding.Right, WorkareaRect.Bottom + ContentPadding.Bottom);\r\n if not (csDesigning in cs) then\r\n begin\r\n W := R.Right - R.Left;\r\n H := R.Bottom - R.Top;\r\n if R.Left > WorkareaRectF.Left then\r\n begin\r\n if R.Left > WorkareaRectF.Right - W then\r\n begin\r\n R.Left := WorkareaRectF.Right - W;\r\n if LPlacement = ppRight then\r\n begin\r\n LPlacement := ppLeft;\r\n Result := False;\r\n end;\r\n if LPlacement = ppRightCenter then\r\n begin\r\n LPlacement := ppLeftCenter;\r\n Result := False;\r\n end;\r\n end;\r\n end\r\n else\r\n begin\r\n R.Left := WorkareaRectF.Left;\r\n if LPlacement = ppLeft then\r\n begin\r\n LPlacement := ppRight;\r\n Result := False;\r\n end;\r\n if LPlacement = ppLeftCenter then\r\n begin\r\n LPlacement := ppRightCenter;\r\n Result := False;\r\n end;\r\n end;\r\n if R.Top > WorkareaRectF.Top then\r\n begin\r\n if R.Top > WorkareaRectF.Bottom - H then\r\n begin\r\n R.Top := WorkareaRectF.Bottom - H;\r\n if LPlacement = ppBottom then\r\n begin\r\n LPlacement := ppTop;\r\n Result := False;\r\n end;\r\n if LPlacement = ppBottomCenter then\r\n begin\r\n LPlacement := ppTopCenter;\r\n Result := False;\r\n end;\r\n end;\r\n end\r\n else\r\n begin\r\n R.Top := WorkareaRectF.Top;\r\n if LPlacement = ppTop then\r\n begin\r\n LPlacement := ppBottom;\r\n Result := False;\r\n end;\r\n if LPlacement = ppTopCenter then\r\n begin\r\n LPlacement := ppBottomCenter;\r\n Result := False;\r\n end;\r\n end;\r\n R.Right := R.Left + W;\r\n R.Bottom := R.Top + H;\r\n end;\r\n end;\r\nbegin\r\n FPlacementChanged := False;\r\n LOffset := Offset;\r\n LPlacement := Placement;\r\n LStep := 0;\r\n repeat\r\n LRect := RectF(FPlacementRectangle.Left, FPlacementRectangle.Top, FPlacementRectangle.Right, FPlacementRectangle.Bottom);\r\n if (PlacementControl <> nil) and FPlacementRectangle.Empty then\r\n LRect := RectF(0, 0, PlacementControl.Width, PlacementControl.Height);\r\n if (PlacementControl = nil) and PlacementRectangle.Empty and\r\n (not (LPlacement in [ppAbsolute, ppMouse, ppMouseCenter, ppAboveMouse, ppAboveMouseCenter])) then\r\n begin\r\n {$IFDEF FMXLIB}\r\n if not TPlatformServices.Current.SupportsPlatformService(IFMXMouseService, IInterface(MouseSvc)) then\r\n LPlacement := ppAbsolute\r\n else\r\n LPlacement := ppMouse;\r\n {$ENDIF}\r\n end;\r\n FScreenPlacementRect := LRect;\r\n // Vertical Offset\r\n if LPlacement in [ppTop, ppTopCenter] then\r\n OffsetRectEx(LRect, 0, ContentPadding.Bottom - LOffset.Y)\r\n else\r\n OffsetRectEx(LRect, 0, LOffset.Y - ContentPadding.Top);\r\n // Horizontal Offset\r\n if LPlacement in [ppLeft, ppLeftCenter] then\r\n OffsetRectEx(LRect, ContentPadding.Right - LOffset.X, 0)\r\n else\r\n OffsetRectEx(LRect, LOffset.X - ContentPadding.Left, 0);\r\n // Offset by rect\r\n PlacementByTarget := not (LPlacement in [ppAbsolute, ppMouse, ppMouseCenter, ppAboveMouse, ppAboveMouseCenter]);\r\n SourceSize := Size;\r\n\r\n case LPlacement of\r\n ppBottom:\r\n OffsetRectEx(LRect, 0, (LRect.Bottom - LRect.Top));\r\n ppTop:\r\n OffsetRectEx(LRect, 0, -SourceSize.cy);\r\n ppLeft:\r\n OffsetRectEx(LRect, -SourceSize.cx, 0);\r\n ppRight:\r\n OffsetRectEx(LRect, (LRect.Right - LRect.Top), 0);\r\n ppCenter:\r\n OffsetRectEx(LRect, ((LRect.Right - LRect.Top) - SourceSize.cx) / 2, ((LRect.Bottom - LRect.Top) - SourceSize.cy) / 2);\r\n ppBottomCenter:\r\n OffsetRectEx(LRect, ((LRect.Right - LRect.Top) - SourceSize.cx) / 2, (LRect.Bottom - LRect.Top));\r\n ppTopCenter:\r\n OffsetRectEx(LRect, ((LRect.Right - LRect.Top) - SourceSize.cx) / 2, -SourceSize.cy);\r\n ppLeftCenter:\r\n OffsetRectEx(LRect, -SourceSize.cx, ((LRect.Bottom - LRect.Top) - SourceSize.cy) / 2);\r\n ppRightCenter:\r\n OffsetRectEx(LRect, (LRect.Right - LRect.Top), ((LRect.Bottom - LRect.Top) - SourceSize.cy) / 2);\r\n ppAbsolute:\r\n begin\r\n if FPlacementRectangle.Empty then\r\n LRect := RectF(FPlacementRectangle.Rect.Left, FPlacementRectangle.Rect.Top, FPlacementRectangle.Rect.Left + SourceSize.cx, FPlacementRectangle.Rect.Top + SourceSize.cy)\r\n else\r\n LRect := FPlacementRectangle.Rect;\r\n end;\r\n ppMouse, ppMouseCenter, ppAboveMouse, ppAboveMouseCenter:\r\n begin\r\n Pos := TTMSFNCUtils.GetMousePos;\r\n LRect := RectF(Pos.X, Pos.Y, Pos.X + SourceSize.cx, Pos.Y + SourceSize.cy);\r\n if LPlacement = ppMouseCenter then\r\n OffsetRectEx(LRect, -SourceSize.cx / 2, -SourceSize.cy / 2);\r\n if LPlacement = ppAboveMouseCenter then\r\n OffsetRectEx(LRect, -SourceSize.cx / 2, -SourceSize.cy - 5);\r\n if LPlacement = ppAboveMouse then\r\n OffsetRectEx(LRect, 0, -SourceSize.cy - 5);\r\n end;\r\n end;\r\n // use border\r\n if PlacementByTarget then\r\n begin\r\n {$IFDEF FMXLIB}\r\n AbsolutePos := PointF(LRect.Left, LRect.Top);\r\n {$ENDIF}\r\n {$IFDEF CMNWEBLIB}\r\n AbsolutePos := Point(Round(LRect.Left), Round(LRect.Top));\r\n {$ENDIF}\r\n if PlacementControl <> nil then\r\n begin\r\n {$IFDEF FMXLIB}\r\n AbsolutePos := PlacementControl.LocalToAbsolute(AbsolutePos);\r\n FScreenPlacementRect.TopLeft := PlacementControl.LocalToAbsolute(FScreenPlacementRect.TopLeft);\r\n FScreenPlacementRect.BottomRight := PlacementControl.LocalToAbsolute(FScreenPlacementRect.BottomRight);\r\n if PlacementControl.Scene <> nil then\r\n begin\r\n AbsolutePos := PlacementControl.Scene.LocalToScreen(AbsolutePos);\r\n FScreenPlacementRect.TopLeft := PlacementControl.Scene.LocalToScreen(FScreenPlacementRect.TopLeft);\r\n FScreenPlacementRect.BottomRight := PlacementControl.Scene.LocalToScreen(FScreenPlacementRect.BottomRight);\r\n end;\r\n {$ENDIF}\r\n {$IFDEF CMNWEBLIB}\r\n AbsolutePos := PlacementControl.ClientToScreen(AbsolutePos);\r\n pt := Point(Round(FScreenPlacementRect.Left), Round(FScreenPlacementRect.Top));\r\n pt := PlacementControl.ClientToScreen(pt);\r\n FScreenPlacementRect.Left := pt.X;\r\n FScreenPlacementRect.Top := pt.Y;\r\n pt := Point(Round(FScreenPlacementRect.Right), Round(FScreenPlacementRect.Bottom));\r\n pt := PlacementControl.ClientToScreen(pt);\r\n FScreenPlacementRect.Right := pt.X;\r\n FScreenPlacementRect.Bottom := pt.Y;\r\n {$ENDIF}\r\n end;\r\n LRect := RectF(AbsolutePos.X, AbsolutePos.Y, AbsolutePos.X + Size.cx, AbsolutePos.Y + Size.cy);\r\n end;\r\n LSoGood := UpdateRectByScreen(LRect, ComponentState);\r\n Inc(LStep);\r\n until LSoGood or (LStep > 1);\r\n FScreenContentRect := LRect;\r\n FScreenContentRect := RectF(FScreenContentRect.Left + FContentPadding.Left, FScreenContentRect.Top + FContentPadding.Top, FScreenContentRect.Right - FContentPadding.Right, FScreenContentRect.Bottom - FContentPadding.Bottom);\r\n FRealPlacement := LPlacement;\r\n UpdateBounds(LRect);\r\nend;\r\n\r\nprocedure TTMSFNCCustomPopupForm.DoBeforeClose;\r\nbegin\r\n if Assigned(OnBeforeClose) then\r\n OnBeforeClose(self);\r\nend;\r\n\r\nprocedure TTMSFNCCustomPopupForm.DoBeforeShow;\r\nbegin\r\n FHintWindow := False;\r\n if Assigned(OnBeforeShow) then\r\n OnBeforeShow(self);\r\n\r\n FFirstShow := True;\r\n\r\n if not Assigned(FTimer) then\r\n FTimer := TTimer.Create(Self);\r\n\r\n FTimer.Interval := 20;\r\n FTimer.OnTimer := TimerProc;\r\n FTimer.Enabled := True;\r\nend;\r\n\r\nprocedure TTMSFNCCustomPopupForm.TimerProc(Sender: TObject);\r\nbegin\r\n if (Visible or FHintWindow) and (FFirstShow or FDragWithParent) then\r\n ApplyPlacement;\r\n if (Visible or FHintWindow) and (FFirstShow) then\r\n begin\r\n FFirstShow := False;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomPopupForm.ApplyPlacement;\r\nvar\r\n OldRect, NewRect: TRect;\r\n OldRealPlacement: TTMSFNCPopupPlacement;\r\nbegin\r\n {$IFNDEF WEBLIB}\r\n if not (csLoading in ComponentState) and not (csUpdating in ComponentState) and not (csDestroying in ComponentState) then\r\n {$ENDIF}\r\n begin\r\n OldRect := Rect(Left, Top, Left + Width, Top + Height);\r\n OldRealPlacement := FRealPlacement;\r\n DoApplyPlacement;\r\n NewRect := Rect(Left, Top, Left + Width, Top + Height);\r\n if (NewRect.Left <> OldRect.Left) or (NewRect.Top <> OldRect.Top) or (NewRect.Bottom <> OldRect.Bottom) or (NewRect.Right <> OldRect.Right)\r\n or (OldRealPlacement <> RealPlacement) then\r\n DoRealPlacementChanged;\r\n end\r\n {$IFNDEF WEBLIB}\r\n else\r\n FPlacementChanged := True;\r\n {$ENDIF}\r\nend;\r\n\r\nprocedure TTMSFNCCustomNonFocusablePopup.ActivatePreviousWindow;\r\nbegin\r\n {$IFDEF CMNLIB}\r\n SetActiveWindow(FActiveWindow);\r\n {$ENDIF}\r\nend;\r\n\r\nconstructor TTMSFNCCustomNonFocusablePopup.Create(AOwner: TComponent);\r\nbegin\r\n inherited;\r\n StaysOpen := True;\r\nend;\r\n\r\ndestructor TTMSFNCCustomNonFocusablePopup.Destroy;\r\nbegin\r\n inherited;\r\nend;\r\n\r\nfunction TTMSFNCCustomNonFocusablePopup.GetPopupFormClass: TTMSFNCCustomPopupFormClass;\r\nbegin\r\n Result := TTMSFNCCustomNonFocusablePopupForm;\r\nend;\r\n\r\nprocedure TTMSFNCCustomNonFocusablePopup.ShowPopup(AModal: Boolean);\r\n{$IFDEF CMNLIB}\r\n{$IFDEF MSWINDOWS}\r\nvar\r\n hWin: HWND;\r\n{$ENDIF}\r\n{$ENDIF}\r\nbegin\r\n {$IFDEF FMXLIB}\r\n PopupForm.FormStyle := TFormStyle.Popup;\r\n inherited;\r\n {$ENDIF}\r\n {$IFDEF CMNLIB}\r\n FActiveWindow := GetActiveWindow;\r\n {$IFDEF MSWINDOWS}\r\n PopupForm.HintWindow := True;\r\n hWin := PopupForm.Handle;\r\n SetWindowPos(hwin, HWND_TOPMOST, PopupForm.Left, PopupForm.Top, PopupForm.Width, PopupForm.Height, SWP_NOACTIVATE);\r\n ShowWindow(hWin, SW_SHOWNOACTIVATE);\r\n PopupForm.Visible := True;\r\n {$ELSE}\r\n PopupForm.SetBounds(PopupForm.Left, PopupForm.Top, PopupForm.Width, PopupForm.Height);\r\n PopupForm.Visible := True;\r\n PopupForm.BorderStyle := bsSingle;\r\n PopupForm.BorderStyle := bsNone;\r\n {$ENDIF}\r\n SetActiveWindow(FActiveWindow);\r\n {$ENDIF}\r\n {$IFDEF WEBLIB}\r\n inherited;\r\n {$ENDIF}\r\n\r\n FIsOpen := True;\r\nend;\r\n\r\n{ TTMSFNCCustomNonFocusablePopupForm }\r\n\r\nprocedure TTMSFNCCustomNonFocusablePopupForm.UpdateBounds(LRect: TRectF);\r\n{$IFDEF CMNLIB}\r\n{$IFDEF MSWINDOWS}\r\nvar\r\n hWin: HWND;\r\n{$ENDIF}\r\n{$ENDIF}\r\nbegin\r\n inherited;\r\n {$IFDEF CMNLIB}\r\n {$IFDEF MSWINDOWS}\r\n hWin := Handle;\r\n SetWindowPos(hwin, HWND_TOPMOST, Round(LRect.Left), Round(LRect.Top), Round((LRect.Right - LRect.Left)), Round((LRect.Bottom - LRect.Top)), SWP_NOACTIVATE);\r\n {$ELSE}\r\n SetBounds(Round(LRect.Left), Round(LRect.Top), Round((LRect.Right - LRect.Top)), Round((LRect.Bottom - LRect.Top)));\r\n {$ENDIF}\r\n {$ENDIF}\r\nend;\r\n\r\n{$IFDEF CMNLIB}\r\n{$IFDEF MSWINDOWS}\r\nfunction HintWindowProc(hWnd: hWnd; uMsg: Integer; WParam: WParam;\r\n lParam: lParam): LRESULT; stdcall;\r\nvar\r\n I: Integer;\r\n pr: LInteger;\r\nbegin\r\n case uMsg of\r\n WM_MOUSEACTIVATE:\r\n begin\r\n Result := MA_NOACTIVATE;\r\n Exit;\r\n end;\r\n end;\r\n\r\n pr := 0;\r\n for I := 0 to Length(PrevWndProcs) - 1 do\r\n begin\r\n if PrevWndProcs[I].FWindowHandle = hWnd then\r\n pr := PrevWndProcs[I].FProc;\r\n end;\r\n\r\n Result := CallWindowProc({%H-}IntPtr(pr), hWnd, uMsg, WParam, lParam);\r\nend;\r\n\r\ndestructor TTMSFNCCustomNonFocusablePopupForm.Destroy;\r\nvar\r\n I: Integer;\r\nbegin\r\n for I := 0 to Length(PrevWndProcs) - 1 do\r\n begin\r\n if PrevWndProcs[I].FWindowHandle = Self.Handle then\r\n SetWindowLongPtr(Self.Handle, GWL_WNDPROC, PrevWndProcs[I].FProc);\r\n end;\r\n inherited;\r\nend;\r\n\r\nconstructor TTMSFNCCustomNonFocusablePopupForm.CreateNew(AOwner: TComponent; Dummy: Integer = 0);\r\nvar\r\n r: WndProcRec;\r\nbegin\r\n inherited;\r\n SetLength(PrevWndProcs, Length(PrevWndProcs) + 1);\r\n r.FWindowHandle := Self.Handle;\r\n r.FProc := SetWindowLongPtr(Self.Handle, GWL_WNDPROC, {%H-}LInteger(@HintWindowProc));\r\n PrevWndProcs[Length(PrevWndProcs) - 1] := r;\r\nend;\r\n\r\nprocedure TTMSFNCCustomNonFocusablePopupForm.CreateParams(var Params: TCreateParams);\r\nbegin\r\n inherited CreateParams(Params);\r\n with Params do\r\n begin\r\n Style := WS_POPUP;\r\n WindowClass.Style := WindowClass.Style or CS_SAVEBITS;\r\n if NewStyleControls then\r\n ExStyle := WS_EX_TOOLWINDOW or WS_EX_NOACTIVATE;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomNonFocusablePopupForm.WMNCHitTest(var Message: TWMNCHitTest);\r\nbegin\r\n Message.Result := HTTRANSPARENT;\r\nend;\r\n\r\nprocedure TTMSFNCCustomNonFocusablePopupForm.WMActivate(var Message: TWMActivate);\r\nbegin\r\n Message.Result := 1;\r\nend;\r\n\r\n{$ELSE}\r\nprocedure TTMSFNCCustomNonFocusablePopupForm.WMNCHitTest(var Message: TLMessage);\r\nbegin\r\n Message.Result := HTTRANSPARENT;\r\nend;\r\n\r\nprocedure TTMSFNCCustomNonFocusablePopupForm.WMActivate(var Message: TLMActivate);\r\nbegin\r\n Message.Result := 1;\r\n if (Owner is TTMSFNCCustomNonFocusablePopup) then\r\n (Owner as TTMSFNCCustomNonFocusablePopup).ActivatePreviousWindow;\r\nend;\r\n{$ENDIF}\r\n{$ENDIF}\r\n\r\n{ TTMSFNCNonFocusablePopup }\r\n\r\nprocedure TTMSFNCNonFocusablePopup.Deactivate;\r\nbegin\r\n ClosePopup;\r\nend;\r\n\r\nprocedure TTMSFNCNonFocusablePopup.Activate;\r\nbegin\r\n DoCreatePopup(False);\r\nend;\r\n\r\nend.\r\n","{********************************************************************}\r\n{ }\r\n{ written by TMS Software }\r\n{ copyright (c) 2016 - 2021 }\r\n{ Email : info@tmssoftware.com }\r\n{ Web : https://www.tmssoftware.com }\r\n{ }\r\n{ The source code is given as is. The author is not responsible }\r\n{ for any possible damage done due to the use of this code. }\r\n{ The complete source code remains property of the author and may }\r\n{ not be distributed, published, given or sold in any form as such. }\r\n{ No parts of the source code can be included in any other component }\r\n{ or application without written authorization of the author. }\r\n{********************************************************************}\r\n\r\nunit WEBLib.TMSFNCImage;\r\n\r\n{$I WEBLib.TMSFNCDefines.inc}\r\n\r\ninterface\r\n\r\nuses\r\n Classes, WEBLib.TMSFNCCustomControl, WEBLib.TMSFNCBitmapContainer,\r\n WEBLib.TMSFNCTypes, WEBLib.TMSFNCGraphics, WEBLib.TMSFNCGraphicsTypes\r\n {$IFNDEF LCLLIB}\r\n {$IFNDEF WEBLIB}\r\n {$HINTS OFF}\r\n {$IF COMPILERVERSION > 22}\r\n ,UITypes\r\n {$IFEND}\r\n {$HINTS ON}\r\n ,Types\r\n {$ENDIF}\r\n {$ENDIF}\r\n ;\r\n\r\nconst\r\n MAJ_VER = 1; // Major version nr.\r\n MIN_VER = 0; // Minor version nr.\r\n REL_VER = 0; // Release nr.\r\n BLD_VER = 1; // Build nr.\r\n\r\n // version history\r\n // v1.0.0.0 : First Release\r\n // v1.0.0.1 : Improved : Changes to setter visibility for TTMSFNCHotSpotImage\r\n\r\ntype\r\n {$IFDEF FNCLIB}\r\n TTMSFNCCustomImage = class(TTMSFNCCustomControl, ITMSFNCBitmapContainer)\r\n {$ENDIF}\r\n {$IFNDEF FNCLIB}\r\n TTMSFNCCustomImage = class(TTMSFNCCustomControl)\r\n {$ENDIF}\r\n private\r\n FBitmap: TTMSFNCBitmap;\r\n FBitmapContainer: TTMSFNCBitmapContainer;\r\n FStretch: Boolean;\r\n FBitmaps: TTMSFNCScaledBitmaps;\r\n FCropping: Boolean;\r\n FCenter: Boolean;\r\n FAutoSize: Boolean;\r\n FAspectRatio: Boolean;\r\n FOnBitmapChanged: TNotifyEvent;\r\n FBitmapMargins: TTMSFNCMargins;\r\n FDottedDesigntimeRectangle: Boolean;\r\n procedure SetBitmapContainer(const Value: TTMSFNCBitmapContainer);\r\n procedure SetBitmaps(const Value: TTMSFNCScaledBitmaps);\r\n procedure SetBitmap(const Value: TTMSFNCBitmap);\r\n function GetBitmapContainer: TTMSFNCBitmapContainer;\r\n procedure SetBitmapMargins(const Value: TTMSFNCMargins);\r\n protected\r\n function GetVersion: string; override;\r\n procedure ApplyAutoSize;\r\n procedure BitmapMarginsChanged(Sender: TObject);\r\n procedure Notification(AComponent: TComponent; Operation: TOperation); override;\r\n procedure BitmapChanged(Sender: TObject);\r\n procedure SetStretch(const Value: Boolean); virtual;\r\n procedure SetCropping(const Value: Boolean); virtual;\r\n procedure SetCenter(const Value: Boolean); virtual;\r\n procedure SetAS(const Value: Boolean); virtual;\r\n procedure SetAspectRatio(const Value: Boolean); virtual;\r\n property AspectRatio: Boolean read FAspectRatio write SetAspectRatio default True;\r\n property Version: String read GetVersion;\r\n property Bitmaps: TTMSFNCScaledBitmaps read FBitmaps write SetBitmaps;\r\n property BitmapContainer: TTMSFNCBitmapContainer read GetBitmapContainer write SetBitmapContainer;\r\n property Stretch: Boolean read FStretch write SetStretch default False;\r\n property Cropping: Boolean read FCropping write SetCropping default False;\r\n property Center: Boolean read FCenter write SetCenter default True;\r\n property AutoSize: Boolean read FAutoSize write SetAS default False;\r\n property Bitmap: TTMSFNCBitmap read FBitmap write SetBitmap;\r\n property BitmapMargins: TTMSFNCMargins read FBitmapMargins write SetBitmapMargins;\r\n property DottedDesigntimeRectangle: Boolean read FDottedDesigntimeRectangle write FDottedDesigntimeRectangle default True;\r\n public\r\n procedure Clear;\r\n function GetPaintRectangle: TRectF;\r\n function GetBitmap: TTMSFNCBitmap;\r\n constructor Create(AOwner: TComponent); override;\r\n destructor Destroy; override;\r\n procedure Draw(AGraphics: TTMSFNCGraphics; ARect: TRectF); override;\r\n property OnBitmapChanged: TNotifyEvent read FOnBitmapChanged write FOnBitmapChanged;\r\n end;\r\n\r\n {$IFNDEF LCLLIB}\r\n [ComponentPlatformsAttribute(TMSPlatformsWeb)]\r\n {$ENDIF}\r\n TTMSFNCImage = class(TTMSFNCCustomImage)\r\n protected\r\n procedure RegisterRuntimeClasses; override;\r\n published\r\n property AspectRatio;\r\n property Bitmap;\r\n property BitmapMargins;\r\n property Version;\r\n property Bitmaps;\r\n property BitmapContainer;\r\n property Stretch;\r\n property Cropping;\r\n property Center;\r\n property AutoSize;\r\n property Fill;\r\n property Stroke;\r\n end;\r\n\r\nimplementation\r\n\r\nuses\r\n WEBLib.Controls, WEBLib.Graphics, WEBLib.TMSFNCUtils;\r\n\r\nprocedure TTMSFNCCustomImage.ApplyAutoSize;\r\nvar\r\n bmp: TTMSFNCBitmap;\r\nbegin\r\n bmp := GetBitmap;\r\n if Assigned(bmp) then\r\n begin\r\n if FAutoSize and not IsBitmapEmpty(bmp) then\r\n begin\r\n Self.Width := Round(bmp.Width + BitmapMargins.Left + BitmapMargins.Right);\r\n Self.Height := Round(bmp.Height + BitmapMargins.Top + BitmapMargins.Bottom);\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomImage.BitmapChanged(Sender: TObject);\r\nbegin\r\n if Assigned(OnBitmapChanged) then\r\n OnBitmapChanged(Self);\r\n\r\n ApplyAutoSize;\r\n Invalidate;\r\nend;\r\n\r\nprocedure TTMSFNCCustomImage.BitmapMarginsChanged(Sender: TObject);\r\nbegin\r\n ApplyAutoSize;\r\n Invalidate;\r\nend;\r\n\r\nprocedure TTMSFNCCustomImage.Clear;\r\nbegin\r\n Bitmaps.Clear;\r\nend;\r\n\r\nconstructor TTMSFNCCustomImage.Create(AOwner: TComponent);\r\nbegin\r\n inherited;\r\n FDottedDesigntimeRectangle := True;\r\n\r\n if IsDesignTime then\r\n DisableBackground;\r\n\r\n FBitmapMargins := TTMSFNCMargins.Create;\r\n FBitmapMargins.OnChange := @BitmapMarginsChanged;\r\n FCenter := True;\r\n FStretch := False;\r\n FAspectRatio := True;\r\n FCropping := False;\r\n FBitmaps := TTMSFNCScaledBitmaps.Create(Self);\r\n FBitmaps.OnChange := @BitmapChanged;\r\n FBitmap := TTMSFNCBitmap.Create;\r\n FBitmap.OnChange := @BitmapChanged;\r\n Width := 100;\r\n Height := 100;\r\nend;\r\n\r\ndestructor TTMSFNCCustomImage.Destroy;\r\nbegin\r\n FBitmap.Free;\r\n FBitmaps.Free;\r\n FBitmapMargins.Free;\r\n inherited;\r\nend;\r\n\r\nfunction TTMSFNCCustomImage.GetBitmap: TTMSFNCBitmap;\r\nbegin\r\n if not IsBitmapEmpty(FBitmap) then\r\n Result := FBitmap\r\n else\r\n Result := TTMSFNCGraphics.GetScaledBitmap(Bitmaps, 0, FBitmapContainer);\r\nend;\r\n\r\nfunction TTMSFNCCustomImage.GetBitmapContainer: TTMSFNCBitmapContainer;\r\nbegin\r\n Result := FBitmapContainer;\r\nend;\r\n\r\nfunction TTMSFNCCustomImage.GetPaintRectangle: TRectF;\r\nvar\r\n bmp: TTMSFNCBitmap;\r\n rdest: TRectF;\r\n w, h: Single;\r\n x, y: Single;\r\nbegin\r\n Result := RectF(0, 0, 0, 0);\r\n bmp := GetBitmap;\r\n if Assigned(bmp) then\r\n begin\r\n x := BitmapMargins.Left;\r\n y := BitmapMargins.Top;\r\n w := 0;\r\n h := 0;\r\n TTMSFNCGraphics.GetAspectSize(w, h, bmp.Width, bmp.Height, Width - BitmapMargins.Left - BitmapMargins.Right,\r\n Height - BitmapMargins.Top - BitmapMargins.Bottom, AspectRatio, Stretch, Cropping);\r\n\r\n if Center or Cropping then\r\n begin\r\n x := (width - w) / 2;\r\n y := (height - h) / 2;\r\n end;\r\n\r\n rdest := RectF(x, y, x + w, y + h);\r\n Result := rdest;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCCustomImage.GetVersion: string;\r\nbegin\r\n Result := GetVersionNumber(MAJ_VER, MIN_VER, REL_VER, BLD_VER);\r\nend;\r\n\r\nprocedure TTMSFNCCustomImage.Notification(AComponent: TComponent;\r\n Operation: TOperation);\r\nbegin\r\n inherited;\r\n if (Operation = opRemove) and (AComponent = FBitmapContainer) then\r\n FBitmapContainer := nil;\r\nend;\r\n\r\nprocedure TTMSFNCCustomImage.Draw(AGraphics: TTMSFNCGraphics; ARect: TRectF);\r\nvar\r\n bmp: TTMSFNCBitmap;\r\nbegin\r\n inherited;\r\n if (csDesigning in ComponentState) and FDottedDesigntimeRectangle then\r\n begin\r\n AGraphics.Stroke.Kind := gskDot;\r\n AGraphics.DrawRectangle(ARect);\r\n end;\r\n\r\n bmp := GetBitmap;\r\n if Assigned(bmp) then\r\n begin\r\n ARect := RectF(ARect.Left + BitmapMargins.Left, ARect.Top + BitmapMargins.Top,\r\n ARect.Right - BitmapMargins.Right, ARect.Bottom - BitmapMargins.Bottom);\r\n\r\n AGraphics.DrawBitmap(ARect, bmp, AspectRatio, Stretch, Center, Cropping);\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomImage.SetAspectRatio(const Value: Boolean);\r\nbegin\r\n FAspectRatio := Value;\r\n Invalidate;\r\nend;\r\n\r\nprocedure TTMSFNCCustomImage.SetAS(const Value: Boolean);\r\nbegin\r\n FAutoSize := Value;\r\n ApplyAutoSize;\r\n Invalidate;\r\nend;\r\n\r\nprocedure TTMSFNCCustomImage.SetBitmaps(const Value: TTMSFNCScaledBitmaps);\r\nbegin\r\n FBitmaps.Assign(Value);\r\n Invalidate;\r\nend;\r\n\r\nprocedure TTMSFNCCustomImage.SetBitmap(const Value: TTMSFNCBitmap);\r\nbegin\r\n FBitmap.Assign(Value);\r\n Invalidate;\r\nend;\r\n\r\nprocedure TTMSFNCCustomImage.SetBitmapContainer(\r\n const Value: TTMSFNCBitmapContainer);\r\nbegin\r\n FBitmapContainer := Value;\r\n ApplyAutoSize;\r\n Invalidate;\r\nend;\r\n\r\nprocedure TTMSFNCCustomImage.SetBitmapMargins(const Value: TTMSFNCMargins);\r\nbegin\r\n FBitmapMargins.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCCustomImage.SetCenter(const Value: Boolean);\r\nbegin\r\n FCenter := Value;\r\n Invalidate;\r\nend;\r\n\r\nprocedure TTMSFNCCustomImage.SetCropping(const Value: Boolean);\r\nbegin\r\n FCropping := Value;\r\n Invalidate;\r\nend;\r\n\r\nprocedure TTMSFNCCustomImage.SetStretch(const Value: Boolean);\r\nbegin\r\n FStretch := Value;\r\n Invalidate;\r\nend;\r\n\r\n{ TTMSFNCImage }\r\n\r\nprocedure TTMSFNCImage.RegisterRuntimeClasses;\r\nbegin\r\n inherited;\r\n RegisterClass(TTMSFNCImage);\r\nend;\r\n\r\nend.\r\n","{********************************************************************}\r\n{ }\r\n{ written by TMS Software }\r\n{ copyright (c) 2016 - 2025 }\r\n{ Email : info@tmssoftware.com }\r\n{ Web : https://www.tmssoftware.com }\r\n{ }\r\n{ The source code is given as is. The author is not responsible }\r\n{ for any possible damage done due to the use of this code. }\r\n{ The complete source code remains property of the author and may }\r\n{ not be distributed, published, given or sold in any form as such. }\r\n{ No parts of the source code can be included in any other component }\r\n{ or application without written authorization of the author. }\r\n{********************************************************************}\r\n\r\nunit WEBLib.TMSFNCCustomTreeView;\r\n\r\n{$I WEBLib.TMSFNCDefines.inc}\r\n\r\n{$IFDEF FMXLIB}\r\n{$DEFINE FMXWEBLIB}\r\n{$ENDIF}\r\n{$IFDEF WEBLIB}\r\n{$DEFINE FMXWEBLIB}\r\n{$DEFINE CMNWEBLIB}\r\n{$DEFINE LCLWEBLIB}\r\n{$ENDIF}\r\n{$IFDEF CMNLIB}\r\n{$DEFINE CMNWEBLIB}\r\n{$ENDIF}\r\n{$IFDEF LCLLIB}\r\n{$DEFINE LCLWEBLIB}\r\n{$ENDIF}\r\n{$DEFINE UIPACK}\r\n\r\ninterface\r\n\r\nuses\r\n Classes, SysUtils, WEBLib.TMSFNCTreeViewData, WEBLib.TMSFNCCustomComponent, WEBLib.TMSFNCGraphics, WEBLib.TMSFNCPopup, WEBLib.TMSFNCImage,\r\n Types, WEBLib.TMSFNCTypes, WEBLib.Controls, WEBLib.ExtCtrls, WEBLib.StdCtrls, WEBLib.TMSFNCGraphicsTypes\r\n {$IFNDEF LCLLIB}\r\n {$IFNDEF WEBLIB}\r\n {$HINTS OFF}\r\n {$IF COMPILERVERSION > 22}\r\n ,UITypes\r\n {$IFEND}\r\n {$HINTS ON}\r\n ,Generics.Collections\r\n {$ENDIF}\r\n {$ENDIF}\r\n {$IFDEF LCLLIB}\r\n ,fgl\r\n {$ENDIF}\r\n {$IFDEF WEBLIB}\r\n ,Contnrs, Web, WEBLIB.JSON\r\n {$ENDIF}\r\n {$IFDEF FMXLIB}\r\n ,FMX.Types, FMX.Memo, FMX.Edit, FMX.ListBox\r\n {$WARNINGS OFF}\r\n {$HINTS OFF}\r\n {$IF COMPILERVERSION > 28}\r\n ,FMX.Memo.Types\r\n {$IFEND}\r\n {$HINTS ON}\r\n {$WARNINGS ON}\r\n {$ENDIF}\r\n {$IFDEF FNCLIB}\r\n {$IFNDEF WEBLIB}\r\n {$IFNDEF LCLLIB}\r\n ,JSON\r\n {$ELSE}\r\n ,fpjson\r\n {$ENDIF}\r\n {$ENDIF}\r\n {$ENDIF}\r\n ;\r\n\r\nconst\r\n TTMSFNCTreeViewDocURL = TTMSFNCBaseDocURL + 'tmsfncuipack/components/ttmsfnctreeview/';\r\n MAJ_VER = 1; // Major version nr.\r\n MIN_VER = 2; // Minor version nr.\r\n REL_VER = 2; // Release nr.\r\n BLD_VER = 3; // Build nr.\r\n CLP_FMT = '#TREEVIEW#';\r\n ENDOFLINE = #13#10;\r\n DRAGMARGIN = 10;\r\n\r\n // version history\r\n // v1.0.0.0 : first release\r\n // v1.0.0.1 : Fixed: Issue with reintroducing BeginUpdate with additional parameter,\r\n // please use BeginUpdate in combination with ClearNodeList to clear all nodes\r\n // v1.1.0.0 : New: Clipboard support\r\n // : New: Column sorting\r\n // : New: Drag & Drop support\r\n // : New: Reordering\r\n // : New: Filtering\r\n // : New: Keyboard Lookup\r\n // : Fixed: Issue with font initialization\r\n // v1.1.0.1 : Fixed: Issue with copying and moving node data properties\r\n // v1.1.0.2 : Fixed: Issue with selecting all nodes when multi-select is false\r\n // v1.1.0.3 : Fixed: Access violation calling stopedit in OnExit of custom editor\r\n // : Fixed: Issue loading complex tree files\r\n // v1.1.0.4 : Fixed: Issue assigning child node data\r\n // v1.1.0.5 : Fixed: Issue drag & drop interaction in combination with expand / collapse\r\n // v1.1.0.6 : Improved: Handling keyboard ALT, SHIFT and CTRL keys without navigating to selecting item\r\n // v1.1.0.7 : Fixed: Issue with displaying icons on high dpi systems\r\n // v1.1.0.8 : Fixed: Issue setting check state without rebuilding node list\r\n // v1.1.1.0 : New: FindNodeByRow and GetTotalNodeCount functions\r\n // : Fixed: Issue with OnAfterSizeColumn not called\r\n // v1.1.1.1 : Fixed: Issue with HTML calculation and wordwrapping\r\n // : Fixed: Issue with drawing node background color in VCL/LCL\r\n // : Fixed: Issue with ScrollToNode in combination with variable node height\r\n // v1.1.1.2 : Improved: ShowFocus default true\r\n // : Improved: SelectNode := nil clears selection\r\n // : Improved: Double-click on node area to expand/collapse\r\n // v1.1.1.3 : Fixed: Issue with sizing invisible columns\r\n // v1.1.1.4 : Fixed: Issue with ScrollToNode hanging on collapsed nodes\r\n // v1.1.2.0 : New: FindNodeByTextAndColumn function\r\n // v1.1.3.0 : New: FindNodeByDBKey function\r\n // v1.1.3.1 : Fixed: Access violation when destroying editor\r\n // v1.1.3.2 : Fixed: Access violation during move node operation\r\n // v1.1.3.3 : Fixed: Issue panning and dblclick combination\r\n // v1.1.3.4 : Fixed: Issue sorting and sizing columns occurs simultaneously\r\n // v1.1.3.5 : Improved: Retrieve text of virtual node\r\n // v1.1.3.6 : Fixed: Issue with presetting combobox editor value\r\n // v1.1.3.7 : Fixed: Issue with missing assignment of DBKey property\r\n // v1.1.3.8 : Fixed: Issue with multi-select on mobile platforms\r\n // v1.1.3.9 : Fixed: Issue with node checking still active while Interaction.ReadOnly property is set.\r\n // v1.1.4.0 : New: OnNodeMouseEnter and OnNodeMouseLeave events\r\n // v1.1.4.1 : Fixed: Issue with filtering and expanding / collapsing nodes\r\n // v1.1.4.2 : Fixed: Issue with resizing treeview in combination with splitter in TMS WEB Core\r\n // v1.1.4.3 : Fixed: Issue with drawing transparent checkboxes\r\n // v1.1.4.4 : Fixed: Issue with closing inplace editor in TMS WEB Core\r\n // v1.1.4.5 : Fixed: Issue with editing under Android\r\n // v1.1.4.6 : Fixed: horizontal scrolling not working when there is no vertical scrolling\r\n // v1.1.4.7 : Improved: Name property of column reflecting at designtime\r\n // v1.1.4.8 : Fixed : Issue with state of expanded/collapse icons for nodes without children\r\n // v1.1.4.9 : Fixed : Issue with dblclicking and clicking on an item in Lazarus\r\n // v1.1.5.0 : Improved : OnColumnAnchorClick event added\r\n // v1.1.5.1 : Fixed : Issue with moving parent nodes inside children\r\n // v1.1.5.2 : Fixed : Issue with Anchor if font was changed\r\n // v1.1.5.3 : Fixed : Issue with default drag & drop events not being triggered\r\n // v1.1.5.4 : Fixed : Issue with OnIsNodeChecked missing AColumn parameter\r\n // v1.1.5.5 : Improved : Added AIncludeRows parameter to XYToColumn to include rows while detecting which column is located at X and Y coordinate\r\n // v1.1.5.6 : Fixed : Issue with Delete key triggering LookupNode when FLookupString is empty\r\n // v1.1.5.7 : Fixed : Issue with OnBeforeUnSelectNode & OnAfterUnSelectNode event not called\r\n // v1.1.5.8 : New : Interaction.MouseWheelDelta to configure mousewheel scrolling sensitivity\r\n // : Fixed : Issue with OnMouseLeave & OnMouseEnter not triggered\r\n // : Fixed : Issue with hanging scroll actions\r\n // v1.1.5.9 : Fixed : Issue in Delphi 11 with begin and end scene for CreateBitmapCanvas\r\n // : Fixed : Issue in macOS destroying the inplace editor popup in certain conditions\r\n // v1.1.6.0 : New : OnFocusedNodeChanged event\r\n // : New : + KEY expands one level, - KEY collapses one level, * KEY expands recursively, / KEY collapses recursively\r\n // : New : OnGetNodeData event, Data* properties to link to virtual node structure\r\n // v1.1.6.1 : Improved : Interaction.Lookup.VisibleNodesOnly to lookup within visible nodes.\r\n // v1.1.6.2 : Improved : Less sensitive downward scrolling in combination with more options in TTMSFNCTableView descendant\r\n // v1.1.6.3 : Fixed : Issue retrieving and inserting nodes based on row parameter\r\n // : Fixed : Issue with dblclick in combination with modal dialogs consuming focus\r\n // v1.1.6.4 : Fixed : Issue with clearing/deleting nodes and focused node pointer\r\n // v1.1.7.0 : New : OnBeforeSelectAllNodes & OnAfterSelectAllNodes events\r\n // v1.1.7.1 : Fixed : Issue with LookupNode function not auto-expanding\r\n // v1.1.8.0 : New : OnBeforeSortNodes & OnAfterSortNodes events\r\n // v1.1.8.1 : Fixed : Issue with reordering nodes at root level\r\n // v1.1.8.2 : Improved : MoveNode no longer destroys the node\r\n // : Fixed : Issue with special characters not rendering in HTML\r\n // v1.2.0.0 : New : GlobalFont interface implemented\r\n // : New : Updated initial look\r\n // : New : Load JSON Objects with ViewJSON\r\n // : New : HTMLTemplate possible per column for node values\r\n // v1.2.0.1 : Fixed : Issue with keyboard selection when not multiselect\r\n // v1.2.0.2 : Fixed : Issue with inplace editors not being destroyed properly on iOS\r\n // v1.2.0.3 : Fixed : Issue with MoveNode not being able to move to root\r\n // v1.2.0.4 : Fixed : Issue with Drag & Drop of node to root not correctly referenced\r\n // v1.2.0.5 : Fixed : Issue with uninitialized variable related to multi-select\r\n // v1.2.1.0 : New : OnCustomizeFilterListBox event\r\n // : Improved : expand & collapse recursive node now also possible when node is already expanded or collapsed\r\n // : Fixed : Issue with multi-select in combination with drag & drop\r\n // v1.2.1.1 : Improved : Encoding parameters for saving & loading data\r\n // v1.2.1.2 : Fixed : Issue with expand & collapse\r\n // v1.2.1.3 : Fixed : Issue with dragging on column makes scroll movement\r\n // v1.2.2.0 : New : Column minimum width to use with stretching.\r\n // v1.2.2.1 : Fixed : Issue with enabling sorting\r\n // v1.2.2.2 : Fixed : Issue with calculating nodes under certain conditions\r\n // v1.2.2.3 : Fixed : Issue with visibility of columns\r\n\r\n CACHEWIDTH = 1000;\r\n CACHEHEIGHT = 1000;\r\n {$IFDEF ANDROID}\r\n SCROLLINGDELAY = 40;\r\n {$ELSE}\r\n SCROLLINGDELAY = 0;\r\n {$ENDIF}\r\n\r\n {$IFDEF FMXLIB}\r\n TTMSFNCTreeViewColorExtended = $FFF4F4F4;\r\n TTMSFNCTreeViewColorSelection = $FF1BADF8;\r\n {$ELSE}\r\n TTMSFNCTreeViewColorExtended = $F4F4F4;\r\n TTMSFNCTreeViewColorSelection = $F8AD1B;\r\n {$ENDIF}\r\n\r\n{$IFDEF FNCLIB}\r\nresourcestring\r\n{$ELSE}\r\nconst\r\n{$ENDIF}\r\n sTMSFNCTreeViewFilterAll = '(All)';\r\n\r\ntype\r\n TTMSFNCCustomTreeView = class;\r\n\r\n {$IFDEF WEBLIB}\r\n TTMSFNCTreeViewCache = class(TObjectList)\r\n private\r\n function GetItem(Index: Integer): TTMSFNCTreeViewCacheItem;\r\n procedure SetItem(Index: Integer; const Value: TTMSFNCTreeViewCacheItem);\r\n public\r\n property Items[Index: Integer]: TTMSFNCTreeViewCacheItem read GetItem write SetItem; default;\r\n end;\r\n {$ENDIF}\r\n {$IFNDEF WEBLIB}\r\n TTMSFNCTreeViewCache = class(TObjectList);\r\n {$ENDIF}\r\n TTMSFNCTreeViewNodeCache = class(TTMSFNCTreeViewCache);\r\n TTMSFNCTreeViewColumnsCache = class(TTMSFNCTreeViewCache);\r\n TTMSFNCTreeViewColumnsTopCache = class(TTMSFNCTreeViewColumnsCache);\r\n TTMSFNCTreeViewColumnsBottomCache = class(TTMSFNCTreeViewColumnsCache);\r\n TTMSFNCTreeViewGroupsCache = class(TTMSFNCTreeViewCache);\r\n TTMSFNCTreeViewGroupsTopCache = class(TTMSFNCTreeViewGroupsCache);\r\n TTMSFNCTreeViewGroupsBottomCache = class(TTMSFNCTreeViewGroupsCache);\r\n\r\n {$IFDEF WEBLIB}\r\n TTMSFNCTreeViewDisplayList = class(TList)\r\n private\r\n function GetItem(Index: Integer): TTMSFNCTreeViewCacheItem;\r\n procedure SetItem(Index: Integer; const Value: TTMSFNCTreeViewCacheItem);\r\n public\r\n property Items[Index: Integer]: TTMSFNCTreeViewCacheItem read GetItem write SetItem; default;\r\n end;\r\n {$ENDIF}\r\n {$IFNDEF WEBLIB}\r\n TTMSFNCTreeViewDisplayList = class(TList);\r\n {$ENDIF}\r\n TTMSFNCTreeViewNodeDisplayList = class(TTMSFNCTreeViewDisplayList);\r\n TTMSFNCTreeViewColumnsDisplayList = class(TTMSFNCTreeViewDisplayList);\r\n TTMSFNCTreeViewColumnsTopDisplayList = class(TTMSFNCTreeViewColumnsDisplayList);\r\n TTMSFNCTreeViewColumnsBottomDisplayList = class(TTMSFNCTreeViewColumnsDisplayList);\r\n TTMSFNCTreeViewGroupsDisplayList = class(TTMSFNCTreeViewDisplayList);\r\n TTMSFNCTreeViewGroupsTopDisplayList = class(TTMSFNCTreeViewGroupsDisplayList);\r\n TTMSFNCTreeViewGroupsBottomDisplayList = class(TTMSFNCTreeViewGroupsDisplayList);\r\n\r\n TTMSFNCTreeViewColumnsLayout = (tclTop, tclBottom);\r\n TTMSFNCTreeViewColumnsLayouts = set of TTMSFNCTreeViewColumnsLayout;\r\n\r\n TTMSFNCTreeViewGroupLayout = (tglTop, tglBottom);\r\n TTMSFNCTreeViewGroupsLayouts = set of TTMSFNCTreeViewGroupLayout;\r\n\r\n TTMSFNCTreeViewNodeHeightMode = (tnhmFixed, tnhmVariable);\r\n\r\n TTMSFNCTreeViewSelectionArea = (tsaDefault, tsaFull, tsaFromLevel, tsaFromText);\r\n\r\n TTMSFNCTreeViewNodesAppearance = class(TPersistent)\r\n private\r\n FTreeView: TTMSFNCCustomTreeView;\r\n FFill: TTMSFNCGraphicsFill;\r\n FStroke: TTMSFNCGraphicsStroke;\r\n FFont: TTMSFNCGraphicsFont;\r\n FDisabledFill: TTMSFNCGraphicsFill;\r\n FSelectedFill: TTMSFNCGraphicsFill;\r\n FDisabledStroke: TTMSFNCGraphicsStroke;\r\n FSelectedStroke: TTMSFNCGraphicsStroke;\r\n FSelectionArea: TTMSFNCTreeViewSelectionArea;\r\n FExpandColumn: Integer;\r\n FExpandWidth: Double;\r\n FExpandHeight: Double;\r\n FLevelIndent: Double;\r\n FHeightMode: TTMSFNCTreeViewNodeHeightMode;\r\n FFixedHeight: Double;\r\n FVariableMinimumHeight: Double;\r\n FSelectedFontColor: TTMSFNCGraphicsColor;\r\n FDisabledFontColor: TTMSFNCGraphicsColor;\r\n FExtendedFontColor: TTMSFNCGraphicsColor;\r\n FExtendedSelectedFontColor: TTMSFNCGraphicsColor;\r\n FExtendedDisabledFontColor: TTMSFNCGraphicsColor;\r\n FExtendedDisabledFill: TTMSFNCGraphicsFill;\r\n FExtendedFont: TTMSFNCGraphicsFont;\r\n FExtendedSelectedFill: TTMSFNCGraphicsFill;\r\n FExtendedDisabledStroke: TTMSFNCGraphicsStroke;\r\n FExtendedSelectedStroke: TTMSFNCGraphicsStroke;\r\n FExtendedFill: TTMSFNCGraphicsFill;\r\n FExtendedStroke: TTMSFNCGraphicsStroke;\r\n FShowLines: Boolean;\r\n FExpandNodeIcon: TTMSFNCBitmap;\r\n FCollapseNodeIcon: TTMSFNCBitmap;\r\n FExpandNodeIconLarge: TTMSFNCBitmap;\r\n FCollapseNodeIconLarge: TTMSFNCBitmap;\r\n FColumnStroke: TTMSFNCGraphicsStroke;\r\n FLineStroke: TTMSFNCGraphicsStroke;\r\n FShowFocus: Boolean;\r\n FSpacing: Double;\r\n FDisabledTitleFontColor: TTMSFNCGraphicsColor;\r\n FSelectedTitleFontColor: TTMSFNCGraphicsColor;\r\n FTitleFont: TTMSFNCGraphicsFont;\r\n procedure SetFill(const Value: TTMSFNCGraphicsFill);\r\n procedure SetStroke(const Value: TTMSFNCGraphicsStroke);\r\n procedure SetFont(const Value: TTMSFNCGraphicsFont);\r\n procedure SetDisabledFill(const Value: TTMSFNCGraphicsFill);\r\n procedure SetDisabledStroke(const Value: TTMSFNCGraphicsStroke);\r\n procedure SetSelectedFill(const Value: TTMSFNCGraphicsFill);\r\n procedure SetSelectedStroke(const Value: TTMSFNCGraphicsStroke);\r\n procedure SetSelectionArea(const Value: TTMSFNCTreeViewSelectionArea);\r\n procedure SetExtendedFill(const Value: TTMSFNCGraphicsFill);\r\n procedure SetExtendedStroke(const Value: TTMSFNCGraphicsStroke);\r\n procedure SetExtendedFont(const Value: TTMSFNCGraphicsFont);\r\n procedure SetExtendedDisabledFill(const Value: TTMSFNCGraphicsFill);\r\n procedure SetExtendedDisabledStroke(const Value: TTMSFNCGraphicsStroke);\r\n procedure SetExtendedSelectedFill(const Value: TTMSFNCGraphicsFill);\r\n procedure SetExtendedSelectedStroke(const Value: TTMSFNCGraphicsStroke);\r\n procedure SetExpandColumn(const Value: Integer);\r\n procedure SetExpandWidth(const Value: Double);\r\n procedure SetExpandHeight(const Value: Double);\r\n procedure SetLevelIndent(const Value: Double);\r\n procedure SetFixedHeight(const Value: Double);\r\n procedure SetVariableMinimumHeight(const Value: Double);\r\n procedure SetSelectedFontColor(const Value: TTMSFNCGraphicsColor);\r\n procedure SetDisabledFontColor(const Value: TTMSFNCGraphicsColor);\r\n procedure SetExtendedFontColor(const Value: TTMSFNCGraphicsColor);\r\n procedure SetExtendedSelectedFontColor(const Value: TTMSFNCGraphicsColor);\r\n procedure SetExtendedDisabledFontColor(const Value: TTMSFNCGraphicsColor);\r\n procedure SetHeightMode(const Value: TTMSFNCTreeViewNodeHeightMode);\r\n procedure SetShowLines(const Value: Boolean);\r\n procedure SetCollapseNodeIcon(const Value: TTMSFNCBitmap);\r\n procedure SetExpandNodeIcon(const Value: TTMSFNCBitmap);\r\n procedure SetCollapseNodeIconLarge(const Value: TTMSFNCBitmap);\r\n procedure SetExpandNodeIconLarge(const Value: TTMSFNCBitmap);\r\n procedure SetColumnStroke(const Value: TTMSFNCGraphicsStroke);\r\n procedure SetLineStroke(const Value: TTMSFNCGraphicsStroke);\r\n procedure SetShowFocus(const Value: Boolean);\r\n function IsSpacingStored: Boolean;\r\n procedure SetSpacing(const Value: Double);\r\n procedure SetDisabledTitleFontColor(const Value: TTMSFNCGraphicsColor);\r\n procedure SetSelectedTitleFontColor(const Value: TTMSFNCGraphicsColor);\r\n procedure SetTitleFont(const Value: TTMSFNCGraphicsFont);\r\n protected\r\n procedure Changed(Sender: TObject);\r\n procedure BitmapChanged(Sender: TObject);\r\n public\r\n constructor Create(ATreeView: TTMSFNCCustomTreeView);\r\n procedure Assign(Source: TPersistent); override;\r\n destructor Destroy; override;\r\n published\r\n property ShowFocus: Boolean read FShowFocus write SetShowFocus default True;\r\n property ExpandColumn: Integer read FExpandColumn write SetExpandColumn default 0;\r\n property ExpandWidth: Double read FExpandWidth write SetExpandWidth;\r\n property ExpandHeight: Double read FExpandHeight write SetExpandHeight;\r\n property LevelIndent: Double read FLevelIndent write SetLevelIndent;\r\n property Spacing: Double read FSpacing write SetSpacing stored IsSpacingStored nodefault;\r\n property FixedHeight: Double read FFixedHeight write SetFixedHeight;\r\n property VariableMinimumHeight: Double read FVariableMinimumHeight write SetVariableMinimumHeight;\r\n property HeightMode: TTMSFNCTreeViewNodeHeightMode read FHeightMode write SetHeightMode default tnhmFixed;\r\n property ShowLines: Boolean read FShowLines write SetShowLines default True;\r\n\r\n property Fill: TTMSFNCGraphicsFill read FFill write SetFill;\r\n property Stroke: TTMSFNCGraphicsStroke read FStroke write SetStroke;\r\n property ColumnStroke: TTMSFNCGraphicsStroke read FColumnStroke write SetColumnStroke;\r\n property LineStroke: TTMSFNCGraphicsStroke read FLineStroke write SetLineStroke;\r\n property Font: TTMSFNCGraphicsFont read FFont write SetFont;\r\n property TitleFont: TTMSFNCGraphicsFont read FTitleFont write SetTitleFont;\r\n property SelectedFontColor: TTMSFNCGraphicsColor read FSelectedFontColor write SetSelectedFontColor default gcWhite;\r\n property DisabledFontColor: TTMSFNCGraphicsColor read FDisabledFontColor write SetDisabledFontColor default gcSilver;\r\n property SelectedTitleFontColor: TTMSFNCGraphicsColor read FSelectedTitleFontColor write SetSelectedTitleFontColor default gcWhite;\r\n property DisabledTitleFontColor: TTMSFNCGraphicsColor read FDisabledTitleFontColor write SetDisabledTitleFontColor default gcSilver;\r\n\r\n property ExtendedFontColor: TTMSFNCGraphicsColor read FExtendedFontColor write SetExtendedFontColor default gcBlack;\r\n property ExtendedSelectedFontColor: TTMSFNCGraphicsColor read FExtendedSelectedFontColor write SetExtendedSelectedFontColor default gcWhite;\r\n property ExtendedDisabledFontColor: TTMSFNCGraphicsColor read FExtendedDisabledFontColor write SetExtendedDisabledFontColor default gcSilver;\r\n\r\n property SelectedFill: TTMSFNCGraphicsFill read FSelectedFill write SetSelectedFill;\r\n property SelectedStroke: TTMSFNCGraphicsStroke read FSelectedStroke write SetSelectedStroke;\r\n property SelectionArea: TTMSFNCTreeViewSelectionArea read FSelectionArea write SetSelectionArea default tsaFromText;\r\n\r\n property DisabledFill: TTMSFNCGraphicsFill read FDisabledFill write SetDisabledFill;\r\n property DisabledStroke: TTMSFNCGraphicsStroke read FDisabledStroke write SetDisabledStroke;\r\n\r\n property ExtendedFill: TTMSFNCGraphicsFill read FExtendedFill write SetExtendedFill;\r\n property ExtendedStroke: TTMSFNCGraphicsStroke read FExtendedStroke write SetExtendedStroke;\r\n property ExtendedFont: TTMSFNCGraphicsFont read FExtendedFont write SetExtendedFont;\r\n\r\n property ExtendedSelectedFill: TTMSFNCGraphicsFill read FExtendedSelectedFill write SetExtendedSelectedFill;\r\n property ExtendedSelectedStroke: TTMSFNCGraphicsStroke read FExtendedSelectedStroke write SetExtendedSelectedStroke;\r\n\r\n property ExtendedDisabledFill: TTMSFNCGraphicsFill read FExtendedDisabledFill write SetExtendedDisabledFill;\r\n property ExtendedDisabledStroke: TTMSFNCGraphicsStroke read FExtendedDisabledStroke write SetExtendedDisabledStroke;\r\n\r\n property ExpandNodeIcon: TTMSFNCBitmap read FExpandNodeIcon write SetExpandNodeIcon;\r\n property CollapseNodeIcon: TTMSFNCBitmap read FCollapseNodeIcon write SetCollapseNodeIcon;\r\n property ExpandNodeIconLarge: TTMSFNCBitmap read FExpandNodeIconLarge write SetExpandNodeIconLarge;\r\n property CollapseNodeIconLarge: TTMSFNCBitmap read FCollapseNodeIconLarge write SetCollapseNodeIconLarge;\r\n end;\r\n\r\n TTMSFNCTreeViewColumnsAppearance = class(TPersistent)\r\n private\r\n FTreeView: TTMSFNCCustomTreeView;\r\n FLayouts: TTMSFNCTreeViewColumnsLayouts;\r\n FStretch: Boolean;\r\n FStretchColumn: Integer;\r\n FStretchAll: Boolean;\r\n FBottomSize: Double;\r\n FTopSize: Double;\r\n FBottomFill: TTMSFNCGraphicsFill;\r\n FBottomStroke: TTMSFNCGraphicsStroke;\r\n FTopFill: TTMSFNCGraphicsFill;\r\n FTopStroke: TTMSFNCGraphicsStroke;\r\n FTopFont: TTMSFNCGraphicsFont;\r\n FBottomFont: TTMSFNCGraphicsFont;\r\n FTopVerticalTextAlign: TTMSFNCGraphicsTextAlign;\r\n FTopHorizontalTextAlign: TTMSFNCGraphicsTextAlign;\r\n FBottomHorizontalTextAlign: TTMSFNCGraphicsTextAlign;\r\n FBottomVerticalTextAlign: TTMSFNCGraphicsTextAlign;\r\n FTopVerticalText: Boolean;\r\n FBottomVerticalText: Boolean;\r\n FFillEmptySpaces: Boolean;\r\n FSortIndicatorColor: TTMSFNCGraphicsColor;\r\n FOptimizedColumnDisplay: Boolean;\r\n procedure SetLayouts(const Value: TTMSFNCTreeViewColumnsLayouts);\r\n procedure SetStretch(const Value: Boolean);\r\n procedure SetStretchAll(const Value: Boolean);\r\n procedure SetStretchColumn(const Value: Integer);\r\n procedure SetBottomSize(const Value: Double);\r\n procedure SetTopSize(const Value: Double);\r\n procedure SetBottomFill(const Value: TTMSFNCGraphicsFill);\r\n procedure SetBottomStroke(const Value: TTMSFNCGraphicsStroke);\r\n procedure SetTopFill(const Value: TTMSFNCGraphicsFill);\r\n procedure SetTopStroke(const Value: TTMSFNCGraphicsStroke);\r\n procedure SetBottomFont(const Value: TTMSFNCGraphicsFont);\r\n procedure SetTopFont(const Value: TTMSFNCGraphicsFont);\r\n procedure SetTopVerticalText(const Value: Boolean);\r\n procedure SetBottomVerticalText(const Value: Boolean);\r\n procedure SetFillEmptySpaces(const Value: Boolean);\r\n procedure SetSortIndicatorColor(const Value: TTMSFNCGraphicsColor);\r\n procedure SetOptimizedColumnDisplay(const Value: Boolean);\r\n protected\r\n procedure Changed(Sender: TObject);\r\n public\r\n constructor Create(ATreeView: TTMSFNCCustomTreeView);\r\n destructor Destroy; override;\r\n procedure Assign(Source: TPersistent); override;\r\n published\r\n property Layouts: TTMSFNCTreeViewColumnsLayouts read FLayouts write SetLayouts default [tclTop];\r\n property Stretch: Boolean read FStretch write SetStretch default True;\r\n property StretchColumn: Integer read FStretchColumn write SetStretchColumn default -1;\r\n property StretchAll: Boolean read FStretchAll write SetStretchAll default True;\r\n property TopSize: Double read FTopSize write SetTopSize;\r\n property BottomSize: Double read FBottomSize write SetBottomSize;\r\n property TopFont: TTMSFNCGraphicsFont read FTopFont write SetTopFont;\r\n property BottomFont: TTMSFNCGraphicsFont read FBottomFont write SetBottomFont;\r\n property TopFill: TTMSFNCGraphicsFill read FTopFill write SetTopFill;\r\n property BottomFill: TTMSFNCGraphicsFill read FBottomFill write SetBottomFill;\r\n property TopStroke: TTMSFNCGraphicsStroke read FTopStroke write SetTopStroke;\r\n property BottomStroke: TTMSFNCGraphicsStroke read FBottomStroke write SetBottomStroke;\r\n property TopVerticalText: Boolean read FTopVerticalText write SetTopVerticalText default False;\r\n property BottomVerticalText: Boolean read FBottomVerticalText write SetBottomVerticalText default False;\r\n property FillEmptySpaces: Boolean read FFillEmptySpaces write SetFillEmptySpaces default True;\r\n property SortIndicatorColor: TTMSFNCGraphicsColor read FSortIndicatorColor write SetSortIndicatorColor default gcSteelblue;\r\n property OptimizedColumnDisplay: Boolean read FOptimizedColumnDisplay write SetOptimizedColumnDisplay default True;\r\n end;\r\n\r\n TTMSFNCTreeViewColumnEmptySpace = (tcesTopLeft, tcesTopRight, tcesBottomLeft, tcesBottomRight);\r\n TTMSFNCTreeViewGroupEmptySpace = (tgesTopLeft, tgesTopRight, tgesBottomLeft, tgesBottomRight);\r\n\r\n TTMSFNCTreeViewGroupsAppearance = class(TPersistent)\r\n private\r\n FTreeView: TTMSFNCCustomTreeView;\r\n FLayouts: TTMSFNCTreeViewGroupsLayouts;\r\n FBottomSize: Double;\r\n FTopSize: Double;\r\n FBottomFill: TTMSFNCGraphicsFill;\r\n FBottomStroke: TTMSFNCGraphicsStroke;\r\n FTopFill: TTMSFNCGraphicsFill;\r\n FTopStroke: TTMSFNCGraphicsStroke;\r\n FTopFont: TTMSFNCGraphicsFont;\r\n FBottomFont: TTMSFNCGraphicsFont;\r\n FBottomHorizontalTextAlign: TTMSFNCGraphicsTextAlign;\r\n FTopVerticalTextAlign: TTMSFNCGraphicsTextAlign;\r\n FTopHorizontalTextAlign: TTMSFNCGraphicsTextAlign;\r\n FBottomVerticalTextAlign: TTMSFNCGraphicsTextAlign;\r\n FTopVerticalText: Boolean;\r\n FBottomVerticalText: Boolean;\r\n FFillEmptySpaces: Boolean;\r\n procedure SetLayouts(const Value: TTMSFNCTreeViewGroupsLayouts);\r\n procedure SetBottomSize(const Value: Double);\r\n procedure SetTopSize(const Value: Double);\r\n procedure SetBottomFill(const Value: TTMSFNCGraphicsFill);\r\n procedure SetBottomStroke(const Value: TTMSFNCGraphicsStroke);\r\n procedure SetTopFill(const Value: TTMSFNCGraphicsFill);\r\n procedure SetTopStroke(const Value: TTMSFNCGraphicsStroke);\r\n procedure SetBottomFont(const Value: TTMSFNCGraphicsFont);\r\n procedure SetTopFont(const Value: TTMSFNCGraphicsFont);\r\n procedure SetBottomHorizontalTextAlign(\r\n const Value: TTMSFNCGraphicsTextAlign);\r\n procedure SetBottomVerticalTextAlign(const Value: TTMSFNCGraphicsTextAlign);\r\n procedure SetTopHorizontalTextAlign(const Value: TTMSFNCGraphicsTextAlign);\r\n procedure SetTopVerticalTextAlign(const Value: TTMSFNCGraphicsTextAlign);\r\n procedure SetTopVerticalText(const Value: Boolean);\r\n procedure SetBottomVerticalText(const Value: Boolean);\r\n procedure SetFillEmptySpaces(const Value: Boolean);\r\n protected\r\n procedure Changed(Sender: TObject);\r\n public\r\n constructor Create(ATreeView: TTMSFNCCustomTreeView);\r\n destructor Destroy; override;\r\n procedure Assign(Source: TPersistent); override;\r\n published\r\n property Layouts: TTMSFNCTreeViewGroupsLayouts read FLayouts write SetLayouts default [tglTop];\r\n property TopSize: Double read FTopSize write SetTopSize;\r\n property BottomSize: Double read FBottomSize write SetBottomSize;\r\n property TopFill: TTMSFNCGraphicsFill read FTopFill write SetTopFill;\r\n property BottomFill: TTMSFNCGraphicsFill read FBottomFill write SetBottomFill;\r\n property TopFont: TTMSFNCGraphicsFont read FTopFont write SetTopFont;\r\n property BottomFont: TTMSFNCGraphicsFont read FBottomFont write SetBottomFont;\r\n property TopStroke: TTMSFNCGraphicsStroke read FTopStroke write SetTopStroke;\r\n property BottomStroke: TTMSFNCGraphicsStroke read FBottomStroke write SetBottomStroke;\r\n property TopHorizontalTextAlign: TTMSFNCGraphicsTextAlign read FTopHorizontalTextAlign write SetTopHorizontalTextAlign default gtaCenter;\r\n property TopVerticalTextAlign: TTMSFNCGraphicsTextAlign read FTopVerticalTextAlign write SetTopVerticalTextAlign default gtaCenter;\r\n property BottomHorizontalTextAlign: TTMSFNCGraphicsTextAlign read FBottomHorizontalTextAlign write SetBottomHorizontalTextAlign default gtaCenter;\r\n property BottomVerticalTextAlign: TTMSFNCGraphicsTextAlign read FBottomVerticalTextAlign write SetBottomVerticalTextAlign default gtaCenter;\r\n property TopVerticalText: Boolean read FTopVerticalText write SetTopVerticalText default False;\r\n property BottomVerticalText: Boolean read FBottomVerticalText write SetBottomVerticalText default False;\r\n property FillEmptySpaces: Boolean read FFillEmptySpaces write SetFillEmptySpaces default True;\r\n end;\r\n\r\n TTMSFNCTreeViewBeforeDrawSortIndicatorEvent = procedure(Sender: TObject; AGraphics: TTMSFNCGraphics; ARect: TRectF; AColumn: Integer; ASortIndex: Integer; ASortKind: TTMSFNCTreeViewNodesSortKind; var ADefaultDraw: Boolean) of object;\r\n TTMSFNCTreeViewAfterDrawSortIndicatorEvent = procedure(Sender: TObject; AGraphics: TTMSFNCGraphics; ARect: TRectF; AColumn: Integer; ASortIndex: Integer; ASortKind: TTMSFNCTreeViewNodesSortKind) of object;\r\n TTMSFNCTreeViewNodeCompareEvent = procedure(Sender: TObject; Node1, Node2: TTMSFNCTreeViewNode; AColumn: Integer; var ACompareResult: Integer) of object;\r\n TTMSFNCTreeViewBeforeSizeColumnEvent = procedure(Sender: TObject; AColumn: Integer; AColumnSize: Double; var ANewColumnSize: Double; var AAllow: Boolean) of object;\r\n TTMSFNCTreeViewAfterSizeColumnEvent = procedure(Sender: TObject; AColumn: Integer; AColumnSize: Double) of object;\r\n TTMSFNCTreeViewBeforeDrawColumnEmptySpaceEvent = procedure(Sender: TObject; AGraphics: TTMSFNCGraphics; ARect: TRectF; ASpace: TTMSFNCTreeViewColumnEmptySpace; var AAllow: Boolean; var ADefaultDraw: Boolean) of object;\r\n TTMSFNCTreeViewAfterDrawColumnEmptySpaceEvent = procedure(Sender: TObject; AGraphics: TTMSFNCGraphics; ARect: TRectF; ASpace: TTMSFNCTreeViewColumnEmptySpace) of object;\r\n TTMSFNCTreeViewBeforeDrawGroupEmptySpaceEvent = procedure(Sender: TObject; AGraphics: TTMSFNCGraphics; ARect: TRectF; ASpace: TTMSFNCTreeViewGroupEmptySpace; var AAllow: Boolean; var ADefaultDraw: Boolean) of object;\r\n TTMSFNCTreeViewAfterDrawGroupEmptySpaceEvent = procedure(Sender: TObject; AGraphics: TTMSFNCGraphics; ARect: TRectF; ASpace: TTMSFNCTreeViewGroupEmptySpace) of object;\r\n\r\n TTMSFNCTreeViewNeedFilterDropDownDataEvent = procedure(Sender: TObject; AColumn: Integer; AValues: TStrings) of object;\r\n TTMSFNCTreeViewBeforeDrawColumnEvent = procedure(Sender: TObject; AGraphics: TTMSFNCGraphics; ARect: TRectF; AColumn: Integer; var AAllow: Boolean; var ADefaultDraw: Boolean) of object;\r\n TTMSFNCTreeViewAfterDrawColumnEvent = procedure(Sender: TObject; AGraphics: TTMSFNCGraphics; ARect: TRectF; AColumn: Integer) of object;\r\n TTMSFNCTreeViewBeforeDrawColumnHeaderEvent = procedure(Sender: TObject; AGraphics: TTMSFNCGraphics; ARect: TRectF; AColumn: Integer; AKind: TTMSFNCTreeViewCacheItemKind; var AAllow: Boolean; var ADefaultDraw: Boolean) of object;\r\n TTMSFNCTreeViewAfterDrawColumnHeaderEvent = procedure(Sender: TObject; AGraphics: TTMSFNCGraphics; ARect: TRectF; AColumn: Integer; AKind: TTMSFNCTreeViewCacheItemKind) of object;\r\n TTMSFNCTreeViewBeforeDrawGroupEvent = procedure(Sender: TObject; AGraphics: TTMSFNCGraphics; ARect: TRectF; AGroup, AStartColumn, AEndColumn: Integer; AKind: TTMSFNCTreeViewCacheItemKind; var AAllow: Boolean; var ADefaultDraw: Boolean) of object;\r\n TTMSFNCTreeViewAfterDrawGroupEvent = procedure(Sender: TObject; AGraphics: TTMSFNCGraphics; ARect: TRectF; AGroup, AStartColumn, AEndColumn: Integer; AKind: TTMSFNCTreeViewCacheItemKind) of object;\r\n\r\n TTMSFNCTreeViewBeforeDrawNodeEvent = procedure(Sender: TObject; AGraphics: TTMSFNCGraphics; ARect: TRectF; ANode: TTMSFNCTreeViewVirtualNode; var AAllow: Boolean; var ADefaultDraw: Boolean) of object;\r\n TTMSFNCTreeViewAfterDrawNodeEvent = procedure(Sender: TObject; AGraphics: TTMSFNCGraphics; ARect: TRectF; ANode: TTMSFNCTreeViewVirtualNode) of object;\r\n\r\n TTMSFNCTreeViewGetNumberOfNodesEvent = procedure(Sender: TObject; ANode: TTMSFNCTreeViewVirtualNode; var ANumberOfNodes: Integer) of object;\r\n\r\n TTMSFNCTreeViewGetColumnTextEvent = procedure(Sender: TObject; AColumn: Integer; AKind: TTMSFNCTreeViewCacheItemKind; var AText: String) of object;\r\n TTMSFNCTreeViewBeforeDrawColumnTextEvent = procedure(Sender: TObject; AGraphics: TTMSFNCGraphics; ARect: TRectF; AColumn: Integer; AKind: TTMSFNCTreeViewCacheItemKind; AText: String; var AAllow: Boolean) of object;\r\n TTMSFNCTreeViewAfterDrawColumnTextEvent = procedure(Sender: TObject; AGraphics: TTMSFNCGraphics; ARect: TRectF; AColumn: Integer; AKind: TTMSFNCTreeViewCacheItemKind; AText: String) of object;\r\n TTMSFNCTreeViewGetGroupTextEvent = procedure(Sender: TObject; AGroup: Integer; AKind: TTMSFNCTreeViewCacheItemKind; var AText: String) of object;\r\n TTMSFNCTreeViewBeforeDrawGroupTextEvent = procedure(Sender: TObject; AGraphics: TTMSFNCGraphics; ARect: TRectF; AGroup, AStartColumn, AEndColumn: Integer; AKind: TTMSFNCTreeViewCacheItemKind; AText: String; var AAllow: Boolean) of object;\r\n TTMSFNCTreeViewAfterDrawGroupTextEvent = procedure(Sender: TObject; AGraphics: TTMSFNCGraphics; ARect: TRectF; AGroup, AStartColumn, AEndColumn: Integer; AKind: TTMSFNCTreeViewCacheItemKind; AText: String) of object;\r\n TTMSFNCTreeViewNodeAnchorClickEvent = procedure(Sender: TObject; ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer; AAnchor: String) of object;\r\n TTMSFNCTreeViewNodeTitleAnchorClickEvent = procedure(Sender: TObject; ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer; AAnchor: String) of object;\r\n TTMSFNCTreeViewNodeChangedEvent = procedure(Sender: TObject; ANode: TTMSFNCTreeViewVirtualNode) of object;\r\n TTMSFNCTreeViewGetNodeTextEvent = procedure(Sender: TObject; ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer; AMode: TTMSFNCTreeViewNodeTextMode; var AText: String) of object;\r\n TTMSFNCTreeViewGetNodeDataEvent = procedure(Sender: TObject; ANode: TTMSFNCTreeViewVirtualNode) of object;\r\n TTMSFNCTreeViewGetNodeTitleEvent = procedure(Sender: TObject; ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer; AMode: TTMSFNCTreeViewNodeTextMode; var ATitle: String) of object;\r\n TTMSFNCTreeViewGetNodeTitleExpandedEvent = procedure(Sender: TObject; ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer; var AExpanded: Boolean) of object;\r\n TTMSFNCTreeViewGetNodeSidesEvent = procedure(Sender: TObject; ANode: TTMSFNCTreeViewVirtualNode; var ASides: TTMSFNCGraphicsSides) of object;\r\n TTMSFNCTreeViewGetNodeRoundingEvent = procedure(Sender: TObject; ANode: TTMSFNCTreeViewVirtualNode; var ARounding: Integer; var ACorners: TTMSFNCGraphicsCorners) of object;\r\n TTMSFNCTreeViewGetNodeTrimmingEvent = procedure(Sender: TObject; ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer; var ATrimming: TTMSFNCGraphicsTextTrimming) of object;\r\n TTMSFNCTreeViewGetNodeHorizontalTextAlignEvent = procedure(Sender: TObject; ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer; var AHorizontalTextAlign: TTMSFNCGraphicsTextAlign) of object;\r\n TTMSFNCTreeViewGetNodeVerticalTextAlignEvent = procedure(Sender: TObject; ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer; var AVerticalTextAlign: TTMSFNCGraphicsTextAlign) of object;\r\n TTMSFNCTreeViewGetNodeWordWrappingEvent = procedure(Sender: TObject; ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer; var AWordWrapping: Boolean) of object;\r\n TTMSFNCTreeViewGetNodeExtraSizeEvent = procedure(Sender: TObject; ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer; var AExtraSize: Single) of object;\r\n TTMSFNCTreeViewGetNodeTitleExtraSizeEvent = procedure(Sender: TObject; ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer; var ATitleExtraSize: Single) of object;\r\n TTMSFNCTreeViewGetColumnTrimmingEvent = procedure(Sender: TObject; AColumn: Integer; AKind: TTMSFNCTreeViewCacheItemKind; var ATrimming: TTMSFNCGraphicsTextTrimming) of object;\r\n TTMSFNCTreeViewGetColumnHorizontalTextAlignEvent = procedure(Sender: TObject; AColumn: Integer; AKind: TTMSFNCTreeViewCacheItemKind; var AHorizontalTextAlign: TTMSFNCGraphicsTextAlign) of object;\r\n TTMSFNCTreeViewGetColumnVerticalTextAlignEvent = procedure(Sender: TObject; AColumn: Integer; AKind: TTMSFNCTreeViewCacheItemKind; var AVerticalTextAlign: TTMSFNCGraphicsTextAlign) of object;\r\n TTMSFNCTreeViewGetColumnWordWrappingEvent = procedure(Sender: TObject; AColumn: Integer; AKind: TTMSFNCTreeViewCacheItemKind; var AWordWrapping: Boolean) of object;\r\n TTMSFNCTreeViewGetNodeIconEvent = procedure(Sender: TObject; ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer; ALarge: Boolean; var AIcon: TTMSFNCBitmap) of object;\r\n TTMSFNCTreeViewGetNodeIconSizeEvent = procedure(Sender: TObject; ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer; ALarge: Boolean; AIcon: TTMSFNCBitmap; var AIconWidth: Double; var AIconHeight: Double) of object;\r\n TTMSFNCTreeViewFocusedNodeChangedEvent = procedure(Sender: TObject; ANode: TTMSFNCTreeViewVirtualNode) of object;\r\n TTMSFNCTreeViewGetNodeHeightEvent = procedure(Sender: TObject; ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer; var AHeight: Double) of object;\r\n TTMSFNCTreeViewBeforeDrawNodeTextEvent = procedure(Sender: TObject; AGraphics: TTMSFNCGraphics; ARect: TRectF; AColumn: Integer; ANode: TTMSFNCTreeViewVirtualNode; {$IFNDEF UIPACK}var{$ENDIF} AText: String; var AAllow: Boolean) of object;\r\n TTMSFNCTreeViewAfterDrawNodeTextEvent = procedure(Sender: TObject; AGraphics: TTMSFNCGraphics; ARect: TRectF; AColumn: Integer; ANode: TTMSFNCTreeViewVirtualNode; AText: String) of object;\r\n TTMSFNCTreeViewBeforeDrawNodeTitleEvent = procedure(Sender: TObject; AGraphics: TTMSFNCGraphics; ARect: TRectF; AColumn: Integer; ANode: TTMSFNCTreeViewVirtualNode; ATitle: String; var AAllow: Boolean) of object;\r\n TTMSFNCTreeViewAfterDrawNodeTitleEvent = procedure(Sender: TObject; AGraphics: TTMSFNCGraphics; ARect: TRectF; AColumn: Integer; ANode: TTMSFNCTreeViewVirtualNode; ATitle: String) of object;\r\n TTMSFNCTreeViewBeforeDrawNodeExpandEvent = procedure(Sender: TObject; AGraphics: TTMSFNCGraphics; ARect: TRectF; AColumn: Integer; ANode: TTMSFNCTreeViewVirtualNode; AExpand:TTMSFNCBitmap; var AAllow: Boolean) of object;\r\n TTMSFNCTreeViewAfterDrawNodeExpandEvent = procedure(Sender: TObject; AGraphics: TTMSFNCGraphics; ARect: TRectF; AColumn: Integer; ANode: TTMSFNCTreeViewVirtualNode; AExpand:TTMSFNCBitmap) of object;\r\n TTMSFNCTreeViewBeforeDrawNodeIconEvent = procedure(Sender: TObject; AGraphics: TTMSFNCGraphics; ARect: TRectF; AColumn: Integer; ANode: TTMSFNCTreeViewVirtualNode; AIcon:TTMSFNCBitmap; var AAllow: Boolean) of object;\r\n TTMSFNCTreeViewAfterDrawNodeIconEvent = procedure(Sender: TObject; AGraphics: TTMSFNCGraphics; ARect: TRectF; AColumn: Integer; ANode: TTMSFNCTreeViewVirtualNode; AIcon:TTMSFNCBitmap) of object;\r\n TTMSFNCTreeViewBeforeDrawNodeExtraEvent = procedure(Sender: TObject; AGraphics: TTMSFNCGraphics; ARect: TRectF; AColumn: Integer; ANode: TTMSFNCTreeViewVirtualNode; var AAllow: Boolean) of object;\r\n TTMSFNCTreeViewAfterDrawNodeExtraEvent = procedure(Sender: TObject; AGraphics: TTMSFNCGraphics; ARect: TRectF; AColumn: Integer; ANode: TTMSFNCTreeViewVirtualNode) of object;\r\n TTMSFNCTreeViewDrawNodeExtraEvent = procedure(Sender: TObject; AGraphics: TTMSFNCGraphics; ARect: TRectF; AColumn: Integer; ANode: TTMSFNCTreeViewVirtualNode) of object;\r\n TTMSFNCTreeViewBeforeDrawNodeTitleExtraEvent = procedure(Sender: TObject; AGraphics: TTMSFNCGraphics; ARect: TRectF; AColumn: Integer; ANode: TTMSFNCTreeViewVirtualNode; var AAllow: Boolean) of object;\r\n TTMSFNCTreeViewAfterDrawNodeTitleExtraEvent = procedure(Sender: TObject; AGraphics: TTMSFNCGraphics; ARect: TRectF; AColumn: Integer; ANode: TTMSFNCTreeViewVirtualNode) of object;\r\n TTMSFNCTreeViewDrawNodeTitleExtraEvent = procedure(Sender: TObject; AGraphics: TTMSFNCGraphics; ARect: TRectF; AColumn: Integer; ANode: TTMSFNCTreeViewVirtualNode) of object;\r\n TTMSFNCTreeViewBeforeDrawNodeCheckEvent = procedure(Sender: TObject; AGraphics: TTMSFNCGraphics; ARect: TRectF; AColumn: Integer; ANode: TTMSFNCTreeViewVirtualNode; ACheck: TTMSFNCBitmap; var AAllow: Boolean) of object;\r\n TTMSFNCTreeViewAfterDrawNodeCheckEvent = procedure(Sender: TObject; AGraphics: TTMSFNCGraphics; ARect: TRectF; AColumn: Integer; ANode: TTMSFNCTreeViewVirtualNode; ACheck: TTMSFNCBitmap) of object;\r\n TTMSFNCTreeViewGetNodeColorEvent = procedure(Sender: TObject; ANode: TTMSFNCTreeViewVirtualNode; var AColor: TTMSFNCGraphicsColor) of object;\r\n TTMSFNCTreeViewGetNodeCheckTypeEvent = procedure(Sender: TObject; ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer; var ACheckType: TTMSFNCTreeViewNodeCheckType) of object;\r\n TTMSFNCTreeViewGetNodeTextColorEvent = procedure(Sender: TObject; ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer; var ATextColor: TTMSFNCGraphicsColor) of object;\r\n TTMSFNCTreeViewGetNodeTitleColorEvent = procedure(Sender: TObject; ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer; var ATitleColor: TTMSFNCGraphicsColor) of object;\r\n TTMSFNCTreeViewIsNodeExtendedEvent = procedure(Sender: TObject; ANode: TTMSFNCTreeViewVirtualNode; var AExtended: Boolean) of object;\r\n TTMSFNCTreeViewColumnAnchorClickEvent = procedure(Sender: TObject; AColumn: Integer; AAnchor: String) of object;\r\n TTMSFNCTreeViewCustomizeFilterListBoxEvent = procedure(Sender: TObject; AColumn: Integer; AListBox: TListBox) of object;\r\n\r\n TTMSFNCTreeViewIsNodeDeletableEvent = procedure(Sender: TObject; ANode: TTMSFNCTreeViewVirtualNode; var ADeletable: Boolean) of object;\r\n TTMSFNCTreeViewIsNodeCheckedEvent = procedure(Sender: TObject; ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer; var AChecked: Boolean) of object;\r\n TTMSFNCTreeViewIsNodeExpandedEvent = procedure(Sender: TObject; ANode: TTMSFNCTreeViewVirtualNode; var AExpanded: Boolean) of object;\r\n TTMSFNCTreeViewIsNodeVisibleEvent = procedure(Sender: TObject; ANode: TTMSFNCTreeViewVirtualNode; var AVisible: Boolean) of object;\r\n TTMSFNCTreeViewIsNodeEnabledEvent = procedure(Sender: TObject; ANode: TTMSFNCTreeViewVirtualNode; var AEnabled: Boolean) of object;\r\n\r\n TTMSFNCTreeViewBeforeUpdateNodeEvent = procedure(Sender: TObject; ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer; var AText: String; var ACanUpdate: Boolean) of object;\r\n TTMSFNCTreeViewAfterUpdateNodeEvent = procedure(Sender: TObject; ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer) of object;\r\n TTMSFNCTreeViewBeforeCollapseNodeEvent = procedure(Sender: TObject; ANode: TTMSFNCTreeViewVirtualNode; var ACanCollapse: Boolean) of object;\r\n TTMSFNCTreeViewAfterCollapseNodeEvent = procedure(Sender: TObject; ANode: TTMSFNCTreeViewVirtualNode) of object;\r\n TTMSFNCTreeViewBeforeExpandNodeEvent = procedure(Sender: TObject; ANode: TTMSFNCTreeViewVirtualNode; var ACanExpand: Boolean) of object;\r\n TTMSFNCTreeViewAfterExpandNodeEvent = procedure(Sender: TObject; ANode: TTMSFNCTreeViewVirtualNode) of object;\r\n TTMSFNCTreeViewBeforeCheckNodeEvent = procedure(Sender: TObject; ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer; var ACanCheck: Boolean) of object;\r\n TTMSFNCTreeViewAfterCheckNodeEvent = procedure(Sender: TObject; ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer) of object;\r\n TTMSFNCTreeViewBeforeUnCheckNodeEvent = procedure(Sender: TObject; ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer; var ACanUnCheck: Boolean) of object;\r\n TTMSFNCTreeViewAfterUnCheckNodeEvent = procedure(Sender: TObject; ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer) of object;\r\n\r\n TTMSFNCTreeViewBeforeSelectAllNodesEvent = procedure(Sender: TObject; var ACanSelect: Boolean) of object;\r\n TTMSFNCTreeViewAfterSelectAllNodesEvent = procedure(Sender: TObject) of object;\r\n\r\n TTMSFNCTreeViewBeforeSelectNodeEvent = procedure(Sender: TObject; ANode: TTMSFNCTreeViewVirtualNode; var ACanSelect: Boolean) of object;\r\n TTMSFNCTreeViewAfterSelectNodeEvent = procedure(Sender: TObject; ANode: TTMSFNCTreeViewVirtualNode) of object;\r\n TTMSFNCTreeViewBeforeUnSelectNodeEvent = procedure(Sender: TObject; ANode: TTMSFNCTreeViewVirtualNode; var ACanUnSelect: Boolean) of object;\r\n TTMSFNCTreeViewAfterUnSelectNodeEvent = procedure(Sender: TObject; ANode: TTMSFNCTreeViewVirtualNode) of object;\r\n\r\n TTMSFNCTreeViewNodeClickEvent = procedure(Sender: TObject; ANode: TTMSFNCTreeViewVirtualNode) of object;\r\n TTMSFNCTreeViewNodeValueClickEvent = procedure(Sender: TObject; ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer) of object;\r\n TTMSFNCTreeViewNodeMouseEnterEvent = procedure(Sender: TObject; ANode: TTMSFNCTreeViewVirtualNode) of object;\r\n TTMSFNCTreeViewNodeMouseLeaveEvent = procedure(Sender: TObject; ANode: TTMSFNCTreeViewVirtualNode) of object;\r\n\r\n TTMSFNCTreeViewScrollEvent = procedure(Sender: TObject; APosition: Single) of object;\r\n\r\n {$IFDEF FNCLIB}\r\n TTMSFNCTreeViewBeforeAddJSONNodeEvent = procedure(Sender: TObject; AJSONValue: TJSONValue; var AAddNode: Boolean) of object;\r\n TTMSFNCTreeViewAfterAddJSONNodeEvent = procedure(Sender: TObject; ANode: TTMSFNCTreeViewNode; AJSONValue: TJSONValue) of object;\r\n {$ENDIF}\r\n TTMSFNCTreeViewGetHTMLTemplateValueEvent = procedure(Sender: TObject; ANodeValue: TTMSFNCTreeViewNodeValue; AName: string; var AValue: string) of object;\r\n TTMSFNCTreeViewGetHTMLTemplateEvent = procedure(Sender: TObject; ANodeValue: TTMSFNCTreeViewNodeValue; AColumnIndex: Integer; var AHTMLTemplate: string) of object;\r\n\r\n {$IFDEF FMXLIB}\r\n TTMSFNCTreeViewInplaceEditor = TControl;\r\n {$ENDIF}\r\n {$IFDEF CMNWEBLIB}\r\n TTMSFNCTreeViewInplaceEditor = TWinControl;\r\n {$ENDIF}\r\n TTMSFNCTreeViewInplaceEditorClass = class of TTMSFNCTreeViewInplaceEditor;\r\n\r\n TTMSFNCTreeViewCustomizeInplaceEditorEvent = procedure(Sender: TObject; ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer; AInplaceEditor: TTMSFNCTreeViewInplaceEditor) of object;\r\n TTMSFNCTreeViewGetInplaceEditorRectEvent = procedure(Sender: TObject; ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer; AInplaceEditor: TTMSFNCTreeViewInplaceEditor; var AInplaceEditorRect: TRectF) of object;\r\n TTMSFNCTreeViewGetInplaceEditorEvent = procedure(Sender: TObject; ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer;{$IFDEF FMXLIB} var ATransparent: Boolean; {$ENDIF}var AInplaceEditorClass: TTMSFNCTreeViewInplaceEditorClass) of object;\r\n TTMSFNCTreeViewBeforeOpenInplaceEditorEvent = procedure(Sender: TObject; ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer; var ACanOpen: Boolean) of object;\r\n TTMSFNCTreeViewAfterOpenInplaceEditorEvent = procedure(Sender: TObject; ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer; AInplaceEditor: TTMSFNCTreeViewInplaceEditor; AInplaceEditorRect: TRectF) of object;\r\n TTMSFNCTreeViewCloseInplaceEditorEvent = procedure(Sender: TObject; ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer; AInplaceEditor: TTMSFNCTreeViewInplaceEditor; ACancelled: Boolean; var ACanClose: Boolean) of object;\r\n TTMSFNCTreeViewBeforeReorderNodeEvent = procedure(Sender: TObject; AFromNode, AToNode: TTMSFNCTreeViewVirtualNode; var ACanReorder: Boolean) of object;\r\n TTMSFNCTreeViewAfterReorderNodeEvent = procedure(Sender: TObject; AFromNode, AToNode: TTMSFNCTreeViewVirtualNode) of object;\r\n TTMSFNCTreeViewBeforeSortNodesEvent = procedure(Sender: TObject; ASortColumn: Integer; ASortMode: TTMSFNCTreeViewNodesSortMode; var ACanSort: Boolean) of object;\r\n TTMSFNCTreeViewAfterSortNodesEvent = procedure(Sender: TObject; ASortColumn: Integer; ASortMode: TTMSFNCTreeViewNodesSortMode) of object;\r\n TTMSFNCTreeViewBeforeDropNodeEvent = procedure(Sender: TObject; AFromNode, AToNode: TTMSFNCTreeViewVirtualNode; var ACanDrop: Boolean) of object;\r\n TTMSFNCTreeViewAfterDropNodeEvent = procedure(Sender: TObject; AFromNode, AToNode: TTMSFNCTreeViewVirtualNode) of object;\r\n TTMSFNCTreeViewBeforeCopyToClipboardEvent = procedure(Sender: TObject; var ACanCopy: Boolean) of object;\r\n TTMSFNCTreeViewBeforeCutToClipboardEvent = procedure(Sender: TObject; var ACanCut: Boolean) of object;\r\n TTMSFNCTreeViewBeforePasteFromClipboardEvent = procedure(Sender: TObject; var ACanPaste: Boolean) of object;\r\n TTMSFNCTreeViewAfterCopyToClipboardEvent = procedure(Sender: TObject) of object;\r\n TTMSFNCTreeViewAfterCutToClipboardEvent = procedure(Sender: TObject) of object;\r\n TTMSFNCTreeViewAfterPasteFromClipboardEvent = procedure(Sender: TObject) of object;\r\n\r\n TTMSFNCTreeViewFilterSelectEvent = procedure(Sender: TObject; AColumn: Integer; var ACondition: string) of object;\r\n\r\n TTMSFNCTreeViewMouseEditMode = (tmemDoubleClick, tmemSingleClick, tmemSingleClickOnSelectedNode);\r\n\r\n TTMSFNCTreeViewClipboardMode = (tcmNone, tcmTextOnly, tcmFull);\r\n TTMSFNCTreeViewDragDropMode = (tdmNone, tdmMove, tdmCopy);\r\n\r\n TMultiSelectStyles = (msControlSelect, msShiftSelect, msVisibleOnly, msSiblingOnly);\r\n TMultiSelectStyle = set of TMultiSelectStyles;\r\n\r\n TTMSFNCTreeViewInteraction = class;\r\n\r\n TTMSFNCTreeViewLookup = class(TPersistent)\r\n private\r\n FOwner: TTMSFNCTreeViewInteraction;\r\n FEnabled: Boolean;\r\n FCaseSensitive: Boolean;\r\n FIncremental: Boolean;\r\n FColumn: Integer;\r\n FAutoSelect: Boolean;\r\n FRootNodesOnly: Boolean;\r\n FAutoExpand: Boolean;\r\n FVisibleNodesOnly: Boolean;\r\n public\r\n constructor Create(AOwner: TTMSFNCTreeViewInteraction);\r\n destructor Destroy; override;\r\n procedure Assign(Source: TPersistent); override;\r\n published\r\n property CaseSensitive: Boolean read FCaseSensitive write FCaseSensitive default False;\r\n property Enabled: Boolean read FEnabled write FEnabled default True;\r\n property Incremental: Boolean read FIncremental write FIncremental default True;\r\n property Column: Integer read FColumn write FColumn default -1;\r\n property RootNodesOnly: Boolean read FRootNodesOnly write FRootNodesOnly default False;\r\n property VisibleNodesOnly: Boolean read FVisibleNodesOnly write FVisibleNodesOnly default False;\r\n property AutoExpand: Boolean read FAutoExpand write FAutoExpand default False;\r\n property AutoSelect: Boolean read FAutoSelect write FAutoSelect default True;\r\n end;\r\n\r\n TTMSFNCTreeViewInteraction = class(TPersistent)\r\n private\r\n FTreeView: TTMSFNCCustomTreeView;\r\n FMultiSelect: Boolean;\r\n FTouchScrolling: Boolean;\r\n FReadOnly: Boolean;\r\n FColumnSizing: Boolean;\r\n FColumnAutoSizeOnDblClick: Boolean;\r\n FExtendedSelectable: Boolean;\r\n FSelectionFollowsFocus: Boolean;\r\n FKeyboardEdit: Boolean;\r\n FMouseEditMode: TTMSFNCTreeViewMouseEditMode;\r\n FExtendedEditable: Boolean;\r\n FClipboardMode: TTMSFNCTreeViewClipboardMode;\r\n FReorder: Boolean;\r\n FDragDropMode: TTMSFNCTreeViewDragDropMode;\r\n FLookup: TTMSFNCTreeViewLookup;\r\n FExpandCollapseOnDblClick: Boolean;\r\n FAutoOpenURL: Boolean;\r\n FURLDetectionOnMouseMove: Boolean;\r\n FMouseWheelDelta: Single;\r\n FAnimationFactor: Single;\r\n FMultiSelectStyle: TMultiSelectStyle;\r\n procedure SetMultiSelect(const Value: Boolean);\r\n procedure SetTouchScrolling(const Value: Boolean);\r\n procedure SetReadOnly(const Value: Boolean);\r\n procedure SetColumnSizing(const Value: Boolean);\r\n procedure SetColumnAutoSizeOnDblClick(const Value: Boolean);\r\n procedure SetExtendedSelectable(const Value: Boolean);\r\n procedure SetSelectionFollowsFocus(const Value: Boolean);\r\n procedure SetMouseEditMode(const Value: TTMSFNCTreeViewMouseEditMode);\r\n procedure SetExtendedEditable(const Value: Boolean);\r\n procedure SetDragDropMode(const Value: TTMSFNCTreeViewDragDropMode);\r\n procedure SetReorder(const Value: Boolean);\r\n procedure SetLookup(const Value: TTMSFNCTreeViewLookup);\r\n procedure SetExpandCollapseOnDblClick(const Value: Boolean);\r\n procedure SetURLDetectionOnMouseMove(const Value: Boolean);\r\n function IsMouseWheelDeltaStored: Boolean;\r\n procedure SetMouseWheelDelta(const Value: Single);\r\n function IsAnimationFactorStored: Boolean;\r\n procedure SetMultiSelectStyle(const Value: TMultiSelectStyle);\r\n protected\r\n property SelectionFollowsFocus: Boolean read FSelectionFollowsFocus write SetSelectionFollowsFocus default True;\r\n public\r\n constructor Create(ATreeView: TTMSFNCCustomTreeView);\r\n destructor Destroy; override;\r\n procedure Assign(Source: TPersistent); override;\r\n published\r\n property AnimationFactor: Single read FAnimationFactor write FAnimationFactor stored IsAnimationFactorStored nodefault;\r\n property AutoOpenURL: Boolean read FAutoOpenURL write FAutoOpenURL default True;\r\n property MultiSelect: Boolean read FMultiSelect write SetMultiSelect default false;\r\n property MultiSelectStyle: TMultiSelectStyle read FMultiSelectStyle write SetMultiSelectStyle default [msControlSelect, msShiftSelect];\r\n property ExtendedSelectable: Boolean read FExtendedSelectable write SetExtendedSelectable default False;\r\n property ExtendedEditable: Boolean read FExtendedEditable write SetExtendedEditable default False;\r\n property MouseEditMode: TTMSFNCTreeViewMouseEditMode read FMouseEditMode write SetMouseEditMode default tmemSingleClickOnSelectedNode;\r\n property MouseWheelDelta: Single read FMouseWheelDelta write SetMouseWheelDelta stored IsMouseWheelDeltaStored nodefault;\r\n property TouchScrolling: Boolean read FTouchScrolling write SetTouchScrolling default True;\r\n property KeyboardEdit: Boolean read FKeyboardEdit write FKeyboardEdit default True;\r\n property ReadOnly: Boolean read FReadOnly write SetReadOnly default False;\r\n property ExpandCollapseOnDblClick: Boolean read FExpandCollapseOnDblClick write SetExpandCollapseOnDblClick default True;\r\n property ColumnSizing: Boolean read FColumnSizing write SetColumnSizing default False;\r\n property ColumnAutoSizeOnDblClick: Boolean read FColumnAutoSizeOnDblClick write SetColumnAutoSizeOnDblClick default False;\r\n property ClipboardMode: TTMSFNCTreeViewClipboardMode read FClipboardMode write FClipboardMode default tcmNone;\r\n property Reorder: Boolean read FReorder write SetReorder default False;\r\n property DragDropMode: TTMSFNCTreeViewDragDropMode read FDragDropMode write SetDragDropMode default tdmNone;\r\n property Lookup: TTMSFNCTreeViewLookup read FLookup write SetLookup;\r\n property URLDetectionOnMouseMove: Boolean read FURLDetectionOnMouseMove write SetURLDetectionOnMouseMove default true;\r\n end;\r\n\r\n TTMSFNCTreeViewSceneDrawingScale = record\r\n SceneScale: Double;\r\n DrawingScale: TPointF;\r\n end;\r\n\r\n {$IFDEF WEBLIB}\r\n TTMSFNCTreeViewSelectedNodes = class(TList)\r\n private\r\n function GetItem(Index: Integer): TTMSFNCTreeViewVirtualNode;\r\n procedure SetItem(Index: Integer; const Value: TTMSFNCTreeViewVirtualNode);\r\n public\r\n property Items[Index: Integer]: TTMSFNCTreeViewVirtualNode read GetItem write SetItem; default;\r\n end;\r\n {$ENDIF}\r\n {$IFNDEF WEBLIB}\r\n TTMSFNCTreeViewSelectedNodes = class(TList);\r\n {$ENDIF}\r\n TTMSFNCTreeViewNodeArray = array of TTMSFNCTreeViewNode;\r\n\r\n TTMSFNCTreeViewNodeCheck = record\r\n AColumn: Integer;\r\n ANode: TTMSFNCTreeViewVirtualNode;\r\n end;\r\n\r\n TTMSFNCTreeViewNodeIcon = record\r\n AColumn: Integer;\r\n ANode: TTMSFNCTreeViewVirtualNode;\r\n end;\r\n\r\n TTMSFNCTreeViewNodeAnchor = record\r\n AAnchor: String;\r\n AColumn: Integer;\r\n end;\r\n\r\n TTMSFNCTreeViewComboBox = class(TComboBox);\r\n {$IFDEF FMXLIB}\r\n TTMSFNCTreeViewCaretPosition = TCaretPosition;\r\n TTMSFNCTreeViewMemo = class(TMemo)\r\n end;\r\n TTMSFNCTreeViewEdit = class(TEdit)\r\n protected\r\n function GetDefaultStyleLookupName: string; override;\r\n end;\r\n {$ENDIF}\r\n {$IFDEF CMNWEBLIB}\r\n TTMSFNCTreeViewCaretPosition = TPoint;\r\n TTMSFNCTreeViewMemo = class(TMemo)\r\n private\r\n FTreeView: TTMSFNCCustomTreeView;\r\n protected\r\n procedure KeyDown(var Key: Word; Shift: TShiftState); override;\r\n procedure DoExit; override;\r\n public\r\n constructor Create(AOwner: TComponent); override;\r\n end;\r\n TTMSFNCTreeViewEdit = class(TEdit)\r\n private\r\n FTreeView: TTMSFNCCustomTreeView;\r\n protected\r\n procedure KeyDown(var Key: Word; Shift: TShiftState); override;\r\n procedure DoExit; override;\r\n public\r\n constructor Create(AOwner: TComponent); override;\r\n end;\r\n {$ENDIF}\r\n\r\n TTMSFNCTreeViewCopyNodes = class(TTMSFNCTreeViewNodes);\r\n\r\n TTMSFNCTreeViewDragOverEvent = procedure(Sender: TObject; Source: TObject; Point: TPointF; var Accept: Boolean) of object;\r\n TTMSFNCTreeViewDragDropEvent = procedure(Sender: TObject; Source: TObject; Point: TPointF) of object;\r\n TTMSFNCTreeViewColumnSortEvent = procedure(Sender: TObject; AColumn: Integer; ASortMode: TTMSFNCTreeViewNodesSortMode) of object;\r\n TTMSFNCTreeViewLookupEvent = procedure(Sender: TObject; ALookupString: String) of object;\r\n TTMSFNCTreeViewReorderEvent = procedure(Sender: TObject; AFromNode, AToNode: TTMSFNCTreeViewVirtualNode) of object;\r\n\r\n TTMSFNCTreeViewExportState = (tvesExportStart, tvesExportNewRow, tvesExportDone, tvesExportSelRow, tvesExportFail, tvesExportNextRow, tvesExportFindRow);\r\n\r\n TTMSFNCTreeViewAdapter = class(TTMSFNCCustomComponent)\r\n private\r\n FBlockAdd: Boolean;\r\n FTreeView: TTMSFNCCustomTreeView;\r\n FActive: boolean;\r\n procedure SetActive(const Value: boolean);\r\n procedure SetTreeView(const Value: TTMSFNCCustomTreeView);\r\n protected\r\n function GetInstance: NativeUInt; override;\r\n procedure GetNumberOfNodes(ANode: TTMSFNCTreeViewVirtualNode; var ANumberOfNodes: Integer); virtual;\r\n procedure Notification(AComponent: TComponent; Operation: TOperation); override;\r\n procedure UpdateBounds; virtual;\r\n procedure Initialize; virtual;\r\n procedure ScrollTreeView({%H-}ADelta: Integer); virtual;\r\n procedure SelectNode({%H-}ANode: TTMSFNCTreeViewVirtualNode); virtual;\r\n procedure GetNodeText({%H-}ACol: Integer;{%H-}ANode: TTMSFNCTreeViewVirtualNode; var {%H-}AText: String); virtual;\r\n procedure ExportNotification({%H-}AState: TTMSFNCTreeViewExportState; {%H-}ARow: Integer); virtual;\r\n function GetColumnDisplayName({%H-}ACol: Integer): String; virtual;\r\n public\r\n constructor Create(AOwner: TComponent); override;\r\n published\r\n property Active: Boolean read FActive write SetActive default False;\r\n property TreeView: TTMSFNCCustomTreeView read FTreeView write SetTreeView;\r\n end;\r\n\r\n {$IFDEF FNCLIB}\r\n TTMSFNCTreeViewViewJSONOptions = class(TPersistent)\r\n private\r\n FValueHTMLTemplate: string;\r\n FExpandNodes: Boolean;\r\n FNameHTMLTemplate: string;\r\n FOnChange: TNotifyEvent;\r\n FStretchColumn: Integer;\r\n FArrayItemPrefix: string;\r\n FArrayItemSuffix: string;\r\n protected\r\n procedure Changed;\r\n// function GetOwner: TPersistent; override;\r\n public\r\n constructor Create;\r\n destructor Destroy; override;\r\n procedure Assign(Source: TPersistent); override;\r\n property OnChange: TNotifyEvent read FOnChange write FOnChange;\r\n published\r\n property ExpandNodes: Boolean read FExpandNodes write FExpandNodes default True;\r\n property StretchColumn: Integer read FStretchColumn write FStretchColumn default 1;\r\n property NameHTMLTemplate: string read FNameHTMLTemplate write FNameHTMLTemplate; //Use <#NAME>\r\n property ValueHTMLTemplate: string read FValueHTMLTemplate write FValueHTMLTemplate; //Use <#VALUE>\r\n property ArrayItemPrefix: string read FArrayItemPrefix write FArrayItemPrefix;\r\n property ArrayItemSuffix: string read FArrayItemSuffix write FArrayItemSuffix;\r\n end;\r\n {$ENDIF}\r\n\r\n TTMSFNCCustomTreeView = class(TTMSFNCTreeViewData, ITMSFNCAppearanceGlobalFont)\r\n private\r\n FPrevDSP: TTMSFNCTreeViewCacheItem;\r\n FOldTopRow: Integer;\r\n FCompactMode: Boolean;\r\n FVerticalOffset, FVerticalOffsetTo: Double;\r\n FAccepted: Boolean;\r\n FLookupString: String;\r\n FY, FDragY, FSaveDragY: Single;\r\n FX: Single;\r\n FDragBitmap: TTMSFNCImage;\r\n FReorderMode, FDragMode, FDragModeStarted: Boolean;\r\n FSortColumn: Integer;\r\n FClosing: Boolean;\r\n FInplaceEditorClosed: Boolean;\r\n FColumnSize: Double;\r\n FCloseWithDialogKey: Boolean;\r\n FFilterPopup: TTMSFNCPopup;\r\n FFilterListBox: TListBox;\r\n FFilterTimer: TTimer;\r\n FInplaceEditorClass: TTMSFNCTreeViewInplaceEditorClass;\r\n FInplaceEditor, FOldInplaceEditor: TTMSFNCTreeViewInplaceEditor;\r\n FInplaceEditorActive: Boolean;\r\n FSizeColumn, FDownColumnValue, FDownColumn, FDownColumnFilter, FDownColumnExpand: Integer;\r\n FUpdateNodeColumn: Integer;\r\n FUpdateNode: TTMSFNCTreeViewVirtualNode;\r\n FCopyNodes: TTMSFNCTreeViewCopyNodes;\r\n {$IFDEF FMXLIB}\r\n FScrollBarTimer: TTimer;\r\n FInplaceEditorTimer: TTimer;\r\n {$ENDIF}\r\n FDoubleSelection: Boolean;\r\n FDragTimer: TTimer;\r\n FDragRow: Integer;\r\n FDownNode, FFocusedNode, FDragNode: TTMSFNCTreeViewVirtualNode;\r\n FDblClicked: Boolean;\r\n FDoNodeAnchor, FDoNodeTitleAnchor: TTMSFNCTreeViewNodeAnchor;\r\n FDoNodeCheck: TTMSFNCTreeViewNodeCheck;\r\n FDoNodeExpand: Boolean;\r\n FDoNodeExtra: Boolean;\r\n FDoNodeTitleExtra: Boolean;\r\n FScrolling: Boolean;\r\n FMouseUp, FAnimateVerticalPos, FAnimateHorizontalPos, FAnimateVerticalOffset: Boolean;\r\n FAnimating: Boolean;\r\n FSpX, FSpY: Double;\r\n FScrollX, FScrollY, FDownX, FDownY, FMouseX, FMouseY, FSizeX: Double;\r\n FScrollVTo, FScrollHTo: Double;\r\n FTimeStart, FTimeStop: Double;\r\n FAnimateTimer: TTimer;\r\n FNodeCache: TTMSFNCTreeViewNodeCache;\r\n FColumnsTopCache: TTMSFNCTreeViewColumnsTopCache;\r\n FColumnsBottomCache: TTMSFNCTreeViewColumnsBottomCache;\r\n FGroupsTopCache: TTMSFNCTreeViewGroupsTopCache;\r\n FGroupsBottomCache: TTMSFNCTreeViewGroupsBottomCache;\r\n FNodeDisplay: TTMSFNCTreeViewNodeDisplayList;\r\n FColumnsTopDisplay: TTMSFNCTreeViewColumnsTopDisplayList;\r\n FColumnsBottomDisplay: TTMSFNCTreeViewColumnsBottomDisplayList;\r\n FGroupsTopDisplay: TTMSFNCTreeViewGroupsTopDisplayList;\r\n FGroupsBottomDisplay: TTMSFNCTreeViewGroupsBottomDisplayList;\r\n FNodesAppearance: TTMSFNCTreeViewNodesAppearance;\r\n FColumnsCaching: Boolean;\r\n FGroupsCaching: Boolean;\r\n FGroupsAppearance: TTMSFNCTreeViewGroupsAppearance;\r\n FColumnsAppearance: TTMSFNCTreeViewColumnsAppearance;\r\n FOnAfterDrawGroup: TTMSFNCTreeViewAfterDrawGroupEvent;\r\n FOnNodeCompare: TTMSFNCTreeViewNodeCompareEvent;\r\n FOnBeforeSizeColumn: TTMSFNCTreeViewBeforeSizeColumnEvent;\r\n FOnAfterSizeColumn: TTMSFNCTreeViewAfterSizeColumnEvent;\r\n FOnBeforeDrawColumn: TTMSFNCTreeViewBeforeDrawColumnEvent;\r\n FOnBeforeDrawColumnHeader: TTMSFNCTreeViewBeforeDrawColumnHeaderEvent;\r\n FOnAfterDrawColumnHeader: TTMSFNCTreeViewAfterDrawColumnHeaderEvent;\r\n FOnBeforeDrawNode: TTMSFNCTreeViewBeforeDrawNodeEvent;\r\n FOnAfterDrawColumn: TTMSFNCTreeViewAfterDrawColumnEvent;\r\n FOnBeforeDrawGroup: TTMSFNCTreeViewBeforeDrawGroupEvent;\r\n FOnAfterDrawNode: TTMSFNCTreeViewAfterDrawNodeEvent;\r\n FOnBeforeDrawNodeText: TTMSFNCTreeViewBeforeDrawNodeTextEvent;\r\n FOnBeforeDrawNodeTitle: TTMSFNCTreeViewBeforeDrawNodeTitleEvent;\r\n FOnGetNodeHeight: TTMSFNCTreeViewGetNodeHeightEvent;\r\n FOnAfterDrawColumnText: TTMSFNCTreeViewAfterDrawColumnTextEvent;\r\n FOnBeforeDrawGroupText: TTMSFNCTreeViewBeforeDrawGroupTextEvent;\r\n FOnAfterDrawNodeText: TTMSFNCTreeViewAfterDrawNodeTextEvent;\r\n FOnAfterDrawNodeTitle: TTMSFNCTreeViewAfterDrawNodeTitleEvent;\r\n FOnAfterDrawGroupText: TTMSFNCTreeViewAfterDrawGroupTextEvent;\r\n FOnBeforeDrawColumnText: TTMSFNCTreeViewBeforeDrawColumnTextEvent;\r\n FInteraction: TTMSFNCTreeViewInteraction;\r\n FOnAfterUpdateNode: TTMSFNCTreeViewAfterUpdateNodeEvent;\r\n FOnBeforeUpdateNode: TTMSFNCTreeViewBeforeUpdateNodeEvent;\r\n FOnAfterUnCheckNode: TTMSFNCTreeViewAfterUnCheckNodeEvent;\r\n FOnBeforeUnCheckNode: TTMSFNCTreeViewBeforeUnCheckNodeEvent;\r\n FOnAfterCheckNode: TTMSFNCTreeViewAfterCheckNodeEvent;\r\n FOnBeforeCheckNode: TTMSFNCTreeViewBeforeCheckNodeEvent;\r\n FOnAfterExpandNode: TTMSFNCTreeViewAfterExpandNodeEvent;\r\n FOnBeforeExpandNode: TTMSFNCTreeViewBeforeExpandNodeEvent;\r\n FOnAfterCollapseNode: TTMSFNCTreeViewAfterCollapseNodeEvent;\r\n FOnBeforeCollapseNode: TTMSFNCTreeViewBeforeCollapseNodeEvent;\r\n FOnBeforeSelectNode: TTMSFNCTreeViewBeforeSelectNodeEvent;\r\n FOnAfterSelectNode: TTMSFNCTreeViewAfterSelectNodeEvent;\r\n FOnBeforeSelectAllNodes: TTMSFNCTreeViewBeforeSelectAllNodesEvent;\r\n FOnAfterSelectAllNodes: TTMSFNCTreeViewAfterSelectAllNodesEvent;\r\n FOnNodeClick: TTMSFNCTreeViewNodeClickEvent;\r\n FOnNodeValueClick: TTMSFNCTreeViewNodeValueClickEvent;\r\n FOnNodeDblClick: TTMSFNCTreeViewNodeClickEvent;\r\n FOnGetNodeText: TTMSFNCTreeViewGetNodeTextEvent;\r\n FOnGetNodeTitle: TTMSFNCTreeViewGetNodeTitleEvent;\r\n FOnGetColumnText: TTMSFNCTreeViewGetColumnTextEvent;\r\n FOnGetGroupText: TTMSFNCTreeViewGetGroupTextEvent;\r\n FOnNodeAnchorClick: TTMSFNCTreeViewNodeAnchorClickEvent;\r\n FOnVScroll: TTMSFNCTreeViewScrollEvent;\r\n FOnHScroll: TTMSFNCTreeViewScrollEvent;\r\n FOnBeforeDrawColumnEmptySpace: TTMSFNCTreeViewBeforeDrawColumnEmptySpaceEvent;\r\n FOnAfterDrawColumnEmptySpace: TTMSFNCTreeViewAfterDrawColumnEmptySpaceEvent;\r\n FOnBeforeDrawGroupEmptySpace: TTMSFNCTreeViewBeforeDrawGroupEmptySpaceEvent;\r\n FOnAfterDrawGroupEmptySpace: TTMSFNCTreeViewAfterDrawGroupEmptySpaceEvent;\r\n FOnGetNumberOfNodes: TTMSFNCTreeViewGetNumberOfNodesEvent;\r\n FOnIsNodeExpanded: TTMSFNCTreeViewIsNodeExpandedEvent;\r\n FOnIsNodeEnabled: TTMSFNCTreeViewIsNodeEnabledEvent;\r\n FOnIsNodeVisible: TTMSFNCTreeViewIsNodeVisibleEvent;\r\n FSelectedNodes: TTMSFNCTreeViewSelectedNodes;\r\n FOnGetNodeDisabledColor: TTMSFNCTreeViewGetNodeColorEvent;\r\n FOnGetNodeTextColor: TTMSFNCTreeViewGetNodeTextColorEvent;\r\n FOnGetNodeTitleColor: TTMSFNCTreeViewGetNodeTitleColorEvent;\r\n FOnGetNodeSelectedColor: TTMSFNCTreeViewGetNodeColorEvent;\r\n FOnGetNodeColor: TTMSFNCTreeViewGetNodeColorEvent;\r\n FOnGetNodeDisabledTextColor: TTMSFNCTreeViewGetNodeTextColorEvent;\r\n FOnGetNodeSelectedTextColor: TTMSFNCTreeViewGetNodeTextColorEvent;\r\n FOnGetNodeDisabledTitleColor: TTMSFNCTreeViewGetNodeTitleColorEvent;\r\n FOnGetNodeSelectedTitleColor: TTMSFNCTreeViewGetNodeTitleColorEvent;\r\n FOnIsNodeExtended: TTMSFNCTreeViewIsNodeExtendedEvent;\r\n FOnGetNodeIcon: TTMSFNCTreeViewGetNodeIconEvent;\r\n FOnGetColumnWordWrapping: TTMSFNCTreeViewGetColumnWordWrappingEvent;\r\n FOnGetColumnVerticalTextAlign: TTMSFNCTreeViewGetColumnVerticalTextAlignEvent;\r\n FOnGetColumnTrimming: TTMSFNCTreeViewGetColumnTrimmingEvent;\r\n FOnGetColumnHorizontalTextAlign: TTMSFNCTreeViewGetColumnHorizontalTextAlignEvent;\r\n FOnGetNodeWordWrapping: TTMSFNCTreeViewGetNodeWordWrappingEvent;\r\n FOnGetNodeVerticalTextAlign: TTMSFNCTreeViewGetNodeVerticalTextAlignEvent;\r\n FOnGetNodeTrimming: TTMSFNCTreeViewGetNodeTrimmingEvent;\r\n FOnGetNodeHorizontalTextAlign: TTMSFNCTreeViewGetNodeHorizontalTextAlignEvent;\r\n FOnIsNodeChecked: TTMSFNCTreeViewIsNodeCheckedEvent;\r\n FOnBeforeDrawNodeIcon: TTMSFNCTreeViewBeforeDrawNodeIconEvent;\r\n FOnBeforeDrawNodeExpand: TTMSFNCTreeViewBeforeDrawNodeExpandEvent;\r\n FOnAfterDrawNodeIcon: TTMSFNCTreeViewAfterDrawNodeIconEvent;\r\n FOnAfterDrawNodeExpand: TTMSFNCTreeViewAfterDrawNodeExpandEvent;\r\n FOnGetNodeCheckType: TTMSFNCTreeViewGetNodeCheckTypeEvent;\r\n FOnAfterDrawNodeCheck: TTMSFNCTreeViewAfterDrawNodeCheckEvent;\r\n FOnBeforeDrawNodeCheck: TTMSFNCTreeViewBeforeDrawNodeCheckEvent;\r\n FColumnStroke: TTMSFNCGraphicsStroke;\r\n FOnAfterDrawNodeColumn: TTMSFNCTreeViewAfterDrawColumnEvent;\r\n FOnBeforeDrawNodeColumn: TTMSFNCTreeViewBeforeDrawColumnEvent;\r\n FOnBeforeUnSelectNode: TTMSFNCTreeViewBeforeUnSelectNodeEvent;\r\n FOnAfterUnSelectNode: TTMSFNCTreeViewAfterUnSelectNodeEvent;\r\n FOnAfterOpenInplaceEditor: TTMSFNCTreeViewAfterOpenInplaceEditorEvent;\r\n FOnGetInplaceEditor: TTMSFNCTreeViewGetInplaceEditorEvent;\r\n FOnCloseInplaceEditor: TTMSFNCTreeViewCloseInplaceEditorEvent;\r\n FOnBeforeOpenInplaceEditor: TTMSFNCTreeViewBeforeOpenInplaceEditorEvent;\r\n FOnNodeChanged: TTMSFNCTreeViewNodeChangedEvent;\r\n FOnCustomizeInplaceEditor: TTMSFNCTreeViewCustomizeInplaceEditorEvent;\r\n FOnGetInplaceEditorRect: TTMSFNCTreeViewGetInplaceEditorRectEvent;\r\n FOnBeforeReorderNode: TTMSFNCTreeViewBeforeReorderNodeEvent;\r\n FOnAfterReorderNode: TTMSFNCTreeViewAfterReorderNodeEvent;\r\n FOnAfterDropNode: TTMSFNCTreeViewAfterDropNodeEvent;\r\n FOnBeforeDropNode: TTMSFNCTreeViewBeforeDropNodeEvent;\r\n FOnAfterCutToClipboard: TTMSFNCTreeViewAfterCutToClipboardEvent;\r\n FOnBeforePasteFromClipboard: TTMSFNCTreeViewBeforePasteFromClipboardEvent;\r\n FOnBeforeCopyToClipboard: TTMSFNCTreeViewBeforeCopyToClipboardEvent;\r\n FOnAfterPasteFromClipboard: TTMSFNCTreeViewAfterPasteFromClipboardEvent;\r\n FOnBeforeCutToClipboard: TTMSFNCTreeViewBeforeCutToClipboardEvent;\r\n FOnAfterCopyToClipboard: TTMSFNCTreeViewAfterCopyToClipboardEvent;\r\n FOnNeedFilterDropDownData: TTMSFNCTreeViewNeedFilterDropDownDataEvent;\r\n FOnFilterSelect: TTMSFNCTreeViewFilterSelectEvent;\r\n FOnCustomReorder: TTMSFNCTreeViewReorderEvent;\r\n FOnCustomDragDrop: TTMSFNCTreeViewDragDropEvent;\r\n FOnCustomDragOver: TTMSFNCTreeViewDragOverEvent;\r\n FOnCustomCopyToClipboard: TNotifyEvent;\r\n FOnCustomCutToClipboard: TNotifyEvent;\r\n FOnCustomPasteFromClipboard: TNotifyEvent;\r\n FOnCustomColumnSort: TTMSFNCTreeViewColumnSortEvent;\r\n FOnCustomLookup: TTMSFNCTreeViewLookupEvent;\r\n FOnBeforeDrawSortIndicator: TTMSFNCTreeViewBeforeDrawSortIndicatorEvent;\r\n FOnAfterDrawSortIndicator: TTMSFNCTreeViewAfterDrawSortIndicatorEvent;\r\n FAdapter: TTMSFNCTreeViewAdapter;\r\n FOnGetNodeSides: TTMSFNCTreeViewGetNodeSidesEvent;\r\n FOnGetNodeExtraSize: TTMSFNCTreeViewGetNodeExtraSizeEvent;\r\n FOnGetNodeTitleExtraSize: TTMSFNCTreeViewGetNodeTitleExtraSizeEvent;\r\n FOnAfterDrawNodeExtra: TTMSFNCTreeViewAfterDrawNodeExtraEvent;\r\n FOnBeforeDrawNodeExtra: TTMSFNCTreeViewBeforeDrawNodeExtraEvent;\r\n FOnDrawNodeExtra: TTMSFNCTreeViewDrawNodeExtraEvent;\r\n FOnGetNodeTitleTrimming: TTMSFNCTreeViewGetNodeTrimmingEvent;\r\n FOnGetNodeTitleHorizontalTextAlign: TTMSFNCTreeViewGetNodeHorizontalTextAlignEvent;\r\n FOnGetNodeTitleWordWrapping: TTMSFNCTreeViewGetNodeWordWrappingEvent;\r\n FOnGetNodeTitleVerticalTextAlign: TTMSFNCTreeViewGetNodeVerticalTextAlignEvent;\r\n FOnNodeTitleAnchorClick: TTMSFNCTreeViewNodeTitleAnchorClickEvent;\r\n FOnGetNodeExpanded: TTMSFNCTreeViewGetNodeTitleExpandedEvent;\r\n FOnBeforeDrawNodeTitleExtra: TTMSFNCTreeViewBeforeDrawNodeTitleExtraEvent;\r\n FOnAfterDrawNodeTitleExtra: TTMSFNCTreeViewAfterDrawNodeTitleExtraEvent;\r\n FOnDrawNodeTitleExtra: TTMSFNCTreeViewDrawNodeTitleExtraEvent;\r\n FOnNodeMouseEnter: TTMSFNCTreeViewNodeMouseEnterEvent;\r\n FOnNodeMouseLeave: TTMSFNCTreeViewNodeMouseLeaveEvent;\r\n FOnGetNodeIconSize: TTMSFNCTreeViewGetNodeIconSizeEvent;\r\n FOnColumnAnchorClick: TTMSFNCTreeViewColumnAnchorClickEvent;\r\n FOnFocusedNodeChanged: TTMSFNCTreeViewFocusedNodeChangedEvent;\r\n FOnGetNodeData: TTMSFNCTreeViewGetNodeDataEvent;\r\n FOnAfterSortNodes: TTMSFNCTreeViewAfterSortNodesEvent;\r\n FOnBeforeSortNodes: TTMSFNCTreeViewBeforeSortNodesEvent;\r\n FGlobalFont: TTMSFNCAppearanceGlobalFont;\r\n FOnGetNodeRounding: TTMSFNCTreeViewGetNodeRoundingEvent;\r\n FOnGetNodeDisabledStrokeColor: TTMSFNCTreeViewGetNodeColorEvent;\r\n FOnGetNodeSelectedStrokeColor: TTMSFNCTreeViewGetNodeColorEvent;\r\n FOnGetNodeStrokeColor: TTMSFNCTreeViewGetNodeColorEvent;\r\n FOnGetHTMLTemplateValue: TTMSFNCTreeViewGetHTMLTemplateValueEvent;\r\n FOnGetHTMLTemplate: TTMSFNCTreeViewGetHTMLTemplateEvent;\r\n FOnCustomizeFilterListBox: TTMSFNCTreeViewCustomizeFilterListBoxEvent;\r\n FPrecalculateItems: Boolean;\r\n {$IFDEF FNCLIB}\r\n FDefaultViewJSONOptions: TTMSFNCTreeViewViewJSONOptions;\r\n FOnAfterAddJSONNode: TTMSFNCTreeViewAfterAddJSONNodeEvent;\r\n FOnBeforeAddJSONNode: TTMSFNCTreeViewBeforeAddJSONNodeEvent;\r\n {$ENDIF}\r\n {$IFDEF CMNWEBLIB}\r\n FCheckStartSize: Integer;\r\n {$ENDIF}\r\n procedure SetNodesAppearance(const Value: TTMSFNCTreeViewNodesAppearance);\r\n procedure SetGroupsAppearance(const Value: TTMSFNCTreeViewGroupsAppearance);\r\n procedure SetColumnsAppearance(const Value: TTMSFNCTreeViewColumnsAppearance);\r\n procedure SetInteraction(const Value: TTMSFNCTreeViewInteraction);\r\n function GetFocusedNode: TTMSFNCTreeViewNode;\r\n function GetFocusedVirtualNode: TTMSFNCTreeViewVirtualNode;\r\n function GetSelNode(AIndex: Integer): TTMSFNCTreeViewNode;\r\n function GetSelVirtualNode(AIndex: Integer): TTMSFNCTreeViewVirtualNode;\r\n procedure SetColumnStroke(const Value: TTMSFNCGraphicsStroke);\r\n procedure SetFocusedNode(const Value: TTMSFNCTreeViewNode);\r\n procedure SetFocusedVirtualNode(const Value: TTMSFNCTreeViewVirtualNode);\r\n procedure SetSortColumn(const Value: Integer);\r\n procedure HandleFilterTimer(Sender: TObject);\r\n procedure SetAdapter(const Value: TTMSFNCTreeViewAdapter);\r\n procedure SetSelectedNode(const Value: TTMSFNCTreeViewNode);\r\n procedure SetSelectedVirtualNode(const Value: TTMSFNCTreeViewVirtualNode);\r\n procedure SetCompactMode(const Value: Boolean);\r\n function GetSelectedVirtualNodeRow: Integer;\r\n function GetTopRow: Integer;\r\n procedure SetTopRow(const Value: Integer);\r\n function GetBottomRow: Integer;\r\n procedure SetGlobalFont(const Value: TTMSFNCAppearanceGlobalFont);\r\n {$IFDEF FNCLIB}\r\n procedure SetDefaultViewJSONOptions(const Value: TTMSFNCTreeViewViewJSONOptions);\r\n {$ENDIF}\r\n protected\r\n procedure ChangeDPIScale(M, D: Integer); override;\r\n procedure RegisterRuntimeClasses; override;\r\n procedure ApplyStyle; override;\r\n procedure DoEnter; override;\r\n procedure DoExit; override;\r\n procedure UpdateControlAfterResize; override;\r\n procedure ResetToDefaultStyle; override;\r\n procedure Notification(AComponent: TComponent; Operation: TOperation); override;\r\n procedure InitializeColumnSorting(AColumn: Integer; ASortMode: TTMSFNCTreeViewNodesSortMode); virtual;\r\n procedure AutoSizeColumnInternal(ACol: Integer; AUpdate: Boolean = False; ACallEventHandlers: Boolean = False); override;\r\n procedure DoNodeCompare(ANode1, ANode2: TTMSFNCTreeViewNode; AColumn: Integer; var ACompareResult: Integer); override;\r\n procedure SetFonts(ASetType: TTMSFNCAppearanceGlobalFontType); virtual;\r\n\r\n procedure ExportNotification(AState: TTMSFNCTreeViewExportState; ARow: Integer); virtual;\r\n procedure DoBeforeSortNodes(ASortColumn: Integer; ASortMode: TTMSFNCTreeViewNodesSortMode; var ACanSort: Boolean); virtual;\r\n procedure DoAfterSortNodes(ASortColumn: Integer; ASortMode: TTMSFNCTreeViewNodesSortMode); virtual;\r\n procedure DoBeforeDrawSortIndicator(AGraphics: TTMSFNCGraphics; ARect: TRectF; AColumn: Integer; ASortIndex: Integer; ASortKind: TTMSFNCTreeViewNodesSortKind; var ADefaultDraw: Boolean); virtual;\r\n procedure DoAfterDrawSortIndicator(AGraphics: TTMSFNCGraphics; ARect: TRectF; AColumn: Integer; ASortIndex: Integer; ASortKind: TTMSFNCTreeViewNodesSortKind); virtual;\r\n procedure DoBeforeCutToClipboard(var ACanCut: Boolean); virtual;\r\n procedure DoBeforeCopyToClipboard(var ACanCopy: Boolean); virtual;\r\n procedure DoBeforePasteFromClipboard(var ACanPaste: Boolean); virtual;\r\n procedure DoAfterCutToClipboard; virtual;\r\n procedure DoAfterCopyToClipboard; virtual;\r\n procedure DoAfterPasteFromClipboard; virtual;\r\n\r\n procedure DoBeforeReorderNode(AFromNode, AToNode: TTMSFNCTreeViewVirtualNode; var ACanReorder: Boolean); virtual;\r\n procedure DoAfterReorderNode(AFromNode, AToNode: TTMSFNCTreeViewVirtualNode); virtual;\r\n procedure DoBeforeDropNode(AFromNode, AToNode: TTMSFNCTreeViewVirtualNode; var ACanDrop: Boolean); virtual;\r\n procedure DoAfterDropNode(AFromNode, AToNode: TTMSFNCTreeViewVirtualNode); virtual;\r\n\r\n procedure DoBeforeDrawColumnEmptySpace(AGraphics: TTMSFNCGraphics; ARect: TRectF; ASpace: TTMSFNCTreeViewColumnEmptySpace; var AAllow: Boolean; var ADefaultDraw: Boolean);\r\n procedure DoAfterDrawColumnEmptySpace(AGraphics: TTMSFNCGraphics; ARect: TRectF; ASpace: TTMSFNCTreeViewColumnEmptySpace);\r\n procedure DoBeforeDrawGroupEmptySpace(AGraphics: TTMSFNCGraphics; ARect: TRectF; ASpace: TTMSFNCTreeViewGroupEmptySpace; var AAllow: Boolean; var ADefaultDraw: Boolean);\r\n procedure DoAfterDrawGroupEmptySpace(AGraphics: TTMSFNCGraphics; ARect: TRectF; ASpace: TTMSFNCTreeViewGroupEmptySpace);\r\n\r\n procedure DoBeforeDrawColumnHeader(AGraphics: TTMSFNCGraphics; ARect: TRectF; AColumn: Integer; AKind: TTMSFNCTreeViewCacheItemKind; var AAllow: Boolean; var ADefaultDraw: Boolean); virtual;\r\n procedure DoAfterDrawColumnHeader(AGraphics: TTMSFNCGraphics; ARect: TRectF; AColumn: Integer; AKind: TTMSFNCTreeViewCacheItemKind); virtual;\r\n procedure DoBeforeDrawColumn(AGraphics: TTMSFNCGraphics; ARect: TRectF; AColumn: Integer; var AAllow: Boolean; var ADefaultDraw: Boolean); virtual;\r\n procedure DoAfterDrawColumn(AGraphics: TTMSFNCGraphics; ARect: TRectF; AColumn: Integer); virtual;\r\n procedure DoBeforeDrawNodeColumn(AGraphics: TTMSFNCGraphics; ARect: TRectF; AColumn: Integer; var AAllow: Boolean; var ADefaultDraw: Boolean); virtual;\r\n procedure DoAfterDrawNodeColumn(AGraphics: TTMSFNCGraphics; ARect: TRectF; AColumn: Integer); virtual;\r\n procedure DoBeforeDrawGroup(AGraphics: TTMSFNCGraphics; ARect: TRectF; AGroup, AStartColumn, AEndColumn: Integer; AKind: TTMSFNCTreeViewCacheItemKind; var AAllow: Boolean; var ADefaultDraw: Boolean); virtual;\r\n procedure DoAfterDrawGroup(AGraphics: TTMSFNCGraphics; ARect: TRectF; AGroup, AStartColumn, AEndColumn: Integer; AKind: TTMSFNCTreeViewCacheItemKind); virtual;\r\n procedure DoBeforeDrawNode(AGraphics: TTMSFNCGraphics; ARect: TRectF; ANode: TTMSFNCTreeViewVirtualNode; var AAllow: Boolean; var ADefaultDraw: Boolean); virtual;\r\n procedure DoAfterDrawNode(AGraphics: TTMSFNCGraphics; ARect: TRectF; ANode: TTMSFNCTreeViewVirtualNode); virtual;\r\n\r\n procedure DoCustomizeFilterListBox(AColumn: Integer; AListBox: TListBox); virtual;\r\n procedure DoGetColumnText(AColumn: Integer; AKind: TTMSFNCTreeViewCacheItemKind; var AText: String); virtual;\r\n procedure DoBeforeDrawColumnText(AGraphics: TTMSFNCGraphics; ARect: TRectF; AColumn: Integer; AKind: TTMSFNCTreeViewCacheItemKind; AText: String; var AAllow: Boolean); virtual;\r\n procedure DoAfterDrawColumnText(AGraphics: TTMSFNCGraphics; ARect: TRectF; AColumn: Integer; AKind: TTMSFNCTreeViewCacheItemKind; AText: String); virtual;\r\n procedure DoGetGroupText(AGroup: Integer; AKind: TTMSFNCTreeViewCacheItemKind; var AText: String); virtual;\r\n procedure DoBeforeDrawGroupText(AGraphics: TTMSFNCGraphics; ARect: TRectF; AGroup, AStartColumn, AEndColumn: Integer; AKind: TTMSFNCTreeViewCacheItemKind; AText: String; var AAllow: Boolean); virtual;\r\n procedure DoAfterDrawGroupText(AGraphics: TTMSFNCGraphics; ARect: TRectF; AGroup, AStartColumn, AEndColumn: Integer; AKind: TTMSFNCTreeViewCacheItemKind; AText: String); virtual;\r\n procedure DoNodeClick(ANode: TTMSFNCTreeViewVirtualNode); virtual;\r\n procedure DoNodeValueClick(ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer); virtual;\r\n procedure DoNodeMouseLeave(ANode: TTMSFNCTreeViewVirtualNode); virtual;\r\n procedure DoNodeMouseEnter(ANode: TTMSFNCTreeViewVirtualNode); virtual;\r\n procedure DoNodeDblClick(ANode: TTMSFNCTreeViewVirtualNode); virtual;\r\n\r\n procedure DoGetNumberOfNodes(ANode: TTMSFNCTreeViewVirtualNode; var ANumberOfNodes: Integer); override;\r\n procedure DoGetNodeText(ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer; AMode: TTMSFNCTreeViewNodeTextMode; var AText: String); override;\r\n procedure DoGetNodeData(ANode: TTMSFNCTreeViewVirtualNode); override;\r\n procedure DoGetNodeTitle(ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer; AMode: TTMSFNCTreeViewNodeTextMode; var ATitle: String); override;\r\n procedure DoGetNodeTitleExpanded(ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer; var AExpanded: Boolean); override;\r\n procedure DoGetNodeTrimming(ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer; var ATrimming: TTMSFNCGraphicsTextTrimming); override;\r\n procedure DoGetNodeHorizontalTextAlign(ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer; var AHorizontalTextAlign: TTMSFNCGraphicsTextAlign); override;\r\n procedure DoGetNodeVerticalTextAlign(ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer; var AVerticalTextAlign: TTMSFNCGraphicsTextAlign); override;\r\n procedure DoGetNodeWordWrapping(ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer; var AWordWrapping: Boolean); override;\r\n procedure DoGetNodeTitleTrimming(ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer; var ATrimming: TTMSFNCGraphicsTextTrimming); override;\r\n procedure DoGetNodeTitleHorizontalTextAlign(ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer; var AHorizontalTextAlign: TTMSFNCGraphicsTextAlign); override;\r\n procedure DoGetNodeTitleVerticalTextAlign(ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer; var AVerticalTextAlign: TTMSFNCGraphicsTextAlign); override;\r\n procedure DoGetNodeTitleWordWrapping(ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer; var AWordWrapping: Boolean); override;\r\n procedure DoGetNodeExtraSize(ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer; var AExtraSize: Single); override;\r\n procedure DoGetNodeTitleExtraSize(ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer; var ATitleExtraSize: Single); override;\r\n procedure DoGetColumnTrimming(AColumn: Integer; AKind: TTMSFNCTreeViewCacheItemKind; var ATrimming: TTMSFNCGraphicsTextTrimming); override;\r\n procedure DoGetColumnHorizontalTextAlign(AColumn: Integer; AKind: TTMSFNCTreeViewCacheItemKind; var AHorizontalTextAlign: TTMSFNCGraphicsTextAlign); override;\r\n procedure DoGetColumnVerticalTextAlign(AColumn: Integer; AKind: TTMSFNCTreeViewCacheItemKind; var AVerticalTextAlign: TTMSFNCGraphicsTextAlign); override;\r\n procedure DoGetColumnWordWrapping(AColumn: Integer; AKind: TTMSFNCTreeViewCacheItemKind; var AWordWrapping: Boolean); override;\r\n procedure DoGetNodeCheckType(ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer; var ACheckType: TTMSFNCTreeViewNodeCheckType); override;\r\n procedure DoGetNodeHeight(ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer; var AHeight: Double); virtual;\r\n procedure DoGetNodeIcon(ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer; ALarge: Boolean; var AIcon: TTMSFNCBitmap); override;\r\n procedure DoGetNodeIconSize(ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer; ALarge: Boolean; AIcon: TTMSFNCBitmap; var AIconWidth: Double; var AIconHeight: Double); override;\r\n procedure DoGetNodeSelectedColor(ANode: TTMSFNCTreeViewVirtualNode; var AColor: TTMSFNCGraphicsColor); override;\r\n procedure DoGetNodeSelectedStrokeColor(ANode: TTMSFNCTreeViewVirtualNode; var AColor: TTMSFNCGraphicsColor); virtual;\r\n procedure DoGetNodeSides(ANode: TTMSFNCTreeViewVirtualNode; var ASides: TTMSFNCGraphicsSides); override;\r\n procedure DoGetNodeRounding(ANode: TTMSFNCTreeViewVirtualNode; var ARounding: Integer; var ACorners: TTMSFNCGraphicsCorners); virtual;\r\n procedure DoGetNodeDisabledColor(ANode: TTMSFNCTreeViewVirtualNode; var AColor: TTMSFNCGraphicsColor); override;\r\n procedure DoGetNodeDisabledStrokeColor(ANode: TTMSFNCTreeViewVirtualNode; var AColor: TTMSFNCGraphicsColor); virtual;\r\n procedure DoGetNodeColor(ANode: TTMSFNCTreeViewVirtualNode; var AColor: TTMSFNCGraphicsColor); override;\r\n procedure DoGetNodeStrokeColor(ANode: TTMSFNCTreeViewVirtualNode; var AColor: TTMSFNCGraphicsColor); virtual;\r\n procedure DoGetNodeSelectedTextColor(ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer; var ATextColor: TTMSFNCGraphicsColor); override;\r\n procedure DoGetNodeDisabledTextColor(ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer; var ATextColor: TTMSFNCGraphicsColor); override;\r\n procedure DoGetNodeTextColor(ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer; var ATextColor: TTMSFNCGraphicsColor); override;\r\n procedure DoGetNodeSelectedTitleColor(ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer; var ATitleColor: TTMSFNCGraphicsColor); override;\r\n procedure DoGetNodeDisabledTitleColor(ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer; var ATitleColor: TTMSFNCGraphicsColor); override;\r\n procedure DoGetNodeTitleColor(ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer; var ATitleColor: TTMSFNCGraphicsColor); override;\r\n procedure DoIsNodeExpanded(ANode: TTMSFNCTreeViewVirtualNode; var AExpanded: Boolean); override;\r\n procedure DoIsNodeExtended(ANode: TTMSFNCTreeViewVirtualNode; var AExtended: Boolean); override;\r\n procedure DoIsNodeChecked(ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer; var AChecked: Boolean); override;\r\n procedure DoIsNodeVisible(ANode: TTMSFNCTreeViewVirtualNode; var AVisible: Boolean); override;\r\n procedure DoIsNodeEnabled(ANode: TTMSFNCTreeViewVirtualNode; var AEnabled: Boolean); override;\r\n\r\n procedure DoBeforeDrawNodeText(AGraphics: TTMSFNCGraphics; ARect: TRectF; AColumn: Integer; ANode: TTMSFNCTreeViewVirtualNode; {$IFNDEF UIPACK}var{$ENDIF} AText: String; var AAllow: Boolean); virtual;\r\n procedure DoAfterDrawNodeText(AGraphics: TTMSFNCGraphics; ARect: TRectF; AColumn: Integer; ANode: TTMSFNCTreeViewVirtualNode; AText: String); virtual;\r\n procedure DoBeforeDrawNodeTitle(AGraphics: TTMSFNCGraphics; ARect: TRectF; AColumn: Integer; ANode: TTMSFNCTreeViewVirtualNode; ATitle: String; var AAllow: Boolean); virtual;\r\n procedure DoAfterDrawNodeTitle(AGraphics: TTMSFNCGraphics; ARect: TRectF; AColumn: Integer; ANode: TTMSFNCTreeViewVirtualNode; ATitle: String); virtual;\r\n procedure DoBeforeDrawNodeIcon(AGraphics: TTMSFNCGraphics; ARect: TRectF; AColumn: Integer; ANode: TTMSFNCTreeViewVirtualNode; AIcon: TTMSFNCBitmap; var AAllow: Boolean); virtual;\r\n procedure DoAfterDrawNodeIcon(AGraphics: TTMSFNCGraphics; ARect: TRectF; AColumn: Integer; ANode: TTMSFNCTreeViewVirtualNode; AIcon: TTMSFNCBitmap); virtual;\r\n procedure DoBeforeDrawNodeExtra(AGraphics: TTMSFNCGraphics; ARect: TRectF; AColumn: Integer; ANode: TTMSFNCTreeViewVirtualNode; var AAllow: Boolean); virtual;\r\n procedure DoDrawNodeExtra({%H-}AGraphics: TTMSFNCGraphics; {%H-}ARect: TRectF; {%H-}AColumn: Integer; {%H-}ANode: TTMSFNCTreeViewVirtualNode); virtual;\r\n procedure DoAfterDrawNodeExtra(AGraphics: TTMSFNCGraphics; ARect: TRectF; AColumn: Integer; ANode: TTMSFNCTreeViewVirtualNode); virtual;\r\n procedure DoBeforeDrawNodeTitleExtra(AGraphics: TTMSFNCGraphics; ARect: TRectF; AColumn: Integer; ANode: TTMSFNCTreeViewVirtualNode; var AAllow: Boolean); virtual;\r\n procedure DoDrawNodeTitleExtra({%H-}AGraphics: TTMSFNCGraphics; {%H-}ARect: TRectF; {%H-}AColumn: Integer; {%H-}ANode: TTMSFNCTreeViewVirtualNode); virtual;\r\n procedure DoAfterDrawNodeTitleExtra(AGraphics: TTMSFNCGraphics; ARect: TRectF; AColumn: Integer; ANode: TTMSFNCTreeViewVirtualNode); virtual;\r\n procedure DoBeforeDrawNodeCheck(AGraphics: TTMSFNCGraphics; ARect: TRectF; AColumn: Integer; ANode: TTMSFNCTreeViewVirtualNode; ACheck: TTMSFNCBitmap; var AAllow: Boolean); virtual;\r\n procedure DoAfterDrawNodeCheck(AGraphics: TTMSFNCGraphics; ARect: TRectF; AColumn: Integer; ANode: TTMSFNCTreeViewVirtualNode; ACheck: TTMSFNCBitmap); virtual;\r\n procedure DoBeforeDrawNodeExpand(AGraphics: TTMSFNCGraphics; ARect: TRectF; AColumn: Integer; ANode: TTMSFNCTreeViewVirtualNode; AExpand: TTMSFNCBitmap; var AAllow: Boolean); virtual;\r\n procedure DoAfterDrawNodeExpand(AGraphics: TTMSFNCGraphics; ARect: TRectF; AColumn: Integer; ANode: TTMSFNCTreeViewVirtualNode; AExpand: TTMSFNCBitmap); virtual;\r\n procedure DoBeforeSelectNode(ANode: TTMSFNCTreeViewVirtualNode; var ACanSelect: Boolean); virtual;\r\n procedure DoBeforeSelectAllNodes(var ACanSelect: Boolean); virtual;\r\n procedure DoBeforeUnSelectNode(ANode: TTMSFNCTreeViewVirtualNode; var ACanUnSelect: Boolean); virtual;\r\n procedure DoCustomizeInplaceEditor(ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer; AInplaceEditor: TTMSFNCTreeViewInplaceEditor); virtual;\r\n procedure DoBeforeSizeColumn(AColumn: Integer; AColumnSize: Double; var ANewColumnSize: Double; var AAllow: Boolean); virtual;\r\n procedure DoAfterSizeColumn(AColumn: Integer; AColumnSize: Double); virtual;\r\n procedure DoBeforeUpdateNode(ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer; var AText: String; var ACanUpdate: Boolean); virtual;\r\n procedure DoNodeChanged(ANode: TTMSFNCTreeViewVirtualNode); virtual;\r\n procedure DoAfterUpdateNode(ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer); virtual;\r\n procedure DoUpdateNodeText({%H-}ANode: TTMSFNCTreeViewVirtualNode; {%H-}AColumn: Integer; {%H-}AText: String); virtual;\r\n procedure DoUpdateNodeTitle({%H-}ANode: TTMSFNCTreeViewVirtualNode; {%H-}AColumn: Integer; {%H-}ATitle: String); virtual;\r\n procedure DoBeforeExpandNode(ANode: TTMSFNCTreeViewVirtualNode; var ACanExpand: Boolean); virtual;\r\n procedure DoAfterExpandNode(ANode: TTMSFNCTreeViewVirtualNode); virtual;\r\n procedure DoBeforeCollapseNode(ANode: TTMSFNCTreeViewVirtualNode; var ACanCollapse: Boolean); virtual;\r\n procedure DoAfterCollapseNode(ANode: TTMSFNCTreeViewVirtualNode); virtual;\r\n procedure DoBeforeCheckNode(ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer; var ACanCheck: Boolean); virtual;\r\n procedure DoAfterCheckNode(ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer); virtual;\r\n procedure DoBeforeUnCheckNode(ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer; var ACanUnCheck: Boolean); virtual;\r\n procedure DoAfterUnCheckNode(ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer); virtual;\r\n procedure DoNodeAnchorClick(ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer; AAnchor: String); virtual;\r\n procedure DoNodeTitleAnchorClick(ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer; AAnchor: String); virtual;\r\n procedure DoColumnAnchorClick(AColumn: Integer; AAnchor: String); virtual;\r\n procedure DoGetHTMLTemplateValue(ANodeValue: TTMSFNCTreeViewNodeValue; AName: string; var AValue: string); override;\r\n procedure DoGetHTMLTemplate(ANodeValue: TTMSFNCTreeViewNodeValue; AColumnIndex: Integer; var AHTMLTemplate: string); override;\r\n {$IFDEF FMXLIB}\r\n procedure ApplyInplaceEditorStyleLookup(Sender: TObject);\r\n {$ENDIF}\r\n {$IFDEF FNCLIB}\r\n procedure DoBeforeAddJSONNode(AJSONValue: TJSONValue; var AAddNode: Boolean);\r\n procedure DoAfterAddJSONNode(ANode: TTMSFNCTreeViewNode; AJSONValue: TJSONValue);\r\n {$ENDIF}\r\n\r\n procedure DoBeforeOpenInplaceEditor(ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer; var ACanOpen: Boolean); virtual;\r\n procedure DoAfterOpenInplaceEditor(ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer; AInplaceEditor: TTMSFNCTreeViewInplaceEditor; AInplaceEditorRect: TRectF); virtual;\r\n procedure DoCloseInplaceEditor(ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer; AInplaceEditor: TTMSFNCTreeViewInplaceEditor; ACancelled: Boolean; var ACanClose: Boolean); virtual;\r\n procedure UpdateInplaceEditorPosition; virtual;\r\n\r\n procedure DoGetInplaceEditor(ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer;{$IFDEF FMXLIB} var ATransparent: Boolean;{$ENDIF} var AInplaceEditorClass: TTMSFNCTreeViewInplaceEditorClass); virtual;\r\n procedure CloseInplaceEditor(ACancel: Boolean; AFlagClose: Boolean = False); virtual;\r\n\r\n procedure DoFocusedNodeChanged(ANode: TTMSFNCTreeViewVirtualNode); virtual;\r\n procedure DoAfterSelectNode(ANode: TTMSFNCTreeViewVirtualNode); virtual;\r\n procedure DoAfterSelectAllNodes; virtual;\r\n procedure DoAfterUnSelectNode(ANode: TTMSFNCTreeViewVirtualNode); virtual;\r\n procedure DoHScroll(APosition: Single); virtual;\r\n procedure DoVScroll(APosition: Single); virtual;\r\n procedure ResetNodes(AUpdateAll: Boolean = True); override;\r\n procedure CreateDragBitmap; virtual;\r\n procedure DestroyDragBitmap; virtual;\r\n\r\n procedure HandleSelectNode(ANode: TTMSFNCTreeViewVirtualNode; ATriggerEvents: Boolean; AKeyBoard: Boolean; AMultiSelect: Boolean; AColumn: Integer = -1);\r\n procedure Animate(Sender: TObject);\r\n {$IFDEF FMXLIB}\r\n procedure ScrollBarChanged(Sender: TObject);\r\n procedure DoInplaceEditorTimer(Sender: TObject);\r\n {$ENDIF}\r\n procedure ColumnStrokeChanged(Sender: TObject);\r\n procedure DragTime(Sender: TObject);\r\n procedure StopAnimationTimer; override;\r\n procedure HandleNodeToggle(ANode: TTMSFNCTreeViewVirtualNode); virtual;\r\n procedure HandleNodeExtra({%H-}ANode: TTMSFNCTreeViewVirtualNode); virtual;\r\n procedure HandleNodeTitleExtra({%H-}ANode: TTMSFNCTreeViewVirtualNode); virtual;\r\n procedure HandleNodeToggleCheck(ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer); virtual;\r\n procedure HandleNodeExpand(ANode: TTMSFNCTreeViewVirtualNode; ARecurse: Boolean); virtual;\r\n procedure HandleNodeCollapse(ANode: TTMSFNCTreeViewVirtualNode; ARecurse: Boolean); virtual;\r\n procedure HandleCustomKeys({%H-}AKey: Word); virtual;\r\n procedure OffsetNodeRects(ANode: TTMSFNCTreeViewVirtualNode; AX, AY: Single; var ARect: TRectF); virtual;\r\n procedure BuildDisplay(ACache: TTMSFNCTreeViewCache; ADisplay: TTMSFNCTreeViewDisplayList); virtual;\r\n procedure UpdateCalculations; override;\r\n procedure UpdateAutoSizing; override;\r\n procedure UpdateColumnRowCalculations(AUpdateTotalRowHeight: Boolean = True); override;\r\n procedure UpdateColumnsCache; override;\r\n procedure UpdateColumnCache(ACache: TTMSFNCTreeViewCache); overload; virtual;\r\n procedure UpdateGroupsCache; override;\r\n procedure UpdateGroupCache(ACache: TTMSFNCTreeViewCache); overload; virtual;\r\n procedure UpdateNodesCache(AUpdateNodes: Boolean = True; AResetNodes: Boolean = False); override;\r\n procedure UpdateNodeCache; virtual;\r\n procedure CustomizeNodeCache({%H-}AGraphics: TTMSFNCGraphics; {%H-}AStartY: Single); virtual;\r\n procedure UpdateDisplay; override;\r\n procedure UpdateTreeViewCache; override;\r\n procedure BuildNodeList; override;\r\n procedure UpdateColumnsDisplay; virtual;\r\n procedure UpdateGroupsDisplay; virtual;\r\n procedure UpdateNodeDisplay; virtual;\r\n procedure PrecalculateNodes; virtual;\r\n procedure VerticalScrollPositionChanged; override;\r\n procedure Scroll(AHorizontalPos, AVerticalPos: Double); override;\r\n procedure HorizontalScrollPositionChanged; override;\r\n procedure DrawNode({%H-}AGraphics: TTMSFNCGraphics; {%H-}ARect: TRectF; {%H-}ANode: TTMSFNCTreeViewVirtualNode; {%H-}ACaching: Boolean = False; {%H-}AOffsetX: Single = 0; {%H-}AOffsetY: Single = 0); virtual;\r\n procedure DrawGroup({%H-}AGraphics: TTMSFNCGraphics; {%H-}ARect: TRectF; {%H-}AGroup: Integer; {%H-}AStartColumn, {%H-}AEndColumn: Integer; {%H-}AKind: TTMSFNCTreeViewCacheItemKind); virtual;\r\n procedure DrawColumn({%H-}AGraphics: TTMSFNCGraphics; {%H-}ARect: TRectF; {%H-}AColumn: Integer; {%H-}AKind: TTMSFNCTreeViewCacheItemKind); virtual;\r\n procedure DrawNodes({%H-}AGraphics: TTMSFNCGraphics); virtual;\r\n procedure DrawColumns({%H-}AGraphics: TTMSFNCGraphics); virtual;\r\n procedure DrawNodeColumns({%H-}AGraphics: TTMSFNCGraphics); virtual;\r\n procedure DrawGroups({%H-}AGraphics: TTMSFNCGraphics); virtual;\r\n procedure DrawBorders({%H-}AGraphics: TTMSFNCGraphics); virtual;\r\n procedure DrawEmptySpaces({%H-}AGraphics: TTMSFNCGraphics); virtual;\r\n procedure DrawDisplay(AGraphics: TTMSFNCGraphics; ADisplay: TTMSFNCTreeViewDisplayList); virtual;\r\n procedure HandleDragStart({%H-}X, {%H-}Y: Single); virtual;\r\n procedure HandleDragOver(const Source: TObject; const Point: TPointF; var Accept: Boolean); override;\r\n procedure HandleDragDrop(const Source: TObject; const Point: TPointF); override;\r\n procedure HandleMouseDown(Button: TTMSFNCMouseButton; Shift: TShiftState; X, Y: Single); override;\r\n procedure HandleMouseMove(Shift: TShiftState; X, Y: Single); override;\r\n procedure HandleDblClick(X, Y: Single); override;\r\n procedure DoNeedFilterDropDownData(AColumn: Integer; AValues: TStrings); virtual;\r\n procedure DoFilterSelect(AColumn: integer; var ACondition: string); virtual;\r\n procedure HandleFilter(AColumn: Integer); virtual;\r\n procedure HandleExpand({%H-}AColumn: Integer); virtual;\r\n procedure HandleMouseUp(Button: TTMSFNCMouseButton; Shift: TShiftState; X, Y: Single); override;\r\n procedure StartVerticalOffsetAnimation; virtual;\r\n procedure ClearFocusedNode(ANode: TTMSFNCTreeViewVirtualNode); override;\r\n procedure SetVerticalOffset(AVerticalOffset: Single); virtual;\r\n procedure HandleKeyPress(var Key: Char); override;\r\n procedure HandleKeyDown(var Key: Word; Shift: TShiftState); override;\r\n procedure HandleDialogKey(var Key: Word; Shift: TShiftState); override;\r\n procedure HandleFilterListClick(Sender: TObject);\r\n {$IFDEF FMXLIB}\r\n procedure ApplyFilterListBoxStyleLookUp(Sender: TObject);\r\n {$ENDIF}\r\n procedure HandleKeyUp(var Key: Word; Shift: TShiftState); override;\r\n procedure HandleMouseWheel(Shift: TShiftState; WheelDelta: Integer; var Handled: Boolean); override;\r\n procedure HandleNodeEditing(ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer); virtual;\r\n procedure CustomizeInplaceEditor(AInplaceEditor: TTMSFNCTreeViewInplaceEditor; ANode: TTMSFNCTreeViewVirtualNode; AColumn: TTMSFNCTreeViewColumn); virtual;\r\n procedure StartReload; virtual;\r\n procedure ConfigureNodeRect({%H-}AIndex: Integer; {%H-}ANode: TTMSFNCTreeViewVirtualNode; var {%H-}ARect: TRectF); virtual;\r\n function GetDefaultRowHeight(ANode: TTMSFNCTreeViewVirtualNode): Single; override;\r\n procedure GetNodeOffset({%H-}ANode: TTMSFNCTreeViewVirtualNode; var {%H-}ALeft, {%H-}ATop, {%H-}ARight, {%H-}ABottom: Single); virtual;\r\n procedure GetNodeMargins(var {%H-}ALeft, {%H-}ATop, {%H-}ARight, {%H-}ABottom: Single); virtual;\r\n procedure HandleAlternativeDragOver({%H-}X, {%H-}Y: Single); virtual;\r\n procedure HandleAlternativeDragDrop({%H-}X, {%H-}Y: Single); virtual;\r\n procedure InternalSelectVirtualNode({%H-}ANode: TTMSFNCTreeViewVirtualNode); virtual;\r\n function CanStartDragFromMouseDown: Boolean; virtual;\r\n function CanStartDragFromMouseMove: Boolean; virtual;\r\n function AlternativeDragDrop: Boolean; virtual;\r\n function GetNodesSpacing(ANode: TTMSFNCTreeViewVirtualNode): Single; override;\r\n function IsAnimating: Boolean; virtual;\r\n function GetNodesRect: TRectF; virtual;\r\n function CanApplyVerticalOffset: Boolean; virtual;\r\n function GetReloadOffset: Single; virtual;\r\n function NeedsReload({%H-}AVerticalOffset: Single): Boolean; virtual;\r\n function IsVariableNodeHeight: Boolean; override;\r\n function GetDragObjectScreenShot: TTMSFNCBitmap; override;\r\n function ColumnStretchingActive: Boolean; override;\r\n function GetBufStart(ABuffer: string; var ALevel: Integer): string;\r\n function GetFirstEditableColumn: Integer; virtual;\r\n function GetLastEditableColumn: Integer; virtual;\r\n function GetPreviousEditableColumn(AColumn: Integer): Integer; virtual;\r\n function GetNextEditableColumn(AColumn: Integer): Integer; virtual;\r\n function GetInplaceEditorRect(ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer): TRectF;\r\n function GetNextFocusableNode(ANode: TTMSFNCTreeViewVirtualNode): TTMSFNCTreeViewVirtualNode; virtual;\r\n function GetPreviousFocusableNode(ANode: TTMSFNCTreeViewVirtualNode): TTMSFNCTreeViewVirtualNode; virtual;\r\n function GetVersion: string; override;\r\n function GetFirstVisibleColumn: Integer; virtual;\r\n function GetLastVisibleColumn: Integer; virtual;\r\n function ConfigureNode(AGraphics: TTMSFNCGraphics; AIndex: Integer; ANode: TTMSFNCTreeViewVirtualNode; var AStartY: Single): Boolean; virtual;\r\n function XYToColumnAnchorCache(AX, AY: Single; ACache: TTMSFNCTreeViewColumnsCache; var AIndex: Integer): string;\r\n function GetDocURL: string; override;\r\n function GetRowHeight(ARow: Integer): Double; override;\r\n function GetColumnText(AColumn: Integer): String; virtual;\r\n function GetGroupText(AGroup: Integer): String;virtual;\r\n function GetColumnsTopSize: Double; virtual;\r\n function GetColumnsExtraSize: Double; virtual;\r\n function GetColumnsBottomSize: Double; virtual;\r\n function GetGroupsTopSize: Double; virtual;\r\n function GetGroupsBottomSize: Double; virtual;\r\n function GetContentClipRect: TRectF; override;\r\n function GetContentRect: TRectF; override;\r\n function GetCalculationRect: TRectF; override;\r\n function GetGroupsTopRect: TRectF; virtual;\r\n function GetGroupsBottomRect: TRectF; virtual;\r\n function GetColumnsTopRect: TRectF; virtual;\r\n function GetColumnTopLeftEmptyRect: TRectF; virtual;\r\n function GetColumnBottomLeftEmptyRect: TRectF; virtual;\r\n function GetColumnBottomRightEmptyRect: TRectF; virtual;\r\n function GetColumnTopRightEmptyRect: TRectF; virtual;\r\n function GetGroupTopLeftEmptyRect: TRectF; virtual;\r\n function GetGroupBottomLeftEmptyRect: TRectF; virtual;\r\n function GetGroupBottomRightEmptyRect: TRectF; virtual;\r\n function GetGroupTopRightEmptyRect: TRectF; virtual;\r\n function GetColumnsBottomRect: TRectF; virtual;\r\n function GetCacheWidth: Integer; virtual;\r\n function GetCacheHeight: Integer; virtual;\r\n function XYToCacheItem(X, Y: Double; OffsetX: Single = 0): TTMSFNCTreeViewCacheItem; virtual;\r\n function GetFirstVisibleCacheItem: TTMSFNCTreeViewCacheItem; virtual;\r\n function IsReorderActive: Boolean; virtual;\r\n function IsDragDropActive: Boolean; virtual;\r\n function GetHTMLTemplate(AColumnIndex: Integer): string; override;\r\n\r\n property SelectedVirtualNodeRow: Integer read GetSelectedVirtualNodeRow;\r\n\r\n property Adapter: TTMSFNCTreeViewAdapter read FAdapter write SetAdapter;\r\n property NodesAppearance: TTMSFNCTreeViewNodesAppearance read FNodesAppearance write SetNodesAppearance;\r\n property ColumnsAppearance: TTMSFNCTreeViewColumnsAppearance read FColumnsAppearance write SetColumnsAppearance;\r\n property GroupsAppearance: TTMSFNCTreeViewGroupsAppearance read FGroupsAppearance write SetGroupsAppearance;\r\n\r\n property GlobalFont: TTMSFNCAppearanceGlobalFont read FGlobalFont write SetGlobalFont;\r\n {$IFDEF FNCLIB}\r\n property DefaultViewJSONOptions: TTMSFNCTreeViewViewJSONOptions read FDefaultViewJSONOptions write SetDefaultViewJSONOptions;\r\n {$ENDIF}\r\n\r\n property PrecalculateItems: Boolean read FPrecalculateItems write FPrecalculateItems default False;\r\n\r\n property OnBeforeCutToClipboard: TTMSFNCTreeViewBeforeCutToClipboardEvent read FOnBeforeCutToClipboard write FOnBeforeCutToClipboard;\r\n property OnBeforeCopyToClipboard: TTMSFNCTreeViewBeforeCopyToClipboardEvent read FOnBeforeCopyToClipboard write FOnBeforeCopyToClipboard;\r\n property OnBeforePasteFromClipboard: TTMSFNCTreeViewBeforePasteFromClipboardEvent read FOnBeforePasteFromClipboard write FOnBeforePasteFromClipboard;\r\n property OnAfterCutToClipboard: TTMSFNCTreeViewAfterCutToClipboardEvent read FOnAfterCutToClipboard write FOnAfterCutToClipboard;\r\n property OnAfterCopyToClipboard: TTMSFNCTreeViewAfterCopyToClipboardEvent read FOnAfterCopyToClipboard write FOnAfterCopyToClipboard;\r\n property OnAfterPasteFromClipboard: TTMSFNCTreeViewAfterPasteFromClipboardEvent read FOnAfterPasteFromClipboard write FOnAfterPasteFromClipboard;\r\n\r\n property OnBeforeSortNodes: TTMSFNCTreeViewBeforeSortNodesEvent read FOnBeforeSortNodes write FOnBeforeSortNodes;\r\n property OnAfterSortNodes: TTMSFNCTreeViewAfterSortNodesEvent read FOnAfterSortNodes write FOnAfterSortNodes;\r\n property OnBeforeReorderNode: TTMSFNCTreeViewBeforeReorderNodeEvent read FOnBeforeReorderNode write FOnBeforeReorderNode;\r\n property OnAfterReorderNode: TTMSFNCTreeViewAfterReorderNodeEvent read FOnAfterReorderNode write FOnAfterReorderNode;\r\n property OnBeforeDropNode: TTMSFNCTreeViewBeforeDropNodeEvent read FOnBeforeDropNode write FOnBeforeDropNode;\r\n property OnAfterDropNode: TTMSFNCTreeViewAfterDropNodeEvent read FOnAfterDropNode write FOnAfterDropNode;\r\n\r\n property OnBeforeOpenInplaceEditor: TTMSFNCTreeViewBeforeOpenInplaceEditorEvent read FOnBeforeOpenInplaceEditor write FOnBeforeOpenInplaceEditor;\r\n property OnCloseInplaceEditor: TTMSFNCTreeViewCloseInplaceEditorEvent read FOnCloseInplaceEditor write FOnCloseInplaceEditor;\r\n property OnAfterOpenInplaceEditor: TTMSFNCTreeViewAfterOpenInplaceEditorEvent read FOnAfterOpenInplaceEditor write FOnAfterOpenInplaceEditor;\r\n property OnGetInplaceEditor: TTMSFNCTreeViewGetInplaceEditorEvent read FOnGetInplaceEditor write FOnGetInplaceEditor;\r\n property OnCustomizeInplaceEditor: TTMSFNCTreeViewCustomizeInplaceEditorEvent read FOnCustomizeInplaceEditor write FOnCustomizeInplaceEditor;\r\n property OnGetInplaceEditorRect: TTMSFNCTreeViewGetInplaceEditorRectEvent read FOnGetInplaceEditorRect write FOnGetInplaceEditorRect;\r\n\r\n property OnNodeCompare: TTMSFNCTreeViewNodeCompareEvent read FOnNodeCompare write FOnNodeCompare;\r\n property OnBeforeSizeColumn: TTMSFNCTreeViewBeforeSizeColumnEvent read FOnBeforeSizeColumn write FOnBeforeSizeColumn;\r\n property OnAfterSizeColumn: TTMSFNCTreeViewAfterSizeColumnEvent read FOnAfterSizeColumn write FOnAfterSizeColumn;\r\n property OnBeforeDrawColumnEmptySpace: TTMSFNCTreeViewBeforeDrawColumnEmptySpaceEvent read FOnBeforeDrawColumnEmptySpace write FOnBeforeDrawColumnEmptySpace;\r\n property OnAfterDrawColumnEmptySpace: TTMSFNCTreeViewAfterDrawColumnEmptySpaceEvent read FOnAfterDrawColumnEmptySpace write FOnAfterDrawColumnEmptySpace;\r\n property OnBeforeDrawGroupEmptySpace: TTMSFNCTreeViewBeforeDrawGroupEmptySpaceEvent read FOnBeforeDrawGroupEmptySpace write FOnBeforeDrawGroupEmptySpace;\r\n property OnAfterDrawGroupEmptySpace: TTMSFNCTreeViewAfterDrawGroupEmptySpaceEvent read FOnAfterDrawGroupEmptySpace write FOnAfterDrawGroupEmptySpace;\r\n\r\n property OnNeedFilterDropDownData: TTMSFNCTreeViewNeedFilterDropDownDataEvent read FOnNeedFilterDropDownData write FOnNeedFilterDropDownData;\r\n property OnFilterSelect: TTMSFNCTreeViewFilterSelectEvent read FOnFilterSelect write FOnFilterSelect;\r\n property OnBeforeDrawColumn: TTMSFNCTreeViewBeforeDrawColumnEvent read FOnBeforeDrawColumn write FOnBeforeDrawColumn;\r\n property OnAfterDrawColumn: TTMSFNCTreeViewAfterDrawColumnEvent read FOnAfterDrawColumn write FOnAfterDrawColumn;\r\n property OnBeforeDrawNodeColumn: TTMSFNCTreeViewBeforeDrawColumnEvent read FOnBeforeDrawNodeColumn write FOnBeforeDrawNodeColumn;\r\n property OnAfterDrawNodeColumn: TTMSFNCTreeViewAfterDrawColumnEvent read FOnAfterDrawNodeColumn write FOnAfterDrawNodeColumn;\r\n property OnBeforeDrawColumnHeader: TTMSFNCTreeViewBeforeDrawColumnHeaderEvent read FOnBeforeDrawColumnHeader write FOnBeforeDrawColumnHeader;\r\n property OnAfterDrawColumnHeader: TTMSFNCTreeViewAfterDrawColumnHeaderEvent read FOnAfterDrawColumnHeader write FOnAfterDrawColumnHeader;\r\n property OnBeforeDrawGroup: TTMSFNCTreeViewBeforeDrawGroupEvent read FOnBeforeDrawGroup write FOnBeforeDrawGroup;\r\n property OnAfterDrawGroup: TTMSFNCTreeViewAfterDrawGroupEvent read FOnAfterDrawGroup write FOnAfterDrawGroup;\r\n property OnBeforeDrawNode: TTMSFNCTreeViewBeforeDrawNodeEvent read FOnBeforeDrawNode write FOnBeforeDrawNode;\r\n property OnAfterDrawNode: TTMSFNCTreeViewAfterDrawNodeEvent read FOnAfterDrawNode write FOnAfterDrawNode;\r\n property OnBeforeDrawColumnText: TTMSFNCTreeViewBeforeDrawColumnTextEvent read FOnBeforeDrawColumnText write FOnBeforeDrawColumnText;\r\n property OnGetColumnText: TTMSFNCTreeViewGetColumnTextEvent read FOnGetColumnText write FOnGetColumnText;\r\n property OnAfterDrawColumnText: TTMSFNCTreeViewAfterDrawColumnTextEvent read FOnAfterDrawColumnText write FOnAfterDrawColumnText;\r\n property OnBeforeDrawGroupText: TTMSFNCTreeViewBeforeDrawGroupTextEvent read FOnBeforeDrawGroupText write FOnBeforeDrawGroupText;\r\n property OnGetGroupText: TTMSFNCTreeViewGetGroupTextEvent read FOnGetGroupText write FOnGetGroupText;\r\n property OnAfterDrawGroupText: TTMSFNCTreeViewAfterDrawGroupTextEvent read FOnAfterDrawGroupText write FOnAfterDrawGroupText;\r\n property OnBeforeDrawNodeText: TTMSFNCTreeViewBeforeDrawNodeTextEvent read FOnBeforeDrawNodeText write FOnBeforeDrawNodeText;\r\n property OnBeforeDrawNodeTitle: TTMSFNCTreeViewBeforeDrawNodeTitleEvent read FOnBeforeDrawNodeTitle write FOnBeforeDrawNodeTitle;\r\n property OnAfterDrawSortIndicator: TTMSFNCTreeViewAfterDrawSortIndicatorEvent read FOnAfterDrawSortIndicator write FOnAfterDrawSortIndicator;\r\n property OnBeforeDrawSortIndicator: TTMSFNCTreeViewBeforeDrawSortIndicatorEvent read FOnBeforeDrawSortIndicator write FOnBeforeDrawSortIndicator;\r\n property OnGetNodeHeight: TTMSFNCTreeViewGetNodeHeightEvent read FOnGetNodeHeight write FOnGetNodeHeight;\r\n property OnGetNodeText: TTMSFNCTreeViewGetNodeTextEvent read FOnGetNodeText write FOnGetNodeText;\r\n property OnGetNodeTitle: TTMSFNCTreeViewGetNodeTitleEvent read FOnGetNodeTitle write FOnGetNodeTitle;\r\n property OnGetNodeTitleExpanded: TTMSFNCTreeViewGetNodeTitleExpandedEvent read FOnGetNodeExpanded write FOnGetNodeExpanded;\r\n property OnGetNodeSides: TTMSFNCTreeViewGetNodeSidesEvent read FOnGetNodeSides write FOnGetNodeSides;\r\n property OnGetNodeRounding: TTMSFNCTreeViewGetNodeRoundingEvent read FOnGetNodeRounding write FOnGetNodeRounding;\r\n property OnGetNodeData: TTMSFNCTreeViewGetNodeDataEvent read FOnGetNodeData write FOnGetNodeData;\r\n property OnGetNodeTrimming: TTMSFNCTreeViewGetNodeTrimmingEvent read FOnGetNodeTrimming write FOnGetNodeTrimming;\r\n property OnGetNodeWordWrapping: TTMSFNCTreeViewGetNodeWordWrappingEvent read FOnGetNodeWordWrapping write FOnGetNodeWordWrapping;\r\n property OnGetNodeTitleTrimming: TTMSFNCTreeViewGetNodeTrimmingEvent read FOnGetNodeTitleTrimming write FOnGetNodeTitleTrimming;\r\n property OnGetNodeTitleWordWrapping: TTMSFNCTreeViewGetNodeWordWrappingEvent read FOnGetNodeTitleWordWrapping write FOnGetNodeTitleWordWrapping;\r\n property OnGetNodeExtraSize: TTMSFNCTreeViewGetNodeExtraSizeEvent read FOnGetNodeExtraSize write FOnGetNodeExtraSize;\r\n property OnGetNodeTitleExtraSize: TTMSFNCTreeViewGetNodeTitleExtraSizeEvent read FOnGetNodeTitleExtraSize write FOnGetNodeTitleExtraSize;\r\n property OnGetNodeHorizontalTextAlign: TTMSFNCTreeViewGetNodeHorizontalTextAlignEvent read FOnGetNodeHorizontalTextAlign write FOnGetNodeHorizontalTextAlign;\r\n property OnGetNodeVerticalTextAlign: TTMSFNCTreeViewGetNodeVerticalTextAlignEvent read FOnGetNodeVerticalTextAlign write FOnGetNodeVerticalTextAlign;\r\n property OnGetNodeTitleHorizontalTextAlign: TTMSFNCTreeViewGetNodeHorizontalTextAlignEvent read FOnGetNodeTitleHorizontalTextAlign write FOnGetNodeTitleHorizontalTextAlign;\r\n property OnGetNodeTitleVerticalTextAlign: TTMSFNCTreeViewGetNodeVerticalTextAlignEvent read FOnGetNodeTitleVerticalTextAlign write FOnGetNodeTitleVerticalTextAlign;\r\n property OnGetColumnTrimming: TTMSFNCTreeViewGetColumnTrimmingEvent read FOnGetColumnTrimming write FOnGetColumnTrimming;\r\n property OnGetColumnWordWrapping: TTMSFNCTreeViewGetColumnWordWrappingEvent read FOnGetColumnWordWrapping write FOnGetColumnWordWrapping;\r\n property OnGetColumnHorizontalTextAlign: TTMSFNCTreeViewGetColumnHorizontalTextAlignEvent read FOnGetColumnHorizontalTextAlign write FOnGetColumnHorizontalTextAlign;\r\n property OnGetColumnVerticalTextAlign: TTMSFNCTreeViewGetColumnVerticalTextAlignEvent read FOnGetColumnVerticalTextAlign write FOnGetColumnVerticalTextAlign;\r\n property OnGetNodeIcon: TTMSFNCTreeViewGetNodeIconEvent read FOnGetNodeIcon write FOnGetNodeIcon;\r\n property OnGetNodeIconSize: TTMSFNCTreeViewGetNodeIconSizeEvent read FOnGetNodeIconSize write FOnGetNodeIconSize;\r\n property OnGetNumberOfNodes: TTMSFNCTreeViewGetNumberOfNodesEvent read FOnGetNumberOfNodes write FOnGetNumberOfNodes;\r\n property OnAfterDrawNodeText: TTMSFNCTreeViewAfterDrawNodeTextEvent read FOnAfterDrawNodeText write FOnAfterDrawNodeText;\r\n property OnAfterDrawNodeTitle: TTMSFNCTreeViewAfterDrawNodeTitleEvent read FOnAfterDrawNodeTitle write FOnAfterDrawNodeTitle;\r\n property OnAfterDrawNodeIcon: TTMSFNCTreeViewAfterDrawNodeIconEvent read FOnAfterDrawNodeIcon write FOnAfterDrawNodeIcon;\r\n property OnBeforeDrawNodeIcon: TTMSFNCTreeViewBeforeDrawNodeIconEvent read FOnBeforeDrawNodeIcon write FOnBeforeDrawNodeIcon;\r\n property OnAfterDrawNodeExtra: TTMSFNCTreeViewAfterDrawNodeExtraEvent read FOnAfterDrawNodeExtra write FOnAfterDrawNodeExtra;\r\n property OnDrawNodeExtra: TTMSFNCTreeViewDrawNodeExtraEvent read FOnDrawNodeExtra write FOnDrawNodeExtra;\r\n property OnBeforeDrawNodeExtra: TTMSFNCTreeViewBeforeDrawNodeExtraEvent read FOnBeforeDrawNodeExtra write FOnBeforeDrawNodeExtra;\r\n property OnAfterDrawNodeTitleExtra: TTMSFNCTreeViewAfterDrawNodeTitleExtraEvent read FOnAfterDrawNodeTitleExtra write FOnAfterDrawNodeTitleExtra;\r\n property OnDrawNodeTitleExtra: TTMSFNCTreeViewDrawNodeTitleExtraEvent read FOnDrawNodeTitleExtra write FOnDrawNodeTitleExtra;\r\n property OnBeforeDrawNodeTitleExtra: TTMSFNCTreeViewBeforeDrawNodeTitleExtraEvent read FOnBeforeDrawNodeTitleExtra write FOnBeforeDrawNodeTitleExtra;\r\n property OnAfterDrawNodeExpand: TTMSFNCTreeViewAfterDrawNodeExpandEvent read FOnAfterDrawNodeExpand write FOnAfterDrawNodeExpand;\r\n property OnBeforeDrawNodeExpand: TTMSFNCTreeViewBeforeDrawNodeExpandEvent read FOnBeforeDrawNodeExpand write FOnBeforeDrawNodeExpand;\r\n property OnAfterDrawNodeCheck: TTMSFNCTreeViewAfterDrawNodeCheckEvent read FOnAfterDrawNodeCheck write FOnAfterDrawNodeCheck;\r\n property OnBeforeDrawNodeCheck: TTMSFNCTreeViewBeforeDrawNodeCheckEvent read FOnBeforeDrawNodeCheck write FOnBeforeDrawNodeCheck;\r\n property OnBeforeUpdateNode: TTMSFNCTreeViewBeforeUpdateNodeEvent read FOnBeforeUpdateNode write FOnBeforeUpdateNode;\r\n property OnAfterUpdateNode: TTMSFNCTreeViewAfterUpdateNodeEvent read FOnAfterUpdateNode write FOnAfterUpdateNode;\r\n property OnBeforeUnCheckNode: TTMSFNCTreeViewBeforeUnCheckNodeEvent read FOnBeforeUnCheckNode write FOnBeforeUnCheckNode;\r\n property OnAfterUnCheckNode: TTMSFNCTreeViewAfterUnCheckNodeEvent read FOnAfterUnCheckNode write FOnAfterUnCheckNode;\r\n property OnBeforeCheckNode: TTMSFNCTreeViewBeforeCheckNodeEvent read FOnBeforeCheckNode write FOnBeforeCheckNode;\r\n property OnAfterCheckNode: TTMSFNCTreeViewAfterCheckNodeEvent read FOnAfterCheckNode write FOnAfterCheckNode;\r\n property OnFocusedNodeChanged: TTMSFNCTreeViewFocusedNodeChangedEvent read FOnFocusedNodeChanged write FOnFocusedNodeChanged;\r\n property OnBeforeCollapseNode: TTMSFNCTreeViewBeforeCollapseNodeEvent read FOnBeforeCollapseNode write FOnBeforeCollapseNode;\r\n property OnAfterCollapseNode: TTMSFNCTreeViewAfterCollapseNodeEvent read FOnAfterCollapseNode write FOnAfterCollapseNode;\r\n property OnBeforeExpandNode: TTMSFNCTreeViewBeforeExpandNodeEvent read FOnBeforeExpandNode write FOnBeforeExpandNode;\r\n property OnAfterExpandNode: TTMSFNCTreeViewAfterExpandNodeEvent read FOnAfterExpandNode write FOnAfterExpandNode;\r\n property OnBeforeSelectAllNodes: TTMSFNCTreeViewBeforeSelectAllNodesEvent read FOnBeforeSelectAllNodes write FOnBeforeSelectAllNodes;\r\n property OnAfterSelectAllNodes: TTMSFNCTreeViewAfterSelectAllNodesEvent read FOnAfterSelectAllNodes write FOnAfterSelectAllNodes;\r\n property OnBeforeSelectNode: TTMSFNCTreeViewBeforeSelectNodeEvent read FOnBeforeSelectNode write FOnBeforeSelectNode;\r\n property OnAfterSelectNode: TTMSFNCTreeViewAfterSelectNodeEvent read FOnAfterSelectNode write FOnAfterSelectNode;\r\n property OnNodeClick: TTMSFNCTreeViewNodeClickEvent read FOnNodeClick write FOnNodeClick;\r\n property OnNodeValueClick: TTMSFNCTreeViewNodeValueClickEvent read FOnNodeValueClick write FOnNodeValueClick;\r\n property OnNodeMouseLeave: TTMSFNCTreeViewNodeMouseLeaveEvent read FOnNodeMouseLeave write FOnNodeMouseLeave;\r\n property OnNodeMouseEnter: TTMSFNCTreeViewNodeMouseEnterEvent read FOnNodeMouseEnter write FOnNodeMouseEnter;\r\n property OnNodeDblClick: TTMSFNCTreeViewNodeClickEvent read FOnNodeDblClick write FOnNodeDblClick;\r\n property OnBeforeUnSelectNode: TTMSFNCTreeViewBeforeUnSelectNodeEvent read FOnBeforeUnSelectNode write FOnBeforeUnSelectNode;\r\n property OnAfterUnSelectNode: TTMSFNCTreeViewAfterUnSelectNodeEvent read FOnAfterUnSelectNode write FOnAfterUnSelectNode;\r\n property OnIsNodeChecked: TTMSFNCTreeViewIsNodeCheckedEvent read FOnIsNodeChecked write FOnIsNodeChecked;\r\n property OnIsNodeExpanded: TTMSFNCTreeViewIsNodeExpandedEvent read FOnIsNodeExpanded write FOnIsNodeExpanded;\r\n property OnIsNodeVisible: TTMSFNCTreeViewIsNodeVisibleEvent read FOnIsNodeVisible write FOnIsNodeVisible;\r\n property OnIsNodeEnabled: TTMSFNCTreeViewIsNodeEnabledEvent read FOnIsNodeEnabled write FOnIsNodeEnabled;\r\n property OnGetNodeColor: TTMSFNCTreeViewGetNodeColorEvent read FOnGetNodeColor write FOnGetNodeColor;\r\n property OnGetNodeStrokeColor: TTMSFNCTreeViewGetNodeColorEvent read FOnGetNodeStrokeColor write FOnGetNodeStrokeColor;\r\n property OnGetNodeCheckType: TTMSFNCTreeViewGetNodeCheckTypeEvent read FOnGetNodeCheckType write FOnGetNodeCheckType;\r\n property OnGetNodeSelectedColor: TTMSFNCTreeViewGetNodeColorEvent read FOnGetNodeSelectedStrokeColor write FOnGetNodeSelectedStrokeColor;\r\n property OnGetNodeSelectedStrokeColor: TTMSFNCTreeViewGetNodeColorEvent read FOnGetNodeSelectedColor write FOnGetNodeSelectedColor;\r\n property OnGetNodeDisabledColor: TTMSFNCTreeViewGetNodeColorEvent read FOnGetNodeDisabledColor write FOnGetNodeDisabledColor;\r\n property OnGetNodeDisabledStrokeColor: TTMSFNCTreeViewGetNodeColorEvent read FOnGetNodeDisabledStrokeColor write FOnGetNodeDisabledStrokeColor;\r\n property OnGetNodeTextColor: TTMSFNCTreeViewGetNodeTextColorEvent read FOnGetNodeTextColor write FOnGetNodeTextColor;\r\n property OnGetNodeSelectedTextColor: TTMSFNCTreeViewGetNodeTextColorEvent read FOnGetNodeSelectedTextColor write FOnGetNodeSelectedTextColor;\r\n property OnGetNodeDisabledTextColor: TTMSFNCTreeViewGetNodeTextColorEvent read FOnGetNodeDisabledTextColor write FOnGetNodeDisabledTextColor;\r\n property OnGetNodeTitleColor: TTMSFNCTreeViewGetNodeTitleColorEvent read FOnGetNodeTitleColor write FOnGetNodeTitleColor;\r\n property OnGetNodeSelectedTitleColor: TTMSFNCTreeViewGetNodeTitleColorEvent read FOnGetNodeSelectedTitleColor write FOnGetNodeSelectedTitleColor;\r\n property OnGetNodeDisabledTitleColor: TTMSFNCTreeViewGetNodeTitleColorEvent read FOnGetNodeDisabledTitleColor write FOnGetNodeDisabledTitleColor;\r\n property OnIsNodeExtended: TTMSFNCTreeViewIsNodeExtendedEvent read FOnIsNodeExtended write FOnIsNodeExtended;\r\n property OnNodeAnchorClick: TTMSFNCTreeViewNodeAnchorClickEvent read FOnNodeAnchorClick write FOnNodeAnchorClick;\r\n property OnNodeTitleAnchorClick: TTMSFNCTreeViewNodeTitleAnchorClickEvent read FOnNodeTitleAnchorClick write FOnNodeTitleAnchorClick;\r\n property OnNodeChanged: TTMSFNCTreeViewNodeChangedEvent read FOnNodeChanged write FOnNodeChanged;\r\n property Interaction: TTMSFNCTreeViewInteraction read FInteraction write SetInteraction;\r\n property OnVScroll: TTMSFNCTreeViewScrollEvent read FOnVScroll write FOnVScroll;\r\n property OnHScroll: TTMSFNCTreeViewScrollEvent read FOnHScroll write FOnHScroll;\r\n property Version: string read GetVersion;\r\n property ColumnStroke: TTMSFNCGraphicsStroke read FColumnStroke write SetColumnStroke;\r\n property InplaceEditorActive: Boolean read FInplaceEditorActive write FInplaceEditorActive;\r\n property UpdateNodeColumn: Integer read FUpdateNodeColumn write FUpdateNodeColumn;\r\n property OnColumnAnchorClick: TTMSFNCTreeViewColumnAnchorClickEvent read FOnColumnAnchorClick write FOnColumnAnchorClick;\r\n property OnCustomizeFilterListBox: TTMSFNCTreeViewCustomizeFilterListBoxEvent read FOnCustomizeFilterListBox write FOnCustomizeFilterListBox;\r\n {$IFDEF FNCLIB}\r\n property OnBeforeAddJSONNode: TTMSFNCTreeViewBeforeAddJSONNodeEvent read FOnBeforeAddJSONNode write FOnBeforeAddJSONNode;\r\n property OnAfterAddJSONNode: TTMSFNCTreeViewAfterAddJSONNodeEvent read FOnAfterAddJSONNode write FOnAfterAddJSONNode;\r\n {$ENDIF}\r\n property OnGetHTMLTemplateValue: TTMSFNCTreeViewGetHTMLTemplateValueEvent read FOnGetHTMLTemplateValue write FOnGetHTMLTemplateValue;\r\n property OnGetHTMLTemplate: TTMSFNCTreeViewGetHTMLTemplateEvent read FOnGetHTMLTemplate write FOnGetHTMLTemplate;\r\n\r\n property DragBitmap: TTMSFNCImage read FDragBitmap;\r\n public\r\n constructor Create(AOwner: TComponent); override;\r\n destructor Destroy; override;\r\n procedure Assign(Source: TPersistent); override;\r\n procedure Draw(AGraphics: TTMSFNCGraphics; ARect: TRectF); override;\r\n procedure InitSample; virtual;\r\n procedure CutToClipboard(ATextOnly: Boolean = False); virtual;\r\n procedure CopyToClipboard(ATextOnly: Boolean = False); virtual;\r\n procedure PasteFromClipboard; virtual;\r\n procedure Sort(AColumn: Integer = 0; ARecurse: Boolean = False; ACaseSensitive: Boolean = True; ASortingMode: TTMSFNCTreeViewNodesSortMode = nsmAscending; AClearNodeList: Boolean = True); {$IFDEF FMXLIB}reintroduce;{$ENDIF} virtual;\r\n procedure ClearSorting;\r\n\r\n procedure LoadFromStream(const AStream: TStream; AEncoding: TEncoding = nil); overload;\r\n {$IFNDEF WEBLIB}\r\n procedure LoadFromFile(const AFileName: string; AEncoding: TEncoding = nil); overload;\r\n procedure SaveToFile(const AFileName: string; const ATextOnly: Boolean = True; AEncoding: TEncoding = nil); overload;\r\n procedure SaveToStream(const AStream: TStream; const ATextOnly: Boolean = True; AEncoding: TEncoding = nil); overload;\r\n {$ENDIF}\r\n {$IFDEF FNCLIB}\r\n procedure ViewJSON(AFileName: string; AViewOptions: TTMSFNCTreeViewViewJSONOptions = nil); virtual;\r\n procedure ViewJSONFromStream(AStream: TStream; AViewOptions: TTMSFNCTreeViewViewJSONOptions = nil); virtual;\r\n procedure ViewJSONFromText(AText: string; AViewOptions: TTMSFNCTreeViewViewJSONOptions = nil); virtual;\r\n {$ENDIF}\r\n\r\n procedure RemoveSelectedVirtualNodes; virtual;\r\n procedure RemoveSelectedNodes; virtual;\r\n procedure UnSelectAllNodes; virtual;\r\n procedure SelectAllNodes; virtual;\r\n procedure UnSelectAllVirtualNodes; virtual;\r\n procedure SelectAllVirtualNodes; virtual;\r\n procedure SelectNode(ANode: TTMSFNCTreeViewNode); virtual;\r\n procedure SelectVirtualNodeByRow(ARow: Integer); virtual;\r\n procedure SelectVirtualNode(ANode: TTMSFNCTreeViewVirtualNode); virtual;\r\n procedure SelectNodes(ANodes: TTMSFNCTreeViewNodeArray); virtual;\r\n procedure SelectVirtualNodes(ANodes: TTMSFNCTreeViewVirtualNodeArray); virtual;\r\n procedure UnSelectNode(ANode: TTMSFNCTreeViewNode); virtual;\r\n procedure UnSelectVirtualNode(ANode: TTMSFNCTreeViewVirtualNode); virtual;\r\n procedure UnSelectNodes(ANodes: TTMSFNCTreeViewNodeArray); virtual;\r\n procedure UnSelectVirtualNodes(ANodes: TTMSFNCTreeViewVirtualNodeArray); virtual;\r\n procedure RemoveNodeFromSelection(ANode: TTMSFNCTreeViewVirtualNode); override;\r\n procedure AddNodeToSelection(ANode: TTMSFNCTreeViewVirtualNode); override;\r\n procedure EditNode(ANode: TTMSFNCTreeViewNode; AColumn: Integer); virtual;\r\n procedure EditVirtualNode(ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer); virtual;\r\n procedure StopEditing; virtual;\r\n procedure CancelEditing; virtual;\r\n procedure Clear; virtual;\r\n function GetVisibleNodeCount: Integer; virtual;\r\n function GetFirstVisibleVirtualNode: TTMSFNCTreeViewVirtualNode; virtual;\r\n function GetLastVisibleVirtualNode: TTMSFNCTreeViewVirtualNode; virtual;\r\n function GetFirstVisibleVirtualNodeRow: Integer; virtual;\r\n function GetLastVisibleVirtualNodeRow: Integer; virtual;\r\n function GetNodesFromClipboard: TTMSFNCTreeViewCopyNodes; virtual;\r\n function IsEditing: Boolean; virtual;\r\n function LookupNode(ALookupString: String; ARootNodesOnly: Boolean = False; AColumn: Integer = -1; ACaseSensitive: Boolean = False; AAutoSelect: Boolean = False; AAutoExpand: Boolean = False): TTMSFNCTreeViewVirtualNode; virtual;\r\n function GetInplaceEditor: TTMSFNCTreeViewInplaceEditor; virtual;\r\n function IsNodeSelectable(ANode: TTMSFNCTreeViewNode): Boolean; virtual;\r\n function IsVirtualNodeSelectable(ANode: TTMSFNCTreeViewVirtualNode): Boolean; virtual;\r\n function XYToColumnAnchor(AX, AY: Single; var AIndex: Integer): string; virtual;\r\n function XYToNode(X, Y: Double; OffsetX: Single = 0): TTMSFNCTreeViewVirtualNode; virtual;\r\n function XYToNodeAnchor(ANode: TTMSFNCTreeViewVirtualNode; X, Y: Single): TTMSFNCTreeViewNodeAnchor; virtual;\r\n function XYToNodeTitleAnchor(ANode: TTMSFNCTreeViewVirtualNode; X, Y: Single): TTMSFNCTreeViewNodeAnchor; virtual;\r\n function XYToNodeExpand(ANode: TTMSFNCTreeViewVirtualNode; X, Y: Single): Boolean; virtual;\r\n function XYToNodeExtra(ANode: TTMSFNCTreeViewVirtualNode; X, Y: Single): Boolean; virtual;\r\n function XYToNodeTitleExtra(ANode: TTMSFNCTreeViewVirtualNode; X, Y: Single): Boolean; virtual;\r\n function XYToNodeCheck(ANode: TTMSFNCTreeViewVirtualNode; X, Y: Single): TTMSFNCTreeViewNodeCheck; virtual;\r\n function XYToNodeIcon(ANode: TTMSFNCTreeViewVirtualNode; X, Y: Single): TTMSFNCTreeViewNodeIcon; virtual;\r\n function XYToNodeTextColumn(ANode: TTMSFNCTreeViewVirtualNode; X, Y: Single): Integer; virtual;\r\n function XYToColumnSize(X, Y: Single): Integer; virtual;\r\n function XYToColumn(X, Y: Single; AIncludeRows: Boolean = False): Integer; virtual;\r\n function XYToColumnFilter(X, Y: Single): Integer; virtual;\r\n function XYToColumnExpand(X, Y: Single): Integer; virtual;\r\n function SelectedNodeCount: Integer; virtual;\r\n function SelectedVirtualNodeCount: Integer; virtual;\r\n function IsNodeSelected(ANode: TTMSFNCTreeViewNode): Boolean; virtual;\r\n function IsVirtualNodeSelected(ANode: TTMSFNCTreeViewVirtualNode): Boolean; virtual;\r\n property FocusedVirtualNode: TTMSFNCTreeViewVirtualNode read GetFocusedVirtualNode write SetFocusedVirtualNode;\r\n property FocusedNode: TTMSFNCTreeViewNode read GetFocusedNode write SetFocusedNode;\r\n property SelectedNodes[AIndex: Integer]: TTMSFNCTreeViewNode read GetSelNode;\r\n property SelectedVirtualNode: TTMSFNCTreeViewVirtualNode read GetFocusedVirtualNode write SetSelectedVirtualNode;\r\n property SelectedNode: TTMSFNCTreeViewNode read GetFocusedNode write SetSelectedNode;\r\n property SelectedVirtualNodes[AIndex: Integer]: TTMSFNCTreeViewVirtualNode read GetSelVirtualNode;\r\n property SortColumn: Integer read FSortColumn write SetSortColumn default -1;\r\n property DragNode: TTMSFNCTreeViewVirtualNode read FDragNode write FDragNode;\r\n property DragModeStarted: Boolean read FDragModeStarted;\r\n property CompactMode: Boolean read FCompactMode write SetCompactMode;\r\n property TopRow: Integer read GetTopRow write SetTopRow;\r\n property BottomRow: Integer read GetBottomRow;\r\n\r\n property OnCustomReorder: TTMSFNCTreeViewReorderEvent read FOnCustomReorder write FOnCustomReorder;\r\n property OnCustomDragOver: TTMSFNCTreeViewDragOverEvent read FOnCustomDragOver write FOnCustomDragOver;\r\n property OnCustomDragDrop: TTMSFNCTreeViewDragDropEvent read FOnCustomDragDrop write FOnCustomDragDrop;\r\n property OnCustomCopyToClipboard: TNotifyEvent read FOnCustomCopyToClipboard write FOnCustomCopyToClipboard;\r\n property OnCustomCutToClipboard: TNotifyEvent read FOnCustomCutToClipboard write FOnCustomCutToClipboard;\r\n property OnCustomPasteFromClipboard: TNotifyEvent read FOnCustomPasteFromClipboard write FOnCustomPasteFromClipboard;\r\n property OnCustomColumnSort: TTMSFNCTreeViewColumnSortEvent read FOnCustomColumnSort write FOnCustomColumnSort;\r\n property OnCustomLookup: TTMSFNCTreeViewLookupEvent read FOnCustomLookup write FOnCustomLookup;\r\n end;\r\n\r\n TTMSFNCTreeViewPublished = class(TTMSFNCCustomTreeView)\r\n published\r\n property Fill;\r\n property Stroke;\r\n property BitmapContainer;\r\n property HorizontalScrollBarVisible;\r\n property VerticalScrollBarVisible;\r\n property Groups;\r\n property GroupsAppearance;\r\n property ColumnStroke;\r\n property Columns;\r\n property Nodes;\r\n property ColumnsAppearance;\r\n property NodesAppearance;\r\n property Interaction;\r\n property StretchScrollBars;\r\n property Version;\r\n property PopupMenu;\r\n property GlobalFont;\r\n property OnCustomizeFilterListBox;\r\n property OnNeedFilterDropDownData;\r\n property OnFilterSelect;\r\n property OnBeforeDrawColumn;\r\n property OnAfterDrawColumn;\r\n property OnBeforeDrawColumnHeader;\r\n property OnAfterDrawColumnHeader;\r\n property OnBeforeDrawNodeColumn;\r\n property OnAfterDrawNodeColumn;\r\n property OnBeforeSortNodes;\r\n property OnAfterSortNodes;\r\n property OnBeforeDrawGroup;\r\n property OnAfterDrawGroup;\r\n property OnBeforeDrawNode;\r\n property OnAfterDrawNode;\r\n property OnBeforeDrawColumnText;\r\n property OnGetColumnText;\r\n property OnNodeCompare;\r\n property OnAfterDrawColumnText;\r\n property OnBeforeDrawGroupText;\r\n property OnGetGroupText;\r\n property OnAfterDrawGroupText;\r\n property OnBeforeDrawNodeText;\r\n property OnAfterDrawNodeIcon;\r\n property OnAfterDrawNodeExpand;\r\n property OnBeforeDrawNodeIcon;\r\n property OnBeforeDrawNodeExpand;\r\n property OnAfterDrawNodeCheck;\r\n property OnBeforeDrawNodeCheck;\r\n property OnGetNodeCheckType;\r\n property OnGetNodeText;\r\n property OnGetNodeData;\r\n property OnBeforeSizeColumn;\r\n property OnAfterSizeColumn;\r\n property OnGetNodeTrimming;\r\n property OnGetNodeWordWrapping;\r\n property OnGetNodeHorizontalTextAlign;\r\n property OnGetNodeVerticalTextAlign;\r\n property OnGetColumnTrimming;\r\n property OnFocusedNodeChanged;\r\n property OnGetColumnWordWrapping;\r\n property OnGetColumnHorizontalTextAlign;\r\n property OnGetColumnVerticalTextAlign;\r\n property OnBeforeUnCheckNode;\r\n property OnAfterUnCheckNode;\r\n property OnBeforeCheckNode;\r\n property OnAfterCheckNode;\r\n property OnBeforeCollapseNode;\r\n property OnAfterCollapseNode;\r\n property OnBeforeExpandNode;\r\n property OnAfterExpandNode;\r\n property OnGetNodeIcon;\r\n property OnGetNodeIconSize;\r\n property OnGetNumberOfNodes;\r\n property OnIsNodeExtended;\r\n property OnIsNodeExpanded;\r\n property OnAfterDrawNodeText;\r\n property OnIsNodeChecked;\r\n property OnNodeAnchorClick;\r\n property OnBeforeUpdateNode;\r\n property OnAfterUpdateNode;\r\n property OnBeforeSelectNode;\r\n property OnAfterSelectNode;\r\n property OnBeforeSelectAllNodes;\r\n property OnAfterSelectAllNodes;\r\n property OnNodeClick;\r\n property OnNodeValueClick;\r\n property OnNodeMouseLeave;\r\n property OnNodeMouseEnter;\r\n property OnNodeDblClick;\r\n property OnBeforeUnSelectNode;\r\n property OnAfterUnSelectNode;\r\n property OnGetNodeSides;\r\n property OnBeforeOpenInplaceEditor;\r\n property OnCloseInplaceEditor;\r\n property OnAfterOpenInplaceEditor;\r\n property OnGetInplaceEditor;\r\n property OnCustomizeInplaceEditor;\r\n property OnGetInplaceEditorRect;\r\n property OnNodeChanged;\r\n property OnHScroll;\r\n property OnVScroll;\r\n property OnBeforeDrawColumnEmptySpace;\r\n property OnAfterDrawColumnEmptySpace;\r\n property OnBeforeDrawGroupEmptySpace;\r\n property OnAfterDrawGroupEmptySpace;\r\n// property OnIsNodeVisible;\r\n property OnIsNodeEnabled;\r\n property OnGetNodeColor;\r\n property OnGetNodeSelectedColor;\r\n property OnGetNodeDisabledColor;\r\n property OnGetNodeTextColor;\r\n property OnGetNodeSelectedTextColor;\r\n property OnGetNodeDisabledTextColor;\r\n property OnGetNodeHeight;\r\n property OnBeforeReorderNode;\r\n property OnAfterReorderNode;\r\n property OnBeforeDropNode;\r\n property OnAfterDropNode;\r\n property OnBeforeCutToClipboard;\r\n property OnBeforeCopyToClipboard;\r\n property OnBeforePasteFromClipboard;\r\n property OnAfterCutToClipboard;\r\n property OnAfterCopyToClipboard;\r\n property OnAfterPasteFromClipboard;\r\n property OnBeforeDrawSortIndicator;\r\n property OnAfterDrawSortIndicator;\r\n property OnColumnAnchorClick;\r\n {$IFDEF FNCLIB}\r\n property OnBeforeAddJSONNode;\r\n property OnAfterAddJSONNode;\r\n property DefaultViewJSONOptions;\r\n {$ENDIF}\r\n property OnGetHTMLTemplateValue;\r\n property OnGetHTMLTemplate;\r\n end;\r\n\r\n\r\n{$IFDEF WEBLIB}\r\nconst\r\n TTMSFNCTREEVIEWEXPAND = 'data:image/PNG;base64,iVBORw0KGgoAAAANSUhEUgAAAAsAAAALCAIAAAAmzuBxAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAA'+\r\n 'AJcEhZcwAADsMAAA7DAcdvqGQAAAAYdEVYdFNvZnR3YXJlAHBhaW50Lm5ldCA0LjAuNvyMY98AAAAySURBVChT'+\r\n 'Y6iurcaPQCr+4wZYVHj5ekFZYEBdFUAJTISiAg4gEnBAIxVoAKoCH6qtBgAs4hCpNRg4EQAAAABJRU5ErkJggg'+\r\n '==';\r\n TTMSFNCTREEVIEWCOLLAPSE = 'data:image/PNG;base64,iVBORw0KGgoAAAANSUhEUgAAAAsAAAALCAIAAAAmzuBxAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUA'+\r\n 'AAAJcEhZcwAADsMAAA7DAcdvqGQAAAAYdEVYdFNvZnR3YXJlAHBhaW50Lm5ldCA0LjAuNvyMY98AAAAmSURB'+\r\n 'VChTY6iurcaPQCr+4wYDoMLL1wsZQQRJNAMroKIKfKi2GgCBNiGJV4wrvQAAAABJRU5ErkJggg==';\r\n TTMSFNCTREEVIEWEXPANDLARGE = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABYAAAAWCAIAAABL1vtsAAAAAXNSR0IArs4'+\r\n 'c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAYdEVYdFNvZnR3YXJlAHBhaW50'+\r\n 'Lm5ldCA0LjAuNvyMY98AAABDSURBVDhPY6iuraYQUc+I/2QBehnh5esFRFAOBhg1AgFoYwREAzEIop42R'+\r\n 'mACZA2YYNQIBKCXEfgBtY2gBFFsRG01AN+TQqHfgmnlAAAAAElFTkSuQmCC';\r\n TTMSFNCTREEVIEWCOLLAPSELARGE = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABYAAAAWCAIAAABL1vtsAAAABGdBTUEAALGP'+\r\n 'C/xhBQAAAAlwSFlzAAAOwgAADsIBFShKgAAAABh0RVh0U29mdHdhcmUAcGFpbnQubmV0IDQuMC42/Ixj3w'+\r\n 'AAADRJREFUOE9jqK6tphBRz4j/ZIFRIxBg+Bvh5euFB0EVgQEtjSAejBqBAMPTCEoQxUbUVgMAPoCGIXvOpikAAAAASUVORK5CYII=';\r\n{$ENDIF}\r\n\r\nimplementation\r\n\r\nuses\r\n Math, WEBLib.TMSFNCTreeViewBase, WEBLib.TMSFNCUtils,\r\n WEBLib.TMSFNCStyles, WEBLib.Forms, WEBLib.Graphics\r\n {$IFDEF FMXLIB}\r\n ,FMX.Styles.Objects\r\n {$ENDIF}\r\n {$IFNDEF WEBLIB}\r\n {$IFNDEF LCLLIB}\r\n ,Rtti\r\n {$ENDIF}\r\n {$ENDIF}\r\n ;\r\n\r\n{$R TMSFNCTreeView.res}\r\n\r\ntype\r\n TTMSFNCTreeViewGroupOpen = class(TTMSFNCTreeViewGroup);\r\n TTMSFNCTreeViewNodeOpen = class(TTMSFNCTreeViewNode);\r\n TTMSFNCTreeViewColumnOpen = class(TTMSFNCTreeViewColumn);\r\n TTMSFNCTreeViewVirtualNodeOpen = class(TTMSFNCTreeViewVirtualNode);\r\n\r\nfunction GetTickCountX: DWORD;\r\nvar\r\n h, m, s, ms: Word;\r\nbegin\r\n DecodeTime(Now, h, m, s, ms);\r\n Result := ms + s * 1000 + m * 60 * 1000 + h * 60 * 60 * 1000;\r\nend;\r\n\r\nfunction AnimateDouble(var Start, Stop: Double; Delta, Margin: Double): Boolean;\r\nbegin\r\n Result := true;\r\n if (Start > Stop - Margin) and (Start < Stop + Margin) then\r\n begin\r\n Start := Stop;\r\n Result := false;\r\n end\r\n else\r\n begin\r\n Delta := Max(Margin, Delta);\r\n if Start < Stop then\r\n Start := Start + Delta\r\n else\r\n Start := Start - Delta;\r\n end;\r\nend;\r\n\r\n{ TTMSFNCCustomTreeView }\r\n\r\n{$IFDEF FNCLIB}\r\nprocedure TTMSFNCCustomTreeView.ViewJSON(AFileName: string; AViewOptions: TTMSFNCTreeViewViewJSONOptions = nil);\r\nvar\r\n ms: TMemoryStream;\r\n procedure InternalInputFromJSON;\r\n begin\r\n ms.Position := 0;\r\n ViewJSONFromStream(ms, AViewOptions);\r\n end;\r\nbegin\r\n ms := TMemoryStream.Create;\r\n try\r\n {$IFDEF WEBLIB}\r\n ms.LoadFromFile(AFileName,\r\n procedure\r\n begin\r\n InternalInputFromJSON;\r\n ms.Free;\r\n end\r\n );\r\n {$ENDIF}\r\n {$IFNDEF WEBLIB}\r\n ms.LoadFromFile(AFileName);\r\n InternalInputFromJSON;\r\n {$ENDIF}\r\n finally\r\n {$IFNDEF WEBLIB}\r\n ms.Free;\r\n {$ENDIF}\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.ViewJSONFromStream(AStream: TStream; AViewOptions: TTMSFNCTreeViewViewJSONOptions = nil);\r\nvar\r\n SL: TStringList;\r\nbegin\r\n SL := TStringList.Create;\r\n try\r\n AStream.Position := 0;\r\n// SL.LoadFromStream(AStream{$IFNDEF LCLWEBLIB}, TEncoding.UTF8{$ENDIF});\r\n SL.LoadFromStream(AStream);\r\n ViewJSONFromText(SL.Text, AViewOptions);\r\n finally\r\n SL.Free;\r\n end;\r\nend;\r\n\r\ntype\r\n TTMSFNCTreeViewJSONType = (jtValue, jtArraySize, jtObjectSize, jtArrayIndex);\r\n\r\nprocedure TTMSFNCCustomTreeView.ViewJSONFromText(AText: string; AViewOptions: TTMSFNCTreeViewViewJSONOptions = nil);\r\nvar\r\n j : TJSONValue;\r\n col: TTMSFNCTreeViewColumn;\r\n NameIndex, ValueIndex: Integer;\r\n\r\n procedure SetJSONNodeText(ANode: TTMSFNCTreeViewNode; AName: string; ATextType: TTMSFNCTreeViewJSONType; AJSONValue: TJSONValue; AValue: string = '');\r\n begin\r\n if ANode.Values.Count = 0 then\r\n ANode.Values.Add;\r\n\r\n case ATextType of\r\n jtValue:\r\n begin\r\n ANode.Text[NameIndex] := AName;\r\n ANode.Values[NameIndex].HTMLTemplateItems.Add('NAME=' + AName);\r\n\r\n ANode.Text[ValueIndex] := AValue;\r\n ANode.Values[ValueIndex].HTMLTemplateItems.Add('VALUE=' + AValue);\r\n\r\n ANode.Tag := 1;\r\n end;\r\n jtArraySize:\r\n begin\r\n ANode.Text[NameIndex] := AName + ' [' + AValue + ']';\r\n ANode.Values[NameIndex].HTMLTemplateItems.Add('NAME=' + AName + ' [' + AValue + ']');\r\n ANode.Tag := 2;\r\n end;\r\n jtObjectSize:\r\n begin\r\n ANode.Text[NameIndex] := AName + ' {' + AValue + '}';\r\n ANode.Values[NameIndex].HTMLTemplateItems.Add('NAME=' + AName + ' {' + AValue + '}');\r\n ANode.Tag := 3;\r\n end;\r\n jtArrayIndex:\r\n begin\r\n ANode.Text[NameIndex] := AViewOptions.FArrayItemPrefix + AName + AViewOptions.FArrayItemSuffix;\r\n ANode.Values[NameIndex].HTMLTemplateItems.Add('NAME=' + AViewOptions.FArrayItemPrefix + AName + AViewOptions.FArrayItemSuffix);\r\n ANode.Tag := 4;\r\n end;\r\n end;\r\n\r\n DoAfterAddJSONNode(ANode, AJSONValue)\r\n end;\r\n\r\n procedure ParseNode(nj: TJSONValue; ANode: TTMSFNCTreeViewNode);\r\n var\r\n I, K, c: Integer;\r\n jv, njav, jav: TJSONValue;\r\n n, sn: TTMSFNCTreeViewNode;\r\n nja, ja: TJSONArray;\r\n name: string;\r\n add: Boolean;\r\n begin\r\n if nj is TJSONArray then\r\n begin\r\n add := True;\r\n DoBeforeAddJSONNode(nj, add);\r\n if add then\r\n begin\r\n if Assigned(ANode) then\r\n n := ANode.Nodes.Add\r\n else\r\n n := Nodes.Add;\r\n\r\n nja := nj as TJSONArray;\r\n c := TTMSFNCUtils.GetJSONArraySize(nja);\r\n SetJSONNodeText(n, name, jtArraySize, nj, IntToStr(c));\r\n for K := 0 to c - 1 do\r\n begin\r\n njav := TTMSFNCUtils.GetJSONArrayItem(nja, K);\r\n\r\n if (njav is TJSONObject) then\r\n begin\r\n sn := n.Nodes.Add;\r\n SetJSONNodeText(sn, IntToStr(K), jtArrayIndex, nj);\r\n sn.Text[0] := IntToStr(K);\r\n ParseNode(njav, sn)\r\n end\r\n else\r\n begin\r\n SetJSONNodeText(n.Nodes.Add, IntToStr(K), jtValue, njav, njav.Value);\r\n end;\r\n end;\r\n end;\r\n end\r\n else if nj is TJSONObject then\r\n begin\r\n for I := 0 to TTMSFNCUtils.GetJSONObjectSize(nj as TJSONObject) - 1 do\r\n begin\r\n name := '';\r\n\r\n name := TTMSFNCUtils.GetJSONObjectName(nj as TJSONObject, I);\r\n\r\n jv := TTMSFNCUtils.GetJSONObjectItem(nj as TJSONObject, I);\r\n\r\n add := True;\r\n DoBeforeAddJSONNode(jv, add);\r\n\r\n if add then\r\n begin\r\n if Assigned(ANode) then\r\n n := ANode.Nodes.Add\r\n else\r\n n := Nodes.Add;\r\n\r\n\r\n if Assigned(jv) then\r\n begin\r\n if jv is TJSONArray then\r\n begin\r\n ja := jv as TJSONArray;\r\n c := TTMSFNCUtils.GetJSONArraySize(ja);\r\n SetJSONNodeText(n, name, jtArraySize, jv, IntToStr(c));\r\n for K := 0 to c - 1 do\r\n begin\r\n jav := TTMSFNCUtils.GetJSONArrayItem(ja, K);\r\n\r\n if (jav is TJSONObject) then\r\n begin\r\n sn := n.Nodes.Add;\r\n SetJSONNodeText(sn, IntToStr(K), jtArrayIndex, jv);\r\n ParseNode(jav, sn)\r\n end\r\n else\r\n begin\r\n SetJSONNodeText(n.Nodes.Add, IntToStr(K), jtValue, jav, jav.Value);\r\n end;\r\n end;\r\n end\r\n else if jv is TJSONObject then\r\n begin\r\n SetJSONNodeText(n, name, jtObjectSize, jv, IntToStr(TTMSFNCUtils.GetJSONObjectSize((jv as TJSONObject))));\r\n ParseNode(jv, n);\r\n end\r\n else\r\n SetJSONNodeText(n, name, jtValue, jv, jv.Value);\r\n end;\r\n end;\r\n end;\r\n end\r\n else\r\n begin\r\n if Assigned(ANode) then\r\n SetJSONNodeText(ANode, name, jtValue, nj, nj.Value)\r\n else\r\n SetJSONNodeText(Nodes.Add, name, jtValue, nj, nj.Value);\r\n end;\r\n end;\r\nbegin\r\n NameIndex := 0;\r\n ValueIndex := 1;\r\n\r\n BeginUpdate;\r\n\r\n if AViewOptions = nil then\r\n AViewOptions := DefaultViewJSONOptions;\r\n\r\n Nodes.Clear;\r\n Columns.Clear;\r\n col := Columns.Add;\r\n col.Text := 'Object';\r\n col.Trimming := gttCharacter;\r\n col.Font.Style := [TFontStyle.fsBold];\r\n\r\n col := Columns.Add;\r\n col.Text := 'Value';\r\n\r\n Columns[NameIndex].HTMLTemplate := AViewOptions.NameHTMLTemplate;\r\n Columns[ValueIndex].HTMLTemplate := AViewOptions.ValueHTMLTemplate;\r\n\r\n j := TTMSFNCUtils.ParseJSON(AText);\r\n if Assigned(j) then\r\n try\r\n ParseNode(j, nil);\r\n finally\r\n j.Free;\r\n end;\r\n\r\n EndUpdate;\r\n\r\n if AViewOptions.ExpandNodes then\r\n ExpandAll;\r\n\r\n if AViewOptions.StretchColumn > -1 then\r\n begin\r\n BeginUpdate;\r\n\r\n ColumnsAppearance.StretchAll := False;\r\n ColumnsAppearance.StretchColumn := AViewOptions.StretchColumn;\r\n ColumnsAppearance.Stretch := False;\r\n AutoSizeColumn(0);\r\n Columns[0].Width := ColumnWidths[0];\r\n ColumnsAppearance.Stretch := True;\r\n\r\n EndUpdate;\r\n end;\r\nend;\r\n{$ENDIF}\r\n\r\n{$IFNDEF WEBLIB}\r\nprocedure TTMSFNCCustomTreeView.LoadFromFile(const AFileName: string; AEncoding: TEncoding = nil);\r\nvar\r\n Stream: TStream;\r\nbegin\r\n Stream := TFileStream.Create(AFileName, fmOpenRead);\r\n try\r\n LoadFromStream(Stream, AEncoding);\r\n finally\r\n Stream.Free;\r\n end;\r\nend;\r\n{$ENDIF}\r\n\r\nprocedure TTMSFNCCustomTreeView.LoadFromStream(const AStream: TStream; AEncoding: TEncoding = nil);\r\nvar\r\n List: TStringList;\r\n ANode, NextNode: TTMSFNCTreeViewNode;\r\n ALevel, i: Integer;\r\n CurrStr: string;\r\nbegin\r\n List := TStringList.Create;\r\n BeginUpdate;\r\n ClearNodeList;\r\n try\r\n try\r\n ClearNodes;\r\n List.LoadFromStream(AStream, AEncoding);\r\n ANode := nil;\r\n for i := 0 to List.Count - 1 do\r\n begin\r\n ALevel := -1;\r\n CurrStr := GetBufStart(List[i], ALevel);\r\n\r\n if ANode = nil then\r\n ANode := AddNode\r\n else if Assigned(ANode.VirtualNode) and (ANode.VirtualNode.Level = ALevel) then\r\n ANode := AddNode(ANode.GetParent)\r\n else if Assigned(ANode.VirtualNode) and (ANode.VirtualNode.Level = ALevel - 1) then\r\n ANode := AddNode(ANode)\r\n else if Assigned(ANode.VirtualNode) and (ANode.VirtualNode.Level > ALevel) then\r\n begin\r\n NextNode := ANode.GetParent;\r\n while Assigned(NextNode) and Assigned(NextNode.VirtualNode) and (NextNode.VirtualNode.Level > ALevel) do\r\n NextNode := NextNode.GetParent;\r\n ANode := AddNode(NextNode.GetParent);\r\n end;\r\n\r\n if Assigned(ANode) then\r\n ANode.LoadFromString(CurrStr);\r\n\r\n BuildNodeList;\r\n end;\r\n finally\r\n EndUpdate;\r\n List.Free;\r\n end;\r\n except\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCCustomTreeView.LookupNode(ALookupString: String; ARootNodesOnly: Boolean = False; AColumn: Integer = -1; ACaseSensitive: Boolean = False; AAutoSelect: Boolean = False; AAutoExpand: Boolean = False): TTMSFNCTreeViewVirtualNode;\r\nvar\r\n v: String;\r\n n, fvn, lvn: TTMSFNCTreeViewVirtualNode;\r\n s: String;\r\n sr, er, m: Integer;\r\n C: Integer;\r\n fnd: Boolean;\r\nbegin\r\n Result := nil;\r\n v := ALookupString;\r\n if not ACaseSensitive then\r\n v := Uppercase(v);\r\n\r\n if ARootNodesOnly then\r\n begin\r\n n := GetFirstRootVirtualNode;\r\n while Assigned(n) do\r\n begin\r\n fvn := GetFirstVisibleVirtualNode;\r\n lvn := GetLastVisibleVirtualNode;\r\n\r\n if (not Interaction.Lookup.VisibleNodesOnly) or (Interaction.Lookup.VisibleNodesOnly and (Assigned(fvn) and Assigned(lvn) and (n.Row <= lvn.Row) and (n.Row >= fvn.Row))) then\r\n begin\r\n if (AColumn >= 0) and (AColumn <= Columns.Count - 1) then\r\n begin\r\n s := '';\r\n DoGetNodeText(n, AColumn, tntmDrawing, s);\r\n\r\n s := TTMSFNCUtils.HTMLStrip(s);\r\n\r\n if not ACaseSensitive then\r\n s := UpperCase(s);\r\n\r\n if Pos(v, s) = 1 then\r\n begin\r\n Result := n;\r\n Break;\r\n end;\r\n end\r\n else\r\n begin\r\n fnd := False;\r\n for C := 0 to Columns.Count - 1 do\r\n begin\r\n s := '';\r\n DoGetNodeText(n, C, tntmDrawing, s);\r\n\r\n s := TTMSFNCUtils.HTMLStrip(s);\r\n\r\n if not ACaseSensitive then\r\n s := UpperCase(s);\r\n\r\n if Pos(v, s) = 1 then\r\n begin\r\n Result := n;\r\n fnd := True;\r\n Break;\r\n end;\r\n end;\r\n if fnd then\r\n Break;\r\n end;\r\n end;\r\n n := n.GetNextSibling;\r\n end;\r\n end\r\n else\r\n begin\r\n sr := 0;\r\n er := NodeStructure.Count - 1;\r\n\r\n for m := sr to er do\r\n begin\r\n n := GetNodeFromNodeStructure(m);\r\n if Assigned(n) then\r\n begin\r\n fvn := GetFirstVisibleVirtualNode;\r\n lvn := GetLastVisibleVirtualNode;\r\n if (not Interaction.Lookup.VisibleNodesOnly) or (Interaction.Lookup.VisibleNodesOnly and (Assigned(fvn) and Assigned(lvn) and (n.Row <= lvn.Row) and (n.Row >= fvn.Row))) then\r\n begin\r\n if (AColumn >= 0) and (AColumn <= Columns.Count - 1) then\r\n begin\r\n s := '';\r\n DoGetNodeText(n, AColumn, tntmDrawing, s);\r\n\r\n s := TTMSFNCUtils.HTMLStrip(s);\r\n\r\n if not ACaseSensitive then\r\n s := UpperCase(s);\r\n\r\n if Pos(v, s) = 1 then\r\n begin\r\n Result := n;\r\n Break;\r\n end;\r\n end\r\n else\r\n begin\r\n fnd := False;\r\n for C := 0 to Columns.Count - 1 do\r\n begin\r\n s := '';\r\n DoGetNodeText(n, C, tntmDrawing, s);\r\n\r\n s := TTMSFNCUtils.HTMLStrip(s);\r\n\r\n if not ACaseSensitive then\r\n s := UpperCase(s);\r\n\r\n if Pos(v, s) = 1 then\r\n begin\r\n Result := n;\r\n fnd := True;\r\n Break;\r\n end;\r\n end;\r\n if fnd then\r\n Break;\r\n end;\r\n end;\r\n end;\r\n end;\r\n end;\r\n\r\n if Assigned(Result) then\r\n begin\r\n if AAutoExpand then\r\n begin\r\n n := Result.GetParent;\r\n while Assigned(n) and (n.Level > 0) do\r\n begin\r\n if not n.Expanded then\r\n n.Expand;\r\n\r\n n := n.GetParent;\r\n end;\r\n\r\n if Assigned(n) then\r\n n.Expand;\r\n end;\r\n\r\n if AAutoSelect then\r\n begin\r\n if IsVirtualNodeSelectable(Result) then\r\n SelectVirtualNode(Result);\r\n\r\n ScrollToVirtualNode(Result, True);\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCCustomTreeView.NeedsReload(AVerticalOffset: Single): Boolean;\r\nbegin\r\n Result := False;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.Notification(AComponent: TComponent;\r\n Operation: TOperation);\r\nbegin\r\n inherited;\r\n if (AComponent = FAdapter) and (Operation = opRemove) then\r\n FAdapter := nil;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.OffsetNodeRects(\r\n ANode: TTMSFNCTreeViewVirtualNode; AX, AY: Single; var ARect: TRectF);\r\nvar\r\n C: Integer;\r\n nr: TRectF;\r\n r: TRectF;\r\nbegin\r\n r := GetNodesRect;\r\n OffsetRectEx(ARect, AX + r.Left, AY + r.Top);\r\n for C := 0 to ColumnCount - 1 do\r\n begin\r\n if (C >= 0) and (C <= Length(ANode.TitleRects) - 1) then\r\n begin\r\n nr := ANode.TitleRects[C];\r\n OffsetRectEx(nr, AX + r.Left, AY + r.Top);\r\n ANode.TitleRects[C] := nr;\r\n end;\r\n if (C >= 0) and (C <= Length(ANode.TextRects) - 1) then\r\n begin\r\n nr := ANode.TextRects[C];\r\n OffsetRectEx(nr, AX + r.Left, AY + r.Top);\r\n ANode.TextRects[C] := nr;\r\n end;\r\n if (C >= 0) and (C <= Length(ANode.ExtraRects) - 1) then\r\n begin\r\n nr := ANode.ExtraRects[C];\r\n OffsetRectEx(nr, AX + r.Left, AY + r.Top);\r\n ANode.ExtraRects[C] := nr;\r\n end;\r\n if (C >= 0) and (C <= Length(ANode.TitleExtraRects) - 1) then\r\n begin\r\n nr := ANode.TitleExtraRects[C];\r\n OffsetRectEx(nr, AX + r.Left, AY + r.Top);\r\n ANode.TitleExtraRects[C] := nr;\r\n end;\r\n if (C >= 0) and (C <= Length(ANode.BitmapRects) - 1) then\r\n begin\r\n nr := ANode.BitmapRects[C];\r\n OffsetRectEx(nr, AX + r.Left, AY + r.Top);\r\n ANode.BitmapRects[C] := nr;\r\n end;\r\n if (C >= 0) and (C <= Length(ANode.ExpandRects) - 1) then\r\n begin\r\n nr := ANode.ExpandRects[C];\r\n OffsetRectEx(nr, AX + r.Left, AY + r.Top);\r\n ANode.ExpandRects[C] := nr;\r\n end;\r\n if (C >= 0) and (C <= Length(ANode.CheckRects) - 1) then\r\n begin\r\n nr := ANode.CheckRects[C];\r\n OffsetRectEx(nr, AX + r.Left, AY + r.Top);\r\n ANode.CheckRects[C] := nr;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.PasteFromClipboard;\r\nvar\r\n s: String;\r\n a: TStringList;\r\n ANode, ANextNode: TTMSFNCTreeViewNode;\r\n ALevel: Integer;\r\n I, off: Integer;\r\n CurrStr: String;\r\nbegin\r\n if Assigned(OnCustomPasteFromClipboard) then\r\n OnCustomPasteFromClipboard(Self)\r\n else\r\n begin\r\n if TTMSFNCClipBoard.HasFormat(TTMSFNCClipBoardFormat.cfText) then\r\n begin\r\n s := TTMSFNCClipBoard.GetText;\r\n if (Pos(CLP_FMT, s) > 0) then\r\n begin\r\n a := TStringList.Create;\r\n try\r\n s := StringReplace(s, CLP_FMT, '', [rfReplaceAll]);\r\n a.Text := s;\r\n try\r\n ANode := nil;\r\n off := 0;\r\n for I := 0 to a.Count - 1 do\r\n begin\r\n ALevel := -1;\r\n CurrStr := GetBufStart(a[i], ALevel);\r\n\r\n if ANode = nil then\r\n begin\r\n ANode := AddNode(FocusedNode);\r\n off := ALevel;\r\n if Assigned(FocusedNode) then\r\n off := off - FocusedNode.VirtualNode.Level;\r\n end\r\n else if Assigned(ANode.VirtualNode) and (ANode.VirtualNode.Level = ALevel - off) then\r\n ANode := AddNode(ANode.GetParent)\r\n else if Assigned(ANode.VirtualNode) and (ANode.VirtualNode.Level = ALevel - 1 - off) then\r\n ANode := AddNode(ANode)\r\n else if Assigned(ANode.VirtualNode) and (ANode.VirtualNode.Level > ALevel - off) then\r\n begin\r\n ANextNode := ANode.GetParent;\r\n while Assigned(ANextNode) and Assigned(ANextNode.VirtualNode) and (ANextNode.VirtualNode.Level > ALevel - off) do\r\n ANextNode := ANextNode.GetParent;\r\n ANode := AddNode(ANextNode.GetParent);\r\n end;\r\n\r\n if Assigned(ANode) then\r\n ANode.LoadFromString(CurrStr);\r\n end;\r\n finally\r\n end;\r\n finally\r\n a.Free;\r\n end;\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\n{$IFNDEF WEBLIB}\r\nprocedure TTMSFNCCustomTreeView.SaveToFile(const AFileName: string; const ATextOnly: Boolean = True; AEncoding: TEncoding = nil);\r\nvar\r\n Stream: TStream;\r\nbegin\r\n Stream := TFileStream.Create(AFileName, fmCreate);\r\n try\r\n SaveToStream(Stream, ATextOnly, AEncoding);\r\n finally\r\n Stream.Free;\r\n end;\r\nend;\r\n{$ENDIF}\r\n\r\nfunction TTMSFNCCustomTreeView.ColumnStretchingActive: Boolean;\r\nvar\r\n i: integer;\r\n cw, cmw: Single;\r\nbegin\r\n Result := ColumnsAppearance.Stretch and ColumnsAppearance.StretchAll;\r\n\r\n cw := 0;\r\n cmw := 0;\r\n for I := 0 to Columns.Count - 1 do\r\n begin\r\n cw := cw + ColumnWidths[I];\r\n cmw := cmw + ColumnMinWidths[I];\r\n end;\r\n\r\n if cw <= cmw then\r\n Result := False;\r\nend;\r\n\r\n\r\nprocedure TTMSFNCCustomTreeView.ColumnStrokeChanged(Sender: TObject);\r\nbegin\r\n Invalidate;\r\nend;\r\n\r\nfunction TTMSFNCCustomTreeView.ConfigureNode(AGraphics: TTMSFNCGraphics; AIndex: Integer; ANode: TTMSFNCTreeViewVirtualNode; var AStartY: Single): Boolean;\r\nvar\r\n rt: TRectF;\r\n bw, bh: Double;\r\n x, y: Double;\r\n rc: TRectF;\r\n cache: TTMSFNCTreeViewCacheItem;\r\n C: Integer;\r\n cr, urc: TRectF;\r\n vs: Double;\r\n v: TTMSFNCTreeViewVirtualNode;\r\n lvlw: Double;\r\n rcalc, rcalctw, rcalct: TRectF;\r\n strc, strt: String;\r\n texp: Boolean;\r\n cx, cw: Double;\r\n maxh: Double;\r\n st, stp: Integer;\r\n bmpn: TTMSFNCBitmap;\r\n bmpw, bmph, expw, exph: Double;\r\n ww, wwt: Boolean;\r\n colw: Double;\r\n chk: TTMSFNCTreeViewNodeCheckType;\r\n ext: Boolean;\r\n chksz: Double;\r\n cl: TTMSFNCTreeViewColumn;\r\n expr, bmpr, txtr, titr, chkr, extr, textr: TTMSFNCArrayTRectF;\r\n vl: Double;\r\n r: TRectF;\r\n sz, szt, th: Single;\r\n loff, toff, roff, boff: Single;\r\n lm, tm, rm, bm: Single;\r\nbegin\r\n DoGetNodeData(ANode);\r\n\r\n loff := 0;\r\n toff := 0;\r\n roff := 0;\r\n boff := 0;\r\n GetNodeOffset(ANode, loff, toff, roff, boff);\r\n\r\n lm := 0;\r\n tm := 0;\r\n rm := 0;\r\n bm := 0;\r\n GetNodeMargins(lm, tm, rm, bm);\r\n\r\n vs := GetVerticalScrollPosition;\r\n cr := GetNodesRect;\r\n v := ANode;\r\n bw := GetTotalColumnNodeWidth - rm - lm;\r\n lvlw := NodesAppearance.LevelIndent * v.Level;\r\n\r\n if NodesAppearance.ExpandColumn = GetFirstVisibleColumn then\r\n begin\r\n x := lvlw;\r\n bw := bw - lvlw;\r\n end\r\n else\r\n x := 0;\r\n\r\n maxh := 0;\r\n y := AStartY;\r\n bh := 0;\r\n x := x + lm;\r\n y := y + tm;\r\n\r\n {$IFDEF FMXWEBLIB}\r\n rt := RectF(Int(x), Int(y), Int(x + bw), Int(y + bh));\r\n\r\n if HorizontalScrollBar.Visible or ColumnsAppearance.Stretch then\r\n begin\r\n if AIndex = 0 then\r\n rc := RectF(rt.Left + 1.5, rt.Top + 1.5, rt.Right - 1.5, rt.Bottom + 0.5)\r\n else if AIndex = RowCount - 1 then\r\n rc := RectF(rt.Left + 1.5, rt.Top + 0.5, rt.Right - 1.5, rt.Bottom + 0.5)\r\n else\r\n rc := RectF(rt.Left + 1.5, rt.Top + 0.5, rt.Right - 1.5, rt.Bottom + 0.5);\r\n end\r\n else\r\n begin\r\n if AIndex = 0 then\r\n rc := RectF(rt.Left + 1.5, rt.Top + 1.5, rt.Right - 0.5, rt.Bottom + 0.5)\r\n else if AIndex = RowCount - 1 then\r\n rc := RectF(rt.Left + 1.5, rt.Top + 0.5, rt.Right - 0.5, rt.Bottom + 0.5)\r\n else\r\n rc := RectF(rt.Left + 1.5, rt.Top + 0.5, rt.Right - 0.5, rt.Bottom + 0.5);\r\n end;\r\n {$ENDIF}\r\n {$IFDEF CMNLIB}\r\n rt := RectF(x, y, x + bw, y + bh);\r\n\r\n if HorizontalScrollBar.Visible or ColumnsAppearance.Stretch then\r\n begin\r\n if AIndex = 0 then\r\n rc := RectF(rt.Left + 1, rt.Top + 1, rt.Right - 1, rt.Bottom)\r\n else if AIndex = RowCount - 1 then\r\n rc := RectF(rt.Left + 1, rt.Top, rt.Right - 1, rt.Bottom)\r\n else\r\n rc := RectF(rt.Left + 1, rt.Top, rt.Right - 1, rt.Bottom);\r\n end\r\n else\r\n begin\r\n if AIndex = 0 then\r\n rc := RectF(rt.Left + 1, rt.Top + 1, rt.Right, rt.Bottom)\r\n else if AIndex = RowCount - 1 then\r\n rc := RectF(rt.Left + 1, rt.Top, rt.Right, rt.Bottom)\r\n else\r\n rc := RectF(rt.Left + 1, rt.Top, rt.Right, rt.Bottom);\r\n end;\r\n {$ENDIF}\r\n\r\n ConfigureNodeRect(AIndex, ANode, rc);\r\n\r\n if v.Calculated then\r\n bh := v.Height\r\n else\r\n begin\r\n UpdateNodeCalculated(v, True);\r\n\r\n if NodesAppearance.HeightMode = tnhmVariable then\r\n begin\r\n st := GetFirstVisibleColumn;\r\n stp := GetLastVisibleColumn;\r\n ext := False;\r\n DoIsNodeExtended(v, ext);\r\n\r\n if ext then\r\n stp := Min(st, stp);\r\n\r\n for C := st to stp do\r\n begin\r\n colw := ColumnWidths[C];\r\n if (colw > 0) or ext then\r\n begin\r\n strc := '';\r\n DoGetNodeText(v, C, tntmDrawing, strc);\r\n strt := '';\r\n DoGetNodeTitle(v, C, tntmDrawing, strt);\r\n texp := True;\r\n DoGetNodeTitleExpanded(v, C, texp);\r\n\r\n if CompactMode then\r\n begin\r\n strt := '';\r\n strc := '';\r\n texp := False;\r\n end;\r\n\r\n cx := ColumnPositions[C];\r\n if C = st then\r\n cx := cx + rc.Left;\r\n\r\n if ext then\r\n cw := cx + bw\r\n else\r\n cw := cx + ColumnWidths[C];\r\n\r\n if C = st then\r\n cw := cw - rc.Left;\r\n\r\n if (NodesAppearance.ExpandColumn = C) and (C > st) then\r\n cx := cx + lvlw;\r\n\r\n cw := cw - loff - roff - rm - lm;\r\n\r\n if C = NodesAppearance.ExpandColumn then\r\n begin\r\n expw := NodesAppearance.ExpandWidth + ScalePaintValue(4);\r\n exph := NodesAppearance.ExpandHeight + ScalePaintValue(4);\r\n cx := cx + expw;\r\n if exph > maxh then\r\n maxh := exph;\r\n end;\r\n\r\n chk := tvntNone;\r\n DoGetNodeCheckType(v, C, chk);\r\n if chk <> tvntNone then\r\n begin\r\n {$IFDEF FMXMOBILE}\r\n chksz := 29;\r\n {$ELSE}\r\n {$IFDEF CMNWEBLIB}\r\n chksz := ScalePaintValue(FCheckStartSize);\r\n {$ENDIF}\r\n {$IFDEF FMXLIB}\r\n chksz := 23;\r\n {$ENDIF}\r\n {$ENDIF}\r\n\r\n cx := cx + Max(0, chksz{$IFDEF CMNWEBLIB} + 4{$ENDIF});\r\n if chksz > maxh then\r\n maxh := chksz;\r\n end;\r\n\r\n bmpn := nil;\r\n DoGetNodeIcon(v, C, False, bmpn);\r\n if not Assigned(bmpn) and TTMSFNCUtils.IsHighDPIScale then\r\n DoGetNodeIcon(v, C, True, bmpn);\r\n\r\n if Assigned(bmpn) and (bmpn.Width > 0) and (bmpn.Height > 0) then\r\n begin\r\n bmpw := bmpn.Width + ScalePaintValue(4);\r\n bmph := bmpn.Height + ScalePaintValue(4);\r\n\r\n DoGetNodeIconSize(v, C, TTMSFNCUtils.IsHighDPIScale, bmpn, bmpw, bmph);\r\n\r\n cx := cx + bmpw;\r\n if bmph > maxh then\r\n maxh := bmph;\r\n end;\r\n\r\n ww := False;\r\n wwt := False;\r\n if (C >= 0) and (C <= Columns.Count - 1) then\r\n begin\r\n ww := Columns[C].WordWrapping;\r\n wwt := Columns[C].TitleWordWrapping;\r\n end;\r\n\r\n DoGetNodeWordWrapping(v, C, ww);\r\n DoGetNodeTitleWordWrapping(v, C, wwt);\r\n\r\n sz := 0;\r\n DoGetNodeExtraSize(v, C, sz);\r\n\r\n szt := 0;\r\n DoGetNodeTitleExtraSize(v, C, szt);\r\n\r\n rcalc := RectF(cx, 0, cw - sz, 10000);\r\n InflateRectEx(rcalc, ScalePaintValue(-2), 0);\r\n\r\n rcalctw := RectF(cx, 0, cw - szt, 10000);\r\n InflateRectEx(rcalctw, ScalePaintValue(-2), 0);\r\n\r\n cl := nil;\r\n if (C >= 0) and (C <= ColumnCount - 1) then\r\n cl := Columns[C];\r\n\r\n if Assigned(cl) and not cl.UseDefaultAppearance and not ext then\r\n AGraphics.Font.Assign(cl.Font)\r\n else\r\n begin\r\n if ext then\r\n AGraphics.Font.Assign(NodesAppearance.ExtendedFont)\r\n else\r\n AGraphics.Font.Assign(NodesAppearance.Font);\r\n end;\r\n\r\n if texp then\r\n begin\r\n rcalc := AGraphics.CalculateText(strc, rcalc, ww);\r\n rcalc.Bottom := rcalc.Bottom + ScalePaintValue(4);\r\n\r\n vl := (rcalc.Bottom - rcalc.Top);\r\n end\r\n else\r\n vl := 0;\r\n\r\n if strt <> '' then\r\n begin\r\n if Assigned(cl) and not cl.UseDefaultAppearance then\r\n AGraphics.Font.Assign(cl.TitleFont)\r\n else\r\n AGraphics.Font.Assign(NodesAppearance.TitleFont);\r\n\r\n rcalct := AGraphics.CalculateText(strt, rcalctw, wwt);\r\n rcalct.Bottom := rcalct.Bottom + ScalePaintValue(4);\r\n th := rcalct.Bottom - rcalct.Top;\r\n end\r\n else\r\n th := 0;\r\n\r\n UpdateNodeTitleHeight(v, Max(szt, th)); \r\n vl := vl + v.TitleHeight;\r\n\r\n DoGetNodeHeight(v, C, vl);\r\n\r\n if vl > maxh then\r\n maxh := vl;\r\n end;\r\n end;\r\n\r\n bh := Max(GetDefaultRowHeight(v), maxh + toff + boff + GetNodesSpacing(v));\r\n UpdateNodeHeight(v, Int(bh));\r\n TotalRowHeight := (TotalRowHeight - GetDefaultRowHeight(v)) + v.Height;\r\n end\r\n else\r\n begin\r\n bh := GetDefaultRowHeight(v);\r\n UpdateNodeHeight(v, bh);\r\n end;\r\n end;\r\n\r\n AStartY := AStartY + Int(bh);\r\n rc.Bottom := rc.Bottom + Int(bh);\r\n rc.Bottom := rc.Bottom - GetNodesSpacing(ANode);\r\n\r\n urc := rc;\r\n urc.Left := urc.Left + loff;\r\n urc.Top := urc.Top + toff;\r\n urc.Right := urc.Right + roff;\r\n urc.Bottom := urc.Bottom + boff;\r\n\r\n SetLength(extr, 0);\r\n SetLength(textr, 0);\r\n SetLength(txtr, 0);\r\n SetLength(titr, 0);\r\n SetLength(bmpr, 0);\r\n SetLength(expr, 0);\r\n SetLength(chkr, 0);\r\n\r\n st := GetFirstVisibleColumn;\r\n stp := GetLastVisibleColumn;\r\n ext := False;\r\n DoIsNodeExtended(v, ext);\r\n if ext then\r\n stp := Min(st, stp);\r\n\r\n for C := st to stp do\r\n begin\r\n colw := GetColumnWidth(C);\r\n cx := GetColumnPosition(C);\r\n if C = st then\r\n cx := cx + urc.Left;\r\n\r\n if ext then\r\n cw := cx + bw\r\n else\r\n cw := cx + colw;\r\n\r\n if C = st then\r\n cw := cw - urc.Left;\r\n\r\n if (NodesAppearance.ExpandColumn = C) and (C > st) then\r\n cx := cx + lvlw;\r\n\r\n if ext then\r\n cw := cw + lvlw;\r\n\r\n cw := cw - rm - roff;\r\n\r\n expw := 0;\r\n exph := 0;\r\n if C = NodesAppearance.ExpandColumn then\r\n begin\r\n expw := NodesAppearance.ExpandWidth + ScalePaintValue(4);\r\n exph := NodesAppearance.ExpandHeight + ScalePaintValue(4);\r\n end;\r\n\r\n SetLength(expr, Length(expr) + 1);\r\n expr[Length(expr) - 1] := RectF(Int(cx + ScalePaintValue(2)), Int(urc.Top + ((urc.Bottom - urc.Top) - exph) / 2 + ScalePaintValue(2)), Int(cx + expw - ScalePaintValue(2)),\r\n Int(urc.Top + ((urc.Bottom - urc.Top) - exph) / 2 + exph - ScalePaintValue(2)));\r\n\r\n cx := cx + expw;\r\n\r\n chk := tvntNone;\r\n chksz := 0;\r\n DoGetNodeCheckType(v, C, chk);\r\n if chk <> tvntNone then\r\n begin\r\n {$IFDEF FMXMOBILE}\r\n chksz := 29;\r\n {$ELSE}\r\n {$IFDEF CMNWEBLIB}\r\n chksz := ScalePaintValue(FCheckStartSize);\r\n {$ENDIF}\r\n {$IFDEF FMXLIB}\r\n chksz := 23;\r\n {$ENDIF}\r\n {$ENDIF}\r\n end;\r\n\r\n SetLength(chkr, Length(chkr) + 1);\r\n chkr[Length(chkr) - 1] := RectF(Int(cx + ScalePaintValue(4)), Int(urc.Top + ((urc.Bottom - urc.Top) - chksz) / 2 + ScalePaintValue(2)), Int(cx + chksz), Int(urc.Top + ((urc.Bottom - urc.Top) - chksz) / 2 + chksz - ScalePaintValue(2)));\r\n\r\n cx := cx + Max(0, chksz{$IFDEF CMNWEBLIB} + 4{$ENDIF});\r\n\r\n bmpn := nil;\r\n DoGetNodeIcon(v, C, False, bmpn);\r\n if not Assigned(bmpn) and TTMSFNCUtils.IsHighDPIScale then\r\n DoGetNodeIcon(v, C, True, bmpn);\r\n\r\n bmpw := 0;\r\n bmph := 0;\r\n if Assigned(bmpn) and (bmpn.Width > 0) and (bmpn.Height > 0) then\r\n begin\r\n bmpw := bmpn.Width + ScalePaintValue(4);\r\n bmph := bmpn.Height + ScalePaintValue(4);\r\n\r\n DoGetNodeIconSize(v, C, TTMSFNCUtils.IsHighDPIScale, bmpn, bmpw, bmph);\r\n end;\r\n\r\n SetLength(bmpr, Length(bmpr) + 1);\r\n bmpr[Length(bmpr) - 1] := RectF(Int(cx + ScalePaintValue(2)), Int(urc.Top + ((urc.Bottom - urc.Top) - bmph) / 2 + ScalePaintValue(2)), Int(cx + bmpw - ScalePaintValue(2)), Int(urc.Top + ((urc.Bottom - urc.Top) - bmph) / 2 + bmph - ScalePaintValue(2)));\r\n cx := cx + bmpw;\r\n\r\n sz := 0;\r\n DoGetNodeExtraSize(v, C, sz);\r\n\r\n szt := 0;\r\n DoGetNodeTitleExtraSize(v, C, szt);\r\n\r\n if ((v.Title[C] <> '') or (v.TitleHeight > 0)) and (v.Text[C] <> '') and v.TitleExpanded[C] then\r\n begin\r\n r := RectF(cx, urc.Top, cw - szt, urc.Top + v.TitleHeight);\r\n SetLength(titr, Length(titr) + 1);\r\n titr[Length(titr) - 1] := r;\r\n\r\n SetLength(textr, Length(textr) + 1);\r\n textr[Length(textr) - 1] := RectF(r.Right, urc.Top, r.Right + szt, urc.Top + szt);\r\n\r\n r := RectF(cx, r.Bottom, cw - sz, urc.Bottom);\r\n SetLength(txtr, Length(txtr) + 1);\r\n txtr[Length(txtr) - 1] := r;\r\n end\r\n else\r\n begin\r\n r := RectF(cx, urc.Top + ((urc.Bottom - urc.Top) - (rc.Bottom - rc.Top)) / 2, cw - szt, urc.Top + ((urc.Bottom - urc.Top) - (rc.Bottom - rc.Top)) / 2 + (rc.Bottom - rc.Top));\r\n SetLength(titr, Length(titr) + 1);\r\n titr[Length(titr) - 1] := r;\r\n\r\n SetLength(textr, Length(textr) + 1);\r\n textr[Length(textr) - 1] := RectF(r.Right, urc.Top, r.Right + szt, urc.Top + szt);\r\n\r\n r := RectF(cx, urc.Top + ((urc.Bottom - urc.Top) - (rc.Bottom - rc.Top)) / 2, cw - sz, urc.Top + ((urc.Bottom - urc.Top) - (rc.Bottom - rc.Top)) / 2 + (rc.Bottom - rc.Top));\r\n SetLength(txtr, Length(txtr) + 1);\r\n txtr[Length(txtr) - 1] := r;\r\n end;\r\n\r\n SetLength(extr, Length(extr) + 1);\r\n extr[Length(extr) - 1] := RectF(r.Right, r.Top, r.Right + sz, r.Bottom);\r\n end;\r\n\r\n UpdateNodeExtraRects(v, extr);\r\n UpdateNodeTitleExtraRects(v, textr);\r\n UpdateNodeTextRects(v, txtr);\r\n UpdateNodeTitleRects(v, titr);\r\n UpdateNodeBitmapRects(v, bmpr);\r\n UpdateNodeExpandRects(v, expr);\r\n UpdateNodeCheckRects(v, chkr);\r\n\r\n cache := TTMSFNCTreeViewCacheItem.CreateNode(rc, v);\r\n FNodeCache.Add(cache);\r\n UpdateNodeCacheReference(v, cache);\r\n\r\n Result := y - vs > (cr.Bottom - cr.Top);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.ConfigureNodeRect(AIndex: Integer; ANode: TTMSFNCTreeViewVirtualNode; var ARect: TRectF);\r\nbegin\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.CopyToClipboard(ATextOnly: Boolean = False);\r\nvar\r\n s: String;\r\n I, K: Integer;\r\n n: TTMSFNCTreeViewVirtualNode;\r\n v: TTMSFNCTreeViewVirtualNode;\r\n cl: TTMSFNCTreeViewIntegerList;\r\nbegin\r\n if Assigned(OnCustomCopyToClipboard) then\r\n OnCustomCopyToClipboard(Self)\r\n else\r\n begin\r\n cl := TTMSFNCTreeViewIntegerList.Create;\r\n try\r\n s := '';\r\n for I := 0 to SelectedVirtualNodeCount - 1 do\r\n begin\r\n n := SelectedVirtualNodes[I];\r\n if Assigned(n) and (cl.IndexOf(n.Row) = -1) then\r\n begin\r\n if Assigned(n.Node) then\r\n s := s + n.Node.SaveToString(ATextOnly) + ENDOFLINE;\r\n\r\n cl.Add(n.Row);\r\n end;\r\n\r\n if Assigned(n) then\r\n begin\r\n for K := n.Row + 1 to n.Row + n.TotalChildren do\r\n begin\r\n v := GetNodeFromNodeStructure(K);\r\n if Assigned(v) and Assigned(v.Node) and (cl.IndexOf(v.Row) = -1) then\r\n begin\r\n s := s + v.Node.SaveToString(ATextOnly) + ENDOFLINE;\r\n cl.Add(v.Row);\r\n end;\r\n end;\r\n end;\r\n end;\r\n\r\n if s <> '' then\r\n TTMSFNCClipBoard.SetText(CLP_FMT + s);\r\n finally\r\n cl.Free;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.RegisterRuntimeClasses;\r\nbegin\r\n inherited;\r\n RegisterClass(TTMSFNCCustomTreeView);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.ClearFocusedNode(ANode: TTMSFNCTreeViewVirtualNode);\r\nbegin\r\n if (ANode = FFocusedNode) or (ANode = nil) then\r\n FFocusedNode := nil;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.RemoveNodeFromSelection(ANode: TTMSFNCTreeViewVirtualNode);\r\nbegin\r\n FSelectedNodes.Remove(ANode);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.AddNodeToSelection(ANode: TTMSFNCTreeViewVirtualNode);\r\nbegin\r\n FSelectedNodes.Add(ANode);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.DoNodeCompare(ANode1: TTMSFNCTreeViewNode; ANode2: TTMSFNCTreeViewNode; AColumn: Integer; var ACompareResult: Integer);\r\nbegin\r\n if Assigned(OnNodeCompare) then\r\n OnNodeCompare(Self, ANode1, ANode2, AColumn, ACompareResult);\r\nend;\r\n\r\n{$IFNDEF WEBLIB}\r\nprocedure TTMSFNCCustomTreeView.SaveToStream(const AStream: TStream; const ATextOnly: Boolean = True; AEncoding: TEncoding = nil);\r\nvar\r\n ANode: TTMSFNCTreeViewNode;\r\n NodeStr: string;\r\n Buffer: TBytes;\r\n {$IFDEF LCLWEBLIB}\r\n I: Integer;\r\n {$ENDIF}\r\nbegin\r\n if Nodes.Count > 0 then\r\n begin\r\n ANode := Nodes[0];\r\n while ANode <> nil do\r\n begin\r\n NodeStr := ANode.SaveToString(ATextOnly);\r\n NodeStr := NodeStr + EndOfLine;\r\n {$IFNDEF LCLWEBLIB}\r\n if Assigned(AEncoding) then\r\n Buffer := AEncoding.GetBytes(NodeStr)\r\n else\r\n Buffer := TEncoding.Default.GetBytes(NodeStr);\r\n {$ENDIF}\r\n {$IFDEF LCLWEBLIB}\r\n SetLength(Buffer, Length(NodeStr));\r\n for I := 1 to Length(NodeStr) do\r\n Buffer[I - 1] := Ord(NodeStr[I]);\r\n {$ENDIF}\r\n\r\n {$IFDEF CMNLIB}\r\n AStream.Write(Buffer[0], Length(Buffer));\r\n {$ELSE}\r\n AStream.Write(Buffer, Length(Buffer));\r\n {$ENDIF}\r\n\r\n ANode := ANode.GetNext;\r\n end;\r\n end;\r\nend;\r\n{$ENDIF}\r\n\r\nprocedure TTMSFNCCustomTreeView.Scroll(AHorizontalPos, AVerticalPos: Double);\r\nvar\r\n h, v: Double;\r\nbegin\r\n h := GetHorizontalScrollPosition;\r\n v := GetVerticalScrollPosition;\r\n inherited;\r\n if h <> AHorizontalPos then\r\n DoHScroll(AHorizontalPos);\r\n\r\n if v <> AVerticalPos then\r\n DoVScroll(AVerticalPos);\r\nend;\r\n\r\nfunction TTMSFNCCustomTreeView.GetPreviousEditableColumn(AColumn: Integer): Integer;\r\nvar\r\n I: Integer;\r\nbegin\r\n Result := -1;\r\n if (AColumn > 0) and (AColumn <= Columns.Count - 1) then\r\n begin\r\n for I := AColumn - 1 downto 0 do\r\n begin\r\n if (Columns[I].EditorType <> tcetNone) or Columns[I].CustomEditor then\r\n begin\r\n Result := I;\r\n Break;\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCCustomTreeView.GetNextEditableColumn(AColumn: Integer): Integer;\r\nvar\r\n I: Integer;\r\nbegin\r\n Result := -1;\r\n if (AColumn >= 0) and (AColumn < Columns.Count - 1) then\r\n begin\r\n for I := AColumn + 1 to Columns.Count - 1 do\r\n begin\r\n if (Columns[I].EditorType <> tcetNone) or Columns[I].CustomEditor then\r\n begin\r\n Result := I;\r\n Break;\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCCustomTreeView.GetBottomRow: Integer;\r\nbegin\r\n Result := GetLastVisibleVirtualNodeRow;\r\nend;\r\n\r\nfunction TTMSFNCCustomTreeView.GetBufStart(ABuffer: string; var ALevel: Integer): string;\r\nvar\r\n Pos: Integer;\r\nbegin\r\n Pos := 1;\r\n ALevel := 0;\r\n while CharInArray(ABuffer[Pos{$IFDEF ZEROSTRINGINDEX}-1{$ENDIF}], [' ', #9]) do\r\n begin\r\n Inc(Pos);\r\n Inc(ALevel);\r\n end;\r\n Result := Copy(ABuffer, Pos, Length(ABuffer) - Pos + 1);\r\nend;\r\n\r\nfunction TTMSFNCCustomTreeView.GetFirstEditableColumn: Integer;\r\nvar\r\n I: Integer;\r\nbegin\r\n Result := -1;\r\n for I := 0 to Columns.Count - 1 do\r\n begin\r\n if (Columns[I].EditorType <> tcetNone) or Columns[I].CustomEditor then\r\n begin\r\n Result := I;\r\n Break;\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCCustomTreeView.GetFirstVisibleCacheItem: TTMSFNCTreeViewCacheItem;\r\nbegin\r\n Result := nil;\r\n if FNodeDisplay.Count > 0 then\r\n Result := FNodeDisplay[0];\r\nend;\r\n\r\nfunction TTMSFNCCustomTreeView.GetFirstVisibleColumn: Integer;\r\nvar\r\n r: TRectF;\r\n I: Integer;\r\nbegin\r\n Result := 0;\r\n if not ColumnsAppearance.OptimizedColumnDisplay then\r\n Exit;\r\n\r\n r := GetNodesRect;\r\n for I := 0 to Columns.Count - 1 do\r\n begin\r\n if ColumnPositions[I] + ColumnWidths[I] >= r.Left + GetHorizontalScrollPosition then\r\n begin\r\n Result := I;\r\n break;\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCCustomTreeView.GetFirstVisibleVirtualNode: TTMSFNCTreeViewVirtualNode;\r\nbegin\r\n Result := nil;\r\n if FNodeDisplay.Count > 0 then\r\n Result := FNodeDisplay[0].Node;\r\nend;\r\n\r\nfunction TTMSFNCCustomTreeView.GetFirstVisibleVirtualNodeRow: Integer;\r\nvar\r\n n: TTMSFNCTreeViewVirtualNode;\r\nbegin\r\n n := GetFirstVisibleVirtualNode;\r\n Result := 0;\r\n if Assigned(n) then\r\n Result := n.Row; \r\nend;\r\n\r\nfunction TTMSFNCCustomTreeView.GetLastEditableColumn: Integer;\r\nvar\r\n I: Integer;\r\nbegin\r\n Result := -1;\r\n for I := Columns.Count - 1 downto 0 do\r\n begin\r\n if (Columns[I].EditorType <> tcetNone) or Columns[I].CustomEditor then\r\n begin\r\n Result := I;\r\n Break;\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCCustomTreeView.GetLastVisibleColumn: Integer;\r\nvar\r\n r: TRectF;\r\n I: Integer;\r\nbegin\r\n Result := Columns.Count - 1;\r\n\r\n if not ColumnsAppearance.OptimizedColumnDisplay then\r\n Exit;\r\n\r\n r := GetNodesRect;\r\n for I := Result downto 0 do\r\n begin\r\n if ColumnPositions[I] <= r.Right + GetHorizontalScrollPosition then\r\n begin\r\n Result := I;\r\n break;\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCCustomTreeView.GetLastVisibleVirtualNode: TTMSFNCTreeViewVirtualNode;\r\nbegin\r\n Result := nil;\r\n if FNodeDisplay.Count > 0 then\r\n Result := FNodeDisplay[FNodeDisplay.Count - 1].Node;\r\nend;\r\n\r\nfunction TTMSFNCCustomTreeView.GetLastVisibleVirtualNodeRow: Integer;\r\nvar\r\n n: TTMSFNCTreeViewVirtualNode;\r\nbegin\r\n n := GetLastVisibleVirtualNode;\r\n Result := 0;\r\n if Assigned(n) then\r\n Result := n.Row;\r\nend;\r\n\r\nfunction TTMSFNCCustomTreeView.GetFocusedNode: TTMSFNCTreeViewNode;\r\nvar\r\n n: TTMSFNCTreeViewVirtualNode;\r\nbegin\r\n Result := nil;\r\n n := FFocusedNode;\r\n if Assigned(n) then\r\n Result := n.Node;\r\nend;\r\n\r\nfunction TTMSFNCCustomTreeView.GetFocusedVirtualNode: TTMSFNCTreeViewVirtualNode;\r\nbegin\r\n Result := FFocusedNode;\r\nend;\r\n\r\nfunction TTMSFNCCustomTreeView.GetSelectedVirtualNodeRow: Integer;\r\nvar\r\n n: TTMSFNCTreeViewVirtualNode;\r\nbegin\r\n Result := -1;\r\n n := SelectedVirtualNode;\r\n if Assigned(n) then\r\n Result := n.Row; \r\nend;\r\n\r\nfunction TTMSFNCCustomTreeView.GetSelNode(AIndex: Integer): TTMSFNCTreeViewNode;\r\nvar\r\n v: TTMSFNCTreeViewVirtualNode;\r\nbegin\r\n Result := nil;\r\n v := SelectedVirtualNodes[AIndex];\r\n if Assigned(v) then\r\n Result := v.Node;\r\nend;\r\n\r\nfunction TTMSFNCCustomTreeView.GetSelVirtualNode(\r\n AIndex: Integer): TTMSFNCTreeViewVirtualNode;\r\nbegin\r\n Result := nil;\r\n if (AIndex >= 0) and (AIndex <= SelectedVirtualNodeCount - 1) then\r\n Result := FSelectedNodes[AIndex];\r\nend;\r\n\r\nfunction TTMSFNCCustomTreeView.GetTopRow: Integer;\r\nbegin\r\n Result := GetFirstVisibleVirtualNodeRow;\r\nend;\r\n\r\n{$IFDEF FMXLIB}\r\nprocedure TTMSFNCCustomTreeView.DoInplaceEditorTimer(Sender: TObject);\r\nbegin\r\n if Assigned(FInplaceEditor) then\r\n begin\r\n FInplaceEditor.Free;\r\n FInplaceEditor := nil;\r\n end;\r\n\r\n FInplaceEditorTimer.Enabled := False;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.ScrollBarChanged(Sender: TObject);\r\nbegin\r\n UpdateScrollBars(True, False);\r\n FScrollBarTimer.Enabled := False;\r\nend;\r\n{$ENDIF}\r\n\r\nprocedure TTMSFNCCustomTreeView.DoAfterDrawGroup(AGraphics: TTMSFNCGraphics; ARect: TRectF;\r\n AGroup, AStartColumn, AEndColumn: Integer; AKind: TTMSFNCTreeViewCacheItemKind);\r\nbegin\r\n if Assigned(OnAfterDrawGroup) then\r\n OnAfterDrawGroup(Self, AGraphics, ARect, AGroup, AStartColumn, AEndColumn, AKind);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.DoAfterDrawGroupEmptySpace(AGraphics: TTMSFNCGraphics;\r\n ARect: TRectF; ASpace: TTMSFNCTreeViewGroupEmptySpace);\r\nbegin\r\n if Assigned(OnAfterDrawGroupEmptySpace) then\r\n OnAfterDrawGroupEmptySpace(Self, AGraphics, ARect, ASpace);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.DoAfterDrawGroupText(AGraphics: TTMSFNCGraphics;\r\n ARect: TRectF; AGroup, AStartColumn, AEndColumn: Integer; AKind: TTMSFNCTreeViewCacheItemKind; AText: String);\r\nbegin\r\n if Assigned(OnAfterDrawGroupText) then\r\n OnAfterDrawGroupText(Self, AGraphics, ARect, AGroup, AStartColumn, AEndColumn, AKind, AText);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.DoAfterDrawNode(AGraphics: TTMSFNCGraphics; ARect: TRectF;\r\n ANode: TTMSFNCTreeViewVirtualNode);\r\nbegin\r\n if Assigned(OnAfterDrawNode) then\r\n OnAfterDrawNode(Self, AGraphics, ARect, ANode);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.DoAfterDrawNodeCheck(AGraphics: TTMSFNCGraphics;\r\n ARect: TRectF; AColumn: Integer; ANode: TTMSFNCTreeViewVirtualNode\r\n ;ACheck: TTMSFNCBitmap);\r\nbegin\r\n if Assigned(OnAfterDrawNodeCheck) then\r\n OnAfterDrawNodeCheck(Self, AGraphics, ARect, AColumn, ANode, ACheck);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.DoAfterDrawNodeExpand(AGraphics: TTMSFNCGraphics;\r\n ARect: TRectF; AColumn: Integer; ANode: TTMSFNCTreeViewVirtualNode;\r\n AExpand: TTMSFNCBitmap);\r\nbegin\r\n if Assigned(OnAfterDrawNodeExpand) then\r\n OnAfterDrawNodeExpand(Self, AGraphics, ARect, AColumn, ANode, AExpand);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.DoAfterDrawNodeExtra(AGraphics: TTMSFNCGraphics;\r\n ARect: TRectF; AColumn: Integer; ANode: TTMSFNCTreeViewVirtualNode);\r\nbegin\r\n if Assigned(OnAfterDrawNodeExtra) then\r\n OnAfterDrawNodeExtra(Self, AGraphics, ARect, AColumn, ANode);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.DoAfterDrawNodeIcon(AGraphics: TTMSFNCGraphics;\r\n ARect: TRectF; AColumn: Integer; ANode: TTMSFNCTreeViewVirtualNode;\r\n AIcon: TTMSFNCBitmap);\r\nbegin\r\n if Assigned(OnAfterDrawNodeIcon) then\r\n OnAfterDrawNodeIcon(Self, AGraphics, ARect, AColumn, ANode, AIcon);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.DoAfterDrawNodeText(AGraphics: TTMSFNCGraphics;\r\n ARect: TRectF; AColumn: Integer; ANode: TTMSFNCTreeViewVirtualNode; AText: String);\r\nbegin\r\n if Assigned(OnAfterDrawNodeText) then\r\n OnAfterDrawNodeText(Self, AGraphics, ARect, AColumn, ANode, AText);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.DoAfterDrawNodeTitle(AGraphics: TTMSFNCGraphics;\r\n ARect: TRectF; AColumn: Integer; ANode: TTMSFNCTreeViewVirtualNode;\r\n ATitle: String);\r\nbegin\r\n if Assigned(OnAfterDrawNodeTitle) then\r\n OnAfterDrawNodeTitle(Self, AGraphics, ARect, AColumn, ANode, ATitle);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.DoAfterDrawNodeTitleExtra(\r\n AGraphics: TTMSFNCGraphics; ARect: TRectF; AColumn: Integer;\r\n ANode: TTMSFNCTreeViewVirtualNode);\r\nbegin\r\n if Assigned(OnAfterDrawNodeTitleExtra) then\r\n OnAfterDrawNodeTitleExtra(Self, AGraphics, ARect, AColumn, ANode);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.DoAfterDrawSortIndicator(\r\n AGraphics: TTMSFNCGraphics; ARect: TRectF; AColumn: Integer; ASortIndex: Integer;\r\n ASortKind: TTMSFNCTreeViewNodesSortKind);\r\nbegin\r\n if Assigned(OnAfterDrawSortIndicator) then\r\n OnAfterDrawSortIndicator(Self, AGraphics, ARect, AColumn, ASortIndex, ASortKind);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.DoAfterDropNode(AFromNode,\r\n AToNode: TTMSFNCTreeViewVirtualNode);\r\nbegin\r\n if Assigned(OnAfterDropNode) then\r\n OnAfterDropNode(Self, AFromNode, AToNode);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.DoAfterExpandNode(\r\n ANode: TTMSFNCTreeViewVirtualNode);\r\nbegin\r\n if Assigned(OnAfterExpandNode) then\r\n OnAfterExpandNode(Self, ANode);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.DoAfterOpenInplaceEditor(\r\n ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer;\r\n AInplaceEditor: TTMSFNCTreeViewInplaceEditor; AInplaceEditorRect: TRectF);\r\nbegin\r\n if Assigned(OnAfterOpenInplaceEditor) then\r\n OnAfterOpenInplaceEditor(Self, ANode, AColumn, AInplaceEditor, AInplaceEditorRect);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.DoAfterPasteFromClipboard;\r\nbegin\r\n if Assigned(OnAfterPasteFromClipboard) then\r\n OnAfterPasteFromClipboard(Self);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.DoAfterReorderNode(AFromNode,\r\n AToNode: TTMSFNCTreeViewVirtualNode);\r\nbegin\r\n if Assigned(OnAfterReorderNode) then\r\n OnAfterReorderNode(Self, AFromNode, AToNode);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.DoAfterDrawNodeColumn(AGraphics: TTMSFNCGraphics;\r\n ARect: TRectF; AColumn: Integer);\r\nbegin\r\n if Assigned(OnAfterDrawNodeColumn) then\r\n OnAfterDrawNodeColumn(Self, AGraphics, ARect, AColumn);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.DoAfterDrawColumn(AGraphics: TTMSFNCGraphics;\r\n ARect: TRectF; AColumn: Integer);\r\nbegin\r\n if Assigned(OnAfterDrawColumn) then\r\n OnAfterDrawColumn(Self, AGraphics, ARect, AColumn);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.DoAfterDrawColumnHeader(AGraphics: TTMSFNCGraphics;\r\n ARect: TRectF; AColumn: Integer; AKind: TTMSFNCTreeViewCacheItemKind);\r\nbegin\r\n if Assigned(OnAfterDrawColumnHeader) then\r\n OnAfterDrawColumnHeader(Self, AGraphics, ARect, AColumn, AKind);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.DoAfterDrawColumnEmptySpace(AGraphics: TTMSFNCGraphics;\r\n ARect: TRectF; ASpace: TTMSFNCTreeViewColumnEmptySpace);\r\nbegin\r\n if Assigned(OnAfterDrawColumnEmptySpace) then\r\n OnAfterDrawColumnEmptySpace(Self, AGraphics, ARect, ASpace);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.DoAfterDrawColumnText(AGraphics: TTMSFNCGraphics;\r\n ARect: TRectF; AColumn: Integer; AKind: TTMSFNCTreeViewCacheItemKind; AText: String);\r\nbegin\r\n if Assigned(OnAfterDrawColumnText) then\r\n OnAfterDrawColumnText(Self, AGraphics, ARect, AColumn, AKind, AText);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.DoAfterUnCheckNode(\r\n ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer);\r\nbegin\r\n if Assigned(OnAfterUnCheckNode) then\r\n OnAfterUnCheckNode(Self, ANode, AColumn);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.DoAfterUnSelectNode(\r\n ANode: TTMSFNCTreeViewVirtualNode);\r\nbegin\r\n if Assigned(OnAfterUnSelectNode) then\r\n OnAfterUnSelectNode(Self, ANode);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.DoAfterUpdateNode(ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer);\r\nbegin\r\n if Assigned(OnAfterUpdateNode) then\r\n OnAfterUpdateNode(Self, ANode, AColumn);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.DoBeforeDrawGroup(AGraphics: TTMSFNCGraphics; ARect: TRectF;\r\n AGroup, AStartColumn, AEndColumn: Integer; AKind: TTMSFNCTreeViewCacheItemKind; var AAllow: Boolean; var ADefaultDraw: Boolean);\r\nbegin\r\n if Assigned(OnBeforeDrawGroup) then\r\n OnBeforeDrawGroup(Self, AGraphics, ARect, AGroup, AStartColumn, AEndColumn, AKind, AAllow, ADefaultDraw);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.DoBeforeDrawGroupEmptySpace(AGraphics: TTMSFNCGraphics;\r\n ARect: TRectF; ASpace: TTMSFNCTreeViewGroupEmptySpace; var AAllow,\r\n ADefaultDraw: Boolean);\r\nbegin\r\n if Assigned(OnBeforeDrawGroupEmptySpace) then\r\n OnBeforeDrawGroupEmptySpace(Self, AGraphics, ARect, ASpace, AAllow, ADefaultDraw);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.DoBeforeDrawGroupText(AGraphics: TTMSFNCGraphics;\r\n ARect: TRectF; AGroup, AStartColumn, AEndColumn: Integer; AKind: TTMSFNCTreeViewCacheItemKind; AText: String; var AAllow: Boolean);\r\nbegin\r\n if Assigned(OnBeforeDrawGroupText) then\r\n OnBeforeDrawGroupText(Self, AGraphics, ARect, AGroup, AStartColumn, AEndColumn, AKind, AText, AAllow);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.DoBeforeDrawNode(AGraphics: TTMSFNCGraphics; ARect: TRectF;\r\n ANode: TTMSFNCTreeViewVirtualNode; var AAllow: Boolean; var ADefaultDraw: Boolean);\r\nbegin\r\n if Assigned(OnBeforeDrawNode) then\r\n OnBeforeDrawNode(Self, AGraphics, ARect, ANode, AAllow, ADefaultDraw);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.DoBeforeDrawNodeCheck(AGraphics: TTMSFNCGraphics;\r\n ARect: TRectF; AColumn: Integer; ANode: TTMSFNCTreeViewVirtualNode;\r\n ACheck: TTMSFNCBitmap; var AAllow: Boolean);\r\nbegin\r\n if Assigned(OnBeforeDrawNodeCheck) then\r\n OnBeforeDrawNodeCheck(Self, AGraphics, ARect, AColumn, ANode, ACheck, AAllow);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.DoBeforeDrawNodeExpand(AGraphics: TTMSFNCGraphics;\r\n ARect: TRectF; AColumn: Integer; ANode: TTMSFNCTreeViewVirtualNode;\r\n AExpand: TTMSFNCBitmap; var AAllow: Boolean);\r\nbegin\r\n if Assigned(OnBeforeDrawNodeExpand) then\r\n OnBeforeDrawNodeExpand(Self, AGraphics, ARect, AColumn, ANode, AExpand, AAllow);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.DoBeforeDrawNodeExtra(\r\n AGraphics: TTMSFNCGraphics; ARect: TRectF; AColumn: Integer;\r\n ANode: TTMSFNCTreeViewVirtualNode; var AAllow: Boolean);\r\nbegin\r\n if Assigned(OnBeforeDrawNodeExtra) then\r\n OnBeforeDrawNodeExtra(Self, AGraphics, ARect, AColumn, ANode, AAllow);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.DoBeforeDrawNodeTitleExtra(\r\n AGraphics: TTMSFNCGraphics; ARect: TRectF; AColumn: Integer;\r\n ANode: TTMSFNCTreeViewVirtualNode; var AAllow: Boolean);\r\nbegin\r\n if Assigned(OnBeforeDrawNodeTitleExtra) then\r\n OnBeforeDrawNodeTitleExtra(Self, AGraphics, ARect, AColumn, ANode, AAllow);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.DoBeforeDrawNodeIcon(AGraphics: TTMSFNCGraphics;\r\n ARect: TRectF; AColumn: Integer; ANode: TTMSFNCTreeViewVirtualNode;\r\n AIcon: TTMSFNCBitmap; var AAllow: Boolean);\r\nbegin\r\n if Assigned(OnBeforeDrawNodeIcon) then\r\n OnBeforeDrawNodeIcon(Self, AGraphics, ARect, AColumn, ANode, AIcon, AAllow);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.DoBeforeDrawNodeText(AGraphics: TTMSFNCGraphics; ARect: TRectF; AColumn: Integer; ANode: TTMSFNCTreeViewVirtualNode; {$IFNDEF UIPACK}var{$ENDIF} AText: String; var AAllow: Boolean);\r\nbegin\r\n if Assigned(OnBeforeDrawNodeText) then\r\n OnBeforeDrawNodeText(Self, AGraphics, ARect, AColumn, ANode, AText, AAllow);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.DoBeforeDrawNodeTitle(\r\n AGraphics: TTMSFNCGraphics; ARect: TRectF; AColumn: Integer;\r\n ANode: TTMSFNCTreeViewVirtualNode; ATitle: String; var AAllow: Boolean);\r\nbegin\r\n if Assigned(OnBeforeDrawNodeTitle) then\r\n OnBeforeDrawNodeTitle(Self, AGraphics, ARect, AColumn, ANode, ATitle, AAllow);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.DoBeforeDrawSortIndicator(\r\n AGraphics: TTMSFNCGraphics; ARect: TRectF; AColumn: Integer; ASortIndex: Integer;\r\n ASortKind: TTMSFNCTreeViewNodesSortKind; var ADefaultDraw: Boolean);\r\nbegin\r\n if Assigned(OnBeforeDrawSortIndicator) then\r\n OnBeforeDrawSortIndicator(Self, AGraphics, ARect, AColumn, ASortIndex, ASortKind, ADefaultDraw);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.DoBeforeDropNode(AFromNode,\r\n AToNode: TTMSFNCTreeViewVirtualNode; var ACanDrop: Boolean);\r\nbegin\r\n if Assigned(OnBeforeDropNode) then\r\n OnBeforeDropNode(Self, AFromNode, AToNode, ACanDrop);\r\nend;\r\n\r\n{$IFDEF FNCLIB}\r\nprocedure TTMSFNCCustomTreeView.DoBeforeAddJSONNode(AJSONValue: TJSONValue; var AAddNode: Boolean);\r\nbegin\r\n if Assigned(OnBeforeAddJSONNode) then\r\n OnBeforeAddJSONNode(Self, AJSONValue, AAddNode);\r\nend;\r\n{$ENDIF}\r\n\r\nprocedure TTMSFNCCustomTreeView.DoBeforeCheckNode(\r\n ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer; var ACanCheck: Boolean);\r\nbegin\r\n if Assigned(OnBeforeCheckNode) then\r\n OnBeforeCheckNode(Self, ANode, AColumn, ACanCheck);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.DoBeforeCollapseNode(\r\n ANode: TTMSFNCTreeViewVirtualNode; var ACanCollapse: Boolean);\r\nbegin\r\n if Assigned(OnBeforeCollapseNode) then\r\n OnBeforeCollapseNode(Self, ANode, ACanCollapse);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.DoBeforeCopyToClipboard(var ACanCopy: Boolean);\r\nbegin\r\n if Assigned(OnBeforeCopyToClipboard) then\r\n OnBeforeCopyToClipboard(Self, ACanCopy);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.DoBeforeCutToClipboard(var ACanCut: Boolean);\r\nbegin\r\n if Assigned(OnBeforeCutToClipboard) then\r\n OnBeforeCutToClipboard(Self, ACanCut);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.DoBeforeExpandNode(\r\n ANode: TTMSFNCTreeViewVirtualNode; var ACanExpand: Boolean);\r\nbegin\r\n if Assigned(OnBeforeExpandNode) then\r\n OnBeforeExpandNode(Self, ANode, ACanExpand);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.DoBeforeOpenInplaceEditor(\r\n ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer; var ACanOpen: Boolean);\r\nbegin\r\n if Assigned(OnBeforeOpenInplaceEditor) then\r\n OnBeforeOpenInplaceEditor(Self, ANode, AColumn, ACanOpen);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.DoBeforePasteFromClipboard(\r\n var ACanPaste: Boolean);\r\nbegin\r\n if Assigned(OnBeforePasteFromClipboard) then\r\n OnBeforePasteFromClipboard(Self, ACanPaste);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.DoBeforeReorderNode(AFromNode,\r\n AToNode: TTMSFNCTreeViewVirtualNode; var ACanReorder: Boolean);\r\nbegin\r\n if Assigned(OnBeforeReorderNode) then\r\n OnBeforeReorderNode(Self, AFromNode, AToNode, ACanReorder);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.DoBeforeDrawColumn(AGraphics: TTMSFNCGraphics;\r\n ARect: TRectF; AColumn: Integer; var AAllow: Boolean; var ADefaultDraw: Boolean);\r\nbegin\r\n if Assigned(OnBeforeDrawColumn) then\r\n OnBeforeDrawColumn(Self, AGraphics, ARect, AColumn, AAllow, ADefaultDraw);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.DoBeforeDrawNodeColumn(AGraphics: TTMSFNCGraphics;\r\n ARect: TRectF; AColumn: Integer; var AAllow: Boolean; var ADefaultDraw: Boolean);\r\nbegin\r\n if Assigned(OnBeforeDrawNodeColumn) then\r\n OnBeforeDrawNodeColumn(Self, AGraphics, ARect, AColumn, AAllow, ADefaultDraw);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.DoBeforeDrawColumnHeader(AGraphics: TTMSFNCGraphics;\r\n ARect: TRectF; AColumn: Integer; AKind: TTMSFNCTreeViewCacheItemKind; var AAllow: Boolean; var ADefaultDraw: Boolean);\r\nbegin\r\n if Assigned(OnBeforeDrawColumnHeader) then\r\n OnBeforeDrawColumnHeader(Self, AGraphics, ARect, AColumn, AKind, AAllow, ADefaultDraw);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.DoBeforeSizeColumn(AColumn: Integer; AColumnSize: Double; var ANewColumnSize: Double; var AAllow: Boolean);\r\nbegin\r\n if Assigned(OnBeforeSizeColumn) then\r\n OnBeforeSizeColumn(Self, AColumn, AColumnSize, ANewColumnSize, AAllow);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.DoBeforeSortNodes(ASortColumn: Integer;\r\n ASortMode: TTMSFNCTreeViewNodesSortMode; var ACanSort: Boolean);\r\nbegin\r\n if Assigned(OnBeforeSortNodes) then\r\n OnBeforeSortNodes(Self, ASortColumn, ASortMode, ACanSort);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.DoAfterSizeColumn(AColumn: Integer; AColumnSize: Double);\r\nbegin\r\n if Assigned(OnAfterSizeColumn) then\r\n OnAfterSizeColumn(Self, AColumn, AColumnSize);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.DoAfterSortNodes(ASortColumn: Integer;\r\n ASortMode: TTMSFNCTreeViewNodesSortMode);\r\nbegin\r\n if Assigned(OnAfterSortNodes) then\r\n OnAfterSortNodes(Self, ASortColumn, ASortMode);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.DoBeforeDrawColumnEmptySpace(AGraphics: TTMSFNCGraphics;\r\n ARect: TRectF; ASpace: TTMSFNCTreeViewColumnEmptySpace; var AAllow,\r\n ADefaultDraw: Boolean);\r\nbegin\r\n if Assigned(OnBeforeDrawColumnEmptySpace) then\r\n OnBeforeDrawColumnEmptySpace(Self, AGraphics, ARect, ASpace, AAllow, ADefaultDraw);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.DoBeforeDrawColumnText(AGraphics: TTMSFNCGraphics;\r\n ARect: TRectF; AColumn: Integer; AKind: TTMSFNCTreeViewCacheItemKind; AText: String; var AAllow: Boolean);\r\nbegin\r\n if Assigned(OnBeforeDrawColumnText) then\r\n OnBeforeDrawColumnText(Self, AGraphics, ARect, AColumn, AKind, AText, AAllow);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.DoNodeClick(ANode: TTMSFNCTreeViewVirtualNode);\r\nbegin\r\n if Assigned(OnNodeClick) then\r\n OnNodeClick(Self, ANode);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.DoNodeDblClick(ANode: TTMSFNCTreeViewVirtualNode);\r\nbegin\r\n if Assigned(OnNodeDblClick) then\r\n OnNodeDblClick(Self, ANode);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.DoNodeMouseLeave(ANode: TTMSFNCTreeViewVirtualNode);\r\nbegin\r\n if Assigned(OnNodeMouseLeave) then\r\n OnNodeMouseLeave(Self, ANode);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.DoNodeMouseEnter(ANode: TTMSFNCTreeViewVirtualNode);\r\nbegin\r\n if Assigned(OnNodeMouseEnter) then\r\n OnNodeMouseEnter(Self, ANode);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.DoNodeTitleAnchorClick(\r\n ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer; AAnchor: String);\r\nbegin\r\n if Assigned(OnNodeTitleAnchorClick) then\r\n OnNodeTitleAnchorClick(Self, ANode, AColumn, AAnchor)\r\n else if Interaction.AutoOpenURL then\r\n TTMSFNCUtils.OpenURL(AAnchor);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.DoNodeValueClick(\r\n ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer);\r\nbegin\r\n if Assigned(OnNodeValueClick) then\r\n OnNodeValueClick(Self, ANode, AColumn);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.DoUpdateNodeText(\r\n ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer; AText: String);\r\nbegin\r\n\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.DoUpdateNodeTitle(\r\n ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer; ATitle: String);\r\nbegin\r\n\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.DoBeforeSelectNode(ANode: TTMSFNCTreeViewVirtualNode;\r\n var ACanSelect: Boolean);\r\nbegin\r\n if Assigned(OnBeforeSelectNode) then\r\n OnBeforeSelectNode(Self, ANode, ACanSelect);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.DoBeforeSelectAllNodes(var ACanSelect: Boolean);\r\nbegin\r\n if Assigned(OnBeforeSelectAllNodes) then\r\n OnBeforeSelectAllNodes(Self, ACanSelect);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.DoBeforeUnCheckNode(\r\n ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer; var ACanUnCheck: Boolean);\r\nbegin\r\n if Assigned(OnBeforeUnCheckNode) then\r\n OnBeforeUnCheckNode(Self, ANode, AColumn, ACanUnCheck);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.DoBeforeUnSelectNode(\r\n ANode: TTMSFNCTreeViewVirtualNode; var ACanUnSelect: Boolean);\r\nbegin\r\n if Assigned(OnBeforeUnSelectNode) then\r\n OnBeforeUnSelectNode(Self, ANode, ACanUnSelect);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.DoBeforeUpdateNode(ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer; var AText: String;\r\n var ACanUpdate: Boolean);\r\nbegin\r\n if Assigned(OnBeforeUpdateNode) then\r\n OnBeforeUpdateNode(Self, ANode, AColumn, AText, ACanUpdate);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.DoCloseInplaceEditor(\r\n ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer; AInplaceEditor: TTMSFNCTreeViewInplaceEditor; ACancelled: Boolean;\r\n var ACanClose: Boolean);\r\nbegin\r\n if Assigned(OnCloseInplaceEditor) then\r\n OnCloseInplaceEditor(Self, ANode, AColumn, AInplaceEditor, ACancelled, ACanClose);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.DoColumnAnchorClick(AColumn: Integer;\r\n AAnchor: String);\r\nbegin\r\n if Assigned(OnColumnAnchorClick) then\r\n OnColumnAnchorClick(Self, AColumn, AAnchor)\r\n else if Interaction.AutoOpenURL then\r\n TTMSFNCUtils.OpenURL(AAnchor);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.DoCustomizeFilterListBox(AColumn: Integer; AListBox: TListBox);\r\nbegin\r\n if Assigned(OnCustomizeFilterListBox) then\r\n OnCustomizeFilterListBox(Self, AColumn, AListBox);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.DoCustomizeInplaceEditor(\r\n ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer;\r\n AInplaceEditor: TTMSFNCTreeViewInplaceEditor);\r\nbegin\r\n if Assigned(OnCustomizeInplaceEditor) then\r\n OnCustomizeInplaceEditor(Self, ANode, AColumn, AInplaceEditor);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.DoDrawNodeExtra(AGraphics: TTMSFNCGraphics;\r\n ARect: TRectF; AColumn: Integer; ANode: TTMSFNCTreeViewVirtualNode);\r\nbegin\r\n if Assigned(OnDrawNodeExtra) then\r\n OnDrawNodeExtra(Self, AGraphics, ARect, AColumn, ANode);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.DoDrawNodeTitleExtra(AGraphics: TTMSFNCGraphics;\r\n ARect: TRectF; AColumn: Integer; ANode: TTMSFNCTreeViewVirtualNode);\r\nbegin\r\n if Assigned(OnDrawNodeTitleExtra) then\r\n OnDrawNodeTitleExtra(Self, AGraphics, ARect, AColumn, ANode);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.DoEnter;\r\nbegin\r\n inherited;\r\n Invalidate;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.DoExit;\r\nbegin\r\n inherited;\r\n Invalidate;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.DoFilterSelect(AColumn: integer;\r\n var ACondition: string);\r\nbegin\r\n if Assigned(OnFilterSelect) then\r\n OnFilterSelect(Self, AColumn, ACondition);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.DoFocusedNodeChanged(\r\n ANode: TTMSFNCTreeViewVirtualNode);\r\nbegin\r\n if Assigned(OnFocusedNodeChanged) then\r\n OnFocusedNodeChanged(Self, ANode);\r\nend;\r\n\r\n{$IFDEF FNCLIB}\r\nprocedure TTMSFNCCustomTreeView.DoAfterAddJSONNode(ANode: TTMSFNCTreeViewNode; AJSONValue: TJSONValue);\r\nbegin\r\n if Assigned(OnAfterAddJSONNode) then\r\n OnAfterAddJSONNode(Self, ANode, AJSONValue);\r\nend;\r\n{$ENDIF}\r\n\r\nprocedure TTMSFNCCustomTreeView.DoAfterCheckNode(ANode: TTMSFNCTreeViewVirtualNode;\r\n AColumn: Integer);\r\nbegin\r\n if Assigned(OnAfterCheckNode) then\r\n OnAfterCheckNode(Self, ANode, AColumn);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.DoAfterCollapseNode(\r\n ANode: TTMSFNCTreeViewVirtualNode);\r\nbegin\r\n if Assigned(OnAfterCollapseNode) then\r\n OnAfterCollapseNode(Self, ANode);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.DoAfterCopyToClipboard;\r\nbegin\r\n if Assigned(OnAfterCopyToClipboard) then\r\n OnAfterCopyToClipboard(Self);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.DoAfterCutToClipboard;\r\nbegin\r\n if Assigned(OnAfterCutToClipboard) then\r\n OnAfterCutToClipboard(Self);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.DoGetGroupText(AGroup: Integer;\r\n AKind: TTMSFNCTreeViewCacheItemKind; var AText: String);\r\nbegin\r\n if Assigned(OnGetGroupText) then\r\n OnGetGroupText(Self, AGroup, AKind, AText);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.DoGetHTMLTemplate(ANodeValue: TTMSFNCTreeViewNodeValue; AColumnIndex: Integer; var AHTMLTemplate: string);\r\nbegin\r\n if Assigned(OnGetHTMLTemplate) then\r\n OnGetHTMLTemplate(Self, ANodeValue, AColumnIndex, AHTMLTemplate);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.DoGetHTMLTemplateValue(ANodeValue: TTMSFNCTreeViewNodeValue; AName: string; var AValue: string);\r\nbegin\r\n if Assigned(OnGetHTMLTemplateValue) then\r\n OnGetHTMLTemplateValue(Self, ANodeValue, AName, AValue);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.DoGetInplaceEditor(\r\n ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer; {$IFDEF FMXLIB}var ATransparent: Boolean;{$ENDIF}\r\n var AInplaceEditorClass: TTMSFNCTreeViewInplaceEditorClass);\r\nbegin\r\n if Assigned(OnGetInplaceEditor) then\r\n OnGetInplaceEditor(Self, ANode, AColumn, {$IFDEF FMXLIB}ATransparent, {$ENDIF}AInplaceEditorClass);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.DoGetNodeCheckType(\r\n ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer;\r\n var ACheckType: TTMSFNCTreeViewNodeCheckType);\r\nbegin\r\n inherited;\r\n if Assigned(OnGetNodeCheckType) then\r\n OnGetNodeCheckType(Self, ANode, AColumn, ACheckType);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.DoGetNodeHeight(\r\n ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer; var AHeight: Double);\r\nbegin\r\n inherited;\r\n if Assigned(OnGetNodeHeight) then\r\n OnGetNodeHeight(Self, ANode, AColumn, AHeight);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.DoGetNodeColor(ANode: TTMSFNCTreeViewVirtualNode;\r\n var AColor: TTMSFNCGraphicsColor);\r\nbegin\r\n inherited;\r\n if Assigned(OnGetNodeColor) then\r\n OnGetNodeColor(Self, ANode, AColor);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.DoGetNodeStrokeColor(ANode: TTMSFNCTreeViewVirtualNode;\r\n var AColor: TTMSFNCGraphicsColor);\r\nbegin\r\n inherited;\r\n if Assigned(OnGetNodeStrokeColor) then\r\n OnGetNodeStrokeColor(Self, ANode, AColor);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.DoGetNodeDisabledColor(\r\n ANode: TTMSFNCTreeViewVirtualNode; var AColor: TTMSFNCGraphicsColor);\r\nbegin\r\n inherited;\r\n if Assigned(OnGetNodeDisabledColor) then\r\n OnGetNodeDisabledColor(Self, ANode, AColor);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.DoGetNodeDisabledStrokeColor(\r\n ANode: TTMSFNCTreeViewVirtualNode; var AColor: TTMSFNCGraphicsColor);\r\nbegin\r\n inherited;\r\n if Assigned(OnGetNodeDisabledStrokeColor) then\r\n OnGetNodeDisabledStrokeColor(Self, ANode, AColor);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.DoGetNodeDisabledTextColor(\r\n ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer; var ATextColor: TTMSFNCGraphicsColor);\r\nbegin\r\n inherited;\r\n if Assigned(OnGetNodeDisabledTextColor) then\r\n OnGetNodeDisabledTextColor(Self, ANode, AColumn, ATextColor);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.DoGetNodeDisabledTitleColor(\r\n ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer;\r\n var ATitleColor: TTMSFNCGraphicsColor);\r\nbegin\r\n inherited;\r\n if Assigned(OnGetNodeDisabledTitleColor) then\r\n OnGetNodeDisabledTitleColor(Self, ANode, AColumn, ATitleColor);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.DoGetNodeExtraSize(\r\n ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer; var AExtraSize: Single);\r\nbegin\r\n inherited;\r\n if Assigned(OnGetNodeExtraSize) then\r\n OnGetNodeExtraSize(Self, ANode, AColumn, AExtraSize);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.DoGetNodeTitleExtraSize(\r\n ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer; var ATitleExtraSize: Single);\r\nbegin\r\n inherited;\r\n if Assigned(OnGetNodeTitleExtraSize) then\r\n OnGetNodeTitleExtraSize(Self, ANode, AColumn, ATitleExtraSize);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.DoGetNodeHorizontalTextAlign(\r\n ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer;\r\n var AHorizontalTextAlign: TTMSFNCGraphicsTextAlign);\r\nbegin\r\n inherited;\r\n if Assigned(OnGetNodeHorizontalTextAlign) then\r\n OnGetNodeHorizontalTextAlign(Self, ANode, AColumn, AHorizontalTextAlign);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.DoGetNodeIcon(ANode: TTMSFNCTreeViewVirtualNode;\r\n AColumn: Integer; ALarge: Boolean; var AIcon: TTMSFNCBitmap);\r\nbegin\r\n inherited;\r\n if Assigned(OnGetNodeIcon) then\r\n OnGetNodeIcon(Self, ANode, AColumn, ALarge, AIcon);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.DoGetNodeIconSize(ANode: TTMSFNCTreeViewVirtualNode;\r\n AColumn: Integer; ALarge: Boolean; AIcon: TTMSFNCBitmap; var AIconWidth: Double; var AIconHeight: Double);\r\nbegin\r\n inherited;\r\n if Assigned(OnGetNodeIconSize) then\r\n OnGetNodeIconSize(Self, ANode, AColumn, ALarge, AIcon, AIconWidth, AIconHeight);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.DoIsNodeExtended(ANode: TTMSFNCTreeViewVirtualNode;\r\n var AExtended: Boolean);\r\nbegin\r\n inherited;\r\n if Assigned(OnIsNodeExtended) then\r\n OnIsNodeExtended(Self, ANode, AExtended);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.DoGetNodeSelectedColor(\r\n ANode: TTMSFNCTreeViewVirtualNode; var AColor: TTMSFNCGraphicsColor);\r\nbegin\r\n inherited;\r\n if Assigned(OnGetNodeSelectedColor) then\r\n OnGetNodeSelectedColor(Self, ANode, AColor);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.DoGetNodeSelectedStrokeColor(\r\n ANode: TTMSFNCTreeViewVirtualNode; var AColor: TTMSFNCGraphicsColor);\r\nbegin\r\n inherited;\r\n if Assigned(OnGetNodeSelectedStrokeColor) then\r\n OnGetNodeSelectedColor(Self, ANode, AColor);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.DoGetNodeSelectedTextColor(\r\n ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer; var ATextColor: TTMSFNCGraphicsColor);\r\nbegin\r\n inherited;\r\n if Assigned(OnGetNodeSelectedTextColor) then\r\n OnGetNodeSelectedTextColor(Self, ANode, AColumn, ATextColor);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.DoGetNodeSelectedTitleColor(\r\n ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer;\r\n var ATitleColor: TTMSFNCGraphicsColor);\r\nbegin\r\n inherited;\r\n if Assigned(OnGetNodeSelectedTitleColor) then\r\n OnGetNodeSelectedTitleColor(Self, ANode, AColumn, ATitleColor);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.DoGetNodeSides(ANode: TTMSFNCTreeViewVirtualNode; var ASides: TTMSFNCGraphicsSides);\r\nbegin\r\n inherited;\r\n if Assigned(OnGetNodeSides) then\r\n OnGetNodeSides(Self, ANode, ASides);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.DoGetNodeRounding(ANode: TTMSFNCTreeViewVirtualNode; var ARounding: Integer; var ACorners: TTMSFNCGraphicsCorners);\r\nbegin\r\n inherited;\r\n if Assigned(OnGetNodeRounding) then\r\n OnGetNodeRounding(Self, ANode, ARounding, ACorners);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.DoGetNodeData(ANode: TTMSFNCTreeViewVirtualNode);\r\nbegin\r\n inherited;\r\n if Assigned(OnGetNodeData) then\r\n OnGetNodeData(Self, ANode);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.DoGetNodeText(ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer; AMode: TTMSFNCTreeViewNodeTextMode; var AText: String);\r\nbegin\r\n inherited;\r\n if Assigned(Adapter) then\r\n Adapter.GetNodeText(AColumn, ANode, AText);\r\n\r\n if Assigned(OnGetNodeText) then\r\n OnGetNodeText(Self, ANode, AColumn, AMode, AText);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.DoGetNodeTextColor(\r\n ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer; var ATextColor: TTMSFNCGraphicsColor);\r\nbegin\r\n inherited;\r\n if Assigned(OnGetNodeTextColor) then\r\n OnGetNodeTextColor(Self, ANode, AColumn, ATextColor);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.DoGetNodeTrimming(\r\n ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer;\r\n var ATrimming: TTMSFNCGraphicsTextTrimming);\r\nbegin\r\n inherited;\r\n if Assigned(OnGetNodeTrimming) then\r\n OnGetNodeTrimming(Self, ANode, AColumn, ATrimming);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.DoGetNodeTitleExpanded(\r\n ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer; var AExpanded: Boolean);\r\nbegin\r\n inherited;\r\n if Assigned(OnGetNodeTitleExpanded) then\r\n OnGetNodeTitleExpanded(Self, ANode, AColumn, AExpanded);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.DoGetNodeTitle(\r\n ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer;\r\n AMode: TTMSFNCTreeViewNodeTextMode; var ATitle: String);\r\nbegin\r\n inherited;\r\n if Assigned(OnGetNodeTitle) then\r\n OnGetNodeTitle(Self, ANode, AColumn, AMode, ATitle);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.DoGetNodeTitleColor(\r\n ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer;\r\n var ATitleColor: TTMSFNCGraphicsColor);\r\nbegin\r\n inherited;\r\n if Assigned(OnGetNodeTitleColor) then\r\n OnGetNodeTitleColor(Self, ANode, AColumn, ATitleColor);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.DoGetNodeTitleHorizontalTextAlign(\r\n ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer;\r\n var AHorizontalTextAlign: TTMSFNCGraphicsTextAlign);\r\nbegin\r\n inherited;\r\n if Assigned(OnGetNodeTitleHorizontalTextAlign) then\r\n OnGetNodeTitleHorizontalTextAlign(Self, ANode, AColumn, AHorizontalTextAlign);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.DoGetNodeTitleTrimming(\r\n ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer;\r\n var ATrimming: TTMSFNCGraphicsTextTrimming);\r\nbegin\r\n inherited;\r\n if Assigned(OnGetNodeTitleTrimming) then\r\n OnGetNodeTitleTrimming(Self, ANode, AColumn, ATrimming);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.DoGetNodeTitleVerticalTextAlign(\r\n ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer;\r\n var AVerticalTextAlign: TTMSFNCGraphicsTextAlign);\r\nbegin\r\n inherited;\r\n if Assigned(OnGetNodeTitleVerticalTextAlign) then\r\n OnGetNodeTitleVerticalTextAlign(Self, ANode, AColumn, AVerticalTextAlign);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.DoGetNodeTitleWordWrapping(\r\n ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer;\r\n var AWordWrapping: Boolean);\r\nbegin\r\n inherited;\r\n if Assigned(OnGetNodeTitleWordWrapping) then\r\n OnGetNodeTitleWordWrapping(Self, ANode, AColumn, AWordWrapping);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.DoGetNodeVerticalTextAlign(\r\n ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer;\r\n var AVerticalTextAlign: TTMSFNCGraphicsTextAlign);\r\nbegin\r\n if Assigned(OnGetNodeVerticalTextAlign) then\r\n OnGetNodeVerticalTextAlign(Self, ANode, AColumn, AVerticalTextAlign);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.DoGetNodeWordWrapping(\r\n ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer; var AWordWrapping: Boolean);\r\nbegin\r\n inherited;\r\n if Assigned(OnGetNodeWordWrapping) then\r\n OnGetNodeWordWrapping(Self, ANode, AColumn, AWordWrapping);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.DoGetColumnTrimming(\r\n AColumn: Integer; AKind: TTMSFNCTreeViewCacheItemKind;\r\n var ATrimming: TTMSFNCGraphicsTextTrimming);\r\nbegin\r\n inherited;\r\n if Assigned(OnGetColumnTrimming) then\r\n OnGetColumnTrimming(Self, AColumn, AKind, ATrimming);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.DoGetColumnVerticalTextAlign(\r\n AColumn: Integer; AKind: TTMSFNCTreeViewCacheItemKind;\r\n var AVerticalTextAlign: TTMSFNCGraphicsTextAlign);\r\nbegin\r\n if Assigned(OnGetColumnVerticalTextAlign) then\r\n OnGetColumnVerticalTextAlign(Self, AColumn, AKind, AVerticalTextAlign);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.DoGetColumnHorizontalTextAlign(\r\n AColumn: Integer; AKind: TTMSFNCTreeViewCacheItemKind;\r\n var AHorizontalTextAlign: TTMSFNCGraphicsTextAlign);\r\nbegin\r\n if Assigned(OnGetColumnHorizontalTextAlign) then\r\n OnGetColumnHorizontalTextAlign(Self, AColumn, AKind, AHorizontalTextAlign);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.DoGetColumnWordWrapping(\r\n AColumn: Integer; AKind: TTMSFNCTreeViewCacheItemKind; var AWordWrapping: Boolean);\r\nbegin\r\n inherited;\r\n if Assigned(OnGetColumnWordWrapping) then\r\n OnGetColumnWordWrapping(Self, AColumn, AKind, AWordWrapping);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.DoGetNumberOfNodes(ANode: TTMSFNCTreeViewVirtualNode; var ANumberOfNodes: Integer);\r\nbegin\r\n inherited;\r\n if Assigned(Adapter) then\r\n Adapter.GetNumberOfNodes(ANode, ANumberOfNodes);\r\n\r\n if Assigned(OnGetNumberOfNodes) then\r\n begin\r\n UpdateCount := UpdateCount + 1;\r\n NodeListBuild := False;\r\n Nodes.Clear;\r\n UpdateCount := UpdateCount - 1;\r\n OnGetNumberOfNodes(Self, ANode, ANumberOfNodes);\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.DoGetColumnText(AColumn: Integer;\r\n AKind: TTMSFNCTreeViewCacheItemKind; var AText: String);\r\nbegin\r\n if Assigned(OnGetColumnText) then\r\n OnGetColumnText(Self, AColumn, AKind, AText);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.DoHScroll(APosition: Single);\r\nbegin\r\n if Assigned(OnHScroll) then\r\n OnHScroll(Self, APosition);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.DoIsNodeChecked(ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer;\r\n var AChecked: Boolean);\r\nbegin\r\n inherited;\r\n if Assigned(OnIsNodeChecked) then\r\n OnIsNodeChecked(Self, ANode, AColumn, AChecked);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.DoIsNodeEnabled(ANode: TTMSFNCTreeViewVirtualNode;\r\n var AEnabled: Boolean);\r\nbegin\r\n inherited;\r\n if Assigned(OnIsNodeEnabled) then\r\n OnIsNodeEnabled(Self, ANode, AEnabled);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.DoIsNodeExpanded(ANode: TTMSFNCTreeViewVirtualNode; var AExpanded: Boolean);\r\nbegin\r\n inherited;\r\n if Assigned(OnIsNodeExpanded) then\r\n OnIsNodeExpanded(Self, ANode, AExpanded);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.DoIsNodeVisible(ANode: TTMSFNCTreeViewVirtualNode;\r\n var AVisible: Boolean);\r\nbegin\r\n inherited;\r\n if Assigned(OnIsNodeVisible) then\r\n OnIsNodeVisible(ANode, ANode, AVisible);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.DoNeedFilterDropDownData(\r\n AColumn: Integer; AValues: TStrings);\r\nbegin\r\n if Assigned(OnNeedFilterDropDownData) then\r\n OnNeedFilterDropDownData(Self, AColumn, AValues);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.DoNodeAnchorClick(ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer; AAnchor: String);\r\nbegin\r\n if Assigned(OnNodeAnchorClick) then\r\n OnNodeAnchorClick(Self, ANode, AColumn, AAnchor)\r\n else if Interaction.AutoOpenURL then\r\n TTMSFNCUtils.OpenURL(AAnchor);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.DoNodeChanged(\r\n ANode: TTMSFNCTreeViewVirtualNode);\r\nbegin\r\n if Assigned(OnNodeChanged) then\r\n OnNodeChanged(Self, ANode);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.DoVScroll(APosition: Single);\r\nbegin\r\n if Assigned(Adapter) then\r\n Adapter.ScrollTreeView(GetFirstVisibleVirtualNodeRow - FOldTopRow);\r\n if Assigned(OnVScroll) then\r\n OnVScroll(Self, APosition);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.DoAfterSelectNode(ANode: TTMSFNCTreeViewVirtualNode);\r\nbegin\r\n if Assigned(Adapter) then\r\n Adapter.SelectNode(ANode);\r\n\r\n if Assigned(OnAfterSelectNode) then\r\n OnAfterSelectNode(Self, ANode);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.DoAfterSelectAllNodes;\r\nbegin\r\n if Assigned(OnAfterSelectAllNodes) then\r\n OnAfterSelectAllNodes(Self);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.DragTime(Sender: TObject);\r\nvar\r\n contentr: TRectF;\r\nbegin\r\n if FReorderMode or ((FDragMode and FDragModeStarted) and AlternativeDragDrop) then\r\n begin\r\n contentr := GetNodesRect;\r\n\r\n if (FY >= contentr.Bottom) then\r\n begin\r\n FDragRow := FDragRow + 1;\r\n ScrollToVirtualNode(GetNodeForRow(FDragRow));\r\n end\r\n else if FY <= contentr.Top then\r\n begin\r\n FDragRow := FDragRow - 1;\r\n ScrollToVirtualNode(GetNodeForRow(FDragRow));\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCCustomTreeView.AlternativeDragDrop: Boolean;\r\nbegin\r\n Result := False;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.Animate(Sender: TObject);\r\nvar\r\n dx, dy, posx, posy, dvo, posvo: Double;\r\n animh, animv, animvo: Boolean;\r\nbegin\r\n posy := GetVScrollValue;\r\n posx := GetHScrollValue;\r\n posvo := FVerticalOffset;\r\n\r\n animv := False;\r\n animh := False;\r\n animvo := False;\r\n\r\n if Interaction.AnimationFactor > 0 then\r\n begin\r\n dx := Abs(FScrollHTo - posx) / Max(1, Abs(FSpX) * Interaction.AnimationFactor);\r\n dy := Abs(FScrollVTo - posy) / Max(1, Abs(FSpY) * Interaction.AnimationFactor);\r\n dvo := Abs(FVerticalOffsetTo - posvo) / Interaction.AnimationFactor;\r\n\r\n if FAnimateVerticalPos then\r\n animv := AnimateDouble(posy, FScrollVTo, dy, 0.01);\r\n if FAnimateHorizontalPos then\r\n animh := AnimateDouble(posx, FScrollHTo, dx, 0.01);\r\n if FAnimateVerticalOffset then\r\n animvo := AnimateDouble(posvo, FVerticalOffsetTo, dvo, 0.01);\r\n end;\r\n\r\n FAnimating := animv or animh;\r\n if FAnimating then\r\n Scroll(posx, posy)\r\n else if animvo then\r\n begin\r\n FVerticalOffset := posvo;\r\n UpdateDisplay;\r\n end\r\n else\r\n begin\r\n FVerticalOffset := FVerticalOffsetTo;\r\n UpdateDisplay;\r\n FAnimateVerticalPos := False;\r\n FAnimateTimer.Enabled := False;\r\n FAnimateHorizontalPos := False;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.CustomizeInplaceEditor(\r\n AInplaceEditor: TTMSFNCTreeViewInplaceEditor;\r\n ANode: TTMSFNCTreeViewVirtualNode; AColumn: TTMSFNCTreeViewColumn);\r\n{$IFDEF FMXLIB}\r\nvar\r\n ext, sel: Boolean;\r\n f: TTMSFNCGraphicsFont;\r\n c: TAlphaColor;\r\n{$ENDIF}\r\nbegin\r\n if not Assigned(ANode) or not Assigned(AColumn) or not Assigned(AInplaceEditor) then\r\n Exit;\r\n\r\n {$IFDEF FMXLIB}\r\n\r\n sel := IsVirtualNodeSelected(ANode);\r\n\r\n ext := False;\r\n DoIsNodeExtended(ANode, ext);\r\n\r\n if Assigned(AColumn) and not AColumn.UseDefaultAppearance and not ext then\r\n begin\r\n f := AColumn.Font;\r\n if sel then\r\n c := AColumn.SelectedFontColor\r\n else\r\n c := AColumn.Font.Color;\r\n end\r\n else\r\n begin\r\n if ext then\r\n begin\r\n f := NodesAppearance.ExtendedFont;\r\n if sel then\r\n c := NodesAppearance.ExtendedSelectedFontColor\r\n else\r\n c := NodesAppearance.ExtendedFontColor;\r\n end\r\n else\r\n begin\r\n f := NodesAppearance.Font;\r\n if sel then\r\n c := NodesAppearance.SelectedFontColor\r\n else\r\n c := NodesAppearance.Font.Color\r\n end;\r\n end;\r\n\r\n if (AInplaceEditor is TEdit) then\r\n begin\r\n (AInplaceEditor as TEdit).StyledSettings := [];\r\n (AInplaceEditor as TEdit).Font.Assign(f);\r\n (AInplaceEditor as TEdit).FontColor := c;\r\n end\r\n else if (AInplaceEditor is TMemo) then\r\n begin\r\n (AInplaceEditor as TMemo).StyledSettings := [];\r\n (AInplaceEditor as TMemo).Font.Assign(f);\r\n (AInplaceEditor as TMemo).FontColor := c;\r\n end;\r\n {$ENDIF}\r\n\r\n DoCustomizeInplaceEditor(ANode, AColumn.Index, FInplaceEditor);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.CustomizeNodeCache(AGraphics: TTMSFNCGraphics;\r\n AStartY: Single);\r\nbegin\r\n\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.CutToClipboard(ATextOnly: Boolean = False);\r\nvar\r\n I: Integer;\r\n n: TTMSFNCTreeViewNode;\r\n nv: TTMSFNCTreeViewVirtualNode;\r\nbegin\r\n if Assigned(OnCustomCutToClipboard) then\r\n OnCustomCutToClipboard(Self)\r\n else\r\n begin\r\n BeginUpdate;\r\n CopyToClipboard(ATextOnly);\r\n for I := SelectedNodeCount - 1 downto 0 do\r\n begin\r\n n := SelectedNodes[I];\r\n if Assigned(n) then\r\n RemoveNode(n)\r\n else\r\n begin\r\n nv := SelectedVirtualNodes[I];\r\n RemoveVirtualNode(nv);\r\n end;\r\n end;\r\n EndUpdate;\r\n end;\r\nend;\r\n\r\n{$IFDEF FMXLIB}\r\nprocedure TTMSFNCCustomTreeView.ApplyInplaceEditorStyleLookup(Sender: TObject);\r\nvar\r\n obj: TFmxObject;\r\n function FindSRes(AObject: TFmxObject; AResName: String): TFMXObject;\r\n var\r\n I: Integer;\r\n begin\r\n Result := nil;\r\n if Assigned(AObject) then\r\n begin\r\n Result := AObject.FindStyleResource(AResName);\r\n if not Assigned(Result) then\r\n begin\r\n for I := 0 to AObject.ChildrenCount - 1 do\r\n begin\r\n Result := FindSRes(AObject.Children[I], AResName);\r\n if Assigned(Result) then\r\n Break;\r\n end;\r\n end;\r\n end;\r\n end;\r\nbegin\r\n if (Sender = FInplaceEditor) and ((FInplaceEditor is TMemo) or (FInplaceEditor is TEdit)) then\r\n begin\r\n obj := FindSRes(FInplaceEditor, 'background');\r\n if Assigned(obj) and (obj is TCustomStyleObject) then\r\n TCustomStyleObject(obj).Source := nil\r\n end;\r\nend;\r\n{$ENDIF}\r\n\r\nprocedure TTMSFNCCustomTreeView.ApplyStyle;\r\nvar\r\n c: TTMSFNCGraphicsColor;\r\nbegin\r\n inherited;\r\n c := gcNull;\r\n if TTMSFNCStyles.GetStyleBackgroundFillColor(c) then\r\n Fill.Color := c;\r\n\r\n if TTMSFNCStyles.GetStyleLineFillColor(c) then\r\n begin\r\n Stroke.Color := c;\r\n ColumnsAppearance.TopStroke.Color := c;\r\n ColumnsAppearance.BottomStroke.Color := c;\r\n GroupsAppearance.TopStroke.Color := c;\r\n GroupsAppearance.BottomStroke.Color := c;\r\n NodesAppearance.ExtendedFill.Color := c;\r\n NodesAppearance.ExtendedStroke.Color := c;\r\n end;\r\n\r\n c := gcNull;\r\n if TTMSFNCStyles.GetStyleHeaderFillColor(c) then\r\n begin\r\n ColumnsAppearance.TopFill.Color := c;\r\n ColumnsAppearance.TopFill.Kind := gfkSolid;\r\n ColumnsAppearance.BottomFill.Color := c;\r\n ColumnsAppearance.BottomFill.Kind := gfkSolid;\r\n GroupsAppearance.TopFill.Color := c;\r\n GroupsAppearance.TopFill.Kind := gfkSolid;\r\n GroupsAppearance.BottomFill.Color := c;\r\n GroupsAppearance.BottomFill.Kind := gfkSolid;\r\n end;\r\n\r\n c := gcNull;\r\n if TTMSFNCStyles.GetStyleHeaderFillColorTo(c) then\r\n begin\r\n ColumnsAppearance.TopFill.ColorTo := c;\r\n ColumnsAppearance.TopFill.Kind := gfkGradient;\r\n ColumnsAppearance.BottomFill.ColorTo := c;\r\n ColumnsAppearance.BottomFill.Kind := gfkGradient;\r\n GroupsAppearance.TopFill.ColorTo := c;\r\n GroupsAppearance.TopFill.Kind := gfkGradient;\r\n GroupsAppearance.BottomFill.ColorTo := c;\r\n GroupsAppearance.BottomFill.Kind := gfkGradient;\r\n end;\r\n\r\n c := gcNull;\r\n if TTMSFNCStyles.GetStyleSelectionFillColor(c) then\r\n begin\r\n NodesAppearance.SelectedFill.Color := c;\r\n NodesAppearance.SelectedStroke.Color := c;\r\n end;\r\n\r\n c := gcNull;\r\n if TTMSFNCStyles.GetStyleTextFontColor(c) then\r\n begin\r\n NodesAppearance.Font.Color := c;\r\n NodesAppearance.ExtendedFontColor := c;\r\n ColumnsAppearance.TopFont.Color := c;\r\n ColumnsAppearance.BottomFont.Color := c;\r\n GroupsAppearance.TopFont.Color := c;\r\n GroupsAppearance.BottomFont.Color := c;\r\n end;\r\n\r\n c := gcNull;\r\n if TTMSFNCStyles.GetStyleAlternativeTextFontColor(c) then\r\n begin\r\n NodesAppearance.SelectedFontColor := c;\r\n NodesAppearance.SelectedTitleFontColor := c;\r\n end;\r\n\r\n c := gcNull;\r\n if TTMSFNCStyles.GetStyleBackgroundFillColor(c) then\r\n Fill.Color := c;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.Assign(Source: TPersistent);\r\nbegin\r\n BeginUpdate;\r\n inherited;\r\n if Source is TTMSFNCCustomTreeView then\r\n begin\r\n FNodesAppearance.Assign((Source as TTMSFNCCustomTreeView).NodesAppearance);\r\n FColumnsAppearance.Assign((Source as TTMSFNCCustomTreeView).ColumnsAppearance);\r\n FGroupsAppearance.Assign((Source as TTMSFNCCustomTreeView).GroupsAppearance);\r\n FInteraction.Assign((Source as TTMSFNCCustomTreeView).Interaction);\r\n end;\r\n EndUpdate;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.BuildDisplay(ACache: TTMSFNCTreeViewCache; ADisplay: TTMSFNCTreeViewDisplayList);\r\nvar\r\n x, y: Double;\r\n I: Integer;\r\n cache: TTMSFNCTreeViewCacheItem;\r\n r, rrt, rrb, rg, grt, grb: TRectF;\r\n n: TTMSFNCTreeViewVirtualNode;\r\nbegin\r\n if (UpdateCount > 0) or (csDestroying in ComponentState) or not Assigned(ACache) or not Assigned(ADisplay) then\r\n Exit;\r\n\r\n ADisplay.Clear;\r\n\r\n x := -GetHorizontalScrollPosition;\r\n y := -GetVerticalScrollPosition;\r\n if CanApplyVerticalOffset then\r\n y := y + FVerticalOffset;\r\n\r\n r := GetNodesRect;\r\n grt := GetGroupsTopRect;\r\n grb := GetGroupsBottomRect;\r\n rrt := GetColumnsTopRect;\r\n rrb := GetColumnsBottomRect;\r\n for I := 0 to ACache.Count - 1 do\r\n begin\r\n cache := ACache[I];\r\n rg := cache.Rect;\r\n case cache.Kind of\r\n ikNode:\r\n begin\r\n n := cache.Node;\r\n if Assigned(n) then\r\n OffsetNodeRects(n, Int(x), Int(y), rg);\r\n end;\r\n ikGroupTop: OffsetRectEx(rg, int(x) + grt.Left, grt.Top);\r\n ikGroupBottom: OffsetRectEx(rg, int(x) + grb.Left, grb.Top - 1);\r\n ikColumnTop: OffsetRectEx(rg, int(x) + rrt.Left, rrt.Top);\r\n ikColumnBottom: OffsetRectEx(rg, int(x) + rrb.Left, rrb.Top - 1);\r\n end;\r\n\r\n cache.DrawRect := rg;\r\n case cache.Kind of\r\n ikNode:\r\n begin\r\n if RectIntersectsWithEx(rg, r) then\r\n ADisplay.Add(cache);\r\n end;\r\n ikColumnTop:\r\n begin\r\n if RectIntersectsWithEx(rg, rrt) then\r\n ADisplay.Add(cache);\r\n end;\r\n ikColumnBottom:\r\n begin\r\n if RectIntersectsWithEx(rg, rrb) then\r\n ADisplay.Add(cache);\r\n end;\r\n ikGroupTop:\r\n begin\r\n if RectIntersectsWithEx(rg, grt) then\r\n ADisplay.Add(cache);\r\n end;\r\n ikGroupBottom:\r\n begin\r\n if RectIntersectsWithEx(rg, grb) then\r\n ADisplay.Add(cache);\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.BuildNodeList;\r\nbegin\r\n inherited;\r\n PrecalculateNodes;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.AutoSizeColumnInternal(ACol: Integer; AUpdate: Boolean = False; ACallEventHandlers: Boolean = False);\r\nvar\r\n I: Integer;\r\n rcalc: TRectF;\r\n v: TTMSFNCTreeViewVirtualNode;\r\n g: TTMSFNCGraphics;\r\n strc, strt: String;\r\n ww, wwt: Boolean;\r\n maxw: Double;\r\n c: Boolean;\r\n colps: Double;\r\n def: Boolean;\r\n col: TTMSFNCTreeViewColumn;\r\n hs: Double;\r\nbegin\r\n if (csDestroying in ComponentState) then\r\n Exit;\r\n\r\n if (ACol >= 0) and (ACol <= ColumnCount - 1) and not ColumnsAppearance.Stretch and NodeListBuild then\r\n begin\r\n hs := GetHorizontalScrollPosition;\r\n maxw := 0;\r\n colps := ColumnPositions[ACol];\r\n g := TTMSFNCGraphics.CreateBitmapCanvas;\r\n g.BeginScene;\r\n g.BitmapContainer := BitmapContainer;\r\n g.OptimizedHTMLDrawing := OptimizedHTMLDrawing;\r\n try\r\n def := True;\r\n col := nil;\r\n if (ACol >= 0) and (ACol <= Columns.Count - 1) then\r\n begin\r\n col := Columns[ACol];\r\n if not col.UseDefaultAppearance then\r\n def := False;\r\n end;\r\n\r\n if tclTop in ColumnsAppearance.Layouts then\r\n begin\r\n strc := GetColumnText(ACol);\r\n DoGetColumnText(ACol, ikColumnTop, strc);\r\n if def then\r\n g.Font.Assign(ColumnsAppearance.TopFont)\r\n else\r\n g.Font.Assign(col.TopFont);\r\n\r\n rcalc := RectF(0, 0, 10000, 10000);\r\n rcalc := g.CalculateText(strc, rcalc);\r\n rcalc.Right := rcalc.Right + ScalePaintValue(4\r\n );\r\n\r\n if rcalc.Right - rcalc.Left > maxw then\r\n maxw := rcalc.Right - rcalc.Left;\r\n end;\r\n\r\n if tclBottom in ColumnsAppearance.Layouts then\r\n begin\r\n strc := GetColumnText(ACol);\r\n DoGetColumnText(ACol, ikColumnBottom, strc);\r\n if def then\r\n g.Font.Assign(ColumnsAppearance.BottomFont)\r\n else\r\n g.Font.Assign(col.BottomFont);\r\n\r\n rcalc := RectF(0, 0, 10000, 10000);\r\n rcalc := g.CalculateText(strc, rcalc);\r\n rcalc.Right := rcalc.Right + ScalePaintValue(4);\r\n\r\n if rcalc.Right - rcalc.Left > maxw then\r\n maxw := rcalc.Right - rcalc.Left;\r\n end;\r\n\r\n for I := StartRow to StopRow do\r\n begin\r\n v := GetVisibleNodeForIndex(I);\r\n if Assigned(v) then\r\n begin\r\n strc := '';\r\n DoGetNodeText(v, ACol, tntmDrawing, strc);\r\n ww := False;\r\n if (ACol >= 0) and (ACol <= Columns.Count - 1) then\r\n ww := Columns[ACol].WordWrapping;\r\n\r\n DoGetNodeWordWrapping(v, ACol, ww);\r\n\r\n rcalc := RectF(0, 0, 10000, 10000);\r\n rcalc := g.CalculateText(strc, rcalc);\r\n rcalc.Right := rcalc.Right + ScalePaintValue(4\r\n );\r\n\r\n if ACol <= Length(v.BitmapRects) - 1 then\r\n rcalc.Right := rcalc.Right + v.BitmapRects[ACol].Right + hs - colps + ScalePaintValue(3);\r\n\r\n if rcalc.Right - rcalc.Left > maxw then\r\n maxw := rcalc.Right - rcalc.Left;\r\n\r\n strt := '';\r\n DoGetNodeTitle(v, ACol, tntmDrawing, strt);\r\n wwt := False;\r\n if (ACol >= 0) and (ACol <= Columns.Count - 1) then\r\n wwt := Columns[ACol].TitleWordWrapping;\r\n\r\n DoGetNodeTitleWordWrapping(v, ACol, wwt);\r\n\r\n rcalc := RectF(0, 0, 10000, 10000);\r\n rcalc := g.CalculateText(strt, rcalc);\r\n rcalc.Right := rcalc.Right + ScalePaintValue(4);\r\n\r\n if ACol <= Length(v.BitmapRects) - 1 then\r\n rcalc.Right := rcalc.Right + v.BitmapRects[ACol].Right + hs - colps + ScalePaintValue(3);\r\n\r\n if rcalc.Right - rcalc.Left > maxw then\r\n maxw := rcalc.Right - rcalc.Left;\r\n end;\r\n end;\r\n finally\r\n g.EndScene;\r\n g.Free;\r\n end;\r\n\r\n maxw := Int(maxw);\r\n\r\n c := True;\r\n if ACallEventHandlers then\r\n DoBeforeSizeColumn(ACol, ColumnWidths[ACol], maxw, c);\r\n\r\n if c then\r\n begin\r\n ColumnWidths[ACol] := maxw;\r\n if ACallEventHandlers then\r\n DoAfterSizeColumn(ACol, maxw);\r\n\r\n if AUpdate then\r\n begin\r\n UpdateTreeView;\r\n Invalidate;\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.CloseInplaceEditor(ACancel: Boolean; AFlagClose: Boolean = False);\r\nvar\r\n {$IFNDEF LCLWEBLIB}\r\n AContext: TRttiContext;\r\n rt: TRttiType;\r\n propt: TRttiProperty;\r\n {$ENDIF}\r\n str: String;\r\n b, c: Boolean;\r\n n: String;\r\n {$IFDEF FMXLIB}\r\n propi: TRttiProperty;\r\n li: TListBoxItem;\r\n obj: TObject;\r\n {$ENDIF}\r\nbegin\r\n if FClosing then\r\n begin\r\n if AFlagClose then\r\n FInplaceEditorClosed := True;\r\n Exit;\r\n end;\r\n\r\n FClosing := True;\r\n if Assigned(FUpdateNode) and (FUpdateNodeColumn <> -1) and Assigned(FInplaceEditor) then\r\n begin\r\n if not ACancel then\r\n begin\r\n {$IFNDEF LCLWEBLIB}\r\n AContext := TRttiContext.Create;\r\n {$ENDIF}\r\n try\r\n n := '';\r\n {$IFNDEF LCLWEBLIB}\r\n rt := AContext.GetType(FInplaceEditor.ClassInfo);\r\n propt := rt.GetProperty('Text');\r\n if Assigned(Propt) then\r\n str := propt.GetValue(FInplaceEditor).AsString\r\n else\r\n {$ENDIF}\r\n begin\r\n {$IFDEF FMXLIB}\r\n propi := rt.GetProperty('Selected');\r\n if Assigned(propi) then\r\n begin\r\n obj := propi.GetValue(FInplaceEditor).AsObject;\r\n if Assigned(obj) and (obj is TListBoxItem) then\r\n begin\r\n li := obj as TListBoxItem;\r\n if Assigned(li) then\r\n str := li.Text;\r\n end;\r\n end;\r\n {$ENDIF}\r\n end;\r\n\r\n {$IFDEF LCLWEBLIB}\r\n if FInplaceEditor is TEdit then\r\n str := (FInplaceEditor as TEdit).Text\r\n else if FInplaceEditor is TComboBox then\r\n str := (FInplaceEditor as TComboBox).Text\r\n else if FInplaceEditor is TMemo then\r\n str := (FInplaceEditor as TMemo).Text;\r\n {$ENDIF}\r\n\r\n n := str;\r\n finally\r\n {$IFNDEF LCLWEBLIB}\r\n AContext.Free;\r\n {$ENDIF}\r\n end;\r\n end;\r\n\r\n c := True;\r\n DoCloseInplaceEditor(FUpdateNode, FUpdateNodeColumn, FInplaceEditor, ACancel, c);\r\n if c then\r\n begin\r\n b := True;\r\n DoBeforeUpdateNode(FUpdateNode, FUpdateNodeColumn, n, b);\r\n if b and not ACancel then\r\n begin\r\n UpdateCount := UpdateCount + 1;\r\n if Assigned(FUpdateNode.Node) then\r\n FUpdateNode.Node.Text[FUpdateNodeColumn] := n;\r\n DoUpdateNodeText(FUpdateNode, FUpdateNodeColumn, n);\r\n UpdateCount := UpdateCount - 1;\r\n\r\n DoAfterUpdateNode(FUpdateNode, FUpdateNodeColumn);\r\n DoNodeChanged(FUpdateNode);\r\n end;\r\n\r\n FInplaceEditor.Parent := nil;\r\n\r\n {$IFDEF FMXLIB}\r\n FInplaceEditorTimer.Enabled := True;\r\n {$IFNDEF FMXMOBILE}\r\n while FInplaceEditorTimer.Enabled do\r\n Application.ProcessMessages;\r\n {$ENDIF}\r\n {$ENDIF}\r\n {$IFDEF CMNWEBLIB}\r\n if Assigned(FOldInplaceEditor) then\r\n FOldInplaceEditor.Free;\r\n\r\n FOldInplaceEditor := FInplaceEditor;\r\n {$ENDIF}\r\n FInplaceEditor := nil;\r\n FInplaceEditorActive := False;\r\n end;\r\n\r\n ResetNodes(False);\r\n UpdateTreeView;\r\n Invalidate;\r\n if CanFocus then\r\n SetFocus;\r\n end;\r\n FClosing := False;\r\n\r\n if AFlagClose then\r\n FInplaceEditorClosed := True;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.SelectVirtualNodes(ANodes: TTMSFNCTreeViewVirtualNodeArray);\r\nvar\r\n I: Integer;\r\n v: TTMSFNCTreeViewVirtualNode;\r\n en: Boolean;\r\nbegin\r\n FSelectedNodes.Clear;\r\n for I := 0 to Length(ANodes) - 1 do\r\n begin\r\n v := ANodes[I];\r\n if Assigned(v) then\r\n begin\r\n en := IsVirtualNodeSelectable(v);\r\n if en then\r\n FSelectedNodes.Add(v);\r\n end;\r\n end;\r\n Invalidate;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.SelectNodes(ANodes: TTMSFNCTreeViewNodeArray);\r\nvar\r\n I: Integer;\r\n v: TTMSFNCTreeViewNode;\r\n en: Boolean;\r\nbegin\r\n FSelectedNodes.Clear;\r\n for I := 0 to Length(ANodes) - 1 do\r\n begin\r\n v := ANodes[I];\r\n if Assigned(v) then\r\n begin\r\n en := IsVirtualNodeSelectable(TTMSFNCTreeViewNodeOpen(v).VirtualNode);\r\n\r\n if en then\r\n FSelectedNodes.Add(TTMSFNCTreeViewNodeOpen(v).VirtualNode);\r\n end;\r\n end;\r\n\r\n Invalidate;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.SelectVirtualNode(ANode: TTMSFNCTreeViewVirtualNode);\r\nvar\r\n en: Boolean;\r\nbegin\r\n FSelectedNodes.Clear;\r\n if Assigned(ANode) then\r\n begin\r\n en := IsVirtualNodeSelectable(ANode);\r\n if en then\r\n begin\r\n FSelectedNodes.Add(ANode);\r\n FFocusedNode := ANode;\r\n InternalSelectVirtualNode(ANode);\r\n end;\r\n end;\r\n Invalidate;\r\nend;\r\n\r\nfunction TTMSFNCCustomTreeView.IsAnimating: Boolean;\r\nbegin\r\n Result := (FAnimateTimer.Enabled = True) and FAnimating;\r\nend;\r\n\r\nfunction TTMSFNCCustomTreeView.IsDragDropActive: Boolean;\r\nbegin\r\n Result := FDragMode and (Interaction.DragDropMode <> tdmNone);\r\nend;\r\n\r\nfunction TTMSFNCCustomTreeView.IsEditing: Boolean;\r\nbegin\r\n Result := FInplaceEditorActive;\r\nend;\r\n\r\nfunction TTMSFNCCustomTreeView.IsNodeSelectable(\r\n ANode: TTMSFNCTreeViewNode): Boolean;\r\nbegin\r\n Result := True;\r\n if Assigned(ANode) then\r\n Result := IsVirtualNodeSelectable(TTMSFNCTreeViewNodeOpen(ANode).VirtualNode);\r\nend;\r\n\r\nfunction TTMSFNCCustomTreeView.IsNodeSelected(ANode: TTMSFNCTreeViewNode): Boolean;\r\nbegin\r\n Result := False;\r\n if Assigned(ANode) then\r\n Result := IsVirtualNodeSelected(TTMSFNCTreeViewNodeOpen(ANode).VirtualNode);\r\nend;\r\n\r\nfunction TTMSFNCCustomTreeView.IsReorderActive: Boolean;\r\nbegin\r\n Result := FReorderMode and Interaction.Reorder;\r\nend;\r\n\r\nfunction TTMSFNCCustomTreeView.IsVariableNodeHeight: Boolean;\r\nbegin\r\n Result := NodesAppearance.HeightMode = tnhmVariable;\r\nend;\r\n\r\nfunction TTMSFNCCustomTreeView.IsVirtualNodeSelectable(\r\n ANode: TTMSFNCTreeViewVirtualNode): Boolean;\r\nvar\r\n ext: Boolean;\r\nbegin\r\n Result := True;\r\n if Assigned(ANode) then\r\n begin\r\n DoIsNodeEnabled(ANode, Result);\r\n ext := False;\r\n DoIsNodeExtended(ANode, ext);\r\n if (ext and not Interaction.ExtendedSelectable) or not (VisibleNodes.IndexOf(ANode) > -1) then\r\n Result := False;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCCustomTreeView.IsVirtualNodeSelected(ANode: TTMSFNCTreeViewVirtualNode): Boolean;\r\nbegin\r\n Result := FSelectedNodes.IndexOf(ANode) > -1;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.SelectAllNodes;\r\nbegin\r\n SelectAllVirtualNodes;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.SelectAllVirtualNodes;\r\nvar\r\n I: Integer;\r\n n: TTMSFNCTreeViewVirtualNode;\r\n en: Boolean;\r\nbegin\r\n FSelectedNodes.Clear;\r\n for I := 0 to VisibleNodes.Count - 1 do\r\n begin\r\n n := VisibleNodes[I];\r\n if Assigned(n) then\r\n begin\r\n en := IsVirtualNodeSelectable(n);\r\n\r\n if en then\r\n FSelectedNodes.Add(n);\r\n end;\r\n end;\r\n Invalidate;\r\nend;\r\n\r\nfunction TTMSFNCCustomTreeView.SelectedNodeCount: Integer;\r\nbegin\r\n Result := SelectedVirtualNodeCount;\r\nend;\r\n\r\nfunction TTMSFNCCustomTreeView.SelectedVirtualNodeCount: Integer;\r\nbegin\r\n Result := FSelectedNodes.Count;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.SelectNode(ANode: TTMSFNCTreeViewNode);\r\nbegin\r\n if Assigned(ANode) then\r\n SelectVirtualNode(TTMSFNCTreeViewNodeOpen(ANode).VirtualNode)\r\n else\r\n SelectVirtualNode(nil);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.SelectVirtualNodeByRow(ARow: Integer);\r\nbegin\r\n SelectVirtualNode(GetNodeForRow(ARow));\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.RemoveSelectedVirtualNodes;\r\nvar\r\n I: Integer;\r\n n: TTMSFNCTreeViewVirtualNode;\r\nbegin\r\n BlockUpdate := True;\r\n for I := SelectedVirtualNodeCount - 1 downto 0 do\r\n begin\r\n n := SelectedVirtualNodes[I];\r\n FSelectedNodes.Remove(n);\r\n RemoveVirtualNode(n);\r\n end;\r\n BlockUpdate := False;\r\n\r\n ResetNodes(False);\r\n UpdateTreeView;\r\n Invalidate;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.RemoveSelectedNodes;\r\nvar\r\n I: Integer;\r\n n: TTMSFNCTreeViewNode;\r\nbegin\r\n BlockUpdate := True;\r\n for I := SelectedNodeCount - 1 downto 0 do\r\n begin\r\n n := SelectedNodes[I];\r\n FSelectedNodes.Remove(TTMSFNCTreeViewNodeOpen(n).VirtualNode);\r\n RemoveNode(n);\r\n end;\r\n BlockUpdate := False;\r\n\r\n ResetNodes(False);\r\n UpdateTreeView;\r\n Invalidate;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.UpdateInplaceEditorPosition;\r\nvar\r\n r: TRectF;\r\n {$IFDEF CMNWEBLIB}\r\n rt: TRect;\r\n {$ENDIF}\r\nbegin\r\n if (UpdateCount > 0) or (csDestroying in ComponentState) then\r\n Exit;\r\n\r\n if Assigned(FUpdateNode) and (FUpdateNodeColumn <> -1) and Assigned(FInplaceEditor) and FInplaceEditorActive then\r\n begin\r\n if (FUpdateNode.Row >= StartRow) and (FUpdateNode.Row <= StopRow) then\r\n begin\r\n r := GetInplaceEditorRect(FUpdateNode, FUpdateNodeColumn);\r\n FInplaceEditor.Parent := Self;\r\n FInplaceEditor.Visible := False;\r\n if Assigned(FInplaceEditor) then\r\n begin\r\n {$IFDEF FMXLIB}\r\n FInplaceEditor.BoundsRect := r;\r\n FInplaceEditor.BoundsRect := RectF(r.Left, r.Top + (r.Bottom - r.Top - FInplaceEditor.Height) / 2, r.Right, r.Top + (r.Bottom - r.Top - FInplaceEditor.Height) / 2 + FInplaceEditor.Height);\r\n {$ENDIF}\r\n {$IFDEF CMNWEBLIB}\r\n rt := Rect(Round(r.Left), Round(r.Top), Round(r.Right), Round(r.Bottom));\r\n FInplaceEditor.BoundsRect := rt;\r\n FInplaceEditor.BoundsRect := Rect(rt.Left, rt.Top + (rt.Bottom - rt.Top - FInplaceEditor.Height) div 2, rt.Right, rt.Top + (rt.Bottom - rt.Top - FInplaceEditor.Height) div 2 + FInplaceEditor.Height);\r\n {$ENDIF}\r\n FInplaceEditor.Visible := True;\r\n end;\r\n end\r\n else\r\n FInplaceEditor.Parent := nil;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.HandleMouseDown(Button: TTMSFNCMouseButton; Shift: TShiftState;\r\n X, Y: Single);\r\nvar\r\n dc: TTMSFNCTreeViewCacheItem;\r\nbegin\r\n inherited;\r\n if (Button = {$IFNDEF WEBLIB}TTMSFNCMouseButton.{$ENDIF}mbRight) or BlockUserInput or BlockMouseClick then\r\n Exit;\r\n\r\n if not FDblClicked then\r\n CaptureEx;\r\n\r\n FDragMode := False;\r\n FDragModeStarted := False;\r\n FReorderMode := False;\r\n FDragNode := nil;\r\n\r\n if not FDblClicked then\r\n begin\r\n if CanFocus then\r\n SetFocus;\r\n\r\n if FInplaceEditorActive then\r\n CloseInplaceEditor(False);\r\n end;\r\n\r\n dc := XYToCacheItem(X, Y);\r\n FDownNode := nil;\r\n if Assigned(dc) then\r\n begin\r\n FDownNode := dc.Node;\r\n if FSelectedNodes.IndexOf(FDownNode) > -1 then\r\n begin\r\n FDragNode := FDownNode;\r\n FDragMode := Assigned(FDownNode) and (Interaction.DragDropMode <> tdmNone) and not FDblClicked and not XYToNodeExpand(FDownNode, X, Y)\r\n and not XYToNodeExtra(FDownNode, X, Y) and not XYToNodeTitleExtra(FDownNode, X, Y) and not Assigned(XYToNodeCheck(FDownNode, X, Y).ANode);\r\n FReorderMode := Assigned(FDownNode) and Interaction.Reorder and not FDragMode and not FDblClicked and not XYToNodeExpand(FDownNode, X, Y)\r\n and not XYToNodeExtra(FDownNode, X, Y) and not XYToNodeTitleExtra(FDownNode, X, Y) and not Assigned(XYToNodeCheck(FDownNode, X, Y).ANode);\r\n\r\n FDragMode := FDragMode and not ((ssCtrl in Shift) or (ssShift in Shift));\r\n FReorderMode := FReorderMode and not ((ssCtrl in Shift) or (ssShift in Shift));\r\n\r\n if FReorderMode then\r\n begin\r\n CreateDragBitmap;\r\n FSaveDragY := FDragBitmap.Top;\r\n end;\r\n end;\r\n end;\r\n\r\n if FDragMode then\r\n begin\r\n if CanStartDragFromMouseDown then\r\n begin\r\n FDragModeStarted := True;\r\n HandleDragStart(X, Y);\r\n BeginDrag;\r\n end;\r\n IsMouseDown := not FDblClicked;\r\n end\r\n else\r\n begin\r\n if Assigned(FDownNode) then\r\n begin\r\n FDoNodeExpand := XYToNodeExpand(FDownNode, X, Y);\r\n FDoNodeCheck := XYToNodeCheck(FDownNode, X, Y);\r\n FDoNodeAnchor := XYToNodeAnchor(FDownNode, X, Y);\r\n FDoNodeTitleAnchor := XYToNodeTitleAnchor(FDownNode, X, Y);\r\n FDoNodeExtra := XYToNodeExtra(FDownNode, X, Y);\r\n FDoNodeTitleExtra := XYToNodeTitleExtra(FDownNode, X, Y);\r\n end;\r\n\r\n FSizeColumn := -1;\r\n if Interaction.ColumnSizing then\r\n begin\r\n FSizeColumn := XYToColumnSize(X, Y);\r\n if (FSizeColumn >= 0) and (FSizeColumn <= ColumnCount - 1) then\r\n FColumnSize := ColumnWidths[FSizeColumn];\r\n end;\r\n\r\n FDownColumn := XYToColumn(X, Y);\r\n FDownColumnValue := XYToColumn(X, Y, True);\r\n FDownColumnFilter := XYToColumnFilter(X, Y);\r\n FDownColumnExpand := XYToColumnExpand(X, Y);\r\n\r\n IsMouseDown := not FDblClicked;\r\n FTimeStart := GetTickCountX;\r\n FTimeStop := FTimeStart;\r\n FScrollVTo := GetVScrollValue;\r\n FScrollHTo := GetHScrollValue;\r\n FScrollX := X;\r\n FScrollY := Y;\r\n FDownX := X;\r\n FDownY := Y;\r\n FMouseX := X;\r\n FMouseY := Y;\r\n FSizeX := X;\r\n FDragY := Y;\r\n FVerticalOffset := 0;\r\n FVerticalOffsetTo := 0;\r\n FMouseUp := False;\r\n FDoubleSelection := not FAnimateTimer.Enabled;\r\n FScrolling := False;\r\n end;\r\n FDblClicked := False;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.HandleMouseMove(Shift: TShiftState; X, Y: Single);\r\nvar\r\n f: Double;\r\n it: TTMSFNCTreeViewVirtualNode;\r\n doscroll: Boolean;\r\n dsp: TTMSFNCTreeViewCacheItem;\r\n sc: Integer;\r\n c: Boolean;\r\n colsz, newcolsz, newposy: Double;\r\n r: TRectF;\r\n n: TTMSFNCTreeViewVirtualNode;\r\n su, sd: Boolean;\r\n a: string;\r\n crs: smallint;\r\n cl: Integer;\r\nbegin\r\n inherited;\r\n\r\n if BlockUserInput or (FAnimating and not IsMouseDown) then\r\n Exit;\r\n\r\n FY := Y;\r\n FX := X;\r\n\r\n if IsMouseDown and FDragMode and CanStartDragFromMouseMove and ((Abs(FY - FDownY) > DRAGMARGIN) or (Abs(FX - FDownX) > DRAGMARGIN)) then\r\n begin\r\n if not FDragModeStarted then\r\n HandleDragStart(X, Y);\r\n\r\n FDragModeStarted := True;\r\n if AlternativeDragDrop then\r\n HandleAlternativeDragOver(X, Y)\r\n else\r\n BeginDrag;\r\n Exit;\r\n end;\r\n\r\n if FReorderMode and Assigned(FDragBitmap) and Interaction.Reorder then\r\n begin\r\n r := GetContentClipRect;\r\n newposy := FSaveDragY + (FY - FDragY);\r\n if (newposy <= r.Top + (r.Bottom - r.Top) - FDragBitmap.Height) and (newposy >= r.Top) then\r\n begin\r\n FDragBitmap.Top := Round(Max(r.Top, Min(r.Top + (r.Bottom - r.Top) - FDragBitmap.Height, newposy)));\r\n FSaveDragY := FDragBitmap.Top;\r\n FDragTimer.Enabled := False;\r\n if (newposy > r.Top) and (newposy < r.Top + (r.Right - r.Left)) then\r\n begin\r\n n := XYToNode((r.Right - r.Left) / 2, newposy);\r\n if Assigned(n) then\r\n FDragRow := n.Row;\r\n end;\r\n end\r\n else if (newposy > r.Top + (r.Bottom - r.Top) - FDragBitmap.Height) then\r\n begin\r\n FDragBitmap.Top := Round(r.Top + (r.Bottom - r.Top) - FDragBitmap.Height);\r\n FSaveDragY := newposy;\r\n FDragTimer.Enabled := True;\r\n end\r\n else if (newposy < r.Top) then\r\n begin\r\n FDragBitmap.Top := Round(r.Top);\r\n FSaveDragY := newposy;\r\n FDragTimer.Enabled := True;\r\n end;\r\n\r\n FDragY := FY;\r\n Exit;\r\n end;\r\n\r\n if (FSizeColumn >= 0) and (FSizeColumn <= ColumnCount - 1) then\r\n begin\r\n c := True;\r\n colsz := FColumnSize;\r\n FColumnSize := colsz + (X - FSizeX);\r\n newcolsz := Max(0, FColumnSize);\r\n FSizeX := X;\r\n DoBeforeSizeColumn(FSizeColumn, colsz, newcolsz, c);\r\n if c then\r\n begin\r\n ColumnWidths[FSizeColumn] := newcolsz;\r\n if (FSizeColumn >= 0) and (FSizeColumn <= Columns.Count - 1) then\r\n Columns[FSizeColumn].UpdateWidth(newcolsz);\r\n\r\n DoAfterSizeColumn(FSizeColumn, newcolsz);\r\n ResetNodes(True);\r\n UpdateTreeView;\r\n Invalidate;\r\n end;\r\n Exit;\r\n end;\r\n\r\n if IsMouseDown and not (FDoNodeAnchor.AAnchor <> '') and not (FDoNodeTitleAnchor.AAnchor <> '') then\r\n begin\r\n doscroll := not FDoNodeExpand and not Assigned(FDoNodeCheck.ANode);\r\n if doscroll then\r\n begin\r\n f := 1;\r\n case ScrollMode of\r\n smNodeScrolling: f := 0.1;\r\n end;\r\n\r\n c := True;\r\n if ScrollLimitation and (Abs(Y - FMouseY) < 15) then\r\n c := Abs(X - FMouseX) < 5;\r\n\r\n c := c and not (XYToColumn(X, Y) <> -1);\r\n\r\n if (FScrolling or (Abs(FMouseX - X) > 3) or (Abs(FMouseY - Y) > 3)) and Interaction.TouchScrolling and c then\r\n begin\r\n FDragTimer.Enabled := False;\r\n if (Abs(X - FDownX) > SCROLLINGDELAY) or (Abs(Y - FDownY) > SCROLLINGDELAY) then\r\n begin\r\n FScrolling := True;\r\n FDoubleSelection := False;\r\n if IsMouseDown and not FMouseUp then\r\n begin\r\n su := CanScrollUp;\r\n sd := CanScrollDown;\r\n if (su and (Y - FDownY > 0)) or (sd and (Y - FDownY < 0)) and (FVerticalOffset = 0) then\r\n begin\r\n FVerticalOffset := 0;\r\n Scroll(GetHScrollValue - (X - FDownX) * f, GetVScrollValue - (Y - FDownY) * f)\r\n end\r\n else if CanApplyVerticalOffset then\r\n begin\r\n FVerticalOffset := Min(75, Max(-75, FVerticalOffset + (Y - FDownY)));\r\n UpdateDisplay;\r\n end\r\n else\r\n Scroll(GetHScrollValue - (X - FDownX) * f, GetVScrollValue);\r\n\r\n FDownY := Y;\r\n FDownX := X;\r\n end;\r\n end;\r\n end\r\n end\r\n end\r\n else\r\n begin\r\n it := nil;\r\n dsp := XYToCacheItem(X, Y);\r\n if Assigned(dsp) then\r\n it := dsp.Node;\r\n\r\n crs := crDefault;\r\n\r\n if Assigned(it) and Assigned(dsp) then\r\n begin\r\n if Interaction.URLDetectionOnMouseMove and ((XYToNodeAnchor(it, X, Y).AAnchor <> '') or (XYToNodeTitleAnchor(it, X, Y).AAnchor <> '')) then\r\n crs := crHandPoint;\r\n end\r\n else\r\n begin\r\n if Interaction.ColumnSizing then\r\n begin\r\n sc := XYToColumnSize(X, Y);\r\n if (sc >= 0) and (sc <= ColumnCount - 1) then\r\n crs := crSizeWE;\r\n end;\r\n end;\r\n\r\n cl := -1;\r\n a := XYToColumnAnchor(X, Y, cl);\r\n if a <> '' then\r\n crs := crHandPoint;\r\n\r\n if crs <> Cursor then\r\n Cursor := crs;\r\n\r\n if (FPrevDSP <> dsp) then\r\n begin\r\n if Assigned(FPrevDSP) and Assigned(FPrevDSP.Node) then\r\n DoNodeMouseLeave(FPrevDSP.Node);\r\n if Assigned(dsp) and Assigned(dsp.Node) then\r\n DoNodeMouseEnter(dsp.Node);\r\n end;\r\n\r\n FPrevDSP := dsp;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.HandleMouseUp(Button: TTMSFNCMouseButton; Shift: TShiftState;\r\n X, Y: Single);\r\nvar\r\n f: Double;\r\n a: TTMSFNCTreeViewNodeAnchor;\r\n cl: Integer;\r\n ha: string;\r\n en, d, dosel, ext: Boolean;\r\n I: Integer;\r\n t: Integer;\r\n dn, prev: TTMSFNCTreeViewVirtualNode;\r\n b: Boolean;\r\n sz: Integer;\r\n cs: Boolean;\r\n add: Integer;\r\nbegin\r\n inherited;\r\n\r\n if (Button = {$IFNDEF WEBLIB}TTMSFNCMouseButton.{$ENDIF}mbRight) or BlockUserInput then\r\n Exit;\r\n\r\n {$IFDEF LCLLIB}\r\n if FDblClicked then\r\n FDblClicked := False;\r\n {$ENDIF}\r\n\r\n ReleaseCaptureEx;\r\n\r\n if FDragMode and FDragModeStarted and AlternativeDragDrop then\r\n begin\r\n HandleAlternativeDragDrop(X, Y);\r\n DestroyDragBitmap;\r\n Cursor := crDefault;\r\n end;\r\n\r\n sz := FSizeColumn;\r\n FSizeColumn := -1;\r\n FDragTimer.Enabled := False;\r\n\r\n if not IsMouseDown then\r\n Exit;\r\n\r\n if FReorderMode and Interaction.Reorder then\r\n begin\r\n dn := XYToNode(X, Y);\r\n if Assigned(OnCustomReorder) then\r\n OnCustomReorder(Self, FDragNode, dn)\r\n else\r\n begin\r\n if Assigned(dn) and (dn <> FDragNode) and Assigned(dn.Node) and Assigned(FDragNode.Node) then\r\n begin\r\n b := True;\r\n DoBeforeReorderNode(FDragNode, dn, b);\r\n if b then\r\n begin\r\n if FDragNode.Level = dn.Level then\r\n begin\r\n if dn.Node.GetParent = nil then\r\n FDragNode.Node.Index := dn.Node.Index\r\n else\r\n FDragNode.Node.MoveTo(dn.Node.GetParent, dn.Node.Index);\r\n end;\r\n DoAfterReorderNode(FDragNode, dn);\r\n end;\r\n end;\r\n end;\r\n\r\n DestroyDragBitmap;\r\n FDragNode := nil;\r\n end;\r\n\r\n f := 1;\r\n case ScrollMode of\r\n smNodeScrolling: f := 0.1;\r\n end;\r\n\r\n IsMouseDown := False;\r\n FMouseUp := True;\r\n FScrolling := False;\r\n\r\n if FDownColumnFilter <> -1 then\r\n HandleFilter(FDownColumnFilter)\r\n else if FDownColumnExpand <> -1 then\r\n HandleExpand(FDownColumnExpand)\r\n else if (FDownColumn <> -1) and (sz = -1) then\r\n begin\r\n if (FDownColumn >= 0) and (FDownColumn <= ColumnCount - 1) then\r\n begin\r\n if (Columns[FDownColumn].Sorting <> tcsNone) then\r\n begin\r\n case TTMSFNCTreeViewColumnOpen(Columns[FDownColumn]).SortKind of\r\n nskNone, nskAscending:\r\n begin\r\n InitializeColumnSorting(FDownColumn, nsmDescending);\r\n if Assigned(OnCustomColumnSort) then\r\n OnCustomColumnSort(Self, FDownColumn, nsmDescending)\r\n else\r\n begin\r\n cs := True;\r\n DoBeforeSortNodes(FDownColumn, nsmDescending, cs);\r\n if cs then\r\n begin\r\n Nodes.Sort(FDownColumn, Columns[FDownColumn].Sorting in [tcsRecursive, tcsRecursiveCaseSensitive], Columns[FDownColumn].Sorting in [tcsNormalCaseSensitive, tcsRecursiveCaseSensitive], nsmDescending);\r\n DoAfterSortNodes(FDownColumn, nsmDescending);\r\n end;\r\n end;\r\n end;\r\n nskDescending:\r\n begin\r\n InitializeColumnSorting(FDownColumn, nsmAscending);\r\n if Assigned(OnCustomColumnSort) then\r\n OnCustomColumnSort(Self, FDownColumn, nsmAscending)\r\n else\r\n begin\r\n cs := True;\r\n DoBeforeSortNodes(FDownColumn, nsmAscending, cs);\r\n if cs then\r\n begin\r\n Nodes.Sort(FDownColumn, Columns[FDownColumn].Sorting in [tcsRecursive, tcsRecursiveCaseSensitive], Columns[FDownColumn].Sorting in [tcsNormalCaseSensitive, tcsRecursiveCaseSensitive], nsmAscending);\r\n DoAfterSortNodes(FDownColumn, nsmAscending);\r\n end;\r\n end;\r\n end;\r\n end;\r\n end;\r\n\r\n cl := -1;\r\n ha := XYToColumnAnchor(X, Y, cl);\r\n if ha <> '' then\r\n DoColumnAnchorClick(FDownColumn, ha);\r\n end;\r\n end\r\n else if not FReorderMode and not FDragModeStarted then\r\n begin\r\n if not FDoNodeExpand and not FDoNodeExtra and not FDoNodeTitleExtra and not Assigned(FDoNodeCheck.ANode) and not (FDoNodeAnchor.AAnchor <> '') and not (FDoNodeTitleAnchor.AAnchor <> '') then\r\n begin\r\n if not FDoubleSelection and Interaction.TouchScrolling then\r\n begin\r\n FTimeStop := GetTickCountX;\r\n if (FVerticalOffset = 0) and ((FTimeStop - FTimeStart) < SWIPECOUNT) and ((FTimeStop - FTimeStart) > 0) then\r\n begin\r\n FSpY := Abs(Y - FScrollY) / (FTimeStop - FTimeStart);\r\n if (FSpY > 0) then\r\n begin\r\n if (Y - FScrollY) > 0 then\r\n FScrollVTo := Max(0, Min(VerticalScrollBar.Max - GetVViewportSize, FScrollVTo - Round(Abs(Y - FScrollY) * FSpY * f * 3)))\r\n else\r\n FScrollVTo := Max(0, Min(VerticalScrollBar.Max - GetVViewportSize, FScrollVTo + Round(Abs(Y - FScrollY) * FSpY * f * 3)));\r\n\r\n FAnimateVerticalPos := True;\r\n FAnimateTimer.Enabled := True;\r\n end;\r\n\r\n FSpX := Abs(X - FScrollX) / (FTimeStop - FTimeStart);\r\n if (FSpX > 0) then\r\n begin\r\n if (X - FScrollX) > 0 then\r\n FScrollHTo := Max(0, Min(HorizontalScrollBar.Max - GetHViewportSize, FScrollHTo - Round(Abs(X - FScrollX) * FSpX * f * 3)))\r\n else\r\n FScrollHTo := Max(0, Min(HorizontalScrollBar.Max - GetHViewportSize, FScrollHTo + Round(Abs(X - FScrollX) * FSpX * f * 3)));\r\n\r\n FAnimateHorizontalPos := True;\r\n FAnimateTimer.Enabled := True;\r\n end;\r\n end\r\n else if CanApplyVerticalOffset then\r\n begin\r\n if NeedsReload(FVerticalOffset) then\r\n StartReload;\r\n\r\n StartVerticalOffsetAnimation;\r\n end;\r\n end\r\n else\r\n begin\r\n if Assigned(FDownNode) and not BlockMouseClick then\r\n begin\r\n en := IsVirtualNodeSelectable(FDownNode);\r\n prev := FFocusedNode;\r\n dosel := en;\r\n\r\n if en then\r\n begin\r\n if (ssShift in Shift) and (msShiftSelect in Interaction.MultiSelectStyle) then\r\n begin\r\n if Assigned(FFocusedNode) then\r\n begin\r\n if (msSiblingOnly in Interaction.MultiSelectStyle) and (FFocusedNode.ParentNode <> FDownNode.ParentNode) then\r\n add := 0\r\n else\r\n add := 1;\r\n if FFocusedNode.Row <= FDownNode.Row then\r\n begin\r\n for I := FFocusedNode.Row + add to FDownNode.Row do\r\n HandleSelectNode(GetNodeFromNodeStructure(I), True, False, {$IFNDEF FMXMOBILE}(ssShift in Shift) and {$ENDIF} Interaction.MultiSelect, FDownColumnValue);\r\n end\r\n else\r\n begin\r\n for I := FFocusedNode.Row - add downto FDownNode.Row do\r\n HandleSelectNode(GetNodeFromNodeStructure(I), True, False, {$IFNDEF FMXMOBILE}(ssShift in Shift) and {$ENDIF} Interaction.MultiSelect, FDownColumnValue);\r\n end;\r\n end;\r\n end\r\n else\r\n begin\r\n {$IFDEF FMXMOBILE}\r\n if Interaction.MultiSelect then\r\n begin\r\n if IsVirtualNodeSelected(FDownNode) and Interaction.MultiSelect then\r\n UnSelectVirtualNode(FDownNode)\r\n else\r\n HandleSelectNode(FDownNode, True, False, Interaction.MultiSelect)\r\n end\r\n else\r\n begin\r\n {$ENDIF}\r\n if (msSiblingOnly in Interaction.MultiSelectStyle) and Assigned(FFocusedNode) and (FDownNode.ParentNode <> FFocusedNode.ParentNode) and (FSelectedNodes.Count > 0) then\r\n begin\r\n FSelectedNodes.Clear;\r\n end\r\n else if ((not (ssCtrl in Shift) and not (ssCommand in Shift)) or not(msControlSelect in Interaction.MultiSelectStyle)) and (FSelectedNodes.Count > 0) then\r\n UnSelectVirtualNode(FDownNode);\r\n\r\n HandleSelectNode(FDownNode, True, False, (((ssCtrl in Shift) or (ssCommand in Shift)) and (msControlSelect in Interaction.MultiSelectStyle)) and Interaction.MultiSelect, FDownColumnValue);\r\n {$IFDEF FMXMOBILE}\r\n end;\r\n {$ENDIF}\r\n end;\r\n end;\r\n\r\n if dosel then\r\n begin\r\n if FFocusedNode <> FDownNode then\r\n begin\r\n FFocusedNode := FDownNode;\r\n DoFocusedNodeChanged(FFocusedNode);\r\n end;\r\n end;\r\n\r\n if not FCompactMode and ((Interaction.MouseEditMode = tmemSingleClick) or ((Interaction.MouseEditMode = tmemSingleClickOnSelectedNode) and (FDownNode = prev))) and not Interaction.ReadOnly then\r\n begin\r\n if Assigned(FDownNode) then\r\n begin\r\n ext := False;\r\n DoIsNodeExtended(FDownNode, ext);\r\n d := True;\r\n DoIsNodeEnabled(FDownNode, d);\r\n\r\n a := XYToNodeTitleAnchor(FDownNode, X, Y);\r\n if a.AAnchor <> '' then\r\n DoNodeTitleAnchorClick(FDownNode, a.AColumn, a.AAnchor);\r\n\r\n a := XYToNodeAnchor(FDownNode, X, Y);\r\n if d and (a.AAnchor <> '') then\r\n begin\r\n DoNodeAnchorClick(FDownNode, a.AColumn, a.AAnchor);\r\n end\r\n else if ((ext and Interaction.ExtendedSelectable and Interaction.ExtendedEditable) or not ext) and d then\r\n begin\r\n t := XYToNodeTextColumn(FDownNode, X, Y);\r\n if (t <> -1) and FDownNode.TitleExpanded[t] then\r\n begin\r\n HandleNodeEditing(FDownNode, t);\r\n end;\r\n end;\r\n end;\r\n\r\n end;\r\n\r\n Invalidate;\r\n end\r\n end\r\n end\r\n else if not FCompactMode then \r\n begin\r\n if FDoNodeExpand then\r\n HandleNodeToggle(FDownNode)\r\n else if FDoNodeExtra then\r\n HandleNodeExtra(FDownNode)\r\n else if FDoNodeTitleExtra then\r\n HandleNodeTitleExtra(FDownNode)\r\n else if Assigned(FDoNodeCheck.ANode) and not Interaction.ReadOnly then\r\n HandleNodeToggleCheck(FDownNode, FDoNodeCheck.AColumn)\r\n else\r\n begin\r\n a := XYToNodeAnchor(FDownNode, X, Y);\r\n if a.AAnchor <> '' then\r\n DoNodeAnchorClick(FDownNode, a.AColumn, a.AAnchor);\r\n\r\n a := XYToNodeTitleAnchor(FDownNode, X, Y);\r\n if a.AAnchor <> '' then\r\n DoNodeTitleAnchorClick(FDownNode, a.AColumn, a.AAnchor);\r\n end;\r\n end;\r\n end;\r\n\r\n FDoNodeExpand := False;\r\n FDoNodeExtra := False;\r\n FDoNodeTitleExtra := False;\r\n FDoNodeAnchor.AAnchor := '';\r\n FDoNodeAnchor.AColumn := -1;\r\n FDoNodeTitleAnchor.AAnchor := '';\r\n FDoNodeTitleAnchor.AColumn := -1;\r\n FDownColumn := -1;\r\n FDownColumnValue := -1;\r\n FDownColumnFilter := -1;\r\n FDownColumnExpand := -1;\r\n FReorderMode := False;\r\n FDragMode := False;\r\n FDragModeStarted := False;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.HandleMouseWheel(Shift: TShiftState; WheelDelta: Integer;\r\n var Handled: Boolean);\r\nvar\r\n vpos, hpos: Double;\r\n sz: Single;\r\n R: Integer;\r\n nd: TTMSFNCTreeViewVirtualNode;\r\nbegin\r\n inherited;\r\n if Handled then\r\n Exit;\r\n\r\n if BlockUserInput then\r\n Exit;\r\n\r\n vpos := GetVScrollValue;\r\n hpos := GetHScrollValue;\r\n\r\n if WheelDelta > 0 then\r\n R := StartRow - 1\r\n else\r\n R := StartRow;\r\n\r\n nd := GetVisibleNodeForIndex(R);\r\n\r\n if Assigned(nd) then\r\n begin\r\n if WheelDelta > 0 then\r\n begin\r\n sz := nd.Height * Interaction.MouseWheelDelta;\r\n Scroll(hpos, vpos - sz)\r\n end\r\n else\r\n begin\r\n sz := nd.Height * Interaction.MouseWheelDelta;\r\n Scroll(hpos, vpos + sz);\r\n end;\r\n end\r\n else\r\n Scroll(hpos, 0);\r\n\r\n Handled := True;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.UpdateGroupCache(ACache: TTMSFNCTreeViewCache);\r\nvar\r\n h: Double;\r\n I: Integer;\r\n grp: TTMSFNCTreeViewDisplayGroup;\r\n x, y, bw, bh: Double;\r\n rt, rc: TRectF;\r\n cache: TTMSFNCTreeViewCacheItem;\r\nbegin\r\n inherited;\r\n if (UpdateCount > 0) or (csDestroying in ComponentState) or (ColumnCount = 0) or (DisplayGroups.Count = 0) or not Assigned(ACache) then\r\n Exit;\r\n\r\n ACache.Clear;\r\n\r\n if (ACache is TTMSFNCTreeViewGroupsTopCache) and (not (tglTop in GroupsAppearance.Layouts) or (GroupsAppearance.TopSize <= 0)) then\r\n Exit;\r\n\r\n if (ACache is TTMSFNCTreeViewGroupsBottomCache) and (not (tglBottom in GroupsAppearance.Layouts) or (GroupsAppearance.BottomSize <= 0)) then\r\n Exit;\r\n\r\n if ACache is TTMSFNCTreeViewGroupsTopCache then\r\n h := GetGroupsTopSize + 1\r\n else\r\n h := GetGroupsBottomSize + 1;\r\n\r\n for I := 0 to DisplayGroups.Count - 1 do\r\n begin\r\n grp := DisplayGroups[I];\r\n {$IFDEF FMXWEBLIB}\r\n y := 0;\r\n x := Int(ColumnPositions[grp.StartColumn]);\r\n bh := h;\r\n bw := Int(ColumnPositions[grp.EndColumn + 1] - x);\r\n {$ENDIF}\r\n {$IFDEF CMNLIB}\r\n y := 0;\r\n x := ColumnPositions[grp.StartColumn];\r\n bh := h;\r\n bw := ColumnPositions[grp.EndColumn + 1] - x;\r\n {$ENDIF}\r\n\r\n if (bw <= 0) or (bh <= 0) then\r\n Continue;\r\n\r\n rt := RectF(0, 0, bw, bh);\r\n\r\n {$IFDEF FMXWEBLIB}\r\n rc.Top := int(rt.Top) + 0.5;\r\n rc.Bottom := int(rt.Bottom) - 0.5;\r\n rc.Left := int(rt.Left) + 0.5;\r\n rc.Right := int(rt.Right) + 0.5;\r\n {$ENDIF}\r\n {$IFDEF CMNLIB}\r\n rc.Top := rt.Top;\r\n rc.Bottom := rt.Bottom;\r\n rc.Left := rt.Left;\r\n rc.Right := rt.Right + 1;\r\n {$ENDIF}\r\n\r\n OffsetRectEx(rc, x, y);\r\n if ACache is TTMSFNCTreeViewGroupsTopCache then\r\n cache := TTMSFNCTreeViewCacheItem.CreateGroupTop(rc, I, grp.StartColumn, grp.EndColumn)\r\n else\r\n cache := TTMSFNCTreeViewCacheItem.CreateGroupBottom(rc, I, grp.StartColumn, grp.EndColumn);\r\n\r\n ACache.Add(cache);\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.UpdateGroupsCache;\r\nbegin\r\n UpdateGroupCache(FGroupsTopCache);\r\n UpdateGroupCache(FGroupsBottomCache);\r\n UpdateGroupsDisplay;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.UpdateGroupsDisplay;\r\nbegin\r\n BuildDisplay(FGroupsTopCache, FGroupsTopDisplay);\r\n BuildDisplay(FGroupsBottomCache, FGroupsBottomDisplay);\r\nend;\r\n\r\nfunction TTMSFNCCustomTreeView.CanApplyVerticalOffset: Boolean;\r\nbegin\r\n Result := False;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.CancelEditing;\r\nbegin\r\n if FInplaceEditorActive then\r\n CloseInplaceEditor(True);\r\nend;\r\n\r\nfunction TTMSFNCCustomTreeView.CanStartDragFromMouseDown: Boolean;\r\nbegin\r\n Result := True;\r\nend;\r\n\r\nfunction TTMSFNCCustomTreeView.CanStartDragFromMouseMove: Boolean;\r\nbegin\r\n Result := False;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.ChangeDPIScale(M, D: Integer);\r\nvar\r\n I: Integer;\r\nbegin\r\n inherited;\r\n BeginUpdate;\r\n CreateCheckBoxBitmaps;\r\n CreateRadioButtonBitmaps;\r\n NodesAppearance.LevelIndent := TTMSFNCUtils.MulDivSingle(NodesAppearance.LevelIndent, M, D);\r\n NodesAppearance.ExpandWidth := TTMSFNCUtils.MulDivSingle(NodesAppearance.ExpandWidth, M, D);\r\n NodesAppearance.ExpandHeight := TTMSFNCUtils.MulDivSingle(NodesAppearance.ExpandHeight, M, D);\r\n ColumnsAppearance.TopSize := TTMSFNCUtils.MulDivSingle(ColumnsAppearance.TopSize, M, D);\r\n ColumnsAppearance.BottomSize := TTMSFNCUtils.MulDivSingle(ColumnsAppearance.BottomSize, M, D);\r\n GroupsAppearance.TopSize := TTMSFNCUtils.MulDivSingle(GroupsAppearance.TopSize, M, D);\r\n GroupsAppearance.BottomSize := TTMSFNCUtils.MulDivSingle(GroupsAppearance.BottomSize, M, D);\r\n ColumnsAppearance.BottomFont.Height := TTMSFNCUtils.MulDivInt(ColumnsAppearance.BottomFont.Height, M, D);\r\n ColumnsAppearance.TopFont.Height := TTMSFNCUtils.MulDivInt(ColumnsAppearance.TopFont.Height, M, D);\r\n GroupsAppearance.BottomFont.Height := TTMSFNCUtils.MulDivInt(GroupsAppearance.BottomFont.Height, M, D);\r\n GroupsAppearance.TopFont.Height := TTMSFNCUtils.MulDivInt(GroupsAppearance.TopFont.Height, M, D);\r\n NodesAppearance.ExtendedFont.Height := TTMSFNCUtils.MulDivInt(NodesAppearance.ExtendedFont.Height, M, D);\r\n NodesAppearance.Font.Height := TTMSFNCUtils.MulDivInt(NodesAppearance.Font.Height, M, D);\r\n NodesAppearance.FixedHeight := TTMSFNCUtils.MulDivSingle(NodesAppearance.FixedHeight, M, D);\r\n NodesAppearance.VariableMinimumHeight := TTMSFNCUtils.MulDivSingle(NodesAppearance.VariableMinimumHeight, M, D);\r\n for I := 0 to Columns.Count - 1 do\r\n begin\r\n Columns[I].Width := TTMSFNCUtils.MulDivSingle(Columns[I].Width, M, D);\r\n Columns[I].MinimumWidth := TTMSFNCUtils.MulDivSingle(Columns[I].MinimumWidth, M, D);\r\n Columns[I].Font.Height := TTMSFNCUtils.MulDivInt(Columns[I].Font.Height, M, D);\r\n Columns[I].TitleFont.Height := TTMSFNCUtils.MulDivInt(Columns[I].TitleFont.Height, M, D);\r\n Columns[I].TopFont.Height := TTMSFNCUtils.MulDivInt(Columns[I].TopFont.Height, M, D);\r\n Columns[I].BottomFont.Height := TTMSFNCUtils.MulDivInt(Columns[I].BottomFont.Height, M, D);\r\n Columns[I].ExpandingButtonSize := TTMSFNCUtils.MulDivSingle(Columns[I].ExpandingButtonSize, M, D);\r\n Columns[I].Filtering.ButtonSize := TTMSFNCUtils.MulDivSingle(Columns[I].Filtering.ButtonSize, M, D);\r\n Columns[I].Filtering.DropDownWidth := TTMSFNCUtils.MulDivInt(Columns[I].Filtering.DropDownWidth, M, D);\r\n Columns[I].Filtering.DropDownHeight := TTMSFNCUtils.MulDivInt(Columns[I].Filtering.DropDownHeight, M, D);\r\n end;\r\n EndUpdate;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.UpdateNodeCache;\r\nvar\r\n g: TTMSFNCGraphics;\r\n vs, stty: Single;\r\n I: Integer;\r\n v: TTMSFNCTreeViewVirtualNode;\r\nbegin\r\n if (UpdateCount > 0) or (csDestroying in ComponentState) or not Assigned(FNodeCache) then\r\n Exit;\r\n\r\n FNodeCache.Clear;\r\n\r\n if ColumnCount > 0 then\r\n begin\r\n g := TTMSFNCGraphics.CreateBitmapCanvas;\r\n g.BeginScene;\r\n g.BitmapContainer := BitmapContainer;\r\n g.OptimizedHTMLDrawing := OptimizedHTMLDrawing;\r\n try\r\n vs := GetVerticalScrollPosition;\r\n stty := vs + StartOffset;\r\n\r\n for I := StartRow to StopRow do\r\n begin\r\n v := GetVisibleNodeForIndex(I);\r\n if Assigned(v) then\r\n begin\r\n if ConfigureNode(g, I, v, stty) then\r\n Break;\r\n end;\r\n end;\r\n\r\n CustomizeNodeCache(g, stty);\r\n finally\r\n g.EndScene;\r\n g.Free;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.PrecalculateNodes;\r\nvar\r\n g: TTMSFNCGraphics;\r\n vs, stty: Single;\r\n I: Integer;\r\n v: TTMSFNCTreeViewVirtualNode;\r\nbegin\r\n if (UpdateCount > 0) or (csDestroying in ComponentState) or not FPrecalculateItems then\r\n Exit;\r\n\r\n if ColumnCount > 0 then\r\n begin\r\n g := TTMSFNCGraphics.CreateBitmapCanvas;\r\n g.BeginScene;\r\n g.BitmapContainer := BitmapContainer;\r\n g.OptimizedHTMLDrawing := OptimizedHTMLDrawing;\r\n try\r\n vs := GetVerticalScrollPosition;\r\n stty := vs + StartOffset;\r\n\r\n for I := StartRow to RowCount - 1 do\r\n begin\r\n v := GetVisibleNodeForIndex(I);\r\n if Assigned(v) then\r\n ConfigureNode(g, I, v, stty);\r\n end;\r\n\r\n finally\r\n g.EndScene;\r\n g.Free;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.UpdateNodeDisplay;\r\nbegin\r\n BuildDisplay(FNodeCache, FNodeDisplay);\r\nend;\r\n\r\nconstructor TTMSFNCCustomTreeView.Create(AOwner: TComponent);\r\n{$IFDEF CMNWEBLIB}\r\nvar\r\n s: Single;\r\n{$ENDIF}\r\nbegin\r\n inherited;\r\n FColumnStroke := TTMSFNCGraphicsStroke.Create(gskSolid, gcNull);\r\n FColumnStroke.OnChanged := @ColumnStrokeChanged;\r\n\r\n FSizeColumn := -1;\r\n FGroupsCaching := False;\r\n FColumnsCaching := False;\r\n FSelectedNodes := TTMSFNCTreeViewSelectedNodes.Create;\r\n FNodeCache := TTMSFNCTreeViewNodeCache.Create;\r\n FColumnsTopCache := TTMSFNCTreeViewColumnsTopCache.Create;\r\n FGroupsTopCache := TTMSFNCTreeViewGroupsTopCache.Create;\r\n FColumnsBottomCache := TTMSFNCTreeViewColumnsBottomCache.Create;\r\n FGroupsBottomCache := TTMSFNCTreeViewGroupsBottomCache.Create;\r\n\r\n FNodeDisplay := TTMSFNCTreeViewNodeDisplayList.Create;\r\n FColumnsTopDisplay := TTMSFNCTreeViewColumnsTopDisplayList.Create;\r\n FGroupsTopDisplay := TTMSFNCTreeViewGroupsTopDisplayList.Create;\r\n FColumnsBottomDisplay := TTMSFNCTreeViewColumnsBottomDisplayList.Create;\r\n FGroupsBottomDisplay := TTMSFNCTreeViewGroupsBottomDisplayList.Create;\r\n\r\n FNodesAppearance := TTMSFNCTreeViewNodesAppearance.Create(Self);\r\n FColumnsAppearance := TTMSFNCTreeViewColumnsAppearance.Create(Self);\r\n FGroupsAppearance := TTMSFNCTreeViewGroupsAppearance.Create(Self);\r\n FInteraction := TTMSFNCTreeViewInteraction.Create(Self);\r\n\r\n FDragTimer := TTimer.Create(Self);\r\n FDragTimer.Interval := 10;\r\n FDragTimer.Enabled := False;\r\n FDragTimer.OnTimer := DragTime;\r\n\r\n FAnimateTimer := TTimer.Create(Self);\r\n FAnimateTimer.Interval := 1;\r\n FAnimateTimer.Enabled := False;\r\n FAnimateTimer.OnTimer := Animate;\r\n\r\n {$IFDEF FMXLIB}\r\n FScrollBarTimer := TTimer.Create(Self);\r\n FScrollBarTimer.Interval := 1;\r\n FScrollBarTimer.Enabled := False;\r\n FScrollBarTimer.OnTimer := ScrollBarChanged;\r\n\r\n FInplaceEditorTimer := TTimer.Create(Self);\r\n FInplaceEditorTimer.Interval := 1;\r\n FInplaceEditorTimer.OnTimer := DoInplaceEditorTimer;\r\n FInplaceEditorTimer.Enabled := False;\r\n {$ENDIF}\r\n\r\n FCopyNodes := TTMSFNCTreeViewCopyNodes.Create(nil, nil);\r\n\r\n FFilterListBox := TListBox.Create(Self);\r\n {$IFDEF LCLLIB}\r\n FFilterListBox.ClickOnSelChange := False;\r\n {$ENDIF}\r\n FFilterListBox.Tag := -1;\r\n FFilterListBox.OnClick := HandleFilterListClick;\r\n {$IFDEF FMXLIB}\r\n FFilterListBox.OnApplyStyleLookup := ApplyFilterListBoxStyleLookUp;\r\n {$ENDIF}\r\n\r\n FGlobalFont := TTMSFNCAppearanceGlobalFont.Create(Self);\r\n\r\n FFilterTimer := TTimer.Create(Self);\r\n FFilterTimer.OnTimer := HandleFilterTimer;\r\n FFilterTimer.Interval := 100;\r\n FFilterTimer.Enabled := False;\r\n\r\n FFilterPopup := TTMSFNCPopup.Create(Self);\r\n FFilterPopup.Placement := ppAbsolute;\r\n\r\n FPrecalculateItems := False;\r\n\r\n Width := 300;\r\n Height := 280;\r\n\r\n {$IFDEF FNCLIB}\r\n FDefaultViewJSONOptions := TTMSFNCTreeViewViewJSONOptions.Create;\r\n {$ENDIF}\r\n\r\n {$IFDEF CMNWEBLIB}\r\n s := TTMSFNCUtils.GetDPIScale(Self, 96);\r\n if (s = 1) then\r\n FCheckStartSize := 19\r\n else if (s = 1.25) or (s = 1.75) then\r\n FCheckStartSize := 16\r\n else\r\n FCheckStartSize := 17;\r\n {$ENDIF}\r\n\r\n {$IFDEF UIPACK}\r\n if IsDesignTime then\r\n InitSample;\r\n {$ENDIF}\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.CreateDragBitmap;\r\nvar\r\n g: TTMSFNCGraphics;\r\n dr: TRectF;\r\n {$IFDEF WEBLIB}\r\n r: String;\r\n {$ENDIF}\r\nbegin\r\n if not Assigned(FDragNode) then\r\n Exit;\r\n\r\n DestroyDragBitmap;\r\n\r\n dr := TTMSFNCTreeViewVirtualNodeOpen(FDragNode).Cache.DrawRect;\r\n FDragBitmap := TTMSFNCImage.Create(Self);\r\n {$IFDEF FMXLIB}\r\n FDragBitmap.HitTest := False;\r\n {$ENDIF}\r\n FDragBitmap.Width := Round((dr.Right - dr.Left) / ResourceScaleFactor);\r\n FDragBitmap.Height := Round((dr.Bottom - dr.Top) / ResourceScaleFactor);\r\n FDragBitmap.Left := Round(dr.Left / ResourceScaleFactor);\r\n FDragBitmap.Top := Round(dr.Top / ResourceScaleFactor);\r\n g := TTMSFNCGraphics.CreateBitmapCanvas(Round(FDragBitmap.Width * ResourceScaleFactor), Round(FDragBitmap.Height * ResourceScaleFactor), False);\r\n g.BitmapContainer := BitmapContainer;\r\n g.OptimizedHTMLDrawing := OptimizedHTMLDrawing;\r\n try\r\n g.BeginScene;\r\n DrawNode(g, RectF(0, 0, dr.Right - dr.Left, dr.Bottom - dr.Top), FDragNode, False, -dr.Left, -dr.Top);\r\n g.EndScene;\r\n {$IFDEF WEBLIB}\r\n r := g.Bitmap.GetBase64Image;\r\n FDragBitmap.Bitmaps.AddBitmapFromResource(r);\r\n {$ENDIF}\r\n {$IFNDEF WEBLIB}\r\n FDragBitmap.Bitmaps.AddDrawBitmap(g.Bitmap);\r\n {$ENDIF}\r\n finally\r\n g.Free;\r\n end;\r\n\r\n FDragBitmap.Parent := Self;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.HandleAlternativeDragDrop(X, Y: Single);\r\nbegin\r\n\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.HandleAlternativeDragOver(X, Y: Single);\r\nbegin\r\n\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.HandleCustomKeys(AKey: Word);\r\nbegin\r\n\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.HandleDblClick(X, Y: Single);\r\nvar\r\n pf: TPointF;\r\n c: TTMSFNCTreeViewVirtualNode;\r\n col: Integer;\r\n en, ext: Boolean;\r\n t: Integer;\r\nbegin\r\n inherited;\r\n if BlockUserInput then\r\n Exit;\r\n\r\n FDblClicked := True;\r\n pf := PointF(X, Y);\r\n FDownNode := nil;\r\n c := XYToNode(pf.X, pf.Y);\r\n if Assigned(c) then\r\n begin\r\n if not XYToNodeExpand(c, pf.X, pf.Y) and not Assigned(XYToNodeCheck(c, pf.X, pf.Y).ANode) then\r\n begin\r\n FDownNode := c;\r\n if Assigned(FDownNode) then\r\n begin\r\n en := True;\r\n DoIsNodeEnabled(FDownNode, en);\r\n if en then\r\n begin\r\n ext := False;\r\n DoIsNodeExtended(FDownNode, ext);\r\n if not FCompactMode and ((ext and Interaction.ExtendedSelectable and Interaction.ExtendedEditable) or not ext) and (Interaction.MouseEditMode = tmemDoubleClick) and not Interaction.ReadOnly then\r\n begin\r\n t := XYToNodeTextColumn(FDownNode, pf.X, pf.Y);\r\n if t <> -1 then\r\n HandleNodeEditing(FDownNode, t);\r\n end\r\n else if Interaction.ExpandCollapseOnDblClick then\r\n HandleNodeToggle(FDownNode);\r\n end;\r\n\r\n DoNodeDblClick(FDownNode);\r\n end;\r\n end;\r\n end\r\n else\r\n begin\r\n col := XYToColumnSize(pf.X, pf.Y);\r\n if Interaction.ColumnAutoSizeOnDblClick then\r\n AutoSizeColumn(col);\r\n end;\r\n\r\n IsMouseDown := False;\r\n FMouseUp := True;\r\n FScrolling := False;\r\n\r\n FDoNodeExpand := False;\r\n FDoNodeExtra := False;\r\n FDoNodeTitleExtra := False;\r\n FDoNodeAnchor.AAnchor := '';\r\n FDoNodeAnchor.AColumn := -1;\r\n FDoNodeTitleAnchor.AAnchor := '';\r\n FDoNodeTitleAnchor.AColumn := -1;\r\n FDownColumn := -1;\r\n FDownColumnValue := -1;\r\n FDownColumnFilter := -1;\r\n FDownColumnExpand := -1;\r\n FReorderMode := False;\r\n FDragMode := False;\r\n FDragModeStarted := False;\r\nend;\r\n\r\ndestructor TTMSFNCCustomTreeView.Destroy;\r\nbegin\r\n if Assigned(FOldInplaceEditor) then\r\n FOldInplaceEditor.Free;\r\n\r\n {$IFDEF FNCLIB}\r\n FDefaultViewJSONOptions.Free;\r\n {$ENDIF}\r\n\r\n FGlobalFont.Free;\r\n\r\n FCopyNodes.Free;\r\n FFilterTimer.Free;\r\n FFilterListBox.Free;\r\n FFilterPopup.Free;\r\n\r\n if Assigned(FDragBitmap) then\r\n begin\r\n FDragBitmap.Free;\r\n FDragBitmap := nil;\r\n end;\r\n {$IFDEF FMXLIB}\r\n FScrollBarTimer.Free;\r\n FInplaceEditorTimer.Free;\r\n {$ENDIF}\r\n FColumnStroke.Free;\r\n FAnimateTimer.Free;\r\n FNodesAppearance.Free;\r\n FGroupsAppearance.Free;\r\n FInteraction.Free;\r\n FColumnsAppearance.Free;\r\n FGroupsTopDisplay.Free;\r\n FColumnsTopDisplay.Free;\r\n FGroupsBottomDisplay.Free;\r\n FColumnsBottomDisplay.Free;\r\n FSelectedNodes.Free;\r\n FNodeDisplay.Free;\r\n FNodeCache.Free;\r\n FGroupsTopCache.Free;\r\n FColumnsTopCache.Free;\r\n FGroupsBottomCache.Free;\r\n FColumnsBottomCache.Free;\r\n inherited;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.DestroyDragBitmap;\r\nbegin\r\n if Assigned(FDragBitmap) then\r\n begin\r\n FDragBitmap.Parent := nil;\r\n FDragBitmap.Free;\r\n FDragBitmap := nil;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.HandleFilter(AColumn: Integer);\r\nvar\r\n sl: TStringList;\r\n pt: TPointF;\r\n n: TTMSFNCTreeViewVirtualNode;\r\n s: String;\r\n topr, r, fr: TRectF;\r\n szd: Single;\r\n colw, colp: Single;\r\nbegin\r\n if (AColumn >= 0) and (AColumn <= Columns.Count - 1) and Columns[AColumn].Filtering.Enabled then\r\n begin\r\n colw := ColumnWidths[AColumn];\r\n if colw >= 0 then\r\n begin\r\n colp := ColumnPositions[AColumn];\r\n sl := TStringList.Create;\r\n try\r\n sl.Duplicates := dupIgnore;\r\n sl.Sorted := true;\r\n sl.Add(sTMSFNCTreeViewFilterAll);\r\n\r\n n := GetFirstRootVirtualNode;\r\n while Assigned(n) do\r\n begin\r\n s := '';\r\n DoGetNodeText(n, AColumn, tntmDrawing, s);\r\n s := TTMSFNCUtils.HTMLStrip(s);\r\n if s <> '' then\r\n sl.Add(s);\r\n n := n.GetNext;\r\n end;\r\n\r\n DoNeedFilterDropDownData(AColumn, sl);\r\n\r\n FFilterListBox.Parent := Self;\r\n {$IFDEF FMXLIB}\r\n FFilterListBox.BeginUpdate;\r\n {$ENDIF}\r\n FFilterListBox.Items.Assign(sl);\r\n FFilterListBox.ItemIndex := -1;\r\n {$IFDEF FMXLIB}\r\n FFilterListBox.EndUpdate;\r\n {$ENDIF}\r\n {$IFNDEF FMXLIB}\r\n TTMSFNCUtils.SetFontSize(FFilterListBox.Font, 16);\r\n {$ENDIF}\r\n\r\n FFilterListBox.Tag := AColumn;\r\n\r\n DoCustomizeFilterListBox(AColumn, FFilterListBox);\r\n\r\n FFilterListBox.Parent := nil;\r\n finally\r\n sl.Free;\r\n end;\r\n\r\n\r\n FFilterPopup.PlacementControl := Self;\r\n\r\n topr := GetColumnsTopRect;\r\n topr.Left := topr.Left - GetHorizontalScrollPosition;\r\n r := RectF(topr.Left + colp, topr.Top, topr.Left + colp + colw, topr.Bottom);\r\n szd := Columns[AColumn].Filtering.ButtonSize;\r\n fr := RectF(Round(r.Right - szd - ScalePaintValue(4)), Round(r.Top + ((r.Bottom - r.Top) - szd) / 2), Round(r.Right - ScalePaintValue(4)), Round(r.Top + ((r.Bottom - r.Top) - szd) / 2 + szd));\r\n\r\n pt := LocalToScreenEx(PointF(fr.Left + (fr.Right - fr.Left) - szd - ScalePaintValue(2), fr.Top + ((fr.Bottom - fr.Top) + szd) / 2));\r\n FFilterPopup.PlacementRectangle.Left := pt.X;\r\n FFilterPopup.PlacementRectangle.Top := pt.Y;\r\n\r\n FFilterListBox.Width := Columns[AColumn].Filtering.DropDownWidth;\r\n FFilterListBox.Height := Columns[AColumn].Filtering.DropDownHeight;\r\n FFilterPopup.DropDownHeight := Columns[AColumn].Filtering.DropDownHeight;\r\n FFilterPopup.DropDownWidth := Columns[AColumn].Filtering.DropDownWidth;\r\n\r\n FFilterPopup.PlacementRectangle.Right := pt.X + FFilterPopup.DropDownWidth;\r\n FFilterPopup.PlacementRectangle.Bottom := pt.Y + FFilterPopup.DropDownHeight;\r\n\r\n FFilterPopup.ContentControl := FFilterListBox;\r\n FFilterPopup.FocusedControl := FFilterListBox;\r\n\r\n FFilterPopup.Popup;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.HandleFilterListClick(Sender: TObject);\r\nbegin\r\n FFilterTimer.Enabled := True;\r\nend;\r\n\r\n{$IFDEF FMXLIB}\r\nprocedure TTMSFNCCustomTreeView.ApplyFilterListBoxStyleLookUp(Sender: TObject);\r\nbegin\r\n (Sender as TListBox).ViewportPosition := PointF(0, 0);\r\nend;\r\n{$ENDIF}\r\n\r\nprocedure TTMSFNCCustomTreeView.HandleFilterTimer(Sender: TObject);\r\nvar\r\n fd: TTMSFNCTreeViewFilterData;\r\n cnd: string;\r\n i, filtercol: integer;\r\nbegin\r\n if Assigned(FFilterListBox) then\r\n begin\r\n filtercol := FFilterListBox.Tag;\r\n if (filtercol >= 0) and (filtercol <= Columns.Count - 1) then\r\n begin\r\n if Columns[filtercol].Filtering.MultiColumn then\r\n begin\r\n for i := Filter.Count - 1 downto 0 do\r\n begin\r\n if Filter.Items[i].Column = filtercol then\r\n Filter.Delete(i);\r\n end;\r\n end\r\n else\r\n Filter.Clear;\r\n\r\n fd := Filter.Add;\r\n fd.Column := filtercol;\r\n\r\n cnd := '';\r\n if (FFilterListBox.ItemIndex >= 0) and (FFilterListBox.ItemIndex <= FFilterListBox.Items.Count - 1) then\r\n cnd := FFilterListbox.Items[FFilterListbox.ItemIndex];\r\n\r\n if pos(' ',cnd) > 0 then\r\n cnd := '\"' + cnd + '\"';\r\n\r\n FFilterPopup.IsOpen := False;\r\n\r\n if cnd = sTMSFNCTreeViewFilterAll then\r\n begin\r\n RemoveFilters;\r\n end\r\n else\r\n begin\r\n DoFilterSelect(fd.Column, cnd);\r\n fd.Condition := cnd;\r\n ApplyFilter;\r\n end;\r\n end;\r\n end;\r\n\r\n FFilterTimer.Enabled := False;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.HandleDialogKey(var Key: Word; Shift: TShiftState);\r\nvar\r\n n: TTMSFNCTreeViewVirtualNode;\r\n c: Integer;\r\n ext: Boolean;\r\nbegin\r\n if FInplaceEditorClosed or BlockUserInput then\r\n begin\r\n inherited;\r\n Exit;\r\n end;\r\n\r\n if Assigned(FInplaceEditor) and FInplaceEditorActive and ((Key = KEY_ESCAPE) or (Key = KEY_TAB) or (Key = KEY_F2)\r\n or ((FInplaceEditor is TEdit) and (Key = KEY_RETURN))) or ((FInplaceEditor is TMemo) and (Key = KEY_RETURN) and not (ssCtrl in Shift)) then\r\n begin\r\n FCloseWithDialogKey := True;\r\n CloseInplaceEditor(Key = KEY_ESCAPE);\r\n if Key = KEY_TAB then\r\n begin\r\n if Assigned(FFocusedNode) then\r\n begin\r\n if ssShift in Shift then\r\n begin\r\n ext := False;\r\n DoIsNodeExtended(FFocusedNode, ext);\r\n if (FUpdateNodeColumn > GetFirstEditableColumn) and not ext then\r\n begin\r\n HandleNodeEditing(FFocusedNode, GetPreviousEditableColumn(FUpdateNodeColumn));\r\n Invalidate;\r\n Key := 0;\r\n end\r\n else\r\n begin\r\n n := GetPreviousFocusableNode(FFocusedNode);\r\n if Assigned(n)then\r\n begin\r\n ext := False;\r\n DoIsNodeExtended(n, ext);\r\n if (ext and Interaction.ExtendedEditable) or not ext then\r\n begin\r\n if not ext then\r\n c := GetLastEditableColumn\r\n else\r\n c := 0;\r\n\r\n if FFocusedNode <> n then\r\n begin\r\n FFocusedNode := n;\r\n DoFocusedNodeChanged(FFocusedNode);\r\n end;\r\n SelectVirtualNode(n);\r\n ScrollToVirtualNode(n, True, tvnspTop);\r\n HandleNodeEditing(n, c);\r\n Invalidate;\r\n Key := 0;\r\n end;\r\n end;\r\n end;\r\n end\r\n else\r\n begin\r\n ext := False;\r\n DoIsNodeExtended(FFocusedNode, ext);\r\n if (FUpdateNodeColumn < GetLastEditableColumn) and not ext then\r\n begin\r\n EditVirtualNode(FFocusedNode, GetNextEditableColumn(FUpdateNodeColumn));\r\n Key := 0;\r\n end\r\n else\r\n begin\r\n n := GetNextFocusableNode(FFocusedNode);\r\n if Assigned(n) then\r\n begin\r\n ext := False;\r\n DoIsNodeExtended(n, ext);\r\n if (ext and Interaction.ExtendedEditable) or not ext then\r\n begin\r\n c := GetFirstEditableColumn;\r\n if FFocusedNode <> n then\r\n begin\r\n FFocusedNode := n;\r\n DoFocusedNodeChanged(FFocusedNode);\r\n end;\r\n SelectVirtualNode(n);\r\n ScrollToVirtualNode(n, True, tvnspBottom);\r\n HandleNodeEditing(n, c);\r\n Invalidate;\r\n Key := 0;\r\n end;\r\n end;\r\n end;\r\n end;\r\n end;\r\n end;\r\n end;\r\n\r\n inherited;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.HandleDragDrop(const Source: TObject;\r\n const Point: TPointF);\r\nvar\r\n dn, dragn: TTMSFNCTreeViewVirtualNode;\r\n b: Boolean;\r\nbegin\r\n inherited;\r\n\r\n if BlockUserInput or Assigned(OnDragDrop) then\r\n Exit;\r\n\r\n if Assigned(OnCustomDragDrop) then\r\n OnCustomDragDrop(Self, Source, Point)\r\n else\r\n begin\r\n if FAccepted and Assigned(Source) and (Source is TTMSFNCCustomTreeView) and ((Source as TTMSFNCCustomTreeView).Interaction.DragDropMode <> tdmNone) then\r\n begin\r\n dragn := (Source as TTMSFNCCustomTreeView).DragNode;\r\n if Assigned(dragn) then\r\n begin\r\n dn := XYToNode(Point.X, Point.Y);\r\n if (dn <> dragn) and Assigned(dragn.Node) and PtInRectEx(GetNodesRect, Point) then\r\n begin\r\n b := True;\r\n DoBeforeDropNode(dragn, dn, b);\r\n if b then\r\n begin\r\n BeginUpdate;\r\n (Source as TTMSFNCCustomTreeView).BeginUpdate;\r\n if Assigned(dn) and Assigned(dn.Node) then\r\n begin\r\n case (Source as TTMSFNCCustomTreeView).Interaction.DragDropMode of\r\n tdmMove: dragn.Node.MoveTo(dn.Node, dn.Node.Index);\r\n tdmCopy: dragn.Node.CopyTo(dn.Node, dn.Node.Index);\r\n end;\r\n end\r\n else\r\n begin\r\n Nodes.Add.Assign(dragn.Node);\r\n case (Source as TTMSFNCCustomTreeView).Interaction.DragDropMode of\r\n tdmMove: dragn.Node.TreeView.RemoveNode(dragn.Node);\r\n end;\r\n dragn := Nodes[Nodes.Count - 1].VirtualNode;\r\n end;\r\n (Source as TTMSFNCCustomTreeView).DragNode := nil;\r\n (Source as TTMSFNCCustomTreeView).EndUpdate;\r\n EndUpdate;\r\n\r\n DoAfterDropNode(dragn, dn);\r\n end;\r\n end;\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.HandleDragOver(const Source: TObject;\r\n const Point: TPointF; var Accept: Boolean);\r\nbegin\r\n inherited;\r\n if BlockUserInput or Assigned(OnDragOver) then\r\n Exit;\r\n\r\n if not AlternativeDragDrop then\r\n begin\r\n FDragMode := False;\r\n FDragModeStarted := False;\r\n IsMouseDown := False;\r\n end;\r\n\r\n if Assigned(OnCustomDragOver) then\r\n OnCustomDragOver(Self, Source, Point, Accept)\r\n else\r\n begin\r\n Accept := (Interaction.DragDropMode <> tdmNone) and (Source is TTMSFNCCustomTreeView) and Assigned((Source as TTMSFNCCustomTreeView).DragNode);\r\n Accept := Accept and PtInRectEx(GetNodesRect, Point);\r\n end;\r\n\r\n FAccepted := Accept;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.HandleDragStart(X, Y: Single);\r\nbegin\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.HandleExpand(AColumn: Integer);\r\nbegin\r\n\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.DrawBorders(AGraphics: TTMSFNCGraphics);\r\nbegin\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.DrawDisplay(AGraphics: TTMSFNCGraphics; ADisplay: TTMSFNCTreeViewDisplayList);\r\nvar\r\n I: Integer;\r\n cache: TTMSFNCTreeViewCacheItem;\r\n st: TTMSFNCGraphicsSaveState;\r\n r: TRectF;\r\nbegin\r\n if ADisplay.Count = 0 then\r\n Exit;\r\n\r\n st := AGraphics.SaveState;\r\n if (ADisplay is TTMSFNCTreeViewNodeDisplayList) then\r\n begin\r\n r := GetContentClipRect;\r\n r.Right := r.Right + 1;\r\n end\r\n else if ADisplay is TTMSFNCTreeViewGroupsTopDisplayList then\r\n begin\r\n r := GetGroupsTopRect;\r\n r.Bottom := r.Bottom + 1;\r\n end\r\n else if ADisplay is TTMSFNCTreeViewGroupsBottomDisplayList then\r\n begin\r\n r := GetGroupsBottomRect;\r\n r.Top := r.Top - 1;\r\n end\r\n else if ADisplay is TTMSFNCTreeViewColumnsTopDisplayList then\r\n begin\r\n r := GetColumnsTopRect;\r\n r.Bottom := r.Bottom + 1;\r\n end\r\n else if ADisplay is TTMSFNCTreeViewColumnsBottomDisplayList then\r\n begin\r\n r := GetColumnsBottomRect;\r\n r.Top := r.Top - 1;\r\n end;\r\n\r\n AGraphics.ClipRect(r);\r\n\r\n for I := 0 to ADisplay.Count - 1 do\r\n begin\r\n cache := ADisplay[I];\r\n if ADisplay is TTMSFNCTreeViewNodeDisplayList then\r\n begin\r\n if Assigned(cache.Node) then\r\n DrawNode(AGraphics, cache.DrawRect, cache.Node)\r\n end\r\n else if ADisplay is TTMSFNCTreeViewColumnsDisplayList then\r\n DrawColumn(AGraphics, cache.DrawRect, cache.Column, cache.Kind)\r\n else if ADisplay is TTMSFNCTreeViewGroupsDisplayList then\r\n DrawGroup(AGraphics, cache.DrawRect, cache.Group, cache.StartColumn, cache.EndColumn, cache.Kind)\r\n end;\r\n\r\n AGraphics.RestoreState(st);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.DrawEmptySpaces(AGraphics: TTMSFNCGraphics);\r\nbegin\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.DrawGroup(AGraphics: TTMSFNCGraphics; ARect: TRectF; AGroup: Integer; AStartColumn, AEndColumn: Integer; AKind: TTMSFNCTreeViewCacheItemKind);\r\nbegin\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.DrawGroups(AGraphics: TTMSFNCGraphics);\r\nbegin\r\n DrawDisplay(AGraphics, FGroupsTopDisplay);\r\n DrawDisplay(AGraphics, FGroupsBottomDisplay);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.DrawNode(AGraphics: TTMSFNCGraphics; ARect: TRectF; ANode: TTMSFNCTreeViewVirtualNode; ACaching: Boolean = False; AOffsetX: Single = 0; AOffsetY: Single = 0);\r\nbegin\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.DrawNodeColumns(AGraphics: TTMSFNCGraphics);\r\nbegin\r\n\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.DrawNodes(AGraphics: TTMSFNCGraphics);\r\nbegin\r\n DrawDisplay(AGraphics, FNodeDisplay);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.DrawColumn(AGraphics: TTMSFNCGraphics; ARect: TRectF; AColumn: Integer; AKind: TTMSFNCTreeViewCacheItemKind);\r\nbegin\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.DrawColumns(AGraphics: TTMSFNCGraphics);\r\nbegin\r\n DrawDisplay(AGraphics, FColumnsTopDisplay);\r\n DrawDisplay(AGraphics, FColumnsBottomDisplay);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.EditNode(ANode: TTMSFNCTreeViewNode; AColumn: Integer);\r\nbegin\r\n if Assigned(ANode) then\r\n EditVirtualNode(TTMSFNCTreeViewNodeOpen(ANode).VirtualNode, AColumn);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.EditVirtualNode(\r\n ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer);\r\nbegin\r\n HandleNodeEditing(ANode, AColumn);\r\n Invalidate;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.ExportNotification(\r\n AState: TTMSFNCTreeViewExportState; ARow: Integer);\r\nbegin\r\n\r\nend;\r\n\r\nfunction TTMSFNCCustomTreeView.GetColumnBottomLeftEmptyRect: TRectF;\r\nvar\r\n ptr, nr: TRectF;\r\nbegin\r\n ptr := GetColumnsBottomRect;\r\n nr := LocalRect;\r\n Result.Top := ptr.Top;\r\n Result.Left := nr.Left;\r\n Result.Right := ptr.Left;\r\n Result.Bottom := ptr.Bottom;\r\nend;\r\n\r\nfunction TTMSFNCCustomTreeView.GetColumnBottomRightEmptyRect: TRectF;\r\nvar\r\n ptr, nr: TRectF;\r\nbegin\r\n ptr := GetColumnsBottomRect;\r\n nr := LocalRect;\r\n Result.Top := ptr.Top;\r\n Result.Left := ptr.Right;\r\n Result.Right := nr.Right - 1;\r\n Result.Bottom := ptr.Bottom;\r\nend;\r\n\r\nfunction TTMSFNCCustomTreeView.GetCacheHeight: Integer;\r\nbegin\r\n Result := CACHEHEIGHT;\r\nend;\r\n\r\nfunction TTMSFNCCustomTreeView.GetCacheWidth: Integer;\r\nbegin\r\n Result := CACHEWIDTH\r\nend;\r\n\r\nfunction TTMSFNCCustomTreeView.GetCalculationRect: TRectF;\r\nbegin\r\n Result := inherited GetCalculationRect;\r\n Result.Top := Result.Top + GetColumnsTopSize + GetGroupsTopSize;\r\n Result.Bottom := Result.Bottom - GetColumnsBottomSize - GetGroupsBottomSize;\r\n Result.Right := Result.Left + Max(0, Result.Right - Result.Left);\r\n Result.Bottom := Result.Top + Max(0, Result.Bottom - Result.Top);\r\nend;\r\n\r\nfunction TTMSFNCCustomTreeView.GetContentCliprect: TRectF;\r\nbegin\r\n Result := inherited GetContentClipRect;\r\n Result.Bottom := Result.Top + Min(GetTotalRowHeight, Result.Bottom - Result.Top);\r\n Result.Right := Result.Left + Min(GetTotalColumnWidth, Result.Right - Result.Left);\r\n Result.Left := Result.Left + 1;\r\n Result.Right := Result.Right - 1;\r\nend;\r\n\r\nfunction TTMSFNCCustomTreeView.GetContentRect: TRectF;\r\nbegin\r\n Result := inherited GetContentRect;\r\n Result.Top := Result.Top + GetColumnsTopSize + GetGroupsTopSize;\r\n Result.Bottom := Result.Bottom - GetColumnsBottomSize - GetGroupsBottomSize;\r\nend;\r\n\r\nfunction TTMSFNCCustomTreeView.GetDefaultRowHeight(\r\n ANode: TTMSFNCTreeViewVirtualNode): Single;\r\nvar\r\n loff, toff, roff, boff: Single;\r\nbegin\r\n Result := inherited GetDefaultRowHeight(ANode);\r\n\r\n loff := 0;\r\n toff := 0;\r\n roff := 0;\r\n boff := 0;\r\n GetNodeOffset(ANode, loff, toff, roff, boff);\r\n\r\n Result := Result + toff + boff;\r\nend;\r\n\r\nfunction TTMSFNCCustomTreeView.GetDocURL: string;\r\nbegin\r\n Result := TTMSFNCTreeViewDocURL;\r\nend;\r\n\r\nfunction TTMSFNCCustomTreeView.GetDragObjectScreenShot: TTMSFNCBitmap;\r\nbegin\r\n CreateDragBitmap;\r\n Result := TTMSFNCBitmap.Create;\r\n if Assigned(FDragBitmap) then\r\n begin\r\n Result.Assign(FDragBitmap.GetBitmap);\r\n FDragBitmap.Free;\r\n FDragBitmap := nil;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCCustomTreeView.GetGroupBottomLeftEmptyRect: TRectF;\r\nvar\r\n ptr, nr: TRectF;\r\nbegin\r\n ptr := GetGroupsBottomRect;\r\n nr := LocalRect;\r\n Result.Top := ptr.Top;\r\n Result.Left := nr.Left;\r\n Result.Right := ptr.Left;\r\n Result.Bottom := nr.Bottom;\r\nend;\r\n\r\nfunction TTMSFNCCustomTreeView.GetGroupBottomRightEmptyRect: TRectF;\r\nvar\r\n ptr, nr: TRectF;\r\nbegin\r\n ptr := GetGroupsBottomRect;\r\n nr := LocalRect;\r\n Result.Top := ptr.Top;\r\n Result.Left := ptr.Right;\r\n Result.Right := nr.Right;\r\n Result.Bottom := ptr.Bottom;\r\nend;\r\n\r\nfunction TTMSFNCCustomTreeView.GetGroupsBottomRect: TRectF;\r\nbegin\r\n Result := GetColumnsBottomRect;\r\n Result.Top := Result.Bottom;\r\n Result.Bottom := Result.Top + GetGroupsBottomSize\r\nend;\r\n\r\nfunction TTMSFNCCustomTreeView.GetGroupsBottomSize: Double;\r\nbegin\r\n Result := 0;\r\n if (tglBottom in GroupsAppearance.Layouts) and (DisplayGroups.Count > 0) and (ColumnCount > 0) then\r\n Result := GroupsAppearance.BottomSize;\r\nend;\r\n\r\nfunction TTMSFNCCustomTreeView.GetGroupsTopRect: TRectF;\r\nbegin\r\n Result := GetColumnsTopRect;\r\n Result.Bottom := Result.Top;\r\n Result.Top := Result.Top - GetGroupsTopSize;\r\nend;\r\n\r\nfunction TTMSFNCCustomTreeView.GetGroupsTopSize: Double;\r\nbegin\r\n Result := 0;\r\n if (tglTop in GroupsAppearance.Layouts) and (DisplayGroups.Count > 0) and (ColumnCount > 0) then\r\n Result := GroupsAppearance.TopSize;\r\nend;\r\n\r\nfunction TTMSFNCCustomTreeView.GetGroupText(AGroup: Integer): String;\r\nbegin\r\n Result := TranslateTextEx(sTMSFNCTreeViewGroup) + ' ' + inttostr(AGroup);\r\n if (AGroup >= 0) and (AGroup <= Groups.Count - 1) then\r\n Result := TTMSFNCTreeViewGroupOpen(Groups[AGroup]).GetText;\r\nend;\r\n\r\nfunction TTMSFNCCustomTreeView.GetGroupTopLeftEmptyRect: TRectF;\r\nvar\r\n ptr, nr: TRectF;\r\nbegin\r\n ptr := GetGroupsTopRect;\r\n nr := LocalRect;\r\n Result.Top := ptr.Top;\r\n Result.Left := nr.Left;\r\n Result.Right := ptr.Left;\r\n Result.Bottom := ptr.Bottom;\r\nend;\r\n\r\nfunction TTMSFNCCustomTreeView.GetGroupTopRightEmptyRect: TRectF;\r\nvar\r\n ptr, nr: TRectF;\r\nbegin\r\n ptr := GetGroupsTopRect;\r\n nr := LocalRect;\r\n Result.Top := ptr.Top;\r\n Result.Left := ptr.Right;\r\n Result.Right := nr.Right;\r\n Result.Bottom := ptr.Bottom;\r\nend;\r\n\r\nfunction TTMSFNCCustomTreeView.GetHTMLTemplate(AColumnIndex: Integer): string;\r\nbegin\r\n if (AColumnIndex >= 0) and (AColumnIndex < Columns.Count) then\r\n Result := Columns[AColumnIndex].HTMLTemplate\r\n else\r\n Result := '';\r\nend;\r\n\r\nfunction TTMSFNCCustomTreeView.GetInplaceEditor: TTMSFNCTreeViewInplaceEditor;\r\nbegin\r\n Result := FInplaceEditor;\r\nend;\r\n\r\nfunction TTMSFNCCustomTreeView.GetInplaceEditorRect(\r\n ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer): TRectF;\r\nvar\r\n cr, r: TRectF;\r\nbegin\r\n Result := RectF(0, 0, 0, 0);\r\n if not Assigned(ANode) then\r\n Exit;\r\n\r\n if (AColumn >= 0) and (AColumn <= Length(ANode.TextRects) - 1) then\r\n begin\r\n r := ANode.TextRects[AColumn];\r\n {$IFDEF CMNLIB}\r\n InflateRectEx(r, ScalePaintValue(-2), ScalePaintValue(-2));\r\n {$ENDIF}\r\n cr := GetContentClipRect;\r\n r.Top := Max(r.Top, cr.Top);\r\n r.Bottom := Min(r.Bottom, cr.Bottom);\r\n r.Left := Max(r.Left, cr.Left);\r\n r.Right := Min(r.Right, cr.Right);\r\n Result := RectF(Floor(r.Left), Floor(r.Top), Round(r.Right), Round(r.Bottom));\r\n\r\n if Assigned(OnGetInplaceEditorRect) then\r\n OnGetInplaceEditorRect(Self, ANode, AColumn, FInplaceEditor, Result);\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCCustomTreeView.GetColumnsBottomRect: TRectF;\r\nvar\r\n nr: TRectF;\r\nbegin\r\n nr := inherited GetContentRect;\r\n Result.Left := nr.Left;\r\n Result.Top := nr.Bottom - GetGroupsBottomSize - GetColumnsBottomSize;\r\n Result.Right := nr.Right + GetColumnsExtraSize;\r\n Result.Bottom := nr.Bottom - GetGroupsBottomSize;\r\nend;\r\n\r\nfunction TTMSFNCCustomTreeView.GetColumnsBottomSize: Double;\r\nbegin\r\n Result := 0;\r\n if (tclBottom in ColumnsAppearance.Layouts) and (ColumnCount > 0) then\r\n Result := ColumnsAppearance.BottomSize;\r\nend;\r\n\r\nfunction TTMSFNCCustomTreeView.GetColumnsExtraSize: Double;\r\nbegin\r\n Result := 0;\r\nend;\r\n\r\nfunction TTMSFNCCustomTreeView.GetColumnTopLeftEmptyRect: TRectF;\r\nvar\r\n ptr, nr: TRectF;\r\nbegin\r\n ptr := GetColumnsTopRect;\r\n nr := LocalRect;\r\n Result.Top := ptr.Top;\r\n Result.Left := nr.Left;\r\n Result.Right := ptr.Left;\r\n Result.Bottom := ptr.Bottom;\r\nend;\r\n\r\nfunction TTMSFNCCustomTreeView.GetColumnTopRightEmptyRect: TRectF;\r\nvar\r\n ptr, nr: TRectF;\r\nbegin\r\n ptr := GetColumnsTopRect;\r\n nr := LocalRect;\r\n Result.Top := ptr.Top;\r\n Result.Left := ptr.Right;\r\n Result.Right := nr.Right - 1;\r\n Result.Bottom := ptr.Bottom;\r\nend;\r\n\r\nfunction TTMSFNCCustomTreeView.GetVersion: string;\r\nbegin\r\n Result := GetVersionNumber(MAJ_VER, MIN_VER, REL_VER, BLD_VER);\r\nend;\r\n\r\nfunction TTMSFNCCustomTreeView.GetVisibleNodeCount: Integer;\r\nvar\r\n f, l: TTMSFNCTreeViewVirtualNode;\r\nbegin\r\n Result := 0;\r\n f := GetFirstVisibleVirtualNode;\r\n l := GetLastVisibleVirtualNode;\r\n if Assigned(f) and Assigned(l) then\r\n Result := l.Row - f.Row;\r\nend;\r\n\r\nfunction TTMSFNCCustomTreeView.GetColumnsTopRect: TRectF;\r\nvar\r\n nr: TRectF;\r\nbegin\r\n nr := inherited GetContentRect;\r\n Result.Left := nr.Left;\r\n Result.Top := nr.Top + GetGroupsTopSize;\r\n Result.Right := nr.Right + GetColumnsExtraSize;\r\n Result.Bottom := nr.Top + GetGroupsTopSize + GetColumnsTopSize;\r\nend;\r\n\r\nfunction TTMSFNCCustomTreeView.GetColumnsTopSize: Double;\r\nbegin\r\n Result := 0;\r\n if (tclTop in ColumnsAppearance.Layouts) and (ColumnCount > 0) then\r\n Result := ColumnsAppearance.TopSize;\r\nend;\r\n\r\nfunction TTMSFNCCustomTreeView.GetColumnText(AColumn: Integer): String;\r\nbegin\r\n Result := TranslateTextEx(sTMSFNCTreeViewColumn) + ' ' + inttostr(AColumn);\r\n if (AColumn >= 0) and (AColumn <= ColumnCount - 1) then\r\n begin\r\n if (AColumn >= 0) and (AColumn <= Columns.Count - 1) then\r\n begin\r\n Result := Columns[AColumn].Text;\r\n if Result = '' then\r\n Result := Columns[AColumn].Name;\r\n end;\r\n\r\n if Result = '' then\r\n Result := TranslateTextEx(sTMSFNCTreeViewColumn) + ' ' + inttostr(AColumn);\r\n end;\r\n\r\n if Assigned(Adapter) then\r\n Result := Adapter.GetColumnDisplayName(AColumn);\r\nend;\r\n\r\nfunction TTMSFNCCustomTreeView.GetPreviousFocusableNode(ANode: TTMSFNCTreeViewVirtualNode): TTMSFNCTreeViewVirtualNode;\r\nvar\r\n en: Boolean;\r\nbegin\r\n if Assigned(ANode) then\r\n Result := GetPreviousVirtualNode(ANode)\r\n else\r\n Result := GetLastVirtualNode;\r\n\r\n en := IsVirtualNodeSelectable(Result);\r\n\r\n while Assigned(Result) and not en do\r\n begin\r\n Result := GetPreviousVirtualNode(Result);\r\n en := IsVirtualNodeSelectable(Result);\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.GetNodeMargins(var ALeft, ATop, ARight, ABottom: Single);\r\nbegin\r\n\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.GetNodeOffset(ANode: TTMSFNCTreeViewVirtualNode;\r\n var ALeft, ATop, ARight, ABottom: Single);\r\nbegin\r\n\r\nend;\r\n\r\nfunction TTMSFNCCustomTreeView.GetNodesRect: TRectF;\r\nbegin\r\n Result := GetContentRect;\r\nend;\r\n\r\nfunction TTMSFNCCustomTreeView.GetNodesSpacing(ANode: TTMSFNCTreeViewVirtualNode): Single;\r\nbegin\r\n Result := NodesAppearance.Spacing;\r\nend;\r\n\r\nfunction TTMSFNCCustomTreeView.GetNodesFromClipboard: TTMSFNCTreeViewCopyNodes;\r\nvar\r\n s: String;\r\n a: TStringList;\r\n ANode, ANextNode: TTMSFNCTreeViewNode;\r\n ALevel: Integer;\r\n I, off: Integer;\r\n CurrStr: String;\r\n tempt: TTMSFNCCustomTreeView;\r\nbegin\r\n if TTMSFNCClipBoard.HasFormat(TTMSFNCClipBoardFormat.cfText) then\r\n begin\r\n s := TTMSFNCClipBoard.GetText;\r\n if (Pos(CLP_FMT, s) > 0) then\r\n begin\r\n tempt := TTMSFNCCustomTreeView.Create(nil);\r\n a := TStringList.Create;\r\n try\r\n s := StringReplace(s, CLP_FMT, '', [rfReplaceAll]);\r\n a.Text := s;\r\n try\r\n ANode := nil;\r\n off := 0;\r\n for I := 0 to a.Count - 1 do\r\n begin\r\n ALevel := -1;\r\n CurrStr := GetBufStart(a[i], ALevel);\r\n\r\n if ANode = nil then\r\n begin\r\n ANode := tempt.AddNode;\r\n off := ALevel;\r\n end\r\n else if Assigned(ANode.VirtualNode) and (ANode.VirtualNode.Level = ALevel - off) then\r\n ANode := tempt.AddNode(ANode.GetParent)\r\n else if Assigned(ANode.VirtualNode) and (ANode.VirtualNode.Level = ALevel - 1 - off) then\r\n ANode := tempt.AddNode(ANode)\r\n else if Assigned(ANode.VirtualNode) and (ANode.VirtualNode.Level > ALevel - off) then\r\n begin\r\n ANextNode := ANode.GetParent;\r\n while Assigned(ANextNode) and Assigned(ANextNode.VirtualNode) and (ANextNode.VirtualNode.Level > ALevel - off) do\r\n ANextNode := ANextNode.GetParent;\r\n ANode := tempt.AddNode(ANextNode.GetParent);\r\n end;\r\n\r\n if Assigned(ANode) then\r\n ANode.LoadFromString(CurrStr);\r\n end;\r\n finally\r\n end;\r\n finally\r\n FCopyNodes.Assign(tempt.Nodes);\r\n a.Free;\r\n tempt.Free;\r\n end;\r\n end;\r\n end;\r\n\r\n Result := FCopyNodes;\r\nend;\r\n\r\nfunction TTMSFNCCustomTreeView.GetNextFocusableNode(\r\n ANode: TTMSFNCTreeViewVirtualNode): TTMSFNCTreeViewVirtualNode;\r\nvar\r\n en: Boolean;\r\nbegin\r\n if Assigned(ANode) then\r\n Result := GetNextVirtualNode(ANode)\r\n else\r\n Result := GetFirstRootVirtualNode;\r\n\r\n en := IsVirtualNodeSelectable(Result);\r\n\r\n while Assigned(Result) and not en do\r\n begin\r\n Result := GetNextVirtualNode(Result);\r\n en := IsVirtualNodeSelectable(Result);\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCCustomTreeView.GetReloadOffset: Single;\r\nbegin\r\n Result := 0;\r\nend;\r\n\r\nfunction TTMSFNCCustomTreeView.GetRowHeight(ARow: Integer): Double;\r\nvar\r\n v: TTMSFNCTreeViewVirtualNode;\r\nbegin\r\n v := GetVisibleNodeForIndex(ARow);\r\n Result := GetDefaultRowHeight(v);\r\n if Assigned(v) and (v.Calculated) then\r\n Result := v.Height;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.HorizontalScrollPositionChanged;\r\nbegin\r\n BlockScrollingUpdate := True;\r\n UpdateDisplay;\r\n BlockScrollingUpdate := False;\r\n DoHScroll(GetHScrollValue);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.Clear;\r\nbegin\r\n BeginUpdate;\r\n ClearNodes;\r\n ClearColumns;\r\n ClearSorting;\r\n EndUpdate;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.ClearSorting;\r\nvar\r\n I: Integer;\r\nbegin\r\n BeginUpdate;\r\n FSortColumn := -1;\r\n for I := 0 to Columns.Count - 1 do\r\n begin\r\n TTMSFNCTreeViewColumnOpen(Columns[I]).SortKind := nskNone;\r\n TTMSFNCTreeViewColumnOpen(Columns[I]).SortIndex := -1;\r\n end;\r\n EndUpdate;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.Sort(AColumn: Integer = 0; ARecurse: Boolean = False; ACaseSensitive: Boolean = True; ASortingMode: TTMSFNCTreeViewNodesSortMode = nsmAscending; AClearNodeList: Boolean = True);\r\nbegin\r\n Nodes.Sort(AColumn, ARecurse, ACaseSensitive, ASortingMode, AClearNodeList);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.InitializeColumnSorting(AColumn: Integer; ASortMode: TTMSFNCTreeViewNodesSortMode);\r\nvar\r\n I: Integer;\r\nbegin\r\n UpdateCount := UpdateCount + 1;\r\n FSortColumn := AColumn;\r\n for I := 0 to Columns.Count - 1 do\r\n begin\r\n case ASortMode of\r\n nsmAscending: Columns[I].SortKind := nskAscending;\r\n nsmDescending: Columns[I].SortKind := nskDescending;\r\n end;\r\n end;\r\n UpdateCount := UpdateCount - 1;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.InitSample;\r\nvar\r\n pManagers, pSpecialists, pAssistants, pSub: TTMSFNCTreeViewNode;\r\n c: TTMSFNCTreeViewColumn;\r\n I: Integer;\r\n n: string;\r\nbegin\r\n BeginUpdate;\r\n\r\n Width := ScalePaintValue(350);\r\n\r\n ClearNodeList;\r\n Columns.Clear;\r\n Nodes.Clear;\r\n\r\n ResetToDefaultStyle;\r\n\r\n NodesAppearance.ExpandWidth := ScalePaintValue(18);\r\n NodesAppearance.ExpandHeight := ScalePaintValue(18);\r\n\r\n// {$IFNDEF WEBLIB}\r\n// NodesAppearance.CollapseNodeIcon.LoadFromResource('TTMSFNCTREEVIEWCOLLAPSENEWSVG');\r\n// NodesAppearance.ExpandNodeIcon.LoadFromResource('TTMSFNCTREEVIEWEXPANDNEWSVG');\r\n// NodesAppearance.CollapseNodeIconLarge.LoadFromResource('TTMSFNCTREEVIEWCOLLAPSENEWSVG');\r\n// NodesAppearance.ExpandNodeIconLarge.LoadFromResource('TTMSFNCTREEVIEWEXPANDNEWSVG');\r\n// {$ENDIF}\r\n\r\n ColumnsAppearance.TopSize := ScalePaintValue(36);\r\n ColumnsAppearance.TopStroke.Kind := gskNone;\r\n NodesAppearance.SelectedStroke.Width := Trunc(ScalePaintValue(2.0));\r\n\r\n c := Columns.Add;\r\n c.Text := 'Name';\r\n c.HorizontalTextAlign := gtaLeading;\r\n\r\n c := Columns.Add;\r\n c.Text := 'Unit';\r\n c.HorizontalTextAlign := gtaTrailing;\r\n c.Width := ScalePaintValue(90);\r\n\r\n c := Columns.Add;\r\n c.Text := 'Status';\r\n c.HorizontalTextAlign := gtaCenter;\r\n c.Width := ScalePaintValue(80);\r\n\r\n pManagers := AddNode;\r\n pManagers.Text[0] := 'Managers';\r\n\r\n pSpecialists := AddNode;\r\n pSpecialists.Text[0] := 'Specialists';\r\n\r\n pAssistants := AddNode;\r\n pAssistants.Text[0] := 'Assistants';\r\n\r\n for I := 0 to 7 do\r\n begin\r\n if I < 3 then\r\n pSub := AddNode(pManagers)\r\n else if I < 5 then\r\n pSub := AddNode(pSpecialists)\r\n else\r\n pSub := AddNode(pAssistants);\r\n\r\n case Random(125) mod 7 of\r\n 0: n := 'Liam';\r\n 1: n := 'Fatma';\r\n 2: n := 'Yusuf';\r\n 3: n := 'Marie';\r\n 4: n := 'Isabella';\r\n 5: n := 'Omar';\r\n else\r\n n := 'Arthur';\r\n end;\r\n\r\n case Random(125) mod 7 of\r\n 0: n := n + ' Andersson';\r\n 1: n := n + ' Wang';\r\n 2: n := n + ' Smith';\r\n 3: n := n + ' Peeters';\r\n 4: n := n + ' Gonzales';\r\n 5: n := n + ' Moyo';\r\n else\r\n n := n + ' Ali';\r\n end;\r\n\r\n pSub.Text[0] := n;\r\n\r\n case Random(120) mod 7 of\r\n 1: pSub.Text[1] := 'Research';\r\n 2: pSub.Text[1] := 'Finance';\r\n 3: pSub.Text[1] := 'Manufactering';\r\n 4: pSub.Text[1] := 'Sales';\r\n 5: pSub.Text[1] := 'HR';\r\n 6: pSub.Text[1] := 'Marketing';\r\n else\r\n pSub.Text[1] := 'Customers';\r\n end;\r\n\r\n case Random(120) mod 5 of\r\n 0: pSub.Text[2] := 'Flight';\r\n 1: pSub.Text[2] := 'On Leave';\r\n 2: pSub.Text[2] := 'Abroad';\r\n else\r\n pSub.Text[2] := 'Office';\r\n end;\r\n end;\r\n\r\n pManagers.Expanded := True;\r\n pSpecialists.Expanded := True;\r\n\r\n GlobalFont.Name := 'Segoe UI';\r\n\r\n ColumnsAppearance.StretchAll := False;\r\n ColumnsAppearance.Stretch := True;\r\n ColumnsAppearance.StretchColumn := 0;\r\n\r\n EndUpdate;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.InternalSelectVirtualNode(\r\n ANode: TTMSFNCTreeViewVirtualNode);\r\nbegin\r\n\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.HandleKeyDown(var Key: Word; Shift: TShiftState);\r\nvar\r\n sel, prevsel, fsel: TTMSFNCTreeViewVirtualNode;\r\n sa, spc, donext, doprev: Boolean;\r\n r: Integer;\r\n I: Integer;\r\n b: Boolean;\r\n a: Boolean;\r\n n: TTMSFNCTreeViewVirtualNode;\r\nbegin\r\n inherited;\r\n if FInplaceEditorClosed or BlockUserInput then\r\n Exit;\r\n\r\n if Key in [KEY_ESCAPE,KEY_INSERT,KEY_DELETE,KEY_UP,KEY_DOWN,KEY_LEFT,KEY_RIGHT,KEY_HOME,KEY_END,\r\n KEY_PRIOR,KEY_NEXT,KEY_TAB,KEY_MULTIPLY,KEY_SUBTRACT,KEY_ADD,KEY_DIVIDE] then\r\n FLookupString := '';\r\n\r\n if (ssCtrl in Shift) or (ssCommand in Shift) then\r\n begin\r\n case Key of\r\n Ord('A'):\r\n begin\r\n if Interaction.MultiSelect then\r\n begin\r\n sa := True;\r\n DoBeforeSelectAllNodes(sa);\r\n if sa then\r\n begin\r\n SelectAllNodes;\r\n DoAfterSelectAllNodes;\r\n end;\r\n end;\r\n Exit;\r\n end;\r\n Ord('X'):\r\n begin\r\n if Interaction.ClipboardMode <> tcmNone then\r\n begin\r\n b := True;\r\n DoBeforeCutToClipboard(b);\r\n if b then\r\n begin\r\n CutToClipboard(Interaction.ClipboardMode = tcmTextOnly);\r\n DoAfterCutToClipboard;\r\n end;\r\n end;\r\n Exit;\r\n end;\r\n Ord('C'):\r\n begin\r\n if Interaction.ClipboardMode <> tcmNone then\r\n begin\r\n b := True;\r\n DoBeforeCopyToClipboard(b);\r\n if b then\r\n begin\r\n CopyToClipboard(Interaction.ClipboardMode = tcmTextOnly);\r\n DoAfterCopyToClipboard;\r\n end;\r\n end;\r\n Exit;\r\n end;\r\n Ord('V'):\r\n begin\r\n if Interaction.ClipboardMode <> tcmNone then\r\n begin\r\n b := True;\r\n DoBeforePasteFromClipboard(b);\r\n if b then\r\n begin\r\n PasteFromClipboard;\r\n DoAfterPasteFromClipboard;\r\n end;\r\n end;\r\n Exit;\r\n end;\r\n end;\r\n end;\r\n\r\n sel := FocusedVirtualNode;\r\n donext := False;\r\n doprev := False;\r\n case Key of\r\n KEY_MENU, KEY_CONTROL, KEY_SHIFT: sel := nil;\r\n KEY_PRIOR:\r\n begin\r\n doprev := True;\r\n if Assigned(sel) then\r\n begin\r\n r := sel.Row - (StopRow - StartRow);\r\n sel := GetNodeFromNodeStructure(r);\r\n if Assigned(sel) then\r\n begin\r\n if not IsVirtualNodeSelectable(sel) then\r\n sel := GetPreviousFocusableNode(sel);\r\n end;\r\n\r\n if not Assigned(sel) then\r\n sel := GetNextFocusableNode(nil);\r\n end;\r\n end;\r\n KEY_NEXT:\r\n begin\r\n donext := True;\r\n if Assigned(sel) then\r\n begin\r\n r := sel.Row + (StopRow - StartRow);\r\n sel := GetNodeFromNodeStructure(r);\r\n if Assigned(sel) then\r\n begin\r\n if not IsVirtualNodeSelectable(sel) then\r\n sel := GetNextFocusableNode(sel);\r\n end;\r\n\r\n if not Assigned(sel) then\r\n sel := GetPreviousFocusableNode(nil);\r\n end;\r\n end;\r\n KEY_HOME:\r\n begin\r\n sel := GetNextFocusableNode(nil);\r\n doprev := True;\r\n end;\r\n KEY_END:\r\n begin\r\n sel := GetPreviousFocusableNode(nil);\r\n doprev := True\r\n end;\r\n KEY_DOWN:\r\n begin\r\n if not Interaction.MultiSelect or (Interaction.MultiSelect and not ((msSiblingOnly in Interaction.MultiSelectStyle) and (ssCtrl in Shift))) then\r\n begin\r\n sel := GetNextFocusableNode(sel);\r\n donext := True;\r\n end;\r\n end;\r\n KEY_UP:\r\n begin\r\n if not (msSiblingOnly in Interaction.MultiSelectStyle) or not Interaction.MultiSelect or not (ssCtrl in Shift) then\r\n begin\r\n sel := GetPreviousFocusableNode(sel);\r\n doprev := True;\r\n end;\r\n end;\r\n KEY_LEFT, KEY_SUBTRACT, KEY_DIVIDE: HandleNodeCollapse(sel, KEY = KEY_DIVIDE);\r\n KEY_RIGHT, KEY_ADD, KEY_MULTIPLY: HandleNodeExpand(sel, KEY = KEY_MULTIPLY);\r\n KEY_SPACE: DoNodeClick(sel);\r\n end;\r\n\r\n case Key of\r\n KEY_LEFT, KEY_RIGHT: HandleCustomKeys(Key);\r\n end;\r\n\r\n spc := False;\r\n if (Key = KEY_SPACE) then\r\n spc := True;\r\n\r\n if Assigned(sel) then\r\n begin\r\n if (Interaction.SelectionFollowsFocus and (donext or doprev)) or (spc and ((ssCtrl in Shift) or (ssCommand in Shift))) then\r\n begin\r\n if (ssShift in Shift) then\r\n begin\r\n if (FSelectedNodes.Count > 1) then\r\n begin\r\n prevsel := FSelectedNodes[FSelectedNodes.Count - 1];\r\n fsel := FSelectedNodes[0];\r\n if (doprev and (sel.Row < prevsel.Row) and (sel.Row >= fsel.Row)) or (donext and (sel.Row > prevsel.Row) and (sel.Row <= fsel.Row)) then\r\n begin\r\n if prevsel.Row <= sel.Row then\r\n begin\r\n for I := prevsel.Row to sel.Row do\r\n begin\r\n n := GetNodeFromNodeStructure(I);\r\n if Assigned(n) then\r\n begin\r\n if n <> sel then\r\n begin\r\n a := True;\r\n DoBeforeUnSelectNode(n, a);\r\n if a then\r\n begin\r\n UnSelectVirtualNode(n);\r\n DoAfterUnSelectNode(n);\r\n end;\r\n end\r\n else\r\n UnSelectVirtualNode(n);\r\n end;\r\n end;\r\n end\r\n else\r\n begin\r\n for I := prevsel.Row downto sel.Row do\r\n begin\r\n n := GetNodeFromNodeStructure(I);\r\n if Assigned(n) then\r\n begin\r\n if n <> sel then\r\n begin\r\n a := True;\r\n DoBeforeUnSelectNode(n, a);\r\n if a then\r\n begin\r\n UnSelectVirtualNode(n);\r\n DoAfterUnSelectNode(n);\r\n end;\r\n end\r\n else\r\n UnSelectVirtualNode(n);\r\n end;\r\n end;\r\n end;\r\n end;\r\n end;\r\n end\r\n else if not (ssCtrl in Shift) and not (ssCommand in Shift) and (donext or doprev) and (FSelectedNodes.Count > 0) then\r\n begin\r\n a := True;\r\n DoBeforeUnSelectNode(sel, a);\r\n if a then\r\n begin\r\n UnSelectVirtualNode(sel);\r\n DoAfterUnSelectNode(sel);\r\n end;\r\n end;\r\n\r\n if (ssShift in Shift) then\r\n begin\r\n if Assigned(FFocusedNode) then\r\n begin\r\n if FFocusedNode.Row <= sel.Row then\r\n begin\r\n for I := FFocusedNode.Row + 1 to sel.Row do\r\n HandleSelectNode(GetNodeFromNodeStructure(I), True, True, {$IFNDEF FMXMOBILE}(ssShift in Shift) and {$ENDIF} Interaction.MultiSelect);\r\n end\r\n else\r\n begin\r\n for I := FFocusedNode.Row - 1 downto sel.Row do\r\n HandleSelectNode(GetNodeFromNodeStructure(I), True, True, {$IFNDEF FMXMOBILE}(ssShift in Shift) and {$ENDIF} Interaction.MultiSelect);\r\n end;\r\n end;\r\n end\r\n else\r\n HandleSelectNode(sel, True, True, {$IFNDEF FMXMOBILE}((ssCtrl in Shift) or (ssCommand in Shift)) and {$ENDIF} Interaction.MultiSelect);\r\n end\r\n else if spc then\r\n HandleNodeToggleCheck(sel, 0);\r\n\r\n if FFocusedNode <> sel then\r\n begin\r\n FFocusedNode := sel;\r\n DoFocusedNodeChanged(FFocusedNode);\r\n end;\r\n\r\n if donext then\r\n ScrollToVirtualNode(FFocusedNode, True, tvnspBottom)\r\n else\r\n ScrollToVirtualNode(FFocusedNode, True, tvnspTop);\r\n Invalidate;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.HandleKeyPress(var Key: Char);\r\nvar\r\n k: Integer;\r\nbegin\r\n inherited;\r\n if BlockUserInput then\r\n Exit;\r\n\r\n k := Ord(Key);\r\n\r\n if Interaction.Lookup.Enabled then\r\n begin\r\n if k in [KEY_ESCAPE,KEY_INSERT,KEY_DELETE,KEY_UP,KEY_DOWN,KEY_LEFT,KEY_RIGHT,KEY_HOME,KEY_END,KEY_PRIOR,KEY_NEXT,KEY_TAB, 0] then\r\n FLookupString := ''\r\n else\r\n begin\r\n if Interaction.Lookup.Incremental then\r\n FLookupString := FLookupString + Key\r\n else\r\n FLookupString := Key;\r\n\r\n if Assigned(OnCustomLookup) then\r\n OnCustomLookup(Self, FLookupString)\r\n else\r\n begin\r\n LookupNode(FLookupString, Interaction.Lookup.RootNodesOnly, Interaction.Lookup.Column,\r\n Interaction.Lookup.CaseSensitive, Interaction.Lookup.AutoSelect, Interaction.Lookup.AutoExpand);\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.HandleKeyUp(var Key: Word; Shift: TShiftState);\r\nvar\r\n en, ext: Boolean;\r\n c: Integer;\r\nbegin\r\n inherited;\r\n if BlockUserInput then\r\n Exit;\r\n\r\n if FInplaceEditorClosed then\r\n begin\r\n FInplaceEditorClosed := False;\r\n Exit;\r\n end;\r\n\r\n if FCloseWithDialogKey then\r\n begin\r\n FCloseWithDialogKey := False;\r\n Exit;\r\n end;\r\n\r\n if Assigned(FFocusedNode) then\r\n begin\r\n if not FCompactMode and Interaction.KeyboardEdit and not Interaction.ReadOnly and (Shift = []) then\r\n begin\r\n case Key of\r\n KEY_F2, KEY_RETURN:\r\n begin\r\n en := True;\r\n DoIsNodeEnabled(FFocusedNode, en);\r\n if en then\r\n begin\r\n ext := False;\r\n DoIsNodeExtended(FFocusedNode, ext);\r\n if (ext and Interaction.ExtendedSelectable and Interaction.ExtendedEditable) or not ext then\r\n begin\r\n c := GetFirstEditableColumn;\r\n if (c <> -1) and FFocusedNode.TitleExpanded[c] then\r\n HandleNodeEditing(FFocusedNode, c);\r\n end;\r\n end;\r\n end;\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.Draw(AGraphics: TTMSFNCGraphics; ARect: TRectF);\r\nvar\r\n st: TTMSFNCGraphicsSaveState;\r\nbegin\r\n inherited;\r\n {$IFDEF WEBLIB}\r\n if UpdateCount > 0 then\r\n Exit;\r\n {$ENDIF}\r\n\r\n AGraphics.BitmapContainer := BitmapContainer;\r\n DrawEmptySpaces(AGraphics);\r\n st := AGraphics.SaveState;\r\n AGraphics.ClipRect(GetContentClipRect);\r\n DrawNodeColumns(AGraphics);\r\n AGraphics.RestoreState(st);\r\n DrawNodes(AGraphics);\r\n DrawColumns(AGraphics);\r\n DrawGroups(AGraphics);\r\n DrawBorders(AGraphics);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.ResetNodes(AUpdateAll: Boolean = True);\r\nvar\r\n I: Integer;\r\n v: TTMSFNCTreeViewVirtualNode;\r\n st, stp: Integer;\r\nbegin\r\n if Assigned(VisibleNodes) then\r\n begin\r\n if AUpdateAll then\r\n begin\r\n st := 0;\r\n stp := RowCount - 1;\r\n end\r\n else\r\n begin\r\n st := StartRow;\r\n stp := StopRow;\r\n end;\r\n\r\n for I := st to stp do\r\n begin\r\n v := GetVisibleNodeForIndex(I);\r\n if Assigned(v) then\r\n begin\r\n TotalRowHeight := TotalRowHeight - v.Height + GetDefaultRowHeight(v);\r\n UpdateNodeHeight(v, GetDefaultRowHeight(v));\r\n UpdateNodeCalculated(v, False);\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.ResetToDefaultStyle;\r\nbegin\r\n BeginUpdate;\r\n\r\n TTMSFNCUtils.SetFontSize(ColumnsAppearance.TopFont, 14);\r\n ColumnsAppearance.TopFont.Style := [TFontStyle.fsBold];\r\n {$IFDEF FMXLIB}\r\n ColumnsAppearance.TopFill.Color := $FFEEF2F9;\r\n ColumnsAppearance.TopFont.Color := $FF454545;\r\n NodesAppearance.SelectedFill.Color := $FFF6F8FC;\r\n NodesAppearance.SelectedStroke.Color := $FF2D9BEF;\r\n NodesAppearance.Font.Color := $FF7A7A7A;\r\n NodesAppearance.SelectedFontColor := $FF454545;\r\n NodesAppearance.SelectedStroke.Color := $FF2D9BEF;\r\n {$ENDIF}\r\n {$IFNDEF FMXLIB}\r\n ColumnsAppearance.TopFill.Color := $F9F2EE;\r\n ColumnsAppearance.TopFont.Color := $454545;\r\n NodesAppearance.SelectedFill.Color := $FCF8F6;\r\n NodesAppearance.SelectedStroke.Color := $EF9B2D;\r\n NodesAppearance.Font.Color := $7A7A7A;\r\n NodesAppearance.SelectedFontColor := $454545;\r\n NodesAppearance.SelectedStroke.Color := $EF9B2D;\r\n {$ENDIF}\r\n NodesAppearance.ShowFocus := False;\r\n NodesAppearance.ExpandWidth := ScalePaintValue(18);\r\n NodesAppearance.ExpandHeight := ScalePaintValue(18);\r\n\r\n NodesAppearance.ShowFocus := False;\r\n NodesAppearance.SelectedStroke.Width := Trunc(ScalePaintValue(2.0));\r\n\r\n ColumnsAppearance.TopSize := ScalePaintValue(36);\r\n ColumnsAppearance.TopStroke.Kind := gskNone;\r\n\r\n Fill.Kind := gfkSolid;\r\n Stroke.Kind := gskSolid;\r\n Fill.Color := gcWhite;\r\n Stroke.Color := gcDarkGray;\r\n NodesAppearance.ExtendedFill.Color := TTMSFNCTreeViewColorExtended;\r\n ColumnsAppearance.BottomFill.Color := ColumnsAppearance.TopFill.Color;\r\n ColumnsAppearance.TopStroke.Color := gcDarkGray;\r\n ColumnsAppearance.BottomStroke.Color := gcDarkgray;\r\n ColumnsAppearance.BottomFont.Color := ColumnsAppearance.TopFont.Color;\r\n GroupsAppearance.TopFill.Color := gcWhite;\r\n GroupsAppearance.BottomFill.Color := gcWhite;\r\n GroupsAppearance.TopStroke.Color := gcDarkGray;\r\n GroupsAppearance.BottomStroke.Color := gcDarkgray;\r\n GroupsAppearance.TopFont.Color := gcBlack;\r\n GroupsAppearance.BottomFont.Color := gcBlack;\r\n ColumnsAppearance.TopFill.Kind := gfkSolid;\r\n ColumnsAppearance.BottomFill.Kind := gfkNone;\r\n ColumnsAppearance.BottomStroke.Kind := gskSolid;\r\n GroupsAppearance.TopFill.Kind := gfkNone;\r\n GroupsAppearance.BottomFill.Kind := gfkNone;\r\n GroupsAppearance.TopStroke.Kind := gskSolid;\r\n GroupsAppearance.BottomStroke.Kind := gskSolid;\r\n NodesAppearance.ExtendedFontColor := ColumnsAppearance.TopFont.Color;\r\n ColumnsAppearance.BottomFont.Color := ColumnsAppearance.TopFont.Color;\r\n GroupsAppearance.TopFont.Color := ColumnsAppearance.TopFont.Color;\r\n GroupsAppearance.BottomFont.Color := ColumnsAppearance.TopFont.Color;\r\n\r\n EndUpdate;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.SetInteraction(const Value: TTMSFNCTreeViewInteraction);\r\nbegin\r\n if FInteraction <> Value then\r\n FInteraction.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.SetNodesAppearance(const Value: TTMSFNCTreeViewNodesAppearance);\r\nbegin\r\n if FNodesAppearance <> Value then\r\n FNodesAppearance.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.SetSelectedNode(\r\n const Value: TTMSFNCTreeViewNode);\r\nbegin\r\n if Assigned(Value) then\r\n SelectedVirtualNode := TTMSFNCTreeViewNodeOpen(Value).VirtualNode\r\n else\r\n SelectedVirtualNode := nil;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.SetSelectedVirtualNode(\r\n const Value: TTMSFNCTreeViewVirtualNode);\r\nbegin\r\n FocusedVirtualNode := Value;\r\n SelectVirtualNode(Value);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.SetSortColumn(const Value: Integer);\r\nbegin\r\n if FSortColumn <> Value then\r\n begin\r\n FSortColumn := Value;\r\n Invalidate;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.SetTopRow(const Value: Integer);\r\nbegin\r\n ScrollToVirtualNodeRow(Value, True, tvnspTop, True);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.SetVerticalOffset(AVerticalOffset: Single);\r\nbegin\r\n FVerticalOffsetTo := AVerticalOffset;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.SetGlobalFont( const Value: TTMSFNCAppearanceGlobalFont);\r\nbegin\r\n FGlobalFont.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.SetGroupsAppearance(\r\n const Value: TTMSFNCTreeViewGroupsAppearance);\r\nbegin\r\n if FGroupsAppearance <> Value then\r\n FGroupsAppearance.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.SetAdapter(const Value: TTMSFNCTreeViewAdapter);\r\nbegin\r\n if Assigned(Value) then\r\n Value.TreeView := Self;\r\n FAdapter := Value;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.SetColumnsAppearance(\r\n const Value: TTMSFNCTreeViewColumnsAppearance);\r\nbegin\r\n if FColumnsAppearance <> Value then\r\n FColumnsAppearance.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.SetColumnStroke(const Value: TTMSFNCGraphicsStroke);\r\nbegin\r\n if FColumnStroke <> Value then\r\n FColumnStroke.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.SetCompactMode(const Value: Boolean);\r\nbegin\r\n if FCompactMode <> Value then\r\n begin\r\n FCompactMode := Value;\r\n UpdateTreeView;\r\n end;\r\nend;\r\n\r\n{$IFDEF FNCLIB}\r\nprocedure TTMSFNCCustomTreeView.SetDefaultViewJSONOptions(const Value: TTMSFNCTreeViewViewJSONOptions);\r\nbegin\r\n FDefaultViewJSONOptions := Value;\r\nend;\r\n{$ENDIF}\r\n\r\nprocedure TTMSFNCCustomTreeView.SetFocusedNode(\r\n const Value: TTMSFNCTreeViewNode);\r\nbegin\r\n if Assigned(Value) then\r\n FocusedVirtualNode := TTMSFNCTreeViewNodeOpen(Value).VirtualNode\r\n else\r\n FocusedVirtualNode := nil;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.SetFocusedVirtualNode(\r\n const Value: TTMSFNCTreeViewVirtualNode);\r\nbegin\r\n FFocusedNode := Value;\r\n Invalidate;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.SetFonts(ASetType: TTMSFNCAppearanceGlobalFontType);\r\nbegin\r\n BeginUpdate;\r\n\r\n GlobalFont.ApplyChange(NodesAppearance.Font, ASetType);\r\n GlobalFont.ApplyChange(NodesAppearance.ExtendedFont, ASetType);\r\n GlobalFont.ApplyChange(NodesAppearance.TitleFont, ASetType);\r\n\r\n GlobalFont.ApplyChange(ColumnsAppearance.TopFont, ASetType);\r\n GlobalFont.ApplyChange(ColumnsAppearance.BottomFont, ASetType);\r\n\r\n GlobalFont.ApplyChange(GroupsAppearance.TopFont, ASetType);\r\n GlobalFont.ApplyChange(GroupsAppearance.BottomFont, ASetType);\r\n\r\n if ASetType = aftColor then\r\n begin\r\n NodesAppearance.SelectedFontColor := GlobalFont.Color;\r\n NodesAppearance.ExtendedFontColor := GlobalFont.Color;\r\n NodesAppearance.SelectedTitleFontColor := GlobalFont.Color;\r\n end;\r\n\r\n EndUpdate;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.StartReload;\r\nbegin\r\n FVerticalOffsetTo := GetReloadOffset;\r\n StartVerticalOffsetAnimation;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.StartVerticalOffsetAnimation;\r\nbegin\r\n FAnimateVerticalOffset := True;\r\n FAnimateTimer.Enabled := True;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.StopAnimationTimer;\r\nbegin\r\n FAnimateTimer.Enabled := False;\r\n FAnimating := False;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.StopEditing;\r\nbegin\r\n if FInplaceEditorActive then\r\n CloseInplaceEditor(False);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.UnSelectAllNodes;\r\nbegin\r\n UnSelectAllVirtualNodes;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.UnSelectAllVirtualNodes;\r\nbegin\r\n FSelectedNodes.Clear;\r\n Invalidate;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.UnSelectNode(ANode: TTMSFNCTreeViewNode);\r\nbegin\r\n if Assigned(ANode) then\r\n UnSelectVirtualNode(TTMSFNCTreeViewNodeOpen(ANode).VirtualNode);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.UnSelectNodes(ANodes: TTMSFNCTreeViewNodeArray);\r\nvar\r\n I: Integer;\r\n v: TTMSFNCTreeViewNode;\r\nbegin\r\n for I := 0 to Length(ANodes) - 1 do\r\n begin\r\n v := ANodes[I];\r\n if Assigned(v) then\r\n FSelectedNodes.Remove(TTMSFNCTreeViewNodeOpen(v).VirtualNode);\r\n end;\r\n Invalidate;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.UnSelectVirtualNode(\r\n ANode: TTMSFNCTreeViewVirtualNode);\r\nbegin\r\n FSelectedNodes.Remove(ANode);\r\n Invalidate;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.UnSelectVirtualNodes(\r\n ANodes: TTMSFNCTreeViewVirtualNodeArray);\r\nvar\r\n I: Integer;\r\n v: TTMSFNCTreeViewVirtualNode;\r\nbegin\r\n for I := 0 to Length(ANodes) - 1 do\r\n begin\r\n v := ANodes[I];\r\n FSelectedNodes.Remove(v);\r\n end;\r\n Invalidate;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.UpdateAutoSizing;\r\nbegin\r\n if ColumnsAppearance.Stretch then\r\n StretchColumn(ColumnsAppearance.StretchAll, ColumnsAppearance.StretchColumn);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.UpdateCalculations;\r\nbegin\r\n if (UpdateCount > 0) or (csDestroying in ComponentState) or (csLoading in ComponentState) then\r\n Exit;\r\n\r\n FOldTopRow := GetFirstVisibleVirtualNodeRow;\r\n\r\n ColumnCount := Columns.Count;\r\n\r\n if NodesAppearance.HeightMode = tnhmFixed then\r\n DefaultRowHeight := NodesAppearance.FixedHeight\r\n else\r\n DefaultRowHeight := NodesAppearance.VariableMinimumHeight;\r\n\r\n if (UpdateCount = 0) and not BlockUpdateNodeList and not ((csDestroying in ComponentState) or (csReading in ComponentState) or (csLoading in ComponentState)) then\r\n BuildNodeList;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.UpdateColumnRowCalculations(AUpdateTotalRowHeight: Boolean = True);\r\nvar\r\n I: Integer;\r\n r, c: Double;\r\n lm, tm, rm, bm: Single;\r\nbegin\r\n ColumnP.Clear;\r\n c := 0;\r\n ColumnPositions[0] := c;\r\n for I := 0 to ColumnCount - 1 do\r\n begin\r\n c := c + ColumnWidths[I];\r\n ColumnPositions[I + 1] := c;\r\n end;\r\n\r\n TotalColumnWidth := c;\r\n\r\n if AUpdateTotalRowHeight then\r\n begin\r\n lm := 0;\r\n tm := 0;\r\n rm := 0;\r\n bm := 0;\r\n GetNodeMargins(lm, tm, rm, bm);\r\n r := (RowCount * GetDefaultRowHeight(nil)) - GetNodesSpacing(nil);\r\n TotalRowHeight := r + 1 + tm + bm;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.UpdateDisplay;\r\nbegin\r\n inherited;\r\n UpdateNodesCache(False);\r\n UpdateGroupsDisplay;\r\n UpdateColumnsDisplay;\r\n Invalidate;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.UpdateNodesCache(AUpdateNodes: Boolean = True; AResetNodes: Boolean = False);\r\nbegin\r\n if BlockUpdateNode then\r\n Exit;\r\n\r\n UpdateScrollBars(True, False);\r\n UpdateVisualRange;\r\n UpdateNodeCache;\r\n UpdateScrollBars(True, False);\r\n\r\n {$IFDEF FMXLIB}\r\n FScrollBarTimer.Enabled := True;\r\n {$ENDIF}\r\n\r\n if AUpdateNodes then\r\n begin\r\n if AResetNodes then\r\n ResetNodes(False);\r\n\r\n UpdateAutoSizing;\r\n UpdateColumnRowCalculations(False);\r\n UpdateNodesCache(False);\r\n UpdateVisualRange;\r\n end\r\n else\r\n begin\r\n UpdateNodeDisplay;\r\n UpdateInplaceEditorPosition;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.UpdateTreeViewCache;\r\nbegin\r\n if (UpdateCount > 0) or IsDestroying then\r\n Exit;\r\n\r\n inherited;\r\n Invalidate;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.UpdateColumnsCache;\r\nbegin\r\n UpdateColumnCache(FColumnsTopCache);\r\n UpdateColumnCache(FColumnsBottomCache);\r\n UpdateColumnsDisplay;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.UpdateColumnCache(ACache: TTMSFNCTreeViewCache);\r\nvar\r\n w, h, bmpw, bmph, bw, bh: Double;\r\n rt: TRectF;\r\n c: Integer;\r\n dx: Double;\r\n offsetx, extrax: Double;\r\n ac: Integer;\r\n rc: TRectF;\r\n cnt: Integer;\r\nbegin\r\n inherited;\r\n if (UpdateCount > 0) or (csDestroying in ComponentState) or not Assigned(ACache) then\r\n Exit;\r\n\r\n ACache.Clear;\r\n\r\n if (ACache is TTMSFNCTreeViewColumnsTopCache) and (not (tclTop in ColumnsAppearance.Layouts) or (ColumnsAppearance.TopSize <= 0)) then\r\n Exit;\r\n\r\n if (ACache is TTMSFNCTreeViewColumnsBottomCache) and (not (tclBottom in ColumnsAppearance.Layouts) or (ColumnsAppearance.BottomSize <= 0)) then\r\n Exit;\r\n\r\n w := GetTotalColumnWidth;\r\n if ACache is TTMSFNCTreeViewColumnsTopCache then\r\n h := GetColumnsTopSize + 1\r\n else\r\n h := GetColumnsBottomSize + 1;\r\n\r\n extrax := GetColumnsExtraSize;\r\n offsetx := 0;\r\n bmpw := 0;\r\n bmph := 0;\r\n ac := 0;\r\n c := 0;\r\n dx := 0;\r\n\r\n cnt := ColumnCount - 1;\r\n\r\n while bmpw < w do\r\n begin\r\n bw := w;\r\n\r\n while bmph < h do\r\n begin\r\n bh := h;\r\n\r\n rt := RectF(0, 0, bw, bh);\r\n\r\n dx := rt.Left + offsetx;\r\n\r\n for c := ac to cnt do\r\n begin\r\n {$IFDEF FMXWEBLIB}\r\n rc.Top := int(rt.Top) + 0.5;\r\n rc.Bottom := int(rt.Bottom) - 0.5;\r\n rc.Left := int(dx) + 0.5;\r\n dx := dx + ColumnWidths[c] + extrax;\r\n if c = cnt then\r\n rc.Right := int(dx) - 0.5\r\n else\r\n rc.Right := int(dx) + 0.5;\r\n {$ENDIF}\r\n {$IFDEF CMNLIB}\r\n rc.Top := rt.Top;\r\n rc.Bottom := rt.Bottom;\r\n if c = ac then\r\n rc.Left := dx\r\n else\r\n rc.Left := dx;\r\n\r\n dx := dx + ColumnWidths[c] + extrax;\r\n if c = cnt then\r\n rc.Right := dx\r\n else\r\n rc.Right := dx + 1;\r\n {$ENDIF}\r\n\r\n OffsetRectEx(rc, bmpw, bmph);\r\n if ACache is TTMSFNCTreeViewColumnsTopCache then\r\n ACache.Add(TTMSFNCTreeViewCacheItem.CreateColumnTop(rc, c))\r\n else\r\n ACache.Add(TTMSFNCTreeViewCacheItem.CreateColumnBottom(rc, c));\r\n\r\n if dx > rt.Right - rt.Left then\r\n Break;\r\n end;\r\n\r\n bmph := bmph + bh;\r\n end;\r\n bmpw := bmpw + bw;\r\n bmph := 0;\r\n ac := c;\r\n offsetx := -ColumnWidths[c] - (bw - dx);\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.UpdateColumnsDisplay;\r\nbegin\r\n BuildDisplay(FColumnsTopCache, FColumnsTopDisplay);\r\n BuildDisplay(FColumnsBottomCache, FColumnsBottomDisplay);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.UpdateControlAfterResize;\r\nbegin\r\n inherited;\r\n if Assigned(Adapter) then\r\n Adapter.UpdateBounds;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.VerticalScrollPositionChanged;\r\nbegin\r\n BlockScrollingUpdate := True;\r\n UpdateDisplay;\r\n BlockScrollingUpdate := False;\r\n DoVScroll(GetVScrollValue);\r\nend;\r\n\r\nfunction TTMSFNCCustomTreeView.XYToCacheItem(X,\r\n Y: Double; OffsetX: Single = 0): TTMSFNCTreeViewCacheItem;\r\nvar\r\n I: Integer;\r\n dsp: TTMSFNCTreeViewCacheItem;\r\n r: TRectF;\r\nbegin\r\n Result := nil;\r\n if not Assigned(FNodeDisplay) then\r\n Exit;\r\n\r\n if not PtInRectEx(GetContentClipRect, PointF(X, Y)) then\r\n Exit;\r\n\r\n for I := 0 to FNodeDisplay.Count - 1 do\r\n begin\r\n dsp := FNodeDisplay[I];\r\n r := dsp.DrawRect;\r\n r.Left := r.Left + OffsetX;\r\n r.Right := r.Right + OffsetX;\r\n if PtInRectEx(r, PointF(X, Y)) then\r\n begin\r\n Result := dsp;\r\n Break;\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCCustomTreeView.XYToColumn(X, Y: Single; AIncludeRows: Boolean = False): Integer;\r\nvar\r\n I: Integer;\r\n topr: TRectF;\r\n r: TRectF;\r\n colw, colp: Double;\r\nbegin\r\n Result := -1;\r\n if AIncludeRows then\r\n topr := inherited GetContentRect\r\n else\r\n topr := GetColumnsTopRect;\r\n\r\n topr.Left := topr.Left - GetHorizontalScrollPosition;\r\n for I := ColumnCount - 1 downto 0 do\r\n begin\r\n if (I >= 0) and (I <= Columns.Count - 1) and Columns[I].Visible then\r\n begin\r\n colw := ColumnWidths[I] + GetColumnsExtraSize;\r\n if colw >= 0 then\r\n begin\r\n colp := ColumnPositions[I];\r\n r := RectF(topr.Left + colp, topr.Top, topr.Left + colp + colw, topr.Bottom);\r\n if PtInRectEx(r, PointF(X, Y)) then\r\n begin\r\n Result := I;\r\n Break;\r\n end;\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCCustomTreeView.XYToColumnAnchor(AX, AY: Single; var AIndex: Integer): string;\r\nbegin\r\n Result := XYToColumnAnchorCache(AX, AY, FColumnsTopCache, AIndex);\r\n if (Result = '') and (AIndex = -1) then\r\n Result := XYToColumnAnchorCache(AX, AY, FColumnsBottomCache, AIndex);\r\nend;\r\n\r\nfunction TTMSFNCCustomTreeView.XYToColumnAnchorCache(AX, AY: Single;\r\n ACache: TTMSFNCTreeViewColumnsCache; var AIndex: Integer): string;\r\nvar\r\n I: Integer;\r\n txtr: TRectF;\r\n a: String;\r\n r: TRectF;\r\n str: String;\r\n g: TTMSFNCGraphics;\r\n c: TTMSFNCTreeViewCacheItem;\r\n col: TTMSFNCTreeViewColumn;\r\n def: Boolean;\r\n trim: TTMSFNCGraphicsTextTrimming;\r\n ha, va: TTMSFNCGraphicsTextAlign;\r\n ww: Boolean;\r\n szt, szd, szr: Single;\r\nbegin\r\n Result := '';\r\n AIndex := -1;\r\n g := TTMSFNCGraphics.CreateBitmapCanvas;\r\n g.BeginScene;\r\n try\r\n g.BitmapContainer := BitmapContainer;\r\n for I := 0 to ACache.Count - 1 do\r\n begin\r\n c := ACache[I];\r\n\r\n col := nil;\r\n def := False;\r\n if (c.Column >= 0) and (c.Column <= Columns.Count - 1) then\r\n col := Columns[c.Column];\r\n\r\n r := c.DrawRect;\r\n szt := 0;\r\n\r\n if Assigned(col) then\r\n begin\r\n if col.Filtering.Enabled then\r\n begin\r\n szd := col.Filtering.ButtonSize;\r\n szt := szt + szd + ScalePaintValue(4);\r\n end;\r\n\r\n if col.Expandable then\r\n begin\r\n szr := col.ExpandingButtonSize;\r\n szt := szt + szr + ScalePaintValue(6);\r\n end;\r\n\r\n if (TTMSFNCTreeViewColumnOpen(col).SortKind <> nskNone) and (SortColumn = c.Column) then\r\n begin\r\n szr := ScalePaintValue(8);\r\n szt := szt + szr + ScalePaintValue(6);\r\n end;\r\n end;\r\n\r\n if def then\r\n begin\r\n case c.Kind of\r\n ikColumnTop: g.Font.Assign(ColumnsAppearance.TopFont);\r\n ikColumnBottom: g.Font.Assign(ColumnsAppearance.BottomFont);\r\n end;\r\n end\r\n else if Assigned(col) then\r\n begin\r\n case c.Kind of\r\n ikColumnTop: g.Font.Assign(col.TopFont);\r\n ikColumnBottom: g.Font.Assign(col.BottomFont);\r\n end;\r\n end;\r\n\r\n str := GetColumnText(c.Column);\r\n DoGetColumnText(c.Column, c.Kind, str);\r\n\r\n ha := gtaLeading;\r\n va := gtaCenter;\r\n ww := False;\r\n trim := gttNone;\r\n if Assigned(col) then\r\n begin\r\n ha := col.HorizontalTextAlign;\r\n va := col.VerticalTextAlign;\r\n ww := col.WordWrapping;\r\n trim := col.Trimming;\r\n end;\r\n\r\n DoGetColumnTrimming(c.Column, c.Kind, trim);\r\n DoGetColumnWordWrapping(c.Column, c.Kind, ww);\r\n DoGetColumnHorizontalTextAlign(c.Column, c.Kind, ha);\r\n DoGetColumnVerticalTextAlign(c.Column, c.Kind, va);\r\n\r\n txtr := r;\r\n InflateRectEx(txtr, ScalePaintValue(-2), ScalePaintValue(-2));\r\n txtr.Right := Max(txtr.Left, txtr.Right - szt);\r\n\r\n if PtInRectEx(txtr, PointF(AX, AY)) then\r\n begin\r\n case c.Kind of\r\n ikColumnTop:\r\n begin\r\n if Assigned(col) then\r\n g.Font.Assign(col.TopFont)\r\n else\r\n g.Font.Assign(ColumnsAppearance.TopFont);\r\n\r\n if ColumnsAppearance.TopVerticalText then\r\n a := g.DrawText(txtr, str, ww, ha, va, trim, -90, -1, -1, True, True, AX, AY)\r\n else\r\n a := g.DrawText(txtr, str, ww, ha, va, trim, 0, -1, -1, True, True, AX, AY)\r\n end;\r\n ikColumnBottom:\r\n begin\r\n if Assigned(col) then\r\n g.Font.Assign(col.BottomFont)\r\n else\r\n g.Font.Assign(ColumnsAppearance.BottomFont);\r\n\r\n if ColumnsAppearance.BottomVerticalText then\r\n a := g.DrawText(txtr, str, ww, ha, va, trim, 90, -1, -1, True, True, AX, AY)\r\n else\r\n a := g.DrawText(txtr, str, ww, ha, va, trim, 0, -1, -1, True, True, AX, AY)\r\n end;\r\n end;\r\n\r\n if a <> '' then\r\n begin\r\n Result := a;\r\n AIndex := c.Column;\r\n Break;\r\n end;\r\n end;\r\n end;\r\n finally\r\n g.EndScene;\r\n g.Free;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCCustomTreeView.XYToColumnExpand(X, Y: Single): Integer;\r\nvar\r\n I: Integer;\r\n topr: TRectF;\r\n r, dr, sr: TRectF;\r\n szd: Single;\r\n colw, colp, f: Double;\r\nbegin\r\n Result := -1;\r\n topr := GetColumnsTopRect;\r\n topr.Left := topr.Left - GetHorizontalScrollPosition;\r\n for I := ColumnCount - 1 downto 0 do\r\n begin\r\n if (I >= 0) and (I <= Columns.Count - 1) and Columns[I].Expandable and Columns[I].Visible then\r\n begin\r\n colw := ColumnWidths[I] + GetColumnsExtraSize;\r\n if colw >= 0 then\r\n begin\r\n colp := ColumnPositions[I];\r\n r := RectF(topr.Left + colp, topr.Top, topr.Left + colp + colw, topr.Bottom);\r\n szd := Columns[I].ExpandingButtonSize;\r\n\r\n if Columns[I].Filtering.Enabled then\r\n begin\r\n f := Columns[I].Filtering.ButtonSize;\r\n dr := RectF(Round(r.Right - f - ScalePaintValue(4)), Round(r.Top + ((r.Bottom - r.Top) - f) / 2), Round(r.Right - ScalePaintValue(4)), Round(r.Top + ((r.Bottom - r.Top) - f) / 2 + f));\r\n sr := r;\r\n sr.Right := dr.Left;\r\n end\r\n else\r\n sr := r;\r\n\r\n dr := RectF(Round(sr.Right - szd - ScalePaintValue(6)), Round(sr.Top + ((sr.Bottom - sr.Top) - szd) / 2), Round(sr.Right - ScalePaintValue(6)), Round(sr.Top + ((sr.Bottom - sr.Top) - szd) / 2 + szd));\r\n if PtInRectEx(dr, PointF(X, Y)) then\r\n begin\r\n Result := I;\r\n Break;\r\n end;\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCCustomTreeView.XYToColumnFilter(X, Y: Single): Integer;\r\nvar\r\n I: Integer;\r\n topr: TRectF;\r\n r, dr: TRectF;\r\n szd: Single;\r\n colw, colp: Double;\r\nbegin\r\n Result := -1;\r\n topr := GetColumnsTopRect;\r\n topr.Left := topr.Left - GetHorizontalScrollPosition;\r\n for I := ColumnCount - 1 downto 0 do\r\n begin\r\n if (I >= 0) and (I <= Columns.Count - 1) and Columns[I].Filtering.Enabled and Columns[I].Visible then\r\n begin\r\n colw := ColumnWidths[I] + GetColumnsExtraSize;\r\n if colw >= 0 then\r\n begin\r\n colp := ColumnPositions[I];\r\n r := RectF(topr.Left + colp, topr.Top, topr.Left + colp + colw, topr.Bottom);\r\n szd := Columns[I].Filtering.ButtonSize;\r\n dr := RectF(Round(r.Right - szd - ScalePaintValue(4)), Round(r.Top + ((r.Bottom - r.Top) - szd) / 2), Round(r.Right - ScalePaintValue(4)), Round(r.Top + ((r.Bottom - r.Top) - szd) / 2 + szd));\r\n if PtInRectEx(dr, PointF(X, Y)) then\r\n begin\r\n Result := I;\r\n Break;\r\n end;\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCCustomTreeView.XYToColumnSize(X,\r\n Y: Single): Integer;\r\nvar\r\n I: Integer;\r\n topr: TRectF;\r\n r: TRectF;\r\n colw, colp: Double;\r\nbegin\r\n Result := -1;\r\n topr := GetColumnsTopRect;\r\n topr.Left := topr.Left - GetHorizontalScrollPosition;\r\n for I := ColumnCount - 1 downto 0 do\r\n begin\r\n if (I >= 0) and (I <= Columns.Count - 1) and Columns[I].Visible then\r\n begin\r\n colw := ColumnWidths[I];\r\n if (colw >= 0) and (I >= 0) and (I <= Columns.Count - 1) and (Columns[I].Visible) then\r\n begin\r\n colp := ColumnPositions[I];\r\n r := RectF(topr.Left + colp + colw - ScalePaintValue(4), topr.Top, topr.Left + colp + colw + ScalePaintValue(4), topr.Bottom);\r\n if PtInRectEx(r, PointF(X, Y)) then\r\n begin\r\n Result := I;\r\n Break;\r\n end;\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCCustomTreeView.XYToNodeAnchor(ANode: TTMSFNCTreeViewVirtualNode; X,\r\n Y: Single): TTMSFNCTreeViewNodeAnchor;\r\nvar\r\n I: Integer;\r\n txtr: TRectF;\r\n a: String;\r\n str: String;\r\n g: TTMSFNCGraphics;\r\n c: TTMSFNCTreeViewColumn;\r\n ha, va: TTMSFNCGraphicsTextAlign;\r\n ww: Boolean;\r\n trim: TTMSFNCGraphicsTextTrimming;\r\n ext: Boolean;\r\n st, stp: Integer;\r\nbegin\r\n Result.AAnchor := '';\r\n Result.AColumn := -1;\r\n if Assigned(ANode) then\r\n begin\r\n st := GetFirstVisibleColumn;\r\n stp := GetLastVisibleColumn;\r\n for I := st to stp do\r\n begin\r\n if (I - st >= 0) and (I - st <= Length(ANode.TextRects) - 1) then\r\n begin\r\n txtr := ANode.TextRects[I - st];\r\n InflateRectEx(txtr, ScalePaintValue(-2), ScalePaintValue(-2));\r\n if PtInRectEx(txtr, PointF(X, Y)) then\r\n begin\r\n c := nil;\r\n if (I <= Columns.Count - 1) then\r\n c := Columns[I];\r\n\r\n ext := False;\r\n ha := gtaLeading;\r\n va := gtaCenter;\r\n ww := False;\r\n trim := gttNone;\r\n if Assigned(c) then\r\n begin\r\n ha := c.HorizontalTextAlign;\r\n va := c.VerticalTextAlign;\r\n ww := c.WordWrapping;\r\n trim := c.Trimming;\r\n end;\r\n\r\n DoIsNodeExtended(ANode, ext);\r\n DoGetNodeTrimming(ANode, I, trim);\r\n DoGetNodeWordWrapping(ANode, I, ww);\r\n DoGetNodeHorizontalTextAlign(ANode, I, ha);\r\n DoGetNodeVerticalTextAlign(ANode, I,va);\r\n\r\n str := '';\r\n DoGetNodeText(ANode, I, tntmDrawing, str);\r\n\r\n g := TTMSFNCGraphics.CreateBitmapCanvas;\r\n g.BeginScene;\r\n\r\n if Assigned(c) and not c.UseDefaultAppearance and not ext then\r\n g.Font.Assign(c.Font)\r\n else\r\n begin\r\n if ext then\r\n g.Font.Assign(NodesAppearance.ExtendedFont)\r\n else\r\n g.Font.Assign(NodesAppearance.Font);\r\n end;\r\n\r\n g.BitmapContainer := BitmapContainer;\r\n g.OptimizedHTMLDrawing := OptimizedHTMLDrawing;\r\n try\r\n a := g.DrawText(txtr, str, ww, ha, va, trim, 0, -1, -1, True, True, X, Y);\r\n finally\r\n g.EndScene;\r\n g.Free;\r\n end;\r\n\r\n if a <> '' then\r\n begin\r\n Result.AAnchor := a;\r\n Result.AColumn := I;\r\n Break;\r\n end;\r\n end;\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCCustomTreeView.XYToNodeCheck(ANode: TTMSFNCTreeViewVirtualNode; X,\r\n Y: Single): TTMSFNCTreeViewNodeCheck;\r\nvar\r\n nrt: TRectF;\r\n en: Boolean;\r\n I: Integer;\r\n st, stp: Integer;\r\nbegin\r\n Result.AColumn := -1;\r\n Result.ANode := nil;\r\n en := True;\r\n DoIsNodeEnabled(ANode, en);\r\n if Assigned(ANode) and en then\r\n begin\r\n st := GetFirstVisibleColumn;\r\n stp := GetLastVisibleColumn;\r\n for I := st to stp do\r\n begin\r\n if (I - st >= 0) and (I - st <= Length(ANode.CheckRects) - 1) then\r\n begin\r\n nrt := ANode.CheckRects[I - st];\r\n if PtInRectEx(nrt, PointF(X, Y)) then\r\n begin\r\n Result.ANode := ANode;\r\n Result.AColumn := I;\r\n Break;\r\n end;\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCCustomTreeView.XYToNodeIcon(ANode: TTMSFNCTreeViewVirtualNode; X,\r\n Y: Single): TTMSFNCTreeViewNodeIcon;\r\nvar\r\n nrt: TRectF;\r\n en: Boolean;\r\n I: Integer;\r\n st, stp: Integer;\r\nbegin\r\n Result.AColumn := -1;\r\n Result.ANode := nil;\r\n en := True;\r\n DoIsNodeEnabled(ANode, en);\r\n if Assigned(ANode) and en then\r\n begin\r\n st := GetFirstVisibleColumn;\r\n stp := GetLastVisibleColumn;\r\n for I := st to stp do\r\n begin\r\n if (I - st >= 0) and (I - st <= Length(ANode.BitmapRects) - 1) then\r\n begin\r\n nrt := ANode.BitmapRects[I - st];\r\n if PtInRectEx(nrt, PointF(X, Y)) then\r\n begin\r\n Result.ANode := ANode;\r\n Result.AColumn := I;\r\n Break;\r\n end;\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCCustomTreeView.XYToNodeExpand(ANode: TTMSFNCTreeViewVirtualNode; X,\r\n Y: Single): Boolean;\r\nvar\r\n nrt: TRectF;\r\n en: Boolean;\r\n c: Integer;\r\nbegin\r\n Result := False;\r\n if Assigned(ANode) and (ANode.Children > 0) then\r\n begin\r\n en := True;\r\n DoIsNodeEnabled(ANode, en);\r\n if en then\r\n begin\r\n c := GetFirstVisibleColumn;\r\n if (NodesAppearance.ExpandColumn - c >= 0) and (NodesAppearance.ExpandColumn - c <= Length(ANode.ExpandRects) - 1) then\r\n begin\r\n nrt := ANode.ExpandRects[NodesAppearance.ExpandColumn - c];\r\n Result := PtInRectEx(nrt, PointF(X, Y));\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCCustomTreeView.XYToNodeExtra(ANode: TTMSFNCTreeViewVirtualNode;\r\n X, Y: Single): Boolean;\r\nvar\r\n nrt: TRectF;\r\n en: Boolean;\r\n I: Integer;\r\n st: Integer;\r\n stp: Integer;\r\nbegin\r\n Result := False;\r\n en := True;\r\n DoIsNodeEnabled(ANode, en);\r\n if Assigned(ANode) and en then\r\n begin\r\n st := GetFirstVisibleColumn;\r\n stp := GetLastVisibleColumn;\r\n for I := st to stp do\r\n begin\r\n if (I - st >= 0) and (I - st <= Length(ANode.ExtraRects) - 1) then\r\n begin\r\n nrt := ANode.ExtraRects[I - st];\r\n if PtInRectEx(nrt, PointF(X, Y)) then\r\n begin\r\n Result := True;\r\n Break;\r\n end;\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCCustomTreeView.XYToNodeTextColumn(ANode: TTMSFNCTreeViewVirtualNode;\r\n X, Y: Single): Integer;\r\nvar\r\n nrt: TRectF;\r\n I: Integer;\r\n st, stp: Integer;\r\nbegin\r\n Result := -1;\r\n if Assigned(ANode) then\r\n begin\r\n st := GetFirstVisibleColumn;\r\n stp := GetLastVisibleColumn;\r\n for I := st to stp do\r\n begin\r\n if (I - st >= 0) and (I - st <= Length(ANode.TextRects) - 1) then\r\n begin\r\n nrt := ANode.TextRects[I - st];\r\n if PtInRectEx(nrt, PointF(X, Y)) then\r\n begin\r\n Result := I;\r\n Break;\r\n end;\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCCustomTreeView.XYToNodeTitleAnchor(\r\n ANode: TTMSFNCTreeViewVirtualNode; X, Y: Single): TTMSFNCTreeViewNodeAnchor;\r\nvar\r\n I: Integer;\r\n titr: TRectF;\r\n a: String;\r\n str: String;\r\n g: TTMSFNCGraphics;\r\n c: TTMSFNCTreeViewColumn;\r\n ha, va: TTMSFNCGraphicsTextAlign;\r\n ww: Boolean;\r\n trim: TTMSFNCGraphicsTextTrimming;\r\n st, stp: Integer;\r\nbegin\r\n Result.AAnchor := '';\r\n Result.AColumn := -1;\r\n if Assigned(ANode) then\r\n begin\r\n st := GetFirstVisibleColumn;\r\n stp := GetLastVisibleColumn;\r\n for I := st to stp do\r\n begin\r\n if (I - st >= 0) and (I - st <= Length(ANode.TitleRects) - 1) then\r\n begin\r\n titr := ANode.TitleRects[I - st];\r\n InflateRectEx(titr, ScalePaintValue(-2), ScalePaintValue(-2));\r\n if PtInRectEx(titr, PointF(X, Y)) then\r\n begin\r\n c := nil;\r\n if (I <= Columns.Count - 1) then\r\n c := Columns[I];\r\n\r\n ha := gtaLeading;\r\n va := gtaCenter;\r\n ww := False;\r\n trim := gttNone;\r\n if Assigned(c) then\r\n begin\r\n ha := c.TitleHorizontalTextAlign;\r\n va := c.TitleVerticalTextAlign;\r\n ww := c.TitleWordWrapping;\r\n trim := c.TitleTrimming;\r\n end;\r\n\r\n DoGetNodeTitleTrimming(ANode, I, trim);\r\n DoGetNodeTitleWordWrapping(ANode, I, ww);\r\n DoGetNodeTitleHorizontalTextAlign(ANode, I, ha);\r\n DoGetNodeTitleVerticalTextAlign(ANode, I,va);\r\n\r\n str := '';\r\n DoGetNodeTitle(ANode, I, tntmDrawing, str);\r\n\r\n g := TTMSFNCGraphics.CreateBitmapCanvas;\r\n g.BeginScene;\r\n\r\n if Assigned(c) and not c.UseDefaultAppearance then\r\n g.Font.Assign(c.TitleFont)\r\n else\r\n g.Font.Assign(NodesAppearance.TitleFont);\r\n\r\n g.BitmapContainer := BitmapContainer;\r\n g.OptimizedHTMLDrawing := OptimizedHTMLDrawing;\r\n try\r\n a := g.DrawText(titr, str, ww, ha, va, trim, 0, -1, -1, True, True, X, Y);\r\n finally\r\n g.EndScene;\r\n g.Free;\r\n end;\r\n\r\n if a <> '' then\r\n begin\r\n Result.AAnchor := a;\r\n Result.AColumn := I;\r\n Break;\r\n end;\r\n end;\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCCustomTreeView.XYToNodeTitleExtra(\r\n ANode: TTMSFNCTreeViewVirtualNode; X, Y: Single): Boolean;\r\nvar\r\n nrt: TRectF;\r\n en: Boolean;\r\n I: Integer;\r\n st, stp: Integer;\r\nbegin\r\n Result := False;\r\n en := True;\r\n DoIsNodeEnabled(ANode, en);\r\n if Assigned(ANode) and en then\r\n begin\r\n st := GetFirstVisibleColumn;\r\n stp := GetLastVisibleColumn;\r\n for I := st to stp do\r\n begin\r\n if (I - st >= 0) and (I - st <= Length(ANode.TitleExtraRects) - 1) then\r\n begin\r\n nrt := ANode.TitleExtraRects[I - st];\r\n if PtInRectEx(nrt, PointF(X, Y)) then\r\n begin\r\n Result := True;\r\n Break;\r\n end;\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCCustomTreeView.XYToNode(X, Y: Double; OffsetX: Single = 0): TTMSFNCTreeViewVirtualNode;\r\nvar\r\n dsp: TTMSFNCTreeViewCacheItem;\r\nbegin\r\n Result := nil;\r\n dsp := XYToCacheItem(X, Y, OffsetX);\r\n if Assigned(dsp) then\r\n Result := dsp.Node;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.HandleNodeEditing(\r\n ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer);\r\nvar\r\n c: TTMSFNCTreeViewColumn;\r\n ins: Boolean;\r\n {$IFNDEF LCLWEBLIB}\r\n AContext: TRttiContext;\r\n rt: TRttiType;\r\n propt: TRttiProperty;\r\n {$ENDIF}\r\n n: String;\r\n r: TRectF;\r\n {$IFDEF FMXLIB}\r\n trans: Boolean;\r\n {$ENDIF}\r\n {$IFDEF CMNWEBLIB}\r\n rtr: TRect;\r\n {$ENDIF}\r\n\r\n function CreateCaretPos(ALine, APos: Integer): TTMSFNCTreeViewCaretPosition;\r\n begin\r\n {$IFDEF FMXLIB}\r\n Result.Line := ALine;\r\n Result.Pos := APos;\r\n {$ENDIF}\r\n {$IFDEF CMNWEBLIB}\r\n Result.X := ALine;\r\n Result.Y := APos;\r\n {$ENDIF}\r\n end;\r\nbegin\r\n if Assigned(ANode) and (AColumn >= 0) and (AColumn <= Columns.Count - 1) then\r\n begin\r\n c := Columns[AColumn];\r\n FInplaceEditorClass := nil;\r\n if not c.CustomEditor then\r\n begin\r\n case c.EditorType of\r\n tcetEdit: FInplaceEditorClass := TTMSFNCTreeViewEdit;\r\n tcetComboBox: FInplaceEditorClass := TTMSFNCTreeViewComboBox;\r\n tcetMemo: FInplaceEditorClass := TTMSFNCTreeViewMemo;\r\n tcetNone: Exit;\r\n end;\r\n end;\r\n\r\n ins := True;\r\n DoBeforeOpenInplaceEditor(ANode, AColumn, ins);\r\n if ins then\r\n begin\r\n {$IFDEF FMXLIB}\r\n trans := True;\r\n DoGetInplaceEditor(ANode, AColumn, trans, FInplaceEditorClass);\r\n {$ENDIF}\r\n {$IFDEF CMNWEBLIB}\r\n DoGetInplaceEditor(ANode, AColumn, FInplaceEditorClass);\r\n {$ENDIF}\r\n\r\n if Assigned(FInplaceEditor) then\r\n begin\r\n {$IFDEF FMXLIB}\r\n FInplaceEditor.Free;\r\n {$ENDIF}\r\n {$IFDEF CMNWEBLIB}\r\n if Assigned(FOldInplaceEditor) then\r\n FOldInplaceEditor.Free;\r\n\r\n FOldInplaceEditor := FInplaceEditor;\r\n {$ENDIF}\r\n FInplaceEditor := nil;\r\n end;\r\n\r\n if Assigned(FInplaceEditorClass) then\r\n FInplaceEditor := FInplaceEditorClass.Create(Self)\r\n else\r\n FInplaceEditor := TEdit.Create(Self);\r\n\r\n r := GetInplaceEditorRect(ANode, AColumn);\r\n if Assigned(FInplaceEditor) then\r\n begin\r\n FUpdateNode := ANode;\r\n FUpdateNodeColumn := AColumn;\r\n {$IFDEF FMXLIB}\r\n if trans then\r\n begin\r\n FInplaceEditor.DisableFocusEffect := True;\r\n FInplaceEditor.OnApplyStyleLookup := ApplyInplaceEditorStyleLookup;\r\n end;\r\n {$ENDIF}\r\n\r\n {$IFDEF WEBLIB}\r\n FInplaceEditor.ShowFocus := False;\r\n {$ENDIF}\r\n\r\n FInplaceEditor.Parent := Self;\r\n FInplaceEditor.Visible := False;\r\n {$IFDEF FMXLIB}\r\n FInplaceEditor.BoundsRect := r;\r\n FInplaceEditor.BoundsRect := RectF(r.Left, r.Top + (r.Bottom - r.Top - FInplaceEditor.Height) / 2, r.Right, r.Top + (r.Bottom - r.Top - FInplaceEditor.Height) / 2 + FInplaceEditor.Height);\r\n {$ENDIF}\r\n {$IFDEF CMNWEBLIB}\r\n rtr := Rect(Round(r.Left), Round(r.Top), Round(r.Right), Round(r.Bottom));\r\n FInplaceEditor.BoundsRect := rtr;\r\n FInplaceEditor.BoundsRect := Rect(rtr.Left, rtr.Top + (rtr.Bottom - rtr.Top - FInplaceEditor.Height) div 2, rtr.Right, rtr.Top + (rtr.Bottom - rtr.Top - FInplaceEditor.Height) div 2 + FInplaceEditor.Height);\r\n {$ENDIF}\r\n FInplaceEditor.Visible := True;\r\n\r\n if (c.EditorType = tcetComboBox) and not c.CustomEditor and (FInplaceEditor is TComboBox) then\r\n begin\r\n (FInplaceEditor as TComboBox).Items.Assign(c.EditorItems);\r\n \t {$IFDEF CMNWEBLIB}\r\n (FInplaceEditor as TComboBox).Style := csDropDownList;\r\n \t {$ENDIF}\r\n \tend;\r\n\r\n CustomizeInplaceEditor(FInplaceEditor, ANode, c);\r\n\r\n {$IFNDEF LCLWEBLIB}\r\n AContext := TRttiContext.Create;\r\n {$ENDIF}\r\n try\r\n {$IFNDEF LCLWEBLIB}\r\n rt := AContext.GetType(FInplaceEditor.ClassInfo);\r\n {$ENDIF}\r\n n := '';\r\n DoGetNodeText(ANode, AColumn, tntmEditing, n);\r\n if (FInplaceEditor is TComboBox) then\r\n (FInplaceEditor as TComboBox).ItemIndex := (FInplaceEditor as TComboBox).Items.IndexOf(n)\r\n {$IFDEF LCLWEBLIB}\r\n ;\r\n {$ENDIF}\r\n {$IFNDEF LCLWEBLIB}\r\n else\r\n begin\r\n propt := rt.GetProperty('Text');\r\n if Assigned(propt) then\r\n propt.SetValue(FInplaceEditor, n)\r\n end;\r\n {$ENDIF}\r\n\r\n {$IFDEF LCLWEBLIB}\r\n if FInplaceEditor is TEdit then\r\n (FInplaceEditor as TEdit).Text := n;\r\n\r\n if FInplaceEditor is TMemo then\r\n (FInplaceEditor as TMemo).Text := n;\r\n {$ENDIF}\r\n finally\r\n {$IFNDEF LCLWEBLIB}\r\n AContext.Free;\r\n {$ENDIF}\r\n end;\r\n\r\n if FInplaceEditor.CanFocus then\r\n FInplaceEditor.SetFocus;\r\n\r\n if FInplaceEditor is TEdit then\r\n (FInplaceEditor as TEdit).SelStart := Length((FInplaceEditor as TEdit).Text);\r\n\r\n if FInplaceEditor is TMemo then\r\n begin\r\n (FInplaceEditor as TMemo).SelLength := 0;\r\n if (FInplaceEditor as TMemo).Lines.Count > 0 then\r\n (FInplaceEditor as TMemo).CaretPosition := CreateCaretPos((FInplaceEditor as TMemo).Lines.Count - 1, Length((FInplaceEditor as TMemo).Lines[(FInplaceEditor as TMemo).Lines.Count - 1]))\r\n else\r\n (FInplaceEditor as TMemo).CaretPosition := CreateCaretPos(0, 0);\r\n end;\r\n\r\n FInplaceEditorActive := True;\r\n Invalidate;\r\n end;\r\n\r\n DoAfterOpenInplaceEditor(ANode, AColumn, FInplaceEditor, r);\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.HandleNodeExpand(ANode: TTMSFNCTreeViewVirtualNode; ARecurse: Boolean);\r\nvar\r\n e: Boolean;\r\nbegin\r\n if Assigned(ANode) then\r\n begin\r\n if not ANode.Expanded and (ANode.Children > 0) then\r\n begin\r\n e := True;\r\n BlockUpdateNode := True;\r\n DoBeforeExpandNode(ANode, e);\r\n BlockUpdateNode := False;\r\n if e then\r\n begin\r\n ToggleNodeInternal(ANode, ARecurse);\r\n DoAfterExpandNode(ANode);\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.HandleNodeExtra(\r\n ANode: TTMSFNCTreeViewVirtualNode);\r\nbegin\r\n\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.HandleNodeCollapse(ANode: TTMSFNCTreeViewVirtualNode; ARecurse: Boolean);\r\nvar\r\n e: Boolean;\r\nbegin\r\n if Assigned(ANode) then\r\n begin\r\n if ANode.Expanded and (ANode.Children > 0) then\r\n begin\r\n e := True;\r\n BlockUpdateNode := True;\r\n DoBeforeCollapseNode(ANode, e);\r\n BlockUpdateNode := False;\r\n if e then\r\n begin\r\n ToggleNodeInternal(ANode, ARecurse);\r\n DoAfterCollapseNode(ANode);\r\n end;\r\n end\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.HandleNodeTitleExtra(\r\n ANode: TTMSFNCTreeViewVirtualNode);\r\nbegin\r\n\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.HandleNodeToggle(ANode: TTMSFNCTreeViewVirtualNode);\r\nvar\r\n e: Boolean;\r\nbegin\r\n if Assigned(ANode) and (ANode.Children > 0) then\r\n begin\r\n if ANode.Expanded then\r\n begin\r\n e := True;\r\n BlockUpdateNode := True;\r\n DoBeforeCollapseNode(ANode, e);\r\n BlockUpdateNode := False;\r\n if e then\r\n begin\r\n ToggleNodeInternal(ANode);\r\n DoAfterCollapseNode(ANode);\r\n end;\r\n end\r\n else\r\n begin\r\n e := True;\r\n BlockUpdateNode := True;\r\n DoBeforeExpandNode(ANode, e);\r\n BlockUpdateNode := False;\r\n if e then\r\n begin\r\n ToggleNodeInternal(ANode);\r\n DoAfterExpandNode(ANode);\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.HandleNodeToggleCheck(ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer);\r\nvar\r\n chk, e: Boolean;\r\n chkt: TTMSFNCTreeViewNodeCheckType;\r\nbegin\r\n if Assigned(ANode) then\r\n begin\r\n if (AColumn >= 0) and (AColumn <= Length(ANode.CheckStates) - 1) then\r\n begin\r\n chk := ANode.CheckStates[AColumn];\r\n if chk then\r\n begin\r\n chkt := tvntNone;\r\n DoGetNodeCheckType(ANode, AColumn, chkt);\r\n if chkt = tvntCheckBox then\r\n begin\r\n e := True;\r\n DoBeforeUnCheckNode(ANode, AColumn, e);\r\n if e then\r\n begin\r\n ToggleCheckNodeInternal(ANode, AColumn);\r\n DoAfterUnCheckNode(ANode, AColumn);\r\n end;\r\n end;\r\n end\r\n else\r\n begin\r\n e := True;\r\n DoBeforeCheckNode(ANode, AColumn, e);\r\n if e then\r\n begin\r\n ToggleCheckNodeInternal(ANode, AColumn);\r\n DoAfterCheckNode(ANode, AColumn);\r\n end;\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTreeView.HandleSelectNode(ANode: TTMSFNCTreeViewVirtualNode;\r\n ATriggerEvents: Boolean; AKeyBoard: Boolean; AMultiSelect: Boolean; AColumn: Integer);\r\nvar\r\n I: Integer;\r\n it: TTMSFNCTreeViewVirtualNode;\r\n en: Boolean;\r\nbegin\r\n if not AMultiSelect then\r\n begin\r\n for I := FSelectedNodes.Count - 1 downto 0 do\r\n begin\r\n it := FSelectedNodes[I];\r\n if it <> ANode then\r\n begin\r\n en := True;\r\n if ATriggerEvents then\r\n DoBeforeUnSelectNode(it, en);\r\n\r\n if en then\r\n begin\r\n if FSelectedNodes.IndexOf(it) > -1 then\r\n FSelectedNodes.Remove(it);\r\n if ATriggerEvents then\r\n DoAfterUnSelectNode(it);\r\n end;\r\n end;\r\n end;\r\n end;\r\n\r\n if Assigned(ANode) then\r\n begin\r\n if (FSelectedNodes.IndexOf(ANode) > -1) or ((Assigned(FDownNode) and (FDownNode.ParentNode <> ANode.ParentNode)) and (msSiblingOnly in Interaction.MultiSelectStyle) and AMultiSelect) then\r\n begin\r\n en := True;\r\n if ATriggerEvents then\r\n DoBeforeUnSelectNode(ANode, en);\r\n if en then\r\n begin\r\n if FSelectedNodes.IndexOf(ANode) > -1 then\r\n FSelectedNodes.Remove(ANode);\r\n if ATriggerEvents then\r\n DoAfterUnSelectNode(ANode);\r\n end;\r\n end\r\n else\r\n begin\r\n if (Assigned(FDownNode) and ((FDownNode.ParentNode = ANode.ParentNode) or not AMultiSelect)) or not (msSiblingOnly in Interaction.MultiSelectStyle) then\r\n begin\r\n if (VisibleNodes.IndexOf(ANode) > -1) or not (msVisibleOnly in Interaction.MultiSelectStyle) then\r\n begin\r\n en := True;\r\n if ATriggerEvents then\r\n DoBeforeSelectNode(ANode, en);\r\n\r\n if en then\r\n begin\r\n FSelectedNodes.Add(ANode);\r\n if ATriggerEvents then\r\n DoAfterSelectNode(ANode);\r\n end;\r\n end;\r\n end;\r\n end;\r\n\r\n if not AKeyBoard and ATriggerEvents then\r\n begin\r\n DoNodeClick(ANode);\r\n DoNodeValueClick(ANode, AColumn);\r\n end;\r\n end;\r\nend;\r\n\r\n{ TTMSFNCTreeViewNodesAppearance }\r\n\r\nprocedure TTMSFNCTreeViewNodesAppearance.Assign(Source: TPersistent);\r\nbegin\r\n if Source is TTMSFNCTreeViewNodesAppearance then\r\n begin\r\n FFill.Assign((Source as TTMSFNCTreeViewNodesAppearance).Fill);\r\n FStroke.Assign((Source as TTMSFNCTreeViewNodesAppearance).Stroke);\r\n FFont.Assign((Source as TTMSFNCTreeViewNodesAppearance).Font);\r\n FTitleFont.Assign((Source as TTMSFNCTreeViewNodesAppearance).TitleFont);\r\n FSelectedFill.Assign((Source as TTMSFNCTreeViewNodesAppearance).SelectedFill);\r\n FSelectedStroke.Assign((Source as TTMSFNCTreeViewNodesAppearance).SelectedStroke);\r\n FDisabledFill.Assign((Source as TTMSFNCTreeViewNodesAppearance).DisabledFill);\r\n FDisabledStroke.Assign((Source as TTMSFNCTreeViewNodesAppearance).DisabledStroke);\r\n FExtendedFill.Assign((Source as TTMSFNCTreeViewNodesAppearance).ExtendedFill);\r\n FExtendedStroke.Assign((Source as TTMSFNCTreeViewNodesAppearance).ExtendedStroke);\r\n FExtendedFont.Assign((Source as TTMSFNCTreeViewNodesAppearance).ExtendedFont);\r\n FExtendedSelectedFill.Assign((Source as TTMSFNCTreeViewNodesAppearance).ExtendedSelectedFill);\r\n FExtendedSelectedStroke.Assign((Source as TTMSFNCTreeViewNodesAppearance).ExtendedSelectedStroke);\r\n FExtendedDisabledFill.Assign((Source as TTMSFNCTreeViewNodesAppearance).ExtendedDisabledFill);\r\n FExtendedDisabledStroke.Assign((Source as TTMSFNCTreeViewNodesAppearance).ExtendedDisabledStroke);\r\n FExpandColumn := (Source as TTMSFNCTreeViewNodesAppearance).ExpandColumn;\r\n FExpandWidth := (Source as TTMSFNCTreeViewNodesAppearance).ExpandWidth;\r\n FExpandHeight := (Source as TTMSFNCTreeViewNodesAppearance).ExpandHeight;\r\n FFixedHeight := (Source as TTMSFNCTreeViewNodesAppearance).FixedHeight;\r\n FVariableMinimumHeight := (Source as TTMSFNCTreeViewNodesAppearance).VariableMinimumHeight;\r\n FSelectedFontColor := (Source as TTMSFNCTreeViewNodesAppearance).SelectedFontColor;\r\n FDisabledFontColor := (Source as TTMSFNCTreeViewNodesAppearance).DisabledFontColor;\r\n FSelectedTitleFontColor := (Source as TTMSFNCTreeViewNodesAppearance).SelectedTitleFontColor;\r\n FDisabledTitleFontColor := (Source as TTMSFNCTreeViewNodesAppearance).DisabledTitleFontColor;\r\n FExtendedFontColor := (Source as TTMSFNCTreeViewNodesAppearance).ExtendedFontColor;\r\n FExtendedSelectedFontColor := (Source as TTMSFNCTreeViewNodesAppearance).ExtendedSelectedFontColor;\r\n FExtendedDisabledFontColor := (Source as TTMSFNCTreeViewNodesAppearance).ExtendedDisabledFontColor;\r\n FLevelIndent := (Source as TTMSFNCTreeViewNodesAppearance).LevelIndent;\r\n FSpacing := (Source as TTMSFNCTreeViewNodesAppearance).Spacing;\r\n FHeightMode := (Source as TTMSFNCTreeViewNodesAppearance).HeightMode;\r\n FShowLines := (Source as TTMSFNCTreeViewNodesAppearance).ShowLines;\r\n FShowFocus := (Source as TTMSFNCTreeViewNodesAppearance).ShowFocus;\r\n FColumnStroke.Assign((Source as TTMSFNCTreeViewNodesAppearance).ColumnStroke);\r\n FLineStroke.Assign((Source as TTMSFNCTreeViewNodesAppearance).LineStroke);\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewNodesAppearance.Changed(Sender: TObject);\r\nbegin\r\n FTreeView.UpdateTreeViewCache;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewNodesAppearance.BitmapChanged(Sender: TObject);\r\nbegin\r\n FTreeView.UpdateTreeViewCache;\r\nend;\r\n\r\nconstructor TTMSFNCTreeViewNodesAppearance.Create(ATreeView: TTMSFNCCustomTreeView);\r\nbegin\r\n FTreeView := ATreeView;\r\n FShowFocus := True;\r\n FSelectionArea := tsaFromText;\r\n FExpandColumn := 0;\r\n FExpandWidth := 15;\r\n FExpandHeight := 15;\r\n FFixedHeight := 25;\r\n FVariableMinimumHeight := 25;\r\n FShowLines := True;\r\n FHeightMode := tnhmFixed;\r\n FLevelIndent := 20;\r\n FSpacing := 0;\r\n FSelectedFontColor := gcWhite;\r\n FDisabledFontColor := gcSilver;\r\n\r\n FSelectedTitleFontColor := gcWhite;\r\n FDisabledTitleFontColor := gcSilver;\r\n\r\n FExtendedFontColor := gcBlack;\r\n FExtendedSelectedFontColor := gcWhite;\r\n FExtendedDisabledFontColor := gcSilver;\r\n\r\n FColumnStroke := TTMSFNCGraphicsStroke.Create(gskSolid, gcNull);\r\n FLineStroke := TTMSFNCGraphicsStroke.Create(gskDot, gcDarkGray);\r\n FFill := TTMSFNCGraphicsFill.Create(gfkSolid, gcNull);\r\n FStroke := TTMSFNCGraphicsStroke.Create(gskNone, gcDarkGray);\r\n FSelectedFill := TTMSFNCGraphicsFill.Create(gfkSolid, TTMSFNCTreeViewColorSelection);\r\n FSelectedStroke := TTMSFNCGraphicsStroke.Create(gskSolid, TTMSFNCTreeViewColorSelection);\r\n FDisabledFill := TTMSFNCGraphicsFill.Create(gfkSolid, gcDarkGray);\r\n FDisabledStroke := TTMSFNCGraphicsStroke.Create(gskNone, gcDarkGray);\r\n\r\n FExtendedFill := TTMSFNCGraphicsFill.Create(gfkSolid, TTMSFNCTreeViewColorExtended);\r\n FExtendedStroke := TTMSFNCGraphicsStroke.Create(gskSolid, gcDarkGray);\r\n FExtendedSelectedFill := TTMSFNCGraphicsFill.Create(gfkSolid, TTMSFNCTreeViewColorSelection);\r\n FExtendedSelectedStroke := TTMSFNCGraphicsStroke.Create(gskNone, gcDarkGray);\r\n FExtendedDisabledFill := TTMSFNCGraphicsFill.Create(gfkSolid, gcDarkGray);\r\n FExtendedDisabledStroke := TTMSFNCGraphicsStroke.Create(gskNone, gcDarkGray);\r\n\r\n FExpandNodeIcon := TTMSFNCBitmap(TTMSFNCBitmap.CreateFromResource(TTMSFNCTREEVIEWEXPAND, HInstance));\r\n FExpandNodeIcon.OnChange := @BitmapChanged;\r\n FCollapseNodeIcon := TTMSFNCBitmap(TTMSFNCBitmap.CreateFromResource(TTMSFNCTREEVIEWCOLLAPSE, HInstance));\r\n FCollapseNodeIcon.OnChange := @BitmapChanged;\r\n FExpandNodeIconLarge := TTMSFNCBitmap(TTMSFNCBitmap.CreateFromResource(TTMSFNCTREEVIEWEXPANDLARGE, HInstance));\r\n FExpandNodeIconLarge.OnChange := @BitmapChanged;\r\n FCollapseNodeIconLarge := TTMSFNCBitmap(TTMSFNCBitmap.CreateFromResource(TTMSFNCTREEVIEWCOLLAPSELARGE, HInstance));\r\n FCollapseNodeIconLarge.OnChange := @BitmapChanged;\r\n\r\n FFont := TTMSFNCGraphicsFont.Create;\r\n if Assigned(FTreeView) and FTreeView.IsDesignTime then\r\n FFont.Color := gcBlack;\r\n\r\n FTitleFont := TTMSFNCGraphicsFont.Create;\r\n if Assigned(FTreeView) and FTreeView.IsDesignTime then\r\n FTitleFont.Color := gcBlack;\r\n\r\n FFill.OnChanged := @Changed;\r\n FStroke.OnChanged := @Changed;\r\n\r\n FSelectedFill.OnChanged := @Changed;\r\n FSelectedStroke.OnChanged := @Changed;\r\n\r\n FDisabledFill.OnChanged := @Changed;\r\n FDisabledStroke.OnChanged := @Changed;\r\n\r\n FExtendedFont := TTMSFNCGraphicsFont.Create;\r\n\r\n FExtendedFill.OnChanged := @Changed;\r\n FExtendedStroke.OnChanged := @Changed;\r\n\r\n FExtendedSelectedFill.OnChanged := @Changed;\r\n FExtendedSelectedStroke.OnChanged := @Changed;\r\n\r\n FExtendedDisabledFill.OnChanged := @Changed;\r\n FExtendedDisabledStroke.OnChanged := @Changed;\r\n\r\n FFont.OnChanged := @Changed;\r\n FExtendedFont.OnChanged := @Changed;\r\nend;\r\n\r\ndestructor TTMSFNCTreeViewNodesAppearance.Destroy;\r\nbegin\r\n FLineStroke.Free;\r\n FColumnStroke.Free;\r\n\r\n FExpandNodeIconLarge.Free;\r\n FCollapseNodeIconLarge.Free;\r\n FExpandNodeIcon.Free;\r\n FCollapseNodeIcon.Free;\r\n\r\n FFill.Free;\r\n FStroke.Free;\r\n FFont.Free;\r\n FTitleFont.Free;\r\n\r\n FSelectedFill.Free;\r\n FSelectedStroke.Free;\r\n\r\n FDisabledFill.Free;\r\n FDisabledStroke.Free;\r\n\r\n FExtendedFill.Free;\r\n FExtendedStroke.Free;\r\n FExtendedFont.Free;\r\n\r\n FExtendedSelectedFill.Free;\r\n FExtendedSelectedStroke.Free;\r\n\r\n FExtendedDisabledFill.Free;\r\n FExtendedDisabledStroke.Free;\r\n inherited;\r\nend;\r\n\r\nfunction TTMSFNCTreeViewNodesAppearance.IsSpacingStored: Boolean;\r\nbegin\r\n Result := Spacing <> 0;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewNodesAppearance.SetSelectedFill(const Value: TTMSFNCGraphicsFill);\r\nbegin\r\n if FSelectedFill <> Value then\r\n FSelectedFill.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewNodesAppearance.SetSelectedStroke(const Value: TTMSFNCGraphicsStroke);\r\nbegin\r\n if FSelectedStroke <> Value then\r\n FSelectedStroke.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewNodesAppearance.SetSelectedTitleFontColor(\r\n const Value: TTMSFNCGraphicsColor);\r\nbegin\r\n if FSelectedTitleFontColor <> Value then\r\n begin\r\n FSelectedTitleFontColor := Value;\r\n FTreeView.Invalidate;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewNodesAppearance.SetSelectionArea(const Value: TTMSFNCTreeViewSelectionArea);\r\nbegin\r\n if FSelectionArea <> Value then\r\n begin\r\n FSelectionArea := Value;\r\n FTreeView.Invalidate;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewNodesAppearance.SetShowFocus(const Value: Boolean);\r\nbegin\r\n if FShowFocus <> Value then\r\n begin\r\n FShowFocus := Value;\r\n FTreeView.Invalidate;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewNodesAppearance.SetShowLines(const Value: Boolean);\r\nbegin\r\n if FShowLines <> Value then\r\n begin\r\n FShowLines := Value;\r\n Changed(Self);\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewNodesAppearance.SetSpacing(const Value: Double);\r\nbegin\r\n if FSpacing <> Value then\r\n begin\r\n FSpacing := Value;\r\n Changed(Self);\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewNodesAppearance.SetFill(const Value: TTMSFNCGraphicsFill);\r\nbegin\r\n if FFill <> Value then\r\n FFill.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewNodesAppearance.SetExtendedFontColor(const Value: TTMSFNCGraphicsColor);\r\nbegin\r\n if FExtendedFontColor <> Value then\r\n begin\r\n FExtendedFontColor := Value;\r\n Changed(Self);\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewNodesAppearance.SetExtendedSelectedFontColor(const Value: TTMSFNCGraphicsColor);\r\nbegin\r\n if FExtendedSelectedFontColor <> Value then\r\n begin\r\n FExtendedSelectedFontColor := Value;\r\n Changed(Self);\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewNodesAppearance.SetExtendedDisabledFontColor(const Value: TTMSFNCGraphicsColor);\r\nbegin\r\n if FExtendedDisabledFontColor <> Value then\r\n begin\r\n FExtendedDisabledFontColor := Value;\r\n Changed(Self);\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewNodesAppearance.SetSelectedFontColor(const Value: TTMSFNCGraphicsColor);\r\nbegin\r\n if FSelectedFontColor <> Value then\r\n begin\r\n FSelectedFontColor := Value;\r\n Changed(Self);\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewNodesAppearance.SetDisabledFontColor(const Value: TTMSFNCGraphicsColor);\r\nbegin\r\n if FDisabledFontColor <> Value then\r\n begin\r\n FDisabledFontColor := Value;\r\n Changed(Self);\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewNodesAppearance.SetFixedHeight(const Value: Double);\r\nbegin\r\n if FFixedHeight <> Value then\r\n begin\r\n FFixedHeight := Value;\r\n Changed(Self);\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewNodesAppearance.SetVariableMinimumHeight(const Value: Double);\r\nbegin\r\n if FVariableMinimumHeight <> Value then\r\n begin\r\n FVariableMinimumHeight := Value;\r\n Changed(Self);\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewNodesAppearance.SetFont(const Value: TTMSFNCGraphicsFont);\r\nbegin\r\n if FFont <> Value then\r\n FFont.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewNodesAppearance.SetExtendedDisabledFill(\r\n const Value: TTMSFNCGraphicsFill);\r\nbegin\r\n if FExtendedDisabledFill <> Value then\r\n FExtendedDisabledFill.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewNodesAppearance.SetExtendedDisabledStroke(\r\n const Value: TTMSFNCGraphicsStroke);\r\nbegin\r\n if FExtendedDisabledStroke <> Value then\r\n FExtendedDisabledStroke.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewNodesAppearance.SetExtendedSelectedFill(\r\n const Value: TTMSFNCGraphicsFill);\r\nbegin\r\n if FExtendedSelectedFill <> Value then\r\n FExtendedSelectedFill.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewNodesAppearance.SetExtendedSelectedStroke(\r\n const Value: TTMSFNCGraphicsStroke);\r\nbegin\r\n if FExtendedSelectedStroke <> Value then\r\n FExtendedSelectedStroke.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewNodesAppearance.SetExtendedFill(\r\n const Value: TTMSFNCGraphicsFill);\r\nbegin\r\n if FExtendedFill <> Value then\r\n FExtendedFill.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewNodesAppearance.SetExtendedFont(\r\n const Value: TTMSFNCGraphicsFont);\r\nbegin\r\n if FExtendedFont <> Value then\r\n FExtendedFont.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewNodesAppearance.SetExtendedStroke(\r\n const Value: TTMSFNCGraphicsStroke);\r\nbegin\r\n if FExtendedStroke <> Value then\r\n FExtendedStroke.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewNodesAppearance.SetHeightMode(\r\n const Value: TTMSFNCTreeViewNodeHeightMode);\r\nbegin\r\n if FHeightMode <> Value then\r\n begin\r\n FHeightMode := Value;\r\n Changed(Self);\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewNodesAppearance.SetLevelIndent(const Value: Double);\r\nbegin\r\n if FLevelIndent <> Value then\r\n begin\r\n FLevelIndent := Value;\r\n Changed(Self);\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewNodesAppearance.SetExpandNodeIcon(const Value: TTMSFNCBitmap);\r\nbegin\r\n if FExpandNodeIcon <> Value then\r\n begin\r\n FExpandNodeIcon.Assign(Value);\r\n Changed(Self);\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewNodesAppearance.SetExpandNodeIconLarge(const Value: TTMSFNCBitmap);\r\nbegin\r\n if FExpandNodeIconLarge <> Value then\r\n begin\r\n FExpandNodeIconLarge.Assign(Value);\r\n Changed(Self);\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewNodesAppearance.SetCollapseNodeIconLarge(const Value: TTMSFNCBitmap);\r\nbegin\r\n if FCollapseNodeIconLarge <> Value then\r\n begin\r\n FCollapseNodeIconLarge.Assign(Value);\r\n Changed(Self);\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewNodesAppearance.SetColumnStroke(\r\n const Value: TTMSFNCGraphicsStroke);\r\nbegin\r\n if FColumnStroke <> Value then\r\n FColumnStroke.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewNodesAppearance.SetLineStroke(\r\n const Value: TTMSFNCGraphicsStroke);\r\nbegin\r\n if FLineStroke <> Value then\r\n FLineStroke.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewNodesAppearance.SetExpandColumn(const Value: Integer);\r\nbegin\r\n if FExpandColumn <> Value then\r\n begin\r\n FExpandColumn := Value;\r\n Changed(Self);\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewNodesAppearance.SetExpandWidth(const Value: Double);\r\nbegin\r\n if FExpandWidth <> Value then\r\n begin\r\n FExpandWidth := Value;\r\n Changed(Self);\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewNodesAppearance.SetExpandHeight(const Value: Double);\r\nbegin\r\n if FExpandHeight <> Value then\r\n begin\r\n FExpandHeight := Value;\r\n Changed(Self);\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewNodesAppearance.SetStroke(const Value: TTMSFNCGraphicsStroke);\r\nbegin\r\n if FStroke <> Value then\r\n FStroke.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewNodesAppearance.SetTitleFont(\r\n const Value: TTMSFNCGraphicsFont);\r\nbegin\r\n if FTitleFont <> Value then\r\n FTitleFont.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewNodesAppearance.SetCollapseNodeIcon(\r\n const Value: TTMSFNCBitmap);\r\nbegin\r\n if FCollapseNodeIcon <> Value then\r\n begin\r\n FCollapseNodeIcon.Assign(Value);\r\n Changed(Self);\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewNodesAppearance.SetDisabledFill(const Value: TTMSFNCGraphicsFill);\r\nbegin\r\n if FDisabledFill <> Value then\r\n FDisabledFill.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewNodesAppearance.SetDisabledStroke(const Value: TTMSFNCGraphicsStroke);\r\nbegin\r\n if FDisabledStroke <> Value then\r\n FDisabledStroke.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewNodesAppearance.SetDisabledTitleFontColor(\r\n const Value: TTMSFNCGraphicsColor);\r\nbegin\r\n if FDisabledTitleFontColor <> Value then\r\n begin\r\n FDisabledTitleFontColor := Value;\r\n FTreeView.Invalidate;\r\n end;\r\nend;\r\n\r\n{ TTMSFNCTreeViewColumnsAppearance }\r\n\r\nprocedure TTMSFNCTreeViewColumnsAppearance.Assign(Source: TPersistent);\r\nbegin\r\n if Source is TTMSFNCTreeViewColumnsAppearance then\r\n begin\r\n FSortIndicatorColor := (Source as TTMSFNCTreeViewColumnsAppearance).SortIndicatorColor;\r\n FLayouts := (Source as TTMSFNCTreeViewColumnsAppearance).Layouts;\r\n FTopSize := (Source as TTMSFNCTreeViewColumnsAppearance).TopSize;\r\n FBottomSize := (Source as TTMSFNCTreeViewColumnsAppearance).BottomSize;\r\n FBottomFill.Assign((Source as TTMSFNCTreeViewColumnsAppearance).BottomFill);\r\n FBottomFont.Assign((Source as TTMSFNCTreeViewColumnsAppearance).BottomFont);\r\n FBottomStroke.Assign((Source as TTMSFNCTreeViewColumnsAppearance).BottomStroke);\r\n FTopFill.Assign((Source as TTMSFNCTreeViewColumnsAppearance).TopFill);\r\n FTopStroke.Assign((Source as TTMSFNCTreeViewColumnsAppearance).TopStroke);\r\n FTopFont.Assign((Source as TTMSFNCTreeViewColumnsAppearance).TopFont);\r\n FStretch := (Source as TTMSFNCTreeViewColumnsAppearance).Stretch;\r\n FOptimizedColumnDisplay := (Source as TTMSFNCTreeViewColumnsAppearance).OptimizedColumnDisplay;\r\n FStretchColumn := (Source as TTMSFNCTreeViewColumnsAppearance).StretchColumn;\r\n FStretchAll := (Source as TTMSFNCTreeViewColumnsAppearance).StretchAll;\r\n FTopVerticalText := (Source as TTMSFNCTreeViewColumnsAppearance).TopVerticalText;\r\n FBottomVerticalText := (Source as TTMSFNCTreeViewColumnsAppearance).BottomVerticalText;\r\n FFillEmptySpaces := (Source as TTMSFNCTreeViewColumnsAppearance).FillEmptySpaces;\r\n end;\r\nend;\r\n\r\nconstructor TTMSFNCTreeViewColumnsAppearance.Create(\r\n ATreeView: TTMSFNCCustomTreeView);\r\nbegin\r\n FTreeView := ATreeView;\r\n FSortIndicatorColor := gcSteelblue;\r\n FLayouts := [tclTop];\r\n FFillEmptySpaces := True;\r\n FOptimizedColumnDisplay := True;\r\n FStretch := True;\r\n FStretchAll := True;\r\n FStretchColumn := -1;\r\n FBottomSize := 25;\r\n FTopVerticalText := False;\r\n FStretchAll := True;\r\n FBottomVerticalText := False;\r\n FTopSize := 25;\r\n FTopHorizontalTextAlign := gtaCenter;\r\n FTopVerticalTextAlign := gtaCenter;\r\n FBottomHorizontalTextAlign := gtaCenter;\r\n FBottomVerticalTextAlign := gtaCenter;\r\n FBottomFill := TTMSFNCGraphicsFill.Create(gfkSolid, gcWhite);\r\n FBottomStroke := TTMSFNCGraphicsStroke.Create(gskSolid, gcDarkGray);\r\n FTopFill := TTMSFNCGraphicsFill.Create(gfkSolid, gcWhite);\r\n FTopStroke := TTMSFNCGraphicsStroke.Create(gskSolid, gcDarkGray);\r\n\r\n FTopFont := TTMSFNCGraphicsFont.Create;\r\n FTopFont.Color := gcBlack;\r\n FBottomFont := TTMSFNCGraphicsFont.Create;\r\n FBottomFont.Color := gcBlack;\r\n\r\n FBottomFill.OnChanged := @Changed;\r\n FTopFill.OnChanged := @Changed;\r\n FBottomStroke.OnChanged := @Changed;\r\n FTopStroke.OnChanged := @Changed;\r\n\r\n FTopFont.OnChanged := @Changed;\r\n FBottomFont.OnChanged := @Changed;\r\nend;\r\n\r\ndestructor TTMSFNCTreeViewColumnsAppearance.Destroy;\r\nbegin\r\n FTopFont.Free;\r\n FBottomFont.Free;\r\n FBottomFill.Free;\r\n FTopFill.Free;\r\n FBottomStroke.Free;\r\n FTopStroke.Free;\r\n inherited;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewColumnsAppearance.Changed(Sender: TObject);\r\nbegin\r\n FTreeView.UpdateTreeViewCache;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewColumnsAppearance.SetBottomFill(const Value: TTMSFNCGraphicsFill);\r\nbegin\r\n if FBottomFill <> Value then\r\n FBottomFill.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewColumnsAppearance.SetBottomFont(const Value: TTMSFNCGraphicsFont);\r\nbegin\r\n if FBottomFont <> Value then\r\n FBottomFont.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewColumnsAppearance.SetBottomSize(const Value: Double);\r\nbegin\r\n if FBottomSize <> Value then\r\n begin\r\n FBottomSize := Value;\r\n FTreeView.UpdateTreeViewCache;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewColumnsAppearance.SetBottomStroke(\r\n const Value: TTMSFNCGraphicsStroke);\r\nbegin\r\n if FBottomStroke <> Value then\r\n FBottomStroke.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewColumnsAppearance.SetBottomVerticalText(\r\n const Value: Boolean);\r\nbegin\r\n if FBottomVerticalText <> Value then\r\n begin\r\n FBottomVerticalText := Value;\r\n Changed(Self);\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewColumnsAppearance.SetFillEmptySpaces(\r\n const Value: Boolean);\r\nbegin\r\n if FFillEmptySpaces <> Value then\r\n begin\r\n FFillEmptySpaces := Value;\r\n FTreeView.Invalidate;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewColumnsAppearance.SetLayouts(\r\n const Value: TTMSFNCTreeViewColumnsLayouts);\r\nbegin\r\n if FLayouts <> Value then\r\n begin\r\n FLayouts := Value;\r\n FTreeView.UpdateTreeViewCache;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewColumnsAppearance.SetOptimizedColumnDisplay(\r\n const Value: Boolean);\r\nbegin\r\n if FOptimizedColumnDisplay <> Value then\r\n begin\r\n FOptimizedColumnDisplay := Value;\r\n FTreeView.UpdateColumns;\r\n FTreeView.UpdateTreeViewCache;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewColumnsAppearance.SetSortIndicatorColor(\r\n const Value: TTMSFNCGraphicsColor);\r\nbegin\r\n if FSortIndicatorColor <> Value then\r\n begin\r\n FSortIndicatorColor := Value;\r\n FTreeView.Invalidate;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewColumnsAppearance.SetStretch(const Value: Boolean);\r\nbegin\r\n if FStretch <> Value then\r\n begin\r\n FStretch := Value;\r\n FTreeView.UpdateColumns;\r\n FTreeView.UpdateTreeViewCache;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewColumnsAppearance.SetStretchColumn(const Value: Integer);\r\nbegin\r\n if FStretchColumn <> Value then\r\n begin\r\n FStretchColumn := Value;\r\n FTreeView.UpdateColumns;\r\n FTreeView.UpdateTreeViewCache;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewColumnsAppearance.SetStretchAll(const Value: Boolean);\r\nbegin\r\n if FStretchAll <> Value then\r\n begin\r\n FStretchAll := Value;\r\n FTreeView.UpdateColumns;\r\n FTreeView.UpdateTreeViewCache;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewColumnsAppearance.SetTopFill(const Value: TTMSFNCGraphicsFill);\r\nbegin\r\n if FTopFill <> Value then\r\n FTopFill.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewColumnsAppearance.SetTopFont(const Value: TTMSFNCGraphicsFont);\r\nbegin\r\n if FTopFont <> Value then\r\n FTopFont.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewColumnsAppearance.SetTopSize(const Value: Double);\r\nbegin\r\n if FTopSize <> Value then\r\n begin\r\n FTopSize := Value;\r\n Changed(Self);\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewColumnsAppearance.SetTopStroke(\r\n const Value: TTMSFNCGraphicsStroke);\r\nbegin\r\n if FTopStroke <> Value then\r\n FTopStroke.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewColumnsAppearance.SetTopVerticalText(\r\n const Value: Boolean);\r\nbegin\r\n if FTopVerticalText <> Value then\r\n begin\r\n FTopVerticalText := Value;\r\n Changed(Self);\r\n end;\r\nend;\r\n\r\n{ TTMSFNCTreeViewGroupsAppearance }\r\n\r\nprocedure TTMSFNCTreeViewGroupsAppearance.Assign(Source: TPersistent);\r\nbegin\r\n if Source is TTMSFNCTreeViewGroupsAppearance then\r\n begin\r\n FLayouts := (Source as TTMSFNCTreeViewGroupsAppearance).Layouts;\r\n FTopSize := (Source as TTMSFNCTreeViewGroupsAppearance).TopSize;\r\n FBottomSize := (Source as TTMSFNCTreeViewGroupsAppearance).BottomSize;\r\n FBottomFill.Assign((Source as TTMSFNCTreeViewGroupsAppearance).BottomFill);\r\n FBottomFont.Assign((Source as TTMSFNCTreeViewGroupsAppearance).BottomFont);\r\n FBottomStroke.Assign((Source as TTMSFNCTreeViewGroupsAppearance).BottomStroke);\r\n FTopFill.Assign((Source as TTMSFNCTreeViewGroupsAppearance).TopFill);\r\n FTopStroke.Assign((Source as TTMSFNCTreeViewGroupsAppearance).TopStroke);\r\n FTopFont.Assign((Source as TTMSFNCTreeViewGroupsAppearance).TopFont);\r\n FTopHorizontalTextAlign := (Source as TTMSFNCTreeViewGroupsAppearance).TopHorizontalTextAlign;\r\n FTopVerticalTextAlign := (Source as TTMSFNCTreeViewGroupsAppearance).TopVerticalTextAlign;\r\n FBottomHorizontalTextAlign := (Source as TTMSFNCTreeViewGroupsAppearance).BottomHorizontalTextAlign;\r\n FBottomVerticalTextAlign := (Source as TTMSFNCTreeViewGroupsAppearance).BottomVerticalTextAlign;\r\n FTopVerticalText := (Source as TTMSFNCTreeViewGroupsAppearance).TopVerticalText;\r\n FBottomVerticalText := (Source as TTMSFNCTreeViewGroupsAppearance).BottomVerticalText;\r\n FFillEmptySpaces := (Source as TTMSFNCTreeViewGroupsAppearance).FillEmptySpaces;\r\n end;\r\nend;\r\n\r\nconstructor TTMSFNCTreeViewGroupsAppearance.Create(\r\n ATreeView: TTMSFNCCustomTreeView);\r\nbegin\r\n FTreeView := ATreeView;\r\n FLayouts := [tglTop];\r\n FFillEmptySpaces := True;\r\n FTopSize := 50;\r\n FBottomSize := 50;\r\n FTopVerticalText := False;\r\n FBottomVerticalText := False;\r\n FTopHorizontalTextAlign := gtaCenter;\r\n FTopVerticalTextAlign := gtaCenter;\r\n FBottomHorizontalTextAlign := gtaCenter;\r\n FBottomVerticalTextAlign := gtaCenter;\r\n FBottomFill := TTMSFNCGraphicsFill.Create(gfkSolid, gcWhite);\r\n FBottomStroke := TTMSFNCGraphicsStroke.Create(gskSolid, gcDarkGray);\r\n FTopFill := TTMSFNCGraphicsFill.Create(gfkSolid, gcWhite);\r\n FTopStroke := TTMSFNCGraphicsStroke.Create(gskSolid, gcDarkGray);\r\n\r\n FTopFont := TTMSFNCGraphicsFont.Create;\r\n FTopFont.Color := gcBlack;\r\n FBottomFont := TTMSFNCGraphicsFont.Create;\r\n FBottomFont.Color := gcBlack;\r\n\r\n FBottomFill.OnChanged := @Changed;\r\n FTopFill.OnChanged := @Changed;\r\n FBottomStroke.OnChanged := @Changed;\r\n FTopStroke.OnChanged := @Changed;\r\n\r\n FTopFont.OnChanged := @Changed;\r\n FBottomFont.OnChanged := @Changed;\r\nend;\r\n\r\ndestructor TTMSFNCTreeViewGroupsAppearance.Destroy;\r\nbegin\r\n FBottomFont.Free;\r\n FTopFont.Free;\r\n FBottomFill.Free;\r\n FBottomStroke.Free;\r\n FTopFill.Free;\r\n FTopStroke.Free;\r\n inherited;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewGroupsAppearance.Changed(Sender: TObject);\r\nbegin\r\n FTreeView.UpdateTreeViewCache;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewGroupsAppearance.SetBottomFill(const Value: TTMSFNCGraphicsFill);\r\nbegin\r\n if FBottomFill <> Value then\r\n FBottomFill.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewGroupsAppearance.SetBottomHorizontalTextAlign(\r\n const Value: TTMSFNCGraphicsTextAlign);\r\nbegin\r\n if FBottomHorizontalTextAlign <> Value then\r\n begin\r\n FBottomHorizontalTextAlign := Value;\r\n Changed(Self);\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewGroupsAppearance.SetBottomFont(const Value: TTMSFNCGraphicsFont);\r\nbegin\r\n if FBottomFont <> Value then\r\n FBottomFont.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewGroupsAppearance.SetBottomSize(const Value: Double);\r\nbegin\r\n if FBottomSize <> Value then\r\n begin\r\n FBottomSize := Value;\r\n FTreeView.UpdateTreeViewCache;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewGroupsAppearance.SetBottomStroke(\r\n const Value: TTMSFNCGraphicsStroke);\r\nbegin\r\n if FBottomStroke <> Value then\r\n FBottomStroke.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewGroupsAppearance.SetBottomVerticalTextAlign(\r\n const Value: TTMSFNCGraphicsTextAlign);\r\nbegin\r\n if FBottomVerticalTextAlign <> Value then\r\n begin\r\n FBottomVerticalTextAlign := Value;\r\n Changed(Self);\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewGroupsAppearance.SetBottomVerticalText(\r\n const Value: Boolean);\r\nbegin\r\n if FBottomVerticalText <> Value then\r\n begin\r\n FBottomVerticalText := Value;\r\n Changed(Self);\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewGroupsAppearance.SetFillEmptySpaces(\r\n const Value: Boolean);\r\nbegin\r\n if FFillEmptySpaces <> Value then\r\n begin\r\n FFillEmptySpaces := Value;\r\n FTreeView.Invalidate;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewGroupsAppearance.SetLayouts(\r\n const Value: TTMSFNCTreeViewGroupsLayouts);\r\nbegin\r\n if FLayouts <> Value then\r\n begin\r\n FLayouts := Value;\r\n FTreeView.UpdateTreeViewCache;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewGroupsAppearance.SetTopFill(const Value: TTMSFNCGraphicsFill);\r\nbegin\r\n if FTopFill <> Value then\r\n FTopFill.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewGroupsAppearance.SetTopFont(const Value: TTMSFNCGraphicsFont);\r\nbegin\r\n if FTopFont <> Value then\r\n FTopFont.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewGroupsAppearance.SetTopHorizontalTextAlign(\r\n const Value: TTMSFNCGraphicsTextAlign);\r\nbegin\r\n if FTopHorizontalTextAlign <> Value then\r\n begin\r\n FTopHorizontalTextAlign := Value;\r\n Changed(Self);\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewGroupsAppearance.SetTopSize(const Value: Double);\r\nbegin\r\n if FTopSize <> Value then\r\n begin\r\n FTopSize := Value;\r\n FTreeView.UpdateTreeViewCache;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewGroupsAppearance.SetTopStroke(\r\n const Value: TTMSFNCGraphicsStroke);\r\nbegin\r\n if FTopStroke <> Value then\r\n FTopStroke.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewGroupsAppearance.SetTopVerticalTextAlign(\r\n const Value: TTMSFNCGraphicsTextAlign);\r\nbegin\r\n if FTopVerticalTextAlign <> Value then\r\n begin\r\n FTopVerticalTextAlign := Value;\r\n Changed(Self);\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewGroupsAppearance.SetTopVerticalText(const Value: Boolean);\r\nbegin\r\n if FTopVerticalText <> Value then\r\n begin\r\n FTopVerticalText := Value;\r\n Changed(Self);\r\n end;\r\nend;\r\n\r\n{ TTMSFNCTreeViewInteraction }\r\n\r\nprocedure TTMSFNCTreeViewInteraction.Assign(Source: TPersistent);\r\nbegin\r\n if (Source is TTMSFNCTreeViewInteraction) then\r\n begin\r\n FMultiSelect := (Source as TTMSFNCTreeViewInteraction).MultiSelect;\r\n FTouchScrolling := (Source as TTMSFNCTreeViewInteraction).TouchScrolling;\r\n FReadOnly := (Source as TTMSFNCTreeViewInteraction).ReadOnly;\r\n FColumnSizing := (Source as TTMSFNCTreeViewInteraction).ColumnSizing;\r\n FColumnAutoSizeOnDblClick := (Source as TTMSFNCTreeViewInteraction).ColumnAutoSizeOnDblClick;\r\n FExtendedSelectable := (Source as TTMSFNCTreeViewInteraction).ExtendedSelectable;\r\n FSelectionFollowsFocus := (Source as TTMSFNCTreeViewInteraction).SelectionFollowsFocus;\r\n FKeyboardEdit := (Source as TTMSFNCTreeViewInteraction).KeyboardEdit;\r\n FMouseEditMode := (Source as TTMSFNCTreeViewInteraction).MouseEditMode;\r\n FExtendedEditable := (Source as TTMSFNCTreeViewInteraction).ExtendedEditable;\r\n FClipboardMode := (Source as TTMSFNCTreeViewInteraction).ClipboardMode;\r\n FReorder := (Source as TTMSFNCTreeViewInteraction).Reorder;\r\n FDragDropMode := (Source as TTMSFNCTreeViewInteraction).DragDropMode;\r\n FLookup.Assign((Source as TTMSFNCTreeViewInteraction).Lookup);\r\n FExpandCollapseOnDblClick := (Source as TTMSFNCTreeViewInteraction).ExpandCollapseOnDblClick;\r\n FAutoOpenURL := (Source as TTMSFNCTreeViewInteraction).AutoOpenURL;\r\n FURLDetectionOnMouseMove := (Source as TTMSFNCTreeViewInteraction).URLDetectionOnMouseMove;\r\n FMouseWheelDelta := (Source as TTMSFNCTreeViewInteraction).MouseWheelDelta;\r\n FAnimationFactor := (Source as TTMSFNCTreeViewInteraction).AnimationFactor;\r\n end;\r\nend;\r\n\r\nconstructor TTMSFNCTreeViewInteraction.Create(ATreeView: TTMSFNCCustomTreeView);\r\nbegin\r\n FTreeView := ATreeView;\r\n FAutoOpenURL := True;\r\n FAnimationFactor := 2.5;\r\n FMouseWheelDelta := 1;\r\n FClipboardMode := tcmNone;\r\n FExpandCollapseOnDblClick := True;\r\n FReorder := False;\r\n FDragDropMode := tdmNone;\r\n FReadOnly := False;\r\n FURLDetectionOnMouseMove := True;\r\n FSelectionFollowsFocus := True;\r\n FTouchScrolling := True;\r\n FKeyboardEdit := True;\r\n FExtendedSelectable := False;\r\n FMultiSelect := False;\r\n FColumnSizing := False;\r\n FExtendedEditable := False;\r\n FColumnAutoSizeOnDblClick := False;\r\n FMouseEditMode := tmemSingleClickOnSelectedNode;\r\n FLookup := TTMSFNCTreeViewLookup.Create(Self);\r\n FMultiSelectStyle := [msControlSelect, msShiftSelect];\r\nend;\r\n\r\ndestructor TTMSFNCTreeViewInteraction.Destroy;\r\nbegin\r\n FLookup.Free;\r\n inherited;\r\nend;\r\n\r\nfunction TTMSFNCTreeViewInteraction.IsAnimationFactorStored: Boolean;\r\nbegin\r\n Result := AnimationFactor <> 2.5;\r\nend;\r\n\r\nfunction TTMSFNCTreeViewInteraction.IsMouseWheelDeltaStored: Boolean;\r\nbegin\r\n Result := MouseWheelDelta <> 1;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewInteraction.SetColumnAutoSizeOnDblClick(\r\n const Value: Boolean);\r\nbegin\r\n if FColumnAutoSizeOnDblClick <> Value then\r\n FColumnAutoSizeOnDblClick := Value;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewInteraction.SetColumnSizing(const Value: Boolean);\r\nbegin\r\n if FColumnSizing <> Value then\r\n begin\r\n FColumnSizing := Value;\r\n if Assigned(FTreeView) and FColumnSizing then\r\n FTreeView.ColumnsAppearance.StretchAll := False;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewInteraction.SetDragDropMode(const Value: TTMSFNCTreeViewDragDropMode);\r\nbegin\r\n if FDragDropMode <> Value then\r\n FDragDropMode := Value;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewInteraction.SetExpandCollapseOnDblClick(\r\n const Value: Boolean);\r\nbegin\r\n if FExpandCollapseOnDblClick <> Value then\r\n FExpandCollapseOnDblClick := Value;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewInteraction.SetExtendedEditable(const Value: Boolean);\r\nbegin\r\n if FExtendedEditable <> Value then\r\n FExtendedEditable := Value;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewInteraction.SetExtendedSelectable(\r\n const Value: Boolean);\r\nbegin\r\n if FExtendedSelectable <> Value then\r\n FExtendedSelectable := Value;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewInteraction.SetLookup(\r\n const Value: TTMSFNCTreeViewLookup);\r\nbegin\r\n if FLookup <> Value then\r\n FLookup.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewInteraction.SetMouseEditMode(\r\n const Value: TTMSFNCTreeViewMouseEditMode);\r\nbegin\r\n if FMouseEditMode <> Value then\r\n FMouseEditMode := Value;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewInteraction.SetMouseWheelDelta(const Value: Single);\r\nbegin\r\n FMouseWheelDelta := Value;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewInteraction.SetMultiSelect(const Value: Boolean);\r\nbegin\r\n if FMultiSelect <> Value then\r\n FMultiSelect := Value;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewInteraction.SetMultiSelectStyle(const Value: TMultiSelectStyle);\r\nbegin\r\n if Value <> FMultiSelectStyle then\r\n begin\r\n FMultiSelectStyle := Value;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewInteraction.SetReadOnly(const Value: Boolean);\r\nbegin\r\n if FReadOnly <> Value then\r\n FReadOnly := Value;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewInteraction.SetReorder(const Value: Boolean);\r\nbegin\r\n if FReorder <> Value then\r\n FReorder := Value;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewInteraction.SetSelectionFollowsFocus(\r\n const Value: Boolean);\r\nbegin\r\n if FSelectionFollowsFocus <> Value then\r\n FSelectionFollowsFocus := Value;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewInteraction.SetTouchScrolling(const Value: Boolean);\r\nbegin\r\n if FTouchScrolling <> Value then\r\n FTouchScrolling := Value;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewInteraction.SetURLDetectionOnMouseMove(\r\n const Value: Boolean);\r\nbegin\r\n if FURLDetectionOnMouseMove <> Value then\r\n begin\r\n FURLDetectionOnMouseMove := Value;\r\n end;\r\nend;\r\n\r\n{$IFDEF CMNWEBLIB}\r\nconstructor TTMSFNCTreeViewEdit.Create(AOwner: TComponent);\r\nbegin\r\n inherited;\r\n if AOwner is TTMSFNCCustomTreeView then\r\n FTreeView := AOwner as TTMSFNCCustomTreeView;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewEdit.DoExit;\r\nbegin\r\n inherited;\r\n if Assigned(FTreeView) and FTreeView.FInplaceEditorActive then\r\n FTreeView.CloseInplaceEditor(False);\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewEdit.KeyDown(var Key: Word; Shift: TShiftState);\r\nbegin\r\n inherited;\r\n if Assigned(FTreeView) and FTreeView.FInplaceEditorActive then\r\n begin\r\n case Key of\r\n KEY_ESCAPE:\r\n begin\r\n FTreeView.CloseInplaceEditor(True, True);\r\n Key := 0;\r\n end;\r\n KEY_F2, KEY_RETURN:\r\n begin\r\n FTreeView.CloseInplaceEditor(False, True);\r\n Key := 0;\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\nconstructor TTMSFNCTreeViewMemo.Create(AOwner: TComponent);\r\nbegin\r\n inherited;\r\n if AOwner is TTMSFNCCustomTreeView then\r\n FTreeView := AOwner as TTMSFNCCustomTreeView;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewMemo.DoExit;\r\nbegin\r\n inherited;\r\n if Assigned(FTreeView) and FTreeView.FInplaceEditorActive then\r\n FTreeView.CloseInplaceEditor(False);\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewMemo.KeyDown(var Key: Word; Shift: TShiftState);\r\nbegin\r\n inherited;\r\n if Assigned(FTreeView) and FTreeView.FInplaceEditorActive then\r\n begin\r\n case Key of\r\n KEY_ESCAPE:\r\n begin\r\n FTreeView.CloseInplaceEditor(True, True);\r\n Key := 0;\r\n end;\r\n KEY_F2:\r\n begin\r\n FTreeView.CloseInplaceEditor(False, True);\r\n Key := 0;\r\n end;\r\n end;\r\n end;\r\nend;\r\n{$ENDIF}\r\n\r\n{$IFDEF FMXLIB}\r\nfunction TTMSFNCTreeViewEdit.GetDefaultStyleLookupName: string;\r\nbegin\r\n Result := 'editstyle';\r\nend;\r\n{$ENDIF}\r\n\r\n{ TTMSFNCTreeViewLookup }\r\n\r\nprocedure TTMSFNCTreeViewLookup.Assign(Source: TPersistent);\r\nbegin\r\n if Source is TTMSFNCTreeViewLookup then\r\n begin\r\n FEnabled := (Source as TTMSFNCTreeViewLookup).Enabled;\r\n FCaseSensitive := (Source as TTMSFNCTreeViewLookup).CaseSensitive;\r\n FIncremental := (Source as TTMSFNCTreeViewLookup).Incremental;\r\n FColumn := (Source as TTMSFNCTreeViewLookup).Column;\r\n FAutoSelect := (Source as TTMSFNCTreeViewLookup).AutoSelect;\r\n FAutoExpand := (Source as TTMSFNCTreeViewLookup).AutoExpand;\r\n FRootNodesOnly := (Source as TTMSFNCTreeViewLookup).RootNodesOnly;\r\n FVisibleNodesOnly := (Source as TTMSFNCTreeViewLookup).VisibleNodesOnly;\r\n end;\r\nend;\r\n\r\nconstructor TTMSFNCTreeViewLookup.Create(AOwner: TTMSFNCTreeViewInteraction);\r\nbegin\r\n FOwner := AOwner;\r\n FEnabled := True;\r\n FCaseSensitive := False;\r\n FIncremental := True;\r\n FColumn := -1;\r\n FAutoSelect := True;\r\n FAutoExpand := False;\r\n FRootNodesOnly := False;\r\n FVisibleNodesOnly := False;\r\nend;\r\n\r\ndestructor TTMSFNCTreeViewLookup.Destroy;\r\nbegin\r\n\r\n inherited;\r\nend;\r\n\r\n{ TTMSFNCTreeViewAdapter }\r\n\r\nprocedure TTMSFNCTreeViewAdapter.ExportNotification(AState: TTMSFNCTreeViewExportState; ARow: Integer);\r\nbegin\r\n\r\nend;\r\n\r\nconstructor TTMSFNCTreeViewAdapter.Create(AOwner: TComponent);\r\nvar\r\n I: Integer;\r\nbegin\r\n inherited;\r\n FActive := False;\r\n if IsDesignTime and Assigned(AOwner) and (AOwner is TCustomForm) then\r\n begin\r\n for I := 0 to AOwner.ComponentCount - 1 do\r\n begin\r\n if (AOwner.Components[i] is TTMSFNCCustomTreeView) then\r\n begin\r\n TreeView := AOwner.Components[i] as TTMSFNCCustomTreeView;\r\n Break;\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewAdapter.Notification(AComponent: TComponent;\r\n Operation: TOperation);\r\nbegin\r\n inherited;\r\n if (Operation = opRemove) and (AComponent = FTreeView) then\r\n FTreeView := nil;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewAdapter.ScrollTreeView(ADelta: Integer);\r\nbegin\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewAdapter.SelectNode(ANode: TTMSFNCTreeViewVirtualNode);\r\nbegin\r\n\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewAdapter.SetActive(const Value: boolean);\r\nbegin\r\n FActive := Value;\r\n if not Assigned(TreeView) then\r\n Exit;\r\n Initialize;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewAdapter.SetTreeView(const Value: TTMSFNCCustomTreeView);\r\nbegin\r\n if FTreeView <> Value then\r\n begin\r\n FTreeView := Value;\r\n if FBlockAdd then\r\n Exit;\r\n\r\n FBlockAdd := True;\r\n if Assigned(FTreeView) then\r\n begin\r\n FTreeView.Adapter := Self;\r\n Initialize;\r\n end;\r\n FBlockAdd := False;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewAdapter.UpdateBounds;\r\nbegin\r\n\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewAdapter.GetNodeText(ACol: Integer; ANode: TTMSFNCTreeViewVirtualNode;\r\n var AText: String);\r\nbegin\r\n\r\nend;\r\n\r\nfunction TTMSFNCTreeViewAdapter.GetColumnDisplayName(ACol: Integer): String;\r\nbegin\r\n Result := '';\r\nend;\r\n\r\nfunction TTMSFNCTreeViewAdapter.GetInstance: NativeUInt;\r\nbegin\r\n Result := HInstance;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewAdapter.GetNumberOfNodes(ANode: TTMSFNCTreeViewVirtualNode; var ANumberOfNodes: Integer);\r\nbegin\r\n\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewAdapter.Initialize;\r\nbegin\r\nend;\r\n\r\n{$IFDEF WEBLIB}\r\nfunction TTMSFNCTreeViewCache.GetItem(Index: Integer): TTMSFNCTreeViewCacheItem;\r\nbegin\r\n Result := TTMSFNCTreeViewCacheItem(inherited Items[Index]);\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewCache.SetItem(Index: Integer; const Value: TTMSFNCTreeViewCacheItem);\r\nbegin\r\n inherited Items[Index] := Value;\r\nend;\r\n\r\nfunction TTMSFNCTreeViewDisplayList.GetItem(Index: Integer): TTMSFNCTreeViewCacheItem;\r\nbegin\r\n Result := TTMSFNCTreeViewCacheItem(inherited Items[Index]);\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewDisplayList.SetItem(Index: Integer; const Value: TTMSFNCTreeViewCacheItem);\r\nbegin\r\n inherited Items[Index] := Value;\r\nend;\r\n\r\nfunction TTMSFNCTreeViewSelectedNodes.GetItem(Index: Integer): TTMSFNCTreeViewVirtualNode;\r\nbegin\r\n Result := TTMSFNCTreeViewVirtualNode(inherited Items[Index]);\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewSelectedNodes.SetItem(Index: Integer; const Value: TTMSFNCTreeViewVirtualNode);\r\nbegin\r\n inherited Items[Index] := Value;\r\nend;\r\n{$ENDIF}\r\n\r\n{$IFDEF FNCLIB}\r\n{ TTMSFNCTreeViewViewJSONOptions }\r\n\r\nprocedure TTMSFNCTreeViewViewJSONOptions.Assign(Source: TPersistent);\r\nbegin\r\n if (Source is TTMSFNCTreeViewViewJSONOptions) then\r\n begin\r\n FExpandNodes := (Source as TTMSFNCTreeViewViewJSONOptions).ExpandNodes;\r\n FStretchColumn := (Source as TTMSFNCTreeViewViewJSONOptions).StretchColumn;\r\n FNameHTMLTemplate := (Source as TTMSFNCTreeViewViewJSONOptions).NameHTMLTemplate;\r\n FValueHTMLTemplate := (Source as TTMSFNCTreeViewViewJSONOptions).ValueHTMLTemplate;\r\n FArrayItemPrefix := (Source as TTMSFNCTreeViewViewJSONOptions).ArrayItemPrefix;\r\n FArrayItemSuffix := (Source as TTMSFNCTreeViewViewJSONOptions).ArrayItemSuffix;\r\n end\r\n else\r\n inherited;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewViewJSONOptions.Changed;\r\nbegin\r\n if Assigned(OnChange) then\r\n OnChange(Self);\r\nend;\r\n\r\nconstructor TTMSFNCTreeViewViewJSONOptions.Create;\r\nbegin\r\n FExpandNodes := True;\r\n FStretchColumn := 1;\r\n FNameHTMLTemplate := '<#NAME>';\r\n FValueHTMLTemplate := '<#VALUE>';\r\n FArrayItemPrefix := '';\r\n FArrayItemSuffix := '';\r\nend;\r\n\r\ndestructor TTMSFNCTreeViewViewJSONOptions.Destroy;\r\nbegin\r\n\r\n inherited;\r\nend;\r\n{$ENDIF}\r\n\r\n{$IFDEF WEBLIB}\r\ninitialization\r\nbegin\r\n TTMSFNCBitmap.CreateFromResource(TTMSFNCTREEVIEWEXPAND);\r\n TTMSFNCBitmap.CreateFromResource(TTMSFNCTREEVIEWEXPANDLARGE);\r\n TTMSFNCBitmap.CreateFromResource(TTMSFNCTREEVIEWCOLLAPSE);\r\n TTMSFNCBitmap.CreateFromResource(TTMSFNCTREEVIEWCOLLAPSELARGE);\r\nend;\r\n{$ENDIF}\r\n\r\nend.\r\n","{********************************************************************}\r\n{ }\r\n{ written by TMS Software }\r\n{ copyright (c) 2016 - 2021 }\r\n{ Email : info@tmssoftware.com }\r\n{ Web : https://www.tmssoftware.com }\r\n{ }\r\n{ The source code is given as is. The author is not responsible }\r\n{ for any possible damage done due to the use of this code. }\r\n{ The complete source code remains property of the author and may }\r\n{ not be distributed, published, given or sold in any form as such. }\r\n{ No parts of the source code can be included in any other component }\r\n{ or application without written authorization of the author. }\r\n{********************************************************************}\r\n\r\nunit WEBLib.TMSFNCCustomSelector;\r\n\r\n{$I WEBLib.TMSFNCDefines.inc}\r\n\r\ninterface\r\n\r\nuses\r\n Classes, WEBLib.TMSFNCTypes, WEBLib.TMSFNCGraphics, WEBLib.TMSFNCGraphicsTypes,\r\n WEBLib.TMSFNCCustomControl, WEBLib.Controls\r\n {$IFNDEF WEBLIB}\r\n {$IFNDEF LCLLIB}\r\n ,UITypes, Generics.Collections, Types\r\n {$ENDIF}\r\n {$ENDIF}\r\n {$IFDEF LCLLIB}\r\n ,fgl\r\n {$ENDIF}\r\n ;\r\n\r\nconst\r\n MAJ_VER = 1; // Major version nr.\r\n MIN_VER = 0; // Minor version nr.\r\n REL_VER = 1; // Release nr.\r\n BLD_VER = 0; // Build nr.\r\n\r\n //Version history\r\n //v1.0.0.0 : First Release\r\n //v1.0.1.0 : New : High DPI support for TTMSFNCCustomSelector\r\n\r\ntype\r\n TTMSFNCCustomSelector = class;\r\n\r\n TTMSFNCCustomSelectorItemState = (isNormal, isHover, isDown, isSelected, isDisabled);\r\n\r\n TTMSFNCCustomSelectorItem = class(TCollectionItem)\r\n private\r\n FOwner: TTMSFNCCustomSelector;\r\n FRowSpan: Integer;\r\n FColumnSpan: Integer;\r\n FVisible: Boolean;\r\n FText: String;\r\n FEnabled: Boolean;\r\n FSeparator: Boolean;\r\n FSeparatorHeight: Single;\r\n FMargins: TTMSFNCMargins;\r\n FCanDeselect: Boolean;\r\n FCanSelect: Boolean;\r\n FVerticalTextAlign: TTMSFNCGraphicsTextAlign;\r\n FHorizontalTextAlign: TTMSFNCGraphicsTextAlign;\r\n FHint: string;\r\n FDataBoolean: Boolean;\r\n FDataString: String;\r\n FDataObject: TObject;\r\n FDataInteger: NativeInt;\r\n FDataPointer: Pointer;\r\n procedure SetColumnSpan(const Value: Integer);\r\n procedure SetRowSpan(const Value: Integer);\r\n procedure SetVisible(const Value: Boolean);\r\n procedure SetText(const Value: String);\r\n procedure SetEnabled(const Value: Boolean);\r\n procedure SetSeparator(const Value: Boolean);\r\n procedure SetSeparatorHeight(const Value: Single);\r\n procedure SetMargins(const Value: TTMSFNCMargins);\r\n procedure SetCanDeselect(const Value: Boolean);\r\n procedure SetCanSelect(const Value: Boolean);\r\n procedure SetHorizontalTextAlign(const Value: TTMSFNCGraphicsTextAlign);\r\n procedure SetVerticalTextAlign(const Value: TTMSFNCGraphicsTextAlign);\r\n function IsSeparatorHeightStored: Boolean;\r\n protected\r\n procedure MarginsChanged(Sender: TObject);\r\n public\r\n constructor Create(ACollection: TCollection); override;\r\n procedure Assign(Source: TPersistent); override;\r\n function State: TTMSFNCCustomSelectorItemState;\r\n destructor Destroy; override;\r\n property DataPointer: Pointer read FDataPointer write FDataPointer;\r\n property DataBoolean: Boolean read FDataBoolean write FDataBoolean;\r\n property DataObject: TObject read FDataObject write FDataObject;\r\n property DataString: String read FDataString write FDataString;\r\n property DataInteger: NativeInt read FDataInteger write FDataInteger;\r\n published\r\n property CanSelect: Boolean read FCanSelect write SetCanSelect default True;\r\n property CanDeselect: Boolean read FCanDeselect write SetCanDeselect default True;\r\n property ColumnSpan: Integer read FColumnSpan write SetColumnSpan default 1;\r\n property RowSpan: Integer read FRowSpan write SetRowSpan default 1;\r\n property Visible: Boolean read FVisible write SetVisible default True;\r\n property Enabled: Boolean read FEnabled write SetEnabled default True;\r\n property Separator: Boolean read FSeparator write SetSeparator default False;\r\n property SeparatorHeight: Single read FSeparatorHeight write SetSeparatorHeight stored IsSeparatorHeightStored nodefault;\r\n property Margins: TTMSFNCMargins read FMargins write SetMargins;\r\n property Text: String read FText write SetText;\r\n property HorizontalTextAlign: TTMSFNCGraphicsTextAlign read FHorizontalTextAlign write SetHorizontalTextAlign default gtaCenter;\r\n property VerticalTextAlign: TTMSFNCGraphicsTextAlign read FVerticalTextAlign write SetVerticalTextAlign default gtaCenter;\r\n property Hint: string read FHint write FHint;\r\n end;\r\n\r\n {$IFDEF WEBLIB}\r\n TTMSFNCCustomSelectorItems = class(TTMSFNCOwnedCollection)\r\n {$ENDIF}\r\n {$IFNDEF WEBLIB}\r\n TTMSFNCCustomSelectorItems = class({$IFDEF LCLLIB}specialize {$ENDIF}TTMSFNCOwnedCollection)\r\n {$ENDIF}\r\n private\r\n FOwner: TTMSFNCCustomSelector;\r\n function GetItem(Index: Integer): TTMSFNCCustomSelectorItem;\r\n procedure SetItem(Index: Integer; const Value: TTMSFNCCustomSelectorItem);\r\n protected\r\n function CreateItemClass: TCollectionItemClass; virtual;\r\n function GetOwner: TPersistent; override;\r\n public\r\n constructor Create(AOwner: TTMSFNCCustomSelector); virtual;\r\n property Items[Index: Integer]: TTMSFNCCustomSelectorItem read GetItem write SetItem; default;\r\n function Add: TTMSFNCCustomSelectorItem;\r\n function Insert(Index: Integer): TTMSFNCCustomSelectorItem;\r\n end;\r\n\r\n TTMSFNCCustomSelectorAppearance = class(TPersistent)\r\n private\r\n FOwner: TTMSFNCCustomSelector;\r\n FStrokeHover: TTMSFNCGraphicsStroke;\r\n FFillDown: TTMSFNCGraphicsFill;\r\n FVerticalSpacing: Single;\r\n FStrokeDown: TTMSFNCGraphicsStroke;\r\n FFillSelected: TTMSFNCGraphicsFill;\r\n FHorizontalSpacing: Single;\r\n FStrokeSelected: TTMSFNCGraphicsStroke;\r\n FFill: TTMSFNCGraphicsFill;\r\n FFillHover: TTMSFNCGraphicsFill;\r\n FStroke: TTMSFNCGraphicsStroke;\r\n FFillDisabled: TTMSFNCGraphicsFill;\r\n FStrokeDisabled: TTMSFNCGraphicsStroke;\r\n FSeparatorStroke: TTMSFNCGraphicsStroke;\r\n FFont: TTMSFNCGraphicsFont;\r\n procedure SetFill(const Value: TTMSFNCGraphicsFill);\r\n procedure SetFillDown(const Value: TTMSFNCGraphicsFill);\r\n procedure SetFillHover(const Value: TTMSFNCGraphicsFill);\r\n procedure SetFillSelected(const Value: TTMSFNCGraphicsFill);\r\n procedure SetHorizontalSpacing(const Value: Single);\r\n procedure SetStroke(const Value: TTMSFNCGraphicsStroke);\r\n procedure SetStrokeDown(const Value: TTMSFNCGraphicsStroke);\r\n procedure SetStrokeHover(const Value: TTMSFNCGraphicsStroke);\r\n procedure SetStrokeSelected(const Value: TTMSFNCGraphicsStroke);\r\n procedure SetVerticalSpacing(const Value: Single);\r\n procedure SetFillDisabled(const Value: TTMSFNCGraphicsFill);\r\n procedure SetStrokeDisabled(const Value: TTMSFNCGraphicsStroke);\r\n procedure SetSeparatorStroke(const Value: TTMSFNCGraphicsStroke);\r\n procedure SetFont(const Value: TTMSFNCGraphicsFont);\r\n function IsHorizontalSpacingStored: Boolean;\r\n function IsVerticalSpacingStored: Boolean;\r\n protected\r\n procedure Changed;\r\n procedure FontChanged(Sender: TObject);\r\n procedure FillChanged(Sender: TObject);\r\n procedure StrokeChanged(Sender: TObject);\r\n public\r\n constructor Create(AOwner: TTMSFNCCustomSelector);\r\n procedure Assign(Source: TPersistent); override;\r\n destructor Destroy; override;\r\n published\r\n property Stroke: TTMSFNCGraphicsStroke read FStroke write SetStroke;\r\n property Fill: TTMSFNCGraphicsFill read FFill write SetFill;\r\n property StrokeHover: TTMSFNCGraphicsStroke read FStrokeHover write SetStrokeHover;\r\n property FillHover: TTMSFNCGraphicsFill read FFillHover write SetFillHover;\r\n property StrokeDown: TTMSFNCGraphicsStroke read FStrokeDown write SetStrokeDown;\r\n property FillDown: TTMSFNCGraphicsFill read FFillDown write SetFillDown;\r\n property StrokeSelected: TTMSFNCGraphicsStroke read FStrokeSelected write SetStrokeSelected;\r\n property FillSelected: TTMSFNCGraphicsFill read FFillSelected write SetFillSelected;\r\n property StrokeDisabled: TTMSFNCGraphicsStroke read FStrokeDisabled write SetStrokeDisabled;\r\n property FillDisabled: TTMSFNCGraphicsFill read FFillDisabled write SetFillDisabled;\r\n property VerticalSpacing: Single read FVerticalSpacing write SetVerticalSpacing stored IsVerticalSpacingStored nodefault;\r\n property HorizontalSpacing: Single read FHorizontalSpacing write SetHorizontalSpacing stored IsHorizontalSpacingStored nodefault;\r\n property SeparatorStroke: TTMSFNCGraphicsStroke read FSeparatorStroke write SetSeparatorStroke;\r\n property Font: TTMSFNCGraphicsFont read FFont write SetFont;\r\n end;\r\n\r\n TTMSFNCCustomSelectorPositionItem = record\r\n TileSet: Boolean;\r\n {$IFDEF LCLLIB}\r\n class operator = (z1, z2 : TTMSFNCCustomSelectorPositionItem) b : Boolean;\r\n {$ENDIF}\r\n end;\r\n\r\n TTMSFNCCustomSelectorDisplayItem = record\r\n Rect: TRectF;\r\n Item: TTMSFNCCustomSelectorItem;\r\n PageIndex: Integer;\r\n Column, Row, ColumnSpan, RowSpan: Integer;\r\n {$IFDEF LCLLIB}\r\n class operator = (z1, z2 : TTMSFNCCustomSelectorDisplayItem) b : Boolean;\r\n {$ENDIF}\r\n end;\r\n\r\n TTMSFNCCustomSelectorItemPosArray = array of array of TTMSFNCCustomSelectorPositionItem;\r\n\r\n TTMSFNCCustomSelectorItemSelected = procedure(Sender: TObject; AItemIndex: Integer) of object;\r\n TTMSFNCCustomSelectorItemDeselected = procedure(Sender: TObject; AItemIndex: Integer) of object;\r\n TTMSFNCCustomSelectorItemClick = procedure(Sender: TObject; AItemIndex: Integer) of object;\r\n TTMSFNCCustomSelectorItemBeforeDrawBackground = procedure(Sender: TObject; AGraphics: TTMSFNCGraphics; ARect: TRectF; AItemIndex: Integer; var ADefaultDraw: Boolean) of object;\r\n TTMSFNCCustomSelectorItemAfterDrawBackground = procedure(Sender: TObject; AGraphics: TTMSFNCGraphics; ARect: TRectF; AItemIndex: Integer) of object;\r\n TTMSFNCCustomSelectorItemBeforeDrawContent = procedure(Sender: TObject; AGraphics: TTMSFNCGraphics; ARect: TRectF; AItemIndex: Integer; var ADefaultDraw: Boolean) of object;\r\n TTMSFNCCustomSelectorItemAfterDrawContent = procedure(Sender: TObject; AGraphics: TTMSFNCGraphics; ARect: TRectF; AItemIndex: Integer) of object;\r\n TTMSFNCCustomSelectorItemBeforeDrawText = procedure(Sender: TObject; AGraphics: TTMSFNCGraphics; ARect: TRectF; AItemIndex: Integer; var AText: String; var ADefaultDraw: Boolean) of object;\r\n TTMSFNCCustomSelectorItemAfterDrawText = procedure(Sender: TObject; AGraphics: TTMSFNCGraphics; ARect: TRectF; AItemIndex: Integer; AText: String) of object;\r\n TTMSFNCCustomSelectorBeforeDraw = procedure(Sender: TObject; AGraphics: TTMSFNCGraphics; ARect: TRectF; var ADefaultDraw: Boolean) of object;\r\n TTMSFNCCustomSelectorAfterDraw = procedure(Sender: TObject; AGraphics: TTMSFNCGraphics; ARect: TRectF) of object;\r\n\r\n {$IFDEF WEBLIB}\r\n TTMSFNCCustomSelectorDisplayList = class(TList)\r\n private\r\n function GetItem(Index: Integer): TTMSFNCCustomSelectorDisplayItem;\r\n procedure SetItem(Index: Integer; const Value: TTMSFNCCustomSelectorDisplayItem);\r\n public\r\n property Items[Index: Integer]: TTMSFNCCustomSelectorDisplayItem read GetItem write SetItem; default;\r\n end;\r\n {$ENDIF}\r\n {$IFNDEF WEBLIB}\r\n TTMSFNCCustomSelectorDisplayList = class(TList);\r\n {$ENDIF}\r\n\r\n TTMSFNCCustomSelector = class(TTMSFNCCustomControl)\r\n private\r\n FDisplayList: TTMSFNCCustomSelectorDisplayList;\r\n FUpdateCount: Integer;\r\n FItems: TTMSFNCCustomSelectorItems;\r\n FRows: Integer;\r\n FColumns: Integer;\r\n FPageCount: Integer;\r\n FAppearance: TTMSFNCCustomSelectorAppearance;\r\n FSelectedItemIndex, FFocusedItemIndex, FHoveredItemIndex, FDownItemIndex: Integer;\r\n FOnItemBeforeDrawText: TTMSFNCCustomSelectorItemBeforeDrawText;\r\n FOnAfterDraw: TTMSFNCCustomSelectorAfterDraw;\r\n FOnItemAfterDrawBackground: TTMSFNCCustomSelectorItemAfterDrawBackground;\r\n FOnItemSelected: TTMSFNCCustomSelectorItemSelected;\r\n FOnItemAfterDrawText: TTMSFNCCustomSelectorItemAfterDrawText;\r\n FOnBeforeDraw: TTMSFNCCustomSelectorBeforeDraw;\r\n FOnItemBeforeDrawBackground: TTMSFNCCustomSelectorItemBeforeDrawBackground;\r\n FOnItemDeselected: TTMSFNCCustomSelectorItemDeselected;\r\n FOnItemClick: TTMSFNCCustomSelectorItemClick;\r\n FOnItemBeforeDrawContent: TTMSFNCCustomSelectorItemBeforeDrawContent;\r\n FOnItemAfterDrawContent: TTMSFNCCustomSelectorItemAfterDrawContent;\r\n FBlockChange: Boolean;\r\n FClosedRemotely: Boolean;\r\n procedure SetItems(const Value: TTMSFNCCustomSelectorItems);\r\n procedure SetColumns(const Value: Integer);\r\n procedure SetRows(const Value: Integer);\r\n procedure SetAppearance(const Value: TTMSFNCCustomSelectorAppearance);\r\n procedure SetSelectedItemIndex(const Value: Integer);\r\n protected\r\n procedure ChangeDPIScale(M, D: Integer); override;\r\n procedure RegisterRuntimeClasses; override;\r\n function GetDocURL: string; override;\r\n function GetHintString: string; override;\r\n function HasHint: Boolean; override;\r\n function GetVersion: String; override;\r\n function GetDisplayItem(AItemIndex: Integer): TTMSFNCCustomSelectorDisplayItem; virtual;\r\n function GetNextSelectableItem: Integer; virtual;\r\n function GetPreviousSelectableItem: Integer; virtual;\r\n function GetNextSelectableRowItem: Integer; virtual;\r\n function GetPreviousSelectableRowItem: Integer; virtual;\r\n function GetFirstSelectableItem: Integer; virtual;\r\n function GetLastSelectableItem: Integer; virtual;\r\n function CreateItemsCollection: TTMSFNCCustomSelectorItems; virtual;\r\n procedure CalculateItems; virtual;\r\n procedure UpdateCalculations; virtual;\r\n procedure ApplyStyle; override;\r\n procedure ResetToDefaultStyle; override;\r\n function GetTopOffset: Single; virtual;\r\n function GetCalculationWidth: Single; virtual;\r\n function GetCalculationHeight: Single; virtual;\r\n function GetTotalSeparatorHeight: Single;\r\n function GetTotalSeparatorCount: Integer;\r\n procedure DoItemSelected(AItemIndex: Integer); virtual;\r\n procedure DoItemClick(AItemIndex: Integer); virtual;\r\n procedure DoItemDeselected(AItemIndex: Integer); virtual;\r\n procedure DoItemBeforeDrawBackground(AGraphics: TTMSFNCGraphics; ARect: TRectF; AItemIndex: Integer; var ADefaultDraw: Boolean); virtual;\r\n procedure DoItemAfterDrawBackground(AGraphics: TTMSFNCGraphics; ARect: TRectF; AItemIndex: Integer); virtual;\r\n procedure DoItemBeforeDrawContent(AGraphics: TTMSFNCGraphics; ARect: TRectF; AItemIndex: Integer; var ADefaultDraw: Boolean); virtual;\r\n procedure DoItemAfterDrawContent(AGraphics: TTMSFNCGraphics; ARect: TRectF; AItemIndex: Integer); virtual;\r\n procedure DoItemBeforeDrawText(AGraphics: TTMSFNCGraphics; ARect: TRectF; AItemIndex: Integer; var AText: String; var ADefaultDraw: Boolean); virtual;\r\n procedure DoItemAfterDrawText(AGraphics: TTMSFNCGraphics; ARect: TRectF; AItemIndex: Integer; AText: String); virtual;\r\n procedure DoBeforeDraw(AGraphics: TTMSFNCGraphics; ARect: TRectF; var ADefaultDraw: Boolean); reintroduce; virtual;\r\n procedure DoAfterDraw(AGraphics: TTMSFNCGraphics; ARect: TRectF); reintroduce; virtual;\r\n procedure DrawItems(AGraphics: TTMSFNCGraphics); virtual;\r\n procedure Draw(AGraphics: TTMSFNCGraphics; ARect: TRectF); override;\r\n\r\n procedure DrawItem(AGraphics: TTMSFNCGraphics; ADisplayItem: TTMSFNCCustomSelectorDisplayItem); virtual;\r\n procedure DrawItemBackGround(AGraphics: TTMSFNCGraphics; ADisplayItem: TTMSFNCCustomSelectorDisplayItem); virtual;\r\n procedure DrawItemContent(AGraphics: TTMSFNCGraphics; ADisplayItem: TTMSFNCCustomSelectorDisplayItem); virtual;\r\n procedure DrawItemText(AGraphics: TTMSFNCGraphics; ADisplayItem: TTMSFNCCustomSelectorDisplayItem); virtual;\r\n\r\n procedure HandleMouseDown(Button: TTMSFNCMouseButton; Shift: TShiftState; X: Single; Y: Single); override;\r\n procedure HandleMouseUp(Button: TTMSFNCMouseButton; Shift: TShiftState; X: Single; Y: Single); override;\r\n procedure HandleMouseMove(Shift: TShiftState; X: Single; Y: Single); override;\r\n procedure HandleKeyDown(var Key: Word; Shift: TShiftState); override;\r\n procedure HandleKeyUp(var Key: Word; Shift: TShiftState); override;\r\n procedure HandleMouseLeave; override;\r\n procedure ProcessSelection(AItemIndex: Integer);\r\n property SelectedItemIndex: Integer read FSelectedItemIndex write SetSelectedItemIndex default -1;\r\n property Rows: Integer read FRows write SetRows default 4;\r\n property Columns: Integer read FColumns write SetColumns default 4;\r\n property Version: String read GetVersion;\r\n property Items: TTMSFNCCustomSelectorItems read FItems write SetItems;\r\n property Appearance: TTMSFNCCustomSelectorAppearance read FAppearance write SetAppearance;\r\n property OnItemSelected: TTMSFNCCustomSelectorItemSelected read FOnItemSelected write FOnItemSelected;\r\n property OnItemDeselected: TTMSFNCCustomSelectorItemDeselected read FOnItemDeselected write FOnItemDeselected;\r\n property OnItemClick: TTMSFNCCustomSelectorItemClick read FOnItemClick write FOnItemClick;\r\n property OnItemBeforeDrawBackground: TTMSFNCCustomSelectorItemBeforeDrawBackground read FOnItemBeforeDrawBackground write FOnItemBeforeDrawBackground;\r\n property OnItemAfterDrawBackground: TTMSFNCCustomSelectorItemAfterDrawBackground read FOnItemAfterDrawBackground write FOnItemAfterDrawBackground;\r\n property OnItemBeforeDrawContent: TTMSFNCCustomSelectorItemBeforeDrawContent read FOnItemBeforeDrawContent write FOnItemBeforeDrawContent;\r\n property OnItemAfterDrawContent: TTMSFNCCustomSelectorItemAfterDrawContent read FOnItemAfterDrawContent write FOnItemAfterDrawContent;\r\n property OnBeforeDraw: TTMSFNCCustomSelectorBeforeDraw read FOnBeforeDraw write FOnBeforeDraw;\r\n property OnAfterDraw: TTMSFNCCustomSelectorAfterDraw read FOnAfterDraw write FOnAfterDraw;\r\n property OnItemBeforeDrawText: TTMSFNCCustomSelectorItemBeforeDrawText read FOnItemBeforeDrawText write FOnItemBeforeDrawText;\r\n property OnItemAfterDrawText: TTMSFNCCustomSelectorItemAfterDrawText read FOnItemAfterDrawText write FOnItemAfterDrawText;\r\n public\r\n constructor Create(AOwner: TComponent); override;\r\n destructor Destroy; override;\r\n procedure Assign(Source: TPersistent); override;\r\n procedure BeginUpdate; override;\r\n procedure EndUpdate; override;\r\n procedure InvalidateItems;\r\n property BlockChange: Boolean read FBlockChange write FBlockChange;\r\n procedure UpdateControlAfterResize; override;\r\n procedure InitializeDefault; virtual;\r\n function XYToItem(X, Y: Single): Integer;\r\n property ClosedRemotely: Boolean read FClosedRemotely write FClosedRemotely;\r\n end;\r\n\r\n TTMSFNCDefaultSelector = class(TTMSFNCCustomSelector)\r\n published\r\n property Fill;\r\n property Stroke;\r\n property Version;\r\n end;\r\n\r\nimplementation\r\n\r\nuses\r\n Math, SysUtils, WEBLib.TMSFNCUtils, WEBLib.TMSFNCStyles\r\n {$IFDEF VCLLIB}\r\n , VCL.Graphics\r\n {$ENDIF}\r\n ;\r\n\r\n{ TTMSFNCCustomSelector }\r\n\r\nprocedure TTMSFNCCustomSelector.ApplyStyle;\r\nvar\r\n c: TTMSFNCGraphicsColor;\r\nbegin\r\n inherited;\r\n\r\n c := gcNull;\r\n if TTMSFNCStyles.GetStyleBackgroundFillColor(c) then\r\n Fill.Color := c;\r\n\r\n c := gcNull;\r\n if TTMSFNCStyles.GetStyleBackgroundStrokeColor(c) then\r\n Stroke.Color := c;\r\n\r\n c := gcNull;\r\n if TTMSFNCStyles.GetStyleDefaultButtonFillColor(c) then\r\n Appearance.Fill.Color := c;\r\n\r\n c := gcNull;\r\n if TTMSFNCStyles.GetStyleSelectionFillColor(c) then\r\n begin\r\n Appearance.FillSelected.Color := c;\r\n Appearance.FillDown.Color := c;\r\n Appearance.FillHover.Color := Blend(c, Appearance.Fill.Color, 25);\r\n end;\r\n\r\n c := gcNull;\r\n if TTMSFNCStyles.GetStyleDefaultButtonStrokeColor(c) then\r\n begin\r\n Appearance.Stroke.Color := c;\r\n Appearance.StrokeSelected.Color := c;\r\n Appearance.StrokeDown.Color := c;\r\n Appearance.StrokeHover.Color := c;\r\n end;\r\n\r\n c := gcNull;\r\n if TTMSFNCStyles.GetStyleTextFontColor(c) then\r\n Appearance.Font.Color := c;\r\nend;\r\n\r\nprocedure TTMSFNCCustomSelector.Assign(Source: TPersistent);\r\nbegin\r\n inherited;\r\n if Source is TTMSFNCCustomSelector then\r\n begin\r\n FItems.Assign((Source as TTMSFNCCustomSelector).Items);\r\n FAppearance.Assign((Source as TTMSFNCCustomSelector).Appearance);\r\n FRows := (Source as TTMSFNCCustomSelector).Rows;\r\n FColumns := (Source as TTMSFNCCustomSelector).Columns;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomSelector.BeginUpdate;\r\nbegin\r\n inherited;\r\n Inc(FUpdateCount);\r\nend;\r\n\r\nprocedure TTMSFNCCustomSelector.CalculateItems;\r\nvar\r\n itposarr: TTMSFNCCustomSelectorItemPosArray;\r\n r, newr, c, newc: Integer;\r\n AItemIndex: Integer;\r\n AItem: TTMSFNCCustomSelectorItem;\r\n cspan, rspan, newcspan, newrspan: Integer;\r\n I: Integer;\r\n K: Integer;\r\n sepc: Integer;\r\n f: Boolean;\r\n APageIndex: Integer;\r\n hs, vs: Single;\r\n iw, ih: Single;\r\n w, h: Single;\r\n exw, exh: Single;\r\n tx, ty: Single;\r\n pw, ph: Single;\r\n offs: Single;\r\n itd: TTMSFNCCustomSelectorDisplayItem;\r\n\r\n procedure FindNewPos(AItem: TTMSFNCCustomSelectorItem; var ANewR: Integer; var ANewC: Integer; var AFound: Boolean; ARows , {%H-}ACurRow, AColumns, {%H-}ACurCol: Integer; PosArr: TTMSFNCCustomSelectorItemPosArray);\r\n var\r\n i, k: integer;\r\n cspan, rspan: Integer;\r\n J, L: Integer;\r\n begin\r\n AFound := False;\r\n for I := ANewr to ARows - 1 do\r\n begin\r\n for K := ANewC to AColumns - 1 do\r\n begin\r\n cspan := AItem.ColumnSpan;\r\n cspan := Min(cspan, Columns - ANewC);\r\n rspan := AItem.RowSpan;\r\n rspan := Min(rspan, Rows - ANewR);\r\n\r\n AFound := true;\r\n for J := 0 to rspan - 1 do\r\n begin\r\n for L := 0 to cspan - 1 do\r\n begin\r\n if PosArr[I + J, K + L].TileSet then\r\n AFound := False;\r\n end;\r\n end;\r\n\r\n if AFound then\r\n Break;\r\n Inc(ANewC);\r\n end;\r\n if AFound then\r\n Break;\r\n\r\n ANewC := 0;\r\n Inc(ANewr);\r\n end;\r\n end;\r\nbegin\r\n if (csDestroying in ComponentState) or (FUpdateCount > 0) then\r\n Exit;\r\n\r\n FDisplayList.Clear;\r\n\r\n if Items.Count = 0 then\r\n Exit;\r\n\r\n pw := GetCalculationWidth;\r\n ph := GetCalculationHeight;\r\n hs := Appearance.HorizontalSpacing;\r\n vs := Appearance.VerticalSpacing;\r\n w := pw - vs;\r\n iw := w;\r\n if Columns > 0 then\r\n iw := (w - (Columns * hs)) / Columns;\r\n\r\n h := ph - vs - GetTotalSeparatorHeight;\r\n sepc := GetTotalSeparatorCount;\r\n ih := h;\r\n if (Rows - sepc) > 0 then\r\n ih := (h - ((Rows - sepc) * vs)) / (Rows - sepc);\r\n\r\n AItemIndex := 0;\r\n APageIndex := 0;\r\n offs := 0;\r\n while AItemIndex <= Items.Count - 1 do\r\n begin\r\n c := 0;\r\n r := 0;\r\n SetLength(itposarr, 0, 0);\r\n SetLength(itposarr, Rows, Columns);\r\n\r\n while r < Rows do\r\n begin\r\n while (c < Columns) do\r\n begin\r\n if (AItemIndex >= 0) and (AItemIndex <= Items.Count - 1) and (APageIndex = 0) then\r\n begin\r\n AItem := Items[AItemIndex];\r\n if not AItem.Visible then\r\n begin\r\n Inc(AItemIndex);\r\n Continue;\r\n end;\r\n\r\n if AItem.Separator then\r\n begin\r\n cspan := Columns;\r\n rspan := 1;\r\n end\r\n else\r\n begin\r\n cspan := AItem.ColumnSpan;\r\n rspan := AItem.RowSpan;\r\n end;\r\n\r\n cspan := Min(cspan, Columns - c);\r\n rspan := Min(rspan, Rows - r);\r\n\r\n exw := iw * cspan + (hs * (cspan - 1));\r\n if AItem.Separator then\r\n exh := AItem.SeparatorHeight\r\n else\r\n exh := ih * rspan + (vs * (rspan - 1));\r\n\r\n tx := (pw * APageIndex) + hs + iw * c + (hs * c);\r\n ty := offs + vs + ih * r + (vs * r) + GetTopOffset;\r\n\r\n itd.Rect := RectF(tx + AItem.Margins.Left, ty + AItem.Margins.Top,\r\n tx + exw - AItem.Margins.Right, ty + exh - AItem.Margins.Bottom);\r\n itd.Item := AItem;\r\n itd.PageIndex := APageIndex;\r\n itd.Column := c;\r\n itd.Row := r;\r\n itd.ColumnSpan := cspan;\r\n itd.RowSpan := rspan;\r\n FDisplayList.Add(itd);\r\n\r\n newcspan := c;\r\n newrspan := r;\r\n newcspan := newcspan + cspan - 1;\r\n newrspan := newrspan + rspan - 1;\r\n\r\n for I := r to newrspan do\r\n for K := c to newcspan do\r\n itposarr[I, K].TileSet := True;\r\n\r\n if AItem.Separator then\r\n offs := offs + AItem.SeparatorHeight - ih * rspan + (vs * (rspan - 1));\r\n end;\r\n Inc(AItemIndex);\r\n Inc(c);\r\n newc := c;\r\n newr := r;\r\n f := False;\r\n if (AItemIndex >= 0) and (AItemIndex <= Items.Count - 1) then\r\n FindNewPos(Items[AItemIndex], newr, newc, f, Rows, newr, Columns, newc, itposarr);\r\n c := newc;\r\n r := newr;\r\n\r\n if (c >= Columns) or (r >= Rows) then\r\n Break;\r\n end;\r\n c := 0;\r\n Inc(r);\r\n newc := c;\r\n newr := r;\r\n f := False;\r\n if (AItemIndex >= 0) and (AItemIndex <= Items.Count - 1) then\r\n FindNewPos(Items[AItemIndex], newr, newc, f, Rows, newr, Columns, newc, itposarr);\r\n c := newc;\r\n r := newr;\r\n if r >= Rows then\r\n Break;\r\n end;\r\n Inc(APageIndex);\r\n end;\r\n\r\n FPageCount := APageIndex;\r\n InvalidateItems;\r\nend;\r\n\r\nprocedure TTMSFNCCustomSelector.ChangeDPIScale(M, D: Integer);\r\nbegin\r\n inherited;\r\n BeginUpdate;\r\n FAppearance.FVerticalSpacing := TTMSFNCUtils.MulDivSingle(FAppearance.FVerticalSpacing, M, D);\r\n FAppearance.FHorizontalSpacing := TTMSFNCUtils.MulDivSingle(FAppearance.FHorizontalSpacing, M, D);\r\n FAppearance.Font.Height := TTMSFNCUtils.MulDivInt(FAppearance.Font.Height, M, D);\r\n EndUpdate;\r\nend;\r\n\r\nconstructor TTMSFNCCustomSelector.Create(AOwner: TComponent);\r\nbegin\r\n inherited;\r\n FColumns := 4;\r\n FRows := 4;\r\n FItems := CreateItemsCollection;\r\n FDisplayList := TTMSFNCCustomSelectorDisplayList.Create;\r\n FAppearance := TTMSFNCCustomSelectorAppearance.Create(Self);\r\n FSelectedItemIndex := -1;\r\n FFocusedItemIndex := -1;\r\n FHoveredItemIndex := -1;\r\n FDownItemIndex := -1;\r\n\r\n if IsDesignTime then\r\n InitializeDefault;\r\nend;\r\n\r\nprocedure TTMSFNCCustomSelector.InitializeDefault;\r\nbegin\r\n\r\nend;\r\n\r\nfunction TTMSFNCCustomSelector.CreateItemsCollection: TTMSFNCCustomSelectorItems;\r\nbegin\r\n Result := TTMSFNCCustomSelectorItems.Create(Self);\r\nend;\r\n\r\ndestructor TTMSFNCCustomSelector.Destroy;\r\nbegin\r\n FAppearance.Free;\r\n FDisplayList.Free;\r\n FItems.Free;\r\n inherited;\r\nend;\r\n\r\nprocedure TTMSFNCCustomSelector.DoAfterDraw(AGraphics: TTMSFNCGraphics; ARect: TRectF);\r\nbegin\r\n if Assigned(OnAfterDraw) then\r\n OnAfterDraw(Self, AGraphics, ARect);\r\nend;\r\n\r\nprocedure TTMSFNCCustomSelector.DoBeforeDraw(AGraphics: TTMSFNCGraphics; ARect: TRectF;\r\n var ADefaultDraw: Boolean);\r\nbegin\r\n if Assigned(OnBeforeDraw) then\r\n OnBeforeDraw(Self, AGraphics, ARect, ADefaultDraw);\r\nend;\r\n\r\nprocedure TTMSFNCCustomSelector.DoItemAfterDrawBackground(AGraphics: TTMSFNCGraphics;\r\n ARect: TRectF; AItemIndex: Integer);\r\nbegin\r\n if Assigned(OnItemAfterDrawBackground) then\r\n OnItemAfterDrawBackground(Self, AGraphics, ARect, AItemIndex);\r\nend;\r\n\r\nprocedure TTMSFNCCustomSelector.DoItemAfterDrawContent(AGraphics: TTMSFNCGraphics;\r\n ARect: TRectF; AItemIndex: Integer);\r\nbegin\r\n if Assigned(OnItemAfterDrawContent) then\r\n OnItemAfterDrawContent(Self, AGraphics, ARect, AItemIndex);\r\nend;\r\n\r\nprocedure TTMSFNCCustomSelector.DoItemAfterDrawText(AGraphics: TTMSFNCGraphics;\r\n ARect: TRectF; AItemIndex: Integer; AText: String);\r\nbegin\r\n if Assigned(OnItemAfterDrawText) then\r\n OnItemAfterDrawText(Self, AGraphics, ARect, AItemIndex, AText);\r\nend;\r\n\r\nprocedure TTMSFNCCustomSelector.DoItemBeforeDrawBackground(AGraphics: TTMSFNCGraphics;\r\n ARect: TRectF; AItemIndex: Integer; var ADefaultDraw: Boolean);\r\nbegin\r\n if Assigned(OnItemBeforeDrawBackground) then\r\n OnItemBeforeDrawBackground(Self, AGraphics, ARect, AItemIndex, ADefaultDraw);\r\nend;\r\n\r\nprocedure TTMSFNCCustomSelector.DoItemBeforeDrawContent(AGraphics: TTMSFNCGraphics;\r\n ARect: TRectF; AItemIndex: Integer; var ADefaultDraw: Boolean);\r\nbegin\r\n if Assigned(OnItemBeforeDrawContent) then\r\n OnItemBeforeDrawContent(Self, AGraphics, ARect, AItemIndex, ADefaultDraw);\r\nend;\r\n\r\nprocedure TTMSFNCCustomSelector.DoItemBeforeDrawText(AGraphics: TTMSFNCGraphics;\r\n ARect: TRectF; AItemIndex: Integer; var AText: String;\r\n var ADefaultDraw: Boolean);\r\nbegin\r\n if Assigned(OnItemBeforeDrawText) then\r\n OnItemBeforeDrawText(Self, AGraphics, ARect, AItemIndex, AText, ADefaultDraw);\r\nend;\r\n\r\nprocedure TTMSFNCCustomSelector.DoItemSelected(AItemIndex: Integer);\r\nbegin\r\n if Assigned(OnItemSelected) then\r\n OnItemSelected(Self, AItemIndex);\r\nend;\r\n\r\nprocedure TTMSFNCCustomSelector.DoItemClick(AItemIndex: Integer);\r\nbegin\r\n if Assigned(OnItemClick) then\r\n OnItemClick(Self, AItemIndex);\r\nend;\r\n\r\nprocedure TTMSFNCCustomSelector.DoItemDeselected(AItemIndex: Integer);\r\nbegin\r\n if Assigned(OnItemDeselected) then\r\n OnItemDeselected(Self, AItemIndex);\r\nend;\r\n\r\nprocedure TTMSFNCCustomSelector.HandleMouseLeave;\r\nbegin\r\n inherited;\r\n FHoveredItemIndex := -1;\r\n InvalidateItems;\r\nend;\r\n\r\nprocedure TTMSFNCCustomSelector.DrawItem(AGraphics: TTMSFNCGraphics;\r\n ADisplayItem: TTMSFNCCustomSelectorDisplayItem);\r\nbegin\r\n DrawItemBackGround(AGraphics, ADisplayItem);\r\n DrawItemContent(AGraphics, ADisplayItem);\r\n DrawItemText(AGraphics, ADisplayItem);\r\nend;\r\n\r\nprocedure TTMSFNCCustomSelector.DrawItemBackGround(AGraphics: TTMSFNCGraphics; ADisplayItem: TTMSFNCCustomSelectorDisplayItem);\r\nvar\r\n r: TRectF;\r\n it: TTMSFNCCustomSelectorItem;\r\n a: Boolean;\r\n fr: TRectF;\r\nbegin\r\n it := ADisplayItem.Item;\r\n if Assigned(it) then\r\n begin\r\n if not it.Separator then\r\n begin\r\n AGraphics.Fill.Assign(Appearance.Fill);\r\n AGraphics.Stroke.Assign(Appearance.Stroke);\r\n if it.Enabled then\r\n begin\r\n if it.Index = FDownItemIndex then\r\n begin\r\n AGraphics.Fill.Assign(Appearance.FillDown);\r\n AGraphics.Stroke.Assign(Appearance.StrokeDown);\r\n end\r\n else if it.Index = FHoveredItemIndex then\r\n begin\r\n AGraphics.Fill.Assign(Appearance.FillHover);\r\n AGraphics.Stroke.Assign(Appearance.StrokeHover);\r\n end\r\n else if it.Index = FSelectedItemIndex then\r\n begin\r\n AGraphics.Fill.Assign(Appearance.FillSelected);\r\n AGraphics.Stroke.Assign(Appearance.StrokeSelected);\r\n end;\r\n end\r\n else\r\n begin\r\n AGraphics.Fill.Assign(Appearance.FillDisabled);\r\n AGraphics.Stroke.Assign(Appearance.StrokeDisabled);\r\n end;\r\n end\r\n else\r\n AGraphics.Stroke.Assign(Appearance.SeparatorStroke);\r\n\r\n r := ADisplayItem.Rect;\r\n a := True;\r\n DoItemBeforeDrawBackground(AGraphics, ADisplayItem.Rect, it.Index, a);\r\n if a then\r\n begin\r\n if it.Separator then\r\n AGraphics.DrawLine(PointF(r.Left, CenterPointEx(r).Y), PointF(r.Right, CenterPointEx(r).Y))\r\n else\r\n begin\r\n AGraphics.DrawRectangle(r);\r\n if IsFocused and (FFocusedItemIndex = it.Index) then\r\n begin\r\n fr := r;\r\n InflateRectEx(fr, ScalePaintValue(-2), ScalePaintValue(-2));\r\n AGraphics.DrawFocusRectangle(fr);\r\n end;\r\n end;\r\n\r\n DoItemAfterDrawBackground(AGraphics, ADisplayItem.Rect, it.Index);\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomSelector.DrawItemContent(AGraphics: TTMSFNCGraphics;\r\n ADisplayItem: TTMSFNCCustomSelectorDisplayItem);\r\nvar\r\n it: TTMSFNCCustomSelectorItem;\r\n a: Boolean;\r\nbegin\r\n it := ADisplayItem.Item;\r\n if Assigned(it) then\r\n begin\r\n a := True;\r\n DoItemBeforeDrawContent(AGraphics, ADisplayItem.Rect, it.Index, a);\r\n if a then\r\n DoItemAfterDrawContent(AGraphics, ADisplayItem.Rect, it.Index);\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomSelector.DrawItems(AGraphics: TTMSFNCGraphics);\r\nvar\r\n I: Integer;\r\nbegin\r\n for I := 0 to FDisplayList.Count - 1 do\r\n DrawItem(AGraphics, FDisplayList[I]);\r\nend;\r\n\r\nprocedure TTMSFNCCustomSelector.DrawItemText(AGraphics: TTMSFNCGraphics;\r\n ADisplayItem: TTMSFNCCustomSelectorDisplayItem);\r\nvar\r\n r: TRectF;\r\n it: TTMSFNCCustomSelectorItem;\r\n str: String;\r\n a: Boolean;\r\nbegin\r\n it := ADisplayItem.Item;\r\n if Assigned(it) and (it.Text <> '') then\r\n begin\r\n r := ADisplayItem.Rect;\r\n str := it.Text;\r\n a := True;\r\n InflateRectEx(r, -2, -2);\r\n AGraphics.Font.AssignSource(Appearance.Font);\r\n DoItemBeforeDrawText(AGraphics, ADisplayItem.Rect, it.Index, str, a);\r\n if a then\r\n begin\r\n AGraphics.DrawText(r, str, False, it.HorizontalTextAlign, it.VerticalTextAlign);\r\n DoItemAfterDrawText(AGraphics, ADisplayItem.Rect, it.Index, str);\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomSelector.EndUpdate;\r\nbegin\r\n inherited;\r\n Dec(FUpdateCount);\r\n if FUpdateCount = 0 then\r\n CalculateItems;\r\nend;\r\n\r\nfunction TTMSFNCCustomSelector.GetFirstSelectableItem: Integer;\r\nvar\r\n I: Integer;\r\n it: TTMSFNCCustomSelectorItem;\r\nbegin\r\n Result := FFocusedItemIndex;\r\n for I := 0 to FDisplayList.Count - 1 do\r\n begin\r\n it := FDisplayList[I].Item;\r\n if Assigned(it) and it.Enabled and not it.Separator then\r\n begin\r\n Result := it.Index;\r\n Break;\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCCustomSelector.GetCalculationHeight: Single;\r\nbegin\r\n Result := Height - GetTopOffset;\r\nend;\r\n\r\nfunction TTMSFNCCustomSelector.GetHintString: string;\r\nvar\r\n it: TTMSFNCCustomSelectorItem;\r\nbegin\r\n Result := inherited GetHintString;\r\n if (FHoveredItemIndex >= 0) and (FHoveredItemIndex <= FItems.Count - 1) then\r\n begin\r\n it := FItems[FHoveredItemIndex];\r\n Result := it.Hint;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCCustomSelector.GetLastSelectableItem: Integer;\r\nvar\r\n I: Integer;\r\n it: TTMSFNCCustomSelectorItem;\r\nbegin\r\n Result := FFocusedItemIndex;\r\n for I := FDisplayList.Count - 1 downto 0 do\r\n begin\r\n it := FDisplayList[I].Item;\r\n if Assigned(it) and it.Enabled and not it.Separator then\r\n begin\r\n Result := it.Index;\r\n Break;\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCCustomSelector.GetNextSelectableItem: Integer;\r\nvar\r\n I: Integer;\r\n it: TTMSFNCCustomSelectorItem;\r\nbegin\r\n Result := FFocusedItemIndex;\r\n for I := 0 to FDisplayList.Count - 1 do\r\n begin\r\n it := FDisplayList[I].Item;\r\n if Assigned(it) and it.Enabled and not it.Separator and (it.Index > FFocusedItemIndex) then\r\n begin\r\n Result := it.Index;\r\n Break;\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCCustomSelector.GetNextSelectableRowItem: Integer;\r\nvar\r\n I: Integer;\r\n it: TTMSFNCCustomSelectorItem;\r\n disp: TTMSFNCCustomSelectorDisplayItem;\r\nbegin\r\n Result := FFocusedItemIndex;\r\n if Result = -1 then\r\n begin\r\n Result := GetNextSelectableItem;\r\n Exit;\r\n end;\r\n\r\n disp := GetDisplayItem(FFocusedItemIndex);\r\n for I := 0 to FDisplayList.Count - 1 do\r\n begin\r\n it := FDisplayList[I].Item;\r\n if Assigned(it) and it.Enabled and not it.Separator and (it.Index > FFocusedItemIndex) and (disp.Column >= FDisplayList[I].Column) and\r\n (disp.Column <= FDisplayList[I].Column + (FDisplayList[I].ColumnSpan - 1))\r\n and (FDisplayList[I].Row > disp.Row) then\r\n begin\r\n Result := it.Index;\r\n Break;\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCCustomSelector.GetPreviousSelectableItem: Integer;\r\nvar\r\n I: Integer;\r\n it: TTMSFNCCustomSelectorItem;\r\nbegin\r\n Result := FFocusedItemIndex;\r\n for I := FDisplayList.Count - 1 downto 0 do\r\n begin\r\n it := FDisplayList[I].Item;\r\n if Assigned(it) and it.Enabled and not it.Separator and (it.Index < FFocusedItemIndex) then\r\n begin\r\n Result := it.Index;\r\n Break;\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCCustomSelector.GetPreviousSelectableRowItem: Integer;\r\nvar\r\n I: Integer;\r\n it: TTMSFNCCustomSelectorItem;\r\n disp: TTMSFNCCustomSelectorDisplayItem;\r\nbegin\r\n Result := FFocusedItemIndex;\r\n if Result = -1 then\r\n begin\r\n Result := GetPreviousSelectableItem;\r\n Exit;\r\n end;\r\n\r\n disp := GetDisplayItem(FFocusedItemIndex);\r\n for I := FDisplayList.Count - 1 downto 0 do\r\n begin\r\n it := FDisplayList[I].Item;\r\n if Assigned(it) and it.Enabled and not (it.Separator) and (it.Index < FFocusedItemIndex) and (disp.Column >= FDisplayList[I].Column) and\r\n (disp.Column <= FDisplayList[I].Column + (FDisplayList[I].ColumnSpan - 1)) and (FDisplayList[I].Row < disp.Row) then\r\n begin\r\n Result := it.Index;\r\n Break;\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCCustomSelector.GetTopOffset: Single;\r\nbegin\r\n Result := 0;\r\nend;\r\n\r\nfunction TTMSFNCCustomSelector.GetTotalSeparatorCount: Integer;\r\nvar\r\n I: Integer;\r\nbegin\r\n Result := 0;\r\n for I := 0 to Items.Count - 1 do\r\n begin\r\n if Items[I].Separator then\r\n Inc(Result);\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCCustomSelector.GetTotalSeparatorHeight: Single;\r\nvar\r\n I: Integer;\r\nbegin\r\n Result := 0;\r\n for I := 0 to Items.Count - 1 do\r\n begin\r\n if Items[I].Separator then\r\n Result := Result + Items[I].SeparatorHeight + Appearance.VerticalSpacing;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCCustomSelector.GetVersion: String;\r\nbegin\r\n Result := GetVersionNumber(MAJ_VER, MIN_VER, REL_VER, BLD_VER);\r\nend;\r\n\r\nfunction TTMSFNCCustomSelector.GetCalculationWidth: Single;\r\nbegin\r\n Result := Width;\r\nend;\r\n\r\nprocedure TTMSFNCCustomSelector.HandleKeyDown(var Key: Word; Shift: TShiftState);\r\nbegin\r\n inherited;\r\n case Key of\r\n KEY_UP:\r\n begin\r\n FFocusedItemIndex := GetPreviousSelectableRowItem;\r\n InvalidateItems;\r\n end;\r\n KEY_LEFT:\r\n begin\r\n FFocusedItemIndex := GetPreviousSelectableItem;\r\n InvalidateItems;\r\n end;\r\n KEY_DOWN:\r\n begin\r\n FFocusedItemIndex := GetNextSelectableRowItem;\r\n InvalidateItems;\r\n end;\r\n KEY_RIGHT:\r\n begin\r\n FFocusedItemIndex := GetNextSelectableItem;\r\n InvalidateItems;\r\n end;\r\n KEY_HOME:\r\n begin\r\n FFocusedItemIndex := GetFirstSelectableItem;\r\n InvalidateItems;\r\n end;\r\n KEY_END:\r\n begin\r\n FFocusedItemIndex := GetLastSelectableItem;\r\n InvalidateItems;\r\n end;\r\n end;\r\n\r\n if (Key = KEY_RETURN) then\r\n begin\r\n FDownItemIndex := FFocusedItemIndex;\r\n InvalidateItems;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomSelector.HandleKeyUp(var Key: Word; Shift: TShiftState);\r\nbegin\r\n inherited;\r\n if (Key = KEY_RETURN) then\r\n begin\r\n FDownItemIndex := -1;\r\n ProcessSelection(FFocusedItemIndex);\r\n InvalidateItems;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomSelector.HandleMouseDown(Button: TTMSFNCMouseButton;\r\n Shift: TShiftState; X, Y: Single);\r\nbegin\r\n inherited;\r\n CaptureEx;\r\n FDownItemIndex := XYToItem(X, Y);\r\n InvalidateItems;\r\nend;\r\n\r\nprocedure TTMSFNCCustomSelector.HandleMouseMove(Shift: TShiftState; X, Y: Single);\r\nvar\r\n h: Integer;\r\nbegin\r\n inherited;\r\n if FDownItemIndex > -1 then\r\n Exit;\r\n\r\n h := XYToItem(X, Y);\r\n if h <> FHoveredItemIndex then\r\n begin\r\n FHoveredItemIndex := h;\r\n CancelHint;\r\n InvalidateItems;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomSelector.HandleMouseUp(Button: TTMSFNCMouseButton; Shift: TShiftState;\r\n X, Y: Single);\r\nvar\r\n s: Integer;\r\nbegin\r\n inherited;\r\n ReleaseCaptureEx;\r\n s := XYToItem(X, Y);\r\n if (s = FDownItemIndex) and (FDownItemIndex <> -1) then\r\n begin\r\n ProcessSelection(s);\r\n if s <> -1 then\r\n DoItemClick(s);\r\n end;\r\n FDownItemIndex := -1;\r\n FHoveredItemIndex := -1;\r\n InvalidateItems;\r\nend;\r\n\r\nfunction TTMSFNCCustomSelector.HasHint: Boolean;\r\nvar\r\n it: TTMSFNCCustomSelectorItem;\r\nbegin\r\n Result := False;\r\n if (FHoveredItemIndex >= 0) and (FHoveredItemIndex <= FItems.Count - 1) then\r\n begin\r\n it := FItems[FHoveredItemIndex];\r\n Result := it.Hint <> '';\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomSelector.Draw(AGraphics: TTMSFNCGraphics; ARect: TRectF);\r\nvar\r\n a: Boolean;\r\nbegin\r\n inherited;\r\n a := True;\r\n DoBeforeDraw(AGraphics, ARect, a);\r\n if a then\r\n begin\r\n DrawItems(AGraphics);\r\n DoAfterDraw(AGraphics, ARect);\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomSelector.ProcessSelection(AItemIndex: Integer);\r\nvar\r\n it: TTMSFNCCustomSelectorItem;\r\n prev: Integer;\r\nbegin\r\n if (AItemIndex >= 0) and (AItemIndex <= Items.Count - 1) then\r\n begin\r\n it := FItems[AItemIndex];\r\n if it.CanSelect then\r\n begin\r\n prev := FSelectedItemIndex;\r\n if it.CanDeselect and (it.Index = FSelectedItemIndex) then\r\n FSelectedItemIndex := -1\r\n else\r\n FSelectedItemIndex := it.Index;\r\n\r\n if FSelectedItemIndex <> -1 then\r\n FFocusedItemIndex := FSelectedItemIndex;\r\n\r\n if it.CanDeselect and (prev <> -1) then\r\n DoItemDeSelected(prev);\r\n\r\n if FSelectedItemIndex <> -1 then\r\n DoItemSelected(FSelectedItemIndex);\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomSelector.RegisterRuntimeClasses;\r\nbegin\r\n inherited;\r\n RegisterClass(TTMSFNCCustomSelector);\r\nend;\r\n\r\nprocedure TTMSFNCCustomSelector.InvalidateItems;\r\nbegin\r\n Invalidate;\r\nend;\r\n\r\nprocedure TTMSFNCCustomSelector.ResetToDefaultStyle;\r\nbegin\r\n inherited;\r\n Fill.Kind := gfkSolid;\r\n Stroke.Kind := gskSolid;\r\n Fill.Color := gcWhite;\r\n Stroke.Color := gcSilver;\r\n\r\n Appearance.Fill.Color := Lighter(gcLightgray, 50);\r\n Appearance.FillHover.Color := Lighter(gcLightslategray, 50);\r\n Appearance.FillDown.Color := Lighter(gcSlategray, 50);\r\n Appearance.FillSelected.Color := Lighter(gcSlategray, 50);\r\n Appearance.FillDisabled.Color := Lighter(gcGray, 50);\r\n\r\n Appearance.Stroke.Color := gcDarkgray;\r\n Appearance.StrokeHover.Color := gcLightslategray;\r\n Appearance.StrokeDown.Color := gcSlategray;\r\n Appearance.StrokeSelected.Color := gcDarkslategray;\r\n Appearance.StrokeDisabled.Color := gcDarkgray;\r\n\r\n Appearance.Font.Color := gcBlack;\r\n\r\n Appearance.Fill.Kind := gfkSolid;\r\n Appearance.FillHover.Kind := gfkSolid;\r\n Appearance.FillDown.Kind := gfkSolid;\r\n Appearance.FillSelected.Kind := gfkSolid;\r\n Appearance.FillDisabled.Kind := gfkSolid;\r\n\r\n Appearance.Stroke.Kind := gskSolid;\r\n Appearance.StrokeHover.Kind := gskSolid;\r\n Appearance.StrokeDown.Kind := gskSolid;\r\n Appearance.StrokeSelected.Kind := gskSolid;\r\n Appearance.StrokeDisabled.Kind := gskSolid;\r\n\r\n Appearance.SeparatorStroke.Kind := gskSolid;\r\nend;\r\n\r\nprocedure TTMSFNCCustomSelector.UpdateCalculations;\r\nbegin\r\n\r\nend;\r\n\r\nprocedure TTMSFNCCustomSelector.UpdateControlAfterResize;\r\nbegin\r\n inherited;\r\n CalculateItems;\r\nend;\r\n\r\nfunction TTMSFNCCustomSelector.GetDisplayItem(AItemIndex: Integer): TTMSFNCCustomSelectorDisplayItem;\r\nvar\r\n I: Integer;\r\n it: TTMSFNCCustomSelectorItem;\r\nbegin\r\n Result.Rect := RectF(0, 0, 0, 0);\r\n Result.Item := nil;\r\n Result.PageIndex := -1;\r\n Result.Row := -1;\r\n Result.Column := -1;\r\n Result.ColumnSpan := -1;\r\n Result.RowSpan := -1;\r\n for I := 0 to FDisplayList.Count - 1 do\r\n begin\r\n it := FDisplayList[I].Item;\r\n if Assigned(it) and (it.Index = AItemIndex) then\r\n begin\r\n Result := FDisplayList[I];\r\n Break;\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCCustomSelector.GetDocURL: string;\r\nbegin\r\n Result := TTMSFNCBaseDocURL + 'tmsfncuipack/components/' + LowerCase(ClassName);\r\nend;\r\n\r\nprocedure TTMSFNCCustomSelector.SetAppearance(\r\n const Value: TTMSFNCCustomSelectorAppearance);\r\nbegin\r\n FAppearance.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCCustomSelector.SetColumns(const Value: Integer);\r\nbegin\r\n if FColumns <> Value then\r\n begin\r\n FColumns := Value;\r\n UpdateCalculations;\r\n CalculateItems;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomSelector.SetItems(const Value: TTMSFNCCustomSelectorItems);\r\nbegin\r\n FItems.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCCustomSelector.SetRows(const Value: Integer);\r\nbegin\r\n if FRows <> Value then\r\n begin\r\n FRows := Value;\r\n UpdateCalculations;\r\n CalculateItems;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomSelector.SetSelectedItemIndex(const Value: Integer);\r\nbegin\r\n if FSelectedItemIndex <> Value then\r\n begin\r\n FSelectedItemIndex := Value;\r\n FFocusedItemIndex := Value;\r\n InvalidateItems;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCCustomSelector.XYToItem(X, Y: Single): Integer;\r\nvar\r\n I: Integer;\r\n it: TTMSFNCCustomSelectorItem;\r\nbegin\r\n Result := -1;\r\n for I := 0 to FDisplayList.Count - 1 do\r\n begin\r\n if PtInRectEx(FDisplayList[I].Rect, PointF(X, Y)) then\r\n begin\r\n it := FDisplayList[I].Item;\r\n if Assigned(it) and it.Enabled and not it.Separator then\r\n begin\r\n Result := it.Index;\r\n Break;\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\n{ TTMSFNCCustomSelectorItem }\r\n\r\nprocedure TTMSFNCCustomSelectorItem.Assign(Source: TPersistent);\r\nbegin\r\n if Source is TTMSFNCCustomSelectorItem then\r\n begin\r\n FRowSpan := (Source as TTMSFNCCustomSelectorItem).RowSpan;\r\n FColumnSpan := (Source as TTMSFNCCustomSelectorItem).ColumnSpan;\r\n FVisible := (Source as TTMSFNCCustomSelectorItem).Visible;\r\n FText := (Source as TTMSFNCCustomSelectorItem).Text;\r\n FEnabled := (Source as TTMSFNCCustomSelectorItem).Enabled;\r\n FSeparator := (Source as TTMSFNCCustomSelectorItem).Separator;\r\n FSeparatorHeight := (Source as TTMSFNCCustomSelectorItem).SeparatorHeight;\r\n FMargins.Assign((Source as TTMSFNCCustomSelectorItem).Margins);\r\n FCanDeselect := (Source as TTMSFNCCustomSelectorItem).CanDeselect;\r\n FCanSelect := (Source as TTMSFNCCustomSelectorItem).CanSelect;\r\n FHint := (Source as TTMSFNCCustomSelectorItem).Hint;\r\n end;\r\nend;\r\n\r\nconstructor TTMSFNCCustomSelectorItem.Create(ACollection: TCollection);\r\nbegin\r\n inherited;\r\n if Assigned(Collection) then\r\n FOwner := (Collection as TTMSFNCCustomSelectorItems).FOwner;\r\n FSeparator := False;\r\n FColumnSpan := 1;\r\n FCanDeselect := True;\r\n FCanSelect := True;\r\n FRowSpan := 1;\r\n FMargins := TTMSFNCMargins.Create;\r\n FMargins.OnChange := @MarginsChanged;\r\n FEnabled := True;\r\n FSeparatorHeight := 5;\r\n FVisible := True;\r\n if Assigned(FOwner) then\r\n FOwner.CalculateItems;\r\nend;\r\n\r\ndestructor TTMSFNCCustomSelectorItem.Destroy;\r\nbegin\r\n FMargins.Free;\r\n inherited;\r\n if Assigned(FOwner) then\r\n FOwner.CalculateItems;\r\nend;\r\n\r\nfunction TTMSFNCCustomSelectorItem.IsSeparatorHeightStored: Boolean;\r\nbegin\r\n Result := SeparatorHeight <> 5;\r\nend;\r\n\r\nprocedure TTMSFNCCustomSelectorItem.MarginsChanged(Sender: TObject);\r\nbegin\r\n FOwner.CalculateItems;\r\nend;\r\n\r\nprocedure TTMSFNCCustomSelectorItem.SetCanDeselect(const Value: Boolean);\r\nbegin\r\n FCanDeselect := Value;\r\nend;\r\n\r\nprocedure TTMSFNCCustomSelectorItem.SetCanSelect(const Value: Boolean);\r\nbegin\r\n FCanSelect := Value;\r\nend;\r\n\r\nprocedure TTMSFNCCustomSelectorItem.SetColumnSpan(const Value: Integer);\r\nbegin\r\n if FColumnSpan <> Value then\r\n begin\r\n FColumnSpan := Value;\r\n FOwner.CalculateItems;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomSelectorItem.SetEnabled(const Value: Boolean);\r\nbegin\r\n if FEnabled <> Value then\r\n begin\r\n FEnabled := Value;\r\n FOwner.InvalidateItems;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomSelectorItem.SetHorizontalTextAlign(\r\n const Value: TTMSFNCGraphicsTextAlign);\r\nbegin\r\n if FHorizontalTextAlign <> Value then\r\n begin\r\n FHorizontalTextAlign := Value;\r\n FOwner.InvalidateItems;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomSelectorItem.SetMargins(const Value: TTMSFNCMargins);\r\nbegin\r\n FMargins.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCCustomSelectorItem.SetRowSpan(const Value: Integer);\r\nbegin\r\n if FRowSpan <> Value then\r\n begin\r\n FRowSpan := Value;\r\n FOwner.CalculateItems;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomSelectorItem.SetSeparator(const Value: Boolean);\r\nbegin\r\n if FSeparator <> Value then\r\n begin\r\n FSeparator := Value;\r\n FOwner.CalculateItems;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomSelectorItem.SetSeparatorHeight(const Value: Single);\r\nbegin\r\n if FSeparatorHeight <> Value then\r\n begin\r\n FSeparatorHeight := Value;\r\n FOwner.InvalidateItems;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomSelectorItem.SetText(const Value: String);\r\nbegin\r\n if FText <> Value then\r\n begin\r\n FText := Value;\r\n FOwner.InvalidateItems;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomSelectorItem.SetVerticalTextAlign(\r\n const Value: TTMSFNCGraphicsTextAlign);\r\nbegin\r\n if FVerticalTextAlign <> Value then\r\n begin\r\n FVerticalTextAlign := Value;\r\n FOwner.InvalidateItems;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomSelectorItem.SetVisible(const Value: Boolean);\r\nbegin\r\n if FVisible <> Value then\r\n begin\r\n FVisible := Value;\r\n FOwner.CalculateItems;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCCustomSelectorItem.State: TTMSFNCCustomSelectorItemState;\r\nbegin\r\n Result := isNormal;\r\n if not Separator then\r\n begin\r\n if Enabled then\r\n begin\r\n if Index = FOwner.FDownItemIndex then\r\n Result := isDown\r\n else if Index = FOwner.FHoveredItemIndex then\r\n Result := isHover\r\n else if Index = FOwner.FSelectedItemIndex then\r\n Result := isSelected\r\n end\r\n else\r\n Result := isDisabled;\r\n end;\r\nend;\r\n\r\n{ TTMSFNCCustomSelectorItems }\r\n\r\nfunction TTMSFNCCustomSelectorItems.Add: TTMSFNCCustomSelectorItem;\r\nbegin\r\n Result := TTMSFNCCustomSelectorItem(inherited Add);\r\nend;\r\n\r\nconstructor TTMSFNCCustomSelectorItems.Create(AOwner: TTMSFNCCustomSelector);\r\nbegin\r\n inherited Create(AOwner, CreateItemClass);\r\n FOwner := AOwner;\r\nend;\r\n\r\nfunction TTMSFNCCustomSelectorItems.CreateItemClass: TCollectionItemClass;\r\nbegin\r\n Result := TTMSFNCCustomSelectorItem;\r\nend;\r\n\r\nfunction TTMSFNCCustomSelectorItems.GetItem(\r\n Index: Integer): TTMSFNCCustomSelectorItem;\r\nbegin\r\n Result := TTMSFNCCustomSelectorItem(inherited Items[Index]);\r\nend;\r\n\r\nfunction TTMSFNCCustomSelectorItems.GetOwner: TPersistent;\r\nbegin\r\n Result := FOwner;\r\nend;\r\n\r\nfunction TTMSFNCCustomSelectorItems.Insert(\r\n Index: Integer): TTMSFNCCustomSelectorItem;\r\nbegin\r\n Result := TTMSFNCCustomSelectorItem(inherited Insert(Index));\r\nend;\r\n\r\nprocedure TTMSFNCCustomSelectorItems.SetItem(Index: Integer;\r\n const Value: TTMSFNCCustomSelectorItem);\r\nbegin\r\n inherited Items[Index] := Value;\r\nend;\r\n\r\n{ TTMSFNCCustomSelectorAppearance }\r\n\r\nprocedure TTMSFNCCustomSelectorAppearance.Assign(Source: TPersistent);\r\nbegin\r\n if Source is TTMSFNCCustomSelectorAppearance then\r\n begin\r\n FFill.Assign((Source as TTMSFNCCustomSelectorAppearance).Fill);\r\n FFillHover.Assign((Source as TTMSFNCCustomSelectorAppearance).FillHover);\r\n FFillSelected.Assign((Source as TTMSFNCCustomSelectorAppearance).FillSelected);\r\n FFillDisabled.Assign((Source as TTMSFNCCustomSelectorAppearance).FillDisabled);\r\n FFillDown.Assign((Source as TTMSFNCCustomSelectorAppearance).FillDown);\r\n FStroke.Assign((Source as TTMSFNCCustomSelectorAppearance).Stroke);\r\n FStrokeHover.Assign((Source as TTMSFNCCustomSelectorAppearance).StrokeHover);\r\n FStrokeSelected.Assign((Source as TTMSFNCCustomSelectorAppearance).StrokeSelected);\r\n FStrokeDown.Assign((Source as TTMSFNCCustomSelectorAppearance).StrokeDown);\r\n FStrokeDisabled.Assign((Source as TTMSFNCCustomSelectorAppearance).StrokeDisabled);\r\n FVerticalSpacing := (Source as TTMSFNCCustomSelectorAppearance).VerticalSpacing;\r\n FHorizontalSpacing := (Source as TTMSFNCCustomSelectorAppearance).HorizontalSpacing;\r\n FSeparatorStroke.Assign((Source as TTMSFNCCustomSelectorAppearance).SeparatorStroke);\r\n FFont.AssignSource((Source as TTMSFNCCustomSelectorAppearance).Font);\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomSelectorAppearance.Changed;\r\nbegin\r\n FOwner.CalculateItems;\r\nend;\r\n\r\nconstructor TTMSFNCCustomSelectorAppearance.Create(AOwner: TTMSFNCCustomSelector);\r\nbegin\r\n FOwner := AOwner;\r\n FFill := TTMSFNCGraphicsFill.Create;\r\n FFill.Color := Lighter(gcLightgray, 50);\r\n FFillHover := TTMSFNCGraphicsFill.Create;\r\n FFillHover.Color := Lighter(gcLightslategray, 50);\r\n FFillDown := TTMSFNCGraphicsFill.Create;\r\n FFillDown.Color := Lighter(gcSlategray, 50);\r\n FFillSelected := TTMSFNCGraphicsFill.Create;\r\n FFillSelected.Color := Lighter(gcSlategray, 50);\r\n FFillDisabled := TTMSFNCGraphicsFill.Create;\r\n FFillDisabled.Color := Lighter(gcGray, 50);\r\n\r\n FStroke := TTMSFNCGraphicsStroke.Create;\r\n FStroke.Color := gcDarkgray;\r\n FStrokeHover := TTMSFNCGraphicsStroke.Create;\r\n FStrokeHover.Color := gcLightslategray;\r\n FStrokeDown := TTMSFNCGraphicsStroke.Create;\r\n FStrokeDown.Color := gcSlategray;\r\n FStrokeSelected := TTMSFNCGraphicsStroke.Create;\r\n FStrokeSelected.Color := gcDarkslategray;\r\n FStrokeDisabled := TTMSFNCGraphicsStroke.Create;\r\n FStrokeDisabled.Color := gcDarkgray;\r\n\r\n FSeparatorStroke := TTMSFNCGraphicsStroke.Create;\r\n FSeparatorStroke.Color := gcDarkGray;\r\n\r\n FFont := TTMSFNCGraphicsFont.Create;\r\n FFont.OnChanged := @FontChanged;\r\n\r\n FSeparatorStroke.OnChanged := @StrokeChanged;\r\n FFont.OnChanged := @FontChanged;\r\n\r\n FFill.OnChanged := @FillChanged;\r\n FFillDown.OnChanged := @FillChanged;\r\n FFillHover.OnChanged := @FillChanged;\r\n FFillSelected.OnChanged := @FillChanged;\r\n FFillDisabled.OnChanged := @FillChanged;\r\n\r\n FStroke.OnChanged := @StrokeChanged;\r\n FStrokeHover.OnChanged := @StrokeChanged;\r\n FStrokeDown.OnChanged := @StrokeChanged;\r\n FStrokeDisabled.OnChanged := @StrokeChanged;\r\n FStrokeSelected.OnChanged := @StrokeChanged;\r\n\r\n FHorizontalSpacing := 4;\r\n FVerticalSpacing := 4;\r\nend;\r\n\r\ndestructor TTMSFNCCustomSelectorAppearance.Destroy;\r\nbegin\r\n FFont.Free;\r\n FFill.Free;\r\n FFillDown.Free;\r\n FFillSelected.Free;\r\n FFillHover.Free;\r\n FFillDisabled.Free;\r\n FSeparatorStroke.Free;\r\n FStroke.Free;\r\n FStrokeDown.Free;\r\n FStrokeSelected.Free;\r\n FStrokeHover.Free;\r\n FStrokeDisabled.Free;\r\n inherited;\r\nend;\r\n\r\nprocedure TTMSFNCCustomSelectorAppearance.FillChanged(Sender: TObject);\r\nbegin\r\n FOwner.InvalidateItems;\r\nend;\r\n\r\nprocedure TTMSFNCCustomSelectorAppearance.FontChanged(Sender: TObject);\r\nbegin\r\n FOwner.InvalidateItems;\r\nend;\r\n\r\nfunction TTMSFNCCustomSelectorAppearance.IsHorizontalSpacingStored: Boolean;\r\nbegin\r\n Result := HorizontalSpacing <> 4;\r\nend;\r\n\r\nfunction TTMSFNCCustomSelectorAppearance.IsVerticalSpacingStored: Boolean;\r\nbegin\r\n Result := VerticalSpacing <> 4;\r\nend;\r\n\r\nprocedure TTMSFNCCustomSelectorAppearance.SetFill(const Value: TTMSFNCGraphicsFill);\r\nbegin\r\n FFill.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCCustomSelectorAppearance.SetFillDisabled(const Value: TTMSFNCGraphicsFill);\r\nbegin\r\n FFillDisabled.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCCustomSelectorAppearance.SetFillDown(const Value: TTMSFNCGraphicsFill);\r\nbegin\r\n FFillDown.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCCustomSelectorAppearance.SetFillHover(const Value: TTMSFNCGraphicsFill);\r\nbegin\r\n FFillHover.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCCustomSelectorAppearance.SetFillSelected(const Value: TTMSFNCGraphicsFill);\r\nbegin\r\n FFillSelected.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCCustomSelectorAppearance.SetFont(const Value: TTMSFNCGraphicsFont);\r\nbegin\r\n FFont.AssignSource(Value);\r\nend;\r\n\r\nprocedure TTMSFNCCustomSelectorAppearance.SetHorizontalSpacing(\r\n const Value: Single);\r\nbegin\r\n if FHorizontalSpacing <> Value then\r\n begin\r\n FHorizontalSpacing := Value;\r\n Changed;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomSelectorAppearance.SetSeparatorStroke(\r\n const Value: TTMSFNCGraphicsStroke);\r\nbegin\r\n FSeparatorStroke.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCCustomSelectorAppearance.SetStroke(const Value: TTMSFNCGraphicsStroke);\r\nbegin\r\n FStroke.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCCustomSelectorAppearance.SetStrokeDisabled(\r\n const Value: TTMSFNCGraphicsStroke);\r\nbegin\r\n FStrokeDisabled.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCCustomSelectorAppearance.SetStrokeDown(\r\n const Value: TTMSFNCGraphicsStroke);\r\nbegin\r\n FStrokeDown.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCCustomSelectorAppearance.SetStrokeHover(\r\n const Value: TTMSFNCGraphicsStroke);\r\nbegin\r\n FStrokeHover.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCCustomSelectorAppearance.SetStrokeSelected(\r\n const Value: TTMSFNCGraphicsStroke);\r\nbegin\r\n FStrokeSelected.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCCustomSelectorAppearance.SetVerticalSpacing(const Value: Single);\r\nbegin\r\n if FVerticalSpacing <> Value then\r\n begin\r\n FVerticalSpacing := Value;\r\n Changed;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomSelectorAppearance.StrokeChanged(Sender: TObject);\r\nbegin\r\n FOwner.InvalidateItems;\r\nend;\r\n\r\n{ TTMSFNCGraphicsPathPoint }\r\n\r\n{$IFDEF LCLLIB}\r\nclass operator TTMSFNCCustomSelectorDisplayItem.=(z1, z2: TTMSFNCCustomSelectorDisplayItem)b: boolean;\r\nbegin\r\n Result := z1 = z2;\r\nend;\r\n\r\nclass operator TTMSFNCCustomSelectorPositionItem.=(z1, z2: TTMSFNCCustomSelectorPositionItem)b: boolean;\r\nbegin\r\n Result := z1 = z2;\r\nend;\r\n{$ENDIF}\r\n\r\n{$IFDEF WEBLIB}\r\nfunction TTMSFNCCustomSelectorDisplayList.GetItem(Index: Integer): TTMSFNCCustomSelectorDisplayItem;\r\nbegin\r\n Result := TTMSFNCCustomSelectorDisplayItem(inherited Items[Index]);\r\nend;\r\n\r\nprocedure TTMSFNCCustomSelectorDisplayList.SetItem(Index: Integer; const Value: TTMSFNCCustomSelectorDisplayItem);\r\nvar\r\n v: TTMSFNCCustomSelectorDisplayItem;\r\nbegin\r\n v := Value;\r\n inherited Items[Index] := v;\r\nend;\r\n{$ENDIF}\r\n\r\ninitialization\r\n RegisterClass(TTMSFNCCustomSelector);\r\n\r\nend.\r\n","{********************************************************************}\r\n{ }\r\n{ written by TMS Software }\r\n{ copyright (c) 2016 - 2024 }\r\n{ Email : info@tmssoftware.com }\r\n{ Web : https://www.tmssoftware.com }\r\n{ }\r\n{ The source code is given as is. The author is not responsible }\r\n{ for any possible damage done due to the use of this code. }\r\n{ The complete source code remains property of the author and may }\r\n{ not be distributed, published, given or sold in any form as such. }\r\n{ No parts of the source code can be included in any other component }\r\n{ or application without written authorization of the author. }\r\n{********************************************************************}\r\n\r\nunit WEBLib.TMSFNCCustomPicker;\r\n\r\n{$I WEBLib.TMSFNCDefines.inc}\r\n\r\n{$IFDEF CMNLIB}\r\n{$DEFINE CMNWEBLIB}\r\n{$ENDIF}\r\n{$IFDEF WEBLIB}\r\n{$DEFINE CMNWEBLIB}\r\n{$ENDIF}\r\n\r\ninterface \r\n\r\nuses\r\n Classes, WEBLib.TMSFNCCustomSelector, WEBLib.TMSFNCPersistence, WEBLib.TMSFNCGraphics, WEBLib.TMSFNCGraphicsTypes,\r\n WEBLib.TMSFNCCustomControl, WEBLib.TMSFNCPopup, WEBLib.TMSFNCTypes, WEBLib.Controls\r\n {$IFNDEF WEBLIB}\r\n {$IFNDEF LCLLIB}\r\n , UITypes, Types\r\n {$ENDIF}\r\n {$ENDIF}\r\n {$IFDEF FMXLIB}\r\n , FMX.Edit, FMX.Types\r\n {$ENDIF}\r\n , WEBLib.StdCtrls, WEBLib.ExtCtrls\r\n ;\r\n\r\ntype\r\n TTMSFNCCustomPickerBeforeDraw = procedure(Sender: TObject; AGraphics: TTMSFNCGraphics; ARect: TRectF; var ADefaultDraw: Boolean) of object;\r\n TTMSFNCCustomPickerAfterDraw = procedure(Sender: TObject; AGraphics: TTMSFNCGraphics; ARect: TRectF) of object;\r\n\r\n TTMSFNCCustomPicker = class(TTMSFNCCustomControl)\r\n private\r\n FExitTimerClose: Boolean;\r\n FDefaultStyle: Boolean;\r\n FKeyDown: Word;\r\n FContent: string;\r\n FEdit: TEdit;\r\n FTimer: TTimer;\r\n FExitTimer: TTimer;\r\n FControlExitTimer: TTimer;\r\n FDown: Boolean;\r\n FPopup: TTMSFNCPopup;\r\n FSelector: TTMSFNCCustomSelector;\r\n FOnItemBeforeDrawText: TTMSFNCCustomSelectorItemBeforeDrawText;\r\n FOnAfterDraw: TTMSFNCCustomSelectorAfterDraw;\r\n FOnItemAfterDrawBackground: TTMSFNCCustomSelectorItemAfterDrawBackground;\r\n FOnItemSelected: TTMSFNCCustomSelectorItemSelected;\r\n FOnItemAfterDrawText: TTMSFNCCustomSelectorItemAfterDrawText;\r\n FOnBeforeDraw: TTMSFNCCustomSelectorBeforeDraw;\r\n FOnItemBeforeDrawBackground: TTMSFNCCustomSelectorItemBeforeDrawBackground;\r\n FDropDownHeight: Single;\r\n FDropDownWidth: Single;\r\n FOnItemDeselected: TTMSFNCCustomSelectorItemDeselected;\r\n FOnItemClick: TTMSFNCCustomSelectorItemClick;\r\n FOnItemBeforeDrawContent: TTMSFNCCustomSelectorItemBeforeDrawContent;\r\n FOnItemAfterDrawContent: TTMSFNCCustomSelectorItemAfterDrawContent;\r\n FOnPickerBeforeDraw: TTMSFNCCustomPickerBeforeDraw;\r\n FOnPickerAfterDraw: TTMSFNCCustomPickerAfterDraw;\r\n FShowFocus: Boolean;\r\n FOnClosePopup: TNotifyEvent;\r\n FOnPopup: TNotifyEvent;\r\n FOnEditChange: TNotifyEvent;\r\n FOldEnter: TNotifyEvent;\r\n FOldExit: TNotifyEvent;\r\n FEditable: Boolean;\r\n FUpdateCount: Integer;\r\n FFont: TTMSFNCGraphicsFont;\r\n FPreventDropDown: Boolean;\r\n procedure CalcSize;\r\n function GetAppearance: TTMSFNCCustomSelectorAppearance;\r\n function GetColumns: Integer;\r\n function GetItems: TTMSFNCCustomSelectorItems;\r\n function GetRows: Integer;\r\n function GetSelectedItemIndex: Integer;\r\n procedure SetAppearance(const Value: TTMSFNCCustomSelectorAppearance);\r\n procedure SetColumns(const Value: Integer);\r\n procedure SetItems(const Value: TTMSFNCCustomSelectorItems);\r\n procedure SetRows(const Value: Integer);\r\n procedure SetSelectedItemIndex(const Value: Integer);\r\n function GetFill: TTMSFNCGraphicsFill;\r\n function GetStroke: TTMSFNCGraphicsStroke;\r\n procedure SetFill(const Value: TTMSFNCGraphicsFill);\r\n procedure SetStroke(const Value: TTMSFNCGraphicsStroke);\r\n procedure SetDropDownHeight(const Value: Single);\r\n procedure SetDropDownWidth(const Value: Single);\r\n function IsDropDownHeightStored: Boolean;\r\n function IsDropDownWidthStored: Boolean;\r\n function GetPopup: TTMSFNCPopup;\r\n function GetSelector: TTMSFNCCustomSelector;\r\n procedure SetShowFocus(const Value: Boolean);\r\n procedure SetContent(const Value: String);\r\n procedure SetDefaultStyle(const Value: Boolean);\r\n procedure SetFnt(const Value: TTMSFNCGraphicsFont);\r\n protected\r\n procedure DisableEnterEvent;\r\n procedure DisableExitEvent;\r\n procedure EnableExitEvent;\r\n procedure EnableEnterEvent;\r\n procedure ChangeDPIScale(M,D: Integer); override;\r\n function GetVersion: String; override;\r\n function GetContent: String; virtual;\r\n function GetDocURL: string; override;\r\n procedure SetEditable(const Value: Boolean); virtual;\r\n procedure ApplyStyle; override;\r\n procedure SetAdaptToStyle(const Value: Boolean); override;\r\n procedure DoExit; override;\r\n procedure DoEnter; override;\r\n procedure DoEditExit(Sender: TObject); virtual;\r\n procedure DoEditEnter(Sender: TObject); virtual;\r\n procedure UpdateEditText(AText: string); virtual;\r\n procedure DoItemSelected(Sender: TObject; AItemIndex: Integer); virtual;\r\n procedure DoItemDeselected(Sender: TObject; AItemIndex: Integer); virtual;\r\n procedure DoItemClick(Sender: TObject; AItemIndex: Integer); virtual;\r\n procedure DoItemBeforeDrawBackground(Sender: TObject; AGraphics: TTMSFNCGraphics; ARect: TRectF; AItemIndex: Integer; var AAllowDraw: Boolean); virtual;\r\n procedure DoItemAfterDrawBackground(Sender: TObject; AGraphics: TTMSFNCGraphics; ARect: TRectF; AItemIndex: Integer); virtual;\r\n procedure DoItemBeforeDrawContent(Sender: TObject; AGraphics: TTMSFNCGraphics; ARect: TRectF; AItemIndex: Integer; var AAllowDraw: Boolean); virtual;\r\n procedure DoItemAfterDrawContent(Sender: TObject; AGraphics: TTMSFNCGraphics; ARect: TRectF; AItemIndex: Integer); virtual;\r\n procedure DoItemBeforeDrawText(Sender: TObject; AGraphics: TTMSFNCGraphics; ARect: TRectF; AItemIndex: Integer; var AText: String; var AAllowDraw: Boolean); virtual;\r\n procedure DoItemAfterDrawText(Sender: TObject; AGraphics: TTMSFNCGraphics; ARect: TRectF; AItemIndex: Integer; AText: String); virtual;\r\n procedure DoBeforeDraw(Sender: TObject; AGraphics: TTMSFNCGraphics; ARect: TRectF; var AAllowDraw: Boolean); reintroduce; virtual;\r\n procedure DoAfterDraw(Sender: TObject; AGraphics: TTMSFNCGraphics; ARect: TRectF); reintroduce; virtual;\r\n procedure DoPickerBeforeDraw(AGraphics: TTMSFNCGraphics; ARect: TRectF; var ADefaultDraw: Boolean); virtual;\r\n procedure DoPickerAfterDraw(AGraphics: TTMSFNCGraphics; ARect: TRectF); virtual;\r\n procedure Draw(AGraphics: TTMSFNCGraphics; ARect: TRectF); override;\r\n procedure SelectFirstValue; virtual;\r\n procedure SelectLastValue; virtual;\r\n procedure SelectNextValue; virtual;\r\n procedure SelectPreviousValue; virtual;\r\n procedure EditUp; virtual;\r\n procedure EditDown; virtual;\r\n procedure DoPopup(Sender: TObject);\r\n procedure DoClosePopup(Sender: TObject);\r\n procedure EnterTimerChanged(Sender: TObject);\r\n procedure ExitTimerChanged(Sender: TObject);\r\n procedure ControlExitTimerChanged(Sender: TObject);\r\n procedure EditChange(Sender: TObject);\r\n procedure DoEditChange; virtual;\r\n procedure HandleDialogKey(var Key: Word; Shift: TShiftState); override;\r\n procedure InitializePopup; virtual;\r\n procedure FntChanged(Sender: TObject);\r\n\r\n function CreateSelector: TTMSFNCCustomSelector; virtual;\r\n function GetFocusedControl: TControl; virtual;\r\n procedure AssignEvents; virtual;\r\n procedure SetGraphicColors; virtual;\r\n procedure DrawContent({%H-}AGraphics: TTMSFNCGraphics; {%H-}ARect: TRectF); virtual;\r\n procedure DrawBackground(AGraphics: TTMSFNCGraphics; ARect: TRectF); override;\r\n procedure HandleMouseDown({%H-}Button: TTMSFNCMouseButton; Shift: TShiftState; X, Y: Single); override;\r\n procedure HandleMouseUp({%H-}Button: TTMSFNCMouseButton; {%H-}Shift: TShiftState; {%H-}X, {%H-}Y: Single); override;\r\n procedure HandleKeyDown(var Key: Word; Shift: TShiftState); override;\r\n {$IFDEF FMXLIB}\r\n procedure EditKeyDown(Sender: TObject; var Key: Word; var KeyChar: WideChar; Shift: TShiftState);\r\n {$ENDIF}\r\n {$IFDEF CMNWEBLIB}\r\n procedure EditKeyDown(Sender: TObject; var Key: Word; {%H-}Shift: TShiftState);\r\n procedure EditKeyPress(Sender: TObject; var Key: Char);\r\n {$ENDIF}\r\n property PreventDropDown: Boolean read FPreventDropDown write FPreventDropDown;\r\n property Font: TTMSFNCGraphicsFont read FFont write SetFnt;\r\n property Fill: TTMSFNCGraphicsFill read GetFill write SetFill;\r\n property Stroke: TTMSFNCGraphicsStroke read GetStroke write SetStroke;\r\n property DropDownHeight: Single read FDropDownHeight write SetDropDownHeight stored IsDropDownHeightStored nodefault;\r\n property DropDownWidth: Single read FDropDownWidth write SetDropDownWidth stored IsDropDownWidthStored nodefault;\r\n property Appearance: TTMSFNCCustomSelectorAppearance read GetAppearance write SetAppearance;\r\n property SelectedItemIndex: Integer read GetSelectedItemIndex write SetSelectedItemIndex default -1;\r\n property Rows: Integer read GetRows write SetRows default 4;\r\n property ShowFocus: Boolean read FShowFocus write SetShowFocus default True;\r\n property Columns: Integer read GetColumns write SetColumns default 4;\r\n property Items: TTMSFNCCustomSelectorItems read GetItems write SetItems;\r\n property OnPickerBeforeDraw: TTMSFNCCustomPickerBeforeDraw read FOnPickerBeforeDraw write FOnPickerBeforeDraw;\r\n property OnPickerAfterDraw: TTMSFNCCustomPickerAfterDraw read FOnPickerAfterDraw write FOnPickerAfterDraw;\r\n property OnItemSelected: TTMSFNCCustomSelectorItemSelected read FOnItemSelected write FOnItemSelected;\r\n property OnItemDeselected: TTMSFNCCustomSelectorItemDeselected read FOnItemDeselected write FOnItemDeselected;\r\n property OnItemClick: TTMSFNCCustomSelectorItemClick read FOnItemClick write FOnItemClick;\r\n property OnItemBeforeDrawBackground: TTMSFNCCustomSelectorItemBeforeDrawBackground read FOnItemBeforeDrawBackground write FOnItemBeforeDrawBackground;\r\n property OnItemAfterDrawBackground: TTMSFNCCustomSelectorItemAfterDrawBackground read FOnItemAfterDrawBackground write FOnItemAfterDrawBackground;\r\n property OnItemBeforeDrawContent: TTMSFNCCustomSelectorItemBeforeDrawContent read FOnItemBeforeDrawContent write FOnItemBeforeDrawContent;\r\n property OnItemAfterDrawContent: TTMSFNCCustomSelectorItemAfterDrawContent read FOnItemAfterDrawContent write FOnItemAfterDrawContent;\r\n property OnBeforeDraw: TTMSFNCCustomSelectorBeforeDraw read FOnBeforeDraw write FOnBeforeDraw;\r\n property OnAfterDraw: TTMSFNCCustomSelectorAfterDraw read FOnAfterDraw write FOnAfterDraw;\r\n property OnItemBeforeDrawText: TTMSFNCCustomSelectorItemBeforeDrawText read FOnItemBeforeDrawText write FOnItemBeforeDrawText;\r\n property OnItemAfterDrawText: TTMSFNCCustomSelectorItemAfterDrawText read FOnItemAfterDrawText write FOnItemAfterDrawText;\r\n property Editable: Boolean read FEditable write SetEditable default False;\r\n property OnEditChange: TNotifyEvent read FOnEditChange write FOnEditChange;\r\n property OnClosePopup: TNotifyEvent read FOnClosePopup write FOnClosePopup;\r\n property OnPopup: TNotifyEvent read FOnPopup write FOnPopup;\r\n property Version: String read GetVersion;\r\n property Content: String read GetContent write SetContent;\r\n property UpdateCount: Integer read FUpdateCount;\r\n property DefaultStyle: Boolean read FDefaultStyle write SetDefaultStyle default True;\r\n public\r\n constructor Create(AOwner: TComponent); override;\r\n destructor Destroy; override;\r\n procedure DropDown; virtual;\r\n property Popup: TTMSFNCPopup read GetPopup;\r\n property Selector: TTMSFNCCustomSelector read GetSelector;\r\n property Edit: TEdit read FEdit;\r\n procedure BeginUpdate; override;\r\n procedure EndUpdate; override;\r\n procedure LoadSettingsFromFile(AFileName: string); override;\r\n procedure LoadSettingsFromStream(AStream: TStream); override;\r\n end;\r\n\r\n TTMSFNCDefaultPicker = class(TTMSFNCCustomPicker)\r\n published\r\n property DefaultStyle;\r\n property Fill;\r\n property Stroke;\r\n property Font;\r\n property Version;\r\n property OnPopup;\r\n property OnClosePopup;\r\n end;\r\n\r\nimplementation\r\n\r\nuses\r\n SysUtils, WEBLib.TMSFNCUtils, WEBLib.TMSFNCStyles\r\n {$IFDEF VCLLIB}\r\n , VCL.Graphics, Winapi.Messages\r\n {$ENDIF}\r\n ;\r\n\r\ntype\r\n TTMSFNCOpenCustomSelector = class(TTMSFNCCustomSelector)\r\n public\r\n property Appearance;\r\n property Columns;\r\n property Rows;\r\n property Items;\r\n property SelectedItemIndex;\r\n property OnItemSelected;\r\n property OnItemDeselected;\r\n property OnItemClick;\r\n property OnItemBeforeDrawBackground;\r\n property OnItemAfterDrawBackground;\r\n property OnItemBeforeDrawContent;\r\n property OnItemAfterDrawContent;\r\n property OnItemBeforeDrawText;\r\n property OnItemAfterDrawText;\r\n property OnBeforeDraw;\r\n property OnAfterDraw;\r\n end;\r\n\r\n TTMSFNCCustomPickerEdit = class(TEdit)\r\n {$IFDEF VCLLIB}\r\n private\r\n FOnCancelMode: TNotifyEvent;\r\n protected\r\n procedure WndProc(var Msg : TMessage); override;\r\n property OnCancelMode: TNotifyEvent read FOnCancelMode write FOnCancelMode;\r\n {$ENDIF}\r\n end;\r\n\r\n{ TTMSFNCCustomPicker }\r\n\r\nconstructor TTMSFNCCustomPicker.Create(AOwner: TComponent);\r\nbegin\r\n inherited;\r\n FExitTimerClose := False;\r\n FPreventDropDown := False;\r\n FFont := TTMSFNCGraphicsFont.Create;\r\n FFont.OnChanged := @FntChanged;\r\n\r\n FDefaultStyle := True;\r\n FTimer := TTimer.Create(Self);\r\n FTimer.Interval := 1;\r\n FTimer.OnTimer := EnterTimerChanged;\r\n FTimer.Enabled := False;\r\n\r\n FExitTimer := TTimer.Create(Self);\r\n FExitTimer.Interval := 1;\r\n FExitTimer.OnTimer := ExitTimerChanged;\r\n FExitTimer.Enabled := False;\r\n\r\n FControlExitTimer := TTimer.Create(Self);\r\n FControlExitTimer.Interval := 1;\r\n FControlExitTimer.OnTimer := ControlExitTimerChanged;\r\n FControlExitTimer.Enabled := False;\r\n\r\n //FEdit := TEdit.Create(Self);\r\n FEdit := TTMSFNCCustomPickerEdit.Create(Self);\r\n FEdit.TabOrder := 0;\r\n FEdit.TabStop := True;\r\n FEdit.OnKeyDown := @EditKeyDown;\r\n FEdit.OnExit := @DoEditExit;\r\n FEdit.OnEnter := @DoEditEnter;\r\n {$IFDEF FMXLIB}\r\n FEdit.Margins.Left := 0;\r\n FEdit.Margins.Top := 0;\r\n FEdit.Margins.Right := 17;\r\n FEdit.Margins.Bottom := 0;\r\n FEdit.Align := TAlignLayout.Client;\r\n FEdit.Stored := False;\r\n FEdit.OnChangeTracking := EditChange;\r\n {$ENDIF}\r\n {$IFDEF CMNWEBLIB}\r\n {$IFDEF VCLLIB}\r\n FEdit.AlignWithMargins := True;\r\n FEdit.Margins.Left := 0;\r\n FEdit.Margins.Top := 0;\r\n FEdit.Margins.Right := ScalePaintValue(17);\r\n FEdit.Margins.Bottom := 0;\r\n TTMSFNCCustomPickerEdit(FEdit).OnCancelMode := DoEditExit;\r\n {$ENDIF}\r\n {$IFDEF WEBLIB}\r\n FEdit.AlignWithMargins := True;\r\n FEdit.Margins.Left := 0;\r\n FEdit.Margins.Top := 0;\r\n FEdit.Margins.Right := 17;\r\n FEdit.Margins.Bottom := 0;\r\n {$ENDIF}\r\n {$IFDEF LCLLIB}\r\n FEdit.BorderSpacing.Left := 0;\r\n FEdit.BorderSpacing.Top := 0;\r\n FEdit.BorderSpacing.Right := ScalePaintValue(17);\r\n FEdit.BorderSpacing.Bottom := 0;\r\n {$ENDIF}\r\n FEdit.Align := alClient;\r\n FEdit.OnChange := @EditChange;\r\n FEdit.OnKeyPress := EditKeyPress;\r\n {$ENDIF}\r\n\r\n FDropDownWidth := 135;\r\n FDropDownHeight := 135;\r\n FShowFocus := True;\r\n {$IFDEF FMXLIB}\r\n AutoCapture := True;\r\n {$ENDIF}\r\n FSelector := CreateSelector;\r\n AssignEvents;\r\n\r\n FPopup := TTMSFNCPopup.Create(Self);\r\n FPopup.DragWithParent := True;\r\n FPopup.FocusedControl := GetFocusedControl;\r\n FPopup.ContentControl := FSelector;\r\n FPopup.DropDownWidth := FDropDownWidth;\r\n FPopup.DropDownHeight := FDropDownHeight;\r\n FPopup.OnPopup := DoPopup;\r\n FPopup.OnClosePopup := DoClosePopup;\r\n\r\n Width := 60;\r\n Height := 22;\r\nend;\r\n\r\nfunction TTMSFNCCustomPicker.CreateSelector: TTMSFNCCustomSelector;\r\nbegin\r\n Result := TTMSFNCCustomSelector.Create(Self);\r\nend;\r\n\r\ndestructor TTMSFNCCustomPicker.Destroy;\r\nbegin\r\n if Assigned(FFont) then\r\n FreeAndNil(FFont);\r\n if Assigned(FSelector) then\r\n FreeAndNil(FSelector);\r\n if Assigned(FPopup) then\r\n FreeAndNil(FPopup);\r\n inherited;\r\nend;\r\n\r\nprocedure TTMSFNCCustomPicker.DisableEnterEvent;\r\nbegin\r\n if Assigned(OnEnter) then\r\n FOldEnter := OnEnter;\r\n\r\n OnEnter := nil;\r\nend;\r\n\r\nprocedure TTMSFNCCustomPicker.DisableExitEvent;\r\nbegin\r\n if Assigned(OnExit) then\r\n FOldExit := OnExit;\r\n\r\n OnExit := nil;\r\nend;\r\n\r\nfunction TTMSFNCCustomPicker.GetAppearance: TTMSFNCCustomSelectorAppearance;\r\nbegin\r\n Result := TTMSFNCOpenCustomSelector(FSelector).Appearance;\r\nend;\r\n\r\nfunction TTMSFNCCustomPicker.GetColumns: Integer;\r\nbegin\r\n Result := TTMSFNCOpenCustomSelector(FSelector).Columns;\r\nend;\r\n\r\nfunction TTMSFNCCustomPicker.GetContent: String;\r\nbegin\r\n if Assigned(FEdit) and Assigned(FEdit.Parent) and Editable then\r\n Result := FEdit.Text\r\n else\r\n Result := FContent;\r\nend;\r\n\r\nfunction TTMSFNCCustomPicker.GetDocURL: string;\r\nbegin\r\n Result := TTMSFNCBaseDocURL + 'tmsfncuipack/components/' + LowerCase(ClassName);\r\nend;\r\n\r\nprocedure TTMSFNCCustomPicker.SelectFirstValue;\r\nbegin\r\n\r\nend;\r\n\r\nprocedure TTMSFNCCustomPicker.SelectLastValue;\r\nbegin\r\n\r\nend;\r\n\r\nprocedure TTMSFNCCustomPicker.SelectNextValue;\r\nbegin\r\n\r\nend;\r\n\r\nprocedure TTMSFNCCustomPicker.SelectPreviousValue;\r\nbegin\r\n\r\nend;\r\n\r\nprocedure TTMSFNCCustomPicker.SetAdaptToStyle(const Value: Boolean);\r\nbegin\r\n inherited;\r\n if Assigned(FPopup) then\r\n FPopup.AdaptToStyle := AdaptToStyle;\r\nend;\r\n\r\nprocedure TTMSFNCCustomPicker.SetAppearance(\r\n const Value: TTMSFNCCustomSelectorAppearance);\r\nbegin\r\n TTMSFNCOpenCustomSelector(FSelector).Appearance.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCCustomPicker.SetColumns(const Value: Integer);\r\nbegin\r\n TTMSFNCOpenCustomSelector(FSelector).Columns := Value;\r\nend;\r\n\r\nprocedure TTMSFNCCustomPicker.SetContent(const Value: String);\r\nbegin\r\n FContent := Value;\r\n UpdateEditText(Value);\r\nend;\r\n\r\nprocedure TTMSFNCCustomPicker.SetDefaultStyle(const Value: Boolean);\r\nbegin\r\n if FDefaultStyle <> Value then\r\n begin\r\n FDefaultStyle := Value;\r\n Invalidate;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomPicker.SetDropDownHeight(const Value: Single);\r\nbegin\r\n FDropDownHeight := Value;\r\n if Assigned(FPopup) then\r\n FPopup.DropDownHeight := FDropDownHeight;\r\nend;\r\n\r\nprocedure TTMSFNCCustomPicker.SetDropDownWidth(const Value: Single);\r\nbegin\r\n FDropDownWidth := Value;\r\n if Assigned(FPopup) then\r\n FPopup.DropDownWidth := FDropDownWidth;\r\nend;\r\n\r\nprocedure TTMSFNCCustomPicker.SetEditable(const Value: Boolean);\r\nbegin\r\n if FEditable <> Value then\r\n begin\r\n FEditable := Value;\r\n if Assigned(FEdit) then\r\n begin\r\n if FEditable then\r\n begin\r\n FEdit.Parent := Self;\r\n {$IFDEF CMNLIB}\r\n FEdit.Font.Height := ScalePaintValue(-11);\r\n {$IFDEF VCLLIB}\r\n FEdit.Margins.Right := ScalePaintValue(17);\r\n {$ENDIF}\r\n {$ENDIF}\r\n end\r\n else\r\n FEdit.Parent := nil;\r\n\r\n FEdit.Visible := FEditable;\r\n UpdateEditText(Content);\r\n FPopup.StaysOpen := Editable;\r\n end;\r\n Invalidate;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomPicker.SetFill(const Value: TTMSFNCGraphicsFill);\r\nbegin\r\n TTMSFNCOpenCustomSelector(FSelector).Fill.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCCustomPicker.SetFnt(const Value: TTMSFNCGraphicsFont);\r\nbegin\r\n FFont.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCCustomPicker.SetGraphicColors;\r\nbegin\r\n TTMSFNCGraphics.DefaultPopupFillColor := Fill.Color;\r\n TTMSFNCGraphics.DefaultPopupStrokeColor := Stroke.Color;\r\n TTMSFNCGraphics.DefaultButtonFillColor := Fill.Color;\r\n TTMSFNCGraphics.DefaultButtonStrokeColor := Stroke.Color;\r\n TTMSFNCGraphics.DefaultTextFontColor := Font.Color;\r\n TTMSFNCGraphics.DefaultSelectionFillColor := gcDarkGray;\r\n TTMSFNCGraphics.DefaultButtonFillColorFocused := Lighter(Fill.Color, 20);\r\n TTMSFNCGraphics.DefaultButtonStrokeColorFocused := Lighter(Stroke.Color, 20);\r\n TTMSFNCGraphics.DefaultButtonStrokeColorDisabled := gcDarkGray;\r\n TTMSFNCGraphics.DefaultButtonFillColorDisabled := gcLightgray;\r\nend;\r\n\r\nprocedure TTMSFNCCustomPicker.SetItems(const Value: TTMSFNCCustomSelectorItems);\r\nbegin\r\n TTMSFNCOpenCustomSelector(FSelector).Items.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCCustomPicker.SetRows(const Value: Integer);\r\nbegin\r\n TTMSFNCOpenCustomSelector(FSelector).Rows := Value;\r\nend;\r\n\r\nprocedure TTMSFNCCustomPicker.SetSelectedItemIndex(const Value: Integer);\r\nbegin\r\n TTMSFNCOpenCustomSelector(FSelector).SelectedItemIndex := Value;\r\nend;\r\n\r\nprocedure TTMSFNCCustomPicker.SetShowFocus(const Value: Boolean);\r\nbegin\r\n if FShowFocus <> Value then\r\n begin\r\n FShowFocus := Value;\r\n Invalidate;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomPicker.SetStroke(const Value: TTMSFNCGraphicsStroke);\r\nbegin\r\n TTMSFNCOpenCustomSelector(FSelector).Stroke.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCCustomPicker.UpdateEditText(AText: string);\r\nbegin\r\n if Assigned(FEdit) and Assigned(FEdit.Parent) and Editable then\r\n FEdit.Text := AText;\r\nend;\r\n\r\nprocedure TTMSFNCCustomPicker.ApplyStyle;\r\nvar\r\n c: TTMSFNCGraphicsColor;\r\nbegin\r\n inherited;\r\n c := gcNull;\r\n if TTMSFNCStyles.GetStyleBackgroundFillColor(c) then\r\n Fill.Color := c;\r\n\r\n c := gcNull;\r\n if TTMSFNCStyles.GetStyleLineFillColor(c) then\r\n Stroke.Color := c;\r\n\r\n Invalidate;\r\nend;\r\n\r\nprocedure TTMSFNCCustomPicker.AssignEvents;\r\nbegin\r\n if Assigned(FSelector) then\r\n begin\r\n TTMSFNCOpenCustomSelector(FSelector).OnItemSelected := DoItemSelected;\r\n TTMSFNCOpenCustomSelector(FSelector).OnItemDeselected := DoItemDeselected;\r\n TTMSFNCOpenCustomSelector(FSelector).OnItemClick := DoItemClick;\r\n TTMSFNCOpenCustomSelector(FSelector).OnItemBeforeDrawBackground := DoItemBeforeDrawBackground;\r\n TTMSFNCOpenCustomSelector(FSelector).OnItemAfterDrawBackground := DoItemAfterDrawBackground;\r\n TTMSFNCOpenCustomSelector(FSelector).OnItemBeforeDrawContent := DoItemBeforeDrawContent;\r\n TTMSFNCOpenCustomSelector(FSelector).OnItemAfterDrawContent := DoItemAfterDrawContent;\r\n TTMSFNCOpenCustomSelector(FSelector).OnItemBeforeDrawText := DoItemBeforeDrawText;\r\n TTMSFNCOpenCustomSelector(FSelector).OnItemAfterDrawText := DoItemAfterDrawText;\r\n TTMSFNCOpenCustomSelector(FSelector).OnBeforeDraw := DoBeforeDraw;\r\n TTMSFNCOpenCustomSelector(FSelector).OnAfterDraw := DoAfterDraw;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomPicker.BeginUpdate;\r\nbegin\r\n inherited;\r\n Inc(FUpdateCount);\r\n if Assigned(FSelector) then\r\n FSelector.BeginUpdate;\r\nend;\r\n\r\nprocedure TTMSFNCCustomPicker.CalcSize;\r\nbegin\r\nend;\r\n\r\nprocedure TTMSFNCCustomPicker.ChangeDPIScale(M, D: Integer);\r\nbegin\r\n inherited;\r\n BeginUpdate;\r\n Font.Height := TTMSFNCUtils.MulDivInt(Font.Height, M, D);\r\n {$IFDEF CMNLIB}\r\n FEdit.Font.Height := TTMSFNCUtils.MulDivInt(FEdit.Font.Height, M, D);\r\n {$ENDIF}\r\n\r\n {$IFNDEF LCLLIB}\r\n FEdit.Margins.Right := ScalePaintValue(17);\r\n {$ENDIF}\r\n {$IFDEF LCLLIB}\r\n FEdit.BorderSpacing.Right := ScalePaintValue(17);\r\n {$ENDIF}\r\n\r\n DropDownHeight := TTMSFNCUtils.MulDivSingle(FDropDownHeight, M, D);\r\n DropDownWidth := TTMSFNCUtils.MulDivSingle(FDropDownWidth, M, D);\r\n EndUpdate;\r\nend;\r\n\r\nprocedure TTMSFNCCustomPicker.ControlExitTimerChanged(Sender: TObject);\r\nbegin\r\n FControlExitTimer.Enabled := False;\r\n\r\n if not FEdit.IsFocused {$IFNDEF WEBLIB}and not Assigned(FPopup.PopupForm){$ENDIF} then\r\n EnableEnterEvent;\r\nend;\r\n\r\nprocedure TTMSFNCCustomPicker.DropDown;\r\nbegin\r\n DisableExitEvent;\r\n\r\n FPopup.PlacementControl := Self;\r\n\r\n if not FPopup.IsOpen then\r\n begin\r\n CalcSize;\r\n FPopup.IsOpen := True;\r\n end\r\n else\r\n FPopup.IsOpen := False;\r\n\r\n EnableExitEvent;\r\nend;\r\n\r\nprocedure TTMSFNCCustomPicker.EditChange(Sender: TObject);\r\nbegin\r\n Content := FEdit.Text;\r\n DoEditChange;\r\n if Assigned(OnEditChange) then\r\n OnEditChange(Self);\r\nend;\r\n\r\nprocedure TTMSFNCCustomPicker.EnableEnterEvent;\r\nbegin\r\n OnEnter := FOldEnter;\r\nend;\r\n\r\nprocedure TTMSFNCCustomPicker.EnableExitEvent;\r\nbegin\r\n OnExit := FOldExit;\r\nend;\r\n\r\nprocedure TTMSFNCCustomPicker.EndUpdate;\r\nbegin\r\n inherited;\r\n Dec(FUpdateCount);\r\n if Assigned(FSelector) then\r\n FSelector.EndUpdate;\r\nend;\r\n\r\nprocedure TTMSFNCCustomPicker.EnterTimerChanged(Sender: TObject);\r\nbegin\r\n if Editable and (not FExitTimerClose) then\r\n begin\r\n DisableExitEvent;\r\n FEdit.SetFocus;\r\n EnableExitEvent;\r\n end;\r\n\r\n FExitTimerClose := False;\r\n FTimer.Enabled := False;\r\nend;\r\n\r\nprocedure TTMSFNCCustomPicker.ExitTimerChanged(Sender: TObject);\r\nvar\r\n f: Boolean;\r\nbegin\r\n FExitTimer.Enabled := False;\r\n\r\n FExitTimerClose := True;\r\n\r\n f := True;\r\n {$IFNDEF VCLLIB}\r\n if Assigned(FPopup.FocusedControl) then\r\n begin\r\n {$IFDEF FMXLIB}\r\n f := not FPopup.FocusedControl.IsFocused;\r\n {$ENDIF}\r\n {$IFDEF WEBLIB}\r\n if FPopup.FocusedControl is TCustomControl then\r\n f := not (FPopup.FocusedControl as TCustomControl).Focused;\r\n {$ENDIF}\r\n {$IFDEF CMNLIB}\r\n if FPopup.FocusedControl is TWinControl then\r\n f := not (FPopup.FocusedControl as TWinControl).Focused;\r\n {$ENDIF}\r\n end\r\n else if Assigned(FPopup.ContentControl) then\r\n begin\r\n {$IFDEF FMXLIB}\r\n f := not FPopup.ContentControl.IsFocused;\r\n {$ENDIF}\r\n {$IFDEF WEBLIB}\r\n if FPopup.ContentControl is TCustomControl then\r\n f := not (FPopup.ContentControl as TCustomControl).Focused;\r\n {$ENDIF}\r\n {$IFDEF CMNLIB}\r\n if FPopup.ContentControl is TWinControl then\r\n f := not (FPopup.ContentControl as TWinControl).Focused;\r\n {$ENDIF}\r\n end;\r\n {$ENDIF}\r\n\r\n if FPopup.IsOpen and (not FDown) and f and (not PreventDropDown) then\r\n begin\r\n DropDown;\r\n {$IFNDEF CMNLIB}\r\n DoExit;\r\n if CanFocus and Assigned(OnExit) then\r\n OnExit(Self);\r\n {$ENDIF}\r\n {$IFDEF CMNLIB}\r\n FControlExitTimer.Enabled := True;\r\n {$ENDIF}\r\n end\r\n else if not FPopup.IsOpen and (not FDown) then\r\n begin\r\n {$IFNDEF CMNLIB}\r\n DoExit;\r\n {$ENDIF}\r\n {$IFDEF CMNLIB}\r\n FControlExitTimer.Enabled := True;\r\n {$ENDIF}\r\n end;\r\n\r\n PreventDropDown := False;\r\nend;\r\n\r\nprocedure TTMSFNCCustomPicker.FntChanged(Sender: TObject);\r\nbegin\r\n Invalidate;\r\nend;\r\n\r\nprocedure TTMSFNCCustomPicker.HandleMouseUp(Button: TTMSFNCMouseButton; Shift: TShiftState; X, Y: Single);\r\nbegin\r\n {$IFDEF VCLLIB}\r\n if FExitTimer.Enabled then\r\n FPreventDropDown := True;\r\n {$ENDIF}\r\n\r\n FDown := False;\r\n Invalidate;\r\nend;\r\n\r\nprocedure TTMSFNCCustomPicker.HandleDialogKey(var Key: Word;\r\n Shift: TShiftState);\r\nbegin\r\n if Shift <> [] then\r\n Exit;\r\n\r\n if Editable and FEdit.IsFocused then\r\n begin\r\n case Key of\r\n KEY_F4:\r\n begin\r\n if not (ssAlt in Shift) then\r\n DropDown;\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomPicker.HandleKeyDown(var Key: Word; Shift: TShiftState);\r\nbegin\r\n inherited;\r\n\r\n if (ssAlt in Shift) then\r\n begin\r\n case Key of\r\n KEY_UP, KEY_DOWN:\r\n begin\r\n DropDown;\r\n Exit;\r\n end;\r\n end;\r\n end;\r\n\r\n case Key of\r\n KEY_HOME: SelectFirstValue;\r\n KEY_END: SelectLastValue;\r\n KEY_UP, KEY_LEFT: SelectPreviousValue;\r\n KEY_DOWN, KEY_RIGHT: SelectNextValue;\r\n end;\r\n\r\n if Shift <> [] then\r\n Exit;\r\n\r\n case Key of\r\n KEY_SPACE, KEY_RETURN, KEY_F4: DropDown;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomPicker.HandleMouseDown(Button: TTMSFNCMouseButton; Shift: TShiftState; X, Y: Single);\r\nbegin\r\n inherited;\r\n if CanFocus then\r\n SetFocus;\r\n\r\n if (Button = {$IFNDEF WEBLIB}TTMSFNCMouseButton.{$ENDIF}mbLeft) then\r\n begin\r\n FDown := True;\r\n Invalidate;\r\n DropDown;\r\n if Editable then\r\n begin\r\n DisableExitEvent;\r\n FEdit.SetFocus;\r\n EnableExitEvent;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomPicker.DoAfterDraw(Sender: TObject; AGraphics: TTMSFNCGraphics; ARect: TRectF);\r\nbegin\r\n if Assigned(OnAfterDraw) then\r\n OnAfterDraw(Self, AGraphics, ARect);\r\nend;\r\n\r\nprocedure TTMSFNCCustomPicker.DoBeforeDraw(Sender: TObject; AGraphics: TTMSFNCGraphics; ARect: TRectF;\r\n var AAllowDraw: Boolean);\r\nbegin\r\n if Assigned(OnBeforeDraw) then\r\n OnBeforeDraw(Self, AGraphics, ARect, AAllowDraw);\r\nend;\r\n\r\nprocedure TTMSFNCCustomPicker.DoClosePopup(Sender: TObject);\r\nbegin\r\n if Assigned(OnClosePopup) then\r\n OnClosePopup(Self);\r\nend;\r\n\r\nprocedure TTMSFNCCustomPicker.DoEditChange;\r\nbegin\r\n\r\nend;\r\n\r\nprocedure TTMSFNCCustomPicker.DoEditEnter(Sender: TObject);\r\nbegin\r\n if not FPopup.IsOpen then\r\n DoEnter;\r\nend;\r\n\r\nprocedure TTMSFNCCustomPicker.DoEditExit(Sender: TObject);\r\nbegin\r\n FExitTimer.Enabled := True;\r\nend;\r\n\r\nprocedure TTMSFNCCustomPicker.DoEnter;\r\nbegin\r\n inherited;\r\n DisableEnterEvent;\r\n FTimer.Enabled := True;\r\n Invalidate;\r\nend;\r\n\r\nprocedure TTMSFNCCustomPicker.DoExit;\r\nbegin\r\n inherited;\r\n FControlExitTimer.Enabled := True;\r\n\r\n Invalidate;\r\nend;\r\n\r\nprocedure TTMSFNCCustomPicker.Draw(AGraphics: TTMSFNCGraphics; ARect: TRectF);\r\nvar\r\n a: Boolean;\r\n r, rf: TRectF;\r\nbegin\r\n inherited;\r\n a := True;\r\n DoPickerBeforeDraw(AGraphics, ARect, a);\r\n if a then\r\n begin\r\n DrawBackground(AGraphics, ARect);\r\n r := ARect;\r\n r.Right := r.Right - ScalePaintValue(15);\r\n DrawContent(AGraphics, r);\r\n if ShowFocus and IsFocused then\r\n begin\r\n rf := ARect;\r\n InflateRectEx(rf, -1, -1);\r\n AGraphics.DrawFocusRectangle(rf);\r\n end;\r\n DoPickerAfterDraw(AGraphics, ARect);\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomPicker.DrawBackground(AGraphics: TTMSFNCGraphics;\r\n ARect: TRectF);\r\nbegin\r\n if not FDefaultStyle then\r\n begin\r\n SetGraphicColors;\r\n end;\r\n\r\n AGraphics.DrawDropDownButton(ARect, FDown, IsFocused, True, False, AdaptToStyle or not FDefaultStyle, PaintScaleFactor);\r\n\r\n if not FDefaultStyle then\r\n AGraphics.SetDefaultGraphicColors;\r\nend;\r\n\r\nprocedure TTMSFNCCustomPicker.DrawContent(AGraphics: TTMSFNCGraphics; ARect: TRectF);\r\nbegin\r\n AGraphics.Font.Assign(Font);\r\n if not Enabled then\r\n AGraphics.Font.Color := gcSilver;\r\nend;\r\n\r\nprocedure TTMSFNCCustomPicker.DoItemAfterDrawContent(Sender: TObject; AGraphics: TTMSFNCGraphics;\r\n ARect: TRectF; AItemIndex: Integer);\r\nbegin\r\n if Assigned(OnItemAfterDrawContent) then\r\n OnItemAfterDrawContent(Self, AGraphics, ARect, AItemIndex);\r\nend;\r\n\r\nprocedure TTMSFNCCustomPicker.DoItemAfterDrawBackground(Sender: TObject; AGraphics: TTMSFNCGraphics;\r\n ARect: TRectF; AItemIndex: Integer);\r\nbegin\r\n if Assigned(OnItemAfterDrawBackground) then\r\n OnItemAfterDrawBackground(Self, AGraphics, ARect, AItemIndex);\r\nend;\r\n\r\nprocedure TTMSFNCCustomPicker.DoItemAfterDrawText(Sender: TObject; AGraphics: TTMSFNCGraphics;\r\n ARect: TRectF; AItemIndex: Integer; AText: String);\r\nbegin\r\n if Assigned(OnItemAfterDrawText) then\r\n OnItemAfterDrawText(Self, AGraphics, ARect, AItemIndex, AText);\r\nend;\r\n\r\nprocedure TTMSFNCCustomPicker.DoItemBeforeDrawBackground(Sender: TObject; AGraphics: TTMSFNCGraphics;\r\n ARect: TRectF; AItemIndex: Integer; var AAllowDraw: Boolean);\r\nbegin\r\n if Assigned(OnItemBeforeDrawBackground) then\r\n OnItemBeforeDrawBackground(Self, AGraphics, ARect, AItemIndex, AAllowDraw);\r\nend;\r\n\r\nprocedure TTMSFNCCustomPicker.DoItemBeforeDrawContent(Sender: TObject; AGraphics: TTMSFNCGraphics;\r\n ARect: TRectF; AItemIndex: Integer; var AAllowDraw: Boolean);\r\nbegin\r\n if Assigned(OnItemBeforeDrawContent) then\r\n OnItemBeforeDrawContent(Self, AGraphics, ARect, AItemIndex, AAllowDraw);\r\nend;\r\n\r\nprocedure TTMSFNCCustomPicker.DoItemBeforeDrawText(Sender: TObject; AGraphics: TTMSFNCGraphics;\r\n ARect: TRectF; AItemIndex: Integer; var AText: String;\r\n var AAllowDraw: Boolean);\r\nbegin\r\n if Assigned(OnItemBeforeDrawText) then\r\n OnItemBeforeDrawText(Self, AGraphics, ARect, AItemIndex, AText, AAllowDraw);\r\nend;\r\n\r\nprocedure TTMSFNCCustomPicker.DoItemClick(Sender: TObject; AItemIndex: Integer);\r\nbegin\r\n if Assigned(OnItemClick) then\r\n OnItemClick(Self, AItemIndex);\r\nend;\r\n\r\nprocedure TTMSFNCCustomPicker.DoItemDeselected(Sender: TObject; AItemIndex: Integer);\r\nbegin\r\n if Assigned(OnItemDeselected) then\r\n OnItemDeselected(Self, AItemIndex);\r\nend;\r\n\r\nprocedure TTMSFNCCustomPicker.DoItemSelected(Sender: TObject; AItemIndex: Integer);\r\nbegin\r\n UpdateEditText('');\r\n if Assigned(OnItemSelected) then\r\n OnItemSelected(Self, AItemIndex);\r\nend;\r\n\r\nprocedure TTMSFNCCustomPicker.DoPickerAfterDraw(AGraphics: TTMSFNCGraphics;\r\n ARect: TRectF);\r\nbegin\r\n if Assigned(OnPickerAfterDraw) then\r\n OnPickerAfterDraw(Self, AGraphics, ARect);\r\nend;\r\n\r\nprocedure TTMSFNCCustomPicker.DoPickerBeforeDraw(AGraphics: TTMSFNCGraphics;\r\n ARect: TRectF; var ADefaultDraw: Boolean);\r\nbegin\r\n if Assigned(OnPickerBeforeDraw) then\r\n OnPickerBeforeDraw(Self, AGraphics, ARect, ADefaultDraw);\r\nend;\r\n\r\nprocedure TTMSFNCCustomPicker.DoPopup(Sender: TObject);\r\nbegin\r\n if Editable and FExitTimer.Enabled then\r\n PreventDropDown := True;\r\n\r\n InitializePopup;\r\n if Assigned(FSelector) then\r\n TTMSFNCOpenCustomSelector(FSelector).CalculateItems;\r\n if Assigned(OnPopup) then\r\n OnPopup(Self);\r\nend;\r\n\r\nfunction TTMSFNCCustomPicker.GetFill: TTMSFNCGraphicsFill;\r\nbegin\r\n Result := TTMSFNCOpenCustomSelector(FSelector).Fill;\r\nend;\r\n\r\nfunction TTMSFNCCustomPicker.GetFocusedControl: TControl;\r\nbegin\r\n Result := nil;\r\nend;\r\n\r\nfunction TTMSFNCCustomPicker.GetItems: TTMSFNCCustomSelectorItems;\r\nbegin\r\n Result := TTMSFNCOpenCustomSelector(FSelector).Items;\r\nend;\r\n\r\nfunction TTMSFNCCustomPicker.GetPopup: TTMSFNCPopup;\r\nbegin\r\n Result := FPopup;\r\nend;\r\n\r\nfunction TTMSFNCCustomPicker.GetRows: Integer;\r\nbegin\r\n Result := TTMSFNCOpenCustomSelector(FSelector).Rows;\r\nend;\r\n\r\nfunction TTMSFNCCustomPicker.GetSelectedItemIndex: Integer;\r\nbegin\r\n Result := TTMSFNCOpenCustomSelector(FSelector).SelectedItemIndex;\r\nend;\r\n\r\nfunction TTMSFNCCustomPicker.GetSelector: TTMSFNCCustomSelector;\r\nbegin\r\n Result := FSelector;\r\nend;\r\n\r\nfunction TTMSFNCCustomPicker.GetStroke: TTMSFNCGraphicsStroke;\r\nbegin\r\n Result := TTMSFNCOpenCustomSelector(FSelector).Stroke;\r\nend;\r\n\r\nfunction TTMSFNCCustomPicker.GetVersion: String;\r\nbegin\r\n Result := GetVersionNumber(MAJ_VER, MIN_VER, REL_VER, BLD_VER);\r\nend;\r\n\r\nprocedure TTMSFNCCustomPicker.InitializePopup;\r\nbegin\r\n if Assigned(FPopup) then\r\n begin\r\n FPopup.AdaptToStyle := AdaptToStyle;\r\n if not FDefaultStyle then\r\n begin\r\n FPopup.FillColor := Fill.Color;\r\n FPopup.StrokeColor := Stroke.Color;\r\n end\r\n else\r\n begin\r\n FPopup.FillColor := gcNull;\r\n FPopup.StrokeColor := gcNull;\r\n end;\r\n end;\r\n\r\n if Assigned(FSelector) then\r\n FSelector.AdaptToStyle := AdaptToStyle;\r\nend;\r\n\r\nfunction TTMSFNCCustomPicker.IsDropDownHeightStored: Boolean;\r\nbegin\r\n Result := DropDownHeight <> 135;\r\nend;\r\n\r\nfunction TTMSFNCCustomPicker.IsDropDownWidthStored: Boolean;\r\nbegin\r\n Result := DropDownWidth <> 135;\r\nend;\r\n\r\nprocedure TTMSFNCCustomPicker.LoadSettingsFromFile(AFileName: string);\r\nbegin\r\n FDefaultStyle := False;\r\n inherited;\r\n Invalidate;\r\nend;\r\n\r\nprocedure TTMSFNCCustomPicker.LoadSettingsFromStream(AStream: TStream);\r\nbegin\r\n FDefaultStyle := False;\r\n inherited;\r\n Invalidate;\r\nend;\r\n\r\nprocedure TTMSFNCCustomPicker.EditUp;\r\nbegin\r\n //\r\nend;\r\n\r\nprocedure TTMSFNCCustomPicker.EditDown;\r\nbegin\r\n //\r\nend;\r\n\r\n{$IFDEF FMXLIB}\r\nprocedure TTMSFNCCustomPicker.EditKeyDown(Sender: TObject; var Key: Word; var KeyChar: WideChar; Shift: TShiftState);\r\n{$ENDIF}\r\n{$IFDEF CMNWEBLIB}\r\nprocedure TTMSFNCCustomPicker.EditKeyDown(Sender: TObject; var Key: Word; {%H-}Shift: TShiftState);\r\nbegin\r\n FKeyDown := Key;\r\nend;\r\n\r\nprocedure TTMSFNCCustomPicker.EditKeyPress(Sender: TObject; var Key: Char);\r\n{$ENDIF}\r\n procedure EatKey;\r\n begin\r\n {$IFDEF FMXLIB}\r\n KeyChar := #0;\r\n Key := 0;\r\n {$ENDIF}\r\n {$IFDEF CMNWEBLIB}\r\n Key := #0;\r\n {$ENDIF}\r\n end;\r\nbegin\r\n {$IFDEF FMXLIB}\r\n FKeyDown := Key;\r\n {$ENDIF}\r\n\r\n if FKeyDown in [KEY_UP, KEY_DOWN] then\r\n begin\r\n if FKeyDown = KEY_UP then\r\n EditUp;\r\n\r\n if FKeyDown = KEY_DOWN then\r\n EditDown;\r\n\r\n EatKey;\r\n end;\r\nend;\r\n\r\n{ TTMSFNCCustomPickerEdit }\r\n\r\n{$IFDEF VCLLIB}\r\nprocedure TTMSFNCCustomPickerEdit.WndProc(var Msg: TMessage);\r\nbegin\r\n inherited;\r\n if Msg.Msg = CM_CANCELMODE then\r\n begin\r\n if Assigned(OnCancelMode) then\r\n OnCancelMode(Self);\r\n end;\r\nend;\r\n{$ENDIF}\r\n\r\nend.\r\n","{********************************************************************}\r\n{ }\r\n{ written by TMS Software }\r\n{ copyright (c) 2021 - 2023 }\r\n{ Email : info@tmssoftware.com }\r\n{ Web : https://www.tmssoftware.com }\r\n{ }\r\n{ The source code is given as is. The author is not responsible }\r\n{ for any possible damage done due to the use of this code. }\r\n{ The complete source code remains property of the author and may }\r\n{ not be distributed, published, given or sold in any form as such. }\r\n{ No parts of the source code can be included in any other component }\r\n{ or application without written authorization of the author. }\r\n{********************************************************************}\r\n\r\nunit WEBLib.TMSFNCControlPicker;\r\n\r\n{$I WEBLib.TMSFNCDefines.inc}\r\n\r\n{$IFDEF CMNLIB}\r\n{$DEFINE CMNWEBLIB}\r\n{$ENDIF}\r\n{$IFDEF WEBLIB}\r\n{$DEFINE CMNWEBLIB}\r\n{$ENDIF}\r\n\r\ninterface\r\n\r\nuses\r\n Classes, Types, WEBLib.Controls,\r\n {$IFDEF FMXLIB}\r\n FMX.Types,\r\n {$ENDIF}\r\n WEBLib.TMSFNCCustomPicker, WEBLib.TMSFNCCustomSelector,\r\n WEBLib.TMSFNCGraphics, WEBLib.TMSFNCGraphicsTypes, WEBLib.TMSFNCTypes;\r\n\r\nconst\r\n MAJ_VER = 1; // Major version nr.\r\n MIN_VER = 0; // Minor version nr.\r\n REL_VER = 1; // Release nr.\r\n BLD_VER = 2; // Build nr.\r\n\r\n // Version history\r\n // v1.0.0.0 : first release\r\n // v1.0.0.1 : Fixed : Issue with OnAdjustDropDownWidth event\r\n // v1.0.1.0 : New : Support for high dpi\r\n // : New : Mode value added to use Picker width or height for dropdown\r\n // v1.0.1.1 : Improved : Bugfix for design-time components on high dpi fixed with november patch\r\n // v1.0.1.2 : Fixed : Issue with selection on Windows\r\ntype\r\n ITMSFNCControlPickerBase = interface\r\n ['{FF82E121-0510-4FF1-8BB8-A40AA5219095}']\r\n function PickerGetContent: String;\r\n end;\r\n\r\n ITMSFNCControlPickerItems = interface(ITMSFNCControlPickerBase)\r\n ['{D0FBAC5E-B2AA-46AE-AD21-91DF23AD4FCB}']\r\n procedure PickerSelectItem(AItemIndex: Integer);\r\n function PickerGetSelectedItem: Integer;\r\n function PickerGetVisibleItemCount: Integer;\r\n function PickerGetItemCount: Integer;\r\n function PickerGetItemHeight: Single;\r\n procedure PickerSetItemHeight(AValue: Single);\r\n function PickerGetItemWidth: Single;\r\n procedure PickerSetItemWidth(AValue: Single);\r\n function PickerGetNextSelectableItem(AItemIndex: Integer): Integer;\r\n function PickerGetPreviousSelectableItem(AItemIndex: Integer): Integer;\r\n function PickerGetFirstSelectableItem: Integer;\r\n function PickerGetLastSelectableItem: Integer;\r\n end;\r\n\r\n TTMSFNCControlPickerFilterItem = record\r\n ItemIndex: Integer;\r\n ItemText: string;\r\n end;\r\n\r\n ITMSFNCControlPickerFull = interface(ITMSFNCControlPickerItems)\r\n ['{3AF9E5D7-2049-4809-920F-BA318E3D8E8D}']\r\n procedure PickerResetFilter;\r\n procedure PickerApplyFilter(ACondition: string; ACaseSensitive: Boolean);\r\n function PickerLookupItem(ALookupString: String; ACaseSensitive: Boolean): TTMSFNCControlPickerFilterItem;\r\n end;\r\n\r\n TTMSFNCControlPickerStyle = (csDropDown, csDropDownList);\r\n TTMSFNCControlPickderDropDownHeightMode = (chmDropDownHeight, chmControl, chmItems, chmPickerHeight);\r\n TTMSFNCControlPickderDropDownWidthMode = (cwmDropDownWidth, cwmControl, cwmItems, cwmPickerWidth);\r\n\r\n TTMSFNCCustomControlPickerItemSelectedEvent = procedure(Sender: TObject; AText: string; AItemIndex: Integer) of object;\r\n TTMSFNCCustomControlPickerOnAdjustDropDownSizeEvent = procedure(Sender: TObject; var ASize: Single; var AAllow: Boolean) of object;\r\n TTMSFNCCustomControlPickerOnSetContentEvent = procedure(Sender: TObject; var AText: string; var AAllow: Boolean) of object;\r\n TTMSFNCCustomControlPickerBeforeDrawContentEvent = procedure(Sender: TObject; AGrahpics: TTMSFNCGraphics; ARect: TRectF; AContent: string; var AAllow: Boolean; var ADefaultDraw: Boolean) of object;\r\n TTMSFNCCustomControlPickerAfterDrawContentEvent = procedure(Sender: TObject; AGrahpics: TTMSFNCGraphics; ARect: TRectF; AContent: string) of object;\r\n\r\n TTMSFNCCustomControlPicker = class(TTMSFNCDefaultPicker)\r\n private\r\n FAutoCloseUp: Boolean;\r\n FAutoComplete: Boolean;\r\n FAutoCompleteDelay: Integer;\r\n FAutoCompleteNumChar: Integer;\r\n FAutoDropDown: Boolean;\r\n FCaseSensitive: Boolean;\r\n FControl: TControl;\r\n {$IFDEF CMNLIB}\r\n FControlParent: TWINControl;\r\n {$ENDIF}\r\n {$IFNDEF CMNLIB}\r\n FControlParent: TControl;\r\n {$ENDIF}\r\n FControlVisible: Boolean;\r\n {$IFDEF FMXLIB}\r\n FControlAlign: TAlignLayout;\r\n {$ENDIF}\r\n {$IFNDEF FMXLIB}\r\n FControlAlign: TAlign;\r\n {$ENDIF}\r\n FControlLeft: Single;\r\n FControlTop: Single;\r\n FControlWidth: Single;\r\n FControlHeight: Single;\r\n FDropDownHeightMode: TTMSFNCControlPickderDropDownHeightMode;\r\n FKeyDown: Word;\r\n FFont: TTMSFNCGraphicsFont;\r\n FPrevString: string;\r\n FStyle: TTMSFNCControlPickerStyle;\r\n FTick: Cardinal;\r\n FWrapper: TTMSFNCCustomSelector;\r\n FOnAdjustDropDownHeight: TTMSFNCCustomControlPickerOnAdjustDropDownSizeEvent;\r\n FOnAfterDrawPickerContent: TTMSFNCCustomControlPickerAfterDrawContentEvent;\r\n FOnBeforeDrawPickerContent: TTMSFNCCustomControlPickerBeforeDrawContentEvent;\r\n FOnItemSelected: TTMSFNCCustomControlPickerItemSelectedEvent;\r\n FOnSetContent: TTMSFNCCustomControlPickerOnSetContentEvent;\r\n FDropDownWidthMode: TTMSFNCControlPickderDropDownWidthMode;\r\n FOnAdjustDropDownWidth: TTMSFNCCustomControlPickerOnAdjustDropDownSizeEvent;\r\n FDropDownControlWidth: Single;\r\n FDropDownControlHeight: Single;\r\n procedure SetAutoCloseUp(const Value: Boolean);\r\n procedure SetAutoComplete(const Value: Boolean);\r\n procedure SetAutoCompleteDelay(const Value: Integer);\r\n procedure SetAutoCompleteNumChar(const Value: Integer);\r\n procedure SetAutoDropDown(const Value: Boolean);\r\n procedure SetControl(const Value: TControl);\r\n procedure SetDropDownHeightMode(const Value: TTMSFNCControlPickderDropDownHeightMode);\r\n procedure SetFnt(const Value: TTMSFNCGraphicsFont);\r\n procedure SetItemHeight(const Value: Single);\r\n procedure SetItemIndex(const Value: Integer);\r\n procedure SetStyle(const Value: TTMSFNCControlPickerStyle);\r\n procedure SetText(const Value: string);\r\n procedure SetCaseSensitive(const Value: Boolean);\r\n function GetItemIndex: Integer;\r\n function GetItemHeight: Single;\r\n function GetText: string;\r\n function GetCount: Integer;\r\n procedure ApplyFilter(ACondition: string);\r\n procedure ClearFilter;\r\n function LookupItem(ALookupString: String): TTMSFNCControlPickerFilterItem;\r\n procedure SetDropDownWidthMode(const Value: TTMSFNCControlPickderDropDownWidthMode);\r\n function GetItemWidth: Single;\r\n procedure SetItemWidth(const Value: Single);\r\n procedure SetDropDownControlHeight(const Value: Single);\r\n procedure SetDropDownControlWidth(const Value: Single);\r\n protected\r\n procedure ChangeDPIScale(M, D: Integer); override;\r\n procedure Notification(AComponent: TComponent; Operation: TOperation); override;\r\n procedure FontChange(Sender: TObject);\r\n procedure Loaded; override;\r\n procedure DoPickerItemSelected(AText: string; AItemIndex: Integer); virtual;\r\n procedure DoAdjustDropDownHeight(var AHeight: Single; var AAllow: Boolean); virtual;\r\n procedure DoAdjustDropDownWidth(var AWidth: Single; var AAllow: Boolean); virtual;\r\n procedure DoAfterDrawPickerContent(AGrahpics: TTMSFNCGraphics; ARect: TRectF; AContent: string); virtual;\r\n procedure DoBeforeDrawPickerContent(AGrahpics: TTMSFNCGraphics; ARect: TRectF; AContent: string; var AAllow: Boolean; var ADefaultDraw: Boolean); virtual;\r\n procedure DoSetContent(var AText: string; var AAllow: Boolean); virtual;\r\n procedure DrawContent(AGraphics: TTMSFNCGraphics; ARect: TRectF); override;\r\n procedure InitializePopup; override;\r\n procedure SelectFirstValue; override;\r\n procedure SelectLastValue; override;\r\n procedure SelectNextValue; override;\r\n procedure SelectPreviousValue; override;\r\n procedure SetAdaptToStyle(const Value: Boolean); override;\r\n procedure AdjustDropDownHeight;\r\n procedure AdjustDropDownWidth;\r\n procedure UpdateListBoxLookup(AText: string);\r\n procedure DeleteFromEdit;\r\n {$IFDEF FMXLIB}\r\n procedure EditKeyDown(Sender: TObject; var Key: Word; var KeyChar: WideChar; Shift: TShiftState);\r\n// procedure TreeviewKeyUp(Sender: TObject; var Key: Word; var KeyChar: WideChar; Shift: TShiftState);\r\n procedure KeyDown(var Key: Word; var KeyChar: WideChar; Shift: TShiftState); override;\r\n {$IFDEF ANDROID}\r\n procedure EditTyping(Sender: TObject);\r\n {$ENDIF}\r\n {$ENDIF}\r\n {$IFDEF CMNWEBLIB}\r\n procedure EditKeyDown(Sender: TObject; var Key: Word; {%H-}Shift: TShiftState);\r\n procedure EditKeyPress(Sender: TObject; var Key: Char);\r\n procedure KeyPress(var Key: Char); override;\r\n procedure KeyDown(var Key: Word; Shift: TShiftState); override;\r\n// procedure TreeviewKeyUp(Sender: TObject; var Key: Word; {%H-}Shift: TShiftState);\r\n {$ENDIF}\r\n function CreateSelector: TTMSFNCCustomSelector; override;\r\n function GetVisibleItemCount: Integer;\r\n property AutoCloseUp: Boolean read FAutoCloseUp write SetAutoCloseUp default False;\r\n property AutoDropDown: Boolean read FAutoDropDown write SetAutoDropDown default False;\r\n property AutoComplete: Boolean read FAutoComplete write SetAutoComplete default True;\r\n property AutoCompleteDelay: Integer read FAutoCompleteDelay write SetAutoCompleteDelay default 500;\r\n property AutoCompleteNumChar: Integer read FAutoCompleteNumChar write SetAutoCompleteNumChar default 2;\r\n property CaseSensitive: Boolean read FCaseSensitive write SetCaseSensitive default False;\r\n property Control: TControl read FControl write SetControl;\r\n property DropDownControlHeight: Single read FDropDownControlHeight write SetDropDownControlHeight;\r\n property DropDownControlWidth: Single read FDropDownControlWidth write SetDropDownControlWidth;\r\n property DropDownHeightMode: TTMSFNCControlPickderDropDownHeightMode read FDropDownHeightMode write SetDropDownHeightMode default chmDropDownHeight;\r\n property DropDownWidthMode: TTMSFNCControlPickderDropDownWidthMode read FDropDownWidthMode write SetDropDownWidthMode default cwmDropDownWidth;\r\n property Font: TTMSFNCGraphicsFont read FFont write SetFnt;\r\n property ItemIndex: Integer read GetItemIndex write SetItemIndex default -1;\r\n property ItemHeight: Single read GetItemHeight write SetItemHeight;\r\n property ItemWidth: Single read GetItemWidth write SetItemWidth;\r\n property Style: TTMSFNCControlPickerStyle read FStyle write SetStyle default csDropDown;\r\n property Text: string read GetText write SetText;\r\n property OnAdjustDropDownHeight: TTMSFNCCustomControlPickerOnAdjustDropDownSizeEvent read FOnAdjustDropDownHeight write FOnAdjustDropDownHeight;\r\n property OnAdjustDropDownWidth: TTMSFNCCustomControlPickerOnAdjustDropDownSizeEvent read FOnAdjustDropDownWidth write FOnAdjustDropDownWidth;\r\n property OnAfterDrawPickerContent: TTMSFNCCustomControlPickerAfterDrawContentEvent read FOnAfterDrawPickerContent write FOnAfterDrawPickerContent;\r\n property OnBeforeDrawPickerContent: TTMSFNCCustomControlPickerBeforeDrawContentEvent read FOnBeforeDrawPickerContent write FOnBeforeDrawPickerContent;\r\n property OnItemSelected: TTMSFNCCustomControlPickerItemSelectedEvent read FOnItemSelected write FOnItemSelected;\r\n property OnSetContent: TTMSFNCCustomControlPickerOnSetContentEvent read FOnSetContent write FOnSetContent;\r\n public\r\n constructor Create(AOwner: TComponent); override;\r\n destructor Destroy; override;\r\n procedure CallItemClicked(AItemIndex: Integer);\r\n procedure UpdatePickerContent; virtual;\r\n procedure UpdatePickerDropDownSize; virtual;\r\n procedure UpdateDropDown; virtual;\r\n procedure DropDown; override;\r\n property Count: Integer read GetCount;\r\n end;\r\n\r\n {$IFNDEF LCLLIB}\r\n [ComponentPlatformsAttribute(TMSPlatformsWeb)]\r\n {$ENDIF}\r\n TTMSFNCControlPicker = class(TTMSFNCCustomControlPicker)\r\n protected\r\n procedure RegisterRuntimeClasses; override;\r\n published\r\n property AutoCloseUp;\r\n property AutoDropDown;\r\n property AutoComplete;\r\n property AutoCompleteDelay;\r\n property AutoCompleteNumChar;\r\n property Control;\r\n property CaseSensitive;\r\n property DropDownControlHeight;\r\n property DropDownControlWidth;\r\n property DropDownHeightMode;\r\n property DropDownWidthMode;\r\n property Font;\r\n property ItemIndex;\r\n property ItemHeight;\r\n property ItemWidth;\r\n property ShowFocus;\r\n property Style;\r\n property Text;\r\n property OnAdjustDropDownHeight;\r\n property OnAdjustDropDownWidth;\r\n property OnAfterDrawPickerContent;\r\n property OnBeforeDrawPickerContent;\r\n property OnItemSelected;\r\n property OnSetContent;\r\n end;\r\n\r\nimplementation\r\n\r\nuses\r\n Math, SysUtils, WEBLib.Graphics, WEBLib.TMSFNCStyles, WEBLib.TMSFNCUtils\r\n {$IFDEF FMXLIB}\r\n ,FMX.Edit\r\n {$ENDIF}\r\n {$IFDEF CMNLIB}\r\n ,StdCtrls\r\n {$ENDIF}\r\n {$IFDEF WEBLIB}\r\n ,WEBLib.StdCtrls\r\n {$ENDIF};\r\n\r\n{$IFDEF FMXLIB}\r\ntype\r\n TCustomEditProtected = class(TCustomEdit);\r\n {$ENDIF}\r\n\r\nfunction GetTickCountX: DWORD;\r\nvar\r\n h, m, s, ms: Word;\r\nbegin\r\n DecodeTime(Now, h, m, s, ms);\r\n Result := ms + s * 1000 + m * 60 * 1000 + h * 60 * 60 * 1000;\r\nend;\r\n\r\n{ TTMSFNCCustomControlPicker }\r\n\r\nprocedure TTMSFNCCustomControlPicker.AdjustDropDownHeight;\r\nvar\r\n h: Single;\r\n a: Boolean;\r\nbegin\r\n if Assigned(FControl) and (DropDownHeightMode = chmItems) then\r\n begin\r\n h := ItemHeight * GetVisibleItemCount;\r\n end\r\n else if Assigned(FControl) and (DropDownHeightMode = chmControl) then\r\n begin\r\n h := FControlHeight;\r\n end\r\n else if (FDropDownHeightMode = chmPickerHeight) then\r\n begin\r\n h := Height;\r\n end\r\n else\r\n h := FDropDownControlHeight;\r\n\r\n a := True;\r\n DoAdjustDropDownHeight(h, a);\r\n\r\n if a then\r\n DropDownHeight := h;\r\nend;\r\n\r\nprocedure TTMSFNCCustomControlPicker.AdjustDropDownWidth;\r\nvar\r\n w: Single;\r\n a: Boolean;\r\nbegin\r\n if Assigned(FControl) and (FDropDownWidthMode = cwmItems) then\r\n begin\r\n w := ItemWidth * GetVisibleItemCount;\r\n end\r\n else if Assigned(FControl) and (FDropDownWidthMode = cwmControl) then\r\n begin\r\n w := FControlWidth;\r\n end\r\n else if (FDropDownWidthMode = cwmPickerWidth) then\r\n begin\r\n w := Width;\r\n end\r\n else\r\n w := FDropDownControlWidth;\r\n\r\n a := True;\r\n DoAdjustDropDownWidth(w, a);\r\n\r\n if a then\r\n DropDownWidth := w;\r\nend;\r\n\r\nprocedure TTMSFNCCustomControlPicker.ApplyFilter(ACondition: string);\r\nvar\r\n pf: ITMSFNCControlPickerFull;\r\nbegin\r\n if Assigned(Control) and Supports(FControl, ITMSFNCControlPickerFull, pf) then\r\n pf.PickerApplyFilter(ACondition, FCaseSensitive);\r\nend;\r\n\r\nprocedure TTMSFNCCustomControlPicker.CallItemClicked(AItemIndex: Integer);\r\nbegin\r\n UpdatePickerContent;\r\n ClearFilter;\r\n\r\n ItemIndex := AItemIndex;\r\n\r\n DropDown;\r\n Invalidate;\r\nend;\r\n\r\nprocedure TTMSFNCCustomControlPicker.ChangeDPIScale(M, D: Integer);\r\nbegin\r\n inherited;\r\n\r\n BeginUpdate;\r\n FFont.Height := TTMSFNCUtils.MulDivInt(FFont.Height, M, D);\r\n Edit.Font.Assign(FFont);\r\n\r\n {$IFDEF VCLLIB}\r\n {$HINTS OFF}\r\n {$IF (COMPILERVERSION >= 33) and (COMPILERVERSION < 35) }\r\n if Assigned(FControl) then\r\n FControl.ScaleForPPI(M);\r\n {$IFEND}\r\n {$HINTS ON}\r\n {$ENDIF}\r\n\r\n DropDownControlHeight := TTMSFNCUtils.MulDivSingle(FDropDownControlHeight, M, D);\r\n DropDownControlWidth := TTMSFNCUtils.MulDivSingle(FDropDownControlWidth, M, D);\r\n FControlHeight := TTMSFNCUtils.MulDivSingle(FControlHeight, M, D);\r\n FControlWidth := TTMSFNCUtils.MulDivSingle(FControlWidth, M, D);\r\n EndUpdate;\r\nend;\r\n\r\nprocedure TTMSFNCCustomControlPicker.ClearFilter;\r\nvar\r\n pf: ITMSFNCControlPickerFull;\r\nbegin\r\n if Assigned(FControl) and Supports(FControl, ITMSFNCControlPickerFull, pf) then\r\n pf.PickerResetFilter;\r\nend;\r\n\r\nconstructor TTMSFNCCustomControlPicker.Create(AOwner: TComponent);\r\nbegin\r\n inherited;\r\n Width := 150;\r\n FDropDownControlWidth := Width;\r\n FDropDownControlHeight := 150;\r\n Editable := True;\r\n FPrevString := '';\r\n FAutoComplete := True;\r\n FAutoCloseUp := False;\r\n FAutoDropDown := False;\r\n FCaseSensitive := False;\r\n FAutoCompleteNumChar := 2;\r\n FAutoCompleteDelay := 500;\r\n FFont := TTMSFNCGraphicsFont.Create;\r\n FFont.OnChanged := @FontChange;\r\n {$IFDEF FMXLIB}\r\n Edit.StyledSettings := TCustomEditProtected(Edit).StyledSettings - [TStyledSetting.Family, TStyledSetting.Size, TStyledSetting.Style];\r\n {$IFDEF ANDROID}\r\n Edit.TextSettings.VertAlign := TTextAlign.Leading;\r\n Edit.OnTyping := EditTyping;\r\n {$ENDIF}\r\n {$ENDIF}\r\n Edit.OnKeyDown := @EditKeyDown;\r\n {$IFDEF CMNWEBLIB}\r\n Edit.OnKeyPress := EditKeyPress;\r\n {$ENDIF}\r\n Edit.Font.Assign(FFont);\r\n Popup.FocusedControl := Edit;\r\n Popup.StaysOpen := True;\r\n\r\n FDropDownHeightMode := chmDropDownHeight;\r\n FDropDownWidthMode := cwmDropDownWidth;\r\n\r\n if IsDesignTime then\r\n Text := 'TTMSFNCControlPicker';\r\nend;\r\n\r\nfunction TTMSFNCCustomControlPicker.CreateSelector: TTMSFNCCustomSelector;\r\nbegin\r\n FWrapper := TTMSFNCCustomSelector.Create(Self);\r\n\r\n if Assigned(FControl) then\r\n begin\r\n FControl.Parent := FWrapper;\r\n UpdatePickerContent;\r\n end;\r\n\r\n Result := FWrapper;\r\nend;\r\n\r\nprocedure TTMSFNCCustomControlPicker.DeleteFromEdit;\r\nbegin\r\n FPrevString := Edit.Text;\r\n\r\n if Edit.SelLength = 0 then\r\n Delete(FPrevString, Edit.SelStart, 1)\r\n else\r\n Delete(FPrevString, Max(1, Edit.SelStart + 1), Edit.SelLength);\r\n\r\n UpdateListBoxLookup(FPrevString);\r\n if (Length(FPrevString) < FAutoCompleteNumChar) and Popup.IsOpen then\r\n begin\r\n DropDown;\r\n ClearFilter;\r\n end;\r\nend;\r\n\r\ndestructor TTMSFNCCustomControlPicker.Destroy;\r\nbegin\r\n FFont.Free;\r\n inherited;\r\nend;\r\n\r\nprocedure TTMSFNCCustomControlPicker.DoAdjustDropDownHeight(var AHeight: Single; var AAllow: Boolean);\r\nbegin\r\n if Assigned(OnAdjustDropDownHeight) then\r\n OnAdjustDropDownHeight(Self, AHeight, AAllow)\r\nend;\r\n\r\nprocedure TTMSFNCCustomControlPicker.DoAdjustDropDownWidth(var AWidth: Single; var AAllow: Boolean);\r\nbegin\r\n if Assigned(OnAdjustDropDownWidth) then\r\n OnAdjustDropDownWidth(Self, AWidth, AAllow)\r\nend;\r\n\r\nprocedure TTMSFNCCustomControlPicker.DoAfterDrawPickerContent(AGrahpics: TTMSFNCGraphics; ARect: TRectF; AContent: string);\r\nbegin\r\n if Assigned(OnAfterDrawPickerContent) then\r\n OnAfterDrawPickerContent(Self, AGrahpics, ARect, AContent);\r\nend;\r\n\r\nprocedure TTMSFNCCustomControlPicker.DoBeforeDrawPickerContent(AGrahpics: TTMSFNCGraphics; ARect: TRectF; AContent: string; var AAllow, ADefaultDraw: Boolean);\r\nbegin\r\n if Assigned(OnBeforeDrawPickerContent) then\r\n OnBeforeDrawPickerContent(Self, AGrahpics, ARect, AContent, AAllow, ADefaultDraw);\r\nend;\r\n\r\nprocedure TTMSFNCCustomControlPicker.DoPickerItemSelected(AText: string; AItemIndex: Integer);\r\nbegin\r\n if Assigned(OnItemSelected) then\r\n OnItemSelected(Self, AText, AItemIndex);\r\nend;\r\n\r\nprocedure TTMSFNCCustomControlPicker.DoSetContent(var AText: string;\r\n var AAllow: Boolean);\r\nbegin\r\n if Assigned(OnSetContent) then\r\n OnSetContent(Self, AText, AAllow);\r\nend;\r\n\r\nprocedure TTMSFNCCustomControlPicker.DrawContent(AGraphics: TTMSFNCGraphics; ARect: TRectF);\r\nvar\r\n r: TRectF;\r\n a, dd: Boolean;\r\nbegin\r\n inherited;\r\n\r\n if not Enabled then\r\n AGraphics.Font.Color := gcSilver\r\n else\r\n AGraphics.Font.AssignSource(Font);\r\n\r\n r := ARect;\r\n InflateRectEx(r, -3, -3);\r\n\r\n a := True;\r\n dd := True;\r\n\r\n DoBeforeDrawPickerContent(AGraphics, r, Content, a, dd);\r\n\r\n if a then\r\n begin\r\n if dd then\r\n AGraphics.DrawText(r, Content);\r\n DoAfterDrawPickerContent(AGraphics, r, Content);\r\n end;\r\n\r\n {$IFDEF MSWINDOWS}\r\n if Style = csDropDown then\r\n PreventDropDown := True;\r\n {$ENDIF}\r\nend;\r\n\r\nprocedure TTMSFNCCustomControlPicker.DropDown;\r\nbegin\r\n AdjustDropDownHeight;\r\n AdjustDropDownWidth;\r\n\r\n Popup.Width := Round(DropDownWidth);\r\n Popup.Height := Round(DropDownHeight);\r\n\r\n inherited;\r\nend;\r\n\r\nprocedure TTMSFNCCustomControlPicker.FontChange(Sender: TObject);\r\nbegin\r\n Invalidate;\r\nend;\r\n\r\nfunction TTMSFNCCustomControlPicker.GetCount: Integer;\r\nvar\r\n pi: ITMSFNCControlPickerItems;\r\n pf: ITMSFNCControlPickerFull;\r\nbegin\r\n Result := 0;\r\n\r\n if Assigned(FControl) then\r\n begin\r\n if Supports(FControl, ITMSFNCControlPickerItems, pi) then\r\n Result := pi.PickerGetItemCount\r\n else if Supports(FControl, ITMSFNCControlPickerFull, pf) then\r\n Result := pf.PickerGetItemCount\r\n else\r\n Result := 1;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCCustomControlPicker.GetItemHeight: Single;\r\nvar\r\n pi: ITMSFNCControlPickerItems;\r\n pf: ITMSFNCControlPickerFull;\r\nbegin\r\n Result := 0.0;\r\n\r\n if Assigned(FControl) then\r\n begin\r\n if Supports(FControl, ITMSFNCControlPickerItems, pi) then\r\n Result := pi.PickerGetItemHeight\r\n else if Supports(FControl, ITMSFNCControlPickerFull, pf) then\r\n Result := pf.PickerGetItemHeight\r\n else\r\n Result := FControlHeight;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCCustomControlPicker.GetItemIndex: Integer;\r\nvar\r\n pi: ITMSFNCControlPickerItems;\r\n pf: ITMSFNCControlPickerFull;\r\nbegin\r\n Result := -1;\r\n\r\n if Assigned(FControl) and Supports(FControl, ITMSFNCControlPickerItems, pi) then\r\n Result := pi.PickerGetSelectedItem\r\n else if Assigned(FControl) and Supports(FControl, ITMSFNCControlPickerFull, pf) then\r\n Result := pf.PickerGetSelectedItem;\r\nend;\r\n\r\nfunction TTMSFNCCustomControlPicker.GetItemWidth: Single;\r\nvar\r\n pi: ITMSFNCControlPickerItems;\r\n pf: ITMSFNCControlPickerFull;\r\nbegin\r\n Result := 0.0;\r\n\r\n if Assigned(FControl) then\r\n begin\r\n if Supports(FControl, ITMSFNCControlPickerItems, pi) then\r\n Result := pi.PickerGetItemWidth\r\n else if Supports(FControl, ITMSFNCControlPickerFull, pf) then\r\n Result := pf.PickerGetItemWidth\r\n else\r\n Result := FControlWidth;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCCustomControlPicker.GetText: string;\r\nbegin\r\n Result := Content;\r\nend;\r\n\r\nfunction TTMSFNCCustomControlPicker.GetVisibleItemCount: Integer;\r\nvar\r\n pi: ITMSFNCControlPickerItems;\r\n pf: ITMSFNCControlPickerFull;\r\nbegin\r\n Result := 0;\r\n\r\n if Assigned(FControl) then\r\n begin\r\n if Supports(FControl, ITMSFNCControlPickerItems, pi) then\r\n Result := pi.PickerGetVisibleItemCount\r\n else if Supports(FControl, ITMSFNCControlPickerFull, pf) then\r\n Result := pf.PickerGetVisibleItemCount\r\n else\r\n Result := 1;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomControlPicker.InitializePopup;\r\nbegin\r\n inherited;\r\n if Assigned(FControl) then\r\n begin\r\n FControl.Width := Round(DropDownWidth);\r\n FControl.Height := Round(DropDownHeight);\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCCustomControlPicker.LookupItem(ALookupString: String): TTMSFNCControlPickerFilterItem;\r\nvar\r\n pf: ITMSFNCControlPickerFull;\r\nbegin\r\n Result.ItemIndex := -1;\r\n Result.ItemText := '';\r\n\r\n if Assigned(FControl) and Supports(FControl, ITMSFNCControlPickerFull, pf) then\r\n Result := pf.PickerLookupItem(ALookupString, FCaseSensitive);\r\nend;\r\n\r\nprocedure TTMSFNCCustomControlPicker.Notification(AComponent: TComponent; Operation: TOperation);\r\nbegin\r\n inherited;\r\n if (Operation = opRemove) and (AComponent = FControl) then\r\n FControl := nil;\r\nend;\r\n\r\ntype\r\n TControlOpen = class(TControl);\r\n\r\nprocedure TTMSFNCCustomControlPicker.Loaded;\r\nbegin\r\n inherited;\r\n {$IFDEF VCLLIB}\r\n {$HINTS OFF}\r\n {$IF (COMPILERVERSION >= 33) and (COMPILERVERSION < 35) }\r\n if Assigned(FControl) then\r\n FControl.ScaleForPPI(CurrentPPI);\r\n {$IFEND}\r\n {$HINTS ON}\r\n {$ENDIF}\r\n {$IFDEF WEBLIB}\r\n AdjustDropDownHeight;\r\n SetControl(FControl);\r\n {$ENDIF}\r\nend;\r\n\r\n{$IFDEF FMXLIB}\r\n{$IFDEF ANDROID}\r\nprocedure TTMSFNCCustomControlPicker.EditTyping(Sender: TObject);\r\nvar\r\n fi: TTMSFNCControlPickerFilterItem;\r\nbegin\r\n if (not Assigned(FControl)) or (not AutoComplete) then\r\n Exit;\r\n\r\n if Length(FPrevString) >= Length(Content) then\r\n begin\r\n UpdateListBoxLookup(Content);\r\n\r\n if AutoCloseUp and (Length(Content) < FAutoCompleteNumChar) and Popup.IsOpen then\r\n begin\r\n DropDown;\r\n ClearFilter;\r\n end;\r\n\r\n FPrevString := Content;\r\n Exit;\r\n end;\r\n\r\n UpdateListBoxLookup(Content);\r\n\r\n fi := LookupItem(FPrevString);\r\n if fi.ItemIndex >= 0 then\r\n begin\r\n FPrevString := Content;\r\n\r\n if AutoCloseUp and (FPrevString = fi.ItemText) and Popup.IsOpen then\r\n begin\r\n DropDown;\r\n ClearFilter;\r\n end;\r\n end;\r\nend;\r\n{$ENDIF}\r\n{$ENDIF}\r\n\r\n{$IFDEF FMXLIB}\r\nprocedure TTMSFNCCustomControlPicker.EditKeyDown(Sender: TObject; var Key: Word; var KeyChar: WideChar; Shift: TShiftState);\r\n{$ENDIF}\r\n{$IFDEF CMNWEBLIB}\r\nprocedure TTMSFNCCustomControlPicker.EditKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);\r\nbegin\r\n FKeyDown := Key;\r\n if FKeyDown in [KEY_UP, KEY_DOWN] then\r\n begin\r\n if FKeyDown = KEY_UP then\r\n SelectPreviousValue;\r\n\r\n if FKeyDown = KEY_DOWN then\r\n SelectNextValue;\r\n\r\n Key := 0;\r\n end;\r\n\r\n {$IFDEF WEBLIB}\r\n if FKeyDown = KEY_BACK then\r\n DeleteFromEdit;\r\n {$ENDIF}\r\nend;\r\n\r\nprocedure TTMSFNCCustomControlPicker.EditKeyPress(Sender: TObject; var Key: Char);\r\n{$ENDIF}\r\nvar\r\n fi: TTMSFNCControlPickerFilterItem;\r\n selPos, selLen: Integer;\r\n kch: Char;\r\n\r\n procedure EatKey;\r\n begin\r\n {$IFDEF FMXLIB}\r\n KeyChar := #0;\r\n Key := 0;\r\n {$ENDIF}\r\n {$IFDEF CMNWEBLIB}\r\n Key := #0;\r\n {$ENDIF}\r\n end;\r\n\r\nbegin\r\n if not Assigned(FControl) then\r\n Exit;\r\n\r\n {$IFDEF FMXLIB}\r\n kch := KeyChar;\r\n FKeyDown := Key;\r\n {$ENDIF}\r\n {$IFDEF CMNWEBLIB}\r\n kch := Key;\r\n {$ENDIF}\r\n\r\n if (FKeyDown = KEY_ESCAPE) then\r\n begin\r\n if AutoCloseUp and Popup.IsOpen then;\r\n begin\r\n DropDown;\r\n Exit;\r\n end;\r\n end;\r\n\r\n if (FKeyDown = KEY_RETURN) then\r\n begin\r\n if Popup.IsOpen then\r\n begin\r\n Edit.SelStart := Length(Edit.Text);\r\n Edit.SelLength := 0;\r\n ClearFilter;\r\n end;\r\n UpdatePickerContent;\r\n\r\n DropDown;\r\n Exit;\r\n end;\r\n\r\n {$IFDEF FMXLIB}\r\n if FKeyDown in [KEY_UP, KEY_DOWN] then\r\n begin\r\n if FKeyDown = KEY_UP then\r\n SelectPreviousValue;\r\n\r\n if FKeyDown = KEY_DOWN then\r\n SelectNextValue;\r\n\r\n EatKey;\r\n end;\r\n {$ENDIF}\r\n\r\n if AutoComplete then\r\n begin\r\n {$IFNDEF WEBLIB}\r\n if FKeyDown = KEY_BACK then\r\n begin\r\n DeleteFromEdit;\r\n Exit;\r\n end;\r\n {$ENDIF}\r\n\r\n if kch = #0 then\r\n Exit;\r\n\r\n if Edit.SelLength = Length(Edit.Text) then\r\n FPrevString := '';\r\n\r\n FPrevString := FPrevString + kch;\r\n if Length(FPrevString) < FAutoCompleteNumChar then\r\n Exit;\r\n\r\n UpdateListBoxLookup(FPrevString);\r\n\r\n fi := LookupItem(FPrevString);\r\n if fi.ItemIndex >= 0 then\r\n begin\r\n ItemIndex := fi.ItemIndex;\r\n selPos := Length(FPrevString);\r\n Content := fi.ItemText;\r\n Edit.SelStart := selPos;\r\n selLen := Length(Edit.Text) - selPos;\r\n Edit.SelLength := selLen;\r\n EatKey;\r\n\r\n if AutoCloseUp and (selLen = 0) and Popup.IsOpen then\r\n DropDown;\r\n end;\r\n end;\r\nend;\r\n\r\n{$IFDEF FMXLIB}\r\nprocedure TTMSFNCCustomControlPicker.KeyDown(var Key: Word; var KeyChar: WideChar; Shift: TShiftState);\r\n{$ENDIF}\r\n{$IFDEF CMNWEBLIB}\r\nprocedure TTMSFNCCustomControlPicker.KeyDown(var Key: Word; Shift: TShiftState);\r\nbegin\r\n inherited;\r\n FKeyDown := Key;\r\nend;\r\n\r\nprocedure TTMSFNCCustomControlPicker.KeyPress(var Key: Char);\r\n{$ENDIF}\r\nvar\r\n fi: TTMSFNCControlPickerFilterItem;\r\n kch: Char;\r\n tick: Cardinal;\r\nbegin\r\n inherited;\r\n\r\n if not Assigned(FControl) then\r\n Exit;\r\n\r\n {$IFDEF FMXLIB}\r\n kch := KeyChar;\r\n FKeyDown := Key;\r\n {$ENDIF}\r\n {$IFDEF CMNWEBLIB}\r\n kch := Key;\r\n {$ENDIF}\r\n\r\n if (FKeyDown = KEY_ESCAPE) then\r\n begin\r\n if Popup.IsOpen then;\r\n begin\r\n DropDown;\r\n Exit;\r\n end;\r\n end;\r\n\r\n if AutoComplete then\r\n begin\r\n if FKeyDown = KEY_BACK then\r\n begin\r\n Delete(FPrevString, Length(FPrevString), 1);\r\n if (Length(FPrevString) = 1) and Popup.IsOpen then\r\n begin\r\n DropDown;\r\n ClearFilter;\r\n end;\r\n\r\n Exit;\r\n end;\r\n\r\n if kch = #0 then\r\n Exit;\r\n\r\n if AutoDropDown and (not Popup.IsOpen) then\r\n DropDown;\r\n\r\n tick := FAutoCompleteDelay;\r\n if (GetTickCountX - FTick) < tick then\r\n FPrevString := FPrevString + kch\r\n else\r\n begin\r\n FTick := GetTickCountX;\r\n FPrevString := kch;\r\n end;\r\n end\r\n else\r\n begin\r\n if kch = #0 then\r\n Exit;\r\n\r\n FPrevString := kch;\r\n end;\r\n\r\n fi := LookupItem(FPrevString);\r\n if fi.ItemIndex >= 0 then\r\n begin\r\n ItemIndex := fi.ItemIndex;\r\n Content := fi.ItemText;\r\n Invalidate;\r\n\r\n if AutoComplete and (Content = FPrevString) and AutoCloseUp and Popup.IsOpen then\r\n DropDown;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomControlPicker.SelectFirstValue;\r\nvar\r\n idx: Integer;\r\n pi: ITMSFNCControlPickerItems;\r\n pf: ITMSFNCControlPickerFull;\r\nbegin\r\n inherited;\r\n if Assigned(FControl) then\r\n begin\r\n idx := -1;\r\n\r\n if Supports(FControl, ITMSFNCControlPickerItems, pi) then\r\n idx := pi.PickerGetFirstSelectableItem\r\n else if Supports(FControl, ITMSFNCControlPickerFull, pf) then\r\n idx := pf.PickerGetFirstSelectableItem;\r\n\r\n ItemIndex := idx;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomControlPicker.SelectLastValue;\r\nvar\r\n idx: Integer;\r\n pi: ITMSFNCControlPickerItems;\r\n pf: ITMSFNCControlPickerFull;\r\nbegin\r\n inherited;\r\n if Assigned(FControl) then\r\n begin\r\n idx := -1;\r\n\r\n if Supports(FControl, ITMSFNCControlPickerItems, pi) then\r\n idx := pi.PickerGetLastSelectableItem\r\n else if Supports(FControl, ITMSFNCControlPickerFull, pf) then\r\n idx := pf.PickerGetLastSelectableItem;\r\n\r\n ItemIndex := idx;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomControlPicker.SelectNextValue;\r\nvar\r\n idx: Integer;\r\n pi: ITMSFNCControlPickerItems;\r\n pf: ITMSFNCControlPickerFull;\r\nbegin\r\n inherited;\r\n if Assigned(FControl) then\r\n begin\r\n idx := -1;\r\n\r\n if Supports(FControl, ITMSFNCControlPickerItems, pi) then\r\n idx := pi.PickerGetNextSelectableItem(ItemIndex)\r\n else if Supports(FControl, ITMSFNCControlPickerFull, pf) then\r\n idx := pf.PickerGetNextSelectableItem(ItemIndex);\r\n\r\n ItemIndex := idx;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomControlPicker.SelectPreviousValue;\r\nvar\r\n idx: Integer;\r\n pi: ITMSFNCControlPickerItems;\r\n pf: ITMSFNCControlPickerFull;\r\nbegin\r\n inherited;\r\n if Assigned(FControl) then\r\n begin\r\n idx := -1;\r\n\r\n if Supports(FControl, ITMSFNCControlPickerItems, pi) then\r\n idx := pi.PickerGetPreviousSelectableItem(ItemIndex)\r\n else if Supports(FControl, ITMSFNCControlPickerFull, pf) then\r\n idx := pf.PickerGetPreviousSelectableItem(ItemIndex);\r\n\r\n ItemIndex := idx;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomControlPicker.SetAdaptToStyle(const Value: Boolean);\r\nvar\r\n ia: ITMSFNCAdaptToStyle;\r\nbegin\r\n inherited;\r\n if Assigned(FWrapper) then\r\n FWrapper.AdaptToStyle := AdaptToStyle;\r\n if Assigned(FControl) and Supports(FControl, ITMSFNCAdaptToStyle, ia) then\r\n ia.AdaptToStyle := AdaptToStyle;\r\nend;\r\n\r\nprocedure TTMSFNCCustomControlPicker.SetAutoCloseUp(const Value: Boolean);\r\nbegin\r\n FAutoCloseUp := Value;\r\nend;\r\n\r\nprocedure TTMSFNCCustomControlPicker.SetAutoComplete(const Value: Boolean);\r\nbegin\r\n FAutoComplete := Value;\r\nend;\r\n\r\nprocedure TTMSFNCCustomControlPicker.SetAutoCompleteDelay(const Value: Integer);\r\nbegin\r\n FAutoCompleteDelay := Value;\r\nend;\r\n\r\nprocedure TTMSFNCCustomControlPicker.SetAutoCompleteNumChar(const Value: Integer);\r\nbegin\r\n if Value > 0 then\r\n FAutoCompleteNumChar := Value\r\n else\r\n FAutoCompleteNumChar := 1;\r\nend;\r\n\r\nprocedure TTMSFNCCustomControlPicker.SetAutoDropDown(const Value: Boolean);\r\nbegin\r\n FAutoDropDown := Value;\r\nend;\r\n\r\nprocedure TTMSFNCCustomControlPicker.SetCaseSensitive(const Value: Boolean);\r\nbegin\r\n FCaseSensitive := Value;\r\nend;\r\n\r\nprocedure TTMSFNCCustomControlPicker.SetControl(const Value: TControl);\r\nbegin\r\n if Value = Self then\r\n Exit;\r\n\r\n if csDesigning in ComponentState then\r\n begin\r\n FControl := Value;\r\n end\r\n else\r\n begin\r\n if not (csLoading in ComponentState) and Assigned(FControl) then\r\n begin\r\n FControl.Parent := FControlParent;\r\n FControl.Visible := FControlVisible;\r\n FControl.Align := FControlAlign;\r\n {$IFDEF FMXLIB}\r\n FControl.Position.X := FControlLeft;\r\n FControl.Position.Y := FControlTop;\r\n FControl.Width := FControlWidth;\r\n FControl.Height := FControlHeight;\r\n {$ENDIF}\r\n {$IFNDEF FMXLIB}\r\n FControl.Left := Round(FControlLeft);\r\n FControl.Top := Round(FControlTop);\r\n FControl.Width := Round(FControlWidth);\r\n FControl.Height := Round(FControlHeight);\r\n {$ENDIF}\r\n end;\r\n\r\n FControl := Value;\r\n\r\n if Assigned(FControl) then\r\n begin\r\n {$IFDEF CMNLIB}\r\n FControlParent := TWinControl(FControl.Parent);\r\n {$ENDIF}\r\n {$IFNDEF CMNLIB}\r\n FControlParent := TControl(FControl.Parent);\r\n {$ENDIF}\r\n FControlVisible := FControl.Visible;\r\n FControlAlign := FControl.Align;\r\n {$IFDEF FMXLIB}\r\n FControl.Align := TAlignLayout.None;\r\n FControlLeft := FControl.Position.X;\r\n FControlTop := FControl.Position.Y;\r\n {$ENDIF}\r\n {$IFNDEF FMXLIB}\r\n FControl.Align := alNone;\r\n FControlLeft := FControl.Left;\r\n FControlTop := FControl.Top;\r\n {$ENDIF}\r\n FControlWidth := FControl.Width;\r\n FControlHeight := FControl.Height;\r\n\r\n // DropDownWidth := FControlWidth;\r\n\r\n FControl.Parent := FWrapper;\r\n FControl.Visible := True;\r\n {$IFDEF FMXLIB}\r\n FControl.Position.X := 0;\r\n FControl.Position.Y := 0;\r\n {$ENDIF}\r\n {$IFNDEF FMXLIB}\r\n FControl.Left := 0;\r\n FControl.Top := 0;\r\n {$ENDIF}\r\n end\r\n else\r\n begin\r\n FControlParent := nil;\r\n FControlVisible := False;\r\n {$IFDEF FMXLIB}\r\n FControlAlign := TAlignLayout.None;\r\n {$ENDIF}\r\n {$IFNDEF FMXLIB}\r\n FControlAlign := alNone;\r\n {$ENDIF}\r\n FControlLeft := 0;\r\n FControlTop := 0;\r\n FControlWidth := 0;\r\n FControlHeight := 0;\r\n end;\r\n\r\n UpdatePickerContent;\r\n\r\n AdjustDropDownHeight;\r\n AdjustDropDownWidth;\r\n end;\r\n\r\n Invalidate;\r\nend;\r\n\r\nprocedure TTMSFNCCustomControlPicker.SetDropDownControlHeight(const Value: Single);\r\nbegin\r\n if FDropDownControlHeight <> Value then\r\n begin\r\n FDropDownControlHeight := Value;\r\n AdjustDropDownHeight;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomControlPicker.SetDropDownControlWidth(const Value: Single);\r\nbegin\r\n if FDropDownControlWidth <> Value then\r\n begin\r\n FDropDownControlWidth := Value;\r\n AdjustDropDownWidth;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomControlPicker.SetDropDownHeightMode(const Value: TTMSFNCControlPickderDropDownHeightMode);\r\nbegin\r\n if Value <> FDropDownHeightMode then\r\n begin\r\n FDropDownHeightMode := Value;\r\n\r\n AdjustDropDownHeight;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomControlPicker.SetDropDownWidthMode(const Value: TTMSFNCControlPickderDropDownWidthMode);\r\nbegin\r\n if Value <> FDropDownWidthMode then\r\n begin\r\n FDropDownWidthMode := Value;\r\n\r\n AdjustDropDownWidth;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomControlPicker.SetFnt(const Value: TTMSFNCGraphicsFont);\r\nbegin\r\n FFont.AssignSource(Value);\r\nend;\r\n\r\nprocedure TTMSFNCCustomControlPicker.SetItemHeight(const Value: Single);\r\nvar\r\n pi: ITMSFNCControlPickerItems;\r\n pf: ITMSFNCControlPickerFull;\r\nbegin\r\n if Assigned(Control) then\r\n begin\r\n if Supports(FControl, ITMSFNCControlPickerItems, pi) then\r\n pi.PickerSetItemHeight(Value)\r\n else if Supports(FControl, ITMSFNCControlPickerFull, pf) then\r\n pf.PickerSetItemHeight(Value);\r\n end;\r\n\r\n AdjustDropDownHeight;\r\nend;\r\n\r\nprocedure TTMSFNCCustomControlPicker.SetItemIndex(const Value: Integer);\r\nvar\r\n pi: ITMSFNCControlPickerItems;\r\n pf: ITMSFNCControlPickerFull;\r\nbegin\r\n if Assigned(FControl) and (Value >= 0) and (Value < Count) then\r\n begin\r\n if Supports(FControl, ITMSFNCControlPickerItems, pi) then\r\n pi.PickerSelectItem(Value)\r\n else if Supports(FControl, ITMSFNCControlPickerFull, pf) then\r\n pf.PickerSelectItem(Value);\r\n\r\n UpdatePickerContent;\r\n DoPickerItemSelected(Content, Value);\r\n\r\n Invalidate;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomControlPicker.SetItemWidth(const Value: Single);\r\nvar\r\n pi: ITMSFNCControlPickerItems;\r\n pf: ITMSFNCControlPickerFull;\r\nbegin\r\n if Assigned(Control) then\r\n begin\r\n if Supports(FControl, ITMSFNCControlPickerItems, pi) then\r\n pi.PickerSetItemWidth(Value)\r\n else if Supports(FControl, ITMSFNCControlPickerFull, pf) then\r\n pf.PickerSetItemWidth(Value);\r\n end;\r\n\r\n AdjustDropDownWidth;\r\nend;\r\n\r\nprocedure TTMSFNCCustomControlPicker.SetStyle(const Value: TTMSFNCControlPickerStyle);\r\nbegin\r\n if FStyle <> Value then\r\n begin\r\n FStyle := Value;\r\n case FStyle of\r\n TTMSFNCControlPickerStyle.csDropDown:\r\n begin\r\n Editable := True;\r\n Popup.FocusedControl := Edit;\r\n Popup.StaysOpen := True;\r\n end;\r\n TTMSFNCControlPickerStyle.csDropDownList:\r\n begin\r\n Editable := False;\r\n if Assigned(FControl) then\r\n Popup.FocusedControl := FControl;\r\n Popup.StaysOpen := False;\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomControlPicker.SetText(const Value: string);\r\nbegin\r\n Content := Value;\r\nend;\r\n\r\nprocedure TTMSFNCCustomControlPicker.UpdateDropDown;\r\nbegin\r\n UpdatePickerContent;\r\n DropDown;\r\n\r\n Invalidate;\r\nend;\r\n\r\nprocedure TTMSFNCCustomControlPicker.UpdateListBoxLookup(AText: string);\r\nbegin\r\n ClearFilter;\r\n ApplyFilter(AText);\r\n\r\n if AutoDropDown and (Length(AText) >= FAutoCompleteNumChar) and (not Popup.IsOpen) and (GetVisibleItemCount > 0) then\r\n DropDown;\r\nend;\r\n\r\nprocedure TTMSFNCCustomControlPicker.UpdatePickerContent;\r\nvar\r\n pb: ITMSFNCControlPickerBase;\r\n pi: ITMSFNCControlPickerItems;\r\n pf: ITMSFNCControlPickerFull;\r\n txt: String;\r\n a: Boolean;\r\nbegin\r\n txt := GetContent;\r\n if Supports(FControl, ITMSFNCControlPickerBase, pb) then\r\n txt := pb.PickerGetContent\r\n else if Supports(FControl, ITMSFNCControlPickerItems, pi) then\r\n txt := pi.PickerGetContent\r\n else if Supports(FControl, ITMSFNCControlPickerFull, pf) then\r\n txt := pf.PickerGetContent;\r\n\r\n a := True;\r\n\r\n DoSetContent(txt, a);\r\n\r\n if a then\r\n Content := txt;\r\nend;\r\n\r\nprocedure TTMSFNCCustomControlPicker.UpdatePickerDropDownSize;\r\nbegin\r\n AdjustDropDownHeight;\r\n AdjustDropDownWidth;\r\nend;\r\n\r\n{ TTMSFNCControlPicker }\r\n\r\nprocedure TTMSFNCControlPicker.RegisterRuntimeClasses;\r\nbegin\r\n inherited;\r\n RegisterClass(TTMSFNCControlPicker);\r\nend;\r\n\r\nend.\r\n","{********************************************************************}\r\n{ }\r\n{ written by TMS Software }\r\n{ copyright (c) 2016 - 2025 }\r\n{ Email : info@tmssoftware.com }\r\n{ Web : https://www.tmssoftware.com }\r\n{ }\r\n{ The source code is given as is. The author is not responsible }\r\n{ for any possible damage done due to the use of this code. }\r\n{ The complete source code remains property of the author and may }\r\n{ not be distributed, published, given or sold in any form as such. }\r\n{ No parts of the source code can be included in any other component }\r\n{ or application without written authorization of the author. }\r\n{********************************************************************}\r\n\r\nunit WEBLib.TMSFNCTreeView;\r\n\r\n{$I WEBLib.TMSFNCDefines.inc}\r\n{$DEFINE UIPACK}\r\n\r\ninterface\r\n\r\nuses\r\n Classes, WEBLib.TMSFNCCustomTreeView, WEBLib.TMSFNCGraphics,\r\n WEBLib.TMSFNCTreeViewData, WEBLib.TMSFNCTypes, WEBLib.TMSFNCGraphicsTypes\r\n {$IFDEF FNCLIB}\r\n {$IFDEF UIPACK}\r\n , WEBLib.TMSFNCControlPicker\r\n {$ENDIF}\r\n {$ENDIF}\r\n {$IFNDEF WEBLIB}\r\n {$IFNDEF LCLLIB}\r\n {$HINTS OFF}\r\n {$IF COMPILERVERSION > 22}\r\n ,UITypes\r\n {$IFEND}\r\n {$HINTS ON}\r\n ,Types\r\n {$ENDIF}\r\n {$ENDIF}\r\n {$IFDEF FMXLIB}\r\n ,FMX.Layouts\r\n {$ENDIF}\r\n ;\r\n\r\ntype\r\n {$IFNDEF LCLLIB}\r\n [ComponentPlatformsAttribute(TMSPlatformsWeb)]\r\n {$ENDIF}\r\n {$IFDEF FNCLIB}\r\n TTMSFNCTreeView = class(TTMSFNCTreeViewPublished{$IFDEF UIPACK}, ITMSFNCControlPickerFull{$ENDIF})\r\n {$ENDIF}\r\n {$IFNDEF FNCLIB}\r\n TTMSFNCTreeView = class(TTMSFNCTreeViewPublished)\r\n {$ENDIF}\r\n protected\r\n procedure RegisterRuntimeClasses; override;\r\n {$IFDEF FMXLIB}\r\n procedure DoAbsoluteChanged; override;\r\n {$ENDIF}\r\n procedure DoAfterSelectNode(ANode: TTMSFNCTreeViewVirtualNode); override;\r\n procedure DrawBorders(AGraphics: TTMSFNCGraphics); override;\r\n procedure DrawEmptySpaces(AGraphics: TTMSFNCGraphics); override;\r\n procedure DrawNodeColumns(AGraphics: TTMSFNCGraphics); override;\r\n\r\n procedure DrawNode(AGraphics: TTMSFNCGraphics; ARect: TRectF; ANode: TTMSFNCTreeViewVirtualNode; ACaching: Boolean = False; AOffsetX: Single = 0; AOffsetY: Single = 0); override;\r\n procedure DrawGroup(AGraphics: TTMSFNCGraphics; ARect: TRectF; AGroup: Integer; AStartColumn, AEndColumn: Integer; AKind: TTMSFNCTreeViewCacheItemKind); override;\r\n procedure DrawColumn(AGraphics: TTMSFNCGraphics; ARect: TRectF; AColumn: Integer; AKind: TTMSFNCTreeViewCacheItemKind); override;\r\n procedure DrawSortIndicator(AGraphics: TTMSFNCGraphics; ARect: TRectF; AColor: TTMSFNCGraphicsColor; AColumn: Integer; ASortIndex: Integer; ASortKind: TTMSFNCTreeViewNodesSortKind); virtual;\r\n {$IFDEF FNCLIB}\r\n function PickerGetContent: String; virtual;\r\n procedure PickerSelectItem(AItemIndex: Integer); virtual;\r\n function PickerGetSelectedItem: Integer; virtual;\r\n function PickerGetVisibleItemCount: Integer; virtual;\r\n function PickerGetItemCount: Integer; virtual;\r\n function PickerGetItemHeight: Single; virtual;\r\n procedure PickerSetItemHeight(AValue: Single); virtual;\r\n function PickerGetItemWidth: Single; virtual;\r\n procedure PickerSetItemWidth(AValue: Single); virtual;\r\n function PickerGetNextSelectableItem(AItemIndex: Integer): Integer; virtual;\r\n function PickerGetPreviousSelectableItem(AItemIndex: Integer): Integer; virtual;\r\n function PickerGetFirstSelectableItem: Integer; virtual;\r\n function PickerGetLastSelectableItem: Integer; virtual;\r\n procedure PickerResetFilter; virtual;\r\n procedure PickerApplyFilter(ACondition: string; ACaseSensitive: Boolean); virtual;\r\n {$IFDEF UIPACK}\r\n function PickerLookupItem(ALookupString: String; ACaseSensitive: Boolean): TTMSFNCControlPickerFilterItem; virtual;\r\n {$ENDIF}\r\n {$ENDIF}\r\n end;\r\n\r\nimplementation\r\n\r\nuses\r\n Math, SysUtils, WEBLib.TMSFNCUtils, WEBLib.Graphics\r\n {$IFDEF FNCLIB}\r\n {$IFDEF UIPACK}\r\n , WEBLib.TMSFNCCustomSelector\r\n {$ENDIF}\r\n {$ENDIF};\r\n\r\ntype\r\n TTMSFNCTreeViewColumnOpen = class(TTMSFNCTreeViewColumn);\r\n\r\n{ TTMSFNCTreeView }\r\n\r\n{$IFDEF FMXLIB}\r\nprocedure TTMSFNCTreeView.DoAbsoluteChanged;\r\nbegin\r\n inherited;\r\n if Parent is TScaledLayout then\r\n UpdateTreeViewCache;\r\nend;\r\n{$ENDIF}\r\n\r\nprocedure TTMSFNCTreeView.DoAfterSelectNode(ANode: TTMSFNCTreeViewVirtualNode);\r\nbegin\r\n inherited;\r\n {$IFDEF FNCLIB}\r\n {$IFDEF UIPACK}\r\n if Assigned(Parent) and (Parent is TTMSFNCCustomSelector) and Assigned(Parent.Owner) and (Parent.Owner is TTMSFNCControlPicker)then\r\n begin\r\n// Update ControlPicker if assigned as control\r\n (Parent.Owner as TTMSFNCControlPicker).UpdateDropDown;\r\n end;\r\n {$ENDIF}\r\n {$ENDIF}\r\nend;\r\n\r\nprocedure TTMSFNCTreeView.DrawBorders(AGraphics: TTMSFNCGraphics);\r\nvar\r\n rrt, rrb, trl, grt, grb: TRectF;\r\n nr: TRectF;\r\nbegin\r\n inherited;\r\n\r\n grt := GetGroupsTopRect;\r\n grb := GetGroupsBottomRect;\r\n rrt := GetColumnsTopRect;\r\n rrb := GetColumnsBottomRect;\r\n nr := GetContentClipRect;\r\n\r\n {$IFDEF CMNLIB}\r\n grt.Right := grt.Right - 1;\r\n grb.Right := grb.Right - 1;\r\n rrt.Right := rrt.Right - 1;\r\n rrb.Right := rrb.Right - 1;\r\n {$ENDIF}\r\n\r\n trl := RectF(nr.Right + 1, rrt.Bottom, nr.Right + 1, rrb.Top);\r\n\r\n AGraphics.Stroke.Assign(ColumnsAppearance.TopStroke);\r\n\r\n if (trl.Right - trl.Left > 0) and (trl.Bottom - trl.Top > 0) then\r\n begin\r\n if HorizontalScrollBar.Visible or ColumnsAppearance.Stretch then\r\n AGraphics.DrawLine(PointF(trl.Right, trl.Top), PointF(trl.Right, trl.Bottom), gcpmLeftDown, gcpmLeftUp)\r\n else\r\n AGraphics.DrawLine(PointF(trl.Right, trl.Top), PointF(trl.Right, trl.Bottom), gcpmRightDown, gcpmRightUp);\r\n end;\r\n\r\n if HorizontalScrollBar.Visible or ColumnsAppearance.Stretch then\r\n begin\r\n AGraphics.Stroke.Assign(ColumnsAppearance.TopStroke);\r\n if (tclTop in ColumnsAppearance.Layouts) and (ColumnsAppearance.TopSize > 0) then\r\n begin\r\n AGraphics.DrawLine(PointF(rrt.Left, rrt.Top), PointF(rrt.Left, rrt.Bottom), gcpmRightDown, gcpmRightUp);\r\n AGraphics.DrawLine(PointF(rrt.Right, rrt.Top), PointF(rrt.Right, rrt.Bottom), gcpmLeftDown, gcpmLeftUp);\r\n end\r\n else if not ((tglTop in GroupsAppearance.Layouts) or (GroupsAppearance.TopSize <= 0) or (DisplayGroups.Count = 0)) and (Stroke.Kind <> gskNone) then\r\n AGraphics.DrawLine(PointF(rrt.Left, rrt.Bottom), PointF(rrt.Right, rrt.Bottom), gcpmRightDown, gcpmLeftDown);\r\n\r\n AGraphics.Stroke.Assign(ColumnsAppearance.BottomStroke);\r\n if (tclBottom in ColumnsAppearance.Layouts) and (ColumnsAppearance.Bottomsize > 0) then\r\n begin\r\n AGraphics.DrawLine(PointF(rrb.Left, rrb.Top), PointF(rrb.Left, rrb.Bottom), gcpmRightDown, gcpmRightUp);\r\n AGraphics.DrawLine(PointF(rrb.Right, rrb.Top), PointF(rrb.Right, rrb.Bottom), gcpmLeftDown, gcpmLeftUp);\r\n end\r\n else if (not (tglBottom in GroupsAppearance.Layouts) or (GroupsAppearance.BottomSize <= 0) or (DisplayGroups.Count = 0)) and (Stroke.Kind <> gskNone) then\r\n AGraphics.DrawLine(PointF(rrb.Left, rrb.Top), PointF(rrb.Right, rrb.Top), gcpmRightUp, gcpmLeftUp);\r\n\r\n AGraphics.Stroke.Assign(GroupsAppearance.TopStroke);\r\n if (tglTop in GroupsAppearance.Layouts) and (DisplayGroups.Count > 0) and (GroupsAppearance.TopSize > 0) then\r\n begin\r\n AGraphics.DrawLine(PointF(grt.Left, grt.Top), PointF(grt.Left, grt.Bottom), gcpmRightDown, gcpmRightUp);\r\n AGraphics.DrawLine(PointF(grt.Right, grt.Top), PointF(grt.Right, grt.Bottom), gcpmLeftDown, gcpmLeftUp);\r\n end;\r\n\r\n if (not (tclTop in ColumnsAppearance.Layouts) or (ColumnsAppearance.TopSize <= 0)) and (Stroke.Kind <> gskNone) then\r\n AGraphics.DrawLine(PointF(grt.Left, grt.Bottom), PointF(grt.Right, grt.Bottom), gcpmRightDown, gcpmLeftDown);\r\n\r\n AGraphics.Stroke.Assign(GroupsAppearance.BottomStroke);\r\n if (tglBottom in GroupsAppearance.Layouts) and (DisplayGroups.Count > 0) and (GroupsAppearance.BottomSize > 0) then\r\n begin\r\n AGraphics.DrawLine(PointF(grb.Left, grb.Top), PointF(grb.Left, grb.Bottom), gcpmRightDown, gcpmRightUp);\r\n AGraphics.DrawLine(PointF(grb.Right, grb.Top), PointF(grb.Right, grb.Bottom), gcpmLeftDown, gcpmLeftUp);\r\n end;\r\n\r\n if (not (tclBottom in ColumnsAppearance.Layouts) or (ColumnsAppearance.BottomSize <= 0)) and (Stroke.Kind <> gskNone) then\r\n AGraphics.DrawLine(PointF(grb.Left, grb.Top), PointF(grb.Right, grb.Top), gcpmRightUp, gcpmLeftUp);\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTreeView.DrawColumn(AGraphics: TTMSFNCGraphics; ARect: TRectF;\r\n AColumn: Integer; AKind: TTMSFNCTreeViewCacheItemKind);\r\nvar\r\n b: Boolean;\r\n str: String;\r\n df: Boolean;\r\n txtr: TRectF;\r\n def: Boolean;\r\n col: TTMSFNCTreeViewColumn;\r\n trim: TTMSFNCGraphicsTextTrimming;\r\n ha, va: TTMSFNCGraphicsTextAlign;\r\n ww: Boolean;\r\n r: TRectF;\r\n sr, dr: TRectF;\r\n szd: Single;\r\n szr: Single;\r\n szt: Single;\r\nbegin\r\n inherited;\r\n r := ARect;\r\n def := True;\r\n col := nil;\r\n if (AColumn >= 0) and (AColumn <= Columns.Count - 1) then\r\n begin\r\n col := Columns[AColumn];\r\n if not col.UseDefaultAppearance then\r\n begin\r\n def := False;\r\n case AKind of\r\n ikColumnTop:\r\n begin\r\n AGraphics.Stroke.Assign(col.TopStroke);\r\n AGraphics.Fill.Assign(col.TopFill);\r\n end;\r\n ikColumnBottom:\r\n begin\r\n AGraphics.Stroke.Assign(col.BottomStroke);\r\n AGraphics.Fill.Assign(col.BottomFill);\r\n end;\r\n end;\r\n end;\r\n end;\r\n\r\n if def then\r\n begin\r\n case AKind of\r\n ikColumnTop:\r\n begin\r\n AGraphics.Stroke.Assign(ColumnsAppearance.TopStroke);\r\n AGraphics.Fill.Assign(ColumnsAppearance.TopFill);\r\n end;\r\n ikColumnBottom:\r\n begin\r\n AGraphics.Stroke.Assign(ColumnsAppearance.BottomStroke);\r\n AGraphics.Fill.Assign(ColumnsAppearance.BottomFill);\r\n end;\r\n end;\r\n end;\r\n\r\n b := True;\r\n df := True;\r\n DoBeforeDrawColumnHeader(AGraphics, r, AColumn, AKind, b, df);\r\n\r\n if b then\r\n begin\r\n if df then\r\n AGraphics.DrawRectangle(r, gcrmNone);\r\n\r\n sr := r;\r\n szt := 0;\r\n\r\n if Assigned(col) then\r\n begin\r\n if col.Filtering.Enabled then\r\n begin\r\n szd := col.Filtering.ButtonSize;\r\n dr := RectF(Round(r.Right - szd - ScalePaintValue(4)), Round(r.Top + ((r.Bottom - r.Top) - szd) / 2), Round(r.Right - ScalePaintValue(4)), Round(r.Top + ((r.Bottom - r.Top) - szd) / 2 + szd));\r\n AGraphics.DrawDropDownButton(dr, False, False, True, True, AdaptToStyle, PaintScaleFactor);\r\n sr.Right := dr.Left;\r\n szt := szt + szd + ScalePaintValue(4);\r\n end;\r\n\r\n if col.Expandable then\r\n begin\r\n szr := col.ExpandingButtonSize;\r\n sr := RectF(Round(sr.Right - szr - ScalePaintValue(6)), Round(sr.Top + ((sr.Bottom - sr.Top) - szr) / 2), Round(sr.Right - ScalePaintValue(6)), Round(sr.Top + ((sr.Bottom - sr.Top) - szr) / 2 + szr));\r\n if col.Expanded then\r\n AGraphics.DrawCompactButton(sr, gcsExpanded, False, False, True, False, PaintScaleFactor)\r\n else\r\n AGraphics.DrawCompactButton(sr, gcsCollapsed, False, False, True, False, PaintScaleFactor);\r\n sr.Right := sr.Left;\r\n szt := szt + szr + ScalePaintValue(6);\r\n end;\r\n\r\n if (TTMSFNCTreeViewColumnOpen(col).SortKind <> nskNone) and (SortColumn = AColumn) then\r\n begin\r\n szr := ScalePaintValue(8);\r\n sr := RectF(Round(sr.Right - szr - ScalePaintValue(6)), Round(sr.Top + ((sr.Bottom - sr.Top) - szr) / 2), Round(sr.Right - ScalePaintValue(6)), Round(sr.Top + ((sr.Bottom - sr.Top) - szr) / 2 + szr));\r\n DrawSortIndicator(AGraphics, sr, ColumnsAppearance.SortIndicatorColor, AColumn, TTMSFNCTreeViewColumnOpen(col).SortIndex, TTMSFNCTreeViewColumnOpen(col).SortKind);\r\n szt := szt + szr + ScalePaintValue(6);\r\n end;\r\n end;\r\n\r\n if def then\r\n begin\r\n case AKind of\r\n ikColumnTop: AGraphics.Font.Assign(ColumnsAppearance.TopFont);\r\n ikColumnBottom: AGraphics.Font.Assign(ColumnsAppearance.BottomFont);\r\n end;\r\n end\r\n else if Assigned(col) then\r\n begin\r\n case AKind of\r\n ikColumnTop: AGraphics.Font.Assign(col.TopFont);\r\n ikColumnBottom: AGraphics.Font.Assign(col.BottomFont);\r\n end;\r\n end;\r\n\r\n str := GetColumnText(AColumn);\r\n DoGetColumnText(AColumn, AKind, str);\r\n\r\n ha := gtaLeading;\r\n va := gtaCenter;\r\n ww := False;\r\n trim := gttNone;\r\n if Assigned(col) then\r\n begin\r\n ha := col.HorizontalTextAlign;\r\n va := col.VerticalTextAlign;\r\n ww := col.WordWrapping;\r\n trim := col.Trimming;\r\n end;\r\n\r\n DoGetColumnTrimming(AColumn, AKind, trim);\r\n DoGetColumnWordWrapping(AColumn, AKind, ww);\r\n DoGetColumnHorizontalTextAlign(AColumn, AKind, ha);\r\n DoGetColumnVerticalTextAlign(AColumn, AKind, va);\r\n\r\n b := True;\r\n txtr := r;\r\n InflateRectEx(txtr, ScalePaintValue(-3), ScalePaintValue(-3));\r\n txtr.Right := Max(txtr.Left, txtr.Right - szt);\r\n\r\n DoBeforeDrawColumnText(AGraphics, txtr, AColumn, AKind, str, b);\r\n if b then\r\n begin\r\n case AKind of\r\n ikColumnTop:\r\n begin\r\n if ColumnsAppearance.TopVerticalText then\r\n AGraphics.DrawText(txtr, str, ww, ha, va, trim, -90)\r\n else\r\n AGraphics.DrawText(txtr, str, ww, ha, va, trim)\r\n end;\r\n ikColumnBottom:\r\n begin\r\n if ColumnsAppearance.BottomVerticalText then\r\n AGraphics.DrawText(txtr, str, ww, ha, va, trim, 90)\r\n else\r\n AGraphics.DrawText(txtr, str, ww, ha, va, trim)\r\n end;\r\n end;\r\n DoAfterDrawColumnText(AGraphics, txtr, AColumn, AKind, str);\r\n end;\r\n DoAfterDrawColumnHeader(AGraphics, ARect, AColumn, AKind);\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTreeView.DrawEmptySpaces(AGraphics: TTMSFNCGraphics);\r\nvar\r\n r: TRectF;\r\n b, df: Boolean;\r\nbegin\r\n inherited;\r\n if ColumnsAppearance.FillEmptySpaces and not StretchScrollBars then\r\n begin\r\n if (tclTop in ColumnsAppearance.Layouts) and (ColumnsAppearance.TopSize > 0) then\r\n begin\r\n //Column top right\r\n r := GetColumnTopRightEmptyRect;\r\n {$IFDEF CMNLIB}\r\n r.Left := r.Left - 1;\r\n r.Right := r.Right + 1;\r\n r.Bottom := r.Bottom + 1;\r\n {$ENDIF}\r\n b := True;\r\n df := True;\r\n\r\n AGraphics.Fill.Assign(ColumnsAppearance.TopFill);\r\n AGraphics.Stroke.Assign(ColumnsAppearance.TopStroke);\r\n\r\n DoBeforeDrawColumnEmptySpace(AGraphics, r, tcesTopRight, b, df);\r\n if b then\r\n begin\r\n if df then\r\n AGraphics.DrawRectangle(r, gcrmShiftDownAndExpandWidth);\r\n\r\n DoAfterDrawColumnEmptySpace(AGraphics, r, tcesTopRight);\r\n end;\r\n end;\r\n\r\n if (tclBottom in ColumnsAppearance.Layouts) and (ColumnsAppearance.BottomSize > 0) then\r\n begin\r\n //Column bottom right\r\n r := GetColumnBottomRightEmptyRect;\r\n {$IFDEF CMNLIB}\r\n r.Left := r.Left - 1;\r\n r.Right := r.Right + 1;\r\n r.Top := r.Top - 1;\r\n {$ENDIF}\r\n b := True;\r\n df := True;\r\n\r\n AGraphics.Fill.Assign(ColumnsAppearance.BottomFill);\r\n AGraphics.Stroke.Assign(ColumnsAppearance.BottomStroke);\r\n\r\n DoBeforeDrawColumnEmptySpace(AGraphics, r, tcesBottomRight, b, df);\r\n if b then\r\n begin\r\n if df then\r\n AGraphics.DrawRectangle(r, gcrmShiftUpAndExpandWidth);\r\n\r\n DoAfterDrawColumnEmptySpace(AGraphics, r, tcesBottomRight);\r\n end;\r\n end;\r\n end;\r\n\r\n if GroupsAppearance.FillEmptySpaces and not StretchScrollBars then\r\n begin\r\n if (tglTop in GroupsAppearance.Layouts) and (GroupsAppearance.TopSize > 0) then\r\n begin\r\n //Group top right\r\n r := GetGroupTopRightEmptyRect;\r\n {$IFDEF CMNLIB}\r\n r.Left := r.Left - 1;\r\n r.Bottom := r.Bottom + 1;\r\n {$ENDIF}\r\n b := True;\r\n df := True;\r\n\r\n AGraphics.Fill.Assign(GroupsAppearance.TopFill);\r\n AGraphics.Stroke.Assign(GroupsAppearance.TopStroke);\r\n\r\n DoBeforeDrawGroupEmptySpace(AGraphics, r, tgesTopRight, b, df);\r\n if b then\r\n begin\r\n if df then\r\n AGraphics.DrawRectangle(r, gcrmShiftLeftDown);\r\n\r\n DoAfterDrawGroupEmptySpace(AGraphics, r, tgesTopRight);\r\n end;\r\n end;\r\n\r\n if (tglBottom in GroupsAppearance.Layouts) and (GroupsAppearance.BottomSize > 0) then\r\n begin\r\n //Group bottom right\r\n r := GetGroupBottomRightEmptyRect;\r\n {$IFDEF CMNLIB}\r\n r.Left := r.Left - 1;\r\n r.Right := r.Right + 1;\r\n r.Top := r.Top - 1;\r\n {$ENDIF}\r\n b := True;\r\n df := True;\r\n\r\n AGraphics.Fill.Assign(GroupsAppearance.BottomFill);\r\n AGraphics.Stroke.Assign(GroupsAppearance.BottomStroke);\r\n\r\n DoBeforeDrawGroupEmptySpace(AGraphics, r, tgesBottomRight, b, df);\r\n if b then\r\n begin\r\n if df then\r\n AGraphics.DrawRectangle(r, gcrmShiftLeftUp);\r\n\r\n DoAfterDrawGroupEmptySpace(AGraphics, r, tgesBottomRight);\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTreeView.DrawGroup(AGraphics: TTMSFNCGraphics; ARect: TRectF; AGroup,\r\n AStartColumn, AEndColumn: Integer; AKind: TTMSFNCTreeViewCacheItemKind);\r\nvar\r\n b, df: Boolean;\r\n str: String;\r\n txtr: TRectF;\r\n grp: TTMSFNCTreeViewGroup;\r\n def: Boolean;\r\nbegin\r\n grp := nil;\r\n def := True;\r\n if (AGroup >= 0) and (AGroup <= Groups.Count - 1) then\r\n begin\r\n grp := Groups[AGroup];\r\n if not grp.UseDefaultAppearance then\r\n begin\r\n def := False;\r\n case AKind of\r\n ikGroupTop:\r\n begin\r\n AGraphics.Stroke.Assign(grp.TopStroke);\r\n AGraphics.Fill.Assign(grp.TopFill);\r\n end;\r\n ikGroupBottom:\r\n begin\r\n AGraphics.Stroke.Assign(grp.BottomStroke);\r\n AGraphics.Fill.Assign(grp.BottomFill);\r\n end;\r\n end;\r\n end;\r\n end;\r\n\r\n if def then\r\n begin\r\n case AKind of\r\n ikGroupTop:\r\n begin\r\n AGraphics.Stroke.Assign(GroupsAppearance.TopStroke);\r\n AGraphics.Fill.Assign(GroupsAppearance.TopFill);\r\n end;\r\n ikGroupBottom:\r\n begin\r\n AGraphics.Stroke.Assign(GroupsAppearance.BottomStroke);\r\n AGraphics.Fill.Assign(GroupsAppearance.BottomFill);\r\n end;\r\n end;\r\n end;\r\n\r\n b := True;\r\n df := True;\r\n DoBeforeDrawGroup(AGraphics, ARect, AGroup, AStartColumn, AEndColumn, AKind, b, df);\r\n\r\n if b then\r\n begin\r\n if df then\r\n AGraphics.DrawRectangle(ARect, gcrmNone);\r\n\r\n if def then\r\n begin\r\n case AKind of\r\n ikGroupTop: AGraphics.Font.Assign(GroupsAppearance.TopFont);\r\n ikGroupBottom: AGraphics.Font.Assign(GroupsAppearance.BottomFont);\r\n end;\r\n end\r\n else if Assigned(grp) then\r\n begin\r\n case AKind of\r\n ikGroupTop: AGraphics.Font.Assign(grp.TopFont);\r\n ikGroupBottom: AGraphics.Font.Assign(grp.BottomFont);\r\n end;\r\n end;\r\n\r\n txtr := ARect;\r\n InflateRectEx(txtr, ScalePaintValue(-2), ScalePaintValue(-2));\r\n\r\n str := GetGroupText(AGroup);\r\n DoGetGroupText(AGroup, AKind, str);\r\n b := True;\r\n DoBeforeDrawGroupText(AGraphics, txtr, AGroup, AStartColumn, AEndColumn, AKind, str, b);\r\n if b then\r\n begin\r\n case AKind of\r\n ikGroupTop:\r\n begin\r\n if GroupsAppearance.TopVerticalText then\r\n AGraphics.DrawText(txtr, str, False, GroupsAppearance.TopHorizontalTextAlign, GroupsAppearance.TopVerticalTextAlign, gttNone, -90)\r\n else\r\n AGraphics.DrawText(txtr, str, False, GroupsAppearance.TopHorizontalTextAlign, GroupsAppearance.TopVerticalTextAlign, gttNone)\r\n end;\r\n ikGroupBottom:\r\n begin\r\n if GroupsAppearance.BottomVerticalText then\r\n AGraphics.DrawText(txtr, str, False, GroupsAppearance.BottomHorizontalTextAlign, GroupsAppearance.BottomVerticalTextAlign, gttNone, 90)\r\n else\r\n AGraphics.DrawText(txtr, str, False, GroupsAppearance.BottomHorizontalTextAlign, GroupsAppearance.BottomVerticalTextAlign, gttNone)\r\n end;\r\n end;\r\n DoAfterDrawGroupText(AGraphics, txtr, AGroup, AStartColumn, AEndColumn, AKind, str);\r\n end;\r\n DoAfterDrawGroup(AGraphics, ARect, AGroup, AStartColumn, AEndColumn, AKind);\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTreeView.DrawNode(AGraphics: TTMSFNCGraphics; ARect: TRectF;\r\n ANode: TTMSFNCTreeViewVirtualNode; ACaching: Boolean = False; AOffsetX: Single = 0; AOffsetY: Single = 0);\r\nvar\r\n str: String;\r\n b, df: Boolean;\r\n txtr, titr: TRectF;\r\n I: Integer;\r\n bmp: TTMSFNCBitmap;\r\n bmpnr, extr: TRectF;\r\n AColor: TTMSFNCGraphicsColor;\r\n AStrokeColor: TTMSFNCGraphicsColor;\r\n sts, stp: Integer;\r\n bmpn: TTMSFNCBitmap;\r\n ha, va: TTMSFNCGraphicsTextAlign;\r\n c: TTMSFNCTreeViewColumn;\r\n ww: Boolean;\r\n trim: TTMSFNCGraphicsTextTrimming;\r\n en: Boolean;\r\n colw: Double;\r\n chk: TTMSFNCTreeViewNodeCheckType;\r\n chkr: TRectF;\r\n chkbmp: TTMSFNCBitmap;\r\n ck, ext: Boolean;\r\n lr, dr: TRectF;\r\n bmpexr, dexr: TRectF;\r\n sel: Boolean;\r\n cl: TTMSFNCTreeViewColumn;\r\n rfoc: TRectF;\r\n p, lp, n: TTMSFNCTreeViewVirtualNode;\r\n rsel, r: TRectF;\r\n ns: Double;\r\n dpi: Boolean;\r\n g: TTMSFNCGraphics;\r\n bmpa: TBitmap;\r\n bt: TTMSFNCBitmap;\r\n s: TTMSFNCGraphicsSides;\r\n ro: Integer;\r\n corners: TTMSFNCGraphicsCorners;\r\nbegin\r\n inherited;\r\n if not Assigned(ANode) or ((DragNode = ANode) and DragModeStarted) then\r\n Exit;\r\n\r\n dpi := ResourceScaleFactor > 1.0;\r\n\r\n en := True;\r\n DoIsNodeEnabled(ANode, en);\r\n ext := False;\r\n DoIsNodeExtended(ANode, ext);\r\n sel := IsVirtualNodeSelected(ANode);\r\n\r\n if en then\r\n begin\r\n if sel then\r\n begin\r\n if ext then\r\n begin\r\n AGraphics.Fill.Assign(NodesAppearance.ExtendedSelectedFill);\r\n AGraphics.Stroke.Assign(NodesAppearance.ExtendedSelectedStroke);\r\n end\r\n else\r\n begin\r\n AGraphics.Fill.Assign(NodesAppearance.SelectedFill);\r\n AGraphics.Stroke.Assign(NodesAppearance.SelectedStroke);\r\n end;\r\n\r\n AColor := AGraphics.Fill.Color;\r\n AStrokeColor := AGraphics.Stroke.Color;\r\n DoGetNodeSelectedColor(ANode, AColor);\r\n DoGetNodeSelectedStrokeColor(ANode, AStrokeColor);\r\n AGraphics.Fill.Color := AColor;\r\n AGraphics.Stroke.Color := AStrokeColor;\r\n end\r\n else\r\n begin\r\n if ext then\r\n begin\r\n AGraphics.Fill.Assign(NodesAppearance.ExtendedFill);\r\n AGraphics.Stroke.Assign(NodesAppearance.ExtendedStroke);\r\n end\r\n else\r\n begin\r\n AGraphics.Fill.Assign(NodesAppearance.Fill);\r\n AGraphics.Stroke.Assign(NodesAppearance.Stroke);\r\n end;\r\n\r\n AColor := AGraphics.Fill.Color;\r\n AStrokeColor := AGraphics.Stroke.Color;\r\n DoGetNodeColor(ANode, AColor);\r\n DoGetNodeStrokeColor(ANode, AStrokeColor);\r\n AGraphics.Fill.Color := AColor;\r\n AGraphics.Stroke.Color := AStrokeColor;\r\n end;\r\n end\r\n else\r\n begin\r\n if ext then\r\n begin\r\n AGraphics.Fill.Assign(NodesAppearance.ExtendedDisabledFill);\r\n AGraphics.Stroke.Assign(NodesAppearance.ExtendedDisabledStroke);\r\n end\r\n else\r\n begin\r\n AGraphics.Fill.Assign(NodesAppearance.DisabledFill);\r\n AGraphics.Stroke.Assign(NodesAppearance.DisabledStroke);\r\n end;\r\n\r\n AColor := AGraphics.Fill.Color;\r\n AStrokeColor := AGraphics.Stroke.Color;\r\n DoGetNodeDisabledColor(ANode, AColor);\r\n DoGetNodeDisabledStrokeColor(ANode, AStrokeColor);\r\n AGraphics.Fill.Color := AColor;\r\n AGraphics.Stroke.Color := AStrokeColor;\r\n end;\r\n\r\n df := True;\r\n b := True;\r\n DoBeforeDrawNode(AGraphics, ARect, ANode, b, df);\r\n\r\n if b then\r\n begin\r\n if df then\r\n begin\r\n rsel := ARect;\r\n if sel and not ext then\r\n begin\r\n case NodesAppearance.SelectionArea of\r\n tsaFull:\r\n begin\r\n if (Stroke.Kind <> gskNone) and (Stroke.Color <> gcNull) then\r\n rsel.Left := 1\r\n else\r\n rsel.Left := 0;\r\n end;\r\n tsaFromText:\r\n begin\r\n if Length(ANode.TextRects) > 0 then\r\n rsel.Left := ANode.TextRects[0].Left;\r\n end;\r\n end;\r\n end;\r\n\r\n s := AllSides;\r\n ro := 0;\r\n corners := [gcTopLeft, gcTopRight, gcBottomLeft, gcBottomRight];\r\n DoGetNodeSides(ANode, s);\r\n DoGetNodeRounding(ANode, ro, corners);\r\n\r\n if ro > 0 then\r\n begin\r\n ro := Min( Trunc(Min(rsel.Right - rsel.Left, rsel.Bottom - rsel.Top)/2), ro);\r\n AGraphics.DrawRoundRectangle(rsel, ro, corners, gcrmNone)\r\n end\r\n else\r\n AGraphics.DrawRectangle(rsel, s, gcrmNone);\r\n\r\n if (ANode = FocusedVirtualNode) and IsFocused and NodesAppearance.ShowFocus then\r\n begin\r\n rfoc := rsel;\r\n InflateRectEx(rfoc, ScalePaintValue(-2), ScalePaintValue(-2));\r\n AGraphics.DrawFocusRectangle(rfoc);\r\n end;\r\n end;\r\n\r\n if not CompactMode then\r\n begin\r\n sts := GetFirstVisibleColumn;\r\n stp := GetLastVisibleColumn;\r\n if ext then\r\n stp := Min(sts, stp);\r\n\r\n for I := sts to stp do\r\n begin\r\n cl := nil;\r\n if (I >= 0) and (I <= Columns.Count - 1) then\r\n cl := Columns[I];\r\n\r\n if (I - sts >= 0) and (I - sts <= Length(ANode.ExpandRects) - 1) and NodesAppearance.ShowLines and (I = NodesAppearance.ExpandColumn) and (NodesAppearance.ExpandWidth > 0) then\r\n begin\r\n r := ANode.ExpandRects[I - sts];\r\n OffsetRectEx(r, AOffsetX, AOffsetY);\r\n AGraphics.Stroke.Assign(NodesAppearance.LineStroke);\r\n\r\n if (NodesAppearance.LineStroke.Kind in [gskDash, gskDot, gskDashDot, gskDashDotDot]) then\r\n AGraphics.StartSpecialPen;\r\n\r\n ns := NodesAppearance.LevelIndent;\r\n lr := RectF(r.Left + NodesAppearance.ExpandWidth / 2, ARect.Top, r.Left + NodesAppearance.ExpandWidth / 2 + ns / 2, ARect.Bottom);\r\n\r\n AGraphics.DrawLine(PointF(lr.Left, lr.Top + (lr.Bottom - lr.Top) / 2), PointF(lr.Right, lr.Top + (lr.Bottom - lr.Top) / 2));\r\n\r\n if VisibleNodes.Count > 1 then\r\n begin\r\n n := ANode;\r\n p := n.GetParent;\r\n\r\n dr := lr;\r\n while Assigned(p) do\r\n begin\r\n if (((n = ANode) and (n.Index <= p.Children - 1)) or ((n <> ANode) and (n.Index < p.Children - 1))) then\r\n begin\r\n if n.Index < p.Children - 1 then\r\n AGraphics.DrawLine(PointF(dr.Left, dr.Top), PointF(dr.Left, dr.Bottom), gcpmRightDown, gcpmRightUp)\r\n else\r\n AGraphics.DrawLine(PointF(dr.Left, dr.Top), PointF(dr.Left, dr.Top + (dr.Bottom - dr.Top) / 2), gcpmRightDown, gcpmRightUp);\r\n end;\r\n\r\n n := p;\r\n p := n.GetParent;\r\n OffsetRectEx(dr, -ns, 0);\r\n end;\r\n\r\n if NodeStructure.Count - ANode.TotalChildren - 1 > 0 then\r\n begin\r\n p := ANode.GetParent;\r\n if not Assigned(p) then\r\n begin\r\n if (ANode.Row = NodeStructure.Count - ANode.TotalChildren - 1) then\r\n begin\r\n AGraphics.DrawLine(PointF(dr.Left, dr.Top), PointF(dr.Left, dr.Top + (dr.Bottom - dr.Top) / 2), gcpmRightDown, gcpmRightUp)\r\n end\r\n else if ANode.Row = 0 then\r\n begin\r\n AGraphics.DrawLine(PointF(dr.Left, dr.Top + (dr.Bottom - dr.Top) / 2), PointF(dr.Left, Int(dr.Bottom) - 0.5), gcpmRightDown, gcpmRightUp)\r\n end\r\n else\r\n AGraphics.DrawLine(PointF(dr.Left, dr.Top), PointF(dr.Left, dr.Bottom), gcpmRightDown, gcpmRightUp)\r\n end\r\n else if Assigned(p) then\r\n begin\r\n lp := p;\r\n p := p.GetParent;\r\n dr := lr;\r\n OffsetRectEx(dr, -ns, 0);\r\n while Assigned(p) do\r\n begin\r\n lp := p;\r\n p := p.GetParent;\r\n OffsetRectEx(dr, -ns, 0);\r\n end;\r\n\r\n if Assigned(lp) and (lp.Row < NodeStructure.Count - lp.TotalChildren - 1) then\r\n AGraphics.DrawLine(PointF(dr.Left, dr.Top), PointF(dr.Left, dr.Bottom), gcpmRightDown, gcpmRightUp);\r\n end;\r\n end;\r\n end;\r\n\r\n if (NodesAppearance.LineStroke.Kind in [gskDash, gskDot, gskDashDot, gskDashDotDot]) then\r\n AGraphics.StopSpecialPen;\r\n end;\r\n\r\n if Assigned(cl) and not cl.UseDefaultAppearance and not ext then\r\n AGraphics.Font.Assign(cl.Font)\r\n else\r\n begin\r\n if ext then\r\n AGraphics.Font.Assign(NodesAppearance.ExtendedFont)\r\n else\r\n AGraphics.Font.Assign(NodesAppearance.Font);\r\n end;\r\n\r\n colw := ColumnWidths[I];\r\n if (colw > 0) or ext then\r\n begin\r\n if en then\r\n begin\r\n if sel then\r\n begin\r\n if ext then\r\n AColor := NodesAppearance.ExtendedSelectedFontColor\r\n else\r\n AColor := NodesAppearance.SelectedFontColor;\r\n\r\n DoGetNodeSelectedTextColor(ANode, I, AColor);\r\n AGraphics.Font.Color := AColor;\r\n end\r\n else\r\n begin\r\n if Assigned(cl) and not cl.UseDefaultAppearance and not ext then\r\n AColor := cl.Font.Color\r\n else\r\n begin\r\n if ext then\r\n AColor := NodesAppearance.ExtendedFontColor\r\n else\r\n AColor := NodesAppearance.Font.Color;\r\n end;\r\n\r\n DoGetNodeTextColor(ANode, I, AColor);\r\n AGraphics.Font.Color := AColor;\r\n end;\r\n end\r\n else\r\n begin\r\n if ext then\r\n AColor := NodesAppearance.ExtendedDisabledFontColor\r\n else\r\n AColor := NodesAppearance.DisabledFontColor;\r\n\r\n DoGetNodeDisabledTextColor(ANode, I, AColor);\r\n AGraphics.Font.Color := AColor;\r\n end;\r\n\r\n if (I - sts >= 0) and (I - sts <= Length(ANode.CheckRects) - 1) and (I - sts <= Length(ANode.CheckStates) - 1) then\r\n begin\r\n chk := tvntNone;\r\n DoGetNodeCheckType(ANode, I, chk);\r\n if chk <> tvntNone then\r\n begin\r\n chkbmp := nil;\r\n ck := ANode.CheckStates[I - sts];\r\n DoIsNodeChecked(ANode, I, ck);\r\n\r\n case chk of\r\n tvntCheckBox: chkbmp := TTMSFNCBitmap(GetCheckBoxBitmap(ck, False));\r\n tvntRadioButton: chkbmp := TTMSFNCBitmap(GetRadioButtonBitmap(ck, False));\r\n end;\r\n\r\n if Assigned(chkbmp) then\r\n begin\r\n chkr := ANode.CheckRects[I - sts];\r\n OffsetRectEx(chkr, AOffsetX, AOffsetY);\r\n\r\n b := True;\r\n DoBeforeDrawNodeCheck(AGraphics, chkr, I, ANode, chkbmp, b);\r\n if b then\r\n begin\r\n AGraphics.DrawBitmap(chkr, chkbmp);\r\n DoAfterDrawNodeCheck(AGraphics, chkr, I, ANode, chkbmp);\r\n end;\r\n end;\r\n end;\r\n end;\r\n\r\n if (I - sts >= 0) and (I - sts <= Length(ANode.BitmapRects) - 1) then\r\n begin\r\n bmpn := nil;\r\n DoGetNodeIcon(ANode, I, False, bmpn);\r\n if not Assigned(bmpn) and dpi then\r\n DoGetNodeIcon(ANode, I, True, bmpn);\r\n\r\n if Assigned(bmpn) and not IsBitmapEmpty(bmpn) then\r\n begin\r\n bmpnr := ANode.BitmapRects[I - sts];\r\n OffsetRectEx(bmpnr, AOffsetX, AOffsetY);\r\n\r\n b := True;\r\n DoBeforeDrawNodeIcon(AGraphics, bmpnr, I, ANode, bmpn, b);\r\n if b then\r\n begin\r\n AGraphics.DrawBitmap(bmpnr, bmpn);\r\n DoAfterDrawNodeIcon(AGraphics, bmpnr, I, ANode, bmpn);\r\n end;\r\n end;\r\n end;\r\n\r\n if (I - sts >= 0) and (I - sts <= Length(ANode.ExpandRects) - 1) and (ANode.Children > 0) and (I = NodesAppearance.ExpandColumn) and (NodesAppearance.ExpandWidth > 0) then\r\n begin\r\n if dpi then\r\n begin\r\n if ANode.Expanded then\r\n bmp := NodesAppearance.CollapseNodeIconLarge\r\n else\r\n bmp := NodesAppearance.ExpandNodeIconLarge;\r\n end\r\n else\r\n begin\r\n if ANode.Expanded then\r\n bmp := NodesAppearance.CollapseNodeIcon\r\n else\r\n bmp := NodesAppearance.ExpandNodeIcon;\r\n end;\r\n\r\n bmpa := nil;\r\n if AdaptToStyle then\r\n begin\r\n bmpa := TBitmap.Create;\r\n bmpa.SetSize(bmp.Width, bmp.Height);\r\n g := TTMSFNCGraphics.Create(bmpa.Canvas);\r\n try\r\n g.BeginScene;\r\n g.Fill.Color := TTMSFNCGraphics.DefaultSelectionFillColor;\r\n g.Fill.Kind := gfkSolid;\r\n g.Stroke.Kind := gskSolid;\r\n g.Stroke.Color := TTMSFNCGraphics.DefaultTextFontColor;\r\n g.DrawRectangle(RectF(0, 0, bmp.Width, bmp.Height));\r\n g.Stroke.Width := ScalePaintValue(2);\r\n\r\n if not ANode.Expanded then\r\n g.DrawLine(PointF(bmp.Width div 2, 0), PointF(bmp.Width div 2, bmp.Height), gcpmRightDown);\r\n\r\n g.DrawLine(PointF(0, bmp.Height div 2), PointF(bmp.Width, bmp.Height div 2), gcpmRightDown);\r\n finally\r\n g.EndScene;\r\n g.Free;\r\n end;\r\n end;\r\n\r\n bmpexr := ANode.ExpandRects[I - sts];\r\n OffsetRectEx(bmpexr, AOffsetX, AOffsetY);\r\n\r\n b := True;\r\n DoBeforeDrawNodeExpand(AGraphics, bmpexr, I, ANode, bmp, b);\r\n if b then\r\n begin\r\n if dpi then\r\n begin\r\n dexr := bmpexr;\r\n InflateRectEx(dexr, ScalePaintValue(-2), ScalePaintValue(-2));\r\n end\r\n else\r\n begin\r\n dexr := RectF(Int(bmpexr.Left + ((bmpexr.Right - bmpexr.Left) - bmp.Width) / 2), Int(bmpexr.Top + ((bmpexr.Bottom - bmpexr.Top) - bmp.Height) / 2),\r\n Int(bmpexr.Left + ((bmpexr.Right - bmpexr.Left) - bmp.Width) / 2) + bmp.Width, Int(bmpexr.Top + ((bmpexr.Bottom - bmpexr.Top) - bmp.Height) / 2) + bmp.Height);\r\n end;\r\n\r\n if AdaptToStyle and Assigned(bmpa) then\r\n begin\r\n bt := TTMSFNCBitmap.Create;\r\n try\r\n bt.Assign(bmpa);\r\n AGraphics.DrawBitmap(dexr, bt);\r\n finally\r\n bt.Free;\r\n end;\r\n bmpa.Free;\r\n bmpa := nil;\r\n end\r\n else\r\n begin\r\n AGraphics.DrawBitmap(dexr, bmp);\r\n end;\r\n\r\n DoAfterDrawNodeExpand(AGraphics, bmpexr, I, ANode, bmp);\r\n end;\r\n\r\n if Assigned(bmpa) then\r\n bmpa.Free;\r\n end;\r\n\r\n if (I - sts >= 0) and (I - sts <= Length(ANode.TextRects) - 1) and ANode.TitleExpanded[I - sts] then\r\n begin\r\n txtr := ANode.TextRects[I - sts];\r\n OffsetRectEx(txtr, AOffsetX, AOffsetY);\r\n\r\n InflateRectEx(txtr, ScalePaintValue(-2), 0);\r\n\r\n c := nil;\r\n if (I >= 0) and (I <= Columns.Count - 1) then\r\n c := Columns[I];\r\n\r\n ha := gtaLeading;\r\n va := gtaCenter;\r\n ww := False;\r\n trim := gttNone;\r\n if Assigned(c) then\r\n begin\r\n ha := c.HorizontalTextAlign;\r\n va := c.VerticalTextAlign;\r\n ww := c.WordWrapping;\r\n trim := c.Trimming;\r\n end;\r\n\r\n DoGetNodeTrimming(ANode, I, trim);\r\n DoGetNodeWordWrapping(ANode, I, ww);\r\n DoGetNodeHorizontalTextAlign(ANode, I, ha);\r\n DoGetNodeVerticalTextAlign(ANode, I,va);\r\n\r\n str := '';\r\n DoGetNodeText(ANode, I, tntmDrawing, str);\r\n b := True;\r\n DoBeforeDrawNodeText(AGraphics, txtr, I, ANode, str, b);\r\n if b then\r\n begin\r\n if InplaceEditorActive and ((UpdateNodeColumn <> I) or (FocusedVirtualNode <> ANode)) or not InplaceEditorActive then\r\n AGraphics.DrawText(txtr, str, ww, ha, va, trim);\r\n\r\n DoAfterDrawNodeText(AGraphics, txtr, I, ANode, str);\r\n end;\r\n end;\r\n\r\n if Assigned(cl) and not cl.UseDefaultAppearance then\r\n AGraphics.Font.Assign(cl.TitleFont)\r\n else\r\n AGraphics.Font.Assign(NodesAppearance.TitleFont);\r\n\r\n if en then\r\n begin\r\n if sel then\r\n begin\r\n AColor := NodesAppearance.SelectedTitleFontColor;\r\n DoGetNodeSelectedTitleColor(ANode, I, AColor);\r\n AGraphics.Font.Color := AColor;\r\n end\r\n else\r\n begin\r\n if Assigned(cl) and not cl.UseDefaultAppearance then\r\n AColor := cl.TitleFont.Color\r\n else\r\n AColor := NodesAppearance.TitleFont.Color;\r\n\r\n DoGetNodeTitleColor(ANode, I, AColor);\r\n AGraphics.Font.Color := AColor;\r\n end;\r\n end\r\n else\r\n begin\r\n AColor := NodesAppearance.DisabledTitleFontColor;\r\n DoGetNodeDisabledTitleColor(ANode, I, AColor);\r\n AGraphics.Font.Color := AColor;\r\n end;\r\n\r\n if (I - sts >= 0) and (I - sts <= Length(ANode.TitleRects) - 1) then\r\n begin\r\n titr := ANode.TitleRects[I - sts];\r\n OffsetRectEx(titr, AOffsetX, AOffsetY);\r\n\r\n InflateRectEx(titr, ScalePaintValue(-2), 0);\r\n\r\n c := nil;\r\n if (I >= 0) and (I <= Columns.Count - 1) then\r\n c := Columns[I];\r\n\r\n ha := gtaLeading;\r\n va := gtaCenter;\r\n ww := False;\r\n trim := gttNone;\r\n if Assigned(c) then\r\n begin\r\n ha := c.TitleHorizontalTextAlign;\r\n va := c.TitleVerticalTextAlign;\r\n ww := c.TitleWordWrapping;\r\n trim := c.TitleTrimming;\r\n end;\r\n\r\n DoGetNodeTitleTrimming(ANode, I, trim);\r\n DoGetNodeTitleWordWrapping(ANode, I, ww);\r\n DoGetNodeTitleHorizontalTextAlign(ANode, I, ha);\r\n DoGetNodeTitleVerticalTextAlign(ANode, I,va);\r\n\r\n str := '';\r\n DoGetNodeTitle(ANode, I, tntmDrawing, str);\r\n b := True;\r\n DoBeforeDrawNodeTitle(AGraphics, titr, I, ANode, str, b);\r\n if b then\r\n begin\r\n // if InplaceEditorActive and ((UpdateNodeColumn <> I) or (FocusedVirtualNode <> ANode)) or not InplaceEditorActive then\r\n AGraphics.DrawText(titr, str, ww, ha, va, trim);\r\n\r\n DoAfterDrawNodeTitle(AGraphics, titr, I, ANode, str);\r\n end;\r\n end;\r\n\r\n if (I - sts >= 0) and (I - sts <= Length(ANode.ExtraRects) - 1) then\r\n begin\r\n extr := ANode.ExtraRects[I - sts];\r\n OffsetRectEx(extr, AOffsetX, AOffsetY);\r\n b := True;\r\n DoBeforeDrawNodeExtra(AGraphics, extr, I, ANode, b);\r\n if b then\r\n begin\r\n DoDrawNodeExtra(AGraphics, extr, I, ANode);\r\n DoAfterDrawNodeExtra(AGraphics, extr, I, ANode);\r\n end;\r\n end;\r\n\r\n if (I - sts >= 0) and (I - sts <= Length(ANode.TitleExtraRects) - 1) then\r\n begin\r\n extr := ANode.TitleExtraRects[I - sts];\r\n OffsetRectEx(extr, AOffsetX, AOffsetY);\r\n b := True;\r\n DoBeforeDrawNodeTitleExtra(AGraphics, extr, I, ANode, b);\r\n if b then\r\n begin\r\n DoDrawNodeTitleExtra(AGraphics, extr, I, ANode);\r\n DoAfterDrawNodeTitleExtra(AGraphics, extr, I, ANode);\r\n end;\r\n end;\r\n end;\r\n end;\r\n end;\r\n\r\n DoAfterDrawNode(AGraphics, ARect, ANode);\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTreeView.DrawNodeColumns(AGraphics: TTMSFNCGraphics);\r\nvar\r\n b, df: Boolean;\r\n I: Integer;\r\n r: TRectF;\r\n x, w: Double;\r\n cr: TRectF;\r\n crcl: TRectF;\r\n hs: Double;\r\n c: TTMSFNCTreeViewColumn;\r\nbegin\r\n inherited;\r\n cr := GetContentRect;\r\n crcl := GetContentClipRect;\r\n hs := GetHorizontalScrollPosition;\r\n for I := 1 to ColumnCount - 1 do\r\n begin\r\n if (I >= 0) and (I < Columns.Count - 1) then\r\n begin\r\n x := Int(ColumnPositions[I]) - Int(hs);\r\n w := Int(ColumnWidths[I]);\r\n\r\n if (ColumnStroke.Color <> gcNull) and (ColumnStroke.Kind <> gskNone) then\r\n begin\r\n AGraphics.Stroke.Assign(ColumnStroke);\r\n b := True;\r\n df := True;\r\n r := RectF(x, cr.Top, x + w, cr.Bottom);\r\n\r\n DoBeforeDrawColumn(AGraphics, r, I, b, df);\r\n\r\n if b then\r\n begin\r\n if df then\r\n AGraphics.DrawRectangle(r, gcrmShiftRightAndShrinkHeight);\r\n\r\n DoAfterDrawColumn(AGraphics, r, I);\r\n end;\r\n end;\r\n end;\r\n end;\r\n\r\n if NodeStructure.Count > 0 then\r\n begin\r\n for I := 0 to ColumnCount - 1 do\r\n begin\r\n if (I >= 0) and (I <= Columns.Count - 1) then\r\n begin\r\n c := Columns[I];\r\n x := Int(ColumnPositions[I]) - Int(hs);\r\n w := Int(ColumnWidths[I]);\r\n\r\n b := True;\r\n df := True;\r\n\r\n AGraphics.Fill.Kind := gfkNone;\r\n AGraphics.Stroke.Assign(NodesAppearance.ColumnStroke);\r\n if not c.UseDefaultAppearance then\r\n begin\r\n AGraphics.Stroke.Assign(c.Stroke);\r\n AGraphics.Fill.Assign(c.Fill);\r\n end;\r\n\r\n r := RectF(x, crcl.Top, x + w, crcl.Bottom);\r\n\r\n DoBeforeDrawNodeColumn(AGraphics, r, I, b, df);\r\n\r\n if b then\r\n begin\r\n if df then\r\n AGraphics.DrawRectangle(r, [gsTop, gsRight, gsBottom], gcrmShiftRightAndShrinkHeight);\r\n\r\n DoAfterDrawNodeColumn(AGraphics, r, I);\r\n end;\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTreeView.DrawSortIndicator(AGraphics: TTMSFNCGraphics; ARect: TRectF; AColor: TTMSFNCGraphicsColor; AColumn: Integer; ASortIndex: Integer; ASortKind: TTMSFNCTreeViewNodesSortKind);\r\nvar\r\n pth: TTMSFNCGraphicsPath;\r\n vertt: TTMSFNCGraphicsTextAlign;\r\n c: TTMSFNCGraphicsColor;\r\n txtr: TRectF;\r\n b: Boolean;\r\nbegin\r\n inherited;\r\n c := AColor;\r\n AGraphics.Fill.Kind := gfkSolid;\r\n AGraphics.Fill.Color := c;\r\n AGraphics.Stroke.Kind := gskSolid;\r\n AGraphics.Stroke.Color := c;\r\n\r\n b := True;\r\n DoBeforeDrawSortIndicator(AGraphics, ARect, AColumn, ASortIndex, ASortKind, b);\r\n if b then\r\n begin\r\n vertt := gtaCenter;\r\n txtr := ARect;\r\n pth := TTMSFNCGraphicsPath.Create;\r\n try\r\n case ASortKind of\r\n nskAscending:\r\n begin\r\n vertt := gtaTrailing;\r\n pth.MoveTo(PointF(ARect.Left + (ARect.Right - ARect.Left) / 2, ARect.Top));\r\n pth.LineTo(PointF(ARect.Right, ARect.Bottom));\r\n pth.LineTo(PointF(ARect.Left, ARect.Bottom));\r\n txtr := RectF(ARect.Left, ARect.Top + ScalePaintValue(2), ARect.Right, ARect.Bottom + ScalePaintValue(2));\r\n end;\r\n nskDescending:\r\n begin\r\n vertt := gtaLeading;\r\n pth.MoveTo(PointF(ARect.Left, ARect.Top));\r\n pth.LineTo(PointF(ARect.Right, ARect.Top));\r\n pth.LineTo(PointF(ARect.Left + (ARect.Right - ARect.Left) / 2, ARect.Bottom));\r\n txtr := RectF(ARect.Left, ARect.Top - ScalePaintValue(2), ARect.Right, ARect.Bottom - ScalePaintValue(2));\r\n end;\r\n end;\r\n pth.ClosePath;\r\n AGraphics.DrawPath(pth);\r\n\r\n if ASortIndex <> -1 then\r\n begin\r\n AGraphics.Font.Color := gcWhite;\r\n TTMSFNCUtils.SetFontSize(AGraphics.Font, 9);\r\n AGraphics.DrawText(txtr, IntToStr(ASortIndex), False, gtaCenter, vertt);\r\n end;\r\n finally\r\n pth.Free;\r\n end;\r\n DoAfterDrawSortIndicator(AGraphics, ARect, AColumn, ASortIndex, ASortKind);\r\n end;\r\nend;\r\n\r\n{$IFDEF FNCLIB}\r\n{ TTMSFNCTreeView picker implementation }\r\n\r\nprocedure TTMSFNCTreeView.PickerApplyFilter(ACondition: string; ACaseSensitive: Boolean);\r\nvar\r\n f: TTMSFNCTreeViewFilterData;\r\nbegin\r\n f := Filter.Add;\r\n f.Condition := ACondition;\r\n f.CaseSensitive := ACaseSensitive;\r\n ApplyFilter;\r\nend;\r\n\r\nfunction TTMSFNCTreeView.PickerGetContent: String;\r\nvar\r\n n: TTMSFNCTreeViewVirtualNode;\r\nbegin\r\n Result := '';\r\n if SelectedVirtualNodeCount > 0 then\r\n begin\r\n n := SelectedVirtualNodes[0];\r\n Result := n.Text[0];\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCTreeView.PickerGetFirstSelectableItem: Integer;\r\nbegin\r\n Result := GetFirstVisibleVirtualNodeRow;\r\nend;\r\n\r\nfunction TTMSFNCTreeView.PickerGetItemCount: Integer;\r\nbegin\r\n Result := GetTotalVirtualNodeCount;\r\nend;\r\n\r\nfunction TTMSFNCTreeView.PickerGetItemHeight: Single;\r\nbegin\r\n Result := NodesAppearance.FixedHeight;\r\nend;\r\n\r\nfunction TTMSFNCTreeView.PickerGetItemWidth: Single;\r\nbegin\r\n if Columns.Count > 0 then\r\n Result := Width / Columns.Count\r\n else\r\n Result := 0;\r\nend;\r\n\r\nfunction TTMSFNCTreeView.PickerGetLastSelectableItem: Integer;\r\nbegin\r\n Result := GetLastVisibleVirtualNodeRow;\r\nend;\r\n\r\nfunction TTMSFNCTreeView.PickerGetNextSelectableItem(AItemIndex: Integer): Integer;\r\nvar\r\n n, nf: TTMSFNCTreeViewVirtualNode;\r\nbegin\r\n Result := -1;\r\n n := GetNodeFromNodeStructure(AItemIndex);\r\n if Assigned(n) then\r\n begin\r\n nf := GetNextFocusableNode(n);\r\n if Assigned(nf) then\r\n Result := nf.Row;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCTreeView.PickerGetPreviousSelectableItem(AItemIndex: Integer): Integer;\r\nvar\r\n n, nf: TTMSFNCTreeViewVirtualNode;\r\nbegin\r\n Result := -1;\r\n n := GetNodeFromNodeStructure(AItemIndex);\r\n if Assigned(n) then\r\n begin\r\n nf := GetPreviousFocusableNode(n);\r\n if Assigned(nf) then\r\n Result := nf.Row;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCTreeView.PickerGetSelectedItem: Integer;\r\nbegin\r\n Result := SelectedVirtualNodeRow;\r\nend;\r\n\r\nfunction TTMSFNCTreeView.PickerGetVisibleItemCount: Integer;\r\nbegin\r\n Result := GetVisibleNodeCount;\r\nend;\r\n\r\n{$IFDEF UIPACK}\r\nfunction TTMSFNCTreeView.PickerLookupItem(ALookupString: String; ACaseSensitive: Boolean): TTMSFNCControlPickerFilterItem;\r\nvar\r\n vn: TTMSFNCTreeViewVirtualNode;\r\nbegin\r\n Result.ItemIndex := -1;\r\n Result.ItemText := '';\r\n vn := LookupNode(ALookupString + '*', False, -1, ACaseSensitive, True, True);\r\n if Assigned(vn) then\r\n begin\r\n Result.ItemIndex := vn.Row;\r\n Result.ItemText := vn.Text[0];\r\n end;\r\nend;\r\n{$ENDIF}\r\n\r\nprocedure TTMSFNCTreeView.PickerResetFilter;\r\nbegin\r\n if Filter.Count > 0 then\r\n RemoveFilters;\r\nend;\r\n\r\nprocedure TTMSFNCTreeView.PickerSelectItem(AItemIndex: Integer);\r\nvar\r\n n: TTMSFNCTreeViewVirtualNode;\r\nbegin\r\n n := GetNodeFromNodeStructure(AItemIndex);\r\n if Assigned(n) then\r\n begin\r\n SelectVirtualNode(n);\r\n ScrollToVirtualNode(n, True);\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTreeView.PickerSetItemHeight(AValue: Single);\r\nbegin\r\n NodesAppearance.FixedHeight := AValue;\r\nend;\r\n\r\nprocedure TTMSFNCTreeView.PickerSetItemWidth(AValue: Single);\r\nbegin\r\n //\r\nend;\r\n{$ENDIF}\r\n\r\nprocedure TTMSFNCTreeView.RegisterRuntimeClasses;\r\nbegin\r\n inherited;\r\n RegisterClasses([TTMSFNCTreeView, TTMSFNCTreeViewColumn, TTMSFNCTreeViewNode, TTMSFNCTreeViewNodeValue]);\r\nend;\r\n\r\nend.\r\n","{********************************************************************}\r\n{ }\r\n{ written by TMS Software }\r\n{ copyright (c) 2016 }\r\n{ Email : info@tmssoftware.com }\r\n{ Web : http://www.tmssoftware.com }\r\n{ }\r\n{ The source code is given as is. The author is not responsible }\r\n{ for any possible damage done due to the use of this code. }\r\n{ The complete source code remains property of the author and may }\r\n{ not be distributed, published, given or sold in any form as such. }\r\n{ No parts of the source code can be included in any other component }\r\n{ or application without written authorization of the author. }\r\n{********************************************************************}\r\n\r\nunit WEBLib.TMSFNCBitmapSelector;\r\n\r\n{$I WEBLib.TMSFNCDefines.inc}\r\n\r\ninterface\r\n\r\nuses\r\n Classes, WEBLib.TMSFNCCustomSelector, WEBLib.TMSFNCTypes,\r\n WEBLib.TMSFNCBitmapContainer, WEBLib.TMSFNCGraphics;\r\n\r\nconst\r\n MAJ_VER = 1; // Major version nr.\r\n MIN_VER = 0; // Minor version nr.\r\n REL_VER = 0; // Release nr.\r\n BLD_VER = 0; // Build nr.\r\n\r\ntype\r\n TTMSFNCCustomBitmapSelector = class;\r\n\r\n TTMSFNCBitmapSelectorBitmapAlign = (baLeft, baCenter, baRight);\r\n\r\n TTMSFNCBitmapSelectorItem = class(TTMSFNCCustomSelectorItem)\r\n private\r\n FOwner: TTMSFNCCustomBitmapSelector;\r\n FBitmap: TTMSFNCBitmap;\r\n FBitmapAlign: TTMSFNCBitmapSelectorBitmapAlign;\r\n FBitmapName: String;\r\n FBitmapSize: Single;\r\n procedure SetBitmap(const Value: TTMSFNCBitmap);\r\n procedure SetBitmapAlign(const Value: TTMSFNCBitmapSelectorBitmapAlign);\r\n procedure SetBitmapName(const Value: String);\r\n procedure SetBitmapSize(const Value: Single);\r\n function GetBitmapContainer: TTMSFNCBitmapContainer;\r\n function IsBitmapSizeStored: Boolean;\r\n protected\r\n function GetDisplayBitmap: TTMSFNCBitmap;\r\n procedure BitmapChanged(Sender: TObject);\r\n public\r\n constructor Create(ACollection: TCollection); override;\r\n destructor Destroy; override;\r\n procedure Assign(Source: TPersistent); override;\r\n property BitmapContainer: TTMSFNCBitmapContainer read GetBitmapContainer;\r\n published\r\n property Bitmap: TTMSFNCBitmap read FBitmap write SetBitmap;\r\n property BitmapName: String read FBitmapName write SetBitmapName;\r\n property BitmapAlign: TTMSFNCBitmapSelectorBitmapAlign read FBitmapAlign write SetBitmapAlign default TTMSFNCBitmapSelectorBitmapAlign.baCenter;\r\n property BitmapSize: Single read FBitmapSize write SetBitmapSize stored IsBitmapSizeStored nodefault;\r\n end;\r\n\r\n TTMSFNCBitmapSelectorItems = class(TTMSFNCCustomSelectorItems)\r\n private\r\n FOwner: TTMSFNCCustomBitmapSelector;\r\n function GetItem(Index: integer): TTMSFNCBitmapSelectorItem;\r\n procedure SetItem(Index: integer; const Value: TTMSFNCBitmapSelectorItem);\r\n protected\r\n function CreateItemClass: TCollectionItemClass; override;\r\n public\r\n constructor Create(AOwner: TTMSFNCCustomSelector); override;\r\n property Items[Index: integer]: TTMSFNCBitmapSelectorItem read GetItem write SetItem; default;\r\n function Add: TTMSFNCBitmapSelectorItem;\r\n function Insert(Index: integer): TTMSFNCBitmapSelectorItem;\r\n end;\r\n\r\n TTMSFNCCustomSelectorBitmapSelected = procedure(Sender: TObject; ABitmap: TTMSFNCBitmap) of object;\r\n TTMSFNCCustomSelectorBitmapDeselected = procedure(Sender: TObject; ABitmap: TTMSFNCBitmap) of object;\r\n\r\n {$IFDEF FNCLIB}\r\n TTMSFNCCustomBitmapSelector = class(TTMSFNCDefaultSelector, ITMSFNCBitmapContainer)\r\n {$ENDIF}\r\n {$IFNDEF FNCLIB}\r\n TTMSFNCCustomBitmapSelector = class(TTMSFNCDefaultSelector)\r\n {$ENDIF}\r\n private\r\n FOnBitmapSelected: TTMSFNCCustomSelectorBitmapSelected;\r\n FOnBitmapDeselected: TTMSFNCCustomSelectorBitmapDeselected;\r\n FBitmapContainer: TTMSFNCBitmapContainer;\r\n function GetSelectedBitmap: TTMSFNCBitmap;\r\n procedure SetBitmapContainer(const Value: TTMSFNCBitmapContainer);\r\n function GetItems: TTMSFNCBitmapSelectorItems;\r\n procedure SetItems(const Value: TTMSFNCBitmapSelectorItems);\r\n function GetBitmapContainer: TTMSFNCBitmapContainer;\r\n protected\r\n function GetVersion: String; override;\r\n procedure Notification(AComponent: TComponent; Operation: TOperation); override;\r\n procedure DoItemSelected(AItemIndex: Integer); override;\r\n procedure DoItemDeselected(AItemIndex: Integer); override;\r\n function CreateItemsCollection: TTMSFNCCustomSelectorItems; override;\r\n procedure DrawItemContent(AGraphics: TTMSFNCGraphics; ADisplayItem: TTMSFNCCustomSelectorDisplayItem); override;\r\n procedure DrawItemText(AGraphics: TTMSFNCGraphics; ADisplayItem: TTMSFNCCustomSelectorDisplayItem); override;\r\n property OnBitmapSelected: TTMSFNCCustomSelectorBitmapSelected read FOnBitmapSelected write FOnBitmapSelected;\r\n property OnBitmapDeselected: TTMSFNCCustomSelectorBitmapDeselected read FOnBitmapDeselected write FOnBitmapDeselected;\r\n property SelectedBitmap: TTMSFNCBitmap read GetSelectedBitmap;\r\n property BitmapContainer: TTMSFNCBitmapContainer read GetBitmapContainer write SetBitmapContainer;\r\n property Items: TTMSFNCBitmapSelectorItems read GetItems write SetItems;\r\n public\r\n constructor Create(AOwner: TComponent); override;\r\n procedure LoadFromBitmapContainer; virtual;\r\n function FindItemByBitmap(ABitmap: TTMSFNCBitmap): Integer;\r\n function FindBitmapByItem(AItem: Integer): TTMSFNCBitmap;\r\n end;\r\n\r\n {$IFNDEF LCLLIB}\r\n [ComponentPlatformsAttribute(TMSPlatformsWeb)]\r\n {$ENDIF}\r\n TTMSFNCBitmapSelector = class(TTMSFNCCustomBitmapSelector)\r\n protected\r\n procedure RegisterRuntimeClasses; override;\r\n public\r\n property SelectedBitmap;\r\n published\r\n property Appearance;\r\n property Rows;\r\n property Columns;\r\n property Items;\r\n property OnBitmapSelected;\r\n property OnBitmapDeselected;\r\n property BitmapContainer;\r\n property OnItemSelected;\r\n property SelectedItemIndex;\r\n property OnItemBeforeDrawBackground;\r\n property OnItemAfterDrawBackground;\r\n property OnItemBeforeDrawContent;\r\n property OnItemAfterDrawContent;\r\n property OnBeforeDraw;\r\n property OnAfterDraw;\r\n property OnItemBeforeDrawText;\r\n property OnItemAfterDrawText;\r\n end;\r\n\r\nprocedure GetAspectSize(var w, h: Single; ow, oh, nw, nh, crw, crh: Single; asp, st, cr: Boolean);\r\n\r\nimplementation\r\n\r\nuses\r\n WEBLib.TMSFNCUtils\r\n {$IFNDEF LCLLIB}\r\n ,Types\r\n {$ENDIF}\r\n ;\r\n\r\nprocedure GetAspectSize(var w, h: Single; ow, oh, nw, nh, crw, crh: Single; asp, st, cr: Boolean);\r\nvar\r\n arc, ar: Single;\r\nbegin\r\n if asp then\r\n begin\r\n if (ow > 0) and (oh > 0) and (nw > 0) and (nh > 0) then\r\n begin\r\n if (ow < nw) and (oh < nh) and (not st) then\r\n begin\r\n w := ow;\r\n h := oh;\r\n end\r\n else\r\n begin\r\n if ow / oh < nw / nh then\r\n begin\r\n h := nh;\r\n w := nh * ow / oh;\r\n end\r\n else\r\n begin\r\n w := nw;\r\n h := nw * oh / ow;\r\n end;\r\n end;\r\n end\r\n else\r\n begin\r\n w := 0;\r\n h := 0;\r\n end;\r\n end\r\n else\r\n begin\r\n if st then\r\n begin\r\n w := nw;\r\n h := nh;\r\n end\r\n else\r\n begin\r\n w := ow;\r\n h := oh;\r\n\r\n if cr then\r\n begin\r\n if (w >= h) and (w > 0) then\r\n begin\r\n h := crw / w * h;\r\n w := crw;\r\n end\r\n else\r\n if (h >= w) and (h > 0) then\r\n begin\r\n w := crh / h * w;\r\n h := crh;\r\n end;\r\n\r\n if h = 0 then\r\n ar := 1\r\n else\r\n ar := w / h;\r\n\r\n if crh = 0 then\r\n arc := 1\r\n else\r\n arc := crw / crh;\r\n\r\n if (ar < 1) or (arc > ar) then\r\n begin\r\n h := crw / ar;\r\n w := crw;\r\n end\r\n else\r\n begin\r\n w := ar * crh;\r\n h := crh;\r\n end;\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\n{ TTMSFNCCustomBitmapSelector }\r\n\r\nconstructor TTMSFNCCustomBitmapSelector.Create(AOwner: TComponent);\r\nbegin\r\n inherited;\r\n Width := 135;\r\n Height := 135;\r\nend;\r\n\r\nfunction TTMSFNCCustomBitmapSelector.CreateItemsCollection: TTMSFNCCustomSelectorItems;\r\nbegin\r\n Result := TTMSFNCBitmapSelectorItems.Create(Self);\r\nend;\r\n\r\nprocedure TTMSFNCCustomBitmapSelector.DoItemDeselected(AItemIndex: Integer);\r\nbegin\r\n inherited;\r\n if Assigned(OnBitmapDeselected) then\r\n OnBitmapDeselected(Self, FindBitmapByItem(AItemIndex));\r\nend;\r\n\r\nprocedure TTMSFNCCustomBitmapSelector.DoItemSelected(AItemIndex: Integer);\r\nbegin\r\n inherited;\r\n if Assigned(OnBitmapSelected) then\r\n OnBitmapSelected(Self, FindBitmapByItem(AItemIndex));\r\nend;\r\n\r\nprocedure TTMSFNCCustomBitmapSelector.DrawItemContent(AGraphics: TTMSFNCGraphics;\r\n ADisplayItem: TTMSFNCCustomSelectorDisplayItem);\r\nvar\r\n r: TRectF;\r\n it: TTMSFNCCustomSelectorItem;\r\n itbmp: TTMSFNCBitmapSelectorItem;\r\n a: Boolean;\r\n sz: Single;\r\n bmp: TTMSFNCBitmap;\r\n bmpr: TRectF;\r\n w, h: Single;\r\n bmpdr: TRectF;\r\nbegin\r\n it := ADisplayItem.Item;\r\n if Assigned(it) and (it is TTMSFNCBitmapSelectorItem) then\r\n begin\r\n r := ADisplayItem.Rect;\r\n a := True;\r\n DoItemBeforeDrawContent(AGraphics, r, it.Index, a);\r\n if a then\r\n begin\r\n itbmp := (it as TTMSFNCBitmapSelectorItem);\r\n bmp := itbmp.GetDisplayBitmap;\r\n if Assigned(bmp) then\r\n begin\r\n InflateRectEx(r, -2, -2);\r\n sz := r.Bottom - r.Top;\r\n if itbmp.BitmapSize > 0 then\r\n sz := itbmp.BitmapSize;\r\n\r\n case itbmp.BitmapAlign of\r\n baLeft: bmpr := RectF(r.Left, r.Top, r.Left + sz, r.Bottom);\r\n baCenter: bmpr := RectF(r.Left + ((r.Right - r.Left) - sz) / 2, r.Top, r.Left + ((r.Right - r.Left) - sz) / 2 + sz, r.Bottom);\r\n baRight: bmpr := RectF(r.Right - sz, r.Top, r.Right, r.Bottom);\r\n end;\r\n\r\n w := 0;\r\n h := 0;\r\n GetAspectSize(w, h, bmp.Width, bmp.Height, (bmpr.Right - bmpr.Left), (bmpr.Bottom - bmpr.Top), (bmpr.Right - bmpr.Left), (bmpr.Bottom - bmpr.Top), True, False, False);\r\n bmpdr := RectF(bmpr.Left + ((bmpr.Right - bmpr.Left) - w) / 2, bmpr.Top + ((bmpr.Bottom - bmpr.Top) - h) / 2, bmpr.Left + ((bmpr.Right - bmpr.Left) - w) / 2 + w, bmpr.Top + ((bmpr.Bottom - bmpr.Top) - h) / 2 + h);\r\n bmpdr := RectF(Round(bmpdr.Left), Round(bmpdr.Top), Round(bmpdr.Right), Round(bmpdr.Bottom));\r\n// if it.Enabled then\r\n AGraphics.DrawBitmap(bmpdr, bmp);\r\n// else\r\n// AGraphics.DrawBitmap(bmp, RectF(0, 0, bmp.Width, bmp.Height), bmpdr, 0.25);\r\n end;\r\n\r\n DoItemAfterDrawContent(AGraphics, r, it.Index);\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomBitmapSelector.DrawItemText(AGraphics: TTMSFNCGraphics;\r\n ADisplayItem: TTMSFNCCustomSelectorDisplayItem);\r\nvar\r\n it: TTMSFNCBitmapSelectorItem;\r\n bmp: TTMSFNCBitmap;\r\n dps: TTMSFNCCustomSelectorDisplayItem;\r\n sz: Single;\r\nbegin\r\n if Assigned(ADisplayItem.Item) and (ADisplayItem.Item is TTMSFNCBitmapSelectorItem) then\r\n begin\r\n it := ADisplayItem.Item as TTMSFNCBitmapSelectorItem;\r\n bmp := it.GetDisplayBitmap;\r\n if Assigned(bmp) then\r\n begin\r\n dps := ADisplayItem;\r\n sz := dps.Rect.Bottom - dps.Rect.Top;\r\n if it.BitmapSize > 0 then\r\n sz := it.BitmapSize;\r\n\r\n case it.BitmapAlign of\r\n baLeft: dps.Rect.Left := dps.Rect.Left + sz + 4;\r\n baRight: dps.Rect.Right := dps.Rect.Right - sz - 4;\r\n end;\r\n inherited DrawItemText(AGraphics, dps);\r\n end\r\n else\r\n inherited;\r\n end\r\n else\r\n inherited;\r\nend;\r\n\r\nfunction TTMSFNCCustomBitmapSelector.FindBitmapByItem(\r\n AItem: Integer): TTMSFNCBitmap;\r\nvar\r\n I: Integer;\r\n it: TTMSFNCBitmapSelectorItem;\r\nbegin\r\n Result := nil;\r\n for I := 0 to Items.Count - 1 do\r\n begin\r\n it := Items[I] as TTMSFNCBitmapSelectorItem;\r\n if it.Index = AItem then\r\n begin\r\n Result := it.GetDisplayBitmap;\r\n Break;\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCCustomBitmapSelector.FindItemByBitmap(\r\n ABitmap: TTMSFNCBitmap): Integer;\r\nvar\r\n I: Integer;\r\n it: TTMSFNCBitmapSelectorItem;\r\nbegin\r\n Result := -1;\r\n for I := 0 to Items.Count - 1 do\r\n begin\r\n it := Items[I] as TTMSFNCBitmapSelectorItem;\r\n if it.GetDisplayBitmap = ABitmap then\r\n begin\r\n Result := it.Index;\r\n Break;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomBitmapSelector.Notification(AComponent: TComponent;\r\n Operation: TOperation);\r\nbegin\r\n inherited;\r\n if (Operation = opRemove) and (AComponent = FBitmapContainer) then\r\n FBitmapContainer := nil;\r\nend;\r\n\r\n\r\nprocedure TTMSFNCCustomBitmapSelector.SetBitmapContainer(\r\n const Value: TTMSFNCBitmapContainer);\r\nbegin\r\n FBitmapContainer := Value;\r\n InvalidateItems;\r\nend;\r\n\r\nfunction TTMSFNCCustomBitmapSelector.GetBitmapContainer: TTMSFNCBitmapContainer;\r\nbegin\r\n Result := FBitmapContainer;\r\nend;\r\n\r\nfunction TTMSFNCCustomBitmapSelector.GetItems: TTMSFNCBitmapSelectorItems;\r\nbegin\r\n Result := TTMSFNCBitmapSelectorItems(inherited Items);\r\nend;\r\n\r\nprocedure TTMSFNCCustomBitmapSelector.SetItems(\r\n const Value: TTMSFNCBitmapSelectorItems);\r\nbegin\r\n Items.Assign(Value);\r\nend;\r\n\r\nfunction TTMSFNCCustomBitmapSelector.GetSelectedBitmap: TTMSFNCBitmap;\r\nbegin\r\n Result := FindBitmapByItem(SelectedItemIndex);\r\nend;\r\n\r\nfunction TTMSFNCCustomBitmapSelector.GetVersion: String;\r\nbegin\r\n Result := GetVersionNumber(MAJ_VER, MIN_VER, REL_VER, BLD_VER);\r\nend;\r\n\r\nprocedure TTMSFNCCustomBitmapSelector.LoadFromBitmapContainer;\r\nvar\r\n I: Integer;\r\n it: TTMSFNCBitmapSelectorItem;\r\nbegin\r\n if not Assigned(BitmapContainer) then\r\n Exit;\r\n\r\n BeginUpdate;\r\n Items.Clear;\r\n for I := 0 to BitmapContainer.Items.Count - 1 do\r\n begin\r\n it := Items.Add;\r\n it.BitmapName := BitmapContainer.Items[I].Name;\r\n end;\r\n EndUpdate;\r\nend;\r\n\r\n{ TTMSFNCBitmapSelectorItems }\r\n\r\nfunction TTMSFNCBitmapSelectorItems.Add: TTMSFNCBitmapSelectorItem;\r\nbegin\r\n Result := TTMSFNCBitmapSelectorItem(inherited Add);\r\nend;\r\n\r\nconstructor TTMSFNCBitmapSelectorItems.Create(AOwner: TTMSFNCCustomSelector);\r\nbegin\r\n inherited;\r\n FOwner := AOwner as TTMSFNCCustomBitmapSelector;\r\nend;\r\n\r\nfunction TTMSFNCBitmapSelectorItems.CreateItemClass: TCollectionItemClass;\r\nbegin\r\n Result := TTMSFNCBitmapSelectorItem;\r\nend;\r\n\r\nfunction TTMSFNCBitmapSelectorItems.GetItem(\r\n Index: integer): TTMSFNCBitmapSelectorItem;\r\nbegin\r\n Result := TTMSFNCBitmapSelectorItem(inherited Items[Index]);\r\nend;\r\n\r\nfunction TTMSFNCBitmapSelectorItems.Insert(\r\n Index: integer): TTMSFNCBitmapSelectorItem;\r\nbegin\r\n Result := TTMSFNCBitmapSelectorItem(inherited Insert(Index));\r\nend;\r\n\r\nprocedure TTMSFNCBitmapSelectorItems.SetItem(Index: integer;\r\n const Value: TTMSFNCBitmapSelectorItem);\r\nbegin\r\n inherited Items[Index] := Value;\r\nend;\r\n\r\n{ TTMSFNCBitmapSelectorItem }\r\n\r\nprocedure TTMSFNCBitmapSelectorItem.Assign(Source: TPersistent);\r\nbegin\r\n inherited;\r\n if Source is TTMSFNCBitmapSelectorItem then\r\n begin\r\n FBitmap.Assign((Source as TTMSFNCBitmapSelectorItem).Bitmap);\r\n FBitmapName := (Source as TTMSFNCBitmapSelectorItem).BitmapName;\r\n FBitmapSize := (Source as TTMSFNCBitmapSelectorItem).BitmapSize;\r\n FBitmapAlign := (Source as TTMSFNCBitmapSelectorItem).BitmapAlign;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCBitmapSelectorItem.BitmapChanged(Sender: TObject);\r\nbegin\r\n FOwner.InvalidateItems;\r\nend;\r\n\r\nconstructor TTMSFNCBitmapSelectorItem.Create(ACollection: TCollection);\r\nbegin\r\n inherited;\r\n if Assigned(Collection) then\r\n FOwner := (Collection as TTMSFNCBitmapSelectorItems).FOwner;\r\n FBitmapAlign := baCenter;\r\n FBitmapSize := 0;\r\n FBitmap := TTMSFNCBitmap.Create;\r\n FBitmap.OnChange := @BitmapChanged;\r\nend;\r\n\r\ndestructor TTMSFNCBitmapSelectorItem.Destroy;\r\nbegin\r\n FBitmap.Free;\r\n inherited;\r\nend;\r\n\r\nfunction TTMSFNCBitmapSelectorItem.GetBitmapContainer: TTMSFNCBitmapContainer;\r\nbegin\r\n Result := FOwner.BitmapContainer;\r\nend;\r\n\r\nfunction TTMSFNCBitmapSelectorItem.GetDisplayBitmap: TTMSFNCBitmap;\r\nbegin\r\n Result := nil;\r\n if Assigned(Bitmap) and not IsBitmapEmpty(Bitmap) then\r\n Result := Bitmap\r\n else if Assigned(FOwner) and Assigned(FOwner.BitmapContainer) and (BitmapName <> '') then\r\n Result := TTMSFNCBitmap(FOwner.BitmapContainer.FindBitmap(BitmapName));\r\nend;\r\n\r\nfunction TTMSFNCBitmapSelectorItem.IsBitmapSizeStored: Boolean;\r\nbegin\r\n Result := BitmapSize <> 0;\r\nend;\r\n\r\nprocedure TTMSFNCBitmapSelectorItem.SetBitmap(const Value: TTMSFNCBitmap);\r\nbegin\r\n if FBitmap <> Value then\r\n begin\r\n FBitmap.Assign(Value);\r\n FOwner.InvalidateItems;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCBitmapSelectorItem.SetBitmapAlign(\r\n const Value: TTMSFNCBitmapSelectorBitmapAlign);\r\nbegin\r\n if FBitmapAlign <> Value then\r\n begin\r\n FBitmapAlign := Value;\r\n FOwner.InvalidateItems;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCBitmapSelectorItem.SetBitmapName(const Value: String);\r\nbegin\r\n if FBitmapName <> Value then\r\n begin\r\n FBitmapName := Value;\r\n FOwner.InvalidateItems;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCBitmapSelectorItem.SetBitmapSize(const Value: Single);\r\nbegin\r\n if FBitmapSize <> Value then\r\n begin\r\n FBitmapSize := Value;\r\n FOwner.InvalidateItems;\r\n end;\r\nend;\r\n\r\n{ TTMSFNCBitmapSelector }\r\n\r\nprocedure TTMSFNCBitmapSelector.RegisterRuntimeClasses;\r\nbegin\r\n inherited;\r\n RegisterClasses([TTMSFNCBitmapSelector, TTMSFNCBitmapSelectorItem]);\r\nend;\r\n\r\nend.\r\n","{********************************************************************}\r\n{ }\r\n{ written by TMS Software }\r\n{ copyright (c) 2018 }\r\n{ Email : info@tmssoftware.com }\r\n{ Web : http://www.tmssoftware.com }\r\n{ }\r\n{ The source code is given as is. The author is not responsible }\r\n{ for any possible damage done due to the use of this code. }\r\n{ The complete source code remains property of the author and may }\r\n{ not be distributed, published, given or sold in any form as such. }\r\n{ No parts of the source code can be included in any other component }\r\n{ or application without written authorization of the author. }\r\n{********************************************************************}\r\n\r\nunit WEBLib.TMSFNCColorWheelResources;\r\n\r\n{$I WEBLib.TMSFNCDefines.inc}\r\n\r\ninterface\r\n\r\nfunction GetColorWheelResource: string;\r\nfunction GetColorWheelResource125: string;\r\nfunction GetColorWheelResource150: string;\r\nfunction GetColorWheelResource175: string;\r\nfunction GetColorWheelResource200: string;\r\n\r\nimplementation\r\n\r\nfunction GetColorWheelResource: string;\r\nbegin\r\n {$IFDEF WEBLIB}\r\n Result := 'data:image/png;base64,iVBOR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dgThHuagM/hRWK+QtTXUJXA1QhdA+8TvjbqoB4jNERjNEULhNcvbIN2+NL3ndANX6MXwtsrDHDsYHyH4cYcidHmGGeuiZhi7mlimCmeOZgntoViXCzWZWJeIfbVQezUOrkkBJE7t8vtapo3tj9zyx9EkpeMRyreG0SH3e9/TOUIVZ5gj6E'+\r\n 'C8Z4lYkViViJqZVQh8luoTvD3UIv4H6EuGjBEIzRBc7Rkktb4Jzr4Prx+dBd0R0/0cUx/DMQQYw3D98b+AWPNNd68kzFVDNPFMktMc8U3H4vEujiI9l0p9nU33ti89rcHg8jb5YNIs0eC6PonnPg+TcTnCfoiXiHu66hK6LdRg+jvozYTfIx6aMgUjRFev7AFPkcbtMOX6ISu+Nq+vdAXA4wxGN8ZczhGmmM0xplzovmnYGoQuzJDTHODSN15wb'+\r\n '+5h/KN7frYnrC0PPsr0SEvBNEJlZy/VGa2KoR+C9XxHvFr4SNGqIsGaIQmDNIMLdEa/0R7fOW5LuiOnujt2H4YaKxvMRQjzDEqiCaONee4INJjihgmBpE7roZ1Y/tP2560bL4RRFJXCSLpqgaRLtWCaJcaqBlEV9aOR3WtmK4V07ViulZM14rpWjFdKxb/Au3wJTqhK3o4pqdjexujPwYZc7DxQ7qY6+q0f6EtEvlvLj6dTNsMZuwAAAAASUVOR'+\r\n 'K5CYII=';\r\n {$ENDIF}\r\n {$IFNDEF WEBLIB}\r\n Result := 'TTMSFNCCOLORWHEELPICTURE100';\r\n {$ENDIF}\r\nend;\r\n\r\nfunction GetColorWheelResource125: string;\r\nbegin\r\n Result := 'TTMSFNCCOLORWHEELPICTURE125';\r\nend;\r\n\r\nfunction GetColorWheelResource150: string;\r\nbegin\r\n Result := 'TTMSFNCCOLORWHEELPICTURE150';\r\nend;\r\n\r\nfunction GetColorWheelResource175: string;\r\nbegin\r\n Result := 'TTMSFNCCOLORWHEELPICTURE175';\r\nend;\r\n\r\nfunction GetColorWheelResource200: string;\r\nbegin\r\n Result := 'TTMSFNCCOLORWHEELPICTURE200';\r\nend;\r\n\r\nend.\r\n","{********************************************************************}\r\n{ }\r\n{ written by TMS Software }\r\n{ copyright (c) 2018 }\r\n{ Email : info@tmssoftware.com }\r\n{ Web : http://www.tmssoftware.com }\r\n{ }\r\n{ The source code is given as is. The author is not responsible }\r\n{ for any possible damage done due to the use of this code. }\r\n{ The complete source code remains property of the author and may }\r\n{ not be distributed, published, given or sold in any form as such. }\r\n{ No parts of the source code can be included in any other component }\r\n{ or application without written authorization of the author. }\r\n{********************************************************************}\r\n\r\nunit WEBLib.TMSFNCColorWheel;\r\n\r\n{$I WEBLib.TMSFNCDefines.inc}\r\n\r\n{$IFDEF WEBLIB}\r\n{$DEFINE CMNWEBLIB}\r\n{$DEFINE VCLWEBLIB}\r\n{$ENDIF}\r\n{$IFDEF CMNLIB}\r\n{$DEFINE CMNWEBLIB}\r\n{$ENDIF}\r\n{$IFDEF VCLLIB}\r\n{$DEFINE VCLWEBLIB}\r\n{$ENDIF}\r\n\r\ninterface\r\n\r\nuses\r\n {$IFNDEF LCLLIB}\r\n {$IFNDEF WEBLIB}\r\n UITypes,\r\n {$ENDIF}\r\n {$ENDIF}\r\n {$IFDEF FMXLIB}\r\n WEBLib.StdCtrls,\r\n {$ENDIF}\r\n {$IFDEF CMNLIB}\r\n {$IFDEF WINDOWS}\r\n Messages,\r\n {$ENDIF}\r\n {$IFDEF VCLLIB}\r\n Windows,\r\n {$ENDIF}\r\n {$IFDEF LCLLIB}\r\n LCLIntF, LCLType,\r\n {$ENDIF}\r\n ComCtrls, Controls,\r\n {$ENDIF}\r\n {$IFDEF WEBLIB}\r\n WEBLib.ExtCtrls, WEBLib.Controls, Web,\r\n {$ENDIF}\r\n Classes, Types, WEBLib.Graphics, WEBLib.TMSFNCCustomControl, WEBLib.TMSFNCImage, WEBLib.TMSFNCGraphics,\r\n WEBLib.TMSFNCGraphicsTypes, WEBLib.TMSFNCTypes, WEBLib.TMSFNCEdit, WEBLib.TMSFNCStyles,\r\n WEBLib.TMSFNCUtils;\r\n\r\nconst\r\n MAJ_VER = 1; // Major version nr.\r\n MIN_VER = 0; // Minor version nr.\r\n REL_VER = 1; // Release nr.\r\n BLD_VER = 0; // Build nr.\r\n\r\n //Version history\r\n //v1.0.0.0 : First Release\r\n //v1.0.1.0 : New : Support for high dpi\r\n\r\ntype\r\n {$IFDEF FMXLIB}\r\n TTMSFNCRGBTrackBar = class(TTrackBar)\r\n private\r\n procedure SetLeft(const Value: Single);\r\n procedure SetTop(const Value: Single);\r\n function GetL: Single;\r\n function GetT: Single;\r\n public\r\n constructor Create(AOwner: TComponent); override;\r\n property Left: Single read GetL write SetLeft;\r\n property Top: Single read GetT write SetTop;\r\n end;\r\n {$ENDIF}\r\n\r\n {$IFDEF CMNLIB}\r\n TTMSFNCRGBTrackBar = class(TTrackBar)\r\n {$ENDIF}\r\n {$IFDEF WEBLIB}\r\n TTMSFNCRGBTrackBar = class(TWebTrackBar)\r\n {$ENDIF}\r\n {$IFDEF CMNWEBLIB}\r\n private\r\n {$IFNDEF WEBLIB}\r\n {$IFDEF WINDOWS}\r\n procedure CMParentColorChanged(var Message: TMessage); message CM_PARENTCOLORCHANGED;\r\n {$ENDIF}\r\n {$ENDIF}\r\n procedure SetValue(const Value: Single);\r\n function GetV: Single;\r\n public\r\n constructor Create(AOwner: TComponent); override;\r\n property Value: Single read GetV write SetValue;\r\n end;\r\n {$ENDIF}\r\n\r\n {$IFDEF CMNLIB}\r\n PRGBTripleArray = ^TRGBTripleArray;\r\n TRGBTripleArray = array[0..4095] of TRGBTriple;\r\n {$ENDIF}\r\n\r\n TTMSFNCImageColor = class(TTMSFNCImage)\r\n private\r\n FDPIChanged: Boolean;\r\n FMouseDown, FImageLoaded: Boolean;\r\n FPixelColor: TTMSFNCGraphicsColor;\r\n FOnColorChanged: TNotifyEvent;\r\n FX: Single;\r\n FY: Single;\r\n {$IFDEF FMXLIB}\r\n FBmpDt: TBitmapData;\r\n {$ENDIF}\r\n {$IFDEF WEBLIB}\r\n FImgDt: TJSImageData;\r\n FOffS: Integer;\r\n Fsc: Single;\r\n {$ENDIF}\r\n {$IFDEF CMNLIB}\r\n FBmp: TBitmap;\r\n FPixels: PRGBTripleArray;\r\n FRX: Integer;\r\n {$ENDIF}\r\n procedure SetPixelColor(const Value: TTMSFNCGraphicsColor);\r\n procedure SetX(const Value: Single);\r\n procedure SetY(const Value: Single);\r\n procedure SetCoordinates(AX, AY: Single);\r\n function PtInColorWheel(X, Y: Single): Boolean;\r\n protected\r\n procedure DoAfterDraw(AGraphics: TTMSFNCGraphics; ARect: TRectF); override;\r\n procedure ChangeDPIScale(M, D: Integer); override;\r\n procedure ColorChanged;\r\n procedure BitmapLoaded(Sender: TObject);\r\n procedure HandleMouseDown({%H-}Button: TTMSFNCMouseButton; {%H-}Shift: TShiftState; {%H-}X, {%H-}Y: Single); override;\r\n procedure HandleMouseMove({%H-}Shift: TShiftState; {%H-}X, {%H-}Y: Single); override;\r\n procedure HandleMouseUp({%H-}Button: TTMSFNCMouseButton; {%H-}Shift: TShiftState; {%H-}X, {%H-}Y: Single); override;\r\n function GetDPIScale: Single;\r\n public\r\n constructor Create(AOwner: TComponent); override;\r\n destructor Destroy; override;\r\n procedure Draw(AGraphics: TTMSFNCGraphics; ARect: TRectF); override;\r\n procedure MapPixels;\r\n procedure UnmapPixels;\r\n function XYToColor(X, Y: Single): TTMSFNCGraphicsColor;\r\n function GetCenterPoint: TPointF;\r\n function GetRadius: Single;\r\n property X: Single read FX write SetX;\r\n property Y: Single read FY write SetY;\r\n property PixelColor: TTMSFNCGraphicsColor read FPixelColor write SetPixelColor default gcWhite;\r\n property OnColorChanged: TNotifyEvent read FOnColorChanged write FOnColorChanged;\r\n end;\r\n\r\n TTMSFNCColorWheelHSColor = record\r\n Hue: Double;\r\n Saturation: Double;\r\n end;\r\n\r\n TTMSFNCCustomColorWheelBeforeDrawSelectedColorPanelEvent = procedure(Sender: TObject; AGraphics: TTMSFNCGraphics; ARectF: TRectF; ASelectedColor: TTMSFNCGraphicsColor; var AAllow: Boolean; var ADefaultDraw: Boolean) of object;\r\n TTMSFNCCustomColorWheelAfterDrawSelectedColorPanelEvent = procedure(Sender: TObject; AGraphics: TTMSFNCGraphics; ARectF: TRectF; ASelectedColor: TTMSFNCGraphicsColor) of object;\r\n TTMSFNCCustomColorWheelSelectedColorChangedEvent = procedure(Sender: TObject; ASelectedColor: TTMSFNCGraphicsColor) of object;\r\n TTMSFNCCustomColorWheelRValueChangedEvent = procedure(Sender: TObject; AR: Integer; ASelectedColor: TTMSFNCGraphicsColor) of object;\r\n TTMSFNCCustomColorWheelGValueChangedEvent = procedure(Sender: TObject; AG: Integer; ASelectedColor: TTMSFNCGraphicsColor) of object;\r\n TTMSFNCCustomColorWheelBValueChangedEvent = procedure(Sender: TObject; AB: Integer; ASelectedColor: TTMSFNCGraphicsColor) of object;\r\n\r\n TTMSFNCCustomColorWheel = class(TTMSFNCCustomControl)\r\n private\r\n FImage: TTMSFNCImageColor;\r\n FREdit: TTMSFNCEdit;\r\n FGEdit: TTMSFNCEdit;\r\n FBEdit: TTMSFNCEdit;\r\n FHEXEdit: TTMSFNCEdit;\r\n FRTrackBar: TTMSFNCRGBTrackBar;\r\n FGTrackBar: TTMSFNCRGBTrackBar;\r\n FBTrackBar: TTMSFNCRGBTrackBar;\r\n FSelectedColor: TTMSFNCGraphicsColor;\r\n FGValue: Integer;\r\n FRValue: Integer;\r\n FBValue: Integer;\r\n FHSColor: TTMSFNCColorWheelHSColor;\r\n FOnBValueChanged: TTMSFNCCustomColorWheelBValueChangedEvent;\r\n FOnGValueChanged: TTMSFNCCustomColorWheelGValueChangedEvent;\r\n FOnAfterDrawSelectedColorPanel: TTMSFNCCustomColorWheelAfterDrawSelectedColorPanelEvent;\r\n FOnSelectedColorChanged: TTMSFNCCustomColorWheelSelectedColorChangedEvent;\r\n FOnRValueChanged: TTMSFNCCustomColorWheelRValueChangedEvent;\r\n FOnBeforeDrawSelectedColorPanel: TTMSFNCCustomColorWheelBeforeDrawSelectedColorPanelEvent;\r\n FFont: TTMSFNCGraphicsFont;\r\n procedure SetSelectedColor(const Value: TTMSFNCGraphicsColor);\r\n procedure SetBValue(const Value: Integer);\r\n procedure SetGValue(const Value: Integer);\r\n procedure SetRValue(const Value: Integer);\r\n procedure SetHEXValue(const Value: string);\r\n function GetHEXValue: string;\r\n function IsHEXValueStored: Boolean;\r\n procedure SetFnt(const Value: TTMSFNCGraphicsFont);\r\n protected\r\n procedure Loaded; override;\r\n procedure ChangeDPIScale(M, D: Integer); override;\r\n procedure Draw({%H-}AGraphics: TTMSFNCGraphics; {%H-}ARect: TRectF); override;\r\n procedure DrawColorPanel({%H-}AGraphics: TTMSFNCGraphics; {%H-}ARect: TRectF);\r\n procedure DrawText({%H-}AGraphics: TTMSFNCGraphics; {%H-}ARect: TRectF);\r\n {$IFDEF FMXLIB}\r\n procedure RFieldKeyDown(Sender: TObject; var Key: Word; var KeyChar: WideChar; Shift: TShiftState);\r\n procedure GFieldKeyDown(Sender: TObject; var Key: Word; var KeyChar: WideChar; Shift: TShiftState);\r\n procedure BFieldKeyDown(Sender: TObject; var Key: Word; var KeyChar: WideChar; Shift: TShiftState);\r\n procedure HEXFieldKeyDown(Sender: TObject; var Key: Word; var KeyChar: WideChar; Shift: TShiftState);\r\n {$ENDIF}\r\n {$IFDEF CMNWEBLIB}\r\n procedure RFieldKeyDown(Sender: TObject; var Key: Word; {%H-}Shift: TShiftState);\r\n procedure GFieldKeyDown(Sender: TObject; var Key: Word; {%H-}Shift: TShiftState);\r\n procedure BFieldKeyDown(Sender: TObject; var Key: Word; {%H-}Shift: TShiftState);\r\n procedure HEXFieldKeyDown(Sender: TObject; var Key: Word; {%H-}Shift: TShiftState);\r\n {$ENDIF}\r\n procedure DoBeforeDrawSelectedColorPanel(AGraphics: TTMSFNCGraphics; ARectF: TRectF; ASelectedColor: TTMSFNCGraphicsColor; var AAllow: Boolean; var ADefaultDraw: Boolean); virtual;\r\n procedure DoAfterDrawSelectedColorPanel(AGraphics: TTMSFNCGraphics; ARectF: TRectF; ASelectedColor: TTMSFNCGraphicsColor); virtual;\r\n procedure DoSelectedColorChanged(ASelectedColor: TTMSFNCGraphicsColor); virtual;\r\n procedure DoRValueChanged(AR: Integer; ASelectedColor: TTMSFNCGraphicsColor); virtual;\r\n procedure DoGValueChanged(AG: Integer; ASelectedColor: TTMSFNCGraphicsColor); virtual;\r\n procedure DoBValueChanged(AB: Integer; ASelectedColor: TTMSFNCGraphicsColor); virtual;\r\n procedure ColorChanged(Sender: TObject);\r\n procedure RTrackBarChanged(Sender: TObject);\r\n procedure GTrackBarChanged(Sender: TObject);\r\n procedure BTrackBarChanged(Sender: TObject);\r\n procedure FillColorChanged(Sender: TObject);\r\n procedure ApplyStyle; override;\r\n procedure ResetToDefaultStyle; override;\r\n procedure UpdateControlAfterResize; override;\r\n procedure SetIndicator;\r\n function GetVersion: string; override;\r\n function RGBToHS(AR, AG, AB: Integer): TTMSFNCColorWheelHSColor;\r\n property Font: TTMSFNCGraphicsFont read FFont write SetFnt;\r\n property SelectedColor: TTMSFNCGraphicsColor read FSelectedColor write SetSelectedColor default gcWhite;\r\n property RValue: Integer read FRValue write SetRValue default 255;\r\n property BValue: Integer read FBValue write SetBValue default 255;\r\n property GValue: Integer read FGValue write SetGValue default 255;\r\n property HEXValue: string read GetHEXValue write SetHEXValue stored IsHEXValueStored nodefault;\r\n property OnBeforeDrawSelectedColorPanel: TTMSFNCCustomColorWheelBeforeDrawSelectedColorPanelEvent read FOnBeforeDrawSelectedColorPanel write FOnBeforeDrawSelectedColorPanel;\r\n property OnAfterDrawSelectedColorPanel: TTMSFNCCustomColorWheelAfterDrawSelectedColorPanelEvent read FOnAfterDrawSelectedColorPanel write FOnAfterDrawSelectedColorPanel;\r\n property OnSelectedColorChanged: TTMSFNCCustomColorWheelSelectedColorChangedEvent read FOnSelectedColorChanged write FOnSelectedColorChanged;\r\n property OnRValueChanged: TTMSFNCCustomColorWheelRValueChangedEvent read FOnRValueChanged write FOnRValueChanged;\r\n property OnGValueChanged: TTMSFNCCustomColorWheelGValueChangedEvent read FOnGValueChanged write FOnGValueChanged;\r\n property OnBValueChanged: TTMSFNCCustomColorWheelBValueChangedEvent read FOnBValueChanged write FOnBValueChanged;\r\n public\r\n constructor Create(AOwner: TComponent); override;\r\n destructor Destroy; override;\r\n function ColorToRValue(AColor: TTMSFNCGraphicsColor): Integer;\r\n function ColorToGValue(AColor: TTMSFNCGraphicsColor): Integer;\r\n function ColorToBValue(AColor: TTMSFNCGraphicsColor): Integer;\r\n function RGBToGraphicsColor(R, G, B: Integer): TTMSFNCGraphicsColor;\r\n end;\r\n\r\n {$IFNDEF LCLLIB}\r\n [ComponentPlatformsAttribute(TMSPlatformsWeb)]\r\n {$ENDIF}\r\n TTMSFNCColorWheel = class(TTMSFNCCustomColorWheel)\r\n published\r\n property Font;\r\n property Fill;\r\n property Stroke;\r\n property SelectedColor;\r\n property RValue;\r\n property BValue;\r\n property GValue;\r\n property HEXValue;\r\n property OnBeforeDrawSelectedColorPanel;\r\n property OnAfterDrawSelectedColorPanel;\r\n property OnSelectedColorChanged;\r\n property OnRValueChanged;\r\n property OnGValueChanged;\r\n property OnBValueChanged;\r\n end;\r\n\r\nimplementation\r\n\r\nuses\r\n Math, SysUtils, WEBLib.TMSFNCColorWheelResources;\r\n\r\n{$R TMSFNCColorWheel.res}\r\n\r\n{ TTMSFNCCustomColorWheel }\r\n\r\nfunction TTMSFNCCustomColorWheel.ColorToBValue(\r\n AColor: TTMSFNCGraphicsColor): Integer;\r\nbegin\r\n {$IFDEF FMXLIB}\r\n Result := AColor and $000000FF;\r\n {$ELSE}\r\n Result := AColor and $00FF0000 shr 16;\r\n {$ENDIF}\r\nend;\r\n\r\nfunction TTMSFNCCustomColorWheel.ColorToGValue(\r\n AColor: TTMSFNCGraphicsColor): Integer;\r\nbegin\r\n Result := AColor and $0000FF00 shr 8;\r\nend;\r\n\r\nfunction TTMSFNCCustomColorWheel.ColorToRValue(\r\n AColor: TTMSFNCGraphicsColor): Integer;\r\nbegin\r\n {$IFDEF FMXLIB}\r\n Result := AColor and $00FF0000 shr 16;\r\n {$ELSE}\r\n Result := AColor and $000000FF;\r\n {$ENDIF}\r\nend;\r\n\r\nconstructor TTMSFNCCustomColorWheel.Create(AOwner: TComponent);\r\nbegin\r\n inherited;\r\n Width := 350;\r\n Height := 175;\r\n FRValue := 255;\r\n FGValue := 255;\r\n FBValue := 255;\r\n FSelectedColor := gcWhite;\r\n Fill.OnChanged := @FillColorChanged;\r\n\r\n FFont := TTMSFNCGraphicsFont.Create;\r\n\r\n FImage := TTMSFNCImageColor.Create(Self);\r\n FImage.Parent := Self;\r\n {$IFDEF FMXLIB}\r\n FImage.Stored := False;\r\n {$ENDIF}\r\n FImage.Bitmaps.AddBitmapFromResource(GetColorWheelResource, HInstance, 1.0);\r\n {$IFNDEF WEBLIB}\r\n FImage.Bitmaps.AddBitmapFromResource(GetColorWheelResource125, HInstance, 1.25);\r\n FImage.Bitmaps.AddBitmapFromResource(GetColorWheelResource150, HInstance, 1.5);\r\n FImage.Bitmaps.AddBitmapFromResource(GetColorWheelResource175, HInstance, 1.75);\r\n FImage.Bitmaps.AddBitmapFromResource(GetColorWheelResource200, HInstance, 2);\r\n {$ENDIF}\r\n FImage.Top := Round((Height / 2) - (FImage.Height / 2));\r\n FImage.Left := 10;\r\n FImage.OnColorChanged := ColorChanged;\r\n FImage.Stretch := True;\r\n\r\n FREdit := TTMSFNCEdit.Create(Self);\r\n FREdit.Parent := Self;\r\n FREdit.Width := 35;\r\n {$IFDEF FMXLIB}\r\n FREdit.Stored := False;\r\n FREdit.Position.X := Width - FREdit.Width - 15;\r\n FREdit.Position.Y := {$IFDEF FMXMOBILE} 10 {$ELSE} 15 {$ENDIF};\r\n {$ELSE}\r\n FREdit.Left := Width - FREdit.Width - 15;\r\n FREdit.Top := 15;\r\n {$ENDIF}\r\n FREdit.EditType := etNumeric;\r\n FREdit.OnKeyDown := @RFieldKeyDown;\r\n FREdit.MaxLength := 3;\r\n FREdit.Text := '255';\r\n\r\n FGEdit := TTMSFNCEdit.Create(Self);\r\n FGEdit.Parent := Self;\r\n FGEdit.Width := 35;\r\n {$IFDEF FMXLIB}\r\n FGEdit.Stored := False;\r\n FGEdit.Position.X := Width - FGEdit.Width - 15;\r\n FGEdit.Position.Y := {$IFDEF FMXMOBILE} 40 {$ELSE} 45 {$ENDIF};\r\n {$ELSE}\r\n FGEdit.Left := Width - FGEdit.Width - 15;\r\n FGEdit.Top := 45;\r\n {$ENDIF}\r\n FGEdit.EditType := etNumeric;\r\n FGEdit.OnKeyDown := @GFieldKeyDown;\r\n FGEdit.MaxLength := 3;\r\n FGEdit.Text := '255';\r\n\r\n FBEdit := TTMSFNCEdit.Create(Self);\r\n FBEdit.Parent := Self;\r\n FBEdit.Width := 35;\r\n {$IFDEF FMXLIB}\r\n FBEdit.Stored := False;\r\n FBEdit.Position.X := Width - FBEdit.Width - 15;\r\n FBEdit.Position.Y := {$IFDEF FMXMOBILE} 70 {$ELSE} 75 {$ENDIF};\r\n {$ELSE}\r\n FBEdit.Left := Width - FBEdit.Width - 15;\r\n FBEdit.Top := 75;\r\n {$ENDIF}\r\n FBEdit.EditType := etNumeric;\r\n FBEdit.OnKeyDown := @BFieldKeyDown;\r\n FBEdit.MaxLength := 3;\r\n FBEdit.Text := '255';\r\n\r\n FHEXEdit := TTMSFNCEdit.Create(Self);\r\n FHEXEdit.Parent := Self;\r\n FHEXEdit.Width := {$IFDEF FMXMOBILE} 105 {$ELSE} 125 {$ENDIF};\r\n {$IFDEF FMXLIB}\r\n FHEXEdit.Stored := False;\r\n FHEXEdit.Position.X := {$IFDEF FMXMOBILE} 230 {$ELSE} 210 {$ENDIF};\r\n FHEXEdit.Position.Y := {$IFDEF FMXMOBILE} 100 {$ELSE} 105 {$ENDIF};\r\n {$ELSE}\r\n FHEXEdit.Left := 210;\r\n FHEXEdit.Top := 105;\r\n {$ENDIF}\r\n FHEXEdit.EditType := etHex;\r\n FHEXEdit.OnKeyDown := @HEXFieldKeyDown;\r\n FHEXEdit.MaxLength := 6;\r\n FHEXEdit.Text := 'FFFFFF';\r\n\r\n FRTrackBar := TTMSFNCRGBTrackBar.Create(Self);\r\n FRTrackBar.Parent := Self;\r\n FRTrackBar.Left := 195;\r\n FRTrackBar.Top := {$IFDEF FMXLIB}{$IFNDEF IOS}FREdit.Position.Y + 1{$ENDIF}{$IFDEF IOS}FREdit.Position.Y - 3{$ENDIF}{$ELSE}FREdit.Top - 1{$ENDIF};\r\n FRTrackBar.Value := 255;\r\n FRTrackBar.OnChange := @RTrackBarChanged;\r\n {$IFDEF FMXLIB}\r\n FRTrackBar.Stored := False;\r\n {$ENDIF}\r\n\r\n FGTrackBar := TTMSFNCRGBTrackBar.Create(Self);\r\n FGTrackBar.Parent := Self;\r\n FGTrackBar.Left := 195;\r\n FGTrackBar.Top := {$IFDEF FMXLIB}{$IFNDEF IOS}FGEdit.Position.Y + 1{$ENDIF}{$IFDEF IOS}FGEdit.Position.Y - 3{$ENDIF}{$ELSE}FGEdit.Top - 1{$ENDIF};\r\n FGTrackBar.Value := 255;\r\n FGTrackBar.OnChange := @GTrackBarChanged;\r\n {$IFDEF FMXLIB}\r\n FGTrackBar.Stored := False;\r\n {$ENDIF}\r\n\r\n FBTrackBar := TTMSFNCRGBTrackBar.Create(Self);\r\n FBTrackBar.Parent := Self;\r\n FBTrackBar.Left := 195;\r\n FBTrackBar.Top := {$IFDEF FMXLIB}{$IFNDEF IOS}FBEdit.Position.Y + 1{$ENDIF}{$IFDEF IOS}FBEdit.Position.Y - 3{$ENDIF}{$ELSE}FBEdit.Top - 1{$ENDIF};\r\n FBTrackBar.Value := 255;\r\n FBTrackBar.OnChange := @BTrackBarChanged;\r\n {$IFDEF FMXLIB}\r\n FBTrackBar.Stored := False;\r\n {$ENDIF}\r\nend;\r\n\r\nprocedure TTMSFNCCustomColorWheel.ApplyStyle;\r\nvar\r\n c: TTMSFNCGraphicsColor;\r\nbegin\r\n inherited;\r\n c := gcNull;\r\n if TTMSFNCStyles.GetStyleBackgroundFillColor(c) then\r\n Fill.Color := c;\r\nend;\r\n\r\nprocedure TTMSFNCCustomColorWheel.BTrackBarChanged(Sender: TObject);\r\nbegin\r\n BValue := Round(FBTrackBar.Value);\r\nend;\r\n\r\nprocedure TTMSFNCCustomColorWheel.ChangeDPIScale(M, D: Integer);\r\nbegin\r\n inherited;\r\n Font.Height := TTMSFNCUtils.MulDivInt(Font.Height, M, D);\r\n SetIndicator;\r\nend;\r\n\r\nprocedure TTMSFNCCustomColorWheel.ColorChanged(Sender: TObject);\r\nbegin\r\n SelectedColor := FImage.PixelColor;\r\nend;\r\n\r\ndestructor TTMSFNCCustomColorWheel.Destroy;\r\nbegin\r\n FImage.Free;\r\n FREdit.Free;\r\n FGEdit.Free;\r\n FBEdit.Free;\r\n FRTrackBar.Free;\r\n FGTrackBar.Free;\r\n FBTrackBar.Free;\r\n FFont.Free;\r\n inherited;\r\nend;\r\n\r\nprocedure TTMSFNCCustomColorWheel.DoAfterDrawSelectedColorPanel(\r\n AGraphics: TTMSFNCGraphics; ARectF: TRectF;\r\n ASelectedColor: TTMSFNCGraphicsColor);\r\nbegin\r\n if Assigned(OnAfterDrawSelectedColorPanel) then\r\n OnAfterDrawSelectedColorPanel(Self, AGraphics, ARectF, ASelectedColor);\r\nend;\r\n\r\nprocedure TTMSFNCCustomColorWheel.DoBeforeDrawSelectedColorPanel(\r\n AGraphics: TTMSFNCGraphics; ARectF: TRectF;\r\n ASelectedColor: TTMSFNCGraphicsColor; var AAllow, ADefaultDraw: Boolean);\r\nbegin\r\n if Assigned(OnBeforeDrawSelectedColorPanel) then\r\n OnBeforeDrawSelectedColorPanel(Self, AGraphics, ARectF, ASelectedColor, AAllow, ADefaultDraw);\r\nend;\r\n\r\nprocedure TTMSFNCCustomColorWheel.DoBValueChanged(AB: Integer;\r\n ASelectedColor: TTMSFNCGraphicsColor);\r\nbegin\r\n if Assigned(OnBValueChanged) then\r\n OnBValueChanged(Self, AB, ASelectedColor);\r\nend;\r\n\r\nprocedure TTMSFNCCustomColorWheel.DoGValueChanged(AG: Integer;\r\n ASelectedColor: TTMSFNCGraphicsColor);\r\nbegin\r\n if Assigned(OnGValueChanged) then\r\n OnGValueChanged(Self, AG, ASelectedColor);\r\nend;\r\n\r\nprocedure TTMSFNCCustomColorWheel.DoRValueChanged(AR: Integer;\r\n ASelectedColor: TTMSFNCGraphicsColor);\r\nbegin\r\n if Assigned(OnRValueChanged) then\r\n OnRValueChanged(Self, AR, ASelectedColor);\r\nend;\r\n\r\nprocedure TTMSFNCCustomColorWheel.DoSelectedColorChanged(\r\n ASelectedColor: TTMSFNCGraphicsColor);\r\nbegin\r\n if Assigned(OnSelectedColorChanged) then\r\n OnSelectedColorChanged(Self, ASelectedColor);\r\nend;\r\n\r\nprocedure TTMSFNCCustomColorWheel.Draw(AGraphics: TTMSFNCGraphics;\r\n ARect: TRectF);\r\nbegin\r\n inherited;\r\n DrawColorPanel(AGraphics, ARect);\r\n DrawText(AGraphics, ARect);\r\nend;\r\n\r\nprocedure TTMSFNCCustomColorWheel.DrawColorPanel(AGraphics: TTMSFNCGraphics;\r\n ARect: TRectF);\r\nvar\r\n r: TRectF;\r\n b, df: Boolean;\r\n h: Single;\r\nbegin\r\n {$IFDEF FMXLIB}\r\n h := 135;\r\n {$ENDIF}\r\n {$IFDEF VCLLIB}\r\n h := ScalePaintValue(13) + FHEXEdit.Top + FHEXEdit.Height;\r\n {$ENDIF}\r\n {$IFDEF LCLLIB}\r\n h := 45 + FREdit.Height + FBEdit.Height + FGEdit.Height + FHEXEdit.Height;\r\n {$ENDIF}\r\n {$IFDEF WEBLIB}\r\n h := 35 + FREdit.Height + FBEdit.Height + FGEdit.Height + FHEXEdit.Height;\r\n {$ENDIF}\r\n r := RectF(0, 0, ScalePaintValue(25), ScalePaintValue(25));\r\n OffsetRectEx(r, ScalePaintValue(30) + FImage.Width, h);\r\n {$IFDEF FMXLIB}\r\n r.Right := FREdit.Position.X + FREdit.Width;\r\n {$ELSE}\r\n r.Right := FREdit.Left + FREdit.Width;\r\n {$ENDIF}\r\n\r\n AGraphics.Fill.Color := SelectedColor;\r\n\r\n b := True;\r\n df := True;\r\n DoBeforeDrawSelectedColorPanel(AGraphics, r, FSelectedColor, b, df);\r\n if b then\r\n begin\r\n if df then\r\n AGraphics.DrawRectangle(r);\r\n\r\n DoAfterDrawSelectedColorPanel(AGraphics, r, FSelectedColor);\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomColorWheel.DrawText(AGraphics: TTMSFNCGraphics;\r\n ARect: TRectF);\r\nbegin\r\n AGraphics.Font.AssignSource(Font);\r\n {$IFDEF FMXLIB}\r\n {$IFDEF FMXMOBILE}\r\n AGraphics.Font.Size := 20;\r\n AGraphics.DrawText(PointF(30 + FImage.Width, FREdit.Position.Y + 5), 'R');\r\n AGraphics.DrawText(PointF(30 + FImage.Width, FGEdit.Position.Y + 5), 'G');\r\n AGraphics.DrawText(PointF(30 + FImage.Width, FBEdit.Position.Y + 5), 'B');\r\n AGraphics.DrawText(PointF(30 + FImage.Width, FHEXEdit.Position.Y + 5), 'HEX');\r\n {$ENDIF}\r\n {$IFNDEF FMXMOBILE}\r\n AGraphics.DrawText(PointF(30 + FImage.Width, FREdit.Position.Y + 3), 'R');\r\n AGraphics.DrawText(PointF(30 + FImage.Width, FGEdit.Position.Y + 3), 'G');\r\n AGraphics.DrawText(PointF(30 + FImage.Width, FBEdit.Position.Y + 3), 'B');\r\n AGraphics.DrawText(PointF(30 + FImage.Width, FHEXEdit.Position.Y + 3), 'HEX');\r\n {$ENDIF}\r\n {$ENDIF}\r\n {$IFNDEF FMXLIB}\r\n {$IFDEF WEBLIB}\r\n AGraphics.DrawText(PointF(30 + FImage.Width, FREdit.Top + 7), 'R');\r\n AGraphics.DrawText(PointF(30 + FImage.Width, FGEdit.Top + 7), 'G');\r\n AGraphics.DrawText(PointF(30 + FImage.Width, FBEdit.Top + 7), 'B');\r\n AGraphics.DrawText(PointF(30 + FImage.Width, FHEXEdit.Top + 7), 'HEX');\r\n {$ENDIF}\r\n {$IFNDEF WEBLIB}\r\n AGraphics.DrawText(PointF(ScalePaintValue(30) + FImage.Width, FREdit.Top + 3), 'R');\r\n AGraphics.DrawText(PointF(ScalePaintValue(30) + FImage.Width, FGEdit.Top + 3), 'G');\r\n AGraphics.DrawText(PointF(ScalePaintValue(30) + FImage.Width, FBEdit.Top + 3), 'B');\r\n AGraphics.DrawText(PointF(ScalePaintValue(30) + FImage.Width, FHEXEdit.Top + 3), 'HEX');\r\n {$ENDIF}\r\n {$ENDIF}\r\nend;\r\n\r\nprocedure TTMSFNCCustomColorWheel.FillColorChanged(Sender: TObject);\r\nbegin\r\n FillChanged(Self);\r\n {$IFDEF CMNWEBLIB}\r\n FImage.Fill.Color := Color;\r\n {$ENDIF}\r\nend;\r\n\r\nfunction TTMSFNCCustomColorWheel.GetHEXValue: string;\r\nbegin\r\n Result := FHEXEdit.Text;\r\nend;\r\n\r\nfunction TTMSFNCCustomColorWheel.GetVersion: string;\r\nbegin\r\n Result := GetVersionNumber(MAJ_VER, MIN_VER, REL_VER, BLD_VER);\r\nend;\r\n\r\nprocedure TTMSFNCCustomColorWheel.GTrackBarChanged(Sender: TObject);\r\nbegin\r\n GValue := Round(FGTrackBar.Value);\r\nend;\r\n\r\nfunction TTMSFNCCustomColorWheel.IsHEXValueStored: Boolean;\r\nbegin\r\n Result := GetHEXValue <> 'FFFFFF';\r\nend;\r\n\r\nprocedure TTMSFNCCustomColorWheel.Loaded;\r\nbegin\r\n inherited;\r\n {$IFDEF VCLLIB}\r\n {$HINTS OFF}\r\n {$IF (COMPILERVERSION >= 33) AND (COMPILERVERSION < 36)}\r\n FImage.ScaleForPPI(CurrentPPI);\r\n FREdit.ScaleForPPI(CurrentPPI);\r\n FGEdit.ScaleForPPI(CurrentPPI);\r\n FBEdit.ScaleForPPI(CurrentPPI);\r\n FHEXEdit.ScaleForPPI(CurrentPPI);\r\n FRTrackBar.ScaleForPPI(CurrentPPI);\r\n FGTrackBar.ScaleForPPI(CurrentPPI);\r\n FBTrackBar.ScaleForPPI(CurrentPPI);\r\n\r\n FREdit.AutoSize := True;\r\n FGEdit.AutoSize := True;\r\n FBEdit.AutoSize := True;\r\n FHEXEdit.AutoSize := True;\r\n {$IFEND}\r\n {$HINTS ON}\r\n {$ENDIF}\r\nend;\r\n\r\nprocedure TTMSFNCCustomColorWheel.ResetToDefaultStyle;\r\nbegin\r\n inherited;\r\n Fill.Color := gcWhite;\r\nend;\r\n\r\nfunction TTMSFNCCustomColorWheel.RGBToGraphicsColor(R, G,\r\n B: Integer): TTMSFNCGraphicsColor;\r\n{$IFDEF FMXLIB}\r\nvar\r\n col: TAlphaColorRec;\r\n{$ENDIF}\r\nbegin\r\n {$IFDEF FMXLIB}\r\n col.R := R;\r\n col.G := G;\r\n col.B := B;\r\n col.A := 255;\r\n Result := col.Color;\r\n {$ELSE}\r\n Result := RGB(R, G, B);\r\n {$ENDIF}\r\nend;\r\n\r\nfunction TTMSFNCCustomColorWheel.RGBToHS(AR, AG,\r\n AB: Integer): TTMSFNCColorWheelHSColor;\r\nvar\r\n minRGB, maxRGB, delta, h, s: Double;\r\nbegin\r\n h := 0.0;\r\n maxRGB := Max(Max(AR, AG), AB);\r\n minRGB := Min(Min(AR, AG), AB);\r\n delta := maxRGB - minRGB;\r\n\r\n if maxRGB = 0 then\r\n s := 0.0\r\n else\r\n s := delta / maxRGB;\r\n\r\n if delta = 0 then\r\n h := 0.0\r\n else if maxRGB = AR then\r\n h := (AG - AB) / delta\r\n else if maxRGB = AG then\r\n h := (AB - AR) / delta + 2\r\n else if maxRGB = AB then\r\n h := (AR - AG) / delta + 4;\r\n\r\n h := 60 * h;\r\n\r\n with Result do\r\n begin\r\n Hue := h;\r\n Saturation := s;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomColorWheel.RTrackBarChanged(Sender: TObject);\r\nbegin\r\n RValue := Round(FRTrackBar.Value);\r\nend;\r\n\r\n{$IFDEF FMXLIB}\r\nprocedure TTMSFNCCustomColorWheel.RFieldKeyDown(Sender: TObject; var Key: Word; var KeyChar: WideChar; Shift: TShiftState);\r\n{$ENDIF}\r\n{$IFDEF CMNWEBLIB}\r\nprocedure TTMSFNCCustomColorWheel.RFieldKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);\r\n{$ENDIF}\r\nvar\r\n v: Integer;\r\nbegin\r\n if Key = KEY_RETURN then\r\n begin\r\n v := FREdit.IntValue;\r\n if v < 0 then\r\n v := 0\r\n else if v > 255 then\r\n v := 255;\r\n\r\n if v = RValue then\r\n begin\r\n FREdit.Text := IntToStr(v);\r\n end\r\n else\r\n begin\r\n SelectedColor := RGBToGraphicsColor(v, FGValue, FBValue);\r\n FHSColor := RGBToHS(v, FGValue, FBValue);\r\n SetIndicator;\r\n end;\r\n end;\r\nend;\r\n\r\n{$IFDEF FMXLIB}\r\nprocedure TTMSFNCCustomColorWheel.GFieldKeyDown(Sender: TObject; var Key: Word; var KeyChar: WideChar; Shift: TShiftState);\r\n{$ENDIF}\r\n{$IFDEF CMNWEBLIB}\r\nprocedure TTMSFNCCustomColorWheel.GFieldKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);\r\n{$ENDIF}\r\nvar\r\n v: Integer;\r\nbegin\r\n if Key = KEY_RETURN then\r\n begin\r\n v := FGEdit.IntValue;\r\n if v < 0 then\r\n v := 0\r\n else if v > 255 then\r\n v := 255;\r\n\r\n if v = GValue then\r\n begin\r\n FGEdit.Text := IntToStr(v);\r\n end\r\n else\r\n begin\r\n SelectedColor := RGBToGraphicsColor(FRValue, v, FBValue);\r\n FHSColor := RGBToHS(FRValue, v, FBValue);\r\n SetIndicator;\r\n end;\r\n end;\r\nend;\r\n\r\n{$IFDEF FMXLIB}\r\nprocedure TTMSFNCCustomColorWheel.BFieldKeyDown(Sender: TObject; var Key: Word; var KeyChar: WideChar; Shift: TShiftState);\r\n{$ENDIF}\r\n{$IFDEF CMNWEBLIB}\r\nprocedure TTMSFNCCustomColorWheel.BFieldKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);\r\n{$ENDIF}\r\nvar\r\n v: Integer;\r\nbegin\r\n if Key = KEY_RETURN then\r\n begin\r\n v := FBEdit.IntValue;\r\n if v < 0 then\r\n v := 0\r\n else if v > 255 then\r\n v := 255;\r\n\r\n if v = BValue then\r\n begin\r\n FBEdit.Text := IntToStr(v);\r\n end\r\n else\r\n begin\r\n SelectedColor := RGBToGraphicsColor(FRValue, FGValue, v);\r\n FHSColor := RGBToHS(FRValue, FGValue, v);\r\n SetIndicator;\r\n end;\r\n end;\r\nend;\r\n\r\n{$IFDEF FMXLIB}\r\nprocedure TTMSFNCCustomColorWheel.HEXFieldKeyDown(Sender: TObject; var Key: Word; var KeyChar: WideChar; Shift: TShiftState);\r\n{$ENDIF}\r\n{$IFDEF CMNWEBLIB}\r\nprocedure TTMSFNCCustomColorWheel.HEXFieldKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);\r\n{$ENDIF}\r\nvar\r\n str: string;\r\n r, g, b: Integer;\r\nbegin\r\n if (Key = KEY_RETURN) and (Length(FHEXEdit.Text) = 6) then\r\n begin\r\n str := Copy(FHEXEdit.Text, 1, 2);\r\n r := StrToInt('$' + str);\r\n str := Copy(FHEXEdit.Text, 3, 2);\r\n g := StrToInt('$' + str);\r\n str := Copy(FHEXEdit.Text, 5, 2);\r\n b := StrToInt('$' + str);\r\n SelectedColor := RGBToGraphicsColor(r, g, b);\r\n FHSColor := RGBToHS(r, g, b);\r\n SetIndicator;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomColorWheel.SetBValue(const Value: Integer);\r\nbegin\r\n if FBValue <> Value then\r\n begin\r\n FBValue := Value;\r\n FBEdit.Text := IntToStr(Value);\r\n FHEXEdit.Text := IntToHex(FRValue, 2) + IntToHex(FGValue, 2) + IntToHex(FBValue, 2);\r\n FBTrackBar.Value := FBValue;\r\n FSelectedColor := RGBToGraphicsColor(FRValue, FGValue, FBValue);\r\n FHSColor := RGBToHS(FRValue, FGValue, FBValue);\r\n SetIndicator;\r\n DoBValueChanged(FBValue, FSelectedColor);\r\n DoSelectedColorChanged(FSelectedColor);\r\n Invalidate;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomColorWheel.SetFnt(const Value: TTMSFNCGraphicsFont);\r\nbegin\r\n FFont.AssignSource(Value);\r\nend;\r\n\r\nprocedure TTMSFNCCustomColorWheel.SetGValue(const Value: Integer);\r\nbegin\r\n if FGValue <> Value then\r\n begin\r\n FGValue := Value;\r\n FGEdit.Text := IntToStr(Value);\r\n FHEXEdit.Text := IntToHex(FRValue, 2) + IntToHex(FGValue, 2) + IntToHex(FBValue, 2);\r\n FGTrackBar.Value := FGValue;\r\n FSelectedColor := RGBToGraphicsColor(FRValue, FGValue, FBValue);\r\n FHSColor := RGBToHS(FRValue, FGValue, FBValue);\r\n SetIndicator;\r\n DoGValueChanged(FGValue, FSelectedColor);\r\n DoSelectedColorChanged(FSelectedColor);\r\n Invalidate;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomColorWheel.SetHEXValue(const Value: string);\r\nvar\r\n str: string;\r\n r, g, b: Integer;\r\nbegin\r\n if Length(Value) = 6 then\r\n begin\r\n str := Copy(Value, 1, 2);\r\n r := StrToInt('$' + str);\r\n str := Copy(Value, 3, 2);\r\n g := StrToInt('$' + str);\r\n str := Copy(Value, 5, 2);\r\n b := StrToInt('$' + str);\r\n SelectedColor := RGBToGraphicsColor(r, g, b);\r\n FHSColor := RGBToHS(r, g, b);\r\n SetIndicator;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomColorWheel.SetIndicator;\r\nvar\r\n angle, r: Double;\r\n cp: TPointF;\r\nbegin\r\n cp := FImage.GetCenterPoint;\r\n r := FImage.GetRadius - 0.5;\r\n angle := DegToRad(FHSColor.Hue);\r\n FImage.X := cp.X + (r * FHSColor.Saturation) * Cos(angle);\r\n FImage.Y := cp.Y + (r * FHSColor.Saturation) * Sin(angle);\r\n FImage.Invalidate;\r\nend;\r\n\r\nprocedure TTMSFNCCustomColorWheel.SetRValue(const Value: Integer);\r\nbegin\r\n if FRValue <> Value then\r\n begin\r\n FRValue := Value;\r\n FREdit.Text := IntToStr(Value);\r\n FHEXEdit.Text := IntToHex(FRValue, 2) + IntToHex(FGValue, 2) + IntToHex(FBValue, 2);\r\n FRTrackBar.Value := FRValue;\r\n FSelectedColor := RGBToGraphicsColor(FRValue, FGValue, FBValue);\r\n FHSColor := RGBToHS(FRValue, FGValue, FBValue);\r\n SetIndicator;\r\n DoRValueChanged(FRValue, FSelectedColor);\r\n DoSelectedColorChanged(FSelectedColor);\r\n Invalidate;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomColorWheel.SetSelectedColor(\r\n const Value: TTMSFNCGraphicsColor);\r\nbegin\r\n if FSelectedColor <> Value then\r\n begin\r\n FSelectedColor := Value;\r\n FRValue := ColorToRValue(FSelectedColor);\r\n FREdit.Text := IntToStr(FRValue);\r\n FGValue := ColorToGValue(FSelectedColor);\r\n FGEdit.Text := IntToStr(FGValue);\r\n FBValue := ColorToBValue(FSelectedColor);\r\n FBEdit.Text := IntToStr(FBValue);\r\n FHEXEdit.Text := IntToHex(FRValue, 2) + IntToHex(FGValue, 2) + IntToHex(FBValue, 2);\r\n\r\n FRTrackBar.OnChange := nil;\r\n if FRTrackBar.Value <> FRValue then\r\n begin\r\n FRTrackBar.Value := FRValue;\r\n DoRValueChanged(FRValue, FSelectedColor);\r\n end;\r\n FRTrackBar.OnChange := @RTrackBarChanged;\r\n\r\n FGTrackBar.OnChange := nil;\r\n if FGTrackBar.Value <> FGValue then\r\n begin\r\n FGTrackBar.Value := FGValue;\r\n DoGValueChanged(FGValue, FSelectedColor);\r\n end;\r\n FGTrackBar.OnChange := @GTrackBarChanged;\r\n\r\n FBTrackBar.OnChange := nil;\r\n if FBTrackBar.Value <> FBValue then\r\n begin\r\n FBTrackBar.Value := FBValue;\r\n DoBValueChanged(FBValue, FSelectedColor);\r\n end;\r\n FBTrackBar.OnChange := @BTrackBarChanged;\r\n\r\n FHSColor := RGBToHS(FRValue, FGValue, FBValue);\r\n SetIndicator;\r\n\r\n DoSelectedColorChanged(FSelectedColor);\r\n Invalidate;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomColorWheel.UpdateControlAfterResize;\r\nbegin\r\n inherited;\r\n if Assigned(FImage) then\r\n FImage.Top := Round((Height / 2) - (FImage.Height / 2));\r\nend;\r\n\r\n{ TTMSFNCRGBTrackBar }\r\n\r\n{$IFDEF FMXLIB}\r\nconstructor TTMSFNCRGBTrackBar.Create(AOwner: TComponent);\r\nbegin\r\n inherited;\r\n Max := 255;\r\nend;\r\n\r\nfunction TTMSFNCRGBTrackBar.GetL: Single;\r\nbegin\r\n Result := Position.X;\r\nend;\r\n\r\nfunction TTMSFNCRGBTrackBar.GetT: Single;\r\nbegin\r\n Result := Position.Y;\r\nend;\r\n\r\nprocedure TTMSFNCRGBTrackBar.SetLeft(const Value: Single);\r\nbegin\r\n Position.X := Value;\r\nend;\r\n\r\nprocedure TTMSFNCRGBTrackBar.SetTop(const Value: Single);\r\nbegin\r\n Position.Y := Value;\r\nend;\r\n{$ENDIF}\r\n\r\n{$IFDEF CMNWEBLIB}\r\nconstructor TTMSFNCRGBTrackBar.Create(AOwner: TComponent);\r\nbegin\r\n inherited;\r\n {$IFDEF CMNLIB}\r\n TickStyle := tsNone;\r\n Height := 22;\r\n {$ENDIF}\r\n Max := 255;\r\n Width := 100;\r\nend;\r\n\r\n{$IFNDEF WEBLIB}\r\n{$IFDEF WINDOWS}\r\nprocedure TTMSFNCRGBTrackBar.CMParentColorChanged(var Message: TMessage);\r\nbegin\r\n inherited;\r\n Width := Width + 1;\r\n Width := Width - 1;\r\nend;\r\n{$ENDIF}\r\n{$ENDIF}\r\n\r\nfunction TTMSFNCRGBTrackBar.GetV: Single;\r\nbegin\r\n Result := Position;\r\nend;\r\n\r\nprocedure TTMSFNCRGBTrackBar.SetValue(const Value: Single);\r\nbegin\r\n Position := Round(Value);\r\nend;\r\n{$ENDIF}\r\n\r\n{ TTMSFNCImageColor }\r\n\r\nprocedure TTMSFNCImageColor.BitmapLoaded(Sender: TObject);\r\nbegin\r\n FImageLoaded := True;\r\nend;\r\n\r\nprocedure TTMSFNCImageColor.ChangeDPIScale(M, D: Integer);\r\nbegin\r\n inherited;\r\n FDPIChanged := True;\r\nend;\r\n\r\nprocedure TTMSFNCImageColor.ColorChanged;\r\nbegin\r\n if Assigned(OnColorChanged) then\r\n OnColorChanged(Self);\r\nend;\r\n\r\nconstructor TTMSFNCImageColor.Create(AOwner: TComponent);\r\nbegin\r\n inherited;\r\n Width := 150;\r\n Height := 150;\r\n X := Width / 2 * GetDPIScale;\r\n Y := Height / 2 * GetDPIScale;\r\n FImageLoaded := False;\r\n FDPIChanged := False;\r\n Stroke.Kind := gskNone;\r\n {$IFDEF FMXLIB}\r\n Fill.Kind := gfkNone;\r\n {$ENDIF}\r\n\r\n Self.OnBitmapChanged := @BitmapLoaded;\r\nend;\r\n\r\ndestructor TTMSFNCImageColor.Destroy;\r\nbegin\r\n UnmapPixels;\r\n inherited;\r\nend;\r\n\r\nprocedure TTMSFNCImageColor.DoAfterDraw(AGraphics: TTMSFNCGraphics;\r\n ARect: TRectF);\r\nbegin\r\n inherited;\r\n if FDPIChanged then\r\n begin\r\n FDPIChanged := False;\r\n MapPixels;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCImageColor.Draw(AGraphics: TTMSFNCGraphics; ARect: TRectF);\r\nbegin\r\n inherited;\r\n if FImageLoaded then\r\n begin\r\n FImageLoaded := False;\r\n MapPixels;\r\n end;\r\n AGraphics.Stroke.Kind := gskSolid;\r\n AGraphics.Fill.Kind := gfkNone;\r\n AGraphics.Stroke.Color := gcBlack;\r\n AGraphics.DrawEllipse(X - ScalePaintValue(5), Y - ScalePaintValue(5), X + ScalePaintValue(5), Y + ScalePaintValue(5));\r\n AGraphics.Stroke.Color := gcWhite;\r\n AGraphics.DrawEllipse(X - ScalePaintValue(4), Y - ScalePaintValue(4), X + ScalePaintValue(4), Y + ScalePaintValue(4));\r\nend;\r\n\r\nfunction TTMSFNCImageColor.GetCenterPoint: TPointF;\r\nbegin\r\n Result := PointF(Width / 2, Height / 2);\r\nend;\r\n\r\nfunction TTMSFNCImageColor.GetDPIScale: Single;\r\nbegin\r\n Result := PaintScaleFactor;\r\nend;\r\n\r\nfunction TTMSFNCImageColor.GetRadius: Single;\r\nbegin\r\n Result := Width / 2;\r\nend;\r\n\r\nprocedure TTMSFNCImageColor.HandleMouseDown(Button: TTMSFNCMouseButton;\r\n Shift: TShiftState; X, Y: Single);\r\nbegin\r\n inherited;\r\n CaptureEx;\r\n FMouseDown := True;\r\n if PtInColorWheel(X, Y) then\r\n begin\r\n PixelColor := XYToColor(X, Y);\r\n ColorChanged;\r\n Invalidate;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCImageColor.HandleMouseMove(Shift: TShiftState; X, Y: Single);\r\nbegin\r\n inherited;\r\n if FMouseDown then\r\n begin\r\n if PtInColorWheel(X, Y) then\r\n begin\r\n PixelColor := XYToColor(X, Y);\r\n end\r\n else\r\n begin\r\n SetCoordinates(X, Y);\r\n PixelColor := XYToColor(FX, FY);\r\n end;\r\n ColorChanged;\r\n Invalidate;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCImageColor.HandleMouseUp(Button: TTMSFNCMouseButton;\r\n Shift: TShiftState; X, Y: Single);\r\nbegin\r\n inherited;\r\n FMouseDown := False;\r\n ReleaseCaptureEx;\r\nend;\r\n\r\nprocedure TTMSFNCImageColor.MapPixels;\r\nbegin\r\n {$IFDEF FMXLIB}\r\n Bitmaps.Items[0].Bitmap.Map(TMapAccess.Read, FBmpDt);\r\n {$ENDIF}\r\n\r\n {$IFDEF WEBLIB}\r\n if Width <> 0 then\r\n Fsc := Round((Canvas.Element.width / Width) * 100) / 100\r\n else\r\n Fsc := 1.0;\r\n\r\n FImgDt := Canvas.Context.getImageData(0, 0, Round(Width * Fsc), Round(Height * Fsc));\r\n {$ENDIF}\r\n\r\n {$IFDEF CMNLIB}\r\n FBmp := TBitmap.Create;\r\n FBmp.Width := Width;\r\n FBmp.Height := Height;\r\n FBmp.PixelFormat := pf24bit;\r\n FBmp.Canvas.CopyRect(Rect(0, 0, Width, Height), Canvas, Rect(0, 0, Width, Height));\r\n {$ENDIF}\r\nend;\r\n\r\nfunction TTMSFNCImageColor.PtInColorWheel(X, Y: Single): Boolean;\r\nbegin\r\n Result := (Sqr(X - 75 * GetDPIScale) + Sqr(Y - 75 * GetDPIScale)) <= Sqr(74 * GetDPIScale);\r\nend;\r\n\r\nprocedure TTMSFNCImageColor.SetCoordinates(AX, AY: Single);\r\nvar\r\n a, b, angle, r: Single;\r\n cp: TPointF;\r\nbegin\r\n cp := GetCenterPoint;\r\n r := GetRadius - 1 {$IFDEF WEBLIB}* Fsc{$ENDIF};\r\n a := Abs(cp.X - AY);\r\n b := Abs(cp.Y - AX);\r\n if (a = 0) then\r\n a := 1;\r\n\r\n if (b = 0) then\r\n b := 1;\r\n\r\n angle := ArcTan(a / b) * 180 / PI;\r\n\r\n if (AX >= cp.X) and (AY <= cp.Y) then\r\n angle := 360 - angle\r\n else if (AX <= cp.X) and (AY >= cp.Y) then\r\n angle := 180 - angle\r\n else if (AX <= cp.X) and (AY <= cp.Y) then\r\n angle := 180 + angle;\r\n\r\n angle := DegToRad(angle);\r\n FX := (cp.X - 0.5) + r * Cos(angle);\r\n FY := (cp.Y - 0.5) + r * Sin(angle);\r\nend;\r\n\r\nprocedure TTMSFNCImageColor.SetPixelColor(const Value: TTMSFNCGraphicsColor);\r\nbegin\r\n if FPixelColor <> Value then\r\n FPixelColor := Value;\r\nend;\r\n\r\nprocedure TTMSFNCImageColor.SetX(const Value: Single);\r\nbegin\r\n if FX <> Value then\r\n FX := Value;\r\nend;\r\n\r\nprocedure TTMSFNCImageColor.SetY(const Value: Single);\r\nbegin\r\n if FY <> Value then\r\n FY := Value;\r\nend;\r\n\r\nprocedure TTMSFNCImageColor.UnmapPixels;\r\nbegin\r\n {$IFDEF FMXLIB}\r\n Bitmaps.Items[0].Bitmap.Unmap(FBmpDt);\r\n {$ENDIF}\r\n\r\n {$IFDEF CMNLIB}\r\n FBmp.Free;\r\n {$ENDIF}\r\nend;\r\n\r\nfunction TTMSFNCImageColor.XYToColor(X, Y: Single): TTMSFNCGraphicsColor;\r\nbegin\r\n {$IFDEF FMXLIB}\r\n Result := FBmpDt.GetPixel(Round(X), Round(Y))\r\n {$ENDIF}\r\n\r\n {$IFDEF CMNLIB}\r\n FRX := Round(X);\r\n FPixels := FBmp.Scanline[Round(Y)];\r\n {$IFDEF VCLLIB}\r\n Result := RGB(FPixels[FRX].rgbtRed, FPixels[FRX].rgbtGreen, FPixels[FRX].rgbtBlue);\r\n {$ENDIF}\r\n {$IFDEF LCLLIB}\r\n Result := RGB(FPixels^[FRX].rgbtRed, FPixels^[FRX].rgbtGreen, FPixels^[FRX].rgbtBlue);\r\n {$ENDIF}\r\n {$ENDIF}\r\n\r\n {$IFDEF WEBLIB}\r\n FOffS := (Round(X * Fsc) + (Round(Y * Fsc) * Round(Width * Fsc))) * 4;\r\n Result := RGB(FImgDt.data[FOffS + 0], FImgDt.data[FOffS + 1], FImgDt.data[FOffS + 2]);\r\n {$ENDIF}\r\nend;\r\n\r\nend.\r\n","{********************************************************************}\r\n{ }\r\n{ written by TMS Software }\r\n{ copyright (c) 2016 - 2022 }\r\n{ Email : info@tmssoftware.com }\r\n{ Web : https://www.tmssoftware.com }\r\n{ }\r\n{ The source code is given as is. The author is not responsible }\r\n{ for any possible damage done due to the use of this code. }\r\n{ The complete source code remains property of the author and may }\r\n{ not be distributed, published, given or sold in any form as such. }\r\n{ No parts of the source code can be included in any other component }\r\n{ or application without written authorization of the author. }\r\n{********************************************************************}\r\n\r\nunit WEBLib.TMSFNCColorSelector;\r\n\r\n{$I WEBLib.TMSFNCDefines.inc}\r\n\r\n{$IFDEF CMNLIB}\r\n{$DEFINE CMNWEBLIB}\r\n{$ENDIF}\r\n{$IFDEF WEBLIB}\r\n{$DEFINE CMNWEBLIB}\r\n{$ENDIF}\r\n\r\ninterface\r\n\r\nuses\r\n Classes, WEBLib.TMSFNCGraphics, WEBLib.TMSFNCCustomControl, WEBLib.TMSFNCCustomSelector, WEBLib.Controls,\r\n WEBLib.TMSFNCTypes, WEBLib.ExtCtrls, WEBLib.TMSFNCGraphicsTypes, WEBLib.StdCtrls\r\n {$IFDEF FMXLIB}\r\n ,FMX.Types\r\n {$ENDIF}\r\n {$IFNDEF LCLLIB}\r\n ,Types\r\n {$ENDIF}\r\n ;\r\n\r\nconst\r\n MAJ_VER = 1; // Major version nr.\r\n MIN_VER = 0; // Minor version nr.\r\n REL_VER = 0; // Release nr.\r\n BLD_VER = 1; // Build nr.\r\n\r\n //v1.0.0.0: First release\r\n //v1.0.0.1 : Improved : Updated initial look\r\n\r\nconst\r\n TMSFNCColorSelectorColorSetCount = 15;\r\n TMSFNCColorSelectorColorSet: array[0..TMSFNCColorSelectorColorSetCount] of TTMSFNCGraphicsColor = (gcBlack, gcMaroon, gcGreen, gcOlive,\r\n gcNavy, gcPurple, gcTeal, gcSilver, gcGray, gcRed,\r\n gcLime, gcYellow, gcBlue, gcFuchsia, gcAqua, gcWhite);\r\n\r\n {$IFDEF FMXLIB}\r\n TMSFNCColorSelectorExtendedColorSetCount = 39;\r\n TMSFNCColorSelectorExtendedColorSet: array[0..TMSFNCColorSelectorExtendedColorSetCount] of TTMSFNCGraphicsColor = (gcBlack, $FF003399, $FF003333, $FF003300, $FF663300, gcNavy,\r\n $FF353333, $FF333333, $FF800000, $FFFF6600, $FF808000, $FF008000, $FF008080, $FF0000FF,\r\n $FF666699, $FF808080, $FFFF0000, $FFFF9900, $FF99CC00, $FF339966, $FF33CCCC,\r\n $FF3366FF, $FF800080, $FF999999, $FFFF00FF, $FFFFCC00, $FFFFFF00, $FF00FF00,\r\n $FF00FFFF, $FF00CCFF, $FF993366, $FFC0C0C0, $FFFF99CC, $FFFFCC99, $FFFFFF99,\r\n $FFCCFFCC, $FFCCFFFF, $FF99CCFF, $FFCC99FF, $FFFFFFFF);\r\n {$ENDIF}\r\n\r\n {$IFDEF CMNWEBLIB}\r\n TMSFNCColorSelectorExtendedColorSetCount = 39;\r\n TMSFNCColorSelectorExtendedColorSet: array[0..TMSFNCColorSelectorExtendedColorSetCount] of TTMSFNCGraphicsColor = (gcBlack, $993300, $333300, $003300, $003366, gcNavy,\r\n $333335, $333333, $000080, $0066FF, $008080, $008000, $808000, $FF0000,\r\n $996666, $808080, $0000FF, $0099FF, $00CC99, $669933, $CCCC33,\r\n $FF6633, $800080, $999999, $FF00FF, $00CCFF, $00FFFF, $00FF00,\r\n $FFFF00, $FFCC00, $663399, $C0C0C0, $CC99FF, $99CCFF, $99FFFF,\r\n $CCFFCC, $FFFFCC, $FFCC99, $FF99CC, $FFFFFF);\r\n {$ENDIF}\r\n\r\n\r\ntype\r\n TTMSFNCCustomColorSelector = class;\r\n\r\n TTMSFNCColorSelectorItem = class(TTMSFNCCustomSelectorItem)\r\n private\r\n FOwner: TTMSFNCCustomColorSelector;\r\n FColor: TTMSFNCGraphicsColor;\r\n procedure SetColor(const Value: TTMSFNCGraphicsColor);\r\n public\r\n constructor Create(ACollection: TCollection); override;\r\n procedure Assign(Source: TPersistent); override;\r\n published\r\n property Color: TTMSFNCGraphicsColor read FColor write SetColor default gcNull;\r\n end;\r\n\r\n TTMSFNCColorSelectorItems = class(TTMSFNCCustomSelectorItems)\r\n private\r\n FOwner: TTMSFNCCustomColorSelector;\r\n function GetItem(Index: integer): TTMSFNCColorSelectorItem;\r\n procedure SetItem(Index: integer; const Value: TTMSFNCColorSelectorItem);\r\n protected\r\n function CreateItemClass: TCollectionItemClass; override;\r\n public\r\n constructor Create(AOwner: TTMSFNCCustomSelector); override;\r\n property Items[Index: integer]:TTMSFNCColorSelectorItem read GetItem write SetItem; default;\r\n function Add: TTMSFNCColorSelectorItem;\r\n function Insert(Index: integer): TTMSFNCColorSelectorItem;\r\n end;\r\n\r\n TTMSFNCCustomSelectorColorSelected = procedure(Sender: TObject; AColor: TTMSFNCGraphicsColor) of object;\r\n TTMSFNCCustomSelectorColorDeselected = procedure(Sender: TObject; AColor: TTMSFNCGraphicsColor) of object;\r\n TTMSFNCCustomSelectorColorClick = procedure(Sender: TObject; AColor: TTMSFNCGraphicsColor) of object;\r\n\r\n TTMSFNCCustomColorSelectorMode = (csmSimple, csmExtended, csmExtendedMore);\r\n\r\n TTMSFNCCustomColorSelector = class(TTMSFNCDefaultSelector)\r\n private\r\n w, h: Single;\r\n FColorWheel: TTMSFNCCustomControl;\r\n FPanel: TTMSFNCCustomControl;\r\n FBackButton: TButton;\r\n FOnColorSelected: TTMSFNCCustomSelectorColorSelected;\r\n FOnColorDeselected: TTMSFNCCustomSelectorColorDeselected;\r\n FMode: TTMSFNCCustomColorSelectorMode;\r\n procedure SetSelectedColor(const Value: TTMSFNCGraphicsColor);\r\n function GetSelectedColor: TTMSFNCGraphicsColor;\r\n function GetItems: TTMSFNCColorSelectorItems;\r\n procedure SetItems(const Value: TTMSFNCColorSelectorItems);\r\n procedure SetMode(const Value: TTMSFNCCustomColorSelectorMode);\r\n protected\r\n function GetVersion: String; override;\r\n procedure BackButtonClicked(Sender: TObject);\r\n procedure ColorWheelChange(Sender: TObject; AColor: TTMSFNCGraphicsColor);\r\n procedure DoItemClick(AItemIndex: Integer); override;\r\n procedure WrapperSizeChanged(AWidth, AHeight: Single); virtual;\r\n procedure DoItemSelected(AItemIndex: Integer); override;\r\n procedure DoItemDeselected(AItemIndex: Integer); override;\r\n function CreateItemsCollection: TTMSFNCCustomSelectorItems; override;\r\n procedure DoItemBeforeDrawContent(AGraphics: TTMSFNCGraphics; ARect: TRectF; AItemIndex: Integer; var ADefaultDraw: Boolean); override;\r\n procedure DrawItemContent(AGraphics: TTMSFNCGraphics; ADisplayItem: TTMSFNCCustomSelectorDisplayItem); override;\r\n property OnColorSelected: TTMSFNCCustomSelectorColorSelected read FOnColorSelected write FOnColorSelected;\r\n property OnColorDeselected: TTMSFNCCustomSelectorColorDeselected read FOnColorDeselected write FOnColorDeselected;\r\n property SelectedColor: TTMSFNCGraphicsColor read GetSelectedColor write SetSelectedColor default gcNull;\r\n property Items: TTMSFNCColorSelectorItems read GetItems write SetItems;\r\n property Mode: TTMSFNCCustomColorSelectorMode read FMode write SetMode default csmSimple;\r\n procedure AddColors;\r\n procedure ResetToDefaultStyle; override;\r\n public\r\n constructor Create(AOwner: TComponent); override;\r\n function FindItemByColor(AColor: TTMSFNCGraphicsColor): Integer;\r\n function FindColorByItem(AItem: Integer): TTMSFNCGraphicsColor;\r\n function ColorWheelActive: Boolean;\r\n procedure InitializeDefault; override;\r\n procedure InitSample; virtual;\r\n end;\r\n\r\n {$IFNDEF LCLLIB}\r\n [ComponentPlatformsAttribute(TMSPlatformsWeb)]\r\n {$ENDIF}\r\n TTMSFNCColorSelector = class(TTMSFNCCustomColorSelector)\r\n protected\r\n procedure RegisterRuntimeClasses; override;\r\n published\r\n property Appearance;\r\n property Rows;\r\n property Columns;\r\n property Items;\r\n property Mode;\r\n property OnColorSelected;\r\n property OnColorDeselected;\r\n property SelectedColor;\r\n property OnItemSelected;\r\n property OnItemDeselected;\r\n property OnItemClick;\r\n property SelectedItemIndex;\r\n property OnItemBeforeDrawBackground;\r\n property OnItemAfterDrawBackground;\r\n property OnItemBeforeDrawContent;\r\n property OnItemAfterDrawContent;\r\n property OnBeforeDraw;\r\n property OnAfterDraw;\r\n property OnItemBeforeDrawText;\r\n property OnItemAfterDrawText;\r\n end;\r\n\r\nimplementation\r\n\r\nuses\r\n SysUtils, WEBLib.TMSFNCUtils, WEBLib.TMSFNCColorWheel;\r\n\r\nfunction AsColorWheel(AColorWheel: TTMSFNCCustomControl): TTMSFNCColorWheel;\r\nbegin\r\n Result := (AColorWheel as TTMSFNCColorWheel);\r\nend;\r\n\r\n{ TTMSFNCCustomColorSelector }\r\n\r\nprocedure TTMSFNCCustomColorSelector.AddColors;\r\nvar\r\n I: Integer;\r\n it: TTMSFNCCustomSelectorItem;\r\nbegin\r\n BeginUpdate;\r\n Items.Clear;\r\n case Mode of\r\n csmSimple:\r\n begin\r\n Columns := 4;\r\n Rows := 4;\r\n for I := 0 to TMSFNCColorSelectorColorSetCount do\r\n TTMSFNCColorSelectorItem(Items.Add).Color := TMSFNCColorSelectorColorSet[I];\r\n end;\r\n csmExtended:\r\n begin\r\n Columns := 8;\r\n Rows := 5;\r\n for I := 0 to TMSFNCColorSelectorExtendedColorSetCount do\r\n TTMSFNCColorSelectorItem(Items.Add).Color := TMSFNCColorSelectorExtendedColorSet[I];\r\n end;\r\n csmExtendedMore:\r\n begin\r\n Columns := 8;\r\n Rows := 7;\r\n for I := 0 to TMSFNCColorSelectorExtendedColorSetCount do\r\n TTMSFNCColorSelectorItem(Items.Add).Color := TMSFNCColorSelectorExtendedColorSet[I];\r\n\r\n it := Items.Insert(0);\r\n TTMSFNCColorSelectorItem(it).Color := gcBlack;\r\n it.ColumnSpan := 8;\r\n it.Text := 'Automatic';\r\n it.DataBoolean := True;\r\n\r\n it := Items.Add;\r\n it.ColumnSpan := 8;\r\n it.Text := 'More Colors...';\r\n it.CanSelect := False;\r\n it.DataBoolean := True;\r\n\r\n Items.Add.Visible := False;\r\n end;\r\n end;\r\n EndUpdate;\r\nend;\r\n\r\nprocedure TTMSFNCCustomColorSelector.BackButtonClicked(Sender: TObject);\r\nbegin\r\n if Assigned(FPanel) then\r\n begin\r\n FPanel.Visible := False;\r\n FPanel.Parent := nil;\r\n Width := Round(w);\r\n Height := Round(h);\r\n WrapperSizeChanged(w, h);\r\n Invalidate;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomColorSelector.WrapperSizeChanged(AWidth, AHeight: Single);\r\nbegin\r\n\r\nend;\r\n\r\nfunction TTMSFNCCustomColorSelector.ColorWheelActive: Boolean;\r\nbegin\r\n Result := Assigned(FPanel) and Assigned(FPanel.Parent) and FPanel.Visible\r\n and Assigned(FColorWheel) and Assigned(FColorWheel.Parent) and FColorWheel.Visible\r\nend;\r\n\r\nprocedure TTMSFNCCustomColorSelector.ColorWheelChange(Sender: TObject; AColor: TTMSFNCGraphicsColor);\r\nbegin\r\n if BlockChange then\r\n Exit;\r\n\r\n BlockChange := True;\r\n SelectedItemIndex := -1;\r\n Items[Items.Count - 1].Color := AsColorWheel(FColorWheel).SelectedColor;\r\n SelectedColor := AsColorWheel(FColorWheel).SelectedColor;\r\n DoItemSelected(SelectedItemIndex);\r\n Invalidate;\r\n BlockChange := False;\r\nend;\r\n\r\nconstructor TTMSFNCCustomColorSelector.Create(AOwner: TComponent);\r\nbegin\r\n inherited;\r\n Width := 135;\r\n Height := 135;\r\n FMode := csmSimple;\r\n\r\n FPanel := TTMSFNCCustomControl.Create(Self);\r\n FPanel.Visible := False;\r\n FPanel.Stored := False;\r\n FPanel.ControlAlignment := caClient;\r\n\r\n FBackButton := TButton.Create(FPanel);\r\n {$IFDEF CMNWEBLIB}\r\n {$IFNDEF LCLLIB}\r\n FBackButton.AlignWithMargins := True;\r\n {$ENDIF}\r\n {$ENDIF}\r\n {$IFDEF LCLLIB}\r\n FBackButton.BorderSpacing.Top := 3;\r\n FBackButton.BorderSpacing.Left := 3;\r\n FBackButton.BorderSpacing.Bottom := 3;\r\n FBackButton.BorderSpacing.Right := 3;\r\n {$ENDIF}\r\n {$IFNDEF LCLLIB}\r\n FBackButton.Margins.Top := 3;\r\n FBackButton.Margins.Left := 3;\r\n FBackButton.Margins.Bottom := 3;\r\n FBackButton.Margins.Right := 3;\r\n {$ENDIF}\r\n {$IFDEF FMXLIB}\r\n FBackButton.Text := 'Back';\r\n FBackButton.Align := TAlignLayout.Top;\r\n {$ENDIF}\r\n {$IFNDEF FMXLIB}\r\n FBackButton.Caption := 'Back';\r\n FBackButton.Align := alTop;\r\n {$ENDIF}\r\n FBackButton.Parent := FPanel;\r\n FBackButton.OnClick := BackButtonClicked;\r\n\r\n FColorWheel := TTMSFNCColorWheel.Create(FPanel);\r\n AsColorWheel(FColorWheel).ControlAlignment := caClient;\r\n AsColorWheel(FColorWheel).SetControlMargins(3, 0, 3, 3);\r\n AsColorWheel(FColorWheel).Parent := FPanel;\r\n AsColorWheel(FColorWheel).OnSelectedColorChanged := ColorWheelChange;\r\n\r\n if IsDesignTime then\r\n InitSample;\r\nend;\r\n\r\nfunction TTMSFNCCustomColorSelector.CreateItemsCollection: TTMSFNCCustomSelectorItems;\r\nbegin\r\n Result := TTMSFNCColorSelectorItems.Create(Self);\r\nend;\r\n\r\nprocedure TTMSFNCCustomColorSelector.DoItemBeforeDrawContent(AGraphics: TTMSFNCGraphics;\r\n ARect: TRectF; AItemIndex: Integer; var ADefaultDraw: Boolean);\r\nbegin\r\n if Mode = csmExtendedMore then\r\n begin\r\n if (AItemIndex >= 0) and (AItemIndex <= Items.Count - 1) then\r\n ADefaultDraw := not Items[AItemIndex].DataBoolean;\r\n end;\r\n\r\n inherited;\r\nend;\r\n\r\nprocedure TTMSFNCCustomColorSelector.DoItemClick(AItemIndex: Integer);\r\nvar\r\n l, t, r, b, nw, nh: Single;\r\nbegin\r\n if ClosedRemotely then\r\n begin\r\n ClosedRemotely := False;\r\n inherited;\r\n Exit;\r\n end;\r\n\r\n if (Mode = csmExtendedMore) and Assigned(FPanel) and (AItemIndex = Items.Count - 2) then\r\n begin\r\n w := Width;\r\n h := Height;\r\n l := 0;\r\n t := 0;\r\n r := 0;\r\n b := 0;\r\n FColorWheel.GetControlMargins(l, t, r, b);\r\n nh := ScalePaintValue(205) + FBackButton.Height + t + b;\r\n Height := Round(nh);\r\n nw := ScalePaintValue(350);\r\n Width := Round(nw);\r\n WrapperSizeChanged(nw, nh);\r\n BlockChange := True;\r\n AsColorWheel(FColorWheel).SelectedColor := FindColorByItem(AItemIndex + 1);\r\n BlockChange := False;\r\n FPanel.Visible := True;\r\n FPanel.Parent := Self;\r\n end;\r\n\r\n inherited;\r\nend;\r\n\r\nprocedure TTMSFNCCustomColorSelector.DoItemDeselected(AItemIndex: Integer);\r\nbegin\r\n inherited;\r\n if Assigned(OnColorDeselected) then\r\n OnColorDeselected(Self, FindColorByItem(AItemIndex));\r\nend;\r\n\r\nprocedure TTMSFNCCustomColorSelector.DoItemSelected(AItemIndex: Integer);\r\nvar\r\n c: TTMSFNCGraphicsColor;\r\nbegin\r\n inherited;\r\n c := FindColorByItem(AItemIndex);\r\n if Assigned(FColorWheel) and not BlockChange then\r\n begin\r\n BlockChange := True;\r\n AsColorWheel(FColorWheel).SelectedColor := c;\r\n if (Mode = csmExtendedMore) and (Items.Count > 0) then\r\n Items[Items.Count - 1].Color := c;\r\n BlockChange := False;\r\n end;\r\n\r\n if Assigned(OnColorSelected) then\r\n OnColorSelected(Self, c);\r\nend;\r\n\r\nprocedure TTMSFNCCustomColorSelector.DrawItemContent(AGraphics: TTMSFNCGraphics;\r\n ADisplayItem: TTMSFNCCustomSelectorDisplayItem);\r\nvar\r\n r: TRectF;\r\n it: TTMSFNCCustomSelectorItem;\r\n a: Boolean;\r\nbegin\r\n it := ADisplayItem.Item;\r\n if Assigned(it) and (it is TTMSFNCColorSelectorItem) then\r\n begin\r\n r := ADisplayItem.Rect;\r\n a := True;\r\n DoItemBeforeDrawContent(AGraphics, ADisplayItem.Rect, it.Index, a);\r\n if a then\r\n begin\r\n case Mode of\r\n csmSimple: InflateRectEx(r, -5, -5);\r\n csmExtended, csmExtendedMore: InflateRectEx(r, -3, -3);\r\n end;\r\n AGraphics.Fill.Kind := gfkSolid;\r\n AGraphics.Fill.Color := (it as TTMSFNCColorSelectorItem).Color;\r\n AGraphics.Stroke.Color := AGraphics.Fill.Color;\r\n AGraphics.DrawRectangle(r);\r\n DoItemAfterDrawContent(AGraphics, ADisplayItem.Rect, it.Index);\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCCustomColorSelector.FindColorByItem(\r\n AItem: Integer): TTMSFNCGraphicsColor;\r\nvar\r\n I: Integer;\r\n it: TTMSFNCColorSelectorItem;\r\nbegin\r\n Result := gcNull;\r\n for I := 0 to Items.Count - 1 do\r\n begin\r\n it := Items[I] as TTMSFNCColorSelectorItem;\r\n if it.Index = AItem then\r\n begin\r\n Result := it.Color;\r\n Break;\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCCustomColorSelector.FindItemByColor(\r\n AColor: TTMSFNCGraphicsColor): Integer;\r\nvar\r\n I: Integer;\r\n it: TTMSFNCColorSelectorItem;\r\nbegin\r\n Result := -1;\r\n for I := 0 to Items.Count - 1 do\r\n begin\r\n it := Items[I] as TTMSFNCColorSelectorItem;\r\n if (it.Color = AColor) and it.CanSelect then\r\n begin\r\n Result := it.Index;\r\n Break;\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCCustomColorSelector.GetItems: TTMSFNCColorSelectorItems;\r\nbegin\r\n Result := TTMSFNCColorSelectorItems(inherited Items);\r\nend;\r\n\r\nfunction TTMSFNCCustomColorSelector.GetSelectedColor: TTMSFNCGraphicsColor;\r\nbegin\r\n Result := FindColorByItem(SelectedItemIndex);\r\nend;\r\n\r\nfunction TTMSFNCCustomColorSelector.GetVersion: String;\r\nbegin\r\n Result := GetVersionNumber(MAJ_VER, MIN_VER, REL_VER, BLD_VER);\r\nend;\r\n\r\nprocedure TTMSFNCCustomColorSelector.InitializeDefault;\r\nbegin\r\n inherited;\r\n AddColors;\r\nend;\r\n\r\nprocedure TTMSFNCCustomColorSelector.InitSample;\r\nbegin\r\n ResetToDefaultStyle;\r\nend;\r\n\r\nprocedure TTMSFNCCustomColorSelector.ResetToDefaultStyle;\r\nbegin\r\n inherited;\r\n BeginUpdate;\r\n\r\n {$IFDEF FMXLIB}\r\n Appearance.Font.Color := $FF454545;\r\n Appearance.Fill.Color := $FFEEF2F9;\r\n Appearance.FillSelected.Color := $FFA8BCF0;\r\n Appearance.StrokeSelected.Color := $FF2D9BEF;\r\n Appearance.FillDown.Color := $FF5A81E6;\r\n Appearance.FillHover.Color := $FFFFFFFE;\r\n {$ENDIF}\r\n {$IFNDEF FMXLIB}\r\n Appearance.Font.Color := $454545;\r\n Appearance.Fill.Color := $F9F2EE;\r\n Appearance.FillSelected.Color := $F0BCA8;\r\n Appearance.StrokeSelected.Color := $EF9B2D;\r\n Appearance.FillDown.Color := $E6815A;\r\n {$ENDIF}\r\n\r\n Appearance.FillSelected.Kind := gfkSolid;\r\n Appearance.Fill.Kind := gfkSolid;\r\n Appearance.FillDown.Kind := gfkSolid;\r\n Appearance.FillHover.Kind := gfkSolid;\r\n Appearance.Stroke.Kind := gskSolid;\r\n Appearance.StrokeSelected.Kind := gskSolid;\r\n Appearance.StrokeHover.Kind := gskSolid;\r\n\r\n Appearance.Stroke.Color := gcDarkgray;\r\n Appearance.StrokeHover.Color := Appearance.FillDown.Color;\r\n Appearance.StrokeDown.Assign(Appearance.Stroke);\r\n\r\n EndUpdate;\r\nend;\r\n\r\nprocedure TTMSFNCCustomColorSelector.SetItems(\r\n const Value: TTMSFNCColorSelectorItems);\r\nbegin\r\n Items.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCCustomColorSelector.SetMode(const Value: TTMSFNCCustomColorSelectorMode);\r\nvar\r\n s: Single;\r\nbegin\r\n {$IFDEF VCLLIB}\r\n {$HINTS OFF}\r\n {$IF (COMPILERVERSION >= 33) and (COMPILERVERSION < 35)}\r\n s := PaintScaleFactor;\r\n {$ELSE}\r\n s := TTMSFNCUtils.GetDPIScale(Self, 96);\r\n {$IFEND}\r\n {$HINTS ON}\r\n {$ENDIF}\r\n {$IFNDEF VCLLIB}\r\n s := 1;\r\n {$ENDIF}\r\n\r\n if FMode <> Value then\r\n begin\r\n FMode := Value;\r\n case Mode of\r\n csmSimple:\r\n begin\r\n Width := Round(s * 135);\r\n Height := Round(s * 135);\r\n end;\r\n csmExtended:\r\n begin\r\n Width := Round(s * 200);\r\n Height := Round(s * 135);\r\n end;\r\n csmExtendedMore:\r\n begin\r\n Width := Round(s * 200);\r\n Height := Round(s * 175);\r\n end;\r\n end;\r\n AddColors;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomColorSelector.SetSelectedColor(const Value: TTMSFNCGraphicsColor);\r\nbegin\r\n case Mode of\r\n csmExtendedMore:\r\n begin\r\n if Items.Count > 0 then\r\n Items[Items.Count - 1].Color := Value;\r\n end;\r\n end;\r\n SelectedItemIndex := FindItemByColor(Value);\r\nend;\r\n\r\n{ TTMSFNCColorSelectorItems }\r\n\r\nconstructor TTMSFNCColorSelectorItems.Create(AOwner: TTMSFNCCustomSelector);\r\nbegin\r\n inherited;\r\n FOwner := AOwner as TTMSFNCCustomColorSelector;\r\nend;\r\n\r\nfunction TTMSFNCColorSelectorItems.Add: TTMSFNCColorSelectorItem;\r\nbegin\r\n Result := TTMSFNCColorSelectorItem(inherited Add);\r\nend;\r\n\r\nfunction TTMSFNCColorSelectorItems.Insert(\r\n Index: integer): TTMSFNCColorSelectorItem;\r\nbegin\r\n Result := TTMSFNCColorSelectorItem(inherited Insert(Index));\r\nend;\r\n\r\nfunction TTMSFNCColorSelectorItems.CreateItemClass: TCollectionItemClass;\r\nbegin\r\n Result := TTMSFNCColorSelectorItem;\r\nend;\r\n\r\nfunction TTMSFNCColorSelectorItems.GetItem(\r\n Index: integer): TTMSFNCColorSelectorItem;\r\nbegin\r\n Result := TTMSFNCColorSelectorItem(inherited Items[Index]);\r\nend;\r\n\r\nprocedure TTMSFNCColorSelectorItems.SetItem(Index: integer;\r\n const Value: TTMSFNCColorSelectorItem);\r\nbegin\r\n inherited Items[Index] := Value;\r\nend;\r\n\r\n{ TTMSFNCColorSelectorItem }\r\n\r\nprocedure TTMSFNCColorSelectorItem.Assign(Source: TPersistent);\r\nbegin\r\n inherited;\r\n if Source is TTMSFNCColorSelectorItem then\r\n FColor := (Source as TTMSFNCColorSelectorItem).Color;\r\nend;\r\n\r\nconstructor TTMSFNCColorSelectorItem.Create(ACollection: TCollection);\r\nbegin\r\n inherited;\r\n if Assigned(Collection) then\r\n FOwner := (Collection as TTMSFNCColorSelectorItems).FOwner;\r\nend;\r\n\r\nprocedure TTMSFNCColorSelectorItem.SetColor(const Value: TTMSFNCGraphicsColor);\r\nbegin\r\n if FColor <> Value then\r\n begin\r\n FColor := Value;\r\n if Assigned(FOwner) then\r\n FOwner.InvalidateItems;\r\n end;\r\nend;\r\n\r\n{ TTMSFNCColorSelector }\r\n\r\nprocedure TTMSFNCColorSelector.RegisterRuntimeClasses;\r\nbegin\r\n inherited;\r\n RegisterClasses([TTMSFNCColorSelector, TTMSFNCColorSelectorItem]);\r\nend;\r\n\r\nend.\r\n","{********************************************************************}\r\n{ }\r\n{ written by TMS Software }\r\n{ copyright (c) 2016 }\r\n{ Email : info@tmssoftware.com }\r\n{ Web : http://www.tmssoftware.com }\r\n{ }\r\n{ The source code is given as is. The author is not responsible }\r\n{ for any possible damage done due to the use of this code. }\r\n{ The complete source code remains property of the author and may }\r\n{ not be distributed, published, given or sold in any form as such. }\r\n{ No parts of the source code can be included in any other component }\r\n{ or application without written authorization of the author. }\r\n{********************************************************************}\r\n\r\nunit WEBLib.TMSFNCToolBarRes;\r\n\r\n{$I WEBLib.TMSFNCDefines.inc}\r\n\r\ninterface\r\n\r\n{$IFDEF WEBLIB}\r\nconst\r\n TMSFNCTOOLBAREXPAND = 'data:image/PNG;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAHCAYAAADEUlfTAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAOvwAADr8B'+\r\n 'OAVTJAAAABh0RVh0U29mdHdhcmUAcGFpbnQubmV0IDQuMC4zjOaXUAAAACVJREFUGFdj+P//P07MEBYW9h8Xxi8J'+\r\n 'AjglYACnBAzglMAEDAwARZ1DA4NRF38AAAAASUVORK5CYII=';\r\n TMSFNCTOOLBAREXPANDLARGE = TMSFNCTOOLBAREXPAND;\r\n\r\n TMSFNCTOOLBAREXPAND2 = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAHCAYAAADEUlfTAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAOvgAADr4'+\r\n 'B6kKxwAAAABl0RVh0U29mdHdhcmUAcGFpbnQubmV0IDQuMC4xNkRpr/UAAAA3SURBVBhXY3j69KktLgyS/I8LE5RsQxeE4jaQpCKIgSQIlgBi'+\r\n 'RQYQADGgAqgSMABVkI2QYGAAANnukE/t/B6ZAAAAAElFTkSuQmCC';\r\n TMSFNCTOOLBAREXPAND2LARGE = TMSFNCTOOLBAREXPAND;\r\n\r\n TMSFNCTOOLBAROPTIONSMENU = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAJCAYAAAD+WDajAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAOvwA'+\r\n 'ADr8BOAVTJAAAABh0RVh0U29mdHdhcmUAcGFpbnQubmV0IDQuMC4zjOaXUAAAACpJREFUKFNjwAvCwsL+48IM///jxvh1YhOEYZz2giVg'+\r\n 'AKcEDOCUwAQMDAAqj1EKDJG5XAAAAABJRU5ErkJggg==';\r\n TMSFNCTOOLBAROPTIONSMENULARGE = TMSFNCTOOLBAROPTIONSMENU;\r\n\r\n TMSFNCTOOLBARQUICKMENU = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAHCAYAAADEUlfTAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAOwgAADs'+\r\n 'IBFShKgAAAABl0RVh0U29mdHdhcmUAcGFpbnQubmV0IDQuMC4xNkRpr/UAAAAlSURBVBhXYwCC/9gwEAApKAMbJl4SnY0igCQIw3gkcUowMP'+\r\n 'wHALBNZJw15C+yAAAAAElFTkSuQmCC';\r\n TMSFNCTOOLBARQUICKMENU2 = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAHCAYAAADEUlfTAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAA'+\r\n 'AAJcEhZcwAADsMAAA7DAcdvqGQAAAAZdEVYdFNvZnR3YXJlAHBhaW50Lm5ldCA0LjAuMTZEaa/1AAAAL0lEQVQYV2P4jxswwCRBNAYGESCA'+\r\n 'IQHCIAIEYAIgAGejC8D4YEBQEqvE/////wMA7H6pV7j5gXMAAAAASUVORK5CYII=';\r\n{$ENDIF}\r\n\r\n{$R TMSFNCToolBar.res}\r\n\r\nimplementation\r\n\r\n{$IFDEF WEBLIB}\r\nuses\r\n WEBLib.TMSFNCTypes;\r\n\r\ninitialization\r\nbegin\r\n TTMSFNCBitmap.CreateFromResource(TMSFNCTOOLBAREXPAND);\r\n TTMSFNCBitmap.CreateFromResource(TMSFNCTOOLBAREXPAND2);\r\n TTMSFNCBitmap.CreateFromResource(TMSFNCTOOLBAROPTIONSMENU);\r\n TTMSFNCBitmap.CreateFromResource(TMSFNCTOOLBARQUICKMENU);\r\n TTMSFNCBitmap.CreateFromResource(TMSFNCTOOLBARQUICKMENU2);\r\nend;\r\n{$ENDIF}\r\n\r\nend.\r\n","{********************************************************************}\r\n{ }\r\n{ written by TMS Software }\r\n{ copyright (c) 2016 - 2022 }\r\n{ Email : info@tmssoftware.com }\r\n{ Web : https://www.tmssoftware.com }\r\n{ }\r\n{ The source code is given as is. The author is not responsible }\r\n{ for any possible damage done due to the use of this code. }\r\n{ The complete source code remains property of the author and may }\r\n{ not be distributed, published, given or sold in any form as such. }\r\n{ No parts of the source code can be included in any other component }\r\n{ or application without written authorization of the author. }\r\n{********************************************************************}\r\n\r\nunit WEBLib.TMSFNCToolBar;\r\n\r\n{$I WEBLib.TMSFNCDefines.inc}\r\n\r\n\r\n{$IFDEF WEBLIB}\r\n{$DEFINE LCLWEBLIB}\r\n{$ENDIF}\r\n{$IFDEF LCLLIB}\r\n{$DEFINE LCLWEBLIB}\r\n{$ENDIF}\r\n\r\n{$IFDEF CMNLIB}\r\n{$DEFINE CMNWEBLIB}\r\n{$ENDIF}\r\n{$IFDEF WEBLIB}\r\n{$DEFINE CMNWEBLIB}\r\n{$DEFINE VCLWEBLIB}\r\n{$ENDIF}\r\n{$IFDEF VCLLIB}\r\n{$DEFINE VCLWEBLIB}\r\n{$ENDIF}\r\n\r\ninterface\r\n\r\nuses\r\n Classes, WEBLib.TMSFNCGraphics, WEBLib.TMSFNCPersistence, WEBLib.TMSFNCStyles, WEBLib.TMSFNCCustomControl, WEBLib.Controls, Types, WEBLib.TMSFNCBitmapSelector,\r\n WEBLib.TMSFNCPopup, WEBLib.TMSFNCTypes, WEBLib.TMSFNCBitmapContainer, WEBLib.StdCtrls, WEBLib.TMSFNCColorSelector,\r\n {%H-}WEBLib.TMSFNCToolBarRes, WEBLib.TMSFNCGraphicsTypes\r\n {$IFNDEF LCLLIB}\r\n {$IFNDEF WEBLIB}\r\n ,UITypes, Generics.Collections, Generics.Defaults\r\n {$ENDIF}\r\n {$ENDIF}\r\n {$IFDEF FMXLIB}\r\n ,FMX.ListBox, WEBLib.Menus, FMX.Types, FMX.Edit\r\n {$ENDIF}\r\n {$IFDEF CMNWEBLIB}\r\n {$IFNDEF WEBLIB}\r\n ,Menus\r\n {$ENDIF}\r\n {$IFDEF WEBLIB}\r\n ,Contnrs, WEBLib.Menus\r\n {$ENDIF}\r\n ,WEBLib.ExtCtrls\r\n {$ENDIF}\r\n {$IFDEF LCLLIB}\r\n ,fgl\r\n {$ENDIF}\r\n ;\r\n\r\nconst\r\n MAJ_VER = 1; // Major version nr.\r\n MIN_VER = 0; // Minor version nr.\r\n REL_VER = 2; // Release nr.\r\n BLD_VER = 5; // Build nr.\r\n\r\n // version history\r\n // v1.0.0.0 : first release\r\n // v1.0.1.0 : New : DisabledBitmaps property\r\n // v1.0.1.1 : Fixed : Issue with DropDownButton on VCL\r\n // v1.0.1.2 : Fixed : Issue with bounds loop on LCL\r\n // v1.0.1.3 : Fixed : Issue with Tag property being overriden\r\n // v1.0.1.4 : Fixed : Issue with BitmapContainer not being given to internal TTMSFNCBitmapSelector in TTMSFNCToolBarBitmapPicker\r\n // v1.0.1.5 : Improved: Added onAnchorClick for HTML text in the TAdvToolBar\r\n // v1.0.1.6 : Fixed : Issue updating Visible property triggering multiple unnecessary UpdateToolBar calls\r\n // : Improved : IsLoading check expanded checking for loading subcontrols\r\n // v1.0.1.7 : Fixed : Issue in Delphi 11 with begin and end scene for CreateBitmapCanvas\r\n // : Fixed : Issue with compact toolbars not getting hidden in combination with TTMSFNCRibbon\r\n // v1.0.2.0 : Improved : Support for Delphi 11 high dpi handling added\r\n // v1.0.2.1 : Fixed : Issue with realignment causing extreme slowness at designtime in FMX.\r\n // v1.0.2.2 : Fixed : Issue with aligning buttons when parenting\r\n // v1.0.2.3 : Fixed : access violation with compacting popup\r\n // v1.0.2.4 : Improved : Exposed font color properties for disabled, hover and down state\r\n // : Improved : UseStyledDropDownIcon to allow toggling between a styled or bitmap container icon when AdaptToStyle is true\r\n // : Fixed : Issue styling Text when AdaptToStyle is true\r\n // v1.0.2.5 : Improved : OnCustomizeCompactToolBar event added\r\n\r\n {$IFDEF WEBLIB}\r\n TMSFNCTOOLBAREXPANDSVG = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdo'\r\n +'dD0iMTIiIHdpZHRoPSIxMCI+DQogIDxwYXRoIGQ9Ik0gMiA0IEwgNSA3IEwgOCA0IFoiIHN0eWxlPSJzdHJva2U6YmxhY2s7'\r\n +'c3Ryb2tlLXdpZHRoOjEiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgLz4NCjwvc3ZnPg==';\r\n {$ENDIF}\r\n\r\ntype\r\n TTMSFNCCustomToolBar = class;\r\n TTMSFNCCustomDockPanel = class;\r\n TTMSFNCCustomToolBarSeparator = class;\r\n TTMSFNCDefaultToolBarButton = class;\r\n TTMSFNCToolBarButton = class;\r\n TTMSFNCToolBarDropDownButton = class;\r\n\r\n TTMSFNCToolBarCustomButtonAppearance = class(TPersistent)\r\n private\r\n FOwner: TTMSFNCDefaultToolBarButton;\r\n FHoverStroke: TTMSFNCGraphicsStroke;\r\n FDownFill: TTMSFNCGraphicsFill;\r\n FNormalFill: TTMSFNCGraphicsFill;\r\n FDownStroke: TTMSFNCGraphicsStroke;\r\n FDisabledFill: TTMSFNCGraphicsFill;\r\n FNormalStroke: TTMSFNCGraphicsStroke;\r\n FDisabledStroke: TTMSFNCGraphicsStroke;\r\n FHoverFill: TTMSFNCGraphicsFill;\r\n FCorners: TTMSFNCGraphicsCorners;\r\n FRounding: Single;\r\n FTransparent: Boolean;\r\n FShowInnerStroke: Boolean;\r\n FInnerStroke: TTMSFNCGraphicsStroke;\r\n FFlatStyle: Boolean;\r\n FOnChange: TNotifyEvent;\r\n procedure SetDisabledFill(const Value: TTMSFNCGraphicsFill);\r\n procedure SetDisabledStroke(const Value: TTMSFNCGraphicsStroke);\r\n procedure SetDownFill(const Value: TTMSFNCGraphicsFill);\r\n procedure SetDownStroke(const Value: TTMSFNCGraphicsStroke);\r\n procedure SetHoverFill(const Value: TTMSFNCGraphicsFill);\r\n procedure SetHoverStroke(const Value: TTMSFNCGraphicsStroke);\r\n procedure SetNormalFill(const Value: TTMSFNCGraphicsFill);\r\n procedure SetNormalStroke(const Value: TTMSFNCGraphicsStroke);\r\n procedure SetCorners(const Value: TTMSFNCGraphicsCorners); virtual;\r\n procedure SetRounding(const Value: Single); virtual;\r\n procedure SetInnerStroke(const Value: TTMSFNCGraphicsStroke);\r\n procedure SetShowInnerStroke(const Value: Boolean);\r\n procedure SetTransparent(const Value: Boolean);\r\n function IsRoundingStored: Boolean;\r\n procedure SetFlatStyle(const Value: Boolean);\r\n protected\r\n procedure FillChanged(Sender: TObject);\r\n procedure StrokeChanged(Sender: TObject);\r\n procedure Changed; virtual;\r\n property Transparent: Boolean read FTransparent write SetTransparent default False;\r\n property ShowInnerStroke: Boolean read FShowInnerStroke write SetShowInnerStroke default True;\r\n property Rounding: Single read FRounding write SetRounding stored IsRoundingStored nodefault;\r\n property Corners: TTMSFNCGraphicsCorners read FCorners write SetCorners default [gcTopLeft, gcTopRight, gcBottomLeft, gcBottomRight];\r\n property InnerStroke: TTMSFNCGraphicsStroke read FInnerStroke write SetInnerStroke;\r\n property NormalFill: TTMSFNCGraphicsFill read FNormalFill write SetNormalFill;\r\n property NormalStroke: TTMSFNCGraphicsStroke read FNormalStroke write SetNormalStroke;\r\n property HoverFill: TTMSFNCGraphicsFill read FHoverFill write SetHoverFill;\r\n property HoverStroke: TTMSFNCGraphicsStroke read FHoverStroke write SetHoverStroke;\r\n property DownFill: TTMSFNCGraphicsFill read FDownFill write SetDownFill;\r\n property DownStroke: TTMSFNCGraphicsStroke read FDownStroke write SetDownStroke;\r\n property DisabledFill: TTMSFNCGraphicsFill read FDisabledFill write SetDisabledFill;\r\n property DisabledStroke: TTMSFNCGraphicsStroke read FDisabledStroke write SetDisabledStroke;\r\n property FlatStyle: Boolean read FFlatStyle write SetFlatStyle default False;\r\n public\r\n procedure Assign(Source: TPersistent); override;\r\n constructor Create(AOwner: TTMSFNCDefaultToolBarButton);\r\n destructor Destroy; override;\r\n property OnChange: TNotifyEvent read FOnChange write FOnChange;\r\n end;\r\n\r\n TTMSFNCToolBarButtonAppearance = class(TTMSFNCToolBarCustomButtonAppearance)\r\n published\r\n property Transparent;\r\n property ShowInnerStroke;\r\n property Rounding;\r\n property Corners;\r\n property InnerStroke;\r\n property NormalFill;\r\n property NormalStroke;\r\n property HoverFill;\r\n property HoverStroke;\r\n property DownFill;\r\n property DownStroke;\r\n property DisabledFill;\r\n property DisabledStroke;\r\n property FlatStyle;\r\n end;\r\n\r\n TTMSFNCToolBarCompactAppearance = class(TTMSFNCToolBarCustomButtonAppearance)\r\n published\r\n property NormalFill;\r\n property NormalStroke;\r\n property HoverFill;\r\n property HoverStroke;\r\n property DownFill;\r\n property DownStroke;\r\n property DisabledFill;\r\n property DisabledStroke;\r\n property FlatStyle;\r\n end;\r\n\r\n TTMSFNCToolBarQuickMenuButtonAppearance = class(TTMSFNCToolBarCustomButtonAppearance)\r\n published\r\n property NormalFill;\r\n property NormalStroke;\r\n property HoverFill;\r\n property HoverStroke;\r\n property DownFill;\r\n property DownStroke;\r\n property DisabledFill;\r\n property DisabledStroke;\r\n property FlatStyle;\r\n end;\r\n\r\n TTMSFNCToolBarElementState = (esNormal, esLarge);\r\n\r\n TTMSFNCCustomToolBarElement = class(TTMSFNCCustomControl)\r\n private\r\n FBlockUpdate: Boolean;\r\n FOnUpdateToolBar: TNotifyEvent;\r\n FOnUpdateToolBarControl: TNotifyEvent;\r\n FCanCopy: Boolean;\r\n FState: TTMSFNCToolBarElementState;\r\n FLastElement: Boolean;\r\n FControlIndex: Integer;\r\n procedure SetState(const Value: TTMSFNCToolBarElementState);\r\n procedure SetLastElement(const Value: Boolean);\r\n protected\r\n function GetDocURL: string; override;\r\n procedure UpdateState; virtual;\r\n procedure UpdateToolBar; virtual;\r\n procedure UpdateToolBarControl; virtual;\r\n {$IFDEF FMXLIB}\r\n procedure SetVisible(const Value: Boolean); override;\r\n procedure DoMatrixChanged(Sender: TObject); override;\r\n {$ENDIF}\r\n {$IFDEF CMNWEBLIB}\r\n procedure VisibleChanging; override;\r\n {$ENDIF}\r\n procedure DefineProperties(Filer : TFiler); override;\r\n procedure ReadControlIndex(Reader: TReader);\r\n procedure WriteControlIndex(Writer: TWriter);\r\n procedure UpdateControlAfterResize; override;\r\n property OnUpdateToolBar: TNotifyEvent read FOnUpdateToolBar write FOnUpdateToolBar;\r\n property OnUpdateToolBarControl: TNotifyEvent read FOnUpdateToolBarControl write FOnUpdateToolBarControl;\r\n property State: TTMSFNCToolBarElementState read FState write SetState default esNormal;\r\n property LastElement: Boolean read FLastElement write SetLastElement default False;\r\n public\r\n procedure Assign(Source: TPersistent); override;\r\n constructor Create(AOwner: TComponent); override;\r\n destructor Destroy; override;\r\n property CanCopy: Boolean read FCanCopy write FCanCopy default True;\r\n property ControlIndex: Integer read FControlIndex write FControlIndex default -1;\r\n end;\r\n\r\n TTMSFNCToolBarButtonBitmapPosition = (bbpLeft, bbpTop);\r\n\r\n TTMSFNCToolBarButtonLayout = (bblNone, bblBitmap, bblLabel, bblLarge);\r\n\r\n {$IFDEF FNCLIB}\r\n TTMSFNCDefaultToolBarButton = class(TTMSFNCCustomToolBarElement, ITMSFNCBitmapContainer)\r\n {$ENDIF}\r\n {$IFNDEF FNCLIB}\r\n TTMSFNCDefaultToolBarButton = class(TTMSFNCCustomToolBarElement)\r\n {$ENDIF}\r\n private\r\n FOldHeight: Single;\r\n FBitmapVisible: Boolean;\r\n FText: String;\r\n FPopup: TTMSFNCPopup;\r\n FPopupPlacement: TTMSFNCPopupPlacement;\r\n FDropDownHeight: Single;\r\n FDropDownWidth: Single;\r\n FDown, FHover, FPrevHover: Boolean;\r\n FAppearance: TTMSFNCToolBarButtonAppearance;\r\n FBitmapContainer: TTMSFNCBitmapContainer;\r\n FBitmaps: TTMSFNCScaledBitmaps;\r\n FApplyName: Boolean;\r\n FDropDownControl: TControl;\r\n FFont: TTMSFNCGraphicsFont;\r\n FOnBeforeDropDown: TNotifyEvent;\r\n FCloseOnSelection: Boolean;\r\n FDownState: Boolean;\r\n FTextVisible: Boolean;\r\n FOnCloseDropDown: TNotifyEvent;\r\n FOnDropDown: TNotifyEvent;\r\n FVerticalTextAlign: TTMSFNCGraphicsTextAlign;\r\n FHorizontalTextAlign: TTMSFNCGraphicsTextAlign;\r\n FWordWrapping: Boolean;\r\n FTrimming: TTMSFNCGraphicsTextTrimming;\r\n FBitmapSize: Single;\r\n FStretchText: Boolean;\r\n FDisabledBitmaps: TTMSFNCScaledBitmaps;\r\n FHoverBitmaps: TTMSFNCScaledBitmaps;\r\n FShowFocus: Boolean;\r\n FDropDownAutoWidth: Boolean;\r\n FHoverFontColor: TTMSFNCGraphicsColor;\r\n FDownFontColor: TTMSFNCGraphicsColor;\r\n FDisabledFontColor: TTMSFNCGraphicsColor;\r\n FStretchBitmapIfNoText: Boolean;\r\n FBitmapPosition: TTMSFNCToolBarButtonBitmapPosition;\r\n FMaximumLayout: TTMSFNCToolBarButtonLayout;\r\n FMinimumLayout: TTMSFNCToolBarButtonLayout;\r\n FLayout: TTMSFNCToolBarButtonLayout;\r\n FCompactLayout: TTMSFNCToolBarButtonLayout;\r\n FLargeLayoutBitmapSize: Single;\r\n FLargeLayoutBitmaps: TTMSFNCScaledBitmaps;\r\n FLargeLayoutHoverBitmaps: TTMSFNCScaledBitmaps;\r\n FLargeLayoutDisabledBitmaps: TTMSFNCScaledBitmaps;\r\n FAutoBitmapSize: Boolean;\r\n FLargeLayoutAutoBitmapSize: Boolean;\r\n FUseStyledDropDownIcon: Boolean;\r\n procedure SetAppearance(const Value: TTMSFNCToolBarButtonAppearance);\r\n procedure SetBitmapContainer(const Value: TTMSFNCBitmapContainer); virtual;\r\n procedure SetBitmaps(const Value: TTMSFNCScaledBitmaps);\r\n procedure SetText(const Value: String);\r\n procedure SetDropDownHeight(const Value: Single);\r\n procedure SetDropDownWidth(const Value: Single);\r\n procedure SetBitmapVisible(const Value: Boolean);\r\n procedure SetTextVisible(const Value: Boolean);\r\n procedure SetFont(const Value: TTMSFNCGraphicsFont); reintroduce;\r\n procedure SetDropDownControl(const Value: TControl);\r\n procedure SetCloseOnSelection(const Value: Boolean);\r\n procedure SetDownState(const Value: Boolean);\r\n function IsDropDownHeightStored: Boolean;\r\n function IsDropDownWidthStored: Boolean;\r\n procedure SetHorizontalTextAlign(const Value: TTMSFNCGraphicsTextAlign);\r\n procedure SetVerticalTextAlign(const Value: TTMSFNCGraphicsTextAlign);\r\n procedure SetWordWrapping(const Value: Boolean);\r\n procedure SetTrimming(const Value: TTMSFNCGraphicsTextTrimming);\r\n function IsBitmapSizeStored: Boolean;\r\n procedure SetBitmapSize(const Value: Single);\r\n procedure SetStretchText(const Value: Boolean);\r\n procedure SetDisabledBitmaps(const Value: TTMSFNCScaledBitmaps);\r\n procedure SetHoverBitmaps(const Value: TTMSFNCScaledBitmaps);\r\n function GetBitmapContainer: TTMSFNCBitmapContainer;\r\n procedure SetShowFocus(const Value: Boolean);\r\n procedure SetDropDownAutoWidth(const Value: Boolean);\r\n procedure SetDisabledFontColor(const Value: TTMSFNCGraphicsColor);\r\n procedure SetDownFontColor(const Value: TTMSFNCGraphicsColor);\r\n procedure SetHoverFontColor(const Value: TTMSFNCGraphicsColor);\r\n procedure SetStretchBitmapIfNoText(const Value: Boolean);\r\n procedure SetBitmapPosition(const Value: TTMSFNCToolBarButtonBitmapPosition);\r\n procedure SetMaximumLayout(const Value: TTMSFNCToolBarButtonLayout);\r\n procedure SetMinimumLayout(const Value: TTMSFNCToolBarButtonLayout);\r\n procedure SetLayout(const Value: TTMSFNCToolBarButtonLayout);\r\n procedure SetCompactLayout(const Value: TTMSFNCToolBarButtonLayout);\r\n function IsLargeLayoutBitmapSizeStored: Boolean;\r\n procedure SetLargeLayoutBitmaps(const Value: TTMSFNCScaledBitmaps);\r\n procedure SetLargeLayoutBitmapSize(const Value: Single);\r\n procedure SetLargeLayoutDisabledBitmaps(const Value: TTMSFNCScaledBitmaps);\r\n procedure SetLargeLayoutHoverBitmaps(const Value: TTMSFNCScaledBitmaps);\r\n procedure SetAutoBitmapSize(const Value: Boolean);\r\n procedure SetLargeLayoutAutoBitmapSize(const Value: Boolean);\r\n procedure SetUseStyledDropDownIcon(const Value: Boolean);\r\n protected\r\n function CanDrawDesignTime: Boolean; virtual;\r\n function HasHint: Boolean; override;\r\n function GetHintString: String; override;\r\n function GetText: String; virtual;\r\n function GetTextSize: TSizeF; virtual;\r\n {$IFNDEF WEBLIB}\r\n {$IFDEF FNCLIB}\r\n {$IFNDEF LCLLIB}\r\n {$HINTS OFF}\r\n {$IF COMPILERVERSION >= 30}\r\n procedure ActionChange(Sender: {$IFNDEF FMXLIB}TObject{$ELSE}TBasicAction{$ENDIF}; CheckDefaults: Boolean); override;\r\n {$IFEND}\r\n {$HINTS ON}\r\n {$ENDIF}\r\n {$ENDIF}\r\n {$ENDIF}\r\n procedure UpdateControlAfterResize; override;\r\n procedure ApplyStyle; override;\r\n procedure ResetToDefaultStyle; override;\r\n procedure SetAdaptToStyle(const Value: Boolean); override;\r\n procedure BitmapsChanged(Sender: TObject);\r\n procedure DoFontChanged(Sender: TObject);\r\n procedure UpdateLayout; virtual;\r\n procedure DoClosePopup(Sender: TObject);\r\n procedure DoPopup(Sender: TObject);\r\n procedure InitializePopup; virtual;\r\n procedure UpdateState; override;\r\n procedure ChangeDPIScale(M, D: Integer); override;\r\n procedure AppearanceChanged; virtual;\r\n procedure Notification(AComponent: TComponent; Operation: TOperation); override;\r\n procedure SetName(const Value: TComponentName); override;\r\n procedure HandleMouseDown(Button: TTMSFNCMouseButton; Shift: TShiftState; X, Y: Single); override;\r\n procedure HandleMouseMove(Shift: TShiftState; X, Y: Single); override;\r\n procedure HandleMouseUp(Button: TTMSFNCMouseButton; Shift: TShiftState; X, Y: Single); override;\r\n procedure HandleKeyUp(var Key: Word; Shift: TShiftState); override;\r\n procedure HandleKeyDown(var Key: Word; Shift: TShiftState); override;\r\n procedure HandleKeyPress(var Key: Char); override;\r\n procedure HandleMouseEnter; override;\r\n procedure HandleMouseLeave; override;\r\n procedure SelectFirstValue; virtual;\r\n procedure SelectValueWithCharacter({%H-}ACharacter: Char); virtual;\r\n procedure SelectLastValue; virtual;\r\n procedure SelectNextValue; virtual;\r\n procedure SelectPreviousValue; virtual;\r\n procedure DrawText(AGraphics: TTMSFNCGraphics); virtual;\r\n procedure DrawBitmap(AGraphics: TTMSFNCGraphics; ARect: TRectF); virtual;\r\n procedure DrawButton({%H-}AGraphics: TTMSFNCGraphics); virtual;\r\n function CanDropDown: Boolean; virtual;\r\n function CanChangeText: Boolean; virtual;\r\n function GetTextRect: TRectF; virtual;\r\n function GetDropDownRect: TRectF; virtual;\r\n function GetBitmapRect: TRectF; overload; virtual;\r\n function GetBitmapRect(ARect: TRectF): TRectF; overload; virtual;\r\n function GetBitmapSize: Single; virtual;\r\n function GetLargeLayoutBitmapSize: Single; virtual;\r\n property Appearance: TTMSFNCToolBarButtonAppearance read FAppearance write SetAppearance;\r\n property BitmapVisible: Boolean read FBitmapVisible write SetBitmapVisible default False;\r\n property Bitmaps: TTMSFNCScaledBitmaps read FBitmaps write SetBitmaps;\r\n property DisabledBitmaps: TTMSFNCScaledBitmaps read FDisabledBitmaps write SetDisabledBitmaps;\r\n property HoverBitmaps: TTMSFNCScaledBitmaps read FHoverBitmaps write SetHoverBitmaps;\r\n property LargeLayoutBitmaps: TTMSFNCScaledBitmaps read FLargeLayoutBitmaps write SetLargeLayoutBitmaps;\r\n property LargeLayoutDisabledBitmaps: TTMSFNCScaledBitmaps read FLargeLayoutDisabledBitmaps write SetLargeLayoutDisabledBitmaps;\r\n property LargeLayoutHoverBitmaps: TTMSFNCScaledBitmaps read FLargeLayoutHoverBitmaps write SetLargeLayoutHoverBitmaps;\r\n property BitmapContainer: TTMSFNCBitmapContainer read GetBitmapContainer write SetBitmapContainer;\r\n property BitmapSize: Single read FBitmapSize write SetBitmapSize stored IsBitmapSizeStored nodefault;\r\n property AutoBitmapSize: Boolean read FAutoBitmapSize write SetAutoBitmapSize default false;\r\n property LargeLayoutBitmapSize: Single read FLargeLayoutBitmapSize write SetLargeLayoutBitmapSize stored IsLargeLayoutBitmapSizeStored nodefault;\r\n property LargeLayoutAutoBitmapSize: Boolean read FLargeLayoutAutoBitmapSize write SetLargeLayoutAutoBitmapSize default False;\r\n property StretchBitmapIfNoText: Boolean read FStretchBitmapIfNoText write SetStretchBitmapIfNoText default True;\r\n property Text: String read GetText write SetText;\r\n property Trimming: TTMSFNCGraphicsTextTrimming read FTrimming write SetTrimming default gttCharacter;\r\n property HorizontalTextAlign: TTMSFNCGraphicsTextAlign read FHorizontalTextAlign write SetHorizontalTextAlign default gtaCenter;\r\n property VerticalTextAlign: TTMSFNCGraphicsTextAlign read FVerticalTextAlign write SetVerticalTextAlign default gtaCenter;\r\n property Font: TTMSFNCGraphicsFont read FFont write SetFont;\r\n property HoverFontColor: TTMSFNCGraphicsColor read FHoverFontColor write SetHoverFontColor default gcNull;\r\n property DownFontColor: TTMSFNCGraphicsColor read FDownFontColor write SetDownFontColor default gcNull;\r\n property DisabledFontColor: TTMSFNCGraphicsColor read FDisabledFontColor write SetDisabledFontColor default gcNull;\r\n property TextVisible: Boolean read FTextVisible write SetTextVisible default True;\r\n property StretchText: Boolean read FStretchText write SetStretchText default False;\r\n property WordWrapping: Boolean read FWordWrapping write SetWordWrapping default False;\r\n property DropDownAutoWidth: Boolean read FDropDownAutoWidth write SetDropDownAutoWidth default False;\r\n property DropDownHeight: Single read FDropDownHeight write SetDropDownHeight stored IsDropDownHeightStored nodefault;\r\n property DropDownWidth: Single read FDropDownWidth write SetDropDownWidth stored IsDropDownWidthStored nodefault;\r\n property DropDownControl: TControl read FDropDownControl write SetDropDownControl;\r\n property CloseOnSelection: Boolean read FCloseOnSelection write SetCloseOnSelection default True;\r\n property OnBeforeDropDown: TNotifyEvent read FOnBeforeDropDown write FOnBeforeDropDown;\r\n property OnDropDown: TNotifyEvent read FOnDropDown write FOnDropDown;\r\n property OnCloseDropDown: TNotifyEvent read FOnCloseDropDown write FOnCloseDropDown;\r\n property ApplyName: Boolean read FApplyName write FApplyName default True;\r\n property ShowFocus: Boolean read FShowFocus write SetShowFocus default False;\r\n property BitmapPosition: TTMSFNCToolBarButtonBitmapPosition read FBitmapPosition write SetBitmapPosition default bbpLeft;\r\n property CompactLayout: TTMSFNCToolBarButtonLayout read FCompactLayout write SetCompactLayout default bblNone;\r\n property Layout: TTMSFNCToolBarButtonLayout read FLayout write SetLayout default bblNone;\r\n property MinimumLayout: TTMSFNCToolBarButtonLayout read FMinimumLayout write SetMinimumLayout default bblBitmap;\r\n property MaximumLayout: TTMSFNCToolBarButtonLayout read FMaximumLayout write SetMaximumLayout default bblLarge;\r\n property UseStyledDropDownIcon: Boolean read FUseStyledDropDownIcon write SetUseStyledDropDownIcon default True;\r\n public\r\n procedure Assign(Source: TPersistent); override;\r\n constructor Create(AOwner: TComponent); override;\r\n destructor Destroy; override;\r\n procedure Draw(AGraphics: TTMSFNCGraphics; ARect: TRectF); override;\r\n procedure DropDown; virtual;\r\n procedure CloseDropDown; virtual;\r\n function GetPopupControl: TTMSFNCPopup;\r\n function GetBitmap: TTMSFNCBitmap; virtual;\r\n property DownState: Boolean read FDownState write SetDownState;\r\n property PopupPlacement: TTMSFNCPopupPlacement read FPopupPlacement write FPopupPlacement default ppBottom;\r\n end;\r\n\r\n TTMSFNCToolBarButtonDropDownKind = (ddkNormal, ddkDropDown, ddkDropDownButton);\r\n TTMSFNCToolBarButtonDropDownPosition = (ddpRight, ddpBottom);\r\n\r\n TTMSFNCToolBarDropDownButton = class(TTMSFNCDefaultToolBarButton)\r\n private\r\n FDefaultStyle: Boolean;\r\n procedure SetDefaultStyle(const Value: Boolean);\r\n protected\r\n procedure RegisterRuntimeClasses; override;\r\n procedure DrawBitmap(AGraphics: TTMSFNCGraphics; ARect: TRectF); override;\r\n function GetBitmapRect(ARect: TRectF): TRectF; override;\r\n public\r\n constructor Create(AOwner: TComponent); override;\r\n procedure LoadSettingsFromFile(AFileName: string); override;\r\n procedure LoadSettingsFromStream(AStream: TStream); override;\r\n published\r\n property DefaultStyle: Boolean read FDefaultStyle write SetDefaultStyle default True;\r\n {$IFNDEF WEBLIB}\r\n {$IFNDEF LCLLIB}\r\n {$HINTS OFF}\r\n {$IF COMPILERVERSION >= 30}\r\n property Action;\r\n {$IFEND}\r\n {$HINTS ON}\r\n {$ENDIF}\r\n {$ENDIF}\r\n property UseStyledDropDownIcon;\r\n property Font;\r\n property Text;\r\n property ShowFocus;\r\n property TextVisible;\r\n property StretchText;\r\n property HoverFontColor;\r\n property DownFontColor;\r\n property DisabledFontColor;\r\n property WordWrapping;\r\n property HorizontalTextAlign;\r\n property VerticalTextAlign;\r\n property Trimming;\r\n property Bitmaps;\r\n property DisabledBitmaps;\r\n property HoverBitmaps;\r\n property BitmapVisible;\r\n property BitmapContainer;\r\n property State;\r\n property LastElement;\r\n property Appearance;\r\n end;\r\n\r\n TTMSFNCToolBarDropDownButtonClass = class of TTMSFNCToolBarDropDownButton;\r\n\r\n\r\n TTMSFNCCustomToolBarButton = class(TTMSFNCDefaultToolBarButton)\r\n private\r\n FDropDownButton: TTMSFNCToolBarDropDownButton;\r\n FDropDownKind: TTMSFNCToolBarButtonDropDownKind;\r\n FDropDownPosition: TTMSFNCToolBarButtonDropDownPosition;\r\n FHidden: Boolean;\r\n FAutoOptionsMenuText: String;\r\n procedure SetDropDownKind(const Value: TTMSFNCToolBarButtonDropDownKind);\r\n procedure SetDropDownPosition(\r\n const Value: TTMSFNCToolBarButtonDropDownPosition);\r\n procedure SetHidden(const Value: Boolean);\r\n protected\r\n procedure ChangeDPIScale(M, D: Integer); override;\r\n procedure SetAdaptToStyle(const Value: Boolean); override;\r\n procedure DoFontChanged(Sender: TObject);\r\n procedure AppearanceChanged; override;\r\n procedure UpdateDropDownButton; virtual;\r\n procedure HandleMouseDown(Button: TTMSFNCMouseButton; Shift: TShiftState; X, Y: Single); override;\r\n procedure DropDownButtonClick(Sender: TObject);\r\n procedure DrawButton(AGraphics: TTMSFNCGraphics); override;\r\n {$IFDEF FMXLIB}\r\n procedure SetEnabled(const Value: Boolean); override;\r\n {$ENDIF}\r\n {$IFDEF CMNWEBLIB}\r\n procedure SetEnabled(Value: Boolean); override;\r\n {$ENDIF}\r\n function GetDropDownButtonClass: TTMSFNCToolBarDropDownButtonClass; virtual;\r\n function GetDropDownRect: TRectF; override;\r\n function GetTextRect: TRectF; override;\r\n function GetBitmapRect(ARect: TRectF): TRectF; overload; override;\r\n function GetBitmapRect: TRectF; overload; override;\r\n function CanDropDown: Boolean; override;\r\n property DropDownKind: TTMSFNCToolBarButtonDropDownKind read FDropDownKind write SetDropDownKind default ddkNormal;\r\n property DropDownPosition: TTMSFNCToolBarButtonDropDownPosition read FDropDownPosition write SetDropDownPosition default ddpRight;\r\n property AutoOptionsMenuText: String read FAutoOptionsMenuText write FAutoOptionsMenuText;\r\n property Hidden: Boolean read FHidden write SetHidden default False;\r\n procedure Loaded; override;\r\n public\r\n procedure Assign(Source: TPersistent); override;\r\n constructor Create(AOwner: TComponent); override;\r\n destructor Destroy; override;\r\n function GetDropDownButtonControl: TTMSFNCToolBarDropDownButton;\r\n procedure LoadSettingsFromFile(AFileName: string); override;\r\n procedure LoadSettingsFromStream(AStream: TStream); override;\r\n end;\r\n\r\n TTMSFNCCustomToolBarSeparatorAppearance = class(TPersistent)\r\n private\r\n FOwner: TTMSFNCCustomToolBarSeparator;\r\n FStroke: TTMSFNCGraphicsStroke;\r\n FInnerStroke: TTMSFNCGraphicsStroke;\r\n procedure SetStroke(const Value: TTMSFNCGraphicsStroke);\r\n procedure SetInnerStroke(const Value: TTMSFNCGraphicsStroke);\r\n protected\r\n procedure StrokeChanged(Sender: TObject);\r\n property Stroke: TTMSFNCGraphicsStroke read FStroke write SetStroke;\r\n property InnerStroke: TTMSFNCGraphicsStroke read FInnerStroke write SetInnerStroke;\r\n public\r\n procedure Assign(Source: TPersistent); override;\r\n constructor Create(AOwner: TTMSFNCCustomToolBarSeparator);\r\n destructor Destroy; override;\r\n end;\r\n\r\n TTMSFNCToolBarSeparatorAppearance = class(TTMSFNCCustomToolBarSeparatorAppearance)\r\n published\r\n property Stroke;\r\n property InnerStroke;\r\n end;\r\n\r\n TTMSFNCCustomToolBarSeparator = class(TTMSFNCCustomToolBarElement)\r\n private\r\n FAppearance: TTMSFNCToolBarSeparatorAppearance;\r\n procedure SetAppearance(const Value: TTMSFNCToolBarSeparatorAppearance);\r\n protected\r\n procedure UpdateState; override;\r\n property Appearance: TTMSFNCToolBarSeparatorAppearance read FAppearance write SetAppearance;\r\n public\r\n procedure Assign(Source: TPersistent); override;\r\n constructor Create(AOwner: TComponent); override;\r\n destructor Destroy; override;\r\n procedure Draw(AGraphics: TTMSFNCGraphics; ARect: TRectF); override;\r\n end;\r\n\r\n {$IFNDEF LCLLIB}\r\n [ComponentPlatformsAttribute(TMSPlatformsWeb)]\r\n {$ENDIF}\r\n TTMSFNCToolBarButton = class(TTMSFNCCustomToolBarButton)\r\n protected\r\n procedure RegisterRuntimeClasses; override;\r\n public\r\n property Hidden;\r\n published\r\n {$IFNDEF WEBLIB}\r\n {$IFNDEF LCLLIB}\r\n {$HINTS OFF}\r\n {$IF COMPILERVERSION >= 30}\r\n property Action;\r\n {$IFEND}\r\n {$HINTS ON}\r\n {$ENDIF}\r\n {$ENDIF}\r\n property Font;\r\n property AutoOptionsMenuText;\r\n property DropDownAutoWidth;\r\n property DropDownKind;\r\n property DropDownPosition;\r\n property DropDownHeight;\r\n property DropDownWidth;\r\n property DropDownControl;\r\n property OnBeforeDropDown;\r\n property OnDropDown;\r\n property OnCloseDropDown;\r\n property Text;\r\n property ShowFocus;\r\n property TextVisible;\r\n property StretchText;\r\n property HoverFontColor;\r\n property DownFontColor;\r\n property DisabledFontColor;\r\n property StretchBitmapIfNoText;\r\n property HorizontalTextAlign;\r\n property VerticalTextAlign;\r\n property Trimming;\r\n property Bitmaps;\r\n property LargeLayoutBitmaps;\r\n property Layout;\r\n property CompactLayout;\r\n property MinimumLayout;\r\n property MaximumLayout;\r\n property BitmapPosition;\r\n property DisabledBitmaps;\r\n property HoverBitmaps;\r\n property LargeLayoutDisabledBitmaps;\r\n property LargeLayoutHoverBitmaps;\r\n property BitmapVisible;\r\n property BitmapContainer;\r\n property BitmapSize;\r\n property AutoBitmapSize;\r\n property LargeLayoutBitmapSize;\r\n property LargeLayoutAutoBitmapSize;\r\n property State;\r\n property LastElement;\r\n property Appearance;\r\n property WordWrapping;\r\n end;\r\n\r\n TTMSFNCToolBarButtonClass = class of TTMSFNCToolBarButton;\r\n\r\n {$IFNDEF LCLLIB}\r\n [ComponentPlatformsAttribute(TMSPlatformsWeb)]\r\n {$ENDIF}\r\n TTMSFNCToolBarSeparator = class(TTMSFNCCustomToolBarSeparator)\r\n protected\r\n procedure RegisterRuntimeClasses; override;\r\n published\r\n property State;\r\n property LastElement;\r\n property Appearance;\r\n end;\r\n\r\n TTMSFNCToolBarSeparatorClass = class of TTMSFNCToolBarSeparator;\r\n\r\n TTMSFNCToolBarItemPickerItemSelected = procedure(Sender: TObject; AItemIndex: Integer) of object;\r\n\r\n TTMSFNCToolBarCustomItemPicker = class(TTMSFNCToolBarButton)\r\n private\r\n FEdit: TEdit;\r\n FTimer: TTimer;\r\n FItemIndex: Integer;\r\n FItems: TStringList;\r\n FKeyboardUsed: Boolean;\r\n FItemSelector: TListBox;\r\n FOnItemSelected: TTMSFNCToolBarItemPickerItemSelected;\r\n FEditable: Boolean;\r\n FOnEditChange: TNotifyEvent;\r\n function GetSelectedItemIndex: Integer;\r\n procedure SetSelectedItemIndex(const Value: Integer);\r\n function GetSelectedItem: String;\r\n procedure SetSelectedItem(const Value: String);\r\n procedure SetItems(const Value: TStringList);\r\n procedure SetEditable(const Value: Boolean);\r\n protected\r\n procedure ChangeDPIScale(M, D: Integer); override;\r\n function CanChangeText: Boolean; override;\r\n function GetText: String; override;\r\n procedure EnterTimerChanged(Sender: TObject);\r\n procedure EditChange(Sender: TObject);\r\n procedure HandleDialogKey(var Key: Word; Shift: TShiftState); override;\r\n procedure InitializePopup; override;\r\n procedure SelectValueWithString(AValue: string); virtual;\r\n procedure SelectValueWithCharacter(ACharacter: Char); override;\r\n procedure SelectFirstValue; override;\r\n procedure SelectLastValue; override;\r\n procedure SelectNextValue; override;\r\n procedure SelectPreviousValue; override;\r\n {$IFDEF FMXLIB}\r\n procedure ItemKeyUp(Sender: TObject; var Key: Word; var KeyChar: WideChar; Shift: TShiftState);\r\n procedure ItemKeyDown(Sender: TObject; var Key: Word; var KeyChar: WideChar; Shift: TShiftState);\r\n procedure ItemSelected(const Sender: TCustomListBox; const Item: TListBoxItem);\r\n {$ENDIF}\r\n {$IFDEF CMNWEBLIB}\r\n procedure ItemKeyUp(Sender: TObject; var {%H-}Key: Word; {%H-}Shift: TShiftState);\r\n procedure ItemKeyDown(Sender: TObject; var {%H-}Key: Word; {%H-}Shift: TShiftState);\r\n procedure ItemSelected(Sender: TObject);\r\n {$ENDIF}\r\n procedure DoItemSelected; virtual;\r\n procedure DoEnter; override;\r\n property CloseOnSelection;\r\n property Items: TStringList read FItems write SetItems;\r\n property OnItemSelected: TTMSFNCToolBarItemPickerItemSelected read FOnItemSelected write FOnItemSelected;\r\n property ListBox: TListBox read FItemSelector;\r\n property SelectedItemIndex: Integer read GetSelectedItemIndex write SetSelectedItemIndex default -1;\r\n property SelectedItem: String read GetSelectedItem write SetSelectedItem;\r\n property Editable: Boolean read FEditable write SetEditable default False;\r\n property OnEditChange: TNotifyEvent read FOnEditChange write FOnEditChange;\r\n public\r\n constructor Create(AOwner: TComponent); override;\r\n procedure Draw(AGraphics: TTMSFNCGraphics; ARect: TRectF); override;\r\n destructor Destroy; override;\r\n procedure DropDown; override;\r\n end;\r\n\r\n {$IFNDEF LCLLIB}\r\n [ComponentPlatformsAttribute(TMSPlatformsWeb)]\r\n {$ENDIF}\r\n TTMSFNCToolBarItemPicker = class(TTMSFNCToolBarCustomItemPicker)\r\n published\r\n property OnItemSelected;\r\n property SelectedItemIndex;\r\n property Items;\r\n property Editable;\r\n property OnEditChange;\r\n end;\r\n\r\n TTMSFNCToolBarFontNamePickerFontNameSelected = procedure(Sender: TObject; AFontName: String) of object;\r\n\r\n TTMSFNCToolBarItemPickerClass = class of TTMSFNCToolBarItemPicker;\r\n\r\n {$IFNDEF LCLLIB}\r\n [ComponentPlatformsAttribute(TMSPlatformsWeb)]\r\n {$ENDIF}\r\n TTMSFNCToolBarFontNamePicker = class(TTMSFNCToolBarCustomItemPicker)\r\n private\r\n FOnFontNameSelected: TTMSFNCToolBarFontNamePickerFontNameSelected;\r\n function GetSelectedFontName: String;\r\n procedure SetSelectedFontName(const Value: String);\r\n protected\r\n procedure RegisterRuntimeClasses; override;\r\n procedure DoItemSelected; override;\r\n public\r\n constructor Create(AOwner: TComponent); override;\r\n property SelectedFontName: String read GetSelectedFontName write SetSelectedFontName;\r\n property SelectedItemIndex;\r\n property Items;\r\n published\r\n property OnFontNameSelected: TTMSFNCToolBarFontNamePickerFontNameSelected read FOnFontNameSelected write FOnFontNameSelected;\r\n property CloseOnSelection;\r\n property Editable;\r\n property OnEditChange;\r\n end;\r\n\r\n TTMSFNCToolBarFontSizePickerFontSizeSelected = procedure(Sender: TObject; AFontSize: Single) of object;\r\n\r\n TTMSFNCToolBarFontNamePickerClass = class of TTMSFNCToolBarFontNamePicker;\r\n\r\n {$IFNDEF LCLLIB}\r\n [ComponentPlatformsAttribute(TMSPlatformsWeb)]\r\n {$ENDIF}\r\n TTMSFNCToolBarFontSizePicker = class(TTMSFNCToolBarCustomItemPicker)\r\n private\r\n FOnFontSizeSelected: TTMSFNCToolBarFontSizePickerFontSizeSelected;\r\n function GetSelectedFontSize: Single;\r\n procedure SetSelectedFontSize(const Value: Single);\r\n protected\r\n procedure RegisterRuntimeClasses; override;\r\n procedure DoItemSelected; override;\r\n public\r\n constructor Create(AOwner: TComponent); override;\r\n property SelectedFontSize: Single read GetSelectedFontSize write SetSelectedFontSize;\r\n property SelectedItemIndex;\r\n property Items;\r\n published\r\n property OnFontSizeSelected: TTMSFNCToolBarFontSizePickerFontSizeSelected read FOnFontSizeSelected write FOnFontSizeSelected;\r\n property CloseOnSelection;\r\n property Editable;\r\n property OnEditChange;\r\n end;\r\n\r\n TTMSFNCToolBarColorPickerColorSelected = procedure(Sender: TObject; AColor: TTMSFNCGraphicsColor) of object;\r\n\r\n TTMSFNCToolBarFontSizePickerClass = class of TTMSFNCToolBarFontSizePicker;\r\n\r\n {$IFNDEF LCLLIB}\r\n [ComponentPlatformsAttribute(TMSPlatformsWeb)]\r\n {$ENDIF}\r\n TTMSFNCToolBarColorPicker = class(TTMSFNCToolBarButton)\r\n private\r\n FColorSelector: TTMSFNCColorSelector;\r\n FOnColorSelected: TTMSFNCToolBarColorPickerColorSelected;\r\n function GetSelectedColor: TTMSFNCGraphicsColor;\r\n procedure SetSelectedColor(const Value: TTMSFNCGraphicsColor);\r\n function GetSelectedItemIndex: Integer;\r\n procedure SetSelectedItemIndex(const Value: Integer);\r\n function GetItems: TTMSFNCColorSelectorItems;\r\n procedure SetItems(const Value: TTMSFNCColorSelectorItems);\r\n protected\r\n procedure RegisterRuntimeClasses; override;\r\n procedure SetAdaptToStyle(const Value: Boolean); override;\r\n procedure DrawColor(AColor: TTMSFNCGraphicsColor; ARect: TRectF; AGraphics: TTMSFNCGraphics);\r\n procedure ColorSelected(Sender: TObject; AColor: TTMSFNCGraphicsColor);\r\n procedure DoColorSelected(AColor: TTMSFNCGraphicsColor); virtual;\r\n function CanChangeText: Boolean; override;\r\n public\r\n constructor Create(AOwner: TComponent); override;\r\n function BlockChange: Boolean;\r\n function ColorSelector: TTMSFNCColorSelector;\r\n procedure Draw(AGraphics: TTMSFNCGraphics; ARect: TRectF); override;\r\n procedure DrawSelectedColor(AGraphics: TTMSFNCGraphics; {%H-}ARect: TRectF); virtual;\r\n published\r\n property OnColorSelected: TTMSFNCToolBarColorPickerColorSelected read FOnColorSelected write FOnColorSelected;\r\n property SelectedColor: TTMSFNCGraphicsColor read GetSelectedColor write SetSelectedColor default gcNull;\r\n property SelectedItemIndex: Integer read GetSelectedItemIndex write SetSelectedItemIndex;\r\n property Items: TTMSFNCColorSelectorItems read GetItems write SetItems;\r\n property CloseOnSelection;\r\n end;\r\n\r\n TTMSFNCToolBarBitmapPickerBitmapSelected = procedure(Sender: TObject; ABitmap: TTMSFNCBitmap) of object;\r\n\r\n TTMSFNCToolBarColorPickerClass = class of TTMSFNCToolBarColorPicker;\r\n\r\n {$IFNDEF LCLLIB}\r\n [ComponentPlatformsAttribute(TMSPlatformsWeb)]\r\n {$ENDIF}\r\n TTMSFNCToolBarBitmapPicker = class(TTMSFNCToolBarButton)\r\n private\r\n FBitmapSelector: TTMSFNCBitmapSelector;\r\n FOnBitmapSelected: TTMSFNCToolBarBitmapPickerBitmapSelected;\r\n function GetSelectedBitmap: TTMSFNCBitmap;\r\n function GetSelectedItemIndex: Integer;\r\n procedure SetSelectedItemIndex(const Value: Integer);\r\n function GetItems: TTMSFNCBitmapSelectorItems;\r\n procedure SetItems(const Value: TTMSFNCBitmapSelectorItems);\r\n procedure SetBitmapContainer(const Value: TTMSFNCBitmapContainer); override;\r\n protected\r\n function GetBitmapRect(ARect: TRectF): TRectF; override;\r\n function CanChangeText: Boolean; override;\r\n procedure RegisterRuntimeClasses; override;\r\n procedure SetAdaptToStyle(const Value: Boolean); override;\r\n procedure BitmapSelected(Sender: TObject; ABitmap: TTMSFNCBitmap);\r\n procedure DoBitmapSelected(ABitmap: TTMSFNCBitmap); virtual;\r\n public\r\n constructor Create(AOwner: TComponent); override;\r\n function BlockChange: Boolean;\r\n function BitmapSelector: TTMSFNCBitmapSelector;\r\n property SelectedBitmap: TTMSFNCBitmap read GetSelectedBitmap;\r\n published\r\n property OnBitmapSelected: TTMSFNCToolBarBitmapPickerBitmapSelected read FOnBitmapSelected write FOnBitmapSelected;\r\n property SelectedItemIndex: Integer read GetSelectedItemIndex write SetSelectedItemIndex;\r\n property Items: TTMSFNCBitmapSelectorItems read GetItems write SetItems;\r\n property CloseOnSelection;\r\n end;\r\n\r\n TTMSFNCToolBarBitmapPickerClass = class of TTMSFNCToolBarBitmapPicker;\r\n\r\n TTMSFNCCustomToolBarAppearance = class(TPersistent)\r\n private\r\n FOwner: TTMSFNCCustomToolBar;\r\n FFill: TTMSFNCGraphicsFill;\r\n FStroke: TTMSFNCGraphicsStroke;\r\n FVerticalSpacing: Single;\r\n FHorizontalSpacing: Single;\r\n FDragGripColor: TTMSFNCGraphicsColor;\r\n FDragGrip: Boolean;\r\n FFlatStyle: Boolean;\r\n FFont: TTMSFNCGraphicsFont;\r\n FSeparatorStroke: TTMSFNCGraphicsStroke;\r\n FSeparator: Boolean;\r\n procedure SetFill(const Value: TTMSFNCGraphicsFill);\r\n procedure SetStroke(const Value: TTMSFNCGraphicsStroke);\r\n procedure SetHorizontalSpacing(const Value: Single);\r\n procedure SetVerticalSpacing(const Value: Single);\r\n procedure SetDragGrip(const Value: Boolean);\r\n procedure SetDragGripColor(const Value: TTMSFNCGraphicsColor);\r\n function IsHorizontalSpacingStored: Boolean;\r\n function IsVerticalSpacingStored: Boolean;\r\n procedure SetFlatStyle(const Value: Boolean);\r\n procedure SetSeparator(const Value: Boolean);\r\n procedure SetSeparatorStroke(const Value: TTMSFNCGraphicsStroke);\r\n protected\r\n procedure FillChanged(Sender: TObject);\r\n procedure StrokeChanged(Sender: TObject);\r\n property Fill: TTMSFNCGraphicsFill read FFill write SetFill;\r\n property Stroke: TTMSFNCGraphicsStroke read FStroke write SetStroke;\r\n property HorizontalSpacing: Single read FHorizontalSpacing write SetHorizontalSpacing stored IsHorizontalSpacingStored nodefault;\r\n property VerticalSpacing: Single read FVerticalSpacing write SetVerticalSpacing stored IsVerticalSpacingStored nodefault;\r\n property DragGrip: Boolean read FDragGrip write SetDragGrip default True;\r\n property DragGripColor: TTMSFNCGraphicsColor read FDragGripColor write SetDragGripColor default gcLightgray;\r\n property FlatStyle: Boolean read FFlatStyle write SetFlatStyle default False;\r\n property Separator: Boolean read FSeparator write SetSeparator default False;\r\n property SeparatorStroke: TTMSFNCGraphicsStroke read FSeparatorStroke write SetSeparatorStroke;\r\n public\r\n procedure Assign(Source: TPersistent); override;\r\n constructor Create(AOwner: TTMSFNCCustomToolBar);\r\n destructor Destroy; override;\r\n end;\r\n\r\n TTMSFNCToolBarAppearance = class(TTMSFNCCustomToolBarAppearance)\r\n published\r\n property FlatStyle;\r\n property Fill;\r\n property Stroke;\r\n property Separator;\r\n property SeparatorStroke;\r\n property HorizontalSpacing;\r\n property VerticalSpacing;\r\n property DragGrip;\r\n property DragGripColor;\r\n end;\r\n\r\n TTMSFNCToolBarOptionMenuItem = class(TMenuItem)\r\n private\r\n FControl: TControl;\r\n FGlyphWidth: Single;\r\n FCalculate: Boolean;\r\n protected\r\n property Calculate: Boolean read FCalculate write FCalculate;\r\n property GlyphWidth: Single read FGlyphWidth write FGlyphWidth;\r\n public\r\n property Control: TControl read FControl write FControl;\r\n end;\r\n\r\n TTMSFNCToolBarControl = class(TPersistent)\r\n private\r\n FControlIndex: Integer;\r\n FControl: TControl;\r\n FLayout: TTMSFNCToolBarButtonLayout;\r\n FBitmap: TTMSFNCBitmap;\r\n public\r\n constructor Create;\r\n destructor Destroy; override;\r\n end;\r\n\r\n TControlClass = class of TControl;\r\n\r\n TTMSFNCToolBarCustomizeOptionsMenu = procedure(Sender: TObject; APopupMenu: TPopupMenu) of object;\r\n TTMSFNCToolBarCustomizeOptionsMenuItem = procedure(Sender: TObject; AControl: TControl; AMenuItem: TMenuItem) of object;\r\n TTMSFNCToolBarCanShowOptionsMenuItem = procedure(Sender: TObject; AControl: TControl; var ACanShowItem: Boolean) of object;\r\n TTMSFNCToolBarOptionsMenuItemClick = procedure(Sender: TObject; AControl: TControl; AMenuItem: TMenuItem; var AExecuteDefaultAction: Boolean) of object;\r\n TTMSFNCToolBarIsLastElement = procedure(Sender: TObject; AControl: TControl; var AIsLastElement: Boolean) of object;\r\n TTMSFNCToolBarAnchorClickEvent = procedure(Sender: TObject; AAnchor: string) of object;\r\n\r\n TTMSFNCCustomToolBarOptionsMenu = class(TPersistent)\r\n private\r\n FOwner: TTMSFNCCustomToolBar;\r\n FShowItemText: Boolean;\r\n FShowItemBitmap: Boolean;\r\n FShowButton: Boolean;\r\n FItemBitmapWidth: Single;\r\n FAutoItemBitmapWidth: Boolean;\r\n procedure SetShowButton(const Value: Boolean);\r\n procedure SetShowItemBitmap(const Value: Boolean);\r\n procedure SetShowItemText(const Value: Boolean);\r\n procedure SetAutoItemBitmapWidth(const Value: Boolean);\r\n procedure SetItemBitmapWidth(const Value: Single);\r\n function IsItemBitmapWidthStored: Boolean;\r\n protected\r\n property ShowButton: Boolean read FShowButton write SetShowButton default True;\r\n property ShowItemBitmap: Boolean read FShowItemBitmap write SetShowItemBitmap default True;\r\n property ShowItemText: Boolean read FShowItemText write SetShowItemText default True;\r\n property AutoItemBitmapWidth: Boolean read FAutoItemBitmapWidth write SetAutoItemBitmapWidth default True;\r\n property ItemBitmapWidth: Single read FItemBitmapWidth write SetItemBitmapWidth stored IsItemBitmapWidthStored nodefault;\r\n public\r\n procedure Assign(Source: TPersistent); override;\r\n constructor Create(AOwner: TTMSFNCCustomToolBar);\r\n destructor Destroy; override;\r\n end;\r\n\r\n TTMSFNCToolBarOptionsMenu = class(TTMSFNCCustomToolBarOptionsMenu)\r\n published\r\n property ShowButton;\r\n property ShowItemBitmap;\r\n property ShowItemText;\r\n property AutoItemBitmapWidth;\r\n property ItemBitmapWidth;\r\n end;\r\n\r\n {$IFDEF WEBLIB}\r\n TTMSFNCToolBarControlObjectList = class(TObjectList)\r\n private\r\n function GetItem(Index: Integer): TTMSFNCToolBarControl;\r\n procedure SetItem(Index: Integer; const Value: TTMSFNCToolBarControl);\r\n public\r\n property Items[Index: Integer]: TTMSFNCToolBarControl read GetItem write SetItem; default;\r\n end;\r\n TTMSFNCToolBarControlList = class(TList)\r\n private\r\n function GetItem(Index: Integer): TTMSFNCToolBarControl;\r\n procedure SetItem(Index: Integer; const Value: TTMSFNCToolBarControl);\r\n public\r\n property Items[Index: Integer]: TTMSFNCToolBarControl read GetItem write SetItem; default;\r\n end;\r\n TTMSFNCControlList = class(TList)\r\n private\r\n function GetItem(Index: Integer): TControl;\r\n procedure SetItem(Index: Integer; const Value: TControl);\r\n public\r\n property Items[Index: Integer]: TControl read GetItem write SetItem; default;\r\n end;\r\n {$ENDIF}\r\n {$IFNDEF WEBLIB}\r\n TTMSFNCToolBarControlObjectList = TObjectList;\r\n TTMSFNCToolBarControlList = TList;\r\n TTMSFNCControlList = TList;\r\n {$ENDIF}\r\n\r\n TTMSFNCToolBarDragGripMovingEvent = procedure(Sender: TObject; DeltaX: Double; DeltaY: Double) of object;\r\n\r\n TTMSFNCToolBarPopup = class(TTMSFNCPopup)\r\n public\r\n property OnClosePopup;\r\n end;\r\n\r\n TTMSFNCToolBar = class;\r\n\r\n TTMSFNCToolBarCustomizeCompactToolBarEvent = procedure(Sender: TObject; ACompactToolBar: TTMSFNCToolBar) of object;\r\n\r\n {$IFDEF FNCLIB}\r\n TTMSFNCCustomToolBar = class(TTMSFNCCustomControl, ITMSFNCStylesManager, ITMSFNCBitmapContainer)\r\n {$ENDIF}\r\n {$IFNDEF FNCLIB}\r\n TTMSFNCCustomToolBar = class(TTMSFNCCustomControl)\r\n {$ENDIF}\r\n private\r\n FCompactToolbar: TTMSFNCToolBar;\r\n FCompactPopup: TTMSFNCToolBarPopup;\r\n FHover, FHoverP, FQuickMenuButtonHover, FQuickMenuButtonHoverP: Boolean;\r\n FDown, FQuickMenuButtonDown: Boolean;\r\n FOldWidth: Single;\r\n FOldMenuButtonState: Boolean;\r\n FBitmapContainer: TTMSFNCBitmapContainer;\r\n FInsideDrag, FDragGripMoving, FDragGripDown: Boolean;\r\n FDragGripDownPt: TPointF;\r\n FTotalOptionsMenuWidth: Single;\r\n {$IFNDEF LCLLIB}\r\n {$IFNDEF WEBLIB}\r\n FCompareControls: IComparer;\r\n FCompareHiddenControls: IComparer;\r\n {$ENDIF}\r\n {$ENDIF}\r\n FHiddenControls: TTMSFNCToolBarControlObjectList;\r\n FCompactControls: TTMSFNCToolBarControlObjectList;\r\n FBlockUpdate, FBlockResize: Boolean;\r\n FAutoSize: Boolean;\r\n FAppearance: TTMSFNCToolBarAppearance;\r\n FAutoAlign: Boolean;\r\n FOptionsMenuButton: TTMSFNCToolBarDropDownButton;\r\n FAutoOptionsMenu: TPopupMenu;\r\n FOnOptionsMenuCustomize: TTMSFNCToolBarCustomizeOptionsMenu;\r\n FOnOptionsMenuItemCustomize: TTMSFNCToolBarCustomizeOptionsMenuItem;\r\n FOnOptionsMenuButtonClick: TNotifyEvent;\r\n FOptionsMenu: TTMSFNCToolBarOptionsMenu;\r\n FCustomOptionsMenu: TPopupMenu;\r\n FOnOptionsMenuItemCanShow: TTMSFNCToolBarCanShowOptionsMenuItem;\r\n FState: TTMSFNCToolBarElementState;\r\n FOnOptionsMenuItemClick: TTMSFNCToolBarOptionsMenuItemClick;\r\n FOnOptionsMenuItemApplyStyle: TTMSFNCToolBarCustomizeOptionsMenuItem;\r\n FOnUpdateDockPanel: TNotifyEvent;\r\n FOnUpdateControls: TNotifyEvent;\r\n FOnIsLastElement: TTMSFNCToolBarIsLastElement;\r\n FOnDragGripMoving: TTMSFNCToolBarDragGripMovingEvent;\r\n FAutoMoveToolBar: Boolean;\r\n FOnInternalDblClick: TNotifyEvent;\r\n FOnInternalMouseDown: TNotifyEvent;\r\n FOnInternalMouseMove: TNotifyEvent;\r\n FOnInternalMouseUp: TNotifyEvent;\r\n FAutoHeight: Boolean;\r\n FAutoWidth: Boolean;\r\n FOnInternalInsertControl: TNotifyEvent;\r\n FAutoStretchHeight: Boolean;\r\n FText: string;\r\n FFirstLoad: Boolean;\r\n FFont: TTMSFNCGraphicsFont;\r\n FVerticalTextAlign: TTMSFNCGraphicsTextAlign;\r\n FTrimming: TTMSFNCGraphicsTextTrimming;\r\n FHorizontalTextAlign: TTMSFNCGraphicsTextAlign;\r\n FWordWrapping: Boolean;\r\n FTextVisible: Boolean;\r\n FMinimumWidth: Single;\r\n FCompact: Boolean;\r\n FCanCompact: Boolean;\r\n FCompactWidth: Single;\r\n FCompactAppearance: TTMSFNCToolBarCompactAppearance;\r\n FCompactBitmaps: TTMSFNCScaledBitmaps;\r\n FOnCompactClick: TNotifyEvent;\r\n FCompactBitmapSize: Single;\r\n FCompactBitmapVisible: Boolean;\r\n FCompactExpanderBitmaps: TTMSFNCScaledBitmaps;\r\n FQuickMenuButton: Boolean;\r\n FQuickMenuButtonAppearance: TTMSFNCToolBarQuickMenuButtonAppearance;\r\n FOnQuickMenuButtonClick: TNotifyEvent;\r\n FQuickMenuButtonBitmaps: TTMSFNCScaledBitmaps;\r\n FQuickMenuButtonHint: string;\r\n FCompactAutoBitmapSize: Boolean;\r\n FOnAnchorClick: TTMSFNCToolBarAnchorClickEvent;\r\n FDisabledFontColor: TTMSFNCGraphicsColor;\r\n FOnCustomizeCompactToolBar: TTMSFNCToolBarCustomizeCompactToolBarEvent;\r\n procedure SetAppearance(const Value: TTMSFNCToolBarAppearance);\r\n procedure SetAS(const Value: Boolean);\r\n procedure SetAutoAlign(const Value: Boolean);\r\n procedure SetOptionsMenu(const Value: TTMSFNCToolBarOptionsMenu);\r\n procedure SetState(const Value: TTMSFNCToolBarElementState);\r\n procedure SetAutoHeight(const Value: Boolean);\r\n procedure SetAutoWidth(const Value: Boolean);\r\n procedure SetAutoStretchHeight(const Value: Boolean);\r\n procedure SetText(const Value: string);\r\n function GetBitmapContainer: TTMSFNCBitmapContainer;\r\n procedure SetBitmapContainer(const Value: TTMSFNCBitmapContainer);\r\n procedure SetFont(const Value: TTMSFNCGraphicsFont); reintroduce;\r\n procedure SetHorizontalTextAlign(const Value: TTMSFNCGraphicsTextAlign);\r\n procedure SetTrimming(const Value: TTMSFNCGraphicsTextTrimming);\r\n procedure SetVerticalTextAlign(const Value: TTMSFNCGraphicsTextAlign);\r\n procedure SetWordWrapping(const Value: Boolean);\r\n procedure SetTextVisible(const Value: Boolean);\r\n function IsMinimumWidthStored: Boolean;\r\n procedure SetMinimumWidth(const Value: Single);\r\n procedure SetCompact(const Value: Boolean);\r\n procedure SetCanCompact(const Value: Boolean);\r\n function IsCompactWidthStored: Boolean;\r\n procedure SetCompactWidth(const Value: Single);\r\n procedure SetCompactAppearance(const Value: TTMSFNCToolBarCompactAppearance);\r\n procedure SetCompactBitmaps(const Value: TTMSFNCScaledBitmaps);\r\n function IsCompactBitmapSizeStored: Boolean;\r\n procedure SetCompactBitmapSize(const Value: Single);\r\n procedure SetCompactBitmapVisible(const Value: Boolean);\r\n procedure SetCompactExpanderBitmaps(const Value: TTMSFNCScaledBitmaps);\r\n procedure SetQuickMenuButton(const Value: Boolean);\r\n procedure SetQuickMenuButtonAppearance(\r\n const Value: TTMSFNCToolBarQuickMenuButtonAppearance);\r\n procedure SetQuickMenuButtonBitmaps(\r\n const Value: TTMSFNCScaledBitmaps);\r\n procedure SetCompactAutoBitmapSize(const Value: Boolean);\r\n function GetTextRect: TRectF;\r\n procedure SetDisabledFontColor(const Value: TTMSFNCGraphicsColor);\r\n protected\r\n {$IFDEF FNCLIB}\r\n function GetSubComponentArray: TTMSFNCStylesManagerComponentArray;\r\n {$ENDIF}\r\n function GetDocURL: string; override;\r\n function GetVersion: String; override;\r\n function CanDrawDesignTime: Boolean; virtual;\r\n function CanBuildControls: Boolean; virtual;\r\n function GetOptionsMenuButtonClass: TTMSFNCToolBarDropDownButtonClass; virtual;\r\n function GetBitmapPickerClass: TTMSFNCToolBarBitmapPickerClass; virtual;\r\n function GetToolBarButtonClass: TTMSFNCToolBarButtonClass; virtual;\r\n function GetColorPickerClass: TTMSFNCToolBarColorPickerClass; virtual;\r\n function GetItemPickerClass: TTMSFNCToolBarItemPickerClass; virtual;\r\n function GetFontNamePickerClass: TTMSFNCToolBarFontNamePickerClass; virtual;\r\n function GetFontSizePickerClass: TTMSFNCToolBarFontSizePickerClass; virtual;\r\n function GetToolBarSeparatorClass: TTMSFNCToolBarSeparatorClass; virtual;\r\n function GetTextSize: TSizeF; virtual;\r\n function GetHiddenControl(AControl: TControl): TTMSFNCToolBarControl; virtual;\r\n function GetCompactControl(AControl: TControl): TTMSFNCToolBarControl; virtual;\r\n function GetHiddenControlCount(AControl: TControl): Integer; virtual;\r\n function GetCompactControlCount: Integer; virtual;\r\n function GetCompactTextRect: TRectF; virtual;\r\n function GetCompactBitmapRect(ARect: TRectF): TRectF; virtual;\r\n function GetCompactBitmapSize: Single; virtual;\r\n function GetQuickMenuButtonRect: TRectF; virtual;\r\n function HasHint: Boolean; override;\r\n function GetHintString: String; override;\r\n procedure ChangeDPIScale(M, D: Integer); override;\r\n procedure HandleQuickMenuButton; virtual;\r\n procedure CompactAppearanceChanged(Sender: TObject);\r\n procedure QuickMenuButtonAppearanceChanged(Sender: TObject);\r\n procedure CompactBitmapsChanged(Sender: TObject);\r\n procedure CompactExpanderBitmapsChanged(Sender: TObject);\r\n procedure QuickMenuButtonBitmapsChanged(Sender: TObject); \r\n procedure ApplyFlatStyle; virtual;\r\n procedure SetAdaptToStyle(const Value: Boolean); override;\r\n procedure ApplyStyle; override;\r\n procedure ResetToDefaultStyle; override;\r\n procedure HandleMouseDown(Button: TTMSFNCMouseButton; Shift: TShiftState; X, Y: Single); override;\r\n procedure HandleMouseMove(Shift: TShiftState; X, Y: Single); override;\r\n procedure HandleMouseLeave; override;\r\n procedure HandleMouseUp(Button: TTMSFNCMouseButton; Shift: TShiftState; X, Y: Single); override;\r\n procedure HandleCompact; virtual;\r\n procedure DeactivateAllPopups; virtual;\r\n procedure DoCompactClick; virtual;\r\n procedure DoCustomizeCompactToolBar(ACompactToolBar: TTMSFNCToolBar); virtual;\r\n procedure HandleDblClick({%H-}X, {%H-}Y: Single); override;\r\n procedure UpdateDockPanel; virtual;\r\n procedure InsertToolBarControl(AControl: TControl; {%H-}AIndex: Integer);\r\n procedure DoDragGripMoving(ADeltaX, ADeltaY: Double); virtual;\r\n {$IFDEF FMXLIB}\r\n procedure SetVisible(const Value: Boolean); override;\r\n procedure DoMatrixChanged(Sender: TObject); override;\r\n {$ENDIF}\r\n {$IFDEF CMNWEBLIB}\r\n procedure VisibleChanging; override;\r\n {$ENDIF}\r\n function GetDragGripRect(AInteraction: Boolean = False): TRectF;\r\n procedure CompactControls; virtual;\r\n procedure UncompactControls; virtual;\r\n procedure DoCustomizeOptionsMenu; virtual;\r\n procedure DoCustomizeOptionsMenuItem(AControl: TControl; AMenuItem: TMenuItem); virtual;\r\n procedure DoCanShowOptionsMenuItem(AControl: TControl; var ACanShowItem: Boolean); virtual;\r\n procedure UpdateToolBar(Sender: TObject);\r\n procedure DoIsLastElement(AControl: TControl; var ALastElement: Boolean);\r\n procedure UpdateToolBarControl(Sender: TObject);\r\n procedure OptionMenuItemClick(Sender: TObject);\r\n {$IFDEF FMXLIB}\r\n procedure OptionMenuItemApplyStyleLookup(Sender: TObject);\r\n {$ENDIF}\r\n procedure OptionsButtonClick(Sender: TObject);\r\n procedure DoCloseCompactPopup(Sender: TObject);\r\n procedure Notification(AComponent: TComponent; Operation: TOperation); override;\r\n\r\n {$IFDEF FMXLIB}\r\n procedure DoAddObject(const AObject: TFmxObject); override;\r\n procedure DoInsertObject(Index: Integer; const AObject: TFmxObject); override;\r\n procedure DoRemoveObject(const AObject: TFmxObject); override;\r\n {$ENDIF}\r\n\r\n {$IFDEF CMNWEBLIB}\r\n procedure AlignControls(AControl: TControl; var Rect: TRect); override;\r\n {$ENDIF}\r\n procedure UpdateControlAfterResize; override;\r\n procedure UpdateControls; virtual;\r\n procedure InitializeOptionsMenu; virtual;\r\n procedure DrawDragGrip(AGraphics: TTMSFNCGraphics); virtual;\r\n procedure DrawText(AGraphics: TTMSFNCGraphics); virtual;\r\n procedure DrawCompactBitmap(AGraphics: TTMSFNCGraphics; ARect: TRectF); virtual;\r\n procedure DrawCompactText(AGraphics: TTMSFNCGraphics); virtual;\r\n procedure DrawCompactExpander(AGraphics: TTMSFNCGraphics); virtual;\r\n procedure ShowOptionsMenu(X, Y: Single); virtual;\r\n function CheckIsLoading: Boolean; virtual;\r\n function XYToAnchor(AX, AY: Single): string;\r\n procedure DoAnchorClick(AAnchor: string); virtual;\r\n procedure Loaded; override;\r\n property BlockUpdate: Boolean read FBlockUpdate write FBlockUpdate;\r\n property OnCompactClick: TNotifyEvent read FOnCompactClick write FOnCompactClick;\r\n property OnUpdateControls: TNotifyEvent read FOnUpdateControls write FOnUpdateControls;\r\n property OnUpdateDockPanel: TNotifyEvent read FOnUpdateDockPanel write FOnUpdateDockPanel;\r\n property OnInternalMouseDown: TNotifyEvent read FOnInternalMouseDown write FOnInternalMouseDown;\r\n property OnInternalInsertControl: TNotifyEvent read FOnInternalInsertControl write FOnInternalInsertControl;\r\n property OnInternalMouseUp: TNotifyEvent read FOnInternalMouseUp write FOnInternalMouseUp;\r\n property OnInternalMouseMove: TNotifyEvent read FOnInternalMouseMove write FOnInternalMouseMove;\r\n property OnInternalDblClick: TNotifyEvent read FOnInternalDblClick write FOnInternalDblClick;\r\n property Version: String read GetVersion;\r\n property AutoSize: Boolean read FAutoSize write SetAS default True;\r\n property AutoHeight: Boolean read FAutoHeight write SetAutoHeight default True;\r\n property AutoWidth: Boolean read FAutoWidth write SetAutoWidth default True;\r\n property AutoAlign: Boolean read FAutoAlign write SetAutoAlign default True;\r\n property AutoStretchHeight: Boolean read FAutoStretchHeight write SetAutoStretchHeight default False;\r\n property AutoMoveToolBar: Boolean read FAutoMoveToolBar write FAutoMoveToolBar default True;\r\n property Appearance: TTMSFNCToolBarAppearance read FAppearance write SetAppearance;\r\n property WordWrapping: Boolean read FWordWrapping write SetWordWrapping default False;\r\n property Text: string read FText write SetText;\r\n property TextVisible: Boolean read FTextVisible write SetTextVisible default True;\r\n property Trimming: TTMSFNCGraphicsTextTrimming read FTrimming write SetTrimming default gttCharacter;\r\n property HorizontalTextAlign: TTMSFNCGraphicsTextAlign read FHorizontalTextAlign write SetHorizontalTextAlign default gtaCenter;\r\n property VerticalTextAlign: TTMSFNCGraphicsTextAlign read FVerticalTextAlign write SetVerticalTextAlign default gtaCenter;\r\n property Font: TTMSFNCGraphicsFont read FFont write SetFont;\r\n property DisabledFontColor: TTMSFNCGraphicsColor read FDisabledFontColor write SetDisabledFontColor default gcNull;\r\n property OptionsMenu: TTMSFNCToolBarOptionsMenu read FOptionsMenu write SetOptionsMenu;\r\n property OnOptionsMenuItemCanShow: TTMSFNCToolBarCanShowOptionsMenuItem read FOnOptionsMenuItemCanShow write FOnOptionsMenuItemCanShow;\r\n property OnOptionsMenuCustomize: TTMSFNCToolBarCustomizeOptionsMenu read FOnOptionsMenuCustomize write FOnOptionsMenuCustomize;\r\n property OnOptionsMenuItemCustomize: TTMSFNCToolBarCustomizeOptionsMenuItem read FOnOptionsMenuItemCustomize write FOnOptionsMenuItemCustomize;\r\n property OnOptionsMenuItemApplyStyle: TTMSFNCToolBarCustomizeOptionsMenuItem read FOnOptionsMenuItemApplyStyle write FOnOptionsMenuItemApplyStyle;\r\n property OnOptionsMenuButtonClick: TNotifyEvent read FOnOptionsMenuButtonClick write FOnOptionsMenuButtonClick;\r\n property OnOptionsMenuItemClick: TTMSFNCToolBarOptionsMenuItemClick read FOnOptionsMenuItemClick write FOnOptionsMenuItemClick;\r\n property CustomOptionsMenu: TPopupMenu read FCustomOptionsMenu write FCustomOptionsMenu;\r\n property State: TTMSFNCToolBarElementState read FState write SetState default esNormal;\r\n property OnIsLastElement: TTMSFNCToolBarIsLastElement read FOnIsLastElement write FOnIsLastElement;\r\n property OnDragGripMoving: TTMSFNCToolBarDragGripMovingEvent read FOnDragGripMoving write FOnDragGripMoving;\r\n property AutoOptionsMenu: TPopupMenu read FAutoOptionsMenu;\r\n property BitmapContainer: TTMSFNCBitmapContainer read GetBitmapContainer write SetBitmapContainer;\r\n property MinimumWidth: Single read FMinimumWidth write SetMinimumWidth stored IsMinimumWidthStored nodefault;\r\n property CompactBitmapVisible: Boolean read FCompactBitmapVisible write SetCompactBitmapVisible default False;\r\n property CompactAutoBitmapSize: Boolean read FCompactAutoBitmapSize write SetCompactAutoBitmapSize default False;\r\n property CompactBitmaps: TTMSFNCScaledBitmaps read FCompactBitmaps write SetCompactBitmaps;\r\n property Compact: Boolean read FCompact write SetCompact default False;\r\n property QuickMenuButton: Boolean read FQuickMenuButton write SetQuickMenuButton default False;\r\n property QuickMenuButtonHint: string read FQuickMenuButtonHint write FQuickMenuButtonHint;\r\n property CompactWidth: Single read FCompactWidth write SetCompactWidth stored IsCompactWidthStored nodefault;\r\n property CanCompact: Boolean read FCanCompact write SetCanCompact default True;\r\n property CompactAppearance: TTMSFNCToolBarCompactAppearance read FCompactAppearance write SetCompactAppearance;\r\n property QuickMenuButtonAppearance: TTMSFNCToolBarQuickMenuButtonAppearance read FQuickMenuButtonAppearance write SetQuickMenuButtonAppearance;\r\n property CompactBitmapSize: Single read FCompactBitmapSize write SetCompactBitmapSize stored IsCompactBitmapSizeStored nodefault;\r\n property CompactExpanderBitmaps: TTMSFNCScaledBitmaps read FCompactExpanderBitmaps write SetCompactExpanderBitmaps;\r\n property QuickMenuButtonBitmaps: TTMSFNCScaledBitmaps read FQuickMenuButtonBitmaps write SetQuickMenuButtonBitmaps; \r\n property OnQuickMenuButtonClick: TNotifyEvent read FOnQuickMenuButtonClick write FOnQuickMenuButtonClick;\r\n property OnAnchorClick: TTMSFNCToolBarAnchorClickEvent read FOnAnchorClick write FOnAnchorClick;\r\n property OnCustomizeCompactToolBar: TTMSFNCToolBarCustomizeCompactToolBarEvent read FOnCustomizeCompactToolBar write FOnCustomizeCompactToolBar;\r\n public\r\n procedure Assign(Source: TPersistent); override;\r\n constructor Create(AOwner: TComponent); override;\r\n destructor Destroy; override;\r\n procedure Build; virtual;\r\n procedure Draw(AGraphics: TTMSFNCGraphics; ARect: TRectF); override;\r\n {$IFDEF FMXLIB}\r\n procedure SetBounds(X, Y, AWidth, AHeight: Single); override;\r\n {$ENDIF}\r\n function CanExpand: Boolean; virtual;\r\n function CanShrink: Boolean; virtual;\r\n function DropDownActive: Boolean; virtual;\r\n procedure CloseCompactPopup; virtual;\r\n procedure AddCustomControl(AControl: TControl; AIndex: Integer = -1); virtual;\r\n function AddCustomControlClass(AControlClass: TControlClass; AIndex: Integer = -1): TControl; virtual;\r\n function AddButton(AWidth: Single = -1; AHeight: Single = -1; AResource: String = ''; AResourceLarge: String = ''; AText: String = '';\r\n AIndex: Integer = -1): TTMSFNCToolBarButton; overload; virtual;\r\n function AddSeparator(AIndex: Integer = -1): TTMSFNCToolBarSeparator; virtual;\r\n function AddFontNamePicker(AIndex: Integer = -1): TTMSFNCToolBarFontNamePicker; virtual;\r\n function AddFontSizePicker(AIndex: Integer = -1): TTMSFNCToolBarFontSizePicker; virtual;\r\n function AddColorPicker(AIndex: Integer = -1): TTMSFNCToolBarColorPicker; virtual;\r\n function AddItemPicker(AIndex: Integer = -1): TTMSFNCToolBarItemPicker; virtual;\r\n function AddBitmapPicker(AIndex: Integer = -1): TTMSFNCToolBarBitmapPicker; virtual;\r\n function GetOptionsMenuButtonControl: TTMSFNCToolBarDropDownButton; virtual;\r\n end;\r\n\r\n {$IFNDEF LCLLIB}\r\n [ComponentPlatformsAttribute(TMSPlatformsWeb)]\r\n {$ENDIF}\r\n TTMSFNCToolBar = class(TTMSFNCCustomToolBar)\r\n protected\r\n procedure RegisterRuntimeClasses; override;\r\n published\r\n property OnOptionsMenuButtonClick;\r\n property OnOptionsMenuItemCanShow;\r\n property OnOptionsMenuCustomize;\r\n property OnOptionsMenuItemCustomize;\r\n property OnOptionsMenuItemApplyStyle;\r\n property OnOptionsMenuItemClick;\r\n property OnIsLastElement;\r\n property OnDragGripMoving;\r\n property OnQuickMenuButtonClick;\r\n property OnAnchorClick;\r\n //\r\n property Version;\r\n property AutoHeight;\r\n property AutoWidth;\r\n property AutoSize;\r\n property AutoAlign;\r\n property AutoStretchHeight;\r\n property OnCustomizeCompactToolBar;\r\n property AutoMoveToolBar;\r\n property Appearance;\r\n property CanCompact;\r\n property OnCompactClick;\r\n property CompactBitmapVisible;\r\n property CompactBitmaps;\r\n property Compact;\r\n property CompactWidth;\r\n property CompactAppearance;\r\n property CompactBitmapSize;\r\n property CompactAutoBitmapSize;\r\n property QuickMenuButtonHint;\r\n property QuickMenuButton;\r\n property QuickMenuButtonAppearance;\r\n property MinimumWidth;\r\n property WordWrapping;\r\n property Text;\r\n property Trimming;\r\n property HorizontalTextAlign;\r\n property VerticalTextAlign;\r\n property Font;\r\n property DisabledFontColor;\r\n property OptionsMenu;\r\n property CustomOptionsMenu;\r\n property State;\r\n end;\r\n\r\n TTMSFNCCustomDockPanelAppearance = class(TPersistent)\r\n private\r\n FOwner: TTMSFNCCustomDockPanel;\r\n FFill: TTMSFNCGraphicsFill;\r\n FStroke: TTMSFNCGraphicsStroke;\r\n FMargins: TTMSFNCMargins;\r\n procedure SetFill(const Value: TTMSFNCGraphicsFill);\r\n procedure SetStroke(const Value: TTMSFNCGraphicsStroke);\r\n procedure SetMargins(const Value: TTMSFNCMargins);\r\n protected\r\n procedure FillChanged(Sender: TObject);\r\n procedure StrokeChanged(Sender: TObject);\r\n procedure MarginsChanged(Sender: TObject);\r\n property Fill: TTMSFNCGraphicsFill read FFill write SetFill;\r\n property Stroke: TTMSFNCGraphicsStroke read FStroke write SetStroke;\r\n property Margins: TTMSFNCMargins read FMargins write SetMargins;\r\n public\r\n constructor Create(AOwner: TTMSFNCCustomDockPanel);\r\n destructor Destroy; override;\r\n end;\r\n\r\n TTMSFNCDockPanelAppearance = class(TTMSFNCCustomDockPanelAppearance)\r\n published\r\n property Fill;\r\n property Stroke;\r\n end;\r\n\r\n TTMSFNCCustomDockPanel = class(TTMSFNCCustomControl)\r\n private\r\n FBlockUpdate: Boolean;\r\n FAppearance: TTMSFNCDockPanelAppearance;\r\n FAutoSize: Boolean;\r\n FAutoAlign: Boolean;\r\n FState: TTMSFNCToolBarElementState;\r\n procedure SetAppearance(const Value: TTMSFNCDockPanelAppearance);\r\n procedure SetAutoAlign(const Value: Boolean);\r\n procedure SetAS(const Value: Boolean);\r\n procedure SetState(const Value: TTMSFNCToolBarElementState);\r\n protected\r\n function GetDocURL: string; override;\r\n function GetVersion: String; override;\r\n procedure SetAdaptToStyle(const Value: Boolean); override;\r\n procedure UpdateControls; virtual;\r\n procedure InitializeControls; virtual;\r\n procedure RearrangeControls; virtual;\r\n procedure UpdateDockPanel(Sender: TObject);\r\n procedure ApplyStyle; override;\r\n procedure ResetToDefaultStyle; override;\r\n\r\n {$IFDEF FMXLIB}\r\n procedure DoAddObject(const AObject: TFmxObject); override;\r\n procedure DoInsertObject(Index: Integer; const AObject: TFmxObject); override;\r\n procedure DoRemoveObject(const AObject: TFmxObject); override;\r\n {$ENDIF}\r\n {$IFDEF CMNWEBLIB}\r\n procedure AlignControls(AControl: TControl; var Rect: TRect); override;\r\n {$ENDIF}\r\n\r\n property Version: String read GetVersion;\r\n property Appearance: TTMSFNCDockPanelAppearance read FAppearance write SetAppearance;\r\n property AutoSize: Boolean read FAutoSize write SetAS default True;\r\n property AutoAlign: Boolean read FAutoAlign write SetAutoAlign default True;\r\n property State: TTMSFNCToolBarElementState read FState write SetState default esNormal;\r\n public\r\n procedure Assign(Source: TPersistent); override;\r\n constructor Create(AOwner: TComponent); override;\r\n destructor Destroy; override;\r\n procedure Draw(AGraphics: TTMSFNCGraphics; ARect: TRectF); override;\r\n function AddToolBar({%H-}AIndex: Integer = -1): TTMSFNCToolBar;\r\n {$IFDEF FMXLIB}\r\n procedure SetBounds(X, Y, AWidth, AHeight: Single); override;\r\n {$ENDIF}\r\n end;\r\n\r\n {$IFNDEF LCLLIB}\r\n [ComponentPlatformsAttribute(TMSPlatformsWeb)]\r\n {$ENDIF}\r\n TTMSFNCDockPanel = class(TTMSFNCCustomDockPanel)\r\n published\r\n property Version;\r\n property Appearance;\r\n property AutoSize;\r\n property AutoAlign;\r\n property State;\r\n end;\r\n\r\n {$IFDEF CMNWEBLIB}\r\n TTMSFNCToolBarParent = TWinControl;\r\n {$ENDIF}\r\n {$IFDEF FMXLIB}\r\n TTMSFNCToolBarParent = TControl;\r\n {$ENDIF}\r\n\r\nimplementation\r\n\r\nuses\r\n Math, SysUtils, WEBLib.TMSFNCUtils\r\n {$IFNDEF WEBLIB}\r\n {$IFDEF FNCLIB}\r\n {$IFNDEF LCLLIB}\r\n {$HINTS OFF}\r\n {$IF COMPILERVERSION >= 30}\r\n ,FMX.ActnList, FMX.ImgList\r\n {$IFEND}\r\n {$HINTS ON}\r\n {$ENDIF}\r\n {$ENDIF}\r\n {$ENDIF}\r\n ,WEBLib.Graphics, {%H-}StrUtils;\r\n\r\ntype\r\n TControlOpen = class(TControl);\r\n\r\nfunction TTMSFNCCustomToolBar.AddBitmapPicker(\r\n AIndex: Integer): TTMSFNCToolBarBitmapPicker;\r\nbegin\r\n FBlockUpdate := True;\r\n Result := GetBitmapPickerClass.Create(Self);\r\n Result.Appearance.FlatStyle := Appearance.FlatStyle;\r\n InsertToolBarControl(Result, AIndex);\r\n FBlockUpdate := False;\r\n UpdateControls;\r\nend;\r\n\r\nfunction TTMSFNCCustomToolBar.AddButton(AWidth: Single = -1; AHeight: Single = -1;\r\n AResource: String = ''; AResourceLarge: String = ''; AText: String = ''; AIndex: Integer = -1): TTMSFNCToolBarButton;\r\nbegin\r\n FBlockUpdate := True;\r\n Result := GetToolBarButtonClass.Create(Self);\r\n Result.Appearance.FlatStyle := Appearance.FlatStyle;\r\n Result.Text := AText;\r\n if AWidth <> -1 then\r\n begin\r\n {$IFDEF FMXLIB}\r\n Result.Width := AWidth;\r\n {$ENDIF}\r\n {$IFDEF CMNWEBLIB}\r\n Result.Width := Round(AWidth);\r\n {$ENDIF}\r\n end;\r\n\r\n if AHeight <> -1 then\r\n begin\r\n {$IFDEF FMXLIB}\r\n Result.Height := AHeight;\r\n {$ENDIF}\r\n {$IFDEF CMNWEBLIB}\r\n Result.Height := Round(AHeight);\r\n {$ENDIF}\r\n end;\r\n\r\n if AResource <> '' then\r\n begin\r\n Result.Bitmaps.AddBitmapFromResource(AResource, HInstance, 1.0);\r\n Result.DisabledBitmaps.AddBitmapFromResource(AResource, HInstance, 1.0);\r\n Result.HoverBitmaps.AddBitmapFromResource(AResource, HInstance, 1.0);\r\n end;\r\n\r\n if AResourceLarge <> '' then\r\n begin\r\n Result.Bitmaps.AddBitmapFromResource(AResourceLarge, HInstance, 1.5);\r\n Result.DisabledBitmaps.AddBitmapFromResource(AResourceLarge, HInstance, 1.5);\r\n Result.HoverBitmaps.AddBitmapFromResource(AResourceLarge, HInstance, 1.5);\r\n end;\r\n\r\n InsertToolBarControl(Result, AIndex);\r\n\r\n FBlockUpdate := False;\r\n UpdateControls;\r\nend;\r\n\r\nfunction TTMSFNCCustomToolBar.AddColorPicker(\r\n AIndex: Integer): TTMSFNCToolBarColorPicker;\r\nbegin\r\n FBlockUpdate := True;\r\n Result := GetColorPickerClass.Create(Self);\r\n Result.Appearance.FlatStyle := Appearance.FlatStyle;\r\n InsertToolBarControl(Result, AIndex);\r\n FBlockUpdate := False;\r\n UpdateControls;\r\nend;\r\n\r\nprocedure TTMSFNCCustomToolBar.AddCustomControl(AControl: TControl; AIndex: Integer = -1);\r\nbegin\r\n FBlockUpdate := True;\r\n InsertToolBarControl(AControl, AIndex);\r\n FBlockUpdate := False;\r\n UpdateControls;\r\nend;\r\n\r\nfunction TTMSFNCCustomToolBar.AddCustomControlClass(AControlClass: TControlClass;\r\n AIndex: Integer = -1): TControl;\r\nbegin\r\n FBlockUpdate := True;\r\n Result := AControlClass.Create(Self);\r\n InsertToolBarControl(Result, AIndex);\r\n FBlockUpdate := False;\r\n UpdateControls;\r\nend;\r\n\r\nfunction TTMSFNCCustomToolBar.AddFontNamePicker(\r\n AIndex: Integer): TTMSFNCToolBarFontNamePicker;\r\nbegin\r\n FBlockUpdate := True;\r\n Result := GetFontNamePickerClass.Create(Self);\r\n Result.Appearance.FlatStyle := Appearance.FlatStyle;\r\n InsertToolBarControl(Result, AIndex);\r\n FBlockUpdate := False;\r\n UpdateControls;\r\nend;\r\n\r\nfunction TTMSFNCCustomToolBar.AddFontSizePicker(\r\n AIndex: Integer): TTMSFNCToolBarFontSizePicker;\r\nbegin\r\n FBlockUpdate := True;\r\n Result := GetFontSizePickerClass.Create(Self);\r\n Result.Appearance.FlatStyle := Appearance.FlatStyle;\r\n InsertToolBarControl(Result, AIndex);\r\n FBlockUpdate := False;\r\n UpdateControls;\r\nend;\r\n\r\nfunction TTMSFNCCustomToolBar.AddItemPicker(\r\n AIndex: Integer): TTMSFNCToolBarItemPicker;\r\nbegin\r\n FBlockUpdate := True;\r\n Result := GetItemPickerClass.Create(Self);\r\n Result.Appearance.FlatStyle := Appearance.FlatStyle;\r\n InsertToolBarControl(Result, AIndex);\r\n FBlockUpdate := False;\r\n UpdateControls;\r\nend;\r\n\r\nfunction TTMSFNCCustomToolBar.AddSeparator(AIndex: Integer = -1): TTMSFNCToolBarSeparator;\r\nbegin\r\n FBlockUpdate := True;\r\n Result := GetToolBarSeparatorClass.Create(Self);\r\n InsertToolBarControl(Result, AIndex);\r\n FBlockUpdate := False;\r\n UpdateControls;\r\nend;\r\n\r\nprocedure TTMSFNCCustomToolBar.ApplyFlatStyle;\r\nvar\r\n I: Integer;\r\n c: TControl;\r\nbegin\r\n for I := 0 to Self.ControlCount - 1 do\r\n begin\r\n c := Self.Controls[I];\r\n {$IFDEF FMXLIB}\r\n if Supports(c, IDesignerControl) then\r\n Continue;\r\n {$ENDIF}\r\n\r\n if c is TTMSFNCDefaultToolBarButton then\r\n (c as TTMSFNCDefaultToolBarButton).Appearance.FlatStyle := Appearance.FlatStyle;\r\n\r\n if c is TTMSFNCCustomToolBar then\r\n (c as TTMSFNCCustomToolBar).Appearance.FlatStyle := Appearance.FlatStyle;\r\n end;\r\n\r\n Invalidate;\r\nend;\r\n\r\nprocedure TTMSFNCCustomToolBar.ApplyStyle;\r\nvar\r\n c: TTMSFNCGraphicsColor;\r\nbegin\r\n inherited;\r\n c := gcNull;\r\n if TTMSFNCStyles.GetStyleHeaderFillColor(c) then\r\n begin\r\n Appearance.Fill.Kind := gfkSolid;\r\n Appearance.Fill.Color := c;\r\n end;\r\n\r\n if TTMSFNCStyles.GetStyleHeaderFillColorTo(c) then\r\n begin\r\n Appearance.Fill.Kind := gfkGradient;\r\n Appearance.Fill.ColorTo := c;\r\n end;\r\n\r\n if TTMSFNCStyles.GetStyleTextFontColor(c) then\r\n Font.Color := c;\r\nend;\r\n\r\nprocedure TTMSFNCCustomToolBar.Assign(Source: TPersistent);\r\nvar\r\n c, cc: TControl;\r\n I: Integer;\r\nbegin\r\n inherited;\r\n if Source is TTMSFNCCustomToolBar then\r\n begin\r\n FCompactAppearance.Assign((Source as TTMSFNCCustomToolBar).CompactAppearance);\r\n FQuickMenuButtonAppearance.Assign((Source as TTMSFNCCustomToolBar).QuickMenuButtonAppearance);\r\n FQuickMenuButton := (Source as TTMSFNCCustomToolBar).QuickMenuButton;\r\n FCompactBitmaps.Assign((Source as TTMSFNCCustomToolBar).CompactBitmaps);\r\n FCompact := (Source as TTMSFNCCustomToolBar).Compact;\r\n FCanCompact := (Source as TTMSFNCCustomToolBar).CanCompact;\r\n FMinimumWidth := (Source as TTMSFNCCustomToolBar).MinimumWidth;\r\n FCompactWidth := (Source as TTMSFNCCustomToolBar).CompactWidth;\r\n FCompactBitmapSize := (Source as TTMSFNCCustomToolBar).CompactBitmapSize;\r\n FCompactAutoBitmapSize := (Source as TTMSFNCCustomToolBar).CompactAutoBitmapSize;\r\n FCompactExpanderBitmaps.Assign((Source as TTMSFNCCustomToolBar).CompactExpanderBitmaps);\r\n FQuickMenuButtonBitmaps.Assign((Source as TTMSFNCCustomToolBar).QuickMenuButtonBitmaps); \r\n FCompactBitmapVisible := (Source as TTMSFNCCustomToolBar).CompactBitmapVisible;\r\n FText := (Source as TTMSFNCCustomToolBar).Text;\r\n FTextVisible := (Source as TTMSFNCCustomToolBar).TextVisible;\r\n FWordWrapping := (Source as TTMSFNCCustomToolBar).WordWrapping;\r\n FHorizontalTextAlign := (Source as TTMSFNCCustomToolBar).HorizontalTextAlign;\r\n FVerticalTextAlign := (Source as TTMSFNCCustomToolBar).VerticalTextAlign;\r\n FTrimming := (Source as TTMSFNCCustomToolBar).Trimming;\r\n FFont.Assign((Source as TTMSFNCCustomToolBar).Font);\r\n FAutoSize := (Source as TTMSFNCCustomToolBar).AutoSize;\r\n FAutoHeight := (Source as TTMSFNCCustomToolBar).AutoHeight;\r\n FAutoWidth := (Source as TTMSFNCCustomToolBar).AutoWidth;\r\n FAutoAlign := (Source as TTMSFNCCustomToolBar).AutoAlign;\r\n FAutoStretchHeight := (Source as TTMSFNCCustomToolBar).AutoStretchHeight;\r\n FAutoMoveToolBar := (Source as TTMSFNCCustomToolBar).AutoMoveToolBar;\r\n FAppearance.Assign((Source as TTMSFNCCustomToolBar).Appearance);\r\n for I := 0 to (Source as TTMSFNCCustomToolBar).ControlCount - 1 do\r\n begin\r\n cc := (Source as TTMSFNCCustomToolBar).Controls[I];\r\n if ((cc is TTMSFNCDefaultToolBarButton) and (cc as TTMSFNCDefaultToolBarButton).CanCopy) or not ((cc is TTMSFNCDefaultToolBarButton) and (cc is TControl)) then\r\n begin\r\n if cc is TTMSFNCDefaultToolBarButton then\r\n (cc as TTMSFNCDefaultToolBarButton).ApplyName := False;\r\n\r\n c := (TTMSFNCUtils.Clone(cc) as TControl);\r\n if cc is TTMSFNCDefaultToolBarButton then\r\n (cc as TTMSFNCDefaultToolBarButton).ApplyName := True;\r\n\r\n AddCustomControl(c);\r\n end;\r\n end;\r\n Invalidate;\r\n end\r\n else\r\n inherited;\r\nend;\r\n\r\nprocedure TTMSFNCCustomToolBar.Build;\r\nbegin\r\n UpdateControls;\r\nend;\r\n\r\nprocedure TTMSFNCCustomToolBar.ChangeDPIScale(M, D: Integer);\r\nbegin\r\n inherited;\r\n Font.Height := TTMSFNCUtils.MulDivInt(Font.Height, M, D);\r\n Appearance.HorizontalSpacing := TTMSFNCUtils.MulDivSingle(Appearance.HorizontalSpacing, M, D);\r\n Appearance.VerticalSpacing := TTMSFNCUtils.MulDivSingle(Appearance.VerticalSpacing, M, D);\r\n CompactWidth := TTMSFNCUtils.MulDivSingle(CompactWidth, M, D);\r\n CompactBitmapSize := TTMSFNCUtils.MulDivSingle(CompactBitmapSize, M, D);\r\nend;\r\n\r\nfunction TTMSFNCCustomToolBar.CheckIsLoading: Boolean;\r\nbegin\r\n Result := IsLoading;\r\nend;\r\n\r\nfunction TTMSFNCCustomToolBar.CanShrink: Boolean;\r\nvar\r\n I: Integer;\r\n c: TControl;\r\n btn: TTMSFNCDefaultToolBarButton;\r\nbegin\r\n Result := False;\r\n\r\n if not Compact and CanCompact then\r\n begin\r\n Result := True;\r\n Exit;\r\n end;\r\n\r\n for I := Self.ControlCount - 1 downto 0 do\r\n begin\r\n c := Self.Controls[I];\r\n {$IFDEF FMXLIB}\r\n if Supports(c, IDesignerControl) then\r\n Continue;\r\n {$ENDIF}\r\n\r\n if c <> FOptionsMenuButton then\r\n begin\r\n if c is TTMSFNCDefaultToolBarButton then\r\n begin\r\n btn := c as TTMSFNCDefaultToolBarButton;\r\n if (Integer(btn.Layout) > Integer(btn.MinimumLayout)) and (btn.Layout <> bblNone) then\r\n begin\r\n Result := True;\r\n Break;\r\n end;\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomToolBar.CloseCompactPopup;\r\nbegin\r\n if Assigned(FCompactPopup) then\r\n FCompactPopup.IsOpen := False;\r\nend;\r\n\r\nfunction TTMSFNCCustomToolBar.CanBuildControls: Boolean;\r\nbegin\r\n Result := True;\r\nend;\r\n\r\nfunction TTMSFNCCustomToolBar.CanDrawDesignTime: Boolean;\r\nbegin\r\n Result := False;\r\nend;\r\n\r\nfunction TTMSFNCCustomToolBar.CanExpand: Boolean;\r\nvar\r\n I: Integer;\r\n c: TControl;\r\n btn: TTMSFNCDefaultToolBarButton;\r\nbegin\r\n Result := False;\r\n\r\n if Compact then\r\n begin\r\n Result := True;\r\n Exit;\r\n end;\r\n\r\n for I := Self.ControlCount - 1 downto 0 do\r\n begin\r\n c := Self.Controls[I];\r\n {$IFDEF FMXLIB}\r\n if Supports(c, IDesignerControl) then\r\n Continue;\r\n {$ENDIF}\r\n\r\n if c <> FOptionsMenuButton then\r\n begin\r\n if c is TTMSFNCDefaultToolBarButton then\r\n begin\r\n btn := c as TTMSFNCDefaultToolBarButton;\r\n if (Integer(btn.Layout) < Integer(btn.MaximumLayout)) and (btn.Layout <> bblNone) then\r\n begin\r\n Result := True;\r\n Break;\r\n end;\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomToolBar.CompactAppearanceChanged(Sender: TObject);\r\nbegin\r\n Invalidate;\r\nend;\r\n\r\nprocedure TTMSFNCCustomToolBar.CompactBitmapsChanged(Sender: TObject);\r\nvar\r\n bmp: TTMSFNCBitmap;\r\nbegin\r\n bmp := TTMSFNCGraphics.GetScaledBitmap(CompactBitmaps, 0, BitmapContainer);\r\n CompactBitmapVisible := Assigned(bmp) and not IsBitmapEmpty(bmp);\r\n Invalidate;\r\nend;\r\n\r\nprocedure TTMSFNCCustomToolBar.CompactControls;\r\nvar\r\n I: Integer;\r\n cc: TTMSFNCToolBarControl;\r\n c: TControl;\r\nbegin\r\n FBlockUpdate := True;\r\n FCompactControls.Clear;\r\n for I := Self.ControlCount - 1 downto 0 do\r\n begin\r\n c := Self.Controls[I];\r\n {$IFDEF FMXLIB}\r\n if Supports(c, IDesignerControl) then\r\n Continue;\r\n {$ENDIF}\r\n\r\n if c <> FOptionsMenuButton then\r\n begin\r\n cc := TTMSFNCToolBarControl.Create;\r\n cc.FControl := c;\r\n if c is TTMSFNCDefaultToolBarButton then\r\n begin\r\n cc.FLayout := (c as TTMSFNCDefaultToolBarButton).Layout;\r\n if ((c as TTMSFNCDefaultToolBarButton).CompactLayout = bblNone) and ((c as TTMSFNCDefaultToolBarButton).Layout <> bblNone) then\r\n (c as TTMSFNCDefaultToolBarButton).CompactLayout := (c as TTMSFNCDefaultToolBarButton).MaximumLayout;\r\n end;\r\n\r\n if c is TTMSFNCCustomToolBarElement then\r\n cc.FControlIndex := (c as TTMSFNCCustomToolBarElement).ControlIndex\r\n else\r\n cc.FControlIndex := c.Tag;\r\n\r\n c.Parent := nil;\r\n c.Visible := False;\r\n FCompactControls.Add(cc);\r\n end;\r\n end;\r\n FBlockUpdate := True;\r\n UpdateControls;\r\n Invalidate;\r\nend;\r\n\r\nprocedure TTMSFNCCustomToolBar.CompactExpanderBitmapsChanged(Sender: TObject);\r\nbegin\r\n Invalidate;\r\nend;\r\n\r\nconstructor TTMSFNCCustomToolBar.Create(AOwner: TComponent);\r\nvar\r\n c: TTMSFNCGraphicsColor;\r\nbegin\r\n inherited;\r\n FFirstLoad := True;\r\n FHiddenControls := TTMSFNCToolBarControlObjectList.Create;\r\n FCompactControls := TTMSFNCToolBarControlObjectList.Create;\r\n {$IFNDEF LCLLIB}\r\n {$IFNDEF WEBLIB}\r\n FCompareControls := TDelegatedComparer.Create(\r\n function(const Item1, Item2: TControl): Integer\r\n var\r\n c1, c2: Integer;\r\n begin\r\n if Item1 is TTMSFNCCustomToolBarElement then\r\n c1 := (Item1 as TTMSFNCCustomToolBarElement).ControlIndex\r\n else\r\n c1 := Item1.Tag;\r\n\r\n if Item2 is TTMSFNCCustomToolBarElement then\r\n c2 := (Item2 as TTMSFNCCustomToolBarElement).ControlIndex\r\n else\r\n c2 := Item2.Tag;\r\n\r\n Result := CompareValue(c1, c2);\r\n end);\r\n FCompareHiddenControls := TDelegatedComparer.Create(\r\n function(const Item1, Item2: TTMSFNCToolBarControl): Integer\r\n begin\r\n Result := CompareValue(Item1.FControlIndex, Item2.FControlIndex);\r\n end);\r\n {$ENDIF}\r\n {$ENDIF}\r\n FState := esNormal;\r\n FDisabledFontColor := gcNull;\r\n FAppearance := TTMSFNCToolBarAppearance.Create(Self);\r\n FCompactAppearance := TTMSFNCToolBarCompactAppearance.Create(nil);\r\n FCompactAppearance.OnChange := @CompactAppearanceChanged;\r\n FQuickMenuButtonAppearance := TTMSFNCToolBarQuickMenuButtonAppearance.Create(nil);\r\n FQuickMenuButtonAppearance.OnChange := @QuickMenuButtonAppearanceChanged;\r\n FCompactBitmaps := TTMSFNCScaledBitmaps.Create(Self);\r\n FCompactBitmaps.OnChange := @CompactBitmapsChanged;\r\n FOptionsMenu := TTMSFNCToolBarOptionsMenu.Create(Self);\r\n FMinimumWidth := 30;\r\n FCompactWidth := 50;\r\n FCompactBitmapSize := 24;\r\n FCompactAutoBitmapSize := False;\r\n FCompactBitmapVisible := False;\r\n FCompactExpanderBitmaps := TTMSFNCScaledBitmaps.Create(Self);\r\n FCompactExpanderBitmaps.OnChange := @CompactExpanderBitmapsChanged;\r\n FQuickMenuButtonBitmaps := TTMSFNCScaledBitmaps.Create(Self);\r\n FQuickMenuButtonBitmaps.OnChange := @QuickMenuButtonBitmapsChanged;\r\n FCanCompact := True;\r\n FQuickMenuButton := False;\r\n FCompact := False;\r\n FAutoSize := True;\r\n FAutoWidth := True;\r\n FAutoHeight := True;\r\n FAutoAlign := True;\r\n FAutoStretchHeight := False;\r\n FAutoMoveToolBar := True;\r\n FOptionsMenuButton := GetOptionsMenuButtonClass.Create(Self);\r\n FOptionsMenuButton.Appearance.NormalFill.Kind := gfkSolid;\r\n c := gcLightgray;\r\n FOptionsMenuButton.Appearance.NormalFill.Color := c;\r\n FOptionsMenuButton.Appearance.ShowInnerStroke := False;\r\n FOptionsMenuButton.Appearance.Rounding := 0;\r\n\r\n FOptionsMenuButton.Appearance.HoverFill.Assign(FOptionsMenuButton.Appearance.NormalFill);\r\n FOptionsMenuButton.Appearance.DisabledFill.Assign(FOptionsMenuButton.Appearance.NormalFill);\r\n FOptionsMenuButton.Appearance.DownFill.Assign(FOptionsMenuButton.Appearance.NormalFill);\r\n\r\n FOptionsMenuButton.Appearance.HoverFill.Color := gcLightblue;\r\n FOptionsMenuButton.Appearance.DownFill.Color := gcLightsteelblue;\r\n FOptionsMenuButton.Appearance.DisabledFill.Color := gcLightgray;\r\n\r\n {$IFDEF VCLWEBLIB}\r\n FOptionsMenuButton.AlignWithMargins := True;\r\n {$ENDIF}\r\n \r\n {$IFNDEF LCLLIB}\r\n FOptionsMenuButton.Margins.Top := 3;\r\n FOptionsMenuButton.Margins.Bottom := 3;\r\n FOptionsMenuButton.Margins.Right := 3;\r\n {$ENDIF}\r\n {$IFDEF LCLLIB}\r\n FOptionsMenuButton.BorderSpacing.Top := 3;\r\n FOptionsMenuButton.BorderSpacing.Bottom := 3;\r\n FOptionsMenuButton.BorderSpacing.Right := 3;\r\n {$ENDIF}\r\n\r\n FOptionsMenuButton.CanCopy := False;\r\n FAutoOptionsMenu := TPopupMenu.Create(Self);\r\n {$IFDEF FMXLIB}\r\n FAutoOptionsMenu.Parent := Self;\r\n FAutoOptionsMenu.Stored := False;\r\n {$ENDIF}\r\n FOptionsMenuButton.OnClick := OptionsButtonClick;\r\n FOptionsMenuButton.Width := 17;\r\n FOptionsMenuButton.Text := '';\r\n FOptionsMenuButton.Stored := False;\r\n\r\n FOptionsMenuButton.Bitmaps.AddBitmapFromResource(TMSFNCTOOLBAROPTIONSMENU, HInstance, 1.0);\r\n FOptionsMenuButton.Bitmaps.AddBitmapFromResource(TMSFNCTOOLBAROPTIONSMENULARGE, HInstance, 1.5);\r\n FOptionsMenuButton.DisabledBitmaps.AddBitmapFromResource(TMSFNCTOOLBAROPTIONSMENU, HInstance, 1.0);\r\n FOptionsMenuButton.DisabledBitmaps.AddBitmapFromResource(TMSFNCTOOLBAROPTIONSMENULARGE, HInstance,1.5);\r\n FOptionsMenuButton.HoverBitmaps.AddBitmapFromResource(TMSFNCTOOLBAROPTIONSMENU, HInstance, 1.0);\r\n FOptionsMenuButton.HoverBitmaps.AddBitmapFromResource(TMSFNCTOOLBAROPTIONSMENULARGE, HInstance,1.5);\r\n\r\n FHorizontalTextAlign := gtaCenter;\r\n FVerticalTextAlign := gtaCenter;\r\n FTrimming := gttCharacter;\r\n FWordWrapping := False;\r\n FTextVisible := True;\r\n\r\n FFont := TTMSFNCGraphicsFont.Create;\r\n\r\n FCompactExpanderBitmaps.AddBitmapFromResource(TMSFNCGRAPHICSDOWN, HInstance, 1.0);\r\n FQuickMenuButtonBitmaps.AddBitmapFromResource(TMSFNCTOOLBARQUICKMENU, HInstance, 1.0); \r\nend;\r\n\r\nprocedure TTMSFNCCustomToolBar.DeactivateAllPopups;\r\nvar\r\n I: Integer;\r\nbegin\r\n if Assigned(Parent) and (Parent is TTMSFNCToolBarParent) then\r\n for I := 0 to (Parent as TTMSFNCToolBarParent).ControlCount - 1 do\r\n if (Parent as TTMSFNCToolBarParent).Controls[I] is TTMSFNCCustomToolBar then\r\n ((Parent as TTMSFNCToolBarParent).Controls[I] as TTMSFNCCustomToolBar).CloseCompactPopup;\r\nend;\r\n\r\ndestructor TTMSFNCCustomToolBar.Destroy;\r\nbegin\r\n FQuickMenuButtonBitmaps.Free;\r\n FCompactExpanderBitmaps.Free;\r\n FCompactPopup.Free;\r\n FQuickMenuButtonAppearance.Free;\r\n FCompactAppearance.Free;\r\n FCompactBitmaps.Free;\r\n FFont.Free;\r\n FOptionsMenu.Free;\r\n FAppearance.Free;\r\n FHiddenControls.Free;\r\n FCompactControls.Free;\r\n inherited;\r\nend;\r\n\r\nprocedure TTMSFNCCustomToolBar.DoAnchorClick(AAnchor: string);\r\nbegin\r\n if Assigned(OnAnchorClick) then\r\n OnAnchorClick(Self, AAnchor)\r\n else\r\n TTMSFNCUtils.OpenURL(AAnchor);\r\nend;\r\n\r\nprocedure TTMSFNCCustomToolBar.DoCanShowOptionsMenuItem(AControl: TControl;\r\n var ACanShowItem: Boolean);\r\nbegin\r\n if Assigned(OnOptionsMenuItemCanShow) then\r\n OnOptionsMenuItemCanShow(Self, AControl, ACanShowItem);\r\nend;\r\n\r\nprocedure TTMSFNCCustomToolBar.DoCloseCompactPopup(Sender: TObject);\r\nvar\r\n I: Integer;\r\n cc: TTMSFNCToolBarControl;\r\nbegin\r\n FCompactPopup.ContentControl := nil;\r\n\r\n for I := 0 to FCompactControls.Count - 1 do\r\n begin\r\n cc := TTMSFNCToolBarControl(FCompactControls[I]);\r\n if Assigned(cc.FControl) then\r\n begin\r\n if cc.FControl is TTMSFNCDefaultToolBarButton then\r\n (cc.FControl as TTMSFNCDefaultToolBarButton).Layout := cc.FLayout;\r\n\r\n cc.FControl.Parent := nil;\r\n cc.FControl.Visible := False;\r\n end;\r\n end;\r\n\r\n if Assigned(FCompactToolbar) then\r\n begin\r\n FCompactToolbar.Free;\r\n FCompactToolbar := nil;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomToolBar.DoCompactClick;\r\nbegin\r\n if Assigned(OnCompactClick) then\r\n OnCompactClick(Self);\r\nend;\r\n\r\nprocedure TTMSFNCCustomToolBar.DoCustomizeCompactToolBar(\r\n ACompactToolBar: TTMSFNCToolBar);\r\nbegin\r\n if Assigned(OnCustomizeCompactToolBar) then\r\n OnCustomizeCompactToolBar(Self, ACompactToolBar);\r\nend;\r\n\r\nprocedure TTMSFNCCustomToolBar.DoCustomizeOptionsMenu;\r\nbegin\r\n if Assigned(OnOptionsMenuCustomize) then\r\n OnOptionsMenuCustomize(Self, FAutoOptionsMenu);\r\nend;\r\n\r\nprocedure TTMSFNCCustomToolBar.DoCustomizeOptionsMenuItem(AControl: TControl; AMenuItem: TMenuItem);\r\nbegin\r\n if Assigned(OnOptionsMenuItemCustomize) then\r\n OnOptionsMenuItemCustomize(Self, AControl, AMenuItem);\r\nend;\r\n\r\nprocedure TTMSFNCCustomToolBar.DoDragGripMoving(ADeltaX, ADeltaY: Double);\r\nbegin\r\n if Assigned(OnDragGripMoving) then\r\n OnDragGripMoving(Self, ADeltaX, ADeltaY);\r\nend;\r\n\r\nprocedure TTMSFNCCustomToolBar.DoIsLastElement(AControl: TControl; var ALastElement: Boolean);\r\nbegin\r\n if Assigned(OnIsLastElement) then\r\n OnIsLastElement(Self, AControl, ALastElement);\r\nend;\r\n\r\nprocedure TTMSFNCCustomToolBar.HandleQuickMenuButton;\r\nbegin\r\n if Assigned(OnQuickMenuButtonClick) then\r\n OnQuickMenuButtonClick(Self);\r\nend;\r\n\r\nfunction TTMSFNCCustomToolBar.HasHint: Boolean;\r\nbegin\r\n Result := inherited HasHint;\r\n if FQuickMenuButtonHover then\r\n Result := QuickMenuButtonHint <> '';\r\nend;\r\n\r\n{$IFDEF FMXLIB}\r\nprocedure TTMSFNCCustomToolBar.DoMatrixChanged(Sender: TObject);\r\nbegin\r\n inherited;\r\n UpdateDockPanel;\r\nend;\r\n{$ENDIF}\r\n\r\nprocedure TTMSFNCCustomToolBar.HandleMouseLeave;\r\nbegin\r\n inherited;\r\n FHoverP := False;\r\n FQuickMenuButtonHover := False;\r\n Cursor := crDefault;\r\n FInsideDrag := False;\r\n if FHoverP <> FHover then\r\n begin\r\n FHover := False;\r\n Invalidate;\r\n end;\r\nend;\r\n\r\n{$IFDEF CMNWEBLIB}\r\nprocedure TTMSFNCCustomToolBar.AlignControls(AControl: TControl; var Rect: TRect);\r\nbegin\r\n inherited;\r\n UpdateControls;\r\nend;\r\n{$ENDIF}\r\n\r\n{$IFDEF FMXLIB}\r\nprocedure TTMSFNCCustomToolBar.DoAddObject(const AObject: TFmxObject);\r\nbegin\r\n inherited;\r\n UpdateControls;\r\nend;\r\n\r\nprocedure TTMSFNCCustomToolBar.DoInsertObject(Index: Integer;\r\n const AObject: TFmxObject);\r\nbegin\r\n inherited;\r\n UpdateControls;\r\nend;\r\n\r\nprocedure TTMSFNCCustomToolBar.SetBounds(X, Y, AWidth, AHeight: Single);\r\nvar\r\n r: TRectF;\r\nbegin\r\n r := BoundsRect;\r\n inherited;\r\n if (csDesigning in ComponentState) and not ((csLoading in ComponentState) or (csReading in ComponentState)) then\r\n begin\r\n if ((r.Width <> AWidth) or (r.Height <> AHeight)) then\r\n UpdateControls;\r\n end\r\n else\r\n UpdateControls;\r\nend;\r\n\r\nprocedure TTMSFNCCustomToolBar.DoRemoveObject(const AObject: TFmxObject);\r\nbegin\r\n inherited;\r\n UpdateControls;\r\nend;\r\n{$ENDIF}\r\n\r\nprocedure TTMSFNCCustomToolBar.DrawDragGrip(AGraphics: TTMSFNCGraphics);\r\nvar\r\n cnt: Integer;\r\n\r\n procedure DrawDots(ARect: TRectF);\r\n var\r\n i: integer;\r\n rdg: TRectF;\r\n sz: Integer;\r\n begin\r\n if State = esLarge then\r\n sz := ScalePaintValue(3)\r\n else\r\n sz := ScalePaintValue(2);\r\n\r\n ARect.Left := ARect.Left;\r\n ARect.Top := ARect.Top;\r\n cnt := Round(ARect.Bottom) div (Round(sz) * 2);\r\n for i := 1 to cnt do\r\n begin\r\n rdg := RectF(ARect.Left + ((ARect.Right - ARect.Left) - sz) / 2, ARect.Top + 1, ARect.Left + sz + ((ARect.Right - ARect.Left) - sz) / 2, ARect.Top + 1 + sz);\r\n rdg := RectF(int(rdg.Left), int(rdg.Top), int(rdg.Right), int(rdg.Bottom));\r\n AGraphics.DrawRectangle(rdg);\r\n ARect.Top := ARect.Top + sz * 2;\r\n end;\r\n end;\r\nvar\r\n r: TRectF;\r\nbegin\r\n AGraphics.Fill.Color := Appearance.DragGripColor;\r\n AGraphics.Fill.Kind := gfkSolid;\r\n r := GetDragGripRect;\r\n DrawDots(r);\r\nend;\r\n\r\nprocedure TTMSFNCCustomToolBar.DrawText(AGraphics: TTMSFNCGraphics);\r\nvar\r\n r: TRectF;\r\nbegin\r\n if TextVisible and (Text <> '') then\r\n begin\r\n AGraphics.Font.Assign(Font);\r\n\r\n if not Enabled and (DisabledFontColor <> gcNull) then\r\n AGraphics.Font.Color := DisabledFontColor;\r\n\r\n r := GetTextRect;\r\n\r\n AGraphics.DrawText(r, Text, WordWrapping, HorizontalTextAlign, VerticalTextAlign, Trimming);\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCCustomToolBar.DropDownActive: Boolean;\r\nvar\r\n I: Integer;\r\n c: TControl;\r\nbegin\r\n Result := False;\r\n for I := 0 to Self.ControlCount - 1 do\r\n begin\r\n c := Self.Controls[I];\r\n if c is TTMSFNCDefaultToolBarButton then\r\n begin\r\n if Assigned((c as TTMSFNCDefaultToolBarButton).FPopup) then\r\n begin\r\n Result := (c as TTMSFNCDefaultToolBarButton).FPopup.IsOpen;\r\n if Result then\r\n Break;\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCCustomToolBar.GetBitmapContainer: TTMSFNCBitmapContainer;\r\nbegin\r\n Result := FBitmapContainer;\r\nend;\r\n\r\nfunction TTMSFNCCustomToolBar.GetBitmapPickerClass: TTMSFNCToolBarBitmapPickerClass;\r\nbegin\r\n Result := TTMSFNCToolBarBitmapPicker;\r\nend;\r\n\r\nfunction TTMSFNCCustomToolBar.GetCompactBitmapRect(ARect: TRectF): TRectF;\r\nvar\r\n r: TRectF;\r\n bs: Single;\r\nbegin\r\n r := ARect;\r\n Result := RectF(r.Left, r.Top, r.Right, r.Top);\r\n if CompactBitmapVisible then\r\n begin\r\n bs := GetCompactBitmapSize;\r\n if not TextVisible or (Text = '') then\r\n begin\r\n Result := RectF(r.Left + 3, r.Top + 3, r.Right - 3, r.Bottom - 3);\r\n if (bs <> -1) then\r\n begin\r\n Result.Left := Round(r.Left + ((r.Right - r.Left) - bs) / 2);\r\n Result.Top := Round(r.Top + ((r.Bottom - r.Top) - bs) / 2);\r\n Result.Right := Result.Left + bs;\r\n Result.Bottom := Result.Top + bs;\r\n end;\r\n end\r\n else if TextVisible and not (Text = '') then\r\n Result := RectF(r.Left + 3, r.Top + 3, r.Right - 3, r.Top + bs);\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCCustomToolBar.GetCompactBitmapSize: Single;\r\nvar\r\n bmp: TTMSFNCBitmap;\r\nbegin\r\n Result := CompactBitmapSize;\r\n if CompactAutoBitmapSize then\r\n begin\r\n bmp := TTMSFNCGraphics.GetScaledBitmap(CompactBitmaps, 0, BitmapContainer);\r\n if Assigned(bmp) and not IsBitmapEmpty(bmp) then\r\n Result := Max(bmp.Height, bmp.Width);\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCCustomToolBar.GetColorPickerClass: TTMSFNCToolBarColorPickerClass;\r\nbegin\r\n Result := TTMSFNCToolBarColorPicker;\r\nend;\r\n\r\nfunction TTMSFNCCustomToolBar.GetCompactControl(\r\n AControl: TControl): TTMSFNCToolBarControl;\r\nvar\r\n I: Integer;\r\nbegin\r\n Result := nil;\r\n for I := 0 to FCompactControls.Count - 1 do\r\n begin\r\n if TTMSFNCToolBarControl(FCompactControls[I]).FControl = AControl then\r\n begin\r\n Result := TTMSFNCToolBarControl(FCompactControls[I]);\r\n Break;\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCCustomToolBar.GetCompactControlCount: Integer;\r\nbegin\r\n Result := FCompactControls.Count;\r\nend;\r\n\r\nfunction TTMSFNCCustomToolBar.GetDocURL: string;\r\nbegin\r\n Result := TTMSFNCBaseDocURL + 'tmsfncuipack/components/' + LowerCase(ClassName);\r\nend;\r\n\r\nfunction TTMSFNCCustomToolBar.GetDragGripRect(AInteraction: Boolean = False): TRectF;\r\nvar\r\n r: TRectF;\r\n f: Single;\r\nbegin\r\n r := LocalRect;\r\n f := 1;\r\n if State = esLarge then\r\n f := 1.75;\r\n\r\n if AInteraction then\r\n Result := RectF(r.Left, r.Top, r.Left + ScalePaintValue(8 * f), r.Bottom)\r\n else\r\n Result := RectF(r.Left + ScalePaintValue(3), r.Top + ScalePaintValue(3), r.Left + ScalePaintValue(6 * f), r.Bottom - ScalePaintValue(3));\r\nend;\r\n\r\nfunction TTMSFNCCustomToolBar.GetFontNamePickerClass: TTMSFNCToolBarFontNamePickerClass;\r\nbegin\r\n Result := TTMSFNCToolBarFontNamePicker;\r\nend;\r\n\r\nfunction TTMSFNCCustomToolBar.GetFontSizePickerClass: TTMSFNCToolBarFontSizePickerClass;\r\nbegin\r\n Result := TTMSFNCToolBarFontSizePicker;\r\nend;\r\n\r\nfunction TTMSFNCCustomToolBar.GetHiddenControl(\r\n AControl: TControl): TTMSFNCToolBarControl;\r\nvar\r\n I: Integer;\r\nbegin\r\n Result := nil;\r\n for I := 0 to FHiddenControls.Count - 1 do\r\n begin\r\n if TTMSFNCToolBarControl(FHiddenControls[I]).FControl = AControl then\r\n begin\r\n Result := TTMSFNCToolBarControl(FHiddenControls[I]);\r\n Break;\r\n end;\r\n end; \r\nend;\r\n\r\nfunction TTMSFNCCustomToolBar.GetHiddenControlCount(\r\n AControl: TControl): Integer;\r\nvar\r\n I: Integer;\r\n lst: TTMSFNCToolBarControlList;\r\nbegin\r\n lst := TTMSFNCToolBarControlList.Create;\r\n for I := 0 to FHiddenControls.Count - 1 do\r\n lst.Add(FHiddenControls[I]);\r\n\r\n {$IFNDEF LCLLIB}\r\n {$IFNDEF WEBLIB}\r\n lst.Sort(FCompareHiddenControls);\r\n {$ENDIF}\r\n {$ENDIF}\r\n Result := 0;\r\n for I := 0 to lst.Count - 1 do\r\n begin\r\n if TTMSFNCToolBarControl(lst[I]).FControl = AControl then\r\n Break\r\n else\r\n Inc(Result);\r\n end;\r\n lst.Free;\r\nend;\r\n\r\nfunction TTMSFNCCustomToolBar.GetHintString: String;\r\nbegin\r\n Result := inherited GetHintString;\r\n if FQuickMenuButtonHover then\r\n Result := QuickMenuButtonHint\r\nend;\r\n\r\nfunction TTMSFNCCustomToolBar.GetItemPickerClass: TTMSFNCToolBarItemPickerClass;\r\nbegin\r\n Result := TTMSFNCToolBarItemPicker;\r\nend;\r\n\r\nfunction TTMSFNCCustomToolBar.GetOptionsMenuButtonClass: TTMSFNCToolBarDropDownButtonClass;\r\nbegin\r\n Result := TTMSFNCToolBarDropDownButton;\r\nend;\r\n\r\nfunction TTMSFNCCustomToolBar.GetOptionsMenuButtonControl: TTMSFNCToolBarDropDownButton;\r\nbegin\r\n Result := FOptionsMenuButton;\r\nend;\r\n\r\nfunction TTMSFNCCustomToolBar.GetQuickMenuButtonRect: TRectF;\r\nbegin\r\n Result := RectF(Width - 16, Height - 16, Width, Height);\r\n if Appearance.Separator then\r\n begin\r\n Result.Left := Result.Left - Appearance.SeparatorStroke.Width;\r\n Result.Right := Result.Right - Appearance.SeparatorStroke.Width;\r\n end;\r\nend;\r\n\r\n{$IFDEF FNCLIB}\r\nfunction TTMSFNCCustomToolBar.GetSubComponentArray: TTMSFNCStylesManagerComponentArray;\r\nvar\r\n I: Integer;\r\nbegin\r\n SetLength(Result, ControlCount + FHiddenControls.Count + 1);\r\n for I := 0 to ControlCount - 1 do\r\n Result[I] := Controls[I];\r\n\r\n for I := 0 to FHiddenControls.Count - 1 do\r\n Result[I + ControlCount] := FHiddenControls[I].FControl;\r\n\r\n Result[Length(Result) - 1] := FOptionsMenuButton;\r\nend;\r\n{$ENDIF}\r\n\r\nfunction TTMSFNCCustomToolBar.GetCompactTextRect: TRectF;\r\nvar\r\n bmpr: TRectF;\r\n r: TRectF;\r\nbegin\r\n r := LocalRect;\r\n bmpr := GetCompactBitmapRect(r);\r\n Result := RectF(r.Left + 3, bmpr.Bottom + 3, r.Right - 3, r.Bottom - 23)\r\nend;\r\n\r\nfunction TTMSFNCCustomToolBar.GetTextRect: TRectF;\r\nvar\r\n r: TRectF;\r\n h, sz: Single;\r\nbegin\r\n sz := 0;\r\n if Appearance.DragGrip then\r\n begin\r\n if State = esLarge then\r\n sz := 3\r\n else\r\n sz := 2;\r\n end;\r\n r := LocalRect;\r\n r := RectF(r.Left + ScalePaintValue(sz), r.Top, r.Right, r.Bottom);\r\n InflateRectEx(r, ScalePaintValue(-2), ScalePaintValue(-2));\r\n\r\n h := GetTextSize.cy;\r\n\r\n Result := RectF(r.Left, r.Bottom - h, r.Right, r.Bottom);\r\nend;\r\n\r\nfunction TTMSFNCCustomToolBar.GetTextSize: TSizeF;\r\nvar\r\n g: TTMSFNCGraphics;\r\n sz: Single;\r\n r: TRectF;\r\nbegin\r\n Result.cx := 0;\r\n Result.cy := 0;\r\n if TextVisible and (Text <> '') then\r\n begin\r\n g := TTMSFNCGraphics.CreateBitmapCanvas(1, 1, NativeCanvas);\r\n if not NativeCanvas then\r\n g.BeginScene;\r\n g.BitmapContainer := BitmapContainer;\r\n g.OptimizedHTMLDrawing := OptimizedHTMLDrawing;\r\n try\r\n sz := 0;\r\n if Appearance.DragGrip then\r\n begin\r\n if State = esLarge then\r\n sz := 3\r\n else\r\n sz := 2;\r\n end;\r\n\r\n g.Font.Assign(Font);\r\n\r\n r := LocalRect;\r\n r := RectF(r.Left + sz, r.Top, r.Right, r.Bottom);\r\n InflateRectEx(r, -2, -2);\r\n Result := g.CalculateTextSize(Text, r, WordWrapping);\r\n finally\r\n if not NativeCanvas then\r\n g.EndScene;\r\n g.Free;\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCCustomToolBar.GetToolBarButtonClass: TTMSFNCToolBarButtonClass;\r\nbegin\r\n Result := TTMSFNCToolBarButton;\r\nend;\r\n\r\nfunction TTMSFNCCustomToolBar.GetToolBarSeparatorClass: TTMSFNCToolBarSeparatorClass;\r\nbegin\r\n Result := TTMSFNCToolBarSeparator;\r\nend;\r\n\r\nfunction TTMSFNCCustomToolBar.GetVersion: String;\r\nbegin\r\n Result := GetVersionNumber(MAJ_VER, MIN_VER, REL_VER, BLD_VER);\r\nend;\r\n\r\nprocedure TTMSFNCCustomToolBar.UpdateToolBar(Sender: TObject);\r\nbegin\r\n UpdateControls;\r\nend;\r\n\r\nprocedure TTMSFNCCustomToolBar.UpdateToolBarControl(Sender: TObject);\r\nvar\r\n tb: TTMSFNCToolBarControl;\r\n bmp: TTMSFNCBitmapHelperClass;\r\n c: TControl;\r\n tc: TControl;\r\n tci: Integer;\r\nbegin\r\n if not Assigned(Sender) then\r\n Exit;\r\n\r\n FBlockUpdate := True;\r\n\r\n c := Sender as TControl;\r\n\r\n tb := GetHiddenControl(c);\r\n if Assigned(tb) then\r\n begin\r\n tc := tb.FControl;\r\n tci := Max(0, Min(ControlCount, tb.FControlIndex - GetHiddenControlCount(tc)));\r\n FHiddenControls.Remove(tb);\r\n InsertToolBarControl(tc, tci);\r\n tc.Visible := True;\r\n end\r\n else\r\n begin\r\n tb := TTMSFNCToolBarControl.Create;\r\n\r\n if c is TTMSFNCCustomToolBarElement then\r\n tb.FControlIndex := (c as TTMSFNCCustomToolBarElement).ControlIndex\r\n else\r\n tb.FControlIndex := c.Tag;\r\n\r\n tb.FControl := c;\r\n FBlockUpdate := True;\r\n bmp := c.MakeScreenshot;\r\n FBlockUpdate := False;\r\n tb.FBitmap.Assign(bmp);\r\n bmp.Free;\r\n FHiddenControls.Add(tb);\r\n c.Parent := nil;\r\n c.Visible := False;\r\n end;\r\n\r\n FBlockUpdate := False;\r\n UpdateControls;\r\nend;\r\n\r\nfunction TTMSFNCCustomToolBar.XYToAnchor(AX, AY: Single): string;\r\nvar\r\n r: TRectF;\r\n g: TTMSFNCGraphics;\r\nbegin\r\n Result := '';\r\n r := GetTextRect;\r\n\r\n g := TTMSFNCGraphics.CreateBitmapCanvas;\r\n g.BeginScene;\r\n g.BitmapContainer := BitmapContainer;\r\n try\r\n g.Font.Assign(Font);\r\n Result := g.DrawText(r, FText, FWordWrapping, FHorizontalTextAlign, FVerticalTextAlign, FTrimming, 0, -1, -1, True, True, AX, AY);\r\n finally\r\n g.EndScene;\r\n g.Free;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomToolBar.InitializeOptionsMenu;\r\n{$IFDEF WEBLIB}\r\nbegin\r\n{$ENDIF}\r\n{$IFNDEF WEBLIB}\r\nvar\r\n mnu: TTMSFNCToolBarOptionMenuItem;\r\n bmp: TTMSFNCBitmapHelperClass;\r\n I: Integer;\r\n c: TControl;\r\n lst: TTMSFNCControlList;\r\n tb: TTMSFNCToolBarControl;\r\n sh: Boolean;\r\n bmpw, bw, bh: Single;\r\n {$IFDEF FMXLIB}\r\n o: TFmxObject;\r\n {$ENDIF}\r\n maxh: Single;\r\nbegin\r\n lst := nil;\r\n try\r\n lst := TTMSFNCControlList.Create;\r\n for I := 0 to Self.ControlCount - 1 do\r\n lst.Add(Controls[I]);\r\n\r\n for I := 0 to FHiddenControls.Count - 1 do\r\n lst.Add(TTMSFNCToolBarControl(FHiddenControls[I]).FControl);\r\n\r\n {$IFNDEF LCLLIB}\r\n {$IFNDEF WEBLIB}\r\n lst.Sort(FCompareControls);\r\n {$ENDIF}\r\n {$ENDIF}\r\n\r\n {$IFDEF FMXLIB}\r\n FAutoOptionsMenu.Clear;\r\n {$ENDIF}\r\n {$IFDEF CMNLIB}\r\n FAutoOptionsMenu.Items.Clear;\r\n {$ENDIF}\r\n\r\n FTotalOptionsMenuWidth := 0;\r\n\r\n for I := 0 to lst.Count - 1 do\r\n begin\r\n c := TControl(lst[I]);\r\n\r\n {$IFDEF FMXLIB}\r\n if Supports(c, IDesignerControl) then\r\n Continue;\r\n {$ENDIF}\r\n\r\n if not (c = FOptionsMenuButton) and not (c is TTMSFNCCustomToolBarSeparator) then\r\n begin\r\n sh := True;\r\n DoCanShowOptionsMenuItem(c, sh);\r\n if sh then\r\n begin\r\n mnu := TTMSFNCToolBarOptionMenuItem.Create(FAutoOptionsMenu);\r\n mnu.OnClick := OptionMenuItemClick;\r\n {$IFDEF FMXLIB}\r\n mnu.OnApplyStyleLookup := OptionMenuItemApplyStyleLookup;\r\n mnu.Calculate := True;\r\n mnu.ApplyStyleLookup;\r\n {$ENDIF}\r\n\r\n bmpw := 0;\r\n bw := 0;\r\n bh := 0;\r\n {$IFDEF FMXLIB}\r\n o := mnu.FindStyleResource('checkmark');\r\n if Assigned(o) and (o is TControl) then\r\n bmpw := (o as TControl).Width;\r\n {$ENDIF}\r\n\r\n maxh := 20;\r\n if OptionsMenu.ShowItemBitmap then\r\n begin\r\n tb := GetHiddenControl(c);\r\n if Assigned(tb) then\r\n begin\r\n bmp := tb.FBitmap;\r\n mnu.Bitmap.Assign(bmp);\r\n bw := bmp.Width;\r\n bh := bmp.Height;\r\n end\r\n else\r\n begin\r\n FBlockUpdate := True;\r\n bmp := c.MakeScreenshot;\r\n FBlockUpdate := False;\r\n mnu.Bitmap.Assign(bmp);\r\n bw := bmp.Width;\r\n bh := bmp.Height;\r\n bmp.Free;\r\n end;\r\n end;\r\n\r\n TTMSFNCGraphics.GetAspectSize(bw, bh, bw, bh, bw, maxh, True, False, False);\r\n bmpw := bmpw + int(bw);\r\n\r\n if OptionsMenu.ShowItemText then\r\n begin\r\n if c is TTMSFNCCustomToolBarButton then\r\n mnu.Text := (c as TTMSFNCCustomToolBarButton).AutoOptionsMenuText;\r\n\r\n if mnu.Text = '' then\r\n mnu.Text := c.Name;\r\n end;\r\n\r\n mnu.Control := c;\r\n mnu.IsChecked := Assigned(c.Parent);\r\n\r\n DoCustomizeOptionsMenuItem(c, mnu);\r\n\r\n {$IFDEF FMXLIB}\r\n FAutoOptionsMenu.AddObject(mnu);\r\n {$ENDIF}\r\n {$IFDEF CMNLIB}\r\n FAutoOptionsMenu.Items.Add(mnu);\r\n {$ENDIF}\r\n FTotalOptionsMenuWidth := Max(FTotalOptionsMenuWidth, bmpw);\r\n end;\r\n end;\r\n end;\r\n\r\n {$IFDEF FMXLIB}\r\n for I := 0 to FAutoOptionsMenu.ItemsCount - 1 do\r\n {$ENDIF}\r\n {$IFDEF CMNLIB}\r\n for I := 0 to FAutoOptionsMenu.Items.Count - 1 do\r\n {$ENDIF}\r\n begin\r\n if FAutoOptionsMenu.Items[I] is TTMSFNCToolBarOptionMenuItem then\r\n begin\r\n mnu := (FAutoOptionsMenu.Items[I] as TTMSFNCToolBarOptionMenuItem);\r\n {$IFDEF FMXLIB}\r\n mnu.NeedStyleLookup;\r\n mnu.Calculate := False;\r\n {$ENDIF}\r\n if OptionsMenu.AutoItemBitmapWidth then\r\n mnu.GlyphWidth := FTotalOptionsMenuWidth\r\n else\r\n mnu.GlyphWidth := OptionsMenu.ItemBitmapWidth;\r\n end;\r\n end;\r\n\r\n finally\r\n if Assigned(lst) then\r\n lst.Free;\r\n end;\r\n{$ENDIF}\r\nend;\r\n\r\nprocedure TTMSFNCCustomToolBar.InsertToolBarControl(AControl: TControl;\r\n AIndex: Integer);\r\nbegin\r\n {$IFDEF FMXLIB}\r\n if (AIndex >= 0) and (AIndex <= Self.ControlCount - 1) then\r\n InsertObject(AIndex, AControl)\r\n else\r\n AddObject(AControl);\r\n {$ENDIF}\r\n {$IFDEF CMNWEBLIB}\r\n AControl.Parent := Self;\r\n if AIndex > -1 then\r\n SetChildOrder(AControl, AIndex);\r\n {$ENDIF}\r\n\r\n if Assigned(OnInternalInsertControl) then\r\n OnInternalInsertControl(AControl);\r\nend;\r\n\r\nfunction TTMSFNCCustomToolBar.IsCompactBitmapSizeStored: Boolean;\r\nbegin\r\n Result := CompactBitmapSize <> 24;\r\nend;\r\n\r\nfunction TTMSFNCCustomToolBar.IsCompactWidthStored: Boolean;\r\nbegin\r\n Result := CompactWidth <> 50;\r\nend;\r\n\r\nfunction TTMSFNCCustomToolBar.IsMinimumWidthStored: Boolean;\r\nbegin\r\n Result := MinimumWidth <> 30;\r\nend;\r\n\r\nprocedure TTMSFNCCustomToolBar.Loaded;\r\nbegin\r\n inherited;\r\n {$IFDEF FMXLIB}\r\n if (csDesigning in ComponentState) or (FFirstLoad) then\r\n UpdateControls;\r\n {$ENDIF}\r\nend;\r\n\r\nprocedure TTMSFNCCustomToolBar.HandleCompact;\r\nvar\r\n I: Integer;\r\n cc: TTMSFNCToolBarControl;\r\nbegin\r\n inherited;\r\n\r\n DeactivateAllPopups;\r\n\r\n if Assigned(FCompactToolbar) then\r\n begin\r\n FCompactToolbar.Free;\r\n FCompactToolbar := nil;\r\n end;\r\n\r\n if Assigned(FCompactPopup) then\r\n begin\r\n FCompactPopup.Free;\r\n FCompactPopup := nil;\r\n end;\r\n\r\n FCompactPopup := TTMSFNCToolBarPopup.Create(Self);\r\n FCompactPopup.OnClosePopup := DoCloseCompactPopup;\r\n\r\n FCompactToolbar := TTMSFNCToolBar.Create(FCompactPopup);\r\n\r\n {$IFDEF VCLLIB}\r\n {$HINTS OFF}\r\n {$IF COMPILERVERSION >= 33}\r\n FCompactToolbar.ScaleForPPI(CurrentPPI);\r\n {$IFEND}\r\n {$HINTS ON}\r\n {$ENDIF}\r\n\r\n FCompactToolbar.Assign(Self);\r\n FCompactToolbar.Compact := False;\r\n FCompactToolbar.AutoSize := True;\r\n FCompactToolbar.AutoHeight := False;\r\n FCompactToolbar.AutoWidth := True;\r\n FCompactToolbar.AutoStretchHeight := False;\r\n FCompactToolbar.Appearance.Separator := False;\r\n FCompactToolbar.SetControlMargins(1, 1, 1, 1);\r\n FCompactToolbar.Height := Height + 2;\r\n\r\n DoCustomizeCompactToolBar(FCompactToolBar);\r\n\r\n for I := FCompactControls.Count - 1 downto 0 do\r\n begin\r\n cc := TTMSFNCToolBarControl(FCompactControls[I]);\r\n if Assigned(cc.FControl) then\r\n begin\r\n if cc.FControl is TTMSFNCDefaultToolBarButton then\r\n (cc.FControl as TTMSFNCDefaultToolBarButton).Layout := (cc.FControl as TTMSFNCDefaultToolBarButton).CompactLayout;\r\n cc.FControl.Visible := True;\r\n cc.FControl.Parent := FCompactToolbar;\r\n end;\r\n end;\r\n\r\n FCompactToolbar.UpdateControls;\r\n FCompactPopup.PlacementControl := Self;\r\n FCompactPopup.ContentControl := FCompactToolbar;\r\n FCompactPopup.IsOpen := True;\r\n DoCompactClick;\r\nend;\r\n\r\nprocedure TTMSFNCCustomToolBar.HandleDblClick(X, Y: Single);\r\nbegin\r\n inherited;\r\n if Assigned(OnInternalDblClick) then\r\n OnInternalDblClick(Self);\r\nend;\r\n\r\nprocedure TTMSFNCCustomToolBar.HandleMouseDown(Button: TTMSFNCMouseButton;\r\n Shift: TShiftState; X, Y: Single);\r\nbegin\r\n inherited;\r\n if Appearance.DragGrip and not FDragGripMoving then\r\n begin\r\n FDragGripDown := PtInRectEx(GetDragGripRect(True), PointF(X, Y));\r\n FDragGripDownPt := PointF(X, Y);\r\n end;\r\n\r\n if not FDragGripDown then\r\n begin\r\n if Compact then\r\n begin\r\n FDown := True;\r\n Invalidate;\r\n CaptureEx;\r\n end\r\n else if QuickMenuButton then\r\n begin\r\n FQuickMenuButtonDown := PtInRectEx(GetQuickMenuButtonRect, PointF(X, Y));\r\n if FQuickMenuButtonDown then\r\n begin\r\n Invalidate;\r\n CaptureEx;\r\n end;\r\n end;\r\n end;\r\n\r\n if Assigned(OnInternalMouseDown) and not (Button = TTMSFNCMouseButton.mbRight) then\r\n OnInternalMouseDown(Self);\r\nend;\r\n\r\nprocedure TTMSFNCCustomToolBar.HandleMouseMove(Shift: TShiftState; X, Y: Single);\r\nvar\r\n r: TRectF;\r\n absx, absy: Single;\r\n pt: TPointF;\r\n d: TTMSFNCCustomDockPanel;\r\n a: string;\r\nbegin\r\n inherited;\r\n\r\n if Compact then\r\n begin\r\n FHoverP := FHover;\r\n FHover := True;\r\n if FHover <> FHoverP then\r\n Invalidate;\r\n end\r\n else if QuickMenuButton then\r\n begin\r\n FQuickMenuButtonHoverP := FQuickMenuButtonHover;\r\n FQuickMenuButtonHover := PtInRectEx(GetQuickMenuButtonRect, PointF(X, Y));\r\n if FQuickMenuButtonHover <> FQuickMenuButtonHoverP then\r\n Invalidate;\r\n end;\r\n\r\n if Appearance.DragGrip then\r\n begin\r\n if FDragGripDown then\r\n begin\r\n if not FDragGripMoving then\r\n begin\r\n CaptureEx;\r\n FDragGripMoving := True;\r\n end;\r\n\r\n if FDragGripMoving then\r\n begin\r\n absx := (FDragGripDownPt.X - X);\r\n absy := (FDragGripDownPt.Y - Y);\r\n if AutoMoveToolBar then\r\n begin\r\n {$IFDEF FMXLIB}\r\n pt := PointF(Position.Point.X - absx, Position.Point.Y - absy);\r\n {$ENDIF}\r\n {$IFDEF CMNWEBLIB}\r\n pt := PointF(Left - absx, Top - absy);\r\n {$ENDIF}\r\n\r\n if Parent is TTMSFNCCustomDockPanel then\r\n begin\r\n d := Parent as TTMSFNCCustomDockPanel;\r\n if d.AutoAlign then\r\n begin\r\n if pt.Y < d.Appearance.Margins.Top then\r\n pt.Y := Round(d.Appearance.Margins.Top);\r\n if pt.X < d.Appearance.Margins.Left then\r\n pt.X := Round(d.Appearance.Margins.Left)\r\n else if pt.X + Width > d.Width - d.Appearance.Margins.Right then\r\n pt.X := Round(d.Width - d.Appearance.Margins.Right - Width);\r\n\r\n SetBounds(Round(pt.X), Round(pt.Y), Width, Height);\r\n end;\r\n end;\r\n end;\r\n FDragGripDownPt := PointF(X + absx, Y + absy);\r\n DoDragGripMoving(absx, absy);\r\n end;\r\n end\r\n else\r\n begin\r\n r := GetDragGripRect(True);\r\n if PtInRectEx(r, PointF(X, Y)) then\r\n begin\r\n if not FInsideDrag then\r\n begin\r\n FInsideDrag := True;\r\n Cursor := crSize;\r\n end;\r\n end\r\n else if FInsideDrag then\r\n begin\r\n FInsideDrag := False;\r\n Cursor := crDefault;\r\n end;\r\n end;\r\n end;\r\n\r\n a := XYToAnchor(X, Y);\r\n\r\n if a <> '' then\r\n Cursor := crHandPoint\r\n else if (Cursor = crHandPoint) then\r\n Cursor := crDefault;\r\n\r\n if Assigned(OnInternalMouseMove) then\r\n OnInternalMouseMove(Self);\r\nend;\r\n\r\nprocedure TTMSFNCCustomToolBar.HandleMouseUp(Button: TTMSFNCMouseButton; Shift: TShiftState;\r\n X, Y: Single);\r\nvar\r\n a: string;\r\nbegin\r\n inherited;\r\n if FDragGripDown then\r\n ReleaseCaptureEx\r\n else if FDown and Compact then\r\n begin\r\n Invalidate;\r\n ReleaseCaptureEx;\r\n HandleCompact;\r\n end\r\n else if FQuickMenuButtonDown and QuickMenuButton and not Compact then\r\n begin\r\n Invalidate;\r\n ReleaseCaptureEx;\r\n HandleQuickMenuButton;\r\n end;\r\n\r\n FDragGripDown := False;\r\n FDragGripMoving := False;\r\n FDown := False;\r\n FQuickMenuButtonDown := False;\r\n\r\n a := XYToAnchor(X, Y);\r\n if a <> '' then\r\n DoAnchorClick(a);\r\n\r\n if Assigned(OnInternalMouseUp) and not (Button = TTMSFNCMouseButton.mbRight) then\r\n OnInternalMouseUp(Self);\r\nend;\r\n\r\nprocedure TTMSFNCCustomToolBar.Notification(AComponent: TComponent;\r\n Operation: TOperation);\r\nbegin\r\n inherited;\r\n if (Operation = opRemove) and (AComponent = FBitmapContainer) then\r\n FBitmapContainer := nil;\r\n\r\n if (Operation = opRemove) and (AComponent = FCustomOptionsMenu) then\r\n FCustomOptionsMenu := nil;\r\nend;\r\n\r\n{$IFDEF FMXLIB}\r\nprocedure TTMSFNCCustomToolBar.OptionMenuItemApplyStyleLookup(Sender: TObject);\r\nvar\r\n c: TControl;\r\nbegin\r\n c := nil;\r\n if (Sender is TTMSFNCToolBarOptionMenuItem) then\r\n c := (Sender as TTMSFNCToolBarOptionMenuItem).FControl;\r\n\r\n if Assigned(OnOptionsMenuItemApplyStyle) and (Sender is TMenuItem) then\r\n OnOptionsMenuItemApplyStyle(Self, c, Sender as TMenuItem);\r\nend;\r\n{$ENDIF}\r\n\r\nprocedure TTMSFNCCustomToolBar.OptionMenuItemClick(Sender: TObject);\r\nvar\r\n a: Boolean;\r\n c: TControl;\r\nbegin\r\n a := True;\r\n c := nil;\r\n if (Sender is TTMSFNCToolBarOptionMenuItem) then\r\n c := (Sender as TTMSFNCToolBarOptionMenuItem).FControl;\r\n\r\n if Assigned(OnOptionsMenuItemClick) and (Sender is TMenuItem) then\r\n OnOptionsMenuItemClick(Self, c, Sender as TMenuItem, a);\r\n\r\n if a then\r\n UpdateToolBarControl(c);\r\nend;\r\n\r\nprocedure TTMSFNCCustomToolBar.OptionsButtonClick(Sender: TObject);\r\nvar\r\n pt: TPointF;\r\nbegin\r\n if Assigned(OnOptionsMenuButtonClick) then\r\n OnOptionsMenuButtonClick(Self)\r\n else\r\n begin\r\n {$IFDEF FMXLIB}\r\n pt := FOptionsMenuButton.Position.Point;\r\n {$ENDIF}\r\n {$IFDEF CMNWEBLIB}\r\n pt := PointF(FOptionsMenuButton.Left, FOptionsMenuButton.Top);\r\n {$ENDIF}\r\n pt := LocalToScreenEx(PointF(pt.X, pt.Y + FOptionsMenuButton.Height));\r\n ShowOptionsMenu(pt.X, pt.Y);\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomToolBar.QuickMenuButtonAppearanceChanged(\r\n Sender: TObject);\r\nbegin\r\n Invalidate;\r\nend;\r\n\r\nprocedure TTMSFNCCustomToolBar.QuickMenuButtonBitmapsChanged(\r\n Sender: TObject);\r\nbegin\r\n Invalidate;\r\nend;\r\n\r\nprocedure TTMSFNCCustomToolBar.ResetToDefaultStyle;\r\nbegin\r\n inherited;\r\n Appearance.DragGripColor := gcLightgray;\r\n Appearance.Fill.Color := gcWhite;\r\n Appearance.Stroke.Color := gcGray;\r\n Appearance.Fill.Kind := gfkGradient;\r\n Appearance.Stroke.Kind := gskSolid;\r\n Appearance.Fill.Color := gcWhite;\r\n Appearance.Fill.ColorTo := MakeGraphicsColor(230, 230, 230);\r\nend;\r\n\r\nprocedure TTMSFNCCustomToolBar.Draw(AGraphics: TTMSFNCGraphics; ARect: TRectF);\r\nvar\r\n qr, r: TRectF;\r\n w: Single; \r\nbegin\r\n inherited;\r\n\r\n r := LocalRect;\r\n\r\n if Compact then\r\n begin\r\n if FDown then\r\n begin\r\n AGraphics.Fill.Assign(CompactAppearance.DownFill);\r\n AGraphics.Stroke.Assign(CompactAppearance.DownStroke);\r\n end\r\n else if FHover then\r\n begin\r\n AGraphics.Fill.Assign(CompactAppearance.HoverFill);\r\n AGraphics.Stroke.Assign(CompactAppearance.HoverStroke);\r\n end\r\n else\r\n begin\r\n AGraphics.Fill.Assign(CompactAppearance.NormalFill);\r\n AGraphics.Stroke.Assign(CompactAppearance.NormalStroke);\r\n end;\r\n\r\n if CompactAppearance.FlatStyle then\r\n AGraphics.Fill.Kind := gfkSolid;\r\n\r\n AGraphics.DrawRectangle(RectF(r.Left, r.Top + 2, r.Right - 3, r.Bottom - 2));\r\n end\r\n else\r\n begin\r\n AGraphics.Fill.Assign(Appearance.Fill);\r\n AGraphics.Stroke.Assign(Appearance.Stroke);\r\n\r\n if Appearance.FlatStyle then\r\n AGraphics.Fill.Kind := gfkSolid;\r\n\r\n AGraphics.DrawRectangle(r);\r\n end;\r\n\r\n if Compact then\r\n begin\r\n DrawCompactBitmap(AGraphics, ARect);\r\n DrawCompactText(AGraphics);\r\n DrawCompactExpander(AGraphics);\r\n end\r\n else\r\n begin\r\n if Appearance.DragGrip then\r\n DrawDragGrip(AGraphics);\r\n\r\n DrawText(AGraphics);\r\n\r\n if QuickMenuButton then\r\n begin\r\n if FQuickMenuButtonDown then\r\n begin\r\n AGraphics.Fill.Assign(QuickMenuButtonAppearance.DownFill);\r\n AGraphics.Stroke.Assign(QuickMenuButtonAppearance.DownStroke);\r\n end\r\n else if FQuickMenuButtonHover then\r\n begin\r\n AGraphics.Fill.Assign(QuickMenuButtonAppearance.HoverFill);\r\n AGraphics.Stroke.Assign(QuickMenuButtonAppearance.HoverStroke);\r\n end\r\n else\r\n begin\r\n AGraphics.Fill.Assign(QuickMenuButtonAppearance.NormalFill);\r\n AGraphics.Stroke.Assign(QuickMenuButtonAppearance.NormalStroke);\r\n end;\r\n\r\n if QuickMenuButtonAppearance.FlatStyle then\r\n AGraphics.Fill.Kind := gfkSolid;\r\n \r\n qr := GetQuickMenuButtonRect;\r\n AGraphics.DrawRectangle(qr);\r\n\r\n InflateRectEx(qr, -2, -2);\r\n AGraphics.DrawScaledBitmap(qr, QuickMenuButtonBitmaps); \r\n end;\r\n end;\r\n\r\n if Appearance.Separator then\r\n begin\r\n AGraphics.Stroke.Assign(Appearance.SeparatorStroke);\r\n w := Appearance.SeparatorStroke.Width;\r\n AGraphics.DrawLine(PointF(r.Right - w, r.Top + 4), PointF(r.Right - w, r.Bottom - 4));\r\n end;\r\n\r\n if IsDesignTime and CanDrawDesignTime then\r\n AGraphics.DrawFocusRectangle(ARect, gcBlack);\r\nend;\r\n\r\nprocedure TTMSFNCCustomToolBar.DrawCompactBitmap(AGraphics: TTMSFNCGraphics;\r\n ARect: TRectF);\r\nvar\r\n r: TRectF;\r\nbegin\r\n r := GetCompactBitmapRect(ARect);\r\n AGraphics.BitmapContainer := BitmapContainer;\r\n AGraphics.DrawScaledBitmap(r, CompactBitmaps)\r\nend;\r\n\r\nprocedure TTMSFNCCustomToolBar.DrawCompactExpander(AGraphics: TTMSFNCGraphics);\r\nvar\r\n r: TRectF;\r\nbegin\r\n r := LocalRect;\r\n r := RectF(r.Left, r.Bottom - 20, r.Right, r.Bottom);\r\n InflateRectEx(r, -2, -2);\r\n AGraphics.DrawScaledBitmap(r, CompactExpanderBitmaps);\r\nend;\r\n\r\nprocedure TTMSFNCCustomToolBar.DrawCompactText(AGraphics: TTMSFNCGraphics);\r\nvar\r\n tr: TRectF;\r\n st: TTMSFNCGraphicsSaveState;\r\nbegin\r\n if not TextVisible or (Text = '') then\r\n Exit;\r\n\r\n tr := GetCompactTextRect;\r\n st := AGraphics.SaveState;\r\n try\r\n AGraphics.ClipRect(tr);\r\n AGraphics.Font.Assign(Font);\r\n AGraphics.DrawText(tr, Text, WordWrapping, HorizontalTextAlign, VerticalTextAlign, Trimming);\r\n finally\r\n AGraphics.RestoreState(st);\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomToolBar.UncompactControls;\r\nvar\r\n I: Integer;\r\n cc: TTMSFNCToolBarControl;\r\n c: TControl;\r\nbegin\r\n FBlockUpdate := True;\r\n for I := FCompactControls.Count - 1 downto 0 do\r\n begin\r\n cc := TTMSFNCToolBarControl(FCompactControls[I]);\r\n c := cc.FControl;\r\n if Assigned(c) then\r\n begin\r\n if c is TTMSFNCCustomToolBarElement then\r\n (c as TTMSFNCCustomToolBarElement).FBlockUpdate := True;\r\n c.Parent := Self;\r\n c.Visible := True;\r\n if c is TTMSFNCCustomToolBarElement then\r\n (c as TTMSFNCCustomToolBarElement).FBlockUpdate := False;\r\n {$IFDEF VCLLIB}\r\n {$HINTS OFF}\r\n {$IF COMPILERVERSION >= 33}\r\n c.ScaleForPPI(CurrentPPI);\r\n {$IFEND}\r\n {$HINTS ON}\r\n {$ENDIF}\r\n end;\r\n end;\r\n\r\n FBlockUpdate := False;\r\n UpdateControls;\r\n\r\n Invalidate;\r\nend;\r\n\r\nprocedure TTMSFNCCustomToolBar.UpdateControlAfterResize;\r\nbegin\r\n inherited;\r\n UpdateDockPanel;\r\nend;\r\n\r\nprocedure TTMSFNCCustomToolBar.SetAdaptToStyle(const Value: Boolean);\r\nbegin\r\n inherited;\r\n UpdateControls;\r\nend;\r\n\r\nprocedure TTMSFNCCustomToolBar.SetAppearance(\r\n const Value: TTMSFNCToolBarAppearance);\r\nbegin\r\n FAppearance.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCCustomToolBar.SetOptionsMenu(\r\n const Value: TTMSFNCToolBarOptionsMenu);\r\nbegin\r\n FOptionsMenu.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCCustomToolBar.SetQuickMenuButton(const Value: Boolean);\r\nbegin\r\n if FQuickMenuButton <> Value then\r\n begin\r\n FQuickMenuButton := Value;\r\n Invalidate;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomToolBar.SetQuickMenuButtonAppearance(\r\n const Value: TTMSFNCToolBarQuickMenuButtonAppearance);\r\nbegin\r\n FQuickMenuButtonAppearance.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCCustomToolBar.SetQuickMenuButtonBitmaps(\r\n const Value: TTMSFNCScaledBitmaps);\r\nbegin\r\n FQuickMenuButtonBitmaps.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCCustomToolBar.SetState(const Value: TTMSFNCToolBarElementState);\r\nvar\r\n I: Integer;\r\n c: TControl;\r\nbegin\r\n if FState <> Value then\r\n begin\r\n FState := Value;\r\n for I := 0 to Self.ControlCount - 1 do\r\n begin\r\n c := Self.Controls[I];\r\n if c is TTMSFNCCustomToolBarElement then\r\n (c as TTMSFNCCustomToolBarElement).State := FState;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomToolBar.SetText(const Value: string);\r\nbegin\r\n if FText <> Value then\r\n begin\r\n FText := Value;\r\n UpdateControls;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomToolBar.SetTextVisible(const Value: Boolean);\r\nbegin\r\n if FTextVisible <> Value then\r\n begin\r\n FTextVisible := Value;\r\n UpdateControls;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomToolBar.SetTrimming(\r\n const Value: TTMSFNCGraphicsTextTrimming);\r\nbegin\r\n if FTrimming <> Value then\r\n begin\r\n FTrimming := Value;\r\n UpdateControls;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomToolBar.SetVerticalTextAlign(\r\n const Value: TTMSFNCGraphicsTextAlign);\r\nbegin\r\n if FVerticalTextAlign <> Value then\r\n begin\r\n FVerticalTextAlign := Value;\r\n UpdateControls;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomToolBar.SetWordWrapping(const Value: Boolean);\r\nbegin\r\n if FWordWrapping <> Value then\r\n begin\r\n FWordWrapping := Value;\r\n UpdateControls;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomToolBar.SetAutoAlign(const Value: Boolean);\r\nbegin\r\n if FAutoAlign <> Value then\r\n begin\r\n FAutoAlign := Value;\r\n UpdateControls;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomToolBar.SetAutoHeight(const Value: Boolean);\r\nbegin\r\n if FAutoHeight <> Value then\r\n begin\r\n FAutoHeight := Value;\r\n UpdateControls;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomToolBar.SetAutoStretchHeight(const Value: Boolean);\r\nbegin\r\n if FAutoStretchHeight <> Value then\r\n begin\r\n FAutoStretchHeight := Value;\r\n UpdateControls;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomToolBar.SetAutoWidth(const Value: Boolean);\r\nbegin\r\n if FAutoWidth <> Value then\r\n begin\r\n FAutoWidth := Value;\r\n UpdateControls;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomToolBar.SetBitmapContainer(\r\n const Value: TTMSFNCBitmapContainer);\r\nvar\r\n I: Integer;\r\n {$IFDEF FNCLIB}\r\n c: TControl;\r\n b: ITMSFNCBitmapContainer;\r\n {$ENDIF}\r\nbegin\r\n FBitmapContainer := Value;\r\n for I := 0 to Self.ControlCount - 1 do\r\n begin\r\n {$IFDEF FNCLIB}\r\n {$IFNDEF WEBLIB}\r\n c := Self.Controls[I];\r\n {$IFDEF FMXLIB}\r\n if Supports(c, IDesignerControl) then\r\n Continue;\r\n {$ENDIF}\r\n {$ENDIF}\r\n {$ENDIF}\r\n\r\n {$IFDEF FNCLIB}\r\n if Supports(c, ITMSFNCBitmapContainer, b) then\r\n b.BitmapContainer := Value;\r\n {$ENDIF}\r\n end;\r\n Invalidate;\r\nend;\r\n\r\nprocedure TTMSFNCCustomToolBar.SetCanCompact(const Value: Boolean);\r\nbegin\r\n if FCanCompact <> Value then\r\n FCanCompact := Value;\r\nend;\r\n\r\nprocedure TTMSFNCCustomToolBar.SetCompact(const Value: Boolean);\r\nbegin\r\n if FCompact <> Value then\r\n begin\r\n if CanCompact then\r\n begin\r\n FCompact := Value;\r\n if Compact then\r\n begin\r\n FOldMenuButtonState := OptionsMenu.ShowButton;\r\n OptionsMenu.ShowButton := False;\r\n FOldWidth := Width;\r\n CompactControls;\r\n Width := Round(CompactWidth);\r\n end\r\n else\r\n begin\r\n Width := Round(FOldWidth);\r\n UncompactControls;\r\n OptionsMenu.ShowButton := FOldMenuButtonState;\r\n end;\r\n\r\n UpdateControls;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomToolBar.SetCompactAppearance(\r\n const Value: TTMSFNCToolBarCompactAppearance);\r\nbegin\r\n FCompactAppearance.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCCustomToolBar.SetCompactAutoBitmapSize(const Value: Boolean);\r\nbegin\r\n if FCompactAutoBitmapSize <> Value then\r\n begin\r\n FCompactAutoBitmapSize := Value;\r\n Invalidate;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomToolBar.SetCompactBitmaps(\r\n const Value: TTMSFNCScaledBitmaps);\r\nbegin\r\n FCompactBitmaps.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCCustomToolBar.SetCompactBitmapSize(const Value: Single);\r\nbegin\r\n if FCompactBitmapSize <> Value then\r\n begin\r\n FCompactBitmapSize := Value;\r\n Invalidate;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomToolBar.SetCompactBitmapVisible(const Value: Boolean);\r\nbegin\r\n if FCompactBitmapVisible <> Value then\r\n begin\r\n FCompactBitmapVisible := Value;\r\n Invalidate;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomToolBar.SetCompactExpanderBitmaps(\r\n const Value: TTMSFNCScaledBitmaps);\r\nbegin\r\n FCompactExpanderBitmaps.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCCustomToolBar.SetCompactWidth(const Value: Single);\r\nbegin\r\n if FCompactWidth <> Value then\r\n begin\r\n FCompactWidth := Value;\r\n if Compact then\r\n Width := Round(CompactWidth);\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomToolBar.SetDisabledFontColor(\r\n const Value: TTMSFNCGraphicsColor);\r\nbegin\r\n if FDisabledFontColor <> Value then\r\n begin\r\n FDisabledFontColor := Value;\r\n Invalidate;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomToolBar.SetFont(const Value: TTMSFNCGraphicsFont);\r\nbegin\r\n FFont.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCCustomToolBar.SetHorizontalTextAlign(\r\n const Value: TTMSFNCGraphicsTextAlign);\r\nbegin\r\n if FHorizontalTextAlign <> Value then\r\n begin\r\n FHorizontalTextAlign := Value;\r\n Invalidate;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomToolBar.SetMinimumWidth(const Value: Single);\r\nbegin\r\n if FMinimumWidth <> Value then\r\n begin\r\n FMinimumWidth := Value;\r\n UpdateControls;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomToolBar.SetAS(const Value: Boolean);\r\nbegin\r\n if FAutoSize <> Value then\r\n begin\r\n FAutoSize := Value;\r\n UpdateControls;\r\n end;\r\nend;\r\n\r\n{$IFDEF FMXLIB}\r\nprocedure TTMSFNCCustomToolBar.SetVisible(const Value: Boolean);\r\n{$ENDIF}\r\n{$IFDEF CMNWEBLIB}\r\nprocedure TTMSFNCCustomToolBar.VisibleChanging;\r\n{$ENDIF}\r\nbegin\r\n inherited;\r\n UpdateDockPanel;\r\nend;\r\n\r\nprocedure TTMSFNCCustomToolBar.ShowOptionsMenu(X, Y: Single);\r\nbegin\r\n {$IFDEF FMXLIB}\r\n if not Assigned(CustomOptionsMenu) then\r\n begin\r\n InitializeOptionsMenu;\r\n DoCustomizeOptionsMenu;\r\n if FAutoOptionsMenu.ItemsCount > 0 then\r\n FAutoOptionsMenu.Popup(X, Y);\r\n end\r\n else\r\n CustomOptionsMenu.Popup(X, Y);\r\n {$ENDIF}\r\n {$IFDEF CMNLIB}\r\n if not Assigned(CustomOptionsMenu) then\r\n begin\r\n InitializeOptionsMenu;\r\n DoCustomizeOptionsMenu;\r\n if FAutoOptionsMenu.Items.Count > 0 then\r\n FAutoOptionsMenu.Popup(Round(X), Round(Y));\r\n end\r\n else\r\n CustomOptionsMenu.Popup(Round(X), Round(Y));\r\n {$ENDIF}\r\nend;\r\n\r\nprocedure TTMSFNCCustomToolBar.UpdateControls;\r\nvar\r\n I: Integer;\r\n c: TControl;\r\n idx: Integer;\r\n fu: Boolean;\r\n hc: TTMSFNCToolBarControl;\r\n {$IFDEF FMXLIB}\r\n maxx, x, w, y, h, hs, hsm, vs, xs, ys, txth, txtw: Single;\r\n mgr: TBounds;\r\n {$ENDIF}\r\n {$IFDEF CMNWEBLIB}\r\n maxx, x, w, y, h, hs, hsm, vs, xs, ys, txth, txtw: Integer;\r\n {$ENDIF}\r\n {$IFDEF LCLLIB}\r\n mgr: TControlBorderSpacing;\r\n {$ENDIF}\r\n {$IFDEF VCLWEBLIB}\r\n mgr: TMargins;\r\n {$ENDIF}\r\n l: Boolean;\r\n {$IFDEF FNCLIB}\r\n ia: ITMSFNCAdaptToStyle;\r\n {$ENDIF}\r\n sz: TSizeF;\r\n cn: TControl;\r\n lm, tm, rm, bm: Single;\r\n\r\n function GetControl(AIndex: Integer): TControl;\r\n begin\r\n Result := nil;\r\n\r\n if (AIndex >= 0) and (AIndex <= Self.ControlCount - 1) then\r\n begin\r\n if Self.Controls[AIndex].Visible then\r\n begin\r\n Result := Self.Controls[AIndex];\r\n Exit;\r\n end;\r\n end;\r\n\r\n while (AIndex >= 0) and (AIndex <= Self.ControlCount - 1) do\r\n begin\r\n Inc(AIndex);\r\n if (AIndex >= 0) and (AIndex <= Self.ControlCount - 1) then\r\n begin\r\n if Self.Controls[AIndex].Visible then\r\n begin\r\n Result := Self.Controls[AIndex];\r\n Exit;\r\n end;\r\n end;\r\n end;\r\n end;\r\n\r\n function IsLoadingEx: Boolean;\r\n var\r\n ii: Integer;\r\n ctl: TControl;\r\n begin\r\n Result := CheckIsLoading;\r\n if not Result then\r\n begin\r\n for ii := ControlCount - 1 downto 0 do\r\n begin\r\n ctl := Controls[ii];\r\n if (csLoading in ctl.ComponentState) then\r\n begin\r\n Result := True;\r\n Exit;\r\n end;\r\n end;\r\n end;\r\n end;\r\n\r\nbegin\r\n if FBlockUpdate or FBlockResize or IsLoadingEx or IsDestroying or not CanBuildControls then\r\n Exit;\r\n\r\n FFirstLoad := False;\r\n\r\n FBlockUpdate := True;\r\n {$IFDEF FMXLIB}\r\n BeginUpdate;\r\n hs := Appearance.HorizontalSpacing;\r\n vs := Appearance.VerticalSpacing;\r\n {$ENDIF}\r\n {$IFDEF CMNWEBLIB}\r\n hs := Round(Appearance.HorizontalSpacing);\r\n vs := Round(Appearance.VerticalSpacing);\r\n {$ENDIF}\r\n\r\n x := hs;\r\n if Appearance.DragGrip then\r\n begin\r\n {$IFDEF FMXLIB}\r\n x := x + GetDragGripRect.Right;\r\n {$ENDIF}\r\n {$IFDEF CMNWEBLIB}\r\n x := x + Round(GetDragGripRect.Right);\r\n {$ENDIF}\r\n if hs = 0 then\r\n x := x + ScalePaintValue(3);\r\n end;\r\n\r\n y := vs;\r\n\r\n xs := x;\r\n ys := y;\r\n\r\n hsm := ScalePaintValue(30);\r\n txth := 0;\r\n txtw := 0;\r\n sz := GetTextSize;\r\n if sz.cy > 0 then\r\n txth := Round(sz.cy + ScalePaintValue(4));\r\n\r\n if sz.cx > 0 then\r\n txtw := Round(sz.cx + ScalePaintValue(8));\r\n\r\n w := txtw;\r\n maxx := 0;\r\n h := 0;\r\n idx := 0;\r\n\r\n fu := False;\r\n for I := 0 to Self.ControlCount - 1 do\r\n begin\r\n c := Self.Controls[I];\r\n {$IFDEF FMXLIB}\r\n if Supports(c, IDesignerControl) then\r\n Continue;\r\n {$ENDIF}\r\n\r\n hc := GetHiddenControl(c);\r\n fu := not Assigned(hc);\r\n if fu then\r\n Break;\r\n end;\r\n\r\n l := False;\r\n for I := 0 to Self.ControlCount - 1 do\r\n begin\r\n c := Self.Controls[I];\r\n {$IFDEF FMXLIB}\r\n if Supports(c, IDesignerControl) then\r\n Continue;\r\n {$ENDIF}\r\n\r\n {$IFDEF FNCLIB}\r\n if Supports(c, ITMSFNCAdaptToStyle, ia) then\r\n ia.AdaptToStyle := AdaptToStyle;\r\n {$ENDIF}\r\n\r\n if l then\r\n begin\r\n x := xs;\r\n y := h;\r\n ys := y;\r\n end;\r\n\r\n l := False;\r\n if c is TTMSFNCCustomToolBarElement then\r\n begin\r\n l := (c as TTMSFNCCustomToolBarElement).LastElement;\r\n (c as TTMSFNCCustomToolBarElement).OnUpdateToolBar := UpdateToolBar;\r\n (c as TTMSFNCCustomToolBarElement).OnUpdateToolBarControl := UpdateToolBarControl;\r\n end;\r\n\r\n DoIsLastElement(c, l);\r\n\r\n if not (c = FOptionsMenuButton) then\r\n begin\r\n if fu then\r\n begin\r\n if c is TTMSFNCCustomToolBarElement then\r\n (c as TTMSFNCCustomToolBarElement).ControlIndex := idx\r\n else\r\n c.Tag := idx;\r\n end;\r\n\r\n if c.Visible then\r\n begin\r\n {$IFDEF FMXLIB}\r\n if AutoAlign then\r\n begin\r\n c.Position.X := x + c.Margins.Left;\r\n c.Position.Y := y + c.Margins.Top;\r\n end;\r\n\r\n if AutoStretchHeight or ((c is TTMSFNCDefaultToolBarButton) and ((c as TTMSFNCDefaultToolBarButton).Layout = bblLarge)) then\r\n begin\r\n h := Height - c.Margins.Bottom - txth - y;\r\n c.Height := h;\r\n end\r\n else\r\n h := Max(h, c.Position.y + c.Height + vs + c.Margins.Bottom);\r\n\r\n cn := GetControl(I + 1);\r\n if Assigned(cn) and (cn is TTMSFNCDefaultToolBarButton) then\r\n begin\r\n case (cn as TTMSFNCDefaultToolBarButton).Layout of\r\n bblBitmap, bblLabel:\r\n begin\r\n y := Max(y, c.Position.Y + c.Height + vs + c.Margins.Bottom);\r\n if y + cn.Margins.Top + cn.Height > Height - cn.Margins.Bottom - txth then\r\n begin\r\n x := Max(x, Max(maxx, c.Position.x + c.Width + hs + c.Margins.Right));\r\n y := ys;\r\n end\r\n else\r\n begin\r\n c.Position.X := x + c.Margins.Left;\r\n maxx := Max(x, Max(maxx, c.Position.x + c.Width + hs + c.Margins.Right));\r\n end;\r\n end;\r\n bblNone, bblLarge:\r\n begin\r\n y := ys;\r\n x := Max(x, c.Position.x + c.Width + hs + c.Margins.Right);\r\n end;\r\n end;\r\n end\r\n else\r\n begin\r\n y := ys;\r\n x := Max(x, Max(maxx, c.Position.x + c.Width + hs + c.Margins.Right));\r\n end;\r\n\r\n {$ENDIF}\r\n {$IFDEF VCLWEBLIB}\r\n if c.AlignWithMargins then\r\n begin\r\n if AutoAlign then\r\n begin\r\n c.Left := x + c.Margins.Left;\r\n c.Top := y + c.Margins.Top;\r\n end;\r\n\r\n if AutoStretchHeight or ((c is TTMSFNCDefaultToolBarButton) and ((c as TTMSFNCDefaultToolBarButton).Layout = bblLarge)) then\r\n begin\r\n h := Height - c.Margins.Bottom - txth - y;\r\n c.Height := h;\r\n end\r\n else\r\n h := Max(h, c.Top + c.Height + vs + c.Margins.Bottom);\r\n\r\n cn := GetControl(I + 1);\r\n if Assigned(cn) and (cn is TTMSFNCDefaultToolBarButton) then\r\n begin\r\n case (cn as TTMSFNCDefaultToolBarButton).Layout of\r\n bblBitmap, bblLabel:\r\n begin\r\n y := Max(y, c.Top + c.Height + vs + c.Margins.Bottom);\r\n if y + cn.Margins.Top + cn.Height > Height - cn.Margins.Bottom - txth then\r\n begin\r\n x := Max(x, Max(maxx, c.Left + c.Width + hs + c.Margins.Right));\r\n y := ys;\r\n end\r\n else\r\n begin\r\n c.Left := x + c.Margins.Left;\r\n maxx := Max(x, Max(maxx, c.Left + c.Width + hs + c.Margins.Right));\r\n end;\r\n end;\r\n bblNone, bblLarge:\r\n begin\r\n x := Max(x, c.Left + c.Width + hs + c.Margins.Right);\r\n y := ys;\r\n end;\r\n end;\r\n end\r\n else\r\n begin\r\n x := Max(x, Max(maxx, c.Left + c.Width + hs + c.Margins.Right));\r\n y := ys;\r\n end;\r\n end\r\n else\r\n begin\r\n if AutoAlign then\r\n begin\r\n c.Left := x;\r\n c.Top := y;\r\n end;\r\n\r\n if AutoStretchHeight or ((c is TTMSFNCDefaultToolBarButton) and ((c as TTMSFNCDefaultToolBarButton).Layout = bblLarge)) then\r\n begin\r\n h := Height - txth - y;\r\n c.Height := h\r\n end\r\n else\r\n h := Max(h, c.Top + c.Height + vs);\r\n\r\n cn := GetControl(I + 1);\r\n if Assigned(cn) and (cn is TTMSFNCDefaultToolBarButton) then\r\n begin\r\n case (cn as TTMSFNCDefaultToolBarButton).Layout of\r\n bblBitmap, bblLabel:\r\n begin\r\n y := Max(y, c.Top + c.Height + vs);\r\n if y + cn.Height > Height - txth then\r\n begin\r\n x := Max(x, Max(maxx, c.Left + c.Width + hs));\r\n y := ys;\r\n end\r\n else\r\n begin\r\n c.Left := x;\r\n maxx := Max(x, Max(maxx, c.Left + c.Width + hs));\r\n end;\r\n end;\r\n bblNone, bblLarge:\r\n begin\r\n x := Max(x, c.Left + c.Width + hs);\r\n y := ys;\r\n end;\r\n end;\r\n end\r\n else\r\n begin\r\n x := Max(x, Max(maxx, c.Left + c.Width + hs));\r\n y := ys;\r\n end;\r\n end;\r\n {$ENDIF}\r\n {$IFDEF LCLLIB}\r\n if AutoAlign then\r\n begin\r\n c.Left := x + c.BorderSpacing.Left;\r\n c.Top := y + c.BorderSpacing.Top;\r\n end;\r\n\r\n if AutoStretchHeight or ((c is TTMSFNCDefaultToolBarButton) and ((c as TTMSFNCDefaultToolBarButton).Layout = bblLarge)) then\r\n begin\r\n h := Height - c.BorderSpacing.Bottom - txth - y;\r\n c.Height := h;\r\n end\r\n else\r\n h := Max(h, c.Top + c.Height + vs + c.BorderSpacing.Bottom);\r\n\r\n cn := GetControl(I + 1);\r\n if Assigned(cn) and (cn is TTMSFNCDefaultToolBarButton) then\r\n begin\r\n case (cn as TTMSFNCDefaultToolBarButton).Layout of\r\n bblBitmap, bblLabel:\r\n begin\r\n y := Max(y, c.Top + c.Height + vs + c.BorderSpacing.Bottom);\r\n if y + cn.BorderSpacing.Top + cn.Height > Height - cn.BorderSpacing.Bottom - txth then\r\n begin\r\n x := Max(x, Max(maxx, c.Left + c.Width + hs + c.BorderSpacing.Right));\r\n y := ys;\r\n end\r\n else\r\n begin\r\n c.Left := x + c.BorderSpacing.Left;\r\n maxx := Max(x, Max(maxx, c.Left + c.Width + hs + c.BorderSpacing.Right));\r\n end;\r\n end;\r\n bblNone, bblLarge:\r\n begin\r\n x := Max(x, c.Left + c.Width + hs + c.BorderSpacing.Right);\r\n y := ys;\r\n end;\r\n end;\r\n end\r\n else\r\n begin\r\n x := Max(x, Max(maxx, c.Left + c.Width + hs + c.BorderSpacing.Right));\r\n y := ys;\r\n end;\r\n\r\n {$ENDIF}\r\n w := Max(w, x);\r\n end;\r\n inc(idx);\r\n end;\r\n end;\r\n\r\n if h = 0 then\r\n h := hsm;\r\n\r\n FOptionsMenuButton.Visible := OptionsMenu.ShowButton;\r\n if OptionsMenu.ShowButton then\r\n FOptionsMenuButton.Parent := Self\r\n else\r\n FOptionsMenuButton.Parent := nil;\r\n\r\n {$IFDEF FMXLIB}\r\n if FOptionsMenuButton.Visible then\r\n begin\r\n FOptionsMenuButton.Index := Self.ControlCount;\r\n FOptionsMenuButton.ControlIndex := Self.ControlCount - 1;\r\n FOptionsMenuButton.Position.Y := FOptionsMenuButton.Margins.Top;\r\n mgr := FOptionsMenuButton.Margins;\r\n\r\n if AutoSize then\r\n begin\r\n FOptionsMenuButton.Position.X := w + mgr.Left;\r\n if AutoHeight then\r\n FOptionsMenuButton.Height := h - mgr.Bottom - mgr.Top - txth\r\n else if AutoStretchHeight then\r\n FOptionsMenuButton.Height := Height - mgr.Bottom - mgr.Top - txth;\r\n end\r\n else\r\n begin\r\n FOptionsMenuButton.Position.X := Width - FOptionsMenuButton.Width - mgr.Right;\r\n FOptionsMenuButton.Height := Height - mgr.Bottom - mgr.Top - txth;\r\n end;\r\n w := w + FOptionsMenuButton.Width + mgr.Right + mgr.Left;\r\n end;\r\n\r\n if AutoSize then\r\n begin\r\n if Appearance.Separator then\r\n w := w + Appearance.SeparatorStroke.Width;\r\n\r\n w := Round(Max(MinimumWidth, w));\r\n\r\n if ControlAlignment = caNone then\r\n begin\r\n lm := 0;\r\n rm := 0;\r\n tm := 0;\r\n bm := 0;\r\n GetControlMargins(lm, tm, rm, bm);\r\n w := w + lm + rm;\r\n end;\r\n\r\n h := h + txth;\r\n\r\n if AutoHeight and AutoWidth and (ControlAlignment = caNone) then\r\n SetBounds(Position.X, Position.Y, w, h)\r\n else if AutoHeight and not (ControlAlignment in [caLeft, caRight, caClient]) then\r\n SetBounds(Position.X, Position.Y, Width, h)\r\n else if AutoWidth and not (ControlAlignment in [caTop, caBottom, caClient]) then\r\n SetBounds(Position.X, Position.Y, w, Height);\r\n end;\r\n\r\n {$ENDIF}\r\n {$IFDEF CMNWEBLIB}\r\n if FOptionsMenuButton.Visible then\r\n begin\r\n FOptionsMenuButton.ControlIndex := Self.ControlCount - 1;\r\n {$IFDEF LCLLIB}\r\n FOptionsMenuButton.Top := FOptionsMenuButton.BorderSpacing.Top;\r\n mgr := FOptionsMenuButton.BorderSpacing;\r\n {$ENDIF}\r\n {$IFDEF VCLWEBLIB}\r\n FOptionsMenuButton.Top := FOptionsMenuButton.Margins.Top;\r\n mgr := FOptionsMenuButton.Margins;\r\n if not FOptionsMenuButton.AlignWithMargins then\r\n begin\r\n mgr.Left := 0;\r\n mgr.Top := 0;\r\n mgr.Right := 0;\r\n mgr.Bottom := 0;\r\n end;\r\n {$ENDIF}\r\n\r\n if AutoSize then\r\n begin\r\n FOptionsMenuButton.Left := w + mgr.Left;\r\n if AutoHeight then\r\n FOptionsMenuButton.Height := h - mgr.Bottom - mgr.Top\r\n else if AutoStretchHeight then\r\n FOptionsMenuButton.Height := Height - mgr.Bottom - txth - mgr.Top;\r\n end\r\n else\r\n begin\r\n FOptionsMenuButton.Left := Width - FOptionsMenuButton.Width - mgr.Right;\r\n FOptionsMenuButton.Height := Height - mgr.Bottom - mgr.Top - txth;\r\n end;\r\n w := w + FOptionsMenuButton.Width + mgr.Right + mgr.Left;\r\n end;\r\n\r\n if AutoSize then\r\n begin\r\n if Appearance.Separator then\r\n w := w + Round(Appearance.SeparatorStroke.Width);\r\n\r\n w := Round(Max(MinimumWidth, w));\r\n\r\n if ControlAlignment = caNone then\r\n begin\r\n lm := 0;\r\n rm := 0;\r\n tm := 0;\r\n bm := 0;\r\n GetControlMargins(lm, tm, rm, bm);\r\n w := w + Round(lm + rm);\r\n end;\r\n\r\n h := h + txth;\r\n\r\n if AutoHeight and AutoWidth and (ControlAlignment = caNone) then\r\n SetBounds(Left, Top, w, h)\r\n else if AutoHeight and not (ControlAlignment in [caLeft, caRight, caClient]) then\r\n SetBounds(Left, Top, Width, h)\r\n else if AutoWidth and not (ControlAlignment in [caTop, caBottom, caClient]) then\r\n SetBounds(Left, Top, w, Height);\r\n end;\r\n {$ENDIF}\r\n\r\n {$IFDEF FMXLIB}\r\n EndUpdate;\r\n {$ENDIF}\r\n\r\n if Assigned(OnUpdateControls) then\r\n OnUpdateControls(Self);\r\n\r\n FBlockUpdate := False;\r\nend;\r\n\r\nprocedure TTMSFNCCustomToolBar.UpdateDockPanel;\r\nbegin\r\n if Assigned(OnUpdateDockPanel) then\r\n OnUpdateDockPanel(Self);\r\nend;\r\n\r\n{ TTMSFNCDefaultToolBarButton }\r\n\r\n{$IFNDEF WEBLIB}\r\n{$IFDEF FNCLIB}\r\n{$IFNDEF LCLLIB}\r\n{$HINTS OFF}\r\n{$IF COMPILERVERSION >= 30}\r\nprocedure TTMSFNCDefaultToolBarButton.ActionChange(Sender: {$IFNDEF FMXLIB}TObject{$ELSE}TBasicAction{$ENDIF};\r\n CheckDefaults: Boolean);\r\nvar\r\n l: TCustomImageList;\r\n idx: Integer;\r\n b: TTMSFNCBitmap;\r\nbegin\r\n inherited ActionChange(Sender, CheckDefaults);\r\n if Sender is TCustomAction then\r\n begin\r\n if (not CheckDefaults) or (Text = '') or (Text = Name) then\r\n Text := TCustomAction(Sender).Text;\r\n end;\r\n\r\n if (Sender is TCustomAction) and not CheckDefaults then\r\n begin\r\n if (TCustomAction(Sender).ActionList <> nil) and (TCustomAction(Sender).ActionList.Images is TCustomImageList) then\r\n begin\r\n l := TCustomImageList(TCustomAction(Sender).ActionList.Images);\r\n idx := TCustomAction(Sender).ImageIndex;\r\n b := TTMSFNCBitmap.Create;\r\n try\r\n TTMSFNCUtils.LoadBitmapFromImageList(b, l, idx);\r\n if not IsBitmapEmpty(b) then\r\n begin\r\n Bitmaps.Clear;\r\n Bitmaps.Add.Bitmap.Assign(b);\r\n end;\r\n finally\r\n b.free;\r\n end;\r\n end;\r\n end;\r\nend;\r\n{$IFEND}\r\n{$HINTS ON}\r\n{$ENDIF}\r\n{$ENDIF}\r\n{$ENDIF}\r\n\r\nprocedure TTMSFNCDefaultToolBarButton.AppearanceChanged;\r\nbegin\r\n Invalidate;\r\nend;\r\n\r\nprocedure TTMSFNCDefaultToolBarButton.ApplyStyle;\r\nvar\r\n c: TTMSFNCGraphicsColor;\r\nbegin\r\n inherited;\r\n c := gcNull;\r\n if TTMSFNCStyles.GetStyleBackgroundFillColor(c) then\r\n begin\r\n Appearance.NormalFill.Color := c;\r\n Appearance.NormalFill.Kind := gfkSolid;\r\n Appearance.DisabledFill.Color := Blend(c, gcDarkgray, 20);\r\n Appearance.DisabledFill.Kind := gfkSolid;\r\n Appearance.InnerStroke.Color := Blend(Appearance.NormalFill.Color, Appearance.NormalStroke.Color, 75);\r\n Appearance.InnerStroke.Kind := gskSolid;\r\n end;\r\n\r\n c := gcNull;\r\n if TTMSFNCStyles.GetStyleTextFontColor(c) then\r\n Font.Color := c;\r\n\r\n c := gcNull;\r\n if TTMSFNCStyles.GetStyleBackgroundStrokeColor(c) then\r\n begin\r\n Appearance.NormalStroke.Color := c;\r\n Appearance.DownStroke.Color := c;\r\n Appearance.DisabledStroke.Color := c;\r\n Appearance.NormalStroke.Color := c;\r\n Appearance.DownStroke.Color := c;\r\n Appearance.DisabledStroke.Color := c;\r\n Appearance.HoverStroke.Color := c;\r\n end;\r\n\r\n c := gcNull;\r\n if TTMSFNCStyles.GetStyleSelectionFillColor(c) then\r\n begin\r\n Appearance.HoverFill.Color := c;\r\n Appearance.HoverFill.Kind := gfkSolid;\r\n Appearance.DownFill.Color := Blend(c, Fill.Color, 20);\r\n Appearance.DownFill.Kind := gfkSolid;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCDefaultToolBarButton.Assign(Source: TPersistent);\r\nbegin\r\n inherited;\r\n if Source is TTMSFNCDefaultToolBarButton then\r\n begin\r\n FLayout := (Source as TTMSFNCDefaultToolBarButton).Layout;\r\n FCompactLayout := (Source as TTMSFNCDefaultToolBarButton).CompactLayout;\r\n FMinimumLayout := (Source as TTMSFNCDefaultToolBarButton).MinimumLayout;\r\n FMaximumLayout := (Source as TTMSFNCDefaultToolBarButton).MaximumLayout;\r\n FBitmapPosition := (Source as TTMSFNCDefaultToolBarButton).BitmapPosition;\r\n FBitmapSize := (Source as TTMSFNCDefaultToolBarButton).BitmapSize;\r\n FLargeLayoutBitmapSize := (Source as TTMSFNCDefaultToolBarButton).LargeLayoutBitmapSize;\r\n FAutoBitmapSize := (Source as TTMSFNCDefaultToolBarButton).AutoBitmapSize;\r\n FLargeLayoutAutoBitmapSize := (Source as TTMSFNCDefaultToolBarButton).LargeLayoutAutoBitmapSize;\r\n FStretchBitmapIfNoText := (Source as TTMSFNCDefaultToolBarButton).StretchBitmapIfNoText;\r\n FAppearance.Assign((Source as TTMSFNCDefaultToolBarButton).Appearance);\r\n FBitmapContainer := (Source as TTMSFNCDefaultToolBarButton).BitmapContainer;\r\n FBitmaps.Assign((Source as TTMSFNCDefaultToolBarButton).Bitmaps);\r\n FDisabledBitmaps.Assign((Source as TTMSFNCDefaultToolBarButton).DisabledBitmaps);\r\n FLargeLayoutHoverBitmaps.Assign((Source as TTMSFNCDefaultToolBarButton).LargeLayoutHoverBitmaps);\r\n FLargeLayoutBitmaps.Assign((Source as TTMSFNCDefaultToolBarButton).LargeLayoutBitmaps);\r\n FLargeLayoutDisabledBitmaps.Assign((Source as TTMSFNCDefaultToolBarButton).LargeLayoutDisabledBitmaps);\r\n FHoverBitmaps.Assign((Source as TTMSFNCDefaultToolBarButton).HoverBitmaps);\r\n FBitmapVisible := (Source as TTMSFNCDefaultToolBarButton).BitmapVisible;\r\n FText := (Source as TTMSFNCDefaultToolBarButton).Text;\r\n FTextVisible := (Source as TTMSFNCDefaultToolBarButton).TextVisible;\r\n FDropDownHeight := (Source as TTMSFNCDefaultToolBarButton).DropDownHeight;\r\n FDropDownWidth := (Source as TTMSFNCDefaultToolBarButton).DropDownWidth;\r\n FDropDownAutoWidth := (Source as TTMSFNCDefaultToolBarButton).DropDownAutoWidth;\r\n FWordWrapping := (Source as TTMSFNCDefaultToolBarButton).WordWrapping;\r\n FHorizontalTextAlign := (Source as TTMSFNCDefaultToolBarButton).HorizontalTextAlign;\r\n FVerticalTextAlign := (Source as TTMSFNCDefaultToolBarButton).VerticalTextAlign;\r\n FTrimming := (Source as TTMSFNCDefaultToolBarButton).Trimming;\r\n FFont.Assign((Source as TTMSFNCDefaultToolBarButton).Font);\r\n FHoverFontColor := (Source as TTMSFNCDefaultToolBarButton).HoverFontColor;\r\n FDownFontColor := (Source as TTMSFNCDefaultToolBarButton).DownFontColor;\r\n FDisabledFontColor := (Source as TTMSFNCDefaultToolBarButton).DisabledFontColor;\r\n FStretchText := (Source as TTMSFNCDefaultToolBarButton).StretchText;\r\n Invalidate;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCDefaultToolBarButton.BitmapsChanged(Sender: TObject);\r\nvar\r\n bmp: TTMSFNCBitmap;\r\nbegin\r\n bmp := TTMSFNCGraphics.GetScaledBitmap(Bitmaps, 0, BitmapContainer);\r\n BitmapVisible := Assigned(bmp) and not IsBitmapEmpty(bmp);\r\n\r\n if not BitmapVisible and (Layout = bblLarge) then\r\n begin\r\n bmp := TTMSFNCGraphics.GetScaledBitmap(LargeLayoutBitmaps, 0, BitmapContainer);\r\n BitmapVisible := Assigned(bmp) and not IsBitmapEmpty(bmp);\r\n end;\r\n\r\n Invalidate;\r\nend;\r\n\r\nfunction TTMSFNCDefaultToolBarButton.CanChangeText: Boolean;\r\nbegin\r\n Result := True;\r\nend;\r\n\r\nfunction TTMSFNCDefaultToolBarButton.CanDrawDesignTime: Boolean;\r\nbegin\r\n Result := False;\r\nend;\r\n\r\nfunction TTMSFNCDefaultToolBarButton.CanDropDown: Boolean;\r\nbegin\r\n Result := False;\r\nend;\r\n\r\nprocedure TTMSFNCDefaultToolBarButton.ChangeDPIScale(M, D: Integer);\r\nbegin\r\n inherited;\r\n\r\n BeginUpdate;\r\n Font.Height := TTMSFNCUtils.MulDivInt(Font.Height, M, D);\r\n BitmapSize := TTMSFNCUtils.MulDivSingle(BitmapSize, M, D);\r\n LargeLayoutBitmapSize := TTMSFNCUtils.MulDivSingle(LargeLayoutBitmapSize, M, D);\r\n\r\n if FOldHeight <> -1 then\r\n FOldHeight := TTMSFNCUtils.MulDivSingle(FOldHeight, M, D);\r\n FDropDownHeight := TTMSFNCUtils.MulDivSingle(FDropDownHeight, M, D);\r\n FDropDownWidth := TTMSFNCUtils.MulDivSingle(FDropDownWidth, M, D);\r\n\r\n FPopup.DropDownWidth := TTMSFNCUtils.MulDivSingle(FPopup.DropDownWidth, M, D);\r\n FPopup.DropDownHeight := TTMSFNCUtils.MulDivSingle(FPopup.DropDownHeight, M, D);\r\n\r\n// FAppearance.Rounding := TTMSFNCUtils.MulDivSingle(FAppearance.Rounding, M, D);\r\n EndUpdate;\r\nend;\r\n\r\nprocedure TTMSFNCDefaultToolBarButton.CloseDropDown;\r\nbegin\r\n if not Assigned(FPopup) then\r\n Exit;\r\n\r\n if FPopup.IsOpen then\r\n FPopup.IsOpen := False;\r\nend;\r\n\r\nconstructor TTMSFNCDefaultToolBarButton.Create(AOwner: TComponent);\r\nbegin\r\n inherited;\r\n {$IFDEF FMXLIB}\r\n EnableExecuteAction := True;\r\n {$ENDIF}\r\n FUseStyledDropDownIcon := True;\r\n FOldHeight := -1;\r\n FLayout := bblNone;\r\n FCompactLayout := bblNone;\r\n FMinimumLayout := bblBitmap;\r\n FMaximumLayout := bblLarge;\r\n\r\n FFont := TTMSFNCGraphicsFont.Create;\r\n FFont.OnChanged := @DoFontChanged;\r\n\r\n FHoverFontColor := gcNull;\r\n FDownFontColor := gcNull;\r\n FDisabledFontColor := gcNull;\r\n\r\n FDownState := False;\r\n FApplyName := True;\r\n FCloseOnSelection := True;\r\n FBitmapSize := 24;\r\n FLargeLayoutBitmapSize := 32;\r\n FAutoBitmapSize := False;\r\n FLargeLayoutAutoBitmapSize := False;\r\n FStretchBitmapIfNoText := True;\r\n FStretchText := False;\r\n\r\n FDropDownWidth := 135;\r\n FDropDownHeight := 135;\r\n FDropDownAutoWidth := False;\r\n FPopup := TTMSFNCPopup.Create(Self);\r\n FPopup.DragWithParent := True;\r\n FPopup.DropDownWidth := FDropDownWidth;\r\n FPopup.DropDownHeight := FDropDownHeight;\r\n FPopup.OnPopup := DoPopup;\r\n FPopup.OnClosePopup := DoClosePopup;\r\n FPopupPlacement := ppBottom;\r\n\r\n FBitmaps := TTMSFNCScaledBitmaps.Create(Self);\r\n FBitmaps.OnChange := @BitmapsChanged;\r\n FDisabledBitmaps := TTMSFNCScaledBitmaps.Create(Self);\r\n FDisabledBitmaps.OnChange := @BitmapsChanged;\r\n FHoverBitmaps := TTMSFNCScaledBitmaps.Create(Self);\r\n FHoverBitmaps.OnChange := @BitmapsChanged;\r\n\r\n FLargeLayoutBitmaps := TTMSFNCScaledBitmaps.Create(Self);\r\n FLargeLayoutBitmaps.OnChange := @BitmapsChanged;\r\n FLargeLayoutDisabledBitmaps := TTMSFNCScaledBitmaps.Create(Self);\r\n FLargeLayoutDisabledBitmaps.OnChange := @BitmapsChanged;\r\n FLargeLayoutHoverBitmaps := TTMSFNCScaledBitmaps.Create(Self);\r\n FLargeLayoutHoverBitmaps.OnChange := @BitmapsChanged;\r\n\r\n FAppearance := TTMSFNCToolBarButtonAppearance.Create(Self);\r\n\r\n FTextVisible := True;\r\n FBitmapVisible := False;\r\n FWordWrapping := False;\r\n FHorizontalTextAlign := gtaCenter;\r\n FVerticalTextAlign := gtaCenter;\r\n FTrimming := gttCharacter;\r\n FBitmapPosition := bbpLeft;\r\n\r\n Width := 100;\r\n Height := 24;\r\nend;\r\n\r\nprocedure TTMSFNCDefaultToolBarButton.SetDisabledBitmaps(const Value: TTMSFNCScaledBitmaps);\r\nbegin\r\n FDisabledBitmaps.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCDefaultToolBarButton.SetDisabledFontColor(\r\n const Value: TTMSFNCGraphicsColor);\r\nbegin\r\n if FDisabledFontColor <> Value then\r\n begin\r\n FDisabledFontColor := Value;\r\n Invalidate;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCDefaultToolBarButton.SetHoverBitmaps(const Value: TTMSFNCScaledBitmaps);\r\nbegin\r\n FHoverBitmaps.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCDefaultToolBarButton.SetDownFontColor(\r\n const Value: TTMSFNCGraphicsColor);\r\nbegin\r\n if FDownFontColor <> Value then\r\n begin\r\n FDownFontColor := Value;\r\n Invalidate;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCDefaultToolBarButton.SetHoverFontColor(\r\n const Value: TTMSFNCGraphicsColor);\r\nbegin\r\n if FHoverFontColor <> Value then\r\n begin\r\n FHoverFontColor := Value;\r\n Invalidate;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCDefaultToolBarButton.SetMaximumLayout(\r\n const Value: TTMSFNCToolBarButtonLayout);\r\nbegin\r\n if FMaximumLayout <> Value then\r\n begin\r\n FMaximumLayout := Value;\r\n UpdateToolBar;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCDefaultToolBarButton.SetMinimumLayout(\r\n const Value: TTMSFNCToolBarButtonLayout);\r\nbegin\r\n if FMinimumLayout <> Value then\r\n begin\r\n FMinimumLayout := Value;\r\n UpdateToolBar;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCDefaultToolBarButton.SetDownState(const Value: Boolean);\r\nbegin\r\n FDownState := Value;\r\n Invalidate;\r\nend;\r\n\r\nprocedure TTMSFNCDefaultToolBarButton.SetDropDownControl(const Value: TControl);\r\nbegin\r\n FDropDownControl := Value;\r\n if Assigned(FDropDownControl) then\r\n begin\r\n if not (csDesigning in ComponentState) then\r\n begin\r\n if Assigned(FPopup) then\r\n begin\r\n FPopup.ContentControl := FDropDownControl;\r\n FPopup.FocusedControl := FDropDownControl;\r\n end;\r\n end\r\n else if (csDesigning in ComponentState) then\r\n begin\r\n DropDownHeight := FDropDownControl.Height;\r\n DropDownWidth := FDropDownControl.Width;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCDefaultToolBarButton.SetDropDownAutoWidth(\r\n const Value: Boolean);\r\nbegin\r\n if FDropDownAutoWidth <> Value then\r\n begin\r\n FDropDownAutoWidth := Value;\r\n if Assigned(FPopup) then\r\n begin\r\n if FDropDownAutoWidth then\r\n FPopup.DropDownWidth := Width\r\n else\r\n FPopup.DropDownWidth := FDropDownWidth;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCDefaultToolBarButton.SetDropDownHeight(const Value: Single);\r\nbegin\r\n FDropDownHeight := Value;\r\n if Assigned(FPopup) and not DropDownAutoWidth then\r\n FPopup.DropDownHeight := FDropDownHeight;\r\nend;\r\n\r\nprocedure TTMSFNCDefaultToolBarButton.SetDropDownWidth(const Value: Single);\r\nbegin\r\n FDropDownWidth := Value;\r\n if Assigned(FPopup) then\r\n FPopup.DropDownWidth := FDropDownWidth;\r\nend;\r\n\r\nprocedure TTMSFNCDefaultToolBarButton.SetFont(const Value: TTMSFNCGraphicsFont);\r\nbegin\r\n FFont.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCDefaultToolBarButton.SetHorizontalTextAlign(\r\n const Value: TTMSFNCGraphicsTextAlign);\r\nbegin\r\n if FHorizontalTextAlign <> Value then\r\n begin\r\n FHorizontalTextAlign := Value;\r\n Invalidate;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomToolBarButton.SetAdaptToStyle(const Value: Boolean);\r\nbegin\r\n inherited;\r\n if Assigned(FDropDownButton) then\r\n FDropDownButton.AdaptToStyle := AdaptToStyle;\r\nend;\r\n\r\nprocedure TTMSFNCCustomToolBarButton.SetDropDownKind(\r\n const Value: TTMSFNCToolBarButtonDropDownKind);\r\nbegin\r\n if FDropDownKind <> Value then\r\n begin\r\n FDropDownKind := Value;\r\n if Assigned(FDropDownButton) then\r\n begin\r\n case DropDownKind of\r\n ddkNormal:\r\n begin\r\n FDropDownButton.Visible := False;\r\n FDropDownButton.Parent := nil;\r\n {$IFDEF FMXLIB}\r\n FDropDownButton.HitTest := True;\r\n {$ENDIF}\r\n FDropDownButton.Appearance.Transparent := False;\r\n end;\r\n ddkDropDown:\r\n begin\r\n FDropDownButton.Visible := False;\r\n FDropDownButton.Parent := Self;\r\n {$IFDEF FMXLIB}\r\n FDropDownButton.HitTest := False;\r\n {$ENDIF}\r\n FDropDownButton.Appearance.Transparent := True;\r\n end;\r\n ddkDropDownButton:\r\n begin\r\n FDropDownButton.Visible := True;\r\n FDropDownButton.Parent := Self;\r\n {$IFDEF FMXLIB}\r\n FDropDownButton.HitTest := True;\r\n {$ENDIF}\r\n FDropDownButton.Appearance.Transparent := False;\r\n end;\r\n end;\r\n end;\r\n Invalidate;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomToolBarButton.SetDropDownPosition(const Value: TTMSFNCToolBarButtonDropDownPosition);\r\nvar\r\n sc: Single;\r\nbegin\r\n if FDropDownPosition <> Value then\r\n begin\r\n sc := TTMSFNCUtils.GetDPIScale(Self, 96);\r\n\r\n FDropDownPosition := Value;\r\n if Assigned(FDropDownButton) then\r\n begin\r\n case Value of\r\n ddpRight:\r\n begin\r\n {$IFDEF FMXLIB}\r\n FDropDownButton.Align := TAlignLayout.Right;\r\n {$ENDIF}\r\n {$IFDEF CMNWEBLIB}\r\n FDropDownButton.Align := alRight;\r\n {$ENDIF}\r\n FDropDownButton.Width := Round(sc *17);\r\n FDropDownButton.Appearance.Corners := [gcTopRight, gcBottomRight];\r\n end;\r\n ddpBottom:\r\n begin\r\n {$IFDEF FMXLIB}\r\n FDropDownButton.Align := TAlignLayout.Bottom;\r\n {$ENDIF}\r\n {$IFDEF CMNWEBLIB}\r\n FDropDownButton.Align := alBottom;\r\n {$ENDIF}\r\n FDropDownButton.Height := Round(sc * 10);\r\n FDropDownButton.Appearance.Corners := [gcBottomLeft, gcBottomRight];\r\n end;\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\n{$IFDEF FMXLIB}\r\nprocedure TTMSFNCCustomToolBarButton.SetEnabled(const Value: Boolean);\r\n{$ENDIF}\r\n{$IFDEF CMNWEBLIB}\r\nprocedure TTMSFNCCustomToolBarButton.SetEnabled(Value: Boolean);\r\n{$ENDIF}\r\nvar\r\n d: TTMSFNCToolBarDropDownButton;\r\nbegin\r\n inherited;\r\n d := GetDropDownButtonControl;\r\n if Assigned(d) then\r\n d.Enabled := Value;\r\nend;\r\n\r\nprocedure TTMSFNCCustomToolBarButton.SetHidden(const Value: Boolean);\r\nbegin\r\n if FHidden <> Value then\r\n begin\r\n FHidden := Value;\r\n UpdateToolBarControl;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomToolBarButton.UpdateDropDownButton;\r\nbegin\r\n if Assigned(FDropDownButton) then\r\n FDropDownButton.Appearance.Rounding := Appearance.Rounding;\r\nend;\r\n\r\ndestructor TTMSFNCDefaultToolBarButton.Destroy;\r\nbegin\r\n FFont.Free;\r\n FPopup.Free;\r\n FBitmaps.Free;\r\n FDisabledBitmaps.Free;\r\n FHoverBitmaps.Free;\r\n FLargeLayoutBitmaps.Free;\r\n FLargeLayoutDisabledBitmaps.Free;\r\n FLargeLayoutHoverBitmaps.Free;\r\n FAppearance.Free;\r\n inherited;\r\nend;\r\n\r\nprocedure TTMSFNCDefaultToolBarButton.DoPopup(Sender: TObject);\r\nbegin\r\n InitializePopup;\r\nend;\r\n\r\nprocedure TTMSFNCDefaultToolBarButton.HandleMouseEnter;\r\nbegin\r\n inherited;\r\nend;\r\n\r\nprocedure TTMSFNCDefaultToolBarButton.HandleMouseLeave;\r\nbegin\r\n inherited;\r\n FDown := False;\r\n FHover := False;\r\n FPrevHover := False;\r\n Invalidate;\r\nend;\r\n\r\nprocedure TTMSFNCCustomToolBarButton.DoFontChanged(Sender: TObject);\r\nbegin\r\n Invalidate;\r\nend;\r\n\r\nprocedure TTMSFNCCustomToolBarButton.AppearanceChanged;\r\nbegin\r\n inherited;\r\n UpdateDropDownButton;\r\nend;\r\n\r\nprocedure TTMSFNCCustomToolBarButton.Assign(Source: TPersistent);\r\nbegin\r\n inherited;\r\n if Source is TTMSFNCCustomToolBarButton then\r\n begin\r\n FDropDownKind := (Source as TTMSFNCCustomToolBarButton).DropDownKind;\r\n FDropDownPosition := (Source as TTMSFNCCustomToolBarButton).DropDownPosition;\r\n FAutoOptionsMenuText := (Source as TTMSFNCCustomToolBarButton).AutoOptionsMenuText;\r\n FHidden := (Source as TTMSFNCCustomToolBarButton).Hidden;\r\n Invalidate;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCCustomToolBarButton.CanDropDown: Boolean;\r\nbegin\r\n Result := DropDownKind <> ddkNormal;\r\nend;\r\n\r\nprocedure TTMSFNCCustomToolBarButton.ChangeDPIScale(M, D: Integer);\r\nbegin\r\n inherited;\r\n\r\nend;\r\n\r\nconstructor TTMSFNCCustomToolBarButton.Create(AOwner: TComponent);\r\nvar\r\n res: string;\r\nbegin\r\n inherited;\r\n FHidden := False;\r\n FDropDownPosition := ddpRight;\r\n FDropDownButton := GetDropDownButtonClass.Create(Self);\r\n FDropDownButton.TabStop := False;\r\n FDropDownButton.Text := '';\r\n FDropDownButton.OnClick := DropDownButtonClick;\r\n FDropDownButton.Visible := False;\r\n FDropDownButton.Width := 17;\r\n FDropDownButton.Appearance.Corners := [gcTopRight, gcBottomRight];\r\n {$IFDEF FMXLIB}\r\n FDropDownButton.Align := TAlignLayout.Right;\r\n {$ENDIF}\r\n {$IFDEF CMNWEBLIB}\r\n FDropDownButton.Align := alRight;\r\n {$ENDIF}\r\n FDropDownButton.Stored := False;\r\n\r\n {$IFNDEF WEBLIB}\r\n res := 'TMSFNCTOOLBAREXPANDSVG';\r\n {$ELSE}\r\n res := TMSFNCTOOLBAREXPANDSVG;\r\n {$ENDIF}\r\n\r\n FDropDownButton.Bitmaps.AddBitmapFromResource(res, HInstance);\r\n FDropDownButton.DisabledBitmaps.AddBitmapFromResource(res, HInstance);\r\n FDropDownButton.HoverBitmaps.AddBitmapFromResource(res, HInstance);\r\nend;\r\n\r\ndestructor TTMSFNCCustomToolBarButton.Destroy;\r\nbegin\r\n FDropDownButton.Free;\r\n inherited;\r\nend;\r\n\r\nprocedure TTMSFNCCustomToolBarButton.DrawButton(AGraphics: TTMSFNCGraphics);\r\nvar\r\n r: TRectF;\r\nbegin\r\n inherited;\r\n if Assigned(FDropDownButton) and (DropDownKind = ddkDropDown) then\r\n begin\r\n case DropDownPosition of\r\n ddpRight: r := RectF(Width - FDropDownButton.Width, 0, Width, Height);\r\n ddpBottom: r := RectF(0, Height - FDropDownButton.Height, Width, Height);\r\n end;\r\n FDropDownButton.DrawBitmap(AGraphics, r);\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomToolBarButton.DropDownButtonClick(Sender: TObject);\r\nbegin\r\n DropDown;\r\nend;\r\n\r\nprocedure TTMSFNCDefaultToolBarButton.DrawBitmap(AGraphics: TTMSFNCGraphics; ARect: TRectF);\r\nvar\r\n r: TRectF;\r\n bmpa: TBitmap;\r\n bmp: TTMSFNCBitmap;\r\n g: TTMSFNCGraphics;\r\n x, y: Integer;\r\nbegin\r\n if not BitmapVisible then\r\n Exit;\r\n\r\n r := GetBitmapRect(ARect);\r\n\r\n if (Self is TTMSFNCToolBarDropDownButton) and AdaptToStyle and UseStyledDropDownIcon then\r\n begin\r\n bmpa := TBitmap.Create;\r\n bmpa.SetSize(ScalePaintValue(7), ScalePaintValue(7));\r\n {$IFDEF CMNLIB}\r\n bmpa.TransparentMode := tmFixed;\r\n bmpa.Transparent := True;\r\n bmpa.TransparentColor := gcWhite;\r\n {$ENDIF}\r\n g := TTMSFNCGraphics.Create(bmpa.Canvas);\r\n try\r\n g.BeginScene;\r\n {$IFDEF CMNLIB}\r\n g.Fill.Color := gcWhite;\r\n g.Fill.Kind := gfkSolid;\r\n g.Stroke.Kind := gskSolid;\r\n g.Stroke.Color := gcWhite;\r\n g.DrawRectangle(0, 0, bmpa.Width, bmpa.Height);\r\n {$ENDIF}\r\n g.Stroke.Kind := gskSolid;\r\n g.Stroke.Color := TTMSFNCGraphics.DefaultSelectionFillColor;\r\n// g.DrawLine(PointF(0, 1), PointF(6, 1), gcpmRightDown);\r\n// g.DrawLine(PointF(0, 2), PointF(6, 2), gcpmRightDown);\r\n// g.DrawLine(PointF(1, 3), PointF(5, 3), gcpmRightDown);\r\n// g.DrawLine(PointF(2, 4), PointF(4, 4), gcpmRightDown);\r\n// g.DrawLine(PointF(3, 5), PointF(3, 5), gcpmRightDown);\r\n\r\n for y := ScalePaintValue(1) to ScalePaintValue(5) do\r\n begin\r\n x := Max(0, y - ScalePaintValue(2));\r\n g.DrawLine(PointF(x, y), PointF((bmpa.Width - 1) - x, y), gcpmRightDown);\r\n if x >= ((bmpa.Width - 1) - x) then\r\n Break;\r\n end;\r\n\r\n finally\r\n g.EndScene;\r\n g.Free;\r\n end;\r\n\r\n try\r\n bmp := TTMSFNCBitmap.Create;\r\n try\r\n bmp.Assign(bmpa);\r\n AGraphics.DrawBitmap(r, bmp);\r\n finally\r\n bmp.Free;\r\n end;\r\n finally\r\n bmpa.Free;\r\n end;\r\n end\r\n else\r\n begin\r\n AGraphics.BitmapContainer := BitmapContainer;\r\n\r\n case Layout of\r\n bblLarge:\r\n begin\r\n if Enabled then\r\n begin\r\n if FHover and (LargeLayoutHoverBitmaps.Count > 0) then\r\n AGraphics.DrawScaledBitmap(r, LargeLayoutHoverBitmaps, ResourceScaleFactor)\r\n else if FHover and (HoverBitmaps.Count > 0) then\r\n AGraphics.DrawScaledBitmap(r, HoverBitmaps, ResourceScaleFactor)\r\n else if LargeLayoutBitmaps.Count > 0 then\r\n AGraphics.DrawScaledBitmap(r, LargeLayoutBitmaps, ResourceScaleFactor)\r\n else\r\n AGraphics.DrawScaledBitmap(r, Bitmaps, ResourceScaleFactor)\r\n end\r\n else\r\n begin\r\n if LargeLayoutDisabledBitmaps.Count > 0 then\r\n AGraphics.DrawScaledBitmap(r, LargeLayoutDisabledBitmaps, ResourceScaleFactor)\r\n else if DisabledBitmaps.Count > 0 then\r\n AGraphics.DrawScaledBitmap(r, DisabledBitmaps, ResourceScaleFactor)\r\n else\r\n AGraphics.DrawScaledBitmap(r, Bitmaps, ResourceScaleFactor)\r\n end;\r\n end\r\n else\r\n begin\r\n if Enabled then\r\n begin\r\n if FHover and (HoverBitmaps.Count > 0) then\r\n AGraphics.DrawScaledBitmap(r, HoverBitmaps, ResourceScaleFactor)\r\n else\r\n AGraphics.DrawScaledBitmap(r, Bitmaps, ResourceScaleFactor)\r\n end\r\n else if DisabledBitmaps.Count > 0 then\r\n AGraphics.DrawScaledBitmap(r, DisabledBitmaps, ResourceScaleFactor)\r\n else\r\n AGraphics.DrawScaledBitmap(r, Bitmaps, ResourceScaleFactor)\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCDefaultToolBarButton.DrawButton(AGraphics: TTMSFNCGraphics);\r\nbegin\r\n\r\nend;\r\n\r\nprocedure TTMSFNCDefaultToolBarButton.DrawText(AGraphics: TTMSFNCGraphics);\r\nvar\r\n tr: TRectF;\r\n st: TTMSFNCGraphicsSaveState;\r\nbegin\r\n if not TextVisible or (Text = '') then\r\n Exit;\r\n\r\n tr := GetTextRect;\r\n st := AGraphics.SaveState;\r\n try\r\n AGraphics.ClipRect(tr);\r\n AGraphics.Font.Assign(Font);\r\n\r\n if Enabled then\r\n begin\r\n if (FDown or FDownState) and (DownFontColor <> gcNull) then\r\n AGraphics.Font.Color := DownFontColor\r\n else if FHover and (HoverFontColor <> gcNull) then\r\n AGraphics.Font.Color := HoverFontColor\r\n end\r\n else if DisabledFontColor <> gcNull then\r\n AGraphics.Font.Color := DisabledFontColor;\r\n\r\n AGraphics.DrawText(tr, Text, WordWrapping, HorizontalTextAlign, VerticalTextAlign, Trimming);\r\n finally\r\n AGraphics.RestoreState(st);\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCDefaultToolBarButton.DropDown;\r\nbegin\r\n if not Assigned(FPopup) then\r\n Exit;\r\n\r\n FPopup.PlacementControl := Self;\r\n\r\n if not FPopup.IsOpen then\r\n begin\r\n if Assigned(OnBeforeDropDown) then\r\n OnBeforeDropDown(Self);\r\n\r\n if DropDownAutoWidth then\r\n FPopup.DropDownWidth := Width;\r\n\r\n FPopup.Placement := FPopupPlacement;\r\n FPopup.IsOpen := True;\r\n if Assigned(OnDropDown) then\r\n OnDropDown(Self);\r\n end\r\n else\r\n FPopup.IsOpen := False;\r\nend;\r\n\r\nprocedure TTMSFNCDefaultToolBarButton.DoFontChanged(Sender: TObject);\r\nbegin\r\n Invalidate;\r\nend;\r\n\r\nfunction TTMSFNCCustomToolBarButton.GetBitmapRect: TRectF;\r\nbegin\r\n Result := inherited GetBitmapRect;\r\nend;\r\n\r\nfunction TTMSFNCCustomToolBarButton.GetBitmapRect(ARect: TRectF): TRectF;\r\nvar\r\n r: TRectF;\r\n dr: TRectf;\r\n bs: Single;\r\nbegin\r\n bs := GetBitmapSize;\r\n case Layout of\r\n bblLarge: bs := GetLargeLayoutBitmapSize;\r\n end;\r\n\r\n r := ARect;\r\n Result := RectF(r.Left, r.Top, r.Left, r.Bottom);\r\n if BitmapVisible then\r\n begin\r\n if DropDownKind <> ddkNormal then\r\n begin\r\n dr := GetDropDownRect;\r\n case BitmapPosition of\r\n bbpLeft:\r\n begin\r\n case DropDownPosition of\r\n ddpRight: Result := RectF(Result.Left + 3, Result.Top + 3, Result.Left + 3 + bs, Result.Bottom - 3);\r\n ddpBottom: Result := RectF(Result.Left + 3, Result.Top + 3, Result.Left + 3 + bs, dr.Top - 3);\r\n end;\r\n end;\r\n bbpTop:\r\n begin\r\n case DropDownPosition of\r\n ddpRight: Result := RectF(Result.Left + 3, Result.Top + 3, dr.Left - 3, Result.Top + 3 + bs);\r\n ddpBottom: Result := RectF(Result.Left + 3, Result.Top + 3, r.Right - 3, Result.Top + 3 + bs);\r\n end;\r\n end;\r\n end;\r\n end\r\n else if not TextVisible or (Text = '') then\r\n begin\r\n Result := RectF(r.Left + 3, r.Top + 3, r.Right - 3, r.Bottom - 3);\r\n if (bs <> -1) and not StretchBitmapIfNoText then\r\n begin\r\n Result.Left := Round(r.Left + ((r.Right - r.Left) - bs) / 2);\r\n Result.Top := Round(r.Top + ((r.Bottom - r.Top) - bs) / 2);\r\n Result.Right := Result.Left + bs;\r\n Result.Bottom := Result.Top + bs;\r\n end; \r\n end\r\n else if TextVisible and not (Text = '') then\r\n begin\r\n case BitmapPosition of\r\n bbpLeft: Result := RectF(r.Left + 3, r.Top + 3, r.Left + 3 + bs, r.Bottom - 3);\r\n bbpTop: Result := RectF(r.Left + 3, r.Top + 3, r.Right - 3, r.Top + 3 + bs);\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCCustomToolBarButton.GetDropDownButtonClass: TTMSFNCToolBarDropDownButtonClass;\r\nbegin\r\n Result := TTMSFNCToolBarDropDownButton;\r\nend;\r\n\r\nfunction TTMSFNCCustomToolBarButton.GetDropDownButtonControl: TTMSFNCToolBarDropDownButton;\r\nbegin\r\n Result := FDropDownButton;\r\nend;\r\n\r\nfunction TTMSFNCCustomToolBarButton.GetDropDownRect: TRectF;\r\nbegin\r\n Result := inherited GetDropDownRect;\r\n if Assigned(FDropDownButton) and (DropDownKind <> ddkNormal) then\r\n begin\r\n if DropDownKind = ddkDropDown then\r\n begin\r\n case DropDownPosition of\r\n ddpRight: Result := RectF(Width - FDropDownButton.Width, 0, Width, Height);\r\n ddpBottom: Result := RectF(0, Height - FDropDownButton.Height, Width, Height);\r\n end;\r\n end\r\n else\r\n begin\r\n {$IFDEF FMXLIB}\r\n Result := RectF(FDropDownButton.Position.X, FDropDownButton.Position.Y, FDropDownButton.Position.X + FDropDownButton.Width, FDropDownButton.Position.Y + FDropDownButton.Height);\r\n {$ENDIF}\r\n {$IFDEF CMNWEBLIB}\r\n Result := RectF(FDropDownButton.Left, FDropDownButton.Top, FDropDownButton.Left + FDropDownButton.Width, FDropDownButton.Top + FDropDownButton.Height);\r\n {$ENDIF}\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCCustomToolBarButton.GetTextRect: TRectF;\r\nvar\r\n bmpr: TRectF;\r\n dr: TRectF;\r\n r: TRectF;\r\nbegin\r\n r := LocalRect;\r\n bmpr := GetBitmapRect(r);\r\n dr := GetDropDownRect;\r\n if DropDownKind <> ddkNormal then\r\n begin\r\n if not StretchText then\r\n begin\r\n case BitmapPosition of\r\n bbpLeft:\r\n begin\r\n case DropDownPosition of\r\n ddpRight: Result := RectF(bmpr.Right + 3, r.Top + 3, dr.Left - 3, r.Bottom - 3);\r\n ddpBottom: Result := RectF(bmpr.Right + 3, r.Top + 3, r.Right - 3, dr.Top - 3);\r\n end;\r\n end;\r\n bbpTop:\r\n begin\r\n case DropDownPosition of\r\n ddpRight: Result := RectF(r.Left + 3, bmpr.Bottom + 3, dr.Left - 3, r.Bottom - 3);\r\n ddpBottom: Result := RectF(r.Left + 3, bmpr.Bottom + 3, r.Right - 3, dr.Top - 3);\r\n end;\r\n end;\r\n end;\r\n end\r\n else\r\n begin\r\n case DropDownPosition of\r\n ddpRight: Result := RectF(r.Left + 3, r.Top + 3, dr.Left - 3, r.Bottom - 3);\r\n ddpBottom: Result := RectF(r.Left + 3, r.Top + 3, r.Right - 3, dr.Top - 3);\r\n end;\r\n end;\r\n end\r\n else\r\n begin\r\n if not StretchText then\r\n begin\r\n case BitmapPosition of\r\n bbpLeft: Result := RectF(bmpr.Right + 3, r.Top + 3, dr.Left - 3, r.Bottom - 3);\r\n bbpTop: Result := RectF(r.Left + 3, bmpr.Bottom + 3, dr.Left - 3, r.Bottom - 3)\r\n end;\r\n end\r\n else\r\n Result := RectF(r.Left + 3, r.Top + 3, dr.Left - 3, r.Bottom - 3);\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomToolBarButton.HandleMouseDown(Button: TTMSFNCMouseButton;\r\n Shift: TShiftState; X, Y: Single);\r\nbegin\r\n inherited;\r\n if DropDownKind = ddkDropDown then\r\n DropDown;\r\nend;\r\n\r\nprocedure TTMSFNCCustomToolBarButton.Loaded;\r\nbegin\r\n inherited;\r\n {$IFDEF VCLLIB}\r\n {$HINTS OFF}\r\n {$IF (COMPILERVERSION >= 33) AND (COMPILERVERSION < 36)}\r\n FDropDownButton.ScaleForPPI(CurrentPPI);\r\n {$IFEND}\r\n {$HINTS ON}\r\n {$ENDIF}\r\nend;\r\n\r\nprocedure TTMSFNCCustomToolBarButton.LoadSettingsFromFile(AFileName: string);\r\nbegin\r\n inherited;\r\n if Assigned(FDropDownButton) then\r\n begin\r\n FDropDownButton.Appearance.ShowInnerStroke := Appearance.ShowInnerStroke;\r\n FDropDownButton.Appearance.InnerStroke.Assign(Appearance.InnerStroke);\r\n FDropDownButton.Appearance.NormalFill.Assign(Appearance.NormalFill);\r\n FDropDownButton.Appearance.NormalStroke.Assign(Appearance.NormalStroke);\r\n FDropDownButton.Appearance.HoverFill.Assign(Appearance.HoverFill);\r\n FDropDownButton.Appearance.HoverStroke.Assign(Appearance.HoverStroke);\r\n FDropDownButton.Appearance.DownFill.Assign(Appearance.DownFill);\r\n FDropDownButton.Appearance.DownStroke.Assign(Appearance.DownStroke);\r\n FDropDownButton.Appearance.DisabledFill.Assign(Appearance.DisabledFill);\r\n FDropDownButton.Appearance.DisabledStroke.Assign(Appearance.DisabledStroke);\r\n FDropDownButton.Appearance.FlatStyle := Appearance.FlatStyle;\r\n FDropDownButton.Fill.Assign(Fill);\r\n FDropDownButton.Stroke.Assign(Stroke);\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomToolBarButton.LoadSettingsFromStream(AStream: TStream);\r\nbegin\r\n inherited;\r\n if Assigned(FDropDownButton) then\r\n begin\r\n FDropDownButton.Appearance.ShowInnerStroke := Appearance.ShowInnerStroke;\r\n FDropDownButton.Appearance.InnerStroke.Assign(Appearance.InnerStroke);\r\n FDropDownButton.Appearance.NormalFill.Assign(Appearance.NormalFill);\r\n FDropDownButton.Appearance.NormalStroke.Assign(Appearance.NormalStroke);\r\n FDropDownButton.Appearance.HoverFill.Assign(Appearance.HoverFill);\r\n FDropDownButton.Appearance.HoverStroke.Assign(Appearance.HoverStroke);\r\n FDropDownButton.Appearance.DownFill.Assign(Appearance.DownFill);\r\n FDropDownButton.Appearance.DownStroke.Assign(Appearance.DownStroke);\r\n FDropDownButton.Appearance.DisabledFill.Assign(Appearance.DisabledFill);\r\n FDropDownButton.Appearance.DisabledStroke.Assign(Appearance.DisabledStroke);\r\n FDropDownButton.Appearance.FlatStyle := Appearance.FlatStyle;\r\n FDropDownButton.Fill.Assign(Fill);\r\n FDropDownButton.Stroke.Assign(Stroke);\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCDefaultToolBarButton.GetBitmap: TTMSFNCBitmap;\r\nbegin\r\n Result := TTMSFNCGraphics.GetScaledBitmap(Bitmaps, 0, FBitmapContainer);\r\nend;\r\n\r\nfunction TTMSFNCDefaultToolBarButton.GetBitmapContainer: TTMSFNCBitmapContainer;\r\nbegin\r\n Result := FBitmapContainer;\r\nend;\r\n\r\nfunction TTMSFNCDefaultToolBarButton.GetBitmapRect(ARect: TRectF): TRectF;\r\nvar\r\n r: TRectF;\r\n bs: Single;\r\nbegin\r\n bs := GetBitmapSize;\r\n case Layout of\r\n bblLarge: bs := GetLargeLayoutBitmapSize;\r\n end;\r\n\r\n r := ARect;\r\n Result := RectF(r.Left, r.Top, r.Left, r.Bottom);\r\n if BitmapVisible then\r\n begin\r\n case BitmapPosition of\r\n bbpLeft: Result := RectF(Result.Left + 3, Result.Top + 3, Result.Left + 3 + bs, Result.Bottom - 3);\r\n bbpTop: Result := RectF(Result.Left + 3, Result.Top + 3, Result.Right - 3, Result.Top + 3 + bs);\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCDefaultToolBarButton.GetBitmapSize: Single;\r\nvar\r\n bmp: TTMSFNCBitmap;\r\nbegin\r\n Result := BitmapSize;\r\n if AutoBitmapSize then\r\n begin\r\n bmp := TTMSFNCGraphics.GetScaledBitmap(Bitmaps, 0, BitmapContainer);\r\n if Assigned(bmp) and not IsBitmapEmpty(bmp) then\r\n Result := Max(bmp.Height, bmp.Width);\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCDefaultToolBarButton.GetBitmapRect: TRectF;\r\nbegin\r\n Result := GetBitmapRect(LocalRect);\r\nend;\r\n\r\nfunction TTMSFNCDefaultToolBarButton.GetDropDownRect: TRectF;\r\nvar\r\n r: TRectF;\r\nbegin\r\n r := LocalRect;\r\n Result := RectF(r.Right, r.Top, r.Right, r.Bottom);\r\nend;\r\n\r\nfunction TTMSFNCDefaultToolBarButton.GetHintString: String;\r\nbegin\r\n Result := Hint;\r\nend;\r\n\r\nfunction TTMSFNCDefaultToolBarButton.GetLargeLayoutBitmapSize: Single;\r\nvar\r\n bmp: TTMSFNCBitmap;\r\nbegin\r\n Result := LargeLayoutBitmapSize;\r\n if LargeLayoutAutoBitmapSize then\r\n begin\r\n bmp := TTMSFNCGraphics.GetScaledBitmap(LargeLayoutBitmaps, 0, BitmapContainer);\r\n if Assigned(bmp) and not IsBitmapEmpty(bmp) then\r\n Result := Max(bmp.Height, bmp.Width);\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCDefaultToolBarButton.GetPopupControl: TTMSFNCPopup;\r\nbegin\r\n Result := FPopup;\r\nend;\r\n\r\nfunction TTMSFNCDefaultToolBarButton.GetText: String;\r\nbegin\r\n Result := FText;\r\nend;\r\n\r\nfunction TTMSFNCDefaultToolBarButton.GetTextRect: TRectF;\r\nvar\r\n bmpr: TRectF;\r\n dr: TRectF;\r\n r: TRectF;\r\nbegin\r\n r := LocalRect;\r\n bmpr := GetBitmapRect;\r\n dr := GetDropDownRect;\r\n if not StretchText then\r\n begin\r\n case BitmapPosition of\r\n bbpLeft: Result := RectF(bmpr.Right + 3, r.Top + 3, dr.Left - 3, r.Bottom - 3);\r\n bbpTop: Result := RectF(r.Left + 3, bmpr.Bottom + 3, dr.Left - 3, r.Bottom - 3);\r\n end;\r\n end\r\n else\r\n Result := RectF(r.Left + 3, r.Top + 3, dr.Left - 3, r.Bottom - 3);\r\nend;\r\n\r\nfunction TTMSFNCDefaultToolBarButton.GetTextSize: TSizeF;\r\nvar\r\n g: TTMSFNCGraphics;\r\n r: TRectF;\r\nbegin\r\n Result.cx := 0;\r\n Result.cy := 0;\r\n if TextVisible and (Text <> '') then\r\n begin\r\n g := TTMSFNCGraphics.CreateBitmapCanvas(1, 1, NativeCanvas);\r\n if not NativeCanvas then\r\n g.BeginScene;\r\n g.BitmapContainer := BitmapContainer;\r\n g.OptimizedHTMLDrawing := OptimizedHTMLDrawing;\r\n try\r\n g.Font.Assign(Font);\r\n r := LocalRect;\r\n InflateRectEx(r, ScalePaintValue(-2), ScalePaintValue(-2));\r\n Result := g.CalculateTextSize(Text, r, WordWrapping);\r\n finally\r\n if not NativeCanvas then\r\n g.EndScene;\r\n g.Free;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCDefaultToolBarButton.InitializePopup;\r\nbegin\r\n\r\nend;\r\n\r\nfunction TTMSFNCDefaultToolBarButton.IsBitmapSizeStored: Boolean;\r\nbegin\r\n Result := BitmapSize <> 24;\r\nend;\r\n\r\nfunction TTMSFNCDefaultToolBarButton.IsDropDownHeightStored: Boolean;\r\nbegin\r\n Result := DropDownHeight <> 135;\r\nend;\r\n\r\nfunction TTMSFNCDefaultToolBarButton.IsDropDownWidthStored: Boolean;\r\nbegin\r\n Result := DropDownWidth <> 135;\r\nend;\r\n\r\nfunction TTMSFNCDefaultToolBarButton.IsLargeLayoutBitmapSizeStored: Boolean;\r\nbegin\r\n Result := LargeLayoutBitmapSize <> 32;\r\nend;\r\n\r\nprocedure TTMSFNCDefaultToolBarButton.HandleKeyDown(var Key: Word; Shift: TShiftState);\r\nbegin\r\n inherited;\r\n case Key of\r\n KEY_HOME: SelectFirstValue;\r\n KEY_END: SelectLastValue;\r\n KEY_UP, KEY_LEFT: SelectPreviousValue;\r\n KEY_DOWN, KEY_RIGHT: SelectNextValue;\r\n KEY_SPACE: Click;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCDefaultToolBarButton.HandleKeyPress(var Key: Char);\r\nbegin\r\n inherited;\r\n if (Key >= #32) and not (Ord(Key) in [KEY_F2, KEY_RETURN, KEY_SPACE, KEY_ESCAPE, KEY_HOME, KEY_END, KEY_UP, KEY_LEFT, KEY_DOWN, KEY_RIGHT]) then\r\n SelectValueWithCharacter(Key);\r\nend;\r\n\r\nprocedure TTMSFNCDefaultToolBarButton.HandleKeyUp(var Key: Word; Shift: TShiftState);\r\nbegin\r\n inherited;\r\n if Shift <> [] then\r\n Exit;\r\n\r\n case Key of\r\n KEY_RETURN, KEY_F4:\r\n begin\r\n if CanDropDown then\r\n DropDown;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCDefaultToolBarButton.HandleMouseDown(Button: TTMSFNCMouseButton;\r\n Shift: TShiftState; X, Y: Single);\r\nbegin\r\n inherited;\r\n if CanFocus then\r\n SetFocus;\r\n\r\n FDown := True;\r\n Invalidate;\r\nend;\r\n\r\nprocedure TTMSFNCDefaultToolBarButton.HandleMouseMove(Shift: TShiftState; X,\r\n Y: Single);\r\nbegin\r\n inherited;\r\n FHover := True;\r\n if FPrevHover <> FHover then\r\n Invalidate;\r\n\r\n FPrevHover := FHover;\r\nend;\r\n\r\nprocedure TTMSFNCDefaultToolBarButton.HandleMouseUp(Button: TTMSFNCMouseButton;\r\n Shift: TShiftState; X, Y: Single);\r\nbegin\r\n inherited;\r\n FDown := False;\r\n Invalidate;\r\nend;\r\n\r\nfunction TTMSFNCDefaultToolBarButton.HasHint: Boolean;\r\nbegin\r\n Result := Hint <> '';\r\nend;\r\n\r\nprocedure TTMSFNCDefaultToolBarButton.Notification(AComponent: TComponent;\r\n Operation: TOperation);\r\nbegin\r\n inherited;\r\n if (Operation = opRemove) and (AComponent = FBitmapContainer) then\r\n FBitmapContainer := nil;\r\n\r\n if (Operation = opRemove) and (AComponent = FDropDownControl) then\r\n FDropDownControl := nil;\r\nend;\r\n\r\nprocedure TTMSFNCDefaultToolBarButton.Draw(AGraphics: TTMSFNCGraphics; ARect: TRectF);\r\nvar\r\n r: TRectF;\r\nbegin\r\n inherited;\r\n if not Appearance.Transparent then\r\n begin\r\n if Enabled then\r\n begin\r\n if FDown or FDownState then\r\n begin\r\n AGraphics.Fill.Assign(Appearance.DownFill);\r\n AGraphics.Stroke.Assign(Appearance.DownStroke);\r\n end\r\n else if FHover then\r\n begin\r\n AGraphics.Fill.Assign(Appearance.HoverFill);\r\n AGraphics.Stroke.Assign(Appearance.HoverStroke);\r\n end\r\n else\r\n begin\r\n AGraphics.Fill.Assign(Appearance.NormalFill);\r\n AGraphics.Stroke.Assign(Appearance.NormalStroke);\r\n end;\r\n end\r\n else\r\n begin\r\n AGraphics.Fill.Assign(Appearance.DisabledFill);\r\n AGraphics.Stroke.Assign(Appearance.DisabledStroke);\r\n end;\r\n\r\n r := LocalRect;\r\n\r\n if Appearance.FlatStyle then\r\n begin\r\n AGraphics.Fill.Kind := gfkSolid;\r\n AGraphics.DrawRectangle(r);\r\n end\r\n else\r\n AGraphics.DrawRoundRectangle(r, Appearance.Rounding, Appearance.Corners);\r\n\r\n if Appearance.ShowInnerStroke and not Appearance.FlatStyle then\r\n begin\r\n InflateRectEx(r, -1, -1);\r\n AGraphics.Stroke.Assign(Appearance.InnerStroke);\r\n AGraphics.Fill.Kind := gfkNone;\r\n AGraphics.DrawRoundRectangle(r, Appearance.Rounding, Appearance.Corners);\r\n end;\r\n end;\r\n\r\n DrawBitmap(AGraphics, ARect);\r\n DrawText(AGraphics);\r\n DrawButton(AGraphics);\r\n\r\n if ShowFocus and IsFocused then\r\n begin\r\n r := GetTextRect;\r\n AGraphics.DrawFocusRectangle(r);\r\n end;\r\n\r\n if IsDesignTime and CanDrawDesignTime then\r\n AGraphics.DrawFocusRectangle(ARect, gcBlack);\r\nend;\r\n\r\nprocedure TTMSFNCDefaultToolBarButton.DoClosePopup(Sender: TObject);\r\nbegin\r\n if Assigned(OnCloseDropDown) then\r\n OnCloseDropDown(Self);\r\nend;\r\n\r\nprocedure TTMSFNCDefaultToolBarButton.ResetToDefaultStyle;\r\nbegin\r\n inherited;\r\n Font.Color := gcBlack;\r\n Appearance.NormalFill.Color := gcWhite;\r\n Appearance.HoverFill.Color := gcWhite;\r\n Appearance.DownFill.Color := gcWhite;\r\n Appearance.DisabledFill.Color := gcLightgray;\r\n Appearance.NormalStroke.Color := gcGray;\r\n Appearance.InnerStroke.Color := gcWhite;\r\n Appearance.HoverStroke.Color := gcGray;\r\n Appearance.DownStroke.Color := gcGray;\r\n Appearance.DisabledStroke.Color := gcGray;\r\n\r\n Appearance.NormalFill.Kind := gfkGradient;\r\n Appearance.HoverFill.Kind := gfkGradient;\r\n Appearance.DownFill.Kind := gfkGradient;\r\n Appearance.DisabledFill.Kind := gfkSolid;\r\n Appearance.NormalStroke.Kind := gskSolid;\r\n Appearance.InnerStroke.Kind := gskSolid;\r\n Appearance.HoverStroke.Kind := gskSolid;\r\n Appearance.DownStroke.Kind := gskSolid;\r\n Appearance.DisabledStroke.Kind := gskSolid;\r\n\r\n Appearance.NormalFill.Color := MakeGraphicsColor(249, 251, 252);\r\n Appearance.NormalFill.ColorTo := MakeGraphicsColor(230, 235, 235);\r\n Appearance.NormalFill.ColorMirror := MakeGraphicsColor(220, 220, 236);\r\n Appearance.NormalFill.ColorMirrorTo := MakeGraphicsColor(220, 225, 236);\r\n\r\n Appearance.HoverFill.Color := MakeGraphicsColor(229, 231, 232);\r\n Appearance.HoverFill.ColorTo := MakeGraphicsColor(210, 215, 215);\r\n Appearance.HoverFill.ColorMirror := MakeGraphicsColor(200, 200, 216);\r\n Appearance.HoverFill.ColorMirrorTo := MakeGraphicsColor(200, 205, 216);\r\n\r\n Appearance.DownFill.Color := MakeGraphicsColor(219, 221, 222);\r\n Appearance.DownFill.ColorTo := MakeGraphicsColor(200, 205, 205);\r\n Appearance.DownFill.ColorMirror := MakeGraphicsColor(190, 190, 206);\r\n Appearance.DownFill.ColorMirrorTo := MakeGraphicsColor(190, 195, 206);\r\nend;\r\n\r\nprocedure TTMSFNCDefaultToolBarButton.SelectFirstValue;\r\nbegin\r\n\r\nend;\r\n\r\nprocedure TTMSFNCDefaultToolBarButton.SelectLastValue;\r\nbegin\r\n\r\nend;\r\n\r\nprocedure TTMSFNCDefaultToolBarButton.SelectNextValue;\r\nbegin\r\n\r\nend;\r\n\r\nprocedure TTMSFNCDefaultToolBarButton.SelectPreviousValue;\r\nbegin\r\n\r\nend;\r\n\r\nprocedure TTMSFNCDefaultToolBarButton.SelectValueWithCharacter(\r\n ACharacter: Char);\r\nbegin\r\n\r\nend;\r\n\r\nprocedure TTMSFNCDefaultToolBarButton.SetAdaptToStyle(const Value: Boolean);\r\nbegin\r\n inherited;\r\n if Assigned(FPopup) then\r\n FPopup.AdaptToStyle := AdaptToStyle;\r\nend;\r\n\r\nprocedure TTMSFNCDefaultToolBarButton.SetAppearance(\r\n const Value: TTMSFNCToolBarButtonAppearance);\r\nbegin\r\n FAppearance.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCDefaultToolBarButton.SetAutoBitmapSize(const Value: Boolean);\r\nbegin\r\n if FAutoBitmapSize <> Value then\r\n begin\r\n FAutoBitmapSize := Value;\r\n UpdateLayout;\r\n Invalidate;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCDefaultToolBarButton.SetBitmaps(const Value: TTMSFNCScaledBitmaps);\r\nbegin\r\n FBitmaps.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCDefaultToolBarButton.SetBitmapSize(const Value: Single);\r\nbegin\r\n if FBitmapSize <> Value then\r\n begin\r\n FBitmapSize := Value;\r\n UpdateLayout;\r\n Invalidate;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCDefaultToolBarButton.SetBitmapContainer(\r\n const Value: TTMSFNCBitmapContainer);\r\nbegin\r\n FBitmapContainer := Value;\r\n UpdateLayout;\r\n Invalidate;\r\nend;\r\n\r\nprocedure TTMSFNCDefaultToolBarButton.SetBitmapPosition(\r\n const Value: TTMSFNCToolBarButtonBitmapPosition);\r\nbegin\r\n if FBitmapPosition <> Value then\r\n begin\r\n FBitmapPosition := Value;\r\n Invalidate;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCDefaultToolBarButton.SetBitmapVisible(const Value: Boolean);\r\nbegin\r\n FBitmapVisible := Value;\r\n UpdateLayout;\r\n Invalidate;\r\nend;\r\n\r\nprocedure TTMSFNCDefaultToolBarButton.SetLargeLayoutAutoBitmapSize(\r\n const Value: Boolean);\r\nbegin\r\n if FLargeLayoutAutoBitmapSize <> Value then\r\n begin\r\n FLargeLayoutAutoBitmapSize := Value;\r\n UpdateLayout;\r\n Invalidate;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCDefaultToolBarButton.SetLargeLayoutBitmaps(\r\n const Value: TTMSFNCScaledBitmaps);\r\nbegin\r\n FLargeLayoutBitmaps.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCDefaultToolBarButton.SetLargeLayoutBitmapSize(\r\n const Value: Single);\r\nbegin\r\n if FLargeLayoutBitmapSize <> Value then\r\n begin\r\n FLargeLayoutBitmapSize := Value;\r\n UpdateLayout;\r\n Invalidate;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCDefaultToolBarButton.SetLargeLayoutDisabledBitmaps(\r\n const Value: TTMSFNCScaledBitmaps);\r\nbegin\r\n FLargeLayoutDisabledBitmaps.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCDefaultToolBarButton.SetLargeLayoutHoverBitmaps(\r\n const Value: TTMSFNCScaledBitmaps);\r\nbegin\r\n FLargeLayoutHoverBitmaps.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCDefaultToolBarButton.SetLayout(\r\n const Value: TTMSFNCToolBarButtonLayout);\r\nbegin\r\n if FLayout <> Value then\r\n begin\r\n FLayout := Value;\r\n UpdateLayout;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCDefaultToolBarButton.SetCloseOnSelection(const Value: Boolean);\r\nbegin\r\n if FCloseOnSelection <> Value then\r\n begin\r\n FCloseOnSelection := Value;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCDefaultToolBarButton.SetCompactLayout(\r\n const Value: TTMSFNCToolBarButtonLayout);\r\nbegin\r\n if FCompactLayout <> Value then\r\n FCompactLayout := Value;\r\nend;\r\n\r\nprocedure TTMSFNCDefaultToolBarButton.SetName(const Value: TComponentName);\r\nvar\r\n ChangeText: Boolean;\r\nbegin\r\n ChangeText := not (csLoading in ComponentState) and (Name = Text) and\r\n ((not Assigned(Owner)) or not (Owner is TComponent) or not (csLoading in TComponent(Owner).ComponentState));\r\n inherited SetName(Value);\r\n if ChangeText and ApplyName and CanChangeText then\r\n Text := StringReplace(Text, 'TMSFNCToolBar', '', [rfReplaceAll]);\r\nend;\r\n\r\nprocedure TTMSFNCDefaultToolBarButton.SetShowFocus(const Value: Boolean);\r\nbegin\r\n if FShowFocus <> Value then\r\n begin\r\n FShowFocus := Value;\r\n Invalidate;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCDefaultToolBarButton.SetStretchBitmapIfNoText(\r\n const Value: Boolean);\r\nbegin\r\n if FStretchBitmapIfNoText <> Value then\r\n begin\r\n FStretchBitmapIfNoText := Value;\r\n UpdateLayout;\r\n Invalidate;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCDefaultToolBarButton.SetStretchText(const Value: Boolean);\r\nbegin\r\n if FStretchText <> Value then\r\n begin\r\n FStretchText := Value;\r\n UpdateLayout;\r\n Invalidate;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCDefaultToolBarButton.SetText(const Value: String);\r\nbegin\r\n if FText <> Value then\r\n begin\r\n FText := Value;\r\n FTextVisible := Value <> '';\r\n UpdateLayout;\r\n Invalidate;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCDefaultToolBarButton.SetTextVisible(const Value: Boolean);\r\nbegin\r\n if FTextVisible <> Value then\r\n begin\r\n FTextVisible := Value;\r\n UpdateLayout;\r\n Invalidate;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCDefaultToolBarButton.SetTrimming(\r\n const Value: TTMSFNCGraphicsTextTrimming);\r\nbegin\r\n if FTrimming <> Value then\r\n begin\r\n FTrimming := Value;\r\n Invalidate;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCDefaultToolBarButton.SetUseStyledDropDownIcon(\r\n const Value: Boolean);\r\nbegin\r\n if FUseStyledDropDownIcon <> Value then\r\n begin\r\n FUseStyledDropDownIcon := Value;\r\n Invalidate;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCDefaultToolBarButton.SetVerticalTextAlign(\r\n const Value: TTMSFNCGraphicsTextAlign);\r\nbegin\r\n if FVerticalTextAlign <> Value then\r\n begin\r\n FVerticalTextAlign := Value;\r\n Invalidate;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCDefaultToolBarButton.SetWordWrapping(const Value: Boolean);\r\nbegin\r\n if FWordWrapping <> Value then\r\n begin\r\n FWordWrapping := Value;\r\n Invalidate;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCDefaultToolBarButton.UpdateControlAfterResize;\r\nbegin\r\n inherited;\r\n if Layout = bblLarge then\r\n FOldHeight := Height;\r\nend;\r\n\r\nprocedure TTMSFNCDefaultToolBarButton.UpdateLayout;\r\nvar\r\n sz: TSizeF;\r\n w: Single;\r\nbegin\r\n if (Layout = bblNone) or FBlockUpdate then\r\n Exit;\r\n\r\n FBlockUpdate := True;\r\n case Layout of\r\n bblBitmap:\r\n begin\r\n TextVisible := False;\r\n BitmapPosition := bbpLeft;\r\n StretchText := False;\r\n Height := Round(GetBitmapSize + 6);\r\n Width := Round(GetBitmapSize + 6);\r\n end;\r\n bblLabel:\r\n begin\r\n TextVisible := True;\r\n BitmapPosition := bbpLeft;\r\n StretchText := False;\r\n sz := GetTextSize;\r\n if BitmapVisible then\r\n begin\r\n Height := Round(Max(GetBitmapSize, sz.cy) + 6);\r\n Width := Round(GetBitmapSize + sz.cx + 12);\r\n end\r\n else if TextVisible and (Text <> '') then\r\n begin\r\n Height := Round(sz.cy + 6);\r\n Width := Round(sz.cx + 6);\r\n end\r\n else\r\n begin\r\n Width := 75;\r\n Height := 24;\r\n end;\r\n end;\r\n bblLarge:\r\n begin\r\n TextVisible := True;\r\n BitmapPosition := bbpTop;\r\n StretchText := not BitmapVisible;\r\n\r\n sz := GetTextSize;\r\n w := 30;\r\n if BitmapVisible then\r\n w := Max(w, GetLargeLayoutBitmapSize + 6);\r\n\r\n if TextVisible and (Text <> '') then\r\n w := Max(w, sz.cx + 12);\r\n\r\n Width := Round(w);\r\n\r\n if FOldHeight <> -1 then\r\n Height := Round(FOldHeight);\r\n end;\r\n end;\r\n FBlockUpdate := False;\r\n\r\n UpdateToolBar;\r\nend;\r\n\r\nprocedure TTMSFNCDefaultToolBarButton.UpdateState;\r\nvar\r\n f: Single;\r\nbegin\r\n inherited;\r\n case FState of\r\n esNormal: f := 0.8;\r\n esLarge: f := 1.25;\r\n else\r\n f := 1;\r\n end;\r\n\r\n if not (csLoading in ComponentState) then\r\n begin\r\n DropDownWidth := DropDownWidth * f;\r\n DropDownHeight := DropDownHeight * f;\r\n {$IFDEF FMXLIB}\r\n Font.Size := Font.Size * f;\r\n SetBounds(Position.X, Position.Y, int(Width * f), int(Height * f));\r\n {$ENDIF}\r\n {$IFDEF VCLWEBLIB}\r\n Font.Size := Round(Font.Size * f);\r\n SetBounds(Left, Top, Round(Width * f), Round(Height * f));\r\n {$ENDIF}\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCToolBarCustomButtonAppearance.SetCorners(const Value: TTMSFNCGraphicsCorners);\r\nbegin\r\n if FCorners <> Value then\r\n begin\r\n FCorners := Value;\r\n Changed;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCToolBarCustomButtonAppearance.SetRounding(const Value: Single);\r\nbegin\r\n if FRounding <> Value then\r\n begin\r\n FRounding := Value;\r\n Changed;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCToolBarCustomButtonAppearance.StrokeChanged(Sender: TObject);\r\nbegin\r\n Changed;\r\nend;\r\n\r\n{ TTMSFNCCustomToolBarSeparator }\r\n\r\nprocedure TTMSFNCCustomToolBarSeparator.Assign(Source: TPersistent);\r\nbegin\r\n inherited;\r\n if Source is TTMSFNCCustomToolBarSeparator then\r\n begin\r\n FAppearance.Assign((Source as TTMSFNCCustomToolBarSeparator).Appearance);\r\n Invalidate;\r\n end;\r\nend;\r\n\r\nconstructor TTMSFNCCustomToolBarSeparator.Create(AOwner: TComponent);\r\nbegin\r\n inherited;\r\n {$IFDEF FMXLIB}\r\n Width := 3;\r\n {$ENDIF}\r\n {$IFDEF CMNWEBLIB}\r\n Width := 2;\r\n {$ENDIF}\r\n Height := 30;\r\n FAppearance := TTMSFNCToolBarSeparatorAppearance.Create(Self);\r\nend;\r\n\r\ndestructor TTMSFNCCustomToolBarSeparator.Destroy;\r\nbegin\r\n FAppearance.Free;\r\n inherited;\r\nend;\r\n\r\nprocedure TTMSFNCCustomToolBarSeparator.Draw(AGraphics: TTMSFNCGraphics; ARect: TRectF);\r\nvar\r\n cp: TPointF;\r\n r: TRectF;\r\nbegin\r\n inherited;\r\n r := LocalRect;\r\n {$IFDEF FMXLIB}\r\n cp := r.CenterPoint;\r\n {$ENDIF}\r\n {$IFDEF CMNWEBLIB}\r\n cp := PointF(r.Left, r.Top);\r\n {$ENDIF}\r\n AGraphics.Stroke.Assign(Appearance.Stroke);\r\n AGraphics.DrawLine(PointF(cp.X, r.Top), PointF(cp.X, r.Bottom));\r\n AGraphics.Stroke.Assign(Appearance.InnerStroke);\r\n AGraphics.DrawLine(PointF(cp.X + 1, r.Top), PointF(cp.X + 1, r.Bottom));\r\nend;\r\n\r\nprocedure TTMSFNCCustomToolBarSeparator.SetAppearance(\r\n const Value: TTMSFNCToolBarSeparatorAppearance);\r\nbegin\r\n FAppearance.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCCustomToolBarSeparator.UpdateState;\r\nvar\r\n f: Single;\r\nbegin\r\n inherited;\r\n case State of\r\n esNormal: f := 0.8;\r\n esLarge: f := 1.25;\r\n else\r\n f := 1;\r\n end;\r\n\r\n if not (csLoading in ComponentState) then\r\n begin\r\n {$IFDEF FMXLIB}\r\n SetBounds(Position.X, Position.Y, Width, int(Height * f));\r\n {$ENDIF}\r\n {$IFDEF CMNWEBLIB}\r\n SetBounds(Left, Top, Width, Round(Height * f));\r\n {$ENDIF}\r\n end;\r\nend;\r\n\r\n{ TTMSFNCToolBarCustomButtonAppearance }\r\n\r\nprocedure TTMSFNCToolBarCustomButtonAppearance.Assign(Source: TPersistent);\r\nbegin\r\n if Source is TTMSFNCToolBarCustomButtonAppearance then\r\n begin\r\n FNormalFill.Assign((Source as TTMSFNCToolBarCustomButtonAppearance).NormalFill);\r\n FDisabledFill.Assign((Source as TTMSFNCToolBarCustomButtonAppearance).DisabledFill);\r\n FHoverFill.Assign((Source as TTMSFNCToolBarCustomButtonAppearance).HoverFill);\r\n FDownFill.Assign((Source as TTMSFNCToolBarCustomButtonAppearance).DownFill);\r\n FNormalStroke.Assign((Source as TTMSFNCToolBarCustomButtonAppearance).NormalStroke);\r\n FDisabledStroke.Assign((Source as TTMSFNCToolBarCustomButtonAppearance).DisabledStroke);\r\n FHoverStroke.Assign((Source as TTMSFNCToolBarCustomButtonAppearance).HoverStroke);\r\n FDownStroke.Assign((Source as TTMSFNCToolBarCustomButtonAppearance).DownStroke);\r\n FRounding := (Source as TTMSFNCToolBarCustomButtonAppearance).Rounding;\r\n FCorners := (Source as TTMSFNCToolBarCustomButtonAppearance).Corners;\r\n FShowInnerStroke := (Source as TTMSFNCToolBarCustomButtonAppearance).ShowInnerStroke;\r\n FTransparent := (Source as TTMSFNCToolBarCustomButtonAppearance).Transparent;\r\n FFlatStyle := (Source as TTMSFNCToolBarCustomButtonAppearance).FlatStyle;\r\n end\r\n else\r\n inherited;\r\nend;\r\n\r\nprocedure TTMSFNCToolBarCustomButtonAppearance.Changed;\r\nbegin\r\n if Assigned(FOwner) then\r\n FOwner.AppearanceChanged\r\n else if Assigned(OnChange) then\r\n OnChange(Self);\r\nend;\r\n\r\nconstructor TTMSFNCToolBarCustomButtonAppearance.Create(AOwner: TTMSFNCDefaultToolBarButton);\r\nbegin\r\n FOwner := AOwner;\r\n FCorners := [gcTopLeft, gcTopRight, gcBottomLeft, gcBottomRight];\r\n FRounding := 3;\r\n FTransparent := False;\r\n FShowInnerStroke := True;\r\n FFlatStyle := False;\r\n\r\n FNormalFill := TTMSFNCGraphicsFill.Create(gfkGradient, MakeGraphicsColor(249, 251, 252), MakeGraphicsColor(230, 235, 235), MakeGraphicsColor(220, 220, 236), MakeGraphicsColor(220, 225, 236));\r\n FHoverFill := TTMSFNCGraphicsFill.Create(gfkGradient, MakeGraphicsColor(229, 231, 232), MakeGraphicsColor(210, 215, 215), MakeGraphicsColor(200, 200, 216), MakeGraphicsColor(200, 205, 216));\r\n FDownFill := TTMSFNCGraphicsFill.Create(gfkGradient, MakeGraphicsColor(219, 221, 222), MakeGraphicsColor(200, 205, 205), MakeGraphicsColor(190, 190, 206), MakeGraphicsColor(190, 195, 206));\r\n FDisabledFill := TTMSFNCGraphicsFill.Create(gfkSolid, gcLightgray);\r\n FNormalStroke := TTMSFNCGraphicsStroke.Create(gskSolid, gcGray);\r\n FInnerStroke := TTMSFNCGraphicsStroke.Create(gskSolid, gcWhite);\r\n FHoverStroke := TTMSFNCGraphicsStroke.Create(gskSolid, gcGray);\r\n FDownStroke := TTMSFNCGraphicsStroke.Create(gskSolid, gcGray);\r\n FDisabledStroke := TTMSFNCGraphicsStroke.Create(gskSolid, gcGray);\r\n\r\n FNormalFill.OnChanged := @FillChanged;\r\n FHoverFill.OnChanged := @FillChanged;\r\n FDownFill.OnChanged := @FillChanged;\r\n FDisabledFill.OnChanged := @FillChanged;\r\n\r\n FInnerStroke.OnChanged := @StrokeChanged;\r\n FNormalStroke.OnChanged := @StrokeChanged;\r\n FHoverStroke.OnChanged := @StrokeChanged;\r\n FDownStroke.OnChanged := @StrokeChanged;\r\n FDisabledStroke.OnChanged := @StrokeChanged;\r\nend;\r\n\r\ndestructor TTMSFNCToolBarCustomButtonAppearance.Destroy;\r\nbegin\r\n FNormalFill.Free;\r\n FHoverFill.Free;\r\n FDownFill.Free;\r\n FDisabledFill.Free;\r\n\r\n FInnerStroke.Free;\r\n FNormalStroke.Free;\r\n FHoverStroke.Free;\r\n FDownStroke.Free;\r\n FDisabledStroke.Free;\r\n inherited;\r\nend;\r\n\r\nprocedure TTMSFNCToolBarCustomButtonAppearance.FillChanged(Sender: TObject);\r\nbegin\r\n Changed;\r\nend;\r\n\r\nfunction TTMSFNCToolBarCustomButtonAppearance.IsRoundingStored: Boolean;\r\nbegin\r\n Result := Rounding <> 3;\r\nend;\r\n\r\nprocedure TTMSFNCToolBarCustomButtonAppearance.SetDisabledFill(const Value: TTMSFNCGraphicsFill);\r\nbegin\r\n FDisabledFill.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCToolBarCustomButtonAppearance.SetDisabledStroke(\r\n const Value: TTMSFNCGraphicsStroke);\r\nbegin\r\n FDisabledStroke.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCToolBarCustomButtonAppearance.SetDownFill(const Value: TTMSFNCGraphicsFill);\r\nbegin\r\n FDownFill.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCToolBarCustomButtonAppearance.SetDownStroke(\r\n const Value: TTMSFNCGraphicsStroke);\r\nbegin\r\n FDownStroke.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCToolBarCustomButtonAppearance.SetFlatStyle(const Value: Boolean);\r\nvar\r\n c: TControl;\r\n I: Integer;\r\nbegin\r\n if FFlatStyle <> Value then\r\n begin\r\n FFlatStyle := Value;\r\n if Assigned(FOwner) then\r\n begin\r\n for I := 0 to FOwner.ControlCount - 1 do\r\n begin\r\n c := FOwner.Controls[I];\r\n {$IFDEF FMXLIB}\r\n if Supports(c, IDesignerControl) then\r\n Continue;\r\n {$ENDIF}\r\n\r\n if c is TTMSFNCDefaultToolBarButton then\r\n (c as TTMSFNCDefaultToolBarButton).Appearance.FlatStyle := FlatStyle;\r\n\r\n if c is TTMSFNCCustomToolBar then\r\n (c as TTMSFNCCustomToolBar).Appearance.FlatStyle := FlatStyle;\r\n end;\r\n end;\r\n\r\n Changed;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCToolBarCustomButtonAppearance.SetHoverFill(const Value: TTMSFNCGraphicsFill);\r\nbegin\r\n FHoverFill.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCToolBarCustomButtonAppearance.SetHoverStroke(\r\n const Value: TTMSFNCGraphicsStroke);\r\nbegin\r\n FHoverStroke.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCToolBarCustomButtonAppearance.SetInnerStroke(\r\n const Value: TTMSFNCGraphicsStroke);\r\nbegin\r\n FInnerStroke.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCToolBarCustomButtonAppearance.SetNormalFill(const Value: TTMSFNCGraphicsFill);\r\nbegin\r\n FNormalFill.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCToolBarCustomButtonAppearance.SetNormalStroke(\r\n const Value: TTMSFNCGraphicsStroke);\r\nbegin\r\n FNormalStroke.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCToolBarCustomButtonAppearance.SetShowInnerStroke(\r\n const Value: Boolean);\r\nbegin\r\n if FShowInnerStroke <> Value then\r\n begin\r\n FShowInnerStroke := Value;\r\n Changed;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCToolBarCustomButtonAppearance.SetTransparent(\r\n const Value: Boolean);\r\nbegin\r\n if FTransparent <> Value then\r\n begin\r\n FTransparent := Value;\r\n Changed;\r\n end;\r\nend;\r\n\r\n{ TTMSFNCCustomToolBarAppearance }\r\n\r\nprocedure TTMSFNCCustomToolBarAppearance.Assign(Source: TPersistent);\r\nbegin\r\n if Source is TTMSFNCCustomToolBarAppearance then\r\n begin\r\n FSeparatorStroke.Assign((Source as TTMSFNCCustomToolBarAppearance).SeparatorStroke);\r\n FSeparator := (Source as TTMSFNCCustomToolBarAppearance).Separator;\r\n FFill.Assign((Source as TTMSFNCCustomToolBarAppearance).Fill);\r\n FStroke.Assign((Source as TTMSFNCCustomToolBarAppearance).Stroke);\r\n FHorizontalSpacing := (Source as TTMSFNCCustomToolBarAppearance).HorizontalSpacing;\r\n FVerticalSpacing := (Source as TTMSFNCCustomToolBarAppearance).VerticalSpacing;\r\n FDragGripColor := (Source as TTMSFNCCustomToolBarAppearance).DragGripColor;\r\n FDragGrip := (Source as TTMSFNCCustomToolBarAppearance).DragGrip;\r\n FFlatStyle := (Source as TTMSFNCCustomToolBarAppearance).FlatStyle;\r\n end;\r\nend;\r\n\r\nconstructor TTMSFNCCustomToolBarAppearance.Create(AOwner: TTMSFNCCustomToolBar);\r\nbegin\r\n FOwner := AOwner;\r\n FFont := TTMSFNCGraphicsFont.Create;\r\n FFlatStyle := False;\r\n FHorizontalSpacing := 3;\r\n FVerticalSpacing := 3;\r\n FDragGrip := True;\r\n FDragGripColor := gcLightgray;\r\n FFill := TTMSFNCGraphicsFill.Create(gfkGradient, gcWhite, MakeGraphicsColor(230, 230, 230));\r\n FStroke := TTMSFNCGraphicsStroke.Create(gskSolid, gcGray);\r\n\r\n FFill.OnChanged := @FillChanged;\r\n FStroke.OnChanged := @StrokeChanged;\r\n\r\n FSeparatorStroke := TTMSFNCGraphicsStroke.Create(gskSolid, gcWhite);\r\n FSeparatorStroke.OnChanged := @StrokeChanged;\r\nend;\r\n\r\ndestructor TTMSFNCCustomToolBarAppearance.Destroy;\r\nbegin\r\n FSeparatorStroke.Free;\r\n FFont.Free;\r\n FFill.Free;\r\n FStroke.Free;\r\n inherited;\r\nend;\r\n\r\nprocedure TTMSFNCCustomToolBarAppearance.FillChanged(Sender: TObject);\r\nbegin\r\n FOwner.Invalidate;\r\nend;\r\n\r\nfunction TTMSFNCCustomToolBarAppearance.IsHorizontalSpacingStored: Boolean;\r\nbegin\r\n Result := HorizontalSpacing <> 3;\r\nend;\r\n\r\nfunction TTMSFNCCustomToolBarAppearance.IsVerticalSpacingStored: Boolean;\r\nbegin\r\n Result := VerticalSpacing <> 3;\r\nend;\r\n\r\nprocedure TTMSFNCCustomToolBarAppearance.SetDragGrip(const Value: Boolean);\r\nbegin\r\n if FDragGrip <> Value then\r\n begin\r\n FDragGrip := Value;\r\n FOwner.UpdateControls;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomToolBarAppearance.SetDragGripColor(\r\n const Value: TTMSFNCGraphicsColor);\r\nbegin\r\n if FDragGripColor <> Value then\r\n begin\r\n FDragGripColor := Value;\r\n FOwner.Invalidate;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomToolBarAppearance.SetFill(const Value: TTMSFNCGraphicsFill);\r\nbegin\r\n FFill.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCCustomToolBarAppearance.SetFlatStyle(const Value: Boolean);\r\nbegin\r\n if FFlatStyle <> Value then\r\n begin\r\n FFlatStyle := Value;\r\n if Assigned(FOwner) then\r\n FOwner.ApplyFlatStyle;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomToolBarAppearance.SetHorizontalSpacing(\r\n const Value: Single);\r\nbegin\r\n if FHorizontalSpacing <> Value then\r\n begin\r\n FHorizontalSpacing := Value;\r\n FOwner.UpdateControls;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomToolBarAppearance.SetSeparator(const Value: Boolean);\r\nbegin\r\n if FSeparator <> Value then\r\n begin\r\n FSeparator := Value;\r\n FOwner.Invalidate;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomToolBarAppearance.SetSeparatorStroke(\r\n const Value: TTMSFNCGraphicsStroke);\r\nbegin\r\n FSeparatorStroke.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCCustomToolBarAppearance.SetStroke(const Value: TTMSFNCGraphicsStroke);\r\nbegin\r\n FStroke.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCCustomToolBarAppearance.SetVerticalSpacing(\r\n const Value: Single);\r\nbegin\r\n if FVerticalSpacing <> Value then\r\n begin\r\n FVerticalSpacing := Value;\r\n FOwner.UpdateControls;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomToolBarAppearance.StrokeChanged(Sender: TObject);\r\nbegin\r\n FOwner.Invalidate;\r\nend;\r\n\r\n{ TTMSFNCCustomToolBarSeparatorAppearance }\r\n\r\nprocedure TTMSFNCCustomToolBarSeparatorAppearance.Assign(Source: TPersistent);\r\nbegin\r\n if Source is TTMSFNCCustomToolBarSeparatorAppearance then\r\n begin\r\n Stroke.Assign((Source as TTMSFNCCustomToolBarSeparatorAppearance).Stroke);\r\n InnerStroke.Assign((Source as TTMSFNCCustomToolBarSeparatorAppearance).InnerStroke);\r\n end\r\n else\r\n inherited;\r\nend;\r\n\r\nconstructor TTMSFNCCustomToolBarSeparatorAppearance.Create(\r\n AOwner: TTMSFNCCustomToolBarSeparator);\r\nbegin\r\n FOwner := AOwner;\r\n FStroke := TTMSFNCGraphicsStroke.Create(gskSolid, gcGray);\r\n FStroke.OnChanged := @StrokeChanged;\r\n FInnerStroke := TTMSFNCGraphicsStroke.Create(gskSolid, gcWhite);\r\n FInnerStroke.OnChanged := @StrokeChanged;\r\nend;\r\n\r\ndestructor TTMSFNCCustomToolBarSeparatorAppearance.Destroy;\r\nbegin\r\n FInnerStroke.Free;\r\n FStroke.Free;\r\n inherited;\r\nend;\r\n\r\nprocedure TTMSFNCCustomToolBarSeparatorAppearance.SetInnerStroke(\r\n const Value: TTMSFNCGraphicsStroke);\r\nbegin\r\n FInnerStroke.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCCustomToolBarSeparatorAppearance.SetStroke(\r\n const Value: TTMSFNCGraphicsStroke);\r\nbegin\r\n FStroke.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCCustomToolBarSeparatorAppearance.StrokeChanged(\r\n Sender: TObject);\r\nbegin\r\n FOwner.Invalidate;\r\nend;\r\n\r\n{ TTMSFNCCustomDockPanel }\r\n\r\nfunction TTMSFNCCustomDockPanel.AddToolBar(AIndex: Integer = -1): TTMSFNCToolBar;\r\nbegin\r\n FBlockUpdate := True;\r\n Result := TTMSFNCToolBar.Create(Self);\r\n {$IFDEF FMXLIB}\r\n if (AIndex >= 0) and (AIndex <= Self.ControlCount - 1) then\r\n InsertObject(AIndex, Result)\r\n else\r\n AddObject(Result);\r\n {$ENDIF}\r\n {$IFDEF CMNWEBLIB}\r\n Result.Parent := Self;\r\n {$ENDIF}\r\n\r\n FBlockUpdate := False;\r\n UpdateControls;\r\nend;\r\n\r\nprocedure TTMSFNCCustomDockPanel.ApplyStyle;\r\nvar\r\n c: TTMSFNCGraphicsColor;\r\nbegin\r\n inherited;\r\n c := gcNull;\r\n if TTMSFNCStyles.GetStyleHeaderFillColor(c) then\r\n begin\r\n Appearance.Fill.Kind := gfkSolid;\r\n Appearance.Fill.Color := c;\r\n end;\r\n\r\n if TTMSFNCStyles.GetStyleHeaderFillColorTo(c) then\r\n begin\r\n Appearance.Fill.Kind := gfkGradient;\r\n Appearance.Fill.ColorTo := c;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomDockPanel.Assign(Source: TPersistent);\r\nbegin\r\n inherited;\r\n if Source is TTMSFNCCustomDockPanel then\r\n begin\r\n Appearance.Assign((Source as TTMSFNCCustomDockPanel).Appearance);\r\n AutoSize := (Source as TTMSFNCCustomDockPanel).AutoSize;\r\n AutoAlign := (Source as TTMSFNCCustomDockPanel).AutoAlign;\r\n State := (Source as TTMSFNCCustomDockPanel).State;\r\n end\r\n else\r\n inherited;\r\nend;\r\n\r\nconstructor TTMSFNCCustomDockPanel.Create(AOwner: TComponent);\r\nbegin\r\n inherited;\r\n FState := esNormal;\r\n FAppearance := TTMSFNCDockPanelAppearance.Create(Self);\r\n FAutoSize := True;\r\n FAutoAlign := True;\r\n {$IFDEF FMXLIB}\r\n Align := TAlignLayout.Top;\r\n {$ENDIF}\r\n {$IFDEF CMNWEBLIB}\r\n Align := alTop;\r\n {$ENDIF}\r\n Height := 40;\r\nend;\r\n\r\ndestructor TTMSFNCCustomDockPanel.Destroy;\r\nbegin\r\n FAppearance.Free;\r\n inherited;\r\nend;\r\n\r\n{$IFDEF CMNWEBLIB}\r\nprocedure TTMSFNCCustomDockPanel.AlignControls(AControl: TControl; var Rect: TRect);\r\nbegin\r\n inherited;\r\n UpdateControls;\r\nend;\r\n{$ENDIF}\r\n\r\n{$IFDEF FMXLIB}\r\nprocedure TTMSFNCCustomDockPanel.DoAddObject(const AObject: TFmxObject);\r\nbegin\r\n inherited;\r\n UpdateControls;\r\nend;\r\n\r\nprocedure TTMSFNCCustomDockPanel.DoInsertObject(Index: Integer;\r\n const AObject: TFmxObject);\r\nbegin\r\n inherited;\r\n UpdateControls;\r\nend;\r\n\r\nprocedure TTMSFNCCustomDockPanel.SetBounds(X, Y, AWidth, AHeight: Single);\r\nbegin\r\n inherited;\r\n UpdateControls;\r\nend;\r\n\r\nprocedure TTMSFNCCustomDockPanel.DoRemoveObject(\r\n const AObject: TFmxObject);\r\nbegin\r\n inherited;\r\n UpdateControls;\r\nend;\r\n{$ENDIF}\r\n\r\nfunction TTMSFNCCustomDockPanel.GetDocURL: string;\r\nbegin\r\n Result := TTMSFNCBaseDocURL + 'tmsfncuipack/components/ttmsfnctoolbar';\r\nend;\r\n\r\nfunction TTMSFNCCustomDockPanel.GetVersion: String;\r\nbegin\r\n Result := GetVersionNumber(MAJ_VER, MIN_VER, REL_VER, BLD_VER);\r\nend;\r\n\r\nprocedure TTMSFNCCustomDockPanel.InitializeControls;\r\nvar\r\n I: Integer;\r\n c: TControl;\r\nbegin\r\n for I := 0 to Self.ControlCount - 1 do\r\n begin\r\n c := Self.Controls[I];\r\n {$IFDEF FMXLIB}\r\n if Supports(c, IDesignerControl) then\r\n Continue;\r\n {$ENDIF}\r\n\r\n if c is TTMSFNCCustomToolBar then\r\n begin\r\n (c as TTMSFNCCustomToolBar).OnUpdateDockPanel := UpdateDockPanel;\r\n if (c as TTMSFNCCustomToolBar).FDragGripMoving then\r\n Continue;\r\n end;\r\n\r\n if c.Visible then\r\n begin\r\n {$IFDEF FMXLIB}\r\n if c.Position.y < Appearance.Margins.Top then\r\n c.Position.y := Appearance.Margins.Top;\r\n if c.Position.x < Appearance.Margins.Left then\r\n c.Position.x := Appearance.Margins.Left\r\n else if c.Position.x + c.Width > Width - Appearance.Margins.Right then\r\n c.Position.x := Width - Appearance.Margins.Right - c.Width;\r\n {$ENDIF}\r\n {$IFDEF CMNWEBLIB}\r\n if c.Top < Appearance.Margins.Top then\r\n c.Top := Round(Appearance.Margins.Top);\r\n if c.Left < Appearance.Margins.Left then\r\n c.Left := Round(Appearance.Margins.Left)\r\n else if c.Left + c.Width > Width - Appearance.Margins.Right then\r\n c.Left := Round(Width - Appearance.Margins.Right - c.Width);\r\n {$ENDIF}\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomDockPanel.Draw(AGraphics: TTMSFNCGraphics; ARect: TRectF);\r\nvar\r\n r: TRectF;\r\nbegin\r\n inherited;\r\n AGraphics.Fill.Assign(Appearance.Fill);\r\n AGraphics.Stroke.Assign(Appearance.Stroke);\r\n\r\n r := LocalRect;\r\n AGraphics.DrawRectangle(r);\r\nend;\r\n\r\nprocedure TTMSFNCCustomDockPanel.RearrangeControls;\r\nvar\r\n c, cl: TControl;\r\n cr, clr: TRectF;\r\n I, J: Integer;\r\nbegin\r\n for I := 0 to Self.ControlCount - 1 do\r\n begin\r\n c := Self.Controls[I];\r\n\r\n {$IFDEF FMXLIB}\r\n if Supports(c, IDesignerControl) then\r\n Continue;\r\n {$ENDIF}\r\n\r\n if not c.Visible then\r\n Continue;\r\n\r\n if c is TTMSFNCCustomToolBar then\r\n begin\r\n if (c as TTMSFNCCustomToolBar).FDragGripMoving then\r\n Continue;\r\n end;\r\n\r\n for J := 0 to Self.ControlCount - 1 do\r\n begin\r\n cl := Self.Controls[J];\r\n\r\n if (cl = c) or not cl.Visible then\r\n Continue;\r\n\r\n {$IFDEF FMXLIB}\r\n if Supports(cl, IDesignerControl) then\r\n Continue;\r\n {$ENDIF}\r\n\r\n {$IFDEF FMXLIB}\r\n cr := RectF(c.Position.X, c.Position.Y, c.Position.X + c.Width, c.Position.Y + c.Height);\r\n clr := RectF(cl.Position.X, cl.Position.Y, cl.Position.X + cl.Width, cl.Position.Y + cl.Height);\r\n\r\n if (clr.Left >= cr.Left - 3) and (clr.Left <= cr.Right + 3) then\r\n begin\r\n if (clr.Top < CenterPointEx(cr).Y) and (clr.Top >= cr.Top - 3) then\r\n begin\r\n cl.Position.X := c.Position.X + c.Width + 3;\r\n cl.Position.Y := c.Position.Y;\r\n end\r\n else if (clr.Top >= CenterPointEx(cr).Y) and (clr.Top <= cr.Bottom + 3) then\r\n begin\r\n cl.Position.Y := c.Position.Y + c.Height + 3;\r\n cl.Position.X := c.Position.X;\r\n end;\r\n end;\r\n {$ENDIF}\r\n\r\n {$IFDEF CMNWEBLIB}\r\n cr := RectF(c.Left, c.Top, c.Left + c.Width, c.Top + c.Height);\r\n clr := RectF(cl.Left, cl.Top, cl.Left + cl.Width, cl.Top + cl.Height);\r\n\r\n if (clr.Left >= cr.Left - 3) and (clr.Left <= cr.Right + 3) then\r\n begin\r\n if (clr.Top < CenterPointEx(cr).Y) and (clr.Top >= cr.Top - 3) then\r\n begin\r\n cl.Left := c.Left + c.Width + 3;\r\n cl.Top := c.Top;\r\n end\r\n else if (clr.Top >= CenterPointEx(cr).Y) and (clr.Top <= cr.Bottom + 3) then\r\n begin\r\n cl.Top := c.Top + c.Height + 3;\r\n cl.Left := c.Left;\r\n end;\r\n end;\r\n {$ENDIF}\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomDockPanel.ResetToDefaultStyle;\r\nbegin\r\n inherited;\r\n\r\nend;\r\n\r\nprocedure TTMSFNCCustomDockPanel.SetAdaptToStyle(const Value: Boolean);\r\nbegin\r\n inherited;\r\n UpdateControls;\r\nend;\r\n\r\nprocedure TTMSFNCCustomDockPanel.SetAppearance(\r\n const Value: TTMSFNCDockPanelAppearance);\r\nbegin\r\n FAppearance.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCCustomDockPanel.SetAutoAlign(const Value: Boolean);\r\nbegin\r\n if FAutoAlign <> Value then\r\n begin\r\n FAutoAlign := Value;\r\n UpdateControls;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomDockPanel.SetAS(const Value: Boolean);\r\nbegin\r\n if FAutoSize <> Value then\r\n begin\r\n FAutoSize := Value;\r\n UpdateControls;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomDockPanel.SetState(\r\n const Value: TTMSFNCToolBarElementState);\r\nvar\r\n I: Integer;\r\n c: TControl;\r\nbegin\r\n if FState <> Value then\r\n begin\r\n FState := Value;\r\n for I := 0 to Self.ControlCount - 1 do\r\n begin\r\n c := Self.Controls[I];\r\n if c is TTMSFNCCustomToolBar then\r\n (c as TTMSFNCCustomToolBar).State := FState;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomDockPanel.UpdateControls;\r\nvar\r\n I: Integer;\r\n {$IFDEF FMXLIB}\r\n h, hsm: Single;\r\n {$ENDIF}\r\n {$IFDEF CMNWEBLIB}\r\n h, hsm: Integer;\r\n {$ENDIF}\r\n c: TControl;\r\n {$IFDEF FNCLIB}\r\n ia: ITMSFNCAdaptToStyle;\r\n {$ENDIF}\r\nbegin\r\n if FBlockUpdate or IsLoading or IsDestroying then\r\n Exit;\r\n\r\n FBlockUpdate := True;\r\n h := 0;\r\n hsm := ScalePaintValue(30);\r\n\r\n if AutoAlign then\r\n begin\r\n InitializeControls;\r\n RearrangeControls;\r\n end;\r\n\r\n if AutoSize then\r\n begin\r\n for I := 0 to Self.ControlCount - 1 do\r\n begin\r\n c := Self.Controls[I];\r\n {$IFDEF FMXLIB}\r\n if Supports(c, IDesignerControl) then\r\n Continue;\r\n\r\n if c.Visible then\r\n h := Max(h, c.Position.y + c.Height + Appearance.Margins.Bottom);\r\n {$ENDIF}\r\n\r\n {$IFDEF FNCLIB}\r\n if Supports(c, ITMSFNCAdaptToStyle, ia) then\r\n ia.AdaptToStyle := AdaptToStyle;\r\n {$ENDIF}\r\n\r\n {$IFDEF CMNWEBLIB}\r\n if c.Visible then\r\n h := Round(Max(h, c.Top + c.Height + Appearance.Margins.Bottom));\r\n {$ENDIF}\r\n end;\r\n\r\n if h = 0 then\r\n h := hsm;\r\n\r\n if csDesigning in ComponentState then\r\n h := h + ScalePaintValue(15);\r\n\r\n {$IFDEF FMXLIB}\r\n SetBounds(Position.X, Position.Y, Width, h);\r\n {$ENDIF}\r\n {$IFDEF CMNWEBLIB}\r\n SetBounds(Left, Top, Width, h);\r\n {$ENDIF}\r\n end;\r\n\r\n FBlockUpdate := False;\r\nend;\r\n\r\nprocedure TTMSFNCCustomDockPanel.UpdateDockPanel(Sender: TObject);\r\nbegin\r\n UpdateControls;\r\nend;\r\n\r\n{ TTMSFNCCustomDockPanelAppearance }\r\n\r\nconstructor TTMSFNCCustomDockPanelAppearance.Create(AOwner: TTMSFNCCustomDockPanel);\r\nbegin\r\n FOwner := AOwner;\r\n FFill := TTMSFNCGraphicsFill.Create(gfkSolid, gcWhite);\r\n FStroke := TTMSFNCGraphicsStroke.Create(gskSolid, gcGray);\r\n\r\n FFill.OnChanged := @FillChanged;\r\n FStroke.OnChanged := @StrokeChanged;\r\n FMargins := TTMSFNCMargins.Create;\r\n FMargins.Left := 3;\r\n FMargins.Top := 3;\r\n FMargins.Bottom := 3;\r\n FMargins.Right := 3;\r\nend;\r\n\r\ndestructor TTMSFNCCustomDockPanelAppearance.Destroy;\r\nbegin\r\n FMargins.Free;\r\n FFill.Free;\r\n FStroke.Free;\r\n inherited;\r\nend;\r\n\r\nprocedure TTMSFNCCustomDockPanelAppearance.FillChanged(Sender: TObject);\r\nbegin\r\n FOwner.Invalidate;\r\nend;\r\n\r\nprocedure TTMSFNCCustomDockPanelAppearance.MarginsChanged(\r\n Sender: TObject);\r\nbegin\r\n FOwner.UpdateControls;\r\nend;\r\n\r\nprocedure TTMSFNCCustomDockPanelAppearance.SetFill(const Value: TTMSFNCGraphicsFill);\r\nbegin\r\n FFill.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCCustomDockPanelAppearance.SetMargins(\r\n const Value: TTMSFNCMargins);\r\nbegin\r\n FMargins.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCCustomDockPanelAppearance.SetStroke(const Value: TTMSFNCGraphicsStroke);\r\nbegin\r\n FStroke.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCCustomDockPanelAppearance.StrokeChanged(Sender: TObject);\r\nbegin\r\n FOwner.Invalidate;\r\nend;\r\n\r\n{ TTMSFNCCustomToolBarElement }\r\n\r\nprocedure TTMSFNCCustomToolBarElement.UpdateToolBarControl;\r\nbegin\r\n if Assigned(OnUpdateToolBarControl) then\r\n OnUpdateToolBarControl(Self);\r\nend;\r\n\r\nprocedure TTMSFNCCustomToolBarElement.ReadControlIndex(Reader: TReader);\r\nbegin\r\n ControlIndex := Reader.ReadInteger;\r\nend;\r\n\r\nprocedure TTMSFNCCustomToolBarElement.WriteControlIndex(Writer: TWriter);\r\nbegin\r\n Writer.WriteInteger(ControlIndex);\r\nend;\r\n\r\nprocedure TTMSFNCCustomToolBarElement.Assign(Source: TPersistent);\r\nbegin\r\n inherited;\r\n if Source is TTMSFNCCustomToolBarElement then\r\n begin\r\n FState := (Source as TTMSFNCCustomToolBarElement).State;\r\n FLastElement := (Source as TTMSFNCCustomToolBarElement).LastElement;\r\n FCanCopy := (Source as TTMSFNCCustomToolBarElement).CanCopy;\r\n end;\r\nend;\r\n\r\nconstructor TTMSFNCCustomToolBarElement.Create(AOwner: TComponent);\r\nbegin\r\n inherited;\r\n DisableBackground;\r\n {$IFDEF CMNLIB}\r\n ParentColor := True;\r\n {$IFDEF VCLLIB}\r\n ParentBackground := True;\r\n {$ENDIF}\r\n {$ENDIF}\r\n FLastElement := False;\r\n FCanCopy := True;\r\n FState := esNormal;\r\nend;\r\n\r\nprocedure TTMSFNCCustomToolBarElement.DefineProperties(Filer: TFiler);\r\nbegin\r\n inherited;\r\n {$IFDEF LCLWEBLIB}\r\n Filer.DefineProperty('ControlIndex', @ReadControlIndex, @WriteControlIndex, True);\r\n {$ENDIF}\r\n {$IFNDEF LCLWEBLIB}\r\n Filer.DefineProperty('ControlIndex', ReadControlIndex, WriteControlIndex, True);\r\n {$ENDIF}\r\nend;\r\n\r\ndestructor TTMSFNCCustomToolBarElement.Destroy;\r\nbegin\r\n inherited;\r\nend;\r\n\r\nfunction TTMSFNCCustomToolBarElement.GetDocURL: string;\r\nbegin\r\n Result := TTMSFNCBaseDocURL + 'tmsfncuipack/components/ttmsfnctoolbar';\r\nend;\r\n\r\n{$IFDEF FMXLIB}\r\nprocedure TTMSFNCCustomToolBarElement.DoMatrixChanged(Sender: TObject);\r\nbegin\r\n inherited;\r\n UpdateToolBar;\r\nend;\r\n{$ENDIF}\r\n\r\nprocedure TTMSFNCCustomToolBarElement.UpdateControlAfterResize;\r\nbegin\r\n inherited;\r\n UpdateToolBar;\r\nend;\r\n\r\nprocedure TTMSFNCCustomToolBarElement.SetLastElement(const Value: Boolean);\r\nbegin\r\n if FLastElement <> Value then\r\n begin\r\n FLastElement := Value;\r\n UpdateToolBar;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomToolBarElement.SetState(\r\n const Value: TTMSFNCToolBarElementState);\r\nbegin\r\n if FState <> Value then\r\n begin\r\n FState := Value;\r\n UpdateState;\r\n end;\r\nend;\r\n\r\n{$IFDEF FMXLIB}\r\nprocedure TTMSFNCCustomToolBarElement.SetVisible(const Value: Boolean);\r\n{$ENDIF}\r\n{$IFDEF CMNWEBLIB}\r\nprocedure TTMSFNCCustomToolBarElement.VisibleChanging;\r\n{$ENDIF}\r\nbegin\r\n inherited;\r\n {$IFDEF FMXLIB}\r\n if Visible <> Value then\r\n {$ENDIF}\r\n UpdateToolBar;\r\nend;\r\n\r\nprocedure TTMSFNCCustomToolBarElement.UpdateState;\r\nbegin\r\n\r\nend;\r\n\r\nprocedure TTMSFNCCustomToolBarElement.UpdateToolBar;\r\nbegin\r\n if Assigned(OnUpdateToolBar) and not FBlockUpdate then\r\n OnUpdateToolBar(Self);\r\nend;\r\n\r\n{ TTMSFNCToolBarControl }\r\n\r\nconstructor TTMSFNCToolBarControl.Create;\r\nbegin\r\n FBitmap := TTMSFNCBitmap.Create;\r\nend;\r\n\r\ndestructor TTMSFNCToolBarControl.Destroy;\r\nbegin \r\n FBitmap.Free;\r\n inherited;\r\nend;\r\n\r\n{ TTMSFNCCustomToolBarOptionsMenu }\r\n\r\nprocedure TTMSFNCCustomToolBarOptionsMenu.Assign(Source: TPersistent);\r\nbegin\r\n if Source is TTMSFNCCustomToolBarOptionsMenu then\r\n begin\r\n FShowItemText := (Source as TTMSFNCCustomToolBarOptionsMenu).ShowItemText;\r\n FShowItemBitmap := (Source as TTMSFNCCustomToolBarOptionsMenu).ShowItemBitmap;\r\n FShowButton := (Source as TTMSFNCCustomToolBarOptionsMenu).ShowButton;\r\n FAutoItemBitmapWidth := (Source as TTMSFNCCustomToolBarOptionsMenu).AutoItemBitmapWidth;\r\n FItemBitmapWidth := (Source as TTMSFNCCustomToolBarOptionsMenu).ItemBitmapWidth;\r\n end;\r\nend;\r\n\r\nconstructor TTMSFNCCustomToolBarOptionsMenu.Create(\r\n AOwner: TTMSFNCCustomToolBar);\r\nbegin\r\n FOwner := AOwner;\r\n FShowItemText := True;\r\n FShowButton := True;\r\n FShowItemBitmap := True;\r\n FAutoItemBitmapWidth := True;\r\n FItemBitmapWidth := 50;\r\nend;\r\n\r\ndestructor TTMSFNCCustomToolBarOptionsMenu.Destroy;\r\nbegin\r\n\r\n inherited;\r\nend;\r\n\r\nfunction TTMSFNCCustomToolBarOptionsMenu.IsItemBitmapWidthStored: Boolean;\r\nbegin\r\n Result := ItemBitmapWidth <> 50;\r\nend;\r\n\r\nprocedure TTMSFNCCustomToolBarOptionsMenu.SetAutoItemBitmapWidth(\r\n const Value: Boolean);\r\nbegin\r\n if FAutoItemBitmapWidth <> Value then\r\n begin\r\n FAutoItemBitmapWidth := Value;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomToolBarOptionsMenu.SetItemBitmapWidth(\r\n const Value: Single);\r\nbegin\r\n if FItemBitmapWidth <> Value then\r\n begin\r\n FItemBitmapWidth := Value;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomToolBarOptionsMenu.SetShowButton(const Value: Boolean);\r\nbegin\r\n if FShowButton <> Value then\r\n begin\r\n FShowButton := Value;\r\n FOwner.FOptionsMenuButton.Visible := FShowButton;\r\n if FShowButton then\r\n FOwner.FOptionsMenuButton.Parent := FOwner\r\n else\r\n FOwner.FOptionsMenuButton.Parent := nil;\r\n\r\n FOwner.UpdateControls;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomToolBarOptionsMenu.SetShowItemBitmap(\r\n const Value: Boolean);\r\nbegin\r\n if FShowItemBitmap <> Value then\r\n begin\r\n FShowItemBitmap := Value;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomToolBarOptionsMenu.SetShowItemText(const Value: Boolean);\r\nbegin\r\n if FShowItemText <> Value then\r\n begin\r\n FShowItemText := Value;\r\n end;\r\nend;\r\n\r\n{ TTMSFNCToolBarFontNamePicker }\r\n\r\nconstructor TTMSFNCToolBarFontNamePicker.Create(AOwner: TComponent);\r\nbegin\r\n inherited;\r\n AutoOptionsMenuText := 'Font Name';\r\n TTMSFNCUtils.GetFonts(FItems);\r\n {$IFDEF LCLLIB}\r\n FItems.Insert(0, 'Default');\r\n {$ENDIF}\r\nend;\r\n\r\nprocedure TTMSFNCToolBarFontNamePicker.DoItemSelected;\r\nbegin\r\n inherited;\r\n if Assigned(OnFontNameSelected) then\r\n OnFontNameSelected(Self, SelectedFontName);\r\nend;\r\n\r\nfunction TTMSFNCToolBarFontNamePicker.GetSelectedFontName: String;\r\nbegin\r\n Result := GetSelectedItem;\r\nend;\r\n\r\nprocedure TTMSFNCToolBarFontNamePicker.RegisterRuntimeClasses;\r\nbegin\r\n inherited;\r\n RegisterClass(TTMSFNCToolBarFontNamePicker);\r\nend;\r\n\r\nprocedure TTMSFNCToolBarFontNamePicker.SetSelectedFontName(const Value: String);\r\nbegin\r\n SelectedItem := Value;\r\nend;\r\n\r\n{ TTMSFNCToolBarFontNamePicker }\r\n\r\nconstructor TTMSFNCToolBarFontSizePicker.Create(AOwner: TComponent);\r\nbegin\r\n inherited;\r\n AutoOptionsMenuText := 'Font Size';\r\n FItems.Add('8');\r\n FItems.Add('9');\r\n FItems.Add('10');\r\n FItems.Add('11');\r\n FItems.Add('12');\r\n FItems.Add('14');\r\n FItems.Add('16');\r\n FItems.Add('18');\r\n FItems.Add('20');\r\n FItems.Add('22');\r\n FItems.Add('24');\r\n FItems.Add('26');\r\n FItems.Add('28');\r\n FItems.Add('36');\r\n FItems.Add('48');\r\n FItems.Add('72');\r\nend;\r\n\r\nprocedure TTMSFNCToolBarFontSizePicker.DoItemSelected;\r\nbegin\r\n inherited;\r\n if Assigned(OnFontSizeSelected) then\r\n OnFontSizeSelected(Self, SelectedFontSize);\r\nend;\r\n\r\nfunction TTMSFNCToolBarFontSizePicker.GetSelectedFontSize: Single;\r\nvar\r\n s: String;\r\nbegin\r\n Result := -1;\r\n s := GetSelectedItem;\r\n if s <> '' then\r\n Result := StrToFloat(GetSelectedItem)\r\nend;\r\n\r\nprocedure TTMSFNCToolBarFontSizePicker.RegisterRuntimeClasses;\r\nbegin\r\n inherited;\r\n RegisterClass(TTMSFNCToolBarFontSizePicker);\r\nend;\r\n\r\nprocedure TTMSFNCToolBarFontSizePicker.SetSelectedFontSize(const Value: Single);\r\nbegin\r\n SelectedItem := FloatToStr(Value);\r\nend;\r\n\r\n{ TTMSFNCToolBarColorPicker }\r\n\r\nfunction TTMSFNCToolBarColorPicker.BlockChange: Boolean;\r\nbegin\r\n Result := FColorSelector.BlockChange;\r\nend;\r\n\r\nfunction TTMSFNCToolBarColorPicker.CanChangeText: Boolean;\r\nbegin\r\n Result := not (csLoading in ComponentState) and not (csDesigning in ComponentState);\r\nend;\r\n\r\nprocedure TTMSFNCToolBarColorPicker.ColorSelected(Sender: TObject;\r\n AColor: TTMSFNCGraphicsColor);\r\nbegin\r\n if CloseOnSelection and not BlockChange then\r\n CloseDropDown;\r\n DoColorSelected(AColor);\r\n Invalidate;\r\nend;\r\n\r\nfunction TTMSFNCToolBarColorPicker.ColorSelector: TTMSFNCColorSelector;\r\nbegin\r\n Result := FColorSelector;\r\nend;\r\n\r\nconstructor TTMSFNCToolBarColorPicker.Create(AOwner: TComponent);\r\nbegin\r\n inherited;\r\n Width := 40;\r\n Height := 24;\r\n AutoOptionsMenuText := 'Color';\r\n FColorSelector := TTMSFNCColorSelector.Create(Self);\r\n FColorSelector.Appearance.HorizontalSpacing := 2;\r\n FColorSelector.Appearance.VerticalSpacing := 2;\r\n FColorSelector.Mode := csmExtended;\r\n FColorSelector.Width := 175;\r\n FColorSelector.Height := 125;\r\n FColorSelector.Stored := False;\r\n FColorSelector.SelectedColor := gcBlack;\r\n FColorSelector.OnColorSelected := ColorSelected;\r\n\r\n DropDownControl := FColorSelector;\r\n DropDownWidth := FColorSelector.Width;\r\n DropDownHeight := FColorSelector.Height;\r\n DropDownKind := ddkDropDownButton;\r\nend;\r\n\r\nprocedure TTMSFNCToolBarColorPicker.DoColorSelected(AColor: TTMSFNCGraphicsColor);\r\nbegin\r\n if Assigned(OnColorSelected) then\r\n OnColorSelected(Self, AColor);\r\nend;\r\n\r\nprocedure TTMSFNCToolBarColorPicker.DrawColor(AColor: TTMSFNCGraphicsColor;\r\n ARect: TRectF; AGraphics: TTMSFNCGraphics);\r\nvar\r\n r: TRectF;\r\n rounding: integer;\r\n I, J: Integer;\r\n st: TTMSFNCGraphicsSaveState;\r\nbegin\r\n R := ARect;\r\n\r\n rounding := Round(Max(ScalePaintValue(3.5), Appearance.Rounding / 4));\r\n\r\n InflateRectEx(R, -rounding, -rounding);\r\n OffsetRectEx(R, ScalePaintValue(0.5), ScalePaintValue(0.5));\r\n st := AGraphics.SaveState;\r\n try\r\n AGraphics.ClipRect(R);\r\n AGraphics.Stroke.Kind := gskNone;\r\n AGraphics.Fill.Kind := gfkSolid;\r\n AGraphics.Stroke.Width := 1;\r\n AGraphics.Fill.Color := MakeGraphicsColor(255, 255, 255);\r\n AGraphics.DrawRectangle(R);\r\n AGraphics.Fill.Color := MakeGraphicsColor(211 , 211 , 211 );\r\n for I := 0 to Trunc((r.Right - r.Left) / 5) + 1 do\r\n for J := 0 to Trunc((r.Bottom - r.Top) / 5) + 1 do\r\n if Odd(I + J) then\r\n AGraphics.DrawRectangle(RectF(I * 5, J * 5, (I + 1) * 5, (J + 1) * 5), gcrmNone);\r\n\r\n AGraphics.Fill.Kind := gfkSolid;\r\n AGraphics.Fill.Color := AColor;\r\n AGraphics.Stroke.Color := gcBlack;\r\n AGraphics.Stroke.Kind := gskSolid;\r\n AGraphics.DrawRectangle(R);\r\n finally\r\n AGraphics.RestoreState(st);\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCToolBarColorPicker.DrawSelectedColor(\r\n AGraphics: TTMSFNCGraphics; ARect: TRectF);\r\nvar\r\n R: TRectF;\r\n c: TTMSFNCGraphicsColor;\r\n ct: TTMSFNCToolBarDropDownButton;\r\nbegin\r\n ct := GetDropDownButtonControl;\r\n if Assigned(ct) then\r\n begin\r\n R := RectF(0, 0, Width - ct.Width, Height);\r\n c := SelectedColor;\r\n DrawColor(c, r, AGraphics);\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCToolBarColorPicker.GetItems: TTMSFNCColorSelectorItems;\r\nbegin\r\n Result := FColorSelector.Items;\r\nend;\r\n\r\nfunction TTMSFNCToolBarColorPicker.GetSelectedColor: TTMSFNCGraphicsColor;\r\nbegin\r\n Result := FColorSelector.SelectedColor;\r\nend;\r\n\r\nfunction TTMSFNCToolBarColorPicker.GetSelectedItemIndex: Integer;\r\nbegin\r\n Result := FColorSelector.SelectedItemIndex;\r\nend;\r\n\r\nprocedure TTMSFNCToolBarColorPicker.RegisterRuntimeClasses;\r\nbegin\r\n inherited;\r\n RegisterClass(TTMSFNCToolBarColorPicker);\r\nend;\r\n\r\nprocedure TTMSFNCToolBarColorPicker.Draw(AGraphics: TTMSFNCGraphics; ARect: TRectF);\r\nbegin\r\n inherited;\r\n DrawSelectedColor(AGraphics, ARect);\r\nend;\r\n\r\nprocedure TTMSFNCToolBarColorPicker.SetAdaptToStyle(const Value: Boolean);\r\nbegin\r\n inherited;\r\n if Assigned(FColorSelector) then\r\n FColorSelector.AdaptToStyle := AdaptToStyle;\r\nend;\r\n\r\nprocedure TTMSFNCToolBarColorPicker.SetItems(\r\n const Value: TTMSFNCColorSelectorItems);\r\nbegin\r\n FColorSelector.Items.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCToolBarColorPicker.SetSelectedColor(const Value: TTMSFNCGraphicsColor);\r\nbegin\r\n FColorSelector.SelectedColor := Value;\r\n Invalidate;\r\nend;\r\n\r\nprocedure TTMSFNCToolBarColorPicker.SetSelectedItemIndex(const Value: Integer);\r\nbegin\r\n FColorSelector.SelectedItemIndex := Value;\r\n Invalidate;\r\nend;\r\n\r\n{ TTMSFNCToolBarBitmapPicker }\r\n\r\nfunction TTMSFNCToolBarBitmapPicker.BitmapSelector: TTMSFNCBitmapSelector;\r\nbegin\r\n Result := FBitmapSelector;\r\nend;\r\n\r\nfunction TTMSFNCToolBarBitmapPicker.BlockChange: Boolean;\r\nbegin\r\n Result := FBitmapSelector.BlockChange;\r\nend;\r\n\r\nprocedure TTMSFNCToolBarBitmapPicker.BitmapSelected(Sender: TObject;\r\n ABitmap: TTMSFNCBitmap);\r\nbegin\r\n Bitmaps.Clear;\r\n DisabledBitmaps.Clear;\r\n HoverBitmaps.Clear;\r\n Bitmaps.AddBitmap(ABitmap);\r\n DisabledBitmaps.AddBitmap(ABitmap);\r\n HoverBitmaps.AddBitmap(ABitmap);\r\n\r\n if CloseOnSelection and not BlockChange then\r\n CloseDropDown;\r\n DoBitmapSelected(ABitmap);\r\nend;\r\n\r\nfunction TTMSFNCToolBarBitmapPicker.CanChangeText: Boolean;\r\nbegin\r\n Result := not (csLoading in ComponentState) and not (csDesigning in ComponentState);\r\nend;\r\n\r\nconstructor TTMSFNCToolBarBitmapPicker.Create(AOwner: TComponent);\r\nbegin\r\n inherited;\r\n Width := 40;\r\n Height := 24;\r\n AutoOptionsMenuText := 'Bitmap';\r\n FBitmapSelector := TTMSFNCBitmapSelector.Create(Self);\r\n FBitmapSelector.Appearance.HorizontalSpacing := 2;\r\n FBitmapSelector.Appearance.VerticalSpacing := 2;\r\n FBitmapSelector.Stored := False;\r\n FBitmapSelector.OnBitmapSelected := BitmapSelected;\r\n\r\n DropDownControl := FBitmapSelector;\r\n DropDownWidth := FBitmapSelector.Width;\r\n DropDownHeight := FBitmapSelector.Height;\r\n DropDownKind := ddkDropDownButton;\r\nend;\r\n\r\nprocedure TTMSFNCToolBarBitmapPicker.DoBitmapSelected(ABitmap: TTMSFNCBitmap);\r\nbegin\r\n if Assigned(OnBitmapSelected) then\r\n OnBitmapSelected(Self, ABitmap);\r\nend;\r\n\r\nfunction TTMSFNCToolBarBitmapPicker.GetBitmapRect(ARect: TRectF): TRectF;\r\nvar\r\n r: TRectF;\r\n dr: TRectf;\r\nbegin\r\n r := ARect;\r\n Result := RectF(r.Left, r.Top, r.Right, r.Bottom);\r\n if BitmapVisible then\r\n begin\r\n if DropDownKind <> ddkNormal then\r\n begin\r\n dr := GetDropDownRect;\r\n case DropDownPosition of\r\n ddpRight: Result := RectF(Result.Left + 3, Result.Top + 3, dr.Left - 3, Result.Bottom - 3);\r\n ddpBottom: Result := RectF(Result.Left + 3, Result.Top + 3, Result.Right - 3, dr.Top - 3);\r\n end;\r\n end\r\n else\r\n Result := RectF(Result.Left + 3, Result.Top + 3, Result.Right - 3, Result.Bottom - 3);\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCToolBarBitmapPicker.GetItems: TTMSFNCBitmapSelectorItems;\r\nbegin\r\n Result := FBitmapSelector.Items;\r\nend;\r\n\r\nfunction TTMSFNCToolBarBitmapPicker.GetSelectedBitmap: TTMSFNCBitmap;\r\nbegin\r\n Result := FBitmapSelector.SelectedBitmap;\r\nend;\r\n\r\nfunction TTMSFNCToolBarBitmapPicker.GetSelectedItemIndex: Integer;\r\nbegin\r\n Result := FBitmapSelector.SelectedItemIndex;\r\nend;\r\n\r\nprocedure TTMSFNCToolBarBitmapPicker.RegisterRuntimeClasses;\r\nbegin\r\n inherited;\r\n RegisterClass(TTMSFNCToolBarBitmapPicker);\r\nend;\r\n\r\nprocedure TTMSFNCToolBarBitmapPicker.SetAdaptToStyle(const Value: Boolean);\r\nbegin\r\n inherited;\r\n if Assigned(FBitmapSelector) then\r\n FBitmapSelector.AdaptToStyle := AdaptToStyle;\r\nend;\r\n\r\nprocedure TTMSFNCToolBarBitmapPicker.SetBitmapContainer(\r\n const Value: TTMSFNCBitmapContainer);\r\nbegin\r\n inherited;\r\n if Assigned(FBitmapSelector) then\r\n FBitmapSelector.BitmapContainer := Value;\r\nend;\r\n\r\nprocedure TTMSFNCToolBarBitmapPicker.SetItems(\r\n const Value: TTMSFNCBitmapSelectorItems);\r\nbegin\r\n if Assigned(FBitmapSelector) then\r\n FBitmapSelector.Items.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCToolBarBitmapPicker.SetSelectedItemIndex(const Value: Integer);\r\nbegin\r\n FBitmapSelector.SelectedItemIndex := Value;\r\n Bitmaps.Clear;\r\n DisabledBitmaps.Clear;\r\n HoverBitmaps.Clear;\r\n Bitmaps.AddBitmap(SelectedBitmap);\r\n DisabledBitmaps.AddBitmap(SelectedBitmap);\r\n HoverBitmaps.AddBitmap(SelectedBitmap);\r\n Invalidate;\r\nend;\r\n\r\n{ TTMSFNCToolBarDropDownButton }\r\n\r\nconstructor TTMSFNCToolBarDropDownButton.Create(AOwner: TComponent);\r\nbegin\r\n inherited;\r\n FDefaultStyle := True;\r\nend;\r\n\r\nprocedure TTMSFNCToolBarDropDownButton.DrawBitmap(AGraphics: TTMSFNCGraphics;\r\n ARect: TRectF);\r\nvar\r\n bmp: TTMSFNCBitmapHelperClass;\r\n bmpa: TBitmap;\r\n r: TRectF;\r\n g: TTMSFNCGraphics;\r\nbegin\r\n if DefaultStyle then\r\n begin\r\n r := ARect;\r\n\r\n if not(Assigned(Owner) and (Owner is TTMSFNCCustomToolBarButton) and ((Owner as TTMSFNCCustomToolBarButton).FDropDownPosition = ddpBottom)) then\r\n InflateRectEx(r, ScalePaintValue(-2),ScalePaintValue(-2));\r\n\r\n inherited DrawBitmap(AGraphics, r);\r\n end\r\n else\r\n begin\r\n bmpa := TBitmap.Create;\r\n bmpa.SetSize(7, 7);\r\n {$IFDEF CMNLIB}\r\n bmpa.TransparentMode := tmFixed;\r\n bmpa.Transparent := True;\r\n bmpa.TransparentColor := gcWhite;\r\n {$ENDIF}\r\n g := TTMSFNCGraphics.Create(bmpa.Canvas);\r\n try\r\n g.BeginScene;\r\n {$IFDEF CMNLIB}\r\n g.Fill.Color := gcWhite;\r\n g.Fill.Kind := gfkSolid;\r\n g.Stroke.Kind := gskSolid;\r\n g.Stroke.Color := gcWhite;\r\n g.DrawRectangle(0, 0, bmpa.Width, bmpa.Height);\r\n {$ENDIF}\r\n g.Stroke.Kind := gskSolid;\r\n g.Stroke.Color := gcDarkgray;\r\n g.DrawLine(PointF(0, 1), PointF(6, 1), gcpmRightDown);\r\n g.DrawLine(PointF(0, 2), PointF(6, 2), gcpmRightDown);\r\n g.DrawLine(PointF(1, 3), PointF(5, 3), gcpmRightDown);\r\n g.DrawLine(PointF(2, 4), PointF(4, 4), gcpmRightDown);\r\n g.DrawLine(PointF(3, 5), PointF(3, 5), gcpmRightDown);\r\n finally\r\n g.EndScene;\r\n g.Free;\r\n end;\r\n\r\n try\r\n r := ARect;\r\n bmp := TTMSFNCBitmap.Create;\r\n try\r\n bmp.Assign(bmpa);\r\n AGraphics.DrawBitmap(r, bmp);\r\n finally\r\n bmp.Free;\r\n end;\r\n finally\r\n bmpa.Free;\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCToolBarDropDownButton.GetBitmapRect(ARect: TRectF): TRectF;\r\nvar\r\n r: TRectF;\r\nbegin\r\n r := ARect;\r\n Result := RectF(r.Left + 3, r.Top + 3, r.Right - 3, r.Bottom - 3);\r\nend;\r\n\r\nprocedure TTMSFNCToolBarDropDownButton.LoadSettingsFromFile(AFileName: string);\r\nbegin\r\n inherited;\r\n DefaultStyle := False;\r\nend;\r\n\r\nprocedure TTMSFNCToolBarDropDownButton.LoadSettingsFromStream(\r\n AStream: TStream);\r\nbegin\r\n inherited;\r\n DefaultStyle := False;\r\nend;\r\n\r\nprocedure TTMSFNCToolBarDropDownButton.RegisterRuntimeClasses;\r\nbegin\r\n inherited;\r\n RegisterClass(TTMSFNCToolBarDropDownButton);\r\nend;\r\n\r\nprocedure TTMSFNCToolBarDropDownButton.SetDefaultStyle(const Value: Boolean);\r\nbegin\r\n if FDefaultStyle <> Value then\r\n begin\r\n FDefaultStyle := Value;\r\n Invalidate;\r\n end;\r\nend;\r\n\r\n{ TTMSFNCToolBarCustomItemPicker }\r\n\r\nfunction TTMSFNCToolBarCustomItemPicker.CanChangeText: Boolean;\r\nbegin\r\n Result := not (csLoading in ComponentState) and not (csDesigning in ComponentState);\r\nend;\r\n\r\nprocedure TTMSFNCToolBarCustomItemPicker.ChangeDPIScale(M, D: Integer);\r\nbegin\r\n inherited;\r\n {$IFDEF CMNLIB}\r\n FItemSelector.Font.Height := TTMSFNCUtils.MulDivInt(FItemSelector.Font.Height, M, D);\r\n FItemSelector.ItemHeight := TTMSFNCUtils.MulDivInt(FItemSelector.ItemHeight, M, D);\r\n {$ENDIF}\r\nend;\r\n\r\nconstructor TTMSFNCToolBarCustomItemPicker.Create(AOwner: TComponent);\r\nbegin\r\n inherited;\r\n FTimer := TTimer.Create(Self);\r\n FTimer.Interval := 1;\r\n FTimer.OnTimer := EnterTimerChanged;\r\n FTimer.Enabled := False;\r\n\r\n FEdit := TEdit.Create(Self);\r\n FEdit.TabStop := True;\r\n {$IFDEF FMXLIB}\r\n FEdit.Align := TAlignLayout.Client;\r\n FEdit.Stored := False;\r\n FEdit.OnChangeTracking := EditChange;\r\n {$ENDIF}\r\n {$IFDEF CMNWEBLIB}\r\n FEdit.Align := alClient;\r\n FEdit.OnChange := @EditChange;\r\n {$ENDIF}\r\n\r\n Width := 100;\r\n Height := 24;\r\n HorizontalTextAlign := gtaLeading;\r\n FItemIndex := -1;\r\n\r\n FItemSelector := TListBox.Create(Self);\r\n FItemSelector.Width := 200;\r\n FItemSelector.Height := 150;\r\n {$IFDEF LCLLIB}\r\n FItemSelector.ClickOnSelChange := False;\r\n {$ENDIF}\r\n {$IFDEF FMXLIB}\r\n FItemSelector.Align := TAlignLayout.Client;\r\n FItemSelector.OnItemClick := ItemSelected;\r\n {$ENDIF}\r\n {$IFDEF CMNWEBLIB}\r\n FItemSelector.Font.Height := -11;\r\n FItemSelector.Align := alClient;\r\n FItemSelector.OnClick := ItemSelected;\r\n {$ENDIF}\r\n\r\n FItemSelector.OnKeyUp := @ItemKeyUp;\r\n FItemSelector.OnKeyDown := @ItemKeyDown;\r\n\r\n DropDownControl := FItemSelector;\r\n DropDownKind := ddkDropDownButton;\r\n DropDownWidth := FItemSelector.Width;\r\n DropDownHeight := FItemSelector.Height;\r\n\r\n FItems := TStringList.Create;\r\nend;\r\n\r\ndestructor TTMSFNCToolBarCustomItemPicker.Destroy;\r\nbegin\r\n FTimer.Free;\r\n FItems.Free;\r\n inherited;\r\nend;\r\n\r\nprocedure TTMSFNCToolBarCustomItemPicker.DoEnter;\r\nbegin\r\n inherited;\r\n FTimer.Enabled := Editable;\r\nend;\r\n\r\nprocedure TTMSFNCToolBarCustomItemPicker.DoItemSelected;\r\nbegin\r\n if Assigned(FEdit) {$IFDEF CMNWEBLIB} and FEdit.HandleAllocated{$ENDIF} then\r\n begin\r\n FEdit.Text := SelectedItem;\r\n FEdit.SelStart := Length(FEdit.Text);\r\n end;\r\n\r\n if Assigned(OnItemSelected) then\r\n OnItemSelected(Self, SelectedItemIndex);\r\nend;\r\n\r\nprocedure TTMSFNCToolBarCustomItemPicker.Draw(AGraphics: TTMSFNCGraphics;\r\n ARect: TRectF);\r\nbegin\r\n if not Editable then\r\n inherited;\r\nend;\r\n\r\nprocedure TTMSFNCToolBarCustomItemPicker.DropDown;\r\nbegin\r\n inherited;\r\n if not Assigned(FPopup) then\r\n Exit;\r\n\r\n {$IFDEF CMNLIB}\r\n if Assigned(FItemSelector) then\r\n FItemSelector.Font.Height := ScalePaintValue(-11);\r\n {$ENDIF}\r\n\r\n if FPopup.IsOpen and Assigned(FItemSelector) then\r\n begin\r\n FItemSelector.ItemIndex := -1;\r\n FItemSelector.ItemIndex := SelectedItemIndex;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCToolBarCustomItemPicker.EditChange(Sender: TObject);\r\nbegin\r\n SelectedItem := FEdit.Text;\r\n if Assigned(OnEditChange) then\r\n OnEditChange(Self);\r\nend;\r\n\r\nprocedure TTMSFNCToolBarCustomItemPicker.EnterTimerChanged(Sender: TObject);\r\nbegin\r\n FEdit.SetFocus;\r\n FTimer.Enabled := False;\r\nend;\r\n\r\nfunction TTMSFNCToolBarCustomItemPicker.GetSelectedItem: String;\r\nbegin\r\n Result := '';\r\n if Assigned(FItems) and (FItemIndex >= 0) and (FItemIndex <= FItems.Count - 1) then\r\n Result := FItems[FItemIndex]\r\nend;\r\n\r\nfunction TTMSFNCToolBarCustomItemPicker.GetSelectedItemIndex: Integer;\r\nbegin\r\n Result := FItemIndex;\r\nend;\r\n\r\nfunction TTMSFNCToolBarCustomItemPicker.GetText: String;\r\nbegin\r\n if Editable then\r\n Result := FEdit.Text\r\n else\r\n Result := SelectedItem;\r\nend;\r\n\r\nprocedure TTMSFNCToolBarCustomItemPicker.HandleDialogKey(var Key: Word;\r\n Shift: TShiftState);\r\nbegin\r\n inherited;\r\n if Shift <> [] then\r\n Exit;\r\n\r\n if Editable and FEdit.IsFocused then\r\n begin\r\n case Key of\r\n KEY_F4:\r\n begin\r\n if not (ssAlt in Shift) then\r\n DropDown;\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCToolBarCustomItemPicker.InitializePopup;\r\nbegin\r\n {$IFDEF FMXLIB}\r\n FItemSelector.BeginUpdate;\r\n {$ENDIF}\r\n FItemSelector.Items.Clear;\r\n FItemSelector.Items.Assign(FItems);\r\n FItemSelector.ItemIndex := FItemIndex;\r\n {$IFDEF FMXLIB}\r\n FItemSelector.EndUpdate;\r\n {$ENDIF}\r\nend;\r\n\r\n{$IFDEF FMXLIB}\r\nprocedure TTMSFNCToolBarCustomItemPicker.ItemKeyDown(Sender: TObject; var Key: Word; var KeyChar: Char; Shift: TShiftState);\r\n{$ENDIF}\r\n{$IFDEF CMNWEBLIB}\r\nprocedure TTMSFNCToolBarCustomItemPicker.ItemKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);\r\n{$ENDIF}\r\nbegin\r\n FKeyboardUsed := True;\r\nend;\r\n\r\n{$IFDEF FMXLIB}\r\nprocedure TTMSFNCToolBarCustomItemPicker.ItemKeyUp(Sender: TObject; var Key: Word; var KeyChar: Char; Shift: TShiftState);\r\n{$ENDIF}\r\n{$IFDEF CMNWEBLIB}\r\nprocedure TTMSFNCToolBarCustomItemPicker.ItemKeyUp(Sender: TObject; var Key: Word; Shift: TShiftState);\r\n{$ENDIF}\r\nbegin\r\n if (Key = KEY_RETURN) or (Key = KEY_SPACE) then\r\n begin\r\n FItemIndex := FItemSelector.ItemIndex;\r\n if CloseOnSelection then\r\n DropDown;\r\n\r\n DoItemSelected;\r\n Invalidate;\r\n end;\r\n\r\n FKeyBoardUsed := False;\r\nend;\r\n\r\n{$IFDEF FMXLIB}\r\nprocedure TTMSFNCToolBarCustomItemPicker.ItemSelected(const Sender: TCustomListBox; const Item: TListBoxItem);\r\n{$ENDIF}\r\n{$IFDEF CMNWEBLIB}\r\nprocedure TTMSFNCToolBarCustomItemPicker.ItemSelected(Sender: TObject);\r\n{$ENDIF}\r\nbegin\r\n if FKeyBoardUsed then\r\n Exit;\r\n\r\n FItemIndex := FItemSelector.ItemIndex;\r\n if CloseOnSelection then\r\n DropDown;\r\n\r\n DoItemSelected;\r\n Invalidate;\r\nend;\r\n\r\nprocedure TTMSFNCToolBarCustomItemPicker.SelectFirstValue;\r\nbegin\r\n inherited;\r\n FItemIndex := 0;\r\n DoItemSelected;\r\n Invalidate;\r\nend;\r\n\r\nprocedure TTMSFNCToolBarCustomItemPicker.SelectLastValue;\r\nbegin\r\n inherited;\r\n FItemIndex := FItems.Count - 1;\r\n DoItemSelected;\r\n Invalidate;\r\nend;\r\n\r\nprocedure TTMSFNCToolBarCustomItemPicker.SelectNextValue;\r\nbegin\r\n inherited;\r\n if FItemIndex = -1 then\r\n FItemIndex := 0\r\n else\r\n FItemIndex := Min(FItems.Count - 1, FItemIndex + 1);\r\n\r\n DoItemSelected;\r\n Invalidate;\r\nend;\r\n\r\nprocedure TTMSFNCToolBarCustomItemPicker.SelectPreviousValue;\r\nbegin\r\n inherited;\r\n if FItemIndex = -1 then\r\n FItemIndex := 0\r\n else\r\n FItemIndex := Max(0, FItemIndex - 1);\r\n\r\n DoItemSelected;\r\n Invalidate;\r\nend;\r\n\r\nprocedure TTMSFNCToolBarCustomItemPicker.SelectValueWithCharacter(\r\n ACharacter: Char);\r\nvar\r\n I: Integer;\r\nbegin\r\n inherited;\r\n for I := 0 to Items.Count - 1 do\r\n begin\r\n if TTMSFNCUtils.MatchStrEx(ACharacter + '*', Items[I], False) then\r\n begin\r\n FItemIndex := I;\r\n DoItemSelected;\r\n Invalidate;\r\n Break;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCToolBarCustomItemPicker.SelectValueWithString(AValue: string);\r\nvar\r\n I: Integer;\r\nbegin\r\n inherited;\r\n for I := 0 to Items.Count - 1 do\r\n begin\r\n if TTMSFNCUtils.MatchStrEx(AValue + '*', Items[I], False) then\r\n begin\r\n FItemIndex := I;\r\n DoItemSelected;\r\n Invalidate;\r\n Break;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCToolBarCustomItemPicker.SetEditable(const Value: Boolean);\r\nbegin\r\n if FEditable <> Value then\r\n begin\r\n FEditable := Value;\r\n if Assigned(FEdit) then\r\n begin\r\n if FEditable then\r\n begin\r\n FEdit.Parent := Self;\r\n end\r\n else\r\n FEdit.Parent := nil;\r\n\r\n FEdit.Visible := FEditable;\r\n end;\r\n Invalidate;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCToolBarCustomItemPicker.SetItems(const Value: TStringList);\r\nbegin\r\n FItems.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCToolBarCustomItemPicker.SetSelectedItem(const Value: String);\r\nbegin\r\n FItemIndex := FItems.IndexOf(Value);\r\n Invalidate;\r\nend;\r\n\r\nprocedure TTMSFNCToolBarCustomItemPicker.SetSelectedItemIndex(\r\n const Value: Integer);\r\nbegin\r\n FItemIndex := Value;\r\n Invalidate;\r\nend;\r\n\r\n{ TTMSFNCToolBarButton }\r\n\r\nprocedure TTMSFNCToolBarButton.RegisterRuntimeClasses;\r\nbegin\r\n inherited;\r\n RegisterClass(TTMSFNCToolBarButton);\r\nend;\r\n\r\n{ TTMSFNCToolBarSeparator }\r\n\r\nprocedure TTMSFNCToolBarSeparator.RegisterRuntimeClasses;\r\nbegin\r\n inherited;\r\n RegisterClass(TTMSFNCToolBarSeparator);\r\nend;\r\n\r\n{ TTMSFNCToolBar }\r\n\r\nprocedure TTMSFNCToolBar.RegisterRuntimeClasses;\r\nbegin\r\n inherited;\r\n RegisterClass(TTMSFNCToolBar);\r\nend;\r\n\r\n{$IFDEF WEBLIB}\r\nfunction TTMSFNCToolBarControlObjectList.GetItem(\r\n Index: Integer): TTMSFNCToolBarControl;\r\nbegin\r\n Result := TTMSFNCToolBarControl(inherited Items[Index]);\r\nend;\r\n\r\nprocedure TTMSFNCToolBarControlObjectList.SetItem(Index: Integer; const Value: TTMSFNCToolBarControl);\r\nbegin\r\n inherited Items[Index] := Value;\r\nend;\r\n\r\nfunction TTMSFNCToolBarControlList.GetItem(\r\n Index: Integer): TTMSFNCToolBarControl;\r\nbegin\r\n Result := TTMSFNCToolBarControl(inherited Items[Index]);\r\nend;\r\n\r\nprocedure TTMSFNCToolBarControlList.SetItem(Index: Integer; const Value: TTMSFNCToolBarControl);\r\nbegin\r\n inherited Items[Index] := Value;\r\nend;\r\n\r\nfunction TTMSFNCControlList.GetItem(Index: Integer): TControl;\r\nbegin\r\n Result := TControl(inherited Items[Index]);\r\nend;\r\n\r\nprocedure TTMSFNCControlList.SetItem(Index: Integer; const Value: TControl);\r\nbegin\r\n inherited Items[Index] := Value;\r\nend;\r\n{$ENDIF}\r\n\r\ninitialization\r\n RegisterClass(TTMSFNCToolBarButton);\r\n {$IFDEF WEBLIB}\r\n TTMSFNCBitmap.CreateFromResource(TMSFNCTOOLBAREXPANDSVG);\r\n {$ENDIF}\r\n\r\nend.\r\n","{********************************************************************}\r\n{ written by TMS Software }\r\n{ copyright (c) 2016 - 2025 }\r\n{ Email : info@tmssoftware.com }\r\n{ Web : https://www.tmssoftware.com }\r\n{ }\r\n{ The source code is given as is. The author is not responsible }\r\n{ for any possible damage done due to the use of this code. }\r\n{ The complete source code remains property of the author and may }\r\n{ not be distributed, published, given or sold in any form as such. }\r\n{ No parts of the source code can be included in any other component }\r\n{ or application without written authorization of the author. }\r\n{********************************************************************}\r\n\r\nunit WEBLib.TMSFNCEdit;\r\n\r\n{$I WEBLib.TMSFNCDefines.inc}\r\n\r\n{$IFDEF CMNLIB}\r\n{$DEFINE CMNWEBLIB}\r\n{$ENDIF}\r\n{$IFDEF WEBLIB}\r\n{$DEFINE CMNWEBLIB}\r\n{$ENDIF}\r\n\r\n{$IFDEF FMXLIB}\r\n{$IFDEF ANDROID}\r\n{$HINTS OFF}\r\n{$IF COMPILERVERSION > 33}\r\n{$DEFINE CUSTOMMODEL}\r\n{$IFEND}\r\n{$HINTS ON}\r\n{$ENDIF}\r\n{$ENDIF}\r\n\r\ninterface\r\n\r\nuses\r\n Classes, WEBLib.TMSFNCToolBar, {%H-}WEBLib.TMSFNCToolBarRes, WEBLib.TMSFNCCustomControl, WEBLib.TMSFNCTypes,\r\n WEBLib.TMSFNCPopup, WEBLib.ExtCtrls, WEBLib.StdCtrls, WEBLib.Graphics, WEBLib.Controls, WEBLib.TMSFNCGraphicsTypes,\r\n WEBLib.TMSFNCBitmapContainer\r\n {$IFDEF FMXLIB}\r\n ,FMX.ListBox, FMX.Edit, FMX.Types\r\n {$ENDIF}\r\n {$IFNDEF WEBLIB}\r\n {$IFNDEF LCLLIB}\r\n ,UITypes, Generics.Collections\r\n {$ENDIF}\r\n {$ENDIF}\r\n {$IFDEF WEBLIB}\r\n ,web\r\n {$ENDIF}\r\n {$IFDEF LCLLIB}\r\n ,fgl\r\n {$ENDIF}\r\n {$IFDEF CUSTOMMODEL}\r\n ,WEBLib.Controls.Model\r\n {$ENDIF}\r\n ;\r\n\r\nconst\r\n MAJ_VER = 1; // Major version nr.\r\n MIN_VER = 0; // Minor version nr.\r\n REL_VER = 4; // Release nr.\r\n BLD_VER = 1; // Build nr.\r\n\r\n // version history\r\n // v1.0.0.0 : first release\r\n // v1.0.0.1 : Fixed: Issue with typing '-' with signedfloat when text is selected\r\n // v1.0.0.2 : Fixed: Issue with etSignedNumeric handling\r\n // v1.0.1.0 : New : UseValueList boolean to switch between Value and Display list when using the lookup functionality\r\n // v1.0.2.0 : New : MinimumWidth and MinimumHeight properties to defined lookup dropdown minimum size\r\n // : Fixed : Issue with escape and exiting control closing lookup window\r\n // v1.0.2.1 : Fixed : Issue with calculating size of lookup items\r\n // v1.0.2.2 : Fixed : Issue selecting lookup item entry with mouse\r\n // v1.0.2.3 : Fixed : Issue with lookup on RAD Studio 10.2 Tokyo\r\n // v1.0.2.4 : Improved : DisplayLookup method to display all values from the displaylist\r\n // v1.0.2.5 : New : LiveBindings Support\r\n // v1.0.2.6 : Fixed : Issue with binding only working on Windows\r\n // v1.0.2.7 : Fixed : Issue with copy & paste actions on VCL\r\n // v1.0.2.8 : Fixed : Behaviour of closing popup when focusing other control and moving parent form\r\n // v1.0.2.9 : Fixed : Issue with editing on TMS WEB Core\r\n // v1.0.2.10: Fixed : Issue with signed / unsigned numeric and thousand separators.\r\n // v1.0.2.11: Fixed : Issue with float type precision.\r\n // v1.0.2.12: Fixed : Issue with autocomplete and special characters\r\n // v1.0.3.0 : New : Support for high dpi\r\n // v1.0.3.1 : Fixed : Issue with etSignedNumeric type\r\n // v1.0.3.2 : Improved : Accepting negative money numbers\r\n // v1.0.3.3 : Fixed : Issue parsing negative money numbers upon exiting\r\n // v1.0.3.4 : Fixed : Lookup value not correctly updated in OnLookupNeedData event in VCL\r\n // v1.0.3.5 : Fixed : Issue pasting values\r\n // v1.0.3.6 : Fixed : Registered TTMSFNCEditButton to be observable\r\n // v1.0.3.7 : Fixed : Issue with Ctrl key not being processed\r\n // v1.0.3.8 : Improved : Auto separators, key handling and caret position in TMS WEB Core\r\n // v1.0.3.9 : Fixed : StyleElements property not found in TMS WEB Core\r\n // v1.0.4.0 : Fixed : Issue with Money edit and formatting\r\n // v1.0.4.1 : Improved : Typing etFloat, etSignedFloat, etSignedNumeric and etMoney values\r\n\r\nconst\r\n LOOKUPITEMHEIGHT = 18;\r\n\r\ntype\r\n TTMSFNCEditType = (etString, etNumeric, etSignedNumeric, etFloat, etSignedFloat, etUpperCase, etMixedCase, etLowerCase,\r\n etMoney, etHex, etAlphaNumeric, etValidChars);\r\n\r\n TTMSFNCEditPrecisionDisplay = (pdNormal, pdShortest);\r\n\r\n TTMSFNCEdit = class;\r\n\r\n TTMSFNCEditLookupSettings = class(TPersistent)\r\n private\r\n FDisplayList: TStringList;\r\n FValueList: TStringList;\r\n FDisplayCount: Integer;\r\n FColor: TTMSFNCGraphicsColor;\r\n FEnabled: Boolean;\r\n FNumChars: Integer;\r\n FCaseSensitive: Boolean;\r\n FHistory: Boolean;\r\n FMulti: Boolean;\r\n FSeparator: char;\r\n FAcceptOnTab: Boolean;\r\n FWidth: Integer;\r\n FHeight: Integer;\r\n FUseValueList: Boolean;\r\n FMinimumWidth: Integer;\r\n FMinimumHeight: Integer;\r\n procedure SetDisplayList(const Value: TStringList);\r\n procedure SetValueList(const Value: TStringList);\r\n procedure SetNumChars(const Value: Integer);\r\n procedure SetHeight(const Value: Integer);\r\n procedure SetWidth(const Value: Integer);\r\n procedure SetMinimumHeight(const Value: Integer);\r\n procedure SetMinimumWidth(const Value: Integer);\r\n protected\r\n property AcceptOnTab: boolean read FAcceptOnTab write FAcceptOnTab default False;\r\n property Color: TTMSFNCGraphicsColor read FColor write FColor default gcWhite;\r\n public\r\n constructor Create;\r\n destructor Destroy; override;\r\n procedure Assign(Source: TPersistent); override;\r\n published\r\n property CaseSensitive: Boolean read FCaseSensitive write FCaseSensitive default False;\r\n property DisplayCount: Integer read FDisplayCount write FDisplayCount default 4;\r\n property DisplayList: TStringList read FDisplayList write SetDisplayList;\r\n property Enabled: Boolean read FEnabled write FEnabled default False;\r\n property History: Boolean read FHistory write FHistory default False;\r\n property NumChars: Integer read FNumChars write SetNumChars default 2;\r\n property ValueList: TStringList read FValueList write SetValueList;\r\n property Multi: Boolean read FMulti write FMulti default False;\r\n property Separator: char read FSeparator write FSeparator;\r\n property Width: Integer read FWidth write SetWidth default 0;\r\n property Height: Integer read FHeight write SetHeight default 0;\r\n property MinimumWidth: Integer read FMinimumWidth write SetMinimumWidth default 0;\r\n property MinimumHeight: Integer read FMinimumHeight write SetMinimumHeight default 0;\r\n property UseValueList: Boolean read FUseValueList write FUseValueList default True;\r\n end;\r\n\r\n TTMSFNCEditLookupSelectEvent = procedure(Sender: TObject; var Value: string) of object;\r\n TTMSFNCEditLookupIndexSelectEvent = procedure(Sender: TObject; Index: Integer; var Value: string) of object;\r\n TTMSFNCEditLookupNeedDataEvent = procedure(Sender: TObject; Value: string; List: TStrings; var ItemIndex: integer) of object;\r\n\r\n TTMSFNCEditHexCharacterArray = array of char;\r\n\r\n TTMSFNCLookupListBoxItem = class\r\n private\r\n FIdx: Integer;\r\n public\r\n constructor Create(AIdx: Integer);\r\n property Idx: Integer read FIdx;\r\n end;\r\n\r\n {$IFDEF WEBLIB}\r\n TTMSFNCLookupList = class(TList);\r\n {$ENDIF}\r\n {$IFNDEF WEBLIB}\r\n TTMSFNCLookupList = class(TList);\r\n {$ENDIF}\r\n\r\n {$IFDEF CUSTOMMODEL}\r\n TTMSFNCCustomEditModel = class(TCustomEditModel)\r\n private\r\n FEdit: TTMSFNCEdit;\r\n protected\r\n procedure DoChange; override;\r\n end;\r\n {$ENDIF}\r\n\r\n {$IFNDEF LCLLIB}\r\n [ComponentPlatformsAttribute(TMSPlatformsWeb)]\r\n {$ENDIF}\r\n TTMSFNCEdit = class(TCustomEdit)\r\n private\r\n FLookupListBoxItems: TTMSFNCLookupList;\r\n {$IFDEF WEBLIB}\r\n FStyleElements: TStyleElements;\r\n {$ENDIF}\r\n {$IFDEF CMNWEBLIB}\r\n FAllowFocus: Boolean;\r\n {$ENDIF}\r\n {$IFDEF FMXLIB}\r\n FDoneLookupTimer: TTimer;\r\n {$ENDIF}\r\n {$IFDEF VCLLIB}\r\n FInitialize: Boolean;\r\n {$ENDIF}\r\n FLookupFormTimer: TTimer;\r\n FKeyDown: Word;\r\n FShiftState: TShiftState;\r\n FEditType: TTMSFNCEditType;\r\n FValidChars: string;\r\n FLookupList: TTMSFNCPopup;\r\n FLookupListBox: TListBox;\r\n FLookup: TTMSFNCEditLookupSettings;\r\n FOnLookupSelect: TTMSFNCEditLookupSelectEvent;\r\n FOnLookupIndexSelect: TTMSFNCEditLookupIndexSelectEvent;\r\n FSigned: Boolean;\r\n FPrefix: string;\r\n FSuffix: string;\r\n FIsModified: Boolean;\r\n FLengthLimit: smallint;\r\n FFullTextSearch: boolean;\r\n FAutoThousandSeparator: Boolean;\r\n FPrecision: smallint;\r\n FPrecisionDisplay: TTMSFNCEditPrecisionDisplay;\r\n FBlockChange: Boolean;\r\n FAllowNumericNullValue: Boolean;\r\n FAutoComplete: Boolean;\r\n FOnCloseWithEscape: TNotifyEvent;\r\n FOnLookupNeedData: TTMSFNCEditLookupNeedDataEvent;\r\n FAutoClose: Boolean;\r\n FOnLookupClose: TNotifyEvent;\r\n FOnLookupOpen: TNotifyEvent;\r\n procedure CloseLookup;\r\n procedure DoneLookup;\r\n procedure UpdateAutoComplete;\r\n procedure SetLookup(const Value: TTMSFNCEditLookupSettings);\r\n function AllowMin(ch: char): boolean;\r\n function FixedLength(s: string): Integer;\r\n procedure SetPrefix(const Value: string);\r\n procedure SetSuffix(const Value: string);\r\n procedure SetModified(const Value: Boolean);\r\n function DecimalPos: Integer;\r\n procedure AutoSeparators;\r\n function GetFloat: double;\r\n procedure SetFloat(const Value: double);\r\n procedure SetAutoThousandSeparator(const Value: Boolean);\r\n procedure SetPrecision(const Value: smallint);\r\n procedure SetPrecisionDisplay(const Value: TTMSFNCEditPrecisionDisplay);\r\n function EStrToFloat(s: string): extended;\r\n function GetInt: Integer;\r\n procedure SetInt(const Value: Integer);\r\n procedure SetEditType(const Value: TTMSFNCEditType);\r\n function IsLookupListVisible: Boolean;\r\n function GetAllowFocus: Boolean;\r\n procedure SetAllowFocus(const Value: Boolean);\r\n protected\r\n procedure SelectAfterDecimal;\r\n procedure UpdateLookup;\r\n {$IFDEF WEBLIB}\r\n class function GetVersionNumber(AMaj, AMin, ARel, ABld: ShortInt): string;\r\n function Validate(AValue: string): boolean; override;\r\n {$ENDIF}\r\n function GetVersion: String; virtual;\r\n procedure DoLookupFormTimer(Sender: TObject);\r\n {$IFDEF CUSTOMMODEL}\r\n function DefineModelClass: TDataModelClass; override;\r\n {$ENDIF}\r\n {$IFDEF FMXLIB}\r\n procedure DoDoneLookupTimer(Sender: TObject);\r\n function GetDefaultStyleLookupName: string; override;\r\n {$ENDIF}\r\n function GetT: string; virtual;\r\n function GetCaretPosition: Integer; virtual;\r\n {$IFDEF FMXLIB}\r\n procedure Change; virtual;\r\n {$ENDIF}\r\n {$IFDEF LCLLIB}\r\n function ChildClassAllowed(ChildClass: TClass): boolean; override;\r\n {$ENDIF}\r\n {$IFDEF VCLLIB}\r\n {$HINTS OFF}\r\n {$IF COMPILERVERSION > 30}\r\n procedure ChangeScale(M, D: Integer; isDpiChange: Boolean); override;\r\n {$ELSE}\r\n procedure ChangeScale(M, D: Integer); override;\r\n {$IFEND}\r\n {$HINTS ON}\r\n {$ENDIF}\r\n procedure CleanupLookupList;\r\n procedure SetCaretPosition(ACaretPosition: Integer); virtual;\r\n procedure SetT(const Value: string); virtual;\r\n procedure InsertText(const AText: string);\r\n {$IFDEF FMXLIB}\r\n procedure ListKeyUp(Sender: TObject; var Key: Word; var KeyChar: Char; Shift: TShiftState);\r\n procedure ListMouseUp(Sender: TObject; Button: TTMSFNCMouseButton; Shift: TShiftState; X, Y: Single);\r\n procedure KeyDown(var Key: Word; var KeyChar: WideChar; Shift: TShiftState); override;\r\n procedure KeyUp(var Key: Word; var KeyChar: WideChar; Shift: TShiftState); override;\r\n {$ENDIF}\r\n {$IFDEF CMNWEBLIB}\r\n procedure ListKeyUp(Sender: TObject; var Key: Word; {%H-}Shift: TShiftState);\r\n procedure ListMouseUp(Sender: TObject; {%H-}Button: TTMSFNCMouseButton; {%H-}Shift: TShiftState; {%H-}X, {%H-}Y: Integer);\r\n procedure KeyPress(var Key: Char); override;\r\n procedure KeyDown(var Key: Word; Shift: TShiftState); override;\r\n procedure KeyUp(var Key: Word; Shift: TShiftState); override;\r\n {$ENDIF}\r\n procedure DoLookupNeedData(Value: string; List: TStrings; var ItemIndex: integer); virtual;\r\n procedure DoLookupOpen; virtual;\r\n procedure DoLookupClose; virtual;\r\n procedure DoExit; override;\r\n {$IFDEF WEBLIB}\r\n function DoHandleChange(Event: TEventListenerEvent): Boolean; override;\r\n {$ENDIF}\r\n\r\n property OnCloseWithEscape: TNotifyEvent read FOnCloseWithEscape write FOnCloseWithEscape;\r\n property Signed: Boolean read FSigned write FSigned default False;\r\n property Prefix: string read FPrefix write SetPrefix;\r\n property Suffix: string read FSuffix write SetSuffix;\r\n property AutoClose: Boolean read FAutoClose write FAutoClose default True;\r\n public\r\n function LookupListbox: TListBox;\r\n function LookupList: TTMSFNCPopup;\r\n {$IFDEF CMNWEBLIB}\r\n function CanFocus: Boolean; override;\r\n {$ENDIF}\r\n constructor Create(AOwner: TComponent); override;\r\n destructor Destroy; override;\r\n procedure DisplayLookup;\r\n property Modified: Boolean read FIsModified write SetModified;\r\n property FloatValue: double read GetFloat write SetFloat;\r\n property IntValue: Integer read GetInt write SetInt;\r\n {$IFNDEF WEBLIB}\r\n property Action;\r\n {$ENDIF}\r\n {$IFDEF WEBLIB}\r\n property StyleElements: TStyleElements read FStyleElements write FStyleElements;\r\n {$ENDIF}\r\n published\r\n property AllowFocus: Boolean read GetAllowFocus write SetAllowFocus default True;\r\n {$IFDEF FMXLIB}\r\n property Cursor default crIBeam;\r\n property CanParentFocus;\r\n property DisableFocusEffect;\r\n property KeyboardType;\r\n property ReturnKeyType;\r\n property Password;\r\n property ReadOnly;\r\n property TextSettings;\r\n property ImeMode;\r\n property Position;\r\n property Width;\r\n property Height;\r\n property ClipChildren default False;\r\n property ClipParent default False;\r\n property DragMode default TDragMode.dmManual;\r\n property EnableDragHighlight default True;\r\n property Enabled default True;\r\n property Locked default False;\r\n property HitTest default True;\r\n property Hint;\r\n property HelpContext;\r\n property HelpKeyword;\r\n property HelpType;\r\n property Padding;\r\n property Opacity;\r\n property Margins;\r\n property PopupMenu;\r\n property RotationAngle;\r\n property RotationCenter;\r\n property Scale;\r\n {$WARNINGS OFF}\r\n {$HINTS OFF}\r\n {$IF COMPILERVERSION > 27}\r\n property Size;\r\n {$IFEND}\r\n {$HINTS ON}\r\n {$WARNINGS ON}\r\n property TextPrompt;\r\n property StyleLookup;\r\n property StyledSettings;\r\n property TouchTargetExpansion;\r\n property Visible default True;\r\n property Caret;\r\n property ShowHint;\r\n property KillFocusByReturn;\r\n property CheckSpelling;\r\n property OnChange;\r\n property OnChangeTracking;\r\n property OnTyping;\r\n property OnApplyStyleLookup;\r\n property OnValidating;\r\n property OnValidate;\r\n property OnDragEnter;\r\n property OnDragLeave;\r\n property OnDragOver;\r\n property OnDragDrop;\r\n property OnDragEnd;\r\n property OnKeyDown;\r\n property OnKeyUp;\r\n property OnCanFocus;\r\n property OnClick;\r\n property OnDblClick;\r\n property OnEnter;\r\n property OnExit;\r\n property OnMouseDown;\r\n property OnMouseMove;\r\n property OnMouseUp;\r\n property OnMouseWheel;\r\n property OnMouseEnter;\r\n property OnMouseLeave;\r\n property OnPainting;\r\n property OnPaint;\r\n property OnResize;\r\n {$ENDIF}\r\n {$IFDEF CMNWEBLIB}\r\n property Align;\r\n property Alignment;\r\n property Anchors;\r\n property AutoSelect;\r\n property AutoSize;\r\n property Hint;\r\n {$IFDEF LCLLIB}\r\n property BorderSpacing;\r\n {$ENDIF}\r\n {$IFDEF WEBLIB}\r\n property TextHint;\r\n {$ENDIF}\r\n {$IFDEF VCLLIB}\r\n property BevelEdges;\r\n property BevelInner;\r\n property BevelKind default bkNone;\r\n property BevelOuter;\r\n property BevelWidth;\r\n property Ctl3D;\r\n property ImeMode;\r\n property ImeName;\r\n property OEMConvert;\r\n property ParentCtl3D;\r\n property ParentDoubleBuffered;\r\n property TextHint;\r\n property Touch;\r\n {$HINTS OFF}\r\n {$IF COMPILERVERSION > 23}\r\n property StyleElements;\r\n {$IFEND}\r\n {$HINTS ON}\r\n property OnGesture;\r\n property OnMouseActivate;\r\n {$ENDIF}\r\n {$IFNDEF WEBLIB}\r\n property BiDiMode;\r\n {$ENDIF}\r\n property BorderStyle;\r\n property Color;\r\n {$IFNDEF WEBLIB}\r\n property Constraints;\r\n {$ENDIF}\r\n property DoubleBuffered;\r\n {$IFNDEF WEBLIB}\r\n property DragCursor;\r\n property DragKind;\r\n property DragMode;\r\n {$ENDIF}\r\n property Enabled;\r\n property Font;\r\n property HideSelection;\r\n property MaxLength;\r\n {$IFNDEF WEBLIB}\r\n property ParentBiDiMode;\r\n property ParentColor;\r\n property ParentFont;\r\n property ParentShowHint;\r\n {$ENDIF}\r\n property PasswordChar;\r\n {$IFNDEF WEBLIB}\r\n property PopupMenu;\r\n {$ENDIF}\r\n property ReadOnly;\r\n property ShowHint;\r\n property TabOrder;\r\n property TabStop;\r\n property Visible;\r\n property OnChange;\r\n property OnClick;\r\n {$IFNDEF WEBLIB}\r\n property OnContextPopup;\r\n {$ENDIF}\r\n property OnDblClick;\r\n {$IFNDEF WEBLIB}\r\n property OnDragDrop;\r\n property OnDragOver;\r\n property OnEndDock;\r\n property OnEndDrag;\r\n {$ENDIF}\r\n property OnEnter;\r\n property OnExit;\r\n property OnKeyDown;\r\n property OnKeyPress;\r\n property OnKeyUp;\r\n property OnMouseDown;\r\n property OnMouseEnter;\r\n property OnMouseLeave;\r\n property OnMouseMove;\r\n property OnMouseUp;\r\n {$IFNDEF WEBLIB}\r\n property OnStartDock;\r\n property OnStartDrag;\r\n {$ENDIF}\r\n {$ENDIF} \r\n\r\n property Text: string read GetT write SetT;\r\n property Version: String read GetVersion;\r\n property AutoComplete: Boolean read FAutoComplete write FAutoComplete default False;\r\n property EditType: TTMSFNCEditType read FEditType write SetEditType default etString;\r\n property Lookup: TTMSFNCEditLookupSettings read FLookup write SetLookup;\r\n property ValidChars: string read FValidChars write FValidChars;\r\n property AllowNumericNullValue: Boolean read FAllowNumericNullValue write FAllowNumericNullValue default False;\r\n property AutoThousandSeparator: Boolean read FAutoThousandSeparator write SetAutoThousandSeparator default True;\r\n property FullTextSearch: boolean read FFullTextSearch write FFullTextSearch default false;\r\n property LengthLimit: smallint read FLengthLimit write FLengthLimit default 0;\r\n property Precision: smallint read FPrecision write SetPrecision default 0;\r\n property PrecisionDisplay: TTMSFNCEditPrecisionDisplay read FPrecisionDisplay write SetPrecisionDisplay default pdNormal;\r\n property OnLookupSelect: TTMSFNCEditLookupSelectEvent read FOnLookupSelect write FOnLookupSelect;\r\n property OnLookupIndexSelect: TTMSFNCEditLookupIndexSelectEvent read FOnLookupIndexSelect write FOnLookupIndexSelect;\r\n property OnLookupNeedData: TTMSFNCEditLookupNeedDataEvent read FOnLookupNeedData write FOnLookupNeedData;\r\n property OnLookupOpen: TNotifyEvent read FOnLookupOpen write FOnLookupOpen;\r\n property OnLookupClose: TNotifyEvent read FOnLookupClose write FOnLookupClose;\r\n end;\r\n\r\n {$IFNDEF LCLLIB}\r\n [ComponentPlatformsAttribute(TMSPlatformsWeb)]\r\n {$ENDIF}\r\n TTMSFNCEditButton = class(TTMSFNCCustomControl, ITMSFNCBitmapContainer)\r\n private\r\n FBlockDropDown: Boolean;\r\n FPopup: TTMSFNCPopup;\r\n FEdit: TTMSFNCEdit;\r\n FButton: TTMSFNCToolBarDropDownButton;\r\n FPopupControl: TControl;\r\n FOnButtonClick: TNotifyEvent;\r\n FModalPopup: Boolean;\r\n FBitmap: TTMSFNCBitmap;\r\n FBitmapName: string;\r\n FButtonSize: Integer;\r\n FBitmapContainer: TTMSFNCBitmapContainer;\r\n procedure SetPopupControl(const Value: TControl);\r\n function GetText: string;\r\n procedure SetText(const Value: string);\r\n function GetBitmapContainer: TTMSFNCBitmapContainer;\r\n procedure SetBitmap(const Value: TTMSFNCBitmap);\r\n procedure SetBitmapContainer(const Value: TTMSFNCBitmapContainer);\r\n procedure SetBitmapName(const Value: String);\r\n procedure SetButtonSize(const Value: Integer);\r\n protected\r\n procedure ChangeDPIScale(M, D: Integer); override;\r\n procedure SetAdaptToStyle(const Value: Boolean); override;\r\n procedure BeforeDropDown; virtual;\r\n procedure Loaded; override;\r\n {$IFDEF FMXLIB}\r\n procedure KeyDown(var Key: Word; var KeyChar: WideChar; Shift: TShiftState); override;\r\n procedure PopupKeyDown(Sender: TObject; var Key: Word; var KeyChar: WideChar; Shift: TShiftState);\r\n {$ENDIF}\r\n {$IFDEF CMNWEBLIB}\r\n procedure KeyDown(var Key: Word; Shift: TShiftState); override;\r\n procedure PopupKeyDown(Sender: TObject; var Key: Word; {%H-}Shift: TShiftState);\r\n {$ENDIF}\r\n procedure Notification(AComponent: TComponent; Operation: TOperation); override;\r\n procedure ButtonClick(Sender: TObject);\r\n procedure ButtonDblClick(Sender: TObject);\r\n procedure BitmapChanged(Sender: TObject);\r\n public\r\n constructor Create(AOwner: TComponent); override;\r\n destructor Destroy; override;\r\n procedure DropDown; virtual;\r\n property Popup: TTMSFNCPopup read FPopup write FPopup;\r\n property Button: TTMSFNCToolBarDropDownButton read FButton;\r\n property Edit: TTMSFNCEdit read FEdit;\r\n property ModalPopup: Boolean read FModalPopup write FModalPopup default False;\r\n published\r\n property BitmapContainer: TTMSFNCBitmapContainer read GetBitmapContainer write SetBitmapContainer;\r\n property Bitmap: TTMSFNCBitmap read FBitmap write SetBitmap;\r\n property BitmapName: String read FBitmapName write SetBitmapName;\r\n property ButtonSize: Integer read FButtonSize write SetButtonSize default 18;\r\n property PopupControl: TControl read FPopupControl write SetPopupControl;\r\n property OnButtonClick: TNotifyEvent read FOnButtonClick write FOnButtonClick;\r\n published\r\n property Text: string read GetText write SetText;\r\n end;\r\n\r\nimplementation\r\n\r\nuses\r\n SysUtils, Types, WEBLib.TMSFNCUtils, Math\r\n {$IFNDEF LCLLIB}\r\n {$IFNDEF WEBLIB}\r\n ,Data.Bind.Components\r\n {$ENDIF}\r\n {$ENDIF}\r\n ;\r\n\r\ntype\r\n TTMSFNCEditAutoType = (atNumeric, atFloat, atString, atDate, atTime, atHex);\r\n TTMSFNCPopupOpen = class(TTMSFNCPopup);\r\n\r\nfunction CheckTerminator(ch: char): boolean;\r\nbegin\r\n Result := CharInArray(ch, [' ', ',', '.', '/', '\\', ':', '*', '$', '-', '(', ')', '[', ']', '\"','''','&']);\r\nend;\r\n\r\nfunction ShiftCase(AName: string): string;\r\nvar\r\n I, L: Integer;\r\n NewName: string;\r\n First: Boolean;\r\nbegin\r\n First := true;\r\n NewName := AName;\r\n L := Length(AName);\r\n\r\n {$IFDEF ZEROSTRINGINDEX}\r\n for I := 0 to L - 1 do\r\n {$ELSE}\r\n for I := 1 to L do\r\n {$ENDIF}\r\n begin\r\n if CheckTerminator(NewName[I]) then\r\n First := true\r\n else\r\n if First then\r\n begin\r\n NewName[I] := AnsiUpperCase(AName)[I];\r\n First := false;\r\n end\r\n else\r\n NewName[I] := AnsiLowerCase(AName)[I];\r\n\r\n if (Copy(NewName, 1, I) = 'Mc') or (Copy(NewName, 1, I) = 'Mac') or\r\n ((Pos(' Mc', NewName) = I - 2) and (I > 2)) or\r\n ((I > L - 3) and ((Copy(NewName, I - 1, 2) = ' I') or\r\n (Copy(NewName, I - 2, 3) = ' II'))) then\r\n First := true;\r\n end;\r\n Result := NewName;\r\nend;\r\n\r\nfunction IsType(s: string): TTMSFNCEditAutoType;\r\nvar\r\n i: Integer;\r\n isI, isF, isH: Boolean;\r\n th, de, mi: Integer;\r\nbegin\r\n Result := atString;\r\n\r\n isI := true;\r\n isF := true;\r\n isH := true;\r\n\r\n if s = '' then\r\n begin\r\n isI := false;\r\n isF := false;\r\n isH := false;\r\n end;\r\n\r\n th := -1; de := 0; mi := 0;\r\n\r\n {$IFDEF ZEROSTRINGINDEX}\r\n for i := 0 to Length(s) - 1 do\r\n {$ELSE}\r\n for i := 1 to Length(s) do\r\n {$ENDIF}\r\n begin\r\n\r\n if not CharIsNumber(s[i]) then\r\n isI := False;\r\n if not CharIsNumber(s[i]) and not CharInArray(s[i], ['.',',']) then\r\n isF := False;\r\n if not CharIsNumber(s[i]) and not CharIsLetter(s[i]) then\r\n isH := False;\r\n\r\n if (s[i] = FormatSettings.ThousandSeparator) and (i - th < 3) then isF := false;\r\n if s[i] = FormatSettings.ThousandSeparator then th := i;\r\n if s[i] = FormatSettings.DecimalSeparator then inc(de);\r\n if s[i] = '-' then inc(mi);\r\n end;\r\n\r\n if isH and not isI then\r\n Result := atHex;\r\n\r\n if isI then\r\n Result := atNumeric\r\n else\r\n begin\r\n if isF then\r\n Result := atFloat;\r\n end;\r\n\r\n if (mi > 1) or (de > 1) then\r\n Result := atString;\r\nend;\r\n\r\nfunction HexToInt(s: string): Integer;\r\nvar\r\n i: Integer;\r\n r, m: Integer;\r\n\r\n function CharVal(c: char): Integer;\r\n begin\r\n Result := 0;\r\n if ((c >= '0') and (c <= '9')) then Result := ord(c) - ord('0');\r\n if ((c >= 'A') and (c <= 'F')) then Result := ord(c) - ord('A') + 10;\r\n if ((c >= 'a') and (c <= 'f')) then Result := ord(c) - ord('a') + 10;\r\n end;\r\n\r\nbegin\r\n r := 0;\r\n m := 1;\r\n {$IFDEF FMXMOBILE}\r\n for i := Length(s) - 1 downto 0 do\r\n {$ELSE}\r\n for i := Length(s) downto 1 do\r\n {$ENDIF}\r\n begin\r\n r := r + m * CharVal(s[i]);\r\n m := m shl 4;\r\n end;\r\n Result := r;\r\nend;\r\n\r\nfunction ValStr(s: string): Integer;\r\nvar\r\n {%H-}err: Integer;\r\nbegin\r\n val(s, result, err);\r\nend;\r\n\r\nfunction CleanString(s: string): string;\r\nvar\r\n i: Integer;\r\nbegin\r\n i := pos(#13, s);\r\n if i > 0 then\r\n delete(s, i, 1);\r\n i := pos(#10, s);\r\n if i > 0 then\r\n delete(s, i, 1);\r\n i := pos(#11, s);\r\n if i > 0 then\r\n delete(s, i, 1);\r\n\r\n Result := s;\r\nend;\r\n\r\n{ TTMSFNCEdit }\r\n\r\n{$IFDEF WEBLIB}\r\nfunction TTMSFNCEdit.Validate(AValue: string): boolean;\r\nvar\r\n i: integer;\r\n kch: char;\r\n isValid: boolean;\r\nbegin\r\n inherited;\r\n Result := true;\r\n\r\n for i := 1 to Length(AValue) do\r\n begin\r\n kch := AValue[i];\r\n isValid := True;\r\n\r\n case FEditType of\r\n etNumeric:\r\n begin\r\n if not CharIsNumber(kch) then\r\n isValid := False;\r\n end;\r\n etFloat:\r\n begin\r\n if not (CharIsNumber(kch) or (kch = FormatSettings.DecimalSeparator)) then\r\n isValid := False;\r\n end;\r\n etSignedFloat, etSignedNumeric:\r\n begin\r\n if not (CharInArray(kch, ['-']) or CharIsNumber(kch) or (kch = FormatSettings.DecimalSeparator)) then\r\n isValid := False;\r\n end;\r\n etMoney:\r\n begin\r\n if not (CharIsNumber(kch) or (kch = FormatSettings.DecimalSeparator) or (kch = FormatSettings.ThousandSeparator)) then\r\n isValid := False;\r\n end;\r\n etHex:\r\n begin\r\n if not CharIsHex(kch) then\r\n isValid := False;\r\n end;\r\n etAlphaNumeric:\r\n begin\r\n if not CharIsLetterOrNumber(kch) then\r\n isValid := False;\r\n end;\r\n end;\r\n\r\n if not isValid then\r\n begin\r\n Result := false;\r\n break;\r\n end;\r\n end;\r\nend;\r\n\r\nclass function TTMSFNCEdit.GetVersionNumber(AMaj, AMin, ARel, ABld: ShortInt): string;\r\nbegin\r\n Result := '';\r\nend;\r\n{$ENDIF}\r\n\r\nfunction TTMSFNCEdit.GetVersion: String;\r\nbegin\r\n Result := GetVersionNumber(MAJ_VER, MIN_VER, REL_VER, BLD_VER);\r\nend;\r\n\r\n{$IFDEF CMNWEBLIB}\r\nfunction TTMSFNCEdit.CanFocus: Boolean;\r\nbegin\r\n Result := inherited CanFocus;\r\n Result := Result and AllowFocus;\r\nend;\r\n{$ENDIF}\r\n\r\nfunction TTMSFNCEdit.GetAllowFocus: Boolean;\r\nbegin\r\n {$IFDEF FMXLIB}\r\n Result := CanFocus;\r\n {$ENDIF}\r\n {$IFDEF CMNWEBLIB}\r\n Result := FAllowFocus;\r\n {$ENDIF}\r\nend;\r\n\r\nprocedure TTMSFNCEdit.SelectAfterDecimal;\r\nvar\r\n i: Integer;\r\nbegin\r\n i := Pos(FormatSettings.DecimalSeparator, self.Text);\r\n if (i > 0) then\r\n SelStart := i + Length(FPrefix)\r\n else\r\n SelStart := Length(FPrefix);\r\nend;\r\n\r\nprocedure TTMSFNCEdit.SetAllowFocus(const Value: Boolean);\r\nbegin\r\n {$IFDEF FMXLIB}\r\n CanFocus := Value;\r\n {$ENDIF}\r\n {$IFDEF CMNWEBLIB}\r\n FAllowFocus := Value;\r\n {$ENDIF}\r\nend;\r\n\r\nconstructor TTMSFNCEdit.Create(AOwner: TComponent);\r\nbegin\r\n inherited;\r\n FAutoClose := True;\r\n {$IFDEF CMNWEBLIB}\r\n FAllowFocus := True;\r\n {$ENDIF}\r\n {$IFDEF WEBLIB}\r\n AutoCompletion := acNone;\r\n {$ENDIF}\r\n {$IFDEF FMXLIB}\r\n FDoneLookupTimer := TTimer.Create(Self);\r\n FDoneLookupTimer.OnTimer := DoDoneLookupTimer;\r\n FDoneLookupTimer.Enabled := False;\r\n FDoneLookupTimer.Interval := 1;\r\n {$ENDIF}\r\n FLookupFormTimer := TTimer.Create(Self);\r\n FLookupFormTimer.OnTimer := DoLookupFormTimer;\r\n FLookupFormTimer.Enabled := False;\r\n FLookupFormTimer.Interval := 1;\r\n FAutoThousandSeparator := True;\r\n FLengthLimit := 0;\r\n FAutoComplete := False;\r\n FLookup := TTMSFNCEditLookupSettings.Create;\r\n\r\n FLookupListBoxItems := TTMSFNCLookupList.Create;\r\n\r\n FLookupList := TTMSFNCPopup.Create(Self);\r\n FLookupList.StaysOpen := True;\r\n\r\n FLookupListBox := TListBox.Create(Self);\r\n {$IFDEF LCLLIB}\r\n FLookupListBox.ClickOnSelChange := False;\r\n {$ENDIF}\r\n FLookupListBox.ItemHeight := LOOKUPITEMHEIGHT;\r\n FLookupListBox.OnKeyUp := @ListKeyUp;\r\n FLookupListBox.OnMouseUp := ListMouseUp;\r\n {$IFDEF FMXLIB}\r\n FLookupListBox.Align := TAlignLayout.Client;\r\n {$ENDIF}\r\n {$IFDEF CMNWEBLIB}\r\n FLookupListBox.Visible := False;\r\n FLookupListBox.Align := alClient;\r\n {$IFDEF VCLLIB}\r\n FInitialize := True;\r\n {$ELSE}\r\n AutoSize := False;\r\n {$ENDIF}\r\n {$ENDIF}\r\n\r\n FLookupList.ContentControl := FLookupListBox;\r\n FLookupList.FocusedControl := Self;\r\n\r\n {$IFDEF CUSTOMMODEL}\r\n if Model is TTMSFNCCustomEditModel then\r\n (Model as TTMSFNCCustomEditModel).FEdit := Self;\r\n {$ENDIF}\r\nend;\r\n\r\ndestructor TTMSFNCEdit.Destroy;\r\nbegin\r\n {$IFDEF FMXLIB}\r\n FDoneLookupTimer.Free;\r\n {$ENDIF}\r\n FLookupFormTimer.Free;\r\n FLookup.Free;\r\n CleanupLookupList;\r\n\r\n if Assigned(FLookupListBox) then\r\n begin\r\n FLookupListBox.Free;\r\n FLookupListBox := nil;\r\n end;\r\n\r\n FLookupListBoxItems.Free;\r\n\r\n if Assigned(FLookupList) then\r\n begin\r\n FLookupList.Free;\r\n FLookupList := nil;\r\n end;\r\n inherited;\r\nend;\r\n\r\nprocedure TTMSFNCEdit.DisplayLookup;\r\nvar\r\n i, cnt: Integer;\r\n mw, mh, tw: Integer;\r\n LookupText: string;\r\n idx: Integer;\r\n obj: TTMSFNCLookupListBoxItem;\r\nbegin\r\n if not Assigned(FLookup) or not FLookup.Enabled or not Assigned(FLookupListBox) then\r\n Exit;\r\n\r\n mh := (LOOKUPITEMHEIGHT * FLookup.DisplayCount) + 4;\r\n FLookupListBox.Parent := Self;\r\n CleanupLookupList;\r\n FLookupListBox.Items.Clear;\r\n {$IFDEF FMXLIB}\r\n FLookupListBox.NeedStyleLookup;\r\n FLookupListBox.ApplyStyleLookup;\r\n FLookupListBox.BeginUpdate;\r\n {$ENDIF}\r\n\r\n for i := 1 to FLookup.DisplayList.Count do\r\n begin\r\n obj := TTMSFNCLookupListBoxItem.Create(i - 1);\r\n FLookupListbox.Items.AddObject(CleanString(FLookup.FDisplayList.Strings[i - 1]), obj);\r\n FLookupListBoxItems.Add(obj);\r\n end;\r\n\r\n idx := 0;\r\n DoLookupNeedData(LookupText, FLookupListBox.Items, idx);\r\n cnt := FLookupListBox.Items.Count;\r\n\r\n {$IFDEF FMXLIB}\r\n FLookupListBox.EndUpdate;\r\n {$ENDIF}\r\n\r\n if (FLookup.FDisplayList.Count > 0) and (FLookupListBox.Items.Count > 0) then\r\n FLookupListBox.ItemIndex := idx;\r\n\r\n if cnt < FLookup.DisplayCount then\r\n mh := (cnt * LOOKUPITEMHEIGHT) + 4;\r\n\r\n FLookupListBox.Sorted := True;\r\n mw := 50;\r\n FLookupList.DropDownWidth := 0;\r\n\r\n if cnt > 0 then\r\n begin\r\n for i := 1 to cnt do\r\n begin\r\n tw := 0;\r\n if Assigned(FLookupListBox.Canvas) then\r\n tw := Round(FLookupListBox.Canvas.TextWidth(FLookupListBox.Items[i - 1]));\r\n\r\n if tw > mw then\r\n mw := tw;\r\n end;\r\n\r\n mw := mw + 26;\r\n end;\r\n\r\n if (FLookup.Width > 0) then\r\n mw := FLookup.Width;\r\n\r\n if (FLookup.Height > 0) then\r\n mh := FLookup.Height;\r\n\r\n FLookupList.PlacementControl := Self;\r\n\r\n if (cnt > 0) then\r\n begin\r\n FLookupList.DropDownWidth := Max(Lookup.MinimumWidth, mw);\r\n FLookupList.DropDownHeight := Max(Lookup.MinimumHeight, mh);\r\n if FLookupList.HasPopupForm then\r\n begin\r\n FLookupListBox.Parent := FLookupList.PopupForm;\r\n FLookupList.PopupForm.Width := Round(FLookupList.DropDownWidth);\r\n FLookupList.PopupForm.Height := Round(FLookupList.DropDownHeight);\r\n end;\r\n if not FLookupList.IsOpen then\r\n DoLookupOpen;\r\n FLookupList.IsOpen := True;\r\n FLookupFormTimer.Enabled := AutoClose;\r\n end\r\n else\r\n begin\r\n if FLookupList.IsOpen then\r\n DoLookupClose;\r\n FLookupList.IsOpen := False;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCEdit.DoExit;\r\nvar\r\n TT: string;\r\n OldModified: Boolean;\r\nbegin\r\n inherited;\r\n if (csLoading in ComponentState) or (csDestroying in ComponentState) then\r\n Exit;\r\n\r\n if (FPrecision >= 0) and (EditType in [etFloat, etSignedFloat, etMoney]) then\r\n begin\r\n if (self.Text <> '') or not FAllowNumericNullValue then\r\n begin\r\n OldModified := Modified;\r\n Floatvalue := self.Floatvalue;\r\n Modified := OldModified;\r\n end;\r\n end;\r\n\r\n if (EditType in [etNumeric, etSignedNumeric]) and (Self.Text = '') and not FAllowNumericNullValue then\r\n Text := '0';\r\n\r\n if (EditType in [etFloat, etSignedFloat, etMoney]) and (Self.Text = '') and not FAllowNumericNullValue then\r\n Floatvalue := 0.0;\r\n\r\n TT := Trim(Text);\r\n if FLookup.Enabled and FLookup.History and (TT <> '') then\r\n begin\r\n if FLookup.DisplayList.IndexOf(TT) = -1 then\r\n FLookup.DisplayList.Add(TT);\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCEdit.InsertText(const AText: string);\r\nvar\r\n TmpS: string;\r\nbegin\r\n if ReadOnly then\r\n Exit;\r\n\r\n TmpS := Text;\r\n System.Delete(TmpS, SelStart + 1, SelLength);\r\n System.Insert(AText, TmpS, SelStart + 1);\r\n if (MaxLength <= 0) or (Length(TmpS) <= MaxLength) then\r\n begin\r\n Text := TmpS;\r\n SetCaretPosition(SelStart + Length(AText));\r\n end;\r\n SelLength := 0;\r\nend;\r\n\r\nfunction TTMSFNCEdit.IsLookupListVisible: Boolean;\r\nbegin\r\n Result := Assigned(FLookupList) and FLookupList.IsOpen;\r\nend;\r\n\r\nprocedure TTMSFNCEdit.SetT(const Value: string);\r\nvar\r\n fmt, neg: string;\r\n f: extended;\r\n v: string;\r\nbegin\r\n v := Value;\r\n if not ((v = '') and AllowNumericNullValue) then\r\n begin\r\n case FEditType of\r\n etFloat: if not (IsType(v) in [atFloat, atNumeric]) then v := '0';\r\n etMoney: if not (IsType(v) in [atFloat, atNumeric]) then v := '0';\r\n etHex: if not (IsType(v) in [atHex, atNumeric]) then v := '0';\r\n etNumeric: if not (IsType(v) in [atNumeric]) then v := '0';\r\n end;\r\n\r\n if (PrecisionDisplay = pdNormal) then\r\n begin\r\n if ((FPrecision >= 0) or (FEditType = etMoney)) and (v <> '') then\r\n begin\r\n if (FEditType in [etMoney]) and (FPrecision >= 0) then\r\n begin\r\n if (Pos('-', value) > 0) then neg := '-' else neg := '';\r\n fmt := '%.' + IntToStr(FPrecision) + 'n';\r\n v := Format(fmt, [EStrToFloat(v)]);\r\n end;\r\n\r\n if (FEditType in [etFloat, etSignedFloat]) then\r\n begin\r\n fmt := '%.' + inttostr(FPrecision) + 'f';\r\n f := EStrToFloat(v);\r\n v := Format(fmt, [f]);\r\n end;\r\n end;\r\n end\r\n else\r\n begin\r\n if (FEditType in [etFloat, etMoney, etSignedFloat]) then\r\n begin\r\n f := EStrToFloat(v);\r\n v := Format('%g', [f]);\r\n end;\r\n end;\r\n end;\r\n\r\n if (FEditType in [etHex, etUpperCase]) then\r\n v := AnsiUpperCase(v)\r\n else if FEditType in [etLowerCase] then\r\n v := AnsiLowerCase(v);\r\n\r\n {$IFDEF WEBLIB}\r\n inherited SetText(FPrefix + v + FSuffix);\r\n {$ENDIF}\r\n {$IFNDEF WEBLIB}\r\n inherited Text := FPrefix + v + FSuffix;\r\n {$ENDIF}\r\n\r\n SetModified(False);\r\nend;\r\n\r\n{$IFDEF CUSTOMMODEL}\r\nfunction TTMSFNCEdit.DefineModelClass: TDataModelClass;\r\nbegin\r\n Result := TTMSFNCCustomEditModel;\r\nend;\r\n{$ENDIF}\r\n\r\n{$IFDEF FMXLIB}\r\nprocedure TTMSFNCEdit.DoDoneLookupTimer(Sender: TObject);\r\nbegin\r\n DoneLookup;\r\n FDoneLookupTimer.Enabled := False;\r\nend;\r\n\r\nfunction TTMSFNCEdit.GetDefaultStyleLookupName: string;\r\nbegin\r\n Result := 'editstyle';\r\nend;\r\n{$ENDIF}\r\n\r\nfunction StripThousandSep(s: string): string;\r\nbegin\r\n while (Pos(FormatSettings.ThousandSeparator, s) > 0) do\r\n Delete(s, Pos(FormatSettings.ThousandSeparator, s), 1);\r\n Result := s;\r\nend;\r\n\r\nfunction TTMSFNCEdit.FixedLength(s: string): Integer;\r\nvar\r\n i: Integer;\r\nbegin\r\n s := StripThousandSep(s);\r\n i := Pos(FormatSettings.decimalseparator, s);\r\n if (i > 0) then Result := i else Result := Length(s) + 1;\r\n\r\n if Signed and (EditType in [etFloat, etSignedFloat, etNumeric, etSignedNumeric, etMoney]) and (pos('-',s) > 0) then\r\n Result := Result - 1;\r\nend;\r\n\r\nfunction TTMSFNCEdit.AllowMin(ch: char): boolean;\r\nbegin\r\n Result := Signed and (EditType in [etFloat, etSignedFloat, etNumeric, etSignedNumeric, etMoney]) and (ch = '-');\r\nend;\r\n\r\n{$IFDEF WEBLIB}\r\nfunction TTMSFNCEdit.DoHandleChange(Event: TEventListenerEvent): Boolean;\r\nbegin\r\n inherited;\r\n\r\n if (EditType = etMoney) then\r\n AutoSeparators;\r\nend;\r\n{$ENDIF}\r\n\r\n{$IFDEF FMXLIB}\r\nprocedure TTMSFNCEdit.KeyDown(var Key: Word; var KeyChar: WideChar; Shift: TShiftState);\r\n{$ENDIF}\r\n{$IFDEF CMNWEBLIB}\r\nprocedure TTMSFNCEdit.KeyDown(var Key: Word; Shift: TShiftState);\r\nbegin\r\n inherited;\r\n FKeyDown := Key;\r\n FShiftState := Shift;\r\n end;\r\n\r\nprocedure TTMSFNCEdit.KeyPress(var Key: Char);\r\n{$ENDIF}\r\nvar\r\n oldSelStart, oldprec: Integer;\r\n s, cl, st: string;\r\n allowclip: boolean;\r\n at: TTMSFNCEditAutoType;\r\n ismod: Boolean;\r\n d: Integer;\r\n kch: Char;\r\n\r\n function ScanPrecision(s: string; inspos: Integer): Boolean;\r\n var\r\n mdist: Integer;\r\n begin\r\n Result := false;\r\n inspos := inspos - Length(FPrefix);\r\n if FPrecision <= 0 then Exit;\r\n\r\n if (Length(s) - inspos > FPrecision) then\r\n begin\r\n Result := false;\r\n exit;\r\n end;\r\n\r\n if (Pos(FormatSettings.DecimalSeparator, s) > 0) then\r\n begin\r\n mdist := Length(s) - Pos(FormatSettings.DecimalSeparator, s);\r\n if (inspos >= Pos(FormatSettings.DecimalSeparator, s)) and (mdist >= FPrecision) then\r\n Result := true;\r\n end;\r\n end;\r\n\r\n function ScanDistance(s: string; inspos: Integer): Boolean;\r\n var\r\n mdist: Integer;\r\n begin\r\n Result := false;\r\n inspos := inspos - Length(FPrefix);\r\n mdist := Length(s);\r\n\r\n if (Pos(FormatSettings.ThousandSeparator, s) = 0) then\r\n begin\r\n Result := false;\r\n Exit;\r\n end;\r\n\r\n while (Pos(FormatSettings.ThousandSeparator, s) > 0) do\r\n begin\r\n if abs(Pos(FormatSettings.ThousandSeparator, s) - inspos) < mdist then mdist := abs(Pos(FormatSettings.ThousandSeparator, s) - inspos);\r\n if (abs(Pos(FormatSettings.ThousandSeparator, s) - inspos) < 3) then\r\n begin\r\n Result := true;\r\n break;\r\n end;\r\n\r\n if inspos > Pos(FormatSettings.ThousandSeparator, s) then inspos := inspos - Pos(FormatSettings.ThousandSeparator, s);\r\n delete(s, 1, Pos(FormatSettings.ThousandSeparator, s));\r\n end;\r\n\r\n if (mdist > 3) then\r\n begin\r\n Result := true;\r\n end;\r\n end;\r\n\r\n procedure EatKey;\r\n begin\r\n {$IFDEF FMXLIB}\r\n KeyChar := #0;\r\n if not (Key in [KEY_UP, KEY_DOWN]) then\r\n Key := 0;\r\n {$ENDIF}\r\n {$IFDEF CMNWEBLIB}\r\n if not (FKeyDown in [KEY_UP, KEY_DOWN]) then\r\n Key := #0;\r\n {$ENDIF}\r\n end;\r\n\r\nbegin\r\n if not Assigned(FLookupListBox) then\r\n begin\r\n inherited;\r\n Exit;\r\n end;\r\n\r\n {$IFDEF FMXLIB}\r\n s := KeyChar;\r\n kch := KeyChar;\r\n FKeyDown := Key;\r\n FShiftState := Shift;\r\n {$ELSE}\r\n s := Key;\r\n kch := Key;\r\n {$ENDIF}\r\n\r\n if (FKeyDown = KEY_MENU) or (FKeyDown = KEY_ESCAPE) then\r\n begin\r\n CloseLookup;\r\n end;\r\n\r\n if (FKeyDown = KEY_BACK) and (FPrefix <> '') then\r\n if (SelStart <= Length(FPrefix)) and (SelLength = 0) then Exit;\r\n\r\n if (FLengthLimit > 0) and (FixedLength(self.Text) > FLengthLimit) and\r\n (SelLength = 0) and (SelStart < DecimalPos) and (FKeyDown <> KEY_BACK) and (FKeyDown <> ord(FormatSettings.decimalseparator{$IFDEF WEBLIB}[0]{$ENDIF})) and not AllowMin(kch) then\r\n begin\r\n EatKey;\r\n Exit;\r\n end;\r\n\r\n if (FKeyDown in [KEY_HOME, KEY_END, KEY_TAB, KEY_LEFT, KEY_RIGHT, KEY_PRIOR, KEY_NEXT, KEY_DELETE, KEY_BACK]) then\r\n begin\r\n if (FKeyDown = KEY_BACK) then\r\n begin\r\n s := self.Text;\r\n\r\n if SelLength = 0 then\r\n delete(s, SelStart - Length(fprefix), 1)\r\n else\r\n delete(s, Max(1, SelStart - Length(fprefix)), SelLength);\r\n\r\n ismod := (s <> Text) or Modified;\r\n Modified := ismod;\r\n\r\n inherited;\r\n\r\n if (EditType = etMoney) then\r\n AutoSeparators;\r\n\r\n if (Text = '') and ((s <> '') or ismod) then\r\n begin\r\n Change;\r\n end;\r\n\r\n Modified := ismod;\r\n\r\n UpdateLookup;\r\n Exit;\r\n end\r\n else\r\n begin\r\n if (FKeyDown in [KEY_HOME, KEY_END, KEY_TAB, KEY_LEFT, KEY_RIGHT, KEY_PRIOR, KEY_NEXT]) then\r\n begin\r\n if AutoComplete and (SelLength > 0) and IsLookupListVisible then\r\n CloseLookup;\r\n end;\r\n st := Self.Text;\r\n inherited;\r\n if Self.Text <> st then\r\n Modified := True;\r\n end;\r\n\r\n Exit;\r\n end;\r\n\r\n if (FKeyDown = KEY_RETURN) and IsLookupListVisible then\r\n begin\r\n inherited;\r\n DoneLookup;\r\n Exit;\r\n end;\r\n\r\n if (FKeyDown in [KEY_TAB, KEY_RETURN, KEY_ESCAPE]) {and IsCtrl} then\r\n begin\r\n inherited;\r\n Exit;\r\n end;\r\n\r\n if (FKeyDown = KEY_HOME) and IsLookupListVisible then\r\n begin\r\n if FLookupListBox.Items.Count > 0 then\r\n FLookupListBox.ItemIndex := 0\r\n else\r\n FLookupListBox.ItemIndex := -1;\r\n Exit;\r\n end;\r\n\r\n if (FKeyDown = KEY_END) and IsLookupListVisible then\r\n begin\r\n if FLookupListBox.Items.Count > 0 then\r\n FLookupListBox.ItemIndex := FLookupListBox.Items.Count - 1\r\n else\r\n FLookupListBox.ItemIndex := -1;\r\n Exit;\r\n end;\r\n\r\n if (FKeyDown = KEY_NEXT) and IsLookupListVisible then\r\n begin\r\n if FLookupListBox.Items.Count > 0 then\r\n begin\r\n if FLookupListBox.ItemIndex + FLookup.DisplayCount < FLookupListBox.Items.Count then\r\n FLookupListBox.ItemIndex := FLookupListBox.ItemIndex + FLookup.DisplayCount\r\n else\r\n FLookupListBox.ItemIndex := FLookupListBox.Items.Count - 1;\r\n end\r\n else\r\n FLookupListBox.ItemIndex := -1;\r\n Exit;\r\n end;\r\n\r\n if (FKeyDown = KEY_PRIOR) and IsLookupListVisible then\r\n begin\r\n if FLookupListBox.Items.Count > 0 then\r\n begin\r\n if FLookupListBox.ItemIndex > FLookup.DisplayCount then\r\n FLookupListBox.ItemIndex := FLookupListBox.ItemIndex - FLookup.DisplayCount\r\n else\r\n FLookupListBox.ItemIndex := 0;\r\n end\r\n else\r\n FLookupListBox.ItemIndex := -1;\r\n Exit;\r\n end;\r\n\r\n if (FKeyDown = KEY_UP) and IsLookupListVisible then\r\n begin\r\n if FLookupListBox.Items.Count > 0 then\r\n begin\r\n if FLookupListBox.ItemIndex > 0 then\r\n FLookupListBox.ItemIndex := FLookupListBox.ItemIndex - 1;\r\n end\r\n else\r\n FLookupListBox.ItemIndex := -1;\r\n\r\n inherited;\r\n Exit;\r\n end;\r\n\r\n if (FKeyDown = KEY_DOWN) and IsLookupListVisible then\r\n begin\r\n if FLookupListBox.Items.Count > 0 then\r\n begin\r\n if FLookupListBox.ItemIndex + 1 < FLookupListBox.Items.Count then\r\n FLookupListBox.ItemIndex := FLookupListBox.ItemIndex + 1;\r\n end\r\n else\r\n FLookupListBox.ItemIndex := -1;\r\n\r\n inherited;\r\n Exit;\r\n end;\r\n\r\n if (FKeyDown = KEY_ESCAPE) and IsLookupListVisible then\r\n begin\r\n CloseLookup;\r\n Exit;\r\n end;\r\n\r\n if (FKeyDown = KEY_DELETE) and (SelStart >= Length(FPrefix)) then\r\n begin\r\n s := self.text;\r\n if SelLength = 0 then\r\n Delete(s, SelStart - Length(fprefix) + 1, 1)\r\n else\r\n Delete(s, SelStart - Length(fprefix) + 1, SelLength);\r\n\r\n if (lengthlimit > 0) and (fixedLength(s) - 1 > lengthlimit) then\r\n begin\r\n EatKey;\r\n exit;\r\n end;\r\n SetModified(true);\r\n end;\r\n\r\n if (MaxLength > 0) and (SelLength = 0) and (Length(Text) >= MaxLength) then\r\n Exit;\r\n\r\n if (fPrefix <> '') and (SelStart < Length(fPrefix)) then\r\n SelStart := Length(fPrefix);\r\n\r\n if (FShiftState = [ssCtrl]) then\r\n begin\r\n if FKeyDown = Ord('V') then\r\n begin \r\n cl := TTMSFNCClipBoard.GetText;\r\n at := IsType(cl);\r\n\r\n allowclip := true;\r\n\r\n case FEditType of\r\n etNumeric: allowclip := at = atNumeric;\r\n etSignedNumeric: allowclip := at = atNumeric;\r\n etFloat, etSignedFloat: allowclip := at = atFloat;\r\n etUpperCase: cl := AnsiUpperCase(cl);\r\n etMixedCase: cl := Shiftcase(cl);\r\n etLowerCase: cl := AnsiLowercase(cl);\r\n etMoney: allowclip := at = atFloat;\r\n etHex: allowclip := at in [atHex, atNumeric];\r\n end;\r\n\r\n if Allowclip then\r\n InsertText(cl);\r\n end\r\n else if FKeyDown = Ord('A') then\r\n SelectAll\r\n else\r\n inherited;\r\n\r\n EatKey;\r\n Exit;\r\n end;\r\n\r\n case FEditType of\r\n etString:\r\n begin\r\n end;\r\n etNumeric:\r\n begin\r\n if not CharIsNumber(kch) then\r\n EatKey;\r\n end;\r\n etFloat, etSignedFloat:\r\n begin\r\n if ((kch = ',') and (FormatSettings.DecimalSeparator <> ',')) or ((kch = '.') and (FormatSettings.DecimalSeparator <> '.')) then\r\n begin\r\n EatKey;\r\n Exit;\r\n end;\r\n\r\n if (CharIsNumber(kch) or (kch = '.') or (kch = ',') or (kch = FormatSettings.DecimalSeparator) or (kch = FormatSettings.ThousandSeparator) or ((FEditType = etSignedFloat) and (kch = '-'))) then\r\n begin\r\n if (kch = FormatSettings.DecimalSeparator) and\r\n (Pos(FormatSettings.DecimalSeparator, self.SelText) = 0) and\r\n ((Pos(FormatSettings.DecimalSeparator, self.Text) > 0) or (FPrecision = 0)) then\r\n begin\r\n if (FPrecision > 0) then\r\n SelectAfterDecimal;\r\n\r\n {$IFDEF WEBLIB}\r\n EatKey;\r\n {$ENDIF}\r\n Exit;\r\n end;\r\n\r\n if ((kch = ',') and (Pos(',', self.Text) > 0) and (Pos(',', self.SelText) = 0)) and (kch <> FormatSettings.ThousandSeparator) then\r\n begin\r\n {$IFDEF WEBLIB}\r\n EatKey;\r\n {$ENDIF}\r\n Exit;\r\n end;\r\n\r\n if (kch = FormatSettings.ThousandSeparator) or (kch = FormatSettings.DecimalSeparator) then\r\n begin\r\n if ScanDistance(self.Text, SelStart) then\r\n begin\r\n {$IFDEF WEBLIB}\r\n EatKey;\r\n {$ENDIF}\r\n Exit;\r\n end;\r\n end;\r\n\r\n if ScanPrecision(self.text, SelStart) and (CharIsNumber(kch) or (kch = FormatSettings.DecimalSeparator)) and (SelLength = 0) then\r\n begin\r\n if (FPrecision > 0) and (SelStart - Length(FPrefix) >= Pos(FormatSettings.DecimalSeparator, self.Text))\r\n and CharIsNumber(kch) and (SelStart - Length(FPrefix) < Length(self.Text)) then\r\n begin\r\n {$IFNDEF WEBLIB}\r\n SelLength := 1;\r\n {$ENDIF}\r\n {$IFDEF WEBLIB}\r\n oldSelStart := SelStart;\r\n inherited Text := Text.Substring(0, SelStart) + kch + Text.Substring(SelStart + 1, Length(Text));\r\n SelStart := oldSelStart + 1;\r\n EatKey;\r\n Exit;\r\n {$ENDIF}\r\n end\r\n else\r\n begin\r\n {$IFDEF WEBLIB}\r\n EatKey;\r\n {$ENDIF}\r\n Exit;\r\n end;\r\n end;\r\n\r\n if (SelStart = 0) and (self.Text = '') and (kch = FormatSettings.DecimalSeparator) then\r\n begin\r\n inherited Text := '0' + FormatSettings.DecimalSeparator;\r\n SelStart := 2;\r\n SetModified(true);\r\n {$IFDEF WEBLIB}\r\n EatKey;\r\n {$ENDIF}\r\n Exit;\r\n end;\r\n\r\n if FEditType = etSignedFloat then\r\n begin\r\n if (kch = '-') and (SelLength = 0) then\r\n begin\r\n s := self.Text;\r\n oldprec := FPrecision;\r\n FPrecision := 0;\r\n oldSelStart := SelStart;\r\n\r\n if (Pos('-', s) <> 0) then\r\n begin\r\n delete(s, 1, 1);\r\n inherited Text := s + Suffix;\r\n SetModified(true);\r\n if (oldSelStart > 0) and (oldSelStart > Length(FPrefix)) then\r\n SelStart := oldSelStart - 1\r\n else\r\n SelStart := Length(Prefix);\r\n end\r\n else\r\n begin\r\n if (FloatValue <> 0) or (1 > 0) then\r\n begin\r\n inherited Text := '-' + self.Text + Suffix;\r\n SelLength := 0;\r\n SelStart := oldSelStart + 1;\r\n SetModified(true);\r\n end;\r\n end;\r\n FPrecision := oldprec;\r\n {$IFDEF WEBLIB}\r\n EatKey;\r\n {$ENDIF}\r\n Exit;\r\n end;\r\n end;\r\n end\r\n else\r\n EatKey;\r\n end;\r\n etSignedNumeric:\r\n begin\r\n if not (CharInArray(kch, ['-']) or CharIsNumber(kch)) then\r\n EatKey;\r\n\r\n {$IFDEF FMXLIB}\r\n if (Pos(FormatSettings.DecimalSeparator, Text) > 0) and (KeyChar = FormatSettings.DecimalSeparator) then\r\n {$ENDIF}\r\n {$IFDEF CMNWEBLIB}\r\n if (Pos(FormatSettings.DecimalSeparator, Text) > 0) and (Key = FormatSettings.DecimalSeparator) then\r\n {$ENDIF}\r\n EatKey;\r\n\r\n {$IFDEF FMXLIB}\r\n if (Pos('-', Text) > 0) and (KeyChar = '-') and not (SelLength = Length(Text)) then\r\n {$ENDIF}\r\n {$IFDEF CMNWEBLIB}\r\n if (Pos('-', Text) > 0) and (Key = '-') and not (SelLength = Length(Text)) then\r\n {$ENDIF}\r\n EatKey;\r\n\r\n if (kch = '-') and (SelLength = 0) then\r\n begin\r\n s := self.Text;\r\n oldSelStart := SelStart;\r\n\r\n if (Pos('-', s) <> 0) then\r\n begin\r\n delete(s, 1, 1);\r\n inherited Text := s + Suffix;\r\n SetModified(true);\r\n if (oldSelStart > 0) and (oldSelStart > Length(FPrefix)) then\r\n SelStart := oldSelStart - 1\r\n else\r\n SelStart := Length(Prefix);\r\n end\r\n else\r\n begin\r\n if (FloatValue <> 0) or (1 > 0) then\r\n begin\r\n inherited Text := '-' + self.Text + Suffix;\r\n SelLength := 0;\r\n SelStart := oldSelStart + 1;\r\n SetModified(true);\r\n end;\r\n end;\r\n {$IFDEF WEBLIB}\r\n EatKey;\r\n {$ENDIF}\r\n Exit;\r\n end;\r\n end;\r\n etUpperCase:\r\n begin\r\n s := AnsiUpperCase(s);\r\n {$IFDEF ZEROSTRINGINDEX}\r\n kch := s[0];\r\n {$ELSE}\r\n kch := s[1];\r\n {$ENDIF}\r\n\r\n {$IFDEF FMXLIB}\r\n Key := ord(kch);\r\n KeyChar := kch;\r\n {$ENDIF}\r\n {$IFDEF CMNWEBLIB}\r\n Key := kch;\r\n {$ENDIF}\r\n end;\r\n etLowerCase:\r\n begin\r\n s := AnsiLowerCase(s);\r\n {$IFDEF ZEROSTRINGINDEX}\r\n kch := s[0];\r\n {$ELSE}\r\n kch := s[1];\r\n {$ENDIF}\r\n\r\n {$IFDEF FMXLIB}\r\n Key := ord(kch);\r\n KeyChar := kch;\r\n {$ENDIF}\r\n {$IFDEF CMNWEBLIB}\r\n Key := kch;\r\n {$ENDIF}\r\n end;\r\n etMoney:\r\n begin\r\n if (kch = FormatSettings.DecimalSeparator) and ((Pos(FormatSettings.DecimalSeparator, self.Text) > 0) or (FPrecision = 0)) then\r\n begin\r\n if (FPrecision > 0) then\r\n begin\r\n if SelLength = Length(Text) then\r\n Text := '0,0';\r\n\r\n SelectAfterDecimal;\r\n {$IFDEF WEBLIB}\r\n EatKey;\r\n {$ENDIF}\r\n end;\r\n FBlockChange := false;\r\n Exit;\r\n end;\r\n\r\n if (CharIsNumber(kch) or (kch = '-')) or (kch = FormatSettings.DecimalSeparator) then\r\n begin\r\n if (kch = FormatSettings.ThousandSeparator) or (kch = FormatSettings.DecimalSeparator) then\r\n begin\r\n if ScanDistance(self.Text, SelStart) then\r\n Exit;\r\n end;\r\n\r\n if ScanPrecision(self.Text, SelStart) and (CharIsNumber(kch) or (kch = FormatSettings.DecimalSeparator)) and (SelLength = 0) then\r\n begin\r\n if (FPrecision > 0) and (SelStart - Length(FPrefix) >= Pos(FormatSettings.DecimalSeparator, self.text))\r\n and CharIsNumber(kch) and (SelStart - Length(FPrefix) < Length(self.text)) then\r\n begin\r\n SelLength := 1;\r\n end\r\n else\r\n begin\r\n {$IFDEF WEBLIB}\r\n EatKey;\r\n {$ENDIF}\r\n Exit;\r\n end;\r\n end;\r\n\r\n if (SelStart = 0) and (self.Text = '') and (kch = FormatSettings.DecimalSeparator) then\r\n begin\r\n inherited Text := '0' + FormatSettings.DecimalSeparator;\r\n SelStart := 2;\r\n SetModified(true);\r\n Exit;\r\n end;\r\n\r\n if (kch = '-') and (SelLength = 0) then\r\n begin\r\n s := self.Text;\r\n oldprec := FPrecision;\r\n FPrecision := 0;\r\n oldSelStart := SelStart;\r\n\r\n if (Pos('-', s) <> 0) then\r\n begin\r\n delete(s, 1, 1);\r\n inherited Text := s + Suffix;\r\n SetModified(true);\r\n if (oldSelStart > 0) and (oldSelStart > Length(FPrefix)) then\r\n SelStart := oldSelStart - 1\r\n else\r\n SelStart := Length(Prefix);\r\n end\r\n else\r\n begin\r\n if (FloatValue <> 0) or (1 > 0) then\r\n begin\r\n inherited Text := '-' + self.Text + Suffix;\r\n SelLength := 0;\r\n SelStart := oldSelStart + 1;\r\n SetModified(true);\r\n end;\r\n end;\r\n FPrecision := oldprec;\r\n {$IFDEF WEBLIB}\r\n EatKey;\r\n {$ENDIF}\r\n Exit;\r\n end;\r\n end\r\n else\r\n begin\r\n EatKey;\r\n Exit;\r\n end;\r\n end;\r\n etHex:\r\n begin\r\n if not CharIsHex(kch) then\r\n EatKey;\r\n end;\r\n etAlphaNumeric:\r\n begin\r\n if not CharIsLetterOrNumber(kch) then\r\n EatKey;\r\n end;\r\n etValidChars:\r\n begin\r\n if (FValidChars <> '') then\r\n if Pos(AnsiUpperCase(s), AnsiUpperCase(FValidChars)) = 0 then\r\n EatKey;\r\n end;\r\n end;\r\n\r\n s := self.Text;\r\n inherited;\r\n if self.Text <> s then\r\n Modified := True;\r\n\r\n// if (EditType in [etMoney, etSignedFloat, etSignedNumeric]) then\r\n// begin\r\n// stmin := Text;\r\n// if pos('-', stmin) > 1 then\r\n// begin\r\n// delete(stmin,Pos('-', stmin),1);\r\n// Text := '-' + stmin;\r\n// end;\r\n// end;\r\n\r\n {$IFNDEF WEBLIB}\r\n if (EditType = etMoney) then\r\n begin\r\n if (self.Text <> '') and (self.Text <> '-') and (kch <> FormatSettings.DecimalSeparator) then\r\n AutoSeparators;\r\n end;\r\n {$ENDIF}\r\n\r\n if (FEditType in [etFloat, etSignedFloat, etMoney]) then\r\n begin\r\n d := Length(Text) - Length(s);\r\n if (d > 1) then\r\n SetCaretPosition(GetCaretPosition + d);\r\n end;\r\n\r\n if FShiftState = [] then\r\n UpdateLookup;\r\nend;\r\n\r\n{$IFDEF FMXLIB}\r\nprocedure TTMSFNCEdit.KeyUp(var Key: Word; var KeyChar: Char; Shift: TShiftState);\r\n{$ENDIF}\r\n{$IFDEF CMNWEBLIB}\r\nprocedure TTMSFNCEdit.KeyUp(var Key: Word; Shift: TShiftState);\r\n{$ENDIF}\r\nvar\r\n oldSelStart: integer;\r\n kch: Char;\r\nbegin\r\n inherited;\r\n\r\n {$IFDEF FMXLIB}\r\n kch := KeyChar;\r\n {$ENDIF}\r\n {$IFDEF CMNWEBLIB}\r\n kch := Chr(Key);\r\n {$ENDIF}\r\n\r\n if not (Key in [KEY_F2, KEY_RETURN, KEY_UP, KEY_DOWN, KEY_ESCAPE]) then\r\n UpdateLookup;\r\n\r\n if (Key = KEY_TAB) and IsLookupListVisible and (Lookup.AcceptOnTab) then\r\n DoneLookup;\r\n\r\n if EditType = etMixedCase then\r\n begin\r\n oldSelStart := SelStart;\r\n Text := ShiftCase(Text);\r\n SelStart := oldSelStart;\r\n end;\r\n\r\n if (kch <> '') and (kch <> #8) then\r\n UpdateAutoComplete;\r\nend;\r\n\r\n{$IFDEF FMXLIB}\r\nprocedure TTMSFNCEdit.ListKeyUp(Sender: TObject; var Key: Word; var KeyChar: Char; Shift: TShiftState);\r\n{$ENDIF}\r\n{$IFDEF CMNWEBLIB}\r\nprocedure TTMSFNCEdit.ListKeyUp(Sender: TObject; var Key: Word; Shift: TShiftState);\r\n{$ENDIF}\r\nbegin\r\n if Key = KEY_RETURN then\r\n DoneLookup;\r\n\r\n if (Key = KEY_TAB) and (Lookup.AcceptOnTab) then\r\n DoneLookup;\r\nend;\r\n\r\n{$IFDEF FMXLIB}\r\nprocedure TTMSFNCEdit.ListMouseUp(Sender: TObject; Button: TTMSFNCMouseButton; Shift: TShiftState; X, Y: Single);\r\nbegin\r\n FDoneLookupTimer.Enabled := True;\r\n{$ENDIF}\r\n{$IFDEF CMNWEBLIB}\r\nprocedure TTMSFNCEdit.ListMouseUp(Sender: TObject; Button: TTMSFNCMouseButton; Shift: TShiftState; X, Y: Integer);\r\nbegin\r\n DoneLookup;\r\n{$ENDIF}\r\nend;\r\n\r\nfunction TTMSFNCEdit.LookupList: TTMSFNCPopup;\r\nbegin\r\n Result := FLookupList;\r\nend;\r\n\r\nfunction TTMSFNCEdit.LookupListbox: TListBox;\r\nbegin\r\n Result := FLookupListBox;\r\nend;\r\n\r\nprocedure TTMSFNCEdit.SetEditType(const Value: TTMSFNCEditType);\r\nvar\r\n at: TTMSFNCEditAutoType;\r\nbegin\r\n if FEditType <> Value then\r\n begin\r\n FEditType := Value;\r\n\r\n if (csLoading in ComponentState) then\r\n Exit;\r\n\r\n if (Text <> '') or (not AllowNumericNullValue) then\r\n begin\r\n at := IsType(self.Text);\r\n case FEditType of\r\n etHex: if not (at in [atNumeric, atHex]) then self.IntValue := 0;\r\n etNumeric, etSignedNumeric: if (at <> atNumeric) then self.IntValue := 0;\r\n etFloat, etSignedFloat, etMoney: if not (at in [atFloat, atNumeric]) then self.FloatValue := 0.0;\r\n end;\r\n end;\r\n\r\n if (csDesigning in ComponentState) and not(csLoading in ComponentState) and ((FEditType = etFloat) or (FEditType = etSignedFloat)) and (Precision = 0) then\r\n Precision := 2;\r\n end;\r\n\r\n {$IFDEF WEBLIB}\r\n case FEditType of\r\n etValidChars, etAlphaNumeric, etMoney, etString, etUpperCase, etMixedCase, etLowerCase: inherited EditType := weString;\r\n etNumeric: inherited EditType := weNumeric;\r\n etSignedNumeric: inherited EditType := weSignedNumeric;\r\n etFloat: inherited EditType := weFloat;\r\n etSignedFloat: inherited EditType := weSignedFloat;\r\n etHex: inherited EditType := weHex;\r\n end;\r\n\r\n CharCase := wecNormal;\r\n case EditType of\r\n etUpperCase: CharCase := wecUpperCase;\r\n etMixedCase: CharCase := wecMixedCase;\r\n etLowerCase: CharCase := wecLowerCase;\r\n end;\r\n {$ENDIF}\r\nend;\r\n\r\n{$IFDEF VCLLIB}\r\n{$HINTS OFF}\r\n{$IF COMPILERVERSION > 30}\r\nprocedure TTMSFNCEdit.ChangeScale(M, D: Integer; isDpiChange: Boolean);\r\n{$ELSE}\r\nprocedure TTMSFNCEdit.ChangeScale(M, D: Integer);\r\n{$IFEND}\r\nbegin\r\n inherited;\r\n if FInitialize then\r\n begin\r\n AutoSize := False;\r\n FInitialize := False;\r\n end;\r\nend;\r\n{$HINTS ON}\r\n{$ENDIF}\r\n\r\n{$IFDEF LCLLIB}\r\nfunction TTMSFNCEdit.ChildClassAllowed(ChildClass: TClass): Boolean;\r\nbegin\r\n if ChildClass = TListBox then\r\n Result := True\r\n else\r\n inherited;\r\nend;\r\n{$ENDIF}\r\n\r\n{$IFDEF FMXLIB}\r\nprocedure TTMSFNCEdit.Change;\r\nbegin\r\n if Assigned(OnChange) then\r\n OnChange(Self);\r\nend;\r\n{$ENDIF}\r\n\r\nprocedure TTMSFNCEdit.CleanupLookupList;\r\nvar\r\n I: Integer;\r\n obj: TObject;\r\nbegin\r\n if not Assigned(FLookupListBoxItems) then\r\n Exit;\r\n\r\n for I := 0 to FLookupListBoxItems.Count - 1 do\r\n begin\r\n obj := TObject(FLookupListBoxItems[I]);\r\n if Assigned(obj) then\r\n obj.Free;\r\n end;\r\n\r\n FLookupListBoxItems.Clear;\r\nend;\r\n\r\nprocedure TTMSFNCEdit.CloseLookup;\r\nbegin\r\n if CanFocus then\r\n SetFocus;\r\n\r\n if Assigned(FLookupList) then\r\n begin\r\n if FLookupList.IsOpen then\r\n DoLookupClose;\r\n FLookupList.IsOpen := False;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCEdit.DoneLookup;\r\nvar\r\n idx, vp: Integer;\r\n NewValue: string;\r\n LookupText, NewText: string;\r\n obj: TObject;\r\nbegin\r\n if not Assigned(FLookupListBox) then\r\n Exit;\r\n\r\n if (FlookupListBox.ItemIndex <> -1) then\r\n begin\r\n idx := -1;\r\n obj := FLookupListBox.Items.Objects[FlookupListBox.ItemIndex];\r\n if Assigned(obj) then\r\n idx := TTMSFNCLookupListBoxItem(obj).Idx;\r\n\r\n if ((idx >= 0) and (idx < FLookup.ValueList.Count)) and Lookup.UseValueList then\r\n NewValue := FLookup.ValueList.Strings[idx]\r\n else\r\n NewValue := FLookupListbox.Items[FLookupListBox.ItemIndex];\r\n\r\n if Assigned(FOnLookupSelect) then\r\n FOnLookupSelect(Self, NewValue);\r\n\r\n if Assigned(FOnlookupIndexSelect) then\r\n FOnLookupIndexSelect(Self, idx, NewValue);\r\n\r\n if FLookup.Multi then\r\n begin\r\n NewValue := NewValue + FLookup.Separator;\r\n LookupText := Text;\r\n NewText := '';\r\n vp := -1;\r\n while TTMSFNCUtils.VarPos(FLookup.Separator, LookupText, vp) > 0 do\r\n begin\r\n NewText := NewText + Copy(LookupText, 1, vp);\r\n Delete(LookupText, 1, vp);\r\n end;\r\n Text := NewText + NewValue;\r\n\r\n end\r\n else\r\n Text := NewValue;\r\n\r\n if FLookup.Multi then\r\n SelStart := length(Text)\r\n else\r\n SelectAll;\r\n\r\n\r\n CloseLookup;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCEdit.SetLookup(const Value: TTMSFNCEditLookupSettings);\r\nbegin\r\n FLookup.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCEdit.DoLookupFormTimer(Sender: TObject);\r\nbegin\r\n if not Assigned(FLookupList) or not Assigned(FLookupListBox) then\r\n begin\r\n FLookupFormTimer.Enabled := False;\r\n Exit;\r\n end;\r\n\r\n if Assigned(TTMSFNCPopupOpen(FLookupList).PopupForm) then\r\n TTMSFNCPopupOpen(FLookupList).PopupForm.ApplyPlacement;\r\n\r\n if not FLookupList.IsOpen or (not IsFocused and not (FLookupList.IsFocused) and not {$IFDEF FMXLIB}FLookupListBox.IsFocused{$ELSE}FLookupListBox.Focused{$ENDIF}) then\r\n begin\r\n if LookupList.IsOpen then\r\n DoLookupClose;\r\n FLookupList.IsOpen := False;\r\n FLookupFormTimer.Enabled := False;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCEdit.DoLookupNeedData(Value: string; List: TStrings; var ItemIndex: integer);\r\nbegin\r\n if Assigned(OnLookupNeedData) then\r\n OnLookupNeedData(Self, Value, List, ItemIndex);\r\nend;\r\n\r\nprocedure TTMSFNCEdit.DoLookupOpen;\r\nbegin\r\n if Assigned(OnLookupOpen) then\r\n OnLookupOpen(Self);\r\nend;\r\n\r\nprocedure TTMSFNCEdit.DoLookupClose;\r\nbegin\r\n if Assigned(OnLookupClose) then\r\n OnLookupClose(Self);\r\nend;\r\n\r\nprocedure TTMSFNCEdit.UpdateLookup;\r\nvar\r\n i, cnt: Integer;\r\n mw, mh, tw, vp: Integer;\r\n LookupText: string;\r\n ismatch: Boolean;\r\n idx: Integer;\r\n obj: TTMSFNCLookupListBoxItem;\r\nbegin\r\n if not Assigned(FLookup) or not FLookup.Enabled or not Assigned(FLookupListBox) then\r\n Exit;\r\n\r\n if FLookup.Multi then\r\n begin\r\n LookupText := Text;\r\n vp := -1;\r\n while TTMSFNCUtils.VarPos(FLookup.Separator, LookupText, vp) > 0 do\r\n Delete(LookupText, 1, vp);\r\n end\r\n else\r\n LookupText := Text;\r\n\r\n if Length(LookupText) >= FLookup.NumChars then\r\n begin\r\n mh := (LOOKUPITEMHEIGHT * FLookup.DisplayCount) + 4;\r\n FLookupListBox.Parent := Self;\r\n CleanupLookupList;\r\n FLookupListBox.Items.Clear;\r\n {$IFDEF FMXLIB}\r\n FLookupListBox.NeedStyleLookup;\r\n FLookupListBox.ApplyStyleLookup;\r\n FLookupListBox.BeginUpdate;\r\n {$ENDIF}\r\n\r\n for i := 1 to FLookup.DisplayList.Count do\r\n begin\r\n if FLookup.CaseSensitive then\r\n begin\r\n if Pos(LookupText, FLookup.FDisplayList.Strings[i - 1]) = 1 then\r\n begin\r\n obj := TTMSFNCLookupListBoxItem.Create(i - 1);\r\n FLookupListbox.Items.AddObject(CleanString(FLookup.FDisplayList.Strings[i - 1]), obj);\r\n FLookupListBoxItems.Add(obj);\r\n end;\r\n end\r\n else\r\n begin\r\n vp := Pos(AnsiUpperCase(LookupText), AnsiUpperCase(FLookup.FDisplayList.Strings[i - 1]));\r\n\r\n if FullTextSearch then\r\n ismatch := vp > 0\r\n else\r\n ismatch := vp = 1;\r\n\r\n if ismatch then\r\n begin\r\n obj := TTMSFNCLookupListBoxItem.Create(i - 1);\r\n FLookupListbox.Items.AddObject(CleanString(FLookup.FDisplayList.Strings[i - 1]), obj);\r\n FLookupListBoxItems.Add(obj);\r\n end;\r\n end;\r\n end;\r\n\r\n idx := 0;\r\n DoLookupNeedData(LookupText, FLookupListBox.Items, idx);\r\n cnt := FLookupListBox.Items.Count;\r\n\r\n {$IFDEF FMXLIB}\r\n FLookupListBox.EndUpdate;\r\n {$ENDIF}\r\n\r\n if (FLookup.FDisplayList.Count > 0) and (FLookupListBox.Items.Count > 0) then\r\n FLookupListBox.ItemIndex := idx;\r\n\r\n if cnt < FLookup.DisplayCount then\r\n mh := (cnt * LOOKUPITEMHEIGHT) + 4;\r\n\r\n FLookupListBox.Sorted := True;\r\n mw := 50;\r\n FLookupList.DropDownWidth := 0;\r\n\r\n if cnt > 0 then\r\n begin\r\n for i := 1 to cnt do\r\n begin\r\n tw := 0;\r\n if Assigned(FLookupListBox.Canvas) then\r\n tw := Round(FLookupListBox.Canvas.TextWidth(FLookupListBox.Items[i - 1]));\r\n\r\n if tw > mw then\r\n mw := tw;\r\n end;\r\n\r\n mw := mw + 26;\r\n end;\r\n\r\n if (FLookup.Width > 0) then\r\n mw := FLookup.Width;\r\n\r\n if (FLookup.Height > 0) then\r\n mh := FLookup.Height;\r\n\r\n FLookupList.PlacementControl := Self;\r\n\r\n if (cnt > 0) then\r\n begin\r\n FLookupList.DropDownWidth := Max(Lookup.MinimumWidth, mw);\r\n FLookupList.DropDownHeight := Max(Lookup.MinimumHeight, mh);\r\n if FLookupList.HasPopupForm then\r\n begin\r\n FLookupListBox.Parent := FLookupList.PopupForm;\r\n FLookupList.PopupForm.Width := Round(FLookupList.DropDownWidth);\r\n FLookupList.PopupForm.Height := Round(FLookupList.DropDownHeight);\r\n end;\r\n if not FLookupList.IsOpen then\r\n DoLookupOpen;\r\n FLookupList.IsOpen := True;\r\n FLookupFormTimer.Enabled := AutoClose;\r\n end\r\n else\r\n begin\r\n if FLookupList.IsOpen then\r\n DoLookupClose;\r\n FLookupList.IsOpen := False;\r\n end;\r\n end\r\n else\r\n begin\r\n if FLookupList.IsOpen then\r\n DoLookupClose;\r\n FLookupList.IsOpen := False;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCEdit.UpdateAutoComplete;\r\nvar\r\n s, ms: string;\r\n i, vp: Integer;\r\nbegin\r\n if not AutoComplete then\r\n Exit;\r\n\r\n s := Text;\r\n ms := '';\r\n if Length(s) >= 1 then\r\n begin\r\n for i := 1 to FLookup.DisplayList.Count do\r\n begin\r\n if FLookup.CaseSensitive then\r\n begin\r\n if Pos(s, FLookup.FDisplayList.Strings[i - 1]) = 1 then\r\n begin\r\n ms := FLookup.FDisplayList.Strings[i - 1];\r\n Break;\r\n end;\r\n end\r\n else\r\n begin\r\n vp := Pos(AnsiUpperCase(s), AnsiUpperCase(FLookup.FDisplayList.Strings[i - 1]));\r\n if (vp = 1) then\r\n begin\r\n ms := FLookup.FDisplayList.Strings[i - 1];\r\n Break;\r\n end;\r\n end;\r\n end;\r\n\r\n if (ms <> '') then\r\n begin\r\n Text := CleanString(ms);\r\n SelStart := Length(s);\r\n SelLength := Length(Text) - SelStart;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCEdit.SetPrefix(const Value: string);\r\nbegin\r\n FPrefix := Value;\r\nend;\r\n\r\nprocedure TTMSFNCEdit.SetSuffix(const Value: string);\r\nbegin\r\n FSuffix := Value;\r\nend;\r\n\r\nprocedure TTMSFNCEdit.SetModified(const Value: Boolean);\r\nbegin\r\n if csLoading in ComponentState then\r\n Exit;\r\n\r\n if ReadOnly then\r\n Exit;\r\n\r\n FIsModified := value;\r\nend;\r\n\r\nfunction TTMSFNCEdit.DecimalPos: Integer;\r\nvar\r\n i: Integer;\r\nbegin\r\n i := Pos(FormatSettings.decimalseparator, self.text);\r\n if (i = 0) then Result := Length(fprefix) + Length(self.text) + Length(fSuffix) + 1\r\n else Result := Length(fPrefix) + i;\r\nend;\r\n\r\nprocedure TTMSFNCEdit.AutoSeparators;\r\nvar\r\n s, si, neg: string;\r\n d: Double;\r\n Diffl, OldSelStart, OldPrec: Integer;\r\n {$IFNDEF WEBLIB}\r\n cp: Boolean;\r\n {$ENDIF}\r\nbegin\r\n {$IFNDEF WEBLIB}\r\n cp := False;\r\n if not Assigned(Parent) then\r\n begin\r\n cp := True;\r\n Parent := TTMSFNCUtils.GetOwnerForm(Self);\r\n end;\r\n {$ENDIF}\r\n\r\n s := self.Text;\r\n Diffl := Length(s);\r\n\r\n if SelLength = 0 then\r\n OldSelStart := SelStart\r\n else\r\n OldSelStart := SelStart + SelLength;\r\n\r\n if (s = '') then\r\n Exit;\r\n\r\n if (Pos('-', s) = 1) then\r\n begin\r\n Delete(s, 1, 1);\r\n neg := '-';\r\n end\r\n else\r\n neg := '';\r\n\r\n if (Pos(FormatSettings.DecimalSeparator, s) > 0) then\r\n s := Copy(s, Pos(FormatSettings.DecimalSeparator, s), 255)\r\n else\r\n s := '';\r\n\r\n d := Trunc(Abs(self.FloatValue));\r\n\r\n if FAutoThousandSeparator then\r\n si := Format('%n', [d])\r\n else\r\n si := Format('%f', [d]);\r\n\r\n si := Copy(si, 1, Pos(FormatSettings.decimalseparator, si) - 1);\r\n\r\n OldPrec := FPrecision;\r\n FPrecision := 0;\r\n\r\n FBlockChange := (Text <> FPrefix + neg + si + s + FSuffix);\r\n\r\n if FBlockChange then\r\n begin\r\n {$IFDEF WEBLIB}\r\n inherited SetText(FPrefix + neg + si + s + fSuffix);\r\n {$ENDIF}\r\n {$IFNDEF WEBLIB}\r\n inherited Text := FPrefix + neg + si + s + fSuffix;\r\n {$ENDIF}\r\n end;\r\n\r\n FBlockChange := false;\r\n\r\n FPrecision := OldPrec;\r\n\r\n Diffl := Length(self.Text) - Diffl;\r\n\r\n SelStart := OldSelStart + Diffl;\r\n SelLength := 0;\r\n\r\n {$IFNDEF WEBLIB}\r\n if cp then\r\n Parent := nil;\r\n {$ENDIF}\r\nend;\r\n\r\nprocedure TTMSFNCEdit.SetAutoThousandSeparator(const Value: Boolean);\r\nbegin\r\n FAutoThousandSeparator := Value;\r\n if FEditType in [etNumeric, etSignedNumeric, etMoney, etFloat, etSignedFloat] then AutoSeparators;\r\nend;\r\n\r\nprocedure TTMSFNCEdit.SetCaretPosition(ACaretPosition: Integer);\r\nbegin\r\n {$IFDEF FMXLIB}\r\n CaretPosition := ACaretPosition;\r\n {$ENDIF}\r\n {$IFDEF CMNWEBLIB}\r\n SelStart := ACaretPosition;\r\n SelLength := 0;\r\n {$ENDIF}\r\nend;\r\n\r\nprocedure TTMSFNCEdit.SetFloat(const Value: double);\r\nvar\r\n s:string;\r\nbegin\r\n case FEditType of\r\n etHex: self.Text := IntToHex(trunc(value), 0);\r\n etNumeric, etSignedNumeric:\r\n if (FPrecision >= 0) then\r\n self.Text := Format('%.' + inttostr(FPrecision) + 'n', [value])\r\n else\r\n self.Text := Format('%g', [Value]);\r\n etFloat, etSignedFloat, etString:\r\n if (FPrecision >= 0) then\r\n begin\r\n s := Format('%.' + inttostr(FPrecision) + 'f', [value]);\r\n self.Text := s;\r\n end\r\n else\r\n self.Text := Format('%g', [Value]);\r\n etMoney:\r\n begin\r\n if (FPrecision >= 0) then\r\n self.Text := Format('%.' + inttostr(FPrecision) + 'f', [value]) else self.Text := Format('%g', [Value]);\r\n AutoSeparators;\r\n end;\r\n end;\r\n SetModified(True);\r\nend;\r\n\r\nfunction TTMSFNCEdit.GetCaretPosition: Integer;\r\nbegin\r\n {$IFDEF FMXLIB}\r\n Result := CaretPosition;\r\n {$ENDIF}\r\n {$IFDEF CMNWEBLIB}\r\n Result := SelStart;\r\n {$ENDIF}\r\nend;\r\n\r\nfunction TTMSFNCEdit.GetFloat: double;\r\nvar\r\n s: string;\r\nbegin\r\n Result := 0;\r\n case FEditType of\r\n etHex: if self.Text <> '' then Result := HexToInt(self.Text);\r\n etString:\r\n begin\r\n //val(self.Text, d, e);\r\n Result := EStrToFloat(self.Text);\r\n end;\r\n etNumeric, etFloat, etSignedFloat, etSignedNumeric:\r\n if (self.Text <> '') then\r\n begin\r\n s := self.Text;\r\n if (s = '-') then\r\n Result := 0\r\n else\r\n Result := EStrToFloat(s);\r\n end;\r\n etMoney:\r\n if self.Text <> '' then\r\n begin\r\n s := StripThousandSep(self.Text);\r\n if (Pos(FormatSettings.Decimalseparator, s) = Length(s)) then Delete(s, Pos(FormatSettings.DecimalSeparator, s), 1);\r\n if (s = '') or (s = '-') then Result := 0 else\r\n Result := EStrToFloat(s);\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCEdit.SetPrecision(const Value: smallint);\r\nvar\r\n at: TTMSFNCEditAutoType;\r\nbegin\r\n if (FPrecision <> value) and (editType in [etFloat, etSignedFloat, etMoney, etString]) then\r\n begin\r\n FPrecision := Value;\r\n if (Text <> '') or (not AllowNumericNullValue) then\r\n begin\r\n at := IsType(self.text);\r\n if (at in [atFloat, atNumeric]) then\r\n FloatValue := FloatValue\r\n else\r\n FloatValue := 0.0;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCEdit.SetPrecisionDisplay(const Value: TTMSFNCEditPrecisionDisplay);\r\nbegin\r\n if (FPrecisionDisplay <> Value) then\r\n begin\r\n FPrecisionDisplay := Value;\r\n FloatValue := FloatValue;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCEdit.EStrToFloat(s: string): extended;\r\nbegin\r\n Result := 0;\r\n\r\n if Pos(FormatSettings.ThousandSeparator, s) > 0 then\r\n s := StripThousandSep(s);\r\n\r\n if (FPrecision > 0) and (Length(s) > FPrecision) then\r\n if s[Length(s){$IFDEF ZEROSTRINGINDEX}-1{$ENDIF} - FPrecision] = FormatSettings.Thousandseparator{$IFDEF WEBLIB}[0]{$ENDIF} then\r\n s[Length(s){$IFDEF ZEROSTRINGINDEX}-1{$ENDIF} - FPrecision] := FormatSettings.Decimalseparator{$IFDEF WEBLIB}[0]{$ENDIF};\r\n try\r\n TryStrToFloat(s, Result);\r\n except\r\n Result := 0;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCEdit.GetInt: Integer;\r\nbegin\r\n Result := 0;\r\n case FEditType of\r\n etHex: if (self.Text <> '') then Result := HexToInt(self.Text);\r\n etSignedNumeric, etNumeric, etSignedFloat, etFloat: Result := ValStr(self.Text);\r\n etMoney: Result := ValStr(StripThousandSep(self.Text));\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCEdit.GetT: string;\r\nvar\r\n s: string;\r\nbegin\r\n {$IFDEF WEBLIB}\r\n s := inherited GetText;\r\n {$ENDIF}\r\n {$IFNDEF WEBLIB}\r\n s := inherited Text;\r\n {$ENDIF}\r\n if (fPrefix <> '') and (Pos(AnsiUpperCase(fPrefix), AnsiUpperCase(s)) = 1) then delete(s, 1, Length(fPrefix));\r\n if (fSuffix <> '') then delete(s, Length(s) - Length(fSuffix) + 1, Length(fSuffix));\r\n Result := s;\r\nend;\r\n\r\nprocedure TTMSFNCEdit.SetInt(const Value: Integer);\r\nbegin\r\n case FEditType of\r\n etHex: self.Text := IntToHex(value, 0);\r\n etSignedNumeric, etNumeric, etSignedFloat, etFloat: self.Text := Inttostr(value);\r\n etMoney:\r\n begin\r\n self.Text := IntToStr(value);\r\n AutoSeparators;\r\n end;\r\n end;\r\n SetModified(True);\r\nend;\r\n\r\n{ TTMSFNCEditLookupSettings }\r\n\r\nprocedure TTMSFNCEditLookupSettings.Assign(Source: TPersistent);\r\nbegin\r\n if (Source is TTMSFNCEditLookupSettings) then\r\n begin\r\n FAcceptOnTab := (Source as TTMSFNCEditLookupSettings).AcceptOnTab;\r\n FCaseSensitive := (Source as TTMSFNCEditLookupSettings).CaseSensitive;\r\n FColor := (Source as TTMSFNCEditLookupSettings).Color;\r\n FDisplayCount := (Source as TTMSFNCEditLookupSettings).DisplayCount;\r\n FDisplayList.Assign((Source as TTMSFNCEditLookupSettings).DisplayList);\r\n FEnabled := (Source as TTMSFNCEditLookupSettings).Enabled;\r\n FHistory := (Source as TTMSFNCEditLookupSettings).History;\r\n FNumChars := (Source as TTMSFNCEditLookupSettings).NumChars;\r\n FValueList.Assign((Source as TTMSFNCEditLookupSettings).ValueList);\r\n FMulti := (Source as TTMSFNCEditLookupSettings).Multi;\r\n FSeparator := (Source as TTMSFNCEditLookupSettings).Separator;\r\n FWidth := (Source as TTMSFNCEditLookupSettings).Width;\r\n FHeight := (Source as TTMSFNCEditLookupSettings).Height;\r\n FMinimumWidth := (Source as TTMSFNCEditLookupSettings).MinimumWidth;\r\n FMinimumHeight := (Source as TTMSFNCEditLookupSettings).MinimumHeight;\r\n FUseValueList := (Source as TTMSFNCEditLookupSettings).UseValueList;\r\n end;\r\nend;\r\n\r\nconstructor TTMSFNCEditLookupSettings.Create;\r\nbegin\r\n inherited Create;\r\n FUseValueList := True;\r\n FWidth := 0;\r\n FMinimumWidth := 0;\r\n FHeight := 0;\r\n FMinimumHeight := 0;\r\n FDisplayList := TStringList.Create;\r\n FDisplayList.Sorted := true;\r\n FDisplayList.Duplicates := dupIgnore;\r\n FValueList := TStringList.Create;\r\n FColor := gcWhite;\r\n FDisplayCount := 4;\r\n FNumChars := 2;\r\n FEnabled := False;\r\n FSeparator := ';';\r\nend;\r\n\r\ndestructor TTMSFNCEditLookupSettings.Destroy;\r\nbegin\r\n FValueList.Free;\r\n FDisplayList.Free;\r\n inherited;\r\nend;\r\n\r\nprocedure TTMSFNCEditLookupSettings.SetDisplayList(const Value: TStringList);\r\nbegin\r\n FDisplayList.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCEditLookupSettings.SetHeight(const Value: Integer);\r\nbegin\r\n FHeight := Value;\r\nend;\r\n\r\nprocedure TTMSFNCEditLookupSettings.SetMinimumHeight(const Value: Integer);\r\nbegin\r\n FMinimumHeight := Value;\r\nend;\r\n\r\nprocedure TTMSFNCEditLookupSettings.SetMinimumWidth(const Value: Integer);\r\nbegin\r\n FMinimumWidth := Value;\r\nend;\r\n\r\nprocedure TTMSFNCEditLookupSettings.SetNumChars(const Value: Integer);\r\nbegin\r\n if Value > 0 then\r\n FNumChars := Value\r\nend;\r\n\r\nprocedure TTMSFNCEditLookupSettings.SetValueList(const Value: TStringList);\r\nbegin\r\n FValueList.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCEditLookupSettings.SetWidth(const Value: Integer);\r\nbegin\r\n FWidth := Value;\r\nend;\r\n\r\n{ TTMSFNCEditButton }\r\n\r\n{$IFDEF FMXLIB}\r\nprocedure TTMSFNCEditButton.KeyDown(var Key: Word; var KeyChar: WideChar; Shift: TShiftState);\r\n{$ENDIF}\r\n{$IFDEF CMNWEBLIB}\r\nprocedure TTMSFNCEditButton.KeyDown(var Key: Word; Shift: TShiftState);\r\n{$ENDIF}\r\nbegin\r\n inherited;\r\n if Key = KEY_F4 then\r\n begin\r\n DropDown;\r\n Exit;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCEditButton.Notification(AComponent: TComponent;\r\n Operation: TOperation);\r\nbegin\r\n if (Operation = opRemove) and (AComponent = FPopupControl) then\r\n FPopupControl := nil;\r\n\r\n if (Operation = opRemove) and (AComponent = FBitmapContainer) then\r\n FBitmapContainer := nil;\r\n inherited;\r\nend;\r\n\r\n{$IFDEF FMXLIB}\r\nprocedure TTMSFNCEditButton.PopupKeyDown(Sender: TObject; var Key: Word; var KeyChar: WideChar; Shift: TShiftState);\r\n{$ENDIF}\r\n{$IFDEF CMNWEBLIB}\r\nprocedure TTMSFNCEditButton.PopupKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);\r\n{$ENDIF}\r\nbegin\r\n case Key of\r\n KEY_RETURN:\r\n begin\r\n DropDown;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCEditButton.SetAdaptToStyle(const Value: Boolean);\r\nbegin\r\n inherited;\r\n if Assigned(FButton) then\r\n FButton.AdaptToStyle := AdaptToStyle;\r\nend;\r\n\r\nprocedure TTMSFNCEditButton.SetBitmap(const Value: TTMSFNCBitmap);\r\nbegin\r\n FBitmap := Value;\r\n if Assigned(FButton) then\r\n begin\r\n FButton.Bitmaps.Clear;\r\n FButton.Bitmaps.AddBitmap(Value);\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCEditButton.SetBitmapContainer(\r\n const Value: TTMSFNCBitmapContainer);\r\nbegin\r\n FBitmapContainer := Value;\r\n if Assigned(FButton) then\r\n FButton.BitmapContainer := Value;\r\nend;\r\n\r\nprocedure TTMSFNCEditButton.SetBitmapName(const Value: String);\r\nbegin\r\n FBitmapName := Value;\r\n if Assigned(FButton) then\r\n begin\r\n FButton.Bitmaps.Clear;\r\n FButton.Bitmaps.AddBitmapName(Value);\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCEditButton.SetButtonSize(const Value: Integer);\r\nbegin\r\n FButtonSize := Value;\r\n if Assigned(FButton) then\r\n FButton.Width := Value;\r\nend;\r\n\r\nprocedure TTMSFNCEditButton.SetPopupControl(const Value: TControl);\r\nbegin\r\n FPopupControl := Value;\r\n FPopup.ContentControl := FPopupControl;\r\nend;\r\n\r\nprocedure TTMSFNCEditButton.SetText(const Value: string);\r\nbegin\r\n FEdit.Text := Value;\r\nend;\r\n\r\nprocedure TTMSFNCEditButton.BeforeDropDown;\r\nbegin\r\n\r\nend;\r\n\r\nprocedure TTMSFNCEditButton.BitmapChanged(Sender: TObject);\r\nbegin\r\n if Assigned(FButton) then\r\n begin\r\n FButton.Bitmaps.Clear;\r\n FButton.Bitmaps.AddBitmap(Bitmap);\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCEditButton.ButtonClick(Sender: TObject);\r\nbegin\r\n if not FBlockDropDown then\r\n DropDown;\r\n\r\n FBlockDropDown := False;\r\n\r\n if Assigned(OnButtonClick) then\r\n OnButtonClick(Self);\r\nend;\r\n\r\nprocedure TTMSFNCEditButton.ButtonDblClick(Sender: TObject);\r\nbegin\r\n FBlockDropDown := True;\r\nend;\r\n\r\nprocedure TTMSFNCEditButton.ChangeDPISCale(M, D: Integer);\r\nbegin\r\n inherited;\r\n ButtonSize := TTMSFNCUtils.MulDivInt(FButtonSize, M, D);\r\nend;\r\n\r\nconstructor TTMSFNCEditButton.Create(AOwner: TComponent);\r\nbegin\r\n inherited;\r\n FModalPopup := False;\r\n FButton := TTMSFNCToolBarDropDownButton.Create(Self);\r\n FButton.TabStop := False;\r\n FButton.AllowFocus := False;\r\n FButton.Stored := False;\r\n FButton.Width := 18;\r\n FButton.Appearance.Rounding := 0;\r\n {$IFDEF CMNWEBLIB}\r\n FButton.Align := alRight;\r\n {$ENDIF}\r\n {$IFDEF FMXLIB}\r\n FButton.Align := TAlignLayout.Right;\r\n {$ENDIF}\r\n FButton.Parent := Self;\r\n FButton.OnClick := ButtonClick;\r\n FButton.OnDblClick := ButtonDblClick;\r\n\r\n FButton.Bitmaps.AddBitmapFromResource(TMSFNCTOOLBAREXPAND, HInstance, 1.0);\r\n FButton.Bitmaps.AddBitmapFromResource(TMSFNCTOOLBAREXPANDLARGE, HInstance, 1.5);\r\n FButton.DisabledBitmaps.AddBitmapFromResource(TMSFNCTOOLBAREXPAND, HInstance, 1.0);\r\n FButton.DisabledBitmaps.AddBitmapFromResource(TMSFNCTOOLBAREXPANDLARGE, HInstance, 1.5);\r\n\r\n FEdit := TTMSFNCEdit.Create(Self);\r\n {$IFDEF FMXLIB}\r\n FEdit.Stored := False;\r\n {$ENDIF}\r\n FEdit.Parent := Self;\r\n {$IFDEF CMNWEBLIB}\r\n FEdit.Align := alClient;\r\n {$ENDIF}\r\n {$IFDEF FMXLIB}\r\n FEdit.Align := TAlignLayout.Client;\r\n {$ENDIF}\r\n FPopup := TTMSFNCPopup.Create(Self);\r\n FPopup.Placement := ppBottom;\r\n FPopup.Stored := False;\r\n FPopup.DragWithParent := True;\r\n FPopup.Width := 240;\r\n FPopup.Height := 160;\r\n\r\n FButtonSize := 18;\r\n FBitmap := TTMSFNCBitmap.Create;\r\n FBitmap.OnChange := @BitmapChanged;\r\n Width := 118;\r\n Height := 22;\r\nend;\r\n\r\ndestructor TTMSFNCEditButton.Destroy;\r\nbegin\r\n FButton.Free;\r\n FPopup.Free;\r\n FBitmap.Free;\r\n inherited;\r\nend;\r\n\r\nprocedure TTMSFNCEditButton.DropDown;\r\nbegin\r\n if Assigned(PopupControl) then\r\n begin\r\n FPopup.PlacementControl := Self;\r\n\r\n if not FPopup.IsOpen then\r\n begin\r\n BeforeDropDown;\r\n FPopup.Popup(ModalPopup)\r\n end\r\n else\r\n FPopup.IsOpen := False;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCEditButton.GetBitmapContainer: TTMSFNCBitmapContainer;\r\nbegin\r\n Result := FBitmapContainer;\r\nend;\r\n\r\nfunction TTMSFNCEditButton.GetText: string;\r\nbegin\r\n Result := FEdit.Text;\r\nend;\r\n\r\ntype\r\n TTMSFNCControlOpen = class(TControl);\r\n TTMSFNCToolBarDropDownButtonOpen = class(TTMSFNCToolBarDropDownButton);\r\n\r\nprocedure TTMSFNCEditButton.Loaded;\r\nbegin\r\n inherited;\r\n\r\n {$IFDEF VCLLIB}\r\n {$HINTS OFF}\r\n {$IF (COMPILERVERSION >= 33) AND (COMPILERVERSION < 36)}\r\n if Assigned(FButton) then\r\n begin\r\n TTMSFNCToolBarDropDownButtonOpen(FButton).ChangeDPIScale(96, DesigntimeFormPixelsPerInch);\r\n// TTMSFNCControlOpen(FButton).ScaleForPPI(CurrentPPI);\r\n end;\r\n\r\n if Assigned(FPopupControl) then\r\n begin\r\n TTMSFNCControlOpen(FPopupControl).ChangeScale(96, DesigntimeFormPixelsPerInch);\r\n TTMSFNCControlOpen(FPopupControl).ScaleForPPI(CurrentPPI);\r\n end;\r\n {$IFEND}\r\n {$HINTS ON}\r\n {$ENDIF}\r\n\r\n if Assigned(FButton) and Assigned(FBitmapContainer) and (FBitmapName <> '') then\r\n begin\r\n FButton.Bitmaps.Clear;\r\n FButton.Bitmaps.AddBitmapName(FBitmapName);\r\n end;\r\nend;\r\n\r\n{ TTMSFNCLookupListBoxItem }\r\n\r\nconstructor TTMSFNCLookupListBoxItem.Create(AIdx: Integer);\r\nbegin\r\n FIdx := AIdx;\r\nend;\r\n\r\n\r\n{$IFDEF CUSTOMMODEL}\r\n\r\n{ TTMSFNCCustomEditModel }\r\n\r\nprocedure TTMSFNCCustomEditModel.DoChange;\r\nbegin\r\n inherited;\r\n if Assigned(FEdit) then\r\n FEdit.UpdateAutoComplete;\r\nend;\r\n\r\n{$ENDIF}\r\n\r\ninitialization\r\nbegin\r\n RegisterClass(TTMSFNCEditButton);\r\n {$IFNDEF WEBLIB}\r\n {$IFNDEF LCLLIB}\r\n RegisterClass(TTMSFNCEdit);\r\n {$WARNINGS OFF}\r\n {$HINTS OFF}\r\n {$IF COMPILERVERSION > 23}\r\n RegisterObservableMember(\r\n TArray.Create(\r\n TTMSFNCEdit, TTMSFNCEditButton\r\n {$IFDEF FMXLIB}\r\n ), 'Text', 'FMX');\r\n {$ENDIF}\r\n {$IFDEF VCLLIB}\r\n ), 'Text', 'VCL');\r\n {$ENDIF}\r\n {$IFEND}\r\n {$HINTS ON}\r\n {$WARNINGS ON}\r\n {$ENDIF}\r\n {$ENDIF}\r\nend;\r\n\r\n{$IFNDEF WEBLIB}\r\nfinalization\r\nbegin\r\n {$IFNDEF LCLLIB}\r\n {$WARNINGS OFF}\r\n {$HINTS OFF}\r\n {$IF COMPILERVERSION > 23}\r\n UnRegisterObservableMember(\r\n TArray.Create(\r\n TTMSFNCEdit, TTMSFNCEditButton\r\n ));\r\n {$IFEND}\r\n {$HINTS ON}\r\n {$WARNINGS ON}\r\n {$ENDIF}\r\nend;\r\n{$ENDIF}\r\n\r\nend.\r\n","{********************************************************************}\r\n{ }\r\n{ written by TMS Software }\r\n{ copyright (c) 2017 - 2025 }\r\n{ Email : info@tmssoftware.com }\r\n{ Web : https://www.tmssoftware.com }\r\n{ }\r\n{ The source code is given as is. The author is not responsible }\r\n{ for any possible damage done due to the use of this code. }\r\n{ The complete source code remains property of the author and may }\r\n{ not be distributed, published, given or sold in any form as such. }\r\n{ No parts of the source code can be included in any other component }\r\n{ or application without written authorization of the author. }\r\n{********************************************************************}\r\n\r\nunit WEBLib.TMSFNCTableView;\r\n\r\n{$I WEBLib.TMSFNCDefines.inc}\r\n\r\n{$IFDEF WEBLIB}\r\n{$DEFINE LCLWEBLIB}\r\n{$ENDIF}\r\n{$IFDEF LCLLIB}\r\n{$DEFINE LCLWEBLIB}\r\n{$ENDIF}\r\n\r\n{$IFDEF CMNLIB}\r\n{$DEFINE CMNWEBLIB}\r\n{$ENDIF}\r\n{$IFDEF WEBLIB}\r\n{$DEFINE CMNWEBLIB}\r\n{$ENDIF}\r\n\r\ninterface\r\n\r\nuses\r\n Classes, WEBLib.TMSFNCTreeViewBase, WEBLib.TMSFNCTreeView, WEBLib.TMSFNCPersistence, WEBLib.TMSFNCStyles, WEBLib.TMSFNCTreeViewData, WEBLib.TMSFNCCustomControl,\r\n WEBLib.TMSFNCTypes, WEBLib.TMSFNCGraphics, WEBLib.TMSFNCCustomTreeView, WEBLib.TMSFNCBitmapContainer,\r\n WEBLib.TMSFNCGraphicsTypes, WEBLib.TMSFNCEdit, WEBLib.TMSFNCToolBar, WEBLib.Controls, WEBLib.ExtCtrls\r\n {$IFDEF FNCLIB}\r\n , WEBLib.TMSFNCControlPicker\r\n {$ENDIF}\r\n {$IFDEF FMXLIB}\r\n ,FMX.Types\r\n {$ENDIF}\r\n {$IFNDEF LCLWEBLIB}\r\n ,UITypes, Types, Generics.Collections\r\n {$ENDIF}\r\n {$IFDEF LCLLIB}\r\n ,fgl\r\n {$ENDIF}\r\n {$IFDEF WEBLIB}\r\n ,Contnrs, Types\r\n {$ENDIF}\r\n ,TypInfo\r\n ;\r\n\r\nconst\r\n MAJ_VER = 1; // Major version nr.\r\n MIN_VER = 0; // Minor version nr.\r\n REL_VER = 7; // Release nr.\r\n BLD_VER = 1; // Build nr.\r\n CLP_FMT = '#TableView#';\r\n SWIPEOFFSET = 30;\r\n FILTERDELAY = 40;\r\n\r\n // version history\r\n // v1.0.0.0 : first release\r\n // v1.0.1.0 : New : SwipeBounceGesture property to toggle bounce effect when swiping up/down on the list\r\n // : Fixed : Issue with lookup category\r\n // v1.0.2.0 : New : KeyboardEscapeMode property to clear or stop filtering\r\n // : Improved : CategoryID can be a number that doesn't start from 0\r\n // v1.0.2.1 : Fixed : Issue with badge drawing\r\n // v1.0.2.2 : Fixed : Issue with showing filter button\r\n // v1.0.2.3 : Fixed : Issue with filtering condition\r\n // v1.0.2.4 : Fixed : Issue with scrolling to item with categories\r\n // v1.0.2.5 : Fixed : Issue with resizing\r\n // v1.0.3.0 : New : OnHeaderAnchorClick, OnFooterAnchorClick and OnItemTitleAnchorClick events implemented\r\n // v1.0.3.1 : Fixed : Issue with swiping to see more options in combination with LongPressToEdit property.\r\n // : Fixed : Issue with anchor click when item was selected\r\n // v1.0.3.2 : Fixed : Issue with text centering in accessory due to word-wrapping.\r\n // : Fixed : Issue with OnClick event not triggered\r\n // v1.0.3.3 : Fixed : Issue with Anchor if font was changed\r\n // v1.0.3.4 : Fixed : Issue with detail view event handler being called when view is not visible yet\r\n // v1.0.4.0 : New : Interface for TMSFNCControlPicker implemented\r\n // v1.0.4.1 : Fixed : Issue with back button not visible in TMS WEB Core\r\n // v1.0.4.2 : Fixed : Issue in Delphi 11 with begin and end scene for CreateBitmapCanvas\r\n // v1.0.4.3 : Fixed : Issue with OnBeforeItemShowDetailControl event when calling ShowDetailControl programmatically\r\n // v1.0.4.4 : Fixed : Issue with returning existing category for category IDs not yet existing\r\n // v1.0.5.0 : New : GlobalFont interface implemented\r\n // : New : Update initial look\r\n // : Fixed : Issue with returning ItemIndex between BeginUpdate & EndUpdate\r\n // v1.0.5.1 : Fixed : Issue with index out of bounds when dragging item\r\n // v1.0.5.2 : Fixed : Issue with designtime Header visiblity in Lazarus\r\n // v1.0.5.3 : Fixed : Issue with stroke not correctly applied to underlying treeview\r\n // v1.0.5.4 : Fixed : Access violation moving/copying items in iOS\r\n // v1.0.6.0 : New : Added group layout support\r\n // : New : Added BadgeAlign property to align the badge accessory within the rectangle\r\n // v1.0.6.1 : Improved : IsEditMode & CancelEditMode functions\r\n // v1.0.6.2 : Improved : Filter now applied only when typing is idle\r\n // v1.0.6.3 : Fixed : Issue with clipping content when filter edit is active\r\n // : Improved : MatchFilter(AItem) exposed\r\n // v1.0.6.4 : Improved : Exposed Edit property to access filter input\r\n // : Improved : DisplayItemCount & DisplayItem properties\r\n // v1.0.6.5 : Improved : LookupBar.IncludeFilteredItems to include or exclude filtered items when indicating the categories\r\n // v1.0.6.6 : Fixed : LookupBar.IncludeFilteredItems causing unnecessary delay when filtering\r\n // v1.0.7.0 : New : OnItemBitmapClick event\r\n // : Fixed : Categories and Items causing miscalculation when filtering\r\n // v1.0.7.1 : Fixed : Issue with applying header & footer settings\r\n\r\ntype\r\n TTMSFNCTableViewItemAccessory = (tviaNone, tviaDetail, tviaProgress, tviaButton, tviaBadge, tviaCustom);\r\n TTMSFNCTableViewItemAccessories = set of TTMSFNCTableViewItemAccessory;\r\n\r\nconst\r\n ClickAccessories = [tviaButton, tviaCustom];\r\n\r\ntype\r\n TTMSFNCCustomTableView = class;\r\n TTMSFNCTableViewInteraction = class;\r\n\r\n TTMSFNCTableViewCategory = class;\r\n\r\n TTMSFNCTableViewLayoutMode = (tvlmDefault, tvlmGroup);\r\n TTMSFNCTableViewItemCheckType = (tvictNone, tvictCheckBox, tvictRadioButton);\r\n\r\n TTMSFNCTableViewItem = class(TCollectionItem)\r\n private\r\n FFiltered: Boolean;\r\n FRow: Integer;\r\n FTag: NativeInt;\r\n FDataString: String;\r\n FDataObject: TObject;\r\n FDataInteger: NativeInt;\r\n FTableView: TTMSFNCCustomTableView;\r\n FText: String;\r\n FDBKey: String;\r\n FChecked: Boolean;\r\n FDataBoolean: Boolean;\r\n FWordWrapping: Boolean;\r\n FTrimming: TTMSFNCGraphicsTextTrimming;\r\n FHorizontalTextAlign: TTMSFNCGraphicsTextAlign;\r\n FSelectedTextColor: TTMSFNCGraphicsColor;\r\n FTextColor: TTMSFNCGraphicsColor;\r\n FDisabledTextColor: TTMSFNCGraphicsColor;\r\n FEnabled: Boolean;\r\n FBitmapName: string;\r\n FBitmap: TTMSFNCBitmap;\r\n FHeight: Double;\r\n FDataPointer: Pointer;\r\n FHTMLTemplateItems: TStringList;\r\n FVisible: Boolean;\r\n FCategoryID: integer;\r\n FDetailControl: TControl;\r\n FAccessory: TTMSFNCTableViewItemAccessory;\r\n FAccessoryWidth: Single;\r\n FAccessoryProgress: Single;\r\n FAccessoryHeight: Single;\r\n FAccessoryText: String;\r\n FCheckType: TTMSFNCTableViewItemCheckType;\r\n FAccessoryFontColor: TTMSFNCGraphicsColor;\r\n FAccessoryBorderColor: TTMSFNCGraphicsColor;\r\n FAccessoryColor: TTMSFNCGraphicsColor;\r\n FVerticalTextAlign: TTMSFNCGraphicsTextAlign;\r\n FEnableMoreOptions: Boolean;\r\n FTitleTrimming: TTMSFNCGraphicsTextTrimming;\r\n FTitleHorizontalTextAlign: TTMSFNCGraphicsTextAlign;\r\n FTitle: String;\r\n FDisabledTitleColor: TTMSFNCGraphicsColor;\r\n FTitleWordWrapping: Boolean;\r\n FSelectedTitleColor: TTMSFNCGraphicsColor;\r\n FTitleColor: TTMSFNCGraphicsColor;\r\n FTitleVerticalTextAlign: TTMSFNCGraphicsTextAlign;\r\n FTitleExpanded: Boolean;\r\n FGroupIndex: Integer;\r\n FBadgeAlign: TTMSFNCGraphicsTextAlign;\r\n procedure SetText(const Value: String);\r\n procedure SetHeight(const Value: Double);\r\n procedure SetTrimming(const Value: TTMSFNCGraphicsTextTrimming);\r\n procedure SetWordWrapping(const Value: Boolean);\r\n procedure SetHorizontalTextAlign(const Value: TTMSFNCGraphicsTextAlign);\r\n procedure SetSelectedTextColor(const Value: TTMSFNCGraphicsColor);\r\n procedure SetTextColor(const Value: TTMSFNCGraphicsColor);\r\n procedure SetDisabledTextColor(const Value: TTMSFNCGraphicsColor);\r\n procedure SetEnabled(const Value: Boolean);\r\n procedure SetBitmapName(const Value: string);\r\n procedure SetBitmap(const Value: TTMSFNCBitmap);\r\n procedure SetChecked(const Value: Boolean);\r\n function GetBitmapContainer: TTMSFNCBitmapContainer;\r\n function GetStrippedHTMLText: string;\r\n function IsHeightStored: Boolean;\r\n procedure SetHTMLTemplateItems(const Value: TStringList);\r\n procedure SetVisible(const Value: Boolean);\r\n procedure SetCategoryID(const Value: integer);\r\n procedure SetDetailControl(const Value: TControl);\r\n procedure SetAccessory(const Value: TTMSFNCTableViewItemAccessory);\r\n function IsAccessoryWidthStored: Boolean;\r\n procedure SetAccessoryWidth(const Value: Single);\r\n function IsAccessoryProgressStored: Boolean;\r\n procedure SetAccessoryProgress(const Value: Single);\r\n function IsAccessoryHeightStored: Boolean;\r\n procedure SetAccessoryHeight(const Value: Single);\r\n procedure SetAccessoryText(const Value: String);\r\n procedure SetCheckType(const Value: TTMSFNCTableViewItemCheckType);\r\n procedure SetAccessoryBorderColor(const Value: TTMSFNCGraphicsColor);\r\n procedure SetAccessoryColor(const Value: TTMSFNCGraphicsColor);\r\n procedure SetAccessoryFontColor(const Value: TTMSFNCGraphicsColor);\r\n procedure SetVerticalTextAlign(const Value: TTMSFNCGraphicsTextAlign);\r\n procedure SetDisabledTitleColor(const Value: TTMSFNCGraphicsColor);\r\n procedure SetSelectedTitleColor(const Value: TTMSFNCGraphicsColor);\r\n procedure SetTitle(const Value: String);\r\n procedure SetTitleColor(const Value: TTMSFNCGraphicsColor);\r\n procedure SetTitleHorizontalTextAlign(\r\n const Value: TTMSFNCGraphicsTextAlign);\r\n procedure SetTitleTrimming(const Value: TTMSFNCGraphicsTextTrimming);\r\n procedure SetTitleVerticalTextAlign(const Value: TTMSFNCGraphicsTextAlign);\r\n procedure SetTitleWordWrapping(const Value: Boolean);\r\n procedure SetTitleExpanded(const Value: Boolean);\r\n procedure SetGroupIndex(const Value: Integer);\r\n procedure SetBadgeAlign(const Value: TTMSFNCGraphicsTextAlign);\r\n protected\r\n procedure UpdateItem;\r\n procedure Changed(Sender: TObject);\r\n procedure BitmapChanged(Sender: TObject);\r\n procedure TemplateItemsChanged(Sender: TObject);\r\n public\r\n function GetTableView: TTMSFNCCustomTableView;\r\n function GetText: string;\r\n function GetTitle: string;\r\n constructor Create(ACollection: TCollection); override;\r\n destructor Destroy; override;\r\n function SaveToString(ATextOnly: Boolean = True): String; virtual;\r\n function IsSelected: Boolean; virtual;\r\n procedure LoadFromString(AString: String); virtual;\r\n procedure Assign(Source: TPersistent); override;\r\n procedure AssignData(Source: TPersistent); virtual;\r\n property DataPointer: Pointer read FDataPointer write FDataPointer;\r\n property DataBoolean: Boolean read FDataBoolean write FDataBoolean;\r\n property DataObject: TObject read FDataObject write FDataObject;\r\n property DataString: String read FDataString write FDataString;\r\n property DataInteger: NativeInt read FDataInteger write FDataInteger;\r\n property DBKey: String read FDBKey write FDBKey;\r\n property BitmapContainer: TTMSFNCBitmapContainer read GetBitmapContainer;\r\n property StrippedHTMLText: String read GetStrippedHTMLText;\r\n property TableView: TTMSFNCCustomTableView read GetTableView;\r\n procedure ShowDetailControl; virtual;\r\n procedure HideDetailControl; virtual;\r\n property Title: String read FTitle write SetTitle;\r\n property TitleExpanded: Boolean read FTitleExpanded write SetTitleExpanded default True;\r\n property TitleWordWrapping: Boolean read FTitleWordWrapping write SetTitleWordWrapping default True;\r\n property TitleTrimming: TTMSFNCGraphicsTextTrimming read FTitleTrimming write SetTitleTrimming default gttNone;\r\n property TitleHorizontalTextAlign: TTMSFNCGraphicsTextAlign read FTitleHorizontalTextAlign write SetTitleHorizontalTextAlign default gtaLeading;\r\n property TitleVerticalTextAlign: TTMSFNCGraphicsTextAlign read FTitleVerticalTextAlign write SetTitleVerticalTextAlign default gtaLeading;\r\n property TitleColor: TTMSFNCGraphicsColor read FTitleColor write SetTitleColor default gcBlack;\r\n property SelectedTitleColor: TTMSFNCGraphicsColor read FSelectedTitleColor write SetSelectedTitleColor default gcWhite;\r\n property DisabledTitleColor: TTMSFNCGraphicsColor read FDisabledTitleColor write SetDisabledTitleColor default gcSilver;\r\n published\r\n property Checked: Boolean read FChecked write SetChecked default False;\r\n property DetailControl: TControl read FDetailControl write SetDetailControl;\r\n property Text: String read FText write SetText;\r\n property HTMLTemplateItems: TStringList read FHTMLTemplateItems write SetHTMLTemplateItems;\r\n property Bitmap: TTMSFNCBitmap read FBitmap write SetBitmap;\r\n property BitmapName: string read FBitmapName write SetBitmapName;\r\n property WordWrapping: Boolean read FWordWrapping write SetWordWrapping default True;\r\n property Trimming: TTMSFNCGraphicsTextTrimming read FTrimming write SetTrimming default gttNone;\r\n property HorizontalTextAlign: TTMSFNCGraphicsTextAlign read FHorizontalTextAlign write SetHorizontalTextAlign default gtaLeading;\r\n property VerticalTextAlign: TTMSFNCGraphicsTextAlign read FVerticalTextAlign write SetVerticalTextAlign default gtaLeading;\r\n property TextColor: TTMSFNCGraphicsColor read FTextColor write SetTextColor default gcBlack;\r\n property SelectedTextColor: TTMSFNCGraphicsColor read FSelectedTextColor write SetSelectedTextColor default gcWhite;\r\n property DisabledTextColor: TTMSFNCGraphicsColor read FDisabledTextColor write SetDisabledTextColor default gcSilver;\r\n property Enabled: Boolean read FEnabled write SetEnabled default True;\r\n property Height: Double read FHeight write SetHeight stored IsHeightStored nodefault;\r\n property Visible: Boolean read FVisible write SetVisible default True;\r\n property CategoryID: integer read FCategoryID write SetCategoryID default -1;\r\n property GroupIndex: Integer read FGroupIndex write SetGroupIndex default 0;\r\n property Tag: NativeInt read FTag write FTag default 0;\r\n property AccessoryWidth: Single read FAccessoryWidth write SetAccessoryWidth stored IsAccessoryWidthStored nodefault;\r\n property AccessoryHeight: Single read FAccessoryHeight write SetAccessoryHeight stored IsAccessoryHeightStored nodefault;\r\n property Accessory: TTMSFNCTableViewItemAccessory read FAccessory write SetAccessory default tviaNone;\r\n property AccessoryProgress: Single read FAccessoryProgress write SetAccessoryProgress stored IsAccessoryProgressStored nodefault;\r\n property AccessoryText: String read FAccessoryText write SetAccessoryText;\r\n property BadgeAlign: TTMSFNCGraphicsTextAlign read FBadgeAlign write SetBadgeAlign default gtaCenter;\r\n property AccessoryColor: TTMSFNCGraphicsColor read FAccessoryColor write SetAccessoryColor default gcNull;\r\n property AccessoryBorderColor: TTMSFNCGraphicsColor read FAccessoryBorderColor write SetAccessoryBorderColor default gcNull;\r\n property AccessoryFontColor: TTMSFNCGraphicsColor read FAccessoryFontColor write SetAccessoryFontColor default gcNull;\r\n property CheckType: TTMSFNCTableViewItemCheckType read FCheckType write SetCheckType default tvictNone;\r\n property EnableMoreOptions: Boolean read FEnableMoreOptions write FEnableMoreOptions default True;\r\n end;\r\n\r\n TTMSFNCTableViewItemsSortMode = (tvismAscending, tvismDescending);\r\n TTMSFNCTableViewItemsSortKind = (tviskNone, tviskAscending, tviskDescending);\r\n\r\n {$IFDEF WEBLIB}\r\n TTMSFNCTableViewItems = class(TTMSFNCOwnedCollection)\r\n {$ENDIF}\r\n {$IFNDEF WEBLIB}\r\n TTMSFNCTableViewItems = class({$IFDEF LCLLIB}specialize {$ENDIF}TTMSFNCOwnedCollection)\r\n {$ENDIF}\r\n private\r\n FTableView: TTMSFNCCustomTableView;\r\n function GetItem(Index: Integer): TTMSFNCTableViewItem;\r\n procedure SetItem(Index: Integer; const Value: TTMSFNCTableViewItem);\r\n protected\r\n function GetItemClass: TCollectionItemClass; virtual;\r\n function Compare(AItem1, AItem2: TTMSFNCTableViewItem; ACaseSensitive: Boolean = True; ASortingMode: TTMSFNCTableViewItemsSortMode = tvismAscending): Integer; virtual;\r\n procedure QuickSort(L, R: Integer; ACaseSensitive: Boolean = True; ASortingMode: TTMSFNCTableViewItemsSortMode = tvismAscending); virtual;\r\n public\r\n function TableView: TTMSFNCCustomTableView;\r\n constructor Create(ATableView: TTMSFNCCustomTableView);\r\n function Add: TTMSFNCTableViewItem; virtual;\r\n function Insert(Index: Integer): TTMSFNCTableViewItem;\r\n procedure Clear; virtual;\r\n procedure Sort(ACaseSensitive: Boolean = True; ASortingMode: TTMSFNCTableViewItemsSortMode = tvismAscending);\r\n property Items[Index: Integer]: TTMSFNCTableViewItem read GetItem write SetItem; default;\r\n end;\r\n\r\n TTMSFNCTableViewLookup = class(TPersistent)\r\n private\r\n FOwner: TTMSFNCTableViewInteraction;\r\n function GetAutoSelect: Boolean;\r\n function GetCaseSensitive: Boolean;\r\n function GetEnabled: Boolean;\r\n function GetIncremental: Boolean;\r\n procedure SetAutoSelect(const Value: Boolean);\r\n procedure SetCaseSensitive(const Value: Boolean);\r\n procedure SetEnabled(const Value: Boolean);\r\n procedure SetIncremental(const Value: Boolean);\r\n public\r\n constructor Create(AOwner: TTMSFNCTableViewInteraction);\r\n procedure Assign(Source: TPersistent); override;\r\n published\r\n property CaseSensitive: Boolean read GetCaseSensitive write SetCaseSensitive default False;\r\n property Enabled: Boolean read GetEnabled write SetEnabled default True;\r\n property Incremental: Boolean read GetIncremental write SetIncremental default True;\r\n property AutoSelect: Boolean read GetAutoSelect write SetAutoSelect default True;\r\n end;\r\n\r\n TTMSFNCTableViewFiltering = class(TPersistent)\r\n private\r\n FOwner: TTMSFNCTableViewInteraction;\r\n function GetDropDownHeight: integer;\r\n function GetDropDownWidth: integer;\r\n function GetEnabled: Boolean;\r\n procedure SetDropDownHeight(const Value: integer);\r\n procedure SetDropDownWidth(const Value: integer);\r\n procedure SetEnabled(const Value: Boolean);\r\n public\r\n constructor Create(AOwner: TTMSFNCTableViewInteraction);\r\n procedure Assign(Source: TPersistent); override;\r\n published\r\n property Enabled: Boolean read GetEnabled write SetEnabled default False;\r\n property DropDownWidth: integer read GetDropDownWidth write SetDropDownWidth default 100;\r\n property DropDownHeight: integer read GetDropDownHeight write SetDropDownHeight default 120;\r\n end;\r\n\r\n TTMSFNCTableViewMouseEditMode = (tvmemDoubleClick, tvmemSingleClick, tvmemSingleClickOnSelectedItem);\r\n TTMSFNCTableViewClipboardMode = (tvcmNone, tvcmTextOnly, tvcmFull);\r\n TTMSFNCTableViewDragDropMode = (tvdmNone, tvdmMove, tvdmCopy);\r\n TTMSFNCTableViewSorting = (tvcsNone, tvcsNormal, tvcsNormalCaseSensitive);\r\n TTMSFNCTableViewShowDetailMode = (tvdtNone, tvdtAfterSelectItem);\r\n TTMSFNCTableViewKeyboardEscapeMode = (tvkeNone, tvkeClearEdit, tvkeStopFilter);\r\n\r\n TTMSFNCTableViewInteraction = class(TPersistent)\r\n private\r\n FTableView: TTMSFNCCustomTableView;\r\n FLookup: TTMSFNCTableViewLookup;\r\n FFiltering: TTMSFNCTableViewFiltering;\r\n FShowDetailMode: TTMSFNCTableViewShowDetailMode;\r\n FShowEditButton: Boolean;\r\n FShowFilterButton: Boolean;\r\n FAccessoryClickDetection: TTMSFNCTableViewItemAccessories;\r\n FLongPressToEdit: Boolean;\r\n FSwipeToShowMoreOptions: Boolean;\r\n FSwipeBounceGesture: Boolean;\r\n FKeyboardEscapeMode: TTMSFNCTableViewKeyboardEscapeMode;\r\n function GetMultiSelect: Boolean;\r\n procedure SetMultiSelect(const Value: Boolean);\r\n function GetClipboardMode: TTMSFNCTableViewClipboardMode;\r\n function GetDragDropMode: TTMSFNCTableViewDragDropMode;\r\n function GetReorder: Boolean;\r\n function GetTouchScrolling: Boolean;\r\n procedure SetDragDropMode(const Value: TTMSFNCTableViewDragDropMode);\r\n procedure SetFiltering(const Value: TTMSFNCTableViewFiltering);\r\n procedure SetLookup(const Value: TTMSFNCTableViewLookup);\r\n procedure SetReorder(const Value: Boolean);\r\n procedure SetTouchScrolling(const Value: Boolean);\r\n procedure SetClipboardMode(const Value: TTMSFNCTableViewClipboardMode);\r\n function GetSorting: TTMSFNCTableViewSorting;\r\n procedure SetSorting(const Value: TTMSFNCTableViewSorting);\r\n procedure SetShowDetailMode(const Value: TTMSFNCTableViewShowDetailMode);\r\n procedure SetShowEditButton(const Value: Boolean);\r\n procedure SetShowFilterButton(const Value: Boolean);\r\n procedure SetAccessoryClickDetection(\r\n const Value: TTMSFNCTableViewItemAccessories);\r\n function GetAutoOpenURL: Boolean;\r\n procedure SetAutoOpenURL(const Value: Boolean);\r\n function GetAnimationFactor: Single;\r\n procedure SetAnimationFactor(const Value: Single);\r\n protected\r\n property ClipboardMode: TTMSFNCTableViewClipboardMode read GetClipboardMode write SetClipboardMode default tvcmNone;\r\n property Reorder: Boolean read GetReorder write SetReorder default False;\r\n property Sorting: TTMSFNCTableViewSorting read GetSorting write SetSorting default tvcsNone;\r\n property Filtering: TTMSFNCTableViewFiltering read FFiltering write SetFiltering;\r\n property Lookup: TTMSFNCTableViewLookup read FLookup write SetLookup;\r\n public\r\n constructor Create(ATableView: TTMSFNCCustomTableView);\r\n destructor Destroy; override;\r\n procedure Assign(Source: TPersistent); override;\r\n property DragDropMode: TTMSFNCTableViewDragDropMode read GetDragDropMode write SetDragDropMode default tvdmNone;\r\n published\r\n property AnimationFactor: Single read GetAnimationFactor write SetAnimationFactor;\r\n property AutoOpenURL: Boolean read GetAutoOpenURL write SetAutoOpenURL default True;\r\n property MultiSelect: Boolean read GetMultiSelect write SetMultiSelect default False;\r\n property TouchScrolling: Boolean read GetTouchScrolling write SetTouchScrolling default True;\r\n property ShowDetailMode: TTMSFNCTableViewShowDetailMode read FShowDetailMode write SetShowDetailMode default tvdtAfterSelectItem;\r\n property ShowEditButton: Boolean read FShowEditButton write SetShowEditButton default False;\r\n property ShowFilterButton: Boolean read FShowFilterButton write SetShowFilterButton default False;\r\n property SwipeBounceGesture: Boolean read FSwipeBounceGesture write FSwipeBounceGesture default True;\r\n property AccessoryClickDetection: TTMSFNCTableViewItemAccessories read FAccessoryClickDetection write SetAccessoryClickDetection default ClickAccessories;\r\n property SwipeToShowMoreOptions: Boolean read FSwipeToShowMoreOptions write FSwipeToShowMoreOptions default True;\r\n property LongPressToEdit: Boolean read FLongPressToEdit write FLongPressToEdit default true;\r\n property KeyboardEscapeMode: TTMSFNCTableViewKeyboardEscapeMode read FKeyboardEscapeMode write FKeyboardEscapeMode default tvkeStopFilter;\r\n end;\r\n\r\n TTMSFNCTableViewItemHeightMode = (tvhmFixed, tvhmVariable);\r\n\r\n TTMSFNCTableViewItemAppearance = class(TPersistent)\r\n private\r\n FTableView: TTMSFNCCustomTableView;\r\n FHTMLTemplate: string;\r\n FAccessoryDetailBitmaps: TTMSFNCScaledBitmaps;\r\n FAccessoryFont: TTMSFNCGraphicsFont;\r\n FAccessoryStroke: TTMSFNCGraphicsStroke;\r\n FAccessoryFill: TTMSFNCGraphicsFill;\r\n FHeight: Double;\r\n function GetFont: TTMSFNCGraphicsFont;\r\n function GetSelectedFill: TTMSFNCGraphicsFill;\r\n procedure SetFont(const Value: TTMSFNCGraphicsFont);\r\n procedure SetSelectedFill(const Value: TTMSFNCGraphicsFill);\r\n function GetSelectedStroke: TTMSFNCGraphicsStroke;\r\n procedure SetSelectedStroke(const Value: TTMSFNCGraphicsStroke);\r\n function GetDisabledFill: TTMSFNCGraphicsFill;\r\n function GetDisabledStroke: TTMSFNCGraphicsStroke;\r\n function GetFill: TTMSFNCGraphicsFill;\r\n function GetStroke: TTMSFNCGraphicsStroke;\r\n procedure SetDisabledFill(const Value: TTMSFNCGraphicsFill);\r\n procedure SetDisabledStroke(const Value: TTMSFNCGraphicsStroke);\r\n procedure SetFill(const Value: TTMSFNCGraphicsFill);\r\n procedure SetStroke(const Value: TTMSFNCGraphicsStroke);\r\n function GetHeightMode: TTMSFNCTableViewItemHeightMode;\r\n procedure SetHeightMode(const Value: TTMSFNCTableViewItemHeightMode);\r\n function GetFixedHeight: Double;\r\n procedure SetFixedHeight(const Value: Double);\r\n procedure SetHTMLTemplate(const Value: string);\r\n procedure SetAccessoryDetailBitmaps(const Value: TTMSFNCScaledBitmaps);\r\n procedure SetAccessoryFont(const Value: TTMSFNCGraphicsFont);\r\n procedure SetAccessoryFill(const Value: TTMSFNCGraphicsFill);\r\n procedure SetAccessoryStroke(const Value: TTMSFNCGraphicsStroke);\r\n function IsHeightStored: Boolean;\r\n procedure SetHeight(const Value: Double);\r\n function GetShowFocus: Boolean;\r\n procedure SetShowFocus(const Value: Boolean);\r\n protected\r\n procedure DoAccessoryDetailBitmapsChanged(Sender: TObject);\r\n procedure FontChanged(Sender: TObject);\r\n procedure FillChanged(Sender: TObject);\r\n procedure StrokeChanged(Sender: TObject);\r\n function GetOwner: TPersistent; override;\r\n public\r\n procedure Assign(Source: TPersistent); override;\r\n constructor Create(ATableView: TTMSFNCCustomTableView);\r\n destructor Destroy; override;\r\n published\r\n property Font: TTMSFNCGraphicsFont read GetFont write SetFont;\r\n property Fill: TTMSFNCGraphicsFill read GetFill write SetFill;\r\n property Stroke: TTMSFNCGraphicsStroke read GetStroke write SetStroke;\r\n property SelectedFill: TTMSFNCGraphicsFill read GetSelectedFill write SetSelectedFill;\r\n property SelectedStroke: TTMSFNCGraphicsStroke read GetSelectedStroke write SetSelectedStroke;\r\n property DisabledFill: TTMSFNCGraphicsFill read GetDisabledFill write SetDisabledFill;\r\n property DisabledStroke: TTMSFNCGraphicsStroke read GetDisabledStroke write SetDisabledStroke;\r\n property HeightMode: TTMSFNCTableViewItemHeightMode read GetHeightMode write SetHeightMode default tvhmVariable;\r\n property FixedHeight: Double read GetFixedHeight write SetFixedHeight;\r\n property Height: Double read FHeight write SetHeight stored IsHeightStored nodefault;\r\n property HTMLTemplate: string read FHTMLTemplate write SetHTMLTemplate;\r\n property AccessoryDetailBitmaps: TTMSFNCScaledBitmaps read FAccessoryDetailBitmaps write SetAccessoryDetailBitmaps;\r\n property AccessoryFont: TTMSFNCGraphicsFont read FAccessoryFont write SetAccessoryFont;\r\n property AccessoryStroke: TTMSFNCGraphicsStroke read FAccessoryStroke write SetAccessoryStroke;\r\n property AccessoryFill: TTMSFNCGraphicsFill read FAccessoryFill write SetAccessoryFill;\r\n property ShowFocus: Boolean read GetShowFocus write SetShowFocus default True;\r\n end;\r\n\r\n TTMSFNCTableViewCategoryAppearance = class(TPersistent)\r\n private\r\n FTableView: TTMSFNCCustomTableView;\r\n FHeight: Single;\r\n FFloating: Boolean;\r\n FShowUncategorized: Boolean;\r\n function GetFont: TTMSFNCGraphicsFont;\r\n procedure SetFont(const Value: TTMSFNCGraphicsFont);\r\n function GetFill: TTMSFNCGraphicsFill;\r\n function GetStroke: TTMSFNCGraphicsStroke;\r\n procedure SetFill(const Value: TTMSFNCGraphicsFill);\r\n procedure SetStroke(const Value: TTMSFNCGraphicsStroke);\r\n function IsHeightStored: Boolean;\r\n procedure SetHeight(const Value: Single);\r\n procedure SetFloating(const Value: Boolean);\r\n procedure SetShowUncategorized(const Value: Boolean);\r\n public\r\n procedure Assign(Source: TPersistent); override;\r\n constructor Create(ATableView: TTMSFNCCustomTableView);\r\n destructor Destroy; override;\r\n published\r\n property Font: TTMSFNCGraphicsFont read GetFont write SetFont;\r\n property Fill: TTMSFNCGraphicsFill read GetFill write SetFill;\r\n property Stroke: TTMSFNCGraphicsStroke read GetStroke write SetStroke;\r\n property Height: Single read FHeight write SetHeight stored IsHeightStored nodefault;\r\n property Floating: Boolean read FFloating write SetFloating default True;\r\n property ShowUncategorized: Boolean read FShowUncategorized write SetShowUncategorized default True;\r\n end;\r\n\r\n TTMSFNCTableViewGroupAppearance = class(TPersistent)\r\n private\r\n FTableView: TTMSFNCCustomTableView;\r\n FMargins: TTMSFNCMargins;\r\n FRounding: Integer;\r\n procedure SetMargins(const Value: TTMSFNCMargins);\r\n procedure SetRounding(const Value: Integer);\r\n protected\r\n procedure MarginsChanged(Sender: TObject);\r\n public\r\n constructor Create(ATableView: TTMSFNCCustomTableView);\r\n destructor Destroy; override;\r\n procedure Assign(Source: TPersistent); override;\r\n published\r\n property Rounding: Integer read FRounding write SetRounding default 10;\r\n property Margins: TTMSFNCMargins read FMargins write SetMargins;\r\n end;\r\n\r\n TTMSFNCTableViewMoreOptionAppearance = class(TPersistent)\r\n private\r\n FTableView: TTMSFNCCustomTableView;\r\n FFill: TTMSFNCGraphicsFill;\r\n FStroke: TTMSFNCGraphicsStroke;\r\n FFont: TTMSFNCGraphicsFont;\r\n procedure SetFont(const Value: TTMSFNCGraphicsFont);\r\n procedure SetFill(const Value: TTMSFNCGraphicsFill);\r\n procedure SetStroke(const Value: TTMSFNCGraphicsStroke);\r\n protected\r\n procedure FontChanged(Sender: TObject);\r\n procedure StrokeChanged(Sender: TObject);\r\n procedure FillChanged(Sender: TObject);\r\n public\r\n procedure Assign(Source: TPersistent); override;\r\n constructor Create(ATableView: TTMSFNCCustomTableView);\r\n destructor Destroy; override;\r\n published\r\n property Font: TTMSFNCGraphicsFont read FFont write SetFont;\r\n property Fill: TTMSFNCGraphicsFill read FFill write SetFill;\r\n property Stroke: TTMSFNCGraphicsStroke read FStroke write SetStroke;\r\n end;\r\n\r\n TTMSFNCTableViewIntegerArray = array of Integer;\r\n\r\n TTMSFNCTableViewHeaderFooter = class(TPersistent)\r\n private\r\n FTableView: TTMSFNCCustomTableView;\r\n FText: String;\r\n FWordWrapping: Boolean;\r\n FVerticalTextAlign: TTMSFNCGraphicsTextAlign;\r\n FTrimming: TTMSFNCGraphicsTextTrimming;\r\n FHorizontalTextAlign: TTMSFNCGraphicsTextAlign;\r\n function GetVisible: Boolean;\r\n procedure SetVisible(const Value: Boolean);\r\n procedure SetText(const Value: String);\r\n function GetFill: TTMSFNCGraphicsFill;\r\n function GetHeight: Single;\r\n function GetStroke: TTMSFNCGraphicsStroke;\r\n procedure SetFill(const Value: TTMSFNCGraphicsFill);\r\n procedure SetHorizontalTextAlign(const Value: TTMSFNCGraphicsTextAlign);\r\n procedure SetHeight(const Value: Single);\r\n procedure SetStroke(const Value: TTMSFNCGraphicsStroke);\r\n procedure SetVerticalTextAlign(const Value: TTMSFNCGraphicsTextAlign);\r\n function GetFont: TTMSFNCGraphicsFont;\r\n procedure SetFont(const Value: TTMSFNCGraphicsFont);\r\n procedure SetTrimming(const Value: TTMSFNCGraphicsTextTrimming);\r\n procedure SetWordWrapping(const Value: Boolean);\r\n function GetSortIndicatorColor: TTMSFNCGraphicsColor;\r\n procedure SetSortIndicatorColor(const Value: TTMSFNCGraphicsColor);\r\n protected\r\n property Visible: Boolean read GetVisible write SetVisible default True;\r\n property Text: String read FText write SetText;\r\n property Fill: TTMSFNCGraphicsFill read GetFill write SetFill;\r\n property Font: TTMSFNCGraphicsFont read GetFont write SetFont;\r\n property Stroke: TTMSFNCGraphicsStroke read GetStroke write SetStroke;\r\n property HorizontalTextAlign: TTMSFNCGraphicsTextAlign read FHorizontalTextAlign write SetHorizontalTextAlign default gtaCenter;\r\n property VerticalTextAlign: TTMSFNCGraphicsTextAlign read FVerticalTextAlign write SetVerticalTextAlign default gtaCenter;\r\n property WordWrapping: Boolean read FWordWrapping write SetWordWrapping default False;\r\n property Trimming: TTMSFNCGraphicsTextTrimming read FTrimming write SetTrimming default gttNone;\r\n property Height: Single read GetHeight write SetHeight;\r\n property SortIndicatorColor: TTMSFNCGraphicsColor read GetSortIndicatorColor write SetSortIndicatorColor default TTMSFNCTreeViewColorSelection;\r\n public\r\n procedure Assign(Source: TPersistent); override;\r\n constructor Create(ATableView: TTMSFNCCustomTableView); virtual;\r\n end;\r\n\r\n TTMSFNCTableViewHeader = class(TTMSFNCTableViewHeaderFooter)\r\n published\r\n property Visible;\r\n property Text;\r\n property Fill;\r\n property Font;\r\n property Stroke;\r\n property HorizontalTextAlign;\r\n property VerticalTextAlign;\r\n property WordWrapping;\r\n property Trimming;\r\n property Height;\r\n end;\r\n\r\n TTMSFNCTableViewFooter = class(TTMSFNCTableViewHeaderFooter)\r\n published\r\n property Visible;\r\n property Text;\r\n property Fill;\r\n property Font;\r\n property Stroke;\r\n property HorizontalTextAlign;\r\n property VerticalTextAlign;\r\n property WordWrapping;\r\n property Trimming;\r\n property Height;\r\n end;\r\n\r\n TTMSFNCTableViewCopyItems = class(TTMSFNCTableViewItems);\r\n\r\n TTMSFNCTableViewBeforeDrawSortIndicatorEvent = procedure(Sender: TObject; AGraphics: TTMSFNCGraphics; ARect: TRectF; ASortIndex: Integer; ASortKind: TTMSFNCTableViewItemsSortKind; var ADefaultDraw: Boolean) of object;\r\n TTMSFNCTableViewAfterDrawSortIndicatorEvent = procedure(Sender: TObject; AGraphics: TTMSFNCGraphics; ARect: TRectF; ASortIndex: Integer; ASortKind: TTMSFNCTableViewItemsSortKind) of object;\r\n TTMSFNCTableViewNeedFilterDropDownDataEvent = procedure(Sender: TObject; AValues: TStrings) of object;\r\n TTMSFNCTableViewItemAnchorClickEvent = procedure(Sender: TObject; AItem: TTMSFNCTableViewItem; AAnchor: String) of object;\r\n TTMSFNCTableViewBeforeReorderItemEvent = procedure(Sender: TObject; AFromItem, AToItem: TTMSFNCTableViewItem; var ACanReorder: Boolean) of object;\r\n TTMSFNCTableViewAfterReorderItemEvent = procedure(Sender: TObject; AFromItem, AToItem: TTMSFNCTableViewItem) of object;\r\n TTMSFNCTableViewBeforeDropItemEvent = procedure(Sender: TObject; AFromItem, AToItem: TTMSFNCTableViewItem; var ACanDrop: Boolean) of object;\r\n TTMSFNCTableViewAfterDropItemEvent = procedure(Sender: TObject; AFromItem, AToItem: TTMSFNCTableViewItem) of object;\r\n TTMSFNCTableViewBeforeCopyToClipboardEvent = procedure(Sender: TObject; var ACanCopy: Boolean) of object;\r\n TTMSFNCTableViewBeforeCutToClipboardEvent = procedure(Sender: TObject; var ACanCut: Boolean) of object;\r\n TTMSFNCTableViewBeforePasteFromClipboardEvent = procedure(Sender: TObject; var ACanPaste: Boolean) of object;\r\n TTMSFNCTableViewAfterCopyToClipboardEvent = procedure(Sender: TObject) of object;\r\n TTMSFNCTableViewAfterCutToClipboardEvent = procedure(Sender: TObject) of object;\r\n TTMSFNCTableViewAfterPasteFromClipboardEvent = procedure(Sender: TObject) of object;\r\n TTMSFNCTableViewBeforeDrawItemTextEvent = procedure(Sender: TObject; AGraphics: TTMSFNCGraphics; ARect: TRectF; AItem: TTMSFNCTableViewItem; AText: String; var AAllow: Boolean) of object;\r\n TTMSFNCTableViewAfterDrawItemTextEvent = procedure(Sender: TObject; AGraphics: TTMSFNCGraphics; ARect: TRectF; AItem: TTMSFNCTableViewItem; AText: String) of object;\r\n TTMSFNCTableViewBeforeDrawItemTitleEvent = procedure(Sender: TObject; AGraphics: TTMSFNCGraphics; ARect: TRectF; AItem: TTMSFNCTableViewItem; ATitle: String; var AAllow: Boolean) of object;\r\n TTMSFNCTableViewAfterDrawItemTitleEvent = procedure(Sender: TObject; AGraphics: TTMSFNCGraphics; ARect: TRectF; AItem: TTMSFNCTableViewItem; ATitle: String) of object;\r\n TTMSFNCTableViewItemSelectedEvent = procedure(Sender: TObject; AItem: TTMSFNCTableViewItem) of object;\r\n TTMSFNCTableViewItemUnSelectedEvent = procedure(Sender: TObject; AItem: TTMSFNCTableViewItem) of object;\r\n TTMSFNCTableViewItemSelectionChangedEvent = TNotifyEvent;\r\n TTMSFNCTableViewItemClickEvent = procedure(Sender: TObject; AItem: TTMSFNCTableViewItem) of object;\r\n TTMSFNCTableViewItemMouseEnterEvent = procedure(Sender: TObject; AItem: TTMSFNCTableViewItem) of object;\r\n TTMSFNCTableViewItemMouseLeaveEvent = procedure(Sender: TObject; AItem: TTMSFNCTableViewItem) of object;\r\n TTMSFNCTableViewItemCheckChangedEvent = procedure(Sender: TObject; AItem: TTMSFNCTableViewItem) of object;\r\n TTMSFNCTableViewScrollEvent = procedure(Sender: TObject; APosition: Single) of object;\r\n TTMSFNCTableViewGetItemHeightEvent = procedure(Sender: TObject; AItem: TTMSFNCTableViewItem; var AHeight: Double) of object;\r\n TTMSFNCTableViewBeforeDrawItemIconEvent = procedure(Sender: TObject; AGraphics: TTMSFNCGraphics; ARect: TRectF; AItem: TTMSFNCTableViewItem; AIcon:TTMSFNCBitmap; var AAllow: Boolean) of object;\r\n TTMSFNCTableViewAfterDrawItemIconEvent = procedure(Sender: TObject; AGraphics: TTMSFNCGraphics; ARect: TRectF; AItem: TTMSFNCTableViewItem; AIcon:TTMSFNCBitmap) of object;\r\n TTMSFNCTableViewBeforeDrawItemCheckEvent = procedure(Sender: TObject; AGraphics: TTMSFNCGraphics; ARect: TRectF; AItem: TTMSFNCTableViewItem; ACheck: TTMSFNCBitmap; var AAllow: Boolean) of object;\r\n TTMSFNCTableViewAfterDrawItemCheckEvent = procedure(Sender: TObject; AGraphics: TTMSFNCGraphics; ARect: TRectF; AItem: TTMSFNCTableViewItem; ACheck: TTMSFNCBitmap) of object;\r\n TTMSFNCTableViewBeforeDrawItemEvent = procedure(Sender: TObject; AGraphics: TTMSFNCGraphics; ARect: TRectF; AItem: TTMSFNCTableViewItem; var AAllow: Boolean; var ADefaultDraw: Boolean) of object;\r\n TTMSFNCTableViewAfterDrawItemEvent = procedure(Sender: TObject; AGraphics: TTMSFNCGraphics; ARect: TRectF; AItem: TTMSFNCTableViewItem) of object;\r\n TTMSFNCTableViewItemCompareEvent = procedure(Sender: TObject; Item1, Item2: TTMSFNCTableViewItem; var ACompareResult: Integer) of object;\r\n TTMSFNCTableViewCategoryCompareEvent = procedure(Sender: TObject; Category1, Category2: TTMSFNCTableViewCategory; var ACompareResult: Integer) of object;\r\n TTMSFNCTableViewFilterSelectEvent = procedure(Sender: TObject; var ACondition: string) of object;\r\n TTMSFNCTableViewGetHTMLTemplateValueEvent = procedure(Sender: TObject; AItem: TTMSFNCTableViewItem; AName: string; var AValue: string) of object;\r\n TTMSFNCTableViewGetHTMLTemplateEvent = procedure(Sender: TObject; AItem: TTMSFNCTableViewItem; var AHTMLTemplate: string) of object;\r\n TTMSFNCTableViewAnchorHeaderFooterClick = procedure(Sender: TObject; AAnchor: string) of object;\r\n\r\n TTMSFNCTableViewFilterOperation = (tvfoSHORT, tvfoNONE, tvfoAND, tvfoXOR, tvfoOR);\r\n\r\n TTMSFNCTableViewFilterData = class(TCollectionItem)\r\n private\r\n FCondition: string;\r\n FCaseSensitive: Boolean;\r\n FSuffix: string;\r\n FPrefix: string;\r\n FOperation: TTMSFNCTableViewFilterOperation;\r\n public\r\n constructor Create(ACollection: TCollection); override;\r\n procedure Assign(Source: TPersistent); override;\r\n published\r\n property Condition:string read FCondition write FCondition;\r\n property CaseSensitive: Boolean read FCaseSensitive write FCaseSensitive default True;\r\n property Prefix: string read FPrefix write FPrefix;\r\n property Suffix: string read FSuffix write FSuffix;\r\n property Operation: TTMSFNCTableViewFilterOperation read FOperation write FOperation;\r\n end;\r\n\r\n {$IFDEF WEBLIB}\r\n TTMSFNCTableViewFilter = class(TTMSFNCOwnedCollection)\r\n {$ENDIF}\r\n {$IFNDEF WEBLIB}\r\n TTMSFNCTableViewFilter = class({$IFDEF LCLLIB}specialize {$ENDIF}TTMSFNCOwnedCollection)\r\n {$ENDIF}\r\n private\r\n FOwner: TTMSFNCCustomTableView;\r\n function GetItem(Index: Integer): TTMSFNCTableViewFilterData;\r\n procedure SetItem(Index: Integer; const Value: TTMSFNCTableViewFilterData);\r\n public\r\n constructor Create(AOwner: TTMSFNCCustomTableView);\r\n function Add: TTMSFNCTableViewFilterData;\r\n function Insert(index: Integer): TTMSFNCTableViewFilterData;\r\n property Items[Index: Integer]: TTMSFNCTableViewFilterData read GetItem write SetItem; default;\r\n end;\r\n\r\n TTMSFNCTableViewBeforeApplyFilterEvent = procedure(Sender: TObject; AFilter: TTMSFNCTableViewFilterData; var AAllow: Boolean) of object;\r\n TTMSFNCTableViewAfterApplyFilterEvent = procedure(Sender: TObject; AFilter: TTMSFNCTableViewFilterData) of object;\r\n\r\n {$IFDEF WEBLIB}\r\n TTMSFNCTreeViewTableViewFloatingNodes = class(TObjectList)\r\n private\r\n function GetItem(Index: Integer): TTMSFNCTreeViewVirtualNode;\r\n procedure SetItem(Index: Integer; const Value: TTMSFNCTreeViewVirtualNode);\r\n public\r\n property Items[Index: Integer]: TTMSFNCTreeViewVirtualNode read GetItem write SetItem; default;\r\n end;\r\n {$ENDIF}\r\n {$IFNDEF WEBLIB}\r\n TTMSFNCTreeViewTableViewFloatingNodes = class(TObjectList);\r\n {$ENDIF}\r\n\r\n TTMSFNCTableViewMoreOption = class;\r\n\r\n TTMSFNCTreeViewTableView = class(TTMSFNCTreeView)\r\n private\r\n FDownMoreOption: TTMSFNCTableViewMoreOption;\r\n FMoreOffset, FMoreOffsetTo: Double;\r\n FMoreOffsetItem: TTMSFNCTableViewItem;\r\n FDownAction: Boolean;\r\n FDownCount: Integer;\r\n FDownTimer: Boolean;\r\n FDownX, FDownY: Single;\r\n FAnimTimer: TTimer;\r\n FAnimateMoreOptions, FAnimateMoreOptionsClose: Boolean;\r\n FMouseDownOnAccessory: Boolean;\r\n FMouseDownOnBitmap: Boolean;\r\n FAnimMarqueeSwitch: Boolean;\r\n FAnimMarqueeStartAngle, FAnimMarqueeSweepAngle, FAnimShiftAngle: Single;\r\n FManualProgressSweepAngle, FManualProgressStartAngle: Single;\r\n FReloadActive: Boolean;\r\n FMouseDownOnLookupBar: Boolean;\r\n FTableView: TTMSFNCCustomTableView;\r\n FFloatingNodes: TTMSFNCTreeViewTableViewFloatingNodes;\r\n FOnFooterAnchorClick: TTMSFNCTableViewAnchorHeaderFooterClick;\r\n FOnHeaderAnchorClick: TTMSFNCTableViewAnchorHeaderFooterClick;\r\n protected\r\n procedure AnimateTimerChanged(Sender: TObject);\r\n procedure OffsetNodeRects(ANode: TTMSFNCTreeViewVirtualNode; AX, AY: Single; var ARect: TRectF); override;\r\n procedure GetNodeMargins(var ALeft, ATop, ARight, ABottom: Single); override;\r\n function GetVScrollOffset: Single; override;\r\n function GetNodesSpacing(ANode: TTMSFNCTreeViewVirtualNode): Single; override;\r\n procedure DoGetNodeRounding(ANode: TTMSFNCTreeViewVirtualNode; var ARounding: Integer; var ACorners: TTMSFNCGraphicsCorners); override;\r\n procedure CustomizeNodeCache({%H-}AGraphics: TTMSFNCGraphics; {%H-}AStartY: Single); override;\r\n procedure CustomizeScrollPosition({%H-}ANode: TTMSFNCTreeViewVirtualNode; var {%H-}APosition, {%H-}ATopPosition: Double); override;\r\n procedure DrawLookupBar(AGraphics: TTMSFNCGraphics; {%H-}ARect: TRectF); virtual;\r\n procedure DrawReload(AGraphics: TTMSFNCGraphics; {%H-}ARect: TRectF); virtual;\r\n procedure HandleMouseUp(Button: TTMSFNCMouseButton; Shift: TShiftState; X, Y: Single); override;\r\n procedure HandleMouseDown(Button: TTMSFNCMouseButton; Shift: TShiftState; X, Y: Single); override;\r\n procedure HandleMouseMove(Shift: TShiftState; X, Y: Single); override;\r\n procedure HandleKeyDown(var Key: Word; Shift: TShiftState); override;\r\n procedure ProcessLookup(X, Y: Single; DoLookup: Boolean = True); virtual;\r\n procedure StartReload; override;\r\n procedure UpdateCheckState({%H-}ANode: TTMSFNCTreeViewVirtualNode; {%H-}AColumn: Integer; {%H-}AChecked: Boolean); override;\r\n function ScrollLimitation: Boolean; override;\r\n function NeedsReload(AVerticalOffset: Single): Boolean; override;\r\n function GetReloadOffset: Single; override;\r\n function GetNodesRect: TRectF; override;\r\n function GetContentRect: TRectF; override;\r\n function GetCategoryAtXY(X, Y: Single): Integer; virtual;\r\n function GetLookupBarRect: TRectF; virtual;\r\n function GetContentClipRect: TRectF; override;\r\n function CanApplyVerticalOffset: Boolean; override;\r\n function XYToHeaderAnchor(X, Y: Single): string;\r\n function XYToFooterAnchor(X, Y: Single): string;\r\n procedure DoHeaderAnchorClick(AAnchor: String); virtual;\r\n procedure DoFooterAnchorClick(AAnchor: String); virtual;\r\n property OnFooterAnchorClick: TTMSFNCTableViewAnchorHeaderFooterClick read FOnFooterAnchorClick write FOnFooterAnchorClick;\r\n property OnHeaderAnchorClick: TTMSFNCTableViewAnchorHeaderFooterClick read FOnHeaderAnchorClick write FOnHeaderAnchorClick;\r\n public\r\n constructor Create(AOwner: TComponent); override;\r\n destructor Destroy; override;\r\n procedure Draw(AGraphics: TTMSFNCGraphics; ARect: TRectF); override;\r\n function GetTotalColumnNodeWidth: Double; override;\r\n function GetColumnWidth(AColumn: Integer): Double; override;\r\n property CustomScrollBars;\r\n end;\r\n\r\n TTMSFNCTableViewDisplayItemKind = (tvikNone, tvikItem, tvikCategory);\r\n\r\n TTMSFNCTableViewDisplayItem = record\r\n Kind: TTMSFNCTableViewDisplayItemKind;\r\n Item: TTMSFNCTableViewItem;\r\n CategoryID: Integer;\r\n Row: Integer;\r\n Text: string;\r\n {$IFDEF LCLLIB}\r\n class operator = (z1, z2 : TTMSFNCTableViewDisplayItem) b : boolean;\r\n {$ENDIF}\r\n end;\r\n\r\n {$IFDEF WEBLIB}\r\n TTMSFNCTableViewDisplayList = class(TList)\r\n private\r\n function GetItem(Index: Integer): TTMSFNCTableViewDisplayItem;\r\n procedure SetItem(Index: Integer; const Value: TTMSFNCTableViewDisplayItem);\r\n public\r\n property Items[Index: Integer]: TTMSFNCTableViewDisplayItem read GetItem write SetItem; default;\r\n end;\r\n {$ENDIF}\r\n {$IFNDEF WEBLIB}\r\n TTMSFNCTableViewDisplayList = class(TList);\r\n {$ENDIF}\r\n\r\n TTMSFNCTableViewLookupBarDisplayItem = record\r\n Rect: TRectF;\r\n Text: string;\r\n Active: Boolean;\r\n {$IFDEF LCLLIB}\r\n class operator = (z1, z2 : TTMSFNCTableViewLookupBarDisplayItem) b : boolean;\r\n {$ENDIF}\r\n end;\r\n\r\n {$IFDEF WEBLIB}\r\n TTMSFNCTableViewLookupBarDisplayList = class(TList)\r\n private\r\n function GetItem(Index: Integer): TTMSFNCTableViewLookupBarDisplayItem;\r\n procedure SetItem(Index: Integer; const Value: TTMSFNCTableViewLookupBarDisplayItem);\r\n public\r\n property Items[Index: Integer]: TTMSFNCTableViewLookupBarDisplayItem read GetItem write SetItem; default;\r\n end;\r\n {$ENDIF}\r\n {$IFNDEF WEBLIB}\r\n TTMSFNCTableViewLookupBarDisplayList = class(TList);\r\n {$ENDIF}\r\n\r\n TTMSFNCTableViewLookupBarPosition = (tvlbpLeft, tvlbpRight);\r\n\r\n TTMSFNCTableViewLookupBar = class(TPersistent)\r\n private\r\n FTableView: TTMSFNCCustomTableView;\r\n FVisible: Boolean;\r\n FFont: TTMSFNCGraphicsFont;\r\n FAutoLookup: Boolean;\r\n FFill: TTMSFNCGraphicsFill;\r\n FStroke: TTMSFNCGraphicsStroke;\r\n FWidth: Single;\r\n FPosition: TTMSFNCTableViewLookupBarPosition;\r\n FDownFill: TTMSFNCGraphicsFill;\r\n FDownStroke: TTMSFNCGraphicsStroke;\r\n FInActiveFont: TTMSFNCGraphicsFont;\r\n FIncludeFilteredItems: Boolean;\r\n procedure SetVisible(const Value: Boolean);\r\n procedure SetFont(const Value: TTMSFNCGraphicsFont);\r\n procedure SetAutoLookup(const Value: Boolean);\r\n procedure SetFill(const Value: TTMSFNCGraphicsFill);\r\n procedure SetStroke(const Value: TTMSFNCGraphicsStroke);\r\n function IsWidthStored: Boolean;\r\n procedure SetPosition(const Value: TTMSFNCTableViewLookupBarPosition);\r\n procedure SetWidth(const Value: Single);\r\n procedure SetDownFill(const Value: TTMSFNCGraphicsFill);\r\n procedure SetDownStroke(const Value: TTMSFNCGraphicsStroke);\r\n procedure SetInActiveFont(const Value: TTMSFNCGraphicsFont);\r\n protected\r\n procedure FontChanged(Sender: TObject);\r\n procedure StrokeChanged(Sender: TObject);\r\n procedure FillChanged(Sender: TObject);\r\n public\r\n constructor Create(ATableView: TTMSFNCCustomTableView);\r\n destructor Destroy; override;\r\n procedure Assign(Source: TPersistent); override;\r\n published\r\n property IncludeFilteredItems: Boolean read FIncludeFilteredItems write FIncludeFilteredItems default True;\r\n property Width: Single read FWidth write SetWidth stored IsWidthStored nodefault;\r\n property Position: TTMSFNCTableViewLookupBarPosition read FPosition write SetPosition default tvlbpRight;\r\n property Visible: Boolean read FVisible write SetVisible default True;\r\n property Font: TTMSFNCGraphicsFont read FFont write SetFont;\r\n property InActiveFont: TTMSFNCGraphicsFont read FInActiveFont write SetInActiveFont;\r\n property AutoLookup: Boolean read FAutoLookup write SetAutoLookup default True;\r\n property Fill: TTMSFNCGraphicsFill read FFill write SetFill;\r\n property Stroke: TTMSFNCGraphicsStroke read FStroke write SetStroke;\r\n property DownFill: TTMSFNCGraphicsFill read FDownFill write SetDownFill;\r\n property DownStroke: TTMSFNCGraphicsStroke read FDownStroke write SetDownStroke;\r\n end;\r\n\r\n TTMSFNCTableViewReloadProgressMode = (tvrpmMarquee, tvrpmMarqueeAlternate, tvrpmManual);\r\n\r\n TTMSFNCTableViewReload = class(TPersistent)\r\n private\r\n FTableView: TTMSFNCCustomTableView;\r\n FOffset: Single;\r\n FEnabled: Boolean;\r\n FStroke: TTMSFNCGraphicsStroke;\r\n FSize: Single;\r\n FProgressMode: TTMSFNCTableViewReloadProgressMode;\r\n function IsOffsetStored: Boolean;\r\n procedure SetOffset(const Value: Single);\r\n procedure SetEnabled(const Value: Boolean);\r\n procedure SetStroke(const Value: TTMSFNCGraphicsStroke);\r\n function IsSizeStored: Boolean;\r\n procedure SetSize(const Value: Single);\r\n procedure SetProgressMode(const Value: TTMSFNCTableViewReloadProgressMode);\r\n public\r\n constructor Create(ATableView: TTMSFNCCustomTableView);\r\n destructor Destroy; override;\r\n procedure Assign(Source: TPersistent); override;\r\n published\r\n property Offset: Single read FOffset write SetOffset stored IsOffsetStored nodefault;\r\n property Enabled: Boolean read FEnabled write SetEnabled default False;\r\n property Stroke: TTMSFNCGraphicsStroke read FStroke write SetStroke;\r\n property Size: Single read FSize write SetSize stored IsSizeStored nodefault;\r\n property ProgressMode: TTMSFNCTableViewReloadProgressMode read FProgressMode write SetProgressMode default tvrpmMarquee;\r\n end;\r\n\r\n TTMSFNCTableViewCategory = class(TCollectionItem)\r\n private\r\n FTableView: TTMSFNCCustomTableView;\r\n FText: String;\r\n FID: integer;\r\n FLookupText: String;\r\n FDataPointer: Pointer;\r\n FDataBoolean: Boolean;\r\n FDBKey: String;\r\n FDataString: String;\r\n FDataObject: TObject;\r\n FDataInteger: NativeInt;\r\n procedure SetText(const Value: String);\r\n procedure SetId(const Value: integer);\r\n procedure SetLookupText(const Value: String);\r\n function GetStrippedHTMLText: String;\r\n protected\r\n procedure Changed;\r\n public\r\n constructor Create(ACollection: TCollection); override;\r\n destructor Destroy; override;\r\n procedure Assign(Source: TPersistent); override;\r\n property DataPointer: Pointer read FDataPointer write FDataPointer;\r\n property DataBoolean: Boolean read FDataBoolean write FDataBoolean;\r\n property DataObject: TObject read FDataObject write FDataObject;\r\n property DataString: String read FDataString write FDataString;\r\n property DataInteger: NativeInt read FDataInteger write FDataInteger;\r\n property DBKey: String read FDBKey write FDBKey;\r\n property StrippedHTMLText: String read GetStrippedHTMLText;\r\n published\r\n property Text: String read FText write SetText;\r\n property LookupText: String read FLookupText write SetLookupText;\r\n property Id: integer read FID write SetId;\r\n end;\r\n\r\n TTMSFNCTableViewCategoriesSortMode = (tvcsmAscending, tvcsmDescending);\r\n\r\n {$IFDEF WEBLIB}\r\n TTMSFNCTableViewCategories = class(TTMSFNCOwnedCollection)\r\n {$ENDIF}\r\n {$IFNDEF WEBLIB}\r\n TTMSFNCTableViewCategories = class({$IFDEF LCLLIB}specialize {$ENDIF}TTMSFNCOwnedCollection)\r\n {$ENDIF}\r\n private\r\n FTableView: TTMSFNCCustomTableView;\r\n FOnChange: TNotifyEvent;\r\n function GetItem(Index: Integer): TTMSFNCTableViewCategory;\r\n procedure SetItem(Index: Integer; const Value: TTMSFNCTableViewCategory);\r\n protected\r\n property OnChange: TNotifyEvent read FOnChange write FOnChange;\r\n function Compare(AItem1, AItem2: TTMSFNCTableViewCategory; ACaseSensitive: Boolean = True; ASortingMode: TTMSFNCTableViewCategoriesSortMode = tvcsmAscending): Integer; virtual;\r\n procedure QuickSort(L, R: Integer; ACaseSensitive: Boolean = True; ASortingMode: TTMSFNCTableViewCategoriesSortMode = tvcsmAscending); virtual;\r\n public\r\n constructor Create(ATableView: TTMSFNCCustomTableView);\r\n property Items[Index: Integer]: TTMSFNCTableViewCategory read GetItem write SetItem; default;\r\n function ItemById(id: integer): TTMSFNCTableViewCategory;\r\n function ItemIndexById(id: integer): integer;\r\n function Add: TTMSFNCTableViewCategory;\r\n function Insert(Index: Integer): TTMSFNCTableViewCategory;\r\n procedure Delete(Index: Integer);\r\n procedure Sort(ACaseSensitive: Boolean = True; ASortingMode: TTMSFNCTableViewCategoriesSortMode = tvcsmAscending);\r\n procedure Clear;\r\n end;\r\n\r\n TTMSFNCTableViewMoreOption = class(TCollectionItem)\r\n private\r\n FTableView: TTMSFNCCustomTableView;\r\n FText: String;\r\n FDataPointer: Pointer;\r\n FDataBoolean: Boolean;\r\n FDBKey: String;\r\n FDataString: String;\r\n FDataObject: TObject;\r\n FDataInteger: NativeInt;\r\n FWidth: Single;\r\n FColor: TTMSFNCGraphicsColor;\r\n FFontColor: TTMSFNCGraphicsColor;\r\n FBorderColor: TTMSFNCGraphicsColor;\r\n procedure SetText(const Value: String);\r\n function GetStrippedHTMLText: String;\r\n function IsWidthStored: Boolean;\r\n procedure SetWidth(const Value: Single);\r\n procedure SetColor(const Value: TTMSFNCGraphicsColor);\r\n procedure SetFontColor(const Value: TTMSFNCGraphicsColor);\r\n procedure SetBorderColor(const Value: TTMSFNCGraphicsColor);\r\n protected\r\n procedure Changed;\r\n public\r\n constructor Create(ACollection: TCollection); override;\r\n destructor Destroy; override;\r\n procedure Assign(Source: TPersistent); override;\r\n property DataPointer: Pointer read FDataPointer write FDataPointer;\r\n property DataBoolean: Boolean read FDataBoolean write FDataBoolean;\r\n property DataObject: TObject read FDataObject write FDataObject;\r\n property DataString: String read FDataString write FDataString;\r\n property DataInteger: NativeInt read FDataInteger write FDataInteger;\r\n property DBKey: String read FDBKey write FDBKey;\r\n property StrippedHTMLText: String read GetStrippedHTMLText;\r\n published\r\n property Text: String read FText write SetText;\r\n property Width: Single read FWidth write SetWidth stored IsWidthStored nodefault;\r\n property Color: TTMSFNCGraphicsColor read FColor write SetColor default gcNull;\r\n property BorderColor: TTMSFNCGraphicsColor read FBorderColor write SetBorderColor default gcNull;\r\n property FontColor: TTMSFNCGraphicsColor read FFontColor write SetFontColor default gcNull;\r\n end;\r\n\r\n {$IFDEF WEBLIB}\r\n TTMSFNCTableViewMoreOptions = class(TTMSFNCOwnedCollection)\r\n {$ENDIF}\r\n {$IFNDEF WEBLIB}\r\n TTMSFNCTableViewMoreOptions = class({$IFDEF LCLLIB}specialize {$ENDIF}TTMSFNCOwnedCollection)\r\n {$ENDIF}\r\n private\r\n FTableView: TTMSFNCCustomTableView;\r\n FOnChange: TNotifyEvent;\r\n function GetItem(Index: Integer): TTMSFNCTableViewMoreOption;\r\n procedure SetItem(Index: Integer; const Value: TTMSFNCTableViewMoreOption);\r\n protected\r\n property OnChange: TNotifyEvent read FOnChange write FOnChange;\r\n public\r\n constructor Create(ATableView: TTMSFNCCustomTableView);\r\n property Items[Index: Integer]: TTMSFNCTableViewMoreOption read GetItem write SetItem; default;\r\n function ItemById(id: integer): TTMSFNCTableViewMoreOption;\r\n function ItemIndexById(id: integer): integer;\r\n function Add: TTMSFNCTableViewMoreOption;\r\n function Insert(Index: Integer): TTMSFNCTableViewMoreOption;\r\n procedure Delete(Index: Integer);\r\n procedure Clear;\r\n end;\r\n\r\n TTMSFNCTableViewCategoryType = (tvctNone, tvctAlphaBetic, tvctAlphaNumericFirst, tvctAlphaNumericLast, tvctCustom);\r\n\r\n TTMSFNCTableViewLookupCategoryEvent = procedure(Sender: TObject; ACharacter: String; ACharacterID: Integer) of object;\r\n TTMSFNCTableViewDrawItemCustomAccessoryEvent = procedure(Sender: TObject; AGraphics: TTMSFNCGraphics; ARect: TRectF; AItem: TTMSFNCTableViewItem) of object;\r\n TTMSFNCTableViewItemMoreOptionClickEvent = procedure(Sender: TObject; AItem: TTMSFNCTableViewItem; AMoreOption: TTMSFNCTableViewMoreOption) of object;\r\n TTMSFNCTableViewBeforeDrawItemMoreOptionEvent = procedure(Sender: TObject; AGraphics: TTMSFNCGraphics; ARect: TRectF; AItem: TTMSFNCTableViewItem; AMoreOption: TTMSFNCTableViewMoreOption; var ADefaultDraw: Boolean) of object;\r\n TTMSFNCTableViewAfterDrawItemMoreOptionEvent = procedure(Sender: TObject; AGraphics: TTMSFNCGraphics; ARect: TRectF; AItem: TTMSFNCTableViewItem; AMoreOption: TTMSFNCTableViewMoreOption) of object;\r\n TTMSFNCTableViewBeforeItemShowDetailControl = procedure(Sender: TObject; AItem: TTMSFNCTableViewItem; ADetailControl: TControl; var AAllow: Boolean) of object;\r\n TTMSFNCTableViewBeforeItemHideDetailControl = procedure(Sender: TObject; AItem: TTMSFNCTableViewItem; ADetailControl: TControl; var AAllow: Boolean) of object;\r\n TTMSFNCTableViewItemShowDetailControl = procedure(Sender: TObject; AItem: TTMSFNCTableViewItem; ADetailControl: TControl) of object;\r\n TTMSFNCTableViewItemHideDetailControl = procedure(Sender: TObject; AItem: TTMSFNCTableViewItem; ADetailControl: TControl) of object;\r\n\r\n TTMSFNCTableViewItemArray = array of TTMSFNCTableViewItem;\r\n TTMSFNCTableViewCheckedItems = TTMSFNCTableViewItemArray;\r\n TTMSFNCTableViewSelectedItems = TTMSFNCTableViewItemArray;\r\n\r\n TTMSFNCTableViewCustomChar = class\r\n private\r\n FID: Integer;\r\n FActive: Boolean;\r\n public\r\n constructor Create(AID: Integer; AActive: Boolean);\r\n property ID: Integer read FID write FID;\r\n property Active: Boolean read FActive write FActive;\r\n end;\r\n\r\n {$IFDEF WEBLIB}\r\n TTMSFNCTableViewCustomCharList = class(TObjectList)\r\n private\r\n function GetItem(Index: Integer): TTMSFNCTableViewCustomChar;\r\n procedure SetItem(Index: Integer; const Value: TTMSFNCTableViewCustomChar);\r\n public\r\n property Items[Index: Integer]: TTMSFNCTableViewCustomChar read GetItem write SetItem; default;\r\n {$ENDIF}\r\n {$IFNDEF WEBLIB}\r\n TTMSFNCTableViewCustomCharList = class(TObjectList)\r\n public\r\n {$ENDIF}\r\n procedure ActivateID(AID: Integer);\r\n function IsIDActive(AID: Integer): Boolean;\r\n end;\r\n\r\n TTMSFNCTableViewEdit = class(TTMSFNCEdit)\r\n private\r\n FTableView: TTMSFNCCustomTableView;\r\n protected\r\n {$IFDEF FMXLIB}\r\n procedure KeyDown(var Key: Word; var KeyChar: WideChar; Shift: TShiftState); override;\r\n {$ENDIF}\r\n {$IFDEF CMNWEBLIB}\r\n procedure KeyDown(var Key: Word; Shift: TShiftState); override;\r\n {$ENDIF}\r\n end;\r\n\r\n {$IFDEF FNCLIB}\r\n TTMSFNCCustomTableView = class(TTMSFNCCustomControl, ITMSFNCStylesManager, ITMSFNCBitmapContainer, ITMSFNCControlPickerFull, ITMSFNCAppearanceGlobalFont)\r\n {$ENDIF}\r\n {$IFNDEF FNCLIB}\r\n TTMSFNCCustomTableView = class(TTMSFNCCustomControl, ITMSFNCAppearanceGlobalFont)\r\n {$ENDIF}\r\n private\r\n FFilterTime: Integer;\r\n FFirstLoad: Boolean;\r\n FFilterTimer: TTimer;\r\n FFilterActive: Boolean;\r\n FEditMode: Boolean;\r\n FDoneButton, FEditButton, FBackButton, FFilterButton: TTMSFNCToolBarButton;\r\n FEdit: TTMSFNCTableViewEdit;\r\n FActiveAccessoryItem, FActiveBitmapItem: TTMSFNCTableViewItem;\r\n FDetailControlTimer: TTimer;\r\n FDetailControlOffset: Double;\r\n FShowDetailControl: Boolean;\r\n FActiveDetailControl: TControl;\r\n FActiveDetailItem: TTMSFNCTableViewItem;\r\n FCustomChar: TTMSFNCTableViewCustomCharList;\r\n FLookupBarDisplayList: TTMSFNCTableViewLookupBarDisplayList;\r\n FFilterApplied: Boolean;\r\n FUpdateCount: Integer;\r\n FDisplayList: TTMSFNCTableViewDisplayList;\r\n FCategoryList: TTMSFNCTableViewDisplayList;\r\n FSaveSelectedItem: Integer;\r\n FSaveSelectedItems: TTMSFNCTableViewIntegerArray;\r\n FCopyItems: TTMSFNCTableViewCopyItems;\r\n FAccepted: Boolean;\r\n FItems: TTMSFNCTableViewItems;\r\n FTreeView: TTMSFNCTreeViewTableView;\r\n FColumn: TTMSFNCTreeViewColumn;\r\n FDefaultItem: TTMSFNCTableViewItem;\r\n FItemAppearance: TTMSFNCTableViewItemAppearance;\r\n FOnItemSelected: TTMSFNCTableViewItemSelectedEvent;\r\n FInteraction: TTMSFNCTableViewInteraction;\r\n FHeader: TTMSFNCTableViewHeader;\r\n FFooter: TTMSFNCTableViewFooter;\r\n FOnItemAnchorClick: TTMSFNCTableViewItemAnchorClickEvent;\r\n FOnAfterCutToClipboard: TTMSFNCTableViewAfterCutToClipboardEvent;\r\n FOnBeforePasteFromClipboard: TTMSFNCTableViewBeforePasteFromClipboardEvent;\r\n FOnAfterReorderItem: TTMSFNCTableViewAfterReorderItemEvent;\r\n FOnBeforeDropItem: TTMSFNCTableViewBeforeDropItemEvent;\r\n FOnBeforeDrawItemText: TTMSFNCTableViewBeforeDrawItemTextEvent;\r\n FOnVScroll: TTMSFNCTableViewScrollEvent;\r\n FOnBeforeCopyToClipboard: TTMSFNCTableViewBeforeCopyToClipboardEvent;\r\n FOnItemDblClick: TTMSFNCTableViewItemClickEvent;\r\n FOnBeforeDrawItemCheck: TTMSFNCTableViewBeforeDrawItemCheckEvent;\r\n FOnAfterDrawItemIcon: TTMSFNCTableViewAfterDrawItemIconEvent;\r\n FOnBeforeDrawItem: TTMSFNCTableViewBeforeDrawItemEvent;\r\n FOnAfterPasteFromClipboard: TTMSFNCTableViewAfterPasteFromClipboardEvent;\r\n FOnItemClick: TTMSFNCTableViewItemClickEvent;\r\n FOnAfterDropItem: TTMSFNCTableViewAfterDropItemEvent;\r\n FOnAfterDrawItemText: TTMSFNCTableViewAfterDrawItemTextEvent;\r\n FOnItemCompare: TTMSFNCTableViewItemCompareEvent;\r\n FOnBeforeCutToClipboard: TTMSFNCTableViewBeforeCutToClipboardEvent;\r\n FOnBeforeReorderItem: TTMSFNCTableViewBeforeReorderItemEvent;\r\n FOnNeedFilterDropDownData: TTMSFNCTableViewNeedFilterDropDownDataEvent;\r\n FOnAfterCopyToClipboard: TTMSFNCTableViewAfterCopyToClipboardEvent;\r\n FOnFilterSelect: TTMSFNCTableViewFilterSelectEvent;\r\n FOnAfterDrawItemCheck: TTMSFNCTableViewAfterDrawItemCheckEvent;\r\n FOnAfterDrawItem: TTMSFNCTableViewAfterDrawItemEvent;\r\n FOnBeforeDrawItemIcon: TTMSFNCTableViewBeforeDrawItemIconEvent;\r\n FFilter: TTMSFNCTableViewFilter;\r\n FOnBeforeDrawSortIndicator: TTMSFNCTableViewBeforeDrawSortIndicatorEvent;\r\n FOnAfterDrawSortIndicator: TTMSFNCTableViewAfterDrawSortIndicatorEvent;\r\n FOnGetHTMLTemplateValue: TTMSFNCTableViewGetHTMLTemplateValueEvent;\r\n FOnGetHTMLTemplate: TTMSFNCTableViewGetHTMLTemplateEvent;\r\n FCategoryType: TTMSFNCTableViewCategoryType;\r\n FCategories: TTMSFNCTableViewCategories;\r\n FOnCategoryCompare: TTMSFNCTableViewCategoryCompareEvent;\r\n FLookupBar: TTMSFNCTableViewLookupBar;\r\n FOnManualLookupCategory: TTMSFNCTableViewLookupCategoryEvent;\r\n FOnCategoryClick: TTMSFNCTableViewLookupCategoryEvent;\r\n FReload: TTMSFNCTableViewReload;\r\n FOnStopReload: TNotifyEvent;\r\n FOnStartReload: TNotifyEvent;\r\n FOnDrawItemCustomAccessory: TTMSFNCTableViewDrawItemCustomAccessoryEvent;\r\n FOnItemAccessoryClick: TTMSFNCTableViewItemClickEvent;\r\n FCategoryAppearance: TTMSFNCTableViewCategoryAppearance;\r\n FOnItemCheckChanged: TTMSFNCTableViewItemCheckChangedEvent;\r\n FOnAfterApplyFilter: TTMSFNCTableViewAfterApplyFilterEvent;\r\n FOnBeforeApplyFilter: TTMSFNCTableViewBeforeApplyFilterEvent;\r\n FMoreOptions: TTMSFNCTableViewMoreOptions;\r\n FMoreOptionAppearance: TTMSFNCTableViewMoreOptionAppearance;\r\n FOnItemMoreOptionClick: TTMSFNCTableViewItemMoreOptionClickEvent;\r\n FOnAfterDrawItemMoreOption: TTMSFNCTableViewAfterDrawItemMoreOptionEvent;\r\n FOnBeforeDrawItemMoreOption: TTMSFNCTableViewBeforeDrawItemMoreOptionEvent;\r\n FOnItemShowDetailControl: TTMSFNCTableViewItemShowDetailControl;\r\n FOnItemHideDetailControl: TTMSFNCTableViewItemHideDetailControl;\r\n FOnBeforeItemShowDetailControl: TTMSFNCTableViewBeforeItemShowDetailControl;\r\n FOnBeforeItemHideDetailControl: TTMSFNCTableViewBeforeItemHideDetailControl;\r\n FOnItemSelectionChanged: TTMSFNCTableViewItemSelectionChangedEvent;\r\n FOnItemUnSelected: TTMSFNCTableViewItemUnSelectedEvent;\r\n FOnAfterDrawItemTitle: TTMSFNCTableViewAfterDrawItemTitleEvent;\r\n FOnBeforeDrawItemTitle: TTMSFNCTableViewBeforeDrawItemTitleEvent;\r\n FOnItemMouseLeave: TTMSFNCTableViewItemMouseLeaveEvent;\r\n FOnItemMouseEnter: TTMSFNCTableViewItemMouseEnterEvent;\r\n FOnFooterAnchorClick: TTMSFNCTableViewAnchorHeaderFooterClick;\r\n FOnHeaderAnchorClick: TTMSFNCTableViewAnchorHeaderFooterClick;\r\n FOnItemTitleAnchorClick: TTMSFNCTableViewItemAnchorClickEvent;\r\n FGlobalFont: TTMSFNCAppearanceGlobalFont;\r\n FLayoutMode: TTMSFNCTableViewLayoutMode;\r\n FGroupAppearance: TTMSFNCTableViewGroupAppearance;\r\n FOnItemBitmapClick: TTMSFNCTableViewItemClickEvent;\r\n procedure SetItems(const Value: TTMSFNCTableViewItems);\r\n procedure SetDefaultItem(const Value: TTMSFNCTableViewItem);\r\n procedure SetItemAppearance(const Value: TTMSFNCTableViewItemAppearance);\r\n function GetItemIndex: Integer;\r\n procedure SetItemIndex(const Value: Integer);\r\n procedure SetInteraction(const Value: TTMSFNCTableViewInteraction);\r\n function GetBitmapContainer: TTMSFNCBitmapContainer;\r\n procedure SetBitmapContainer(const Value: TTMSFNCBitmapContainer);\r\n procedure SetHeader(const Value: TTMSFNCTableViewHeader);\r\n procedure SetFooter(const Value: TTMSFNCTableViewFooter);\r\n function GetSelectedItem: TTMSFNCTableViewItem;\r\n procedure SetSelectedItem(const Value: TTMSFNCTableViewItem);\r\n function GetSelItem(AIndex: Integer): TTMSFNCTableViewItem;\r\n function GetVerticalScrollBarVisible: Boolean;\r\n procedure SetVerticalScrollBarVisible(const Value: Boolean);\r\n function GetFill: TTMSFNCGraphicsFill;\r\n function GetStroke: TTMSFNCGraphicsStroke;\r\n procedure SetFill(const Value: TTMSFNCGraphicsFill);\r\n procedure SetStroke(const Value: TTMSFNCGraphicsStroke);\r\n procedure SetCategoryType(const Value: TTMSFNCTableViewCategoryType);\r\n procedure SetCategories(const Value: TTMSFNCTableViewCategories);\r\n procedure SetLookupBar(const Value: TTMSFNCTableViewLookupBar);\r\n procedure SetReload(const Value: TTMSFNCTableViewReload);\r\n procedure SetCategoryAppearance(\r\n const Value: TTMSFNCTableViewCategoryAppearance);\r\n function GetChecked(AItemIndex: Integer): Boolean;\r\n function GetCheckedItem(AItem: TTMSFNCTableViewItem): Boolean;\r\n procedure SetChecked(AItemIndex: Integer; const Value: Boolean);\r\n procedure SetCheckedItem(AItem: TTMSFNCTableViewItem;\r\n const Value: Boolean);\r\n procedure SetMoreOptions(const Value: TTMSFNCTableViewMoreOptions);\r\n procedure SetMoreOptionAppearance(const Value: TTMSFNCTableViewMoreOptionAppearance);\r\n procedure SetGlobalFont(const Value: TTMSFNCAppearanceGlobalFont);\r\n procedure SetLayoutMode(const Value: TTMSFNCTableViewLayoutMode);\r\n procedure SetGroupApperance(const Value: TTMSFNCTableViewGroupAppearance);\r\n function GetPrecalculateItems: Boolean;\r\n procedure SetPrecalculateItems(const Value: Boolean);\r\n function GetFilterTimer: TTimer;\r\n function GetDisplayItem(AIndex: Integer): TTMSFNCTableViewDisplayItem;\r\n function GetDisplayItemCount: Integer;\r\n procedure DoItemBitmapClick(AItem: TTMSFNCTableViewItem);\r\n protected\r\n {$IFDEF FNCLIB}\r\n function GetSubComponentArray: TTMSFNCStylesManagerComponentArray;\r\n {$ENDIF}\r\n function GetDocURL: string; override;\r\n function GetVersion: string; override;\r\n function GetItemsRect: TRectF; virtual;\r\n function CreateTreeView: TTMSFNCTreeViewTableView; virtual;\r\n function CreateItems: TTMSFNCTableViewItems; virtual;\r\n function GetRowForItemIndex(AItemIndex: Integer): Integer; virtual;\r\n function GetDisplayCategoryIndex(AIndex: Integer): Integer; virtual;\r\n function GetDisplayItemIndex(AIndex: Integer): Integer; virtual;\r\n function GetNextDisplayCategoryIndex(AIndex: Integer): Integer; virtual;\r\n function GetItemIndexForNode(ANode: TTMSFNCTreeViewVirtualNode): Integer; virtual;\r\n function GetItemForNode(ANode: TTMSFNCTreeViewVirtualNode): TTMSFNCTableViewItem; virtual;\r\n function GetNodeForItemIndex(AItemIndex: Integer): TTMSFNCTreeViewVirtualNode; virtual;\r\n function HTMLReplace(AValue: string; AItem: TTMSFNCTableViewItem): string;\r\n function ItemFromDifferentCategory(AItem1, AItem2: TTMSFNCTableViewItem): Boolean; virtual;\r\n function GetCharacterForItem(AItem: TTMSFNCTableViewItem): String; virtual;\r\n function GetCharacter(Idx: Integer): String; virtual;\r\n function GetCharacterCount: Integer; virtual;\r\n function FindCategoryWithCharacter(ACategory: String): TTMSFNCTableViewDisplayItem;\r\n function FindCategoryWithCharacterID(ACategoryID: Integer): TTMSFNCTableViewDisplayItem;\r\n function FindFirstItemWithCategory(ACategory: String; AIncludeFilteredItems: Boolean = True): TTMSFNCTableViewItem; virtual;\r\n function FindFirstItemWithCategoryID(ACategoryID: Integer; AIncludeFilteredItems: Boolean = True): TTMSFNCTableViewItem; virtual;\r\n function GetMoreOptionsSize: Single; virtual;\r\n function IsAppearanceProperty(AObject: TObject; APropertyName: string; APropertyType: TTypeKind): Boolean; override;\r\n procedure ChangeDPIScale(M, D: Integer); override;\r\n procedure DoEnter; override;\r\n procedure Loaded; override;\r\n procedure DoItemMoreOptionClick(AItem: TTMSFNCTableViewItem; AMoreOption: TTMSFNCTableViewMoreOption); virtual;\r\n procedure DoFilterButtonClicked(Sender: TObject); virtual;\r\n procedure DoEditButtonClicked(Sender: TObject); virtual;\r\n procedure DoEditChange(Sender: TObject); virtual;\r\n procedure DoBeforeApplyFilter(AFilter: TTMSFNCTableViewFilterData; AAllow: Boolean); virtual;\r\n procedure DoAfterApplyFilter(AFilter: TTMSFNCTableViewFilterData); virtual;\r\n procedure DoDoneButtonClicked(Sender: TObject); virtual;\r\n procedure DoBackButtonClicked(Sender: TObject); virtual;\r\n procedure DoItemAccessoryClick(AItem: TTMSFNCTableViewItem); virtual;\r\n procedure DoDetailControlTimer(Sender: TObject);\r\n procedure DoItemShowDetailControl(AItem: TTMSFNCTableViewItem; ADetailControl: TControl); virtual;\r\n procedure DoItemHideDetailControl(AItem: TTMSFNCTableViewItem; ADetailControl: TControl); virtual;\r\n procedure DoBeforeItemShowDetailControl(AItem: TTMSFNCTableViewItem; ADetailControl: TControl; var AAllow: Boolean); virtual;\r\n procedure DoBeforeItemHideDetailControl(AItem: TTMSFNCTableViewItem; ADetailControl: TControl; var AAllow: Boolean); virtual;\r\n procedure Notification(AComponent: TComponent; Operation: TOperation); override;\r\n procedure DoStartReload; virtual;\r\n procedure DoFilterTimer(Sender: TObject);\r\n procedure DoStopReload; virtual;\r\n procedure ScrollToCategoryId(ACategoryID: Integer); virtual;\r\n procedure ScrollToCategoryCharacter(ACharacter: String); virtual;\r\n procedure RegisterRuntimeClasses; override;\r\n procedure ApplyStyle; override;\r\n procedure UpdateControlAfterResize; override;\r\n procedure ResetToDefaultStyle; override;\r\n procedure SetAdaptToStyle(const Value: Boolean); override;\r\n procedure UpdateTableView(ADisplayOnly: Boolean = False); virtual;\r\n procedure CustomizeButtons; virtual;\r\n procedure SelectAllCheckedItems; virtual;\r\n procedure UnSelectAllItems; virtual;\r\n procedure CalculateItems; virtual;\r\n procedure CalculateLookupBar; virtual;\r\n function AddDisplayCategory(AItem: TTMSFNCTableViewItem): TTMSFNCTableViewDisplayItem; virtual;\r\n procedure AddDisplayItem(AItem: TTMSFNCTableViewItem); virtual;\r\n procedure DoClick(Sender: TObject);\r\n procedure DoGetNodeHeight(Sender: TObject; ANode: TTMSFNCTreeViewVirtualNode; {%H-}AColumn: Integer; var AHeight: Double); virtual;\r\n procedure DoGetNodeIcon(Sender: TObject; ANode: TTMSFNCTreeViewVirtualNode; {%H-}AColumn: Integer; {%H-}ALarge: Boolean; var AIcon: TTMSFNCBitmap); virtual;\r\n procedure DoGetNodeSides(Sender: TObject; ANode: TTMSFNCTreeViewVirtualNode; var ASides: TTMSFNCGraphicsSides); virtual;\r\n procedure DoGetColumnText(Sender: TObject; {%H-}AColumn: Integer; AKind: TTMSFNCTreeViewCacheItemKind; var AText: String); virtual;\r\n procedure DoGetColumnTrimming(Sender: TObject; {%H-}AColumn: Integer; AKind: TTMSFNCTreeViewCacheItemKind; var ATrimming: TTMSFNCGraphicsTextTrimming); virtual;\r\n procedure DoGetColumnWordWrapping(Sender: TObject; {%H-}AColumn: Integer; AKind: TTMSFNCTreeViewCacheItemKind; var AWordWrapping: Boolean); virtual;\r\n procedure DoGetColumnHorizontalTextAlign(Sender: TObject; {%H-}AColumn: Integer; AKind: TTMSFNCTreeViewCacheItemKind; var AHorizontalTextAlign: TTMSFNCGraphicsTextAlign); virtual;\r\n procedure DoGetColumnVerticalTextAlign(Sender: TObject; {%H-}AColumn: Integer; AKind: TTMSFNCTreeViewCacheItemKind; var AVerticalTextAlign: TTMSFNCGraphicsTextAlign); virtual;\r\n procedure DoIsNodeChecked(Sender: TObject; ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer; var AIsChecked: Boolean); virtual;\r\n procedure DoGetNodeCheckType(Sender: TObject; {%H-}ANode: TTMSFNCTreeViewVirtualNode; {%H-}AColumn: Integer; var ACheckType: TTMSFNCTreeViewNodeCheckType); virtual;\r\n procedure DoAfterCheckNode(Sender: TObject; ANode: TTMSFNCTreeViewVirtualNode; {%H-}AColumn: Integer); virtual;\r\n procedure DoAfterUnCheckNode(Sender: TObject; ANode: TTMSFNCTreeViewVirtualNode; {%H-}AColumn: Integer); virtual;\r\n procedure DoItemCheckChanged(AItem: TTMSFNCTableViewItem); virtual;\r\n procedure DoGetNumberOfNodes(Sender: TObject; ANode: TTMSFNCTreeViewVirtualNode; var ANumberOfNodes: Integer); virtual;\r\n procedure DoGetHTMLTemplateValue(AItem: TTMSFNCTableViewItem; AName: string; var AValue: string); virtual;\r\n procedure DoGetHTMLTemplate(AItem: TTMSFNCTableViewItem; var AHTMLTemplate: string); virtual;\r\n procedure DoIsNodeExtended(Sender: TObject; ANode: TTMSFNCTreeViewVirtualNode; var AExtended: Boolean); virtual;\r\n procedure DoGetNodeText(Sender: TObject; ANode: TTMSFNCTreeViewVirtualNode; {%H-}AColumn: Integer; {%H-}AMode: TTMSFNCTreeViewNodeTextMode; var AText: String); virtual;\r\n procedure DoGetNodeTitle(Sender: TObject; ANode: TTMSFNCTreeViewVirtualNode; {%H-}AColumn: Integer; {%H-}AMode: TTMSFNCTreeViewNodeTextMode; var ATitle: String); virtual;\r\n procedure DoGetNodeTitleExpanded(Sender: TObject; ANode: TTMSFNCTreeViewVirtualNode; {%H-}AColumn: Integer; var AExpanded: Boolean); virtual;\r\n procedure DoGetNodeTrimming(Sender: TObject; ANode: TTMSFNCTreeViewVirtualNode; {%H-}AColumn: Integer; var ATrimming: TTMSFNCGraphicsTextTrimming); virtual;\r\n procedure DoGetNodeTitleTrimming(Sender: TObject; ANode: TTMSFNCTreeViewVirtualNode; {%H-}AColumn: Integer; var ATrimming: TTMSFNCGraphicsTextTrimming); virtual;\r\n procedure DrawBadge(AGraphics: TTMSFNCGraphics; ARect: TRectF; AItem: TTMSFNCTableViewItem); virtual;\r\n procedure DoDrawNodeExtra(Sender: TObject; AGraphics: TTMSFNCGraphics; ARect: TRectF; {%H-}AColumn: Integer; ANode: TTMSFNCTreeViewVirtualNode); virtual;\r\n procedure DoDrawItemCustomAccessory(AGraphics: TTMSFNCGraphics; ARect: TRectF; AItem: TTMSFNCTableViewItem); virtual;\r\n procedure DoBeforeDrawItemMoreOption(AGraphics: TTMSFNCGraphics; ARect: TRectF; AItem: TTMSFNCTableViewItem; AMoreOption: TTMSFNCTableViewMoreOption; var ADefaultDraw: Boolean); virtual;\r\n procedure DoAfterDrawItemMoreOption(AGraphics: TTMSFNCGraphics; ARect: TRectF; AItem: TTMSFNCTableViewItem; AMoreOption: TTMSFNCTableViewMoreOption); virtual;\r\n procedure DoGetNodeWordWrapping(Sender: TObject; ANode: TTMSFNCTreeViewVirtualNode; {%H-}AColumn: Integer; var AWordWrapping: Boolean); virtual;\r\n procedure DoGetNodeTitleWordWrapping(Sender: TObject; ANode: TTMSFNCTreeViewVirtualNode; {%H-}AColumn: Integer; var AWordWrapping: Boolean); virtual;\r\n procedure DoGetNodeExtraSize(Sender: TObject; ANode: TTMSFNCTreeViewVirtualNode; {%H-}AColumn: Integer; var AExtraSize: Single); virtual;\r\n procedure DoGetNodeTitleHorizontalTextAlign(Sender: TObject; ANode: TTMSFNCTreeViewVirtualNode; {%H-}AColumn: Integer; var AHorizontalTextAlign: TTMSFNCGraphicsTextAlign); virtual;\r\n procedure DoGetNodeTitleVerticalTextAlign(Sender: TObject; {%H-}ANode: TTMSFNCTreeViewVirtualNode; {%H-}AColumn: Integer; var {%H-}AVerticalTextAlign: TTMSFNCGraphicsTextAlign); virtual;\r\n procedure DoGetNodeHorizontalTextAlign(Sender: TObject; ANode: TTMSFNCTreeViewVirtualNode; {%H-}AColumn: Integer; var AHorizontalTextAlign: TTMSFNCGraphicsTextAlign); virtual;\r\n procedure DoGetNodeVerticalTextAlign(Sender: TObject; {%H-}ANode: TTMSFNCTreeViewVirtualNode; {%H-}AColumn: Integer; var {%H-}AVerticalTextAlign: TTMSFNCGraphicsTextAlign); virtual;\r\n procedure DoGetNodeTextColor(Sender: TObject; ANode: TTMSFNCTreeViewVirtualNode; {%H-}AColumn: Integer; var ATextColor: TTMSFNCGraphicsColor); virtual;\r\n procedure DoGetNodeSelectedTextColor(Sender: TObject; ANode: TTMSFNCTreeViewVirtualNode; {%H-}AColumn: Integer; var ASelectedTextColor: TTMSFNCGraphicsColor); virtual;\r\n procedure DoGetNodeDisabledTextColor(Sender: TObject; ANode: TTMSFNCTreeViewVirtualNode; {%H-}AColumn: Integer; var ADisabledTextColor: TTMSFNCGraphicsColor); virtual;\r\n procedure DoGetNodeTitleColor(Sender: TObject; ANode: TTMSFNCTreeViewVirtualNode; {%H-}AColumn: Integer; var ATitleColor: TTMSFNCGraphicsColor); virtual;\r\n procedure DoGetNodeSelectedTitleColor(Sender: TObject; ANode: TTMSFNCTreeViewVirtualNode; {%H-}AColumn: Integer; var ASelectedTitleColor: TTMSFNCGraphicsColor); virtual;\r\n procedure DoGetNodeDisabledTitleColor(Sender: TObject; ANode: TTMSFNCTreeViewVirtualNode; {%H-}AColumn: Integer; var ADisabledTitleColor: TTMSFNCGraphicsColor); virtual;\r\n procedure DoIsNodeEnabled(Sender: TObject; ANode: TTMSFNCTreeViewVirtualNode; var AEnabled: Boolean); virtual;\r\n procedure DoAfterSelectNode(Sender: TObject; ANode: TTMSFNCTreeViewVirtualNode); virtual;\r\n procedure DoAfterUnSelectNode(Sender: TObject; ANode: TTMSFNCTreeViewVirtualNode); virtual;\r\n procedure DoNeedFilterDropDownData(Sender: TObject; {%H-}AColumn: Integer; AValues: TStrings); virtual;\r\n procedure DoFilterSelect(Sender: TObject; {%H-}AColumn: integer; var ACondition: string); virtual;\r\n procedure DoBeforeDrawSortIndicator(Sender: TObject; AGraphics: TTMSFNCGraphics; ARect: TRectF; {%H-}AColumn: Integer; ASortIndex: Integer; ASortKind: TTMSFNCTreeViewNodesSortKind; var ADefaultDraw: Boolean); virtual;\r\n procedure DoAfterDrawSortIndicator(Sender: TObject; AGraphics: TTMSFNCGraphics; ARect: TRectF; {%H-}AColumn: Integer; ASortIndex: Integer; ASortKind: TTMSFNCTreeViewNodesSortKind); virtual;\r\n procedure DoBeforeDrawNode(Sender: TObject; AGraphics: TTMSFNCGraphics; ARect: TRectF; ANode: TTMSFNCTreeViewVirtualNode; var AAllow: Boolean; var ADefaultDraw: Boolean); virtual;\r\n procedure DoAfterDrawNode(Sender: TObject; AGraphics: TTMSFNCGraphics; ARect: TRectF; ANode: TTMSFNCTreeViewVirtualNode); virtual;\r\n procedure DoItemCompare(AItem1, AItem2: TTMSFNCTableViewItem; var ACompareResult: Integer); virtual;\r\n procedure DoCategoryCompare(ACategory1, ACategory2: TTMSFNCTableViewCategory; var ACompareResult: Integer); virtual;\r\n procedure DoBeforeDrawNodeText(Sender: TObject; AGraphics: TTMSFNCGraphics; ARect: TRectF; {%H-}AColumn: Integer; ANode: TTMSFNCTreeViewVirtualNode; AText: String; var AAllow: Boolean); virtual;\r\n procedure DoAfterDrawNodeText(Sender: TObject; AGraphics: TTMSFNCGraphics; ARect: TRectF; {%H-}AColumn: Integer; ANode: TTMSFNCTreeViewVirtualNode; AText: String); virtual;\r\n procedure DoBeforeDrawNodeTitle(Sender: TObject; AGraphics: TTMSFNCGraphics; ARect: TRectF; {%H-}AColumn: Integer; ANode: TTMSFNCTreeViewVirtualNode; ATitle: String; var AAllow: Boolean); virtual;\r\n procedure DoAfterDrawNodeTitle(Sender: TObject; AGraphics: TTMSFNCGraphics; ARect: TRectF; {%H-}AColumn: Integer; ANode: TTMSFNCTreeViewVirtualNode; ATitle: String); virtual;\r\n procedure DoBeforeDrawNodeIcon(Sender: TObject; AGraphics: TTMSFNCGraphics; ARect: TRectF; {%H-}AColumn: Integer; ANode: TTMSFNCTreeViewVirtualNode; AIcon: TTMSFNCBitmap; var AAllow: Boolean); virtual;\r\n procedure DoAfterDrawNodeIcon(Sender: TObject; AGraphics: TTMSFNCGraphics; ARect: TRectF; {%H-}AColumn: Integer; ANode: TTMSFNCTreeViewVirtualNode; AIcon: TTMSFNCBitmap); virtual;\r\n procedure DoBeforeDrawNodeCheck(Sender: TObject; AGraphics: TTMSFNCGraphics; ARect: TRectF; {%H-}AColumn: Integer; ANode: TTMSFNCTreeViewVirtualNode; ACheck: TTMSFNCBitmap; var AAllow: Boolean); virtual;\r\n procedure DoAfterDrawNodeCheck(Sender: TObject; AGraphics: TTMSFNCGraphics; ARect: TRectF; {%H-}AColumn: Integer; ANode: TTMSFNCTreeViewVirtualNode; ACheck: TTMSFNCBitmap); virtual;\r\n procedure DoNodeAnchorClick(Sender: TObject; ANode: TTMSFNCTreeViewVirtualNode; {%H-}AColumn: Integer; AAnchor: String); virtual;\r\n procedure DoNodeTitleAnchorClick(Sender: TObject; ANode: TTMSFNCTreeViewVirtualNode; {%H-}AColumn: Integer; AAnchor: String); virtual;\r\n procedure DoNodeClick(Sender: TObject; ANode: TTMSFNCTreeViewVirtualNode); virtual;\r\n procedure DoNodeMouseLeave(Sender: TObject; ANode: TTMSFNCTreeViewVirtualNode); virtual;\r\n procedure DoNodeMouseEnter(Sender: TObject; ANode: TTMSFNCTreeViewVirtualNode); virtual;\r\n procedure DoNodeDblClick(Sender: TObject; ANode: TTMSFNCTreeViewVirtualNode); virtual;\r\n procedure DoVScroll(Sender: TObject; APosition: Single); virtual;\r\n procedure DoBeforeCutToClipboard(Sender: TObject; var ACanCut: Boolean); virtual;\r\n procedure DoBeforeCopyToClipboard(Sender: TObject; var ACanCopy: Boolean); virtual;\r\n procedure DoBeforePasteFromClipboard(Sender: TObject; var ACanPaste: Boolean); virtual;\r\n procedure DoAfterCutToClipboard(Sender: TObject); virtual;\r\n procedure DoAfterCopyToClipboard(Sender: TObject); virtual;\r\n procedure DoAfterPasteFromClipboard(Sender: TObject); virtual;\r\n procedure DoBeforeReorderItem(AFromItem, AToItem: TTMSFNCTableViewItem; var ACanReorder: Boolean); virtual;\r\n procedure DoAfterReorderItem(AFromItem, AToItem: TTMSFNCTableViewItem); virtual;\r\n procedure DoBeforeDropItem(AFromItem, AToItem: TTMSFNCTableViewItem; var ACanDrop: Boolean); virtual;\r\n procedure DoAfterDropItem(AFromItem, AToItem: TTMSFNCTableViewItem); virtual;\r\n procedure CustomizeTreeView({%H-}ATreeView: TTMSFNCTreeView); virtual;\r\n procedure DoCustomDragOver(Sender: TObject; Source: TObject; {%H-}Point: TPointF; var Accept: Boolean); virtual;\r\n procedure DoCustomDragDrop(Sender: TObject; Source: TObject; {%H-}Point: TPointF); virtual;\r\n procedure DragItemMove({%H-}AFromItem, {%H-}AToItem: TTMSFNCTableViewItem); virtual;\r\n procedure DragItemAdd({%H-}ANewItem, {%H-}AAssignItem, {%H-}AInsertItem: TTMSFNCTableViewItem); virtual;\r\n procedure DragItemDelete({%H-}AItem: TTMSFNCTableViewItem); virtual;\r\n procedure DoCustomReorder(Sender: TObject; AFromNode, AToNode: TTMSFNCTreeViewVirtualNode); virtual;\r\n procedure DoCopyToClipboard(Sender: TObject); virtual;\r\n procedure DoCutToClipboard(Sender: TObject); virtual;\r\n procedure DoPasteFromClipboard(Sender: TObject); virtual;\r\n procedure DoColumnSort(Sender: TObject; {%H-}AColumn: Integer; ASortMode: TTMSFNCTreeViewNodesSortMode); virtual;\r\n procedure DoLookup(Sender: TObject; ALookupString: String); virtual;\r\n procedure UpdateActiveDetailControl; virtual;\r\n procedure DoFooterAnchorClick(Sender: TObject; AAnchor: String);\r\n procedure DoHeaderAnchorClick(Sender: TObject; AAnchor: String);\r\n {$IFDEF FMXLIB}\r\n procedure DoTreeViewMouseWheel(Sender: TObject; Shift: TShiftState; WheelDelta: Integer; var Handled: Boolean);\r\n procedure DoTreeViewKeyDown(Sender: TObject; var Key: Word; var KeyChar: WideChar; Shift: TShiftState);\r\n procedure DoTreeViewKeyUp(Sender: TObject; var Key: Word; var KeyChar: WideChar; Shift: TShiftState);\r\n {$ENDIF}\r\n {$IFDEF CMNWEBLIB}\r\n procedure DoTreeViewMouseWheelDown(Sender: TObject; Shift: TShiftState; MousePos: TPoint; var Handled: Boolean);\r\n procedure DoTreeViewMouseWheelUp(Sender: TObject; Shift: TShiftState; MousePos: TPoint; var Handled: Boolean);\r\n procedure DoTreeViewKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);\r\n procedure DoTreeViewKeyUp(Sender: TObject; var Key: Word; Shift: TShiftState);\r\n procedure DoTreeViewKeyPress(Sender: TObject; var AChar: Char);\r\n {$ENDIF}\r\n {$IFDEF FNCLIB}\r\n function PickerGetContent: String; virtual;\r\n procedure PickerSelectItem(AItemIndex: Integer); virtual;\r\n function PickerGetSelectedItem: Integer; virtual;\r\n function PickerGetVisibleItemCount: Integer; virtual;\r\n function PickerGetItemCount: Integer; virtual;\r\n function PickerGetItemHeight: Single; virtual;\r\n procedure PickerSetItemHeight(AValue: Single); virtual;\r\n function PickerGetItemWidth: Single; virtual;\r\n procedure PickerSetItemWidth(AValue: Single); virtual;\r\n function PickerGetNextSelectableItem(AItemIndex: Integer): Integer; virtual;\r\n function PickerGetPreviousSelectableItem(AItemIndex: Integer): Integer; virtual;\r\n function PickerGetFirstSelectableItem: Integer; virtual;\r\n function PickerGetLastSelectableItem: Integer; virtual;\r\n procedure PickerResetFilter; virtual;\r\n procedure PickerApplyFilter(ACondition: string; ACaseSensitive: Boolean); virtual;\r\n function PickerLookupItem(ALookupString: String; ACaseSensitive: Boolean): TTMSFNCControlPickerFilterItem; virtual;\r\n {$ENDIF}\r\n procedure SetFonts(ASetType: TTMSFNCAppearanceGlobalFontType); virtual;\r\n property Fill: TTMSFNCGraphicsFill read GetFill write SetFill;\r\n property Stroke: TTMSFNCGraphicsStroke read GetStroke write SetStroke;\r\n property Version: String read GetVersion;\r\n property TreeView: TTMSFNCTreeViewTableView read FTreeView;\r\n property BitmapContainer: TTMSFNCBitmapContainer read GetBitmapContainer write SetBitmapContainer;\r\n property Items: TTMSFNCTableViewItems read FItems write SetItems;\r\n property DefaultItem: TTMSFNCTableViewItem read FDefaultItem write SetDefaultItem;\r\n property ItemAppearance: TTMSFNCTableViewItemAppearance read FItemAppearance write SetItemAppearance;\r\n property CategoryAppearance: TTMSFNCTableViewCategoryAppearance read FCategoryAppearance write SetCategoryAppearance;\r\n property GroupAppearance: TTMSFNCTableViewGroupAppearance read FGroupAppearance write SetGroupApperance;\r\n property MoreOptionAppearance: TTMSFNCTableViewMoreOptionAppearance read FMoreOptionAppearance write SetMoreOptionAppearance;\r\n property Interaction: TTMSFNCTableViewInteraction read FInteraction write SetInteraction;\r\n property ItemIndex: Integer read GetItemIndex write SetItemIndex default -1;\r\n property LookupBar: TTMSFNCTableViewLookupBar read FLookupBar write SetLookupBar;\r\n property Reload: TTMSFNCTableViewReload read FReload write SetReload;\r\n property Categories: TTMSFNCTableViewCategories read FCategories write SetCategories;\r\n property MoreOptions: TTMSFNCTableViewMoreOptions read FMoreOptions write SetMoreOptions;\r\n property CategoryType: TTMSFNCTableViewCategoryType read FCategoryType write SetCategoryType default tvctNone;\r\n property GlobalFont: TTMSFNCAppearanceGlobalFont read FGlobalFont write SetGlobalFont;\r\n property OnItemSelected: TTMSFNCTableViewItemSelectedEvent read FOnItemSelected write FOnItemSelected;\r\n property OnItemUnSelected: TTMSFNCTableViewItemUnSelectedEvent read FOnItemUnSelected write FOnItemUnSelected;\r\n property OnItemSelectionChanged: TTMSFNCTableViewItemSelectionChangedEvent read FOnItemSelectionChanged write FOnItemSelectionChanged;\r\n property FilterTimer: TTimer read GetFilterTimer;\r\n property Header: TTMSFNCTableViewHeader read FHeader write SetHeader;\r\n property Footer: TTMSFNCTableViewFooter read FFooter write SetFooter;\r\n property VerticalScrollBarVisible: Boolean read GetVerticalScrollBarVisible write SetVerticalScrollBarVisible default False;\r\n property LayoutMode: TTMSFNCTableViewLayoutMode read FLayoutMode write SetLayoutMode default tvlmDefault;\r\n property OnNeedFilterDropDownData: TTMSFNCTableViewNeedFilterDropDownDataEvent read FOnNeedFilterDropDownData write FOnNeedFilterDropDownData;\r\n property OnFilterSelect: TTMSFNCTableViewFilterSelectEvent read FOnFilterSelect write FOnFilterSelect;\r\n property OnBeforeDrawItem: TTMSFNCTableViewBeforeDrawItemEvent read FOnBeforeDrawItem write FOnBeforeDrawItem;\r\n property OnAfterDrawItem: TTMSFNCTableViewAfterDrawItemEvent read FOnAfterDrawItem write FOnAfterDrawItem;\r\n property OnBeforeDrawItemMoreOption: TTMSFNCTableViewBeforeDrawItemMoreOptionEvent read FOnBeforeDrawItemMoreOption write FOnBeforeDrawItemMoreOption;\r\n property OnAfterDrawItemMoreOption: TTMSFNCTableViewAfterDrawItemMoreOptionEvent read FOnAfterDrawItemMoreOption write FOnAfterDrawItemMoreOption;\r\n property OnItemCompare: TTMSFNCTableViewItemCompareEvent read FOnItemCompare write FOnItemCompare;\r\n property OnCategoryCompare: TTMSFNCTableViewCategoryCompareEvent read FOnCategoryCompare write FOnCategoryCompare;\r\n property OnAfterDrawItemIcon: TTMSFNCTableViewAfterDrawItemIconEvent read FOnAfterDrawItemIcon write FOnAfterDrawItemIcon;\r\n property OnBeforeDrawItemIcon: TTMSFNCTableViewBeforeDrawItemIconEvent read FOnBeforeDrawItemIcon write FOnBeforeDrawItemIcon;\r\n property OnAfterDrawItemCheck: TTMSFNCTableViewAfterDrawItemCheckEvent read FOnAfterDrawItemCheck write FOnAfterDrawItemCheck;\r\n property OnBeforeDrawItemCheck: TTMSFNCTableViewBeforeDrawItemCheckEvent read FOnBeforeDrawItemCheck write FOnBeforeDrawItemCheck;\r\n property OnBeforeDrawItemText: TTMSFNCTableViewBeforeDrawItemTextEvent read FOnBeforeDrawItemText write FOnBeforeDrawItemText;\r\n property OnAfterDrawItemText: TTMSFNCTableViewAfterDrawItemTextEvent read FOnAfterDrawItemText write FOnAfterDrawItemText;\r\n property OnBeforeDrawItemTitle: TTMSFNCTableViewBeforeDrawItemTitleEvent read FOnBeforeDrawItemTitle write FOnBeforeDrawItemTitle;\r\n property OnAfterDrawItemTitle: TTMSFNCTableViewAfterDrawItemTitleEvent read FOnAfterDrawItemTitle write FOnAfterDrawItemTitle;\r\n property OnAfterDrawSortIndicator: TTMSFNCTableViewAfterDrawSortIndicatorEvent read FOnAfterDrawSortIndicator write FOnAfterDrawSortIndicator;\r\n property OnBeforeDrawSortIndicator: TTMSFNCTableViewBeforeDrawSortIndicatorEvent read FOnBeforeDrawSortIndicator write FOnBeforeDrawSortIndicator;\r\n property OnItemAnchorClick: TTMSFNCTableViewItemAnchorClickEvent read FOnItemAnchorClick write FOnItemAnchorClick;\r\n property OnItemTitleAnchorClick: TTMSFNCTableViewItemAnchorClickEvent read FOnItemTitleAnchorClick write FOnItemTitleAnchorClick;\r\n property OnItemClick: TTMSFNCTableViewItemClickEvent read FOnItemClick write FOnItemClick;\r\n property OnItemMouseLeave: TTMSFNCTableViewItemMouseLeaveEvent read FOnItemMouseLeave write FOnItemMouseLeave;\r\n property OnItemMouseEnter: TTMSFNCTableViewItemMouseEnterEvent read FOnItemMouseEnter write FOnItemMouseEnter;\r\n property OnItemDblClick: TTMSFNCTableViewItemClickEvent read FOnItemDblClick write FOnItemDblClick;\r\n property OnVScroll: TTMSFNCTableViewScrollEvent read FOnVScroll write FOnVScroll;\r\n property OnBeforeReorderItem: TTMSFNCTableViewBeforeReorderItemEvent read FOnBeforeReorderItem write FOnBeforeReorderItem;\r\n property OnAfterReorderItem: TTMSFNCTableViewAfterReorderItemEvent read FOnAfterReorderItem write FOnAfterReorderItem;\r\n property OnBeforeDropItem: TTMSFNCTableViewBeforeDropItemEvent read FOnBeforeDropItem write FOnBeforeDropItem;\r\n property OnAfterDropItem: TTMSFNCTableViewAfterDropItemEvent read FOnAfterDropItem write FOnAfterDropItem;\r\n property OnBeforeCutToClipboard: TTMSFNCTableViewBeforeCutToClipboardEvent read FOnBeforeCutToClipboard write FOnBeforeCutToClipboard;\r\n property OnBeforeCopyToClipboard: TTMSFNCTableViewBeforeCopyToClipboardEvent read FOnBeforeCopyToClipboard write FOnBeforeCopyToClipboard;\r\n property OnBeforePasteFromClipboard: TTMSFNCTableViewBeforePasteFromClipboardEvent read FOnBeforePasteFromClipboard write FOnBeforePasteFromClipboard;\r\n property OnAfterCutToClipboard: TTMSFNCTableViewAfterCutToClipboardEvent read FOnAfterCutToClipboard write FOnAfterCutToClipboard;\r\n property OnAfterCopyToClipboard: TTMSFNCTableViewAfterCopyToClipboardEvent read FOnAfterCopyToClipboard write FOnAfterCopyToClipboard;\r\n property OnAfterPasteFromClipboard: TTMSFNCTableViewAfterPasteFromClipboardEvent read FOnAfterPasteFromClipboard write FOnAfterPasteFromClipboard;\r\n property OnGetHTMLTemplateValue: TTMSFNCTableViewGetHTMLTemplateValueEvent read FOnGetHTMLTemplateValue write FOnGetHTMLTemplateValue;\r\n property OnGetHTMLTemplate: TTMSFNCTableViewGetHTMLTemplateEvent read FOnGetHTMLTemplate write FOnGetHTMLTemplate;\r\n property OnManualLookupCategory: TTMSFNCTableViewLookupCategoryEvent read FOnManualLookupCategory write FOnManualLookupCategory;\r\n property OnCategoryClick: TTMSFNCTableViewLookupCategoryEvent read FOnCategoryClick write FOnCategoryClick;\r\n property OnStartReload: TNotifyEvent read FOnStartReload write FOnStartReload;\r\n property OnStopReload: TNotifyEvent read FOnStopReload write FOnStopReload;\r\n property OnDrawItemCustomAccessory: TTMSFNCTableViewDrawItemCustomAccessoryEvent read FOnDrawItemCustomAccessory write FOnDrawItemCustomAccessory;\r\n property OnItemAccessoryClick: TTMSFNCTableViewItemClickEvent read FOnItemAccessoryClick write FOnItemAccessoryClick;\r\n property OnItemBitmapClick: TTMSFNCTableViewItemClickEvent read FOnItemBitmapClick write FOnItemBitmapClick;\r\n property OnItemCheckChanged: TTMSFNCTableViewItemCheckChangedEvent read FOnItemCheckChanged write FOnItemCheckChanged;\r\n property OnBeforeApplyFilter: TTMSFNCTableViewBeforeApplyFilterEvent read FOnBeforeApplyFilter write FOnBeforeApplyFilter;\r\n property OnAfterApplyFilter: TTMSFNCTableViewAfterApplyFilterEvent read FOnAfterApplyFilter write FOnAfterApplyFilter;\r\n property OnItemMoreOptionClick: TTMSFNCTableViewItemMoreOptionClickEvent read FOnItemMoreOptionClick write FOnItemMoreOptionClick;\r\n property OnBeforeItemShowDetailControl: TTMSFNCTableViewBeforeItemShowDetailControl read FOnBeforeItemShowDetailControl write FOnBeforeItemShowDetailControl;\r\n property OnBeforeItemHideDetailControl: TTMSFNCTableViewBeforeItemHideDetailControl read FOnBeforeItemHideDetailControl write FOnBeforeItemHideDetailControl;\r\n property OnItemShowDetailControl: TTMSFNCTableViewItemShowDetailControl read FOnItemShowDetailControl write FOnItemShowDetailControl;\r\n property OnItemHideDetailControl: TTMSFNCTableViewItemHideDetailControl read FOnItemHideDetailControl write FOnItemHideDetailControl;\r\n property OnHeaderAnchorClick: TTMSFNCTableViewAnchorHeaderFooterClick read FOnHeaderAnchorClick write FOnHeaderAnchorClick;\r\n property OnFooterAnchorClick: TTMSFNCTableViewAnchorHeaderFooterClick read FOnFooterAnchorClick write FOnFooterAnchorClick;\r\n public\r\n constructor Create(AOwner: TComponent); override;\r\n destructor Destroy; override;\r\n procedure Draw({%H-}AGraphics: TTMSFNCGraphics; {%H-}ARect: TRectF); override;\r\n procedure DrawBackground(AGraphics: TTMSFNCGraphics; ARect: TRectF); override;\r\n procedure Assign(Source: TPersistent); override;\r\n function MatchFilter(AItem: TTMSFNCTableViewItem): Boolean; virtual;\r\n function AddItem(AText: string = ''): TTMSFNCTableViewItem; virtual;\r\n function XYToAccessoryItem(X, Y: Single): TTMSFNCTableViewItem; virtual;\r\n function XYToBitmapItem(X, Y: Single): TTMSFNCTableViewItem; virtual;\r\n function XYToItem(X, Y: Single): TTMSFNCTableViewItem; virtual;\r\n function XYToMoreOption(X, Y: Single): TTMSFNCTableViewMoreOption; virtual;\r\n function XYToItemIndex(X, Y: Single): Integer; virtual;\r\n function SelectedItemCount: Integer; virtual;\r\n function GetItemsFromClipboard: TTMSFNCTableViewCopyItems; virtual;\r\n function LookupItem(ALookupString: String; ACaseSensitive: Boolean = False; AAutoSelect: Boolean = False): TTMSFNCTableViewItem; virtual;\r\n function IsItemSelectable(AItem: TTMSFNCTableViewItem): Boolean; virtual;\r\n function ReloadProgress: Single; virtual;\r\n function DetailControlActive: Boolean; virtual;\r\n function GetCheckedItems: TTMSFNCTableViewCheckedItems; virtual;\r\n function GetSelectedItems: TTMSFNCTableViewSelectedItems; virtual;\r\n function IsEditMode: Boolean; virtual;\r\n procedure CancelEditMode; virtual;\r\n procedure LookupCustomCategory(ACategoryID: Integer); virtual;\r\n procedure LookupCategory(ACategory: String);virtual;\r\n procedure RemoveItem(AItem: TTMSFNCTableViewItem); virtual;\r\n procedure EnableInteraction; virtual;\r\n procedure DisableInteraction; virtual;\r\n procedure BeginUpdate; override;\r\n procedure EndUpdate; override;\r\n procedure InitSample; virtual;\r\n procedure ScrollToItem(AItemIndex: Integer); virtual;\r\n procedure ClearSelection; virtual;\r\n procedure UnCheckAllItems; virtual;\r\n procedure StartFiltering; virtual;\r\n procedure StopFiltering; virtual;\r\n procedure StartEditMode; virtual;\r\n procedure ShowMoreOptions(AItem: TTMSFNCTableViewItem); virtual;\r\n procedure HideMoreOptions; virtual;\r\n procedure StopEditMode; virtual;\r\n procedure ToggleEditMode; virtual;\r\n procedure CheckAllItems; virtual;\r\n procedure SelectItem(AItemIndex: Integer); virtual;\r\n procedure SelectItems(AItemIndexes: TTMSFNCTableViewIntegerArray); virtual;\r\n procedure LoadFromStrings(AStrings: TStrings); virtual;\r\n {$IFNDEF WEBLIB}\r\n procedure LoadFromFile(AFileName: string); virtual;\r\n procedure LoadFromStream(AStream: TStream); virtual;\r\n procedure SaveToStrings(AStrings: TStrings); virtual;\r\n procedure SaveToFile(AFileName: string; ATextOnly: Boolean = True); virtual;\r\n procedure SaveToStream(AStream: TStream; ATextOnly: Boolean = True); virtual;\r\n {$ENDIF}\r\n procedure CutToClipboard(ATextOnly: Boolean = False); virtual;\r\n procedure CopyToClipboard(ATextOnly: Boolean = False); virtual;\r\n procedure PasteFromClipboard; virtual;\r\n procedure Sort(ACaseSensitive: Boolean = True; ASortingMode: TTMSFNCTableViewItemsSortMode = tvismAscending); {$IFDEF FMXLIB}reintroduce;{$ENDIF} virtual;\r\n procedure ApplyFilter; virtual;\r\n procedure RemoveFilter; virtual;\r\n procedure RemoveFilters; virtual;\r\n procedure StopReload; virtual;\r\n procedure StartReload; virtual;\r\n procedure LoadSettingsFromFile(AFileName: string); override;\r\n procedure LoadSettingsFromStream(AStream: TStream); override;\r\n procedure ShowDetailControl(AItemIndex: Integer = -1); virtual;\r\n procedure HideDetailControl; virtual;\r\n procedure UpdateReloadProgress(AProgress: Single; AAutoStopReload: Boolean = True); virtual;\r\n property DisplayItem[AIndex: Integer]: TTMSFNCTableViewDisplayItem read GetDisplayItem;\r\n property DisplayItemCount: Integer read GetDisplayItemCount;\r\n property Edit: TTMSFNCTableViewEdit read FEdit;\r\n property Filter: TTMSFNCTableViewFilter read FFilter;\r\n property SelectedItem: TTMSFNCTableViewItem read GetSelectedItem write SetSelectedItem;\r\n property SelectedItems[AIndex: Integer]: TTMSFNCTableViewItem read GetSelItem;\r\n property CheckedItem[AItem: TTMSFNCTableViewItem]: Boolean read GetCheckedItem write SetCheckedItem;\r\n property Checked[AItemIndex: Integer]: Boolean read GetChecked write SetChecked;\r\n property DoneButton: TTMSFNCToolBarButton read FDoneButton;\r\n property EditButton: TTMSFNCToolBarButton read FEditButton;\r\n property FilterButton: TTMSFNCToolBarButton read FFilterButton;\r\n property BackButton: TTMSFNCToolBarButton read FBackButton;\r\n property PrecalculateItems: Boolean read GetPrecalculateItems write SetPrecalculateItems default False;\r\n end;\r\n\r\n {$IFNDEF LCLLIB}\r\n [ComponentPlatformsAttribute(TMSPlatformsWeb)]\r\n {$ENDIF}\r\n TTMSFNCTableView = class(TTMSFNCCustomTableView)\r\n protected\r\n procedure RegisterRuntimeClasses; override;\r\n property OnNeedFilterDropDownData;\r\n property OnFilterSelect;\r\n property OnBeforeReorderItem;\r\n property OnAfterReorderItem;\r\n property OnBeforeDropItem;\r\n property OnAfterDropItem;\r\n property OnBeforeCutToClipboard;\r\n property OnBeforeCopyToClipboard;\r\n property OnBeforePasteFromClipboard;\r\n property OnAfterCutToClipboard;\r\n property OnAfterCopyToClipboard;\r\n property OnAfterPasteFromClipboard;\r\n public\r\n property TreeView;\r\n published\r\n property Fill;\r\n property Stroke;\r\n property BitmapContainer;\r\n property ItemAppearance;\r\n property DefaultItem;\r\n property Items;\r\n property Header;\r\n property Footer;\r\n property ItemIndex;\r\n property Interaction;\r\n property LookupBar;\r\n property LayoutMode;\r\n property Reload;\r\n property Categories;\r\n property MoreOptions;\r\n property MoreOptionAppearance;\r\n property CategoryAppearance;\r\n property GroupAppearance;\r\n property CategoryType;\r\n property OnItemSelected;\r\n property OnItemUnSelected;\r\n property OnItemSelectionChanged;\r\n property Version;\r\n property VerticalScrollBarVisible;\r\n property GlobalFont;\r\n property OnBeforeDrawItem;\r\n property OnAfterDrawItem;\r\n property OnItemCompare;\r\n property OnCategoryCompare;\r\n property OnCategoryClick;\r\n property OnManualLookupCategory;\r\n property OnAfterDrawItemIcon;\r\n property OnBeforeDrawItemIcon;\r\n property OnBeforeDrawItemText;\r\n property OnAfterDrawItemText;\r\n property OnItemAnchorClick;\r\n property OnItemClick;\r\n property OnItemMouseLeave;\r\n property OnItemMouseEnter;\r\n property OnItemDblClick;\r\n property OnVScroll;\r\n property OnStartReload;\r\n property OnStopReload;\r\n property OnDrawItemCustomAccessory;\r\n property OnItemAccessoryClick;\r\n property OnItemBitmapClick;\r\n property OnItemCheckChanged;\r\n property OnAfterDrawItemCheck;\r\n property OnBeforeDrawItemCheck;\r\n property OnBeforeApplyFilter;\r\n property OnAfterApplyFilter;\r\n property OnItemMoreOptionClick;\r\n property OnBeforeItemShowDetailControl;\r\n property OnBeforeItemHideDetailControl;\r\n property OnItemShowDetailControl;\r\n property OnItemHideDetailControl;\r\n property OnHeaderAnchorClick;\r\n property OnFooterAnchorClick;\r\n property OnGetHTMLTemplateValue;\r\n property OnGetHTMLTemplate;\r\n end;\r\n\r\n{$IFDEF WEBLIB}\r\nconst\r\n TMSFNCTABLEVIEWSEARCH = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAA7DAAAOwwHHb6hkAAABXElEQVQ4jY2TP0'+\r\n '/CUBTFf1VJGhmoEzCQIIkDG4y4gNGJ5cnoiKMTfACCpoubDk5OfAPoUpcm4sRYEkzcsEkHJNGIRgwJiwPUtKVFz3Tzzj3n3PdPYg3KDS0NlID0cq'+\r\n 'mrq6Lr7pFChArQBGoBtAVUHaMwAxPIReUIR/kUhWyS8fs3Rt9m8PzqtFV0VXRWDMoN7RxoZhIxLk/3icoRD2+YNldtE2AC7G76DfaKJ+2oHJFvzo'+\r\n 'orYoBMMoYEDKw3GRhv+NJLgFLIJgLFDg7zKacUG0ENcWU7VOznAw2+ZvO1BlMX7zFwrsYwbU+TH1pv6JQPQRNcT2dzbu8eA8XDlw86C4MJ0NoKCg'+\r\n 'BqhmkzHH0iChniO4s9955G7vS6rgrL8w7KDS0H3ANK6PyL5Lquiha4XqJPPAEOltSxS2wBHV0VE2dBChPrquivmeIXziG6x678V+w2uFgmV/3f9S'+\r\n '/8AOOWdCNEGLMkAAAAAElFTkSuQmCC';\r\n{$ENDIF}\r\n\r\nimplementation\r\n\r\nuses\r\n Math, WEBLib.TMSFNCUtils, SysUtils, WEBLib.Graphics\r\n {$IFDEF FNCLIB}\r\n , WEBLib.TMSFNCCustomSelector\r\n {$ENDIF}\r\n ;\r\n\r\n{$R 'TMSFNCTableView.res'}\r\n\r\ntype\r\n TTMSFNCTreeViewOpen = class(TTMSFNCTreeViewTableView);\r\n TTMSFNCCustomTreeViewOpen = class(TTMSFNCCustomTreeView);\r\n TTMSFNCCustomTableViewOpen = class(TTMSFNCCustomTableView);\r\n TTMSFNCTreeViewColumnOpen = class(TTMSFNCTreeViewColumn);\r\n\r\nfunction AnimateDouble(var Start, Stop: Double; Delta, Margin: Double): Boolean;\r\nbegin\r\n Result := true;\r\n if (Start > Stop - Margin) and (Start < Stop + Margin) then\r\n begin\r\n Start := Stop;\r\n Result := false;\r\n end\r\n else\r\n begin\r\n Delta := Max(Margin, Delta);\r\n if Start < Stop then\r\n Start := Start + Delta\r\n else\r\n Start := Start - Delta;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.AddDisplayItem(AItem: TTMSFNCTableViewItem);\r\nvar\r\n dp: TTMSFNCTableViewDisplayItem;\r\nbegin\r\n dp.CategoryID := -1;\r\n dp.Item := AItem;\r\n dp.Kind := tvikItem;\r\n dp.Text := '';\r\n dp.Row := FDisplayList.Count;\r\n if Assigned(AItem) then\r\n AItem.FRow := dp.Row;\r\n FDisplayList.Add(dp);\r\nend;\r\n\r\nfunction TTMSFNCCustomTableView.AddDisplayCategory(AItem: TTMSFNCTableViewItem): TTMSFNCTableViewDisplayItem;\r\nvar\r\n dp: TTMSFNCTableViewDisplayItem;\r\nbegin\r\n dp.Item := nil;\r\n dp.Kind := tvikCategory;\r\n dp.Text := GetCharacterForItem(AItem);\r\n dp.CategoryID := AItem.CategoryID;\r\n dp.Row := FDisplayList.Count;\r\n if Assigned(AItem) then\r\n AItem.FRow := dp.Row;\r\n\r\n if (dp.CategoryID <> -1) or CategoryAppearance.ShowUncategorized then\r\n begin\r\n FDisplayList.Add(dp);\r\n FCategoryList.Add(dp);\r\n end;\r\n\r\n Result := dp;\r\nend;\r\n\r\nfunction TTMSFNCCustomTableView.AddItem(AText: string = ''): TTMSFNCTableViewItem;\r\nbegin\r\n Result := Items.Add;\r\n Result.Text := AText;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.ApplyFilter;\r\nbegin\r\n FFilterApplied := True;\r\n UpdateTableView;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.ApplyStyle;\r\nvar\r\n I: Integer;\r\n c: TTMSFNCGraphicsColor;\r\nbegin\r\n inherited;\r\n c := gcNull;\r\n if TTMSFNCStyles.GetStyleTextFontColor(c) then\r\n begin\r\n for I := 0 to Items.Count - 1 do\r\n begin\r\n Items[I].TextColor := c;\r\n Items[I].TitleColor := c;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.Assign(Source: TPersistent);\r\nbegin\r\n if (Source is TTMSFNCCustomTableView) then\r\n begin\r\n FTreeView.Assign((Source as TTMSFNCCustomTableView).TreeView);\r\n FItems.Assign((Source as TTMSFNCCustomTableView).Items);\r\n FItemAppearance.Assign((Source as TTMSFNCCustomTableView).ItemAppearance);\r\n FCategoryAppearance.Assign((Source as TTMSFNCCustomTableView).CategoryAppearance);\r\n FCategoryType := (Source as TTMSFNCCustomTableView).CategoryType;\r\n FFilter.Assign((Source as TTMSFNCCustomTableView).Filter);\r\n FHeader.Assign((Source as TTMSFNCCustomTableView).Header);\r\n FFooter.Assign((Source as TTMSFNCCustomTableView).Footer);\r\n FDefaultItem.Assign((Source as TTMSFNCCustomTableView).DefaultItem);\r\n FInteraction.Assign((Source as TTMSFNCCustomTableView).Interaction);\r\n FReload.Assign((Source as TTMSFNCCustomTableView).Reload);\r\n FLookupBar.Assign((Source as TTMSFNCCustomTableView).LookupBar);\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.BeginUpdate;\r\nvar\r\n a: TTMSFNCTableViewSelectedItems;\r\n I: Integer;\r\nbegin\r\n inherited;\r\n Inc(FUpdateCount);\r\n if Assigned(FTreeView) then\r\n begin\r\n if Assigned(SelectedItem) then\r\n FSaveSelectedItem := SelectedItem.Index\r\n else\r\n FSaveSelectedItem := -1;\r\n\r\n a := GetSelectedItems;\r\n SetLength(FSaveSelectedItems, Length(a));\r\n for I := 0 to Length(a) - 1 do\r\n begin\r\n if Assigned(a[I]) then\r\n FSaveSelectedItems[I] := a[I].Index;\r\n end;\r\n\r\n FTreeView.BeginUpdate;\r\n FTreeView.ClearNodeList;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.CalculateItems;\r\nvar\r\n I: Integer;\r\n v: Boolean;\r\n it: TTMSFNCTableViewItem;\r\n c: TTMSFNCTableViewDisplayItem;\r\n cc: Integer;\r\nbegin\r\n if (FUpdateCount > 0) or IsDestroying then\r\n Exit;\r\n\r\n FDisplayList.Clear;\r\n FCategoryList.Clear;\r\n\r\n cc := 0;\r\n for I := 0 to Items.Count - 1 do\r\n begin\r\n it := Items[I];\r\n v := it.Visible;\r\n\r\n it.FFiltered := False;\r\n if FFilterApplied then\r\n begin\r\n it.FFiltered := MatchFilter(it);\r\n v := v and it.FFiltered;\r\n end;\r\n\r\n if CategoryType <> tvctNone then\r\n begin\r\n if FDisplayList.Count = 0 then\r\n begin\r\n if v then\r\n begin\r\n c := AddDisplayCategory(it);\r\n AddDisplayItem(it);\r\n Inc(cc);\r\n end;\r\n end\r\n else\r\n begin\r\n if ItemFromDifferentCategory(it, Items[I - 1]) then\r\n begin\r\n if (cc = 0) and (c.Kind = tvikCategory) then\r\n begin\r\n FDisplayList.Remove(c);\r\n FCategoryList.Remove(c);\r\n end;\r\n\r\n c := AddDisplayCategory(it);\r\n cc := 0;\r\n\r\n if v then\r\n begin\r\n AddDisplayItem(it);\r\n Inc(cc);\r\n end;\r\n end\r\n else\r\n begin\r\n if v then\r\n begin\r\n AddDisplayItem(it);\r\n Inc(cc);\r\n end;\r\n end;\r\n end;\r\n end\r\n else if v then\r\n AddDisplayItem(it);\r\n end;\r\n\r\n if (cc = 0) and (c.Kind = tvikCategory) then\r\n begin\r\n FDisplayList.Remove(c);\r\n FCategoryList.Remove(c);\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.CalculateLookupBar;\r\nvar\r\n s: Integer;\r\n I: Integer;\r\n str: string;\r\n r, cr: TRectF;\r\n ldp: TTMSFNCTableViewLookupBarDisplayItem;\r\n ypos: Single;\r\n g: TTMSFNCGraphics;\r\n j: Integer;\r\nbegin\r\n if (FUpdateCount > 0) or IsDestroying or not Assigned(FTreeView) then\r\n Exit;\r\n\r\n FLookupBarDisplayList.Clear;\r\n\r\n if LookupBar.Visible and (CategoryType <> tvctNone) then\r\n begin\r\n cr := FTreeView.GetLookupBarRect;\r\n\r\n case CategoryType of\r\n tvctAlphaBetic, tvctAlphaNumericFirst, tvctAlphaNumericLast:\r\n begin\r\n s := GetCharacterCount;\r\n for I := 1 to s do\r\n begin\r\n str := GetCharacter(I);\r\n r.Left := cr.Left;\r\n r.Right := cr.Right;\r\n r.Top := cr.Top + ((I - 1) * ((cr.Bottom - cr.Top) / s));\r\n r.Bottom := r.Top + ((cr.Bottom - cr.Top) / s);\r\n\r\n ldp.Rect := r;\r\n ldp.Text := str;\r\n ldp.Active := Assigned(FindFirstItemWithCategory(str, LookupBar.IncludeFilteredItems));\r\n\r\n FLookupBarDisplayList.Add(ldp);\r\n end;\r\n end;\r\n tvctCustom:\r\n begin\r\n FCustomChar.Clear;\r\n for I := 0 to Categories.Count - 1 do\r\n FCustomChar.Add(TTMSFNCTableViewCustomChar.Create(Categories[I].Id, False));\r\n\r\n for I := 0 to Items.Count - 1 do\r\n begin\r\n str := Items[I].StrippedHTMLText;\r\n if (str <> '') then\r\n begin\r\n j := Items[I].CategoryID;\r\n FCustomChar.ActivateID(j);\r\n end;\r\n end;\r\n\r\n g := TTMSFNCGraphics.CreateBitmapCanvas;\r\n try\r\n g.Font.Assign(LookupBar.Font);\r\n s := Categories.Count - 1;\r\n ypos := cr.Top + 3;\r\n for I := 0 to s do\r\n begin\r\n str := Categories[I].LookupText;\r\n\r\n r.Left := cr.Left;\r\n r.Right := cr.Right;\r\n r.Top := ypos;\r\n r.Bottom := r.Top + g.CalculateTextHeight(str);\r\n ypos := ypos + (r.Bottom - r.Top) + 3;\r\n\r\n ldp.Rect := r;\r\n ldp.Text := str;\r\n ldp.Active := Assigned(FindFirstItemWithCategoryID(Categories[I].Id, LookupBar.IncludeFilteredItems));\r\n\r\n FLookupBarDisplayList.Add(ldp);\r\n end;\r\n finally\r\n g.Free;\r\n end;\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.CancelEditMode;\r\nbegin\r\n StopEditMode;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.ChangeDPIScale(M, D: Integer);\r\nbegin\r\n inherited;\r\n {$IFDEF VCLLIB}\r\n {$HINTS OFF}\r\n {$IF COMPILERVERSION >= 33}\r\n FDoneButton.ScaleForPPI(CurrentPPI);\r\n FEditButton.ScaleForPPI(CurrentPPI);\r\n FBackButton.ScaleForPPI(CurrentPPI);\r\n FFilterButton.ScaleForPPI(CurrentPPI);\r\n {$IFEND}\r\n {$HINTS ON}\r\n {$ENDIF}\r\n ItemAppearance.Height := TTMSFNCUtils.MulDivSingle(ItemAppearance.Height, M, D);\r\n GroupAppearance.Margins.Top := TTMSFNCUtils.MulDivSingle(GroupAppearance.Margins.Top, M, D);\r\n GroupAppearance.Margins.Left := TTMSFNCUtils.MulDivSingle(GroupAppearance.Margins.Left, M, D);\r\n GroupAppearance.Margins.Bottom := TTMSFNCUtils.MulDivSingle(GroupAppearance.Margins.Bottom, M, D);\r\n GroupAppearance.Margins.Right := TTMSFNCUtils.MulDivSingle(GroupAppearance.Margins.Right, M, D);\r\n GroupAppearance.Rounding := TTMSFNCUtils.MulDivInt(GroupAppearance.Rounding, M, D);\r\n UpdateControlAfterResize;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.CheckAllItems;\r\nvar\r\n I: Integer;\r\nbegin\r\n BeginUpdate;\r\n for I := 0 to Items.Count - 1 do\r\n Items[I].Checked := True;\r\n EndUpdate;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.ClearSelection;\r\nbegin\r\n if Assigned(FTreeView) then\r\n begin\r\n if FEditMode then\r\n UnCheckAllItems;\r\n FTreeView.UnSelectAllNodes;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCCustomTableView.GetCheckedItems: TTMSFNCTableViewCheckedItems;\r\nvar\r\n I: Integer;\r\n n: TTMSFNCTableViewItem;\r\nbegin\r\n Result := nil;\r\n for I := 0 to Items.Count - 1 do\r\n begin\r\n n := Items[I] as TTMSFNCTableViewItem;\r\n if n.Checked then\r\n begin\r\n SetLength(Result, Length(Result) + 1);\r\n Result[Length(Result) - 1] := n;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.CopyToClipboard(ATextOnly: Boolean);\r\nvar\r\n s: String;\r\n I: Integer;\r\n it: TTMSFNCTableViewItem;\r\n cl: TTMSFNCTreeViewIntegerList;\r\nbegin\r\n cl := TTMSFNCTreeViewIntegerList.Create;\r\n try\r\n s := '';\r\n for I := 0 to SelectedItemCount - 1 do\r\n begin\r\n it := SelectedItems[I];\r\n if Assigned(it) and (cl.IndexOf(it.Index) = -1) then\r\n begin\r\n s := s + it.SaveToString(ATextOnly) + ENDOFLINE;\r\n cl.Add(it.Index);\r\n end;\r\n end;\r\n\r\n if s <> '' then\r\n TTMSFNCClipBoard.SetText(CLP_FMT + s);\r\n finally\r\n cl.Free;\r\n end;\r\nend;\r\n\r\nconstructor TTMSFNCCustomTableView.Create(AOwner: TComponent);\r\nbegin\r\n inherited;\r\n FFirstLoad := False;\r\n FEdit := TTMSFNCTableViewEdit.Create(Self);\r\n FEdit.FTableView := Self;\r\n FEdit.OnChange := @DoEditChange;\r\n {$IFDEF FMXLIB}\r\n FEdit.OnChangeTracking := DoEditChange;\r\n FEdit.Stored := False;\r\n {$ENDIF}\r\n\r\n FEditButton := TTMSFNCToolBarButton.Create(Self);\r\n FEditButton.OnClick := DoEditButtonClicked;\r\n FEditButton.Stored := False;\r\n FEditButton.Width := 50;\r\n FEditButton.Appearance.FlatStyle := True;\r\n\r\n FDoneButton := TTMSFNCToolBarButton.Create(Self);\r\n FDoneButton.OnClick := DoDoneButtonClicked;\r\n FDoneButton.Stored := False;\r\n FDoneButton.Width := 50;\r\n FDoneButton.Appearance.FlatStyle := True;\r\n\r\n FFilterButton := TTMSFNCToolBarButton.Create(Self);\r\n FFilterButton.OnClick := DoFilterButtonClicked;\r\n FFilterButton.Stored := False;\r\n FFilterButton.Width := 30;\r\n FFilterButton.Appearance.FlatStyle := True;\r\n FFilterButton.Bitmaps.AddBitmapFromResource(TMSFNCTABLEVIEWSEARCH, HInstance, 1.0);\r\n FFilterButton.BitmapVisible := True;\r\n\r\n FBackButton := TTMSFNCToolBarButton.Create(Self);\r\n FBackButton.OnClick := DoBackButtonClicked;\r\n FBackButton.Stored := False;\r\n FBackButton.Width := 50;\r\n FBackButton.Appearance.FlatStyle := True;\r\n\r\n FEditButton.Text := 'Edit';\r\n FDoneButton.Text := 'Done';\r\n FBackButton.Text := 'Back';\r\n\r\n FDetailControlTimer := TTimer.Create(Self);\r\n FDetailControlTimer.OnTimer := DoDetailControlTimer;\r\n FDetailControlTimer.Enabled := False;\r\n FDetailControlTimer.Interval := 1;\r\n\r\n FDisplayList := TTMSFNCTableViewDisplayList.Create;\r\n FCategoryList := TTMSFNCTableViewDisplayList.Create;\r\n FLookupBarDisplayList := TTMSFNCTableViewLookupBarDisplayList.Create;\r\n FItems := CreateItems;\r\n FLookupBar := TTMSFNCTableViewLookupBar.Create(Self);\r\n FReload := TTMSFNCTableViewReload.Create(Self);\r\n FCategories := TTMSFNCTableViewCategories.Create(Self);\r\n FMoreOptions := TTMSFNCTableViewMoreOptions.Create(Self);\r\n FCategoryType := tvctNone;\r\n FLayoutMode := tvlmDefault;\r\n\r\n FCustomChar := TTMSFNCTableViewCustomCharList.Create;\r\n\r\n FTreeView := CreateTreeView;\r\n {$IFDEF WEBLIB}\r\n FTreeView.AllowTouch := False;\r\n {$ENDIF}\r\n FTreeView.OnClick := DoClick;\r\n FTreeView.OptimizedHTMLDrawing := True;\r\n FTreeView.FTableView := Self;\r\n FTreeView.Stored := False;\r\n FTreeView.Parent := Self;\r\n FTreeView.Columns.Clear;\r\n FColumn := FTreeView.Columns.Add;\r\n FTreeView.ClearNodes;\r\n FTreeView.ColumnsAppearance.Layouts := [tclTop, tclBottom];\r\n FTreeView.ColumnsAppearance.TopSize := 30;\r\n FTreeView.ColumnsAppearance.BottomSize := 30;\r\n FTreeView.StretchScrollBars := True;\r\n FTreeView.VerticalScrollBarVisible := False;\r\n FTreeview.NodesAppearance.Stroke.Kind := gskSolid;\r\n FTreeView.NodesAppearance.ExpandColumn := -1;\r\n FTreeView.NodesAppearance.LevelIndent := 0;\r\n FTreeView.NodesAppearance.ShowLines := False;\r\n FTreeView.NodesAppearance.ExpandWidth := 0;\r\n FTreeView.NodesAppearance.ExpandHeight := 0;\r\n FTreeView.NodesAppearance.SelectionArea := tsaDefault;\r\n FTreeView.NodesAppearance.ShowFocus := True;\r\n FTreeView.NodesAppearance.SelectedFill.Color := MakeGraphicsColor(217, 217, 217);\r\n FTreeView.NodesAppearance.SelectedStroke.Color := MakeGraphicsColor(217, 217, 217);\r\n FTreeView.NodesAppearance.Stroke.Color := MakeGraphicsColor(200, 199, 204);\r\n\r\n FFilter := TTMSFNCTableViewFilter.Create(Self);\r\n FHeader := TTMSFNCTableViewHeader.Create(Self);\r\n FFooter := TTMSFNCTableViewFooter.Create(Self);\r\n FItemAppearance := TTMSFNCTableViewItemAppearance.Create(Self);\r\n FCategoryAppearance := TTMSFNCTableViewCategoryAppearance.Create(Self);\r\n FMoreOptionAppearance := TTMSFNCTableViewMoreOptionAppearance.Create(Self);\r\n FGroupAppearance := TTMSFNCTableViewGroupAppearance.Create(Self);\r\n FDefaultItem := TTMSFNCTableViewItem.Create(nil);\r\n FInteraction := TTMSFNCTableViewInteraction.Create(Self);\r\n FCopyItems := TTMSFNCTableViewCopyItems.Create(nil);\r\n\r\n FGlobalFont := TTMSFNCAppearanceGlobalFont.Create(Self);\r\n\r\n FTreeView.OnGetNodeSides := DoGetNodeSides;\r\n FTreeView.OnGetColumnText := DoGetColumnText;\r\n FTreeView.OnGetColumnWordWrapping := DoGetColumnWordWrapping;\r\n FTreeView.OnGetColumnHorizontalTextAlign := DoGetColumnHorizontalTextAlign;\r\n FTreeView.OnGetColumnVerticalTextAlign := DoGetColumnVerticalTextAlign;\r\n FTreeView.OnGetColumnTrimming := DoGetColumnTrimming;\r\n FTreeView.OnGetNumberOfNodes := DoGetNumberOfNodes;\r\n FTreeView.OnIsNodeChecked := DoIsNodeChecked;\r\n FTreeView.OnGetNodeCheckType := DoGetNodeCheckType;\r\n FTreeView.OnAfterUnCheckNode := DoAfterUnCheckNode;\r\n FTreeView.OnAfterCheckNode := DoAfterCheckNode;\r\n FTreeView.OnGetNodeHeight := DoGetNodeHeight;\r\n FTreeView.OnGetNodeIcon := DoGetNodeIcon;\r\n FTreeView.OnGetNodeTrimming := DoGetNodeTrimming;\r\n FTreeView.OnGetNodeWordWrapping := DoGetNodeWordWrapping;\r\n FTreeView.OnGetNodeTitleTrimming := DoGetNodeTitleTrimming;\r\n FTreeView.OnGetNodeTitleWordWrapping := DoGetNodeTitleWordWrapping;\r\n FTreeView.OnDrawNodeExtra := DoDrawNodeExtra;\r\n FTreeView.OnGetNodeExtraSize := DoGetNodeExtraSize;\r\n FTreeView.OnGetNodeTextColor := DoGetNodeTextColor;\r\n FTreeView.OnGetNodeTitleColor := DoGetNodeTitleColor;\r\n FTreeView.OnIsNodeExtended := DoIsNodeExtended;\r\n FTreeView.OnGetNodeSelectedTextColor := DoGetNodeSelectedTextColor;\r\n FTreeView.OnGetNodeDisabledTextColor := DoGetNodeDisabledTextColor;\r\n FTreeView.OnGetNodeSelectedTitleColor := DoGetNodeSelectedTitleColor;\r\n FTreeView.OnGetNodeDisabledTitleColor := DoGetNodeDisabledTitleColor;\r\n FTreeView.OnGetNodeText := DoGetNodeText;\r\n FTreeView.OnGetNodeTitle := DoGetNodeTitle;\r\n FTreeView.OnGetNodeTitleExpanded := DoGetNodeTitleExpanded;\r\n FTreeView.OnGetNodeHorizontalTextAlign := DoGetNodeHorizontalTextAlign;\r\n FTreeView.OnGetNodeVerticalTextAlign := DoGetNodeVerticalTextAlign;\r\n FTreeView.OnGetNodeTitleHorizontalTextAlign := DoGetNodeTitleHorizontalTextAlign;\r\n FTreeView.OnGetNodeTitleVerticalTextAlign := DoGetNodeTitleVerticalTextAlign;\r\n FTreeView.OnIsNodeEnabled := DoIsNodeEnabled;\r\n FTreeView.OnAfterSelectNode := DoAfterSelectNode;\r\n FTreeView.OnAfterUnSelectNode := DoAfterUnSelectNode;\r\n FTreeView.OnNeedFilterDropDownData := DoNeedFilterDropDownData;\r\n FTreeView.OnFilterSelect := DoFilterSelect;\r\n FTreeView.OnBeforeDrawNode := DoBeforeDrawNode;\r\n FTreeView.OnAfterDrawNode := DoAfterDrawNode;\r\n FTreeView.OnAfterDrawNodeIcon := DoAfterDrawNodeIcon;\r\n FTreeView.OnBeforeDrawNodeIcon := DoBeforeDrawNodeIcon;\r\n FTreeView.OnAfterDrawNodeCheck := DoAfterDrawNodeCheck;\r\n FTreeView.OnBeforeDrawNodeCheck := DoBeforeDrawNodeCheck;\r\n FTreeView.OnBeforeDrawNodeText := DoBeforeDrawNodeText;\r\n FTreeView.OnAfterDrawNodeText := DoAfterDrawNodeText;\r\n FTreeView.OnBeforeDrawNodeTitle := DoBeforeDrawNodeTitle;\r\n FTreeView.OnAfterDrawNodeTitle := DoAfterDrawNodeTitle;\r\n FTreeView.OnNodeAnchorClick := DoNodeAnchorClick;\r\n FTreeView.OnNodeTitleAnchorClick := @DoNodeTitleAnchorClick;\r\n FTreeView.OnBeforeDrawSortIndicator := DoBeforeDrawSortIndicator;\r\n FTreeView.OnAfterDrawSortIndicator := DoAfterDrawSortIndicator;\r\n FTreeView.OnNodeClick := DoNodeClick;\r\n FTreeView.OnNodeMouseLeave := DoNodeMouseLeave;\r\n FTreeView.OnNodeMouseEnter := DoNodeMouseEnter;\r\n FTreeView.OnNodeDblClick := DoNodeDblClick;\r\n FTreeView.OnVScroll := DoVScroll;\r\n FTreeView.OnBeforeCutToClipboard := DoBeforeCutToClipboard;\r\n FTreeView.OnBeforeCopyToClipboard := DoBeforeCopyToClipboard;\r\n FTreeView.OnBeforePasteFromClipboard := DoBeforePasteFromClipboard;\r\n FTreeView.OnAfterCutToClipboard := DoAfterCutToClipboard;\r\n FTreeView.OnAfterCopyToClipboard := DoAfterCopyToClipboard;\r\n FTreeView.OnAfterPasteFromClipboard := DoAfterPasteFromClipboard;\r\n FTreeView.OnHeaderAnchorClick := @DoHeaderAnchorClick;\r\n FTreeView.OnFooterAnchorClick := @DoFooterAnchorClick;\r\n {$IFDEF FMXLIB}\r\n FTreeView.OnMouseWheel := DoTreeViewMouseWheel;\r\n FTreeView.OnKeyDown := @DoTreeViewKeyDown;\r\n FTreeView.OnKeyUp := @DoTreeViewKeyUp;\r\n {$ENDIF}\r\n {$IFDEF CMNWEBLIB}\r\n FTreeView.OnMouseWheelDown := DoTreeViewMouseWheelDown;\r\n FTreeView.OnMouseWheelUp := DoTreeViewMouseWheelUp;\r\n FTreeView.OnKeyDown := @DoTreeViewKeyDown;\r\n FTreeView.OnKeyUp := @DoTreeViewKeyUp;\r\n FTreeView.OnKeyPress := DoTreeViewKeyPress;\r\n {$ENDIF}\r\n\r\n TTMSFNCTreeViewOpen(FTreeView).OnCustomReorder := DoCustomReorder;\r\n TTMSFNCTreeViewOpen(FTreeView).OnCustomDragOver := DoCustomDragOver;\r\n TTMSFNCTreeViewOpen(FTreeView).OnCustomDragDrop := DoCustomDragDrop;\r\n TTMSFNCTreeViewOpen(FTreeView).OnCustomCopyToClipboard := DoCopyToClipboard;\r\n TTMSFNCTreeViewOpen(FTreeView).OnCustomCutToClipboard := DoCutToClipboard;\r\n TTMSFNCTreeViewOpen(FTreeView).OnCustomPasteFromClipboard := DoPasteFromClipboard;\r\n TTMSFNCTreeViewOpen(FTreeView).OnCustomColumnSort := DoColumnSort;\r\n TTMSFNCTreeViewOpen(FTreeView).OnCustomLookup := DoLookup;\r\n\r\n CustomizeTreeView(FTreeView);\r\n\r\n Width := 250;\r\n Height := 350;\r\n if IsDesignTime then\r\n begin\r\n Stroke.Color := MakeGraphicsColor(200, 199, 204);\r\n InitSample;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCCustomTableView.CreateItems: TTMSFNCTableViewItems;\r\nbegin\r\n Result := TTMSFNCTableViewItems.Create(Self);\r\nend;\r\n\r\nfunction TTMSFNCCustomTableView.CreateTreeView: TTMSFNCTreeViewTableView;\r\nbegin\r\n Result := TTMSFNCTreeViewTableView.Create(Self);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.CustomizeTreeView(\r\n ATreeView: TTMSFNCTreeView);\r\nbegin\r\n\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.CutToClipboard(ATextOnly: Boolean);\r\nvar\r\n I: Integer;\r\nbegin\r\n BeginUpdate;\r\n CopyToClipboard(ATextOnly);\r\n for I := SelectedItemCount - 1 downto 0 do\r\n RemoveItem(SelectedItems[I]);\r\n EndUpdate;\r\nend;\r\n\r\ndestructor TTMSFNCCustomTableView.Destroy;\r\nbegin\r\n FreeAndNil(FFilterTimer);\r\n FGlobalFont.Free;\r\n\r\n FEditButton.Free;\r\n FFilterButton.Free;\r\n FEdit.Free;\r\n FBackButton.Free;\r\n FDoneButton.Free;\r\n\r\n FDetailControlTimer.Free;\r\n FMoreOptions.Free;\r\n FCategories.Free;\r\n FReload.Free;\r\n FLookupBar.Free;\r\n FCustomChar.Free;\r\n FDisplayList.Free;\r\n FCategoryList.Free;\r\n FLookupBarDisplayList.Free;\r\n FFilter.Free;\r\n FCopyItems.Free;\r\n FHeader.Free;\r\n FFooter.Free;\r\n FDefaultItem.Free;\r\n FInteraction.Free;\r\n FItems.Free;\r\n FTreeView.Free;\r\n FItemAppearance.Free;\r\n FCategoryAppearance.Free;\r\n FGroupAppearance.Free;\r\n FMoreOptionAppearance.Free;\r\n inherited;\r\nend;\r\n\r\nfunction TTMSFNCCustomTableView.DetailControlActive: Boolean;\r\nbegin\r\n Result := Assigned(FActiveDetailControl);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.StopEditMode;\r\nbegin\r\n if (Assigned(FTreeView) and FTreeView.FReloadActive) or not Assigned(FTreeView) then\r\n Exit;\r\n\r\n FEditMode := False;\r\n UpdateTableView;\r\n UnSelectAllItems;\r\n UnCheckAllItems;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.StopFiltering;\r\nbegin\r\n if (Assigned(FTreeView) and FTreeView.FReloadActive) or not Assigned(FTreeView) then\r\n Exit;\r\n\r\n FFilterActive := False;\r\n RemoveFilters;\r\n UpdateTableView;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.DisableInteraction;\r\nbegin\r\n if Assigned(FTreeView) then\r\n FTreeView.BlockUserInput := True;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.DoAfterApplyFilter(\r\n AFilter: TTMSFNCTableViewFilterData);\r\nbegin\r\n if Assigned(OnAfterApplyFilter) then\r\n OnAfterApplyFilter(Self, AFilter);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.DoAfterCheckNode(Sender: TObject;\r\n ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer);\r\nvar\r\n dp: TTMSFNCTableViewDisplayItem;\r\nbegin\r\n if (ANode.Row >= 0) and (ANode.Row <= FDisplayList.Count - 1) then\r\n begin\r\n dp := FDisplayList[ANode.Row];\r\n case dp.Kind of\r\n tvikItem:\r\n begin\r\n if Assigned(dp.Item) then\r\n begin\r\n dp.Item.Checked := True;\r\n if Assigned(FTreeView) then\r\n FTreeView.DoAfterSelectNode(ANode);\r\n DoItemCheckChanged(dp.Item);\r\n end;\r\n end;\r\n tvikCategory: ;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.DoAfterCopyToClipboard(Sender: TObject);\r\nbegin\r\n if Assigned(OnAfterCopyToClipboard) then\r\n OnAfterCopyToClipboard(Self);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.DoAfterCutToClipboard(Sender: TObject);\r\nbegin\r\n if Assigned(OnAfterCutToClipboard) then\r\n OnAfterCutToClipboard(Self);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.DoAfterDrawItemMoreOption(\r\n AGraphics: TTMSFNCGraphics; ARect: TRectF; AItem: TTMSFNCTableViewItem;\r\n AMoreOption: TTMSFNCTableViewMoreOption);\r\nbegin\r\n if Assigned(OnAfterDrawItemMoreOption) then\r\n OnAfterDrawItemMoreOption(Self, AGraphics, ARect, AItem, AMoreOption);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.DoAfterDrawNode(Sender: TObject;\r\n AGraphics: TTMSFNCGraphics; ARect: TRectF; ANode: TTMSFNCTreeViewVirtualNode);\r\nbegin\r\n if Assigned(OnAfterDrawItem) then\r\n OnAfterDrawItem(Self, AGraphics, ARect, GetItemForNode(ANode));\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.DoAfterDrawNodeCheck(Sender: TObject;\r\n AGraphics: TTMSFNCGraphics; ARect: TRectF; AColumn: Integer;\r\n ANode: TTMSFNCTreeViewVirtualNode; ACheck: TTMSFNCBitmap);\r\nbegin\r\n if Assigned(OnAfterDrawItemCheck) then\r\n OnAfterDrawItemCheck(Self, AGraphics, ARect, GetItemForNode(ANode), ACheck);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.DoAfterDrawNodeIcon(Sender: TObject;\r\n AGraphics: TTMSFNCGraphics; ARect: TRectF; AColumn: Integer;\r\n ANode: TTMSFNCTreeViewVirtualNode; AIcon: TTMSFNCBitmap);\r\nbegin\r\n if Assigned(OnAfterDrawItemIcon) then\r\n OnAfterDrawItemIcon(Self, AGraphics, ARect, GetItemForNode(ANode), AIcon);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.DoAfterDrawNodeText(Sender: TObject;\r\n AGraphics: TTMSFNCGraphics; ARect: TRectF; AColumn: Integer;\r\n ANode: TTMSFNCTreeViewVirtualNode; AText: String);\r\nbegin\r\n if Assigned(OnAfterDrawItemText) then\r\n OnAfterDrawItemText(Self, AGraphics, ARect, GetItemForNode(ANode), AText);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.DoAfterDrawNodeTitle(Sender: TObject;\r\n AGraphics: TTMSFNCGraphics; ARect: TRectF; AColumn: Integer;\r\n ANode: TTMSFNCTreeViewVirtualNode; ATitle: String);\r\nbegin\r\n if Assigned(OnAfterDrawItemTitle) then\r\n OnAfterDrawItemTitle(Self, AGraphics, ARect, GetItemForNode(ANode), ATitle);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.DoAfterDrawSortIndicator(Sender: TObject;\r\n AGraphics: TTMSFNCGraphics; ARect: TRectF; AColumn, ASortIndex: Integer;\r\n ASortKind: TTMSFNCTreeViewNodesSortKind);\r\nvar\r\n i: Integer;\r\n sk: TTMSFNCTableViewItemsSortKind;\r\nbegin\r\n if Assigned(OnAfterDrawSortIndicator) then\r\n begin\r\n i := Integer(ASortKind);\r\n sk := TTMSFNCTableViewItemsSortKind(i);\r\n OnAfterDrawSortIndicator(Self, AGraphics, ARect, ASortIndex, sk);\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.DoAfterDropItem(AFromItem: TTMSFNCTableViewItem; AToItem: TTMSFNCTableViewItem);\r\nbegin\r\n if Assigned(OnAfterDropItem) then\r\n OnAfterDropItem(Self, AFromItem, AToItem);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.DoAfterPasteFromClipboard(Sender: TObject);\r\nbegin\r\n if Assigned(OnAfterPasteFromClipboard) then\r\n OnAfterPasteFromClipboard(Self);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.DoAfterReorderItem(AFromItem, AToItem: TTMSFNCTableViewItem);\r\nbegin\r\n if Assigned(OnAfterReorderItem) then\r\n OnAfterReorderItem(Self, AFromItem, AToItem);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.DoAfterSelectNode(Sender: TObject;\r\n ANode: TTMSFNCTreeViewVirtualNode);\r\nbegin\r\n if Assigned(OnItemSelected) then\r\n OnItemSelected(Self, GetItemForNode(ANode));\r\n\r\n if Assigned(OnItemSelectionChanged) then\r\n OnItemSelectionChanged(Self);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.DoAfterUnCheckNode(Sender: TObject;\r\n ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer);\r\nvar\r\n dp: TTMSFNCTableViewDisplayItem;\r\nbegin\r\n if (ANode.Row >= 0) and (ANode.Row <= FDisplayList.Count - 1) then\r\n begin\r\n dp := FDisplayList[ANode.Row];\r\n case dp.Kind of\r\n tvikItem:\r\n begin\r\n if Assigned(dp.Item) then\r\n begin\r\n dp.Item.Checked := False;\r\n if Assigned(FTreeView) then\r\n FTreeView.DoAfterUnSelectNode(ANode);\r\n DoItemCheckChanged(dp.Item);\r\n end;\r\n end;\r\n tvikCategory: ;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.DoAfterUnSelectNode(Sender: TObject;\r\n ANode: TTMSFNCTreeViewVirtualNode);\r\nbegin\r\n if Assigned(OnItemUnSelected) then\r\n OnItemUnSelected(Self, GetItemForNode(ANode));\r\n\r\n if Assigned(OnItemSelectionChanged) then\r\n OnItemSelectionChanged(Self);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.DoBackButtonClicked(Sender: TObject);\r\nbegin\r\n HideDetailControl;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.DoBeforeApplyFilter(\r\n AFilter: TTMSFNCTableViewFilterData; AAllow: Boolean);\r\nbegin\r\n if Assigned(OnBeforeApplyFilter) then\r\n OnBeforeApplyFilter(Self, AFilter, AAllow);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.DoBeforeCopyToClipboard(Sender: TObject;\r\n var ACanCopy: Boolean);\r\nbegin\r\n if Assigned(OnBeforeCopyToClipboard) then\r\n OnBeforeCopyToClipboard(Self, ACanCopy);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.DoBeforeCutToClipboard(Sender: TObject;\r\n var ACanCut: Boolean);\r\nbegin\r\n if Assigned(OnBeforeCutToClipboard) then\r\n OnBeforeCutToClipboard(Self, ACanCut);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.DoBeforeDrawItemMoreOption(\r\n AGraphics: TTMSFNCGraphics; ARect: TRectF; AItem: TTMSFNCTableViewItem;\r\n AMoreOption: TTMSFNCTableViewMoreOption; var ADefaultDraw: Boolean);\r\nbegin\r\n if Assigned(OnBeforeDrawItemMoreOption) then\r\n OnBeforeDrawItemMoreOption(Self, AGraphics, ARect, AItem, AMoreOption, ADefaultDraw);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.DoBeforeDrawNode(Sender: TObject;\r\n AGraphics: TTMSFNCGraphics; ARect: TRectF; ANode: TTMSFNCTreeViewVirtualNode;\r\n var AAllow, ADefaultDraw: Boolean);\r\nbegin\r\n if Assigned(OnBeforeDrawItem) then\r\n OnBeforeDrawItem(Self, AGraphics, ARect, GetItemForNode(ANode), AAllow, ADefaultDraw);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.DoBeforeDrawNodeCheck(Sender: TObject;\r\n AGraphics: TTMSFNCGraphics; ARect: TRectF; AColumn: Integer;\r\n ANode: TTMSFNCTreeViewVirtualNode; ACheck: TTMSFNCBitmap; var AAllow: Boolean);\r\nbegin\r\n if Assigned(OnBeforeDrawItemCheck) then\r\n OnBeforeDrawItemCheck(Self, AGraphics, ARect, GetItemForNode(ANode), ACheck, AAllow);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.DoBeforeDrawNodeIcon(Sender: TObject;\r\n AGraphics: TTMSFNCGraphics; ARect: TRectF; AColumn: Integer;\r\n ANode: TTMSFNCTreeViewVirtualNode; AIcon: TTMSFNCBitmap; var AAllow: Boolean);\r\nbegin\r\n if Assigned(OnBeforeDrawItemIcon) then\r\n OnBeforeDrawItemIcon(Self, AGraphics, ARect, GetItemForNode(ANode), AIcon, AAllow);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.DoBeforeDrawNodeTitle(Sender: TObject;\r\n AGraphics: TTMSFNCGraphics; ARect: TRectF; AColumn: Integer;\r\n ANode: TTMSFNCTreeViewVirtualNode; ATitle: String; var AAllow: Boolean);\r\nbegin\r\n if Assigned(OnBeforeDrawItemTitle) then\r\n OnBeforeDrawItemTitle(Self, AGraphics, ARect, GetItemForNode(ANode), ATitle, AAllow);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.DoBeforeDrawNodeText(Sender: TObject;\r\n AGraphics: TTMSFNCGraphics; ARect: TRectF; AColumn: Integer;\r\n ANode: TTMSFNCTreeViewVirtualNode; AText: String; var AAllow: Boolean);\r\nbegin\r\n if Assigned(OnBeforeDrawItemText) then\r\n OnBeforeDrawItemText(Self, AGraphics, ARect, GetItemForNode(ANode), AText, AAllow);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.DoBeforeDrawSortIndicator(Sender: TObject;\r\n AGraphics: TTMSFNCGraphics; ARect: TRectF; AColumn, ASortIndex: Integer;\r\n ASortKind: TTMSFNCTreeViewNodesSortKind; var ADefaultDraw: Boolean);\r\nvar\r\n i: Integer;\r\n sk: TTMSFNCTableViewItemsSortKind;\r\nbegin\r\n if Assigned(OnBeforeDrawSortIndicator) then\r\n begin\r\n i := Integer(ASortKind);\r\n sk := TTMSFNCTableViewItemsSortKind(i);\r\n OnBeforeDrawSortIndicator(Self, AGraphics, ARect, ASortIndex, sk, ADefaultDraw);\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.DoBeforeDropItem(AFromItem: TTMSFNCTableViewItem; AToItem: TTMSFNCTableViewItem; var ACanDrop: Boolean);\r\nbegin\r\n if Assigned(OnBeforeDropItem) then\r\n OnBeforeDropItem(Self, AFromItem, AToItem, ACanDrop);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.DoBeforeItemHideDetailControl(\r\n AItem: TTMSFNCTableViewItem; ADetailControl: TControl; var AAllow: Boolean);\r\nbegin\r\n if Assigned(OnBeforeItemHideDetailControl) then\r\n OnBeforeItemHideDetailControl(Self, AItem, ADetailControl, AAllow);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.DoBeforeItemShowDetailControl(\r\n AItem: TTMSFNCTableViewItem; ADetailControl: TControl; var AAllow: Boolean);\r\nbegin\r\n if Assigned(OnBeforeItemShowDetailControl) then\r\n OnBeforeItemShowDetailControl(Self, AItem, ADetailControl, AAllow);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.DoBeforePasteFromClipboard(Sender: TObject;\r\n var ACanPaste: Boolean);\r\nbegin\r\n if Assigned(OnBeforePasteFromClipboard) then\r\n OnBeforePasteFromClipboard(Self, ACanPaste);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.DoBeforeReorderItem(AFromItem, AToItem: TTMSFNCTableViewItem; var ACanReorder: Boolean);\r\nbegin\r\n if Assigned(OnBeforeReorderItem) then\r\n OnBeforeReorderItem(Self, AFromItem, AToItem, ACanReorder);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.DoDoneButtonClicked(Sender: TObject);\r\nbegin\r\n StopEditMode;\r\n StopFiltering;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.DoCategoryCompare(ACategory1,\r\n ACategory2: TTMSFNCTableViewCategory; var ACompareResult: Integer);\r\nbegin\r\n if Assigned(OnCategoryCompare) then\r\n OnCategoryCompare(Self, ACategory1, ACategory2, ACompareResult);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.DoClick(Sender: TObject);\r\nbegin\r\n if Assigned(OnClick) then\r\n OnClick(Self);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.DoItemBitmapClick(\r\n AItem: TTMSFNCTableViewItem);\r\nbegin\r\n if Assigned(OnItemBitmapClick) then\r\n OnItemBitmapClick(Self, AItem);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.DoItemAccessoryClick(\r\n AItem: TTMSFNCTableViewItem);\r\nbegin\r\n if Assigned(OnItemAccessoryClick) then\r\n OnItemAccessoryClick(Self, AItem);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.DoHeaderAnchorClick(Sender: TObject; AAnchor: String);\r\nbegin\r\n if Assigned(OnHeaderAnchorClick) then\r\n OnHeaderAnchorClick(Self, AAnchor)\r\n else if Interaction.AutoOpenURL then\r\n TTMSFNCUtils.OpenURL(AAnchor);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.DoColumnSort(Sender: TObject; AColumn: Integer;\r\n ASortMode: TTMSFNCTreeViewNodesSortMode);\r\nvar\r\n i: Integer;\r\nbegin\r\n i := Integer(ASortMode);\r\n Items.Sort(Interaction.Sorting in [tvcsNormalCaseSensitive], TTMSFNCTableViewItemsSortMode(i));\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.DoCopyToClipboard(Sender: TObject);\r\nbegin\r\n CopyToClipboard(Interaction.ClipboardMode = tvcmTextOnly);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.DoCustomDragDrop(Sender, Source: TObject;\r\n Point: TPointF);\r\nvar\r\n di, dragi, li, dic, newi: TTMSFNCTableViewItem;\r\n dragn: TTMSFNCTreeViewVirtualNode;\r\n b: Boolean;\r\n tv: TTMSFNCCustomTableViewOpen;\r\nbegin\r\n if FAccepted and Assigned(Source) and (Source is TTMSFNCCustomTreeView) and ((Source as TTMSFNCCustomTreeView).Parent is TTMSFNCCustomTableView)\r\n and (TTMSFNCCustomTreeViewOpen(Source).Interaction.DragDropMode <> tdmNone) then\r\n begin\r\n dragn := (Source as TTMSFNCCustomTreeView).DragNode;\r\n if Assigned(dragn) then\r\n begin\r\n dragi := TTMSFNCCustomTableViewOpen((Source as TTMSFNCCustomTreeView).Parent).GetItemForNode(dragn);\r\n di := XYToItem(Point.X, Point.Y);\r\n if (di <> dragi) and Assigned(dragi) and PtInRectEx(GetItemsRect, Point) then\r\n begin\r\n b := True;\r\n if Assigned(di) then\r\n DoBeforeDropItem(dragi, di, b)\r\n else\r\n begin\r\n Inc(FUpdateCount);\r\n newi := Items.Add;\r\n Dec(FUpdateCount);\r\n DoBeforeDropItem(dragi, newi, b);\r\n newi.Free;\r\n end;\r\n\r\n if b then\r\n begin\r\n dic := nil;\r\n BeginUpdate;\r\n tv := TTMSFNCCustomTableViewOpen((Source as TTMSFNCCustomTreeView).Parent);\r\n tv.BeginUpdate;\r\n if Assigned(di) then\r\n begin\r\n case tv.Interaction.DragDropMode of\r\n tvdmMove:\r\n begin\r\n if (Source as TTMSFNCCustomTreeView).Parent = Self then\r\n begin\r\n DragItemMove(dragi, di);\r\n dragi.Index := di.Index;\r\n dic := di;\r\n end\r\n else\r\n begin\r\n li := Items.Add;\r\n DragItemAdd(li, dragi, di);\r\n tv.DragItemDelete(dragi);\r\n li.Assign(dragi);\r\n li.Index := di.Index;\r\n tv.Items.Delete(dragi.Index);\r\n tv.ItemIndex := tv.ItemIndex;\r\n dic := li;\r\n dragi := nil;\r\n end;\r\n end;\r\n tvdmCopy:\r\n begin\r\n li := Items.Add;\r\n DragItemAdd(li, dragi, di);\r\n li.Assign(dragi);\r\n li.Index := di.Index;\r\n dic := li;\r\n end;\r\n end;\r\n end\r\n else\r\n begin\r\n li := Items.Add;\r\n DragItemAdd(li, dragi, nil);\r\n li.Assign(dragi);\r\n case tv.Interaction.DragDropMode of\r\n tvdmMove:\r\n begin\r\n tv.DragItemDelete(dragi);\r\n tv.TreeView.RemoveNodeFromSelection(tv.GetNodeForItemIndex(dragi.Index));\r\n tv.Items.Delete(dragi.Index);\r\n tv.ItemIndex := tv.ItemIndex;\r\n dragi := nil;\r\n end;\r\n end;\r\n dic := li;\r\n end;\r\n (Source as TTMSFNCCustomTreeView).DragNode := nil;\r\n if Assigned(dic) then\r\n begin\r\n FSaveSelectedItem := dic.Index;\r\n SetLength(FSaveSelectedItems, 1);\r\n FSaveSelectedItems[0] := dic.Index;\r\n end;\r\n tv.EndUpdate;\r\n EndUpdate;\r\n DoAfterDropItem(dragi, dic);\r\n end;\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.DoCustomDragOver(Sender, Source: TObject;\r\n Point: TPointF; var Accept: Boolean);\r\nbegin\r\n Accept := (Interaction.DragDropMode <> tvdmNone) and (Source is TTMSFNCCustomTreeView) and Assigned((Source as TTMSFNCCustomTreeView).DragNode);\r\n Accept := Accept and PtInRectEx(GetItemsRect, Point);\r\n FAccepted := Accept;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.CustomizeButtons;\r\nbegin\r\n\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.DoCustomReorder(Sender: TObject; AFromNode,\r\n AToNode: TTMSFNCTreeViewVirtualNode);\r\nvar\r\n it, itt: TTMSFNCTableViewItem;\r\n b: Boolean;\r\nbegin\r\n if not Assigned(AFromNode) or not Assigned(AToNode) then\r\n Exit;\r\n\r\n b := True;\r\n it := GetItemForNode(AFromNode);\r\n itt := GetItemForNode(AToNode);\r\n DoBeforeReorderItem(it, itt, b);\r\n if b then\r\n begin\r\n BeginUpdate;\r\n it.Index := itt.Index;\r\n EndUpdate;\r\n DoAfterReorderItem(it, itt);\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.DoCutToClipboard(Sender: TObject);\r\nbegin\r\n CutToClipboard(Interaction.ClipboardMode = tvcmTextOnly);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.DoDetailControlTimer(Sender: TObject);\r\nvar\r\n d: Double;\r\n p: Double;\r\n anim: Boolean;\r\n cr: TRectF;\r\nbegin\r\n if Assigned(FActiveDetailControl) and Assigned(FTreeView) then\r\n begin\r\n if not FShowDetailControl then\r\n p := 0\r\n else\r\n begin\r\n cr := FTreeView.GetContentRect;\r\n p := cr.Right - cr.Left;\r\n end;\r\n\r\n if FTreeView.Interaction.AnimationFactor > 0 then\r\n begin\r\n d := Abs(FDetailControlOffset - p) / FTreeView.Interaction.AnimationFactor;\r\n anim := AnimateDouble(FDetailControlOffset, p, d, 0.01);\r\n end\r\n else\r\n anim := False;\r\n\r\n if not anim then\r\n begin\r\n FDetailControlOffset := p;\r\n FShowDetailControl := not FShowDetailControl;\r\n if not FShowDetailControl then\r\n begin\r\n DoItemHideDetailControl(FActiveDetailItem, FActiveDetailControl);\r\n FActiveDetailControl.Visible := False;\r\n FActiveDetailControl.Parent := nil;\r\n FActiveDetailControl := nil;\r\n FActiveDetailItem := nil;\r\n end\r\n else\r\n DoItemShowDetailControl(FActiveDetailItem, FActiveDetailControl);\r\n\r\n FDetailControlTimer.Enabled := False;\r\n end;\r\n\r\n UpdateTableView(True);\r\n UpdateActiveDetailControl;\r\n end\r\n else\r\n FDetailControlTimer.Enabled := False;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.DoDrawItemCustomAccessory(\r\n AGraphics: TTMSFNCGraphics; ARect: TRectF; AItem: TTMSFNCTableViewItem);\r\nbegin\r\n if Assigned(OnDrawItemCustomAccessory) then\r\n OnDrawItemCustomAccessory(Self, AGraphics, ARect, AItem);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.DoDrawNodeExtra(Sender: TObject;\r\n AGraphics: TTMSFNCGraphics; ARect: TRectF; AColumn: Integer;\r\n ANode: TTMSFNCTreeViewVirtualNode);\r\nvar\r\n dp: TTMSFNCTableViewDisplayItem;\r\n bmp: TTMSFNCBitmap;\r\n r: TRectF;\r\n h: Single;\r\n I: Integer;\r\n mo: TTMSFNCTableViewMoreOption;\r\n sz: Single;\r\n w: Single;\r\n a: Boolean;\r\n c, fc: TTMSFNCGraphicsColor;\r\nbegin\r\n if not Assigned(FTreeView) then\r\n Exit;\r\n\r\n if (ANode.Row >= 0) and (ANode.Row <= FDisplayList.Count - 1) then\r\n begin\r\n dp := FDisplayList[ANode.Row];\r\n case dp.Kind of\r\n tvikItem:\r\n begin\r\n if Assigned(dp.Item) then\r\n begin\r\n if (FTreeView.FMoreOffsetItem = dp.Item) and (MoreOptions.Count > 0) then\r\n begin\r\n AGraphics.Font.Assign(MoreOptionAppearance.Font);\r\n AGraphics.Fill.Assign(MoreOptionAppearance.Fill);\r\n AGraphics.Stroke.Assign(MoreOptionAppearance.Stroke);\r\n\r\n sz := FTreeView.FMoreOffset;\r\n w := sz / MoreOptions.Count;\r\n\r\n for I := 0 to MoreOptions.Count - 1 do\r\n begin\r\n mo := MoreOptions[I];\r\n if mo.Color <> gcNull then\r\n AGraphics.Fill.Color := mo.Color;\r\n if mo.BorderColor <> gcNull then\r\n AGraphics.Stroke.Color := mo.BorderColor;\r\n if mo.FontColor <> gcNull then\r\n AGraphics.Font.Color := mo.FontColor;\r\n r := RectF(ARect.Right - 1 + w * I, ARect.Top, ARect.Right - 1 + w * (I + 1), ARect.Bottom);\r\n a := True;\r\n DoBeforeDrawItemMoreOption(AGraphics, r, dp.Item, mo, a);\r\n if a then\r\n begin\r\n if FTreeview.FDownMoreOption = mo then\r\n begin\r\n AGraphics.Fill.Color := Lighter(AGraphics.Fill.Color, 20);\r\n AGraphics.Stroke.Color := Lighter(AGraphics.Stroke.Color, 20);\r\n end;\r\n\r\n AGraphics.DrawRectangle(r, gcrmNone);\r\n InflateRectEx(r, -2, -2);\r\n AGraphics.DrawText(r, mo.Text, False, gtaCenter);\r\n DoAfterDrawItemMoreOption(AGraphics, r, dp.Item, mo);\r\n end;\r\n end;\r\n end;\r\n\r\n if (dp.Item.AccessoryWidth > 0) and (dp.Item.AccessoryHeight > 0) and (dp.Item.Accessory <> tviaNone) then\r\n begin\r\n r := ARect;\r\n if dp.Item = FTreeView.FMoreOffsetItem then\r\n r.Left := r.Left + FTreeView.FMoreOffset;\r\n\r\n InflateRectEx(r, -4, -4);\r\n h := dp.Item.AccessoryHeight;\r\n r := RectF(r.Left, r.Top + ((r.Bottom - r.Top) - h) / 2, r.Right, r.Top + ((r.Bottom - r.Top) - h) / 2 + h);\r\n\r\n AGraphics.Font.Assign(ItemAppearance.AccessoryFont);\r\n\r\n if dp.Item.AccessoryFontColor <> gcNull then\r\n AGraphics.Font.Color := dp.Item.AccessoryFontColor;\r\n\r\n case dp.Item.Accessory of\r\n tviaDetail:\r\n begin\r\n bmp := TTMSFNCGraphics.GetScaledBitmap(ItemAppearance.AccessoryDetailBitmaps, 0, BitmapContainer);\r\n if Assigned(bmp) and not IsBitmapEmpty(bmp) then\r\n AGraphics.DrawBitmap(r, bmp);\r\n end;\r\n tviaProgress:\r\n begin\r\n c := ItemAppearance.AccessoryFill.Color;\r\n if dp.Item.AccessoryColor <> gcNull then\r\n c := dp.Item.AccessoryColor;\r\n fc := ItemAppearance.AccessoryFont.Color;\r\n if dp.Item.AccessoryFontColor <> gcNull then\r\n fc := dp.Item.AccessoryFontColor;\r\n AGraphics.DrawProgressBar(r, dp.Item.AccessoryProgress, '%.0f%%', 100, c, fc);\r\n end;\r\n tviaBadge: DrawBadge(AGraphics, r, dp.Item);\r\n tviaButton:\r\n begin\r\n AGraphics.DrawButton(r, dp.Item = FActiveAccessoryItem);\r\n AGraphics.DrawText(r, dp.Item.AccessoryText, False, gtaCenter, gtaCenter);\r\n end;\r\n tviaCustom: DoDrawItemCustomAccessory(AGraphics, r, dp.Item);\r\n end;\r\n end;\r\n end;\r\n end;\r\n tvikCategory: ;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.DoEditButtonClicked(Sender: TObject);\r\nbegin\r\n StartEditMode;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.DoEditChange(Sender: TObject);\r\nbegin\r\n FFilterTime := 0;\r\n FilterTimer.Enabled := True;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.DoEnter;\r\nbegin\r\n inherited;\r\n if Assigned(FTreeView) and FTreeView.AllowFocus then\r\n FTreeView.SetFocus;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.DoFilterSelect(Sender: TObject; AColumn: integer;\r\n var ACondition: string);\r\nbegin\r\n if Assigned(OnFilterSelect) then\r\n OnFilterSelect(Self, ACondition);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.DoFooterAnchorClick(Sender: TObject; AAnchor: String);\r\nbegin\r\n if Assigned(OnFooterAnchorClick) then\r\n OnFooterAnchorClick(Self, AAnchor)\r\n else if Interaction.AutoOpenURL then\r\n TTMSFNCUtils.OpenURL(AAnchor);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.DoGetColumnHorizontalTextAlign(Sender: TObject;\r\n AColumn: Integer; AKind: TTMSFNCTreeViewCacheItemKind;\r\n var AHorizontalTextAlign: TTMSFNCGraphicsTextAlign);\r\nbegin\r\n case AKind of\r\n ikColumnTop: AHorizontalTextAlign := Header.HorizontalTextAlign;\r\n ikColumnBottom: AHorizontalTextAlign := Footer.HorizontalTextAlign;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.DoGetColumnText(Sender: TObject;\r\n AColumn: Integer; AKind: TTMSFNCTreeViewCacheItemKind; var AText: String);\r\nbegin\r\n case AKind of\r\n ikColumnTop: AText := Header.Text;\r\n ikColumnBottom: AText := Footer.Text;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.DoGetColumnTrimming(Sender: TObject;\r\n AColumn: Integer; AKind: TTMSFNCTreeViewCacheItemKind;\r\n var ATrimming: TTMSFNCGraphicsTextTrimming);\r\nbegin\r\n case AKind of\r\n ikColumnTop: ATrimming := Header.Trimming;\r\n ikColumnBottom: ATrimming := Footer.Trimming;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.DoGetColumnVerticalTextAlign(Sender: TObject;\r\n AColumn: Integer; AKind: TTMSFNCTreeViewCacheItemKind;\r\n var AVerticalTextAlign: TTMSFNCGraphicsTextAlign);\r\nbegin\r\n case AKind of\r\n ikColumnTop: AVerticalTextAlign := Header.VerticalTextAlign;\r\n ikColumnBottom: AVerticalTextAlign := Footer.VerticalTextAlign;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.DoGetColumnWordWrapping(Sender: TObject;\r\n AColumn: Integer; AKind: TTMSFNCTreeViewCacheItemKind;\r\n var AWordWrapping: Boolean);\r\nbegin\r\n case AKind of\r\n ikColumnTop: AWordWrapping := Header.WordWrapping;\r\n ikColumnBottom: AWordWrapping := Footer.WordWrapping;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.DoGetHTMLTemplate(AItem: TTMSFNCTableViewItem;\r\n var AHTMLTemplate: string);\r\nbegin\r\n if Assigned(OnGetHTMLTemplate) then\r\n OnGetHTMLTemplate(Self, AItem, AHTMLTemplate);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.DoGetHTMLTemplateValue(\r\n AItem: TTMSFNCTableViewItem; AName: string; var AValue: string);\r\nbegin\r\n if Assigned(OnGetHTMLTemplateValue) then\r\n OnGetHTMLTemplateValue(Self, AItem, AName, AValue);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.DoIsNodeExtended(Sender: TObject;\r\n ANode: TTMSFNCTreeViewVirtualNode; var AExtended: Boolean);\r\nvar\r\n dp: TTMSFNCTableViewDisplayItem;\r\nbegin\r\n if (ANode.Row >= 0) and (ANode.Row <= FDisplayList.Count - 1) then\r\n begin\r\n dp := FDisplayList[ANode.Row];\r\n case dp.Kind of\r\n tvikCategory: AExtended := True;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.DoGetNodeCheckType(Sender: TObject;\r\n ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer;\r\n var ACheckType: TTMSFNCTreeViewNodeCheckType);\r\nvar\r\n dp: TTMSFNCTableViewDisplayItem;\r\n i: Integer;\r\nbegin\r\n if FEditMode then\r\n begin\r\n if (ANode.Row >= 0) and (ANode.Row <= FDisplayList.Count - 1) then\r\n begin\r\n dp := FDisplayList[ANode.Row];\r\n case dp.Kind of\r\n tvikItem:\r\n begin\r\n if Assigned(dp.Item) then\r\n begin\r\n i := Integer(dp.Item.CheckType);\r\n ACheckType := TTMSFNCTreeViewNodeCheckType(i);\r\n end;\r\n end;\r\n tvikCategory: ;\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.DoGetNodeDisabledTextColor(Sender: TObject;\r\n ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer;\r\n var ADisabledTextColor: TTMSFNCGraphicsColor);\r\nvar\r\n dp: TTMSFNCTableViewDisplayItem;\r\nbegin\r\n if (ANode.Row >= 0) and (ANode.Row <= FDisplayList.Count - 1) then\r\n begin\r\n dp := FDisplayList[ANode.Row];\r\n case dp.Kind of\r\n tvikItem:\r\n begin\r\n if Assigned(dp.Item) then\r\n ADisabledTextColor := dp.Item.DisabledTextColor;\r\n end;\r\n tvikCategory: ;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.DoGetNodeDisabledTitleColor(Sender: TObject; ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer;\r\n var ADisabledTitleColor: TTMSFNCGraphicsColor);\r\nvar\r\n dp: TTMSFNCTableViewDisplayItem;\r\nbegin\r\n if (ANode.Row >= 0) and (ANode.Row <= FDisplayList.Count - 1) then\r\n begin\r\n dp := FDisplayList[ANode.Row];\r\n case dp.Kind of\r\n tvikItem:\r\n begin\r\n if Assigned(dp.Item) then\r\n ADisabledTitleColor := dp.Item.DisabledTitleColor;\r\n end;\r\n tvikCategory: ;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.DoGetNodeHeight(Sender: TObject; ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer; var AHeight: Double);\r\nvar\r\n dp: TTMSFNCTableViewDisplayItem;\r\nbegin\r\n if (ANode.Row >= 0) and (ANode.Row <= FDisplayList.Count - 1) then\r\n begin\r\n dp := FDisplayList[ANode.Row];\r\n case dp.Kind of\r\n tvikItem:\r\n begin\r\n if ItemAppearance.Height > -1 then\r\n AHeight := ItemAppearance.Height;\r\n\r\n if Assigned(dp.Item) and (dp.Item.Height > -1) then\r\n AHeight := dp.Item.Height;\r\n end;\r\n tvikCategory:\r\n begin\r\n if CategoryAppearance.Height > -1 then\r\n AHeight := CategoryAppearance.Height;\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.DoGetNodeHorizontalTextAlign(Sender: TObject; ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer;\r\n var AHorizontalTextAlign: TTMSFNCGraphicsTextAlign);\r\nvar\r\n dp: TTMSFNCTableViewDisplayItem;\r\nbegin\r\n if (ANode.Row >= 0) and (ANode.Row <= FDisplayList.Count - 1) then\r\n begin\r\n dp := FDisplayList[ANode.Row];\r\n case dp.Kind of\r\n tvikItem:\r\n begin\r\n if Assigned(dp.Item) then\r\n AHorizontalTextAlign := dp.Item.HorizontalTextAlign;\r\n end;\r\n tvikCategory: ;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.DoGetNodeVerticalTextAlign(Sender: TObject; ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer; var AVerticalTextAlign: TTMSFNCGraphicsTextAlign);\r\nvar\r\n dp: TTMSFNCTableViewDisplayItem;\r\nbegin\r\n if (ANode.Row >= 0) and (ANode.Row <= FDisplayList.Count - 1) then\r\n begin\r\n dp := FDisplayList[ANode.Row];\r\n case dp.Kind of\r\n tvikItem:\r\n begin\r\n if Assigned(dp.Item) then\r\n AVerticalTextAlign := dp.Item.VerticalTextAlign;\r\n end;\r\n tvikCategory: ;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.DoGetNodeIcon(Sender: TObject; ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer; ALarge: Boolean; var AIcon: TTMSFNCBitmap);\r\nvar\r\n dp: TTMSFNCTableViewDisplayItem;\r\nbegin\r\n if (ANode.Row >= 0) and (ANode.Row <= FDisplayList.Count - 1) then\r\n begin\r\n dp := FDisplayList[ANode.Row];\r\n case dp.Kind of\r\n tvikItem:\r\n begin\r\n if Assigned(dp.Item) then\r\n begin\r\n if Assigned(BitmapContainer) and (dp.Item.BitmapName <> '') then\r\n AIcon := TTMSFNCBitmap(BitmapContainer.FindBitmap(dp.Item.BitmapName));\r\n\r\n if not Assigned(AIcon) then\r\n AIcon := dp.Item.Bitmap;\r\n end;\r\n end;\r\n tvikCategory: ;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.DoGetNodeSelectedTextColor(Sender: TObject; ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer; var ASelectedTextColor: TTMSFNCGraphicsColor);\r\nvar\r\n dp: TTMSFNCTableViewDisplayItem;\r\nbegin\r\n if (ANode.Row >= 0) and (ANode.Row <= FDisplayList.Count - 1) then\r\n begin\r\n dp := FDisplayList[ANode.Row];\r\n case dp.Kind of\r\n tvikItem:\r\n begin\r\n if Assigned(dp.Item) then\r\n ASelectedTextColor := dp.Item.SelectedTextColor;\r\n end;\r\n tvikCategory: ;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.DoGetNodeSelectedTitleColor(Sender: TObject; ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer; var ASelectedTitleColor: TTMSFNCGraphicsColor);\r\nvar\r\n dp: TTMSFNCTableViewDisplayItem;\r\nbegin\r\n if (ANode.Row >= 0) and (ANode.Row <= FDisplayList.Count - 1) then\r\n begin\r\n dp := FDisplayList[ANode.Row];\r\n case dp.Kind of\r\n tvikItem:\r\n begin\r\n if Assigned(dp.Item) then\r\n ASelectedTitleColor := dp.Item.SelectedTitleColor;\r\n end;\r\n tvikCategory: ;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.DoGetNodeSides(Sender: TObject; ANode: TTMSFNCTreeViewVirtualNode; var ASides: TTMSFNCGraphicsSides);\r\nvar\r\n dp: TTMSFNCTableViewDisplayItem;\r\n n: TTMSFNCTreeViewVirtualNode;\r\nbegin\r\n if Assigned(FTreeView) then\r\n begin\r\n if (ANode.Row >= 0) and (ANode.Row <= FDisplayList.Count - 1) then\r\n begin\r\n dp := FDisplayList[ANode.Row];\r\n if not FTreeView.IsVirtualNodeSelected(ANode) and not (dp.Kind = tvikCategory) then\r\n begin\r\n if FTreeView.GetLastVirtualNode = ANode then\r\n ASides := []\r\n else\r\n begin\r\n n := FTreeView.GetNextVirtualNode(ANode);\r\n if Assigned(n) and (n.Row >= 0) and (n.Row <= FDisplayList.Count - 1) then\r\n begin\r\n dp := FDisplayList[n.Row];\r\n if dp.Kind = tvikItem then\r\n ASides := [gsBottom]\r\n else\r\n ASides := [];\r\n end;\r\n end;\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.HideDetailControl;\r\nvar\r\n a: Boolean;\r\nbegin\r\n if (Assigned(FTreeView) and FTreeView.FReloadActive) or not Assigned(FTreeView) or not FShowDetailControl then\r\n Exit;\r\n\r\n FTreeView.StopAnimationTimer;\r\n\r\n a := True;\r\n DoBeforeItemHideDetailControl(FActiveDetailItem, FActiveDetailControl, a);\r\n\r\n if Assigned(FActiveDetailControl) and Assigned(FTreeView) and a then\r\n begin\r\n FShowDetailControl := True;\r\n UpdateActiveDetailControl;\r\n FDetailControlTimer.Enabled := True;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.HideMoreOptions;\r\nbegin\r\n if (Assigned(FTreeView) and (FTreeView.FReloadActive or FFilterActive or Assigned(FActiveDetailControl))) or not Assigned(FTreeView) then\r\n Exit;\r\n\r\n FTreeView.FAnimateMoreOptions := False;\r\n FTreeView.FAnimateMoreOptionsClose := True;\r\n FTreeView.FMoreOffsetTo := 0;\r\n FTreeView.FAnimTimer.Enabled := True;\r\n FTreeView.BlockMouseClick := False;\r\nend;\r\n\r\nfunction TTMSFNCCustomTableView.HTMLReplace(AValue: string; AItem: TTMSFNCTableViewItem): string;\r\nvar\r\n beforetag, aftertag, nm, vl: string;\r\n i, j: integer;\r\nbegin\r\n Result := '';\r\n if not Assigned(AItem) then\r\n Exit;\r\n\r\n beforetag := '';\r\n\r\n while (Pos('<#', AValue) > 0) and (Pos('>', AValue) > 0) do\r\n begin\r\n i := pos('<#', AValue);\r\n beforetag := beforetag + copy(AValue, 1, i - 1); //part prior to the tag\r\n aftertag := copy(AValue, i, length(AValue)); //part after the tag\r\n j := pos('>', aftertag);\r\n nm := copy(aftertag, 1, j - 1);\r\n Delete(nm, 1, 2);\r\n Delete(AValue, 1, i + j - 1);\r\n vl := AItem.HTMLTemplateItems.Values[nm];\r\n DoGetHTMLTemplateValue(AItem, nm, vl);\r\n beforetag := beforetag + vl;\r\n end;\r\n\r\n Result := beforetag + AValue;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.DoGetNodeTitleExpanded(Sender: TObject; ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer; var AExpanded: Boolean);\r\nvar\r\n dp: TTMSFNCTableViewDisplayItem;\r\nbegin\r\n if (ANode.Row >= 0) and (ANode.Row <= FDisplayList.Count - 1) then\r\n begin\r\n dp := FDisplayList[ANode.Row];\r\n case dp.Kind of\r\n tvikItem:\r\n begin\r\n if Assigned(dp.Item) then\r\n AExpanded := dp.Item.TitleExpanded;\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.DoGetNodeTitle(Sender: TObject; ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer; AMode: TTMSFNCTreeViewNodeTextMode; var ATitle: String);\r\nvar\r\n dp: TTMSFNCTableViewDisplayItem;\r\nbegin\r\n if (ANode.Row >= 0) and (ANode.Row <= FDisplayList.Count - 1) then\r\n begin\r\n dp := FDisplayList[ANode.Row];\r\n case dp.Kind of\r\n tvikItem:\r\n begin\r\n if Assigned(dp.Item) then\r\n ATitle := dp.Item.GetTitle;\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.DoGetNodeTitleColor(Sender: TObject; ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer; var ATitleColor: TTMSFNCGraphicsColor);\r\nvar\r\n dp: TTMSFNCTableViewDisplayItem;\r\nbegin\r\n if (ANode.Row >= 0) and (ANode.Row <= FDisplayList.Count - 1) then\r\n begin\r\n dp := FDisplayList[ANode.Row];\r\n case dp.Kind of\r\n tvikItem:\r\n begin\r\n if Assigned(dp.Item) then\r\n ATitleColor := dp.Item.TitleColor;\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.DoGetNodeTitleHorizontalTextAlign(Sender: TObject; ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer;\r\n var AHorizontalTextAlign: TTMSFNCGraphicsTextAlign);\r\nvar\r\n dp: TTMSFNCTableViewDisplayItem;\r\nbegin\r\n if (ANode.Row >= 0) and (ANode.Row <= FDisplayList.Count - 1) then\r\n begin\r\n dp := FDisplayList[ANode.Row];\r\n case dp.Kind of\r\n tvikItem:\r\n begin\r\n if Assigned(dp.Item) then\r\n AHorizontalTextAlign := dp.Item.TitleHorizontalTextAlign;\r\n end;\r\n tvikCategory: ;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.DoGetNodeTitleTrimming(Sender: TObject; ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer; var ATrimming: TTMSFNCGraphicsTextTrimming);\r\nvar\r\n dp: TTMSFNCTableViewDisplayItem;\r\nbegin\r\n if (ANode.Row >= 0) and (ANode.Row <= FDisplayList.Count - 1) then\r\n begin\r\n dp := FDisplayList[ANode.Row];\r\n case dp.Kind of\r\n tvikItem:\r\n begin\r\n if Assigned(dp.Item) then\r\n ATrimming := dp.Item.TitleTrimming;\r\n end;\r\n tvikCategory: ;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.DoGetNodeTitleVerticalTextAlign(Sender: TObject; ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer;\r\n var AVerticalTextAlign: TTMSFNCGraphicsTextAlign);\r\nvar\r\n dp: TTMSFNCTableViewDisplayItem;\r\nbegin\r\n if (ANode.Row >= 0) and (ANode.Row <= FDisplayList.Count - 1) then\r\n begin\r\n dp := FDisplayList[ANode.Row];\r\n case dp.Kind of\r\n tvikItem:\r\n begin\r\n if Assigned(dp.Item) then\r\n AVerticalTextAlign := dp.Item.TitleVerticalTextAlign;\r\n end;\r\n tvikCategory: ;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.DoGetNodeTitleWordWrapping(Sender: TObject; ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer; var AWordWrapping: Boolean);\r\nvar\r\n dp: TTMSFNCTableViewDisplayItem;\r\nbegin\r\n if (ANode.Row >= 0) and (ANode.Row <= FDisplayList.Count - 1) then\r\n begin\r\n dp := FDisplayList[ANode.Row];\r\n case dp.Kind of\r\n tvikItem:\r\n begin\r\n if Assigned(dp.Item) then\r\n AWordWrapping := dp.Item.TitleWordWrapping;\r\n end;\r\n tvikCategory: ;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.DoGetNodeText(Sender: TObject; ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer; AMode: TTMSFNCTreeViewNodeTextMode; var AText: String);\r\nvar\r\n dp: TTMSFNCTableViewDisplayItem;\r\nbegin\r\n if (ANode.Row >= 0) and (ANode.Row <= FDisplayList.Count - 1) then\r\n begin\r\n dp := FDisplayList[ANode.Row];\r\n case dp.Kind of\r\n tvikItem:\r\n begin\r\n if Assigned(dp.Item) then\r\n AText := dp.Item.GetText;\r\n end;\r\n tvikCategory: AText := dp.Text;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.DoGetNodeTextColor(Sender: TObject; ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer; var ATextColor: TTMSFNCGraphicsColor);\r\nvar\r\n dp: TTMSFNCTableViewDisplayItem;\r\nbegin\r\n if (ANode.Row >= 0) and (ANode.Row <= FDisplayList.Count - 1) then\r\n begin\r\n dp := FDisplayList[ANode.Row];\r\n case dp.Kind of\r\n tvikItem:\r\n begin\r\n if Assigned(dp.Item) then\r\n ATextColor := dp.Item.TextColor;\r\n end;\r\n tvikCategory: ATextColor := CategoryAppearance.Font.Color;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.DoGetNodeTrimming(Sender: TObject; ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer; var ATrimming: TTMSFNCGraphicsTextTrimming);\r\nvar\r\n dp: TTMSFNCTableViewDisplayItem;\r\nbegin\r\n if (ANode.Row >= 0) and (ANode.Row <= FDisplayList.Count - 1) then\r\n begin\r\n dp := FDisplayList[ANode.Row];\r\n case dp.Kind of\r\n tvikItem:\r\n begin\r\n if Assigned(dp.Item) then\r\n ATrimming := dp.Item.Trimming;\r\n end;\r\n tvikCategory: ;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.DoGetNodeWordWrapping(Sender: TObject; ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer; var AWordWrapping: Boolean);\r\nvar\r\n dp: TTMSFNCTableViewDisplayItem;\r\nbegin\r\n if (ANode.Row >= 0) and (ANode.Row <= FDisplayList.Count - 1) then\r\n begin\r\n dp := FDisplayList[ANode.Row];\r\n case dp.Kind of\r\n tvikItem:\r\n begin\r\n if Assigned(dp.Item) then\r\n AWordWrapping := dp.Item.WordWrapping;\r\n end;\r\n tvikCategory: ;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.DoGetNodeExtraSize(Sender: TObject; ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer; var AExtraSize: Single);\r\nvar\r\n dp: TTMSFNCTableViewDisplayItem;\r\nbegin\r\n if not Assigned(FTreeView) then\r\n Exit;\r\n\r\n if (ANode.Row >= 0) and (ANode.Row <= FDisplayList.Count - 1) then\r\n begin\r\n dp := FDisplayList[ANode.Row];\r\n case dp.Kind of\r\n tvikItem:\r\n begin\r\n if Assigned(dp.Item) and (dp.Item.AccessoryWidth > 0) and (dp.Item.Accessory <> tviaNone) then\r\n AExtraSize := dp.Item.AccessoryWidth + 8;\r\n\r\n if dp.Item = FTreeView.FMoreOffsetItem then\r\n AExtraSize := AExtraSize + FTreeView.FMoreOffset;\r\n end;\r\n tvikCategory: ;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.DoGetNumberOfNodes(Sender: TObject; ANode: TTMSFNCTreeViewVirtualNode; var ANumberOfNodes: Integer);\r\nbegin\r\n if ANode.Level = -1 then\r\n ANumberOfNodes := FDisplayList.Count;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.DoIsNodeChecked(Sender: TObject; ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer; var AIsChecked: Boolean);\r\nvar\r\n dp: TTMSFNCTableViewDisplayItem;\r\nbegin\r\n if (ANode.Row >= 0) and (ANode.Row <= FDisplayList.Count - 1) then\r\n begin\r\n dp := FDisplayList[ANode.Row];\r\n case dp.Kind of\r\n tvikItem:\r\n begin\r\n if Assigned(dp.Item) then\r\n AIsChecked := dp.Item.Checked;\r\n end;\r\n tvikCategory: ;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.DoIsNodeEnabled(Sender: TObject; ANode: TTMSFNCTreeViewVirtualNode; var AEnabled: Boolean);\r\nvar\r\n dp: TTMSFNCTableViewDisplayItem;\r\nbegin\r\n if (ANode.Row >= 0) and (ANode.Row <= FDisplayList.Count - 1) then\r\n begin\r\n dp := FDisplayList[ANode.Row];\r\n case dp.Kind of\r\n tvikItem:\r\n begin\r\n if Assigned(dp.Item) then\r\n AEnabled := dp.Item.Enabled;\r\n end;\r\n tvikCategory: ;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.DoLookup(Sender: TObject; ALookupString: String);\r\nbegin\r\n LookupItem(ALookupString, Interaction.Lookup.CaseSensitive, Interaction.Lookup.AutoSelect)\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.DoItemMoreOptionClick(AItem: TTMSFNCTableViewItem; AMoreOption: TTMSFNCTableViewMoreOption);\r\nbegin\r\n if Assigned(OnItemMoreOptionClick) then\r\n OnItemMoreOptionClick(Self, AItem, AMoreOption);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.DoItemShowDetailControl(\r\n AItem: TTMSFNCTableViewItem; ADetailControl: TControl);\r\nbegin\r\n if Assigned(OnItemShowDetailControl) then\r\n OnItemShowDetailControl(Self, AItem, ADetailControl);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.DoNeedFilterDropDownData(Sender: TObject;\r\n AColumn: Integer; AValues: TStrings);\r\nbegin\r\n if Assigned(OnNeedFilterDropDownData) then\r\n OnNeedFilterDropDownData(Self, AValues);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.DoNodeAnchorClick(Sender: TObject;\r\n ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer; AAnchor: String);\r\nbegin\r\n if Assigned(OnItemAnchorClick) then\r\n OnItemAnchorClick(Self, GetItemForNode(ANode), AAnchor)\r\n else if Interaction.AutoOpenURL then\r\n TTMSFNCUtils.OpenURL(AAnchor);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.DoNodeClick(Sender: TObject;\r\n ANode: TTMSFNCTreeViewVirtualNode);\r\nvar\r\n it: TTMSFNCTableViewItem;\r\nbegin\r\n it := GetItemForNode(ANode);\r\n\r\n if Assigned(it) and (Interaction.ShowDetailMode = tvdtAfterSelectItem) and not FEditMode then\r\n it.ShowDetailControl;\r\n\r\n if Assigned(it) and FEditMode then\r\n begin\r\n if it.Checked then\r\n begin\r\n it.Checked := False;\r\n FTreeView.DoAfterUnSelectNode(ANode);\r\n end\r\n else\r\n begin\r\n it.Checked := True;\r\n FTreeView.DoAfterSelectNode(ANode);\r\n end;\r\n\r\n SelectAllCheckedItems;\r\n end;\r\n\r\n if Assigned(OnItemClick) then\r\n OnItemClick(Self, GetItemForNode(ANode));\r\n\r\n {$IFDEF FNCLIB}\r\n if Assigned(Parent) and (Parent is TTMSFNCCustomSelector) and Assigned(Parent.Owner) and (Parent.Owner is TTMSFNCControlPicker)then\r\n begin\r\n// Update ControlPicker if assigned as control\r\n if Assigned(it) then\r\n (Parent.Owner as TTMSFNCControlPicker).CallItemClicked(it.Index)\r\n else\r\n (Parent.Owner as TTMSFNCControlPicker).UpdateDropDown;\r\n end;\r\n {$ENDIF}\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.DoNodeMouseEnter(Sender: TObject;\r\n ANode: TTMSFNCTreeViewVirtualNode);\r\nbegin\r\n if Assigned(OnItemMouseEnter) then\r\n OnItemMouseEnter(Self, GetItemForNode(ANode));\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.DoNodeMouseLeave(Sender: TObject;\r\n ANode: TTMSFNCTreeViewVirtualNode);\r\nbegin\r\n if Assigned(OnItemMouseLeave) then\r\n OnItemMouseLeave(Self, GetItemForNode(ANode));\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.DoNodeTitleAnchorClick(Sender: TObject;\r\n ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer; AAnchor: String);\r\nbegin\r\n if Assigned(OnItemTitleAnchorClick) then\r\n OnItemTitleAnchorClick(Self, GetItemForNode(ANode), AAnchor)\r\n else if Interaction.AutoOpenURL then\r\n TTMSFNCUtils.OpenURL(AAnchor);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.DoItemCheckChanged(AItem: TTMSFNCTableViewItem);\r\nbegin\r\n if Assigned(OnItemCheckChanged) then\r\n OnItemCheckChanged(Self, AItem);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.DoItemCompare(AItem1: TTMSFNCTableViewItem; AItem2: TTMSFNCTableViewItem; var ACompareResult: Integer);\r\nbegin\r\n if Assigned(OnItemCompare) then\r\n OnItemCompare(Self, AItem1, AItem2, ACompareResult);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.DoItemHideDetailControl(\r\n AItem: TTMSFNCTableViewItem; ADetailControl: TControl);\r\nbegin\r\n if Assigned(OnItemHideDetailControl) then\r\n OnItemHideDetailControl(Self, AItem, ADetailControl);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.DoNodeDblClick(Sender: TObject;\r\n ANode: TTMSFNCTreeViewVirtualNode);\r\nbegin\r\n if Assigned(OnItemDblClick) then\r\n OnItemDblClick(Self, GetItemForNode(ANode));\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.DoPasteFromClipboard(Sender: TObject);\r\nbegin\r\n PasteFromClipboard;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.DoFilterButtonClicked(Sender: TObject);\r\nbegin\r\n StartFiltering;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.DoStartReload;\r\nbegin\r\n if Assigned(OnStartReload) then\r\n OnStartReload(Self);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.DoStopReload;\r\nbegin\r\n if Assigned(OnStopReload) then\r\n OnStopReload(Self);\r\nend;\r\n\r\n{$IFDEF FMXLIB}\r\nprocedure TTMSFNCCustomTableView.DoTreeViewMouseWheel(Sender: TObject; Shift: TShiftState; WheelDelta: Integer; var Handled: Boolean);\r\nbegin\r\n if Assigned(OnMouseWheel) then\r\n OnMouseWheel(Self, Shift, WheelDelta, Handled);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.DoTreeViewKeyDown(Sender: TObject; var Key: Word; var KeyChar: WideChar; Shift: TShiftState);\r\nbegin\r\n if Assigned(OnKeyDown) then\r\n OnKeyDown(Self, Key, KeyChar, Shift);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.DoTreeViewKeyUp(Sender: TObject; var Key: Word; var KeyChar: WideChar; Shift: TShiftState);\r\nbegin\r\n if Assigned(OnKeyUp) then\r\n OnKeyUp(Self, Key, KeyChar, Shift);\r\nend;\r\n{$ENDIF}\r\n{$IFDEF CMNWEBLIB}\r\nprocedure TTMSFNCCustomTableView.DoTreeViewMouseWheelDown(Sender: TObject; Shift: TShiftState; MousePos: TPoint; var Handled: Boolean);\r\nbegin\r\n if Assigned(OnMouseWheelDown) then\r\n OnMouseWheelDown(Self, Shift, MousePos, Handled);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.DoTreeViewMouseWheelUp(Sender: TObject; Shift: TShiftState; MousePos: TPoint; var Handled: Boolean);\r\nbegin\r\n if Assigned(OnMouseWheelUp) then\r\n OnMouseWheelUp(Self, Shift, MousePos, Handled);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.DoTreeViewKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);\r\nbegin\r\n if Assigned(OnKeyDown) then\r\n OnKeyDown(Self, Key, Shift);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.DoTreeViewKeyUp(Sender: TObject; var Key: Word; Shift: TShiftState);\r\nbegin\r\n if Assigned(OnKeyUp) then\r\n OnKeyUp(Self, Key, Shift);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.DoTreeViewKeyPress(Sender: TObject; var AChar: Char);\r\nbegin\r\n if Assigned(OnKeyPress) then\r\n OnKeyPress(Self, AChar);\r\nend;\r\n{$ENDIF}\r\n\r\nprocedure TTMSFNCCustomTableView.DoVScroll(Sender: TObject; APosition: Single);\r\nbegin\r\n if Assigned(OnVScroll) then\r\n OnVScroll(Self, APosition);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.DragItemAdd(ANewItem, AAssignItem, AInsertItem: TTMSFNCTableViewItem);\r\nbegin\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.DragItemDelete(AItem: TTMSFNCTableViewItem);\r\nbegin\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.DragItemMove(AFromItem, AToItem: TTMSFNCTableViewItem);\r\nbegin\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.Draw(AGraphics: TTMSFNCGraphics; ARect: TRectF);\r\nbegin\r\n inherited;\r\n if not FFirstLoad then\r\n begin\r\n FFirstLoad := True;\r\n UpdateControlAfterResize;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.DrawBackground(AGraphics: TTMSFNCGraphics;\r\n ARect: TRectF);\r\nbegin\r\n AGraphics.Fill.Assign(Fill);\r\n AGraphics.Fill.Color := Color;\r\n AGraphics.Stroke.Assign(Stroke);\r\n AGraphics.DrawRectangle(ARect);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.DrawBadge(AGraphics: TTMSFNCGraphics; ARect: TRectF; AItem: TTMSFNCTableViewItem);\r\nvar\r\n r: TRectF;\r\n sz: TSizeF;\r\n s: String;\r\n pth: TTMSFNCGraphicsPath;\r\n rnd: Single;\r\nbegin\r\n if (AItem.AccessoryText = '') then\r\n Exit;\r\n\r\n AGraphics.Font.Assign(ItemAppearance.AccessoryFont);\r\n AGraphics.Stroke.Assign(ItemAppearance.AccessoryStroke);\r\n AGraphics.Fill.Assign(ItemAppearance.AccessoryFill);\r\n\r\n if AItem.AccessoryFontColor <> gcNull then\r\n AGraphics.Font.Color := AItem.AccessoryFontColor;\r\n\r\n if AItem.AccessoryBorderColor <> gcNull then\r\n AGraphics.Stroke.Color := AItem.AccessoryBorderColor;\r\n\r\n if AItem.AccessoryColor <> gcNull then\r\n AGraphics.Fill.Color := AItem.AccessoryColor;\r\n\r\n s := AItem.AccessoryText;\r\n sz := AGraphics.CalculateTextSize(s);\r\n sz.cy := sz.cy + 4;\r\n sz.cx := Max(sz.cy, sz.cx + 6);\r\n\r\n r := ARect;\r\n\r\n case AItem.BadgeAlign of\r\n gtaCenter: r := RectF(r.Left + ((r.Right - r.Left) - sz.cx) / 2, r.Top + ((r.Bottom - r.Top) - sz.cy) / 2, r.Left + ((r.Right - r.Left) - sz.cx) / 2 + sz.cx, r.Top + ((r.Bottom - r.Top) - sz.cy) / 2 + sz.cy);\r\n gtaLeading: r := RectF(r.Left, r.Top + ((r.Bottom - r.Top) - sz.cy) / 2, r.Left + sz.cx, r.Top + ((r.Bottom - r.Top) - sz.cy) / 2 + sz.cy);\r\n gtaTrailing: r := RectF(r.Right - sz.cx, r.Top + ((r.Bottom - r.Top) - sz.cy) / 2, r.Right, r.Top + ((r.Bottom - r.Top) - sz.cy) / 2 + sz.cy);\r\n end;\r\n\r\n rnd := (r.Bottom - r.Top) / 2;\r\n\r\n pth := TTMSFNCGraphicsPath.Create;\r\n try\r\n pth.AddArc(PointF(r.Left + rnd, r.Top + rnd), PointF(rnd, rnd), 180, 90);\r\n pth.AddArc(PointF(r.Right - rnd, r.Top + rnd), PointF(rnd, rnd), -90, 90);\r\n pth.AddArc(PointF(r.Right - rnd, r.Bottom - rnd), PointF(rnd, rnd), 0, 90);\r\n pth.AddArc(PointF(r.Left + rnd, r.Bottom - rnd), PointF(rnd, rnd), -270, 90);\r\n pth.ClosePath;\r\n AGraphics.DrawPath(pth);\r\n finally\r\n pth.Free;\r\n end;\r\n\r\n AGraphics.DrawText(r, s, False, gtaCenter, gtaCenter);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.StartEditMode;\r\nbegin\r\n if (Assigned(FTreeView) and FTreeView.FReloadActive) or not Assigned(FTreeView) then\r\n Exit;\r\n\r\n FEditMode := True;\r\n UpdateTableView;\r\n SelectAllCheckedItems ;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.StartFiltering;\r\nbegin\r\n if (Assigned(FTreeView) and (FTreeView.FReloadActive or FFilterActive)) or not Assigned(FTreeView) then\r\n Exit;\r\n\r\n FFilterActive := True;\r\n RemoveFilters;\r\n UpdateTableView;\r\n FEdit.Text := '';\r\n FEdit.SetFocus;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.StartReload;\r\nbegin\r\n if Assigned(FTreeView) then\r\n FTreeView.StartReload;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.EnableInteraction;\r\nbegin\r\n if Assigned(FTreeView) then\r\n FTreeView.BlockUserInput := False;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.EndUpdate;\r\nbegin\r\n inherited;\r\n Dec(FUpdateCount);\r\n if FUpdateCount = 0 then\r\n UpdateTableView;\r\n\r\n if Assigned(FTreeView) then\r\n FTreeView.EndUpdate;\r\n\r\n SelectItem(FSaveSelectedItem);\r\n SelectItems(FSaveSelectedItems);\r\nend;\r\n\r\nfunction TTMSFNCCustomTableView.FindCategoryWithCharacter(ACategory: String): TTMSFNCTableViewDisplayItem;\r\nvar\r\n I: Integer;\r\n cat: TTMSFNCTableViewDisplayItem;\r\nbegin\r\n Result.Kind := tvikNone;\r\n Result.Item := nil;\r\n Result.CategoryID := -1;\r\n Result.Text := '';\r\n for I := 0 to FCategoryList.Count - 1 do\r\n begin\r\n cat := FCategoryList[I];\r\n if cat.Text = ACategory then\r\n begin\r\n Result := cat;\r\n Break;\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCCustomTableView.FindCategoryWithCharacterID(ACategoryID: Integer): TTMSFNCTableViewDisplayItem;\r\nvar\r\n I: Integer;\r\n cat: TTMSFNCTableViewDisplayItem;\r\nbegin\r\n Result.Kind := tvikNone;\r\n Result.Item := nil;\r\n Result.CategoryID := -1;\r\n Result.Text := '';\r\n for I := 0 to FCategoryList.Count - 1 do\r\n begin\r\n cat := FCategoryList[I];\r\n if cat.CategoryID = ACategoryID then\r\n begin\r\n Result := cat;\r\n Break;\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCCustomTableView.FindFirstItemWithCategory(ACategory: String; AIncludeFilteredItems: Boolean = True): TTMSFNCTableViewItem;\r\nvar\r\n I: Integer;\r\n v: Boolean;\r\nbegin\r\n Result := nil;\r\n for I := 0 to Items.Count - 1 do\r\n begin\r\n v := Items[I].Visible;\r\n if FFilterApplied and not AIncludeFilteredItems then\r\n v := v and Items[I].FFiltered;\r\n\r\n if v and (GetCharacterForItem(Items[I]) = ACategory) then\r\n begin\r\n Result := Items[I];\r\n Break;\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCCustomTableView.FindFirstItemWithCategoryID(ACategoryID: Integer; AIncludeFilteredItems: Boolean = True): TTMSFNCTableViewItem;\r\nvar\r\n I: Integer;\r\n v: Boolean;\r\nbegin\r\n Result := nil;\r\n for I := 0 to Items.Count - 1 do\r\n begin\r\n v := Items[I].Visible;\r\n if FFilterApplied and not AIncludeFilteredItems then\r\n v := v and Items[I].FFiltered;\r\n\r\n if v and (Items[I].CategoryID = ACategoryID) then\r\n begin\r\n Result := Items[I];\r\n Break;\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCCustomTableView.GetBitmapContainer: TTMSFNCBitmapContainer;\r\nbegin\r\n Result := nil;\r\n if Assigned(FTreeView) then\r\n Result := FTreeView.BitmapContainer;\r\nend;\r\n\r\nfunction TTMSFNCCustomTableView.GetCharacter(Idx: Integer): String;\r\nbegin\r\n Result := '';\r\n if (CategoryType = tvctAlphaNumericLast) or (CategoryType = tvctAlphaBetic) then\r\n begin\r\n if Idx < 27 then\r\n Result := chr(ord('A') + (Idx - 1))\r\n else\r\n Result := chr(ord('0') + (Idx - 27));\r\n end\r\n else\r\n begin\r\n if Idx < 11 then\r\n Result := chr(ord('0') + (Idx - 1))\r\n else\r\n Result := chr(ord('A') + (Idx - 11));\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCCustomTableView.GetCharacterCount: Integer;\r\nbegin\r\n Result := 26;\r\n if (CategoryType = tvctAlphaNumericFirst) or (CategoryType = tvctAlphaNumericLast) then\r\n Result := 36;\r\nend;\r\n\r\nfunction TTMSFNCCustomTableView.GetCharacterForItem(AItem: TTMSFNCTableViewItem): String;\r\nvar\r\n cat: TTMSFNCTableViewCategory;\r\n s: string;\r\n idx: Integer;\r\nbegin\r\n Result := '';\r\n case CategoryType of\r\n tvctAlphaNumericFirst, tvctAlphaNumericLast, tvctAlphaBetic:\r\n begin\r\n s := AItem.StrippedHTMLText;\r\n if Length(s) > 0 then\r\n begin\r\n {$IFDEF ZEROSTRINGINDEX}\r\n Result := s[0]\r\n {$ELSE}\r\n Result := s[1]\r\n {$ENDIF}\r\n end\r\n else\r\n Result := '';\r\n end;\r\n tvctCustom:\r\n begin\r\n idx := Categories.ItemIndexByID(AItem.CategoryID);\r\n if (idx >= 0) and (idx <= Categories.Count - 1) then\r\n begin\r\n cat := Categories[idx];\r\n Result := cat.Text;\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCCustomTableView.GetChecked(AItemIndex: Integer): Boolean;\r\nbegin\r\n Result := False;\r\n if (AItemIndex >= 0) and (AItemIndex <= Items.Count - 1) then\r\n Result := Items[AItemIndex].Checked;\r\nend;\r\n\r\nfunction TTMSFNCCustomTableView.GetCheckedItem(\r\n AItem: TTMSFNCTableViewItem): Boolean;\r\nbegin\r\n Result := False;\r\n if Assigned(AItem) then\r\n Result := AItem.Checked;\r\nend;\r\n\r\nfunction TTMSFNCCustomTableView.GetDisplayCategoryIndex(AIndex: Integer): Integer;\r\nvar\r\n I: Integer;\r\nbegin\r\n Result := -1;\r\n for I := FDisplayList.Count - 1 downto 0 do\r\n begin\r\n if (FDisplayList[I].Kind = tvikCategory) and (I <= AIndex) then\r\n begin\r\n Result := I;\r\n Break;\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCCustomTableView.GetDisplayItem(\r\n AIndex: Integer): TTMSFNCTableViewDisplayItem;\r\nbegin\r\n Result.Kind := tvikNone;\r\n Result.Text := '';\r\n Result.Item := nil;\r\n Result.CategoryID := -1;\r\n Result.Row := -1;\r\n if (AIndex >= 0) and (AIndex <= FDisplayList.Count - 1) then\r\n Result := FDisplayList[AIndex];\r\nend;\r\n\r\nfunction TTMSFNCCustomTableView.GetDisplayItemCount: Integer;\r\nbegin\r\n Result := FDisplayList.Count;\r\nend;\r\n\r\nfunction TTMSFNCCustomTableView.GetDisplayItemIndex(AIndex: Integer): Integer;\r\nvar\r\n I: Integer;\r\nbegin\r\n Result := -1;\r\n for I := FDisplayList.Count - 1 downto 0 do\r\n begin\r\n if (FDisplayList[I].Kind = tvikItem) and (I <= AIndex) then\r\n begin\r\n Result := I;\r\n Break;\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCCustomTableView.GetDocURL: string;\r\nbegin\r\n Result := TTMSFNCBaseDocURL + 'tmsfncuipack/components/' + LowerCase(ClassName);\r\nend;\r\n\r\nfunction TTMSFNCCustomTableView.GetFill: TTMSFNCGraphicsFill;\r\nbegin\r\n Result := nil;\r\n if Assigned(FTreeView) then\r\n Result := TTMSFNCTreeViewOpen(FTreeView).Fill;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.DoFilterTimer(Sender: TObject);\r\nvar\r\n f: TTMSFNCTableViewFilterData;\r\n a: Boolean;\r\nbegin\r\n Inc(FFilterTime);\r\n if FFilterTime >= FILTERDELAY then\r\n begin\r\n FilterTimer.Enabled := False;\r\n\r\n RemoveFilters;\r\n f := Filter.Add;\r\n f.CaseSensitive := False;\r\n f.Condition := '*'+FEdit.Text+'*';\r\n\r\n a := True;\r\n DoBeforeApplyFilter(f, a);\r\n if a then\r\n begin\r\n ApplyFilter;\r\n DoAfterApplyFilter(f);\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCCustomTableView.GetFilterTimer: TTimer;\r\nbegin\r\n if not Assigned(FFilterTimer) then\r\n begin\r\n FFilterTimer := TTimer.Create(nil);\r\n FFilterTimer.OnTimer := DoFilterTimer;\r\n FFilterTimer.Interval := 1;\r\n FFilterTimer.Enabled := False;\r\n end;\r\n\r\n Result := FFilterTimer;\r\nend;\r\n\r\nfunction TTMSFNCCustomTableView.GetItemForNode(ANode: TTMSFNCTreeViewVirtualNode): TTMSFNCTableViewItem;\r\nvar\r\n i: Integer;\r\nbegin\r\n Result := nil;\r\n i := GetItemIndexForNode(ANode);\r\n if (i >= 0) and (i <= Items.Count - 1) then\r\n Result := Items[i];\r\nend;\r\n\r\nfunction TTMSFNCCustomTableView.GetItemIndex: Integer;\r\nvar\r\n it: TTMSFNCTableViewItem;\r\nbegin\r\n Result := -1;\r\n if Assigned(FTreeView) and (FTreeView.SelectedVirtualNodeCount > 0) and Assigned(FTreeView.SelectedVirtualNodes[0]) then\r\n begin\r\n it := GetItemForNode(FTreeView.SelectedVirtualNode);\r\n if Assigned(it) then\r\n Result := it.Index\r\n else if FSaveSelectedItem <> -1 then\r\n Result := FSaveSelectedItem;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCCustomTableView.GetItemIndexForNode(ANode: TTMSFNCTreeViewVirtualNode): Integer;\r\nvar\r\n I: Integer;\r\nbegin\r\n Result := -1;\r\n if Assigned(ANode) then\r\n begin\r\n for I := 0 to FDisplayList.Count - 1 do\r\n begin\r\n if (FDisplayList[I].Row = ANode.Row) and Assigned(FDisplayList[I].Item) and Assigned(FDisplayList[I].Item.Collection) then\r\n begin\r\n Result := FDisplayList[I].Item.Index;\r\n Break;\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCCustomTableView.GetItemsFromClipboard: TTMSFNCTableViewCopyItems;\r\nvar\r\n s: String;\r\n a: TStringList;\r\n AItem: TTMSFNCTableViewItem;\r\n I: Integer;\r\n CurrStr: String;\r\n templ: TTMSFNCCustomTableView;\r\nbegin\r\n if TTMSFNCClipBoard.HasFormat(TTMSFNCClipBoardFormat.cfText) then\r\n begin\r\n s := TTMSFNCClipBoard.GetText;\r\n if (Pos(CLP_FMT, s) > 0) then\r\n begin\r\n templ := TTMSFNCCustomTableView.Create(nil);\r\n a := TStringList.Create;\r\n try\r\n s := StringReplace(s, CLP_FMT, '', [rfReplaceAll]);\r\n a.Text := s;\r\n try\r\n for I := 0 to a.Count - 1 do\r\n begin\r\n CurrStr := a[i];\r\n AItem := templ.AddItem;\r\n AItem.LoadFromString(CurrStr);\r\n end;\r\n finally\r\n end;\r\n finally\r\n FCopyItems.Assign(templ.Items);\r\n a.Free;\r\n templ.Free;\r\n end;\r\n end;\r\n end;\r\n\r\n Result := FCopyItems;\r\nend;\r\n\r\nfunction TTMSFNCCustomTableView.GetItemsRect: TRectF;\r\nbegin\r\n Result := EmptyRect;\r\n if Assigned(FTreeView) then\r\n Result := FTreeView.GetNodesRect;\r\nend;\r\n\r\nfunction TTMSFNCCustomTableView.GetMoreOptionsSize: Single;\r\nvar\r\n I: Integer;\r\nbegin\r\n Result := 0;\r\n for I := 0 to MoreOptions.Count - 1 do\r\n Result := Result + MoreOptions[I].Width;\r\nend;\r\n\r\nfunction TTMSFNCCustomTableView.GetNextDisplayCategoryIndex(AIndex: Integer): Integer;\r\nvar\r\n I: Integer;\r\nbegin\r\n Result := -1;\r\n for I := AIndex + 1 to FDisplayList.Count - 1 do\r\n begin\r\n if FDisplayList[I].Kind = tvikCategory then\r\n begin\r\n Result := I;\r\n Break;\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCCustomTableView.GetNodeForItemIndex(AItemIndex: Integer): TTMSFNCTreeViewVirtualNode;\r\nbegin\r\n Result := nil;\r\n if Assigned(FTreeView) then\r\n Result := TTMSFNCTreeViewOpen(FTreeView).GetNodeForRow(GetRowForItemIndex(AItemIndex));\r\nend;\r\n\r\nfunction TTMSFNCCustomTableView.GetPrecalculateItems: Boolean;\r\nbegin\r\n Result := False;\r\n if Assigned(FTreeView) then\r\n Result := TTMSFNCTreeViewOpen(FTreeView).PrecalculateItems;\r\nend;\r\n\r\nfunction TTMSFNCCustomTableView.GetRowForItemIndex(AItemIndex: Integer): Integer;\r\nvar\r\n I: Integer;\r\n dp: TTMSFNCTableViewDisplayItem;\r\nbegin\r\n Result := -1;\r\n for I := 0 to FDisplayList.Count - 1 do\r\n begin\r\n dp := FDisplayList[I];\r\n if Assigned(dp.Item) and Assigned(dp.Item.Collection) and (dp.Item.Index = AItemIndex) and (dp.Kind = tvikItem) then\r\n begin\r\n Result := dp.Item.FRow;\r\n Break;\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCCustomTableView.GetSelectedItem: TTMSFNCTableViewItem;\r\nbegin\r\n Result := nil;\r\n if (ItemIndex >= 0) and (ItemIndex <= Items.Count - 1) then\r\n Result := Items[ItemIndex];\r\nend;\r\n\r\nfunction TTMSFNCCustomTableView.GetSelectedItems: TTMSFNCTableViewSelectedItems;\r\nvar\r\n I: Integer;\r\n n: TTMSFNCTableViewItem;\r\nbegin\r\n Result := nil;\r\n for I := 0 to SelectedItemCount - 1 do\r\n begin\r\n n := SelectedItems[I] as TTMSFNCTableViewItem;\r\n SetLength(Result, Length(Result) + 1);\r\n Result[Length(Result) - 1] := n;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCCustomTableView.GetSelItem(AIndex: Integer): TTMSFNCTableViewItem;\r\nbegin\r\n Result := nil;\r\n if Assigned(FTreeView) then\r\n Result := GetItemForNode(FTreeView.SelectedVirtualNodes[AIndex]);\r\nend;\r\n\r\nfunction TTMSFNCCustomTableView.GetStroke: TTMSFNCGraphicsStroke;\r\nbegin\r\n Result := nil;\r\n if Assigned(FTreeView) then\r\n Result := TTMSFNCTreeViewOpen(FTreeView).Stroke;\r\nend;\r\n\r\n{$IFDEF FNCLIB}\r\nfunction TTMSFNCCustomTableView.GetSubComponentArray: TTMSFNCStylesManagerComponentArray;\r\nbegin\r\n SetLength(Result, 1);\r\n Result[0] := FTreeView;\r\nend;\r\n{$ENDIF}\r\n\r\nfunction TTMSFNCCustomTableView.GetVersion: string;\r\nbegin\r\n Result := GetVersionNumber(MAJ_VER, MIN_VER, REL_VER, BLD_VER);\r\nend;\r\n\r\nfunction TTMSFNCCustomTableView.GetVerticalScrollBarVisible: Boolean;\r\nbegin\r\n Result := False;\r\n if Assigned(FTreeView) then\r\n Result := FTreeView.VerticalScrollBarVisible;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.InitSample;\r\nbegin\r\n BeginUpdate;\r\n Items.Clear;\r\n\r\n AddItem('Bugfix 376');\r\n AddItem('Bugfix 378');\r\n AddItem('Customer Update');\r\n AddItem('Install New server');\r\n AddItem('Meeting: Next Phase');\r\n AddItem('Release Planning');\r\n\r\n ResetToDefaultStyle;\r\n\r\n GlobalFont.Name := 'Segoe UI';\r\n\r\n EndUpdate;\r\nend;\r\n\r\nfunction TTMSFNCCustomTableView.IsAppearanceProperty(AObject: TObject; APropertyName: string; APropertyType: TTypeKind): Boolean;\r\nbegin\r\n Result := inherited IsAppearanceProperty(AObject, APropertyName, APropertyType);\r\n Result := Result or (APropertyName = 'Header') or (APropertyName = 'Footer');\r\nend;\r\n\r\nfunction TTMSFNCCustomTableView.IsEditMode: Boolean;\r\nbegin\r\n Result := FEditMode;\r\nend;\r\n\r\nfunction TTMSFNCCustomTableView.IsItemSelectable(AItem: TTMSFNCTableViewItem): Boolean;\r\nbegin\r\n Result := True;\r\n if Assigned(AItem) then\r\n begin\r\n Result := AItem.Enabled;\r\n if not (TTMSFNCTreeViewOpen(FTreeView).VisibleNodes.IndexOf(GetNodeForItemIndex(AItem.Index)) > -1) then\r\n Result := False;\r\n end\r\nend;\r\n\r\nfunction TTMSFNCCustomTableView.ItemFromDifferentCategory(AItem1, AItem2: TTMSFNCTableViewItem): Boolean;\r\nvar\r\n s1, s2: string;\r\nbegin\r\n Result := False;\r\n if (AItem1 = nil) or (AItem2 = nil) then\r\n begin\r\n Result := true\r\n end\r\n else\r\n begin\r\n case CategoryType of\r\n tvctAlphaBetic, tvctAlphaNumericFirst, tvctAlphaNumericLast:\r\n begin\r\n s1 := AItem1.StrippedHTMLText;\r\n s2 := AItem2.StrippedHTMLText;\r\n if (Length(s1) > 0) and (Length(s2) > 0) then\r\n begin\r\n {$IFDEF ZEROSTRINGINDEX}\r\n Result := (s1[0] <> s2[0]);\r\n {$ELSE}\r\n Result := (s1[1] <> s2[1]);\r\n {$ENDIF}\r\n end\r\n else\r\n begin\r\n if (Length(s1) = 0) and (Length(s2) = 0) then\r\n Result := false\r\n else\r\n Result := true;\r\n end;\r\n end;\r\n tvctCustom:\r\n begin\r\n if (AItem1.CategoryID > -1) and (AItem2.CategoryID > -1) then\r\n Result := (AItem1.CategoryID <> AItem2.CategoryID)\r\n else\r\n Result := not ((AItem1.CategoryID = -1) and (AItem2.CategoryID = -1));\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.Loaded;\r\nbegin\r\n inherited;\r\n {$IFDEF VCLLIB}\r\n {$HINTS OFF}\r\n {$IF (COMPILERVERSION >= 33) AND (COMPILERVERSION < 36)}\r\n TTMSFNCTreeViewOpen(FTreeView).ChangeDPIScale(96, DesigntimeFormPixelsPerInch);\r\n FTreeView.ScaleForPPI(CurrentPPI);\r\n {$IFEND}\r\n {$HINTS ON}\r\n {$ENDIF}\r\nend;\r\n\r\n{$IFNDEF WEBLIB}\r\nprocedure TTMSFNCCustomTableView.LoadFromFile(AFileName: string);\r\nvar\r\n Stream: TStream;\r\nbegin\r\n Stream := TFileStream.Create(AFileName, fmOpenRead);\r\n try\r\n LoadFromStream(Stream);\r\n finally\r\n Stream.Free;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.LoadFromStream(AStream: TStream);\r\nvar\r\n List: TStringList;\r\n AItem: TTMSFNCTableViewItem;\r\n i: Integer;\r\n CurrStr: string;\r\nbegin\r\n List := TStringList.Create;\r\n BeginUpdate;\r\n try\r\n try\r\n Items.Clear;\r\n List.LoadFromStream(AStream);\r\n for i := 0 to List.Count - 1 do\r\n begin\r\n CurrStr := List[i];\r\n AItem := AddItem;\r\n if Assigned(AItem) then\r\n AItem.LoadFromString(CurrStr);\r\n end;\r\n finally\r\n EndUpdate;\r\n List.Free;\r\n end;\r\n except\r\n end;\r\nend;\r\n{$ENDIF}\r\n\r\nprocedure TTMSFNCCustomTableView.LoadFromStrings(AStrings: TStrings);\r\nvar\r\n I: Integer;\r\nbegin\r\n BeginUpdate;\r\n Items.Clear;\r\n for I := 0 to AStrings.Count - 1 do\r\n Items.Add.Text := AStrings[I];\r\n EndUpdate;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.LoadSettingsFromFile(AFileName: string);\r\nvar\r\n c: TTMSFNCGraphicsColor;\r\n I: Integer;\r\nbegin\r\n c := DefaultItem.TextColor;\r\n inherited;\r\n if (c = DefaultItem.TextColor) and (c <> ItemAppearance.Font.Color) then\r\n begin\r\n DefaultItem.TextColor := ItemAppearance.Font.Color;\r\n for I := 0 to Items.Count - 1 do\r\n Items[I].TextColor := DefaultItem.TextColor;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.LoadSettingsFromStream(AStream: TStream);\r\nvar\r\n c: TTMSFNCGraphicsColor;\r\n I: Integer;\r\nbegin\r\n c := DefaultItem.TextColor;\r\n inherited;\r\n if (c = DefaultItem.TextColor) and (c <> ItemAppearance.Font.Color) then\r\n begin\r\n DefaultItem.TextColor := ItemAppearance.Font.Color;\r\n for I := 0 to Items.Count - 1 do\r\n Items[I].TextColor := DefaultItem.TextColor;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.LookupCategory(ACategory: String);\r\nbegin\r\n if LookupBar.AutoLookup then\r\n ScrollToCategoryCharacter(ACategory)\r\n else\r\n begin\r\n if Assigned(OnManualLookupCategory) then\r\n OnManualLookupCategory(Self, ACategory, -1);\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.LookupCustomCategory(ACategoryID: Integer);\r\nbegin\r\n if LookupBar.AutoLookup then\r\n ScrollToCategoryID(ACategoryID)\r\n else\r\n begin\r\n if Assigned(OnManualLookupCategory) then\r\n OnManualLookupCategory(Self, '', ACategoryID);\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCCustomTableView.LookupItem(ALookupString: String; ACaseSensitive,\r\n AAutoSelect: Boolean): TTMSFNCTableViewItem;\r\nvar\r\n v: String;\r\n it: TTMSFNCTableViewItem;\r\n i: Integer;\r\n s: String;\r\nbegin\r\n Result := nil;\r\n v := ALookupString;\r\n if not ACaseSensitive then\r\n v := Uppercase(v);\r\n\r\n for I := 0 to Items.Count - 1 do\r\n begin\r\n it := Items[I];\r\n s := it.StrippedHTMLText;\r\n\r\n if not ACaseSensitive then\r\n s := UpperCase(s);\r\n\r\n if Pos(v, s) = 1 then\r\n begin\r\n Result := it;\r\n Break;\r\n end;\r\n end;\r\n\r\n if Assigned(Result) and IsItemSelectable(Result) and AAutoSelect then\r\n begin\r\n SelectItem(Result.Index);\r\n ScrollToItem(Result.Index);\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCCustomTableView.MatchFilter(\r\n AItem: TTMSFNCTableViewItem): Boolean;\r\nvar\r\n i: Integer;\r\n s:string;\r\n temp: Boolean;\r\nbegin\r\n Result := True;\r\n for i := 1 to FFilter.Count do\r\n begin\r\n with FFilter.Items[i - 1] do\r\n begin\r\n s := AItem.StrippedHTMLText;\r\n s := Trim(s);\r\n\r\n if Prefix <> '' then\r\n if Pos(Prefix,s) = 1 then\r\n Delete(s,1,Length(FFilter.Items[i - 1].Prefix));\r\n\r\n if Suffix <> '' then\r\n if Pos(Suffix,s) = 1 + Length(s) - Length(Suffix) then\r\n Delete(s,1 + Length(s) - Length(Suffix),Length(s));\r\n\r\n temp := true;\r\n try\r\n if FFilter.Items[i - 1].Condition <> '' then\r\n temp := TTMSFNCUtils.MatchStrEx(Condition,s,CaseSensitive);\r\n except\r\n temp := false;\r\n end;\r\n\r\n case FFilter.Items[i - 1].Operation of\r\n tvfoSHORT:\r\n begin\r\n Result := temp;\r\n if not Result then\r\n Break;\r\n end;\r\n tvfoNONE: Result := temp;\r\n tvfoAND: Result := Result AND temp;\r\n tvfoOR: Result := Result OR temp;\r\n tvfoXOR: Result := Result XOR temp;\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.Notification(AComponent: TComponent;\r\n Operation: TOperation);\r\nvar\r\n i: Integer;\r\nbegin\r\n inherited;\r\n if not (csDestroying in ComponentState) and (Operation = opRemove) then\r\n begin\r\n for i := 0 to Items.Count - 1 do\r\n begin\r\n if AComponent = Items[i].FDetailControl then\r\n Items[i].FDetailControl := nil;\r\n end;\r\n\r\n if Assigned(DefaultItem) and (AComponent = DefaultItem.FDetailControl) then\r\n DefaultItem.FDetailControl := nil;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.PasteFromClipboard;\r\nvar\r\n s: String;\r\n a: TStringList;\r\n AItem: TTMSFNCTableViewItem;\r\n I: Integer;\r\n CurrStr: String;\r\nbegin\r\n if TTMSFNCClipBoard.HasFormat(TTMSFNCClipBoardFormat.cfText) then\r\n begin\r\n s := TTMSFNCClipBoard.GetText;\r\n if (Pos(CLP_FMT, s) > 0) then\r\n begin\r\n a := TStringList.Create;\r\n try\r\n s := StringReplace(s, CLP_FMT, '', [rfReplaceAll]);\r\n a.Text := s;\r\n try\r\n for I := 0 to a.Count - 1 do\r\n begin\r\n CurrStr := a[i];\r\n AItem := AddItem;\r\n AItem.LoadFromString(CurrStr);\r\n end;\r\n finally\r\n end;\r\n finally\r\n a.Free;\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCCustomTableView.ReloadProgress: Single;\r\nbegin\r\n Result := 0;\r\n if Assigned(FTreeView) and (Reload.ProgressMode = tvrpmManual) then\r\n Result := FTreeView.FManualProgressSweepAngle / 360 * 100;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.RegisterRuntimeClasses;\r\nbegin\r\n inherited;\r\n RegisterClass(TTMSFNCCustomTableView);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.RemoveFilter;\r\nbegin\r\n FFilterApplied := False;\r\n UpdateTableView;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.RemoveFilters;\r\nbegin\r\n FFilterApplied := False;\r\n Filter.Clear;\r\n UpdateTableView;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.RemoveItem(AItem: TTMSFNCTableViewItem);\r\nbegin\r\n if Assigned(AItem) then\r\n Items.Delete(AItem.Index);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.ResetToDefaultStyle;\r\nvar\r\n I: Integer;\r\nbegin\r\n inherited;\r\n\r\n BeginUpdate;\r\n\r\n Stroke.Color := MakeGraphicsColor(178, 178, 178);\r\n Header.Fill.Kind := gfkSolid;\r\n Footer.Fill.Kind := gfkSolid;\r\n Header.Stroke.Color := Stroke.Color;\r\n Footer.Stroke.Color := Stroke.Color;\r\n\r\n TTMSFNCUtils.SetFontSize(Header.Font, 16);\r\n TTMSFNCUtils.SetFontSize(Footer.Font, 16);\r\n\r\n TTMSFNCUtils.SetFontSize(Header.Font, 14);\r\n Header.Font.Style := [TFontStyle.fsBold];\r\n TTMSFNCUtils.SetFontSize(Footer.Font, 14);\r\n ItemAppearance.Stroke.Kind := gskNone;\r\n {$IFDEF FMXLIB}\r\n Header.Fill.Color := $FFEEF2F9;\r\n Header.Font.Color := $FF454545;\r\n Footer.Fill.Color := $FFEEF2F9;\r\n Footer.Font.Color := $FF454545;\r\n ItemAppearance.SelectedFill.Color := $FFF6F8FC;\r\n ItemAppearance.SelectedStroke.Color := $FF2D9BEF;\r\n ItemAppearance.Font.Color := $FF7A7A7A;\r\n ItemAppearance.SelectedStroke.Color := $FF2D9BEF;\r\n {$ENDIF}\r\n {$IFNDEF FMXLIB}\r\n Header.Fill.Color := $F9F2EE;\r\n Header.Font.Color := $454545;\r\n Footer.Fill.Color := $F9F2EE;\r\n Footer.Font.Color := $454545;\r\n ItemAppearance.SelectedFill.Color := $FCF8F6;\r\n ItemAppearance.SelectedStroke.Color := $EF9B2D;\r\n ItemAppearance.Font.Color := $7A7A7A;\r\n ItemAppearance.SelectedStroke.Color := $EF9B2D;\r\n {$ENDIF}\r\n ItemAppearance.ShowFocus := False;\r\n\r\n Header.Height := ScalePaintValue(36);\r\n\r\n for I := 0 to Items.Count - 1 do\r\n begin\r\n Items[I].SelectedTitleColor := Header.Font.Color;\r\n Items[I].TitleColor := Header.Font.Color;\r\n Items[I].SelectedTextColor := Header.Font.Color;\r\n Items[I].TextColor := ItemAppearance.Font.Color;\r\n end;\r\n\r\n EndUpdate;\r\nend;\r\n\r\n{$IFNDEF WEBLIB}\r\nprocedure TTMSFNCCustomTableView.SaveToFile(AFileName: string; ATextOnly: Boolean = True);\r\nvar\r\n Stream: TStream;\r\nbegin\r\n Stream := TFileStream.Create(AFileName, fmCreate);\r\n try\r\n SaveToStream(Stream, ATextOnly);\r\n finally\r\n Stream.Free;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.SaveToStream(AStream: TStream; ATextOnly: Boolean = True);\r\nvar\r\n AItem: TTMSFNCTableViewItem;\r\n ItemStr: string;\r\n Buffer: TBytes;\r\n K: Integer;\r\n {$IFDEF LCLLIB}\r\n I: Integer;\r\n {$ENDIF}\r\nbegin\r\n for K := 0 to Items.Count - 1 do\r\n begin\r\n AItem := Items[K];\r\n ItemStr := AItem.SaveToString(ATextOnly);\r\n ItemStr := ItemStr + EndOfLine;\r\n {$IFNDEF LCLLIB}\r\n Buffer := TEncoding.Default.GetBytes(ItemStr);\r\n {$ENDIF}\r\n {$IFDEF LCLLIB}\r\n SetLength(Buffer, Length(ItemStr));\r\n for I := 1 to Length(ItemStr) do\r\n Buffer[I - 1] := Ord(ItemStr[I]);\r\n {$ENDIF}\r\n\r\n {$IFDEF CMNLIB}\r\n AStream.Write(Buffer[0], Length(Buffer));\r\n {$ELSE}\r\n AStream.Write(Buffer, Length(Buffer));\r\n {$ENDIF}\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.SaveToStrings(AStrings: TStrings);\r\nvar\r\n I: Integer;\r\nbegin\r\n for I := 0 to Items.Count - 1 do\r\n AStrings.Add(Items[I].Text);\r\nend;\r\n{$ENDIF}\r\n\r\nprocedure TTMSFNCCustomTableView.ScrollToCategoryCharacter(ACharacter: String);\r\nvar\r\n cat: TTMSFNCTableViewDisplayItem;\r\n t: TTMSFNCTreeViewOpen;\r\nbegin\r\n if Assigned(FTreeView) then\r\n begin\r\n cat := FindCategoryWithCharacter(ACharacter);\r\n if (cat.Row >= 0) and (cat.Row <= FDisplayList.Count - 1) then\r\n begin\r\n t := TTMSFNCTreeViewOpen(FTreeView);\r\n t.ScrollToVirtualNode(t.GetNodeForRow(cat.Row), True, tvnspTop, True);\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.ScrollToCategoryId(ACategoryID: Integer);\r\nvar\r\n cat: TTMSFNCTableViewDisplayItem;\r\n t: TTMSFNCTreeViewOpen;\r\nbegin\r\n if Assigned(FTreeView) then\r\n begin\r\n cat := FindCategoryWithCharacterID(ACategoryID);\r\n if (cat.Row >= 0) and (cat.Row <= FDisplayList.Count - 1) then\r\n begin\r\n t := TTMSFNCTreeViewOpen(FTreeView);\r\n t.ScrollToVirtualNode(t.GetNodeForRow(cat.Row), True, tvnspTop, True);\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.ScrollToItem(AItemIndex: Integer);\r\nvar\r\n t: TTMSFNCTreeViewOpen;\r\nbegin\r\n if Assigned(FTreeView) then\r\n begin\r\n if (AItemIndex >= 0) and (AItemIndex <= Items.Count - 1) then\r\n begin\r\n t := TTMSFNCTreeViewOpen(FTreeView);\r\n t.ScrollToVirtualNode(t.GetNodeForRow(GetRowForItemIndex(AItemIndex)), True, tvnspTop, True);\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.SelectAllCheckedItems;\r\nvar\r\n I: Integer;\r\n arr: TTMSFNCTableViewIntegerArray;\r\nbegin\r\n SetLength(arr, 0);\r\n for I := 0 to Items.Count - 1 do\r\n begin\r\n if Items[I].Checked then\r\n begin\r\n SetLength(arr, Length(arr) + 1);\r\n arr[Length(arr) - 1] := I;\r\n end;\r\n end;\r\n\r\n SelectItems(arr);\r\nend;\r\n\r\nfunction TTMSFNCCustomTableView.SelectedItemCount: Integer;\r\nbegin\r\n Result := 0;\r\n if Assigned(FTreeView) then\r\n Result := FTreeView.SelectedVirtualNodeCount;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.SelectItem(AItemIndex: Integer);\r\nvar\r\n t: TTMSFNCTreeViewOpen;\r\n i: Integer;\r\nbegin\r\n if Assigned(FTreeView) and (AItemIndex <> -1) then\r\n begin\r\n i := Max(0, Min(AItemIndex, Items.Count - 1));\r\n if (i >= 0) and (i <= Items.Count - 1) then\r\n begin\r\n t := TTMSFNCTreeViewOpen(FTreeView);\r\n t.SelectVirtualNode(t.GetNodeForRow(GetRowForItemIndex(i)));\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.SelectItems(\r\n AItemIndexes: TTMSFNCTableViewIntegerArray);\r\nvar\r\n t: TTMSFNCTreeViewOpen;\r\n I: Integer;\r\n na: TTMSFNCTreeViewVirtualNodeArray;\r\nbegin\r\n if Assigned(FTreeView) then\r\n begin\r\n t := TTMSFNCTreeViewOpen(FTreeView);\r\n SetLength(na, Length(AItemIndexes));\r\n for I := 0 to Length(AItemIndexes) - 1 do\r\n na[I] := t.GetNodeForRow(GetRowForItemIndex(AItemIndexes[I]));\r\n\r\n t.SelectVirtualNodes(na);\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.SetItemAppearance(\r\n const Value: TTMSFNCTableViewItemAppearance);\r\nbegin\r\n FItemAppearance.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.SetLayoutMode(\r\n const Value: TTMSFNCTableViewLayoutMode);\r\nbegin\r\n if FLayoutMode <> Value then\r\n begin\r\n FLayoutMode := Value;\r\n UpdateTableView;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.SetLookupBar(const Value: TTMSFNCTableViewLookupBar);\r\nbegin\r\n FLookupBar.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.SetMoreOptionAppearance(\r\n const Value: TTMSFNCTableViewMoreOptionAppearance);\r\nbegin\r\n FMoreOptionAppearance.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.SetMoreOptions(\r\n const Value: TTMSFNCTableViewMoreOptions);\r\nbegin\r\n FMoreOptions.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.SetPrecalculateItems(const Value: Boolean);\r\nbegin\r\n if Assigned(FTreeView) then\r\n TTMSFNCTreeViewOpen(FTreeView).PrecalculateItems := Value;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.SetReload(\r\n const Value: TTMSFNCTableViewReload);\r\nbegin\r\n FReload.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.SetSelectedItem(const Value: TTMSFNCTableViewItem);\r\nbegin\r\n if Assigned(Value) then\r\n ItemIndex := Value.Index;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.SetStroke(const Value: TTMSFNCGraphicsStroke);\r\nbegin\r\n if Assigned(FTreeView) then\r\n TTMSFNCTreeViewOpen(FTreeView).Stroke.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.SetVerticalScrollBarVisible(\r\n const Value: Boolean);\r\nbegin\r\n if Assigned(FTreeView) then\r\n FTreeView.VerticalScrollBarVisible := Value;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.ShowDetailControl(AItemIndex: Integer);\r\nvar\r\n a: Boolean;\r\n cr: TRectF;\r\nbegin\r\n if (Assigned(FTreeView) and FTreeView.FReloadActive) or not Assigned(FTreeView) then\r\n Exit;\r\n\r\n FTreeView.StopAnimationTimer;\r\n\r\n HideDetailControl;\r\n\r\n if (AItemIndex >= 0) and (AItemIndex <= Items.Count - 1) then\r\n begin\r\n FActiveDetailControl := Items[AItemIndex].DetailControl;\r\n FActiveDetailItem := Items[AItemIndex];\r\n end;\r\n\r\n if not Assigned(FActiveDetailControl) then\r\n FActiveDetailControl := DefaultItem.DetailControl;\r\n\r\n a := True;\r\n DoBeforeItemShowDetailControl(FActiveDetailItem, FActiveDetailControl, a);\r\n\r\n if Assigned(FActiveDetailControl) and Assigned(FTreeView) and a then\r\n begin\r\n FShowDetailControl := False;\r\n FActiveDetailControl.Parent := Self;\r\n cr := FTreeView.GetContentRect;\r\n FDetailControlOffset := cr.Right - cr.Left;\r\n UpdateActiveDetailControl;\r\n FActiveDetailControl.Visible := True;\r\n FDetailControlTimer.Enabled := True;\r\n end\r\n else\r\n begin\r\n FActiveDetailControl := nil;\r\n FActiveDetailItem := nil;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.ShowMoreOptions(AItem: TTMSFNCTableViewItem);\r\nbegin\r\n if (Assigned(FTreeView) and (FTreeView.FReloadActive or FFilterActive or Assigned(FActiveDetailControl))) or not Assigned(FTreeView) then\r\n Exit;\r\n\r\n FTreeView.FMoreOffsetItem := AItem;\r\n FTreeView.FMoreOffsetTo := GetMoreOptionsSize;\r\n FTreeView.BlockMouseClick := True;\r\n FTreeView.FAnimateMoreOptions := True;\r\n FTreeView.FAnimTimer.Enabled := True;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.Sort(ACaseSensitive: Boolean;\r\n ASortingMode: TTMSFNCTableViewItemsSortMode);\r\nbegin\r\n Items.Sort(ACaseSensitive, ASortingMode);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.StopReload;\r\nbegin\r\n if Assigned(FTreeView) then\r\n begin\r\n FTreeView.FManualProgressSweepAngle := 0;\r\n FTreeView.FManualProgressStartAngle := 0;\r\n FTreeView.FAnimTimer.Enabled := False;\r\n FTreeView.BlockUserInput := False;\r\n FTreeView.FReloadActive := False;\r\n FTreeView.SetVerticalOffset(0);\r\n FTreeView.StartVerticalOffsetAnimation;\r\n DoStopReload;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.ToggleEditMode;\r\nbegin\r\n if FEditMode then\r\n StopEditMode\r\n else\r\n StartEditMode;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.SetAdaptToStyle(const Value: Boolean);\r\nbegin\r\n inherited;\r\n if Assigned(FTreeView) then\r\n FTreeView.AdaptToStyle := AdaptToStyle;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.SetBitmapContainer(\r\n const Value: TTMSFNCBitmapContainer);\r\nbegin\r\n FTreeView.BitmapContainer := Value;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.SetCategories(\r\n const Value: TTMSFNCTableViewCategories);\r\nbegin\r\n FCategories.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.SetCategoryAppearance(\r\n const Value: TTMSFNCTableViewCategoryAppearance);\r\nbegin\r\n FCategoryAppearance.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.SetCategoryType(\r\n const Value: TTMSFNCTableViewCategoryType);\r\nbegin\r\n if FCategoryType <> Value then\r\n begin\r\n FCategoryType := Value;\r\n UpdateTableView;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.SetChecked(AItemIndex: Integer;\r\n const Value: Boolean);\r\nbegin\r\n if (AItemIndex >= 0) and (AItemIndex <= Items.Count - 1) then\r\n Items[AItemIndex].Checked := Value;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.SetCheckedItem(\r\n AItem: TTMSFNCTableViewItem; const Value: Boolean);\r\nbegin\r\n if Assigned(AItem) then\r\n AItem.Checked := Value;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.SetDefaultItem(const Value: TTMSFNCTableViewItem);\r\nbegin\r\n FDefaultItem.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.SetFill(const Value: TTMSFNCGraphicsFill);\r\nbegin\r\n if Assigned(FTreeView) then\r\n TTMSFNCTreeViewOpen(FTreeView).Fill.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.SetFooter(const Value: TTMSFNCTableViewFooter);\r\nbegin\r\n FFooter.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.SetFonts(ASetType: TTMSFNCAppearanceGlobalFontType);\r\nvar\r\n I: Integer;\r\nbegin\r\n BeginUpdate;\r\n\r\n GlobalFont.ApplyChange(Footer.Font, ASetType);\r\n GlobalFont.ApplyChange(Header.Font, ASetType);\r\n\r\n GlobalFont.ApplyChange(ItemAppearance.Font, ASetType);\r\n GlobalFont.ApplyChange(ItemAppearance.AccessoryFont, ASetType);\r\n\r\n GlobalFont.ApplyChange(LookupBar.Font, ASetType);\r\n GlobalFont.ApplyChange(LookupBar.InActiveFont, ASetType);\r\n\r\n if ASetType = aftColor then\r\n begin\r\n for I := 0 to Items.Count - 1 do\r\n begin\r\n Items[I].TextColor := GlobalFont.Color;\r\n Items[I].AccessoryFontColor := GlobalFont.Color;\r\n Items[I].SelectedTextColor := GlobalFont.Color;\r\n Items[I].FSelectedTitleColor := GlobalFont.Color;\r\n end\r\n end;\r\n\r\n EndUpdate;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.SetGlobalFont(const Value: TTMSFNCAppearanceGlobalFont);\r\nbegin\r\n FGlobalFont.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.SetGroupApperance(\r\n const Value: TTMSFNCTableViewGroupAppearance);\r\nbegin\r\n FGroupAppearance.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.SetHeader(const Value: TTMSFNCTableViewHeader);\r\nbegin\r\n FHeader.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.SetInteraction(\r\n const Value: TTMSFNCTableViewInteraction);\r\nbegin\r\n FInteraction.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.SetItemIndex(const Value: Integer);\r\nbegin\r\n SelectItem(Value);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.SetItems(const Value: TTMSFNCTableViewItems);\r\nbegin\r\n FItems.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.UnCheckAllItems;\r\nvar\r\n I: Integer;\r\nbegin\r\n BeginUpdate;\r\n for I := 0 to Items.Count - 1 do\r\n Items[I].Checked := False;\r\n EndUpdate;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.UnSelectAllItems;\r\nbegin\r\n if Assigned(FTreeView) then\r\n FTreeView.UnSelectAllNodes;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.UpdateActiveDetailControl;\r\nvar\r\n r: TRectF;\r\nbegin\r\n if Assigned(FActiveDetailControl) and Assigned(FTreeView) then\r\n begin\r\n r := FTreeView.GetContentRect;\r\n InflateRectEx(r, -1, -1);\r\n r := RectF(r.Left + FDetailControlOffset, r.Top, r.Right + FDetailControlOffset, r.Bottom);\r\n FActiveDetailControl.SetBounds(Round(r.Left), Round(R.Top), Round((r.Right - r.Left)), Round((r.Bottom - r.Top)));\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.UpdateControlAfterResize;\r\nbegin\r\n inherited;\r\n if Assigned(FTreeView) then\r\n FTreeView.SetBounds(0, 0, Width, Height);\r\n\r\n UpdateTableView(False);\r\n UpdateActiveDetailControl;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.UpdateReloadProgress(AProgress: Single; AAutoStopReload: Boolean = True);\r\nbegin\r\n if Assigned(FTreeView) then\r\n begin\r\n FTreeView.FManualProgressStartAngle := 0;\r\n FTreeView.FManualProgressSweepAngle := AProgress / 100 * 360;\r\n\r\n if AAutoStopReload and (AProgress >= 100) then\r\n StopReload\r\n else\r\n FTreeView.Invalidate;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.UpdateTableView(ADisplayOnly: Boolean = False);\r\nvar\r\n sel: TTMSFNCTableViewItem;\r\n cr, hr: TRectF;\r\n szd: Single;\r\n szr: Single;\r\n szt: Single;\r\n btnh: Single;\r\n b: Boolean;\r\n a: TTMSFNCTableViewItemArray;\r\n sela: TTMSFNCTableViewIntegerArray;\r\n I: Integer;\r\nbegin\r\n if (FUpdateCount > 0) or IsDestroying then\r\n Exit;\r\n\r\n if Assigned(FTreeView) then\r\n begin\r\n if not ADisplayOnly then\r\n CalculateItems;\r\n\r\n sel := SelectedItem;\r\n a := GetSelectedItems;\r\n SetLength(sela, Length(a));\r\n for I := 0 to Length(a) - 1 do\r\n begin\r\n if Assigned(a[I]) then\r\n sela[I] := a[I].Index;\r\n end;\r\n\r\n if not FDetailControlTimer.Enabled then\r\n begin\r\n if FShowDetailControl then\r\n FDetailControlOffset := 0\r\n else\r\n begin\r\n cr := FTreeView.GetContentRect;\r\n FDetailControlOffset := cr.Right - cr.Left;\r\n end;\r\n end;\r\n\r\n if ADisplayOnly then\r\n FTreeView.UpdateTreeViewDisplay\r\n else\r\n begin\r\n FTreeView.BeginUpdate;\r\n FTreeView.ClearNodeList;\r\n FTreeView.EndUpdate;\r\n end;\r\n\r\n CalculateLookupBar;\r\n SelectedItem := sel;\r\n SelectItems(sela);\r\n\r\n hr := FTreeView.GetColumnsTopRect; \r\n\r\n b := False;\r\n if Assigned(FColumn) then\r\n b := FColumn.Expanded;\r\n\r\n if not IsDesignTime and FFilterActive and b then\r\n FEdit.Parent := Self\r\n else\r\n FEdit.Parent := nil;\r\n\r\n FDoneButton.Visible := FEditMode or FFilterActive and not Assigned(FActiveDetailControl) and b;\r\n if not IsDesignTime and ((Header.Height > 0) and Header.Visible) then\r\n FDoneButton.Parent := Self\r\n else\r\n FDoneButton.Parent := nil;\r\n\r\n FDoneButton.Invalidate;\r\n\r\n FBackButton.Visible := Assigned(FActiveDetailControl) and ((FShowDetailControl and not FDetailControlTimer.Enabled) or not FShowDetailControl) and b;\r\n if not IsDesignTime and ((Header.Height > 0) and Header.Visible) then\r\n FBackButton.Parent := Self\r\n else\r\n FBackButton.Parent := nil;\r\n\r\n FBackButton.Invalidate;\r\n\r\n FEditButton.Visible := not FEditMode and not FFilterActive and Interaction.ShowEditButton and not Assigned(FActiveDetailControl) and b;\r\n if not IsDesignTime and ((Header.Height > 0) and Header.Visible) then\r\n FEditButton.Parent := Self\r\n else\r\n FEditButton.Parent := nil;\r\n\r\n FEditButton.Invalidate;\r\n\r\n FFilterButton.Visible := Interaction.ShowFilterButton and not FFilterActive and not Assigned(FActiveDetailControl) and b;\r\n if not IsDesignTime and ((Header.Height > 0) and Header.Visible) then\r\n FFilterButton.Parent := Self\r\n else\r\n FFilterButton.Parent := nil;\r\n\r\n FFilterButton.Invalidate;\r\n\r\n btnh := hr.Bottom - hr.Top;\r\n {$IFDEF LCLLIB}\r\n if btnh < ScalePaintValue(4) then\r\n btnh := ScalePaintValue(4);\r\n {$ENDIF}\r\n\r\n FBackButton.Height := Round(btnh - ScalePaintValue(4));\r\n FDoneButton.Height := Round(btnh - ScalePaintValue(4));\r\n FEditButton.Height := Round(btnh - ScalePaintValue(4));\r\n FFilterButton.Height := Round(btnh - ScalePaintValue(4));\r\n\r\n CustomizeButtons;\r\n\r\n szt := 0;\r\n if Assigned(FColumn) then\r\n begin\r\n if FColumn.Filtering.Enabled then\r\n begin\r\n szd := FColumn.Filtering.ButtonSize;\r\n szt := szt + szd + ScalePaintValue(4);\r\n end;\r\n\r\n if FColumn.Expandable then\r\n begin\r\n szr := FColumn.ExpandingButtonSize;\r\n szt := szt + szr + ScalePaintValue(6);\r\n end;\r\n\r\n if (TTMSFNCTreeViewColumnOpen(FColumn).SortKind <> nskNone) then\r\n begin\r\n szr := ScalePaintValue(8);\r\n szt := szt + szr + ScalePaintValue(6);\r\n end;\r\n end;\r\n\r\n FBackButton.SetBounds(Round(hr.Left + ScalePaintValue(3)), Round(hr.Top + ((hr.Bottom - hr.Top) - FBackButton.Height) / 2), FBackButton.Width, FBackButton.Height);\r\n if FFilterButton.Visible then\r\n begin\r\n FFilterButton.SetBounds(Round(hr.Right - ScalePaintValue(3) - FFilterButton.Width - szt), Round(hr.Top + ((hr.Bottom - hr.Top) - FFilterButton.Height) / 2), FFilterButton.Width, FFilterButton.Height);\r\n FDoneButton.SetBounds(Round(hr.Right - ScalePaintValue(6) - FDoneButton.Width - FFilterButton.Width - szt), Round(hr.Top + Round(((hr.Bottom - hr.Top) - FDoneButton.Height) / 2)), FDoneButton.Width, FDoneButton.Height);\r\n FEditButton.SetBounds(Round(hr.Right - ScalePaintValue(6) - FEditButton.Width - FFilterButton.Width - szt), Round(hr.Top + Round(((hr.Bottom - hr.Top) - FEditButton.Height) / 2)), FEditButton.Width, FEditButton.Height);\r\n end\r\n else\r\n begin\r\n FDoneButton.SetBounds(Round(hr.Right - ScalePaintValue(3) - FDoneButton.Width - szt), Round(hr.Top + ((hr.Bottom - hr.Top) - FDoneButton.Height) / 2), FDoneButton.Width, FDoneButton.Height);\r\n FEditButton.SetBounds(Round(hr.Right - ScalePaintValue(3) - FEditButton.Width - szt), Round(hr.Top + ((hr.Bottom - hr.Top) - FEditButton.Height) / 2), FEditButton.Width, FEditButton.Height);\r\n end;\r\n\r\n if LookupBar.Visible and (CategoryType <> tvctNone) then\r\n begin\r\n case LookupBar.Position of\r\n tvlbpLeft: FEdit.SetBounds(Round(hr.Left + 1 + LookupBar.Width), Round(hr.Bottom), Round((hr.Right - hr.Left) - LookupBar.Width - 2), FEdit.Height);\r\n tvlbpRight: FEdit.SetBounds(Round(hr.Left + 1), Round(hr.Bottom + 1), Round((hr.Right - hr.Left) - LookupBar.Width - 2), FEdit.Height);\r\n end;\r\n end\r\n else\r\n FEdit.SetBounds(Round(hr.Left + 1), Round(hr.Bottom), Round((hr.Right - hr.Left) - 2), FEdit.Height);\r\n\r\n FTreeView.Invalidate;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCCustomTableView.XYToAccessoryItem(X,\r\n Y: Single): TTMSFNCTableViewItem;\r\nvar\r\n n: TTMSFNCTreeViewVirtualNode;\r\n r: TRectF;\r\n it: TTMSFNCTableViewItem;\r\n h: Single;\r\nbegin\r\n Result := nil;\r\n if Assigned(FTreeView) then\r\n begin\r\n n := FTreeView.XYToNode(X, Y);\r\n if Assigned(n) and (n.Row >= 0) and (n.Row <= Items.Count - 1) then\r\n begin\r\n it := GetItemForNode(n);\r\n if Assigned(it) and (it.Accessory in Interaction.AccessoryClickDetection) then\r\n begin\r\n r := n.ExtraRects[0];\r\n InflateRectEx(r, 0, -4);\r\n h := it.AccessoryHeight;\r\n r := RectF(r.Left, r.Top + ((r.Bottom - r.Top) - h) / 2, r.Right, r.Top + ((r.Bottom - r.Top) - h) / 2 + h);\r\n if PtInRectEx(r, PointF(X, Y)) then\r\n Result := it;\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCCustomTableView.XYToBitmapItem(X, Y: Single): TTMSFNCTableViewItem;\r\nvar\r\n n: TTMSFNCTreeViewVirtualNode;\r\n r: TRectF;\r\n it: TTMSFNCTableViewItem;\r\nbegin\r\n Result := nil;\r\n if Assigned(FTreeView) then\r\n begin\r\n n := FTreeView.XYToNode(X, Y);\r\n if Assigned(n) and (n.Row >= 0) and (n.Row <= Items.Count - 1) then\r\n begin\r\n it := GetItemForNode(n);\r\n if Assigned(it) then\r\n begin\r\n r := n.BitmapRects[0];\r\n if PtInRectEx(r, PointF(X, Y)) then\r\n Result := it;\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCCustomTableView.XYToItem(X, Y: Single): TTMSFNCTableViewItem;\r\nvar\r\n n: TTMSFNCTreeViewVirtualNode;\r\nbegin\r\n Result := nil;\r\n if Assigned(FTreeView) then\r\n begin\r\n n := FTreeView.XYToNode(X, Y);\r\n if Assigned(n) and (n.Row >= 0) and (n.Row <= FDisplayList.Count - 1) then\r\n Result := GetItemForNode(n);\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCCustomTableView.XYToItemIndex(X, Y: Single): Integer;\r\nvar\r\n it: TTMSFNCTableViewItem;\r\nbegin\r\n Result := - 1;\r\n it := XYToItem(X, Y);\r\n if Assigned(it) then\r\n Result := it.Index;\r\nend;\r\n\r\nfunction TTMSFNCCustomTableView.XYToMoreOption(X,\r\n Y: Single): TTMSFNCTableViewMoreOption;\r\nvar\r\n sz: Single;\r\n w: Single;\r\n r, rt: TRectF;\r\n n: TTMSFNCTreeViewVirtualNode;\r\n I: Integer;\r\n mo: TTMSFNCTableViewMoreOption;\r\nbegin\r\n Result := nil;\r\n\r\n if not Assigned(FTreeView) then\r\n Exit;\r\n\r\n n := FTreeView.XYToNode(X, Y, FTreeView.FMoreOffset);\r\n\r\n if not Assigned(n) or (GetItemForNode(n) <> FTreeView.FMoreOffsetItem) then\r\n Exit;\r\n\r\n if MoreOptions.Count > 0 then\r\n begin\r\n rt := n.ExtraRects[0];\r\n sz := FTreeView.FMoreOffset;\r\n w := sz / MoreOptions.Count;\r\n\r\n for I := 0 to MoreOptions.Count - 1 do\r\n begin\r\n mo := MoreOptions[I];\r\n r := RectF(rt.Right + w * I, rt.Top, rt.Right + w * (I + 1), rt.Bottom);\r\n if PtInRectEx(r, PointF(X, Y)) then\r\n begin\r\n Result := mo;\r\n Break;\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\n{$IFDEF FNCLIB}\r\n{ TTMSFNCTreeView picker implementation }\r\n\r\nprocedure TTMSFNCCustomTableView.PickerApplyFilter(ACondition: string; ACaseSensitive: Boolean);\r\nbegin\r\n ApplyFilter;\r\nend;\r\n\r\nfunction TTMSFNCCustomTableView.PickerGetContent: String;\r\nbegin\r\n Result := '';\r\n\r\n if ItemIndex >= 0 then\r\n Result := Items[ItemIndex].Text;\r\nend;\r\n\r\nfunction TTMSFNCCustomTableView.PickerGetFirstSelectableItem: Integer;\r\nbegin\r\n if Items.Count > 0 then\r\n Result := 0\r\n else\r\n Result := -1;\r\nend;\r\n\r\nfunction TTMSFNCCustomTableView.PickerGetItemCount: Integer;\r\nbegin\r\n Result := Items.Count;\r\nend;\r\n\r\nfunction TTMSFNCCustomTableView.PickerGetItemHeight: Single;\r\nbegin\r\n Result := ItemAppearance.FixedHeight;\r\nend;\r\n\r\nfunction TTMSFNCCustomTableView.PickerGetItemWidth: Single;\r\nbegin\r\n Result := Width;\r\nend;\r\n\r\nfunction TTMSFNCCustomTableView.PickerGetLastSelectableItem: Integer;\r\nbegin\r\n if Items.Count > 0 then\r\n Result := Items.Count - 1\r\n else\r\n Result := -1;\r\nend;\r\n\r\nfunction TTMSFNCCustomTableView.PickerGetNextSelectableItem(AItemIndex: Integer): Integer;\r\nbegin\r\n if AItemIndex < Items.Count - 1 then\r\n Result := AItemIndex + 1\r\n else\r\n Result := AItemIndex;\r\nend;\r\n\r\nfunction TTMSFNCCustomTableView.PickerGetPreviousSelectableItem(AItemIndex: Integer): Integer;\r\nbegin\r\n if AItemIndex > 0 then\r\n Result := AItemIndex - 1\r\n else\r\n Result := AItemIndex;\r\nend;\r\n\r\nfunction TTMSFNCCustomTableView.PickerGetSelectedItem: Integer;\r\nbegin\r\n Result := ItemIndex;\r\nend;\r\n\r\nfunction TTMSFNCCustomTableView.PickerGetVisibleItemCount: Integer;\r\nbegin\r\n if Assigned(FTreeView) then\r\n Result := TTMSFNCTreeViewOpen(FTreeView).VisibleNodes.Count\r\n else\r\n Result := 0;\r\nend;\r\n\r\nfunction TTMSFNCCustomTableView.PickerLookupItem(ALookupString: String; ACaseSensitive: Boolean): TTMSFNCControlPickerFilterItem;\r\nvar\r\n it: TTMSFNCTableViewItem;\r\nbegin\r\n it := LookupItem(ALookupString, ACaseSensitive);\r\n\r\n Result.ItemIndex := it.Index;\r\n Result.ItemText := it.Text;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.PickerResetFilter;\r\nbegin\r\n RemoveFilters;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.PickerSelectItem(AItemIndex: Integer);\r\nbegin\r\n if (AItemIndex >= 0) and (AItemIndex <= Items.Count - 1) then\r\n ItemIndex := AItemIndex;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.PickerSetItemHeight(AValue: Single);\r\nbegin\r\n ItemAppearance.FixedHeight := AValue;\r\nend;\r\n\r\nprocedure TTMSFNCCustomTableView.PickerSetItemWidth(AValue: Single);\r\nbegin\r\n //\r\nend;\r\n{$ENDIF}\r\n\r\n{ TTMSFNCTableViewItems }\r\n\r\nfunction TTMSFNCTableViewItems.Add: TTMSFNCTableViewItem;\r\nbegin\r\n Result := TTMSFNCTableViewItem(inherited Add);\r\nend;\r\n\r\nprocedure TTMSFNCTableViewItems.Clear;\r\nvar\r\n l: TTMSFNCCustomTableView;\r\nbegin\r\n l := TableView;\r\n if Assigned(l) then\r\n l.BeginUpdate;\r\n inherited Clear;\r\n if Assigned(l) then\r\n l.EndUpdate;\r\nend;\r\n\r\nfunction TTMSFNCTableViewItems.Compare(AItem1, AItem2: TTMSFNCTableViewItem; ACaseSensitive: Boolean; ASortingMode: TTMSFNCTableViewItemsSortMode): Integer;\r\nvar\r\n cIdx1, cIdx2: integer;\r\n itemcap1, itemcap2: String;\r\n l: TTMSFNCCustomTableView;\r\nbegin\r\n Result := 0;\r\n\r\n l := FTableView;\r\n if Assigned(l) then\r\n begin\r\n case l.CategoryType of\r\n tvctNone, tvctAlphaBetic, tvctAlphaNumericFirst, tvctAlphaNumericLast:\r\n begin\r\n if not ACaseSensitive then\r\n Result := AnsiCompareStr(UpperCase(AItem1.StrippedHTMLText), UpperCase(AItem2.StrippedHTMLText))\r\n else\r\n Result := AnsiCompareStr(AItem1.StrippedHTMLText, AItem2.StrippedHTMLText)\r\n end;\r\n tvctCustom:\r\n begin\r\n cIdx1 := l.Categories.ItemIndexById(AItem1.CategoryID);\r\n cIdx2 := l.Categories.ItemIndexById(AItem2.CategoryID);\r\n\r\n if cIdx1 < cIdx2 then\r\n result := -1\r\n else if cIdx1 > cIdx2 then\r\n result := 1\r\n else\r\n begin\r\n itemcap1 := AItem1.StrippedHTMLText;\r\n itemcap2 := AItem2.StrippedHTMLText;\r\n if not ACaseSensitive then\r\n begin\r\n itemcap1 := UpperCase(itemcap1);\r\n itemcap2 := UpperCase(itemcap2);\r\n end;\r\n\r\n if itemcap1 < itemcap2 then\r\n result := -1\r\n else if itemcap1 > itemcap2 then\r\n result := 1\r\n else\r\n result := 0\r\n end;\r\n end;\r\n end;\r\n\r\n case ASortingMode of\r\n tvismDescending: Result := Result * -1;\r\n end;\r\n\r\n l.DoItemCompare(AItem1, AItem2, Result);\r\n end;\r\nend;\r\n\r\nconstructor TTMSFNCTableViewItems.Create(ATableView: TTMSFNCCustomTableView);\r\nbegin\r\n inherited Create(ATableView, GetItemClass);\r\n FTableView := ATableView;\r\nend;\r\n\r\nfunction TTMSFNCTableViewItems.GetItem(Index: Integer): TTMSFNCTableViewItem;\r\nbegin\r\n Result := TTMSFNCTableViewItem(inherited Items[Index]);\r\nend;\r\n\r\nfunction TTMSFNCTableViewItems.GetItemClass: TCollectionItemClass;\r\nbegin\r\n Result := TTMSFNCTableViewItem;\r\nend;\r\n\r\nfunction TTMSFNCTableViewItems.Insert(Index: Integer): TTMSFNCTableViewItem;\r\nbegin\r\n Result := TTMSFNCTableViewItem(inherited Insert(Index));\r\nend;\r\n\r\nfunction TTMSFNCTableViewItems.TableView: TTMSFNCCustomTableView;\r\nbegin\r\n Result := FTableView;\r\nend;\r\n\r\ntype\r\n {$HINTS OFF}\r\n TShadowedCollection = class(TPersistent)\r\n private\r\n {%H-}FItemClass: TCollectionItemClass;\r\n {$IFDEF LCLWEBLIB}\r\n FItems: TFPList;\r\n {$ENDIF}\r\n {$IFNDEF LCLWEBLIB}\r\n FItems: TList;\r\n {$ENDIF}\r\n end;\r\n {$HINTS ON}\r\n\r\nprocedure TTMSFNCTableViewItems.QuickSort(L, R: Integer; ACaseSensitive: Boolean; ASortingMode: TTMSFNCTableViewItemsSortMode);\r\nvar\r\n I, J, p: Integer;\r\n {$IFDEF LCLWEBLIB}\r\n SortList: TFPList;\r\n\r\n procedure ExchangeItems(Index1, Index2: Integer);\r\n var\r\n {$IFDEF WEBLIB}\r\n Save: JSValue;\r\n {$ENDIF}\r\n {$IFNDEF WEBLIB}\r\n Save: Pointer;\r\n {$ENDIF}\r\n begin\r\n Save := SortList.Items[Index1];\r\n SortList.Items[Index1] := SortList.Items[Index2];\r\n SortList.Items[Index2] := Save;\r\n end;\r\n {$ENDIF}\r\n {$IFNDEF LCLWEBLIB}\r\n SortList: TList;\r\n\r\n procedure ExchangeItems(Index1, Index2: Integer);\r\n var\r\n Save: TCollectionItem;\r\n begin\r\n Save := SortList[Index1];\r\n SortList[Index1] := SortList[Index2];\r\n SortList[Index2] := Save;\r\n Save.Index := Index2;\r\n end;\r\n {$ENDIF}\r\nbegin\r\n //This cast allows us to get at the private elements in the base class\r\n {$IFNDEF WEBLIB}\r\n SortList := {%H-}TShadowedCollection(Self).FItems;\r\n {$ENDIF}\r\n {$IFDEF WEBLIB}\r\n SortList := Self.FPList;\r\n {$ENDIF}\r\n\r\n repeat\r\n I := L;\r\n J := R;\r\n P := (L + R) shr 1;\r\n repeat\r\n while Compare(Items[I], Items[P], ACaseSensitive, ASortingMode) < 0 do\r\n Inc(I);\r\n while Compare(Items[J], Items[P], ACaseSensitive, ASortingMode) > 0 do\r\n Dec(J);\r\n if I <= J then\r\n begin\r\n ExchangeItems(I, J);\r\n if P = I then\r\n P := J\r\n else if P = J then\r\n P := I;\r\n Inc(I);\r\n Dec(J);\r\n end;\r\n until I > J;\r\n if L < J then\r\n QuickSort(L, J, ACaseSensitive, ASortingMode);\r\n L := I;\r\n until I >= R;\r\nend;\r\n\r\nprocedure TTMSFNCTableViewItems.SetItem(Index: Integer; const Value: TTMSFNCTableViewItem);\r\nbegin\r\n inherited Items[Index] := Value;\r\nend;\r\n\r\nprocedure TTMSFNCTableViewItems.Sort(ACaseSensitive: Boolean; ASortingMode: TTMSFNCTableViewItemsSortMode);\r\nvar\r\n l: TTMSFNCCustomTableView;\r\nbegin\r\n l := TableView;\r\n if Assigned(l) then\r\n begin\r\n l.BeginUpdate;\r\n BeginUpdate;\r\n if Count > 1 then\r\n QuickSort(0, Pred(Count), ACaseSensitive, ASortingMode);\r\n EndUpdate;\r\n l.EndUpdate;\r\n end;\r\nend;\r\n\r\n{ TTMSFNCTableViewItem }\r\n\r\nprocedure TTMSFNCTableViewItem.Assign(Source: TPersistent);\r\nbegin\r\n if Source is TTMSFNCTableViewItem then\r\n begin\r\n FTag := (Source as TTMSFNCTableViewItem).Tag;\r\n FHTMLTemplateItems.Assign((Source as TTMSFNCTableViewItem).HTMLTemplateItems);\r\n FText := (Source as TTMSFNCTableViewItem).Text;\r\n FTrimming := (Source as TTMSFNCTableViewItem).Trimming;\r\n FWordWrapping := (Source as TTMSFNCTableViewItem).WordWrapping;\r\n FHorizontalTextAlign := (Source as TTMSFNCTableViewItem).HorizontalTextAlign;\r\n FVerticalTextAlign := (Source as TTMSFNCTableViewItem).VerticalTextAlign;\r\n FTextColor := (Source as TTMSFNCTableViewItem).TextColor;\r\n FSelectedTextColor := (Source as TTMSFNCTableViewItem).SelectedTextColor;\r\n FDisabledTextColor := (Source as TTMSFNCTableViewItem).DisabledTextColor;\r\n FTitle := (Source as TTMSFNCTableViewItem).Title;\r\n FTitleTrimming := (Source as TTMSFNCTableViewItem).TitleTrimming;\r\n FTitleWordWrapping := (Source as TTMSFNCTableViewItem).TitleWordWrapping;\r\n FTitleHorizontalTextAlign := (Source as TTMSFNCTableViewItem).TitleHorizontalTextAlign;\r\n FTitleVerticalTextAlign := (Source as TTMSFNCTableViewItem).TitleVerticalTextAlign;\r\n FTitleColor := (Source as TTMSFNCTableViewItem).TitleColor;\r\n FSelectedTitleColor := (Source as TTMSFNCTableViewItem).SelectedTitleColor;\r\n FDisabledTitleColor := (Source as TTMSFNCTableViewItem).DisabledTitleColor;\r\n FEnabled := (Source as TTMSFNCTableViewItem).Enabled;\r\n FAccessory := (Source as TTMSFNCTableViewItem).Accessory;\r\n FVisible := (Source as TTMSFNCTableViewItem).Visible;\r\n FBitmapName := (Source as TTMSFNCTableViewItem).BitmapName;\r\n FBitmap.Assign((Source as TTMSFNCTableViewItem).Bitmap);\r\n FHeight := (Source as TTMSFNCTableViewItem).Height;\r\n FCategoryID := (Source as TTMSFNCTableViewItem).CategoryID;\r\n FGroupIndex := (Source as TTMSFNCTableViewItem).GroupIndex;\r\n FBadgeAlign := (Source as TTMSFNCTableViewItem).BadgeAlign;\r\n FAccessoryWidth := (Source as TTMSFNCTableViewItem).AccessoryWidth;\r\n FAccessoryHeight := (Source as TTMSFNCTableViewItem).AccessoryHeight;\r\n FAccessoryProgress := (Source as TTMSFNCTableViewItem).AccessoryProgress;\r\n FAccessoryText := (Source as TTMSFNCTableViewItem).AccessoryText;\r\n FChecked := (Source as TTMSFNCTableViewItem).Checked;\r\n FCheckType := (Source as TTMSFNCTableViewItem).CheckType;\r\n FAccessoryFontColor := (Source as TTMSFNCTableViewItem).AccessoryFontColor;\r\n FAccessoryBorderColor := (Source as TTMSFNCTableViewItem).AccessoryBorderColor;\r\n FAccessoryColor := (Source as TTMSFNCTableViewItem).AccessoryColor;\r\n FEnableMoreOptions := (Source as TTMSFNCTableViewItem).EnableMoreOptions;\r\n AssignData(Source);\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTableViewItem.AssignData(Source: TPersistent);\r\nbegin\r\n if Source is TTMSFNCTableViewItem then\r\n begin\r\n FDataString := (Source as TTMSFNCTableViewItem).DataString;\r\n FDataBoolean := (Source as TTMSFNCTableViewItem).DataBoolean;\r\n FDataObject := (Source as TTMSFNCTableViewItem).DataObject;\r\n FDataInteger := (Source as TTMSFNCTableViewItem).DataInteger;\r\n FDataPointer := (Source as TTMSFNCTableViewItem).DataPointer;\r\n FDBKey := (Source as TTMSFNCTableViewItem).DBKey;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTableViewItem.BitmapChanged(Sender: TObject);\r\nbegin\r\n UpdateItem;\r\nend;\r\n\r\nprocedure TTMSFNCTableViewItem.Changed(Sender: TObject);\r\nbegin\r\n UpdateItem;\r\nend;\r\n\r\nconstructor TTMSFNCTableViewItem.Create(ACollection: TCollection);\r\nbegin\r\n inherited;\r\n if Assigned(Collection) then\r\n FTableView := (Collection as TTMSFNCTableViewItems).TableView;\r\n\r\n FTextColor := gcBlack;\r\n FEnableMoreOptions := True;\r\n FTitleExpanded := True;\r\n FChecked := False;\r\n FCheckType := tvictNone;\r\n FCategoryID := -1;\r\n FGroupIndex := 0;\r\n FBadgeAlign := gtaCenter;\r\n FAccessoryFontColor := gcNull;\r\n FAccessoryColor := gcNull;\r\n FAccessoryBorderColor := gcNull;\r\n FHeight := -1;\r\n FEnabled := True;\r\n FAccessory := tviaNone;\r\n FAccessoryWidth := 24;\r\n FAccessoryHeight := 24;\r\n FAccessoryProgress := 0;\r\n if Assigned(FTableView) and FTableView.IsDesignTime then\r\n FAccessoryText := 'Button';\r\n FVisible := True;\r\n FHTMLTemplateItems := TStringList.Create;\r\n FHTMLTemplateItems.OnChange := @TemplateItemsChanged;\r\n FTitleColor := gcBlack;\r\n FSelectedTextColor := gcBlack;\r\n FDisabledTextColor := gcSilver;\r\n FWordWrapping := true;\r\n FHorizontalTextAlign := gtaLeading;\r\n FVerticalTextAlign := gtaCenter;\r\n FTrimming := gttNone;\r\n FSelectedTitleColor := gcBlack;\r\n FDisabledTitleColor := gcSilver;\r\n FTitleWordWrapping := true;\r\n FTitleHorizontalTextAlign := gtaLeading;\r\n FTitleVerticalTextAlign := gtaCenter;\r\n FTitleTrimming := gttNone;\r\n FBitmap := TTMSFNCBitmap.Create;\r\n FBitmap.OnChange := @BitmapChanged;\r\n if Assigned(FTableView) then\r\n Self.Assign(FTableView.DefaultItem);\r\n UpdateItem;\r\nend;\r\n\r\ndestructor TTMSFNCTableViewItem.Destroy;\r\nvar\r\n I: Integer;\r\nbegin\r\n FBitmap.Free;\r\n FHTMLTemplateItems.Free;\r\n if Assigned(FTableView) and Assigned(FTableView.FDisplayList) then\r\n begin\r\n for I := FTableView.FDisplayList.Count - 1 downto 0 do\r\n begin\r\n if FTableView.FDisplayList[I].Item = Self then\r\n begin\r\n FTableView.FDisplayList.Delete(I);\r\n Break;\r\n end;\r\n end;\r\n end;\r\n inherited;\r\n UpdateItem;\r\nend;\r\n\r\nprocedure TTMSFNCTableViewItem.SetHeight(const Value: Double);\r\nbegin\r\n if FHeight <> Value then\r\n begin\r\n FHeight := Value;\r\n UpdateItem;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTableViewItem.SetHTMLTemplateItems(const Value: TStringList);\r\nbegin\r\n if FHTMLTemplateItems <> Value then\r\n begin\r\n FHTMLTemplateItems.Assign(Value);\r\n UpdateItem;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCTableViewItem.GetBitmapContainer: TTMSFNCBitmapContainer;\r\nvar\r\n l: TTMSFNCCustomTableView;\r\nbegin\r\n Result := nil;\r\n l := TableView;\r\n if Assigned(l) then\r\n Result := l.BitmapContainer;\r\nend;\r\n\r\nfunction TTMSFNCTableViewItem.GetTableView: TTMSFNCCustomTableView;\r\nbegin\r\n Result := FTableView;\r\nend;\r\n\r\nprocedure TTMSFNCTableViewItem.TemplateItemsChanged(Sender: TObject);\r\nbegin\r\n UpdateItem;\r\nend;\r\n\r\nprocedure TTMSFNCTableViewItem.LoadFromString(AString: String);\r\nvar\r\n k: Integer;\r\n a: TStringList;\r\n s: TStringList;\r\n y: Integer;\r\n st: string;\r\n ps: Integer;\r\n subst: string;\r\nbegin\r\n a := TStringList.Create;\r\n try\r\n st := AString;\r\n while st <> '' do\r\n begin\r\n ps := Pos('{0}', st);\r\n if ps = 0 then\r\n begin\r\n a.Add(st);\r\n Break;\r\n end;\r\n subst := Copy(st, 1, ps - 1);\r\n a.Add(subst);\r\n Delete(st, 1, ps - 1 + Length('{0}'));\r\n end;\r\n\r\n for K := 0 to a.Count - 1 do\r\n begin\r\n if a[K] <> '' then\r\n begin\r\n if K = 0 then\r\n Text := a[K]\r\n else if K = 1 then\r\n begin\r\n s := TStringList.Create;\r\n try\r\n TTMSFNCUtils.Split(';', a[K], s);\r\n for y := 0 to s.Count - 1 do\r\n begin\r\n if s[y] <> '' then\r\n begin\r\n if y = 0 then\r\n Checked := StrToBool(s[y])\r\n else if y = 1 then\r\n BitmapName := s[y]\r\n else if y = 2 then\r\n TTMSFNCUtils.LoadBitmapFromHexStr(s[y], Bitmap);\r\n end;\r\n end;\r\n finally\r\n s.Free;\r\n end;\r\n end\r\n else if K = 2 then\r\n Enabled := StrToBool(a[K]);\r\n end;\r\n end;\r\n finally\r\n a.Free;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCTableViewItem.GetStrippedHTMLText: String;\r\nbegin\r\n Result := TTMSFNCUtils.HTMLStrip(GetText);\r\nend;\r\n\r\nfunction TTMSFNCTableViewItem.GetText: string;\r\nvar\r\n ht: string;\r\n s: string;\r\nbegin\r\n s := '';\r\n if Assigned(FTableView) then\r\n begin\r\n ht := FTableView.ItemAppearance.HTMLTemplate;\r\n FTableView.DoGetHTMLTemplate(Self, ht);\r\n if ht = '' then\r\n s := Text\r\n else\r\n s := FTableView.HTMLReplace(ht, Self);\r\n end;\r\n\r\n Result := s;\r\nend;\r\n\r\nfunction TTMSFNCTableViewItem.GetTitle: string;\r\nbegin\r\n Result := Title;\r\nend;\r\n\r\nprocedure TTMSFNCTableViewItem.HideDetailControl;\r\nbegin\r\n if Assigned(FTableView) then\r\n FTableView.HideDetailControl;\r\nend;\r\n\r\nfunction TTMSFNCTableViewItem.IsAccessoryHeightStored: Boolean;\r\nbegin\r\n Result := AccessoryHeight <> 24;\r\nend;\r\n\r\nfunction TTMSFNCTableViewItem.IsAccessoryProgressStored: Boolean;\r\nbegin\r\n Result := AccessoryProgress <> 0;\r\nend;\r\n\r\nfunction TTMSFNCTableViewItem.IsAccessoryWidthStored: Boolean;\r\nbegin\r\n Result := AccessoryWidth <> 24;\r\nend;\r\n\r\nfunction TTMSFNCTableViewItem.IsHeightStored: Boolean;\r\nbegin\r\n Result := Height <> -1;\r\nend;\r\n\r\nfunction TTMSFNCTableViewItem.IsSelected: Boolean;\r\nvar\r\n i: Integer;\r\nbegin\r\n Result := False;\r\n if Assigned(FTableView) then\r\n begin\r\n for I := 0 to FTableView.SelectedItemCount - 1 do\r\n begin\r\n if FTableView.SelectedItems[I] = Self then\r\n begin\r\n Result := True;\r\n Break;\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCTableViewItem.SaveToString(ATextOnly: Boolean): String;\r\nvar\r\n s: String;\r\nbegin\r\n if not Assigned(FTableView) then\r\n Exit;\r\n\r\n Result := '';\r\n Result := Result + Text;\r\n\r\n if not ATextOnly then\r\n Result := Result + '{0}';\r\n\r\n if not ATextOnly then\r\n begin\r\n Result := Result + BoolToStr(Checked) + ';';\r\n Result := Result + BitmapName + ';';\r\n Result := Result + TTMSFNCUtils.SaveBitmapToHexStr(Bitmap) + ';';\r\n Result := Result + s;\r\n end;\r\n\r\n if not ATextOnly then\r\n begin\r\n Result := Result + '{0}';\r\n Result := Result + BoolToStr(Enabled);\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTableViewItem.SetCategoryID(const Value: integer);\r\nbegin\r\n if FCategoryID <> Value then\r\n begin\r\n FCategoryID := Value;\r\n UpdateItem;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTableViewItem.SetChecked(const Value: Boolean);\r\nvar\r\n l: TTMSFNCCustomTableView;\r\n n: TTMSFNCTreeViewVirtualNode;\r\nbegin\r\n if FChecked <> Value then\r\n begin\r\n FChecked := Value;\r\n l := TableView;\r\n if Assigned(l) then\r\n begin\r\n n := TTMSFNCCustomTableViewOpen(l).GetNodeForItemIndex(Index);\r\n if Assigned(n) and (n.CheckStates[0] <> FChecked) then\r\n begin\r\n if FChecked then\r\n TTMSFNCCustomTableViewOpen(l).TreeView.CheckVirtualNode(n, 0)\r\n else\r\n TTMSFNCCustomTableViewOpen(l).TreeView.UnCheckVirtualNode(n, 0);\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTableViewItem.SetCheckType(\r\n const Value: TTMSFNCTableViewItemCheckType);\r\nbegin\r\n if FCheckType <> Value then\r\n begin\r\n FCheckType := Value;\r\n UpdateItem;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTableViewItem.SetTitleExpanded(const Value: Boolean);\r\nbegin\r\n if FTitleExpanded <> Value then\r\n begin\r\n FTitleExpanded := Value;\r\n UpdateItem;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTableViewItem.SetAccessory(\r\n const Value: TTMSFNCTableViewItemAccessory);\r\nbegin\r\n if FAccessory <> Value then\r\n begin\r\n FAccessory := Value;\r\n case FAccessory of\r\n tviaDetail:\r\n begin\r\n AccessoryWidth := 32;\r\n AccessoryHeight := 24;\r\n end;\r\n tviaProgress:\r\n begin\r\n AccessoryWidth := 75;\r\n AccessoryHeight := 20;\r\n end;\r\n tviaButton:\r\n begin\r\n AccessoryWidth := 75;\r\n AccessoryHeight := 20;\r\n end;\r\n tviaBadge:\r\n begin\r\n AccessoryWidth := 32;\r\n AccessoryHeight := 24;\r\n end;\r\n tviaCustom: ;\r\n end;\r\n UpdateItem;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTableViewItem.SetAccessoryBorderColor(const Value: TTMSFNCGraphicsColor);\r\nbegin\r\n if FAccessoryBorderColor <> Value then\r\n begin\r\n FAccessoryBorderColor := Value;\r\n UpdateItem;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTableViewItem.SetAccessoryColor(const Value: TTMSFNCGraphicsColor);\r\nbegin\r\n if FAccessoryColor <> Value then\r\n begin\r\n FAccessoryColor := Value;\r\n UpdateItem;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTableViewItem.SetAccessoryFontColor(const Value: TTMSFNCGraphicsColor);\r\nbegin\r\n if FAccessoryFontColor <> Value then\r\n begin\r\n FAccessoryFontColor := Value;\r\n UpdateItem;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTableViewItem.SetAccessoryHeight(const Value: Single);\r\nbegin\r\n if FAccessoryHeight <> Value then\r\n begin\r\n FAccessoryHeight := Value;\r\n UpdateItem;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTableViewItem.SetAccessoryProgress(const Value: Single);\r\nbegin\r\n if FAccessoryProgress <> Value then\r\n begin\r\n FAccessoryProgress := Value;\r\n UpdateItem;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTableViewItem.SetAccessoryText(const Value: String);\r\nbegin\r\n if FAccessoryText <> Value then\r\n begin\r\n FAccessoryText := Value;\r\n UpdateItem;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTableViewItem.SetAccessoryWidth(const Value: Single);\r\nbegin\r\n if FAccessoryWidth <> Value then\r\n begin\r\n FAccessoryWidth := Value;\r\n UpdateItem;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTableViewItem.SetBadgeAlign(\r\n const Value: TTMSFNCGraphicsTextAlign);\r\nbegin\r\n if FBadgeAlign <> Value then\r\n begin\r\n FBadgeAlign := Value;\r\n UpdateItem;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTableViewItem.SetBitmap(const Value: TTMSFNCBitmap);\r\nbegin\r\n if FBitmap <> Value then\r\n begin\r\n FBitmap.Assign(Value);\r\n UpdateItem;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTableViewItem.SetBitmapName(const Value: string);\r\nbegin\r\n if FBitmapName <> Value then\r\n begin\r\n FBitmapName := Value;\r\n UpdateItem;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTableViewItem.SetDetailControl(const Value: TControl);\r\nbegin\r\n if Value = nil then\r\n begin\r\n if Assigned(FDetailControl) then\r\n FDetailControl.Visible := True;\r\n end;\r\n\r\n FDetailControl := Value;\r\n if Assigned(FDetailControl) then\r\n FDetailControl.Visible := False;\r\nend;\r\n\r\nprocedure TTMSFNCTableViewItem.SetDisabledTextColor(const Value: TTMSFNCGraphicsColor);\r\nbegin\r\n if FDisabledTextColor <> Value then\r\n begin\r\n FDisabledTextColor := Value;\r\n UpdateItem;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTableViewItem.SetDisabledTitleColor(const Value: TTMSFNCGraphicsColor);\r\nbegin\r\n if FDisabledTitleColor <> Value then\r\n begin\r\n FDisabledTitleColor := Value;\r\n UpdateItem;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTableViewItem.SetEnabled(const Value: Boolean);\r\nbegin\r\n if FEnabled <> Value then\r\n begin\r\n FEnabled := Value;\r\n UpdateItem;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTableViewItem.SetGroupIndex(const Value: Integer);\r\nbegin\r\n if FGroupIndex <> Value then\r\n begin\r\n FGroupIndex := Value;\r\n UpdateItem;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTableViewItem.SetSelectedTextColor(const Value: TTMSFNCGraphicsColor);\r\nbegin\r\n if FSelectedTextColor <> Value then\r\n begin\r\n FSelectedTextColor := Value;\r\n UpdateItem;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTableViewItem.SetSelectedTitleColor(const Value: TTMSFNCGraphicsColor);\r\nbegin\r\n if FSelectedTitleColor <> Value then\r\n begin\r\n FSelectedTitleColor := Value;\r\n UpdateItem;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTableViewItem.SetText(const Value: String);\r\nbegin\r\n if FText <> Value then\r\n begin\r\n FText := Value;\r\n UpdateItem;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTableViewItem.SetHorizontalTextAlign(const Value: TTMSFNCGraphicsTextAlign);\r\nbegin\r\n if FHorizontalTextAlign <> Value then\r\n begin\r\n FHorizontalTextAlign := Value;\r\n UpdateItem;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTableViewItem.SetTextColor(const Value: TTMSFNCGraphicsColor);\r\nbegin\r\n if FTextColor <> Value then\r\n begin\r\n FTextColor := Value;\r\n UpdateItem;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTableViewItem.SetTitle(const Value: String);\r\nbegin\r\n if FTitle <> Value then\r\n begin\r\n FTitle := Value;\r\n UpdateItem;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTableViewItem.SetTitleColor(const Value: TTMSFNCGraphicsColor);\r\nbegin\r\n if FTitleColor <> Value then\r\n begin\r\n FTitleColor := Value;\r\n UpdateItem;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTableViewItem.SetTitleHorizontalTextAlign(const Value: TTMSFNCGraphicsTextAlign);\r\nbegin\r\n if FTitleHorizontalTextAlign <> Value then\r\n begin\r\n FTitleHorizontalTextAlign := Value;\r\n UpdateItem;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTableViewItem.SetTitleTrimming(const Value: TTMSFNCGraphicsTextTrimming);\r\nbegin\r\n if FTitleTrimming <> Value then\r\n begin\r\n FTitleTrimming := Value;\r\n UpdateItem;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTableViewItem.SetTitleVerticalTextAlign(const Value: TTMSFNCGraphicsTextAlign);\r\nbegin\r\n if FTitleVerticalTextAlign <> Value then\r\n begin\r\n FTitleVerticalTextAlign := Value;\r\n UpdateItem;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTableViewItem.SetTitleWordWrapping(const Value: Boolean);\r\nbegin\r\n if FTitleWordWrapping <> Value then\r\n begin\r\n FTitleWordWrapping := Value;\r\n UpdateItem;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTableViewItem.SetTrimming(const Value: TTMSFNCGraphicsTextTrimming);\r\nbegin\r\n if FTrimming <> Value then\r\n begin\r\n FTrimming := Value;\r\n UpdateItem;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTableViewItem.SetVerticalTextAlign(const Value: TTMSFNCGraphicsTextAlign);\r\nbegin\r\n if FVerticalTextAlign <> Value then\r\n begin\r\n FVerticalTextAlign := Value;\r\n UpdateItem;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTableViewItem.SetVisible(const Value: Boolean);\r\nbegin\r\n if FVisible <> Value then\r\n begin\r\n FVisible := Value;\r\n UpdateItem;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTableViewItem.SetWordWrapping(const Value: Boolean);\r\nbegin\r\n if FWordWrapping <> Value then\r\n begin\r\n FWordWrapping := Value;\r\n UpdateItem;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTableViewItem.ShowDetailControl;\r\nbegin\r\n if Assigned(FTableView) then\r\n FTableView.ShowDetailControl(Index);\r\nend;\r\n\r\nprocedure TTMSFNCTableViewItem.UpdateItem;\r\nvar\r\n l: TTMSFNCCustomTableView;\r\nbegin\r\n l := TableView;\r\n if Assigned(l) then\r\n l.UpdateTableView;\r\nend;\r\n\r\n{ TTMSFNCTableViewItemAppearance }\r\n\r\nprocedure TTMSFNCTableViewItemAppearance.Assign(Source: TPersistent);\r\nbegin\r\n if Source is TTMSFNCTableViewItemAppearance then\r\n begin\r\n Font.Assign((Source as TTMSFNCTableViewItemAppearance).Font);\r\n Fill.Assign((Source as TTMSFNCTableViewItemAppearance).Fill);\r\n Stroke.Assign((Source as TTMSFNCTableViewItemAppearance).Stroke);\r\n SelectedFill.Assign((Source as TTMSFNCTableViewItemAppearance).SelectedFill);\r\n SelectedStroke.Assign((Source as TTMSFNCTableViewItemAppearance).SelectedStroke);\r\n DisabledFill.Assign((Source as TTMSFNCTableViewItemAppearance).DisabledFill);\r\n DisabledStroke.Assign((Source as TTMSFNCTableViewItemAppearance).DisabledStroke);\r\n HeightMode := (Source as TTMSFNCTableViewItemAppearance).HeightMode;\r\n FixedHeight := (Source as TTMSFNCTableViewItemAppearance).FixedHeight;\r\n FHTMLTemplate := (Source as TTMSFNCTableViewItemAppearance).HTMLTemplate;\r\n FAccessoryDetailBitmaps.Assign((Source as TTMSFNCTableViewItemAppearance).AccessoryDetailBitmaps);\r\n FAccessoryFont.Assign((Source as TTMSFNCTableViewItemAppearance).AccessoryFont);\r\n FAccessoryStroke.Assign((Source as TTMSFNCTableViewItemAppearance).AccessoryStroke);\r\n FAccessoryFill.Assign((Source as TTMSFNCTableViewItemAppearance).AccessoryFill);\r\n end;\r\nend;\r\n\r\nconstructor TTMSFNCTableViewItemAppearance.Create(ATableView: TTMSFNCCustomTableView);\r\nbegin\r\n FTableView := ATableView;\r\n\r\n FAccessoryFill := TTMSFNCGraphicsFill.Create(gfkSolid, gcYellowgreen);\r\n FAccessoryFill.OnChanged := @FillChanged;\r\n FAccessoryStroke := TTMSFNCGraphicsStroke.Create(gskSolid, gcBlack);\r\n FAccessoryStroke.OnChanged := @StrokeChanged;\r\n FAccessoryFont := TTMSFNCGraphicsFont.Create;\r\n if Assigned(FTableView) and FTableView.IsDesignTime then\r\n begin\r\n FAccessoryFont.Color := gcDarkred;\r\n FAccessoryFont.Style := [TFontStyle.fsBold];\r\n end;\r\n FAccessoryFont.OnChanged := @FontChanged;\r\n\r\n FAccessoryDetailBitmaps := TTMSFNCScaledBitmaps.Create(Self);\r\n FAccessoryDetailBitmaps.OnChange := @DoAccessoryDetailBitmapsChanged;\r\n if Assigned(FTableView) and Assigned(FTableView.FTreeView) and FTableView.IsDesignTime then\r\n begin\r\n FTableView.FTreeView.NodesAppearance.DisabledFill.Kind := gfkNone;\r\n FTableView.FTreeView.NodesAppearance.DisabledStroke.Kind := gskNone;\r\n FTableView.FTreeView.NodesAppearance.SelectedStroke.Assign(FTableView.FTreeView.NodesAppearance.SelectedFill);\r\n end;\r\n HeightMode := tvhmVariable;\r\n FHeight := -1;\r\nend;\r\n\r\ndestructor TTMSFNCTableViewItemAppearance.Destroy;\r\nbegin\r\n FAccessoryFill.Free;\r\n FAccessoryStroke.Free;\r\n FAccessoryFont.Free;\r\n FAccessoryDetailBitmaps.Free;\r\n inherited;\r\nend;\r\n\r\nprocedure TTMSFNCTableViewItemAppearance.DoAccessoryDetailBitmapsChanged(Sender: TObject);\r\nbegin\r\n if Assigned(FTableView) then\r\n FTableView.UpdateTableView;\r\nend;\r\n\r\nprocedure TTMSFNCTableViewItemAppearance.FontChanged(Sender: TObject);\r\nbegin\r\n if Assigned(FTableView) then\r\n FTableView.UpdateTableView;\r\nend;\r\n\r\nprocedure TTMSFNCTableViewItemAppearance.StrokeChanged(Sender: TObject);\r\nbegin\r\n if Assigned(FTableView) then\r\n FTableView.UpdateTableView;\r\nend;\r\n\r\nprocedure TTMSFNCTableViewItemAppearance.FillChanged(Sender: TObject);\r\nbegin\r\n if Assigned(FTableView) then\r\n FTableView.UpdateTableView;\r\nend;\r\n\r\nfunction TTMSFNCTableViewItemAppearance.GetDisabledFill: TTMSFNCGraphicsFill;\r\nbegin\r\n Result := nil;\r\n if Assigned(FTableView) and Assigned(FTableView.FTreeView) then\r\n Result := FTableView.FTreeView.NodesAppearance.DisabledFill;\r\nend;\r\n\r\nfunction TTMSFNCTableViewItemAppearance.GetDisabledStroke: TTMSFNCGraphicsStroke;\r\nbegin\r\n Result := nil;\r\n if Assigned(FTableView) and Assigned(FTableView.FTreeView) then\r\n Result := FTableView.FTreeView.NodesAppearance.DisabledStroke;\r\nend;\r\n\r\nfunction TTMSFNCTableViewItemAppearance.GetFill: TTMSFNCGraphicsFill;\r\nbegin\r\n Result := nil;\r\n if Assigned(FTableView) and Assigned(FTableView.FTreeView) then\r\n Result := FTableView.FTreeView.NodesAppearance.Fill;\r\nend;\r\n\r\nfunction TTMSFNCTableViewItemAppearance.GetFixedHeight: Double;\r\nbegin\r\n Result := 0;\r\n if Assigned(FTableView) and Assigned(FTableView.FTreeView) then\r\n Result := FTableView.FTreeView.NodesAppearance.FixedHeight;\r\nend;\r\n\r\nfunction TTMSFNCTableViewItemAppearance.GetFont: TTMSFNCGraphicsFont;\r\nbegin\r\n Result := nil;\r\n if Assigned(FTableView) and Assigned(FTableView.FTreeView) then\r\n Result := FTableView.FTreeView.NodesAppearance.Font;\r\nend;\r\n\r\nfunction TTMSFNCTableViewItemAppearance.GetHeightMode: TTMSFNCTableViewItemHeightMode;\r\nvar\r\n i: Integer;\r\nbegin\r\n Result := tvhmVariable;\r\n if Assigned(FTableView) and Assigned(FTableView.FTreeView) then\r\n begin\r\n i := Integer(FTableView.FTreeView.NodesAppearance.HeightMode);\r\n Result := TTMSFNCTableViewItemHeightMode(i);\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCTableViewItemAppearance.GetOwner: TPersistent;\r\nbegin\r\n Result := FTableView;\r\nend;\r\n\r\nfunction TTMSFNCTableViewItemAppearance.GetSelectedFill: TTMSFNCGraphicsFill;\r\nbegin\r\n Result := nil;\r\n if Assigned(FTableView) and Assigned(FTableView.FTreeView) then\r\n Result := FTableView.FTreeView.NodesAppearance.SelectedFill;\r\nend;\r\n\r\nfunction TTMSFNCTableViewItemAppearance.GetSelectedStroke: TTMSFNCGraphicsStroke;\r\nbegin\r\n Result := nil;\r\n if Assigned(FTableView) and Assigned(FTableView.FTreeView) then\r\n Result := FTableView.FTreeView.NodesAppearance.SelectedStroke;\r\nend;\r\n\r\nfunction TTMSFNCTableViewItemAppearance.GetShowFocus: Boolean;\r\nbegin\r\n Result := True;\r\n if Assigned(FTableView) and Assigned(FTableView.FTreeView) then\r\n Result := FTableView.FTreeView.NodesAppearance.ShowFocus;\r\nend;\r\n\r\nfunction TTMSFNCTableViewItemAppearance.GetStroke: TTMSFNCGraphicsStroke;\r\nbegin\r\n Result := nil;\r\n if Assigned(FTableView) and Assigned(FTableView.FTreeView) then\r\n Result := FTableView.FTreeView.NodesAppearance.Stroke;\r\nend;\r\n\r\nfunction TTMSFNCTableViewItemAppearance.IsHeightStored: Boolean;\r\nbegin\r\n Result := Height <> -1;\r\nend;\r\n\r\nprocedure TTMSFNCTableViewItemAppearance.SetAccessoryDetailBitmaps(const Value: TTMSFNCScaledBitmaps);\r\nbegin\r\n FAccessoryDetailBitmaps.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCTableViewItemAppearance.SetAccessoryFill(const Value: TTMSFNCGraphicsFill);\r\nbegin\r\n FAccessoryFill.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCTableViewItemAppearance.SetAccessoryFont(const Value: TTMSFNCGraphicsFont);\r\nbegin\r\n FAccessoryFont.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCTableViewItemAppearance.SetAccessoryStroke(const Value: TTMSFNCGraphicsStroke);\r\nbegin\r\n FAccessoryStroke.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCTableViewItemAppearance.SetDisabledFill(const Value: TTMSFNCGraphicsFill);\r\nbegin\r\n if Assigned(FTableView) and Assigned(FTableView.FTreeView) then\r\n FTableView.FTreeView.NodesAppearance.DisabledFill.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCTableViewItemAppearance.SetDisabledStroke(const Value: TTMSFNCGraphicsStroke);\r\nbegin\r\n if Assigned(FTableView) and Assigned(FTableView.FTreeView) then\r\n FTableView.FTreeView.NodesAppearance.DisabledStroke.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCTableViewItemAppearance.SetFill(const Value: TTMSFNCGraphicsFill);\r\nbegin\r\n if Assigned(FTableView) and Assigned(FTableView.FTreeView) then\r\n FTableView.FTreeView.NodesAppearance.Fill.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCTableViewItemAppearance.SetFixedHeight(const Value: Double);\r\nbegin\r\n if Assigned(FTableView) and Assigned(FTableView.FTreeView) then\r\n FTableView.FTreeView.NodesAppearance.FixedHeight := Value;\r\nend;\r\n\r\nprocedure TTMSFNCTableViewItemAppearance.SetFont(const Value: TTMSFNCGraphicsFont);\r\nbegin\r\n if Assigned(FTableView) and Assigned(FTableView.FTreeView) then\r\n FTableView.FTreeView.NodesAppearance.Font.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCTableViewItemAppearance.SetHeight(const Value: Double);\r\nbegin\r\n if FHeight <> Value then\r\n begin\r\n FHeight := Value;\r\n if Assigned(FTableView) then\r\n FTableView.UpdateTableView;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTableViewItemAppearance.SetHeightMode(const Value: TTMSFNCTableViewItemHeightMode);\r\nvar\r\n i: Integer;\r\nbegin\r\n if Assigned(FTableView) and Assigned(FTableView.FTreeView) then\r\n begin\r\n i := Integer(Value);\r\n FTableView.FTreeView.NodesAppearance.HeightMode := TTMSFNCTreeViewNodeHeightMode(i);\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTableViewItemAppearance.SetHTMLTemplate(const Value: string);\r\nbegin\r\n if FHTMLTemplate <> Value then\r\n begin\r\n FHTMLTemplate := Value;\r\n if Assigned(FTableView) then\r\n FTableView.UpdateTableView;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTableViewItemAppearance.SetSelectedFill(const Value: TTMSFNCGraphicsFill);\r\nbegin\r\n if Assigned(FTableView) and Assigned(FTableView.FTreeView) then\r\n FTableView.FTreeView.NodesAppearance.SelectedFill.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCTableViewItemAppearance.SetSelectedStroke(const Value: TTMSFNCGraphicsStroke);\r\nbegin\r\n if Assigned(FTableView) and Assigned(FTableView.FTreeView) then\r\n FTableView.FTreeView.NodesAppearance.SelectedStroke.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCTableViewItemAppearance.SetShowFocus(const Value: Boolean);\r\nbegin\r\n if Assigned(FTableView) and Assigned(FTableView.FTreeView) then\r\n FTableView.FTreeView.NodesAppearance.ShowFocus := Value;\r\nend;\r\n\r\nprocedure TTMSFNCTableViewItemAppearance.SetStroke(const Value: TTMSFNCGraphicsStroke);\r\nbegin\r\n if Assigned(FTableView) and Assigned(FTableView.FTreeView) then\r\n FTableView.FTreeView.NodesAppearance.Stroke.Assign(Value);\r\nend;\r\n\r\n{ TTMSFNCTableViewCategoryAppearance }\r\n\r\nprocedure TTMSFNCTableViewCategoryAppearance.Assign(Source: TPersistent);\r\nbegin\r\n if Source is TTMSFNCTableViewCategoryAppearance then\r\n begin\r\n Font.Assign((Source as TTMSFNCTableViewCategoryAppearance).Font);\r\n Fill.Assign((Source as TTMSFNCTableViewCategoryAppearance).Fill);\r\n Stroke.Assign((Source as TTMSFNCTableViewCategoryAppearance).Stroke);\r\n FHeight := (Source as TTMSFNCTableViewCategoryAppearance).Height;\r\n FFloating := (Source as TTMSFNCTableViewCategoryAppearance).Floating;\r\n FShowUncategorized := (Source as TTMSFNCTableViewCategoryAppearance).ShowUncategorized;\r\n end;\r\nend;\r\n\r\nconstructor TTMSFNCTableViewCategoryAppearance.Create(ATableView: TTMSFNCCustomTableView);\r\nbegin\r\n FTableView := ATableView;\r\n FHeight := -1;\r\n FFloating := True;\r\n FShowUncategorized := True;\r\nend;\r\n\r\ndestructor TTMSFNCTableViewCategoryAppearance.Destroy;\r\nbegin\r\n inherited;\r\nend;\r\n\r\nfunction TTMSFNCTableViewCategoryAppearance.GetFill: TTMSFNCGraphicsFill;\r\nbegin\r\n Result := nil;\r\n if Assigned(FTableView) and Assigned(FTableView.FTreeView) then\r\n Result := FTableView.FTreeView.NodesAppearance.ExtendedFill;\r\nend;\r\n\r\nfunction TTMSFNCTableViewCategoryAppearance.GetFont: TTMSFNCGraphicsFont;\r\nbegin\r\n Result := nil;\r\n if Assigned(FTableView) and Assigned(FTableView.FTreeView) then\r\n Result := FTableView.FTreeView.NodesAppearance.ExtendedFont;\r\nend;\r\n\r\nfunction TTMSFNCTableViewCategoryAppearance.GetStroke: TTMSFNCGraphicsStroke;\r\nbegin\r\n Result := nil;\r\n if Assigned(FTableView) and Assigned(FTableView.FTreeView) then\r\n Result := FTableView.FTreeView.NodesAppearance.ExtendedStroke;\r\nend;\r\n\r\nfunction TTMSFNCTableViewCategoryAppearance.IsHeightStored: Boolean;\r\nbegin\r\n Result := Height <> -1;\r\nend;\r\n\r\nprocedure TTMSFNCTableViewCategoryAppearance.SetFill(const Value: TTMSFNCGraphicsFill);\r\nbegin\r\n if Assigned(FTableView) and Assigned(FTableView.FTreeView) then\r\n FTableView.FTreeView.NodesAppearance.ExtendedFill.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCTableViewCategoryAppearance.SetFloating(const Value: Boolean);\r\nbegin\r\n if FFloating <> Value then\r\n begin\r\n FFloating := Value;\r\n if Assigned(FTableView) then\r\n FTableView.UpdateTableView;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTableViewCategoryAppearance.SetFont(const Value: TTMSFNCGraphicsFont);\r\nbegin\r\n if Assigned(FTableView) and Assigned(FTableView.FTreeView) then\r\n FTableView.FTreeView.NodesAppearance.ExtendedFont.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCTableViewCategoryAppearance.SetHeight(const Value: Single);\r\nbegin\r\n if FHeight <> Value then\r\n begin\r\n FHeight := Value;\r\n if Assigned(FTableView) then\r\n FTableView.UpdateTableView;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTableViewCategoryAppearance.SetShowUncategorized(\r\n const Value: Boolean);\r\nbegin\r\n if FShowUncategorized then\r\n begin\r\n FShowUncategorized := Value;\r\n if Assigned(FTableView) then\r\n FTableView.UpdateTableView;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTableViewCategoryAppearance.SetStroke(const Value: TTMSFNCGraphicsStroke);\r\nbegin\r\n if Assigned(FTableView) and Assigned(FTableView.FTreeView) then\r\n FTableView.FTreeView.NodesAppearance.ExtendedStroke.Assign(Value);\r\nend;\r\n\r\n{ TTMSFNCTableViewGroupAppearance }\r\n\r\nprocedure TTMSFNCTableViewGroupAppearance.Assign(Source: TPersistent);\r\nbegin\r\n if Source is TTMSFNCTableViewGroupAppearance then\r\n begin\r\n FRounding := (Source as TTMSFNCTableViewGroupAppearance).Rounding;\r\n FMargins.Assign((Source as TTMSFNCTableViewGroupAppearance).Margins);\r\n end\r\n else\r\n inherited;\r\nend;\r\n\r\nconstructor TTMSFNCTableViewGroupAppearance.Create(\r\n ATableView: TTMSFNCCustomTableView);\r\nbegin\r\n FTableView := ATableView;\r\n\r\n FMargins := TTMSFNCMargins.Create(RectF(20, 10, 20, 10));\r\n FMargins.OnChange := @MarginsChanged;\r\n FRounding := 10;\r\nend;\r\n\r\ndestructor TTMSFNCTableViewGroupAppearance.Destroy;\r\nbegin\r\n FMargins.Free;\r\n inherited;\r\nend;\r\n\r\nprocedure TTMSFNCTableViewGroupAppearance.MarginsChanged(Sender: TObject);\r\nbegin\r\n if Assigned(FTableView) then\r\n FTableView.UpdateTableView;\r\nend;\r\n\r\nprocedure TTMSFNCTableViewGroupAppearance.SetMargins(\r\n const Value: TTMSFNCMargins);\r\nbegin\r\n FMargins.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCTableViewGroupAppearance.SetRounding(const Value: Integer);\r\nbegin\r\n if FRounding <> Value then\r\n begin\r\n FRounding := Value;\r\n if Assigned(FTableView) then\r\n FTableView.UpdateTableView;\r\n end;\r\nend;\r\n\r\n{ TTMSFNCTableViewMoreOptionAppearance }\r\n\r\nprocedure TTMSFNCTableViewMoreOptionAppearance.Assign(Source: TPersistent);\r\nbegin\r\n if Source is TTMSFNCTableViewMoreOptionAppearance then\r\n begin\r\n FFont.Assign((Source as TTMSFNCTableViewMoreOptionAppearance).Font);\r\n FFill.Assign((Source as TTMSFNCTableViewMoreOptionAppearance).Fill);\r\n FStroke.Assign((Source as TTMSFNCTableViewMoreOptionAppearance).Stroke);\r\n end;\r\nend;\r\n\r\nconstructor TTMSFNCTableViewMoreOptionAppearance.Create(ATableView: TTMSFNCCustomTableView);\r\nbegin\r\n FTableView := ATableView;\r\n FFont := TTMSFNCGraphicsFont.Create;\r\n if Assigned(FTableView) and FTableView.IsDesignTime then\r\n FFont.Color := gcWhite;\r\n FFont.OnChanged := @FontChanged;\r\n FFill := TTMSFNCGraphicsFill.Create(gfkSolid, gcSteelblue);\r\n FFill.OnChanged := @FillChanged;\r\n FStroke := TTMSFNCGraphicsStroke.Create(gskSolid, gcSteelblue);\r\n FStroke.OnChanged := @StrokeChanged;\r\nend;\r\n\r\ndestructor TTMSFNCTableViewMoreOptionAppearance.Destroy;\r\nbegin\r\n FFont.Free;\r\n FFill.Free;\r\n FStroke.Free;\r\n inherited;\r\nend;\r\n\r\nprocedure TTMSFNCTableViewMoreOptionAppearance.FillChanged(Sender: TObject);\r\nbegin\r\n if Assigned(FTableView) then\r\n FTableView.Invalidate;\r\nend;\r\n\r\nprocedure TTMSFNCTableViewMoreOptionAppearance.FontChanged(Sender: TObject);\r\nbegin\r\n if Assigned(FTableView) then\r\n FTableView.Invalidate;\r\nend;\r\n\r\nprocedure TTMSFNCTableViewMoreOptionAppearance.SetFill(const Value: TTMSFNCGraphicsFill);\r\nbegin\r\n FFill.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCTableViewMoreOptionAppearance.SetFont(const Value: TTMSFNCGraphicsFont);\r\nbegin\r\n FFont.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCTableViewMoreOptionAppearance.SetStroke(const Value: TTMSFNCGraphicsStroke);\r\nbegin\r\n FStroke.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCTableViewMoreOptionAppearance.StrokeChanged(Sender: TObject);\r\nbegin\r\n if Assigned(FTableView) then\r\n FTableView.Invalidate;\r\nend;\r\n\r\n{ TTMSFNCTableViewInteraction }\r\n\r\nprocedure TTMSFNCTableViewInteraction.Assign(Source: TPersistent);\r\nbegin\r\n if (Source is TTMSFNCTableViewInteraction) then\r\n begin\r\n FLookup.Assign((Source as TTMSFNCTableViewInteraction).Lookup);\r\n Filtering.Assign((Source as TTMSFNCTableViewInteraction).Filtering);\r\n Sorting := (Source as TTMSFNCTableViewInteraction).Sorting;\r\n FShowDetailMode := (Source as TTMSFNCTableViewInteraction).ShowDetailMode;\r\n DragDropMode := (Source as TTMSFNCTableViewInteraction).DragDropMode;\r\n MultiSelect := (Source as TTMSFNCTableViewInteraction).MultiSelect;\r\n TouchScrolling := (Source as TTMSFNCTableViewInteraction).TouchScrolling;\r\n ClipboardMode := (Source as TTMSFNCTableViewInteraction).ClipboardMode;\r\n Reorder := (Source as TTMSFNCTableViewInteraction).Reorder;\r\n FShowEditButton := (Source as TTMSFNCTableViewInteraction).ShowEditButton;\r\n FShowFilterButton := (Source as TTMSFNCTableViewInteraction).ShowFilterButton;\r\n FAccessoryClickDetection := (Source as TTMSFNCTableViewInteraction).AccessoryClickDetection;\r\n FLongPressToEdit := (Source as TTMSFNCTableViewInteraction).LongPressToEdit;\r\n FSwipeToShowMoreOptions := (Source as TTMSFNCTableViewInteraction).SwipeToShowMoreOptions;\r\n FSwipeBounceGesture := (Source as TTMSFNCTableViewInteraction).SwipeBounceGesture;\r\n end;\r\nend;\r\n\r\nconstructor TTMSFNCTableViewInteraction.Create(ATableView: TTMSFNCCustomTableView);\r\nbegin\r\n FTableView := ATableView;\r\n FLongPressToEdit := True;\r\n FSwipeToShowMoreOptions := True;\r\n FAccessoryClickDetection := ClickAccessories;\r\n FLookup := TTMSFNCTableViewLookup.Create(Self);\r\n FFiltering := TTMSFNCTableViewFiltering.Create(Self);\r\n FShowDetailMode := tvdtAfterSelectItem;\r\n FShowEditButton := False;\r\n FShowFilterButton := False;\r\n FSwipeBounceGesture := True;\r\n FKeyboardEscapeMode := tvkeStopFilter;\r\nend;\r\n\r\ndestructor TTMSFNCTableViewInteraction.Destroy;\r\nbegin\r\n FLookup.Free;\r\n FFiltering.Free;\r\n inherited;\r\nend;\r\n\r\nfunction TTMSFNCTableViewInteraction.GetAnimationFactor: Single;\r\nbegin\r\n Result := 2.5;\r\n if Assigned(FTableView) and Assigned(FTableView.FTreeView) then\r\n Result := FTableView.FTreeView.Interaction.AnimationFactor;\r\nend;\r\n\r\nfunction TTMSFNCTableViewInteraction.GetAutoOpenURL: Boolean;\r\nbegin\r\n Result := True;\r\n if Assigned(FTableView) and Assigned(FTableView.FTreeView) then\r\n Result := FTableView.FTreeView.Interaction.AutoOpenURL;\r\nend;\r\n\r\nfunction TTMSFNCTableViewInteraction.GetClipboardMode: TTMSFNCTableViewClipboardMode;\r\nvar\r\n i: Integer;\r\nbegin\r\n Result := tvcmNone;\r\n if Assigned(FTableView) and Assigned(FTableView.FTreeView) then\r\n begin\r\n i := Integer(FTableView.FTreeView.Interaction.ClipboardMode);\r\n Result := TTMSFNCTableViewClipboardMode(i);\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCTableViewInteraction.GetDragDropMode: TTMSFNCTableViewDragDropMode;\r\nvar\r\n i: Integer;\r\nbegin\r\n Result := tvdmNone;\r\n if Assigned(FTableView) and Assigned(FTableView.FTreeView) then\r\n begin\r\n i := Integer(FTableView.FTreeView.Interaction.DragDropMode);\r\n Result := TTMSFNCTableViewDragDropMode(i);\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCTableViewInteraction.GetMultiSelect: Boolean;\r\nbegin\r\n Result := False;\r\n if Assigned(FTableView) and Assigned(FTableView.FTreeView) then\r\n Result := FTableView.FTreeView.Interaction.MultiSelect;\r\nend;\r\n\r\nfunction TTMSFNCTableViewInteraction.GetReorder: Boolean;\r\nbegin\r\n Result := False;\r\n if Assigned(FTableView) and Assigned(FTableView.FTreeView) then\r\n Result := FTableView.FTreeView.Interaction.Reorder;\r\nend;\r\n\r\nfunction TTMSFNCTableViewInteraction.GetSorting: TTMSFNCTableViewSorting;\r\nbegin\r\n Result := tvcsNone;\r\n if Assigned(FTableView) and Assigned(FTableView.FTreeView) and (FTableView.FTreeView.Columns.Count > 0) then\r\n begin\r\n case FTableView.FTreeView.Columns[0].Sorting of\r\n tcsNone: Result := tvcsNone;\r\n tcsNormal: Result := tvcsNormal;\r\n tcsNormalCaseSensitive: Result := tvcsNormalCaseSensitive;\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCTableViewInteraction.GetTouchScrolling: Boolean;\r\nbegin\r\n Result := True;\r\n if Assigned(FTableView) and Assigned(FTableView.FTreeView) then\r\n Result := FTableView.FTreeView.Interaction.TouchScrolling;\r\nend;\r\n\r\nprocedure TTMSFNCTableViewInteraction.SetAccessoryClickDetection(const Value: TTMSFNCTableViewItemAccessories);\r\nbegin\r\n FAccessoryClickDetection := Value;\r\nend;\r\n\r\nprocedure TTMSFNCTableViewInteraction.SetAnimationFactor(const Value: Single);\r\nbegin\r\n if Assigned(FTableView) and Assigned(FTableView.FTreeView) then\r\n FTableView.FTreeView.Interaction.AnimationFactor := Value;\r\nend;\r\n\r\nprocedure TTMSFNCTableViewInteraction.SetAutoOpenURL(const Value: Boolean);\r\nbegin\r\n if Assigned(FTableView) and Assigned(FTableView.FTreeView) then\r\n FTableView.FTreeView.Interaction.AutoOpenURL := Value;\r\nend;\r\n\r\nprocedure TTMSFNCTableViewInteraction.SetClipboardMode(\r\n const Value: TTMSFNCTableViewClipboardMode);\r\nvar\r\n i: Integer;\r\nbegin\r\n if Assigned(FTableView) and Assigned(FTableView.FTreeView) then\r\n begin\r\n i := Integer(Value);\r\n FTableView.FTreeView.Interaction.ClipboardMode := TTMSFNCTreeViewClipboardMode(i);\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTableViewInteraction.SetShowDetailMode(const Value: TTMSFNCTableViewShowDetailMode);\r\nbegin\r\n if FShowDetailMode <> Value then\r\n FShowDetailMode := Value;\r\nend;\r\n\r\nprocedure TTMSFNCTableViewInteraction.SetShowEditButton(const Value: Boolean);\r\nbegin\r\n if FShowEditButton <> Value then\r\n begin\r\n FShowEditButton := Value;\r\n if Assigned(FTableView) then\r\n FTableView.UpdateTableView;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTableViewInteraction.SetShowFilterButton(const Value: Boolean);\r\nbegin\r\n if FShowFilterButton <> Value then\r\n begin\r\n FShowFilterButton := Value;\r\n if Assigned(FTableView) then\r\n FTableView.UpdateTableView;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTableViewInteraction.SetDragDropMode(const Value: TTMSFNCTableViewDragDropMode);\r\nvar\r\n i: Integer;\r\nbegin\r\n if Assigned(FTableView) and Assigned(FTableView.FTreeView) then\r\n begin\r\n i := Integer(Value);\r\n FTableView.FTreeView.Interaction.DragDropMode := TTMSFNCTreeViewDragDropMode(i);\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTableViewInteraction.SetFiltering(const Value: TTMSFNCTableViewFiltering);\r\nbegin\r\n FFiltering.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCTableViewInteraction.SetLookup(const Value: TTMSFNCTableViewLookup);\r\nbegin\r\n FLookup.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCTableViewInteraction.SetMultiSelect(const Value: Boolean);\r\nbegin\r\n if Assigned(FTableView) and Assigned(FTableView.FTreeView) then\r\n FTableView.FTreeView.Interaction.MultiSelect := Value;\r\nend;\r\n\r\nprocedure TTMSFNCTableViewInteraction.SetReorder(const Value: Boolean);\r\nbegin\r\n if Assigned(FTableView) and Assigned(FTableView.FTreeView) then\r\n FTableView.FTreeView.Interaction.Reorder := Value;\r\nend;\r\n\r\nprocedure TTMSFNCTableViewInteraction.SetSorting(const Value: TTMSFNCTableViewSorting);\r\nbegin\r\n if Assigned(FTableView) and Assigned(FTableView.FTreeView) and (FTableView.FTreeView.Columns.Count > 0) then\r\n begin\r\n case Value of\r\n tvcsNone: FTableView.FTreeView.Columns[0].Sorting := tcsNone;\r\n tvcsNormal: FTableView.FTreeView.Columns[0].Sorting := tcsNormal;\r\n tvcsNormalCaseSensitive: FTableView.FTreeView.Columns[0].Sorting := tcsNormalCaseSensitive;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTableViewInteraction.SetTouchScrolling(const Value: Boolean);\r\nbegin\r\n if Assigned(FTableView) and Assigned(FTableView.FTreeView) then\r\n FTableView.FTreeView.Interaction.TouchScrolling := Value;\r\nend;\r\n\r\n{ TTMSFNCTableViewLookup }\r\n\r\nprocedure TTMSFNCTableViewLookup.Assign(Source: TPersistent);\r\nbegin\r\n if Source is TTMSFNCTableViewLookup then\r\n begin\r\n CaseSensitive := (Source as TTMSFNCTableViewLookup).CaseSensitive;\r\n Enabled := (Source as TTMSFNCTableViewLookup).Enabled;\r\n Incremental := (Source as TTMSFNCTableViewLookup).Incremental;\r\n AutoSelect := (Source as TTMSFNCTableViewLookup).AutoSelect;\r\n end;\r\nend;\r\n\r\nconstructor TTMSFNCTableViewLookup.Create(AOwner: TTMSFNCTableViewInteraction);\r\nbegin\r\n FOwner := AOwner;\r\nend;\r\n\r\nfunction TTMSFNCTableViewLookup.GetAutoSelect: Boolean;\r\nbegin\r\n Result := False;\r\n if Assigned(FOwner) and Assigned(FOwner.FTableView) and Assigned(FOwner.FTableView.FTreeView) then\r\n Result := FOwner.FTableView.FTreeView.Interaction.Lookup.AutoSelect;\r\nend;\r\n\r\nfunction TTMSFNCTableViewLookup.GetCaseSensitive: Boolean;\r\nbegin\r\n Result := False;\r\n if Assigned(FOwner) and Assigned(FOwner.FTableView) and Assigned(FOwner.FTableView.FTreeView) then\r\n Result := FOwner.FTableView.FTreeView.Interaction.Lookup.CaseSensitive;\r\nend;\r\n\r\nfunction TTMSFNCTableViewLookup.GetEnabled: Boolean;\r\nbegin\r\n Result := False;\r\n if Assigned(FOwner) and Assigned(FOwner.FTableView) and Assigned(FOwner.FTableView.FTreeView) then\r\n Result := FOwner.FTableView.FTreeView.Interaction.Lookup.Enabled;\r\nend;\r\n\r\nfunction TTMSFNCTableViewLookup.GetIncremental: Boolean;\r\nbegin\r\n Result := False;\r\n if Assigned(FOwner) and Assigned(FOwner.FTableView) and Assigned(FOwner.FTableView.FTreeView) then\r\n Result := FOwner.FTableView.FTreeView.Interaction.Lookup.Incremental;\r\nend;\r\n\r\nprocedure TTMSFNCTableViewLookup.SetAutoSelect(const Value: Boolean);\r\nbegin\r\n if Assigned(FOwner) and Assigned(FOwner.FTableView) and Assigned(FOwner.FTableView.FTreeView) then\r\n FOwner.FTableView.FTreeView.Interaction.Lookup.AutoSelect := Value;\r\nend;\r\n\r\nprocedure TTMSFNCTableViewLookup.SetCaseSensitive(const Value: Boolean);\r\nbegin\r\n if Assigned(FOwner) and Assigned(FOwner.FTableView) and Assigned(FOwner.FTableView.FTreeView) then\r\n FOwner.FTableView.FTreeView.Interaction.Lookup.CaseSensitive := Value;\r\nend;\r\n\r\nprocedure TTMSFNCTableViewLookup.SetEnabled(const Value: Boolean);\r\nbegin\r\n if Assigned(FOwner) and Assigned(FOwner.FTableView) and Assigned(FOwner.FTableView.FTreeView) then\r\n FOwner.FTableView.FTreeView.Interaction.Lookup.Enabled := Value;\r\nend;\r\n\r\nprocedure TTMSFNCTableViewLookup.SetIncremental(const Value: Boolean);\r\nbegin\r\n if Assigned(FOwner) and Assigned(FOwner.FTableView) and Assigned(FOwner.FTableView.FTreeView) then\r\n FOwner.FTableView.FTreeView.Interaction.Lookup.Incremental := Value;\r\nend;\r\n\r\n{ TTMSFNCTableViewFiltering }\r\n\r\nprocedure TTMSFNCTableViewFiltering.Assign(Source: TPersistent);\r\nbegin\r\n if Source is TTMSFNCTableViewFiltering then\r\n begin\r\n Enabled := (Source as TTMSFNCTableViewFiltering).Enabled;\r\n DropDownWidth := (Source as TTMSFNCTableViewFiltering).DropDownWidth;\r\n DropDownHeight := (Source as TTMSFNCTableViewFiltering).DropDownHeight;\r\n end;\r\nend;\r\n\r\nconstructor TTMSFNCTableViewFiltering.Create(AOwner: TTMSFNCTableViewInteraction);\r\nbegin\r\n FOwner := AOwner;\r\nend;\r\n\r\nfunction TTMSFNCTableViewFiltering.GetDropDownHeight: integer;\r\nbegin\r\n Result := 120;\r\n if Assigned(FOwner) and Assigned(FOwner.FTableView) and Assigned(FOwner.FTableView.FTreeView) and (FOwner.FTableView.FTreeView.Columns.Count > 0) then\r\n Result := FOwner.FTableView.FTreeView.Columns[0].Filtering.DropDownHeight;\r\nend;\r\n\r\nfunction TTMSFNCTableViewFiltering.GetDropDownWidth: integer;\r\nbegin\r\n Result := 100;\r\n if Assigned(FOwner) and Assigned(FOwner.FTableView) and Assigned(FOwner.FTableView.FTreeView) and (FOwner.FTableView.FTreeView.Columns.Count > 0) then\r\n Result := FOwner.FTableView.FTreeView.Columns[0].Filtering.DropDownWidth;\r\nend;\r\n\r\nfunction TTMSFNCTableViewFiltering.GetEnabled: Boolean;\r\nbegin\r\n Result := False;\r\n if Assigned(FOwner) and Assigned(FOwner.FTableView) and Assigned(FOwner.FTableView.FTreeView) and (FOwner.FTableView.FTreeView.Columns.Count > 0) then\r\n Result := FOwner.FTableView.FTreeView.Columns[0].Filtering.Enabled;\r\nend;\r\n\r\nprocedure TTMSFNCTableViewFiltering.SetDropDownHeight(const Value: integer);\r\nbegin\r\n if Assigned(FOwner) and Assigned(FOwner.FTableView) and Assigned(FOwner.FTableView.FTreeView) and (FOwner.FTableView.FTreeView.Columns.Count > 0) then\r\n FOwner.FTableView.FTreeView.Columns[0].Filtering.DropDownHeight := Value;\r\nend;\r\n\r\nprocedure TTMSFNCTableViewFiltering.SetDropDownWidth(const Value: integer);\r\nbegin\r\n if Assigned(FOwner) and Assigned(FOwner.FTableView) and Assigned(FOwner.FTableView.FTreeView) and (FOwner.FTableView.FTreeView.Columns.Count > 0) then\r\n FOwner.FTableView.FTreeView.Columns[0].Filtering.DropDownWidth := Value;\r\nend;\r\n\r\nprocedure TTMSFNCTableViewFiltering.SetEnabled(const Value: Boolean);\r\nbegin\r\n if Assigned(FOwner) and Assigned(FOwner.FTableView) and Assigned(FOwner.FTableView.FTreeView) and (FOwner.FTableView.FTreeView.Columns.Count > 0) then\r\n FOwner.FTableView.FTreeView.Columns[0].Filtering.Enabled := Value;\r\nend;\r\n\r\n{ TTMSFNCTableViewHeaderFooter }\r\n\r\nprocedure TTMSFNCTableViewHeaderFooter.Assign(Source: TPersistent);\r\nbegin\r\n if Source is TTMSFNCTableViewHeaderFooter then\r\n begin\r\n Visible := (Source as TTMSFNCTableViewHeaderFooter).Visible;\r\n Text := (Source as TTMSFNCTableViewHeaderFooter).Text;\r\n Fill.Assign((Source as TTMSFNCTableViewHeaderFooter).Fill);\r\n Font.Assign((Source as TTMSFNCTableViewHeaderFooter).Font);\r\n Stroke.Assign((Source as TTMSFNCTableViewHeaderFooter).Stroke);\r\n HorizontalTextAlign := (Source as TTMSFNCTableViewHeaderFooter).HorizontalTextAlign;\r\n VerticalTextAlign := (Source as TTMSFNCTableViewHeaderFooter).VerticalTextAlign;\r\n WordWrapping := (Source as TTMSFNCTableViewHeaderFooter).WordWrapping;\r\n Trimming := (Source as TTMSFNCTableViewHeaderFooter).Trimming;\r\n Height := (Source as TTMSFNCTableViewHeaderFooter).Height;\r\n SortIndicatorColor := (Source as TTMSFNCTableViewHeaderFooter).SortIndicatorColor;\r\n end;\r\nend;\r\n\r\nconstructor TTMSFNCTableViewHeaderFooter.Create(ATableView: TTMSFNCCustomTableView);\r\nbegin\r\n FTableView := ATableView;\r\n if Assigned(FTableView) and FTableView.IsDesignTime and not (csReading in FTableView.Componentstate) then\r\n begin\r\n if Self is TTMSFNCTableViewHeader then\r\n FText := 'Header'\r\n else\r\n FText := 'Footer';\r\n\r\n Fill.Color := MakeGraphicsColor(249, 249, 249);\r\n Fill.Kind := gfkSolid;\r\n Stroke.Color := MakeGraphicsColor(178, 178, 178);\r\n Stroke.Kind := gskSolid;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCTableViewHeaderFooter.GetFill: TTMSFNCGraphicsFill;\r\nbegin\r\n Result := nil;\r\n if Assigned(FTableView) and Assigned(FTableView.FTreeView) then\r\n begin\r\n if Self is TTMSFNCTableViewHeader then\r\n Result := FTableView.FTreeView.ColumnsAppearance.TopFill\r\n else\r\n Result := FTableView.FTreeView.ColumnsAppearance.BottomFill\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCTableViewHeaderFooter.GetFont: TTMSFNCGraphicsFont;\r\nbegin\r\n Result := nil;\r\n if Assigned(FTableView) and Assigned(FTableView.FTreeView) then\r\n begin\r\n if Self is TTMSFNCTableViewHeader then\r\n Result := FTableView.FTreeView.ColumnsAppearance.TopFont\r\n else\r\n Result := FTableView.FTreeView.ColumnsAppearance.BottomFont\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCTableViewHeaderFooter.GetHeight: Single;\r\nbegin\r\n Result := 30;\r\n if Assigned(FTableView) and Assigned(FTableView.FTreeView) then\r\n begin\r\n if Self is TTMSFNCTableViewHeader then\r\n Result := FTableView.FTreeView.ColumnsAppearance.TopSize\r\n else\r\n Result := FTableView.FTreeView.ColumnsAppearance.BottomSize\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCTableViewHeaderFooter.GetSortIndicatorColor: TTMSFNCGraphicsColor;\r\nbegin\r\n Result := TTMSFNCTreeViewColorSelection;\r\n if Assigned(FTableView) and Assigned(FTableView.FTreeView) then\r\n Result := FTableView.FTreeView.ColumnsAppearance.SortIndicatorColor;\r\nend;\r\n\r\nfunction TTMSFNCTableViewHeaderFooter.GetStroke: TTMSFNCGraphicsStroke;\r\nbegin\r\n Result := nil;\r\n if Assigned(FTableView) and Assigned(FTableView.FTreeView) then\r\n begin\r\n if Self is TTMSFNCTableViewHeader then\r\n Result := FTableView.FTreeView.ColumnsAppearance.TopStroke\r\n else\r\n Result := FTableView.FTreeView.ColumnsAppearance.BottomStroke\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCTableViewHeaderFooter.GetVisible: Boolean;\r\nbegin\r\n Result := False;\r\n if Assigned(FTableView) and Assigned(FTableView.FTreeView) then\r\n begin\r\n if Self is TTMSFNCTableViewHeader then\r\n Result := tclTop in FTableView.FTreeView.ColumnsAppearance.Layouts\r\n else\r\n Result := tclBottom in FTableView.FTreeView.ColumnsAppearance.Layouts;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTableViewHeaderFooter.SetFill(const Value: TTMSFNCGraphicsFill);\r\nbegin\r\n if Assigned(FTableView) and Assigned(FTableView.FTreeView) then\r\n begin\r\n if Self is TTMSFNCTableViewHeader then\r\n FTableView.FTreeView.ColumnsAppearance.TopFill.Assign(Value)\r\n else\r\n FTableView.FTreeView.ColumnsAppearance.BottomFill.Assign(Value);\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTableViewHeaderFooter.SetFont(const Value: TTMSFNCGraphicsFont);\r\nbegin\r\n if Assigned(FTableView) and Assigned(FTableView.FTreeView) then\r\n begin\r\n if Self is TTMSFNCTableViewHeader then\r\n FTableView.FTreeView.ColumnsAppearance.TopFill.Assign(Value)\r\n else\r\n FTableView.FTreeView.ColumnsAppearance.BottomFill.Assign(Value);\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTableViewHeaderFooter.SetHorizontalTextAlign(const Value: TTMSFNCGraphicsTextAlign);\r\nbegin\r\n if FHorizontalTextAlign <> Value then\r\n begin\r\n FHorizontalTextAlign := Value;\r\n if Assigned(FTableView) and Assigned(FTableView.FTreeView) then\r\n FTableView.FTreeView.Invalidate;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTableViewHeaderFooter.SetHeight(const Value: Single);\r\nbegin\r\n if Assigned(FTableView) and Assigned(FTableView.FTreeView) then\r\n begin\r\n if Self is TTMSFNCTableViewHeader then\r\n FTableView.FTreeView.ColumnsAppearance.TopSize := Value\r\n else\r\n FTableView.FTreeView.ColumnsAppearance.BottomSize := Value;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTableViewHeaderFooter.SetSortIndicatorColor(\r\n const Value: TTMSFNCGraphicsColor);\r\nbegin\r\n if Assigned(FTableView) and Assigned(FTableView.FTreeView) then\r\n FTableView.FTreeView.ColumnsAppearance.SortIndicatorColor := Value;\r\nend;\r\n\r\nprocedure TTMSFNCTableViewHeaderFooter.SetStroke(const Value: TTMSFNCGraphicsStroke);\r\nbegin\r\n if Assigned(FTableView) and Assigned(FTableView.FTreeView) then\r\n FTableView.FTreeView.ColumnsAppearance.TopStroke.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCTableViewHeaderFooter.SetText(const Value: String);\r\nbegin\r\n if FText <> Value then\r\n begin\r\n FText := Value;\r\n if Assigned(FTableView) and Assigned(FTableView.FTreeView) then\r\n FTableView.FTreeView.Invalidate;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTableViewHeaderFooter.SetTrimming(const Value: TTMSFNCGraphicsTextTrimming);\r\nbegin\r\n if FTrimming <> Value then\r\n begin\r\n FTrimming := Value;\r\n if Assigned(FTableView) and Assigned(FTableView.FTreeView) then\r\n FTableView.FTreeView.Invalidate;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTableViewHeaderFooter.SetVerticalTextAlign(const Value: TTMSFNCGraphicsTextAlign);\r\nbegin\r\n if FVerticalTextAlign <> Value then\r\n begin\r\n FVerticalTextAlign := Value;\r\n if Assigned(FTableView) and Assigned(FTableView.FTreeView) then\r\n FTableView.FTreeView.Invalidate;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTableViewHeaderFooter.SetVisible(const Value: Boolean);\r\nbegin\r\n if Assigned(FTableView) and Assigned(FTableView.FTreeView) then\r\n begin\r\n if Self is TTMSFNCTableViewHeader then\r\n begin\r\n if Value then\r\n FTableView.FTreeView.ColumnsAppearance.Layouts := FTableView.FTreeView.ColumnsAppearance.Layouts + [tclTop]\r\n else\r\n FTableView.FTreeView.ColumnsAppearance.Layouts := FTableView.FTreeView.ColumnsAppearance.Layouts - [tclTop];\r\n end\r\n else\r\n begin\r\n if Value then\r\n FTableView.FTreeView.ColumnsAppearance.Layouts := FTableView.FTreeView.ColumnsAppearance.Layouts + [tclBottom]\r\n else\r\n FTableView.FTreeView.ColumnsAppearance.Layouts := FTableView.FTreeView.ColumnsAppearance.Layouts - [tclBottom];\r\n end;\r\n\r\n FTableView.UpdateTableView;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTableViewHeaderFooter.SetWordWrapping(const Value: Boolean);\r\nbegin\r\n if FWordWrapping <> Value then\r\n begin\r\n FWordWrapping := Value;\r\n if Assigned(FTableView) and Assigned(FTableView.FTreeView) then\r\n FTableView.FTreeView.Invalidate;\r\n end;\r\nend;\r\n\r\n{ TTMSFNCTableViewFilterData }\r\n\r\nprocedure TTMSFNCTableViewFilterData.Assign(Source: TPersistent);\r\nvar\r\n ASrcFilterData: TTMSFNCTableViewFilterData;\r\nbegin\r\n ASrcFilterData := Source as TTMSFNCTableViewFilterData;\r\n if Assigned(ASrcFilterData) then\r\n begin\r\n FCondition := ASrcFilterData.Condition;\r\n FCaseSensitive := ASrcFilterData.CaseSensitive;\r\n FPrefix := ASrcFilterData.Prefix;\r\n FSuffix := ASrcFilterData.Suffix;\r\n FOperation := ASrcFilterData.Operation;\r\n end;\r\nend;\r\n\r\nconstructor TTMSFNCTableViewFilterData.Create(ACollection: TCollection);\r\nbegin\r\n inherited;\r\n FCaseSensitive := True;\r\nend;\r\n\r\n{ TTMSFNCTableViewFilter }\r\n\r\nfunction TTMSFNCTableViewFilter.Add: TTMSFNCTableViewFilterData;\r\nbegin\r\n Result := TTMSFNCTableViewFilterData(inherited Add);\r\n if Count = 1 then\r\n Result.Operation := tvfoNone\r\n else\r\n Result.Operation := tvfoAND;\r\nend;\r\n\r\nconstructor TTMSFNCTableViewFilter.Create(AOwner: TTMSFNCCustomTableView);\r\nbegin\r\n inherited Create(AOwner, TTMSFNCTableViewFilterData);\r\n FOwner := AOwner;\r\nend;\r\n\r\nfunction TTMSFNCTableViewFilter.GetItem(Index: Integer): TTMSFNCTableViewFilterData;\r\nbegin\r\n Result := TTMSFNCTableViewFilterData(inherited GetItem(Index));\r\nend;\r\n\r\nfunction TTMSFNCTableViewFilter.Insert(index: Integer): TTMSFNCTableViewFilterData;\r\nbegin\r\n Result := TTMSFNCTableViewFilterData(inherited Insert(Index));\r\nend;\r\n\r\nprocedure TTMSFNCTableViewFilter.SetItem(Index: Integer; const Value: TTMSFNCTableViewFilterData);\r\nbegin\r\n inherited SetItem(Index, Value);\r\nend;\r\n\r\n{ TTMSFNCTableView }\r\n\r\nprocedure TTMSFNCTableView.RegisterRuntimeClasses;\r\nbegin\r\n inherited;\r\n RegisterClasses([TTMSFNCTableView, TTMSFNCTableViewItem]);\r\nend;\r\n\r\n{ TTMSFNCTreeViewTableView }\r\n\r\nprocedure TTMSFNCTreeViewTableView.AnimateTimerChanged(Sender: TObject);\r\nvar\r\n d, pos: Double;\r\n anim: Boolean;\r\nbegin\r\n if FAnimateMoreOptions or FAnimateMoreOptionsClose then\r\n begin\r\n pos := FMoreOffset;\r\n if Interaction.AnimationFactor > 0 then\r\n begin\r\n d := Abs(FMoreOffsetTo - pos) / Interaction.AnimationFactor;\r\n anim := AnimateDouble(pos, FMoreOffsetTo, d, 0.01)\r\n end\r\n else\r\n anim := False;\r\n\r\n if anim then\r\n FMoreOffset := pos\r\n else\r\n begin\r\n FMoreOffset := FMoreOffsetTo;\r\n FAnimTimer.Enabled := False;\r\n if FAnimateMoreOptionsClose then\r\n begin\r\n FMoreOffsetItem := nil;\r\n FAnimateMoreOptionsClose := False;\r\n end;\r\n end;\r\n\r\n if Assigned(FTableView) then\r\n FTableView.UpdateTableView(True);\r\n end\r\n else\r\n begin\r\n if FDownTimer then\r\n begin\r\n Inc(FDownCount);\r\n if FDownCount = DOWNCOUNT + 50 then\r\n begin\r\n FDownAction := True;\r\n FAnimTimer.Enabled := False;\r\n if Assigned(FTableView) then\r\n FTableView.ToggleEditMode;\r\n end;\r\n end\r\n else\r\n begin\r\n FAnimShiftAngle := FAnimShiftAngle + 5;\r\n if FAnimShiftAngle = 360 then\r\n FAnimShiftAngle := 0;\r\n\r\n if not FAnimMarqueeSwitch then\r\n FAnimMarqueeSweepAngle := FAnimMarqueeSweepAngle + 10\r\n else\r\n begin\r\n FAnimMarqueeStartAngle := FAnimMarqueeStartAngle + 10;\r\n FAnimMarqueeSweepAngle := FAnimMarqueeSweepAngle - 10;\r\n end;\r\n\r\n if (FAnimMarqueeSweepAngle = 360) and (FAnimMarqueeStartAngle = 0) then\r\n FAnimMarqueeSwitch := True\r\n else if ((FAnimMarqueeStartAngle = 360) and (FAnimMarqueeSweepAngle = 0)) then\r\n begin\r\n FAnimMarqueeSwitch := False;\r\n FAnimMarqueeStartAngle := 0;\r\n end;\r\n\r\n Invalidate;\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCTreeViewTableView.CanApplyVerticalOffset: Boolean;\r\nbegin\r\n Result := False;\r\n if Assigned(FTableView) and Assigned(FTableView.Interaction) then\r\n Result := FTableView.Interaction.SwipeBounceGesture;\r\nend;\r\n\r\nconstructor TTMSFNCTreeViewTableView.Create(AOwner: TComponent);\r\nbegin\r\n inherited;\r\n FAnimMarqueeStartAngle := 0;\r\n FManualProgressSweepAngle := 0;\r\n FManualProgressStartAngle := 0;\r\n FAnimMarqueeSweepAngle := 0;\r\n FMoreOffset := 0;\r\n FMoreOffsetTo := 0;\r\n FAnimMarqueeSwitch := False;\r\n FFloatingNodes := TTMSFNCTreeViewTableViewFloatingNodes.Create;\r\n FAnimTimer := TTimer.Create(Self);\r\n FAnimTimer.Enabled := False;\r\n FAnimTimer.Interval := 1;\r\n FAnimTimer.OnTimer := AnimateTimerChanged;\r\nend;\r\n\r\ndestructor TTMSFNCTreeViewTableView.Destroy;\r\nbegin\r\n FAnimTimer.Free;\r\n FFloatingNodes.Free;\r\n inherited;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewTableView.DoFooterAnchorClick(AAnchor: String);\r\nbegin\r\n if Assigned(OnFooterAnchorClick) then\r\n OnFooterAnchorClick(Self, AAnchor)\r\n else if Interaction.AutoOpenURL then\r\n TTMSFNCUtils.OpenURL(AAnchor);\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewTableView.DoGetNodeRounding(\r\n ANode: TTMSFNCTreeViewVirtualNode; var ARounding: Integer;\r\n var ACorners: TTMSFNCGraphicsCorners);\r\nvar\r\n I: Integer;\r\n itm, itmP: TTMSFNCTableViewItem;\r\nbegin\r\n inherited;\r\n if Assigned(FTableView) and (FTableView.LayoutMode = tvlmGroup) then\r\n begin\r\n ARounding := FTableView.GroupAppearance.Rounding;\r\n ACorners := [gcTopLeft, gcTopRight, gcBottomLeft, gcBottomRight];\r\n I := FTableView.GetItemIndexForNode(ANode);\r\n itm := FTableView.GetItemForNode(ANode);\r\n if Assigned(itm) then\r\n begin\r\n if (I - 1 >= 0) and (I - 1 <= FTableView.Items.Count - 1) then\r\n begin\r\n //top\r\n itmP := FTableView.Items[I - 1];\r\n if (itmP.GroupIndex = itm.GroupIndex) and not FTableView.ItemFromDifferentCategory(itmP, itm) then\r\n ACorners := ACorners - [gcTopLeft, gcTopRight];\r\n end;\r\n\r\n if (I + 1 >= 0) and (I + 1 <= FTableView.Items.Count - 1) then\r\n begin\r\n //bottom\r\n itmP := FTableView.Items[I + 1];\r\n if (itmP.GroupIndex = itm.GroupIndex) and not FTableView.ItemFromDifferentCategory(itmP, itm) then\r\n ACorners := ACorners - [gcBottomLeft, gcBottomRight];\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewTableView.DoHeaderAnchorClick(AAnchor: String);\r\nbegin\r\n if Assigned(OnHeaderAnchorClick) then\r\n OnHeaderAnchorClick(Self, AAnchor)\r\n else if Interaction.AutoOpenURL then\r\n TTMSFNCUtils.OpenURL(AAnchor);\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewTableView.Draw(AGraphics: TTMSFNCGraphics;\r\n ARect: TRectF);\r\nbegin\r\n inherited;\r\n DrawLookupBar(AGraphics, ARect);\r\n DrawReload(AGraphics, ARect);\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewTableView.DrawLookupBar(AGraphics: TTMSFNCGraphics;\r\n ARect: TRectF);\r\nvar\r\n I: Integer;\r\n ldp: TTMSFNCTableViewLookupBarDisplayItem;\r\n cr: TRectF;\r\nbegin\r\n if Assigned(FTableView) and (FTableView.LookupBar.Visible and (FTableView.CategoryType <> tvctNone)) then\r\n begin\r\n cr := GetLookupBarRect;\r\n if FMouseDownOnLookupBar then\r\n begin\r\n AGraphics.Fill.Assign(FTableView.LookupBar.DownFill);\r\n AGraphics.Stroke.Assign(FTableView.LookupBar.DownStroke);\r\n end\r\n else\r\n begin\r\n AGraphics.Fill.Assign(FTableView.LookupBar.Fill);\r\n AGraphics.Stroke.Assign(FTableView.LookupBar.Stroke);\r\n end;\r\n\r\n AGraphics.DrawRectangle(cr);\r\n\r\n for I := 0 to FTableView.FLookupBarDisplayList.Count - 1 do\r\n begin\r\n ldp := FTableView.FLookupBarDisplayList[I];\r\n if ldp.Active then\r\n AGraphics.Font.Assign(FTableView.LookupBar.Font)\r\n else\r\n AGraphics.Font.Assign(FTableView.LookupBar.InActiveFont);\r\n AGraphics.DrawText(ldp.Rect, ldp.Text, False, gtaCenter, gtaCenter);\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewTableView.DrawReload(AGraphics: TTMSFNCGraphics;\r\n ARect: TRectF);\r\nvar\r\n r: TRectF;\r\n sz: Single;\r\nbegin\r\n if Assigned(FTableView) and FTableView.Reload.Enabled and FReloadActive then\r\n begin\r\n r := GetNodesRect;\r\n sz := FTableView.Reload.Size;\r\n r := RectF(r.Left + ((r.Right - r.Left) - sz) / 2, r.Top + (FTableView.Reload.Offset - sz) / 2, r.Left + ((r.Right - r.Left) - sz) / 2 + sz, r.Top + (FTableView.Reload.Offset - sz) / 2 + sz);\r\n AGraphics.Stroke.Assign(FTableView.Reload.Stroke);\r\n case FTableView.Reload.ProgressMode of\r\n tvrpmMarquee: AGraphics.DrawArc(CenterPointEx(r), PointF((r.Right - r.Left) / 2, (r.Bottom - r.Top) / 2), FAnimMarqueeStartAngle, FAnimMarqueeSweepAngle);\r\n tvrpmMarqueeAlternate: AGraphics.DrawArc(CenterPointEx(r), PointF((r.Right - r.Left) / 2, (r.Bottom - r.Top) / 2), FAnimShiftAngle + FAnimMarqueeStartAngle, FAnimMarqueeSweepAngle);\r\n tvrpmManual: AGraphics.DrawArc(CenterPointEx(r), PointF((r.Right - r.Left) / 2, (r.Bottom - r.Top) / 2), FManualProgressStartAngle, FManualProgressSweepAngle);\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewTableView.CustomizeNodeCache(\r\n AGraphics: TTMSFNCGraphics; AStartY: Single);\r\nvar\r\n n: TTMSFNCTreeViewVirtualNode;\r\n s: Single;\r\n dp: Integer;\r\nbegin\r\n inherited;\r\n if Assigned(FTableView) and (FTableView.FUpdateCount = 0) and (FTableView.CategoryType <> tvctNone) then\r\n begin\r\n dp := FTableView.GetDisplayCategoryIndex(StartRow);\r\n if (dp > -1) then\r\n begin\r\n FFloatingNodes.Clear;\r\n n := TTMSFNCTreeViewVirtualNode.Create(Self);\r\n n.CopyFrom(GetNodeForRow(dp));\r\n s := 0;\r\n ConfigureNode(AGraphics, 0, n, s);\r\n if FTableView.CategoryAppearance.Floating then\r\n FFloatingNodes.Add(n);\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewTableView.CustomizeScrollPosition(\r\n ANode: TTMSFNCTreeViewVirtualNode; var APosition, ATopPosition: Double);\r\nbegin\r\n inherited;\r\n if (FFloatingNodes.Count > 0) and not ANode.Extended {and (CompareValue(APosition, GetVerticalScrollPosition) = LessThanValue)} then\r\n begin\r\n APosition := APosition - FFloatingNodes[0].Height;\r\n ATopPosition := ATopPosition - FFloatingNodes[0].Height;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCTreeViewTableView.GetCategoryAtXY(X, Y: Single): Integer;\r\nvar\r\n i, s: Integer;\r\n r: TRectF;\r\n str: String;\r\n ypos: Single;\r\n g: TTMSFNCGraphics;\r\n cr: TRectF;\r\nbegin\r\n Result := -1;\r\n\r\n if not Assigned(FTableView) then\r\n Exit;\r\n\r\n g := TTMSFNCGraphics.CreateBitmapCanvas;\r\n g.BeginScene;\r\n try\r\n g.Font.Assign(FTableView.LookupBar.Font);\r\n s := FTableView.Categories.Count - 1;\r\n cr := GetLookupBarRect;\r\n ypos := cr.Top + 3;\r\n for I := 0 to s do\r\n begin\r\n str := FTableView.Categories[I].LookupText;\r\n r.Left := cr.Left;\r\n r.Right := cr.Right;\r\n r.Top := ypos;\r\n r.Bottom := r.Top + g.CalculateTextHeight(str);\r\n ypos := ypos + (r.Bottom - r.Top) + 3;\r\n\r\n if PtInRectEx(r, PointF(X, Y)) then\r\n begin\r\n Result := I;\r\n Break;\r\n end;\r\n end;\r\n finally\r\n g.EndScene;\r\n g.Free;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCTreeViewTableView.GetColumnWidth(AColumn: Integer): Double;\r\nbegin\r\n Result := inherited GetColumnWidth(AColumn);\r\n if Assigned(FTableView) and (FTableView.LookupBar.Visible and (FTableView.CategoryType <> tvctNone)) then\r\n Result := Result - FTableView.LookupBar.Width;\r\nend;\r\n\r\nfunction TTMSFNCTreeViewTableView.GetContentClipRect: TRectF;\r\nbegin\r\n Result := GetContentRect;\r\n Result.Left := Result.Left + 1;\r\n Result.Right := Result.Right - 1;\r\nend;\r\n\r\nfunction TTMSFNCTreeViewTableView.GetContentRect: TRectF;\r\nbegin\r\n Result := inherited GetContentRect;\r\n if Assigned(FTableView) and FTableView.FFilterActive then\r\n Result.Top := Result.Top + FTableView.FEdit.Height;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewTableView.GetNodeMargins(var ALeft, ATop, ARight,\r\n ABottom: Single);\r\nbegin\r\n inherited;\r\n if Assigned(FTableView) and (FTableView.LayoutMode = tvlmGroup) then\r\n begin\r\n ARight := ARight + FTableView.GroupAppearance.Margins.Right;\r\n ALeft := ALeft + FTableView.GroupAppearance.Margins.Left;\r\n ATop := ATop + FTableView.GroupAppearance.Margins.Top;\r\n ABottom := ABottom + FTableView.GroupAppearance.Margins.Bottom;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCTreeViewTableView.GetNodesRect: TRectF;\r\nvar\r\n d: Double;\r\nbegin\r\n Result := inherited GetNodesRect;\r\n if Assigned(FTableView) then\r\n begin\r\n d := (Result.Right - Result.Left) - FTableView.FDetailControlOffset;\r\n if (FTableView.LookupBar.Visible and (FTableView.CategoryType <> tvctNone)) then\r\n begin\r\n case FTableView.LookupBar.Position of\r\n tvlbpLeft:\r\n begin\r\n Result.Left := Result.Left + FTableView.LookupBar.Width - 1;\r\n Result.Right := Result.Right - FTableView.LookupBar.Width - 1;\r\n end;\r\n tvlbpRight: Result.Right := Result.Right - FTableView.LookupBar.Width;\r\n end;\r\n end;\r\n\r\n Result.Left := Result.Left - d;\r\n Result.Right := Result.Right - d;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCTreeViewTableView.GetNodesSpacing(ANode: TTMSFNCTreeViewVirtualNode): Single;\r\nvar\r\n I: Integer;\r\n itm, itmP: TTMSFNCTableViewItem;\r\n s: Single;\r\nbegin\r\n s := inherited GetNodesSpacing(ANode);\r\n if Assigned(FTableView) and (FTableView.LayoutMode = tvlmGroup) then\r\n begin\r\n I := FTableView.GetItemIndexForNode(ANode);\r\n itm := FTableView.GetItemForNode(ANode);\r\n if Assigned(itm) then\r\n begin\r\n if (I + 1 >= 0) and (I + 1 <= FTableView.Items.Count - 1) then\r\n begin\r\n itmP := FTableView.Items[I + 1];\r\n if (itmP.GroupIndex <> itm.GroupIndex) and not FTableView.ItemFromDifferentCategory(itmP, itm) then\r\n s := s + FTableView.GroupAppearance.Margins.Top + FTableView.GroupAppearance.Margins.Bottom;\r\n end;\r\n end;\r\n end;\r\n Result := s;\r\nend;\r\n\r\nfunction TTMSFNCTreeViewTableView.GetReloadOffset: Single;\r\nbegin\r\n Result := inherited GetReloadOffset;\r\n if Assigned(FTableView) then\r\n begin\r\n if FTableView.Reload.Enabled then\r\n Result := Result + FTableView.Reload.Offset;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCTreeViewTableView.GetTotalColumnNodeWidth: Double;\r\nbegin\r\n Result := inherited GetTotalColumnNodeWidth;\r\n if Assigned(FTableView) and (FTableView.LookupBar.Visible and (FTableView.CategoryType <> tvctNone)) then\r\n Result := Result - FTableView.LookupBar.Width;\r\nend;\r\n\r\nfunction TTMSFNCTreeViewTableView.GetVScrollOffset: Single;\r\nbegin\r\n Result := inherited GetVScrollOffset;\r\n if Assigned(FTableView) and (FTableView.LayoutMode = tvlmGroup) then\r\n Result := FTableView.GroupAppearance.Margins.Top;\r\nend;\r\n\r\nfunction TTMSFNCTreeViewTableView.GetLookupBarRect: TRectF;\r\nvar\r\n sz: Single;\r\n d: Single;\r\nbegin\r\n Result := EmptyRect;\r\n if Assigned(FTableView) and (FTableView.LookupBar.Visible and (FTableView.CategoryType <> tvctNone)) then\r\n begin\r\n sz := FTableView.LookupBar.Width;\r\n Result := GetContentRect;\r\n d := (Result.Right - Result.Left) - FTableView.FDetailControlOffset;\r\n case FTableView.LookupBar.Position of\r\n tvlbpLeft:\r\n begin\r\n Result.Right := Result.Left + sz;\r\n Result.Left := Result.Left + 1;\r\n Result.Top := Result.Top + 1;\r\n Result.Bottom := Result.Bottom - 1;\r\n end;\r\n tvlbpRight:\r\n begin\r\n Result.Left := Result.Right - sz;\r\n Result.Top := Result.Top + 1;\r\n Result.Bottom := Result.Bottom - 1;\r\n Result.Right := Result.Right - 1;\r\n end;\r\n end;\r\n\r\n Result.Left := Result.Left - d;\r\n Result.Right := Result.Right - d;\r\n end;\r\nend;\r\n\r\n{$IFDEF FMXLIB}\r\nprocedure TTMSFNCTableViewEdit.KeyDown(var Key: Word; var KeyChar: WideChar; Shift: TShiftState);\r\n{$ENDIF}\r\n{$IFDEF CMNWEBLIB}\r\nprocedure TTMSFNCTableViewEdit.KeyDown(var Key: Word; Shift: TShiftState);\r\n{$ENDIF}\r\nbegin\r\n inherited;\r\n if not Assigned(FTableView) then\r\n Exit;\r\n\r\n if (Key in [KEY_ESCAPE]) and FTableView.FFilterActive then\r\n begin\r\n case FTableView.Interaction.KeyboardEscapeMode of\r\n tvkeNone: ;\r\n tvkeClearEdit:\r\n begin\r\n FTableView.FFilterActive := False;\r\n FTableView.StartFiltering;\r\n end;\r\n tvkeStopFilter: FTableView.StopFiltering;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewTableView.HandleKeyDown(var Key: Word;\r\n Shift: TShiftState);\r\nbegin\r\n inherited;\r\n if BlockUserInput or not Assigned(FTableView) then\r\n Exit;\r\n\r\n if (Key in [KEY_ESCAPE]) and FTableView.FFilterActive then\r\n begin\r\n case FTableView.Interaction.KeyboardEscapeMode of\r\n tvkeNone: ;\r\n tvkeClearEdit:\r\n begin\r\n FTableView.FFilterActive := False;\r\n FTableView.StartFiltering;\r\n end;\r\n tvkeStopFilter: FTableView.StopFiltering;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewTableView.HandleMouseDown(Button: TTMSFNCMouseButton;\r\n Shift: TShiftState; X, Y: Single);\r\nvar\r\n it: TTMSFNCTableViewItem;\r\nbegin\r\n if Assigned(FTableView) then\r\n begin\r\n FDownMoreOption := FTableView.XYToMoreOption(X, Y);\r\n if Assigned(FDownMoreOption) then\r\n begin\r\n BlockUserInput := True;\r\n inherited;\r\n BlockUserInput := False;\r\n Invalidate;\r\n Exit;\r\n end;\r\n end;\r\n\r\n if FAnimateMoreOptions then\r\n begin\r\n FAnimateMoreOptions := False;\r\n FAnimateMoreOptionsClose := True;\r\n FMoreOffsetTo := 0;\r\n FAnimTimer.Enabled := True;\r\n inherited;\r\n BlockMouseClick := False;\r\n Exit;\r\n end;\r\n\r\n if BlockUserInput then\r\n begin\r\n inherited;\r\n Exit;\r\n end;\r\n\r\n it := nil;\r\n FMouseDownOnLookupBar := PtInRectEx(GetLookupBarRect, PointF(X, Y));\r\n if not FMouseDownOnLookupBar and Assigned(FTableView) and not IsAnimating then\r\n begin\r\n it := FTableView.XYToAccessoryItem(X, Y);\r\n FMouseDownOnAccessory := Assigned(it);\r\n if not Assigned(it) then\r\n begin\r\n it := FTableView.XYToBitmapItem(X, Y);\r\n FMouseDownOnBitmap := Assigned(it);\r\n end;\r\n end;\r\n\r\n BlockUserInput := FMouseDownOnLookupBar or FMouseDownOnAccessory or FMouseDownOnBitmap;\r\n inherited;\r\n\r\n if FMouseDownOnLookupBar then\r\n begin\r\n CaptureEx;\r\n StopAnimationTimer;\r\n ProcessLookup(X, Y);\r\n Invalidate;\r\n end;\r\n\r\n if FMouseDownOnAccessory then\r\n begin\r\n CaptureEx;\r\n StopAnimationTimer;\r\n if Assigned(FTableView) then\r\n FTableView.FActiveAccessoryItem := it;\r\n Invalidate;\r\n end;\r\n\r\n if FMouseDownOnBitmap then\r\n begin\r\n CaptureEx;\r\n StopAnimationTimer;\r\n if Assigned(FTableView) then\r\n FTableView.FActiveBitmapItem := it;\r\n Invalidate;\r\n end;\r\n\r\n FDownX := X;\r\n FDownY := Y;\r\n\r\n if not FMouseDownOnAccessory and not FMouseDownOnBitmap and not FMouseDownOnLookupBar and (Assigned(FTableView) and FTableView.Interaction.LongPressToEdit) then\r\n begin\r\n FDownAction := False;\r\n FDownTimer := True;\r\n FDownCount := 0;\r\n FAnimTimer.Enabled := True;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewTableView.HandleMouseMove(Shift: TShiftState; X,\r\n Y: Single);\r\nvar\r\n a: string;\r\n crs: smallInt;\r\nbegin\r\n inherited;\r\n crs := Cursor;\r\n if FDownTimer and not (FAnimateMoreOptions or FAnimateMoreOptionsClose) then\r\n begin\r\n if (Abs(X - FDownX) > 5) or (Abs(Y - FDownY) > 5) then\r\n begin\r\n FDownAction := False;\r\n FDownCount := 0;\r\n FDownTimer := False;\r\n FAnimTimer.Enabled := False;\r\n end;\r\n end;\r\n\r\n if Assigned(FTableView) and (FTableView.MoreOptions.Count > 0) and FTableView.Interaction.SwipeToShowMoreOptions and not Assigned(FMoreOffsetItem) and IsMouseDown and\r\n not BlockUserInput and not BlockMouseClick and (Abs(X - FDownX) > SWIPEOFFSET) and (Abs(Y - FDownY) <= 5) then\r\n begin\r\n FMoreOffsetItem := FTableView.XYToItem(X, Y);\r\n if Assigned(FMoreOffsetItem) then\r\n begin\r\n if FMoreOffsetItem.EnableMoreOptions then\r\n begin\r\n FMoreOffsetTo := FTableView.GetMoreOptionsSize;\r\n BlockMouseClick := True;\r\n FAnimateMoreOptions := True;\r\n FAnimTimer.Enabled := True;\r\n end;\r\n end;\r\n end;\r\n\r\n a := XYToHeaderAnchor(X,Y);\r\n if a <> '' then\r\n crs := crHandPoint\r\n else\r\n begin\r\n a := XYToFooterAnchor(X,Y);\r\n if a <> '' then\r\n crs := crHandPoint;\r\n end;\r\n\r\n if crs <> Cursor then\r\n Cursor := crs;\r\n\r\n if FMouseDownOnLookupBar then\r\n ProcessLookup(X, Y);\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewTableView.HandleMouseUp(Button: TTMSFNCMouseButton;\r\n Shift: TShiftState; X, Y: Single);\r\nvar\r\n rp: Boolean;\r\n mo: TTMSFNCTableViewMoreOption;\r\n a: string;\r\nbegin\r\n if Assigned(FDownMoreOption) then\r\n begin\r\n mo := FDownMoreOption;\r\n FDownMoreOption := nil;\r\n Invalidate;\r\n if FAnimateMoreOptions then\r\n begin\r\n FAnimateMoreOptions := False;\r\n FAnimateMoreOptionsClose := True;\r\n FMoreOffsetTo := 0;\r\n FAnimTimer.Enabled := True;\r\n inherited;\r\n BlockMouseClick := False;\r\n if Assigned(FTableView) and Assigned(FMoreOffsetItem) and Assigned(mo) then\r\n FTableView.DoItemMoreOptionClick(FMoreOffsetItem, mo);\r\n Exit;\r\n end;\r\n end;\r\n\r\n if FDownTimer and not (FAnimateMoreOptions or FAnimateMoreOptionsClose) then\r\n begin\r\n FDownCount := 0;\r\n FDownTimer := False;\r\n FAnimTimer.Enabled := False;\r\n if FDownAction then\r\n begin\r\n FDownAction := False;\r\n BlockUserInput := True;\r\n inherited;\r\n IsMouseDown := False;\r\n BlockUserInput := False;\r\n Exit;\r\n end;\r\n end;\r\n\r\n inherited;\r\n\r\n rp := False;\r\n if FMouseDownOnLookupBar then\r\n begin\r\n ReleaseCaptureEx;\r\n ProcessLookup(X, Y, False);\r\n rp := True;\r\n end;\r\n\r\n if FMouseDownOnAccessory then\r\n begin\r\n ReleaseCaptureEx;\r\n if Assigned(FTableView) then\r\n begin\r\n if Assigned(FTableView.FActiveAccessoryItem) then\r\n FTableView.DoItemAccessoryClick(FTableView.FActiveAccessoryItem);\r\n FTableView.FActiveAccessoryItem := nil;\r\n end;\r\n rp := True;\r\n end;\r\n\r\n if FMouseDownOnBitmap then\r\n begin\r\n ReleaseCaptureEx;\r\n if Assigned(FTableView) then\r\n begin\r\n if Assigned(FTableView.FActiveBitmapItem) then\r\n FTableView.DoItemBitmapClick(FTableView.FActiveBitmapItem);\r\n FTableView.FActiveBitmapItem := nil;\r\n end;\r\n rp := True;\r\n end;\r\n\r\n if rp then\r\n begin\r\n FMouseDownOnAccessory := False;\r\n FMouseDownOnBitmap := False;\r\n FMouseDownOnLookupBar := False;\r\n BlockUserInput := False;\r\n end;\r\n\r\n a := XYToFooterAnchor(X, Y);\r\n if a <> '' then\r\n DoFooterAnchorClick(a)\r\n else\r\n begin\r\n a := XYToHeaderAnchor(X, Y);\r\n if a <> '' then\r\n DoHeaderAnchorClick(a)\r\n end;\r\n\r\n Invalidate;\r\nend;\r\n\r\nfunction TTMSFNCTreeViewTableView.NeedsReload(AVerticalOffset: Single): Boolean;\r\nbegin\r\n Result := inherited NeedsReload(AVerticalOffset);\r\n if Assigned(FTableView) and FTableView.Reload.Enabled and not Assigned(FTableView.FActiveDetailControl) and not FTableView.FEditMode and not FTableView.FFilterActive then\r\n Result := AVerticalOffset >= FTableView.Reload.Offset;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewTableView.OffsetNodeRects(\r\n ANode: TTMSFNCTreeViewVirtualNode; AX, AY: Single; var ARect: TRectF);\r\nvar\r\n i: Integer;\r\nbegin\r\n if not Assigned(FFloatingNodes) then\r\n begin\r\n inherited;\r\n Exit;\r\n end;\r\n\r\n i := FFloatingNodes.IndexOf(ANode);\r\n if i > -1 then\r\n inherited OffsetNodeRects(ANode, AX, Max(0, AY), ARect)\r\n else\r\n begin\r\n if (FMoreOffsetItem = FTableView.GetItemForNode(ANode)) then\r\n inherited OffsetNodeRects(ANode, AX - FMoreOffset, AY, ARect)\r\n else\r\n inherited;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewTableView.ProcessLookup(X, Y: Single;\r\n DoLookup: Boolean);\r\nvar\r\n l: Integer;\r\n ch: String;\r\n catid: Integer;\r\n I: Integer;\r\nbegin\r\n if Assigned(FTableView) then\r\n begin\r\n case FTableView.CategoryType of\r\n tvctCustom:\r\n begin\r\n l := GetCategoryAtXY(X, Y);\r\n if (l > -1) and (l < FTableView.Categories.Count) then\r\n begin\r\n catid := FTableView.Categories[l].Id;\r\n if FTableView.FCustomChar.IsIDActive(catID) then\r\n begin\r\n if DoLookup then\r\n FTableView.LookupCustomCategory(catid)\r\n else if Assigned(FTableView.OnCategoryClick) then\r\n FTableView.OnCategoryClick(Self, '', catid);\r\n end;\r\n end;\r\n end;\r\n tvctAlphaBetic, tvctAlphaNumericFirst, tvctAlphaNumericLast:\r\n begin\r\n l := 0;\r\n for I := 0 to FTableView.FLookupBarDisplayList.Count - 1 do\r\n begin\r\n if PtInRectEx(FTableView.FLookupBarDisplayList[I].Rect, PointF(X, Y)) and FTableView.FLookupBarDisplayList[I].Active then\r\n begin\r\n l := I + 1;\r\n Break;\r\n end;\r\n end;\r\n\r\n if (l >= 1) and (l <= FTableView.GetCharacterCount) then\r\n begin\r\n if Assigned(FTableView) then\r\n begin\r\n ch := FTableView.GetCharacter(l);\r\n if (ch <> '') then\r\n begin\r\n if DoLookup then\r\n FTableView.LookupCategory(ch)\r\n else if Assigned(FTableView.OnCategoryClick) then\r\n FTableView.OnCategoryClick(Self, ch, -1);\r\n end;\r\n end;\r\n end;\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCTreeViewTableView.ScrollLimitation: Boolean;\r\nbegin\r\n Result := True;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewTableView.StartReload;\r\nbegin\r\n inherited;\r\n FReloadActive := True;\r\n BlockUserInput := True;\r\n if Assigned(FTableView) then\r\n begin\r\n FManualProgressSweepAngle := 0;\r\n FManualProgressStartAngle := 0;\r\n FAnimTimer.Enabled := (FTableView.Reload.ProgressMode <> tvrpmManual);\r\n FTableView.DoStartReload;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewTableView.UpdateCheckState(\r\n ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer; AChecked: Boolean);\r\nvar\r\n dp: TTMSFNCTableViewDisplayItem;\r\nbegin\r\n inherited;\r\n if not Assigned(FTableView) then\r\n Exit;\r\n\r\n if (ANode.Row >= 0) and (ANode.Row <= FTableView.FDisplayList.Count - 1) then\r\n begin\r\n dp := FTableView.FDisplayList[ANode.Row];\r\n case dp.Kind of\r\n tvikItem:\r\n begin\r\n if Assigned(dp.Item) then\r\n dp.Item.FChecked := AChecked;\r\n\r\n FTableView.SelectAllCheckedItems;\r\n end;\r\n tvikCategory: ;\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCTreeViewTableView.XYToHeaderAnchor(X, Y: Single): string;\r\nvar\r\n r : TRectF;\r\n g: TTMSFNCGraphics;\r\nbegin\r\n Result := '';\r\n\r\n r := RectF(0,0, Width, FTableView.Header.Height);\r\n\r\n g := TTMSFNCGraphics.CreateBitmapCanvas;\r\n g.BeginScene;\r\n g.BitmapContainer := BitmapContainer;\r\n g.Font.Assign(FTableView.Header.Font);\r\n\r\n try\r\n Result := g.DrawText(r, FTableView.Header.Text, FTableView.Header.WordWrapping, FTableView.Header.HorizontalTextAlign , FTableView.Header.VerticalTextAlign, FTableView.Header.Trimming, 0, -1, -1, True, True, X, Y);\r\n finally\r\n g.EndScene;\r\n g.Free;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCTreeViewTableView.XYToFooterAnchor(X, Y: Single): string;\r\nvar\r\n r : TRectF;\r\n g: TTMSFNCGraphics;\r\nbegin\r\n Result := '';\r\n\r\n r := RectF(0, Height - FTableView.Footer.Height, Width, Height);\r\n\r\n g := TTMSFNCGraphics.CreateBitmapCanvas;\r\n g.BeginScene;\r\n g.BitmapContainer := BitmapContainer;\r\n g.Font.Assign(FTableView.Footer.Font);\r\n\r\n try\r\n Result := g.DrawText(r, FTableView.Footer.Text, FTableView.Footer.WordWrapping, FTableView.Footer.HorizontalTextAlign , FTableView.Footer.VerticalTextAlign, FTableView.Footer.Trimming, 0, -1, -1, True, True, X, Y);\r\n finally\r\n g.EndScene;\r\n g.Free;\r\n end;\r\nend;\r\n\r\n{ TTMSFNCTableViewCategory }\r\n\r\nprocedure TTMSFNCTableViewCategory.Assign(Source: TPersistent);\r\nbegin\r\n if (Source is TTMSFNCTableViewCategory) then\r\n begin\r\n FText := (Source as TTMSFNCTableViewCategory).Text;\r\n FLookupText := (Source as TTMSFNCTableViewCategory).LookupText;\r\n FId := (Source as TTMSFNCTableViewCategory).Id;\r\n Changed;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTableViewCategory.Changed;\r\nbegin\r\n if Assigned(FTableView) then\r\n FTableView.UpdateTableView;\r\nend;\r\n\r\nconstructor TTMSFNCTableViewCategory.Create(ACollection: TCollection);\r\nbegin\r\n inherited;\r\n FTableView := (Collection as TTMSFNCTableViewCategories).FTableView;\r\n FID := (Collection as TTMSFNCTableViewCategories).Count - 1;\r\n if Assigned(FTableView) then\r\n FTableView.UpdateTableView;\r\nend;\r\n\r\ndestructor TTMSFNCTableViewCategory.Destroy;\r\nbegin\r\n inherited;\r\n if Assigned(FTableView) then\r\n FTableView.UpdateTableView;\r\nend;\r\n\r\nfunction TTMSFNCTableViewCategory.GetStrippedHTMLText: String;\r\nbegin\r\n Result := TTMSFNCUtils.HTMLStrip(Text);\r\nend;\r\n\r\nprocedure TTMSFNCTableViewCategory.SetId(const Value: integer);\r\nbegin\r\n if FId <> Value then\r\n begin\r\n FId := Value;\r\n Changed;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTableViewCategory.SetLookupText(const Value: String);\r\nbegin\r\n if FLookupText <> value then\r\n begin\r\n FLookupText := Value;\r\n Changed;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTableViewCategory.SetText(const Value: String);\r\nbegin\r\n if FText <> value then\r\n begin\r\n FText := Value;\r\n Changed;\r\n end;\r\nend;\r\n\r\n{ TTMSFNCTableViewCategories }\r\n\r\nfunction TTMSFNCTableViewCategories.Add: TTMSFNCTableViewCategory;\r\nbegin\r\n Result := TTMSFNCTableViewCategory(inherited Add);\r\nend;\r\n\r\nprocedure TTMSFNCTableViewCategories.Clear;\r\nvar\r\n it: TTMSFNCTableViewCategory;\r\nbegin\r\n if Count > 0 then\r\n begin\r\n while Count > 0 do\r\n begin\r\n it := Items[Count - 1];\r\n it.Free;\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCTableViewCategories.Compare(AItem1,\r\n AItem2: TTMSFNCTableViewCategory; ACaseSensitive: Boolean;\r\n ASortingMode: TTMSFNCTableViewCategoriesSortMode): Integer;\r\nvar\r\n l: TTMSFNCCustomTableView;\r\nbegin\r\n Result := 0;\r\n\r\n l := FTableView;\r\n if not Assigned(l) then\r\n Exit;\r\n\r\n if not ACaseSensitive then\r\n Result := AnsiCompareStr(UpperCase(AItem1.StrippedHTMLText), UpperCase(AItem2.StrippedHTMLText))\r\n else\r\n Result := AnsiCompareStr(AItem1.StrippedHTMLText, AItem2.StrippedHTMLText);\r\n\r\n case ASortingMode of\r\n tvcsmDescending: Result := Result * -1;\r\n end;\r\n\r\n l.DoCategoryCompare(AItem1, AItem2, Result);\r\nend;\r\n\r\nconstructor TTMSFNCTableViewCategories.Create(ATableView: TTMSFNCCustomTableView);\r\nbegin\r\n inherited Create(ATableView, TTMSFNCTableViewCategory);\r\n FTableView := ATableView;\r\nend;\r\n\r\nprocedure TTMSFNCTableViewCategories.Delete(Index: Integer);\r\nvar\r\n it: TTMSFNCTableViewCategory;\r\nbegin\r\n it := Items[Index];\r\n it.Free;\r\nend;\r\n\r\nfunction TTMSFNCTableViewCategories.GetItem(\r\n Index: Integer): TTMSFNCTableViewCategory;\r\nbegin\r\n Result := TTMSFNCTableViewCategory(inherited Items[Index]);\r\nend;\r\n\r\nfunction TTMSFNCTableViewCategories.Insert(\r\n Index: Integer): TTMSFNCTableViewCategory;\r\nbegin\r\n Result := TTMSFNCTableViewCategory(inherited Insert(Index));\r\nend;\r\n\r\nfunction TTMSFNCTableViewCategories.ItemById(\r\n id: integer): TTMSFNCTableViewCategory;\r\nvar\r\n i: integer;\r\nbegin\r\n Result := nil;\r\n for I := 0 to Count - 1 do\r\n begin\r\n if Items[I].ID = id then\r\n begin\r\n Result := Items[I];\r\n break;\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCTableViewCategories.ItemIndexByID(id: integer): integer;\r\nvar\r\n ci: TTMSFNCTableViewCategory;\r\nbegin\r\n ci := ItemByID(id);\r\n if Assigned(ci) then\r\n result := ci.Index\r\n else\r\n result := -1;\r\nend;\r\n\r\nprocedure TTMSFNCTableViewCategories.QuickSort(L: Integer; R: Integer; ACaseSensitive: Boolean = True; ASortingMode: TTMSFNCTableViewCategoriesSortMode = tvcsmAscending);\r\nvar\r\n I, J, p: Integer;\r\n {$IFDEF LCLWEBLIB}\r\n SortList: TFPList;\r\n\r\n procedure ExchangeItems(Index1, Index2: Integer);\r\n var\r\n {$IFDEF WEBLIB}\r\n Save: JSValue;\r\n {$ENDIF}\r\n {$IFNDEF WEBLIB}\r\n Save: Pointer;\r\n {$ENDIF}\r\n begin\r\n Save := SortList.Items[Index1];\r\n SortList.Items[Index1] := SortList.Items[Index2];\r\n SortList.Items[Index2] := Save;\r\n end;\r\n {$ENDIF}\r\n {$IFNDEF LCLWEBLIB}\r\n SortList: TList;\r\n\r\n procedure ExchangeItems(Index1, Index2: Integer);\r\n var\r\n Save: TCollectionItem;\r\n begin\r\n Save := SortList[Index1];\r\n SortList[Index1] := SortList[Index2];\r\n SortList[Index2] := Save;\r\n Save.Index := Index2;\r\n end;\r\n {$ENDIF}\r\nbegin\r\n //This cast allows us to get at the private elements in the base class\r\n {$IFNDEF WEBLIB}\r\n SortList := {%H-}TShadowedCollection(Self).FItems;\r\n {$ENDIF}\r\n {$IFDEF WEBLIB}\r\n SortList := Self.FPList;\r\n {$ENDIF}\r\n\r\n repeat\r\n I := L;\r\n J := R;\r\n P := (L + R) shr 1;\r\n repeat\r\n while Compare(Items[I], Items[P], ACaseSensitive, ASortingMode) < 0 do\r\n Inc(I);\r\n while Compare(Items[J], Items[P], ACaseSensitive, ASortingMode) > 0 do\r\n Dec(J);\r\n if I <= J then\r\n begin\r\n ExchangeItems(I, J);\r\n if P = I then\r\n P := J\r\n else if P = J then\r\n P := I;\r\n Inc(I);\r\n Dec(J);\r\n end;\r\n until I > J;\r\n if L < J then\r\n QuickSort(L, J, ACaseSensitive, ASortingMode);\r\n L := I;\r\n until I >= R;\r\nend;\r\n\r\nprocedure TTMSFNCTableViewCategories.SetItem(Index: Integer;\r\n const Value: TTMSFNCTableViewCategory);\r\nbegin\r\n inherited Items[Index] := Value;\r\nend;\r\n\r\nprocedure TTMSFNCTableViewCategories.Sort(ACaseSensitive: Boolean = True; ASortingMode: TTMSFNCTableViewCategoriesSortMode = tvcsmAscending);\r\nvar\r\n l: TTMSFNCCustomTableView;\r\nbegin\r\n l := FTableView;\r\n if Assigned(l) then\r\n begin\r\n l.BeginUpdate;\r\n BeginUpdate;\r\n if Count > 1 then\r\n QuickSort(0, Pred(Count), ACaseSensitive, ASortingMode);\r\n EndUpdate;\r\n l.EndUpdate;\r\n end;\r\nend;\r\n\r\n{ TTMSFNCTableViewMoreOption }\r\n\r\nprocedure TTMSFNCTableViewMoreOption.Assign(Source: TPersistent);\r\nbegin\r\n if (Source is TTMSFNCTableViewMoreOption) then\r\n begin\r\n FText := (Source as TTMSFNCTableViewMoreOption).Text;\r\n FWidth := (Source as TTMSFNCTableViewMoreOption).Width;\r\n FColor := (Source as TTMSFNCTableViewMoreOption).Color;\r\n FBorderColor := (Source as TTMSFNCTableViewMoreOption).BorderColor;\r\n FFontColor := (Source as TTMSFNCTableViewMoreOption).FontColor;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTableViewMoreOption.Changed;\r\nbegin\r\n if Assigned(FTableView) then\r\n FTableView.UpdateTableView;\r\nend;\r\n\r\nconstructor TTMSFNCTableViewMoreOption.Create(ACollection: TCollection);\r\nbegin\r\n inherited;\r\n FTableView := (Collection as TTMSFNCTableViewMoreOptions).FTableView;\r\n FWidth := 60;\r\n FColor := gcNull;\r\n FBorderColor := gcNull;\r\n FFontColor := gcNull;\r\n if Assigned(FTableView) then\r\n FTableView.UpdateTableView;\r\nend;\r\n\r\ndestructor TTMSFNCTableViewMoreOption.Destroy;\r\nbegin\r\n inherited;\r\n if Assigned(FTableView) then\r\n FTableView.UpdateTableView;\r\nend;\r\n\r\nfunction TTMSFNCTableViewMoreOption.GetStrippedHTMLText: String;\r\nbegin\r\n Result := TTMSFNCUtils.HTMLStrip(Text);\r\nend;\r\n\r\nfunction TTMSFNCTableViewMoreOption.IsWidthStored: Boolean;\r\nbegin\r\n Result := Width <> 60;\r\nend;\r\n\r\nprocedure TTMSFNCTableViewMoreOption.SetBorderColor(\r\n const Value: TTMSFNCGraphicsColor);\r\nbegin\r\n if FBorderColor <> Value then\r\n begin\r\n FBorderColor := Value;\r\n Changed;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTableViewMoreOption.SetColor(\r\n const Value: TTMSFNCGraphicsColor);\r\nbegin\r\n if FColor <> Value then\r\n begin\r\n FColor := Value;\r\n Changed;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTableViewMoreOption.SetFontColor(\r\n const Value: TTMSFNCGraphicsColor);\r\nbegin\r\n if FFontColor <> Value then\r\n begin\r\n FFontColor := Value;\r\n Changed;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTableViewMoreOption.SetText(const Value: String);\r\nbegin\r\n if FText <> value then\r\n begin\r\n FText := Value;\r\n Changed;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTableViewMoreOption.SetWidth(const Value: Single);\r\nbegin\r\n if FWidth <> Value then\r\n begin\r\n FWidth := Value;\r\n Changed;\r\n end;\r\nend;\r\n\r\n{ TTMSFNCTableViewMoreOptions }\r\n\r\nfunction TTMSFNCTableViewMoreOptions.Add: TTMSFNCTableViewMoreOption;\r\nbegin\r\n Result := TTMSFNCTableViewMoreOption(inherited Add);\r\nend;\r\n\r\nprocedure TTMSFNCTableViewMoreOptions.Clear;\r\nvar\r\n it: TTMSFNCTableViewMoreOption;\r\nbegin\r\n if Count > 0 then\r\n begin\r\n while Count > 0 do\r\n begin\r\n it := Items[Count - 1];\r\n it.Free;\r\n end;\r\n end;\r\nend;\r\n\r\nconstructor TTMSFNCTableViewMoreOptions.Create(ATableView: TTMSFNCCustomTableView);\r\nbegin\r\n inherited Create(ATableView, TTMSFNCTableViewMoreOption);\r\n FTableView := ATableView;\r\nend;\r\n\r\nprocedure TTMSFNCTableViewMoreOptions.Delete(Index: Integer);\r\nvar\r\n it: TTMSFNCTableViewMoreOption;\r\nbegin\r\n it := Items[Index];\r\n it.Free;\r\nend;\r\n\r\nfunction TTMSFNCTableViewMoreOptions.GetItem(\r\n Index: Integer): TTMSFNCTableViewMoreOption;\r\nbegin\r\n Result := TTMSFNCTableViewMoreOption(inherited Items[Index]);\r\nend;\r\n\r\nfunction TTMSFNCTableViewMoreOptions.Insert(\r\n Index: Integer): TTMSFNCTableViewMoreOption;\r\nbegin\r\n Result := TTMSFNCTableViewMoreOption(inherited Insert(Index));\r\nend;\r\n\r\nfunction TTMSFNCTableViewMoreOptions.ItemById(\r\n id: integer): TTMSFNCTableViewMoreOption;\r\nvar\r\n i: integer;\r\nbegin\r\n Result := nil;\r\n for I := 0 to Count - 1 do\r\n begin\r\n if Items[I].ID = id then\r\n begin\r\n Result := Items[I];\r\n break;\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCTableViewMoreOptions.ItemIndexByID(id: integer): integer;\r\nvar\r\n ci: TTMSFNCTableViewMoreOption;\r\nbegin\r\n ci := ItemByID(id);\r\n if Assigned(ci) then\r\n Result := ci.Index\r\n else\r\n Result := -1;\r\nend;\r\n\r\nprocedure TTMSFNCTableViewMoreOptions.SetItem(Index: Integer;\r\n const Value: TTMSFNCTableViewMoreOption);\r\nbegin\r\n inherited Items[Index] := Value;\r\nend;\r\n\r\n{$IFDEF LCLLIB}\r\nclass operator TTMSFNCTableViewDisplayItem.=(z1, z2: TTMSFNCTableViewDisplayItem)b: boolean;\r\nbegin\r\n Result := z1 = z2;\r\nend;\r\n\r\nclass operator TTMSFNCTableViewLookupBarDisplayItem.=(z1, z2: TTMSFNCTableViewLookupBarDisplayItem)b: boolean;\r\nbegin\r\n Result := z1 = z2;\r\nend;\r\n{$ENDIF}\r\n\r\n{ TTMSFNCTableViewLookupBar }\r\n\r\nprocedure TTMSFNCTableViewLookupBar.Assign(Source: TPersistent);\r\nbegin\r\n if (Source is TTMSFNCTableViewLookupBar) then\r\n begin\r\n FVisible := (Source as TTMSFNCTableViewLookupBar).Visible;\r\n FFont.Assign((Source as TTMSFNCTableViewLookupBar).Font);\r\n FInActiveFont.Assign((Source as TTMSFNCTableViewLookupBar).InActiveFont);\r\n FStroke.Assign((Source as TTMSFNCTableViewLookupBar).Stroke);\r\n FFill.Assign((Source as TTMSFNCTableViewLookupBar).Fill);\r\n FAutoLookup := (Source as TTMSFNCTableViewLookupBar).AutoLookup;\r\n FWidth := (Source as TTMSFNCTableViewLookupBar).Width;\r\n FPosition := (Source as TTMSFNCTableViewLookupBar).Position;\r\n FDownFill.Assign((Source as TTMSFNCTableViewLookupBar).DownFill);\r\n FDownStroke.Assign((Source as TTMSFNCTableViewLookupBar).DownStroke);\r\n FIncludeFilteredItems := (Source as TTMSFNCTableViewLookupBar).IncludeFilteredItems;\r\n end;\r\nend;\r\n\r\nconstructor TTMSFNCTableViewLookupBar.Create(\r\n ATableView: TTMSFNCCustomTableView);\r\nbegin\r\n FTableView := ATableView;\r\n FWidth := 25;\r\n FIncludeFilteredItems := True;\r\n FVisible := True;\r\n FPosition := tvlbpRight;\r\n FAutoLookup := True;\r\n FFont := TTMSFNCGraphicsFont.Create;\r\n FFont.OnChanged := @FontChanged;\r\n FInActiveFont := TTMSFNCGraphicsFont.Create;\r\n if Assigned(FTableView) and FTableView.IsDesignTime then\r\n FInActiveFont.Color := gcSilver;\r\n FInActiveFont.OnChanged := @FontChanged;\r\n FFill := TTMSFNCGraphicsFill.Create(gfkSolid, gcWhite);\r\n FFill.OnChanged := @FillChanged;\r\n FStroke := TTMSFNCGraphicsStroke.Create(gskSolid, gcWhite);\r\n FStroke.OnChanged := @StrokeChanged;\r\n\r\n FDownFill := TTMSFNCGraphicsFill.Create(gfkSolid, MakeGraphicsColor(249, 249, 249));\r\n FDownFill.OnChanged := @FillChanged;\r\n FDownStroke := TTMSFNCGraphicsStroke.Create(gskSolid, MakeGraphicsColor(249, 249, 249));\r\n FDownStroke.OnChanged := @StrokeChanged;\r\nend;\r\n\r\ndestructor TTMSFNCTableViewLookupBar.Destroy;\r\nbegin\r\n FFont.Free;\r\n FInActiveFont.Free;\r\n FFill.Free;\r\n FStroke.Free;\r\n FDownFill.Free;\r\n FDownStroke.Free;\r\n inherited;\r\nend;\r\n\r\nprocedure TTMSFNCTableViewLookupBar.FillChanged(Sender: TObject);\r\nbegin\r\n if Assigned(FTableView) then\r\n FTableView.UpdateTableView;\r\nend;\r\n\r\nprocedure TTMSFNCTableViewLookupBar.FontChanged(Sender: TObject);\r\nbegin\r\n if Assigned(FTableView) then\r\n FTableView.UpdateTableView;\r\nend;\r\n\r\nfunction TTMSFNCTableViewLookupBar.IsWidthStored: Boolean;\r\nbegin\r\n Result := Width <> 25;\r\nend;\r\n\r\nprocedure TTMSFNCTableViewLookupBar.SetAutoLookup(const Value: Boolean);\r\nbegin\r\n FAutoLookup := Value;\r\nend;\r\n\r\nprocedure TTMSFNCTableViewLookupBar.SetDownFill(\r\n const Value: TTMSFNCGraphicsFill);\r\nbegin\r\n FDownFill.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCTableViewLookupBar.SetDownStroke(\r\n const Value: TTMSFNCGraphicsStroke);\r\nbegin\r\n FDownStroke.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCTableViewLookupBar.SetFill(const Value: TTMSFNCGraphicsFill);\r\nbegin\r\n FFill.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCTableViewLookupBar.SetFont(const Value: TTMSFNCGraphicsFont);\r\nbegin\r\n FFont.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCTableViewLookupBar.SetInActiveFont(\r\n const Value: TTMSFNCGraphicsFont);\r\nbegin\r\n FInActiveFont.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCTableViewLookupBar.SetPosition(\r\n const Value: TTMSFNCTableViewLookupBarPosition);\r\nbegin\r\n if FPosition <> Value then\r\n begin\r\n FPosition := Value;\r\n if Assigned(FTableView) then\r\n FTableView.UpdateTableView;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTableViewLookupBar.SetStroke(\r\n const Value: TTMSFNCGraphicsStroke);\r\nbegin\r\n FStroke.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCTableViewLookupBar.SetVisible(const Value: Boolean);\r\nbegin\r\n if FVisible <> Value then\r\n begin\r\n FVisible := Value;\r\n if Assigned(FTableView) then\r\n FTableView.UpdateTableView;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTableViewLookupBar.SetWidth(const Value: Single);\r\nbegin\r\n if FWidth <> Value then\r\n begin\r\n FWidth := Value;\r\n if Assigned(FTableView) then\r\n FTableView.UpdateTableView;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTableViewLookupBar.StrokeChanged(Sender: TObject);\r\nbegin\r\n if Assigned(FTableView) then\r\n FTableView.UpdateTableView;\r\nend;\r\n\r\n{ TTMSFNCTableViewReload }\r\n\r\nprocedure TTMSFNCTableViewReload.Assign(Source: TPersistent);\r\nbegin\r\n if Source is TTMSFNCTableViewReload then\r\n begin\r\n FOffset := (Source as TTMSFNCTableViewReload).Offset;\r\n FSize := (Source as TTMSFNCTableViewReload).Size;\r\n FEnabled := (Source as TTMSFNCTableViewReload).Enabled;\r\n FStroke.Assign((Source as TTMSFNCTableViewReload).Stroke);\r\n FProgressMode := (Source as TTMSFNCTableViewReload).ProgressMode;\r\n end;\r\nend;\r\n\r\nconstructor TTMSFNCTableViewReload.Create(ATableView: TTMSFNCCustomTableView);\r\nbegin\r\n FTableView := ATableView;\r\n FOffset := 40;\r\n FSize := 20;\r\n FEnabled := False;\r\n FProgressMode := tvrpmMarquee;\r\n FStroke := TTMSFNCGraphicsStroke.Create(gskSolid, gcDarkgray);\r\n if Assigned(FTableView) and FTableView.IsDesignTime then\r\n FStroke.Width := 2;\r\nend;\r\n\r\ndestructor TTMSFNCTableViewReload.Destroy;\r\nbegin\r\n FStroke.Free;\r\n inherited;\r\nend;\r\n\r\nfunction TTMSFNCTableViewReload.IsOffsetStored: Boolean;\r\nbegin\r\n Result := Offset <> 40;\r\nend;\r\n\r\nfunction TTMSFNCTableViewReload.IsSizeStored: Boolean;\r\nbegin\r\n Result := Size <> 20;\r\nend;\r\n\r\nprocedure TTMSFNCTableViewReload.SetEnabled(const Value: Boolean);\r\nbegin\r\n if FEnabled <> Value then\r\n begin\r\n FEnabled := Value;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTableViewReload.SetOffset(const Value: Single);\r\nbegin\r\n if FOffset <> Value then\r\n begin\r\n FOffset := Value;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTableViewReload.SetProgressMode(\r\n const Value: TTMSFNCTableViewReloadProgressMode);\r\nbegin\r\n if FProgressMode <> Value then\r\n begin\r\n FProgressMode := Value;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTableViewReload.SetSize(const Value: Single);\r\nbegin\r\n if FSize <> Value then\r\n begin\r\n FSize := Value;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCTableViewReload.SetStroke(const Value: TTMSFNCGraphicsStroke);\r\nbegin\r\n FStroke.Assign(Value);\r\nend;\r\n\r\n{$IFDEF WEBLIB}\r\nfunction TTMSFNCTreeViewTableViewFloatingNodes.GetItem(Index: Integer): TTMSFNCTreeViewVirtualNode;\r\nbegin\r\n Result := TTMSFNCTreeViewVirtualNode(inherited Items[Index]);\r\nend;\r\n\r\nprocedure TTMSFNCTreeViewTableViewFloatingNodes.SetItem(Index: Integer; const Value: TTMSFNCTreeViewVirtualNode);\r\nbegin\r\n inherited Items[Index] := Value;\r\nend;\r\n\r\nfunction TTMSFNCTableViewLookupBarDisplayList.GetItem(Index: Integer): TTMSFNCTableViewLookupBarDisplayItem;\r\nbegin\r\n Result := TTMSFNCTableViewLookupBarDisplayItem(inherited Items[Index]);\r\nend;\r\n\r\nprocedure TTMSFNCTableViewLookupBarDisplayList.SetItem(Index: Integer; const Value: TTMSFNCTableViewLookupBarDisplayItem);\r\nbegin\r\n inherited Items[Index] := Value;\r\nend;\r\n\r\nfunction TTMSFNCTableViewDisplayList.GetItem(Index: Integer): TTMSFNCTableViewDisplayItem;\r\nbegin\r\n Result := TTMSFNCTableViewDisplayItem(inherited Items[Index]);\r\nend;\r\n\r\nprocedure TTMSFNCTableViewDisplayList.SetItem(Index: Integer; const Value: TTMSFNCTableViewDisplayItem);\r\nbegin\r\n inherited Items[Index] := Value;\r\nend;\r\n\r\nfunction TTMSFNCTableViewCustomCharList.GetItem(Index: Integer): TTMSFNCTableViewCustomChar;\r\nbegin\r\n Result := TTMSFNCTableViewCustomChar(inherited Items[Index]);\r\nend;\r\n\r\nprocedure TTMSFNCTableViewCustomCharList.SetItem(Index: Integer; const Value: TTMSFNCTableViewCustomChar);\r\nbegin\r\n inherited Items[Index] := Value;\r\nend;\r\n{$ENDIF}\r\n\r\n{ TTMSFNCTableViewCustomChar }\r\n\r\nconstructor TTMSFNCTableViewCustomChar.Create(AID: Integer; AActive: Boolean);\r\nbegin\r\n FID := AID;\r\n FActive := AActive;\r\nend;\r\n\r\n{ TTMSFNCTableViewCustomCharList }\r\n\r\nprocedure TTMSFNCTableViewCustomCharList.ActivateID(AID: Integer);\r\nvar\r\n I: Integer;\r\nbegin\r\n for I := 0 to Count - 1 do\r\n begin\r\n if Items[I].ID = AID then\r\n begin\r\n Items[I].Active := True;\r\n Break;\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCTableViewCustomCharList.IsIDActive(AID: Integer): Boolean;\r\nvar\r\n I: Integer;\r\nbegin\r\n Result := False;\r\n for I := 0 to Count - 1 do\r\n begin\r\n if Items[I].ID = AID then\r\n begin\r\n Result := Items[I].Active;\r\n Break;\r\n end;\r\n end;\r\nend;\r\n\r\n\r\nend.\r\n","{********************************************************************}\r\n{ written by TMS Software }\r\n{ copyright (c) 2020 - 2025 }\r\n{ Email : info@tmssoftware.com }\r\n{ Web : https://www.tmssoftware.com }\r\n{ }\r\n{ The source code is given as is. The author is not responsible }\r\n{ for any possible damage done due to the use of this code. }\r\n{ The complete source code remains property of the author and may }\r\n{ not be distributed, published, given or sold in any form as such. }\r\n{ No parts of the source code can be included in any other component }\r\n{ or application without written authorization of the author. }\r\n{********************************************************************}\r\n\r\nunit WEBLib.TMSFNCSignatureCapture;\r\n\r\n{$I WEBLib.TMSFNCDefines.inc}\r\n\r\ninterface\r\n\r\nuses\r\n {$IFNDEF LCLLIB}\r\n {$IFNDEF WEBLIB}\r\n Generics.Collections, UITypes,\r\n {$ENDIF}\r\n {$ENDIF}\r\n {$IFDEF WEBLIB}\r\n Contnrs, WEBLib.Controls,\r\n {$ENDIF}\r\n {$IFDEF LCLLIB}\r\n fgl, Controls,\r\n {$ENDIF}\r\n Classes, Types, WEBLib.TMSFNCCustomControl, WEBLib.Graphics,\r\n WEBLib.TMSFNCGraphicsTypes, WEBLib.TMSFNCGraphics, WEBLib.TMSFNCTypes\r\n ,TypInfo;\r\n\r\nconst\r\n MAJ_VER = 1; // Major version nr.\r\n MIN_VER = 0; // Minor version nr.\r\n REL_VER = 1; // Release nr.\r\n BLD_VER = 3; // Build nr.\r\n\r\n //Version history\r\n //v1.0.0.0 : First Release\r\n //v1.0.0.1 : Fixed : Issue with signature export on TMS WEB Core\r\n //v1.0.0.2 : Fixed : Issue in Lazarus exporting to image\r\n //v1.0.1.0 : New : Support for high dpi\r\n //v1.0.1.1 : Fixed : Issue with writing proper signature point count\r\n //v1.0.1.2 : Fixed : Issue exporting images\r\n //v1.0.1.3 : Fixed : Issue with clearing signature\r\n\r\ntype\r\n TTMSFNCSignatureCaptureStoredPoint = class(TObject)\r\n public\r\n X, Y, PenWidth: Single;\r\n DrawLine: Boolean;\r\n PenColor: TTMSFNCGraphicsColor;\r\n end;\r\n\r\n TTMSFNCSignatureCaptureTextHintPosition = (tpBottomCenter, tpBottomLeft, tpBottomRight, tpTopCenter, tpTopLeft, tpTopRight, tpXY, tpNone);\r\n TTMSFNCSignatureCaptureClearSignPosition = (cpBottomCenter, cpBottomLeft, cpBottomRight, cpTopCenter, cpTopLeft, cpTopRight, cpXY, cpNone);\r\n\r\n TTMSFNCSignatureCaptureClearPosition = class(TPersistent)\r\n private\r\n FImage: TTMSFNCBitmap;\r\n FX: Single;\r\n FY: Single;\r\n FPosition: TTMSFNCSignatureCaptureClearSignPosition;\r\n FOnChange: TNotifyEvent;\r\n procedure SetImage(const Value: TTMSFNCBitmap);\r\n procedure SetPosition(const Value: TTMSFNCSignatureCaptureClearSignPosition);\r\n procedure SetX(const Value: Single);\r\n procedure SetY(const Value: Single);\r\n function IsXStored: Boolean;\r\n function IsYStored: Boolean;\r\n protected\r\n procedure ImageChanged(Sender: TObject);\r\n procedure Changed; virtual;\r\n public\r\n constructor Create;\r\n destructor Destroy; override;\r\n procedure Assign(Source: TPersistent); override;\r\n published\r\n property X: Single read FX write SetX stored IsXStored nodefault;\r\n property Y: Single read FY write SetY stored IsYStored nodefault;\r\n property Position: TTMSFNCSignatureCaptureClearSignPosition read FPosition write SetPosition default cpBottomLeft;\r\n property Image: TTMSFNCBitmap read FImage write SetImage;\r\n property OnChange: TNotifyEvent read FOnChange write FOnChange;\r\n end;\r\n\r\n TTMSFNCSignatureCaptureTextPosition = class(TPersistent)\r\n private\r\n FX: Single;\r\n FY: Single;\r\n FOnChange: TNotifyEvent;\r\n FLine: TTMSFNCGraphicsStroke;\r\n FPosition: TTMSFNCSignatureCaptureTextHintPosition;\r\n procedure SetX(const Value: Single);\r\n procedure SetY(const Value: Single);\r\n procedure SetPosition(const Value: TTMSFNCSignatureCaptureTextHintPosition);\r\n procedure SetLine(const Value: TTMSFNCGraphicsStroke);\r\n function IsXStored: Boolean;\r\n function IsYStored: Boolean;\r\n protected\r\n procedure Changed; virtual;\r\n public\r\n constructor Create;\r\n destructor Destroy; override;\r\n procedure Assign(Source: TPersistent); override;\r\n published\r\n property X: Single read FX write SetX stored IsXStored nodefault;\r\n property Y: Single read FY write SetY stored IsYStored nodefault;\r\n property Position: TTMSFNCSignatureCaptureTextHintPosition read FPosition write SetPosition default tpBottomCenter;\r\n property Line: TTMSFNCGraphicsStroke read FLine write SetLine;\r\n property OnChange: TNotifyEvent read FOnChange write FOnChange;\r\n end;\r\n\r\n {$IFNDEF WEBLIB}\r\n TTMSFNCSignatureCapturePoints = class(TObjectList);\r\n {$ENDIF}\r\n {$IFDEF WEBLIB}\r\n TTMSFNCSignatureCapturePoints = class(TObjectList)\r\n private\r\n function GetItem(Index: Integer): TTMSFNCSignatureCaptureStoredPoint;\r\n procedure SetItem(Index: Integer; const Value: TTMSFNCSignatureCaptureStoredPoint);\r\n public\r\n property Items[Index: Integer]: TTMSFNCSignatureCaptureStoredPoint read GetItem write SetItem; default;\r\n end;\r\n {$ENDIF}\r\n\r\n TTMSFNCCustomSignatureCapture = class(TTMSFNCCustomControl)\r\n private\r\n FExport: Boolean;\r\n FBmpStream: TBitmap;\r\n FDrawing: Boolean;\r\n FSignaturePoints: TTMSFNCSignatureCapturePoints;\r\n FPen: TTMSFNCGraphicsStroke;\r\n FTextPosition: TTMSFNCSignatureCaptureTextPosition;\r\n FText: string;\r\n FClearSig: TTMSFNCSignatureCaptureClearPosition;\r\n FClearRect: TRectF;\r\n FFont: TTMSFNCGraphicsFont;\r\n procedure SetPen(const Value: TTMSFNCGraphicsStroke);\r\n procedure SetTextPosition(const Value: TTMSFNCSignatureCaptureTextPosition);\r\n procedure SetText(const Value: string);\r\n procedure SetClearSig(const Value: TTMSFNCSignatureCaptureClearPosition);\r\n procedure SetEmpty(const Value: Boolean);\r\n procedure SetFnt(const Value: TTMSFNCGraphicsFont);\r\n {$IFNDEF WEBLIB}\r\n procedure WriteStringToStream(const Stream: TStream; const S: string);\r\n function ReadStringFromStream(const Stream: TStream): string;\r\n {$ENDIF}\r\n function IsTextStored: Boolean;\r\n function GetEmpty: Boolean;\r\n protected\r\n procedure ChangeDPIScale(M, D: Integer); override;\r\n procedure ClearSignChanged(Sender: TObject);\r\n procedure TextPositionChanged(Sender: TObject);\r\n procedure HandleMouseDown({%H-}Button: TTMSFNCMouseButton; {%H-}Shift: TShiftState; {%H-}X, {%H-}Y: Single); override;\r\n procedure HandleMouseMove({%H-}Shift: TShiftState; {%H-}X, {%H-}Y: Single); override;\r\n procedure HandleMouseUp({%H-}Button: TTMSFNCMouseButton; {%H-}Shift: TShiftState; {%H-}X, {%H-}Y: Single); override;\r\n procedure Draw({%H-}AGraphics: TTMSFNCGraphics; {%H-}ARect: TRectF); override;\r\n procedure DrawSignText(AGraphics: TTMSFNCGraphics; ARect: TRectF; var ACRect: TRectF);\r\n procedure DrawClearIcon(AGraphics: TTMSFNCGraphics; ARect: TRectF);\r\n procedure DrawSignature(AGraphics: TTMSFNCGraphics);\r\n function GetVersion: string; override;\r\n function GetClearRect(ARect: TRectF): TRectF;\r\n function IsAppearanceProperty({%H-}AObject: TObject; {%H-}APropertyName: string; {%H-}APropertyType: TTypeKind): Boolean; override;\r\n property Pen: TTMSFNCGraphicsStroke read FPen write SetPen;\r\n property Text: string read FText write SetText stored IsTextStored nodefault;\r\n property TextPosition: TTMSFNCSignatureCaptureTextPosition read FTextPosition write SetTextPosition;\r\n property ClearSig: TTMSFNCSignatureCaptureClearPosition read FClearSig write SetClearSig;\r\n property Font: TTMSFNCGraphicsFont read FFont write SetFnt;\r\n public\r\n constructor Create(AOwner: TComponent); override;\r\n destructor Destroy; override;\r\n {$IFNDEF WEBLIB}\r\n procedure LoadFromStream(AStream: TStream);\r\n procedure LoadFromFile(FileName: string);\r\n procedure SaveToImageFile(FileName: string);\r\n procedure SaveToImageStream(AStream: TStream);\r\n procedure SaveToStream(AStream: TStream);\r\n procedure SaveToFile(FileName: string);\r\n function GetImageFromStream(AStream: TStream): TBitmap;\r\n {$ENDIF}\r\n {$IFDEF WEBLIB}\r\n function GetBase64Img: string;\r\n {$ENDIF}\r\n property Empty: Boolean read GetEmpty write SetEmpty;\r\n property SignaturePoints: TTMSFNCSignatureCapturePoints read FSignaturePoints;\r\n end;\r\n\r\n {$IFNDEF LCLLIB}\r\n [ComponentPlatformsAttribute(TMSPlatformsWeb)]\r\n {$ENDIF}\r\n TTMSFNCSignatureCapture = class(TTMSFNCCustomSignatureCapture)\r\n published\r\n property Fill;\r\n property Stroke;\r\n property Font;\r\n property Pen;\r\n property Text;\r\n property TextPosition;\r\n property ClearSig;\r\n end;\r\n\r\n{$IFDEF WEBLIB}\r\nconst\r\n TTMSFNCSIGNATURECAPTURECLEAR = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAACXBIWXMAAA7DAAAOwwHHb6hkAAABl0lEQVRIidWVsVnDMBCFf0JD6RFcUj' +\r\n 'obKBvABCQTgCfgMUGygd1RBiZAG2A6OsIEZAQKnb8oQnYCVHmVrLt77+4kneHUcdYvJJXAEiiAZ6CVtP2vwCRaL4ErwNn6Q5L+KxBXsDaBFB0wO7YaSUXPI6mNK6iBHE' +\r\n 'lFqKY6QOwkNcAXcAv4vQrMqQTWRprDQlKbxMyBG0JrAVaS6t6+JxAFCbgfE5HkgAYobX9jNh87ZwVMpDKCXDVdsr8CHnLnNCgQCYnhajZkso4xGTIkArMBsx8jBzg/Qu' +\r\n 'AKeAQuMubKOffpve+G4kcrkLQk3KrCtrbAU+LWjF3hrICkQtIrcBdtbwkP7hpYJCFre2CHBSybD/ZvSU/emU+biJSEG/cDe2dg5C/sWvKDvIf3vnPOlVEil865N+/9e+' +\r\n 'yXTtPXhBzgWlLa9zipBpjb5waYxu8hblGTIa/HyE1gAbT2WZK8mTNzqiz7GK0FH4Wkkmnf0r6CdEz/itxQE0YIhP8JsUDLblSv/kCO9X1mIs6G4eFZ9AehgnAOpb2ZE8' +\r\n 'c3BUakH/cxNusAAAAASUVORK5CYII=';\r\n{$ENDIF}\r\n\r\nimplementation\r\n\r\nuses\r\n WEBLib.TMSFNCUtils;\r\n\r\n{$R TMSFNCSignatureCapture.res}\r\n\r\nconst\r\n TEXTMARGIN = 3;\r\n CLEARMARGIN = 4;\r\n\r\n{ TTMSFNCCustomSignatureCapture }\r\n\r\nprocedure TTMSFNCCustomSignatureCapture.ChangeDPIScale(M, D: Integer);\r\nbegin\r\n inherited;\r\n FFont.Height := TTMSFNCUtils.MulDivInt(FFont.Height, M, D);\r\nend;\r\n\r\nprocedure TTMSFNCCustomSignatureCapture.ClearSignChanged(Sender: TObject);\r\nbegin\r\n Invalidate;\r\nend;\r\n\r\nconstructor TTMSFNCCustomSignatureCapture.Create(AOwner: TComponent);\r\nbegin\r\n inherited;\r\n Width := 400;\r\n Height := 300;\r\n FDrawing := False;\r\n FText := 'Sign here.';\r\n\r\n FBmpStream := TBitmap.Create;\r\n FSignaturePoints := TTMSFNCSignatureCapturePoints.Create;\r\n FPen := TTMSFNCGraphicsStroke.Create;\r\n FPen.Color := gcBlack;\r\n FTextPosition := TTMSFNCSignatureCaptureTextPosition.Create;\r\n FClearSig := TTMSFNCSignatureCaptureClearPosition.Create;\r\n FClearRect := RectF(0, 0, 0, 0);\r\n FFont := TTMSFNCGraphicsFont.Create;\r\n FClearSig.OnChange := @ClearSignChanged;\r\n FTextPosition.OnChange := @TextPositionChanged;\r\n\r\n {$IFDEF CMNLIB}\r\n {$IFDEF MSWINDOWS}\r\n NativeCanvas := True;\r\n {$ENDIF}\r\n {$ENDIF}\r\nend;\r\n\r\ndestructor TTMSFNCCustomSignatureCapture.Destroy;\r\nbegin\r\n FBmpStream.Free;\r\n FSignaturePoints.Free;\r\n FPen.Free;\r\n FTextPosition.Free;\r\n FClearSig.Free;\r\n FFont.Free;\r\n inherited;\r\nend;\r\n\r\nprocedure TTMSFNCCustomSignatureCapture.Draw(AGraphics: TTMSFNCGraphics;\r\n ARect: TRectF);\r\nvar\r\n cr: TRectF;\r\nbegin\r\n if not FExport then\r\n begin\r\n inherited;\r\n cr := ARect;\r\n DrawSignText(AGraphics, ARect, cr);\r\n FClearRect := GetClearRect(cr);\r\n DrawClearIcon(AGraphics, FClearRect);\r\n end;\r\n DrawSignature(AGraphics);\r\nend;\r\n\r\nprocedure TTMSFNCCustomSignatureCapture.DrawClearIcon(\r\n AGraphics: TTMSFNCGraphics; ARect: TRectF);\r\nbegin\r\n if Assigned(FClearSig.Image) and not IsBitmapEmpty(FClearSig.Image) and (FClearSig.Position <> cpNone) then\r\n begin\r\n// AGraphics.DrawBitmap(ARect.Left, ARect.Top, FClearSig.Image, true, true);\r\n AGraphics.DrawBitmap(ARect, FClearSig.Image, true, true);\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomSignatureCapture.DrawSignature(\r\n AGraphics: TTMSFNCGraphics);\r\nvar\r\n I: Integer;\r\n sp: TTMSFNCSignatureCaptureStoredPoint;\r\nbegin\r\n if FSignaturePoints.Count >= 2 then\r\n begin\r\n for I := 0 to FSignaturePoints.Count - 2 do\r\n begin\r\n if FSignaturePoints.Items[I+1].DrawLine then\r\n begin\r\n sp := FSignaturePoints.Items[I];\r\n AGraphics.Stroke.Color := sp.PenColor;\r\n AGraphics.Stroke.Width := sp.PenWidth;\r\n AGraphics.DrawLine(PointF(FSignaturePoints.Items[I].X, FSignaturePoints.Items[I].Y), PointF(FSignaturePoints.Items[I+1].X, FSignaturePoints.Items[I+1].Y));\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomSignatureCapture.DrawSignText(AGraphics: TTMSFNCGraphics;\r\n ARect: TRectF; var ACRect: TRectF);\r\nvar\r\n th, tw: Single;\r\n tp: TPointF;\r\nbegin\r\n AGraphics.Font.AssignSource(Font);\r\n\r\n th := AGraphics.CalculateTextHeight(Text) + ScalePaintValue(2 * TEXTMARGIN);\r\n tw := AGraphics.CalculateTextWidth(Text);\r\n\r\n case FTextPosition.Position of\r\n tpBottomCenter, tpBottomLeft, tpBottomRight:\r\n begin\r\n AGraphics.Stroke.Assign(FTextPosition.Line);\r\n AGraphics.DrawLine(PointF(0, ARect.Bottom - th), PointF(ARect.Right, ARect.Bottom - th));\r\n ACRect.Bottom := ACRect.Bottom - th;\r\n end;\r\n tpTopCenter, tpTopLeft, tpTopRight:\r\n begin\r\n AGraphics.Stroke.Assign(FTextPosition.Line);\r\n AGraphics.DrawLine(PointF(0, ARect.Top + th), PointF(ARect.Right, ARect.Top + th));\r\n ACRect.Top := ACRect.Top + th;\r\n end;\r\n end;\r\n\r\n if FTextPosition.Position <> tpNone then\r\n begin\r\n case FTextPosition.Position of\r\n tpBottomCenter: tp := PointF((ARect.Right - ARect.Left) / 2 - tw / 2, ARect.Bottom - th + ScalePaintValue(TEXTMARGIN));\r\n tpBottomLeft: tp := PointF(TEXTMARGIN, ARect.Bottom - th + ScalePaintValue(TEXTMARGIN));\r\n tpBottomRight: tp := PointF(ARect.Right - tw - ScalePaintValue(TEXTMARGIN), ARect.Bottom - th + ScalePaintValue(TEXTMARGIN));\r\n tpTopCenter: tp := PointF((ARect.Right - ARect.Left) / 2 - tw / 2, ARect.Top + ScalePaintValue(TEXTMARGIN));\r\n tpTopLeft: tp := PointF(ScalePaintValue(TEXTMARGIN), ARect.Top + ScalePaintValue(TEXTMARGIN));\r\n tpTopRight: tp := PointF(ARect.Right - tw - ScalePaintValue(TEXTMARGIN), ARect.Top + ScalePaintValue(TEXTMARGIN));\r\n tpXY: tp := PointF(FTextPosition.X, FTextPosition.Y);\r\n end;\r\n\r\n AGraphics.DrawText(tp, Text);\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCCustomSignatureCapture.GetClearRect(ARect: TRectF): TRectF;\r\nvar\r\n w, h: Single;\r\nbegin\r\n w := ScalePaintValue(FClearSig.Image.Width);\r\n h := ScalePaintValue(FClearSig.Image.Height);\r\n\r\n case FClearSig.Position of\r\n cpBottomCenter:\r\n begin\r\n Result.Top := ARect.Bottom - h - ScalePaintValue(CLEARMARGIN);\r\n Result.Left := (ARect.Right - ARect.Left - w) / 2;\r\n end;\r\n cpBottomLeft:\r\n begin\r\n Result.Top := ARect.Bottom - h - ScalePaintValue(CLEARMARGIN);\r\n Result.Left := ARect.Left + ScalePaintValue(CLEARMARGIN);\r\n end;\r\n cpBottomRight:\r\n begin\r\n Result.Top := ARect.Bottom - h - ScalePaintValue(CLEARMARGIN);\r\n Result.Left := ARect.Right - ScalePaintValue(CLEARMARGIN) - w;\r\n end;\r\n cpTopCenter:\r\n begin\r\n Result.Top := ARect.Top + ScalePaintValue(CLEARMARGIN);\r\n Result.Left := (ARect.Right - ARect.Left - w) / 2;\r\n end;\r\n cpTopLeft:\r\n begin\r\n Result.Top := ARect.Top + ScalePaintValue(CLEARMARGIN);\r\n Result.Left := ARect.Left + ScalePaintValue(CLEARMARGIN);\r\n end;\r\n cpTopRight:\r\n begin\r\n Result.Top := ARect.Top + ScalePaintValue(CLEARMARGIN);\r\n Result.Left := ARect.Right - ScalePaintValue(CLEARMARGIN) - w;\r\n end;\r\n cpXY:\r\n begin\r\n Result.Top := FClearSig.Y;\r\n Result.Left := FClearSig.X;\r\n end;\r\n end;\r\n\r\n Result.Right := Result.Left + w;\r\n Result.Bottom := Result.Top + h;\r\n\r\n FClearRect := Result;\r\nend;\r\n\r\n{$IFDEF WEBLIB}\r\nfunction TTMSFNCCustomSignatureCapture.GetBase64Img: string;\r\nbegin\r\n FExport := True;\r\n Invalidate;\r\n Result := Canvas.GetBase64Image;\r\n FExport := False;\r\n Invalidate;\r\nend;\r\n{$ENDIF}\r\n\r\nfunction TTMSFNCCustomSignatureCapture.GetEmpty: Boolean;\r\nbegin\r\n Result := FSignaturePoints.Count = 0;\r\nend;\r\n\r\nfunction TTMSFNCCustomSignatureCapture.GetVersion: string;\r\nbegin\r\n Result := GetVersionNumber(MAJ_VER, MIN_VER, REL_VER, BLD_VER);\r\nend;\r\n\r\nprocedure TTMSFNCCustomSignatureCapture.HandleMouseDown(\r\n Button: TTMSFNCMouseButton; Shift: TShiftState; X, Y: Single);\r\nvar\r\n np: TTMSFNCSignatureCaptureStoredPoint;\r\nbegin\r\n inherited;\r\n if PtInRectEx(FClearRect, PointF(X, Y)) then\r\n begin\r\n FSignaturePoints.Clear;\r\n end\r\n else\r\n begin\r\n FDrawing := True;\r\n CaptureEx;\r\n np := TTMSFNCSignatureCaptureStoredPoint.Create;\r\n np.X := X;\r\n np.Y := Y;\r\n np.PenWidth := Pen.Width;\r\n np.PenColor := Pen.Color;\r\n np.DrawLine := False;\r\n FSignaturePoints.Add(np);\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomSignatureCapture.HandleMouseMove(Shift: TShiftState; X,\r\n Y: Single);\r\nvar\r\n np: TTMSFNCSignatureCaptureStoredPoint;\r\nbegin\r\n inherited;\r\n if FDrawing then\r\n begin\r\n np := TTMSFNCSignatureCaptureStoredPoint.Create;\r\n np.X := X;\r\n np.Y := Y;\r\n np.PenWidth := Pen.Width;\r\n np.PenColor := Pen.Color;\r\n np.DrawLine := True;\r\n FSignaturePoints.Add(np);\r\n Invalidate;\r\n end\r\n else if PtInRectEx(FClearRect, PointF(X, Y)) then\r\n begin\r\n Cursor := crHandPoint;\r\n end\r\n else\r\n Cursor := crDefault;\r\nend;\r\n\r\nprocedure TTMSFNCCustomSignatureCapture.HandleMouseUp(\r\n Button: TTMSFNCMouseButton; Shift: TShiftState; X, Y: Single);\r\nvar\r\n np: TTMSFNCSignatureCaptureStoredPoint;\r\nbegin\r\n inherited;\r\n if not PtInRectEx(FClearRect, PointF(X, Y)) then\r\n begin\r\n np := TTMSFNCSignatureCaptureStoredPoint.Create;\r\n np.X := X;\r\n np.Y := Y;\r\n np.PenWidth := Pen.Width;\r\n np.PenColor := Pen.Color;\r\n np.DrawLine := True;\r\n FSignaturePoints.Add(np);\r\n FDrawing := False;\r\n ReleaseCaptureEx;\r\n end;\r\n\r\n Invalidate;\r\nend;\r\n\r\nfunction TTMSFNCCustomSignatureCapture.IsAppearanceProperty(AObject: TObject;\r\n APropertyName: string; APropertyType: TTypeKind): Boolean;\r\nbegin\r\n Result := inherited IsAppearanceProperty(AObject, APropertyName, APropertyType);\r\n Result := Result or (APropertyName = 'Pen') or (APropertyName = 'TextPosition');\r\nend;\r\n\r\nfunction TTMSFNCCustomSignatureCapture.IsTextStored: Boolean;\r\nbegin\r\n Result := FText <> 'Sign here.';\r\nend;\r\n\r\n{$IFNDEF WEBLIB}\r\nprocedure TTMSFNCCustomSignatureCapture.LoadFromFile(FileName: string);\r\nvar\r\n ms: TMemoryStream;\r\nbegin\r\n ms := TMemoryStream.Create;\r\n try\r\n ms.LoadFromFile(FileName);\r\n ms.Position := 0;\r\n LoadFromStream(ms);\r\n finally\r\n ms.Free;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomSignatureCapture.LoadFromStream(AStream: TStream);\r\nvar\r\n I, sizeTest: Integer;\r\n point: TTMSFNCSignatureCaptureStoredPoint;\r\n {$IFDEF CMNLIB}\r\n x, y, w, f: Integer;\r\n {$ENDIF}\r\n {$IFDEF FMXLIB}\r\n x, y, w, f: Single;\r\n {$ENDIF}\r\n c: TTMSFNCGraphicsColor;\r\n d: boolean;\r\n sTest: string;\r\nbegin\r\n sizeTest := Random(50);\r\n AStream.Position := 0;\r\n AStream.Read(c, SizeOf(c));\r\n Fill.Color := c;\r\n\r\n AStream.Read(sizeTest, SizeOf(sizeTest));\r\n FSignaturePoints.Clear;\r\n for I := 0 to sizeTest - 1 do\r\n begin\r\n point := TTMSFNCSignatureCaptureStoredPoint.Create();\r\n\r\n AStream.Read(x, SizeOf(x));\r\n AStream.Read(y, SizeOf(y));\r\n AStream.Read(w, SizeOf(w));\r\n AStream.Read(c, SizeOf(c));\r\n AStream.Read(d, SizeOf(d));\r\n\r\n point.X := x;\r\n point.Y := y;\r\n point.PenWidth := w;\r\n point.PenColor := c;\r\n point.DrawLine := d;\r\n\r\n FSignaturePoints.Add(point);\r\n end;\r\n\r\n FText := ReadStringFromStream(AStream);\r\n AStream.Read(f, SizeOf(f));\r\n Font.Size := f;\r\n AStream.Read(c, SizeOf(TTMSFNCGraphicsColor));\r\n Font.Color := c;\r\n AStream.Read(i, SizeOf(Integer));\r\n {$IFNDEF LCLLIB}\r\n Font.Style := TFontStyles(Byte(I));\r\n {$ENDIF}\r\n {$IFDEF LCLLIB}\r\n Font.Style := TFontStyles(Integer(I));\r\n {$ENDIF}\r\n sTest := ReadStringFromStream(AStream);\r\n Font.Name := TFontName(sTest);\r\n Invalidate;\r\nend;\r\n\r\nfunction TTMSFNCCustomSignatureCapture.ReadStringFromStream(\r\n const Stream: TStream): string;\r\nvar\r\n n: LongInt;\r\n size: Integer;\r\nbegin\r\n Stream.Read(n, SizeOf(n));\r\n SetLength(Result, n);\r\n {$IFDEF ZEROSTRINGINDEX}\r\n size := 0;\r\n {$ELSE}\r\n size := 1;\r\n {$ENDIF}\r\n if n > 0 then Stream.Read(Result[size], n * SizeOf(Char));\r\nend;\r\n\r\nprocedure TTMSFNCCustomSignatureCapture.SaveToFile(FileName: string);\r\nvar\r\n ms: TMemoryStream;\r\nbegin\r\n ms := TMemoryStream.Create;\r\n try\r\n SaveToStream(ms);\r\n ms.SaveToFile(FileName);\r\n finally\r\n ms.Free;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomSignatureCapture.SaveToImageFile(FileName: string);\r\nvar\r\n bmp: TBitmap;\r\n g: TTMSFNCGraphics;\r\nbegin\r\n bmp := TBitmap.Create;\r\n bmp.Width := Round(Width);\r\n bmp.Height := Round(Height);\r\n g := TTMSFNCGraphics.Create(bmp.Canvas);\r\n try\r\n g.BeginScene;\r\n {$IFDEF LCLLIB}\r\n g.Fill.Color := Color;\r\n g.DrawRectangle(RectF(0, 0, Width, Height));\r\n {$ENDIF}\r\n DrawSignature(g);\r\n g.EndScene;\r\n bmp.SaveToFile(FileName);\r\n finally\r\n g.Free;\r\n bmp.Free;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomSignatureCapture.SaveToImageStream(AStream: TStream);\r\nvar\r\n bmp: TBitmap;\r\n g: TTMSFNCGraphics;\r\nbegin\r\n AStream.Position := 0;\r\n bmp := TBitmap.Create;\r\n bmp.Width := Round(Width);\r\n bmp.Height := Round(Height);\r\n g := TTMSFNCGraphics.Create(bmp.Canvas);\r\n try\r\n g.BeginScene;\r\n {$IFDEF LCLLIB}\r\n g.Fill.Color := Color;\r\n g.DrawRectangle(RectF(0, 0, Width, Height));\r\n {$ENDIF}\r\n DrawSignature(g);\r\n g.EndScene;\r\n bmp.SaveToStream(AStream);\r\n finally\r\n g.Free;\r\n bmp.Free;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomSignatureCapture.SaveToStream(AStream: TStream);\r\nvar\r\n c: TTMSFNCGraphicsColor;\r\n I: Integer;\r\n {$IFDEF FMXLIB}\r\n f: Single;\r\n {$ENDIF}\r\n {$IFDEF CMNLIB}\r\n xi, yi, wi, f: Integer;\r\n {$ENDIF}\r\n point: TTMSFNCSignatureCaptureStoredPoint;\r\nbegin\r\n AStream.Position := 0;\r\n c := Fill.Color;\r\n AStream.Write(c, SizeOf(c));\r\n AStream.Write(FSignaturePoints.Count, SizeOf(Integer(FSignaturePoints.Count)));\r\n\r\n for I := 0 to FSignaturePoints.Count - 1 do\r\n begin\r\n point := FSignaturePoints.Items[I];\r\n {$IFDEF CMNLIB}\r\n xi := Round(point.X);\r\n AStream.Write(xi, SizeOf(xi));\r\n yi := Round(point.Y);\r\n AStream.Write(yi, SizeOf(yi));\r\n wi := Round(point.PenWidth);\r\n AStream.Write(wi, SizeOf(wi));\r\n {$ENDIF}\r\n {$IFDEF FMXLIB}\r\n AStream.Write(point.X, SizeOf(point.X));\r\n AStream.Write(point.Y, SizeOf(point.Y));\r\n AStream.Write(point.PenWidth, SizeOf(point.PenWidth));\r\n {$ENDIF}\r\n AStream.Write(point.PenColor, SizeOf(point.PenColor));\r\n AStream.Write(point.DrawLine, SizeOf(point.DrawLine));\r\n end;\r\n WriteStringToStream(AStream, FText);\r\n {$IFDEF CMNLIB}\r\n f := Round(Font.Size);\r\n {$ENDIF}\r\n {$IFDEF FMXLIB}\r\n f := Font.Size;\r\n {$ENDIF}\r\n AStream.Write(f, SizeOf(f));\r\n AStream.Write(Font.Color, SizeOf(Font.Color));\r\n {$IFNDEF LCLLIB}\r\n i := Byte(Font.Style);\r\n {$ENDIF}\r\n {$IFDEF LCLLIB}\r\n i := Integer(Font.Style);\r\n {$ENDIF}\r\n AStream.Write(I, SizeOf(I));\r\n WriteStringToStream(AStream, Font.Name);\r\nend;\r\n\r\nfunction TTMSFNCCustomSignatureCapture.GetImageFromStream(\r\n AStream: TStream): TBitmap;\r\nbegin\r\n AStream.Position := 0;\r\n FBmpStream.Width := Round(Width);\r\n FBmpStream.Height := Round(Height);\r\n FBmpStream.LoadFromStream(AStream);\r\n Result := FBmpStream;\r\nend;\r\n\r\n{$ENDIF}\r\n\r\nprocedure TTMSFNCCustomSignatureCapture.SetClearSig(\r\n const Value: TTMSFNCSignatureCaptureClearPosition);\r\nbegin\r\n if FClearSig <> Value then\r\n FClearSig.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCCustomSignatureCapture.SetEmpty(const Value: Boolean);\r\nbegin\r\n if Value then\r\n FSignaturePoints.Clear;\r\nend;\r\n\r\nprocedure TTMSFNCCustomSignatureCapture.SetFnt(\r\n const Value: TTMSFNCGraphicsFont);\r\nbegin\r\n FFont.AssignSource(Value);\r\nend;\r\n\r\nprocedure TTMSFNCCustomSignatureCapture.SetPen(\r\n const Value: TTMSFNCGraphicsStroke);\r\nbegin\r\n if FPen <> Value then\r\n FPen.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCCustomSignatureCapture.SetText(const Value: string);\r\nbegin\r\n if FText <> Value then\r\n FText := Value;\r\nend;\r\n\r\nprocedure TTMSFNCCustomSignatureCapture.SetTextPosition(\r\n const Value: TTMSFNCSignatureCaptureTextPosition);\r\nbegin\r\n if FTextPosition <> Value then\r\n FTextPosition.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCCustomSignatureCapture.TextPositionChanged(Sender: TObject);\r\nbegin\r\n Invalidate;\r\nend;\r\n\r\n{$IFNDEF WEBLIB}\r\nprocedure TTMSFNCCustomSignatureCapture.WriteStringToStream(\r\n const Stream: TStream; const S: string);\r\nvar\r\n n: LongInt;\r\n size: Integer;\r\nbegin\r\n n := Length(S);\r\n Stream.Write(n, SizeOf(n));\r\n {$IFDEF ZEROSTRINGINDEX}\r\n size := 0;\r\n {$ELSE}\r\n size := 1;\r\n {$ENDIF}\r\n if n > 0 then Stream.Write(S[size], n * SizeOf(Char));\r\nend;\r\n{$ENDIF}\r\n\r\n{ TTMSFNCSignatureCaptureTextPosition }\r\n\r\nprocedure TTMSFNCSignatureCaptureTextPosition.Assign(Source: TPersistent);\r\nbegin\r\n inherited;\r\n if Source is TTMSFNCSignatureCaptureTextPosition then\r\n begin\r\n FX := (Source as TTMSFNCSignatureCaptureTextPosition).X;\r\n FY := (Source as TTMSFNCSignatureCaptureTextPosition).Y;\r\n FPosition := (Source as TTMSFNCSignatureCaptureTextPosition).Position;\r\n FLine.Assign((Source as TTMSFNCSignatureCaptureTextPosition).Line);\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCSignatureCaptureTextPosition.Changed;\r\nbegin\r\n if Assigned(OnChange) then\r\n OnChange(Self);\r\nend;\r\n\r\nconstructor TTMSFNCSignatureCaptureTextPosition.Create;\r\nbegin\r\n FX := 25;\r\n FY := 25;\r\n FPosition := tpBottomCenter;\r\n FLine := TTMSFNCGraphicsStroke.Create;\r\n FLine.Color := gcGray;\r\n FLine.Width := 1;\r\nend;\r\n\r\ndestructor TTMSFNCSignatureCaptureTextPosition.Destroy;\r\nbegin\r\n FLine.Free;\r\n inherited;\r\nend;\r\n\r\nfunction TTMSFNCSignatureCaptureTextPosition.IsXStored: Boolean;\r\nbegin\r\n Result := FX <> 25.0;\r\nend;\r\n\r\nfunction TTMSFNCSignatureCaptureTextPosition.IsYStored: Boolean;\r\nbegin\r\n Result := FY <> 25.0;\r\nend;\r\n\r\nprocedure TTMSFNCSignatureCaptureTextPosition.SetLine(\r\n const Value: TTMSFNCGraphicsStroke);\r\nbegin\r\n if FLine <> Value then\r\n FLine.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCSignatureCaptureTextPosition.SetPosition(\r\n const Value: TTMSFNCSignatureCaptureTextHintPosition);\r\nbegin\r\n if FPosition <> Value then\r\n begin\r\n FPosition := Value;\r\n Changed;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCSignatureCaptureTextPosition.SetX(const Value: Single);\r\nbegin\r\n if FX <> Value then\r\n begin\r\n FX := Value;\r\n Changed;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCSignatureCaptureTextPosition.SetY(const Value: Single);\r\nbegin\r\n if FY <> Value then\r\n begin\r\n FY := Value;\r\n Changed;\r\n end;\r\nend;\r\n\r\n{ TTMSFNCSignatureCapturePoints }\r\n\r\n{$IFDEF WEBLIB}\r\nfunction TTMSFNCSignatureCapturePoints.GetItem(Index: Integer): TTMSFNCSignatureCaptureStoredPoint;\r\nbegin\r\n Result := TTMSFNCSignatureCaptureStoredPoint(inherited Items[Index]);\r\nend;\r\n\r\nprocedure TTMSFNCSignatureCapturePoints.SetItem(Index: Integer; const Value: TTMSFNCSignatureCaptureStoredPoint);\r\nbegin\r\n inherited Items[Index] := Value;\r\nend;\r\n{$ENDIF}\r\n\r\n{ TTMSFNCSignatureCaptureClearPosition }\r\n\r\nprocedure TTMSFNCSignatureCaptureClearPosition.Assign(Source: TPersistent);\r\nbegin\r\n inherited;\r\n if (Source is TTMSFNCSignatureCaptureClearPosition) then\r\n begin\r\n FX := (Source as TTMSFNCSignatureCaptureClearPosition).X;\r\n FY := (Source as TTMSFNCSignatureCaptureClearPosition).Y;\r\n FPosition := (Source as TTMSFNCSignatureCaptureClearPosition).Position;\r\n FImage.Assign((Source as TTMSFNCSignatureCaptureClearPosition).Image);\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCSignatureCaptureClearPosition.Changed;\r\nbegin\r\n if Assigned(OnChange) then\r\n OnChange(Self);\r\nend;\r\n\r\nconstructor TTMSFNCSignatureCaptureClearPosition.Create;\r\nbegin\r\n FPosition := cpBottomLeft;\r\n FImage := TTMSFNCBitmap.Create;\r\n {$IFNDEF WEBLIB}\r\n FImage.LoadFromResource('TMSFNCSIGNATURECAPTURECLEAR', HInstance);\r\n {$ENDIF}\r\n {$IFDEF WEBLIB}\r\n FImage.LoadFromResource(TTMSFNCSIGNATURECAPTURECLEAR, HInstance);\r\n {$ENDIF}\r\n FImage.OnChange := @ImageChanged;\r\nend;\r\n\r\ndestructor TTMSFNCSignatureCaptureClearPosition.Destroy;\r\nbegin\r\n FImage.Free;\r\n inherited;\r\nend;\r\n\r\nprocedure TTMSFNCSignatureCaptureClearPosition.ImageChanged(Sender: TObject);\r\nbegin\r\n Changed;\r\nend;\r\n\r\nfunction TTMSFNCSignatureCaptureClearPosition.IsXStored: Boolean;\r\nbegin\r\n Result := FX <> 0.0;\r\nend;\r\n\r\nfunction TTMSFNCSignatureCaptureClearPosition.IsYStored: Boolean;\r\nbegin\r\n Result := FY <> 0.0;\r\nend;\r\n\r\nprocedure TTMSFNCSignatureCaptureClearPosition.SetImage(\r\n const Value: TTMSFNCBitmap);\r\nbegin\r\n FImage.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCSignatureCaptureClearPosition.SetPosition(\r\n const Value: TTMSFNCSignatureCaptureClearSignPosition);\r\nbegin\r\n if FPosition <> Value then\r\n begin\r\n FPosition := Value;\r\n Changed;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCSignatureCaptureClearPosition.SetX(const Value: Single);\r\nbegin\r\n if FX <> Value then\r\n begin\r\n FX := Value;\r\n Changed;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCSignatureCaptureClearPosition.SetY(const Value: Single);\r\nbegin\r\n if FY <> Value then\r\n begin\r\n FY := Value;\r\n Changed;\r\n end;\r\nend;\r\n\r\n{$IFDEF WEBLIB}\r\ninitialization\r\nbegin\r\n TTMSFNCBitmap.CreateFromResource(TTMSFNCSIGNATURECAPTURECLEAR);\r\nend;\r\n{$ENDIF}\r\n\r\nend.\r\n","{********************************************************************}\r\n{ }\r\n{ written by TMS Software }\r\n{ copyright (c) 2018 - 2024 }\r\n{ Email : info@tmssoftware.com }\r\n{ Web : https://www.tmssoftware.com }\r\n{ }\r\n{ The source code is given as is. The author is not responsible }\r\n{ for any possible damage done due to the use of this code. }\r\n{ The complete source code remains property of the author and may }\r\n{ not be distributed, published, given or sold in any form as such. }\r\n{ No parts of the source code can be included in any other component }\r\n{ or application without written authorization of the author. }\r\n{********************************************************************}\r\n\r\nunit WEBLib.TMSFNCCalendar;\r\n\r\n{$I WEBLib.TMSFNCDefines.inc}\r\n\r\ninterface\r\n\r\nuses\r\n {$IFDEF WIN32}\r\n Windows,\r\n {$ENDIF}\r\n {$IFNDEF WEBLIB}\r\n {$IFNDEF LCLLIB}\r\n UITypes,\r\n {$ENDIF}\r\n {$ENDIF}\r\n {$IFDEF FMXLIB}\r\n WEBLib.ExtCtrls,\r\n {$ENDIF}\r\n {$IFDEF VCLLIB}\r\n Vcl.Menus,\r\n {$ENDIF}\r\n {$IFDEF WEBLIB}\r\n WEBLib.Menus,\r\n {$ENDIF}\r\n {$IFDEF LCLLIB}\r\n Menus,\r\n {$ENDIF}\r\n Classes, Types, TypInfo, WEBLib.Controls, WEBLib.Graphics, WEBLib.TMSFNCCustomControl, WEBLib.TMSFNCGraphics,\r\n WEBLib.TMSFNCGraphicsTypes, WEBLib.TMSFNCTypes, WEBLib.TMSFNCUtils, WEBLib.TMSFNCBitmapContainer, SysUtils,\r\n WEBLib.TMSFNCStyles;\r\n\r\nconst\r\n MAJ_VER = 1; // Major version nr.\r\n MIN_VER = 0; // Minor version nr.\r\n REL_VER = 4; // Release nr.\r\n BLD_VER = 1; // Build nr.\r\n\r\n //Version history\r\n //v1.0.0.0 : First Release\r\n //v1.0.0.1 : Improved : ShowFocus property under DateAppearance to remove the dotted border around the focused date\r\n //v1.0.1.0 : New : Added DayNameAppearance.Height property\r\n // : New : Added OnNavigateBack, OnNavigateForward and OnNavigateFooter events\r\n //v1.0.2.0 : New : Support for high dpi\r\n //v1.0.2.1 : Improved: Exposed Date and Day properties to have more control over design-time view\r\n //v1.0.3.0 : New : GlobalFont interface implemented\r\n // : New : Updated initial look\r\n //v1.0.3.1 : Improved : Date selection handling\r\n //v1.0.3.2 : Fixed : Issue calculating week numbers\r\n //v1.0.3.3 : Fixed : Issue with calculating days before and after a displayed month\r\n //v1.0.4.0 : New : Added month and year selectors\r\n //v1.0.4.1 : Fixed : Issue with badge gradients\r\n\r\ntype\r\n TTMSFNCCustomCalendar = class;\r\n TTMSFNCCalendarArrowLayoutValue = (alvLeft, alvRight);\r\n TTMSFNCCalendarArrowLayout = set of TTMSFNCCalendarArrowLayoutValue;\r\n\r\n TTMSFNCCalendarArrowType = (atTriangle, atArrow, atBitmap, atCustom);\r\n\r\n {$IFNDEF WEBLIB}\r\n TTMSFNCCalendarArrow = class(TTMSFNCPersistent, ITMSFNCBitmapContainer)\r\n {$ENDIF}\r\n {$IFDEF WEBLIB}\r\n TTMSFNCCalendarArrow = class(TTMSFNCPersistent)\r\n {$ENDIF}\r\n private\r\n FOwner: TPersistent;\r\n FColor: TTMSFNCGraphicsColor;\r\n FVisibility: TTMSFNCCalendarArrowLayout;\r\n FSize: Integer;\r\n FOnChange: TNotifyEvent;\r\n FArrowLeftType: TTMSFNCCalendarArrowType;\r\n FArrowLeftBitmap: TTMSFNCScaledBitmaps;\r\n FArrowRightBitmap: TTMSFNCScaledBitmaps;\r\n FArrowRightBitmapSize: Single;\r\n FArrowRightType: TTMSFNCCalendarArrowType;\r\n FArrowLeftBitmapSize: Single;\r\n procedure SetColor(const Value: TTMSFNCGraphicsColor);\r\n procedure SetVisibility(const Value: TTMSFNCCalendarArrowLayout);\r\n procedure SetSize(const Value: Integer);\r\n procedure SetArrowLeftBitmap(const Value: TTMSFNCScaledBitmaps);\r\n procedure SetArrowRightBitmap(const Value: TTMSFNCScaledBitmaps);\r\n procedure SetArrowLeftBitmapSize(const Value: Single);\r\n procedure SetArrowLeftType(const Value: TTMSFNCCalendarArrowType);\r\n procedure SetArrowRightBitmapSize(const Value: Single);\r\n procedure SetArrowRightType(const Value: TTMSFNCCalendarArrowType);\r\n procedure SetBitmapContainer(const Value: TTMSFNCBitmapContainer);\r\n function GetBitmapContainer: TTMSFNCBitmapContainer;\r\n function IsArrowLeftBitmapSizeStored: Boolean;\r\n function IsArrowRightBitmapSizeStore: Boolean;\r\n protected\r\n procedure Changed;\r\n function GetOwner: TPersistent; override;\r\n property BitmapContainer: TTMSFNCBitmapContainer read GetBitmapContainer write SetBitmapContainer;\r\n public\r\n constructor Create(AOwner: TComponent);\r\n destructor Destroy; override;\r\n procedure Assign(Source: TPersistent); override;\r\n property Size: Integer read FSize write SetSize default 15;\r\n property OnChange: TNotifyEvent read FOnChange write FOnChange;\r\n published\r\n property ArrowLeftBitmap: TTMSFNCScaledBitmaps read FArrowLeftBitmap write SetArrowLeftBitmap;\r\n property ArrowLeftType: TTMSFNCCalendarArrowType read FArrowLeftType write SetArrowLeftType default atArrow;\r\n property ArrowLeftBitmapSize: Single read FArrowLeftBitmapSize write SetArrowLeftBitmapSize stored IsArrowLeftBitmapSizeStored nodefault;\r\n property ArrowRightBitmap: TTMSFNCScaledBitmaps read FArrowRightBitmap write SetArrowRightBitmap;\r\n property ArrowRightType: TTMSFNCCalendarArrowType read FArrowRightType write SetArrowRightType default atArrow;\r\n property ArrowRightBitmapSize: Single read FArrowRightBitmapSize write SetArrowRightBitmapSize stored IsArrowRightBitmapSizeStore nodefault;\r\n property Color: TTMSFNCGraphicsColor read FColor write SetColor default gcDimgray;\r\n property Visibility: TTMSFNCCalendarArrowLayout read FVisibility write SetVisibility default [alvLeft, alvRight];\r\n end;\r\n\r\n TTMSFNCCalendarHeader = class(TPersistent)\r\n private\r\n FFill: TTMSFNCGraphicsFill;\r\n FFont: TTMSFNCGraphicsFont;\r\n FStroke: TTMSFNCGraphicsStroke;\r\n FVerticalTextAlign: TTMSFNCGraphicsTextAlign;\r\n FHorizontalTextAlign: TTMSFNCGraphicsTextAlign;\r\n FArrow: TTMSFNCCalendarArrow;\r\n FVisible: Boolean;\r\n FOnChange: TNotifyEvent;\r\n FHeight: Integer;\r\n procedure SetFill(const Value: TTMSFNCGraphicsFill);\r\n procedure SetFont(const Value: TTMSFNCGraphicsFont);\r\n procedure SetHorizontalTextAlign(const Value: TTMSFNCGraphicsTextAlign);\r\n procedure SetVerticalTextAlign(const Value: TTMSFNCGraphicsTextAlign);\r\n procedure SetStroke(const Value: TTMSFNCGraphicsStroke);\r\n procedure SetArrow(const Value: TTMSFNCCalendarArrow);\r\n procedure SetVisible(const Value: Boolean);\r\n procedure SetHeight(const Value: Integer);\r\n protected\r\n procedure Changed;\r\n procedure FillChanged(Sender: TObject);\r\n procedure FontChanged(Sender: TObject);\r\n procedure StrokeChanged(Sender: TObject);\r\n public\r\n constructor Create(AOwner: TComponent);\r\n destructor Destroy; override;\r\n procedure Assign(Source: TPersistent); override;\r\n property OnChange: TNotifyEvent read FOnChange write FOnChange;\r\n published\r\n property Arrow: TTMSFNCCalendarArrow read FArrow write SetArrow;\r\n property Height: Integer read FHeight write SetHeight default 25;\r\n property Fill: TTMSFNCGraphicsFill read FFill write SetFill;\r\n property Font: TTMSFNCGraphicsFont read FFont write SetFont;\r\n property Stroke: TTMSFNCGraphicsStroke read FStroke write SetStroke;\r\n property Visible: Boolean read FVisible write SetVisible default True;\r\n property VerticalTextAlign: TTMSFNCGraphicsTextAlign read FVerticalTextAlign write SetVerticalTextAlign default gtaCenter;\r\n property HorizontalTextAlign: TTMSFNCGraphicsTextAlign read FHorizontalTextAlign write SetHorizontalTextAlign default gtaCenter;\r\n end;\r\n\r\n TTMSFNCCalendarFooterDate = (fdNone, fdSelected, fdToday);\r\n\r\n TTMSFNCCalendarFooter = class(TPersistent)\r\n private\r\n FFill: TTMSFNCGraphicsFill;\r\n FFont: TTMSFNCGraphicsFont;\r\n FStroke: TTMSFNCGraphicsStroke;\r\n FVerticalTextAlign: TTMSFNCGraphicsTextAlign;\r\n FHorizontalTextAlign: TTMSFNCGraphicsTextAlign;\r\n FCaption: string;\r\n FVisible: Boolean;\r\n FDateCaption: TTMSFNCCalendarFooterDate;\r\n FOnChange: TNotifyEvent;\r\n FHeight: Integer;\r\n FCaptionRect: TRectF;\r\n procedure SetFill(const Value: TTMSFNCGraphicsFill);\r\n procedure SetFont(const Value: TTMSFNCGraphicsFont);\r\n procedure SetHorizontalTextAlign(const Value: TTMSFNCGraphicsTextAlign);\r\n procedure SetVerticalTextAlign(const Value: TTMSFNCGraphicsTextAlign);\r\n procedure SetStroke(const Value: TTMSFNCGraphicsStroke);\r\n procedure SetCaption(const Value: string);\r\n procedure SetVisible(const Value: Boolean);\r\n procedure SetHeight(const Value: Integer);\r\n procedure SetDateCaption(const Value: TTMSFNCCalendarFooterDate);\r\n procedure SetCaptionRect(const Value: TRectF);\r\n function IsCaptionStored: Boolean;\r\n protected\r\n procedure Changed;\r\n procedure FillChanged(Sender: TObject);\r\n procedure FontChanged(Sender: TObject);\r\n procedure StrokeChanged(Sender: TObject);\r\n public\r\n constructor Create;\r\n destructor Destroy; override;\r\n procedure Assign(Source: TPersistent); override;\r\n property OnChange: TNotifyEvent read FOnChange write FOnChange;\r\n property CaptionRect: TRectF read FCaptionRect write SetCaptionRect;\r\n published\r\n property Caption: string read FCaption write SetCaption stored IsCaptionStored nodefault;\r\n property DateCaption: TTMSFNCCalendarFooterDate read FDateCaption write SetDateCaption default fdToday;\r\n property Height: Integer read FHeight write SetHeight default 25;\r\n property Fill: TTMSFNCGraphicsFill read FFill write SetFill;\r\n property Font: TTMSFNCGraphicsFont read FFont write SetFont;\r\n property Stroke: TTMSFNCGraphicsStroke read FStroke write SetStroke;\r\n property Visible: Boolean read FVisible write SetVisible default True;\r\n property VerticalTextAlign: TTMSFNCGraphicsTextAlign read FVerticalTextAlign write SetVerticalTextAlign default gtaCenter;\r\n property HorizontalTextAlign: TTMSFNCGraphicsTextAlign read FHorizontalTextAlign write SetHorizontalTextAlign default gtaCenter;\r\n end;\r\n\r\n TTMSFNCCalendarDayNameAppearance = class(TPersistent)\r\n private\r\n FFill: TTMSFNCGraphicsFill;\r\n FFont: TTMSFNCGraphicsFont;\r\n FStroke: TTMSFNCGraphicsStroke;\r\n FVerticalTextAlign: TTMSFNCGraphicsTextAlign;\r\n FHorizontalTextAlign: TTMSFNCGraphicsTextAlign;\r\n FOnChange: TNotifyEvent;\r\n FHeight: Integer;\r\n procedure SetFill(const Value: TTMSFNCGraphicsFill);\r\n procedure SetFont(const Value: TTMSFNCGraphicsFont);\r\n procedure SetHorizontalTextAlign(const Value: TTMSFNCGraphicsTextAlign);\r\n procedure SetStroke(const Value: TTMSFNCGraphicsStroke);\r\n procedure SetVerticalTextAlign(const Value: TTMSFNCGraphicsTextAlign);\r\n procedure SetHeight(const Value: Integer);\r\n protected\r\n procedure Changed;\r\n procedure FillChanged(Sender: TObject);\r\n procedure FontChanged(Sender: TObject);\r\n procedure StrokeChanged(Sender: TObject);\r\n public\r\n constructor Create; virtual;\r\n destructor Destroy; override;\r\n procedure Assign(Source: TPersistent); override;\r\n property OnChange: TNotifyEvent read FOnChange write FOnChange;\r\n published\r\n property Height: Integer read FHeight write SetHeight default 15;\r\n property Fill: TTMSFNCGraphicsFill read FFill write SetFill;\r\n property Font: TTMSFNCGraphicsFont read FFont write SetFont;\r\n property Stroke: TTMSFNCGraphicsStroke read FStroke write SetStroke;\r\n property VerticalTextAlign: TTMSFNCGraphicsTextAlign read FVerticalTextAlign write SetVerticalTextAlign default gtaCenter;\r\n property HorizontalTextAlign: TTMSFNCGraphicsTextAlign read FHorizontalTextAlign write SetHorizontalTextAlign default gtaCenter;\r\n end;\r\n\r\n TTMSFNCCalendarDateAppearance = class(TPersistent)\r\n private\r\n FFill: TTMSFNCGraphicsFill;\r\n FFont: TTMSFNCGraphicsFont;\r\n FStroke: TTMSFNCGraphicsStroke;\r\n FVerticalTextAlign: TTMSFNCGraphicsTextAlign;\r\n FHorizontalTextAlign: TTMSFNCGraphicsTextAlign;\r\n FSelectedFill: TTMSFNCGraphicsFill;\r\n FSelectedFont: TTMSFNCGraphicsFont;\r\n FSelectedStroke: TTMSFNCGraphicsStroke;\r\n FSelectedVerticalTextAlign: TTMSFNCGraphicsTextAlign;\r\n FSelectedHorizontalTextAlign: TTMSFNCGraphicsTextAlign;\r\n FDisabledFill: TTMSFNCGraphicsFill;\r\n FDisabledFont: TTMSFNCGraphicsFont;\r\n FDisabledStroke: TTMSFNCGraphicsStroke;\r\n FDateBeforeFill: TTMSFNCGraphicsFill;\r\n FDateBeforeFont: TTMSFNCGraphicsFont;\r\n FDateBeforeStroke: TTMSFNCGraphicsStroke;\r\n FDateAfterFont: TTMSFNCGraphicsFont;\r\n FDateAfterFill: TTMSFNCGraphicsFill;\r\n FDateAfterStroke: TTMSFNCGraphicsStroke;\r\n FShowDaysBefore, FShowDaysAfter: Boolean;\r\n FOnChange: TNotifyEvent;\r\n FTodayFill: TTMSFNCGraphicsFill;\r\n FBadgeFont: TTMSFNCGraphicsFont;\r\n FTodayStroke: TTMSFNCGraphicsStroke;\r\n FBadgeFill: TTMSFNCGraphicsFill;\r\n FBadgeStroke: TTMSFNCGraphicsStroke;\r\n FTodayFont: TTMSFNCGraphicsFont;\r\n FShowFocus: Boolean;\r\n procedure SetFill(const Value: TTMSFNCGraphicsFill);\r\n procedure SetFont(const Value: TTMSFNCGraphicsFont);\r\n procedure SetHorizontalTextAlign(const Value: TTMSFNCGraphicsTextAlign);\r\n procedure SetStroke(const Value: TTMSFNCGraphicsStroke);\r\n procedure SetVerticalTextAlign(const Value: TTMSFNCGraphicsTextAlign);\r\n procedure SetSelectedFill(const Value: TTMSFNCGraphicsFill);\r\n procedure SetSelectedFont(const Value: TTMSFNCGraphicsFont);\r\n procedure SetSelectedHorizontalTextAlign(const Value: TTMSFNCGraphicsTextAlign);\r\n procedure SetSelectedStroke(const Value: TTMSFNCGraphicsStroke);\r\n procedure SetSelectedVerticalTextAlign(const Value: TTMSFNCGraphicsTextAlign);\r\n procedure SetDisabledFill(const Value: TTMSFNCGraphicsFill);\r\n procedure SetDisabledFont(const Value: TTMSFNCGraphicsFont);\r\n procedure SetDisabledStroke(const Value: TTMSFNCGraphicsStroke);\r\n procedure SetDateAfterFill(const Value: TTMSFNCGraphicsFill);\r\n procedure SetDateAfterFont(const Value: TTMSFNCGraphicsFont);\r\n procedure SetDateBeforeFill(const Value: TTMSFNCGraphicsFill);\r\n procedure SetDateBeforeFont(const Value: TTMSFNCGraphicsFont);\r\n procedure SetShowDaysAfter(const Value: Boolean);\r\n procedure SetShowDaysBefore(const Value: Boolean);\r\n procedure SetDateAfterStroke(const Value: TTMSFNCGraphicsStroke);\r\n procedure SetDateBeforeStroke(const Value: TTMSFNCGraphicsStroke);\r\n procedure SetBadgeFill(const Value: TTMSFNCGraphicsFill);\r\n procedure SetBadgeFont(const Value: TTMSFNCGraphicsFont);\r\n procedure SetBadgeStroke(const Value: TTMSFNCGraphicsStroke);\r\n procedure SetTodayFill(const Value: TTMSFNCGraphicsFill);\r\n procedure SetTodayFont(const Value: TTMSFNCGraphicsFont);\r\n procedure SetTodayStroke(const Value: TTMSFNCGraphicsStroke);\r\n procedure SetShowFocus(const Value: Boolean);\r\n protected\r\n procedure Changed;\r\n procedure FillChanged(Sender: TObject);\r\n procedure FontChanged(Sender: TObject);\r\n procedure StrokeChanged(Sender: TObject);\r\n public\r\n constructor Create; virtual;\r\n destructor Destroy; override;\r\n procedure Assign(Source: TPersistent); override;\r\n property OnChange: TNotifyEvent read FOnChange write FOnChange;\r\n published\r\n property Fill: TTMSFNCGraphicsFill read FFill write SetFill;\r\n property Font: TTMSFNCGraphicsFont read FFont write SetFont;\r\n property Stroke: TTMSFNCGraphicsStroke read FStroke write SetStroke;\r\n property VerticalTextAlign: TTMSFNCGraphicsTextAlign read FVerticalTextAlign write SetVerticalTextAlign default gtaCenter;\r\n property HorizontalTextAlign: TTMSFNCGraphicsTextAlign read FHorizontalTextAlign write SetHorizontalTextAlign default gtaCenter;\r\n property SelectedFill: TTMSFNCGraphicsFill read FSelectedFill write SetSelectedFill;\r\n property SelectedFont: TTMSFNCGraphicsFont read FSelectedFont write SetSelectedFont;\r\n property SelectedStroke: TTMSFNCGraphicsStroke read FSelectedStroke write SetSelectedStroke;\r\n property SelectedVerticalTextAlign: TTMSFNCGraphicsTextAlign read FSelectedVerticalTextAlign write SetSelectedVerticalTextAlign default gtaCenter;\r\n property SelectedHorizontalTextAlign: TTMSFNCGraphicsTextAlign read FSelectedHorizontalTextAlign write SetSelectedHorizontalTextAlign default gtaCenter;\r\n property DisabledFill: TTMSFNCGraphicsFill read FDisabledFill write SetDisabledFill;\r\n property DisabledFont: TTMSFNCGraphicsFont read FDisabledFont write SetDisabledFont;\r\n property DisabledStroke: TTMSFNCGraphicsStroke read FDisabledStroke write SetDisabledStroke;\r\n property ShowDaysBefore: Boolean read FShowDaysBefore write SetShowDaysBefore default False;\r\n property ShowDaysAfter: Boolean read FShowDaysAfter write SetShowDaysAfter default False;\r\n property DateBeforeFill: TTMSFNCGraphicsFill read FDateBeforeFill write SetDateBeforeFill;\r\n property DateBeforeFont: TTMSFNCGraphicsFont read FDateBeforeFont write SetDateBeforeFont;\r\n property DateBeforeStroke: TTMSFNCGraphicsStroke read FDateBeforeStroke write SetDateBeforeStroke;\r\n property DateAfterFill: TTMSFNCGraphicsFill read FDateAfterFill write SetDateAfterFill;\r\n property DateAfterFont: TTMSFNCGraphicsFont read FDateAfterFont write SetDateAfterFont;\r\n property DateAfterStroke: TTMSFNCGraphicsStroke read FDateAfterStroke write SetDateAfterStroke;\r\n property TodayFill: TTMSFNCGraphicsFill read FTodayFill write SetTodayFill;\r\n property TodayFont: TTMSFNCGraphicsFont read FTodayFont write SetTodayFont;\r\n property TodayStroke: TTMSFNCGraphicsStroke read FTodayStroke write SetTodayStroke;\r\n property BadgeFill: TTMSFNCGraphicsFill read FBadgeFill write SetBadgeFill;\r\n property BadgeFont: TTMSFNCGraphicsFont read FBadgeFont write SetBadgeFont;\r\n property BadgeStroke: TTMSFNCGraphicsStroke read FBadgeStroke write SetBadgeStroke;\r\n property ShowFocus: Boolean read FShowFocus write SetShowFocus default True;\r\n end;\r\n\r\n TTMSFNCCalendarLineAppearance = class(TPersistent)\r\n private\r\n FStroke: TTMSFNCGraphicsStroke;\r\n FOnChange: TNotifyEvent;\r\n procedure SetStroke(const Value: TTMSFNCGraphicsStroke);\r\n protected\r\n procedure Changed;\r\n procedure StrokeChanged(Sender: TObject);\r\n public\r\n constructor Create; virtual;\r\n destructor Destroy; override;\r\n procedure Assign(Source: TPersistent); override;\r\n property OnChange: TNotifyEvent read FOnChange write FOnChange;\r\n published\r\n property Stroke: TTMSFNCGraphicsStroke read FStroke write SetStroke;\r\n end;\r\n\r\n TTMSFNCCalendarWeekNumberAppearance = class(TPersistent)\r\n private\r\n FOnChange: TNotifyEvent;\r\n FVisible: Boolean;\r\n FFont: TTMSFNCGraphicsFont;\r\n FFill: TTMSFNCGraphicsFill;\r\n FStroke: TTMSFNCGraphicsStroke;\r\n FVerticalTextAlign: TTMSFNCGraphicsTextAlign;\r\n FHorizontalTextAlign: TTMSFNCGraphicsTextAlign;\r\n procedure SetFill(const Value: TTMSFNCGraphicsFill);\r\n procedure SetFont(const Value: TTMSFNCGraphicsFont);\r\n procedure SetStroke(const Value: TTMSFNCGraphicsStroke);\r\n procedure SetVisible(const Value: Boolean);\r\n procedure SetHorizontalTextAlign(const Value: TTMSFNCGraphicsTextAlign);\r\n procedure SetVerticalTextAlign(const Value: TTMSFNCGraphicsTextAlign);\r\n protected\r\n procedure Changed;\r\n procedure FillChanged(Sender: TObject);\r\n procedure FontChanged(Sender: TObject);\r\n procedure StrokeChanged(Sender: TObject);\r\n public\r\n constructor Create; virtual;\r\n destructor Destroy; override;\r\n procedure Assign(Source: TPersistent); override;\r\n property OnChange: TNotifyEvent read FOnChange write FOnChange;\r\n published\r\n property Visible: Boolean read FVisible write SetVisible default False;\r\n property Font: TTMSFNCGraphicsFont read FFont write SetFont;\r\n property Fill: TTMSFNCGraphicsFill read FFill write SetFill;\r\n property Stroke: TTMSFNCGraphicsStroke read FStroke write SetStroke;\r\n property VerticalTextAlign: TTMSFNCGraphicsTextAlign read FVerticalTextAlign write SetVerticalTextAlign default gtaCenter;\r\n property HorizontalTextAlign: TTMSFNCGraphicsTextAlign read FHorizontalTextAlign write SetHorizontalTextAlign default gtaCenter;\r\n end;\r\n\r\n TTMSFNCCalendarNavigationMode = (nmMonth, nmYear, nmFocusedDate, nmCustom);\r\n\r\n TTMSFNCCalendarInteractionYearOptions = class(TPersistent)\r\n private\r\n FItemsBeforeCurrentYear: Integer;\r\n FItemsAfterCurrentYear: Integer;\r\n procedure SetItemsAfterCurrentYear(const Value: Integer);\r\n procedure SetItemsBeforeCurrentYear(const Value: Integer);\r\n public\r\n constructor Create; virtual;\r\n procedure Assign(Source: TPersistent); override;\r\n published\r\n property ItemsBeforeCurrentYear: Integer read FItemsBeforeCurrentYear write SetItemsBeforeCurrentYear default 5;\r\n property ItemsAfterCurrentYear: Integer read FItemsAfterCurrentYear write SetItemsAfterCurrentYear default 5;\r\n end;\r\n\r\n TTMSFNCCalendarCustomInteraction = class(TPersistent)\r\n private\r\n FMultiSelect: Boolean;\r\n FKeyboardSupport: Boolean;\r\n FReadOnlyMode: Boolean;\r\n FNavigationMode: TTMSFNCCalendarNavigationMode;\r\n FSwipeOnHeader: Boolean;\r\n FAllowMonthSelection: Boolean;\r\n FAllowYearSelection: Boolean;\r\n FYearOptions: TTMSFNCCalendarInteractionYearOptions;\r\n procedure SetKeyboardSupport(const Value: Boolean);\r\n procedure SetMultiSelect(const Value: Boolean);\r\n procedure SetReadOnlyMode(const Value: Boolean);\r\n procedure SetNavigationMode(const Value: TTMSFNCCalendarNavigationMode);\r\n procedure SetSwipeOnHeader(const Value: Boolean);\r\n procedure SetAllowMonthSelection(const Value: Boolean);\r\n procedure SetAllowYearSelection(const Value: Boolean);\r\n procedure SetYearOptions(\r\n const Value: TTMSFNCCalendarInteractionYearOptions);\r\n protected\r\n property AllowYearSelection: Boolean read FAllowYearSelection write SetAllowYearSelection default False;\r\n property AllowMonthSelection: Boolean read FAllowMonthSelection write SetAllowMonthSelection default False;\r\n property YearOptions: TTMSFNCCalendarInteractionYearOptions read FYearOptions write SetYearOptions;\r\n property MultiSelect: Boolean read FMultiSelect write SetMultiSelect default False;\r\n property KeyboardSupport: Boolean read FKeyboardSupport write SetKeyboardSupport default True;\r\n property ReadOnlyMode: Boolean read FReadOnlyMode write SetReadOnlyMode default False;\r\n property SwipeOnHeader: Boolean read FSwipeOnHeader write SetSwipeOnHeader default False;\r\n property NavigationMode: TTMSFNCCalendarNavigationMode read FNavigationMode write SetNavigationMode default nmMonth;\r\n public\r\n constructor Create; virtual;\r\n destructor Destroy; override;\r\n procedure Assign(Source: TPersistent); override;\r\n end;\r\n\r\n TTMSFNCCalendarInteraction = class(TTMSFNCCalendarCustomInteraction)\r\n published\r\n property AllowYearSelection;\r\n property AllowMonthSelection;\r\n property YearOptions;\r\n property MultiSelect;\r\n property KeyboardSupport;\r\n property ReadOnlyMode;\r\n property SwipeOnHeader;\r\n property NavigationMode;\r\n end;\r\n\r\n TTMSFNCCalendarDateItem = class(TCollectionItem)\r\n private\r\n FDate: TDate;\r\n procedure SetDate(const Value: TDate);\r\n protected\r\n procedure Update;\r\n public\r\n procedure Assign(Source: TPersistent); override;\r\n published\r\n property Date: TDate read FDate write SetDate;\r\n end;\r\n\r\n TTMSFNCCalendarDates = class(TCollection)\r\n private\r\n FOnChange: TNotifyEvent;\r\n procedure SetItem(Index: integer; const Value: TTMSFNCCalendarDateItem);\r\n function GetItem(Index: integer): TTMSFNCCalendarDateItem;\r\n protected\r\n procedure DoChange; virtual;\r\n procedure Update(Item: TCollectionItem); override;\r\n public\r\n procedure SelectDate(ADate: TDate);\r\n procedure SelectDateInterval(ADateFrom, ADateTo: TDate);\r\n procedure UnselectDate(ADate: TDate);\r\n procedure UnselectAll;\r\n function Add: TTMSFNCCalendarDateItem;\r\n function InCollection(ADate: TDate): Boolean;\r\n property Items[Index: integer]: TTMSFNCCalendarDateItem read GetItem write SetItem;\r\n property OnChange: TNotifyEvent read FOnChange write FOnChange;\r\n end;\r\n\r\n TTMSFNCCalendarEventItem = class(TTMSFNCCalendarDateItem)\r\n private\r\n FHint: string;\r\n FBadgeValue: Integer;\r\n FBadgeColor: TTMSFNCGraphicsColor;\r\n FShowBadge: Boolean;\r\n FBadgeFontColor: TTMSFNCGraphicsColor;\r\n procedure SetBadgeColor(const Value: TTMSFNCGraphicsColor);\r\n procedure SetBadgeFontColor(const Value: TTMSFNCGraphicsColor);\r\n procedure SetBadgeValue(const Value: Integer);\r\n procedure SetHint(const Value: string);\r\n procedure SetShowBadge(const Value: Boolean);\r\n function IsHintStored: Boolean;\r\n protected\r\n procedure Update;\r\n public\r\n procedure Assign(Source: TPersistent); override;\r\n constructor Create(ACollection: TCollection); override;\r\n published\r\n property BadgeValue: Integer read FBadgeValue write SetBadgeValue default 0;\r\n property ShowBadge: Boolean read FShowBadge write SetShowBadge default True;\r\n property BadgeFontColor: TTMSFNCGraphicsColor read FBadgeFontColor write SetBadgeFontColor default gcNull;\r\n property BadgeColor: TTMSFNCGraphicsColor read FBadgeColor write SetBadgeColor default gcNull;\r\n property Hint: string read FHint write SetHint stored IsHintStored nodefault;\r\n end;\r\n\r\n TTMSFNCCalendarEvents = class(TTMSFNCCalendarDates)\r\n private\r\n procedure SetItem(Index: integer; const Value: TTMSFNCCalendarEventItem);\r\n function GetItem(Index: integer): TTMSFNCCalendarEventItem;\r\n public\r\n function Add: TTMSFNCCalendarEventItem;\r\n function GetEventCollectionItemByDate(ADate: TDate): TTMSFNCCalendarEventItem;\r\n property Items[Index: integer]: TTMSFNCCalendarEventItem read GetItem write SetItem;\r\n end;\r\n\r\n {$IFDEF FMXLIB}\r\n TTMSFNCCalendarPopupBox = class(TPopupBox)\r\n public\r\n procedure Popup(APoint: TPointF);\r\n end;\r\n {$ENDIF}\r\n {$IFNDEF FMXLIB}\r\n TTMSFNCCalendarPopupBox = class(TComponent)\r\n private\r\n FPaintScale: Single;\r\n {$IFNDEF WEBLIB}\r\n FPopup: TPopupMenu;\r\n {$ENDIF}\r\n {$IFDEF WEBLIB}\r\n FPopup: TWebPopupMenu;\r\n {$ENDIF}\r\n FItems: TStringList;\r\n FItemIndex: Integer;\r\n FOnChange: TNotifyEvent;\r\n procedure SetItemIndex(const Value: Integer);\r\n procedure SetItems(const Value: TStringList);\r\n protected\r\n procedure DoMenuItemClick(Sender: TObject);\r\n procedure DoPopup(ALeft, ATop: Single);\r\n procedure DoChange;\r\n public\r\n constructor Create(AOwner: TTMSFNCCustomCalendar); reintroduce;\r\n destructor Destroy; override;\r\n procedure SetPaintScale(AValue: Single);\r\n procedure Popup(APoint: TPointF);\r\n property Items: TStringList read FItems write SetItems;\r\n property ItemIndex: Integer read FItemIndex write SetItemIndex;\r\n property OnChange: TNotifyEvent read FOnChange write FOnChange;\r\n end;\r\n {$ENDIF}\r\n\r\n TTMSFNCCalendarBeforeDrawHeaderEvent = procedure(Sender: TObject; AGraphics: TTMSFNCGraphics; ARect: TRectF; var AAllow: Boolean; var ADefaultDraw: Boolean) of object;\r\n TTMSFNCCalendarAfterDrawHeaderEvent = procedure(Sender: TObject; AGraphics: TTMSFNCGraphics; ARect: TRectF) of object;\r\n TTMSFNCCalendarBeforeDrawHeaderTextEvent = procedure(Sender: TObject; AGraphics: TTMSFNCGraphics; ARect: TRectF; AText: string; AHorizontalTextAlign, AVerticalTextAlign: TTMSFNCGraphicsTextAlign; var AAllow: Boolean; var ADefaultDraw: Boolean) of object;\r\n TTMSFNCCalendarAfterDrawHeaderTextEvent = procedure(Sender: TObject; AGraphics: TTMSFNCGraphics; ARect: TRectF; AText: string; AHorizontalTextAlign, AVerticalTextAlign: TTMSFNCGraphicsTextAlign) of object;\r\n TTMSFNCCalendarBeforeDrawFooterEvent = procedure(Sender: TObject; AGraphics: TTMSFNCGraphics; ARectF: TRectF; var AAllow: Boolean; var ADefaultDraw: Boolean) of object;\r\n TTMSFNCCalendarAfterDrawFooterEvent = procedure(Sender: TObject; AGraphics: TTMSFNCGraphics; ARectF: TRectF) of object;\r\n TTMSFNCCalendarBeforeDrawFooterTextEvent = procedure(Sender: TObject; AGraphics: TTMSFNCGraphics; ARect: TRectF; AText: string; AHorizontalTextAlign, AVerticalTextAlign: TTMSFNCGraphicsTextAlign; var AAllow: Boolean; var ADefaultDraw: Boolean) of object;\r\n TTMSFNCCalendarAfterDrawFooterTextEvent = procedure(Sender: TObject; AGraphics: TTMSFNCGraphics; ARect: TRectF; AText: string; AHorizontalTextAlign, AVerticalTextAlign: TTMSFNCGraphicsTextAlign) of object;\r\n TTMSFNCCalendarBeforeDrawDayNamesEvent = procedure(Sender: TObject; AGraphics: TTMSFNCGraphics; ARect: TRectF; var AAllow: Boolean; var ADefaultDraw: Boolean) of object;\r\n TTMSFNCCalendarAfterDrawDayNamesEvent = procedure(Sender: TObject; AGraphics: TTMSFNCGraphics; ARect: TRectF) of object;\r\n TTMSFNCCalendarBeforeDrawDayNamesTextEvent = procedure(Sender: TObject; AGraphics: TTMSFNCGraphics; ARect: TRectF; AText: string; AHorizontalTextAlign, AVerticalTextAlign: TTMSFNCGraphicsTextAlign; var AAllow: Boolean; var ADefaultDraw: Boolean) of object;\r\n TTMSFNCCalendarAfterDrawDayNamesTextEvent = procedure(Sender: TObject; AGraphics: TTMSFNCGraphics; ARect: TRectF; AText: string; AHorizontalTextAlign, AVerticalTextAlign: TTMSFNCGraphicsTextAlign) of object;\r\n TTMSFNCCalendarBeforeDrawDayNumbersEvent = procedure(Sender: TObject; AGraphics: TTMSFNCGraphics; ARect: TRectF; ADate: TDate; var AAllow: Boolean; var ADefaultDraw: Boolean) of object;\r\n TTMSFNCCalendarAfterDrawDayNumbersEvent = procedure(Sender: TObject; AGraphics: TTMSFNCGraphics; ARect: TRectF; ADate: TDate) of object;\r\n TTMSFNCCalendarBeforeDrawDayNumbersTextEvent = procedure(Sender: TObject; AGraphics: TTMSFNCGraphics; ARect: TRectF; AText: string; AHorizontalTextAlign, AVerticalTextAlign: TTMSFNCGraphicsTextAlign; var AAllow: Boolean; var ADefaultDraw: Boolean) of object;\r\n TTMSFNCCalendarAfterDrawDayNumbersTextEvent = procedure(Sender: TObject; AGraphics: TTMSFNCGraphics; ARect: TRectF; AText: string; AHorizontalTextAlign, AVerticalTextAlign: TTMSFNCGraphicsTextAlign) of object;\r\n TTMSFNCCalendarBeforeDrawLinesEvent = procedure(Sender: TObject; AGraphics: TTMSFNCGraphics; var AAllow: Boolean; var ADefaultDraw: Boolean) of object;\r\n TTMSFNCCalendarAfterDrawLinesEvent = procedure(Sender: TObject; AGraphics: TTMSFNCGraphics) of object;\r\n TTMSFNCCalendarBeforeDrawWeekNumbersEvent = procedure(Sender: TObject; AGraphics: TTMSFNCGraphics; ARect: TRectF; var AAllow: Boolean; var ADefaultDraw: Boolean) of object;\r\n TTMSFNCCalendarAfterDrawWeekNumbersEvent = procedure(Sender: TObject; AGraphics: TTMSFNCGraphics; ARect: TRectF) of object;\r\n TTMSFNCCalendarBeforeDrawWeekNumbersTextEvent = procedure(Sender: TObject; AGraphics: TTMSFNCGraphics; ARect: TRectF; AText: string; AHorizontalTextAlign, AVerticalTextAlign: TTMSFNCGraphicsTextAlign; var AAllow: Boolean; var ADefaultDraw: Boolean) of object;\r\n TTMSFNCCalendarAfterDrawWeekNumbersTextEvent = procedure(Sender: TObject; AGraphics: TTMSFNCGraphics; ARect: TRectF; AText: string; AHorizontalTextAlign, AVerticalTextAlign: TTMSFNCGraphicsTextAlign) of object;\r\n TTMSFNCCalendarBeforeDrawBadgeEvent = procedure(Sender: TObject; AGraphics: TTMSFNCGraphics; ARect: TRectF; ABadge: TTMSFNCCalendarEventItem; var AAllow: Boolean; var ADefaultDraw: Boolean) of object;\r\n TTMSFNCCalendarAfterDrawBadgeEvent = procedure(Sender: TObject; AGraphics: TTMSFNCGraphics; ARect: TRectF; ABadge: TTMSFNCCalendarEventItem) of object;\r\n TTMSFNCCalendarBeforeDrawArrowLeftEvent = procedure(Sender: TObject; AGraphics: TTMSFNCGraphics; AArrowRect: TRectF; var AAllow: Boolean; var ADefaultDraw: Boolean) of object;\r\n TTMSFNCCalendarAfterDrawArrowLeftEvent = procedure(Sender: TObject; AGraphics: TTMSFNCGraphics; AArrowRect: TRectF) of object;\r\n TTMSFNCCalendarBeforeDrawArrowRightEvent = procedure(Sender: TObject; AGraphics: TTMSFNCGraphics; AArrowRect: TRectF; var AAllow: Boolean; var ADefaultDraw: Boolean) of object;\r\n TTMSFNCCalendarAfterDrawArrowRightEvent = procedure(Sender: TObject; AGraphics: TTMSFNCGraphics; AArrowRect: TRectF) of object;\r\n TTMSFNCCalendarBeforeSelectDateEvent = procedure(Sender: TObject; ADate: TDate) of object;\r\n TTMSFNCCalendarSelectedDateEvent = procedure(Sender: TObject; ADate: TDate) of object;\r\n TTMSFNCCalendarSelectedMultiDateEvent = procedure(Sender: TObject; AStartDate: TDate; AEndDate: TDate) of object;\r\n TTMSFNCCalendarYearChangedEvent = procedure(Sender: TObject; AYear: Integer) of object;\r\n TTMSFNCCalendarMonthChangedEvent = procedure(Sender: TObject; AMonth: Integer) of object;\r\n TTMSFNCCalendarCustomNavigationEvent = procedure(Sender: TObject; ADate: TDate; AFocusedDate: TDate; ADirection: Boolean) of object;\r\n TTMSFNCCalendarCustomArrowDrawEvent = procedure(Sender: TObject; AGraphics: TTMSFNCGraphics; ARect: TRectF; ADirection: Boolean) of object;\r\n TTMSFNCCalendarCustomNavigateEvent = procedure(Sender: TObject; AMonth: Integer; AYear: Integer) of object;\r\n TTMSFNCCalendarShowPopupEvent = procedure(Sender: TObject; var AAllow: Boolean) of object;\r\n TTMSFNCCalendarYearPopupValueSelected = procedure(Sender: TObject; AItemIndex: Integer; AYear: Integer) of object;\r\n TTMSFNCCalendarMonthPopupValueSelected = procedure(Sender: TObject; AItemIndex: Integer; AMonth: Integer; AMonthValue: string) of object;\r\n\r\n {$IFNDEF WEBLIB}\r\n TTMSFNCCustomCalendar = class(TTMSFNCCustomControl, ITMSFNCBitmapContainer, ITMSFNCAppearanceGlobalFont)\r\n {$ENDIF}\r\n {$IFDEF WEBLIB}\r\n TTMSFNCCustomCalendar = class(TTMSFNCCustomControl, ITMSFNCAppearanceGlobalFont)\r\n {$ENDIF}\r\n private\r\n FDay, FMonth, FYear: Integer;\r\n FBitmapContainer: TTMSFNCBitmapContainer;\r\n FNumOfWeeksDrawn: Integer;\r\n FWeekNumberAppearance: TTMSFNCCalendarWeekNumberAppearance;\r\n FFirstDay: Integer;\r\n FHeader: TTMSFNCCalendarHeader;\r\n FFooter: TTMSFNCCalendarFooter;\r\n FDayNameAppearance: TTMSFNCCalendarDayNameAppearance;\r\n FDateAppearance: TTMSFNCCalendarDateAppearance;\r\n FLineAppearance: TTMSFNCCalendarLineAppearance;\r\n FXOffset, FYOffset, FDateAreaHeight: Single;\r\n FMx, FMy: Single;\r\n FTick: Cardinal;\r\n FSelectedDates: TTMSFNCCalendarDates;\r\n FEvents: TTMSFNCCalendarEvents;\r\n FBadgeSize: Integer;\r\n FMouseDown, FShiftPressed, FSelectedAll: Boolean;\r\n FDate: TDate;\r\n FMaxDate, FMinDate: TDate;\r\n FClickedDate, FMouseAtDate, FFocusedDate, FHoverDate: TDate;\r\n FOnChange: TNotifyEvent;\r\n FOnBeforeDrawHeader: TTMSFNCCalendarBeforeDrawHeaderEvent;\r\n FOnAfterDrawDayNames: TTMSFNCCalendarAfterDrawDayNamesEvent;\r\n FOnAfterDrawHeader: TTMSFNCCalendarAfterDrawHeaderEvent;\r\n FOnBeforeDrawDayNames: TTMSFNCCalendarBeforeDrawDayNamesEvent;\r\n FOnAfterDrawHeaderText: TTMSFNCCalendarAfterDrawHeaderTextEvent;\r\n FOnBeforeDrawHeaderText: TTMSFNCCalendarBeforeDrawHeaderTextEvent;\r\n FOnAfterDrawDayNamesText: TTMSFNCCalendarAfterDrawDayNamesTextEvent;\r\n FOnBeforeDrawDayNamesText: TTMSFNCCalendarBeforeDrawDayNamesTextEvent;\r\n FOnAfterDrawWeekNumbersText: TTMSFNCCalendarAfterDrawWeekNumbersTextEvent;\r\n FOnBeforeDrawDayNumbersText: TTMSFNCCalendarBeforeDrawDayNumbersTextEvent;\r\n FOnBeforeDrawLines: TTMSFNCCalendarBeforeDrawLinesEvent;\r\n FOnAfterDrawWeekNumbers: TTMSFNCCalendarAfterDrawWeekNumbersEvent;\r\n FOnBeforeDrawDayNumbers: TTMSFNCCalendarBeforeDrawDayNumbersEvent;\r\n FOnAfterDrawDayNumbersText: TTMSFNCCalendarAfterDrawDayNumbersTextEvent;\r\n FOnBeforeDrawWeekNumbersText: TTMSFNCCalendarBeforeDrawWeekNumbersTextEvent;\r\n FOnAfterDrawLines: TTMSFNCCalendarAfterDrawLinesEvent;\r\n FOnAfterDrawDayNumbers: TTMSFNCCalendarAfterDrawDayNumbersEvent;\r\n FOnBeforeDrawWeekNumbers: TTMSFNCCalendarBeforeDrawWeekNumbersEvent;\r\n FInteraction: TTMSFNCCalendarInteraction;\r\n FOnYearChanged: TTMSFNCCalendarYearChangedEvent;\r\n FOnSelectDate: TTMSFNCCalendarSelectedDateEvent;\r\n FOnMonthChanged: TTMSFNCCalendarMonthChangedEvent;\r\n FOnSelectMultiDate: TTMSFNCCalendarSelectedMultiDateEvent;\r\n FOnBeforeSelectDate: TTMSFNCCalendarBeforeSelectDateEvent;\r\n FOnBeforeDrawFooterText: TTMSFNCCalendarBeforeDrawFooterTextEvent;\r\n FOnBeforeDrawFooter: TTMSFNCCalendarBeforeDrawFooterEvent;\r\n FOnAfterDrawFooterText: TTMSFNCCalendarAfterDrawFooterTextEvent;\r\n FOnAfterDrawFooter: TTMSFNCCalendarAfterDrawFooterEvent;\r\n FOnCustomNavigation: TTMSFNCCalendarCustomNavigationEvent;\r\n FOnAfterDrawBadge: TTMSFNCCalendarAfterDrawBadgeEvent;\r\n FOnBeforeDrawBadge: TTMSFNCCalendarBeforeDrawBadgeEvent;\r\n FOnCustomArrowDraw: TTMSFNCCalendarCustomArrowDrawEvent;\r\n FOnAfterDrawArrowRight: TTMSFNCCalendarAfterDrawArrowRightEvent;\r\n FOnBeforeDrawArrowLeft: TTMSFNCCalendarBeforeDrawArrowLeftEvent;\r\n FOnBeforeDrawArrowRight: TTMSFNCCalendarBeforeDrawArrowRightEvent;\r\n FOnAfterDrawArrowLeft: TTMSFNCCalendarAfterDrawArrowLeftEvent;\r\n FOnNavigateBack: TTMSFNCCalendarCustomNavigateEvent;\r\n FOnNavigateForward: TTMSFNCCalendarCustomNavigateEvent;\r\n FOnNavigateFooter: TNotifyEvent;\r\n FGlobalFont: TTMSFNCAppearanceGlobalFont;\r\n FMonthsPopup: TTMSFNCCalendarPopupBox;\r\n FYearsPopup: TTMSFNCCalendarPopupBox;\r\n FOnBeforeShowMonthPopup: TTMSFNCCalendarShowPopupEvent;\r\n FOnBeforeShowYearPopup: TTMSFNCCalendarShowPopupEvent;\r\n FOnYearPopupValueSelected: TTMSFNCCalendarYearPopupValueSelected;\r\n FOnMonthPopupValueSelected: TTMSFNCCalendarMonthPopupValueSelected;\r\n procedure SetDay(const Value: Integer);\r\n procedure SetMonth(const Value: Integer);\r\n procedure SetYear(const Value: Integer);\r\n procedure SetFirstDay(const Value: Integer);\r\n procedure SetHeader(const Value: TTMSFNCCalendarHeader);\r\n procedure IncrementCell(var ACellSide: Single; const AMoveBy: Single);\r\n procedure ShiftCellH(var ACell: TRectF; const AMoveBy: Single);\r\n procedure ShiftCellV(var ACell: TRectF; const AMoveBy: Single);\r\n procedure IncrementWeekDay(var ADay: Integer);\r\n procedure SetDateForward(var ADate: TDate; ASetBy: Integer);\r\n procedure SetDateBackward(var ADate: TDate; ASetBy: Integer);\r\n procedure SetDayNameAppearance(const Value: TTMSFNCCalendarDayNameAppearance);\r\n procedure SetDateAppearance(const Value: TTMSFNCCalendarDateAppearance);\r\n procedure SetLineAppearance(const Value: TTMSFNCCalendarLineAppearance);\r\n procedure SetWeekNumberAppearance(const Value: TTMSFNCCalendarWeekNumberAppearance);\r\n procedure SetArrowLeftRect(AHeaderRect: TRectF; var AArrowRect: TRectF; ACentre: Single);\r\n procedure SetArrowRightRect(AHeaderRect: TREctF; var AArrowRect: TRectF; ACentre: Single);\r\n procedure SetFocusedDate(const Value: TDate);\r\n procedure SetDate(const Value: TDate);\r\n procedure SetInteraction(const Value: TTMSFNCCalendarInteraction);\r\n procedure SetMaxDate(const Value: TDate);\r\n procedure SetMinDate(const Value: TDate);\r\n procedure SetFooter(const Value: TTMSFNCCalendarFooter);\r\n procedure SetBitmapContainer(const Value: TTMSFNCBitmapContainer);\r\n procedure SetBadgeSize(const Value: Integer);\r\n procedure SetEvents(const Value: TTMSFNCCalendarEvents);\r\n function ColCount(const AShowWeeks: Boolean): Integer;\r\n function CalcRowCount(const ACol: Integer; const ADaysInAMonth: Integer): Integer;\r\n function CalcDateAreaHeight(const AHeight: Single; const AHeaderVisible: Boolean; const AFooterVisible: Boolean): Single;\r\n function GetArrowRect(ALeft: Boolean): TRectF;\r\n procedure GetMonthYearRect(AControl: TRectF; var AMonthRect: TRectF; var AYearRect: TRectF);\r\n function GetFooterTextRect: TRectF;\r\n function PointInRect(ARect: TRectF; APoint: TPointF): Boolean;\r\n function IsMaxDateStored: Boolean;\r\n function IsMinDateStored: Boolean;\r\n function GetCurrentDate: TDate;\r\n function GetBitmapContainer: TTMSFNCBitmapContainer;\r\n function IsFocusedDateStored: Boolean;\r\n procedure SetGlobalFont(const Value: TTMSFNCAppearanceGlobalFont);\r\n function GetMonthsPopup: TTMSFNCCalendarPopupBox;\r\n function GetYearsPopup: TTMSFNCCalendarPopupBox;\r\n protected\r\n procedure ApplyStyle; override;\r\n procedure ResetToDefaultStyle; override;\r\n procedure Changed;\r\n procedure CalculateXOffset; virtual;\r\n procedure ChangeDPIScale(M, D: Integer); override;\r\n procedure Notification(AComponent: TComponent; Operation: TOperation); override;\r\n procedure Draw(AGraphics: TTMSFNCGraphics; ARectF: TRectF); override;\r\n procedure DrawHeader(AGraphics: TTMSFNCGraphics; ARectF: TRectF);\r\n procedure DrawFooter(AGraphics: TTMSFNCGraphics; ARectF: TRectF);\r\n procedure DrawArrows(AGraphics: TTMSFNCGraphics; ARectF: TRectF; ADirection: TTMSFNCCalendarArrowLayoutValue);\r\n procedure DrawDayNames(AGraphics: TTMSFNCGraphics; ARectF: TRectF);\r\n procedure DrawDays(AGraphics: TTMSFNCGraphics; ARectF: TRectF);\r\n procedure DrawDayNumbers(AGraphics: TTMSFNCGraphics; ACellRect: TRectF; Col, Row, AMonth, I: Integer);\r\n procedure DrawWeekNumbers(AGraphics: TTMSFNCGraphics; ARectF: TRectF);\r\n procedure DrawLines(AGraphics: TTMSFNCGraphics; ARectF: TRectF);\r\n procedure DrawBadges(AGraphics: TTMSFNCGraphics; ARectF: TRectF);\r\n procedure DrawBadge(AGraphics: TTMSFNCGraphics; ARectF: TRectF; ABadge: TTMSFNCCalendarEventItem; ACol, ARow: Integer);\r\n procedure EventsChanged(Sender: TObject);\r\n procedure WeekNumbersChanged(Sender: TObject);\r\n procedure ArrowsChanged(Sender: TObject);\r\n procedure HeaderChanged(Sender: TObject);\r\n procedure FooterChanged(Sender: TObject);\r\n procedure DayNameAppearanceChanged(Sender: TObject);\r\n procedure LineAppearanceChanged(Sender: TObject);\r\n procedure ShowBeforeAndAfterChanged(Sender: TObject);\r\n procedure HandleMouseDown(Button: TTMSFNCMouseButton; Shift: TShiftState; X, Y: Single); override;\r\n procedure HandleMouseUp(Button: TTMSFNCMouseButton; Shift: TShiftState; X, Y: Single); override;\r\n procedure HandleMouseMove(Shift: TShiftState; X, Y: Single); override;\r\n procedure HandleKeyDown(var Key: Word; Shift: TShiftState); override;\r\n procedure HandleKeyUp(var Key: Word; Shift: TShiftState); override;\r\n procedure DoBeforeDrawHeader(AGraphics: TTMSFNCGraphics; ARect: TRectF; var AAllow: Boolean; var ADefaultDraw: Boolean); virtual;\r\n procedure DoAfterDrawHeader(AGraphics: TTMSFNCGraphics; ARect: TRectF); virtual;\r\n procedure DoBeforeDrawHeaderText(AGraphics: TTMSFNCGraphics; ARect: TRectF; AText: string; AHorizontalTextAlign, AVerticalTextAlign: TTMSFNCGraphicsTextAlign; var AAllow: Boolean; var ADefaultDraw: Boolean); virtual;\r\n procedure DoAfterDrawHeaderText(AGraphics: TTMSFNCGraphics; ARect: TRectF; AText: string; AHorizontalTextAlign, AVerticalTextAlign: TTMSFNCGraphicsTextAlign); virtual;\r\n procedure DoBeforeDrawFooter(AGraphics: TTMSFNCGraphics; ARect: TRectF; var AAllow: Boolean; var ADefaultDraw: Boolean); virtual;\r\n procedure DoAfterDrawFooter(AGraphics: TTMSFNCGraphics; ARect: TRectF); virtual;\r\n procedure DoBeforeDrawFooterText(AGraphics: TTMSFNCGraphics; ARect: TRectF; AText: string; AHorizontalTextAlign, AVerticalTextAlign: TTMSFNCGraphicsTextAlign; var AAllow: Boolean; var ADefaultDraw: Boolean); virtual;\r\n procedure DoAfterDrawFooterText(AGraphics: TTMSFNCGraphics; ARect: TRectF; AText: string; AHorizontalTextAlign, AVerticalTextAlign: TTMSFNCGraphicsTextAlign); virtual;\r\n procedure DoBeforeDrawDayNames(AGraphics: TTMSFNCGraphics; ARect: TRectF; var AAllow: Boolean; var ADefaultDraw: Boolean); virtual;\r\n procedure DoAfterDrawDayNames(AGraphics: TTMSFNCGraphics; ARect: TRectF); virtual;\r\n procedure DoBeforeDrawDayNamesText(AGraphics: TTMSFNCGraphics; ARect: TRectF; AText: string; AHorizontalTextAlign, AVerticalTextAlign: TTMSFNCGraphicsTextAlign; var AAllow: Boolean; var ADefaultDraw: Boolean); virtual;\r\n procedure DoAfterDrawDayNamesText(AGraphics: TTMSFNCGraphics; ARect: TRectF; AText: string; AHorizontalTextAlign, AVerticalTextAlign: TTMSFNCGraphicsTextAlign); virtual;\r\n procedure DoBeforeDrawDayNumbers(AGraphics: TTMSFNCGraphics; ARect: TrectF; ADate: TDate; var AAllow: Boolean; var ADefaultDraw: Boolean); virtual;\r\n procedure DoAfterDrawDayNumbers(AGraphics: TTMSFNCGraphics; ARect: TRectF; ADate: TDate); virtual;\r\n procedure DoBeforeDrawDayNumbersText(AGraphics: TTMSFNCGraphics; ARect: TRectF; AText: string; AHorizontalTextAlign, AVerticalTextAlign: TTMSFNCGraphicsTextAlign; var AAllow: Boolean; var ADefaultDraw: Boolean); virtual;\r\n procedure DoAfterDrawDayNumbersText(AGraphics: TTMSFNCGraphics; ARect: TrectF; AText: string; AHorizontalTextAlign, AVerticalTextAlign: TTMSFNCGraphicsTextAlign); virtual;\r\n procedure DoBeforeDrawLines(AGraphics: TTMSFNCGraphics; var AAllow: Boolean; var ADefaultDraw: Boolean); virtual;\r\n procedure DoAfterDrawLines(AGraphics: TTMSFNCGraphics); virtual;\r\n procedure DoBeforeDrawWeekNumbers(AGraphics: TTMSFNCGraphics; ARect: TRectF; var AAllow: Boolean; var ADefaultDraw: Boolean); virtual;\r\n procedure DoAfterDrawWeekNumbers(AGraphics: TTMSFNCGraphics; ARect: TRectF); virtual;\r\n procedure DoBeforeDrawWeekNumbersText(AGraphics: TTMSFNCGraphics; ARect: TRectF; AText: string; AHorizontalTextAlign, AVerticalTextAlign: TTMSFNCGraphicsTextAlign; var AAllow: Boolean; var ADefaultDraw: Boolean); virtual;\r\n procedure DoAfterDrawWeekNumbersText(AGraphics: TTMSFNCGraphics; ARect: TrectF; AText: string; AHorizontalTextAlign, AVerticalTextAlign: TTMSFNCGraphicsTextAlign); virtual;\r\n procedure DoBeforeDrawBadge(AGraphics: TTMSFNCGraphics; ARect: TRectF; ABadge: TTMSFNCCalendarEventItem; var AAllow: Boolean; var ADefaultDraw: Boolean); virtual;\r\n procedure DoAfterDrawBadge(AGraphics: TTMSFNCGraphics; ARect: TRectF; ABadge: TTMSFNCCalendarEventItem); virtual;\r\n procedure DoBeforeDrawArrowLeft(AGraphics: TTMSFNCGraphics; AArrowRect: TRectF; var AAllow: Boolean; var ADefaultDraw: Boolean); virtual;\r\n procedure DoAfterDrawArrowLeft(AGraphics: TTMSFNCGraphics; AArrowRect: TRectF); virtual;\r\n procedure DoBeforeDrawArrowRight(AGraphics: TTMSFNCGraphics; AArrowRect: TRectF; var AAllow: Boolean; var ADefaultDraw: Boolean); virtual;\r\n procedure DoAfterDrawArrowRight(AGraphics: TTMSFNCGraphics; AArrowRect: TRectF); virtual;\r\n procedure DoBeforeSelectDate(ADate: TDate); virtual;\r\n procedure DoSelectDate(ADate: TDate); virtual;\r\n procedure DoSelectMultiDate(AStartDate: TDate; AEndDate: TDate); virtual;\r\n procedure DoChangeYear(AYear: Integer); virtual;\r\n procedure DoChangeMonth(AMonth: Integer); virtual;\r\n procedure DoCustomNavigation(ADate: TDate; AFocusedDate: TDate; ADirection: Boolean); virtual;\r\n procedure DoCustomArrowDraw(AGraphics: TTMSFNCGraphics; ARect: TRectF; ADirection: Boolean); virtual;\r\n procedure DoPopupYearsChange(Sender: TObject);\r\n procedure DoPopupMonthsChange(Sender: TObject);\r\n procedure DoMonthSelectorPopup(ALeft, ATop: Single);\r\n procedure DoYearSelectorPopup(ALeft, ATop: Single);\r\n procedure DoBeforeShowMonthPopup(var AAllow: Boolean); virtual;\r\n procedure DoBeforeShowYearPopup(var AAllow: Boolean); virtual;\r\n procedure DoYearPopupValueSelected(AItemIndex: Integer; AYear: Integer); virtual;\r\n procedure DoMonthPopupValueSelected(AItemIndex: Integer; AMonth: Integer; AMonthValue: string); virtual;\r\n function IsAppearanceProperty(AObject: TObject; APropertyName: string; APropertyType: TTypeKind): Boolean; override;\r\n function GetVersion: string; override;\r\n function GetHintString: string; override;\r\n function HasHint: Boolean; override;\r\n function GetDocURL: string; override;\r\n procedure SetFonts(ASetType: TTMSFNCAppearanceGlobalFontType); virtual;\r\n property BitmapContainer: TTMSFNCBitmapContainer read GetBitmapContainer write SetBitmapContainer;\r\n property Header: TTMSFNCCalendarHeader read FHeader write SetHeader;\r\n property Footer: TTMSFNCCalendarFooter read FFooter write SetFooter;\r\n property Events: TTMSFNCCalendarEvents read FEvents write SetEvents;\r\n property Month: Integer read FMonth write SetMonth;\r\n property Year: Integer read FYear write SetYear;\r\n property MaxDate: TDate read FMaxDate write SetMaxDate stored IsMaxDateStored;\r\n property MinDate: TDate read FMinDate write SetMinDate stored IsMinDateStored;\r\n property WeekNumberAppearance: TTMSFNCCalendarWeekNumberAppearance read FWeekNumberAppearance write SetWeekNumberAppearance;\r\n property FirstDay: Integer read FFirstDay write SetFirstDay default 1;\r\n property DayNameAppearance: TTMSFNCCalendarDayNameAppearance read FDayNameAppearance write SetDayNameAppearance;\r\n property DateAppearance: TTMSFNCCalendarDateAppearance read FDateAppearance write SetDateAppearance;\r\n property LineAppearance: TTMSFNCCalendarLineAppearance read FLineAppearance write SetLineAppearance;\r\n property Interaction: TTMSFNCCalendarInteraction read FInteraction write SetInteraction;\r\n property GlobalFont: TTMSFNCAppearanceGlobalFont read FGlobalFont write SetGlobalFont;\r\n property OnBeforeDrawHeader: TTMSFNCCalendarBeforeDrawHeaderEvent read FOnBeforeDrawHeader write FOnBeforeDrawHeader;\r\n property OnAfterDrawHeader: TTMSFNCCalendarAfterDrawHeaderEvent read FOnAfterDrawHeader write FOnAfterDrawHeader;\r\n property OnBeforeDrawHeaderText: TTMSFNCCalendarBeforeDrawHeaderTextEvent read FOnBeforeDrawHeaderText write FOnBeforeDrawHeaderText;\r\n property OnAfterDrawHeaderText: TTMSFNCCalendarAfterDrawHeaderTextEvent read FOnAfterDrawHeaderText write FOnAfterDrawHeaderText;\r\n property OnBeforeDrawFooter: TTMSFNCCalendarBeforeDrawFooterEvent read FOnBeforeDrawFooter write FOnBeforeDrawFooter;\r\n property OnAfterDrawFooter: TTMSFNCCalendarAfterDrawFooterEvent read FOnAfterDrawFooter write FOnAfterDrawFooter;\r\n property OnBeforeDrawFooterText: TTMSFNCCalendarBeforeDrawFooterTextEvent read FOnBeforeDrawFooterText write FOnBeforeDrawFooterText;\r\n property OnAfterDrawFooterText: TTMSFNCCalendarAfterDrawFooterTextEvent read FOnAfterDrawFooterText write FOnAfterDrawFooterText;\r\n property OnBeforeDrawDayNames: TTMSFNCCalendarBeforeDrawDayNamesEvent read FOnBeforeDrawDayNames write FOnBeforeDrawDayNames;\r\n property OnAfterDrawDayNames: TTMSFNCCalendarAfterDrawDayNamesEvent read FOnAfterDrawDayNames write FOnAfterDrawDayNames;\r\n property OnBeforeDrawDayNamesText: TTMSFNCCalendarBeforeDrawDayNamesTextEvent read FOnBeforeDrawDayNamesText write FOnBeforeDrawDayNamesText;\r\n property OnAfterDrawDayNamesText: TTMSFNCCalendarAfterDrawDayNamesTextEvent read FOnAfterDrawDayNamesText write FOnAfterDrawDayNamesText;\r\n property OnBeforeDrawDayNumbers: TTMSFNCCalendarBeforeDrawDayNumbersEvent read FOnBeforeDrawDayNumbers write FOnBeforeDrawDayNumbers;\r\n property OnAfterDrawDayNumbers: TTMSFNCCalendarAfterDrawDayNumbersEvent read FOnAfterDrawDayNumbers write FOnAfterDrawDayNumbers;\r\n property OnBeforeDrawDayNumbersText: TTMSFNCCalendarBeforeDrawDayNumbersTextEvent read FOnBeforeDrawDayNumbersText write FOnBeforeDrawDayNumbersText;\r\n property OnAfterDrawDayNumbersText: TTMSFNCCalendarAfterDrawDayNumbersTextEvent read FOnAfterDrawDayNumbersText write FOnAfterDrawDayNumbersText;\r\n property OnBeforeDrawLines: TTMSFNCCalendarBeforeDrawLinesEvent read FOnBeforeDrawLines write FOnBeforeDrawLines;\r\n property OnAfterDrawLines: TTMSFNCCalendarAfterDrawLinesEvent read FOnAfterDrawLines write FOnAfterDrawLines;\r\n property OnBeforeDrawWeekNumbers: TTMSFNCCalendarBeforeDrawWeekNumbersEvent read FOnBeforeDrawWeekNumbers write FOnBeforeDrawWeekNumbers;\r\n property OnAfterDrawWeekNumbers: TTMSFNCCalendarAfterDrawWeekNumbersEvent read FOnAfterDrawWeekNumbers write FOnAfterDrawWeekNumbers;\r\n property OnBeforeDrawWeekNumbersText: TTMSFNCCalendarBeforeDrawWeekNumbersTextEvent read FOnBeforeDrawWeekNumbersText write FOnBeforeDrawWeekNumbersText;\r\n property OnAfterDrawWeekNumbersText: TTMSFNCCalendarAfterDrawWeekNumbersTextEvent read FOnAfterDrawWeekNumbersText write FOnAfterDrawWeekNumbersText;\r\n property OnBeforeDrawBadge: TTMSFNCCalendarBeforeDrawBadgeEvent read FOnBeforeDrawBadge write FOnBeforeDrawBadge;\r\n property OnAfterDrawBadge: TTMSFNCCalendarAfterDrawBadgeEvent read FOnAfterDrawBadge write FOnAfterDrawBadge;\r\n property OnBeforeDrawArrowLeft: TTMSFNCCalendarBeforeDrawArrowLeftEvent read FOnBeforeDrawArrowLeft write FOnBeforeDrawArrowLeft;\r\n property OnAfterDrawArrowLeft: TTMSFNCCalendarAfterDrawArrowLeftEvent read FOnAfterDrawArrowLeft write FOnAfterDrawArrowLeft;\r\n property OnBeforeDrawArrowRight: TTMSFNCCalendarBeforeDrawArrowRightEvent read FOnBeforeDrawArrowRight write FOnBeforeDrawArrowRight;\r\n property OnAfterDrawArrowRight: TTMSFNCCalendarAfterDrawArrowRightEvent read FOnAfterDrawArrowRight write FOnAfterDrawArrowRight;\r\n property OnBeforeSelectDate: TTMSFNCCalendarBeforeSelectDateEvent read FOnBeforeSelectDate write FOnBeforeSelectDate;\r\n property OnSelectDate: TTMSFNCCalendarSelectedDateEvent read FOnSelectDate write FOnSelectDate;\r\n property OnSelectMultiDate: TTMSFNCCalendarSelectedMultiDateEvent read FOnSelectMultiDate write FOnSelectMultiDate;\r\n property OnYearChanged: TTMSFNCCalendarYearChangedEvent read FOnYearChanged write FOnYearChanged;\r\n property OnMonthChanged: TTMSFNCCalendarMonthChangedEvent read FOnMonthChanged write FOnMonthChanged;\r\n property OnCustomNavigation: TTMSFNCCalendarCustomNavigationEvent read FOnCustomNavigation write FOnCustomNavigation;\r\n property OnCustomArrowDraw: TTMSFNCCalendarCustomArrowDrawEvent read FOnCustomArrowDraw write FOnCustomArrowDraw;\r\n property OnNavigateBack: TTMSFNCCalendarCustomNavigateEvent read FOnNavigateBack write FOnNavigateBack;\r\n property OnNavigateForward: TTMSFNCCalendarCustomNavigateEvent read FOnNavigateForward write FOnNavigateForward;\r\n property OnNavigateFooter: TNotifyEvent read FOnNavigateFooter write FOnNavigateFooter;\r\n property OnBeforeShowMonthPopup: TTMSFNCCalendarShowPopupEvent read FOnBeforeShowMonthPopup write FOnBeforeShowMonthPopup;\r\n property OnBeforeShowYearPopup: TTMSFNCCalendarShowPopupEvent read FOnBeforeShowYearPopup write FOnBeforeShowYearPopup;\r\n property OnYearPopupValueSelected: TTMSFNCCalendarYearPopupValueSelected read FOnYearPopupValueSelected write FOnYearPopupValueSelected;\r\n property OnMonthPopupValueSelected: TTMSFNCCalendarMonthPopupValueSelected read FOnMonthPopupValueSelected write FOnMonthPopupValueSelected;\r\n public\r\n constructor Create(AOwner: TComponent); override;\r\n destructor Destroy; override;\r\n procedure Assign(Source: TPersistent); override;\r\n procedure SelectDate(ADate: TDate);\r\n procedure SelectEvent(ADate: TDate);\r\n procedure SelectMultiDates(AStartDate: TDate; AEndDate: TDate);\r\n procedure PreviousDate;\r\n procedure NextDate;\r\n procedure UpdateControlAfterResize; override;\r\n procedure SelectADate(ADate: TDate);\r\n procedure SelectDateIfAvailable(ADate: TDate);\r\n procedure InitSample; virtual;\r\n function ColAtX(AX: Single): Integer;\r\n function RowAtY(AY: Single): Integer;\r\n function DateToRow(ADate: TDate): Integer;\r\n function DateToCol(ADate: TDate): Integer;\r\n function XYToDate(AX, AY: Single): TDate;\r\n function CurrentDay: Integer;\r\n function CurrentMonth: Integer;\r\n function CurrentYear: Integer;\r\n function PreviousMonth: Integer;\r\n function PreviousYear: Integer;\r\n function NextMonth: Integer;\r\n function NextYear: Integer;\r\n function SelectedDate: TDate;\r\n property MonthsPopup: TTMSFNCCalendarPopupBox read GetMonthsPopup;\r\n property YearsPopup: TTMSFNCCalendarPopupBox read GetYearsPopup;\r\n property Day: Integer read FDay write SetDay;\r\n property Date: TDate read FDate write SetDate;\r\n property CurrentDate: TDate read GetCurrentDate;\r\n property FocusedDate: TDate read FFocusedDate write SetFocusedDate stored IsFocusedDateStored nodefault;\r\n property SelectedDates: TTMSFNCCalendarDates read FSelectedDates;\r\n property BadgeSize: Integer read FBadgeSize write SetBadgeSize default 14;\r\n property OnChange: TNotifyEvent read FOnChange write FOnChange;\r\n end;\r\n\r\n {$IFNDEF LCLLIB}\r\n [ComponentPlatformsAttribute(TMSPlatformsWeb)]\r\n {$ENDIF}\r\n TTMSFNCCalendar = class(TTMSFNCCustomCalendar)\r\n published\r\n property BitmapContainer;\r\n property BadgeSize;\r\n property Header;\r\n property Footer;\r\n property Fill;\r\n property Stroke;\r\n property Day;\r\n property Month;\r\n property Year;\r\n property Date;\r\n property MaxDate;\r\n property MinDate;\r\n property FirstDay;\r\n property Events;\r\n property WeekNumberAppearance;\r\n property DayNameAppearance;\r\n property DateAppearance;\r\n property LineAppearance;\r\n property Interaction;\r\n property GlobalFont;\r\n property OnBeforeDrawHeader;\r\n property OnAfterDrawHeader;\r\n property OnBeforeDrawFooter;\r\n property OnAfterDrawFooter;\r\n property OnBeforeDrawDayNames;\r\n property OnAfterDrawDayNames;\r\n property OnBeforeDrawDayNumbers;\r\n property OnAfterDrawDayNumbers;\r\n property OnBeforeDrawLines;\r\n property OnAfterDrawLines;\r\n property OnBeforeDrawWeekNumbers;\r\n property OnAfterDrawWeekNumbers;\r\n property OnBeforeDrawArrowLeft;\r\n property OnAfterDrawArrowLeft;\r\n property OnBeforeDrawArrowRight;\r\n property OnAfterDrawArrowRight;\r\n property OnBeforeDrawBadge;\r\n property OnAfterDrawBadge;\r\n property OnBeforeDrawHeaderText;\r\n property OnAfterDrawHeaderText;\r\n property OnBeforeDrawFooterText;\r\n property OnAfterDrawFooterText;\r\n property OnBeforeDrawDayNamesText;\r\n property OnAfterDrawDayNamesText;\r\n property OnBeforeDrawDayNumbersText;\r\n property OnAfterDrawDayNumbersText;\r\n property OnBeforeDrawWeekNumbersText;\r\n property OnAfterDrawWeekNumbersText;\r\n property OnBeforeSelectDate;\r\n property OnSelectDate;\r\n property OnSelectMultiDate;\r\n property OnYearChanged;\r\n property OnMonthChanged;\r\n property OnCustomNavigation;\r\n property OnCustomArrowDraw;\r\n property OnNavigateBack;\r\n property OnNavigateForward;\r\n property OnNavigateFooter;\r\n property OnBeforeShowMonthPopup;\r\n property OnBeforeShowYearPopup;\r\n property OnYearPopupValueSelected;\r\n property OnMonthPopupValueSelected;\r\n end;\r\n\r\nimplementation\r\n\r\nuses\r\n Math, DateUtils, Variants, WEBLib.TMSFNCPersistence;\r\n\r\nconst\r\n CALMINDATE = -693594;\r\n ARRPOS = 8;\r\n //DAYNAMEHEIGHT = 15;\r\n\r\ntype\r\n TTMSFNCCalendarWordArray = array of Word;\r\n\r\nfunction GetTickCountX: DWORD;\r\nvar\r\n h, m, s, ms: Word;\r\nbegin\r\n DecodeTime(Now, h, m, s, ms);\r\n Result := ms + s * 1000 + m * 60 * 1000 + h * 60 * 60 * 1000;\r\nend;\r\n\r\n{ TTMSFNCCustomCalendar }\r\n\r\nfunction TTMSFNCCustomCalendar.ColCount(const AShowWeeks: Boolean): Integer;\r\nbegin\r\n if AShowWeeks then\r\n Result := 8\r\n else\r\n Result := 7;\r\nend;\r\n\r\nconstructor TTMSFNCCustomCalendar.Create(AOwner: TComponent);\r\nbegin\r\n inherited;\r\n {$IFDEF CMNLIB}\r\n {$IFDEF MSWINDOWS}\r\n NativeCanvas := True;\r\n TextQuality := gtqClearType;\r\n {$ENDIF}\r\n {$ENDIF}\r\n Width := 235;\r\n Height := 235;\r\n Date := Int(Now);\r\n FHoverDate := CALMINDATE;\r\n FSelectedAll := False;\r\n FBadgeSize := 14;\r\n FFocusedDate := FDate;\r\n SetFirstDay(1);\r\n\r\n FHeader := TTMSFNCCalendarHeader.Create(Self);\r\n FFooter := TTMSFNCCalendarFooter.Create;\r\n FDayNameAppearance := TTMSFNCCalendarDayNameAppearance.Create;\r\n FDateAppearance := TTMSFNCCalendarDateAppearance.Create;\r\n FLineAppearance := TTMSFNCCalendarLineAppearance.Create;\r\n FWeekNumberAppearance := TTMSFNCCalendarWeekNumberAppearance.Create;\r\n FInteraction := TTMSFNCCalendarInteraction.Create;\r\n FSelectedDates := TTMSFNCCalendarDates.Create(TTMSFNCCalendarDateItem);\r\n FEvents := TTMSFNCCalendarEvents.Create(TTMSFNCCalendarEventItem);\r\n\r\n SelectDate(FFocusedDate);\r\n CalculateXOffset;\r\n\r\n FEvents.OnChange := @EventsChanged;\r\n FWeekNumberAppearance.OnChange := @WeekNumbersChanged;\r\n FDateAppearance.OnChange := @ShowBeforeAndAfterChanged;\r\n FHeader.OnChange := @HeaderChanged;\r\n FHeader.Arrow.OnChange := @ArrowsChanged;\r\n FFooter.OnChange := @FooterChanged;\r\n FDayNameAppearance.OnChange := @DayNameAppearanceChanged;\r\n FLineAppearance.OnChange := @LineAppearanceChanged;\r\n FGlobalFont := TTMSFNCAppearanceGlobalFont.Create(Self);\r\n\r\n if IsDesignTime then\r\n InitSample;\r\nend;\r\n\r\nfunction TTMSFNCCustomCalendar.DateToCol(ADate: TDate): Integer;\r\nvar\r\n Col: Integer;\r\nbegin\r\n Col := DayOfWeek(EncodeDate(FYear, FMonth, 1)) - FirstDay;\r\n if Col < 0 then\r\n Col := Col + 7;\r\n\r\n if WeekNumberAppearance.Visible then\r\n Result := (Col + DayOf(ADate) + DateToRow(ADate)) mod 8\r\n else\r\n Result := (Col + DayOf(ADate) - 1) mod 7;\r\nend;\r\n\r\nfunction TTMSFNCCustomCalendar.DateToRow(ADate: TDate): Integer;\r\nvar\r\n fd: Integer;\r\nbegin\r\n fd := DayOfWeek(EncodeDate(FYear, FMonth, 1)) - FirstDay;\r\n if fd < 0 then\r\n fd := fd + 7;\r\n\r\n Result := (fd - 1 + DayOf(ADate)) div 7;\r\nend;\r\n\r\nprocedure TTMSFNCCustomCalendar.DayNameAppearanceChanged(Sender: TObject);\r\nbegin\r\n Changed;\r\nend;\r\n\r\ndestructor TTMSFNCCustomCalendar.Destroy;\r\nbegin\r\n FGlobalFont.Free;\r\n FHeader.Free;\r\n FFooter.Free;\r\n FDayNameAppearance.Free;\r\n FDateAppearance.Free;\r\n FLineAppearance.Free;\r\n FWeekNumberAppearance.Free;\r\n FSelectedDates.Free;\r\n FEvents.Free;\r\n FInteraction.Free;\r\n if Assigned(FYearsPopup) then\r\n FYearsPopup.Free;\r\n if Assigned(FMonthsPopup) then\r\n FMonthsPopup.Free;\r\n inherited;\r\nend;\r\n\r\n procedure TTMSFNCCustomCalendar.DoAfterDrawArrowLeft(AGraphics: TTMSFNCGraphics;\r\n AArrowRect: TRectF);\r\nbegin\r\n if Assigned(OnAfterDrawArrowLeft) then\r\n OnAfterDrawArrowLeft(Self, AGraphics, AArrowRect);\r\nend;\r\n\r\nprocedure TTMSFNCCustomCalendar.DoAfterDrawArrowRight(\r\n AGraphics: TTMSFNCGraphics; AArrowRect: TRectF);\r\nbegin\r\n if Assigned(OnAfterDrawArrowRight) then\r\n OnAfterDrawArrowRight(Self, Agraphics, AArrowRect);\r\nend;\r\n\r\nprocedure TTMSFNCCustomCalendar.DoAfterDrawBadge(AGraphics: TTMSFNCGraphics;\r\n ARect: TRectF; ABadge: TTMSFNCCalendarEventItem);\r\nbegin\r\n if Assigned(OnAfterDrawBadge) then\r\n OnAfterDrawBadge(Self, AGraphics, ARect, ABadge);\r\nend;\r\n\r\nprocedure TTMSFNCCustomCalendar.DoAfterDrawDayNames(AGraphics: TTMSFNCGraphics;\r\n ARect: TRectF);\r\nbegin\r\n if Assigned(OnAfterDrawDayNames) then\r\n OnAfterDrawDayNames(Self, AGraphics, ARect);\r\nend;\r\n\r\nprocedure TTMSFNCCustomCalendar.DoAfterDrawDayNamesText(\r\n AGraphics: TTMSFNCGraphics; ARect: TRectF; AText: string;\r\n AHorizontalTextAlign, AVerticalTextAlign: TTMSFNCGraphicsTextAlign);\r\nbegin\r\n if Assigned(OnAfterDrawDayNamesText) then\r\n OnAfterDrawDayNamesText(Self, AGraphics, ARect, AText, AHorizontalTextAlign, AVerticalTextAlign);\r\nend;\r\n\r\nprocedure TTMSFNCCustomCalendar.DoAfterDrawDayNumbers(\r\n AGraphics: TTMSFNCGraphics; ARect: TRectF; ADate: TDate);\r\nbegin\r\n if Assigned(OnAfterDrawDayNumbers) then\r\n OnAfterDrawDayNumbers(Self, AGraphics, ARect, ADate);\r\nend;\r\n\r\nprocedure TTMSFNCCustomCalendar.DoAfterDrawDayNumbersText(\r\n AGraphics: TTMSFNCGraphics; ARect: TrectF; AText: string;\r\n AHorizontalTextAlign, AVerticalTextAlign: TTMSFNCGraphicsTextAlign);\r\nbegin\r\n if Assigned(OnAfterDrawDayNumbersText) then\r\n OnAfterDrawDayNumbersText(Self, AGraphics, ARect, AText, AHorizontalTextAlign, AVerticalTextAlign);\r\nend;\r\n\r\nprocedure TTMSFNCCustomCalendar.DoAfterDrawFooter(AGraphics: TTMSFNCGraphics;\r\n ARect: TRectF);\r\nbegin\r\n if Assigned(OnAfterDrawFooter) then\r\n OnAfterDrawFooter(Self, AGraphics, ARect);\r\nend;\r\n\r\nprocedure TTMSFNCCustomCalendar.DoAfterDrawFooterText(\r\n AGraphics: TTMSFNCGraphics; ARect: TRectF; AText: string;\r\n AHorizontalTextAlign, AVerticalTextAlign: TTMSFNCGraphicsTextAlign);\r\nbegin\r\n if Assigned(OnAfterDrawFooterText) then\r\n OnAfterDrawFooterText(Self, AGraphics, ARect, AText, AHorizontalTexTAlign, AVerticalTextAlign);\r\nend;\r\n\r\nprocedure TTMSFNCCustomCalendar.DoAfterDrawHeader(AGraphics: TTMSFNCGraphics;\r\n ARect: TRectF);\r\nbegin\r\n if Assigned(OnAfterDrawHeader) then\r\n OnAfterDrawHeader(Self, AGraphics, ARect);\r\nend;\r\n\r\nprocedure TTMSFNCCustomCalendar.DoAfterDrawHeaderText(\r\n AGraphics: TTMSFNCGraphics; ARect: TRectF; AText: string;\r\n AHorizontalTextAlign, AVerticalTextAlign: TTMSFNCGraphicsTextAlign);\r\nbegin\r\n if Assigned(OnAfterDrawHeaderText) then\r\n OnAfterDrawHeaderText(Self, AGraphics, ARect, AText, AHorizontalTexTAlign, AVerticalTextAlign);\r\nend;\r\n\r\nprocedure TTMSFNCCustomCalendar.DoAfterDrawWeekNumbersText(\r\n AGraphics: TTMSFNCGraphics; ARect: TrectF; AText: string;\r\n AHorizontalTextAlign, AVerticalTextAlign: TTMSFNCGraphicsTextAlign);\r\nbegin\r\n if Assigned(OnAfterDrawWeekNumbersText) then\r\n OnAfterDrawWeekNumbersText(Self, AGraphics, ARect, AText, AHorizontalTextAlign, AVerticalTextAlign);\r\nend;\r\n\r\nprocedure TTMSFNCCustomCalendar.DoAfterDrawLines(AGraphics: TTMSFNCGraphics);\r\nbegin\r\n if Assigned(OnAfterDrawLines) then\r\n OnAfterDrawLines(Self, AGraphics);\r\nend;\r\n\r\nprocedure TTMSFNCCustomCalendar.DoAfterDrawWeekNumbers(AGraphics: TTMSFNCGraphics;\r\n ARect: TRectF);\r\nbegin\r\n if Assigned(OnAfterDrawWeekNumbers) then\r\n OnAfterDrawWeekNumbers(Self, AGraphics, ARect);\r\nend;\r\n\r\nprocedure TTMSFNCCustomCalendar.DoBeforeDrawArrowLeft(\r\n AGraphics: TTMSFNCGraphics; AArrowRect: TRectF; var AAllow,\r\n ADefaultDraw: Boolean);\r\nbegin\r\n if Assigned(OnBeforeDrawArrowLeft) then\r\n OnBeforeDrawArrowLeft(Self, Agraphics, AArrowRect, AAllow, ADefaultDraw);\r\nend;\r\n\r\nprocedure TTMSFNCCustomCalendar.DoBeforeDrawArrowRight(\r\n AGraphics: TTMSFNCGraphics; AArrowRect: TRectF; var AAllow,\r\n ADefaultDraw: Boolean);\r\nbegin\r\n if Assigned(OnBeforeDrawArrowRight) then\r\n OnBeforeDrawArrowRight(Self, AGraphics, AArrowRect, AAllow, ADefaultDraw);\r\nend;\r\n\r\nprocedure TTMSFNCCustomCalendar.DoBeforeDrawBadge(AGraphics: TTMSFNCGraphics;\r\n ARect: TRectF; ABadge: TTMSFNCCalendarEventItem; var AAllow,\r\n ADefaultDraw: Boolean);\r\nbegin\r\n if Assigned(OnBeforeDrawBadge) then\r\n OnBeforeDrawBadge(Self, AGraphics, ARect, ABadge, AAllow, ADefaultDraw);\r\nend;\r\n\r\nprocedure TTMSFNCCustomCalendar.DoBeforeDrawDayNames(AGraphics: TTMSFNCGraphics;\r\n ARect: TRectF; var AAllow, ADefaultDraw: Boolean);\r\nbegin\r\n if Assigned(OnBeforeDrawDayNames) then\r\n OnBeforeDrawDayNames(Self, AGraphics, ARect, AAllow, ADefaultDraw);\r\nend;\r\n\r\nprocedure TTMSFNCCustomCalendar.DoBeforeDrawDayNamesText(\r\n AGraphics: TTMSFNCGraphics; ARect: TRectF; AText: string;\r\n AHorizontalTextAlign, AVerticalTextAlign: TTMSFNCGraphicsTextAlign;\r\n var AAllow: Boolean; var ADefaultDraw: Boolean);\r\nbegin\r\n if Assigned(OnBeforeDrawDayNamesText) then\r\n OnBeforeDrawDayNamesText(Self, AGraphics, ARect, AText, AHorizontalTextAlign, AVerticalTextAlign, AAllow, ADefaultDraw);\r\nend;\r\n\r\nprocedure TTMSFNCCustomCalendar.DoBeforeDrawDayNumbers(\r\n AGraphics: TTMSFNCGraphics; ARect: TrectF; ADate: TDate; var AAllow, ADefaultDraw: Boolean);\r\nbegin\r\n if Assigned(OnBeforeDrawDayNumbers) then\r\n OnBeforeDrawDayNumbers(Self, AGraphics, ARect, ADate, AAllow, ADefaultDraw);\r\nend;\r\n\r\nprocedure TTMSFNCCustomCalendar.DoBeforeDrawDayNumbersText(\r\n AGraphics: TTMSFNCGraphics; ARect: TRectF; AText: string;\r\n AHorizontalTextAlign, AVerticalTextAlign: TTMSFNCGraphicsTextAlign;\r\n var AAllow, ADefaultDraw: Boolean);\r\nbegin\r\n if Assigned(OnBeforeDrawDayNumbersText) then\r\n OnBeforeDrawDayNumbersText(Self, AGraphics, ARect, AText, AHorizontalTextAlign, AVerticalTextAlign, AAllow, ADefaultDraw);\r\nend;\r\n\r\nprocedure TTMSFNCCustomCalendar.DoBeforeDrawFooter(AGraphics: TTMSFNCGraphics;\r\n ARect: TRectF; var AAllow, ADefaultDraw: Boolean);\r\nbegin\r\n if Assigned(OnBeforeDrawFooter) then\r\n OnBeforeDrawFooter(Self, AGraphics, ARect, AAllow, ADefaultDraw);\r\nend;\r\n\r\nprocedure TTMSFNCCustomCalendar.DoBeforeDrawFooterText(\r\n AGraphics: TTMSFNCGraphics; ARect: TRectF; AText: string;\r\n AHorizontalTextAlign, AVerticalTextAlign: TTMSFNCGraphicsTextAlign;\r\n var AAllow, ADefaultDraw: Boolean);\r\nbegin\r\n if Assigned(OnBeforeDrawFooterText) then\r\n OnBeforeDrawFooterText(Self, AGraphics, ARect, AText, AHorizontalTextAlign, AVerticalTextAlign, AAllow, ADefaultDraw);\r\nend;\r\n\r\nprocedure TTMSFNCCustomCalendar.DoBeforeDrawHeader(AGraphics: TTMSFNCGraphics;\r\n ARect: TRectF; var AAllow, ADefaultDraw: Boolean);\r\nbegin\r\n if Assigned(OnBeforeDrawHeader) then\r\n OnBeforeDrawHeader(Self, AGraphics, ARect, AAllow, ADefaultDraw);\r\nend;\r\n\r\nprocedure TTMSFNCCustomCalendar.DoBeforeDrawHeaderText(\r\n AGraphics: TTMSFNCGraphics; ARect: TRectF; AText: string;\r\n AHorizontalTextAlign, AVerticalTextAlign: TTMSFNCGraphicsTextAlign;\r\n var AAllow, ADefaultDraw: Boolean);\r\nbegin\r\n if Assigned(OnBeforeDrawHeaderText) then\r\n OnBeforeDrawHeaderText(Self, AGraphics, ARect, AText, AHorizontalTextAlign, AVerticalTextAlign, AAllow, ADefaultDraw);\r\nend;\r\n\r\nprocedure TTMSFNCCustomCalendar.DoBeforeDrawWeekNumbersText(\r\n AGraphics: TTMSFNCGraphics; ARect: TRectF; AText: string;\r\n AHorizontalTextAlign, AVerticalTextAlign: TTMSFNCGraphicsTextAlign;\r\n var AAllow, ADefaultDraw: Boolean);\r\nbegin\r\n if Assigned(OnBeforeDrawWeekNumbersText) then\r\n OnBeforeDrawWeekNumbersText(Self, AGraphics, ARect, AText, AHorizontalTextAlign, AVerticalTextAlign, AAllow, ADefaultDraw);\r\nend;\r\n\r\nprocedure TTMSFNCCustomCalendar.DoBeforeShowMonthPopup(var AAllow: Boolean);\r\nbegin\r\n if Assigned(OnBeforeShowMonthPopup) then\r\n OnBeforeShowMonthPopup(Self, AAllow);\r\nend;\r\n\r\nprocedure TTMSFNCCustomCalendar.DoBeforeSelectDate(ADate: TDate);\r\nbegin\r\n if Assigned(OnBeforeSelectDate) then\r\n OnBeforeSelectDate(Self, ADate);\r\nend;\r\n\r\nprocedure TTMSFNCCustomCalendar.DoBeforeShowYearPopup(var AAllow: Boolean);\r\nbegin\r\n if Assigned(OnBeforeShowYearPopup) then\r\n OnBeforeShowYearPopup(Self, AAllow);\r\nend;\r\n\r\nprocedure TTMSFNCCustomCalendar.DoChangeMonth(AMonth: Integer);\r\nbegin\r\n if Assigned(OnMonthChanged) then\r\n OnMonthChanged(Self, AMonth);\r\nend;\r\n\r\nprocedure TTMSFNCCustomCalendar.DoChangeYear(AYear: Integer);\r\nbegin\r\n if Assigned(OnYearChanged) then\r\n OnYearChanged(Self, AYear);\r\nend;\r\n\r\nprocedure TTMSFNCCustomCalendar.DoCustomArrowDraw(AGraphics: TTMSFNCGraphics;\r\n ARect: TRectF; ADirection: Boolean);\r\nbegin\r\n if Assigned(OnCustomArrowDraw) then\r\n OnCustomArrowDraw(Self, AGraphics, ARect, ADirection);\r\nend;\r\n\r\nprocedure TTMSFNCCustomCalendar.DoCustomNavigation(ADate,\r\n AFocusedDate: TDate; ADirection: Boolean);\r\nbegin\r\n if Assigned(OnCustomNavigation) then\r\n OnCustomNavigation(Self, ADate, AFocusedDate, ADirection);\r\nend;\r\n\r\nprocedure TTMSFNCCustomCalendar.DoMonthPopupValueSelected(AItemIndex: Integer; AMonth: Integer; AMonthValue: string);\r\nbegin\r\n if Assigned(OnMonthPopupValueSelected) then\r\n OnMonthPopupValueSelected(Self, AItemIndex, AMonth, AMonthValue);\r\nend;\r\n\r\nprocedure TTMSFNCCustomCalendar.DoMonthSelectorPopup(ALeft, ATop: Single);\r\nvar\r\n I: Integer;\r\n b: Boolean;\r\n p: TPointF;\r\nbegin\r\n MonthsPopup.Items.Clear;\r\n\r\n for I := 1 to 12 do\r\n MonthsPopup.Items.Add(FormatSettings.LongMonthNames[I]);\r\n MonthsPopup.ItemIndex := MonthOf(Date) - 1;\r\n\r\n p := PointF(ALeft, ATop);\r\n {$IFNDEF FMXLIB}\r\n p := LocalToScreenEx(p);\r\n {$ENDIF}\r\n\r\n b := True;\r\n DoBeforeShowMonthPopup(b);\r\n if b then\r\n MonthsPopup.Popup(p);\r\nend;\r\n\r\nprocedure TTMSFNCCustomCalendar.DoPopupMonthsChange(Sender: TObject);\r\nvar\r\n m: Integer;\r\nbegin\r\n m := MonthsPopup.ItemIndex + 1;\r\n DoMonthPopupValueSelected(MonthsPopup.ItemIndex, m, MonthsPopup.Items[MonthsPopup.ItemIndex]);\r\n Month := m;\r\nend;\r\n\r\nprocedure TTMSFNCCustomCalendar.DoPopupYearsChange(Sender: TObject);\r\nvar\r\n y: Integer;\r\nbegin\r\n y := StrToInt(YearsPopup.Items[YearsPopup.ItemIndex]);\r\n DoYearPopupValueSelected(YearsPopup.ItemIndex, y);\r\n Year := y;\r\nend;\r\n\r\nprocedure TTMSFNCCustomCalendar.DoSelectDate(ADate: TDate);\r\nbegin\r\n if Assigned(OnSelectDate) then\r\n OnSelectDate(Self, ADate);\r\nend;\r\n\r\nprocedure TTMSFNCCustomCalendar.DoSelectMultiDate(AStartDate,\r\n AEndDate: TDate);\r\nbegin\r\n if Assigned(OnSelectMultiDate) then\r\n OnSelectMultiDate(Self, AStartDate, AEndDate);\r\nend;\r\n\r\nprocedure TTMSFNCCustomCalendar.DoYearPopupValueSelected(AItemIndex: Integer; AYear: Integer);\r\nbegin\r\n if Assigned(OnYearPopupValueSelected) then\r\n OnYearPopupValueSelected(Self, AItemIndex, AYear);\r\nend;\r\n\r\nprocedure TTMSFNCCustomCalendar.DoYearSelectorPopup(ALeft, ATop: Single);\r\nvar\r\n I: Integer;\r\n b: Boolean;\r\n p: TPointF;\r\nbegin\r\n YearsPopup.Items.Clear;\r\n\r\n for I := Interaction.YearOptions.ItemsBeforeCurrentYear downto 1 do\r\n YearsPopup.Items.Add(IntToStr(Year - I));\r\n\r\n YearsPopup.Items.Add(IntToStr(Year));\r\n\r\n for I := 1 to Interaction.YearOptions.ItemsAfterCurrentYear do\r\n YearsPopup.Items.Add(IntToStr(Year + I));\r\n\r\n YearsPopup.ItemIndex := Interaction.YearOptions.ItemsBeforeCurrentYear;\r\n\r\n p := PointF(ALeft, ATop);\r\n {$IFNDEF FMXLIB}\r\n p := LocalToScreenEx(p);\r\n {$ENDIF}\r\n\r\n b := True;\r\n DoBeforeShowYearPopup(b);\r\n if b then\r\n YearsPopup.Popup(p);\r\nend;\r\n\r\nfunction TTMSFNCCustomCalendar.IsMaxDateStored: Boolean;\r\nbegin\r\n Result := FMaxDate <> 0.0;\r\nend;\r\n\r\nfunction TTMSFNCCustomCalendar.IsMinDateStored: Boolean;\r\nbegin\r\n Result := FMinDate <> 0.0;\r\nend;\r\n\r\nprocedure TTMSFNCCustomCalendar.LineAppearanceChanged(Sender: TObject);\r\nbegin\r\n Changed;\r\nend;\r\n\r\nprocedure TTMSFNCCustomCalendar.DoBeforeDrawLines(AGraphics: TTMSFNCGraphics;\r\n var AAllow, ADefaultDraw: Boolean);\r\nbegin\r\n if Assigned(OnBeforeDrawLines) then\r\n OnBeforeDrawLines(Self, AGraphics, AAllow, ADefaultDraw);\r\nend;\r\n\r\nprocedure TTMSFNCCustomCalendar.DoBeforeDrawWeekNumbers(AGraphics: TTMSFNCGraphics;\r\n ARect: TRectF; var AAllow, ADefaultDraw: Boolean);\r\nbegin\r\n if Assigned(OnBeforeDrawWeekNumbers) then\r\n OnBeforeDrawWeekNumbers(Self, AGraphics, ARect, AAllow, ADefaultDraw);\r\nend;\r\n\r\nprocedure TTMSFNCCustomCalendar.Draw(AGraphics: TTMSFNCGraphics;\r\n ARectF: TRectF);\r\nbegin\r\n inherited;\r\n FDateAreaHeight := CalcDateAreaHeight(Height, FHeader.Visible, FFooter.Visible);\r\n\r\n AGraphics.BitmapContainer := BitmapContainer;\r\n\r\n DrawDayNames(AGraphics, ARectF);\r\n\r\n if FDateAreaHeight > 0 then\r\n begin\r\n DrawDays(AGraphics, ARectF);\r\n if WeekNumberAppearance.Visible then\r\n DrawWeekNumbers(AGraphics, ARectF);\r\n end;\r\n\r\n if FFooter.Visible then\r\n DrawFooter(AGraphics, ARectF);\r\n\r\n DrawLines(AGraphics, ARectF);\r\n\r\n if FHeader.Visible then\r\n DrawHeader(AGraphics, ARectF);\r\n\r\n DrawBadges(AGraphics, ARectF);\r\nend;\r\n\r\nprocedure TTMSFNCCustomCalendar.DrawArrows(AGraphics: TTMSFNCGraphics;\r\n ARectF: TRectF; ADirection: TTMSFNCCalendarArrowLayoutValue);\r\nvar\r\n arrPath: TTMSFNCGraphicsPath;\r\n p: TPointF;\r\n rHeight, rRight, rLeft: Single;\r\n b, df: Boolean;\r\nbegin\r\n rHeight := (ARectF.Bottom - ARectF.Top);\r\n InflateRectEx(ARectF, -1, -1);\r\n AGraphics.Fill.Color := Header.Arrow.Color;\r\n AGraphics.Stroke.Color := Header.Arrow.Color;\r\n\r\n if ADirection = alvLeft then\r\n begin\r\n b := True;\r\n df := True;\r\n case Header.Arrow.ArrowLeftType of\r\n atTriangle:\r\n begin\r\n arrPath := TTMSFNCGraphicsPath.Create;\r\n try\r\n p := PointF(ARectF.Left, ARectF.Top + rHeight / 2);\r\n arrPath.MoveTo(p);\r\n arrPath.LineTo(PointF(ARectF.Right, ARectF.Top));\r\n arrPath.LineTo(PointF(ARectF.Right, ARectF.Bottom));\r\n arrPath.ClosePath;\r\n AGraphics.Stroke.Width := 1;\r\n\r\n DoBeforeDrawArrowLeft(AGraphics, ARectF, b, df);\r\n if b then\r\n begin\r\n if df then\r\n AGraphics.DrawPath(arrPath);\r\n\r\n DoAfterDrawArrowLeft(AGraphics, ARectF);\r\n end;\r\n finally\r\n arrPath.Free;\r\n end;\r\n end;\r\n atArrow:\r\n begin\r\n p := PointF(ARectF.Left, ARectF.Top + rHeight / 2);\r\n rRight := ARectF.Left + (ARectF.Right - ARectF.Left) / 2;\r\n AGraphics.Stroke.Width := 2;\r\n\r\n DoBeforeDrawArrowLeft(AGraphics, ARectF, b, df);\r\n if b then\r\n begin\r\n if df then\r\n begin\r\n AGraphics.DrawLine(PointF(rRight, ARectF.Top), p);\r\n AGraphics.DrawLine(p, PointF(rRight, ARectF.Bottom));\r\n end;\r\n DoAfterDrawArrowLeft(AGraphics, ARectF);\r\n end;\r\n end;\r\n atBitmap:\r\n begin\r\n DoBeforeDrawArrowLeft(AGraphics, ARectF, b, df);\r\n if b then\r\n begin\r\n if df then\r\n AGraphics.DrawScaledBitmap(ARectF, FHeader.Arrow.FArrowLeftBitmap);\r\n\r\n DoAfterDrawArrowLeft(AGraphics, ARectF);\r\n end;\r\n end;\r\n atCustom:\r\n begin\r\n DoBeforeDrawArrowLeft(AGraphics, ARectF, b, df);\r\n if b then\r\n begin\r\n if df then\r\n DoCustomArrowDraw(AGraphics, ARectF, True);\r\n\r\n DoAfterDrawArrowLeft(AGraphics, ARectF);\r\n end;\r\n end;\r\n end;\r\n end\r\n else if ADirection = alvRight then\r\n begin\r\n b := True;\r\n df := True;\r\n case Header.Arrow.ArrowRightType of\r\n atTriangle:\r\n begin\r\n arrPath := TTMSFNCGraphicsPath.Create;\r\n try\r\n p := PointF(ARectF.Right, ARectF.Top + rHeight / 2);\r\n arrPath.MoveTo(p);\r\n arrPath.LineTo(PointF(ARectF.Left, ARectF.Bottom));\r\n arrPath.LineTo(PointF(ARectF.Left, ARectF.Top));\r\n arrPath.ClosePath;\r\n AGraphics.Stroke.Width := 1;\r\n\r\n DoBeforeDrawArrowLeft(AGraphics, ARectF, b, df);\r\n if b then\r\n begin\r\n if df then\r\n AGraphics.DrawPath(arrPath);\r\n\r\n DoAfterDrawArrowLeft(AGraphics, ARectF);\r\n end;\r\n finally\r\n arrPath.Free;\r\n end;\r\n end;\r\n atArrow:\r\n begin\r\n p := PointF(ARectF.Right, ARectF.Top + rHeight / 2);\r\n rLeft := ARectF.Left + (ARectF.Right - ARectF.Left) / 2;\r\n AGraphics.Stroke.Width := 2;\r\n\r\n DoBeforeDrawArrowLeft(AGraphics, ARectF, b, df);\r\n if b then\r\n begin\r\n if df then\r\n begin\r\n AGraphics.DrawLine(PointF(rLeft, ARectF.Top), p);\r\n AGraphics.DrawLine(PointF(rLeft, ARectF.Bottom), p);\r\n end;\r\n DoAfterDrawArrowLeft(AGraphics, ARectF);\r\n end;\r\n end;\r\n atBitmap:\r\n begin\r\n DoBeforeDrawArrowLeft(AGraphics, ARectF, b, df);\r\n if b then\r\n begin\r\n if df then\r\n AGraphics.DrawScaledBitmap(ARectF, FHeader.Arrow.ArrowRightBitmap);\r\n\r\n DoAfterDrawArrowLeft(AGraphics, ARectF);\r\n end;\r\n end;\r\n atCustom:\r\n begin\r\n DoBeforeDrawArrowLeft(AGraphics, ARectF, b, df);\r\n if b then\r\n begin\r\n if df then\r\n DoCustomArrowDraw(AGraphics, ARectF, False);\r\n\r\n DoAfterDrawArrowLeft(AGraphics, ARectF);\r\n end;\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomCalendar.DrawBadge(AGraphics: TTMSFNCGraphics;\r\n ARectF: TRectF; ABadge: TTMSFNCCalendarEventItem; ACol, ARow: Integer);\r\nvar\r\n b, df: Boolean;\r\nbegin\r\n if ABadge.BadgeColor <> gcNull then\r\n begin\r\n AGraphics.Fill.Kind := gfkSolid;\r\n AGraphics.Stroke.Kind := gskSolid;\r\n AGraphics.Fill.Color := ABadge.BadgeColor;\r\n AGraphics.Stroke.Color := ABadge.BadgeColor;\r\n end\r\n else\r\n begin\r\n AGraphics.Fill.Assign(DateAppearance.BadgeFill);\r\n AGraphics.Stroke.Assign(DateAppearance.BadgeStroke);\r\n end;\r\n\r\n if ABadge.BadgeFontColor <> gcNull then\r\n begin\r\n {$IFNDEF FMXLIB}\r\n AGraphics.Font.Size := 7;\r\n {$ENDIF}\r\n {$IFDEF FMXLIB}\r\n AGraphics.Font.Size := 10;\r\n {$ENDIF}\r\n AGraphics.Font.Color := ABadge.BadgeFontColor\r\n end\r\n else\r\n AGraphics.Font.AssignSource(DateAppearance.BadgeFont);\r\n\r\n ShiftCellH(ARectF, (ACol + 1) * FXOffset - FBadgeSize);\r\n ShiftCellV(ARectF, ARow * FYOffset);\r\n\r\n b := True;\r\n df := True;\r\n DoBeforeDrawBadge(AGraphics, ARectF, ABadge, b, df);\r\n if b then\r\n begin\r\n if df then\r\n begin\r\n AGraphics.DrawEllipse(ARectF);\r\n if ABadge.BadgeValue <> 0 then\r\n AGraphics.DrawText(ARectF, IntToStr(ABadge.BadgeValue), False, gtaCenter, gtaCenter)\r\n end;\r\n DoAfterDrawBadge(AGraphics, ARectF, ABadge);\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomCalendar.DrawBadges(AGraphics: TTMSFNCGraphics;\r\n ARectF: TRectF);\r\nvar\r\n col, row, I: Integer;\r\n br: TRectF;\r\n badge: TTMSFNCCalendarEventItem;\r\nbegin\r\n br := RectF(ARectF.Left, ARectF.Top, ARectF.Left + FBadgeSize, ARectF.Top + FBadgeSize);\r\n ShiftCellH(br, 1);\r\n\r\n if FHeader.Visible then\r\n ShiftCellV(br, FHeader.Height + FDayNameAppearance.Height)\r\n else\r\n ShiftCellV(br, FDayNameAppearance.Height);\r\n\r\n for I := 0 to FEvents.Count - 1 do\r\n begin\r\n Badge := FEvents.Items[I];\r\n if (FYear = YearOf(badge.Date)) and (FMonth = MonthOf(badge.Date)) and badge.ShowBadge then\r\n begin\r\n row := DateToRow(badge.Date);\r\n col := DateToCol(badge.Date);\r\n DrawBadge(AGraphics, br, badge, col, row);\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomCalendar.DrawDayNames(AGraphics: TTMSFNCGraphics;\r\n ARectF: TRectF);\r\nvar\r\n dnColCount, dn: Integer;\r\n cellRect: TRectF;\r\n I: Integer;\r\n b, df: Boolean;\r\nbegin\r\n dnColCount := ColCount(WeekNumberAppearance.Visible);\r\n\r\n if FHeader.Visible then\r\n cellRect := RectF(ARectF.Left, Header.Height - 1, FXOffset, Header.Height + FDayNameAppearance.Height)\r\n else\r\n cellRect := RectF(ARectF.Left, ARectF.Top + 1, FXOffset, FDayNameAppearance.Height);\r\n\r\n dn := FirstDay;\r\n ShiftCellH(cellRect, 1);\r\n\r\n if WeekNumberAppearance.Visible then\r\n begin\r\n ShiftCellH(cellRect, FXOffset);\r\n dnColCount := dnColCount - 1;\r\n end;\r\n\r\n AGraphics.Fill.Assign(DayNameAppearance.Fill);\r\n AGraphics.Stroke.Assign(DayNameAppearance.Stroke);\r\n AGraphics.Font.AssignSource(DayNameAppearance.Font);\r\n\r\n for I := 0 to dnColCount - 1 do\r\n begin\r\n b := True;\r\n df := True;\r\n DoBeforeDrawDayNames(AGraphics, cellRect, b, df);\r\n if b then\r\n begin\r\n if df then\r\n AGraphics.DrawRectangle(cellRect, gcrmNone);\r\n\r\n DoAfterDrawDayNames(AGraphics, cellRect);\r\n end;\r\n\r\n b := True;\r\n df := True;\r\n DoBeforeDrawDayNamesText(AGraphics, cellRect, FormatSettings.ShortDayNames[dn], DayNameAppearance.HorizontalTextAlign, DayNameAppearance.VerticalTextAlign, b, df);\r\n if b then\r\n begin\r\n if df then\r\n AGraphics.DrawText(cellRect, FormatSettings.ShortDayNames[dn], False, DayNameAppearance.HorizontalTextAlign, DayNameAppearance.VerticalTextAlign);\r\n\r\n DoAfterDrawDayNamesText(AGraphics, cellRect, FormatSettings.ShortDayNames[dn], DayNameAppearance.HorizontalTextAlign, DayNameAppearance.VerticalTextAlign);\r\n end;\r\n\r\n IncrementWeekDay(dn);\r\n ShiftCellH(cellRect, FXOffset);\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomCalendar.DrawDayNumbers(AGraphics: TTMSFNCGraphics; ACellRect: TRectF; Col,\r\n Row, AMonth, I: Integer);\r\nvar\r\n d, mind, maxd: TDate;\r\n b, df: Boolean;\r\nbegin\r\n if WeekNumberAppearance.Visible then\r\n Inc(Col);\r\n\r\n if FHeader.Visible then\r\n ShiftCellV(ACellRect, FHeader.Height + FDayNameAppearance.Height + (Row - 1) * FYOffset)\r\n else\r\n ShiftCellV(ACellRect, FDayNameAppearance.Height + (Row - 1) * FYOffset);\r\n\r\n ShiftCellH(ACellRect, Col * FXOffset);\r\n d := EncodeDate(FYear, AMonth, I);\r\n mind := MinDate;\r\n maxd := MaxDate;\r\n\r\n if MinDate = 0 then\r\n mind := d;\r\n\r\n if MaxDate = 0 then\r\n maxd := d;\r\n\r\n if FSelectedDates.InCollection(d) then\r\n begin\r\n AGraphics.Fill.Assign(DateAppearance.SelectedFill);\r\n AGraphics.Stroke.Assign(DateAppearance.SelectedStroke);\r\n AGraphics.Font.AssignSource(DateAppearance.SelectedFont);\r\n end\r\n else if (Int(d) < Int(mind)) or (Int(d) > Int(maxd)) then\r\n begin\r\n AGraphics.Fill.Assign(DateAppearance.DisabledFill);\r\n AGraphics.Stroke.Assign(DateAppearance.DisabledStroke);\r\n AGraphics.Font.AssignSource(DateAppearance.DisabledFont);\r\n end\r\n else if FDateAppearance.ShowDaysBefore and (20 < I) and (Row = 1) then\r\n begin\r\n if AMonth = 12 then\r\n d := IncYear(d, -1);\r\n\r\n AGraphics.Fill.Assign(DateAppearance.DateBeforeFill);\r\n AGraphics.Font.AssignSource(DateAppearance.DateBeforeFont);\r\n AGraphics.Stroke.Assign(DateAppearance.DateBeforeStroke);\r\n end\r\n else if FDateAppearance.ShowDaysAfter and (15 > I) and (Row >= 5) then\r\n begin\r\n if AMonth = 1 then\r\n d := IncYear(d, 1);\r\n\r\n AGraphics.Fill.Assign(DateAppearance.DateAfterFill);\r\n AGraphics.Font.AssignSource(DateAppearance.DateAfterFont);\r\n AGraphics.Stroke.Assign(DateAppearance.DateAfterStroke);\r\n end\r\n else if CompareDate(d, CurrentDate) = 0 then\r\n begin\r\n AGraphics.Fill.Assign(DateAppearance.TodayFill);\r\n AGraphics.Stroke.Assign(DateAppearance.TodayStroke);\r\n AGraphics.Font.AssignSource(DateAppearance.TodayFont);\r\n end\r\n else\r\n begin\r\n AGraphics.Fill.Assign(DateAppearance.Fill);\r\n AGraphics.Stroke.Assign(DateAppearance.Stroke);\r\n AGraphics.Font.AssignSource(DateAppearance.Font);\r\n end;\r\n\r\n b := True;\r\n df := True;\r\n DoBeforeDrawDayNumbers(AGraphics, ACellRect, d, b, df);\r\n if b then\r\n begin\r\n if df then\r\n AGraphics.DrawRectangle(ACellRect, gcrmNone);\r\n\r\n DoAfterDrawDayNumbers(AGraphics, ACellRect, d);\r\n end;\r\n\r\n b := True;\r\n DoBeforeDrawDayNumbersText(AGraphics, ACellRect, IntToStr(I), DateAppearance.HorizontalTextAlign, DateAppearance.VerticalTextAlign, b, df);\r\n if b then\r\n begin\r\n if df then\r\n AGraphics.DrawText(ACellRect, IntToStr(I), False, DateAppearance.HorizontalTextAlign, DateAppearance.VerticalTextAlign);\r\n\r\n DoAfterDrawDayNumbersText(AGraphics, ACellRect, IntToStr(I), DateAppearance.HorizontalTextAlign, DateAppearance.VerticalTextAlign);\r\n end;\r\n\r\n if (CompareDate(d, FFocusedDate) = 0) and DateAppearance.ShowFocus then\r\n AGraphics.DrawFocusRectangle(ACellRect);\r\nend;\r\n\r\nprocedure TTMSFNCCustomCalendar.DrawDays(AGraphics: TTMSFNCGraphics;\r\n ARectF: TRectF);\r\nvar\r\n I, row, allRows, col, bCol, dim, baDays: Integer;\r\n CalcMonth: TDate;\r\n CellRect: TRectF;\r\nbegin\r\n row := 1;\r\n CalcMonth := (EncodeDate(FYear, FMonth, 1));\r\n col := DayOfWeek(CalcMonth) - FirstDay;\r\n\r\n if col < 0 then\r\n col := col + 7;\r\n\r\n dim := DaysInMonth(CalcMonth);\r\n allRows := CalcRowCount(col, dim);\r\n\r\n if allRows <> 0 then\r\n FYOffset := FDateAreaHeight / allRows;\r\n\r\n CellRect := RectF(ARectF.Left, ARectF.Top, ARectF.Left + FXOffset, ARectF.Top + FYOffset);\r\n ShiftCellH(CellRect, 1);\r\n\r\n if FDateAppearance.ShowDaysBefore then\r\n begin\r\n bCol := col;\r\n if bCol > 0 then\r\n begin\r\n baDays := DaysInMonth(IncMonth(CalcMonth, -1));\r\n for I := bCol - 1 downto 0 do\r\n begin\r\n Dec(bCol);\r\n DrawDayNumbers(AGraphics, CellRect, bCol, row, PreviousMonth, baDays);\r\n Dec(baDays);\r\n end;\r\n end;\r\n end;\r\n\r\n for I := 1 to dim do\r\n begin\r\n DrawDayNumbers(AGraphics, CellRect, col, row, FMonth, I);\r\n Inc(col);\r\n if col > 6 then\r\n begin\r\n col := 0;\r\n Inc(row);\r\n end;\r\n end;\r\n\r\n if FDateAppearance.ShowDaysAfter then\r\n begin\r\n baDays := 1;\r\n while (row <= allRows) do\r\n begin\r\n DrawDayNumbers(AGraphics, CellRect, col, row, NextMonth, baDays);\r\n Inc(col);\r\n if col > 6 then\r\n begin\r\n col := 0;\r\n Inc(row);\r\n end;\r\n Inc(baDays);\r\n end;\r\n end;\r\n\r\n FNumOfWeeksDrawn := allRows;\r\nend;\r\n\r\nprocedure TTMSFNCCustomCalendar.DrawFooter(AGraphics: TTMSFNCGraphics;\r\n ARectF: TRectF);\r\nvar\r\n fr: TRectF;\r\n fText: string;\r\n b, df: Boolean;\r\nbegin\r\n fr := RectF(ARectF.Left, ARectF.Bottom - FFooter.Height, ARectF.Right, ARectF.Bottom);\r\n AGraphics.Fill.Assign(FFooter.Fill);\r\n AGraphics.Stroke.Assign(FFooter.Stroke);\r\n\r\n b := True;\r\n df := True;\r\n DoBeforeDrawFooter(AGraphics, fr, b, df);\r\n if b then\r\n begin\r\n if df then\r\n AGraphics.DrawRectangle(fr);\r\n\r\n DoAfterDrawFooter(AGraphics, fr);\r\n end;\r\n\r\n if fdSelected = FFooter.DateCaption then\r\n fText := FFooter.Caption + ' ' + DateToStr(SelectedDate)\r\n else if fdToday = FFooter.DateCaption then\r\n fText := FFooter.Caption + ' ' + DateToStr(CurrentDate)\r\n else\r\n fText := FFooter.Caption;\r\n\r\n AGraphics.Font.AssignSource(FFooter.Font);\r\n FFooter.CaptionRect := AGraphics.CalculateText(fText, fr);\r\n\r\n b := True;\r\n df := True;\r\n DoBeforeDrawFooterText(AGraphics, fr, fText, FFooter.HorizontalTextAlign, FFooter.VerticalTextAlign, b, df);\r\n if b then\r\n begin\r\n if df then\r\n AGraphics.DrawText(fr, fText, False, FFooter.HorizontalTextAlign, FFooter.VerticalTextAlign);\r\n\r\n DoAfterDrawFooterText(AGraphics, fr, fText, FFooter.HorizontalTextAlign, FFooter.VerticalTextAlign);\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomCalendar.DrawHeader(AGraphics: TTMSFNCGraphics; ARectF: TRectF);\r\nvar\r\n b, df: Boolean;\r\n hr, ar: TRectF;\r\n rCentre: Single;\r\n ht: string;\r\nbegin\r\n ht := FormatSettings.ShortMonthNames[Month] + ' ' + IntToStr(Year);\r\n hr := RectF(ARectF.Left, ARectF.Top, ARectF.Right, FHeader.Height);\r\n AGraphics.Fill.Assign(Header.Fill);\r\n AGraphics.Stroke.Assign(Header.Stroke);\r\n\r\n b := True;\r\n df := True;\r\n DoBeforeDrawHeader(AGraphics, hr, b, df);\r\n if b then\r\n begin\r\n if df then\r\n AGraphics.DrawRectangle(hr);\r\n\r\n DoAfterDrawHeader(AGraphics, hr);\r\n end;\r\n\r\n AGraphics.Font.AssignSource(Header.Font);\r\n\r\n b := True;\r\n df := True;\r\n DoBeforeDrawHeaderText(AGraphics, hr, ht, Header.HorizontalTextAlign, Header.VerticalTextAlign, b, df);\r\n if b then\r\n begin\r\n if df then\r\n AGraphics.DrawText(hr, ht, False, Header.HorizontalTextAlign, Header.VerticalTextAlign);\r\n\r\n DoAfterDrawHeaderText(AGraphics, hr, ht, Header.HorizontalTextAlign, Header.VerticalTextAlign);\r\n end;\r\n\r\n if not (Header.Arrow.Visibility = []) then\r\n begin\r\n ar := hr;\r\n rCentre := (hr.Bottom - hr.Top) / 2;\r\n\r\n if alvLeft in Header.Arrow.Visibility then\r\n begin\r\n SetArrowLeftRect(hr, ar, rCentre);\r\n DrawArrows(AGraphics, ar, alvLeft);\r\n end;\r\n\r\n if alvRight in Header.Arrow.Visibility then\r\n begin\r\n SetArrowRightRect(hr, ar, rCentre);\r\n DrawArrows(AGraphics, ar, alvRight);\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomCalendar.DrawLines(AGraphics: TTMSFNCGraphics;\r\n ARectF: TRectF);\r\nvar\r\n fLeft, fTop, tRight, tBottom: Single;\r\n b, df: Boolean;\r\nbegin\r\n AGraphics.Stroke.Assign(LineAppearance.Stroke);\r\n\r\n fLeft := ARectF.Left + 1;\r\n tRight := ARectF.Right - 1;\r\n\r\n if FHeader.Visible then\r\n fTop := FHeader.Height + FDayNameAppearance.Height - 1\r\n else\r\n fTop := FDayNameAppearance.Height - 1;\r\n\r\n tBottom := fTop;\r\n\r\n b := True;\r\n df := True;\r\n DoBeforeDrawLines(AGraphics, b, df);\r\n if b then\r\n begin\r\n if df then\r\n AGraphics.DrawLine(PointF(fLeft, fTop), PointF(tRight, tBottom));\r\n\r\n DoAfterDrawLines(AGraphics);\r\n end;\r\n\r\n if WeekNumberAppearance.Visible then\r\n begin\r\n fLeft := ARectF.Left + FXOffset;\r\n tRight := fLeft;\r\n\r\n if FHeader.Visible then\r\n fTop := FHeader.Height - 1\r\n else\r\n fTop := 0;\r\n\r\n if FFooter.Visible then\r\n tBottom := ARectF.Bottom - FFooter.Height\r\n else\r\n tBottom := ARectF.Bottom;\r\n\r\n DoBeforeDrawLines(AGraphics, b, df);\r\n if b then\r\n begin\r\n if df then\r\n AGraphics.DrawLine(PointF(fLeft, fTop), PointF(tRight, tBottom));\r\n\r\n DoAfterDrawLines(AGraphics);\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomCalendar.DrawWeekNumbers(AGraphics: TTMSFNCGraphics;\r\n ARectF: TRectF);\r\nvar\r\n wNum, I: Integer;\r\n CellRect: TRectF;\r\n b, df: Boolean;\r\n wks: TTMSFNCCalendarWordArray;\r\nconst\r\n dm: array [1..7] of Word = (7, 1, 2, 3, 4, 5, 6);\r\n\r\n function GregorianFirstWeekDaysCount(const AYear: Word; const AFirstDayOfWeek: Word): Word;\r\n var\r\n FirstJanuary: TDateTime;\r\n FirstJanuaryDay: Word;\r\n begin\r\n FirstJanuary := EncodeDate(AYear, 1, 1);\r\n FirstJanuaryDay := DayOfTheWeek(FirstJanuary);\r\n Result := DaysPerWeek - ((FirstJanuaryDay - AFirstDayOfWeek + 7) mod DaysPerWeek);\r\n end;\r\n\r\n function GregorianWeeksInAYear(const AYear: Word; const AFirstDayOfWeek: Word): Word;\r\n var\r\n DaysInFirstWeek: Word;\r\n begin\r\n Result := DaysInAYear(AYear) div 7;\r\n DaysInFirstWeek := GregorianFirstWeekDaysCount(AYear, AFirstDayOfWeek);\r\n if IsLeapYear(AYear) then\r\n begin\r\n // 366\r\n if DaysInFirstWeek >= 4 then\r\n Inc(Result);\r\n end\r\n else\r\n begin\r\n // 365\r\n if DaysInFirstWeek > 4 then\r\n Inc(Result);\r\n end;\r\n end;\r\n\r\n function GregorianWeekOfTheYear(const ADateTime: TDateTime; const AFirstDayOfWeek: Word): Word;\r\n var\r\n DaysInFirstWeek: Word;\r\n begin\r\n DaysInFirstWeek := GregorianFirstWeekDaysCount(YearOf(ADateTime), AFirstDayOfWeek);\r\n if DaysInFirstWeek >= 4 then\r\n // 1 January - 1 week number\r\n Result := (DayOfTheYear(ADateTime) + DaysPerWeek - DaysInFirstWeek - 1) div 7 + 1\r\n else if DayOfTheYear(ADateTime) < 4 then\r\n // 1 January - previous last week number\r\n Result := GregorianWeeksInAYear(YearOf(ADateTime) - 1, AFirstDayOfWeek)\r\n else\r\n Result := (DayOfTheYear(ADateTime) + DaysPerWeek - DaysInFirstWeek - 1) div 7;\r\n end;\r\n\r\n function GenerateWeekNumbers(AMonth: Integer): TTMSFNCCalendarWordArray;\r\n var\r\n lod: Word;\r\n wcnt: Word;\r\n wc: Integer;\r\n fw: Word;\r\n dic, I: Integer;\r\n bd: TDate;\r\n begin\r\n SetLength(Result, FNumOfWeeksDrawn);\r\n I := DaysPerWeek - dm[FirstDay];\r\n bd := EncodeDate(YearOf(FDate), MonthOf(FDate), 1);\r\n dic := (I + DayOfTheWeek(bd)) mod DaysPerWeek + 1;\r\n wc := (dic - 1) div 7;\r\n fw := GregorianWeekOfTheYear(bd, dm[FirstDay]);\r\n\r\n case AMonth of\r\n 1:\r\n begin\r\n if fw <> 1 then\r\n begin\r\n Result[0] := fw;\r\n for I := 1 to FNumOfWeeksDrawn - 1 do\r\n Result[I] := I - wc;\r\n end\r\n else\r\n begin\r\n for I := 0 to FNumOfWeeksDrawn - 1 do\r\n Result[I] := fw + I - wc;\r\n end;\r\n end;\r\n 12:\r\n begin\r\n lod := GregorianWeekOfTheYear(EncodeDate(YearOf(FDate), MonthOf(FDate), 31), dm[FirstDay]);\r\n wcnt := lod - fw + 1;\r\n\r\n wc := (dic - 1) div 7;\r\n for I := 0 to Min(wcnt - 1, FNumOfWeeksDrawn - 1) do\r\n Result[I] := fw + I - wc;\r\n\r\n for I := wcnt to FNumOfWeeksDrawn - 1 do\r\n Result[I] := I - wcnt + 1;\r\n end\r\n else\r\n begin\r\n for I := 0 to FNumOfWeeksDrawn - 1 do\r\n Result[I] := fw + I - wc;\r\n end;\r\n end;\r\n end;\r\nbegin\r\n wks := GenerateWeekNumbers(MonthOf(FDate));\r\n if Length(wks) > 0 then\r\n begin\r\n CellRect := RectF(ARectF.Left, ARectF.Top, ARectF.Left + FXOffset, ARectF.Top + FYOffset);\r\n ShiftCellH(CellRect, 1);\r\n\r\n if FHeader.Visible then\r\n ShiftCellV(CellRect, FHeader.Height + FDayNameAppearance.Height)\r\n else\r\n ShiftCellV(CellRect, FDayNameAppearance.Height);\r\n\r\n AGraphics.Fill.Assign(WeekNumberAppearance.Fill);\r\n AGraphics.Stroke.Assign(WeekNumberAppearance.Stroke);\r\n AGraphics.Font.AssignSource(WeekNumberAppearance.Font);\r\n\r\n for I := 0 to Length(wks) - 1 do\r\n begin\r\n wNum := wks[I];\r\n b := True;\r\n df := True;\r\n DoBeforeDrawWeekNumbers(AGraphics, CellRect, b, df);\r\n if b then\r\n begin\r\n if df then\r\n AGraphics.DrawRectangle(CellRect, gcrmNone);\r\n\r\n DoAfterDrawWeekNumbers(AGraphics, CellRect);\r\n end;\r\n\r\n b := True;\r\n df := True;\r\n DoBeforeDrawWeekNumbersText(AGraphics, CellRect, IntToStr(wNum), WeekNumberAppearance.HorizontalTextAlign, WeekNumberAppearance.VerticalTextAlign, b, df);\r\n if b then\r\n begin\r\n if df then\r\n AGraphics.DrawText(CellRect, IntToStr(wNum) , False, WeekNumberAppearance.HorizontalTextAlign, WeekNumberAppearance.VerticalTextAlign);\r\n\r\n DoAfterDrawWeekNumbersText(AGraphics, CellRect, IntToStr(wNum), WeekNumberAppearance.HorizontalTextAlign, WeekNumberAppearance.VerticalTextAlign);\r\n end;\r\n\r\n ShiftCellV(CellRect, FYOffset);\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomCalendar.EventsChanged(Sender: TObject);\r\nbegin\r\n Changed;\r\nend;\r\n\r\nprocedure TTMSFNCCustomCalendar.FooterChanged(Sender: TObject);\r\nbegin\r\n Changed;\r\nend;\r\n\r\nfunction TTMSFNCCustomCalendar.GetArrowRect(ALeft: Boolean): TRectF;\r\nvar\r\n rect: TRectF;\r\n hHeight: Single;\r\n s: Single;\r\nbegin\r\n hHeight := FHeader.Height;\r\n s := 0;\r\n\r\n if ALeft then\r\n begin\r\n case Header.Arrow.ArrowLeftType of\r\n atTriangle, atArrow, atCustom: s := Header.Arrow.Size;\r\n atBitmap: s := Header.Arrow.ArrowLeftBitmapSize;\r\n end;\r\n\r\n rect.Top := (hHeight / 2) - (s / 2);\r\n rect.Bottom := (hHeight / 2) + (s / 2);\r\n rect.Left := ARRPOS;\r\n rect.Right := ARRPOS + s;\r\n end\r\n else\r\n begin\r\n case Header.Arrow.ArrowRightType of\r\n atTriangle, atArrow, atCustom: s := Header.Arrow.Size;\r\n atBitmap: s := Header.Arrow.ArrowRightBitmapSize;\r\n end;\r\n\r\n rect.Top := (hHeight / 2) - (s / 2);\r\n rect.Bottom := (hHeight / 2) + (s / 2);\r\n rect.Left := Width - ARRPOS - s;\r\n rect.Right := Width - ARRPOS;\r\n end;\r\n\r\n Result := rect;\r\nend;\r\n\r\nfunction TTMSFNCCustomCalendar.GetBitmapContainer: TTMSFNCBitmapContainer;\r\nbegin\r\n Result := FBitmapContainer;\r\nend;\r\n\r\nfunction TTMSFNCCustomCalendar.GetCurrentDate: TDate;\r\nbegin\r\n Result := Now;\r\nend;\r\n\r\nfunction TTMSFNCCustomCalendar.GetDocURL: string;\r\nbegin\r\n Result := TTMSFNCBaseDocURL + 'tmsfncuipack/components/' + LowerCase(ClassName);\r\nend;\r\n\r\nfunction TTMSFNCCustomCalendar.GetFooterTextRect: TRectF;\r\nvar\r\n l, t, r, b, fHeight, fWidth: Single;\r\nbegin\r\n l := 0;\r\n t := 0;\r\n fHeight := FFooter.CaptionRect.Bottom;\r\n fWidth := FFooter.CaptionRect.Right;\r\n\r\n case FFooter.HorizontalTextAlign of\r\n gtaCenter: l := (Width / 2) - (fWidth / 2);\r\n gtaLeading: l := FFooter.CaptionRect.Left;\r\n gtaTrailing: l := Width - fWidth;\r\n end;\r\n\r\n case FFooter.VerticalTextAlign of\r\n gtaCenter: t := Height - (FFooter.Height / 2) - (fHeight / 2);\r\n gtaLeading: t := FFooter.CaptionRect.Top;\r\n gtaTrailing: t := Height - fHeight;\r\n end;\r\n\r\n b := t + fHeight;\r\n r := l + fWidth;\r\n\r\n Result := RectF(l, t, r, b);\r\nend;\r\n\r\nfunction TTMSFNCCustomCalendar.GetHintString: string;\r\nvar\r\n it: TTMSFNCCalendarEventItem;\r\nbegin\r\n Result := inherited GetHintString;\r\n it := FEvents.GetEventCollectionItemByDate(FHoverDate);\r\n\r\n if Assigned(it) then\r\n Result := it.Hint;\r\nend;\r\n\r\nfunction TTMSFNCCustomCalendar.GetMonthsPopup: TTMSFNCCalendarPopupBox;\r\nbegin\r\n if not Assigned(FMonthsPopup) then\r\n begin\r\n FMonthsPopup := TTMSFNCCalendarPopupBox.Create(Self);\r\n FMonthsPopup.OnChange := @DoPopupMonthsChange;\r\n {$IFDEF VCLLIB}\r\n FMonthsPopup.SetPaintScale(PaintScaleFactor);\r\n {$ENDIF}\r\n {$IFDEF FMXLIB}\r\n FMonthsPopup.Visible := False;\r\n FMonthsPopup.Parent := Self;\r\n {$ENDIF}\r\n end;\r\n\r\n Result := FMonthsPopup;\r\nend;\r\n\r\nprocedure TTMSFNCCustomCalendar.GetMonthYearRect(AControl: TRectF; var AMonthRect: TRectF; var AYearRect: TRectF);\r\nvar\r\n r: TRectF;\r\n g: TTMSFNCGraphics;\r\n sAll, sYear: string;\r\nbegin\r\n r := Rectf(AControl.Left, AControl.Top, AControl.Right, AControl.Top + FHeader.Height);\r\n sAll := FormatSettings.ShortMonthNames[Month] + ' ' + IntToStr(Year);\r\n sYear := IntToStr(Year);\r\n\r\n g := TTMSFNCGraphics.Create(Self.Canvas{$IFDEF VCLLIB}, True{$ENDIF});\r\n try\r\n g.Font.Assign(FHeader.Font);\r\n AMonthRect := g.CalculateText(sAll, r);\r\n OffsetRectEx(AMonthRect, (r.Right - r.Left - AMonthRect.Right + AMonthRect.Left) / 2, (FHeader.Height - AMonthRect.Bottom + AMonthRect.Top) / 2);\r\n AYearRect := g.CalculateText(sYear, r);\r\n AMonthRect.Right := AMonthRect.Right - AYearRect.Right + AYearRect.Left;\r\n\r\n OffsetRectEx(AYearRect, AMonthRect.Right - AYearRect.Left, (FHeader.Height - AYearRect.Bottom + AYearRect.Top) / 2);\r\n finally\r\n g.Free;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCCustomCalendar.GetVersion: string;\r\nbegin\r\n Result := GetVersionNumber(MAJ_VER, MIN_VER, REL_VER, BLD_VER);\r\nend;\r\n\r\nfunction TTMSFNCCustomCalendar.GetYearsPopup: TTMSFNCCalendarPopupBox;\r\nbegin\r\n if not Assigned(FYearsPopup) then\r\n begin\r\n FYearsPopup := TTMSFNCCalendarPopupBox.Create(Self);\r\n FYearsPopup.OnChange := @DoPopupYearsChange;\r\n {$IFDEF VCLLIB}\r\n FYearsPopup.SetPaintScale(PaintScaleFactor);\r\n {$ENDIF}\r\n {$IFDEF FMXLIB}\r\n FYearsPopup.Visible := False;\r\n FYearsPopup.Parent := Self;\r\n {$ENDIF}\r\n end;\r\n\r\n Result := FYearsPopup;\r\nend;\r\n\r\nfunction TTMSFNCCustomCalendar.CurrentDay: Integer;\r\nbegin\r\n Result := DayOf(Now);\r\nend;\r\n\r\nfunction TTMSFNCCustomCalendar.CurrentMonth: Integer;\r\nbegin\r\n Result := MonthOf(Now);\r\nend;\r\n\r\nfunction TTMSFNCCustomCalendar.CurrentYear: Integer;\r\nbegin\r\n Result := YearOf(Now);\r\nend;\r\n\r\nprocedure TTMSFNCCustomCalendar.HandleKeyDown(var Key: Word;\r\n Shift: TShiftState);\r\nvar\r\n df, dt: TDate;\r\nbegin\r\n inherited;\r\n\r\n if Interaction.ReadOnlyMode or (not Interaction.KeyboardSupport) then\r\n Exit;\r\n\r\n if ([ssCtrl] = Shift) and Interaction.MultiSelect then\r\n begin\r\n case Key of\r\n Ord('A'), Ord('a'):\r\n begin\r\n if FSelectedAll then\r\n begin\r\n FSelectedDates.UnselectAll;\r\n DoBeforeSelectDate(FFocusedDate);\r\n SelectDate(FFocusedDate);\r\n DoSelectDate(FFocusedDate);\r\n FSelectedAll := False;\r\n end\r\n else\r\n begin\r\n df := EncodeDate(FYear, FMonth, 1);\r\n dt := EncodeDate(FYear, FMonth, DaysInAMonth(FYear, FMonth));\r\n\r\n if MinDate <> 0 then\r\n begin\r\n if (MinDate >= df) and (MinDate <= dt) then\r\n df := MinDate;\r\n end;\r\n\r\n if MaxDate <> 0 then\r\n begin\r\n if (MaxDate <= dt) and (MaxDate >= df) then\r\n dt := MaxDate;\r\n end;\r\n\r\n SelectMultiDates(df, dt);\r\n DoSelectMultiDate(df, dt);\r\n FSelectedAll := True;\r\n end;\r\n end;\r\n end;\r\n end\r\n else if ([ssShift] = Shift) and Interaction.MultiSelect then\r\n begin\r\n case Key of\r\n KEY_LEFT, KEY_RIGHT, KEY_UP, KEY_DOWN:\r\n begin\r\n if not FShiftPressed then\r\n begin\r\n FClickedDate := FFocusedDate;\r\n DoBeforeSelectDate(FClickedDate);\r\n SelectDate(FClickedDate);\r\n DoSelectDate(FClickedDate);\r\n FShiftPressed := True;\r\n end;\r\n if Key = KEY_LEFT then\r\n begin\r\n SetDateBackward(FFocusedDate, -1);\r\n SelectMultiDates(FClickedDate, FFocusedDate);\r\n DoSelectMultiDate(FClickedDate, FFocusedDate);\r\n end\r\n else if Key = KEY_RIGHT then\r\n begin\r\n SetDateForward(FFocusedDate, 1);\r\n SelectMultiDates(FClickedDate, FFocusedDate);\r\n DoSelectMultiDate(FClickedDate, FFocusedDate);\r\n end\r\n else if Key = KEY_UP then\r\n begin\r\n SetDateBackward(FFocusedDate, -7);\r\n SelectMultiDates(FClickedDate, FFocusedDate);\r\n DoSelectMultiDate(FClickedDate, FFocusedDate);\r\n end\r\n else if KEY = KEY_DOWN then\r\n begin\r\n SetDateForward(FFocusedDate, 7);\r\n SelectMultiDates(FClickedDate, FFocusedDate);\r\n DoSelectMultiDate(FClickedDate, FFocusedDate);\r\n end;\r\n end;\r\n end;\r\n Exit;\r\n end;\r\n\r\n case Key of\r\n KEY_LEFT:\r\n begin\r\n SetDateBackward(FFocusedDate, -1);\r\n end;\r\n KEY_RIGHT:\r\n begin\r\n SetDateForward(FFocusedDate, 1);\r\n end;\r\n KEY_UP:\r\n begin\r\n SetDateBackward(FFocusedDate, -7);\r\n end;\r\n KEY_DOWN:\r\n begin\r\n SetDateForward(FFocusedDate, 7);\r\n end;\r\n KEY_HOME:\r\n begin\r\n FFocusedDate := EncodeDate(FYear, FMonth, 1);\r\n end;\r\n KEY_END:\r\n begin\r\n FFocusedDate := EncodeDate(FYear, FMonth, DaysInAMonth(Year, Month));\r\n end;\r\n end;\r\n\r\n Invalidate;\r\nend;\r\n\r\nprocedure TTMSFNCCustomCalendar.HandleKeyUp(var Key: Word; Shift: TShiftState);\r\nbegin\r\n inherited;\r\n\r\n if Interaction.ReadOnlyMode or (not Interaction.KeyboardSupport) then\r\n Exit;\r\n\r\n case Key of\r\n KEY_SHIFT: FShiftPressed := False;\r\n KEY_SPACE, KEY_RETURN:\r\n begin\r\n DoBeforeSelectDate(FFocusedDate);\r\n if not (Interaction.MultiSelect and (ssCtrl in Shift)) then\r\n SelectDateIfAvailable(FFocusedDate)\r\n else\r\n SelectDate(FFocusedDate);\r\n DoSelectDate(FFocusedDate);\r\n end;\r\n end;\r\n\r\n Invalidate;\r\nend;\r\n\r\nprocedure TTMSFNCCustomCalendar.HandleMouseDown(Button: TTMSFNCMouseButton;\r\n Shift: TShiftState; X, Y: Single);\r\nvar\r\n dateAtXY, mind, maxd: TDate;\r\n mr, yr: TRectF;\r\nbegin\r\n inherited;\r\n\r\n if Interaction.ReadOnlyMode then\r\n Exit;\r\n\r\n SetFocus;\r\n FMouseDown := True;\r\n CaptureEx;\r\n\r\n if FHeader.Visible then\r\n begin\r\n if Y <= FHeader.Height then\r\n begin\r\n if (alvLeft in FHeader.Arrow.Visibility) and PointInRect(GetArrowRect(True), PointF(X,Y)) then\r\n PreviousDate\r\n else if (alvRight in FHeader.Arrow.Visibility) and PointInRect(GetArrowRect(False), PointF(X,Y)) then\r\n NextDate\r\n else if Interaction.AllowYearSelection or Interaction.AllowMonthSelection then\r\n begin\r\n GetMonthYearRect(GetControlRect, mr, yr);\r\n\r\n if Interaction.AllowMonthSelection and PointInRect(mr, PointF(X, Y)) then\r\n DoMonthSelectorPopup(mr.Left, mr.Top)\r\n else if Interaction.AllowYearSelection and PointInRect(yr, PointF(X, Y)) then\r\n DoYearSelectorPopup(yr.Left, yr.Top);\r\n end;\r\n\r\n if Interaction.SwipeOnHeader then\r\n begin\r\n FTick := GetTickCountX;\r\n FMx := X;\r\n FMy := Y;\r\n end;\r\n\r\n Invalidate;\r\n Exit;\r\n end;\r\n end;\r\n\r\n if FFooter.Visible then\r\n begin\r\n if Y >= (Height - FFooter.Height) then\r\n begin\r\n if PointInRect(GetFooterTextRect, PointF(X,Y)) and (FFooter.DateCaption = fdToday) then\r\n begin\r\n if (MonthOf(Date) <> MonthOf(Now)) or (YearOf(Date) <> YearOf(Now)) then\r\n begin\r\n if Assigned(OnNavigateFooter) then\r\n OnNavigateFooter(Self);\r\n end;\r\n Date := Now;\r\n end;\r\n\r\n Invalidate;\r\n Exit;\r\n end;\r\n end;\r\n\r\n dateAtXY := XYToDate(X, Y);\r\n mind := MinDate;\r\n maxd := MaxDate;\r\n\r\n if MinDate = 0 then\r\n mind := dateAtXY;\r\n\r\n if MaxDate = 0 then\r\n maxd := dateAtXY;\r\n\r\n if (Int(dateAtXY) = CALMINDATE) or (Int(dateAtXY) < Int(mind)) or (Int(dateAtXY) > Int(maxd)) then\r\n Exit;\r\n\r\n FClickedDate := dateAtXY;\r\n FFocusedDate := FClickedDate;\r\n FMouseAtDate := dateAtXY;\r\n\r\n if Interaction.MultiSelect then\r\n begin\r\n if (ssCtrl in Shift) then\r\n begin\r\n DoBeforeSelectDate(dateAtXY);\r\n SelectDate(dateAtXY);\r\n DoSelectDate(dateAtXY);\r\n end\r\n else if (ssShift in Shift) then\r\n begin\r\n if FSelectedDates.Count > 0 then\r\n begin\r\n SelectMultiDates(FSelectedDates.Items[FSelectedDates.Count - 1].Date, dateAtXY);\r\n DoSelectMultiDate(FSelectedDates.Items[FSelectedDates.Count - 1].Date, dateAtXY);\r\n end;\r\n end\r\n else\r\n begin\r\n FSelectedDates.UnselectAll;\r\n\r\n if FSelectedDates.InCollection(dateAtXY) then\r\n FSelectedDates.UnselectDate(dateAtXY)\r\n else\r\n begin\r\n DoBeforeSelectDate(dateAtXY);\r\n SelectDate(dateAtXY);\r\n Date := dateAtXY;\r\n DoSelectDate(dateAtXY);\r\n end;\r\n end;\r\n end\r\n else\r\n begin\r\n FSelectedDates.UnselectAll;\r\n\r\n if FSelectedDates.InCollection(dateAtXY) then\r\n FSelectedDates.UnselectDate(dateAtXY)\r\n else\r\n begin\r\n DoBeforeSelectDate(dateAtXY);\r\n Date := dateAtXY;\r\n SelectDate(dateAtXY);\r\n DoSelectDate(dateAtXY);\r\n ReleaseCaptureEx;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomCalendar.HandleMouseMove(Shift: TShiftState; X, Y: Single);\r\nvar\r\n dt: TDate;\r\nbegin\r\n inherited;\r\n\r\n if (FYOffset = 0) or (FXOffset = 0) then\r\n Exit;\r\n\r\n dt := XYToDate(X, Y);\r\n\r\n if FHoverDate <> dt then\r\n begin\r\n FHoverDate := dt;\r\n CancelHint;\r\n Invalidate;\r\n end;\r\n\r\n if Interaction.ReadOnlyMode then\r\n Exit;\r\n\r\n if FHeader.Visible then\r\n begin\r\n if Y <= FHeader.Height then\r\n begin\r\n if ((alvLeft in FHeader.Arrow.Visibility) and (PointInRect(GetArrowRect(True), PointF(X,Y)))) or ((alvRight in FHeader.Arrow.Visibility) and (PointInRect(GetArrowRect(False), PointF(X,Y)))) then\r\n Cursor := crHandPoint\r\n else\r\n Cursor := crDefault;\r\n Exit;\r\n end\r\n else\r\n Cursor := crDefault;\r\n end;\r\n\r\n if FFooter.Visible then\r\n begin\r\n if Y > (Height - FFooter.Height) then\r\n begin\r\n if PointInRect(GetFooterTextRect, PointF(X,Y)) and (FFooter.DateCaption = fdToday) then\r\n Cursor := crHandPoint\r\n else\r\n Cursor := crDefault;\r\n Exit;\r\n end\r\n else\r\n Cursor := crDefault;\r\n end;\r\n\r\n if Interaction.MultiSelect and FMouseDown then\r\n begin\r\n if X > (Self.Width) then\r\n Exit;\r\n\r\n if dt = CALMINDATE then\r\n begin\r\n FMouseAtDate := dt;\r\n Exit;\r\n end;\r\n\r\n if FMouseAtDate = dt then\r\n Exit;\r\n\r\n if (dt <> CALMINDATE) then\r\n begin\r\n FMouseAtDate := dt;\r\n SelectMultiDates(FClickedDate, FMouseAtDate);\r\n DoSelectMultiDate(FClickedDate, FMouseAtDate);\r\n Invalidate;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomCalendar.HandleMouseUp(Button: TTMSFNCMouseButton;\r\n Shift: TShiftState; X, Y: Single);\r\nbegin\r\n inherited;\r\n\r\n if Interaction.SwipeOnHeader then\r\n begin\r\n if (Abs(Y - FMy) < 10) and (Abs(X - FMx) > 20) and FMouseDown and ((GetTickCountX - FTick) < 1000) then\r\n begin\r\n if X < FMx then\r\n NextDate\r\n else\r\n PreviousDate;\r\n end;\r\n\r\n Invalidate;\r\n end;\r\n\r\n FMouseDown := False;\r\n ReleaseCaptureEx;\r\nend;\r\n\r\nfunction TTMSFNCCustomCalendar.HasHint: Boolean;\r\nvar\r\n it: TTMSFNCCalendarEventItem;\r\nbegin\r\n it := FEvents.GetEventCollectionItemByDate(FHoverDate);\r\n Result := Assigned(it) and (it.Hint <> '');\r\nend;\r\n\r\nprocedure TTMSFNCCustomCalendar.HeaderChanged(Sender: TObject);\r\nbegin\r\n Changed;\r\nend;\r\n\r\nprocedure TTMSFNCCustomCalendar.IncrementCell(var ACellSide: Single;\r\n const AMoveBy: Single);\r\nbegin\r\n ACellSide := ACellSide + AMoveBy;\r\nend;\r\n\r\nprocedure TTMSFNCCustomCalendar.IncrementWeekDay(var ADay: Integer);\r\nbegin\r\n ADay := (ADay + 1) mod 7;\r\n if ADay = 0 then\r\n ADay := 7;\r\nend;\r\n\r\nprocedure TTMSFNCCustomCalendar.InitSample;\r\nbegin\r\n BeginUpdate;\r\n\r\n ResetToDefaultStyle;\r\n\r\n EndUpdate;\r\nend;\r\n\r\nfunction TTMSFNCCustomCalendar.IsAppearanceProperty(AObject: TObject;\r\n APropertyName: string; APropertyType: TTypeKind): Boolean;\r\nbegin\r\n Result := inherited IsAppearanceProperty(AObject, APropertyName, APropertyType);\r\n Result := Result or (APropertyName = 'Header') or (APropertyName = 'Footer');\r\nend;\r\n\r\nfunction TTMSFNCCustomCalendar.IsFocusedDateStored: Boolean;\r\nbegin\r\n Result := FocusedDate <> 0.0;\r\nend;\r\n\r\nprocedure TTMSFNCCustomCalendar.NextDate;\r\nvar\r\n tMonth, tYear: Integer;\r\n d: TDate;\r\nbegin\r\n case FInteraction.NavigationMode of\r\n nmMonth:\r\n begin\r\n if (FMonth + 1) > 12 then\r\n begin\r\n Date := EncodeDate(NextYear, NextMonth, 1);\r\n DoChangeYear(FYear);\r\n end\r\n else\r\n Date := EncodeDate(FYear, NextMonth, 1);\r\n\r\n DoChangeMonth(FMonth);\r\n end;\r\n nmYear:\r\n begin\r\n Date := IncYear(FDate);\r\n DoChangeYear(FYear);\r\n end;\r\n nmFocusedDate:\r\n begin\r\n tMonth := FMonth;\r\n tYear := FYear;\r\n FocusedDate := IncDay(FFocusedDate);\r\n\r\n if tMonth <> MonthOf(FocusedDate) then\r\n begin\r\n Date := FocusedDate;\r\n DoChangeMonth(FMonth);\r\n\r\n if tYear <> YearOf(FocusedDate) then\r\n DoChangeYear(FYear);\r\n end;\r\n end;\r\n nmCustom:\r\n begin\r\n d := FDate;\r\n DoCustomNavigation(FDate, FFocusedDate, False);\r\n\r\n if MonthOf(d) <> MonthOf(FDate) then\r\n DoChangeMonth(FMonth);\r\n if YearOf(d) <> YearOf(FDate) then\r\n DoChangeYear(FYear);\r\n end;\r\n end;\r\n if Assigned(OnNavigateForward) then\r\n OnNavigateForward(Self, FMonth, FYear);\r\nend;\r\n\r\nfunction TTMSFNCCustomCalendar.NextMonth: Integer;\r\nvar\r\n nMonth: Integer;\r\nbegin\r\n nMonth := FMonth + 1;\r\n\r\n if nMonth = 13 then\r\n nMonth := 1;\r\n\r\n Result := nMonth;\r\nend;\r\n\r\nfunction TTMSFNCCustomCalendar.NextYear: Integer;\r\nbegin\r\n Result := FYear + 1;\r\nend;\r\n\r\nprocedure TTMSFNCCustomCalendar.Notification(AComponent: TComponent;\r\n Operation: TOperation);\r\nbegin\r\n inherited;\r\n\r\n if (Operation = opRemove) and (AComponent = FBitmapContainer) then\r\n FBitmapContainer := nil;\r\nend;\r\n\r\nfunction TTMSFNCCustomCalendar.PointInRect(ARect: TRectF;\r\n APoint: TPointF): Boolean;\r\nbegin\r\n Result := (ARect.Left <= APoint.X) and (ARect.Right >= APoint.X) and (ARect.Top <= APoint.Y) and (ARect.Bottom >= APoint.Y);\r\nend;\r\n\r\nprocedure TTMSFNCCustomCalendar.PreviousDate;\r\nvar\r\n tMonth, tYear: Integer;\r\n d: TDate;\r\nbegin\r\n case FInteraction.NavigationMode of\r\n nmMonth:\r\n begin\r\n if (FMonth - 1) <= 0 then\r\n begin\r\n Date := EncodeDate(PreviousYear, PreviousMonth, 1);\r\n DoChangeYear(FYear);\r\n end\r\n else\r\n Date := EncodeDate(FYear, PreviousMonth, 1);\r\n\r\n DoChangeMonth(FMonth);\r\n end;\r\n nmYear:\r\n begin\r\n Date := IncYear(FDate, -1);\r\n DoChangeYear(FYear);\r\n end;\r\n nmFocusedDate:\r\n begin\r\n tMonth := FMonth;\r\n tYear := FYear;\r\n FocusedDate := IncDay(FFocusedDate, -1);\r\n\r\n if tMonth <> MonthOf(FocusedDate) then\r\n begin\r\n Date := FocusedDate;\r\n DoChangeMonth(FMonth);\r\n\r\n if tYear <> MonthOf(FocusedDate) then\r\n DoChangeYear(FYear);\r\n end;\r\n end;\r\n nmCustom:\r\n begin\r\n d := FDate;\r\n DoCustomNavigation(FDate, FFocusedDate, True);\r\n\r\n if MonthOf(d) <> MonthOf(FDate) then\r\n DoChangeMonth(FMonth);\r\n if YearOf(d) <> YearOf(FDate) then\r\n DoChangeYear(FYear);\r\n end;\r\n end;\r\n if Assigned(OnNavigateBack) then\r\n OnNavigateBack(Self, FMonth, FYear);\r\nend;\r\n\r\nfunction TTMSFNCCustomCalendar.PreviousMonth: Integer;\r\nvar\r\n pMonth: Integer;\r\nbegin\r\n pMonth := FMonth - 1;\r\n\r\n if pMonth = 0 then\r\n pMonth := 12;\r\n\r\n Result := pMonth;\r\nend;\r\n\r\nfunction TTMSFNCCustomCalendar.PreviousYear: Integer;\r\nbegin\r\n Result := FYear - 1;\r\nend;\r\n\r\nfunction TTMSFNCCustomCalendar.XYToDate(AX, AY: Single): TDate;\r\nvar\r\n colFrom, rowFrom, colTo, rowTo, cDay, dim: Integer;\r\n calcMonth: TDate;\r\nbegin\r\n rowTo := RowAtY(AY);\r\n colTo := ColAtX(AX);\r\n\r\n if (rowTo = -1) or (colTo = -1) then\r\n begin\r\n Result := CALMINDATE;\r\n Exit;\r\n end;\r\n\r\n calcMonth := (EncodeDate(FYear, FMonth, 1));\r\n rowFrom := 1;\r\n colFrom := DayOfWeek(calcMonth) - FirstDay ;\r\n\r\n if (colFrom < 0) then\r\n colFrom := colFrom + 7;\r\n\r\n Inc(colFrom);\r\n cDay := colTo - colFrom + 1;\r\n\r\n if (rowFrom = rowTo) and (not FDateAppearance.ShowDaysBefore) then\r\n begin\r\n if (cDay < 1) then\r\n begin\r\n Result := CALMINDATE;\r\n Exit;\r\n end;\r\n Result := EncodeDate(FYear, FMonth, cDay);\r\n Exit;\r\n end\r\n else if (rowFrom = rowTo) and FDateAppearance.ShowDaysBefore then\r\n begin\r\n if (cDay < 1) then\r\n begin\r\n Result := IncDay(calcMonth, colTo - colFrom);\r\n Exit;\r\n end;\r\n end;\r\n\r\n cDay := (rowTo - rowFrom - 1) * 7 + colTo + (7 - colFrom + 1);\r\n dim := DaysInAMonth(FYear, FMonth);\r\n calcMonth := EncodeDate(FYear, FMonth, dim);\r\n\r\n if (cDay > dim) and (not FDateAppearance.ShowDaysAfter) then\r\n Result := CALMINDATE\r\n else if (cDay > dim) and FDateAppearance.ShowDaysAfter then\r\n Result := IncDay(calcMonth, cDay - dim)\r\n else\r\n Result := EncodeDate(FYear, FMonth, cDay);\r\nend;\r\n\r\nprocedure TTMSFNCCustomCalendar.ApplyStyle;\r\nvar\r\n c: TTMSFNCGraphicsColor;\r\nbegin\r\n inherited;\r\n c := gcNull;\r\n if TTMSFNCStyles.GetStyleBackgroundFillColor(c) then\r\n begin\r\n Fill.Color := c;\r\n DateAppearance.Fill.Color := c;\r\n DateAppearance.Stroke.Kind := gskNone;\r\n DateAppearance.DateAfterFill.Color := c;\r\n DateAppearance.DateAfterStroke.Kind := gskNone;\r\n DateAppearance.DateBeforeFill.Color := c;\r\n DateAppearance.DateBeforeStroke.Kind := gskNone;\r\n DateAppearance.DisabledFill.Color := c;\r\n DateAppearance.DisabledStroke.Kind := gskNone;\r\n DateAppearance.TodayFill.Color := c;\r\n DateAppearance.TodayStroke.Kind := gskNone;\r\n WeekNumberAppearance.Fill.Color := c;\r\n WeekNumberAppearance.Stroke.Kind := gskNone;\r\n DayNameAppearance.Stroke.Kind := gskNone;\r\n DayNameAppearance.Fill.Color := c;\r\n end;\r\n\r\n c := gcNull;\r\n if TTMSFNCStyles.GetStyleSelectionFillColor(c) then\r\n begin\r\n DateAppearance.SelectedFill.Color := c;\r\n DateAppearance.SelectedStroke.Color := c;\r\n end;\r\n\r\n c := gcNull;\r\n if TTMSFNCStyles.GetStyleLineFillColor(c) then\r\n begin\r\n Stroke.Color := c;\r\n Header.Stroke.Color := c;\r\n Footer.Stroke.Color := c;\r\n LineAppearance.Stroke.Color := c;\r\n Header.Arrow.Color := c;\r\n end;\r\n\r\n c := gcNull;\r\n if TTMSFNCStyles.GetStyleHeaderFillColor(c) then\r\n begin\r\n Header.Fill.Color := c;\r\n Footer.Fill.Color := c;\r\n end;\r\n\r\n c := gcNull;\r\n if TTMSFNCStyles.GetStyleHeaderFillColorTo(c) then\r\n begin\r\n Header.Fill.Kind := gfkGradient;\r\n Header.Fill.ColorTo := c;\r\n Footer.Fill.Kind := gfkGradient;\r\n Footer.Fill.ColorTo := c;\r\n end;\r\n\r\n c := gcNull;\r\n if TTMSFNCStyles.GetStyleSelectionFillColorTo(c) then\r\n DateAppearance.TodayFont.Color := c;\r\n\r\n c := gcNull;\r\n if TTMSFNCStyles.GetStyleTextFontColor(c) then\r\n begin\r\n if c = gcBlack then\r\n begin\r\n DateAppearance.DateAFterFont.Color := Lighter(c, 50);\r\n DateAppearance.DateBeforeFont.Color := Lighter(c, 50);\r\n DateAppearance.DisabledFont.Color := Lighter(c, 75);\r\n end\r\n else\r\n begin\r\n DateAppearance.DateAFterFont.Color := Blend(c, Fill.Color, 50);\r\n DateAppearance.DateBeforeFont.Color := Blend(c, Fill.Color, 50);\r\n DateAppearance.DisabledFont.Color := Blend(c, Fill.Color, 25);\r\n end;\r\n\r\n DateAppearance.SelectedFont.Color := c;\r\n DateAppearance.Font.Color := c;\r\n Header.Font.Color := c;\r\n Footer.Font.Color := c;\r\n DayNameAppearance.Font.Color := c;\r\n WeekNumberAppearance.Font.Color := c;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomCalendar.ArrowsChanged(Sender: TObject);\r\nbegin\r\n Changed;\r\nend;\r\n\r\nprocedure TTMSFNCCustomCalendar.Assign(Source: TPersistent);\r\nbegin\r\n if (Source is TTMSFNCCustomCalendar) then\r\n begin\r\n FDate := (Source as TTMSFNCCustomCalendar).Date;\r\n FYear := (Source as TTMSFNCCustomCalendar).Year;\r\n FMonth := (Source as TTMSFNCCustomCalendar).Month;\r\n FDay := (Source as TTMSFNCCustomCalendar).Day;\r\n FMinDate := (Source as TTMSFNCCustomCalendar).MinDate;\r\n FMaxDate := (Source as TTMSFNCCustomCalendar).MaxDate;\r\n Fill.Assign((Source as TTMSFNCCustomCalendar).Fill);\r\n Stroke.Assign((Source as TTMSFNCCustomCalendar).Stroke);\r\n FSelectedAll := (Source as TTMSFNCCustomCalendar).FSelectedAll;\r\n FFirstDay := (Source as TTMSFNCCustomCalendar).FirstDay;\r\n FBadgeSize := (Source as TTMSFNCCustomCalendar).BadgeSize;\r\n FFocusedDate := (Source as TTMSFNCCustomCalendar).FocusedDate;\r\n FXOffset := (Source as TTMSFNCCustomCalendar).FXOffset;\r\n FYOffset := (Source as TTMSFNCCustomCalendar).FYOffset;\r\n FHeader.Assign((Source as TTMSFNCCustomCalendar).Header);\r\n FFooter.Assign((Source as TTMSFNCCustomCalendar).Footer);\r\n FDayNameAppearance.Assign((Source as TTMSFNCCustomCalendar).DayNameAppearance);\r\n FDateAppearance.Assign((Source as TTMSFNCCustomCalendar).DateAppearance);\r\n FLineAppearance.Assign((Source as TTMSFNCCustomCalendar).LineAppearance);\r\n FWeekNumberAppearance.Assign((Source as TTMSFNCCustomCalendar).WeekNumberAppearance);\r\n FInteraction.Assign((Source as TTMSFNCCustomCalendar).Interaction);\r\n FSelectedDates.Assign((Source as TTMSFNCCustomCalendar).SelectedDates);\r\n FEvents.Assign((Source as TTMSFNCCustomCalendar).Events);\r\n end\r\n else\r\n inherited;\r\nend;\r\n\r\nfunction TTMSFNCCustomCalendar.CalcDateAreaHeight(const AHeight: Single;\r\n const AHeaderVisible, AFooterVisible: Boolean): Single;\r\nvar\r\n h: Single;\r\nbegin\r\n h := AHeight;\r\n\r\n if AHeaderVisible then\r\n h := h - FHeader.Height;\r\n if AFooterVisible then\r\n h := h - FFooter.Height;\r\n\r\n h := h - FDayNameAppearance.Height;\r\n Result := h;\r\nend;\r\n\r\nfunction TTMSFNCCustomCalendar.CalcRowCount(const ACol,\r\n ADaysInAMonth: Integer): Integer;\r\nbegin\r\n Result := Ceil((ADaysInAMonth + ACol) / 7);\r\nend;\r\n\r\nprocedure TTMSFNCCustomCalendar.CalculateXOffset;\r\nbegin\r\n FXOffset := (Width - 2) / ColCount(WeekNumberAppearance.Visible);\r\nend;\r\n\r\nprocedure TTMSFNCCustomCalendar.Changed;\r\nbegin\r\n if Assigned(OnChange) then\r\n OnChange(Self);\r\n\r\n Invalidate;\r\nend;\r\n\r\nprocedure TTMSFNCCustomCalendar.ChangeDPIScale(M, D: Integer);\r\nbegin\r\n inherited;\r\n\r\n BeginUpdate;\r\n\r\n Header.Font.Height := TTMSFNCUtils.MulDivInt(Header.Font.Height, M, D);\r\n Footer.Font.Height := TTMSFNCUtils.MulDivInt(Footer.Font.Height, M, D);\r\n DayNameAppearance.Font.Height := TTMSFNCUtils.MulDivInt(DayNameAppearance.Font.Height, M, D);\r\n DateAppearance.Font.Height := TTMSFNCUtils.MulDivInt(DateAppearance.Font.Height, M, D);\r\n DateAppearance.SelectedFont.Height := TTMSFNCUtils.MulDivInt(DateAppearance.SelectedFont.Height, M, D);\r\n DateAppearance.DisabledFont.Height := TTMSFNCUtils.MulDivInt(DateAppearance.DisabledFont.Height, M, D);\r\n DateAppearance.BadgeFont.Height := TTMSFNCUtils.MulDivInt(DateAppearance.BadgeFont.Height, M, D);\r\n DateAppearance.DateBeforeFont.Height := TTMSFNCUtils.MulDivInt(DateAppearance.DateBeforeFont.Height, M, D);\r\n DateAppearance.DateAfterFont.Height := TTMSFNCUtils.MulDivInt(DateAppearance.DateAfterFont.Height, M, D);\r\n DateAppearance.TodayFont.Height := TTMSFNCUtils.MulDivInt(DateAppearance.TodayFont.Height, M, D);\r\n WeekNumberAppearance.Font.Height := TTMSFNCUtils.MulDivInt(WeekNumberAppearance.Font.Height, M, D);\r\n DayNameAppearance.Height := TTMSFNCUtils.MulDivInt(DayNameAppearance.Height, M, D);\r\n Header.Height := TTMSFNCUtils.MulDivInt(Header.Height, M, D);\r\n Footer.Height := TTMSFNCUtils.MulDivInt(Footer.Height, M, D);\r\n Header.Arrow.Size := TTMSFNCUtils.MulDivInt(Header.Arrow.Size, M, D);\r\n Header.Arrow.ArrowLeftBitmapSize := TTMSFNCUtils.MulDivSingle(Header.Arrow.ArrowLeftBitmapSize, M, D);\r\n Header.Arrow.ArrowRightBitmapSize := TTMSFNCUtils.MulDivSingle(Header.Arrow.ArrowRightBitmapSize, M, D);\r\n BadgeSize := TTMSFNCUtils.MulDivInt(BadgeSize, M, D);\r\n\r\n EndUpdate;\r\nend;\r\n\r\nfunction TTMSFNCCustomCalendar.ColAtX(AX: Single): Integer;\r\nbegin\r\n if WeekNumberAppearance.Visible then\r\n begin\r\n if (AX > FXOffset) and (AX < Self.Width - 2) and (FXOffset <> 0) then\r\n Result := Trunc(AX / FXOffset)\r\n else\r\n Result := -1;\r\n end\r\n else\r\n begin\r\n if (AX > 0) and (AX < Self.Width - 2) and (FXOffset <> 0) then\r\n Result := Trunc(AX / FXOffset) + 1\r\n else\r\n Result := -1;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomCalendar.ResetToDefaultStyle;\r\nbegin\r\n inherited;\r\n\r\n Fill.Kind := gfkSolid;\r\n Stroke.Kind := gskSolid;\r\n Fill.Color := gcWhite;\r\n Stroke.Color := gcSilver;\r\n\r\n Header.Fill.Kind := gfkGradient;\r\n {$IFDEF FMXLIB}\r\n Header.Fill.Color := $FFF6F8FC;\r\n Header.Fill.ColorTo := $FFEEF2F9;\r\n Header.Font.Color := $FF454545;\r\n {$ENDIF}\r\n {$IFNDEF FMXLIB}\r\n Header.Fill.Color := $FCF8F6;\r\n Header.Fill.ColorTo := $F9F2EE;\r\n Header.Font.Color := $454545;\r\n {$ENDIF}\r\n Header.Stroke.Kind := gskSolid;\r\n Header.Stroke.Color := gcSilver;\r\n Header.Arrow.Color := gcDimgray;\r\n TTMSFNCUtils.SetFontSize(Header.Font, 14);\r\n\r\n Footer.Fill.Assign(Header.Fill);\r\n Footer.Stroke.Assign(Header.Stroke);\r\n Footer.Font.Assign(Header.Font);\r\n Footer.Font.Style := [];\r\n\r\n LineAppearance.Stroke.Kind := gskSolid;\r\n LineAppearance.Stroke.Color := gcDarkgray;\r\n\r\n DayNameAppearance.Fill.Kind := gfkSolid;\r\n DayNameAppearance.Stroke.Kind := gskSolid;\r\n DayNameAppearance.Fill.Color := gcNull;\r\n DayNameAppearance.Stroke.Color := gcNull;\r\n {$IFDEF FMXLIB}\r\n DayNameAppearance.Font.Color := $FF7A7A7A;\r\n {$ENDIF}\r\n {$IFNDEF FMXLIB}\r\n DayNameAppearance.Font.Color := $7A7A7A;\r\n {$ENDIF}\r\n\r\n WeekNumberAppearance.Fill.Kind := gfkSolid;\r\n WeekNumberAppearance.Stroke.Kind := gskSolid;\r\n WeekNumberAppearance.Fill.Color := gcNull;\r\n WeekNumberAppearance.Stroke.Color := gcNull;\r\n WeekNumberAppearance.Font.Color := DayNameAppearance.Font.Color;\r\n\r\n DateAppearance.DateAfterFill.Kind := gfkSolid;\r\n DateAppearance.DateAfterStroke.Kind := gskSolid;\r\n DateAppearance.DateBeforeFill.Kind := gfkSolid;\r\n DateAppearance.DateBeforeStroke.Kind := gskSolid;\r\n DateAppearance.DisabledFill.Kind := gfkSolid;\r\n DateAppearance.DisabledStroke.Kind := gskSolid;\r\n DateAppearance.Fill.Kind := gfkSolid;\r\n DateAppearance.Stroke.Kind := gskSolid;\r\n DateAppearance.SelectedFill.Kind := gfkSolid;\r\n DateAppearance.SelectedStroke.Kind := gskSolid;\r\n DateAppearance.TodayFill.Kind := gfkSolid;\r\n DateAppearance.TodayStroke.Kind := gskSolid;\r\n\r\n {$IFDEF FMXLIB}\r\n DateAppearance.Font.Color := $FF7A7A7A;\r\n DateAppearance.TodayFont.Color := $FF2D9BEF;\r\n DateAppearance.DateBeforeFont.Color := $FFBBBBBB;\r\n {$ENDIF}\r\n {$IFNDEF FMXLIB}\r\n DateAppearance.Font.Color := $7A7A7A;\r\n DateAppearance.TodayFont.Color := $EF9B2D;\r\n DateAppearance.DateBeforeFont.Color := $BBBBBB;\r\n {$ENDIF}\r\n\r\n DateAppearance.DateAfterFill.Color := gcNull;\r\n DateAppearance.DateAfterStroke.Color := gcNull;\r\n DateAppearance.DateAfterFont.Color := DateAppearance.DateBeforeFont.Color;\r\n DateAppearance.DateBeforeFill.Color := gcNull;\r\n DateAppearance.DateBeforeStroke.Color := gcNull;\r\n DateAppearance.DisabledFill.Color := gcNull;\r\n DateAppearance.DisabledStroke.Color := gcNull;\r\n DateAppearance.DisabledFont.Color := gcLightgrey;\r\n DateAppearance.Fill.Color := gcNull;\r\n DateAppearance.Stroke.Color := gcNull;\r\n DateAppearance.SelectedFill.Color := Header.Fill.ColorTo;\r\n DateAppearance.SelectedStroke.Color := DateAppearance.TodayFont.Color;\r\n DateAppearance.TodayFill.Color := gcNull;\r\n DateAppearance.TodayStroke.Color := gcNull;\r\n DateAppearance.TodayFont.Style := [TFontStyle.fsBold];\r\n DateAppearance.ShowFocus := False;\r\n\r\n Header.Font.Style := [TFontStyle.fsBold];\r\n DateAppearance.SelectedFont.Assign(Header.Font);\r\nend;\r\n\r\nfunction TTMSFNCCustomCalendar.RowAtY(AY: Single): Integer;\r\nvar\r\n t, b: Single;\r\nbegin\r\n if FHeader.Visible then\r\n t := FHeader.Height + FDayNameAppearance.Height\r\n else\r\n t := FDayNameAppearance.Height;\r\n\r\n if FFooter.Visible then\r\n b := Self.Height - FFooter.Height\r\n else\r\n b := Self.Height;\r\n\r\n if (AY > t) and (AY < b) and (FYOffset <> 0) then\r\n begin\r\n if FHeader.Visible then\r\n Result := Trunc((AY - FHeader.Height - FDayNameAppearance.Height) / FYOffset) + 1\r\n else\r\n Result := Trunc((AY - FDayNameAppearance.Height) / FYOffset) + 1;\r\n end\r\n else\r\n Result := -1;\r\nend;\r\n\r\nprocedure TTMSFNCCustomCalendar.SelectADate(ADate: TDate);\r\nbegin\r\n FSelectedDates.UnselectAll;\r\n FSelectedDates.SelectDate(ADate);\r\n Date := ADate;\r\n FFocusedDate := ADate;\r\n Invalidate;\r\nend;\r\n\r\nprocedure TTMSFNCCustomCalendar.SelectDate(ADate: TDate);\r\nvar\r\n mind, maxd: TDate;\r\nbegin\r\n mind := MinDate;\r\n maxd := MaxDate;\r\n\r\n if MinDate = 0 then\r\n mind := ADate;\r\n if MaxDate = 0 then\r\n maxd := ADate;\r\n\r\n if (Int(ADate) >= Int(mind)) and (Int(ADate) <= Int(maxd)) then\r\n begin\r\n FSelectedDates.SelectDate(ADate);\r\n FClickedDate := ADate;\r\n end;\r\n\r\n Invalidate;\r\nend;\r\n\r\nprocedure TTMSFNCCustomCalendar.SelectDateIfAvailable(ADate: TDate);\r\nvar\r\n mind, maxd: TDate;\r\nbegin\r\n mind := MinDate;\r\n maxd := MaxDate;\r\n\r\n if MinDate = 0 then\r\n mind := ADate;\r\n if MaxDate = 0 then\r\n maxd := ADate;\r\n\r\n if (Int(ADate) >= Int(mind)) and (Int(ADate) <= Int(maxd)) then\r\n begin\r\n FSelectedDates.UnselectAll;\r\n FSelectedDates.SelectDate(ADate);\r\n Date := ADate;\r\n FFocusedDate := ADate;\r\n FClickedDate := ADate;\r\n end;\r\n\r\n Invalidate;\r\nend;\r\n\r\nfunction TTMSFNCCustomCalendar.SelectedDate: TDate;\r\nbegin\r\n if FSelectedDates.Count > 0 then\r\n Result := FSelectedDates.Items[FSelectedDates.Count - 1].Date\r\n else\r\n Result := CALMINDATE;\r\nend;\r\n\r\nprocedure TTMSFNCCustomCalendar.SelectEvent(ADate: TDate);\r\nbegin\r\n FEvents.SelectDate(ADate);\r\nend;\r\n\r\nprocedure TTMSFNCCustomCalendar.SelectMultiDates(AStartDate,\r\n AEndDate: TDate);\r\nvar\r\n mind, maxd: TDate;\r\nbegin\r\n mind := MinDate;\r\n maxd := MaxDate;\r\n\r\n if CompareDate(AStartDate, AEndDate) = -1 then\r\n begin\r\n if MinDate = 0 then\r\n mind := AStartDate;\r\n\r\n if MaxDate = 0 then\r\n maxd := AEndDate;\r\n\r\n if (Int(AStartDate) >= Int(mind)) and (Int(AEndDate) <= Int(maxd)) then\r\n begin\r\n FSelectedDates.UnselectAll;\r\n FSelectedDates.SelectDateInterval(AStartDate, AEndDate);\r\n end;\r\n end\r\n else\r\n begin\r\n if MinDate = 0 then\r\n mind := AEndDate;\r\n\r\n if MaxDate = 0 then\r\n maxd := AStartDate;\r\n\r\n if (Int(AEndDate) >= Int(mind)) and (Int(AStartDate) <= Int(maxd)) then\r\n begin\r\n FSelectedDates.UnselectAll;\r\n FSelectedDates.SelectDateInterval(AStartDate, AEndDate);\r\n end;\r\n end;\r\n\r\n Invalidate;\r\nend;\r\n\r\nprocedure TTMSFNCCustomCalendar.SetArrowLeftRect(AHeaderRect: TRectF; var AArrowRect: TRectF;\r\n ACentre: Single);\r\nbegin\r\n case Header.Arrow.ArrowLeftType of\r\n atTriangle, atArrow, atCustom:\r\n begin\r\n AArrowRect.Top := ACentre - Header.Arrow.Size / 2;\r\n AArrowRect.Bottom := ACentre + Header.Arrow.Size / 2;\r\n AArrowRect.Right := AHeaderRect.Left + Header.Arrow.Size + ARRPOS;\r\n end;\r\n atBitmap:\r\n begin\r\n AArrowRect.Top := ACentre - Header.Arrow.ArrowLeftBitmapSize / 2;\r\n AArrowRect.Bottom := ACentre + Header.Arrow.ArrowLeftBitmapSize / 2;\r\n AArrowRect.Right := AHeaderRect.Left + Header.Arrow.ArrowLeftBitmapSize + ARRPOS;\r\n end;\r\n end;\r\n\r\n AArrowRect.Left := AHeaderRect.Left + ARRPOS;\r\nend;\r\n\r\nprocedure TTMSFNCCustomCalendar.SetArrowRightRect(AHeaderRect: TREctF;\r\n var AArrowRect: TRectF; ACentre: Single);\r\nbegin\r\n case Header.Arrow.ArrowRightType of\r\n atTriangle, atArrow, atCustom:\r\n begin\r\n AArrowRect.Top := ACentre - Header.Arrow.Size / 2;\r\n AArrowRect.Bottom := ACentre + Header.Arrow.Size / 2;\r\n AArrowRect.Left := AHeaderRect.Right - ARRPOS - Header.Arrow.Size;\r\n end;\r\n atBitmap:\r\n begin\r\n AArrowRect.Top := ACentre - Header.Arrow.ArrowRightBitmapSize / 2;\r\n AArrowRect.Bottom := ACentre + Header.Arrow.ArrowRightBitmapSize / 2;\r\n AArrowRect.Left := AHeaderRect.Right - ARRPOS - Header.Arrow.ArrowRightBitmapSize;\r\n end;\r\n end;\r\n\r\n AArrowRect.Right := AHeaderRect.Right - ARRPOS;\r\nend;\r\n\r\nprocedure TTMSFNCCustomCalendar.SetBadgeSize(const Value: Integer);\r\nbegin\r\n if FBadgeSize <> Value then\r\n FBadgeSize := Value;\r\nend;\r\n\r\nprocedure TTMSFNCCustomCalendar.SetBitmapContainer(\r\n const Value: TTMSFNCBitmapContainer);\r\nbegin\r\n FBitmapContainer := Value;\r\n Invalidate;\r\nend;\r\n\r\nprocedure TTMSFNCCustomCalendar.SetDate(const Value: TDate);\r\nbegin\r\n if FDate <> Value then\r\n begin\r\n FDate := Value;\r\n FDay := DayOf(FDate);\r\n FMonth := MonthOf(FDate);\r\n FYear := YearOf(FDate);\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomCalendar.SetDateAppearance(\r\n const Value: TTMSFNCCalendarDateAppearance);\r\nbegin\r\n FDateAppearance.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCCustomCalendar.SetDay(const Value: Integer);\r\nbegin\r\n if FDay <> Value then\r\n begin\r\n FDay := Value;\r\n FDate := EncodeDate(YearOf(FDate), MonthOf(FDate), FDay);\r\n Invalidate;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomCalendar.SetDayNameAppearance(\r\n const Value: TTMSFNCCalendarDayNameAppearance);\r\nbegin\r\n FDayNameAppearance.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCCustomCalendar.SetEvents(\r\n const Value: TTMSFNCCalendarEvents);\r\nbegin\r\n FEvents.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCCustomCalendar.SetFirstDay(const Value: Integer);\r\nbegin\r\n if FFirstDay <> Value then\r\n begin\r\n FFirstDay := Value;\r\n Invalidate;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomCalendar.SetFocusedDate(const Value: TDate);\r\nbegin\r\n if FFocusedDate <> Value then\r\n FFocusedDate := Value;\r\nend;\r\n\r\nprocedure TTMSFNCCustomCalendar.SetFonts(ASetType: TTMSFNCAppearanceGlobalFontType);\r\nbegin\r\n BeginUpdate;\r\n\r\n GlobalFont.ApplyChange(DayNameAppearance.Font, ASetType);\r\n\r\n GlobalFont.ApplyChange(WeekNumberAppearance.Font, ASetType);\r\n\r\n GlobalFont.ApplyChange(DateAppearance.Font, ASetType);\r\n GlobalFont.ApplyChange(DateAppearance.SelectedFont, ASetType);\r\n\r\n if not (ASetType = aftColor) then\r\n GlobalFont.ApplyChange(DateAppearance.DisabledFont, ASetType);\r\n\r\n GlobalFont.ApplyChange(DateAppearance.DateBeforeFont, ASetType);\r\n GlobalFont.ApplyChange(DateAppearance.DateAfterFont, ASetType);\r\n GlobalFont.ApplyChange(DateAppearance.BadgeFont, ASetType);\r\n GlobalFont.ApplyChange(DateAppearance.TodayFont, ASetType);\r\n\r\n GlobalFont.ApplyChange(FFooter.Font, ASetType);\r\n\r\n GlobalFont.ApplyChange(FHeader.Font, ASetType);\r\n\r\n EndUpdate;\r\nend;\r\n\r\nprocedure TTMSFNCCustomCalendar.SetFooter(const Value: TTMSFNCCalendarFooter);\r\nbegin\r\n FFooter.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCCustomCalendar.SetGlobalFont(const Value: TTMSFNCAppearanceGlobalFont);\r\nbegin\r\n FGlobalFont.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCCustomCalendar.SetDateBackward(var ADate: TDate;\r\n ASetBy: Integer);\r\nbegin\r\n ADate := IncDay(ADate, ASetBy);\r\n\r\n if YearOf(ADate) < FYear then\r\n begin\r\n DoChangeYear(FYear);\r\n DoChangeMonth(FMonth);\r\n end\r\n else if MonthOf(ADate) < FMonth then\r\n begin\r\n DoChangeMonth(FMonth);\r\n end;\r\n\r\n Date := ADate;\r\nend;\r\n\r\nprocedure TTMSFNCCustomCalendar.SetDateForward(var ADate: TDate;\r\n ASetBy: Integer);\r\nbegin\r\n ADate := IncDay(ADate, ASetBy);\r\n\r\n if YearOf(ADate) > FYear then\r\n begin\r\n DoChangeYear(FYear);\r\n DoChangeMonth(FMonth);\r\n end\r\n else if MonthOf(ADate) > FMonth then\r\n begin\r\n DoChangeMonth(FMonth);\r\n end;\r\n\r\n Date := ADate;\r\nend;\r\n\r\nprocedure TTMSFNCCustomCalendar.SetHeader(const Value: TTMSFNCCalendarHeader);\r\nbegin\r\n FHeader.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCCustomCalendar.SetInteraction(\r\n const Value: TTMSFNCCalendarInteraction);\r\nbegin\r\n FInteraction.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCCustomCalendar.SetLineAppearance(\r\n const Value: TTMSFNCCalendarLineAppearance);\r\nbegin\r\n FLineAppearance.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCCustomCalendar.SetMaxDate(const Value: TDate);\r\nbegin\r\n if FMaxDate <> Value then\r\n begin\r\n FMaxDate := Value;\r\n Changed;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomCalendar.SetMinDate(const Value: TDate);\r\nbegin\r\n if FMinDate <> Value then\r\n begin\r\n FMinDate := Value;\r\n Changed;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomCalendar.SetMonth(const Value: Integer);\r\nbegin\r\n if FMonth <> Value then\r\n begin\r\n FMonth := Value;\r\n FDate := EncodeDate(YearOf(FDate), FMonth, DayOf(FDate));\r\n Invalidate;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomCalendar.SetWeekNumberAppearance(\r\n const Value: TTMSFNCCalendarWeekNumberAppearance);\r\nbegin\r\n FWeekNumberAppearance.Assign(Value);\r\n Invalidate;\r\nend;\r\n\r\nprocedure TTMSFNCCustomCalendar.SetYear(const Value: Integer);\r\nbegin\r\n if FYear <> Value then\r\n begin\r\n FYear := Value;\r\n FDate := EncodeDate(FYear, MonthOf(FDate), DayOf(FDate));\r\n Invalidate;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomCalendar.ShiftCellH(var ACell: TRectF;\r\n const AMoveBy: Single);\r\nbegin\r\n IncrementCell(ACell.Left, AMoveBy);\r\n IncrementCell(ACell.Right, AMoveBy);\r\nend;\r\n\r\nprocedure TTMSFNCCustomCalendar.ShiftCellV(var ACell: TRectF;\r\n const AMoveBy: Single);\r\nbegin\r\n IncrementCell(ACell.Top, AMoveBy);\r\n IncrementCell(ACell.Bottom, AMoveBy);\r\nend;\r\n\r\nprocedure TTMSFNCCustomCalendar.ShowBeforeAndAfterChanged(Sender: TObject);\r\nbegin\r\n Changed;\r\nend;\r\n\r\nprocedure TTMSFNCCustomCalendar.UpdateControlAfterResize;\r\nbegin\r\n inherited;\r\n if Assigned(WeekNumberAppearance) then\r\n CalculateXOffset;\r\nend;\r\n\r\nprocedure TTMSFNCCustomCalendar.WeekNumbersChanged(Sender: TObject);\r\nbegin\r\n CalculateXOffset;\r\n Changed;\r\nend;\r\n\r\n{ TTMSFNCCalendarHeader }\r\n\r\nprocedure TTMSFNCCalendarHeader.Assign(Source: TPersistent);\r\nbegin\r\n if (Source is TTMSFNCCalendarHeader) then\r\n begin\r\n FFont.AssignSource((Source as TTMSFNCCalendarHeader).Font);\r\n FHorizontalTextAlign := (Source as TTMSFNCCalendarHeader).HorizontalTextAlign;\r\n FVerticalTextAlign := (Source as TTMSFNCCalendarHeader).VerticalTextAlign;\r\n FStroke.Assign((Source as TTMSFNCCalendarHeader).Stroke);\r\n FFill.Assign((Source as TTMSFNCCalendarHeader).Fill);\r\n FArrow.Assign((Source as TTMSFNCCalendarHeader).Arrow);\r\n FVisible := (Source as TTMSFNCCalendarHeader).Visible;\r\n FHeight := (Source as TTMSFNCCalendarHeader).Height;\r\n end\r\n else\r\n inherited;\r\nend;\r\n\r\nprocedure TTMSFNCCalendarHeader.Changed;\r\nbegin\r\n if Assigned(OnChange) then\r\n OnChange(Self);\r\nend;\r\n\r\nconstructor TTMSFNCCalendarHeader.Create(AOwner: TComponent);\r\nbegin\r\n FFont := TTMSFNCGraphicsFont.Create;\r\n FHorizontalTextAlign := gtaCenter;\r\n FVerticalTextAlign := gtaCenter;\r\n FStroke := TTMSFNCGraphicsStroke.Create(gskSolid, gcSilver);\r\n FFill := TTMSFNCGraphicsFill.Create(gfkSolid, MakeGraphicsColor(228, 228, 228));\r\n FArrow := TTMSFNCCalendarArrow.Create(AOwner);\r\n FVisible := True;\r\n FHeight := 25;\r\n\r\n FFill.OnChanged := @FillChanged;\r\n FFont.OnChanged := @FontChanged;\r\n FStroke.OnChanged := @StrokeChanged;\r\nend;\r\n\r\ndestructor TTMSFNCCalendarHeader.Destroy;\r\nbegin\r\n FFont.Free;\r\n FFill.Free;\r\n FStroke.Free;\r\n FArrow.Free;\r\n inherited;\r\nend;\r\n\r\nprocedure TTMSFNCCalendarHeader.FillChanged(Sender: TObject);\r\nbegin\r\n Changed;\r\nend;\r\n\r\nprocedure TTMSFNCCalendarHeader.FontChanged(Sender: TObject);\r\nbegin\r\n Changed;\r\nend;\r\n\r\nprocedure TTMSFNCCalendarHeader.SetArrow(const Value: TTMSFNCCalendarArrow);\r\nbegin\r\n if FArrow <> Value then\r\n FArrow.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCCalendarHeader.SetFill(const Value: TTMSFNCGraphicsFill);\r\nbegin\r\n if FFill <> Value then\r\n FFill.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCCalendarHeader.SetFont(const Value: TTMSFNCGraphicsFont);\r\nbegin\r\n FFont.AssignSource(Value);\r\nend;\r\n\r\nprocedure TTMSFNCCalendarHeader.SetHeight(const Value: Integer);\r\nbegin\r\n if FHeight <> Value then\r\n begin\r\n FHeight := Value;\r\n Changed;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCalendarHeader.SetHorizontalTextAlign(\r\n const Value: TTMSFNCGraphicsTextAlign);\r\nbegin\r\n if FHorizontalTextAlign <> Value then\r\n begin\r\n FHorizontalTextAlign := Value;\r\n Changed;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCalendarHeader.SetStroke(const Value: TTMSFNCGraphicsStroke);\r\nbegin\r\n if FStroke <> Value then\r\n FStroke.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCCalendarHeader.SetVerticalTextAlign(\r\n const Value: TTMSFNCGraphicsTextAlign);\r\nbegin\r\n if FVerticalTextAlign <> Value then\r\n begin\r\n FVerticalTextAlign := Value;\r\n Changed;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCalendarHeader.SetVisible(const Value: Boolean);\r\nbegin\r\n if FVisible <> Value then\r\n begin\r\n FVisible := Value;\r\n Changed;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCalendarHeader.StrokeChanged(Sender: TObject);\r\nbegin\r\n Changed;\r\nend;\r\n\r\n{ TTMSFNCCalendarDayNameAppearance }\r\n\r\nprocedure TTMSFNCCalendarDayNameAppearance.Assign(Source: TPersistent);\r\nbegin\r\n if Source is TTMSFNCCalendarDayNameAppearance then\r\n begin\r\n FHeight := (Source as TTMSFNCCalendarDayNameAppearance).Height;\r\n FFill.Assign((Source as TTMSFNCCalendarDayNameAppearance).Fill);\r\n FStroke.Assign((Source as TTMSFNCCalendarDayNameAppearance).Stroke);\r\n FFont.AssignSource((Source as TTMSFNCCalendarDayNameAppearance).Font);\r\n FVerticalTextAlign := ((Source as TTMSFNCCalendarDayNameAppearance).VerticalTextAlign);\r\n FHorizontalTextAlign := ((Source as TTMSFNCCalendarDayNameAppearance).HorizontalTextAlign);\r\n end\r\n else\r\n inherited;\r\nend;\r\n\r\nprocedure TTMSFNCCalendarDayNameAppearance.Changed;\r\nbegin\r\n if Assigned(OnChange) then\r\n OnChange(Self);\r\nend;\r\n\r\nconstructor TTMSFNCCalendarDayNameAppearance.Create;\r\nbegin\r\n FHeight := 15;\r\n FFont := TTMSFNCGraphicsFont.Create;\r\n FFill := TTMSFNCGraphicsFill.Create(gfkSolid, gcNull);\r\n FStroke := TTMSFNCGraphicsStroke.Create(gskSolid, gcNull);\r\n FHorizontalTextAlign := gtaCenter;\r\n FVerticalTextAlign := gtaCenter;\r\nend;\r\n\r\ndestructor TTMSFNCCalendarDayNameAppearance.Destroy;\r\nbegin\r\n FFill.Free;\r\n FStroke.Free;\r\n FFont.Free;\r\n inherited;\r\nend;\r\n\r\nprocedure TTMSFNCCalendarDayNameAppearance.FillChanged(Sender: TObject);\r\nbegin\r\n Changed;\r\nend;\r\n\r\nprocedure TTMSFNCCalendarDayNameAppearance.FontChanged(Sender: TObject);\r\nbegin\r\n Changed;\r\nend;\r\n\r\nprocedure TTMSFNCCalendarDayNameAppearance.SetFill(\r\n const Value: TTMSFNCGraphicsFill);\r\nbegin\r\n if FFill <> Value then\r\n FFill.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCCalendarDayNameAppearance.SetFont(\r\n const Value: TTMSFNCGraphicsFont);\r\nbegin\r\n FFont.AssignSource(Value);\r\nend;\r\n\r\nprocedure TTMSFNCCalendarDayNameAppearance.SetHeight(const Value: Integer);\r\nbegin\r\n if FHeight <> Value then\r\n FHeight := Value;\r\nend;\r\n\r\nprocedure TTMSFNCCalendarDayNameAppearance.SetHorizontalTextAlign(\r\n const Value: TTMSFNCGraphicsTextAlign);\r\nbegin\r\n if FHorizontalTextAlign <> Value then\r\n FHorizontalTextAlign := Value;\r\nend;\r\n\r\nprocedure TTMSFNCCalendarDayNameAppearance.SetStroke(\r\n const Value: TTMSFNCGraphicsStroke);\r\nbegin\r\n if FStroke <> Value then\r\n FStroke.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCCalendarDayNameAppearance.SetVerticalTextAlign(\r\n const Value: TTMSFNCGraphicsTextAlign);\r\nbegin\r\n if FVerticalTextAlign <> Value then\r\n FVerticalTextAlign := Value;\r\nend;\r\n\r\nprocedure TTMSFNCCalendarDayNameAppearance.StrokeChanged(Sender: TObject);\r\nbegin\r\n Changed;\r\nend;\r\n\r\n{ TTMSFNCCalendarDateAppearance }\r\n\r\nprocedure TTMSFNCCalendarDateAppearance.Assign(Source: TPersistent);\r\nbegin\r\n if Source is TTMSFNCCalendarDateAppearance then\r\n begin\r\n FFill.Assign((Source as TTMSFNCCalendarDateAppearance).Fill);\r\n FStroke.Assign((Source as TTMSFNCCalendarDateAppearance).Stroke);\r\n FFont.AssignSource((Source as TTMSFNCCalendarDateAppearance).Font);\r\n FVerticalTextAlign := (Source as TTMSFNCCalendarDateAppearance).VerticalTextAlign;\r\n FHorizontalTextAlign := (Source as TTMSFNCCalendarDateAppearance).HorizontalTextAlign;\r\n FSelectedFill.Assign((Source as TTMSFNCCalendarDateAppearance).SelectedFill);\r\n FSelectedStroke.Assign((Source as TTMSFNCCalendarDateAppearance).SelectedStroke);\r\n FSelectedFont.AssignSource((Source as TTMSFNCCalendarDateAppearance).SelectedFont);\r\n FSelectedVerticalTextAlign := (Source as TTMSFNCCalendarDateAppearance).SelectedVerticalTextAlign;\r\n FSelectedHorizontalTextAlign := (Source as TTMSFNCCalendarDateAppearance).SelectedHorizontalTextAlign;\r\n FDisabledFill.Assign((Source as TTMSFNCCalendarDateAppearance).DisabledFill);\r\n FDisabledStroke.Assign((Source as TTMSFNCCalendarDateAppearance).DisabledStroke);\r\n FDisabledFont.AssignSource((Source as TTMSFNCCalendarDateAppearance).DisabledFont);\r\n FDateBeforeFill.Assign((Source as TTMSFNCCalendarDateAppearance).DateBeforeFill);\r\n FDateBeforeFont.AssignSource((Source as TTMSFNCCalendarDateAppearance).DateBeforeFont);\r\n FDateBeforeStroke.Assign((Source as TTMSFNCCalendarDateAppearance).DateBeforeStroke);\r\n FDateAfterFill.Assign((Source as TTMSFNCCalendarDateAppearance).DateAfterFill);\r\n FDateAfterFont.AssignSource((Source as TTMSFNCCalendarDateAppearance).DateAfterFont);\r\n FDateAfterStroke.Assign((Source as TTMSFNCCalendarDateAppearance).DateAfterStroke);\r\n FTodayFill.Assign((Source as TTMSFNCCalendarDateAppearance).TodayFill);\r\n FTodayFont.AssignSource((Source as TTMSFNCCalendarDateAppearance).TodayFont);\r\n FTodayStroke.Assign((Source as TTMSFNCCalendarDateAppearance).TodayStroke);\r\n FBadgeFill.Assign((Source as TTMSFNCCalendarDateAppearance).BadgeFill);\r\n FBadgeFont.AssignSource((Source as TTMSFNCCalendarDateAppearance).BadgeFont);\r\n FBadgeStroke.Assign((Source as TTMSFNCCalendarDateAppearance).BadgeStroke);\r\n FShowDaysBefore := (Source as TTMSFNCCalendarDateAppearance).ShowDaysBefore;\r\n FShowDaysAfter := (Source as TTMSFNCCalendarDateAppearance).ShowDaysAfter;\r\n FShowFocus := (Source as TTMSFNCCalendarDateAppearance).ShowFocus;\r\n end\r\n else\r\n inherited;\r\nend;\r\n\r\nprocedure TTMSFNCCalendarDateAppearance.Changed;\r\nbegin\r\n if Assigned(OnChange) then\r\n OnChange(Self);\r\nend;\r\n\r\nconstructor TTMSFNCCalendarDateAppearance.Create;\r\nbegin\r\n FFont := TTMSFNCGraphicsFont.Create;\r\n FFill := TTMSFNCGraphicsFill.Create(gfkSolid, gcNull);\r\n FStroke := TTMSFNCGraphicsStroke.Create(gskSolid, gcNull);\r\n FHorizontalTextAlign := gtaCenter;\r\n FVerticalTextAlign := gtaCenter;\r\n FSelectedFill := TTMSFNCGraphicsFill.Create(gfkSolid, gcDodgerblue);\r\n FSelectedStroke := TTMSFNCGraphicsStroke.Create(gskSolid, gcDodgerblue);\r\n FSelectedFont := TTMSFNCGraphicsFont.Create;\r\n FSelectedFont.Color := gcWhite;\r\n FSelectedHorizontalTextAlign := gtaCenter;\r\n FSelectedVerticalTextAlign := gtaCenter;\r\n FDisabledFont := TTMSFNCGraphicsFont.Create;\r\n FDisabledFont.Color := gcLightgrey;\r\n FDisabledFill := TTMSFNCGraphicsFill.Create(gfkSolid, gcNull);\r\n FDisabledStroke := TTMSFNCGraphicsStroke.Create(gskSolid, gcNull);\r\n FDateBeforeFill := TTMSFNCGraphicsFill.Create(gfkSolid, gcNull);\r\n FDateBeforeFont := TTMSFNCGraphicsFont.Create;\r\n FDateBeforeStroke := TTMSFNCGraphicsStroke.Create(gskSolid, gcNull);\r\n FDateBeforeFont.Color := gcMedGray;\r\n FDateAfterFill := TTMSFNCGraphicsFill.Create(gfkSolid, gcNull);\r\n FDateAfterFont := TTMSFNCGraphicsFont.Create;\r\n FDateAfterFont.Color := gcMedGray;\r\n FDateAfterStroke := TTMSFNCGraphicsStroke.Create(gskSolid, gcNull);\r\n FTodayFill := TTMSFNCGraphicsFill.Create(gfkSolid, gcNull);\r\n FTodayFont := TTMSFNCGraphicsFont.Create;\r\n FTodayFont.Color := gcRed;\r\n FTodayStroke := TTMSFNCGraphicsStroke.Create(gskSolid, gcNull);\r\n FBadgeFill := TTMSFNCGraphicsFill.Create(gfkSolid, gcRed);\r\n FBadgeFont := TTMSFNCGraphicsFont.Create;\r\n FBadgeFont.Color := gcWhite;\r\n FShowFocus := True;\r\n {$IFNDEF FMXLIB}\r\n FBadgeFont.Size := 7;\r\n {$ENDIF}\r\n {$IFDEF FMXLIB}\r\n FBadgeFont.Size := 10;\r\n {$ENDIF}\r\n FBadgeStroke := TTMSFNCGraphicsStroke.Create(gskSolid, gcRed);\r\n FShowDaysBefore := False;\r\n FShowDaysAfter := False;\r\n\r\n FFont.OnChanged := @FontChanged;\r\n FSelectedFont.OnChanged := @FontChanged;\r\n FDisabledFont.OnChanged := @FontChanged;\r\n FDateBeforeFont.OnChanged := @FontChanged;\r\n FDateAfterFont.OnChanged := @FontChanged;\r\n FTodayFont.OnChanged := @FontChanged;\r\n FBadgeFont.OnChanged := @FontChanged;\r\n FFill.OnChanged := @FillChanged;\r\n FSelectedFill.OnChanged := @FillChanged;\r\n FDisabledFill.OnChanged := @FillChanged;\r\n FDateBeforeFill.OnChanged := @FillChanged;\r\n FDateAfterFill.OnChanged := @FillChanged;\r\n FTodayFill.OnChanged := @FillChanged;\r\n FBadgeFill.OnChanged := @FillChanged;\r\n FStroke.OnChanged := @StrokeChanged;\r\n FSelectedStroke.OnChanged := @StrokeChanged;\r\n FDisabledStroke.OnChanged := @StrokeChanged;\r\n FDateBeforeStroke.OnChanged := @StrokeChanged;\r\n FDateAfterStroke.OnChanged := @StrokeChanged;\r\n FTodayStroke.OnChanged := @StrokeChanged;\r\n FBadgeStroke.OnChanged := @StrokeChanged;\r\nend;\r\n\r\ndestructor TTMSFNCCalendarDateAppearance.Destroy;\r\nbegin\r\n FFill.Free;\r\n FStroke.Free;\r\n FFont.Free;\r\n FSelectedFill.Free;\r\n FSelectedStroke.Free;\r\n FSelectedFont.Free;\r\n FDisabledFill.Free;\r\n FDisabledStroke.Free;\r\n FDisabledFont.Free;\r\n FDateBeforeFill.Free;\r\n FDateBeforeFont.Free;\r\n FDateBeforeStroke.Free;\r\n FDateAfterFill.Free;\r\n FDateAfterFont.Free;\r\n FDateAfterStroke.Free;\r\n FTodayFill.Free;\r\n FTodayFont.Free;\r\n FTodayStroke.Free;\r\n FBadgeFill.Free;\r\n FBadgeFont.Free;\r\n FBadgeStroke.Free;\r\n inherited;\r\nend;\r\n\r\nprocedure TTMSFNCCalendarDateAppearance.FillChanged(Sender: TObject);\r\nbegin\r\n Changed;\r\nend;\r\n\r\nprocedure TTMSFNCCalendarDateAppearance.FontChanged(Sender: TObject);\r\nbegin\r\n Changed;\r\nend;\r\n\r\nprocedure TTMSFNCCalendarDateAppearance.SetBadgeFill(\r\n const Value: TTMSFNCGraphicsFill);\r\nbegin\r\n if FBadgeFill <> Value then\r\n FBadgeFill.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCCalendarDateAppearance.SetBadgeFont(\r\n const Value: TTMSFNCGraphicsFont);\r\nbegin\r\n FBadgeFont.AssignSource(Value);\r\nend;\r\n\r\nprocedure TTMSFNCCalendarDateAppearance.SetBadgeStroke(\r\n const Value: TTMSFNCGraphicsStroke);\r\nbegin\r\n if FBadgeStroke <> Value then\r\n FBadgeStroke.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCCalendarDateAppearance.SetDateAfterFill(\r\n const Value: TTMSFNCGraphicsFill);\r\nbegin\r\n if FDateAfterFill <> Value then\r\n FDateAfterFill.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCCalendarDateAppearance.SetDateAfterFont(\r\n const Value: TTMSFNCGraphicsFont);\r\nbegin\r\n FDateAfterFont.AssignSource(Value);\r\nend;\r\n\r\nprocedure TTMSFNCCalendarDateAppearance.SetDateAfterStroke(\r\n const Value: TTMSFNCGraphicsStroke);\r\nbegin\r\n if FDateAfterStroke <> Value then\r\n FDateAfterStroke.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCCalendarDateAppearance.SetDateBeforeFill(\r\n const Value: TTMSFNCGraphicsFill);\r\nbegin\r\n if FDateBeforeFill <> Value then\r\n FDateBeforeFill.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCCalendarDateAppearance.SetDateBeforeFont(\r\n const Value: TTMSFNCGraphicsFont);\r\nbegin\r\n FDateBeforeFont.AssignSource(Value);\r\nend;\r\n\r\nprocedure TTMSFNCCalendarDateAppearance.SetDateBeforeStroke(\r\n const Value: TTMSFNCGraphicsStroke);\r\nbegin\r\n if FDateBeforeStroke <> Value then\r\n FDateBeforeStroke.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCCalendarDateAppearance.SetDisabledFill(\r\n const Value: TTMSFNCGraphicsFill);\r\nbegin\r\n if FDisabledFill <> Value then\r\n FDisabledFill.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCCalendarDateAppearance.SetDisabledFont(\r\n const Value: TTMSFNCGraphicsFont);\r\nbegin\r\n FDisabledFont.AssignSource(Value);\r\nend;\r\n\r\nprocedure TTMSFNCCalendarDateAppearance.SetDisabledStroke(\r\n const Value: TTMSFNCGraphicsStroke);\r\nbegin\r\n if FDisabledStroke <> Value then\r\n FDisabledStroke.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCCalendarDateAppearance.SetFill(\r\n const Value: TTMSFNCGraphicsFill);\r\nbegin\r\n if FFill <> Value then\r\n FFill.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCCalendarDateAppearance.SetFont(\r\n const Value: TTMSFNCGraphicsFont);\r\nbegin\r\n FFont.AssignSource(Value);\r\nend;\r\n\r\nprocedure TTMSFNCCalendarDateAppearance.SetHorizontalTextAlign(\r\n const Value: TTMSFNCGraphicsTextAlign);\r\nbegin\r\n if FHorizontalTextAlign <> Value then\r\n FHorizontalTextAlign := Value;\r\nend;\r\n\r\nprocedure TTMSFNCCalendarDateAppearance.SetSelectedFill(\r\n const Value: TTMSFNCGraphicsFill);\r\nbegin\r\n if FSelectedFill <> Value then\r\n FSelectedFill.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCCalendarDateAppearance.SetSelectedFont(\r\n const Value: TTMSFNCGraphicsFont);\r\nbegin\r\n FSelectedFont.AssignSource(Value);\r\nend;\r\n\r\nprocedure TTMSFNCCalendarDateAppearance.SetSelectedHorizontalTextAlign(\r\n const Value: TTMSFNCGraphicsTextAlign);\r\nbegin\r\n if FSelectedHorizontalTextAlign <> Value then\r\n FSelectedHorizontalTextAlign := Value;\r\nend;\r\n\r\nprocedure TTMSFNCCalendarDateAppearance.SetSelectedStroke(\r\n const Value: TTMSFNCGraphicsStroke);\r\nbegin\r\n if FSelectedStroke <> Value then\r\n FSelectedStroke.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCCalendarDateAppearance.SetSelectedVerticalTextAlign(\r\n const Value: TTMSFNCGraphicsTextAlign);\r\nbegin\r\n if FSelectedVerticalTextAlign <> Value then\r\n FSelectedVerticalTextAlign := Value;\r\nend;\r\n\r\nprocedure TTMSFNCCalendarDateAppearance.SetShowDaysAfter(const Value: Boolean);\r\nbegin\r\n if FShowDaysAfter <> Value then\r\n begin\r\n FShowDaysAfter := Value;\r\n Changed;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCalendarDateAppearance.SetShowDaysBefore(const Value: Boolean);\r\nbegin\r\n if FShowDaysBefore <> Value then\r\n begin\r\n FShowDaysBefore := Value;\r\n Changed;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCalendarDateAppearance.SetShowFocus(const Value: Boolean);\r\nbegin\r\n if FShowFocus <> Value then\r\n begin\r\n FShowFocus := Value;\r\n Changed;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCalendarDateAppearance.SetStroke(\r\n const Value: TTMSFNCGraphicsStroke);\r\nbegin\r\n if FStroke <> Value then\r\n FStroke.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCCalendarDateAppearance.SetTodayFill(\r\n const Value: TTMSFNCGraphicsFill);\r\nbegin\r\n if FTodayFill <> Value then\r\n FTodayFill.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCCalendarDateAppearance.SetTodayFont(\r\n const Value: TTMSFNCGraphicsFont);\r\nbegin\r\n FTodayFont.AssignSource(Value);\r\nend;\r\n\r\nprocedure TTMSFNCCalendarDateAppearance.SetTodayStroke(\r\n const Value: TTMSFNCGraphicsStroke);\r\nbegin\r\n if FTodayStroke <> Value then\r\n FTodayStroke.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCCalendarDateAppearance.SetVerticalTextAlign(\r\n const Value: TTMSFNCGraphicsTextAlign);\r\nbegin\r\n if FVerticalTextAlign <> Value then\r\n FVerticalTextAlign := Value;\r\nend;\r\n\r\nprocedure TTMSFNCCalendarDateAppearance.StrokeChanged(Sender: TObject);\r\nbegin\r\n Changed;\r\nend;\r\n\r\n{ TTMSFNCCalendarLineAppearance }\r\n\r\nprocedure TTMSFNCCalendarLineAppearance.Assign(Source: TPersistent);\r\nbegin\r\n if Source is TTMSFNCCalendarLineAppearance then\r\n FStroke.Assign((Source as TTMSFNCCalendarLineAppearance).Stroke)\r\n else\r\n inherited;\r\nend;\r\n\r\nprocedure TTMSFNCCalendarLineAppearance.Changed;\r\nbegin\r\n if Assigned(OnChange) then\r\n OnChange(Self);\r\nend;\r\n\r\nconstructor TTMSFNCCalendarLineAppearance.Create;\r\nbegin\r\n FStroke := TTMSFNCGraphicsStroke.Create(gskSolid, gcSilver);\r\n FStroke.OnChanged := @StrokeChanged;\r\nend;\r\n\r\ndestructor TTMSFNCCalendarLineAppearance.Destroy;\r\nbegin\r\n FStroke.Free;\r\n inherited;\r\nend;\r\n\r\nprocedure TTMSFNCCalendarLineAppearance.SetStroke(\r\n const Value: TTMSFNCGraphicsStroke);\r\nbegin\r\n if FStroke <> Value then\r\n FStroke.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCCalendarLineAppearance.StrokeChanged(Sender: TObject);\r\nbegin\r\n Changed;\r\nend;\r\n\r\n{ TTMSFNCCalendarWeekNumberAppearance }\r\n\r\nprocedure TTMSFNCCalendarWeekNumberAppearance.Assign(Source: TPersistent);\r\nbegin\r\n if Source is TTMSFNCCalendarWeekNumberAppearance then\r\n begin\r\n FVisible := (Source as TTMSFNCCalendarWeekNumberAppearance).Visible;\r\n FFill.Assign((Source as TTMSFNCCalendarWeekNumberAppearance).Fill);\r\n FStroke.Assign((Source as TTMSFNCCalendarWeekNumberAppearance).Stroke);\r\n FFont.AssignSource((Source as TTMSFNCCalendarWeekNumberAppearance).Font);\r\n FHorizontalTextAlign := (Source as TTMSFNCCalendarWeekNumberAppearance).HorizontalTextAlign;\r\n FVerticalTextAlign := (Source as TTMSFNCCalendarWeekNumberAppearance).VerticalTextAlign;\r\n end\r\n else\r\n inherited;\r\nend;\r\n\r\nprocedure TTMSFNCCalendarWeekNumberAppearance.Changed;\r\nbegin\r\n if Assigned(OnChange) then\r\n OnChange(Self);\r\nend;\r\n\r\nconstructor TTMSFNCCalendarWeekNumberAppearance.Create;\r\nbegin\r\n FVisible := False;\r\n FFill := TTMSFNCGraphicsFill.Create(gfkSolid, gcNull);\r\n FFont := TTMSFNCGraphicsFont.Create;\r\n FStroke := TTMSFNCGraphicsStroke.Create(gskSolid, gcNull);\r\n FHorizontalTextAlign := gtaCenter;\r\n FVerticalTextAlign := gtaCenter;\r\n\r\n FFill.OnChanged := @FillChanged;\r\n FFont.OnChanged := @FontChanged;\r\n FStroke.OnChanged := @StrokeChanged;\r\nend;\r\n\r\ndestructor TTMSFNCCalendarWeekNumberAppearance.Destroy;\r\nbegin\r\n FFill.Free;\r\n FFont.Free;\r\n FStroke.Free;\r\n inherited;\r\nend;\r\n\r\nprocedure TTMSFNCCalendarWeekNumberAppearance.FillChanged(Sender: TObject);\r\nbegin\r\n Changed;\r\nend;\r\n\r\nprocedure TTMSFNCCalendarWeekNumberAppearance.FontChanged(Sender: TObject);\r\nbegin\r\n Changed;\r\nend;\r\n\r\nprocedure TTMSFNCCalendarWeekNumberAppearance.SetFill(const Value: TTMSFNCGraphicsFill);\r\nbegin\r\n if FFill <> Value then\r\n FFill.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCCalendarWeekNumberAppearance.SetFont(const Value: TTMSFNCGraphicsFont);\r\nbegin\r\n FFont.AssignSource(Value);\r\nend;\r\n\r\nprocedure TTMSFNCCalendarWeekNumberAppearance.SetHorizontalTextAlign(\r\n const Value: TTMSFNCGraphicsTextAlign);\r\nbegin\r\n if FHorizontalTextAlign <> Value then\r\n begin\r\n FHorizontalTextAlign := Value;\r\n Changed;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCalendarWeekNumberAppearance.SetStroke(\r\n const Value: TTMSFNCGraphicsStroke);\r\nbegin\r\n if FStroke <> Value then\r\n FStroke.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCCalendarWeekNumberAppearance.SetVerticalTextAlign(\r\n const Value: TTMSFNCGraphicsTextAlign);\r\nbegin\r\n if FVerticalTextAlign <> Value then\r\n begin\r\n FVerticalTextAlign := Value;\r\n Changed;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCalendarWeekNumberAppearance.SetVisible(const Value: Boolean);\r\nbegin\r\n if FVisible <> Value then\r\n begin\r\n FVisible := Value;\r\n Changed;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCalendarWeekNumberAppearance.StrokeChanged(Sender: TObject);\r\nbegin\r\n Changed;\r\nend;\r\n\r\n{ TTMSFNCCalendarDateItem }\r\n\r\nprocedure TTMSFNCCalendarDateItem.Assign(Source: TPersistent);\r\nbegin\r\n if (Source is TTMSFNCCalendarDateItem) then\r\n FDate := (Source as TTMSFNCCalendarDateItem).Date\r\n else\r\n inherited;\r\nend;\r\n\r\nprocedure TTMSFNCCalendarDateItem.SetDate(const Value: TDate);\r\nbegin\r\n if FDate <> Value then\r\n begin\r\n FDate := Value;\r\n Update;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCalendarDateItem.Update;\r\nbegin\r\n TTMSFNCCalendarDates(Collection).Update(Self);\r\nend;\r\n\r\n{ TTMSFNCCalendarDates }\r\n\r\nfunction TTMSFNCCalendarDates.Add: TTMSFNCCalendarDateItem;\r\nbegin\r\n Result := TTMSFNCCalendarDateItem(inherited Add);\r\nend;\r\n\r\nprocedure TTMSFNCCalendarDates.DoChange;\r\nbegin\r\n if Assigned(OnChange) then\r\n OnChange(Self);\r\nend;\r\n\r\nfunction TTMSFNCCalendarDates.GetItem(Index: integer): TTMSFNCCalendarDateItem;\r\nbegin\r\n Result := TTMSFNCCalendarDateItem(inherited Items[Index]);\r\nend;\r\n\r\nfunction TTMSFNCCalendarDates.InCollection(ADate: TDate): Boolean;\r\nvar\r\n I: Integer;\r\nbegin\r\n Result := False;\r\n\r\n for I := 0 to Count - 1 do\r\n if CompareDate(Items[I].Date, ADate) = 0 then\r\n begin\r\n Result := True;\r\n Break;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCalendarDates.SelectDate(ADate: TDate);\r\nvar\r\n DateToAdd: TTMSFNCCalendarDateItem;\r\nbegin\r\n DateToAdd := Add;\r\n DateToAdd.Date := ADate;\r\nend;\r\n\r\nprocedure TTMSFNCCalendarDates.SelectDateInterval(ADateFrom, ADateTo: TDate);\r\nvar\r\n I: Integer;\r\n IDate: TDate;\r\nbegin\r\n SelectDate(ADateFrom);\r\n IDate := ADateFrom;\r\n\r\n if CompareDate(ADateFrom, ADateTo) = -1 then\r\n begin\r\n for I := 0 to DaysBetween(ADateFrom, ADateTo) - 1 do\r\n begin\r\n IDate := IncDay(IDate, 1);\r\n SelectDate(IDate);\r\n end;\r\n end;\r\n\r\n if CompareDate(ADateTo, ADateFrom) = -1 then\r\n begin\r\n for I := 0 to DaysBetween(ADateTo, ADateFrom) - 1 do\r\n begin\r\n IDate := IncDay(IDate, -1);\r\n SelectDate(IDate);\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCalendarDates.SetItem(Index: integer;\r\n const Value: TTMSFNCCalendarDateItem);\r\nbegin\r\n inherited Items[Index] := Value;\r\nend;\r\n\r\nprocedure TTMSFNCCalendarDates.UnselectAll;\r\nbegin\r\n Clear;\r\nend;\r\n\r\nprocedure TTMSFNCCalendarDates.UnselectDate(ADate: TDate);\r\nvar\r\n I: Integer;\r\nbegin\r\n for I := 0 to Count - 1 do\r\n if Items[I].Date = ADate then\r\n begin\r\n Delete(I);\r\n Exit;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCalendarDates.Update(Item: TCollectionItem);\r\nbegin\r\n inherited;\r\n DoChange;\r\nend;\r\n\r\n{ TTMSFNCCalendarInteraction }\r\n\r\nprocedure TTMSFNCCalendarCustomInteraction.Assign(Source: TPersistent);\r\nbegin\r\n if Source is TTMSFNCCalendarCustomInteraction then\r\n begin\r\n FKeyboardSupport := (Source as TTMSFNCCalendarCustomInteraction).KeyboardSupport;\r\n FMultiSelect := (Source as TTMSFNCCalendarCustomInteraction).MultiSelect;\r\n FReadOnlyMode := (Source as TTMSFNCCalendarCustomInteraction).ReadOnlyMode;\r\n FNavigationMode := (Source as TTMSFNCCalendarCustomInteraction).NavigationMode;\r\n FSwipeOnHeader := (Source as TTMSFNCCalendarCustomInteraction).SwipeOnHeader;\r\n FAllowYearSelection := (Source as TTMSFNCCalendarCustomInteraction).AllowYearSelection;\r\n FAllowMonthSelection := (Source as TTMSFNCCalendarCustomInteraction).AllowMonthSelection;\r\n FYearOptions.Assign((Source as TTMSFNCCalendarCustomInteraction).YearOptions);\r\n end\r\n else\r\n inherited;\r\nend;\r\n\r\nconstructor TTMSFNCCalendarCustomInteraction.Create;\r\nbegin\r\n inherited;\r\n FKeyboardSupport := True;\r\n FMultiSelect := False;\r\n FReadOnlyMode := False;\r\n FNavigationMode := nmMonth;\r\n FSwipeOnHeader := False;\r\n FAllowMonthSelection := False;\r\n FAllowYearSelection := False;\r\n FYearOptions := TTMSFNCCalendarInteractionYearOptions.Create;\r\nend;\r\n\r\ndestructor TTMSFNCCalendarCustomInteraction.Destroy;\r\nbegin\r\n FYearOptions.Free;\r\n inherited;\r\nend;\r\n\r\nprocedure TTMSFNCCalendarCustomInteraction.SetAllowMonthSelection(\r\n const Value: Boolean);\r\nbegin\r\n if FAllowMonthSelection <> Value then\r\n FAllowMonthSelection := Value;\r\nend;\r\n\r\nprocedure TTMSFNCCalendarCustomInteraction.SetAllowYearSelection(\r\n const Value: Boolean);\r\nbegin\r\n if FAllowYearSelection <> Value then\r\n FAllowYearSelection := Value;\r\nend;\r\n\r\nprocedure TTMSFNCCalendarCustomInteraction.SetKeyboardSupport(const Value: Boolean);\r\nbegin\r\n if FKeyboardSupport <> Value then\r\n FKeyboardSupport := Value;\r\nend;\r\n\r\nprocedure TTMSFNCCalendarCustomInteraction.SetMultiSelect(const Value: Boolean);\r\nbegin\r\n if FMultiSelect <> Value then\r\n FMultiSelect := Value;\r\nend;\r\n\r\nprocedure TTMSFNCCalendarCustomInteraction.SetNavigationMode(\r\n const Value: TTMSFNCCalendarNavigationMode);\r\nbegin\r\n if FNavigationMode <> Value then\r\n FNavigationMode := Value;\r\nend;\r\n\r\nprocedure TTMSFNCCalendarCustomInteraction.SetReadOnlyMode(const Value: Boolean);\r\nbegin\r\n if FReadOnlyMode <> Value then\r\n FReadOnlyMode := Value;\r\nend;\r\n\r\nprocedure TTMSFNCCalendarCustomInteraction.SetSwipeOnHeader(const Value: Boolean);\r\nbegin\r\n if FSwipeOnHeader <> Value then\r\n FSwipeOnHeader := Value;\r\nend;\r\n\r\nprocedure TTMSFNCCalendarCustomInteraction.SetYearOptions(\r\n const Value: TTMSFNCCalendarInteractionYearOptions);\r\nbegin\r\n FYearOptions.Assign(Value);\r\nend;\r\n\r\n{ TTMSFNCCalendarArrow }\r\n\r\nprocedure TTMSFNCCalendarArrow.Assign(Source: TPersistent);\r\nbegin\r\n if Source is TTMSFNCCalendarArrow then\r\n begin\r\n FColor := (Source as TTMSFNCCalendarArrow).Color;\r\n FVisibility := (Source as TTMSFNCCalendarArrow).Visibility;\r\n FSize := (Source as TTMSFNCCalendarArrow).Size;\r\n FArrowLeftType := (Source as TTMSFNCCalendarArrow).ArrowLeftType;\r\n FArrowLeftBitmapSize := (Source as TTMSFNCCalendarArrow).ArrowLeftBitmapSize;\r\n FArrowLeftBitmap.Assign((Source as TTMSFNCCalendarArrow).ArrowLeftBitmap);\r\n FArrowRightType := (Source as TTMSFNCCalendarArrow).ArrowRightType;\r\n FArrowRightBitmapSize := (Source as TTMSFNCCalendarArrow).ArrowRightBitmapSize;\r\n FArrowRightBitmap.Assign((Source as TTMSFNCCalendarArrow).ArrowRightBitmap);\r\n end\r\n else\r\n inherited;\r\nend;\r\n\r\nprocedure TTMSFNCCalendarArrow.Changed;\r\nbegin\r\n if Assigned(OnChange) then\r\n OnChange(Self);\r\nend;\r\n\r\nconstructor TTMSFNCCalendarArrow.Create(AOwner: TComponent);\r\nbegin\r\n FOwner := AOwner;\r\n FArrowLeftBitmap := TTMSFNCScaledBitmaps.Create(Self);\r\n FArrowRightBitmap := TTMSFNCScaledBitmaps.Create(Self);\r\n FColor := gcDimgray;\r\n FVisibility := [alvLeft, alvRight];\r\n FArrowLeftType := atArrow;\r\n FArrowRightType := atArrow;\r\n FArrowLeftBitmapSize := 15;\r\n FArrowRightBitmapSize := 15;\r\n FSize := 15;\r\nend;\r\n\r\ndestructor TTMSFNCCalendarArrow.Destroy;\r\nbegin\r\n FArrowLeftBitmap.Free;\r\n FArrowRightBitmap.Free;\r\n inherited;\r\nend;\r\n\r\nfunction TTMSFNCCalendarArrow.GetBitmapContainer: TTMSFNCBitmapContainer;\r\n{$IFNDEF WEBLIB}\r\nvar\r\n ia: ITMSFNCBitmapContainer;\r\n{$ENDIF}\r\nbegin\r\n Result := nil;\r\n {$IFNDEF WEBLIB}\r\n if Assigned(FOwner) and Supports(FOwner, ITMSFNCBitmapContainer, ia) then\r\n Result := ia.BitmapContainer;\r\n {$ENDIF}\r\nend;\r\n\r\nfunction TTMSFNCCalendarArrow.GetOwner: TPersistent;\r\nbegin\r\n Result := FOwner;\r\nend;\r\n\r\nfunction TTMSFNCCalendarArrow.IsArrowLeftBitmapSizeStored: Boolean;\r\nbegin\r\n Result := ArrowLeftBitmapSize <> 15;\r\nend;\r\n\r\nfunction TTMSFNCCalendarArrow.IsArrowRightBitmapSizeStore: Boolean;\r\nbegin\r\n Result := ArrowRightBitmapSize <> 15;\r\nend;\r\n\r\nprocedure TTMSFNCCalendarArrow.SetArrowLeftBitmap(const Value: TTMSFNCScaledBitmaps);\r\nbegin\r\n FArrowLeftBitmap.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCCalendarArrow.SetArrowLeftBitmapSize(const Value: Single);\r\nbegin\r\n if FArrowLeftBitmapSize <> Value then\r\n begin\r\n FArrowLeftBitmapSize := Value;\r\n Changed;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCalendarArrow.SetArrowLeftType(\r\n const Value: TTMSFNCCalendarArrowType);\r\nbegin\r\n if FArrowLeftType <> Value then\r\n begin\r\n FArrowLeftType := Value;\r\n Changed;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCalendarArrow.SetArrowRightBitmap(const Value: TTMSFNCScaledBitmaps);\r\nbegin\r\n FArrowRightBitmap.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCCalendarArrow.SetArrowRightBitmapSize(const Value: Single);\r\nbegin\r\n if FArrowRightBitmapSize <> Value then\r\n begin\r\n FArrowRightBitmapSize := Value;\r\n Changed;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCalendarArrow.SetArrowRightType(\r\n const Value: TTMSFNCCalendarArrowType);\r\nbegin\r\n if FArrowRightType <> Value then\r\n begin\r\n FArrowRightType := Value;\r\n Changed;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCalendarArrow.SetBitmapContainer(\r\n const Value: TTMSFNCBitmapContainer);\r\n{$IFNDEF WEBLIB}\r\nvar\r\n ia: ITMSFNCBitmapContainer;\r\n{$ENDIF}\r\nbegin\r\n {$IFNDEF WEBLIB}\r\n if Assigned(FOwner) and Supports(FOwner, ITMSFNCBitmapContainer, ia) then\r\n ia.BitmapContainer := Value;\r\n {$ENDIF}\r\nend;\r\n\r\nprocedure TTMSFNCCalendarArrow.SetColor(const Value: TTMSFNCGraphicsColor);\r\nbegin\r\n if FColor <> Value then\r\n begin\r\n FColor := Value;\r\n Changed;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCalendarArrow.SetSize(const Value: Integer);\r\nbegin\r\n if FSize <> Value then\r\n FSize := Value;\r\nend;\r\n\r\nprocedure TTMSFNCCalendarArrow.SetVisibility(\r\n const Value: TTMSFNCCalendarArrowLayout);\r\nbegin\r\n if FVisibility <> Value then\r\n begin\r\n FVisibility := Value;\r\n Changed;\r\n end;\r\nend;\r\n\r\n{ TTMSFNCCalendarFooter }\r\n\r\nprocedure TTMSFNCCalendarFooter.Assign(Source: TPersistent);\r\nbegin\r\n if Source is TTMSFNCCalendarFooter then\r\n begin\r\n FFill.Assign((Source as TTMSFNCCalendarFooter).Fill);\r\n FStroke.Assign((Source as TTMSFNCCalendarFooter).Stroke);\r\n FFont.AssignSource((Source as TTMSFNCCalendarFooter).Font);\r\n FVerticalTextAlign := (Source as TTMSFNCCalendarFooter).FVerticalTextAlign;\r\n FHorizontalTextAlign := (Source as TTMSFNCCalendarFooter).FHorizontalTextAlign;\r\n FVisible := (Source as TTMSFNCCalendarFooter).Visible;\r\n FDateCaption := (Source as TTMSFNCCalendarFooter).DateCaption;\r\n FCaptionRect := (Source as TTMSFNCCalendarFooter).CaptionRect;\r\n FCaption := (Source as TTMSFNCCalendarFooter).Caption;\r\n FHeight := (Source as TTMSFNCCalendarFooter).Height;\r\n end\r\n else\r\n inherited;\r\nend;\r\n\r\nprocedure TTMSFNCCalendarFooter.Changed;\r\nbegin\r\n if Assigned(OnChange) then\r\n OnChange(Self);\r\nend;\r\n\r\nconstructor TTMSFNCCalendarFooter.Create;\r\nbegin\r\n FFont := TTMSFNCGraphicsFont.Create;\r\n FHorizontalTextAlign := gtaCenter;\r\n FVerticalTextAlign := gtaCenter;\r\n FStroke := TTMSFNCGraphicsStroke.Create(gskSolid, gcSilver);\r\n FFill := TTMSFNCGraphicsFill.Create(gfkSolid, MakeGraphicsColor(228, 228, 228));\r\n FVisible := True;\r\n FHeight := 25;\r\n FDateCaption := fdToday;\r\n\r\n FFill.OnChanged := @FillChanged;\r\n FFont.OnChanged := @FontChanged;\r\n FStroke.OnChanged := @StrokeChanged;\r\nend;\r\n\r\ndestructor TTMSFNCCalendarFooter.Destroy;\r\nbegin\r\n FFont.Free;\r\n FStroke.Free;\r\n FFill.Free;\r\n inherited;\r\nend;\r\n\r\nprocedure TTMSFNCCalendarFooter.FillChanged(Sender: TObject);\r\nbegin\r\n Changed;\r\nend;\r\n\r\nprocedure TTMSFNCCalendarFooter.FontChanged(Sender: TObject);\r\nbegin\r\n Changed;\r\nend;\r\n\r\nfunction TTMSFNCCalendarFooter.IsCaptionStored: Boolean;\r\nbegin\r\n Result := Caption <> '';\r\nend;\r\n\r\nprocedure TTMSFNCCalendarFooter.SetCaption(const Value: string);\r\nbegin\r\n if FCaption <> Value then\r\n begin\r\n FCaption := Value;\r\n Changed;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCalendarFooter.SetCaptionRect(const Value: TRectF);\r\nbegin\r\n FCaptionRect := Value;\r\nend;\r\n\r\nprocedure TTMSFNCCalendarFooter.SetDateCaption(\r\n const Value: TTMSFNCCalendarFooterDate);\r\nbegin\r\n if FDateCaption <> Value then\r\n begin\r\n FDateCaption := Value;\r\n Changed;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCalendarFooter.SetFill(const Value: TTMSFNCGraphicsFill);\r\nbegin\r\n if FFill <> Value then\r\n FFill.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCCalendarFooter.SetFont(const Value: TTMSFNCGraphicsFont);\r\nbegin\r\n FFont.AssignSource(Value);\r\nend;\r\n\r\nprocedure TTMSFNCCalendarFooter.SetHeight(const Value: Integer);\r\nbegin\r\n if FHeight <> Value then\r\n begin\r\n FHeight := Value;\r\n Changed;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCalendarFooter.SetHorizontalTextAlign(\r\n const Value: TTMSFNCGraphicsTextAlign);\r\nbegin\r\n if FHorizontalTextAlign <> Value then\r\n begin\r\n FHorizontalTextAlign := Value;\r\n Changed;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCalendarFooter.SetStroke(const Value: TTMSFNCGraphicsStroke);\r\nbegin\r\n if FStroke <> Value then\r\n FStroke.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCCalendarFooter.SetVerticalTextAlign(\r\n const Value: TTMSFNCGraphicsTextAlign);\r\nbegin\r\n if FVerticalTextAlign <> Value then\r\n begin\r\n FVerticalTextAlign := Value;\r\n Changed;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCalendarFooter.SetVisible(const Value: Boolean);\r\nbegin\r\n if FVisible <> Value then\r\n begin\r\n FVisible := Value;\r\n Changed;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCalendarFooter.StrokeChanged(Sender: TObject);\r\nbegin\r\n Changed;\r\nend;\r\n\r\n{ TTMSFNCCalendarEventItem }\r\n\r\nprocedure TTMSFNCCalendarEventItem.Assign(Source: TPersistent);\r\nbegin\r\n if Source is TTMSFNCCalendarEventItem then\r\n begin\r\n FBadgeColor := (Source as TTMSFNCCalendarEventItem).BadgeColor;\r\n FBadgeFontColor := (Source as TTMSFNCCalendarEventItem).BadgeFontColor;\r\n FBadgeValue := (Source as TTMSFNCCalendarEventItem).BadgeValue;\r\n FHint := (Source as TTMSFNCCalendarEventItem).Hint;\r\n FShowBadge := (Source as TTMSFNCCalendarEventItem).ShowBadge;\r\n FDate := (Source as TTMSFNCCalendarEventItem).Date;\r\n end\r\n else\r\n inherited;\r\nend;\r\n\r\nconstructor TTMSFNCCalendarEventItem.Create(ACollection: TCollection);\r\nbegin\r\n inherited;\r\n FShowBadge := True;\r\n FBadgeColor := gcNull;\r\n FBadgeFontColor := gcNull;\r\n Date := Now;\r\nend;\r\n\r\nfunction TTMSFNCCalendarEventItem.IsHintStored: Boolean;\r\nbegin\r\n Result := Hint <> '';\r\nend;\r\n\r\nprocedure TTMSFNCCalendarEventItem.SetBadgeColor(const Value: TTMSFNCGraphicsColor);\r\nbegin\r\n if FBadgeColor <> Value then\r\n begin\r\n FBadgeColor := Value;\r\n Update;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCalendarEventItem.SetBadgeFontColor(\r\n const Value: TTMSFNCGraphicsColor);\r\nbegin\r\n if FBadgeFontColor <> Value then\r\n begin\r\n FBadgeFontColor := Value;\r\n Update;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCalendarEventItem.SetBadgeValue(const Value: Integer);\r\nbegin\r\n if FBadgeValue <> Value then\r\n begin\r\n FBadgeValue := Value;\r\n Update;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCalendarEventItem.SetHint(const Value: string);\r\nbegin\r\n if FHint <> Value then\r\n begin\r\n FHint := Value;\r\n Update;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCalendarEventItem.SetShowBadge(const Value: Boolean);\r\nbegin\r\n if FShowBadge <> Value then\r\n begin\r\n FShowBadge := Value;\r\n Update;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCalendarEventItem.Update;\r\nbegin\r\n TTMSFNCCalendarEvents(Collection).Update(Self);\r\nend;\r\n\r\n{ TTMSFNCCalendarEvents }\r\n\r\nfunction TTMSFNCCalendarEvents.Add: TTMSFNCCalendarEventItem;\r\nbegin\r\n Result := TTMSFNCCalendarEventItem(inherited Add);\r\nend;\r\n\r\nfunction TTMSFNCCalendarEvents.GetEventCollectionItemByDate(\r\n ADate: TDate): TTMSFNCCalendarEventItem;\r\nvar\r\n I: Integer;\r\nbegin\r\n Result := nil;\r\n\r\n for I := 0 to Count - 1 do\r\n if CompareDate(Items[I].Date, ADate) = 0 then\r\n begin\r\n Result := Items[I];\r\n Exit;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCCalendarEvents.GetItem(\r\n Index: integer): TTMSFNCCalendarEventItem;\r\nbegin\r\n Result := TTMSFNCCalendarEventItem(inherited Items[Index]);\r\nend;\r\n\r\nprocedure TTMSFNCCalendarEvents.SetItem(Index: integer;\r\n const Value: TTMSFNCCalendarEventItem);\r\nbegin\r\n inherited Items[Index] := Value;\r\nend;\r\n\r\n{ TTMSFNCCalendarPopupBox }\r\n\r\nprocedure TTMSFNCCalendarPopupBox.Popup(APoint: TPointF);\r\nbegin\r\n {$IFDEF FMXLIB}\r\n Position.X := APoint.X;\r\n DoPopup;\r\n {$ENDIF}\r\n {$IFNDEF FMXLIB}\r\n DoPopup(APoint.X, APoint.Y);\r\n {$ENDIF}\r\nend;\r\n\r\n{$IFNDEF FMXLIB}\r\nconstructor TTMSFNCCalendarPopupBox.Create(AOwner: TTMSFNCCustomCalendar);\r\nbegin\r\n inherited Create(AOwner);\r\n {$IFNDEF WEBLIB}\r\n FPopup := TPopupMenu.Create(Self);\r\n {$ENDIF}\r\n {$IFDEF WEBLIB}\r\n FPopup := TWebPopupMenu.Create(TTMSFNCUtils.GetParentForm(AOwner));\r\n FPopup.Parent := TTMSFNCUtils.GetParentForm(AOwner);\r\n {$ENDIF}\r\n FItems := TStringList.Create;\r\n FPaintScale := 1;\r\nend;\r\n\r\ndestructor TTMSFNCCalendarPopupBox.Destroy;\r\nbegin\r\n FPopup.Free;\r\n FItems.Free;\r\n inherited;\r\nend;\r\n\r\nprocedure TTMSFNCCalendarPopupBox.DoChange;\r\nbegin\r\n if Assigned(OnChange) then\r\n OnChange(Self);\r\nend;\r\n\r\nprocedure TTMSFNCCalendarPopupBox.DoMenuItemClick(Sender: TObject);\r\nbegin\r\n ItemIndex := TMenuItem(Sender).Tag;\r\nend;\r\n\r\nprocedure TTMSFNCCalendarPopupBox.DoPopup(ALeft, ATop: Single);\r\nvar\r\n mi: TMenuItem;\r\n I: Integer;\r\nbegin\r\n FPopup.Items.Clear;\r\n\r\n for I := 0 to FItems.Count - 1 do\r\n begin\r\n mi := TMenuItem.Create(FPopup);\r\n mi.OnClick := DoMenuItemClick;\r\n mi.Tag := I;\r\n mi.Name := 'MenuItem' + FItems[I];\r\n mi.Caption := FItems[I];\r\n mi.AutoCheck := True;\r\n mi.RadioItem := True;\r\n mi.Checked := i = ItemIndex;\r\n FPopup.Items.Add(mi);\r\n end;\r\n\r\n if (FItems.Count > 0) then\r\n FPopup.Popup(Round(ALeft), Round(ATop - 15 * FPaintScale));\r\nend;\r\n\r\nprocedure TTMSFNCCalendarPopupBox.SetItemIndex(const Value: Integer);\r\nbegin\r\n if FItemIndex <> Value then\r\n begin\r\n FItemIndex := Value;\r\n DoChange;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCalendarPopupBox.SetItems(const Value: TStringList);\r\nbegin\r\n FItems.Assign(Value);\r\nend;\r\nprocedure TTMSFNCCalendarPopupBox.SetPaintScale(AValue: Single);\r\nbegin\r\n FPaintScale := AValue;\r\nend;\r\n\r\n{$ENDIF}\r\n\r\n{ TTMSFNCCalendarInteractionYearOptions }\r\n\r\nprocedure TTMSFNCCalendarInteractionYearOptions.Assign(Source: TPersistent);\r\nbegin\r\n if (Source is TTMSFNCCalendarInteractionYearOptions) then\r\n begin\r\n FItemsBeforeCurrentYear := (Source as TTMSFNCCalendarInteractionYearOptions).ItemsBeforeCurrentYear;\r\n FItemsAfterCurrentYear := (Source as TTMSFNCCalendarInteractionYearOptions).ItemsAfterCurrentYear;\r\n end\r\n else\r\n inherited;\r\nend;\r\n\r\nconstructor TTMSFNCCalendarInteractionYearOptions.Create;\r\nbegin\r\n FItemsBeforeCurrentYear := 5;\r\n FItemsAfterCurrentYear := 5;\r\nend;\r\n\r\nprocedure TTMSFNCCalendarInteractionYearOptions.SetItemsAfterCurrentYear(\r\n const Value: Integer);\r\nbegin\r\n if FItemsAfterCurrentYear <> Value then\r\n begin\r\n if Value < 0 then\r\n FItemsAfterCurrentYear := 0\r\n else\r\n FItemsAfterCurrentYear := Value;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCalendarInteractionYearOptions.SetItemsBeforeCurrentYear(\r\n const Value: Integer);\r\nbegin\r\n if FItemsBeforeCurrentYear <> Value then\r\n begin\r\n if Value < 0 then\r\n FItemsBeforeCurrentYear := 0\r\n else\r\n FItemsBeforeCurrentYear := Value;\r\n end;\r\nend;\r\n\r\nend.\r\n","{********************************************************************}\r\n{ }\r\n{ written by TMS Software }\r\n{ copyright (c) 2018 - 2024 }\r\n{ Email : info@tmssoftware.com }\r\n{ Web : https://www.tmssoftware.com }\r\n{ }\r\n{ The source code is given as is. The author is not responsible }\r\n{ for any possible damage done due to the use of this code. }\r\n{ The complete source code remains property of the author and may }\r\n{ not be distributed, published, given or sold in any form as such. }\r\n{ No parts of the source code can be included in any other component }\r\n{ or application without written authorization of the author. }\r\n{********************************************************************}\r\n\r\nunit WEBLib.TMSFNCDatePicker;\r\n\r\n{$I WEBLib.TMSFNCDefines.inc}\r\n\r\n{$IFDEF CMNLIB}\r\n{$DEFINE CMNWEBLIB}\r\n{$ENDIF}\r\n{$IFDEF WEBLIB}\r\n{$DEFINE CMNWEBLIB}\r\n{$ENDIF}\r\n\r\ninterface\r\n\r\nuses\r\n Classes, WEBLib.TMSFNCCustomPicker, WEBLib.Controls, WEBLib.TMSFNCCustomSelector,\r\n WEBLib.TMSFNCGraphics, WEBLib.TMSFNCTypes, WEBLib.StdCtrls, WEBLib.TMSFNCGraphicsTypes,\r\n WEBLib.TMSFNCCalendar, WEBLib.TMSFNCBitmapContainer, WEBLib.TMSFNCStyles, WEBLib.TMSFNCUtils\r\n {$IFNDEF LCLLIB}\r\n ,Types\r\n {$ENDIF}\r\n {$IFDEF FMXLIB}\r\n ,FMX.Types\r\n {$ENDIF}\r\n ,TypInfo\r\n ;\r\n\r\nconst\r\n MAJ_VER = 1; // Major version nr.\r\n MIN_VER = 0; // Minor version nr.\r\n REL_VER = 3; // Release nr.\r\n BLD_VER = 0; // Build nr.\r\n\r\n //Version history\r\n //v1.0.0.0 : First Release\r\n //v1.0.1.0 : New : Property AllowNumericNullValue added\r\n // : New : Method Clear added\r\n // : Fixed : Issue with OnDateSelected event\r\n //v1.0.1.1 : Fixed : Issue with applying font\r\n //v1.0.1.2 : Fixed : Issue with control color in disabled state\r\n //v1.0.1.3 : Fixed : Issue with keyboard date selection\r\n //v1.0.1.4 : Improved : Exposed Font property\r\n //v1.0.1.5 : Improved : Date validation\r\n // : Improved : Exposed OnValidate event\r\n //v1.0.1.6 : Fixed : Issue with OnDateSelected event triggering before the component is loaded\r\n //v1.0.2.0 : New : Support for high dpi\r\n //v1.0.2.1 : Fixed : Issue with dropdown opening again after date selection in WEB.\r\n //v1.0.2.2 : Fixed : Issue with Font not applied in Editable mode\r\n //v1.0.3.0 : New : Added OnBeforeEditExitValidate event\r\n\r\ntype\r\n TTMSFNCCustomDatePickerDateSelected = procedure(Sender: TObject; ADate: TDate) of object;\r\n TTMSFNCCustomDatePickerValidateEvent = procedure(Sender: TObject; AEditText: string; var ADate: TDateTime; var ADefault: Boolean) of object;\r\n\r\n TTMSFNCCustomDatePickerEditExitValidateEvent = procedure(Sender: TObject; var AAllow: Boolean) of object;\r\n\r\n TTMSFNCDatePickerInteraction = class(TTMSFNCCalendarCustomInteraction)\r\n published\r\n property ReadOnlyMode;\r\n property SwipeOnHeader;\r\n property KeyboardSupport;\r\n property NavigationMode;\r\n end;\r\n\r\n TTMSFNCCustomDatePicker = class(TTMSFNCDefaultPicker, ITMSFNCBitmapContainer)\r\n private\r\n FPrevSelDate: TDate;\r\n FWrapper: TTMSFNCCustomSelector;\r\n FDateSelector: TTMSFNCCalendar;\r\n FOnDateSelected: TTMSFNCCustomDatePickerDateSelected;\r\n FCloseOnSelection: Boolean;\r\n FOnCustomize: TNotifyEvent;\r\n FHeader: TTMSFNCCalendarHeader;\r\n FInteraction: TTMSFNCDatePickerInteraction;\r\n FOnAfterDrawBadge: TTMSFNCCalendarAfterDrawBadgeEvent;\r\n FOnAfterDrawArrowRight: TTMSFNCCalendarAfterDrawArrowRightEvent;\r\n FOnAfterDrawDayNamesText: TTMSFNCCalendarAfterDrawDayNamesTextEvent;\r\n FOnAfterDrawWeekNumbersText: TTMSFNCCalendarAfterDrawWeekNumbersTextEvent;\r\n FOnBeforeDrawHeader: TTMSFNCCalendarBeforeDrawHeaderEvent;\r\n FOnBeforeDrawDayNumbersText: TTMSFNCCalendarBeforeDrawDayNumbersTextEvent;\r\n FOnBeforeDrawFooterText: TTMSFNCCalendarBeforeDrawFooterTextEvent;\r\n FOnBeforeDrawLines: TTMSFNCCalendarBeforeDrawLinesEvent;\r\n FOnAfterDrawDayNames: TTMSFNCCalendarAfterDrawDayNamesEvent;\r\n FOnAfterDrawWeekNumbers: TTMSFNCCalendarAfterDrawWeekNumbersEvent;\r\n FOnAfterDrawHeaderText: TTMSFNCCalendarAfterDrawHeaderTextEvent;\r\n FOnBeforeDrawArrowLeft: TTMSFNCCalendarBeforeDrawArrowLeftEvent;\r\n FOnBeforeDrawDayNumbers: TTMSFNCCalendarBeforeDrawDayNumbersEvent;\r\n FOnBeforeDrawFooter: TTMSFNCCalendarBeforeDrawFooterEvent;\r\n FOnBeforeDrawBadge: TTMSFNCCalendarBeforeDrawBadgeEvent;\r\n FOnAfterDrawHeader: TTMSFNCCalendarAfterDrawHeaderEvent;\r\n FOnBeforeDrawArrowRight: TTMSFNCCalendarBeforeDrawArrowRightEvent;\r\n FOnAfterDrawDayNumbersText: TTMSFNCCalendarAfterDrawDayNumbersTextEvent;\r\n FOnBeforeDrawDayNamesText: TTMSFNCCalendarBeforeDrawDayNamesTextEvent;\r\n FOnBeforeDrawWeekNumbersText: TTMSFNCCalendarBeforeDrawWeekNumbersTextEvent;\r\n FOnAfterDrawFooterText: TTMSFNCCalendarAfterDrawFooterTextEvent;\r\n FOnAfterDrawLines: TTMSFNCCalendarAfterDrawLinesEvent;\r\n FOnAfterDrawArrowLeft: TTMSFNCCalendarAfterDrawArrowLeftEvent;\r\n FOnAfterDrawDayNumbers: TTMSFNCCalendarAfterDrawDayNumbersEvent;\r\n FOnBeforeDrawDayNames: TTMSFNCCalendarBeforeDrawDayNamesEvent;\r\n FOnBeforeDrawWeekNumbers: TTMSFNCCalendarBeforeDrawWeekNumbersEvent;\r\n FOnAfterDrawFooter: TTMSFNCCalendarAfterDrawFooterEvent;\r\n FOnBeforeDrawHeaderText: TTMSFNCCalendarBeforeDrawHeaderTextEvent;\r\n FOnYearChanged: TTMSFNCCalendarYearChangedEvent;\r\n FOnCustomArrowDraw: TTMSFNCCalendarCustomArrowDrawEvent;\r\n FOnMonthChanged: TTMSFNCCalendarMonthChangedEvent;\r\n FOnSelectMultiDate: TTMSFNCCalendarSelectedMultiDateEvent;\r\n FOnBeforeSelectDate: TTMSFNCCalendarBeforeSelectDateEvent;\r\n FOnCustomNavigation: TTMSFNCCalendarCustomNavigationEvent;\r\n FAllowNumericNullValue: Boolean;\r\n FFont: TTMSFNCGraphicsFont;\r\n FOnValidate: TTMSFNCCustomDatePickerValidateEvent;\r\n FOnBeforeEditExitValidate: TTMSFNCCustomDatePickerEditExitValidateEvent;\r\n procedure SetSelectedDate(const Value: TDate);\r\n procedure SetEvents(const Value: TTMSFNCCalendarEvents);\r\n procedure SetWeekNumberAppearance(const Value: TTMSFNCCalendarWeekNumberAppearance);\r\n procedure SetDateAppearance(const Value: TTMSFNCCalendarDateAppearance);\r\n procedure SetDayNameAppearance(const Value: TTMSFNCCalendarDayNameAppearance);\r\n procedure SetLineAppearance(const Value: TTMSFNCCalendarLineAppearance);\r\n procedure SetInteraction(const Value: TTMSFNCDatePickerInteraction);\r\n procedure SetMaxDate(const Value: TDate);\r\n procedure SetMinDate(const Value: TDate);\r\n procedure SetFirstDay(const Value: Integer);\r\n procedure SetHeader(const Value: TTMSFNCCalendarHeader);\r\n procedure SetFooter(const Value: TTMSFNCCalendarFooter);\r\n procedure SetCalendarFill(const Value: TTMSFNCGraphicsFill);\r\n procedure SetCalendarStroke(const Value: TTMSFNCGraphicsStroke);\r\n procedure SetBitmapContainer(const Value: TTMSFNCBitmapContainer);\r\n procedure SetBadgeSize(const Value: Integer);\r\n procedure SetDay(const Value: Integer);\r\n procedure SetMonth(const Value: Integer);\r\n procedure SetYear(const Value: Integer);\r\n procedure SetAllowNumericNullValue(const Value: Boolean);\r\n function GetSelectedDate: TDate;\r\n function GetEvents: TTMSFNCCalendarEvents;\r\n function GetWeekNumberAppearance: TTMSFNCCalendarWeekNumberAppearance;\r\n function GetDateAppearance: TTMSFNCCalendarDateAppearance;\r\n function GetDayNameAppearance: TTMSFNCCalendarDayNameAppearance;\r\n function GetLineAppearance: TTMSFNCCalendarLineAppearance;\r\n function GetMaxDate: TDate;\r\n function GetMinDate: TDate;\r\n function GetFirstDay: Integer;\r\n function GetFooter: TTMSFNCCalendarFooter;\r\n function GetCalendarFill: TTMSFNCGraphicsFill;\r\n function GetCalendarStroke: TTMSFNCGraphicsStroke;\r\n function GetBitmapContainer: TTMSFNCBitmapContainer;\r\n function GetBadgeSize: Integer;\r\n function GetDay: Integer;\r\n function GetMonth: Integer;\r\n function GetYear: Integer;\r\n procedure SetFnt(const Value: TTMSFNCGraphicsFont);\r\n protected\r\n procedure ChangeDPIScale(M, D: Integer); override;\r\n procedure DoDateSelected; virtual;\r\n procedure DoValidate; virtual;\r\n procedure DoEditExit(Sender: TObject); override;\r\n procedure Loaded; override;\r\n procedure FontChange(Sender: TObject);\r\n procedure InitializePopup; override;\r\n procedure ApplyStyle; override;\r\n procedure ResetToDefaultStyle; override;\r\n procedure SetAdaptToStyle(const Value: Boolean); override;\r\n procedure DrawContent(AGraphics: TTMSFNCGraphics; ARect: TRectF); override;\r\n procedure SelectFirstValue; override;\r\n procedure SelectLastValue; override;\r\n procedure SelectNextValue; override;\r\n procedure SelectPreviousValue; override;\r\n procedure EditUp; override;\r\n procedure EditDown; override;\r\n procedure HandleKeyDown(var Key: Word; Shift: TShiftState); override;\r\n procedure SetEditable(const Value: Boolean); override;\r\n procedure UpdateEditText(AText: string); override;\r\n procedure DateSelected(Sender: TObject; ADate: TDate); virtual;\r\n procedure DoBeforeDrawHeader(Sender: TObject; AGraphics: TTMSFNCGraphics; ARect: TRectF; var AAllow: Boolean; var ADefaultDraw: Boolean); virtual;\r\n procedure DoAfterDrawHeader(Sender: TObject; AGraphics: TTMSFNCGraphics; ARect: TRectF); virtual;\r\n procedure DoBeforeDrawHeaderText(Sender: TObject; AGraphics: TTMSFNCGraphics; ARect: TRectF; AText: string; AHorizontalTextAlign, AVerticalTextAlign: TTMSFNCGraphicsTextAlign; var AAllow: Boolean; var ADefaultDraw: Boolean); virtual;\r\n procedure DoAfterDrawHeaderText(Sender: TObject; AGraphics: TTMSFNCGraphics; ARect: TRectF; AText: string; AHorizontalTextAlign, AVerticalTextAlign: TTMSFNCGraphicsTextAlign); virtual;\r\n procedure DoBeforeDrawFooter(Sender: TObject; AGraphics: TTMSFNCGraphics; ARect: TRectF; var AAllow: Boolean; var ADefaultDraw: Boolean); virtual;\r\n procedure DoAfterDrawFooter(Sender: TObject; AGraphics: TTMSFNCGraphics; ARect: TRectF); virtual;\r\n procedure DoBeforeDrawFooterText(Sender: TObject; AGraphics: TTMSFNCGraphics; ARect: TRectF; AText: string; AHorizontalTextAlign, AVerticalTextAlign: TTMSFNCGraphicsTextAlign; var AAllow: Boolean; var ADefaultDraw: Boolean); virtual;\r\n procedure DoAfterDrawFooterText(Sender: TObject; AGraphics: TTMSFNCGraphics; ARect: TRectF; AText: string; AHorizontalTextAlign, AVerticalTextAlign: TTMSFNCGraphicsTextAlign); virtual;\r\n procedure DoBeforeDrawDayNames(Sender: TObject; AGraphics: TTMSFNCGraphics; ARect: TRectF; var AAllow: Boolean; var ADefaultDraw: Boolean); virtual;\r\n procedure DoAfterDrawDayNames(Sender: TObject; AGraphics: TTMSFNCGraphics; ARect: TRectF); virtual;\r\n procedure DoBeforeDrawDayNamesText(Sender: TObject; AGraphics: TTMSFNCGraphics; ARect: TRectF; AText: string; AHorizontalTextAlign, AVerticalTextAlign: TTMSFNCGraphicsTextAlign; var AAllow: Boolean; var ADefaultDraw: Boolean); virtual;\r\n procedure DoAfterDrawDayNamesText(Sender: TObject; AGraphics: TTMSFNCGraphics; ARect: TRectF; AText: string; AHorizontalTextAlign, AVerticalTextAlign: TTMSFNCGraphicsTextAlign); virtual;\r\n procedure DoBeforeDrawDayNumbers(Sender: TObject; AGraphics: TTMSFNCGraphics; ARect: TrectF; ADate: TDate; var AAllow: Boolean; var ADefaultDraw: Boolean); virtual;\r\n procedure DoAfterDrawDayNumbers(Sender: TObject; AGraphics: TTMSFNCGraphics; ARect: TRectF; ADate: TDate); virtual;\r\n procedure DoBeforeDrawDayNumbersText(Sender: TObject; AGraphics: TTMSFNCGraphics; ARect: TRectF; AText: string; AHorizontalTextAlign, AVerticalTextAlign: TTMSFNCGraphicsTextAlign; var AAllow: Boolean; var ADefaultDraw: Boolean); virtual;\r\n procedure DoAfterDrawDayNumbersText(Sender: TObject; AGraphics: TTMSFNCGraphics; ARect: TrectF; AText: string; AHorizontalTextAlign, AVerticalTextAlign: TTMSFNCGraphicsTextAlign); virtual;\r\n procedure DoBeforeDrawLines(Sender: TObject; AGraphics: TTMSFNCGraphics; var AAllow: Boolean; var ADefaultDraw: Boolean); virtual;\r\n procedure DoAfterDrawLines(Sender: TObject; AGraphics: TTMSFNCGraphics); virtual;\r\n procedure DoBeforeDrawWeekNumbers(Sender: TObject; AGraphics: TTMSFNCGraphics; ARect: TRectF; var AAllow: Boolean; var ADefaultDraw: Boolean); virtual;\r\n procedure DoAfterDrawWeekNumbers(Sender: TObject; AGraphics: TTMSFNCGraphics; ARect: TRectF); virtual;\r\n procedure DoBeforeDrawWeekNumbersText(Sender: TObject; AGraphics: TTMSFNCGraphics; ARect: TRectF; AText: string; AHorizontalTextAlign, AVerticalTextAlign: TTMSFNCGraphicsTextAlign; var AAllow: Boolean; var ADefaultDraw: Boolean); virtual;\r\n procedure DoAfterDrawWeekNumbersText(Sender: TObject; AGraphics: TTMSFNCGraphics; ARect: TrectF; AText: string; AHorizontalTextAlign, AVerticalTextAlign: TTMSFNCGraphicsTextAlign); virtual;\r\n procedure DoBeforeDrawBadge(Sender: TObject; AGraphics: TTMSFNCGraphics; ARect: TRectF; ABadge: TTMSFNCCalendarEventItem; var AAllow: Boolean; var ADefaultDraw: Boolean); virtual;\r\n procedure DoAfterDrawBadge(Sender: TObject; AGraphics: TTMSFNCGraphics; ARect: TRectF; ABadge: TTMSFNCCalendarEventItem); virtual;\r\n procedure DoBeforeDrawArrowLeft(Sender: TObject; AGraphics: TTMSFNCGraphics; AArrowRect: TRectF; var AAllow: Boolean; var ADefaultDraw: Boolean); virtual;\r\n procedure DoAfterDrawArrowLeft(Sender: TObject; AGraphics: TTMSFNCGraphics; AArrowRect: TRectF); virtual;\r\n procedure DoBeforeDrawArrowRight(Sender: TObject; AGraphics: TTMSFNCGraphics; AArrowRect: TRectF; var AAllow: Boolean; var ADefaultDraw: Boolean); virtual;\r\n procedure DoAfterDrawArrowRight(Sender: TObject; AGraphics: TTMSFNCGraphics; AArrowRect: TRectF); virtual;\r\n procedure DoBeforeSelectDate(Sender: TObject; ADate: TDate); virtual;\r\n procedure DoSelectMultiDate(Sender: TObject; AStartDate: TDate; AEndDate: TDate); virtual;\r\n procedure DoChangeYear(Sender: TObject; AYear: Integer); virtual;\r\n procedure DoChangeMonth(Sender: TObject; AMonth: Integer); virtual;\r\n procedure DoCustomNavigation(Sender: TObject; ADate: TDate; AFocusedDate: TDate; ADirection: Boolean); virtual;\r\n procedure DoCustomArrowDraw(Sender: TObject; AGraphics: TTMSFNCGraphics; ARect: TRectF; ADirection: Boolean); virtual;\r\n procedure DoBeforeEditExitValidate(var AAllow: Boolean); virtual;\r\n function IsAppearanceProperty({%H-}AObject: TObject; {%H-}APropertyName: string; {%H-}APropertyType: TTypeKind): Boolean; override;\r\n function GetVersion: string; override;\r\n function CreateSelector: TTMSFNCCustomSelector; override;\r\n function GetFocusedControl: TControl; override;\r\n property AllowNumericNullValue: Boolean read FAllowNumericNullValue write SetAllowNumericNullValue default True;\r\n property CloseOnSelection: Boolean read FCloseOnSelection write FCloseOnSelection default True;\r\n property OnDateSelected: TTMSFNCCustomDatePickerDateSelected read FOnDateSelected write FOnDateSelected;\r\n property SelectedDate: TDate read GetSelectedDate write SetSelectedDate;\r\n property OnCustomize: TNotifyEvent read FOnCustomize write FOnCustomize;\r\n property WeekNumberAppearance: TTMSFNCCalendarWeekNumberAppearance read GetWeekNumberAppearance write SetWeekNumberAppearance;\r\n property DayNameAppearance: TTMSFNCCalendarDayNameAppearance read GetDayNameAppearance write SetDayNameAppearance;\r\n property DateAppearance: TTMSFNCCalendarDateAppearance read GetDateAppearance write SetDateAppearance;\r\n property LineAppearance: TTMSFNCCalendarLineAppearance read GetLineAppearance write SetLineAppearance;\r\n property Interaction: TTMSFNCDatePickerInteraction read FInteraction write SetInteraction;\r\n property CalendarFill: TTMSFNCGraphicsFill read GetCalendarFill write SetCalendarFill;\r\n property CalendarStroke: TTMSFNCGraphicsStroke read GetCalendarStroke write SetCalendarStroke;\r\n property Events: TTMSFNCCalendarEvents read GetEvents write SetEvents;\r\n property BadgeSize: Integer read GetBadgeSize write SetBadgeSize;\r\n property FirstDay: Integer read GetFirstDay write SetFirstDay;\r\n property Header: TTMSFNCCalendarHeader read FHeader write SetHeader;\r\n property Footer: TTMSFNCCalendarFooter read GetFooter write SetFooter;\r\n property MaxDate: TDate read GetMaxDate write SetMaxDate;\r\n property MinDate: TDate read GetMinDate write SetMinDate;\r\n property Font: TTMSFNCGraphicsFont read FFont write SetFnt;\r\n property BitmapContainer: TTMSFNCBitmapContainer read GetBitmapContainer write SetBitmapContainer;\r\n property OnBeforeDrawHeader: TTMSFNCCalendarBeforeDrawHeaderEvent read FOnBeforeDrawHeader write FOnBeforeDrawHeader;\r\n property OnAfterDrawHeader: TTMSFNCCalendarAfterDrawHeaderEvent read FOnAfterDrawHeader write FOnAfterDrawHeader;\r\n property OnBeforeDrawHeaderText: TTMSFNCCalendarBeforeDrawHeaderTextEvent read FOnBeforeDrawHeaderText write FOnBeforeDrawHeaderText;\r\n property OnAfterDrawHeaderText: TTMSFNCCalendarAfterDrawHeaderTextEvent read FOnAfterDrawHeaderText write FOnAfterDrawHeaderText;\r\n property OnBeforeDrawFooter: TTMSFNCCalendarBeforeDrawFooterEvent read FOnBeforeDrawFooter write FOnBeforeDrawFooter;\r\n property OnAfterDrawFooter: TTMSFNCCalendarAfterDrawFooterEvent read FOnAfterDrawFooter write FOnAfterDrawFooter;\r\n property OnBeforeDrawFooterText: TTMSFNCCalendarBeforeDrawFooterTextEvent read FOnBeforeDrawFooterText write FOnBeforeDrawFooterText;\r\n property OnAfterDrawFooterText: TTMSFNCCalendarAfterDrawFooterTextEvent read FOnAfterDrawFooterText write FOnAfterDrawFooterText;\r\n property OnBeforeDrawDayNames: TTMSFNCCalendarBeforeDrawDayNamesEvent read FOnBeforeDrawDayNames write FOnBeforeDrawDayNames;\r\n property OnAfterDrawDayNames: TTMSFNCCalendarAfterDrawDayNamesEvent read FOnAfterDrawDayNames write FOnAfterDrawDayNames;\r\n property OnBeforeDrawDayNamesText: TTMSFNCCalendarBeforeDrawDayNamesTextEvent read FOnBeforeDrawDayNamesText write FOnBeforeDrawDayNamesText;\r\n property OnAfterDrawDayNamesText: TTMSFNCCalendarAfterDrawDayNamesTextEvent read FOnAfterDrawDayNamesText write FOnAfterDrawDayNamesText;\r\n property OnBeforeDrawDayNumbers: TTMSFNCCalendarBeforeDrawDayNumbersEvent read FOnBeforeDrawDayNumbers write FOnBeforeDrawDayNumbers;\r\n property OnAfterDrawDayNumbers: TTMSFNCCalendarAfterDrawDayNumbersEvent read FOnAfterDrawDayNumbers write FOnAfterDrawDayNumbers;\r\n property OnBeforeDrawDayNumbersText: TTMSFNCCalendarBeforeDrawDayNumbersTextEvent read FOnBeforeDrawDayNumbersText write FOnBeforeDrawDayNumbersText;\r\n property OnAfterDrawDayNumbersText: TTMSFNCCalendarAfterDrawDayNumbersTextEvent read FOnAfterDrawDayNumbersText write FOnAfterDrawDayNumbersText;\r\n property OnBeforeDrawLines: TTMSFNCCalendarBeforeDrawLinesEvent read FOnBeforeDrawLines write FOnBeforeDrawLines;\r\n property OnAfterDrawLines: TTMSFNCCalendarAfterDrawLinesEvent read FOnAfterDrawLines write FOnAfterDrawLines;\r\n property OnBeforeDrawWeekNumbers: TTMSFNCCalendarBeforeDrawWeekNumbersEvent read FOnBeforeDrawWeekNumbers write FOnBeforeDrawWeekNumbers;\r\n property OnAfterDrawWeekNumbers: TTMSFNCCalendarAfterDrawWeekNumbersEvent read FOnAfterDrawWeekNumbers write FOnAfterDrawWeekNumbers;\r\n property OnBeforeDrawWeekNumbersText: TTMSFNCCalendarBeforeDrawWeekNumbersTextEvent read FOnBeforeDrawWeekNumbersText write FOnBeforeDrawWeekNumbersText;\r\n property OnAfterDrawWeekNumbersText: TTMSFNCCalendarAfterDrawWeekNumbersTextEvent read FOnAfterDrawWeekNumbersText write FOnAfterDrawWeekNumbersText;\r\n property OnBeforeDrawBadge: TTMSFNCCalendarBeforeDrawBadgeEvent read FOnBeforeDrawBadge write FOnBeforeDrawBadge;\r\n property OnAfterDrawBadge: TTMSFNCCalendarAfterDrawBadgeEvent read FOnAfterDrawBadge write FOnAfterDrawBadge;\r\n property OnBeforeDrawArrowLeft: TTMSFNCCalendarBeforeDrawArrowLeftEvent read FOnBeforeDrawArrowLeft write FOnBeforeDrawArrowLeft;\r\n property OnAfterDrawArrowLeft: TTMSFNCCalendarAfterDrawArrowLeftEvent read FOnAfterDrawArrowLeft write FOnAfterDrawArrowLeft;\r\n property OnBeforeDrawArrowRight: TTMSFNCCalendarBeforeDrawArrowRightEvent read FOnBeforeDrawArrowRight write FOnBeforeDrawArrowRight;\r\n property OnAfterDrawArrowRight: TTMSFNCCalendarAfterDrawArrowRightEvent read FOnAfterDrawArrowRight write FOnAfterDrawArrowRight;\r\n property OnBeforeSelectDate: TTMSFNCCalendarBeforeSelectDateEvent read FOnBeforeSelectDate write FOnBeforeSelectDate;\r\n property OnSelectMultiDate: TTMSFNCCalendarSelectedMultiDateEvent read FOnSelectMultiDate write FOnSelectMultiDate;\r\n property OnYearChanged: TTMSFNCCalendarYearChangedEvent read FOnYearChanged write FOnYearChanged;\r\n property OnMonthChanged: TTMSFNCCalendarMonthChangedEvent read FOnMonthChanged write FOnMonthChanged;\r\n property OnCustomNavigation: TTMSFNCCalendarCustomNavigationEvent read FOnCustomNavigation write FOnCustomNavigation;\r\n property OnCustomArrowDraw: TTMSFNCCalendarCustomArrowDrawEvent read FOnCustomArrowDraw write FOnCustomArrowDraw;\r\n property OnValidate: TTMSFNCCustomDatePickerValidateEvent read FOnValidate write FOnValidate;\r\n property OnBeforeEditExitValidate: TTMSFNCCustomDatePickerEditExitValidateEvent read FOnBeforeEditExitValidate write FOnBeforeEditExitValidate;\r\n public\r\n constructor Create(AOwner: TComponent); override;\r\n destructor Destroy; override;\r\n procedure Clear;\r\n property Day: Integer read GetDay write SetDay;\r\n property Month: Integer read GetMonth write SetMonth;\r\n property Year: Integer read GetYear write SetYear;\r\n end;\r\n\r\n {$IFNDEF LCLLIB}\r\n [ComponentPlatformsAttribute(TMSPlatformsWeb)]\r\n {$ENDIF}\r\n TTMSFNCDatePicker = class(TTMSFNCCustomDatePicker)\r\n protected\r\n procedure RegisterRuntimeClasses; override;\r\n published\r\n property AllowNumericNullValue;\r\n property BitmapContainer;\r\n property Editable;\r\n property FirstDay;\r\n property MaxDate;\r\n property MinDate;\r\n property Events;\r\n property BadgeSize;\r\n property Header;\r\n property Footer;\r\n property Font;\r\n property Interaction;\r\n property DropDownWidth;\r\n property DropDownHeight;\r\n property CloseOnSelection;\r\n property OnDateSelected;\r\n property SelectedDate;\r\n property WeekNumberAppearance;\r\n property DateAppearance;\r\n property DayNameAppearance;\r\n property LineAppearance;\r\n property CalendarFill;\r\n property CalendarStroke;\r\n property OnCustomize;\r\n property OnBeforeDrawHeader;\r\n property OnAfterDrawHeader;\r\n property OnBeforeDrawFooter;\r\n property OnAfterDrawFooter;\r\n property OnBeforeDrawDayNames;\r\n property OnAfterDrawDayNames;\r\n property OnBeforeDrawDayNumbers;\r\n property OnAfterDrawDayNumbers;\r\n property OnBeforeDrawLines;\r\n property OnAfterDrawLines;\r\n property OnBeforeDrawWeekNumbers;\r\n property OnAfterDrawWeekNumbers;\r\n property OnBeforeDrawArrowLeft;\r\n property OnAfterDrawArrowLeft;\r\n property OnBeforeDrawArrowRight;\r\n property OnAfterDrawArrowRight;\r\n property OnBeforeDrawBadge;\r\n property OnAfterDrawBadge;\r\n property OnBeforeDrawHeaderText;\r\n property OnAfterDrawHeaderText;\r\n property OnBeforeDrawFooterText;\r\n property OnAfterDrawFooterText;\r\n property OnBeforeDrawDayNamesText;\r\n property OnAfterDrawDayNamesText;\r\n property OnBeforeDrawDayNumbersText;\r\n property OnAfterDrawDayNumbersText;\r\n property OnBeforeDrawWeekNumbersText;\r\n property OnAfterDrawWeekNumbersText;\r\n property OnBeforeSelectDate;\r\n property OnSelectMultiDate;\r\n property OnYearChanged;\r\n property OnMonthChanged;\r\n property OnCustomNavigation;\r\n property OnCustomArrowDraw;\r\n property OnValidate;\r\n property OnBeforeEditExitValidate;\r\n end;\r\n\r\nimplementation\r\n\r\nuses\r\n DateUtils, SysUtils\r\n {$IFDEF FMXLIB}\r\n ,FMX.Edit\r\n {$ENDIF}\r\n {$IFDEF VCLLIB}\r\n , VCL.Graphics\r\n {$ENDIF}\r\n ;\r\n\r\ntype\r\n TCustomEditProtected = class(TCustomEdit);\r\n TTMSFNCCustomSelectorOpen = class(TTMSFNCCustomSelector);\r\n\r\n{ TTMSFNCCustomDatePicker }\r\n\r\nprocedure TTMSFNCCustomDatePicker.ApplyStyle;\r\nvar\r\n c: TTMSFNCGraphicsColor;\r\nbegin\r\n inherited;\r\n c := gcNull;\r\n if TTMSFNCStyles.GetStyleHeaderFillColor(c) then\r\n FHeader.Fill.Color := c;\r\n\r\n c := gcNull;\r\n if TTMSFNCStyles.GetStyleHeaderFillColorTo(c) then\r\n begin\r\n FHeader.Fill.Kind := gfkGradient;\r\n FHeader.Fill.ColorTo := c;\r\n end;\r\n\r\n c := gcNull;\r\n if TTMSFNCStyles.GetStyleLineFillColor(c) then\r\n begin\r\n Header.Stroke.Color := c;\r\n Header.Arrow.Color := c;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomDatePicker.ChangeDPIScale(M, D: Integer);\r\nbegin\r\n inherited;\r\n BeginUpdate;\r\n\r\n Font.Height := TTMSFNCUtils.MulDivInt(FFont.Height, M, D);\r\n Header.Font.Height := TTMSFNCUtils.MulDivInt(Header.Font.Height, M, D);\r\n Header.Height := TTMSFNCUtils.MulDivInt(Header.Height, M, D);\r\n {$IFDEF CMNLIB}\r\n Edit.Font.Height := FFont.Height;\r\n {$ENDIF}\r\n\r\n EndUpdate;\r\nend;\r\n\r\nprocedure TTMSFNCCustomDatePicker.Clear;\r\nbegin\r\n SelectedDate := 0;\r\n Invalidate;\r\nend;\r\n\r\nconstructor TTMSFNCCustomDatePicker.Create(AOwner: TComponent);\r\nbegin\r\n inherited;\r\n SelectedDate := Int(Now);\r\n FHeader := TTMSFNCCalendarHeader.Create(Self);\r\n FInteraction := TTMSFNCDatePickerInteraction.Create;\r\n FCloseOnSelection := True;\r\n FAllowNumericNullValue := True;\r\n FFont := TTMSFNCGraphicsFont.Create;\r\n FFont.OnChanged := @FontChange;\r\n Width := 90;\r\n DropDownWidth := 200;\r\n DropDownHeight := 180;\r\n {$IFDEF FMXLIB}\r\n Edit.StyledSettings := TCustomEditProtected(Edit).StyledSettings - [TStyledSetting.Family, TStyledSetting.Size, TStyledSetting.Style];\r\n {$IFDEF ANDROID}\r\n Edit.TextSettings.VertAlign := TTextAlign.Leading;\r\n {$ENDIF}\r\n {$ENDIF}\r\n {$IFDEF CMNLIB}\r\n Edit.Font.Height := FFont.Height;\r\n {$ENDIF}\r\nend;\r\n\r\nfunction TTMSFNCCustomDatePicker.CreateSelector: TTMSFNCCustomSelector;\r\nbegin\r\n FWrapper := TTMSFNCCustomSelector.Create(Self);\r\n FDateSelector := TTMSFNCCalendar.Create(FWrapper);\r\n FDateSelector.Parent := FWrapper;\r\n\r\n FDateSelector.OnSelectDate := DateSelected;\r\n FDateSelector.OnBeforeDrawHeader := DoBeforeDrawHeader;\r\n FDateSelector.OnAfterDrawHeader := DoAfterDrawHeader;\r\n FDateSelector.OnBeforeDrawFooter := DoBeforeDrawFooter;\r\n FDateSelector.OnAfterDrawFooter := DoAfterDrawFooter;\r\n FDateSelector.OnBeforeDrawDayNames := DoBeforeDrawDayNames;\r\n FDateSelector.OnAfterDrawDayNames := DoAfterDrawDayNames;\r\n FDateSelector.OnBeforeDrawDayNumbers := DoBeforeDrawDayNumbers;\r\n FDateSelector.OnAfterDrawDayNumbers := DoAfterDrawDayNumbers;\r\n FDateSelector.OnBeforeDrawLines := DoBeforeDrawLines;\r\n FDateSelector.OnAfterDrawLines := DoAfterDrawLines;\r\n FDateSelector.OnBeforeDrawWeekNumbers := DoBeforeDrawWeekNumbers;\r\n FDateSelector.OnAfterDrawWeekNumbers := DoAfterDrawWeekNumbers;\r\n FDateSelector.OnBeforeDrawArrowLeft := DoBeforeDrawArrowLeft;\r\n FDateSelector.OnAfterDrawArrowLeft := DoAfterDrawArrowLeft;\r\n FDateSelector.OnBeforeDrawArrowRight := DoBeforeDrawArrowRight;\r\n FDateSelector.OnAfterDrawArrowRight := DoAfterDrawArrowRight;\r\n FDateSelector.OnBeforeDrawBadge := DoBeforeDrawBadge;\r\n FDateSelector.OnAfterDrawBadge := DoAfterDrawBadge;\r\n FDateSelector.OnBeforeDrawHeaderText := DoBeforeDrawHeaderText;\r\n FDateSelector.OnAfterDrawHeaderText := DoAfterDrawHeaderText;\r\n FDateSelector.OnBeforeDrawFooterText := DoBeforeDrawFooterText;\r\n FDateSelector.OnAfterDrawFooterText := DoAfterDrawFooterText;\r\n FDateSelector.OnBeforeDrawDayNamesText := DoBeforeDrawDayNamesText;\r\n FDateSelector.OnAfterDrawDayNamesText := DoAfterDrawDayNamesText;\r\n FDateSelector.OnBeforeDrawDayNumbersText := DoBeforeDrawDayNumbersText;\r\n FDateSelector.OnAfterDrawDayNumbersText := DoAfterDrawDayNumbersText;\r\n FDateSelector.OnBeforeDrawWeekNumbersText := DoBeforeDrawWeekNumbersText;\r\n FDateSelector.OnAfterDrawWeekNumbersText := DoAfterDrawWeekNumbersText;\r\n FDateSelector.OnBeforeSelectDate := DoBeforeSelectDate;\r\n FDateSelector.OnSelectMultiDate := DoSelectMultiDate;\r\n FDateSelector.OnYearChanged := DoChangeYear;\r\n FDateSelector.OnMonthChanged := DoChangeMonth;\r\n FDateSelector.OnCustomNavigation := DoCustomNavigation;\r\n FDateSelector.OnCustomArrowDraw := DoCustomArrowDraw;\r\n\r\n Result := FWrapper;\r\nend;\r\n\r\nprocedure TTMSFNCCustomDatePicker.DateSelected(Sender: TObject; ADate: TDate);\r\nbegin\r\n if Editable and Edit.IsFocused then\r\n PreventDropDown := True;\r\n\r\n if CloseOnSelection then\r\n DropDown;\r\n\r\n SelectedDate := FDateSelector.SelectedDate;\r\n\r\n DoDateSelected;\r\nend;\r\n\r\ndestructor TTMSFNCCustomDatePicker.Destroy;\r\nbegin\r\n FFont.Free;\r\n FHeader.Free;\r\n FInteraction.Free;\r\n inherited;\r\nend;\r\n\r\nprocedure TTMSFNCCustomDatePicker.DoAfterDrawArrowLeft(Sender: TObject;\r\n AGraphics: TTMSFNCGraphics; AArrowRect: TRectF);\r\nbegin\r\n if Assigned(OnAfterDrawArrowLeft) then\r\n OnAfterDrawArrowLeft(Self, AGraphics, AArrowRect);\r\nend;\r\n\r\nprocedure TTMSFNCCustomDatePicker.DoAfterDrawArrowRight(Sender: TObject;\r\n AGraphics: TTMSFNCGraphics; AArrowRect: TRectF);\r\nbegin\r\n if Assigned(OnAfterDrawArrowRight) then\r\n OnAfterDrawArrowRight(Self, AGraphics, AArrowRect);\r\nend;\r\n\r\nprocedure TTMSFNCCustomDatePicker.DoAfterDrawBadge(Sender: TObject;\r\n AGraphics: TTMSFNCGraphics; ARect: TRectF; ABadge: TTMSFNCCalendarEventItem);\r\nbegin\r\n if Assigned(OnAfterDrawBadge) then\r\n OnAfterDrawBadge(Self, AGraphics, ARect, ABadge);\r\nend;\r\n\r\nprocedure TTMSFNCCustomDatePicker.DoAfterDrawDayNames(Sender: TObject;\r\n AGraphics: TTMSFNCGraphics; ARect: TRectF);\r\nbegin\r\n if Assigned(OnAfterDrawDayNames) then\r\n OnAfterDrawDayNames(Self, AGraphics, ARect);\r\nend;\r\n\r\nprocedure TTMSFNCCustomDatePicker.DoAfterDrawDayNamesText(Sender: TObject;\r\n AGraphics: TTMSFNCGraphics; ARect: TRectF; AText: string;\r\n AHorizontalTextAlign, AVerticalTextAlign: TTMSFNCGraphicsTextAlign);\r\nbegin\r\n if Assigned(OnAfterDrawDayNamesText) then\r\n OnAfterDrawDayNamesText(Self, AGraphics, ARect, AText, AHorizontalTextAlign, AVerticalTextAlign);\r\nend;\r\n\r\nprocedure TTMSFNCCustomDatePicker.DoAfterDrawDayNumbers(Sender: TObject;\r\n AGraphics: TTMSFNCGraphics; ARect: TRectF; ADate: TDate);\r\nbegin\r\n if Assigned(OnAfterDrawDayNumbers) then\r\n OnAfterDrawDayNumbers(Self, AGraphics, ARect, ADate);\r\nend;\r\n\r\nprocedure TTMSFNCCustomDatePicker.DoAfterDrawDayNumbersText(Sender: TObject;\r\n AGraphics: TTMSFNCGraphics; ARect: TrectF; AText: string;\r\n AHorizontalTextAlign, AVerticalTextAlign: TTMSFNCGraphicsTextAlign);\r\nbegin\r\n if Assigned(OnAfterDrawDayNumbersText) then\r\n OnAfterDrawDayNumbersText(Self, AGraphics, ARect, AText, AHorizontalTextAlign, AVerticalTextAlign);\r\nend;\r\n\r\nprocedure TTMSFNCCustomDatePicker.DoAfterDrawFooter(Sender: TObject;\r\n AGraphics: TTMSFNCGraphics; ARect: TRectF);\r\nbegin\r\n if Assigned(OnAfterDrawFooter) then\r\n OnAfterDrawFooter(Self, AGraphics, ARect);\r\nend;\r\n\r\nprocedure TTMSFNCCustomDatePicker.DoAfterDrawFooterText(Sender: TObject;\r\n AGraphics: TTMSFNCGraphics; ARect: TRectF; AText: string;\r\n AHorizontalTextAlign, AVerticalTextAlign: TTMSFNCGraphicsTextAlign);\r\nbegin\r\n if Assigned(OnAfterDrawFooterText) then\r\n OnAfterDrawFooterText(Self, AGraphics, ARect, AText, AHorizontalTextAlign, AVerticalTextAlign);\r\nend;\r\n\r\nprocedure TTMSFNCCustomDatePicker.DoAfterDrawHeader(Sender: TObject;\r\n AGraphics: TTMSFNCGraphics; ARect: TRectF);\r\nbegin\r\n if Assigned(OnAfterDrawHeader) then\r\n OnAfterDrawHeader(Self, AGraphics, ARect);\r\nend;\r\n\r\nprocedure TTMSFNCCustomDatePicker.DoAfterDrawHeaderText(Sender: TObject;\r\n AGraphics: TTMSFNCGraphics; ARect: TRectF; AText: string;\r\n AHorizontalTextAlign, AVerticalTextAlign: TTMSFNCGraphicsTextAlign);\r\nbegin\r\n if Assigned(OnAfterDrawHeaderText) then\r\n OnAfterDrawHeaderText(Self, AGraphics, ARect, AText, AHorizontalTextAlign, AVerticalTextAlign);\r\nend;\r\n\r\nprocedure TTMSFNCCustomDatePicker.DoAfterDrawLines(Sender: TObject; AGraphics: TTMSFNCGraphics);\r\nbegin\r\n if Assigned(OnAfterDrawLines) then\r\n OnAfterDrawLines(Self, AGraphics);\r\nend;\r\n\r\nprocedure TTMSFNCCustomDatePicker.DoAfterDrawWeekNumbers(Sender: TObject;\r\n AGraphics: TTMSFNCGraphics; ARect: TRectF);\r\nbegin\r\n if Assigned(OnAfterDrawWeekNumbers) then\r\n OnAfterDrawWeekNumbers(Self, AGraphics, ARect);\r\nend;\r\n\r\nprocedure TTMSFNCCustomDatePicker.DoAfterDrawWeekNumbersText(Sender: TObject;\r\n AGraphics: TTMSFNCGraphics; ARect: TrectF; AText: string;\r\n AHorizontalTextAlign, AVerticalTextAlign: TTMSFNCGraphicsTextAlign);\r\nbegin\r\n if Assigned(OnAfterDrawWeekNumbersText) then\r\n OnAfterDrawWeekNumbersText(Self, AGraphics, ARect, AText, AHorizontalTextAlign, AVerticalTextAlign);\r\nend;\r\n\r\nprocedure TTMSFNCCustomDatePicker.DoBeforeDrawArrowLeft(Sender: TObject;\r\n AGraphics: TTMSFNCGraphics; AArrowRect: TRectF; var AAllow,\r\n ADefaultDraw: Boolean);\r\nbegin\r\n if Assigned(OnBeforeDrawArrowLeft) then\r\n OnBeforeDrawArrowLeft(Self, AGraphics, AArrowRect, AAllow, ADefaultDraw);\r\nend;\r\n\r\nprocedure TTMSFNCCustomDatePicker.DoBeforeDrawArrowRight(Sender: TObject;\r\n AGraphics: TTMSFNCGraphics; AArrowRect: TRectF; var AAllow,\r\n ADefaultDraw: Boolean);\r\nbegin\r\n if Assigned(OnBeforeDrawArrowRight) then\r\n OnBeforeDrawArrowRight(Self, AGraphics, AArrowRect, AAllow, ADefaultDraw);\r\nend;\r\n\r\nprocedure TTMSFNCCustomDatePicker.DoBeforeDrawBadge(Sender: TObject;\r\n AGraphics: TTMSFNCGraphics; ARect: TRectF; ABadge: TTMSFNCCalendarEventItem;\r\n var AAllow, ADefaultDraw: Boolean);\r\nbegin\r\n if Assigned(OnBeforeDrawBadge) then\r\n OnBeforeDrawBadge(Self, AGraphics, ARect, ABadge, AAllow, ADefaultDraw);\r\nend;\r\n\r\nprocedure TTMSFNCCustomDatePicker.DoBeforeDrawDayNames(Sender: TObject;\r\n AGraphics: TTMSFNCGraphics; ARect: TRectF; var AAllow, ADefaultDraw: Boolean);\r\nbegin\r\n if Assigned(OnBeforeDrawDayNames) then\r\n OnBeforeDrawDayNames(Self, AGraphics, ARect, AAllow, ADefaultDraw);\r\nend;\r\n\r\nprocedure TTMSFNCCustomDatePicker.DoBeforeDrawDayNamesText(Sender: TObject;\r\n AGraphics: TTMSFNCGraphics; ARect: TRectF; AText: string;\r\n AHorizontalTextAlign, AVerticalTextAlign: TTMSFNCGraphicsTextAlign;\r\n var AAllow, ADefaultDraw: Boolean);\r\nbegin\r\n if Assigned(OnBeforeDrawDayNamesText) then\r\n OnBeforeDrawDayNamesText(Self, AGraphics, ARect, AText, AHorizontalTextAlign, AVerticalTextAlign, AAllow, ADefaultDraw);\r\nend;\r\n\r\nprocedure TTMSFNCCustomDatePicker.DoBeforeDrawDayNumbers(Sender: TObject;\r\n AGraphics: TTMSFNCGraphics; ARect: TrectF; ADate: TDate; var AAllow,\r\n ADefaultDraw: Boolean);\r\nbegin\r\n if Assigned(OnBeforeDrawDayNumbers) then\r\n OnBeforeDrawDayNumbers(Self, AGraphics, ARect, ADate, AAllow, ADefaultDraw);\r\nend;\r\n\r\nprocedure TTMSFNCCustomDatePicker.DoBeforeDrawDayNumbersText(Sender: TObject;\r\n AGraphics: TTMSFNCGraphics; ARect: TRectF; AText: string;\r\n AHorizontalTextAlign, AVerticalTextAlign: TTMSFNCGraphicsTextAlign;\r\n var AAllow, ADefaultDraw: Boolean);\r\nbegin\r\n if Assigned(OnBeforeDrawDayNumbersText) then\r\n OnBeforeDrawDayNumbersText(Self, AGraphics, ARect, AText, AHorizontalTextAlign, AVerticalTextAlign, AAllow, ADefaultDraw);\r\nend;\r\n\r\nprocedure TTMSFNCCustomDatePicker.DoBeforeDrawFooter(Sender: TObject;\r\n AGraphics: TTMSFNCGraphics; ARect: TRectF; var AAllow, ADefaultDraw: Boolean);\r\nbegin\r\n if Assigned(OnBeforeDrawFooter) then\r\n OnBeforeDrawFooter(Self, AGraphics, ARect, AAllow, ADefaultDraw);\r\nend;\r\n\r\nprocedure TTMSFNCCustomDatePicker.DoBeforeDrawFooterText(Sender: TObject;\r\n AGraphics: TTMSFNCGraphics; ARect: TRectF; AText: string;\r\n AHorizontalTextAlign, AVerticalTextAlign: TTMSFNCGraphicsTextAlign;\r\n var AAllow, ADefaultDraw: Boolean);\r\nbegin\r\n if Assigned(OnBeforeDrawFooterText) then\r\n OnBeforeDrawFooterText(Self, AGraphics, ARect, AText, AHorizontalTextAlign, AVerticalTextAlign, AAllow, ADefaultDraw);\r\nend;\r\n\r\nprocedure TTMSFNCCustomDatePicker.DoBeforeDrawHeader(Sender: TObject;\r\n AGraphics: TTMSFNCGraphics; ARect: TRectF; var AAllow, ADefaultDraw: Boolean);\r\nbegin\r\n if Assigned(OnBeforeDrawHeader) then\r\n OnBeforeDrawHeader(Self, AGraphics, ARect, AAllow, ADefaultDraw);\r\nend;\r\n\r\nprocedure TTMSFNCCustomDatePicker.DoBeforeDrawHeaderText(Sender: TObject;\r\n AGraphics: TTMSFNCGraphics; ARect: TRectF; AText: string;\r\n AHorizontalTextAlign, AVerticalTextAlign: TTMSFNCGraphicsTextAlign;\r\n var AAllow, ADefaultDraw: Boolean);\r\nbegin\r\n if Assigned(OnBeforeDrawHeaderText) then\r\n OnBeforeDrawHeaderText(Self, AGraphics, ARect, AText, AHorizontalTextAlign, AVerticalTextAlign, AAllow, ADefaultDraw);\r\nend;\r\n\r\nprocedure TTMSFNCCustomDatePicker.DoBeforeDrawLines(Sender: TObject;\r\n AGraphics: TTMSFNCGraphics; var AAllow, ADefaultDraw: Boolean);\r\nbegin\r\n if Assigned(OnBeforeDrawLines) then\r\n OnBeforeDrawLines(Self, AGraphics, AAllow, ADefaultDraw);\r\nend;\r\n\r\nprocedure TTMSFNCCustomDatePicker.DoBeforeDrawWeekNumbers(Sender: TObject;\r\n AGraphics: TTMSFNCGraphics; ARect: TRectF; var AAllow, ADefaultDraw: Boolean);\r\nbegin\r\n if Assigned(OnBeforeDrawWeekNumbers) then\r\n OnBeforeDrawWeekNumbers(Self, AGraphics, ARect, AAllow, ADefaultDraw);\r\nend;\r\n\r\nprocedure TTMSFNCCustomDatePicker.DoBeforeDrawWeekNumbersText(Sender: TObject;\r\n AGraphics: TTMSFNCGraphics; ARect: TRectF; AText: string;\r\n AHorizontalTextAlign, AVerticalTextAlign: TTMSFNCGraphicsTextAlign;\r\n var AAllow, ADefaultDraw: Boolean);\r\nbegin\r\n if Assigned(OnBeforeDrawWeekNumbersText) then\r\n OnBeforeDrawWeekNumbersText(Self, AGraphics, ARect, AText, AHorizontalTextAlign, AVerticalTextAlign, AAllow, ADefaultDraw);\r\nend;\r\n\r\nprocedure TTMSFNCCustomDatePicker.DoBeforeEditExitValidate(var AAllow: Boolean);\r\nbegin\r\n if Assigned(OnBeforeEditExitValidate) then\r\n OnBeforeEditExitValidate(Self, AAllow);\r\nend;\r\n\r\nprocedure TTMSFNCCustomDatePicker.DoBeforeSelectDate(Sender: TObject;\r\n ADate: TDate);\r\nbegin\r\n if Assigned(OnBeforeSelectDate) then\r\n OnBeforeSelectDate(Self, ADate);\r\nend;\r\n\r\nprocedure TTMSFNCCustomDatePicker.DoChangeMonth(Sender: TObject;\r\n AMonth: Integer);\r\nbegin\r\n if Assigned(OnMonthChanged) then\r\n OnMonthChanged(Self, AMonth);\r\nend;\r\n\r\nprocedure TTMSFNCCustomDatePicker.DoChangeYear(Sender: TObject; AYear: Integer);\r\nbegin\r\n if Assigned(OnYearChanged) then\r\n OnYearChanged(Self, AYear);\r\nend;\r\n\r\nprocedure TTMSFNCCustomDatePicker.DoCustomArrowDraw(Sender: TObject;\r\n AGraphics: TTMSFNCGraphics; ARect: TRectF; ADirection: Boolean);\r\nbegin\r\n if Assigned(OnCustomArrowDraw) then\r\n OnCustomArrowDraw(Self, AGraphics, ARect, ADirection);\r\nend;\r\n\r\nprocedure TTMSFNCCustomDatePicker.DoCustomNavigation(Sender: TObject; ADate,\r\n AFocusedDate: TDate; ADirection: Boolean);\r\nbegin\r\n if Assigned(OnCustomNavigation) then\r\n OnCustomNavigation(Self, ADate, AFocusedDate, ADirection);\r\nend;\r\n\r\nprocedure TTMSFNCCustomDatePicker.DoDateSelected;\r\nbegin\r\n if csLoading in ComponentState then\r\n Exit;\r\n\r\n if Assigned(OnDateSelected) then\r\n OnDateSelected(Self, SelectedDate);\r\n\r\n Invalidate;\r\nend;\r\n\r\nprocedure TTMSFNCCustomDatePicker.DoEditExit(Sender: TObject);\r\nvar\r\n a: Boolean;\r\nbegin\r\n a := True;\r\n DoBeforeEditExitValidate(a);\r\n if a then\r\n DoValidate;\r\n\r\n inherited;\r\nend;\r\n\r\nprocedure TTMSFNCCustomDatePicker.DoSelectMultiDate(Sender: TObject; AStartDate,\r\n AEndDate: TDate);\r\nbegin\r\n if Assigned(OnSelectMultiDate) then\r\n OnSelectMultiDate(Self, AStartDate, AEndDate);\r\nend;\r\n\r\nprocedure TTMSFNCCustomDatePicker.DoValidate;\r\nvar\r\n d: TDateTime;\r\n df: Boolean;\r\nbegin\r\n df := True;\r\n d := SelectedDate;\r\n if Assigned(OnValidate) then\r\n OnValidate(Self, Edit.Text, d, df);\r\n\r\n if df then\r\n begin\r\n if TryStrToDate(Edit.Text, d) then\r\n SelectedDate := Int(d)\r\n else\r\n SelectedDate := Int(Now);\r\n end\r\n else\r\n SelectedDate := Int(d);\r\nend;\r\n\r\nprocedure TTMSFNCCustomDatePicker.DrawContent(AGraphics: TTMSFNCGraphics;\r\n ARect: TRectF);\r\nvar\r\n r: TRectF;\r\nbegin\r\n inherited;\r\n if not Editable then\r\n begin\r\n AGraphics.Font.AssignSource(Font);\r\n\r\n if not Enabled then\r\n AGraphics.Font.Color := gcSilver;\r\n\r\n r := ARect;\r\n InflateRectEx(r, -3, -3);\r\n AGraphics.DrawText(r, Content);\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomDatePicker.EditDown;\r\nbegin\r\n inherited;\r\n if not Popup.IsOpen then\r\n DropDown;\r\nend;\r\n\r\nprocedure TTMSFNCCustomDatePicker.EditUp;\r\nbegin\r\n inherited;\r\n if Popup.IsOpen then\r\n DropDown;\r\nend;\r\n\r\nprocedure TTMSFNCCustomDatePicker.FontChange(Sender: TObject);\r\nbegin\r\n if Assigned(Edit) then\r\n Edit.Font.Assign(FFont);\r\n\r\n Invalidate;\r\nend;\r\n\r\nfunction TTMSFNCCustomDatePicker.GetBadgeSize: Integer;\r\nbegin\r\n Result := FDateSelector.BadgeSize;\r\nend;\r\n\r\nfunction TTMSFNCCustomDatePicker.GetBitmapContainer: TTMSFNCBitmapContainer;\r\nbegin\r\n Result := FDateSelector.BitmapContainer;\r\nend;\r\n\r\nfunction TTMSFNCCustomDatePicker.GetCalendarFill: TTMSFNCGraphicsFill;\r\nbegin\r\n Result := FDateSelector.Fill;\r\nend;\r\n\r\nfunction TTMSFNCCustomDatePicker.GetCalendarStroke: TTMSFNCGraphicsStroke;\r\nbegin\r\n Result := FDateSelector.Stroke;\r\nend;\r\n\r\nfunction TTMSFNCCustomDatePicker.GetDateAppearance: TTMSFNCCalendarDateAppearance;\r\nbegin\r\n Result := FDateSelector.DateAppearance;\r\nend;\r\n\r\nfunction TTMSFNCCustomDatePicker.GetDay: Integer;\r\nbegin\r\n Result := FDateSelector.Day;\r\nend;\r\n\r\nfunction TTMSFNCCustomDatePicker.GetDayNameAppearance: TTMSFNCCalendarDayNameAppearance;\r\nbegin\r\n Result := FDateSelector.DayNameAppearance;\r\nend;\r\n\r\nfunction TTMSFNCCustomDatePicker.GetEvents: TTMSFNCCalendarEvents;\r\nbegin\r\n Result := FDateSelector.Events;\r\nend;\r\n\r\nfunction TTMSFNCCustomDatePicker.GetFirstDay: Integer;\r\nbegin\r\n Result := FDateSelector.FirstDay;\r\nend;\r\n\r\nfunction TTMSFNCCustomDatePicker.GetFocusedControl: TControl;\r\nbegin\r\n Result := FDateSelector;\r\nend;\r\n\r\nfunction TTMSFNCCustomDatePicker.GetFooter: TTMSFNCCalendarFooter;\r\nbegin\r\n Result := FDateSelector.Footer;\r\nend;\r\n\r\nfunction TTMSFNCCustomDatePicker.GetLineAppearance: TTMSFNCCalendarLineAppearance;\r\nbegin\r\n Result := FDateSelector.LineAppearance;\r\nend;\r\n\r\nfunction TTMSFNCCustomDatePicker.GetMaxDate: TDate;\r\nbegin\r\n Result := FDateSelector.MaxDate;\r\nend;\r\n\r\nfunction TTMSFNCCustomDatePicker.GetMinDate: TDate;\r\nbegin\r\n Result := FDateSelector.MinDate;\r\nend;\r\n\r\nfunction TTMSFNCCustomDatePicker.GetMonth: Integer;\r\nbegin\r\n Result := FDateSelector.Month;\r\nend;\r\n\r\nfunction TTMSFNCCustomDatePicker.GetSelectedDate: TDate;\r\nbegin\r\n Result := 0;\r\n if (FDateSelector.SelectedDates.Count > 0) then\r\n Result := TDate(FDateSelector.SelectedDate);\r\nend;\r\n\r\nfunction TTMSFNCCustomDatePicker.GetVersion: string;\r\nbegin\r\n Result := GetVersionNumber(MAJ_VER, MIN_VER, REL_VER, BLD_VER);\r\nend;\r\n\r\nfunction TTMSFNCCustomDatePicker.GetWeekNumberAppearance: TTMSFNCCalendarWeekNumberAppearance;\r\nbegin\r\n Result := FDateSelector.WeekNumberAppearance;\r\nend;\r\n\r\nfunction TTMSFNCCustomDatePicker.GetYear: Integer;\r\nbegin\r\n Result := FDateSelector.Year;\r\nend;\r\n\r\nprocedure TTMSFNCCustomDatePicker.HandleKeyDown(var Key: Word;\r\n Shift: TShiftState);\r\nbegin\r\n inherited;\r\n case Key of\r\n KEY_PRIOR:\r\n begin\r\n if FDateSelector.Month <> 1 then\r\n SelectedDate := EncodeDate(FDateSelector.Year, FDateSelector.PreviousMonth, 1)\r\n else\r\n SelectedDate := EncodeDate(FDateSelector.PreviousYear, FDateSelector.PreviousMonth, 1);\r\n end;\r\n KEY_NEXT:\r\n begin\r\n if FDateSelector.Month <> 12 then\r\n SelectedDate := EncodeDate(FDateSelector.Year, FDateSelector.NextMonth, 1)\r\n else\r\n SelectedDate := EncodeDate(FDateSelector.NextYear, FDateSelector.NextMonth, 1);\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomDatePicker.InitializePopup;\r\nbegin\r\n inherited;\r\n if FAllowNumericNullValue and (Int(SelectedDate) = 0) then\r\n begin\r\n FDateSelector.Date := Int(Now)\r\n end\r\n else if Editable and Assigned(Edit.Parent) and Edit.Visible then\r\n begin\r\n DoValidate;\r\n end;\r\n\r\n TTMSFNCCustomSelectorOpen(FWrapper).Fill.Assign(FDateSelector.Fill);\r\n TTMSFNCCustomSelectorOpen(FWrapper).Stroke.Assign(FDateSelector.Stroke);\r\n FDateSelector.Width := Round(DropDownWidth);\r\n FDateSelector.Height := Round(DropDownHeight);\r\n FDateSelector.Header.Assign(FHeader);\r\n FDateSelector.Interaction.Assign(FInteraction);\r\n FDateSelector.Invalidate;\r\nend;\r\n\r\nfunction TTMSFNCCustomDatePicker.IsAppearanceProperty(AObject: TObject;\r\n APropertyName: string; APropertyType: TTypeKind): Boolean;\r\nbegin\r\n Result := inherited IsAppearanceProperty(AObject, APropertyName, APropertyType);\r\n Result := Result or (APropertyName = 'Header') or (APropertyName = 'Footer');\r\nend;\r\n\r\nprocedure TTMSFNCCustomDatePicker.Loaded;\r\nbegin\r\n inherited;\r\n if Assigned(FDateSelector) then\r\n begin\r\n FDateSelector.Width := Round(DropDownWidth);\r\n FDateSelector.Height := Round(DropDownHeight);\r\n FDateSelector.UpdateControlAfterResize;\r\n {$IFDEF VCLLIB}\r\n {$HINTS OFF}\r\n {$IF (COMPILERVERSION >= 33) AND (COMPILERVERSION < 36)}\r\n FDateSelector.ScaleForPPI(CurrentPPI);\r\n {$IFEND}\r\n {$HINTS ON}\r\n {$ENDIF}\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomDatePicker.ResetToDefaultStyle;\r\nbegin\r\n inherited;\r\n FHeader.Fill.Kind := gfkSolid;\r\n FHeader.Stroke.Kind := gskSolid;\r\n FHeader.Fill.Color := MakeGraphicsColor(228, 228, 228);\r\n FHeader.Stroke.Color := gcSilver;\r\n FHeader.Font.Color := gcBlack;\r\n FHeader.Arrow.Color := gcDimgray;\r\nend;\r\n\r\nprocedure TTMSFNCCustomDatePicker.SelectFirstValue;\r\nvar\r\n d: TDate;\r\nbegin\r\n inherited;\r\n d := EncodeDate(FDateSelector.Year, FDateSelector.Month, 1);\r\n if (Int(MinDate) < Int(d)) and (CompareDate(SelectedDate, d) <> 0) then\r\n begin\r\n SelectedDate := d;\r\n DoDateSelected;\r\n end\r\n else if (CompareDate(SelectedDate, MinDate) <> 0) and (CompareDate(SelectedDate, d) <> 0) then\r\n begin\r\n SelectedDate := MinDate;\r\n DoDateSelected;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomDatePicker.SelectLastValue;\r\nvar\r\n d: TDate;\r\n dim: Integer;\r\nbegin\r\n inherited;\r\n dim := DaysInAMonth(FDateSelector.Year, FDateSelector.Month);\r\n d := EncodeDate(FDateSelector.Year, FDateSelector.Month, dim);\r\n\r\n if ((MaxDate <> 0) and (Int(MaxDate) > Int(d))) or (MaxDate = 0) then\r\n begin\r\n if CompareDate(SelectedDate, d) <> 0 then\r\n begin\r\n SelectedDate := d;\r\n DoDateSelected;\r\n end;\r\n end\r\n else if (CompareDate(SelectedDate, MaxDate) <> 0) and (CompareDate(SelectedDate, d) <> 0) then\r\n begin\r\n SelectedDate := MaxDate;\r\n DoDateSelected;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomDatePicker.SelectNextValue;\r\nvar\r\n d: TDate;\r\nbegin\r\n inherited;\r\n d := IncDay(FDateSelector.Date, 1);\r\n if Int(MaxDate + 1) <> Int(d) then\r\n begin\r\n SelectedDate := IncDay(FDateSelector.Date, 1);\r\n DoDateSelected;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomDatePicker.SelectPreviousValue;\r\nvar\r\n d: TDate;\r\nbegin\r\n inherited;\r\n d := IncDay(FDateSelector.Date, -1);\r\n if Int(MinDate) - 1 <> Int(d) then\r\n begin\r\n SelectedDate := d;\r\n DoDateSelected;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomDatePicker.SetAdaptToStyle(const Value: Boolean);\r\nbegin\r\n inherited;\r\n if Assigned(FWrapper) then\r\n FWrapper.AdaptToStyle := AdaptToStyle;\r\n if Assigned(FDateSelector) then\r\n FDateSelector.AdaptToStyle := AdaptToStyle;\r\nend;\r\n\r\nprocedure TTMSFNCCustomDatePicker.SetAllowNumericNullValue(\r\n const Value: Boolean);\r\nbegin\r\n if FAllowNumericNullValue <> Value then\r\n begin\r\n FAllowNumericNullValue := Value;\r\n if FAllowNumericNullValue and (Int(SelectedDate) = 0) then\r\n Content := ''\r\n else\r\n Content := DateToStr(SelectedDate);\r\n end;\r\n Invalidate;\r\nend;\r\n\r\nprocedure TTMSFNCCustomDatePicker.SetBadgeSize(const Value: Integer);\r\nbegin\r\n FDateSelector.BadgeSize := Value;\r\nend;\r\n\r\nprocedure TTMSFNCCustomDatePicker.SetBitmapContainer(\r\n const Value: TTMSFNCBitmapContainer);\r\nbegin\r\n FDateSelector.BitmapContainer := Value;\r\nend;\r\n\r\nprocedure TTMSFNCCustomDatePicker.SetCalendarFill(\r\n const Value: TTMSFNCGraphicsFill);\r\nbegin\r\n FDateSelector.Fill.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCCustomDatePicker.SetCalendarStroke(\r\n const Value: TTMSFNCGraphicsStroke);\r\nbegin\r\n FDateSelector.Stroke.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCCustomDatePicker.SetDateAppearance(\r\n const Value: TTMSFNCCalendarDateAppearance);\r\nbegin\r\n FDateSelector.DateAppearance.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCCustomDatePicker.SetDay(const Value: Integer);\r\nbegin\r\n FDateSelector.Day := Value;\r\nend;\r\n\r\nprocedure TTMSFNCCustomDatePicker.SetDayNameAppearance(\r\n const Value: TTMSFNCCalendarDayNameAppearance);\r\nbegin\r\n FDateSelector.DayNameAppearance.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCCustomDatePicker.SetEditable(const Value: Boolean);\r\nbegin\r\n inherited;\r\n if FAllowNumericNullValue and (Int(FPrevSelDate) = 0) then\r\n Content := ''\r\n else\r\n Content := DateToStr(FPrevSelDate);\r\n\r\n Invalidate;\r\nend;\r\n\r\nprocedure TTMSFNCCustomDatePicker.SetEvents(const Value: TTMSFNCCalendarEvents);\r\nbegin\r\n FDateSelector.Events.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCCustomDatePicker.SetFirstDay(const Value: Integer);\r\nbegin\r\n FDateSelector.FirstDay := Value;\r\nend;\r\n\r\nprocedure TTMSFNCCustomDatePicker.SetFnt(const Value: TTMSFNCGraphicsFont);\r\nbegin\r\n FFont.AssignSource(Value);\r\nend;\r\n\r\nprocedure TTMSFNCCustomDatePicker.SetFooter(const Value: TTMSFNCCalendarFooter);\r\nbegin\r\n FDateSelector.Footer.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCCustomDatePicker.SetHeader(const Value: TTMSFNCCalendarHeader);\r\nbegin\r\n FHeader.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCCustomDatePicker.SetInteraction(\r\n const Value: TTMSFNCDatePickerInteraction);\r\nbegin\r\n FInteraction.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCCustomDatePicker.SetLineAppearance(\r\n const Value: TTMSFNCCalendarLineAppearance);\r\nbegin\r\n FDateSelector.LineAppearance.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCCustomDatePicker.SetMaxDate(const Value: TDate);\r\nbegin\r\n FDateSelector.MaxDate := Value;\r\n if CompareDate(SelectedDate, Value) = 1 then\r\n SelectedDate := Value;\r\nend;\r\n\r\nprocedure TTMSFNCCustomDatePicker.SetMinDate(const Value: TDate);\r\nbegin\r\n FDateSelector.MinDate := Value;\r\n if CompareDate(SelectedDate, Value) = -1 then\r\n SelectedDate := Value;\r\nend;\r\n\r\nprocedure TTMSFNCCustomDatePicker.SetMonth(const Value: Integer);\r\nbegin\r\n FDateSelector.Month := Value;\r\nend;\r\n\r\nprocedure TTMSFNCCustomDatePicker.SetSelectedDate(const Value: TDate);\r\nbegin\r\n if FAllowNumericNullValue and (Int(Value) = 0) then\r\n Content := ''\r\n else\r\n Content := DateToStr(Value);\r\n\r\n FPrevSelDate := Value;\r\n Invalidate;\r\nend;\r\n\r\nprocedure TTMSFNCCustomDatePicker.SetWeekNumberAppearance(\r\n const Value: TTMSFNCCalendarWeekNumberAppearance);\r\nbegin\r\n FDateSelector.WeekNumberAppearance.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCCustomDatePicker.SetYear(const Value: Integer);\r\nbegin\r\n FDateSelector.Year := Value;\r\nend;\r\n\r\nprocedure TTMSFNCCustomDatePicker.UpdateEditText(AText: string);\r\nvar\r\n d: TDateTime;\r\nbegin\r\n inherited;\r\n if AText = '' then\r\n begin\r\n if (0 = Int(FPrevSelDate)) then\r\n begin\r\n FDateSelector.SelectADate(0);\r\n DoDateSelected;\r\n end;\r\n end\r\n else if TryStrToDate(AText, d) then\r\n begin\r\n if (Int(d) <> Int(SelectedDate)) and (Int(d) >= Int(MinDate)) and (((Int(d) <= Int(MaxDate)) and (MaxDate <> 0)) or (MaxDate = 0)) then\r\n begin\r\n FDateSelector.SelectADate(Int(d));\r\n DoDateSelected;\r\n end;\r\n end;\r\nend;\r\n\r\n{ TTMSFNCDatePicker }\r\n\r\nprocedure TTMSFNCDatePicker.RegisterRuntimeClasses;\r\nbegin\r\n inherited;\r\n RegisterClass(TTMSFNCDatePicker);\r\nend;\r\n\r\nend.\r\n","unit Unit_Artikel;\r\n\r\ninterface\r\n\r\nuses\r\n System.SysUtils, System.Classes, JS, Web, WEBLib.Graphics, WEBLib.Controls,\r\n WEBLib.Forms, WEBLib.Dialogs, Vcl.StdCtrls, WEBLib.StdCtrls, WEBLib.DBCtrls,\r\n Vcl.Controls, WEBLib.ExtCtrls, Data.DB, WEBLib.DB, XData.Web.JsonDataset,\r\n XData.Web.Dataset, WEBLib.Buttons, WEBLib.Grids, XData.Web.Client, strutils,\r\n DB;\r\n\r\ntype\r\n TfrmArtikel = class(TForm)\r\n xdsEinzelartikel: TXDataWebDataSet;\r\n sourceEinzelartikel: TDataSource;\r\n TC: TTableControl;\r\n xdsEinzelartikelHersteller: TXDataWebEntityField;\r\n xdsEinzelartikelArtderMenge: TXDataWebEntityField;\r\n xdsEinzelartikelPfandArt: TXDataWebEntityField;\r\n xdsEinzelartikelWarengruppe: TXDataWebEntityField;\r\n xdsEinzelartikelWarenuntergruppe: TXDataWebEntityField;\r\n xdsEinzelartikelArtikelnummer: TStringField;\r\n xdsEinzelartikelArtikelueberschrift: TStringField;\r\n xdsEinzelartikelArtikelbeschreibung: TStringField;\r\n xdsEinzelartikelVerkaufspreis: TFloatField;\r\n xdsEinzelartikelMindestbestand: TFloatField;\r\n xdsEinzelartikelPreisliste: TStringField;\r\n xdsEinzelartikelGewicht: TFloatField;\r\n xdsEinzelartikelBreite: TFloatField;\r\n xdsEinzelartikelArtikelZusatz: TStringField;\r\n xdsEinzelartikelLagerort: TStringField;\r\n xdsEinzelartikelBuchungskonto: TIntegerField;\r\n xdsEinzelartikelEingangMenge: TFloatField;\r\n xdsEinzelartikelEingangEndpreis: TFloatField;\r\n xdsEinzelartikelAusgangMenge: TFloatField;\r\n xdsEinzelartikelAusgangEndpreisEK: TFloatField;\r\n xdsEinzelartikelAusgangEndpreisVK: TFloatField;\r\n xdsEinzelartikelBestand: TFloatField;\r\n xdsEinzelartikelBestandswert: TFloatField;\r\n xdsEinzelartikelMarge: TFloatField;\r\n xdsEinzelartikelMargeProzent: TFloatField;\r\n xdsEinzelartikelArtikelnummer2: TStringField;\r\n xdsEinzelartikelArtikelmatchcode: TStringField;\r\n xdsEinzelartikelRabattpreis1: TFloatField;\r\n xdsEinzelartikelRabattpreis2: TFloatField;\r\n xdsEinzelartikelRabattpreis3: TFloatField;\r\n xdsEinzelartikelRabattpreis4: TFloatField;\r\n xdsEinzelartikelRabattpreis5: TFloatField;\r\n xdsEinzelartikelArtikelnichtmehrgueltig: TBooleanField;\r\n xdsEinzelartikelEinkaufspreis: TFloatField;\r\n xdsEinzelartikelAufschlag: TFloatField;\r\n xdsEinzelartikelWarenbestand: TBooleanField;\r\n xdsEinzelartikelTextfrei10: TStringField;\r\n xdsEinzelartikelTextfrei20: TStringField;\r\n xdsEinzelartikelArtikelbeschreibungRTF: TStringField;\r\n xdsEinzelartikelArtikeldatei1: TStringField;\r\n xdsEinzelartikelArtikeldatei2: TStringField;\r\n xdsEinzelartikelArtikeldatei3: TStringField;\r\n xdsEinzelartikelArtikeldatei4: TStringField;\r\n xdsEinzelartikelArtikeldatei5: TStringField;\r\n xdsEinzelartikelEinkaufspreisVom: TDateTimeField;\r\n xdsEinzelartikelEAN: TStringField;\r\n xdsEinzelartikelVGPFaktor: TFloatField;\r\n xdsEinzelartikelVGPMengenart: TStringField;\r\n xdsEinzelartikelVerleihpreis: TFloatField;\r\n xdsEinzelartikelZusatzPreis: TFloatField;\r\n xdsEinzelartikelVerpackungsart: TStringField;\r\n xdsEinzelartikelVerpackungsMenge: TFloatField;\r\n xdsEinzelartikelQuellartikel: TStringField;\r\n xdsEinzelartikelrabattierfaehig: TBooleanField;\r\n xdsEinzelartikelAngebotAlternativeAN: TStringField;\r\n xdsEinzelartikelPreisanteilNetto: TFloatField;\r\n xdsEinzelartikelFarbe: TIntegerField;\r\n xdsEinzelartikelAEinkauf: TBooleanField;\r\n xdsEinzelartikelAVerkauf: TBooleanField;\r\n xdsEinzelartikelArtikelnummerLieferant: TStringField;\r\n xdsEinzelartikelLieferantnummer: TStringField;\r\n xdsEinzelartikelVerkaufspreisBrutto: TFloatField;\r\n xdsEinzelartikelArtikelSet: TBooleanField;\r\n xdsEinzelartikelProvisionssatz: TFloatField;\r\n xdsEinzelartikelWarentarifnummer: TStringField;\r\n xdsEinzelartikelHandelsartikel: TBooleanField;\r\n xdsEinzelartikelUrsprungsland: TStringField;\r\n xdsEinzelartikelKategorie: TStringField;\r\n xdsEinzelartikelStandardRabattsatzEK: TFloatField;\r\n xdsEinzelartikelStandardRabattsatzVK: TFloatField;\r\n xdsEinzelartikelRabattpreiseManuell: TBooleanField;\r\n xdsEinzelartikelMengeBestellt: TFloatField;\r\n xdsEinzelartikelMengeBeauftragt: TFloatField;\r\n xdsEinzelartikelBestandDisponiert: TFloatField;\r\n xdsEinzelartikelMengeAngeboten: TFloatField;\r\n xdsEinzelartikelBestandDispInclAngebot: TFloatField;\r\n xdsEinzelartikelMWStKey: TIntegerField;\r\n xdsEinzelartikelShopAmazon: TBooleanField;\r\n xdsEinzelartikelShopQuelle: TBooleanField;\r\n xdsEinzelartikelGeraet: TBooleanField;\r\n xdsEinzelartikelArtgewicht: TFloatField;\r\n xdsEinzelartikelVolumen: TFloatField;\r\n xdsEinzelartikelPacklisteNichtAnzeigen: TBooleanField;\r\n xdsEinzelartikelKeineAufschlagskalkulation: TBooleanField;\r\n xdsEinzelartikelKorrekturMenge: TFloatField;\r\n xdsEinzelartikelKorrekturWert: TFloatField;\r\n xdsEinzelartikelNachfolgeartikel: TStringField;\r\n xdsEinzelartikelMindestbestellmenge: TFloatField;\r\n xdsEinzelartikelSchnittEK: TFloatField;\r\n xdsEinzelartikelVerkaufspreisVom: TDateTimeField;\r\n xdsEinzelartikelPruefungChargeSNR: TIntegerField;\r\n xdsEinzelartikelArtikelbeschreibungHTML: TStringField;\r\n xdsEinzelartikelProduktKurzbeschreibungHTML: TStringField;\r\n xdsEinzelartikelStatusFuerShop: TStringField;\r\n xdsEinzelartikelAmpelFuerShop: TStringField;\r\n xdsEinzelartikelEXP_Anzahl: TFloatField;\r\n xdsEinzelartikelEXP_Inhalt: TFloatField;\r\n xdsEinzelartikelEXP_Faktor: TFloatField;\r\n xdsEinzelartikelFach: TStringField;\r\n xdsEinzelartikelExportKasse: TIntegerField;\r\n xdsEinzelartikelWKNR: TIntegerField;\r\n xdsEinzelartikelArtikelAttribute: TStringField;\r\n xdsEinzelartikelErstelltAm: TDateTimeField;\r\n xdsEinzelartikelVarianteVonAN: TStringField;\r\n xdsEinzelartikelGurtmassWerte: TStringField;\r\n xdsEinzelartikelGurtmass: TFloatField;\r\n xdsEinzelartikelAltersgrenze: TIntegerField;\r\n xdsEinzelartikelMWStKeyImHaus: TIntegerField;\r\n xdsEinzelartikelKasseBewegung: TFloatField;\r\n xdsEinzelartikelKasseBewegungEK: TFloatField;\r\n xdsEinzelartikelKasseBewegungVK: TFloatField;\r\n xdsEinzelartikelProduktionBewegung: TFloatField;\r\n xdsEinzelartikelProduktionBewegungEK: TFloatField;\r\n xdsEinzelartikelProduktionBewegungVK: TFloatField;\r\n xdsEinzelartikelWaWiAB: TIntegerField;\r\n xdsEinzelartikelGeaendertAm: TDateTimeField;\r\n xdsEinzelartikelGefahrgutKennzeichen: TStringField;\r\n xdsEinzelartikelVerpackG: TBooleanField;\r\n xdsEinzelartikelUPE: TFloatField;\r\n xdsEinzelartikelArtikelbeschreibungEinkauf: TStringField;\r\n xdsEinzelartikelHerstellerArtikelnummer: TStringField;\r\n xdsEinzelartikelNatura: TStringField;\r\n xdsEinzelartikelArbeitszeit: TBooleanField;\r\n xdsEinzelartikelWarengruppeWarengruppe: TStringField;\r\n xdsEinzelartikelLaenge: TFloatField;\r\n xdsEinzelartikelHoehe: TFloatField;\r\n xdsEinzelartikelArtderMengeArtderMenge: TStringField;\r\n xdsEinzelartikelHerstellerHersteller: TStringField;\r\n xdsEinzelartikelHerstellerHerstellerID: TStringField;\r\n xdsEinzelartikelHerstellerHerstellerURL: TStringField;\r\n xdsEinzelartikelArtderMengeISO3: TStringField;\r\n xdsEinzelartikelArtderMengeMengenauswahl: TBooleanField;\r\n xdsEinzelartikelArtderMengeVGPauswahl: TBooleanField;\r\n xdsEinzelartikelArtderMengeUVPauswahl: TBooleanField;\r\n xdsEinzelartikelArtderMengeVKPDivisor: TFloatField;\r\n xdsEinzelartikelPfandArtPfandArt: TStringField;\r\n xdsEinzelartikelPfandArtPfandWert: TFloatField;\r\n xdsEinzelartikelPfandArtPfandwertEK: TFloatField;\r\n xdsEinzelartikelWarengruppeWGNR: TIntegerField;\r\n xdsEinzelartikelWarenuntergruppeWarenuntergruppe: TStringField;\r\n xdsEinzelartikelWarenuntergruppeWarengruppe: TStringField;\r\n xdsEinzelartikelWarenuntergruppeWUGNR: TIntegerField;\r\n xdsEinzelartikelWarenuntergruppeWGNR: TIntegerField;\r\n WClient: TXDataWebClient;\r\n Container1: THTMLContainer;\r\n Container2: THTMLContainer;\r\n btnzurueck: TButton;\r\n WebLabel1: TLabel;\r\n btnSpeichern: TButton;\r\n edtBMenge: TEdit;\r\n edtArtikelnummer: TEdit;\r\n btnEtikettendruck: TButton;\r\n Container3: THTMLContainer;\r\n procedure edtArtikelnummerChange(Sender: TObject);\r\n procedure xdsEinzelartikelAfterOpen(DataSet: TDataSet);\r\n procedure btnEtikettendruckClick(Sender: TObject);\r\n procedure WebFormShow(Sender: TObject);\r\n procedure btnSpeichernClick(Sender: TObject);\r\n procedure btnzurueckClick(Sender: TObject);\r\n private\r\n { Private-Deklarationen }\r\n public\r\n { Public-Deklarationen }\r\n protected procedure LoadDFMValues; override; end;\r\n\r\nvar\r\n frmArtikel: TfrmArtikel;\r\n\r\nimplementation\r\n uses unit1, unit2, unit_artikelsuche;\r\n{$R *.dfm}\r\n\r\nprocedure TfrmArtikel.btnEtikettendruckClick(Sender: TObject);\r\n procedure OnResponse(Response:TXDataClientResponse);\r\n var\r\n ergebnis:string;\r\n begin\r\n ergebnis:=string(TJSObject(response.Result)['value']);\r\n if ergebnis='WRONG' then\r\n begin\r\n showmessage('Druckvormerkung für Etiketten konnte leider nicht durchgeführt werden');\r\n end\r\n else\r\n begin\r\n if ergebnis='OK' then\r\n begin\r\n showmessage('Etikettendruck wurde vorgemerkt');\r\n end\r\n else\r\n begin\r\n if ergebnis='Bereits vorhanden' then showmessage('Dieser Eintrag war bereits vorhanden');\r\n\r\n end;\r\n end;\r\n end;\r\nbegin\r\n if LizenzOK then\r\n begin\r\n WClient.RawInvoke('IServerService.ArtikelEtikettenDruck',[xdseinzelartikelartikelnummer.asstring],@OnResponse);\r\n end\r\n else\r\n begin\r\n showmessage('Für das Speichern von Daten sind Sie noch nicht freigeschaltet, bitte erwerben Sie eine Lizenz');\r\n end;\r\nend;\r\n\r\nprocedure TfrmArtikel.btnzurueckClick(Sender: TObject);\r\nbegin\r\n self.Close;\r\nend;\r\n\r\nprocedure TfrmArtikel.edtArtikelnummerChange(Sender: TObject);\r\nbegin\r\n xdsEinzelArtikel.Close;\r\n xdseinzelArtikel.QueryString:='$filter=Artikelnummer eq '+QuotedStr(edtArtikelnummer.Text)+'&$expand=ArtderMenge,Hersteller';\r\n xdseinzelArtikel.Load;\r\nend;\r\n\r\nprocedure TfrmArtikel.btnSpeichernClick(Sender: TObject);\r\n procedure OnResponse(Response:TXDataClientResponse);\r\n var\r\n ergebnis:string;\r\n begin\r\n ergebnis:=string(TJSObject(response.Result)['value']);\r\n if ergebnis='WRONG' then\r\n begin\r\n showmessage('Bestellvormerkung konnte leider nicht durchgeführt werden');\r\n end\r\n else\r\n begin\r\n showmessage('Bestellvormerkung erfolgreich');\r\n edtBMenge.Text:='';\r\n\r\n end;\r\n end;\r\n var\r\n rawArtikelnummer:string;\r\n rawArtikelueberschrift:string;\r\nbegin\r\n if edtBMenge.Text='' then\r\n begin\r\n showmessage('Bestellmenge muß angegeben werden');\r\n end\r\n else\r\n begin\r\n if LizenzOK then\r\n begin\r\n rawArtikelnummer:=xdseinzelartikelartikelnummer.asstring;\r\n rawArtikelueberschrift:=xdseinzelartikelartikelueberschrift.asstring;\r\n WClient.RawInvoke('IServerService.ArtikelBestellvormerkung',[rawArtikelnummer,edtBMenge.text,rawArtikelueberschrift,BenutzerLoginName],@OnResponse);\r\n end\r\n else\r\n begin\r\n showmessage('Für das Speichern von Daten sind Sie noch nicht freigeschaltet, bitte erwerben Sie eine Lizenz');\r\n end;\r\n\r\n end;\r\nend;\r\n\r\nprocedure TfrmArtikel.WebFormShow(Sender: TObject);\r\nvar\r\n myelement:TJSHTMLElement;\r\nbegin\r\n Container1.html.text:='';\r\n myelement:=container1.ElementHandle;\r\n btnzurueck.ParentElement:=myelement;\r\n Container2.HTML.Text:='';\r\n myelement:=container2.ElementHandle;\r\n btnEtikettendruck.ParentElement:=myelement;\r\n container3.parentelement:=myelement;\r\n myelement:=container3.ElementHandle;\r\n weblabel1.ParentElement:=myelement;\r\n edtBMenge.ParentElement:=myelement;\r\n btnSpeichern.ParentElement:=myelement;\r\nend;\r\n\r\nprocedure TfrmArtikel.xdsEinzelartikelAfterOpen(DataSet: TDataSet);\r\nbegin\r\n TC.RowCount:=22;\r\n TC.Cells[0,0]:='Bezeichnung';\r\n TC.Cells[1,0]:='Wert';\r\n TC.Cells[0,1]:='Artikelnummer';\r\n TC.Cells[1,1]:='
'+xdsEinzelartikelArtikelnummer.asstring;\r\n TC.Cells[0,2]:='Artikelüberschrift';\r\n TC.Cells[1,2]:='
'+xdsEinzelartikelArtikelueberschrift.asstring;\r\n TC.Cells[0,3]:='Artikelbeschreibung';\r\n TC.Cells[1,3]:='
'+ReplaceStr(xdsEinzelartikelArtikelbeschreibung.asstring,#13+#10,'
');\r\n TC.Cells[0,4]:='Einkaufspreis';\r\n if form1.rcw.Einkaufspreise=true then TC.Cells[1,4]:='
'+formatfloat('#,##0.00',xdsEinzelartikelEinkaufspreis.asfloat);\r\n if form1.rcw.Einkaufspreise=false then TC.Cells[1,4]:='
XXX';\r\n TC.Cells[0,5]:='Verkaufspreis';\r\n if form1.rcw.Verkaufspreise=true then TC.Cells[1,5]:='
'+formatfloat('#,##0.00',xdsEinzelartikelVerkaufspreis.asfloat);\r\n if form1.rcw.Verkaufspreise=false then TC.Cells[1,5]:='
XXX';\r\n TC.Cells[0,6]:='Verkaufspreis (brutto)';\r\n if form1.rcw.Verkaufspreise=true then TC.Cells[1,6]:='
'+formatfloat('#,##0.00',xdsEinzelartikelVerkaufspreisBrutto.asfloat);\r\n if form1.rcw.Verkaufspreise=false then TC.Cells[1,6]:='
XXX';\r\n TC.Cells[0,7]:='Bestand';\r\n TC.Cells[1,7]:='
'+formatfloat('#,##0.00',xdsEinzelartikelBestand.asfloat);\r\n TC.Cells[0,8]:='Gewicht';\r\n TC.Cells[1,8]:='
'+formatfloat('#,##0.0000',xdsEinzelartikelGewicht.asfloat);\r\n TC.Cells[0,9]:='Länge';\r\n TC.Cells[1,9]:='
'+formatfloat('#,##0.0000',xdsEinzelartikelLaenge.asfloat);\r\n TC.Cells[0,10]:='Breite';\r\n TC.Cells[1,10]:='
'+formatfloat('#,##0.0000',xdsEinzelartikelBreite.asfloat);\r\n TC.Cells[0,11]:='Höhe';\r\n TC.Cells[1,11]:='
'+formatfloat('#,##0.0000',xdsEinzelartikelHoehe.asfloat);\r\n TC.Cells[0,12]:='Hersteller|Art.Nr.';\r\n TC.Cells[1,12]:='
'+xdsEinzelartikelHerstellerHersteller.AsString+' | '+xdsEinzelartikelHerstellerArtikelnummer.AsString;\r\n TC.Cells[0,13]:='Lieferant|Art.Nr.';\r\n TC.Cells[1,13]:='
'+xdsEinzelartikelLieferantnummer.AsString+' | '+xdsEinzelartikelArtikelnummerLieferant.asstring;\r\n TC.Cells[0,14]:='Lager|Fach';\r\n TC.Cells[1,14]:='
'+xdsEinzelartikelLagerort.AsString+' | '+xdsEinzelartikelFach.asstring;\r\n TC.Cells[0,15]:='GTIN/EAN';\r\n TC.Cells[1,15]:='
'+xdsEinzelartikelEAN.AsString;\r\n TC.Cells[0,16]:='Mindestbestand';\r\n TC.Cells[1,16]:='
'+xdsEinzelartikelMindestbestand.AsString;\r\n TC.Cells[0,17]:='Mindestbestellmenge';\r\n TC.Cells[1,17]:='
'+xdsEinzelartikelMindestbestellmenge.AsString;\r\n TC.Cells[0,18]:='Mengenart';\r\n TC.Cells[1,18]:='
'+xdsEinzelartikelArtderMengeArtderMenge.AsString;\r\n TC.Cells[0,19]:='Verpackungsart';\r\n TC.Cells[1,19]:='
'+xdsEinzelartikelVerpackungsart.AsString;\r\n TC.Cells[0,20]:='Verpackungsmenge';\r\n TC.Cells[1,20]:='
'+xdsEinzelartikelVerpackungsMenge.AsString;\r\nend;\r\n\r\nprocedure TfrmArtikel.LoadDFMValues;\r\nbegin\r\n inherited LoadDFMValues;\r\n\r\n WebLabel1 := TLabel.Create(Self);\r\n TC := TTableControl.Create(Self);\r\n Container1 := THTMLContainer.Create(Self);\r\n Container2 := THTMLContainer.Create(Self);\r\n btnzurueck := TButton.Create(Self);\r\n btnSpeichern := TButton.Create(Self);\r\n edtBMenge := TEdit.Create(Self);\r\n edtArtikelnummer := TEdit.Create(Self);\r\n btnEtikettendruck := TButton.Create(Self);\r\n Container3 := THTMLContainer.Create(Self);\r\n xdsEinzelartikel := TXDataWebDataSet.Create(Self);\r\n xdsEinzelartikelHersteller := TXDataWebEntityField.Create(Self);\r\n xdsEinzelartikelArtderMenge := TXDataWebEntityField.Create(Self);\r\n xdsEinzelartikelPfandArt := TXDataWebEntityField.Create(Self);\r\n xdsEinzelartikelWarengruppe := TXDataWebEntityField.Create(Self);\r\n xdsEinzelartikelWarenuntergruppe := TXDataWebEntityField.Create(Self);\r\n xdsEinzelartikelArtikelnummer := TStringField.Create(Self);\r\n xdsEinzelartikelArtikelueberschrift := TStringField.Create(Self);\r\n xdsEinzelartikelArtikelbeschreibung := TStringField.Create(Self);\r\n xdsEinzelartikelVerkaufspreis := TFloatField.Create(Self);\r\n xdsEinzelartikelMindestbestand := TFloatField.Create(Self);\r\n xdsEinzelartikelPreisliste := TStringField.Create(Self);\r\n xdsEinzelartikelGewicht := TFloatField.Create(Self);\r\n xdsEinzelartikelBreite := TFloatField.Create(Self);\r\n xdsEinzelartikelArtikelZusatz := TStringField.Create(Self);\r\n xdsEinzelartikelLagerort := TStringField.Create(Self);\r\n xdsEinzelartikelBuchungskonto := TIntegerField.Create(Self);\r\n xdsEinzelartikelEingangMenge := TFloatField.Create(Self);\r\n xdsEinzelartikelEingangEndpreis := TFloatField.Create(Self);\r\n xdsEinzelartikelAusgangMenge := TFloatField.Create(Self);\r\n xdsEinzelartikelAusgangEndpreisEK := TFloatField.Create(Self);\r\n xdsEinzelartikelAusgangEndpreisVK := TFloatField.Create(Self);\r\n xdsEinzelartikelBestand := TFloatField.Create(Self);\r\n xdsEinzelartikelBestandswert := TFloatField.Create(Self);\r\n xdsEinzelartikelMarge := TFloatField.Create(Self);\r\n xdsEinzelartikelMargeProzent := TFloatField.Create(Self);\r\n xdsEinzelartikelArtikelnummer2 := TStringField.Create(Self);\r\n xdsEinzelartikelArtikelmatchcode := TStringField.Create(Self);\r\n xdsEinzelartikelRabattpreis1 := TFloatField.Create(Self);\r\n xdsEinzelartikelRabattpreis2 := TFloatField.Create(Self);\r\n xdsEinzelartikelRabattpreis3 := TFloatField.Create(Self);\r\n xdsEinzelartikelRabattpreis4 := TFloatField.Create(Self);\r\n xdsEinzelartikelRabattpreis5 := TFloatField.Create(Self);\r\n xdsEinzelartikelArtikelnichtmehrgueltig := TBooleanField.Create(Self);\r\n xdsEinzelartikelEinkaufspreis := TFloatField.Create(Self);\r\n xdsEinzelartikelAufschlag := TFloatField.Create(Self);\r\n xdsEinzelartikelWarenbestand := TBooleanField.Create(Self);\r\n xdsEinzelartikelTextfrei10 := TStringField.Create(Self);\r\n xdsEinzelartikelTextfrei20 := TStringField.Create(Self);\r\n xdsEinzelartikelArtikelbeschreibungRTF := TStringField.Create(Self);\r\n xdsEinzelartikelArtikeldatei1 := TStringField.Create(Self);\r\n xdsEinzelartikelArtikeldatei2 := TStringField.Create(Self);\r\n xdsEinzelartikelArtikeldatei3 := TStringField.Create(Self);\r\n xdsEinzelartikelArtikeldatei4 := TStringField.Create(Self);\r\n xdsEinzelartikelArtikeldatei5 := TStringField.Create(Self);\r\n xdsEinzelartikelEinkaufspreisVom := TDateTimeField.Create(Self);\r\n xdsEinzelartikelEAN := TStringField.Create(Self);\r\n xdsEinzelartikelVGPFaktor := TFloatField.Create(Self);\r\n xdsEinzelartikelVGPMengenart := TStringField.Create(Self);\r\n xdsEinzelartikelVerleihpreis := TFloatField.Create(Self);\r\n xdsEinzelartikelZusatzPreis := TFloatField.Create(Self);\r\n xdsEinzelartikelVerpackungsart := TStringField.Create(Self);\r\n xdsEinzelartikelVerpackungsMenge := TFloatField.Create(Self);\r\n xdsEinzelartikelQuellartikel := TStringField.Create(Self);\r\n xdsEinzelartikelrabattierfaehig := TBooleanField.Create(Self);\r\n xdsEinzelartikelAngebotAlternativeAN := TStringField.Create(Self);\r\n xdsEinzelartikelPreisanteilNetto := TFloatField.Create(Self);\r\n xdsEinzelartikelFarbe := TIntegerField.Create(Self);\r\n xdsEinzelartikelAEinkauf := TBooleanField.Create(Self);\r\n xdsEinzelartikelAVerkauf := TBooleanField.Create(Self);\r\n xdsEinzelartikelArtikelnummerLieferant := TStringField.Create(Self);\r\n xdsEinzelartikelLieferantnummer := TStringField.Create(Self);\r\n xdsEinzelartikelVerkaufspreisBrutto := TFloatField.Create(Self);\r\n xdsEinzelartikelArtikelSet := TBooleanField.Create(Self);\r\n xdsEinzelartikelProvisionssatz := TFloatField.Create(Self);\r\n xdsEinzelartikelWarentarifnummer := TStringField.Create(Self);\r\n xdsEinzelartikelHandelsartikel := TBooleanField.Create(Self);\r\n xdsEinzelartikelUrsprungsland := TStringField.Create(Self);\r\n xdsEinzelartikelKategorie := TStringField.Create(Self);\r\n xdsEinzelartikelStandardRabattsatzEK := TFloatField.Create(Self);\r\n xdsEinzelartikelStandardRabattsatzVK := TFloatField.Create(Self);\r\n xdsEinzelartikelRabattpreiseManuell := TBooleanField.Create(Self);\r\n xdsEinzelartikelMengeBestellt := TFloatField.Create(Self);\r\n xdsEinzelartikelMengeBeauftragt := TFloatField.Create(Self);\r\n xdsEinzelartikelBestandDisponiert := TFloatField.Create(Self);\r\n xdsEinzelartikelMengeAngeboten := TFloatField.Create(Self);\r\n xdsEinzelartikelBestandDispInclAngebot := TFloatField.Create(Self);\r\n xdsEinzelartikelMWStKey := TIntegerField.Create(Self);\r\n xdsEinzelartikelShopAmazon := TBooleanField.Create(Self);\r\n xdsEinzelartikelShopQuelle := TBooleanField.Create(Self);\r\n xdsEinzelartikelGeraet := TBooleanField.Create(Self);\r\n xdsEinzelartikelArtgewicht := TFloatField.Create(Self);\r\n xdsEinzelartikelVolumen := TFloatField.Create(Self);\r\n xdsEinzelartikelPacklisteNichtAnzeigen := TBooleanField.Create(Self);\r\n xdsEinzelartikelKeineAufschlagskalkulation := TBooleanField.Create(Self);\r\n xdsEinzelartikelKorrekturMenge := TFloatField.Create(Self);\r\n xdsEinzelartikelKorrekturWert := TFloatField.Create(Self);\r\n xdsEinzelartikelNachfolgeartikel := TStringField.Create(Self);\r\n xdsEinzelartikelMindestbestellmenge := TFloatField.Create(Self);\r\n xdsEinzelartikelSchnittEK := TFloatField.Create(Self);\r\n xdsEinzelartikelVerkaufspreisVom := TDateTimeField.Create(Self);\r\n xdsEinzelartikelPruefungChargeSNR := TIntegerField.Create(Self);\r\n xdsEinzelartikelArtikelbeschreibungHTML := TStringField.Create(Self);\r\n xdsEinzelartikelProduktKurzbeschreibungHTML := TStringField.Create(Self);\r\n xdsEinzelartikelStatusFuerShop := TStringField.Create(Self);\r\n xdsEinzelartikelAmpelFuerShop := TStringField.Create(Self);\r\n xdsEinzelartikelEXP_Anzahl := TFloatField.Create(Self);\r\n xdsEinzelartikelEXP_Inhalt := TFloatField.Create(Self);\r\n xdsEinzelartikelEXP_Faktor := TFloatField.Create(Self);\r\n xdsEinzelartikelFach := TStringField.Create(Self);\r\n xdsEinzelartikelExportKasse := TIntegerField.Create(Self);\r\n xdsEinzelartikelWKNR := TIntegerField.Create(Self);\r\n xdsEinzelartikelArtikelAttribute := TStringField.Create(Self);\r\n xdsEinzelartikelErstelltAm := TDateTimeField.Create(Self);\r\n xdsEinzelartikelVarianteVonAN := TStringField.Create(Self);\r\n xdsEinzelartikelGurtmassWerte := TStringField.Create(Self);\r\n xdsEinzelartikelGurtmass := TFloatField.Create(Self);\r\n xdsEinzelartikelAltersgrenze := TIntegerField.Create(Self);\r\n xdsEinzelartikelMWStKeyImHaus := TIntegerField.Create(Self);\r\n xdsEinzelartikelKasseBewegung := TFloatField.Create(Self);\r\n xdsEinzelartikelKasseBewegungEK := TFloatField.Create(Self);\r\n xdsEinzelartikelKasseBewegungVK := TFloatField.Create(Self);\r\n xdsEinzelartikelProduktionBewegung := TFloatField.Create(Self);\r\n xdsEinzelartikelProduktionBewegungEK := TFloatField.Create(Self);\r\n xdsEinzelartikelProduktionBewegungVK := TFloatField.Create(Self);\r\n xdsEinzelartikelWaWiAB := TIntegerField.Create(Self);\r\n xdsEinzelartikelGeaendertAm := TDateTimeField.Create(Self);\r\n xdsEinzelartikelGefahrgutKennzeichen := TStringField.Create(Self);\r\n xdsEinzelartikelVerpackG := TBooleanField.Create(Self);\r\n xdsEinzelartikelUPE := TFloatField.Create(Self);\r\n xdsEinzelartikelArtikelbeschreibungEinkauf := TStringField.Create(Self);\r\n xdsEinzelartikelHerstellerArtikelnummer := TStringField.Create(Self);\r\n xdsEinzelartikelNatura := TStringField.Create(Self);\r\n xdsEinzelartikelArbeitszeit := TBooleanField.Create(Self);\r\n xdsEinzelartikelWarengruppeWarengruppe := TStringField.Create(Self);\r\n xdsEinzelartikelLaenge := TFloatField.Create(Self);\r\n xdsEinzelartikelHoehe := TFloatField.Create(Self);\r\n xdsEinzelartikelArtderMengeArtderMenge := TStringField.Create(Self);\r\n xdsEinzelartikelHerstellerHersteller := TStringField.Create(Self);\r\n xdsEinzelartikelHerstellerHerstellerID := TStringField.Create(Self);\r\n xdsEinzelartikelHerstellerHerstellerURL := TStringField.Create(Self);\r\n xdsEinzelartikelArtderMengeISO3 := TStringField.Create(Self);\r\n xdsEinzelartikelArtderMengeMengenauswahl := TBooleanField.Create(Self);\r\n xdsEinzelartikelArtderMengeVGPauswahl := TBooleanField.Create(Self);\r\n xdsEinzelartikelArtderMengeUVPauswahl := TBooleanField.Create(Self);\r\n xdsEinzelartikelArtderMengeVKPDivisor := TFloatField.Create(Self);\r\n xdsEinzelartikelPfandArtPfandArt := TStringField.Create(Self);\r\n xdsEinzelartikelPfandArtPfandWert := TFloatField.Create(Self);\r\n xdsEinzelartikelPfandArtPfandwertEK := TFloatField.Create(Self);\r\n xdsEinzelartikelWarengruppeWGNR := TIntegerField.Create(Self);\r\n xdsEinzelartikelWarenuntergruppeWarenuntergruppe := TStringField.Create(Self);\r\n xdsEinzelartikelWarenuntergruppeWarengruppe := TStringField.Create(Self);\r\n xdsEinzelartikelWarenuntergruppeWUGNR := TIntegerField.Create(Self);\r\n xdsEinzelartikelWarenuntergruppeWGNR := TIntegerField.Create(Self);\r\n sourceEinzelartikel := TDataSource.Create(Self);\r\n WClient := TXDataWebClient.Create(Self);\r\n\r\n WebLabel1.BeforeLoadDFMValues;\r\n TC.BeforeLoadDFMValues;\r\n Container1.BeforeLoadDFMValues;\r\n Container2.BeforeLoadDFMValues;\r\n btnzurueck.BeforeLoadDFMValues;\r\n btnSpeichern.BeforeLoadDFMValues;\r\n edtBMenge.BeforeLoadDFMValues;\r\n edtArtikelnummer.BeforeLoadDFMValues;\r\n btnEtikettendruck.BeforeLoadDFMValues;\r\n Container3.BeforeLoadDFMValues;\r\n xdsEinzelartikel.BeforeLoadDFMValues;\r\n xdsEinzelartikelHersteller.BeforeLoadDFMValues;\r\n xdsEinzelartikelArtderMenge.BeforeLoadDFMValues;\r\n xdsEinzelartikelPfandArt.BeforeLoadDFMValues;\r\n xdsEinzelartikelWarengruppe.BeforeLoadDFMValues;\r\n xdsEinzelartikelWarenuntergruppe.BeforeLoadDFMValues;\r\n xdsEinzelartikelArtikelnummer.BeforeLoadDFMValues;\r\n xdsEinzelartikelArtikelueberschrift.BeforeLoadDFMValues;\r\n xdsEinzelartikelArtikelbeschreibung.BeforeLoadDFMValues;\r\n xdsEinzelartikelVerkaufspreis.BeforeLoadDFMValues;\r\n xdsEinzelartikelMindestbestand.BeforeLoadDFMValues;\r\n xdsEinzelartikelPreisliste.BeforeLoadDFMValues;\r\n xdsEinzelartikelGewicht.BeforeLoadDFMValues;\r\n xdsEinzelartikelBreite.BeforeLoadDFMValues;\r\n xdsEinzelartikelArtikelZusatz.BeforeLoadDFMValues;\r\n xdsEinzelartikelLagerort.BeforeLoadDFMValues;\r\n xdsEinzelartikelBuchungskonto.BeforeLoadDFMValues;\r\n xdsEinzelartikelEingangMenge.BeforeLoadDFMValues;\r\n xdsEinzelartikelEingangEndpreis.BeforeLoadDFMValues;\r\n xdsEinzelartikelAusgangMenge.BeforeLoadDFMValues;\r\n xdsEinzelartikelAusgangEndpreisEK.BeforeLoadDFMValues;\r\n xdsEinzelartikelAusgangEndpreisVK.BeforeLoadDFMValues;\r\n xdsEinzelartikelBestand.BeforeLoadDFMValues;\r\n xdsEinzelartikelBestandswert.BeforeLoadDFMValues;\r\n xdsEinzelartikelMarge.BeforeLoadDFMValues;\r\n xdsEinzelartikelMargeProzent.BeforeLoadDFMValues;\r\n xdsEinzelartikelArtikelnummer2.BeforeLoadDFMValues;\r\n xdsEinzelartikelArtikelmatchcode.BeforeLoadDFMValues;\r\n xdsEinzelartikelRabattpreis1.BeforeLoadDFMValues;\r\n xdsEinzelartikelRabattpreis2.BeforeLoadDFMValues;\r\n xdsEinzelartikelRabattpreis3.BeforeLoadDFMValues;\r\n xdsEinzelartikelRabattpreis4.BeforeLoadDFMValues;\r\n xdsEinzelartikelRabattpreis5.BeforeLoadDFMValues;\r\n xdsEinzelartikelArtikelnichtmehrgueltig.BeforeLoadDFMValues;\r\n xdsEinzelartikelEinkaufspreis.BeforeLoadDFMValues;\r\n xdsEinzelartikelAufschlag.BeforeLoadDFMValues;\r\n xdsEinzelartikelWarenbestand.BeforeLoadDFMValues;\r\n xdsEinzelartikelTextfrei10.BeforeLoadDFMValues;\r\n xdsEinzelartikelTextfrei20.BeforeLoadDFMValues;\r\n xdsEinzelartikelArtikelbeschreibungRTF.BeforeLoadDFMValues;\r\n xdsEinzelartikelArtikeldatei1.BeforeLoadDFMValues;\r\n xdsEinzelartikelArtikeldatei2.BeforeLoadDFMValues;\r\n xdsEinzelartikelArtikeldatei3.BeforeLoadDFMValues;\r\n xdsEinzelartikelArtikeldatei4.BeforeLoadDFMValues;\r\n xdsEinzelartikelArtikeldatei5.BeforeLoadDFMValues;\r\n xdsEinzelartikelEinkaufspreisVom.BeforeLoadDFMValues;\r\n xdsEinzelartikelEAN.BeforeLoadDFMValues;\r\n xdsEinzelartikelVGPFaktor.BeforeLoadDFMValues;\r\n xdsEinzelartikelVGPMengenart.BeforeLoadDFMValues;\r\n xdsEinzelartikelVerleihpreis.BeforeLoadDFMValues;\r\n xdsEinzelartikelZusatzPreis.BeforeLoadDFMValues;\r\n xdsEinzelartikelVerpackungsart.BeforeLoadDFMValues;\r\n xdsEinzelartikelVerpackungsMenge.BeforeLoadDFMValues;\r\n xdsEinzelartikelQuellartikel.BeforeLoadDFMValues;\r\n xdsEinzelartikelrabattierfaehig.BeforeLoadDFMValues;\r\n xdsEinzelartikelAngebotAlternativeAN.BeforeLoadDFMValues;\r\n xdsEinzelartikelPreisanteilNetto.BeforeLoadDFMValues;\r\n xdsEinzelartikelFarbe.BeforeLoadDFMValues;\r\n xdsEinzelartikelAEinkauf.BeforeLoadDFMValues;\r\n xdsEinzelartikelAVerkauf.BeforeLoadDFMValues;\r\n xdsEinzelartikelArtikelnummerLieferant.BeforeLoadDFMValues;\r\n xdsEinzelartikelLieferantnummer.BeforeLoadDFMValues;\r\n xdsEinzelartikelVerkaufspreisBrutto.BeforeLoadDFMValues;\r\n xdsEinzelartikelArtikelSet.BeforeLoadDFMValues;\r\n xdsEinzelartikelProvisionssatz.BeforeLoadDFMValues;\r\n xdsEinzelartikelWarentarifnummer.BeforeLoadDFMValues;\r\n xdsEinzelartikelHandelsartikel.BeforeLoadDFMValues;\r\n xdsEinzelartikelUrsprungsland.BeforeLoadDFMValues;\r\n xdsEinzelartikelKategorie.BeforeLoadDFMValues;\r\n xdsEinzelartikelStandardRabattsatzEK.BeforeLoadDFMValues;\r\n xdsEinzelartikelStandardRabattsatzVK.BeforeLoadDFMValues;\r\n xdsEinzelartikelRabattpreiseManuell.BeforeLoadDFMValues;\r\n xdsEinzelartikelMengeBestellt.BeforeLoadDFMValues;\r\n xdsEinzelartikelMengeBeauftragt.BeforeLoadDFMValues;\r\n xdsEinzelartikelBestandDisponiert.BeforeLoadDFMValues;\r\n xdsEinzelartikelMengeAngeboten.BeforeLoadDFMValues;\r\n xdsEinzelartikelBestandDispInclAngebot.BeforeLoadDFMValues;\r\n xdsEinzelartikelMWStKey.BeforeLoadDFMValues;\r\n xdsEinzelartikelShopAmazon.BeforeLoadDFMValues;\r\n xdsEinzelartikelShopQuelle.BeforeLoadDFMValues;\r\n xdsEinzelartikelGeraet.BeforeLoadDFMValues;\r\n xdsEinzelartikelArtgewicht.BeforeLoadDFMValues;\r\n xdsEinzelartikelVolumen.BeforeLoadDFMValues;\r\n xdsEinzelartikelPacklisteNichtAnzeigen.BeforeLoadDFMValues;\r\n xdsEinzelartikelKeineAufschlagskalkulation.BeforeLoadDFMValues;\r\n xdsEinzelartikelKorrekturMenge.BeforeLoadDFMValues;\r\n xdsEinzelartikelKorrekturWert.BeforeLoadDFMValues;\r\n xdsEinzelartikelNachfolgeartikel.BeforeLoadDFMValues;\r\n xdsEinzelartikelMindestbestellmenge.BeforeLoadDFMValues;\r\n xdsEinzelartikelSchnittEK.BeforeLoadDFMValues;\r\n xdsEinzelartikelVerkaufspreisVom.BeforeLoadDFMValues;\r\n xdsEinzelartikelPruefungChargeSNR.BeforeLoadDFMValues;\r\n xdsEinzelartikelArtikelbeschreibungHTML.BeforeLoadDFMValues;\r\n xdsEinzelartikelProduktKurzbeschreibungHTML.BeforeLoadDFMValues;\r\n xdsEinzelartikelStatusFuerShop.BeforeLoadDFMValues;\r\n xdsEinzelartikelAmpelFuerShop.BeforeLoadDFMValues;\r\n xdsEinzelartikelEXP_Anzahl.BeforeLoadDFMValues;\r\n xdsEinzelartikelEXP_Inhalt.BeforeLoadDFMValues;\r\n xdsEinzelartikelEXP_Faktor.BeforeLoadDFMValues;\r\n xdsEinzelartikelFach.BeforeLoadDFMValues;\r\n xdsEinzelartikelExportKasse.BeforeLoadDFMValues;\r\n xdsEinzelartikelWKNR.BeforeLoadDFMValues;\r\n xdsEinzelartikelArtikelAttribute.BeforeLoadDFMValues;\r\n xdsEinzelartikelErstelltAm.BeforeLoadDFMValues;\r\n xdsEinzelartikelVarianteVonAN.BeforeLoadDFMValues;\r\n xdsEinzelartikelGurtmassWerte.BeforeLoadDFMValues;\r\n xdsEinzelartikelGurtmass.BeforeLoadDFMValues;\r\n xdsEinzelartikelAltersgrenze.BeforeLoadDFMValues;\r\n xdsEinzelartikelMWStKeyImHaus.BeforeLoadDFMValues;\r\n xdsEinzelartikelKasseBewegung.BeforeLoadDFMValues;\r\n xdsEinzelartikelKasseBewegungEK.BeforeLoadDFMValues;\r\n xdsEinzelartikelKasseBewegungVK.BeforeLoadDFMValues;\r\n xdsEinzelartikelProduktionBewegung.BeforeLoadDFMValues;\r\n xdsEinzelartikelProduktionBewegungEK.BeforeLoadDFMValues;\r\n xdsEinzelartikelProduktionBewegungVK.BeforeLoadDFMValues;\r\n xdsEinzelartikelWaWiAB.BeforeLoadDFMValues;\r\n xdsEinzelartikelGeaendertAm.BeforeLoadDFMValues;\r\n xdsEinzelartikelGefahrgutKennzeichen.BeforeLoadDFMValues;\r\n xdsEinzelartikelVerpackG.BeforeLoadDFMValues;\r\n xdsEinzelartikelUPE.BeforeLoadDFMValues;\r\n xdsEinzelartikelArtikelbeschreibungEinkauf.BeforeLoadDFMValues;\r\n xdsEinzelartikelHerstellerArtikelnummer.BeforeLoadDFMValues;\r\n xdsEinzelartikelNatura.BeforeLoadDFMValues;\r\n xdsEinzelartikelArbeitszeit.BeforeLoadDFMValues;\r\n xdsEinzelartikelWarengruppeWarengruppe.BeforeLoadDFMValues;\r\n xdsEinzelartikelLaenge.BeforeLoadDFMValues;\r\n xdsEinzelartikelHoehe.BeforeLoadDFMValues;\r\n xdsEinzelartikelArtderMengeArtderMenge.BeforeLoadDFMValues;\r\n xdsEinzelartikelHerstellerHersteller.BeforeLoadDFMValues;\r\n xdsEinzelartikelHerstellerHerstellerID.BeforeLoadDFMValues;\r\n xdsEinzelartikelHerstellerHerstellerURL.BeforeLoadDFMValues;\r\n xdsEinzelartikelArtderMengeISO3.BeforeLoadDFMValues;\r\n xdsEinzelartikelArtderMengeMengenauswahl.BeforeLoadDFMValues;\r\n xdsEinzelartikelArtderMengeVGPauswahl.BeforeLoadDFMValues;\r\n xdsEinzelartikelArtderMengeUVPauswahl.BeforeLoadDFMValues;\r\n xdsEinzelartikelArtderMengeVKPDivisor.BeforeLoadDFMValues;\r\n xdsEinzelartikelPfandArtPfandArt.BeforeLoadDFMValues;\r\n xdsEinzelartikelPfandArtPfandWert.BeforeLoadDFMValues;\r\n xdsEinzelartikelPfandArtPfandwertEK.BeforeLoadDFMValues;\r\n xdsEinzelartikelWarengruppeWGNR.BeforeLoadDFMValues;\r\n xdsEinzelartikelWarenuntergruppeWarenuntergruppe.BeforeLoadDFMValues;\r\n xdsEinzelartikelWarenuntergruppeWarengruppe.BeforeLoadDFMValues;\r\n xdsEinzelartikelWarenuntergruppeWUGNR.BeforeLoadDFMValues;\r\n xdsEinzelartikelWarenuntergruppeWGNR.BeforeLoadDFMValues;\r\n sourceEinzelartikel.BeforeLoadDFMValues;\r\n WClient.BeforeLoadDFMValues;\r\n try\r\n Name := 'frmArtikel';\r\n Width := 269;\r\n Height := 290;\r\n CSSLibrary := cssBootstrap;\r\n ElementFont := efCSS;\r\n SetEvent(Self, 'OnShow', 'WebFormShow');\r\n WebLabel1.SetParentComponent(Self);\r\n WebLabel1.Name := 'WebLabel1';\r\n WebLabel1.Left := 8;\r\n WebLabel1.Top := 166;\r\n WebLabel1.Width := 142;\r\n WebLabel1.Height := 15;\r\n WebLabel1.Caption := 'Bestellvormerkung Menge:';\r\n WebLabel1.ElementClassName := 'h6 text-primary m-2';\r\n WebLabel1.ElementFont := efCSS;\r\n WebLabel1.ElementPosition := epIgnore;\r\n WebLabel1.HeightStyle := ssAuto;\r\n WebLabel1.HeightPercent := 100.000000000000000000;\r\n WebLabel1.WidthStyle := ssAuto;\r\n WebLabel1.WidthPercent := 100.000000000000000000;\r\n TC.SetParentComponent(Self);\r\n TC.Name := 'TC';\r\n TC.Left := 0;\r\n TC.Top := 82;\r\n TC.Width := 269;\r\n TC.Height := 208;\r\n TC.ElementClassName := 'table table-hover table-bordered table-striped';\r\n TC.HeightStyle := ssAuto;\r\n TC.WidthStyle := ssAuto;\r\n TC.Align := alClient;\r\n TC.BorderColor := clSilver;\r\n TC.ChildOrder := 2;\r\n TC.ColHeader := False;\r\n TC.ElementFont := efCSS;\r\n TC.ElementHeaderClassName := 'table-info';\r\n TC.ElementPosition := epIgnore;\r\n TC.ElementTableClassName := 'table table-hover table-bordered table-striped';\r\n TC.WordWrap := True;\r\n TC.ColCount := 2;\r\n Container1.SetParentComponent(Self);\r\n Container1.Name := 'Container1';\r\n Container1.Left := 0;\r\n Container1.Top := 0;\r\n Container1.Width := 269;\r\n Container1.Height := 41;\r\n Container1.HeightStyle := ssAuto;\r\n Container1.WidthStyle := ssPercent;\r\n Container1.Align := alTop;\r\n Container1.ElementFont := efCSS;\r\n Container1.ElementPosition := epIgnore;\r\n Container2.SetParentComponent(Self);\r\n Container2.Name := 'Container2';\r\n Container2.Left := 0;\r\n Container2.Top := 41;\r\n Container2.Width := 269;\r\n Container2.Height := 41;\r\n Container2.ElementClassName := 'd-flex flex-wrap m-1';\r\n Container2.HeightStyle := ssAuto;\r\n Container2.WidthStyle := ssAuto;\r\n Container2.Align := alTop;\r\n Container2.ChildOrder := 1;\r\n Container2.ElementFont := efCSS;\r\n Container2.ElementPosition := epIgnore;\r\n btnzurueck.SetParentComponent(Self);\r\n btnzurueck.Name := 'btnzurueck';\r\n btnzurueck.Left := 8;\r\n btnzurueck.Top := 135;\r\n btnzurueck.Width := 96;\r\n btnzurueck.Height := 25;\r\n btnzurueck.Caption := '<< zur'#252'ck';\r\n btnzurueck.ChildOrder := 4;\r\n btnzurueck.ElementClassName := 'btn btn-info btn-sm m-1 text-left';\r\n btnzurueck.ElementFont := efCSS;\r\n btnzurueck.ElementPosition := epIgnore;\r\n btnzurueck.HeightStyle := ssAuto;\r\n btnzurueck.HeightPercent := 100.000000000000000000;\r\n btnzurueck.WidthStyle := ssAuto;\r\n btnzurueck.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnzurueck, Self, 'OnClick', 'btnzurueckClick');\r\n btnSpeichern.SetParentComponent(Self);\r\n btnSpeichern.Name := 'btnSpeichern';\r\n btnSpeichern.Left := 8;\r\n btnSpeichern.Top := 210;\r\n btnSpeichern.Width := 96;\r\n btnSpeichern.Height := 25;\r\n btnSpeichern.Caption := 'speichern';\r\n btnSpeichern.ChildOrder := 6;\r\n btnSpeichern.ElementClassName := 'btn btn-info btn-sm m-1 text-left';\r\n btnSpeichern.ElementFont := efCSS;\r\n btnSpeichern.ElementPosition := epIgnore;\r\n btnSpeichern.HeightStyle := ssAuto;\r\n btnSpeichern.HeightPercent := 100.000000000000000000;\r\n btnSpeichern.WidthStyle := ssAuto;\r\n btnSpeichern.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnSpeichern, Self, 'OnClick', 'btnSpeichernClick');\r\n edtBMenge.SetParentComponent(Self);\r\n edtBMenge.Name := 'edtBMenge';\r\n edtBMenge.Left := 8;\r\n edtBMenge.Top := 185;\r\n edtBMenge.Width := 121;\r\n edtBMenge.Height := 19;\r\n edtBMenge.ChildOrder := 2;\r\n edtBMenge.EditType := weFloat;\r\n edtBMenge.ElementClassName := 'form-control input-sm';\r\n edtBMenge.ElementFont := efCSS;\r\n edtBMenge.ElementPosition := epIgnore;\r\n edtBMenge.HeightStyle := ssAuto;\r\n edtBMenge.HeightPercent := 100.000000000000000000;\r\n edtBMenge.TextHint := 'eintragen';\r\n edtBMenge.WidthPercent := 100.000000000000000000;\r\n edtArtikelnummer.SetParentComponent(Self);\r\n edtArtikelnummer.Name := 'edtArtikelnummer';\r\n edtArtikelnummer.Left := 110;\r\n edtArtikelnummer.Top := 210;\r\n edtArtikelnummer.Width := 121;\r\n edtArtikelnummer.Height := 19;\r\n edtArtikelnummer.ChildOrder := 8;\r\n edtArtikelnummer.ElementClassName := 'form-control';\r\n edtArtikelnummer.ElementFont := efCSS;\r\n edtArtikelnummer.ElementPosition := epIgnore;\r\n edtArtikelnummer.HeightPercent := 100.000000000000000000;\r\n edtArtikelnummer.Text := 'edtArtikelnummer';\r\n edtArtikelnummer.Visible := False;\r\n edtArtikelnummer.WidthPercent := 100.000000000000000000;\r\n SetEvent(edtArtikelnummer, Self, 'OnChange', 'edtArtikelnummerChange');\r\n btnEtikettendruck.SetParentComponent(Self);\r\n btnEtikettendruck.Name := 'btnEtikettendruck';\r\n btnEtikettendruck.Left := 110;\r\n btnEtikettendruck.Top := 149;\r\n btnEtikettendruck.Width := 96;\r\n btnEtikettendruck.Height := 25;\r\n btnEtikettendruck.Caption := 'Etikettendruck';\r\n btnEtikettendruck.ChildOrder := 4;\r\n btnEtikettendruck.ElementClassName := 'btn btn-info btn-sm m-1 text-left';\r\n btnEtikettendruck.ElementFont := efCSS;\r\n btnEtikettendruck.ElementPosition := epIgnore;\r\n btnEtikettendruck.HeightStyle := ssAuto;\r\n btnEtikettendruck.HeightPercent := 100.000000000000000000;\r\n btnEtikettendruck.WidthStyle := ssAuto;\r\n btnEtikettendruck.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnEtikettendruck, Self, 'OnClick', 'btnEtikettendruckClick');\r\n Container3.SetParentComponent(Self);\r\n Container3.Name := 'Container3';\r\n Container3.Left := 8;\r\n Container3.Top := 102;\r\n Container3.Width := 169;\r\n Container3.Height := 41;\r\n Container3.ElementClassName := 'd-flex flex-wrap m-1 border border-info';\r\n Container3.HeightStyle := ssAuto;\r\n Container3.WidthStyle := ssAuto;\r\n Container3.ChildOrder := 2;\r\n Container3.ElementFont := efCSS;\r\n Container3.ElementPosition := epIgnore;\r\n xdsEinzelartikel.SetParentComponent(Self);\r\n xdsEinzelartikel.Name := 'xdsEinzelartikel';\r\n xdsEinzelartikel.AfterOpen := xdsEinzelartikelAfterOpen;\r\n xdsEinzelartikel.EntitySetName := 'Artikel';\r\n xdsEinzelartikel.Connection := DM2.XDataWebConnection1;\r\n xdsEinzelartikel.SubpropsDepth := 1;\r\n xdsEinzelartikel.QueryTop := 1;\r\n xdsEinzelartikel.Left := 100;\r\n xdsEinzelartikel.Top := 21;\r\n xdsEinzelartikelHersteller.SetParentComponent(xdsEinzelartikel);\r\n xdsEinzelartikelHersteller.Name := 'xdsEinzelartikelHersteller';\r\n xdsEinzelartikelHersteller.FieldName := 'Hersteller';\r\n xdsEinzelartikelHersteller.Required := True;\r\n xdsEinzelartikelArtderMenge.SetParentComponent(xdsEinzelartikel);\r\n xdsEinzelartikelArtderMenge.Name := 'xdsEinzelartikelArtderMenge';\r\n xdsEinzelartikelArtderMenge.FieldName := 'ArtderMenge';\r\n xdsEinzelartikelArtderMenge.Required := True;\r\n xdsEinzelartikelPfandArt.SetParentComponent(xdsEinzelartikel);\r\n xdsEinzelartikelPfandArt.Name := 'xdsEinzelartikelPfandArt';\r\n xdsEinzelartikelPfandArt.FieldName := 'PfandArt';\r\n xdsEinzelartikelWarengruppe.SetParentComponent(xdsEinzelartikel);\r\n xdsEinzelartikelWarengruppe.Name := 'xdsEinzelartikelWarengruppe';\r\n xdsEinzelartikelWarengruppe.FieldName := 'Warengruppe';\r\n xdsEinzelartikelWarenuntergruppe.SetParentComponent(xdsEinzelartikel);\r\n xdsEinzelartikelWarenuntergruppe.Name := 'xdsEinzelartikelWarenuntergruppe';\r\n xdsEinzelartikelWarenuntergruppe.FieldName := 'Warenuntergruppe';\r\n xdsEinzelartikelArtikelnummer.SetParentComponent(xdsEinzelartikel);\r\n xdsEinzelartikelArtikelnummer.Name := 'xdsEinzelartikelArtikelnummer';\r\n xdsEinzelartikelArtikelnummer.FieldName := 'Artikelnummer';\r\n xdsEinzelartikelArtikelnummer.Required := True;\r\n xdsEinzelartikelArtikelnummer.Size := 25;\r\n xdsEinzelartikelArtikelueberschrift.SetParentComponent(xdsEinzelartikel);\r\n xdsEinzelartikelArtikelueberschrift.Name := 'xdsEinzelartikelArtikelueberschrift';\r\n xdsEinzelartikelArtikelueberschrift.FieldName := 'Artikelueberschrift';\r\n xdsEinzelartikelArtikelueberschrift.Size := 50;\r\n xdsEinzelartikelArtikelbeschreibung.SetParentComponent(xdsEinzelartikel);\r\n xdsEinzelartikelArtikelbeschreibung.Name := 'xdsEinzelartikelArtikelbeschreibung';\r\n xdsEinzelartikelArtikelbeschreibung.FieldName := 'Artikelbeschreibung';\r\n xdsEinzelartikelArtikelbeschreibung.Size := 255;\r\n xdsEinzelartikelVerkaufspreis.SetParentComponent(xdsEinzelartikel);\r\n xdsEinzelartikelVerkaufspreis.Name := 'xdsEinzelartikelVerkaufspreis';\r\n xdsEinzelartikelVerkaufspreis.FieldName := 'Verkaufspreis';\r\n xdsEinzelartikelMindestbestand.SetParentComponent(xdsEinzelartikel);\r\n xdsEinzelartikelMindestbestand.Name := 'xdsEinzelartikelMindestbestand';\r\n xdsEinzelartikelMindestbestand.FieldName := 'Mindestbestand';\r\n xdsEinzelartikelPreisliste.SetParentComponent(xdsEinzelartikel);\r\n xdsEinzelartikelPreisliste.Name := 'xdsEinzelartikelPreisliste';\r\n xdsEinzelartikelPreisliste.FieldName := 'Preisliste';\r\n xdsEinzelartikelPreisliste.Size := 150;\r\n xdsEinzelartikelGewicht.SetParentComponent(xdsEinzelartikel);\r\n xdsEinzelartikelGewicht.Name := 'xdsEinzelartikelGewicht';\r\n xdsEinzelartikelGewicht.FieldName := 'Gewicht';\r\n xdsEinzelartikelBreite.SetParentComponent(xdsEinzelartikel);\r\n xdsEinzelartikelBreite.Name := 'xdsEinzelartikelBreite';\r\n xdsEinzelartikelBreite.FieldName := 'Breite';\r\n xdsEinzelartikelArtikelZusatz.SetParentComponent(xdsEinzelartikel);\r\n xdsEinzelartikelArtikelZusatz.Name := 'xdsEinzelartikelArtikelZusatz';\r\n xdsEinzelartikelArtikelZusatz.FieldName := 'ArtikelZusatz';\r\n xdsEinzelartikelArtikelZusatz.Size := 255;\r\n xdsEinzelartikelLagerort.SetParentComponent(xdsEinzelartikel);\r\n xdsEinzelartikelLagerort.Name := 'xdsEinzelartikelLagerort';\r\n xdsEinzelartikelLagerort.FieldName := 'Lagerort';\r\n xdsEinzelartikelLagerort.Size := 50;\r\n xdsEinzelartikelBuchungskonto.SetParentComponent(xdsEinzelartikel);\r\n xdsEinzelartikelBuchungskonto.Name := 'xdsEinzelartikelBuchungskonto';\r\n xdsEinzelartikelBuchungskonto.FieldName := 'Buchungskonto';\r\n xdsEinzelartikelEingangMenge.SetParentComponent(xdsEinzelartikel);\r\n xdsEinzelartikelEingangMenge.Name := 'xdsEinzelartikelEingangMenge';\r\n xdsEinzelartikelEingangMenge.FieldName := 'EingangMenge';\r\n xdsEinzelartikelEingangEndpreis.SetParentComponent(xdsEinzelartikel);\r\n xdsEinzelartikelEingangEndpreis.Name := 'xdsEinzelartikelEingangEndpreis';\r\n xdsEinzelartikelEingangEndpreis.FieldName := 'EingangEndpreis';\r\n xdsEinzelartikelAusgangMenge.SetParentComponent(xdsEinzelartikel);\r\n xdsEinzelartikelAusgangMenge.Name := 'xdsEinzelartikelAusgangMenge';\r\n xdsEinzelartikelAusgangMenge.FieldName := 'AusgangMenge';\r\n xdsEinzelartikelAusgangEndpreisEK.SetParentComponent(xdsEinzelartikel);\r\n xdsEinzelartikelAusgangEndpreisEK.Name := 'xdsEinzelartikelAusgangEndpreisEK';\r\n xdsEinzelartikelAusgangEndpreisEK.FieldName := 'AusgangEndpreisEK';\r\n xdsEinzelartikelAusgangEndpreisVK.SetParentComponent(xdsEinzelartikel);\r\n xdsEinzelartikelAusgangEndpreisVK.Name := 'xdsEinzelartikelAusgangEndpreisVK';\r\n xdsEinzelartikelAusgangEndpreisVK.FieldName := 'AusgangEndpreisVK';\r\n xdsEinzelartikelBestand.SetParentComponent(xdsEinzelartikel);\r\n xdsEinzelartikelBestand.Name := 'xdsEinzelartikelBestand';\r\n xdsEinzelartikelBestand.FieldName := 'Bestand';\r\n xdsEinzelartikelBestandswert.SetParentComponent(xdsEinzelartikel);\r\n xdsEinzelartikelBestandswert.Name := 'xdsEinzelartikelBestandswert';\r\n xdsEinzelartikelBestandswert.FieldName := 'Bestandswert';\r\n xdsEinzelartikelMarge.SetParentComponent(xdsEinzelartikel);\r\n xdsEinzelartikelMarge.Name := 'xdsEinzelartikelMarge';\r\n xdsEinzelartikelMarge.FieldName := 'Marge';\r\n xdsEinzelartikelMargeProzent.SetParentComponent(xdsEinzelartikel);\r\n xdsEinzelartikelMargeProzent.Name := 'xdsEinzelartikelMargeProzent';\r\n xdsEinzelartikelMargeProzent.FieldName := 'MargeProzent';\r\n xdsEinzelartikelArtikelnummer2.SetParentComponent(xdsEinzelartikel);\r\n xdsEinzelartikelArtikelnummer2.Name := 'xdsEinzelartikelArtikelnummer2';\r\n xdsEinzelartikelArtikelnummer2.FieldName := 'Artikelnummer2';\r\n xdsEinzelartikelArtikelnummer2.Size := 25;\r\n xdsEinzelartikelArtikelmatchcode.SetParentComponent(xdsEinzelartikel);\r\n xdsEinzelartikelArtikelmatchcode.Name := 'xdsEinzelartikelArtikelmatchcode';\r\n xdsEinzelartikelArtikelmatchcode.FieldName := 'Artikelmatchcode';\r\n xdsEinzelartikelArtikelmatchcode.Size := 30;\r\n xdsEinzelartikelRabattpreis1.SetParentComponent(xdsEinzelartikel);\r\n xdsEinzelartikelRabattpreis1.Name := 'xdsEinzelartikelRabattpreis1';\r\n xdsEinzelartikelRabattpreis1.FieldName := 'Rabattpreis1';\r\n xdsEinzelartikelRabattpreis2.SetParentComponent(xdsEinzelartikel);\r\n xdsEinzelartikelRabattpreis2.Name := 'xdsEinzelartikelRabattpreis2';\r\n xdsEinzelartikelRabattpreis2.FieldName := 'Rabattpreis2';\r\n xdsEinzelartikelRabattpreis3.SetParentComponent(xdsEinzelartikel);\r\n xdsEinzelartikelRabattpreis3.Name := 'xdsEinzelartikelRabattpreis3';\r\n xdsEinzelartikelRabattpreis3.FieldName := 'Rabattpreis3';\r\n xdsEinzelartikelRabattpreis4.SetParentComponent(xdsEinzelartikel);\r\n xdsEinzelartikelRabattpreis4.Name := 'xdsEinzelartikelRabattpreis4';\r\n xdsEinzelartikelRabattpreis4.FieldName := 'Rabattpreis4';\r\n xdsEinzelartikelRabattpreis5.SetParentComponent(xdsEinzelartikel);\r\n xdsEinzelartikelRabattpreis5.Name := 'xdsEinzelartikelRabattpreis5';\r\n xdsEinzelartikelRabattpreis5.FieldName := 'Rabattpreis5';\r\n xdsEinzelartikelArtikelnichtmehrgueltig.SetParentComponent(xdsEinzelartikel);\r\n xdsEinzelartikelArtikelnichtmehrgueltig.Name := 'xdsEinzelartikelArtikelnichtmehrgueltig';\r\n xdsEinzelartikelArtikelnichtmehrgueltig.FieldName := 'Artikelnichtmehrgueltig';\r\n xdsEinzelartikelEinkaufspreis.SetParentComponent(xdsEinzelartikel);\r\n xdsEinzelartikelEinkaufspreis.Name := 'xdsEinzelartikelEinkaufspreis';\r\n xdsEinzelartikelEinkaufspreis.FieldName := 'Einkaufspreis';\r\n xdsEinzelartikelAufschlag.SetParentComponent(xdsEinzelartikel);\r\n xdsEinzelartikelAufschlag.Name := 'xdsEinzelartikelAufschlag';\r\n xdsEinzelartikelAufschlag.FieldName := 'Aufschlag';\r\n xdsEinzelartikelWarenbestand.SetParentComponent(xdsEinzelartikel);\r\n xdsEinzelartikelWarenbestand.Name := 'xdsEinzelartikelWarenbestand';\r\n xdsEinzelartikelWarenbestand.FieldName := 'Warenbestand';\r\n xdsEinzelartikelTextfrei10.SetParentComponent(xdsEinzelartikel);\r\n xdsEinzelartikelTextfrei10.Name := 'xdsEinzelartikelTextfrei10';\r\n xdsEinzelartikelTextfrei10.FieldName := 'Textfrei10';\r\n xdsEinzelartikelTextfrei10.Size := 50;\r\n xdsEinzelartikelTextfrei20.SetParentComponent(xdsEinzelartikel);\r\n xdsEinzelartikelTextfrei20.Name := 'xdsEinzelartikelTextfrei20';\r\n xdsEinzelartikelTextfrei20.FieldName := 'Textfrei20';\r\n xdsEinzelartikelTextfrei20.Size := 50;\r\n xdsEinzelartikelArtikelbeschreibungRTF.SetParentComponent(xdsEinzelartikel);\r\n xdsEinzelartikelArtikelbeschreibungRTF.Name := 'xdsEinzelartikelArtikelbeschreibungRTF';\r\n xdsEinzelartikelArtikelbeschreibungRTF.FieldName := 'ArtikelbeschreibungRTF';\r\n xdsEinzelartikelArtikelbeschreibungRTF.Size := 255;\r\n xdsEinzelartikelArtikeldatei1.SetParentComponent(xdsEinzelartikel);\r\n xdsEinzelartikelArtikeldatei1.Name := 'xdsEinzelartikelArtikeldatei1';\r\n xdsEinzelartikelArtikeldatei1.FieldName := 'Artikeldatei1';\r\n xdsEinzelartikelArtikeldatei1.Size := 255;\r\n xdsEinzelartikelArtikeldatei2.SetParentComponent(xdsEinzelartikel);\r\n xdsEinzelartikelArtikeldatei2.Name := 'xdsEinzelartikelArtikeldatei2';\r\n xdsEinzelartikelArtikeldatei2.FieldName := 'Artikeldatei2';\r\n xdsEinzelartikelArtikeldatei2.Size := 255;\r\n xdsEinzelartikelArtikeldatei3.SetParentComponent(xdsEinzelartikel);\r\n xdsEinzelartikelArtikeldatei3.Name := 'xdsEinzelartikelArtikeldatei3';\r\n xdsEinzelartikelArtikeldatei3.FieldName := 'Artikeldatei3';\r\n xdsEinzelartikelArtikeldatei3.Size := 255;\r\n xdsEinzelartikelArtikeldatei4.SetParentComponent(xdsEinzelartikel);\r\n xdsEinzelartikelArtikeldatei4.Name := 'xdsEinzelartikelArtikeldatei4';\r\n xdsEinzelartikelArtikeldatei4.FieldName := 'Artikeldatei4';\r\n xdsEinzelartikelArtikeldatei4.Size := 255;\r\n xdsEinzelartikelArtikeldatei5.SetParentComponent(xdsEinzelartikel);\r\n xdsEinzelartikelArtikeldatei5.Name := 'xdsEinzelartikelArtikeldatei5';\r\n xdsEinzelartikelArtikeldatei5.FieldName := 'Artikeldatei5';\r\n xdsEinzelartikelArtikeldatei5.Size := 255;\r\n xdsEinzelartikelEinkaufspreisVom.SetParentComponent(xdsEinzelartikel);\r\n xdsEinzelartikelEinkaufspreisVom.Name := 'xdsEinzelartikelEinkaufspreisVom';\r\n xdsEinzelartikelEinkaufspreisVom.FieldName := 'EinkaufspreisVom';\r\n xdsEinzelartikelEAN.SetParentComponent(xdsEinzelartikel);\r\n xdsEinzelartikelEAN.Name := 'xdsEinzelartikelEAN';\r\n xdsEinzelartikelEAN.FieldName := 'EAN';\r\n xdsEinzelartikelEAN.Size := 15;\r\n xdsEinzelartikelVGPFaktor.SetParentComponent(xdsEinzelartikel);\r\n xdsEinzelartikelVGPFaktor.Name := 'xdsEinzelartikelVGPFaktor';\r\n xdsEinzelartikelVGPFaktor.FieldName := 'VGPFaktor';\r\n xdsEinzelartikelVGPMengenart.SetParentComponent(xdsEinzelartikel);\r\n xdsEinzelartikelVGPMengenart.Name := 'xdsEinzelartikelVGPMengenart';\r\n xdsEinzelartikelVGPMengenart.FieldName := 'VGPMengenart';\r\n xdsEinzelartikelVGPMengenart.Size := 50;\r\n xdsEinzelartikelVerleihpreis.SetParentComponent(xdsEinzelartikel);\r\n xdsEinzelartikelVerleihpreis.Name := 'xdsEinzelartikelVerleihpreis';\r\n xdsEinzelartikelVerleihpreis.FieldName := 'Verleihpreis';\r\n xdsEinzelartikelZusatzPreis.SetParentComponent(xdsEinzelartikel);\r\n xdsEinzelartikelZusatzPreis.Name := 'xdsEinzelartikelZusatzPreis';\r\n xdsEinzelartikelZusatzPreis.FieldName := 'ZusatzPreis';\r\n xdsEinzelartikelVerpackungsart.SetParentComponent(xdsEinzelartikel);\r\n xdsEinzelartikelVerpackungsart.Name := 'xdsEinzelartikelVerpackungsart';\r\n xdsEinzelartikelVerpackungsart.FieldName := 'Verpackungsart';\r\n xdsEinzelartikelVerpackungsart.Size := 50;\r\n xdsEinzelartikelVerpackungsMenge.SetParentComponent(xdsEinzelartikel);\r\n xdsEinzelartikelVerpackungsMenge.Name := 'xdsEinzelartikelVerpackungsMenge';\r\n xdsEinzelartikelVerpackungsMenge.FieldName := 'VerpackungsMenge';\r\n xdsEinzelartikelQuellartikel.SetParentComponent(xdsEinzelartikel);\r\n xdsEinzelartikelQuellartikel.Name := 'xdsEinzelartikelQuellartikel';\r\n xdsEinzelartikelQuellartikel.FieldName := 'Quellartikel';\r\n xdsEinzelartikelQuellartikel.Size := 25;\r\n xdsEinzelartikelrabattierfaehig.SetParentComponent(xdsEinzelartikel);\r\n xdsEinzelartikelrabattierfaehig.Name := 'xdsEinzelartikelrabattierfaehig';\r\n xdsEinzelartikelrabattierfaehig.FieldName := 'rabattierfaehig';\r\n xdsEinzelartikelAngebotAlternativeAN.SetParentComponent(xdsEinzelartikel);\r\n xdsEinzelartikelAngebotAlternativeAN.Name := 'xdsEinzelartikelAngebotAlternativeAN';\r\n xdsEinzelartikelAngebotAlternativeAN.FieldName := 'AngebotAlternativeAN';\r\n xdsEinzelartikelAngebotAlternativeAN.Size := 25;\r\n xdsEinzelartikelPreisanteilNetto.SetParentComponent(xdsEinzelartikel);\r\n xdsEinzelartikelPreisanteilNetto.Name := 'xdsEinzelartikelPreisanteilNetto';\r\n xdsEinzelartikelPreisanteilNetto.FieldName := 'PreisanteilNetto';\r\n xdsEinzelartikelFarbe.SetParentComponent(xdsEinzelartikel);\r\n xdsEinzelartikelFarbe.Name := 'xdsEinzelartikelFarbe';\r\n xdsEinzelartikelFarbe.FieldName := 'Farbe';\r\n xdsEinzelartikelAEinkauf.SetParentComponent(xdsEinzelartikel);\r\n xdsEinzelartikelAEinkauf.Name := 'xdsEinzelartikelAEinkauf';\r\n xdsEinzelartikelAEinkauf.FieldName := 'AEinkauf';\r\n xdsEinzelartikelAVerkauf.SetParentComponent(xdsEinzelartikel);\r\n xdsEinzelartikelAVerkauf.Name := 'xdsEinzelartikelAVerkauf';\r\n xdsEinzelartikelAVerkauf.FieldName := 'AVerkauf';\r\n xdsEinzelartikelArtikelnummerLieferant.SetParentComponent(xdsEinzelartikel);\r\n xdsEinzelartikelArtikelnummerLieferant.Name := 'xdsEinzelartikelArtikelnummerLieferant';\r\n xdsEinzelartikelArtikelnummerLieferant.FieldName := 'ArtikelnummerLieferant';\r\n xdsEinzelartikelLieferantnummer.SetParentComponent(xdsEinzelartikel);\r\n xdsEinzelartikelLieferantnummer.Name := 'xdsEinzelartikelLieferantnummer';\r\n xdsEinzelartikelLieferantnummer.FieldName := 'Lieferantnummer';\r\n xdsEinzelartikelLieferantnummer.Size := 13;\r\n xdsEinzelartikelVerkaufspreisBrutto.SetParentComponent(xdsEinzelartikel);\r\n xdsEinzelartikelVerkaufspreisBrutto.Name := 'xdsEinzelartikelVerkaufspreisBrutto';\r\n xdsEinzelartikelVerkaufspreisBrutto.FieldName := 'VerkaufspreisBrutto';\r\n xdsEinzelartikelArtikelSet.SetParentComponent(xdsEinzelartikel);\r\n xdsEinzelartikelArtikelSet.Name := 'xdsEinzelartikelArtikelSet';\r\n xdsEinzelartikelArtikelSet.FieldName := 'ArtikelSet';\r\n xdsEinzelartikelProvisionssatz.SetParentComponent(xdsEinzelartikel);\r\n xdsEinzelartikelProvisionssatz.Name := 'xdsEinzelartikelProvisionssatz';\r\n xdsEinzelartikelProvisionssatz.FieldName := 'Provisionssatz';\r\n xdsEinzelartikelWarentarifnummer.SetParentComponent(xdsEinzelartikel);\r\n xdsEinzelartikelWarentarifnummer.Name := 'xdsEinzelartikelWarentarifnummer';\r\n xdsEinzelartikelWarentarifnummer.FieldName := 'Warentarifnummer';\r\n xdsEinzelartikelHandelsartikel.SetParentComponent(xdsEinzelartikel);\r\n xdsEinzelartikelHandelsartikel.Name := 'xdsEinzelartikelHandelsartikel';\r\n xdsEinzelartikelHandelsartikel.FieldName := 'Handelsartikel';\r\n xdsEinzelartikelUrsprungsland.SetParentComponent(xdsEinzelartikel);\r\n xdsEinzelartikelUrsprungsland.Name := 'xdsEinzelartikelUrsprungsland';\r\n xdsEinzelartikelUrsprungsland.FieldName := 'Ursprungsland';\r\n xdsEinzelartikelUrsprungsland.Size := 5;\r\n xdsEinzelartikelKategorie.SetParentComponent(xdsEinzelartikel);\r\n xdsEinzelartikelKategorie.Name := 'xdsEinzelartikelKategorie';\r\n xdsEinzelartikelKategorie.FieldName := 'Kategorie';\r\n xdsEinzelartikelKategorie.Size := 25;\r\n xdsEinzelartikelStandardRabattsatzEK.SetParentComponent(xdsEinzelartikel);\r\n xdsEinzelartikelStandardRabattsatzEK.Name := 'xdsEinzelartikelStandardRabattsatzEK';\r\n xdsEinzelartikelStandardRabattsatzEK.FieldName := 'StandardRabattsatzEK';\r\n xdsEinzelartikelStandardRabattsatzVK.SetParentComponent(xdsEinzelartikel);\r\n xdsEinzelartikelStandardRabattsatzVK.Name := 'xdsEinzelartikelStandardRabattsatzVK';\r\n xdsEinzelartikelStandardRabattsatzVK.FieldName := 'StandardRabattsatzVK';\r\n xdsEinzelartikelRabattpreiseManuell.SetParentComponent(xdsEinzelartikel);\r\n xdsEinzelartikelRabattpreiseManuell.Name := 'xdsEinzelartikelRabattpreiseManuell';\r\n xdsEinzelartikelRabattpreiseManuell.FieldName := 'RabattpreiseManuell';\r\n xdsEinzelartikelMengeBestellt.SetParentComponent(xdsEinzelartikel);\r\n xdsEinzelartikelMengeBestellt.Name := 'xdsEinzelartikelMengeBestellt';\r\n xdsEinzelartikelMengeBestellt.FieldName := 'MengeBestellt';\r\n xdsEinzelartikelMengeBeauftragt.SetParentComponent(xdsEinzelartikel);\r\n xdsEinzelartikelMengeBeauftragt.Name := 'xdsEinzelartikelMengeBeauftragt';\r\n xdsEinzelartikelMengeBeauftragt.FieldName := 'MengeBeauftragt';\r\n xdsEinzelartikelBestandDisponiert.SetParentComponent(xdsEinzelartikel);\r\n xdsEinzelartikelBestandDisponiert.Name := 'xdsEinzelartikelBestandDisponiert';\r\n xdsEinzelartikelBestandDisponiert.FieldName := 'BestandDisponiert';\r\n xdsEinzelartikelMengeAngeboten.SetParentComponent(xdsEinzelartikel);\r\n xdsEinzelartikelMengeAngeboten.Name := 'xdsEinzelartikelMengeAngeboten';\r\n xdsEinzelartikelMengeAngeboten.FieldName := 'MengeAngeboten';\r\n xdsEinzelartikelBestandDispInclAngebot.SetParentComponent(xdsEinzelartikel);\r\n xdsEinzelartikelBestandDispInclAngebot.Name := 'xdsEinzelartikelBestandDispInclAngebot';\r\n xdsEinzelartikelBestandDispInclAngebot.FieldName := 'BestandDispInclAngebot';\r\n xdsEinzelartikelMWStKey.SetParentComponent(xdsEinzelartikel);\r\n xdsEinzelartikelMWStKey.Name := 'xdsEinzelartikelMWStKey';\r\n xdsEinzelartikelMWStKey.FieldName := 'MWStKey';\r\n xdsEinzelartikelShopAmazon.SetParentComponent(xdsEinzelartikel);\r\n xdsEinzelartikelShopAmazon.Name := 'xdsEinzelartikelShopAmazon';\r\n xdsEinzelartikelShopAmazon.FieldName := 'ShopAmazon';\r\n xdsEinzelartikelShopQuelle.SetParentComponent(xdsEinzelartikel);\r\n xdsEinzelartikelShopQuelle.Name := 'xdsEinzelartikelShopQuelle';\r\n xdsEinzelartikelShopQuelle.FieldName := 'ShopQuelle';\r\n xdsEinzelartikelGeraet.SetParentComponent(xdsEinzelartikel);\r\n xdsEinzelartikelGeraet.Name := 'xdsEinzelartikelGeraet';\r\n xdsEinzelartikelGeraet.FieldName := 'Geraet';\r\n xdsEinzelartikelArtgewicht.SetParentComponent(xdsEinzelartikel);\r\n xdsEinzelartikelArtgewicht.Name := 'xdsEinzelartikelArtgewicht';\r\n xdsEinzelartikelArtgewicht.FieldName := 'Artgewicht';\r\n xdsEinzelartikelVolumen.SetParentComponent(xdsEinzelartikel);\r\n xdsEinzelartikelVolumen.Name := 'xdsEinzelartikelVolumen';\r\n xdsEinzelartikelVolumen.FieldName := 'Volumen';\r\n xdsEinzelartikelPacklisteNichtAnzeigen.SetParentComponent(xdsEinzelartikel);\r\n xdsEinzelartikelPacklisteNichtAnzeigen.Name := 'xdsEinzelartikelPacklisteNichtAnzeigen';\r\n xdsEinzelartikelPacklisteNichtAnzeigen.FieldName := 'PacklisteNichtAnzeigen';\r\n xdsEinzelartikelKeineAufschlagskalkulation.SetParentComponent(xdsEinzelartikel);\r\n xdsEinzelartikelKeineAufschlagskalkulation.Name := 'xdsEinzelartikelKeineAufschlagskalkulation';\r\n xdsEinzelartikelKeineAufschlagskalkulation.FieldName := 'KeineAufschlagskalkulation';\r\n xdsEinzelartikelKorrekturMenge.SetParentComponent(xdsEinzelartikel);\r\n xdsEinzelartikelKorrekturMenge.Name := 'xdsEinzelartikelKorrekturMenge';\r\n xdsEinzelartikelKorrekturMenge.FieldName := 'KorrekturMenge';\r\n xdsEinzelartikelKorrekturWert.SetParentComponent(xdsEinzelartikel);\r\n xdsEinzelartikelKorrekturWert.Name := 'xdsEinzelartikelKorrekturWert';\r\n xdsEinzelartikelKorrekturWert.FieldName := 'KorrekturWert';\r\n xdsEinzelartikelNachfolgeartikel.SetParentComponent(xdsEinzelartikel);\r\n xdsEinzelartikelNachfolgeartikel.Name := 'xdsEinzelartikelNachfolgeartikel';\r\n xdsEinzelartikelNachfolgeartikel.FieldName := 'Nachfolgeartikel';\r\n xdsEinzelartikelNachfolgeartikel.Size := 25;\r\n xdsEinzelartikelMindestbestellmenge.SetParentComponent(xdsEinzelartikel);\r\n xdsEinzelartikelMindestbestellmenge.Name := 'xdsEinzelartikelMindestbestellmenge';\r\n xdsEinzelartikelMindestbestellmenge.FieldName := 'Mindestbestellmenge';\r\n xdsEinzelartikelSchnittEK.SetParentComponent(xdsEinzelartikel);\r\n xdsEinzelartikelSchnittEK.Name := 'xdsEinzelartikelSchnittEK';\r\n xdsEinzelartikelSchnittEK.FieldName := 'SchnittEK';\r\n xdsEinzelartikelVerkaufspreisVom.SetParentComponent(xdsEinzelartikel);\r\n xdsEinzelartikelVerkaufspreisVom.Name := 'xdsEinzelartikelVerkaufspreisVom';\r\n xdsEinzelartikelVerkaufspreisVom.FieldName := 'VerkaufspreisVom';\r\n xdsEinzelartikelPruefungChargeSNR.SetParentComponent(xdsEinzelartikel);\r\n xdsEinzelartikelPruefungChargeSNR.Name := 'xdsEinzelartikelPruefungChargeSNR';\r\n xdsEinzelartikelPruefungChargeSNR.FieldName := 'PruefungChargeSNR';\r\n xdsEinzelartikelArtikelbeschreibungHTML.SetParentComponent(xdsEinzelartikel);\r\n xdsEinzelartikelArtikelbeschreibungHTML.Name := 'xdsEinzelartikelArtikelbeschreibungHTML';\r\n xdsEinzelartikelArtikelbeschreibungHTML.FieldName := 'ArtikelbeschreibungHTML';\r\n xdsEinzelartikelArtikelbeschreibungHTML.Size := 255;\r\n xdsEinzelartikelProduktKurzbeschreibungHTML.SetParentComponent(xdsEinzelartikel);\r\n xdsEinzelartikelProduktKurzbeschreibungHTML.Name := 'xdsEinzelartikelProduktKurzbeschreibungHTML';\r\n xdsEinzelartikelProduktKurzbeschreibungHTML.FieldName := 'ProduktKurzbeschreibungHTML';\r\n xdsEinzelartikelProduktKurzbeschreibungHTML.Size := 255;\r\n xdsEinzelartikelStatusFuerShop.SetParentComponent(xdsEinzelartikel);\r\n xdsEinzelartikelStatusFuerShop.Name := 'xdsEinzelartikelStatusFuerShop';\r\n xdsEinzelartikelStatusFuerShop.FieldName := 'StatusFuerShop';\r\n xdsEinzelartikelStatusFuerShop.Size := 25;\r\n xdsEinzelartikelAmpelFuerShop.SetParentComponent(xdsEinzelartikel);\r\n xdsEinzelartikelAmpelFuerShop.Name := 'xdsEinzelartikelAmpelFuerShop';\r\n xdsEinzelartikelAmpelFuerShop.FieldName := 'AmpelFuerShop';\r\n xdsEinzelartikelAmpelFuerShop.Size := 25;\r\n xdsEinzelartikelEXP_Anzahl.SetParentComponent(xdsEinzelartikel);\r\n xdsEinzelartikelEXP_Anzahl.Name := 'xdsEinzelartikelEXP_Anzahl';\r\n xdsEinzelartikelEXP_Anzahl.FieldName := 'EXP_Anzahl';\r\n xdsEinzelartikelEXP_Inhalt.SetParentComponent(xdsEinzelartikel);\r\n xdsEinzelartikelEXP_Inhalt.Name := 'xdsEinzelartikelEXP_Inhalt';\r\n xdsEinzelartikelEXP_Inhalt.FieldName := 'EXP_Inhalt';\r\n xdsEinzelartikelEXP_Faktor.SetParentComponent(xdsEinzelartikel);\r\n xdsEinzelartikelEXP_Faktor.Name := 'xdsEinzelartikelEXP_Faktor';\r\n xdsEinzelartikelEXP_Faktor.FieldName := 'EXP_Faktor';\r\n xdsEinzelartikelFach.SetParentComponent(xdsEinzelartikel);\r\n xdsEinzelartikelFach.Name := 'xdsEinzelartikelFach';\r\n xdsEinzelartikelFach.FieldName := 'Fach';\r\n xdsEinzelartikelExportKasse.SetParentComponent(xdsEinzelartikel);\r\n xdsEinzelartikelExportKasse.Name := 'xdsEinzelartikelExportKasse';\r\n xdsEinzelartikelExportKasse.FieldName := 'ExportKasse';\r\n xdsEinzelartikelWKNR.SetParentComponent(xdsEinzelartikel);\r\n xdsEinzelartikelWKNR.Name := 'xdsEinzelartikelWKNR';\r\n xdsEinzelartikelWKNR.FieldName := 'WKNR';\r\n xdsEinzelartikelArtikelAttribute.SetParentComponent(xdsEinzelartikel);\r\n xdsEinzelartikelArtikelAttribute.Name := 'xdsEinzelartikelArtikelAttribute';\r\n xdsEinzelartikelArtikelAttribute.FieldName := 'ArtikelAttribute';\r\n xdsEinzelartikelArtikelAttribute.Size := 255;\r\n xdsEinzelartikelErstelltAm.SetParentComponent(xdsEinzelartikel);\r\n xdsEinzelartikelErstelltAm.Name := 'xdsEinzelartikelErstelltAm';\r\n xdsEinzelartikelErstelltAm.FieldName := 'ErstelltAm';\r\n xdsEinzelartikelVarianteVonAN.SetParentComponent(xdsEinzelartikel);\r\n xdsEinzelartikelVarianteVonAN.Name := 'xdsEinzelartikelVarianteVonAN';\r\n xdsEinzelartikelVarianteVonAN.FieldName := 'VarianteVonAN';\r\n xdsEinzelartikelVarianteVonAN.Size := 25;\r\n xdsEinzelartikelGurtmassWerte.SetParentComponent(xdsEinzelartikel);\r\n xdsEinzelartikelGurtmassWerte.Name := 'xdsEinzelartikelGurtmassWerte';\r\n xdsEinzelartikelGurtmassWerte.FieldName := 'GurtmassWerte';\r\n xdsEinzelartikelGurtmassWerte.Size := 250;\r\n xdsEinzelartikelGurtmass.SetParentComponent(xdsEinzelartikel);\r\n xdsEinzelartikelGurtmass.Name := 'xdsEinzelartikelGurtmass';\r\n xdsEinzelartikelGurtmass.FieldName := 'Gurtmass';\r\n xdsEinzelartikelAltersgrenze.SetParentComponent(xdsEinzelartikel);\r\n xdsEinzelartikelAltersgrenze.Name := 'xdsEinzelartikelAltersgrenze';\r\n xdsEinzelartikelAltersgrenze.FieldName := 'Altersgrenze';\r\n xdsEinzelartikelMWStKeyImHaus.SetParentComponent(xdsEinzelartikel);\r\n xdsEinzelartikelMWStKeyImHaus.Name := 'xdsEinzelartikelMWStKeyImHaus';\r\n xdsEinzelartikelMWStKeyImHaus.FieldName := 'MWStKeyImHaus';\r\n xdsEinzelartikelKasseBewegung.SetParentComponent(xdsEinzelartikel);\r\n xdsEinzelartikelKasseBewegung.Name := 'xdsEinzelartikelKasseBewegung';\r\n xdsEinzelartikelKasseBewegung.FieldName := 'KasseBewegung';\r\n xdsEinzelartikelKasseBewegungEK.SetParentComponent(xdsEinzelartikel);\r\n xdsEinzelartikelKasseBewegungEK.Name := 'xdsEinzelartikelKasseBewegungEK';\r\n xdsEinzelartikelKasseBewegungEK.FieldName := 'KasseBewegungEK';\r\n xdsEinzelartikelKasseBewegungVK.SetParentComponent(xdsEinzelartikel);\r\n xdsEinzelartikelKasseBewegungVK.Name := 'xdsEinzelartikelKasseBewegungVK';\r\n xdsEinzelartikelKasseBewegungVK.FieldName := 'KasseBewegungVK';\r\n xdsEinzelartikelProduktionBewegung.SetParentComponent(xdsEinzelartikel);\r\n xdsEinzelartikelProduktionBewegung.Name := 'xdsEinzelartikelProduktionBewegung';\r\n xdsEinzelartikelProduktionBewegung.FieldName := 'ProduktionBewegung';\r\n xdsEinzelartikelProduktionBewegungEK.SetParentComponent(xdsEinzelartikel);\r\n xdsEinzelartikelProduktionBewegungEK.Name := 'xdsEinzelartikelProduktionBewegungEK';\r\n xdsEinzelartikelProduktionBewegungEK.FieldName := 'ProduktionBewegungEK';\r\n xdsEinzelartikelProduktionBewegungVK.SetParentComponent(xdsEinzelartikel);\r\n xdsEinzelartikelProduktionBewegungVK.Name := 'xdsEinzelartikelProduktionBewegungVK';\r\n xdsEinzelartikelProduktionBewegungVK.FieldName := 'ProduktionBewegungVK';\r\n xdsEinzelartikelWaWiAB.SetParentComponent(xdsEinzelartikel);\r\n xdsEinzelartikelWaWiAB.Name := 'xdsEinzelartikelWaWiAB';\r\n xdsEinzelartikelWaWiAB.FieldName := 'WaWiAB';\r\n xdsEinzelartikelGeaendertAm.SetParentComponent(xdsEinzelartikel);\r\n xdsEinzelartikelGeaendertAm.Name := 'xdsEinzelartikelGeaendertAm';\r\n xdsEinzelartikelGeaendertAm.FieldName := 'GeaendertAm';\r\n xdsEinzelartikelGefahrgutKennzeichen.SetParentComponent(xdsEinzelartikel);\r\n xdsEinzelartikelGefahrgutKennzeichen.Name := 'xdsEinzelartikelGefahrgutKennzeichen';\r\n xdsEinzelartikelGefahrgutKennzeichen.FieldName := 'GefahrgutKennzeichen';\r\n xdsEinzelartikelGefahrgutKennzeichen.Size := 50;\r\n xdsEinzelartikelVerpackG.SetParentComponent(xdsEinzelartikel);\r\n xdsEinzelartikelVerpackG.Name := 'xdsEinzelartikelVerpackG';\r\n xdsEinzelartikelVerpackG.FieldName := 'VerpackG';\r\n xdsEinzelartikelUPE.SetParentComponent(xdsEinzelartikel);\r\n xdsEinzelartikelUPE.Name := 'xdsEinzelartikelUPE';\r\n xdsEinzelartikelUPE.FieldName := 'UPE';\r\n xdsEinzelartikelArtikelbeschreibungEinkauf.SetParentComponent(xdsEinzelartikel);\r\n xdsEinzelartikelArtikelbeschreibungEinkauf.Name := 'xdsEinzelartikelArtikelbeschreibungEinkauf';\r\n xdsEinzelartikelArtikelbeschreibungEinkauf.FieldName := 'ArtikelbeschreibungEinkauf';\r\n xdsEinzelartikelArtikelbeschreibungEinkauf.Size := 255;\r\n xdsEinzelartikelHerstellerArtikelnummer.SetParentComponent(xdsEinzelartikel);\r\n xdsEinzelartikelHerstellerArtikelnummer.Name := 'xdsEinzelartikelHerstellerArtikelnummer';\r\n xdsEinzelartikelHerstellerArtikelnummer.FieldName := 'HerstellerArtikelnummer';\r\n xdsEinzelartikelHerstellerArtikelnummer.Size := 25;\r\n xdsEinzelartikelNatura.SetParentComponent(xdsEinzelartikel);\r\n xdsEinzelartikelNatura.Name := 'xdsEinzelartikelNatura';\r\n xdsEinzelartikelNatura.FieldName := 'Natura';\r\n xdsEinzelartikelNatura.Size := 2;\r\n xdsEinzelartikelArbeitszeit.SetParentComponent(xdsEinzelartikel);\r\n xdsEinzelartikelArbeitszeit.Name := 'xdsEinzelartikelArbeitszeit';\r\n xdsEinzelartikelArbeitszeit.FieldName := 'Arbeitszeit';\r\n xdsEinzelartikelWarengruppeWarengruppe.SetParentComponent(xdsEinzelartikel);\r\n xdsEinzelartikelWarengruppeWarengruppe.Name := 'xdsEinzelartikelWarengruppeWarengruppe';\r\n xdsEinzelartikelWarengruppeWarengruppe.FieldName := 'Warengruppe.Warengruppe';\r\n xdsEinzelartikelWarengruppeWarengruppe.Size := 70;\r\n xdsEinzelartikelLaenge.SetParentComponent(xdsEinzelartikel);\r\n xdsEinzelartikelLaenge.Name := 'xdsEinzelartikelLaenge';\r\n xdsEinzelartikelLaenge.FieldName := 'Laenge';\r\n xdsEinzelartikelHoehe.SetParentComponent(xdsEinzelartikel);\r\n xdsEinzelartikelHoehe.Name := 'xdsEinzelartikelHoehe';\r\n xdsEinzelartikelHoehe.FieldName := 'Hoehe';\r\n xdsEinzelartikelArtderMengeArtderMenge.SetParentComponent(xdsEinzelartikel);\r\n xdsEinzelartikelArtderMengeArtderMenge.Name := 'xdsEinzelartikelArtderMengeArtderMenge';\r\n xdsEinzelartikelArtderMengeArtderMenge.FieldName := 'ArtderMenge.ArtderMenge';\r\n xdsEinzelartikelArtderMengeArtderMenge.Size := 50;\r\n xdsEinzelartikelHerstellerHersteller.SetParentComponent(xdsEinzelartikel);\r\n xdsEinzelartikelHerstellerHersteller.Name := 'xdsEinzelartikelHerstellerHersteller';\r\n xdsEinzelartikelHerstellerHersteller.FieldName := 'Hersteller.Hersteller';\r\n xdsEinzelartikelHerstellerHersteller.Size := 25;\r\n xdsEinzelartikelHerstellerHerstellerID.SetParentComponent(xdsEinzelartikel);\r\n xdsEinzelartikelHerstellerHerstellerID.Name := 'xdsEinzelartikelHerstellerHerstellerID';\r\n xdsEinzelartikelHerstellerHerstellerID.FieldName := 'Hersteller.HerstellerID';\r\n xdsEinzelartikelHerstellerHerstellerID.Size := 50;\r\n xdsEinzelartikelHerstellerHerstellerURL.SetParentComponent(xdsEinzelartikel);\r\n xdsEinzelartikelHerstellerHerstellerURL.Name := 'xdsEinzelartikelHerstellerHerstellerURL';\r\n xdsEinzelartikelHerstellerHerstellerURL.FieldName := 'Hersteller.HerstellerURL';\r\n xdsEinzelartikelHerstellerHerstellerURL.Size := 100;\r\n xdsEinzelartikelArtderMengeISO3.SetParentComponent(xdsEinzelartikel);\r\n xdsEinzelartikelArtderMengeISO3.Name := 'xdsEinzelartikelArtderMengeISO3';\r\n xdsEinzelartikelArtderMengeISO3.FieldName := 'ArtderMenge.ISO3';\r\n xdsEinzelartikelArtderMengeISO3.Size := 3;\r\n xdsEinzelartikelArtderMengeMengenauswahl.SetParentComponent(xdsEinzelartikel);\r\n xdsEinzelartikelArtderMengeMengenauswahl.Name := 'xdsEinzelartikelArtderMengeMengenauswahl';\r\n xdsEinzelartikelArtderMengeMengenauswahl.FieldName := 'ArtderMenge.Mengenauswahl';\r\n xdsEinzelartikelArtderMengeVGPauswahl.SetParentComponent(xdsEinzelartikel);\r\n xdsEinzelartikelArtderMengeVGPauswahl.Name := 'xdsEinzelartikelArtderMengeVGPauswahl';\r\n xdsEinzelartikelArtderMengeVGPauswahl.FieldName := 'ArtderMenge.VGPauswahl';\r\n xdsEinzelartikelArtderMengeUVPauswahl.SetParentComponent(xdsEinzelartikel);\r\n xdsEinzelartikelArtderMengeUVPauswahl.Name := 'xdsEinzelartikelArtderMengeUVPauswahl';\r\n xdsEinzelartikelArtderMengeUVPauswahl.FieldName := 'ArtderMenge.UVPauswahl';\r\n xdsEinzelartikelArtderMengeVKPDivisor.SetParentComponent(xdsEinzelartikel);\r\n xdsEinzelartikelArtderMengeVKPDivisor.Name := 'xdsEinzelartikelArtderMengeVKPDivisor';\r\n xdsEinzelartikelArtderMengeVKPDivisor.FieldName := 'ArtderMenge.VKPDivisor';\r\n xdsEinzelartikelPfandArtPfandArt.SetParentComponent(xdsEinzelartikel);\r\n xdsEinzelartikelPfandArtPfandArt.Name := 'xdsEinzelartikelPfandArtPfandArt';\r\n xdsEinzelartikelPfandArtPfandArt.FieldName := 'PfandArt.PfandArt';\r\n xdsEinzelartikelPfandArtPfandArt.Size := 50;\r\n xdsEinzelartikelPfandArtPfandWert.SetParentComponent(xdsEinzelartikel);\r\n xdsEinzelartikelPfandArtPfandWert.Name := 'xdsEinzelartikelPfandArtPfandWert';\r\n xdsEinzelartikelPfandArtPfandWert.FieldName := 'PfandArt.PfandWert';\r\n xdsEinzelartikelPfandArtPfandwertEK.SetParentComponent(xdsEinzelartikel);\r\n xdsEinzelartikelPfandArtPfandwertEK.Name := 'xdsEinzelartikelPfandArtPfandwertEK';\r\n xdsEinzelartikelPfandArtPfandwertEK.FieldName := 'PfandArt.PfandwertEK';\r\n xdsEinzelartikelWarengruppeWGNR.SetParentComponent(xdsEinzelartikel);\r\n xdsEinzelartikelWarengruppeWGNR.Name := 'xdsEinzelartikelWarengruppeWGNR';\r\n xdsEinzelartikelWarengruppeWGNR.FieldName := 'Warengruppe.WGNR';\r\n xdsEinzelartikelWarenuntergruppeWarenuntergruppe.SetParentComponent(xdsEinzelartikel);\r\n xdsEinzelartikelWarenuntergruppeWarenuntergruppe.Name := 'xdsEinzelartikelWarenuntergruppeWarenuntergruppe';\r\n xdsEinzelartikelWarenuntergruppeWarenuntergruppe.FieldName := 'Warenuntergruppe.Warenuntergruppe';\r\n xdsEinzelartikelWarenuntergruppeWarenuntergruppe.Size := 70;\r\n xdsEinzelartikelWarenuntergruppeWarengruppe.SetParentComponent(xdsEinzelartikel);\r\n xdsEinzelartikelWarenuntergruppeWarengruppe.Name := 'xdsEinzelartikelWarenuntergruppeWarengruppe';\r\n xdsEinzelartikelWarenuntergruppeWarengruppe.FieldName := 'Warenuntergruppe.Warengruppe';\r\n xdsEinzelartikelWarenuntergruppeWarengruppe.Size := 70;\r\n xdsEinzelartikelWarenuntergruppeWUGNR.SetParentComponent(xdsEinzelartikel);\r\n xdsEinzelartikelWarenuntergruppeWUGNR.Name := 'xdsEinzelartikelWarenuntergruppeWUGNR';\r\n xdsEinzelartikelWarenuntergruppeWUGNR.FieldName := 'Warenuntergruppe.WUGNR';\r\n xdsEinzelartikelWarenuntergruppeWGNR.SetParentComponent(xdsEinzelartikel);\r\n xdsEinzelartikelWarenuntergruppeWGNR.Name := 'xdsEinzelartikelWarenuntergruppeWGNR';\r\n xdsEinzelartikelWarenuntergruppeWGNR.FieldName := 'Warenuntergruppe.WGNR';\r\n sourceEinzelartikel.SetParentComponent(Self);\r\n sourceEinzelartikel.Name := 'sourceEinzelartikel';\r\n sourceEinzelartikel.DataSet := xdsEinzelartikel;\r\n sourceEinzelartikel.Left := 20;\r\n sourceEinzelartikel.Top := 21;\r\n WClient.SetParentComponent(Self);\r\n WClient.Name := 'WClient';\r\n WClient.Connection := DM2.XDataWebConnection1;\r\n WClient.Left := 144;\r\n WClient.Top := 24;\r\n finally\r\n WebLabel1.AfterLoadDFMValues;\r\n TC.AfterLoadDFMValues;\r\n Container1.AfterLoadDFMValues;\r\n Container2.AfterLoadDFMValues;\r\n btnzurueck.AfterLoadDFMValues;\r\n btnSpeichern.AfterLoadDFMValues;\r\n edtBMenge.AfterLoadDFMValues;\r\n edtArtikelnummer.AfterLoadDFMValues;\r\n btnEtikettendruck.AfterLoadDFMValues;\r\n Container3.AfterLoadDFMValues;\r\n xdsEinzelartikel.AfterLoadDFMValues;\r\n xdsEinzelartikelHersteller.AfterLoadDFMValues;\r\n xdsEinzelartikelArtderMenge.AfterLoadDFMValues;\r\n xdsEinzelartikelPfandArt.AfterLoadDFMValues;\r\n xdsEinzelartikelWarengruppe.AfterLoadDFMValues;\r\n xdsEinzelartikelWarenuntergruppe.AfterLoadDFMValues;\r\n xdsEinzelartikelArtikelnummer.AfterLoadDFMValues;\r\n xdsEinzelartikelArtikelueberschrift.AfterLoadDFMValues;\r\n xdsEinzelartikelArtikelbeschreibung.AfterLoadDFMValues;\r\n xdsEinzelartikelVerkaufspreis.AfterLoadDFMValues;\r\n xdsEinzelartikelMindestbestand.AfterLoadDFMValues;\r\n xdsEinzelartikelPreisliste.AfterLoadDFMValues;\r\n xdsEinzelartikelGewicht.AfterLoadDFMValues;\r\n xdsEinzelartikelBreite.AfterLoadDFMValues;\r\n xdsEinzelartikelArtikelZusatz.AfterLoadDFMValues;\r\n xdsEinzelartikelLagerort.AfterLoadDFMValues;\r\n xdsEinzelartikelBuchungskonto.AfterLoadDFMValues;\r\n xdsEinzelartikelEingangMenge.AfterLoadDFMValues;\r\n xdsEinzelartikelEingangEndpreis.AfterLoadDFMValues;\r\n xdsEinzelartikelAusgangMenge.AfterLoadDFMValues;\r\n xdsEinzelartikelAusgangEndpreisEK.AfterLoadDFMValues;\r\n xdsEinzelartikelAusgangEndpreisVK.AfterLoadDFMValues;\r\n xdsEinzelartikelBestand.AfterLoadDFMValues;\r\n xdsEinzelartikelBestandswert.AfterLoadDFMValues;\r\n xdsEinzelartikelMarge.AfterLoadDFMValues;\r\n xdsEinzelartikelMargeProzent.AfterLoadDFMValues;\r\n xdsEinzelartikelArtikelnummer2.AfterLoadDFMValues;\r\n xdsEinzelartikelArtikelmatchcode.AfterLoadDFMValues;\r\n xdsEinzelartikelRabattpreis1.AfterLoadDFMValues;\r\n xdsEinzelartikelRabattpreis2.AfterLoadDFMValues;\r\n xdsEinzelartikelRabattpreis3.AfterLoadDFMValues;\r\n xdsEinzelartikelRabattpreis4.AfterLoadDFMValues;\r\n xdsEinzelartikelRabattpreis5.AfterLoadDFMValues;\r\n xdsEinzelartikelArtikelnichtmehrgueltig.AfterLoadDFMValues;\r\n xdsEinzelartikelEinkaufspreis.AfterLoadDFMValues;\r\n xdsEinzelartikelAufschlag.AfterLoadDFMValues;\r\n xdsEinzelartikelWarenbestand.AfterLoadDFMValues;\r\n xdsEinzelartikelTextfrei10.AfterLoadDFMValues;\r\n xdsEinzelartikelTextfrei20.AfterLoadDFMValues;\r\n xdsEinzelartikelArtikelbeschreibungRTF.AfterLoadDFMValues;\r\n xdsEinzelartikelArtikeldatei1.AfterLoadDFMValues;\r\n xdsEinzelartikelArtikeldatei2.AfterLoadDFMValues;\r\n xdsEinzelartikelArtikeldatei3.AfterLoadDFMValues;\r\n xdsEinzelartikelArtikeldatei4.AfterLoadDFMValues;\r\n xdsEinzelartikelArtikeldatei5.AfterLoadDFMValues;\r\n xdsEinzelartikelEinkaufspreisVom.AfterLoadDFMValues;\r\n xdsEinzelartikelEAN.AfterLoadDFMValues;\r\n xdsEinzelartikelVGPFaktor.AfterLoadDFMValues;\r\n xdsEinzelartikelVGPMengenart.AfterLoadDFMValues;\r\n xdsEinzelartikelVerleihpreis.AfterLoadDFMValues;\r\n xdsEinzelartikelZusatzPreis.AfterLoadDFMValues;\r\n xdsEinzelartikelVerpackungsart.AfterLoadDFMValues;\r\n xdsEinzelartikelVerpackungsMenge.AfterLoadDFMValues;\r\n xdsEinzelartikelQuellartikel.AfterLoadDFMValues;\r\n xdsEinzelartikelrabattierfaehig.AfterLoadDFMValues;\r\n xdsEinzelartikelAngebotAlternativeAN.AfterLoadDFMValues;\r\n xdsEinzelartikelPreisanteilNetto.AfterLoadDFMValues;\r\n xdsEinzelartikelFarbe.AfterLoadDFMValues;\r\n xdsEinzelartikelAEinkauf.AfterLoadDFMValues;\r\n xdsEinzelartikelAVerkauf.AfterLoadDFMValues;\r\n xdsEinzelartikelArtikelnummerLieferant.AfterLoadDFMValues;\r\n xdsEinzelartikelLieferantnummer.AfterLoadDFMValues;\r\n xdsEinzelartikelVerkaufspreisBrutto.AfterLoadDFMValues;\r\n xdsEinzelartikelArtikelSet.AfterLoadDFMValues;\r\n xdsEinzelartikelProvisionssatz.AfterLoadDFMValues;\r\n xdsEinzelartikelWarentarifnummer.AfterLoadDFMValues;\r\n xdsEinzelartikelHandelsartikel.AfterLoadDFMValues;\r\n xdsEinzelartikelUrsprungsland.AfterLoadDFMValues;\r\n xdsEinzelartikelKategorie.AfterLoadDFMValues;\r\n xdsEinzelartikelStandardRabattsatzEK.AfterLoadDFMValues;\r\n xdsEinzelartikelStandardRabattsatzVK.AfterLoadDFMValues;\r\n xdsEinzelartikelRabattpreiseManuell.AfterLoadDFMValues;\r\n xdsEinzelartikelMengeBestellt.AfterLoadDFMValues;\r\n xdsEinzelartikelMengeBeauftragt.AfterLoadDFMValues;\r\n xdsEinzelartikelBestandDisponiert.AfterLoadDFMValues;\r\n xdsEinzelartikelMengeAngeboten.AfterLoadDFMValues;\r\n xdsEinzelartikelBestandDispInclAngebot.AfterLoadDFMValues;\r\n xdsEinzelartikelMWStKey.AfterLoadDFMValues;\r\n xdsEinzelartikelShopAmazon.AfterLoadDFMValues;\r\n xdsEinzelartikelShopQuelle.AfterLoadDFMValues;\r\n xdsEinzelartikelGeraet.AfterLoadDFMValues;\r\n xdsEinzelartikelArtgewicht.AfterLoadDFMValues;\r\n xdsEinzelartikelVolumen.AfterLoadDFMValues;\r\n xdsEinzelartikelPacklisteNichtAnzeigen.AfterLoadDFMValues;\r\n xdsEinzelartikelKeineAufschlagskalkulation.AfterLoadDFMValues;\r\n xdsEinzelartikelKorrekturMenge.AfterLoadDFMValues;\r\n xdsEinzelartikelKorrekturWert.AfterLoadDFMValues;\r\n xdsEinzelartikelNachfolgeartikel.AfterLoadDFMValues;\r\n xdsEinzelartikelMindestbestellmenge.AfterLoadDFMValues;\r\n xdsEinzelartikelSchnittEK.AfterLoadDFMValues;\r\n xdsEinzelartikelVerkaufspreisVom.AfterLoadDFMValues;\r\n xdsEinzelartikelPruefungChargeSNR.AfterLoadDFMValues;\r\n xdsEinzelartikelArtikelbeschreibungHTML.AfterLoadDFMValues;\r\n xdsEinzelartikelProduktKurzbeschreibungHTML.AfterLoadDFMValues;\r\n xdsEinzelartikelStatusFuerShop.AfterLoadDFMValues;\r\n xdsEinzelartikelAmpelFuerShop.AfterLoadDFMValues;\r\n xdsEinzelartikelEXP_Anzahl.AfterLoadDFMValues;\r\n xdsEinzelartikelEXP_Inhalt.AfterLoadDFMValues;\r\n xdsEinzelartikelEXP_Faktor.AfterLoadDFMValues;\r\n xdsEinzelartikelFach.AfterLoadDFMValues;\r\n xdsEinzelartikelExportKasse.AfterLoadDFMValues;\r\n xdsEinzelartikelWKNR.AfterLoadDFMValues;\r\n xdsEinzelartikelArtikelAttribute.AfterLoadDFMValues;\r\n xdsEinzelartikelErstelltAm.AfterLoadDFMValues;\r\n xdsEinzelartikelVarianteVonAN.AfterLoadDFMValues;\r\n xdsEinzelartikelGurtmassWerte.AfterLoadDFMValues;\r\n xdsEinzelartikelGurtmass.AfterLoadDFMValues;\r\n xdsEinzelartikelAltersgrenze.AfterLoadDFMValues;\r\n xdsEinzelartikelMWStKeyImHaus.AfterLoadDFMValues;\r\n xdsEinzelartikelKasseBewegung.AfterLoadDFMValues;\r\n xdsEinzelartikelKasseBewegungEK.AfterLoadDFMValues;\r\n xdsEinzelartikelKasseBewegungVK.AfterLoadDFMValues;\r\n xdsEinzelartikelProduktionBewegung.AfterLoadDFMValues;\r\n xdsEinzelartikelProduktionBewegungEK.AfterLoadDFMValues;\r\n xdsEinzelartikelProduktionBewegungVK.AfterLoadDFMValues;\r\n xdsEinzelartikelWaWiAB.AfterLoadDFMValues;\r\n xdsEinzelartikelGeaendertAm.AfterLoadDFMValues;\r\n xdsEinzelartikelGefahrgutKennzeichen.AfterLoadDFMValues;\r\n xdsEinzelartikelVerpackG.AfterLoadDFMValues;\r\n xdsEinzelartikelUPE.AfterLoadDFMValues;\r\n xdsEinzelartikelArtikelbeschreibungEinkauf.AfterLoadDFMValues;\r\n xdsEinzelartikelHerstellerArtikelnummer.AfterLoadDFMValues;\r\n xdsEinzelartikelNatura.AfterLoadDFMValues;\r\n xdsEinzelartikelArbeitszeit.AfterLoadDFMValues;\r\n xdsEinzelartikelWarengruppeWarengruppe.AfterLoadDFMValues;\r\n xdsEinzelartikelLaenge.AfterLoadDFMValues;\r\n xdsEinzelartikelHoehe.AfterLoadDFMValues;\r\n xdsEinzelartikelArtderMengeArtderMenge.AfterLoadDFMValues;\r\n xdsEinzelartikelHerstellerHersteller.AfterLoadDFMValues;\r\n xdsEinzelartikelHerstellerHerstellerID.AfterLoadDFMValues;\r\n xdsEinzelartikelHerstellerHerstellerURL.AfterLoadDFMValues;\r\n xdsEinzelartikelArtderMengeISO3.AfterLoadDFMValues;\r\n xdsEinzelartikelArtderMengeMengenauswahl.AfterLoadDFMValues;\r\n xdsEinzelartikelArtderMengeVGPauswahl.AfterLoadDFMValues;\r\n xdsEinzelartikelArtderMengeUVPauswahl.AfterLoadDFMValues;\r\n xdsEinzelartikelArtderMengeVKPDivisor.AfterLoadDFMValues;\r\n xdsEinzelartikelPfandArtPfandArt.AfterLoadDFMValues;\r\n xdsEinzelartikelPfandArtPfandWert.AfterLoadDFMValues;\r\n xdsEinzelartikelPfandArtPfandwertEK.AfterLoadDFMValues;\r\n xdsEinzelartikelWarengruppeWGNR.AfterLoadDFMValues;\r\n xdsEinzelartikelWarenuntergruppeWarenuntergruppe.AfterLoadDFMValues;\r\n xdsEinzelartikelWarenuntergruppeWarengruppe.AfterLoadDFMValues;\r\n xdsEinzelartikelWarenuntergruppeWUGNR.AfterLoadDFMValues;\r\n xdsEinzelartikelWarenuntergruppeWGNR.AfterLoadDFMValues;\r\n sourceEinzelartikel.AfterLoadDFMValues;\r\n WClient.AfterLoadDFMValues;\r\n end;\r\nend;\r\n\r\nend.","unit libfilereader;\r\n\r\n{$mode objfpc}\r\n{$modeswitch externalclass}\r\n\r\ninterface\r\n\r\nuses\r\n Classes, JS, Web;\r\n\r\ntype\r\n //FileReader helpers\r\n TJSFileReader = class external name 'FileReader' (TJSEventTarget)\r\n private\r\n FResult: JSValue; external name 'result';\r\n public\r\n constructor new;\r\n procedure readAsBinaryString(aFile: TJSHtmlFile);\r\n property result : JSValue read FResult;\r\n end;\r\n\r\n TFileReaderReadDoneEvent = procedure(aFileName: string; AResult: JSValue) of object;\r\n\r\n TFileReader = class(TComponent)\r\n FOnReadDone: TFileReaderReadDoneEvent;\r\n public\r\n constructor Create(AOwner: TComponent); overload; override;\r\n procedure readAsBinaryString(AFile: TJSHtmlFile);\r\n function doOnLoad(Event: TEventListenerEvent): boolean;\r\n\r\n property OnReadDone: TFileReaderReadDoneEvent read FOnReadDone write FOnReadDone;\r\n end;\r\n\r\n TWebFileReader = class(TFileReader); {nopp}\r\n\r\nimplementation\r\n\r\nconstructor TFileReader.Create(AOwner: TComponent);\r\nbegin\r\n inherited;\r\nend;\r\n\r\nprocedure setFileName(var aRdr: TJSFileReader; aFileName: string);\r\nbegin\r\n TJSObject(aRdr)['fname'] := aFileName;\r\nend;\r\n\r\nfunction getFileName(var aRdr: TJSFileReader): string;\r\nbegin\r\n Result := string(TJSObject(aRdr)['fname']);\r\nend;\r\n\r\nprocedure TFileReader.readAsBinaryString(aFile: TJSHtmlFile);\r\nvar\r\n aFileReader: TJSFileReader;\r\nbegin\r\n aFileReader := TJSFileReader.New;\r\n setFileName(aFileReader, aFile.name);\r\n aFileReader.addEventListener('load',@doOnLoad);\r\n aFileReader.readAsBinaryString(aFile);\r\nend;\r\n\r\nfunction TFileReader.doOnLoad(Event: TEventListenerEvent): boolean;\r\nvar\r\n aReader: TJSFileReader;\r\nbegin\r\n aReader := Event.target as TJSFileReader;\r\n if Assigned(FOnReadDone) then\r\n FOnReadDone(getFileName(aReader), aReader.result);\r\n Result := true;\r\nend;\r\n\r\nend.\r\n","unit libglmatrix;\r\n\r\n{$mode objfpc}\r\n{$modeswitch externalclass}\r\n\r\ninterface\r\n\r\nuses\r\n classes, JS, Web;\r\n\r\ntype\r\n TJSGLMat4 = class external name 'mat4' (TJSObject)\r\n class function create: TJSObject;\r\n class procedure perspective(aout: TJSObject; fovy, aspect, anear, afar: double);\r\n class procedure translate(aout: TJSObject; a: TJSObject; v: TJSFloat32Array);\r\n class procedure rotate(aout: TJSObject; a: TJSObject; rad: double; axis: TJSFloat32Array);\r\n class procedure copy(aout: TJSObject; a: TJSObject);\r\n class function clone(a: TJSObject): TJSObject;\r\n end;\r\n\r\n TFrameRequestMethodCallback = procedure (aTime: TJSDOMHighResTimeStamp) of object;\r\n\r\n TJSAnimWindow = class external name 'window' (TJSObject)\r\n public\r\n class function requestAnimationFrame(aCallback: TFrameRequestMethodCallback): Integer;\r\n end;\r\n\r\n\r\nimplementation\r\n\r\n\r\nend.\r\n","unit libmedia;\r\n\r\ninterface\r\n\r\n{$mode objfpc}\r\n{$modeswitch externalclass}\r\n{$DEFINE NOPP}\r\n\r\nuses\r\n Web, JS, Classes, Types;\r\n\r\ntype\r\n TWebMediaStreamTrack = class external name 'MediaStreamTrack'\r\n procedure stop;\r\n function applyConstraints: TJSPromise; overload;\r\n function applyConstraints(aConstraints: TJSObject): TJSPromise; overload;\r\n function getConstraints: TJSObject;\r\n function getCapabilities: TJSObject;\r\n function getSettings: TJSObject;\r\n end;\r\n\r\n TJSMediaStreamTrackEx = TWebMediaStreamTrack;\r\n\r\n TWebMediaStream = class external name 'MediaStream' (TJSObject)\r\n procedure addTrack(aTrack: TWebMediaStreamTrack);\r\n function getAudioTracks: TJSArray;\r\n function getTracks: TJSArray;\r\n function getVideoTracks: TJSArray;\r\n end;\r\n\r\n TJSMediaStreamEx = TWebMediaStream;\r\n\r\n TWebAudioNode = class external name 'AudioNode'\r\n function connect(aDestination: TWebAudioNode): TWebAudioNode;\r\n procedure disconnect; overload;\r\n procedure disconnect(aDestination: TWebAudioNode); overload;\r\n end;\r\n\r\n TWebAnalyserNode = class external name 'AnalyserNode' (TWebAudioNode)\r\n private\r\n FFFTSize: NativeInt; external name 'fftSize';\r\n FFrequencyBinCount: NativeInt; external name 'frequencyBinCount';\r\n FMaxDecibels: Double; external name 'maxDecibels';\r\n FMinDecibels: Double; external name 'minDecibels';\r\n FSmoothingTimeConstant: Double; external name 'smoothingTimeConstant';\r\n public\r\n procedure getFloatFrequencyData(aData: TJSFloat32Array);\r\n procedure getByteFrequencyData(aData: TJSUint8Array);\r\n procedure getFloatTimeDomainData(aData: TJSFloat32Array);\r\n procedure getByteTimeDomainData(aData: TJSUint8Array);\r\n property FFTSize: NativeInt read FFFTSize write FFFTSize;\r\n property FrequencyBinCount: NativeInt read FFrequencyBinCount;\r\n property MaxDecibels: Double read FMaxDecibels write FMaxDecibels;\r\n property MinDecibels: Double read FMinDecibels write FMinDecibels;\r\n property SmoothingTimeConstant: Double read FSmoothingTimeConstant write FSmoothingTimeConstant;\r\n end;\r\n\r\n TJSAnalyserNodeEx = TWebAnalyserNode;\r\n\r\n TWebMediaStreamAudioSourceNode = class external name 'MediaStreamAudioSourceNode' (TWebAudioNode)\r\n end;\r\n\r\n TJSMediaStreamAudioSourceNodeEx = TWebMediaStreamAudioSourceNode;\r\n\r\n TWebBaseAudioContext = class external name 'BaseAudioContext'\r\n function createAnalyser: TWebAnalyserNode;\r\n end;\r\n\r\n TJSBaseAudioContextEx = TWebBaseAudioContext;\r\n\r\n TWebAudioContext = class external name 'AudioContext' (TWebBaseAudioContext)\r\n function createMediaStreamSource(aStream: TWebMediaStream): TWebMediaStreamAudioSourceNode;\r\n function resume: TJSPromise;\r\n end;\r\n\r\n TJSAudioContextEx = TWebAudioContext;\r\n\r\n TWebMediaRecorderStopEvent = reference to procedure;\r\n\r\n TWebMediaRecorder = class external name 'MediaRecorder' (TJSObject)\r\n ondataavailable: TJSEventHandler;\r\n onstop: TWebMediaRecorderStopEvent;\r\n constructor new (aStream : TWebMediaStream); overload;\r\n constructor new (aStream : TWebMediaStream; aOptions : TJSObject); overload;\r\n procedure start;\r\n procedure stop;\r\n end;\r\n\r\n TJSMediaRecorderEx = TWebMediaRecorder;\r\n\r\n TWebHTMLMediaElement = class external name 'HTMLMediaElement' (TJSHTMLElement)\r\n paused: Boolean;\r\n srcObject: TJSObject;\r\n procedure pause;\r\n procedure play;\r\n end;\r\n\r\n TJSHTMLMediaElementEx = TWebHTMLMediaElement;\r\n\r\n TWebHTMLVideoElement = class external name 'HTMLVideoElement' (TWebHTMLMediaElement)\r\n videoHeight: NativeInt;\r\n videoWidth: NativeInt;\r\n end;\r\n\r\n TJSHTMLVideoElementEx = TWebHTMLVideoElement;\r\n\r\n TWebMediaDevicesInfo = class external name 'MediaDevicesInfo' (TJSObject)\r\n deviceId: string;\r\n kind: string;\r\n &label: string;\r\n end;\r\n\r\n TJSMediaDevicesInfoEx = TWebMediaDevicesInfo;\r\n\r\n TWebMediaDevices = class external name 'MediaDevices' (TJSEventTarget)\r\n function enumerateDevices: TJSPromise;\r\n function getUserMedia(aConstraints: TJSObject): TJSPromise;\r\n function getSupportedConstraints: TJSObject;\r\n function getDisplayMedia(aConstraints: TJSObject): TJSPromise;\r\n end;\r\n\r\n TJSMediaDevicesEx = TWebMediaDevices;\r\n\r\n TWebJSQRResultObject = class external name 'QRCode' (TJSObject)\r\n binaryData: TJSUint8ClampedArray;\r\n data: string;\r\n end;\r\n\r\n TWebQuaggaJSConfigObject = class external name 'Object' (TJSObject)\r\n decoder: TJSObject;\r\n src: string; //can be url or base64 data string\r\n end;\r\n\r\n TWebQuaggaJSResultObject_CodeResult = class external name 'Object' (TJSObject)\r\n code: string;\r\n end;\r\n\r\n TWebQuaggaJSResultObject = class external name 'Object' (TJSObject)\r\n codeResult: TWebQuaggaJSResultObject_CodeResult;\r\n end;\r\n\r\n TWebQuaggaJSResultCallback = reference to procedure(data: TWebQuaggaJSResultObject);\r\n\r\n TWebQuagga = class external name 'Quagga' (TJSObject)\r\n procedure decodeSingle(aConfig: TWebQuaggaJSConfigObject; aResultCallback: TWebQuaggaJSResultCallback);\r\n end;\r\n\r\nfunction jsQR(aImageData: TJSUint8ClampedArray; aWidth: NativeInt; aHeight: NativeInt): TWebJSQRResultObject; external name 'jsQR';\r\n\r\nvar\r\n Quagga: TWebQuagga; external name 'Quagga';\r\n\r\nimplementation\r\n\r\nend.\r\n","{********************************************************************}\r\n{ }\r\n{ written by TMS Software }\r\n{ Copyright (c) 2019 - 2024 }\r\n{ Email : info@tmssoftware.com }\r\n{ Web : http://www.tmssoftware.com }\r\n{ }\r\n{ The source code is given as is. The author is not responsible }\r\n{ for any possible damage done due to the use of this code. }\r\n{ The complete source code remains property of the author and may }\r\n{ not be distributed, published, given or sold in any form as such. }\r\n{ No parts of the source code can be included in any other component }\r\n{ or application without written authorization of the author. }\r\n{********************************************************************}\r\n\r\nunit WEBLib.Devices;\r\n\r\n{$DEFINE NOPP}\r\n\r\ninterface\r\n\r\nuses\r\n Classes, SysUtils, WEBLib.Controls, Web, JS,\r\n WEBLib.ExtCtrls, WEBLib.Graphics, libfilereader, libglmatrix, libmedia;\r\n\r\ntype\r\n TCameraType = (ctFront, ctRear, ctSelected);\r\n TCameraBaseFormat = (cbfJPEG, cbfPNG);\r\n\r\n TCameraDevice = class(TCollectionItem)\r\n private\r\n FId: string;\r\n FName: string;\r\n public\r\n procedure Assign(Source: TPersistent); override;\r\n property Id: string read FId write FId;\r\n property Name: string read FName write FName;\r\n end;\r\n\r\n TCameraDevices = class(TCollection)\r\n private\r\n procedure SetItem(Index: Integer; const Value: TCameraDevice); reintroduce;\r\n function GetItem(Index: Integer): TCameraDevice; reintroduce;\r\n public\r\n constructor Create;\r\n function Add: TCameraDevice; reintroduce;\r\n function GetDeviceById(Id: string): TCameraDevice;\r\n function GetDeviceByName(Name: string): TCameraDevice;\r\n function Insert(Index: Integer): TCameraDevice; reintroduce;\r\n property Items[Index: integer]: TCameraDevice read GetItem write SetItem;\r\n end;\r\n\r\n TCameraErrorEvent = procedure(Sender: TObject; AName: string; AMessage: string) of object;\r\n TCameraEvent = procedure(Sender: TObject; ACamera: TCameraDevice) of object;\r\n TCameraBeforeStartEvent = procedure(Sender: TObject; var AConstraints: TJSObjectRecord) of object;\r\n\r\n TCamera = class(TCustomControl)\r\n private\r\n FPaused: Boolean;\r\n FDeviceCounter: Integer;\r\n FCameraDevices: TCameraDevices;\r\n FCameraBaseFormat: TCameraBaseFormat;\r\n FSelectedCameraDevice: TCameraDevice;\r\n FOnCameraDevicesInitialized: TNotifyEvent;\r\n FCameraType: TCameraType;\r\n FOnCameraStop: TCameraEvent;\r\n FOnSwitchCamera: TCameraEvent;\r\n FOnCameraPause: TCameraEvent;\r\n FOnCameraResume: TCameraEvent;\r\n FOnCameraStreamPlay: TCameraEvent;\r\n FOnBeforeStart: TCameraBeforeStartEvent;\r\n FVideoTrack: TWebMediaStreamTrack;\r\n FBrowserConstraints: TStringList;\r\n FDeviceConstraints: TStringList;\r\n FOnError: TCameraErrorEvent;\r\n function GetSnapShotBase64: string;\r\n function GetSnapShotImgData: TJSImageData;\r\n function GetSnapShotUint8Array: TJSUint8Array;\r\n procedure SetCameraType(const Value: TCameraType);\r\n protected\r\n procedure BindEvents; override;\r\n function CreateElement: TJSElement; override;\r\n procedure UpdateElementData; override;\r\n procedure UpdateElementVisual; override;\r\n function GetVideoTrack: TWebMediaStreamTrack;\r\n function HandleStreamPlay(aEvent : TJSPointerEvent): Boolean;\r\n function HandleEnumerateDevices(aMediaDevices: JSValue): JSValue;\r\n function HandleUserMedia(aMediaStream: JSValue): JSValue;\r\n function HandleReject(AValue: JSValue): JSValue;\r\n function HandleLoadedMetaData(Event: TEventListenerEvent): Boolean;\r\n procedure UnbindEvents; override;\r\n public\r\n destructor Destroy; override;\r\n procedure CreateInitialize; override;\r\n function BrowserSupportedConstraints: TStringList;\r\n function GetDeviceConstraints: TStringList;\r\n procedure ReInitializeDevices;\r\n procedure Pause;\r\n procedure Resume;\r\n procedure SetSelectedCameraDevice(aDevice: TCameraDevice);\r\n function ApplyConstraints(AConstraints: TJSObject): TJSPromise;\r\n procedure Start;\r\n function StartP: TJSPromise;\r\n procedure Stop;\r\n property CameraDevices: TCameraDevices read FCameraDevices;\r\n property Paused: Boolean read FPaused;\r\n property SnapShotAsBase64: string read GetSnapShotBase64;\r\n property SnapShotAsImageData: TJSImageData read GetSnapShotImgData;\r\n property SnapShotAsUint8Array: TJSUint8Array read GetSnapShotUint8Array;\r\n published\r\n property Align;\r\n property AlignWithMargins;\r\n property Anchors;\r\n property CameraType: TCameraType read FCameraType write SetCameraType default ctFront;\r\n property BaseFormat: TCameraBaseFormat read FCameraBaseFormat write FCameraBaseFormat default cbfJPEG;\r\n property HeightPercent;\r\n property HeightStyle;\r\n property Margins;\r\n property WidthPercent;\r\n property WidthStyle;\r\n property OnError: TCameraErrorEvent read FOnError write FOnError;\r\n property OnBeforeStart: TCameraBeforeStartEvent read FOnBeforeStart write FOnBeforeStart;\r\n property OnCameraDevicesInitialized: TNotifyEvent read FOnCameraDevicesInitialized write FOnCameraDevicesInitialized;\r\n property OnCameraPause: TCameraEvent read FOnCameraPause write FOnCameraPause;\r\n property OnCameraResume: TCameraEvent read FOnCameraResume write FOnCameraResume;\r\n property OnCameraStreamPlay: TCameraEvent read FOnCameraStreamPlay write FOnCameraStreamPlay;\r\n property OnCameraStop: TCameraEvent read FOnCameraStop write FOnCameraStop;\r\n property OnClick;\r\n property OnDblClick;\r\n property OnMouseDown;\r\n property OnMouseEnter;\r\n property OnMouseLeave;\r\n property OnMouseMove;\r\n property OnMouseUp;\r\n property OnSwitchCamera: TCameraEvent read FOnSwitchCamera write FOnSwitchCamera;\r\n end;\r\n\r\n TWebCamera = class(TCamera);\r\n\r\n TMediaCaptureType = (mctVideo, mctAudio, mctBoth);\r\n TMediaCaptureRecordingMode = (mrmManual, mrmAuto);\r\n TMediaCaptureFFTSize = (mfs32, mfs64, mfs128, mfs256, mfs512, mfs1024, mfs2048, mfs4096, mfs8192, mfs16384, mfs32768);\r\n TMediaCaptureCloseEvent = procedure(Sender: TObject; ABinary: TJSUint8Array; ABase: string) of object;\r\n\r\n TMediaCapture = class(TComponent)\r\n private\r\n FCamera: TCamera;\r\n FCapture: TMediaCaptureType;\r\n FRecorder: TWebMediaRecorder;\r\n FData: TJSArray;\r\n FAutoDataArray: TJSUint8Array;\r\n FAudioTrack: TWebMediaStreamTrack;\r\n FVideoTrack: TWebMediaStreamTrack;\r\n FOnStartCapture: TNotifyEvent;\r\n FOnStopCapture: TMediaCaptureCloseEvent;\r\n FFormat: string;\r\n FFFTSize: TMediaCaptureFFTSize;\r\n FRecordingMode: TMediaCaptureRecordingMode;\r\n FSensitivity: Integer;\r\n FTimeConstant: Double;\r\n FIsRecording: Boolean;\r\n FAnalyser: TWebAnalyserNode;\r\n FNewRecorder: Boolean;\r\n FStopped: Boolean;\r\n FAudioCtx: TWebAudioContext;\r\n FAudioContext: TWebAudioContext;\r\n FOldStartEvent: TCameraEvent;\r\n procedure SetCamera(const Value: TCamera);\r\n procedure SetCapture(const Value: TMediaCaptureType);\r\n procedure SetFFTSize(const Value: TMediaCaptureFFTSize);\r\n procedure SetRecordingMode(const Value: TMediaCaptureRecordingMode);\r\n procedure SetSensitivity(const Value: Integer);\r\n procedure SetTimeConstant(const Value: Double);\r\n protected\r\n procedure CreateAnalyser(AStream: TWebMediaStream);\r\n procedure DoAutoProcess(aTime: TJSDOMHighResTimeStamp);\r\n procedure DoHandleCameraStart(Sender: TObject; ACamera: TCameraDevice);\r\n procedure DoHandleCaptureStop;\r\n function DoHandleDataAvailable(Event: TEventListenerEvent): Boolean;\r\n procedure GetAudioTrack;\r\n function GetFFTSize(ASize: TMediaCaptureFFTSize): Integer;\r\n function GetMinDecibels(ASensitivity: Integer): Integer;\r\n function GetTimeConstant(AConstant: Double): Double;\r\n procedure GetVideoTrack;\r\n function HandleAudioUserMedia(aMediaStream: JSValue): JSValue;\r\n function HandleFileReaderLoad(Event: TEventListenerEvent): Boolean;\r\n function HandleVideoUserMedia(aMediaStream: JSValue): JSValue;\r\n procedure InitializeContext(AStream: TWebMediaStream);\r\n procedure InitializeRecording;\r\n procedure Notification(AComponent: TComponent; Operation: TOperation); override;\r\n procedure RequestDevices;\r\n procedure RequestVideoAccess;\r\n procedure StartRecording;\r\n procedure StopAuto;\r\n procedure StopManual;\r\n public\r\n constructor Create(AOwner: TComponent); override;\r\n procedure Start;\r\n procedure Stop;\r\n published\r\n property Capture: TMediaCaptureType read FCapture write SetCapture default mctBoth;\r\n property Camera: TCamera read FCamera write SetCamera;\r\n property FFTSize: TMediaCaptureFFTSize read FFFTSize write SetFFTSize default mfs2048;\r\n property RecordingMode: TMediaCaptureRecordingMode read FRecordingMode write SetRecordingMode default mrmManual;\r\n property Sensitivity: Integer read FSensitivity write SetSensitivity default 100;\r\n property SmoothingTimeConstant: Double read FTimeConstant write SetTimeConstant; //default 0.9\r\n property OnStartCapture: TNotifyEvent read FOnStartCapture write FOnStartCapture;\r\n property OnStopCapture: TMediaCaptureCloseEvent read FOnStopCapture write FOnStopCapture;\r\n end;\r\n\r\n TWebMediaCapture = class(TMediaCapture);\r\n\r\n TDecoderDecodedEvent = procedure(Sender: TObject; ADecoded: string) of object;\r\n\r\n TDecoder = class(TComponent)\r\n private\r\n FTimer: TWebTimer;\r\n FCamera: TCamera;\r\n FOnDecoded: TDecoderDecodedEvent;\r\n FEnableTimer: Boolean;\r\n FImageControl: TImageControl;\r\n procedure SetCamera(const Value: TCamera);\r\n procedure SetEnableTimer(const Value: Boolean);\r\n protected\r\n procedure DecodeURL(AURL: string); virtual;\r\n procedure DoDecoded; virtual;\r\n procedure DoDecodeTimer(Sender: TObject);\r\n procedure Notification(AComponent: TComponent; Operation: TOperation); override;\r\n property Camera: TCamera read FCamera write SetCamera;\r\n property ImageControl: TImageControl read FImageControl write FImageControl;\r\n property EnableTimer: Boolean read FEnableTimer write SetEnableTimer default False;\r\n property OnDecoded: TDecoderDecodedEvent read FOnDecoded write FOnDecoded;\r\n public\r\n constructor Create(AOwner: TComponent); override;\r\n destructor Destroy; override;\r\n end;\r\n\r\n TQRDecoder = class(TDecoder)\r\n private\r\n FImg: TJSHTMLImageElement;\r\n FObj: TWebJSQRResultObject;\r\n protected\r\n procedure DoDecoded; override;\r\n function HandleImageLoad(Event: TEventListenerEvent): boolean;\r\n public\r\n procedure DecodeURL(AURL: string); override;\r\n published\r\n property Camera;\r\n property EnableTimer;\r\n property OnDecoded;\r\n end;\r\n\r\n TWebQRDecoder = class(TQRDecoder);\r\n\r\n TBarcodeDecoderReader = (bcvCode128, bcvEAN, bcvEAN8, bcvCode39, bcvCode39VIN, bcvCodabar, bcvUPC, bcvUPCE, bcvI2OF5, bcv2OF5, bcvCode93);\r\n TBarcodeDecoderReaders = set of TBarcodeDecoderReader;\r\n\r\n TBarcodeDecoder = class(TDecoder)\r\n FTempDisable: Boolean;\r\n FInternalTimer: Boolean;\r\n FReader: TBarcodeDecoderReaders;\r\n FObj: TWebQuaggaJSResultObject;\r\n FConfigObj: TWebQuaggaJSConfigObject;\r\n private\r\n procedure SetReader(const Value: TBarcodeDecoderReaders);\r\n protected\r\n procedure DoDecoded; override;\r\n procedure DoDecodeCallback(aResult: TWebQuaggaJSResultObject);\r\n procedure InitConfigObj;\r\n public\r\n constructor Create(AOwner: TComponent); override;\r\n procedure DecodeURL(AURL: string); override;\r\n published\r\n property Camera;\r\n property EnableTimer;\r\n property Reader: TBarcodeDecoderReaders read FReader write SetReader default [bcvCode128];\r\n property OnDecoded;\r\n end;\r\n\r\n TWebBarcodeDecoder = class(TBarcodeDecoder);\r\n\r\nfunction Uint8ToBase64(AArray: TJSUint8Array): string;\r\nfunction IsSafari: Boolean;\r\n\r\nvar\r\n TBarcodeDecoderValue: array[TBarcodeDecoderReader] of string = ('code_128_reader', 'ean_reader', 'ean_8_reader', 'code_39_reader', 'code_39_vin_reader',\r\n 'codabar_reader', 'upc_reader', 'upc_e_reader', 'i2of5_reader', '2of5_reader', 'code_93_reader');\r\n\r\nimplementation\r\n\r\nuses\r\n Types;\r\n\r\nfunction IsSafari: Boolean;\r\nvar\r\n ua: Boolean;\r\nbegin\r\n ua := False;\r\n asm\r\n function getMobileOperatingSystem() {\r\n var userAgent = navigator.userAgent || navigator.vendor || window.opera;\r\n\r\n if (/windows phone/i.test(userAgent)) {\r\n return \"Windows Phone\";\r\n }\r\n\r\n if (/android/i.test(userAgent)) {\r\n return \"Android\";\r\n }\r\n\r\n if (/iPad|iPhone|iPod/.test(userAgent) && !window.MSStream) {\r\n return \"iOS\";\r\n }\r\n\r\n return \"unknown\";\r\n }\r\n\r\n var isSafariMobile = getMobileOperatingSystem();\r\n var isSafariDesktop = window.safari !== undefined;\r\n\r\n if (isSafariMobile === \"iOS\" || isSafariDesktop) {\r\n ua = true;\r\n }\r\n end;\r\n Result := ua;\r\nend;\r\n\r\nfunction Uint8ToBase64(AArray: TJSUint8Array): string;\r\nvar\r\n len, I: Integer;\r\n base: string;\r\nbegin\r\n len := AArray.byteLength;\r\n for I := 0 to len - 1 do\r\n base := base + TJSString.fromCharCode(AArray[i]);\r\n\r\n Result := window.btoa(base);\r\nend;\r\n\r\n{ TWebCamera }\r\n\r\nfunction TCamera.ApplyConstraints(AConstraints: TJSObject): TJSPromise;\r\nbegin\r\n Result := nil;\r\n if Assigned(FVideoTrack) then\r\n begin\r\n Result := FVideoTrack.applyConstraints(AConstraints);\r\n end;\r\nend;\r\n\r\nprocedure TCamera.BindEvents;\r\nbegin\r\n inherited;\r\n if Assigned(ElementHandle) then\r\n begin\r\n ElementHandle.onplay := @HandleStreamPlay;\r\n end;\r\nend;\r\n\r\nfunction TCamera.BrowserSupportedConstraints: TStringList;\r\nvar\r\n strArr: TStringDynArray;\r\n O: TJSObject;\r\n I: Integer;\r\nbegin\r\n if not Assigned(FBrowserConstraints) then\r\n begin\r\n FBrowserConstraints := TStringList.Create;\r\n O := TWebMediaDevices(window.navigator.mediaDevices).getSupportedConstraints;\r\n strArr := TJSObject.keys(O);\r\n for I := 0 to Length(strArr) - 1 do\r\n FBrowserConstraints.Add(strArr[I]);\r\n end;\r\n Result := FBrowserConstraints;\r\nend;\r\n\r\nfunction TCamera.CreateElement: TJSElement;\r\nvar\r\n LLabel: TJSHTMLElement;\r\nbegin\r\n if (csDesigning in ComponentState) then\r\n begin\r\n Result := document.createElement('DIV');\r\n LLabel := TJSHTMLElement(document.createElement('DIV'));\r\n LLabel.innerHTML := 'TWebCamera';\r\n BorderStyle := bsSingle;\r\n LLabel['align'] := 'center';\r\n LLabel.style.setProperty('border','1px solid gray');\r\n LLabel.style.setProperty('vertical-align','middle');\r\n LLabel.style.setProperty('display','table-cell');\r\n Result.appendChild(LLabel);\r\n end\r\n else\r\n begin\r\n Result := document.createElement('VIDEO');\r\n Result.setAttribute('playsinline', '');\r\n end;\r\nend;\r\n\r\nprocedure TCamera.UpdateElementData;\r\nbegin\r\n inherited;\r\n if (csDesigning in ComponentState) then\r\n TJSHTMLElement(ElementHandle).style.setProperty('display','table');\r\nend;\r\n\r\nprocedure TCamera.UpdateElementVisual;\r\nbegin\r\n inherited;\r\n if (csDesigning in ComponentState) then\r\n TJSHTMLElement(ElementHandle).style.setProperty('background-color','silver');\r\nend;\r\n\r\n\r\ndestructor TCamera.Destroy;\r\nbegin\r\n FCameraDevices.Free;\r\n if Assigned(FBrowserConstraints) then\r\n FBrowserConstraints.Free;\r\n\r\n if Assigned(FDeviceConstraints) then\r\n FDeviceConstraints.Free;\r\n\r\n inherited;\r\nend;\r\n\r\nprocedure TCamera.CreateInitialize;\r\nbegin\r\n inherited;\r\n FPaused := True;\r\n FSelectedCameraDevice := TCameraDevice.Create;\r\n FCameraDevices := TCameraDevices.Create;\r\n FDeviceCounter := 1;\r\n FCameraType := ctFront;\r\n FCameraBaseFormat := cbfJPEG;\r\n TabStop := false;\r\n\r\n Width := 400;\r\n Height := 300;\r\n if Assigned(TWebMediaDevices(window.navigator.mediaDevices)) then\r\n TWebMediaDevices(window.navigator.mediaDevices).enumerateDevices._then(@HandleEnumerateDevices);\r\nend;\r\n\r\nfunction TCamera.GetDeviceConstraints: TStringList;\r\nvar\r\n strArr: TStringDynArray;\r\n O: TJSObject;\r\n I: Integer;\r\nbegin\r\n if not Assigned(FDeviceConstraints) then\r\n FDeviceConstraints := TStringList.Create;\r\n\r\n if Assigned(FVideoTrack) then\r\n begin\r\n FDeviceConstraints.Clear;\r\n O := FVideoTrack.getCapabilities;\r\n strArr := TJSObject.keys(O);\r\n for I := 0 to Length(strArr) - 1 do\r\n FDeviceConstraints.Add(strArr[I]);\r\n end;\r\n Result := FDeviceConstraints;\r\nend;\r\n\r\nfunction TCamera.GetSnapShotBase64: string;\r\nvar\r\n canvas: TJSHTMLCanvasElement;\r\n vid: TWebHTMLVideoElement;\r\nbegin\r\n Result := '';\r\n\r\n if Assigned(ElementHandle) then\r\n begin\r\n vid := TWebHTMLVideoElement(ElementHandle);\r\n canvas := TJSHTMLCanvasElement(document.createElement('canvas'));\r\n canvas.width := vid.videoWidth;\r\n canvas.height := vid.videoHeight;\r\n canvas.getContextAs2DContext('2d').drawImage(TJSObject(vid), 0, 0);\r\n\r\n case FCameraBaseFormat of\r\n cbfJPEG: Result := canvas.toDataURL('image/jpeg');\r\n cbfPNG: Result := canvas.toDataURL('image/png');\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TCamera.GetSnapShotImgData: TJSImageData;\r\nvar\r\n canvas: TJSHTMLCanvasElement;\r\n ctx: TJSCanvasRenderingContext2D;\r\n vid: TWebHTMLVideoElement;\r\nbegin\r\n Result := nil;\r\n\r\n if Assigned(ElementHandle) then\r\n begin\r\n vid := TWebHTMLVideoElement(ElementHandle);\r\n canvas := TJSHTMLCanvasElement(document.createElement('canvas'));\r\n canvas.width := vid.videoWidth;\r\n canvas.height := vid.videoHeight;\r\n ctx := canvas.getContextAs2DContext('2d');\r\n ctx.drawImage(TJSObject(vid), 0, 0);\r\n\r\n Result := ctx.getImageData(0, 0, canvas.width, canvas.height);\r\n end;\r\nend;\r\n\r\nfunction TCamera.GetSnapShotUint8Array: TJSUint8Array;\r\nvar\r\n b, binaryString: TJSString;\r\n str: string;\r\n exp: TJSRegexp;\r\n len, I: Integer;\r\nbegin\r\n b := TJSString.new(GetSnapShotBase64);\r\n exp := TJSRegexp.new('^data:[\\s\\S]*;base64,');\r\n str := b.replace(exp, '');\r\n binaryString := TJSString.new(window.atob(str));\r\n len := binaryString.length;\r\n Result := TJSUint8Array.new(len);\r\n\r\n for I := 0 to len - 1 do\r\n Result[I] := binaryString.charCodeAt(I);\r\nend;\r\n\r\nfunction TCamera.HandleEnumerateDevices(aMediaDevices: JSValue): JSValue;\r\n function DoEachDevice(mediadevice: JSValue; index: NativeInt; anArray: TJSArray): Boolean;\r\n var\r\n cd: TCameraDevice;\r\n mi: TWebMediaDevicesInfo;\r\n begin\r\n mi := TWebMediaDevicesInfo(mediadevice);\r\n if mi.kind = 'videoinput' then\r\n begin\r\n cd := FCameraDevices.Add;\r\n cd.Id := mi.deviceId;\r\n\r\n if mi.&label <> '' then\r\n cd.Name := mi.&label\r\n else\r\n begin\r\n cd.Name := 'Camera ' + IntToStr(FDeviceCounter);\r\n Inc(FDeviceCounter);\r\n end;\r\n end;\r\n\r\n Result := True;\r\n end;\r\nbegin\r\n TJSArray(aMediaDevices).forEach(@DoEachDevice);\r\n\r\n if Assigned(OnCameraDevicesInitialized) then\r\n OnCameraDevicesInitialized(Self);\r\n\r\n Result := True;\r\nend;\r\n\r\nfunction TCamera.GetVideoTrack: TWebMediaStreamTrack;\r\nbegin\r\n Result := FVideoTrack;\r\nend;\r\n\r\nfunction TCamera.HandleLoadedMetaData(Event: TEventListenerEvent): Boolean;\r\nbegin\r\n if Assigned(ElementHandle) then\r\n TWebHTMLMediaElement(ElementHandle).play;\r\n\r\n Result := True;\r\nend;\r\n\r\nfunction TCamera.HandleReject(AValue: JSValue): JSValue;\r\nvar\r\n n, m: string;\r\nbegin\r\n Result := nil;\r\n if AValue is TJSDOMException then\r\n begin\r\n m := TJSDOMException(AValue).message;\r\n n := TJSDOMException(AValue).name;\r\n if Assigned(OnError) then\r\n OnError(Self, n, m);\r\n end;\r\nend;\r\n\r\nfunction TCamera.HandleStreamPlay(aEvent: TJSPointerEvent): Boolean;\r\nbegin\r\n if Assigned(OnCameraStreamPlay) then\r\n OnCameraStreamPlay(Self, FSelectedCameraDevice);\r\n\r\n Result := True;\r\n\r\n FPaused := False;\r\nend;\r\n\r\nfunction TCamera.HandleUserMedia(aMediaStream: JSValue): JSValue;\r\nbegin\r\n TWebHTMLMediaElement(ElementHandle).srcObject := TJSObject(aMediaStream);\r\n TWebHTMLMediaElement(ElementHandle).onloadedmetadata := @HandleLoadedMetaData;\r\n FVideoTrack := TWebMediaStreamTrack(TWebMediaStream(aMediaStream).getVideoTracks[0]);\r\n\r\n Result := True;\r\nend;\r\n\r\nprocedure TCamera.Pause;\r\nbegin\r\n FPaused := True;\r\n\r\n if Assigned(ElementHandle) then\r\n begin\r\n TWebHTMLMediaElement(ElementHandle).pause;\r\n\r\n if Assigned(OnCameraPause) then\r\n OnCameraPause(Self, FSelectedCameraDevice);\r\n end;\r\nend;\r\n\r\nprocedure TCamera.ReInitializeDevices;\r\nbegin\r\n CameraDevices.Clear;\r\n if Assigned(TWebMediaDevices(window.navigator.mediaDevices)) then\r\n TWebMediaDevices(window.navigator.mediaDevices).enumerateDevices._then(@HandleEnumerateDevices);\r\nend;\r\n\r\nprocedure TCamera.Resume;\r\nbegin\r\n if Assigned(ElementHandle) and (Paused) then\r\n begin\r\n TWebHTMLMediaElement(ElementHandle).play;\r\n\r\n if Assigned(OnCameraResume) then\r\n OnCameraResume(Self, FSelectedCameraDevice);\r\n end;\r\n FPaused := False;\r\nend;\r\n\r\nprocedure TCamera.SetCameraType(const Value: TCameraType);\r\nbegin\r\n if FCameraType <> Value then\r\n FCameraType := Value;\r\nend;\r\n\r\nprocedure TCamera.SetSelectedCameraDevice(aDevice: TCameraDevice);\r\nbegin\r\n if aDevice.Id <> FSelectedCameraDevice.Id then\r\n begin\r\n FSelectedCameraDevice.Assign(aDevice);\r\n\r\n if Assigned(OnSwitchCamera) then\r\n OnSwitchCamera(Self, FSelectedCameraDevice);\r\n end;\r\nend;\r\n\r\nprocedure TCamera.Start;\r\nvar\r\n p: TJSPromise;\r\nbegin\r\n p := StartP;\r\n p.catch(@HandleReject);\r\nend;\r\n\r\nfunction TCamera.StartP: TJSPromise;\r\nvar\r\n O, P: TJSObject;\r\n LObjRec: TJSObjectRecord;\r\nbegin\r\n Stop;\r\n\r\n case FCameraType of\r\n ctFront: O := new(['facingMode', 'user']);\r\n ctRear: O := new(['facingMode', 'environment']);\r\n ctSelected:\r\n begin\r\n if FSelectedCameraDevice.Id <> '' then\r\n begin\r\n P := new(['exact', FSelectedCameraDevice.Id]);\r\n O := new(['deviceId', P]);\r\n end\r\n else\r\n O := new([]);\r\n end;\r\n end;\r\n\r\n if Assigned(OnBeforeStart) then\r\n begin\r\n LObjRec.jsobject := O;\r\n OnBeforeStart(Self, LObjRec);\r\n end;\r\n\r\n if Assigned(ElementHandle) and Assigned(TWebMediaDevices(window.navigator.mediaDevices)) then\r\n Result := TWebMediaDevices(window.navigator.mediaDevices).getUserMedia(new(['video', O]))._then(@HandleUserMedia){.catch(@HandleReject)}\r\n else\r\n Result := nil;\r\nend;\r\n\r\nprocedure TCamera.Stop;\r\n function DoEachTrack(track: JSValue; index: NativeInt; anArray: TJSArray): Boolean;\r\n begin\r\n TWebMediaStreamTrack(track).stop;\r\n Result := True;\r\n end;\r\nbegin\r\n FPaused := True;\r\n\r\n if Assigned(ElementHandle) then\r\n begin\r\n if Assigned(TWebHTMLMediaElement(ElementHandle).srcObject) then\r\n begin\r\n TWebMediaStream(TWebHTMLMediaElement(ElementHandle).srcObject).getVideoTracks.forEach(@DoEachTrack);\r\n\r\n if Assigned(OnCameraStop) then\r\n OnCameraStop(Self, FSelectedCameraDevice);\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TCamera.UnbindEvents;\r\nbegin\r\n inherited;\r\n if Assigned(ElementHandle) then\r\n ElementHandle.onplay := nil;\r\nend;\r\n\r\n{ TCameraDevices }\r\n\r\nfunction TCameraDevices.Add: TCameraDevice;\r\nbegin\r\n Result := TCameraDevice(inherited Add);\r\nend;\r\n\r\nconstructor TCameraDevices.Create;\r\nbegin\r\n inherited Create(TCameraDevice);\r\nend;\r\n\r\nfunction TCameraDevices.GetDeviceById(Id: string): TCameraDevice;\r\nvar\r\n I: Integer;\r\nbegin\r\n Result := nil;\r\n\r\n for I := 0 to Count - 1 do\r\n begin\r\n if TCameraDevice(Items[I]).Id = Id then\r\n begin\r\n Result := TCameraDevice(Items[I]);\r\n Exit;\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TCameraDevices.GetDeviceByName(Name: string): TCameraDevice;\r\nvar\r\n I: Integer;\r\nbegin\r\n Result := nil;\r\n\r\n for I := 0 to Count - 1 do\r\n begin\r\n if TCameraDevice(Items[I]).Name = Name then\r\n begin\r\n Result := TCameraDevice(Items[I]);\r\n Exit;\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TCameraDevices.GetItem(Index: Integer): TCameraDevice;\r\nbegin\r\n Result := TCameraDevice(inherited Items[Index]);\r\nend;\r\n\r\nfunction TCameraDevices.Insert(Index: Integer): TCameraDevice;\r\nbegin\r\n Result := TCameraDevice(inherited Insert(Index));\r\nend;\r\n\r\nprocedure TCameraDevices.SetItem(Index: Integer; const Value: TCameraDevice);\r\nbegin\r\n inherited Items[Index] := Value;\r\nend;\r\n\r\n{ TCameraDevice }\r\n\r\nprocedure TCameraDevice.Assign(Source: TPersistent);\r\nbegin\r\n if (Source is TCameraDevice) then\r\n begin\r\n FName := (Source as TCameraDevice).Name;\r\n FId := (Source as TCameraDevice).Id;\r\n end;\r\nend;\r\n\r\n{ TDecoder }\r\n\r\nconstructor TDecoder.Create(AOwner: TComponent);\r\nbegin\r\n inherited;\r\n FTimer := TWebTimer.Create(Self);\r\n FEnableTimer := False;\r\nend;\r\n\r\nprocedure TDecoder.DecodeURL(AURL: string);\r\nbegin\r\n //\r\nend;\r\n\r\ndestructor TDecoder.Destroy;\r\nbegin\r\n FTimer.Free;\r\n inherited;\r\nend;\r\n\r\nprocedure TDecoder.DoDecoded;\r\nbegin\r\nend;\r\n\r\nprocedure TDecoder.DoDecodeTimer(Sender: TObject);\r\nbegin\r\n if Assigned(FCamera) and not FCamera.Paused then\r\n DoDecoded;\r\nend;\r\n\r\nprocedure TDecoder.Notification(AComponent: TComponent; Operation: TOperation);\r\nbegin\r\n inherited;\r\n if not (csDestroying in ComponentState) then\r\n begin\r\n if (Operation = opRemove) then\r\n begin\r\n if (AComponent = FCamera) then\r\n FCamera := nil;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TDecoder.SetCamera(const Value: TCamera);\r\nbegin\r\n if FCamera <> Value then\r\n FCamera := Value;\r\nend;\r\n\r\nprocedure TDecoder.SetEnableTimer(const Value: Boolean);\r\nbegin\r\n if FEnableTimer <> Value then\r\n begin\r\n FEnableTimer := Value;\r\n\r\n if FEnableTimer then\r\n FTimer.OnTimer := DoDecodeTimer\r\n else\r\n FTimer.OnTimer := nil;\r\n end;\r\nend;\r\n\r\n{ TQRDecoder }\r\n\r\nprocedure TQRDecoder.DecodeURL(AURL: string);\r\nbegin\r\n inherited;\r\n FImg := TJSHTMLImageElement(document.createElement('IMG'));\r\n\r\n FImg.onload := @HandleImageLoad;\r\n FImg.src := AURL;\r\nend;\r\n\r\nprocedure TQRDecoder.DoDecoded;\r\nvar\r\n img: TJSImageData;\r\nbegin\r\n img := Camera.SnapshotAsImageData;\r\n FObj := jsQR(img.data, img.width, img.height);\r\n\r\n if Assigned(FObj) and Assigned(OnDecoded) then\r\n OnDecoded(Self, FObj.data);\r\nend;\r\n\r\nfunction TQRDecoder.HandleImageLoad(Event: TEventListenerEvent): boolean;\r\nvar\r\n canvas: TJSHTMLCanvasElement;\r\n ctx: TJSCanvasRenderingContext2D;\r\n imgData: TJSImageData;\r\nbegin\r\n canvas := TJSHTMLCanvasElement(document.createElement('canvas'));\r\n canvas.width := FImg.width;\r\n canvas.height := FImg.height;\r\n ctx := canvas.getContextAs2DContext('2d');\r\n ctx.drawImage(TJSObject(FImg), 0, 0);\r\n\r\n imgData := ctx.getImageData(0, 0, canvas.width, canvas.height);\r\n FObj := jsQR(imgData.data, imgData.width, imgData.height);\r\n\r\n if Assigned(FObj) and Assigned(OnDecoded) then\r\n OnDecoded(Self, FObj.data);\r\n\r\n Result := True;\r\nend;\r\n\r\n{ TBarcodeDecoder }\r\n\r\nconstructor TBarcodeDecoder.Create(AOwner: TComponent);\r\nbegin\r\n inherited;\r\n FConfigObj := TWebQuaggaJSConfigObject.new;\r\n FReader := [bcvCode128];\r\n FTempDisable := False;\r\n FInternalTimer := True;\r\nend;\r\n\r\nprocedure TBarcodeDecoder.DecodeURL(AURL: string);\r\nbegin\r\n inherited;\r\n FConfigObj.src := AURL;\r\n if EnableTimer then\r\n begin\r\n EnableTimer := False;\r\n FTempDisable := True;\r\n end;\r\n Quagga.decodeSingle(FConfigObj, @DoDecodeCallback);\r\nend;\r\n\r\nprocedure TBarcodeDecoder.DoDecodeCallback(aResult: TWebQuaggaJSResultObject);\r\nbegin\r\n if Assigned(aResult) then\r\n begin\r\n if Assigned(aResult.codeResult) then\r\n begin\r\n if Assigned(OnDecoded) then\r\n OnDecoded(Self, aResult.codeResult.code)\r\n end;\r\n end;\r\n\r\n if FTempDisable then\r\n begin\r\n FInternalTimer := True;\r\n FTempDisable := False;\r\n end;\r\n\r\n if Assigned(Camera) then\r\n FInternalTimer := True;\r\nend;\r\n\r\nprocedure TBarcodeDecoder.DoDecoded;\r\nvar\r\n img: string;\r\nbegin\r\n if FInternalTimer then\r\n begin\r\n FInternalTimer := False;\r\n img := Camera.SnapshotAsBase64;\r\n FConfigObj.src := img;\r\n Quagga.decodeSingle(FConfigObj, @DoDecodeCallback);\r\n end;\r\nend;\r\n\r\nprocedure TBarcodeDecoder.InitConfigObj;\r\nvar\r\n arr: TJSArray;\r\n opt: TBarcodeDecoderReader;\r\nbegin\r\n arr := TJSArray.new;\r\n if FReader = [] then\r\n arr.push('code_128_reader')\r\n else\r\n begin\r\n for opt := Low(TBarcodeDecoderReaders) to High(TBarcodeDecoderReaders) do\r\n begin\r\n if opt in Reader then\r\n arr.push(TBarcodeDecoderValue[opt]);\r\n end;\r\n end;\r\n\r\n FConfigObj.decoder := new(['readers', arr]);\r\nend;\r\n\r\nprocedure TBarcodeDecoder.SetReader(const Value: TBarcodeDecoderReaders);\r\nbegin\r\n FReader := Value;\r\n InitConfigObj;\r\nend;\r\n\r\n{ TMediaCapture }\r\n\r\nconstructor TMediaCapture.Create(AOwner: TComponent);\r\nbegin\r\n inherited;\r\n FData := TJSArray.new;\r\n FCapture := mctBoth;\r\n FAudioTrack := nil;\r\n FVideoTrack := nil;\r\n FRecordingMode := mrmManual;\r\n FTimeConstant := 0.9;\r\n FFFTSize := mfs2048;\r\n FSensitivity := 100;\r\n FNewRecorder := True;\r\n asm\r\n this.FAudioContext = window.AudioContext || window.webkitAudioContext;\r\n end;\r\nend;\r\n\r\nprocedure TMediaCapture.CreateAnalyser(AStream: TWebMediaStream);\r\nvar\r\n mic: TWebMediaStreamAudioSourceNode;\r\nbegin\r\n FAnalyser := FAudioCtx.createAnalyser;\r\n FAnalyser.MinDecibels := GetMinDecibels(FSensitivity);\r\n FAnalyser.SmoothingTimeConstant := GetTimeConstant(FTimeConstant);\r\n FAnalyser.FFTSize := GetFFTSize(FFFTSize);\r\n mic := FAudioCtx.createMediaStreamSource(AStream);\r\n mic.connect(FAnalyser);\r\n FAutoDataArray := TJSUint8Array.new(FAnalyser.frequencyBinCount);\r\n FIsRecording := False;\r\n DoAutoProcess(Now);\r\nend;\r\n\r\nprocedure TMediaCapture.DoAutoProcess(aTime: TJSDOMHighResTimeStamp);\r\nvar\r\n cb: TFrameRequestMethodCallback;\r\n I, sum, len: Integer;\r\n av: Double;\r\nbegin\r\n cb := DoAutoProcess;\r\n TJSAnimWindow.requestAnimationFrame(cb);\r\n\r\n if FStopped then\r\n Exit;\r\n\r\n if not FNewRecorder then\r\n Exit;\r\n\r\n FAnalyser.getByteFrequencyData(FAutoDataArray);\r\n\r\n sum := 0;\r\n len := FAutoDataArray.length;\r\n for I := 0 to len - 1 do\r\n sum := sum + FAutoDataArray[I];\r\n\r\n av := sum / len;\r\n if (av > 1) and (not FIsRecording) then\r\n begin\r\n StartRecording;\r\n FIsRecording := True;\r\n end\r\n else if (av <= 1) and FIsRecording then\r\n begin\r\n FRecorder.stop;\r\n FIsRecording := False;\r\n FNewRecorder := False;\r\n RequestDevices;\r\n end;\r\nend;\r\n\r\nprocedure TMediaCapture.DoHandleCameraStart(Sender: TObject; ACamera: TCameraDevice);\r\nbegin\r\n if Assigned(FOldStartEvent) then\r\n FOldStartEvent(Sender, ACamera);\r\n\r\n FVideoTrack := FCamera.GetVideoTrack;\r\n InitializeRecording;\r\nend;\r\n\r\n{$HINTS OFF}\r\nprocedure TMediaCapture.DoHandleCaptureStop;\r\nvar\r\n fr: TJSFileReader;\r\nbegin\r\n fr := TJSFileReader.new;\r\n fr.addEventListener('load',@HandleFileReaderLoad);\r\n asm\r\n var blob = new Blob(this.FData, {\r\n type: this.FFormat\r\n });\r\n\r\n fr.readAsArrayBuffer(blob);\r\n end;\r\n FData := TJSArray.new;\r\nend;\r\n{$HINTS ON}\r\n\r\nfunction TMediaCapture.DoHandleDataAvailable(Event: TEventListenerEvent): Boolean;\r\nvar\r\n b: TJSBlob;\r\nbegin\r\n asm\r\n b = Event.data;\r\n end;\r\n FData.push(b);\r\n\r\n Result := True;\r\nend;\r\n\r\nprocedure TMediaCapture.GetAudioTrack;\r\nbegin\r\n case FCapture of\r\n mctAudio, mctBoth: TWebMediaDevices(window.navigator.mediaDevices).getUserMedia(new(['audio', True]))._then(@HandleAudioUserMedia);\r\n end;\r\nend;\r\n\r\nfunction TMediaCapture.GetFFTSize(ASize: TMediaCaptureFFTSize): Integer;\r\nbegin\r\n Result := 2048;\r\n\r\n case ASize of\r\n mfs32: Result := 32;\r\n mfs64: Result := 64;\r\n mfs128: Result := 128;\r\n mfs256: Result := 256;\r\n mfs512: Result := 512;\r\n mfs1024: Result := 1024;\r\n mfs2048: Result := 2048;\r\n mfs4096: Result := 4096;\r\n mfs8192: Result := 8192;\r\n mfs16384: Result := 16384;\r\n mfs32768: Result := 32768;\r\n end;\r\nend;\r\n\r\nfunction TMediaCapture.GetMinDecibels(ASensitivity: Integer): Integer;\r\nbegin\r\n if ASensitivity < 0 then\r\n ASensitivity := 0\r\n else if ASensitivity > 100 then\r\n ASensitivity := 100;\r\n\r\n if ASensitivity = 0 then\r\n Result := ASensitivity\r\n else\r\n Result := -ASensitivity;\r\nend;\r\n\r\nfunction TMediaCapture.GetTimeConstant(AConstant: Double): Double;\r\nbegin\r\n if AConstant < 0.0 then\r\n AConstant := 0.0\r\n else if AConstant >= 1.0 then\r\n AConstant := 0.99;\r\n\r\n Result := AConstant;\r\nend;\r\n\r\nprocedure TMediaCapture.GetVideoTrack;\r\nbegin\r\n case FCapture of\r\n mctVideo, mctBoth:\r\n begin\r\n if Assigned(FCamera) then\r\n FCamera.Start\r\n else\r\n RequestVideoAccess;\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TMediaCapture.HandleAudioUserMedia(aMediaStream: JSValue): JSValue;\r\nbegin\r\n FAudioTrack := TWebMediaStreamTrack(TWebMediaStream(aMediaStream).getAudioTracks[0]);\r\n InitializeRecording;\r\n Result := True;\r\nend;\r\n\r\nfunction TMediaCapture.HandleFileReaderLoad(Event: TEventListenerEvent): Boolean;\r\nvar\r\n u: TJSUint8Array;\r\n b: string;\r\nbegin\r\n asm\r\n u = new Uint8Array(Event.target.result);\r\n end;\r\n\r\n b := Uint8ToBase64(u);\r\n\r\n if Assigned(OnStopCapture) then\r\n OnStopCapture(Self, u, b);\r\n\r\n Result := True;\r\nend;\r\n\r\nfunction TMediaCapture.HandleVideoUserMedia(aMediaStream: JSValue): JSValue;\r\nbegin\r\n FVideoTrack := TWebMediaStreamTrack(TWebMediaStream(aMediaStream).getVideoTracks[0]);\r\n InitializeRecording;\r\n Result := True;\r\nend;\r\n\r\nprocedure TMediaCapture.InitializeContext(AStream: TWebMediaStream);\r\nbegin\r\n if not Assigned(FAudioContext) then\r\n Exit;\r\n\r\n if not Assigned(FAudioCtx) then\r\n begin\r\n asm\r\n this.FAudioCtx = new this.FAudioContext();\r\n end;\r\n end;\r\n\r\n CreateAnalyser(AStream);\r\nend;\r\n\r\nprocedure TMediaCapture.InitializeRecording;\r\nvar\r\n mstream: TWebMediaStream;\r\n opt: TJSObject;\r\nbegin\r\n if (FCapture = mctBoth) and (not Assigned(FVideoTrack) or not Assigned(FAudioTrack)) then\r\n Exit;\r\n\r\n mstream := TWebMediaStream.new;\r\n\r\n case FCapture of\r\n mctAudio:\r\n begin\r\n FFormat := 'audio/';\r\n mstream.addTrack(FAudioTrack);\r\n end;\r\n mctBoth:\r\n begin\r\n FFormat := 'video/';\r\n mstream.addTrack(FAudioTrack);\r\n mstream.addTrack(FVideoTrack);\r\n end;\r\n mctVideo:\r\n begin\r\n FFormat := 'video/';\r\n mstream.addTrack(FVideoTrack);\r\n end;\r\n end;\r\n\r\n if IsSafari and (FFormat = 'video/') then\r\n FFormat := FFormat + 'mp4'\r\n else\r\n FFormat := FFormat + 'webm';\r\n\r\n opt := new(['mimeType', FFormat]);\r\n\r\n FRecorder := TWebMediaRecorder.new(mstream, opt);\r\n FRecorder.ondataavailable := @DoHandleDataAvailable;\r\n FRecorder.onstop := @DoHandleCaptureStop;\r\n\r\n case FRecordingMode of\r\n mrmManual: StartRecording;\r\n mrmAuto:\r\n begin\r\n FNewRecorder := True;\r\n InitializeContext(mstream);\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TMediaCapture.Notification(AComponent: TComponent;\r\n Operation: TOperation);\r\nbegin\r\n inherited;\r\n if not (csDestroying in ComponentState) then\r\n begin\r\n if (Operation = opRemove) then\r\n begin\r\n if (AComponent = FCamera) then\r\n FCamera := nil;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TMediaCapture.RequestDevices;\r\nvar\r\n mr: Boolean;\r\nbegin\r\n mr := False;\r\n //if MediaRecorder API or MediaDevices are not available then exit\r\n asm\r\n if (window.MediaRecorder == undefined) { mr = true; };\r\n end;\r\n\r\n if (not Assigned(TWebMediaDevices(window.navigator.mediaDevices))) or mr then\r\n Exit;\r\n\r\n GetVideoTrack;\r\n GetAudioTrack;\r\nend;\r\n\r\nprocedure TMediaCapture.RequestVideoAccess;\r\nbegin\r\n TWebMediaDevices(window.navigator.mediaDevices).getUserMedia(new(['video', True]))._then(@HandleVideoUserMedia);\r\nend;\r\n\r\nprocedure TMediaCapture.SetCamera(const Value: TCamera);\r\nbegin\r\n if FCamera <> Value then\r\n begin\r\n FCamera := Value;\r\n if Assigned(FCamera) then\r\n begin\r\n FOldStartEvent := FCamera.OnCameraStreamPlay;\r\n FCamera.OnCameraStreamPlay := DoHandleCameraStart;\r\n end\r\n else\r\n FOldStartEvent := nil;\r\n end;\r\nend;\r\n\r\nprocedure TMediaCapture.SetCapture(const Value: TMediaCaptureType);\r\nbegin\r\n if FCapture <> Value then\r\n FCapture := Value;\r\nend;\r\n\r\nprocedure TMediaCapture.SetFFTSize(const Value: TMediaCaptureFFTSize);\r\nbegin\r\n FFFTSize := Value;\r\nend;\r\n\r\nprocedure TMediaCapture.SetRecordingMode(const Value: TMediaCaptureRecordingMode);\r\nbegin\r\n if FRecordingMode <> Value then\r\n FRecordingMode := Value;\r\nend;\r\n\r\nprocedure TMediaCapture.SetSensitivity(const Value: Integer);\r\nbegin\r\n FSensitivity := Value;\r\nend;\r\n\r\nprocedure TMediaCapture.SetTimeConstant(const Value: Double);\r\nbegin\r\n FTimeConstant := Value;\r\nend;\r\n\r\nprocedure TMediaCapture.Start;\r\nbegin\r\n case FRecordingMode of\r\n mrmAuto:\r\n begin\r\n if not Assigned(FRecorder) then\r\n RequestDevices;\r\n\r\n FStopped := False;\r\n end;\r\n mrmManual: RequestDevices;\r\n end;\r\nend;\r\n\r\nprocedure TMediaCapture.StartRecording;\r\nbegin\r\n FRecorder.start;\r\n\r\n if Assigned(OnStartCapture) then\r\n OnStartCapture(Self);\r\nend;\r\n\r\nprocedure TMediaCapture.Stop;\r\nbegin\r\n case FRecordingMode of\r\n mrmAuto: StopAuto;\r\n mrmManual: StopManual;\r\n end;\r\nend;\r\n\r\nprocedure TMediaCapture.StopAuto;\r\nbegin\r\n FStopped := True;\r\n\r\n if Assigned(FRecorder) and FIsRecording then\r\n begin\r\n FIsRecording := False;\r\n FRecorder.Stop;\r\n end;\r\nend;\r\n\r\nprocedure TMediaCapture.StopManual;\r\nbegin\r\n if Assigned(FRecorder) then\r\n FRecorder.Stop;\r\n\r\n if Assigned(FCamera) then\r\n FCamera.Stop;\r\n\r\n if Assigned(FAudioTrack) then\r\n begin\r\n FAudioTrack.stop;\r\n FAudioTrack := nil;\r\n end;\r\n\r\n if Assigned(FVideoTrack) then\r\n begin\r\n FVideoTrack.stop;\r\n FVideoTrack := nil;\r\n end;\r\nend;\r\n\r\nend.\r\n","unit unit_BarcodeScan;\r\n\r\ninterface\r\n\r\nuses\r\n System.SysUtils, System.Classes, JS, Web, WEBLib.Graphics, WEBLib.Controls,\r\n WEBLib.Forms, WEBLib.Dialogs, WEBLib.Devices, Vcl.StdCtrls, WEBLib.StdCtrls,\r\n Vcl.Controls, WEBLib.ExtCtrls;\r\n\r\ntype\r\n TBarcodeScan = class(TForm)\r\n WebBarcodeDecoder1: TBarcodeDecoder;\r\n WebCamera1: TCamera;\r\n Container2: THTMLContainer;\r\n Container1: THTMLContainer;\r\n btnAbbrechen: TButton;\r\n btnstart: TButton;\r\n labelergebnis: TLabel;\r\n Container3: THTMLContainer;\r\n procedure WebCamera1CameraDevicesInitialized(Sender: TObject);\r\n procedure WebFormShow(Sender: TObject);\r\n procedure btnAbbrechenClick(Sender: TObject);\r\n procedure btnstartClick(Sender: TObject);\r\n procedure WebBarcodeDecoder1Decoded(Sender: TObject; ADecoded: string);\r\n private\r\n { Private-Deklarationen }\r\n public\r\n { Public-Deklarationen }\r\n ScanErgebnis:string;\r\n protected procedure LoadDFMValues; override; end;\r\n\r\nvar\r\n BarcodeScan: TBarcodeScan;\r\n\r\nimplementation\r\n\r\n{$R *.dfm}\r\n\r\nprocedure TBarcodeScan.btnstartClick(Sender: TObject);\r\nbegin\r\n WebCamera1.Start;\r\nend;\r\n\r\nprocedure TBarcodeScan.WebBarcodeDecoder1Decoded(Sender: TObject;\r\n ADecoded: string);\r\nbegin\r\n ScanErgebnis:= trim(ADecoded);\r\n labelergebnis.Caption:=ScanErgebnis;\r\n WebCamera1.Stop;\r\n self.Close;\r\nend;\r\n\r\nprocedure TBarcodeScan.btnAbbrechenClick(Sender: TObject);\r\nbegin\r\n ScanErgebnis:='';\r\n webcamera1.Stop;\r\n self.Close;\r\nend;\r\n\r\nprocedure TBarcodeScan.WebCamera1CameraDevicesInitialized(Sender: TObject);\r\nbegin\r\n labelergebnis.Caption:='Camera gestartet';\r\n btnstart.Visible:=false;\r\nend;\r\n\r\nprocedure TBarcodeScan.WebFormShow(Sender: TObject);\r\nvar\r\n myelement:TJSHTMLElement;\r\nbegin\r\n Container1.html.text:='';\r\n Container2.HTML.Text:='';\r\n myelement:=container2.ElementHandle;\r\n btnabbrechen.ParentElement:=myelement;\r\n btnstart.ParentElement:=myelement;\r\n myelement:=container3.ElementHandle;\r\n labelergebnis.ParentElement:=myelement;\r\n webcamera1.ParentElement:=myelement;\r\n btnstartClick(Sender);\r\nend;\r\n\r\nprocedure TBarcodeScan.LoadDFMValues;\r\nbegin\r\n inherited LoadDFMValues;\r\n\r\n labelergebnis := TLabel.Create(Self);\r\n WebCamera1 := TCamera.Create(Self);\r\n Container2 := THTMLContainer.Create(Self);\r\n Container1 := THTMLContainer.Create(Self);\r\n btnAbbrechen := TButton.Create(Self);\r\n btnstart := TButton.Create(Self);\r\n Container3 := THTMLContainer.Create(Self);\r\n WebBarcodeDecoder1 := TBarcodeDecoder.Create(Self);\r\n\r\n labelergebnis.BeforeLoadDFMValues;\r\n WebCamera1.BeforeLoadDFMValues;\r\n Container2.BeforeLoadDFMValues;\r\n Container1.BeforeLoadDFMValues;\r\n btnAbbrechen.BeforeLoadDFMValues;\r\n btnstart.BeforeLoadDFMValues;\r\n Container3.BeforeLoadDFMValues;\r\n WebBarcodeDecoder1.BeforeLoadDFMValues;\r\n try\r\n Name := 'BarcodeScan';\r\n Width := 175;\r\n Height := 348;\r\n Caption := 'BarcodeScan';\r\n CSSLibrary := cssBootstrap;\r\n Font.Charset := DEFAULT_CHARSET;\r\n Font.Color := clWindowText;\r\n Font.Height := -11;\r\n Font.Name := 'Arial';\r\n Font.Style := [];\r\n ParentFont := False;\r\n SetEvent(Self, 'OnShow', 'WebFormShow');\r\n labelergebnis.SetParentComponent(Self);\r\n labelergebnis.Name := 'labelergebnis';\r\n labelergebnis.Left := 8;\r\n labelergebnis.Top := 140;\r\n labelergebnis.Width := 64;\r\n labelergebnis.Height := 14;\r\n labelergebnis.Caption := 'labelergebnis';\r\n labelergebnis.ElementClassName := 'h6 m-1';\r\n labelergebnis.ElementFont := efCSS;\r\n labelergebnis.ElementPosition := epIgnore;\r\n labelergebnis.HeightStyle := ssAuto;\r\n labelergebnis.HeightPercent := 100.000000000000000000;\r\n labelergebnis.WidthPercent := 100.000000000000000000;\r\n WebCamera1.SetParentComponent(Self);\r\n WebCamera1.Name := 'WebCamera1';\r\n WebCamera1.Left := 0;\r\n WebCamera1.Top := 222;\r\n WebCamera1.Width := 169;\r\n WebCamera1.Height := 118;\r\n WebCamera1.HeightStyle := ssAuto;\r\n WebCamera1.WidthStyle := ssPercent;\r\n WebCamera1.WidthPercent := 90.000000000000000000;\r\n WebCamera1.CameraType := ctRear;\r\n SetEvent(WebCamera1, Self, 'OnCameraDevicesInitialized', 'WebCamera1CameraDevicesInitialized');\r\n Container2.SetParentComponent(Self);\r\n Container2.Name := 'Container2';\r\n Container2.Left := 0;\r\n Container2.Top := 47;\r\n Container2.Width := 169;\r\n Container2.Height := 41;\r\n Container2.ElementClassName := 'd-flex flex-wrap m-1';\r\n Container2.HeightStyle := ssAuto;\r\n Container2.WidthStyle := ssAuto;\r\n Container2.ChildOrder := 5;\r\n Container2.ElementFont := efCSS;\r\n Container2.ElementPosition := epIgnore;\r\n Container1.SetParentComponent(Self);\r\n Container1.Name := 'Container1';\r\n Container1.Left := 0;\r\n Container1.Top := 0;\r\n Container1.Width := 169;\r\n Container1.Height := 41;\r\n Container1.HeightStyle := ssAuto;\r\n Container1.WidthStyle := ssPercent;\r\n Container1.ChildOrder := 2;\r\n Container1.ElementFont := efCSS;\r\n Container1.ElementPosition := epIgnore;\r\n btnAbbrechen.SetParentComponent(Self);\r\n btnAbbrechen.Name := 'btnAbbrechen';\r\n btnAbbrechen.Left := 0;\r\n btnAbbrechen.Top := 160;\r\n btnAbbrechen.Width := 96;\r\n btnAbbrechen.Height := 25;\r\n btnAbbrechen.Caption := 'ABBRECHEN';\r\n btnAbbrechen.ChildOrder := 3;\r\n btnAbbrechen.ElementClassName := 'btn btn-info m-1 text-left';\r\n btnAbbrechen.ElementFont := efCSS;\r\n btnAbbrechen.ElementPosition := epIgnore;\r\n btnAbbrechen.HeightStyle := ssAuto;\r\n btnAbbrechen.HeightPercent := 100.000000000000000000;\r\n btnAbbrechen.WidthStyle := ssAuto;\r\n btnAbbrechen.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnAbbrechen, Self, 'OnClick', 'btnAbbrechenClick');\r\n btnstart.SetParentComponent(Self);\r\n btnstart.Name := 'btnstart';\r\n btnstart.Left := 0;\r\n btnstart.Top := 191;\r\n btnstart.Width := 96;\r\n btnstart.Height := 25;\r\n btnstart.Caption := 'START';\r\n btnstart.ChildOrder := 3;\r\n btnstart.ElementClassName := 'btn btn-info m-1 text-left';\r\n btnstart.ElementFont := efCSS;\r\n btnstart.ElementPosition := epIgnore;\r\n btnstart.HeightStyle := ssAuto;\r\n btnstart.HeightPercent := 100.000000000000000000;\r\n btnstart.WidthStyle := ssAuto;\r\n btnstart.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnstart, Self, 'OnClick', 'btnstartClick');\r\n Container3.SetParentComponent(Self);\r\n Container3.Name := 'Container3';\r\n Container3.Left := 0;\r\n Container3.Top := 94;\r\n Container3.Width := 169;\r\n Container3.Height := 41;\r\n Container3.ElementClassName := 'd-flex flex-wrap m-1';\r\n Container3.HeightStyle := ssAuto;\r\n Container3.WidthStyle := ssAuto;\r\n Container3.ChildOrder := 5;\r\n Container3.ElementFont := efCSS;\r\n Container3.ElementPosition := epIgnore;\r\n WebBarcodeDecoder1.SetParentComponent(Self);\r\n WebBarcodeDecoder1.Name := 'WebBarcodeDecoder1';\r\n WebBarcodeDecoder1.Camera := WebCamera1;\r\n WebBarcodeDecoder1.EnableTimer := True;\r\n WebBarcodeDecoder1.Reader := [bcvCode128,bcvEAN,bcvEAN8,bcvCode39,bcvCode39VIN,bcvCodabar,bcvUPC,bcvUPCE,bcvI2OF5,bcv2OF5,bcvCode93];\r\n SetEvent(WebBarcodeDecoder1, Self, 'OnDecoded', 'WebBarcodeDecoder1Decoded');\r\n WebBarcodeDecoder1.Left := 120;\r\n WebBarcodeDecoder1.Top := 26;\r\n finally\r\n labelergebnis.AfterLoadDFMValues;\r\n WebCamera1.AfterLoadDFMValues;\r\n Container2.AfterLoadDFMValues;\r\n Container1.AfterLoadDFMValues;\r\n btnAbbrechen.AfterLoadDFMValues;\r\n btnstart.AfterLoadDFMValues;\r\n Container3.AfterLoadDFMValues;\r\n WebBarcodeDecoder1.AfterLoadDFMValues;\r\n end;\r\nend;\r\n\r\nend.","unit unit_Artikelsuche;\r\n\r\ninterface\r\n\r\nuses\r\n System.SysUtils, System.Classes, JS, Web, WEBLib.Graphics, WEBLib.Controls,\r\n WEBLib.Forms, WEBLib.Dialogs, Data.DB, WEBLib.DB, XData.Web.JsonDataset,\r\n XData.Web.Dataset, XData.Web.Connection, Vcl.Controls, Vcl.StdCtrls,\r\n WEBLib.StdCtrls, WEBLib.ExtCtrls, Vcl.Grids, WEBLib.DBCtrls, VCL.TMSFNCTypes,\r\n VCL.TMSFNCUtils, VCL.TMSFNCGraphics, VCL.TMSFNCGraphicsTypes,\r\n VCL.TMSFNCCustomControl, VCL.TMSFNCTableView, WEBLib.Buttons, WEBLib.Grids, DB;\r\n\r\ntype\r\n TfrmArtikelsuche = class(TForm)\r\n DataSet: TXDataWebDataSet;\r\n Source: TDataSource;\r\n DataSetArtikelnummer: TStringField;\r\n DataSetArtikelueberschrift: TStringField;\r\n DataSetArtikelbeschreibung: TStringField;\r\n DataSetVerkaufspreis: TFloatField;\r\n DataSetBestand: TFloatField;\r\n TC: TTableControl;\r\n DataSetArtikelmatchcode: TStringField;\r\n DataSetEAN: TStringField;\r\n Container1: THTMLContainer;\r\n Container2: THTMLContainer;\r\n Container3: THTMLContainer;\r\n btnzurueck: TButton;\r\n btnScan: TButton;\r\n ResultLabel: TLabel;\r\n edtSuchbegriff: TEdit;\r\n btnNurArtikelMitBestand: TButton;\r\n procedure WebFormShow(Sender: TObject);\r\n procedure DataSetAfterOpen(DataSet: TDataSet);\r\n procedure btnzurueckClick(Sender: TObject);\r\n procedure btnScanClick(Sender: TObject);\r\n procedure edtSuchbegriffChange(Sender: TObject);\r\n procedure ResultLabelClick(Sender: TObject);\r\n procedure btnNurArtikelMitBestandClick(Sender: TObject);\r\n\r\n public\r\n Artikelnummer:string;\r\n NurArtikelMitBestand:boolean;\r\n weiterzueinzelartikel:boolean;\r\n buttonartikelnummer:TButton;\r\n procedure buttonartikelnummerclick(Sender:TObject);\r\n protected procedure LoadDFMValues; override; end;\r\n\r\nvar\r\n frmArtikelsuche: TfrmArtikelsuche;\r\n\r\nimplementation\r\n uses unit1, unit2, unit_Artikel, unit_BarcodeScan;\r\n{$R *.dfm}\r\n\r\nprocedure TfrmArtikelsuche.btnNurArtikelMitBestandClick(Sender: TObject);\r\nbegin\r\n if NurArtikelMitBestand=false then NurArtikelMitBestand:=true else NurArtikelMitBestand:=false;\r\n if NurArtikelMitBestand=false then btnNurArtikelMitBestand.Caption:='mit Bestand';\r\n if NurArtikelMitBestand=true then btnNurArtikelMitBestand.Caption:='Bestand egal';\r\n edtSuchbegriffChange(self);\r\nend;\r\n\r\nprocedure TfrmArtikelsuche.btnScanClick(Sender: TObject);\r\nvar\r\n LFrm:TBarcodeScan;\r\n procedure AfterCreate(AForm:TObject);\r\n var\r\n LForm:TBarcodeScan;\r\n begin\r\n LForm:=(AForm as TBarcodeScan);\r\n //lform.mykundehint:=xdsEinzelkontaktKundennummer.AsString+' '+xdsEinzelkontaktNachname.AsString+', '+xdsEinzelkontaktVorname.asstring;\r\n //lForm.edttoaddress.Text:= xdsEinzelkontaktPostleitzahl.AsString+' '+xdsEinzelkontaktort.AsString+', '+xdsEinzelkontaktStrasse.AsString;\r\n\r\n end;\r\n\r\n procedure AfterShowmodal(Avalue:TModalResult);\r\n begin\r\n edtsuchbegriff.text:=trim(lfrm.ScanErgebnis);\r\n edtsuchbegriffChange(self);\r\n end;\r\n begin\r\n if LizenzOK then\r\n begin\r\n LFrm:=TBarcodeScan.CreateNew(@AfterCreate);\r\n LFrm.ShowModal(@AfterShowmodal);\r\n end\r\n else\r\n begin\r\n showmessage('Für diese Funktion sind Sie noch nicht freigeschaltet, bitte erwerben Sie eine Lizenz');\r\n end;\r\nend;\r\n\r\nprocedure TfrmArtikelsuche.btnzurueckClick(Sender: TObject);\r\nbegin\r\n self.Close;\r\nend;\r\n\r\nprocedure TfrmArtikelsuche.buttonartikelnummerclick(Sender:TObject);\r\nvar\r\n MFrm:TfrmArtikel;\r\n procedure AfterCreate(AForm:TObject);\r\n begin\r\n (AForm as TfrmArtikel).edtArtikelnummer.text:=Artikelnummer;\r\n (AForm as TfrmArtikel).edtArtikelnummerChange(nil);\r\n end;\r\n\r\n procedure AfterShowmodal(Avalue:TModalResult);\r\n begin\r\n edtsuchbegriffChange(nil);\r\n end;\r\n\r\n begin\r\n Artikelnummer:=(sender as TButton).Caption;\r\n\r\n if weiterzueinzelartikel then\r\n begin\r\n tc.Visible:=false;\r\n MFrm:=TfrmArtikel.CreateNew(@AfterCreate);\r\n MFrm.ShowModal(@AfterShowmodal);\r\n\r\n end\r\n else\r\n begin\r\n self.close;\r\n end;\r\nend;\r\n\r\nprocedure TfrmArtikelsuche.DataSetAfterOpen(DataSet: TDataSet);\r\nvar\r\n i:integer;\r\n myelement:TJSHTMLElement;\r\nbegin\r\n i:=0;\r\n TC.visible:=true;\r\n TC.ColCount:=6;\r\n tc.RowCount:=dataset.RecordCount+1;\r\n tc.Cells[0,i]:='Artikelnummer';\r\n tc.Cells[1,i]:='Artikelüberschrift';\r\n tc.Cells[2,i]:='Artikelbeschreibung';\r\n tc.Cells[3,i]:='Bestand';\r\n tc.Cells[4,i]:='EAN';\r\n tc.Cells[5,i]:='Matchcode';\r\n dataset.First;\r\n if dataset.RecordCount=0 then ResultLabel.HTML:='nichts gefunden';\r\n if dataset.RecordCount>0 then ResultLabel.HTML:='Übereinstimmungen: '+inttostr(dataset.RecordCount);\r\n if dataset.RecordCount>20 then ResultLabel.HTML:='mehr als 20 Übereinstimmungen mehr anzeigen';\r\n if dataset.RecordCount>22 then ResultLabel.HTML:='Übereinstimmungen: '+inttostr(dataset.RecordCount)+' (max. Anzeige: 500)';\r\n\r\n\r\n while not dataset.eof do\r\n begin\r\n inc(i);\r\n myelement:=TC.cellelements[0,i];\r\n myelement.innerHTML:='';\r\n buttonartikelnummer:=TButton.Create(self);\r\n buttonartikelnummer.ElementClassName:='btn btn-sm btn-info';\r\n buttonartikelnummer.HeightStyle:=ssauto;\r\n buttonartikelnummer.Width:=150;\r\n buttonartikelnummer.tag:=0;\r\n buttonartikelnummer.Caption:=DataSetArtikelnummer.AsString;\r\n buttonartikelnummer.OnClick:=@buttonartikelnummerClick;\r\n buttonartikelnummer.ParentElement:=myelement;\r\n TC.Cells[1,i]:=DataSetArtikelueberschrift.AsString;\r\n TC.Cells[2,i]:=leftstr(DataSetArtikelbeschreibung.AsString,250);\r\n TC.Cells[3,i]:=DataSetBestand.AsString;\r\n TC.Cells[4,i]:=DataSetEAN.AsString;\r\n TC.Cells[5,i]:=DataSetArtikelmatchcode.AsString;\r\n dataset.Next;\r\n end;\r\n\r\n btnNurArtikelMitBestand.Enabled:=true;\r\nend;\r\n\r\n\r\n\r\nprocedure TfrmArtikelsuche.edtSuchbegriffChange(Sender: TObject);\r\nvar\r\n suchtext:string;\r\nbegin\r\n suchtext:=trim(edtsuchbegriff.Text);\r\n if length(suchtext)>0 then\r\n begin\r\n if NurArtikelMitBestand=false then\r\n begin\r\n dataset.Close;\r\n dataset.QueryTop:=21;\r\n dataset.QueryString:='$filter=contains(Artikelueberschrift, '''+suchtext+''') OR contains(Artikelnummer, '''+suchtext+''') OR contains(EAN, '''+suchtext+''') OR contains(Artikelmatchcode, '''+suchtext+''') OR contains(Artikelbeschreibung, '''+suchtext+''')';\r\n dataset.Load;\r\n end\r\n else\r\n begin\r\n dataset.Close;\r\n dataset.QueryTop:=21;\r\n dataset.QueryString:='$filter=(contains(Artikelueberschrift, '''+suchtext+''') OR contains(Artikelnummer, '''+suchtext+''') OR contains(EAN, '''+suchtext+''') OR contains(Artikelmatchcode, '''+suchtext+''') OR contains(Artikelbeschreibung, '''+suchtext+''')) AND Bestand gt 0';\r\n dataset.Load;\r\n end;\r\n end;\r\nend;\r\n\r\n\r\nprocedure TfrmArtikelsuche.ResultLabelClick(Sender: TObject);\r\nbegin\r\n if Pos('mehr anzeigen',resultlabel.html,0)>1 then\r\n begin\r\n dataset.close;\r\n dataset.QueryTop:=501;\r\n dataset.Load;\r\n end;\r\nend;\r\n\r\nprocedure TfrmArtikelsuche.WebFormShow(Sender: TObject);\r\nvar\r\n myelement:TJSHTMLElement;\r\nbegin\r\n Container1.html.text:='';\r\n Container2.HTML.Text:='';\r\n myelement:=container1.ElementHandle;\r\n btnzurueck.ParentElement:=myelement;\r\n btnNurArtikelMitBestand.ParentElement:=myelement;\r\n btnscan.ParentElement:=myelement;\r\n container2.ParentElement:=myelement;\r\n Container3.ParentElement:=myelement;\r\n myelement:=container2.ElementHandle;\r\n resultlabel.Caption:='Suchbegriff';\r\n resultlabel.ParentElement:=myelement;\r\n edtsuchbegriff.ParentElement:=myelement;\r\n myelement:=container3.ElementHandle;\r\n TC.ParentElement:=myelement;\r\n TC.Visible:=false;\r\n artikelnummer:='';\r\n NurartikelmitBestand:=false;\r\n btnNurArtikelMitBestand.Enabled:=false;\r\n edtsuchbegriff.SetFocus;\r\nend;\r\n\r\nprocedure TfrmArtikelsuche.LoadDFMValues;\r\nbegin\r\n inherited LoadDFMValues;\r\n\r\n ResultLabel := TLabel.Create(Self);\r\n TC := TTableControl.Create(Self);\r\n Container1 := THTMLContainer.Create(Self);\r\n Container2 := THTMLContainer.Create(Self);\r\n Container3 := THTMLContainer.Create(Self);\r\n btnzurueck := TButton.Create(Self);\r\n btnScan := TButton.Create(Self);\r\n edtSuchbegriff := TEdit.Create(Self);\r\n btnNurArtikelMitBestand := TButton.Create(Self);\r\n DataSet := TXDataWebDataSet.Create(Self);\r\n DataSetArtikelnummer := TStringField.Create(Self);\r\n DataSetArtikelueberschrift := TStringField.Create(Self);\r\n DataSetArtikelbeschreibung := TStringField.Create(Self);\r\n DataSetVerkaufspreis := TFloatField.Create(Self);\r\n DataSetBestand := TFloatField.Create(Self);\r\n DataSetArtikelmatchcode := TStringField.Create(Self);\r\n DataSetEAN := TStringField.Create(Self);\r\n Source := TDataSource.Create(Self);\r\n\r\n ResultLabel.BeforeLoadDFMValues;\r\n TC.BeforeLoadDFMValues;\r\n Container1.BeforeLoadDFMValues;\r\n Container2.BeforeLoadDFMValues;\r\n Container3.BeforeLoadDFMValues;\r\n btnzurueck.BeforeLoadDFMValues;\r\n btnScan.BeforeLoadDFMValues;\r\n edtSuchbegriff.BeforeLoadDFMValues;\r\n btnNurArtikelMitBestand.BeforeLoadDFMValues;\r\n DataSet.BeforeLoadDFMValues;\r\n DataSetArtikelnummer.BeforeLoadDFMValues;\r\n DataSetArtikelueberschrift.BeforeLoadDFMValues;\r\n DataSetArtikelbeschreibung.BeforeLoadDFMValues;\r\n DataSetVerkaufspreis.BeforeLoadDFMValues;\r\n DataSetBestand.BeforeLoadDFMValues;\r\n DataSetArtikelmatchcode.BeforeLoadDFMValues;\r\n DataSetEAN.BeforeLoadDFMValues;\r\n Source.BeforeLoadDFMValues;\r\n try\r\n Name := 'frmArtikelsuche';\r\n Width := 173;\r\n Height := 344;\r\n CSSLibrary := cssBootstrap;\r\n ElementFont := efCSS;\r\n Visible := True;\r\n SetEvent(Self, 'OnShow', 'WebFormShow');\r\n ResultLabel.SetParentComponent(Self);\r\n ResultLabel.Name := 'ResultLabel';\r\n ResultLabel.Left := 8;\r\n ResultLabel.Top := 288;\r\n ResultLabel.Width := 60;\r\n ResultLabel.Height := 15;\r\n ResultLabel.Caption := 'ResultLabel';\r\n ResultLabel.ElementClassName := 'h6 m-2';\r\n ResultLabel.ElementFont := efCSS;\r\n ResultLabel.ElementPosition := epIgnore;\r\n ResultLabel.HeightStyle := ssAuto;\r\n ResultLabel.HeightPercent := 100.000000000000000000;\r\n ResultLabel.WidthStyle := ssPercent;\r\n ResultLabel.WidthPercent := 100.000000000000000000;\r\n SetEvent(ResultLabel, Self, 'OnClick', 'ResultLabelClick');\r\n TC.SetParentComponent(Self);\r\n TC.Name := 'TC';\r\n TC.Left := 0;\r\n TC.Top := 141;\r\n TC.Width := 169;\r\n TC.Height := 79;\r\n TC.ElementClassName := 'table table-hover table-bordered table-striped';\r\n TC.HeightStyle := ssAuto;\r\n TC.WidthStyle := ssPercent;\r\n TC.BorderColor := clSilver;\r\n TC.ChildOrder := 3;\r\n TC.ColHeader := False;\r\n TC.ElementFont := efCSS;\r\n TC.ElementHeaderClassName := 'table-info';\r\n TC.ElementPosition := epIgnore;\r\n TC.ElementTableClassName := 'table table-hover table-bordered table-striped';\r\n TC.WordWrap := True;\r\n TC.ColCount := 1;\r\n TC.RowCount := 5;\r\n Container1.SetParentComponent(Self);\r\n Container1.Name := 'Container1';\r\n Container1.Left := 0;\r\n Container1.Top := 0;\r\n Container1.Width := 169;\r\n Container1.Height := 41;\r\n Container1.HeightStyle := ssAuto;\r\n Container1.WidthStyle := ssPercent;\r\n Container1.ElementFont := efCSS;\r\n Container1.ElementPosition := epRelative;\r\n Container2.SetParentComponent(Self);\r\n Container2.Name := 'Container2';\r\n Container2.Left := 0;\r\n Container2.Top := 47;\r\n Container2.Width := 169;\r\n Container2.Height := 41;\r\n Container2.ElementClassName := 'd-flex flex-wrap m-1 border border-info';\r\n Container2.HeightStyle := ssAuto;\r\n Container2.WidthStyle := ssAuto;\r\n Container2.ChildOrder := 1;\r\n Container2.ElementFont := efCSS;\r\n Container2.ElementPosition := epIgnore;\r\n Container3.SetParentComponent(Self);\r\n Container3.Name := 'Container3';\r\n Container3.Left := 0;\r\n Container3.Top := 94;\r\n Container3.Width := 169;\r\n Container3.Height := 41;\r\n Container3.ElementClassName := 'd-flex m-1';\r\n Container3.HeightStyle := ssPercent;\r\n Container3.WidthStyle := ssAuto;\r\n Container3.ChildOrder := 2;\r\n Container3.ElementFont := efCSS;\r\n Container3.ElementPosition := epIgnore;\r\n btnzurueck.SetParentComponent(Self);\r\n btnzurueck.Name := 'btnzurueck';\r\n btnzurueck.Left := 0;\r\n btnzurueck.Top := 226;\r\n btnzurueck.Width := 96;\r\n btnzurueck.Height := 25;\r\n btnzurueck.Caption := '<< zur'#252'ck';\r\n btnzurueck.ChildOrder := 4;\r\n btnzurueck.ElementClassName := 'btn btn-info btn-sm m-1 text-left';\r\n btnzurueck.ElementFont := efCSS;\r\n btnzurueck.ElementPosition := epIgnore;\r\n btnzurueck.HeightStyle := ssAuto;\r\n btnzurueck.HeightPercent := 100.000000000000000000;\r\n btnzurueck.WidthStyle := ssAuto;\r\n btnzurueck.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnzurueck, Self, 'OnClick', 'btnzurueckClick');\r\n btnScan.SetParentComponent(Self);\r\n btnScan.Name := 'btnScan';\r\n btnScan.Left := 0;\r\n btnScan.Top := 257;\r\n btnScan.Width := 96;\r\n btnScan.Height := 25;\r\n btnScan.Caption := 'Bar-/QR-Code scannen';\r\n btnScan.ChildOrder := 4;\r\n btnScan.ElementClassName := 'btn btn-info btn-sm m-1 text-left';\r\n btnScan.ElementFont := efCSS;\r\n btnScan.ElementPosition := epIgnore;\r\n btnScan.HeightStyle := ssAuto;\r\n btnScan.HeightPercent := 100.000000000000000000;\r\n btnScan.WidthStyle := ssAuto;\r\n btnScan.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnScan, Self, 'OnClick', 'btnScanClick');\r\n edtSuchbegriff.SetParentComponent(Self);\r\n edtSuchbegriff.Name := 'edtSuchbegriff';\r\n edtSuchbegriff.Left := 8;\r\n edtSuchbegriff.Top := 307;\r\n edtSuchbegriff.Width := 150;\r\n edtSuchbegriff.Height := 22;\r\n edtSuchbegriff.ChildOrder := 6;\r\n edtSuchbegriff.ElementClassName := 'form-control input-sm m-1';\r\n edtSuchbegriff.ElementFont := efCSS;\r\n edtSuchbegriff.ElementPosition := epIgnore;\r\n edtSuchbegriff.HeightStyle := ssAuto;\r\n edtSuchbegriff.HeightPercent := 100.000000000000000000;\r\n edtSuchbegriff.ShowHint := True;\r\n edtSuchbegriff.TextHint := 'Suchbegriff eingeben';\r\n edtSuchbegriff.WidthPercent := 60.000000000000000000;\r\n SetEvent(edtSuchbegriff, Self, 'OnChange', 'edtSuchbegriffChange');\r\n btnNurArtikelMitBestand.SetParentComponent(Self);\r\n btnNurArtikelMitBestand.Name := 'btnNurArtikelMitBestand';\r\n btnNurArtikelMitBestand.Left := 102;\r\n btnNurArtikelMitBestand.Top := 226;\r\n btnNurArtikelMitBestand.Width := 96;\r\n btnNurArtikelMitBestand.Height := 25;\r\n btnNurArtikelMitBestand.Caption := 'mit Bestand';\r\n btnNurArtikelMitBestand.ChildOrder := 4;\r\n btnNurArtikelMitBestand.ElementClassName := 'btn btn-info btn-sm m-1 text-left';\r\n btnNurArtikelMitBestand.ElementFont := efCSS;\r\n btnNurArtikelMitBestand.ElementPosition := epIgnore;\r\n btnNurArtikelMitBestand.HeightStyle := ssAuto;\r\n btnNurArtikelMitBestand.HeightPercent := 100.000000000000000000;\r\n btnNurArtikelMitBestand.WidthStyle := ssAuto;\r\n btnNurArtikelMitBestand.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnNurArtikelMitBestand, Self, 'OnClick', 'btnNurArtikelMitBestandClick');\r\n DataSet.SetParentComponent(Self);\r\n DataSet.Name := 'DataSet';\r\n DataSet.AfterOpen := DataSetAfterOpen;\r\n DataSet.EntitySetName := 'Artikel';\r\n DataSet.Connection := DM2.XDataWebConnection1;\r\n DataSet.QueryTop := 21;\r\n DataSet.Left := 56;\r\n DataSet.Top := 72;\r\n DataSetArtikelnummer.SetParentComponent(DataSet);\r\n DataSetArtikelnummer.Name := 'DataSetArtikelnummer';\r\n DataSetArtikelnummer.FieldName := 'Artikelnummer';\r\n DataSetArtikelnummer.Required := True;\r\n DataSetArtikelnummer.Size := 25;\r\n DataSetArtikelueberschrift.SetParentComponent(DataSet);\r\n DataSetArtikelueberschrift.Name := 'DataSetArtikelueberschrift';\r\n DataSetArtikelueberschrift.FieldName := 'Artikelueberschrift';\r\n DataSetArtikelueberschrift.Size := 50;\r\n DataSetArtikelbeschreibung.SetParentComponent(DataSet);\r\n DataSetArtikelbeschreibung.Name := 'DataSetArtikelbeschreibung';\r\n DataSetArtikelbeschreibung.FieldName := 'Artikelbeschreibung';\r\n DataSetArtikelbeschreibung.Size := 255;\r\n DataSetVerkaufspreis.SetParentComponent(DataSet);\r\n DataSetVerkaufspreis.Name := 'DataSetVerkaufspreis';\r\n DataSetVerkaufspreis.FieldName := 'Verkaufspreis';\r\n DataSetBestand.SetParentComponent(DataSet);\r\n DataSetBestand.Name := 'DataSetBestand';\r\n DataSetBestand.FieldName := 'Bestand';\r\n DataSetArtikelmatchcode.SetParentComponent(DataSet);\r\n DataSetArtikelmatchcode.Name := 'DataSetArtikelmatchcode';\r\n DataSetArtikelmatchcode.FieldName := 'Artikelmatchcode';\r\n DataSetArtikelmatchcode.Size := 30;\r\n DataSetEAN.SetParentComponent(DataSet);\r\n DataSetEAN.Name := 'DataSetEAN';\r\n DataSetEAN.FieldName := 'EAN';\r\n DataSetEAN.Size := 15;\r\n Source.SetParentComponent(Self);\r\n Source.Name := 'Source';\r\n Source.DataSet := DataSet;\r\n Source.Left := 56;\r\n Source.Top := 144;\r\n finally\r\n ResultLabel.AfterLoadDFMValues;\r\n TC.AfterLoadDFMValues;\r\n Container1.AfterLoadDFMValues;\r\n Container2.AfterLoadDFMValues;\r\n Container3.AfterLoadDFMValues;\r\n btnzurueck.AfterLoadDFMValues;\r\n btnScan.AfterLoadDFMValues;\r\n edtSuchbegriff.AfterLoadDFMValues;\r\n btnNurArtikelMitBestand.AfterLoadDFMValues;\r\n DataSet.AfterLoadDFMValues;\r\n DataSetArtikelnummer.AfterLoadDFMValues;\r\n DataSetArtikelueberschrift.AfterLoadDFMValues;\r\n DataSetArtikelbeschreibung.AfterLoadDFMValues;\r\n DataSetVerkaufspreis.AfterLoadDFMValues;\r\n DataSetBestand.AfterLoadDFMValues;\r\n DataSetArtikelmatchcode.AfterLoadDFMValues;\r\n DataSetEAN.AfterLoadDFMValues;\r\n Source.AfterLoadDFMValues;\r\n end;\r\nend;\r\n\r\nend.\r\n","{********************************************************************}\r\n{ }\r\n{ written by TMS Software }\r\n{ Copyright (c) 2020 }\r\n{ Email : info@tmssoftware.com }\r\n{ Web : http://www.tmssoftware.com }\r\n{ }\r\n{ The source code is given as is. The author is not responsible }\r\n{ for any possible damage done due to the use of this code. }\r\n{ The complete source code remains property of the author and may }\r\n{ not be distributed, published, given or sold in any form as such. }\r\n{ No parts of the source code can be included in any other component }\r\n{ or application without written authorization of the author. }\r\n{********************************************************************}\r\n\r\nunit WEBLib.SignatureCapture;\r\n\r\n{$DEFINE NOPP}\r\n\r\ninterface\r\n\r\nuses\r\n Classes, WEBLib.Controls, Types, Contnrs, WEBLib.Graphics, web;\r\n\r\ntype\r\n TSignatureCaptureLineTextPosition = (ltpBottomLeft, ltpBottomCenter, ltpBottomRight, ltpTopLeft, ltpTopCenter, ltpTopRight, ltpXY);\r\n\r\n TSignatureCaptureSignTextPosition = class(TPersistent)\r\n private\r\n FLineVisible: Boolean;\r\n FOnChange: TNotifyEvent;\r\n FPosition: TSignatureCaptureLineTextPosition;\r\n FX: Integer;\r\n FY: Integer;\r\n FLine: TPen;\r\n procedure SetLineVisible(const Value: Boolean);\r\n procedure SetPosition(const Value: TSignatureCaptureLineTextPosition);\r\n procedure SetX(const Value: Integer);\r\n procedure SetY(const Value: Integer);\r\n procedure SetLine(const Value: TPen);\r\n protected\r\n procedure Changed; virtual;\r\n public\r\n constructor Create;\r\n property OnChange: TNotifyEvent read FOnChange write FOnChange;\r\n published\r\n property Line: TPen read FLine write SetLine;\r\n property LineVisible: Boolean read FLineVisible write SetLineVisible;\r\n property Position: TSignatureCaptureLineTextPosition read FPosition write SetPosition;\r\n property X: Integer read FX write SetX;\r\n property Y: Integer read FY write SetY;\r\n end;\r\n\r\n TSignatureCapturePoint = class(TObject)\r\n public\r\n X, Y, PenWidth: Integer;\r\n DrawLine: Boolean;\r\n PenColor: TColor;\r\n PenStyle: TPenStyle;\r\n end;\r\n\r\n TSignatureCapturePoints = class(TObjectList)\r\n private\r\n function GetItem(Index: Integer): TSignatureCapturePoint; reintroduce;\r\n procedure SetItem(Index: Integer; const Value: TSignatureCapturePoint);\r\n public\r\n property Items[Index: Integer]: TSignatureCapturePoint read GetItem write SetItem; default;\r\n end;\r\n\r\n TSignatureCaptureClearButtonPosition = (cbpTopLeft, cbpTopRight, cbpBottomLeft, cbpBottomRight, cbpXY);\r\n\r\n TSignatureCaptureClearButton = class(TPersistent)\r\n private\r\n FImage: TURLPicture;\r\n FX: Integer;\r\n FY: Integer;\r\n FPosition: TSignatureCaptureClearButtonPosition;\r\n FOnChange: TNotifyEvent;\r\n procedure SetImage(const Value: TURLPicture);\r\n procedure SetPosition(const Value: TSignatureCaptureClearButtonPosition);\r\n procedure SetX(const Value: Integer);\r\n procedure SetY(const Value: Integer);\r\n protected\r\n procedure Changed; virtual;\r\n procedure ImageChange(Sender: TObject);\r\n public\r\n constructor Create;\r\n destructor Destroy; override;\r\n property OnChange: TNotifyEvent read FOnChange write FOnChange;\r\n published\r\n property Image: TURLPicture read FImage write SetImage;\r\n property Position: TSignatureCaptureClearButtonPosition read FPosition write SetPosition;\r\n property X: Integer read FX write SetX;\r\n property Y: Integer read FY write SetY;\r\n end;\r\n\r\n TSignatureCapture = class(TCustomControl)\r\n private\r\n FExport: Boolean;\r\n FClearBtn: TGraphic;\r\n FMouseDown: Boolean;\r\n FSignaturePoints: TSignatureCapturePoints;\r\n FTextPosition: TSignatureCaptureSignTextPosition;\r\n FPen: TPen;\r\n FClearButton: TSignatureCaptureClearButton;\r\n FText: string;\r\n procedure SetTextPosition(const Value: TSignatureCaptureSignTextPosition);\r\n procedure SetPen(const Value: TPen);\r\n procedure SetClearButton(const Value: TSignatureCaptureClearButton);\r\n function GetEmpty: Boolean;\r\n procedure SetEmpty(const Value: Boolean);\r\n procedure SetText(const Value: string);\r\n protected\r\n procedure CreateInitialize; override;\r\n procedure MouseUp(Button: TMouseButton; Shift: TShiftState; X,Y: Integer); override;\r\n procedure MouseDown(Button: TMouseButton; Shift: TShiftState; X,Y: Integer); override;\r\n procedure MouseMove(Shift: TShiftState; X,Y: Integer); override;\r\n procedure Paint; override;\r\n procedure PaintSignature(ACanvas: TCanvas); virtual;\r\n procedure PaintClearButton; virtual;\r\n procedure PaintLine; virtual;\r\n procedure PaintText; virtual;\r\n procedure ClearBtnChanged(Sender: TObject);\r\n procedure ButtonChanged(Sender: TObject);\r\n procedure TextPositionChanged(Sender: TObject);\r\n function GetLineY: Integer;\r\n function InClearRect(AX, AY: Integer): Boolean;\r\n procedure UpdateElement; override;\r\n public\r\n destructor Destroy; override;\r\n function GetAsBase64Image: string;\r\n property Empty: Boolean read GetEmpty write SetEmpty;\r\n published\r\n property Align;\r\n property Anchors;\r\n property ChildOrder;\r\n property ShowHint;\r\n property Visible;\r\n property TabOrder;\r\n property TabStop;\r\n property ClearButton: TSignatureCaptureClearButton read FClearButton write SetClearButton;\r\n property TextPosition: TSignatureCaptureSignTextPosition read FTextPosition write SetTextPosition;\r\n property Text: string read FText write SetText;\r\n property Pen: TPen read FPen write SetPen;\r\n property OnEnter;\r\n property OnExit;\r\n property OnMouseDown;\r\n property OnMouseEnter;\r\n property OnMouseLeave;\r\n property OnMouseMove;\r\n property OnMouseUp;\r\n end;\r\n\r\n TWebSignatureCapture = class(TSignatureCapture);\r\n\r\nimplementation\r\n\r\nconst\r\n TEXTSPACING = 5;\r\n TSIGNATURECAPTURECLEAR = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAArklEQVRIS+2U0Q2DQAxDH0swRLdop2AIxukQnaJsw' +\r\n 'RBMgSxBhdCF+CdSP7ifSCfHTny5dBSfrpifWyB1OLLoAbyBAVgSlh74ACMwn7GRwBd4bgmKkYjIJ0AFKb5cgWOiqmqJOJjLKboisMjVTTamLSLl' +\r\n '7bZE3f2cygQEPIvoTp6n5E4HeyVHEd1Z5H8jUGpR6SOXjqkz5w4m/Aflq6J82aVr2AU4P9nlauJugdS+FVopQhlEDradAAAAAElFTkSuQmCC';\r\n\r\n{ TSignatureCapture }\r\n\r\nprocedure TSignatureCapture.ButtonChanged(Sender: TObject);\r\nbegin\r\n if FClearButton.Image.Data <> '' then\r\n FClearBtn.LoadFromResource('')\r\n else\r\n FClearBtn.LoadFromFile(FClearButton.Image.FileName);\r\n \r\n Invalidate;\r\nend;\r\n\r\nprocedure TSignatureCapture.ClearBtnChanged(Sender: TObject);\r\nbegin\r\n Invalidate;\r\nend;\r\n\r\nprocedure TSignatureCapture.CreateInitialize;\r\nbegin\r\n inherited;\r\n AllowTouch := False;\r\n FText := 'Sign here';\r\n FClearBtn := TGraphic.Create;\r\n FClearBtn.LoadFromResource(TSIGNATURECAPTURECLEAR);\r\n FClearBtn.OnChange := ClearBtnChanged;\r\n FMouseDown := False;\r\n FClearButton := TSignatureCaptureClearButton.Create;\r\n FClearButton.OnChange := ButtonChanged;\r\n FSignaturePoints := TSignatureCapturePoints.Create;\r\n FTextPosition := TSignatureCaptureSignTextPosition.Create;\r\n FTextPosition.OnChange := TextPositionChanged;\r\n FPen := TPen.Create;\r\n CustomBorder := True;\r\n BorderStyle := bsSingle;\r\n Width := 300;\r\n Height := 256;\r\nend;\r\n\r\ndestructor TSignatureCapture.Destroy;\r\nbegin\r\n FClearBtn.Free;\r\n FClearButton.Free;\r\n FSignaturePoints.Free;\r\n FTextPosition.Free;\r\n FPen.Free;\r\n inherited;\r\nend;\r\n\r\nfunction TSignatureCapture.GetAsBase64Image: string;\r\nbegin\r\n FExport := True;\r\n Invalidate;\r\n Result := Canvas.GetBase64Image;\r\n FExport := False;\r\n Invalidate;\r\nend;\r\n\r\nfunction TSignatureCapture.GetEmpty: Boolean;\r\nbegin\r\n Result := FSignaturePoints.Count = 0;\r\nend;\r\n\r\nfunction TSignatureCapture.GetLineY: Integer;\r\nbegin\r\n Result := Round(Canvas.TextHeight(Text)) + 2 * TEXTSPACING;\r\nend;\r\n\r\nfunction TSignatureCapture.InClearRect(AX, AY: Integer): Boolean;\r\nvar\r\n h: Integer;\r\nbegin\r\n Result := False;\r\n\r\n case FClearButton.Position of\r\n cbpTopLeft:\r\n begin\r\n case FTextPosition.Position of\r\n ltpBottomLeft, ltpBottomCenter, ltpBottomRight, ltpXY:\r\n begin\r\n Result := (AX >= TEXTSPACING) and (AX <= TEXTSPACING + FClearBtn.Width) and (AY >= TEXTSPACING) and (AY <= TEXTSPACING + FClearBtn.Height);\r\n end;\r\n ltpTopLeft, ltpTopCenter, ltpTopRight:\r\n begin\r\n h := GetLineY;\r\n Result := (AX >= TEXTSPACING) and (AX <= TEXTSPACING + FClearBtn.Width) and (AY >= TEXTSPACING + h) and (AY <= TEXTSPACING + h + FClearBtn.Height);\r\n end;\r\n end;\r\n end;\r\n cbpTopRight:\r\n begin\r\n case FTextPosition.Position of\r\n ltpBottomLeft, ltpBottomCenter, ltpBottomRight, ltpXY:\r\n begin\r\n Result := (AX >= Width - FClearBtn.Width - TEXTSPACING) and (AX <= Width - TEXTSPACING) and (AY >= TEXTSPACING) and (AY <= TEXTSPACING + FClearBtn.Height);\r\n end;\r\n ltpTopLeft, ltpTopCenter, ltpTopRight:\r\n begin\r\n h := GetLineY;\r\n Result := (AX >= Width - FClearBtn.Width - TEXTSPACING) and (AX <= Width - TEXTSPACING) and (AY >= TEXTSPACING + h) and (AY <= TEXTSPACING + h + FClearBtn.Height);\r\n end;\r\n end;\r\n end;\r\n cbpBottomLeft:\r\n begin\r\n case FTextPosition.Position of\r\n ltpBottomLeft, ltpBottomCenter, ltpBottomRight:\r\n begin\r\n h := GetLineY;\r\n Result := (AX >= TEXTSPACING) and (AX <= TEXTSPACING + FClearBtn.Width) and (AY >= Height - FClearBtn.Height - h - TEXTSPACING) and (AY <= Height - h - TEXTSPACING);\r\n end;\r\n ltpTopLeft, ltpTopCenter, ltpTopRight, ltpXY:\r\n begin\r\n Result := (AX >= TEXTSPACING) and (AX <= TEXTSPACING + FClearBtn.Width) and (AY >= Height - FClearBtn.Height - TEXTSPACING) and (AY <= Height - TEXTSPACING);\r\n end;\r\n end;\r\n end;\r\n cbpBottomRight:\r\n begin\r\n case FTextPosition.Position of\r\n ltpBottomLeft, ltpBottomCenter, ltpBottomRight:\r\n begin\r\n h := GetLineY;\r\n Result := (AX >= Width - FClearBtn.Width - TEXTSPACING) and (AX <= Width - TEXTSPACING) and (AY >= Height - FClearBtn.Height - h - TEXTSPACING) and (AY <= Height - h - TEXTSPACING);\r\n end;\r\n ltpTopLeft, ltpTopCenter, ltpTopRight, ltpXY:\r\n begin\r\n Result := (AX >= Width - FClearBtn.Width - TEXTSPACING) and (AX <= Width - TEXTSPACING) and (AY >= Height - FClearBtn.Height - TEXTSPACING) and (AY <= Height - TEXTSPACING);\r\n end;\r\n end;\r\n end;\r\n cbpXY: Result := (AX >= FClearButton.X) and (AX <= FClearButton.X + FClearBtn.Width) and (AY >= FClearButton.Y) and (AY <= FClearButton.Y + FClearBtn.Height);\r\n end;\r\nend;\r\n\r\nprocedure TSignatureCapture.MouseDown(Button: TMouseButton; Shift: TShiftState;\r\n X, Y: Integer);\r\nvar\r\n p: TSignatureCapturePoint;\r\nbegin\r\n inherited;\r\n if InClearRect(X, Y) then\r\n Empty := True\r\n else\r\n begin\r\n FMouseDown := True;\r\n p := TSignatureCapturePoint.Create;\r\n p.X := X;\r\n p.Y := Y;\r\n p.DrawLine := False;\r\n p.PenColor := FPen.Color;\r\n p.PenWidth := FPen.Width;\r\n p.PenStyle := FPen.Style;\r\n FSignaturePoints.Add(p);\r\n Capture;\r\n end;\r\nend;\r\n\r\nprocedure TSignatureCapture.MouseMove(Shift: TShiftState; X, Y: Integer);\r\nvar\r\n p: TSignatureCapturePoint;\r\nbegin\r\n inherited;\r\n if FMouseDown then\r\n begin\r\n Cursor := crDefault;\r\n p := TSignatureCapturePoint.Create;\r\n p.X := X;\r\n p.Y := Y;\r\n p.DrawLine := True;\r\n p.PenColor := FPen.Color;\r\n p.PenWidth := FPen.Width;\r\n p.PenStyle := FPen.Style;\r\n FSignaturePoints.Add(p);\r\n Invalidate;\r\n end\r\n else\r\n begin\r\n if InClearRect(X, Y) then\r\n Cursor := crHandPoint\r\n else\r\n Cursor := crDefault;\r\n end;\r\nend;\r\n\r\nprocedure TSignatureCapture.MouseUp(Button: TMouseButton; Shift: TShiftState; X,\r\n Y: Integer);\r\nvar\r\n p: TSignatureCapturePoint;\r\nbegin\r\n inherited;\r\n p := TSignatureCapturePoint.Create;\r\n p.X := X;\r\n p.Y := Y;\r\n p.DrawLine := True;\r\n p.PenColor := FPen.Color;\r\n p.PenWidth := FPen.Width;\r\n p.PenStyle := FPen.Style;\r\n FSignaturePoints.Add(p);\r\n FMouseDown := False;\r\n ReleaseCapture;\r\nend;\r\n\r\nprocedure TSignatureCapture.Paint;\r\nbegin\r\n if not FExport then\r\n begin\r\n inherited;\r\n Canvas.Clear;\r\n PaintLine;\r\n PaintText;\r\n PaintClearButton;\r\n end\r\n else\r\n begin\r\n Canvas.Pen.Style := psClear;\r\n Canvas.FillRect(Bounds(0, 0, Width + 1, Height + 1));\r\n end;\r\n\r\n PaintSignature(Canvas);\r\nend;\r\n\r\nprocedure TSignatureCapture.PaintClearButton;\r\nvar\r\n h: Integer;\r\nbegin\r\n case FClearButton.Position of\r\n cbpTopLeft:\r\n begin\r\n case FTextPosition.Position of\r\n ltpBottomLeft, ltpBottomCenter, ltpBottomRight, ltpXY:\r\n begin\r\n Canvas.Draw(TEXTSPACING, TEXTSPACING, FClearBtn);\r\n end;\r\n ltpTopLeft, ltpTopCenter, ltpTopRight:\r\n begin\r\n h := GetLineY;\r\n Canvas.Draw(TEXTSPACING, h + TEXTSPACING, FClearBtn);\r\n end;\r\n end;\r\n end;\r\n cbpTopRight:\r\n begin\r\n case FTextPosition.Position of\r\n ltpBottomLeft, ltpBottomCenter, ltpBottomRight, ltpXY:\r\n begin\r\n Canvas.Draw(Width - FClearBtn.Width - TEXTSPACING, TEXTSPACING, FClearBtn);\r\n end;\r\n ltpTopLeft, ltpTopCenter, ltpTopRight:\r\n begin\r\n h := GetLineY;\r\n Canvas.Draw(Width - FClearBtn.Width - TEXTSPACING, h + TEXTSPACING, FClearBtn);\r\n end;\r\n end;\r\n end;\r\n cbpBottomLeft:\r\n begin\r\n case FTextPosition.Position of\r\n ltpBottomLeft, ltpBottomCenter, ltpBottomRight:\r\n begin\r\n h := GetLineY;\r\n Canvas.Draw(TEXTSPACING, Height - FClearBtn.Height - h - TEXTSPACING, FClearBtn);\r\n end;\r\n ltpTopLeft, ltpTopCenter, ltpTopRight, ltpXY:\r\n begin\r\n Canvas.Draw(TEXTSPACING, Height - FClearBtn.Height - TEXTSPACING, FClearBtn);\r\n end;\r\n end;\r\n end;\r\n cbpBottomRight:\r\n begin\r\n case FTextPosition.Position of\r\n ltpBottomLeft, ltpBottomCenter, ltpBottomRight:\r\n begin\r\n h := GetLineY;\r\n Canvas.Draw(Width - FClearBtn.Width - TEXTSPACING, Height - FClearBtn.Height - h - TEXTSPACING, FClearBtn);\r\n end;\r\n ltpTopLeft, ltpTopCenter, ltpTopRight, ltpXY:\r\n begin\r\n Canvas.Draw(Width - FClearBtn.Width - TEXTSPACING, Height - FClearBtn.Height - TEXTSPACING, FClearBtn);\r\n end;\r\n end;\r\n end;\r\n cbpXY: Canvas.Draw(FClearButton.X, FClearButton.Y, FClearBtn);\r\n end;\r\nend;\r\n\r\nprocedure TSignatureCapture.PaintLine;\r\nvar\r\n h: Integer;\r\nbegin\r\n if FTextPosition.LineVisible then\r\n begin\r\n h := GetLineY;\r\n Canvas.Pen.Assign(FTextPosition.Line);\r\n case FTextPosition.Position of\r\n ltpBottomLeft, ltpBottomCenter, ltpBottomRight:\r\n begin\r\n Canvas.MoveTo(0, Height - h);\r\n Canvas.LineTo(Width, Height - h);\r\n end;\r\n ltpTopLeft, ltpTopCenter, ltpTopRight:\r\n begin\r\n Canvas.MoveTo(0, h);\r\n Canvas.LineTo(Width, h);\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TSignatureCapture.PaintSignature(ACanvas: TCanvas);\r\nvar\r\n I: Integer;\r\nbegin\r\n for I := 0 to FSignaturePoints.Count - 2 do\r\n begin\r\n if FSignaturePoints[I + 1].DrawLine then\r\n begin\r\n ACanvas.Pen.Width := FSignaturePoints[I].PenWidth;\r\n ACanvas.Pen.Color := FSignaturePoints[I].PenColor;\r\n ACanvas.Pen.Style := FSignaturePoints[I].PenStyle;\r\n ACanvas.MoveTo(FSignaturePoints[I].X, FSignaturePoints[I].Y);\r\n ACanvas.LineTo(FSignaturePoints[I + 1].X, FSignaturePoints[I + 1].Y);\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TSignatureCapture.PaintText;\r\nvar\r\n r: TRect;\r\n tw, th: Single;\r\nbegin\r\n tw := Canvas.TextWidth(Text);\r\n th := Canvas.TextHeight(Text);\r\n case FTextPosition.Position of\r\n ltpBottomLeft: r := Rect(TEXTSPACING, Round(Height - th - TEXTSPACING), Round(TEXTSPACING + tw), Height);\r\n ltpBottomCenter: r := Rect(Round((Width - tw) / 2), Round(Height - th - TEXTSPACING), Round((Width + tw) / 2), Height);\r\n ltpBottomRight: r := Rect(Round((Width - tw - TEXTSPACING)), Round(Height - th - TEXTSPACING), Width - TEXTSPACING, Height);\r\n ltpTopLeft: r := Rect(TEXTSPACING, TEXTSPACING, Round(TEXTSPACING + tw), Round(TEXTSPACING + th));\r\n ltpTopCenter: r := Rect(Round((Width - tw) / 2), TEXTSPACING, Round((Width + tw) / 2), Round(TEXTSPACING + th));\r\n ltpTopRight: r := Rect(Round((Width - tw - TEXTSPACING)), TEXTSPACING, Width - TEXTSPACING, Round(TEXTSPACING + th));\r\n ltpXY: r := Rect(FTextPosition.X, FTextPosition.Y, Round(FTextPosition.X + tw), Round(FTextPosition.Y + th));\r\n end;\r\n Canvas.TextRect(r, Text);\r\nend;\r\n\r\nprocedure TSignatureCapture.SetClearButton(\r\n const Value: TSignatureCaptureClearButton);\r\nbegin\r\n FClearButton.Assign(Value);\r\nend;\r\n\r\nprocedure TSignatureCapture.SetEmpty(const Value: Boolean);\r\nbegin\r\n if Value then\r\n begin\r\n FSignaturePoints.Clear;\r\n Invalidate;\r\n end;\r\nend;\r\n\r\nprocedure TSignatureCapture.SetPen(\r\n const Value: TPen);\r\nbegin\r\n FPen.Assign(Value);\r\nend;\r\n\r\nprocedure TSignatureCapture.SetText(const Value: string);\r\nbegin\r\n if FText <> Value then\r\n begin\r\n FText := Value;\r\n Invalidate;\r\n end;\r\nend;\r\n\r\nprocedure TSignatureCapture.SetTextPosition(\r\n const Value: TSignatureCaptureSignTextPosition);\r\nbegin\r\n FTextPosition.Assign(Value);\r\nend;\r\n\r\nprocedure TSignatureCapture.TextPositionChanged(Sender: TObject);\r\nbegin\r\n Invalidate;\r\nend;\r\n\r\nprocedure TSignatureCapture.UpdateElement;\r\nbegin\r\n inherited;\r\n if Assigned(ElementHandle) then\r\n ElementHandle.style.setProperty('touch-action','none');\r\nend;\r\n\r\n{ TSignatureCapturePoints }\r\n\r\nfunction TSignatureCapturePoints.GetItem(\r\n Index: Integer): TSignatureCapturePoint;\r\nbegin\r\n Result := TSignatureCapturePoint(inherited Items[Index]);\r\nend;\r\n\r\nprocedure TSignatureCapturePoints.SetItem(Index: Integer;\r\n const Value: TSignatureCapturePoint);\r\nbegin\r\n inherited Items[Index] := Value;\r\nend;\r\n\r\n{ TSignatureCaptureSignTextPosition }\r\n\r\nprocedure TSignatureCaptureSignTextPosition.Changed;\r\nbegin\r\n if Assigned(OnChange) then\r\n OnChange(Self);\r\nend;\r\n\r\nconstructor TSignatureCaptureSignTextPosition.Create;\r\nbegin\r\n FLineVisible := True;\r\n FPosition := ltpBottomCenter;\r\n FX := -1;\r\n FY := -1;\r\n FLine := TPen.Create;\r\n FLine.Color := clGray;\r\n FLine.Width := 1;\r\nend;\r\n\r\nprocedure TSignatureCaptureSignTextPosition.SetLine(const Value: TPen);\r\nbegin\r\n FLine.Assign(Value);\r\n Changed;\r\nend;\r\n\r\nprocedure TSignatureCaptureSignTextPosition.SetLineVisible(const Value: Boolean);\r\nbegin\r\n if FLineVisible <> Value then\r\n begin\r\n FLineVisible := Value;\r\n Changed;\r\n end;\r\nend;\r\n\r\nprocedure TSignatureCaptureSignTextPosition.SetPosition(\r\n const Value: TSignatureCaptureLineTextPosition);\r\nbegin\r\n if FPosition <> Value then\r\n begin\r\n FPosition := Value;\r\n Changed;\r\n end;\r\nend;\r\n\r\nprocedure TSignatureCaptureSignTextPosition.SetX(const Value: Integer);\r\nbegin\r\n if FX <> Value then\r\n begin\r\n FX := Value;\r\n Changed;\r\n end;\r\nend;\r\n\r\nprocedure TSignatureCaptureSignTextPosition.SetY(const Value: Integer);\r\nbegin\r\n if FY <> Value then\r\n begin\r\n FY := Value;\r\n Changed;\r\n end;\r\nend;\r\n\r\n{ TSignatureCaptureClearButton }\r\n\r\nprocedure TSignatureCaptureClearButton.Changed;\r\nbegin\r\n if Assigned(OnChange) then\r\n OnChange(Self);\r\nend;\r\n\r\nconstructor TSignatureCaptureClearButton.Create;\r\nbegin\r\n FX := -1;\r\n FY := -1;\r\n FPosition := cbpBottomLeft;\r\n FImage := TURLPicture.Create;\r\n FImage.OnChange := ImageChange;\r\n FImage.OnDataChange := ImageChange;\r\nend;\r\n\r\ndestructor TSignatureCaptureClearButton.Destroy;\r\nbegin\r\n FImage.Free;\r\n inherited;\r\nend;\r\n\r\nprocedure TSignatureCaptureClearButton.ImageChange(Sender: TObject);\r\nbegin\r\n Changed;\r\nend;\r\n\r\nprocedure TSignatureCaptureClearButton.SetImage(const Value: TURLPicture);\r\nbegin\r\n FImage := Value;\r\nend;\r\n\r\nprocedure TSignatureCaptureClearButton.SetPosition(\r\n const Value: TSignatureCaptureClearButtonPosition);\r\nbegin\r\n if FPosition <> Value then\r\n begin\r\n FPosition := Value;\r\n Changed;\r\n end;\r\nend;\r\n\r\nprocedure TSignatureCaptureClearButton.SetX(const Value: Integer);\r\nbegin\r\n if FX <> Value then\r\n begin\r\n FX := Value;\r\n Changed;\r\n end;\r\nend;\r\n\r\nprocedure TSignatureCaptureClearButton.SetY(const Value: Integer);\r\nbegin\r\n if FY <> Value then\r\n begin\r\n FY := Value;\r\n Changed;\r\n end;\r\nend;\r\n\r\nend.\r\n","unit unit_AuftragUnterschriften;\r\n\r\ninterface\r\n\r\nuses\r\n System.SysUtils, System.Classes, JS, Web, WEBLib.Graphics, WEBLib.Controls,\r\n WEBLib.Forms, WEBLib.Dialogs, VCL.TMSFNCTypes, VCL.TMSFNCUtils,\r\n VCL.TMSFNCGraphics, VCL.TMSFNCGraphicsTypes, Vcl.StdCtrls, WEBLib.StdCtrls,\r\n VCL.TMSFNCCustomControl, VCL.TMSFNCSignatureCapture, Vcl.Controls,\r\n WEBLib.ExtCtrls, Data.DB, WEBLib.DB, XData.Web.JsonDataset, XData.Web.Dataset,\r\n WEBLib.SignatureCapture;\r\n\r\ntype\r\n TAuftragUnterschriften = class(TForm)\r\n panelmonteur: TPanel;\r\n dsUnterschriften: TXDataWebDataSet;\r\n dsUnterschriftenNummerkomplett: TStringField;\r\n dsUnterschriftenDatum: TDateTimeField;\r\n dsUnterschriftenUnterschriftMonteur: TBlobField;\r\n dsUnterschriftenUnterschriftKunde: TBlobField;\r\n dsUnterschriftenUnterschriftMonteurText: TStringField;\r\n dsUnterschriftenUnterschriftKundeText: TStringField;\r\n sourceUnterschriften: TDataSource;\r\n WebLabel1: TLabel;\r\n WebEdit1: TEdit;\r\n dsUnterschriftenNachnameKunde: TStringField;\r\n dsUnterschriftenNachnameMonteur: TStringField;\r\n Container1: THTMLContainer;\r\n btnUAbbrechen: TButton;\r\n btnUSpeichern: TButton;\r\n Container2: THTMLContainer;\r\n panelkunde: TPanel;\r\n WebLabel3: TLabel;\r\n WebEdit2: TEdit;\r\n SigMonteur: TSignatureCapture;\r\n SigKunde: TSignatureCapture;\r\n procedure btnUSpeichernClick(Sender: TObject);\r\n procedure btnUAbbrechenClick(Sender: TObject);\r\n procedure dsUnterschriftenAfterPost(DataSet: TDataSet);\r\n procedure dsUnterschriftenAfterApplyUpdates(Sender: TDataSet;\r\n Info: TResolveResults);\r\n procedure WebFormShow(Sender: TObject);\r\n private\r\n { Private-Deklarationen }\r\n public\r\n { Public-Deklarationen }\r\n UMerkerAuftrag:string;\r\n protected procedure LoadDFMValues; override; end;\r\n\r\nvar\r\n AuftragUnterschriften: TAuftragUnterschriften;\r\n\r\nimplementation\r\n uses unit1, unit2, unit_Einzelauftrag;\r\n{$R *.dfm}\r\n\r\nprocedure TAuftragUnterschriften.btnUAbbrechenClick(Sender: TObject);\r\nbegin\r\n self.Close;\r\nend;\r\n\r\nprocedure TAuftragUnterschriften.btnUSpeichernClick(Sender: TObject);\r\nbegin\r\n dsunterschriften.Append;\r\n dsUnterschriftenNummerkomplett.AsString:=UMerkerAuftrag;\r\n dsUnterschriftenDatum.AsDateTime:=date+time;\r\n//WebImageControl1.URL := TMSFNCSignatureCapture1.GetBase64Img;\r\n//WebDBImageControl1.Base64Image := TMSFNCSignatureCapture1.GetBase64Img;\r\n dsUnterschriftenUnterschriftMonteurText.asstring:=sigmonteur.GetAsBase64Image;\r\n dsUnterschriftenUnterschriftKundeText.AsString:=sigkunde.GetAsBase64Image;\r\n dsUnterschriftenNachnameMonteur.AsString:=WebEdit1.Text;\r\n dsUnterschriftenNachnameKunde.AsString:=WebEdit2.Text;\r\n dsUnterschriften.Post;\r\n\r\nend;\r\n\r\nprocedure TAuftragUnterschriften.dsUnterschriftenAfterApplyUpdates(\r\n Sender: TDataSet; Info: TResolveResults);\r\nbegin\r\n self.Close;\r\nend;\r\n\r\nprocedure TAuftragUnterschriften.dsUnterschriftenAfterPost(DataSet: TDataSet);\r\nbegin\r\n if LizenzOK then\r\n begin\r\n dsUnterschriften.ApplyUpdates;\r\n end\r\n else\r\n begin\r\n showmessage('Für das Speichern von Daten sind Sie noch nicht freigeschaltet, bitte erwerben Sie eine Lizenz');\r\n end;\r\nend;\r\n\r\nprocedure TAuftragUnterschriften.WebFormShow(Sender: TObject);\r\nvar\r\n myelement:TJSHTMLElement;\r\nbegin\r\n Container1.html.text:='';\r\n myelement:=container1.ElementHandle;\r\n btnUAbbrechen.ParentElement:=myelement;\r\n btnUSpeichern.ParentElement:=myelement;\r\n\r\n myelement:=container2.elementhandle;\r\n panelMonteur.parentelement:=myelement;\r\n panelKunde.parentelement:=myelement;\r\n\r\n myelement:=panelMonteur.elementhandle;\r\n sigmonteur.ParentElement:=myelement;\r\n weblabel1.ParentElement:=myelement;\r\n webedit1.ParentElement:=myelement;\r\n\r\n myelement:=panelkunde.elementhandle;\r\n sigkunde.ParentElement:=myelement;\r\n weblabel3.ParentElement:=myelement;\r\n webedit2.ParentElement:=myelement;\r\n\r\n dsUnterschriften.Close;\r\n dsUnterschriften.QueryString:='$filter=Nummerkomplett eq '+QuotedStr(UMerkerAuftrag);\r\n dsUnterschriften.Load;\r\nend;\r\n\r\nprocedure TAuftragUnterschriften.LoadDFMValues;\r\nbegin\r\n inherited LoadDFMValues;\r\n\r\n panelmonteur := TPanel.Create(Self);\r\n WebLabel1 := TLabel.Create(Self);\r\n WebEdit1 := TEdit.Create(Self);\r\n SigMonteur := TSignatureCapture.Create(Self);\r\n Container1 := THTMLContainer.Create(Self);\r\n btnUAbbrechen := TButton.Create(Self);\r\n btnUSpeichern := TButton.Create(Self);\r\n Container2 := THTMLContainer.Create(Self);\r\n panelkunde := TPanel.Create(Self);\r\n WebLabel3 := TLabel.Create(Self);\r\n WebEdit2 := TEdit.Create(Self);\r\n SigKunde := TSignatureCapture.Create(Self);\r\n dsUnterschriften := TXDataWebDataSet.Create(Self);\r\n dsUnterschriftenNummerkomplett := TStringField.Create(Self);\r\n dsUnterschriftenDatum := TDateTimeField.Create(Self);\r\n dsUnterschriftenUnterschriftMonteur := TBlobField.Create(Self);\r\n dsUnterschriftenUnterschriftKunde := TBlobField.Create(Self);\r\n dsUnterschriftenUnterschriftMonteurText := TStringField.Create(Self);\r\n dsUnterschriftenUnterschriftKundeText := TStringField.Create(Self);\r\n dsUnterschriftenNachnameKunde := TStringField.Create(Self);\r\n dsUnterschriftenNachnameMonteur := TStringField.Create(Self);\r\n sourceUnterschriften := TDataSource.Create(Self);\r\n\r\n panelmonteur.BeforeLoadDFMValues;\r\n WebLabel1.BeforeLoadDFMValues;\r\n WebEdit1.BeforeLoadDFMValues;\r\n SigMonteur.BeforeLoadDFMValues;\r\n Container1.BeforeLoadDFMValues;\r\n btnUAbbrechen.BeforeLoadDFMValues;\r\n btnUSpeichern.BeforeLoadDFMValues;\r\n Container2.BeforeLoadDFMValues;\r\n panelkunde.BeforeLoadDFMValues;\r\n WebLabel3.BeforeLoadDFMValues;\r\n WebEdit2.BeforeLoadDFMValues;\r\n SigKunde.BeforeLoadDFMValues;\r\n dsUnterschriften.BeforeLoadDFMValues;\r\n dsUnterschriftenNummerkomplett.BeforeLoadDFMValues;\r\n dsUnterschriftenDatum.BeforeLoadDFMValues;\r\n dsUnterschriftenUnterschriftMonteur.BeforeLoadDFMValues;\r\n dsUnterschriftenUnterschriftKunde.BeforeLoadDFMValues;\r\n dsUnterschriftenUnterschriftMonteurText.BeforeLoadDFMValues;\r\n dsUnterschriftenUnterschriftKundeText.BeforeLoadDFMValues;\r\n dsUnterschriftenNachnameKunde.BeforeLoadDFMValues;\r\n dsUnterschriftenNachnameMonteur.BeforeLoadDFMValues;\r\n sourceUnterschriften.BeforeLoadDFMValues;\r\n try\r\n Name := 'AuftragUnterschriften';\r\n Width := 348;\r\n Height := 682;\r\n CSSLibrary := cssBootstrap;\r\n ElementFont := efCSS;\r\n ElementPosition := epIgnore;\r\n SetEvent(Self, 'OnShow', 'WebFormShow');\r\n panelmonteur.SetParentComponent(Self);\r\n panelmonteur.Name := 'panelmonteur';\r\n panelmonteur.Left := 0;\r\n panelmonteur.Top := 133;\r\n panelmonteur.Width := 313;\r\n panelmonteur.Height := 270;\r\n panelmonteur.ElementClassName := 'card m-1 border-info bg-info';\r\n panelmonteur.BorderStyle := bsNone;\r\n panelmonteur.Caption := 'panelMonteur';\r\n panelmonteur.Color := 12557152;\r\n panelmonteur.ElementFont := efCSS;\r\n panelmonteur.ElementPosition := epIgnore;\r\n panelmonteur.ShowCaption := False;\r\n WebLabel1.SetParentComponent(panelmonteur);\r\n WebLabel1.Name := 'WebLabel1';\r\n WebLabel1.Left := 3;\r\n WebLabel1.Top := 195;\r\n WebLabel1.Width := 120;\r\n WebLabel1.Height := 15;\r\n WebLabel1.Caption := 'Name ausgeschrieben:';\r\n WebLabel1.ElementClassName := 'text-sm';\r\n WebLabel1.ElementFont := efCSS;\r\n WebLabel1.ElementPosition := epIgnore;\r\n WebLabel1.HeightPercent := 100.000000000000000000;\r\n WebLabel1.WidthStyle := ssPercent;\r\n WebLabel1.WidthPercent := 98.000000000000000000;\r\n WebEdit1.SetParentComponent(panelmonteur);\r\n WebEdit1.Name := 'WebEdit1';\r\n WebEdit1.Left := 3;\r\n WebEdit1.Top := 216;\r\n WebEdit1.Width := 295;\r\n WebEdit1.Height := 23;\r\n WebEdit1.AutoSize := True;\r\n WebEdit1.ChildOrder := 4;\r\n WebEdit1.ElementClassName := 'form-control';\r\n WebEdit1.ElementFont := efCSS;\r\n WebEdit1.ElementPosition := epIgnore;\r\n WebEdit1.HeightStyle := ssAuto;\r\n WebEdit1.HeightPercent := 100.000000000000000000;\r\n WebEdit1.TextHint := 'Name Monteur/Techniker';\r\n WebEdit1.WidthStyle := ssPercent;\r\n WebEdit1.WidthPercent := 98.000000000000000000;\r\n SigMonteur.SetParentComponent(panelmonteur);\r\n SigMonteur.Name := 'SigMonteur';\r\n SigMonteur.Left := 3;\r\n SigMonteur.Top := 3;\r\n SigMonteur.Width := 299;\r\n SigMonteur.Height := 186;\r\n SigMonteur.ElementClassName := 'form-control';\r\n SigMonteur.WidthStyle := ssPercent;\r\n SigMonteur.WidthPercent := 98.000000000000000000;\r\n SigMonteur.ChildOrder := 2;\r\n SigMonteur.ElementPosition := epIgnore;\r\n SigMonteur.TabOrder := 1;\r\n SigMonteur.TextPosition.Line.Color := clGray;\r\n SigMonteur.Text := 'Unterschrift Monteur/Techniker';\r\n Container1.SetParentComponent(Self);\r\n Container1.Name := 'Container1';\r\n Container1.Left := 0;\r\n Container1.Top := 8;\r\n Container1.Width := 225;\r\n Container1.Height := 41;\r\n Container1.HeightStyle := ssAuto;\r\n Container1.WidthStyle := ssPercent;\r\n Container1.ElementFont := efCSS;\r\n Container1.ElementPosition := epIgnore;\r\n btnUAbbrechen.SetParentComponent(Self);\r\n btnUAbbrechen.Name := 'btnUAbbrechen';\r\n btnUAbbrechen.Left := 0;\r\n btnUAbbrechen.Top := 102;\r\n btnUAbbrechen.Width := 104;\r\n btnUAbbrechen.Height := 25;\r\n btnUAbbrechen.Caption := 'Abbrechen';\r\n btnUAbbrechen.ChildOrder := 3;\r\n btnUAbbrechen.ElementClassName := 'btn btn-info btn-sm m-1 text-left';\r\n btnUAbbrechen.ElementFont := efCSS;\r\n btnUAbbrechen.ElementPosition := epIgnore;\r\n btnUAbbrechen.HeightStyle := ssAuto;\r\n btnUAbbrechen.HeightPercent := 100.000000000000000000;\r\n btnUAbbrechen.WidthStyle := ssAuto;\r\n btnUAbbrechen.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnUAbbrechen, Self, 'OnClick', 'btnUAbbrechenClick');\r\n btnUSpeichern.SetParentComponent(Self);\r\n btnUSpeichern.Name := 'btnUSpeichern';\r\n btnUSpeichern.Left := 110;\r\n btnUSpeichern.Top := 102;\r\n btnUSpeichern.Width := 105;\r\n btnUSpeichern.Height := 25;\r\n btnUSpeichern.Caption := 'speichern';\r\n btnUSpeichern.ChildOrder := 4;\r\n btnUSpeichern.ElementClassName := 'btn btn-info btn-sm m-1 text-left';\r\n btnUSpeichern.ElementFont := efCSS;\r\n btnUSpeichern.ElementPosition := epIgnore;\r\n btnUSpeichern.HeightStyle := ssAuto;\r\n btnUSpeichern.HeightPercent := 100.000000000000000000;\r\n btnUSpeichern.WidthStyle := ssAuto;\r\n btnUSpeichern.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnUSpeichern, Self, 'OnClick', 'btnUSpeichernClick');\r\n Container2.SetParentComponent(Self);\r\n Container2.Name := 'Container2';\r\n Container2.Left := 0;\r\n Container2.Top := 55;\r\n Container2.Width := 225;\r\n Container2.Height := 41;\r\n Container2.ElementClassName := 'd-flex flex-wrap m-1';\r\n Container2.HeightStyle := ssAuto;\r\n Container2.WidthStyle := ssAuto;\r\n Container2.ChildOrder := 1;\r\n Container2.ElementFont := efCSS;\r\n Container2.ElementPosition := epIgnore;\r\n panelkunde.SetParentComponent(Self);\r\n panelkunde.Name := 'panelkunde';\r\n panelkunde.Left := 0;\r\n panelkunde.Top := 404;\r\n panelkunde.Width := 313;\r\n panelkunde.Height := 270;\r\n panelkunde.ElementClassName := 'card m-1 border-info bg-info';\r\n panelkunde.BorderStyle := bsNone;\r\n panelkunde.Caption := 'panelKunde';\r\n panelkunde.ChildOrder := 7;\r\n panelkunde.Color := 12557152;\r\n panelkunde.ElementFont := efCSS;\r\n panelkunde.ElementPosition := epIgnore;\r\n panelkunde.ShowCaption := False;\r\n WebLabel3.SetParentComponent(panelkunde);\r\n WebLabel3.Name := 'WebLabel3';\r\n WebLabel3.Left := 3;\r\n WebLabel3.Top := 195;\r\n WebLabel3.Width := 120;\r\n WebLabel3.Height := 15;\r\n WebLabel3.Caption := 'Name ausgeschrieben:';\r\n WebLabel3.ElementClassName := 'text-sm';\r\n WebLabel3.ElementFont := efCSS;\r\n WebLabel3.ElementPosition := epIgnore;\r\n WebLabel3.HeightPercent := 100.000000000000000000;\r\n WebLabel3.WidthStyle := ssPercent;\r\n WebLabel3.WidthPercent := 98.000000000000000000;\r\n WebEdit2.SetParentComponent(panelkunde);\r\n WebEdit2.Name := 'WebEdit2';\r\n WebEdit2.Left := 3;\r\n WebEdit2.Top := 216;\r\n WebEdit2.Width := 295;\r\n WebEdit2.Height := 23;\r\n WebEdit2.AutoSize := True;\r\n WebEdit2.ChildOrder := 4;\r\n WebEdit2.ElementClassName := 'form-control';\r\n WebEdit2.ElementFont := efCSS;\r\n WebEdit2.ElementPosition := epIgnore;\r\n WebEdit2.HeightStyle := ssAuto;\r\n WebEdit2.HeightPercent := 100.000000000000000000;\r\n WebEdit2.TextHint := 'Name des Kunden';\r\n WebEdit2.WidthStyle := ssPercent;\r\n WebEdit2.WidthPercent := 98.000000000000000000;\r\n SigKunde.SetParentComponent(panelkunde);\r\n SigKunde.Name := 'SigKunde';\r\n SigKunde.Left := 6;\r\n SigKunde.Top := 11;\r\n SigKunde.Width := 299;\r\n SigKunde.Height := 186;\r\n SigKunde.ElementClassName := 'form-control';\r\n SigKunde.WidthStyle := ssPercent;\r\n SigKunde.WidthPercent := 98.000000000000000000;\r\n SigKunde.ChildOrder := 2;\r\n SigKunde.ElementPosition := epIgnore;\r\n SigKunde.TabOrder := 1;\r\n SigKunde.TextPosition.Line.Color := clGray;\r\n SigKunde.Text := 'Unterschrift Kunde';\r\n dsUnterschriften.SetParentComponent(Self);\r\n dsUnterschriften.Name := 'dsUnterschriften';\r\n dsUnterschriften.AfterApplyUpdates := dsUnterschriftenAfterApplyUpdates;\r\n dsUnterschriften.AfterPost := dsUnterschriftenAfterPost;\r\n dsUnterschriften.EntitySetName := 'AuftragUnterschriften';\r\n dsUnterschriften.Connection := DM2.XDataWebConnection1;\r\n dsUnterschriften.Left := 252;\r\n dsUnterschriften.Top := 96;\r\n dsUnterschriftenNummerkomplett.SetParentComponent(dsUnterschriften);\r\n dsUnterschriftenNummerkomplett.Name := 'dsUnterschriftenNummerkomplett';\r\n dsUnterschriftenNummerkomplett.FieldName := 'Nummerkomplett';\r\n dsUnterschriftenNummerkomplett.Required := True;\r\n dsUnterschriftenNummerkomplett.Size := 10;\r\n dsUnterschriftenDatum.SetParentComponent(dsUnterschriften);\r\n dsUnterschriftenDatum.Name := 'dsUnterschriftenDatum';\r\n dsUnterschriftenDatum.FieldName := 'Datum';\r\n dsUnterschriftenUnterschriftMonteur.SetParentComponent(dsUnterschriften);\r\n dsUnterschriftenUnterschriftMonteur.Name := 'dsUnterschriftenUnterschriftMonteur';\r\n dsUnterschriftenUnterschriftMonteur.FieldName := 'UnterschriftMonteur';\r\n dsUnterschriftenUnterschriftKunde.SetParentComponent(dsUnterschriften);\r\n dsUnterschriftenUnterschriftKunde.Name := 'dsUnterschriftenUnterschriftKunde';\r\n dsUnterschriftenUnterschriftKunde.FieldName := 'UnterschriftKunde';\r\n dsUnterschriftenUnterschriftMonteurText.SetParentComponent(dsUnterschriften);\r\n dsUnterschriftenUnterschriftMonteurText.Name := 'dsUnterschriftenUnterschriftMonteurText';\r\n dsUnterschriftenUnterschriftMonteurText.FieldName := 'UnterschriftMonteurText';\r\n dsUnterschriftenUnterschriftMonteurText.Size := 255;\r\n dsUnterschriftenUnterschriftKundeText.SetParentComponent(dsUnterschriften);\r\n dsUnterschriftenUnterschriftKundeText.Name := 'dsUnterschriftenUnterschriftKundeText';\r\n dsUnterschriftenUnterschriftKundeText.FieldName := 'UnterschriftKundeText';\r\n dsUnterschriftenUnterschriftKundeText.Size := 255;\r\n dsUnterschriftenNachnameKunde.SetParentComponent(dsUnterschriften);\r\n dsUnterschriftenNachnameKunde.Name := 'dsUnterschriftenNachnameKunde';\r\n dsUnterschriftenNachnameKunde.FieldName := 'NachnameKunde';\r\n dsUnterschriftenNachnameKunde.Size := 50;\r\n dsUnterschriftenNachnameMonteur.SetParentComponent(dsUnterschriften);\r\n dsUnterschriftenNachnameMonteur.Name := 'dsUnterschriftenNachnameMonteur';\r\n dsUnterschriftenNachnameMonteur.FieldName := 'NachnameMonteur';\r\n dsUnterschriftenNachnameMonteur.Size := 50;\r\n sourceUnterschriften.SetParentComponent(Self);\r\n sourceUnterschriften.Name := 'sourceUnterschriften';\r\n sourceUnterschriften.DataSet := dsUnterschriften;\r\n sourceUnterschriften.Left := 256;\r\n sourceUnterschriften.Top := 36;\r\n finally\r\n panelmonteur.AfterLoadDFMValues;\r\n WebLabel1.AfterLoadDFMValues;\r\n WebEdit1.AfterLoadDFMValues;\r\n SigMonteur.AfterLoadDFMValues;\r\n Container1.AfterLoadDFMValues;\r\n btnUAbbrechen.AfterLoadDFMValues;\r\n btnUSpeichern.AfterLoadDFMValues;\r\n Container2.AfterLoadDFMValues;\r\n panelkunde.AfterLoadDFMValues;\r\n WebLabel3.AfterLoadDFMValues;\r\n WebEdit2.AfterLoadDFMValues;\r\n SigKunde.AfterLoadDFMValues;\r\n dsUnterschriften.AfterLoadDFMValues;\r\n dsUnterschriftenNummerkomplett.AfterLoadDFMValues;\r\n dsUnterschriftenDatum.AfterLoadDFMValues;\r\n dsUnterschriftenUnterschriftMonteur.AfterLoadDFMValues;\r\n dsUnterschriftenUnterschriftKunde.AfterLoadDFMValues;\r\n dsUnterschriftenUnterschriftMonteurText.AfterLoadDFMValues;\r\n dsUnterschriftenUnterschriftKundeText.AfterLoadDFMValues;\r\n dsUnterschriftenNachnameKunde.AfterLoadDFMValues;\r\n dsUnterschriftenNachnameMonteur.AfterLoadDFMValues;\r\n sourceUnterschriften.AfterLoadDFMValues;\r\n end;\r\nend;\r\n\r\nend.\r\n","{********************************************************************}\r\n{ }\r\n{ written by TMS Software }\r\n{ copyright (c) 2018 - 2023 }\r\n{ Email : info@tmssoftware.com }\r\n{ Web : https://www.tmssoftware.com }\r\n{ }\r\n{ The source code is given as is. The author is not responsible }\r\n{ for any possible damage done due to the use of this code. }\r\n{ The complete source code remains property of the author and may }\r\n{ not be distributed, published, given or sold in any form as such. }\r\n{ No parts of the source code can be included in any other component }\r\n{ or application without written authorization of the author. }\r\n{********************************************************************}\r\n\r\nunit WEBLib.TMSFNCDigitalTimeSelector;\r\n\r\n{$I WEBLib.TMSFNCDefines.inc}\r\n\r\ninterface\r\n\r\nuses\r\n Classes,\r\n {$IFNDEF LCLLIB}\r\n Types,\r\n {$ENDIF}\r\n {$IFNDEF WEBLIB}\r\n {$IFNDEF LCLLIB}\r\n UITypes,\r\n {$ENDIF}\r\n {$ENDIF}\r\n WEBLib.TMSFNCCustomSelector, WEBLib.TMSFNCGraphics, WEBLib.TMSFNCGraphicsTypes,\r\n WEBLib.TMSFNCTypes, WEBLib.Controls, WEBLib.TMSFNCUtils;\r\n\r\nconst\r\n MAJ_VER = 1; // Major version nr.\r\n MIN_VER = 0; // Minor version nr.\r\n REL_VER = 2; // Release nr.\r\n BLD_VER = 1; // Build nr.\r\n\r\n //Version history\r\n //v1.0.0.0 : First Release\r\n //v1.0.1.0 : New: Property HeaderSize added\r\n //v1.0.1.1 : Fixed : Issue with Column and Row property persistence\r\n //v1.0.2.0 : New : Support for high dpi\r\n //v1.0.2.1 : Improved : Upadated initial look\r\n\r\ntype\r\n TTMSFNCDigitalTimeSelectorIntervalUnit = (tsuMilliseconds, tsuSeconds, tsuMinutes, tsuHours);\r\n\r\n TTMSFNCCustomDigitalTimeSelector = class;\r\n\r\n TTMSFNCDigitalTimeSelectorItem = class(TTMSFNCCustomSelectorItem)\r\n private\r\n FOwner: TTMSFNCCustomDigitalTimeSelector;\r\n FTime: TTime;\r\n procedure SetTime(const Value: TTime);\r\n function IsTimeStored: Boolean;\r\n public\r\n constructor Create(ACollection: TCollection); override;\r\n procedure Assign(Source: TPersistent); override;\r\n published\r\n property Time: TTime read FTime write SetTime stored IsTimeStored nodefault;\r\n end;\r\n\r\n TTMSFNCDigitalTimeSelectorItems = class(TTMSFNCCustomSelectorItems)\r\n private\r\n FOwner: TTMSFNCCustomDigitalTimeSelector;\r\n procedure SetItem(Index: Integer; const Value: TTMSFNCDigitalTimeSelectorItem);\r\n function GetItem(Index: Integer): TTMSFNCDigitalTimeSelectorItem;\r\n protected\r\n function CreateItemClass: TCollectionItemClass; override;\r\n public\r\n constructor Create(AOwner: TTMSFNCCustomSelector); override;\r\n function Add: TTMSFNCDigitalTimeSelectorItem;\r\n function Insert(Index: Integer): TTMSFNCDigitalTimeSelectorItem;\r\n property Items[Index: Integer]: TTMSFNCDigitalTimeSelectorItem read GetItem write SetItem; default;\r\n end;\r\n\r\n TTMSFNCCustomDigitalTimeSelectorTimeSelected = procedure(Sender: TObject; ATime: TTime) of object;\r\n TTMSFNCCustomDigitalTimeSelectorTimeDeselected = procedure(Sender: TObject; ATime: TTime) of object;\r\n TTMSFNCCustomDigitalTimeSelectorBeforeDrawHeaderEvent = procedure(Sender: TObject; AGraphics: TTMSFNCGraphics; ARectF: TRectF; var AAllow: Boolean; var ADefaultDraw: Boolean) of object;\r\n TTMSFNCCustomDigitalTimeSelectorAfterDrawHeaderEvent = procedure(Sender: TObject; AGraphics: TTMSFNCGraphics; ARectF: TRectF) of object;\r\n TTMSFNCCustomDigitalTimeSelectorBeforeDrawHeaderTextEvent = procedure(Sender: TObject; AGraphics: TTMSFNCGraphics; ARectF: TRectF; AText: string; var AAllow: Boolean; var ADefaultDraw: Boolean) of object;\r\n TTMSFNCCustomDigitalTimeSelectorAfterDrawHeaderTextEvent = procedure(Sender: TObject; AGraphics: TTMSFNCGraphics; ARectF: TRectF; AText: string) of object;\r\n TTMSFNCCustomDigitalTimeSelectorBeforeDrawArrowEvent = procedure(Sender: TObject; AGraphics: TTMSFNCGraphics; ARectF: TRectF; ALeft: Boolean; var AAllow: Boolean; var ADefaultDraw: Boolean) of object;\r\n TTMSFNCCustomDigitalTimeSelectorAfterDrawArrowEvent = procedure(Sender: TObject; AGraphics: TTMSFNCGraphics; ARectF: TRectF; ALeft: Boolean) of object;\r\n TTMSFNCCustomDigitalTimeSelectorNavigationEvent = procedure(Sender: TObject; ALeft: Boolean) of object;\r\n\r\n TTMSFNCCustomDigitalTimeSelector = class(TTMSFNCDefaultSelector)\r\n private\r\n FStartTime, FEndTime, FFirst, FLast, FSelectedTime: TTime;\r\n FTimeInterval: Integer;\r\n FIntervalUnit: TTMSFNCDigitalTimeSelectorIntervalUnit;\r\n FTimeFormat: string;\r\n FOnTimeDeselected: TTMSFNCCustomDigitalTimeSelectorTimeDeselected;\r\n FOnTimeSelected: TTMSFNCCustomDigitalTimeSelectorTimeSelected;\r\n FOnAfterDrawArrow: TTMSFNCCustomDigitalTimeSelectorAfterDrawArrowEvent;\r\n FOnBeforeDrawHeader: TTMSFNCCustomDigitalTimeSelectorBeforeDrawHeaderEvent;\r\n FOnBeforeDrawArrow: TTMSFNCCustomDigitalTimeSelectorBeforeDrawArrowEvent;\r\n FOnAfterDrawHeader: TTMSFNCCustomDigitalTimeSelectorAfterDrawHeaderEvent;\r\n FOnAfterDrawHeaderText: TTMSFNCCustomDigitalTimeSelectorAfterDrawHeaderTextEvent;\r\n FOnBeforeDrawHeaderText: TTMSFNCCustomDigitalTimeSelectorBeforeDrawHeaderTextEvent;\r\n FOnNavigation: TTMSFNCCustomDigitalTimeSelectorNavigationEvent;\r\n FHeaderSize: Integer;\r\n procedure SetItems(const Value: TTMSFNCDigitalTimeSelectorItems);\r\n procedure SetSelectedTime(const Value: TTime);\r\n procedure SetStartTime(const Value: TTime);\r\n procedure SetTimeInterval(const Value: Integer);\r\n procedure SetEndTime(const Value: TTime);\r\n procedure SetIntervalUnit(const Value: TTMSFNCDigitalTimeSelectorIntervalUnit);\r\n procedure SetTimeFormat(const Value: string);\r\n procedure SetHeaderSize(const Value: Integer);\r\n function GetItems: TTMSFNCDigitalTimeSelectorItems;\r\n function IsTimeFormatStored: Boolean;\r\n protected\r\n procedure ChangeDPIScale(M, D: Integer); override;\r\n procedure DoItemSelected(AItemIndex: Integer); override;\r\n procedure DoItemDeselected(AItemIndex: Integer); override;\r\n procedure DoBeforeDrawHeader(AGraphics: TTMSFNCGraphics; ARectF: TRectF; var AAllow: Boolean; var ADefaultDraw: Boolean); virtual;\r\n procedure DoAfterDrawHeader(AGraphics: TTMSFNCGraphics; ARectF: TRectF); virtual;\r\n procedure DoBeforeDrawHeaderText(AGraphics: TTMSFNCGraphics; ARectF: TRectF; AText: string; var AAllow: Boolean; var ADefaultDraw: Boolean); virtual;\r\n procedure DoAfterDrawHeaderText(AGraphics: TTMSFNCGraphics; ARectF: TRectF; AText: string); virtual;\r\n procedure DoBeforeDrawArrow(AGraphics: TTMSFNCGraphics; ARectF: TRectF; ALeft: Boolean; var AAllow: Boolean; var ADefaultDraw: Boolean); virtual;\r\n procedure DoAfterDrawArrow(AGraphics: TTMSFNCGraphics; ARectF: TRectF; ALeft: Boolean); virtual;\r\n procedure DoNavigation(ALeft: Boolean); virtual;\r\n procedure Draw(AGraphics: TTMSFNCGraphics; ARect: TRectF); override;\r\n procedure DrawArrows(AGraphics: TTMSFNCGraphics);\r\n procedure DrawItemText(AGraphics: TTMSFNCGraphics; ADisplayItem: TTMSFNCCustomSelectorDisplayItem); override;\r\n procedure AddTimes; virtual;\r\n procedure CalculateTimes; virtual;\r\n procedure UpdateCalculations; override;\r\n procedure HandleMouseDown(Button: TTMSFNCMouseButton; Shift: TShiftState; X: Single; Y: Single); override;\r\n procedure HandleMouseMove(Shift: TShiftState; X: Single; Y: Single); override;\r\n function GetVersion: string; override;\r\n function CreateItemsCollection: TTMSFNCCustomSelectorItems; override;\r\n function GetTopOffset: Single; override;\r\n function GetArrowRect(ALeft: Boolean): TRectF; virtual;\r\n procedure ResetToDefaultStyle; override;\r\n property HeaderSize: Integer read FHeaderSize write SetHeaderSize default 24;\r\n property StartTime: TTime read FStartTime write SetStartTime;\r\n property EndTime: TTime read FEndTime write SetEndTime;\r\n property TimeInterval: Integer read FTimeInterval write SetTimeInterval default 5;\r\n property IntervalUnit: TTMSFNCDigitalTimeSelectorIntervalUnit read FIntervalUnit write SetIntervalUnit default tsuMinutes;\r\n property TimeFormat: string read FTimeFormat write SetTimeFormat stored IsTimeFormatStored nodefault;\r\n property OnTimeSelected: TTMSFNCCustomDigitalTimeSelectorTimeSelected read FOnTimeSelected write FOnTimeSelected;\r\n property OnTimeDeselected: TTMSFNCCustomDigitalTimeSelectorTimeDeselected read FOnTimeDeselected write FOnTimeDeselected;\r\n property OnBeforeDrawHeader: TTMSFNCCustomDigitalTimeSelectorBeforeDrawHeaderEvent read FOnBeforeDrawHeader write FOnBeforeDrawHeader;\r\n property OnAfterDrawHeader: TTMSFNCCustomDigitalTimeSelectorAfterDrawHeaderEvent read FOnAfterDrawHeader write FOnAfterDrawHeader;\r\n property OnBeforeDrawHeaderText: TTMSFNCCustomDigitalTimeSelectorBeforeDrawHeaderTextEvent read FOnBeforeDrawHeaderText write FOnBeforeDrawHeaderText;\r\n property OnAfterDrawHeaderText: TTMSFNCCustomDigitalTimeSelectorAfterDrawHeaderTextEvent read FOnAfterDrawHeaderText write FOnAfterDrawHeaderText;\r\n property OnBeforeDrawArrow: TTMSFNCCustomDigitalTimeSelectorBeforeDrawArrowEvent read FOnBeforeDrawArrow write FOnBeforeDrawArrow;\r\n property OnAfterDrawArrow: TTMSFNCCustomDigitalTimeSelectorAfterDrawArrowEvent read FOnAfterDrawArrow write FOnAfterDrawArrow;\r\n property OnNavigation: TTMSFNCCustomDigitalTimeSelectorNavigationEvent read FOnNavigation write FOnNavigation;\r\n public\r\n constructor Create(AOwner: TComponent); override;\r\n procedure NavigateBack;\r\n procedure NavigateForth;\r\n procedure InitializePage(ATime: TTime);\r\n function FindItemByTime(ATime: TTime): Integer;\r\n function FindTimeByItem(AItem: Integer): TTime;\r\n procedure InitSample; virtual;\r\n property SelectedTime: TTime read FSelectedTime write SetSelectedTime;\r\n property Items: TTMSFNCDigitalTimeSelectorItems read GetItems write SetItems;\r\n end;\r\n\r\n {$IFNDEF LCLLIB}\r\n [ComponentPlatformsAttribute(TMSPlatformsWeb)]\r\n {$ENDIF}\r\n TTMSFNCDigitalTimeSelector = class(TTMSFNCCustomDigitalTimeSelector)\r\n protected\r\n procedure RegisterRuntimeClasses; override;\r\n published\r\n property Appearance;\r\n property Rows default 4;\r\n property Columns default 3;\r\n property SelectedItemIndex;\r\n property StartTime;\r\n property EndTime;\r\n property HeaderSize;\r\n property IntervalUnit;\r\n property TimeInterval;\r\n property TimeFormat;\r\n property OnTimeSelected;\r\n property OnTimeDeselected;\r\n property OnBeforeDrawHeader;\r\n property OnAfterDrawHeader;\r\n property OnBeforeDrawHeaderText;\r\n property OnAfterDrawHeaderText;\r\n property OnBeforeDrawArrow;\r\n property OnAfterDrawArrow;\r\n property OnNavigation;\r\n end;\r\n\r\nimplementation\r\n\r\nuses\r\n Math, DateUtils, SysUtils;\r\n\r\n{ TTMSFNCCustomDigitalTimeSelectorItem }\r\n\r\nprocedure TTMSFNCDigitalTimeSelectorItem.Assign(Source: TPersistent);\r\nbegin\r\n inherited;\r\n if Source is TTMSFNCDigitalTimeSelectorItem then\r\n FTime := (Source as TTMSFNCDigitalTimeSelectorItem).FTime;\r\nend;\r\n\r\nconstructor TTMSFNCDigitalTimeSelectorItem.Create(\r\n ACollection: TCollection);\r\nbegin\r\n inherited;\r\n if Assigned(ACollection) then\r\n FOwner := (ACollection as TTMSFNCDigitalTimeSelectorItems).FOwner;\r\nend;\r\n\r\nfunction TTMSFNCDigitalTimeSelectorItem.IsTimeStored: Boolean;\r\nbegin\r\n Result := FTime <> 0.0;\r\nend;\r\n\r\nprocedure TTMSFNCDigitalTimeSelectorItem.SetTime(const Value: TTime);\r\nbegin\r\n if FTime <> Value then\r\n FTime := Value;\r\nend;\r\n\r\n{ TTMSFNCCustomDigitalTimeSelectorItems }\r\n\r\nfunction TTMSFNCDigitalTimeSelectorItems.Add: TTMSFNCDigitalTimeSelectorItem;\r\nbegin\r\n Result := TTMSFNCDigitalTimeSelectorItem(inherited Add);\r\nend;\r\n\r\nconstructor TTMSFNCDigitalTimeSelectorItems.Create(\r\n AOwner: TTMSFNCCustomSelector);\r\nbegin\r\n inherited;\r\n FOwner := AOwner as TTMSFNCCustomDigitalTimeSelector;\r\nend;\r\n\r\nfunction TTMSFNCDigitalTimeSelectorItems.CreateItemClass: TCollectionItemClass;\r\nbegin\r\n Result := TTMSFNCDigitalTimeSelectorItem;\r\nend;\r\n\r\nfunction TTMSFNCDigitalTimeSelectorItems.GetItem(\r\n Index: Integer): TTMSFNCDigitalTimeSelectorItem;\r\nbegin\r\n Result := TTMSFNCDigitalTimeSelectorItem(inherited Items[Index]);\r\nend;\r\n\r\nfunction TTMSFNCDigitalTimeSelectorItems.Insert(\r\n Index: Integer): TTMSFNCDigitalTimeSelectorItem;\r\nbegin\r\n Result := TTMSFNCDigitalTimeSelectorItem(inherited Insert(Index));\r\nend;\r\n\r\nprocedure TTMSFNCDigitalTimeSelectorItems.SetItem(Index: Integer;\r\n const Value: TTMSFNCDigitalTimeSelectorItem);\r\nbegin\r\n inherited Items[Index] := Value;\r\nend;\r\n\r\n{ TTMSFNCCustomDigitalTimeSelector }\r\n\r\nprocedure TTMSFNCCustomDigitalTimeSelector.AddTimes;\r\nbegin\r\n BeginUpdate;\r\n CalculateTimes;\r\n EndUpdate;\r\nend;\r\n\r\nprocedure TTMSFNCCustomDigitalTimeSelector.CalculateTimes;\r\nvar\r\n I: Integer;\r\n t: TDateTime;\r\nbegin\r\n Items.Clear;\r\n t := 0.0;\r\n for I := 0 to Columns * Rows - 1 do\r\n begin\r\n case FIntervalUnit of\r\n tsuMilliseconds: t := IncMillisecond(FFirst, I * TimeInterval);\r\n tsuSeconds: t := IncSecond(FFirst, I * TimeInterval);\r\n tsuMinutes: t := IncMinute(FFirst, I * TimeInterval);\r\n tsuHours: t := IncHour(FFirst, I * TimeInterval);\r\n end;\r\n if CompareDateTime(t, EndTime) = 1 then\r\n Break;\r\n TTMSFNCDigitalTimeSelectorItem(Items.Add).Time := t;\r\n FLast := t;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomDigitalTimeSelector.ChangeDPIScale(M, D: Integer);\r\nbegin\r\n HeaderSize := TTMSFNCUtils.MulDivInt(HeaderSize, M, D);\r\n inherited;\r\nend;\r\n\r\nconstructor TTMSFNCCustomDigitalTimeSelector.Create(AOwner: TComponent);\r\n//var\r\n// fs: TFormatSettings;\r\nbegin\r\n inherited;\r\n {$IFDEF CMNLIB}\r\n {$IFDEF MSWINDOWS}\r\n NativeCanvas := True;\r\n TextQuality := gtqClearType;\r\n {$ENDIF}\r\n {$ENDIF}\r\n Height := 150;\r\n Width := 220;\r\n Columns := 3;\r\n Rows := 4;\r\n FTimeInterval := 5;\r\n FHeaderSize := 24;\r\n FIntervalUnit := tsuMinutes;\r\n FTimeFormat := 'hh:nn:ss';\r\n// fs.TimeSeparator := ':';\r\n// fs.LongTimeFormat := FTimeFormat;\r\n// FStartTime := StrToTime('00:00:00', fs);\r\n// FEndTime := StrToTime('23:59:59', fs);\r\n FStartTime := EncodeTime(0, 0, 0, 0);\r\n FEndTime := EncodeTime(23, 59, 59, 999);\r\n FSelectedTime := FStartTime;\r\n FFirst := FStartTime;\r\n AddTimes;\r\n\r\n if IsDesignTime then\r\n InitSample;\r\nend;\r\n\r\nfunction TTMSFNCCustomDigitalTimeSelector.CreateItemsCollection: TTMSFNCCustomSelectorItems;\r\nbegin\r\n Result := TTMSFNCDigitalTimeSelectorItems.Create(Self);\r\nend;\r\n\r\nprocedure TTMSFNCCustomDigitalTimeSelector.DoAfterDrawArrow(\r\n AGraphics: TTMSFNCGraphics; ARectF: TRectF; ALeft: Boolean);\r\nbegin\r\n if Assigned(OnAfterDrawArrow) then\r\n OnAfterDrawArrow(Self, AGraphics, ARectF, ALeft);\r\nend;\r\n\r\nprocedure TTMSFNCCustomDigitalTimeSelector.DoAfterDrawHeader(\r\n AGraphics: TTMSFNCGraphics; ARectF: TRectF);\r\nbegin\r\n if Assigned(OnAfterDrawHeader) then\r\n OnAfterDrawHeader(Self, AGraphics, ARectF);\r\nend;\r\n\r\nprocedure TTMSFNCCustomDigitalTimeSelector.DoAfterDrawHeaderText(\r\n AGraphics: TTMSFNCGraphics; ARectF: TRectF; AText: string);\r\nbegin\r\n if Assigned(OnAfterDrawHeaderText) then\r\n OnAfterDrawHeaderText(Self, AGraphics, ARectF, AText);\r\nend;\r\n\r\nprocedure TTMSFNCCustomDigitalTimeSelector.DoBeforeDrawArrow(\r\n AGraphics: TTMSFNCGraphics; ARectF: TRectF; ALeft: Boolean; var AAllow,\r\n ADefaultDraw: Boolean);\r\nbegin\r\n if Assigned(OnBeforeDrawArrow) then\r\n OnBeforeDrawArrow(Self, AGraphics, ARectF, ALeft, AAllow, ADefaultDraw);\r\nend;\r\n\r\nprocedure TTMSFNCCustomDigitalTimeSelector.DoBeforeDrawHeader(\r\n AGraphics: TTMSFNCGraphics; ARectF: TRectF; var AAllow,\r\n ADefaultDraw: Boolean);\r\nbegin\r\n if Assigned(OnBeforeDrawHeader) then\r\n OnBeforeDrawHeader(Self, AGraphics, ARectF, AAllow, ADefaultDraw);\r\nend;\r\n\r\nprocedure TTMSFNCCustomDigitalTimeSelector.DoBeforeDrawHeaderText(\r\n AGraphics: TTMSFNCGraphics; ARectF: TRectF; AText: string; var AAllow,\r\n ADefaultDraw: Boolean);\r\nbegin\r\n if Assigned(OnBeforeDrawHeaderText) then\r\n OnBeforeDrawHeaderText(Self, AGraphics, ARectF, AText, AAllow, ADefaultDraw);\r\nend;\r\n\r\nprocedure TTMSFNCCustomDigitalTimeSelector.DoItemDeselected(\r\n AItemIndex: Integer);\r\nbegin\r\n inherited;\r\n if Assigned(OnTimeDeselected) then\r\n OnTimeDeselected(Self, FindTimeByItem(AItemIndex));\r\nend;\r\n\r\nprocedure TTMSFNCCustomDigitalTimeSelector.DoItemSelected(AItemIndex: Integer);\r\nbegin\r\n inherited;\r\n FSelectedTime := FindTimeByItem(AItemIndex);\r\n if Assigned(OnTimeSelected) then\r\n OnTimeSelected(Self, FindTimeByItem(AItemIndex));\r\nend;\r\n\r\nprocedure TTMSFNCCustomDigitalTimeSelector.DoNavigation(ALeft: Boolean);\r\nbegin\r\n if Assigned(OnNavigation) then\r\n OnNavigation(Self, ALeft);\r\nend;\r\n\r\nprocedure TTMSFNCCustomDigitalTimeSelector.Draw(AGraphics: TTMSFNCGraphics;\r\n ARect: TRectF);\r\nvar\r\n b, df: Boolean;\r\n r: TRectF;\r\n s: string;\r\nbegin\r\n b := True;\r\n df := True;\r\n r := RectF(0, 0, Width, GetTopOffset);\r\n AGraphics.Fill.Color := Appearance.Fill.Color;\r\n AGraphics.Stroke.Color := Appearance.Stroke.Color;\r\n AGraphics.Font.AssignSource(Appearance.Font);\r\n\r\n DoBeforeDrawHeader(AGraphics, r, b, df);\r\n if b then\r\n begin\r\n if df then\r\n AGraphics.DrawRectangle(r);\r\n DoAfterDrawHeader(AGraphics, r);\r\n end;\r\n\r\n s := FormatDateTime(FTimeFormat, FindTimeByItem(0)) + ' - ' + FormatDateTime(FTimeFormat, FindTimeByItem(Items.Count - 1));\r\n b := True;\r\n df := True;\r\n DoBeforeDrawHeaderText(AGraphics, r, s, b, df);\r\n if b then\r\n begin\r\n if df then\r\n AGraphics.DrawText(r, s, False, gtaCenter, gtaCenter);\r\n\r\n DoAfterDrawHeaderText(AGraphics, r, s);\r\n end;\r\n\r\n DrawArrows(AGraphics);\r\n inherited;\r\nend;\r\n\r\nprocedure TTMSFNCCustomDigitalTimeSelector.DrawArrows(\r\n AGraphics: TTMSFNCGraphics);\r\nvar\r\n r: TRectF;\r\n p: TPointF;\r\n b, df: Boolean;\r\nbegin\r\n r := GetArrowRect(True);\r\n AGraphics.Stroke.Width := ScalePaintValue(2);\r\n AGraphics.Stroke.Color := gcDimgray;\r\n\r\n b := True;\r\n df := True;\r\n DoBeforeDrawArrow(AGraphics, r, True, b, df);\r\n if b then\r\n begin\r\n if df then\r\n begin\r\n p := PointF(r.Left + ScalePaintValue(4), GetTopOffset / 2);\r\n AGraphics.DrawLine(p, PointF(r.Right - ScalePaintValue(4), r.Top));\r\n AGraphics.DrawLine(p, PointF(r.Right - ScalePaintValue(4), r.Bottom - 1));\r\n end;\r\n DoAfterDrawArrow(AGraphics, r, True);\r\n end;\r\n\r\n r := GetArrowRect(False);\r\n b := True;\r\n df := True;\r\n DoBeforeDrawArrow(AGraphics, r, False, b, df);\r\n if b then\r\n begin\r\n if df then\r\n begin\r\n p := PointF(r.Right - ScalePaintValue(4), GetTopOffset / 2);\r\n AGraphics.DrawLine(p, PointF(r.Left + ScalePaintValue(4), r.Top));\r\n AGraphics.DrawLine(p, PointF(r.Left + ScalePaintValue(4), r.Bottom - 1));\r\n end;\r\n DoAfterDrawArrow(AGraphics, r, False);\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomDigitalTimeSelector.DrawItemText(\r\n AGraphics: TTMSFNCGraphics; ADisplayItem: TTMSFNCCustomSelectorDisplayItem);\r\nvar\r\n r: TRectF;\r\n s: string;\r\n it: TTMSFNCCustomSelectorItem;\r\n t: TTime;\r\n a: Boolean;\r\nbegin\r\n it := ADisplayItem.Item;\r\n if Assigned(it) and (it is TTMSFNCDigitalTimeSelectorItem) then\r\n begin\r\n r := ADisplayItem.Rect;\r\n a := True;\r\n InflateRectEx(r, -5, -5);\r\n t := (it as TTMSFNCDigitalTimeSelectorItem).Time;\r\n s := FormatDateTime(FTimeFormat, t);\r\n AGraphics.Font.AssignSource(Appearance.Font);\r\n DoItemBeforeDrawText(AGraphics, ADisplayItem.Rect, it.Index, s, a);\r\n if a then\r\n begin\r\n AGraphics.DrawText(r, s, False, gtaCenter, gtaCenter);\r\n DoItemAfterDrawText(AGraphics, ADisplayItem.Rect, it.Index, s);\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCCustomDigitalTimeSelector.FindItemByTime(ATime: TTime): Integer;\r\nvar\r\n I: Integer;\r\n it: TTMSFNCDigitalTimeSelectorItem;\r\nbegin\r\n Result := -1;\r\n for I := 0 to Items.Count - 1 do\r\n begin\r\n it := Items[I] as TTMSFNCDigitalTimeSelectorItem;\r\n if (CompareTime(it.Time, ATime) = 0) and it.CanSelect then\r\n begin\r\n Result := it.Index;\r\n Break;\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCCustomDigitalTimeSelector.FindTimeByItem(AItem: Integer): TTime;\r\nvar\r\n I: Integer;\r\n it: TTMSFNCDigitalTimeSelectorItem;\r\nbegin\r\n Result := 0.0;\r\n for I := 0 to Items.Count - 1 do\r\n begin\r\n it := Items[I] as TTMSFNCDigitalTimeSelectorItem;\r\n if it.Index = AItem then\r\n begin\r\n Result := it.Time;\r\n Break;\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCCustomDigitalTimeSelector.GetArrowRect(ALeft: Boolean): TRectF;\r\nvar\r\n r: TRectF;\r\nbegin\r\n r := GetControlRect;\r\n if ALeft then\r\n Result := RectF(r.Left, r.Top, r.Left + FHeaderSize, r.Top + FHeaderSize)\r\n else\r\n Result := RectF(r.Right - FHeaderSize, r.Top, r.Right, r.Top + FHeaderSize);\r\n\r\n InflateRectEx(Result, -ScalePaintValue(4), -ScalePaintValue(4));\r\nend;\r\n\r\nfunction TTMSFNCCustomDigitalTimeSelector.GetItems: TTMSFNCDigitalTimeSelectorItems;\r\nbegin\r\n Result := TTMSFNCDigitalTimeSelectorItems(inherited Items);\r\nend;\r\n\r\nfunction TTMSFNCCustomDigitalTimeSelector.GetTopOffset: Single;\r\nbegin\r\n Result := FHeaderSize;\r\nend;\r\n\r\nfunction TTMSFNCCustomDigitalTimeSelector.GetVersion: string;\r\nbegin\r\n Result := GetVersionNumber(MAJ_VER, MIN_VER, REL_VER, BLD_VER);\r\nend;\r\n\r\nprocedure TTMSFNCCustomDigitalTimeSelector.HandleMouseDown(\r\n Button: TTMSFNCMouseButton; Shift: TShiftState; X, Y: Single);\r\nbegin\r\n inherited;\r\n if PtInRectEx(GetArrowRect(True), PointF(X, Y)) then\r\n NavigateBack\r\n else if PtInRectEx(GetArrowRect(False), PointF(X, Y)) then\r\n NavigateForth;\r\nend;\r\n\r\nprocedure TTMSFNCCustomDigitalTimeSelector.HandleMouseMove(Shift: TShiftState;\r\n X, Y: Single);\r\nbegin\r\n inherited;\r\n if PtInRectEx(GetArrowRect(True), PointF(X, Y)) or PtInRectEx(GetArrowRect(False), PointF(X, Y)) then\r\n Cursor := crHandPoint\r\n else\r\n Cursor := crArrow;\r\nend;\r\n\r\nprocedure TTMSFNCCustomDigitalTimeSelector.InitializePage(ATime: TTime);\r\nvar\r\n e, p: Integer;\r\nbegin\r\n if (CompareTime(ATime, FStartTime) = -1) or (CompareTime(ATime, FEndTime) = 1) then\r\n begin\r\n FFirst := FStartTime;\r\n Exit;\r\n end;\r\n\r\n case FIntervalUnit of\r\n tsuMilliseconds:\r\n begin\r\n e := (MilliSecondOfTheDay(ATime) - MilliSecondOfTheDay(FStartTime)) div Cardinal(FTimeInterval);\r\n p := e div (Rows * Columns);\r\n FFirst := IncMilliSecond(FStartTime, p * Rows * Columns * FTimeInterval);\r\n end;\r\n tsuSeconds:\r\n begin\r\n e := (SecondOfTheDay(ATime) - SecondOfTheDay(FStartTime)) div Cardinal(FTimeInterval);\r\n p := e div (Rows * Columns);\r\n FFirst := IncSecond(FStartTime, p * Rows * Columns * FTimeInterval);\r\n end;\r\n tsuMinutes:\r\n begin\r\n e := (MinuteOfTheDay(ATime) - MinuteOfTheDay(FStartTime)) div FTimeInterval;\r\n p := e div (Rows * Columns);\r\n FFirst := IncMinute(FStartTime, p * Rows * Columns * FTimeInterval);\r\n end;\r\n tsuHours:\r\n begin\r\n e := (HourOfTheDay(ATime) - HourOfTheDay(FStartTime)) div FTimeInterval;\r\n p := e div (Rows * Columns);\r\n FFirst := IncHour(FStartTime, p * Rows * Columns * FTimeInterval);\r\n end;\r\n end;\r\n\r\n AddTimes;\r\n SelectedItemIndex := FindItemByTime(FSelectedTime);\r\nend;\r\n\r\nprocedure TTMSFNCCustomDigitalTimeSelector.InitSample;\r\nbegin\r\n ResetToDefaultStyle;\r\nend;\r\n\r\nfunction TTMSFNCCustomDigitalTimeSelector.IsTimeFormatStored: Boolean;\r\nbegin\r\n Result := FTimeFormat <> 'hh:nn:ss';\r\nend;\r\n\r\nprocedure TTMSFNCCustomDigitalTimeSelector.NavigateBack;\r\nvar\r\n t: TDateTime;\r\nbegin\r\n t := 0.0;\r\n case FIntervalUnit of\r\n tsuMilliseconds: t := IncMilliSecond(FFirst, -(Columns * Rows) * FTimeInterval);\r\n tsuSeconds: t := IncSecond(FFirst, -(Columns * Rows) * FTimeInterval);\r\n tsuMinutes: t := IncMinute(FFirst, -(Columns * Rows) * FTimeInterval);\r\n tsuHours: t := IncHour(FFirst, -(Columns * Rows) * FTimeInterval);\r\n end;\r\n if CompareDateTime(t, FStartTime) >= 0 then\r\n begin\r\n FFirst := Frac(t);\r\n AddTimes;\r\n SelectedItemIndex := FindItemByTime(FSelectedTime);\r\n DoNavigation(True);\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomDigitalTimeSelector.NavigateForth;\r\nvar\r\n t: TDateTime;\r\nbegin\r\n t := 0.0;\r\n case FIntervalUnit of\r\n tsuMilliseconds: t := IncMilliSecond(FLast, FTimeInterval);\r\n tsuSeconds: t := IncSecond(FLast, FTimeInterval);\r\n tsuMinutes: t := IncMinute(FLast, FTimeInterval);\r\n tsuHours: t := IncHour(FLast, FTimeInterval);\r\n end;\r\n if CompareDateTime(t, FEndTime) < 0 then\r\n begin\r\n FFirst := Frac(t);\r\n AddTimes;\r\n SelectedItemIndex := FindItemByTime(FSelectedTime);\r\n DoNavigation(False);\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomDigitalTimeSelector.ResetToDefaultStyle;\r\nbegin\r\n inherited;\r\n BeginUpdate;\r\n\r\n {$IFDEF FMXLIB}\r\n Appearance.Font.Color := $FF454545;\r\n Appearance.Fill.Color := $FFEEF2F9;\r\n Appearance.FillSelected.Color := $FFA8BCF0;\r\n Appearance.StrokeSelected.Color := $FF2D9BEF;\r\n Appearance.FillDown.Color := $FF5A81E6;\r\n {$ENDIF}\r\n {$IFNDEF FMXLIB}\r\n Appearance.Font.Color := $454545;\r\n Appearance.Fill.Color := $F9F2EE;\r\n Appearance.FillSelected.Color := $F0BCA8;\r\n Appearance.StrokeSelected.Color := $EF9B2D;\r\n Appearance.FillDown.Color := $E6815A;\r\n {$ENDIF}\r\n\r\n Appearance.FillSelected.Kind := gfkSolid;\r\n Appearance.Fill.Kind := gfkSolid;\r\n Appearance.FillDown.Kind := gfkSolid;\r\n Appearance.Stroke.Kind := gskSolid;\r\n Appearance.StrokeSelected.Kind := gskSolid;\r\n Appearance.StrokeHover.Kind := gskSolid;\r\n\r\n Appearance.Stroke.Color := gcDarkgray;\r\n Appearance.StrokeHover.Color := Appearance.FillDown.Color;\r\n\r\n Appearance.FillHover.Assign(Appearance.Fill);\r\n Appearance.StrokeDown.Assign(Appearance.Stroke);\r\n\r\n EndUpdate;\r\nend;\r\n\r\nprocedure TTMSFNCCustomDigitalTimeSelector.SetEndTime(const Value: TTime);\r\nbegin\r\n if CompareTime(FEndTime, Value) <> 0 then\r\n begin\r\n FEndTime := Value;\r\n AddTimes;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomDigitalTimeSelector.SetHeaderSize(const Value: Integer);\r\nbegin\r\n if HeaderSize <> Value then\r\n FHeaderSize := Value;\r\nend;\r\n\r\nprocedure TTMSFNCCustomDigitalTimeSelector.SetIntervalUnit(\r\n const Value: TTMSFNCDigitalTimeSelectorIntervalUnit);\r\nbegin\r\n if FIntervalUnit <> Value then\r\n begin\r\n FIntervalUnit := Value;\r\n AddTimes;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomDigitalTimeSelector.SetItems(\r\n const Value: TTMSFNCDigitalTimeSelectorItems);\r\nbegin\r\n Items.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCCustomDigitalTimeSelector.SetSelectedTime(const Value: TTime);\r\nbegin\r\n FSelectedTime := Value;\r\n SelectedItemIndex := FindItemByTime(Value);\r\nend;\r\n\r\nprocedure TTMSFNCCustomDigitalTimeSelector.SetStartTime(const Value: TTime);\r\nbegin\r\n if CompareTime(FStartTime, Value) <> 0 then\r\n begin\r\n FStartTime := Value;\r\n FFirst := FStartTime;\r\n AddTimes;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomDigitalTimeSelector.SetTimeFormat(const Value: string);\r\nbegin\r\n if FTimeFormat <> Value then\r\n begin\r\n FTimeFormat := Value;\r\n Invalidate;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomDigitalTimeSelector.SetTimeInterval(\r\n const Value: Integer);\r\nbegin\r\n if FTimeInterval <> Value then\r\n begin\r\n FTimeInterval := Value;\r\n AddTimes;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomDigitalTimeSelector.UpdateCalculations;\r\nbegin\r\n inherited;\r\n CalculateTimes;\r\nend;\r\n\r\n{ TTMSFNCDigitalTimeSelector }\r\n\r\nprocedure TTMSFNCDigitalTimeSelector.RegisterRuntimeClasses;\r\nbegin\r\n inherited;\r\n RegisterClasses([TTMSFNCDigitalTimeSelector, TTMSFNCDigitalTimeSelectorItem]);\r\nend;\r\n\r\nend.\r\n","{********************************************************************}\r\n{ }\r\n{ written by TMS Software }\r\n{ copyright (c) 2018 - 2021 }\r\n{ Email : info@tmssoftware.com }\r\n{ Web : https://www.tmssoftware.com }\r\n{ }\r\n{ The source code is given as is. The author is not responsible }\r\n{ for any possible damage done due to the use of this code. }\r\n{ The complete source code remains property of the author and may }\r\n{ not be distributed, published, given or sold in any form as such. }\r\n{ No parts of the source code can be included in any other component }\r\n{ or application without written authorization of the author. }\r\n{********************************************************************}\r\n\r\nunit WEBLib.TMSFNCDigitalTimePicker;\r\n\r\n{$I WEBLib.TMSFNCDefines.inc}\r\n\r\ninterface\r\n\r\nuses\r\n Classes, Types,\r\n {$IFDEF FMXLIB}\r\n FMX.Types,\r\n {$ENDIF}\r\n WEBLib.TMSFNCCustomPicker, WEBLib.TMSFNCCustomSelector, WEBLib.TMSFNCGraphics,\r\n WEBLib.TMSFNCDigitalTimeSelector, WEBLib.TMSFNCTypes, WEBLib.TMSFNCUtils, WEBLib.StdCtrls,\r\n WEBLib.TMSFNCGraphicsTypes;\r\n\r\nconst\r\n MAJ_VER = 1; // Major version nr.\r\n MIN_VER = 0; // Minor version nr.\r\n REL_VER = 3; // Release nr.\r\n BLD_VER = 0; // Build nr.\r\n\r\n //Version history\r\n //v1.0.0.0 : First Release\r\n //v1.0.1.0 : New : Property AllowNumericNullValue added\r\n // : New : Method Clear added\r\n // : Fixed : Issue with OnTimeSelected event\r\n //v1.0.1.1 : Fixed : Issue with setting the SelectedTime to 00:00:00\r\n //v1.0.1.2 : Fixed : Issue with control color in disabled state\r\n //v1.0.1.3 : Fixed : Issue with Column and Row property persistence\r\n //v1.0.1.4 : Improved : Exposed Font property\r\n //v1.0.2.0 : New : TimeSelector property added\r\n // : Improved : Exposed OnItemBeforeDrawBackground, OnItemAfterDrawBackground, OnItemBeforeDrawContent, OnItemAfterDrawContent, OnItemBeforeDrawText and OnItemAfterDrawText events\r\n //v1.0.3.0 : New : Support for high dpi\r\n\r\ntype\r\n TTMSFNCCustomDigitalTimePicker = class(TTMSFNCDefaultPicker)\r\n private\r\n FPrevSelTime: TTime;\r\n FCloseOnSelection: Boolean;\r\n FTimeSelector: TTMSFNCDigitalTimeSelector;\r\n FOnTimeDeselected: TTMSFNCCustomDigitalTimeSelectorTimeDeselected;\r\n FOnTimeSelected: TTMSFNCCustomDigitalTimeSelectorTimeSelected;\r\n FOnAfterDrawArrow: TTMSFNCCustomDigitalTimeSelectorAfterDrawArrowEvent;\r\n FOnBeforeDrawHeader: TTMSFNCCustomDigitalTimeSelectorBeforeDrawHeaderEvent;\r\n FOnAfterDrawHeaderText: TTMSFNCCustomDigitalTimeSelectorAfterDrawHeaderTextEvent;\r\n FOnBeforeDrawArrow: TTMSFNCCustomDigitalTimeSelectorBeforeDrawArrowEvent;\r\n FOnAfterDrawHeader: TTMSFNCCustomDigitalTimeSelectorAfterDrawHeaderEvent;\r\n FOnBeforeDrawHeaderText: TTMSFNCCustomDigitalTimeSelectorBeforeDrawHeaderTextEvent;\r\n FAllowNumericNullValue: Boolean;\r\n FFont: TTMSFNCGraphicsFont;\r\n FOnItemBeforeDrawText: TTMSFNCCustomSelectorItemBeforeDrawText;\r\n FOnItemBeforeDrawContent: TTMSFNCCustomSelectorItemBeforeDrawContent;\r\n FOnItemAfterDrawBackground: TTMSFNCCustomSelectorItemAfterDrawBackground;\r\n FOnItemAfterDrawText: TTMSFNCCustomSelectorItemAfterDrawText;\r\n FOnItemAfterDrawContent: TTMSFNCCustomSelectorItemAfterDrawContent;\r\n FOnItemBeforeDrawBackground: TTMSFNCCustomSelectorItemBeforeDrawBackground;\r\n procedure SetHeaderSize(const Value: Integer);\r\n procedure SetItems(const Value: TTMSFNCDigitalTimeSelectorItems);\r\n procedure SetSelectedTime(const Value: TTime);\r\n procedure SetEndTime(const Value: TTime);\r\n procedure SetIntervalUnit(const Value: TTMSFNCDigitalTimeSelectorIntervalUnit);\r\n procedure SetStartTime(const Value: TTime);\r\n procedure SetTimeFormat(const Value: string);\r\n procedure SetTimeInterval(const Value: Integer);\r\n procedure SetAllowNumericNullValue(const Value: Boolean);\r\n function GetItems: TTMSFNCDigitalTimeSelectorItems;\r\n function GetSelectedTime: TTime;\r\n function GetEndTime: TTime;\r\n function GetIntervalUnit: TTMSFNCDigitalTimeSelectorIntervalUnit;\r\n function GetStartTime: TTime;\r\n function GetTimeFormat: string;\r\n function GetTimeInterval: Integer;\r\n function IsTimeFormatStored: Boolean;\r\n function IsIntervalUnitStored: Boolean;\r\n function GetHeaderSize: Integer;\r\n procedure SetFnt(const Value: TTMSFNCGraphicsFont);\r\n protected\r\n procedure Loaded; override;\r\n procedure ChangeDPIScale(M, D: Integer); override;\r\n procedure FontChange(Sender: TObject);\r\n procedure SetEditable(const Value: Boolean); override;\r\n procedure UpdateEditText(AText: string); override;\r\n procedure InitializePopup; override;\r\n procedure DoTimeSelected; virtual;\r\n procedure SetGraphicColors; override;\r\n procedure TimeSelected(Sender: TObject; ATime: TTime);\r\n procedure TimeDeselected(Sender: TObject; ATime: TTime);\r\n procedure DoBeforeDrawHeader(Sender: TObject; AGraphics: TTMSFNCGraphics; ARectF: TRectF; var AAllow: Boolean; var ADefaultDraw: Boolean); virtual;\r\n procedure DoAfterDrawHeader(Sender: TObject; AGraphics: TTMSFNCGraphics; ARectF: TRectF); virtual;\r\n procedure DoBeforeDrawHeaderText(Sender: TObject; AGraphics: TTMSFNCGraphics; ARectF: TRectF; AText: string; var AAllow: Boolean; var ADefaultDraw: Boolean); virtual;\r\n procedure DoAfterDrawHeaderText(Sender: TObject; AGraphics: TTMSFNCGraphics; ARectF: TRectF; AText: string); virtual;\r\n procedure DoBeforeDrawArrow(Sender: TObject; AGraphics: TTMSFNCGraphics; ARectF: TRectF; ALeft: Boolean; var AAllow: Boolean; var ADefaultDraw: Boolean); virtual;\r\n procedure DoAfterDrawArrow(Sender: TObject; AGraphics: TTMSFNCGraphics; ARectF: TRectF; ALeft: Boolean); virtual;\r\n procedure DoBeforeDrawItemBackground(Sender: TObject; AGraphics: TTMSFNCGraphics; ARect: TRectF; AItemIndex: Integer; var ADefaultDraw: Boolean); virtual;\r\n procedure DoAfterDrawItemBackground(Sender: TObject; AGraphics: TTMSFNCGraphics; ARect: TRectF; AItemIndex: Integer); virtual;\r\n procedure DoBeforeDrawItemContent(Sender: TObject; AGraphics: TTMSFNCGraphics; ARect: TRectF; AItemIndex: Integer; var ADefaultDraw: Boolean); virtual;\r\n procedure DoAfterDrawItemContent(Sender: TObject; AGraphics: TTMSFNCGraphics; ARect: TRectF; AItemIndex: Integer); virtual;\r\n procedure DoBeforeDrawItemText(Sender: TObject; AGraphics: TTMSFNCGraphics; ARect: TRectF; AItemIndex: Integer; var AText: string; var ADefaultDraw: Boolean); virtual;\r\n procedure DoAfterDrawItemText(Sender: TObject; AGraphics: TTMSFNCGraphics; ARect: TRectF; AItemIndex: Integer; AText: string); virtual;\r\n procedure DrawContent(AGraphics: TTMSFNCGraphics; ARect: TRectF); override;\r\n procedure SelectFirstValue; override;\r\n procedure SelectLastValue; override;\r\n procedure SelectNextValue; override;\r\n procedure SelectPreviousValue; override;\r\n procedure EditUp; override;\r\n procedure EditDown; override;\r\n function GetVersion: string; override;\r\n function CreateSelector: TTMSFNCCustomSelector; override;\r\n property AllowNumericNullValue: Boolean read FAllowNumericNullValue write SetAllowNumericNullValue default True;\r\n property SelectedTime: TTime read GetSelectedTime write SetSelectedTime;\r\n property Items: TTMSFNCDigitalTimeSelectorItems read GetItems write SetItems;\r\n property CloseOnSelection: Boolean read FCloseOnSelection write FCloseOnSelection default True;\r\n property TimeFormat: string read GetTimeFormat write SetTimeFormat stored IsTimeFormatStored nodefault;\r\n property TimeInterval: Integer read GetTimeInterval write SetTimeInterval default 5;\r\n property IntervalUnit: TTMSFNCDigitalTimeSelectorIntervalUnit read GetIntervalUnit write SetIntervalUnit stored IsIntervalUnitStored nodefault;\r\n property StartTime: TTime read GetStartTime write SetStartTime;\r\n property EndTime: TTime read GetEndTime write SetEndTime;\r\n property HeaderSize: Integer read GetHeaderSize write SetHeaderSize;\r\n property Font: TTMSFNCGraphicsFont read FFont write SetFnt;\r\n property OnTimeSelected: TTMSFNCCustomDigitalTimeSelectorTimeSelected read FOnTimeSelected write FOnTimeSelected;\r\n property OnTimeDeselected: TTMSFNCCustomDigitalTimeSelectorTimeDeselected read FOnTimeDeselected write FOnTimeDeselected;\r\n property OnBeforeDrawHeader: TTMSFNCCustomDigitalTimeSelectorBeforeDrawHeaderEvent read FOnBeforeDrawHeader write FOnBeforeDrawHeader;\r\n property OnAfterDrawHeader: TTMSFNCCustomDigitalTimeSelectorAfterDrawHeaderEvent read FOnAfterDrawHeader write FOnAfterDrawHeader;\r\n property OnBeforeDrawHeaderText: TTMSFNCCustomDigitalTimeSelectorBeforeDrawHeaderTextEvent read FOnBeforeDrawHeaderText write FOnBeforeDrawHeaderText;\r\n property OnAfterDrawHeaderText: TTMSFNCCustomDigitalTimeSelectorAfterDrawHeaderTextEvent read FOnAfterDrawHeaderText write FOnAfterDrawHeaderText;\r\n property OnBeforeDrawArrow: TTMSFNCCustomDigitalTimeSelectorBeforeDrawArrowEvent read FOnBeforeDrawArrow write FOnBeforeDrawArrow;\r\n property OnAfterDrawArrow: TTMSFNCCustomDigitalTimeSelectorAfterDrawArrowEvent read FOnAfterDrawArrow write FOnAfterDrawArrow;\r\n property OnItemBeforeDrawBackground: TTMSFNCCustomSelectorItemBeforeDrawBackground read FOnItemBeforeDrawBackground write FOnItemBeforeDrawBackground;\r\n property OnItemAfterDrawBackground: TTMSFNCCustomSelectorItemAfterDrawBackground read FOnItemAfterDrawBackground write FOnItemAfterDrawBackground;\r\n property OnItemBeforeDrawContent: TTMSFNCCustomSelectorItemBeforeDrawContent read FOnItemBeforeDrawContent write FOnItemBeforeDrawContent;\r\n property OnItemAfterDrawContent: TTMSFNCCustomSelectorItemAfterDrawContent read FOnItemAfterDrawContent write FOnItemAfterDrawContent;\r\n property OnItemBeforeDrawText: TTMSFNCCustomSelectorItemBeforeDrawText read FOnItemBeforeDrawText write FOnItemBeforeDrawText;\r\n property OnItemAfterDrawText: TTMSFNCCustomSelectorItemAfterDrawText read FOnItemAfterDrawText write FOnItemAfterDrawText;\r\n public\r\n constructor Create(AOwner: TComponent); override;\r\n destructor Destroy; override;\r\n procedure Clear;\r\n property TimeSelector: TTMSFNCDigitalTimeSelector read FTimeSelector;\r\n end;\r\n\r\n {$IFNDEF LCLLIB}\r\n [ComponentPlatformsAttribute(TMSPlatformsWeb)]\r\n {$ENDIF}\r\n TTMSFNCDigitalTimePicker = class(TTMSFNCCustomDigitalTimePicker)\r\n protected\r\n procedure RegisterRuntimeClasses; override;\r\n published\r\n property AllowNumericNullValue;\r\n property Editable;\r\n property DropDownWidth;\r\n property DropDownHeight;\r\n property Appearance;\r\n property Rows default 4;\r\n property Columns default 3;\r\n property CloseOnSelection;\r\n property Font;\r\n property SelectedTime;\r\n property TimeFormat;\r\n property TimeInterval;\r\n property IntervalUnit;\r\n property StartTime;\r\n property EndTime;\r\n property HeaderSize;\r\n property OnTimeSelected;\r\n property OnTimeDeselected;\r\n property OnBeforeDrawHeader;\r\n property OnAfterDrawHeader;\r\n property OnBeforeDrawHeaderText;\r\n property OnAfterDrawHeaderText;\r\n property OnBeforeDrawArrow;\r\n property OnAfterDrawArrow;\r\n end;\r\n\r\nimplementation\r\n\r\nuses\r\n Math, DateUtils, SysUtils\r\n {$IFDEF FMXLIB}\r\n ,FMX.Edit\r\n {$ENDIF}\r\n {$IFDEF VCLLIB}\r\n , VCL.Graphics\r\n {$ENDIF}\r\n ;\r\n\r\ntype\r\n TCustomEditProtected = class(TCustomEdit);\r\n TTMSFNCDigitalTimeSelectorOpen = class(TTMSFNCDigitalTimeSelector);\r\n\r\n{ TTMSFNCCustomDigitalTimePicker }\r\n\r\nprocedure TTMSFNCCustomDigitalTimePicker.ChangeDPIScale(M, D: Integer);\r\nbegin\r\n inherited;\r\n BeginUpdate;\r\n {$IFDEF VCLLIB}\r\n {$HINTS OFF}\r\n {$IF (COMPILERVERSION >= 33) and (COMPILERVERSION < 35) }\r\n if Assigned(FTimeSelector) then\r\n FTimeSelector.ScaleForPPI(M);\r\n {$IFEND}\r\n {$HINTS ON}\r\n {$ENDIF}\r\n\r\n Font.Height := TTMSFNCUtils.MulDivInt(FFont.Height, M, D);\r\n {$IFDEF CMNLIB}\r\n Edit.Font.Height := FFont.Height;\r\n {$ENDIF}\r\n\r\n EndUpdate;\r\nend;\r\n\r\nprocedure TTMSFNCCustomDigitalTimePicker.Clear;\r\nbegin\r\n SelectedTime := 0.0;\r\nend;\r\n\r\nconstructor TTMSFNCCustomDigitalTimePicker.Create(AOwner: TComponent);\r\nbegin\r\n inherited;\r\n Width := 90;\r\n FAllowNumericNullValue := True;\r\n DropDownWidth := 220;\r\n DropDownHeight := 150;\r\n FCloseOnSelection := True;\r\n FFont := TTMSFNCGraphicsFont.Create;\r\n FFont.OnChanged := @FontChange;\r\n {$IFDEF FMXLIB}\r\n Edit.StyledSettings := TCustomEditProtected(Edit).StyledSettings - [TStyledSetting.Family, TStyledSetting.Size, TStyledSetting.Style];\r\n {$IFDEF ANDROID}\r\n Edit.TextSettings.VertAlign := TTextAlign.Leading;\r\n {$ENDIF}\r\n {$ENDIF}\r\nend;\r\n\r\nfunction TTMSFNCCustomDigitalTimePicker.CreateSelector: TTMSFNCCustomSelector;\r\nbegin\r\n FTimeSelector := TTMSFNCDigitalTimeSelector.Create(Self);\r\n FTimeSelector.OnTimeSelected := TimeSelected;\r\n FTimeSelector.OnTimeDeselected := TimeDeselected;\r\n FTimeSelector.OnBeforeDrawHeader := DoBeforeDrawHeader;\r\n FTimeSelector.OnBeforeDrawHeaderText := DoBeforeDrawHeaderText;\r\n FTimeSelector.OnBeforeDrawArrow := DoBeforeDrawArrow;\r\n FTimeSelector.OnAfterDrawHeader := DoAfterDrawHeader;\r\n FTimeSelector.OnAfterDrawHeaderText := DoAfterDrawHeaderText;\r\n FTimeSelector.OnAfterDrawArrow := DoAfterDrawArrow;\r\n TTMSFNCDigitalTimeSelectorOpen(FTimeSelector).OnItemBeforeDrawBackground := DoBeforeDrawItemBackground;\r\n TTMSFNCDigitalTimeSelectorOpen(FTimeSelector).OnItemAfterDrawBackground := DoAfterDrawItemBackground;\r\n TTMSFNCDigitalTimeSelectorOpen(FTimeSelector).OnItemBeforeDrawContent := DoBeforeDrawItemContent;\r\n TTMSFNCDigitalTimeSelectorOpen(FTimeSelector).OnItemAfterDrawContent := DoAfterDrawItemContent;\r\n TTMSFNCDigitalTimeSelectorOpen(FTimeSelector).OnItemBeforeDrawText := DoBeforeDrawItemText;\r\n TTMSFNCDigitalTimeSelectorOpen(FTimeSelector).OnItemAfterDrawText := DoAfterDrawItemText;\r\n Result := FTimeSelector;\r\nend;\r\n\r\ndestructor TTMSFNCCustomDigitalTimePicker.Destroy;\r\nbegin\r\n FFont.Free;\r\n inherited;\r\nend;\r\n\r\nprocedure TTMSFNCCustomDigitalTimePicker.DoAfterDrawArrow(Sender: TObject;\r\n AGraphics: TTMSFNCGraphics; ARectF: TRectF; ALeft: Boolean);\r\nbegin\r\n if Assigned(OnAfterDrawArrow) then\r\n OnAfterDrawArrow(Self, AGraphics, ARectF, ALeft);\r\nend;\r\n\r\nprocedure TTMSFNCCustomDigitalTimePicker.DoAfterDrawHeader(Sender: TObject;\r\n AGraphics: TTMSFNCGraphics; ARectF: TRectF);\r\nbegin\r\n if Assigned(OnAfterDrawHeader) then\r\n OnAfterDrawHeader(Self, AGraphics, ARectF);\r\nend;\r\n\r\nprocedure TTMSFNCCustomDigitalTimePicker.DoAfterDrawHeaderText(Sender: TObject;\r\n AGraphics: TTMSFNCGraphics; ARectF: TRectF; AText: string);\r\nbegin\r\n if Assigned(OnAfterDrawHeaderText) then\r\n OnAfterDrawHeaderText(Self, AGraphics, ARectF, AText);\r\nend;\r\n\r\nprocedure TTMSFNCCustomDigitalTimePicker.DoAfterDrawItemBackground(\r\n Sender: TObject; AGraphics: TTMSFNCGraphics; ARect: TRectF;\r\n AItemIndex: Integer);\r\nbegin\r\n if Assigned(OnItemAfterDrawBackground) then\r\n OnItemAfterDrawBackground(Self, AGraphics, ARect, AItemIndex);\r\nend;\r\n\r\nprocedure TTMSFNCCustomDigitalTimePicker.DoAfterDrawItemContent(Sender: TObject;\r\n AGraphics: TTMSFNCGraphics; ARect: TRectF; AItemIndex: Integer);\r\nbegin\r\n if Assigned(OnItemAfterDrawContent) then\r\n OnItemAfterDrawContent(Self, AGraphics, ARect, AItemIndex);\r\nend;\r\n\r\nprocedure TTMSFNCCustomDigitalTimePicker.DoAfterDrawItemText(Sender: TObject;\r\n AGraphics: TTMSFNCGraphics; ARect: TRectF; AItemIndex: Integer;\r\n AText: string);\r\nbegin\r\n if Assigned(OnItemAfterDrawText) then\r\n OnItemAfterDrawText(Self, AGraphics, ARect, AItemIndex, AText);\r\nend;\r\n\r\nprocedure TTMSFNCCustomDigitalTimePicker.DoBeforeDrawArrow(Sender: TObject;\r\n AGraphics: TTMSFNCGraphics; ARectF: TRectF; ALeft: Boolean; var AAllow,\r\n ADefaultDraw: Boolean);\r\nbegin\r\n if Assigned(OnBeforeDrawArrow) then\r\n OnBeforeDrawArrow(Self, AGraphics, ARectF, ALeft, AAllow, ADefaultDraw);\r\nend;\r\n\r\nprocedure TTMSFNCCustomDigitalTimePicker.DoBeforeDrawHeader(Sender: TObject;\r\n AGraphics: TTMSFNCGraphics; ARectF: TRectF; var AAllow,\r\n ADefaultDraw: Boolean);\r\nbegin\r\n if Assigned(OnBeforeDrawHeader) then\r\n OnBeforeDrawHeader(Self, AGraphics, ARectF, AAllow, ADefaultDraw);\r\nend;\r\n\r\nprocedure TTMSFNCCustomDigitalTimePicker.DoBeforeDrawHeaderText(Sender: TObject;\r\n AGraphics: TTMSFNCGraphics; ARectF: TRectF; AText: string; var AAllow,\r\n ADefaultDraw: Boolean);\r\nbegin\r\n if Assigned(OnBeforeDrawHeaderText) then\r\n OnBeforeDrawHeaderText(Self, AGraphics, ARectF, AText, AAllow, ADefaultDraw);\r\nend;\r\n\r\nprocedure TTMSFNCCustomDigitalTimePicker.DoBeforeDrawItemBackground(\r\n Sender: TObject; AGraphics: TTMSFNCGraphics; ARect: TRectF;\r\n AItemIndex: Integer; var ADefaultDraw: Boolean);\r\nbegin\r\n if Assigned(OnItemBeforeDrawBackground) then\r\n OnItemBeforeDrawBackground(Self, AGraphics, ARect, AItemIndex, ADefaultDraw);\r\nend;\r\n\r\nprocedure TTMSFNCCustomDigitalTimePicker.DoBeforeDrawItemContent(\r\n Sender: TObject; AGraphics: TTMSFNCGraphics; ARect: TRectF;\r\n AItemIndex: Integer; var ADefaultDraw: Boolean);\r\nbegin\r\n if Assigned(OnItemBeforeDrawContent) then\r\n OnItemBeforeDrawContent(Self, AGraphics, ARect, AItemIndex, ADefaultDraw);\r\nend;\r\n\r\nprocedure TTMSFNCCustomDigitalTimePicker.DoBeforeDrawItemText(Sender: TObject;\r\n AGraphics: TTMSFNCGraphics; ARect: TRectF; AItemIndex: Integer;\r\n var AText: string; var ADefaultDraw: Boolean);\r\nbegin\r\n if Assigned(OnItemBeforeDrawText) then\r\n OnItemBeforeDrawText(Self, AGraphics, ARect, AItemIndex, AText, ADefaultDraw);\r\nend;\r\n\r\nprocedure TTMSFNCCustomDigitalTimePicker.DoTimeSelected;\r\nbegin\r\n if Assigned(OnTimeSelected) then\r\n OnTimeSelected(Self, SelectedTime);\r\n\r\n Invalidate;\r\nend;\r\n\r\nprocedure TTMSFNCCustomDigitalTimePicker.DrawContent(AGraphics: TTMSFNCGraphics;\r\n ARect: TRectF);\r\nvar\r\n r: TRectF;\r\nbegin\r\n inherited;\r\n if not Editable then\r\n begin\r\n AGraphics.Font.AssignSource(Font);\r\n\r\n if not Enabled then\r\n AGraphics.Font.Color := gcSilver;\r\n r := ARect;\r\n InflateRectEx(r, -3, -3);\r\n AGraphics.DrawText(r, Content);\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomDigitalTimePicker.EditDown;\r\nbegin\r\n inherited;\r\n if not Popup.IsOpen then\r\n DropDown;\r\nend;\r\n\r\nprocedure TTMSFNCCustomDigitalTimePicker.EditUp;\r\nbegin\r\n inherited;\r\n if Popup.IsOpen then\r\n DropDown;\r\nend;\r\n\r\nprocedure TTMSFNCCustomDigitalTimePicker.FontChange(Sender: TObject);\r\nbegin\r\n Invalidate;\r\nend;\r\n\r\nfunction TTMSFNCCustomDigitalTimePicker.GetEndTime: TTime;\r\nbegin\r\n Result := FTimeSelector.EndTime;\r\nend;\r\n\r\nfunction TTMSFNCCustomDigitalTimePicker.GetHeaderSize: Integer;\r\nbegin\r\n Result := FTimeSelector.HeaderSize;\r\nend;\r\n\r\nfunction TTMSFNCCustomDigitalTimePicker.GetIntervalUnit: TTMSFNCDigitalTimeSelectorIntervalUnit;\r\nbegin\r\n Result := FTimeSelector.IntervalUnit;\r\nend;\r\n\r\nfunction TTMSFNCCustomDigitalTimePicker.GetItems: TTMSFNCDigitalTimeSelectorItems;\r\nbegin\r\n Result := FTimeSelector.Items;\r\nend;\r\n\r\nfunction TTMSFNCCustomDigitalTimePicker.GetSelectedTime: TTime;\r\nbegin\r\n Result := FTimeSelector.SelectedTime;\r\nend;\r\n\r\nfunction TTMSFNCCustomDigitalTimePicker.GetStartTime: TTime;\r\nbegin\r\n Result := FTimeSelector.StartTime;\r\nend;\r\n\r\nfunction TTMSFNCCustomDigitalTimePicker.GetTimeFormat: string;\r\nbegin\r\n Result := FTimeSelector.TimeFormat;\r\nend;\r\n\r\nfunction TTMSFNCCustomDigitalTimePicker.GetTimeInterval: Integer;\r\nbegin\r\n Result := FTimeSelector.TimeInterval;\r\nend;\r\n\r\nfunction TTMSFNCCustomDigitalTimePicker.GetVersion: string;\r\nbegin\r\n Result := GetVersionNumber(MAJ_VER, MIN_VER, REL_VER, BLD_VER);\r\nend;\r\n\r\nprocedure TTMSFNCCustomDigitalTimePicker.InitializePopup;\r\nvar\r\n t: TDateTime;\r\nbegin\r\n inherited;\r\n if Editable and Assigned(Edit.Parent) and Edit.Visible then\r\n begin\r\n t := SelectedTime;\r\n if TryStrToTime(Edit.Text, t) then\r\n SelectedTime := t;\r\n end;\r\n FTimeSelector.InitializePage(SelectedTime);\r\nend;\r\n\r\nfunction TTMSFNCCustomDigitalTimePicker.IsIntervalUnitStored: Boolean;\r\nbegin\r\n Result := GetIntervalUnit <> tsuMinutes;\r\nend;\r\n\r\nfunction TTMSFNCCustomDigitalTimePicker.IsTimeFormatStored: Boolean;\r\nbegin\r\n Result := GetTimeFormat <> 'hh:nn:ss';\r\nend;\r\n\r\nprocedure TTMSFNCCustomDigitalTimePicker.Loaded;\r\nbegin\r\n inherited;\r\nend;\r\n\r\nprocedure TTMSFNCCustomDigitalTimePicker.SelectFirstValue;\r\nbegin\r\n inherited;\r\n SelectedTime := StartTime;\r\n DoTimeSelected;\r\nend;\r\n\r\nprocedure TTMSFNCCustomDigitalTimePicker.SelectLastValue;\r\nvar\r\n n: Integer;\r\nbegin\r\n inherited;\r\n case IntervalUnit of\r\n tsuMilliseconds:\r\n begin\r\n n := (MilliSecondOfTheDay(EndTime) - MilliSecondOfTheDay(StartTime)) div Cardinal(TimeInterval);\r\n SelectedTime := IncMilliSecond(StartTime, n * TimeInterval);\r\n end;\r\n tsuSeconds:\r\n begin\r\n n := (SecondOfTheDay(EndTime) - SecondOfTheDay(StartTime)) div Cardinal(TimeInterval);\r\n SelectedTime := IncSecond(StartTime, n * TimeInterval);\r\n end;\r\n tsuMinutes:\r\n begin\r\n n := (MinuteOfTheDay(EndTime) - MinuteOfTheDay(StartTime)) div TimeInterval;\r\n SelectedTime := IncMinute(StartTime, n * TimeInterval);\r\n end;\r\n tsuHours:\r\n begin\r\n n := (HourOfTheDay(EndTime) - HourOfTheDay(StartTime)) div TimeInterval;\r\n SelectedTime := IncHour(StartTime, n * TimeInterval);\r\n end;\r\n end;\r\n DoTimeSelected;\r\nend;\r\n\r\nprocedure TTMSFNCCustomDigitalTimePicker.SelectNextValue;\r\nvar\r\n t: TDateTime;\r\nbegin\r\n inherited;\r\n t := 0.0;\r\n case IntervalUnit of\r\n tsuMilliseconds: t := IncMilliSecond(SelectedTime, TimeInterval);\r\n tsuSeconds: t := IncSecond(SelectedTime, TimeInterval);\r\n tsuMinutes: t := IncMinute(SelectedTime, TimeInterval);\r\n tsuHours: t := IncHour(SelectedTime, TimeInterval);\r\n end;\r\n if CompareDateTime(t, EndTime) <= 0 then\r\n SelectedTime := t;\r\n\r\n DoTimeSelected;\r\nend;\r\n\r\nprocedure TTMSFNCCustomDigitalTimePicker.SelectPreviousValue;\r\nvar\r\n t: TDateTime;\r\nbegin\r\n inherited;\r\n t := 0.0;\r\n case IntervalUnit of\r\n tsuMilliseconds: t := IncMilliSecond(SelectedTime, -TimeInterval);\r\n tsuSeconds: t := IncSecond(SelectedTime, -TimeInterval);\r\n tsuMinutes: t := IncMinute(SelectedTime, -TimeInterval);\r\n tsuHours: t := IncHour(SelectedTime, -TimeInterval);\r\n end;\r\n if CompareDateTime(t, StartTime) >= 0 then\r\n SelectedTime := t;\r\n\r\n DoTimeSelected;\r\nend;\r\n\r\nprocedure TTMSFNCCustomDigitalTimePicker.SetAllowNumericNullValue(\r\n const Value: Boolean);\r\nbegin\r\n if FAllowNumericNullValue <> Value then\r\n begin\r\n FAllowNumericNullValue := Value;\r\n if FAllowNumericNullValue and (Frac(SelectedTime) = 0.0) then\r\n Content := ''\r\n else\r\n Content := FormatDateTime(TimeFormat, SelectedTime);\r\n\r\n Invalidate;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomDigitalTimePicker.SetEditable(const Value: Boolean);\r\nbegin\r\n inherited;\r\n if FAllowNumericNullValue and (Frac(FPrevSelTime) = 0.0) then\r\n Content := ''\r\n else\r\n Content := FormatDateTime(TimeFormat, FPrevSelTime);\r\n\r\n Invalidate;\r\nend;\r\n\r\nprocedure TTMSFNCCustomDigitalTimePicker.SetEndTime(const Value: TTime);\r\nbegin\r\n FTimeSelector.EndTime := Value;\r\n Invalidate;\r\nend;\r\n\r\nprocedure TTMSFNCCustomDigitalTimePicker.SetFnt(\r\n const Value: TTMSFNCGraphicsFont);\r\nbegin\r\n FFont.AssignSource(Value);\r\nend;\r\n\r\nprocedure TTMSFNCCustomDigitalTimePicker.SetGraphicColors;\r\nbegin\r\n inherited;\r\n TTMSFNCGraphics.DefaultTextFontColor := Font.Color;\r\nend;\r\n\r\nprocedure TTMSFNCCustomDigitalTimePicker.SetHeaderSize(const Value: Integer);\r\nbegin\r\n FTimeSelector.HeaderSize := Value;\r\n Invalidate;\r\nend;\r\n\r\nprocedure TTMSFNCCustomDigitalTimePicker.SetIntervalUnit(\r\n const Value: TTMSFNCDigitalTimeSelectorIntervalUnit);\r\nbegin\r\n FTimeSelector.IntervalUnit := Value;\r\n Invalidate;\r\nend;\r\n\r\nprocedure TTMSFNCCustomDigitalTimePicker.SetItems(\r\n const Value: TTMSFNCDigitalTimeSelectorItems);\r\nbegin\r\n FTimeSelector.Items.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCCustomDigitalTimePicker.SetSelectedTime(const Value: TTime);\r\nbegin\r\n if FAllowNumericNullValue and (Frac(Value) = 0.0) then\r\n Content := ''\r\n else\r\n begin\r\n if (CompareTime(Value, StartTime) = -1) or (CompareTime(Value, EndTime) = 1) then\r\n Content := FormatDateTime(TimeFormat, StartTime)\r\n else\r\n Content := FormatDateTime(TimeFormat, Value);\r\n end;\r\n\r\n FPrevSelTime := Value;\r\n Invalidate;\r\nend;\r\n\r\nprocedure TTMSFNCCustomDigitalTimePicker.SetStartTime(const Value: TTime);\r\nbegin\r\n FTimeSelector.StartTime := Value;\r\n SelectedTime := Value;\r\nend;\r\n\r\nprocedure TTMSFNCCustomDigitalTimePicker.SetTimeFormat(const Value: string);\r\nbegin\r\n FTimeSelector.TimeFormat := Value;\r\n Content := FormatDateTime(Value, SelectedTime);\r\n Invalidate;\r\nend;\r\n\r\nprocedure TTMSFNCCustomDigitalTimePicker.SetTimeInterval(const Value: Integer);\r\nbegin\r\n FTimeSelector.TimeInterval := Value;\r\n Invalidate;\r\nend;\r\n\r\nprocedure TTMSFNCCustomDigitalTimePicker.TimeDeselected(Sender: TObject;\r\n ATime: TTime);\r\nbegin\r\n if Assigned(OnTimeDeselected) then\r\n OnTimeDeselected(Self, ATime);\r\n\r\n Invalidate;\r\nend;\r\n\r\nprocedure TTMSFNCCustomDigitalTimePicker.TimeSelected(Sender: TObject;\r\n ATime: TTime);\r\nbegin\r\n if Editable and Edit.IsFocused then\r\n PreventDropDown := True;\r\n\r\n if CloseOnSelection then\r\n DropDown;\r\n\r\n if Assigned(OnTimeSelected) then\r\n OnTimeSelected(Self, ATime);\r\n\r\n SelectedTime := ATime;\r\n\r\n Invalidate;\r\nend;\r\n\r\nprocedure TTMSFNCCustomDigitalTimePicker.UpdateEditText(AText: string);\r\nvar\r\n t: TDateTime;\r\nbegin\r\n inherited;\r\n if AText = '' then\r\n begin\r\n if (0.0 <> FPrevSelTime) then\r\n begin\r\n FTimeSelector.SelectedTime := 0.0;\r\n DoTimeSelected;\r\n end;\r\n end\r\n else if TryStrToTime(AText, t) then\r\n begin\r\n if (Frac(t) <> SelectedTime) and (Frac(t) >= StartTime) and (Frac(t) <= EndTime) then\r\n begin\r\n FTimeSelector.SelectedTime := Frac(t);\r\n DoTimeSelected;\r\n end;\r\n end;\r\nend;\r\n\r\n{ TTMSFNCDigitalTimePicker }\r\n\r\nprocedure TTMSFNCDigitalTimePicker.RegisterRuntimeClasses;\r\nbegin\r\n inherited;\r\n RegisterClass(TTMSFNCDigitalTimePicker);\r\nend;\r\n\r\nend.\r\n","{********************************************************************}\r\n{ }\r\n{ written by TMS Software }\r\n{ copyright (c) 2018 - 2022 }\r\n{ Email : info@tmssoftware.com }\r\n{ Web : https://www.tmssoftware.com }\r\n{ }\r\n{ The source code is given as is. The author is not responsible }\r\n{ for any possible damage done due to the use of this code. }\r\n{ The complete source code remains property of the author and may }\r\n{ not be distributed, published, given or sold in any form as such. }\r\n{ No parts of the source code can be included in any other component }\r\n{ or application without written authorization of the author. }\r\n{********************************************************************}\r\n\r\nunit WEBLib.TMSFNCAnalogTimeSelector;\r\n\r\n{$I WEBLib.TMSFNCDefines.inc}\r\n\r\ninterface\r\n\r\nuses\r\n {$IFDEF FMXLIB}\r\n FMX.Types,\r\n {$ENDIF}\r\n {$IFNDEF LCLLIB}\r\n Types,\r\n {$ENDIF}\r\n {$IFNDEF WEBLIB}\r\n {$IFNDEF LCLLIB}\r\n UITypes,\r\n {$ENDIF}\r\n {$ENDIF}\r\n Classes, WEBLib.Controls, WEBLib.TMSFNCCustomControl, WEBLib.TMSFNCGraphics,\r\n WEBLib.TMSFNCGraphicsTypes, WEBLib.TMSFNCTypes, WEBLib.ExtCtrls, WEBLib.TMSFNCStyles,\r\n WEBLib.Graphics, WEBLib.TMSFNCUtils;\r\n\r\nconst\r\n MAJ_VER = 1; // Major version nr.\r\n MIN_VER = 0; // Minor version nr.\r\n REL_VER = 2; // Release nr.\r\n BLD_VER = 0; // Build nr.\r\n\r\n //Version history\r\n //v1.0.0.0 : First Release\r\n //v1.0.1.0 : New : Support for high dpi\r\n //v1.0.2.0 : New : GlobalFont interface implemented\r\n\r\ntype\r\n TTMSFNCAnalogTimeSelectorShape = (wsCircle, wsRect, wsRoundRect);\r\n TTMSFNCAnalogTimeSelectorTickMark = (tmAll, tmHours, tmNone, tmQuartHours);\r\n TTMSFNCAnalogTimeSelectorHourMarkStyle = (hmsLine, hmsQuartDblLine);\r\n TTMSFNCAnalogTimeSelectorPointerStyle = (psLine, psShortLine, psPointer, psLineArrow);\r\n TTMSFNCAnalogTimeSelectorStyle = (wsClassic, wsFluorescent, wsEmerald, wsTower, wsFuchsia, wsBlack, wsBlackWhite, wsSuperNova, wsSports, wsSmooth, wsCustom);\r\n\r\n TTMSFNCAnalogTimeSelectorAppearance = class(TPersistent)\r\n private\r\n FFill: TTMSFNCGraphicsFill;\r\n FStroke: TTMSFNCGraphicsStroke;\r\n FShape: TTMSFNCAnalogTimeSelectorShape;\r\n FHourMark: TTMSFNCGraphicsStroke;\r\n FTickMark: TTMSFNCAnalogTimeSelectorTickMark;\r\n FMinuteMark: TTMSFNCGraphicsStroke;\r\n FHourMarkLength: Single;\r\n FMinuteMarkLength: Single;\r\n FHourFont: TTMSFNCGraphicsFont;\r\n FAMPMFill: TTMSFNCGraphicsFill;\r\n FAMPMStroke: TTMSFNCGraphicsStroke;\r\n FAMPMFont: TTMSFNCGraphicsFont;\r\n FShowAMPM: Boolean;\r\n FPointerStyle: TTMSFNCAnalogTimeSelectorPointerStyle;\r\n FMinutePointerShadow: TTMSFNCGraphicsStroke;\r\n FHourPointerShadow: TTMSFNCGraphicsStroke;\r\n FSecondPointer: TTMSFNCGraphicsStroke;\r\n FMinutePointer: TTMSFNCGraphicsStroke;\r\n FHourPointer: TTMSFNCGraphicsStroke;\r\n FCenterPointSize: Single;\r\n FCenterPointFill: TTMSFNCGraphicsFill;\r\n FCenterPointStroke: TTMSFNCGraphicsStroke;\r\n FShowSecondPointer: Boolean;\r\n FShowNumbers: Boolean;\r\n FOnChange: TNotifyEvent;\r\n FHourMarkStyle: TTMSFNCAnalogTimeSelectorHourMarkStyle;\r\n FCenterPointOuterColor: TTMSFNCGraphicsColor;\r\n procedure SetFill(const Value: TTMSFNCGraphicsFill);\r\n procedure SetStroke(const Value: TTMSFNCGraphicsStroke);\r\n procedure SetShape(const Value: TTMSFNCAnalogTimeSelectorShape);\r\n procedure SetHourMark(const Value: TTMSFNCGraphicsStroke);\r\n procedure SetMinuteMark(const Value: TTMSFNCGraphicsStroke);\r\n procedure SetTickMark(const Value: TTMSFNCAnalogTimeSelectorTickMark);\r\n procedure SetHourMarkLength(const Value: Single);\r\n procedure SetMinuteMarkLength(const Value: Single);\r\n procedure SetHourFont(const Value: TTMSFNCGraphicsFont);\r\n procedure SetAMPMFill(const Value: TTMSFNCGraphicsFill);\r\n procedure SetAMPMFont(const Value: TTMSFNCGraphicsFont);\r\n procedure SetAMPMStroke(const Value: TTMSFNCGraphicsStroke);\r\n procedure SetShowAMPM(const Value: Boolean);\r\n procedure SetPointerStyle(const Value: TTMSFNCAnalogTimeSelectorPointerStyle);\r\n procedure SetHourPointerShadow(const Value: TTMSFNCGraphicsStroke);\r\n procedure SetMinutePointerShadow(const Value: TTMSFNCGraphicsStroke);\r\n procedure SetHourPointer(const Value: TTMSFNCGraphicsStroke);\r\n procedure SetMinutePointer(const Value: TTMSFNCGraphicsStroke);\r\n procedure SetSecondPointer(const Value: TTMSFNCGraphicsStroke);\r\n procedure SetCenterPointFill(const Value: TTMSFNCGraphicsFill);\r\n procedure SetCenterPointSize(const Value: Single);\r\n procedure SetCenterPointStroke(const Value: TTMSFNCGraphicsStroke);\r\n procedure SetShowSecondPointer(const Value: Boolean);\r\n procedure SetShowNumbers(const Value: Boolean);\r\n procedure SetHourMarkStyle(const Value: TTMSFNCAnalogTimeSelectorHourMarkStyle);\r\n procedure SetCenterPointOuterColor(const Value: TTMSFNCGraphicsColor);\r\n function IsHourMarkLengthStored: Boolean;\r\n function IsMinuteMarkLengthStored: Boolean;\r\n function IsCenterPointSizeStored: Boolean;\r\n protected\r\n procedure Changed;\r\n procedure FillChanged(Sender: TObject);\r\n procedure FontChanged(Sender: TObject);\r\n procedure StrokeChanged(Sender: TObject);\r\n public\r\n constructor Create; virtual;\r\n destructor Destroy; override;\r\n procedure Assign(Source: TPersistent); override;\r\n procedure InitializeDefault;\r\n property OnChange: TNotifyEvent read FOnChange write FOnChange;\r\n published\r\n property Fill: TTMSFNCGraphicsFill read FFill write SetFill;\r\n property Stroke: TTMSFNCGraphicsStroke read FStroke write SetStroke;\r\n property HourMark: TTMSFNCGraphicsStroke read FHourMark write SetHourMark;\r\n property HourFont: TTMSFNCGraphicsFont read FHourFont write SetHourFont;\r\n property MinuteMark: TTMSFNCGraphicsStroke read FMinuteMark write SetMinuteMark;\r\n property AMPMFill: TTMSFNCGraphicsFill read FAMPMFill write SetAMPMFill;\r\n property AMPMStroke: TTMSFNCGraphicsStroke read FAMPMStroke write SetAMPMStroke;\r\n property AMPMFont: TTMSFNCGraphicsFont read FAMPMFont write SetAMPMFont;\r\n property ShowAMPM: Boolean read FShowAMPM write SetShowAMPM default True;\r\n property Shape: TTMSFNCAnalogTimeSelectorShape read FShape write SetShape default wsCircle;\r\n property HourMarkStyle: TTMSFNCAnalogTimeSelectorHourMarkStyle read FHourMarkStyle write SetHourMarkStyle default hmsLine;\r\n property HourMarkLength: Single read FHourMarkLength write SetHourMarkLength stored IsHourMarkLengthStored nodefault;\r\n property MinuteMarkLength: Single read FMinuteMarkLength write SetMinuteMarkLength stored IsMinuteMarkLengthStored nodefault;\r\n property HourPointer: TTMSFNCGraphicsStroke read FHourPointer write SetHourPointer;\r\n property MinutePointer: TTMSFNCGraphicsStroke read FMinutePointer write SetMinutePointer;\r\n property SecondPointer: TTMSFNCGraphicsStroke read FSecondPointer write SetSecondPointer;\r\n property HourPointerShadow: TTMSFNCGraphicsStroke read FHourPointerShadow write SetHourPointerShadow;\r\n property MinutePointerShadow: TTMSFNCGraphicsStroke read FMinutePointerShadow write SetMinutePointerShadow;\r\n property CenterPointFill: TTMSFNCGraphicsFill read FCenterPointFill write SetCenterPointFill;\r\n property CenterPointStroke: TTMSFNCGraphicsStroke read FCenterPointStroke write SetCenterPointStroke;\r\n property CenterPointOuterColor: TTMSFNCGraphicsColor read FCenterPointOuterColor write SetCenterPointOuterColor default gcNull;\r\n property CenterPointSize: Single read FCenterPointSize write SetCenterPointSize stored IsCenterPointSizeStored nodefault;\r\n property PointerStyle: TTMSFNCAnalogTimeSelectorPointerStyle read FPointerStyle write SetPointerStyle default psLine;\r\n property TickMarks: TTMSFNCAnalogTimeSelectorTickMark read FTickMark write SetTickMark default tmAll;\r\n property ShowSecondPointer: Boolean read FShowSecondPointer write SetShowSecondPointer default False;\r\n property ShowNumbers: Boolean read FShowNumbers write SetShowNumbers default True;\r\n end;\r\n\r\n TTMSFNCAnalogTimeSelectorSettings = class(TPersistent)\r\n private\r\n FAuto: Boolean;\r\n FTimeOffset: Integer;\r\n FReadOnly: Boolean;\r\n FOnChange: TNotifyEvent;\r\n procedure SetAuto(const Value: Boolean);\r\n procedure SetReadOnly(const Value: Boolean);\r\n procedure SetTimeOffset(const Value: Integer);\r\n protected\r\n procedure Changed;\r\n public\r\n constructor Create; virtual;\r\n procedure Assign(Source: TPersistent); override;\r\n property OnChange: TNotifyEvent read FOnChange write FOnChange;\r\n published\r\n property Auto: Boolean read FAuto write SetAuto default False;\r\n property TimeOffset: Integer read FTimeOffset write SetTimeOffset default 0;\r\n property ReadOnly: Boolean read FReadOnly write SetReadOnly default False;\r\n end;\r\n\r\n TTMSFNCAnalogTimeSelectorBeforeDrawWatchBackgroundEvent = procedure(Sender: TObject; AGraphics: TTMSFNCGraphics; ARectF: TRectF; AShape: TTMSFNCAnalogTimeSelectorShape; var AAllow: Boolean; var ADefaultDraw: Boolean) of object;\r\n TTMSFNCAnalogTimeSelectorAfterDrawWatchBackgroundEvent = procedure(Sender: TObject; AGraphics: TTMSFNCGraphics; ARectF: TRectF; AShape: TTMSFNCAnalogTimeSelectorShape) of object;\r\n TTMSFNCAnalogTimeSelectorBeforeDrawTickMarkEvent = procedure(Sender: TObject; AGraphics: TTMSFNCGraphics; ARectF: TRectF; ATickMarks: TTMSFNCAnalogTimeSelectorTickMark; AHourMarkLength: Single; AMinuteMarkLength: Single; var AAllow: Boolean; var ADefaultDraw: Boolean) of object;\r\n TTMSFNCAnalogTimeSelectorAfterDrawTickMarkEvent = procedure(Sender: TObject; AGraphics: TTMSFNCGraphics; ARectF: TRectF; ATickMarks: TTMSFNCAnalogTimeSelectorTickMark; AHourMarkLength: Single; AMinuteMarkLength: Single) of object;\r\n TTMSFNCAnalogTimeSelectorBeforeDrawNumberEvent = procedure(Sender: TObject; AGraphics: TTMSFNCGraphics; ARectF: TRectF; ANumber: Integer; var AAllow: Boolean; var ADefaultDraw: Boolean) of object;\r\n TTMSFNCAnalogTimeSelectorAfterDrawNumberEvent = procedure(Sender: TObject; AGraphics: TTMSFNCGraphics; ARectF: TRectF; ANumber: Integer) of object;\r\n TTMSFNCAnalogTimeSelectorBeforeDrawAMPMEvent = procedure(Sender: TObject; AGraphics: TTMSFNCGraphics; ARectF: TRectF; AAM: Boolean; var AAllow: Boolean; var ADefaultDraw: Boolean) of object;\r\n TTMSFNCAnalogTimeSelectorAfterDrawAMPMEvent = procedure(Sender: TObject; AGraphics: TTMSFNCGraphics; ARectF: TRectF; AAM: Boolean) of object;\r\n TTMSFNCAnalogTimeSelectorBeforeDrawHourPointerEvent = procedure(Sender: TObject; AGraphics: TTMSFNCGraphics; ACenterPoint: TPointF; var AAllow: Boolean; var ADefaultDraw: Boolean) of object;\r\n TTMSFNCAnalogTimeSelectorAfterDrawHourPointerEvent = procedure(Sender: TObject; AGraphics: TTMSFNCGraphics; ACenterPoint: TPointF) of object;\r\n TTMSFNCAnalogTimeSelectorBeforeDrawMinutePointerEvent = procedure(Sender: TObject; AGraphics: TTMSFNCGraphics; ACenterPoint: TPointF; var AAllow: Boolean; var ADefaultDraw: Boolean) of object;\r\n TTMSFNCAnalogTimeSelectorAfterDrawMinutePointerEvent = procedure(Sender: TObject; AGraphics: TTMSFNCGraphics; ACenterPoint: TPointF) of object;\r\n TTMSFNCAnalogTimeSelectorBeforeDrawSecondPointerEvent = procedure(Sender: TObject; AGraphics: TTMSFNCGraphics; ACenterPoint: TPointF; var AAllow: Boolean; var ADefaultDraw: Boolean) of object;\r\n TTMSFNCAnalogTimeSelectorAfterDrawSecondPonterEvent = procedure(Sender: TObject; AGraphics: TTMSFNCGraphics; ACenterPoint: TPointF) of object;\r\n TTMSFNCAnalogTimeSelectorBeforeDrawCenterPointEvent = procedure(Sender: TObject; AGraphics: TTMSFNCGraphics; ARectF: TRectF; ACenterPointSize: Single; var AAllow: Boolean; var ADefaultDraw: Boolean) of object;\r\n TTMSFNCAnalogTimeSelectorAfterDrawCenterPointEvent = procedure(Sender: TObject; AGraphics: TTMSFNCGraphics; ARectF: TRectF; ACenterPointSize: Single) of object;\r\n TTMSFNCAnalogTimeSelectorSecondChangedEvent = procedure(Sender: TObject; ATime: TTime) of object;\r\n TTMSFNCAnalogTimeSelectorMinuteChangedEvent = procedure(Sender: TObject; ATime: TTime) of object;\r\n TTMSFNCAnalogTimeSelectorHourChangedEvent = procedure(Sender: TObject; ATime: TTime) of object;\r\n TTMSFNCAnalogTimeSelectorTimeChangedEvent = procedure(Sender: TObject; ATime: TTime) of object;\r\n\r\n TTMSFNCCustomAnalogTimeSelector = class(TTMSFNCCustomControl, ITMSFNCAppearanceGlobalFont)\r\n private\r\n FTime: TTime;\r\n FWatchTimer: TTimer;\r\n FMouseHourDown, FMouseMinuteDown: Boolean;\r\n FAM: Boolean;\r\n FPrevHour: Word;\r\n FPrevMin: Word;\r\n FPrevSec: Word;\r\n FAMRect: TRectF;\r\n FAppearance: TTMSFNCAnalogTimeSelectorAppearance;\r\n FSettings: TTMSFNCAnalogTimeSelectorSettings;\r\n FOnChanged: TNotifyEvent;\r\n FOnBeforeDrawBackground: TTMSFNCAnalogTimeSelectorBeforeDrawWatchBackgroundEvent;\r\n FOnAfterDrawBackground: TTMSFNCAnalogTimeSelectorAfterDrawWatchBackgroundEvent;\r\n FOnBeforeDrawTickMark: TTMSFNCAnalogTimeSelectorBeforeDrawTickMarkEvent;\r\n FOnAfterDrawTickMark: TTMSFNCAnalogTimeSelectorAfterDrawTickMarkEvent;\r\n FOnBeforeDrawNumber: TTMSFNCAnalogTimeSelectorBeforeDrawNumberEvent;\r\n FOnAfterDrawNumber: TTMSFNCAnalogTimeSelectorAfterDrawNumberEvent;\r\n FOnBeforeDrawAMPM: TTMSFNCAnalogTimeSelectorBeforeDrawAMPMEvent;\r\n FOnAfterDrawAMPM: TTMSFNCAnalogTimeSelectorAfterDrawAMPMEvent;\r\n FOnAfterDrawHourPointer: TTMSFNCAnalogTimeSelectorAfterDrawHourPointerEvent;\r\n FOnBeforeDrawHourPointer: TTMSFNCAnalogTimeSelectorBeforeDrawHourPointerEvent;\r\n FOnAfterDrawMinutePointer: TTMSFNCAnalogTimeSelectorAfterDrawMinutePointerEvent;\r\n FOnBeforeDrawMinutePointer: TTMSFNCAnalogTimeSelectorBeforeDrawMinutePointerEvent;\r\n FOnBeforeDrawSecondPointer: TTMSFNCAnalogTimeSelectorBeforeDrawSecondPointerEvent;\r\n FOnAfterDrawSecondPointer: TTMSFNCAnalogTimeSelectorAfterDrawSecondPonterEvent;\r\n FOnAfterDrawCenterPoint: TTMSFNCAnalogTimeSelectorAfterDrawCenterPointEvent;\r\n FOnBeforeDrawCenterPoint: TTMSFNCAnalogTimeSelectorBeforeDrawCenterPointEvent;\r\n FOnMinuteChanged: TTMSFNCAnalogTimeSelectorMinuteChangedEvent;\r\n FOnHourChanged: TTMSFNCAnalogTimeSelectorHourChangedEvent;\r\n FOnSecondChanged: TTMSFNCAnalogTimeSelectorSecondChangedEvent;\r\n FOnTimeChanged: TTMSFNCAnalogTimeSelectorTimeChangedEvent;\r\n FStyle: TTMSFNCAnalogTimeSelectorStyle;\r\n FFollowMouse: Boolean;\r\n FGlobalFont: TTMSFNCAppearanceGlobalFont;\r\n procedure SetTime(const Value: TTime);\r\n procedure SetAM(const Value: Boolean);\r\n procedure SetAppearance(const Value: TTMSFNCAnalogTimeSelectorAppearance);\r\n procedure SetSettings(const Value: TTMSFNCAnalogTimeSelectorSettings);\r\n procedure SetStyle(const Value: TTMSFNCAnalogTimeSelectorStyle);\r\n procedure SetFollowMouse(const Value: Boolean);\r\n function PtInCircle(APointF: TPointF; ACPoint: TPointF; ARadius: Single): Boolean;\r\n procedure SetGlobalFont(const Value: TTMSFNCAppearanceGlobalFont);\r\n protected\r\n procedure ChangeDPIScale(M, D: Integer); override;\r\n procedure Changed;\r\n procedure AppearanceChanged(Sender: TObject);\r\n procedure SettingsChanged(Sender: TObject);\r\n procedure OnWatchTimer(Sender: TObject);\r\n procedure Draw(AGraphics: TTMSFNCGraphics; ARectF: TRectF); override;\r\n procedure DrawWatchBackground(AGraphics: TTMSFNCGraphics; ARectF: TRectF);\r\n procedure DrawTickMarks(AGraphics: TTMSFNCGraphics; ARectF: TRectF);\r\n procedure DrawNumbers(AGraphics: TTMSFNCGraphics; ARectF: TRectF);\r\n procedure DrawAMPM(AGraphics: TTMSFNCGraphics; ARectF: TRectF);\r\n procedure DrawNeedles(AGraphics: TTMSFNCGraphics; ARectF: TRectF);\r\n procedure DoBeforeDrawWatchBackground(AGraphics: TTMSFNCGraphics; ARectF: TRectF; AShape: TTMSFNCAnalogTimeSelectorShape; var AAllow: Boolean; var ADefaultDraw: Boolean); virtual;\r\n procedure DoAfterDrawWatchBackground(AGraphics: TTMSFNCGraphics; ARectF: TRectF; AShape: TTMSFNCAnalogTimeSelectorShape); virtual;\r\n procedure DoBeforeDrawTickMark(AGraphics: TTMSFNCGraphics; ARectF: TRectF; ATickMarks: TTMSFNCAnalogTimeSelectorTickMark; AHourMarkLength: Single; AMinuteMarkLength: Single; var AAllow: Boolean; var ADefaultDraw: Boolean); virtual;\r\n procedure DoAfterDrawTickMark(AGraphics: TTMSFNCGraphics; ARectF: TRectF; ATickMarks: TTMSFNCAnalogTimeSelectorTickMark; AHourMarkLength: Single; AMinuteMarkLength: Single); virtual;\r\n procedure DoBeforeDrawNumber(AGraphics: TTMSFNCGraphics; ARectF: TRectF; ANumber: Integer; var AAllow: Boolean; var ADefaultDraw: Boolean); virtual;\r\n procedure DoAfterDrawNumber(AGraphics: TTMSFNCGraphics; ARectF: TRectF; ANumber: Integer); virtual;\r\n procedure DoBeforeDrawAMPM(AGraphics: TTMSFNCGraphics; ARectF: TRectF; AAM: Boolean; var AAllow: Boolean; var ADefaultDraw: Boolean); virtual;\r\n procedure DoAfterDrawAMPM(AGraphics: TTMSFNCGraphics; ARectF: TRectF; AAM: Boolean); virtual;\r\n procedure DoBeforeDrawHourPointer(AGraphics: TTMSFNCGraphics; ACenterPoint: TPointF; var AAllow: Boolean; var ADefaultDraw: Boolean); virtual;\r\n procedure DoAfterDrawHourPointer(AGraphics: TTMSFNCGraphics; ACenterPoint: TPointF); virtual;\r\n procedure DoBeforeDrawMinutePointer(AGraphics: TTMSFNCGraphics; ACenterPoint: TPointF; var AAllow: Boolean; var ADefaultDraw: Boolean); virtual;\r\n procedure DoAfterDrawMinutePointer(AGraphics: TTMSFNCGraphics; ACenterPoint: TPointF); virtual;\r\n procedure DoBeforeDrawSecondPointer(AGraphics: TTMSFNCGraphics; ACenterPoint: TPointF; var AAllow: Boolean; var ADefaultDraw: Boolean); virtual;\r\n procedure DoAfterDrawSecondPonter(AGraphics: TTMSFNCGraphics; ACenterPoint: TPointF); virtual;\r\n procedure DoBeforeDrawCenterPoint(AGraphics: TTMSFNCGraphics; ARectF: TRectF; ACenterPointSize: Single; var AAllow: Boolean; var ADefaultDraw: Boolean); virtual;\r\n procedure DoAfterDrawCenterPoint(AGraphics: TTMSFNCGraphics; ARectF: TRectF; ACenterPointSize: Single); virtual;\r\n procedure DoSecondChanged(ATime: TTime); virtual;\r\n procedure DoMinuteChanged(ATime: TTime); virtual;\r\n procedure DoHourChanged(ATime: TTime); virtual;\r\n procedure DoTimeChanged(ATime: TTime); virtual;\r\n procedure HandleMouseDown(Button: TTMSFNCMouseButton; Shift: TShiftState; X, Y: Single); override;\r\n procedure HandleMouseUp(Button: TTMSFNCMouseButton; Shift: TShiftState; X, Y: Single); override;\r\n procedure HandleMouseMove(Shift: TShiftState; X, Y: Single); override;\r\n procedure HandleKeyDown(var Key: Word; Shift: TShiftState); override;\r\n procedure ApplyStyle; override;\r\n procedure ResetToDefaultStyle; override;\r\n function GetVersion: string; override;\r\n function GetWatchRect(ARectF: TRectF): TRectF;\r\n function GetCenterPoint(ARectF: TRectF): TPointF;\r\n function GetRadius(ARectF: TRectF): Single;\r\n function GetAMPMRect(AGraphics: TTMSFNCGraphics; ARectF: TRectF): TRectF;\r\n procedure SetFonts(ASetType: TTMSFNCAppearanceGlobalFontType); virtual;\r\n property Time: TTime read FTime write SetTime;\r\n property AM: Boolean read FAM write SetAM default True;\r\n property Appearance: TTMSFNCAnalogTimeSelectorAppearance read FAppearance write SetAppearance;\r\n property Settings: TTMSFNCAnalogTimeSelectorSettings read FSettings write SetSettings;\r\n property GlobalFont: TTMSFNCAppearanceGlobalFont read FGlobalFont write SetGlobalFont;\r\n property OnChanged: TNotifyEvent read FOnChanged write FOnChanged;\r\n property OnBeforeDrawBackground: TTMSFNCAnalogTimeSelectorBeforeDrawWatchBackgroundEvent read FOnBeforeDrawBackground write FOnBeforeDrawBackground;\r\n property OnAfterDrawBackground: TTMSFNCAnalogTimeSelectorAfterDrawWatchBackgroundEvent read FOnAfterDrawBackground write FOnAfterDrawBackground;\r\n property OnBeforeDrawTickMark: TTMSFNCAnalogTimeSelectorBeforeDrawTickMarkEvent read FOnBeforeDrawTickMark write FOnBeforeDrawTickMark;\r\n property OnAfterDrawTickMark: TTMSFNCAnalogTimeSelectorAfterDrawTickMarkEvent read FOnAfterDrawTickMark write FOnAfterDrawTickMark;\r\n property OnBeforeDrawNumber: TTMSFNCAnalogTimeSelectorBeforeDrawNumberEvent read FOnBeforeDrawNumber write FOnBeforeDrawNumber;\r\n property OnAfterDrawNumber: TTMSFNCAnalogTimeSelectorAfterDrawNumberEvent read FOnAfterDrawNumber write FOnAfterDrawNumber;\r\n property OnBeforeDrawAMPM: TTMSFNCAnalogTimeSelectorBeforeDrawAMPMEvent read FOnBeforeDrawAMPM write FOnBeforeDrawAMPM;\r\n property OnAfterDrawAMPM: TTMSFNCAnalogTimeSelectorAfterDrawAMPMEvent read FOnAfterDrawAMPM write FOnAfterDrawAMPM;\r\n property OnBeforeDrawHourPointer: TTMSFNCAnalogTimeSelectorBeforeDrawHourPointerEvent read FOnBeforeDrawHourPointer write FOnBeforeDrawHourPointer;\r\n property OnAfterDrawHourPointer: TTMSFNCAnalogTimeSelectorAfterDrawHourPointerEvent read FOnAfterDrawHourPointer write FOnAfterDrawHourPointer;\r\n property OnBeforeDrawMinutePointer: TTMSFNCAnalogTimeSelectorBeforeDrawMinutePointerEvent read FOnBeforeDrawMinutePointer write FOnBeforeDrawMinutePointer;\r\n property OnAfterDrawMinutePointer: TTMSFNCAnalogTimeSelectorAfterDrawMinutePointerEvent read FOnAfterDrawMinutePointer write FOnAfterDrawMinutePointer;\r\n property OnBeforeDrawSecondPointer: TTMSFNCAnalogTimeSelectorBeforeDrawSecondPointerEvent read FOnBeforeDrawSecondPointer write FOnBeforeDrawSecondPointer;\r\n property OnAfterDrawSecondPointer: TTMSFNCAnalogTimeSelectorAfterDrawSecondPonterEvent read FOnAfterDrawSecondPointer write FOnAfterDrawSecondPointer;\r\n property OnBeforeDrawCenterPoint: TTMSFNCAnalogTimeSelectorBeforeDrawCenterPointEvent read FOnBeforeDrawCenterPoint write FOnBeforeDrawCenterPoint;\r\n property OnAfterDrawCenterPoint: TTMSFNCAnalogTimeSelectorAfterDrawCenterPointEvent read FOnAfterDrawCenterPoint write FOnAfterDrawCenterPoint;\r\n property OnSecondChanged: TTMSFNCAnalogTimeSelectorSecondChangedEvent read FOnSecondChanged write FOnSecondChanged;\r\n property OnMinuteChanged: TTMSFNCAnalogTimeSelectorMinuteChangedEvent read FOnMinuteChanged write FOnMinuteChanged;\r\n property OnHourChanged: TTMSFNCAnalogTimeSelectorHourChangedEvent read FOnHourChanged write FOnHourChanged;\r\n property OnTimeChanged: TTMSFNCAnalogTimeSelectorTimeChangedEvent read FOnTimeChanged write FOnTimeChanged;\r\n property Style: TTMSFNCAnalogTimeSelectorStyle read FStyle write SetStyle default wsClassic;\r\n property FollowMouse: Boolean read FFollowMouse write SetFollowMouse default True;\r\n public\r\n constructor Create(AOwner: TComponent); override;\r\n destructor Destroy; override;\r\n procedure Assign(Source: TPersistent); override;\r\n procedure Initialize;\r\n function XYToHour(X: Single; Y: Single): Integer;\r\n function XYToMinute(X: Single; Y: Single): Integer;\r\n end;\r\n\r\n {$IFNDEF LCLLIB}\r\n [ComponentPlatformsAttribute(TMSPlatformsWeb)]\r\n {$ENDIF}\r\n TTMSFNCAnalogTimeSelector = class(TTMSFNCCustomAnalogTimeSelector)\r\n published\r\n property Fill;\r\n property Stroke;\r\n property Appearance;\r\n property FollowMouse;\r\n property Settings;\r\n property Time;\r\n property Style;\r\n property GlobalFont;\r\n property OnChanged;\r\n property OnSecondChanged;\r\n property OnMinuteChanged;\r\n property OnHourChanged;\r\n property OnTimeChanged;\r\n property OnBeforeDrawBackground;\r\n property OnAfterDrawBackground;\r\n property OnBeforeDrawTickMark;\r\n property OnAfterDrawTickMark;\r\n property OnBeforeDrawNumber;\r\n property OnAfterDrawNumber;\r\n property OnBeforeDrawAMPM;\r\n property OnAfterDrawAMPM;\r\n property OnBeforeDrawHourPointer;\r\n property OnAfterDrawHourPointer;\r\n property OnBeforeDrawMinutePointer;\r\n property OnAfterDrawMinutePointer;\r\n property OnBeforeDrawSecondPointer;\r\n property OnAfterDrawSecondPointer;\r\n property OnBeforeDrawCenterPoint;\r\n property OnAfterDrawCenterPoint;\r\n end;\r\n\r\nimplementation\r\n\r\nuses\r\n Math, DateUtils, SysUtils;\r\n\r\n{ TTMSFNCCustomWatch }\r\n\r\nprocedure TTMSFNCCustomAnalogTimeSelector.AppearanceChanged(Sender: TObject);\r\nbegin\r\n Changed;\r\nend;\r\n\r\nprocedure TTMSFNCCustomAnalogTimeSelector.ApplyStyle;\r\nvar\r\n c: TTMSFNCGraphicsColor;\r\nbegin\r\n inherited;\r\n c := gcNull;\r\n if TTMSFNCStyles.GetStyleBackgroundFillColor(c) then\r\n begin\r\n Appearance.Fill.Kind := gfkSolid;\r\n Appearance.Fill.Color := c;\r\n Appearance.AMPMFill.Kind := gfkSolid;\r\n Appearance.AMPMFill.Color := c;\r\n end;\r\n\r\n c := gcNull;\r\n if TTMSFNCStyles.GetStyleSelectionFillColorTo(c) then\r\n begin\r\n Appearance.SecondPointer.Kind := gskSolid;\r\n Appearance.SecondPointer.Color := c;\r\n end;\r\n\r\n c := gcNull;\r\n if TTMSFNCStyles.GetStyleSelectionFillColor(c) then\r\n begin\r\n Appearance.Stroke.Kind := gskSolid;\r\n Appearance.Stroke.Color := c;\r\n Appearance.HourPointer.Kind := gskSolid;\r\n Appearance.HourPointer.Color := c;\r\n Appearance.MinutePointer.Kind := gskSolid;\r\n Appearance.MinutePointer.Color := c;\r\n Appearance.CenterPointFill.Kind := gfkSolid;\r\n Appearance.CenterPointFill.Color := c;\r\n Appearance.CenterPointStroke.Kind := gskSolid;\r\n Appearance.CenterPointStroke.Color := c;\r\n Appearance.HourFont.Color := c;\r\n Appearance.HourMark.Kind := gskSolid;\r\n Appearance.HourMark.Color := c;\r\n Appearance.MinuteMark.Kind := gskSolid;\r\n Appearance.MinuteMark.Color := c;\r\n Appearance.AMPMFont.Color := c;\r\n Appearance.AMPMStroke.Kind := gskSolid;\r\n Appearance.AMPMStroke.Color := c;\r\n Appearance.HourPointerShadow.Color := gcNull;\r\n Appearance.MinutePointerShadow.Color := gcNull;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomAnalogTimeSelector.Assign(Source: TPersistent);\r\nbegin\r\n if (Source is TTMSFNCCustomAnalogTimeSelector) then\r\n begin\r\n FSettings.Assign((Source as TTMSFNCAnalogTimeSelector).Settings);\r\n FAppearance.Assign((Source as TTMSFNCCustomAnalogTimeSelector).Appearance);\r\n FTime := (Source as TTMSFNCCustomAnalogTimeSelector).Time;\r\n FAM := (Source as TTMSFNCCustomAnalogTimeSelector).AM;\r\n end\r\n else\r\n inherited;\r\nend;\r\n\r\nprocedure TTMSFNCCustomAnalogTimeSelector.Changed;\r\nbegin\r\n if Assigned(OnChanged) then\r\n OnChanged(Self);\r\n\r\n Invalidate;\r\nend;\r\n\r\nprocedure TTMSFNCCustomAnalogTimeSelector.ChangeDPIScale(M, D: Integer);\r\nbegin\r\n inherited;\r\n BeginUpdate;\r\n Appearance.HourFont.Height := TTMSFNCUtils.MulDivInt(Appearance.HourFont.Height, M, D);\r\n Appearance.AMPMFont.Height := TTMSFNCUtils.MulDivInt(Appearance.AMPMFont.Height, M, D);\r\n Appearance.CenterPointSize := TTMSFNCUtils.MulDivSingle(Appearance.CenterPointSize, M, D);\r\n if Appearance.HourMarkLength > 1 then\r\n Appearance.HourMarkLength := TTMSFNCUtils.MulDivSingle(Appearance.HourMarkLength, M, D);\r\n if Appearance.MinuteMarkLength > 1 then\r\n Appearance.MinuteMarkLength := TTMSFNCUtils.MulDivSingle(Appearance.MinuteMarkLength, M, D);\r\n EndUpdate;\r\nend;\r\n\r\nconstructor TTMSFNCCustomAnalogTimeSelector.Create(AOwner: TComponent);\r\nbegin\r\n inherited;\r\n {$IFDEF CMNLIB}\r\n {$IFDEF MSWINDOWS}\r\n NativeCanvas := True;\r\n TextQuality := gtqClearType;\r\n {$ENDIF}\r\n {$ENDIF}\r\n Height := 180;\r\n Width := 180;\r\n Fill.Color := gcNull;\r\n Stroke.Color := gcNull;\r\n FAM := True;\r\n FMouseHourDown := False;\r\n FMouseMinuteDown := False;\r\n FollowMouse := True;\r\n\r\n FAppearance := TTMSFNCAnalogTimeSelectorAppearance.Create;\r\n FSettings := TTMSFNCAnalogTimeSelectorSettings.Create;\r\n FAppearance.OnChange := @AppearanceChanged;\r\n FSettings.OnChange := @SettingsChanged;\r\n\r\n FWatchTimer := TTimer.Create(Self);\r\n FWatchTimer.Enabled:= Settings.Auto;\r\n FWatchTimer.Interval := 100;\r\n FWatchTimer.OnTimer := OnWatchTimer;\r\n\r\n FGlobalFont := TTMSFNCAppearanceGlobalFont.Create(Self);\r\nend;\r\n\r\ndestructor TTMSFNCCustomAnalogTimeSelector.Destroy;\r\nbegin\r\n FGlobalFont.Free;\r\n FAppearance.Free;\r\n FSettings.Free;\r\n FWatchTimer.Free;\r\n inherited;\r\nend;\r\n\r\nprocedure TTMSFNCCustomAnalogTimeSelector.DoAfterDrawAMPM(AGraphics: TTMSFNCGraphics;\r\n ARectF: TRectF; AAM: Boolean);\r\nbegin\r\n if Assigned(OnAfterDrawAMPM) then\r\n OnAfterDrawAMPM(Self, AGraphics, ARectF, AAM);\r\nend;\r\n\r\nprocedure TTMSFNCCustomAnalogTimeSelector.DoAfterDrawCenterPoint(AGraphics: TTMSFNCGraphics;\r\n ARectF: TRectF; ACenterPointSize: Single);\r\nbegin\r\n if Assigned(OnAfterDrawCenterPoint) then\r\n OnAfterDrawCenterPoint(Self, AGraphics, ARectF, ACenterPointSize);\r\nend;\r\n\r\nprocedure TTMSFNCCustomAnalogTimeSelector.DoAfterDrawHourPointer(AGraphics: TTMSFNCGraphics;\r\n ACenterPoint: TPointF);\r\nbegin\r\n if Assigned(OnAfterDrawHourPointer) then\r\n OnAfterDrawHourPointer(Self, AGraphics, ACenterPoint);\r\nend;\r\n\r\nprocedure TTMSFNCCustomAnalogTimeSelector.DoAfterDrawMinutePointer(\r\n AGraphics: TTMSFNCGraphics; ACenterPoint: TPointF);\r\nbegin\r\n if Assigned(OnAfterDrawMinutePointer) then\r\n OnAfterDrawMinutePointer(Self, AGraphics, ACenterPoint);\r\nend;\r\n\r\nprocedure TTMSFNCCustomAnalogTimeSelector.DoAfterDrawNumber(AGraphics: TTMSFNCGraphics;\r\n ARectF: TRectF; ANumber: Integer);\r\nbegin\r\n if Assigned(OnAfterDrawNumber) then\r\n OnAfterDrawNumber(Self, AGraphics, ARectF, ANumber);\r\nend;\r\n\r\nprocedure TTMSFNCCustomAnalogTimeSelector.DoAfterDrawSecondPonter(AGraphics: TTMSFNCGraphics;\r\n ACenterPoint: TPointF);\r\nbegin\r\n if Assigned(OnAfterDrawSecondPointer) then\r\n OnAfterDrawSecondPointer(Self, AGraphics, ACenterPoint);\r\nend;\r\n\r\nprocedure TTMSFNCCustomAnalogTimeSelector.DoAfterDrawTickMark(AGraphics: TTMSFNCGraphics;\r\n ARectF: TRectF; ATickMarks: TTMSFNCAnalogTimeSelectorTickMark; AHourMarkLength,\r\n AMinuteMarkLength: Single);\r\nbegin\r\n if Assigned(OnAfterDrawTickMark) then\r\n OnAfterDrawTickMark(Self, AGraphics, ARectF, ATickMarks, AHourMarkLength, AMinuteMarkLength);\r\nend;\r\n\r\nprocedure TTMSFNCCustomAnalogTimeSelector.DoAfterDrawWatchBackground(\r\n AGraphics: TTMSFNCGraphics; ARectF: TRectF; AShape: TTMSFNCAnalogTimeSelectorShape);\r\nbegin\r\n if Assigned(OnAfterDrawBackground) then\r\n OnAfterDrawBackground(Self, AGraphics, ARectF, AShape);\r\nend;\r\n\r\nprocedure TTMSFNCCustomAnalogTimeSelector.DoBeforeDrawAMPM(AGraphics: TTMSFNCGraphics;\r\n ARectF: TRectF; AAM: Boolean; var AAllow, ADefaultDraw: Boolean);\r\nbegin\r\n if Assigned(OnBeforeDrawAMPM) then\r\n OnBeforeDrawAMPM(Self, AGraphics, ARectF, AAM, AAllow, ADefaultDraw);\r\nend;\r\n\r\nprocedure TTMSFNCCustomAnalogTimeSelector.DoBeforeDrawCenterPoint(AGraphics: TTMSFNCGraphics;\r\n ARectF: TRectF; ACenterPointSize: Single; var AAllow, ADefaultDraw: Boolean);\r\nbegin\r\n if Assigned(OnBeforeDrawCenterPoint) then\r\n OnBeforeDrawCenterPoint(Self, AGraphics, ARectF, ACenterPointSize, AAllow, ADefaultDraw);\r\nend;\r\n\r\nprocedure TTMSFNCCustomAnalogTimeSelector.DoBeforeDrawHourPointer(AGraphics: TTMSFNCGraphics;\r\n ACenterPoint: TPointF; var AAllow, ADefaultDraw: Boolean);\r\nbegin\r\n if Assigned(OnBeforeDrawHourPointer) then\r\n OnBeforeDrawHourPointer(Self, AGraphics, ACenterPoint, AAllow, ADefaultDraw);\r\nend;\r\n\r\nprocedure TTMSFNCCustomAnalogTimeSelector.DoBeforeDrawMinutePointer(\r\n AGraphics: TTMSFNCGraphics; ACenterPoint: TPointF; var AAllow,\r\n ADefaultDraw: Boolean);\r\nbegin\r\n if Assigned(OnBeforeDrawMinutePointer) then\r\n OnBeforeDrawMinutePointer(Self, AGraphics, ACenterPoint, AAllow, ADefaultDraw);\r\nend;\r\n\r\nprocedure TTMSFNCCustomAnalogTimeSelector.DoBeforeDrawNumber(AGraphics: TTMSFNCGraphics;\r\n ARectF: TRectF; ANumber: Integer; var AAllow, ADefaultDraw: Boolean);\r\nbegin\r\n if Assigned(OnBeforeDrawNumber) then\r\n OnBeforeDrawNumber(Self, AGraphics, ARectF, ANumber, AAllow, ADefaultDraw);\r\nend;\r\n\r\nprocedure TTMSFNCCustomAnalogTimeSelector.DoBeforeDrawSecondPointer(\r\n AGraphics: TTMSFNCGraphics; ACenterPoint: TPointF; var AAllow,\r\n ADefaultDraw: Boolean);\r\nbegin\r\n if Assigned(OnBeforeDrawSecondPointer) then\r\n OnBeforeDrawSecondPointer(Self, AGraphics, ACenterPoint, AAllow, ADefaultDraw);\r\nend;\r\n\r\nprocedure TTMSFNCCustomAnalogTimeSelector.DoBeforeDrawTickMark(AGraphics: TTMSFNCGraphics;\r\n ARectF: TRectF; ATickMarks: TTMSFNCAnalogTimeSelectorTickMark; AHourMarkLength,\r\n AMinuteMarkLength: Single; var AAllow, ADefaultDraw: Boolean);\r\nbegin\r\n if Assigned(OnBeforeDrawTickMark) then\r\n OnBeforeDrawTickMark(Self, AGraphics, ARectf, ATickMarks, AHourMarkLength, AMinuteMarkLength, AAllow, ADefaultDraw);\r\nend;\r\n\r\nprocedure TTMSFNCCustomAnalogTimeSelector.DoBeforeDrawWatchBackground(\r\n AGraphics: TTMSFNCGraphics; ARectF: TRectF; AShape: TTMSFNCAnalogTimeSelectorShape;\r\n var AAllow, ADefaultDraw: Boolean);\r\nbegin\r\n if Assigned(OnBeforeDrawBackground) then\r\n OnBeforeDrawBackground(Self, AGraphics, ARectF, AShape, AAllow, ADefaultDraw);\r\nend;\r\n\r\nprocedure TTMSFNCCustomAnalogTimeSelector.DoHourChanged(ATime: TTime);\r\nbegin\r\n if Assigned(OnHourChanged) then\r\n OnHourChanged(Self, ATime);\r\nend;\r\n\r\nprocedure TTMSFNCCustomAnalogTimeSelector.DoMinuteChanged(ATime: TTime);\r\nbegin\r\n if Assigned(OnMinuteChanged) then\r\n OnMinuteChanged(Self, ATime);\r\nend;\r\n\r\nprocedure TTMSFNCCustomAnalogTimeSelector.DoSecondChanged(ATime: TTime);\r\nbegin\r\n if Assigned(OnSecondChanged) then\r\n OnSecondChanged(Self, ATime);\r\nend;\r\n\r\nprocedure TTMSFNCCustomAnalogTimeSelector.DoTimeChanged(ATime: TTime);\r\nbegin\r\n if Assigned(OnTimeChanged) then\r\n OnTimeChanged(Self, ATime);\r\nend;\r\n\r\nprocedure TTMSFNCCustomAnalogTimeSelector.Draw(AGraphics: TTMSFNCGraphics; ARectF: TRectF);\r\nbegin\r\n inherited;\r\n DrawWatchBackground(AGraphics, ARectF);\r\n DrawTickMarks(AGraphics, ARectF);\r\n DrawNumbers(AGraphics, ARectF);\r\n DrawAMPM(AGraphics, ARectF);\r\n DrawNeedles(AGraphics, ARectF);\r\nend;\r\n\r\nprocedure TTMSFNCCustomAnalogTimeSelector.DrawAMPM(AGraphics: TTMSFNCGraphics;\r\n ARectF: TRectF);\r\nvar\r\n s: string;\r\n r: TRectF;\r\n b, df: Boolean;\r\nbegin\r\n if not Appearance.ShowAMPM then\r\n Exit;\r\n\r\n if AM then\r\n s := 'AM'\r\n else\r\n s := 'PM';\r\n\r\n r := GetWatchRect(ARectF);\r\n r := GetAMPMRect(AGraphics, r);\r\n\r\n b := True;\r\n df := True;\r\n with Appearance do\r\n begin\r\n AGraphics.Fill.Assign(AMPMFill);\r\n AGraphics.Stroke.Assign(AMPMStroke);\r\n AGraphics.Font.Assign(AMPMFont);\r\n\r\n DoBeforeDrawAMPM(AGraphics, r, AM, b, df);\r\n if b then\r\n begin\r\n if df then\r\n begin\r\n AGraphics.DrawRectangle(r);\r\n AGraphics.DrawText(r, s, False, gtaCenter, gtaCenter);\r\n end;\r\n DoAfterDrawAMPM(AGraphics, r, AM);\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomAnalogTimeSelector.DrawWatchBackground(AGraphics: TTMSFNCGraphics;\r\n ARectF: TRectF);\r\nvar\r\n r: TRectF;\r\n b, df: Boolean;\r\nbegin\r\n {$IFNDEF FMXLIB}\r\n OffsetRectEx(ARectF, 0.5, 0.5);\r\n {$ENDIF}\r\n r := ARectF;\r\n AGraphics.Fill.Assign(Appearance.Fill);\r\n AGraphics.Stroke.Assign(Appearance.Stroke);\r\n\r\n b := True;\r\n df := True;\r\n DoBeforeDrawWatchBackground(AGraphics, r, Appearance.Shape, b, df);\r\n if b then\r\n begin\r\n if df then\r\n begin\r\n case Appearance.Shape of\r\n wsCircle:\r\n begin\r\n r := GetWatchRect(ARectF);\r\n AGraphics.DrawEllipse(r, gcrmNone);\r\n end;\r\n wsRect:\r\n begin\r\n AGraphics.DrawRectangle(r);\r\n end;\r\n wsRoundRect:\r\n begin\r\n AGraphics.DrawRoundRectangle(r);\r\n end;\r\n end;\r\n end;\r\n DoAfterDrawWatchBackground(AGraphics, r, Appearance.Shape);\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomAnalogTimeSelector.DrawNeedles(AGraphics: TTMSFNCGraphics;\r\n ARectF: TRectF);\r\nvar\r\n r: TRectF;\r\n cp, pf, pt, pm, pn: TPointF;\r\n rd, os, cr: Single;\r\n t: TTime;\r\n h, m, s, ms: Word;\r\n ptrPath: TTMSFNCGraphicsPath;\r\n b, df: Boolean;\r\nbegin\r\n r := GetWatchRect(ARectF);\r\n cp := GetCenterPoint(r);\r\n rd := GetRadius(r);\r\n \r\n if Settings.Auto then\r\n begin\r\n t := Now;\r\n t := t + (Settings.TimeOffset / (60 * 24));\r\n FTime := t;\r\n end\r\n else\r\n t := Self.Time;\r\n\r\n DecodeTime(t, h, m, s, ms);\r\n AM := h < 12;\r\n\r\n if Settings.Auto then\r\n begin\r\n if s <> FPrevSec then\r\n begin\r\n FPrevSec := s;\r\n DoSecondChanged(FTime);\r\n if (m <> FPrevMin) then\r\n begin\r\n FPrevMin := m;\r\n DoMinuteChanged(FTime);\r\n if (h <> FPrevHour) then\r\n begin\r\n FPrevHour := h;\r\n DoHourChanged(FTime);\r\n end;\r\n end;\r\n DoTimeChanged(FTime);\r\n end;\r\n end;\r\n\r\n with Appearance do\r\n begin\r\n case PointerStyle of\r\n psLine, psShortLine, psLineArrow:\r\n begin\r\n if PointerStyle = psShortLine then\r\n os := 0.0\r\n else\r\n os := 0.1;\r\n \r\n AGraphics.Stroke.Assign(HourPointerShadow);\r\n pf := PointF(Round(cp.X - 1 - (Sin((h * 30 + m / 12 * 6) * PI / 180)) * rd * os), cp.Y + 3 - (-Cos((h * 30 + m / 12 * 6) * PI / 180)) * rd * os);\r\n pt := PointF(Round((Sin((h * 30 + m / 12 * 6) * PI / 180)) * rd * 0.46 + cp.X -1), (-Cos((h * 30 + m / 12 * 6) * PI / 180)) * rd * 0.46 + cp.Y + 3);\r\n AGraphics.DrawLine(pf, pt, gcpmNone, gcpmNone);\r\n\r\n AGraphics.Stroke.Assign(MinutePointerShadow);\r\n pf := PointF(Round(cp.X - (Sin(m * 6 * PI / 180)) * rd * os), cp.Y + 3- (-Cos(m * 6 * PI / 180)) * rd * os);\r\n pt := PointF(Round((Sin(m * 6 * PI / 180)) * rd * 0.65 + cp.X), (-Cos(m * 6 * PI / 180)) * rd * 0.65 + cp.Y + 3);\r\n AGraphics.DrawLine(pf, pt, gcpmNone, gcpmNone);\r\n\r\n AGraphics.Stroke.Assign(HourPointer);\r\n pf := PointF(Round(cp.X - (Sin((h * 30 + m / 12 * 6) * PI / 180)) * rd * os), cp.Y - (-Cos((h * 30 + m / 12 * 6) * PI / 180)) * rd * os);\r\n pt := PointF(Round((Sin((h * 30 + m / 12 * 6) * PI / 180)) * rd * 0.5 + cp.X), (-Cos((h * 30 + m / 12 * 6) * PI / 180)) * rd * 0.5 + cp.Y);\r\n\r\n b := True;\r\n df := True;\r\n DoBeforeDrawHourPointer(AGraphics, cp, b, df);\r\n if b then\r\n begin\r\n if df then\r\n begin\r\n AGraphics.DrawLine(pf, pt);\r\n if PointerStyle = psLineArrow then\r\n begin\r\n pf := PointF((Sin(((h * 30 + m / 12 * 6) + 10) * PI / 180)) * rd * 0.4 + cp.X, (-Cos(((h * 30 + m / 12 * 6) + 10) * PI / 180)) * rd * 0.4 + cp.Y);\r\n pm := PointF((Sin(((h * 30 + m / 12 * 6) - 10) * PI / 180)) * rd * 0.4 + cp.X, (-Cos(((h * 30 + m / 12 * 6) - 10) * PI / 180)) * rd * 0.4 + cp.Y);\r\n ptrPath := TTMSFNCGraphicsPath.Create;\r\n try\r\n ptrPath.MoveTo(pf);\r\n ptrPath.LineTo(pt);\r\n ptrPath.LineTo(pm);\r\n AGraphics.Fill.Color := gcNull;\r\n AGraphics.DrawPath(ptrPath, pdmPolyline);\r\n finally\r\n ptrPath.Free;\r\n end;\r\n end;\r\n end;\r\n DoAfterDrawHourPointer(AGraphics, cp);\r\n end;\r\n\r\n AGraphics.Stroke.Assign(MinutePointer);\r\n pf := PointF(Round(cp.X - (Sin(m * 6 * PI / 180)) * rd * os), cp.Y - (-Cos(m * 6 * PI / 180)) * rd * os);\r\n pt := PointF(Round((Sin(m * 6 * PI / 180)) * rd * 0.7 + cp.X), (-Cos(m * 6 * PI / 180)) * rd * 0.7 + cp.Y);\r\n\r\n b := True;\r\n df := True;\r\n DoBeforeDrawMinutePointer(AGraphics, cp, b, df);\r\n if b then\r\n begin\r\n if df then\r\n begin\r\n AGraphics.DrawLine(pf, pt);\r\n if PointerStyle = psLineArrow then\r\n begin\r\n pf := PointF((Sin((m * 6 + 7) * PI / 180)) * rd * 0.6 + cp.X, (-Cos((m * 6 + 7) * PI / 180)) * rd * 0.6 + cp.Y);\r\n pm := PointF((Sin((m * 6 - 7) * PI / 180)) * rd * 0.6 + cp.X, (-Cos((m * 6 - 7) * PI / 180)) * rd * 0.6 + cp.Y);\r\n ptrPath := TTMSFNCGraphicsPath.Create;\r\n try\r\n ptrPath.MoveTo(pf);\r\n ptrPath.LineTo(pt);\r\n ptrPath.LineTo(pm);\r\n AGraphics.Fill.Color := gcNull;\r\n AGraphics.DrawPath(ptrPath, pdmPolyline);\r\n finally\r\n ptrPath.Free;\r\n end;\r\n end;\r\n end;\r\n DoAfterDrawMinutePointer(AGraphics, cp);\r\n end;\r\n end;\r\n psPointer:\r\n begin\r\n AGraphics.Fill.Color := HourPointerShadow.Color;\r\n AGraphics.Stroke.Assign(HourPointerShadow);\r\n AGraphics.Stroke.Width := 1;\r\n \r\n ptrPath := TTMSFNCGraphicsPath.Create;\r\n try\r\n pf := PointF(cp.X + 1 - (Sin((h * 30 + m / 12 * 6) * PI / 180)) * rd * 0.1, cp.Y + 3 - (-Cos((h * 30 + m / 12 * 6) * PI / 180)) * rd * 0.1);\r\n pm := PointF(cp.X + 1 - (Sin((h * 30 + m / 12 * 6 + 90) * PI / 180)) * rd * 0.05, cp.Y + 3 - (-Cos((h * 30 + m / 12 * 6 + 90) * PI / 180)) * rd * 0.05);\r\n pn := PointF((Sin((h * 30 + m / 12 * 6) * PI / 180)) * rd * 0.5 + cp.X + 1, (-Cos((h * 30 + m / 12 * 6) * PI / 180)) * rd * 0.5 + cp.Y + 3);\r\n pt := PointF(cp.X + 1 - (Sin((h * 30 + m / 12 * 6 - 90) * PI / 180)) * rd * 0.05, cp.Y + 3 - (-Cos((h * 30 + m / 12 * 6 - 90) * PI / 180)) * rd * 0.05);\r\n ptrPath.MoveTo(pf);\r\n ptrPath.LineTo(pm);\r\n ptrPath.LineTo(pn);\r\n ptrPath.LineTo(pt);\r\n ptrPath.ClosePath;\r\n AGraphics.DrawPath(ptrPath);\r\n finally\r\n ptrPath.Free;\r\n end;\r\n\r\n AGraphics.Fill.Color := MinutePointerShadow.Color;\r\n AGraphics.Stroke.Assign(MinutePointerShadow);\r\n AGraphics.Stroke.Width := 1;\r\n\r\n ptrPath := TTMSFNCGraphicsPath.Create;\r\n try\r\n pf := PointF(cp.X + 1 - (Sin(m * 6 * PI / 180)) * rd * 0.1, cp.Y + 3 - (-Cos(m * 6 * PI / 180)) * rd * 0.1);\r\n pm := PointF(cp.X + 1 - (Sin((m * 6 + 90) * PI / 180)) * rd * 0.05, cp.Y + 3 - (-Cos((m * 6 + 90) * PI / 180)) * rd * 0.05);\r\n pn := PointF((Sin(m * 6 * PI / 180)) * rd * 0.7 + cp.X + 1, (-Cos(m * 6 * PI / 180)) * rd * 0.7 + cp.Y + 3);\r\n pt := PointF(cp.X + 1 - (Sin((m * 6 - 90) * PI / 180)) * rd * 0.05, cp.Y + 3 - (-Cos((m * 6 - 90) * PI / 180)) * rd * 0.05);\r\n ptrPath.MoveTo(pf);\r\n ptrPath.LineTo(pm);\r\n ptrPath.LineTo(pn);\r\n ptrPath.LineTo(pt);\r\n ptrPath.ClosePath;\r\n AGraphics.DrawPath(ptrPath);\r\n finally\r\n ptrPath.Free;\r\n end;\r\n \r\n AGraphics.Fill.Color := HourPointer.Color;\r\n AGraphics.Fill.ColorTo := HourPointer.Color;\r\n AGraphics.Stroke.Assign(HourPointer);\r\n AGraphics.Stroke.Width := 1;\r\n\r\n b := True;\r\n df := True;\r\n ptrPath := TTMSFNCGraphicsPath.Create;\r\n try\r\n pf := PointF(cp.X - (Sin((h * 30 + m / 12 * 6) * PI / 180)) * rd * 0.1, cp.Y - (-Cos((h * 30 + m / 12 * 6) * PI / 180)) * rd * 0.1);\r\n pm := PointF(cp.X - (Sin((h * 30 + m / 12 * 6 + 90) * PI / 180)) * rd * 0.05, cp.Y - (-Cos((h * 30 + m / 12 * 6 + 90) * PI / 180)) * rd * 0.05);\r\n pn := PointF((Sin((h * 30 + m / 12 * 6) * PI / 180)) * rd * 0.5 + cp.X, (-Cos((h * 30 + m / 12 * 6) * PI / 180)) * rd * 0.5 + cp.Y);\r\n pt := PointF(cp.X - (Sin((h * 30 + m / 12 * 6 - 90) * PI / 180)) * rd * 0.05, cp.Y - (-Cos((h * 30 + m / 12 * 6 - 90) * PI / 180)) * rd * 0.05);\r\n ptrPath.MoveTo(pf);\r\n ptrPath.LineTo(pm);\r\n ptrPath.LineTo(pn);\r\n ptrPath.LineTo(pt);\r\n ptrPath.ClosePath;\r\n\r\n DoBeforeDrawHourPointer(AGraphics, cp, b, df);\r\n if b then\r\n begin\r\n if df then\r\n AGraphics.DrawPath(ptrPath);\r\n DoAfterDrawHourPointer(AGraphics, cp);\r\n end;\r\n finally\r\n ptrPath.Free;\r\n end;\r\n\r\n AGraphics.Fill.Color := MinutePointer.Color;\r\n AGraphics.Fill.ColorTo := MinutePointer.Color;\r\n AGraphics.Stroke.Assign(MinutePointer);\r\n AGraphics.Stroke.Width := 1;\r\n\r\n b := True;\r\n df := True;\r\n ptrPath := TTMSFNCGraphicsPath.Create;\r\n try\r\n pf := PointF(cp.X - (Sin(m * 6 * PI / 180)) * rd * 0.1, cp.Y - (-Cos(m * 6 * PI / 180)) * rd * 0.1);\r\n pm := PointF(cp.X - (Sin((m * 6 + 90) * PI / 180)) * rd * 0.05, cp.Y - (-Cos((m * 6 + 90) * PI / 180)) * rd * 0.05);\r\n pn := PointF((Sin(m * 6 * PI / 180)) * rd * 0.7 + cp.X, (-Cos(m * 6 * PI / 180)) * rd * 0.7 + cp.Y);\r\n pt := PointF(cp.X - (Sin((m * 6 - 90) * PI / 180)) * rd * 0.05, cp.Y - (-Cos((m * 6 - 90) * PI / 180)) * rd * 0.05);\r\n ptrPath.MoveTo(pf);\r\n ptrPath.LineTo(pm);\r\n ptrPath.LineTo(pn);\r\n ptrPath.LineTo(pt);\r\n ptrPath.ClosePath;\r\n\r\n DoBeforeDrawMinutePointer(AGraphics, cp, b, df);\r\n if b then\r\n begin\r\n if df then\r\n AGraphics.DrawPath(ptrPath);\r\n\r\n DoAfterDrawMinutePointer(AGraphics, cp);\r\n end;\r\n finally\r\n ptrPath.Free;\r\n end;\r\n end;\r\n end;\r\n\r\n b := True;\r\n df := True;\r\n if ShowSecondPointer then\r\n begin\r\n pf := PointF(cp.X - (Sin(s * 6 * PI / 180)) * rd * 0.2, cp.Y - (-Cos(s * 6 * PI / 180)) * rd * 0.2);\r\n pt := PointF((Sin(s * 6 * PI / 180)) * rd * 0.9 + cp.X, (-Cos(s * 6 * PI / 180)) * rd * 0.9 + cp.Y);\r\n AGraphics.Stroke.Assign(SecondPointer);\r\n\r\n DoBeforeDrawSecondPointer(AGraphics, cp, b, df);\r\n if b then\r\n begin\r\n if df then\r\n AGraphics.DrawLine(pf, pt, gcpmNone, gcpmNone);\r\n\r\n DoAfterDrawSecondPonter(AGraphics, cp);\r\n end;\r\n end;\r\n\r\n b := True;\r\n df := True;\r\n if (CenterPointSize > 0) then\r\n begin\r\n cr := CenterPointSize / 2;\r\n r := RectF(cp.X - cr, cp.Y - cr, cp.X + cr, cp.Y + cr);\r\n AGraphics.Fill.Assign(CenterPointFill);\r\n AGraphics.Stroke.Assign(CenterPointStroke);\r\n\r\n DoBeforeDrawCenterPoint(AGraphics, r, CenterPointSize, b, df);\r\n if b then\r\n begin\r\n if df then\r\n begin\r\n AGraphics.DrawEllipse(r, gcrmNone);\r\n\r\n InflateRectEx(r, CenterPointStroke.Width / 2, CenterPointStroke.Width / 2);\r\n AGraphics.Fill.Color := gcNull;\r\n AGraphics.Stroke.Color := CenterPointOuterColor;\r\n AGraphics.Stroke.Width := CenterPointStroke.Width * 0.8;\r\n\r\n AGraphics.DrawEllipse(r, gcrmNone);\r\n end;\r\n\r\n DoAfterDrawCenterPoint(AGraphics, r, CenterPointSize);\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomAnalogTimeSelector.DrawNumbers(AGraphics: TTMSFNCGraphics;\r\n ARectF: TRectF);\r\nvar\r\n r, r1: TRectF;\r\n ts: TSizeF;\r\n cp: TPointF;\r\n rd, rn, ang, X, Y, rd2: Single;\r\n I, h: Integer;\r\n s: string;\r\n b, df: Boolean;\r\nbegin\r\n if not Appearance.ShowNumbers then\r\n Exit;\r\n\r\n r := GetWatchRect(ARectF);\r\n cp := GetCenterPoint(r);\r\n rd := GetRadius(r) - (Appearance.Stroke.Width / 2);\r\n\r\n if (Appearance.HourMarkLength > 0) then\r\n rd2 := Appearance.HourMarkLength\r\n else\r\n rd2 := Round(rd - (rd * 0.9)) + 2;\r\n\r\n AGraphics.Font.Assign(Appearance.HourFont);\r\n\r\n b := True;\r\n df := True;\r\n with Appearance do\r\n begin\r\n rn := rd - (rd2 + 3) - rd2;\r\n for I := 1 to 12 do\r\n begin\r\n if (TickMarks = tmAll) or ((TickMarks = tmQuartHours) and ((I mod 3) = 0)) then\r\n begin\r\n ang := (PI / 3000) * ((I * 100) * 30 div 6);\r\n s := IntToStr(I);\r\n ts := AGraphics.CalculateTextSize(s, r);\r\n\r\n h := -1;\r\n if (i = 10) then\r\n begin\r\n h := h + Round(ts.cy * 0.2);\r\n end\r\n else if (i = 11) then\r\n begin\r\n h := h + Round(ts.cy * 0.15);\r\n end;\r\n\r\n X := CP.X + 1 + (rn - h + (rd2 / 2)) * Sin(ang);\r\n {$IFDEF FMXLIB}\r\n Y := CP.Y + 1 - (rn - h + (rd2 / 2)) * Cos(ang);\r\n {$ELSE}\r\n Y := CP.Y + 2 - (rn - h + (rd2 / 2)) * Cos(ang);\r\n {$ENDIF}\r\n r1 := RectF(X - (rd2 / 2), y - (rd2 / 2), X + (rd2 / 2), Y + (rd2 / 2));\r\n X := r1.Right - ((r1.Right - r1.Left) / 2) - (ts.cx / 2) - 1;\r\n Y := r1.Bottom - ((r1.Bottom - r1.Top) / 2) - (ts.cy / 2) - 1;\r\n\r\n DoBeforeDrawNumber(AGraphics, r1, I, b, df);\r\n if b then\r\n begin\r\n if df then\r\n AGraphics.DrawText(PointF(X, Y), s);\r\n\r\n DoAfterDrawNumber(AGraphics, r1, I);\r\n end;\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomAnalogTimeSelector.DrawTickMarks(AGraphics: TTMSFNCGraphics;\r\n ARectF: TRectF);\r\nvar\r\n r: TRectF;\r\n cp, pf, pt, qf, qt: TPointF;\r\n rd, ml: Double;\r\n I: Integer;\r\n b, df: Boolean;\r\nbegin\r\n r := GetWatchRect(ARectF);\r\n cp := GetCenterPoint(r);\r\n rd := GetRadius(r) - (Appearance.Stroke.Width / 2);\r\n\r\n b := True;\r\n df := True;\r\n with Appearance do\r\n begin\r\n ml := rd * 0.9;\r\n if (HourMarkLength > 0) then\r\n ml := rd - HourMarkLength;\r\n\r\n AGraphics.Stroke.Assign(HourMark);\r\n for I := 0 to 3 do\r\n begin\r\n if (HourMarkStyle = hmsQuartDblLine) then\r\n begin\r\n case I of\r\n 0, 2:\r\n begin\r\n qf := PointF(Cos(i * 90 * PI / 180) * ml + CP.X, Sin(i * 90 * PI / 180) * ml + CP.Y - 2);\r\n qt := PointF(Cos(i * 90 * PI / 180) * rd + CP.X, Sin(i * 90 * PI / 180) * rd + CP.Y - 2);\r\n pf := PointF(Cos(i * 90 * PI / 180) * ml + CP.X, Sin(i * 90 * PI / 180) * ml + CP.Y + 2);\r\n pt := PointF(Cos(i * 90 * PI / 180) * rd + CP.X, Sin(i * 90 * PI / 180) * rd + CP.Y + 2);\r\n\r\n DoBeforeDrawTickMark(AGraphics, r, TickMarks, HourMarkLength, MinuteMarkLength, b, df);\r\n if b then\r\n begin \r\n if df then\r\n begin\r\n AGraphics.DrawLine(qf, qt, gcpmNone, gcpmNone);\r\n AGraphics.DrawLine(pf, pt, gcpmNone, gcpmNone);\r\n end;\r\n DoAfterDrawTickMark(AGraphics, r, TickMarks, HourMarkLength, MinuteMarkLength);\r\n end;\r\n end;\r\n 1, 3:\r\n begin \r\n qf := PointF(Cos(i * 90 * PI / 180) * ml + CP.X - 2, Sin(i * 90 * PI / 180) * ml + CP.Y);\r\n qt := PointF(Cos(i * 90 * PI / 180) * rd + CP.X - 2, Sin(i * 90 * PI / 180) * rd + CP.Y);\r\n pf := PointF(Cos(i * 90 * PI / 180) * ml + CP.X + 2, Sin(i * 90 * PI / 180) * ml + CP.Y);\r\n pt := PointF(Cos(i * 90 * PI / 180) * rd + CP.X + 2, Sin(i * 90 * PI / 180) * rd + CP.Y);\r\n\r\n DoBeforeDrawTickMark(AGraphics, r, TickMarks, HourMarkLength, MinuteMarkLength, b, df);\r\n if b then\r\n begin \r\n if df then\r\n begin\r\n AGraphics.DrawLine(qf, qt, gcpmNone, gcpmNone);\r\n AGraphics.DrawLine(pf, pt, gcpmNone, gcpmNone);\r\n end;\r\n DoAfterDrawTickMark(AGraphics, r, TickMarks, HourMarkLength, MinuteMarkLength);\r\n end;\r\n end;\r\n end;\r\n end\r\n else\r\n begin\r\n pf := PointF(Cos(I * 90 * PI / 180) * ml + cp.X, Sin(I * 90 * PI / 180) * ml + cp.Y);\r\n pt := PointF(Cos(I * 90 * PI / 180) * rd + cp.X, Sin(I * 90 * PI / 180) * rd + cp.Y);\r\n\r\n DoBeforeDrawTickMark(AGraphics, r, TickMarks, HourMarkLength, MinuteMarkLength, b, df);\r\n if b then\r\n begin\r\n if df then\r\n AGraphics.DrawLine(pf, pt, gcpmNone, gcpmNone);\r\n\r\n DoAfterDrawTickMark(AGraphics, r, TickMarks, HourMarkLength, MinuteMarkLength);\r\n end;\r\n end;\r\n end;\r\n\r\n b := True;\r\n df := True;\r\n if (TickMarks in [tmAll, tmHours]) then\r\n begin\r\n AGraphics.Stroke.Assign(HourMark);\r\n for I := 0 to 11 do\r\n begin\r\n if ((I mod 3) <> 0) then\r\n begin\r\n pf := PointF(Cos(I * 30 * PI / 180) * ml + cp.X, Sin(I * 30 * PI / 180) * ml + cp.Y);\r\n pt := PointF(Cos(I * 30 * PI / 180) * rd + cp.X, Sin(I * 30 * PI / 180) * rd + cp.Y);\r\n\r\n DoBeforeDrawTickMark(AGraphics, r, TickMarks, HourMarkLength, MinuteMarkLength, b, df);\r\n if b then\r\n begin\r\n if df then\r\n AGraphics.DrawLine(pf, pt, gcpmNone, gcpmNone);\r\n\r\n DoAfterDrawTickMark(AGraphics, r, TickMarks, HourMarkLength, MinuteMarkLength);\r\n end;\r\n end;\r\n end;\r\n end;\r\n\r\n ml := rd * 0.95;\r\n if (MinuteMarkLength > 0) then\r\n ml := rd - MinuteMarkLength;\r\n\r\n b := True;\r\n df := True;\r\n if (TickMarks = tmAll) then\r\n begin\r\n for I := 0 to 59 do\r\n begin\r\n if ((I mod 5) <> 0) then\r\n begin\r\n AGraphics.Stroke.Assign(MinuteMark);\r\n pf := PointF(Cos(I * 6 * PI / 180) * ml + cp.X, Sin(I * 6 * PI / 180) * ml + cp.Y);\r\n pt := PointF(Cos(I * 6 * PI / 180) * rd + cp.X, Sin(I * 6 * PI / 180) * rd + cp.Y);\r\n\r\n DoBeforeDrawTickMark(AGraphics, r, TickMarks, HourMarkLength, MinuteMarkLength, b, df);\r\n if b then\r\n begin\r\n if df then\r\n AGraphics.DrawLine(pf, pt, gcpmNone, gcpmNone);\r\n\r\n DoAfterDrawTickMark(AGraphics, r, TickMarks, HourMarkLength, MinuteMarkLength);\r\n end;\r\n end;\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCCustomAnalogTimeSelector.GetAMPMRect(AGraphics: TTMSFNCGraphics; ARectF: TRectF): TRectF;\r\nvar\r\n r: TRectF;\r\n cp: TPointF;\r\n rd: Single;\r\nbegin\r\n r := RectF(-1, -1, -1, -1);\r\n Result := r;\r\n if not Appearance.ShowAMPM then\r\n Exit;\r\n\r\n AGraphics.Font.AssignSource(Appearance.AMPMFont);\r\n r := RectF(0, 0, 200, 200);\r\n r := AGraphics.CalculateText('AM', r);\r\n cp := GetCenterPoint(ARectF);\r\n rd := GetRadius(ARectF);\r\n R.Right := r.Right + 4 * 2;\r\n R.Bottom := r.Bottom + 0 * 2;\r\n Result.Left := cp.X - (r.Right / 2);\r\n Result.Top := cp.Y + Round((rd - r.Bottom) / 3);\r\n Result.Right := Result.Left + r.Right;\r\n Result.Bottom := Result.Top + r.Bottom;\r\n FAMRect := Result;\r\nend;\r\n\r\nfunction TTMSFNCCustomAnalogTimeSelector.GetCenterPoint(ARectF: TRectF): TPointF;\r\nbegin\r\n Result := PointF(ARectF.Left + (ARectF.Right - ARectF.Left) / 2, ARectF.Top + (ARectF.Bottom - ARectF.Top) / 2);\r\nend;\r\n\r\nfunction TTMSFNCCustomAnalogTimeSelector.GetRadius(ARectF: TRectF): Single;\r\nbegin\r\n Result := (ARectF.Right - ARectF.Left) / 2;\r\nend;\r\n\r\nfunction TTMSFNCCustomAnalogTimeSelector.GetVersion: string;\r\nbegin\r\n Result := GetVersionNumber(MAJ_VER, MIN_VER, REL_VER, BLD_VER);\r\nend;\r\n\r\nfunction TTMSFNCCustomAnalogTimeSelector.GetWatchRect(ARectF: TRectF): TRectF;\r\nvar\r\n r: TRectF;\r\n h, w, s, offset: Single;\r\nbegin\r\n r := ARectF;\r\n h := r.Bottom - r.Top;\r\n w := r.Right - r.Left;\r\n offset := 20;\r\n s := h;\r\n if (s > h) then\r\n s := h;\r\n\r\n if (s > w) then\r\n s := w;\r\n\r\n s := s - offset;\r\n Result := RectF(r.Left + ((w - s) / 2), r.Top + ((h - s) / 2), r.Left + ((w - s) / 2) + s, r.Top + ((h - s) / 2) + s);\r\nend;\r\n\r\nprocedure TTMSFNCCustomAnalogTimeSelector.HandleKeyDown(var Key: Word; Shift: TShiftState);\r\nvar\r\n h, m, s, ms: Word;\r\nbegin\r\n inherited;\r\n if Settings.ReadOnly then\r\n Exit;\r\n\r\n if ([ssShift] = Shift) then\r\n begin\r\n case Key of\r\n KEY_UP:\r\n begin\r\n Time := IncHour(FTime, 1);\r\n DoHourChanged(FTime);\r\n DoTimeChanged(FTime);\r\n end;\r\n KEY_DOWN:\r\n begin\r\n Time:= IncHour(FTime, -1);\r\n DoHourChanged(FTime);\r\n DoTimeChanged(FTime);\r\n end;\r\n end;\r\n Exit;\r\n end;\r\n\r\n case Key of\r\n KEY_UP, KEY_RIGHT:\r\n begin\r\n Time := IncMinute(FTime, 1);\r\n DoMinuteChanged(FTime);\r\n DoTimeChanged(FTime);\r\n end;\r\n KEY_DOWN, KEY_LEFT:\r\n begin\r\n Time := IncMinute(FTime, -1);\r\n DoMinuteChanged(FTime);\r\n DoTimeChanged(FTime);\r\n end;\r\n KEY_HOME:\r\n begin\r\n Time := Now;\r\n DecodeTime(FTime, h, m, s, ms);\r\n if FPrevSec <> s then\r\n DoSecondChanged(Time);\r\n\r\n if FPrevMin <> m then\r\n DoMinuteChanged(Time);\r\n\r\n if FPrevHour <> h then\r\n DoHourChanged(Time);\r\n\r\n DoTimeChanged(FTime);\r\n end;\r\n KEY_END:\r\n begin\r\n Time := EncodeTime(12, 0, 0, 0);\r\n if FPrevSec <> 0 then\r\n DoSecondChanged(FTime);\r\n\r\n if FPrevMin <> 0 then\r\n DoMinuteChanged(FTime);\r\n\r\n if FPrevHour <> 12 then\r\n DoHourChanged(FTime);\r\n\r\n DoTimeChanged(FTime);\r\n end;\r\n KEY_NEXT:\r\n begin\r\n Time := IncHour(FTime, 1);\r\n DoHourChanged(FTime);\r\n DoTimeChanged(FTime);\r\n end;\r\n KEY_PRIOR:\r\n begin\r\n Time := IncHour(FTime, -1);\r\n DoHourChanged(FTime);\r\n DoTimeChanged(FTime);\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomAnalogTimeSelector.HandleMouseDown(Button: TTMSFNCMouseButton;\r\n Shift: TShiftState; X, Y: Single);\r\nvar\r\n rect: TRectF;\r\n cp, p: TPointF;\r\n r: Single;\r\nbegin\r\n inherited;\r\n if CanFocus then\r\n SetFocus;\r\n\r\n rect := GetWatchRect(GetControlRect);\r\n cp := GetCenterPoint(rect);\r\n r := GetRadius(rect);\r\n p := PointF(X, Y);\r\n\r\n if not Settings.Auto or not Settings.ReadOnly then\r\n begin\r\n if PtInCircle(p, cp, r) and not PtInRectEx(FAMRect, p) then\r\n FMouseHourDown := True\r\n else if not PtInRectEx(FAMRect, p) then\r\n FMouseMinuteDown := True;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomAnalogTimeSelector.HandleMouseMove(Shift: TShiftState; X, Y: Single);\r\nvar\r\n h, m, s, ms: Word;\r\n i: Integer;\r\nbegin\r\n inherited;\r\n if not Settings.Auto and not Settings.ReadOnly then\r\n begin\r\n if PtInRectEx(FAMREct, PointF(X, Y)) and Appearance.ShowAMPM and not FMouseHourDown and not FMouseMinuteDown then\r\n Cursor := crHandPoint\r\n else\r\n Cursor := crDefault;\r\n\r\n if FollowMouse and FMouseHourDown then\r\n begin\r\n DecodeTime(Time, h, m, s, ms);\r\n i := XYToHour(X, Y);\r\n Time := EncodeTime(i, m, s, ms);\r\n DoHourChanged(FTime);\r\n DoTimeChanged(FTime);\r\n end\r\n else if FollowMouse and FMouseMinuteDown then\r\n begin\r\n DecodeTime(Time, h, m, s, ms);\r\n i := XYToMinute(X, Y);\r\n Time := EncodeTime(h, i, s, ms);\r\n DoMinuteChanged(FTime);\r\n DoTimeChanged(FTime);\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomAnalogTimeSelector.HandleMouseUp(Button: TTMSFNCMouseButton;\r\n Shift: TShiftState; X, Y: Single);\r\nvar\r\n rect: TRectF;\r\n cp, p: TPointF;\r\n i: Integer;\r\n r: Single;\r\n h, m, s, ms: Word;\r\nbegin\r\n inherited;\r\n FMouseHourDown := False;\r\n FMouseMinuteDown := False;\r\n\r\n if Settings.ReadOnly then\r\n Exit;\r\n\r\n if not Settings.Auto then\r\n begin\r\n rect := GetWatchRect(GetControlRect);\r\n cp := GetCenterPoint(rect);\r\n r := GetRadius(rect);\r\n p := PointF(X, Y);\r\n DecodeTime(Time, h, m, s, ms);\r\n\r\n if PtInCircle(p, cp, r) then\r\n begin\r\n if PtInRectEx(FAMRect, p) then\r\n begin\r\n if (h < 12) then\r\n Time := IncHour(FTime, 12)\r\n else\r\n Time := IncHour(FTime, -12);\r\n\r\n DoHourChanged(FTime);\r\n DoTimeChanged(FTime);\r\n end\r\n else\r\n begin\r\n i := XYToHour(X, Y);\r\n Time := EncodeTime(i, m, s, ms);\r\n DoHourChanged(FTime);\r\n DoTimeChanged(FTime);\r\n end;\r\n end\r\n else\r\n begin\r\n i := XYToMinute(X, Y);\r\n Time := EncodeTime(h, i, s, ms);\r\n DoMinuteChanged(FTime);\r\n DoTimeChanged(FTime);\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomAnalogTimeSelector.Initialize;\r\nbegin\r\n FMouseHourDown := False;\r\n FMouseMinuteDown := False;\r\nend;\r\n\r\nprocedure TTMSFNCCustomAnalogTimeSelector.OnWatchTimer(Sender: TObject);\r\nbegin\r\n Invalidate;\r\nend;\r\n\r\nfunction TTMSFNCCustomAnalogTimeSelector.PtInCircle(APointF, ACPoint: TPointF;\r\n ARadius: Single): Boolean;\r\nbegin\r\n Result := (Sqr(APointF.X - ACPoint.X) + Sqr(APointF.Y - ACPoint.Y)) <= Sqr(ARadius);\r\nend;\r\n\r\nprocedure TTMSFNCCustomAnalogTimeSelector.ResetToDefaultStyle;\r\nbegin\r\n inherited;\r\n Appearance.Fill.Kind := gfkSolid;\r\n Appearance.Fill.Color := gcWhite;\r\n Appearance.AMPMFill.Kind := gfkSolid;\r\n Appearance.AMPMFill.Color := gcWhite;\r\n Appearance.SecondPointer.Kind := gskSolid;\r\n Appearance.SecondPointer.Color := gcRed;\r\n Appearance.Stroke.Kind := gskSolid;\r\n Appearance.Stroke.Color := gcBlack;\r\n Appearance.HourPointer.Kind := gskSolid;\r\n Appearance.HourPointer.Color := gcBlack;\r\n Appearance.MinutePointer.Kind := gskSolid;\r\n Appearance.MinutePointer.Color := gcBlack;\r\n Appearance.CenterPointFill.Kind := gfkSolid;\r\n Appearance.CenterPointFill.Color := gcBlack;\r\n Appearance.CenterPointStroke.Kind := gskSolid;\r\n Appearance.CenterPointStroke.Color := gcBlack;\r\n Appearance.HourFont.Color := gcBlack;\r\n Appearance.HourMark.Kind := gskSolid;\r\n Appearance.HourMark.Color := gcBlack;\r\n Appearance.MinuteMark.Kind := gskSolid;\r\n Appearance.MinuteMark.Color := gcBlack;\r\n Appearance.AMPMFont.Color := gcBlack;\r\n Appearance.AMPMStroke.Kind := gskSolid;\r\n Appearance.AMPMStroke.Color := gcBlack;\r\n Appearance.HourPointerShadow.Color := gcMedGray;\r\n Appearance.MinutePointerShadow.Color := gcMedGray;\r\nend;\r\n\r\nprocedure TTMSFNCCustomAnalogTimeSelector.SetAM(const Value: Boolean);\r\nbegin\r\n if FAM <> Value then\r\n begin\r\n FAM := Value;\r\n Invalidate;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomAnalogTimeSelector.SetAppearance(const Value: TTMSFNCAnalogTimeSelectorAppearance);\r\nbegin\r\n FAppearance.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCCustomAnalogTimeSelector.SetFollowMouse(const Value: Boolean);\r\nbegin\r\n if FFollowMouse <> Value then\r\n FFollowMouse := Value;\r\nend;\r\n\r\nprocedure TTMSFNCCustomAnalogTimeSelector.SetFonts(ASetType: TTMSFNCAppearanceGlobalFontType);\r\nbegin\r\n BeginUpdate;\r\n\r\n GlobalFont.ApplyChange(Appearance.HourFont, ASetType);\r\n GlobalFont.ApplyChange(Appearance.AMPMFont, ASetType);\r\n\r\n EndUpdate;\r\nend;\r\n\r\nprocedure TTMSFNCCustomAnalogTimeSelector.SetGlobalFont(const Value: TTMSFNCAppearanceGlobalFont);\r\nbegin\r\n FGlobalFont.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCCustomAnalogTimeSelector.SetSettings(const Value: TTMSFNCAnalogTimeSelectorSettings);\r\nbegin\r\n FSettings.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCCustomAnalogTimeSelector.SetStyle(const Value: TTMSFNCAnalogTimeSelectorStyle);\r\nbegin\r\n if FStyle <> Value then\r\n begin\r\n FStyle := Value;\r\n case FStyle of\r\n wsClassic:\r\n begin\r\n with Appearance do\r\n begin\r\n InitializeDefault;\r\n AMPMFont.Name := 'MS Sans Serif';\r\n AMPMFont.Style := [];\r\n AMPMFont.Color := gcBlack;\r\n HourFont.Name := 'Comic Sans MS';\r\n HourFont.Size := {$IFDEF FMXLIB} 14 {$ELSE} 10 {$ENDIF};\r\n HourFont.Style := [TFontStyle.fsBold];\r\n HourFont.Color := gcBlack;\r\n HourMarkLength := 8;\r\n HourPointer.Color := gcBlack;\r\n HourPointer.Width := 5;\r\n HourPointerShadow.Color := gcMedGray;\r\n MinutePointerShadow.Color := gcMedGray;\r\n MinuteMarkLength := 4;\r\n ShowAMPM := True;\r\n ShowNumbers := True;\r\n ShowSecondPointer := True;\r\n end;\r\n end;\r\n wsFluorescent:\r\n begin\r\n with Appearance do\r\n begin\r\n InitializeDefault;\r\n AMPMFont.Color := gcBlack;\r\n AMPMFont.Size := {$IFDEF FMXLIB} 14 {$ELSE} 10 {$ENDIF};\r\n AMPMFont.Name := 'MS Sans Serif';\r\n AMPMFont.Style := [];\r\n Stroke.Color := {$IFDEF FMXLIB} $FF3E3EFF {$ELSE} $00FF3E3E {$ENDIF};\r\n Fill.Color := gcBlack;\r\n Fill.ColorTo := gcBlack;\r\n CenterPointFill.Color := {$IFDEF FMXLIB} $FF3E3EFF {$ELSE} $00FF3E3E {$ENDIF};\r\n CenterPointStroke.Color := gcBlack;\r\n CenterPointSize := 20;\r\n CenterPointStroke.Width := 4;\r\n HourFont.Color := gcBlack;\r\n HourFont.Size := {$IFDEF FMXLIB} 12 {$ELSE} 8 {$ENDIF};\r\n HourFont.Name := 'MS Sans Serif';\r\n HourFont.Style := [];\r\n HourMark.Color := {$IFDEF FMXLIB} $FF3E3EFF {$ELSE} $00FF3E3E {$ENDIF};\r\n HourMarkLength := 10;\r\n HourPointer.Color := {$IFDEF FMXLIB} $FF3E3EFF {$ELSE} $00FF3E3E {$ENDIF};\r\n HourPointer.Width := 2;\r\n HourPointerShadow.Color := gcNull;\r\n MinuteMark.Color := {$IFDEF FMXLIB} $FF3E3EFF {$ELSE} $00FF3E3E {$ENDIF};\r\n MinutePointer.Color := {$IFDEF FMXLIB} $FF3E3EFF {$ELSE} $00FF3E3E {$ENDIF};\r\n MinutePointer.Width := 2;\r\n MinutePointerShadow.Color := gcNull;\r\n Shape := wsRoundRect;\r\n HourMark.Width := 2;\r\n HourMarkStyle := hmsQuartDblLine;\r\n TickMarks := tmHours;\r\n ShowAMPM := False;\r\n ShowNumbers := False;\r\n ShowSecondPointer := True;\r\n end;\r\n end;\r\n wsEmerald:\r\n begin\r\n with Appearance do\r\n begin\r\n InitializeDefault;\r\n AMPMFont.Color := {$IFDEF FMXLIB} $FFA00000 {$ELSE} $00A00000 {$ENDIF};\r\n AMPMFont.Name := 'MS Sans Serif';\r\n AMPMFont.Style := [];\r\n Stroke.Color := {$IFDEF FMXLIB} $FF3AE800 {$ELSE} $003AE800 {$ENDIF};\r\n Fill.Color := {$IFDEF FMXLIB} $FF3AE800 {$ELSE} $003AE800 {$ENDIF};\r\n Fill.ColorTo := gcBlack;\r\n Fill.Kind := gfkGradient;\r\n Fill.Orientation := gfoVertical;\r\n CenterPointStroke.Color := {$IFDEF FMXLIB} $FF40FF00 {$ELSE} $0040FF00 {$ENDIF};\r\n CenterPointStroke.Width := 3;\r\n CenterPointFill.Color := {$IFDEF FMXLIB} $FF38E100 {$ELSE} $0038E100 {$ENDIF};\r\n CenterPointOuterColor := gcBlack;\r\n CenterPointSize := 16;\r\n HourFont.Color := gcBlack;\r\n HourFont.Name := 'MS Sans Serif';\r\n HourFont.Style := [];\r\n HourPointer.Color := {$IFDEF FMXLIB} $FF40FF00 {$ELSE} $0040FF00 {$ENDIF};\r\n HourPointer.Color := {$IFDEF FMXLIB} $FF40FF00 {$ELSE} $0040FF00 {$ENDIF};\r\n HourPointerShadow.Color := gcDarkgreen;\r\n HourPointer.Width := 5;\r\n MinutePointer.Color := {$IFDEF FMXLIB} $FF40FF00 {$ELSE} $0040FF00 {$ENDIF};\r\n MinutePointerShadow.Color := gcDarkgreen;\r\n Shape := wsRect;\r\n PointerStyle := psPointer;\r\n AMPMFill.Color := gcNull;\r\n HourFont.Color := Appearance.Fill.Color;\r\n HourMarkStyle := hmsQuartDblLine;\r\n HourMark.Color := Appearance.Fill.Color;\r\n SecondPointer.Color := gcYellow;\r\n TickMarks := tmHours;\r\n ShowNumbers := False;\r\n ShowAMPM := False;\r\n ShowSecondPointer := True;\r\n end;\r\n end;\r\n wsTower:\r\n begin\r\n with Appearance do\r\n begin\r\n InitializeDefault;\r\n AMPMFont.Name := 'MS Sans Serif';\r\n AMPMFont.Style := [];\r\n AMPMFont.Color := gcBlack;\r\n Stroke.Width := 1;\r\n Fill.Color := {$IFDEF FMXLIB} $FFFEF0B1 {$ELSE} $00B1F0FE {$ENDIF};\r\n Fill.ColorTo := {$IFDEF FMXLIB} $FFE8CC5B {$ELSE} $005BCCE8 {$ENDIF};\r\n Fill.Kind := gfkGradient;\r\n Fill.Orientation := gfoVertical;\r\n CenterPointFill.Color := {$IFDEF FMXLIB} $FFD52B00 {$ELSE} $00002BD5 {$ENDIF};\r\n CenterPointSize := 6;\r\n CenterPointStroke.Color := {$IFDEF FMXLIB} $FFD52B00 {$ELSE} $00002BD5 {$ENDIF};\r\n HourFont.Color := gcBlack;\r\n HourFont.Name := 'Century';\r\n HourFont.Style := [TFontStyle.fsBold];\r\n HourPointer.Color := gcBlack;\r\n HourPointerShadow.Color := gcSaddlebrown;\r\n HourPointer.Width := 5;\r\n MinutePointerShadow.Color := gcSaddlebrown;\r\n SecondPointer.Color := {$IFDEF FMXLIB} $FFD52B00 {$ELSE} $00002BD5 {$ENDIF};\r\n Shape := wsRect;\r\n PointerStyle := psPointer;\r\n AMPMFill.Color := Appearance.Fill.Color;\r\n ShowNumbers := False;\r\n TickMarks := tmHours;\r\n ShowSecondPointer := True;\r\n end;\r\n end;\r\n wsFuchsia:\r\n begin\r\n with Appearance do\r\n begin\r\n InitializeDefault;\r\n AMPMFont.Color := gcBlack;\r\n AMPMFont.Size := {$IFDEF FMXLIB} 14 {$ELSE} 10 {$ENDIF};\r\n AMPMFont.Name := 'MS Sans Serif';\r\n AMPMFont.Style := [];\r\n Stroke.Color := {$IFDEF FMXLIB} $FFFFD0FF {$ELSE} $00FFD0FF {$ENDIF};\r\n Fill.Color := gcBlack;\r\n Fill.ColorTo := gcBlack;\r\n CenterPointStroke.Color := {$IFDEF FMXLIB} $FFDD68DD {$ELSE} $00DD68DD {$ENDIF};\r\n CenterPointStroke.Width := 4;\r\n CenterPointSize := 18;\r\n CenterPointOuterColor := gcBlack;\r\n HourFont.Color := gcBlack;\r\n HourFont.Size := {$IFDEF FMXLIB} 12 {$ELSE} 8 {$ENDIF};\r\n HourFont.Name := 'MS Sans Serif';\r\n HourFont.Style := [];\r\n HourMark.Color := {$IFDEF FMXLIB} $FFFFD0FF {$ELSE} $00FFD0FF {$ENDIF};\r\n HourMarkLength := 10;\r\n HourPointer.Color := {$IFDEF FMXLIB} $FFFFD0FF {$ELSE} $00FFD0FF {$ENDIF};\r\n HourPointerShadow.Color := gcNull;\r\n HourPointer.Width := 2;\r\n MinuteMark.Color := {$IFDEF FMXLIB} $FFFFD0FF {$ELSE} $00FFD0FF {$ENDIF};\r\n MinutePointer.Color := {$IFDEF FMXLIB} $FFFFD0FF {$ELSE} $00FFD0FF {$ENDIF};\r\n MinutePointerShadow.Color := gcNull;\r\n MinutePointer.Width := 2;\r\n Shape := wsRect;\r\n HourMark.Width := 2;\r\n HourMarkStyle := hmsQuartDblLine;\r\n SecondPointer.Color := {$IFDEF FMXLIB} $FFDD68DD {$ELSE} $00DD68DD {$ENDIF};\r\n TickMarks := tmQuartHours;\r\n ShowAMPM := False;\r\n ShowNumbers := False;\r\n ShowSecondPointer := True;\r\n end;\r\n end;\r\n wsBlack:\r\n begin\r\n with Appearance do\r\n begin\r\n InitializeDefault;\r\n AMPMFont.Name := 'MS Sans Serif';\r\n AMPMFont.Style := [];\r\n Fill.Color := {$IFDEF FMXLIB} $FF202020 {$ELSE} $00202020 {$ENDIF};\r\n Fill.ColorTo := gcNull;\r\n Stroke.Color := gcBlack;\r\n CenterPointStroke.Color := gcWhite;\r\n CenterPointFill.Color := gcWhite;\r\n HourMark.Color := {$IFDEF FMXLIB} $FF585858 {$ELSE} $00585858 {$ENDIF};\r\n HourFont.Color := gcWhite;\r\n HourFont.Name := 'Century Gothic';\r\n HourFont.Size := {$IFDEF FMXLIB} 15 {$ELSE} 11 {$ENDIF};\r\n HourPointer.Color := gcWhite;\r\n HourPointerShadow.Color := gcNull;\r\n HourPointer.Width := 5;\r\n MinuteMark.Color := {$IFDEF FMXLIB} $FF585858 {$ELSE} $00585858 {$ENDIF};\r\n MinutePointer.Color := gcWhite;\r\n MinutePointerShadow.Color := gcNull;\r\n MinuteMarkLength := 4;\r\n ShowAMPM := False;\r\n ShowNumbers := True;\r\n ShowSecondPointer := True;\r\n end;\r\n end;\r\n wsBlackWhite:\r\n begin\r\n with Appearance do\r\n begin\r\n InitializeDefault;\r\n Fill.Color := gcWhite;\r\n Fill.ColorTo := gcNull;\r\n Stroke.Color := gcBlack;\r\n Stroke.Width := 8;\r\n CenterPointStroke.Color := gcBlack;\r\n CenterPointFill.Color := gcBlack;\r\n CenterPointSize := 8;\r\n HourMark.Color := {$IFDEF FMXLIB} $FF585858 {$ELSE} $00585858 {$ENDIF};\r\n HourFont.Color := gcBlack;\r\n HourFont.Name := 'Century Gothic';\r\n HourFont.Size := {$IFDEF FMXLIB} 18 {$ELSE} 14 {$ENDIF};\r\n HourFont.Style := [TFontStyle.fsBold];\r\n HourPointer.Color := gcBlack;\r\n HourPointerShadow.Color := gcMedGray;\r\n HourPointer.Width := 5;\r\n MinutePointer.Color := gcBlack;\r\n MinutePointerShadow.Color := gcMedGray;\r\n MinuteMarkLength := 4;\r\n SecondPointer.Color := gcMaroon;\r\n PointerStyle := psPointer;\r\n TickMarks := tmQuartHours;\r\n ShowAMPM := False;\r\n ShowNumbers := True;\r\n ShowSecondPointer := True;\r\n end;\r\n end;\r\n wsSuperNova:\r\n begin\r\n with Appearance do\r\n begin\r\n InitializeDefault;\r\n Fill.ColorTo := {$IFDEF FMXLIB} $FFD1D3D3 {$ELSE} $00D1D3D3 {$ENDIF};\r\n Fill.Kind := gfkGradient;\r\n Fill.Orientation := gfoVertical;\r\n Stroke.Color := Fill.Color;\r\n Stroke.Width := 4;\r\n CenterPointStroke.Color := gcBlack;\r\n CenterPointSize := 10;\r\n HourMarkLength := Round(Min(Self.Height, Self.Width) / 4.5);\r\n HourPointer.Color := gcBlack;\r\n HourPointerShadow.Color := gcMedGray;\r\n MinuteMark.Color := gcGray;\r\n MinuteMarkLength := Min(Self.Height, Self.Width) / 3;\r\n MinutePointer.Color := gcBlack; \r\n ShowAMPM := False;\r\n ShowNumbers := False;\r\n ShowSecondPointer := True;\r\n end;\r\n end;\r\n wsSports:\r\n begin\r\n with Appearance do\r\n begin\r\n InitializeDefault;\r\n Fill.Color := gcBlack;\r\n Stroke.Color := gcBlack;\r\n Stroke.Width := 1;\r\n CenterPointStroke.Color := gcBlue;\r\n CenterPointOuterColor := gcBlack;\r\n CenterPointFill.Color := {$IFDEF FMXLIB} $FF191919 {$ELSE} $00191919 {$ENDIF};\r\n CenterPointStroke.Width := 8;\r\n CenterPointSize := Round(Min(Self.Height, Self.Width) / 4);\r\n HourMark.Color := {$IFDEF FMXLIB} $FFABB0B1 {$ELSE} $00ABB0B1 {$ENDIF};\r\n HourFont.Color := {$IFDEF FMXLIB} $FF797979 {$ELSE} $00797979 {$ENDIF};\r\n HourFont.Name := 'Times New Roman';\r\n HourFont.Size := {$IFDEF FMXLIB} 13 {$ELSE} 9 {$ENDIF};\r\n HourPointer.Color := gcRed;\r\n HourPointerShadow.Color := gcNull;\r\n HourPointer.Width := 2;\r\n MinuteMark.Color := gcGray;\r\n MinutePointer.Color := gcYellow;\r\n MinutePointer.Width := 2;\r\n MinutePointerShadow.Color := gcNull;\r\n MinuteMarkLength := 1;\r\n SecondPointer.Color := {$IFDEF FMXLIB} $FFFE8B18 {$ELSE} $00188BFE {$ENDIF};\r\n TickMarks := tmQuartHours;\r\n ShowAMPM := False;\r\n ShowNumbers := True;\r\n ShowSecondPointer := True;\r\n end;\r\n end;\r\n wsSmooth:\r\n begin\r\n with Appearance do\r\n begin\r\n InitializeDefault;\r\n Fill.Color := gcWhite;\r\n Fill.ColorTo := {$IFDEF FMXLIB} $FFABB0B1 {$ELSE} $00ABB0B1 {$ENDIF};\r\n Fill.Kind := gfkGradient;\r\n Fill.Orientation := gfoVertical;\r\n Stroke.Color := {$IFDEF FMXLIB} $FF585858 {$ELSE} $00585858 {$ENDIF};\r\n Stroke.Width := 1;\r\n CenterPointStroke.Color := gcBlack;\r\n CenterPointStroke.Width := 1;\r\n CenterPointFill.Color := gcWhite;\r\n CenterPointOuterColor := gcBlack;\r\n CenterPointSize := 6;\r\n HourMark.Color := {$IFDEF FMXLIB} $FFABB0B1 {$ELSE} $00ABB0B1 {$ENDIF};\r\n HourFont.Color := {$IFDEF FMXLIB} $FF797979 {$ELSE} $00797979 {$ENDIF};\r\n HourFont.Name := 'Times New Roman';\r\n HourFont.Size := {$IFDEF FMXLIB} 13 {$ELSE} 9 {$ENDIF};\r\n HourPointer.Color := {$IFDEF FMXLIB} $FF4A4A4A {$ELSE} $004A4A4A {$ENDIF};\r\n HourPointerShadow.Color := {$IFDEF FMXLIB} $FFB2B2B2 {$ELSE} $00B2B2B2 {$ENDIF};\r\n HourPointer.Width := 2;\r\n MinuteMark.Color := gcGray;\r\n MinutePointer.Color := {$IFDEF FMXLIB} $FF4A4A4A {$ELSE} $004A4A4A {$ENDIF};\r\n MinutePointer.Width := 2;\r\n MinutePointerShadow.Color := {$IFDEF FMXLIB} $FFB2B2B2 {$ELSE} $00B2B2B2 {$ENDIF};\r\n MinuteMarkLength := 1;\r\n SecondPointer.Color := {$IFDEF FMXLIB} $FF4A4A4A {$ELSE} $004A4A4A {$ENDIF};\r\n TickMarks := tmQuartHours;\r\n ShowAMPM := False;\r\n ShowNumbers := True;\r\n ShowSecondPointer := True;\r\n end;\r\n end;\r\n wsCustom:\r\n begin\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomAnalogTimeSelector.SetTime(const Value: TTime);\r\nvar\r\n h, m, s, ms: Word;\r\nbegin\r\n if FTime <> Value then\r\n begin\r\n FTime := Value;\r\n DecodeTime(Value, h, m, s, ms);\r\n if h < 12 then\r\n AM := True\r\n else\r\n AM := False;\r\n Invalidate;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomAnalogTimeSelector.SettingsChanged(Sender: TObject);\r\nbegin\r\n FWatchTimer.Enabled := Settings.Auto;\r\n Changed;\r\nend;\r\n\r\nfunction TTMSFNCCustomAnalogTimeSelector.XYToHour(X, Y: Single): Integer;\r\nbegin\r\n Result := Round(XYToMinute(X, Y) / 5);\r\n if (Result <= 0) then\r\n begin\r\n if AM then\r\n Result := 0\r\n else\r\n Result := 12;\r\n end\r\n else\r\n begin\r\n if not AM then\r\n Result := Result + 12;\r\n if (Result = 24) then\r\n Result := 0;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCCustomAnalogTimeSelector.XYToMinute(X, Y: Single): Integer;\r\nvar\r\n r: TRectF;\r\n cp: TPointF;\r\n a, b, m: Double;\r\nbegin\r\n r := GetWatchRect(GetControlRect);\r\n cp := GetCenterPoint(r);\r\n\r\n a := abs(cp.Y - Y);\r\n b := abs(cp.X - X);\r\n if (a = 0) then\r\n a := 1;\r\n\r\n if (b = 0) then\r\n b := 1;\r\n\r\n m := ArcTan(a / b) * 180/pi;\r\n m := m / 6;\r\n Result := Round(m);\r\n\r\n if (X >= cp.X) and (Y >= cp.Y) then\r\n Result := Result + 15\r\n else if (X <= cp.X) and (Y >= cp.Y) then\r\n begin\r\n Result := 15 - Result;\r\n Result := Result + 30;\r\n end\r\n else if (X <= cp.X) and (Y <= cp.Y) then\r\n Result := Result + 45\r\n else if (X >= cp.X) and (Y <= cp.Y) then\r\n Result := 15 - Result;\r\n\r\n if (Result < 0) or (Result >= 60) then\r\n Result := 0;\r\n\r\nend;\r\n\r\n{ TTMSFNCWatchAppearance }\r\n\r\nprocedure TTMSFNCAnalogTimeSelectorAppearance.Assign(Source: TPersistent);\r\nbegin\r\n if (Source is TTMSFNCAnalogTimeSelectorAppearance) then\r\n begin\r\n FStroke.Assign((Source as TTMSFNCAnalogTimeSelectorAppearance).Stroke);\r\n FFill.Assign((Source as TTMSFNCAnalogTimeSelectorAppearance).Fill);\r\n FHourMark.Assign((Source as TTMSFNCAnalogTimeSelectorAppearance).HourMark);\r\n FMinuteMark.Assign((Source as TTMSFNCAnalogTimeSelectorAppearance).MinuteMark);\r\n FHourFont.AssignSource((Source as TTMSFNCAnalogTimeSelectorAppearance).HourFont);\r\n FAMPMFill.Assign((Source as TTMSFNCAnalogTimeSelectorAppearance).AMPMFill);\r\n FAMPMStroke.Assign((Source as TTMSFNCAnalogTimeSelectorAppearance).AMPMStroke);\r\n FAMPMFont.Assign((Source as TTMSFNCAnalogTimeSelectorAppearance).AMPMFont);\r\n FShowAMPM := (Source as TTMSFNCAnalogTimeSelectorAppearance).ShowAMPM;\r\n FHourPointerShadow.Assign((Source as TTMSFNCAnalogTimeSelectorAppearance).HourPointerShadow);\r\n FMinutePointerShadow.Assign((Source as TTMSFNCAnalogTimeSelectorAppearance).MinutePointerShadow);\r\n FHourPointer.Assign((Source as TTMSFNCAnalogTimeSelectorAppearance).HourPointer);\r\n FMinutePointer.Assign((Source as TTMSFNCAnalogTimeSelectorAppearance).MinutePointer);\r\n FSecondPointer.Assign((Source as TTMSFNCAnalogTimeSelectorAppearance).SecondPointer);\r\n FShape := (Source as TTMSFNCAnalogTimeSelectorAppearance).Shape;\r\n FTickMark := (Source as TTMSFNCAnalogTimeSelectorAppearance).TickMarks;\r\n FHourMarkLength := (Source as TTMSFNCAnalogTimeSelectorAppearance).HourMarkLength;\r\n FMinuteMarkLength := (Source as TTMSFNCAnalogTimeSelectorAppearance).MinuteMarkLength;\r\n FCenterPointSize := (Source as TTMSFNCAnalogTimeSelectorAppearance).CenterPointSize;\r\n FCenterPointFill.Assign((Source as TTMSFNCAnalogTimeSelectorAppearance).CenterPointFill);\r\n FCenterPointStroke.Assign((Source as TTMSFNCAnalogTimeSelectorAppearance).CenterPointStroke);\r\n FCenterPointOuterColor := (Source as TTMSFNCAnalogTimeSelectorAppearance).CenterPointOuterColor;\r\n FPointerStyle := (Source as TTMSFNCAnalogTimeSelectorAppearance).PointerStyle;\r\n FShowSecondPointer := (Source as TTMSFNCAnalogTimeSelectorAppearance).ShowSecondPointer;\r\n FShowNumbers := (Source as TTMSFNCAnalogTimeSelectorAppearance).ShowNumbers;\r\n end\r\n else\r\n inherited;\r\nend;\r\n\r\nprocedure TTMSFNCAnalogTimeSelectorAppearance.Changed;\r\nbegin\r\n if Assigned(OnChange) then\r\n OnChange(Self);\r\nend;\r\n\r\nconstructor TTMSFNCAnalogTimeSelectorAppearance.Create;\r\nbegin\r\n FFill := TTMSFNCGraphicsFill.Create;\r\n FStroke := TTMSFNCGraphicsStroke.Create;\r\n FHourMark := TTMSFNCGraphicsStroke.Create;\r\n FMinuteMark := TTMSFNCGraphicsStroke.Create;\r\n FHourFont := TTMSFNCGraphicsFont.Create;\r\n FAMPMFill := TTMSFNCGraphicsFill.Create;\r\n FAMPMStroke := TTMSFNCGraphicsStroke.Create;\r\n FAMPMFont := TTMSFNCGraphicsFont.Create;\r\n FHourPointerShadow := TTMSFNCGraphicsStroke.Create;\r\n FMinutePointerShadow := TTMSFNCGraphicsStroke.Create;\r\n FHourPointer := TTMSFNCGraphicsStroke.Create;\r\n FMinutePointer := TTMSFNCGraphicsStroke.Create;\r\n FSecondPointer := TTMSFNCGraphicsStroke.Create;\r\n FCenterPointFill := TTMSFNCGraphicsFill.Create;\r\n FCenterPointStroke := TTMSFNCGraphicsStroke.Create;\r\n InitializeDefault;\r\n\r\n FFill.OnChanged := @FillChanged;\r\n FAMPMFill.OnChanged := @FillChanged;\r\n FCenterPointFill.OnChanged := @FillChanged;\r\n FStroke.OnChanged := @StrokeChanged;\r\n FHourMark.OnChanged := @StrokeChanged;\r\n FMinuteMark.OnChanged := @StrokeChanged;\r\n FAMPMStroke.OnChanged := @StrokeChanged;\r\n FHourPointerShadow.OnChanged := @StrokeChanged;\r\n FMinutePointerShadow.OnChanged := @StrokeChanged;\r\n FHourPointer.OnChanged := @StrokeChanged;\r\n FMinutePointer.OnChanged := @StrokeChanged;\r\n FSecondPointer.OnChanged := @StrokeChanged;\r\n FCenterPointStroke.OnChanged := @StrokeChanged;\r\n FHourFont.OnChanged := @FontChanged;\r\n FAMPMFont.OnChanged := @FontChanged;\r\nend;\r\n\r\ndestructor TTMSFNCAnalogTimeSelectorAppearance.Destroy;\r\nbegin\r\n FFill.Free;\r\n FStroke.Free;\r\n FHourMark.Free;\r\n FMinuteMark.Free;\r\n FHourFont.Free;\r\n FAMPMFill.Free;\r\n FAMPMStroke.Free;\r\n FAMPMFont.Free;\r\n FHourPointerShadow.Free;\r\n FMinutePointerShadow.Free;\r\n FHourPointer.Free;\r\n FMinutePointer.Free;\r\n FSecondPointer.Free;\r\n FCenterPointFill.Free;\r\n FCenterPointStroke.Free;\r\n inherited;\r\nend;\r\n\r\nprocedure TTMSFNCAnalogTimeSelectorAppearance.FillChanged(Sender: TObject);\r\nbegin\r\n Changed;\r\nend;\r\n\r\nprocedure TTMSFNCAnalogTimeSelectorAppearance.FontChanged(Sender: TObject);\r\nbegin\r\n Changed;\r\nend;\r\n\r\nprocedure TTMSFNCAnalogTimeSelectorAppearance.InitializeDefault;\r\nbegin\r\n FAMPMFont.Name := 'Tahoma';\r\n {$IFNDEF VCLLIB}\r\n FAMPMFont.Size := {$IFDEF FMXLIB} 12 {$ELSE} 8 {$ENDIF};\r\n {$ENDIF}\r\n FAMPMFont.Color := gcBlack;\r\n FAMPMFont.Style := [];\r\n FAMPMFill.Kind := gfkSolid;\r\n FAMPMFill.Color := gcWhite;\r\n FAMPMStroke.Kind := gskSolid;\r\n FAMPMStroke.Color := gcBlack;\r\n FAMPMStroke.Width := 1;\r\n FCenterPointFill.Color := gcBlack;\r\n FCenterPointFill.Kind := gfkSolid;\r\n FCenterPointSize := 4;\r\n FCenterPointStroke.Color := gcBlack;\r\n FCenterPointStroke.Kind := gskSolid;\r\n FCenterPointStroke.Width := 1;\r\n FCenterPointOuterColor := gcNull;\r\n FFill.Color := gcWhite;\r\n FFill.Kind := gfkSolid;\r\n FHourFont.Name := 'Tahoma';\r\n {$IFNDEF VCLLIB}\r\n FHourFont.Size := {$IFDEF FMXLIB} 12 {$ELSE} 8 {$ENDIF};\r\n {$ENDIF}\r\n FHourFont.Color := gcBlack;\r\n FHourFont.Style := [];\r\n FHourMark.Color := gcBlack;\r\n FHourMark.Kind := gskSolid;\r\n FHourMark.Width := 1;\r\n FHourMarkLength := 0;\r\n FHourPointer.Color := gcBlack;\r\n FHourPointer.Kind := gskSolid;\r\n FHourPointer.Width := 4;\r\n FHourPointerShadow.Color := gcMedGray;\r\n FHourPointerShadow.Kind := gskSolid;\r\n FHourPointerShadow.Width := 4;\r\n FHourMarkStyle := hmsLine;\r\n FMinuteMark.Color := gcBlack;\r\n FMinuteMark.Kind := gskSolid;\r\n FMinuteMark.Width := 1;\r\n FMinuteMarkLength := 0;\r\n FMinutePointer.Color := gcBlack;\r\n FMinutePointer.Kind := gskSolid;\r\n FMinutePointer.Width := 3;\r\n FMinutePointerShadow.Color := gcMedGray;\r\n FMinutePointerShadow.Kind := gskSolid;\r\n FMinutePointerShadow.Width := 3;\r\n FPointerStyle := psLine;\r\n FSecondPointer.Color := gcRed;\r\n FSecondPointer.Kind := gskSolid;\r\n FSecondPointer.Width := 1;\r\n FShape := wsCircle;\r\n FShowAMPM := True;\r\n FShowNumbers := True;\r\n FShowSecondPointer := False;\r\n FStroke.Kind := gskSolid;\r\n FStroke.Color := gcBlack;\r\n FStroke.Width := 4;\r\n FTickMark := tmAll;\r\nend;\r\n\r\nfunction TTMSFNCAnalogTimeSelectorAppearance.IsCenterPointSizeStored: Boolean;\r\nbegin\r\n Result := FCenterPointSize <> 4.0;\r\nend;\r\n\r\nfunction TTMSFNCAnalogTimeSelectorAppearance.IsHourMarkLengthStored: Boolean;\r\nbegin\r\n Result := FHourMarkLength <> 0.0;\r\nend;\r\n\r\nfunction TTMSFNCAnalogTimeSelectorAppearance.IsMinuteMarkLengthStored: Boolean;\r\nbegin\r\n Result := FMinuteMarkLength <> 0.0;\r\nend;\r\n\r\nprocedure TTMSFNCAnalogTimeSelectorAppearance.SetAMPMFill(const Value: TTMSFNCGraphicsFill);\r\nbegin\r\n if FAMPMFill <> Value then\r\n FAMPMFill.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCAnalogTimeSelectorAppearance.SetAMPMFont(const Value: TTMSFNCGraphicsFont);\r\nbegin\r\n FAMPMFont.AssignSource(Value);\r\nend;\r\n\r\nprocedure TTMSFNCAnalogTimeSelectorAppearance.SetAMPMStroke(\r\n const Value: TTMSFNCGraphicsStroke);\r\nbegin\r\n if FAMPMStroke <> Value then\r\n FAMPMStroke.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCAnalogTimeSelectorAppearance.SetCenterPointFill(\r\n const Value: TTMSFNCGraphicsFill);\r\nbegin\r\n if FCenterPointFill <> Value then \r\n FCenterPointFill.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCAnalogTimeSelectorAppearance.SetCenterPointOuterColor(\r\n const Value: TTMSFNCGraphicsColor);\r\nbegin\r\n if FCenterPointOuterColor <> Value then\r\n begin\r\n FCenterPointOuterColor := Value;\r\n Changed;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCAnalogTimeSelectorAppearance.SetCenterPointSize(const Value: Single);\r\nbegin\r\n if FCenterPointSize <> Value then\r\n begin\r\n FCenterPointSize := Value;\r\n Changed;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCAnalogTimeSelectorAppearance.SetCenterPointStroke(\r\n const Value: TTMSFNCGraphicsStroke);\r\nbegin\r\n if FCenterPointStroke <> Value then\r\n FCenterPointStroke.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCAnalogTimeSelectorAppearance.SetFill(const Value: TTMSFNCGraphicsFill);\r\nbegin\r\n if FFill <> Value then\r\n FFill.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCAnalogTimeSelectorAppearance.SetHourFont(const Value: TTMSFNCGraphicsFont);\r\nbegin\r\n FHourFont.AssignSource(Value);\r\nend;\r\n\r\nprocedure TTMSFNCAnalogTimeSelectorAppearance.SetHourMark(\r\n const Value: TTMSFNCGraphicsStroke);\r\nbegin\r\n if FHourMark <> Value then\r\n FHourMark.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCAnalogTimeSelectorAppearance.SetHourMarkLength(const Value: Single);\r\nbegin\r\n if FHourMarkLength <> Value then\r\n begin\r\n FHourMarkLength := Value;\r\n Changed;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCAnalogTimeSelectorAppearance.SetHourMarkStyle(\r\n const Value: TTMSFNCAnalogTimeSelectorHourMarkStyle);\r\nbegin\r\n if FHourMarkStyle <> Value then\r\n begin\r\n FHourMarkStyle := Value;\r\n Changed;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCAnalogTimeSelectorAppearance.SetHourPointer(\r\n const Value: TTMSFNCGraphicsStroke);\r\nbegin\r\n if FHourPointer <> Value then\r\n FHourPointer.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCAnalogTimeSelectorAppearance.SetHourPointerShadow(\r\n const Value: TTMSFNCGraphicsStroke);\r\nbegin\r\n if FHourPointerShadow <> Value then\r\n FHourPointerShadow.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCAnalogTimeSelectorAppearance.SetMinuteMark(\r\n const Value: TTMSFNCGraphicsStroke);\r\nbegin\r\n if FMinuteMark <> Value then\r\n FMinuteMark := Value;\r\nend;\r\n\r\nprocedure TTMSFNCAnalogTimeSelectorAppearance.SetMinuteMarkLength(const Value: Single);\r\nbegin\r\n if FMinuteMarkLength <> Value then\r\n begin\r\n FMinuteMarkLength := Value;\r\n Changed;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCAnalogTimeSelectorAppearance.SetMinutePointer(\r\n const Value: TTMSFNCGraphicsStroke);\r\nbegin\r\n if FMinutePointer <> Value then\r\n FMinutePointer.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCAnalogTimeSelectorAppearance.SetMinutePointerShadow(\r\n const Value: TTMSFNCGraphicsStroke);\r\nbegin\r\n if FMinutePointerShadow <> Value then\r\n FMinutePointerShadow.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCAnalogTimeSelectorAppearance.SetPointerStyle(\r\n const Value: TTMSFNCAnalogTimeSelectorPointerStyle);\r\nbegin\r\n if FPointerStyle <> Value then\r\n begin\r\n FPointerStyle := Value;\r\n Changed;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCAnalogTimeSelectorAppearance.SetSecondPointer(\r\n const Value: TTMSFNCGraphicsStroke);\r\nbegin\r\n if FSecondPointer <> Value then\r\n FSecondPointer.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCAnalogTimeSelectorAppearance.SetShape(const Value: TTMSFNCAnalogTimeSelectorShape);\r\nbegin\r\n if FShape <> Value then\r\n begin\r\n FShape := Value;\r\n Changed;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCAnalogTimeSelectorAppearance.SetShowAMPM(const Value: Boolean);\r\nbegin\r\n if FShowAMPM <> Value then\r\n begin\r\n FShowAMPM := Value;\r\n Changed;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCAnalogTimeSelectorAppearance.SetShowNumbers(const Value: Boolean);\r\nbegin\r\n if FShowNumbers <> Value then\r\n begin\r\n FShowNumbers := Value;\r\n Changed;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCAnalogTimeSelectorAppearance.SetShowSecondPointer(const Value: Boolean);\r\nbegin\r\n if FShowSecondPointer <> Value then\r\n begin\r\n FShowSecondPointer := Value;\r\n Changed;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCAnalogTimeSelectorAppearance.SetStroke(const Value: TTMSFNCGraphicsStroke);\r\nbegin\r\n if FStroke <> Value then\r\n FStroke.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCAnalogTimeSelectorAppearance.SetTickMark(const Value: TTMSFNCAnalogTimeSelectorTickMark);\r\nbegin\r\n if FTickMark <> Value then\r\n begin\r\n FTickMark := Value;\r\n Changed;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCAnalogTimeSelectorAppearance.StrokeChanged(Sender: TObject);\r\nbegin\r\n Changed;\r\nend;\r\n\r\n{ TTMSFNCWatchSettings }\r\n\r\nprocedure TTMSFNCAnalogTimeSelectorSettings.Assign(Source: TPersistent);\r\nbegin\r\n if Source is TTMSFNCAnalogTimeSelectorSettings then\r\n begin\r\n FAuto := (Source as TTMSFNCAnalogTimeSelectorSettings).Auto;\r\n FReadOnly := (Source as TTMSFNCAnalogTimeSelectorSettings).ReadOnly;\r\n FTimeOffset := (Source as TTMSFNCAnalogTimeSelectorSettings).TimeOffset;\r\n end\r\n else\r\n inherited;\r\nend;\r\n\r\nprocedure TTMSFNCAnalogTimeSelectorSettings.Changed;\r\nbegin\r\n if Assigned(OnChange) then\r\n OnChange(Self);\r\nend;\r\n\r\nconstructor TTMSFNCAnalogTimeSelectorSettings.Create;\r\nbegin\r\n FAuto := False;\r\n FReadOnly := False;\r\n FTimeOffset := 0;\r\nend;\r\n\r\nprocedure TTMSFNCAnalogTimeSelectorSettings.SetAuto(const Value: Boolean);\r\nbegin\r\n if FAuto <> Value then\r\n begin\r\n FAuto := Value;\r\n Changed;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCAnalogTimeSelectorSettings.SetReadOnly(const Value: Boolean);\r\nbegin\r\n if FReadOnly <> Value then\r\n begin\r\n FReadOnly := Value;\r\n Changed;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCAnalogTimeSelectorSettings.SetTimeOffset(const Value: Integer);\r\nbegin\r\n if FTimeOffset <> Value then\r\n begin\r\n FTimeOffset := Value;\r\n Changed;\r\n end;\r\nend;\r\n\r\nend.\r\n","{********************************************************************}\r\n{ }\r\n{ written by TMS Software }\r\n{ copyright (c) 2018 - 2021 }\r\n{ Email : info@tmssoftware.com }\r\n{ Web : http://www.tmssoftware.com }\r\n{ }\r\n{ The source code is given as is. The author is not responsible }\r\n{ for any possible damage done due to the use of this code. }\r\n{ The complete source code remains property of the author and may }\r\n{ not be distributed, published, given or sold in any form as such. }\r\n{ No parts of the source code can be included in any other component }\r\n{ or application without written authorization of the author. }\r\n{********************************************************************}\r\n\r\nunit WEBLib.TMSFNCAnalogTimePicker;\r\n\r\n{$I WEBLib.TMSFNCDefines.inc}\r\n\r\ninterface\r\n\r\nuses\r\n Classes, WEBLib.TMSFNCCustomPicker, WEBLib.TMSFNCCustomSelector, WEBLib.TMSFNCGraphics,\r\n WEBLib.Controls, WEBLib.TMSFNCAnalogTimeSelector, WEBLib.TMSFNCTypes, WEBLib.StdCtrls,\r\n SysUtils, WEBLib.TMSFNCUtils, WEBLib.TMSFNCGraphicsTypes\r\n {$IFNDEF LCLLIB}\r\n ,Types\r\n {$ENDIF}\r\n {$IFDEF FMXLIB}\r\n ,FMX.Types\r\n {$ENDIF}\r\n ;\r\n\r\nconst\r\n MAJ_VER = 1; // Major version nr.\r\n MIN_VER = 0; // Minor version nr.\r\n REL_VER = 2; // Release nr.\r\n BLD_VER = 0; // Build nr.\r\n\r\n //Version history\r\n //v1.0.0.0 : First Release\r\n //v1.0.1.0 : New : Property AllowNumericNullValue added\r\n // : New : Method Clear added\r\n // : Fixed : Issue with OnTimeSelected event\r\n //v1.0.1.1 : Fixed : Issue with setting the SelectedTime to 00:00:00\r\n //v1.0.1.2 : Fixed : Issue with control color in disabled state\r\n //v1.0.1.3 : Improved : Exposed Font property\r\n //v1.0.2.0 : New : Support for high dpi\r\n\r\ntype\r\n TTMSFNCTimePickerMode = (tpmAnalog, tpmDigital);\r\n\r\n TTMSFNCCustomAnalogTimePickerTimeSelectedEvent = procedure(Sender: TObject; ATime: TTime) of object;\r\n\r\n TTMSFNCCustomAnalogTimePicker = class(TTMSFNCDefaultPicker)\r\n private\r\n FPrevSelTime: TTime;\r\n FWrapper: TTMSFNCCustomSelector;\r\n FTimeSelector: TTMSFNCAnalogTimeSelector;\r\n FCloseOnSelection: Boolean;\r\n FOnTimeSelected: TTMSFNCCustomAnalogTimePickerTimeSelectedEvent;\r\n FMode: TTMSFNCTimePickerMode;\r\n FTimeFormat: string;\r\n FAllowNumericNullValue: Boolean;\r\n FFont: TTMSFNCGraphicsFont;\r\n procedure SetSelectedTime(const Value: TTime);\r\n procedure SetAnalogTimeSelectorAppearance(const Value: TTMSFNCAnalogTimeSelectorAppearance);\r\n procedure SetMode(const Value: TTMSFNCTimePickerMode);\r\n procedure SetTimeFormat(const Value: string);\r\n procedure SetAllowNumericNullValue(const Value: Boolean);\r\n function GetSelectedTime: TTime;\r\n function GetAnalogTimeSelectorAppearance: TTMSFNCAnalogTimeSelectorAppearance;\r\n function IsTimeFormatStored: Boolean;\r\n procedure SetFnt(const Value: TTMSFNCGraphicsFont);\r\n protected\r\n procedure ChangeDPIScale(M, D: Integer); override;\r\n procedure FontChange(Sender: TObject);\r\n procedure SetEditable(const Value: Boolean); override;\r\n procedure UpdateEditText(AText: string); override;\r\n procedure Loaded; override;\r\n procedure SetGraphicColors; override;\r\n procedure SetAdaptToStyle(const Value: Boolean); override;\r\n procedure InitializePopup; override;\r\n procedure DrawContent(AGraphics: TTMSFNCGraphics; ARect: TRectF); override;\r\n procedure SelectFirstValue; override;\r\n procedure SelectLastValue; override;\r\n procedure SelectNextValue; override;\r\n procedure SelectPreviousValue; override;\r\n procedure EditUp; override;\r\n procedure EditDown; override;\r\n procedure DoSelectTime; virtual;\r\n procedure TimeSelected(Sender: TObject; ATime: TTime);\r\n function GetVersion: string; override;\r\n function CreateSelector: TTMSFNCCustomSelector; override;\r\n function GetFocusedControl: TControl; override;\r\n property AllowNumericNullValue: Boolean read FAllowNumericNullValue write SetAllowNumericNullValue default True;\r\n property TimeFormat: string read FTimeFormat write SetTimeFormat stored IsTimeFormatStored nodefault;\r\n property Mode: TTMSFNCTimePickerMode read FMode write SetMode default tpmAnalog;\r\n property Font: TTMSFNCGraphicsFont read FFont write SetFnt;\r\n property CloseOnSelection: Boolean read FCloseOnSelection write FCloseOnSelection default False;\r\n property SelectedTime: TTime read GetSelectedTime write SetSelectedTime;\r\n property OnTimeSelected: TTMSFNCCustomAnalogTimePickerTimeSelectedEvent read FOnTimeSelected write FOnTimeSelected;\r\n property SelectorAppearance: TTMSFNCAnalogTimeSelectorAppearance read GetAnalogTimeSelectorAppearance write SetAnalogTimeSelectorAppearance;\r\n public\r\n constructor Create(AOwner: TComponent); override;\r\n destructor Destroy; override;\r\n procedure Clear;\r\n end;\r\n\r\n {$IFNDEF LCLLIB}\r\n [ComponentPlatformsAttribute(TMSPlatformsWeb)]\r\n {$ENDIF}\r\n TTMSFNCAnalogTimePicker = class(TTMSFNCCustomAnalogTimePicker)\r\n protected\r\n procedure RegisterRuntimeClasses; override;\r\n published\r\n property AllowNumericNullValue;\r\n property Editable;\r\n property DropDownWidth;\r\n property DropDownHeight;\r\n property Font;\r\n property CloseOnSelection;\r\n property SelectorAppearance;\r\n property SelectedTime;\r\n property TimeFormat;\r\n property Mode;\r\n property OnTimeSelected;\r\n end;\r\n\r\nimplementation\r\n\r\nuses\r\n DateUtils\r\n {$IFDEF FMXLIB}\r\n ,FMX.Edit\r\n {$ENDIF}\r\n {$IFDEF VCLLIB}\r\n , VCL.Graphics\r\n {$ENDIF}\r\n ;\r\n\r\ntype\r\n TCustomEditProtected = class(TCustomEdit);\r\n TTMSFNCAnalogTimePickerOpen = class(TTMSFNCAnalogTimePicker);\r\n\r\n{ TTMSFNCCustomTimePicker }\r\n\r\nprocedure TTMSFNCCustomAnalogTimePicker.ChangeDPIScale(M, D: Integer);\r\nbegin\r\n inherited;\r\n BeginUpdate;\r\n Font.Height := TTMSFNCUtils.MulDivInt(Font.Height, M, D);\r\n {$IFDEF VCLLIB}\r\n {$HINTS OFF}\r\n {$IF COMPILERVERSION >= 33}\r\n FTimeSelector.ScaleForPPI(CurrentPPI);\r\n {$IFEND}\r\n {$HINTS ON}\r\n {$ENDIF}\r\n EndUpdate;\r\nend;\r\n\r\nprocedure TTMSFNCCustomAnalogTimePicker.Clear;\r\nbegin\r\n SelectedTime := 0.0;\r\nend;\r\n\r\nconstructor TTMSFNCCustomAnalogTimePicker.Create(AOwner: TComponent);\r\nbegin\r\n inherited;\r\n FTimeFormat := 'hh:nn:ss';\r\n FCloseOnSelection := False;\r\n FAllowNumericNullValue := True;\r\n Width := 90;\r\n FFont := TTMSFNCGraphicsFont.Create;\r\n FFont.OnChanged := @FontChange;\r\n DropDownHeight := 180;\r\n DropDownWidth := 180;\r\n {$IFDEF FMXLIB}\r\n Edit.StyledSettings := TCustomEditProtected(Edit).StyledSettings - [TStyledSetting.Family, TStyledSetting.Size, TStyledSetting.Style];\r\n {$IFDEF ANDROID}\r\n Edit.TextSettings.VertAlign := TTextAlign.Leading;\r\n {$ENDIF}\r\n {$ENDIF}\r\nend;\r\n\r\nfunction TTMSFNCCustomAnalogTimePicker.CreateSelector: TTMSFNCCustomSelector;\r\nbegin\r\n FWrapper := TTMSFNCCustomSelector.Create(Self);\r\n FTimeSelector := TTMSFNCAnalogTimeSelector.Create(FWrapper);\r\n FTimeSelector.Parent := FWrapper;\r\n\r\n FTimeSelector.OnTimeChanged := TimeSelected;\r\n\r\n Result := FWrapper;\r\nend;\r\n\r\ndestructor TTMSFNCCustomAnalogTimePicker.Destroy;\r\nbegin\r\n FFont.Free;\r\n inherited;\r\nend;\r\n\r\nprocedure TTMSFNCCustomAnalogTimePicker.DoSelectTime;\r\nbegin\r\n if Assigned(OnTimeSelected) then\r\n OnTimeSelected(Self, SelectedTime);\r\n\r\n Invalidate;\r\nend;\r\n\r\nprocedure TTMSFNCCustomAnalogTimePicker.DrawContent(AGraphics: TTMSFNCGraphics;\r\n ARect: TRectF);\r\nvar\r\n r: TRectF;\r\nbegin\r\n inherited;\r\n if not Editable then\r\n begin\r\n AGraphics.Font.AssignSource(Font);\r\n\r\n if not Enabled then\r\n AGraphics.Font.Color := gcSilver;\r\n\r\n r := ARect;\r\n InflateRectEx(r, -3, -3);\r\n AGraphics.DrawText(r, Content);\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomAnalogTimePicker.EditDown;\r\nbegin\r\n inherited;\r\n if not Popup.IsOpen then\r\n Dropdown;\r\nend;\r\n\r\nprocedure TTMSFNCCustomAnalogTimePicker.EditUp;\r\nbegin\r\n inherited;\r\n if Popup.IsOpen then\r\n Dropdown;\r\nend;\r\n\r\nprocedure TTMSFNCCustomAnalogTimePicker.FontChange(Sender: TObject);\r\nbegin\r\n Invalidate;\r\nend;\r\n\r\nfunction TTMSFNCCustomAnalogTimePicker.GetAnalogTimeSelectorAppearance: TTMSFNCAnalogTimeSelectorAppearance;\r\nbegin\r\n Result := FTimeSelector.Appearance;\r\nend;\r\n\r\nfunction TTMSFNCCustomAnalogTimePicker.GetFocusedControl: TControl;\r\nbegin\r\n Result := FTimeSelector;\r\nend;\r\n\r\nfunction TTMSFNCCustomAnalogTimePicker.GetSelectedTime: TTime;\r\nbegin\r\n Result := FTimeSelector.Time\r\nend;\r\n\r\nfunction TTMSFNCCustomAnalogTimePicker.GetVersion: string;\r\nbegin\r\n Result := GetVersionNumber(MAJ_VER, MIN_VER, REL_VER, BLD_VER);\r\nend;\r\n\r\nprocedure TTMSFNCCustomAnalogTimePicker.InitializePopup;\r\nvar\r\n t: TDateTime;\r\nbegin\r\n inherited;\r\n if Editable and Assigned(Edit.Parent) and Edit.Visible then\r\n begin\r\n t := SelectedTime;\r\n if TryStrToTime(Edit.Text, t) then\r\n SelectedTime := t;\r\n end;\r\n\r\n FTimeSelector.Initialize;\r\n FTimeSelector.Width := Round(DropDownWidth);\r\n FTimeSelector.Height := Round(DropDownHeight);\r\n FTimeSelector.Fill.Assign(SelectorAppearance.Fill);\r\nend;\r\n\r\nfunction TTMSFNCCustomAnalogTimePicker.IsTimeFormatStored: Boolean;\r\nbegin\r\n Result := FTimeFormat <> 'hh:nn:ss';\r\nend;\r\n\r\nprocedure TTMSFNCCustomAnalogTimePicker.Loaded;\r\nbegin\r\n inherited;\r\n FTimeSelector.Width := Round(DropDownWidth);\r\n FTimeSelector.Height := Round(DropDownHeight);\r\n {$IFDEF VCLLIB}\r\n {$HINTS OFF}\r\n {$IF COMPILERVERSION >= 33}\r\n TTMSFNCAnalogTimePickerOpen(FTimeSelector).ChangeDPIScale(96, DesigntimeFormPixelsPerInch);\r\n FTimeSelector.ScaleForPPI(CurrentPPI);\r\n {$IFEND}\r\n {$HINTS ON}\r\n {$ENDIF}\r\nend;\r\n\r\nprocedure TTMSFNCCustomAnalogTimePicker.SelectFirstValue;\r\nvar\r\n h, m, s, ms: Word;\r\nbegin\r\n inherited;\r\n DecodeTime(SelectedTime, h, m, s, ms);\r\n FTimeSelector.Time := EncodeTime(h, 0, 0, 0);\r\n DoSelectTime;\r\nend;\r\n\r\nprocedure TTMSFNCCustomAnalogTimePicker.SelectLastValue;\r\nvar\r\n h, m, s, ms: Word;\r\nbegin\r\n inherited;\r\n DecodeTime(SelectedTime, h, m, s, ms);\r\n FTimeSelector.Time := EncodeTime(h, 59, 0, 0);\r\n DoSelectTime;\r\nend;\r\n\r\nprocedure TTMSFNCCustomAnalogTimePicker.SelectNextValue;\r\nbegin\r\n inherited;\r\n FTimeSelector.Time := IncMinute(SelectedTime, 1);\r\n DoSelectTime;\r\nend;\r\n\r\nprocedure TTMSFNCCustomAnalogTimePicker.SelectPreviousValue;\r\nbegin\r\n inherited;\r\n FTimeSelector.Time := IncMinute(SelectedTime, -1);\r\n DoSelectTime;\r\nend;\r\n\r\nprocedure TTMSFNCCustomAnalogTimePicker.SetAdaptToStyle(const Value: Boolean);\r\nbegin\r\n inherited;\r\n if Assigned(FWrapper) then\r\n FWrapper.AdaptToStyle := AdaptToStyle;\r\n if Assigned(FTimeSelector) then\r\n FTimeSelector.AdaptToStyle := AdaptToStyle;\r\nend;\r\n\r\nprocedure TTMSFNCCustomAnalogTimePicker.SetAllowNumericNullValue(\r\n const Value: Boolean);\r\nbegin\r\n if FAllowNumericNullValue <> Value then\r\n begin\r\n FAllowNumericNullValue := Value;\r\n if FAllowNumericNullValue and (Frac(SelectedTime) = 0.0) then\r\n Content := ''\r\n else\r\n Content := FormatDateTime(TimeFormat, SelectedTime);\r\n\r\n Invalidate;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomAnalogTimePicker.SetAnalogTimeSelectorAppearance(\r\n const Value: TTMSFNCAnalogTimeSelectorAppearance);\r\nbegin\r\n FTimeSelector.Appearance.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCCustomAnalogTimePicker.SetEditable(const Value: Boolean);\r\nbegin\r\n inherited;\r\n if FAllowNumericNullValue and (Frac(FPrevSelTime) = 0.0) then\r\n Content := ''\r\n else\r\n Content := FormatDateTime(TimeFormat, FPrevSelTime);\r\n\r\n Invalidate;\r\nend;\r\n\r\nprocedure TTMSFNCCustomAnalogTimePicker.SetFnt(\r\n const Value: TTMSFNCGraphicsFont);\r\nbegin\r\n FFont.AssignSource(Value);\r\nend;\r\n\r\nprocedure TTMSFNCCustomAnalogTimePicker.SetGraphicColors;\r\nbegin\r\n inherited;\r\n TTMSFNCGraphics.DefaultPopupFillColor := SelectorAppearance.Fill.Color;\r\n TTMSFNCGraphics.DefaultPopupStrokeColor := SelectorAppearance.Stroke.Color;\r\n TTMSFNCGraphics.DefaultButtonFillColor := SelectorAppearance.Fill.Color;\r\n TTMSFNCGraphics.DefaultButtonStrokeColor := SelectorAppearance.Stroke.Color;\r\n TTMSFNCGraphics.DefaultButtonFillColorFocused := Lighter(SelectorAppearance.Fill.Color, 20);\r\n TTMSFNCGraphics.DefaultButtonStrokeColorFocused := Lighter(SelectorAppearance.Stroke.Color, 20);\r\n TTMSFNCGraphics.DefaultButtonStrokeColorDisabled := gcDarkGray;\r\n TTMSFNCGraphics.DefaultButtonFillColorDisabled := gcLightgray;\r\n TTMSFNCGraphics.DefaultTextFontColor := Font.Color;\r\nend;\r\n\r\nprocedure TTMSFNCCustomAnalogTimePicker.SetMode(const Value: TTMSFNCTimePickerMode);\r\nbegin\r\n if FMode <> Value then\r\n begin\r\n FMode := Value;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomAnalogTimePicker.SetSelectedTime(const Value: TTime);\r\nbegin\r\n if FAllowNumericNullValue and (Frac(Value) = 0.0) then\r\n Content := ''\r\n else\r\n Content := FormatDateTime(TimeFormat, Value);\r\n\r\n FPrevSelTime := Value;\r\n Invalidate;\r\nend;\r\n\r\nprocedure TTMSFNCCustomAnalogTimePicker.SetTimeFormat(const Value: string);\r\nbegin\r\n if FTimeFormat <> Value then\r\n begin\r\n FTimeFormat := Value;\r\n Content := FormatDateTime(TimeFormat, SelectedTime);\r\n Invalidate;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomAnalogTimePicker.TimeSelected(Sender: TObject; ATime: TTime);\r\nbegin\r\n if Editable and Edit.IsFocused then\r\n PreventDropDown := True;\r\n\r\n if CloseOnSelection then\r\n DropDown;\r\n\r\n if Assigned(OnTimeSelected) then\r\n OnTimeSelected(Self, ATime);\r\n\r\n SelectedTime := ATime;\r\n\r\n Invalidate;\r\nend;\r\n\r\nprocedure TTMSFNCCustomAnalogTimePicker.UpdateEditText(AText: string);\r\nvar\r\n t: TDateTime;\r\nbegin\r\n inherited;\r\n if AText = '' then\r\n begin\r\n if (0.0 <> FPrevSelTime) then\r\n begin\r\n FTimeSelector.Time := 0.0;\r\n DoSelectTime;\r\n end;\r\n end\r\n else if TryStrToTime(AText, t) then\r\n begin\r\n if (Frac(t) <> SelectedTime) then\r\n begin\r\n FTimeSelector.Time := Frac(t);\r\n DoSelectTime;\r\n end;\r\n end;\r\nend;\r\n\r\n{ TTMSFNCTimePicker }\r\n\r\nprocedure TTMSFNCAnalogTimePicker.RegisterRuntimeClasses;\r\nbegin\r\n inherited;\r\n RegisterClass(TTMSFNCAnalogTimePicker);\r\nend;\r\n\r\nend.\r\n","{********************************************************************}\r\n{ }\r\n{ written by TMS Software }\r\n{ copyright (c) 2018 - 2024 }\r\n{ Email : info@tmssoftware.com }\r\n{ Web : https://www.tmssoftware.com }\r\n{ }\r\n{ The source code is given as is. The author is not responsible }\r\n{ for any possible damage done due to the use of this code. }\r\n{ The complete source code remains property of the author and may }\r\n{ not be distributed, published, given or sold in any form as such. }\r\n{ No parts of the source code can be included in any other component }\r\n{ or application without written authorization of the author. }\r\n{********************************************************************}\r\n\r\nunit WEBLib.TMSFNCDateTimePicker;\r\n\r\n{$I WEBLib.TMSFNCDefines.inc}\r\n\r\n{$IFDEF CMNLIB}\r\n{$DEFINE CMNWEBLIB}\r\n{$ENDIF}\r\n{$IFDEF WEBLIB}\r\n{$DEFINE CMNWEBLIB}\r\n{$ENDIF}\r\n\r\ninterface\r\n\r\nuses\r\n Classes, Types,\r\n {$IFDEF FMXLIB}\r\n FMX.Types, FMX.DateTimeCtrls,\r\n {$ENDIF}\r\n WEBLib.TMSFNCCustomControl, WEBLib.TMSFNCTypes, WEBLib.TMSFNCDatePicker,\r\n WEBLib.TMSFNCDigitalTimePicker, WEBLib.TMSFNCAnalogTimePicker, WEBLib.TMSFNCGraphicsTypes,\r\n WEBLib.TMSFNCGraphics, WEBLib.TMSFNCUtils, WEBLib.TMSFNCStyles;\r\n\r\n const\r\n MAJ_VER = 1; // Major version nr.\r\n MIN_VER = 0; // Minor version nr.\r\n REL_VER = 2; // Release nr.\r\n BLD_VER = 0; // Build nr.\r\n\r\n //Version history\r\n //v1.0.0.0 : First Release\r\n //v1.0.1.0 : New : Property AllowNumericNullValue added\r\n // : New : Method Clear added\r\n // : Fixed : Issue with OnDateTimeSelected event\r\n //v1.0.1.1 : Fixed : Issue with incorrect time selection\r\n //v1.0.1.2 : Fixed : Issue with control color in disabled state\r\n //v1.0.1.3 : Fixed : Issue with OnDateTimeSelected event after dropdown close\r\n //v1.0.2.0 : New : Added property Native for FMX\r\n\r\ntype\r\n TTMSFNCDateTimePickerMode = (dtpmAnalog, dtpmDigital);\r\n\r\n TTMSFNCCustomDateTimePickerDateTimeChangedEvent = procedure(Sender: TObject; ADateTime: TDateTime) of object;\r\n\r\n TTMSFNCCustomDateTimePicker = class(TTMSFNCCustomControl, ITMSFNCStylesManager)\r\n private\r\n FDatePicker: TTMSFNCDatePicker;\r\n FDigitalTimePicker: TTMSFNCDigitalTimePicker;\r\n FOnDateTimeChanged: TTMSFNCCustomDateTimePickerDateTimeChangedEvent;\r\n FEditable: Boolean;\r\n FTimePickerMode: TTMSFNCDateTimePickerMode;\r\n FCloseOnSelection: Boolean;\r\n FAnalogTimePicker: TTMSFNCAnalogTimePicker;\r\n FAllowNumericNullValue: Boolean;\r\n {$IFDEF FMXLIB}\r\n FNative: Boolean;\r\n FDateEdit: TDateEdit;\r\n FTimeEdit: TTimeEdit;\r\n procedure SetNative(const Value: Boolean);\r\n {$ENDIF}\r\n procedure SetSelectedDateTime(const Value: TDateTime);\r\n procedure SetEditable(const Value: Boolean);\r\n procedure SetTimePickerMode(const Value: TTMSFNCDateTimePickerMode);\r\n procedure SetCloseOnSelection(const Value: Boolean);\r\n procedure SetAllowNumericNullValue(const Value: Boolean);\r\n function GetSelectedDateTime: TDateTime;\r\n protected\r\n procedure Loaded; override;\r\n {$IFDEF FMXLIB}\r\n procedure DateEditChanged(Sender: TObject);\r\n procedure TimeEditChanged(Sender: TObject);\r\n procedure SetEnabled(const Value: Boolean); override;\r\n {$ENDIF}\r\n {$IFDEF CMNWEBLIB}\r\n procedure SetEnabled(Value: Boolean); override;\r\n {$ENDIF}\r\n procedure UpdateControlAfterResize; override;\r\n procedure SetAdaptToStyle(const Value: Boolean); override;\r\n procedure DateSelected(Sender: TObject; ADate: TDate);\r\n procedure TimeSelected(Sender: TObject; ATime: TTime);\r\n procedure DoDateTimeChanged(ADateTime: TDateTime); virtual;\r\n procedure ChangeMode(AMode: TTMSFNCDateTimePickerMode);\r\n function GetVersion: string; override;\r\n function GetSubComponentArray: TTMSFNCStylesManagerComponentArray;\r\n property AllowNumericNullValue: Boolean read FAllowNumericNullValue write SetAllowNumericNullValue default True;\r\n property Editable: Boolean read FEditable write SetEditable default False;\r\n property CloseOnSelection: Boolean read FCloseOnSelection write SetCloseOnSelection default True;\r\n property TimePickerMode: TTMSFNCDateTimePickerMode read FTimePickerMode write SetTimePickerMode default dtpmDigital;\r\n property SelectedDateTime: TDateTime read GetSelectedDateTime write SetSelectedDateTime;\r\n {$IFDEF FMXLIB}\r\n property Native: Boolean read FNative write SetNative default False;\r\n {$ENDIF}\r\n property OnDateTimeChanged: TTMSFNCCustomDateTimePickerDateTimeChangedEvent read FOnDateTimeChanged write FOnDateTimeChanged;\r\n public\r\n constructor Create(AOwner: TComponent); override;\r\n destructor Destroy; override;\r\n procedure Clear;\r\n property DatePicker: TTMSFNCDatePicker read FDatePicker;\r\n property AnalogTimePicker: TTMSFNCAnalogTimePicker read FAnalogTimePicker;\r\n property DigitalTimePicker: TTMSFNCDigitalTimePicker read FDigitalTimePicker;\r\n {$IFDEF FMXLIB}\r\n property DateEdit: TDateEdit read FDateEdit;\r\n property TimeEdit: TTimeEdit read FTimeEdit;\r\n {$ENDIF}\r\n end;\r\n\r\n {$IFNDEF LCLLIB}\r\n [ComponentPlatformsAttribute(TMSPlatformsWeb)]\r\n {$ENDIF}\r\n TTMSFNCDateTimePicker = class(TTMSFNCCustomDateTimePicker)\r\n property AllowNumericNullValue;\r\n property Editable;\r\n property CloseOnSelection;\r\n {$IFDEF FMXLIB}\r\n property Native;\r\n {$ENDIF}\r\n property TimePickerMode;\r\n property SelectedDateTime;\r\n property OnDateTimeChanged;\r\n end;\r\n\r\nimplementation\r\n\r\n{$IFDEF FMXLIB}\r\nuses\r\n SysUtils;\r\n{$ENDIF}\r\n\r\n{ TTMSFNCCustomDateTimePicker }\r\n\r\nprocedure TTMSFNCCustomDateTimePicker.ChangeMode(\r\n AMode: TTMSFNCDateTimePickerMode);\r\nvar\r\n t: TTime;\r\nbegin\r\n if AMode = dtpmAnalog then\r\n begin\r\n t := 0;\r\n if Assigned(FDigitalTimePicker) then\r\n begin\r\n t := FDigitalTimePicker.SelectedTime;\r\n FDigitalTimePicker.Parent := nil;\r\n end;\r\n\r\n if not Assigned(FAnalogTimePicker) then\r\n FAnalogTimePicker := TTMSFNCAnalogTimePicker.Create(Self);\r\n\r\n FAnalogTimePicker.Parent := Self;\r\n {$IFDEF FMXLIB}\r\n FAnalogTimePicker.Stored := False;\r\n {$ENDIF}\r\n FAnalogTimePicker.Width := Round(Width / 2);\r\n FAnalogTimePicker.ControlAlignment := caRight;\r\n FAnalogTimePicker.SelectedTime := t;\r\n FAnalogTimePicker.Editable := FEditable;\r\n FAnalogTimePicker.CloseOnSelection := FCloseOnSelection;\r\n FAnalogTimePicker.OnTimeSelected := TimeSelected;\r\n end\r\n else if AMode = dtpmDigital then\r\n begin\r\n t := 0;\r\n if Assigned(FAnalogTimePicker) then\r\n begin\r\n t := FAnalogTimePicker.SelectedTime;\r\n FAnalogTimePicker.Parent := nil;\r\n end;\r\n\r\n if not Assigned(FDigitalTimePicker) then\r\n FDigitalTimePicker := TTMSFNCDigitalTimePicker.Create(Self);\r\n\r\n FDigitalTimePicker.Parent := Self;\r\n {$IFDEF FMXLIB}\r\n FDigitalTimePicker.Stored := False;\r\n {$ENDIF}\r\n FDigitalTimePicker.Width := Round(Width / 2);\r\n FDigitalTimePicker.ControlAlignment := caRight;\r\n FDigitalTimePicker.SelectedTime := t;\r\n FDigitalTimePicker.Editable := FEditable;\r\n FDigitalTimePicker.CloseOnSelection := FCloseOnSelection;\r\n FDigitalTimePicker.OnTimeSelected := TimeSelected;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomDateTimePicker.Clear;\r\nbegin\r\n FDatePicker.Clear;\r\n\r\n if Assigned(FDigitalTimePicker) then\r\n FDigitalTimePicker.Clear;\r\n\r\n if Assigned(FAnalogTimePicker) then\r\n FAnalogTimePicker.Clear;\r\n\r\n {$IFDEF FMXLIB}\r\n if Assigned(FDateEdit) then\r\n FDateEdit.Date := 0;\r\n\r\n if Assigned(FTimeEdit) then\r\n FTimeEdit.Time := 0;\r\n {$ENDIF}\r\nend;\r\n\r\nconstructor TTMSFNCCustomDateTimePicker.Create(AOwner: TComponent);\r\nbegin\r\n inherited;\r\n Width := 180;\r\n Height := 22;\r\n FEditable := False;\r\n FCloseOnSelection := True;\r\n FAllowNumericNullValue := True;\r\n FTimePickerMode := dtpmDigital;\r\n Fill.Color := MakeGraphicsColor(169, 169, 169);\r\n Stroke.Color := MakeGraphicsColor(169, 169, 169);\r\n\r\n FDatePicker := TTMSFNCDatePicker.Create(Self);\r\n FDatePicker.Parent := Self;\r\n {$IFDEF FMXLIB}\r\n FDatePicker.Stored := False;\r\n {$ENDIF}\r\n FDatePicker.ControlAlignment := caLeft;\r\n FDatePicker.Editable := FEditable;\r\n\r\n FDigitalTimePicker := TTMSFNCDigitalTimePicker.Create(Self);\r\n FDigitalTimePicker.Parent := Self;\r\n {$IFDEF FMXLIB}\r\n FDigitalTimePicker.Stored := False;\r\n {$ENDIF}\r\n FDigitalTimePicker.ControlAlignment := caRight;\r\n FDigitalTimePicker.Editable := FEditable;\r\n\r\n FAnalogTimePicker := nil;\r\n\r\n FDatePicker.OnDateSelected := DateSelected;\r\n FDigitalTimePicker.OnTimeSelected := TimeSelected;\r\n\r\n {$IFDEF FMXLIB}\r\n FNative := False;\r\n FDateEdit := nil;\r\n FTimeEdit := nil;\r\n {$ENDIF}\r\nend;\r\n\r\nprocedure TTMSFNCCustomDateTimePicker.DateSelected(Sender: TObject;\r\n ADate: TDate);\r\nbegin\r\n DoDateTimeChanged(SelectedDateTime);\r\n// if (FTimePickerMode = dtpmDigital) and Assigned(FDigitalTimePicker) then\r\n// begin\r\n //SelectedDateTime := ADate + FDigitalTimePicker.SelectedTime;\r\n// DoDateTimeChanged(SelectedDateTime);\r\n// end\r\n// else if (FTimePickerMode = dtpmAnalog) and Assigned(FAnalogTimePicker) then\r\n// begin\r\n //SelectedDateTime := ADate + FAnalogTimePicker.SelectedTime;\r\n// DoDateTimeChanged(SelectedDateTime);\r\n// end;\r\nend;\r\n\r\ndestructor TTMSFNCCustomDateTimePicker.Destroy;\r\nbegin\r\n FDatePicker.Free;\r\n\r\n if Assigned(FDigitalTimePicker) then\r\n FDigitalTimePicker.Free;\r\n\r\n if Assigned(FAnalogTimePicker) then\r\n FAnalogTimePicker.Free;\r\n\r\n {$IFDEF FMXLIB}\r\n if Assigned(FDateEdit) then\r\n FDateEdit.Free;\r\n\r\n if Assigned(FTimeEdit) then\r\n FTimeEdit.Free;\r\n {$ENDIF}\r\n\r\n inherited;\r\nend;\r\n\r\nprocedure TTMSFNCCustomDateTimePicker.DoDateTimeChanged(ADateTime: TDateTime);\r\nbegin\r\n if Assigned(OnDateTimeChanged) then\r\n OnDateTimeChanged(Self, ADateTime);\r\nend;\r\n\r\nfunction TTMSFNCCustomDateTimePicker.GetSelectedDateTime: TDateTime;\r\nbegin\r\n Result := 0.0;\r\n if Assigned(FDatePicker) {$IFDEF FMXLIB}and not Native{$ENDIF} then\r\n begin\r\n if Assigned(FDigitalTimePicker) then\r\n Result := FDatePicker.SelectedDate + FDigitalTimePicker.SelectedTime\r\n else if Assigned(FAnalogTimePicker) then\r\n Result := FDatePicker.SelectedDate + FAnalogTimePicker.SelectedTime\r\n end\r\n {$IFDEF FMXLIB}\r\n else if Assigned(FDateEdit) and Native then\r\n begin\r\n Result := FDateEdit.Date + FTimeEdit.Time;\r\n end{$ENDIF};\r\nend;\r\n\r\nfunction TTMSFNCCustomDateTimePicker.GetSubComponentArray: TTMSFNCStylesManagerComponentArray;\r\nvar\r\n arr: TTMSFNCStylesManagerComponentArray;\r\n m: TTMSFNCDateTimePickerMode;\r\nbegin\r\n SetLength(arr, 3);\r\n if not Assigned(FAnalogTimePicker) then\r\n begin\r\n m := TimePickerMode;\r\n TimePickerMode := dtpmAnalog;\r\n TimePickerMode := m;\r\n end;\r\n\r\n arr[0] := FDatePicker;\r\n arr[1] := FDigitalTimePicker;\r\n arr[2] := FAnalogTimePicker;\r\n\r\n Result := arr;\r\nend;\r\n\r\nfunction TTMSFNCCustomDateTimePicker.GetVersion: string;\r\nbegin\r\n Result := GetVersionNumber(MAJ_VER, MIN_VER, REL_VER, BLD_VER);\r\nend;\r\n\r\nprocedure TTMSFNCCustomDateTimePicker.Loaded;\r\nbegin\r\n inherited;\r\n {$IFDEF VCLLIB}\r\n {$HINTS OFF}\r\n {$IF (COMPILERVERSION >= 33) AND (COMPILERVERSION < 36)}\r\n if Assigned(FDigitalTimePicker) then\r\n FDigitalTimePicker.ScaleForPPI(CurrentPPI);\r\n\r\n if Assigned(FAnalogTimePicker) then\r\n FAnalogTimePicker.ScaleForPPI(CurrentPPI);\r\n\r\n FDatePicker.ScaleForPPI(CurrentPPI);\r\n {$IFEND}\r\n {$HINTS ON}\r\n {$ENDIF}\r\n\r\nend;\r\n\r\nprocedure TTMSFNCCustomDateTimePicker.SetAdaptToStyle(const Value: Boolean);\r\nbegin\r\n inherited;\r\n if Assigned(FDatePicker) then\r\n FDatePicker.AdaptToStyle := Value;\r\n\r\n if Assigned(FDigitalTimePicker) then\r\n FDigitalTimePicker.AdaptToStyle := Value;\r\n\r\n if Assigned(FAnalogTimePicker) then\r\n FAnalogTimePicker.AdaptToStyle := Value;\r\nend;\r\n\r\nprocedure TTMSFNCCustomDateTimePicker.SetAllowNumericNullValue(\r\n const Value: Boolean);\r\nbegin\r\n if FAllowNumericNullValue <> Value then\r\n begin\r\n FAllowNumericNullValue := Value;\r\n\r\n if Assigned(FDatePicker) then\r\n FDatePicker.AllowNumericNullValue := Value;\r\n\r\n if Assigned(FDigitalTimePicker) then\r\n FDigitalTimePicker.AllowNumericNullValue := Value;\r\n\r\n if Assigned(FAnalogTimePicker) then\r\n FAnalogTimePicker.AllowNumericNullValue := Value;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomDateTimePicker.SetCloseOnSelection(const Value: Boolean);\r\nbegin\r\n if FCloseOnSelection <> Value then\r\n begin\r\n FCloseOnSelection := Value;\r\n\r\n if Assigned(FDatePicker) then\r\n FDatePicker.CloseOnSelection := Value;\r\n\r\n if Assigned(FDigitalTimePicker) then\r\n FDigitalTimePicker.CloseOnSelection := Value;\r\n\r\n if Assigned(FAnalogTimePicker) then\r\n FAnalogTimePicker.CloseOnSelection := Value;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomDateTimePicker.SetEditable(const Value: Boolean);\r\nbegin\r\n if FEditable <> Value then\r\n begin\r\n FEditable := Value;\r\n if Assigned(FDatePicker) then\r\n FDatePicker.Editable := Value;\r\n\r\n if Assigned(FDigitalTimePicker) then\r\n FDigitalTimePicker.Editable := Value;\r\n\r\n if Assigned(FAnalogTimePicker) then\r\n FAnalogTimePicker.Editable := Value;\r\n end;\r\nend;\r\n\r\n{$IFDEF FMXLIB}\r\nprocedure TTMSFNCCustomDateTimePicker.DateEditChanged(Sender: TObject);\r\nbegin\r\n DoDateTimeChanged(FDateEdit.Date + FTimeEdit.Time);\r\nend;\r\n\r\nprocedure TTMSFNCCustomDateTimePicker.TimeEditChanged(Sender: TObject);\r\nbegin\r\n DoDateTimeChanged(FDateEdit.Date + FTimeEdit.Time);\r\nend;\r\n\r\nprocedure TTMSFNCCustomDateTimePicker.SetNative(const Value: Boolean);\r\nvar\r\n d: TDate;\r\n t: TTime;\r\nbegin\r\n if FNative <> Value then\r\n begin\r\n FNative := Value;\r\n\r\n d := Date;\r\n t := Time;\r\n if FNative then\r\n begin\r\n //Date\r\n if Assigned(FDatePicker) then\r\n begin\r\n d := FDatePicker.SelectedDate;\r\n FDatePicker.Parent := nil;\r\n end;\r\n\r\n if not Assigned(FDateEdit) then\r\n FDateEdit := TDateEdit.Create(Self);\r\n\r\n FDateEdit.Parent := Self;\r\n FDateEdit.Stored := False;\r\n FDateEdit.Date := d;\r\n FDateEdit.Width := Width / 2;\r\n FDateEdit.Align := TAlignLayout.Left;\r\n FDateEdit.OnChange := @DateEditChanged;\r\n\r\n //Time\r\n if Assigned(FAnalogTimePicker) and (TimePickerMode = dtpmAnalog) then\r\n begin\r\n t := FAnalogTimePicker.SelectedTime;\r\n FAnalogTimePicker.Parent := nil;\r\n end;\r\n\r\n if Assigned(FDigitalTimePicker) and (TimePickerMode = dtpmDigital) then\r\n begin\r\n t := FDigitalTimePicker.SelectedTime;\r\n FDigitalTimePicker.Parent := nil;\r\n end;\r\n\r\n if not Assigned(FTimeEdit) then\r\n FTimeEdit := TTimeEdit.Create(Self);\r\n\r\n FTimeEdit.Parent := Self;\r\n FTimeEdit.Stored := False;\r\n FTimeEdit.Time := t;\r\n FTimeEdit.Width := Width / 2;\r\n FTimeEdit.Align := TAlignLayout.Right;\r\n FTimeEdit.OnChange := @TimeEditChanged;\r\n end\r\n else\r\n begin\r\n //Date:\r\n if Assigned(FDateEdit) then\r\n begin\r\n d := FDateEdit.Date;\r\n FDateEdit.Parent := nil;\r\n end;\r\n\r\n if not Assigned(FDatePicker) then\r\n FDatePicker := TTMSFNCDatePicker.Create(Self);\r\n\r\n FDatePicker.Parent := Self;\r\n FDatePicker.Stored := False;\r\n FDatePicker.SelectedDate := d;\r\n FDatePicker.Width := Width / 2;\r\n FDatePicker.Align := TAlignLayout.Left;\r\n FDatePicker.OnDateSelected := DateSelected;\r\n\r\n //Time:\r\n if Assigned(FTimeEdit) then\r\n begin\r\n t := FTimeEdit.Time;\r\n FTimeEdit.Parent := nil;\r\n end;\r\n\r\n if TimePickerMode = dtpmAnalog then\r\n begin\r\n ChangeMode(dtpmAnalog);\r\n FAnalogTimePicker.SelectedTime := t;\r\n end\r\n else if TimePickerMode = dtpmDigital then\r\n begin\r\n ChangeMode(dtpmDigital);\r\n FDigitalTimePicker.SelectedTime := t;\r\n end;\r\n end\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomDateTimePicker.SetEnabled(const Value: Boolean);\r\n{$ENDIF}\r\n{$IFDEF CMNWEBLIB}\r\nprocedure TTMSFNCCustomDateTimePicker.SetEnabled(Value: Boolean);\r\n{$ENDIF}\r\nbegin\r\n inherited;\r\n if Assigned(FDatePicker) then\r\n FDatePicker.Enabled := Value;\r\n\r\n if Assigned(FDigitalTimePicker) then\r\n FDigitalTimePicker.Enabled := Value;\r\n\r\n if Assigned(FAnalogTimePicker) then\r\n FAnalogTimePicker.Enabled := Value;\r\n\r\n {$IFDEF FMXLIB}\r\n if Assigned(FDateEdit) then\r\n FDateEdit.Enabled := Value;\r\n\r\n if Assigned(FTimeEdit) then\r\n FTimeEdit.Enabled := Value;\r\n {$ENDIF}\r\n\r\n Invalidate;\r\nend;\r\n\r\nprocedure TTMSFNCCustomDateTimePicker.SetSelectedDateTime(\r\n const Value: TDateTime);\r\nvar\r\n tpv: TDateTime;\r\nbegin\r\n if Assigned(FDatePicker) then\r\n begin\r\n tpv := 0.0;\r\n FDatePicker.SelectedDate := Int(Value);\r\n\r\n {$IFDEF FMXLIB}\r\n if Assigned(FDateEdit) then\r\n FDateEdit.Date := Int(Value);\r\n\r\n if Assigned(FTimeEdit) then\r\n begin\r\n tpv := Frac(Value);\r\n FTimeEdit.Time := Frac(tpv);\r\n end;\r\n {$ENDIF}\r\n\r\n if Assigned(FDigitalTimePicker) then\r\n begin\r\n tpv := Frac(Value);\r\n FDigitalTimePicker.SelectedTime := Frac(tpv);\r\n end;\r\n\r\n if Assigned(FAnalogTimePicker) then\r\n begin\r\n tpv := Frac(Value);\r\n FAnalogTimePicker.SelectedTime := Frac(tpv);\r\n end;\r\n\r\n if (FDatePicker.SelectedDate + tpv) <> Value then\r\n DoDateTimeChanged(Value);\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomDateTimePicker.SetTimePickerMode(\r\n const Value: TTMSFNCDateTimePickerMode);\r\nbegin\r\n if (FTimePickerMode <> Value) {$IFDEF FMXLIB}and not Native{$ENDIF} then\r\n begin\r\n FTimePickerMode := Value;\r\n// if IsDesignTime then\r\n ChangeMode(Value);\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomDateTimePicker.TimeSelected(Sender: TObject;\r\n ATime: TTime);\r\nbegin\r\n //SelectedDateTime := FDatePicker.SelectedDate + ATime;\r\n DoDateTimeChanged(SelectedDateTime);\r\nend;\r\n\r\nprocedure TTMSFNCCustomDateTimePicker.UpdateControlAfterResize;\r\nbegin\r\n inherited;\r\n if Assigned(FDatePicker) then\r\n FDatePicker.Width := Round(Width / 2);\r\n\r\n if Assigned(FDigitalTimePicker) then\r\n FDigitalTimePicker.Width := Round(Width / 2);\r\n\r\n if Assigned(FAnalogTimePicker) then\r\n FAnalogTimePicker.Width := Round(Width / 2);\r\n\r\n {$IFDEF FMXLIB}\r\n if Assigned(FDateEdit) then\r\n FDateEdit.Width := Width / 2;\r\n\r\n if Assigned(FTimeEdit) then\r\n FTimeEdit.Width := Width / 2;\r\n {$ENDIF}\r\nend;\r\n\r\nend.\r\n","{********************************************************************}\r\n{ }\r\n{ written by TMS Software }\r\n{ copyright (c) 2020 - 2021 }\r\n{ Email : info@tmssoftware.com }\r\n{ Web : http://www.tmssoftware.com }\r\n{ }\r\n{ The source code is given as is. The author is not responsible }\r\n{ for any possible damage done due to the use of this code. }\r\n{ The complete source code remains property of the author and may }\r\n{ not be distributed, published, given or sold in any form as such. }\r\n{ No parts of the source code can be included in any other component }\r\n{ or application without written authorization of the author. }\r\n{********************************************************************}\r\n\r\nunit WEBLib.TMSFNCWebBrowser.WEB;\r\n\r\n{$I WEBLib.TMSFNCDefines.inc}\r\n\r\ninterface\r\n\r\nprocedure RegisterWebBrowserService;\r\nprocedure UnRegisterWebBrowserService;\r\n\r\nimplementation\r\n\r\nuses\r\n Classes, SysUtils, WEBLib.Controls, WEBLib.TMSFNCWebBrowser, WEBLib.TMSFNCUtils, WEBLib.TMSFNCTypes\r\n {$IFDEF WEBLIB}\r\n ,WEB\r\n {$ENDIF}\r\n ;\r\n\r\ntype\r\n TTMSFNCWEBWebBrowserService = class;\r\n\r\n TTMSFNCWEBWebBrowserService = class(TTMSFNCWebBrowserFactoryService)\r\n protected\r\n function DoCreateWebBrowser(const AValue: TTMSFNCCustomWebBrowser): ITMSFNCCustomWebBrowser; override;\r\n procedure DeleteCookies; override;\r\n end;\r\n\r\n TTMSFNCCustomWebBrowserProtected = class(TTMSFNCCustomWebBrowser);\r\n\r\n TTMSFNCWEBWebBrowser = class(TInterfacedObject, ITMSFNCCustomWebBrowser)\r\n private\r\n {$IFDEF WEBLIB}\r\n FCustomObjectMessage: Pointer;\r\n FCustomBridge: string;\r\n FCustomBridgeObject: TObject;\r\n {$ENDIF}\r\n FExternalBrowser: Boolean;\r\n FURL: string;\r\n FWebControl: TTMSFNCCustomWebBrowser;\r\n protected\r\n {$IFDEF WEBLIB}\r\n function HandleDoCustomObjectMessage(Event: TJSEvent): Boolean; virtual;\r\n procedure ClearMethodPointers;\r\n procedure GetMethodPointers;\r\n {$ENDIF}\r\n function GetUserAgent: string;\r\n procedure SetUserAgent(const Value: string);\r\n procedure BeforeChangeParent;\r\n procedure SetFocus;\r\n procedure ClearFocus;\r\n procedure SetCacheFolderName(const Value: string);\r\n procedure SetCacheFolder(const Value: string);\r\n procedure SetAutoClearCache(const Value: Boolean);\r\n procedure SetURL(const AValue: string);\r\n procedure SetExternalBrowser(const AValue: Boolean);\r\n procedure SetEnableContextMenu(const AValue: Boolean);\r\n procedure SetEnableShowDebugConsole(const AValue: Boolean);\r\n procedure SetEnableAcceleratorKeys(const AValue: Boolean);\r\n procedure ShowDebugConsole;\r\n procedure Navigate(const AURL: string); overload;\r\n procedure Navigate; overload;\r\n procedure LoadHTML(AHTML: String);\r\n procedure LoadFile(AFile: String);\r\n procedure GoForward;\r\n procedure GoBack;\r\n procedure Close;\r\n procedure Reload;\r\n procedure StopLoading;\r\n procedure UpdateVisible;\r\n procedure UpdateEnabled;\r\n procedure UpdateBounds;\r\n procedure Initialize;\r\n procedure ClearCache;\r\n procedure AddBridge(ABridgeName: string; ABridgeObject: TObject);\r\n procedure RemoveBridge(ABridgeName: string);\r\n procedure CaptureScreenshot(ACompleteEvent: TTMSFNCWebBrowserCaptureScreenShotCompleteEvent = nil);\r\n procedure DeInitialize;\r\n function GetExternalBrowser: Boolean;\r\n function GetEnableContextMenu: Boolean;\r\n function GetEnableShowDebugConsole: Boolean;\r\n function GetEnableAcceleratorKeys: Boolean;\r\n function GetURL: string;\r\n procedure ExecuteJavascript(AScript: String; ACompleteEvent: TTMSFNCWebBrowserJavaScriptCompleteEvent; ACallback: TNotifyEvent);\r\n function BodyInnerHTML: string;\r\n function DocumentReadyState: string;\r\n function NativeEnvironment: Pointer;\r\n function NativeBrowser: Pointer;\r\n function GetBrowserInstance: IInterface;\r\n function NativeDialog: Pointer;\r\n function IsFMXBrowser: Boolean;\r\n function CanGoBack: Boolean;\r\n function CanGoForward: Boolean;\r\n function GetCacheFolderName: string;\r\n function GetAutoClearCache: Boolean;\r\n function GetCacheFolder: string;\r\n procedure UpdateContentFromControl;\r\n property CacheFolderName: string read GetCacheFolderName write SetCacheFolderName;\r\n property AutoClearCache: Boolean read GetAutoClearCache write SetAutoClearCache;\r\n property CacheFolder: string read GetCacheFolder write SetCacheFolder;\r\n property UserAgent: string read GetUserAgent write SetUserAgent;\r\n public\r\n constructor Create(const AWebControl: TTMSFNCCustomWebBrowser);\r\n end;\r\n\r\nvar\r\n WebBrowserService: ITMSFNCWebBrowserService;\r\n\r\nprocedure RegisterWebBrowserService;\r\nbegin\r\n if not TTMSFNCWebBrowserPlatformServices.Current.SupportsPlatformService(ITMSFNCWebBrowserService, IInterface(WebBrowserService)) then\r\n begin\r\n WebBrowserService := TTMSFNCWEBWebBrowserService.Create;\r\n TTMSFNCWebBrowserPlatformServices.Current.AddPlatformService(ITMSFNCWebBrowserService, WebBrowserService);\r\n end;\r\nend;\r\n\r\nprocedure UnregisterWebBrowserService;\r\nbegin\r\n TTMSFNCWebBrowserPlatformServices.Current.RemovePlatformService(ITMSFNCWebBrowserService);\r\nend;\r\n\r\nfunction TTMSFNCWEBWebBrowser.GetBrowserInstance: IInterface;\r\nbegin\r\n Result := nil;\r\nend;\r\n\r\nfunction TTMSFNCWEBWebBrowser.GetCacheFolder: string;\r\nbegin\r\n Result := '';\r\nend;\r\n\r\nfunction TTMSFNCWEBWebBrowser.GetCacheFolderName: string;\r\nbegin\r\n Result := '';\r\nend;\r\n\r\nfunction TTMSFNCWEBWebBrowser.GetAutoClearCache: Boolean;\r\nbegin\r\n Result := False;\r\nend;\r\n\r\nfunction TTMSFNCWEBWebBrowser.GetExternalBrowser: Boolean;\r\nbegin\r\n Result := FExternalBrowser;\r\nend;\r\n\r\nfunction TTMSFNCWEBWebBrowser.GetURL: string;\r\nbegin\r\n Result := FURL;\r\nend;\r\n\r\nfunction TTMSFNCWEBWebBrowser.GetUserAgent: string;\r\nbegin\r\n Result := '';\r\nend;\r\n\r\nprocedure TTMSFNCWEBWebBrowser.GoBack;\r\nbegin\r\nend;\r\n\r\nprocedure TTMSFNCWEBWebBrowser.GoForward;\r\nbegin\r\nend;\r\n\r\nprocedure TTMSFNCWEBWebBrowser.Initialize;\r\nbegin\r\nend;\r\n\r\nfunction TTMSFNCWEBWebBrowser.GetEnableAcceleratorKeys: Boolean;\r\nbegin\r\n Result := False;\r\nend;\r\n\r\nfunction TTMSFNCWEBWebBrowser.GetEnableContextMenu: Boolean;\r\nbegin\r\n Result := False;\r\nend;\r\n\r\nfunction TTMSFNCWEBWebBrowser.GetEnableShowDebugConsole: Boolean;\r\nbegin\r\n Result := False;\r\nend;\r\n\r\nprocedure TTMSFNCWEBWebBrowser.SetCacheFolder(const Value: string);\r\nbegin\r\n\r\nend;\r\n\r\nprocedure TTMSFNCWEBWebBrowser.SetCacheFolderName(const Value: string);\r\nbegin\r\n\r\nend;\r\n\r\nprocedure TTMSFNCWEBWebBrowser.SetAutoClearCache(const Value: Boolean);\r\nbegin\r\n\r\nend;\r\n\r\n{$IFDEF WEBLIB}\r\nprocedure TTMSFNCWEBWebBrowser.ClearMethodPointers;\r\nbegin\r\n inherited;\r\n FCustomObjectMessage := nil;\r\nend;\r\n\r\nprocedure TTMSFNCWEBWebBrowser.GetMethodPointers;\r\nbegin\r\n inherited;\r\n if FCustomObjectMessage = nil then\r\n FCustomObjectMessage := @HandleDoCustomObjectMessage;\r\nend;\r\n\r\nfunction TTMSFNCWEBWebBrowser.HandleDoCustomObjectMessage(Event: TJSEvent): Boolean;\r\nvar\r\n s, t: string;\r\n b: ITMSFNCCustomWebBrowserBridge;\r\nbegin\r\n asm\r\n s = Event.detail;\r\n t = Event.type;\r\n end;\r\n\r\n if Assigned(FCustomBridgeObject) and (t = FCustomBridge) and Supports(FCustomBridgeObject, ITMSFNCCustomWebBrowserBridge, b) then\r\n b.ObjectMessage := s;\r\n\r\n Result := True;\r\nend;\r\n{$ENDIF}\r\n\r\nprocedure TTMSFNCWEBWebBrowser.AddBridge(ABridgeName: string;\r\n ABridgeObject: TObject);\r\n{$IFDEF WEBLIB}\r\nvar\r\n eh: TJSEventTarget;\r\n{$ENDIF}\r\nbegin\r\n {$IFDEF WEBLIB}\r\n if Assigned(FWebControl) and Assigned(TTMSFNCCustomWebBrowserProtected(FWebControl).ElementBindHandle) and (ABridgeName <> '') and Assigned(ABridgeObject) then\r\n begin\r\n GetMethodPointers;\r\n eh := TTMSFNCCustomWebBrowserProtected(FWebControl).ElementBindHandle;\r\n eh.addEventListener(ABridgeName, FCustomObjectMessage);\r\n FCustomBridge := ABridgeName;\r\n FCustomBridgeObject := ABridgeObject;\r\n end;\r\n {$ENDIF}\r\nend;\r\n\r\nfunction TTMSFNCWEBWebBrowser.BodyInnerHTML: string;\r\nbegin\r\n Result := '';\r\nend;\r\n\r\nfunction TTMSFNCWEBWebBrowser.IsFMXBrowser: Boolean;\r\nbegin\r\n Result := True;\r\nend;\r\n\r\nprocedure TTMSFNCWEBWebBrowser.LoadFile(AFile: String);\r\nbegin\r\nend;\r\n\r\nprocedure TTMSFNCWEBWebBrowser.LoadHTML(AHTML: String);\r\nbegin\r\n if Assigned(FWebControl) then\r\n begin\r\n {$IFDEF WEBLIB}\r\n if Assigned(FWebControl.ElementHandle) then\r\n FWebControl.ElementHandle.innerHTML := AHTML;\r\n {$ENDIF}\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCWEBWebBrowser.Navigate(const AURL: string);\r\nbegin\r\nend;\r\n\r\nfunction TTMSFNCWEBWebBrowser.NativeBrowser: Pointer;\r\nbegin\r\n Result := nil;\r\nend;\r\n\r\nfunction TTMSFNCWEBWebBrowser.NativeDialog: Pointer;\r\nbegin\r\n Result := nil;\r\nend;\r\n\r\nfunction TTMSFNCWEBWebBrowser.NativeEnvironment: Pointer;\r\nbegin\r\n Result := nil;\r\nend;\r\n\r\nprocedure TTMSFNCWEBWebBrowser.SetFocus;\r\nbegin\r\n\r\nend;\r\n\r\nprocedure TTMSFNCWEBWebBrowser.BeforeChangeParent;\r\nbegin\r\n\r\nend;\r\n\r\nprocedure TTMSFNCWEBWebBrowser.Navigate;\r\nbegin\r\n Navigate(FURL);\r\nend;\r\n\r\nprocedure TTMSFNCWEBWebBrowser.SetEnableAcceleratorKeys(const AValue: Boolean);\r\nbegin\r\n\r\nend;\r\n\r\nprocedure TTMSFNCWEBWebBrowser.SetEnableContextMenu(const AValue: Boolean);\r\nbegin\r\n\r\nend;\r\n\r\nprocedure TTMSFNCWEBWebBrowser.SetEnableShowDebugConsole(const AValue: Boolean);\r\nbegin\r\n\r\nend;\r\n\r\nprocedure TTMSFNCWEBWebBrowser.Reload;\r\nbegin\r\nend;\r\n\r\nprocedure TTMSFNCWEBWebBrowser.RemoveBridge(ABridgeName: string);\r\n{$IFDEF WEBLIB}\r\nvar\r\n eh: TJSEventTarget;\r\n{$ENDIF}\r\nbegin\r\n {$IFDEF WEBLIB}\r\n if Assigned(FWebControl) and Assigned(TTMSFNCCustomWebBrowserProtected(FWebControl).ElementBindHandle) and (ABridgeName <> '') then\r\n begin\r\n eh := TTMSFNCCustomWebBrowserProtected(FWebControl).ElementBindHandle;\r\n eh.removeEventListener(ABridgeName, FCustomObjectMessage);\r\n if ABridgeName = FCustomBridge then\r\n begin\r\n FCustomBridge := '';\r\n FCustomBridgeObject := nil;\r\n end;\r\n end;\r\n {$ENDIF}\r\nend;\r\n\r\nprocedure TTMSFNCWEBWebBrowser.SetExternalBrowser(const AValue: Boolean);\r\nbegin\r\n FExternalBrowser := AValue;\r\nend;\r\n\r\nprocedure TTMSFNCWEBWebBrowser.SetURL(const AValue: string);\r\nbegin\r\n FURL := AValue;\r\nend;\r\n\r\nprocedure TTMSFNCWEBWebBrowser.SetUserAgent(const Value: string);\r\nbegin\r\n\r\nend;\r\n\r\nprocedure TTMSFNCWEBWebBrowser.ShowDebugConsole;\r\nbegin\r\n\r\nend;\r\n\r\nprocedure TTMSFNCWEBWebBrowser.StopLoading;\r\nbegin\r\nend;\r\n\r\nprocedure TTMSFNCWEBWebBrowser.UpdateBounds;\r\nbegin\r\nend;\r\n\r\nprocedure TTMSFNCWEBWebBrowser.UpdateEnabled;\r\nbegin\r\nend;\r\n\r\nprocedure TTMSFNCWEBWebBrowser.UpdateVisible;\r\nbegin\r\nend;\r\n\r\nfunction TTMSFNCWEBWebBrowser.CanGoBack: Boolean;\r\nbegin\r\n Result := False;\r\nend;\r\n\r\nfunction TTMSFNCWEBWebBrowser.CanGoForward: Boolean;\r\nbegin\r\n Result := False;\r\nend;\r\n\r\nprocedure TTMSFNCWEBWebBrowser.CaptureScreenshot(ACompleteEvent: TTMSFNCWebBrowserCaptureScreenShotCompleteEvent = nil);\r\nbegin\r\n\r\nend;\r\n\r\nprocedure TTMSFNCWEBWebBrowser.ClearCache;\r\nbegin\r\n\r\nend;\r\n\r\nprocedure TTMSFNCWEBWebBrowser.ClearFocus;\r\nbegin\r\n\r\nend;\r\n\r\nprocedure TTMSFNCWEBWebBrowser.Close;\r\nbegin\r\n TTMSFNCCustomWebBrowserProtected(FWebControl).DoCloseForm;\r\nend;\r\n\r\nconstructor TTMSFNCWEBWebBrowser.Create(const AWebControl: TTMSFNCCustomWebBrowser);\r\nbegin\r\n FExternalBrowser := False;\r\n FWebControl := AWebControl;\r\n {$IFDEF WEBLIB}\r\n ClearMethodPointers;\r\n {$ENDIF}\r\n if Assigned(FWebControl) then\r\n TTMSFNCCustomWebBrowserProtected(FWebControl).Initialized;\r\n\r\nend;\r\n\r\nprocedure TTMSFNCWEBWebBrowser.DeInitialize;\r\nbegin\r\nend;\r\n\r\nfunction TTMSFNCWEBWebBrowser.DocumentReadyState: string;\r\nbegin\r\n\r\nend;\r\n\r\nprocedure TTMSFNCWEBWebBrowser.UpdateContentFromControl;\r\nbegin\r\n\r\nend;\r\n\r\nprocedure TTMSFNCWEBWebBrowser.ExecuteJavascript(AScript: String; ACompleteEvent: TTMSFNCWebBrowserJavaScriptCompleteEvent; ACallback: TNotifyEvent);\r\nvar\r\n v, s, id, ssub: string;\r\n res, sc, sn: string;\r\n ps: Integer;\r\n p, psub: Integer;\r\n {$IFDEF WEBLIB}\r\n e: TJSHTMLElement;\r\n {$ENDIF}\r\nbegin\r\n id := StringReplace(CreateNewGUID, '{', '', [rfReplaceAll]);\r\n id := StringReplace(id, '}', '', [rfReplaceAll]);\r\n id := StringReplace(id, '-', '', [rfReplaceAll]);\r\n v := 'executeScript' + id;\r\n ssub := 'function ' + v + '(){' + #13#10;\r\n if Pos('function ', AScript) = 1 then\r\n begin\r\n sc := AScript;\r\n ps := Pos('function ', AScript) + 9;\r\n sn := Copy(AScript, ps, Pos('(', AScript) - ps);\r\n sc := StringReplace(sc, sn + '();', '', [rfReplaceAll]);\r\n ssub := ssub + ' return (' + sc + ')();' + #13#10\r\n end\r\n else\r\n ssub := ssub + ' return ' + AScript + #13#10;\r\n ssub := ssub + '}';\r\n\r\n {$IFDEF WEBLIB}\r\n e := FWebControl.ElementHandle;\r\n\r\n asm\r\n var script = document.createElement('script');\r\n script.id = id;\r\n script.text = ssub;\r\n var ctx;\r\n\r\n if (e && e.ownerDocument) {\r\n e.ownerDocument.body.append(script);\r\n ctx = e.ownerDocument.defaultView;\r\n }\r\n else{\r\n document.body.append(script);\r\n ctx = document.body.defaultView;\r\n }\r\n end;\r\n\r\n {$ENDIF}\r\n\r\n s := v;\r\n\r\n {$IFDEF WEBLIB}\r\n asm\r\n function functionFromString(context, funcDef, funcParam) {\r\n try {\r\n var fn = new Function(\"return function() {return this.\" + funcDef + \"(\" + funcParam + \")};\");\r\n return fn();\r\n } catch (e) {\r\n return (function() {});\r\n }\r\n }\r\n\r\n function mainfunc (context, func, p){\r\n var f = functionFromString(context, func, p);\r\n return f.apply(context);\r\n }\r\n\r\n var obj;\r\n res = mainfunc(ctx, s, obj);\r\n if (res) {\r\n res = res.toString();\r\n }\r\n else\r\n {\r\n res = \"\";\r\n }\r\n end;\r\n {$ENDIF}\r\n if Assigned(ACompleteEvent) then\r\n ACompleteEvent(res);\r\n\r\n if Assigned(ACallback) then\r\n ACallback(Self);\r\n\r\n {$IFDEF WEBLIB}\r\n asm\r\n var exScript = document.getElementById(id);\r\n if (exScript){\r\n exScript.parentNode.removeChild(exScript);\r\n }\r\n end;\r\n {$ENDIF}\r\nend;\r\n\r\n{ TTMSFNCWEBWebBrowserService }\r\n\r\nprocedure TTMSFNCWEBWebBrowserService.DeleteCookies;\r\nbegin\r\nend;\r\n\r\nfunction TTMSFNCWEBWebBrowserService.DoCreateWebBrowser(const AValue: TTMSFNCCustomWebBrowser): ITMSFNCCustomWebBrowser;\r\nbegin\r\n Result := TTMSFNCWEBWebBrowser.Create(AValue);\r\nend;\r\n\r\nend.\r\n","{********************************************************************}\r\n{ }\r\n{ written by TMS Software }\r\n{ copyright (c) 2020 - 2024 }\r\n{ Email : info@tmssoftware.com }\r\n{ Web : http://www.tmssoftware.com }\r\n{ }\r\n{ The source code is given as is. The author is not responsible }\r\n{ for any possible damage done due to the use of this code. }\r\n{ The complete source code remains property of the author and may }\r\n{ not be distributed, published, given or sold in any form as such. }\r\n{ No parts of the source code can be included in any other component }\r\n{ or application without written authorization of the author. }\r\n{********************************************************************}\r\n\r\nunit WEBLib.TMSFNCMapsCommonTypes;\r\n\r\n{$I WEBLib.TMSFNCDefines.inc}\r\n\r\n{$IFDEF WEBLIB}\r\n{$DEFINE LCLWEBLIB}\r\n{$ENDIF}\r\n{$IFDEF LCLLIB}\r\n{$DEFINE LCLWEBLIB}\r\n{$ENDIF}\r\n\r\ninterface\r\n\r\nuses\r\n Classes, WEBLib.TMSFNCTypes\r\n {$IFNDEF LCLWEBLIB}\r\n ,XmlIntf, XMLDom, XMLDoc\r\n {$ENDIF}\r\n {$IFDEF LCLLIB}\r\n ,XMLRead, XMLWrite, DOM\r\n {$ENDIF}\r\n {$IFDEF WEBLIB}\r\n ,web\r\n {$ENDIF}\r\n ;\r\n\r\nconst\r\n DEFAULT_LOCALE = 'en-US';\r\n DEFAULT_LATITUDE = 40.689247;\r\n DEFAULT_LONGITUDE = -74.044502;\r\n DEFAULT_ICONURL = 'https://cdn.mapmarker.io/api/v1/pin?text=P&size=50&hoffset=1';\r\n\r\ntype\r\n TTMSFNCMapsAnchorPointRec = record\r\n X: Single;\r\n Y: Single;\r\n end;\r\n\r\n TTMSFNCMapsCoordinateRec = record\r\n Longitude: Double;\r\n Latitude: Double;\r\n Elevation: Double;\r\n TimeStamp: TDateTime;\r\n HasElevation: Boolean;\r\n HasTimeStamp: Boolean;\r\n DataObject: TObject;\r\n Description: String;\r\n Weight: Double;\r\n end;\r\n\r\n TTMSFNCMapsCoordinateRecArray = array of TTMSFNCMapsCoordinateRec;\r\n TTMSFNCMapsCoordinateRecArrayArray = array of TTMSFNCMapsCoordinateRecArray;\r\n TTMSFNCMapsCoordinateRecArrayArrayArray = array of TTMSFNCMapsCoordinateRecArrayArray;\r\n\r\n {$IFDEF WEBLIB}\r\n TDomNode = TJSNode;\r\n TXMLDocument = TJSDocument;\r\n\r\n TJSNodeListHelper = class helper for TJSNodeList\r\n function FindNode(ANodeName: string): TJSNode;\r\n function IndexOf(const Name: string): NativeInt; overload;\r\n function GetCount: NativeInt;\r\n property Count: NativeInt read GetCount;\r\n end;\r\n {$ENDIF}\r\n\r\n {$IFNDEF LCLWEBLIB}\r\n TTMSFNCMapsXMLNode = IXMLNode;\r\n TTMSFNCMapsXMLDocument = IXMLDocument;\r\n TTMSFNCMapsXMLDomNode = IDOMNode;\r\n {$ELSE}\r\n TTMSFNCMapsXMLNode = TDomNode;\r\n TTMSFNCMapsXMLDomNode = TDomNode;\r\n TTMSFNCMapsXMLDocument = TXMLDocument;\r\n {$ENDIF}\r\n\r\n TTMSFNCMapsGPXTrackRec = record\r\n Segments: TTMSFNCMapsCoordinateRecArrayArray;\r\n Name: string;\r\n end;\r\n\r\n TTMSFNCMapsGPXMetaData = record\r\n AuthorName: string;\r\n AuthorLink: string;\r\n TrackName: string;\r\n TrackType: string;\r\n end;\r\n\r\n TTMSFNCMapsGPXWayPointRec = record\r\n WayPoint: TTMSFNCMapsCoordinateRec;\r\n Name: string;\r\n Elevation: Double;\r\n HasElevation: Boolean;\r\n Comment: string;\r\n Description: string;\r\n Symbol: string;\r\n Link: string;\r\n TimeStamp: TDateTime;\r\n HasTimeStamp: Boolean;\r\n WayPointType: string;\r\n end;\r\n\r\n TTMSFNCMapsGPXWayPointRecArray = array of TTMSFNCMapsGPXWayPointRec;\r\n\r\n TTMSFNCMapsGPXRec = record\r\n Tracks: array of TTMSFNCMapsGPXTrackRec;\r\n WayPoints: TTMSFNCMapsGPXWayPointRecArray;\r\n end;\r\n\r\n TTMSFNCMapsGPXTrackEventData = class(TPersistent)\r\n private\r\n FNode: TTMSFNCMapsXMLDOMNode;\r\n FData: TTMSFNCMapsGPXTrackRec;\r\n public\r\n constructor Create; virtual;\r\n destructor Destroy; override;\r\n property Data: TTMSFNCMapsGPXTrackRec read FData write FData;\r\n property Node: TTMSFNCMapsXMLDOMNode read FNode write FNode;\r\n end;\r\n\r\n TTMSFNCMapsGPXSegmentEventData = class(TPersistent)\r\n private\r\n FNode: TTMSFNCMapsXMLDOMNode;\r\n FData: TTMSFNCMapsCoordinateRec;\r\n public\r\n constructor Create; virtual;\r\n destructor Destroy; override;\r\n property Data: TTMSFNCMapsCoordinateRec read FData write FData;\r\n property Node: TTMSFNCMapsXMLDOMNode read FNode write FNode;\r\n end;\r\n\r\n TTMSFNCMapsGPXWayPointEventData = class(TPersistent)\r\n private\r\n FNode: TTMSFNCMapsXMLDOMNode;\r\n FData: TTMSFNCMapsGPXWayPointRec;\r\n public\r\n constructor Create; virtual;\r\n destructor Destroy; override;\r\n property Data: TTMSFNCMapsGPXWayPointRec read FData write FData;\r\n property Node: TTMSFNCMapsXMLDOMNode read FNode write FNode;\r\n end;\r\n\r\n TTMSFNCMapsGPXTrackEvent = procedure(Sender: TObject; AEventData: TTMSFNCMapsGPXTrackEventData) of object;\r\n TTMSFNCMapsGPXSegmentEvent = procedure(Sender: TObject; AEventData: TTMSFNCMapsGPXSegmentEventData) of object;\r\n TTMSFNCMapsGPXWayPointEvent = procedure(Sender: TObject; AEventData: TTMSFNCMapsGPXWayPointEventData) of object;\r\n\r\n TTMSFNCMapsLocaleMode = (mlmDefault, mlmCountry, mlmLanguage);\r\n\r\n TTMSFNCMapsBoundsRec = record\r\n NorthEast: TTMSFNCMapsCoordinateRec;\r\n SouthWest: TTMSFNCMapsCoordinateRec;\r\n end;\r\n\r\n TTMSFNCMapsCoordinate = class(TPersistent)\r\n private\r\n FDataBoolean: Boolean;\r\n FDataString: String;\r\n FDataObject: TObject;\r\n FDataInteger: NativeInt;\r\n FDataPointer: Pointer;\r\n FLatitude: Double;\r\n FLongitude: Double;\r\n FOnChange: TNotifyEvent;\r\n procedure SetLatitude(const Value: Double);\r\n procedure SetLongitude(const Value: Double);\r\n function IsLatitudeStored: Boolean;\r\n function IsLongitudeStored: Boolean;\r\n function GetToRec: TTMSFNCMapsCoordinateRec;\r\n procedure SetToRec(const Value: TTMSFNCMapsCoordinateRec);\r\n protected\r\n procedure UpdateCoordinate; virtual;\r\n public\r\n constructor Create; overload; virtual;\r\n constructor Create(ACoordinate: TTMSFNCMapsCoordinateRec); overload; virtual;\r\n constructor Create(ALatitude: Double; ALongitude: Double); overload; virtual;\r\n procedure Assign(Source: TPersistent); override;\r\n property DataPointer: Pointer read FDataPointer write FDataPointer;\r\n property DataBoolean: Boolean read FDataBoolean write FDataBoolean;\r\n property DataObject: TObject read FDataObject write FDataObject;\r\n property DataString: String read FDataString write FDataString;\r\n property DataInteger: NativeInt read FDataInteger write FDataInteger;\r\n property OnChange: TNotifyEvent read FOnChange write FOnChange;\r\n property ToRec: TTMSFNCMapsCoordinateRec read GetToRec write SetToRec;\r\n published\r\n property Longitude: Double read FLongitude write SetLongitude stored IsLongitudeStored nodefault;\r\n property Latitude: Double read FLatitude write SetLatitude stored IsLatitudeStored nodefault;\r\n end;\r\n\r\n TTMSFNCMapsBounds = class(TPersistent)\r\n private\r\n FNorthEast: TTMSFNCMapsCoordinate;\r\n FSouthWest: TTMSFNCMapsCoordinate;\r\n FOnChange: TNotifyEvent;\r\n FDataPointer: Pointer;\r\n FDataBoolean: Boolean;\r\n FDataString: String;\r\n FDataObject: TObject;\r\n FDataInteger: NativeInt;\r\n function GetToRec: TTMSFNCMapsBoundsRec;\r\n procedure SetToRec(const Value: TTMSFNCMapsBoundsRec);\r\n protected\r\n procedure DoCoordinateChanged(Sender: TObject);\r\n public\r\n constructor Create; overload; virtual;\r\n constructor Create(ANorthEast: TTMSFNCMapsCoordinateRec; ASouthWest: TTMSFNCMapsCoordinateRec); overload; virtual;\r\n procedure Assign(Source: TPersistent); override;\r\n property DataPointer: Pointer read FDataPointer write FDataPointer;\r\n property DataBoolean: Boolean read FDataBoolean write FDataBoolean;\r\n property DataObject: TObject read FDataObject write FDataObject;\r\n property DataString: String read FDataString write FDataString;\r\n property DataInteger: NativeInt read FDataInteger write FDataInteger;\r\n destructor Destroy; override;\r\n property ToRec: TTMSFNCMapsBoundsRec read GetToRec write SetToRec;\r\n property OnChange: TNotifyEvent read FOnChange write FOnChange;\r\n published\r\n property NorthEast: TTMSFNCMapsCoordinate read FNorthEast;\r\n property SouthWest: TTMSFNCMapsCoordinate read FSouthWest;\r\n end;\r\n\r\n TTMSFNCMapsCoordinateItem = class(TCollectionItem)\r\n private\r\n FOwner: TPersistent;\r\n FDataBoolean: Boolean;\r\n FDataString: String;\r\n FDataObject: TObject;\r\n FDataInteger: NativeInt;\r\n FDataPointer: Pointer;\r\n FCoordinate: TTMSFNCMapsCoordinate;\r\n procedure SetCoordinate(const Value: TTMSFNCMapsCoordinate);\r\n function GetLatitude: Double;\r\n function GetLongitude: Double;\r\n procedure SetLatitude(const Value: Double);\r\n procedure SetLongitude(const Value: Double);\r\n function IsLatitudeStored: Boolean;\r\n function IsLongitudeStored: Boolean;\r\n protected\r\n procedure UpdateCoordinateItem; virtual;\r\n procedure CoordinateChanged(Sender: TObject);\r\n public\r\n constructor Create(ACollection: TCollection); override;\r\n procedure Assign(Source: TPersistent); override;\r\n destructor Destroy; override;\r\n property DataPointer: Pointer read FDataPointer write FDataPointer;\r\n property DataBoolean: Boolean read FDataBoolean write FDataBoolean;\r\n property DataObject: TObject read FDataObject write FDataObject;\r\n property DataString: String read FDataString write FDataString;\r\n property DataInteger: NativeInt read FDataInteger write FDataInteger;\r\n property Coordinate: TTMSFNCMapsCoordinate read FCoordinate write SetCoordinate;\r\n published\r\n property Longitude: Double read GetLongitude write SetLongitude stored IsLongitudeStored nodefault;\r\n property Latitude: Double read GetLatitude write SetLatitude stored IsLatitudeStored nodefault;\r\n end;\r\n\r\n {$IFDEF WEBLIB}\r\n TTMSFNCMapsCoordinates = class(TTMSFNCOwnedCollection)\r\n {$ELSE}\r\n TTMSFNCMapsCoordinates = class({$IFDEF LCLLIB}specialize {$ENDIF}TTMSFNCOwnedCollection)\r\n {$ENDIF}\r\n private\r\n FBounds: TTMSFNCMapsBounds;\r\n FOwner: TPersistent;\r\n FOnBeginUpdate: TNotifyEvent;\r\n FOnEndUpdate: TNotifyEvent;\r\n FOnUpdateCoordinates: TNotifyEvent;\r\n function GetItem(Index: Integer): TTMSFNCMapsCoordinateItem;\r\n procedure SetItem(Index: Integer; const Value: TTMSFNCMapsCoordinateItem);\r\n function GetBounds: TTMSFNCMapsBounds;\r\n function GetArray: TTMSFNCMapsCoordinateRecArray;\r\n procedure SetArray(const Value: TTMSFNCMapsCoordinateRecArray);\r\n protected\r\n function CreateItemClass: TCollectionItemClass; virtual;\r\n function GetOwner: TPersistent; override;\r\n procedure UpdateCoordinates; virtual;\r\n public\r\n constructor Create(AOwner: TPersistent); virtual;\r\n destructor Destroy; override;\r\n property Items[Index: Integer]: TTMSFNCMapsCoordinateItem read GetItem write SetItem; default;\r\n procedure Clear; virtual;\r\n function Add: TTMSFNCMapsCoordinateItem;\r\n property Bounds: TTMSFNCMapsBounds read GetBounds;\r\n function Insert(Index: Integer): TTMSFNCMapsCoordinateItem;\r\n property OnBeginUpdate: TNotifyEvent read FOnBeginUpdate write FOnBeginUpdate;\r\n property OnEndUpdate: TNotifyEvent read FOnEndUpdate write FOnEndUpdate;\r\n property OnUpdateCoordinates: TNotifyEvent read FOnUpdateCoordinates write FOnUpdateCoordinates;\r\n property ToArray: TTMSFNCMapsCoordinateRecArray read GetArray write SetArray;\r\n end;\r\n\r\n TTMSFNCMapsBasePoint = class(TPersistent)\r\n private\r\n FX: Single;\r\n FY: Single;\r\n FOnChange: TNotifyEvent;\r\n procedure SetY(const Value: Single);\r\n procedure SetX(const Value: Single);\r\n function IsYStored: Boolean;\r\n function IsXStored: Boolean;\r\n protected\r\n procedure UpdatePoint;\r\n public\r\n constructor Create; virtual;\r\n procedure Assign(Source: TPersistent); override;\r\n property OnChange: TNotifyEvent read FOnChange write FOnChange;\r\n protected\r\n property X: Single read FX write SetX stored IsXStored;\r\n property Y: Single read FY write SetY stored IsYStored;\r\n end;\r\n\r\n TTMSFNCMapsAnchorPoint = class(TTMSFNCMapsBasePoint)\r\n published\r\n property X;\r\n property Y;\r\n end;\r\n\r\n TTMSFNCMapsPlusCode = class\r\n private const\r\n SeparatorPosition: Integer = 8;\r\n SeparatorCharacter: Char = '+';\r\n PaddingCharacter: Char = '0';\r\n GridColumns: Integer = 4;\r\n GridRows: Integer = 5;\r\n CodeAlphaBet: array[0..19] of string = ('2', '3', '4', '5', '6', '7', '8', '9', 'C', 'F', 'G', 'H', 'J', 'M', 'P', 'Q', 'R', 'V', 'W', 'X');\r\n EncodingBase: Integer = 20;\r\n LatitudeMax: Integer = 90;\r\n LongitudeMax: Integer = 180;\r\n GridRowsMultiplier: Integer = 3125;\r\n GridColumnsMultiplier: Integer = 1024;\r\n LatIntegerMultiplier: Int64 = 25000000;\r\n LngIntegerMultiplier: Int64 = 8192000;\r\n LatMspValue: Int64 = 10000000000;\r\n LngMspValue: Int64 = 3276800000;\r\n PairCodeLength: Integer = 10;\r\n MaxDigitCount: Integer = 15;\r\n GridCodeLength: Integer = 5;\r\n protected\r\n class function DigitValueOf(digit: Char): Integer;\r\n public\r\n class function Encode(ACoordinate: TTMSFNCMapsCoordinateRec): string;\r\n class function Decode(APlusCode: string): TTMSFNCMapsBoundsRec;\r\n end;\r\n\r\nfunction CenterCoordinate: TTMSFNCMapsCoordinateRec;\r\nfunction DefaultCoordinate: TTMSFNCMapsCoordinateRec;\r\nfunction EmptyCoordinate: TTMSFNCMapsCoordinateRec;\r\nfunction CreateCoordinate(const ALatitude: Double; const ALongitude: Double): TTMSFNCMapsCoordinateRec;\r\nfunction CreateBounds(ACoordinate1, ACoordinate2: TTMSFNCMapsCoordinateRec): TTMSFNCMapsBoundsRec; overload;\r\nfunction CreateBounds(ACoordinates: TTMSFNCMapsCoordinateRecArray): TTMSFNCMapsBoundsRec; overload;\r\nfunction CreateBounds(ACoordinatesArray: TTMSFNCMapsCoordinateRecArrayArray): TTMSFNCMapsBoundsRec; overload;\r\nfunction CreateBounds(ACoordinatesArrayArray: TTMSFNCMapsCoordinateRecArrayArrayArray): TTMSFNCMapsBoundsRec; overload;\r\nfunction CreateBounds(ANorthLatitude, AEastLongitude, ASouthLatitude, AWestLongitude: Double): TTMSFNCMapsBoundsRec; overload;\r\nfunction CreateCircle(ACenter: TTMSFNCMapsCoordinateRec; ARadius: Double): TTMSFNCMapsCoordinateRecArray;\r\nfunction BoundsCenter(ABounds: TTMSFNCMapsBoundsRec): TTMSFNCMapsCoordinateRec;\r\nfunction BoundsRectangle(ABounds: TTMSFNCMapsBoundsRec): TTMSFNCMapsCoordinateRecArray;\r\nfunction MeasureDistance(ACoordinate1: TTMSFNCMapsCoordinateRec; ACoordinate2: TTMSFNCMapsCoordinateRec): Double;\r\nfunction MeasureArea(ACoordinatesArray: TTMSFNCMapsCoordinateRecArray): Double;\r\nfunction FindNearestCoordinate(ACoordinate: TTMSFNCMapsCoordinateRec; ACoordinatesArray: TTMSFNCMapsCoordinateRecArray): Integer;\r\nfunction IsPointInArea(ALatitude: Double; ALongitude: Double; ACoordinatesArray: TTMSFNCMapsCoordinateRecArray): Boolean;\r\nfunction CalculateCoordinate(ACoordinate: TTMSFNCMapsCoordinateRec; ABearing: Double; ADistance: Double): TTMSFNCMapsCoordinateRec;\r\nfunction CalculateBearing(ACoordinate1: TTMSFNCMapsCoordinateRec; ACoordinate2: TTMSFNCMapsCoordinateRec): Double;\r\nfunction ParseLocale(ALocale: string; AMode: TTMSFNCMapsLocaleMode = mlmDefault): string;\r\nfunction LoadResourceFile(AResName: string): string;\r\nfunction DefaultGPXMetaData: TTMSFNCMapsGPXMetaData;\r\nfunction EmptyGPXWayPoint: TTMSFNCMapsGPXWayPointRec;\r\nfunction CreateGPXMetaData(AAuthorName, AAuthorLink, ATrackName, ATrackType: string): TTMSFNCMapsGPXMetaData;\r\nfunction SaveToGPX(ACoordinates: TTMSFNCMapsCoordinateRecArray; AMetaData: TTMSFNCMapsGPXMetaData;\r\n IncludeElevation: Boolean = True; IncludeTimeStamp: Boolean = True; AInstructions: string = ''; AWayPoints: TTMSFNCMapsGPXWayPointRecArray = nil): string; overload;\r\nfunction SaveToGPX(ASegments: TTMSFNCMapsCoordinateRecArrayArray; AMetaData: TTMSFNCMapsGPXMetaData;\r\n IncludeElevation: Boolean = True; IncludeTimeStamp: Boolean = True; AInstructions: TStringList = nil; AWayPoints: TTMSFNCMapsGPXWayPointRecArray = nil): string; overload;\r\nfunction BoolToStrEx(AValue: Boolean): string;\r\nfunction TryCatchStart: string;\r\nfunction TryCatchEnd(AErrorMessagePrefix: string): string;\r\n\r\nimplementation\r\n\r\nuses\r\n WEBLib.TMSFNCUtils, SysUtils, Math;\r\n\r\n{$R 'TMSFNCMaps.res'}\r\n\r\nconst\r\n// EarthRadius = 6371000;\r\n EarthRadius = 6378137;\r\n LB = #13;\r\n GETSENDEVENT = 'sendEvent';\r\n\r\nfunction TryCatchStart(): string;\r\nbegin\r\n Result := ' try{' + LB;\r\nend;\r\n\r\nfunction TryCatchEnd(AErrorMessagePrefix: string): string;\r\nvar\r\n sprefix: string;\r\nbegin\r\n sprefix := 'TMS FNC Maps error';\r\n if AErrorMessagePrefix <> '' then\r\n begin\r\n sprefix := AErrorMessagePrefix;\r\n end;\r\n\r\n Result := '} catch (err) {' + LB +\r\n ' console.error(err);' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"Error\", \"' + sprefix + ': \" + err.message));' + LB +\r\n '}' + LB;\r\nend;\r\n\r\nfunction BoolToStrEx(AValue: Boolean): string;\r\nbegin\r\n if AValue then\r\n Result := 'true'\r\n else\r\n Result := 'false';\r\nend;\r\n\r\nfunction CreateGPXMetaData(AAuthorName, AAuthorLink, ATrackName, ATrackType: string): TTMSFNCMapsGPXMetaData;\r\nvar\r\n md: TTMSFNCMapsGPXMetaData;\r\nbegin\r\n md.AuthorName := AAuthorName;\r\n md.AuthorLink := AAuthorLink;\r\n md.TrackName := ATrackName;\r\n md.TrackType := ATrackType;\r\nend;\r\n\r\nfunction DefaultGPXMetaData: TTMSFNCMapsGPXMetaData;\r\nbegin\r\n Result := CreateGPXMetaData('TMS', 'http://www.tmssoftware.com', 'MyTrack', 'Track');\r\nend;\r\n\r\nfunction ParseLocale(ALocale: string; AMode: TTMSFNCMapsLocaleMode = mlmDefault): string;\r\nvar\r\n s: string;\r\n sl: TStringList;\r\nbegin\r\n Result := ALocale;\r\n\r\n case AMode of\r\n mlmCountry, mlmLanguage:\r\n begin\r\n s := Result;\r\n sl := TStringList.Create;\r\n try\r\n TTMSFNCUtils.Split('-', s, sl);\r\n if sl.Count >= 2 then\r\n begin\r\n case AMode of\r\n mlmCountry: Result := sl[0];\r\n mlmLanguage: Result := sl[1];\r\n end;\r\n end;\r\n finally\r\n sl.Free;\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\nfunction CalculateBearing(ACoordinate1: TTMSFNCMapsCoordinateRec; ACoordinate2: TTMSFNCMapsCoordinateRec): Double;\r\nvar\r\n a1, a2, d1, x, y, a: Double;\r\nbegin\r\n a1 := DegToRad(ACoordinate1.Latitude);\r\n a2 := DegToRad(ACoordinate2.Latitude);\r\n d1 := DegToRad(ACoordinate2.Longitude - ACoordinate1.Longitude);\r\n x := Cos(a1) * Sin(a2) - Sin(a1) * Cos(a2) * Cos(d1);\r\n y := Sin(d1) * Cos(a2);\r\n a := ArcTan2(y, x);\r\n Result := RadToDeg(a);\r\nend;\r\n\r\nfunction CalculateCoordinate(ACoordinate: TTMSFNCMapsCoordinateRec; ABearing: Double; ADistance: Double): TTMSFNCMapsCoordinateRec;\r\nvar\r\n a, ad, r, a1, sina2, a2, y, x, d1, d2: Double;\r\nbegin\r\n r := EarthRadius;\r\n a := ADistance / r;\r\n ad := DegToRad(ABearing);\r\n\r\n a1 := DegToRad(ACoordinate.Latitude);\r\n d1 := DegToRad(ACoordinate.Longitude);\r\n sina2 := Sin(a1) * Cos(a) + Cos(a1) * Sin(a) * Cos(ad);\r\n a2 := ArcSin(sina2);\r\n y := Sin(ad) * Sin(a) * Cos(a1);\r\n x := Cos(a) - Sin(a1) * sina2;\r\n d2 := d1 + ArcTan2(y, x);\r\n\r\n Result.Latitude := RadToDeg(a2);\r\n Result.Longitude := RadToDeg(d2);\r\nend;\r\n\r\nfunction MeasureDistance(ACoordinate1: TTMSFNCMapsCoordinateRec; ACoordinate2: TTMSFNCMapsCoordinateRec): Double;\r\nvar\r\n r, a1, a2, d1, d2, a, c: Double;\r\nbegin\r\n r := EarthRadius;\r\n a1 := DegToRad(ACoordinate1.Latitude);\r\n a2 := DegToRad(ACoordinate2.Latitude);\r\n d1 := DegToRad(ACoordinate2.Latitude - ACoordinate1.Latitude);\r\n d2 := DegToRad(ACoordinate2.Longitude - ACoordinate1.Longitude);\r\n\r\n a := Sin(d1 / 2) * Sin(d1 / 2) + Cos(a1) * Cos(a2) * Sin(d2 / 2) * Sin(d2 / 2);\r\n c := 2 * ArcTan2(SQRT(a), SQRT(1 - a));\r\n Result := r * c;\r\nend;\r\n\r\nfunction FindNearestCoordinate(ACoordinate: TTMSFNCMapsCoordinateRec; ACoordinatesArray: TTMSFNCMapsCoordinateRecArray): Integer;\r\nvar\r\n I: Integer;\r\n Distance, MinDistance: Double;\r\nbegin\r\n Result := -1;\r\n MinDistance := 0;\r\n for I := 0 to Length(ACoordinatesArray) - 1 do\r\n begin\r\n Distance := MeasureDistance(ACoordinate, ACoordinatesArray[I]);\r\n if (Distance < MinDistance) or (MinDistance = 0) then\r\n begin\r\n MinDistance := Distance;\r\n Result := I;\r\n end;\r\n end;\r\nend;\r\n\r\nfunction MeasureArea(ACoordinatesArray: TTMSFNCMapsCoordinateRecArray): Double;\r\nvar\r\n i, pointsCount: Integer;\r\n area, d2r, radius: Double;\r\n p1, p2: TTMSFNCMapsCoordinateRec;\r\nbegin\r\n pointsCount := Length(ACoordinatesArray);\r\n area := 0;\r\n d2r := Pi / 180;\r\n radius := EarthRadius;\r\n\r\n if pointsCount <= 2 then\r\n begin\r\n area := 0;\r\n end\r\n else\r\n begin\r\n\r\n for i := 0 to pointsCount - 1 do\r\n begin\r\n p1 := ACoordinatesArray[i];\r\n p2 := ACoordinatesArray[(i + 1) mod pointsCount];\r\n area := area + ((p2.Longitude - p1.Longitude) * d2r) *\r\n (2 + Sin(p1.Latitude * d2r) + Sin(p2.Latitude * d2r));\r\n end;\r\n area := area * radius * radius / 2.0;\r\n area := abs(area);\r\n end;\r\n\r\n Result := area;\r\nend;\r\n\r\nfunction IsPointInArea(ALatitude: Double; ALongitude: Double; ACoordinatesArray: TTMSFNCMapsCoordinateRecArray): Boolean;\r\nvar\r\n i, j, pointsCount: Integer;\r\n x, xi, xj, y, yi, yj: Double;\r\nbegin\r\n pointsCount := Length(ACoordinatesArray);\r\n Result := False;\r\n\r\n x := ALatitude;\r\n y := ALongitude;\r\n j := pointsCount - 1;\r\n\r\n for i := 0 to pointsCount - 1 do\r\n begin\r\n xi := ACoordinatesArray[i].Latitude;\r\n yi := ACoordinatesArray[i].Longitude;\r\n\r\n xj := ACoordinatesArray[j].Latitude;\r\n yj := ACoordinatesArray[j].Longitude;\r\n\r\n// Result := ((yi > y) <> (yj > y)) and (x < (xj - xi) * (y - yi) / (yj - yi) + xi);\r\n\r\n if (((yi < y) and (yj >= y) or (yj < y) and (yi >= y)) and ((xi <= x) or (xj <= x))) then\r\n begin\r\n Result := Result xor ((xi + (y-yi)*(xj-xi)/(yj-yi)) < x);\r\n end;\r\n\r\n j := i;\r\n end;\r\nend;\r\n\r\nfunction BoundsCenter(ABounds: TTMSFNCMapsBoundsRec): TTMSFNCMapsCoordinateRec;\r\nbegin\r\n Result.Longitude := (ABounds.SouthWest.Longitude + ABounds.NorthEast.Longitude) / 2;\r\n Result.Latitude := (ABounds.SouthWest.Latitude + ABounds.NorthEast.Latitude) / 2;\r\nend;\r\n\r\nfunction BoundsRectangle(ABounds: TTMSFNCMapsBoundsRec): TTMSFNCMapsCoordinateRecArray;\r\nbegin\r\n SetLength(Result, 5);\r\n Result[0] := CreateCoordinate(ABounds.NorthEast.Latitude, ABounds.SouthWest.Longitude);\r\n Result[1] := ABounds.NorthEast;\r\n Result[2] := CreateCoordinate(ABounds.SouthWest.Latitude, ABounds.NorthEast.Longitude);\r\n Result[3] := ABounds.SouthWest;\r\n Result[4] := Result[0];\r\nend;\r\n\r\nfunction CreateBounds(ANorthLatitude, AEastLongitude, ASouthLatitude, AWestLongitude: Double): TTMSFNCMapsBoundsRec; overload;\r\nbegin\r\n Result.NorthEast := CreateCoordinate(ANorthLatitude, AEastLongitude);\r\n Result.SouthWest := CreateCoordinate(ASouthLatitude, AWestLongitude);\r\nend;\r\n\r\nfunction CreateBounds(ACoordinatesArrayArray: TTMSFNCMapsCoordinateRecArrayArrayArray): TTMSFNCMapsBoundsRec;\r\nvar\r\n maxlat, minlat: double;\r\n maxlon, minlon: double;\r\n i, j, k: Integer;\r\nbegin\r\n maxlon := -180;\r\n maxlat := -90;\r\n minlon := 180;\r\n minlat := 90;\r\n\r\n for i := 0 to Length(ACoordinatesArrayArray) - 1 do\r\n begin\r\n for j := 0 to Length(ACoordinatesArrayArray[I]) - 1 do\r\n begin\r\n for k := 0 to Length(ACoordinatesArrayArray[I][J]) - 1 do\r\n begin\r\n if ACoordinatesArrayArray[i][j][k].Longitude < minlon then\r\n minlon := ACoordinatesArrayArray[i][j][k].Longitude;\r\n\r\n if ACoordinatesArrayArray[i][j][k].Latitude < minlat then\r\n minlat := ACoordinatesArrayArray[i][j][k].Latitude;\r\n\r\n if ACoordinatesArrayArray[i][j][k].Longitude > maxlon then\r\n maxlon := ACoordinatesArrayArray[i][j][k].Longitude;\r\n\r\n if ACoordinatesArrayArray[i][j][k].Latitude > maxlat then\r\n maxlat := ACoordinatesArrayArray[i][j][k].Latitude;\r\n end;\r\n end;\r\n end;\r\n\r\n if (maxlon = -180) then\r\n maxlon := 180;\r\n\r\n if (maxlat = -90) then\r\n maxlat := 90;\r\n\r\n if (minlon = 180) then\r\n minlon := -180;\r\n\r\n if (minlat = 90) then\r\n minlat := -90;\r\n\r\n Result.NorthEast.Latitude := maxlat;\r\n Result.NorthEast.Longitude := maxlon;\r\n\r\n Result.SouthWest.Latitude := minlat;\r\n Result.SouthWest.Longitude := minlon;\r\n\r\nend;\r\n\r\nfunction CreateBounds(ACoordinatesArray: TTMSFNCMapsCoordinateRecArrayArray): TTMSFNCMapsBoundsRec;\r\nvar\r\n arr: TTMSFNCMapsCoordinateRecArrayArrayArray;\r\nbegin\r\n SetLength(arr, 1);\r\n arr[0] := ACoordinatesArray;\r\n Result := CreateBounds(arr);\r\nend;\r\n\r\nfunction CreateBounds(ACoordinate1, ACoordinate2: TTMSFNCMapsCoordinateRec): TTMSFNCMapsBoundsRec;\r\nvar\r\n arr: TTMSFNCMapsCoordinateRecArray;\r\nbegin\r\n SetLength(arr, 2);\r\n arr[0] := ACoordinate1;\r\n arr[1] := ACoordinate2;\r\n Result := CreateBounds(arr);\r\nend;\r\n\r\nfunction CreateBounds(ACoordinates: TTMSFNCMapsCoordinateRecArray): TTMSFNCMapsBoundsRec;\r\nvar\r\n arr: TTMSFNCMapsCoordinateRecArrayArrayArray;\r\n arrc: TTMSFNCMapsCoordinateRecArrayArray;\r\nbegin\r\n SetLength(arrc, 1);\r\n arrc[0] := ACoordinates;\r\n SetLength(arr, 1);\r\n arr[0] := arrc;\r\n Result := CreateBounds(arr);\r\nend;\r\n\r\nfunction EmptyGPXWayPoint: TTMSFNCMapsGPXWayPointRec;\r\nbegin\r\n Result.WayPoint.Latitude := 0;\r\n Result.WayPoint.Longitude := 0;\r\n Result.Elevation := 0;\r\n Result.TimeStamp := 0;\r\n Result.HasElevation := False;\r\n Result.HasTimeStamp := False;\r\n Result.Name := '';\r\n Result.Comment := '';\r\n Result.Description := '';\r\n Result.Symbol := '';\r\n Result.Link := '';\r\n Result.WayPointType := '';\r\nend;\r\n\r\nfunction EmptyCoordinate: TTMSFNCMapsCoordinateRec;\r\nbegin\r\n Result.Latitude := 0;\r\n Result.Longitude := 0;\r\n Result.Elevation := 0;\r\n Result.TimeStamp := 0;\r\n Result.HasElevation := False;\r\n Result.HasTimeStamp := False;\r\n Result.DataObject := nil;\r\nend;\r\n\r\nfunction DefaultCoordinate: TTMSFNCMapsCoordinateRec;\r\nbegin\r\n Result.Latitude := DEFAULT_LATITUDE;\r\n Result.Longitude := DEFAULT_LONGITUDE;\r\n Result.Elevation := 0;\r\n Result.TimeStamp := 0;\r\n Result.HasElevation := False;\r\n Result.HasTimeStamp := False;\r\n Result.DataObject := nil;\r\nend;\r\n\r\nfunction CenterCoordinate: TTMSFNCMapsCoordinateRec;\r\nbegin\r\n Result.Latitude := 0;\r\n Result.Longitude := 0;\r\n Result.Elevation := 0;\r\n Result.TimeStamp := 0;\r\n Result.HasElevation := False;\r\n Result.HasTimeStamp := False;\r\n Result.DataObject := nil;\r\nend;\r\n\r\nfunction CreateCircle(ACenter: TTMSFNCMapsCoordinateRec; ARadius: Double): TTMSFNCMapsCoordinateRecArray;\r\nvar\r\n I: Integer;\r\nconst\r\n stp = 100;\r\nbegin\r\n for I := 0 to stp do\r\n begin\r\n SetLength(Result, Length(Result) + 1);\r\n Result[Length(Result) - 1] := CalculateCoordinate(ACenter, I * -360 / stp, ARadius);\r\n end;\r\nend;\r\n\r\nfunction CreateCoordinate(const ALatitude: Double; const ALongitude: Double): TTMSFNCMapsCoordinateRec;\r\nbegin\r\n Result.Latitude := ALatitude;\r\n Result.Longitude := ALongitude;\r\n Result.Elevation := 0;\r\n Result.TimeStamp := 0;\r\n Result.HasElevation := False;\r\n Result.HasTimeStamp := False;\r\n Result.DataObject := nil;\r\nend;\r\n\r\n{ TTMSFNCMapsCoordinates }\r\n\r\nfunction TTMSFNCMapsCoordinates.Add: TTMSFNCMapsCoordinateItem;\r\nbegin\r\n Result := TTMSFNCMapsCoordinateItem(inherited Add);\r\nend;\r\n\r\nprocedure TTMSFNCMapsCoordinates.Clear;\r\nvar\r\n ci: TCollectionItem;\r\nbegin\r\n if Assigned(OnBeginUpdate) then\r\n OnBeginUpdate(Self);\r\n\r\n if Count > 0 then\r\n begin\r\n while Count > 0 do\r\n begin\r\n ci := TCollectionItem(Items[Count - 1]);\r\n ci.Free;\r\n end;\r\n end;\r\n\r\n if Assigned(OnEndUpdate) then\r\n OnEndUpdate(Self);\r\nend;\r\n\r\nconstructor TTMSFNCMapsCoordinates.Create(AOwner: TPersistent);\r\nbegin\r\n inherited Create(AOwner, CreateItemClass);\r\n FOwner := AOwner;\r\nend;\r\n\r\nfunction TTMSFNCMapsCoordinates.CreateItemClass: TCollectionItemClass;\r\nbegin\r\n Result := TTMSFNCMapsCoordinateItem;\r\nend;\r\n\r\ndestructor TTMSFNCMapsCoordinates.Destroy;\r\nbegin\r\n if Assigned(FBounds) then\r\n FBounds.Free;\r\n inherited;\r\nend;\r\n\r\nfunction TTMSFNCMapsCoordinates.GetArray: TTMSFNCMapsCoordinateRecArray;\r\nvar\r\n I: Integer;\r\n r: TTMSFNCMapsCoordinateRec;\r\nbegin\r\n SetLength(Result, Count);\r\n for I := 0 to Count - 1 do\r\n begin\r\n r.Longitude := Self[I].Longitude;\r\n r.Latitude := Self[I].Latitude;\r\n r.Elevation := 0;\r\n r.TimeStamp := 0;\r\n r.HasElevation := False;\r\n r.HasTimeStamp := False;\r\n r.DataObject := nil;\r\n Result[I] := r;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCMapsCoordinates.GetBounds: TTMSFNCMapsBounds;\r\nvar\r\n b: TTMSFNCMapsBoundsRec;\r\nbegin\r\n if not Assigned(FBounds) then\r\n FBounds := TTMSFNCMapsBounds.Create;\r\n\r\n b := CreateBounds(ToArray);\r\n\r\n FBounds.NorthEast.Longitude := b.NorthEast.Longitude;\r\n FBounds.NorthEast.Latitude := b.NorthEast.Latitude;\r\n FBounds.SouthWest.Longitude := b.SouthWest.Longitude;\r\n FBounds.SouthWest.Latitude := b.SouthWest.Latitude;\r\n\r\n Result := FBounds;\r\nend;\r\n\r\nfunction TTMSFNCMapsCoordinates.GetItem(\r\n Index: Integer): TTMSFNCMapsCoordinateItem;\r\nbegin\r\n Result := TTMSFNCMapsCoordinateItem(inherited Items[Index]);\r\nend;\r\n\r\nfunction TTMSFNCMapsCoordinates.GetOwner: TPersistent;\r\nbegin\r\n Result := FOwner;\r\nend;\r\n\r\nfunction TTMSFNCMapsCoordinates.Insert(\r\n Index: Integer): TTMSFNCMapsCoordinateItem;\r\nbegin\r\n Result := TTMSFNCMapsCoordinateItem(inherited Insert(Index));\r\nend;\r\n\r\nprocedure TTMSFNCMapsCoordinates.SetArray(\r\n const Value: TTMSFNCMapsCoordinateRecArray);\r\nvar\r\n I: Integer;\r\n c: TTMSFNCMapsCoordinateItem;\r\nbegin\r\n Clear;\r\n\r\n for I := 0 to Length(Value) - 1 do\r\n begin\r\n c := Add;\r\n c.Latitude := Value[I].Latitude;\r\n c.Longitude := Value[I].Longitude;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCMapsCoordinates.SetItem(Index: Integer;\r\n const Value: TTMSFNCMapsCoordinateItem);\r\nbegin\r\n inherited Items[Index] := Value;\r\nend;\r\n\r\nprocedure TTMSFNCMapsCoordinates.UpdateCoordinates;\r\nbegin\r\n if Assigned(OnUpdateCoordinates) then\r\n OnUpdateCoordinates(Self);\r\nend;\r\n\r\n{ TTMSFNCMapsCoordinateItem }\r\n\r\nprocedure TTMSFNCMapsCoordinateItem.Assign(Source: TPersistent);\r\nbegin\r\n if Source is TTMSFNCMapsCoordinateItem then\r\n FCoordinate.Assign((Source as TTMSFNCMapsCoordinateItem).Coordinate);\r\nend;\r\n\r\nconstructor TTMSFNCMapsCoordinateItem.Create(ACollection: TCollection);\r\nbegin\r\n inherited;\r\n if Assigned(ACollection) then\r\n FOwner := (Collection as TTMSFNCMapsCoordinates).FOwner;\r\n\r\n FCoordinate := TTMSFNCMapsCoordinate.Create;\r\n FCoordinate.OnChange := @CoordinateChanged;\r\n\r\n UpdateCoordinateItem;\r\nend;\r\n\r\ndestructor TTMSFNCMapsCoordinateItem.Destroy;\r\nbegin\r\n FCoordinate.Free;\r\n inherited;\r\n UpdateCoordinateItem;\r\nend;\r\n\r\nfunction TTMSFNCMapsCoordinateItem.GetLatitude: Double;\r\nbegin\r\n Result := Coordinate.Latitude;\r\nend;\r\n\r\nfunction TTMSFNCMapsCoordinateItem.GetLongitude: Double;\r\nbegin\r\n Result := Coordinate.Longitude;\r\nend;\r\n\r\nfunction TTMSFNCMapsCoordinateItem.IsLatitudeStored: Boolean;\r\nbegin\r\n Result := Latitude <> DEFAULT_LATITUDE;\r\nend;\r\n\r\nfunction TTMSFNCMapsCoordinateItem.IsLongitudeStored: Boolean;\r\nbegin\r\n Result := Longitude <> DEFAULT_LONGITUDE;\r\nend;\r\n\r\nprocedure TTMSFNCMapsCoordinateItem.CoordinateChanged(Sender: TObject);\r\nbegin\r\n UpdateCoordinateItem;\r\nend;\r\n\r\nprocedure TTMSFNCMapsCoordinateItem.SetCoordinate(const Value: TTMSFNCMapsCoordinate);\r\nbegin\r\n if FCoordinate <> Value then\r\n begin\r\n FCoordinate.Assign(Value);\r\n UpdateCoordinateItem;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCMapsCoordinateItem.SetLatitude(const Value: Double);\r\nbegin\r\n Coordinate.Latitude := Value;\r\nend;\r\n\r\nprocedure TTMSFNCMapsCoordinateItem.SetLongitude(const Value: Double);\r\nbegin\r\n Coordinate.Longitude := Value;\r\nend;\r\n\r\nprocedure TTMSFNCMapsCoordinateItem.UpdateCoordinateItem;\r\nbegin\r\n if (Collection is TTMSFNCMapsCoordinates) then\r\n (Collection as TTMSFNCMapsCoordinates).UpdateCoordinates;\r\nend;\r\n\r\n{ TTMSFNCMapsBounds }\r\n\r\nprocedure TTMSFNCMapsBounds.Assign(Source: TPersistent);\r\nbegin\r\n if Source is TTMSFNCMapsBounds then\r\n begin\r\n FNorthEast.Assign((Source as TTMSFNCMapsBounds).NorthEast);\r\n FSouthWest.Assign((Source as TTMSFNCMapsBounds).SouthWest);\r\n end;\r\nend;\r\n\r\nconstructor TTMSFNCMapsBounds.Create(ANorthEast: TTMSFNCMapsCoordinateRec; ASouthWest: TTMSFNCMapsCoordinateRec);\r\nbegin\r\n FNorthEast := TTMSFNCMapsCoordinate.Create(ANorthEast);\r\n FNorthEast.OnChange := @DoCoordinateChanged;\r\n FSouthWest := TTMSFNCMapsCoordinate.Create(ASouthWest);\r\n FSouthWest.OnChange := @DoCoordinateChanged;\r\nend;\r\n\r\nconstructor TTMSFNCMapsBounds.Create;\r\nbegin\r\n FNorthEast := TTMSFNCMapsCoordinate.Create;\r\n FSouthWest := TTMSFNCMapsCoordinate.Create;\r\nend;\r\n\r\ndestructor TTMSFNCMapsBounds.Destroy;\r\nbegin\r\n FNorthEast.Free;\r\n FSouthWest.Free;\r\n inherited;\r\nend;\r\n\r\nprocedure TTMSFNCMapsBounds.DoCoordinateChanged(Sender: TObject);\r\nbegin\r\n if Assigned(OnChange) then\r\n OnChange(Self);\r\nend;\r\n\r\nfunction TTMSFNCMapsBounds.GetToRec: TTMSFNCMapsBoundsRec;\r\nvar\r\n r: TTMSFNCMapsBoundsRec;\r\n ne, sw: TTMSFNCMapsCoordinateRec;\r\nbegin\r\n ne := Self.NorthEast.ToRec;\r\n sw := Self.SouthWest.ToRec;\r\n r.NorthEast := ne;\r\n r.SouthWest := sw;\r\n Result := r;\r\nend;\r\n\r\nprocedure TTMSFNCMapsBounds.SetToRec(const Value: TTMSFNCMapsBoundsRec);\r\nbegin\r\n Self.NorthEast.ToRec := Value.NorthEast;\r\n Self.SouthWest.ToRec := Value.SouthWest;\r\nend;\r\n\r\n{ TTMSFNCMapsCoordinate }\r\n\r\nprocedure TTMSFNCMapsCoordinate.Assign(Source: TPersistent);\r\nbegin\r\n if Source is TTMSFNCMapsCoordinate then\r\n begin\r\n FLatitude := (Source as TTMSFNCMapsCoordinate).Latitude;\r\n FLongitude := (Source as TTMSFNCMapsCoordinate).Longitude;\r\n end;\r\nend;\r\n\r\nconstructor TTMSFNCMapsCoordinate.Create;\r\nbegin\r\n FLatitude := DEFAULT_LATITUDE;\r\n FLongitude := DEFAULT_LONGITUDE;\r\nend;\r\n\r\nconstructor TTMSFNCMapsCoordinate.Create(ACoordinate: TTMSFNCMapsCoordinateRec);\r\nbegin\r\n FLatitude := ACoordinate.Latitude;\r\n FLongitude := ACoordinate.Longitude;\r\nend;\r\n\r\nconstructor TTMSFNCMapsCoordinate.Create(ALatitude, ALongitude: Double);\r\nbegin\r\n Create(CreateCoordinate(ALatitude, ALongitude));\r\nend;\r\n\r\nfunction TTMSFNCMapsCoordinate.GetToRec: TTMSFNCMapsCoordinateRec;\r\nvar\r\n c: TTMSFNCMapsCoordinateRec;\r\nbegin\r\n c.Longitude := Longitude;\r\n c.Latitude := Latitude;\r\n c.Elevation := 0;\r\n c.TimeStamp := 0;\r\n c.HasElevation := False;\r\n c.HasTimeStamp := False;\r\n c.DataObject := nil;\r\n Result := c;\r\nend;\r\n\r\nfunction TTMSFNCMapsCoordinate.IsLatitudeStored: Boolean;\r\nbegin\r\n Result := Latitude <> DEFAULT_LATITUDE;\r\nend;\r\n\r\nfunction TTMSFNCMapsCoordinate.IsLongitudeStored: Boolean;\r\nbegin\r\n Result := Longitude <> DEFAULT_LONGITUDE;\r\nend;\r\n\r\nprocedure TTMSFNCMapsCoordinate.UpdateCoordinate;\r\nbegin\r\n if Assigned(OnChange) then\r\n OnChange(Self);\r\nend;\r\n\r\nprocedure TTMSFNCMapsCoordinate.SetLatitude(const Value: Double);\r\nbegin\r\n if FLatitude <> Value then\r\n begin\r\n FLatitude := Value;\r\n UpdateCoordinate;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCMapsCoordinate.SetLongitude(const Value: Double);\r\nbegin\r\n if FLongitude <> Value then\r\n begin\r\n FLongitude := Value;\r\n UpdateCoordinate;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCMapsCoordinate.SetToRec(const Value: TTMSFNCMapsCoordinateRec);\r\nbegin\r\n Self.Latitude := Value.Latitude;\r\n Self.Longitude := Value.Longitude;\r\nend;\r\n\r\n{ TTMSFNCMapsBasePoint }\r\n\r\nprocedure TTMSFNCMapsBasePoint.Assign(Source: TPersistent);\r\nbegin\r\n if (Source is TTMSFNCMapsBasePoint) then\r\n begin\r\n FX := (Source as TTMSFNCMapsBasePoint).X;\r\n FY := (Source as TTMSFNCMapsBasePoint).Y;\r\n end;\r\nend;\r\n\r\nconstructor TTMSFNCMapsBasePoint.Create;\r\nbegin\r\n FX := 0;\r\n FY := 0;\r\nend;\r\n\r\nfunction TTMSFNCMapsBasePoint.IsYStored: Boolean;\r\nbegin\r\n Result := Y <> 0;\r\nend;\r\n\r\nfunction TTMSFNCMapsBasePoint.IsXStored: Boolean;\r\nbegin\r\n Result := X <> 0;\r\nend;\r\n\r\nprocedure TTMSFNCMapsBasePoint.SetY(const Value: Single);\r\nbegin\r\n if FY <> Value then\r\n begin\r\n FY := Value;\r\n UpdatePoint;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCMapsBasePoint.SetX(const Value: Single);\r\nbegin\r\n if FX <> Value then\r\n begin\r\n FX := Value;\r\n UpdatePoint;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCMapsBasePoint.UpdatePoint;\r\nbegin\r\n if Assigned(OnChange) then\r\n OnChange(Self);\r\nend;\r\n\r\n{ TTMSFNCMapsPlusCode }\r\n\r\nclass function TTMSFNCMapsPlusCode.Decode(\r\n APlusCode: string): TTMSFNCMapsBoundsRec;\r\nvar\r\n latVal, lngVal, latPlaceVal, lngPlaceVal: Int64;\r\n pairPartLength, codeLength: Integer;\r\n I: Integer;\r\n digit, row, col: Integer;\r\n\r\n function NormalizeCode(ACode: string): string;\r\n var\r\n K: Integer;\r\n begin\r\n Result := ACode;\r\n if Length(ACode) < SeparatorPosition then\r\n begin\r\n Result := ACode;\r\n for K := 0 to SeparatorPosition - Length(ACode) - 1 do\r\n Result := Result + PaddingCharacter;\r\n\r\n Result := Result + SeparatorCharacter;\r\n end\r\n else if Length(ACode) = SeparatorPosition then\r\n Result := ACode + SeparatorCharacter\r\n else if ACode[SeparatorPosition{$IFNDEF ZEROSTRINGINDEX}+1{$ENDIF}] <> SeparatorCharacter then\r\n Result := Copy(ACode, 0, SeparatorPosition) + SeparatorCharacter + Copy(ACode, SeparatorPosition + 1, Length(ACode) - SeparatorPosition);\r\n end;\r\nbegin\r\n APlusCode := NormalizeCode(UpperCase(APlusCode));\r\n APlusCode := StringReplace(APlusCode, SeparatorCharacter, '', [rfReplaceAll]);\r\n APlusCode := StringReplace(APlusCode, PaddingCharacter, '', [rfReplaceAll]);\r\n\r\n latVal := -LatitudeMax * LatIntegerMultiplier;\r\n lngVal := -LongitudeMax * LngIntegerMultiplier;\r\n\r\n latPlaceVal := LatMspValue;\r\n lngPlaceVal := LngMspValue;\r\n\r\n pairPartLength := Min(Length(APlusCode), PairCodeLength);\r\n codeLength := Min(Length(APlusCode), MaxDigitCount);\r\n\r\n i := 0;\r\n while i < pairPartLength do\r\n begin\r\n latPlaceVal := latPlaceVal div EncodingBase;\r\n lngPlaceVal := lngPlaceVal div EncodingBase;\r\n latVal := latVal + DigitValueOf(APlusCode[i {$IFNDEF ZEROSTRINGINDEX} + 1 {$ENDIF}]) * latPlaceVal;\r\n lngVal := lngVal + DigitValueOf(APlusCode[i {$IFNDEF ZEROSTRINGINDEX} + 1 {$ENDIF} + 1]) * lngPlaceVal;\r\n Inc(i, 2);\r\n end;\r\n\r\n i := PairCodeLength;\r\n while i < codeLength do\r\n begin\r\n latPlaceVal := latPlaceVal div GridRows;\r\n lngPlaceVal := lngPlaceVal div GridColumns;\r\n digit := DigitValueOf(APlusCode[i {$IFNDEF ZEROSTRINGINDEX} + 1 {$ENDIF}]);\r\n row := digit div GridColumns;\r\n col := digit mod GridColumns;\r\n latVal := latVal + row * latPlaceVal;\r\n lngVal := lngVal + col * lngPlaceVal;\r\n Inc(I);\r\n end;\r\n\r\n Result := CreateBounds((latVal + latPlaceVal) / LatIntegerMultiplier, (lngVal + lngPlaceVal) / LngIntegerMultiplier,\r\n latVal / LatIntegerMultiplier, lngVal / LngIntegerMultiplier);\r\nend;\r\n\r\nclass function TTMSFNCMapsPlusCode.DigitValueOf(digit: Char): Integer;\r\nbegin\r\n Result := TTMSFNCUtils.IndexOfTextInArray(digit, CodeAlphaBet);\r\nend;\r\n\r\nclass function TTMSFNCMapsPlusCode.Encode(\r\n ACoordinate: TTMSFNCMapsCoordinateRec): string;\r\nconst\r\n codeLength: Integer = 10;\r\nvar\r\n latDigit, lngDigit, latitude, longitude, latVal, lngVal: Double;\r\n I, K, ndx: Integer;\r\n s: string;\r\n\r\n function ClipLatitude(ALatitude: Double): Double;\r\n begin\r\n Result := Min(Max(ALatitude, -LatitudeMax), LatitudeMax);\r\n end;\r\n\r\n function NormalizeLongitude(ALongitude: Double): Double;\r\n begin\r\n Result := ALongitude;\r\n while Result < -LongitudeMax do\r\n Result := Result + LongitudeMax * 2;\r\n\r\n while Result >= LongitudeMax do\r\n Result := Result - LongitudeMax * 2;\r\n end;\r\n\r\n function ComputeLatitudePrecision(ACodeLength: Integer): Double;\r\n begin\r\n if ACodeLength <= 10 then\r\n begin\r\n Result := Power(EncodingBase, ACodeLength / -2 + 2);\r\n Exit;\r\n end;\r\n\r\n Result := Power(EncodingBase, -2) / Power(GridRows, ACodeLength - PairCodeLength);\r\n end;\r\n\r\n function FModEx(const ANumerator, ADenominator: Double): Double;\r\n begin\r\n Result := ANumerator - Trunc(ANumerator / ADenominator) * ADenominator;\r\n end;\r\n\r\nbegin\r\n Result := '';\r\n\r\n latitude := ClipLatitude(ACoordinate.Latitude);\r\n longitude := NormalizeLongitude(ACoordinate.Longitude);\r\n\r\n if Int(latitude) = LatitudeMax then\r\n latitude := latitude - 0.9 * ComputeLatitudePrecision(codeLength);\r\n\r\n latVal := Round((latitude + LatitudeMax) * LatIntegerMultiplier * 1E6) / 1E6;\r\n lngVal := Round((longitude + LongitudeMax) * LngIntegerMultiplier * 1E6) / 1E6;\r\n\r\n if codeLength > PairCodeLength then\r\n begin\r\n for I := 0 to GridCodeLength - 1 do\r\n begin\r\n latDigit := FModEx(latVal, GridRows);\r\n lngDigit := FModEx(lngVal, GridColumns);\r\n ndx := Round(Int(latDigit * GridColumns + lngDigit));\r\n s := CodeAlphaBet[ndx] + s;\r\n latVal := latVal / GridRows;\r\n lngVal := lngVal / GridColumns;\r\n end;\r\n end\r\n else\r\n begin\r\n latVal := latVal / GridRowsMultiplier;\r\n lngVal := lngVal / GridColumnsMultiplier;\r\n end;\r\n\r\n for I := 0 to (PairCodeLength div 2) - 1 do\r\n begin\r\n s := CodeAlphaBet[Round(Int(FModEx(lngVal, EncodingBase)))] + s;\r\n s := CodeAlphaBet[Round(Int(FModEx(latVal, EncodingBase)))] + s;\r\n latVal := latVal / EncodingBase;\r\n lngVal := lngVal / EncodingBase;\r\n end;\r\n\r\n s := Copy(s, 0, SeparatorPosition) + SeparatorCharacter + Copy(s, SeparatorPosition + 1, Length(s) - SeparatorPosition);\r\n\r\n if codeLength >= SeparatorPosition then\r\n begin\r\n Result := Copy(s, 0, codeLength + 1);\r\n Exit;\r\n end;\r\n\r\n Result := Copy(s, 0, codeLength);\r\n for K := 0 to SeparatorPosition - codeLength - 1 do\r\n Result := Result + PaddingCharacter;\r\n\r\n Result := Result + SeparatorCharacter;\r\nend;\r\n\r\n{ TTMSFNCMapsGPXTrackEventData }\r\n\r\nconstructor TTMSFNCMapsGPXTrackEventData.Create;\r\nbegin\r\n FNode := nil;\r\nend;\r\n\r\ndestructor TTMSFNCMapsGPXTrackEventData.Destroy;\r\nbegin\r\n inherited;\r\nend;\r\n\r\n{ TTMSFNCMapsGPXSegmentEventData }\r\n\r\nconstructor TTMSFNCMapsGPXSegmentEventData.Create;\r\nbegin\r\n FNode := nil;\r\nend;\r\n\r\ndestructor TTMSFNCMapsGPXSegmentEventData.Destroy;\r\nbegin\r\n inherited;\r\nend;\r\n\r\n{ TTMSFNCMapsGPXWayPointEventData }\r\n\r\nconstructor TTMSFNCMapsGPXWayPointEventData.Create;\r\nbegin\r\n FNode := nil;\r\nend;\r\n\r\ndestructor TTMSFNCMapsGPXWayPointEventData.Destroy;\r\nbegin\r\n inherited;\r\nend;\r\n\r\n{$IFDEF WEBLIB}\r\nfunction TJSNodeListHelper.GetCount: NativeInt;\r\nbegin\r\n Result := length;\r\nend;\r\n\r\nfunction TJSNodeListHelper.FindNode(ANodeName: string): TJSNode;\r\nvar\r\n Index: Integer;\r\nbegin\r\n Index := IndexOf(ANodeName);\r\n if Index >= 0 then\r\n Result := Nodes[Index]\r\n else\r\n Result := nil;\r\nend;\r\n\r\nfunction TJSNodeListHelper.IndexOf(const Name: string): NativeInt;\r\nvar\r\n n: TJSNode;\r\nbegin\r\n for Result := 0 to Count - 1 do\r\n begin\r\n n := Nodes[Result];\r\n if (n.nodeName = Name) then\r\n Exit;\r\n end;\r\n Result := -1;\r\nend;\r\n{$ENDIF}\r\n\r\nfunction LoadResourceFile(AResName: string): string;\r\n{$IFNDEF WEBLIB}\r\nvar\r\n RS: TResourceStream;\r\n ST: TStringList;\r\n{$ENDIF}\r\nbegin\r\n Result := '';\r\n{$IFNDEF WEBLIB}\r\n ST := TStringList.Create;\r\n begin\r\n RS := TTMSFNCUtils.GetResourceStream(AResName);\r\n try\r\n ST.LoadFromStream(RS{$IFNDEF LCLLIB}, TEncoding.UTF8{$ENDIF});\r\n Result := ST.text;\r\n finally\r\n RS.Free;\r\n end;\r\n end;\r\n ST.Free;\r\n{$ENDIF}\r\nend;\r\n\r\nfunction SaveToGPX(ACoordinates: TTMSFNCMapsCoordinateRecArray; AMetaData: TTMSFNCMapsGPXMetaData;\r\n IncludeElevation: Boolean = True; IncludeTimeStamp: Boolean = True; AInstructions: string = ''; AWayPoints: TTMSFNCMapsGPXWayPointRecArray = nil): string;\r\nvar\r\n Segments: TTMSFNCMapsCoordinateRecArrayArray;\r\n Instructions: TStringList;\r\nbegin\r\n Setlength(Segments, 1);\r\n Segments[0] := ACoordinates;\r\n Instructions := TStringList.Create;\r\n Instructions.Add(AInstructions);\r\n Result := SaveToGPX(Segments, AMetaData, IncludeElevation, IncludeTimeStamp, Instructions, AWayPoints);\r\n Instructions.Free;\r\nend;\r\n\r\nfunction SaveToGPX(ASegments: TTMSFNCMapsCoordinateRecArrayArray; AMetaData: TTMSFNCMapsGPXMetaData;\r\n IncludeElevation: Boolean = True; IncludeTimeStamp: Boolean = True; AInstructions: TStringList = nil; AWayPoints: TTMSFNCMapsGPXWayPointRecArray = nil): string;\r\nconst\r\n LB = #13;\r\n\r\n function XMLEncode(AText: string): string;\r\n begin\r\n Result := StringReplace(AText, '<', '<', [rfReplaceAll]);\r\n Result := StringReplace(Result, '>', '>', [rfReplaceAll]);\r\n Result := StringReplace(Result, '%', '%', [rfReplaceAll]);\r\n end;\r\n\r\nvar\r\n i, j: Integer;\r\n hdr, trk, ftr, wpt: string;\r\n sl: TStringList;\r\n {$IFDEF WEBLIB}\r\n d, t: string;\r\n {$ENDIF}\r\n {$IFNDEF WEBLIB}\r\n d, t: Char;\r\n {$ENDIF}\r\n ACoordinates: TTMSFNCMapsCoordinateRecArray;\r\nbegin\r\n t := FormatSettings.ThousandSeparator;\r\n d := FormatSettings.DecimalSeparator;\r\n FormatSettings.DecimalSeparator := '.';\r\n FormatSettings.ThousandSeparator := ',';\r\n\r\n hdr :=\r\n '' + LB +\r\n '' + LB +\r\n '' + LB +\r\n '' + LB +\r\n '%s' + LB +\r\n '' + LB +\r\n '' + LB +\r\n '' + LB;\r\n\r\n wpt := '';\r\n if Assigned(AWayPoints) then\r\n begin\r\n sl := TStringList.Create;\r\n try\r\n for j := 0 to Length(AWayPoints) - 1 do\r\n begin\r\n sl.Add(Format('', [AWayPoints[j].WayPoint.Latitude, AWayPoints[j].WayPoint.Longitude]));\r\n if AWayPoints[j].HasElevation then\r\n begin\r\n sl.Add(Format('%.7f', [AWayPoints[j].Elevation]));\r\n end;\r\n if AWayPoints[j].HasTimeStamp then\r\n begin\r\n sl.Add(Format('', [TTMSFNCUtils.DateTimeToISO(AWayPoints[j].TimeStamp, True, True)]));\r\n end;\r\n if AWayPoints[j].Name <> '' then\r\n begin\r\n sl.Add(Format('%s', [XMLEncode(AWayPoints[j].Name)]));\r\n end;\r\n if AWayPoints[j].Comment <> '' then\r\n begin\r\n sl.Add(Format('%s', [XMLEncode(AWayPoints[j].Comment)]));\r\n end;\r\n if AWayPoints[j].Description <> '' then\r\n begin\r\n sl.Add(Format('%s', [XMLEncode(AWayPoints[j].Description)]));\r\n end;\r\n if AWayPoints[j].Symbol <> '' then\r\n begin\r\n sl.Add(Format('%s', [AWayPoints[j].Symbol]));\r\n end;\r\n if AWayPoints[j].WayPointType <> '' then\r\n begin\r\n sl.Add(Format('%s', [AWayPoints[j].WayPointType]));\r\n end;\r\n if AWayPoints[j].Link <> '' then\r\n begin\r\n sl.Add(Format('', [AWayPoints[j].Link]));\r\n end;\r\n sl.Add('');\r\n end;\r\n wpt := sl.Text;\r\n finally\r\n sl.Free;\r\n end;\r\n end;\r\n\r\n trk :=\r\n '' + LB +\r\n '%s' + LB +\r\n '%s';\r\n\r\n hdr := hdr + wpt + trk;\r\n\r\n ftr :=\r\n '' + LB +\r\n '';\r\n\r\n hdr := Format(hdr,[AMetaData.AuthorName, AMetaData.AuthorLink, AMetaData.TrackName, AMetaData.TrackType]);\r\n\r\n sl := TStringList.Create;\r\n try\r\n sl.Add(hdr);\r\n\r\n for i := 0 to Length(ASegments) - 1 do\r\n begin\r\n ACoordinates := ASegments[i];\r\n sl.Add('');\r\n\r\n if Assigned(AInstructions) and (AInstructions.Count > i) then\r\n begin\r\n sl.Add(Format('' + LB + '%s' + LB + '', [AInstructions[I]]));\r\n end;\r\n\r\n for j := 0 to Length(ACoordinates) - 1 do\r\n begin\r\n sl.Add(Format('', [ACoordinates[j].Latitude, ACoordinates[j].Longitude]));\r\n if IncludeElevation and ACoordinates[j].HasElevation then\r\n begin\r\n sl.Add(Format('%.7f', [ACoordinates[j].Elevation]));\r\n end;\r\n if IncludeTimeStamp and ACoordinates[j].HasTimeStamp then\r\n begin\r\n sl.Add(Format('', [TTMSFNCUtils.DateTimeToISO(ACoordinates[j].TimeStamp, True, True)]));\r\n end;\r\n sl.Add('');\r\n end;\r\n\r\n sl.Add('');\r\n end;\r\n\r\n sl.Add(ftr);\r\n\r\n Result := sl.Text;\r\n finally\r\n sl.Free;\r\n end;\r\n\r\n FormatSettings.ThousandSeparator := t;\r\n FormatSettings.DecimalSeparator := d;\r\nend;\r\n\r\nend.\r\n","{********************************************************************}\r\n{ }\r\n{ written by TMS Software }\r\n{ copyright (c) 2019 - 2021 }\r\n{ Email : info@tmssoftware.com }\r\n{ Web : http://www.tmssoftware.com }\r\n{ }\r\n{ The source code is given as is. The author is not responsible }\r\n{ for any possible damage done due to the use of this code. }\r\n{ The complete source code remains property of the author and may }\r\n{ not be distributed, published, given or sold in any form as such. }\r\n{ No parts of the source code can be included in any other component }\r\n{ or application without written authorization of the author. }\r\n{********************************************************************}\r\n\r\nunit WEBLib.TMSFNCCloudBase.WEB;\r\n\r\n{$I WEBLib.TMSFNCDefines.inc}\r\n\r\ninterface\r\n\r\nprocedure RegisterCloudBaseService;\r\nprocedure UnRegisterCloudBaseService;\r\n\r\nimplementation\r\n\r\nuses\r\n Classes, Types, SysUtils, WEBLib.TMSFNCCloudBase, WEBLib.TMSFNCTypes\r\n {$IFDEF WEBLIB}\r\n ,web\r\n {$ENDIF}\r\n ;\r\n\r\ntype\r\n TTMSFNCWEBCloudBaseService = class;\r\n\r\n TTMSFNCWEBCloudBaseService = class(TTMSFNCCloudBaseFactoryService)\r\n protected\r\n function DoCreateCloudBase(const AValue: TTMSFNCCustomCloudBase): ITMSFNCCustomCloudBase; override;\r\n end;\r\n\r\n TTMSFNCCloudBaseRequestResultOpen = class(TTMSFNCCloudBaseRequestResult);\r\n\r\n TTMSFNCWEBCloudBase = class(TInterfacedObject, ITMSFNCCustomCloudBase)\r\n private\r\n FCloudBaseInstance: TTMSFNCCustomCloudBase;\r\n public\r\n constructor Create(const ACloudBaseInstance: TTMSFNCCustomCloudBase);\r\n function GetUploadFileSize(const ARequest: TTMSFNCCloudBaseRequest): Int64;\r\n procedure ExecuteRequest(const ARequest: TTMSFNCCloudBaseRequestResult);\r\n procedure RunExternalBrowser(const AURL: string; const ACallBackURL: string; const ACallBack: TTMSFNCCloudBaseExternalBrowserCallBackEvent = nil);\r\n procedure CloseBrowser;\r\n end;\r\n\r\nvar\r\n CloudBaseService: ITMSFNCCloudBaseService;\r\n\r\nprocedure RegisterCloudBaseService;\r\nbegin\r\n if not TTMSFNCCloudBasePlatformServices.Current.SupportsPlatformService(ITMSFNCCloudBaseService, IInterface(CloudBaseService)) then\r\n begin\r\n CloudBaseService := TTMSFNCWEBCloudBaseService.Create;\r\n TTMSFNCCloudBasePlatformServices.Current.AddPlatformService(ITMSFNCCloudBaseService, CloudBaseService);\r\n end;\r\nend;\r\n\r\nprocedure UnregisterCloudBaseService;\r\nbegin\r\n TTMSFNCCloudBasePlatformServices.Current.RemovePlatformService(ITMSFNCCloudBaseService);\r\nend;\r\n\r\nprocedure TTMSFNCWEBCloudBase.RunExternalBrowser(const AURL: string; const ACallBackURL: string; const ACallBack: TTMSFNCCloudBaseExternalBrowserCallBackEvent = nil);\r\n{$IFNDEF WEBLIB}\r\nbegin\r\n{$ELSE}\r\nvar\r\n s, sc: string;\r\n cb: TTMSFNCCloudBaseExternalBrowserCallBackEvent;\r\nbegin\r\n cb := ACallBack;\r\n s := AURL;\r\n sc := ACallBackURL;\r\n asm\r\n this.OAuthPopup = function(options)\r\n {\r\n\r\n var l, t, w, h;\r\n w = 800;\r\n h = 600;\r\n\r\n var dualScreenLeft = window.screenLeft != undefined ? window.screenLeft : window.screenX;\r\n var dualScreenTop = window.screenTop != undefined ? window.screenTop : window.screenY;\r\n\r\n var width = window.innerWidth ? window.innerWidth : document.documentElement.clientWidth ? document.documentElement.clientWidth : screen.width;\r\n var height = window.innerHeight ? window.innerHeight : document.documentElement.clientHeight ? document.documentElement.clientHeight : screen.height;\r\n\r\n var systemZoom = width / window.screen.availWidth;\r\n l = (width - w) / 2 / systemZoom + dualScreenLeft\r\n t = (height - h) / 2 / systemZoom + dualScreenTop\r\n\r\n options.windowName = options.windowName || 'Authentication'; // should not include space for IE\r\n options.windowOptions = options.windowOptions || 'location=0,status=0,left='+l+',top='+t+',width='+w+',height='+h+'';\r\n options.callback = options.callback || function(){ window.location.reload(); };\r\n var that = this;\r\n that._oauthWindow = window.open(options.path, options.windowName, options.windowOptions);\r\n that._oauthInterval = window.setInterval(function(){\r\n var s, b;\r\n if (that._oauthWindow && that._oauthWindow.location){\r\n try{\r\n s = that._oauthWindow.location.href;\r\n if (!s){\r\n s = that._oauthWindow.location;\r\n }\r\n\r\n b = s.indexOf(sc) != -1;\r\n if (b) {\r\n that._oauthWindow.close();\r\n window.clearInterval(that._oauthInterval);\r\n if (b){\r\n options.callback(s);\r\n }\r\n }\r\n }catch(exception){\r\n }\r\n }\r\n\r\n }, 1000);\r\n };\r\n\r\n this.OAuthPopup({\r\n path: s,\r\n callback: function(callbackURL)\r\n {\r\n if (cb) {\r\n cb(callbackURL);\r\n }\r\n }\r\n });\r\n end;\r\n{$ENDIF}\r\nend;\r\n\r\nprocedure TTMSFNCWEBCloudBase.CloseBrowser;\r\nbegin\r\n//\r\nend;\r\n\r\nconstructor TTMSFNCWEBCloudBase.Create(const ACloudBaseInstance: TTMSFNCCustomCloudBase);\r\nbegin\r\n FCloudBaseInstance := ACloudBaseInstance;\r\nend;\r\n\r\n{ TTMSFNCWEBCloudBaseService }\r\n\r\nfunction TTMSFNCWEBCloudBaseService.DoCreateCloudBase(const AValue: TTMSFNCCustomCloudBase): ITMSFNCCustomCloudBase;\r\nbegin\r\n Result := TTMSFNCWEBCloudBase.Create(AValue);\r\nend;\r\n\r\nprocedure TTMSFNCWEBCloudBase.ExecuteRequest(const ARequest: TTMSFNCCloudBaseRequestResult);\r\n{$IFNDEF WEBLIB}\r\nbegin\r\n{$ELSE}\r\nvar\r\n u: string;\r\n up: Boolean;\r\n timeo: Integer;\r\n mt: string;\r\n sz: Int64;\r\n head, tail: string;\r\n h: TTMSFNCCloudBaseRequestHeaders;\r\n b: TBytes;\r\n\r\n procedure AddHeader(const AName, AValue: string);\r\n begin\r\n h.Add(TTMSFNCCloudBaseRequestHeader.Create(AName, AValue));\r\n end;\r\n\r\nbegin\r\n try\r\n u := ARequest.GetURL;\r\n mt := ARequest.GetMethodString;\r\n sz := GetUploadFileSize(ARequest);\r\n head := '';\r\n tail := '';\r\n timeo := ARequest.ConnectTimeout;\r\n\r\n h := TTMSFNCCloudBaseRequestHeaders.Create;\r\n up := (ARequest.HasUploadStream or ARequest.HasUploadFile);\r\n\r\n if not ARequest.CustomHeaders and (ARequest.Method in [rmPOST, rmPUT, rmPATCH]) and (ARequest.HasUploadStream or ARequest.HasUploadFile) then\r\n begin\r\n //AddHeader('Content-Length', inttostr(sz));\r\n AddHeader('Content-Type', 'application/octet-stream');\r\n AddHeader('Content-Transfer-Encoding', 'binary');\r\n end;\r\n\r\n if (ARequest.Method in [rmPOSTMULTIPART, rmPUTMULTIPART]) then\r\n begin\r\n head := sRequestHeadBoundary + #13#10;\r\n tail := #13#10 + sRequestTailBoundary + #13#10;\r\n AddHeader('Content-Type', 'multipart/form-data; boundary=' + sRequestBoundary);\r\n end;\r\n\r\n if (ARequest.Method in [rmPOSTMULTIPARTRELATED, rmPUTMULTIPARTRELATED]) then\r\n begin\r\n head := ''#13#10;\r\n tail := #13#10 + sRequestTailBoundary + #13#10;\r\n AddHeader('Content-Type', 'multipart/related; boundary=' + sRequestBoundary);\r\n end;\r\n\r\n asm\r\n var arr = [];\r\n end;\r\n\r\n if head <> '' then\r\n begin\r\n asm\r\n arr.push(head);\r\n end;\r\n end;\r\n\r\n if ARequest.PostData <> '' then\r\n begin\r\n asm\r\n arr.push(ARequest.FPostData);\r\n end;\r\n end;\r\n\r\n if ARequest.HasUploadFile then\r\n begin\r\n asm\r\n arr.push(ARequest.FUploadFile.Data);\r\n end;\r\n if Assigned(ARequest.OnProgress) then\r\n ARequest.OnProgress(ARequest, 100, True);\r\n end\r\n else if ARequest.HasUploadStream then\r\n begin\r\n ARequest.UploadStream.Position := 0;\r\n\r\n b := ARequest.UploadStream.Bytes;\r\n\r\n asm\r\n var byteArray = new Uint8Array(b);\r\n arr.push(byteArray);\r\n end;\r\n\r\n if Assigned(ARequest.OnProgress) then\r\n ARequest.OnProgress(ARequest, 100, True);\r\n end;\r\n\r\n if tail <> '' then\r\n begin\r\n asm\r\n arr.push(tail);\r\n end;\r\n end;\r\n\r\n if mt <> '' then\r\n begin\r\n asm\r\n function reqListener(e)\r\n {\r\n var $tmp1 = ARequest.FResultType;\r\n\r\n if (!(ARequest.FResponseCode in pas[\"WEBLib.TMSFNCCloudBase\"].ValidHTTPCodes)){\r\n if (!this.responseType == \"arrayBuffer\"){\r\n ARequest.FResultString = this.responseText;\r\n }\r\n }\r\n else\r\n {\r\n if ($tmp1 === pas[\"WEBLib.TMSFNCCloudBase\"].TTMSFNCCloudBaseRequestResultType.rrtString) {\r\n ARequest.FResultString = this.responseText;\r\n }\r\n else if ($tmp1 === pas[\"WEBLib.TMSFNCCloudBase\"].TTMSFNCCloudBaseRequestResultType.rrtFile) {\r\n var byteArray = new Uint8Array(this.response);\r\n\r\n var userAgent = navigator.userAgent.toLowerCase();\r\n if (userAgent.indexOf('electron/') > -1)\r\n {\r\n require('fs').writeFile(ARequest.FResultFile, byteArray, (err) => {});\r\n }\r\n else\r\n {\r\n var m = pas[\"Classes\"].TMemoryStream.$create(\"Create\");\r\n try\r\n {\r\n m.Write(byteArray, byteArray.length);\r\n pas[\"WEBLib.TMSFNCTypes\"].TTMSFNCMemoryStream.SaveToFile.call(m, ARequest.FResultFile);\r\n }\r\n finally\r\n {\r\n m = rtl.freeLoc(m);\r\n }\r\n }\r\n }\r\n else\r\n {\r\n var byteArray = new Uint8Array(this.response);\r\n ARequest.FResultStream.Write(byteArray, byteArray.length);\r\n }\r\n }\r\n\r\n ARequest.FDone = true;\r\n if (ARequest.CheckTaskStatus()) {\r\n if (ARequest.FOnProgress != null && e.total == 0) ARequest.FOnProgress(ARequest, 100, false);\r\n if (ARequest.FOnComplete != null) ARequest.FOnComplete(ARequest);\r\n }\r\n else\r\n {\r\n if (ARequest.FOnCancelled != null) ARequest.FOnCancelled(ARequest);\r\n }\r\n }\r\n\r\n const req = new XMLHttpRequest();\r\n req.timeout = timeo;\r\n req.addEventListener('load', reqListener);\r\n req.onreadystatechange = () => {\r\n ARequest.FResponseCode = req.status;\r\n\r\n if(req.readyState == 2){\r\n // Get the raw header string\r\n var headers = req.getAllResponseHeaders();\r\n\r\n // Convert the header string into an array\r\n // of individual headers\r\n var arr = headers.trim().split(/[\\r\\n]+/);\r\n\r\n // Create a map of header names to values\r\n arr.forEach(function (line) {\r\n var parts = line.split(': ');\r\n var header = parts.shift();\r\n var value = parts.join(': ');\r\n if (value != \"\"){\r\n ARequest.FResponseHeaders.Add$1(pas[\"WEBLib.TMSFNCCloudBase\"].TTMSFNCCloudBaseRequestHeader.$create(\"Create$1\",[header,value]));\r\n }\r\n });\r\n }\r\n };\r\n req.upload.addEventListener(\"progress\", function(event){\r\n if (ARequest.CheckTaskStatus() && up && event.total > 0) {\r\n if (ARequest.FOnProgress != null) ARequest.FOnProgress(ARequest, event.loaded / event.total * 100, true);\r\n };\r\n }, false);\r\n req.onprogress = function(event){\r\n if (ARequest.CheckTaskStatus() && !up && event.total > 0) {\r\n ARequest.FTotalBytes = event.total;\r\n ARequest.FBytesReceived = event.loaded;\r\n if (ARequest.FOnProgress != null) ARequest.FOnProgress(ARequest, event.loaded / event.total * 100, false);\r\n };\r\n };\r\n\r\n var $tmp1 = ARequest.FResultType;\r\n if ($tmp1 === pas[\"WEBLib.TMSFNCCloudBase\"].TTMSFNCCloudBaseRequestResultType.rrtStream || $tmp1 === pas[\"WEBLib.TMSFNCCloudBase\"].TTMSFNCCloudBaseRequestResultType.rrtFile) {\r\n req.responseType = 'arraybuffer';\r\n }\r\n\r\n req.open(mt, u);\r\n\r\n for (var $l1 = 0, $end2 = ARequest.FHeaders.GetCount() - 1; $l1 <= $end2; $l1++) {\r\n var I = $l1;\r\n var hd = ARequest.FHeaders.GetItem$1(I);\r\n req.setRequestHeader(hd.FName, hd.FValue);\r\n };\r\n\r\n for (var $l1 = 0, $end2 = h.GetCount() - 1; $l1 <= $end2; $l1++) {\r\n var I = $l1;\r\n var hd = h.GetItem$1(I);\r\n req.setRequestHeader(hd.FName, hd.FValue);\r\n };\r\n\r\n try\r\n {\r\n if (arr.length > 0){\r\n var b = new Blob(arr);\r\n req.send(b);\r\n }\r\n else{\r\n req.send();\r\n }\r\n }catch(exception){\r\n }\r\n end;\r\n end\r\n else\r\n begin\r\n if ARequest.CheckTaskStatus then\r\n begin\r\n TTMSFNCCloudbaseRequestResultOpen(ARequest).FDone := True;\r\n if Assigned(ARequest.OnComplete) then\r\n ARequest.OnComplete(ARequest);\r\n end; \r\n end;\r\n finally\r\n end;\r\n{$ENDIF}\r\nend;\r\n\r\nfunction TTMSFNCWEBCloudBase.GetUploadFileSize(\r\n const ARequest: TTMSFNCCloudBaseRequest): Int64;\r\nbegin\r\n Result := 0;\r\n {$IFDEF WEBLIB}\r\n if ARequest.HasUploadFile then\r\n begin\r\n Result := ARequest.UploadFile.Data.length;\r\n end\r\n else if ARequest.HasUploadStream then\r\n begin\r\n ARequest.UploadStream.Position := 0;\r\n Result := ARequest.UploadStream.Size;\r\n end;\r\n {$ENDIF}\r\nend;\r\n\r\nend.\r\n","{********************************************************************}\r\n{ }\r\n{ written by TMS Software }\r\n{ copyright (c) 2019 - 2025 }\r\n{ Email : info@tmssoftware.com }\r\n{ Web : http://www.tmssoftware.com }\r\n{ }\r\n{ The source code is given as is. The author is not responsible }\r\n{ for any possible damage done due to the use of this code. }\r\n{ The complete source code remains property of the author and may }\r\n{ not be distributed, published, given or sold in any form as such. }\r\n{ No parts of the source code can be included in any other component }\r\n{ or application without written authorization of the author. }\r\n{********************************************************************}\r\n\r\nunit WEBLib.TMSFNCCloudBase;\r\n\r\n{$I WEBLib.TMSFNCDefines.inc}\r\n\r\n{$IFDEF WEBLIB}\r\n{$DEFINE LCLWEBLIB}\r\n{$DEFINE LCLWEBLIBTHREAD}\r\n{$ENDIF}\r\n{$IFDEF LCLLIB}\r\n{$DEFINE LCLWEBLIB}\r\n{$DEFINE LCLLIBTHREAD}\r\n{$DEFINE LCLWEBLIBTHREAD}\r\n{$ENDIF}\r\n\r\n{$IFNDEF LCLWEBLIB}\r\n{$HINTS OFF}\r\n{$IF COMPILERVERSION <= 26}\r\n{$DEFINE LCLWEBLIBTHREAD}\r\n{$DEFINE LCLLIBTHREAD}\r\n{$IFEND}\r\n{$HINTS ON}\r\n{$ENDIF}\r\n\r\n{$IFDEF FNCLIB}\r\n{$IFNDEF LCLWEBLIB}\r\n{$HINTS OFF}\r\n{$IF COMPILERVERSION > 30}\r\n{$DEFINE SUPPORTCURL}\r\n{$IFEND}\r\n{$HINTS ON}\r\n{$ENDIF}\r\n{$ENDIF}\r\n\r\n{$IFNDEF LCLWEBLIB}\r\n{$HINTS OFF}\r\n{$IF COMPILERVERSION > 31}\r\n{$DEFINE SUPPORTPROMISE}\r\n{$IFEND}\r\n{$HINTS ON}\r\n{$ENDIF}\r\n\r\ninterface\r\n\r\nuses\r\n Classes, Types, WEBLib.TMSFNCCustomComponent, WEBLib.TMSFNCUtils, WEBLib.TMSFNCTypes, SysUtils\r\n {$IFDEF SUPPORTPROMISE}\r\n {$IFDEF FMXLIB}\r\n , FMX.Types\r\n {$ENDIF}\r\n {$IFDEF VCLLIB}\r\n , Vcl.ExtCtrls\r\n {$ENDIF}\r\n {$ENDIF}\r\n {$IFNDEF LCLWEBLIB}\r\n ,Generics.Collections\r\n {$HINTS OFF}\r\n {$IF COMPILERVERSION > 26}\r\n ,Threading\r\n {$IFEND}\r\n {$HINTS ON}\r\n {$ENDIF}\r\n {$IFDEF LCLLIB}\r\n ,fgl\r\n {$ENDIF}\r\n {$IFDEF WEBLIB}\r\n ,contnrs, js\r\n {$ENDIF}\r\n ;\r\n\r\nconst\r\n MAJ_VER = 1; // Major version nr.\r\n MIN_VER = 0; // Minor version nr.\r\n REL_VER = 1; // Release nr.\r\n BLD_VER = 1; // Build nr.\r\n sRequestLineBreak = #13#10;\r\n sRequestBoundary = 'AaB03x';\r\n sRequestHeadBoundary = '--' + sRequestBoundary;\r\n sRequestTailBoundary = '--' + sRequestBoundary + '--';\r\n ValidHTTPCodes = [200, 201, 202, 204];\r\n\r\n //v1.0.0.0 : First release\r\n //v1.0.0.1 : Fixed : Issue with saving/loading additional information such as key, client id, secret and callback url\r\n //v1.0.1.0 : New : OnRequestCancelled event added\r\n // : New : OnAccessDenied event added\r\n //v1.0.1.0 : Improved : cancelling requests while uploading files\r\n\r\ntype\r\n ETMSFNCCloudBaseException = class(Exception);\r\n {$IFDEF SUPPORTPROMISE}\r\n ETMSFNCCloudBasePromiseException = class(Exception);\r\n {$ENDIF}\r\n\r\n TTMSFNCCloudBaseLocale = (cblDefault, cblEnglish, cblDutch, cblGerman, cblFrench, cblSpanish, cblItalian,\r\n cblPortuguese, cblGreek, cblDanish, cblRussian, cblRomanian, cblSwedish, cblFinnish, cblTurkish, cblJapanese);\r\n\r\n TTMSFNCCustomCloudBase = class;\r\n\r\n TTMSFNCCloudBaseRequest = class;\r\n\r\n TTMSFNCCloudBaseRequestResult = class;\r\n\r\n TTMSFNCCloudBaseRequestEvent = procedure(const ARequest: TTMSFNCCloudBaseRequestResult) of object;\r\n\r\n TTMSFNCCloudBaseRequestCompleteEvent = procedure(Sender: TObject; const ARequest: TTMSFNCCloudBaseRequestResult) of object;\r\n\r\n TTMSFNCCloudBaseRequestRunEvent = procedure(const ARequest: TTMSFNCCloudBaseRequestResult) of object;\r\n\r\n TTMSFNCCloudBaseRequestResultStringEvent = {$IFNDEF LCLLIB}reference to {$ENDIF}procedure(const AResult: string){$IFDEF LCLLIB} of object{$ENDIF};\r\n\r\n TTMSFNCCloudBaseRequestResultStreamEvent = {$IFNDEF LCLLIB}reference to {$ENDIF}procedure(const AResult: TMemoryStream){$IFDEF LCLLIB} of object{$ENDIF};\r\n\r\n TTMSFNCCloudBaseRequestResultEvent = {$IFNDEF LCLLIB}reference to {$ENDIF}procedure(const ARequestResult: TTMSFNCCloudBaseRequestResult){$IFDEF LCLLIB} of object{$ENDIF};\r\n\r\n TTMSFNCCloudBaseRequestResultEventWrapper = class\r\n private\r\n FCallbackRequest: TTMSFNCCloudBaseRequestResultEvent;\r\n FCallbackString: TTMSFNCCloudBaseRequestResultStringEvent;\r\n FCallbackStream: TTMSFNCCloudBaseRequestResultStreamEvent;\r\n public\r\n constructor Create(ACallbackRequest: TTMSFNCCloudBaseRequestResultEvent; ACallbackString: TTMSFNCCloudBaseRequestResultStringEvent; ACallbackStream: TTMSFNCCloudBaseRequestResultStreamEvent);\r\n end;\r\n\r\n TTMSFNCCloudBaseRequestResultProgressEvent = {$IFNDEF LCLLIB}reference to {$ENDIF}procedure(const ARequestResult: TTMSFNCCloudBaseRequestResult; AProgress: Single){$IFDEF LCLLIB} of object{$ENDIF};\r\n\r\n TTMSFNCCloudBaseLogEvent = procedure(Sender: TObject; const ARequestResult: TTMSFNCCloudBaseRequestResult; AMessage: string) of object;\r\n\r\n TTMSFNCCloudBaseRequestLogEvent = procedure(const ARequestResult: TTMSFNCCloudBaseRequestResult; AMessage: string) of object;\r\n\r\n TTMSFNCCloudBaseProgressEvent = procedure(Sender: TObject; const ARequestResult: TTMSFNCCloudBaseRequestResult; AProgress: Single; AUpload: Boolean) of object;\r\n\r\n TTMSFNCCloudBaseRequestProgressEvent = procedure(const ARequestResult: TTMSFNCCloudBaseRequestResult; AProgress: Single; AUpload: Boolean) of object;\r\n\r\n TTMSFNCCloudBaseCompleteEvent = procedure(Sender: TObject; const ARequestResult: TTMSFNCCloudBaseRequestResult) of object;\r\n\r\n TTMSFNCCloudBaseCancelledEvent = procedure(Sender: TObject; const ARequestResult: TTMSFNCCloudBaseRequestResult) of object;\r\n\r\n TTMSFNCCloudBaseStartedEvent = procedure(Sender: TObject; const ARequestResult: TTMSFNCCloudBaseRequestResult) of object;\r\n\r\n TTMSFNCCloudBaseExternalBrowserCallBackEvent = procedure(const ACallbackURLResult: string) of object;\r\n\r\n ITMSFNCCustomCloudBase = interface(IInterface)\r\n ['{F5D2BC35-639A-4EBF-8201-06B3F9EFB82D}']\r\n function GetUploadFileSize(const ARequest: TTMSFNCCloudBaseRequest): Int64;\r\n procedure ExecuteRequest(const ARequest: TTMSFNCCloudBaseRequestResult);\r\n procedure RunExternalBrowser(const AURL: string; const ACallBackURL: string; const ACallBack: TTMSFNCCloudBaseExternalBrowserCallBackEvent = nil);\r\n procedure CloseBrowser;\r\n end;\r\n\r\n ITMSFNCCloudBaseService = interface(IInterface)\r\n ['{4876E6F4-B5D4-4322-A0B9-749040C239A5}']\r\n function CreateCloudBase(const AValue: TTMSFNCCustomCloudBase): ITMSFNCCustomCloudBase;\r\n procedure DestroyCloudBase(const AValue: ITMSFNCCustomCloudBase);\r\n end;\r\n\r\n TTMSFNCCloudBaseRequestHeader = class\r\n private\r\n FName: string;\r\n FValue: string;\r\n public\r\n constructor Create(const AName: string; const AValue: string);\r\n property Name: string read FName write FName;\r\n property Value: string read FValue write FValue;\r\n end;\r\n\r\n {$IFDEF LCLWEBLIBTHREAD}\r\n TTaskStatus = (Created, WaitingToRun, Running, Completed, WaitingForChildren, Canceled, Exception);\r\n\r\n ITask = interface\r\n ['{5A2BE42C-8E7B-468B-8D6A-2B27EAE87B55}']\r\n function GetStatus: TTaskStatus;\r\n procedure Start;\r\n procedure Cancel;\r\n property Status: TTaskStatus read GetStatus;\r\n end;\r\n\r\n {$IFDEF LCLLIBTHREAD}\r\n TTaskWorkerThread = class(TThread)\r\n private\r\n FRequest: TTMSFNCCloudBaseRequestResult;\r\n FRunEvent: TTMSFNCCloudBaseRequestRunEvent;\r\n protected\r\n procedure Execute; override;\r\n public\r\n constructor Create(const ARequest: TTMSFNCCloudBaseRequestResult; const ARunEvent: TTMSFNCCloudBaseRequestRunEvent);\r\n end;\r\n {$ENDIF}\r\n\r\n TTask = class(TInterfacedObject, ITask)\r\n private\r\n {$IFDEF LCLLIBTHREAD}\r\n FWorkerThread: TTaskWorkerThread;\r\n {$ENDIF}\r\n FTaskStatus: TTaskStatus;\r\n FRunEvent: TTMSFNCCloudBaseRequestRunEvent;\r\n FRequest: TTMSFNCCloudBaseRequestResult;\r\n function GetStatus: TTaskStatus;\r\n public\r\n constructor Create(const ARequest: TTMSFNCCloudBaseRequestResult; const ARunEvent: TTMSFNCCloudBaseRequestRunEvent);\r\n destructor Destroy; override;\r\n procedure Start;\r\n procedure Cancel;\r\n property Status: TTaskStatus read GetStatus;\r\n end;\r\n {$ENDIF}\r\n\r\n {$IFDEF WEBLIB}\r\n TTMSFNCCloudBaseRequestHeaders = class(TObjectList)\r\n private\r\n function GetItem(Index: Integer): TTMSFNCCloudBaseRequestHeader;\r\n procedure SetItem(Index: Integer; const Value: TTMSFNCCloudBaseRequestHeader);\r\n public\r\n property Items[Index: Integer]: TTMSFNCCloudBaseRequestHeader read GetItem write SetItem; default;\r\n end;\r\n\r\n TTMSFNCCloudBaseRequests = class(TObjectList)\r\n private\r\n function GetItem(Index: Integer): TTMSFNCCloudBaseRequest;\r\n procedure SetItem(Index: Integer; const Value: TTMSFNCCloudBaseRequest);\r\n public\r\n property Items[Index: Integer]: TTMSFNCCloudBaseRequest read GetItem write SetItem; default;\r\n end;\r\n {$ENDIF}\r\n {$IFNDEF WEBLIB}\r\n TTMSFNCCloudBaseRequestHeaders = class(TObjectList);\r\n\r\n TTMSFNCCloudBaseRequests = class(TObjectList);\r\n {$ENDIF}\r\n\r\n TTMSFNCCloudBaseRequestMethod = (rmGET, rmPOST, rmPOSTMULTIPART, rmPOSTMULTIPARTRELATED, rmPUT, rmPUTMULTIPART, rmPUTMULTIPARTRELATED, rmDELETE, rmPATCH, rmUPDATE);\r\n\r\n TTMSFNCCloudBaseRequestScheme = (rsHTTP, rsHTTPS);\r\n\r\n TTMSFNCCloudBaseRequestResultType = (rrtString, rrtStream, rrtFile);\r\n\r\n {$IFDEF SUPPORTCURL}\r\n TTMSFNCCloudBaseRequestCurlParserMode = (cpmNone, cpmHeader, cpmFormData, cpmData, cpmDataBinary, cpmDataRaw, cpmDataUrlEncode,\r\n cpmUser, cpmBearer, cpmRequest, cpmResultFile);\r\n\r\n TTMSFNCCloudBaseRequestCurlParserFile = class\r\n private\r\n FFileName: string;\r\n end;\r\n\r\n TTMSFNCCloudBaseRequestCurlParser = class\r\n private\r\n FRequest: TTMSFNCCloudBaseRequest;\r\n public\r\n function Parse(ACurl: string): TTMSFNCCloudBaseRequest;\r\n constructor Create;\r\n destructor Destroy; override;\r\n end;\r\n {$ENDIF}\r\n\r\n TTMSFNCCloudBaseRequestPostDataBuilder = class\r\n private\r\n FPostData: string;\r\n protected\r\n procedure AddInternalData(ADataType: string; AName: string; AValue: string; ASkipBoundary: Boolean; AFileName: string; AContentType: string; AContentTransferEncoding: string; ASkipLineBreakOnEnd: Boolean);\r\n public\r\n procedure Clear;\r\n procedure AddText(AText: string; ALineBreak: Boolean = True);\r\n procedure AddContentType(AValue: string);\r\n procedure AddLineBreak;\r\n procedure AddAttachment(AName: string; AValue: string; ASkipBoundary: Boolean = False; AFileName: string = ''; AContentType: string = ''; AContentTransferEncoding: string = ''; ASkipLineBreakOnEnd: Boolean = False);\r\n procedure AddHeadBoundary;\r\n procedure AddTailBoundary;\r\n procedure AddFormData(AName: string; AValue: string; ASkipBoundary: Boolean = False; AFileName: string = ''; AContentType: string = ''; AContentTransferEncoding: string = ''; ASkipLineBreakOnEnd: Boolean = False);\r\n procedure Close;\r\n function Build: string;\r\n end;\r\n\r\n TTMSFNCCloudBaseRequest = class\r\n private\r\n FHeaders: TTMSFNCCloudBaseRequestHeaders;\r\n FAgent: string;\r\n FHost: string;\r\n FPort: Integer;\r\n FPath: string;\r\n FQuery: string;\r\n FMethod: TTMSFNCCloudBaseRequestMethod;\r\n FName: string;\r\n FPostData: string;\r\n FDataPointer: Pointer;\r\n FDataBoolean: Boolean;\r\n FDataString: String;\r\n FDataObject: TObject;\r\n FDataInteger: NativeInt;\r\n FResultType: TTMSFNCCloudBaseRequestResultType;\r\n FUploadStream: TMemoryStream;\r\n FUploadFile: TTMSFNCUtilsFile;\r\n FResultFile: string;\r\n FCustomHeaders: Boolean;\r\n FDataUpload: TTMSFNCUtilsFile;\r\n FResultFileSize: Int64;\r\n FDataInt64: Int64;\r\n FReadTimeout: Integer;\r\n FConnectTimeout: Integer;\r\n function GetUploadStream: TMemoryStream;\r\n function GetHeaders: TTMSFNCCloudBaseRequestHeaders;\r\n protected\r\n function DuplicateHeader(AHeader: TTMSFNCCloudBaseRequestHeader): TTMSFNCCloudBaseRequestHeader;\r\n public\r\n constructor Create; virtual;\r\n destructor Destroy; override;\r\n procedure Assign(ARequest: TTMSFNCCloudBaseRequest);\r\n procedure Clear; virtual;\r\n procedure ClearHeaders; virtual;\r\n function HasUploadStream: Boolean;\r\n function HasUploadFile: Boolean;\r\n function GenerateHeaders: string;\r\n function GetMethodString: string;\r\n function GetURL: string;\r\n function GetServer: string;\r\n function GetQueryPath: string;\r\n function GetPort: Integer;\r\n function AddHeader(const AName: string; const AValue: string): TTMSFNCCloudBaseRequestHeader;\r\n {$IFDEF FNCLIB}\r\n function AddBasicAuthHeader(const AUserName: string; const APassword: string): TTMSFNCCloudBaseRequestHeader;\r\n {$ENDIF}\r\n property CustomHeaders: Boolean read FCustomHeaders write FCustomHeaders;\r\n property DataUpload: TTMSFNCUtilsFile read FDataUpload write FDataUpload;\r\n property DataPointer: Pointer read FDataPointer write FDataPointer;\r\n property DataBoolean: Boolean read FDataBoolean write FDataBoolean;\r\n property DataObject: TObject read FDataObject write FDataObject;\r\n property DataString: String read FDataString write FDataString;\r\n property DataInteger: NativeInt read FDataInteger write FDataInteger;\r\n property DataInt64: Int64 read FDataInt64 write FDataInt64;\r\n property Headers: TTMSFNCCloudBaseRequestHeaders read GetHeaders;\r\n property Agent: string read FAgent write FAgent;\r\n property PostData: string read FPostData write FPostData;\r\n property Host: string read FHost write FHost;\r\n property Port: Integer read FPort write FPort;\r\n property Path: string read FPath write FPath;\r\n property Query: string read FQuery write FQuery;\r\n property Method: TTMSFNCCloudBaseRequestMethod read FMethod write FMethod default rmGET;\r\n property Name: string read FName write FName;\r\n property ResultType: TTMSFNCCloudBaseRequestResultType read FResultType write FResultType default rrtString;\r\n property ResultFile: string read FResultFile write FResultFile;\r\n property ResultFileSize: Int64 read FResultFileSize write FResultFileSize;\r\n property UploadStream: TMemoryStream read GetUploadStream;\r\n property UploadFile: TTMSFNCUtilsFile read FUploadFile write FUploadFile;\r\n property ReadTimeout: Integer read FReadTimeout write FReadTimeout;\r\n property ConnectTimeout: Integer read FConnectTimeout write FConnectTimeout;\r\n end;\r\n\r\n TTMSFNCCloudBaseRequestResult = class(TTMSFNCCloudBaseRequest)\r\n private\r\n FResponseHeaders: TTMSFNCCloudBaseRequestHeaders;\r\n FMessage: string;\r\n FIsDestroying: Boolean;\r\n FResultString: string;\r\n FCallBackResult: TTMSFNCCloudBaseRequestResultEvent;\r\n FCallBackProgress: TTMSFNCCloudBaseRequestResultProgressEvent;\r\n FAsync: Boolean;\r\n FTask: ITask;\r\n {$IFDEF WEBLIB}\r\n FResolve: TJSPromiseResolver;\r\n {$ENDIF}\r\n FResponseCode: Integer;\r\n FProgress: Single;\r\n FRunning: Boolean;\r\n FOnRemove: TTMSFNCCloudBaseRequestEvent;\r\n FOnComplete: TTMSFNCCloudBaseRequestEvent;\r\n FOnLog: TTMSFNCCloudBaseRequestLogEvent;\r\n FOnProgress: TTMSFNCCloudBaseRequestProgressEvent;\r\n FResultStream: TMemoryStream;\r\n FSuccess: Boolean;\r\n FOnCancelled: TTMSFNCCloudBaseRequestEvent;\r\n protected\r\n FTotalBytes: Int64;\r\n FBytesReceived: Int64;\r\n FDone: Boolean;\r\n procedure ProcessResult;\r\n procedure ProcessProgress;\r\n procedure RequestResult;\r\n procedure ProcessLog;\r\n procedure RequestProgress(AProgress: Single; AUpload: Boolean);\r\n function IsAsyncAvailable: Boolean;\r\n property OnRemove: TTMSFNCCloudBaseRequestEvent read FOnRemove write FOnRemove;\r\n property Progress: Single read FProgress;\r\n public\r\n constructor Create; reintroduce; overload;\r\n constructor Create(const ARequest: TTMSFNCCloudBaseRequest; const ARequestResultEvent: TTMSFNCCloudBaseRequestResultEvent = nil; const ARequestResultProgressEvent: TTMSFNCCloudBaseRequestResultProgressEvent = nil; const AAsync: Boolean = True; const ATask: ITask = nil); reintroduce; overload;\r\n destructor Destroy; override;\r\n procedure Clear; override;\r\n procedure Cancel; virtual;\r\n procedure Log(AMessage: string); virtual;\r\n function CheckTaskStatus: Boolean;\r\n function GetResponseHeader(AName: string): string;\r\n property ResultBytesReceived: Int64 read FBytesReceived;\r\n property ResultTotalBytes: Int64 read FTotalBytes;\r\n property ResultString: string read FResultString write FResultString;\r\n property ResultStream: TMemoryStream read FResultStream write FResultStream;\r\n property ResponseCode: Integer read FResponseCode write FResponseCode;\r\n property ResponseHeaders: TTMSFNCCloudBaseRequestHeaders read FResponseHeaders;\r\n property CallBackResult: TTMSFNCCloudBaseRequestResultEvent read FCallBackResult write FCallBackResult;\r\n property CallBackProgress: TTMSFNCCloudBaseRequestResultProgressEvent read FCallBackProgress write FCallBackProgress;\r\n property Async: Boolean read FAsync write FAsync;\r\n property Success: Boolean read FSuccess write FSuccess;\r\n property Task: ITask read FTask write FTask;\r\n property Running: Boolean read FRunning write FRunning default False;\r\n property OnLog: TTMSFNCCloudBaseRequestLogEvent read FOnLog write FOnLog;\r\n property OnProgress: TTMSFNCCloudBaseRequestProgressEvent read FOnProgress write FOnProgress;\r\n property OnComplete: TTMSFNCCloudBaseRequestEvent read FOnComplete write FOnComplete;\r\n property OnCancelled: TTMSFNCCloudBaseRequestEvent read FOnCancelled write FOnCancelled;\r\n end;\r\n\r\n TTMSFNCCloudBaseService = class(TPersistent)\r\n private\r\n FDeveloperURL: string;\r\n FName: string;\r\n FBaseURL: string;\r\n public\r\n procedure Assign(Source: TPersistent); override;\r\n property Name: string read FName write FName;\r\n property DeveloperURL: string read FDeveloperURL write FDeveloperURL;\r\n property BaseURL: string read FBaseURL write FBaseURL;\r\n end;\r\n\r\n TTMSFNCCustomCloudBase = class(TTMSFNCCustomComponent)\r\n private\r\n FPostDataBuilder: TTMSFNCCloudBaseRequestPostDataBuilder;\r\n FCloudBase: ITMSFNCCustomCloudBase;\r\n FRequest: TTMSFNCCloudBaseRequest;\r\n FRequestResult: TTMSFNCCloudBaseRequestResult;\r\n FRequests: TTMSFNCCloudBaseRequests;\r\n FOnRequestLog: TTMSFNCCloudBaseLogEvent;\r\n FLogging: Boolean;\r\n FLogFileName: string;\r\n FOnRequestComplete: TTMSFNCCloudBaseCompleteEvent;\r\n FOnRequestProgress: TTMSFNCCloudBaseProgressEvent;\r\n FService: TTMSFNCCloudBaseService;\r\n FScopes: TStrings;\r\n FOnRequestsComplete: TNotifyEvent;\r\n FOnRequestStarted: TTMSFNCCloudBaseStartedEvent;\r\n FOnRequestCancelled: TTMSFNCCloudBaseCancelledEvent;\r\n {$IFDEF SUPPORTPROMISE}\r\n FPromiseTimeoutTimer: TTimer;\r\n procedure DoPromiseTimeoutTimer(Sender: TObject);\r\n {$ENDIF}\r\n function IsLogFileNameStored: Boolean;\r\n procedure SetService(const Value: TTMSFNCCloudBaseService);\r\n procedure SetScopes(const Value: TStrings);\r\n function GetPostDataBuilder: TTMSFNCCloudBaseRequestPostDataBuilder;\r\n protected\r\n {$IFDEF SUPPORTPROMISE}\r\n FReject: TProc;\r\n {$ENDIF}\r\n procedure SetPromiseTimeout(AInterval: Integer = 10000);\r\n procedure RejectPromise(AMessage: string);\r\n {$IFDEF SUPPORTPROMISE}\r\n procedure AssignReject(AReject: TProc);\r\n {$ENDIF}\r\n procedure ClearPromiseResolvers; virtual;\r\n procedure DisablePromiseTimeout;\r\n function GetInstance: NativeUInt; override;\r\n function GetVersion: string; override;\r\n function GetScopes(ADelimiter: Char; AEncode: Boolean = False): string;\r\n class function GetCloudBaseGlobal: TTMSFNCCustomCloudBase;\r\n class function GetPostDataBuilderGlobal: TTMSFNCCloudBaseRequestPostDataBuilder;\r\n class function GetHeadersGlobal: TTMSFNCCloudBaseRequestHeaders;\r\n procedure Log(const ARequestResult: TTMSFNCCloudBaseRequestResult; AMessage: string); virtual;\r\n class procedure DoCurlRequestComplete(const ARequestResult: TTMSFNCCloudBaseRequestResult);\r\n procedure DoRequestRemove(const ARequestResult: TTMSFNCCloudBaseRequestResult);\r\n procedure DoRequestComplete(const ARequestResult: TTMSFNCCloudBaseRequestResult);\r\n procedure DoRequestCancelled(const ARequestResult: TTMSFNCCloudBaseRequestResult);\r\n procedure DoRequestStarted(const ARequestResult: TTMSFNCCloudBaseRequestResult);\r\n procedure DoRequestsComplete;\r\n procedure DoRequestProgress(const ARequestResult: TTMSFNCCloudBaseRequestResult; AProgress: single; AUpload: Boolean);\r\n procedure DoRequestLog(const ARequestResult: TTMSFNCCloudBaseRequestResult; ALogMessage: string);\r\n procedure InternalExecuteRequest(const ARequest: TTMSFNCCloudBaseRequestResult); virtual;\r\n {$IFDEF SUPPORTCURL}\r\n class procedure InternalCurl(const ACurl: string; ACallbackRequest: TTMSFNCCloudBaseRequestResultEvent; ACallbackString: TTMSFNCCloudBaseRequestResultStringEvent; ACallbackStream: TTMSFNCCloudBaseRequestResultStreamEvent); overload;\r\n {$ENDIF}\r\n class procedure InternalSimpleGETAsync(const AURL: string; const AResultType: TTMSFNCCloudBaseRequestResultType; const ARequestResultEvent: TTMSFNCCloudBaseRequestResultEvent);\r\n class function InternalSimpleGETSync(const AURL: string; const AResultType: TTMSFNCCloudBaseRequestResultType): TTMSFNCCloudBaseRequestResult; {$IFDEF WEBLIB} async;{$ENDIf}\r\n property CloudBase: ITMSFNCCustomCloudBase read FCloudBase;\r\n property Version: string read GetVersion;\r\n property Service: TTMSFNCCloudBaseService read FService write SetService;\r\n property OnRequestLog: TTMSFNCCloudBaseLogEvent read FOnRequestLog write FOnRequestLog;\r\n property OnRequestProgress: TTMSFNCCloudBaseProgressEvent read FOnRequestProgress write FOnRequestProgress;\r\n property OnRequestComplete: TTMSFNCCloudBaseCompleteEvent read FOnRequestComplete write FOnRequestComplete;\r\n property OnRequestCancelled: TTMSFNCCloudBaseCancelledEvent read FOnRequestCancelled write FOnRequestCancelled;\r\n property OnRequestStarted: TTMSFNCCloudBaseStartedEvent read FOnRequestStarted write FOnRequestStarted;\r\n property OnRequestsComplete: TNotifyEvent read FOnRequestsComplete write FOnRequestsComplete;\r\n property Logging: Boolean read FLogging write FLogging default False;\r\n property LogFileName: string read FLogFileName write FLogFileName stored IsLogFileNameStored nodefault;\r\n public\r\n constructor Create; reintroduce; overload; virtual;\r\n constructor Create(AOwner: TComponent); overload; override;\r\n procedure Assign(Source: TPersistent); override;\r\n destructor Destroy; override;\r\n procedure ExecuteAllRequests;\r\n procedure Test; virtual;\r\n procedure CancelRequests; virtual;\r\n procedure CancelRequest(const ARequest: TTMSFNCCloudBaseRequestResult); virtual;\r\n function GetUploadFileSize(const ARequest: TTMSFNCCloudBaseRequest): Int64; virtual;\r\n function GetRequestCount(const IsRunning: Boolean = False; const ARequestName: string = ''): Integer; virtual;\r\n function AddRequest(const ARequestResultEvent: TTMSFNCCloudBaseRequestResultEvent = nil; const ARequestResultProgressEvent: TTMSFNCCloudBaseRequestResultProgressEvent = nil; const AAsync: Boolean = True): TTMSFNCCloudBaseRequestResult; virtual;\r\n function ExecuteRequest(const ARequestResultEvent: TTMSFNCCloudBaseRequestResultEvent = nil; const ARequestResultProgressEvent: TTMSFNCCloudBaseRequestResultProgressEvent = nil; const AAsync: Boolean = True): {$IFDEF WEBLIB}TJSPromise{$ELSE}TTMSFNCCloudBaseRequestResult{$ENDIF}; virtual;\r\n property Request: TTMSFNCCloudBaseRequest read FRequest;\r\n property RequestResult: TTMSFNCCloudBaseRequestResult read FRequestResult;\r\n property PostDataBuilder: TTMSFNCCloudBaseRequestPostDataBuilder read GetPostDataBuilder;\r\n property Scopes: TStrings read FScopes write SetScopes;\r\n property RunningRequests: TTMSFNCCloudBaseRequests read FRequests;\r\n class procedure DownloadFileFromURL(const AURL: string; const ARequestResultEvent: TTMSFNCCloudBaseRequestResultEvent);\r\n class procedure SimpleGETAsyncAsString(const AURL: string; const ARequestResultEvent: TTMSFNCCloudBaseRequestResultEvent);\r\n class procedure SimpleGETAsyncAsStream(const AURL: string; const ARequestResultEvent: TTMSFNCCloudBaseRequestResultEvent);\r\n {$IFNDEF LCLWEBLIB}\r\n class function SimpleGETSyncAsString(const AURL: string): string;\r\n class function SimpleGETSyncAsStream(const AURL: string): TMemoryStream;\r\n {$ENDIF}\r\n {$IFDEF SUPPORTCURL}\r\n class procedure Curl(const ACurl: string; ACallback: TTMSFNCCloudBaseRequestResultEvent); overload;\r\n class procedure Curl(const ACurl: string; ACallback: TTMSFNCCloudBaseRequestResultStringEvent); overload;\r\n class procedure Curl(const ACurl: string; ACallback: TTMSFNCCloudBaseRequestResultStreamEvent); overload;\r\n {$ENDIF}\r\n end;\r\n\r\n {$IFNDEF LCLLIB}\r\n [ComponentPlatformsAttribute(TMSPlatformsWeb)]\r\n {$ENDIF}\r\n TTMSFNCCloudBase = class(TTMSFNCCustomCloudBase)\r\n published\r\n property Logging;\r\n property LogFileName;\r\n property Version;\r\n property OnRequestsComplete;\r\n property OnRequestLog;\r\n property OnRequestComplete;\r\n property OnRequestCancelled;\r\n property OnRequestStarted;\r\n property OnRequestProgress;\r\n end;\r\n\r\n {$IFDEF WEBLIB}\r\n TTMSFNCCloudBaseList = class(TList)\r\n private\r\n function GetItem(Index: Integer): ITMSFNCCustomCloudBase;\r\n procedure SetItem(Index: Integer; const Value: ITMSFNCCustomCloudBase);\r\n public\r\n property Items[Index: Integer]: ITMSFNCCustomCloudBase read GetItem write SetItem; default;\r\n end;\r\n {$ENDIF}\r\n {$IFNDEF WEBLIB}\r\n TTMSFNCCloudBaseList = class(TList);\r\n {$ENDIF}\r\n\r\n TTMSFNCCloudBaseFactoryService = class(TInterfacedObject, ITMSFNCCloudBaseService)\r\n protected\r\n FCloudBases: TTMSFNCCloudBaseList;\r\n function DoCreateCloudBase(const AValue: TTMSFNCCustomCloudBase): ITMSFNCCustomCloudBase; virtual; abstract;\r\n procedure DoRemoveCloudBase(const AValue: ITMSFNCCustomCloudBase);\r\n public\r\n constructor Create;\r\n destructor Destroy; override;\r\n function CreateCloudBase(const AValue: TTMSFNCCustomCloudBase): ITMSFNCCustomCloudBase;\r\n procedure DestroyCloudBase(const AValue: ITMSFNCCustomCloudBase);\r\n end;\r\n\r\n TTMSFNCCloudPlatformServicesService = class\r\n private\r\n FInterface: IInterface;\r\n FGUID: string;\r\n public\r\n constructor Create(AGUID: string; AInterface: IInterface);\r\n property GUID: string read FGUID;\r\n property &Interface: IInterface read FInterface;\r\n end;\r\n\r\n {$IFDEF WEBLIB}\r\n TTMSFNCCloudPlatformServicesList = class(TObjectList)\r\n private\r\n function GetItem(Index: Integer): TTMSFNCCloudPlatformServicesService;\r\n procedure SetItem(Index: Integer; const Value: TTMSFNCCloudPlatformServicesService);\r\n public\r\n property Items[Index: Integer]: TTMSFNCCloudPlatformServicesService read GetItem write SetItem; default;\r\n {$ENDIF}\r\n {$IFNDEF WEBLIB}\r\n TTMSFNCCloudPlatformServicesList = class(TObjectList)\r\n {$ENDIF}\r\n private\r\n function GetValue(AGUID: string): IInterface;\r\n public\r\n function ContainsKey(AGUID: string): Boolean;\r\n procedure RemoveByGUID(AGUID: string);\r\n property Interfaces[AGUID: string]: IInterface read GetValue;\r\n end;\r\n\r\n TTMSFNCCloudBasePlatformServices = class\r\n private\r\n FServicesList: TTMSFNCCloudPlatformServicesList;\r\n class var FCurrent: TTMSFNCCloudBasePlatformServices;\r\n class var FCurrentReleased: Boolean;\r\n{$IFNDEF AUTOREFCOUNT}\r\n class procedure ReleaseCurrent;\r\n{$ENDIF}\r\n public\r\n constructor Create;\r\n destructor Destroy; override;\r\n procedure AddPlatformService(const AServiceGUID: TGUID; const AService: IInterface);\r\n procedure RemovePlatformService(const AServiceGUID: TGUID);\r\n function GetPlatformService(const AServiceGUID: TGUID): IInterface;\r\n function SupportsPlatformService(const AServiceGUID: TGUID): Boolean; overload;\r\n function SupportsPlatformService(const AServiceGUID: TGUID; var AService: IInterface): Boolean; overload;\r\n class function Current: TTMSFNCCloudBasePlatformServices;\r\n end;\r\n\r\nfunction HTTPPostDataBuilder: TTMSFNCCloudBaseRequestPostDataBuilder;\r\nprocedure HTTPClearHeaders;\r\nprocedure HTTPAddHeader(const AName: string; const AValue: string);\r\nprocedure HTTPCloudRequest(const AURL: string; AResultType: TTMSFNCCloudBaseRequestResultType = rrtString; AMethod: TTMSFNCCloudBaseRequestMethod = rmGET; const ARequestResultEvent: TTMSFNCCloudBaseRequestResultEvent = nil); overload;\r\nprocedure HTTPCloudRequest(const AHost, APath, AQuery, APostData: string; AResultType: TTMSFNCCloudBaseRequestResultType = rrtString; AMethod: TTMSFNCCloudBaseRequestMethod = rmPOST; const ARequestResultEvent: TTMSFNCCloudBaseRequestResultEvent = nil); overload;\r\n\r\nimplementation\r\n\r\nuses\r\n StrUtils\r\n {$IFDEF MSWINDOWS}\r\n ,WEBLib.TMSFNCCloudBase.Win\r\n {$ENDIF}\r\n {$IFDEF UNIX}\r\n ,WEBLib.TMSFNCCloudBase.Unix\r\n {$ENDIF}\r\n {$IFDEF MACOS}\r\n ,WEBLib.TMSFNCCloudBase.Mac\r\n {$ENDIF}\r\n {$IFDEF ANDROID}\r\n ,WEBLib.TMSFNCCloudBase.Android\r\n {$ENDIF}\r\n {$IFDEF WEBLIB}\r\n ,WEBLib.TMSFNCCloudBase.WEB\r\n {$ENDIF}\r\n ;\r\n\r\nvar\r\n FCloudBaseGlobal: TTMSFNCCustomCloudBase;\r\n FPostDataBuilderGlobal: TTMSFNCCloudBaseRequestPostDataBuilder;\r\n FHeadersGlobal: TTMSFNCCloudBaseRequestHeaders;\r\n\r\nfunction HTTPPostDataBuilder: TTMSFNCCloudBaseRequestPostDataBuilder;\r\nbegin\r\n Result := TTMSFNCCustomCloudBase.GetPostDataBuilderGlobal;\r\nend;\r\n\r\nprocedure HTTPClearHeaders;\r\nvar\r\n h: TTMSFNCCloudBaseRequestHeaders;\r\nbegin\r\n h := TTMSFNCCustomCloudBase.GetHeadersGlobal;\r\n h.Clear;\r\nend;\r\n\r\nprocedure HTTPAddHeader(const AName: string; const AValue: string);\r\nvar\r\n h: TTMSFNCCloudBaseRequestHeaders;\r\nbegin\r\n h := TTMSFNCCustomCloudBase.GetHeadersGlobal;\r\n h.Add(TTMSFNCCloudBaseRequestHeader.Create(AName, AValue));\r\nend;\r\n\r\nprocedure HTTPCloudRequest(const AURL: string; AResultType: TTMSFNCCloudBaseRequestResultType = rrtString; AMethod: TTMSFNCCloudBaseRequestMethod = rmGET; const ARequestResultEvent: TTMSFNCCloudBaseRequestResultEvent = nil); overload;\r\nvar\r\n c: TTMSFNCCustomCloudBase;\r\n I: Integer;\r\n h: TTMSFNCCloudBaseRequestHeaders;\r\nbegin\r\n c := TTMSFNCCustomCloudBase.GetCloudBaseGlobal;\r\n if Assigned(c) then\r\n begin\r\n c.Request.Clear;\r\n c.Request.Host := AURL;\r\n c.Request.Method := AMethod;\r\n h := TTMSFNCCustomCloudBase.GetHeadersGlobal;\r\n if Assigned(h) then\r\n begin\r\n for I := 0 to h.Count - 1 do\r\n c.Request.AddHeader(h[I].Name, h[I].Value);\r\n end;\r\n c.Request.ResultType := AResultType;\r\n c.ExecuteRequest(ARequestResultEvent);\r\n end;\r\nend;\r\n\r\nprocedure HTTPCloudRequest(const AHost, APath, AQuery, APostData: string; AResultType: TTMSFNCCloudBaseRequestResultType = rrtString; AMethod: TTMSFNCCloudBaseRequestMethod = rmPOST; const ARequestResultEvent: TTMSFNCCloudBaseRequestResultEvent = nil); overload;\r\nvar\r\n c: TTMSFNCCustomCloudBase;\r\n I: Integer;\r\n h: TTMSFNCCloudBaseRequestHeaders;\r\nbegin\r\n c := TTMSFNCCustomCloudBase.GetCloudBaseGlobal;\r\n if Assigned(c) then\r\n begin\r\n c.Request.Clear;\r\n c.Request.Host := AHost;\r\n c.Request.Path := APath;\r\n c.Request.Query := AQuery;\r\n c.Request.Method := AMethod;\r\n c.Request.PostData := APostData;\r\n h := TTMSFNCCustomCloudBase.GetHeadersGlobal;\r\n if Assigned(h) then\r\n begin\r\n for I := 0 to h.Count - 1 do\r\n c.Request.AddHeader(h[I].Name, h[I].Value);\r\n end;\r\n c.Request.ResultType := AResultType;\r\n c.ExecuteRequest(ARequestResultEvent);\r\n end;\r\nend;\r\n\r\n{ TTMSFNCCustomCloudBase }\r\n\r\nfunction TTMSFNCCustomCloudBase.AddRequest(const ARequestResultEvent: TTMSFNCCloudBaseRequestResultEvent = nil; const ARequestResultProgressEvent: TTMSFNCCloudBaseRequestResultProgressEvent = nil; const AAsync: Boolean = True): TTMSFNCCloudBaseRequestResult;\r\nvar\r\n req: TTMSFNCCloudBaseRequestResult;\r\n t: ITask;\r\nbegin\r\n t := nil;\r\n req := TTMSFNCCloudBaseRequestResult.Create(Request, ARequestResultEvent, ARequestResultProgressEvent, AAsync, t);\r\n req.OnRemove := DoRequestRemove;\r\n req.OnComplete := DoRequestComplete;\r\n req.OnCancelled := DoRequestCancelled;\r\n req.OnProgress := DoRequestProgress;\r\n req.OnLog := DoRequestLog;\r\n\r\n if req.IsAsyncAvailable then\r\n begin\r\n {$IFDEF LCLWEBLIBTHREAD}\r\n t := TTask.Create(req, @InternalExecuteRequest);\r\n {$ENDIF}\r\n {$IFNDEF LCLWEBLIBTHREAD}\r\n t := TTask.Create(\r\n procedure\r\n begin\r\n if (req.Task.Status <> TTaskStatus.Canceled) and not IsDestroying then\r\n begin\r\n InternalExecuteRequest(req);\r\n end;\r\n end);\r\n {$ENDIF}\r\n end;\r\n\r\n req.Task := t;\r\n\r\n FRequests.Add(req);\r\n\r\n Result := req;\r\nend;\r\n\r\nprocedure TTMSFNCCustomCloudBase.Assign(Source: TPersistent);\r\nbegin\r\n if Source is TTMSFNCCustomCloudBase then\r\n begin\r\n FLogging := (Source as TTMSFNCCustomCloudBase).Logging;\r\n FLogFileName := (Source as TTMSFNCCustomCloudBase).LogFileName;\r\n end\r\n else\r\n inherited;\r\nend;\r\n\r\n{$IFDEF SUPPORTPROMISE}\r\nprocedure TTMSFNCCustomCloudBase.AssignReject(AReject: TProc);\r\nbegin\r\n DisablePromiseTimeout;\r\n\r\n if Assigned(FReject) then\r\n FReject(ETMSFNCCloudBasePromiseException.Create('Promise did not resolve'));\r\n\r\n FReject := AReject;\r\nend;\r\n{$ENDIF}\r\n\r\nprocedure TTMSFNCCustomCloudBase.CancelRequest(\r\n const ARequest: TTMSFNCCloudBaseRequestResult);\r\nbegin\r\n if Assigned(ARequest) then\r\n ARequest.Cancel;\r\nend;\r\n\r\nprocedure TTMSFNCCustomCloudBase.CancelRequests;\r\nvar\r\n I: Integer;\r\n r: TTMSFNCCloudBaseRequest;\r\n rr: TTMSFNCCloudBaseRequestResult;\r\nbegin\r\n for I := 0 to RunningRequests.Count - 1 do\r\n begin\r\n r := RunningRequests[I];\r\n if r is TTMSFNCCloudBaseRequestResult then\r\n begin\r\n rr := (r as TTMSFNCCloudBaseRequestResult);\r\n rr.Cancel;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomCloudBase.ClearPromiseResolvers;\r\nbegin\r\n {$IFDEF SUPPORTPROMISE}\r\n FReject := nil;\r\n {$ENDIF}\r\nend;\r\n\r\nconstructor TTMSFNCCustomCloudBase.Create;\r\nbegin\r\n Create(nil);\r\nend;\r\n\r\nconstructor TTMSFNCCustomCloudBase.Create(AOwner: TComponent);\r\nvar\r\n CloudBaseService: ITMSFNCCloudBaseService;\r\nbegin\r\n inherited;\r\n if TTMSFNCCloudBasePlatformServices.Current.SupportsPlatformService(ITMSFNCCloudBaseService, IInterface(CloudBaseService)) then\r\n FCloudBase := CloudBaseService.CreateCloudBase(Self);\r\n\r\n FLogging := False;\r\n FLogFileName := ClassName + '.LOG';\r\n\r\n FRequest := TTMSFNCCloudBaseRequest.Create;\r\n FRequests := TTMSFNCCloudBaseRequests.Create;\r\n\r\n FService := TTMSFNCCloudBaseService.Create;\r\n\r\n FScopes := TStringList.Create;\r\n\r\n {$IFDEF SUPPORTPROMISE}\r\n FPromiseTimeoutTimer := TTimer.Create(Self);\r\n FPromiseTimeoutTimer.Enabled := False;\r\n FPromiseTimeoutTimer.OnTimer := DoPromiseTimeoutTimer;\r\n {$ENDIF}\r\nend;\r\n\r\nclass function TTMSFNCCustomCloudBase.GetCloudBaseGlobal: TTMSFNCCustomCloudBase;\r\nbegin\r\n if not Assigned(FCloudBaseGlobal) then\r\n FCloudBaseGlobal := TTMSFNCCustomCloudBase.Create;\r\n\r\n Result := FCloudBaseGlobal;\r\nend;\r\n\r\nclass function TTMSFNCCustomCloudBase.GetHeadersGlobal: TTMSFNCCloudBaseRequestHeaders;\r\nbegin\r\n if not Assigned(FHeadersGlobal) then\r\n FHeadersGlobal := TTMSFNCCloudBaseRequestHeaders.Create;\r\n\r\n Result := FHeadersGlobal;\r\nend;\r\n\r\nclass function TTMSFNCCustomCloudBase.GetPostDataBuilderGlobal: TTMSFNCCloudBaseRequestPostDataBuilder;\r\nbegin\r\n if not Assigned(FPostDataBuilderGlobal) then\r\n FPostDataBuilderGlobal := TTMSFNCCloudBaseRequestPostDataBuilder.Create;\r\n\r\n Result := FPostDataBuilderGlobal;\r\nend;\r\n\r\nfunction TTMSFNCCustomCloudBase.GetInstance: NativeUInt;\r\nbegin\r\n Result := HInstance;\r\nend;\r\n\r\nfunction TTMSFNCCustomCloudBase.GetUploadFileSize(\r\n const ARequest: TTMSFNCCloudBaseRequest): Int64;\r\nbegin\r\n Result := 0;\r\n if Assigned(FCloudBase) then\r\n Result := FCloudBase.GetUploadFileSize(ARequest);\r\nend;\r\n\r\nfunction TTMSFNCCustomCloudBase.GetPostDataBuilder: TTMSFNCCloudBaseRequestPostDataBuilder;\r\nbegin\r\n if not Assigned(FPostDataBuilder) then\r\n FPostDataBuilder := TTMSFNCCloudBaseRequestPostDataBuilder.Create;\r\n\r\n Result := FPostDataBuilder;\r\nend;\r\n\r\nfunction TTMSFNCCustomCloudBase.GetRequestCount(const IsRunning: Boolean = False; const ARequestName: string = ''): Integer;\r\nvar\r\n I: Integer;\r\n r: TTMSFNCCloudBaseRequest;\r\n rr: TTMSFNCCloudBaseRequestResult;\r\nbegin\r\n Result := 0;\r\n for I := 0 to FRequests.Count - 1 do\r\n begin\r\n r := FRequests[I];\r\n if r is TTMSFNCCloudBaseRequestResult then\r\n begin\r\n rr := r as TTMSFNCCloudBaseRequestResult;\r\n if ((IsRunning and not rr.FDone) or not IsRunning) and ((rr.Name = ARequestName) or (ARequestName = '')) then\r\n Inc(Result);\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCCustomCloudBase.GetScopes(ADelimiter: Char; AEncode: Boolean = False): string;\r\nvar\r\n i: integer;\r\n scopestr: string;\r\nbegin\r\n Result := '';\r\n for i := 0 to Scopes.Count - 1 do\r\n begin\r\n if AEncode then\r\n scopestr := TTMSFNCUtils.URLEncode(Scopes[i])\r\n else\r\n scopestr := Scopes[i];\r\n\r\n if Result = '' then\r\n Result := scopestr\r\n else\r\n Result := Result + ADelimiter + scopestr;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCCustomCloudBase.GetVersion: string;\r\nbegin\r\n Result := GetVersionNumber(MAJ_VER, MIN_VER, REL_VER, BLD_VER);\r\nend;\r\n\r\nprocedure TTMSFNCCustomCloudBase.InternalExecuteRequest(\r\n const ARequest: TTMSFNCCloudBaseRequestResult);\r\nbegin\r\n if Assigned(FCloudBase) and Assigned(ARequest) then\r\n begin\r\n FRequestResult := nil;\r\n DoRequestStarted(ARequest);\r\n ARequest.Running := True;\r\n ARequest.Log('Executing request [' + ARequest.Name + '] with url: [' + ARequest.GetURL + ']');\r\n FCloudBase.ExecuteRequest(ARequest);\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCCustomCloudBase.IsLogFileNameStored: Boolean;\r\nbegin\r\n Result := FLogFileName <> ClassName + '.LOG';\r\nend;\r\n\r\nprocedure TTMSFNCCustomCloudBase.Log(const ARequestResult: TTMSFNCCloudBaseRequestResult; AMessage: string);\r\nvar\r\n {$IFNDEF WEBLIB}\r\n tf: System.Text;\r\n fn: string;\r\n {$ENDIF}\r\n s: string;\r\nbegin\r\n if not Logging then\r\n Exit;\r\n\r\n if Assigned(OnRequestLog) then\r\n OnRequestLog(Self, ARequestResult, AMessage)\r\n else\r\n begin\r\n {$IFDEF FNCLIB}\r\n s := TTMSFNCUtils.DateTimeToISO(Now) + ': ' + AMessage;\r\n {$ELSE}\r\n s := DateTimeToStr(Now) + ': ' + AMessage;\r\n {$ENDIF}\r\n\r\n {$IFDEF WEBLIB}\r\n asm\r\n console.log(s);\r\n end;\r\n {$ELSE}\r\n if LogFileName = '' then\r\n Exit;\r\n\r\n if (Pos('\\', LogFilename) = 0) and (Pos('/', LogFileName) = 0) and (Pos(':', LogFileName) = 0) then\r\n fn := TTMSFNCUtils.AddBackslash(TTMSFNCUtils.GetDocumentsPath) + LogFileName\r\n else\r\n fn := Logfilename;\r\n\r\n AssignFile(tf, fn);\r\n try\r\n {$i-}\r\n Append(tf);\r\n {$i+}\r\n if IOResult <> 0 then\r\n begin\r\n {$i-}\r\n Rewrite(tf);\r\n {$i+}\r\n if IOResult <> 0 then\r\n Exit;\r\n end;\r\n\r\n Writeln(tf, s);\r\n finally\r\n if TTextRec(tf).Mode <> fmClosed then\r\n CloseFile(tf);\r\n end;\r\n {$ENDIF}\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomCloudBase.RejectPromise(AMessage: string);\r\nbegin\r\n DisablePromiseTimeout;\r\n\r\n {$IFDEF SUPPORTPROMISE}\r\n if Assigned(FReject) then\r\n FReject(ETMSFNCCloudBasePromiseException.Create(AMessage));\r\n {$ENDIF}\r\n\r\n ClearPromiseResolvers;\r\nend;\r\n\r\nprocedure TTMSFNCCustomCloudBase.SetScopes(const Value: TStrings);\r\nbegin\r\n FScopes.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCCustomCloudBase.SetService(\r\n const Value: TTMSFNCCloudBaseService);\r\nbegin\r\n FService.Assign(Value);\r\nend;\r\n\r\nclass procedure TTMSFNCCustomCloudBase.SimpleGETAsyncAsString(const AURL: string; const ARequestResultEvent: TTMSFNCCloudBaseRequestResultEvent);\r\nbegin\r\n InternalSimpleGETAsync(AURL, rrtString, ARequestResultEvent);\r\nend;\r\n\r\nclass procedure TTMSFNCCustomCloudBase.SimpleGETAsyncAsStream(const AURL: string; const ARequestResultEvent: TTMSFNCCloudBaseRequestResultEvent);\r\nbegin\r\n InternalSimpleGETAsync(AURL, rrtStream, ARequestResultEvent);\r\nend;\r\n\r\nclass procedure TTMSFNCCustomCloudBase.InternalSimpleGETAsync(const AURL: string; const AResultType: TTMSFNCCloudBaseRequestResultType;\r\n const ARequestResultEvent: TTMSFNCCloudBaseRequestResultEvent);\r\nvar\r\n c: TTMSFNCCustomCloudBase;\r\nbegin\r\n c := GetCloudBaseGlobal;\r\n if Assigned(c) then\r\n begin\r\n c.Request.Clear;\r\n c.Request.Host := AURL;\r\n c.Request.ResultType := AResultType;\r\n c.ExecuteRequest(ARequestResultEvent);\r\n end;\r\nend;\r\n\r\nclass function TTMSFNCCustomCloudBase.InternalSimpleGETSync(\r\n const AURL: string; const AResultType: TTMSFNCCloudBaseRequestResultType): TTMSFNCCloudBaseRequestResult;\r\nvar\r\n c: TTMSFNCCustomCloudBase;\r\nbegin\r\n Result := nil;\r\n c := GetCloudBaseGlobal;\r\n if Assigned(c) then\r\n begin\r\n c.Request.Clear;\r\n c.Request.Host := AURL;\r\n c.Request.ResultType := AResultType;\r\n Result := {$IFDEF WEBLIB}await(TTMSFNCCloudBaseRequestResult,{$ENDIF} c.ExecuteRequest(nil, nil, False){$IFDEF WEBLIB}){$ENDIF};\r\n end;\r\nend;\r\n\r\n{$IFDEF SUPPORTCURL}\r\nclass procedure TTMSFNCCustomCloudBase.InternalCurl(const ACurl: string; ACallbackRequest: TTMSFNCCloudBaseRequestResultEvent; ACallbackString: TTMSFNCCloudBaseRequestResultStringEvent; ACallbackStream: TTMSFNCCloudBaseRequestResultStreamEvent);\r\nvar\r\n c: TTMSFNCCustomCloudBase;\r\n p: TTMSFNCCloudBaseRequestCurlParser;\r\nbegin\r\n c := GetCloudBaseGlobal;\r\n if Assigned(c) then\r\n begin\r\n p := TTMSFNCCloudBaseRequestCurlParser.Create;\r\n try\r\n c.Request.Assign(p.Parse(ACurl));\r\n if Assigned(ACallbackString) then\r\n c.Request.ResultType := rrtString;\r\n\r\n c.Request.DataObject := TTMSFNCCloudBaseRequestResultEventWrapper.Create(ACallbackRequest, ACallbackString, ACallbackStream);\r\n finally\r\n p.Free;\r\n end;\r\n\r\n c.ExecuteRequest({$IFDEF LCLWEBLIB}@{$ENDIF}DoCurlRequestComplete);\r\n end;\r\nend;\r\n\r\nclass procedure TTMSFNCCustomCloudBase.Curl(const ACurl: string; ACallback: TTMSFNCCloudBaseRequestResultEvent);\r\nbegin\r\n InternalCurl(ACurl, ACallback, nil, nil);\r\nend;\r\n\r\nclass procedure TTMSFNCCustomCloudBase.Curl(const ACurl: string; ACallback: TTMSFNCCloudBaseRequestResultStringEvent);\r\nbegin\r\n InternalCurl(ACurl, nil, ACallback, nil);\r\nend;\r\n\r\nclass procedure TTMSFNCCustomCloudBase.Curl(const ACurl: string; ACallback: TTMSFNCCloudBaseRequestResultStreamEvent);\r\nbegin\r\n InternalCurl(ACurl, nil, nil, ACallback);\r\nend;\r\n{$ENDIF}\r\n\r\n{$IFNDEF LCLWEBLIB}\r\nclass function TTMSFNCCustomCloudBase.SimpleGETSyncAsStream(\r\n const AURL: string): TMemoryStream;\r\nbegin\r\n Result := InternalSimpleGETSync(AURL, rrtStream).ResultStream;\r\nend;\r\n\r\nclass function TTMSFNCCustomCloudBase.SimpleGETSyncAsString(\r\n const AURL: string): string;\r\nbegin\r\n Result := InternalSimpleGETSync(AURL, rrtString).ResultString;\r\nend;\r\n{$ENDIF}\r\n\r\nprocedure TTMSFNCCustomCloudBase.SetPromiseTimeout(AInterval: Integer);\r\nbegin\r\n {$IFDEF SUPPORTPROMISE}\r\n FPromiseTimeoutTimer.Interval := AInterval;\r\n FPromiseTimeoutTimer.Enabled := True;\r\n {$ENDIF}\r\nend;\r\n\r\nprocedure TTMSFNCCustomCloudBase.Test;\r\nbegin\r\n\r\nend;\r\n\r\ndestructor TTMSFNCCustomCloudBase.Destroy;\r\nvar\r\n CloudBaseService: ITMSFNCCloudBaseService;\r\nbegin\r\n {$IFDEF SUPPORTPROMISE}\r\n RejectPromise('Promise did not resolve');\r\n FPromiseTimeoutTimer.Free;\r\n {$ENDIF}\r\n\r\n FreeAndNil(FRequests);\r\n FreeAndNil(FRequest);\r\n FreeAndNil(FPostDataBuilder);\r\n\r\n if TTMSFNCCloudBasePlatformServices.Current.SupportsPlatformService(ITMSFNCCloudBaseService, IInterface(CloudBaseService)) then\r\n CloudBaseService.DestroyCloudBase(FCloudBase);\r\n\r\n FCloudBase := nil;\r\n\r\n FService.Free;\r\n FScopes.Free;\r\n\r\n inherited;\r\nend;\r\n\r\nprocedure TTMSFNCCustomCloudBase.DisablePromiseTimeout;\r\nbegin\r\n {$IFDEF SUPPORTPROMISE}\r\n FPromiseTimeoutTimer.Enabled := False;\r\n {$ENDIF}\r\nend;\r\n\r\nclass procedure TTMSFNCCustomCloudBase.DoCurlRequestComplete(const ARequestResult: TTMSFNCCloudBaseRequestResult);\r\nvar\r\n obj: TTMSFNCCloudBaseRequestResultEventWrapper;\r\nbegin\r\n if Assigned(ARequestResult.DataObject) then\r\n begin\r\n obj := TTMSFNCCloudBaseRequestResultEventWrapper(ARequestResult.DataObject);\r\n if Assigned(obj.FCallbackRequest) then\r\n obj.FCallbackRequest(ARequestResult);\r\n\r\n if Assigned(obj.FCallbackString) then\r\n obj.FCallbackString(ARequestResult.ResultString);\r\n\r\n if Assigned(obj.FCallbackStream) then\r\n obj.FCallbackStream(ARequestResult.ResultStream);\r\n obj.Free;\r\n end;\r\nend;\r\n\r\n{$IFDEF SUPPORTPROMISE}\r\nprocedure TTMSFNCCustomCloudBase.DoPromiseTimeoutTimer(Sender: TObject);\r\nbegin\r\n RejectPromise('Request Timeout');\r\nend;\r\n{$ENDIF}\r\n\r\nprocedure TTMSFNCCustomCloudBase.DoRequestRemove(const ARequestResult: TTMSFNCCloudBaseRequestResult);\r\nbegin\r\n if Assigned(ARequestResult) and ARequestResult.Async then\r\n FRequests.Remove(ARequestResult);\r\n\r\n if RunningRequests.Count = 0 then\r\n DoRequestsComplete;\r\nend;\r\n\r\nprocedure TTMSFNCCustomCloudBase.DoRequestsComplete;\r\nbegin\r\n if Assigned(OnRequestsComplete) then\r\n OnRequestsComplete(Self);\r\nend;\r\n\r\nprocedure TTMSFNCCustomCloudBase.DoRequestStarted(\r\n const ARequestResult: TTMSFNCCloudBaseRequestResult);\r\nbegin\r\n if Assigned(OnRequestStarted) then\r\n OnRequestStarted(Self, ARequestResult);\r\nend;\r\n\r\nclass procedure TTMSFNCCustomCloudBase.DownloadFileFromURL(const AURL: string;\r\n const ARequestResultEvent: TTMSFNCCloudBaseRequestResultEvent);\r\nbegin\r\n InternalSimpleGETAsync(AURL, rrtStream, ARequestResultEvent);\r\nend;\r\n\r\nprocedure TTMSFNCCustomCloudBase.DoRequestCancelled(\r\n const ARequestResult: TTMSFNCCloudBaseRequestResult);\r\nbegin\r\n if Assigned(ARequestResult) then\r\n begin\r\n if Assigned(OnRequestCancelled) then\r\n OnRequestCancelled(Self, ARequestResult);\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomCloudBase.DoRequestComplete(\r\n const ARequestResult: TTMSFNCCloudBaseRequestResult);\r\nbegin\r\n if Assigned(ARequestResult) then\r\n begin\r\n ARequestResult.Log('Response code from request [' + ARequestResult.Name + '] is ' + IntTostr(ARequestResult.ResponseCode));\r\n if (ARequestResult.ResponseCode in ValidHTTPCodes) then\r\n begin\r\n case ARequestResult.ResultType of\r\n rrtString: ARequestResult.Log('Result from request [' + ARequestResult.Name + '] is ' + ARequestResult.ResultString);\r\n rrtStream: ARequestResult.Log('Result from request [' + ARequestResult.Name + '] is a stream with size ' + TTMSFNCUtils.FormatBytesAsString(ARequestResult.ResultStream.Size));\r\n rrtFile: ARequestResult.Log('Result from request [' + ARequestResult.Name + '] is a file with location [' + ARequestResult.ResultFile + ']');\r\n end;\r\n end\r\n else\r\n ARequestResult.Log('Result from request [' + ARequestResult.Name + '] is ' + ARequestResult.ResultString);\r\n\r\n ARequestResult.Success := (ARequestResult.ResponseCode in ValidHTTPCodes);\r\n\r\n FRequestResult := ARequestResult;\r\n\r\n if Assigned(OnRequestComplete) then\r\n OnRequestComplete(Self, ARequestResult);\r\n\r\n ARequestResult.RequestResult;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomCloudBase.DoRequestLog(\r\n const ARequestResult: TTMSFNCCloudBaseRequestResult; ALogMessage: string);\r\nbegin\r\n if Assigned(ARequestResult) then\r\n Log(ARequestResult, ALogMessage);\r\nend;\r\n\r\nprocedure TTMSFNCCustomCloudBase.DoRequestProgress(\r\n const ARequestResult: TTMSFNCCloudBaseRequestResult; AProgress: single; AUpload: Boolean);\r\nbegin\r\n if Assigned(ARequestResult) then\r\n begin\r\n if Assigned(ARequestResult) then\r\n ARequestResult.RequestProgress(AProgress, AUpload);\r\n if Assigned(OnRequestProgress) then\r\n OnRequestProgress(Self, ARequestResult, AProgress, AUpload);\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomCloudBase.ExecuteAllRequests;\r\nvar\r\n I: Integer;\r\n req: TTMSFNCCloudBaseRequestResult;\r\nbegin\r\n for I := 0 to FRequests.Count - 1 do\r\n begin\r\n req := TTMSFNCCloudBaseRequestResult(FRequests[I]);\r\n if not req.Running then\r\n begin\r\n if req.IsAsyncAvailable then\r\n begin\r\n {$IFNDEF LCLWEBLIBTHREAD}\r\n if not (req.Task.Status = TTaskStatus.Canceled) and not IsDestroying then\r\n {$ENDIF}\r\n req.Task.Start\r\n end\r\n else\r\n begin\r\n InternalExecuteRequest(req);\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCCustomCloudBase.ExecuteRequest(const ARequestResultEvent: TTMSFNCCloudBaseRequestResultEvent = nil; const ARequestResultProgressEvent: TTMSFNCCloudBaseRequestResultProgressEvent = nil; const AAsync: Boolean = True): {$IFDEF WEBLIB}TJSPromise{$ELSE}TTMSFNCCloudBaseRequestResult{$ENDIF};\r\n{$IFDEF WEBLIB}\r\nvar\r\n req: TTMSFNCCloudBaseRequestResult;\r\n{$ENDIF}\r\nbegin\r\n {$IFDEF WEBLIB}\r\n Result := TJSPromise.New(\r\n procedure(AResolve, AReject : TJSPromiseResolver)\r\n begin\r\n req := AddRequest(ARequestResultEvent, ARequestResultProgressEvent, AAsync);\r\n\r\n if not AAsync then\r\n req.FResolve := AResolve;\r\n\r\n if Assigned(req) then\r\n InternalExecuteRequest(req);\r\n\r\n if AAsync then\r\n AResolve(req);\r\n end);\r\n {$ELSE}\r\n begin\r\n Result := AddRequest(ARequestResultEvent, ARequestResultProgressEvent, AAsync);\r\n\r\n if Assigned(Result) then\r\n begin\r\n if Result.IsAsyncAvailable then\r\n begin\r\n {$IFNDEF LCLWEBLIBTHREAD}\r\n if not (Result.Task.Status = TTaskStatus.Canceled) and not IsDestroying then\r\n {$ENDIF}\r\n Result.Task.Start\r\n end\r\n else\r\n InternalExecuteRequest(Result);\r\n end;\r\n end;\r\n {$ENDIF}\r\nend;\r\n\r\n{ TTMSFNCCloudBaseFactoryService }\r\n\r\nconstructor TTMSFNCCloudBaseFactoryService.Create;\r\nbegin\r\n inherited Create;\r\n FCloudBases := TTMSFNCCloudBaseList.Create;\r\nend;\r\n\r\nfunction TTMSFNCCloudBaseFactoryService.CreateCloudBase(const AValue: TTMSFNCCustomCloudBase): ITMSFNCCustomCloudBase;\r\nbegin\r\n Result := DoCreateCloudBase(AValue);\r\n FCloudBases.Add(Result);\r\nend;\r\n\r\ndestructor TTMSFNCCloudBaseFactoryService.Destroy;\r\nbegin\r\n FreeAndNil(FCloudBases);\r\n inherited Destroy;\r\nend;\r\n\r\nprocedure TTMSFNCCloudBaseFactoryService.DestroyCloudBase(\r\n const AValue: ITMSFNCCustomCloudBase);\r\nbegin\r\n DoRemoveCloudBase(AValue);\r\nend;\r\n\r\nprocedure TTMSFNCCloudBaseFactoryService.DoRemoveCloudBase(\r\n const AValue: ITMSFNCCustomCloudBase);\r\nbegin\r\n if (FCloudBases <> nil) and (AValue <> nil) then\r\n FCloudBases.Remove(AValue);\r\nend;\r\n\r\n{ TTMSFNCCloudBasePlatformServices }\r\n\r\nprocedure TTMSFNCCloudBasePlatformServices.AddPlatformService(const AServiceGUID: TGUID; const AService: IInterface);\r\nvar\r\n LService: IInterface;\r\nbegin\r\n if not FServicesList.ContainsKey(GUIDToString(AServiceGUID)) then\r\n begin\r\n if Supports(AService, AServiceGUID, LService) then\r\n FServicesList.Add(TTMSFNCCloudPlatformServicesService.Create(GUIDToString(AServiceGUID), AService));\r\n end;\r\nend;\r\n\r\nconstructor TTMSFNCCloudBasePlatformServices.Create;\r\nbegin\r\n inherited;\r\n FServicesList := TTMSFNCCloudPlatformServicesList.Create;\r\nend;\r\n\r\ndestructor TTMSFNCCloudBasePlatformServices.Destroy;\r\nbegin\r\n FreeAndNil(FServicesList);\r\n inherited;\r\nend;\r\n\r\n{$IFNDEF AUTOREFCOUNT}\r\nclass procedure TTMSFNCCloudBasePlatformServices.ReleaseCurrent;\r\nbegin\r\n FreeAndNil(FCurrent);\r\n FCurrentReleased := True;\r\nend;\r\n{$ENDIF}\r\n\r\nclass function TTMSFNCCloudBasePlatformServices.Current: TTMSFNCCloudBasePlatformServices;\r\nbegin\r\n if (FCurrent = nil) and not FCurrentReleased then\r\n FCurrent := TTMSFNCCloudBasePlatformServices.Create;\r\n Result := FCurrent;\r\nend;\r\n\r\nfunction TTMSFNCCloudBasePlatformServices.GetPlatformService(const AServiceGUID: TGUID): IInterface;\r\nvar\r\n k: IInterface;\r\nbegin\r\n k := FServicesList.Interfaces[GUIDToString(AServiceGUID)];\r\n Supports(k, AServiceGUID, Result);\r\nend;\r\n\r\nprocedure TTMSFNCCloudBasePlatformServices.RemovePlatformService(const AServiceGUID: TGUID);\r\nbegin\r\n FServicesList.RemoveByGUID(GUIDToString(AServiceGUID));\r\nend;\r\n\r\nfunction TTMSFNCCloudBasePlatformServices.SupportsPlatformService(const AServiceGUID: TGUID;\r\n var AService: IInterface): Boolean;\r\nbegin\r\n if FServicesList.ContainsKey(GUIDToString(AServiceGUID)) then\r\n Result := Supports(FServicesList.Interfaces[GUIDToString(AServiceGUID)], AServiceGUID, AService)\r\n else\r\n begin\r\n AService := nil;\r\n Result := False;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCCloudBasePlatformServices.SupportsPlatformService(const AServiceGUID: TGUID): Boolean;\r\nbegin\r\n Result := FServicesList.ContainsKey(GUIDToString(AServiceGUID));\r\nend;\r\n\r\n{ TTMSFNCCloudBaseRequestHeader }\r\n\r\nconstructor TTMSFNCCloudBaseRequestHeader.Create(const AName, AValue: string);\r\nbegin\r\n FName := AName;\r\n FValue := AValue;\r\nend;\r\n\r\n{ TTMSFNCCloudBaseRequest }\r\n\r\n{$IFDEF FNCLIB}\r\nfunction TTMSFNCCloudBaseRequest.AddBasicAuthHeader(const AUserName: string; const APassword: string): TTMSFNCCloudBaseRequestHeader;\r\nvar\r\n h: TTMSFNCCloudBaseRequestHeader;\r\nbegin\r\n h := TTMSFNCCloudBaseRequestHeader.Create('Authorization', 'Basic ' + TTMSFNCUtils.Encode64(AUserName + ':' + APassword));\r\n Headers.Add(h);\r\n Result := h;\r\nend;\r\n{$ENDIF}\r\n\r\nfunction TTMSFNCCloudBaseRequest.AddHeader(const AName,\r\n AValue: string): TTMSFNCCloudBaseRequestHeader;\r\nvar\r\n h: TTMSFNCCloudBaseRequestHeader;\r\nbegin\r\n h := TTMSFNCCloudBaseRequestHeader.Create(AName, AValue);\r\n Headers.Add(h);\r\n Result := h;\r\nend;\r\n\r\nfunction TTMSFNCCloudBaseRequest.HasUploadFile: Boolean;\r\nbegin\r\n {$IFDEF WEBLIB}\r\n Result := Assigned(FUploadFile.Data);\r\n {$ELSE}\r\n Result := FUploadFile <> '';\r\n {$ENDIF}\r\nend;\r\n\r\nfunction TTMSFNCCloudBaseRequest.HasUploadStream: Boolean;\r\nbegin\r\n Result := Assigned(FUploadStream) and (FUploadStream.Size > 0);\r\nend;\r\n\r\nprocedure TTMSFNCCloudBaseRequest.Assign(ARequest: TTMSFNCCloudBaseRequest);\r\nvar\r\n I: Integer;\r\nbegin\r\n FAgent := ARequest.Agent;\r\n FHost := ARequest.Host;\r\n FPort := ARequest.Port;\r\n FPath := ARequest.Path;\r\n FMethod := ARequest.Method;\r\n FQuery := ARequest.Query;\r\n FName := ARequest.Name;\r\n FPostData := ARequest.PostData;\r\n FResultType := ARequest.ResultType;\r\n FResultFileSize := ARequest.ResultFileSize;\r\n FReadTimeout := ARequest.ReadTimeout;\r\n FConnectTimeout := ARequest.ConnectTimeout;\r\n\r\n if ARequest.HasUploadStream then\r\n UploadStream.LoadFromStream(ARequest.UploadStream);\r\n\r\n FUploadFile := ARequest.UploadFile;\r\n FResultFile := ARequest.ResultFile;\r\n FCustomHeaders := ARequest.CustomHeaders;\r\n\r\n FDataPointer := ARequest.DataPointer;\r\n FDataBoolean := ARequest.DataBoolean;\r\n FDataObject := ARequest.DataObject;\r\n FDataString := ARequest.DataString;\r\n FDataUpload := ARequest.DataUpload;\r\n FDataInteger := ARequest.DataInteger;\r\n FDataInt64 := ARequest.DataInt64;\r\n\r\n Headers.Clear;\r\n for I := 0 to ARequest.Headers.Count - 1 do\r\n Headers.Add(DuplicateHeader(ARequest.Headers[I]));\r\nend;\r\n\r\nprocedure TTMSFNCCloudBaseRequest.Clear;\r\nbegin\r\n ClearHeaders;\r\n FHost := '';\r\n FPort := 0;\r\n FResultFileSize := -1;\r\n FPath := '';\r\n FQuery := '';\r\n FMethod := rmGET;\r\n FResultType := rrtString;\r\n FName := '';\r\n FPostData := '';\r\n FDataPointer := nil;\r\n FDataBoolean := False;\r\n FDataString := '';\r\n FDataObject := nil;\r\n FDataInteger := 0;\r\n FDataInt64 := 0;\r\n if Assigned(FUploadStream) then\r\n begin\r\n FUploadStream.Clear;\r\n FUploadStream.Position := 0;\r\n end;\r\n {$IFDEF WEBLIB}\r\n FDataUpload.Data := nil;\r\n FDataUpload.Name := '';\r\n FUploadFile.Data := nil;\r\n FUploadFile.Name := '';\r\n {$ELSE}\r\n FUploadFile := '';\r\n FDataUpload := '';\r\n {$ENDIF}\r\n FResultFile := '';\r\n FCustomHeaders := False;\r\n FReadTimeout := 60000;\r\n FConnectTimeout := 60000;\r\nend;\r\n\r\nprocedure TTMSFNCCloudBaseRequest.ClearHeaders;\r\nbegin\r\n Headers.Clear;\r\nend;\r\n\r\nconstructor TTMSFNCCloudBaseRequest.Create;\r\nbegin\r\n FAgent := 'Mozilla/5.001 (windows; U; NT4.0; en-US; rv:1.0) Gecko/25250101';\r\n FMethod := rmGET;\r\n FResultType := rrtString;\r\n FResultFileSize := -1;\r\n FReadTimeout := 60000;\r\n FConnectTimeout := 60000;\r\nend;\r\n\r\ndestructor TTMSFNCCloudBaseRequest.Destroy;\r\nbegin\r\n FreeAndNil(FHeaders);\r\n FreeAndNil(FUploadStream);\r\n inherited;\r\nend;\r\n\r\nfunction TTMSFNCCloudBaseRequest.DuplicateHeader(\r\n AHeader: TTMSFNCCloudBaseRequestHeader): TTMSFNCCloudBaseRequestHeader;\r\nbegin\r\n Result := TTMSFNCCloudBaseRequestHeader.Create(AHeader.Name, AHeader.Value);\r\nend;\r\n\r\nfunction TTMSFNCCloudBaseRequest.GenerateHeaders: string;\r\nvar\r\n i: integer;\r\nbegin\r\n Result := '';\r\n for I := 0 to Headers.Count - 1 do\r\n Result := Result + Headers[I].Name + ': ' + headers[I].Value +#13#10;\r\nend;\r\n\r\nfunction TTMSFNCCloudBaseRequest.GetHeaders: TTMSFNCCloudBaseRequestHeaders;\r\nbegin\r\n if not Assigned(FHeaders) then\r\n FHeaders := TTMSFNCCloudBaseRequestHeaders.Create;\r\n Result := FHeaders;\r\nend;\r\n\r\nfunction TTMSFNCCloudBaseRequest.GetMethodString: string;\r\nbegin\r\n case Method of\r\n rmGET: Result := 'GET';\r\n rmPOST, rmPOSTMULTIPART, rmPOSTMULTIPARTRELATED: Result := 'POST';\r\n rmPUT, rmPUTMULTIPART, rmPUTMULTIPARTRELATED, rmUPDATE: Result := 'PUT';\r\n rmDELETE: Result := 'DELETE';\r\n rmPATCH: Result := 'PATCH';\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCCloudBaseRequest.GetPort: Integer;\r\nbegin\r\n Result := Port;\r\n if Result = 0 then\r\n begin\r\n if Pos('HTTPS', UpperCase(Host)) > 0 then\r\n Result := 443\r\n else\r\n Result := 80;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCCloudBaseRequest.GetQueryPath: string;\r\nvar\r\n q: string;\r\nbegin\r\n q := '';\r\n if Query <> '' then\r\n q := '?' + Query;\r\n\r\n Result := Path + q;\r\nend;\r\n\r\nfunction TTMSFNCCloudBaseRequest.GetServer: string;\r\nvar\r\n firstslash: integer;\r\n firstat: integer;\r\n s: string;\r\nbegin\r\n s := Host;\r\n\r\n if Pos('://',UpperCase(s)) > 0 then\r\n Delete(s, 1, Pos('://', s) + 2);\r\n\r\n firstslash := Pos('/', s);\r\n firstat := Pos('@', s);\r\n\r\n if (firstat > 0) and (firstat < firstslash) then\r\n Delete(s, 1, firstat + 1);\r\n\r\n if firstslash > 0 then\r\n Delete(s, 1, firstslash - 1);\r\n\r\n Result := s;\r\nend;\r\n\r\nfunction TTMSFNCCloudBaseRequest.GetUploadStream: TMemoryStream;\r\nbegin\r\n if not Assigned(FUploadStream) then\r\n FUploadStream := TMemoryStream.Create;\r\n Result := FUploadStream;\r\nend;\r\n\r\nfunction TTMSFNCCloudBaseRequest.GetURL: string;\r\nvar\r\n p, q: string;\r\nbegin\r\n p := '';\r\n if Port > 0 then\r\n p := ':' + IntToStr(Port);\r\n\r\n q := '';\r\n if Query <> '' then\r\n q := '?' + Query;\r\n\r\n Result := Host + p + Path + q;\r\nend;\r\n\r\n{ TTMSFNCCloudBaseRequestResult }\r\n\r\nprocedure TTMSFNCCloudBaseRequestResult.Cancel;\r\nbegin\r\n if Assigned(Task) then\r\n Task.Cancel;\r\nend;\r\n\r\nfunction TTMSFNCCloudBaseRequestResult.CheckTaskStatus: Boolean;\r\nbegin\r\n if FIsDestroying then\r\n Result := False\r\n else\r\n Result := (IsAsyncAvailable and Assigned(Task) and (Task.Status <> TTaskStatus.Canceled)) or not IsAsyncAvailable;\r\nend;\r\n\r\nprocedure TTMSFNCCloudBaseRequestResult.Clear;\r\nbegin\r\n inherited;\r\n FBytesReceived := 0;\r\n FTotalBytes := 0;\r\n FSuccess := False;\r\n FResultString := '';\r\n FResultStream.Clear;\r\n FCallBackResult := nil;\r\n FCallBackProgress := nil;\r\n FTask := nil;\r\n FResponseCode := 0;\r\n FRunning := False;\r\n FResponseHeaders.Clear;\r\nend;\r\n\r\nconstructor TTMSFNCCloudBaseRequestResult.Create;\r\nbegin\r\n inherited Create;\r\nend;\r\n\r\nconstructor TTMSFNCCloudBaseRequestResult.Create(const ARequest: TTMSFNCCloudBaseRequest; const ARequestResultEvent: TTMSFNCCloudBaseRequestResultEvent = nil; const ARequestResultProgressEvent: TTMSFNCCloudBaseRequestResultProgressEvent = nil; const AAsync: Boolean = True; const ATask: ITask = nil);\r\nbegin\r\n inherited Create;\r\n Assign(ARequest);\r\n FAsync := AAsync;\r\n FTask := ATask;\r\n FCallBackResult := ARequestResultEvent;\r\n FCallBackProgress := ARequestResultProgressEvent;\r\n FResultStream := TMemoryStream.Create;\r\n FResponseHeaders := TTMSFNCCloudBaseRequestHeaders.Create;\r\nend;\r\n\r\ndestructor TTMSFNCCloudBaseRequestResult.Destroy;\r\nbegin\r\n FIsDestroying := True;\r\n\r\n if Assigned(FTask) then\r\n FTask.Cancel;\r\n\r\n FTask := nil;\r\n FCallBackResult := nil;\r\n FCallBackProgress := nil;\r\n if Assigned(FResultStream) then\r\n FResultStream.Free;\r\n\r\n if Assigned(FResponseHeaders) then\r\n FResponseHeaders.Free;\r\n inherited;\r\nend;\r\n\r\nfunction TTMSFNCCloudBaseRequestResult.GetResponseHeader(AName: string): string;\r\nvar\r\n I: Integer;\r\nbegin\r\n Result := '';\r\n for I := 0 to ResponseHeaders.Count - 1 do\r\n begin\r\n if UpperCase(ResponseHeaders[I].Name) = UpperCase(AName) then\r\n begin\r\n Result := ResponseHeaders[I].Value;\r\n Break;\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCCloudBaseRequestResult.IsAsyncAvailable: Boolean;\r\nbegin\r\n Result := Async;\r\nend;\r\n\r\nprocedure TTMSFNCCloudBaseRequestResult.Log(AMessage: string);\r\nbegin\r\n FMessage := AMessage;\r\n {$IFNDEF WEBLIB}\r\n TThread.Queue(nil, ProcessLog);\r\n {$ENDIF}\r\n {$IFDEF WEBLIB}\r\n ProcessLog;\r\n {$ENDIF}\r\nend;\r\n\r\nprocedure TTMSFNCCloudBaseRequestResult.ProcessLog;\r\nbegin\r\n if Assigned(OnLog) then\r\n OnLog(Self, FMessage);\r\nend;\r\n\r\nprocedure TTMSFNCCloudBaseRequestResult.ProcessProgress;\r\nbegin\r\n if Assigned(CallBackProgress) then\r\n CallBackProgress(Self, FProgress);\r\nend;\r\n\r\nprocedure TTMSFNCCloudBaseRequestResult.ProcessResult;\r\nbegin\r\n if Assigned(CallBackResult) then\r\n CallBackResult(Self);\r\n\r\n {$IFDEF WEBLIB}\r\n if Assigned(FResolve) then\r\n FResolve(Self);\r\n {$ENDIF}\r\n\r\n if Assigned(OnRemove) then\r\n OnRemove(Self);\r\nend;\r\n\r\nprocedure TTMSFNCCloudBaseRequestResult.RequestProgress(AProgress: Single; AUpload: Boolean);\r\nbegin\r\n FProgress := AProgress;\r\n if IsAsyncAvailable then\r\n begin\r\n {$IFNDEF LCLWEBLIBTHREAD}\r\n if TTask.CurrentTask.Status <> TTaskStatus.Canceled then\r\n {$ENDIF}\r\n begin\r\n {$IFNDEF WEBLIB}\r\n TThread.Queue(nil, ProcessProgress);\r\n {$ENDIF}\r\n {$IFDEF WEBLIB}\r\n ProcessProgress;\r\n {$ENDIF}\r\n end;\r\n end\r\n else\r\n ProcessProgress;\r\nend;\r\n\r\nprocedure TTMSFNCCloudBaseRequestResult.RequestResult;\r\nbegin\r\n if IsAsyncAvailable then\r\n begin\r\n {$IFNDEF LCLWEBLIBTHREAD}\r\n if TTask.CurrentTask.Status <> TTaskStatus.Canceled then\r\n {$ENDIF}\r\n begin\r\n {$IFNDEF WEBLIB}\r\n TThread.Queue(nil, ProcessResult);\r\n {$ENDIF}\r\n {$IFDEF WEBLIB}\r\n ProcessResult;\r\n {$ENDIF}\r\n end;\r\n end\r\n else\r\n ProcessResult;\r\nend;\r\n\r\n{$IFDEF WEBLIB}\r\nfunction TTMSFNCCloudBaseRequests.GetItem(Index: Integer): TTMSFNCCloudBaseRequest;\r\nbegin\r\n Result := TTMSFNCCloudBaseRequest(inherited Items[Index]);\r\nend;\r\n\r\nprocedure TTMSFNCCloudBaseRequests.SetItem(Index: Integer; const Value: TTMSFNCCloudBaseRequest);\r\nbegin\r\n inherited Items[Index] := Value;\r\nend;\r\n\r\nfunction TTMSFNCCloudBaseRequestHeaders.GetItem(Index: Integer): TTMSFNCCloudBaseRequestHeader;\r\nbegin\r\n Result := TTMSFNCCloudBaseRequestHeader(inherited Items[Index]);\r\nend;\r\n\r\nprocedure TTMSFNCCloudBaseRequestHeaders.SetItem(Index: Integer; const Value: TTMSFNCCloudBaseRequestHeader);\r\nbegin\r\n inherited Items[Index] := Value;\r\nend;\r\n\r\nfunction TTMSFNCCloudBaseList.GetItem(Index: Integer): ITMSFNCCustomCloudBase;\r\nbegin\r\n Result := ITMSFNCCustomCloudBase(inherited Items[Index]);\r\nend;\r\n\r\nprocedure TTMSFNCCloudBaseList.SetItem(Index: Integer; const Value: ITMSFNCCustomCloudBase);\r\nbegin\r\n inherited Items[Index] := Value;\r\nend;\r\n\r\nfunction TTMSFNCCloudPlatformServicesList.GetItem(Index: Integer): TTMSFNCCloudPlatformServicesService;\r\nbegin\r\n Result := TTMSFNCCloudPlatformServicesService(inherited Items[Index]);\r\nend;\r\n\r\nprocedure TTMSFNCCloudPlatformServicesList.SetItem(Index: Integer; const Value: TTMSFNCCloudPlatformServicesService);\r\nbegin\r\n inherited Items[Index] := Value;\r\nend;\r\n{$ENDIF}\r\n\r\n{$IFDEF LCLWEBLIBTHREAD}\r\nconstructor TTask.Create(const ARequest: TTMSFNCCloudBaseRequestResult; const ARunEvent: TTMSFNCCloudBaseRequestRunEvent);\r\nbegin\r\n FTaskStatus := TTaskStatus.Created;\r\n FRunEvent := ARunEvent;\r\n FRequest := ARequest;\r\nend;\r\n\r\ndestructor TTask.Destroy;\r\nbegin\r\n FRunEvent := nil;\r\n inherited;\r\nend;\r\n\r\nfunction TTask.GetStatus: TTaskStatus;\r\nbegin\r\n Result := FTaskStatus;\r\nend;\r\n\r\nprocedure TTask.Cancel;\r\nbegin\r\n {$IFDEF LCLLIBTHREAD}\r\n FWorkerThread.Terminate;\r\n {$ENDIF}\r\n FTaskStatus := TTaskStatus.Canceled;\r\nend;\r\n\r\nprocedure TTask.Start;\r\nbegin\r\n {$IFDEF LCLLIBTHREAD}\r\n FWorkerThread := TTaskWorkerThread.Create(FRequest, FRunEvent);\r\n {$ELSE}\r\n if Assigned(FRunEvent) then\r\n FRunEvent(FRequest);\r\n {$ENDIF}\r\n FTaskStatus := TTaskStatus.Running;\r\nend;\r\n\r\n{$IFDEF LCLLIBTHREAD}\r\nconstructor TTaskWorkerThread.Create(const ARequest: TTMSFNCCloudBaseRequestResult; const ARunEvent: TTMSFNCCloudBaseRequestRunEvent);\r\nbegin\r\n inherited Create(False);\r\n FRequest := ARequest;\r\n FRunEvent := ARunEvent;\r\n FreeOnTerminate := False;\r\nend;\r\n\r\ntype\r\n TTMSFNCCloudBaseRequestResultOpen = class(TTMSFNCCloudBaseRequestResult);\r\n\r\nprocedure TTaskWorkerThread.Execute;\r\nbegin\r\n if Assigned(FRunEvent) then\r\n begin\r\n FRunEvent(FRequest);\r\n while not TTMSFNCCloudBaseRequestResultOpen(FRequest).FDone do\r\n Sleep(1);\r\n end;\r\nend;\r\n{$ENDIF}\r\n{$ENDIF}\r\n\r\n{ TTMSFNCCloudPlatformServicesService }\r\n\r\nconstructor TTMSFNCCloudPlatformServicesService.Create(AGUID: string;\r\n AInterface: IInterface);\r\nbegin\r\n FGUID := AGUID;\r\n FInterface := AInterface;\r\nend;\r\n\r\n{ TTMSFNCCloudPlatformServicesList }\r\n\r\nfunction TTMSFNCCloudPlatformServicesList.ContainsKey(AGUID: string): Boolean;\r\nvar\r\n I: Integer;\r\nbegin\r\n Result := False;\r\n for I := 0 to Count - 1 do\r\n begin\r\n if Items[I].GUID = AGUID then\r\n begin\r\n Result := True;\r\n Break;\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCCloudPlatformServicesList.GetValue(AGUID: string): IInterface;\r\nvar\r\n I: Integer;\r\nbegin\r\n Result := nil;\r\n for I := 0 to Count - 1 do\r\n begin\r\n if Items[I].GUID = AGUID then\r\n begin\r\n Result := Items[I].&Interface;\r\n Break;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCloudPlatformServicesList.RemoveByGUID(AGUID: string);\r\nvar\r\n I: Integer;\r\nbegin\r\n for I := Count - 1 downto 0 do\r\n begin\r\n if Items[I].GUID = AGUID then\r\n begin\r\n Remove(Items[I]);\r\n Break;\r\n end;\r\n end;\r\nend;\r\n\r\n{ TTMSFNCCloudBaseService }\r\n\r\nprocedure TTMSFNCCloudBaseService.Assign(Source: TPersistent);\r\nbegin\r\n if Source is TTMSFNCCloudBaseService then\r\n begin\r\n FBaseURL := (Source as TTMSFNCCloudBaseService).BaseURL;\r\n FDeveloperURL := (Source as TTMSFNCCloudBaseService).DeveloperURL;\r\n FName := (Source as TTMSFNCCloudBaseService).Name;\r\n end\r\n else\r\n inherited;\r\nend;\r\n\r\n{ TTMSFNCCloudBaseRequestPostDataBuilder }\r\n\r\nprocedure TTMSFNCCloudBaseRequestPostDataBuilder.AddAttachment(AName: string; AValue: string; ASkipBoundary: Boolean = False; AFileName: string = '';\r\n AContentType: string = ''; AContentTransferEncoding: string = ''; ASkipLineBreakOnEnd: Boolean = False);\r\nbegin\r\n AddInternalData('attachment', AName, AValue, ASkipBoundary, AFileName, AContentType, AContentTransferEncoding, ASkipLineBreakOnEnd);\r\nend;\r\n\r\nprocedure TTMSFNCCloudBaseRequestPostDataBuilder.AddContentType(AValue: string);\r\nbegin\r\n FPostData := FPostData + Format('Content-Type: %s' + sRequestLineBreak, [AValue]);\r\nend;\r\n\r\nprocedure TTMSFNCCloudBaseRequestPostDataBuilder.AddFormData(AName: string; AValue: string; ASkipBoundary: Boolean = False; AFileName: string = ''; AContentType: string = ''; AContentTransferEncoding: string = ''; ASkipLineBreakOnEnd: Boolean = False);\r\nbegin\r\n AddInternalData('form-data', AName, AValue, ASkipBoundary, AFileName, AContentType, AContentTransferEncoding, ASkipLineBreakOnEnd);\r\nend;\r\n\r\nprocedure TTMSFNCCloudBaseRequestPostDataBuilder.AddHeadBoundary;\r\nbegin\r\n FPostData := FPostData + sRequestHeadBoundary + sRequestLineBreak;\r\nend;\r\n\r\nprocedure TTMSFNCCloudBaseRequestPostDataBuilder.AddInternalData(ADataType: string; AName: string; AValue: string; ASkipBoundary: Boolean; AFileName: string; AContentType: string; AContentTransferEncoding: string; ASkipLineBreakOnEnd: Boolean);\r\nbegin\r\n if not ASkipBoundary then\r\n AddHeadBoundary;\r\n\r\n if AContentType <> '' then\r\n FPostData := FPostData + Format('Content-Type: %s' + sRequestLineBreak, [AContentType]);\r\n\r\n if AContentTransferEncoding <> '' then\r\n FPostData := FPostData + Format('Content-Transfer-Encoding: %s' + sRequestLineBreak, [AContentTransferEncoding]);\r\n\r\n if (AFileName <> '') and (AName <> '') then\r\n FPostData := FPostData + Format('Content-Disposition: ' + ADataType + '; name=\"%s\"; filename=\"%s\"' + sRequestLineBreak, [AName, AFileName])\r\n else if (AName <> '') then\r\n FPostData := FPostData + Format('Content-Disposition: ' + ADataType + '; name=\"%s\"' + sRequestLineBreak, [AName])\r\n else if (AFileName <> '') then\r\n FPostData := FPostData + Format('Content-Disposition: ' + ADataType + '; filename=\"%s\"' + sRequestLineBreak, [AFileName]);\r\n\r\n if AValue <> '' then\r\n begin\r\n if not ASkipLineBreakOnEnd then\r\n FPostData := FPostData + Format(sRequestLineBreak + '%s' + sRequestLineBreak, [AValue])\r\n else\r\n FPostData := FPostData + Format(sRequestLineBreak + '%s', [AValue])\r\n end\r\n else\r\n FPostData := FPostData + sRequestLineBreak;\r\nend;\r\n\r\nprocedure TTMSFNCCloudBaseRequestPostDataBuilder.AddLineBreak;\r\nbegin\r\n FPostData := FPostData + sRequestLineBreak;\r\nend;\r\n\r\nprocedure TTMSFNCCloudBaseRequestPostDataBuilder.AddTailBoundary;\r\nbegin\r\n FPostData := FPostData + sRequestTailBoundary + sRequestLineBreak;\r\nend;\r\n\r\nprocedure TTMSFNCCloudBaseRequestPostDataBuilder.AddText(AText: string; ALineBreak: Boolean = True);\r\nbegin\r\n FPostData := FPostData + AText;\r\n if ALineBreak then\r\n FPostData := FPostData + sLineBreak;\r\nend;\r\n\r\nfunction TTMSFNCCloudBaseRequestPostDataBuilder.Build: string;\r\nbegin\r\n Result := FPostData;\r\nend;\r\n\r\nprocedure TTMSFNCCloudBaseRequestPostDataBuilder.Clear;\r\nbegin\r\n FPostData := '';\r\nend;\r\n\r\nprocedure TTMSFNCCloudBaseRequestPostDataBuilder.Close;\r\nbegin\r\n AddTailBoundary;\r\nend;\r\n\r\n{$IFDEF SUPPORTCURL}\r\n\r\n{ TTMSFNCCloudBaseRequestCurlParser }\r\n\r\nconstructor TTMSFNCCloudBaseRequestCurlParser.Create;\r\nbegin\r\n FRequest := TTMSFNCCloudBaseRequest.Create;\r\nend;\r\n\r\ndestructor TTMSFNCCloudBaseRequestCurlParser.Destroy;\r\nbegin\r\n FreeAndNil(FRequest);\r\n inherited;\r\nend;\r\n\r\nfunction TTMSFNCCloudBaseRequestCurlParser.Parse(\r\n ACurl: string): TTMSFNCCloudBaseRequest;\r\nvar\r\n t, l, e, ev, hd, pd: TStringList;\r\n fl: TStringStream;\r\n fn: string;\r\n cmd, vl, vln, vld: string;\r\n I, K, o, vldp: Integer;\r\n v, hs: Boolean;\r\n n, h, q, p: string;\r\n pt: Integer;\r\n s: string;\r\n f, fs, mp: Boolean;\r\n mt: string;\r\n fls: TFileStream;\r\n md: TTMSFNCCloudBaseRequestCurlParserMode;\r\n qp: Boolean;\r\n obj: TTMSFNCCloudBaseRequestCurlParserFile;\r\n ob: TObject;\r\n pdb: TStringStream;\r\nbegin\r\n Result := nil;\r\n if not Assigned(FRequest) then\r\n Exit;\r\n\r\n FRequest.Clear;\r\n FRequest.ResultType := rrtStream;\r\n\r\n v := False;\r\n cmd := ACurl;\r\n cmd := StringReplace(cmd, #13#10, '', [rfReplaceAll]);\r\n t := TStringList.Create('''', ' ');\r\n l := TStringList.Create('''', ' ');\r\n pd := TStringList.Create;\r\n pd.Delimiter := '&';\r\n pd.TrailingLineBreak := False;\r\n pd.QuoteChar := #0;\r\n pd.StrictDelimiter := True;\r\n\r\n try\r\n s := cmd;\r\n cmd := '';\r\n f := False;\r\n fs := False;\r\n {$IFDEF ZEROSTRINGINDEX}\r\n o := 1;\r\n {$ELSE}\r\n o := 0;\r\n {$ENDIF}\r\n I := 1;\r\n while I <= Length(s) do\r\n begin\r\n if (s[I - o] = '''') then\r\n fs := not fs;\r\n\r\n if (s[I - o] = '\"') and not fs then\r\n begin\r\n if not f then\r\n begin\r\n f := True;\r\n s[I - o] := '''';\r\n end\r\n else if f then\r\n begin\r\n f := False;\r\n s[I - o] := '''';\r\n end;\r\n end;\r\n\r\n cmd := cmd + s[I - o];\r\n Inc(I);\r\n end;\r\n\r\n md := cpmNone;\r\n mp := False;\r\n qp := False;\r\n\r\n t.DelimitedText := cmd;\r\n\r\n for I := 0 to t.Count - 1 do\r\n begin\r\n vl := Trim(t[I]);\r\n\r\n if vl = '\\' then\r\n Continue;\r\n\r\n if md = cpmNone then\r\n begin\r\n if (vl = '-H') or (vl = '--header') then\r\n md := cpmHeader\r\n else if (vl = '-g') or (vl = '--get') then\r\n qp := True\r\n else if (vl = '-F') or (vl = '--form') then\r\n md := cpmFormData\r\n else if (vl = '-d') or (vl = '--data') or (vl = '--data-ascii') or (vl = '--json') then\r\n md := cpmData\r\n else if (vl = '--data-binary') then\r\n md := cpmDataBinary\r\n else if (vl = '--data-urlencode') then\r\n md := cpmDataUrlEncode\r\n else if (vl = '--data-raw') then\r\n md := cpmDataRaw\r\n else if (vl = '-u') or (vl = '--user') then\r\n md := cpmUser\r\n else if (vl = '--oauth2-bearer') then\r\n md := cpmBearer\r\n else if (vl = '-X') or (vl = '--request') then\r\n md := cpmRequest\r\n else if (vl = '-o') or (vl = '--output') then\r\n md := cpmResultFile\r\n else\r\n l.Add(vl);\r\n end\r\n else\r\n begin\r\n case md of\r\n cpmHeader:\r\n begin\r\n hd := TStringList.Create;\r\n try\r\n TTMSFNCUtils.Split(':', vl, hd, True);\r\n if hd.Count = 1 then\r\n FRequest.AddHeader(Trim(hd[0]), '')\r\n else if hd.Count > 1 then\r\n begin\r\n s := '';\r\n for K := 1 to hd.Count - 1 do\r\n begin\r\n s := s + hd[K];\r\n if K < hd.Count - 1 then\r\n s := s + ':';\r\n end;\r\n FRequest.AddHeader(Trim(hd[0]), Trim(s));\r\n end;\r\n finally\r\n hd.Free;\r\n end;\r\n end;\r\n cpmFormData, cpmData, cpmDataRaw, cpmDataUrlEncode:\r\n begin\r\n if md = cpmFormData then\r\n mp := True;\r\n\r\n if mp then\r\n ev := TStringList.Create('''', ';')\r\n else\r\n ev := TStringList.Create('''', '&');\r\n\r\n try\r\n ev.StrictDelimiter := True;\r\n ev.DelimitedText := vl;\r\n\r\n for K := 0 to ev.Count - 1 do\r\n begin\r\n e := TStringList.Create('''', '=');\r\n e.StrictDelimiter := True;\r\n try\r\n e.DelimitedText := ev[K];\r\n\r\n vln := '';\r\n vld := '';\r\n\r\n if e.Count = 2 then\r\n begin\r\n vln := e[0];\r\n vld := e[1];\r\n end\r\n else if e.Count = 1 then\r\n begin\r\n vld := e[0];\r\n end;\r\n\r\n obj := nil;\r\n\r\n if (md <> cpmDataRaw) and not TTMSFNCUtils.IsJSON(vld) then\r\n begin\r\n vldp := Pos('@', vld);\r\n if (vldp > 0) then\r\n begin\r\n if vln = '' then\r\n vln := Copy(vld, 1, vldp - 1);\r\n\r\n fn := Copy(vld, vldp + 1, Length(vld) - vldp);\r\n if FileExists(fn) then\r\n begin\r\n fl := TStringStream.Create;\r\n try\r\n if not mp then\r\n begin\r\n fl.LoadFromFile(fn);\r\n vld := fl.DataString;\r\n end;\r\n obj := TTMSFNCCloudBaseRequestCurlParserFile.Create;\r\n obj.FFileName := fn;\r\n finally\r\n fl.Free;\r\n end;\r\n end;\r\n end;\r\n end;\r\n\r\n if md = cpmDataUrlEncode then\r\n vld := TTMSFNCUtils.URLEncode(vld);\r\n\r\n if (vln <> '') and (vld <> '') then\r\n pd.AddObject(vln + '=' + vld, obj)\r\n else if (vld <> '') then\r\n pd.AddObject(vld, obj);\r\n finally\r\n e.Free;\r\n end;\r\n end;\r\n finally\r\n ev.free;\r\n end;\r\n end;\r\n cpmBearer: FRequest.AddHeader('Authorization', 'Bearer ' + vl);\r\n cpmUser: FRequest.AddHeader('Authorization', 'Basic ' + TTMSFNCUtils.Encode64(vl));\r\n cpmResultFile:\r\n begin\r\n FRequest.ResultType := rrtFile;\r\n FRequest.ResultFile := vl;\r\n end;\r\n cpmRequest:\r\n begin\r\n if UpperCase(vl) = 'GET' then\r\n FRequest.Method := rmGET\r\n else if UpperCase(vl) = 'POST' then\r\n FRequest.Method := rmPOST\r\n else if UpperCase(vl) = 'PUT' then\r\n FRequest.Method := rmPUT\r\n else if UpperCase(vl) = 'DELETE' then\r\n FRequest.Method := rmDELETE;\r\n end;\r\n end;\r\n\r\n md := cpmNone;\r\n end;\r\n end;\r\n\r\n for I := 0 to l.Count - 1 do\r\n begin\r\n vl := l[I];\r\n\r\n if not v and (UpperCase(vl) = 'CURL') then\r\n v := True\r\n else if v and (Pos('http', LowerCase(vl)) > 0) then\r\n begin\r\n h := '';\r\n q := '';\r\n p := '';\r\n pt := 0;\r\n TTMSFNCUtils.SplitURL(vl, h, p, q, pt);\r\n if h <> '' then\r\n FRequest.Host := h;\r\n\r\n if q <> '' then\r\n FRequest.Query := q;\r\n\r\n if p <> '' then\r\n FRequest.Path := p;\r\n\r\n if pt <> 0 then\r\n FRequest.Port := pt;\r\n end;\r\n end;\r\n\r\n if not mp then\r\n begin\r\n if qp then\r\n FRequest.Query := FRequest.Query + '&' + pd.DelimitedText\r\n else\r\n FRequest.PostData := pd.DelimitedText\r\n end\r\n else\r\n begin\r\n pdb := TStringStream.Create;\r\n try\r\n for I := 0 to pd.Count - 1 do\r\n begin\r\n if I > 0 then\r\n pdb.WriteString(sRequestLineBreak + sRequestHeadBoundary + sRequestLineBreak)\r\n else\r\n pdb.WriteString(sRequestHeadBoundary + sRequestLineBreak);\r\n\r\n ob := pd.Objects[I];\r\n n := pd.Names[I];\r\n if Assigned(ob) and (ob is TTMSFNCCloudBaseRequestCurlParserFile) then\r\n begin\r\n obj := ob as TTMSFNCCloudBaseRequestCurlParserFile;\r\n try\r\n mt := TTMSFNCUtils.GetMimeType(obj.FFileName) ;\r\n if mt = '' then\r\n mt := 'application/octet-stream';\r\n\r\n pdb.WriteString('Content-Type: ' + mt + sRequestLineBreak);\r\n pdb.WriteString('Content-Disposition: form-data; name=\"' + n + '\"; filename=\"' + obj.FFileName + '\"' + sRequestLineBreak);\r\n pdb.WriteString(sRequestLineBreak);\r\n fls := TFileStream.Create(obj.FFileName, fmOpenRead or fmShareDenyWrite);\r\n try\r\n pdb.CopyFrom(fls, 0);\r\n finally\r\n fls.Free;\r\n end;\r\n finally\r\n obj.Free;\r\n end;\r\n end\r\n else\r\n begin\r\n pdb.WriteString('Content-Disposition: form-data; name=\"' + n + '\"' + sRequestLineBreak);\r\n pdb.WriteString(sRequestLineBreak);\r\n pdb.WriteString(pd.Values[n]);\r\n end;\r\n end;\r\n\r\n pdb.WriteString(sRequestLineBreak + sRequestTailBoundary + sRequestLineBreak);\r\n FRequest.PostData := pdb.DataString;\r\n finally\r\n pdb.free;\r\n end;\r\n\r\n end;\r\n\r\n if FRequest.PostData <> '' then\r\n begin\r\n if (FRequest.Method = rmGET) then\r\n FRequest.Method := rmPOST;\r\n\r\n hs := False;\r\n for I := 0 to FRequest.Headers.Count - 1 do\r\n begin\r\n if UpperCase(FRequest.Headers[I].Name) = 'CONTENT-TYPE' then\r\n begin\r\n hs := True;\r\n Break;\r\n end;\r\n end;\r\n\r\n if not hs then\r\n begin\r\n if TTMSFNCUtils.IsJSON(FRequest.PostData) then\r\n FRequest.AddHeader('Content-Type', 'application/json')\r\n else\r\n begin\r\n if not mp then\r\n FRequest.AddHeader('Content-Type', 'application/x-www-form-urlencoded')\r\n else\r\n FRequest.AddHeader('Content-Type', 'multipart/form-data; boundary=' + sRequestBoundary);\r\n end;\r\n end;\r\n end;\r\n\r\n if not v then\r\n raise ETMSFNCCloudBaseException.Create('Not a valid curl command');\r\n\r\n finally\r\n t.Free;\r\n l.Free;\r\n pd.Free;\r\n end;\r\n\r\n Result := FRequest;\r\nend;\r\n{$ENDIF}\r\n\r\n{ TTMSFNCCloudBaseRequestResultEventWrapper }\r\n\r\nconstructor TTMSFNCCloudBaseRequestResultEventWrapper.Create(ACallbackRequest: TTMSFNCCloudBaseRequestResultEvent; ACallbackString: TTMSFNCCloudBaseRequestResultStringEvent; ACallbackStream: TTMSFNCCloudBaseRequestResultStreamEvent);\r\nbegin\r\n FCallbackRequest := ACallbackRequest;\r\n FCallbackString := ACallbackString;\r\n FCallbackStream := ACallbackStream;\r\nend;\r\n\r\ninitialization\r\nbegin\r\n TTMSFNCCloudBasePlatformServices.FCurrentReleased := False;\r\n RegisterCloudBaseService;\r\nend;\r\n\r\n{$IFNDEF WEBLIB}\r\nfinalization\r\nbegin\r\n if Assigned(FCloudBaseGlobal) then\r\n begin\r\n FCloudBaseGlobal.Free;\r\n FCloudBaseGlobal := nil;\r\n end;\r\n\r\n if Assigned(FHeadersGlobal) then\r\n begin\r\n FHeadersGlobal.Free;\r\n FHeadersGlobal := nil;\r\n end;\r\n\r\n if Assigned(FPostDataBuilderGlobal) then\r\n begin\r\n FPostDataBuilderGlobal.Free;\r\n FPostDataBuilderGlobal := nil;\r\n end;\r\n\r\n UnRegisterCloudBaseService;\r\n{$IFNDEF AUTOREFCOUNT}\r\n TTMSFNCCloudBasePlatformServices.ReleaseCurrent;\r\n{$ENDIF}\r\nend;\r\n{$ENDIF}\r\n\r\nend.\r\n","{********************************************************************}\r\n{ }\r\n{ written by TMS Software }\r\n{ copyright (c) 2020 - 2022 }\r\n{ Email : info@tmssoftware.com }\r\n{ Web : http://www.tmssoftware.com }\r\n{ }\r\n{ The source code is given as is. The author is not responsible }\r\n{ for any possible damage done due to the use of this code. }\r\n{ The complete source code remains property of the author and may }\r\n{ not be distributed, published, given or sold in any form as such. }\r\n{ No parts of the source code can be included in any other component }\r\n{ or application without written authorization of the author. }\r\n{********************************************************************}\r\n\r\nunit WEBLib.TMSFNCGeocoding.Google;\r\n\r\n{$I WEBLib.TMSFNCDefines.inc}\r\n\r\n{$IFDEF WEBLIB}\r\n{$DEFINE LCLWEBLIB}\r\n{$ENDIF}\r\n{$IFDEF LCLLIB}\r\n{$DEFINE LCLWEBLIB}\r\n{$ENDIF}\r\n\r\ninterface\r\n\r\nprocedure RegisterGoogleGeocodingService;\r\nprocedure UnRegisterGoogleGeocodingService;\r\n\r\nimplementation\r\n\r\nuses\r\n Classes, Math, DateUtils, Types, SysUtils, WEBLib.TMSFNCGeocoding,\r\n WEBLib.TMSFNCUtils, WEBLib.TMSFNCTypes, WEBLib.TMSFNCMapsCommonTypes, WEBLib.TMSFNCCloudBase\r\n {$IFNDEF WEBLIB}\r\n {$IFNDEF LCLLIB}\r\n {$HINTS OFF}\r\n {$IF COMPILERVERSION > 26}\r\n ,JSON\r\n {$ELSE}\r\n ,DBXJSON\r\n {$IFEND}\r\n {$HINTS ON}\r\n {$ELSE}\r\n ,fpjson\r\n {$ENDIF}\r\n {$ENDIF}\r\n {$IFDEF WEBLIB}\r\n ,Contnrs, Web, WEBLIB.JSON\r\n {$ENDIF}\r\n {$IFNDEF LCLWEBLIB}\r\n ,Generics.Collections, Generics.Defaults\r\n {$HINTS OFF}\r\n {$IF COMPILERVERSION > 22}\r\n , UITypes\r\n {$IFEND}\r\n {$HINTS ON}\r\n {$ENDIF}\r\n {$IFDEF LCLLIB}\r\n ,fgl\r\n {$ENDIF}\r\n ;\r\n\r\nconst\r\n PRECISION_ROOFTOP = 'ROOFTOP';\r\n PRECISION_RANGE_INTERPOLATED = 'RANGE_INTERPOLATED';\r\n PRECISION_GEOMETRIC_CENTER = 'GEOMETRIC_CENTER';\r\n PRECISION_APPROXIMATE = 'APPROXIMATE';\r\n\r\ntype\r\n TTMSFNCGeocodingGoogleService = class;\r\n\r\n TTMSFNCGeocodingGoogleGeocodingFactoryService = class(TTMSFNCGeocodingFactoryService, ITMSFNCGeocodingServiceGoogle);\r\n\r\n TTMSFNCGeocodingGoogleService = class(TTMSFNCGeocodingGoogleGeocodingFactoryService)\r\n protected\r\n function DoCreateGeocoding: ITMSFNCCustomGeocoding; override;\r\n end;\r\n\r\ntype\r\n TTMSFNCGeocodingGoogleGeocoding = class;\r\n\r\n TTMSFNCGeocodingGoogleGeocoding = class(TTMSFNCCustomGeocodingInterfacedObject, ITMSFNCCustomGeocoding)\r\n protected\r\n function GetIdentifier: string;\r\n function IsValid: Boolean;\r\n function GetRequestMethod: TTMSFNCCloudBaseRequestMethod;\r\n function GetHost: string;\r\n function GetReverseHost: string;\r\n function GetPath(AAddress: string): string;\r\n function GetReversePath(ACoordinate: TTMSFNCMapsCoordinateRec): string;\r\n function GetQuery(AAddress: string; ALocale: string): string; overload;\r\n function GetQuery(ACoordinate: TTMSFNCMapsCoordinateRec; ALocale: string): string; overload;\r\n function GetPostData: string;\r\n procedure Parse(ARequest: TTMSFNCGeocodingRequest; ARequestResult: string);\r\n procedure AddHeaders(AHeaders: TTMSFNCCloudBaseRequestHeaders);\r\n procedure DestroyGeocoding;\r\n public\r\n constructor Create;\r\n destructor Destroy; override;\r\n end;\r\n\r\nvar\r\n GeocodingService: ITMSFNCGeocodingServiceGoogle;\r\n\r\nprocedure RegisterGoogleGeocodingService;\r\nbegin\r\n if not TTMSFNCGeocodingPlatformServices.Current.SupportsPlatformService(ITMSFNCGeocodingServiceGoogle, IInterface(GeocodingService)) then\r\n begin\r\n GeocodingService := TTMSFNCGeocodingGoogleService.Create;\r\n TTMSFNCGeocodingPlatformServices.Current.AddPlatformService(ITMSFNCGeocodingServiceGoogle, GeocodingService);\r\n end;\r\nend;\r\n\r\nprocedure UnregisterGoogleGeocodingService;\r\nbegin\r\n TTMSFNCGeocodingPlatformServices.Current.RemovePlatformService(ITMSFNCGeocodingServiceGoogle);\r\nend;\r\n\r\n{ TTMSFNCGeocodingGoogleService }\r\n\r\nfunction TTMSFNCGeocodingGoogleService.DoCreateGeocoding: ITMSFNCCustomGeocoding;\r\nbegin\r\n Result := TTMSFNCGeocodingGoogleGeocoding.Create;\r\nend;\r\n\r\nprocedure TTMSFNCGeocodingGoogleGeocoding.AddHeaders(\r\n AHeaders: TTMSFNCCloudBaseRequestHeaders);\r\nbegin\r\n\r\nend;\r\n\r\nconstructor TTMSFNCGeocodingGoogleGeocoding.Create;\r\nbegin\r\n inherited;\r\nend;\r\n\r\ndestructor TTMSFNCGeocodingGoogleGeocoding.Destroy;\r\nbegin\r\n inherited;\r\nend;\r\n\r\nprocedure TTMSFNCGeocodingGoogleGeocoding.DestroyGeocoding;\r\nbegin\r\n GeocodingService.DestroyGeocoding(Self);\r\nend;\r\n\r\nfunction TTMSFNCGeocodingGoogleGeocoding.GetHost: string;\r\nbegin\r\n Result := 'https://maps.googleapis.com';\r\nend;\r\n\r\nfunction TTMSFNCGeocodingGoogleGeocoding.GetReverseHost: string;\r\nbegin\r\n Result := GetHost;\r\nend;\r\n\r\nfunction TTMSFNCGeocodingGoogleGeocoding.GetIdentifier: string;\r\nbegin\r\n Result := 'Google';\r\nend;\r\n\r\nfunction TTMSFNCGeocodingGoogleGeocoding.GetPath(AAddress: string): string;\r\nbegin\r\n Result := '/maps/api/geocode/json';\r\nend;\r\n\r\nfunction TTMSFNCGeocodingGoogleGeocoding.GetReversePath(ACoordinate: TTMSFNCMapsCoordinateRec): string;\r\nbegin\r\n Result := GetPath('');\r\nend;\r\n\r\nfunction TTMSFNCGeocodingGoogleGeocoding.GetPostData: string;\r\nbegin\r\n Result := '';\r\nend;\r\n\r\nfunction TTMSFNCGeocodingGoogleGeocoding.GetQuery(\r\n ACoordinate: TTMSFNCMapsCoordinateRec; ALocale: string): string;\r\nbegin\r\n Result := 'key=' + GeocodingProperties.GetAPIKey\r\n + '&latlng=' + TTMSFNCUtils.FloatToStrDot(ACoordinate.Latitude) + ',' + TTMSFNCUtils.FloatToStrDot(ACoordinate.Longitude)\r\n + '&language=' + ALocale\r\n ;\r\nend;\r\n\r\nfunction TTMSFNCGeocodingGoogleGeocoding.GetQuery(AAddress: string; ALocale: string): string;\r\nbegin\r\n Result := 'key=' + GeocodingProperties.GetAPIKey\r\n + '&address=' + AAddress\r\n + '&language=' + ALocale\r\n ;\r\nend;\r\n\r\nfunction TTMSFNCGeocodingGoogleGeocoding.GetRequestMethod: TTMSFNCCloudBaseRequestMethod;\r\nbegin\r\n Result := rmGet;\r\nend;\r\n\r\nfunction TTMSFNCGeocodingGoogleGeocoding.IsValid: Boolean;\r\nbegin\r\n Result := GeocodingProperties.GetAPIKey <> '';\r\nend;\r\n\r\nprocedure TTMSFNCGeocodingGoogleGeocoding.Parse(ARequest: TTMSFNCGeocodingRequest; ARequestResult: string);\r\nvar\r\n d: TTMSFNCGeocodingItems;\r\n di: TTMSFNCGeocodingItem;\r\n\r\n o, jo, joa: TJSONValue;\r\n jar, jaa: TJSONArray;\r\n i, j: Integer;\r\n ob, oc: TJSONObject;\r\n atype, streetno, streetname, longname, shortname, precision: string;\r\nbegin\r\n if Assigned(GeocodingProperties) then\r\n begin\r\n d := ARequest.Items;\r\n\r\n if Assigned(d) then\r\n begin\r\n if ARequestResult <> '' then\r\n begin\r\n o := TTMSFNCUtils.ParseJSON(ARequestResult);\r\n if Assigned(o) then\r\n begin\r\n try\r\n ARequest.Status := TTMSFNCUtils.GetJSONProp(o, 'status');\r\n ARequest.ErrorMessage := TTMSFNCUtils.GetJSONProp(o, 'error_message');\r\n\r\n jar := TTMSFNCUtils.GetJSONValue(o, 'results') as TJSONArray;\r\n if Assigned(jar) then\r\n begin\r\n for i := 0 to TTMSFNCUtils.GetJSONArraySize(jar) - 1 do\r\n begin\r\n jo := TTMSFNCUtils.GetJSONArrayItem(jar, i);\r\n\r\n di := d.Add;\r\n di.Address := TTMSFNCUtils.GetJSONProp(jo, 'formatted_address');\r\n\r\n jaa := TTMSFNCUtils.GetJSONValue(jo, 'address_components') as TJSONArray;\r\n if Assigned(jaa) then\r\n begin\r\n for j := 0 to TTMSFNCUtils.GetJSONArraySize(jaa) - 1 do\r\n begin\r\n joa := TTMSFNCUtils.GetJSONArrayItem(jaa, j);\r\n\r\n atype := (TTMSFNCUtils.GetJSONValue(joa, 'types') as TJSONArray).ToString;\r\n longname := TTMSFNCUtils.GetJSONProp(joa, 'long_name');\r\n shortname := TTMSFNCUtils.GetJSONProp(joa, 'short_name');\r\n\r\n if Pos('street_number', atype) > 0 then\r\n streetno := longname;\r\n if Pos('route', atype) > 0 then\r\n streetname := longname;\r\n if Pos('locality', atype) > 0 then\r\n di.City := longname;\r\n if Pos('sublocality', atype) > 0 then\r\n di.District := longname;\r\n if di.District = '' then\r\n begin\r\n if Pos('political', atype) > 0 then\r\n di.District := longname;\r\n end;\r\n if Pos('administrative_area_level_1', atype) > 0 then\r\n begin\r\n di.Region := longname;\r\n di.RegionCode := shortname\r\n end;\r\n if Pos('administrative_area_level_2', atype) > 0 then\r\n begin\r\n di.Province := longname;\r\n di.ProvinceCode := shortname\r\n end;\r\n if Pos('country', atype) > 0 then\r\n begin\r\n di.Country := longname;\r\n di.CountryCode := shortname;\r\n end;\r\n if (Pos('postal_code', atype) > 0) and not (Pos('postal_code_suffix', atype) > 0) then\r\n begin\r\n di.PostalCode := longname;\r\n end;\r\n if Pos('intersection', atype) > 0 then\r\n begin\r\n di.Intersection := shortname;\r\n end;\r\n\r\n di.Street := streetname + ' ' + streetno;\r\n di.StreetName := streetname;\r\n di.StreetNumber := streetno;\r\n end;\r\n end;\r\n\r\n ob := TTMSFNCUtils.GetJSONValue(jo, 'geometry') as TJSONObject;\r\n if Assigned(ob) then\r\n begin\r\n precision := TTMSFNCUtils.GetJSONProp(ob, 'location_type');\r\n if precision = PRECISION_ROOFTOP then\r\n di.Precision := gpRoofTop\r\n else if precision = PRECISION_RANGE_INTERPOLATED then\r\n di.Precision := gpRangeInterpolated\r\n else if precision = PRECISION_GEOMETRIC_CENTER then\r\n di.Precision := gpGeometricCenter\r\n else if precision = PRECISION_APPROXIMATE then\r\n di.Precision := gpApproximate\r\n else\r\n di.Precision := gpUnknown;\r\n\r\n oc := TTMSFNCUtils.GetJSONValue(ob, 'location') as TJSONObject;\r\n if Assigned(oc) then\r\n begin\r\n di.Coordinate.Latitude := TTMSFNCUtils.GetJSONDoubleValue(oc, 'lat');\r\n di.Coordinate.Longitude := TTMSFNCUtils.GetJSONDoubleValue(oc, 'lng');\r\n end;\r\n end;\r\n end;\r\n end;\r\n finally\r\n o.Free;\r\n end;\r\n end;\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\nend.\r\n\r\n","{********************************************************************}\r\n{ }\r\n{ written by TMS Software }\r\n{ copyright (c) 2020 - 2022 }\r\n{ Email : info@tmssoftware.com }\r\n{ Web : http://www.tmssoftware.com }\r\n{ }\r\n{ The source code is given as is. The author is not responsible }\r\n{ for any possible damage done due to the use of this code. }\r\n{ The complete source code remains property of the author and may }\r\n{ not be distributed, published, given or sold in any form as such. }\r\n{ No parts of the source code can be included in any other component }\r\n{ or application without written authorization of the author. }\r\n{********************************************************************}\r\n\r\nunit WEBLib.TMSFNCGeocoding.Here;\r\n\r\n{$I WEBLib.TMSFNCDefines.inc}\r\n\r\n{$IFDEF WEBLIB}\r\n{$DEFINE LCLWEBLIB}\r\n{$ENDIF}\r\n{$IFDEF LCLLIB}\r\n{$DEFINE LCLWEBLIB}\r\n{$ENDIF}\r\n\r\ninterface\r\n\r\nprocedure RegisterHereGeocodingService;\r\nprocedure UnRegisterHereGeocodingService;\r\n\r\nimplementation\r\n\r\nuses\r\n Classes, Math, DateUtils, Types, SysUtils, WEBLib.TMSFNCGeocoding,\r\n WEBLib.TMSFNCUtils, WEBLib.TMSFNCTypes, WEBLib.TMSFNCMapsCommonTypes, WEBLib.TMSFNCCloudBase\r\n {$IFNDEF WEBLIB}\r\n {$IFNDEF LCLLIB}\r\n {$HINTS OFF}\r\n {$IF COMPILERVERSION > 26}\r\n ,JSON\r\n {$ELSE}\r\n ,DBXJSON\r\n {$IFEND}\r\n {$HINTS ON}\r\n {$ELSE}\r\n ,fpjson\r\n {$ENDIF}\r\n {$ENDIF}\r\n\r\n {$IFDEF WEBLIB}\r\n ,Contnrs, Web, WEBLIB.JSON\r\n {$ENDIF}\r\n {$IFNDEF LCLWEBLIB}\r\n ,Generics.Collections, Generics.Defaults\r\n {$HINTS OFF}\r\n {$IF COMPILERVERSION > 22}\r\n , UITypes\r\n {$IFEND}\r\n {$HINTS ON}\r\n {$ENDIF}\r\n {$IFDEF LCLLIB}\r\n ,fgl\r\n {$ENDIF}\r\n ;\r\n\r\ntype\r\n TTMSFNCGeocodingHereService = class;\r\n\r\n TTMSFNCGeocodingHereGeocodingFactoryService = class(TTMSFNCGeocodingFactoryService, ITMSFNCGeocodingServiceHere);\r\n\r\n TTMSFNCGeocodingHereService = class(TTMSFNCGeocodingHereGeocodingFactoryService)\r\n protected\r\n function DoCreateGeocoding: ITMSFNCCustomGeocoding; override;\r\n end;\r\n\r\ntype\r\n TTMSFNCGeocodingHereGeocoding = class;\r\n\r\n TTMSFNCGeocodingHereGeocoding = class(TTMSFNCCustomGeocodingInterfacedObject, ITMSFNCCustomGeocoding)\r\n protected\r\n function GetIdentifier: string;\r\n function IsValid: Boolean;\r\n function GetRequestMethod: TTMSFNCCloudBaseRequestMethod;\r\n function GetHost: string;\r\n function GetReverseHost: string;\r\n function GetPath(AAddress: string): string;\r\n function GetReversePath(ACoordinate: TTMSFNCMapsCoordinateRec): string;\r\n function GetQuery(AAddress: string; ALocale: string): string; overload;\r\n function GetQuery(ACoordinate: TTMSFNCMapsCoordinateRec; ALocale: string): string; overload;\r\n function GetPostData: string;\r\n procedure Parse(ARequest: TTMSFNCGeocodingRequest; ARequestResult: string);\r\n procedure AddHeaders(AHeaders: TTMSFNCCloudBaseRequestHeaders);\r\n procedure DestroyGeocoding;\r\n public\r\n constructor Create;\r\n destructor Destroy; override;\r\n end;\r\n\r\nvar\r\n GeocodingService: ITMSFNCGeocodingServiceHere;\r\n\r\nprocedure RegisterHereGeocodingService;\r\nbegin\r\n if not TTMSFNCGeocodingPlatformServices.Current.SupportsPlatformService(ITMSFNCGeocodingServiceHere, IInterface(GeocodingService)) then\r\n begin\r\n GeocodingService := TTMSFNCGeocodingHereService.Create;\r\n TTMSFNCGeocodingPlatformServices.Current.AddPlatformService(ITMSFNCGeocodingServiceHere, GeocodingService);\r\n end;\r\nend;\r\n\r\nprocedure UnregisterHereGeocodingService;\r\nbegin\r\n TTMSFNCGeocodingPlatformServices.Current.RemovePlatformService(ITMSFNCGeocodingServiceHere);\r\nend;\r\n\r\n{ TTMSFNCGeocodingHereService }\r\n\r\nfunction TTMSFNCGeocodingHereService.DoCreateGeocoding: ITMSFNCCustomGeocoding;\r\nbegin\r\n Result := TTMSFNCGeocodingHereGeocoding.Create;\r\nend;\r\n\r\nprocedure TTMSFNCGeocodingHereGeocoding.AddHeaders(\r\n AHeaders: TTMSFNCCloudBaseRequestHeaders);\r\nbegin\r\n\r\nend;\r\n\r\nconstructor TTMSFNCGeocodingHereGeocoding.Create;\r\nbegin\r\n inherited;\r\nend;\r\n\r\ndestructor TTMSFNCGeocodingHereGeocoding.Destroy;\r\nbegin\r\n inherited;\r\nend;\r\n\r\nprocedure TTMSFNCGeocodingHereGeocoding.DestroyGeocoding;\r\nbegin\r\n GeocodingService.DestroyGeocoding(Self);\r\nend;\r\n\r\nfunction TTMSFNCGeocodingHereGeocoding.GetHost: string;\r\nbegin\r\n Result := 'https://geocode.search.hereapi.com';\r\nend;\r\n\r\nfunction TTMSFNCGeocodingHereGeocoding.GetReverseHost: string;\r\nbegin\r\n Result := 'https://revgeocode.search.hereapi.com';\r\nend;\r\n\r\nfunction TTMSFNCGeocodingHereGeocoding.GetIdentifier: string;\r\nbegin\r\n Result := 'Here';\r\nend;\r\n\r\nfunction TTMSFNCGeocodingHereGeocoding.GetPath(AAddress: string): string;\r\nbegin\r\n Result := '/v1/geocode';\r\nend;\r\n\r\nfunction TTMSFNCGeocodingHereGeocoding.GetReversePath(ACoordinate: TTMSFNCMapsCoordinateRec): string;\r\nbegin\r\n Result := '/v1/revgeocode';\r\nend;\r\n\r\nfunction TTMSFNCGeocodingHereGeocoding.GetPostData: string;\r\nbegin\r\n Result := '';\r\nend;\r\n\r\nfunction TTMSFNCGeocodingHereGeocoding.GetQuery(\r\n ACoordinate: TTMSFNCMapsCoordinateRec; ALocale: string): string;\r\nbegin\r\n Result := 'apiKey=' + GeocodingProperties.GetAPIKey\r\n + '&at=' + TTMSFNCUtils.FloatToStrDot(ACoordinate.Latitude) + ',' + TTMSFNCUtils.FloatToStrDot(ACoordinate.Longitude);\r\n ;\r\n\r\n if ALocale <> '' then\r\n Result := Result + '&lang=' + ALocale;\r\nend;\r\n\r\nfunction TTMSFNCGeocodingHereGeocoding.GetQuery(AAddress: string; ALocale: string): string;\r\nbegin\r\n Result := 'apiKey=' + GeocodingProperties.GetAPIKey\r\n + '&q=' + AAddress\r\n ;\r\n\r\n if ALocale <> '' then\r\n Result := Result + '&lang=' + ALocale;\r\nend;\r\n\r\nfunction TTMSFNCGeocodingHereGeocoding.GetRequestMethod: TTMSFNCCloudBaseRequestMethod;\r\nbegin\r\n Result := rmGet;\r\nend;\r\n\r\nfunction TTMSFNCGeocodingHereGeocoding.IsValid: Boolean;\r\nbegin\r\n Result := GeocodingProperties.GetAPIKey <> '';\r\nend;\r\n\r\nprocedure TTMSFNCGeocodingHereGeocoding.Parse(ARequest: TTMSFNCGeocodingRequest; ARequestResult: string);\r\nvar\r\n d: TTMSFNCGeocodingItems;\r\n di: TTMSFNCGeocodingItem;\r\n\r\n o, jo: TJSONValue;\r\n jar: TJSONArray;\r\n i: Integer;\r\n oc: TJSONObject;\r\n street, number: string;\r\nbegin\r\n if Assigned(GeocodingProperties) then\r\n begin\r\n d := ARequest.Items;\r\n if Assigned(d) then\r\n begin\r\n if ARequestResult <> '' then\r\n begin\r\n o := TTMSFNCUtils.ParseJSON(ARequestResult);\r\n if Assigned(o) then\r\n begin\r\n try\r\n ARequest.Status := TTMSFNCUtils.GetJSONProp(o, 'error');\r\n ARequest.ErrorMessage := TTMSFNCUtils.GetJSONProp(o, 'error_description');\r\n\r\n if ARequest.Status = '' then\r\n ARequest.Status := TTMSFNCUtils.GetJSONProp(o, 'type') + ' ' + TTMSFNCUtils.GetJSONProp(o, 'subtype');\r\n\r\n if ARequest.ErrorMessage = '' then\r\n ARequest.ErrorMessage := TTMSFNCUtils.GetJSONProp(o, 'Details');\r\n\r\n jar := TTMSFNCUtils.GetJSONValue(o, 'items') as TJSONArray;\r\n if Assigned(jar) then\r\n begin\r\n for i := 0 to TTMSFNCUtils.GetJSONArraySize(jar) - 1 do\r\n begin\r\n jo := TTMSFNCUtils.GetJSONArrayItem(jar, i);\r\n\r\n di := d.Add;\r\n\r\n oc := TTMSFNCUtils.GetJSONValue(jo, 'address') as TJSONObject;\r\n if Assigned(oc) then\r\n begin\r\n di.Address := TTMSFNCUtils.GetJSONProp(oc, 'label');\r\n di.CountryCode := TTMSFNCUtils.GetJSONProp(oc, 'countryCode');\r\n di.Country := TTMSFNCUtils.GetJSONProp(oc, 'countryName');\r\n di.Province := TTMSFNCUtils.GetJSONProp(oc, 'county');\r\n di.District := TTMSFNCUtils.GetJSONProp(oc, 'district');\r\n di.Province := TTMSFNCUtils.GetJSONProp(oc, 'county');\r\n di.Region := TTMSFNCUtils.GetJSONProp(oc, 'state');\r\n di.City := TTMSFNCUtils.GetJSONProp(oc, 'city');\r\n di.PostalCode := TTMSFNCUtils.GetJSONProp(oc, 'postalCode');\r\n street := TTMSFNCUtils.GetJSONProp(oc, 'street');\r\n number := TTMSFNCUtils.GetJSONProp(oc, 'houseNumber');\r\n di.Street := Trim(street + ' ' + number);\r\n di.StreetName := street;\r\n di.StreetNumber := number;\r\n end;\r\n oc := TTMSFNCUtils.GetJSONValue(jo, 'position') as TJSONObject;\r\n if Assigned(oc) then\r\n begin\r\n di.Coordinate.Latitude := TTMSFNCUtils.GetJSONDoubleValue(oc, 'lat');\r\n di.Coordinate.Longitude := TTMSFNCUtils.GetJSONDoubleValue(oc, 'lng');\r\n end;\r\n end;\r\n end;\r\n finally\r\n o.Free;\r\n end;\r\n end;\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\nend.\r\n\r\n","{********************************************************************}\r\n{ }\r\n{ written by TMS Software }\r\n{ copyright (c) 2020 - 2021 }\r\n{ Email : info@tmssoftware.com }\r\n{ Web : http://www.tmssoftware.com }\r\n{ }\r\n{ The source code is given as is. The author is not responsible }\r\n{ for any possible damage done due to the use of this code. }\r\n{ The complete source code remains property of the author and may }\r\n{ not be distributed, published, given or sold in any form as such. }\r\n{ No parts of the source code can be included in any other component }\r\n{ or application without written authorization of the author. }\r\n{********************************************************************}\r\n\r\nunit WEBLib.TMSFNCGeocoding.Bing;\r\n\r\n{$I WEBLib.TMSFNCDefines.inc}\r\n\r\n{$IFDEF WEBLIB}\r\n{$DEFINE LCLWEBLIB}\r\n{$ENDIF}\r\n{$IFDEF LCLLIB}\r\n{$DEFINE LCLWEBLIB}\r\n{$ENDIF}\r\n\r\ninterface\r\n\r\nprocedure RegisterBingGeocodingService;\r\nprocedure UnRegisterBingGeocodingService;\r\n\r\nimplementation\r\n\r\nuses\r\n Classes, Math, DateUtils, Types, SysUtils, WEBLib.TMSFNCGeocoding,\r\n WEBLib.TMSFNCUtils, WEBLib.TMSFNCTypes, WEBLib.TMSFNCMapsCommonTypes, WEBLib.TMSFNCCloudBase\r\n {$IFNDEF WEBLIB}\r\n {$IFNDEF LCLLIB}\r\n {$HINTS OFF}\r\n {$IF COMPILERVERSION > 26}\r\n ,JSON\r\n {$ELSE}\r\n ,DBXJSON\r\n {$IFEND}\r\n {$HINTS ON}\r\n {$ELSE}\r\n ,fpjson\r\n {$ENDIF}\r\n {$ENDIF}\r\n\r\n {$IFDEF WEBLIB}\r\n ,Contnrs, Web, WEBLIB.JSON\r\n {$ENDIF}\r\n {$IFNDEF LCLWEBLIB}\r\n ,Generics.Collections, Generics.Defaults\r\n {$HINTS OFF}\r\n {$IF COMPILERVERSION > 22}\r\n , UITypes\r\n {$IFEND}\r\n {$HINTS ON}\r\n {$ENDIF}\r\n {$IFDEF LCLLIB}\r\n ,fgl\r\n {$ENDIF}\r\n ;\r\n\r\ntype\r\n TTMSFNCGeocodingBingService = class;\r\n\r\n TTMSFNCGeocodingBingGeocodingFactoryService = class(TTMSFNCGeocodingFactoryService, ITMSFNCGeocodingServiceBing);\r\n\r\n TTMSFNCGeocodingBingService = class(TTMSFNCGeocodingBingGeocodingFactoryService)\r\n protected\r\n function DoCreateGeocoding: ITMSFNCCustomGeocoding; override;\r\n end;\r\n\r\ntype\r\n TTMSFNCGeocodingBingGeocoding = class;\r\n\r\n TTMSFNCGeocodingBingGeocoding = class(TTMSFNCCustomGeocodingInterfacedObject, ITMSFNCCustomGeocoding)\r\n protected\r\n function GetIdentifier: string;\r\n function IsValid: Boolean;\r\n function GetRequestMethod: TTMSFNCCloudBaseRequestMethod;\r\n function GetHost: string;\r\n function GetReverseHost: string;\r\n function GetPath(AAddress: string): string;\r\n function GetReversePath(ACoordinate: TTMSFNCMapsCoordinateRec): string;\r\n function GetQuery(AAddress: string; ALocale: string): string; overload;\r\n function GetQuery(ACoordinate: TTMSFNCMapsCoordinateRec; ALocale: string): string; overload;\r\n function GetPostData: string;\r\n procedure Parse(ARequest: TTMSFNCGeocodingRequest; ARequestResult: string);\r\n procedure AddHeaders(AHeaders: TTMSFNCCloudBaseRequestHeaders);\r\n procedure DestroyGeocoding;\r\n public\r\n constructor Create;\r\n destructor Destroy; override;\r\n end;\r\n\r\nvar\r\n GeocodingService: ITMSFNCGeocodingServiceBing;\r\n\r\nprocedure RegisterBingGeocodingService;\r\nbegin\r\n if not TTMSFNCGeocodingPlatformServices.Current.SupportsPlatformService(ITMSFNCGeocodingServiceBing, IInterface(GeocodingService)) then\r\n begin\r\n GeocodingService := TTMSFNCGeocodingBingService.Create;\r\n TTMSFNCGeocodingPlatformServices.Current.AddPlatformService(ITMSFNCGeocodingServiceBing, GeocodingService);\r\n end;\r\nend;\r\n\r\nprocedure UnregisterBingGeocodingService;\r\nbegin\r\n TTMSFNCGeocodingPlatformServices.Current.RemovePlatformService(ITMSFNCGeocodingServiceBing);\r\nend;\r\n\r\n{ TTMSFNCGeocodingBingService }\r\n\r\nfunction TTMSFNCGeocodingBingService.DoCreateGeocoding: ITMSFNCCustomGeocoding;\r\nbegin\r\n Result := TTMSFNCGeocodingBingGeocoding.Create;\r\nend;\r\n\r\nprocedure TTMSFNCGeocodingBingGeocoding.AddHeaders(\r\n AHeaders: TTMSFNCCloudBaseRequestHeaders);\r\nbegin\r\n\r\nend;\r\n\r\nconstructor TTMSFNCGeocodingBingGeocoding.Create;\r\nbegin\r\n inherited;\r\nend;\r\n\r\ndestructor TTMSFNCGeocodingBingGeocoding.Destroy;\r\nbegin\r\n inherited;\r\nend;\r\n\r\nprocedure TTMSFNCGeocodingBingGeocoding.DestroyGeocoding;\r\nbegin\r\n GeocodingService.DestroyGeocoding(Self);\r\nend;\r\n\r\nfunction TTMSFNCGeocodingBingGeocoding.GetHost: string;\r\nbegin\r\n Result := 'https://dev.virtualearth.net';\r\nend;\r\n\r\nfunction TTMSFNCGeocodingBingGeocoding.GetReverseHost: string;\r\nbegin\r\n Result := GetHost;\r\nend;\r\n\r\nfunction TTMSFNCGeocodingBingGeocoding.GetIdentifier: string;\r\nbegin\r\n Result := 'Bing';\r\nend;\r\n\r\nfunction TTMSFNCGeocodingBingGeocoding.GetPath(AAddress: string): string;\r\nbegin\r\n Result := '/REST/v1/Locations';\r\nend;\r\n\r\nfunction TTMSFNCGeocodingBingGeocoding.GetReversePath(\r\n ACoordinate: TTMSFNCMapsCoordinateRec): string;\r\nbegin\r\n Result := '/REST/v1/Locations/' + TTMSFNCUtils.FloatToStrDot(ACoordinate.Latitude) + ',' + TTMSFNCUtils.FloatToStrDot(ACoordinate.Longitude);\r\nend;\r\n\r\nfunction TTMSFNCGeocodingBingGeocoding.GetPostData: string;\r\nbegin\r\n Result := '';\r\nend;\r\n\r\nfunction TTMSFNCGeocodingBingGeocoding.GetQuery(\r\n ACoordinate: TTMSFNCMapsCoordinateRec; ALocale: string): string;\r\nbegin\r\n Result := 'key=' + GeocodingProperties.GetAPIKey;\r\nend;\r\n\r\nfunction TTMSFNCGeocodingBingGeocoding.GetQuery(AAddress: string; ALocale: string): string;\r\nbegin\r\n Result := 'key=' + GeocodingProperties.GetAPIKey\r\n + '&maxResults=1'\r\n + '&c=' + ALocale\r\n + '&query=' + AAddress\r\n ;\r\nend;\r\n\r\nfunction TTMSFNCGeocodingBingGeocoding.GetRequestMethod: TTMSFNCCloudBaseRequestMethod;\r\nbegin\r\n Result := rmGet;\r\nend;\r\n\r\nfunction TTMSFNCGeocodingBingGeocoding.IsValid: Boolean;\r\nbegin\r\n Result := GeocodingProperties.GetAPIKey <> '';\r\nend;\r\n\r\nprocedure TTMSFNCGeocodingBingGeocoding.Parse(ARequest: TTMSFNCGeocodingRequest; ARequestResult: string);\r\nvar\r\n d: TTMSFNCGeocodingItems;\r\n di: TTMSFNCGeocodingItem;\r\n\r\n o, ro, jo: TJSONValue;\r\n jav, jar, jas: TJSONArray;\r\n i: Integer;\r\n oc: TJSONObject;\r\n position: string;\r\n sposition: TStringList;\r\nbegin\r\n if Assigned(GeocodingProperties) then\r\n begin\r\n d := ARequest.Items;\r\n if Assigned(d) then\r\n begin\r\n if ARequestResult <> '' then\r\n begin\r\n o := TTMSFNCUtils.ParseJSON(ARequestResult);\r\n if Assigned(o) then\r\n begin\r\n try\r\n ARequest.Status := TTMSFNCUtils.GetJSONProp(o, 'statusCode');\r\n ARequest.ErrorMessage := TTMSFNCUtils.GetJSONProp(o, 'statusDescription');\r\n\r\n jav := TTMSFNCUtils.GetJSONValue(o, 'resourceSets') as TJSONArray;\r\n if Assigned(jav) then\r\n begin\r\n\r\n ro := TTMSFNCUtils.GetJSONArrayItem(jav, 0);\r\n\r\n jar := TTMSFNCUtils.GetJSONValue(ro, 'resources') as TJSONArray;\r\n if Assigned(jar) then\r\n begin\r\n for i := 0 to TTMSFNCUtils.GetJSONArraySize(jar) - 1 do\r\n begin\r\n di := d.Add;\r\n jo := TTMSFNCUtils.GetJSONArrayItem(jar, i);\r\n\r\n di.Address := TTMSFNCUtils.GetJSONProp(jo, 'name');\r\n oc := TTMSFNCUtils.GetJSONValue(jo, 'address') as TJSONObject;\r\n if Assigned(oc) then\r\n begin\r\n di.Street := TTMSFNCUtils.GetJSONProp(oc, 'addressLine');\r\n di.City := TTMSFNCUtils.GetJSONProp(oc, 'locality');\r\n di.PostalCode := TTMSFNCUtils.GetJSONProp(oc, 'postalCode');\r\n di.Province := TTMSFNCUtils.GetJSONProp(oc, 'adminDistrict');\r\n di.ProvinceCode := TTMSFNCUtils.GetJSONProp(oc, 'adminDistrict');\r\n di.Region := TTMSFNCUtils.GetJSONProp(oc, 'adminDistrict2');\r\n di.Country := TTMSFNCUtils.GetJSONProp(oc, 'countryRegion');\r\n end;\r\n\r\n oc := TTMSFNCUtils.GetJSONValue(jo, 'point') as TJSONObject;\r\n if Assigned(oc) then\r\n begin\r\n jas := TTMSFNCUtils.GetJSONValue(oc, 'coordinates') as TJSONArray;\r\n if Assigned(jas) then\r\n begin\r\n sposition := TStringList.Create;\r\n position := StringReplace(jas.ToString, '[', '', [rfReplaceAll]);\r\n position := StringReplace(position, ']', '', [rfReplaceAll]);\r\n TTMSFNCUtils.Split(',', position, sposition);\r\n if sposition.Count > 1 then\r\n begin\r\n di.Coordinate.Latitude := TTMSFNCUtils.StrToFloatDot(sposition[0]);\r\n di.Coordinate.Longitude := TTMSFNCUtils.StrToFloatDot(sposition[1]);\r\n end;\r\n sposition.Free;\r\n end;\r\n end;\r\n end;\r\n end;\r\n end;\r\n finally\r\n o.Free;\r\n end;\r\n end;\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\nend.\r\n\r\n","{********************************************************************}\r\n{ }\r\n{ written by TMS Software }\r\n{ copyright (c) 2020 - 2021 }\r\n{ Email : info@tmssoftware.com }\r\n{ Web : http://www.tmssoftware.com }\r\n{ }\r\n{ The source code is given as is. The author is not responsible }\r\n{ for any possible damage done due to the use of this code. }\r\n{ The complete source code remains property of the author and may }\r\n{ not be distributed, published, given or sold in any form as such. }\r\n{ No parts of the source code can be included in any other component }\r\n{ or application without written authorization of the author. }\r\n{********************************************************************}\r\n\r\nunit WEBLib.TMSFNCGeocoding.Azure;\r\n\r\n{$I WEBLib.TMSFNCDefines.inc}\r\n\r\n{$IFDEF WEBLIB}\r\n{$DEFINE LCLWEBLIB}\r\n{$ENDIF}\r\n{$IFDEF LCLLIB}\r\n{$DEFINE LCLWEBLIB}\r\n{$ENDIF}\r\n\r\ninterface\r\n\r\nprocedure RegisterAzureGeocodingService;\r\nprocedure UnRegisterAzureGeocodingService;\r\n\r\nimplementation\r\n\r\nuses\r\n Classes, Math, DateUtils, Types, SysUtils, WEBLib.TMSFNCGeocoding,\r\n WEBLib.TMSFNCUtils, WEBLib.TMSFNCTypes, WEBLib.TMSFNCMapsCommonTypes, WEBLib.TMSFNCCloudBase\r\n {$IFNDEF WEBLIB}\r\n {$IFNDEF LCLLIB}\r\n {$HINTS OFF}\r\n {$IF COMPILERVERSION > 26}\r\n ,JSON\r\n {$ELSE}\r\n ,DBXJSON\r\n {$IFEND}\r\n {$HINTS ON}\r\n {$ELSE}\r\n ,fpjson\r\n {$ENDIF}\r\n {$ENDIF}\r\n\r\n {$IFDEF WEBLIB}\r\n ,Contnrs, Web, WEBLIB.JSON\r\n {$ENDIF}\r\n {$IFNDEF LCLWEBLIB}\r\n ,Generics.Collections, Generics.Defaults\r\n {$HINTS OFF}\r\n {$IF COMPILERVERSION > 22}\r\n , UITypes\r\n {$IFEND}\r\n {$HINTS ON}\r\n {$ENDIF}\r\n {$IFDEF LCLLIB}\r\n ,fgl\r\n {$ENDIF}\r\n ;\r\n\r\ntype\r\n TTMSFNCGeocodingAzureService = class;\r\n\r\n TTMSFNCGeocodingAzureGeocodingFactoryService = class(TTMSFNCGeocodingFactoryService, ITMSFNCGeocodingServiceAzure);\r\n\r\n TTMSFNCGeocodingAzureService = class(TTMSFNCGeocodingAzureGeocodingFactoryService)\r\n protected\r\n function DoCreateGeocoding: ITMSFNCCustomGeocoding; override;\r\n end;\r\n\r\ntype\r\n TTMSFNCGeocodingAzureGeocoding = class;\r\n\r\n TTMSFNCGeocodingAzureGeocoding = class(TTMSFNCCustomGeocodingInterfacedObject, ITMSFNCCustomGeocoding)\r\n protected\r\n function GetIdentifier: string;\r\n function IsValid: Boolean;\r\n function GetRequestMethod: TTMSFNCCloudBaseRequestMethod;\r\n function GetHost: string;\r\n function GetReverseHost: string;\r\n function GetPath(AAddress: string): string;\r\n function GetReversePath(ACoordinate: TTMSFNCMapsCoordinateRec): string;\r\n function GetQuery(AAddress: string; ALocale: string): string; overload;\r\n function GetQuery(ACoordinate: TTMSFNCMapsCoordinateRec; ALocale: string): string; overload;\r\n function GetPostData: string;\r\n procedure Parse(ARequest: TTMSFNCGeocodingRequest; ARequestResult: string);\r\n procedure AddHeaders(AHeaders: TTMSFNCCloudBaseRequestHeaders);\r\n procedure DestroyGeocoding;\r\n public\r\n constructor Create;\r\n destructor Destroy; override;\r\n end;\r\n\r\nvar\r\n GeocodingService: ITMSFNCGeocodingServiceAzure;\r\n\r\nprocedure RegisterAzureGeocodingService;\r\nbegin\r\n if not TTMSFNCGeocodingPlatformServices.Current.SupportsPlatformService(ITMSFNCGeocodingServiceAzure, IInterface(GeocodingService)) then\r\n begin\r\n GeocodingService := TTMSFNCGeocodingAzureService.Create;\r\n TTMSFNCGeocodingPlatformServices.Current.AddPlatformService(ITMSFNCGeocodingServiceAzure, GeocodingService);\r\n end;\r\nend;\r\n\r\nprocedure UnregisterAzureGeocodingService;\r\nbegin\r\n TTMSFNCGeocodingPlatformServices.Current.RemovePlatformService(ITMSFNCGeocodingServiceAzure);\r\nend;\r\n\r\n{ TTMSFNCGeocodingAzureService }\r\n\r\nfunction TTMSFNCGeocodingAzureService.DoCreateGeocoding: ITMSFNCCustomGeocoding;\r\nbegin\r\n Result := TTMSFNCGeocodingAzureGeocoding.Create;\r\nend;\r\n\r\nprocedure TTMSFNCGeocodingAzureGeocoding.AddHeaders(\r\n AHeaders: TTMSFNCCloudBaseRequestHeaders);\r\nbegin\r\n\r\nend;\r\n\r\nconstructor TTMSFNCGeocodingAzureGeocoding.Create;\r\nbegin\r\n inherited;\r\nend;\r\n\r\ndestructor TTMSFNCGeocodingAzureGeocoding.Destroy;\r\nbegin\r\n inherited;\r\nend;\r\n\r\nprocedure TTMSFNCGeocodingAzureGeocoding.DestroyGeocoding;\r\nbegin\r\n GeocodingService.DestroyGeocoding(Self);\r\nend;\r\n\r\nfunction TTMSFNCGeocodingAzureGeocoding.GetHost: string;\r\nbegin\r\n Result := 'https://atlas.microsoft.com';\r\nend;\r\n\r\nfunction TTMSFNCGeocodingAzureGeocoding.GetReverseHost: string;\r\nbegin\r\n Result := GetHost;\r\nend;\r\n\r\nfunction TTMSFNCGeocodingAzureGeocoding.GetIdentifier: string;\r\nbegin\r\n Result := 'Azure';\r\nend;\r\n\r\nfunction TTMSFNCGeocodingAzureGeocoding.GetPath(AAddress: string): string;\r\nbegin\r\n Result := '/search/address/json';\r\nend;\r\n\r\nfunction TTMSFNCGeocodingAzureGeocoding.GetReversePath(ACoordinate: TTMSFNCMapsCoordinateRec): string;\r\nbegin\r\n Result := '/search/address/reverse/json';\r\nend;\r\n\r\nfunction TTMSFNCGeocodingAzureGeocoding.GetPostData: string;\r\nbegin\r\n Result := '';\r\nend;\r\n\r\nfunction TTMSFNCGeocodingAzureGeocoding.GetQuery(\r\n ACoordinate: TTMSFNCMapsCoordinateRec; ALocale: string): string;\r\nbegin\r\n Result := GetQuery(TTMSFNCUtils.FloatToStrDot(ACoordinate.Latitude) + ',' + TTMSFNCUtils.FloatToStrDot(ACoordinate.Longitude), ALocale);\r\nend;\r\n\r\nfunction TTMSFNCGeocodingAzureGeocoding.GetQuery(AAddress: string; ALocale: string): string;\r\nbegin\r\n Result := 'subscription-key=' + GeocodingProperties.GetAPIKey\r\n + '&api-version=1'\r\n + '&limit=1'\r\n + '&language=' + ALocale\r\n + '&query=' + AAddress\r\n ;\r\nend;\r\n\r\nfunction TTMSFNCGeocodingAzureGeocoding.GetRequestMethod: TTMSFNCCloudBaseRequestMethod;\r\nbegin\r\n Result := rmGet;\r\nend;\r\n\r\nfunction TTMSFNCGeocodingAzureGeocoding.IsValid: Boolean;\r\nbegin\r\n Result := GeocodingProperties.GetAPIKey <> '';\r\nend;\r\n\r\nprocedure TTMSFNCGeocodingAzureGeocoding.Parse(ARequest: TTMSFNCGeocodingRequest; ARequestResult: string);\r\nvar\r\n d: TTMSFNCGeocodingItems;\r\n di: TTMSFNCGeocodingItem;\r\n\r\n o, jo: TJSONValue;\r\n jav: TJSONArray;\r\n i: Integer;\r\n oc, op: TJSONObject;\r\n isReverse: Boolean;\r\n position, street, number: string;\r\n sposition: TStringList;\r\nbegin\r\n if Assigned(GeocodingProperties) then\r\n begin\r\n d := ARequest.Items;\r\n if Assigned(d) then\r\n begin\r\n if ARequestResult <> '' then\r\n begin\r\n o := TTMSFNCUtils.ParseJSON(ARequestResult);\r\n if Assigned(o) then\r\n begin\r\n try\r\n oc := TTMSFNCUtils.GetJSONValue(o, 'error') as TJSONObject;\r\n if Assigned(oc) then\r\n begin\r\n ARequest.Status := TTMSFNCUtils.GetJSONProp(oc, 'code');\r\n ARequest.ErrorMessage := TTMSFNCUtils.GetJSONProp(oc, 'message');\r\n end;\r\n\r\n //geocoding\r\n jav := TTMSFNCUtils.GetJSONValue(o, 'results') as TJSONArray;\r\n isReverse := False;\r\n\r\n //reversegeocoding\r\n if not Assigned(jav) then\r\n begin\r\n jav := TTMSFNCUtils.GetJSONValue(o, 'addresses') as TJSONArray;\r\n isReverse := True;\r\n end;\r\n\r\n if Assigned(jav) then\r\n begin\r\n for i := 0 to TTMSFNCUtils.GetJSONArraySize(jav) - 1 do\r\n begin\r\n di := d.Add;\r\n jo := TTMSFNCUtils.GetJSONArrayItem(jav, i);\r\n\r\n oc := TTMSFNCUtils.GetJSONValue(jo, 'address') as TJSONObject;\r\n if Assigned(oc) then\r\n begin\r\n di.Address := TTMSFNCUtils.GetJSONProp(oc, 'freeformAddress');\r\n di.City := TTMSFNCUtils.GetJSONProp(oc, 'municipality');\r\n di.Country := TTMSFNCUtils.GetJSONProp(oc, 'country');\r\n di.CountryCode := TTMSFNCUtils.GetJSONProp(oc, 'countryCode');\r\n di.Region := TTMSFNCUtils.GetJSONProp(oc, 'countrySecondarySubdivision');\r\n di.Province := TTMSFNCUtils.GetJSONProp(oc, 'countrySubdivision');\r\n\r\n street := TTMSFNCUtils.GetJSONProp(oc, 'streetName');\r\n number := TTMSFNCUtils.GetJSONProp(oc, 'streetNumber');\r\n di.Street := Trim(street + ' ' + number);\r\n di.StreetName := street;\r\n di.StreetNumber := number;\r\n\r\n di.PostalCode := TTMSFNCUtils.GetJSONProp(oc, 'postalCode');\r\n end;\r\n\r\n if not isReverse then\r\n begin\r\n op := TTMSFNCUtils.GetJSONValue(jo, 'position') as TJSONObject;\r\n if Assigned(op) then\r\n begin\r\n di.Coordinate.Latitude := TTMSFNCUtils.GetJSONDoubleValue(op, 'lat');\r\n di.Coordinate.Longitude := TTMSFNCUtils.GetJSONDoubleValue(op, 'lon');\r\n end;\r\n end\r\n else\r\n begin\r\n position := TTMSFNCUtils.GetJSONProp(jo, 'position');\r\n if position <> '' then\r\n begin\r\n sposition := TStringList.Create;\r\n TTMSFNCUtils.Split(',', position, sposition);\r\n if sposition.Count > 1 then\r\n begin\r\n di.Coordinate.Latitude := TTMSFNCUtils.StrToFloatDot(sposition[0]);\r\n di.Coordinate.Longitude := TTMSFNCUtils.StrToFloatDot(sposition[1]);\r\n end;\r\n sposition.Free;\r\n end;\r\n end;\r\n end;\r\n end;\r\n finally\r\n o.Free;\r\n end;\r\n end;\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\nend.\r\n\r\n","{********************************************************************}\r\n{ }\r\n{ written by TMS Software }\r\n{ copyright (c) 2020 - 2024 }\r\n{ Email : info@tmssoftware.com }\r\n{ Web : http://www.tmssoftware.com }\r\n{ }\r\n{ The source code is given as is. The author is not responsible }\r\n{ for any possible damage done due to the use of this code. }\r\n{ The complete source code remains property of the author and may }\r\n{ not be distributed, published, given or sold in any form as such. }\r\n{ No parts of the source code can be included in any other component }\r\n{ or application without written authorization of the author. }\r\n{********************************************************************}\r\n\r\nunit WEBLib.TMSFNCGeocoding.MapBox;\r\n\r\n{$I WEBLib.TMSFNCDefines.inc}\r\n\r\n{$IFDEF WEBLIB}\r\n{$DEFINE LCLWEBLIB}\r\n{$ENDIF}\r\n{$IFDEF LCLLIB}\r\n{$DEFINE LCLWEBLIB}\r\n{$ENDIF}\r\n\r\ninterface\r\n\r\nprocedure RegisterMapBoxGeocodingService;\r\nprocedure UnRegisterMapBoxGeocodingService;\r\n\r\nimplementation\r\n\r\nuses\r\n Classes, Math, DateUtils, Types, SysUtils, WEBLib.TMSFNCGeocoding,\r\n WEBLib.TMSFNCUtils, WEBLib.TMSFNCTypes, WEBLib.TMSFNCMapsCommonTypes, WEBLib.TMSFNCCloudBase\r\n {$IFNDEF WEBLIB}\r\n {$IFNDEF LCLLIB}\r\n {$HINTS OFF}\r\n {$IF COMPILERVERSION > 26}\r\n ,JSON\r\n {$ELSE}\r\n ,DBXJSON\r\n {$IFEND}\r\n {$HINTS ON}\r\n {$ELSE}\r\n ,fpjson\r\n {$ENDIF}\r\n {$ENDIF}\r\n\r\n {$IFDEF WEBLIB}\r\n ,Contnrs, Web, WEBLIB.JSON\r\n {$ENDIF}\r\n {$IFNDEF LCLWEBLIB}\r\n ,Generics.Collections, Generics.Defaults\r\n {$HINTS OFF}\r\n {$IF COMPILERVERSION > 22}\r\n , UITypes\r\n {$IFEND}\r\n {$HINTS ON}\r\n {$ENDIF}\r\n {$IFDEF LCLLIB}\r\n ,fgl\r\n {$ENDIF}\r\n ;\r\n\r\ntype\r\n TTMSFNCGeocodingMapBoxService = class;\r\n\r\n TTMSFNCGeocodingMapBoxGeocodingFactoryService = class(TTMSFNCGeocodingFactoryService, ITMSFNCGeocodingServiceMapBox);\r\n\r\n TTMSFNCGeocodingMapBoxService = class(TTMSFNCGeocodingMapBoxGeocodingFactoryService)\r\n protected\r\n function DoCreateGeocoding: ITMSFNCCustomGeocoding; override;\r\n end;\r\n\r\ntype\r\n TTMSFNCGeocodingMapBoxGeocoding = class;\r\n\r\n TTMSFNCGeocodingMapBoxGeocoding = class(TTMSFNCCustomGeocodingInterfacedObject, ITMSFNCCustomGeocoding)\r\n protected\r\n function GetIdentifier: string;\r\n function IsValid: Boolean;\r\n function GetRequestMethod: TTMSFNCCloudBaseRequestMethod;\r\n function GetHost: string;\r\n function GetReverseHost: string;\r\n function GetPath(AAddress: string): string;\r\n function GetReversePath(ACoordinate: TTMSFNCMapsCoordinateRec): string;\r\n function GetQuery(AAddress: string; ALocale: string): string; overload;\r\n function GetQuery(ACoordinate: TTMSFNCMapsCoordinateRec; ALocale: string): string; overload;\r\n function GetPostData: string;\r\n procedure Parse(ARequest: TTMSFNCGeocodingRequest; ARequestResult: string);\r\n procedure AddHeaders(AHeaders: TTMSFNCCloudBaseRequestHeaders);\r\n procedure DestroyGeocoding;\r\n public\r\n constructor Create;\r\n destructor Destroy; override;\r\n end;\r\n\r\nvar\r\n GeocodingService: ITMSFNCGeocodingServiceMapBox;\r\n\r\nprocedure RegisterMapBoxGeocodingService;\r\nbegin\r\n if not TTMSFNCGeocodingPlatformServices.Current.SupportsPlatformService(ITMSFNCGeocodingServiceMapBox, IInterface(GeocodingService)) then\r\n begin\r\n GeocodingService := TTMSFNCGeocodingMapBoxService.Create;\r\n TTMSFNCGeocodingPlatformServices.Current.AddPlatformService(ITMSFNCGeocodingServiceMapBox, GeocodingService);\r\n end;\r\nend;\r\n\r\nprocedure UnregisterMapBoxGeocodingService;\r\nbegin\r\n TTMSFNCGeocodingPlatformServices.Current.RemovePlatformService(ITMSFNCGeocodingServiceMapBox);\r\nend;\r\n\r\n{ TTMSFNCGeocodingMapBoxService }\r\n\r\nfunction TTMSFNCGeocodingMapBoxService.DoCreateGeocoding: ITMSFNCCustomGeocoding;\r\nbegin\r\n Result := TTMSFNCGeocodingMapBoxGeocoding.Create;\r\nend;\r\n\r\nprocedure TTMSFNCGeocodingMapBoxGeocoding.AddHeaders(\r\n AHeaders: TTMSFNCCloudBaseRequestHeaders);\r\nbegin\r\n\r\nend;\r\n\r\nconstructor TTMSFNCGeocodingMapBoxGeocoding.Create;\r\nbegin\r\n inherited;\r\nend;\r\n\r\ndestructor TTMSFNCGeocodingMapBoxGeocoding.Destroy;\r\nbegin\r\n inherited;\r\nend;\r\n\r\nprocedure TTMSFNCGeocodingMapBoxGeocoding.DestroyGeocoding;\r\nbegin\r\n GeocodingService.DestroyGeocoding(Self);\r\nend;\r\n\r\nfunction TTMSFNCGeocodingMapBoxGeocoding.GetHost: string;\r\nbegin\r\n Result := 'https://api.mapbox.com';\r\nend;\r\n\r\nfunction TTMSFNCGeocodingMapBoxGeocoding.GetReverseHost: string;\r\nbegin\r\n Result := GetHost;\r\nend;\r\n\r\nfunction TTMSFNCGeocodingMapBoxGeocoding.GetIdentifier: string;\r\nbegin\r\n Result := 'MapBox';\r\nend;\r\n\r\nfunction TTMSFNCGeocodingMapBoxGeocoding.GetPath(AAddress: string): string;\r\nbegin\r\n Result := '/geocoding/v5/mapbox.places/' + AAddress + '.json';\r\nend;\r\n\r\nfunction TTMSFNCGeocodingMapBoxGeocoding.GetReversePath(\r\n ACoordinate: TTMSFNCMapsCoordinateRec): string;\r\nbegin\r\n Result := GetPath(TTMSFNCUtils.FloatToStrDot(ACoordinate.Longitude) + ',' + TTMSFNCUtils.FloatToStrDot(ACoordinate.Latitude));\r\nend;\r\n\r\nfunction TTMSFNCGeocodingMapBoxGeocoding.GetPostData: string;\r\nbegin\r\n Result := '';\r\nend;\r\n\r\nfunction TTMSFNCGeocodingMapBoxGeocoding.GetQuery(\r\n ACoordinate: TTMSFNCMapsCoordinateRec; ALocale: string): string;\r\nbegin\r\n Result := GetQuery('', ALocale);\r\nend;\r\n\r\nfunction TTMSFNCGeocodingMapBoxGeocoding.GetQuery(AAddress: string; ALocale: string): string;\r\nbegin\r\n Result := 'access_token=' + GeocodingProperties.GetAPIKey\r\n + '&language=' + ALocale\r\n ;\r\nend;\r\n\r\nfunction TTMSFNCGeocodingMapBoxGeocoding.GetRequestMethod: TTMSFNCCloudBaseRequestMethod;\r\nbegin\r\n Result := rmGet;\r\nend;\r\n\r\nfunction TTMSFNCGeocodingMapBoxGeocoding.IsValid: Boolean;\r\nbegin\r\n Result := GeocodingProperties.GetAPIKey <> '';\r\nend;\r\n\r\nprocedure TTMSFNCGeocodingMapBoxGeocoding.Parse(ARequest: TTMSFNCGeocodingRequest; ARequestResult: string);\r\nvar\r\n d: TTMSFNCGeocodingItems;\r\n di: TTMSFNCGeocodingItem;\r\n\r\n o, jo, oa: TJSONValue;\r\n jav, jas, jaa: TJSONArray;\r\n i, j: Integer;\r\n position, cid: string;\r\n sposition: TStringList;\r\nbegin\r\n if Assigned(GeocodingProperties) then\r\n begin\r\n d := ARequest.Items;\r\n if Assigned(d) then\r\n begin\r\n if ARequestResult <> '' then\r\n begin\r\n o := TTMSFNCUtils.ParseJSON(ARequestResult);\r\n if Assigned(o) then\r\n begin\r\n try\r\n ARequest.Status := TTMSFNCUtils.GetJSONProp(o, 'message');\r\n ARequest.ErrorMessage := ARequest.Status;\r\n\r\n jav := TTMSFNCUtils.GetJSONValue(o, 'features') as TJSONArray;\r\n if Assigned(jav) then\r\n begin\r\n for i := 0 to TTMSFNCUtils.GetJSONArraySize(jav) - 1 do\r\n begin\r\n di := d.Add;\r\n jo := TTMSFNCUtils.GetJSONArrayItem(jav, i);\r\n\r\n di.Address := TTMSFNCUtils.GetJSONProp(jo, 'place_name');\r\n di.Street := TTMSFNCUtils.GetJSONProp(jo, 'address');\r\n\r\n jaa := TTMSFNCUtils.GetJSONValue(jo, 'context') as TJSONArray;\r\n if Assigned(jaa) then\r\n begin\r\n for j := 0 to TTMSFNCUtils.GetJSONArraySize(jaa) - 1 do\r\n begin\r\n oa := TTMSFNCUtils.GetJSONArrayItem(jaa, j);\r\n cid := TTMSFNCUtils.GetJSONProp(oa, 'id');\r\n\r\n if (pos('postcode', cid) > 0) then\r\n di.PostalCode := TTMSFNCUtils.GetJSONProp(oa, 'text')\r\n else if (pos('place', cid) > 0) then\r\n di.City := TTMSFNCUtils.GetJSONProp(oa, 'text')\r\n else if (pos('region', cid) > 0) then\r\n di.Region := TTMSFNCUtils.GetJSONProp(oa, 'text')\r\n else if (pos('country', cid) > 0) then\r\n di.Country := TTMSFNCUtils.GetJSONProp(oa, 'text')\r\n ;\r\n end;\r\n end;\r\n\r\n jas := TTMSFNCUtils.GetJSONValue(jo, 'center') as TJSONArray;\r\n if Assigned(jas) then\r\n begin\r\n sposition := TStringList.Create;\r\n position := StringReplace(jas.ToString, '[', '', [rfReplaceAll]);\r\n position := StringReplace(position, ']', '', [rfReplaceAll]);\r\n TTMSFNCUtils.Split(',', position, sposition);\r\n if sposition.Count > 1 then\r\n begin\r\n di.Coordinate.Latitude := TTMSFNCUtils.StrToFloatDot(sposition[1]);\r\n di.Coordinate.Longitude := TTMSFNCUtils.StrToFloatDot(sposition[0]);\r\n end;\r\n sposition.Free;\r\n end;\r\n end;\r\n end;\r\n finally\r\n o.Free;\r\n end;\r\n end;\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\nend.\r\n\r\n","{********************************************************************}\r\n{ }\r\n{ written by TMS Software }\r\n{ copyright (c) 2020 - 2022 }\r\n{ Email : info@tmssoftware.com }\r\n{ Web : http://www.tmssoftware.com }\r\n{ }\r\n{ The source code is given as is. The author is not responsible }\r\n{ for any possible damage done due to the use of this code. }\r\n{ The complete source code remains property of the author and may }\r\n{ not be distributed, published, given or sold in any form as such. }\r\n{ No parts of the source code can be included in any other component }\r\n{ or application without written authorization of the author. }\r\n{********************************************************************}\r\n\r\nunit WEBLib.TMSFNCGeocoding.TomTom;\r\n\r\n{$I WEBLib.TMSFNCDefines.inc}\r\n\r\n{$IFDEF WEBLIB}\r\n{$DEFINE LCLWEBLIB}\r\n{$ENDIF}\r\n{$IFDEF LCLLIB}\r\n{$DEFINE LCLWEBLIB}\r\n{$ENDIF}\r\n\r\ninterface\r\n\r\nprocedure RegisterTomTomGeocodingService;\r\nprocedure UnRegisterTomTomGeocodingService;\r\n\r\nimplementation\r\n\r\nuses\r\n Classes, Math, DateUtils, Types, SysUtils, WEBLib.TMSFNCGeocoding,\r\n WEBLib.TMSFNCUtils, WEBLib.TMSFNCTypes, WEBLib.TMSFNCMapsCommonTypes, WEBLib.TMSFNCCloudBase\r\n {$IFNDEF WEBLIB}\r\n {$IFNDEF LCLLIB}\r\n {$HINTS OFF}\r\n {$IF COMPILERVERSION > 26}\r\n ,JSON\r\n {$ELSE}\r\n ,DBXJSON\r\n {$IFEND}\r\n {$HINTS ON}\r\n {$ELSE}\r\n ,fpjson\r\n {$ENDIF}\r\n {$ENDIF}\r\n\r\n {$IFDEF WEBLIB}\r\n ,Contnrs, Web, WEBLIB.JSON\r\n {$ENDIF}\r\n {$IFNDEF LCLWEBLIB}\r\n ,Generics.Collections, Generics.Defaults\r\n {$HINTS OFF}\r\n {$IF COMPILERVERSION > 22}\r\n , UITypes\r\n {$ENDIF}\r\n {$HINTS ON}\r\n {$ENDIF}\r\n {$IFDEF LCLLIB}\r\n ,fgl\r\n {$ENDIF}\r\n ;\r\n\r\ntype\r\n TTMSFNCGeocodingTomTomService = class;\r\n\r\n TTMSFNCGeocodingTomTomGeocodingFactoryService = class(TTMSFNCGeocodingFactoryService, ITMSFNCGeocodingServiceTomTom);\r\n\r\n TTMSFNCGeocodingTomTomService = class(TTMSFNCGeocodingTomTomGeocodingFactoryService)\r\n protected\r\n function DoCreateGeocoding: ITMSFNCCustomGeocoding; override;\r\n end;\r\n\r\ntype\r\n TTMSFNCGeocodingTomTomGeocoding = class;\r\n\r\n TTMSFNCGeocodingTomTomGeocoding = class(TTMSFNCCustomGeocodingInterfacedObject, ITMSFNCCustomGeocoding)\r\n protected\r\n function GetIdentifier: string;\r\n function IsValid: Boolean;\r\n function GetRequestMethod: TTMSFNCCloudBaseRequestMethod;\r\n function GetHost: string;\r\n function GetReverseHost: string;\r\n function GetPath(AAddress: string): string;\r\n function GetReversePath(ACoordinate: TTMSFNCMapsCoordinateRec): string;\r\n function GetQuery(AAddress: string; ALocale: string): string; overload;\r\n function GetQuery(ACoordinate: TTMSFNCMapsCoordinateRec; ALocale: string): string; overload;\r\n function GetPostData: string;\r\n procedure Parse(ARequest: TTMSFNCGeocodingRequest; ARequestResult: string);\r\n procedure AddHeaders(AHeaders: TTMSFNCCloudBaseRequestHeaders);\r\n procedure DestroyGeocoding;\r\n public\r\n constructor Create;\r\n destructor Destroy; override;\r\n end;\r\n\r\nvar\r\n GeocodingService: ITMSFNCGeocodingServiceTomTom;\r\n\r\nprocedure RegisterTomTomGeocodingService;\r\nbegin\r\n if not TTMSFNCGeocodingPlatformServices.Current.SupportsPlatformService(ITMSFNCGeocodingServiceTomTom, IInterface(GeocodingService)) then\r\n begin\r\n GeocodingService := TTMSFNCGeocodingTomTomService.Create;\r\n TTMSFNCGeocodingPlatformServices.Current.AddPlatformService(ITMSFNCGeocodingServiceTomTom, GeocodingService);\r\n end;\r\nend;\r\n\r\nprocedure UnregisterTomTomGeocodingService;\r\nbegin\r\n TTMSFNCGeocodingPlatformServices.Current.RemovePlatformService(ITMSFNCGeocodingServiceTomTom);\r\nend;\r\n\r\n{ TTMSFNCGeocodingTomTomService }\r\n\r\nfunction TTMSFNCGeocodingTomTomService.DoCreateGeocoding: ITMSFNCCustomGeocoding;\r\nbegin\r\n Result := TTMSFNCGeocodingTomTomGeocoding.Create;\r\nend;\r\n\r\nprocedure TTMSFNCGeocodingTomTomGeocoding.AddHeaders(\r\n AHeaders: TTMSFNCCloudBaseRequestHeaders);\r\nbegin\r\n\r\nend;\r\n\r\nconstructor TTMSFNCGeocodingTomTomGeocoding.Create;\r\nbegin\r\n inherited;\r\nend;\r\n\r\ndestructor TTMSFNCGeocodingTomTomGeocoding.Destroy;\r\nbegin\r\n inherited;\r\nend;\r\n\r\nprocedure TTMSFNCGeocodingTomTomGeocoding.DestroyGeocoding;\r\nbegin\r\n GeocodingService.DestroyGeocoding(Self);\r\nend;\r\n\r\nfunction TTMSFNCGeocodingTomTomGeocoding.GetHost: string;\r\nbegin\r\n Result := 'https://api.tomtom.com';\r\nend;\r\n\r\nfunction TTMSFNCGeocodingTomTomGeocoding.GetReverseHost: string;\r\nbegin\r\n Result := GetHost;\r\nend;\r\n\r\nfunction TTMSFNCGeocodingTomTomGeocoding.GetIdentifier: string;\r\nbegin\r\n Result := 'TomTom';\r\nend;\r\n\r\nfunction TTMSFNCGeocodingTomTomGeocoding.GetPath(AAddress: string): string;\r\nbegin\r\n Result := '/search/2/geocode/' + AAddress + '.json';\r\nend;\r\n\r\nfunction TTMSFNCGeocodingTomTomGeocoding.GetReversePath(\r\n ACoordinate: TTMSFNCMapsCoordinateRec): string;\r\nbegin\r\n Result := '/search/2/reverseGeocode/' + (TTMSFNCUtils.FloatToStrDot(ACoordinate.Latitude) + ',' + TTMSFNCUtils.FloatToStrDot(ACoordinate.Longitude)) + '.json';\r\nend;\r\n\r\nfunction TTMSFNCGeocodingTomTomGeocoding.GetPostData: string;\r\nbegin\r\n Result := '';\r\nend;\r\n\r\nfunction TTMSFNCGeocodingTomTomGeocoding.GetQuery(\r\n ACoordinate: TTMSFNCMapsCoordinateRec; ALocale: string): string;\r\nbegin\r\n Result := GetQuery('', ALocale);\r\nend;\r\n\r\nfunction TTMSFNCGeocodingTomTomGeocoding.GetQuery(AAddress: string; ALocale: string): string;\r\nbegin\r\n Result := 'key=' + GeocodingProperties.GetAPIKey;\r\n\r\n if ALocale <> '' then\r\n Result := Result + '&language=' + ALocale;\r\nend;\r\n\r\nfunction TTMSFNCGeocodingTomTomGeocoding.GetRequestMethod: TTMSFNCCloudBaseRequestMethod;\r\nbegin\r\n Result := rmGet;\r\nend;\r\n\r\nfunction TTMSFNCGeocodingTomTomGeocoding.IsValid: Boolean;\r\nbegin\r\n Result := GeocodingProperties.GetAPIKey <> '';\r\nend;\r\n\r\nprocedure TTMSFNCGeocodingTomTomGeocoding.Parse(ARequest: TTMSFNCGeocodingRequest; ARequestResult: string);\r\nvar\r\n d: TTMSFNCGeocodingItems;\r\n di: TTMSFNCGeocodingItem;\r\n\r\n o, jo: TJSONValue;\r\n jav: TJSONArray;\r\n i: Integer;\r\n oc, op: TJSONObject;\r\n isReverse: Boolean;\r\n position: string;\r\n sposition: TStringList;\r\nbegin\r\n if Assigned(GeocodingProperties) then\r\n begin\r\n d := ARequest.Items;\r\n if Assigned(d) then\r\n begin\r\n if ARequestResult <> '' then\r\n begin\r\n o := TTMSFNCUtils.ParseJSON(ARequestResult);\r\n if Assigned(o) then\r\n begin\r\n try\r\n ARequest.Status := TTMSFNCUtils.GetJSONProp(o, 'httpStatusCode');\r\n ARequest.ErrorMessage := TTMSFNCUtils.GetJSONProp(o, 'errorText');\r\n\r\n //geocoding\r\n jav := TTMSFNCUtils.GetJSONValue(o, 'results') as TJSONArray;\r\n isReverse := False;\r\n\r\n //reversegeocoding\r\n if not Assigned(jav) then\r\n begin\r\n jav := TTMSFNCUtils.GetJSONValue(o, 'addresses') as TJSONArray;\r\n isReverse := True;\r\n end;\r\n\r\n if Assigned(jav) then\r\n begin\r\n for i := 0 to TTMSFNCUtils.GetJSONArraySize(jav) - 1 do\r\n begin\r\n di := d.Add;\r\n jo := TTMSFNCUtils.GetJSONArrayItem(jav, i);\r\n\r\n oc := TTMSFNCUtils.GetJSONValue(jo, 'address') as TJSONObject;\r\n if Assigned(oc) then\r\n begin\r\n di.Address := TTMSFNCUtils.GetJSONProp(oc, 'freeformAddress');\r\n di.City := TTMSFNCUtils.GetJSONProp(oc, 'municipality');\r\n di.Country := TTMSFNCUtils.GetJSONProp(oc, 'country');\r\n di.CountryCode := TTMSFNCUtils.GetJSONProp(oc, 'countryCode');\r\n di.Region := TTMSFNCUtils.GetJSONProp(oc, 'countrySecondarySubdivision');\r\n di.Province := TTMSFNCUtils.GetJSONProp(oc, 'countrySubdivision');\r\n di.Street := TTMSFNCUtils.GetJSONProp(oc, 'streetName') + ' ' + TTMSFNCUtils.GetJSONProp(oc, 'streetNumber');\r\n di.PostalCode := TTMSFNCUtils.GetJSONProp(oc, 'postalCode');\r\n end;\r\n\r\n if not isReverse then\r\n begin\r\n op := TTMSFNCUtils.GetJSONValue(jo, 'position') as TJSONObject;\r\n if Assigned(op) then\r\n begin\r\n di.Coordinate.Latitude := TTMSFNCUtils.GetJSONDoubleValue(op, 'lat');\r\n di.Coordinate.Longitude := TTMSFNCUtils.GetJSONDoubleValue(op, 'lon');\r\n end;\r\n end\r\n else\r\n begin\r\n position := TTMSFNCUtils.GetJSONProp(jo, 'position');\r\n if position <> '' then\r\n begin\r\n sposition := TStringList.Create;\r\n TTMSFNCUtils.Split(',', position, sposition);\r\n if sposition.Count > 1 then\r\n begin\r\n di.Coordinate.Latitude := TTMSFNCUtils.StrToFloatDot(sposition[0]);\r\n di.Coordinate.Longitude := TTMSFNCUtils.StrToFloatDot(sposition[1]);\r\n end;\r\n sposition.Free;\r\n end;\r\n end;\r\n end;\r\n end;\r\n finally\r\n o.Free;\r\n end;\r\n end\r\n else\r\n begin\r\n //error\r\n ARequest.Status := ARequestResult;\r\n ARequest.ErrorMessage := ARequest.Status;\r\n end;\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\nend.\r\n\r\n","{********************************************************************}\r\n{ }\r\n{ written by TMS Software }\r\n{ copyright (c) 2021 - 2023 }\r\n{ Email : info@tmssoftware.com }\r\n{ Web : http://www.tmssoftware.com }\r\n{ }\r\n{ The source code is given as is. The author is not responsible }\r\n{ for any possible damage done due to the use of this code. }\r\n{ The complete source code remains property of the author and may }\r\n{ not be distributed, published, given or sold in any form as such. }\r\n{ No parts of the source code can be included in any other component }\r\n{ or application without written authorization of the author. }\r\n{********************************************************************}\r\n\r\nunit WEBLib.TMSFNCGeocoding.OpenStreetMap;\r\n\r\n{$I WEBLib.TMSFNCDefines.inc}\r\n\r\n{$IFDEF WEBLIB}\r\n{$DEFINE LCLWEBLIB}\r\n{$ENDIF}\r\n{$IFDEF LCLLIB}\r\n{$DEFINE LCLWEBLIB}\r\n{$ENDIF}\r\n\r\ninterface\r\n\r\nprocedure RegisterOpenStreetMapGeocodingService;\r\nprocedure UnRegisterOpenStreetMapGeocodingService;\r\n\r\nimplementation\r\n\r\nuses\r\n Classes, Math, DateUtils, Types, SysUtils, WEBLib.TMSFNCGeocoding,\r\n WEBLib.TMSFNCUtils, WEBLib.TMSFNCTypes, WEBLib.TMSFNCMapsCommonTypes, WEBLib.TMSFNCCloudBase\r\n {$IFNDEF WEBLIB}\r\n {$IFNDEF LCLLIB}\r\n {$HINTS OFF}\r\n {$IF COMPILERVERSION > 26}\r\n ,JSON\r\n {$ELSE}\r\n ,DBXJSON\r\n {$IFEND}\r\n {$HINTS ON}\r\n {$ELSE}\r\n ,fpjson\r\n {$ENDIF}\r\n {$ENDIF}\r\n {$IFDEF WEBLIB}\r\n ,Contnrs, Web, WEBLIB.JSON\r\n {$ENDIF}\r\n {$IFNDEF LCLWEBLIB}\r\n ,Generics.Collections, Generics.Defaults\r\n {$HINTS OFF}\r\n {$IF COMPILERVERSION > 22}\r\n , UITypes\r\n {$IFEND}\r\n {$HINTS ON}\r\n {$ENDIF}\r\n {$IFDEF LCLLIB}\r\n ,fgl\r\n {$ENDIF}\r\n ;\r\n\r\ntype\r\n TTMSFNCGeocodingOpenStreetMapService = class;\r\n\r\n TTMSFNCGeocodingOpenStreetMapGeocodingFactoryService = class(TTMSFNCGeocodingFactoryService, ITMSFNCGeocodingServiceOpenStreetMap);\r\n\r\n TTMSFNCGeocodingOpenStreetMapService = class(TTMSFNCGeocodingOpenStreetMapGeocodingFactoryService)\r\n protected\r\n function DoCreateGeocoding: ITMSFNCCustomGeocoding; override;\r\n end;\r\n\r\ntype\r\n TTMSFNCGeocodingOpenStreetMapGeocoding = class;\r\n\r\n TTMSFNCGeocodingOpenStreetMapGeocoding = class(TTMSFNCCustomGeocodingInterfacedObject, ITMSFNCCustomGeocoding)\r\n protected\r\n function GetIdentifier: string;\r\n function IsValid: Boolean;\r\n function GetRequestMethod: TTMSFNCCloudBaseRequestMethod;\r\n function GetHost: string;\r\n function GetReverseHost: string;\r\n function GetPath(AAddress: string): string;\r\n function GetReversePath(ACoordinate: TTMSFNCMapsCoordinateRec): string;\r\n function GetQuery(AAddress: string; ALocale: string): string; overload;\r\n function GetQuery(ACoordinate: TTMSFNCMapsCoordinateRec; ALocale: string): string; overload;\r\n function GetPostData: string;\r\n procedure Parse(ARequest: TTMSFNCGeocodingRequest; ARequestResult: string);\r\n procedure AddHeaders(AHeaders: TTMSFNCCloudBaseRequestHeaders);\r\n procedure DestroyGeocoding;\r\n public\r\n constructor Create;\r\n destructor Destroy; override;\r\n end;\r\n\r\nvar\r\n GeocodingService: ITMSFNCGeocodingServiceOpenStreetMap;\r\n\r\nprocedure RegisterOpenStreetMapGeocodingService;\r\nbegin\r\n if not TTMSFNCGeocodingPlatformServices.Current.SupportsPlatformService(ITMSFNCGeocodingServiceOpenStreetMap, IInterface(GeocodingService)) then\r\n begin\r\n GeocodingService := TTMSFNCGeocodingOpenStreetMapService.Create;\r\n TTMSFNCGeocodingPlatformServices.Current.AddPlatformService(ITMSFNCGeocodingServiceOpenStreetMap, GeocodingService);\r\n end;\r\nend;\r\n\r\nprocedure UnregisterOpenStreetMapGeocodingService;\r\nbegin\r\n TTMSFNCGeocodingPlatformServices.Current.RemovePlatformService(ITMSFNCGeocodingServiceOpenStreetMap);\r\nend;\r\n\r\n{ TTMSFNCGeocodingOpenStreetMapService }\r\n\r\nfunction TTMSFNCGeocodingOpenStreetMapService.DoCreateGeocoding: ITMSFNCCustomGeocoding;\r\nbegin\r\n Result := TTMSFNCGeocodingOpenStreetMapGeocoding.Create;\r\nend;\r\n\r\nprocedure TTMSFNCGeocodingOpenStreetMapGeocoding.AddHeaders(\r\n AHeaders: TTMSFNCCloudBaseRequestHeaders);\r\nbegin\r\n\r\nend;\r\n\r\nconstructor TTMSFNCGeocodingOpenStreetMapGeocoding.Create;\r\nbegin\r\n inherited;\r\nend;\r\n\r\ndestructor TTMSFNCGeocodingOpenStreetMapGeocoding.Destroy;\r\nbegin\r\n inherited;\r\nend;\r\n\r\nprocedure TTMSFNCGeocodingOpenStreetMapGeocoding.DestroyGeocoding;\r\nbegin\r\n GeocodingService.DestroyGeocoding(Self);\r\nend;\r\n\r\nfunction TTMSFNCGeocodingOpenStreetMapGeocoding.GetHost: string;\r\nbegin\r\n Result := 'https://nominatim.openstreetmap.org';\r\nend;\r\n\r\nfunction TTMSFNCGeocodingOpenStreetMapGeocoding.GetReverseHost: string;\r\nbegin\r\n Result := GetHost;\r\nend;\r\n\r\nfunction TTMSFNCGeocodingOpenStreetMapGeocoding.GetIdentifier: string;\r\nbegin\r\n Result := 'OpenStreetMap';\r\nend;\r\n\r\nfunction TTMSFNCGeocodingOpenStreetMapGeocoding.GetPath(AAddress: string): string;\r\nbegin\r\n Result := '/search';\r\nend;\r\n\r\nfunction TTMSFNCGeocodingOpenStreetMapGeocoding.GetReversePath(ACoordinate: TTMSFNCMapsCoordinateRec): string;\r\nbegin\r\n Result := '/reverse';\r\nend;\r\n\r\nfunction TTMSFNCGeocodingOpenStreetMapGeocoding.GetPostData: string;\r\nbegin\r\n Result := '';\r\nend;\r\n\r\nfunction TTMSFNCGeocodingOpenStreetMapGeocoding.GetQuery(\r\n ACoordinate: TTMSFNCMapsCoordinateRec; ALocale: string): string;\r\nbegin\r\n Result := 'lat=' + TTMSFNCUtils.FloatToStrDot(ACoordinate.Latitude)\r\n + '&lon=' + TTMSFNCUtils.FloatToStrDot(ACoordinate.Longitude)\r\n + '&accept-language=' + Alocale\r\n + '&format=jsonv2';\r\nend;\r\n\r\nfunction TTMSFNCGeocodingOpenStreetMapGeocoding.GetQuery(AAddress: string; ALocale: string): string;\r\nbegin\r\n Result := 'q=' + AAddress\r\n + '&addressdetails=1'\r\n + '&accept-language=' + Alocale\r\n + '&format=jsonv2';\r\nend;\r\n\r\nfunction TTMSFNCGeocodingOpenStreetMapGeocoding.GetRequestMethod: TTMSFNCCloudBaseRequestMethod;\r\nbegin\r\n Result := rmGet;\r\nend;\r\n\r\nfunction TTMSFNCGeocodingOpenStreetMapGeocoding.IsValid: Boolean;\r\nbegin\r\n Result := True;\r\nend;\r\n\r\nprocedure TTMSFNCGeocodingOpenStreetMapGeocoding.Parse(ARequest: TTMSFNCGeocodingRequest; ARequestResult: string);\r\nvar\r\n d: TTMSFNCGeocodingItems;\r\n di: TTMSFNCGeocodingItem;\r\n\r\n o, jo: TJSONValue;\r\n jar: TJSONArray;\r\n i: Integer;\r\n oc: TJSONObject;\r\n error: string;\r\n\r\n procedure ParseGeocodingItem(Items: TTMSFNCGeocodingItems; JSON: TJSONValue);\r\n var\r\n street, number: string;\r\n begin\r\n di := Items.Add;\r\n di.Address := TTMSFNCUtils.GetJSONProp(JSON, 'display_name');\r\n di.Coordinate.Latitude := TTMSFNCUtils.StrToFloatDot(TTMSFNCUtils.GetJSONProp(JSON, 'lat'));\r\n di.Coordinate.Longitude := TTMSFNCUtils.StrToFloatDot(TTMSFNCUtils.GetJSONProp(JSON, 'lon'));\r\n\r\n oc := TTMSFNCUtils.GetJSONValue(JSON, 'address') as TJSONObject;\r\n if Assigned(oc) then\r\n begin\r\n\r\n street := TTMSFNCUtils.GetJSONProp(oc, 'road');\r\n if street = '' then\r\n street := TTMSFNCUtils.GetJSONProp(oc, 'locality');\r\n number := TTMSFNCUtils.GetJSONProp(oc, 'house_number');\r\n\r\n di.Street := Trim(street + number);\r\n di.StreetNumber := number;\r\n di.StreetName := street;\r\n\r\n di.PostalCode := TTMSFNCUtils.GetJSONProp(oc, 'postcode');\r\n di.City := TTMSFNCUtils.GetJSONProp(oc, 'city');\r\n if di.City = '' then\r\n begin\r\n di.City := TTMSFNCUtils.GetJSONProp(oc, 'city_district');\r\n if di.City = '' then\r\n di.City := TTMSFNCUtils.GetJSONProp(oc, 'village');\r\n if di.City = '' then\r\n di.City := TTMSFNCUtils.GetJSONProp(oc, 'town');\r\n end;\r\n di.Region := TTMSFNCUtils.GetJSONProp(oc, 'region');\r\n if di.Region = '' then\r\n di.Region := TTMSFNCUtils.GetJSONProp(oc, 'county');\r\n di.Province := TTMSFNCUtils.GetJSONProp(oc, 'state');\r\n di.Country := TTMSFNCUtils.GetJSONProp(oc, 'country');\r\n di.CountryCode := TTMSFNCUtils.GetJSONProp(oc, 'country_code');\r\n end;\r\n end;\r\n\r\nbegin\r\n if Assigned(GeocodingProperties) then\r\n begin\r\n d := ARequest.Items;\r\n\r\n if Assigned(d) then\r\n begin\r\n if ARequestResult <> '' then\r\n begin\r\n o := TTMSFNCUtils.ParseJSON(ARequestResult);\r\n if Assigned(o) then\r\n begin\r\n try\r\n error := TTMSFNCUtils.GetJSONProp(o, 'error');\r\n if error <> '' then\r\n begin\r\n ARequest.Status := 'error';\r\n ARequest.ErrorMessage := error;\r\n end\r\n else\r\n begin\r\n if o is TJSONArray then\r\n begin\r\n jar := o as TJSONArray;\r\n if Assigned(jar) then\r\n begin\r\n for i := 0 to TTMSFNCUtils.GetJSONArraySize(jar) - 1 do\r\n begin\r\n jo := TTMSFNCUtils.GetJSONArrayItem(jar, i);\r\n ParseGeocodingItem(d, jo);\r\n end;\r\n end\r\n end\r\n else\r\n begin\r\n ParseGeocodingItem(d, o);\r\n end;\r\n end;\r\n finally\r\n o.Free;\r\n end;\r\n end;\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\nend.\r\n\r\n","{********************************************************************}\r\n{ }\r\n{ written by TMS Software }\r\n{ copyright (c) 2021 }\r\n{ Email : info@tmssoftware.com }\r\n{ Web : http://www.tmssoftware.com }\r\n{ }\r\n{ The source code is given as is. The author is not responsible }\r\n{ for any possible damage done due to the use of this code. }\r\n{ The complete source code remains property of the author and may }\r\n{ not be distributed, published, given or sold in any form as such. }\r\n{ No parts of the source code can be included in any other component }\r\n{ or application without written authorization of the author. }\r\n{********************************************************************}\r\n\r\nunit WEBLib.TMSFNCGeocoding.OpenRouteService;\r\n\r\n{$I WEBLib.TMSFNCDefines.inc}\r\n\r\n{$IFDEF WEBLIB}\r\n{$DEFINE LCLWEBLIB}\r\n{$ENDIF}\r\n{$IFDEF LCLLIB}\r\n{$DEFINE LCLWEBLIB}\r\n{$ENDIF}\r\n\r\ninterface\r\n\r\nprocedure RegisterOpenRouteServiceGeocodingService;\r\nprocedure UnRegisterOpenRouteServiceGeocodingService;\r\n\r\nimplementation\r\n\r\nuses\r\n Classes, Math, DateUtils, Types, SysUtils, WEBLib.TMSFNCGeocoding,\r\n WEBLib.TMSFNCUtils, WEBLib.TMSFNCTypes, WEBLib.TMSFNCMapsCommonTypes, WEBLib.TMSFNCCloudBase\r\n {$IFNDEF WEBLIB}\r\n {$IFNDEF LCLLIB}\r\n {$HINTS OFF}\r\n {$IF COMPILERVERSION > 26}\r\n ,JSON\r\n {$ELSE}\r\n ,DBXJSON\r\n {$IFEND}\r\n {$HINTS ON}\r\n {$ELSE}\r\n ,fpjson\r\n {$ENDIF}\r\n {$ENDIF}\r\n {$IFDEF WEBLIB}\r\n ,Contnrs, Web, WEBLIB.JSON\r\n {$ENDIF}\r\n {$IFNDEF LCLWEBLIB}\r\n ,Generics.Collections, Generics.Defaults\r\n {$HINTS OFF}\r\n {$IF COMPILERVERSION > 22}\r\n , UITypes\r\n {$IFEND}\r\n {$HINTS ON}\r\n {$ENDIF}\r\n {$IFDEF LCLLIB}\r\n ,fgl\r\n {$ENDIF}\r\n ;\r\n\r\ntype\r\n TTMSFNCGeocodingOpenRouteServiceService = class;\r\n\r\n TTMSFNCGeocodingOpenRouteServiceGeocodingFactoryService = class(TTMSFNCGeocodingFactoryService, ITMSFNCGeocodingServiceOpenRouteService);\r\n\r\n TTMSFNCGeocodingOpenRouteServiceService = class(TTMSFNCGeocodingOpenRouteServiceGeocodingFactoryService)\r\n protected\r\n function DoCreateGeocoding: ITMSFNCCustomGeocoding; override;\r\n end;\r\n\r\ntype\r\n TTMSFNCGeocodingOpenRouteServiceGeocoding = class;\r\n\r\n TTMSFNCGeocodingOpenRouteServiceGeocoding = class(TTMSFNCCustomGeocodingInterfacedObject, ITMSFNCCustomGeocoding)\r\n protected\r\n function GetIdentifier: string;\r\n function IsValid: Boolean;\r\n function GetRequestMethod: TTMSFNCCloudBaseRequestMethod;\r\n function GetHost: string;\r\n function GetReverseHost: string;\r\n function GetPath(AAddress: string): string;\r\n function GetReversePath(ACoordinate: TTMSFNCMapsCoordinateRec): string;\r\n function GetQuery(AAddress: string; ALocale: string): string; overload;\r\n function GetQuery(ACoordinate: TTMSFNCMapsCoordinateRec; ALocale: string): string; overload;\r\n function GetPostData: string;\r\n procedure Parse(ARequest: TTMSFNCGeocodingRequest; ARequestResult: string);\r\n procedure AddHeaders(AHeaders: TTMSFNCCloudBaseRequestHeaders);\r\n procedure DestroyGeocoding;\r\n public\r\n constructor Create;\r\n destructor Destroy; override;\r\n end;\r\n\r\nvar\r\n GeocodingService: ITMSFNCGeocodingServiceOpenRouteService;\r\n\r\nprocedure RegisterOpenRouteServiceGeocodingService;\r\nbegin\r\n if not TTMSFNCGeocodingPlatformServices.Current.SupportsPlatformService(ITMSFNCGeocodingServiceOpenRouteService, IInterface(GeocodingService)) then\r\n begin\r\n GeocodingService := TTMSFNCGeocodingOpenRouteServiceService.Create;\r\n TTMSFNCGeocodingPlatformServices.Current.AddPlatformService(ITMSFNCGeocodingServiceOpenRouteService, GeocodingService);\r\n end;\r\nend;\r\n\r\nprocedure UnregisterOpenRouteServiceGeocodingService;\r\nbegin\r\n TTMSFNCGeocodingPlatformServices.Current.RemovePlatformService(ITMSFNCGeocodingServiceOpenRouteService);\r\nend;\r\n\r\n{ TTMSFNCGeocodingOpenRouteServiceService }\r\n\r\nfunction TTMSFNCGeocodingOpenRouteServiceService.DoCreateGeocoding: ITMSFNCCustomGeocoding;\r\nbegin\r\n Result := TTMSFNCGeocodingOpenRouteServiceGeocoding.Create;\r\nend;\r\n\r\nprocedure TTMSFNCGeocodingOpenRouteServiceGeocoding.AddHeaders(\r\n AHeaders: TTMSFNCCloudBaseRequestHeaders);\r\nbegin\r\n\r\nend;\r\n\r\nconstructor TTMSFNCGeocodingOpenRouteServiceGeocoding.Create;\r\nbegin\r\n inherited;\r\nend;\r\n\r\ndestructor TTMSFNCGeocodingOpenRouteServiceGeocoding.Destroy;\r\nbegin\r\n inherited;\r\nend;\r\n\r\nprocedure TTMSFNCGeocodingOpenRouteServiceGeocoding.DestroyGeocoding;\r\nbegin\r\n GeocodingService.DestroyGeocoding(Self);\r\nend;\r\n\r\nfunction TTMSFNCGeocodingOpenRouteServiceGeocoding.GetHost: string;\r\nbegin\r\n Result := 'https://api.openrouteservice.org';\r\nend;\r\n\r\nfunction TTMSFNCGeocodingOpenRouteServiceGeocoding.GetReverseHost: string;\r\nbegin\r\n Result := GetHost;\r\nend;\r\n\r\nfunction TTMSFNCGeocodingOpenRouteServiceGeocoding.GetIdentifier: string;\r\nbegin\r\n Result := 'OpenRouteService';\r\nend;\r\n\r\nfunction TTMSFNCGeocodingOpenRouteServiceGeocoding.GetPath(AAddress: string): string;\r\nbegin\r\n Result := '/geocode/search';\r\nend;\r\n\r\nfunction TTMSFNCGeocodingOpenRouteServiceGeocoding.GetReversePath(ACoordinate: TTMSFNCMapsCoordinateRec): string;\r\nbegin\r\n Result := '/geocode/reverse';\r\nend;\r\n\r\nfunction TTMSFNCGeocodingOpenRouteServiceGeocoding.GetPostData: string;\r\nbegin\r\n Result := '';\r\nend;\r\n\r\nfunction TTMSFNCGeocodingOpenRouteServiceGeocoding.GetQuery(\r\n ACoordinate: TTMSFNCMapsCoordinateRec; ALocale: string): string;\r\nbegin\r\n Result := 'api_key=' + GeocodingProperties.GetAPIKey\r\n + '&point.lat=' + TTMSFNCUtils.FloatToStrDot(ACoordinate.Latitude)\r\n + '&point.lon=' + TTMSFNCUtils.FloatToStrDot(ACoordinate.Longitude);\r\nend;\r\n\r\nfunction TTMSFNCGeocodingOpenRouteServiceGeocoding.GetQuery(AAddress: string; ALocale: string): string;\r\nbegin\r\n Result := 'api_key=' + GeocodingProperties.GetAPIKey\r\n + '&text=' + AAddress;\r\nend;\r\n\r\nfunction TTMSFNCGeocodingOpenRouteServiceGeocoding.GetRequestMethod: TTMSFNCCloudBaseRequestMethod;\r\nbegin\r\n Result := rmGet;\r\nend;\r\n\r\nfunction TTMSFNCGeocodingOpenRouteServiceGeocoding.IsValid: Boolean;\r\nbegin\r\n Result := GeocodingProperties.GetAPIKey <> '';\r\nend;\r\n\r\nprocedure TTMSFNCGeocodingOpenRouteServiceGeocoding.Parse(ARequest: TTMSFNCGeocodingRequest; ARequestResult: string);\r\nvar\r\n d: TTMSFNCGeocodingItems;\r\n di: TTMSFNCGeocodingItem;\r\n\r\n o, jo, joar: TJSONValue;\r\n jar, jab: TJSONArray;\r\n i, j: Integer;\r\n ob, oc: TJSONObject;\r\nbegin\r\n if Assigned(GeocodingProperties) then\r\n begin\r\n d := ARequest.Items;\r\n\r\n if Assigned(d) then\r\n begin\r\n if ARequestResult <> '' then\r\n begin\r\n o := TTMSFNCUtils.ParseJSON(ARequestResult);\r\n if Assigned(o) then\r\n begin\r\n try\r\n ARequest.ErrorMessage := TTMSFNCUtils.GetJSONProp(o, 'error');\r\n if ARequest.ErrorMessage <> '' then\r\n ARequest.Status := 'error';\r\n\r\n jar := TTMSFNCUtils.GetJSONValue(o, 'features') as TJSONArray;\r\n if Assigned(jar) then\r\n begin\r\n for i := 0 to TTMSFNCUtils.GetJSONArraySize(jar) - 1 do\r\n begin\r\n jo := TTMSFNCUtils.GetJSONArrayItem(jar, i);\r\n\r\n di := d.Add;\r\n\r\n oc := TTMSFNCUtils.GetJSONValue(jo, 'properties') as TJSONObject;\r\n if Assigned(oc) then\r\n begin\r\n di.Address := TTMSFNCUtils.GetJSONProp(oc, 'label');\r\n di.Street := TTMSFNCUtils.GetJSONProp(oc, 'street');\r\n if di.Street = '' then\r\n di.Street := TTMSFNCUtils.GetJSONProp(oc, 'name');\r\n di.PostalCode := TTMSFNCUtils.GetJSONProp(oc, 'postalcode');\r\n di.City := TTMSFNCUtils.GetJSONProp(oc, 'localadmin');\r\n di.Region := TTMSFNCUtils.GetJSONProp(oc, 'county');\r\n di.RegionCode := TTMSFNCUtils.GetJSONProp(oc, 'county_a');\r\n di.Province := TTMSFNCUtils.GetJSONProp(oc, 'region');\r\n di.ProvinceCode := TTMSFNCUtils.GetJSONProp(oc, 'region_a');\r\n di.Country := TTMSFNCUtils.GetJSONProp(oc, 'country');\r\n di.CountryCode := TTMSFNCUtils.GetJSONProp(oc, 'country_a');\r\n end;\r\n\r\n ob := TTMSFNCUtils.GetJSONValue(jo, 'geometry') as TJSONObject;\r\n if Assigned(ob) then\r\n begin\r\n jab := TTMSFNCUtils.GetJSONValue(ob, 'coordinates') as TJSONArray;\r\n if Assigned(jar) then\r\n begin\r\n for j := 0 to TTMSFNCUtils.GetJSONArraySize(jab) - 1 do\r\n begin\r\n joar := TTMSFNCUtils.GetJSONArrayItem(jab, j);\r\n if j = 0 then\r\n di.Coordinate.Longitude := TTMSFNCUtils.StrToFloatDot(joar.Value);\r\n if j = 1 then\r\n di.Coordinate.Latitude := TTMSFNCUtils.StrToFloatDot(joar.Value);\r\n end;\r\n end;\r\n end;\r\n end;\r\n end;\r\n finally\r\n o.Free;\r\n end;\r\n end;\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\nend.\r\n","{********************************************************************}\r\n{ }\r\n{ written by TMS Software }\r\n{ copyright (c) 2021 }\r\n{ Email : info@tmssoftware.com }\r\n{ Web : http://www.tmssoftware.com }\r\n{ }\r\n{ The source code is given as is. The author is not responsible }\r\n{ for any possible damage done due to the use of this code. }\r\n{ The complete source code remains property of the author and may }\r\n{ not be distributed, published, given or sold in any form as such. }\r\n{ No parts of the source code can be included in any other component }\r\n{ or application without written authorization of the author. }\r\n{********************************************************************}\r\n\r\nunit WEBLib.TMSFNCGeocoding.GeoApify;\r\n\r\n{$I WEBLib.TMSFNCDefines.inc}\r\n\r\n{$IFDEF WEBLIB}\r\n{$DEFINE LCLWEBLIB}\r\n{$ENDIF}\r\n{$IFDEF LCLLIB}\r\n{$DEFINE LCLWEBLIB}\r\n{$ENDIF}\r\n\r\ninterface\r\n\r\nprocedure RegisterGeoApifyGeocodingService;\r\nprocedure UnRegisterGeoApifyGeocodingService;\r\n\r\nimplementation\r\n\r\nuses\r\n Classes, Math, DateUtils, Types, SysUtils, WEBLib.TMSFNCGeocoding,\r\n WEBLib.TMSFNCUtils, WEBLib.TMSFNCTypes, WEBLib.TMSFNCMapsCommonTypes, WEBLib.TMSFNCCloudBase\r\n {$IFNDEF WEBLIB}\r\n {$IFNDEF LCLLIB}\r\n {$HINTS OFF}\r\n {$IF COMPILERVERSION > 26}\r\n ,JSON\r\n {$ELSE}\r\n ,DBXJSON\r\n {$IFEND}\r\n {$HINTS ON}\r\n {$ELSE}\r\n ,fpjson\r\n {$ENDIF}\r\n {$ENDIF}\r\n {$IFDEF WEBLIB}\r\n ,Contnrs, Web, WEBLIB.JSON\r\n {$ENDIF}\r\n {$IFNDEF LCLWEBLIB}\r\n ,Generics.Collections, Generics.Defaults\r\n {$HINTS OFF}\r\n {$IF COMPILERVERSION > 22}\r\n , UITypes\r\n {$IFEND}\r\n {$HINTS ON}\r\n {$ENDIF}\r\n {$IFDEF LCLLIB}\r\n ,fgl\r\n {$ENDIF}\r\n ;\r\n\r\ntype\r\n TTMSFNCGeocodingGeoApifyService = class;\r\n\r\n TTMSFNCGeocodingGeoApifyGeocodingFactoryService = class(TTMSFNCGeocodingFactoryService, ITMSFNCGeocodingServiceGeoApify);\r\n\r\n TTMSFNCGeocodingGeoApifyService = class(TTMSFNCGeocodingGeoApifyGeocodingFactoryService)\r\n protected\r\n function DoCreateGeocoding: ITMSFNCCustomGeocoding; override;\r\n end;\r\n\r\ntype\r\n TTMSFNCGeocodingGeoApifyGeocoding = class;\r\n\r\n TTMSFNCGeocodingGeoApifyGeocoding = class(TTMSFNCCustomGeocodingInterfacedObject, ITMSFNCCustomGeocoding)\r\n protected\r\n function GetIdentifier: string;\r\n function IsValid: Boolean;\r\n function GetRequestMethod: TTMSFNCCloudBaseRequestMethod;\r\n function GetHost: string;\r\n function GetReverseHost: string;\r\n function GetPath(AAddress: string): string;\r\n function GetReversePath(ACoordinate: TTMSFNCMapsCoordinateRec): string;\r\n function GetQuery(AAddress: string; ALocale: string): string; overload;\r\n function GetQuery(ACoordinate: TTMSFNCMapsCoordinateRec; ALocale: string): string; overload;\r\n function GetPostData: string;\r\n procedure Parse(ARequest: TTMSFNCGeocodingRequest; ARequestResult: string);\r\n procedure AddHeaders(AHeaders: TTMSFNCCloudBaseRequestHeaders);\r\n procedure DestroyGeocoding;\r\n public\r\n constructor Create;\r\n destructor Destroy; override;\r\n end;\r\n\r\nvar\r\n GeocodingService: ITMSFNCGeocodingServiceGeoApify;\r\n\r\nprocedure RegisterGeoApifyGeocodingService;\r\nbegin\r\n if not TTMSFNCGeocodingPlatformServices.Current.SupportsPlatformService(ITMSFNCGeocodingServiceGeoApify, IInterface(GeocodingService)) then\r\n begin\r\n GeocodingService := TTMSFNCGeocodingGeoApifyService.Create;\r\n TTMSFNCGeocodingPlatformServices.Current.AddPlatformService(ITMSFNCGeocodingServiceGeoApify, GeocodingService);\r\n end;\r\nend;\r\n\r\nprocedure UnregisterGeoApifyGeocodingService;\r\nbegin\r\n TTMSFNCGeocodingPlatformServices.Current.RemovePlatformService(ITMSFNCGeocodingServiceGeoApify);\r\nend;\r\n\r\n{ TTMSFNCGeocodingGeoApifyService }\r\n\r\nfunction TTMSFNCGeocodingGeoApifyService.DoCreateGeocoding: ITMSFNCCustomGeocoding;\r\nbegin\r\n Result := TTMSFNCGeocodingGeoApifyGeocoding.Create;\r\nend;\r\n\r\nprocedure TTMSFNCGeocodingGeoApifyGeocoding.AddHeaders(\r\n AHeaders: TTMSFNCCloudBaseRequestHeaders);\r\nbegin\r\n\r\nend;\r\n\r\nconstructor TTMSFNCGeocodingGeoApifyGeocoding.Create;\r\nbegin\r\n inherited;\r\nend;\r\n\r\ndestructor TTMSFNCGeocodingGeoApifyGeocoding.Destroy;\r\nbegin\r\n inherited;\r\nend;\r\n\r\nprocedure TTMSFNCGeocodingGeoApifyGeocoding.DestroyGeocoding;\r\nbegin\r\n GeocodingService.DestroyGeocoding(Self);\r\nend;\r\n\r\nfunction TTMSFNCGeocodingGeoApifyGeocoding.GetHost: string;\r\nbegin\r\n Result := 'https://api.geoapify.com';\r\nend;\r\n\r\nfunction TTMSFNCGeocodingGeoApifyGeocoding.GetReverseHost: string;\r\nbegin\r\n Result := GetHost;\r\nend;\r\n\r\nfunction TTMSFNCGeocodingGeoApifyGeocoding.GetIdentifier: string;\r\nbegin\r\n Result := 'GeoApify';\r\nend;\r\n\r\nfunction TTMSFNCGeocodingGeoApifyGeocoding.GetPath(AAddress: string): string;\r\nbegin\r\n Result := '/v1/geocode/search';\r\nend;\r\n\r\nfunction TTMSFNCGeocodingGeoApifyGeocoding.GetReversePath(ACoordinate: TTMSFNCMapsCoordinateRec): string;\r\nbegin\r\n Result := '/v1/geocode/reverse';\r\nend;\r\n\r\nfunction TTMSFNCGeocodingGeoApifyGeocoding.GetPostData: string;\r\nbegin\r\n Result := '';\r\nend;\r\n\r\nfunction TTMSFNCGeocodingGeoApifyGeocoding.GetQuery(\r\n ACoordinate: TTMSFNCMapsCoordinateRec; ALocale: string): string;\r\nbegin\r\n Result := 'apiKey=' + GeocodingProperties.GetAPIKey\r\n + '&lat=' + TTMSFNCUtils.FloatToStrDot(ACoordinate.Latitude)\r\n + '&lon=' + TTMSFNCUtils.FloatToStrDot(ACoordinate.Longitude);\r\nend;\r\n\r\nfunction TTMSFNCGeocodingGeoApifyGeocoding.GetQuery(AAddress: string; ALocale: string): string;\r\nbegin\r\n Result := 'apiKey=' + GeocodingProperties.GetAPIKey\r\n + '&text=' + AAddress;\r\nend;\r\n\r\nfunction TTMSFNCGeocodingGeoApifyGeocoding.GetRequestMethod: TTMSFNCCloudBaseRequestMethod;\r\nbegin\r\n Result := rmGet;\r\nend;\r\n\r\nfunction TTMSFNCGeocodingGeoApifyGeocoding.IsValid: Boolean;\r\nbegin\r\n Result := GeocodingProperties.GetAPIKey <> '';\r\nend;\r\n\r\nprocedure TTMSFNCGeocodingGeoApifyGeocoding.Parse(ARequest: TTMSFNCGeocodingRequest; ARequestResult: string);\r\nvar\r\n d: TTMSFNCGeocodingItems;\r\n di: TTMSFNCGeocodingItem;\r\n\r\n o, jo, joar: TJSONValue;\r\n jar, jab: TJSONArray;\r\n i, j: Integer;\r\n ob, oc: TJSONObject;\r\n street, number: string;\r\nbegin\r\n if Assigned(GeocodingProperties) then\r\n begin\r\n d := ARequest.Items;\r\n\r\n if Assigned(d) then\r\n begin\r\n if ARequestResult <> '' then\r\n begin\r\n o := TTMSFNCUtils.ParseJSON(ARequestResult);\r\n if Assigned(o) then\r\n begin\r\n try\r\n ARequest.Status := TTMSFNCUtils.GetJSONProp(o, 'error');\r\n ARequest.ErrorMessage := TTMSFNCUtils.GetJSONProp(o, 'message');\r\n\r\n jar := TTMSFNCUtils.GetJSONValue(o, 'features') as TJSONArray;\r\n if Assigned(jar) then\r\n begin\r\n for i := 0 to TTMSFNCUtils.GetJSONArraySize(jar) - 1 do\r\n begin\r\n jo := TTMSFNCUtils.GetJSONArrayItem(jar, i);\r\n\r\n di := d.Add;\r\n\r\n oc := TTMSFNCUtils.GetJSONValue(jo, 'properties') as TJSONObject;\r\n if Assigned(oc) then\r\n begin\r\n di.Address := TTMSFNCUtils.GetJSONProp(oc, 'formatted');\r\n\r\n street := TTMSFNCUtils.GetJSONProp(oc, 'street');\r\n if street = '' then\r\n street := TTMSFNCUtils.GetJSONProp(oc, 'name');\r\n\r\n number := TTMSFNCUtils.GetJSONProp(oc, 'housenumber');\r\n\r\n di.Street := Trim(street + ' ' + number);\r\n di.StreetName := street;\r\n di.StreetNumber := number;\r\n\r\n di.PostalCode := TTMSFNCUtils.GetJSONProp(oc, 'postcode');\r\n di.City := TTMSFNCUtils.GetJSONProp(oc, 'city');\r\n di.Region := TTMSFNCUtils.GetJSONProp(oc, 'county');\r\n if di.Region = '' then\r\n di.Region := TTMSFNCUtils.GetJSONProp(oc, 'district');\r\n if di.Region = '' then\r\n di.Region := TTMSFNCUtils.GetJSONProp(oc, 'suburb');\r\n di.Province := TTMSFNCUtils.GetJSONProp(oc, 'state');\r\n di.ProvinceCode := TTMSFNCUtils.GetJSONProp(oc, 'state_code');\r\n di.Country := TTMSFNCUtils.GetJSONProp(oc, 'country');\r\n di.CountryCode := TTMSFNCUtils.GetJSONProp(oc, 'country_code');\r\n end;\r\n\r\n ob := TTMSFNCUtils.GetJSONValue(jo, 'geometry') as TJSONObject;\r\n if Assigned(ob) then\r\n begin\r\n jab := TTMSFNCUtils.GetJSONValue(ob, 'coordinates') as TJSONArray;\r\n if Assigned(jar) then\r\n begin\r\n for j := 0 to TTMSFNCUtils.GetJSONArraySize(jab) - 1 do\r\n begin\r\n joar := TTMSFNCUtils.GetJSONArrayItem(jab, j);\r\n if j = 0 then\r\n di.Coordinate.Longitude := TTMSFNCUtils.StrToFloatDot(joar.Value);\r\n if j = 1 then\r\n di.Coordinate.Latitude := TTMSFNCUtils.StrToFloatDot(joar.Value);\r\n end;\r\n end;\r\n end;\r\n end;\r\n end;\r\n finally\r\n o.Free;\r\n end;\r\n end;\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\nend.\r\n","{********************************************************************}\r\n{ }\r\n{ written by TMS Software }\r\n{ copyright (c) 2020 - 2024 }\r\n{ Email : info@tmssoftware.com }\r\n{ Web : http://www.tmssoftware.com }\r\n{ }\r\n{ The source code is given as is. The author is not responsible }\r\n{ for any possible damage done due to the use of this code. }\r\n{ The complete source code remains property of the author and may }\r\n{ not be distributed, published, given or sold in any form as such. }\r\n{ No parts of the source code can be included in any other component }\r\n{ or application without written authorization of the author. }\r\n{********************************************************************}\r\n\r\nunit WEBLib.TMSFNCGeocoding;\r\n\r\n{$I WEBLib.TMSFNCDefines.inc}\r\n\r\n{$IFDEF WEBLIB}\r\n{$DEFINE LCLWEBLIB}\r\n{$ENDIF}\r\n{$IFDEF LCLLIB}\r\n{$DEFINE LCLWEBLIB}\r\n{$ENDIF}\r\n\r\n{$IFNDEF LCLLIB}\r\n{$HINTS OFF}\r\n{$IF COMPILERVERSION > 23}\r\n{$DEFINE UNREGISTER}\r\n{$IFEND}\r\n{$HINTS ON}\r\n{$ENDIF}\r\n{$IFDEF LCLLIB}\r\n{$DEFINE UNREGISTER}\r\n{$ENDIF}\r\n\r\ninterface\r\n\r\nuses\r\n Classes, Types, WEBLib.Forms\r\n {$IFNDEF LCLWEBLIB}\r\n ,Generics.Collections\r\n {$ENDIF}\r\n {$IFDEF LCLLIB}\r\n ,fgl\r\n {$ENDIF}\r\n {$IFDEF WEBLIB}\r\n ,web, Contnrs, js\r\n {$ENDIF}\r\n {$IFDEF CMNLIB}\r\n {$ENDIF}\r\n ,WEBLib.TMSFNCTypes\r\n ,WEBLib.TMSFNCMapsCommonTypes\r\n ,WEBLib.TMSFNCCloudBase;\r\n\r\nconst\r\n TTMSFNCGeocodingDocURL = TTMSFNCBaseDocURL + 'tmsfncmaps/components/ttmsfncmaps/#ttmsfncgeocoding';\r\n TTMSFNCGeocodingTipsURL = 'https://www.tmssoftware.com/site/tmsfncmaps.asp?s=faq';\r\n\r\n MAJ_VER = 1; // Major version nr.\r\n MIN_VER = 5; // Minor version nr.\r\n REL_VER = 3; // Release nr.\r\n BLD_VER = 2; // Build nr.\r\n\r\n //v1.0.0.0: First release\r\n //v1.0.1.0: New: (Reverse)Geocoding result Status and ErrorMessage added\r\n //v1.1.0.0: New: Here geocoding service updated to Geocoding API v1\r\n //v1.2.0.0: New: Optional Locale parameter added\r\n // New: Province property added\r\n //v1.3.0.0: New: Support for OpenStreetMap Nominatim geocoding & reversegeocoding\r\n //v1.4.0.0: New: Support for OpenRouteService geocoding & reversegeocoding\r\n // Improved: OpenStreetMap address details\r\n //v1.5.0.0: New: Support for GeoApify geocoding & reversegeocoding\r\n //v1.5.1.0: New : Added Intersection address field\r\n //v1.5.2.0: New: Added Precision property for Google\r\n // : Fixed: Issue with returning postal code for Google\r\n //v1.5.2.1: Fixed: Issue with TomTom when no Locale specified\r\n //v1.5.2.2: Improved: OpenStreetMap error handling\r\n //v1.5.2.3: New: District address data added for Here maps\r\n //v1.5.3.0: New: StreetName property added\r\n //v1.5.3.1: Fixed: Issue with StreetName not properly implemented\r\n //v1.5.3.2: Improved: MapBox: Possible issue with parsing coordinates\r\n\r\ntype\r\n TTMSFNCCustomGeocoding = class;\r\n TTMSFNCGeocodingRequests = class;\r\n TTMSFNCGeocodingRequest = class;\r\n\r\n ITMSFNCCustomGeocodingProperties = interface(IInterface)\r\n ['{FE4F141C-69EA-4FBE-B5BF-1262F9EFBA70}']\r\n function GetAPIKey: string;\r\n end;\r\n\r\n ITMSFNCCustomGeocodingInstance = interface(IInterface)\r\n ['{25C43C12-543C-460C-A8EE-9010559E62AD}']\r\n procedure SetGeocodingProperties(const Value: ITMSFNCCustomGeocodingProperties);\r\n end;\r\n\r\n ITMSFNCCustomGeocoding = interface(IInterface)\r\n ['{FE8B5C56-279A-405B-94ED-ACDFC142CFEF}']\r\n function GetIdentifier: string;\r\n function GetRequestMethod: TTMSFNCCloudBaseRequestMethod;\r\n function GetHost: string;\r\n function GetReverseHost: string;\r\n function GetPath(AAddress: string = ''): string;\r\n function GetReversePath(ACoordinate: TTMSFNCMapsCoordinateRec): string;\r\n function GetQuery(AAddress: string; ALocale: string): string; overload;\r\n function GetQuery(ACoordinate: TTMSFNCMapsCoordinateRec; ALocale: string): string; overload;\r\n function GetPostData: string;\r\n procedure AddHeaders(AHeaders: TTMSFNCCloudBaseRequestHeaders);\r\n procedure Parse(ARequest: TTMSFNCGeocodingRequest; ARequestResult: string);\r\n function IsValid: Boolean;\r\n procedure DestroyGeocoding;\r\n end;\r\n\r\n ITMSFNCGeocodingService = interface(IInterface)\r\n ['{7B450AC9-7EE3-4D61-AFEA-6D0D1FF2B392}']\r\n function CreateGeocoding: ITMSFNCCustomGeocoding;\r\n procedure DestroyGeocoding(AGeocoding: ITMSFNCCustomGeocoding);\r\n end;\r\n\r\n ITMSFNCGeocodingServiceGoogle = interface(ITMSFNCGeocodingService)\r\n ['{88D1B5B9-DA7F-44EB-97C7-93C5EBDDEA83}']\r\n end;\r\n\r\n ITMSFNCGeocodingServiceHere = interface(ITMSFNCGeocodingService)\r\n ['{C08CBDEE-6884-4C81-A241-3B8E8EE1D6F2}']\r\n end;\r\n\r\n ITMSFNCGeocodingServiceBing = interface(ITMSFNCGeocodingService)\r\n ['{E03F86CE-3E36-43D9-AD79-4D9D1BFB5C22}']\r\n end;\r\n\r\n ITMSFNCGeocodingServiceAzure = interface(ITMSFNCGeocodingService)\r\n ['{541F996E-F3A7-4750-8E12-D95B091DB936}']\r\n end;\r\n\r\n ITMSFNCGeocodingServiceMapBox = interface(ITMSFNCGeocodingService)\r\n ['{496E6828-08F0-4E28-AB11-577069815E99}']\r\n end;\r\n\r\n ITMSFNCGeocodingServiceTomTom = interface(ITMSFNCGeocodingService)\r\n ['{95D7749D-DA80-45D3-B0E5-D21E7654FABA}']\r\n end;\r\n\r\n ITMSFNCGeocodingServiceOpenStreetMap = interface(ITMSFNCGeocodingService)\r\n ['{E2D4A08F-03F2-4A23-83AA-27E599E01C5A}']\r\n end;\r\n\r\n ITMSFNCGeocodingServiceOpenRouteService = interface(ITMSFNCGeocodingService)\r\n ['{CE13AC60-6343-4A53-8577-4A11D98F9136}']\r\n end;\r\n\r\n ITMSFNCGeocodingServiceGeoApify = interface(ITMSFNCGeocodingService)\r\n ['{BEAAE65C-C97B-4668-8C94-413F8C7987B8}']\r\n end;\r\n\r\n TTMSFNCGeocodingService = (gsGoogle, gsHere, gsBing, gsAzure, gsMapBox, gsTomTom, gsOpenStreetMap, gsOpenRouteService, gsGeoApify);\r\n TTMSFNCGeocodingPrecision = (gpRoofTop, gpRangeInterpolated, gpGeometricCenter, gpApproximate, gpUnknown);\r\n\r\n TTMSFNCGeocodingItem = class(TCollectionItem)\r\n private\r\n FOwner: TTMSFNCCustomGeocoding;\r\n FDataBoolean: Boolean;\r\n FDataString: String;\r\n FDataObject: TObject;\r\n FDataInteger: NativeInt;\r\n FDataPointer: Pointer;\r\n FAddress: string;\r\n FCoordinate: TTMSFNCMapsCoordinate;\r\n FStreet: string;\r\n FPostalCode: string;\r\n FCountry: string;\r\n FCountryCode: string;\r\n FRegion: string;\r\n FCity: string;\r\n FProvince: string;\r\n FProvinceCode: string;\r\n FRegionCode: string;\r\n FDistrict: string;\r\n FStreetNumber: string;\r\n FIntersection: string;\r\n FPrecision: TTMSFNCGeocodingPrecision;\r\n FStreetName: string;\r\n procedure SetCoordinate(const Value: TTMSFNCMapsCoordinate);\r\n public\r\n constructor Create(ACollection: TCollection); override;\r\n procedure Assign(Source: TPersistent); override;\r\n destructor Destroy; override;\r\n property DataPointer: Pointer read FDataPointer write FDataPointer;\r\n property DataBoolean: Boolean read FDataBoolean write FDataBoolean;\r\n property DataObject: TObject read FDataObject write FDataObject;\r\n property DataString: String read FDataString write FDataString;\r\n property DataInteger: NativeInt read FDataInteger write FDataInteger;\r\n published\r\n property Coordinate: TTMSFNCMapsCoordinate read FCoordinate write SetCoordinate;\r\n property Address: string read FAddress write FAddress;\r\n property City: string read FCity write FCity;\r\n property District: string read FDistrict write FDistrict;\r\n property Country: string read FCountry write FCountry;\r\n property CountryCode: string read FCountryCode write FCountryCode;\r\n property Province: string read FProvince write FProvince;\r\n property ProvinceCode: string read FProvinceCode write FProvinceCode;\r\n property Region: string read FRegion write FRegion;\r\n property RegionCode: string read FRegionCode write FRegionCode;\r\n property Street: string read FStreet write FStreet;\r\n property StreetName: string read FStreetName write FStreetName;\r\n property StreetNumber: string read FStreetNumber write FStreetNumber;\r\n property PostalCode: string read FPostalCode write FPostalCode;\r\n property Intersection: string read FIntersection write FIntersection;\r\n property Precision: TTMSFNCGeocodingPrecision read FPrecision write FPrecision;\r\n end;\r\n\r\n {$IFDEF WEBLIB}\r\n TTMSFNCGeocodingItems = class(TTMSFNCOwnedCollection)\r\n {$ELSE}\r\n TTMSFNCGeocodingItems = class({$IFDEF LCLLIB}specialize {$ENDIF}TTMSFNCOwnedCollection)\r\n {$ENDIF}\r\n private\r\n FOwner: TTMSFNCCustomGeocoding;\r\n function GetItem(Index: Integer): TTMSFNCGeocodingItem;\r\n procedure SetItem(Index: Integer; const Value: TTMSFNCGeocodingItem);\r\n protected\r\n function CreateItemClass: TCollectionItemClass; virtual;\r\n function GetOwner: TPersistent; override;\r\n public\r\n constructor Create(AOwner: TTMSFNCCustomGeocoding); virtual;\r\n property Items[Index: Integer]: TTMSFNCGeocodingItem read GetItem write SetItem; default;\r\n function Add: TTMSFNCGeocodingItem;\r\n function Insert(Index: Integer): TTMSFNCGeocodingItem;\r\n end;\r\n\r\n TTMSFNCGeocodingRequest = class(TCollectionItem)\r\n private\r\n FOwner: TTMSFNCCustomGeocoding;\r\n FDataPointer: Pointer;\r\n FDataBoolean: Boolean;\r\n FDataString: String;\r\n FDataObject: TObject;\r\n FDataInteger: NativeInt;\r\n FItems: TTMSFNCGeocodingItems;\r\n FID: string;\r\n FStatus: string;\r\n FErrorMessage: string;\r\n procedure SetItems(const Value: TTMSFNCGeocodingItems);\r\n procedure SetErrorMessage(const Value: string);\r\n procedure SetStatus(const Value: string);\r\n function GetFirst: TTMSFNCGeocodingItem;\r\n public\r\n constructor Create(ACollection: TCollection); override;\r\n procedure Assign(Source: TPersistent); override;\r\n destructor Destroy; override;\r\n property DataPointer: Pointer read FDataPointer write FDataPointer;\r\n property DataBoolean: Boolean read FDataBoolean write FDataBoolean;\r\n property DataObject: TObject read FDataObject write FDataObject;\r\n property DataString: String read FDataString write FDataString;\r\n property DataInteger: NativeInt read FDataInteger write FDataInteger;\r\n property First: TTMSFNCGeocodingItem read GetFirst;\r\n published\r\n property ID: string read FID;\r\n property Items: TTMSFNCGeocodingItems read FItems write SetItems;\r\n property Status: string read FStatus write SetStatus;\r\n property ErrorMessage: string read FErrorMessage write SetErrorMessage;\r\n end;\r\n\r\n {$IFDEF WEBLIB}\r\n TTMSFNCGeocodingRequests = class(TTMSFNCOwnedCollection)\r\n {$ELSE}\r\n TTMSFNCGeocodingRequests = class({$IFDEF LCLLIB}specialize {$ENDIF}TTMSFNCOwnedCollection)\r\n {$ENDIF}\r\n private\r\n FOwner: TTMSFNCCustomGeocoding;\r\n function GetItem(Index: Integer): TTMSFNCGeocodingRequest;\r\n procedure SetItem(Index: Integer; const Value: TTMSFNCGeocodingRequest);\r\n protected\r\n function CreateItemClass: TCollectionItemClass; virtual;\r\n function GetOwner: TPersistent; override;\r\n public\r\n constructor Create(AOwner: TTMSFNCCustomGeocoding); virtual;\r\n property Items[Index: Integer]: TTMSFNCGeocodingRequest read GetItem write SetItem; default;\r\n function Add: TTMSFNCGeocodingRequest;\r\n function Insert(Index: Integer): TTMSFNCGeocodingRequest;\r\n end;\r\n\r\n { TTMSFNCCustomGeocoding }\r\n\r\n TTMSFNCGeocodingGetGeocodingCallBack = {$IFNDEF LCLLIB}reference to {$ENDIF}procedure(const ARequest: TTMSFNCGeocodingRequest; const ARequestResult: TTMSFNCCloudBaseRequestResult){$IFDEF LCLLIB} of object{$ENDIF};\r\n TTMSFNCGeocodingGetGeocodingEvent = procedure(Sender: TObject; const ARequest: TTMSFNCGeocodingRequest; const ARequestResult: TTMSFNCCloudBaseRequestResult) of object;\r\n\r\n TTMSFNCGeocodingGetGeocodingResultCallBack = {$IFNDEF LCLLIB}reference to {$ENDIF}procedure(const AResult: TTMSFNCGeocodingRequest){$IFDEF LCLLIB} of object{$ENDIF};\r\n TTMSFNCGeocodingGetGeocodingResultEvent = procedure(Sender: TObject; const AResult: TTMSFNCGeocodingRequest) of object;\r\n\r\n TTMSFNCGeocodingGetReverseGeocodingCallBack = {$IFNDEF LCLLIB}reference to {$ENDIF}procedure(const ARequest: TTMSFNCGeocodingRequest; const ARequestResult: TTMSFNCCloudBaseRequestResult){$IFDEF LCLLIB} of object{$ENDIF};\r\n TTMSFNCGeocodingGetReverseGeocodingEvent = procedure(Sender: TObject; const ARequest: TTMSFNCGeocodingRequest; const ARequestResult: TTMSFNCCloudBaseRequestResult) of object;\r\n\r\n TTMSFNCGeocodingGetReverseGeocodingResultCallBack = {$IFNDEF LCLLIB}reference to {$ENDIF}procedure(const AResult: TTMSFNCGeocodingRequest){$IFDEF LCLLIB} of object{$ENDIF};\r\n TTMSFNCGeocodingGetReverseGeocodingResultEvent = procedure(Sender: TObject; const AResult: TTMSFNCGeocodingRequest) of object;\r\n\r\n TTMSFNCGeocodingCallBackWrapper = class\r\n private\r\n FCallback: TTMSFNCGeocodingGetGeocodingCallBack;\r\n public\r\n constructor Create(ACallback: TTMSFNCGeocodingGetGeocodingCallBack);\r\n end;\r\n\r\n TTMSFNCGeocodingResultCallBackWrapper = class\r\n private\r\n FCallback: TTMSFNCGeocodingGetGeocodingResultCallBack;\r\n public\r\n constructor Create(ACallback: TTMSFNCGeocodingGetGeocodingResultCallBack);\r\n end;\r\n\r\n TTMSFNCReverseGeocodingCallBackWrapper = class\r\n private\r\n FCallback: TTMSFNCGeocodingGetReverseGeocodingCallBack;\r\n public\r\n constructor Create(ACallback: TTMSFNCGeocodingGetReverseGeocodingCallBack);\r\n end;\r\n\r\n TTMSFNCReverseGeocodingResultCallBackWrapper = class\r\n private\r\n FCallback: TTMSFNCGeocodingGetReverseGeocodingResultCallBack;\r\n public\r\n constructor Create(ACallback: TTMSFNCGeocodingGetReverseGeocodingResultCallBack);\r\n end;\r\n\r\n TTMSFNCCustomGeocoding = class(TTMSFNCCloudBase, ITMSFNCCustomGeocodingProperties)\r\n private\r\n FGeocoding: ITMSFNCCustomGeocoding;\r\n FGeocodingInstance: ITMSFNCCustomGeocodingInstance;\r\n FGeocodingProperties: ITMSFNCCustomGeocodingProperties;\r\n FService: TTMSFNCGeocodingService;\r\n FAPIKey: string;\r\n FGeocodingRequests: TTMSFNCGeocodingRequests;\r\n FOnGetGeocoding: TTMSFNCGeocodingGetGeocodingEvent;\r\n FOnGetGeocodingInternal: TTMSFNCGeocodingGetGeocodingEvent;\r\n FOnGetReverseGeocodingInternal: TTMSFNCGeocodingGetReverseGeocodingEvent;\r\n FOnGetReverseGeocoding: TTMSFNCGeocodingGetReverseGeocodingEvent;\r\n FOnGetGeocodingResult: TTMSFNCGeocodingGetGeocodingResultEvent;\r\n FOnGetReverseGeocodingResultInternal: TTMSFNCGeocodingGetReverseGeocodingResultEvent;\r\n FOnGetReverseGeocodingResult: TTMSFNCGeocodingGetReverseGeocodingResultEvent;\r\n FOnGetGeocodingResultInternal: TTMSFNCGeocodingGetGeocodingResultEvent;\r\n procedure SetService(const Value: TTMSFNCGeocodingService);\r\n procedure SetAPIKey(const Value: string);\r\n procedure SetGeocodingRequests(const Value: TTMSFNCGeocodingRequests);\r\n protected\r\n procedure InternalGetGeocoding(AAddress: string; ACallback: TTMSFNCGeocodingGetGeocodingCallBack = nil; ACallback2: TTMSFNCGeocodingGetGeocodingResultCallBack = nil; AID: string = ''; ADataPointer: Pointer = nil; ALocale: string = ''; AMode: TTMSFNCMapsLocaleMode = mlmDefault); overload; virtual;\r\n procedure InternalGetReverseGeocoding(ACoordinate: TTMSFNCMapsCoordinateRec; ACallback: TTMSFNCGeocodingGetReverseGeocodingCallBack = nil; ACallback2: TTMSFNCGeocodingGetReverseGeocodingResultCallBack = nil; AID: string = ''; ADataPointer: Pointer = nil; ALocale: string = ''; AMode: TTMSFNCMapsLocaleMode = mlmDefault); overload; virtual;\r\n\r\n function InternalGetGeocodingSync(AAddress: string; ALocale: string = ''; AMode: TTMSFNCMapsLocaleMode = mlmDefault): {$IFDEF WEBLIB}TJSPromise{$ELSE}TTMSFNCMapsCoordinateRec{$ENDIF}; virtual;\r\n function InternalGetReverseGeocodingSync(ACoordinate: TTMSFNCMapsCoordinateRec; ALocale: string = ''; AMode: TTMSFNCMapsLocaleMode = mlmDefault): {$IFDEF WEBLIB}TJSPromise{$ELSE}string{$ENDIF}; virtual;\r\n procedure DoRequestGetGeocoding(const ARequestResult: TTMSFNCCloudBaseRequestResult);\r\n procedure DoGetGeocoding(const ARequest: TTMSFNCGeocodingRequest; const ARequestResult: TTMSFNCCloudBaseRequestResult);\r\n procedure DoGetReverseGeocoding(const ARequest: TTMSFNCGeocodingRequest; const ARequestResult: TTMSFNCCloudBaseRequestResult);\r\n property OnGetGeocoding: TTMSFNCGeocodingGetGeocodingEvent read FOnGetGeocoding write FOnGetGeocoding;\r\n property OnGetGeocodingInternal: TTMSFNCGeocodingGetGeocodingEvent read FOnGetGeocodingInternal write FOnGetGeocodingInternal;\r\n property OnGetReverseGeocoding: TTMSFNCGeocodingGetReverseGeocodingEvent read FOnGetReverseGeocoding write FOnGetReverseGeocoding;\r\n property OnGetReverseGeocodingInternal: TTMSFNCGeocodingGetReverseGeocodingEvent read FOnGetReverseGeocodingInternal write FOnGetReverseGeocodingInternal;\r\n\r\n property OnGetGeocodingResult: TTMSFNCGeocodingGetGeocodingResultEvent read FOnGetGeocodingResult write FOnGetGeocodingResult;\r\n property OnGetGeocodingResultInternal: TTMSFNCGeocodingGetGeocodingResultEvent read FOnGetGeocodingResultInternal write FOnGetGeocodingResultInternal;\r\n property OnGetReverseGeocodingResult: TTMSFNCGeocodingGetReverseGeocodingResultEvent read FOnGetReverseGeocodingResult write FOnGetReverseGeocodingResult;\r\n property OnGetReverseGeocodingResultInternal: TTMSFNCGeocodingGetReverseGeocodingResultEvent read FOnGetReverseGeocodingResultInternal write FOnGetReverseGeocodingResultInternal;\r\n\r\n procedure InitializeGeocoding; virtual;\r\n function GetInstance: NativeUInt; override;\r\n function GetGeocodingRequests: TTMSFNCGeocodingRequests;\r\n function GeocodingReady: Boolean;\r\n function GetAPIKey: string;\r\n function GetVersionNr: Integer;\r\n function GetDocURL: string; override;\r\n function GetTipsURL: string; override;\r\n function Geocoding: ITMSFNCCustomGeocoding;\r\n function GetVersion: string; override;\r\n property Service: TTMSFNCGeocodingService read FService write SetService default gsGoogle;\r\n property APIKey: string read FAPIKey write SetAPIKey;\r\n property GeocodingRequests: TTMSFNCGeocodingRequests read FGeocodingRequests write SetGeocodingRequests;\r\n\r\n property GeocodingInstance: ITMSFNCCustomGeocoding read FGeocoding;\r\n property GeocodingProperties: ITMSFNCCustomGeocodingProperties read FGeocodingProperties;\r\n public\r\n procedure Assign(Source: TPersistent); override;\r\n constructor Create(AOwner: TComponent); override;\r\n destructor Destroy; override;\r\n procedure GetGeocoding(AAddress: string; ACallback: TTMSFNCGeocodingGetGeocodingCallBack = nil; AID: string = ''; ADataPointer: Pointer = nil; ALocale: string = ''; AMode: TTMSFNCMapsLocaleMode = mlmDefault); overload; virtual;\r\n procedure GetReverseGeocoding(ACoordinate: TTMSFNCMapsCoordinateRec; ACallback: TTMSFNCGeocodingGetReverseGeocodingCallBack = nil; AID: string = ''; ADataPointer: Pointer = nil; ALocale: string = ''; AMode: TTMSFNCMapsLocaleMode = mlmDefault); overload; virtual;\r\n procedure GetGeocodingResult(AAddress: string; ACallback: TTMSFNCGeocodingGetGeocodingResultCallBack = nil; AID: string = ''; ADataPointer: Pointer = nil; ALocale: string = ''; AMode: TTMSFNCMapsLocaleMode = mlmDefault); overload; virtual;\r\n procedure GetReverseGeocodingResult(ACoordinate: TTMSFNCMapsCoordinateRec; ACallback: TTMSFNCGeocodingGetReverseGeocodingResultCallBack = nil; AID: string = ''; ADataPointer: Pointer = nil; ALocale: string = ''; AMode: TTMSFNCMapsLocaleMode = mlmDefault); overload; virtual;\r\n function GetGeocodingSync(AAddress: string; ALocale: string = ''; AMode: TTMSFNCMapsLocaleMode = mlmDefault): TTMSFNCMapsCoordinateRec; virtual; {$IFDEF WEBLIB}async;{$ENDIF}\r\n function GetReverseGeocodingSync(ACoordinate: TTMSFNCMapsCoordinateRec; ALocale: string = ''; AMode: TTMSFNCMapsLocaleMode = mlmDefault): string; virtual; {$IFDEF WEBLIB} async;{$ENDIF}\r\n end;\r\n\r\n TTMSFNCCustomGeocodingInterfacedObject = class(TInterfacedObject, ITMSFNCCustomGeocodingInstance)\r\n private\r\n FGeocodingProperties: ITMSFNCCustomGeocodingProperties;\r\n function GetGeocodingProperties: ITMSFNCCustomGeocodingProperties;\r\n protected\r\n procedure SetGeocodingProperties(const Value: ITMSFNCCustomGeocodingProperties);\r\n public\r\n property GeocodingProperties: ITMSFNCCustomGeocodingProperties read GetGeocodingProperties;\r\n destructor Destroy; override;\r\n end;\r\n\r\n {$IFDEF WEBLIB}\r\n TTMSFNCGeocodingList = class(TList)\r\n private\r\n function GetItem(Index: Integer): ITMSFNCCustomGeocoding;\r\n procedure SetItem(Index: Integer; const Value: ITMSFNCCustomGeocoding);\r\n public\r\n property Items[Index: Integer]: ITMSFNCCustomGeocoding read GetItem write SetItem; default;\r\n end;\r\n {$ENDIF}\r\n {$IFNDEF WEBLIB}\r\n TTMSFNCGeocodingList = class(TList);\r\n {$ENDIF}\r\n\r\n TTMSFNCGeocodingFactoryService = class(TInterfacedObject, ITMSFNCGeocodingService)\r\n private\r\n FGeocoding: TTMSFNCGeocodingList;\r\n protected\r\n function DoCreateGeocoding: ITMSFNCCustomGeocoding; virtual; abstract;\r\n function CreateGeocoding: ITMSFNCCustomGeocoding;\r\n procedure DestroyGeocoding(AGeocoding: ITMSFNCCustomGeocoding);\r\n public\r\n constructor Create;\r\n destructor Destroy; override;\r\n end;\r\n\r\n {$IFNDEF LCLLIB}\r\n {$HINTS OFF}\r\n {$IF COMPILERVERSION > 22}\r\n {$IFNDEF LCLLIB}\r\n [ComponentPlatformsAttribute(TMSPlatformsWeb)]\r\n {$ENDIF}\r\n {$IFEND}\r\n {$HINTS ON}\r\n {$ENDIF}\r\n TTMSFNCGeocoding = class(TTMSFNCCustomGeocoding)\r\n protected\r\n procedure RegisterRuntimeClasses; override;\r\n public\r\n property GeocodingInstance;\r\n property GeocodingProperties;\r\n published\r\n property OnGetReverseGeocoding;\r\n property OnGetGeocoding;\r\n property OnGetReverseGeocodingResult;\r\n property OnGetGeocodingResult;\r\n property APIKey;\r\n property GeocodingRequests;\r\n property Service;\r\n property Version;\r\n end;\r\n\r\n TTMSFNCGeocodingPlatformServicesService = class\r\n private\r\n FInterface: IInterface;\r\n FGUID: string;\r\n public\r\n constructor Create(AGUID: string; AInterface: IInterface);\r\n property GUID: string read FGUID;\r\n property &Interface: IInterface read FInterface;\r\n end;\r\n\r\n {$IFDEF WEBLIB}\r\n TTMSFNCGeocodingPlatformServicesList = class(TObjectList)\r\n private\r\n function GetItem(Index: Integer): TTMSFNCGeocodingPlatformServicesService;\r\n procedure SetItem(Index: Integer; const Value: TTMSFNCGeocodingPlatformServicesService);\r\n public\r\n property Items[Index: Integer]: TTMSFNCGeocodingPlatformServicesService read GetItem write SetItem; default;\r\n {$ENDIF}\r\n {$IFNDEF WEBLIB}\r\n TTMSFNCGeocodingPlatformServicesList = class(TObjectList)\r\n {$ENDIF}\r\n private\r\n function GetValue(AGUID: string): IInterface;\r\n public\r\n function ContainsKey(AGUID: string): Boolean;\r\n procedure RemoveByGUID(AGUID: string);\r\n property Interfaces[AGUID: string]: IInterface read GetValue;\r\n end;\r\n\r\n TTMSFNCGeocodingPlatformServices = class\r\n private\r\n FServicesList: TTMSFNCGeocodingPlatformServicesList;\r\n class var FCurrent: TTMSFNCGeocodingPlatformServices;\r\n class var FCurrentReleased: Boolean;\r\n{$IFNDEF AUTOREFCOUNT}\r\n class procedure ReleaseCurrent;\r\n{$ENDIF}\r\n public\r\n constructor Create;\r\n destructor Destroy; override;\r\n procedure AddPlatformService(const AServiceGUID: TGUID; const AService: IInterface);\r\n procedure RemovePlatformService(const AServiceGUID: TGUID);\r\n function GetPlatformService(const AServiceGUID: TGUID): IInterface;\r\n function SupportsPlatformService(const AServiceGUID: TGUID): Boolean; overload;\r\n function SupportsPlatformService(const AServiceGUID: TGUID; var AService: IInterface): Boolean; overload;\r\n class function Current: TTMSFNCGeocodingPlatformServices;\r\n end;\r\n\r\nimplementation\r\n\r\nuses\r\n {$IFDEF MSWINDOWS}\r\n Windows, Registry,\r\n {$ENDIF}\r\n {%H-}Math,\r\n WEBLib.TMSFNCUtils,\r\n WEBLib.TMSFNCGeocoding.Google,\r\n WEBLib.TMSFNCGeocoding.Here,\r\n WEBLib.TMSFNCGeocoding.Bing,\r\n WEBLib.TMSFNCGeocoding.Azure,\r\n WEBLib.TMSFNCGeocoding.MapBox,\r\n WEBLib.TMSFNCGeocoding.TomTom,\r\n WEBLib.TMSFNCGeocoding.OpenStreetMap,\r\n WEBLib.TMSFNCGeocoding.OpenRouteService,\r\n WEBLib.TMSFNCGeocoding.GeoApify,\r\n SysUtils\r\n {$IFDEF FMXLIB}\r\n ,FMX.Types\r\n {$ENDIF}\r\n ;\r\n\r\n{ TTMSFNCCustomGeocoding }\r\n\r\nfunction TTMSFNCCustomGeocoding.GetAPIKey: string;\r\nbegin\r\n Result := APIKey;\r\nend;\r\n\r\nfunction TTMSFNCCustomGeocoding.GetDocURL: string;\r\nbegin\r\n Result := TTMSFNCGeocodingDocURL;\r\nend;\r\n\r\nfunction TTMSFNCCustomGeocoding.GetVersion: string;\r\nvar\r\n vn: Integer;\r\nbegin\r\n vn := GetVersionNr;\r\n Result := IntToStr(Hi(Hiword(vn)))+'.'+IntToStr(Lo(Hiword(vn)))+'.'+IntToStr(Hi(Loword(vn)))+'.'+IntToStr(Lo(Loword(vn)));\r\nend;\r\n\r\nfunction TTMSFNCCustomGeocoding.GetVersionNr: Integer;\r\nbegin\r\n Result := MakeLong(MakeWord(BLD_VER,REL_VER),MakeWord(MIN_VER,MAJ_VER));\r\nend;\r\n\r\nprocedure TTMSFNCCustomGeocoding.Assign(Source: TPersistent);\r\nbegin\r\n inherited;\r\n if (Source is TTMSFNCCustomGeocoding) then\r\n begin\r\n FService := (Source as TTMSFNCCustomGeocoding).Service;\r\n FAPIKey := (Source as TTMSFNCCustomGeocoding).APIKey;\r\n FGeocodingRequests.Assign((Source as TTMSFNCCustomGeocoding).GeocodingRequests);\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomGeocoding.GetGeocoding(AAddress: string;\r\n ACallback: TTMSFNCGeocodingGetGeocodingCallBack = nil; AID: string = ''; ADataPointer: Pointer = nil;\r\n ALocale: string = ''; AMode: TTMSFNCMapsLocaleMode = mlmDefault);\r\nbegin\r\n InternalGetGeocoding(AAddress, ACallBack, nil, AID, ADataPointer, ALocale, AMode);\r\nend;\r\n\r\nprocedure TTMSFNCCustomGeocoding.InternalGetGeocoding(AAddress: string;\r\n ACallback: TTMSFNCGeocodingGetGeocodingCallBack = nil; ACallback2: TTMSFNCGeocodingGetGeocodingResultCallBack = nil; AID: string = ''; ADataPointer: Pointer = nil;\r\n ALocale: string = ''; AMode: TTMSFNCMapsLocaleMode = mlmDefault);\r\nbegin\r\n if not GeocodingReady then\r\n begin\r\n raise Exception.Create('Please set API key!');\r\n Exit;\r\n end;\r\n\r\n Request.Clear;\r\n Request.ClearHeaders;\r\n FGeocoding.AddHeaders(Request.Headers);\r\n Request.Name := 'GET GEOCODING';\r\n Request.DataString := AID;\r\n Request.DataPointer := ADataPointer;\r\n\r\n if Assigned(ACallback) then\r\n Request.DataObject := TTMSFNCGeocodingCallBackWrapper.Create(ACallback)\r\n else if Assigned(ACallback2) then\r\n Request.DataObject := TTMSFNCGeocodingResultCallBackWrapper.Create(ACallback2);\r\n\r\n Request.Method := FGeocoding.GetRequestMethod;\r\n Request.Host := FGeocoding.GetHost;\r\n Request.Path := FGeocoding.GetPath(TTMSFNCUtils.URLEncode(AAddress));\r\n Request.Query := FGeocoding.GetQuery(TTMSFNCUtils.URLEncode(AAddress), ParseLocale(ALocale, AMode));\r\n Request.PostData := FGeocoding.GetPostData;\r\n\r\n ExecuteRequest({$IFDEF LCLWEBLIB}@{$ENDIF}DoRequestGetGeocoding);\r\nend;\r\n\r\nprocedure TTMSFNCCustomGeocoding.GetGeocodingResult(AAddress: string;\r\n ACallback: TTMSFNCGeocodingGetGeocodingResultCallBack = nil; AID: string = ''; ADataPointer: Pointer = nil;\r\n ALocale: string = ''; AMode: TTMSFNCMapsLocaleMode = mlmDefault);\r\nbegin\r\n InternalGetGeocoding(AAddress, nil, ACallBack, AID, ADataPointer, ALocale, AMode);\r\nend;\r\n\r\nfunction TTMSFNCCustomGeocoding.GetGeocodingRequests: TTMSFNCGeocodingRequests;\r\nbegin\r\n Result := GeocodingRequests;\r\nend;\r\n\r\nfunction TTMSFNCCustomGeocoding.GetGeocodingSync(AAddress, ALocale: string;\r\n AMode: TTMSFNCMapsLocaleMode): TTMSFNCMapsCoordinateRec; {$IFDEF WEBLIB}async;{$ENDIF}\r\nbegin\r\n Result := {$IFDEF WEBLIB}await(TTMSFNCMapsCoordinateRec,{$ENDIF} InternalGetGeocodingSync(AAddress, ALocale, AMode){$IFDEF WEBLIB}){$ENDIF};\r\nend;\r\n\r\nfunction TTMSFNCCustomGeocoding.InternalGetGeocodingSync(AAddress, ALocale: string;\r\n AMode: TTMSFNCMapsLocaleMode): {$IFDEF WEBLIB}TJSPromise{$ELSE}TTMSFNCMapsCoordinateRec{$ENDIF};\r\nvar\r\n req: TTMSFNCGeocodingRequest;\r\nbegin\r\n if not GeocodingReady then\r\n begin\r\n raise Exception.Create('Please set API key!');\r\n Exit;\r\n end;\r\n\r\n {$IFDEF WEBLIB}\r\n Result := TJSPromise.New(\r\n procedure(AResolve, AReject : TJSPromiseResolver)\r\n begin\r\n GetGeocoding(AAddress,\r\n procedure(const ARequest: TTMSFNCGeocodingRequest; const ARequestResult: TTMSFNCCloudBaseRequestResult)\r\n var\r\n c: TTMSFNCMapsCoordinateRec;\r\n begin\r\n c := EmptyCoordinate;\r\n if ARequest.Items.Count > 0 then\r\n c := ARequest.Items[0].Coordinate.ToRec;\r\n\r\n AResolve(c);\r\n end, '', nil, ALocale, AMode);\r\n end);\r\n {$ELSE}\r\n Result := EmptyCoordinate;\r\n Request.Clear;\r\n Request.ClearHeaders;\r\n FGeocoding.AddHeaders(Request.Headers);\r\n Request.Name := 'GET GEOCODING SYNC';\r\n\r\n Request.Method := FGeocoding.GetRequestMethod;\r\n Request.Host := FGeocoding.GetHost;\r\n Request.Path := FGeocoding.GetPath(TTMSFNCUtils.URLEncode(AAddress));\r\n Request.Query := FGeocoding.GetQuery(TTMSFNCUtils.URLEncode(AAddress), ParseLocale(ALocale, AMode));\r\n Request.PostData := FGeocoding.GetPostData;\r\n\r\n ExecuteRequest(nil, nil, False);\r\n if Assigned(RequestResult) then\r\n begin\r\n req := GeocodingRequests.Add;\r\n FGeocoding.Parse(req, RequestResult.ResultString);\r\n DoGetGeocoding(req, RequestResult);\r\n if req.Items.Count > 0 then\r\n Result := req.Items[0].Coordinate.ToRec;\r\n end;\r\n {$ENDIF}\r\nend;\r\n\r\nfunction TTMSFNCCustomGeocoding.GetInstance: NativeUInt;\r\nbegin\r\n Result := HInstance;\r\nend;\r\n\r\nprocedure TTMSFNCCustomGeocoding.GetReverseGeocoding(ACoordinate: TTMSFNCMapsCoordinateRec;\r\n ACallback: TTMSFNCGeocodingGetReverseGeocodingCallBack = nil; AID: string = ''; ADataPointer: Pointer = nil;\r\n ALocale: string = ''; AMode: TTMSFNCMapsLocaleMode = mlmDefault);\r\nbegin\r\n InternalGetReverseGeocoding(ACoordinate, ACallback, nil, AID, ADataPointer, ALocale, AMode);\r\nend;\r\n\r\nprocedure TTMSFNCCustomGeocoding.InternalGetReverseGeocoding(ACoordinate: TTMSFNCMapsCoordinateRec;\r\n ACallback: TTMSFNCGeocodingGetReverseGeocodingCallBack = nil; ACallback2: TTMSFNCGeocodingGetReverseGeocodingResultCallBack = nil; AID: string = ''; ADataPointer: Pointer = nil;\r\n ALocale: string = ''; AMode: TTMSFNCMapsLocaleMode = mlmDefault);\r\nbegin\r\n if not GeocodingReady then\r\n begin\r\n raise Exception.Create('Please set API key!');\r\n Exit;\r\n end;\r\n\r\n Request.Clear;\r\n Request.ClearHeaders;\r\n FGeocoding.AddHeaders(Request.Headers);\r\n Request.Name := 'GET REVERSEGEOCODING';\r\n Request.DataString := AID;\r\n Request.DataPointer := ADataPointer;\r\n Request.DataBoolean := True;\r\n\r\n if Assigned(ACallback) then\r\n Request.DataObject := TTMSFNCReverseGeocodingCallBackWrapper.Create(ACallback)\r\n else if Assigned(ACallback2) then\r\n Request.DataObject := TTMSFNCReverseGeocodingResultCallBackWrapper.Create(ACallback2);\r\n\r\n Request.Method := FGeocoding.GetRequestMethod;\r\n Request.Host := FGeocoding.GetReverseHost;\r\n Request.Path := FGeocoding.GetReversePath(ACoordinate);\r\n Request.Query := FGeocoding.GetQuery(ACoordinate, ParseLocale(ALocale, AMode));\r\n Request.PostData := FGeocoding.GetPostData;\r\n ExecuteRequest({$IFDEF LCLWEBLIB}@{$ENDIF}DoRequestGetGeocoding);\r\nend;\r\n\r\nprocedure TTMSFNCCustomGeocoding.GetReverseGeocodingResult(ACoordinate: TTMSFNCMapsCoordinateRec;\r\n ACallback: TTMSFNCGeocodingGetReverseGeocodingResultCallBack = nil; AID: string = ''; ADataPointer: Pointer = nil;\r\n ALocale: string = ''; AMode: TTMSFNCMapsLocaleMode = mlmDefault);\r\nbegin\r\n InternalGetReverseGeocoding(ACoordinate, nil, ACallback, AID, ADataPointer, ALocale, AMode);\r\nend;\r\n\r\nfunction TTMSFNCCustomGeocoding.GetReverseGeocodingSync(\r\n ACoordinate: TTMSFNCMapsCoordinateRec; ALocale: string;\r\n AMode: TTMSFNCMapsLocaleMode): string;{$IFDEF WEBLIB}async;{$ENDIF}\r\nbegin\r\n Result := {$IFDEF WEBLIB}await(string,{$ENDIF} InternalGetReverseGeocodingSync(ACoordinate, ALocale, AMode){$IFDEF WEBLIB}){$ENDIF};\r\nend;\r\n\r\nfunction TTMSFNCCustomGeocoding.InternalGetReverseGeocodingSync(\r\n ACoordinate: TTMSFNCMapsCoordinateRec; ALocale: string;\r\n AMode: TTMSFNCMapsLocaleMode): {$IFDEF WEBLIB}TJSPromise{$ELSE}string{$ENDIF};\r\nvar\r\n req: TTMSFNCGeocodingRequest;\r\nbegin\r\n if not GeocodingReady then\r\n begin\r\n raise Exception.Create('Please set API key!');\r\n Exit;\r\n end;\r\n\r\n {$IFDEF WEBLIB}\r\n Result := TJSPromise.New(\r\n procedure(AResolve, AReject : TJSPromiseResolver)\r\n begin\r\n GetReverseGeocoding(ACoordinate,\r\n procedure(const ARequest: TTMSFNCGeocodingRequest; const ARequestResult: TTMSFNCCloudBaseRequestResult)\r\n var\r\n s: string;\r\n begin\r\n s := '';\r\n if ARequest.Items.Count > 0 then\r\n s := ARequest.Items[0].Address;\r\n\r\n AResolve(s);\r\n end, '', nil, ALocale, AMode);\r\n end);\r\n\r\n {$ELSE}\r\n Result := '';\r\n Request.Clear;\r\n Request.ClearHeaders;\r\n FGeocoding.AddHeaders(Request.Headers);\r\n Request.Name := 'GET REVERSEGEOCODING SYNC';\r\n\r\n Request.Method := FGeocoding.GetRequestMethod;\r\n Request.Host := FGeocoding.GetReverseHost;\r\n Request.Path := FGeocoding.GetReversePath(ACoordinate);\r\n Request.Query := FGeocoding.GetQuery(ACoordinate, ParseLocale(ALocale, AMode));\r\n Request.PostData := FGeocoding.GetPostData;\r\n ExecuteRequest(nil, nil, False);\r\n if Assigned(RequestResult) then\r\n begin\r\n req := GeocodingRequests.Add;\r\n FGeocoding.Parse(req, RequestResult.ResultString);\r\n DoGetReverseGeocoding(req, RequestResult);\r\n if req.Items.Count > 0 then\r\n Result := req.Items[0].Address;\r\n end;\r\n {$ENDIF}\r\nend;\r\n\r\nfunction TTMSFNCCustomGeocoding.GetTipsURL: string;\r\nbegin\r\n Result := TTMSFNCGeocodingTipsURL;\r\nend;\r\n\r\nconstructor TTMSFNCCustomGeocoding.Create(AOwner: TComponent);\r\nbegin\r\n inherited;\r\n Supports(Self, ITMSFNCCustomGeocodingProperties, FGeocodingProperties);\r\n FGeocodingRequests := TTMSFNCGeocodingRequests.Create(Self);\r\n InitializeGeocoding;\r\nend;\r\n\r\nprocedure TTMSFNCCustomGeocoding.InitializeGeocoding;\r\nvar\r\n GeocodingServiceGoogleGeocoding: ITMSFNCGeocodingServiceGoogle;\r\n GeocodingServiceHereGeocoding: ITMSFNCGeocodingServiceHere;\r\n GeocodingServiceBingGeocoding: ITMSFNCGeocodingServiceBing;\r\n GeocodingServiceAzureGeocoding: ITMSFNCGeocodingServiceAzure;\r\n GeocodingServiceMapBoxGeocoding: ITMSFNCGeocodingServiceMapBox;\r\n GeocodingServiceTomTomGeocoding: ITMSFNCGeocodingServiceTomTom;\r\n GeocodingServiceOpenStreetMapGeocoding: ITMSFNCGeocodingServiceOpenStreetMap;\r\n GeocodingServiceOpenRouteServiceGeocoding: ITMSFNCGeocodingServiceOpenRouteService;\r\n GeocodingServiceGeoApifyGeocoding: ITMSFNCGeocodingServiceGeoApify;\r\nbegin\r\n if IsDestroying then\r\n Exit;\r\n\r\n if Assigned(FGeocoding) then\r\n FGeocoding.DestroyGeocoding;\r\n\r\n FGeocoding := nil;\r\n FGeocodingInstance := nil;\r\n\r\n case Service of\r\n gsGoogle:\r\n begin\r\n if TTMSFNCGeocodingPlatformServices.Current.SupportsPlatformService(ITMSFNCGeocodingServiceGoogle, IInterface(GeocodingServiceGoogleGeocoding)) then\r\n FGeocoding := GeocodingServiceGoogleGeocoding.CreateGeocoding;\r\n end;\r\n gsHere:\r\n begin\r\n if TTMSFNCGeocodingPlatformServices.Current.SupportsPlatformService(ITMSFNCGeocodingServiceHere, IInterface(GeocodingServiceHereGeocoding)) then\r\n FGeocoding := GeocodingServiceHereGeocoding.CreateGeocoding;\r\n end;\r\n gsBing:\r\n begin\r\n if TTMSFNCGeocodingPlatformServices.Current.SupportsPlatformService(ITMSFNCGeocodingServiceBing, IInterface(GeocodingServiceBingGeocoding)) then\r\n FGeocoding := GeocodingServiceBingGeocoding.CreateGeocoding;\r\n TTMSFNCUtils.Log('The Bing Geocoding service is deprecated. It is recommend to use a different service.');\r\n end;\r\n gsAzure:\r\n begin\r\n if TTMSFNCGeocodingPlatformServices.Current.SupportsPlatformService(ITMSFNCGeocodingServiceAzure, IInterface(GeocodingServiceAzureGeocoding)) then\r\n FGeocoding := GeocodingServiceAzureGeocoding.CreateGeocoding;\r\n end;\r\n gsMapBox:\r\n begin\r\n if TTMSFNCGeocodingPlatformServices.Current.SupportsPlatformService(ITMSFNCGeocodingServiceMapBox, IInterface(GeocodingServiceMapBoxGeocoding)) then\r\n FGeocoding := GeocodingServiceMapBoxGeocoding.CreateGeocoding;\r\n end;\r\n gsTomTom:\r\n begin\r\n if TTMSFNCGeocodingPlatformServices.Current.SupportsPlatformService(ITMSFNCGeocodingServiceTomTom, IInterface(GeocodingServiceTomTomGeocoding)) then\r\n FGeocoding := GeocodingServiceTomTomGeocoding.CreateGeocoding;\r\n end;\r\n gsOpenStreetMap:\r\n begin\r\n if TTMSFNCGeocodingPlatformServices.Current.SupportsPlatformService(ITMSFNCGeocodingServiceOpenStreetMap, IInterface(GeocodingServiceOpenStreetMapGeocoding)) then\r\n FGeocoding := GeocodingServiceOpenStreetMapGeocoding.CreateGeocoding;\r\n end;\r\n gsOpenRouteService:\r\n begin\r\n if TTMSFNCGeocodingPlatformServices.Current.SupportsPlatformService(ITMSFNCGeocodingServiceOpenRouteService, IInterface(GeocodingServiceOpenRouteServiceGeocoding)) then\r\n FGeocoding := GeocodingServiceOpenRouteServiceGeocoding.CreateGeocoding;\r\n end;\r\n gsGeoApify:\r\n begin\r\n if TTMSFNCGeocodingPlatformServices.Current.SupportsPlatformService(ITMSFNCGeocodingServiceGeoApify, IInterface(GeocodingServiceGeoApifyGeocoding)) then\r\n FGeocoding := GeocodingServiceGeoApifyGeocoding.CreateGeocoding;\r\n end;\r\n end;\r\n\r\n if Assigned(FGeocoding) and Supports(FGeocoding, ITMSFNCCustomGeocodingInstance, FGeocodingInstance) then\r\n FGeocodingInstance.SetGeocodingProperties(FGeocodingProperties);\r\nend;\r\n\r\nfunction TTMSFNCCustomGeocoding.GeocodingReady: Boolean;\r\nbegin\r\n Result := Assigned(FGeocoding) and Assigned(FGeocodingInstance) and Assigned(FGeocodingProperties) and FGeocoding.IsValid;\r\nend;\r\n\r\nprocedure TTMSFNCCustomGeocoding.DoGetReverseGeocoding(const ARequest: TTMSFNCGeocodingRequest;\r\n const ARequestResult: TTMSFNCCloudBaseRequestResult);\r\nbegin\r\n if Assigned(OnGetReverseGeocodingInternal) then\r\n OnGetReverseGeocodingInternal(Self, ARequest, ARequestResult);\r\n if Assigned(OnGetReverseGeocoding) then\r\n OnGetReverseGeocoding(Self, ARequest, ARequestResult);\r\n if Assigned(OnGetReverseGeocodingResultInternal) then\r\n OnGetReverseGeocodingResultInternal(Self, ARequest);\r\n if Assigned(OnGetReverseGeocodingResult) then\r\n OnGetReverseGeocodingResult(Self, ARequest);\r\nend;\r\n\r\nprocedure TTMSFNCCustomGeocoding.DoGetGeocoding(const ARequest: TTMSFNCGeocodingRequest;\r\n const ARequestResult: TTMSFNCCloudBaseRequestResult);\r\nbegin\r\n if Assigned(OnGetGeocodingInternal) then\r\n OnGetGeocodingInternal(Self, ARequest, ARequestResult);\r\n if Assigned(OnGetGeocoding) then\r\n OnGetGeocoding(Self, ARequest, ARequestResult);\r\n if Assigned(OnGetGeocodingResultInternal) then\r\n OnGetGeocodingResultInternal(Self, ARequest);\r\n if Assigned(OnGetGeocodingResult) then\r\n OnGetGeocodingResult(Self, ARequest);\r\nend;\r\n\r\nprocedure TTMSFNCCustomGeocoding.DoRequestGetGeocoding(\r\n const ARequestResult: TTMSFNCCloudBaseRequestResult);\r\nvar\r\n req: TTMSFNCGeocodingRequest;\r\n obj: TTMSFNCGeocodingCallBackWrapper;\r\n obj2: TTMSFNCGeocodingResultCallBackWrapper;\r\n obj3: TTMSFNCReverseGeocodingResultCallBackWrapper;\r\nbegin\r\n if not GeocodingReady then\r\n Exit;\r\n\r\n //if ARequestResult.Success then\r\n //if there is an error, trigger the event and parse the error message instead\r\n begin\r\n req := GeocodingRequests.Add;\r\n req.FID := ARequestResult.DataString;\r\n req.DataPointer := ARequestResult.DataPointer;\r\n FGeocoding.Parse(req, ARequestResult.ResultString);\r\n\r\n if not ARequestResult.DataBoolean then\r\n DoGetGeocoding(req, ARequestResult)\r\n else\r\n DoGetReverseGeocoding(req, ARequestResult);\r\n\r\n if Assigned(ARequestResult.DataObject) then\r\n begin\r\n if ARequestResult.DataObject is TTMSFNCGeocodingCallBackWrapper then\r\n begin\r\n obj := TTMSFNCGeocodingCallBackWrapper(ARequestResult.DataObject);\r\n obj.FCallback(req, ARequestResult);\r\n obj.Free;\r\n end\r\n else if ARequestResult.DataObject is TTMSFNCGeocodingResultCallBackWrapper then\r\n begin\r\n obj2 := TTMSFNCGeocodingResultCallBackWrapper(ARequestResult.DataObject);\r\n obj2.FCallback(req);\r\n obj2.Free;\r\n end\r\n else if ARequestResult.DataObject is TTMSFNCReverseGeocodingCallBackWrapper then\r\n begin\r\n obj3 := TTMSFNCReverseGeocodingResultCallBackWrapper(ARequestResult.DataObject);\r\n obj3.FCallback(req);\r\n obj3.Free;\r\n end\r\n else if ARequestResult.DataObject is TTMSFNCReverseGeocodingResultCallBackWrapper then\r\n begin\r\n obj3 := TTMSFNCReverseGeocodingResultCallBackWrapper(ARequestResult.DataObject);\r\n obj3.FCallback(req);\r\n obj3.Free;\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCCustomGeocoding.Geocoding: ITMSFNCCustomGeocoding;\r\nbegin\r\n Result := FGeocoding;\r\nend;\r\n\r\nprocedure TTMSFNCCustomGeocoding.SetAPIKey(const Value: string);\r\nbegin\r\n if FAPIKey <> Value then\r\n FAPIKey := Value;\r\nend;\r\n\r\nprocedure TTMSFNCCustomGeocoding.SetService(const Value: TTMSFNCGeocodingService);\r\nbegin\r\n if FService <> Value then\r\n begin\r\n FService := Value;\r\n InitializeGeocoding;\r\n end;\r\nend;\r\n\r\ndestructor TTMSFNCCustomGeocoding.Destroy;\r\nbegin\r\n FGeocodingRequests.Free;\r\n\r\n if Assigned(FGeocoding) then\r\n FGeocoding.DestroyGeocoding;\r\n\r\n FGeocoding := nil;\r\n FGeocodingInstance := nil;\r\n FGeocodingProperties := nil;\r\n inherited;\r\nend;\r\n\r\nprocedure TTMSFNCCustomGeocoding.SetGeocodingRequests(const Value: TTMSFNCGeocodingRequests);\r\nbegin\r\n FGeocodingRequests.Assign(Value);\r\nend;\r\n\r\n{ TTMSFNCGeocodingFactoryService }\r\n\r\nconstructor TTMSFNCGeocodingFactoryService.Create;\r\nbegin\r\n inherited Create;\r\n FGeocoding := TTMSFNCGeocodingList.Create;\r\nend;\r\n\r\nfunction TTMSFNCGeocodingFactoryService.CreateGeocoding: ITMSFNCCustomGeocoding;\r\nbegin\r\n Result := DoCreateGeocoding;\r\n FGeocoding.Add(Result);\r\nend;\r\n\r\ndestructor TTMSFNCGeocodingFactoryService.Destroy;\r\nbegin\r\n FreeAndNil(FGeocoding);\r\n inherited Destroy;\r\nend;\r\n\r\nprocedure TTMSFNCGeocodingFactoryService.DestroyGeocoding(AGeocoding: ITMSFNCCustomGeocoding);\r\nbegin\r\n FGeocoding.Remove(AGeocoding)\r\nend;\r\n\r\n{ TTMSFNCGeocodingPlatformServices }\r\n\r\nprocedure TTMSFNCGeocodingPlatformServices.AddPlatformService(const AServiceGUID: TGUID; const AService: IInterface);\r\nvar\r\n LService: IInterface;\r\nbegin\r\n if not FServicesList.ContainsKey(GUIDToString(AServiceGUID)) then\r\n begin\r\n if Supports(AService, AServiceGUID, LService) then\r\n FServicesList.Add(TTMSFNCGeocodingPlatformServicesService.Create(GUIDToString(AServiceGUID), AService));\r\n end;\r\nend;\r\n\r\nconstructor TTMSFNCGeocodingPlatformServices.Create;\r\nbegin\r\n inherited;\r\n FServicesList := TTMSFNCGeocodingPlatformServicesList.Create;\r\nend;\r\n\r\ndestructor TTMSFNCGeocodingPlatformServices.Destroy;\r\nbegin\r\n FreeAndNil(FServicesList);\r\n inherited;\r\nend;\r\n\r\n{$IFNDEF AUTOREFCOUNT}\r\nclass procedure TTMSFNCGeocodingPlatformServices.ReleaseCurrent;\r\nbegin\r\n FreeAndNil(FCurrent);\r\n FCurrentReleased := True;\r\nend;\r\n{$ENDIF}\r\n\r\nclass function TTMSFNCGeocodingPlatformServices.Current: TTMSFNCGeocodingPlatformServices;\r\nbegin\r\n if (FCurrent = nil) and not FCurrentReleased then\r\n FCurrent := TTMSFNCGeocodingPlatformServices.Create;\r\n Result := FCurrent;\r\nend;\r\n\r\nfunction TTMSFNCGeocodingPlatformServices.GetPlatformService(const AServiceGUID: TGUID): IInterface;\r\nvar\r\n k: IInterface;\r\nbegin\r\n k := FServicesList.Interfaces[GUIDToString(AServiceGUID)];\r\n Supports(k, AServiceGUID, Result);\r\nend;\r\n\r\nprocedure TTMSFNCGeocodingPlatformServices.RemovePlatformService(const AServiceGUID: TGUID);\r\nbegin\r\n FServicesList.RemoveByGUID(GUIDToString(AServiceGUID));\r\nend;\r\n\r\nfunction TTMSFNCGeocodingPlatformServices.SupportsPlatformService(const AServiceGUID: TGUID;\r\n var AService: IInterface): Boolean;\r\nbegin\r\n if FServicesList.ContainsKey(GUIDToString(AServiceGUID)) then\r\n Result := Supports(FServicesList.Interfaces[GUIDToString(AServiceGUID)], AServiceGUID, AService)\r\n else\r\n begin\r\n AService := nil;\r\n Result := False;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCGeocodingPlatformServices.SupportsPlatformService(const AServiceGUID: TGUID): Boolean;\r\nbegin\r\n Result := FServicesList.ContainsKey(GUIDToString(AServiceGUID));\r\nend;\r\n\r\n{ TTMSFNCGeocodingPlatformServicesService }\r\n\r\nconstructor TTMSFNCGeocodingPlatformServicesService.Create(AGUID: string;\r\n AInterface: IInterface);\r\nbegin\r\n FGUID := AGUID;\r\n FInterface := AInterface;\r\nend;\r\n\r\n{ TTMSFNCGeocodingPlatformServicesList }\r\n\r\nfunction TTMSFNCGeocodingPlatformServicesList.ContainsKey(AGUID: string): Boolean;\r\nvar\r\n I: Integer;\r\nbegin\r\n Result := False;\r\n for I := 0 to Count - 1 do\r\n begin\r\n if Items[I].GUID = AGUID then\r\n begin\r\n Result := True;\r\n Break;\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCGeocodingPlatformServicesList.GetValue(AGUID: string): IInterface;\r\nvar\r\n I: Integer;\r\nbegin\r\n Result := nil;\r\n for I := 0 to Count - 1 do\r\n begin\r\n if Items[I].GUID = AGUID then\r\n begin\r\n Result := Items[I].&Interface;\r\n Break;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCGeocodingPlatformServicesList.RemoveByGUID(AGUID: string);\r\nvar\r\n I: Integer;\r\nbegin\r\n for I := Count - 1 downto 0 do\r\n begin\r\n if Items[I].GUID = AGUID then\r\n begin\r\n Remove(Items[I]);\r\n Break;\r\n end;\r\n end;\r\nend;\r\n\r\n{$IFDEF WEBLIB}\r\nfunction TTMSFNCGeocodingPlatformServicesList.GetItem(Index: Integer): TTMSFNCGeocodingPlatformServicesService;\r\nbegin\r\n Result := TTMSFNCGeocodingPlatformServicesService(inherited Items[Index]);\r\nend;\r\n\r\nprocedure TTMSFNCGeocodingPlatformServicesList.SetItem(Index: Integer; const Value: TTMSFNCGeocodingPlatformServicesService);\r\nbegin\r\n inherited Items[Index] := Value;\r\nend;\r\n\r\nfunction TTMSFNCGeocodingList.GetItem(Index: Integer): ITMSFNCCustomGeocoding;\r\nbegin\r\n Result := ITMSFNCCustomGeocoding(inherited Items[Index]);\r\nend;\r\n\r\nprocedure TTMSFNCGeocodingList.SetItem(Index: Integer; const Value: ITMSFNCCustomGeocoding);\r\nbegin\r\n inherited Items[Index] := Value;\r\nend;\r\n{$ENDIF}\r\n\r\n{ TTMSFNCCustomGeocodingInterfacedObject }\r\n\r\ndestructor TTMSFNCCustomGeocodingInterfacedObject.Destroy;\r\nbegin\r\n FGeocodingProperties := nil;\r\n inherited;\r\nend;\r\n\r\nfunction TTMSFNCCustomGeocodingInterfacedObject.GetGeocodingProperties: ITMSFNCCustomGeocodingProperties;\r\nbegin\r\n Result := FGeocodingProperties;\r\nend;\r\n\r\nprocedure TTMSFNCCustomGeocodingInterfacedObject.SetGeocodingProperties(\r\n const Value: ITMSFNCCustomGeocodingProperties);\r\nbegin\r\n FGeocodingProperties := Value;\r\nend;\r\n\r\n{ TTMSFNCGeocodingItem }\r\n\r\nprocedure TTMSFNCGeocodingItem.Assign(Source: TPersistent);\r\nbegin\r\n if Source is TTMSFNCGeocodingItem then\r\n begin\r\n FCoordinate.Assign(TTMSFNCGeocodingItem(Source).Coordinate);\r\n FAddress := TTMSFNCGeocodingItem(Source).Address;\r\n FCity := TTMSFNCGeocodingItem(Source).City;\r\n FDistrict := TTMSFNCGeocodingItem(Source).District;\r\n FCountry := TTMSFNCGeocodingItem(Source).Country;\r\n FCountryCode := TTMSFNCGeocodingItem(Source).CountryCode;\r\n FProvince := TTMSFNCGeocodingItem(Source).Province;\r\n FProvinceCode := TTMSFNCGeocodingItem(Source).ProvinceCode;\r\n FRegion := TTMSFNCGeocodingItem(Source).Region;\r\n FRegionCode := TTMSFNCGeocodingItem(Source).RegionCode;\r\n FStreet := TTMSFNCGeocodingItem(Source).Street;\r\n FStreetNumber := TTMSFNCGeocodingItem(Source).StreetNumber;\r\n FStreetName := TTMSFNCGeocodingItem(Source).StreetName;\r\n FPostalCode := TTMSFNCGeocodingItem(Source).PostalCode;\r\n FIntersection := TTMSFNCGeocodingItem(Source).Intersection;\r\n end;\r\nend;\r\n\r\nconstructor TTMSFNCGeocodingItem.Create(ACollection: TCollection);\r\nbegin\r\n inherited;\r\n if Assigned(ACollection) then\r\n FOwner := (Collection as TTMSFNCGeocodingItems).FOwner;\r\n\r\n FCoordinate := TTMSFNCMapsCoordinate.Create;\r\n FAddress := '';\r\n FCity := '';\r\n FDistrict := '';\r\n FRegion := '';\r\n FRegionCode := '';\r\n FCountry := '';\r\n FCountryCode := '';\r\n FProvince := '';\r\n FProvinceCode := '';\r\n FStreet := '';\r\n FStreetNumber := '';\r\n FStreetName := '';\r\n FPostalCode := '';\r\n FIntersection := '';\r\nend;\r\n\r\ndestructor TTMSFNCGeocodingItem.Destroy;\r\nbegin\r\n FCoordinate.Free;\r\n inherited;\r\nend;\r\n\r\nprocedure TTMSFNCGeocodingItem.SetCoordinate(\r\n const Value: TTMSFNCMapsCoordinate);\r\nbegin\r\n FCoordinate.Assign(Value);\r\nend;\r\n\r\n{ TTMSFNCGeocodingItems }\r\n\r\nfunction TTMSFNCGeocodingItems.Add: TTMSFNCGeocodingItem;\r\nbegin\r\n Result := TTMSFNCGeocodingItem(inherited Add);\r\nend;\r\n\r\nconstructor TTMSFNCGeocodingItems.Create(AOwner: TTMSFNCCustomGeocoding);\r\nbegin\r\n inherited Create(AOwner, CreateItemClass);\r\n FOwner := AOwner;\r\nend;\r\n\r\nfunction TTMSFNCGeocodingItems.CreateItemClass: TCollectionItemClass;\r\nbegin\r\n Result := TTMSFNCGeocodingItem;\r\nend;\r\n\r\nfunction TTMSFNCGeocodingItems.GetItem(\r\n Index: Integer): TTMSFNCGeocodingItem;\r\nbegin\r\n Result := TTMSFNCGeocodingItem(inherited Items[Index]);\r\nend;\r\n\r\nfunction TTMSFNCGeocodingItems.GetOwner: TPersistent;\r\nbegin\r\n Result := FOwner;\r\nend;\r\n\r\nfunction TTMSFNCGeocodingItems.Insert(\r\n Index: Integer): TTMSFNCGeocodingItem;\r\nbegin\r\n Result := TTMSFNCGeocodingItem(inherited Insert(Index));\r\nend;\r\n\r\nprocedure TTMSFNCGeocodingItems.SetItem(Index: Integer;\r\n const Value: TTMSFNCGeocodingItem);\r\nbegin\r\n inherited Items[Index] := Value;\r\nend;\r\n\r\n{ TTMSFNCGeocodingRequest }\r\n\r\nprocedure TTMSFNCGeocodingRequest.Assign(Source: TPersistent);\r\nbegin\r\n if Source is TTMSFNCGeocodingRequest then\r\n begin\r\n FItems.Assign((Source as TTMSFNCGeocodingRequest).Items);\r\n end;\r\nend;\r\n\r\nconstructor TTMSFNCGeocodingRequest.Create(ACollection: TCollection);\r\nbegin\r\n inherited;\r\n if Assigned(ACollection) then\r\n FOwner := (Collection as TTMSFNCGeocodingRequests).FOwner;\r\n\r\n FItems := TTMSFNCGeocodingItems.Create(FOwner);\r\n FID := '';\r\n FStatus := '';\r\n FErrorMessage := '';\r\nend;\r\n\r\ndestructor TTMSFNCGeocodingRequest.Destroy;\r\nbegin\r\n FItems.Free;\r\n inherited;\r\nend;\r\n\r\nfunction TTMSFNCGeocodingRequest.GetFirst: TTMSFNCGeocodingItem;\r\nbegin\r\n Result := nil;\r\n if Items.Count > 0 then\r\n Result := Items[0];\r\nend;\r\n\r\nprocedure TTMSFNCGeocodingRequest.SetErrorMessage(const Value: string);\r\nbegin\r\n FErrorMessage := Value;\r\nend;\r\n\r\nprocedure TTMSFNCGeocodingRequest.SetItems(const Value: TTMSFNCGeocodingItems);\r\nbegin\r\n FItems.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCGeocodingRequest.SetStatus(const Value: string);\r\nbegin\r\n FStatus := Value;\r\nend;\r\n\r\n{ TTMSFNCGeocodingRequests }\r\n\r\nfunction TTMSFNCGeocodingRequests.Add: TTMSFNCGeocodingRequest;\r\nbegin\r\n Result := TTMSFNCGeocodingRequest(inherited Add);\r\nend;\r\n\r\nconstructor TTMSFNCGeocodingRequests.Create(AOwner: TTMSFNCCustomGeocoding);\r\nbegin\r\n inherited Create(AOwner, CreateItemClass);\r\n FOwner := AOwner;\r\nend;\r\n\r\nfunction TTMSFNCGeocodingRequests.CreateItemClass: TCollectionItemClass;\r\nbegin\r\n Result := TTMSFNCGeocodingRequest;\r\nend;\r\n\r\nfunction TTMSFNCGeocodingRequests.GetItem(\r\n Index: Integer): TTMSFNCGeocodingRequest;\r\nbegin\r\n Result := TTMSFNCGeocodingRequest(inherited Items[Index]);\r\nend;\r\n\r\nfunction TTMSFNCGeocodingRequests.GetOwner: TPersistent;\r\nbegin\r\n Result := FOwner;\r\nend;\r\n\r\nfunction TTMSFNCGeocodingRequests.Insert(\r\n Index: Integer): TTMSFNCGeocodingRequest;\r\nbegin\r\n Result := TTMSFNCGeocodingRequest(inherited Insert(Index));\r\nend;\r\n\r\nprocedure TTMSFNCGeocodingRequests.SetItem(Index: Integer;\r\n const Value: TTMSFNCGeocodingRequest);\r\nbegin\r\n inherited Items[Index] := Value;\r\nend;\r\n\r\n\r\n{ TTMSFNCGeocodingCallBackWrapper }\r\n\r\nconstructor TTMSFNCGeocodingCallBackWrapper.Create(\r\n ACallback: TTMSFNCGeocodingGetGeocodingCallBack);\r\nbegin\r\n FCallback := ACallback;\r\nend;\r\n\r\n{ TTMSFNCGeocodingResultCallBackWrapper }\r\n\r\nconstructor TTMSFNCGeocodingResultCallBackWrapper.Create(\r\n ACallback: TTMSFNCGeocodingGetGeocodingResultCallBack);\r\nbegin\r\n FCallback := ACallback;\r\nend;\r\n\r\n{ TTMSFNCGeocoding }\r\n\r\nprocedure TTMSFNCGeocoding.RegisterRuntimeClasses;\r\nbegin\r\n inherited;\r\n RegisterClasses([TTMSFNCGeocoding]);\r\nend;\r\n\r\n{ TTMSFNCReverseGeocodingResultCallBackWrapper }\r\n\r\nconstructor TTMSFNCReverseGeocodingResultCallBackWrapper.Create(\r\n ACallback: TTMSFNCGeocodingGetReverseGeocodingResultCallBack);\r\nbegin\r\n FCallback := ACallback;\r\nend;\r\n\r\n{ TTMSFNCReverseGeocodingCallBackWrapper }\r\n\r\nconstructor TTMSFNCReverseGeocodingCallBackWrapper.Create(\r\n ACallback: TTMSFNCGeocodingGetReverseGeocodingCallBack);\r\nbegin\r\n FCallback := ACallback;\r\nend;\r\n\r\ninitialization\r\nbegin\r\n TTMSFNCGeocodingPlatformServices.FCurrentReleased := False;\r\n RegisterGoogleGeocodingService;\r\n RegisterHereGeocodingService;\r\n RegisterBingGeocodingService;\r\n RegisterAzureGeocodingService;\r\n RegisterMapBoxGeocodingService;\r\n RegisterTomTomGeocodingService;\r\n RegisterOpenStreetMapGeocodingService;\r\n RegisterOpenRouteServiceGeocodingService;\r\n RegisterGeoApifyGeocodingService;\r\nend;\r\n\r\n{$IFNDEF WEBLIB}\r\nfinalization\r\nbegin\r\n UnRegisterGoogleGeocodingService;\r\n UnRegisterHereGeocodingService;\r\n UnRegisterBingGeocodingService;\r\n UnRegisterAzureGeocodingService;\r\n UnRegisterMapBoxGeocodingService;\r\n UnRegisterTomTomGeocodingService;\r\n UnRegisterOpenStreetMapGeocodingService;\r\n UnRegisterOpenRouteServiceGeocodingService;\r\n UnRegisterGeoApifyGeocodingService;\r\n {$IFNDEF AUTOREFCOUNT}\r\n TTMSFNCGeocodingPlatformServices.ReleaseCurrent;\r\n {$ENDIF}\r\nend;\r\n{$ENDIF}\r\n\r\nend.\r\n","{********************************************************************}\r\n{ }\r\n{ written by TMS Software }\r\n{ copyright (c) 2020 - 2024 }\r\n{ Email : info@tmssoftware.com }\r\n{ Web : http://www.tmssoftware.com }\r\n{ }\r\n{ The source code is given as is. The author is not responsible }\r\n{ for any possible damage done due to the use of this code. }\r\n{ The complete source code remains property of the author and may }\r\n{ not be distributed, published, given or sold in any form as such. }\r\n{ No parts of the source code can be included in any other component }\r\n{ or application without written authorization of the author. }\r\n{********************************************************************}\r\n\r\nunit WEBLib.TMSFNCDirections.Google;\r\n\r\n{$I WEBLib.TMSFNCDefines.inc}\r\n\r\n{$IFDEF WEBLIB}\r\n{$DEFINE LCLWEBLIB}\r\n{$ENDIF}\r\n{$IFDEF LCLLIB}\r\n{$DEFINE LCLWEBLIB}\r\n{$ENDIF}\r\n\r\ninterface\r\n\r\nprocedure RegisterGoogleDirectionsService;\r\nprocedure UnRegisterGoogleDirectionsService;\r\n\r\nimplementation\r\n\r\nuses\r\n Classes, Math, DateUtils, Types, SysUtils, WEBLib.TMSFNCDirections,\r\n WEBLib.TMSFNCUtils, WEBLib.TMSFNCTypes, WEBLib.TMSFNCMapsCommonTypes, WEBLib.TMSFNCCloudBase\r\n {$IFNDEF WEBLIB}\r\n {$IFNDEF LCLLIB}\r\n {$HINTS OFF}\r\n {$IF COMPILERVERSION > 26}\r\n ,JSON\r\n {$ELSE}\r\n ,DBXJSON\r\n {$IFEND}\r\n {$HINTS ON}\r\n {$ELSE}\r\n ,fpjson\r\n {$ENDIF}\r\n {$ENDIF}\r\n\r\n {$IFDEF WEBLIB}\r\n ,Contnrs, Web, WEBLIB.JSON\r\n {$ENDIF}\r\n {$IFNDEF LCLWEBLIB}\r\n ,Generics.Collections, Generics.Defaults\r\n {$HINTS OFF}\r\n {$IF COMPILERVERSION > 22}\r\n , UITypes\r\n {$IFEND}\r\n {$HINTS ON}\r\n {$ENDIF}\r\n {$IFDEF LCLLIB}\r\n ,fgl\r\n {$ENDIF}\r\n ;\r\n\r\ntype\r\n TTMSFNCDirectionsGoogleService = class;\r\n\r\n TTMSFNCDirectionsGoogleDirectionsFactoryService = class(TTMSFNCDirectionsFactoryService, ITMSFNCDirectionsServiceGoogle);\r\n\r\n TTMSFNCDirectionsGoogleService = class(TTMSFNCDirectionsGoogleDirectionsFactoryService)\r\n protected\r\n function DoCreateDirections: ITMSFNCCustomDirections; override;\r\n end;\r\n\r\ntype\r\n TTMSFNCDirectionsGoogleDirections = class;\r\n\r\n TTMSFNCDirectionsGoogleDirections = class(TTMSFNCCustomDirectionsInterfacedObject, ITMSFNCCustomDirections)\r\n protected\r\n FTravelMode: TTMSFNCDirectionsTravelMode;\r\n function GetIdentifier: string;\r\n function IsValid: Boolean;\r\n function GetRequestMethod: TTMSFNCCloudBaseRequestMethod;\r\n function GetHost: string;\r\n function GetPath(AOrigin, ADestination: string; AOriginLatitude, AOriginLongitude,\r\n ADestinationLatitude, ADestinationLongitude: Double;\r\n ATravelMode: TTMSFNCDirectionsTravelMode = tmDriving; AWayPoints: TTMSFNCMapsCoordinateRecArray = nil): string;\r\n function GetQuery(AOrigin, ADestination: string; AOriginLatitude, AOriginLongitude,\r\n ADestinationLatitude, ADestinationLongitude: Double; AAlternatives: Boolean = False;\r\n ATravelMode: TTMSFNCDirectionsTravelMode = tmDriving; AWayPointList: TStringList = nil; AWayPoints: TTMSFNCMapsCoordinateRecArray = nil;\r\n AOptimizeWayPoints: Boolean = False; ALocale: string = ''; AAVoidTolls: Boolean = False;\r\n AAvoidHighways: Boolean = False): string;\r\n function GetPostData(AOrigin, ADestination: string; AOriginLatitude, AOriginLongitude,\r\n ADestinationLatitude, ADestinationLongitude: Double; AAlternatives: Boolean = False;\r\n ATravelMode: TTMSFNCDirectionsTravelMode = tmDriving; AWayPointList: TStringList = nil; AWayPoints: TTMSFNCMapsCoordinateRecArray = nil;\r\n AOptimizeWayPoints: Boolean = False; ALocale: string = ''; AAvoidTolls: Boolean = False;\r\n AAvoidHighways: Boolean = False): string;\r\n procedure Parse(ARequest: TTMSFNCDirectionsRequest; ARequestResult: string);\r\n procedure AddHeaders(AHeaders: TTMSFNCCloudBaseRequestHeaders);\r\n procedure DestroyDirections;\r\n public\r\n constructor Create;\r\n destructor Destroy; override;\r\n end;\r\n\r\nvar\r\n DirectionsService: ITMSFNCDirectionsServiceGoogle;\r\n\r\nprocedure RegisterGoogleDirectionsService;\r\nbegin\r\n if not TTMSFNCDirectionsPlatformServices.Current.SupportsPlatformService(ITMSFNCDirectionsServiceGoogle, IInterface(DirectionsService)) then\r\n begin\r\n DirectionsService := TTMSFNCDirectionsGoogleService.Create;\r\n TTMSFNCDirectionsPlatformServices.Current.AddPlatformService(ITMSFNCDirectionsServiceGoogle, DirectionsService);\r\n end;\r\nend;\r\n\r\nprocedure UnregisterGoogleDirectionsService;\r\nbegin\r\n TTMSFNCDirectionsPlatformServices.Current.RemovePlatformService(ITMSFNCDirectionsServiceGoogle);\r\nend;\r\n\r\n{ TTMSFNCDirectionsGoogleService }\r\n\r\nfunction TTMSFNCDirectionsGoogleService.DoCreateDirections: ITMSFNCCustomDirections;\r\nbegin\r\n Result := TTMSFNCDirectionsGoogleDirections.Create;\r\nend;\r\n\r\nprocedure TTMSFNCDirectionsGoogleDirections.AddHeaders(\r\n AHeaders: TTMSFNCCloudBaseRequestHeaders);\r\nbegin\r\n\r\nend;\r\n\r\nconstructor TTMSFNCDirectionsGoogleDirections.Create;\r\nbegin\r\n inherited;\r\nend;\r\n\r\ndestructor TTMSFNCDirectionsGoogleDirections.Destroy;\r\nbegin\r\n inherited;\r\nend;\r\n\r\nprocedure TTMSFNCDirectionsGoogleDirections.DestroyDirections;\r\nbegin\r\n DirectionsService.DestroyDirections(Self);\r\nend;\r\n\r\nfunction TTMSFNCDirectionsGoogleDirections.GetHost: string;\r\nbegin\r\n Result := 'https://maps.googleapis.com';\r\nend;\r\n\r\nfunction TTMSFNCDirectionsGoogleDirections.GetIdentifier: string;\r\nbegin\r\n Result := 'Google';\r\nend;\r\n\r\nfunction TTMSFNCDirectionsGoogleDirections.GetPath(AOrigin, ADestination: string; AOriginLatitude, AOriginLongitude,\r\n ADestinationLatitude, ADestinationLongitude: Double; ATravelMode: TTMSFNCDirectionsTravelMode = tmDriving; AWayPoints: TTMSFNCMapsCoordinateRecArray = nil): string;\r\nbegin\r\n Result := '/maps/api/directions/json';\r\nend;\r\n\r\nfunction TTMSFNCDirectionsGoogleDirections.GetPostData(AOrigin, ADestination: string; AOriginLatitude, AOriginLongitude,\r\n ADestinationLatitude, ADestinationLongitude: Double; AAlternatives: Boolean = False;\r\n ATravelMode: TTMSFNCDirectionsTravelMode = tmDriving; AWayPointList: TStringList = nil; AWayPoints: TTMSFNCMapsCoordinateRecArray = nil;\r\n AOptimizeWayPoints: Boolean = False; ALocale: string = ''; AAvoidTolls: Boolean = False;\r\n AAvoidHighways: Boolean = False): string;\r\nbegin\r\n Result := '';\r\nend;\r\n\r\nfunction TTMSFNCDirectionsGoogleDirections.GetQuery(AOrigin, ADestination: string; AOriginLatitude, AOriginLongitude,\r\n ADestinationLatitude, ADestinationLongitude: Double; AAlternatives: Boolean = False;\r\n ATravelMode: TTMSFNCDirectionsTravelMode = tmDriving; AWayPointList: TStringList = nil; AWayPoints: TTMSFNCMapsCoordinateRecArray = nil;\r\n AOptimizeWayPoints: Boolean = False; ALocale: string = ''; AAVoidTolls: Boolean = False;\r\n AAvoidHighways: Boolean = False): string;\r\nvar\r\n TravelMode, WayPoints: string;\r\n I: Integer;\r\nbegin\r\n if ATravelMode in [tmTruck] then\r\n FTravelMode := tmDriving\r\n else\r\n FTravelMode := ATravelMode;\r\n\r\n case ATravelMode of\r\n tmDriving: TravelMode := '';\r\n tmWalking: TravelMode := 'walking';\r\n tmBicycling: TravelMode := 'bicycling';\r\n tmPublicTransport: TravelMode := 'transit';\r\n end;\r\n\r\n WayPoints := '';\r\n\r\n if Assigned(AWayPointList) and (AWayPointList.Count > 0) then\r\n begin\r\n WayPoints := '&waypoints=';\r\n WayPoints := WayPoints + 'optimize:' + BoolToStrEx(AOptimizeWayPoints);\r\n for I := 0 to (AWayPointList.Count - 1) do\r\n WayPoints := WayPoints + '|' + AWayPointList[I];\r\n end;\r\n\r\n if Assigned(AWaypoints) and (Length(AWayPoints) > 0) then\r\n begin\r\n WayPoints := '&waypoints=';\r\n WayPoints := WayPoints + 'optimize:' + BoolToStrEx(AOptimizeWayPoints);\r\n for I := 0 to (Length(AWayPoints) - 1) do\r\n WayPoints := WayPoints + '|' + TTMSFNCUtils.FloatToStrDot(AWayPoints[I].Latitude) + ',' + TTMSFNCUtils.FloatToStrDot(AWayPoints[I].Longitude);\r\n end;\r\n\r\n if AOrigin = '' then\r\n AOrigin := TTMSFNCUtils.FloatToStrDot(AOriginLatitude) + ',' + TTMSFNCUtils.FloatToStrDot(AOriginLongitude);\r\n if ADestination = '' then\r\n ADestination := TTMSFNCUtils.FloatToStrDot(ADestinationLatitude) + ',' + TTMSFNCUtils.FloatToStrDot(ADestinationLongitude);\r\n\r\n Result := 'key=' + DirectionsProperties.GetAPIKey\r\n + '&origin=' + AOrigin\r\n + '&destination=' + ADestination\r\n + '&alternatives=' + BoolToStrEx(AAlternatives)\r\n + '&mode=' + TravelMode\r\n + '&language=' + ALocale\r\n + WayPoints;\r\n\r\n if AAvoidTolls or AAvoidHighways then\r\n begin\r\n Result := Result + '&avoid=';\r\n\r\n if AAvoidTolls then\r\n Result := Result + 'tolls|';\r\n\r\n if AAvoidHighways then\r\n Result := Result + 'highways';\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCDirectionsGoogleDirections.GetRequestMethod: TTMSFNCCloudBaseRequestMethod;\r\nbegin\r\n Result := rmGet;\r\nend;\r\n\r\nfunction TTMSFNCDirectionsGoogleDirections.IsValid: Boolean;\r\nbegin\r\n Result := DirectionsProperties.GetAPIKey <> '';\r\nend;\r\n\r\nprocedure TTMSFNCDirectionsGoogleDirections.Parse(ARequest: TTMSFNCDirectionsRequest; ARequestResult: string);\r\nvar\r\n d: TTMSFNCDirectionsItems;\r\n di: TTMSFNCDirectionsItem;\r\n step, lstep: TTMSFNCDirectionsStep;\r\n wp: TTMSFNCDirectionsWayPoint;\r\n l: TTMSFNCDirectionsLeg;\r\n\r\n o, jo, jol, jos: TJSONValue;\r\n jar, jal, jas: TJSONArray;\r\n i, j, k, lm: Integer;\r\n op, ol, os: TJSONObject;\r\n wpIndex: array of integer;\r\nbegin\r\n if Assigned(DirectionsProperties) then\r\n begin\r\n ARequest.TravelMode := FTravelMode;\r\n\r\n d := ARequest.Items;\r\n if Assigned(d) then\r\n begin\r\n if ARequestResult <> '' then\r\n begin\r\n o := TTMSFNCUtils.ParseJSON(ARequestResult);\r\n if Assigned(o) then\r\n begin\r\n try\r\n ARequest.Status := TTMSFNCUtils.GetJSONProp(o, 'status');\r\n ARequest.ErrorMessage := TTMSFNCUtils.GetJSONProp(o, 'error_message');\r\n\r\n jar := TTMSFNCUtils.GetJSONValue(o, 'routes') as TJSONArray;\r\n if Assigned(jar) then\r\n begin\r\n\r\n for i := 0 to TTMSFNCUtils.GetJSONArraySize(jar) - 1 do\r\n begin\r\n jo := TTMSFNCUtils.GetJSONArrayItem(jar, i);\r\n\r\n di := d.Add;\r\n di.Summary := TTMSFNCUtils.GetJSONProp(jo, 'summary');\r\n\r\n// ob := TTMSFNCUtils.GetJSONValue(jo, 'bounds') as TJSONObject;\r\n// if Assigned(ob) then\r\n// begin\r\n// oc := TTMSFNCUtils.GetJSONValue(ob, 'northeast') as TJSONObject;\r\n// if Assigned(oc) then\r\n// begin\r\n// di.Bounds.NorthEast.Latitude := TTMSFNCUtils.GetJSONDoubleValue(oc, 'lat');\r\n// di.Bounds.NorthEast.Longitude := TTMSFNCUtils.GetJSONDoubleValue(oc, 'lng');\r\n// end;\r\n// oc := TTMSFNCUtils.GetJSONValue(ob, 'southwest') as TJSONObject;\r\n// if Assigned(oc) then\r\n// begin\r\n// di.Bounds.SouthWest.Latitude := TTMSFNCUtils.GetJSONDoubleValue(oc, 'lat');\r\n// di.Bounds.SouthWest.Longitude := TTMSFNCUtils.GetJSONDoubleValue(oc, 'lng');\r\n// end;\r\n// end;\r\n\r\n op := TTMSFNCUtils.GetJSONValue(jo, 'overview_polyline') as TJSONObject;\r\n if Assigned(op) then\r\n DecodeValues(TTMSFNCUtils.GetJSONProp(op, 'points'), di.Coordinates);\r\n\r\n SetLength(wpIndex, 1);\r\n wpIndex[0] := -1;\r\n\r\n jal := TTMSFNCUtils.GetJSONValue(jo, 'waypoint_order') as TJSONArray;\r\n if Assigned(jal) then\r\n begin\r\n SetLength(wpIndex, TTMSFNCUtils.GetJSONArraySize(jal) + 1);\r\n\r\n for j := 0 to TTMSFNCUtils.GetJSONArraySize(jal) - 1 do\r\n begin\r\n jol := TTMSFNCUtils.GetJSONArrayItem(jal, j);\r\n if jol.Value <> '' then\r\n wpIndex[j + 1] := StrToInt(jol.Value);\r\n end;\r\n end;\r\n\r\n jal := TTMSFNCUtils.GetJSONValue(jo, 'legs') as TJSONArray;\r\n if Assigned(jal) then\r\n begin\r\n for j := 0 to TTMSFNCUtils.GetJSONArraySize(jal) - 1 do\r\n begin\r\n jol := TTMSFNCUtils.GetJSONArrayItem(jal, j);\r\n\r\n l := di.Legs.Add;\r\n\r\n wp := di.WayPoints.Add;\r\n if Length(wpIndex) > j then\r\n wp.OptimizedIndex := wpIndex[j];\r\n\r\n l.StartAddress := TTMSFNCUtils.GetJSONProp(jol, 'start_address');\r\n l.EndAddress := TTMSFNCUtils.GetJSONProp(jol, 'end_address');\r\n\r\n ol := TTMSFNCUtils.GetJSONValue(jol, 'distance') as TJSONObject;\r\n if Assigned(ol) then\r\n begin\r\n l.Distance := TTMSFNCUtils.GetJSONIntegerValue(ol, 'value');\r\n di.Distance := di.Distance + l.Distance;\r\n wp.Distance := l.Distance;\r\n end;\r\n\r\n ol := TTMSFNCUtils.GetJSONValue(jol, 'duration') as TJSONObject;\r\n if Assigned(ol) then\r\n begin\r\n l.Duration := TTMSFNCUtils.GetJSONIntegerValue(ol, 'value');\r\n di.Duration := di.Duration + l.Duration;\r\n wp.Duration := l.Duration;\r\n end;\r\n\r\n os := TTMSFNCUtils.GetJSONValue(jol, 'end_location') as TJSONObject;\r\n if Assigned(os) then\r\n begin\r\n l.EndLocation.Latitude := TTMSFNCUtils.GetJSONDoubleValue(os, 'lat');\r\n l.EndLocation.Longitude := TTMSFNCUtils.GetJSONDoubleValue(os, 'lng');\r\n end;\r\n\r\n os := TTMSFNCUtils.GetJSONValue(jol, 'start_location') as TJSONObject;\r\n if Assigned(os) then\r\n begin\r\n l.StartLocation.Latitude := TTMSFNCUtils.GetJSONDoubleValue(os, 'lat');\r\n l.StartLocation.Longitude := TTMSFNCUtils.GetJSONDoubleValue(os, 'lng');\r\n end;\r\n\r\n jas := TTMSFNCUtils.GetJSONValue(jol, 'steps') as TJSONArray;\r\n if Assigned(jas) then\r\n begin\r\n for k := 0 to TTMSFNCUtils.GetJSONArraySize(jas) - 1 do\r\n begin\r\n jos := TTMSFNCUtils.GetJSONArrayItem(jas, k);\r\n\r\n step := di.Steps.Add;\r\n\r\n os := TTMSFNCUtils.GetJSONValue(jos, 'distance') as TJSONObject;\r\n if Assigned(ol) then\r\n step.Distance := TTMSFNCUtils.GetJSONIntegerValue(os, 'value');\r\n\r\n os := TTMSFNCUtils.GetJSONValue(jos, 'duration') as TJSONObject;\r\n if Assigned(ol) then\r\n step.Duration := TTMSFNCUtils.GetJSONIntegerValue(os, 'value');\r\n\r\n step.Instructions := TTMSFNCUtils.GetJSONProp(jos, 'html_instructions');\r\n\r\n os := TTMSFNCUtils.GetJSONValue(jos, 'polyline') as TJSONObject;\r\n if Assigned(os) then\r\n DecodeValues(TTMSFNCUtils.GetJSONProp(os, 'points'), step.Coordinates);\r\n\r\n for lm := 0 to step.Coordinates.Count - 1 do\r\n l.Coordinates.Add.Assign(step.Coordinates[lm]);\r\n\r\n os := TTMSFNCUtils.GetJSONValue(jos, 'end_location') as TJSONObject;\r\n if Assigned(os) then\r\n begin\r\n step.EndLocation.Latitude := TTMSFNCUtils.GetJSONDoubleValue(os, 'lat');\r\n step.EndLocation.Longitude := TTMSFNCUtils.GetJSONDoubleValue(os, 'lng');\r\n end;\r\n\r\n os := TTMSFNCUtils.GetJSONValue(jos, 'start_location') as TJSONObject;\r\n if Assigned(os) then\r\n begin\r\n step.StartLocation.Latitude := TTMSFNCUtils.GetJSONDoubleValue(os, 'lat');\r\n step.StartLocation.Longitude := TTMSFNCUtils.GetJSONDoubleValue(os, 'lng');\r\n end;\r\n\r\n lstep := l.Steps.Add;\r\n lstep.Assign(step);\r\n end;\r\n end;\r\n end;\r\n end;\r\n end;\r\n end;\r\n finally\r\n o.Free;\r\n end;\r\n end;\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\nend.\r\n\r\n","{********************************************************************}\r\n{ }\r\n{ written by TMS Software }\r\n{ copyright (c) 2023 - 2025 }\r\n{ Email : info@tmssoftware.com }\r\n{ Web : http://www.tmssoftware.com }\r\n{ }\r\n{ The source code is given as is. The author is not responsible }\r\n{ for any possible damage done due to the use of this code. }\r\n{ The complete source code remains property of the author and may }\r\n{ not be distributed, published, given or sold in any form as such. }\r\n{ No parts of the source code can be included in any other component }\r\n{ or application without written authorization of the author. }\r\n{********************************************************************}\r\n\r\nunit WEBLib.TMSFNCGoogleRoutes;\r\n\r\n{$I WEBLib.TMSFNCDefines.inc}\r\n\r\n{$IFDEF WEBLIB}\r\n{$DEFINE LCLWEBLIB}\r\n{$ENDIF}\r\n{$IFDEF LCLLIB}\r\n{$DEFINE LCLWEBLIB}\r\n{$ENDIF}\r\n\r\n{$IFNDEF LCLLIB}\r\n{$HINTS OFF}\r\n{$IF COMPILERVERSION > 23}\r\n{$DEFINE UNREGISTER}\r\n{$IFEND}\r\n{$HINTS ON}\r\n{$ENDIF}\r\n{$IFDEF LCLLIB}\r\n{$DEFINE UNREGISTER}\r\n{$ENDIF}\r\n\r\ninterface\r\n\r\nuses\r\n Classes, Types, WEBLib.Forms\r\n {$IFNDEF LCLWEBLIB}\r\n ,Generics.Collections\r\n {$ENDIF}\r\n {$IFDEF LCLLIB}\r\n ,fgl\r\n {$ENDIF}\r\n {$IFDEF WEBLIB}\r\n ,web, Contnrs\r\n {$ENDIF}\r\n {$IFDEF CMNLIB}\r\n {$ENDIF}\r\n ,WEBLib.TMSFNCTypes\r\n ,WEBLib.TMSFNCMapsCommonTypes\r\n ,WEBLib.TMSFNCCloudBase\r\n ,WEBLib.TMSFNCDirections;\r\n\r\nconst\r\n LB = #13;\r\n TTMSFNCGoogleRoutesDocURL = TTMSFNCBaseDocURL + 'tmsfncmaps/components/ttmsfncmaps/#ttmsfncdirections';\r\n TTMSFNCGoogleRoutesTipsURL = 'https://www.tmssoftware.com/site/tmsfncmaps.asp?s=faq';\r\n\r\n MAJ_VER = 1; // Major version nr.\r\n MIN_VER = 0; // Minor version nr.\r\n REL_VER = 0; // Release nr.\r\n BLD_VER = 2; // Build nr.\r\n\r\n //v1.0.0.0: First release\r\n //v1.0.0.1: Fixed : Issues with GetDirections call\r\n //v1.0.0.2: Fixed : Issue with setting AOptimzeWayPoints parameter to True\r\n\r\n\r\ntype\r\n TTMSFNCGoogleRoutesRoutingMode = (rmTrafficUnaware, rmTrafficAware, rmTrafficAwareOptimal);\r\n TTMSFNCGoogleRoutesDeparture = (rdIgnore, rdNow, rdDateTime);\r\n\r\n TTMSFNCGoogleRoutes = class;\r\n\r\n TTMSFNCGoogleRoutesOptions = class(TPersistent)\r\n private\r\n FRoutingMode: TTMSFNCGoogleRoutesRoutingMode;\r\n FDeparture: TTMSFNCGoogleRoutesDeparture;\r\n FDepartureTime: TDateTime;\r\n FHTMLFormattedInstructions: Boolean;\r\n FIncludeFuelEfficientRoute: Boolean;\r\n procedure SetRoutingMode(const Value: TTMSFNCGoogleRoutesRoutingMode);\r\n procedure SetDeparture(const Value: TTMSFNCGoogleRoutesDeparture);\r\n procedure SetDepartureTime(const Value: TDateTime);\r\n procedure SetHTMLFormattedInstructions(const Value: Boolean);\r\n procedure SetIncludeFuelEfficientRoute(const Value: Boolean);\r\n public\r\n procedure Assign(Source: TPersistent); override;\r\n constructor Create; virtual;\r\n destructor Destroy; override;\r\n published\r\n property RoutingMode: TTMSFNCGoogleRoutesRoutingMode read FRoutingMode write SetRoutingMode default rmTrafficUnaware;\r\n property Departure: TTMSFNCGoogleRoutesDeparture read FDeparture write SetDeparture default rdIgnore;\r\n property DepartureTime: TDateTime read FDepartureTime write SetDepartureTime;\r\n property HTMLFormattedInstructions: Boolean read FHTMLFormattedInstructions write SetHTMLFormattedInstructions default false;\r\n property IncludeFuelEfficientRoute: Boolean read FIncludeFuelEfficientRoute write SetIncludeFuelEfficientRoute default False;\r\n end;\r\n\r\n TTMSFNCSpeedReadingInterval = class(TCollectionItem)\r\n private\r\n FOwner: TPersistent;\r\n FDataBoolean: Boolean;\r\n FDataString: string;\r\n FDataObject: TObject;\r\n FDataInteger: NativeInt;\r\n FDataPointer: Pointer;\r\n FStartPolylinePointIndex: Integer;\r\n FSpeed: string;\r\n FEndPolylinePointIndex: Integer;\r\n public\r\n constructor Create(ACollection: TCollection); override;\r\n procedure Assign(Source: TPersistent); override;\r\n destructor Destroy; override;\r\n property DataPointer: Pointer read FDataPointer write FDataPointer;\r\n property DataBoolean: Boolean read FDataBoolean write FDataBoolean;\r\n property DataObject: TObject read FDataObject write FDataObject;\r\n property DataString: string read FDataString write FDataString;\r\n property DataInteger: NativeInt read FDataInteger write FDataInteger;\r\n published\r\n property StartPolylinePointIndex: Integer read FStartPolylinePointIndex write FStartPolylinePointIndex;\r\n property EndPolylinePointIndex: Integer read FEndPolylinePointIndex write FEndPolylinePointIndex;\r\n property Speed: string read FSpeed write FSpeed;\r\n end;\r\n\r\n {$IFDEF WEBLIB}\r\n TTMSFNCSpeedReadingIntervals = class(TTMSFNCOwnedCollection)\r\n {$ELSE}\r\n TTMSFNCSpeedReadingIntervals = class({$IFDEF LCLLIB}specialize {$ENDIF}TTMSFNCOwnedCollection)\r\n {$ENDIF}\r\n private\r\n FOwner: TPersistent;\r\n function GetItem(Index: Integer): TTMSFNCSpeedReadingInterval;\r\n procedure SetItem(Index: Integer; const Value: TTMSFNCSpeedReadingInterval);\r\n protected\r\n function CreateItemClass: TCollectionItemClass; virtual;\r\n function GetOwner: TPersistent; override;\r\n public\r\n constructor Create(AOwner: TPersistent); virtual;\r\n property Items[Index: Integer]: TTMSFNCSpeedReadingInterval read GetItem write SetItem; default;\r\n function Add: TTMSFNCSpeedReadingInterval;\r\n function Insert(Index: Integer): TTMSFNCSpeedReadingInterval;\r\n end;\r\n\r\n TTMSFNCGoogleRoutesTravelAdvisory = class(TPersistent)\r\n private\r\n FSpeedReadingIntervals: TTMSFNCSpeedReadingIntervals;\r\n FFuelConsumptionMicroliters: Integer;\r\n procedure SetSpeedReadingIntervals(\r\n const Value: TTMSFNCSpeedReadingIntervals);\r\n procedure SetFuelConsumptionMicroliters(const Value: Integer);\r\n public\r\n procedure Assign(Source: TPersistent); override;\r\n constructor Create; virtual;\r\n destructor Destroy; override;\r\n published\r\n property SpeedReadingIntervals: TTMSFNCSpeedReadingIntervals read FSpeedReadingIntervals write SetSpeedReadingIntervals;\r\n property FuelConsumptionMicroliters: Integer read FFuelConsumptionMicroliters write SetFuelConsumptionMicroliters;\r\n end;\r\n\r\n TTMSFNCGoogleRoutesItem = class(TTMSFNCDirectionsItem)\r\n private\r\n FRouteLabels: TStringList;\r\n FTravelAdvisory: TTMSFNCGoogleRoutesTravelAdvisory;\r\n procedure SetRouteLabels(const Value: TStringList);\r\n procedure SetTravelAdivsory(const Value: TTMSFNCGoogleRoutesTravelAdvisory);\r\n public\r\n constructor Create(ACollection: TCollection); override;\r\n procedure Assign(Source: TPersistent); override;\r\n destructor Destroy; override;\r\n published\r\n property RouteLabels: TStringList read FRouteLabels write SetRouteLabels;\r\n property TravelAdvisory: TTMSFNCGoogleRoutesTravelAdvisory read FTravelAdvisory write SetTravelAdivsory;\r\n end;\r\n\r\n TTMSFNCGoogleRoutesItems = class(TTMSFNCDirectionsItems)\r\n private\r\n function GetItem(Index: Integer): TTMSFNCGoogleRoutesItem;\r\n protected\r\n function CreateItemClass: TCollectionItemClass; override;\r\n public\r\n property Items[Index: Integer]: TTMSFNCGoogleRoutesItem read GetItem; default;\r\n end;\r\n\r\n TTMSFNCGoogleRoutesRequest = class(TTMSFNCDirectionsRequest)\r\n private\r\n function GetItems: TTMSFNCGoogleRoutesItems;\r\n protected\r\n function GetDirectionsItemsClass: TTMSFNCDirectionsItemsClass; override;\r\n published\r\n property Items: TTMSFNCGoogleRoutesItems read GetItems;\r\n end;\r\n\r\n TTMSFNCGoogleRoutesRequests = class(TTMSFNCDirectionsRequests)\r\n private\r\n function GetItem(Index: Integer): TTMSFNCGoogleRoutesRequest;\r\n procedure SetItem(Index: Integer; const Value: TTMSFNCGoogleRoutesRequest);\r\n protected\r\n function CreateItemClass: TCollectionItemClass; override;\r\n property Items[Index: Integer]: TTMSFNCGoogleRoutesRequest read GetItem write SetItem; default;\r\n end;\r\n\r\n TTMSFNCCustomGoogleRoutes = class(TTMSFNCCustomDirections)\r\n private\r\n FOptions: TTMSFNCGoogleRoutesOptions;\r\n procedure SetOptions(const Value: TTMSFNCGoogleRoutesOptions);\r\n function GetDirectionsRequests: TTMSFNCGoogleRoutesRequests;\r\n procedure SetDirectionsRequests(const Value: TTMSFNCGoogleRoutesRequests);\r\n protected\r\n function GetDirectionsRequestsClass: TTMSFNCDirectionsRequestsClass; override;\r\n function GetGoogleRoutesOptions(var AOptions: string; ATravelMode: TTMSFNCDirectionsTravelMode;\r\n AWayPoints: TTMSFNCMapsCoordinateRecArray; AWayPointsList: TStringList; AOptimizeWayPoints: Boolean): string; override;\r\n property DirectionsRequests: TTMSFNCGoogleRoutesRequests read GetDirectionsRequests write SetDirectionsRequests;\r\n public\r\n constructor Create(AOwner: TComponent); override;\r\n destructor Destroy; override;\r\n property Options: TTMSFNCGoogleRoutesOptions read FOptions write SetOptions;\r\n end;\r\n\r\n {$IFNDEF LCLLIB}\r\n {$HINTS OFF}\r\n {$IF COMPILERVERSION > 22}\r\n {$IFNDEF LCLLIB}\r\n [ComponentPlatformsAttribute(TMSPlatformsWeb)]\r\n {$ENDIF}\r\n {$IFEND}\r\n {$HINTS ON}\r\n {$ENDIF}\r\n TTMSFNCGoogleRoutes = class(TTMSFNCCustomGoogleRoutes)\r\n protected\r\n procedure RegisterRuntimeClasses; override;\r\n public\r\n property DirectionsInstance;\r\n property DirectionsProperties;\r\n published\r\n property OnGetDirections;\r\n property OnGetDirectionsResult;\r\n property APIKey;\r\n property DirectionsRequests;\r\n property Version;\r\n end;\r\n\r\nimplementation\r\n\r\nuses\r\n {$IFDEF MSWINDOWS}\r\n Windows, Registry,\r\n {$ENDIF}\r\n {%H-}Math,\r\n WEBLib.TMSFNCUtils,\r\n WEBLib.TMSFNCDirections.Google,\r\n SysUtils\r\n {$IFDEF FMXLIB}\r\n ,FMX.Types\r\n {$ENDIF}\r\n , DateUtils\r\n ;\r\n\r\n{ TTMSFNCCustomGoogleRoutes }\r\n\r\nconstructor TTMSFNCCustomGoogleRoutes.Create(AOwner: TComponent);\r\nbegin\r\n inherited;\r\n IsGoogleRoutes := True;\r\n InitializeDirections;\r\n FOptions := TTMSFNCGoogleRoutesOptions.Create;\r\nend;\r\n\r\ndestructor TTMSFNCCustomGoogleRoutes.Destroy;\r\nbegin\r\n FOptions.Free;\r\n inherited;\r\nend;\r\n\r\nfunction TTMSFNCCustomGoogleRoutes.GetDirectionsRequests: TTMSFNCGoogleRoutesRequests;\r\nbegin\r\n Result := TTMSFNCGoogleRoutesRequests(inherited DirectionsRequests);\r\nend;\r\n\r\nfunction TTMSFNCCustomGoogleRoutes.GetDirectionsRequestsClass: TTMSFNCDirectionsRequestsClass;\r\nbegin\r\n Result := TTMSFNCGoogleRoutesRequests;\r\nend;\r\n\r\nfunction TTMSFNCCustomGoogleRoutes.GetGoogleRoutesOptions(\r\n var AOptions: string; ATravelMode: TTMSFNCDirectionsTravelMode;\r\n AWayPoints: TTMSFNCMapsCoordinateRecArray; AWayPointsList: TStringList; AOptimizeWayPoints: Boolean): string;\r\nvar\r\n Preference: string;\r\n Departure: string;\r\n Extras: TStringList;\r\n I: Integer;\r\nbegin\r\n Result := AOptions;\r\n\r\n if not (ATravelMode in [tmWalking, tmBicycling]) then\r\n begin\r\n if AOptimizeWayPoints then\r\n begin\r\n Preference := '';\r\n end\r\n else\r\n begin\r\n case Options.RoutingMode of\r\n rmTrafficUnaware: Preference := '';\r\n rmTrafficAware: Preference := 'TRAFFIC_AWARE';\r\n rmTrafficAwareOptimal:\r\n begin\r\n Preference := 'TRAFFIC_AWARE_OPTIMAL';\r\n if (Options.IncludeFuelEfficientRoute) then\r\n begin\r\n if (Length(AWayPoints) <= 0) and ((not Assigned(AWayPointsList)) or (Assigned(AWayPointsList) and (AWayPointsList.Count <= 0))) then\r\n begin\r\n Result := Result + ' \"requestedReferenceRoutes\": [\"FUEL_EFFICIENT\"],' + LB;\r\n end;\r\n end;\r\n end;\r\n end;\r\n end;\r\n\r\n if Preference <> '' then\r\n begin\r\n Result := Result +\r\n ' \"routingPreference\": \"' + Preference + '\",' + LB;\r\n end;\r\n end;\r\n\r\n if Options.RoutingMode <> rmTrafficUnaware then\r\n begin\r\n case Options.Departure of\r\n rdIgnore: Departure := '';\r\n rdNow: Departure := TTMSFNCUtils.DateTimeToISO(Now, True, True);\r\n rdDateTime: Departure := TTMSFNCUtils.DateTimeToISO(Options.DepartureTime, True, True);\r\n end;\r\n\r\n if Departure <> '' then\r\n begin\r\n Result := Result +\r\n ' \"departureTime\": \"' + Departure + '\",' + LB;\r\n end;\r\n end;\r\n\r\n Extras := TStringList.Create;\r\n// Extras.Add('TOLLS');\r\n// Extras.Add('FUEL_CONSUMPTION');\r\n Extras.Add('TRAFFIC_ON_POLYLINE');\r\n\r\n if Options.HTMLFormattedInstructions then\r\n begin\r\n Extras.Add('HTML_FORMATTED_NAVIGATION_INSTRUCTIONS');\r\n end;\r\n\r\n if Extras.Count > 0 then\r\n begin\r\n Result := Result + ' \"extraComputations\": [';\r\n for I := 0 to Extras.Count - 1 do\r\n begin\r\n Result := Result + '\"' + Extras[I] + '\",';\r\n end;\r\n Result := Result + '],' + LB;\r\n end;\r\n\r\n Extras.Free;\r\nend;\r\n\r\nprocedure TTMSFNCCustomGoogleRoutes.SetDirectionsRequests(\r\n const Value: TTMSFNCGoogleRoutesRequests);\r\nbegin\r\n inherited;\r\nend;\r\n\r\nprocedure TTMSFNCCustomGoogleRoutes.SetOptions(\r\n const Value: TTMSFNCGoogleRoutesOptions);\r\nbegin\r\n FOptions.Assign(Value);\r\nend;\r\n\r\n{ TTMSFNCGoogleRoutes }\r\n\r\nprocedure TTMSFNCGoogleRoutes.RegisterRuntimeClasses;\r\nbegin\r\n inherited;\r\n Classes.RegisterClass(TTMSFNCGoogleRoutes);\r\nend;\r\n\r\n{ TTMSFNCGoogleRoutesOptions }\r\n\r\nprocedure TTMSFNCGoogleRoutesOptions.Assign(Source: TPersistent);\r\nbegin\r\n if (Source is TTMSFNCGoogleRoutesOptions) then\r\n begin\r\n FRoutingMode := (Source as TTMSFNCGoogleRoutesOptions).RoutingMode;\r\n FDeparture := (Source as TTMSFNCGoogleRoutesOptions).Departure;\r\n FDepartureTime := (Source as TTMSFNCGoogleRoutesOptions).DepartureTime;\r\n FHTMLFormattedInstructions := (Source as TTMSFNCGoogleRoutesOptions).HTMLFormattedInstructions;\r\n end\r\n else\r\n inherited;\r\nend;\r\n\r\nconstructor TTMSFNCGoogleRoutesOptions.Create;\r\nbegin\r\n FRoutingMode := rmTrafficUnaware;\r\n FDeparture := rdIgnore;\r\n FDepartureTime := Now;\r\n FHTMLFormattedInstructions := False;\r\nend;\r\n\r\ndestructor TTMSFNCGoogleRoutesOptions.Destroy;\r\nbegin\r\n inherited;\r\nend;\r\n\r\nprocedure TTMSFNCGoogleRoutesOptions.SetDeparture(\r\n const Value: TTMSFNCGoogleRoutesDeparture);\r\nbegin\r\n if FDeparture <> Value then\r\n begin\r\n FDeparture := Value;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCGoogleRoutesOptions.SetDepartureTime(const Value: TDateTime);\r\nbegin\r\n if FDepartureTime <> Value then\r\n begin\r\n FDepartureTime := Value;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCGoogleRoutesOptions.SetHTMLFormattedInstructions(\r\n const Value: Boolean);\r\nbegin\r\n if FHTMLFormattedInstructions <> Value then\r\n begin\r\n FHTMLFormattedInstructions := Value;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCGoogleRoutesOptions.SetIncludeFuelEfficientRoute(\r\n const Value: Boolean);\r\nbegin\r\n if FIncludeFuelEfficientRoute <> Value then\r\n begin\r\n FIncludeFuelEfficientRoute := Value;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCGoogleRoutesOptions.SetRoutingMode(const Value: TTMSFNCGoogleRoutesRoutingMode);\r\nbegin\r\n if FRoutingMode <> Value then\r\n begin\r\n FRoutingMode := Value;\r\n end;\r\nend;\r\n\r\n{ TTMSFNCGoogleRoutesTravelAdvisory }\r\n\r\nprocedure TTMSFNCGoogleRoutesTravelAdvisory.Assign(Source: TPersistent);\r\nbegin\r\n if (Source is TTMSFNCGoogleRoutesTravelAdvisory) then\r\n begin\r\n FSpeedReadingIntervals := (Source as TTMSFNCGoogleRoutesTravelAdvisory).SpeedReadingIntervals;\r\n FFuelConsumptionMicroliters := (Source as TTMSFNCGoogleRoutesTravelAdvisory).FuelConsumptionMicroliters;\r\n end\r\n else\r\n inherited;\r\nend;\r\n\r\nconstructor TTMSFNCGoogleRoutesTravelAdvisory.Create;\r\nbegin\r\n FSpeedReadingIntervals := TTMSFNCSpeedReadingIntervals.Create(Self);\r\n FFuelConsumptionMicroliters := 0;\r\nend;\r\n\r\ndestructor TTMSFNCGoogleRoutesTravelAdvisory.Destroy;\r\nbegin\r\n FSpeedReadingIntervals.Free;\r\nend;\r\n\r\nprocedure TTMSFNCGoogleRoutesTravelAdvisory.SetFuelConsumptionMicroliters(\r\n const Value: Integer);\r\nbegin\r\n FFuelConsumptionMicroliters := Value;\r\nend;\r\n\r\nprocedure TTMSFNCGoogleRoutesTravelAdvisory.SetSpeedReadingIntervals(\r\n const Value: TTMSFNCSpeedReadingIntervals);\r\nbegin\r\n FSpeedReadingIntervals.Assign(Value);\r\nend;\r\n\r\n{ TTMSFNCGoogleRoutesRequests }\r\n\r\nfunction TTMSFNCGoogleRoutesRequests.CreateItemClass: TCollectionItemClass;\r\nbegin\r\n Result := TTMSFNCGoogleRoutesRequest;\r\nend;\r\n\r\nfunction TTMSFNCGoogleRoutesRequests.GetItem(\r\n Index: Integer): TTMSFNCGoogleRoutesRequest;\r\nbegin\r\n Result := TTMSFNCGoogleRoutesRequest(inherited Items[Index]);\r\nend;\r\n\r\nprocedure TTMSFNCGoogleRoutesRequests.SetItem(Index: Integer;\r\n const Value: TTMSFNCGoogleRoutesRequest);\r\nbegin\r\n inherited Items[Index] := Value;\r\nend;\r\n\r\n{ TTMSFNCGoogleRoutesRequest }\r\n\r\nfunction TTMSFNCGoogleRoutesRequest.GetDirectionsItemsClass: TTMSFNCDirectionsItemsClass;\r\nbegin\r\n Result := TTMSFNCGoogleRoutesItems;\r\nend;\r\n\r\nfunction TTMSFNCGoogleRoutesRequest.GetItems: TTMSFNCGoogleRoutesItems;\r\nbegin\r\n Result := TTMSFNCGoogleRoutesItems(inherited Items);\r\nend;\r\n\r\n{ TTMSFNCGoogleRoutesItems }\r\n\r\nfunction TTMSFNCGoogleRoutesItems.CreateItemClass: TCollectionItemClass;\r\nbegin\r\n Result := TTMSFNCGoogleRoutesItem;\r\nend;\r\n\r\nfunction TTMSFNCGoogleRoutesItems.GetItem(\r\n Index: Integer): TTMSFNCGoogleRoutesItem;\r\nbegin\r\n Result := TTMSFNCGoogleRoutesItem(inherited Items[Index]);\r\nend;\r\n\r\n{ TTMSFNCGoogleRoutesItem }\r\n\r\nprocedure TTMSFNCGoogleRoutesItem.Assign(Source: TPersistent);\r\nbegin\r\n inherited;\r\n if Source is TTMSFNCGoogleRoutesItem then\r\n begin\r\n FRouteLabels.Assign(TTMSFNCGoogleRoutesItem(Source).RouteLabels);\r\n FTravelAdvisory.Assign(TTMSFNCGoogleRoutesItem(Source).TravelAdvisory);\r\n end;\r\nend;\r\n\r\nconstructor TTMSFNCGoogleRoutesItem.Create(ACollection: TCollection);\r\nbegin\r\n inherited;\r\n FRouteLabels := TStringList.Create;\r\n FTravelAdvisory := TTMSFNCGoogleRoutesTravelAdvisory.Create;\r\nend;\r\n\r\ndestructor TTMSFNCGoogleRoutesItem.Destroy;\r\nbegin\r\n FRouteLabels.Free;\r\n FTravelAdvisory.Free;\r\n inherited;\r\nend;\r\n\r\nprocedure TTMSFNCGoogleRoutesItem.SetRouteLabels(const Value: TStringList);\r\nbegin\r\n FRouteLabels.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCGoogleRoutesItem.SetTravelAdivsory(\r\n const Value: TTMSFNCGoogleRoutesTravelAdvisory);\r\nbegin\r\n FTravelAdvisory := Value;\r\nend;\r\n\r\n{ TTMSFNCSpeedReadingIntervals }\r\n\r\nfunction TTMSFNCSpeedReadingIntervals.Add: TTMSFNCSpeedReadingInterval;\r\nbegin\r\n Result := TTMSFNCSpeedReadingInterval(inherited Add);\r\nend;\r\n\r\nconstructor TTMSFNCSpeedReadingIntervals.Create(AOwner: TPersistent);\r\nbegin\r\n inherited Create(AOwner, CreateItemClass);\r\n FOwner := AOwner;\r\nend;\r\n\r\nfunction TTMSFNCSpeedReadingIntervals.CreateItemClass: TCollectionItemClass;\r\nbegin\r\n Result := TTMSFNCSpeedReadingInterval;\r\nend;\r\n\r\nfunction TTMSFNCSpeedReadingIntervals.GetItem(\r\n Index: Integer): TTMSFNCSpeedReadingInterval;\r\nbegin\r\n Result := TTMSFNCSpeedReadingInterval(inherited Items[Index]);\r\nend;\r\n\r\nfunction TTMSFNCSpeedReadingIntervals.GetOwner: TPersistent;\r\nbegin\r\n Result := FOwner;\r\nend;\r\n\r\nfunction TTMSFNCSpeedReadingIntervals.Insert(\r\n Index: Integer): TTMSFNCSpeedReadingInterval;\r\nbegin\r\n Result := TTMSFNCSpeedReadingInterval(inherited Insert(Index));\r\nend;\r\n\r\nprocedure TTMSFNCSpeedReadingIntervals.SetItem(Index: Integer;\r\n const Value: TTMSFNCSpeedReadingInterval);\r\nbegin\r\n inherited Items[Index] := Value;\r\nend;\r\n\r\n{ TTMSFNCSpeedReadingInterval }\r\n\r\nprocedure TTMSFNCSpeedReadingInterval.Assign(Source: TPersistent);\r\nbegin\r\n inherited;\r\n\r\nend;\r\n\r\nconstructor TTMSFNCSpeedReadingInterval.Create(ACollection: TCollection);\r\nbegin\r\n inherited;\r\n if Assigned(ACollection) then\r\n FOwner := (Collection as TTMSFNCSpeedReadingIntervals).FOwner;\r\n\r\n FStartPolylinePointIndex := -1;\r\n FEndPolylinePointIndex := 0;\r\n FSpeed := '';\r\nend;\r\n\r\ndestructor TTMSFNCSpeedReadingInterval.Destroy;\r\nbegin\r\n inherited;\r\nend;\r\n\r\nend.\r\n","{********************************************************************}\r\n{ }\r\n{ written by TMS Software }\r\n{ copyright (c) 2020 - 2025 }\r\n{ Email : info@tmssoftware.com }\r\n{ Web : http://www.tmssoftware.com }\r\n{ }\r\n{ The source code is given as is. The author is not responsible }\r\n{ for any possible damage done due to the use of this code. }\r\n{ The complete source code remains property of the author and may }\r\n{ not be distributed, published, given or sold in any form as such. }\r\n{ No parts of the source code can be included in any other component }\r\n{ or application without written authorization of the author. }\r\n{********************************************************************}\r\n\r\nunit WEBLib.TMSFNCDirections;\r\n\r\n{$I WEBLib.TMSFNCDefines.inc}\r\n\r\n{$IFDEF WEBLIB}\r\n{$DEFINE LCLWEBLIB}\r\n{$ENDIF}\r\n{$IFDEF LCLLIB}\r\n{$DEFINE LCLWEBLIB}\r\n{$ENDIF}\r\n\r\n{$IFNDEF LCLLIB}\r\n{$HINTS OFF}\r\n{$IF COMPILERVERSION > 23}\r\n{$DEFINE UNREGISTER}\r\n{$IFEND}\r\n{$HINTS ON}\r\n{$ENDIF}\r\n{$IFDEF LCLLIB}\r\n{$DEFINE UNREGISTER}\r\n{$ENDIF}\r\n\r\ninterface\r\n\r\nuses\r\n Classes, Types, WEBLib.Forms\r\n {$IFNDEF LCLWEBLIB}\r\n ,Generics.Collections\r\n {$ENDIF}\r\n {$IFDEF LCLLIB}\r\n ,fgl\r\n {$ENDIF}\r\n {$IFDEF WEBLIB}\r\n ,web, Contnrs\r\n {$ENDIF}\r\n {$IFDEF CMNLIB}\r\n {$ENDIF}\r\n ,WEBLib.TMSFNCTypes\r\n ,WEBLib.TMSFNCMapsCommonTypes\r\n ,WEBLib.TMSFNCCloudBase;\r\n\r\nconst\r\n TTMSFNCDirectionsDocURL = TTMSFNCBaseDocURL + 'tmsfncmaps/components/ttmsfncmaps/#ttmsfncdirections';\r\n TTMSFNCDirectionsTipsURL = 'https://www.tmssoftware.com/site/tmsfncmaps.asp?s=faq';\r\n\r\n MAJ_VER = 1; // Major version nr.\r\n MIN_VER = 6; // Minor version nr.\r\n REL_VER = 1; // Release nr.\r\n BLD_VER = 0; // Build nr.\r\n\r\n //v1.0.0.0: First release\r\n //v1.0.1.0: New : TravelMode tmPublicTransport, tmTruck added (where available)\r\n // : New : Directions result Status and ErrorMessage added\r\n //v1.1.0.0: New : Here directions service updated to Routing API v8\r\n //v1.1.1.0: New : GetDirections AvoidTolls parameter\r\n //v1.1.2.0: New : WayPoints.OptimizedIndex added for Google, Here and TomTom\r\n //v1.2.0.0: New : Support for OpenRouteService directions\r\n //v1.3.0.0: New : Support for GeoApify directions\r\n //v1.3.0.1: Fixed : Here: Issue with Distance and Duration values\r\n //v1.4.0.0: New : Google: Support for Origin, Destination and WayPoints string values\r\n //v1.5.0.0: New : SaveToGPXFile, SaveToGPXStream, SaveToGPXText added\r\n // : New : Google: Leg StartAddress and EndAddress added\r\n //v1.6.0.0: New : GetDirections AvoidHighWays parameter\r\n // : New : GetDirections simplified overloads\r\n //v1.6.1.0: New : Switch to Google Routes API with UseGoogleRoutes\r\n\r\ntype\r\n TTMSFNCDirectionsTravelMode = (tmDriving, tmWalking, tmBicycling, tmPublicTransport, tmTruck);\r\n TTMSFNCCustomDirections = class;\r\n TTMSFNCDirectionsRequest = class;\r\n TTMSFNCDirectionsItems = class;\r\n TTMSFNCDirectionsItem = class;\r\n\r\n ITMSFNCCustomDirectionsProperties = interface(IInterface)\r\n ['{7E76D35C-397F-4D05-AAAB-3CE44C082FE7}']\r\n function GetAPIKey: string;\r\n function GetTruckOptions(var AOptions: string; AAvoidTolls: Boolean): string;\r\n function GetGoogleRoutesOptions(var AOptions: string; ATravelMode: TTMSFNCDirectionsTravelMode;\r\n AWayPoints: TTMSFNCMapsCoordinateRecArray; AWayPointsList: TStringList; AOptimizeWayPoints: Boolean): string;\r\n end;\r\n\r\n ITMSFNCCustomDirectionsInstance = interface(IInterface)\r\n ['{BB0799B8-FE15-4E10-AC1D-7490C887DB7C}']\r\n procedure SetDirectionsProperties(const Value: ITMSFNCCustomDirectionsProperties);\r\n end;\r\n\r\n ITMSFNCCustomDirections = interface(IInterface)\r\n ['{EDE79341-AAA4-4E89-B471-47365BDC999D}']\r\n function GetIdentifier: string;\r\n function GetRequestMethod: TTMSFNCCloudBaseRequestMethod;\r\n function GetHost: string;\r\n function GetPath(AOrigin, ADestination: string; AOriginLatitude, AOriginLongitude,\r\n ADestinationLatitude, ADestinationLongitude: Double;\r\n ATravelMode: TTMSFNCDirectionsTravelMode; AWayPoints: TTMSFNCMapsCoordinateRecArray = nil): string;\r\n function GetQuery(AOrigin, ADestination: string; AOriginLatitude, AOriginLongitude,\r\n ADestinationLatitude, ADestinationLongitude: Double; AAlternatives: Boolean = False;\r\n ATravelMode: TTMSFNCDirectionsTravelMode = tmDriving; AWayPointList: TStringList = nil; \r\n AWayPoints: TTMSFNCMapsCoordinateRecArray = nil;\r\n AOptimizeWayPoints: Boolean = False; ALocale: string = ''; AAvoidTolls: Boolean = False; AAvoidHighWays: Boolean = False): string;\r\n function GetPostData(AOrigin, ADestination: string; AOriginLatitude, AOriginLongitude, ADestinationLatitude,\r\n ADestinationLongitude: Double; AAlternatives: Boolean = False;\r\n ATravelMode: TTMSFNCDirectionsTravelMode = tmDriving; AWayPointList: TStringList = nil;\r\n AWayPoints: TTMSFNCMapsCoordinateRecArray = nil;\r\n AOptimizeWayPoints: Boolean = False; ALocale: string = '';\r\n AAvoidTolls: Boolean = False;\r\n AAvoidHighWays: Boolean = False): string;\r\n procedure AddHeaders(AHeaders: TTMSFNCCloudBaseRequestHeaders);\r\n procedure Parse(ARequest: TTMSFNCDirectionsRequest; ARequestResult: string);\r\n function IsValid: Boolean;\r\n procedure DestroyDirections;\r\n end;\r\n\r\n ITMSFNCDirectionsService = interface(IInterface)\r\n ['{74DDA282-D3BD-4883-8A49-CE2F67BF32AB}']\r\n function CreateDirections: ITMSFNCCustomDirections;\r\n procedure DestroyDirections(ADirections: ITMSFNCCustomDirections);\r\n end;\r\n\r\n ITMSFNCDirectionsServiceGoogle = interface(ITMSFNCDirectionsService)\r\n ['{6A97B0E0-8F24-4E04-9110-E1472169FF20}']\r\n end;\r\n\r\n ITMSFNCDirectionsServiceGoogleRoutes = interface(ITMSFNCDirectionsService)\r\n ['{65FF008D-06F9-418D-8399-7DCB12003B17}']\r\n end;\r\n\r\n ITMSFNCDirectionsServiceHere = interface(ITMSFNCDirectionsService)\r\n ['{0CD111D1-2C73-47A0-86B2-04CFFD819AAF}']\r\n end;\r\n\r\n ITMSFNCDirectionsServiceBing = interface(ITMSFNCDirectionsService)\r\n ['{6A0EED0A-BBE0-4092-956F-37A0055A64B2}']\r\n end;\r\n\r\n ITMSFNCDirectionsServiceAzure = interface(ITMSFNCDirectionsService)\r\n ['{A8DBA06B-C950-4B88-B124-58A67600E0F5}']\r\n end;\r\n\r\n ITMSFNCDirectionsServiceMapBox = interface(ITMSFNCDirectionsService)\r\n ['{8695A289-6B14-472C-AA32-617B913173FD}']\r\n end;\r\n\r\n ITMSFNCDirectionsServiceTomTom = interface(ITMSFNCDirectionsService)\r\n ['{111375A8-5C34-4AA9-A612-E3FB70944928}']\r\n end;\r\n\r\n ITMSFNCDirectionsServiceOpenRouteService = interface(ITMSFNCDirectionsService)\r\n ['{ABDB1BFD-AEBF-421A-B744-98E7040803F9}']\r\n end;\r\n\r\n ITMSFNCDirectionsServiceGeoApify = interface(ITMSFNCDirectionsService)\r\n ['{BFB8236B-9D74-4F67-BCFB-1641107C4DEA}']\r\n end;\r\n\r\n TTMSFNCDirectionsService = (dsGoogle, dsHere, dsBing, dsAzure, dsMapBox, dsTomTom, dsOpenRouteService, dsGeoApify);\r\n\r\n TTMSFNCDirectionsStep = class(TCollectionItem)\r\n private\r\n FOwner: TCollectionItem;\r\n FDataBoolean: Boolean;\r\n FDataString: string;\r\n FDataObject: TObject;\r\n FDataInteger: NativeInt;\r\n FDataPointer: Pointer;\r\n FDistance: Integer;\r\n FDuration: Integer;\r\n FStartLocation: TTMSFNCMapsCoordinate;\r\n FInstructions: string;\r\n FEndLocation: TTMSFNCMapsCoordinate;\r\n FCoordinates: TTMSFNCMapsCoordinates;\r\n procedure SetCoordinates(const Value: TTMSFNCMapsCoordinates);\r\n public\r\n constructor Create(ACollection: TCollection); override;\r\n procedure Assign(Source: TPersistent); override;\r\n destructor Destroy; override;\r\n property DataPointer: Pointer read FDataPointer write FDataPointer;\r\n property DataBoolean: Boolean read FDataBoolean write FDataBoolean;\r\n property DataObject: TObject read FDataObject write FDataObject;\r\n property DataString: string read FDataString write FDataString;\r\n property DataInteger: NativeInt read FDataInteger write FDataInteger;\r\n published\r\n property Coordinates: TTMSFNCMapsCoordinates read FCoordinates write SetCoordinates;\r\n property StartLocation: TTMSFNCMapsCoordinate read FStartLocation write FStartLocation;\r\n property EndLocation: TTMSFNCMapsCoordinate read FEndLocation write FEndLocation;\r\n property Distance: Integer read FDistance write FDistance;\r\n property Duration: Integer read FDuration write FDuration;\r\n property Instructions: string read FInstructions write FInstructions;\r\n end;\r\n\r\n {$IFDEF WEBLIB}\r\n TTMSFNCDirectionsSteps = class(TTMSFNCOwnedCollection)\r\n {$ELSE}\r\n TTMSFNCDirectionsSteps = class({$IFDEF LCLLIB}specialize {$ENDIF}TTMSFNCOwnedCollection)\r\n {$ENDIF}\r\n private\r\n FOwner: TCollectionItem;\r\n function GetItem(Index: Integer): TTMSFNCDirectionsStep;\r\n procedure SetItem(Index: Integer; const Value: TTMSFNCDirectionsStep);\r\n protected\r\n function CreateItemClass: TCollectionItemClass; virtual;\r\n function GetOwner: TPersistent; override;\r\n public\r\n constructor Create(AOwner: TCollectionItem); virtual;\r\n property Items[Index: Integer]: TTMSFNCDirectionsStep read GetItem write SetItem; default;\r\n function Add: TTMSFNCDirectionsStep;\r\n function Insert(Index: Integer): TTMSFNCDirectionsStep;\r\n end;\r\n\r\n TTMSFNCDirectionsLeg = class(TCollectionItem)\r\n private\r\n FOwner: TCollectionItem;\r\n FDataBoolean: Boolean;\r\n FDataString: string;\r\n FDataObject: TObject;\r\n FDataInteger: NativeInt;\r\n FDataPointer: Pointer;\r\n FDistance: Integer;\r\n FDuration: Integer;\r\n FStartLocation: TTMSFNCMapsCoordinate;\r\n FEndLocation: TTMSFNCMapsCoordinate;\r\n FCoordinates: TTMSFNCMapsCoordinates;\r\n FSteps: TTMSFNCDirectionsSteps;\r\n FStartAddress: string;\r\n FEndAddress: string;\r\n procedure SetCoordinates(const Value: TTMSFNCMapsCoordinates);\r\n procedure SetSteps(const Value: TTMSFNCDirectionsSteps);\r\n public\r\n constructor Create(ACollection: TCollection); override;\r\n procedure Assign(Source: TPersistent); override;\r\n destructor Destroy; override;\r\n property DataPointer: Pointer read FDataPointer write FDataPointer;\r\n property DataBoolean: Boolean read FDataBoolean write FDataBoolean;\r\n property DataObject: TObject read FDataObject write FDataObject;\r\n property DataString: string read FDataString write FDataString;\r\n property DataInteger: NativeInt read FDataInteger write FDataInteger;\r\n published\r\n property Coordinates: TTMSFNCMapsCoordinates read FCoordinates write SetCoordinates;\r\n property StartAddress: string read FStartAddress write FStartAddress;\r\n property StartLocation: TTMSFNCMapsCoordinate read FStartLocation write FStartLocation;\r\n property EndAddress: string read FEndAddress write FEndAddress;\r\n property EndLocation: TTMSFNCMapsCoordinate read FEndLocation write FEndLocation;\r\n property Distance: Integer read FDistance write FDistance;\r\n property Duration: Integer read FDuration write FDuration;\r\n property Steps: TTMSFNCDirectionsSteps read FSteps write SetSteps;\r\n end;\r\n\r\n {$IFDEF WEBLIB}\r\n TTMSFNCDirectionsLegs = class(TTMSFNCOwnedCollection)\r\n {$ELSE}\r\n TTMSFNCDirectionsLegs = class({$IFDEF LCLLIB}specialize {$ENDIF}TTMSFNCOwnedCollection)\r\n {$ENDIF}\r\n private\r\n FOwner: TCollectionItem;\r\n function GetItem(Index: Integer): TTMSFNCDirectionsLeg;\r\n procedure SetItem(Index: Integer; const Value: TTMSFNCDirectionsLeg);\r\n protected\r\n function CreateItemClass: TCollectionItemClass; virtual;\r\n function GetOwner: TPersistent; override;\r\n public\r\n constructor Create(AOwner: TCollectionItem); virtual;\r\n property Items[Index: Integer]: TTMSFNCDirectionsLeg read GetItem write SetItem; default;\r\n function Add: TTMSFNCDirectionsLeg;\r\n function Insert(Index: Integer): TTMSFNCDirectionsLeg;\r\n end;\r\n\r\n TTMSFNCDirectionsWayPoint = class(TCollectionItem)\r\n private\r\n FOwner: TCollectionItem;\r\n FDataBoolean: Boolean;\r\n FDataString: string;\r\n FDataObject: TObject;\r\n FDataInteger: NativeInt;\r\n FDataPointer: Pointer;\r\n FDistance: Integer;\r\n FDuration: Integer;\r\n FOptimizedIndex: Integer;\r\n public\r\n constructor Create(ACollection: TCollection); override;\r\n procedure Assign(Source: TPersistent); override;\r\n destructor Destroy; override;\r\n property DataPointer: Pointer read FDataPointer write FDataPointer;\r\n property DataBoolean: Boolean read FDataBoolean write FDataBoolean;\r\n property DataObject: TObject read FDataObject write FDataObject;\r\n property DataString: string read FDataString write FDataString;\r\n property DataInteger: NativeInt read FDataInteger write FDataInteger;\r\n published\r\n property Distance: Integer read FDistance write FDistance;\r\n property Duration: Integer read FDuration write FDuration;\r\n property OptimizedIndex: Integer read FOptimizedIndex write FOptimizedIndex;\r\n end;\r\n\r\n {$IFDEF WEBLIB}\r\n TTMSFNCDirectionsWayPoints = class(TTMSFNCOwnedCollection)\r\n {$ELSE}\r\n TTMSFNCDirectionsWayPoints = class({$IFDEF LCLLIB}specialize {$ENDIF}TTMSFNCOwnedCollection)\r\n {$ENDIF}\r\n private\r\n FOwner: TCollectionItem;\r\n function GetItem(Index: Integer): TTMSFNCDirectionsWayPoint;\r\n procedure SetItem(Index: Integer; const Value: TTMSFNCDirectionsWayPoint);\r\n protected\r\n function CreateItemClass: TCollectionItemClass; virtual;\r\n function GetOwner: TPersistent; override;\r\n public\r\n constructor Create(AOwner: TCollectionItem); virtual;\r\n property Items[Index: Integer]: TTMSFNCDirectionsWayPoint read GetItem write SetItem; default;\r\n function Add: TTMSFNCDirectionsWayPoint;\r\n function Insert(Index: Integer): TTMSFNCDirectionsWayPoint;\r\n end;\r\n\r\n TTMSFNCDirectionsItem = class(TCollectionItem)\r\n private\r\n FOwner: TTMSFNCCustomDirections;\r\n FDataBoolean: Boolean;\r\n FDataString: String;\r\n FDataObject: TObject;\r\n FDataInteger: NativeInt;\r\n FDataPointer: Pointer;\r\n FCoordinates: TTMSFNCMapsCoordinates;\r\n FSummary: string;\r\n FDistance: Double;\r\n FDuration: Integer;\r\n FSteps: TTMSFNCDirectionsSteps;\r\n FLegs: TTMSFNCDirectionsLegs;\r\n FWayPoints: TTMSFNCDirectionsWayPoints;\r\n procedure SetCoordinates(const Value: TTMSFNCMapsCoordinates);\r\n function GetBounds: TTMSFNCMapsBounds;\r\n procedure SetSteps(const Value: TTMSFNCDirectionsSteps);\r\n procedure SetLegs(const Value: TTMSFNCDirectionsLegs);\r\n procedure SetWayPoints(const Value: TTMSFNCDirectionsWayPoints);\r\n public\r\n constructor Create(ACollection: TCollection); override;\r\n procedure Assign(Source: TPersistent); override;\r\n destructor Destroy; override;\r\n property DataPointer: Pointer read FDataPointer write FDataPointer;\r\n property DataBoolean: Boolean read FDataBoolean write FDataBoolean;\r\n property DataObject: TObject read FDataObject write FDataObject;\r\n property DataString: String read FDataString write FDataString;\r\n property DataInteger: NativeInt read FDataInteger write FDataInteger;\r\n property Bounds: TTMSFNCMapsBounds read GetBounds;\r\n property Legs: TTMSFNCDirectionsLegs read FLegs write SetLegs;\r\n published\r\n property Coordinates: TTMSFNCMapsCoordinates read FCoordinates write SetCoordinates;\r\n property Distance: Double read FDistance write FDistance;\r\n property Duration: Integer read FDuration write FDuration;\r\n property Summary: string read FSummary write FSummary;\r\n property WayPoints: TTMSFNCDirectionsWayPoints read FWayPoints write SetWayPoints;\r\n property Steps: TTMSFNCDirectionsSteps read FSteps write SetSteps;\r\n end;\r\n\r\n {$IFDEF WEBLIB}\r\n TTMSFNCDirectionsItems = class(TTMSFNCOwnedCollection)\r\n {$ELSE}\r\n TTMSFNCDirectionsItems = class({$IFDEF LCLLIB}specialize {$ENDIF}TTMSFNCOwnedCollection)\r\n {$ENDIF}\r\n private\r\n FOwner: TTMSFNCCustomDirections;\r\n function GetItem(Index: Integer): TTMSFNCDirectionsItem;\r\n procedure SetItem(Index: Integer; const Value: TTMSFNCDirectionsItem);\r\n protected\r\n function CreateItemClass: TCollectionItemClass; virtual;\r\n function GetOwner: TPersistent; override;\r\n public\r\n constructor Create(AOwner: TTMSFNCCustomDirections); virtual;\r\n property Items[Index: Integer]: TTMSFNCDirectionsItem read GetItem write SetItem; default;\r\n function Add: TTMSFNCDirectionsItem;\r\n function Insert(Index: Integer): TTMSFNCDirectionsItem;\r\n end;\r\n\r\n TTMSFNCDirectionsItemsClass = class of TTMSFNCDirectionsItems;\r\n\r\n TTMSFNCDirectionsRequest = class(TCollectionItem)\r\n private\r\n FOwner: TTMSFNCCustomDirections;\r\n FDataPointer: Pointer;\r\n FDataBoolean: Boolean;\r\n FDataString: String;\r\n FDataObject: TObject;\r\n FDataInteger: NativeInt;\r\n FItems: TTMSFNCDirectionsItems;\r\n FID: string;\r\n FTraveLmode: TTMSFNCDirectionsTravelMode;\r\n FStatus: string;\r\n FErrorMessage: string;\r\n procedure SetItems(const Value: TTMSFNCDirectionsItems);\r\n procedure SetTravelMode(const Value: TTMSFNCDirectionsTravelMode);\r\n procedure SetErrorMessage(const Value: string);\r\n procedure SetStatus(const Value: string);\r\n protected\r\n function GetDirectionsItemsClass: TTMSFNCDirectionsItemsClass; virtual;\r\n public\r\n constructor Create(ACollection: TCollection); override;\r\n procedure Assign(Source: TPersistent); override;\r\n destructor Destroy; override;\r\n property DataPointer: Pointer read FDataPointer write FDataPointer;\r\n property DataBoolean: Boolean read FDataBoolean write FDataBoolean;\r\n property DataObject: TObject read FDataObject write FDataObject;\r\n property DataString: String read FDataString write FDataString;\r\n property DataInteger: NativeInt read FDataInteger write FDataInteger;\r\n published\r\n property ID: string read FID;\r\n property Items: TTMSFNCDirectionsItems read FItems write SetItems;\r\n property TravelMode: TTMSFNCDirectionsTravelMode read FTraveLmode write SetTravelMode;\r\n property Status: string read FStatus write SetStatus;\r\n property ErrorMessage: string read FErrorMessage write SetErrorMessage;\r\n end;\r\n\r\n {$IFDEF WEBLIB}\r\n TTMSFNCDirectionsRequests = class(TTMSFNCOwnedCollection)\r\n {$ELSE}\r\n TTMSFNCDirectionsRequests = class({$IFDEF LCLLIB}specialize {$ENDIF}TTMSFNCOwnedCollection)\r\n {$ENDIF}\r\n private\r\n FOwner: TTMSFNCCustomDirections;\r\n function GetItem(Index: Integer): TTMSFNCDirectionsRequest;\r\n procedure SetItem(Index: Integer; const Value: TTMSFNCDirectionsRequest);\r\n protected\r\n function CreateItemClass: TCollectionItemClass; virtual;\r\n function GetOwner: TPersistent; override;\r\n public\r\n constructor Create(AOwner: TTMSFNCCustomDirections); virtual;\r\n property Items[Index: Integer]: TTMSFNCDirectionsRequest read GetItem write SetItem; default;\r\n function Add: TTMSFNCDirectionsRequest;\r\n function Insert(Index: Integer): TTMSFNCDirectionsRequest;\r\n end;\r\n\r\n TTMSFNCDirectionsRequestsClass = class of TTMSFNCDirectionsRequests;\r\n\r\n { TTMSFNCCustomDirections }\r\n TTMSFNCDirectionsGetDirectionsCallback = {$IFNDEF LCLLIB}reference to {$ENDIF}procedure(const ARequest: TTMSFNCDirectionsRequest; const ARequestResult: TTMSFNCCloudBaseRequestResult){$IFDEF LCLLIB} of object{$ENDIF};\r\n TTMSFNCDirectionsGetDirectionsEvent = procedure(Sender: TObject; const ARequest: TTMSFNCDirectionsRequest; const ARequestResult: TTMSFNCCloudBaseRequestResult) of object;\r\n\r\n TTMSFNCDirectionsGetDirectionsResultCallback = {$IFNDEF LCLLIB}reference to {$ENDIF}procedure(const AResult: TTMSFNCDirectionsRequest){$IFDEF LCLLIB} of object{$ENDIF};\r\n TTMSFNCDirectionsGetDirectionsResultEvent = procedure(Sender: TObject; const AResult: TTMSFNCDirectionsRequest) of object;\r\n\r\n TTMSFNCDirectionsOptionsRec = record\r\n Callback: TTMSFNCDirectionsGetDirectionsCallback;\r\n ID: string;\r\n DataPointer: Pointer;\r\n Alternatives: Boolean;\r\n TravelMode: TTMSFNCDirectionsTravelMode;\r\n WayPointStrings: array of string;\r\n WayPointCoordinates: TTMSFNCMapsCoordinateRecArray;\r\n OptimizeWayPoints: Boolean;\r\n Locale: string;\r\n LocaleMode: TTMSFNCMapsLocaleMode;\r\n AvoidTolls: Boolean;\r\n AvoidHighways: Boolean;\r\n end;\r\n\r\n TTMSFNCDirectionsCallBackWrapper = class\r\n private\r\n FCallback: TTMSFNCDirectionsGetDirectionsCallback;\r\n public\r\n constructor Create(ACallback: TTMSFNCDirectionsGetDirectionsCallback);\r\n end;\r\n\r\n TTMSFNCDirectionsResultCallBackWrapper = class\r\n private\r\n FCallback: TTMSFNCDirectionsGetDirectionsResultCallback;\r\n public\r\n constructor Create(ACallback: TTMSFNCDirectionsGetDirectionsResultCallback);\r\n end;\r\n\r\n TTMSFNCCustomDirections = class(TTMSFNCCloudBase, ITMSFNCCustomDirectionsProperties)\r\n private\r\n FDirections: ITMSFNCCustomDirections;\r\n FDirectionsInstance: ITMSFNCCustomDirectionsInstance;\r\n FDirectionsProperties: ITMSFNCCustomDirectionsProperties;\r\n FService: TTMSFNCDirectionsService;\r\n FAPIKey: string;\r\n FDirectionsRequests: TTMSFNCDirectionsRequests;\r\n FOnGetDirections: TTMSFNCDirectionsGetDirectionsEvent;\r\n FOnGetDirectionsInternal: TTMSFNCDirectionsGetDirectionsEvent;\r\n FOnGetDirectionsResultInternal: TTMSFNCDirectionsGetDirectionsResultEvent;\r\n FOnGetDirectionsResult: TTMSFNCDirectionsGetDirectionsResultEvent;\r\n FIsGoogleRoutes: Boolean;\r\n FUseGoogleRoutes: Boolean;\r\n procedure SetService(const Value: TTMSFNCDirectionsService);\r\n procedure SetAPIKey(const Value: string);\r\n procedure SetDirectionsRequests(const Value: TTMSFNCDirectionsRequests);\r\n procedure SetIsGoogleRoutes(const Value: Boolean);\r\n procedure SetUseGoogleRoutes(const Value: Boolean);\r\n protected\r\n procedure DoRequestGetDirections(const ARequestResult: TTMSFNCCloudBaseRequestResult);\r\n procedure DoGetDirections(const ARequest: TTMSFNCDirectionsRequest; const ARequestResult: TTMSFNCCloudBaseRequestResult);\r\n property OnGetDirections: TTMSFNCDirectionsGetDirectionsEvent read FOnGetDirections write FOnGetDirections;\r\n property OnGetDirectionsInternal: TTMSFNCDirectionsGetDirectionsEvent read FOnGetDirectionsInternal write FOnGetDirectionsInternal;\r\n property OnGetDirectionsResult: TTMSFNCDirectionsGetDirectionsResultEvent read FOnGetDirectionsResult write FOnGetDirectionsResult;\r\n property OnGetDirectionsResultInternal: TTMSFNCDirectionsGetDirectionsResultEvent read FOnGetDirectionsResultInternal write FOnGetDirectionsResultInternal;\r\n\r\n procedure InitializeDirections; virtual;\r\n function GetTruckOptions(var AOptions: string; AAVoidTolls: Boolean): string; virtual;\r\n function GetGoogleRoutesOptions(var AOptions: string; ATravelMode: TTMSFNCDirectionsTravelMode;\r\n AWayPoints: TTMSFNCMapsCoordinateRecArray; AWayPointsList: TStringList; AOptimizeWayPoints: Boolean): string; virtual;\r\n function GetInstance: NativeUInt; override;\r\n function GetDirectionsRequests: TTMSFNCDirectionsRequests;\r\n function GetDirectionsRequestsClass: TTMSFNCDirectionsRequestsClass; virtual;\r\n function DirectionsReady: Boolean;\r\n function GetAPIKey: string;\r\n function GetVersionNr: Integer;\r\n function GetDocURL: string; override;\r\n function GetTipsURL: string; override;\r\n function Directions: ITMSFNCCustomDirections;\r\n function GetVersion: string; override;\r\n property IsGoogleRoutes: Boolean read FIsGoogleRoutes write SetIsGoogleRoutes default False;\r\n property Service: TTMSFNCDirectionsService read FService write SetService default dsGoogle;\r\n property APIKey: string read FAPIKey write SetAPIKey;\r\n property DirectionsRequests: TTMSFNCDirectionsRequests read FDirectionsRequests write SetDirectionsRequests;\r\n\r\n property DirectionsInstance: ITMSFNCCustomDirections read FDirections;\r\n property DirectionsProperties: ITMSFNCCustomDirectionsProperties read FDirectionsProperties;\r\n property UseGoogleRoutes: Boolean read FUseGoogleRoutes write SetUseGoogleRoutes default False;\r\n\r\n procedure GetDirectionsInt(AOrigin, ADestination: string; AOriginLatitude, AOriginLongitude, ADestinationLatitude,\r\n ADestinationLongitude: Double; AAlternatives: Boolean = False;\r\n ATravelMode: TTMSFNCDirectionsTravelMode = tmDriving; AWayPointList: TStringList = nil; AWayPoints: TTMSFNCMapsCoordinateRecArray = nil;\r\n AOptimizeWayPoints: Boolean = False; ALocale: string = ''; AMode: TTMSFNCMapsLocaleMode = mlmDefault;\r\n AID: string = ''; ADataPointer: Pointer = nil; ACallback: TTMSFNCDirectionsGetDirectionsCallback = nil; ACallback2: TTMSFNCDirectionsGetDirectionsResultCallback = nil;\r\n AAVoidTolls: Boolean = False; AAvoidHighways: Boolean = False); overload; virtual;\r\n\r\n procedure GetDirectionsInt(AOrigin, ADestination: string; AOriginLatitude, AOriginLongitude, ADestinationLatitude,\r\n ADestinationLongitude: Double; AOptions: TTMSFNCDirectionsOptionsRec); overload; virtual;\r\n\r\n function SaveToGPXInt(ACoordinates: TTMSFNCMapsCoordinateRecArray; AMetaData: TTMSFNCMapsGPXMetaData; AInstructions: TTMSFNCDirectionsSteps): string;\r\n\r\n public\r\n procedure Assign(Source: TPersistent); override;\r\n constructor Create(AOwner: TComponent); override;\r\n destructor Destroy; override;\r\n procedure GetDirections(AOrigin, ADestination: TTMSFNCMapsCoordinateRec; ACallback: TTMSFNCDirectionsGetDirectionsCallback = nil;\r\n AID: string = ''; ADataPointer: Pointer = nil; AAlternatives: Boolean = False; ATravelMode: TTMSFNCDirectionsTravelMode = tmDriving;\r\n AWayPoints: TTMSFNCMapsCoordinateRecArray = nil; AOptimizeWayPoints: Boolean = False; ALocale: string = '';\r\n AMode: TTMSFNCMapsLocaleMode = mlmDefault; AAvoidTolls: Boolean = False; AAvoidHighways: Boolean = False); overload; virtual;\r\n\r\n procedure GetDirections(AOrigin, ADestination: string; ACallback: TTMSFNCDirectionsGetDirectionsCallback = nil;\r\n AID: string = ''; ADataPointer: Pointer = nil; AAlternatives: Boolean = False; ATravelMode: TTMSFNCDirectionsTravelMode = tmDriving;\r\n AWayPoints: TStringList = nil; AOptimizeWayPoints: Boolean = False; ALocale: string = '';\r\n AMode: TTMSFNCMapsLocaleMode = mlmDefault; AAvoidTolls: Boolean = False; AAvoidHighways: Boolean = False); overload; virtual;\r\n\r\n procedure GetDirections(AOrigin, ADestination: TTMSFNCMapsCoordinateRec; AOptions: TTMSFNCDirectionsOptionsRec); overload; virtual;\r\n procedure GetDirections(AOrigin, ADestination: string; AOptions: TTMSFNCDirectionsOptionsRec); overload; virtual;\r\n\r\n procedure GetDirectionsResult(AOrigin, ADestination: TTMSFNCMapsCoordinateRec; ACallback: TTMSFNCDirectionsGetDirectionsResultCallback = nil;\r\n AID: string = ''; ADataPointer: Pointer = nil; AAlternatives: Boolean = False; ATravelMode: TTMSFNCDirectionsTravelMode = tmDriving;\r\n AWayPoints: TTMSFNCMapsCoordinateRecArray = nil; AOptimizeWayPoints: Boolean = False; ALocale: string = '';\r\n AMode: TTMSFNCMapsLocaleMode = mlmDefault; AAvoidTolls: Boolean = False; AAvoidHighways: Boolean = False); overload; virtual;\r\n\r\n procedure GetDirectionsResult(AOrigin, ADestination: string; ACallback: TTMSFNCDirectionsGetDirectionsResultCallback = nil;\r\n AID: string = ''; ADataPointer: Pointer = nil; AAlternatives: Boolean = False; ATravelMode: TTMSFNCDirectionsTravelMode = tmDriving;\r\n AWayPoints: TStringList = nil; AOptimizeWayPoints: Boolean = False; ALocale: string = '';\r\n AMode: TTMSFNCMapsLocaleMode = mlmDefault; AAvoidTolls: Boolean = False; AAvoidHighways: Boolean = False); overload; virtual;\r\n\r\n procedure SaveToGPXStream(ACoordinates: TTMSFNCMapsCoordinateRecArray; AStream: TStream; AInstructions: TTMSFNCDirectionsSteps = nil); overload; virtual;\r\n procedure SaveToGPXStream(ACoordinates: TTMSFNCMapsCoordinateRecArray; AStream: TStream; AMetaData: TTMSFNCMapsGPXMetaData; AInstructions: TTMSFNCDirectionsSteps = nil); overload; virtual;\r\n procedure SaveToGPXFile(ACoordinates: TTMSFNCMapsCoordinateRecArray; AFileName: string; AInstructions: TTMSFNCDirectionsSteps = nil); overload; virtual;\r\n procedure SaveToGPXFile(ACoordinates: TTMSFNCMapsCoordinateRecArray; AFileName: string; AMetaData: TTMSFNCMapsGPXMetaData; AInstructions: TTMSFNCDirectionsSteps = nil); overload; virtual;\r\n function SaveToGPXText(ACoordinates: TTMSFNCMapsCoordinateRecArray; AInstructions: TTMSFNCDirectionsSteps = nil): string; overload; virtual;\r\n function SaveToGPXText(ACoordinates: TTMSFNCMapsCoordinateRecArray; AMetaData: TTMSFNCMapsGPXMetaData; AInstructions: TTMSFNCDirectionsSteps = nil): string; overload; virtual;\r\n end;\r\n\r\n TTMSFNCCustomDirectionsInterfacedObject = class(TInterfacedObject, ITMSFNCCustomDirectionsInstance)\r\n private\r\n FDirectionsProperties: ITMSFNCCustomDirectionsProperties;\r\n function GetDirectionsProperties: ITMSFNCCustomDirectionsProperties;\r\n protected\r\n procedure SetDirectionsProperties(const Value: ITMSFNCCustomDirectionsProperties);\r\n public\r\n property DirectionsProperties: ITMSFNCCustomDirectionsProperties read GetDirectionsProperties;\r\n destructor Destroy; override;\r\n end;\r\n\r\n {$IFDEF WEBLIB}\r\n TTMSFNCDirectionsList = class(TList)\r\n private\r\n function GetItem(Index: Integer): ITMSFNCCustomDirections;\r\n procedure SetItem(Index: Integer; const Value: ITMSFNCCustomDirections);\r\n public\r\n property Items[Index: Integer]: ITMSFNCCustomDirections read GetItem write SetItem; default;\r\n end;\r\n {$ENDIF}\r\n {$IFNDEF WEBLIB}\r\n TTMSFNCDirectionsList = class(TList);\r\n {$ENDIF}\r\n\r\n TTMSFNCDirectionsFactoryService = class(TInterfacedObject, ITMSFNCDirectionsService)\r\n private\r\n FDirections: TTMSFNCDirectionsList;\r\n protected\r\n function DoCreateDirections: ITMSFNCCustomDirections; virtual; abstract;\r\n function CreateDirections: ITMSFNCCustomDirections;\r\n procedure DestroyDirections(ADirections: ITMSFNCCustomDirections);\r\n public\r\n constructor Create;\r\n destructor Destroy; override;\r\n end;\r\n\r\n {$IFNDEF LCLLIB}\r\n {$HINTS OFF}\r\n {$IF COMPILERVERSION > 22}\r\n {$IFNDEF LCLLIB}\r\n [ComponentPlatformsAttribute(TMSPlatformsWeb)]\r\n {$ENDIF}\r\n {$IFEND}\r\n {$HINTS ON}\r\n {$ENDIF}\r\n TTMSFNCDirections = class(TTMSFNCCustomDirections)\r\n protected\r\n procedure RegisterRuntimeClasses; override;\r\n public\r\n property DirectionsInstance;\r\n property DirectionsProperties;\r\n property UseGoogleRoutes;\r\n published\r\n property OnGetDirections;\r\n property OnGetDirectionsResult;\r\n property APIKey;\r\n property DirectionsRequests;\r\n property Service;\r\n property Version;\r\n end;\r\n\r\n TTMSFNCDirectionsPlatformServicesService = class\r\n private\r\n FInterface: IInterface;\r\n FGUID: string;\r\n public\r\n constructor Create(AGUID: string; AInterface: IInterface);\r\n property GUID: string read FGUID;\r\n property &Interface: IInterface read FInterface;\r\n end;\r\n\r\n {$IFDEF WEBLIB}\r\n TTMSFNCDirectionsPlatformServicesList = class(TObjectList)\r\n private\r\n function GetItem(Index: Integer): TTMSFNCDirectionsPlatformServicesService;\r\n procedure SetItem(Index: Integer; const Value: TTMSFNCDirectionsPlatformServicesService);\r\n public\r\n property Items[Index: Integer]: TTMSFNCDirectionsPlatformServicesService read GetItem write SetItem; default;\r\n {$ENDIF}\r\n {$IFNDEF WEBLIB}\r\n TTMSFNCDirectionsPlatformServicesList = class(TObjectList)\r\n {$ENDIF}\r\n private\r\n function GetValue(AGUID: string): IInterface;\r\n public\r\n function ContainsKey(AGUID: string): Boolean;\r\n procedure RemoveByGUID(AGUID: string);\r\n property Interfaces[AGUID: string]: IInterface read GetValue;\r\n end;\r\n\r\n TTMSFNCDirectionsPlatformServices = class\r\n private\r\n FServicesList: TTMSFNCDirectionsPlatformServicesList;\r\n class var FCurrent: TTMSFNCDirectionsPlatformServices;\r\n class var FCurrentReleased: Boolean;\r\n{$IFNDEF AUTOREFCOUNT}\r\n class procedure ReleaseCurrent;\r\n{$ENDIF}\r\n public\r\n constructor Create;\r\n destructor Destroy; override;\r\n procedure AddPlatformService(const AServiceGUID: TGUID; const AService: IInterface);\r\n procedure RemovePlatformService(const AServiceGUID: TGUID);\r\n function GetPlatformService(const AServiceGUID: TGUID): IInterface;\r\n function SupportsPlatformService(const AServiceGUID: TGUID): Boolean; overload;\r\n function SupportsPlatformService(const AServiceGUID: TGUID; var AService: IInterface): Boolean; overload;\r\n class function Current: TTMSFNCDirectionsPlatformServices;\r\n end;\r\n\r\n procedure DecodeValues(AValues: string; ACoordinates: TTMSFNCMapsCoordinates);\r\n function DefaultDirectionsOptions: TTMSFNCDirectionsOptionsRec;\r\n\r\nimplementation\r\n\r\nuses\r\n {$IFDEF MSWINDOWS}\r\n Windows, Registry,\r\n {$ENDIF}\r\n {%H-}Math,\r\n WEBLib.TMSFNCUtils,\r\n WEBLib.TMSFNCDirections.Google,\r\n WEBLib.TMSFNCDirections.GoogleRoutes,\r\n WEBLib.TMSFNCDirections.Here,\r\n WEBLib.TMSFNCDirections.Bing,\r\n WEBLib.TMSFNCDirections.Azure,\r\n WEBLib.TMSFNCDirections.MapBox,\r\n WEBLib.TMSFNCDirections.TomTom,\r\n WEBLib.TMSFNCDirections.OpenRouteService,\r\n WEBLib.TMSFNCDirections.GeoAPify,\r\n SysUtils\r\n {$IFDEF FMXLIB}\r\n ,FMX.Types\r\n {$ENDIF}\r\n ;\r\n\r\nfunction DefaultDirectionsOptions: TTMSFNCDirectionsOptionsRec;\r\nbegin\r\n Result.Callback := nil;\r\n Result.ID := '';\r\n Result.DataPointer := nil;\r\n Result.Alternatives := False;\r\n Result.TravelMode := tmDriving;\r\n {$IFNDEF LCLLIB}\r\n Result.WayPointStrings := [];\r\n {$ENDIF}\r\n Result.Locale := '';\r\n Result.LocaleMode := mlmCountry;\r\n Result.AvoidTolls := False;\r\n Result.AvoidHighways := False;\r\nend;\r\n\r\n{ TTMSFNCCustomDirections }\r\n\r\nfunction TTMSFNCCustomDirections.GetAPIKey: string;\r\nbegin\r\n Result := APIKey;\r\nend;\r\n\r\nfunction TTMSFNCCustomDirections.GetDocURL: string;\r\nbegin\r\n Result := TTMSFNCDirectionsDocURL;\r\nend;\r\n\r\nfunction TTMSFNCCustomDirections.GetGoogleRoutesOptions(\r\n var AOptions: string; ATravelMode: TTMSFNCDirectionsTravelMode;\r\n AWayPoints: TTMSFNCMapsCoordinateRecArray; AWayPointsList: TStringList; AOptimizeWayPoints: Boolean): string;\r\nbegin\r\n Result := AOptions;\r\nend;\r\n\r\nfunction TTMSFNCCustomDirections.GetInstance: NativeUInt;\r\nbegin\r\n Result := HInstance;\r\nend;\r\n\r\nfunction TTMSFNCCustomDirections.GetTipsURL: string;\r\nbegin\r\n Result := TTMSFNCDirectionsTipsURL;\r\nend;\r\n\r\nfunction TTMSFNCCustomDirections.GetTruckOptions(var AOptions: string; AAVoidTolls: Boolean): string;\r\nbegin\r\n Result := AOptions;\r\nend;\r\n\r\nfunction TTMSFNCCustomDirections.GetVersion: string;\r\nvar\r\n vn: Integer;\r\nbegin\r\n vn := GetVersionNr;\r\n Result := IntToStr(Hi(Hiword(vn)))+'.'+IntToStr(Lo(Hiword(vn)))+'.'+IntToStr(Hi(Loword(vn)))+'.'+IntToStr(Lo(Loword(vn)));\r\nend;\r\n\r\nfunction TTMSFNCCustomDirections.GetVersionNr: Integer;\r\nbegin\r\n Result := MakeLong(MakeWord(BLD_VER,REL_VER),MakeWord(MIN_VER,MAJ_VER));\r\nend;\r\n\r\nprocedure TTMSFNCCustomDirections.Assign(Source: TPersistent);\r\nbegin\r\n inherited;\r\n if (Source is TTMSFNCCustomDirections) then\r\n begin\r\n FService := (Source as TTMSFNCCustomDirections).Service;\r\n FAPIKey := (Source as TTMSFNCCustomDirections).APIKey;\r\n FDirectionsRequests.Assign((Source as TTMSFNCCustomDirections).DirectionsRequests);\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomDirections.GetDirections(AOrigin, ADestination: TTMSFNCMapsCoordinateRec; ACallback: TTMSFNCDirectionsGetDirectionsCallback = nil;\r\n AID: string = ''; ADataPointer: Pointer = nil; AAlternatives: Boolean = False; ATravelMode: TTMSFNCDirectionsTravelMode = tmDriving;\r\n AWayPoints: TTMSFNCMapsCoordinateRecArray = nil; AOptimizeWayPoints: Boolean = False; ALocale: string = ''; AMode: TTMSFNCMapsLocaleMode = mlmDefault;\r\n AAvoidTolls: Boolean = False; AAvoidHighways: Boolean = False);\r\nbegin\r\n GetDirectionsInt('', '', AOrigin.Latitude, AOrigin.Longitude, ADestination.Latitude,\r\n ADestination.Longitude, AAlternatives, ATravelMode, nil, AWayPoints, AOptimizeWayPoints,\r\n ALocale, AMode, AID, ADataPointer, ACallback, nil, AAvoidTolls, AAvoidHighways);\r\nend;\r\n\r\nprocedure TTMSFNCCustomDirections.GetDirectionsResult(AOrigin, ADestination: TTMSFNCMapsCoordinateRec; ACallback: TTMSFNCDirectionsGetDirectionsResultCallback = nil;\r\n AID: string = ''; ADataPointer: Pointer = nil; AAlternatives: Boolean = False; ATravelMode: TTMSFNCDirectionsTravelMode = tmDriving;\r\n AWayPoints: TTMSFNCMapsCoordinateRecArray = nil; AOptimizeWayPoints: Boolean = False; ALocale: string = ''; AMode: TTMSFNCMapsLocaleMode = mlmDefault;\r\n AAvoidTolls: Boolean = False; AAvoidHighways: Boolean = False);\r\nbegin\r\n GetDirectionsInt('', '', AOrigin.Latitude, AOrigin.Longitude, ADestination.Latitude,\r\n ADestination.Longitude, AAlternatives, ATravelMode, nil, AWayPoints, AOptimizeWayPoints,\r\n ALocale, AMode, AID, ADataPointer, nil, ACallback, AAvoidTolls, AAvoidHighways);\r\nend;\r\n\r\nprocedure TTMSFNCCustomDirections.GetDirections(AOrigin, ADestination: string;\r\n ACallback: TTMSFNCDirectionsGetDirectionsCallback; AID: string;\r\n ADataPointer: Pointer; AAlternatives: Boolean;\r\n ATravelMode: TTMSFNCDirectionsTravelMode;\r\n AWayPoints: TStringList; AOptimizeWayPoints: Boolean;\r\n ALocale: string; AMode: TTMSFNCMapsLocaleMode; AAvoidTolls: Boolean; AAvoidHighways: Boolean);\r\nbegin\r\n if (Service in [dsGoogle]) or (IsGoogleRoutes) then\r\n begin\r\n GetDirectionsInt(AOrigin, ADestination, 0, 0, 0,\r\n 0, AAlternatives, ATravelMode, AWayPoints, nil, AOptimizeWayPoints,\r\n ALocale, AMode, AID, ADataPointer, ACallback, nil, AAvoidTolls, AAvoidHighways);\r\n end\r\n else\r\n begin\r\n raise Exception.Create('Using AOrigin and ADestination string parameters only supported for Google Directions/Routes');\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomDirections.GetDirectionsResult(AOrigin,\r\n ADestination: string; ACallback: TTMSFNCDirectionsGetDirectionsResultCallback;\r\n AID: string; ADataPointer: Pointer; AAlternatives: Boolean;\r\n ATravelMode: TTMSFNCDirectionsTravelMode;\r\n AWayPoints: TStringList; AOptimizeWayPoints: Boolean;\r\n ALocale: string; AMode: TTMSFNCMapsLocaleMode; AAvoidTolls: Boolean; AAvoidHighways: Boolean);\r\nbegin\r\n if (Service in [dsGoogle]) or (IsGoogleRoutes) then\r\n begin\r\n GetDirectionsInt(AOrigin, ADestination, 0, 0, 0,\r\n 0, AAlternatives, ATravelMode, AWayPoints, nil, AOptimizeWayPoints,\r\n ALocale, AMode, AID, ADataPointer, nil, ACallback, AAvoidTolls, AAvoidHighways);\r\n end\r\n else\r\n begin\r\n raise Exception.Create('Using AOrigin and ADestination string parameters only supported for Google Directions/Routes');\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomDirections.GetDirections(AOrigin,\r\n ADestination: TTMSFNCMapsCoordinateRec;\r\n AOptions: TTMSFNCDirectionsOptionsRec);\r\nbegin\r\n GetDirectionsInt('', '', AOrigin.Latitude, AOrigin.Longitude, ADestination.Latitude,\r\n ADestination.Longitude, AOptions);\r\nend;\r\n\r\nprocedure TTMSFNCCustomDirections.GetDirections(AOrigin, ADestination: string;\r\n AOptions: TTMSFNCDirectionsOptionsRec);\r\nbegin\r\n GetDirectionsInt(AOrigin, ADestination, 0, 0, 0, 0, AOptions);\r\nend;\r\n\r\nprocedure TTMSFNCCustomDirections.GetDirectionsInt(AOrigin,\r\n ADestination: string; AOriginLatitude, AOriginLongitude, ADestinationLatitude,\r\n ADestinationLongitude: Double; AOptions: TTMSFNCDirectionsOptionsRec);\r\nvar\r\n WayPointStrings: TStringList;\r\n I: Integer;\r\nbegin\r\n WayPointStrings := TStringList.Create;\r\n for I := 0 to Length(AOptions.WayPointStrings) - 1 do\r\n begin\r\n WayPointStrings.Add(AOptions.WayPointStrings[I]);\r\n end;\r\n\r\n GetDirectionsInt(AOrigin, ADestination, AOriginLatitude, AOriginLongitude, ADestinationLatitude,\r\n ADestinationLongitude, AOptions.Alternatives, AOptions.TravelMode, WayPointStrings, AOptions.WayPointCoordinates, AOptions.OptimizeWayPoints,\r\n AOptions.Locale, AOptions.LocaleMode, AOptions.ID, AOptions.DataPointer, AOptions.Callback, nil, AOptions.AvoidTolls, AOptions.AvoidHighways);\r\n\r\n WayPointStrings.Free;\r\nend;\r\n\r\nprocedure TTMSFNCCustomDirections.GetDirectionsInt(AOrigin, ADestination: string; AOriginLatitude, AOriginLongitude, ADestinationLatitude, ADestinationLongitude: Double;\r\n AAlternatives: Boolean = False; ATravelMode: TTMSFNCDirectionsTravelMode = tmDriving; AWayPointList: TStringList = nil; AWayPoints: TTMSFNCMapsCoordinateRecArray = nil;\r\n AOptimizeWayPoints: Boolean = False; ALocale: string = ''; AMode: TTMSFNCMapsLocaleMode = mlmDefault; AID: string = '';\r\n ADataPointer: Pointer = nil; ACallback: TTMSFNCDirectionsGetDirectionsCallback = nil; ACallback2: TTMSFNCDirectionsGetDirectionsResultCallback = nil; AAvoidTolls: Boolean = False;\r\n AAvoidHighways: Boolean = False);\r\nbegin\r\n {$IFDEF WEBLIB}\r\n if Service = dsGoogle then\r\n begin\r\n raise Exception.Create('The Google Directions/Routes API does not support client-side requests from a browser.');\r\n Exit;\r\n end;\r\n {$ENDIF}\r\n\r\n if not DirectionsReady then\r\n begin\r\n raise Exception.Create('Please set API key!');\r\n Exit;\r\n end;\r\n\r\n Request.Clear;\r\n Request.ClearHeaders;\r\n FDirections.AddHeaders(Request.Headers);\r\n Request.Name := 'GET DIRECTIONS';\r\n Request.DataString := AID;\r\n Request.DataPointer := ADataPointer;\r\n\r\n if Assigned(ACallback) then\r\n Request.DataObject := TTMSFNCDirectionsCallBackWrapper.Create(ACallback)\r\n else if Assigned(ACallback2) then\r\n Request.DataObject := TTMSFNCDirectionsResultCallBackWrapper.Create(ACallback2);\r\n\r\n Request.Method := FDirections.GetRequestMethod;\r\n Request.Host := FDirections.GetHost;\r\n Request.Path := FDirections.GetPath(TTMSFNCUtils.URLEncode(AOrigin), TTMSFNCUtils.URLEncode(ADestination), AOriginLatitude,\r\n AOriginLongitude, ADestinationLatitude, ADestinationLongitude, ATravelMode, AWayPoints);\r\n Request.Query := FDirections.GetQuery(TTMSFNCUtils.URLEncode(AOrigin), TTMSFNCUtils.URLEncode(ADestination), AOriginLatitude,\r\n AOriginLongitude, ADestinationLatitude, ADestinationLongitude, AAlternatives,\r\n ATravelMode, AWayPointList, AWayPoints, AOptimizeWayPoints, ParseLocale(ALocale, AMode), AAVoidTolls, AAvoidHighways);\r\n Request.PostData := FDirections.GetPostData(AOrigin, ADestination, AOriginLatitude, AOriginLongitude, ADestinationLatitude, ADestinationLongitude,\r\n AAlternatives, ATravelMode, AWayPointList, AWayPoints, AOptimizeWayPoints, ParseLocale(ALocale, AMode), AAVoidTolls, AAvoidHighways);\r\n ExecuteRequest({$IFDEF LCLWEBLIB}@{$ENDIF}DoRequestGetDirections);\r\nend;\r\n\r\nprocedure TTMSFNCCustomDirections.SaveToGPXFile(\r\n ACoordinates: TTMSFNCMapsCoordinateRecArray; AFileName: string; AInstructions: TTMSFNCDirectionsSteps = nil);\r\nbegin\r\n SaveToGPXFile(ACoordinates, AFileName, DefaultGPXMetaData, AInstructions);\r\nend;\r\n\r\nprocedure TTMSFNCCustomDirections.SaveToGPXFile(\r\n ACoordinates: TTMSFNCMapsCoordinateRecArray; AFileName: string;\r\n AMetaData: TTMSFNCMapsGPXMetaData; AInstructions: TTMSFNCDirectionsSteps = nil);\r\nvar\r\n sl: TStringList;\r\nbegin\r\n sl := TStringList.Create;\r\n try\r\n sl.Text := SaveToGPXText(ACoordinates, AMetaData, AInstructions);\r\n sl.SaveToFile(AFileName);\r\n finally\r\n sl.Free;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCCustomDirections.SaveToGPXInt(\r\n ACoordinates: TTMSFNCMapsCoordinateRecArray;\r\n AMetaData: TTMSFNCMapsGPXMetaData; AInstructions: TTMSFNCDirectionsSteps): string;\r\nvar\r\n Instructions: TStringList;\r\n Steps: TTMSFNCMapsCoordinateRecArrayArray;\r\n I, J: Integer;\r\nbegin\r\n if Assigned(AInstructions) then\r\n begin\r\n SetLength(Steps, AInstructions.Count);\r\n Instructions := TStringList.Create;\r\n for I := 0 to AInstructions.Count - 1 do\r\n begin\r\n Instructions.Add(AInstructions[I].Instructions);\r\n Setlength(Steps[I], AInstructions[I].Coordinates.Count);\r\n for J := 0 to AInstructions[I].Coordinates.Count - 1 do\r\n begin\r\n Steps[I][J].Latitude := AInstructions[I].Coordinates[J].Latitude;\r\n Steps[I][J].Longitude := AInstructions[I].Coordinates[J].Longitude;\r\n end;\r\n end;\r\n Result := SaveToGPX(Steps, AMetaData, True, True, Instructions);\r\n Instructions.Free;\r\n end\r\n else\r\n begin\r\n Result := SaveToGPX(ACoordinates, AMetaData);\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomDirections.SaveToGPXStream(\r\n ACoordinates: TTMSFNCMapsCoordinateRecArray; AStream: TStream; AInstructions: TTMSFNCDirectionsSteps = nil);\r\nbegin\r\n SaveToGPXStream(ACoordinates, AStream, DefaultGPXMetaData, AInstructions);\r\nend;\r\n\r\nprocedure TTMSFNCCustomDirections.SaveToGPXStream(\r\n ACoordinates: TTMSFNCMapsCoordinateRecArray; AStream: TStream;\r\n AMetaData: TTMSFNCMapsGPXMetaData; AInstructions: TTMSFNCDirectionsSteps = nil);\r\nvar\r\n ss: TStringStream;\r\nbegin\r\n ss := TStringStream.Create(SaveToGPXText(ACoordinates, AMetaData, AInstructions));\r\n try\r\n AStream.CopyFrom(ss, ss.Size);\r\n finally\r\n ss.Free;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCCustomDirections.SaveToGPXText(\r\n ACoordinates: TTMSFNCMapsCoordinateRecArray; AInstructions: TTMSFNCDirectionsSteps = nil): string;\r\nbegin\r\n Result := SaveToGPXInt(ACoordinates, DefaultGPXMetaData, AInstructions);\r\nend;\r\n\r\nfunction TTMSFNCCustomDirections.SaveToGPXText(\r\n ACoordinates: TTMSFNCMapsCoordinateRecArray;\r\n AMetaData: TTMSFNCMapsGPXMetaData; AInstructions: TTMSFNCDirectionsSteps = nil): string;\r\nbegin\r\n Result := SaveToGPXInt(ACoordinates, AMetaData, AInstructions);\r\nend;\r\n\r\nfunction TTMSFNCCustomDirections.GetDirectionsRequests: TTMSFNCDirectionsRequests;\r\nbegin\r\n Result := DirectionsRequests;\r\nend;\r\n\r\nfunction TTMSFNCCustomDirections.GetDirectionsRequestsClass: TTMSFNCDirectionsRequestsClass;\r\nbegin\r\n Result := TTMSFNCDirectionsRequests;\r\nend;\r\n\r\nconstructor TTMSFNCCustomDirections.Create(AOwner: TComponent);\r\nbegin\r\n inherited;\r\n Supports(Self, ITMSFNCCustomDirectionsProperties, FDirectionsProperties);\r\n FDirectionsRequests := GetDirectionsRequestsClass.Create(Self);\r\n InitializeDirections;\r\nend;\r\n\r\nprocedure TTMSFNCCustomDirections.InitializeDirections;\r\nvar\r\n DirectionsServiceGoogleDirections: ITMSFNCDirectionsServiceGoogle;\r\n DirectionsServiceGoogleRoutesDirections: ITMSFNCDirectionsServiceGoogleRoutes;\r\n DirectionsServiceHereDirections: ITMSFNCDirectionsServiceHere;\r\n DirectionsServiceBingDirections: ITMSFNCDirectionsServiceBing;\r\n DirectionsServiceAzureDirections: ITMSFNCDirectionsServiceAzure;\r\n DirectionsServiceMapBoxDirections: ITMSFNCDirectionsServiceMapBox;\r\n DirectionsServiceTomTomDirections: ITMSFNCDirectionsServiceTomTom;\r\n DirectionsServiceOpenRouteServiceDirections: ITMSFNCDirectionsServiceOpenRouteService;\r\n DirectionsServiceGeoApifyDirections: ITMSFNCDirectionsServiceGeoApify;\r\nbegin\r\n if IsDestroying then\r\n Exit;\r\n\r\n if Assigned(FDirections) then\r\n FDirections.DestroyDirections;\r\n\r\n FDirections := nil;\r\n FDirectionsInstance := nil;\r\n\r\n if ((Service = dsGoogle) and UseGoogleRoutes) or IsGoogleRoutes then\r\n begin\r\n if TTMSFNCDirectionsPlatformServices.Current.SupportsPlatformService(ITMSFNCDirectionsServiceGoogleRoutes, IInterface(DirectionsServiceGoogleRoutesDirections)) then\r\n FDirections := DirectionsServiceGoogleRoutesDirections.CreateDirections;\r\n end\r\n else\r\n begin\r\n case Service of\r\n dsGoogle:\r\n begin\r\n if TTMSFNCDirectionsPlatformServices.Current.SupportsPlatformService(ITMSFNCDirectionsServiceGoogle, IInterface(DirectionsServiceGoogleDirections)) then\r\n FDirections := DirectionsServiceGoogleDirections.CreateDirections;\r\n TTMSFNCUtils.Log('The Google Directions service is deprecated. It is recommend to use Google Routes (Set UseGoogleRoutes to True).');\r\n end;\r\n dsHere:\r\n begin\r\n if TTMSFNCDirectionsPlatformServices.Current.SupportsPlatformService(ITMSFNCDirectionsServiceHere, IInterface(DirectionsServiceHereDirections)) then\r\n FDirections := DirectionsServiceHereDirections.CreateDirections;\r\n end;\r\n dsBing:\r\n begin\r\n if TTMSFNCDirectionsPlatformServices.Current.SupportsPlatformService(ITMSFNCDirectionsServiceBing, IInterface(DirectionsServiceBingDirections)) then\r\n FDirections := DirectionsServiceBingDirections.CreateDirections;\r\n TTMSFNCUtils.Log('The Bing Directions service is deprecated. It is recommend to use a different service.');\r\n end;\r\n dsAzure:\r\n begin\r\n if TTMSFNCDirectionsPlatformServices.Current.SupportsPlatformService(ITMSFNCDirectionsServiceAzure, IInterface(DirectionsServiceAzureDirections)) then\r\n FDirections := DirectionsServiceAzureDirections.CreateDirections;\r\n end;\r\n dsMapBox:\r\n begin\r\n if TTMSFNCDirectionsPlatformServices.Current.SupportsPlatformService(ITMSFNCDirectionsServiceMapBox, IInterface(DirectionsServiceMapBoxDirections)) then\r\n FDirections := DirectionsServiceMapBoxDirections.CreateDirections;\r\n end;\r\n dsTomTom:\r\n begin\r\n if TTMSFNCDirectionsPlatformServices.Current.SupportsPlatformService(ITMSFNCDirectionsServiceTomTom, IInterface(DirectionsServiceTomTomDirections)) then\r\n FDirections := DirectionsServiceTomTomDirections.CreateDirections;\r\n end;\r\n dsOpenRouteService:\r\n begin\r\n if TTMSFNCDirectionsPlatformServices.Current.SupportsPlatformService(ITMSFNCDirectionsServiceOpenRouteService, IInterface(DirectionsServiceOpenRouteServiceDirections)) then\r\n FDirections := DirectionsServiceOpenRouteServiceDirections.CreateDirections;\r\n end;\r\n dsGeoApify:\r\n begin\r\n if TTMSFNCDirectionsPlatformServices.Current.SupportsPlatformService(ITMSFNCDirectionsServiceGeoApify, IInterface(DirectionsServiceGeoApifyDirections)) then\r\n FDirections := DirectionsServiceGeoApifyDirections.CreateDirections;\r\n end;\r\n end;\r\n end;\r\n\r\n if Assigned(FDirections) and Supports(FDirections, ITMSFNCCustomDirectionsInstance, FDirectionsInstance) then\r\n FDirectionsInstance.SetDirectionsProperties(FDirectionsProperties);\r\nend;\r\n\r\nfunction TTMSFNCCustomDirections.DirectionsReady: Boolean;\r\nbegin\r\n Result := Assigned(FDirections) and Assigned(FDirectionsInstance) and Assigned(FDirectionsProperties) and FDirections.IsValid;\r\nend;\r\n\r\nprocedure TTMSFNCCustomDirections.DoGetDirections(const ARequest: TTMSFNCDirectionsRequest;\r\n const ARequestResult: TTMSFNCCloudBaseRequestResult);\r\nbegin\r\n if Assigned(OnGetDirectionsInternal) then\r\n OnGetDirectionsInternal(Self, ARequest, ARequestResult);\r\n if Assigned(OnGetDirections) then\r\n OnGetDirections(Self, ARequest, ARequestResult);\r\n if Assigned(OnGetDirectionsResultInternal) then\r\n OnGetDirectionsResultInternal(Self, ARequest);\r\n if Assigned(OnGetDirectionsResult) then\r\n OnGetDirectionsResult(Self, ARequest);\r\nend;\r\n\r\nprocedure TTMSFNCCustomDirections.DoRequestGetDirections(\r\n const ARequestResult: TTMSFNCCloudBaseRequestResult);\r\nvar\r\n req: TTMSFNCDirectionsRequest;\r\n obj: TTMSFNCDirectionsCallBackWrapper;\r\n obj2: TTMSFNCDirectionsResultCallBackWrapper;\r\nbegin\r\n if not DirectionsReady then\r\n Exit;\r\n\r\n //if ARequestResult.Success then\r\n //if there is an error, trigger the event and parse the error message instead\r\n begin\r\n req := DirectionsRequests.Add;\r\n req.FID := ARequestResult.DataString;\r\n req.DataPointer := ARequestResult.DataPointer;\r\n FDirections.Parse(req, ARequestResult.ResultString);\r\n DoGetDirections(req, ARequestResult);\r\n if Assigned(ARequestResult.DataObject) then\r\n begin\r\n if ARequestResult.DataObject is TTMSFNCDirectionsCallBackWrapper then\r\n begin\r\n obj := TTMSFNCDirectionsCallBackWrapper(ARequestResult.DataObject);\r\n obj.FCallback(req, ARequestResult);\r\n obj.Free;\r\n end\r\n else if ARequestResult.DataObject is TTMSFNCDirectionsResultCallBackWrapper then\r\n begin\r\n obj2 := TTMSFNCDirectionsResultCallBackWrapper(ARequestResult.DataObject);\r\n obj2.FCallback(req);\r\n obj2.Free;\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCCustomDirections.Directions: ITMSFNCCustomDirections;\r\nbegin\r\n Result := FDirections;\r\nend;\r\n\r\nprocedure TTMSFNCCustomDirections.SetAPIKey(const Value: string);\r\nbegin\r\n if FAPIKey <> Value then\r\n begin\r\n FAPIKey := Value;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomDirections.SetDirectionsRequests(\r\n const Value: TTMSFNCDirectionsRequests);\r\nbegin\r\n FDirectionsRequests.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCCustomDirections.SetIsGoogleRoutes(const Value: Boolean);\r\nbegin\r\n if FIsGoogleRoutes <> Value then\r\n begin\r\n FIsGoogleRoutes := Value;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomDirections.SetService(const Value: TTMSFNCDirectionsService);\r\nbegin\r\n if FService <> Value then\r\n begin\r\n FService := Value;\r\n InitializeDirections;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomDirections.SetUseGoogleRoutes(const Value: Boolean);\r\nbegin\r\n if FUseGoogleRoutes <> Value then\r\n begin\r\n FUseGoogleRoutes := Value;\r\n InitializeDirections;\r\n end;\r\nend;\r\n\r\nprocedure DecodeValues(AValues: string;\r\n ACoordinates: TTMSFNCMapsCoordinates);\r\nvar\r\n lat, lon, lat_f, lon_f: Double;\r\n index: Integer;\r\n len: Integer;\r\n b: Integer;\r\n shift: Integer;\r\n decodeResult: Integer;\r\n encoded: String;\r\n dlat: Integer;\r\n dlng: Integer;\r\n co: TTMSFNCMapsCoordinateItem;\r\nbegin\r\n encoded := AValues;\r\n {$IFDEF ZEROSTRINGINDEX}\r\n len := Length(encoded) - 1;\r\n index := 0;\r\n {$ELSE}\r\n len := Length(encoded);\r\n index := 1;\r\n {$ENDIF}\r\n lat := 0;\r\n lon := 0;\r\n\r\n while (index <= len) do begin\r\n b := $20;\r\n shift := 0;\r\n decodeResult := 0;\r\n\r\n while (b >= $20) do begin\r\n b := ord(encoded[index]);\r\n b := b - 63;\r\n inc(index);\r\n decodeResult := decodeResult or (b and $1f) Shl shift;\r\n shift := shift + 5;\r\n end;\r\n\r\n if (decodeResult and 1) <> 0 then\r\n dlat := not (decodeResult shr 1)\r\n else\r\n dlat := decodeResult shr 1;\r\n lat := lat + dlat;\r\n\r\n shift := 0;\r\n decodeResult := 0;\r\n b := $20;\r\n while (b >= $20) do begin\r\n b := ord(encoded[index]);\r\n b := b-63;\r\n inc(index);\r\n decodeResult := decodeResult or (b and $1f) Shl shift;\r\n shift := shift + 5;\r\n end;\r\n\r\n if (decodeResult and 1) <> 0 then\r\n dlng := not (decodeResult shr 1)\r\n else\r\n dlng := decodeResult shr 1;\r\n lon := lon + dlng;\r\n\r\n lon_f := lon / 100000.0;\r\n lat_f := lat / 100000.0;\r\n\r\n //set coordinates\r\n co := ACoordinates.Add;\r\n co.Latitude := lat_f;\r\n co.Longitude := lon_f;\r\n end;\r\nend;\r\n\r\ndestructor TTMSFNCCustomDirections.Destroy;\r\nbegin\r\n FDirectionsRequests.Free;\r\n\r\n if Assigned(FDirections) then\r\n FDirections.DestroyDirections;\r\n\r\n FDirections := nil;\r\n FDirectionsInstance := nil;\r\n FDirectionsProperties := nil;\r\n inherited;\r\nend;\r\n\r\n{ TTMSFNCDirectionsFactoryService }\r\n\r\nconstructor TTMSFNCDirectionsFactoryService.Create;\r\nbegin\r\n inherited Create;\r\n FDirections := TTMSFNCDirectionsList.Create;\r\nend;\r\n\r\nfunction TTMSFNCDirectionsFactoryService.CreateDirections: ITMSFNCCustomDirections;\r\nbegin\r\n Result := DoCreateDirections;\r\n FDirections.Add(Result);\r\nend;\r\n\r\ndestructor TTMSFNCDirectionsFactoryService.Destroy;\r\nbegin\r\n FreeAndNil(FDirections);\r\n inherited Destroy;\r\nend;\r\n\r\nprocedure TTMSFNCDirectionsFactoryService.DestroyDirections(ADirections: ITMSFNCCustomDirections);\r\nbegin\r\n FDirections.Remove(ADirections);\r\nend;\r\n\r\n{ TTMSFNCDirectionsPlatformServices }\r\n\r\nprocedure TTMSFNCDirectionsPlatformServices.AddPlatformService(const AServiceGUID: TGUID; const AService: IInterface);\r\nvar\r\n LService: IInterface;\r\nbegin\r\n if not FServicesList.ContainsKey(GUIDToString(AServiceGUID)) then\r\n begin\r\n if Supports(AService, AServiceGUID, LService) then\r\n FServicesList.Add(TTMSFNCDirectionsPlatformServicesService.Create(GUIDToString(AServiceGUID), AService));\r\n end;\r\nend;\r\n\r\nconstructor TTMSFNCDirectionsPlatformServices.Create;\r\nbegin\r\n inherited;\r\n FServicesList := TTMSFNCDirectionsPlatformServicesList.Create;\r\nend;\r\n\r\ndestructor TTMSFNCDirectionsPlatformServices.Destroy;\r\nbegin\r\n FreeAndNil(FServicesList);\r\n inherited;\r\nend;\r\n\r\n{$IFNDEF AUTOREFCOUNT}\r\nclass procedure TTMSFNCDirectionsPlatformServices.ReleaseCurrent;\r\nbegin\r\n FreeAndNil(FCurrent);\r\n FCurrentReleased := True;\r\nend;\r\n{$ENDIF}\r\n\r\nclass function TTMSFNCDirectionsPlatformServices.Current: TTMSFNCDirectionsPlatformServices;\r\nbegin\r\n if (FCurrent = nil) and not FCurrentReleased then\r\n FCurrent := TTMSFNCDirectionsPlatformServices.Create;\r\n Result := FCurrent;\r\nend;\r\n\r\nfunction TTMSFNCDirectionsPlatformServices.GetPlatformService(const AServiceGUID: TGUID): IInterface;\r\nvar\r\n k: IInterface;\r\nbegin\r\n k := FServicesList.Interfaces[GUIDToString(AServiceGUID)];\r\n Supports(k, AServiceGUID, Result);\r\nend;\r\n\r\nprocedure TTMSFNCDirectionsPlatformServices.RemovePlatformService(const AServiceGUID: TGUID);\r\nbegin\r\n FServicesList.RemoveByGUID(GUIDToString(AServiceGUID));\r\nend;\r\n\r\nfunction TTMSFNCDirectionsPlatformServices.SupportsPlatformService(const AServiceGUID: TGUID;\r\n var AService: IInterface): Boolean;\r\nbegin\r\n if FServicesList.ContainsKey(GUIDToString(AServiceGUID)) then\r\n Result := Supports(FServicesList.Interfaces[GUIDToString(AServiceGUID)], AServiceGUID, AService)\r\n else\r\n begin\r\n AService := nil;\r\n Result := False;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCDirectionsPlatformServices.SupportsPlatformService(const AServiceGUID: TGUID): Boolean;\r\nbegin\r\n Result := FServicesList.ContainsKey(GUIDToString(AServiceGUID));\r\nend;\r\n\r\n{ TTMSFNCDirectionsPlatformServicesService }\r\n\r\nconstructor TTMSFNCDirectionsPlatformServicesService.Create(AGUID: string;\r\n AInterface: IInterface);\r\nbegin\r\n FGUID := AGUID;\r\n FInterface := AInterface;\r\nend;\r\n\r\n{ TTMSFNCDirectionsPlatformServicesList }\r\n\r\nfunction TTMSFNCDirectionsPlatformServicesList.ContainsKey(AGUID: string): Boolean;\r\nvar\r\n I: Integer;\r\nbegin\r\n Result := False;\r\n for I := 0 to Count - 1 do\r\n begin\r\n if Items[I].GUID = AGUID then\r\n begin\r\n Result := True;\r\n Break;\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCDirectionsPlatformServicesList.GetValue(AGUID: string): IInterface;\r\nvar\r\n I: Integer;\r\nbegin\r\n Result := nil;\r\n for I := 0 to Count - 1 do\r\n begin\r\n if Items[I].GUID = AGUID then\r\n begin\r\n Result := Items[I].&Interface;\r\n Break;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCDirectionsPlatformServicesList.RemoveByGUID(AGUID: string);\r\nvar\r\n I: Integer;\r\nbegin\r\n for I := Count - 1 downto 0 do\r\n begin\r\n if Items[I].GUID = AGUID then\r\n begin\r\n Remove(Items[I]);\r\n Break;\r\n end;\r\n end;\r\nend;\r\n\r\n{$IFDEF WEBLIB}\r\nfunction TTMSFNCDirectionsPlatformServicesList.GetItem(Index: Integer): TTMSFNCDirectionsPlatformServicesService;\r\nbegin\r\n Result := TTMSFNCDirectionsPlatformServicesService(inherited Items[Index]);\r\nend;\r\n\r\nprocedure TTMSFNCDirectionsPlatformServicesList.SetItem(Index: Integer; const Value: TTMSFNCDirectionsPlatformServicesService);\r\nbegin\r\n inherited Items[Index] := Value;\r\nend;\r\n\r\nfunction TTMSFNCDirectionsList.GetItem(Index: Integer): ITMSFNCCustomDirections;\r\nbegin\r\n Result := ITMSFNCCustomDirections(inherited Items[Index]);\r\nend;\r\n\r\nprocedure TTMSFNCDirectionsList.SetItem(Index: Integer; const Value: ITMSFNCCustomDirections);\r\nbegin\r\n inherited Items[Index] := Value;\r\nend;\r\n{$ENDIF}\r\n\r\n{ TTMSFNCCustomDirectionsInterfacedObject }\r\n\r\ndestructor TTMSFNCCustomDirectionsInterfacedObject.Destroy;\r\nbegin\r\n FDirectionsProperties := nil;\r\n inherited;\r\nend;\r\n\r\nfunction TTMSFNCCustomDirectionsInterfacedObject.GetDirectionsProperties: ITMSFNCCustomDirectionsProperties;\r\nbegin\r\n Result := FDirectionsProperties;\r\nend;\r\n\r\nprocedure TTMSFNCCustomDirectionsInterfacedObject.SetDirectionsProperties(\r\n const Value: ITMSFNCCustomDirectionsProperties);\r\nbegin\r\n FDirectionsProperties := Value;\r\nend;\r\n\r\n{ TTMSFNCDirectionsItem }\r\n\r\nprocedure TTMSFNCDirectionsItem.Assign(Source: TPersistent);\r\nbegin\r\n if Source is TTMSFNCDirectionsItem then\r\n begin\r\n FCoordinates.Assign(TTMSFNCDirectionsItem(Source).Coordinates);\r\n FDistance := TTMSFNCDirectionsItem(Source).Distance;\r\n FDuration := TTMSFNCDirectionsItem(Source).Duration;\r\n FSummary := TTMSFNCDirectionsItem(Source).Summary;\r\n FSteps.Assign(TTMSFNCDirectionsItem(Source).Steps);\r\n FLegs.Assign(TTMSFNCDirectionsItem(Source).Legs);\r\n end;\r\nend;\r\n\r\nconstructor TTMSFNCDirectionsItem.Create(ACollection: TCollection);\r\nbegin\r\n inherited;\r\n if Assigned(ACollection) and (Collection is TTMSFNCDirectionsItems) then\r\n FOwner := (Collection as TTMSFNCDirectionsItems).FOwner;\r\n\r\n FCoordinates := TTMSFNCMapsCoordinates.Create(Self);\r\n FDistance := 0;\r\n FDuration := 0;\r\n FSummary := '';\r\n FSteps := TTMSFNCDirectionsSteps.Create(Self);\r\n FLegs := TTMSFNCDirectionsLegs.Create(Self);\r\n FWayPoints := TTMSFNCDirectionsWayPoints.Create(Self);\r\nend;\r\n\r\ndestructor TTMSFNCDirectionsItem.Destroy;\r\nbegin\r\n FCoordinates.Free;\r\n FSteps.Free;\r\n FLegs.Free;\r\n FWayPoints.Free;\r\n inherited;\r\nend;\r\n\r\nfunction TTMSFNCDirectionsItem.GetBounds: TTMSFNCMapsBounds;\r\nbegin\r\n Result := Coordinates.Bounds;\r\nend;\r\n\r\nprocedure TTMSFNCDirectionsItem.SetCoordinates(\r\n const Value: TTMSFNCMapsCoordinates);\r\nbegin\r\n FCoordinates.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCDirectionsItem.SetLegs(const Value: TTMSFNCDirectionsLegs);\r\nbegin\r\n FLegs.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCDirectionsItem.SetSteps(const Value: TTMSFNCDirectionsSteps);\r\nbegin\r\n FSteps.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCDirectionsItem.SetWayPoints(\r\n const Value: TTMSFNCDirectionsWayPoints);\r\nbegin\r\n FWayPoints.Assign(Value);\r\nend;\r\n\r\n{ TTMSFNCDirectionsItems }\r\n\r\nfunction TTMSFNCDirectionsItems.Add: TTMSFNCDirectionsItem;\r\nbegin\r\n Result := TTMSFNCDirectionsItem(inherited Add);\r\nend;\r\n\r\nconstructor TTMSFNCDirectionsItems.Create(AOwner: TTMSFNCCustomDirections);\r\nbegin\r\n inherited Create(AOwner, CreateItemClass);\r\n FOwner := AOwner;\r\nend;\r\n\r\nfunction TTMSFNCDirectionsItems.CreateItemClass: TCollectionItemClass;\r\nbegin\r\n Result := TTMSFNCDirectionsItem;\r\nend;\r\n\r\nfunction TTMSFNCDirectionsItems.GetItem(\r\n Index: Integer): TTMSFNCDirectionsItem;\r\nbegin\r\n Result := TTMSFNCDirectionsItem(inherited Items[Index]);\r\nend;\r\n\r\nfunction TTMSFNCDirectionsItems.GetOwner: TPersistent;\r\nbegin\r\n Result := FOwner;\r\nend;\r\n\r\nfunction TTMSFNCDirectionsItems.Insert(\r\n Index: Integer): TTMSFNCDirectionsItem;\r\nbegin\r\n Result := TTMSFNCDirectionsItem(inherited Insert(Index));\r\nend;\r\n\r\nprocedure TTMSFNCDirectionsItems.SetItem(Index: Integer;\r\n const Value: TTMSFNCDirectionsItem);\r\nbegin\r\n inherited Items[Index] := Value;\r\nend;\r\n\r\n{ TTMSFNCDirectionsStep }\r\n\r\nprocedure TTMSFNCDirectionsStep.Assign(Source: TPersistent);\r\nbegin\r\n if Source is TTMSFNCDirectionsStep then\r\n begin\r\n FCoordinates.Assign(TTMSFNCDirectionsStep(Source).Coordinates);\r\n FStartLocation.Assign(TTMSFNCDirectionsStep(Source).StartLocation);\r\n FEndLocation.Assign(TTMSFNCDirectionsStep(Source).EndLocation);\r\n FDistance := TTMSFNCDirectionsStep(Source).Distance;\r\n FDuration := TTMSFNCDirectionsStep(Source).Duration;\r\n FInstructions := TTMSFNCDirectionsStep(Source).Instructions;\r\n end;\r\nend;\r\n\r\nconstructor TTMSFNCDirectionsStep.Create(ACollection: TCollection);\r\nbegin\r\n inherited;\r\n if Assigned(ACollection) then\r\n FOwner := (Collection as TTMSFNCDirectionsSteps).FOwner;\r\n\r\n FCoordinates := TTMSFNCMapsCoordinates.Create(Self);\r\n FStartLocation := TTMSFNCMapsCoordinate.Create;\r\n FEndLocation := TTMSFNCMapsCoordinate.Create;\r\n FDistance := 0;\r\n FDuration := 0;\r\n FInstructions := '';\r\nend;\r\n\r\ndestructor TTMSFNCDirectionsStep.Destroy;\r\nbegin\r\n FCoordinates.Free;\r\n FStartLocation.Free;\r\n FEndLocation.Free;\r\n inherited;\r\nend;\r\n\r\nprocedure TTMSFNCDirectionsStep.SetCoordinates(\r\n const Value: TTMSFNCMapsCoordinates);\r\nbegin\r\n FCoordinates.Assign(Value);\r\nend;\r\n\r\n{ TTMSFNCDirectionsLeg }\r\n\r\nprocedure TTMSFNCDirectionsLeg.Assign(Source: TPersistent);\r\nbegin\r\n if Source is TTMSFNCDirectionsLeg then\r\n begin\r\n FCoordinates.Assign(TTMSFNCDirectionsLeg(Source).Coordinates);\r\n FStartLocation.Assign(TTMSFNCDirectionsLeg(Source).StartLocation);\r\n FEndLocation.Assign(TTMSFNCDirectionsLeg(Source).EndLocation);\r\n FDistance := TTMSFNCDirectionsLeg(Source).Distance;\r\n FDuration := TTMSFNCDirectionsLeg(Source).Duration;\r\n FSteps.Assign(TTMSFNCDirectionsLeg(Source).Steps);\r\n end;\r\nend;\r\n\r\nconstructor TTMSFNCDirectionsLeg.Create(ACollection: TCollection);\r\nbegin\r\n inherited;\r\n if Assigned(ACollection) then\r\n FOwner := (Collection as TTMSFNCDirectionsLegs).FOwner;\r\n\r\n FCoordinates := TTMSFNCMapsCoordinates.Create(Self);\r\n FStartLocation := TTMSFNCMapsCoordinate.Create;\r\n FEndLocation := TTMSFNCMapsCoordinate.Create;\r\n FDistance := 0;\r\n FDuration := 0;\r\n FSteps := TTMSFNCDirectionsSteps.Create(Self);\r\nend;\r\n\r\ndestructor TTMSFNCDirectionsLeg.Destroy;\r\nbegin\r\n FCoordinates.Free;\r\n FStartLocation.Free;\r\n FEndLocation.Free;\r\n FSteps.Free;\r\n inherited;\r\nend;\r\n\r\nprocedure TTMSFNCDirectionsLeg.SetCoordinates(\r\n const Value: TTMSFNCMapsCoordinates);\r\nbegin\r\n FCoordinates.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCDirectionsLeg.SetSteps(const Value: TTMSFNCDirectionsSteps);\r\nbegin\r\n FSteps := Value;\r\nend;\r\n\r\n{ TTMSFNCDirectionsSteps }\r\n\r\nfunction TTMSFNCDirectionsSteps.Add: TTMSFNCDirectionsStep;\r\nbegin\r\n Result := TTMSFNCDirectionsStep(inherited Add);\r\nend;\r\n\r\nconstructor TTMSFNCDirectionsSteps.Create(AOwner: TCollectionItem);\r\nbegin\r\n inherited Create(AOwner, CreateItemClass);\r\n FOwner := AOwner;\r\nend;\r\n\r\nfunction TTMSFNCDirectionsSteps.CreateItemClass: TCollectionItemClass;\r\nbegin\r\n Result := TTMSFNCDirectionsStep;\r\nend;\r\n\r\nfunction TTMSFNCDirectionsSteps.GetItem(Index: Integer): TTMSFNCDirectionsStep;\r\nbegin\r\n Result := TTMSFNCDirectionsStep(inherited Items[Index]);\r\nend;\r\n\r\nfunction TTMSFNCDirectionsSteps.GetOwner: TPersistent;\r\nbegin\r\n Result := FOwner;\r\nend;\r\n\r\nfunction TTMSFNCDirectionsSteps.Insert(Index: Integer): TTMSFNCDirectionsStep;\r\nbegin\r\n Result := TTMSFNCDirectionsStep(inherited Insert(Index));\r\nend;\r\n\r\nprocedure TTMSFNCDirectionsSteps.SetItem(Index: Integer;\r\n const Value: TTMSFNCDirectionsStep);\r\nbegin\r\n inherited Items[Index] := Value;\r\nend;\r\n\r\n{ TTMSFNCDirectionsLegs }\r\n\r\nfunction TTMSFNCDirectionsLegs.Add: TTMSFNCDirectionsLeg;\r\nbegin\r\n Result := TTMSFNCDirectionsLeg(inherited Add);\r\nend;\r\n\r\nconstructor TTMSFNCDirectionsLegs.Create(AOwner: TCollectionItem);\r\nbegin\r\n inherited Create(AOwner, CreateItemClass);\r\n FOwner := AOwner;\r\nend;\r\n\r\nfunction TTMSFNCDirectionsLegs.CreateItemClass: TCollectionItemClass;\r\nbegin\r\n Result := TTMSFNCDirectionsLeg;\r\nend;\r\n\r\nfunction TTMSFNCDirectionsLegs.GetItem(Index: Integer): TTMSFNCDirectionsLeg;\r\nbegin\r\n Result := TTMSFNCDirectionsLeg(inherited Items[Index]);\r\nend;\r\n\r\nfunction TTMSFNCDirectionsLegs.GetOwner: TPersistent;\r\nbegin\r\n Result := FOwner;\r\nend;\r\n\r\nfunction TTMSFNCDirectionsLegs.Insert(Index: Integer): TTMSFNCDirectionsLeg;\r\nbegin\r\n Result := TTMSFNCDirectionsLeg(inherited Insert(Index));\r\nend;\r\n\r\nprocedure TTMSFNCDirectionsLegs.SetItem(Index: Integer;\r\n const Value: TTMSFNCDirectionsLeg);\r\nbegin\r\n inherited Items[Index] := Value;\r\nend;\r\n\r\n{ TTMSFNCDirectionsWayPoint }\r\n\r\nprocedure TTMSFNCDirectionsWayPoint.Assign(Source: TPersistent);\r\nbegin\r\n inherited;\r\n if Source is TTMSFNCDirectionsWayPoint then\r\n begin\r\n FDistance := TTMSFNCDirectionsWayPoint(Source).Distance;\r\n FDuration := TTMSFNCDirectionsWayPoint(Source).Duration;\r\n FOptimizedIndex := TTMSFNCDirectionsWayPoint(Source).OptimizedIndex;\r\n end;\r\nend;\r\n\r\nconstructor TTMSFNCDirectionsWayPoint.Create(ACollection: TCollection);\r\nbegin\r\n inherited;\r\n if Assigned(ACollection) then\r\n FOwner := (Collection as TTMSFNCDirectionsWayPoints).FOwner;\r\n\r\n FDistance := 0;\r\n FDuration := 0;\r\n FOptimizedIndex := -1;\r\nend;\r\n\r\ndestructor TTMSFNCDirectionsWayPoint.Destroy;\r\nbegin\r\n inherited;\r\nend;\r\n\r\n{ TTMSFNCDirectionsWayPoints }\r\n\r\nfunction TTMSFNCDirectionsWayPoints.Add: TTMSFNCDirectionsWayPoint;\r\nbegin\r\n Result := TTMSFNCDirectionsWayPoint(inherited Add);\r\nend;\r\n\r\nconstructor TTMSFNCDirectionsWayPoints.Create(AOwner: TCollectionItem);\r\nbegin\r\n inherited Create(AOwner, CreateItemClass);\r\n FOwner := AOwner;\r\nend;\r\n\r\nfunction TTMSFNCDirectionsWayPoints.CreateItemClass: TCollectionItemClass;\r\nbegin\r\n Result := TTMSFNCDirectionsWayPoint;\r\nend;\r\n\r\nfunction TTMSFNCDirectionsWayPoints.GetItem(\r\n Index: Integer): TTMSFNCDirectionsWayPoint;\r\nbegin\r\n Result := TTMSFNCDirectionsWayPoint(inherited Items[Index]);\r\nend;\r\n\r\nfunction TTMSFNCDirectionsWayPoints.GetOwner: TPersistent;\r\nbegin\r\n Result := FOwner;\r\nend;\r\n\r\nfunction TTMSFNCDirectionsWayPoints.Insert(\r\n Index: Integer): TTMSFNCDirectionsWayPoint;\r\nbegin\r\n Result := TTMSFNCDirectionsWayPoint(inherited Insert(Index));\r\nend;\r\n\r\nprocedure TTMSFNCDirectionsWayPoints.SetItem(Index: Integer;\r\n const Value: TTMSFNCDirectionsWayPoint);\r\nbegin\r\n inherited Items[Index] := Value;\r\nend;\r\n\r\n{ TTMSFNCDirectionsRequest }\r\n\r\nprocedure TTMSFNCDirectionsRequest.Assign(Source: TPersistent);\r\nbegin\r\n if Source is TTMSFNCDirectionsRequest then\r\n begin\r\n FItems.Assign((Source as TTMSFNCDirectionsRequest).Items);\r\n FTravelMode := (Source as TTMSFNCDirectionsRequest).TravelMode;\r\n end;\r\nend;\r\n\r\nconstructor TTMSFNCDirectionsRequest.Create(ACollection: TCollection);\r\nbegin\r\n inherited;\r\n if Assigned(ACollection) then\r\n FOwner := (Collection as TTMSFNCDirectionsRequests).FOwner;\r\n\r\n FItems := GetDirectionsItemsClass.Create(FOwner);\r\n FTravelMode := tmDriving;\r\n FID := '';\r\n FStatus := '';\r\n FErrorMessage := '';\r\nend;\r\n\r\ndestructor TTMSFNCDirectionsRequest.Destroy;\r\nbegin\r\n FItems.Free;\r\n inherited;\r\nend;\r\n\r\nfunction TTMSFNCDirectionsRequest.GetDirectionsItemsClass: TTMSFNCDirectionsItemsClass;\r\nbegin\r\n Result := TTMSFNCDirectionsItems;\r\nend;\r\n\r\nprocedure TTMSFNCDirectionsRequest.SetErrorMessage(const Value: string);\r\nbegin\r\n FErrorMessage := Value;\r\nend;\r\n\r\nprocedure TTMSFNCDirectionsRequest.SetItems(const Value: TTMSFNCDirectionsItems);\r\nbegin\r\n FItems.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCDirectionsRequest.SetStatus(const Value: string);\r\nbegin\r\n FStatus := Value;\r\nend;\r\n\r\nprocedure TTMSFNCDirectionsRequest.SetTravelMode(\r\n const Value: TTMSFNCDirectionsTravelMode);\r\nbegin\r\n FTraveLmode := Value;\r\nend;\r\n\r\n{ TTMSFNCDirectionsRequests }\r\n\r\nfunction TTMSFNCDirectionsRequests.Add: TTMSFNCDirectionsRequest;\r\nbegin\r\n Result := TTMSFNCDirectionsRequest(inherited Add);\r\nend;\r\n\r\nconstructor TTMSFNCDirectionsRequests.Create(AOwner: TTMSFNCCustomDirections);\r\nbegin\r\n inherited Create(AOwner, CreateItemClass);\r\n FOwner := AOwner;\r\nend;\r\n\r\nfunction TTMSFNCDirectionsRequests.CreateItemClass: TCollectionItemClass;\r\nbegin\r\n Result := TTMSFNCDirectionsRequest;\r\nend;\r\n\r\nfunction TTMSFNCDirectionsRequests.GetItem(\r\n Index: Integer): TTMSFNCDirectionsRequest;\r\nbegin\r\n Result := TTMSFNCDirectionsRequest(inherited Items[Index]);\r\nend;\r\n\r\nfunction TTMSFNCDirectionsRequests.GetOwner: TPersistent;\r\nbegin\r\n Result := FOwner;\r\nend;\r\n\r\nfunction TTMSFNCDirectionsRequests.Insert(\r\n Index: Integer): TTMSFNCDirectionsRequest;\r\nbegin\r\n Result := TTMSFNCDirectionsRequest(inherited Insert(Index));\r\nend;\r\n\r\nprocedure TTMSFNCDirectionsRequests.SetItem(Index: Integer;\r\n const Value: TTMSFNCDirectionsRequest);\r\nbegin\r\n inherited Items[Index] := Value;\r\nend;\r\n\r\n{ TTMSFNCDirectionsCallBackWrapper }\r\n\r\nconstructor TTMSFNCDirectionsCallBackWrapper.Create(\r\n ACallback: TTMSFNCDirectionsGetDirectionsCallback);\r\nbegin\r\n FCallback := ACallback;\r\nend;\r\n\r\n{ TTMSFNCDirections }\r\n\r\nprocedure TTMSFNCDirections.RegisterRuntimeClasses;\r\nbegin\r\n inherited;\r\n RegisterClasses([TTMSFNCDirections]);\r\nend;\r\n\r\n{ TTMSFNCDirectionsResultCallBackWrapper }\r\n\r\nconstructor TTMSFNCDirectionsResultCallBackWrapper.Create(\r\n ACallback: TTMSFNCDirectionsGetDirectionsResultCallback);\r\nbegin\r\n FCallback := ACallback;\r\nend;\r\n\r\ninitialization\r\nbegin\r\n TTMSFNCDirectionsPlatformServices.FCurrentReleased := False;\r\n RegisterGoogleDirectionsService;\r\n RegisterGoogleRoutesDirectionsService;\r\n RegisterHereDirectionsService;\r\n RegisterBingDirectionsService;\r\n RegisterAzureDirectionsService;\r\n RegisterMapBoxDirectionsService;\r\n RegisterTomTomDirectionsService;\r\n RegisterOpenRouteServiceDirectionsService;\r\n RegisterGeoApifyDirectionsService;\r\nend;\r\n\r\n{$IFNDEF WEBLIB}\r\nfinalization\r\nbegin\r\n UnRegisterGoogleDirectionsService;\r\n UnRegisterGoogleRoutesDirectionsService;\r\n UnRegisterHereDirectionsService;\r\n UnRegisterBingDirectionsService;\r\n UnRegisterAzureDirectionsService;\r\n UnRegisterMapBoxDirectionsService;\r\n UnRegisterTomTomDirectionsService;\r\n UnRegisterOpenRouteServiceDirectionsService;\r\n {$IFNDEF AUTOREFCOUNT}\r\n TTMSFNCDirectionsPlatformServices.ReleaseCurrent;\r\n {$ENDIF}\r\nend;\r\n{$ENDIF}\r\n\r\nend.\r\n","{********************************************************************}\r\n{ }\r\n{ written by TMS Software }\r\n{ copyright (c) 2023 - 2024 }\r\n{ Email : info@tmssoftware.com }\r\n{ Web : http://www.tmssoftware.com }\r\n{ }\r\n{ The source code is given as is. The author is not responsible }\r\n{ for any possible damage done due to the use of this code. }\r\n{ The complete source code remains property of the author and may }\r\n{ not be distributed, published, given or sold in any form as such. }\r\n{ No parts of the source code can be included in any other component }\r\n{ or application without written authorization of the author. }\r\n{********************************************************************}\r\n\r\nunit WEBLib.TMSFNCDirections.GoogleRoutes;\r\n\r\n{$I WEBLib.TMSFNCDefines.inc}\r\n\r\n{$IFDEF WEBLIB}\r\n{$DEFINE LCLWEBLIB}\r\n{$ENDIF}\r\n{$IFDEF LCLLIB}\r\n{$DEFINE LCLWEBLIB}\r\n{$ENDIF}\r\n\r\ninterface\r\n\r\nprocedure RegisterGoogleRoutesDirectionsService;\r\nprocedure UnRegisterGoogleRoutesDirectionsService;\r\n\r\nimplementation\r\n\r\nuses\r\n Classes, Math, DateUtils , Types, SysUtils, WEBLib.TMSFNCDirections, WEBLib.TMSFNCGoogleRoutes,\r\n WEBLib.TMSFNCUtils, WEBLib.TMSFNCTypes, WEBLib.TMSFNCMapsCommonTypes, WEBLib.TMSFNCCloudBase\r\n {$IFNDEF WEBLIB}\r\n {$IFNDEF LCLLIB}\r\n {$HINTS OFF}\r\n {$IF COMPILERVERSION > 26}\r\n ,JSON\r\n {$ELSE}\r\n ,DBXJSON\r\n {$IFEND}\r\n {$HINTS ON}\r\n {$ELSE}\r\n ,fpjson\r\n {$ENDIF}\r\n {$ENDIF}\r\n\r\n {$IFDEF WEBLIB}\r\n ,Contnrs, Web, WEBLIB.JSON\r\n {$ENDIF}\r\n {$IFNDEF LCLWEBLIB}\r\n ,Generics.Collections, Generics.Defaults\r\n {$HINTS OFF}\r\n {$IF COMPILERVERSION > 22}\r\n , UITypes\r\n {$IFEND}\r\n {$HINTS ON}\r\n {$ENDIF}\r\n {$IFDEF LCLLIB}\r\n ,fgl\r\n {$ENDIF}\r\n ;\r\n\r\nconst\r\n LB = #13;\r\n\r\ntype\r\n TTMSFNCDirectionsGoogleRoutesService = class;\r\n\r\n TTMSFNCDirectionsGoogleRoutesDirectionsFactoryService = class(TTMSFNCDirectionsFactoryService, ITMSFNCDirectionsServiceGoogleRoutes);\r\n\r\n TTMSFNCDirectionsGoogleRoutesService = class(TTMSFNCDirectionsGoogleRoutesDirectionsFactoryService)\r\n protected\r\n function DoCreateDirections: ITMSFNCCustomDirections; override;\r\n end;\r\n\r\ntype\r\n TTMSFNCDirectionsGoogleRoutesDirections = class;\r\n\r\n TTMSFNCDirectionsGoogleRoutesDirections = class(TTMSFNCCustomDirectionsInterfacedObject, ITMSFNCCustomDirections)\r\n protected\r\n FTravelMode: TTMSFNCDirectionsTravelMode;\r\n function GetIdentifier: string;\r\n function IsValid: Boolean;\r\n function GetRequestMethod: TTMSFNCCloudBaseRequestMethod;\r\n function GetHost: string;\r\n function GetPath(AOrigin, ADestination: string; AOriginLatitude, AOriginLongitude,\r\n ADestinationLatitude, ADestinationLongitude: Double;\r\n ATravelMode: TTMSFNCDirectionsTravelMode = tmDriving; AWayPoints: TTMSFNCMapsCoordinateRecArray = nil): string;\r\n function GetQuery(AOrigin, ADestination: string; AOriginLatitude, AOriginLongitude,\r\n ADestinationLatitude, ADestinationLongitude: Double; AAlternatives: Boolean = False;\r\n ATravelMode: TTMSFNCDirectionsTravelMode = tmDriving; AWayPointList: TStringList = nil; AWayPoints: TTMSFNCMapsCoordinateRecArray = nil;\r\n AOptimizeWayPoints: Boolean = False; ALocale: string = ''; AAVoidTolls: Boolean = False;\r\n AAvoidHighways: Boolean = False): string;\r\n function GetPostData(AOrigin, ADestination: string; AOriginLatitude, AOriginLongitude,\r\n ADestinationLatitude, ADestinationLongitude: Double; AAlternatives: Boolean = False;\r\n ATravelMode: TTMSFNCDirectionsTravelMode = tmDriving; AWayPointList: TStringList = nil; AWayPoints: TTMSFNCMapsCoordinateRecArray = nil;\r\n AOptimizeWayPoints: Boolean = False; ALocale: string = ''; AAvoidTolls: Boolean = False;\r\n AAvoidHighways: Boolean = False): string;\r\n procedure Parse(ARequest: TTMSFNCDirectionsRequest; ARequestResult: string);\r\n procedure AddHeaders(AHeaders: TTMSFNCCloudBaseRequestHeaders);\r\n procedure DestroyDirections;\r\n public\r\n constructor Create;\r\n destructor Destroy; override;\r\n end;\r\n\r\nvar\r\n DirectionsService: ITMSFNCDirectionsServiceGoogleRoutes;\r\n\r\nprocedure RegisterGoogleRoutesDirectionsService;\r\nbegin\r\n if not TTMSFNCDirectionsPlatformServices.Current.SupportsPlatformService(ITMSFNCDirectionsServiceGoogleRoutes, IInterface(DirectionsService)) then\r\n begin\r\n DirectionsService := TTMSFNCDirectionsGoogleRoutesService.Create;\r\n TTMSFNCDirectionsPlatformServices.Current.AddPlatformService(ITMSFNCDirectionsServiceGoogleRoutes, DirectionsService);\r\n end;\r\nend;\r\n\r\nprocedure UnregisterGoogleRoutesDirectionsService;\r\nbegin\r\n TTMSFNCDirectionsPlatformServices.Current.RemovePlatformService(ITMSFNCDirectionsServiceGoogleRoutes);\r\nend;\r\n\r\n{ TTMSFNCDirectionsGoogleRoutesService }\r\n\r\nfunction TTMSFNCDirectionsGoogleRoutesService.DoCreateDirections: ITMSFNCCustomDirections;\r\nbegin\r\n Result := TTMSFNCDirectionsGoogleRoutesDirections.Create;\r\nend;\r\n\r\nprocedure TTMSFNCDirectionsGoogleRoutesDirections.AddHeaders(\r\n AHeaders: TTMSFNCCloudBaseRequestHeaders);\r\nvar\r\n Fields: TStringList;\r\nbegin\r\n Fields := TStringList.Create;\r\n\r\n// Fields.Add('*');\r\n\r\n Fields.Add('routes.distanceMeters');\r\n Fields.Add('routes.duration');\r\n// Fields.Add('routes.staticDuration');\r\n Fields.Add('routes.polyline.encodedPolyline');\r\n Fields.Add('routes.description');\r\n// Fields.Add('routes.warnings');\r\n Fields.Add('routes.routeLabels');\r\n Fields.Add('routes.travelAdvisory');\r\n Fields.Add('routes.optimizedIntermediateWaypointIndex');\r\n Fields.Add('routes.legs.distanceMeters');\r\n Fields.Add('routes.legs.duration');\r\n// Fields.Add('routes.legs.staticDuration');\r\n Fields.Add('routes.legs.polyline.encodedPolyline');\r\n Fields.Add('routes.legs.startLocation');\r\n Fields.Add('routes.legs.endLocation');\r\n Fields.Add('routes.legs.steps.distanceMeters');\r\n Fields.Add('routes.legs.steps.staticDuration');\r\n Fields.Add('routes.legs.steps.polyline.encodedPolyline');\r\n Fields.Add('routes.legs.steps.startLocation');\r\n Fields.Add('routes.legs.steps.endLocation');\r\n// Fields.Add('routes.legs.steps.navigationInstructions.maneuver');\r\n Fields.Add('routes.legs.steps.navigationInstruction.instructions');\r\n// Fields.Add('routes.legs.steps.travelmode');\r\n// Fields.Add('routes.legs.steps.transitDetails');\r\n\r\n AHeaders.Add(TTMSFNCCloudBaseRequestHeader.Create('X-Goog-FieldMask', Fields.CommaText));\r\n Fields.Free;\r\nend;\r\n\r\nconstructor TTMSFNCDirectionsGoogleRoutesDirections.Create;\r\nbegin\r\n inherited;\r\nend;\r\n\r\ndestructor TTMSFNCDirectionsGoogleRoutesDirections.Destroy;\r\nbegin\r\n inherited;\r\nend;\r\n\r\nprocedure TTMSFNCDirectionsGoogleRoutesDirections.DestroyDirections;\r\nbegin\r\n DirectionsService.DestroyDirections(Self);\r\nend;\r\n\r\nfunction TTMSFNCDirectionsGoogleRoutesDirections.GetHost: string;\r\nbegin\r\n Result := 'https://routes.googleapis.com';\r\nend;\r\n\r\nfunction TTMSFNCDirectionsGoogleRoutesDirections.GetIdentifier: string;\r\nbegin\r\n Result := 'GoogleRoutes';\r\nend;\r\n\r\nfunction TTMSFNCDirectionsGoogleRoutesDirections.GetPath(AOrigin, ADestination: string; AOriginLatitude, AOriginLongitude,\r\n ADestinationLatitude, ADestinationLongitude: Double; ATravelMode: TTMSFNCDirectionsTravelMode = tmDriving; AWayPoints: TTMSFNCMapsCoordinateRecArray = nil): string;\r\nbegin\r\n Result := '/directions/v2:computeRoutes';\r\nend;\r\n\r\nfunction TTMSFNCDirectionsGoogleRoutesDirections.GetPostData(AOrigin, ADestination: string; AOriginLatitude, AOriginLongitude,\r\n ADestinationLatitude, ADestinationLongitude: Double; AAlternatives: Boolean = False;\r\n ATravelMode: TTMSFNCDirectionsTravelMode = tmDriving; AWayPointList: TStringList = nil; AWayPoints: TTMSFNCMapsCoordinateRecArray = nil;\r\n AOptimizeWayPoints: Boolean = False; ALocale: string = ''; AAvoidTolls: Boolean = False;\r\n AAvoidHighways: Boolean = False): string;\r\nvar\r\n TravelMode, WayPoints, Locale: string;\r\n I, J: Integer;\r\nbegin\r\n if ATravelMode in [tmTruck] then\r\n FTravelMode := tmDriving\r\n else\r\n FTravelMode := ATravelMode;\r\n\r\n case FTravelMode of\r\n tmDriving: TravelMode := 'DRIVE';\r\n tmWalking: TravelMode := 'WALK';\r\n tmBicycling: TravelMode := 'BICYCLE';\r\n tmPublicTransport: TravelMode := 'TRANSIT';\r\n end;\r\n\r\n if ALocale = '' then\r\n begin\r\n Locale := 'EN';\r\n end\r\n else\r\n begin\r\n Locale := ALocale;\r\n end;\r\n\r\n WayPoints := '';\r\n\r\n if ATravelMode <> tmPublicTransport then\r\n begin\r\n if Assigned(AWayPointList) and (AWayPointList.Count > 0) then\r\n begin\r\n WayPoints := ' \"intermediates\": [';\r\n for I := 0 to (AWayPointList.Count - 1) do\r\n WayPoints := WayPoints + '{\"address\": \"' + AWayPointList[I] + '\"},';\r\n WayPoints := WayPoints + ']';\r\n end;\r\n\r\n if Assigned(AWayPoints) and (Length(AWayPoints) > 0) then\r\n begin\r\n WayPoints := ' \"intermediates\": [';\r\n J := 0;\r\n for I := Low(AWayPoints) to High(AWayPoints) do\r\n begin\r\n if J > 0 then\r\n begin\r\n WayPoints := WayPoints + ' , ';\r\n end;\r\n\r\n WayPoints := WayPoints +\r\n ' {\"location\":{' + LB +\r\n ' \"latLng\":{' + LB +\r\n ' \"latitude\": ' + TTMSFNCUtils.FloatToStrDot(AWayPoints[I].Latitude) + ',' + LB +\r\n ' \"longitude\": ' + TTMSFNCUtils.FloatToStrDot(AWayPoints[I].Longitude) + '' + LB +\r\n ' }' + LB +\r\n ' }}' + LB;\r\n\r\n J := J + 1;\r\n end;\r\n WayPoints := WayPoints + ']' + LB;\r\n end;\r\n\r\n if WayPoints <> '' then\r\n begin\r\n WayPoints := WayPoints +\r\n ', \"optimizeWaypointOrder\": ' + LowerCase(BoolToStr(AOptimizeWayPoints, True)) + '' + LB;\r\n end;\r\n end;\r\n\r\n Result := '{' + LB +\r\n ' \"origin\":{' + LB;\r\n\r\n if AOrigin <> '' then\r\n begin\r\n Result := Result + ' \"address\": \"' + AOrigin + '\"' + LB;\r\n end\r\n else\r\n begin\r\n Result := Result +\r\n ' \"location\":{' + LB +\r\n ' \"latLng\":{' + LB +\r\n ' \"latitude\": ' + TTMSFNCUtils.FloatToStrDot(AOriginLatitude) + ',' + LB +\r\n ' \"longitude\": ' + TTMSFNCUtils.FloatToStrDot(AOriginLongitude) + '' + LB +\r\n ' }' + LB +\r\n ' }' + LB;\r\n end;\r\n\r\n Result := Result + ' },' + LB +\r\n ' \"destination\":{' + LB;\r\n\r\n if ADestination <> '' then\r\n begin\r\n Result := Result + ' \"address\": \"' + ADestination + '\"' + LB;\r\n end\r\n else\r\n begin\r\n Result := Result +\r\n ' \"location\":{' + LB +\r\n ' \"latLng\":{' + LB +\r\n ' \"latitude\": ' + TTMSFNCUtils.FloatToStrDot(ADestinationLatitude) + ',' + LB +\r\n ' \"longitude\": ' + TTMSFNCUtils.FloatToStrDot(ADestinationLongitude) + '' + LB +\r\n ' }' + LB +\r\n ' }' + LB;\r\n end;\r\n\r\n Result := Result + ' },' + LB +\r\n ' \"travelMode\": \"' + TravelMode + '\",' + LB;\r\n\r\n Result := DirectionsProperties.GetGoogleRoutesOptions(Result, FTravelMode, AWayPoints, AWayPointList, AOptimizeWayPoints);\r\n\r\n Result := Result +\r\n ' \"computeAlternativeRoutes\": ' + LowerCase(BoolToStr(AAlternatives, True)) + ',' + LB;\r\n\r\n if FTravelMode = tmDriving then\r\n begin\r\n Result := Result +\r\n ' \"routeModifiers\": {' + LB +\r\n ' \"avoidTolls\": ' + LowerCase(BoolToStr(AAvoidTolls, True)) + ',' + LB +\r\n ' \"avoidHighways\": ' + LowerCase(BoolToStr(AAvoidHighways, True)) + ',' + LB +\r\n ' \"avoidFerries\": false,' + LB +\r\n // ' \"vehicleInfo\": {\"emissionType\": \"ELECTRIC\"},' + LB +\r\n ' },' + LB;\r\n end;\r\n\r\n Result := Result +\r\n ' \"languageCode\": \"' + Locale + '\",' + LB +\r\n ' \"units\": \"IMPERIAL\",' + LB +\r\n WayPoints +\r\n '}' + LB;\r\nend;\r\n\r\nfunction TTMSFNCDirectionsGoogleRoutesDirections.GetQuery(AOrigin, ADestination: string; AOriginLatitude, AOriginLongitude,\r\n ADestinationLatitude, ADestinationLongitude: Double; AAlternatives: Boolean = False;\r\n ATravelMode: TTMSFNCDirectionsTravelMode = tmDriving; AWayPointList: TStringList = nil; AWayPoints: TTMSFNCMapsCoordinateRecArray = nil;\r\n AOptimizeWayPoints: Boolean = False; ALocale: string = ''; AAVoidTolls: Boolean = False;\r\n AAvoidHighways: Boolean = False): string;\r\nbegin\r\n Result := 'key=' + DirectionsProperties.GetAPIKey;\r\nend;\r\n\r\nfunction TTMSFNCDirectionsGoogleRoutesDirections.GetRequestMethod: TTMSFNCCloudBaseRequestMethod;\r\nbegin\r\n Result := rmPOST;\r\nend;\r\n\r\nfunction TTMSFNCDirectionsGoogleRoutesDirections.IsValid: Boolean;\r\nbegin\r\n Result := DirectionsProperties.GetAPIKey <> '';\r\nend;\r\n\r\nprocedure TTMSFNCDirectionsGoogleRoutesDirections.Parse(ARequest: TTMSFNCDirectionsRequest; ARequestResult: string);\r\nvar\r\n d: TTMSFNCDirectionsItems;\r\n di: TTMSFNCDirectionsItem;\r\n step, lstep: TTMSFNCDirectionsStep;\r\n wp: TTMSFNCDirectionsWayPoint;\r\n l: TTMSFNCDirectionsLeg;\r\n spi: TTMSFNCSpeedReadingInterval;\r\n fcm: string;\r\n fcmint: Integer;\r\n\r\n o, jo, jol, jos: TJSONValue;\r\n jar, jal, jas: TJSONArray;\r\n i, j, k, lm: Integer;\r\n os, ot: TJSONObject;\r\n wpIndex: array of integer;\r\nbegin\r\n if Assigned(DirectionsProperties) then\r\n begin\r\n ARequest.TravelMode := FTravelMode;\r\n\r\n d := ARequest.Items;\r\n if Assigned(d) then\r\n begin\r\n if ARequestResult <> '' then\r\n begin\r\n o := TTMSFNCUtils.ParseJSON(ARequestResult);\r\n if Assigned(o) then\r\n begin\r\n try\r\n ARequest.Status := TTMSFNCUtils.GetJSONProp(o, 'status');\r\n ARequest.ErrorMessage := TTMSFNCUtils.GetJSONProp(o, 'error_message');\r\n\r\n jar := TTMSFNCUtils.GetJSONValue(o, 'routes') as TJSONArray;\r\n if Assigned(jar) then\r\n begin\r\n\r\n for i := 0 to TTMSFNCUtils.GetJSONArraySize(jar) - 1 do\r\n begin\r\n jo := TTMSFNCUtils.GetJSONArrayItem(jar, i);\r\n\r\n di := d.Add;\r\n\r\n di.Summary := TTMSFNCUtils.GetJSONProp(jo, 'description');\r\n //di.Warnings := TTMSFNCUtils.GetJSONProp(jo, 'warnings'); //array\r\n di.Distance := TTMSFNCUtils.GetJSONIntegerValue(jo, 'distanceMeters');\r\n di.Duration := StrToInt(StringReplace(TTMSFNCUtils.GetJSONProp(jo, 'duration'), 's', '', []));\r\n\r\n os := TTMSFNCUtils.GetJSONValue(jo, 'polyline') as TJSONObject;\r\n if Assigned(os) then\r\n begin\r\n DecodeValues(TTMSFNCUtils.GetJSONProp(os, 'encodedPolyline'), di.Coordinates);\r\n end;\r\n\r\n SetLength(wpIndex, 1);\r\n wpIndex[0] := -1;\r\n\r\n jal := TTMSFNCUtils.GetJSONValue(jo, 'optimizedIntermediateWaypointIndex') as TJSONArray;\r\n if Assigned(jal) then\r\n begin\r\n SetLength(wpIndex, TTMSFNCUtils.GetJSONArraySize(jal) + 1);\r\n\r\n for j := 0 to TTMSFNCUtils.GetJSONArraySize(jal) - 1 do\r\n begin\r\n jol := TTMSFNCUtils.GetJSONArrayItem(jal, j);\r\n if jol.Value <> '' then\r\n wpIndex[j + 1] := StrToInt(jol.Value);\r\n end;\r\n end;\r\n\r\n if di is TTMSFNCGoogleRoutesItem then\r\n begin\r\n jas := jo['routeLabels'].AsArray;\r\n if Assigned(jas) then\r\n begin\r\n (di as TTMSFNCGoogleRoutesItem).RouteLabels.JSON := jas.ToJSON;\r\n end;\r\n\r\n jos := jo['travelAdvisory'];\r\n if Assigned(jos) then\r\n begin\r\n fcm := jos['fuelConsumptionMicroliters'].AsString;\r\n TryStrToInt(fcm, fcmint);\r\n (di as TTMSFNCGoogleRoutesItem).TravelAdvisory.FuelConsumptionMicroliters := fcmint;\r\n// (di as TTMSFNCGoogleRoutesItem).TravelAdvisory.JSON := jos.ToJSON;\r\n jas := jos['speedReadingIntervals'].AsArray;\r\n if Assigned(jas) then\r\n begin\r\n for K := 0 to jas.Count - 1 do\r\n begin\r\n spi := (di as TTMSFNCGoogleRoutesItem).TravelAdvisory.SpeedReadingIntervals.Add;\r\n spi.JSON := jas[K].ToJSON;\r\n\r\n// spi.StartPolylinePointIndex := jol['startPolylinePointIndex'].AsInteger;\r\n// spi.EndPolylinePointIndex := jol['endPolylinePointIndex'].AsInteger;\r\n// spi.Speed := jol['speed'].AsString;\r\n end;\r\n end;\r\n end;\r\n end;\r\n\r\n jal := TTMSFNCUtils.GetJSONValue(jo, 'legs') as TJSONArray;\r\n if Assigned(jal) then\r\n begin\r\n for j := 0 to TTMSFNCUtils.GetJSONArraySize(jal) - 1 do\r\n begin\r\n jol := TTMSFNCUtils.GetJSONArrayItem(jal, j);\r\n\r\n l := di.Legs.Add;\r\n\r\n wp := di.WayPoints.Add;\r\n if Length(wpIndex) > j then\r\n wp.OptimizedIndex := wpIndex[j];\r\n\r\n //not available\r\n //l.StartAddress := TTMSFNCUtils.GetJSONProp(jol, 'start_address');\r\n //l.EndAddress := TTMSFNCUtils.GetJSONProp(jol, 'end_address');\r\n\r\n l.Distance := TTMSFNCUtils.GetJSONIntegerValue(jol, 'distanceMeters');\r\n wp.Distance := l.Distance;\r\n\r\n l.Duration := StrToInt(StringReplace(TTMSFNCUtils.GetJSONProp(jol, 'duration'), 's', '', []));\r\n wp.Duration := l.Duration;\r\n\r\n os := TTMSFNCUtils.GetJSONValue(jol, 'polyline') as TJSONObject;\r\n if Assigned(os) then\r\n begin\r\n DecodeValues(TTMSFNCUtils.GetJSONProp(os, 'encodedPolyline'), l.Coordinates);\r\n end;\r\n\r\n os := TTMSFNCUtils.GetJSONValue(jol, 'endLocation') as TJSONObject;\r\n if Assigned(os) then\r\n begin\r\n ot := TTMSFNCUtils.GetJSONValue(os, 'latLng') as TJSONObject;\r\n if Assigned(ot) then\r\n begin\r\n l.EndLocation.Latitude := TTMSFNCUtils.GetJSONDoubleValue(ot, 'latitude');\r\n l.EndLocation.Longitude := TTMSFNCUtils.GetJSONDoubleValue(ot, 'longitude');\r\n end;\r\n end;\r\n\r\n os := TTMSFNCUtils.GetJSONValue(jol, 'startLocation') as TJSONObject;\r\n if Assigned(os) then\r\n begin\r\n ot := TTMSFNCUtils.GetJSONValue(os, 'latLng') as TJSONObject;\r\n if Assigned(ot) then\r\n begin\r\n l.StartLocation.Latitude := TTMSFNCUtils.GetJSONDoubleValue(ot, 'latitude');\r\n l.StartLocation.Longitude := TTMSFNCUtils.GetJSONDoubleValue(ot, 'longitude');\r\n end;\r\n end;\r\n\r\n jas := TTMSFNCUtils.GetJSONValue(jol, 'steps') as TJSONArray;\r\n if Assigned(jas) then\r\n begin\r\n for k := 0 to TTMSFNCUtils.GetJSONArraySize(jas) - 1 do\r\n begin\r\n jos := TTMSFNCUtils.GetJSONArrayItem(jas, k);\r\n\r\n step := di.Steps.Add;\r\n\r\n step.Distance := TTMSFNCUtils.GetJSONIntegerValue(jos, 'distanceMeters');\r\n step.Duration := StrToInt(StringReplace(TTMSFNCUtils.GetJSONProp(jos, 'staticDuration'), 's', '', []));\r\n\r\n os := TTMSFNCUtils.GetJSONValue(jos, 'navigationInstruction') as TJSONObject;\r\n if Assigned(os) then\r\n begin\r\n step.Instructions := TTMSFNCUtils.GetJSONProp(os, 'instructions');\r\n// step.Maneuver := TTMSFNCUtils.GetJSONProp(os, 'maneuver');\r\n end;\r\n\r\n// step.TravelMode := TTMSFNCUtils.GetJSONProp(os, 'travelMode');\r\n\r\n os := TTMSFNCUtils.GetJSONValue(jos, 'polyline') as TJSONObject;\r\n if Assigned(os) then\r\n DecodeValues(TTMSFNCUtils.GetJSONProp(os, 'encodedPolyline'), step.Coordinates);\r\n\r\n for lm := 0 to step.Coordinates.Count - 1 do\r\n l.Coordinates.Add.Assign(step.Coordinates[lm]);\r\n\r\n os := TTMSFNCUtils.GetJSONValue(jos, 'endLocation') as TJSONObject;\r\n if Assigned(os) then\r\n begin\r\n ot := TTMSFNCUtils.GetJSONValue(os, 'latLng') as TJSONObject;\r\n if Assigned(ot) then\r\n begin\r\n step.EndLocation.Latitude := TTMSFNCUtils.GetJSONDoubleValue(ot, 'latitude');\r\n step.EndLocation.Longitude := TTMSFNCUtils.GetJSONDoubleValue(ot, 'longitude');\r\n end;\r\n end;\r\n\r\n os := TTMSFNCUtils.GetJSONValue(jos, 'startLocation') as TJSONObject;\r\n if Assigned(os) then\r\n begin\r\n ot := TTMSFNCUtils.GetJSONValue(os, 'latLng') as TJSONObject;\r\n if Assigned(ot) then\r\n begin\r\n step.StartLocation.Latitude := TTMSFNCUtils.GetJSONDoubleValue(ot, 'latitude');\r\n step.StartLocation.Longitude := TTMSFNCUtils.GetJSONDoubleValue(ot, 'longitude');\r\n end;\r\n end;\r\n\r\n lstep := l.Steps.Add;\r\n lstep.Assign(step);\r\n end;\r\n end;\r\n end;\r\n end;\r\n end;\r\n end;\r\n finally\r\n o.Free;\r\n end;\r\n end;\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\nend.\r\n\r\n","{********************************************************************}\r\n{ }\r\n{ written by TMS Software }\r\n{ copyright (c) 2020 - 2024 }\r\n{ Email : info@tmssoftware.com }\r\n{ Web : http://www.tmssoftware.com }\r\n{ }\r\n{ The source code is given as is. The author is not responsible }\r\n{ for any possible damage done due to the use of this code. }\r\n{ The complete source code remains property of the author and may }\r\n{ not be distributed, published, given or sold in any form as such. }\r\n{ No parts of the source code can be included in any other component }\r\n{ or application without written authorization of the author. }\r\n{********************************************************************}\r\n\r\nunit WEBLib.TMSFNCDirections.Here;\r\n\r\n{$I WEBLib.TMSFNCDefines.inc}\r\n\r\n{$IFDEF WEBLIB}\r\n{$DEFINE LCLWEBLIB}\r\n{$ENDIF}\r\n{$IFDEF LCLLIB}\r\n{$DEFINE LCLWEBLIB}\r\n{$ENDIF}\r\n\r\ninterface\r\n\r\nprocedure RegisterHereDirectionsService;\r\nprocedure UnRegisterHereDirectionsService;\r\n\r\nimplementation\r\n\r\nuses\r\n Classes, Math, DateUtils, Types, WEBLib.TMSFNCDirections,\r\n WEBLib.TMSFNCUtils, WEBLib.TMSFNCTypes, WEBLib.TMSFNCMapsCommonTypes, WEBLib.TMSFNCCloudBase, SysUtils\r\n {$IFNDEF WEBLIB}\r\n {$IFNDEF LCLLIB}\r\n {$HINTS OFF}\r\n {$IF COMPILERVERSION > 26}\r\n ,JSON\r\n {$ELSE}\r\n ,DBXJSON\r\n {$IFEND}\r\n {$HINTS ON}\r\n {$ELSE}\r\n ,fpjson\r\n {$ENDIF}\r\n {$ENDIF}\r\n\r\n {$IFDEF WEBLIB}\r\n ,Contnrs, Web, WEBLIB.JSON\r\n {$ENDIF}\r\n {$IFNDEF LCLWEBLIB}\r\n ,Generics.Collections, Generics.Defaults\r\n {$HINTS OFF}\r\n {$IF COMPILERVERSION > 22}\r\n , UITypes\r\n {$IFEND}\r\n {$HINTS ON}\r\n {$ENDIF}\r\n {$IFDEF LCLLIB}\r\n ,fgl\r\n {$ENDIF}\r\n ;\r\n\r\ntype\r\n TTMSFNCDirectionsHereService = class;\r\n\r\n TTMSFNCDirectionsHereDirectionsFactoryService = class(TTMSFNCDirectionsFactoryService, ITMSFNCDirectionsServiceHere);\r\n\r\n TTMSFNCDirectionsHereService = class(TTMSFNCDirectionsHereDirectionsFactoryService)\r\n protected\r\n function DoCreateDirections: ITMSFNCCustomDirections; override;\r\n end;\r\n\r\nconst\r\n DECODING_TABLE: array[0..77] of Integer = (\r\n 62, -1, -1, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, -1, -1, -1, -1, -1, -1, -1,\r\n 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21,\r\n 22, 23, 24, 25, -1, -1, -1, -1, 63, -1, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35,\r\n 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51\r\n\r\n );\r\n\r\ntype\r\n TTMSFNCDirectionsHereDirections = class;\r\n\r\n TTMSFNCDirectionsHereDirectionsThirdDimensionValue = (tdAbsent, tdLevel, tdAltitude, tdElevation, tdReserved1, tdReserved2, tdCustom1, tdCustom2);\r\n {$IFNDEF WEBLIB}\r\n TTMSFNCDirectionsHereDirectionsThirdDimensionValueEnum = TTMSFNCDirectionsHereDirectionsThirdDimensionValue;\r\n {$ELSE}\r\n TTMSFNCDirectionsHereDirectionsThirdDimensionValueEnum = set of TTMSFNCDirectionsHereDirectionsThirdDimensionValue;\r\n {$ENDIF}\r\n\r\n TTMSFNCDirectionsHereDirectionsThirdDimension = class\r\n public\r\n class function fromNum(value: Integer): TTMSFNCDirectionsHereDirectionsThirdDimensionValue;\r\n end;\r\n\r\n TTMSFNCDirectionsHereDirectionsConverter = class\r\n private\r\n multiplier, lastValue: Integer;\r\n protected\r\n procedure setPrecision(precision: Integer);\r\n public\r\n constructor Create(precision: Integer);\r\n class function decodeUnsignedVarInt(enc: string; var idx: integer; var res: Integer): Boolean;\r\n class function decodeChar(charValue: Char): Integer;\r\n function decodeValue(enc: string; var idx: Integer; var c: Double): Boolean;\r\n end;\r\n\r\n TTMSFNCDirectionsHereDirectionsDecoder = class\r\n private\r\n encoded: string;\r\n index: Integer;\r\n latConverter: TTMSFNCDirectionsHereDirectionsConverter;\r\n lngConverter: TTMSFNCDirectionsHereDirectionsConverter;\r\n zConverter: TTMSFNCDirectionsHereDirectionsConverter;\r\n precision: Integer;\r\n thirdDimPrecision: Integer;\r\n thirdDimension: TTMSFNCDirectionsHereDirectionsThirdDimensionValue;\r\n protected\r\n procedure decodeHeaderFromString(enc: string; var idx: Integer; var h: Integer);\r\n procedure decodeHeader;\r\n function decodeOne(var lat, lng, z: Double): Boolean;\r\n function hasThirdDimension: Boolean;\r\n public\r\n constructor Create(AEncoded: string);\r\n destructor Destroy; override;\r\n class function Decode(AEncoded: string): TTMSFNCMapsCoordinateRecArray;\r\n end;\r\n\r\n TTMSFNCDirectionsHereDirections = class(TTMSFNCCustomDirectionsInterfacedObject, ITMSFNCCustomDirections)\r\n protected\r\n FTravelMode: TTMSFNCDirectionsTravelMode;\r\n function GetIdentifier: string;\r\n function IsValid: Boolean;\r\n function GetRequestMethod: TTMSFNCCloudBaseRequestMethod;\r\n function GetHost: string;\r\n function GetPath(AOrigin, ADestination: string; AOriginLatitude, AOriginLongitude,\r\n ADestinationLatitude, ADestinationLongitude: Double; ATravelMode: TTMSFNCDirectionsTravelMode; AWayPoints: TTMSFNCMapsCoordinateRecArray = nil): string;\r\n function GetQuery(AOrigin, ADestination: string; AOriginLatitude, AOriginLongitude,\r\n ADestinationLatitude, ADestinationLongitude: Double; AAlternatives: Boolean = False;\r\n ATravelMode: TTMSFNCDirectionsTravelMode = tmDriving; AWayPointList: TStringList = nil; AWayPoints: TTMSFNCMapsCoordinateRecArray = nil;\r\n AOptimizeWayPoints: Boolean = False; ALocale: string = ''; AAVoidTolls: Boolean = False;\r\n AAvoidHighways: Boolean = False): string;\r\n function GetPostData(AOrigin, ADestination: string; AOriginLatitude, AOriginLongitude,\r\n ADestinationLatitude, ADestinationLongitude: Double; AAlternatives: Boolean = False;\r\n ATravelMode: TTMSFNCDirectionsTravelMode = tmDriving; AWayPointList: TStringList = nil; AWayPoints: TTMSFNCMapsCoordinateRecArray = nil;\r\n AOptimizeWayPoints: Boolean = False; ALocale: string = ''; AAvoidTolls: Boolean = False;\r\n AAvoidHighways: Boolean = False): string;\r\n procedure Parse(ARequest: TTMSFNCDirectionsRequest; ARequestResult: string);\r\n procedure AddHeaders(AHeaders: TTMSFNCCloudBaseRequestHeaders);\r\n procedure DestroyDirections;\r\n public\r\n constructor Create;\r\n destructor Destroy; override;\r\n end;\r\n\r\nvar\r\n DirectionsService: ITMSFNCDirectionsServiceHere;\r\n\r\nprocedure RegisterHereDirectionsService;\r\nbegin\r\n if not TTMSFNCDirectionsPlatformServices.Current.SupportsPlatformService(ITMSFNCDirectionsServiceHere, IInterface(DirectionsService)) then\r\n begin\r\n DirectionsService := TTMSFNCDirectionsHereService.Create;\r\n TTMSFNCDirectionsPlatformServices.Current.AddPlatformService(ITMSFNCDirectionsServiceHere, DirectionsService);\r\n end;\r\nend;\r\n\r\nprocedure UnregisterHereDirectionsService;\r\nbegin\r\n TTMSFNCDirectionsPlatformServices.Current.RemovePlatformService(ITMSFNCDirectionsServiceHere);\r\nend;\r\n\r\n{ TTMSFNCDirectionsHereService }\r\n\r\nfunction TTMSFNCDirectionsHereService.DoCreateDirections: ITMSFNCCustomDirections;\r\nbegin\r\n Result := TTMSFNCDirectionsHereDirections.Create;\r\nend;\r\n\r\nprocedure TTMSFNCDirectionsHereDirections.AddHeaders(\r\n AHeaders: TTMSFNCCloudBaseRequestHeaders);\r\nbegin\r\n\r\nend;\r\n\r\nconstructor TTMSFNCDirectionsHereDirections.Create;\r\nbegin\r\n inherited;\r\nend;\r\n\r\ndestructor TTMSFNCDirectionsHereDirections.Destroy;\r\nbegin\r\n inherited;\r\nend;\r\n\r\nprocedure TTMSFNCDirectionsHereDirections.DestroyDirections;\r\nbegin\r\n DirectionsService.DestroyDirections(Self);\r\nend;\r\n\r\nfunction TTMSFNCDirectionsHereDirections.GetHost: string;\r\nbegin\r\n Result := 'https://router.hereapi.com';\r\nend;\r\n\r\nfunction TTMSFNCDirectionsHereDirections.GetIdentifier: string;\r\nbegin\r\n Result := 'Here';\r\nend;\r\n\r\nfunction TTMSFNCDirectionsHereDirections.GetPath(AOrigin, ADestination: string; AOriginLatitude, AOriginLongitude,\r\n ADestinationLatitude, ADestinationLongitude: Double; ATravelMode: TTMSFNCDirectionsTravelMode; AWayPoints: TTMSFNCMapsCoordinateRecArray = nil): string;\r\nbegin\r\n Result := '/v8/routes';\r\nend;\r\n\r\nfunction TTMSFNCDirectionsHereDirections.GetPostData(AOrigin, ADestination: string; AOriginLatitude, AOriginLongitude,\r\n ADestinationLatitude, ADestinationLongitude: Double; AAlternatives: Boolean = False;\r\n ATravelMode: TTMSFNCDirectionsTravelMode = tmDriving; AWayPointList: TStringList = nil; AWayPoints: TTMSFNCMapsCoordinateRecArray = nil;\r\n AOptimizeWayPoints: Boolean = False; ALocale: string = ''; AAvoidTolls: Boolean = False;\r\n AAvoidHighways: Boolean = False): string;\r\nbegin\r\n Result := '';\r\nend;\r\n\r\nfunction TTMSFNCDirectionsHereDirections.GetQuery(AOrigin, ADestination: string; AOriginLatitude, AOriginLongitude,\r\n ADestinationLatitude, ADestinationLongitude: Double; AAlternatives: Boolean = False;\r\n ATravelMode: TTMSFNCDirectionsTravelMode = tmDriving; AWayPointList: TStringList = nil; AWayPoints: TTMSFNCMapsCoordinateRecArray = nil;\r\n AOptimizeWayPoints: Boolean = False; ALocale: string = ''; AAVoidTolls: Boolean = False;\r\n AAvoidHighways: Boolean = False): string;\r\nvar\r\n TravelMode, WayPoints, Alternatives: string;\r\n I: Integer;\r\nbegin\r\n if AAlternatives then\r\n Alternatives := '3'\r\n else\r\n Alternatives := '0';\r\n\r\n if ATravelMode in [tmPublicTransport] then\r\n FTravelMode := tmDriving\r\n else\r\n FTravelMode := ATravelMode;\r\n\r\n case FTravelMode of\r\n tmDriving: TravelMode := 'car';\r\n tmWalking: TravelMode := 'pedestrian';\r\n tmBicycling: TravelMode := 'bicycle';\r\n tmTruck: TravelMode := 'truck';\r\n end;\r\n\r\n AOrigin := TTMSFNCUtils.FloatToStrDot(AOriginLatitude) + ',' + TTMSFNCUtils.FloatToStrDot(AOriginLongitude);\r\n ADestination := TTMSFNCUtils.FloatToStrDot(ADestinationLatitude) + ',' + TTMSFNCUtils.FloatToStrDot(ADestinationLongitude);\r\n\r\n WayPoints := '';\r\n\r\n if Assigned(AWaypoints) and (Length(AWayPoints) > 0) then\r\n begin\r\n for I := 0 to (Length(AWayPoints) - 1) do\r\n WayPoints := WayPoints + '&via=' + TTMSFNCUtils.FloatToStrDot(AWayPoints[I].Latitude) + ',' + TTMSFNCUtils.FloatToStrDot(AWayPoints[I].Longitude);\r\n end;\r\n\r\n Result := 'apiKey=' + DirectionsProperties.GetAPIKey\r\n + '&transportMode=' + TravelMode\r\n + '&origin=' + AOrigin\r\n + '&destination=' + ADestination\r\n + '&return=polyline,actions,instructions,summary'\r\n + WayPoints\r\n + '&alternatives=' + Alternatives;\r\n\r\n if ALocale <> '' then\r\n Result := Result + '&lang=' + ALocale;\r\n\r\n if ATravelMode = tmTruck then\r\n begin\r\n Result := DirectionsProperties.GetTruckOptions(Result, AAvoidTolls);\r\n end\r\n else\r\n begin\r\n Result := Result + '&routingMode=fast';\r\n\r\n if AAvoidTolls or AAvoidHighways then\r\n begin\r\n Result := Result + '&avoid[features]=';\r\n\r\n if AAvoidTolls then\r\n Result := Result + 'tollRoad,';\r\n\r\n if AAvoidHighways then\r\n Result := Result + 'controlledAccessHighway';\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCDirectionsHereDirections.GetRequestMethod: TTMSFNCCloudBaseRequestMethod;\r\nbegin\r\n Result := rmGet;\r\nend;\r\n\r\nfunction TTMSFNCDirectionsHereDirections.IsValid: Boolean;\r\nbegin\r\n Result := DirectionsProperties.GetAPIKey <> '';\r\nend;\r\n\r\nprocedure TTMSFNCDirectionsHereDirections.Parse(ARequest: TTMSFNCDirectionsRequest; ARequestResult: string);\r\nvar\r\n d: TTMSFNCDirectionsItems;\r\n di: TTMSFNCDirectionsItem;\r\n co: TTMSFNCMapsCoordinateItem;\r\n step, lstep: TTMSFNCDirectionsStep;\r\n\r\n o, jo, jol, jos: TJSONValue;\r\n jar, jal, jas: TJSONArray;\r\n i, j, k: Integer;\r\n l: TTMSFNCDirectionsLeg;\r\n ol, old, ola: TJSONObject;\r\n corlist: string;\r\n coarr: TTMSFNCMapsCoordinateRecArray;\r\n offset: Integer;\r\nbegin\r\n if Assigned(DirectionsProperties) then\r\n begin\r\n ARequest.TravelMode := FTravelMode;\r\n\r\n d := ARequest.Items;\r\n if Assigned(d) then\r\n begin\r\n if ARequestResult <> '' then\r\n begin\r\n o := TTMSFNCUtils.ParseJSON(ARequestResult);\r\n if Assigned(o) then\r\n begin\r\n try\r\n ARequest.Status := TTMSFNCUtils.GetJSONProp(o, 'status');\r\n ARequest.ErrorMessage := TTMSFNCUtils.GetJSONProp(o, 'title');\r\n\r\n if ARequest.Status = '' then\r\n ARequest.Status := TTMSFNCUtils.GetJSONProp(o, 'type') + ' ' + TTMSFNCUtils.GetJSONProp(o, 'subtype');\r\n\r\n if ARequest.ErrorMessage = '' then\r\n ARequest.ErrorMessage := TTMSFNCUtils.GetJSONProp(o, 'Details');\r\n\r\n jar := TTMSFNCUtils.GetJSONValue(o, 'routes') as TJSONArray;\r\n if Assigned(jar) then\r\n begin\r\n for i := 0 to TTMSFNCUtils.GetJSONArraySize(jar) - 1 do\r\n begin\r\n jo := TTMSFNCUtils.GetJSONArrayItem(jar, i);\r\n\r\n di := d.Add;\r\n di.Summary := 'Route ' + IntToStr(i);\r\n\r\n jal := TTMSFNCUtils.GetJSONValue(jo, 'sections') as TJSONArray;\r\n if Assigned(jal) then\r\n begin\r\n for j := 0 to TTMSFNCUtils.GetJSONArraySize(jal) - 1 do\r\n begin\r\n l := di.Legs.Add;\r\n\r\n jol := TTMSFNCUtils.GetJSONArrayItem(jal, j);\r\n\r\n old := TTMSFNCUtils.GetJSONValue(jol, 'arrival') as TJSONObject;\r\n if Assigned(old) then\r\n begin\r\n ol := TTMSFNCUtils.GetJSONValue(old, 'place') as TJSONObject;\r\n if Assigned(ol) then\r\n begin\r\n ol := TTMSFNCUtils.GetJSONValue(ol, 'location') as TJSONObject;\r\n if Assigned(ol) then\r\n begin\r\n l.EndLocation.Latitude := TTMSFNCUtils.GetJSONDoubleValue(ol, 'lat');\r\n l.EndLocation.Longitude := TTMSFNCUtils.GetJSONDoubleValue(ol, 'lng');\r\n end;\r\n end;\r\n end;\r\n\r\n ola := TTMSFNCUtils.GetJSONValue(jol, 'departure') as TJSONObject;\r\n if Assigned(ola) then\r\n begin\r\n ol := TTMSFNCUtils.GetJSONValue(ola, 'place') as TJSONObject;\r\n if Assigned(ol) then\r\n begin\r\n ol := TTMSFNCUtils.GetJSONValue(ol, 'location') as TJSONObject;\r\n if Assigned(ol) then\r\n begin\r\n l.StartLocation.Latitude := TTMSFNCUtils.GetJSONDoubleValue(ol, 'lat');\r\n l.StartLocation.Longitude := TTMSFNCUtils.GetJSONDoubleValue(ol, 'lng');\r\n end;\r\n end;\r\n end;\r\n\r\n corlist := TTMSFNCUtils.GetJSONProp(jol, 'polyline');\r\n coarr := TTMSFNCDirectionsHereDirectionsDecoder.Decode(corlist);\r\n\r\n for k := 0 to Length(coarr) - 1 do\r\n begin\r\n co := di.Coordinates.Add;\r\n co.Latitude := coarr[k].Latitude;\r\n co.Longitude := coarr[k].Longitude;\r\n l.Coordinates.Add.Assign(co);\r\n end;\r\n\r\n jas := TTMSFNCUtils.GetJSONValue(jol, 'actions') as TJSONArray;\r\n if Assigned(jas) then\r\n begin\r\n for k := 0 to TTMSFNCUtils.GetJSONArraySize(jas) - 1 do\r\n begin\r\n jos := TTMSFNCUtils.GetJSONArrayItem(jas, k);\r\n\r\n step := di.Steps.Add;\r\n\r\n offset := TTMSFNCUtils.GetJSONIntegerValue(jos, 'offset');\r\n if (di.Coordinates.Count > offset) and (offset >= 0) then\r\n begin\r\n step.StartLocation.Latitude := di.Coordinates[offset].Latitude;\r\n step.StartLocation.Longitude := di.Coordinates[offset].Longitude;\r\n end;\r\n\r\n step.Instructions := TTMSFNCUtils.GetJSONProp(jos, 'instruction');\r\n step.Distance := TTMSFNCUtils.GetJSONIntegerValue(jos, 'length');\r\n step.Duration := TTMSFNCUtils.GetJSONIntegerValue(jos, 'duration');\r\n\r\n lstep := l.Steps.Add;\r\n lstep.Assign(step);\r\n end;\r\n end;\r\n\r\n ol := TTMSFNCUtils.GetJSONValue(jol, 'summary') as TJSONObject;\r\n if Assigned(ol) then\r\n begin\r\n l.Distance := TTMSFNCUtils.GetJSONIntegerValue(ol, 'length');\r\n di.Distance := di.Distance + l.Distance;\r\n l.Duration := TTMSFNCUtils.GetJSONIntegerValue(ol, 'duration');\r\n di.Duration := di.Duration + l.Duration;\r\n end;\r\n end;\r\n end;\r\n end;\r\n end;\r\n finally\r\n o.Free;\r\n end;\r\n end;\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\n{ TTMSFNCDirectionsHereDirectionsDecoder }\r\n\r\nconstructor TTMSFNCDirectionsHereDirectionsDecoder.Create(AEncoded: string);\r\nbegin\r\n encoded := AEncoded;\r\n index := 0;\r\n decodeHeader;\r\n latConverter := TTMSFNCDirectionsHereDirectionsConverter.Create(precision);\r\n lngConverter := TTMSFNCDirectionsHereDirectionsConverter.Create(precision);\r\n zConverter := TTMSFNCDirectionsHereDirectionsConverter.Create(thirdDimPrecision);\r\nend;\r\n\r\nclass function TTMSFNCDirectionsHereDirectionsDecoder.Decode(\r\n AEncoded: string): TTMSFNCMapsCoordinateRecArray;\r\nvar\r\n d: TTMSFNCDirectionsHereDirectionsDecoder;\r\n a: TTMSFNCMapsCoordinateRecArray;\r\n lat, lng, z: Double;\r\nbegin\r\n if AEncoded = '' then\r\n Exit;\r\n\r\n d := TTMSFNCDirectionsHereDirectionsDecoder.Create(AEncoded);\r\n try\r\n lat := 0;\r\n lng := 0;\r\n z := 0;\r\n while d.decodeOne(lat, lng, z) do\r\n begin\r\n SetLength(a, Length(a) + 1);\r\n a[Length(a) - 1] := CreateCoordinate(lat, lng);\r\n end;\r\n\r\n Result := a;\r\n\r\n finally\r\n d.Free;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCDirectionsHereDirectionsDecoder.decodeHeader;\r\nvar\r\n td, header: Integer;\r\nbegin\r\n decodeHeaderFromString(encoded, index, header);\r\n precision := header and 15;\r\n header := header shr 4;\r\n td := (header and 7);\r\n thirdDimension := TTMSFNCDirectionsHereDirectionsThirdDimension.fromNum(td);\r\nend;\r\n\r\nprocedure TTMSFNCDirectionsHereDirectionsDecoder.decodeHeaderFromString(enc: string; var idx: Integer; var h: Integer);\r\nvar\r\n value: Integer;\r\nbegin\r\n if not (TTMSFNCDirectionsHereDirectionsConverter.decodeUnsignedVarInt(enc, idx, value)) then\r\n Exit;\r\n\r\n if value <> 1 then\r\n Exit;\r\n\r\n if not (TTMSFNCDirectionsHereDirectionsConverter.decodeUnsignedVarInt(enc, index, value)) then\r\n Exit;\r\n\r\n h := value;\r\nend;\r\n\r\nfunction TTMSFNCDirectionsHereDirectionsDecoder.decodeOne(var lat, lng, z: Double): Boolean;\r\nbegin\r\n if index = Length(encoded) then\r\n begin\r\n Result := False;\r\n Exit;\r\n end;\r\n\r\n if not latConverter.decodeValue(encoded, index, lat) then\r\n raise Exception.Create('Invalid encoding');\r\n\r\n if not lngConverter.decodeValue(encoded, index, lng) then\r\n raise Exception.Create('Invalid encoding');\r\n\r\n if hasThirdDimension then\r\n begin\r\n if not zConverter.decodeValue(encoded, index, z) then\r\n raise Exception.Create('Invalid encoding');\r\n end;\r\n\r\n Result := True;\r\nend;\r\n\r\ndestructor TTMSFNCDirectionsHereDirectionsDecoder.Destroy;\r\nbegin\r\n latConverter.Free;\r\n lngConverter.Free;\r\n zConverter.Free;\r\n inherited;\r\nend;\r\n\r\nfunction TTMSFNCDirectionsHereDirectionsDecoder.hasThirdDimension: Boolean;\r\nbegin\r\n Result := thirdDimension <> tdAbsent;\r\nend;\r\n\r\n{ TTMSFNCDirectionsHereDirectionsConverter }\r\n\r\nconstructor TTMSFNCDirectionsHereDirectionsConverter.Create(precision: Integer);\r\nbegin\r\n setPrecision(precision);\r\nend;\r\n\r\nclass function TTMSFNCDirectionsHereDirectionsConverter.decodeChar(charValue: Char): Integer;\r\nvar\r\n pos: Integer;\r\nbegin\r\n pos := Ord(charValue) - 45;\r\n if (pos < 0) or (pos > 77) then\r\n begin\r\n Result := -1;\r\n Exit;\r\n end;\r\n\r\n Result := DECODING_TABLE[pos];\r\nend;\r\n\r\nclass function TTMSFNCDirectionsHereDirectionsConverter.decodeUnsignedVarInt(enc: string; var idx: integer;\r\n var res: Integer): Boolean;\r\nvar\r\n shift, delta, value: Integer;\r\nbegin\r\n shift := 0;\r\n delta := 0;\r\n\r\n while idx < Length(enc) do\r\n begin\r\n value := decodeChar(enc[idx{$IFNDEF ZEROSTRINGINDEX}+ 1{$ENDIF}]);\r\n if value < 0 then\r\n begin\r\n Result := False;\r\n Exit;\r\n end;\r\n\r\n Inc(idx);\r\n delta := delta or (value and $1F) shl shift;\r\n if (value and $20) = 0 then\r\n begin\r\n res := delta;\r\n Result := True;\r\n Exit;\r\n end\r\n else\r\n Inc(shift, 5);\r\n end;\r\n\r\n if shift > 0 then\r\n begin\r\n Result := False;\r\n Exit;\r\n end;\r\n\r\n Result := True;\r\nend;\r\n\r\nfunction TTMSFNCDirectionsHereDirectionsConverter.decodeValue(enc: string; var idx: Integer;\r\n var c: Double): Boolean;\r\nvar\r\n delta: Integer;\r\nbegin\r\n if not decodeUnsignedVarInt(enc, idx, delta) then\r\n begin\r\n Result := False;\r\n Exit;\r\n end;\r\n\r\n if (delta and 1) <> 0 then\r\n delta := not delta;\r\n\r\n delta := delta div (1 shl 1);\r\n Inc(lastValue, delta);\r\n c := lastValue / multiplier;\r\n\r\n Result := True;\r\nend;\r\n\r\nprocedure TTMSFNCDirectionsHereDirectionsConverter.setPrecision(precision: Integer);\r\nbegin\r\n multiplier := Round(Power(10, precision));\r\nend;\r\n\r\n{ TTMSFNCDirectionsHereDirectionsThirdDimension }\r\n\r\nclass function TTMSFNCDirectionsHereDirectionsThirdDimension.fromNum(value: Integer): TTMSFNCDirectionsHereDirectionsThirdDimensionValue;\r\nvar\r\n I: TTMSFNCDirectionsHereDirectionsThirdDimensionValue;\r\nbegin\r\n Result := tdAbsent;\r\n for I := Low(TTMSFNCDirectionsHereDirectionsThirdDimensionValueEnum) to High(TTMSFNCDirectionsHereDirectionsThirdDimensionValueEnum) do\r\n begin\r\n if value = Integer(I) then\r\n begin\r\n Result := I;\r\n Break;\r\n end;\r\n end;\r\nend;\r\n\r\nend.\r\n\r\n","{********************************************************************}\r\n{ }\r\n{ written by TMS Software }\r\n{ copyright (c) 2020 - 2021 }\r\n{ Email : info@tmssoftware.com }\r\n{ Web : http://www.tmssoftware.com }\r\n{ }\r\n{ The source code is given as is. The author is not responsible }\r\n{ for any possible damage done due to the use of this code. }\r\n{ The complete source code remains property of the author and may }\r\n{ not be distributed, published, given or sold in any form as such. }\r\n{ No parts of the source code can be included in any other component }\r\n{ or application without written authorization of the author. }\r\n{********************************************************************}\r\n\r\nunit WEBLib.TMSFNCDirections.Bing;\r\n\r\n{$I WEBLib.TMSFNCDefines.inc}\r\n\r\n{$IFDEF WEBLIB}\r\n{$DEFINE LCLWEBLIB}\r\n{$ENDIF}\r\n{$IFDEF LCLLIB}\r\n{$DEFINE LCLWEBLIB}\r\n{$ENDIF}\r\n\r\ninterface\r\n\r\nprocedure RegisterBingDirectionsService;\r\nprocedure UnRegisterBingDirectionsService;\r\n\r\nimplementation\r\n\r\nuses\r\n Classes, Math, DateUtils, Types, SysUtils, WEBLib.TMSFNCDirections,\r\n WEBLib.TMSFNCUtils, WEBLib.TMSFNCTypes, WEBLib.TMSFNCMapsCommonTypes, WEBLib.TMSFNCCloudBase\r\n {$IFNDEF WEBLIB}\r\n {$IFNDEF LCLLIB}\r\n {$HINTS OFF}\r\n {$IF COMPILERVERSION > 26}\r\n ,JSON\r\n {$ELSE}\r\n ,DBXJSON\r\n {$IFEND}\r\n {$HINTS ON}\r\n {$ELSE}\r\n ,fpjson\r\n {$ENDIF}\r\n {$ENDIF}\r\n\r\n {$IFDEF WEBLIB}\r\n ,Contnrs, Web, WEBLIB.JSON\r\n {$ENDIF}\r\n {$IFNDEF LCLWEBLIB}\r\n ,Generics.Collections, Generics.Defaults\r\n {$HINTS OFF}\r\n {$IF COMPILERVERSION > 22}\r\n , UITypes\r\n {$IFEND}\r\n {$HINTS ON}\r\n {$ENDIF}\r\n {$IFDEF LCLLIB}\r\n ,fgl\r\n {$ENDIF}\r\n ;\r\n\r\ntype\r\n TTMSFNCDirectionsBingService = class;\r\n\r\n TTMSFNCDirectionsBingDirectionsFactoryService = class(TTMSFNCDirectionsFactoryService, ITMSFNCDirectionsServiceBing);\r\n\r\n TTMSFNCDirectionsBingService = class(TTMSFNCDirectionsBingDirectionsFactoryService)\r\n protected\r\n function DoCreateDirections: ITMSFNCCustomDirections; override;\r\n end;\r\n\r\ntype\r\n TTMSFNCDirectionsBingDirections = class;\r\n\r\n TTMSFNCDirectionsBingDirections = class(TTMSFNCCustomDirectionsInterfacedObject, ITMSFNCCustomDirections)\r\n protected\r\n FTravelMode: TTMSFNCDirectionsTravelMode;\r\n function GetIdentifier: string;\r\n function IsValid: Boolean;\r\n function GetRequestMethod: TTMSFNCCloudBaseRequestMethod;\r\n function GetHost: string;\r\n function GetPath(AOrigin, ADestination: string; AOriginLatitude, AOriginLongitude,\r\n ADestinationLatitude, ADestinationLongitude: Double; ATravelMode: TTMSFNCDirectionsTravelMode; AWayPoints: TTMSFNCMapsCoordinateRecArray = nil): string;\r\n function GetQuery(AOrigin, ADestination: string; AOriginLatitude, AOriginLongitude,\r\n ADestinationLatitude, ADestinationLongitude: Double; AAlternatives: Boolean = False;\r\n ATravelMode: TTMSFNCDirectionsTravelMode = tmDriving; AWayPointList: TStringList = nil; AWayPoints: TTMSFNCMapsCoordinateRecArray = nil;\r\n AOptimizeWayPoints: Boolean = False; ALocale: string = ''; AAVoidTolls: Boolean = False;\r\n AAvoidHighways: Boolean = False): string;\r\n function GetPostData(AOrigin, ADestination: string; AOriginLatitude, AOriginLongitude,\r\n ADestinationLatitude, ADestinationLongitude: Double; AAlternatives: Boolean = False;\r\n ATravelMode: TTMSFNCDirectionsTravelMode = tmDriving; AWayPointList: TStringList = nil; AWayPoints: TTMSFNCMapsCoordinateRecArray = nil;\r\n AOptimizeWayPoints: Boolean = False; ALocale: string = ''; AAvoidTolls: Boolean = False;\r\n AAvoidHighways: Boolean = False): string;\r\n procedure Parse(ARequest: TTMSFNCDirectionsRequest; ARequestResult: string);\r\n procedure AddHeaders(AHeaders: TTMSFNCCloudBaseRequestHeaders);\r\n procedure DestroyDirections;\r\n public\r\n constructor Create;\r\n destructor Destroy; override;\r\n end;\r\n\r\nvar\r\n DirectionsService: ITMSFNCDirectionsServiceBing;\r\n\r\nprocedure RegisterBingDirectionsService;\r\nbegin\r\n if not TTMSFNCDirectionsPlatformServices.Current.SupportsPlatformService(ITMSFNCDirectionsServiceBing, IInterface(DirectionsService)) then\r\n begin\r\n DirectionsService := TTMSFNCDirectionsBingService.Create;\r\n TTMSFNCDirectionsPlatformServices.Current.AddPlatformService(ITMSFNCDirectionsServiceBing, DirectionsService);\r\n end;\r\nend;\r\n\r\nprocedure UnregisterBingDirectionsService;\r\nbegin\r\n TTMSFNCDirectionsPlatformServices.Current.RemovePlatformService(ITMSFNCDirectionsServiceBing);\r\nend;\r\n\r\n{ TTMSFNCDirectionsBingService }\r\n\r\nfunction TTMSFNCDirectionsBingService.DoCreateDirections: ITMSFNCCustomDirections;\r\nbegin\r\n Result := TTMSFNCDirectionsBingDirections.Create;\r\nend;\r\n\r\nprocedure TTMSFNCDirectionsBingDirections.AddHeaders(\r\n AHeaders: TTMSFNCCloudBaseRequestHeaders);\r\nbegin\r\n\r\nend;\r\n\r\nconstructor TTMSFNCDirectionsBingDirections.Create;\r\nbegin\r\n inherited;\r\nend;\r\n\r\ndestructor TTMSFNCDirectionsBingDirections.Destroy;\r\nbegin\r\n inherited;\r\nend;\r\n\r\nprocedure TTMSFNCDirectionsBingDirections.DestroyDirections;\r\nbegin\r\n DirectionsService.DestroyDirections(Self);\r\nend;\r\n\r\nfunction TTMSFNCDirectionsBingDirections.GetHost: string;\r\nbegin\r\n Result := 'https://dev.virtualearth.net';\r\nend;\r\n\r\nfunction TTMSFNCDirectionsBingDirections.GetIdentifier: string;\r\nbegin\r\n Result := 'BingMaps';\r\nend;\r\n\r\nfunction TTMSFNCDirectionsBingDirections.GetPath(AOrigin, ADestination: string; AOriginLatitude, AOriginLongitude,\r\n ADestinationLatitude, ADestinationLongitude: Double; ATravelMode: TTMSFNCDirectionsTravelMode; AWayPoints: TTMSFNCMapsCoordinateRecArray = nil): string;\r\nvar\r\n TravelMode: string;\r\nbegin\r\n\r\n if ATravelMode in [tmBicycling, tmTruck] then\r\n FTravelMode := tmDriving\r\n else\r\n FTravelMode := ATravelMode;\r\n\r\n case FTravelMode of\r\n tmDriving: TravelMode := 'driving';\r\n tmWalking: TravelMode := 'walking';\r\n tmPublicTransport: TravelMode := 'transit';\r\n end;\r\n\r\n Result := '/REST/v1/Routes/' + TravelMode + '/';\r\nend;\r\n\r\nfunction TTMSFNCDirectionsBingDirections.GetPostData(AOrigin, ADestination: string; AOriginLatitude, AOriginLongitude,\r\n ADestinationLatitude, ADestinationLongitude: Double; AAlternatives: Boolean = False;\r\n ATravelMode: TTMSFNCDirectionsTravelMode = tmDriving; AWayPointList: TStringList = nil; AWayPoints: TTMSFNCMapsCoordinateRecArray = nil;\r\n AOptimizeWayPoints: Boolean = False; ALocale: string = ''; AAvoidTolls: Boolean = False;\r\n AAvoidHighways: Boolean = False): string;\r\nbegin\r\n Result := '';\r\nend;\r\n\r\nfunction TTMSFNCDirectionsBingDirections.GetQuery(AOrigin, ADestination: string; AOriginLatitude, AOriginLongitude,\r\n ADestinationLatitude, ADestinationLongitude: Double; AAlternatives: Boolean = False;\r\n ATravelMode: TTMSFNCDirectionsTravelMode = tmDriving; AWayPointList: TStringList = nil; AWayPoints: TTMSFNCMapsCoordinateRecArray = nil;\r\n AOptimizeWayPoints: Boolean = False; ALocale: string = ''; AAVoidTolls: Boolean = False;\r\n AAvoidHighways: Boolean = False): string;\r\nvar\r\n WayPoints, Alternatives: string;\r\n I: Integer;\r\nbegin\r\n if AAlternatives then\r\n Alternatives := '3'\r\n else\r\n Alternatives := '1';\r\n\r\n if ATravelMode in [tmBicycling, tmTruck] then\r\n FTravelMode := tmDriving\r\n else\r\n FTravelMode := ATravelMode;\r\n\r\n if AOrigin = '' then\r\n AOrigin := TTMSFNCUtils.FloatToStrDot(AOriginLatitude) + ',' + TTMSFNCUtils.FloatToStrDot(AOriginLongitude);\r\n if ADestination = '' then\r\n ADestination := TTMSFNCUtils.FloatToStrDot(ADestinationLatitude) + ',' + TTMSFNCUtils.FloatToStrDot(ADestinationLongitude);\r\n\r\n if Assigned(AWaypoints) and (Length(AWayPoints) > 0) then\r\n begin\r\n for I := 0 to (Length(AWayPoints) - 1) do\r\n WayPoints := WayPoints + '&wayPoint.' + IntToStr(I+2) + '=' + TTMSFNCUtils.FloatToStrDot(AWayPoints[I].Latitude) + ',' + TTMSFNCUtils.FloatToStrDot(AWayPoints[I].Longitude);\r\n WayPoints := '&wayPoint.1=' + AOrigin + WayPoints + '&wayPoint.' + IntToStr(Length(AWayPoints)+2) + '=' + ADestination;\r\n end\r\n else\r\n WayPoints := '&wayPoint.1=' + AOrigin + '&wayPoint.2=' + ADestination;\r\n\r\n Result := 'key=' + DirectionsProperties.GetAPIKey\r\n + WayPoints\r\n + '&optimizeWaypoints=' + BoolToStrEx(AOptimizeWayPoints)\r\n + '&routeAttributes=routePath'\r\n + '&maxSolutions=' + Alternatives\r\n + '&c=' + ALocale;\r\n\r\n if FTravelMode = tmPublicTransport then\r\n Result := Result + '&timeType=Departure&dateTime=10:00:00AM';\r\n\r\n if AAVoidTolls then\r\n Result := Result + '&avoid=tolls';\r\nend;\r\n\r\nfunction TTMSFNCDirectionsBingDirections.GetRequestMethod: TTMSFNCCloudBaseRequestMethod;\r\nbegin\r\n Result := rmGet;\r\nend;\r\n\r\nfunction TTMSFNCDirectionsBingDirections.IsValid: Boolean;\r\nbegin\r\n Result := DirectionsProperties.GetAPIKey <> '';\r\nend;\r\n\r\nprocedure TTMSFNCDirectionsBingDirections.Parse(ARequest: TTMSFNCDirectionsRequest; ARequestResult: string);\r\nvar\r\n d: TTMSFNCDirectionsItems;\r\n di: TTMSFNCDirectionsItem;\r\n co: TTMSFNCMapsCoordinateItem;\r\n lg: TTMSFNCDirectionsLeg;\r\n cor: TStringList;\r\n step, lstep: TTMSFNCDirectionsStep;\r\n\r\n o, jo, jol, jos, joc: TJSONValue;\r\n jar, jal, jas, jac, jak: TJSONArray;\r\n i, j, k, l: Integer;\r\n ob, os: TJSONObject;\r\n obs: TJSONValue;\r\n idxs, idxe: Integer;\r\n corlist, distance: string;\r\n JJ: Integer;\r\nbegin\r\n if Assigned(DirectionsProperties) then\r\n begin\r\n ARequest.TravelMode := FTravelMode;\r\n\r\n d := ARequest.Items;\r\n if Assigned(d) then\r\n begin\r\n if ARequestResult <> '' then\r\n begin\r\n o := TTMSFNCUtils.ParseJSON(ARequestResult);\r\n if Assigned(o) then\r\n begin\r\n try\r\n ARequest.Status := TTMSFNCUtils.GetJSONProp(o, 'statusCode');\r\n ARequest.ErrorMessage := TTMSFNCUtils.GetJSONProp(o, 'statusDescription');\r\n\r\n jar := TTMSFNCUtils.GetJSONValue(o, 'resourceSets') as TJSONArray;\r\n if Assigned(jar) then\r\n begin\r\n for i := 0 to TTMSFNCUtils.GetJSONArraySize(jar) - 1 do\r\n begin\r\n jo := TTMSFNCUtils.GetJSONArrayItem(jar, i);\r\n\r\n jal := TTMSFNCUtils.GetJSONValue(jo, 'resources') as TJSONArray;\r\n if Assigned(jal) then\r\n begin\r\n for j := 0 to TTMSFNCUtils.GetJSONArraySize(jal) - 1 do\r\n begin\r\n di := d.Add;\r\n di.Summary := 'Route ' + IntToStr(j);\r\n\r\n jol := TTMSFNCUtils.GetJSONArrayItem(jal, j);\r\n\r\n distance := TTMSFNCUtils.GetJSONProp(jol, 'travelDistance');\r\n if distance <> '' then\r\n di.Distance := TTMSFNCUtils.StrToFloatDot(StringReplace(distance, ',', '.', [])) * 1000;\r\n di.Duration := TTMSFNCUtils.GetJSONIntegerValue(jol, 'travelDuration');\r\n\r\n os := TTMSFNCUtils.GetJSONValue(jol, 'routePath') as TJSONObject;\r\n if Assigned(os) then\r\n begin\r\n ob := TTMSFNCUtils.GetJSONValue(os, 'line') as TJSONObject;\r\n\r\n jas := TTMSFNCUtils.GetJSONValue(ob, 'coordinates') as TJSONArray;\r\n if Assigned(jas) then\r\n begin\r\n for k := 0 to TTMSFNCUtils.GetJSONArraySize(jas) - 1 do\r\n begin\r\n jos := TTMSFNCUtils.GetJSONArrayItem(jas, k);\r\n\r\n co := di.Coordinates.Add;\r\n cor := TStringList.Create;\r\n cor.QuoteChar := '\"';\r\n corlist := StringReplace(jos.ToString, ',', '\",\"', [rfReplaceAll]);\r\n corlist := StringReplace(corlist, '[', '\"', [rfReplaceAll]);\r\n corlist := StringReplace(corlist, ']', '\"', [rfReplaceAll]);\r\n TTMSFNCUtils.Split(',', corlist, cor);\r\n co.Latitude := TTMSFNCUtils.StrToFloatDot(cor[0]);\r\n co.Longitude := TTMSFNCUtils.StrToFloatDot(cor[1]);\r\n cor.Free;\r\n end;\r\n end;\r\n end;\r\n\r\n jak := TTMSFNCUtils.GetJSONValue(jol, 'routeLegs') as TJSONArray;\r\n if Assigned(jak) then\r\n begin\r\n for l := 0 to TTMSFNCUtils.GetJSONArraySize(jak) - 1 do\r\n begin\r\n lg := di.Legs.Add;\r\n\r\n jol := TTMSFNCUtils.GetJSONArrayItem(jak, l);\r\n\r\n obs := TTMSFNCUtils.GetJSONValue(jol, 'actualStart');\r\n if Assigned(obs) then\r\n begin\r\n jac := TTMSFNCUtils.GetJSONValue(obs, 'coordinates') as TJSONArray;\r\n if Assigned(jac) then\r\n begin\r\n joc := TTMSFNCUtils.GetJSONArrayItem(jac, 0);\r\n lg.StartLocation.Latitude := TTMSFNCUtils.StrToFloatDot(joc.ToString);\r\n joc := TTMSFNCUtils.GetJSONArrayItem(jac, 1);\r\n lg.StartLocation.Longitude := TTMSFNCUtils.StrToFloatDot(joc.ToString);\r\n end;\r\n end;\r\n\r\n obs := TTMSFNCUtils.GetJSONValue(jol, 'actualEnd');\r\n if Assigned(obs) then\r\n begin\r\n jac := TTMSFNCUtils.GetJSONValue(obs, 'coordinates') as TJSONArray;\r\n if Assigned(jac) then\r\n begin\r\n joc := TTMSFNCUtils.GetJSONArrayItem(jac, 0);\r\n lg.EndLocation.Latitude := TTMSFNCUtils.StrToFloatDot(joc.ToString);\r\n joc := TTMSFNCUtils.GetJSONArrayItem(jac, 1);\r\n lg.EndLocation.Longitude := TTMSFNCUtils.StrToFloatDot(joc.ToString);\r\n end;\r\n end;\r\n\r\n di.Summary := TTMSFNCUtils.GetJSONProp(jol, 'description');\r\n\r\n jas := TTMSFNCUtils.GetJSONValue(jol, 'routeSubLegs') as TJSONArray;\r\n if Assigned(jas) then\r\n begin\r\n for k := 0 to TTMSFNCUtils.GetJSONArraySize(jas) - 1 do\r\n begin\r\n jos := TTMSFNCUtils.GetJSONArrayItem(jas, k);\r\n obs := TTMSFNCUtils.GetJSONValue(jos, 'startWaypoint');\r\n idxs := -1;\r\n if Assigned(obs) then\r\n idxs := TTMSFNCUtils.GetJSONIntegerValue(obs, 'routePathIndex');\r\n\r\n obs := TTMSFNCUtils.GetJSONValue(jos, 'endWaypoint');\r\n idxe := -1;\r\n if Assigned(obs) then\r\n idxe := TTMSFNCUtils.GetJSONIntegerValue(obs, 'routePathIndex');\r\n\r\n for JJ := idxs to idxe do\r\n begin\r\n if (JJ >= 0) and (JJ <= di.Coordinates.Count - 1) then\r\n lg.Coordinates.Add.Assign(di.Coordinates[JJ]);\r\n end;\r\n end;\r\n end;\r\n\r\n jas := TTMSFNCUtils.GetJSONValue(jol, 'itineraryItems') as TJSONArray;\r\n if Assigned(jas) then\r\n begin\r\n for k := 0 to TTMSFNCUtils.GetJSONArraySize(jas) - 1 do\r\n begin\r\n jos := TTMSFNCUtils.GetJSONArrayItem(jas, k);\r\n\r\n step := di.Steps.Add;\r\n\r\n distance := TTMSFNCUtils.GetJSONProp(jos, 'travelDistance');\r\n if distance <> '' then\r\n step.Distance := Round(TTMSFNCUtils.StrToFloatDot(StringReplace(distance, ',', '.', [])) * 1000);\r\n step.Duration := TTMSFNCUtils.GetJSONIntegerValue(jos, 'travelDuration');\r\n\r\n lg.Distance := lg.Distance + step.Distance;\r\n lg.Duration := lg.Duration + step.Duration;\r\n\r\n os := TTMSFNCUtils.GetJSONValue(jos, 'instruction') as TJSONObject;\r\n if Assigned(os) then\r\n step.Instructions := TTMSFNCUtils.GetJSONProp(os, 'text');\r\n\r\n os := TTMSFNCUtils.GetJSONValue(jos, 'maneuverPoint') as TJSONObject;\r\n if Assigned(os) then\r\n begin\r\n jac := TTMSFNCUtils.GetJSONValue(os, 'coordinates') as TJSONArray;\r\n if Assigned(jac) then\r\n begin\r\n joc := TTMSFNCUtils.GetJSONArrayItem(jac, 0);\r\n step.StartLocation.Latitude := TTMSFNCUtils.StrToFloatDot(joc.ToString);\r\n joc := TTMSFNCUtils.GetJSONArrayItem(jac, 1);\r\n step.StartLocation.Longitude := TTMSFNCUtils.StrToFloatDot(joc.ToString);\r\n end;\r\n end;\r\n lstep := lg.Steps.Add;\r\n lstep.Assign(step);\r\n end;\r\n end;\r\n end;\r\n end;\r\n end;\r\n end;\r\n end;\r\n end;\r\n finally\r\n o.Free;\r\n end;\r\n end;\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\nend.\r\n\r\n","{********************************************************************}\r\n{ }\r\n{ written by TMS Software }\r\n{ copyright (c) 2020 - 2024 }\r\n{ Email : info@tmssoftware.com }\r\n{ Web : http://www.tmssoftware.com }\r\n{ }\r\n{ The source code is given as is. The author is not responsible }\r\n{ for any possible damage done due to the use of this code. }\r\n{ The complete source code remains property of the author and may }\r\n{ not be distributed, published, given or sold in any form as such. }\r\n{ No parts of the source code can be included in any other component }\r\n{ or application without written authorization of the author. }\r\n{********************************************************************}\r\n\r\nunit WEBLib.TMSFNCDirections.Azure;\r\n\r\n{$I WEBLib.TMSFNCDefines.inc}\r\n\r\n{$IFDEF WEBLIB}\r\n{$DEFINE LCLWEBLIB}\r\n{$ENDIF}\r\n{$IFDEF LCLLIB}\r\n{$DEFINE LCLWEBLIB}\r\n{$ENDIF}\r\n\r\ninterface\r\n\r\nprocedure RegisterAzureDirectionsService;\r\nprocedure UnRegisterAzureDirectionsService;\r\n\r\nimplementation\r\n\r\nuses\r\n Classes, Math, DateUtils, Types, SysUtils, WEBLib.TMSFNCDirections,\r\n WEBLib.TMSFNCUtils, WEBLib.TMSFNCTypes, WEBLib.TMSFNCMapsCommonTypes, WEBLib.TMSFNCCloudBase\r\n {$IFNDEF WEBLIB}\r\n {$IFNDEF LCLLIB}\r\n {$HINTS OFF}\r\n {$IF COMPILERVERSION > 26}\r\n ,JSON\r\n {$ELSE}\r\n ,DBXJSON\r\n {$IFEND}\r\n {$HINTS ON}\r\n {$ELSE}\r\n ,fpjson\r\n {$ENDIF}\r\n {$ENDIF}\r\n\r\n {$IFDEF WEBLIB}\r\n ,Contnrs, Web, WEBLIB.JSON\r\n {$ENDIF}\r\n {$IFNDEF LCLWEBLIB}\r\n ,Generics.Collections, Generics.Defaults\r\n {$HINTS OFF}\r\n {$IF COMPILERVERSION > 22}\r\n , UITypes\r\n {$IFEND}\r\n {$HINTS ON}\r\n {$ENDIF}\r\n {$IFDEF LCLLIB}\r\n ,fgl\r\n {$ENDIF}\r\n ;\r\n\r\ntype\r\n TTMSFNCDirectionsAzureService = class;\r\n\r\n TTMSFNCDirectionsAzureDirectionsFactoryService = class(TTMSFNCDirectionsFactoryService, ITMSFNCDirectionsServiceAzure);\r\n\r\n TTMSFNCDirectionsAzureService = class(TTMSFNCDirectionsAzureDirectionsFactoryService)\r\n protected\r\n function DoCreateDirections: ITMSFNCCustomDirections; override;\r\n end;\r\n\r\ntype\r\n TTMSFNCDirectionsAzureDirections = class;\r\n\r\n TTMSFNCDirectionsAzureDirections = class(TTMSFNCCustomDirectionsInterfacedObject, ITMSFNCCustomDirections)\r\n protected\r\n FTravelMode: TTMSFNCDirectionsTravelMode;\r\n function GetIdentifier: string;\r\n function IsValid: Boolean;\r\n function GetRequestMethod: TTMSFNCCloudBaseRequestMethod;\r\n function GetHost: string;\r\n function GetPath(AOrigin, ADestination: string; AOriginLatitude, AOriginLongitude,\r\n ADestinationLatitude, ADestinationLongitude: Double; ATravelMode: TTMSFNCDirectionsTravelMode; AWayPoints: TTMSFNCMapsCoordinateRecArray = nil): string;\r\n function GetQuery(AOrigin, ADestination: string; AOriginLatitude, AOriginLongitude,\r\n ADestinationLatitude, ADestinationLongitude: Double; AAlternatives: Boolean = False;\r\n ATravelMode: TTMSFNCDirectionsTravelMode = tmDriving; AWayPointList: TStringList = nil; AWayPoints: TTMSFNCMapsCoordinateRecArray = nil;\r\n AOptimizeWayPoints: Boolean = False; ALocale: string = ''; AAVoidTolls: Boolean = False;\r\n AAvoidHighways: Boolean = False): string;\r\n function GetPostData(AOrigin, ADestination: string; AOriginLatitude, AOriginLongitude,\r\n ADestinationLatitude, ADestinationLongitude: Double; AAlternatives: Boolean = False;\r\n ATravelMode: TTMSFNCDirectionsTravelMode = tmDriving; AWayPointList: TStringList = nil; AWayPoints: TTMSFNCMapsCoordinateRecArray = nil;\r\n AOptimizeWayPoints: Boolean = False; ALocale: string = ''; AAvoidTolls: Boolean = False;\r\n AAvoidHighways: Boolean = False): string;\r\n procedure Parse(ARequest: TTMSFNCDirectionsRequest; ARequestResult: string);\r\n procedure AddHeaders(AHeaders: TTMSFNCCloudBaseRequestHeaders);\r\n procedure DestroyDirections;\r\n public\r\n constructor Create;\r\n destructor Destroy; override;\r\n end;\r\n\r\nvar\r\n DirectionsService: ITMSFNCDirectionsServiceAzure;\r\n\r\nprocedure RegisterAzureDirectionsService;\r\nbegin\r\n if not TTMSFNCDirectionsPlatformServices.Current.SupportsPlatformService(ITMSFNCDirectionsServiceAzure, IInterface(DirectionsService)) then\r\n begin\r\n DirectionsService := TTMSFNCDirectionsAzureService.Create;\r\n TTMSFNCDirectionsPlatformServices.Current.AddPlatformService(ITMSFNCDirectionsServiceAzure, DirectionsService);\r\n end;\r\nend;\r\n\r\nprocedure UnregisterAzureDirectionsService;\r\nbegin\r\n TTMSFNCDirectionsPlatformServices.Current.RemovePlatformService(ITMSFNCDirectionsServiceAzure);\r\nend;\r\n\r\n{ TTMSFNCDirectionsAzureService }\r\n\r\nfunction TTMSFNCDirectionsAzureService.DoCreateDirections: ITMSFNCCustomDirections;\r\nbegin\r\n Result := TTMSFNCDirectionsAzureDirections.Create;\r\nend;\r\n\r\nprocedure TTMSFNCDirectionsAzureDirections.AddHeaders(\r\n AHeaders: TTMSFNCCloudBaseRequestHeaders);\r\nbegin\r\n\r\nend;\r\n\r\nconstructor TTMSFNCDirectionsAzureDirections.Create;\r\nbegin\r\n inherited;\r\nend;\r\n\r\ndestructor TTMSFNCDirectionsAzureDirections.Destroy;\r\nbegin\r\n inherited;\r\nend;\r\n\r\nprocedure TTMSFNCDirectionsAzureDirections.DestroyDirections;\r\nbegin\r\n DirectionsService.DestroyDirections(Self);\r\nend;\r\n\r\nfunction TTMSFNCDirectionsAzureDirections.GetHost: string;\r\nbegin\r\n Result := 'https://atlas.microsoft.com';\r\nend;\r\n\r\nfunction TTMSFNCDirectionsAzureDirections.GetIdentifier: string;\r\nbegin\r\n Result := 'Azure';\r\nend;\r\n\r\nfunction TTMSFNCDirectionsAzureDirections.GetPath(AOrigin, ADestination: string; AOriginLatitude, AOriginLongitude,\r\n ADestinationLatitude, ADestinationLongitude: Double; ATravelMode: TTMSFNCDirectionsTravelMode; AWayPoints: TTMSFNCMapsCoordinateRecArray = nil): string;\r\nbegin\r\n Result := '/route/directions/json';\r\nend;\r\n\r\nfunction TTMSFNCDirectionsAzureDirections.GetPostData(AOrigin, ADestination: string; AOriginLatitude, AOriginLongitude,\r\n ADestinationLatitude, ADestinationLongitude: Double; AAlternatives: Boolean = False;\r\n ATravelMode: TTMSFNCDirectionsTravelMode = tmDriving; AWayPointList: TStringList = nil; AWayPoints: TTMSFNCMapsCoordinateRecArray = nil;\r\n AOptimizeWayPoints: Boolean = False; ALocale: string = ''; AAvoidTolls: Boolean = False;\r\n AAvoidHighways: Boolean = False): string;\r\nbegin\r\n Result := '';\r\nend;\r\n\r\nfunction TTMSFNCDirectionsAzureDirections.GetQuery(AOrigin, ADestination: string; AOriginLatitude, AOriginLongitude,\r\n ADestinationLatitude, ADestinationLongitude: Double; AAlternatives: Boolean = False;\r\n ATravelMode: TTMSFNCDirectionsTravelMode = tmDriving; AWayPointList: TStringList = nil; AWayPoints: TTMSFNCMapsCoordinateRecArray = nil;\r\n AOptimizeWayPoints: Boolean = False; ALocale: string = ''; AAVoidTolls: Boolean = False;\r\n AAvoidHighways: Boolean = False): string;\r\nvar\r\n TravelMode, WayPoints, Alternatives: string;\r\n I: Integer;\r\nbegin\r\n if AAlternatives then\r\n Alternatives := '5'\r\n else\r\n Alternatives := '0';\r\n\r\n if ATravelMode in [tmPublicTransport] then\r\n FTravelMode := tmDriving\r\n else\r\n FTravelMode := ATravelMode;\r\n\r\n case ATravelMode of\r\n tmDriving: TravelMode := 'car';\r\n tmWalking: TravelMode := 'pedestrian';\r\n tmBicycling: TravelMode := 'bicycle';\r\n tmTruck: TravelMode := 'truck';\r\n end;\r\n\r\n AOrigin := TTMSFNCUtils.FloatToStrDot(AOriginLatitude) + ',' + TTMSFNCUtils.FloatToStrDot(AOriginLongitude);\r\n ADestination := TTMSFNCUtils.FloatToStrDot(ADestinationLatitude) + ',' + TTMSFNCUtils.FloatToStrDot(ADestinationLongitude);\r\n\r\n WayPoints := AOrigin;\r\n if Assigned(AWaypoints) and (Length(AWayPoints) > 0) then\r\n begin\r\n for I := 0 to (Length(AWayPoints) - 1) do\r\n WayPoints := WayPoints + ':' + TTMSFNCUtils.FloatToStrDot(AWayPoints[I].Latitude) + ',' + TTMSFNCUtils.FloatToStrDot(AWayPoints[I].Longitude);\r\n end;\r\n WayPoints := WayPoints + ':' + ADestination;\r\n\r\n Result := 'api-version=1.0'\r\n + '&subscription-key=' + DirectionsProperties.GetAPIKey\r\n + '&query=' + WayPoints\r\n + '&maxAlternatives=' + Alternatives\r\n + '&computeBestOrder=' + BoolToStrEx(AOptimizeWayPoints)\r\n + '&instructionsType=text'\r\n + '&travelMode=' + TravelMode\r\n + '&language=' + ALocale;\r\n\r\n if AAvoidTolls then\r\n Result := Result + '&avoid=tollRoads';\r\n\r\n if AAvoidHighways then\r\n Result := Result + '&avoid=motorways';\r\nend;\r\n\r\nfunction TTMSFNCDirectionsAzureDirections.GetRequestMethod: TTMSFNCCloudBaseRequestMethod;\r\nbegin\r\n Result := rmGet;\r\nend;\r\n\r\nfunction TTMSFNCDirectionsAzureDirections.IsValid: Boolean;\r\nbegin\r\n Result := DirectionsProperties.GetAPIKey <> '';\r\nend;\r\n\r\nprocedure TTMSFNCDirectionsAzureDirections.Parse(ARequest: TTMSFNCDirectionsRequest; ARequestResult: string);\r\nvar\r\n d: TTMSFNCDirectionsItems;\r\n di: TTMSFNCDirectionsItem;\r\n l: TTMSFNCDirectionsLeg;\r\n co: TTMSFNCMapsCoordinateItem;\r\n step: TTMSFNCDirectionsStep;\r\n wp: TTMSFNCDirectionsWayPoint;\r\n\r\n o, jo, jol, jos: TJSONValue;\r\n jar, jal, jas: TJSONArray;\r\n i, j, k: Integer;\r\n ol, os, oc: TJSONObject;\r\n wpIndex: array of Integer;\r\n providedIndex, optimizedIndex: Integer;\r\nbegin\r\n if Assigned(DirectionsProperties) then\r\n begin\r\n ARequest.TravelMode := FTravelMode;\r\n\r\n d := ARequest.Items;\r\n if Assigned(d) then\r\n begin\r\n if ARequestResult <> '' then\r\n begin\r\n o := TTMSFNCUtils.ParseJSON(ARequestResult);\r\n if Assigned(o) then\r\n begin\r\n try\r\n oc := TTMSFNCUtils.GetJSONValue(o, 'error') as TJSONObject;\r\n if Assigned(oc) then\r\n begin\r\n ARequest.Status := TTMSFNCUtils.GetJSONProp(oc, 'code');\r\n ARequest.ErrorMessage := TTMSFNCUtils.GetJSONProp(oc, 'message');\r\n end;\r\n\r\n SetLength(wpIndex, 1);\r\n wpIndex[0] := -1;\r\n\r\n jal := TTMSFNCUtils.GetJSONValue(o, 'optimizedWaypoints') as TJSONArray;\r\n if Assigned(jal) then\r\n begin\r\n SetLength(wpIndex, TTMSFNCUtils.GetJSONArraySize(jal) + 1);\r\n\r\n for j := 0 to TTMSFNCUtils.GetJSONArraySize(jal) - 1 do\r\n begin\r\n jol := TTMSFNCUtils.GetJSONArrayItem(jal, j);\r\n\r\n if Assigned(jol) then\r\n begin\r\n providedIndex := TTMSFNCUtils.GetJSONIntegerValue(jol, 'providedIndex');\r\n optimizedIndex := TTMSFNCUtils.GetJSONIntegerValue(jol, 'optimizedIndex');\r\n wpIndex[providedIndex + 1] := optimizedIndex;\r\n end;\r\n end;\r\n end;\r\n\r\n jar := TTMSFNCUtils.GetJSONValue(o, 'routes') as TJSONArray;\r\n if Assigned(jar) then\r\n begin\r\n for i := 0 to TTMSFNCUtils.GetJSONArraySize(jar) - 1 do\r\n begin\r\n jo := TTMSFNCUtils.GetJSONArrayItem(jar, i);\r\n\r\n di := d.Add;\r\n di.Summary := 'Route ' + IntToStr(i);\r\n\r\n jal := TTMSFNCUtils.GetJSONValue(jo, 'legs') as TJSONArray;\r\n if Assigned(jal) then\r\n begin\r\n for j := 0 to TTMSFNCUtils.GetJSONArraySize(jal) - 1 do\r\n begin\r\n jol := TTMSFNCUtils.GetJSONArrayItem(jal, j);\r\n\r\n l := di.Legs.Add;\r\n\r\n wp := di.WayPoints.Add;\r\n if Length(wpIndex) > j then\r\n wp.OptimizedIndex := wpIndex[j];\r\n\r\n ol := TTMSFNCUtils.GetJSONValue(jol, 'summary') as TJSONObject;\r\n if Assigned(ol) then\r\n begin\r\n l.Distance := TTMSFNCUtils.GetJSONIntegerValue(ol, 'lengthInMeters');\r\n di.Distance := di.Distance + l.Distance;\r\n l.Duration := TTMSFNCUtils.GetJSONIntegerValue(ol, 'travelTimeInSeconds');\r\n di.Duration := di.Duration + l.Duration;\r\n wp.Distance := l.Distance;\r\n wp.Duration := l.Duration;\r\n end;\r\n\r\n jas := TTMSFNCUtils.GetJSONValue(jol, 'points') as TJSONArray;\r\n if Assigned(jas) then\r\n begin\r\n for k := 0 to TTMSFNCUtils.GetJSONArraySize(jas) - 1 do\r\n begin\r\n jos := TTMSFNCUtils.GetJSONArrayItem(jas, k);\r\n\r\n co := di.Coordinates.Add;\r\n co.Latitude := TTMSFNCUtils.GetJSONDoubleValue(jos, 'latitude');\r\n co.Longitude := TTMSFNCUtils.GetJSONDoubleValue(jos, 'longitude');\r\n l.Coordinates.Add.Assign(co);\r\n if k = 0 then\r\n begin\r\n l.StartLocation.Latitude := co.Latitude;\r\n l.StartLocation.Longitude := co.Longitude;\r\n end\r\n else if k = TTMSFNCUtils.GetJSONArraySize(jas) - 1 then\r\n begin\r\n l.EndLocation.Latitude := co.Latitude;\r\n l.EndLocation.Longitude := co.Longitude;\r\n end;\r\n end;\r\n end;\r\n end;\r\n end;\r\n\r\n ol := TTMSFNCUtils.GetJSONValue(jo, 'guidance') as TJSONObject;\r\n if Assigned(ol) then\r\n begin\r\n jas := TTMSFNCUtils.GetJSONValue(ol, 'instructions') as TJSONArray;\r\n if Assigned(jas) then\r\n begin\r\n for k := 0 to TTMSFNCUtils.GetJSONArraySize(jas) - 1 do\r\n begin\r\n jos := TTMSFNCUtils.GetJSONArrayItem(jas, k);\r\n\r\n step := di.Steps.Add;\r\n step.Distance := TTMSFNCUtils.GetJSONIntegerValue(jos, 'routeOffsetInMeters');\r\n step.Duration := TTMSFNCUtils.GetJSONIntegerValue(jos, 'travelTimeInSeconds');\r\n os := TTMSFNCUtils.GetJSONValue(jos, 'point') as TJSONObject;\r\n if Assigned(os) then\r\n begin\r\n step.StartLocation.Latitude := TTMSFNCUtils.GetJSONDoubleValue(os, 'latitude');\r\n step.StartLocation.Longitude := TTMSFNCUtils.GetJSONDoubleValue(os, 'longitude');\r\n end;\r\n step.Instructions := TTMSFNCUtils.GetJSONProp(jos, 'message');\r\n end;\r\n end;\r\n end;\r\n\r\n end;\r\n end;\r\n finally\r\n o.Free;\r\n end;\r\n end;\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\nend.\r\n\r\n","{********************************************************************}\r\n{ }\r\n{ written by TMS Software }\r\n{ copyright (c) 2020 - 2024 }\r\n{ Email : info@tmssoftware.com }\r\n{ Web : http://www.tmssoftware.com }\r\n{ }\r\n{ The source code is given as is. The author is not responsible }\r\n{ for any possible damage done due to the use of this code. }\r\n{ The complete source code remains property of the author and may }\r\n{ not be distributed, published, given or sold in any form as such. }\r\n{ No parts of the source code can be included in any other component }\r\n{ or application without written authorization of the author. }\r\n{********************************************************************}\r\n\r\nunit WEBLib.TMSFNCDirections.MapBox;\r\n\r\n{$I WEBLib.TMSFNCDefines.inc}\r\n\r\n{$IFDEF WEBLIB}\r\n{$DEFINE LCLWEBLIB}\r\n{$ENDIF}\r\n{$IFDEF LCLLIB}\r\n{$DEFINE LCLWEBLIB}\r\n{$ENDIF}\r\n\r\ninterface\r\n\r\nprocedure RegisterMapBoxDirectionsService;\r\nprocedure UnRegisterMapBoxDirectionsService;\r\n\r\nimplementation\r\n\r\nuses\r\n Classes, Math, DateUtils, Types, SysUtils, WEBLib.TMSFNCDirections,\r\n WEBLib.TMSFNCUtils, WEBLib.TMSFNCTypes, WEBLib.TMSFNCMapsCommonTypes, WEBLib.TMSFNCCloudBase\r\n {$IFNDEF WEBLIB}\r\n {$IFNDEF LCLLIB}\r\n {$HINTS OFF}\r\n {$IF COMPILERVERSION > 26}\r\n ,JSON\r\n {$ELSE}\r\n ,DBXJSON\r\n {$IFEND}\r\n {$HINTS ON}\r\n {$ELSE}\r\n ,fpjson\r\n {$ENDIF}\r\n {$ENDIF}\r\n\r\n {$IFDEF WEBLIB}\r\n ,Contnrs, Web, WEBLIB.JSON\r\n {$ENDIF}\r\n {$IFNDEF LCLWEBLIB}\r\n ,Generics.Collections, Generics.Defaults\r\n {$HINTS OFF}\r\n {$IF COMPILERVERSION > 22}\r\n , UITypes\r\n {$IFEND}\r\n {$HINTS ON}\r\n {$ENDIF}\r\n {$IFDEF LCLLIB}\r\n ,fgl\r\n {$ENDIF}\r\n ;\r\n\r\ntype\r\n TTMSFNCDirectionsMapBoxService = class;\r\n\r\n TTMSFNCDirectionsMapBoxDirectionsFactoryService = class(TTMSFNCDirectionsFactoryService, ITMSFNCDirectionsServiceMapBox);\r\n\r\n TTMSFNCDirectionsMapBoxService = class(TTMSFNCDirectionsMapBoxDirectionsFactoryService)\r\n protected\r\n function DoCreateDirections: ITMSFNCCustomDirections; override;\r\n end;\r\n\r\ntype\r\n TTMSFNCDirectionsMapBoxDirections = class;\r\n\r\n TTMSFNCDirectionsMapBoxDirections = class(TTMSFNCCustomDirectionsInterfacedObject, ITMSFNCCustomDirections)\r\n protected\r\n FTravelMode: TTMSFNCDirectionsTravelMode;\r\n function GetIdentifier: string;\r\n function IsValid: Boolean;\r\n function GetRequestMethod: TTMSFNCCloudBaseRequestMethod;\r\n function GetHost: string;\r\n function GetPath(AOrigin, ADestination: string; AOriginLatitude, AOriginLongitude,\r\n ADestinationLatitude, ADestinationLongitude: Double; ATravelMode: TTMSFNCDirectionsTravelMode; AWayPoints: TTMSFNCMapsCoordinateRecArray = nil): string;\r\n function GetQuery(AOrigin, ADestination: string; AOriginLatitude, AOriginLongitude,\r\n ADestinationLatitude, ADestinationLongitude: Double; AAlternatives: Boolean = False;\r\n ATravelMode: TTMSFNCDirectionsTravelMode = tmDriving; AWayPointList: TStringList = nil; AWayPoints: TTMSFNCMapsCoordinateRecArray = nil;\r\n AOptimizeWayPoints: Boolean = False; ALocale: string = ''; AAVoidTolls: Boolean = False;\r\n AAvoidHighways: Boolean = False): string;\r\n function GetPostData(AOrigin, ADestination: string; AOriginLatitude, AOriginLongitude,\r\n ADestinationLatitude, ADestinationLongitude: Double; AAlternatives: Boolean = False;\r\n ATravelMode: TTMSFNCDirectionsTravelMode = tmDriving; AWayPointList: TStringList = nil; AWayPoints: TTMSFNCMapsCoordinateRecArray = nil;\r\n AOptimizeWayPoints: Boolean = False; ALocale: string = ''; AAvoidTolls: Boolean = False;\r\n AAvoidHighways: Boolean = False): string;\r\n procedure Parse(ARequest: TTMSFNCDirectionsRequest; ARequestResult: string);\r\n procedure AddHeaders(AHeaders: TTMSFNCCloudBaseRequestHeaders);\r\n procedure DestroyDirections;\r\n public\r\n constructor Create;\r\n destructor Destroy; override;\r\n end;\r\n\r\nvar\r\n DirectionsService: ITMSFNCDirectionsServiceMapBox;\r\n\r\nprocedure RegisterMapBoxDirectionsService;\r\nbegin\r\n if not TTMSFNCDirectionsPlatformServices.Current.SupportsPlatformService(ITMSFNCDirectionsServiceMapBox, IInterface(DirectionsService)) then\r\n begin\r\n DirectionsService := TTMSFNCDirectionsMapBoxService.Create;\r\n TTMSFNCDirectionsPlatformServices.Current.AddPlatformService(ITMSFNCDirectionsServiceMapBox, DirectionsService);\r\n end;\r\nend;\r\n\r\nprocedure UnregisterMapBoxDirectionsService;\r\nbegin\r\n TTMSFNCDirectionsPlatformServices.Current.RemovePlatformService(ITMSFNCDirectionsServiceMapBox);\r\nend;\r\n\r\n{ TTMSFNCDirectionsMapBoxService }\r\n\r\nfunction TTMSFNCDirectionsMapBoxService.DoCreateDirections: ITMSFNCCustomDirections;\r\nbegin\r\n Result := TTMSFNCDirectionsMapBoxDirections.Create;\r\nend;\r\n\r\nprocedure TTMSFNCDirectionsMapBoxDirections.AddHeaders(\r\n AHeaders: TTMSFNCCloudBaseRequestHeaders);\r\nbegin\r\n\r\nend;\r\n\r\nconstructor TTMSFNCDirectionsMapBoxDirections.Create;\r\nbegin\r\n inherited;\r\nend;\r\n\r\ndestructor TTMSFNCDirectionsMapBoxDirections.Destroy;\r\nbegin\r\n inherited;\r\nend;\r\n\r\nprocedure TTMSFNCDirectionsMapBoxDirections.DestroyDirections;\r\nbegin\r\n DirectionsService.DestroyDirections(Self);\r\nend;\r\n\r\nfunction TTMSFNCDirectionsMapBoxDirections.GetHost: string;\r\nbegin\r\n Result := 'https://api.mapbox.com';\r\nend;\r\n\r\nfunction TTMSFNCDirectionsMapBoxDirections.GetIdentifier: string;\r\nbegin\r\n Result := 'MapBox';\r\nend;\r\n\r\nfunction TTMSFNCDirectionsMapBoxDirections.GetPath(AOrigin, ADestination: string; AOriginLatitude, AOriginLongitude,\r\n ADestinationLatitude, ADestinationLongitude: Double; ATravelMode: TTMSFNCDirectionsTravelMode; AWayPoints: TTMSFNCMapsCoordinateRecArray = nil): string;\r\nvar\r\n TravelMode, WayPoints: string;\r\n I: Integer;\r\nbegin\r\n\r\n if ATravelMode in [tmTruck, tmPublicTransport] then\r\n FTravelMode := tmDriving\r\n else\r\n FTravelMode := ATravelMode;\r\n\r\n case ATravelMode of\r\n tmDriving: TravelMode := 'driving';\r\n tmWalking: TravelMode := 'walking';\r\n tmBicycling: TravelMode := 'cycling';\r\n end;\r\n\r\n AOrigin := TTMSFNCUtils.FloatToStrDot(AOriginLongitude) + ',' + TTMSFNCUtils.FloatToStrDot(AOriginLatitude);\r\n ADestination := TTMSFNCUtils.FloatToStrDot(ADestinationLongitude) + ',' + TTMSFNCUtils.FloatToStrDot(ADestinationLatitude);\r\n\r\n WayPoints := AOrigin;\r\n if Assigned(AWaypoints) and (Length(AWayPoints) > 0) then\r\n begin\r\n for I := 0 to (Length(AWayPoints) - 1) do\r\n WayPoints := WayPoints + ';' + TTMSFNCUtils.FloatToStrDot(AWayPoints[I].Longitude) + ',' + TTMSFNCUtils.FloatToStrDot(AWayPoints[I].Latitude);\r\n end;\r\n WayPoints := WayPoints + ';' + ADestination;\r\n\r\n Result := '/directions/v5/mapbox/' + TravelMode + '/' + WayPoints;\r\nend;\r\n\r\nfunction TTMSFNCDirectionsMapBoxDirections.GetPostData(AOrigin, ADestination: string; AOriginLatitude, AOriginLongitude,\r\n ADestinationLatitude, ADestinationLongitude: Double; AAlternatives: Boolean = False;\r\n ATravelMode: TTMSFNCDirectionsTravelMode = tmDriving; AWayPointList: TStringList = nil; AWayPoints: TTMSFNCMapsCoordinateRecArray = nil;\r\n AOptimizeWayPoints: Boolean = False; ALocale: string = ''; AAvoidTolls: Boolean = False;\r\n AAvoidHighways: Boolean = False): string;\r\nbegin\r\n Result := '';\r\nend;\r\n\r\nfunction TTMSFNCDirectionsMapBoxDirections.GetQuery(AOrigin, ADestination: string; AOriginLatitude, AOriginLongitude,\r\n ADestinationLatitude, ADestinationLongitude: Double; AAlternatives: Boolean = False;\r\n ATravelMode: TTMSFNCDirectionsTravelMode = tmDriving; AWayPointList: TStringList = nil; AWayPoints: TTMSFNCMapsCoordinateRecArray = nil;\r\n AOptimizeWayPoints: Boolean = False; ALocale: string = ''; AAVoidTolls: Boolean = False;\r\n AAvoidHighways: Boolean = False): string;\r\nbegin\r\n Result := 'geometries=polyline'\r\n + '&alternatives=' + BoolToStrEx(AAlternatives)\r\n + '&overview=full'\r\n + '&steps=true'\r\n + '&access_token=' + DirectionsProperties.GetAPIKey\r\n + '&language=' + ALocale;\r\n\r\n if AAvoidTolls or AAvoidHighways then\r\n begin\r\n Result := Result + '&exclude=';\r\n\r\n if AAVoidTolls then\r\n Result := Result + 'toll,';\r\n\r\n if AAVoidHighways then\r\n Result := Result + 'motorway';\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCDirectionsMapBoxDirections.GetRequestMethod: TTMSFNCCloudBaseRequestMethod;\r\nbegin\r\n Result := rmGet;\r\nend;\r\n\r\nfunction TTMSFNCDirectionsMapBoxDirections.IsValid: Boolean;\r\nbegin\r\n Result := DirectionsProperties.GetAPIKey <> '';\r\nend;\r\n\r\nprocedure TTMSFNCDirectionsMapBoxDirections.Parse(ARequest: TTMSFNCDirectionsRequest; ARequestResult: string);\r\nvar\r\n d: TTMSFNCDirectionsItems;\r\n di: TTMSFNCDirectionsItem;\r\n l: TTMSFNCDirectionsLeg;\r\n step, lstep: TTMSFNCDirectionsStep;\r\n\r\n o, jo, jol, jos, joc: TJSONValue;\r\n jar, jal, jas, jac: TJSONArray;\r\n i, j, k: Integer;\r\n os: TJSONObject;\r\n lm: Integer;\r\nbegin\r\n if Assigned(DirectionsProperties) then\r\n begin\r\n ARequest.TravelMode := FTravelMode;\r\n\r\n d := ARequest.Items;\r\n if Assigned(d) then\r\n begin\r\n if ARequestResult <> '' then\r\n begin\r\n o := TTMSFNCUtils.ParseJSON(ARequestResult);\r\n if Assigned(o) then\r\n begin\r\n try\r\n ARequest.Status := TTMSFNCUtils.GetJSONProp(o, 'message');\r\n ARequest.ErrorMessage := ARequest.Status;\r\n\r\n jar := TTMSFNCUtils.GetJSONValue(o, 'routes') as TJSONArray;\r\n if Assigned(jar) then\r\n begin\r\n for i := 0 to TTMSFNCUtils.GetJSONArraySize(jar) - 1 do\r\n begin\r\n di := d.Add;\r\n di.Summary := 'Route ' + IntToStr(i);\r\n\r\n jo := TTMSFNCUtils.GetJSONArrayItem(jar, i);\r\n\r\n di.Distance := Round(TTMSFNCUtils.GetJSONDoubleValue(jo, 'distance'));\r\n di.Duration := Round(TTMSFNCUtils.GetJSONDoubleValue(jo, 'duration'));\r\n\r\n DecodeValues(TTMSFNCUtils.GetJSONProp(jo, 'geometry'), di.Coordinates);\r\n\r\n jal := TTMSFNCUtils.GetJSONValue(jo, 'legs') as TJSONArray;\r\n if Assigned(jal) then\r\n begin\r\n for j := 0 to TTMSFNCUtils.GetJSONArraySize(jal) - 1 do\r\n begin\r\n jol := TTMSFNCUtils.GetJSONArrayItem(jal, j);\r\n\r\n l := di.Legs.Add;\r\n\r\n l.Distance := Round(TTMSFNCUtils.GetJSONDoubleValue(jol, 'distance'));\r\n l.Duration := Round(TTMSFNCUtils.GetJSONDoubleValue(jol, 'duration'));\r\n\r\n jas := TTMSFNCUtils.GetJSONValue(jol, 'steps') as TJSONArray;\r\n if Assigned(jas) then\r\n begin\r\n for k := 0 to TTMSFNCUtils.GetJSONArraySize(jas) - 1 do\r\n begin\r\n jos := TTMSFNCUtils.GetJSONArrayItem(jas, k);\r\n\r\n step := di.Steps.Add;\r\n\r\n step.Distance := Round(TTMSFNCUtils.GetJSONDoubleValue(jos, 'distance'));\r\n step.Duration := Round(TTMSFNCUtils.GetJSONDoubleValue(jos, 'duration'));\r\n\r\n DecodeValues(TTMSFNCUtils.GetJSONProp(jos, 'geometry'), step.Coordinates);\r\n\r\n for lm := 0 to step.Coordinates.Count - 1 do\r\n l.Coordinates.Add.Assign(step.Coordinates[lm]);\r\n\r\n if l.Coordinates.Count > 0 then\r\n begin\r\n l.StartLocation.Assign(l.Coordinates[0].Coordinate);\r\n l.EndLocation.Assign(l.Coordinates[l.Coordinates.Count - 1].Coordinate);\r\n end;\r\n\r\n os := TTMSFNCUtils.GetJSONValue(jos, 'maneuver') as TJSONObject;\r\n if Assigned(os) then\r\n begin\r\n step.Instructions := TTMSFNCUtils.GetJSONProp(os, 'instruction');\r\n\r\n jac := TTMSFNCUtils.GetJSONValue(os, 'location') as TJSONArray;\r\n if Assigned(jac) then\r\n begin\r\n joc := TTMSFNCUtils.GetJSONArrayItem(jac, 0);\r\n step.StartLocation.Longitude := TTMSFNCUtils.StrToFloatDot(joc.ToString);\r\n joc := TTMSFNCUtils.GetJSONArrayItem(jac, 1);\r\n step.StartLocation.Latitude := TTMSFNCUtils.StrToFloatDot(joc.ToString);\r\n end;\r\n lstep := l.Steps.Add;\r\n lstep.Assign(step);\r\n end;\r\n end;\r\n end;\r\n end;\r\n end;\r\n end;\r\n\r\n end;\r\n finally\r\n o.Free;\r\n end;\r\n end;\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\nend.\r\n\r\n","{********************************************************************}\r\n{ }\r\n{ written by TMS Software }\r\n{ copyright (c) 2020 - 2024 }\r\n{ Email : info@tmssoftware.com }\r\n{ Web : http://www.tmssoftware.com }\r\n{ }\r\n{ The source code is given as is. The author is not responsible }\r\n{ for any possible damage done due to the use of this code. }\r\n{ The complete source code remains property of the author and may }\r\n{ not be distributed, published, given or sold in any form as such. }\r\n{ No parts of the source code can be included in any other component }\r\n{ or application without written authorization of the author. }\r\n{********************************************************************}\r\n\r\nunit WEBLib.TMSFNCDirections.TomTom;\r\n\r\n{$I WEBLib.TMSFNCDefines.inc}\r\n\r\n{$IFDEF WEBLIB}\r\n{$DEFINE LCLWEBLIB}\r\n{$ENDIF}\r\n{$IFDEF LCLLIB}\r\n{$DEFINE LCLWEBLIB}\r\n{$ENDIF}\r\n\r\ninterface\r\n\r\nprocedure RegisterTomTomDirectionsService;\r\nprocedure UnRegisterTomTomDirectionsService;\r\n\r\nimplementation\r\n\r\nuses\r\n Classes, Math, DateUtils, Types, SysUtils, WEBLib.TMSFNCDirections,\r\n WEBLib.TMSFNCUtils, WEBLib.TMSFNCTypes, WEBLib.TMSFNCMapsCommonTypes, WEBLib.TMSFNCCloudBase\r\n {$IFNDEF WEBLIB}\r\n {$IFNDEF LCLLIB}\r\n {$HINTS OFF}\r\n {$IF COMPILERVERSION > 26}\r\n ,JSON\r\n {$ELSE}\r\n ,DBXJSON\r\n {$IFEND}\r\n {$HINTS ON}\r\n {$ELSE}\r\n ,fpjson\r\n {$ENDIF}\r\n {$ENDIF}\r\n\r\n {$IFDEF WEBLIB}\r\n ,Contnrs, Web, WEBLIB.JSON\r\n {$ENDIF}\r\n {$IFNDEF LCLWEBLIB}\r\n ,Generics.Collections, Generics.Defaults\r\n {$HINTS OFF}\r\n {$IF COMPILERVERSION > 22}\r\n , UITypes\r\n {$IFEND}\r\n {$HINTS ON}\r\n {$ENDIF}\r\n {$IFDEF LCLLIB}\r\n ,fgl\r\n {$ENDIF}\r\n ;\r\n\r\ntype\r\n TTMSFNCDirectionsTomTomService = class;\r\n\r\n TTMSFNCDirectionsTomTomDirectionsFactoryService = class(TTMSFNCDirectionsFactoryService, ITMSFNCDirectionsServiceTomTom);\r\n\r\n TTMSFNCDirectionsTomTomService = class(TTMSFNCDirectionsTomTomDirectionsFactoryService)\r\n protected\r\n function DoCreateDirections: ITMSFNCCustomDirections; override;\r\n end;\r\n\r\ntype\r\n TTMSFNCDirectionsTomTomDirections = class;\r\n\r\n TTMSFNCDirectionsTomTomDirections = class(TTMSFNCCustomDirectionsInterfacedObject, ITMSFNCCustomDirections)\r\n protected\r\n FTravelMode: TTMSFNCDirectionsTravelMode;\r\n function GetIdentifier: string;\r\n function IsValid: Boolean;\r\n function GetRequestMethod: TTMSFNCCloudBaseRequestMethod;\r\n function GetHost: string;\r\n function GetPath(AOrigin, ADestination: string; AOriginLatitude, AOriginLongitude,\r\n ADestinationLatitude, ADestinationLongitude: Double; ATravelMode: TTMSFNCDirectionsTravelMode; AWayPoints: TTMSFNCMapsCoordinateRecArray = nil): string;\r\n function GetQuery(AOrigin, ADestination: string; AOriginLatitude, AOriginLongitude,\r\n ADestinationLatitude, ADestinationLongitude: Double; AAlternatives: Boolean = False;\r\n ATravelMode: TTMSFNCDirectionsTravelMode = tmDriving; AWayPointList: TStringList = nil; AWayPoints: TTMSFNCMapsCoordinateRecArray = nil;\r\n AOptimizeWayPoints: Boolean = False; ALocale: string = ''; AAVoidTolls: Boolean = False;\r\n AAvoidHighways: Boolean = False): string;\r\n function GetPostData(AOrigin, ADestination: string; AOriginLatitude, AOriginLongitude,\r\n ADestinationLatitude, ADestinationLongitude: Double; AAlternatives: Boolean = False;\r\n ATravelMode: TTMSFNCDirectionsTravelMode = tmDriving; AWayPointList: TStringList = nil; AWayPoints: TTMSFNCMapsCoordinateRecArray = nil;\r\n AOptimizeWayPoints: Boolean = False; ALocale: string = ''; AAvoidTolls: Boolean = False;\r\n AAvoidHighways: Boolean = False): string;\r\n procedure Parse(ARequest: TTMSFNCDirectionsRequest; ARequestResult: string);\r\n procedure AddHeaders(AHeaders: TTMSFNCCloudBaseRequestHeaders);\r\n procedure DestroyDirections;\r\n public\r\n constructor Create;\r\n destructor Destroy; override;\r\n end;\r\n\r\nvar\r\n DirectionsService: ITMSFNCDirectionsServiceTomTom;\r\n\r\nprocedure RegisterTomTomDirectionsService;\r\nbegin\r\n if not TTMSFNCDirectionsPlatformServices.Current.SupportsPlatformService(ITMSFNCDirectionsServiceTomTom, IInterface(DirectionsService)) then\r\n begin\r\n DirectionsService := TTMSFNCDirectionsTomTomService.Create;\r\n TTMSFNCDirectionsPlatformServices.Current.AddPlatformService(ITMSFNCDirectionsServiceTomTom, DirectionsService);\r\n end;\r\nend;\r\n\r\nprocedure UnregisterTomTomDirectionsService;\r\nbegin\r\n TTMSFNCDirectionsPlatformServices.Current.RemovePlatformService(ITMSFNCDirectionsServiceTomTom);\r\nend;\r\n\r\n{ TTMSFNCDirectionsTomTomService }\r\n\r\nfunction TTMSFNCDirectionsTomTomService.DoCreateDirections: ITMSFNCCustomDirections;\r\nbegin\r\n Result := TTMSFNCDirectionsTomTomDirections.Create;\r\nend;\r\n\r\nprocedure TTMSFNCDirectionsTomTomDirections.AddHeaders(\r\n AHeaders: TTMSFNCCloudBaseRequestHeaders);\r\nbegin\r\n\r\nend;\r\n\r\nconstructor TTMSFNCDirectionsTomTomDirections.Create;\r\nbegin\r\n inherited;\r\nend;\r\n\r\ndestructor TTMSFNCDirectionsTomTomDirections.Destroy;\r\nbegin\r\n inherited;\r\nend;\r\n\r\nprocedure TTMSFNCDirectionsTomTomDirections.DestroyDirections;\r\nbegin\r\n DirectionsService.DestroyDirections(Self);\r\nend;\r\n\r\nfunction TTMSFNCDirectionsTomTomDirections.GetHost: string;\r\nbegin\r\n Result := 'https://api.tomtom.com';\r\nend;\r\n\r\nfunction TTMSFNCDirectionsTomTomDirections.GetIdentifier: string;\r\nbegin\r\n Result := 'TomTom';\r\nend;\r\n\r\nfunction TTMSFNCDirectionsTomTomDirections.GetPath(AOrigin, ADestination: string; AOriginLatitude, AOriginLongitude,\r\n ADestinationLatitude, ADestinationLongitude: Double; ATravelMode: TTMSFNCDirectionsTravelMode; AWayPoints: TTMSFNCMapsCoordinateRecArray = nil): string;\r\nvar\r\n WayPoints: string;\r\n I: Integer;\r\nbegin\r\n AOrigin := TTMSFNCUtils.FloatToStrDot(AOriginLatitude) + ',' + TTMSFNCUtils.FloatToStrDot(AOriginLongitude);\r\n ADestination := TTMSFNCUtils.FloatToStrDot(ADestinationLatitude) + ',' + TTMSFNCUtils.FloatToStrDot(ADestinationLongitude);\r\n\r\n AOrigin := TTMSFNCUtils.FloatToStrDot(AOriginLatitude) + ',' + TTMSFNCUtils.FloatToStrDot(AOriginLongitude);\r\n ADestination := TTMSFNCUtils.FloatToStrDot(ADestinationLatitude) + ',' + TTMSFNCUtils.FloatToStrDot(ADestinationLongitude);\r\n\r\n WayPoints := AOrigin;\r\n if Assigned(AWaypoints) and (Length(AWayPoints) > 0) then\r\n begin\r\n for I := 0 to (Length(AWayPoints) - 1) do\r\n WayPoints := WayPoints + ':' + TTMSFNCUtils.FloatToStrDot(AWayPoints[I].Latitude) + ',' + TTMSFNCUtils.FloatToStrDot(AWayPoints[I].Longitude);\r\n end;\r\n WayPoints := WayPoints + ':' + ADestination;\r\n\r\n Result := '/routing/1/calculateRoute/' + WayPoints + '/json';\r\nend;\r\n\r\nfunction TTMSFNCDirectionsTomTomDirections.GetPostData(AOrigin, ADestination: string; AOriginLatitude, AOriginLongitude,\r\n ADestinationLatitude, ADestinationLongitude: Double; AAlternatives: Boolean = False;\r\n ATravelMode: TTMSFNCDirectionsTravelMode = tmDriving; AWayPointList: TStringList = nil; AWayPoints: TTMSFNCMapsCoordinateRecArray = nil;\r\n AOptimizeWayPoints: Boolean = False; ALocale: string = ''; AAvoidTolls: Boolean = False;\r\n AAvoidHighways: Boolean = False): string;\r\nbegin\r\n Result := '';\r\nend;\r\n\r\nfunction TTMSFNCDirectionsTomTomDirections.GetQuery(AOrigin, ADestination: string; AOriginLatitude, AOriginLongitude,\r\n ADestinationLatitude, ADestinationLongitude: Double; AAlternatives: Boolean = False;\r\n ATravelMode: TTMSFNCDirectionsTravelMode = tmDriving; AWayPointList: TStringList = nil; AWayPoints: TTMSFNCMapsCoordinateRecArray = nil;\r\n AOptimizeWayPoints: Boolean = False; ALocale: string = ''; AAVoidTolls: Boolean = False;\r\n AAvoidHighways: Boolean = False): string;\r\nvar\r\n TravelMode, Alternatives: string;\r\nbegin\r\n if AAlternatives then\r\n Alternatives := '5'\r\n else\r\n Alternatives := '0';\r\n\r\n if ATravelMode in [tmPublicTransport] then\r\n FTravelMode := tmDriving\r\n else\r\n FTravelMode := ATravelMode;\r\n\r\n case ATravelMode of\r\n tmDriving: TravelMode := 'car';\r\n tmWalking: TravelMode := 'pedestrian';\r\n tmBicycling: TravelMode := 'bicycle';\r\n tmTruck: TravelMode := 'truck';\r\n end;\r\n\r\n Result := 'key=' + DirectionsProperties.GetAPIKey\r\n + '&maxAlternatives=' + Alternatives\r\n + '&computeBestOrder=' + BoolToStrEx(AOptimizeWayPoints)\r\n + '&instructionsType=text'\r\n + '&travelMode=' + TravelMode\r\n + '&language=' + ALocale;\r\n\r\n if AAVoidTolls then\r\n Result := Result + '&avoid=tolls';\r\n\r\n if AAVoidHighways then\r\n Result := Result + '&avoid=motorways';\r\nend;\r\n\r\nfunction TTMSFNCDirectionsTomTomDirections.GetRequestMethod: TTMSFNCCloudBaseRequestMethod;\r\nbegin\r\n Result := rmGet;\r\nend;\r\n\r\nfunction TTMSFNCDirectionsTomTomDirections.IsValid: Boolean;\r\nbegin\r\n Result := DirectionsProperties.GetAPIKey <> '';\r\nend;\r\n\r\nprocedure TTMSFNCDirectionsTomTomDirections.Parse(ARequest: TTMSFNCDirectionsRequest; ARequestResult: string);\r\nvar\r\n d: TTMSFNCDirectionsItems;\r\n di: TTMSFNCDirectionsItem;\r\n co: TTMSFNCMapsCoordinateItem;\r\n l: TTMSFNCDirectionsLeg;\r\n step: TTMSFNCDirectionsStep;\r\n wp: TTMSFNCDirectionsWayPoint;\r\n\r\n o, jo, jol, jos: TJSONValue;\r\n jar, jal, jas: TJSONArray;\r\n i, j, k: Integer;\r\n ol, os: TJSONObject;\r\n wpIndex: array of integer;\r\n providedIndex, optimizedIndex: integer;\r\nbegin\r\n if Assigned(DirectionsProperties) then\r\n begin\r\n ARequest.TravelMode := FTravelMode;\r\n\r\n d := ARequest.Items;\r\n if Assigned(d) then\r\n begin\r\n if ARequestResult <> '' then\r\n begin\r\n o := TTMSFNCUtils.ParseJSON(ARequestResult);\r\n if Assigned(o) then\r\n begin\r\n try\r\n ARequest.Status := TTMSFNCUtils.GetJSONProp(o, 'httpStatusCode');\r\n ARequest.ErrorMessage := TTMSFNCUtils.GetJSONProp(o, 'errorText');\r\n\r\n SetLength(wpIndex, 1);\r\n wpIndex[0] := -1;\r\n\r\n jal := TTMSFNCUtils.GetJSONValue(o, 'optimizedWaypoints') as TJSONArray;\r\n if Assigned(jal) then\r\n begin\r\n SetLength(wpIndex, TTMSFNCUtils.GetJSONArraySize(jal) + 1);\r\n\r\n for j := 0 to TTMSFNCUtils.GetJSONArraySize(jal) - 1 do\r\n begin\r\n jol := TTMSFNCUtils.GetJSONArrayItem(jal, j);\r\n\r\n if Assigned(jol) then\r\n begin\r\n providedIndex := TTMSFNCUtils.GetJSONIntegerValue(jol, 'providedIndex');\r\n optimizedIndex := TTMSFNCUtils.GetJSONIntegerValue(jol, 'optimizedIndex');\r\n wpIndex[providedIndex + 1] := optimizedIndex;\r\n end;\r\n end;\r\n end;\r\n\r\n jar := TTMSFNCUtils.GetJSONValue(o, 'routes') as TJSONArray;\r\n if Assigned(jar) then\r\n begin\r\n for i := 0 to TTMSFNCUtils.GetJSONArraySize(jar) - 1 do\r\n begin\r\n jo := TTMSFNCUtils.GetJSONArrayItem(jar, i);\r\n\r\n di := d.Add;\r\n di.Summary := 'Route ' + IntToStr(i);\r\n\r\n jal := TTMSFNCUtils.GetJSONValue(jo, 'legs') as TJSONArray;\r\n if Assigned(jal) then\r\n begin\r\n for j := 0 to TTMSFNCUtils.GetJSONArraySize(jal) - 1 do\r\n begin\r\n jol := TTMSFNCUtils.GetJSONArrayItem(jal, j);\r\n\r\n l := di.Legs.Add;\r\n\r\n wp := di.WayPoints.Add;\r\n if Length(wpIndex) > j then\r\n wp.OptimizedIndex := wpIndex[j];\r\n\r\n ol := TTMSFNCUtils.GetJSONValue(jol, 'summary') as TJSONObject;\r\n if Assigned(ol) then\r\n begin\r\n l.Distance := TTMSFNCUtils.GetJSONIntegerValue(ol, 'lengthInMeters');\r\n di.Distance := di.Distance + l.Distance;\r\n l.Duration := TTMSFNCUtils.GetJSONIntegerValue(ol, 'travelTimeInSeconds');\r\n di.Duration := di.Duration + l.Duration;\r\n wp.Distance := l.Distance;\r\n wp.Duration := l.Duration;\r\n end;\r\n\r\n jas := TTMSFNCUtils.GetJSONValue(jol, 'points') as TJSONArray;\r\n if Assigned(jas) then\r\n begin\r\n for k := 0 to TTMSFNCUtils.GetJSONArraySize(jas) - 1 do\r\n begin\r\n jos := TTMSFNCUtils.GetJSONArrayItem(jas, k);\r\n\r\n co := di.Coordinates.Add;\r\n co.Latitude := TTMSFNCUtils.GetJSONDoubleValue(jos, 'latitude');\r\n co.Longitude := TTMSFNCUtils.GetJSONDoubleValue(jos, 'longitude');\r\n l.Coordinates.Add.Assign(co);\r\n end;\r\n end;\r\n\r\n if l.Coordinates.Count > 0 then\r\n begin\r\n l.StartLocation.Assign(l.Coordinates[0].Coordinate);\r\n l.EndLocation.Assign(l.Coordinates[l.Coordinates.Count - 1].Coordinate);\r\n end;\r\n\r\n end;\r\n end;\r\n\r\n ol := TTMSFNCUtils.GetJSONValue(jo, 'guidance') as TJSONObject;\r\n if Assigned(ol) then\r\n begin\r\n jas := TTMSFNCUtils.GetJSONValue(ol, 'instructions') as TJSONArray;\r\n if Assigned(jas) then\r\n begin\r\n for k := 0 to TTMSFNCUtils.GetJSONArraySize(jas) - 1 do\r\n begin\r\n jos := TTMSFNCUtils.GetJSONArrayItem(jas, k);\r\n\r\n step := di.Steps.Add;\r\n step.Distance := TTMSFNCUtils.GetJSONIntegerValue(jos, 'routeOffsetInMeters');\r\n step.Duration := TTMSFNCUtils.GetJSONIntegerValue(jos, 'travelTimeInSeconds');\r\n os := TTMSFNCUtils.GetJSONValue(jos, 'point') as TJSONObject;\r\n if Assigned(os) then\r\n begin\r\n step.StartLocation.Latitude := TTMSFNCUtils.GetJSONDoubleValue(os, 'latitude');\r\n step.StartLocation.Longitude := TTMSFNCUtils.GetJSONDoubleValue(os, 'longitude');\r\n end;\r\n step.Instructions := TTMSFNCUtils.GetJSONProp(jos, 'message');\r\n end;\r\n end;\r\n end;\r\n\r\n end;\r\n end;\r\n finally\r\n o.Free;\r\n end;\r\n end\r\n else\r\n begin\r\n //error\r\n ARequest.Status := ARequestResult;\r\n ARequest.ErrorMessage := ARequest.Status;\r\n end;\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\nend.\r\n\r\n","{********************************************************************}\r\n{ }\r\n{ written by TMS Software }\r\n{ copyright (c) 2020 - 2024 }\r\n{ Email : info@tmssoftware.com }\r\n{ Web : http://www.tmssoftware.com }\r\n{ }\r\n{ The source code is given as is. The author is not responsible }\r\n{ for any possible damage done due to the use of this code. }\r\n{ The complete source code remains property of the author and may }\r\n{ not be distributed, published, given or sold in any form as such. }\r\n{ No parts of the source code can be included in any other component }\r\n{ or application without written authorization of the author. }\r\n{********************************************************************}\r\n\r\nunit WEBLib.TMSFNCDirections.OpenRouteService;\r\n\r\n{$I WEBLib.TMSFNCDefines.inc}\r\n\r\n{$IFDEF WEBLIB}\r\n{$DEFINE LCLWEBLIB}\r\n{$ENDIF}\r\n{$IFDEF LCLLIB}\r\n{$DEFINE LCLWEBLIB}\r\n{$ENDIF}\r\n\r\ninterface\r\n\r\nprocedure RegisterOpenRouteServiceDirectionsService;\r\nprocedure UnRegisterOpenRouteServiceDirectionsService;\r\n\r\nimplementation\r\n\r\nuses\r\n Classes, Math, DateUtils, Types, SysUtils, WEBLib.TMSFNCDirections,\r\n WEBLib.TMSFNCUtils, WEBLib.TMSFNCTypes, WEBLib.TMSFNCMapsCommonTypes, WEBLib.TMSFNCCloudBase\r\n {$IFNDEF WEBLIB}\r\n {$IFNDEF LCLLIB}\r\n {$HINTS OFF}\r\n {$IF COMPILERVERSION > 26}\r\n ,JSON\r\n {$ELSE}\r\n ,DBXJSON\r\n {$IFEND}\r\n {$HINTS ON}\r\n {$ELSE}\r\n ,fpjson\r\n {$ENDIF}\r\n {$ENDIF}\r\n\r\n {$IFDEF WEBLIB}\r\n ,Contnrs, Web, WEBLIB.JSON\r\n {$ENDIF}\r\n {$IFNDEF LCLWEBLIB}\r\n ,Generics.Collections, Generics.Defaults\r\n {$HINTS OFF}\r\n {$IF COMPILERVERSION > 22}\r\n , UITypes\r\n {$IFEND}\r\n {$HINTS ON}\r\n {$ENDIF}\r\n {$IFDEF LCLLIB}\r\n ,fgl\r\n {$ENDIF}\r\n ;\r\n\r\ntype\r\n TTMSFNCDirectionsOpenRouteServiceService = class;\r\n\r\n TTMSFNCDirectionsOpenRouteServiceDirectionsFactoryService = class(TTMSFNCDirectionsFactoryService, ITMSFNCDirectionsServiceOpenRouteService);\r\n\r\n TTMSFNCDirectionsOpenRouteServiceService = class(TTMSFNCDirectionsOpenRouteServiceDirectionsFactoryService)\r\n protected\r\n function DoCreateDirections: ITMSFNCCustomDirections; override;\r\n end;\r\n\r\ntype\r\n TTMSFNCDirectionsOpenRouteServiceDirections = class;\r\n\r\n TTMSFNCDirectionsOpenRouteServiceDirections = class(TTMSFNCCustomDirectionsInterfacedObject, ITMSFNCCustomDirections)\r\n protected\r\n FTravelMode: TTMSFNCDirectionsTravelMode;\r\n function GetIdentifier: string;\r\n function IsValid: Boolean;\r\n function GetRequestMethod: TTMSFNCCloudBaseRequestMethod;\r\n function GetHost: string;\r\n function GetPath(AOrigin, ADestination: string; AOriginLatitude, AOriginLongitude,\r\n ADestinationLatitude, ADestinationLongitude: Double;\r\n ATravelMode: TTMSFNCDirectionsTravelMode = tmDriving; AWayPoints: TTMSFNCMapsCoordinateRecArray = nil): string;\r\n function GetQuery(AOrigin, ADestination: string; AOriginLatitude, AOriginLongitude,\r\n ADestinationLatitude, ADestinationLongitude: Double; AAlternatives: Boolean = False;\r\n ATravelMode: TTMSFNCDirectionsTravelMode = tmDriving; AWayPointList: TStringList = nil; AWayPoints: TTMSFNCMapsCoordinateRecArray = nil;\r\n AOptimizeWayPoints: Boolean = False; ALocale: string = ''; AAVoidTolls: Boolean = False;\r\n AAvoidHighways: Boolean = False): string;\r\n function GetPostData(AOrigin, ADestination: string; AOriginLatitude, AOriginLongitude,\r\n ADestinationLatitude, ADestinationLongitude: Double; AAlternatives: Boolean = False;\r\n ATravelMode: TTMSFNCDirectionsTravelMode = tmDriving; AWayPointList: TStringList = nil; AWayPoints: TTMSFNCMapsCoordinateRecArray = nil;\r\n AOptimizeWayPoints: Boolean = False; ALocale: string = ''; AAvoidTolls: Boolean = False;\r\n AAvoidHighways: Boolean = False): string;\r\n procedure Parse(ARequest: TTMSFNCDirectionsRequest; ARequestResult: string);\r\n procedure AddHeaders(AHeaders: TTMSFNCCloudBaseRequestHeaders);\r\n procedure DestroyDirections;\r\n public\r\n constructor Create;\r\n destructor Destroy; override;\r\n end;\r\n\r\nvar\r\n DirectionsService: ITMSFNCDirectionsServiceOpenRouteService;\r\n\r\nprocedure RegisterOpenRouteServiceDirectionsService;\r\nbegin\r\n if not TTMSFNCDirectionsPlatformServices.Current.SupportsPlatformService(ITMSFNCDirectionsServiceOpenRouteService, IInterface(DirectionsService)) then\r\n begin\r\n DirectionsService := TTMSFNCDirectionsOpenRouteServiceService.Create;\r\n TTMSFNCDirectionsPlatformServices.Current.AddPlatformService(ITMSFNCDirectionsServiceOpenRouteService, DirectionsService);\r\n end;\r\nend;\r\n\r\nprocedure UnregisterOpenRouteServiceDirectionsService;\r\nbegin\r\n TTMSFNCDirectionsPlatformServices.Current.RemovePlatformService(ITMSFNCDirectionsServiceOpenRouteService);\r\nend;\r\n\r\n{ TTMSFNCDirectionsOpenRouteServiceService }\r\n\r\nfunction TTMSFNCDirectionsOpenRouteServiceService.DoCreateDirections: ITMSFNCCustomDirections;\r\nbegin\r\n Result := TTMSFNCDirectionsOpenRouteServiceDirections.Create;\r\nend;\r\n\r\nprocedure TTMSFNCDirectionsOpenRouteServiceDirections.AddHeaders(\r\n AHeaders: TTMSFNCCloudBaseRequestHeaders);\r\nbegin\r\n AHeaders.Add(TTMSFNCCloudBaseRequestHeader.Create('Content-Type', 'application/json'));\r\n AHeaders.Add(TTMSFNCCloudBaseRequestHeader.Create('Authorization', DirectionsProperties.GetAPIKey));\r\nend;\r\n\r\nconstructor TTMSFNCDirectionsOpenRouteServiceDirections.Create;\r\nbegin\r\n inherited;\r\nend;\r\n\r\ndestructor TTMSFNCDirectionsOpenRouteServiceDirections.Destroy;\r\nbegin\r\n inherited;\r\nend;\r\n\r\nprocedure TTMSFNCDirectionsOpenRouteServiceDirections.DestroyDirections;\r\nbegin\r\n DirectionsService.DestroyDirections(Self);\r\nend;\r\n\r\nfunction TTMSFNCDirectionsOpenRouteServiceDirections.GetHost: string;\r\nbegin\r\n Result := 'https://api.openrouteservice.org';\r\nend;\r\n\r\nfunction TTMSFNCDirectionsOpenRouteServiceDirections.GetIdentifier: string;\r\nbegin\r\n Result := 'OpenRouteService';\r\nend;\r\n\r\nfunction TTMSFNCDirectionsOpenRouteServiceDirections.GetPath(AOrigin, ADestination: string; AOriginLatitude, AOriginLongitude,\r\n ADestinationLatitude, ADestinationLongitude: Double; ATravelMode: TTMSFNCDirectionsTravelMode = tmDriving; AWayPoints: TTMSFNCMapsCoordinateRecArray = nil): string;\r\nvar\r\n TravelMode: string;\r\nbegin\r\n\r\n if ATravelMode in [tmPublicTransport] then\r\n FTravelMode := tmDriving\r\n else\r\n FTravelMode := ATravelMode;\r\n\r\n case ATravelMode of\r\n tmDriving: TravelMode := 'driving-car';\r\n tmWalking: TravelMode := 'foot-walking';\r\n tmBicycling: TravelMode := 'cycling-regular';\r\n tmPublicTransport: TravelMode := 'driving-car';\r\n tmTruck: TravelMode := 'driving-hgv';\r\n end;\r\n\r\n Result := '/v2/directions/' + TravelMode;\r\nend;\r\n\r\nfunction TTMSFNCDirectionsOpenRouteServiceDirections.GetPostData(AOrigin, ADestination: string; AOriginLatitude, AOriginLongitude,\r\n ADestinationLatitude, ADestinationLongitude: Double; AAlternatives: Boolean = False;\r\n ATravelMode: TTMSFNCDirectionsTravelMode = tmDriving; AWayPointList: TStringList = nil; AWayPoints: TTMSFNCMapsCoordinateRecArray = nil;\r\n AOptimizeWayPoints: Boolean = False; ALocale: string = ''; AAvoidTolls: Boolean = False;\r\n AAvoidHighways: Boolean = False): string;\r\nvar\r\n coords, avoid, alts, lang: string;\r\n I, wpcount: Integer;\r\n\r\n function CoordToStr(Latitude, Longitude: Double): string;\r\n begin\r\n Result := '[' + TTMSFNCUtils.FloatToStrDot(Longitude) + ',' + TTMSFNCUtils.FloatToStrDot(Latitude) + ']';\r\n end;\r\n\r\nbegin\r\n wpcount := 0;\r\n coords := CoordToStr(AOriginLatitude, AOriginLongitude);\r\n if Assigned(AWayPoints) then\r\n begin\r\n wpcount := Length(AWayPoints);\r\n for I := 0 to wpcount - 1 do\r\n begin\r\n coords := coords + ', ' + CoordToStr(AWayPoints[I].Latitude, AWayPoints[I].Longitude);\r\n end;\r\n end;\r\n coords := coords + ', ' + CoordToStr(ADestinationLatitude, ADestinationLongitude);\r\n\r\n if ATravelMode in [tmDriving, tmTruck] then\r\n begin\r\n if AAvoidTolls or AAvoidHighways then\r\n begin\r\n avoid := '';\r\n\r\n if AAvoidTolls then\r\n avoid := avoid + '\"tollways\"';\r\n\r\n if AAvoidHighways then\r\n begin\r\n if avoid <> '' then\r\n avoid := avoid + ', ';\r\n avoid := avoid + '\"highways\"';\r\n end;\r\n\r\n avoid := ',\"options\":{\"avoid_features\":[' + avoid + ']}';\r\n end;\r\n end;\r\n\r\n if wpcount <= 0 then\r\n begin\r\n if AAlternatives then\r\n alts := ',\"alternative_routes\":{\"target_count\":2}';\r\n end;\r\n\r\n if ALocale <> '' then\r\n lang := ', \"language\": \"' + ALocale + '\"';\r\n\r\n Result := '{\"coordinates\":[' + coords + ']' + lang + alts + avoid + '}';\r\nend;\r\n\r\nfunction TTMSFNCDirectionsOpenRouteServiceDirections.GetQuery(AOrigin, ADestination: string; AOriginLatitude, AOriginLongitude,\r\n ADestinationLatitude, ADestinationLongitude: Double; AAlternatives: Boolean = False;\r\n ATravelMode: TTMSFNCDirectionsTravelMode = tmDriving; AWayPointList: TStringList = nil; AWayPoints: TTMSFNCMapsCoordinateRecArray = nil;\r\n AOptimizeWayPoints: Boolean = False; ALocale: string = ''; AAVoidTolls: Boolean = False;\r\n AAvoidHighways: Boolean = False): string;\r\nbegin\r\n Result := '';\r\nend;\r\n\r\nfunction TTMSFNCDirectionsOpenRouteServiceDirections.GetRequestMethod: TTMSFNCCloudBaseRequestMethod;\r\nbegin\r\n Result := rmPost;\r\nend;\r\n\r\nfunction TTMSFNCDirectionsOpenRouteServiceDirections.IsValid: Boolean;\r\nbegin\r\n Result := DirectionsProperties.GetAPIKey <> '';\r\nend;\r\n\r\nprocedure TTMSFNCDirectionsOpenRouteServiceDirections.Parse(ARequest: TTMSFNCDirectionsRequest; ARequestResult: string);\r\nvar\r\n d: TTMSFNCDirectionsItems;\r\n di: TTMSFNCDirectionsItem;\r\n step, lstep: TTMSFNCDirectionsStep;\r\n l: TTMSFNCDirectionsLeg;\r\n it, lit: TTMSFNCMapsCoordinateItem;\r\n\r\n o, jo, jol, jos, joar: TJSONValue;\r\n jar, jal, jas, jab: TJSONArray;\r\n i, j, k, m, startindex, endindex: Integer;\r\n ol: TJSONObject;\r\nbegin\r\n if Assigned(DirectionsProperties) then\r\n begin\r\n ARequest.TravelMode := FTravelMode;\r\n\r\n d := ARequest.Items;\r\n if Assigned(d) then\r\n begin\r\n if ARequestResult <> '' then\r\n begin\r\n o := TTMSFNCUtils.ParseJSON(ARequestResult);\r\n if Assigned(o) then\r\n begin\r\n try\r\n ARequest.ErrorMessage := TTMSFNCUtils.GetJSONProp(o, 'error');\r\n if ARequest.ErrorMessage <> '' then\r\n ARequest.Status := 'error';\r\n\r\n jar := TTMSFNCUtils.GetJSONValue(o, 'routes') as TJSONArray;\r\n if Assigned(jar) then\r\n begin\r\n\r\n for i := 0 to TTMSFNCUtils.GetJSONArraySize(jar) - 1 do\r\n begin\r\n jo := TTMSFNCUtils.GetJSONArrayItem(jar, i);\r\n\r\n di := d.Add;\r\n ol := TTMSFNCUtils.GetJSONValue(jo, 'summary') as TJSONObject;\r\n if Assigned(ol) then\r\n begin\r\n di.Distance := TTMSFNCUtils.GetJSONDoubleValue(ol, 'distance');\r\n di.Duration := Round(TTMSFNCUtils.GetJSONDoubleValue(ol, 'duration'));\r\n end;\r\n\r\n DecodeValues(TTMSFNCUtils.GetJSONProp(jo, 'geometry'), di.Coordinates);\r\n\r\n jal := TTMSFNCUtils.GetJSONValue(jo, 'segments') as TJSONArray;\r\n if Assigned(jal) then\r\n begin\r\n for j := 0 to TTMSFNCUtils.GetJSONArraySize(jal) - 1 do\r\n begin\r\n jol := TTMSFNCUtils.GetJSONArrayItem(jal, j);\r\n\r\n l := di.Legs.Add;\r\n l.Distance := Round(TTMSFNCUtils.GetJSONDoubleValue(jol, 'distance'));\r\n l.Duration := Round(TTMSFNCUtils.GetJSONDoubleValue(jol, 'duration'));\r\n\r\n jas := TTMSFNCUtils.GetJSONValue(jol, 'steps') as TJSONArray;\r\n if Assigned(jas) then\r\n begin\r\n for k := 0 to TTMSFNCUtils.GetJSONArraySize(jas) - 1 do\r\n begin\r\n jos := TTMSFNCUtils.GetJSONArrayItem(jas, k);\r\n\r\n step := di.Steps.Add;\r\n step.Distance := Round(TTMSFNCUtils.GetJSONDoubleValue(jos, 'distance'));\r\n step.Duration := Round(TTMSFNCUtils.GetJSONDoubleValue(jos, 'duration'));\r\n step.Instructions := TTMSFNCUtils.GetJSONProp(jos, 'instruction');\r\n\r\n jab := TTMSFNCUtils.GetJSONValue(jos, 'way_points') as TJSONArray;\r\n if Assigned(jar) then\r\n begin\r\n startindex := 0;\r\n endindex := 0;\r\n for m := 0 to TTMSFNCUtils.GetJSONArraySize(jab) - 1 do\r\n begin\r\n joar := TTMSFNCUtils.GetJSONArrayItem(jab, m);\r\n if m = 0 then\r\n startindex := Round(TTMSFNCUtils.StrToFloatDot(joar.Value));\r\n if m = 1 then\r\n endindex := Round(TTMSFNCUtils.StrToFloatDot(joar.Value));\r\n end;\r\n for m := startindex to endindex do\r\n begin\r\n it := step.Coordinates.Add;\r\n it.Latitude := di.Coordinates[m].Latitude;\r\n it.Longitude := di.Coordinates[m].Longitude;\r\n\r\n lit := l.Coordinates.Add;\r\n lit.Latitude := it.Latitude;\r\n lit.Longitude := it.Longitude;\r\n end;\r\n if step.Coordinates.Count > 0 then\r\n begin\r\n step.StartLocation.Assign(step.Coordinates[0].Coordinate);\r\n step.EndLocation.Assign(step.Coordinates[step.Coordinates.Count - 1].Coordinate);\r\n end;\r\n lstep := l.Steps.Add;\r\n lstep.Assign(step);\r\n end;\r\n end;\r\n\r\n if l.Coordinates.Count > 0 then\r\n begin\r\n l.StartLocation.Assign(l.Coordinates[0].Coordinate);\r\n l.EndLocation.Assign(l.Coordinates[l.Coordinates.Count - 1].Coordinate);\r\n end;\r\n\r\n end;\r\n end;\r\n end;\r\n end;\r\n end;\r\n finally\r\n o.Free;\r\n end;\r\n end;\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\nend.\r\n\r\n","{********************************************************************}\r\n{ }\r\n{ written by TMS Software }\r\n{ copyright (c) 2020 - 2024 }\r\n{ Email : info@tmssoftware.com }\r\n{ Web : http://www.tmssoftware.com }\r\n{ }\r\n{ The source code is given as is. The author is not responsible }\r\n{ for any possible damage done due to the use of this code. }\r\n{ The complete source code remains property of the author and may }\r\n{ not be distributed, published, given or sold in any form as such. }\r\n{ No parts of the source code can be included in any other component }\r\n{ or application without written authorization of the author. }\r\n{********************************************************************}\r\n\r\nunit WEBLib.TMSFNCDirections.GeoApify;\r\n\r\n{$I WEBLib.TMSFNCDefines.inc}\r\n\r\n{$IFDEF WEBLIB}\r\n{$DEFINE LCLWEBLIB}\r\n{$ENDIF}\r\n{$IFDEF LCLLIB}\r\n{$DEFINE LCLWEBLIB}\r\n{$ENDIF}\r\n\r\ninterface\r\n\r\nprocedure RegisterGeoApifyDirectionsService;\r\nprocedure UnRegisterGeoApifyDirectionsService;\r\n\r\nimplementation\r\n\r\nuses\r\n Classes, Math, DateUtils, Types, SysUtils, WEBLib.TMSFNCDirections,\r\n WEBLib.TMSFNCUtils, WEBLib.TMSFNCTypes, WEBLib.TMSFNCMapsCommonTypes, WEBLib.TMSFNCCloudBase\r\n {$IFNDEF WEBLIB}\r\n {$IFNDEF LCLLIB}\r\n {$HINTS OFF}\r\n {$IF COMPILERVERSION > 26}\r\n ,JSON\r\n {$ELSE}\r\n ,DBXJSON\r\n {$IFEND}\r\n {$HINTS ON}\r\n {$ELSE}\r\n ,fpjson\r\n {$ENDIF}\r\n {$ENDIF}\r\n\r\n {$IFDEF WEBLIB}\r\n ,Contnrs, Web, WEBLIB.JSON\r\n {$ENDIF}\r\n {$IFNDEF LCLWEBLIB}\r\n ,Generics.Collections, Generics.Defaults\r\n {$HINTS OFF}\r\n {$IF COMPILERVERSION > 22}\r\n , UITypes\r\n {$IFEND}\r\n {$HINTS ON}\r\n {$ENDIF}\r\n {$IFDEF LCLLIB}\r\n ,fgl\r\n {$ENDIF}\r\n ;\r\n\r\ntype\r\n TTMSFNCDirectionsGeoApifyService = class;\r\n\r\n TTMSFNCDirectionsGeoApifyDirectionsFactoryService = class(TTMSFNCDirectionsFactoryService, ITMSFNCDirectionsServiceGeoApify);\r\n\r\n TTMSFNCDirectionsGeoApifyService = class(TTMSFNCDirectionsGeoApifyDirectionsFactoryService)\r\n protected\r\n function DoCreateDirections: ITMSFNCCustomDirections; override;\r\n end;\r\n\r\ntype\r\n TTMSFNCDirectionsGeoApifyDirections = class;\r\n\r\n TTMSFNCDirectionsGeoApifyDirections = class(TTMSFNCCustomDirectionsInterfacedObject, ITMSFNCCustomDirections)\r\n protected\r\n FTravelMode: TTMSFNCDirectionsTravelMode;\r\n function GetIdentifier: string;\r\n function IsValid: Boolean;\r\n function GetRequestMethod: TTMSFNCCloudBaseRequestMethod;\r\n function GetHost: string;\r\n function GetPath(AOrigin, ADestination: string; AOriginLatitude, AOriginLongitude,\r\n ADestinationLatitude, ADestinationLongitude: Double;\r\n ATravelMode: TTMSFNCDirectionsTravelMode = tmDriving; AWayPoints: TTMSFNCMapsCoordinateRecArray = nil): string;\r\n function GetQuery(AOrigin, ADestination: string; AOriginLatitude, AOriginLongitude,\r\n ADestinationLatitude, ADestinationLongitude: Double; AAlternatives: Boolean = False;\r\n ATravelMode: TTMSFNCDirectionsTravelMode = tmDriving; AWayPointList: TStringList = nil; AWayPoints: TTMSFNCMapsCoordinateRecArray = nil;\r\n AOptimizeWayPoints: Boolean = False; ALocale: string = ''; AAVoidTolls: Boolean = False;\r\n AAvoidHighways: Boolean = False): string;\r\n function GetPostData(AOrigin, ADestination: string; AOriginLatitude, AOriginLongitude,\r\n ADestinationLatitude, ADestinationLongitude: Double; AAlternatives: Boolean = False;\r\n ATravelMode: TTMSFNCDirectionsTravelMode = tmDriving; AWayPointList: TStringList = nil; AWayPoints: TTMSFNCMapsCoordinateRecArray = nil;\r\n AOptimizeWayPoints: Boolean = False; ALocale: string = ''; AAvoidTolls: Boolean = False;\r\n AAvoidHighways: Boolean = False): string;\r\n procedure Parse(ARequest: TTMSFNCDirectionsRequest; ARequestResult: string);\r\n procedure AddHeaders(AHeaders: TTMSFNCCloudBaseRequestHeaders);\r\n procedure DestroyDirections;\r\n public\r\n constructor Create;\r\n destructor Destroy; override;\r\n end;\r\n\r\nvar\r\n DirectionsService: ITMSFNCDirectionsServiceGeoApify;\r\n\r\nprocedure RegisterGeoApifyDirectionsService;\r\nbegin\r\n if not TTMSFNCDirectionsPlatformServices.Current.SupportsPlatformService(ITMSFNCDirectionsServiceGeoApify, IInterface(DirectionsService)) then\r\n begin\r\n DirectionsService := TTMSFNCDirectionsGeoApifyService.Create;\r\n TTMSFNCDirectionsPlatformServices.Current.AddPlatformService(ITMSFNCDirectionsServiceGeoApify, DirectionsService);\r\n end;\r\nend;\r\n\r\nprocedure UnregisterGeoApifyDirectionsService;\r\nbegin\r\n TTMSFNCDirectionsPlatformServices.Current.RemovePlatformService(ITMSFNCDirectionsServiceGeoApify);\r\nend;\r\n\r\n{ TTMSFNCDirectionsGeoApifyService }\r\n\r\nfunction TTMSFNCDirectionsGeoApifyService.DoCreateDirections: ITMSFNCCustomDirections;\r\nbegin\r\n Result := TTMSFNCDirectionsGeoApifyDirections.Create;\r\nend;\r\n\r\nprocedure TTMSFNCDirectionsGeoApifyDirections.AddHeaders(\r\n AHeaders: TTMSFNCCloudBaseRequestHeaders);\r\nbegin\r\n AHeaders.Add(TTMSFNCCloudBaseRequestHeader.Create('Content-Type', 'application/json'));\r\n AHeaders.Add(TTMSFNCCloudBaseRequestHeader.Create('Authorization', DirectionsProperties.GetAPIKey));\r\nend;\r\n\r\nconstructor TTMSFNCDirectionsGeoApifyDirections.Create;\r\nbegin\r\n inherited;\r\nend;\r\n\r\ndestructor TTMSFNCDirectionsGeoApifyDirections.Destroy;\r\nbegin\r\n inherited;\r\nend;\r\n\r\nprocedure TTMSFNCDirectionsGeoApifyDirections.DestroyDirections;\r\nbegin\r\n DirectionsService.DestroyDirections(Self);\r\nend;\r\n\r\nfunction TTMSFNCDirectionsGeoApifyDirections.GetHost: string;\r\nbegin\r\n Result := 'https://api.geoapify.com';\r\nend;\r\n\r\nfunction TTMSFNCDirectionsGeoApifyDirections.GetIdentifier: string;\r\nbegin\r\n Result := 'GeoApify';\r\nend;\r\n\r\nfunction TTMSFNCDirectionsGeoApifyDirections.GetPath(AOrigin, ADestination: string; AOriginLatitude, AOriginLongitude,\r\n ADestinationLatitude, ADestinationLongitude: Double; ATravelMode: TTMSFNCDirectionsTravelMode = tmDriving; AWayPoints: TTMSFNCMapsCoordinateRecArray = nil): string;\r\nbegin\r\n Result := '/v1/routing';\r\nend;\r\n\r\nfunction TTMSFNCDirectionsGeoApifyDirections.GetPostData(AOrigin, ADestination: string; AOriginLatitude, AOriginLongitude,\r\n ADestinationLatitude, ADestinationLongitude: Double; AAlternatives: Boolean = False;\r\n ATravelMode: TTMSFNCDirectionsTravelMode = tmDriving; AWayPointList: TStringList = nil; AWayPoints: TTMSFNCMapsCoordinateRecArray = nil;\r\n AOptimizeWayPoints: Boolean = False; ALocale: string = ''; AAvoidTolls: Boolean = False;\r\n AAvoidHighways: Boolean = False): string;\r\nbegin\r\n Result := '';\r\nend;\r\n\r\nfunction TTMSFNCDirectionsGeoApifyDirections.GetQuery(AOrigin, ADestination: string; AOriginLatitude, AOriginLongitude,\r\n ADestinationLatitude, ADestinationLongitude: Double; AAlternatives: Boolean = False;\r\n ATravelMode: TTMSFNCDirectionsTravelMode = tmDriving; AWayPointList: TStringList = nil; AWayPoints: TTMSFNCMapsCoordinateRecArray = nil;\r\n AOptimizeWayPoints: Boolean = False; ALocale: string = ''; AAVoidTolls: Boolean = False;\r\n AAvoidHighways: Boolean = False): string;\r\nvar\r\n TravelMode, WayPoints: string;\r\n I: Integer;\r\nbegin\r\n case ATravelMode of\r\n tmDriving: TravelMode := 'drive';\r\n tmWalking: TravelMode := 'walk';\r\n tmBicycling: TravelMode := 'bicycle';\r\n tmPublicTransport: TravelMode := 'transit';\r\n tmTruck: TravelMode := 'truck';\r\n end;\r\n\r\n WayPoints := TTMSFNCUtils.FloatToStrDot(AOriginLatitude) + ',' + TTMSFNCUtils.FloatToStrDot(AOriginLongitude);\r\n for I := 0 to Length(AWayPoints) - 1 do\r\n begin\r\n WayPoints := WayPoints +\r\n '|' + TTMSFNCUtils.FloatToStrDot(AWayPoints[I].Latitude) + ',' + TTMSFNCUtils.FloatToStrDot(AWayPoints[I].Longitude);\r\n end;\r\n WayPoints := WayPoints +\r\n '|' + TTMSFNCUtils.FloatToStrDot(ADestinationLatitude) + ',' + TTMSFNCUtils.FloatToStrDot(ADestinationLongitude);\r\n\r\n Result := 'apiKey=' + DirectionsProperties.GetAPIKey +\r\n '&mode=' + TravelMode +\r\n '&waypoints=' + WayPoints;\r\n\r\n if ALocale <> '' then \r\n Result := Result + '&lang=' + ALocale;\r\n\r\n if AAvoidTolls then\r\n Result := Result + '&avoid=tolls';\r\n\r\n if AAvoidHighways then\r\n Result := Result + '&avoid=highways';\r\nend;\r\n\r\nfunction TTMSFNCDirectionsGeoApifyDirections.GetRequestMethod: TTMSFNCCloudBaseRequestMethod;\r\nbegin\r\n Result := rmGet;\r\nend;\r\n\r\nfunction TTMSFNCDirectionsGeoApifyDirections.IsValid: Boolean;\r\nbegin\r\n Result := DirectionsProperties.GetAPIKey <> '';\r\nend;\r\n\r\nprocedure TTMSFNCDirectionsGeoApifyDirections.Parse(ARequest: TTMSFNCDirectionsRequest; ARequestResult: string);\r\nvar\r\n d: TTMSFNCDirectionsItems;\r\n di: TTMSFNCDirectionsItem;\r\n step, lstep: TTMSFNCDirectionsStep;\r\n l: TTMSFNCDirectionsLeg;\r\n it, lit: TTMSFNCMapsCoordinateItem;\r\n\r\n o, jo, jol, jos, joar: TJSONValue;\r\n jar, jal, jas, jac, jaa: TJSONArray;\r\n i, j, k, m, startindex, endindex: Integer;\r\n ob, ol: TJSONObject;\r\nbegin\r\n if Assigned(DirectionsProperties) then\r\n begin\r\n ARequest.TravelMode := FTravelMode;\r\n\r\n d := ARequest.Items;\r\n if Assigned(d) then\r\n begin\r\n if ARequestResult <> '' then\r\n begin\r\n o := TTMSFNCUtils.ParseJSON(ARequestResult);\r\n if Assigned(o) then\r\n begin\r\n try\r\n ARequest.Status := TTMSFNCUtils.GetJSONProp(o, 'error');\r\n ARequest.ErrorMessage := TTMSFNCUtils.GetJSONProp(o, 'message');\r\n\r\n jar := TTMSFNCUtils.GetJSONValue(o, 'features') as TJSONArray;\r\n if Assigned(jar) then\r\n begin \r\n for i := 0 to TTMSFNCUtils.GetJSONArraySize(jar) - 1 do\r\n begin\r\n jo := TTMSFNCUtils.GetJSONArrayItem(jar, i);\r\n\r\n di := d.Add;\r\n ol := TTMSFNCUtils.GetJSONValue(jo, 'geometry') as TJSONObject;\r\n if Assigned(ol) then\r\n begin\r\n jac := TTMSFNCUtils.GetJSONValue(ol, 'coordinates') as TJSONArray; \r\n if Assigned(jac) then\r\n begin\r\n for k := 0 to TTMSFNCUtils.GetJSONArraySize(jac) - 1 do\r\n begin\r\n l := di.Legs.Add;\r\n jaa := TTMSFNCUtils.GetJSONArrayItem(jac, k) as TJSONArray;\r\n if Assigned(jaa) then\r\n begin\r\n for m := 0 to TTMSFNCUtils.GetJSONArraySize(jaa) - 1 do\r\n begin\r\n jas := TTMSFNCUtils.GetJSONArrayItem(jaa, m) as TJSONArray;\r\n if Assigned(jas) then\r\n begin\r\n it := di.Coordinates.Add;\r\n joar := TTMSFNCUtils.GetJSONArrayItem(jas, 0);\r\n if joar.Value <> '' then\r\n it.Longitude := TTMSFNCUtils.StrToFloatDot(joar.Value);\r\n joar := TTMSFNCUtils.GetJSONArrayItem(jas, 1);\r\n if joar.Value <> '' then\r\n it.Latitude := TTMSFNCUtils.StrToFloatDot(joar.Value);\r\n lit := l.Coordinates.Add;\r\n lit.Latitude := it.Latitude;\r\n lit.Longitude := it.Longitude;\r\n end;\r\n end;\r\n end;\r\n\r\n if l.Coordinates.Count > 0 then\r\n begin\r\n l.StartLocation.Assign(l.Coordinates[0].Coordinate);\r\n l.EndLocation.Assign(l.Coordinates[l.Coordinates.Count - 1].Coordinate);\r\n end;\r\n end;\r\n end; \r\n end;\r\n\r\n ol := TTMSFNCUtils.GetJSONValue(jo, 'properties') as TJSONObject;\r\n if Assigned(ol) then\r\n begin\r\n di.Distance := TTMSFNCUtils.GetJSONDoubleValue(ol, 'distance');\r\n di.Duration := Round(TTMSFNCUtils.GetJSONDoubleValue(ol, 'time'));\r\n\r\n jal := TTMSFNCUtils.GetJSONValue(ol, 'legs') as TJSONArray;\r\n if Assigned(jal) then\r\n begin\r\n for j := 0 to TTMSFNCUtils.GetJSONArraySize(jal) - 1 do\r\n begin\r\n jol := TTMSFNCUtils.GetJSONArrayItem(jal, j);\r\n\r\n l := di.legs[j];\r\n l.Distance := Round(TTMSFNCUtils.GetJSONDoubleValue(jol, 'distance'));\r\n l.Duration := Round(TTMSFNCUtils.GetJSONDoubleValue(jol, 'time'));\r\n\r\n jas := TTMSFNCUtils.GetJSONValue(jol, 'steps') as TJSONArray;\r\n if Assigned(jas) then\r\n begin\r\n for k := 0 to TTMSFNCUtils.GetJSONArraySize(jas) - 1 do\r\n begin\r\n jos := TTMSFNCUtils.GetJSONArrayItem(jas, k);\r\n\r\n step := di.Steps.Add;\r\n step.Distance := Round(TTMSFNCUtils.GetJSONDoubleValue(jos, 'distance'));\r\n step.Duration := Round(TTMSFNCUtils.GetJSONDoubleValue(jos, 'time'));\r\n ob := TTMSFNCUtils.GetJSONValue(jos, 'instruction') as TJSONObject; \r\n if Assigned(ob) then\r\n begin\r\n step.Instructions := TTMSFNCUtils.GetJSONProp(ob, 'text');\r\n end;\r\n\r\n startindex := TTMSFNCUtils.GetJSONIntegerValue(jos, 'from_index');\r\n endindex := TTMSFNCUtils.GetJSONIntegerValue(jos, 'to_index');\r\n for m := startindex to endindex do\r\n begin\r\n it := step.Coordinates.Add;\r\n it.Latitude := l.Coordinates[m].Latitude;\r\n it.Longitude := l.Coordinates[m].Longitude;\r\n end;\r\n if step.Coordinates.Count > 0 then\r\n begin\r\n step.StartLocation.Assign(step.Coordinates[0].Coordinate);\r\n step.EndLocation.Assign(step.Coordinates[step.Coordinates.Count - 1].Coordinate);\r\n end;\r\n\r\n lstep := l.Steps.Add;\r\n lstep.Assign(step);\r\n end;\r\n end;\r\n end;\r\n end;\r\n end;\r\n end;\r\n end;\r\n finally\r\n o.Free;\r\n end;\r\n end;\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\nend.\r\n\r\n","{********************************************************************}\r\n{ }\r\n{ written by TMS Software }\r\n{ copyright (c) 2020 - 2021 }\r\n{ Email : info@tmssoftware.com }\r\n{ Web : http://www.tmssoftware.com }\r\n{ }\r\n{ The source code is given as is. The author is not responsible }\r\n{ for any possible damage done due to the use of this code. }\r\n{ The complete source code remains property of the author and may }\r\n{ not be distributed, published, given or sold in any form as such. }\r\n{ No parts of the source code can be included in any other component }\r\n{ or application without written authorization of the author. }\r\n{********************************************************************}\r\n\r\nunit WEBLib.TMSFNCLocation.IPStack;\r\n\r\n{$I WEBLib.TMSFNCDefines.inc}\r\n\r\n{$IFDEF WEBLIB}\r\n{$DEFINE LCLWEBLIB}\r\n{$ENDIF}\r\n{$IFDEF LCLLIB}\r\n{$DEFINE LCLWEBLIB}\r\n{$ENDIF}\r\n\r\ninterface\r\n\r\nprocedure RegisterIPStackLocationService;\r\nprocedure UnRegisterIPStackLocationService;\r\n\r\nimplementation\r\n\r\nuses\r\n Classes, Math, DateUtils, Types, SysUtils, WEBLib.TMSFNCLocation,\r\n WEBLib.TMSFNCUtils, WEBLib.TMSFNCTypes, WEBLib.TMSFNCMapsCommonTypes, WEBLib.TMSFNCCloudBase\r\n {$IFNDEF WEBLIB}\r\n {$IFNDEF LCLLIB}\r\n {$HINTS OFF}\r\n {$IF COMPILERVERSION > 26}\r\n ,JSON\r\n {$ELSE}\r\n ,DBXJSON\r\n {$IFEND}\r\n {$HINTS ON}\r\n {$ELSE}\r\n ,fpjson\r\n {$ENDIF}\r\n {$ENDIF}\r\n\r\n {$IFDEF WEBLIB}\r\n ,Contnrs, Web, WEBLIB.JSON\r\n {$ENDIF}\r\n {$IFNDEF LCLWEBLIB}\r\n ,Generics.Collections, Generics.Defaults\r\n {$HINTS OFF}\r\n {$IF COMPILERVERSION > 22}\r\n , UITypes\r\n {$IFEND}\r\n {$HINTS ON}\r\n {$ENDIF}\r\n {$IFDEF LCLLIB}\r\n ,fgl\r\n {$ENDIF}\r\n ;\r\n\r\ntype\r\n TTMSFNCLocationIPStackService = class;\r\n\r\n TTMSFNCLocationIPStackLocationFactoryService = class(TTMSFNCLocationFactoryService, ITMSFNCLocationServiceIPStack);\r\n\r\n TTMSFNCLocationIPStackService = class(TTMSFNCLocationIPStackLocationFactoryService)\r\n protected\r\n function DoCreateLocation: ITMSFNCCustomLocation; override;\r\n end;\r\n\r\ntype\r\n TTMSFNCLocationIPStackLocation = class;\r\n\r\n TTMSFNCLocationIPStackLocation = class(TTMSFNCCustomLocationInterfacedObject, ITMSFNCCustomLocation)\r\n protected\r\n function GetIdentifier: string;\r\n function IsValid: Boolean;\r\n function GetRequestMethod: TTMSFNCCloudBaseRequestMethod;\r\n function GetHost: string;\r\n function GetPath: string;\r\n function GetQuery: string; overload;\r\n function GetPostData: string;\r\n procedure Parse(ARequest: TTMSFNCLocationRequest; ARequestResult: string);\r\n procedure AddHeaders(AHeaders: TTMSFNCCloudBaseRequestHeaders);\r\n procedure DestroyLocation;\r\n public\r\n constructor Create;\r\n destructor Destroy; override;\r\n end;\r\n\r\nvar\r\n LocationService: ITMSFNCLocationServiceIPStack;\r\n\r\nprocedure RegisterIPStackLocationService;\r\nbegin\r\n if not TTMSFNCLocationPlatformServices.Current.SupportsPlatformService(ITMSFNCLocationServiceIPStack, IInterface(LocationService)) then\r\n begin\r\n LocationService := TTMSFNCLocationIPStackService.Create;\r\n TTMSFNCLocationPlatformServices.Current.AddPlatformService(ITMSFNCLocationServiceIPStack, LocationService);\r\n end;\r\nend;\r\n\r\nprocedure UnregisterIPStackLocationService;\r\nbegin\r\n TTMSFNCLocationPlatformServices.Current.RemovePlatformService(ITMSFNCLocationServiceIPStack);\r\nend;\r\n\r\n{ TTMSFNCLocationIPStackService }\r\n\r\nfunction TTMSFNCLocationIPStackService.DoCreateLocation: ITMSFNCCustomLocation;\r\nbegin\r\n Result := TTMSFNCLocationIPStackLocation.Create;\r\nend;\r\n\r\nprocedure TTMSFNCLocationIPStackLocation.AddHeaders(\r\n AHeaders: TTMSFNCCloudBaseRequestHeaders);\r\nbegin\r\n\r\nend;\r\n\r\nconstructor TTMSFNCLocationIPStackLocation.Create;\r\nbegin\r\n inherited;\r\nend;\r\n\r\ndestructor TTMSFNCLocationIPStackLocation.Destroy;\r\nbegin\r\n inherited;\r\nend;\r\n\r\nprocedure TTMSFNCLocationIPStackLocation.DestroyLocation;\r\nbegin\r\n LocationService.DestroyLocation(Self);\r\nend;\r\n\r\nfunction TTMSFNCLocationIPStackLocation.GetHost: string;\r\nbegin\r\n Result := 'https://api.ipstack.com';\r\nend;\r\n\r\nfunction TTMSFNCLocationIPStackLocation.GetIdentifier: string;\r\nbegin\r\n Result := 'IPStack';\r\nend;\r\n\r\nfunction TTMSFNCLocationIPStackLocation.GetPath: string;\r\nbegin\r\n Result := '/check';\r\nend;\r\n\r\nfunction TTMSFNCLocationIPStackLocation.GetPostData: string;\r\nbegin\r\n Result := '';\r\nend;\r\n\r\nfunction TTMSFNCLocationIPStackLocation.GetQuery: string;\r\nbegin\r\n Result := 'access_key=' + LocationProperties.GetAPIKey;\r\nend;\r\n\r\nfunction TTMSFNCLocationIPStackLocation.GetRequestMethod: TTMSFNCCloudBaseRequestMethod;\r\nbegin\r\n Result := rmGet;\r\nend;\r\n\r\nfunction TTMSFNCLocationIPStackLocation.IsValid: Boolean;\r\nbegin\r\n Result := LocationProperties.GetAPIKey <> '';\r\nend;\r\n\r\nprocedure TTMSFNCLocationIPStackLocation.Parse(ARequest: TTMSFNCLocationRequest; ARequestResult: string);\r\nvar\r\n o: TJSONValue;\r\nbegin\r\n if Assigned(LocationProperties) then\r\n begin\r\n if Assigned(ARequest) then\r\n begin\r\n if ARequestResult <> '' then\r\n begin\r\n o := TTMSFNCUtils.ParseJSON(ARequestResult);\r\n if Assigned(o) then\r\n begin\r\n try\r\n ARequest.Coordinate.Latitude := TTMSFNCUtils.GetJSONDoubleValue(o, 'latitude');\r\n ARequest.Coordinate.Longitude := TTMSFNCUtils.GetJSONDoubleValue(o, 'longitude');\r\n ARequest.IP := TTMSFNCUtils.GetJSONProp(o, 'ip');\r\n ARequest.IPType := TTMSFNCUtils.GetJSONProp(o, 'type');\r\n ARequest.Continent := TTMSFNCUtils.GetJSONProp(o, 'continent_name');\r\n ARequest.ContinentCode := TTMSFNCUtils.GetJSONProp(o, 'continent_code');\r\n ARequest.Country := TTMSFNCUtils.GetJSONProp(o, 'country_name');\r\n ARequest.CountryCode := TTMSFNCUtils.GetJSONProp(o, 'country_code');\r\n ARequest.Region := TTMSFNCUtils.GetJSONProp(o, 'region_name');\r\n ARequest.RegionCode := TTMSFNCUtils.GetJSONProp(o, 'region_code');\r\n ARequest.City := TTMSFNCUtils.GetJSONProp(o, 'city');\r\n ARequest.PostalCode := TTMSFNCUtils.GetJSONProp(o, 'zip');\r\n finally\r\n o.Free;\r\n end;\r\n end;\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\nend.\r\n\r\n","{********************************************************************}\r\n{ }\r\n{ written by TMS Software }\r\n{ copyright (c) 2020 }\r\n{ Email : info@tmssoftware.com }\r\n{ Web : http://www.tmssoftware.com }\r\n{ }\r\n{ The source code is given as is. The author is not responsible }\r\n{ for any possible damage done due to the use of this code. }\r\n{ The complete source code remains property of the author and may }\r\n{ not be distributed, published, given or sold in any form as such. }\r\n{ No parts of the source code can be included in any other component }\r\n{ or application without written authorization of the author. }\r\n{********************************************************************}\r\n\r\nunit WEBLib.TMSFNCLocation.Google;\r\n\r\n{$I WEBLib.TMSFNCDefines.inc}\r\n\r\n{$IFDEF WEBLIB}\r\n{$DEFINE LCLWEBLIB}\r\n{$ENDIF}\r\n{$IFDEF LCLLIB}\r\n{$DEFINE LCLWEBLIB}\r\n{$ENDIF}\r\n\r\ninterface\r\n\r\nprocedure RegisterGoogleLocationService;\r\nprocedure UnRegisterGoogleLocationService;\r\n\r\nimplementation\r\n\r\nuses\r\n Classes, Math, DateUtils, Types, SysUtils, WEBLib.TMSFNCLocation,\r\n WEBLib.TMSFNCUtils, WEBLib.TMSFNCTypes, WEBLib.TMSFNCMapsCommonTypes, WEBLib.TMSFNCCloudBase\r\n {$IFNDEF WEBLIB}\r\n {$IFNDEF LCLLIB}\r\n {$HINTS OFF}\r\n {$IF COMPILERVERSION > 26}\r\n ,JSON\r\n {$ELSE}\r\n ,DBXJSON\r\n {$IFEND}\r\n {$HINTS ON}\r\n {$ELSE}\r\n ,fpjson\r\n {$ENDIF}\r\n {$ENDIF}\r\n\r\n {$IFDEF WEBLIB}\r\n ,Contnrs, Web, WEBLIB.JSON\r\n {$ENDIF}\r\n {$IFNDEF LCLWEBLIB}\r\n ,Generics.Collections, Generics.Defaults\r\n {$HINTS OFF}\r\n {$IF COMPILERVERSION > 22}\r\n , UITypes\r\n {$IFEND}\r\n {$HINTS ON}\r\n {$ENDIF}\r\n {$IFDEF LCLLIB}\r\n ,fgl\r\n {$ENDIF}\r\n ;\r\n\r\ntype\r\n TTMSFNCLocationGoogleService = class;\r\n\r\n TTMSFNCLocationGoogleLocationFactoryService = class(TTMSFNCLocationFactoryService, ITMSFNCLocationServiceGoogle);\r\n\r\n TTMSFNCLocationGoogleService = class(TTMSFNCLocationGoogleLocationFactoryService)\r\n protected\r\n function DoCreateLocation: ITMSFNCCustomLocation; override;\r\n end;\r\n\r\ntype\r\n TTMSFNCLocationGoogleLocation = class;\r\n\r\n TTMSFNCLocationGoogleLocation = class(TTMSFNCCustomLocationInterfacedObject, ITMSFNCCustomLocation)\r\n protected\r\n function GetIdentifier: string;\r\n function IsValid: Boolean;\r\n function GetRequestMethod: TTMSFNCCloudBaseRequestMethod;\r\n function GetHost: string;\r\n function GetPath: string;\r\n function GetQuery: string; overload;\r\n function GetPostData: string;\r\n procedure Parse(ARequest: TTMSFNCLocationRequest; ARequestResult: string);\r\n procedure AddHeaders(AHeaders: TTMSFNCCloudBaseRequestHeaders);\r\n procedure DestroyLocation;\r\n public\r\n constructor Create;\r\n destructor Destroy; override;\r\n end;\r\n\r\nvar\r\n LocationService: ITMSFNCLocationServiceGoogle;\r\n\r\nprocedure RegisterGoogleLocationService;\r\nbegin\r\n if not TTMSFNCLocationPlatformServices.Current.SupportsPlatformService(ITMSFNCLocationServiceGoogle, IInterface(LocationService)) then\r\n begin\r\n LocationService := TTMSFNCLocationGoogleService.Create;\r\n TTMSFNCLocationPlatformServices.Current.AddPlatformService(ITMSFNCLocationServiceGoogle, LocationService);\r\n end;\r\nend;\r\n\r\nprocedure UnregisterGoogleLocationService;\r\nbegin\r\n TTMSFNCLocationPlatformServices.Current.RemovePlatformService(ITMSFNCLocationServiceGoogle);\r\nend;\r\n\r\n{ TTMSFNCLocationGoogleService }\r\n\r\nfunction TTMSFNCLocationGoogleService.DoCreateLocation: ITMSFNCCustomLocation;\r\nbegin\r\n Result := TTMSFNCLocationGoogleLocation.Create;\r\nend;\r\n\r\nprocedure TTMSFNCLocationGoogleLocation.AddHeaders(\r\n AHeaders: TTMSFNCCloudBaseRequestHeaders);\r\nbegin\r\n\r\nend;\r\n\r\nconstructor TTMSFNCLocationGoogleLocation.Create;\r\nbegin\r\n inherited;\r\nend;\r\n\r\ndestructor TTMSFNCLocationGoogleLocation.Destroy;\r\nbegin\r\n inherited;\r\nend;\r\n\r\nprocedure TTMSFNCLocationGoogleLocation.DestroyLocation;\r\nbegin\r\n LocationService.DestroyLocation(Self);\r\nend;\r\n\r\nfunction TTMSFNCLocationGoogleLocation.GetHost: string;\r\nbegin\r\n Result := 'https://www.googleapis.com';\r\nend;\r\n\r\nfunction TTMSFNCLocationGoogleLocation.GetIdentifier: string;\r\nbegin\r\n Result := 'Google';\r\nend;\r\n\r\nfunction TTMSFNCLocationGoogleLocation.GetPath: string;\r\nbegin\r\n Result := '/geolocation/v1/geolocate';\r\nend;\r\n\r\nfunction TTMSFNCLocationGoogleLocation.GetPostData: string;\r\nbegin\r\n Result := '';\r\nend;\r\n\r\nfunction TTMSFNCLocationGoogleLocation.GetQuery: string;\r\nbegin\r\n Result := 'key=' + LocationProperties.GetAPIKey;\r\nend;\r\n\r\nfunction TTMSFNCLocationGoogleLocation.GetRequestMethod: TTMSFNCCloudBaseRequestMethod;\r\nbegin\r\n Result := rmPost;\r\nend;\r\n\r\nfunction TTMSFNCLocationGoogleLocation.IsValid: Boolean;\r\nbegin\r\n Result := LocationProperties.GetAPIKey <> '';\r\nend;\r\n\r\nprocedure TTMSFNCLocationGoogleLocation.Parse(ARequest: TTMSFNCLocationRequest; ARequestResult: string);\r\nvar\r\n o: TJSONValue;\r\n b: TJSONObject;\r\nbegin\r\n if Assigned(LocationProperties) then\r\n begin\r\n if Assigned(ARequest) then\r\n begin\r\n if ARequestResult <> '' then\r\n begin\r\n o := TTMSFNCUtils.ParseJSON(ARequestResult);\r\n if Assigned(o) then\r\n begin\r\n try\r\n b := TTMSFNCUtils.GetJSONValue(o, 'location') as TJSONObject;\r\n if Assigned(b) then\r\n begin\r\n ARequest.Coordinate.Latitude := TTMSFNCUtils.GetJSONDoubleValue(b, 'lat');\r\n ARequest.Coordinate.Longitude := TTMSFNCUtils.GetJSONDoubleValue(b, 'lng');\r\n end;\r\n finally\r\n o.Free;\r\n end;\r\n end;\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\nend.\r\n\r\n","{********************************************************************}\r\n{ }\r\n{ written by TMS Software }\r\n{ copyright (c) 2020 - 2021 }\r\n{ Email : info@tmssoftware.com }\r\n{ Web : http://www.tmssoftware.com }\r\n{ }\r\n{ The source code is given as is. The author is not responsible }\r\n{ for any possible damage done due to the use of this code. }\r\n{ The complete source code remains property of the author and may }\r\n{ not be distributed, published, given or sold in any form as such. }\r\n{ No parts of the source code can be included in any other component }\r\n{ or application without written authorization of the author. }\r\n{********************************************************************}\r\n\r\nunit WEBLib.TMSFNCLocation;\r\n\r\n{$I WEBLib.TMSFNCDefines.inc}\r\n\r\n{$IFDEF WEBLIB}\r\n{$DEFINE LCLWEBLIB}\r\n{$ENDIF}\r\n{$IFDEF LCLLIB}\r\n{$DEFINE LCLWEBLIB}\r\n{$ENDIF}\r\n\r\n{$IFNDEF LCLLIB}\r\n{$HINTS OFF}\r\n{$IF COMPILERVERSION > 23}\r\n{$DEFINE UNREGISTER}\r\n{$IFEND}\r\n{$HINTS ON}\r\n{$ENDIF}\r\n{$IFDEF LCLLIB}\r\n{$DEFINE UNREGISTER}\r\n{$ENDIF}\r\n\r\ninterface\r\n\r\nuses\r\n Classes, Types, WEBLib.Forms\r\n {$IFNDEF LCLWEBLIB}\r\n ,Generics.Collections\r\n {$ENDIF}\r\n {$IFDEF LCLLIB}\r\n ,fgl\r\n {$ENDIF}\r\n {$IFDEF WEBLIB}\r\n ,web, Contnrs\r\n {$ENDIF}\r\n {$IFDEF CMNLIB}\r\n {$ENDIF}\r\n ,WEBLib.TMSFNCTypes\r\n ,WEBLib.TMSFNCMapsCommonTypes\r\n ,WEBLib.TMSFNCCloudBase;\r\n\r\nconst\r\n TTMSFNCLocationDocURL = TTMSFNCBaseDocURL + 'tmsfncmaps/components/ttmsfncmaps/#ttmsfnclocation';\r\n TTMSFNCLocationTipsURL = 'https://www.tmssoftware.com/site/tmsfncmaps.asp?s=faq';\r\n MAJ_VER = 1; // Major version nr.\r\n MIN_VER = 0; // Minor version nr.\r\n REL_VER = 2; // Release nr.\r\n BLD_VER = 0; // Build nr.\r\n\r\n //v1.0.0.0: First release\r\n //v1.0.1.0: Connection property added (IPStack only)\r\n //v1.0.2.0: RegionCode property added (IPStack only)\r\n\r\ntype\r\n TTMSFNCCustomLocation = class;\r\n TTMSFNCLocationRequests = class;\r\n TTMSFNCLocationRequest = class;\r\n\r\n ITMSFNCCustomLocationProperties = interface(IInterface)\r\n ['{360FCEAE-9777-47FB-ACCC-4DFCAC859E8C}']\r\n function GetAPIKey: string;\r\n end;\r\n\r\n ITMSFNCCustomLocationInstance = interface(IInterface)\r\n ['{2E68C9D2-AAE4-4D00-B243-BA7EC6BF1946}']\r\n procedure SetLocationProperties(const Value: ITMSFNCCustomLocationProperties);\r\n end;\r\n\r\n ITMSFNCCustomLocation = interface(IInterface)\r\n ['{AC454083-A583-4826-B598-DF46154FD159}']\r\n function GetIdentifier: string;\r\n function GetRequestMethod: TTMSFNCCloudBaseRequestMethod;\r\n function GetHost: string;\r\n function GetPath: string;\r\n function GetQuery: string;\r\n function GetPostData: string;\r\n procedure AddHeaders(AHeaders: TTMSFNCCloudBaseRequestHeaders);\r\n procedure Parse(ARequest: TTMSFNCLocationRequest; ARequestResult: string);\r\n function IsValid: Boolean;\r\n procedure DestroyLocation;\r\n end;\r\n\r\n ITMSFNCLocationService = interface(IInterface)\r\n ['{E18B6ADA-BA25-4D32-8427-9BA47CDE3B86}']\r\n function CreateLocation: ITMSFNCCustomLocation;\r\n procedure DestroyLocation(ALocation: ITMSFNCCustomLocation);\r\n end;\r\n\r\n ITMSFNCLocationServiceIPStack = interface(ITMSFNCLocationService)\r\n ['{212D0845-716A-4E06-A5EE-3DB50B1B639F}']\r\n end;\r\n\r\n ITMSFNCLocationServiceGoogle = interface(ITMSFNCLocationService)\r\n ['{79722F6E-7BE2-451F-9D22-8F3C3CB5F118}']\r\n end;\r\n\r\n TTMSFNCLocationService = (lsGoogle, lsIPStack);\r\n TTMSFNCLocationConnection = (lcHTTP, lcHTTPS);\r\n\r\n\r\n TTMSFNCLocationRequest = class(TCollectionItem)\r\n private\r\n FID: string;\r\n FOwner: TTMSFNCCustomLocation;\r\n FDataBoolean: Boolean;\r\n FDataString: String;\r\n FDataObject: TObject;\r\n FDataInteger: NativeInt;\r\n FDataPointer: Pointer;\r\n FCoordinate: TTMSFNCMapsCoordinate;\r\n FPostalCode: string;\r\n FCountry: string;\r\n FCountryCode: string;\r\n FRegion: string;\r\n FCity: string;\r\n FIP: string;\r\n FIPType: string;\r\n FContinentCode: string;\r\n FContinent: string;\r\n FRegionCode: string;\r\n procedure SetCoordinate(const Value: TTMSFNCMapsCoordinate);\r\n public\r\n constructor Create(ACollection: TCollection); override;\r\n procedure Assign(Source: TPersistent); override;\r\n destructor Destroy; override;\r\n property DataPointer: Pointer read FDataPointer write FDataPointer;\r\n property DataBoolean: Boolean read FDataBoolean write FDataBoolean;\r\n property DataObject: TObject read FDataObject write FDataObject;\r\n property DataString: String read FDataString write FDataString;\r\n property DataInteger: NativeInt read FDataInteger write FDataInteger;\r\n published\r\n property ID: string read FID;\r\n property Coordinate: TTMSFNCMapsCoordinate read FCoordinate write SetCoordinate;\r\n property City: string read FCity write FCity;\r\n property Country: string read FCountry write FCountry;\r\n property CountryCode: string read FCountryCode write FCountryCode;\r\n property Continent: string read FContinent write FContinent;\r\n property ContinentCode: string read FContinentCode write FContinentCode;\r\n property Region: string read FRegion write FRegion;\r\n property RegionCode: string read FRegionCode write FRegionCode;\r\n property PostalCode: string read FPostalCode write FPostalCode;\r\n property IP: string read FIP write FIP;\r\n property IPType: string read FIPType write FIPType;\r\n end;\r\n\r\n {$IFDEF WEBLIB}\r\n TTMSFNCLocationRequests = class(TTMSFNCOwnedCollection)\r\n {$ELSE}\r\n TTMSFNCLocationRequests = class({$IFDEF LCLLIB}specialize {$ENDIF}TTMSFNCOwnedCollection)\r\n {$ENDIF}\r\n private\r\n FOwner: TTMSFNCCustomLocation;\r\n function GetItem(Index: Integer): TTMSFNCLocationRequest;\r\n procedure SetItem(Index: Integer; const Value: TTMSFNCLocationRequest);\r\n protected\r\n function CreateItemClass: TCollectionItemClass; virtual;\r\n function GetOwner: TPersistent; override;\r\n public\r\n constructor Create(AOwner: TTMSFNCCustomLocation); virtual;\r\n property Items[Index: Integer]: TTMSFNCLocationRequest read GetItem write SetItem; default;\r\n function Add: TTMSFNCLocationRequest;\r\n function Insert(Index: Integer): TTMSFNCLocationRequest;\r\n end;\r\n\r\n { TTMSFNCCustomLocation }\r\n\r\n TTMSFNCLocationGetLocationCallBack = {$IFNDEF LCLLIB}reference to {$ENDIF}procedure(const ARequest: TTMSFNCLocationRequest; const ARequestResult: TTMSFNCCloudBaseRequestResult){$IFDEF LCLLIB} of object{$ENDIF};\r\n TTMSFNCLocationGetLocationEvent = procedure(Sender: TObject; const ARequest: TTMSFNCLocationRequest; const ARequestResult: TTMSFNCCloudBaseRequestResult) of object;\r\n\r\n TTMSFNCLocationGetLocationResultCallBack = {$IFNDEF LCLLIB}reference to {$ENDIF}procedure(const AResult: TTMSFNCLocationRequest){$IFDEF LCLLIB} of object{$ENDIF};\r\n TTMSFNCLocationGetLocationResultEvent = procedure(Sender: TObject; const AResult: TTMSFNCLocationRequest) of object;\r\n\r\n TTMSFNCLocationCallBackWrapper = class\r\n private\r\n FCallback: TTMSFNCLocationGetLocationCallBack;\r\n public\r\n constructor Create(ACallback: TTMSFNCLocationGetLocationCallBack);\r\n end;\r\n\r\n TTMSFNCLocationResultCallBackWrapper = class\r\n private\r\n FCallback: TTMSFNCLocationGetLocationResultCallBack;\r\n public\r\n constructor Create(ACallback: TTMSFNCLocationGetLocationResultCallBack);\r\n end;\r\n\r\n TTMSFNCCustomLocation = class(TTMSFNCCloudBase, ITMSFNCCustomLocationProperties)\r\n private\r\n FLocation: ITMSFNCCustomLocation;\r\n FLocationInstance: ITMSFNCCustomLocationInstance;\r\n FLocationProperties: ITMSFNCCustomLocationProperties;\r\n FService: TTMSFNCLocationService;\r\n FAPIKey: string;\r\n FLocationRequests: TTMSFNCLocationRequests;\r\n FOnGetLocation: TTMSFNCLocationGetLocationEvent;\r\n FOnGetLocationInternal: TTMSFNCLocationGetLocationEvent;\r\n FConnection: TTMSFNCLocationConnection;\r\n FOnGetLocationResultInternal: TTMSFNCLocationGetLocationResultEvent;\r\n FOnGetLocationResult: TTMSFNCLocationGetLocationResultEvent;\r\n procedure SetService(const Value: TTMSFNCLocationService);\r\n procedure SetAPIKey(const Value: string);\r\n procedure SetLocationRequests(const Value: TTMSFNCLocationRequests);\r\n procedure SetConnection(const Value: TTMSFNCLocationConnection);\r\n protected\r\n procedure InternalGetLocation(ACallback: TTMSFNCLocationGetLocationCallBack = nil; ACallback2: TTMSFNCLocationGetLocationResultCallBack = nil; AID: string = ''); overload; virtual;\r\n procedure DoRequestGetLocation(const ARequestResult: TTMSFNCCloudBaseRequestResult);\r\n procedure DoGetLocation(const ARequest: TTMSFNCLocationRequest; const ARequestResult: TTMSFNCCloudBaseRequestResult);\r\n property OnGetLocation: TTMSFNCLocationGetLocationEvent read FOnGetLocation write FOnGetLocation;\r\n property OnGetLocationInternal: TTMSFNCLocationGetLocationEvent read FOnGetLocationInternal write FOnGetLocationInternal;\r\n property OnGetLocationResult: TTMSFNCLocationGetLocationResultEvent read FOnGetLocationResult write FOnGetLocationResult;\r\n property OnGetLocationResultInternal: TTMSFNCLocationGetLocationResultEvent read FOnGetLocationResultInternal write FOnGetLocationResultInternal;\r\n\r\n procedure InitializeLocation; virtual;\r\n function GetInstance: NativeUInt; override;\r\n function GetLocationRequests: TTMSFNCLocationRequests;\r\n function LocationReady: Boolean;\r\n function GetAPIKey: string;\r\n function GetVersionNr: Integer;\r\n function GetDocURL: string; override;\r\n function GetTipsURL: string; override;\r\n function Location: ITMSFNCCustomLocation;\r\n function GetVersion: string; override;\r\n property Service: TTMSFNCLocationService read FService write SetService default lsGoogle;\r\n property APIKey: string read FAPIKey write SetAPIKey;\r\n property LocationRequests: TTMSFNCLocationRequests read FLocationRequests write SetLocationRequests;\r\n\r\n property LocationInstance: ITMSFNCCustomLocation read FLocation;\r\n property LocationProperties: ITMSFNCCustomLocationProperties read FLocationProperties;\r\n public\r\n procedure Assign(Source: TPersistent); override;\r\n constructor Create(AOwner: TComponent); override;\r\n destructor Destroy; override;\r\n procedure GetLocation(ACallback: TTMSFNCLocationGetLocationCallBack = nil; AID: string = ''); overload; virtual;\r\n procedure GetLocationResult(ACallback: TTMSFNCLocationGetLocationResultCallBack = nil; AID: string = ''); overload; virtual;\r\n published\r\n property Connection: TTMSFNCLocationConnection read FConnection write SetConnection;\r\n end;\r\n\r\n TTMSFNCCustomLocationInterfacedObject = class(TInterfacedObject, ITMSFNCCustomLocationInstance)\r\n private\r\n FLocationProperties: ITMSFNCCustomLocationProperties;\r\n function GetLocationProperties: ITMSFNCCustomLocationProperties;\r\n protected\r\n procedure SetLocationProperties(const Value: ITMSFNCCustomLocationProperties);\r\n public\r\n property LocationProperties: ITMSFNCCustomLocationProperties read GetLocationProperties;\r\n destructor Destroy; override;\r\n end;\r\n\r\n {$IFDEF WEBLIB}\r\n TTMSFNCLocationList = class(TList)\r\n private\r\n function GetItem(Index: Integer): ITMSFNCCustomLocation;\r\n procedure SetItem(Index: Integer; const Value: ITMSFNCCustomLocation);\r\n public\r\n property Items[Index: Integer]: ITMSFNCCustomLocation read GetItem write SetItem; default;\r\n end;\r\n {$ENDIF}\r\n {$IFNDEF WEBLIB}\r\n TTMSFNCLocationList = class(TList);\r\n {$ENDIF}\r\n\r\n TTMSFNCLocationFactoryService = class(TInterfacedObject, ITMSFNCLocationService)\r\n private\r\n FLocation: TTMSFNCLocationList;\r\n protected\r\n function DoCreateLocation: ITMSFNCCustomLocation; virtual; abstract;\r\n function CreateLocation: ITMSFNCCustomLocation;\r\n procedure DestroyLocation(ALocation: ITMSFNCCustomLocation);\r\n public\r\n constructor Create;\r\n destructor Destroy; override;\r\n end;\r\n\r\n {$IFNDEF LCLLIB}\r\n {$HINTS OFF}\r\n {$IF COMPILERVERSION > 22}\r\n {$IFNDEF LCLLIB}\r\n [ComponentPlatformsAttribute(TMSPlatformsWeb)]\r\n {$ENDIF}\r\n {$IFEND}\r\n {$HINTS ON}\r\n {$ENDIF}\r\n TTMSFNCLocation = class(TTMSFNCCustomLocation)\r\n protected\r\n procedure RegisterRuntimeClasses; override;\r\n public\r\n property LocationInstance;\r\n property LocationProperties;\r\n published\r\n property OnGetLocation;\r\n property OnGetLocationResult;\r\n property APIKey;\r\n property LocationRequests;\r\n property Service;\r\n property Version;\r\n end;\r\n\r\n TTMSFNCLocationPlatformServicesService = class\r\n private\r\n FInterface: IInterface;\r\n FGUID: string;\r\n public\r\n constructor Create(AGUID: string; AInterface: IInterface);\r\n property GUID: string read FGUID;\r\n property &Interface: IInterface read FInterface;\r\n end;\r\n\r\n {$IFDEF WEBLIB}\r\n TTMSFNCLocationPlatformServicesList = class(TObjectList)\r\n private\r\n function GetItem(Index: Integer): TTMSFNCLocationPlatformServicesService;\r\n procedure SetItem(Index: Integer; const Value: TTMSFNCLocationPlatformServicesService);\r\n public\r\n property Items[Index: Integer]: TTMSFNCLocationPlatformServicesService read GetItem write SetItem; default;\r\n {$ENDIF}\r\n {$IFNDEF WEBLIB}\r\n TTMSFNCLocationPlatformServicesList = class(TObjectList)\r\n {$ENDIF}\r\n private\r\n function GetValue(AGUID: string): IInterface;\r\n public\r\n function ContainsKey(AGUID: string): Boolean;\r\n procedure RemoveByGUID(AGUID: string);\r\n property Interfaces[AGUID: string]: IInterface read GetValue;\r\n end;\r\n\r\n TTMSFNCLocationPlatformServices = class\r\n private\r\n FServicesList: TTMSFNCLocationPlatformServicesList;\r\n class var FCurrent: TTMSFNCLocationPlatformServices;\r\n class var FCurrentReleased: Boolean;\r\n{$IFNDEF AUTOREFCOUNT}\r\n class procedure ReleaseCurrent;\r\n{$ENDIF}\r\n public\r\n constructor Create;\r\n destructor Destroy; override;\r\n procedure AddPlatformService(const AServiceGUID: TGUID; const AService: IInterface);\r\n procedure RemovePlatformService(const AServiceGUID: TGUID);\r\n function GetPlatformService(const AServiceGUID: TGUID): IInterface;\r\n function SupportsPlatformService(const AServiceGUID: TGUID): Boolean; overload;\r\n function SupportsPlatformService(const AServiceGUID: TGUID; var AService: IInterface): Boolean; overload;\r\n class function Current: TTMSFNCLocationPlatformServices;\r\n end;\r\n\r\nimplementation\r\n\r\nuses\r\n {$IFDEF MSWINDOWS}\r\n Windows, Registry,\r\n {$ENDIF}\r\n {%H-}Math,\r\n WEBLib.TMSFNCUtils,\r\n WEBLib.TMSFNCLocation.IPStack,\r\n WEBLib.TMSFNCLocation.Google,\r\n SysUtils\r\n {$IFDEF FMXLIB}\r\n ,FMX.Types\r\n {$ENDIF}\r\n ;\r\n\r\n{ TTMSFNCCustomLocation }\r\n\r\nfunction TTMSFNCCustomLocation.GetAPIKey: string;\r\nbegin\r\n Result := APIKey;\r\nend;\r\n\r\nfunction TTMSFNCCustomLocation.GetDocURL: string;\r\nbegin\r\n Result := TTMSFNCLocationDocURL;\r\nend;\r\n\r\nfunction TTMSFNCCustomLocation.GetInstance: NativeUInt;\r\nbegin\r\n Result := HInstance;\r\nend;\r\n\r\nfunction TTMSFNCCustomLocation.GetVersion: string;\r\nvar\r\n vn: Integer;\r\nbegin\r\n vn := GetVersionNr;\r\n Result := IntToStr(Hi(Hiword(vn)))+'.'+IntToStr(Lo(Hiword(vn)))+'.'+IntToStr(Hi(Loword(vn)))+'.'+IntToStr(Lo(Loword(vn)));\r\nend;\r\n\r\nfunction TTMSFNCCustomLocation.GetVersionNr: Integer;\r\nbegin\r\n Result := MakeLong(MakeWord(BLD_VER,REL_VER),MakeWord(MIN_VER,MAJ_VER));\r\nend;\r\n\r\nprocedure TTMSFNCCustomLocation.Assign(Source: TPersistent);\r\nbegin\r\n inherited;\r\n if (Source is TTMSFNCCustomLocation) then\r\n begin\r\n FService := (Source as TTMSFNCCustomLocation).Service;\r\n FAPIKey := (Source as TTMSFNCCustomLocation).APIKey;\r\n FLocationRequests.Assign((Source as TTMSFNCCustomLocation).LocationRequests);\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomLocation.GetLocationResult(\r\n ACallback: TTMSFNCLocationGetLocationResultCallBack; AID: string);\r\nbegin\r\n InternalGetLocation(nil, ACallback, AID);\r\nend;\r\n\r\nfunction TTMSFNCCustomLocation.GetLocationRequests: TTMSFNCLocationRequests;\r\nbegin\r\n Result := LocationRequests;\r\nend;\r\n\r\nfunction TTMSFNCCustomLocation.GetTipsURL: string;\r\nbegin\r\n Result := TTMSFNCLocationTipsURL;\r\nend;\r\n\r\nprocedure TTMSFNCCustomLocation.GetLocation(ACallback: TTMSFNCLocationGetLocationCallBack = nil; AID: string = '');\r\nbegin\r\n InternalGetLocation(ACallback, nil, AID);\r\nend;\r\n\r\nprocedure TTMSFNCCustomLocation.InternalGetLocation(ACallback: TTMSFNCLocationGetLocationCallBack = nil; ACallback2: TTMSFNCLocationGetLocationResultCallBack = nil; AID: string = '');\r\nbegin\r\n if not LocationReady then\r\n begin\r\n raise Exception.Create('Please set API key!');\r\n Exit;\r\n end;\r\n\r\n Request.Clear;\r\n Request.ClearHeaders;\r\n FLocation.AddHeaders(Request.Headers);\r\n Request.Name := 'GET LOCATION';\r\n Request.DataString := AID;\r\n\r\n if Assigned(ACallback) then\r\n Request.DataObject := TTMSFNCLocationCallBackWrapper.Create(ACallback)\r\n else if Assigned(ACallback2) then\r\n Request.DataObject := TTMSFNCLocationResultCallBackWrapper.Create(ACallback2);\r\n\r\n Request.Method := FLocation.GetRequestMethod;\r\n Request.Host := FLocation.GetHost;\r\n\r\n if (Service = lsIPStack) and (Connection = lcHTTP) then\r\n Request.Host := StringReplace(Request.Host, 'https://', 'http://', [rfIgnoreCase]);\r\n\r\n Request.Path := FLocation.GetPath;\r\n Request.Query := FLocation.GetQuery;\r\n Request.PostData := FLocation.GetPostData;\r\n ExecuteRequest({$IFDEF LCLWEBLIB}@{$ENDIF}DoRequestGetLocation);\r\nend;\r\n\r\nconstructor TTMSFNCCustomLocation.Create(AOwner: TComponent);\r\nbegin\r\n inherited;\r\n Supports(Self, ITMSFNCCustomLocationProperties, FLocationProperties);\r\n FLocationRequests := TTMSFNCLocationRequests.Create(Self);\r\n InitializeLocation;\r\nend;\r\n\r\nprocedure TTMSFNCCustomLocation.InitializeLocation;\r\nvar\r\n LocationServiceGoogleLocation: ITMSFNCLocationServiceGoogle;\r\n LocationServiceIPStackLocation: ITMSFNCLocationServiceIPStack;\r\nbegin\r\n if IsDestroying then\r\n Exit;\r\n\r\n if Assigned(FLocation) then\r\n FLocation.DestroyLocation;\r\n\r\n FLocation := nil;\r\n FLocationInstance := nil;\r\n\r\n case Service of\r\n lsGoogle:\r\n begin\r\n if TTMSFNCLocationPlatformServices.Current.SupportsPlatformService(ITMSFNCLocationServiceGoogle, IInterface(LocationServiceGoogleLocation)) then\r\n FLocation := LocationServiceGoogleLocation.CreateLocation;\r\n end;\r\n lsIPStack:\r\n begin\r\n if TTMSFNCLocationPlatformServices.Current.SupportsPlatformService(ITMSFNCLocationServiceIPStack, IInterface(LocationServiceIPStackLocation)) then\r\n FLocation := LocationServiceIPStackLocation.CreateLocation;\r\n end;\r\n end;\r\n\r\n if Assigned(FLocation) and Supports(FLocation, ITMSFNCCustomLocationInstance, FLocationInstance) then\r\n FLocationInstance.SetLocationProperties(FLocationProperties);\r\nend;\r\n\r\nfunction TTMSFNCCustomLocation.LocationReady: Boolean;\r\nbegin\r\n Result := Assigned(FLocation) and Assigned(FLocationInstance) and Assigned(FLocationProperties) and FLocation.IsValid;\r\nend;\r\n\r\nprocedure TTMSFNCCustomLocation.DoGetLocation(const ARequest: TTMSFNCLocationRequest;\r\n const ARequestResult: TTMSFNCCloudBaseRequestResult);\r\nbegin\r\n if Assigned(OnGetLocationInternal) then\r\n OnGetLocationInternal(Self, ARequest, ARequestResult);\r\n if Assigned(OnGetLocation) then\r\n OnGetLocation(Self, ARequest, ARequestResult);\r\n\r\n if Assigned(OnGetLocationResultInternal) then\r\n OnGetLocationResultInternal(Self, ARequest);\r\n if Assigned(OnGetLocationResult) then\r\n OnGetLocationResult(Self, ARequest);\r\nend;\r\n\r\nprocedure TTMSFNCCustomLocation.DoRequestGetLocation(\r\n const ARequestResult: TTMSFNCCloudBaseRequestResult);\r\nvar\r\n req: TTMSFNCLocationRequest;\r\n obj: TTMSFNCLocationCallBackWrapper;\r\n obj2: TTMSFNCLocationResultCallBackWrapper;\r\nbegin\r\n if not LocationReady then\r\n Exit;\r\n\r\n if ARequestResult.Success then\r\n begin\r\n req := LocationRequests.Add;\r\n req.FID := ARequestResult.DataString;\r\n FLocation.Parse(req, ARequestResult.ResultString);\r\n DoGetLocation(req, ARequestResult);\r\n if Assigned(ARequestResult.DataObject) then\r\n begin\r\n if ARequestResult.DataObject is TTMSFNCLocationCallBackWrapper then\r\n begin\r\n obj := TTMSFNCLocationCallBackWrapper(ARequestResult.DataObject);\r\n obj.FCallback(req, ARequestResult);\r\n obj.Free;\r\n end\r\n else if ARequestResult.DataObject is TTMSFNCLocationResultCallBackWrapper then\r\n begin\r\n obj2 := TTMSFNCLocationResultCallBackWrapper(ARequestResult.DataObject);\r\n obj2.FCallback(req);\r\n obj2.Free;\r\n end\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCCustomLocation.Location: ITMSFNCCustomLocation;\r\nbegin\r\n Result := FLocation;\r\nend;\r\n\r\nprocedure TTMSFNCCustomLocation.SetAPIKey(const Value: string);\r\nbegin\r\n if FAPIKey <> Value then\r\n FAPIKey := Value;\r\nend;\r\n\r\nprocedure TTMSFNCCustomLocation.SetConnection(\r\n const Value: TTMSFNCLocationConnection);\r\nbegin\r\n FConnection := Value;\r\nend;\r\n\r\nprocedure TTMSFNCCustomLocation.SetService(const Value: TTMSFNCLocationService);\r\nbegin\r\n if FService <> Value then\r\n begin\r\n FService := Value;\r\n InitializeLocation;\r\n end;\r\nend;\r\n\r\ndestructor TTMSFNCCustomLocation.Destroy;\r\nbegin\r\n FLocationRequests.Free;\r\n\r\n if Assigned(FLocation) then\r\n FLocation.DestroyLocation;\r\n\r\n FLocation := nil;\r\n FLocationInstance := nil;\r\n FLocationProperties := nil;\r\n FConnection := lcHTTP;\r\n inherited;\r\nend;\r\n\r\nprocedure TTMSFNCCustomLocation.SetLocationRequests(const Value: TTMSFNCLocationRequests);\r\nbegin\r\n FLocationRequests.Assign(Value);\r\nend;\r\n\r\n{ TTMSFNCLocationFactoryService }\r\n\r\nconstructor TTMSFNCLocationFactoryService.Create;\r\nbegin\r\n inherited Create;\r\n FLocation := TTMSFNCLocationList.Create;\r\nend;\r\n\r\nfunction TTMSFNCLocationFactoryService.CreateLocation: ITMSFNCCustomLocation;\r\nbegin\r\n Result := DoCreateLocation;\r\n FLocation.Add(Result);\r\nend;\r\n\r\ndestructor TTMSFNCLocationFactoryService.Destroy;\r\nbegin\r\n FreeAndNil(FLocation);\r\n inherited Destroy;\r\nend;\r\n\r\nprocedure TTMSFNCLocationFactoryService.DestroyLocation(ALocation: ITMSFNCCustomLocation);\r\nbegin\r\n FLocation.Remove(ALocation);\r\nend;\r\n\r\n{ TTMSFNCLocationPlatformServices }\r\n\r\nprocedure TTMSFNCLocationPlatformServices.AddPlatformService(const AServiceGUID: TGUID; const AService: IInterface);\r\nvar\r\n LService: IInterface;\r\nbegin\r\n if not FServicesList.ContainsKey(GUIDToString(AServiceGUID)) then\r\n begin\r\n if Supports(AService, AServiceGUID, LService) then\r\n FServicesList.Add(TTMSFNCLocationPlatformServicesService.Create(GUIDToString(AServiceGUID), AService));\r\n end;\r\nend;\r\n\r\nconstructor TTMSFNCLocationPlatformServices.Create;\r\nbegin\r\n inherited;\r\n FServicesList := TTMSFNCLocationPlatformServicesList.Create;\r\nend;\r\n\r\ndestructor TTMSFNCLocationPlatformServices.Destroy;\r\nbegin\r\n FreeAndNil(FServicesList);\r\n inherited;\r\nend;\r\n\r\n{$IFNDEF AUTOREFCOUNT}\r\nclass procedure TTMSFNCLocationPlatformServices.ReleaseCurrent;\r\nbegin\r\n FreeAndNil(FCurrent);\r\n FCurrentReleased := True;\r\nend;\r\n{$ENDIF}\r\n\r\nclass function TTMSFNCLocationPlatformServices.Current: TTMSFNCLocationPlatformServices;\r\nbegin\r\n if (FCurrent = nil) and not FCurrentReleased then\r\n FCurrent := TTMSFNCLocationPlatformServices.Create;\r\n Result := FCurrent;\r\nend;\r\n\r\nfunction TTMSFNCLocationPlatformServices.GetPlatformService(const AServiceGUID: TGUID): IInterface;\r\nvar\r\n k: IInterface;\r\nbegin\r\n k := FServicesList.Interfaces[GUIDToString(AServiceGUID)];\r\n Supports(k, AServiceGUID, Result);\r\nend;\r\n\r\nprocedure TTMSFNCLocationPlatformServices.RemovePlatformService(const AServiceGUID: TGUID);\r\nbegin\r\n FServicesList.RemoveByGUID(GUIDToString(AServiceGUID));\r\nend;\r\n\r\nfunction TTMSFNCLocationPlatformServices.SupportsPlatformService(const AServiceGUID: TGUID;\r\n var AService: IInterface): Boolean;\r\nbegin\r\n if FServicesList.ContainsKey(GUIDToString(AServiceGUID)) then\r\n Result := Supports(FServicesList.Interfaces[GUIDToString(AServiceGUID)], AServiceGUID, AService)\r\n else\r\n begin\r\n AService := nil;\r\n Result := False;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCLocationPlatformServices.SupportsPlatformService(const AServiceGUID: TGUID): Boolean;\r\nbegin\r\n Result := FServicesList.ContainsKey(GUIDToString(AServiceGUID));\r\nend;\r\n\r\n{ TTMSFNCLocationPlatformServicesService }\r\n\r\nconstructor TTMSFNCLocationPlatformServicesService.Create(AGUID: string;\r\n AInterface: IInterface);\r\nbegin\r\n FGUID := AGUID;\r\n FInterface := AInterface;\r\nend;\r\n\r\n{ TTMSFNCLocationPlatformServicesList }\r\n\r\nfunction TTMSFNCLocationPlatformServicesList.ContainsKey(AGUID: string): Boolean;\r\nvar\r\n I: Integer;\r\nbegin\r\n Result := False;\r\n for I := 0 to Count - 1 do\r\n begin\r\n if Items[I].GUID = AGUID then\r\n begin\r\n Result := True;\r\n Break;\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCLocationPlatformServicesList.GetValue(AGUID: string): IInterface;\r\nvar\r\n I: Integer;\r\nbegin\r\n Result := nil;\r\n for I := 0 to Count - 1 do\r\n begin\r\n if Items[I].GUID = AGUID then\r\n begin\r\n Result := Items[I].&Interface;\r\n Break;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCLocationPlatformServicesList.RemoveByGUID(AGUID: string);\r\nvar\r\n I: Integer;\r\nbegin\r\n for I := Count - 1 downto 0 do\r\n begin\r\n if Items[I].GUID = AGUID then\r\n begin\r\n Remove(Items[I]);\r\n Break;\r\n end;\r\n end;\r\nend;\r\n\r\n{$IFDEF WEBLIB}\r\nfunction TTMSFNCLocationPlatformServicesList.GetItem(Index: Integer): TTMSFNCLocationPlatformServicesService;\r\nbegin\r\n Result := TTMSFNCLocationPlatformServicesService(inherited Items[Index]);\r\nend;\r\n\r\nprocedure TTMSFNCLocationPlatformServicesList.SetItem(Index: Integer; const Value: TTMSFNCLocationPlatformServicesService);\r\nbegin\r\n inherited Items[Index] := Value;\r\nend;\r\n\r\nfunction TTMSFNCLocationList.GetItem(Index: Integer): ITMSFNCCustomLocation;\r\nbegin\r\n Result := ITMSFNCCustomLocation(inherited Items[Index]);\r\nend;\r\n\r\nprocedure TTMSFNCLocationList.SetItem(Index: Integer; const Value: ITMSFNCCustomLocation);\r\nbegin\r\n inherited Items[Index] := Value;\r\nend;\r\n{$ENDIF}\r\n\r\n{ TTMSFNCCustomLocationInterfacedObject }\r\n\r\ndestructor TTMSFNCCustomLocationInterfacedObject.Destroy;\r\nbegin\r\n FLocationProperties := nil;\r\n inherited;\r\nend;\r\n\r\nfunction TTMSFNCCustomLocationInterfacedObject.GetLocationProperties: ITMSFNCCustomLocationProperties;\r\nbegin\r\n Result := FLocationProperties;\r\nend;\r\n\r\nprocedure TTMSFNCCustomLocationInterfacedObject.SetLocationProperties(\r\n const Value: ITMSFNCCustomLocationProperties);\r\nbegin\r\n FLocationProperties := Value;\r\nend;\r\n\r\n{ TTMSFNCLocationRequest }\r\n\r\nprocedure TTMSFNCLocationRequest.Assign(Source: TPersistent);\r\nbegin\r\n if Source is TTMSFNCLocationRequest then\r\n begin\r\n FCity := TTMSFNCLocationRequest(Source).City;\r\n FCountry := TTMSFNCLocationRequest(Source).Country;\r\n FCountryCode := TTMSFNCLocationRequest(Source).CountryCode;\r\n FContinent := TTMSFNCLocationRequest(Source).Continent;\r\n FContinentCode := TTMSFNCLocationRequest(Source).ContinentCode;\r\n FRegion := TTMSFNCLocationRequest(Source).Region;\r\n FRegionCode := TTMSFNCLocationRequest(Source).RegionCode;\r\n FPostalCode := TTMSFNCLocationRequest(Source).PostalCode;\r\n FIP := TTMSFNCLocationRequest(Source).IP;\r\n FIPType := TTMSFNCLocationRequest(Source).IPType;\r\n end;\r\nend;\r\n\r\nconstructor TTMSFNCLocationRequest.Create(ACollection: TCollection);\r\nbegin\r\n inherited;\r\n if Assigned(ACollection) then\r\n FOwner := (Collection as TTMSFNCLocationRequests).FOwner;\r\n\r\n FCoordinate := TTMSFNCMapsCoordinate.Create;\r\n FCity := '';\r\n FRegion := '';\r\n FRegionCode := '';\r\n FCountry := '';\r\n FCountryCode := '';\r\n FContinent := '';\r\n FContinentCode := '';\r\n FPostalCode := '';\r\n FIP := '';\r\n FIPType := '';\r\nend;\r\n\r\ndestructor TTMSFNCLocationRequest.Destroy;\r\nbegin\r\n FCoordinate.Free;\r\n inherited;\r\nend;\r\n\r\nprocedure TTMSFNCLocationRequest.SetCoordinate(\r\n const Value: TTMSFNCMapsCoordinate);\r\nbegin\r\n FCoordinate.Assign(Value);\r\nend;\r\n\r\n{ TTMSFNCLocationRequests }\r\n\r\nfunction TTMSFNCLocationRequests.Add: TTMSFNCLocationRequest;\r\nbegin\r\n Result := TTMSFNCLocationRequest(inherited Add);\r\nend;\r\n\r\nconstructor TTMSFNCLocationRequests.Create(AOwner: TTMSFNCCustomLocation);\r\nbegin\r\n inherited Create(AOwner, CreateItemClass);\r\n FOwner := AOwner;\r\nend;\r\n\r\nfunction TTMSFNCLocationRequests.CreateItemClass: TCollectionItemClass;\r\nbegin\r\n Result := TTMSFNCLocationRequest;\r\nend;\r\n\r\nfunction TTMSFNCLocationRequests.GetItem(\r\n Index: Integer): TTMSFNCLocationRequest;\r\nbegin\r\n Result := TTMSFNCLocationRequest(inherited Items[Index]);\r\nend;\r\n\r\nfunction TTMSFNCLocationRequests.GetOwner: TPersistent;\r\nbegin\r\n Result := FOwner;\r\nend;\r\n\r\nfunction TTMSFNCLocationRequests.Insert(\r\n Index: Integer): TTMSFNCLocationRequest;\r\nbegin\r\n Result := TTMSFNCLocationRequest(inherited Insert(Index));\r\nend;\r\n\r\nprocedure TTMSFNCLocationRequests.SetItem(Index: Integer;\r\n const Value: TTMSFNCLocationRequest);\r\nbegin\r\n inherited Items[Index] := Value;\r\nend;\r\n\r\n\r\n{ TTMSFNCLocationCallBackWrapper }\r\n\r\nconstructor TTMSFNCLocationCallBackWrapper.Create(\r\n ACallback: TTMSFNCLocationGetLocationCallBack);\r\nbegin\r\n FCallback := ACallback;\r\nend;\r\n\r\n{ TTMSFNCLocation }\r\n\r\nprocedure TTMSFNCLocation.RegisterRuntimeClasses;\r\nbegin\r\n inherited;\r\n RegisterClasses([TTMSFNCLocation]);\r\nend;\r\n\r\n{ TTMSFNCLocationResultCallBackWrapper }\r\n\r\nconstructor TTMSFNCLocationResultCallBackWrapper.Create(\r\n ACallback: TTMSFNCLocationGetLocationResultCallBack);\r\nbegin\r\n FCallback := ACallback;\r\nend;\r\n\r\ninitialization\r\nbegin\r\n TTMSFNCLocationPlatformServices.FCurrentReleased := False;\r\n RegisterGoogleLocationService;\r\n RegisterIPStackLocationService;\r\nend;\r\n\r\n{$IFNDEF WEBLIB}\r\nfinalization\r\nbegin\r\n UnRegisterGoogleLocationService;\r\n UnRegisterIPStackLocationService;\r\n {$IFNDEF AUTOREFCOUNT}\r\n TTMSFNCLocationPlatformServices.ReleaseCurrent;\r\n {$ENDIF}\r\nend;\r\n{$ENDIF}\r\n\r\nend.\r\n","{********************************************************************}\r\n{ }\r\n{ written by TMS Software }\r\n{ copyright (c) 2021 - 2023 }\r\n{ Email : info@tmssoftware.com }\r\n{ Web : https://www.tmssoftware.com }\r\n{ }\r\n{ The source code is given as is. The author is not responsible }\r\n{ for any possible damage done due to the use of this code. }\r\n{ The complete source code remains property of the author and may }\r\n{ not be distributed, published, given or sold in any form as such. }\r\n{ No parts of the source code can be included in any other component }\r\n{ or application without written authorization of the author. }\r\n{********************************************************************}\r\n\r\nunit WEBLib.TMSFNCRouteCalculator;\r\n\r\n{$I WEBLib.TMSFNCDefines.inc}\r\n\r\n{$IFDEF WEBLIB}\r\n{$DEFINE LCLWEBLIB}\r\n{$ENDIF}\r\n{$IFDEF LCLLIB}\r\n{$DEFINE LCLWEBLIB}\r\n{$ENDIF}\r\n\r\n{$IFNDEF LCLLIB}\r\n{$HINTS OFF}\r\n{$IF COMPILERVERSION > 23}\r\n{$DEFINE UNREGISTER}\r\n{$IFEND}\r\n{$HINTS ON}\r\n{$ENDIF}\r\n{$IFDEF LCLLIB}\r\n{$DEFINE UNREGISTER}\r\n{$ENDIF}\r\n\r\n\r\n{$IFNDEF LCLLIB}\r\n{$IFNDEF WEBLIB}\r\n{$IFNDEF UNIX}\r\n{$HINTS OFF}\r\n{$IF COMPILERVERSION > 26}\r\n{$DEFINE SENSORSUPPORT}\r\n{$IFEND}\r\n{$HINTS ON}\r\n{$ENDIF}\r\n{$ENDIF}\r\n{$ENDIF}\r\n\r\ninterface\r\n\r\nuses\r\n Classes, Types, WEBLib.Forms\r\n\r\n {$IFNDEF LCLWEBLIB}\r\n , XmlIntf, XMLDom, XMLDoc, Variants\r\n {$ENDIF}\r\n {$IFDEF LCLLIB}\r\n ,fgl, XMLRead, XMLWrite, DOM\r\n {$ENDIF}\r\n {$IFDEF WEBLIB}\r\n ,web, Contnrs\r\n {$ENDIF}\r\n {$IFDEF CMNLIB}\r\n {$ENDIF}\r\n ,WEBLib.TMSFNCCustomComponent\r\n ,WEBLib.TMSFNCTypes\r\n ,WEBLib.TMSFNCMapsCommonTypes\r\n ,WEBLib.TMSFNCCloudBase\r\n ,WEBLib.TMSFNCGeocoding\r\n ,WEBLib.TMSFNCDirections\r\n ,WEBLib.TMSFNCLocation\r\n ,WEBLib.TMSFNCUndo\r\n ,WEBLib.TMSFNCGraphicsTypes\r\n {$IFDEF SENSORSUPPORT}\r\n , System.Sensors\r\n , System.Sensors.Components\r\n {$ENDIF}\r\n ;\r\n\r\nconst\r\n TTMSFNCRouteCalculatorDocURL = TTMSFNCBaseDocURL + 'tmsfncmaps/components/ttmsfncmaps/#ttmsfncroutecalculator';\r\n TTMSFNCRouteCalculatorTipsURL = 'https://www.tmssoftware.com/site/tmsfncmaps.asp?s=faq';\r\n\r\n MAJ_VER = 1; // Major version nr.\r\n MIN_VER = 1; // Minor version nr.\r\n REL_VER = 0; // Release nr.\r\n BLD_VER = 0; // Build nr.\r\n\r\n //v1.0.0.0: First release\r\n //v1.0.0.1: Fixed: Issue with Route Instructions after updating segment\r\n // : Fixed: Issue with Route ID\r\n //v1.0.1.0: New: Support for OpenRouteService added\r\n //v1.0.2.0: New: Support for GeoApify added\r\n //v1.0.3.0: New: Options.Locale & Options.LocaleMode added\r\n //v1.1.0.0: New: SaveToGPXFile, SaveToGPXStream, SaveToGPXText added\r\n // : New: Google: Segment StartAddress and EndAddress value\r\n\r\n DEFAULTSTARTMARKER = 'data:image/png;base64,'\r\n + 'iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADdYAAA3WAZBveZwAAAcrSURBVGhDzZldbBRVFMfPndmPlra0paVABdr'\r\n + 'S0i8aQoIxGgli/IoPSGgi+oJUE21abEx8kvBACQ9GHjQGhRRFhZgQ8YnEFzXRCJgoNKJpgXYF20Ip9osSoLTd3ZnrOXfu7M7uzLT7VeqPTvaeszvnnv+9Z+6dGRhkglOn1PKRdY8CY1vweAyArWXAH+'\r\n + 'HAculrbN/H9k0A/jd+/zto2i/9JZc6YccOTZyfBmkJWNPRvZrr3hbgfBdGWiHdicHhFmf8uKp7Dl/bvfaG9CZNSgKqO3qKgxrfj803GWNew5sanPMQMOVoVljb19NWPy7dCZO0gIqOnpe5xg9j4sXSF'\r\n + 'YEpXlA9flAUH7Y9WC0YntMf/tPDoOtB0MIz2A7JM6KgkDEGrLWvtfZb6UqIhAU8te9nz/VlKz7EM9qkS8CYAqo3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JEhfUCUfUrT+pjtyiOX/1mD3KwMepHwIdYq/0cDHgG5hpyIgJVdForKjwP5dFzHulqvvp'\r\n + 'LI2iIUAa8f6gr7Sykf4h8/ZERIXaVdFoLKpUHFD25LTHw6htffSjUxKEo5Ef/mYkncDqGyrdOOlXThpW/crj3BSMIhVAR8COWlD/FaZ10qkEbZR3ZGh84YwShsWoD1k+nOrSJXwlNGz9WTSE/Vk+nja'\r\n + 'GNH6uOgB+ro9PG0caPdRkQnk4bSxs/1kUhP+rTiQ3aWNr4sa4I+FGXTreANn5smAF16XQLaOPHhlHIj2o6bSxt/NiwCPgRpNPG08aPWxIBxs5nrsaslubj+AL7mJXfSNqUQfR/fzph4tKG32YAAAAAS'\r\n + 'UVORK5CYII=';\r\n\r\ntype\r\n TTMSFNCCustomRouteCalculator = class;\r\n TTMSFNCRouteCalculatorRoute = class;\r\n TTMSFNCRouteCalculatorSegments = class;\r\n TTMSFNCRouteCalculatorAlternativeSegments = class;\r\n TTMSFNCRouteCalculatorSegment = class;\r\n TTMSFNCRouteCalculatorAlternativeSegment = class;\r\n\r\n TTMSFNCRouteCalculatorService = (csAzure, csBing, csGoogle, csHere, csMapBox, csOpenRouteService, csGeoApify);\r\n TTMSFNCRouteCalculatorLocationMode = (lmDevice, lmService);\r\n\r\n TTMSFNCRouteCalculatorPolylineOptions = class(TPersistent)\r\n private\r\n FWayPointMarker: string;\r\n FStrokeWidth: Integer;\r\n FStrokeColor: TTMSFNCGraphicsColor;\r\n FEndMarker: string;\r\n FStrokeOpacity: Single;\r\n FStartMarker: string;\r\n FAddWayPointMarker: string;\r\n FSelectedStrokeColor: TTMSFNCGraphicsColor;\r\n FSelectedWayPointMarker: string;\r\n function IsStrokeOpacityStored: Boolean;\r\n procedure SetStrokeOpacity(const Value: Single);\r\n public\r\n constructor Create;\r\n procedure Assign(Source: TPersistent); override;\r\n destructor Destroy; override;\r\n published\r\n property StartMarker: string read FStartMarker write FStartMarker;\r\n property EndMarker: string read FEndMarker write FEndMarker;\r\n property WayPointMarker: string read FWayPointMarker write FWayPointMarker;\r\n property AddWayPointMarker: string read FAddWayPointMarker write FAddWayPointMarker;\r\n property SelectedWayPointMarker: string read FSelectedWayPointMarker write FSelectedWayPointMarker;\r\n property StrokeColor: TTMSFNCGraphicsColor read FStrokeColor write FStrokeColor default gcBlue;\r\n property StrokeWidth: Integer read FStrokeWidth write FStrokeWidth default 5;\r\n property StrokeOpacity: Single read FStrokeOpacity write SetStrokeOpacity stored IsStrokeOpacityStored nodefault;\r\n property SelectedStrokeColor: TTMSFNCGraphicsColor read FSelectedStrokeColor write FSelectedStrokeColor default gcRed;\r\n end;\r\n\r\n TTMSFNCRouteCalculatorHistoryManager = class(TTMSFNCUndoManager);\r\n\r\n TTMSFNCRouteCalculatorOptions = class(TPersistent)\r\n private\r\n FIncludeAlternativeRoutes: Boolean;\r\n FTravelMode: TTMSFNCDirectionsTravelMode;\r\n FAvoidTolls: Boolean;\r\n FPolyline: TTMSFNCRouteCalculatorPolylineOptions;\r\n FHistoryEnabled: Boolean;\r\n FLocale: string;\r\n FlocaleMode: TTMSFNCMapsLocaleMode;\r\n procedure SetPolyline(const Value: TTMSFNCRouteCalculatorPolylineOptions);\r\n public\r\n constructor Create;\r\n procedure Assign(Source: TPersistent); override;\r\n destructor Destroy; override;\r\n published\r\n property AvoidTolls: Boolean read FAvoidTolls write FAvoidTolls default False;\r\n property IncludeAlternativeRoutes: Boolean read FIncludeAlternativeRoutes write FIncludeAlternativeRoutes default False;\r\n property TravelMode: TTMSFNCDirectionsTravelMode read FTravelMode write FTravelMode default tmDriving;\r\n property Polyline: TTMSFNCRouteCalculatorPolylineOptions read FPolyline write SetPolyline;\r\n property HistoryEnabled: Boolean read FHistoryEnabled write FHistoryEnabled default False;\r\n property Locale: string read FLocale write FLocale;\r\n property LocaleMode: TTMSFNCMapsLocaleMode read FlocaleMode write FLocaleMode default mlmDefault;\r\n end;\r\n\r\n {$IFDEF WEBLIB}\r\n TTMSFNCRouteCalculatorDirectionsItems = class(TTMSFNCOwnedCollection)\r\n {$ELSE}\r\n TTMSFNCRouteCalculatorDirectionsItems = class({$IFDEF LCLLIB}specialize {$ENDIF}TTMSFNCOwnedCollection)\r\n {$ENDIF}\r\n private\r\n FOwner: TTMSFNCRouteCalculatorSegment;\r\n function GetItem(Index: Integer): TTMSFNCDirectionsItem;\r\n procedure SetItem(Index: Integer; const Value: TTMSFNCDirectionsItem);\r\n protected\r\n function CreateItemClass: TCollectionItemClass; virtual;\r\n function GetOwner: TPersistent; override;\r\n public\r\n constructor Create(AOwner: TTMSFNCRouteCalculatorSegment); virtual;\r\n property Items[Index: Integer]: TTMSFNCDirectionsItem read GetItem write SetItem; default;\r\n function Add: TTMSFNCDirectionsItem;\r\n function Insert(Index: Integer): TTMSFNCDirectionsItem;\r\n end;\r\n\r\n TTMSFNCRouteCalculatorInfoMode = (cimDefault, cimUpdateDirections, cimAddDirections);\r\n\r\n TTMSFNCRouteCalculatorInfo = class\r\n private\r\n FID: string;\r\n FStartAddress: string;\r\n FEndAddress: string;\r\n FStartFound: Boolean;\r\n FEndFound: Boolean;\r\n FStartGeocoded: Boolean;\r\n FEndGeocoded: Boolean;\r\n FStartCoordinate: TTMSFNCMapsCoordinateRec;\r\n FEndCoordinate: TTMSFNCMapsCoordinateRec;\r\n FCallBack: Pointer;\r\n FMode: TTMSFNCRouteCalculatorInfoMode;\r\n FWayPoints: TTMSFNCMapsCoordinateRecArray;\r\n FUpdateRoute: TTMSFNCRouteCalculatorRoute;\r\n FUpdateSegments: array of TTMSFNCRouteCalculatorSegment;\r\n public\r\n constructor Create;\r\n destructor Destroy; override;\r\n end;\r\n\r\n TTMSFNCRouteCalculatorAlternativeSegment = class(TCollectionItem)\r\n private\r\n FOwner: TTMSFNCRouteCalculatorAlternativeSegments;\r\n FDataPointer: Pointer;\r\n FDataBoolean: Boolean;\r\n FDataString: String;\r\n FDataObject: TObject;\r\n FDataInteger: NativeInt;\r\n FStartCoordinate: TTMSFNCMapsCoordinate;\r\n FEndCoordinate: TTMSFNCMapsCoordinate;\r\n FCoordinates: TTMSFNCMapsCoordinates;\r\n FDistance: Double;\r\n FDuration: Integer;\r\n function GetPolyline: TTMSFNCMapsCoordinateRecArray;\r\n procedure SetCoordinates(const Value: TTMSFNCMapsCoordinates);\r\n function GetSegment: TTMSFNCRouteCalculatorSegment;\r\n public\r\n constructor Create(ACollection: TCollection); override;\r\n procedure Assign(Source: TPersistent); override;\r\n destructor Destroy; override;\r\n property DataPointer: Pointer read FDataPointer write FDataPointer;\r\n property DataBoolean: Boolean read FDataBoolean write FDataBoolean;\r\n property DataObject: TObject read FDataObject write FDataObject;\r\n property DataString: String read FDataString write FDataString;\r\n property DataInteger: NativeInt read FDataInteger write FDataInteger;\r\n property Polyline: TTMSFNCMapsCoordinateRecArray read GetPolyline;\r\n property Segment: TTMSFNCRouteCalculatorSegment read GetSegment;\r\n published\r\n property Coordinates: TTMSFNCMapsCoordinates read FCoordinates write SetCoordinates;\r\n property Distance: Double read FDistance write FDistance;\r\n property Duration: Integer read FDuration write FDuration;\r\n\r\n property StartCoordinate: TTMSFNCMapsCoordinate read FStartCoordinate write FStartCoordinate;\r\n property EndCoordinate: TTMSFNCMapsCoordinate read FEndCoordinate write FEndCoordinate;\r\n end;\r\n\r\n {$IFDEF WEBLIB}\r\n TTMSFNCRouteCalculatorAlternativeSegments = class(TTMSFNCOwnedCollection)\r\n {$ELSE}\r\n TTMSFNCRouteCalculatorAlternativeSegments = class({$IFDEF LCLLIB}specialize {$ENDIF}TTMSFNCOwnedCollection)\r\n {$ENDIF}\r\n private\r\n FOwner: TTMSFNCRouteCalculatorSegment;\r\n function GetItem(Index: Integer): TTMSFNCRouteCalculatorAlternativeSegment;\r\n procedure SetItem(Index: Integer; const Value: TTMSFNCRouteCalculatorAlternativeSegment);\r\n function GetSegment: TTMSFNCRouteCalculatorSegment;\r\n protected\r\n function CreateItemClass: TCollectionItemClass; virtual;\r\n function GetOwner: TPersistent; override;\r\n public\r\n constructor Create(AOwner: TTMSFNCRouteCalculatorSegment); virtual;\r\n property Items[Index: Integer]: TTMSFNCRouteCalculatorAlternativeSegment read GetItem write SetItem; default;\r\n function Add: TTMSFNCRouteCalculatorAlternativeSegment;\r\n function Insert(Index: Integer): TTMSFNCRouteCalculatorAlternativeSegment;\r\n property Segment: TTMSFNCRouteCalculatorSegment read GetSegment;\r\n end;\r\n\r\n\r\n TTMSFNCRouteCalculatorSegment = class(TCollectionItem)\r\n private\r\n FOwner: TTMSFNCRouteCalculatorSegments;\r\n FDataPointer: Pointer;\r\n FDataBoolean: Boolean;\r\n FDataString: String;\r\n FDataObject: TObject;\r\n FDataInteger: NativeInt;\r\n FID: string;\r\n FStartAddress: string;\r\n FEndAddress: string;\r\n FStartCoordinate: TTMSFNCMapsCoordinate;\r\n FEndCoordinate: TTMSFNCMapsCoordinate;\r\n FCoordinates: TTMSFNCMapsCoordinates;\r\n FDistance: Double;\r\n FDuration: Integer;\r\n FAlternativeSegments: TTMSFNCRouteCalculatorAlternativeSegments;\r\n function GetPolyline: TTMSFNCMapsCoordinateRecArray;\r\n function GetSegments: TTMSFNCRouteCalculatorSegments;\r\n procedure SetCoordinates(const Value: TTMSFNCMapsCoordinates);\r\n function GetNextSegment: TTMSFNCRouteCalculatorSegment;\r\n function GetPreviousSegment: TTMSFNCRouteCalculatorSegment;\r\n function GetRoute: TTMSFNCRouteCalculatorRoute;\r\n procedure SetAlternativeSegments(\r\n const Value: TTMSFNCRouteCalculatorAlternativeSegments);\r\n public\r\n constructor Create(ACollection: TCollection); override;\r\n procedure Assign(Source: TPersistent); override;\r\n destructor Destroy; override;\r\n property DataPointer: Pointer read FDataPointer write FDataPointer;\r\n property DataBoolean: Boolean read FDataBoolean write FDataBoolean;\r\n property DataObject: TObject read FDataObject write FDataObject;\r\n property DataString: String read FDataString write FDataString;\r\n property DataInteger: NativeInt read FDataInteger write FDataInteger;\r\n property NextSegment: TTMSFNCRouteCalculatorSegment read GetNextSegment;\r\n property PreviousSegment: TTMSFNCRouteCalculatorSegment read GetPreviousSegment;\r\n property Segments: TTMSFNCRouteCalculatorSegments read GetSegments;\r\n property Polyline: TTMSFNCMapsCoordinateRecArray read GetPolyline;\r\n property Route: TTMSFNCRouteCalculatorRoute read GetRoute;\r\n published\r\n property ID: string read FID write FID;\r\n\r\n property AlternativeSegments: TTMSFNCRouteCalculatorAlternativeSegments read FAlternativeSegments write SetAlternativeSegments;\r\n\r\n property Coordinates: TTMSFNCMapsCoordinates read FCoordinates write SetCoordinates;\r\n property Distance: Double read FDistance write FDistance;\r\n property Duration: Integer read FDuration write FDuration;\r\n\r\n property StartAddress: string read FStartAddress write FStartAddress;\r\n property EndAddress: string read FEndAddress write FEndAddress;\r\n property StartCoordinate: TTMSFNCMapsCoordinate read FStartCoordinate write FStartCoordinate;\r\n property EndCoordinate: TTMSFNCMapsCoordinate read FEndCoordinate write FEndCoordinate;\r\n end;\r\n\r\n {$IFDEF WEBLIB}\r\n TTMSFNCRouteCalculatorSegments = class(TTMSFNCOwnedCollection)\r\n {$ELSE}\r\n TTMSFNCRouteCalculatorSegments = class({$IFDEF LCLLIB}specialize {$ENDIF}TTMSFNCOwnedCollection)\r\n {$ENDIF}\r\n private\r\n FOwner: TTMSFNCRouteCalculatorRoute;\r\n function GetItem(Index: Integer): TTMSFNCRouteCalculatorSegment;\r\n procedure SetItem(Index: Integer; const Value: TTMSFNCRouteCalculatorSegment);\r\n function GetRoute: TTMSFNCRouteCalculatorRoute;\r\n protected\r\n function CreateItemClass: TCollectionItemClass; virtual;\r\n function GetOwner: TPersistent; override;\r\n public\r\n constructor Create(AOwner: TTMSFNCRouteCalculatorRoute); virtual;\r\n property Items[Index: Integer]: TTMSFNCRouteCalculatorSegment read GetItem write SetItem; default;\r\n function Add: TTMSFNCRouteCalculatorSegment;\r\n function Insert(Index: Integer): TTMSFNCRouteCalculatorSegment;\r\n property Route: TTMSFNCRouteCalculatorRoute read GetRoute;\r\n end;\r\n\r\n TTMSFNCRouteCalculatorRoute = class(TCollectionItem)\r\n private\r\n FOwner: TTMSFNCCustomRouteCalculator;\r\n FDataPointer: Pointer;\r\n FDataBoolean: Boolean;\r\n FDataString: String;\r\n FDataObject: TObject;\r\n FDataInteger: NativeInt;\r\n FSegments: TTMSFNCRouteCalculatorSegments;\r\n FID: string;\r\n FStartAddress: string;\r\n FEndAddress: string;\r\n FStartCoordinate: TTMSFNCMapsCoordinate;\r\n FEndCoordinate: TTMSFNCMapsCoordinate;\r\n FRouteName: string;\r\n FActive: Boolean;\r\n FSteps: TTMSFNCDirectionsSteps;\r\n function GetPolyline: TTMSFNCMapsCoordinateRecArray;\r\n function GetWayPoints: TTMSFNCMapsCoordinateRecArray;\r\n function GetDistance: Double;\r\n function GetDuration: Double;\r\n function GetRouteCalculator: TTMSFNCCustomRouteCalculator;\r\n procedure SetSteps(const Value: TTMSFNCDirectionsSteps);\r\n public\r\n constructor Create(ACollection: TCollection); override;\r\n procedure Assign(Source: TPersistent); override;\r\n destructor Destroy; override;\r\n property DataPointer: Pointer read FDataPointer write FDataPointer;\r\n property DataBoolean: Boolean read FDataBoolean write FDataBoolean;\r\n property DataObject: TObject read FDataObject write FDataObject;\r\n property DataString: String read FDataString write FDataString;\r\n property DataInteger: NativeInt read FDataInteger write FDataInteger;\r\n function FirstSegment: TTMSFNCRouteCalculatorSegment;\r\n function LastSegment: TTMSFNCRouteCalculatorSegment;\r\n property Duration: Double read GetDuration;\r\n property Distance: Double read GetDistance;\r\n property Polyline: TTMSFNCMapsCoordinateRecArray read GetPolyline;\r\n property WayPoints: TTMSFNCMapsCoordinateRecArray read GetWayPoints;\r\n property RouteCalculator: TTMSFNCCustomRouteCalculator read GetRouteCalculator;\r\n published\r\n property ID: string read FID write FID;\r\n property RouteName: string read FRouteName write FRouteName;\r\n property Steps: TTMSFNCDirectionsSteps read FSteps write SetSteps;\r\n property Segments: TTMSFNCRouteCalculatorSegments read FSegments write FSegments;\r\n property Active: Boolean read FActive write FActive;\r\n end;\r\n\r\n {$IFDEF WEBLIB}\r\n TTMSFNCRouteCalculatorRoutes = class(TTMSFNCOwnedCollection)\r\n {$ELSE}\r\n TTMSFNCRouteCalculatorRoutes = class({$IFDEF LCLLIB}specialize {$ENDIF}TTMSFNCOwnedCollection)\r\n {$ENDIF}\r\n private\r\n FOwner: TTMSFNCCustomRouteCalculator;\r\n function GetItem(Index: Integer): TTMSFNCRouteCalculatorRoute;\r\n procedure SetItem(Index: Integer; const Value: TTMSFNCRouteCalculatorRoute);\r\n function GetRouteCalculator: TTMSFNCCustomRouteCalculator;\r\n protected\r\n function CreateItemClass: TCollectionItemClass; virtual;\r\n function GetOwner: TPersistent; override;\r\n public\r\n constructor Create(AOwner: TTMSFNCCustomRouteCalculator); virtual;\r\n property Items[Index: Integer]: TTMSFNCRouteCalculatorRoute read GetItem write SetItem; default;\r\n function Add: TTMSFNCRouteCalculatorRoute;\r\n function Insert(Index: Integer): TTMSFNCRouteCalculatorRoute;\r\n property RouteCalculator: TTMSFNCCustomRouteCalculator read GetRouteCalculator;\r\n end;\r\n\r\n { TTMSFNCCustomRouteCalculator }\r\n\r\n TTMSFNCRouteCalculatorCalculateRouteCallback = {$IFNDEF LCLLIB}reference to {$ENDIF}procedure(const ARoute: TTMSFNCRouteCalculatorRoute){$IFDEF LCLLIB} of object{$ENDIF};\r\n TTMSFNCRouteCalculatorCalculateRouteEvent = procedure(Sender: TObject; const ARoute: TTMSFNCRouteCalculatorRoute) of object;\r\n TTMSFNCRouteCalculatorCalculateRoutesCompleteEvent = procedure(Sender: TObject) of object;\r\n TTMSFNCRouteCalculatorLocationEvent = procedure(Sender: TObject; const ACoordinate: TTMSFNCMapsCoordinateRec) of object;\r\n TTMSFNCRouteCalculatorGPXEvent = procedure(Sender: TObject; const ARoute: TTMSFNCRouteCalculatorRoute) of object;\r\n\r\n TTMSFNCRouteCalculatorRouteCallBackWrapper = class\r\n private\r\n FCallback: TTMSFNCRouteCalculatorCalculateRouteCallback;\r\n public\r\n constructor Create(ACallback: TTMSFNCRouteCalculatorCalculateRouteCallback);\r\n end;\r\n\r\n TTMSFNCCustomRouteCalculator = class(TTMSFNCCustomComponent)\r\n private\r\n FAPIKey: string;\r\n FLocation: TTMSFNCLocation;\r\n {$IFDEF SENSORSUPPORT}\r\n FLocationSensor: TLocationSensor;\r\n {$ENDIF}\r\n FGeocoding: TTMSFNCGeocoding;\r\n FDirections: TTMSFNCDirections;\r\n FService: TTMSFNCRouteCalculatorService;\r\n FOnGetGeocoding: TTMSFNCGeocodingGetGeocodingEvent;\r\n FOnGetDirections: TTMSFNCDirectionsGetDirectionsEvent;\r\n FOnCalculateRoute: TTMSFNCRouteCalculatorCalculateRouteEvent;\r\n FRoutes: TTMSFNCRouteCalculatorRoutes;\r\n FOnGetRouteGeocoding: TTMSFNCGeocodingGetGeocodingEvent;\r\n FOnGetRouteDirections: TTMSFNCDirectionsGetDirectionsEvent;\r\n FOnGetLocation: TTMSFNCRouteCalculatorLocationEvent;\r\n FOnCreateGPXSegment: TTMSFNCMapsGPXSegmentEvent;\r\n FOnCreateGPXTrack: TTMSFNCMapsGPXTrackEvent;\r\n FOnLoadGPXRouteComplete: TTMSFNCRouteCalculatorGPXEvent;\r\n FOptions: TTMSFNCRouteCalculatorOptions;\r\n FActive: Boolean;\r\n FHistoryManager: TTMSFNCRouteCalculatorHistoryManager;\r\n procedure SetService(const Value: TTMSFNCRouteCalculatorService);\r\n procedure SetAPIKey(const Value: string);\r\n procedure SetRoutes(const Value: TTMSFNCRouteCalculatorRoutes);\r\n function GetHistoryManager: TTMSFNCRouteCalculatorHistoryManager;\r\n protected\r\n procedure DoGetGeocoding(Sender: TObject; const ARequest: TTMSFNCGeocodingRequest; const ARequestResult: TTMSFNCCloudBaseRequestResult);\r\n property OnGetGeocoding: TTMSFNCGeocodingGetGeocodingEvent read FOnGetGeocoding write FOnGetGeocoding;\r\n property OnGetRouteGeocoding: TTMSFNCGeocodingGetGeocodingEvent read FOnGetRouteGeocoding write FOnGetRouteGeocoding;\r\n procedure DoGetDirections(Sender: TObject; const ARequest: TTMSFNCDirectionsRequest; const ARequestResult: TTMSFNCCloudBaseRequestResult);\r\n property OnGetDirections: TTMSFNCDirectionsGetDirectionsEvent read FOnGetDirections write FOnGetDirections;\r\n property OnGetRouteDirections: TTMSFNCDirectionsGetDirectionsEvent read FOnGetRouteDirections write FOnGetRouteDirections;\r\n procedure DoCalculateRoute(const ARoute: TTMSFNCRouteCalculatorRoute; const ARouteInfo: TTMSFNCRouteCalculatorInfo);\r\n property OnCalculateRoute: TTMSFNCRouteCalculatorCalculateRouteEvent read FOnCalculateRoute write FOnCalculateRoute;\r\n property OnCalculateRouteInternal: TTMSFNCRouteCalculatorCalculateRouteEvent read FOnCalculateRoute write FOnCalculateRoute;\r\n procedure DoGetLocation(Sender: TObject; const ARequest: TTMSFNCLocationRequest; const ARequestResult: TTMSFNCCloudBaseRequestResult);\r\n property OnGetLocation: TTMSFNCRouteCalculatorLocationEvent read FOnGetLocation write FOnGetLocation;\r\n\t{$IFDEF SENSORSUPPORT} \r\n procedure DoLocationChanged(Sender: TObject; const OldLocation, NewLocation: TLocationCoord2D);\r\n {$ENDIF}\r\n procedure DoCreateGPXTrack(AEventData: TTMSFNCMapsGPXTrackEventData); virtual;\r\n procedure DoCreateGPXSegment(AEventData: TTMSFNCMapsGPXSegmentEventData); virtual;\r\n property OnCreateGPXTrack: TTMSFNCMapsGPXTrackEvent read FOnCreateGPXTrack write FOnCreateGPXTrack;\r\n property OnCreateGPXSegment: TTMSFNCMapsGPXSegmentEvent read FOnCreateGPXSegment write FOnCreateGPXSegment;\r\n procedure DoLoadGPXRouteComplete(ARoute: TTMSFNCRouteCalculatorRoute); virtual;\r\n property OnLoadGPXRouteComplete: TTMSFNCRouteCalculatorGPXEvent read FOnLoadGPXRouteComplete write FOnLoadGPXRouteComplete;\r\n\r\n function GetInstance: NativeUInt; override;\r\n function GeocodingReady: Boolean;\r\n function DirectionsReady: Boolean;\r\n function LocationReady: Boolean;\r\n function GetAPIKey: string;\r\n function GetVersionNr: Integer;\r\n function GetDocURL: string; override;\r\n function GetTipsURL: string; override;\r\n function GetVersion: string; override;\r\n\r\n function InternalSaveGPX(ARoute: TTMSFNCRouteCalculatorRoute; AMetaData: TTMSFNCMapsGPXMetaData): string;\r\n function InternalLoadGPX(AText: string; ADoGeocoding: Boolean = False): TTMSFNCMapsGPXRec;\r\n\r\n property Service: TTMSFNCRouteCalculatorService read FService write SetService default csGoogle;\r\n property Version: string read GetVersion;\r\n property APIKey: string read FAPIKey write SetAPIKey;\r\n property Routes: TTMSFNCRouteCalculatorRoutes read FRoutes write SetRoutes;\r\n property Options: TTMSFNCRouteCalculatorOptions read FOptions write FOptions;\r\n\r\n public\r\n procedure Assign(Source: TPersistent); override;\r\n constructor Create; reintroduce; overload; virtual;\r\n constructor Create(AOwner: TComponent); overload; override;\r\n destructor Destroy; override;\r\n procedure GetGeocoding(AAddress: string; ACallback: TTMSFNCGeocodingGetGeocodingCallBack = nil; AID: string = ''; ADataPointer: Pointer = nil); virtual;\r\n procedure GetReverseGeocoding(ACoordinates: TTMSFNCMapsCoordinateRec; ACallback: TTMSFNCGeocodingGetReverseGeocodingCallBack = nil; AID: string = ''; ADataPointer: Pointer = nil); virtual;\r\n procedure GetDirections(AOrigin, ADestination: TTMSFNCMapsCoordinateRec; ACallback: TTMSFNCDirectionsGetDirectionsCallBack = nil; AWayPoints: TTMSFNCMapsCoordinateRecArray = nil; AID: string = ''; ADataPointer: Pointer = nil); virtual;\r\n\r\n procedure CalculateRoute(AStartAddress, AEndAddress: string; ACallback: TTMSFNCRouteCalculatorCalculateRouteCallback = nil; AID: string = ''; ADataPointer: Pointer = nil); overload; virtual;\r\n procedure CalculateRoute(AStartCoordinate, AEndCoordinate: TTMSFNCMapsCoordinateRec; ACallback: TTMSFNCRouteCalculatorCalculateRouteCallback = nil; AWayPoints: TTMSFNCMapsCoordinateRecArray = nil; AID: string = ''; ADataPointer: Pointer = nil); overload; virtual;\r\n\r\n procedure AddRouteSegment(ARoute: TTMSFNCRouteCalculatorRoute; AEndAddress: string; ACallback: TTMSFNCRouteCalculatorCalculateRouteCallback = nil; AID: string = ''; ADataPointer: Pointer = nil); overload; virtual;\r\n procedure AddRouteSegment(ARoute: TTMSFNCRouteCalculatorRoute; AEndCoordinate: TTMSFNCMapsCoordinateRec; ACallback: TTMSFNCRouteCalculatorCalculateRouteCallback = nil; AID: string = ''; ADataPointer: Pointer = nil); overload; virtual;\r\n\r\n procedure AddWayPointsToSegment(ASegment: TTMSFNCRouteCalculatorSegment; AWayPoints: TTMSFNCMapsCoordinateRecArray; ACallback: TTMSFNCRouteCalculatorCalculateRouteCallback = nil; AID: string = ''; ADataPointer: Pointer = nil); virtual;\r\n\r\n procedure UpdateRouteSegment(ASegment: TTMSFNCRouteCalculatorSegment; AStartAddress, AEndAddress: string; ACallback: TTMSFNCRouteCalculatorCalculateRouteCallback = nil; AID: string = ''; ADataPointer: Pointer = nil); overload; virtual;\r\n procedure UpdateRouteSegment(ASegment: TTMSFNCRouteCalculatorSegment; AStartCoordinate, AEndCoordinate: TTMSFNCMapsCoordinateRec; ACallback: TTMSFNCRouteCalculatorCalculateRouteCallback = nil; AID: string = ''; ADataPointer: Pointer = nil); overload; virtual;\r\n procedure UpdateRouteSegmentStartAddress(ASegment: TTMSFNCRouteCalculatorSegment; AStartAddress: string; ACallback: TTMSFNCRouteCalculatorCalculateRouteCallback = nil; AID: string = ''; ADataPointer: Pointer = nil); overload; virtual;\r\n procedure UpdateRouteSegmentEndAddress(ASegment: TTMSFNCRouteCalculatorSegment; AEndAddress: string; ACallback: TTMSFNCRouteCalculatorCalculateRouteCallback = nil; AID: string = ''; ADataPointer: Pointer = nil); overload; virtual;\r\n procedure UpdateRouteSegmentStartCoordinate(ASegment: TTMSFNCRouteCalculatorSegment; AStartCoordinate: TTMSFNCMapsCoordinateRec; ACallback: TTMSFNCRouteCalculatorCalculateRouteCallback = nil; AID: string = ''; ADataPointer: Pointer = nil); overload; virtual;\r\n procedure UpdateRouteSegmentEndCoordinate(ASegment: TTMSFNCRouteCalculatorSegment; AEndCoordinate: TTMSFNCMapsCoordinateRec; ACallback: TTMSFNCRouteCalculatorCalculateRouteCallback = nil; AID: string = ''; ADataPointer: Pointer = nil); overload; virtual;\r\n\r\n procedure DeleteRoute(ARoute: TTMSFNCRouteCalculatorRoute);\r\n procedure DeleteRouteSegment(ASegment: TTMSFNCRouteCalculatorSegment; ACallback: TTMSFNCRouteCalculatorCalculateRouteCallback = nil);\r\n procedure GetCurrentLocation(AMode: TTMSFNCRouteCalculatorLocationMode = lmDevice);\r\n\r\n function LoadGPXFromStream(const AStream: TStream; ADoGeocoding: Boolean = False): TTMSFNCMapsGPXRec;\r\n {$IFNDEF WEBLIB}\r\n function LoadGPXFromFile(AFileName: string; ADoGeocoding: Boolean = False): TTMSFNCMapsGPXRec;\r\n {$ENDIF}\r\n function LoadGPXFromText(AText: string; ADoGeocoding: Boolean = False): TTMSFNCMapsGPXRec;\r\n\r\n procedure SaveToGPXStream(ARoute: TTMSFNCRouteCalculatorRoute; AStream: TStream); overload; virtual;\r\n procedure SaveToGPXStream(ARoute: TTMSFNCRouteCalculatorRoute; AStream: TStream; AMetaData: TTMSFNCMapsGPXMetaData); overload; virtual;\r\n procedure SaveToGPXFile(ARoute: TTMSFNCRouteCalculatorRoute; AFileName: string); overload; virtual;\r\n procedure SaveToGPXFile(ARoute: TTMSFNCRouteCalculatorRoute; AFileName: string; AMetaData: TTMSFNCMapsGPXMetaData); overload; virtual;\r\n function SaveToGPXText(ARoute: TTMSFNCRouteCalculatorRoute): string; overload; virtual;\r\n function SaveToGPXText(ARoute: TTMSFNCRouteCalculatorRoute; AMetaData: TTMSFNCMapsGPXMetaData): string; overload; virtual;\r\n\r\n procedure SaveRoutesToStream(AStream: TStream); virtual;\r\n function SaveRoutesToText: string; virtual;\r\n procedure SaveRoutesToFile(AFileName: string); virtual;\r\n\r\n procedure LoadRoutesFromStream(AStream: TStream); virtual;\r\n procedure LoadRoutesFromText(AText: string); virtual;\r\n {$IFNDEF WEBLIB}\r\n procedure LoadRoutesFromFile(AFileName: string); virtual;\r\n {$ENDIF}\r\n\r\n function RunnningRequestCount: Integer;\r\n\r\n procedure Clear; virtual;\r\n procedure ClearRoutes; virtual;\r\n procedure SaveToGPXStream(ACoordinates: TTMSFNCMapsCoordinateRecArray; AStream: TStream); overload; virtual;\r\n procedure SaveToGPXStream(ACoordinates: TTMSFNCMapsCoordinateRecArray; AStream: TStream; AMetaData: TTMSFNCMapsGPXMetaData); overload; virtual;\r\n procedure SaveToGPXFile(ACoordinates: TTMSFNCMapsCoordinateRecArray; AFileName: string); overload; virtual;\r\n procedure SaveToGPXFile(ACoordinates: TTMSFNCMapsCoordinateRecArray; AFileName: string; AMetaData: TTMSFNCMapsGPXMetaData); overload; virtual;\r\n function SaveToGPXText(ACoordinates: TTMSFNCMapsCoordinateRecArray): string; overload; virtual;\r\n function SaveToGPXText(ACoordinates: TTMSFNCMapsCoordinateRecArray; AMetaData: TTMSFNCMapsGPXMetaData): string; overload; virtual;\r\n function HasRoutes: Boolean; virtual;\r\n property Geocoding: TTMSFNCGeocoding read FGeocoding;\r\n property Directions: TTMSFNCDirections read FDirections;\r\n property Active: Boolean read FActive write FActive default False;\r\n property HistoryManager: TTMSFNCRouteCalculatorHistoryManager read GetHistoryManager;\r\n end;\r\n\r\n {$IFNDEF LCLLIB}\r\n {$HINTS OFF}\r\n {$IF COMPILERVERSION > 22}\r\n {$IFNDEF LCLLIB}\r\n [ComponentPlatformsAttribute(TMSPlatformsWeb)]\r\n {$ENDIF}\r\n {$IFEND}\r\n {$HINTS ON}\r\n {$ENDIF}\r\n TTMSFNCRouteCalculator = class(TTMSFNCCustomRouteCalculator)\r\n protected\r\n procedure RegisterRuntimeClasses; override;\r\n published\r\n property OnGetGeocoding;\r\n property OnGetDirections;\r\n property OnGetRouteGeocoding;\r\n property OnGetRouteDirections;\r\n property OnCalculateRoute;\r\n property OnCreateGPXTrack;\r\n property OnCreateGPXSegment;\r\n property OnLoadGPXRouteComplete;\r\n property OnGetLocation;\r\n property APIKey;\r\n property Service;\r\n property Version;\r\n property Routes;\r\n property Options;\r\n end;\r\n\r\nimplementation\r\n\r\nuses\r\n {$IFDEF MSWINDOWS}\r\n Windows,\r\n {$ENDIF}\r\n {%H-}Math,\r\n WEBLib.TMSFNCUtils,\r\n WEBLib.TMSFNCPersistence,\r\n SysUtils\r\n {$IFDEF FMXLIB}\r\n ,FMX.Types\r\n {$ENDIF}\r\n ;\r\n \r\n {$R TMSFNCRouteCalculator.res}\r\n\r\n{ TTMSFNCCustomRouteCalculator }\r\n\r\nfunction TTMSFNCCustomRouteCalculator.GetAPIKey: string;\r\nbegin\r\n Result := APIKey;\r\nend;\r\n\r\nfunction GetFirstChildNode(const ANode: TTMSFNCMapsXMLNode): TTMSFNCMapsXMLDomNode;\r\nbegin\r\n {$IFNDEF LCLWEBLIB}\r\n Result := ANode.DOMNode.firstChild;\r\n {$ELSE}\r\n Result := ANode.firstChild;\r\n {$ENDIF}\r\nend;\r\n\r\nfunction FindNodeAttribute(const ANode: TTMSFNCMapsXMLDOMNode; const ANodeName: string): TTMSFNCMapsXMLDomNode;\r\nbegin\r\n {$IFDEF WEBLIB}\r\n asm\r\n if (ANode.attributes){\r\n return ANode.attributes.getNamedItem(ANodeName);\r\n }else{\r\n return undefined;\r\n }\r\n end;\r\n {$ELSE}\r\n Result := ANode.Attributes.GetNamedItem(ANodeName);\r\n {$ENDIF}\r\nend;\r\n\r\nfunction FindNode(const ANode: TTMSFNCMapsXMLNode; const ANodeName: string): TTMSFNCMapsXMLNode;\r\nbegin\r\n {$IFNDEF LCLLIB}\r\n Result := ANode.ChildNodes.FindNode(ANodeName);\r\n {$ELSE}\r\n Result := ANode.FindNode(ANodeName);\r\n {$ENDIF}\r\nend;\r\n\r\nfunction NodeToString(ANode: TTMSFNCMapsXMLDOMNode): string;\r\nbegin\r\n Result := '';\r\n if not Assigned(ANode) then\r\n Exit;\r\n\r\n Result := ANode.nodeValue;\r\nend;\r\n\r\n\r\n{$IFNDEF WEBLIB}\r\nfunction TTMSFNCCustomRouteCalculator.LoadGPXFromFile(AFileName: string; ADoGeocoding: Boolean = False): TTMSFNCMapsGPXRec;\r\nvar\r\n ms: TMemoryStream;\r\nbegin\r\n ms := TMemoryStream.Create;\r\n try\r\n ms.LoadFromFile(AFileName);\r\n Result := LoadGPXFromStream(ms, ADoGeocoding);\r\n finally\r\n ms.Free;\r\n end;\r\nend;\r\n\r\n{$ENDIF}\r\n\r\nfunction TTMSFNCCustomRouteCalculator.LoadGPXFromStream(const AStream: TStream; ADoGeocoding: Boolean = False): TTMSFNCMapsGPXRec;\r\nvar\r\n s: TStringStream;\r\nbegin\r\n s := TStringStream.Create('');\r\n try\r\n AStream.Position := 0;\r\n s.CopyFrom(AStream, AStream.Size);\r\n Result := LoadGPXFromText(s.DataString, ADoGeocoding);\r\n finally\r\n s.Free;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCCustomRouteCalculator.LoadGPXFromText(AText: string; ADoGeocoding: Boolean = False): TTMSFNCMapsGPXRec;\r\nbegin\r\n Result := InternalLoadGPX(AText, ADoGeocoding);\r\nend;\r\n\r\n{$IFNDEF WEBLIB}\r\nprocedure TTMSFNCCustomRouteCalculator.LoadRoutesFromFile(AFileName: string);\r\nvar\r\n ms: TMemoryStream;\r\nbegin\r\n ms := TMemoryStream.Create;\r\n try\r\n ms.LoadFromFile(AFileName);\r\n ms.Position := 0;\r\n LoadRoutesFromStream(ms);\r\n finally\r\n ms.Free;\r\n end;\r\nend;\r\n{$ENDIF}\r\n\r\nprocedure TTMSFNCCustomRouteCalculator.LoadRoutesFromStream(AStream: TStream);\r\nbegin\r\n TTMSFNCPersistence.LoadSettingsFromStream(Routes, AStream);\r\nend;\r\n\r\nprocedure TTMSFNCCustomRouteCalculator.LoadRoutesFromText(AText: string);\r\nvar\r\n s: TStringStream;\r\nbegin\r\n s := TStringStream.Create(AText);\r\n try\r\n s.Position := 0;\r\n LoadRoutesFromStream(s);\r\n finally\r\n s.Free;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCCustomRouteCalculator.InternalLoadGPX(AText: string; ADoGeocoding: Boolean = False): TTMSFNCMapsGPXRec;\r\nvar\r\n xmldoc: TTMSFNCMapsXMLDocument;\r\n iNode, nNode, sNode: TTMSFNCMapsXMLNode;\r\n snlat, snlng, cNode, eNode, pNode: TTMSFNCMapsXMLDomNode;\r\n v: Double;\r\n parentNode: TTMSFNCMapsXMLNode;\r\n gpx11: Boolean;\r\n cnt, cntTr, cntSeg: Integer;\r\n {$IFDEF LCLLIB}\r\n ss: TStringStream;\r\n {$ENDIF}\r\n allpath: TTMSFNCMapsCoordinateRecArray;\r\n nodeName, timeStamp: string;\r\n ele, maxHeight, minHeight: Double;\r\n heightFound: Boolean;\r\n trackEventData: TTMSFNCMapsGPXTrackEventData;\r\n segmentEventData: TTMSFNCMapsGPXSegmentEventData;\r\n I, J, K: Integer;\r\n r: TTMSFNCRouteCalculatorRoute;\r\n s: TTMSFNCRouteCalculatorSegment;\r\n c: TTMSFNCMapsCoordinateItem;\r\n distance: double;\r\n o: TTMSFNCRouteCalculatorInfo;\r\nbegin\r\n {$IFDEF LCLLIB}\r\n ss := TStringStream.Create(AText);\r\n try\r\n ReadXMLFile(xmldoc, ss);\r\n finally\r\n ss.Free;\r\n end;\r\n {$ELSE}\r\n {$IFDEF WEBLIB}\r\n asm\r\n var parser = new DOMParser();\r\n xmldoc = parser.parseFromString(AText, 'text/xml');\r\n end;\r\n {$ELSE}\r\n xmldoc := TXmlDocument.Create(nil);\r\n xmldoc.LoadFromXML(AText);\r\n {$ENDIF}\r\n {$ENDIF}\r\n\r\n parentNode := xmldoc.DocumentElement;\r\n\r\n gpx11 := false;\r\n cntTr := -1;\r\n minHeight := 0;\r\n maxHeight := 0;\r\n\r\n if Assigned(parentNode) then\r\n begin\r\n iNode := FindNode(parentNode, 'trk');\r\n\r\n if not Assigned(iNode) then\r\n begin\r\n iNode := FindNode(parentNode, 'rte');\r\n gpx11 := true;\r\n end;\r\n\r\n repeat\r\n if Assigned(iNode) then\r\n begin\r\n cntSeg := -1;\r\n inc(cntTr);\r\n\r\n SetLength(Result.Tracks, cntTr + 1);\r\n\r\n nNode := FindNode(iNode, 'name');\r\n if Assigned(nNode) then\r\n begin\r\n {$IFNDEF LCLWEBLIB}\r\n Result.Tracks[cntTr].Name := nNode.Text;\r\n {$ENDIF}\r\n {$IFDEF LCLWEBLIB}\r\n Result.Tracks[cntTr].Name := nNode.nodeValue;\r\n {$ENDIF}\r\n end;\r\n\r\n trackEventData := TTMSFNCMapsGPXTrackEventData.Create;\r\n trackEventData.Node := iNode{$IFNDEF LCLWEBLIB}.DOMNode{$ENDIF};\r\n trackEventData.Data := Result.Tracks[cntTr];\r\n try\r\n DoCreateGPXTrack(trackEventData);\r\n finally\r\n trackEventData.Free;\r\n end;\r\n\r\n if not gpx11 then\r\n sNode := FindNode(iNode, 'trkseg')\r\n else\r\n sNode := iNode;\r\n\r\n repeat\r\n if Assigned(sNode) and sNode.HasChildNodes then\r\n begin\r\n cnt := -1;\r\n inc(cntSeg);\r\n SetLength(Result.Tracks[cntTr].Segments, cntSeg + 1);\r\n heightFound := false;\r\n\r\n cNode := GetFirstChildNode(sNode);\r\n\r\n while Assigned(cNode) do\r\n begin\r\n pNode := cNode;\r\n nodeName := pNode.NodeName;\r\n\r\n if not gpx11 or (gpx11 and (pNode.NodeName = 'rtept')) then\r\n begin\r\n snlat := FindNodeAttribute(pNode, 'lat');\r\n snlng := FindNodeAttribute(pNode, 'lon');\r\n\r\n if Assigned(snlat) and Assigned(snlng) then\r\n begin\r\n inc(cnt);\r\n SetLength(Result.Tracks[cntTr].Segments[cntSeg], cnt + 1);\r\n\r\n if nodeName = 'trkpt' then\r\n begin\r\n eNode := FindNodeAttribute(pNode, 'ele');\r\n if Assigned(eNode) then\r\n begin\r\n ele := 0;\r\n if TTMSFNCUtils.TryStrToFloatDot(eNode.nodeValue, ele) then\r\n begin\r\n if heightFound then\r\n begin\r\n if ele > maxHeight then\r\n maxHeight := ele;\r\n if ele < minHeight then\r\n minHeight := ele;\r\n end\r\n else\r\n begin\r\n heightFound := true;\r\n maxHeight := ele;\r\n minHeight := ele;\r\n end;\r\n\r\n Result.Tracks[cntTr].Segments[cntSeg][cnt].Elevation := ele;\r\n Result.Tracks[cntTr].Segments[cntSeg][cnt].HasElevation := True;\r\n end;\r\n end;\r\n\r\n eNode := FindNodeAttribute(pNode, 'time');\r\n if Assigned(eNode) then\r\n begin\r\n timestamp := eNode.nodeValue;\r\n if timestamp <> '' then\r\n begin\r\n Result.Tracks[cntTr].Segments[cntSeg][cnt].TimeStamp := TTMSFNCUtils.ISOToDateTime(timestamp, True);\r\n Result.Tracks[cntTr].Segments[cntSeg][cnt].HasTimeStamp := True;\r\n end;\r\n end;\r\n end;\r\n\r\n v := 0;\r\n if TTMSFNCUtils.TryStrToFloatDot(snlat.nodeValue, v) then\r\n Result.Tracks[cntTr].Segments[cntSeg][cnt].Latitude := v;\r\n\r\n v := 0;\r\n if TTMSFNCUtils.TryStrToFloatDot(snlng.nodeValue, v) then\r\n Result.Tracks[cntTr].Segments[cntSeg][cnt].Longitude := v;\r\n\r\n SetLength(allpath, Length(allpath) + 1);\r\n allpath[Length(allpath) - 1] := CreateCoordinate(Result.Tracks[cntTr].Segments[cntSeg][cnt].Latitude, Result.Tracks[cntTr].Segments[cntSeg][cnt].Longitude);\r\n\r\n segmentEventData := TTMSFNCMapsGPXSegmentEventData.Create;\r\n segmentEventData.Node := pNode;\r\n segmentEventData.Data := Result.Tracks[cntTr].Segments[cntSeg][cnt];\r\n try\r\n DoCreateGPXSegment(segmentEventData);\r\n finally\r\n segmentEventData.Free;\r\n end;\r\n end;\r\n end;\r\n\r\n cNode := cNode.nextSibling;\r\n end;\r\n end;\r\n\r\n if Assigned(sNode) then\r\n sNode := sNode.NextSibling;\r\n\r\n until (not Assigned(sNode));\r\n end;\r\n\r\n if Assigned(iNode) then\r\n iNode := iNode.NextSibling;\r\n until (not Assigned(iNode));\r\n end;\r\n\r\n for I := 0 to Length(Result.Tracks) - 1 do\r\n begin\r\n r := Routes.Add;\r\n r.RouteName := Result.Tracks[I].Name;\r\n for J := 0 to Length(Result.Tracks[I].Segments) - 1 do\r\n begin\r\n distance := 0;\r\n s := r.Segments.Add;\r\n for K := 0 to Length(Result.Tracks[I].Segments[J]) - 1 do\r\n begin\r\n c := s.Coordinates.Add;\r\n c.Latitude := Result.Tracks[I].Segments[J][K].Latitude;\r\n c.Longitude := Result.Tracks[I].Segments[J][K].Longitude;\r\n if K = 0 then\r\n begin\r\n if J = 0 then\r\n r.FStartCoordinate.Assign(c.Coordinate);\r\n s.FStartCoordinate.Assign(c.Coordinate);\r\n end;\r\n if K = Length(Result.Tracks[I].Segments[J]) - 1 then\r\n begin\r\n if J = Length(Result.Tracks[I].Segments) - 1 then\r\n r.FEndCoordinate.Assign(c.Coordinate);\r\n s.FEndCoordinate.Assign(c.Coordinate);\r\n end;\r\n if K > 0 then\r\n distance := distance + MeasureDistance(c.Coordinate.ToRec, s.Coordinates[K - 1].Coordinate.ToRec);\r\n end;\r\n s.Distance := distance;\r\n end;\r\n if not ADoGeocoding then\r\n DoLoadGPXRouteComplete(r)\r\n else\r\n begin\r\n for J := 0 to r.Segments.Count - 1 do\r\n begin\r\n s := r.Segments[J];\r\n o := TTMSFNCRouteCalculatorInfo.Create;\r\n o.FStartGeocoded := False;\r\n o.FEndGeocoded := True;\r\n GetReverseGeocoding(s.FStartCoordinate.ToRec, nil, 'GPXStart', o);\r\n GetReverseGeocoding(s.FEndCoordinate.ToRec, nil, 'GPXEnd', o);\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCCustomRouteCalculator.InternalSaveGPX(\r\n ARoute: TTMSFNCRouteCalculatorRoute;\r\n AMetaData: TTMSFNCMapsGPXMetaData): string;\r\nvar\r\n ca: TTMSFNCMapsCoordinateRecArray;\r\nvar\r\n I, J: integer;\r\n hdr,ftr, wpts: string;\r\n sl: TStringList;\r\n {$IFDEF WEBLIB}\r\n d, t: string;\r\n {$ENDIF}\r\n {$IFNDEF WEBLIB}\r\n d, t: Char;\r\n {$ENDIF}\r\nbegin\r\n t := FormatSettings.ThousandSeparator;\r\n d := FormatSettings.DecimalSeparator;\r\n FormatSettings.DecimalSeparator := '.';\r\n FormatSettings.ThousandSeparator := ',';\r\n\r\n ca := ARoute.GetWayPoints;\r\n wpts := '';\r\n for I := 0 to Length(ca) - 1 do\r\n begin\r\n wpts := wpts + Format('', [ca[I].Latitude, ca[I].Longitude]);\r\n if ca[I].HasElevation then\r\n wpts := wpts + Format('%.7f', [ARoute.GetWayPoints[I].Elevation]);\r\n if ca[I].Description <> '' then\r\n wpts := wpts + '' + ca[I].Description + '';\r\n wpts := wpts + '';\r\n end;\r\n\r\n hdr :=\r\n ''+\r\n ''+\r\n ''+\r\n ''+\r\n '%s'+\r\n ''+\r\n ''+\r\n ''+\r\n wpts +\r\n ''+\r\n '%s'+\r\n '%s';\r\n\r\n ftr :=\r\n ''+\r\n '';\r\n\r\n hdr := Format(hdr,[AMetaData.AuthorName, AMetaData.AuthorLink, AMetaData.TrackName, AMetaData.TrackType]);\r\n\r\n sl := TStringList.Create;\r\n try\r\n sl.Add(hdr);\r\n\r\n for I := 0 to ARoute.Segments.Count - 1 do\r\n begin\r\n sl.Add('');\r\n for J := 0 to ARoute.Segments[I].Coordinates.Count - 1 do\r\n sl.Add(Format('', [ARoute.Segments[I].Coordinates[J].Latitude, ARoute.Segments[I].Coordinates[J].Longitude]));\r\n sl.Add('');\r\n end;\r\n\r\n sl.Add(ftr);\r\n\r\n Result := sl.Text;\r\n finally\r\n sl.Free;\r\n end;\r\n\r\n FormatSettings.ThousandSeparator := t;\r\n FormatSettings.DecimalSeparator := d;\r\nend;\r\n\r\nprocedure TTMSFNCCustomRouteCalculator.GetCurrentLocation(\r\n AMode: TTMSFNCRouteCalculatorLocationMode);\r\nbegin\r\n if AMode = lmService then\r\n begin\r\n if not LocationReady then\r\n begin\r\n raise Exception.Create('Please set API key!');\r\n Exit;\r\n end;\r\n\r\n if (Service = csGoogle) then\r\n FLocation.GetLocation;\r\n end\r\n else\r\n begin\r\n {$IFDEF SENSORSUPPORT} \r\n FLocationSensor.Active := True;\r\n {$ENDIF}\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomRouteCalculator.GetDirections(AOrigin,\r\n ADestination: TTMSFNCMapsCoordinateRec; ACallback: TTMSFNCDirectionsGetDirectionsCallback = nil;\r\n AWayPoints: TTMSFNCMapsCoordinateRecArray = nil; AID: string = ''; ADataPointer: Pointer = nil);\r\nbegin\r\n if not DirectionsReady then\r\n begin\r\n raise Exception.Create('Please set API key!');\r\n Exit;\r\n end;\r\n\r\n FDirections.GetDirections(AOrigin, ADestination, ACallBack, AID, ADataPointer,\r\n Options.IncludeAlternativeRoutes, Options.TravelMode, AWayPoints, False, Options.Locale, Options.LocaleMode, Options.AvoidTolls);\r\nend;\r\n\r\nfunction TTMSFNCCustomRouteCalculator.GetDocURL: string;\r\nbegin\r\n Result := TTMSFNCRouteCalculatorDocURL;\r\nend;\r\n\r\nfunction TTMSFNCCustomRouteCalculator.GetVersion: string;\r\nvar\r\n vn: Integer;\r\nbegin\r\n vn := GetVersionNr;\r\n Result := IntToStr(Hi(Hiword(vn)))+'.'+IntToStr(Lo(Hiword(vn)))+'.'+IntToStr(Hi(Loword(vn)))+'.'+IntToStr(Lo(Loword(vn)));\r\nend;\r\n\r\nfunction TTMSFNCCustomRouteCalculator.GetVersionNr: Integer;\r\nbegin\r\n Result := MakeLong(MakeWord(BLD_VER,REL_VER),MakeWord(MIN_VER,MAJ_VER));\r\nend;\r\n\r\nprocedure TTMSFNCCustomRouteCalculator.SaveToGPXFile(\r\n ACoordinates: TTMSFNCMapsCoordinateRecArray; AFileName: string);\r\nbegin\r\n SaveToGPXFile(ACoordinates, AFileName, DefaultGPXMetaData);\r\nend;\r\n\r\nprocedure TTMSFNCCustomRouteCalculator.SaveToGPXFile(\r\n ACoordinates: TTMSFNCMapsCoordinateRecArray; AFileName: string;\r\n AMetaData: TTMSFNCMapsGPXMetaData);\r\nvar\r\n sl: TStringList;\r\nbegin\r\n sl := TStringList.Create;\r\n try\r\n sl.Text := SaveToGPXText(ACoordinates, AMetaData);\r\n sl.SaveToFile(AFileName);\r\n finally\r\n sl.Free;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomRouteCalculator.SaveToGPXStream(\r\n ACoordinates: TTMSFNCMapsCoordinateRecArray; AStream: TStream);\r\nbegin\r\n SaveToGPXStream(ACoordinates, AStream, DefaultGPXMetaData);\r\nend;\r\n\r\nprocedure TTMSFNCCustomRouteCalculator.SaveToGPXStream(\r\n ACoordinates: TTMSFNCMapsCoordinateRecArray; AStream: TStream;\r\n AMetaData: TTMSFNCMapsGPXMetaData);\r\nvar\r\n ss: TStringStream;\r\nbegin\r\n ss := TStringStream.Create(SaveToGPXText(ACoordinates, AMetaData));\r\n try\r\n AStream.CopyFrom(ss, ss.Size);\r\n finally\r\n ss.Free;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCCustomRouteCalculator.SaveToGPXText(\r\n ACoordinates: TTMSFNCMapsCoordinateRecArray): string;\r\nbegin\r\n Result := SaveToGPX(ACoordinates, DefaultGPXMetaData);\r\nend;\r\n\r\nfunction TTMSFNCCustomRouteCalculator.SaveToGPXText(\r\n ACoordinates: TTMSFNCMapsCoordinateRecArray;\r\n AMetaData: TTMSFNCMapsGPXMetaData): string;\r\nbegin\r\n Result := SaveToGPX(ACoordinates, AMetaData);\r\nend;\r\n\r\nfunction TTMSFNCCustomRouteCalculator.HasRoutes: Boolean;\r\nbegin\r\n Result := False;\r\n if Routes.Count <= 0 then\r\n Exit;\r\n\r\n if Routes[0].Segments.Count <= 0 then\r\n Exit;\r\n\r\n if Routes[0].Segments[0].Coordinates.Count <= 0 then\r\n Exit;\r\n\r\n Result := True;\r\nend;\r\n\r\nfunction TTMSFNCCustomRouteCalculator.LocationReady: Boolean;\r\nbegin\r\n if Assigned(FLocation) then\r\n FLocation.APIKey := APIKey;\r\n Result := Assigned(FLocation) and (FLocation.APIKey <> '');\r\nend;\r\n\r\nfunction TTMSFNCCustomRouteCalculator.RunnningRequestCount: Integer;\r\nbegin\r\n Result := FDirections.GetRequestCount(True);\r\nend;\r\n\r\nprocedure TTMSFNCCustomRouteCalculator.AddRouteSegment(\r\n ARoute: TTMSFNCRouteCalculatorRoute; AEndCoordinate: TTMSFNCMapsCoordinateRec;\r\n ACallback: TTMSFNCRouteCalculatorCalculateRouteCallback = nil; AID: string = '';\r\n ADataPointer: Pointer = nil);\r\nvar\r\n o: TTMSFNCRouteCalculatorInfo;\r\n sg: TTMSFNCRouteCalculatorSegment;\r\nbegin\r\n if not Assigned(ARoute) or (ARoute.Segments.Count = 0) then\r\n Exit;\r\n\r\n o := TTMSFNCRouteCalculatorInfo.Create;\r\n o.FID := AID;\r\n\r\n sg := ARoute.LastSegment;\r\n\r\n o.FStartAddress := sg.EndAddress;\r\n o.FStartCoordinate := sg.EndCoordinate.ToRec;\r\n o.FEndCoordinate := AEndCoordinate;\r\n o.FUpdateRoute := ARoute;\r\n o.FMode := cimAddDirections;\r\n\r\n if Assigned(ACallback) then\r\n o.FCallBack := TTMSFNCRouteCalculatorRouteCallBackWrapper.Create(ACallback)\r\n else\r\n o.FCallBack := nil;\r\n\r\n GetDirections(o.FStartCoordinate, o.FEndCoordinate, nil, nil, AID, o);\r\nend;\r\n\r\nprocedure TTMSFNCCustomRouteCalculator.AddWayPointsToSegment(\r\n ASegment: TTMSFNCRouteCalculatorSegment;\r\n AWayPoints: TTMSFNCMapsCoordinateRecArray;\r\n ACallback: TTMSFNCRouteCalculatorCalculateRouteCallback; AID: string;\r\n ADataPointer: Pointer);\r\nvar\r\n o: TTMSFNCRouteCalculatorInfo;\r\nbegin\r\n if not Assigned(ASegment) then\r\n Exit;\r\n\r\n o := TTMSFNCRouteCalculatorInfo.Create;\r\n o.FID := AID;\r\n o.FUpdateRoute := ASegment.Route;\r\n o.FMode := cimUpdateDirections;\r\n\r\n o.FStartCoordinate := ASegment.StartCoordinate.ToRec;\r\n o.FEndCoordinate := ASegment.EndCoordinate.ToRec;\r\n SetLength(o.FUpdateSegments, 1);\r\n o.FUpdateSegments[0] := ASegment;\r\n\r\n if Assigned(ACallback) then\r\n o.FCallBack := TTMSFNCRouteCalculatorRouteCallBackWrapper.Create(ACallback)\r\n else\r\n o.FCallBack := nil;\r\n\r\n GetDirections(o.FStartCoordinate, o.FEndCoordinate, nil, AWayPoints, AID, o);\r\nend;\r\n\r\nprocedure TTMSFNCCustomRouteCalculator.AddRouteSegment(\r\n ARoute: TTMSFNCRouteCalculatorRoute; AEndAddress: string;\r\n ACallback: TTMSFNCRouteCalculatorCalculateRouteCallback = nil; AID: string = '';\r\n ADataPointer: Pointer = nil);\r\nvar\r\n o: TTMSFNCRouteCalculatorInfo;\r\n sg: TTMSFNCRouteCalculatorSegment;\r\nbegin\r\n if not Assigned(ARoute) or (ARoute.Segments.Count = 0) then\r\n Exit;\r\n\r\n o := TTMSFNCRouteCalculatorInfo.Create;\r\n o.FID := AID;\r\n\r\n sg := ARoute.LastSegment;\r\n\r\n o.FStartAddress := sg.EndAddress;\r\n o.FStartCoordinate := sg.EndCoordinate.ToRec;\r\n o.FEndAddress := AEndAddress;\r\n o.FStartFound := True;\r\n o.FUpdateRoute := ARoute;\r\n o.FMode := cimAddDirections;\r\n\r\n if Assigned(ACallback) then\r\n o.FCallBack := TTMSFNCRouteCalculatorRouteCallBackWrapper.Create(ACallback)\r\n else\r\n o.FCallBack := nil;\r\n\r\n GetGeocoding(o.FEndAddress, nil, 'End', o);\r\nend;\r\n\r\nprocedure TTMSFNCCustomRouteCalculator.Assign(Source: TPersistent);\r\nbegin\r\n inherited;\r\n if (Source is TTMSFNCCustomRouteCalculator) then\r\n begin\r\n FActive := (Source as TTMSFNCCustomRouteCalculator).Active;\r\n FService := (Source as TTMSFNCCustomRouteCalculator).Service;\r\n FAPIKey := (Source as TTMSFNCCustomRouteCalculator).APIKey;\r\n FRoutes.Assign((Source as TTMSFNCCustomRouteCalculator).Routes);\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomRouteCalculator.GetGeocoding(AAddress: string; ACallback: TTMSFNCGeocodingGetGeocodingCallBack = nil; AID: string = ''; ADataPointer: Pointer = nil);\r\nbegin\r\n if not GeocodingReady then\r\n begin\r\n raise Exception.Create('Please set API key!');\r\n Exit;\r\n end;\r\n\r\n FGeocoding.GetGeocoding(AAddress, ACallBack, AID, ADataPointer);\r\nend;\r\n\r\nfunction TTMSFNCCustomRouteCalculator.GetHistoryManager: TTMSFNCRouteCalculatorHistoryManager;\r\nbegin\r\n if not Assigned(FHistoryManager) then\r\n FHistoryManager := TTMSFNCRouteCalculatorHistoryManager.Create(Routes);\r\n\r\n Result := FHistoryManager;\r\nend;\r\n\r\nfunction TTMSFNCCustomRouteCalculator.GetInstance: NativeUInt;\r\nbegin\r\n Result := HInstance;\r\nend;\r\n\r\nprocedure TTMSFNCCustomRouteCalculator.GetReverseGeocoding(ACoordinates: TTMSFNCMapsCoordinateRec; ACallback: TTMSFNCGeocodingGetReverseGeocodingCallBack = nil; AID: string = ''; ADataPointer: Pointer = nil);\r\nbegin\r\n if not GeocodingReady then\r\n begin\r\n raise Exception.Create('Please set API key!');\r\n Exit;\r\n end;\r\n\r\n FGeocoding.GetReverseGeocoding(ACoordinates, ACallBack, AID, ADataPointer);\r\nend;\r\n\r\nfunction TTMSFNCCustomRouteCalculator.GetTipsURL: string;\r\nbegin\r\n Result := TTMSFNCGeocodingTipsURL;\r\nend;\r\n\r\nprocedure TTMSFNCCustomRouteCalculator.CalculateRoute(AStartCoordinate,\r\n AEndCoordinate: TTMSFNCMapsCoordinateRec; ACallback: TTMSFNCRouteCalculatorCalculateRouteCallback = nil;\r\n AWayPoints: TTMSFNCMapsCoordinateRecArray = nil; AID: string = ''; ADataPointer: Pointer = nil);\r\nvar\r\n o: TTMSFNCRouteCalculatorInfo;\r\nbegin\r\n o := TTMSFNCRouteCalculatorInfo.Create;\r\n o.FID := AID;\r\n o.FStartCoordinate.Latitude := AStartCoordinate.Latitude;\r\n o.FEndCoordinate.Latitude := AEndCoordinate.Latitude;\r\n o.FStartCoordinate.Longitude := AStartCoordinate.Longitude;\r\n o.FEndCoordinate.Longitude := AEndCoordinate.Longitude;\r\n\r\n if Assigned(ACallback) then\r\n o.FCallBack := TTMSFNCRouteCalculatorRouteCallBackWrapper.Create(ACallback)\r\n else\r\n o.FCallBack := nil;\r\n\r\n GetDirections(o.FStartCoordinate, o.FEndCoordinate, nil, AWayPoints, o.FID, o);\r\nend;\r\n\r\nprocedure TTMSFNCCustomRouteCalculator.CalculateRoute(AStartAddress,\r\n AEndAddress: string; ACallback: TTMSFNCRouteCalculatorCalculateRouteCallback = nil;\r\n AID: string = ''; ADataPointer: Pointer = nil);\r\nvar\r\n o: TTMSFNCRouteCalculatorInfo;\r\nbegin\r\n o := TTMSFNCRouteCalculatorInfo.Create;\r\n o.FID := AID;\r\n o.FStartAddress := AStartAddress;\r\n o.FEndAddress := AEndAddress;\r\n\r\n o.FMode := cimAddDirections;\r\n\r\n if Assigned(ACallback) then\r\n o.FCallBack := TTMSFNCRouteCalculatorRouteCallBackWrapper.Create(ACallback)\r\n else\r\n o.FCallBack := nil;\r\n\r\n GetGeocoding(o.FStartAddress, nil, 'Start', o);\r\n GetGeocoding(o.FEndAddress, nil, 'End', o);\r\nend;\r\n\r\nprocedure TTMSFNCCustomRouteCalculator.Clear;\r\nbegin\r\n BeginUpdate;\r\n ClearRoutes;\r\n if Assigned(FGeocoding) then\r\n FGeocoding.GeocodingRequests.Clear;\r\n if Assigned(FDirections) then\r\n FDirections.DirectionsRequests.Clear;\r\n if Assigned(FLocation) then\r\n FLocation.LocationRequests.Clear;\r\n EndUpdate;\r\nend;\r\n\r\nprocedure TTMSFNCCustomRouteCalculator.ClearRoutes;\r\nbegin\r\n BeginUpdate;\r\n Routes.Clear;\r\n EndUpdate;\r\nend;\r\n\r\nconstructor TTMSFNCCustomRouteCalculator.Create;\r\nbegin\r\n Create(nil);\r\nend;\r\n\r\nconstructor TTMSFNCCustomRouteCalculator.Create(AOwner: TComponent);\r\nbegin\r\n inherited;\r\n FActive := False;\r\n FService := csGoogle;\r\n\r\n FGeocoding := TTMSFNCGeocoding.Create(Self);\r\n\r\n FGeocoding.OnGetGeocoding := {$IFDEF LCLLIB}@{$ENDIF}DoGetGeocoding;\r\n FGeocoding.OnGetReverseGeocoding := {$IFDEF LCLLIB}@{$ENDIF}DoGetGeocoding;\r\n\r\n FDirections := TTMSFNCDirections.Create(Self);\r\n FDirections.OnGetDirections:= {$IFDEF LCLLIB}@{$ENDIF}DoGetDirections;\r\n\r\n FLocation := TTMSFNCLocation.Create(Self);\r\n FLocation.OnGetLocation := {$IFDEF LCLLIB}@{$ENDIF}DoGetLocation;\r\n\r\n FRoutes := TTMSFNCRouteCalculatorRoutes.Create(Self);\r\n FOptions := TTMSFNCRouteCalculatorOptions.Create;\r\n\r\n {$IFDEF SENSORSUPPORT}\r\n FLocationSensor := TLocationSensor.Create(Self);\r\n FLocationSensor.OnLocationChanged := DoLocationChanged;\r\n {$ENDIF}\r\n\r\n// auto assign if fncmaps found\r\n// if IsDesignTime and Assigned(AOwner) and (AOwner is TCustomForm) then\r\n// begin\r\n// for I := 0 to AOwner.ComponentCount - 1 do\r\n// begin\r\n// if (AOwner.Components[i] is TTMSFNCCustomGrid) then\r\n// begin\r\n// Grid := AOwner.Components[i] as TTMSFNCCustomGrid;\r\n// Break;\r\n// end;\r\n// end;\r\n// end;\r\nend;\r\n\r\nfunction TTMSFNCCustomRouteCalculator.GeocodingReady: Boolean;\r\nbegin\r\n if Assigned(FGeocoding) then\r\n FGeocoding.APIKey := APIKey;\r\n Result := Assigned(FGeocoding) and (FGeocoding.APIKey <> '');\r\nend;\r\n\r\nprocedure TTMSFNCCustomRouteCalculator.DoCalculateRoute(const ARoute: TTMSFNCRouteCalculatorRoute; const ARouteInfo: TTMSFNCRouteCalculatorInfo);\r\nvar\r\n obj: TTMSFNCRouteCalculatorRouteCallBackWrapper;\r\nbegin\r\n if not Assigned(ARoute) or not Assigned(ARouteInfo) then\r\n Exit;\r\n\r\n if Assigned(ARouteInfo.FCallBack) then\r\n begin\r\n obj := TTMSFNCRouteCalculatorRouteCallBackWrapper(ARouteInfo.FCallBack);\r\n obj.FCallback(ARoute);\r\n obj.Free;\r\n end;\r\n\r\n if Assigned(OnCalculateRouteInternal) then\r\n OnCalculateRouteInternal(Self, ARoute);\r\n\r\n if Assigned(OnCalculateRoute) then\r\n OnCalculateRoute(Self, ARoute);\r\nend;\r\n\r\nprocedure TTMSFNCCustomRouteCalculator.DoCreateGPXSegment(\r\n AEventData: TTMSFNCMapsGPXSegmentEventData);\r\nbegin\r\n if Assigned(OnCreateGPXSegment) then\r\n OnCreateGPXSegment(Self, AEventData);\r\nend;\r\n\r\nprocedure TTMSFNCCustomRouteCalculator.DoCreateGPXTrack(\r\n AEventData: TTMSFNCMapsGPXTrackEventData);\r\nbegin\r\n if Assigned(OnCreateGPXTrack) then\r\n OnCreateGPXTrack(Self, AEventData);\r\nend;\r\n\r\nprocedure TTMSFNCCustomRouteCalculator.DoGetDirections(Sender: TObject;\r\n const ARequest: TTMSFNCDirectionsRequest;\r\n const ARequestResult: TTMSFNCCloudBaseRequestResult);\r\nvar\r\n o: TTMSFNCRouteCalculatorInfo;\r\n I: Integer;\r\n d: TTMSFNCDirectionsItem;\r\n r: TTMSFNCRouteCalculatorRoute;\r\n s, seg: TTMSFNCRouteCalculatorSegment;\r\n l: TTMSFNCDirectionsLeg;\r\n\r\n procedure ApplyLeg(ASegment: TTMSFNCRouteCalculatorSegment; ALeg: TTMSFNCDirectionsLeg);\r\n var\r\n K: Integer;\r\n la: TTMSFNCDirectionsLeg;\r\n sa: TTMSFNCRouteCalculatorAlternativeSegment;\r\n da: TTMSFNCDirectionsItem;\r\n begin\r\n ASegment.Coordinates.Assign(ALeg.Coordinates);\r\n if ALeg.StartAddress <> '' then\r\n ASegment.StartAddress := ALeg.StartAddress\r\n else\r\n ASegment.StartAddress := o.FStartAddress;\r\n if ALeg.EndAddress <> '' then\r\n ASegment.EndAddress := ALeg.EndAddress\r\n else\r\n ASegment.EndAddress := o.FEndAddress;\r\n ASegment.StartCoordinate.Assign(ALeg.StartLocation);\r\n ASegment.EndCoordinate.Assign(ALeg.EndLocation);\r\n ASegment.Duration := ALeg.Duration;\r\n ASegment.Distance := ALeg.Distance;\r\n\r\n ASegment.AlternativeSegments.Clear;\r\n\r\n for K := 1 to ARequest.Items.Count - 1 do\r\n begin\r\n da := ARequest.Items[K];\r\n\r\n if da.Legs.Count > 0 then\r\n begin\r\n if (ALeg.Index >= 0) and (ALeg.Index <= da.Legs.Count - 1) then\r\n begin\r\n la := da.Legs[ALeg.Index];\r\n sa := ASegment.AlternativeSegments.Add;\r\n sa.Coordinates.Assign(la.Coordinates);\r\n sa.StartCoordinate.Assign(la.StartLocation);\r\n sa.EndCoordinate.Assign(la.EndLocation);\r\n sa.Duration := la.Duration;\r\n sa.Distance := la.Distance;\r\n end;\r\n end;\r\n end;\r\n end;\r\n\r\nbegin\r\n o := nil;\r\n if ARequestResult.Success then\r\n begin\r\n if Assigned(ARequest.DataPointer) and (TObject(ARequest.DataPointer) is TTMSFNCRouteCalculatorInfo) then\r\n begin\r\n o := TTMSFNCRouteCalculatorInfo(ARequest.DataPointer);\r\n if Assigned(o) then\r\n begin\r\n if ARequest.Items.Count = 0 then\r\n DoCalculateRoute(nil, o)\r\n else\r\n begin\r\n if Options.HistoryEnabled then\r\n begin\r\n if HistoryManager.Count = 0 then \r\n HistoryManager.PushState('Initialize');\r\n end;\r\n\r\n d := ARequest.Items[0];\r\n\r\n if Assigned(o.FUpdateRoute) then\r\n begin\r\n r := o.FUpdateRoute;\r\n r.Steps.Clear;\r\n for I := 0 to d.Steps.Count - 1 do\r\n r.Steps.Add.Assign(d.Steps[I]);\r\n end\r\n else\r\n begin\r\n r := Routes.Add;\r\n r.ID := o.FID;\r\n r.Steps.Assign(d.Steps);\r\n end;\r\n\r\n if Length(o.FUpdateSegments) > 0 then\r\n begin\r\n for I := 0 to Length(o.FUpdateSegments) - 1 do\r\n begin\r\n s := o.FUpdateSegments[I];\r\n if I <= d.Legs.Count - 1 then\r\n ApplyLeg(s, d.Legs[I]);\r\n end;\r\n\r\n seg := o.FUpdateSegments[Length(o.FUpdateSegments) - 1];\r\n\r\n for I := Length(o.FUpdateSegments) to d.Legs.Count - 1 do\r\n begin\r\n s := r.Segments.Insert(seg.Index + 1);\r\n ApplyLeg(s, d.Legs[I]);\r\n end;\r\n end\r\n else\r\n begin\r\n for I := 0 to d.Legs.Count - 1 do\r\n begin\r\n s := r.Segments.Add;\r\n l := d.Legs[I];\r\n ApplyLeg(s, l);\r\n end;\r\n end;\r\n\r\n if Options.HistoryEnabled then\r\n HistoryManager.PushState('RouteAction' + IntToStr(HistoryManager.Count));\r\n\r\n DoCalculateRoute(r, o);\r\n end;\r\n end;\r\n end;\r\n end;\r\n\r\n if Assigned(o) then\r\n begin\r\n if Assigned(OnGetRouteDirections) then\r\n OnGetRouteDirections(Self, ARequest, ARequestResult);\r\n\r\n o.Free;\r\n end\r\n else\r\n begin\r\n if Assigned(OnGetDirections) then\r\n OnGetDirections(Self, ARequest, ARequestResult);\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomRouteCalculator.DoGetGeocoding(Sender: TObject; const ARequest: TTMSFNCGeocodingRequest;\r\n const ARequestResult: TTMSFNCCloudBaseRequestResult);\r\nvar\r\n o: TTMSFNCRouteCalculatorInfo;\r\n I: Integer;\r\nbegin\r\n o := nil;\r\n if ARequestResult.Success then\r\n begin\r\n if Assigned(ARequest.DataPointer) and (TObject(ARequest.DataPointer) is TTMSFNCRouteCalculatorInfo) then\r\n begin\r\n o := TTMSFNCRouteCalculatorInfo(ARequest.DataPointer);\r\n\r\n if ARequest.Items.Count > 0 then\r\n begin\r\n if ARequest.ID = 'Start' then\r\n begin\r\n o.FStartFound := True;\r\n o.FStartCoordinate := ARequest.Items[0].Coordinate.ToRec;\r\n o.FStartAddress := ARequest.Items[0].Address;\r\n end\r\n else if ARequest.ID = 'End' then\r\n begin\r\n o.FEndFound := True;\r\n o.FEndCoordinate := ARequest.Items[0].Coordinate.ToRec;\r\n o.FEndAddress := ARequest.Items[0].Address;\r\n end\r\n else if ARequest.ID = 'GPXStart' then\r\n begin\r\n o.FStartFound := False;\r\n o.FStartGeocoded := True;\r\n o.FStartAddress := ARequest.Items[0].Address;\r\n end\r\n else if ARequest.ID = 'GPXEnd' then\r\n begin\r\n o.FEndFound := False;\r\n o.FEndGeocoded := True;\r\n o.FEndAddress := ARequest.Items[0].Address;\r\n end;\r\n end;\r\n\r\n if o.FStartGeocoded and o.FEndGeocoded then\r\n begin\r\n if (FGeocoding.GetRequestCount(True) = 0) then\r\n begin\r\n //TODO : DoLoadGPXRouteComplete(s.Segments.Route);\r\n //raise Exception.Create('TODO');\r\n end;\r\n end;\r\n\r\n if o.FStartFound and o.FEndFound then\r\n begin\r\n if (o.FMode = cimAddDirections) then\r\n GetDirections(o.FStartCoordinate, o.FEndCoordinate, nil, o.FWayPoints, o.FID, o)\r\n else if o.FMode = cimUpdateDirections then\r\n begin\r\n for I := 0 to Length(o.FUpdateSegments) - 1 do\r\n UpdateRouteSegment(o.FUpdateSegments[I], o.FStartCoordinate, o.FEndCoordinate, TTMSFNCRouteCalculatorRouteCallBackWrapper(o.FCallBack).FCallback, o.FID, nil);\r\n\r\n o.Free;\r\n end;\r\n end;\r\n end;\r\n end;\r\n\r\n if Assigned(o) then\r\n begin\r\n if o.FMode <> cimDefault then\r\n begin\r\n if Assigned(OnGetRouteGeocoding) then\r\n OnGetRouteGeocoding(Self, ARequest, ARequestResult);\r\n end\r\n else\r\n o.Free;\r\n end\r\n else\r\n begin\r\n if Assigned(OnGetGeocoding) then\r\n OnGetGeocoding(Self, ARequest, ARequestResult);\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomRouteCalculator.DoGetLocation(Sender: TObject;\r\n const ARequest: TTMSFNCLocationRequest;\r\n const ARequestResult: TTMSFNCCloudBaseRequestResult);\r\nbegin\r\n if not ARequestResult.Success then\r\n Exit;\r\n\r\n if Assigned(OnGetLocation) then\r\n OnGetLocation(Self, ARequest.Coordinate.ToRec);\r\nend;\r\n\r\nprocedure TTMSFNCCustomRouteCalculator.DoLoadGPXRouteComplete(\r\n ARoute: TTMSFNCRouteCalculatorRoute);\r\nbegin\r\n if Assigned(OnLoadGPXRouteComplete) then\r\n OnLoadGPXRouteComplete(Self, ARoute);\r\nend;\r\n\r\n{$IFDEF SENSORSUPPORT}\r\nprocedure TTMSFNCCustomRouteCalculator.DoLocationChanged(Sender: TObject;\r\n const OldLocation, NewLocation: TLocationCoord2D);\r\nvar\r\n cr: TTMSFNCMapsCoordinateRec;\r\nbegin\r\n if Assigned(OnGetLocation) then\r\n begin\r\n FLocationSensor.Active := False;\r\n cr.Latitude := NewLocation.Latitude;\r\n cr.Longitude := NewLocation.Longitude;\r\n OnGetLocation(Self, cr);\r\n end;\r\nend;\r\n{$ENDIF}\r\n\r\nprocedure TTMSFNCCustomRouteCalculator.SaveToGPXFile(\r\n ARoute: TTMSFNCRouteCalculatorRoute; AFileName: string);\r\nbegin\r\n SaveToGPXFile(ARoute, AFileName, DefaultGPXMetaData);\r\nend;\r\n\r\nprocedure TTMSFNCCustomRouteCalculator.SaveRoutesToFile(AFileName: string);\r\nvar\r\n ms: TMemoryStream;\r\nbegin\r\n ms := TMemoryStream.Create;\r\n try\r\n SaveRoutesToStream(ms);\r\n ms.Position := 0;\r\n ms.SaveToFile(AFileName);\r\n finally\r\n ms.Free;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomRouteCalculator.SaveRoutesToStream(AStream: TStream);\r\nbegin\r\n TTMSFNCPersistence.SaveSettingsToStream(Routes, AStream);\r\nend;\r\n\r\nfunction TTMSFNCCustomRouteCalculator.SaveRoutesToText: string;\r\nvar\r\n s: TStringStream;\r\nbegin\r\n s := TStringStream.Create('');\r\n try\r\n SaveRoutesToStream(s);\r\n s.Position := 0;\r\n Result := s.DataString;\r\n finally\r\n s.Free;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomRouteCalculator.SaveToGPXFile(\r\n ARoute: TTMSFNCRouteCalculatorRoute; AFileName: string;\r\n AMetaData: TTMSFNCMapsGPXMetaData);\r\nvar\r\n sl: TStringList;\r\nbegin\r\n sl := TStringList.Create;\r\n try\r\n sl.Text := InternalSaveGPX(ARoute, AMetaData);\r\n sl.SaveToFile(AFileName);\r\n finally\r\n sl.Free;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomRouteCalculator.SaveToGPXStream(\r\n ARoute: TTMSFNCRouteCalculatorRoute; AStream: TStream);\r\nbegin\r\n SaveToGPXStream(ARoute, AStream, DefaultGPXMetaData);\r\nend;\r\n\r\nprocedure TTMSFNCCustomRouteCalculator.SaveToGPXStream(\r\n ARoute: TTMSFNCRouteCalculatorRoute; AStream: TStream;\r\n AMetaData: TTMSFNCMapsGPXMetaData);\r\nvar\r\n ss: TStringStream;\r\nbegin\r\n ss := TStringStream.Create(InternalSaveGPX(ARoute, AMetaData));\r\n try\r\n AStream.CopyFrom(ss, ss.Size);\r\n finally\r\n ss.Free;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCCustomRouteCalculator.SaveToGPXText(\r\n ARoute: TTMSFNCRouteCalculatorRoute): string;\r\nbegin\r\n Result := InternalSaveGPX(ARoute, DefaultGPXMetaData);\r\nend;\r\n\r\nfunction TTMSFNCCustomRouteCalculator.SaveToGPXText(\r\n ARoute: TTMSFNCRouteCalculatorRoute;\r\n AMetaData: TTMSFNCMapsGPXMetaData): string;\r\nbegin\r\n Result := InternalSaveGPX(ARoute, AMetaData);\r\nend;\r\n\r\nprocedure TTMSFNCCustomRouteCalculator.SetAPIKey(const Value: string);\r\nbegin\r\n if FAPIKey <> Value then\r\n FAPIKey := Value;\r\nend;\r\n\r\nprocedure TTMSFNCCustomRouteCalculator.SetRoutes(\r\n const Value: TTMSFNCRouteCalculatorRoutes);\r\nbegin\r\n FRoutes.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCCustomRouteCalculator.SetService(const Value: TTMSFNCRouteCalculatorService);\r\nbegin\r\n if FService <> Value then\r\n begin\r\n FLocation.Service := lsGoogle;\r\n\r\n FService := Value;\r\n case FService of\r\n csAzure:\r\n begin\r\n FGeocoding.Service := gsAzure;\r\n FDirections.Service := dsAzure;\r\n end;\r\n csBing:\r\n begin\r\n FGeocoding.Service := gsBing;\r\n FDirections.Service := dsBing;\r\n end;\r\n csGoogle:\r\n begin\r\n FGeocoding.Service := gsGoogle;\r\n FDirections.Service := dsGoogle;\r\n end;\r\n csHere:\r\n begin\r\n FGeocoding.Service := gsHere;\r\n FDirections.Service := dsHere;\r\n end;\r\n csMapBox:\r\n begin\r\n FGeocoding.Service := gsMapBox;\r\n FDirections.Service := dsMapBox;\r\n end;\r\n csOpenRouteService:\r\n begin\r\n FGeocoding.Service := gsOpenRouteService;\r\n FDirections.Service := dsOpenRouteService;\r\n end;\r\n csGeoApify:\r\n begin\r\n FGeocoding.Service := gsGeoApify;\r\n FDirections.Service := dsGeoApify;\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomRouteCalculator.UpdateRouteSegment(\r\n ASegment: TTMSFNCRouteCalculatorSegment; AStartCoordinate,\r\n AEndCoordinate: TTMSFNCMapsCoordinateRec;\r\n ACallback: TTMSFNCRouteCalculatorCalculateRouteCallback = nil; AID: string = '';\r\n ADataPointer: Pointer = nil);\r\nvar\r\n o: TTMSFNCRouteCalculatorInfo;\r\n ps, ns: TTMSFNCRouteCalculatorSegment;\r\n wp: TTMSFNCMapsCoordinateRecArray;\r\nbegin\r\n if not Assigned(ASegment) then\r\n Exit;\r\n\r\n o := TTMSFNCRouteCalculatorInfo.Create;\r\n o.FID := AID;\r\n ps := ASegment.PreviousSegment;\r\n ns := ASegment.NextSegment;\r\n o.FUpdateRoute := ASegment.Route;\r\n o.FMode := cimUpdateDirections;\r\n\r\n if Assigned(ps) and Assigned(ns) then\r\n begin\r\n o.FStartCoordinate := ps.StartCoordinate.ToRec;\r\n o.FEndCoordinate := ns.EndCoordinate.ToRec;\r\n SetLength(wp, Length(wp) + 1);\r\n wp[Length(wp) - 1] := AStartCoordinate;\r\n SetLength(wp, Length(wp) + 1);\r\n wp[Length(wp) - 1] := AEndCoordinate;\r\n SetLength(o.FUpdateSegments, 3);\r\n o.FUpdateSegments[0] := ps;\r\n o.FUpdateSegments[1] := ASegment;\r\n o.FUpdateSegments[2] := ns;\r\n end\r\n else if Assigned(ps) then\r\n begin\r\n o.FStartCoordinate := ps.StartCoordinate.ToRec;\r\n o.FEndCoordinate := AEndCoordinate;\r\n SetLength(wp, Length(wp) + 1);\r\n wp[Length(wp) - 1] := AStartCoordinate;\r\n SetLength(o.FUpdateSegments, 2);\r\n o.FUpdateSegments[0] := ps;\r\n o.FUpdateSegments[1] := ASegment;\r\n end\r\n else if Assigned(ns) then\r\n begin\r\n o.FStartCoordinate := AStartCoordinate;\r\n o.FEndCoordinate := ns.EndCoordinate.ToRec;\r\n SetLength(wp, Length(wp) + 1);\r\n wp[Length(wp) - 1] := AEndCoordinate;\r\n SetLength(o.FUpdateSegments, 2);\r\n o.FUpdateSegments[0] := ASegment;\r\n o.FUpdateSegments[1] := ns;\r\n end\r\n else\r\n begin\r\n o.FStartCoordinate := AStartCoordinate;\r\n o.FEndCoordinate := AEndCoordinate;\r\n SetLength(o.FUpdateSegments, 1);\r\n o.FUpdateSegments[0] := ASegment;\r\n end;\r\n\r\n if Assigned(ACallback) then\r\n o.FCallBack := TTMSFNCRouteCalculatorRouteCallBackWrapper.Create(ACallback)\r\n else\r\n o.FCallBack := nil;\r\n\r\n GetDirections(o.FStartCoordinate, o.FEndCoordinate, nil, wp, AID, o);\r\nend;\r\n\r\nprocedure TTMSFNCCustomRouteCalculator.UpdateRouteSegmentEndAddress(\r\n ASegment: TTMSFNCRouteCalculatorSegment; AEndAddress: string;\r\n ACallback: TTMSFNCRouteCalculatorCalculateRouteCallback; AID: string;\r\n ADataPointer: Pointer);\r\nbegin\r\n UpdateRouteSegment(ASegment, ASegment.StartAddress, AEndAddress, ACallBack, AID, ADataPointer);\r\nend;\r\n\r\nprocedure TTMSFNCCustomRouteCalculator.UpdateRouteSegmentEndCoordinate(\r\n ASegment: TTMSFNCRouteCalculatorSegment;\r\n AEndCoordinate: TTMSFNCMapsCoordinateRec;\r\n ACallback: TTMSFNCRouteCalculatorCalculateRouteCallback; AID: string;\r\n ADataPointer: Pointer);\r\nbegin\r\n UpdateRouteSegment(ASegment, ASegment.StartCoordinate.ToRec, AEndCoordinate, ACallBack, AID, ADataPointer);\r\nend;\r\n\r\nprocedure TTMSFNCCustomRouteCalculator.UpdateRouteSegmentStartAddress(\r\n ASegment: TTMSFNCRouteCalculatorSegment; AStartAddress: string;\r\n ACallback: TTMSFNCRouteCalculatorCalculateRouteCallback; AID: string;\r\n ADataPointer: Pointer);\r\nbegin\r\n UpdateRouteSegment(ASegment, AStartAddress, ASegment.EndAddress, ACallBack, AID, ADataPointer);\r\nend;\r\n\r\nprocedure TTMSFNCCustomRouteCalculator.UpdateRouteSegmentStartCoordinate(\r\n ASegment: TTMSFNCRouteCalculatorSegment;\r\n AStartCoordinate: TTMSFNCMapsCoordinateRec;\r\n ACallback: TTMSFNCRouteCalculatorCalculateRouteCallback; AID: string;\r\n ADataPointer: Pointer);\r\nbegin\r\n UpdateRouteSegment(ASegment, AStartCoordinate, ASegment.EndCoordinate.ToRec, ACallBack, AID, ADataPointer);\r\nend;\r\n\r\nprocedure TTMSFNCCustomRouteCalculator.UpdateRouteSegment(\r\n ASegment: TTMSFNCRouteCalculatorSegment; AStartAddress, AEndAddress: string;\r\n ACallback: TTMSFNCRouteCalculatorCalculateRouteCallback = nil; AID: string = '';\r\n ADataPointer: Pointer = nil);\r\nvar\r\n o: TTMSFNCRouteCalculatorInfo;\r\nbegin\r\n if not Assigned(ASegment) then\r\n Exit;\r\n\r\n o := TTMSFNCRouteCalculatorInfo.Create;\r\n o.FID := AID;\r\n\r\n o.FStartAddress := AStartAddress;\r\n o.FEndAddress := AEndAddress;\r\n o.FUpdateRoute := ASegment.Route;\r\n o.FMode := cimUpdateDirections;\r\n\r\n SetLength(o.FUpdateSegments, 1);\r\n o.FUpdateSegments[0] := ASegment;\r\n\r\n if Assigned(ACallback) then\r\n o.FCallBack := TTMSFNCRouteCalculatorRouteCallBackWrapper.Create(ACallback)\r\n else\r\n o.FCallBack := nil;\r\n\r\n GetGeocoding(o.FEndAddress, nil, 'End', o);\r\n GetGeocoding(o.FStartAddress, nil, 'Start', o);\r\nend;\r\n\r\nprocedure TTMSFNCCustomRouteCalculator.DeleteRoute(\r\n ARoute: TTMSFNCRouteCalculatorRoute);\r\nbegin\r\n if not Assigned(ARoute) then\r\n Exit;\r\n\r\n ARoute.Free;\r\nend;\r\n\r\nprocedure TTMSFNCCustomRouteCalculator.DeleteRouteSegment(\r\n ASegment: TTMSFNCRouteCalculatorSegment; ACallback: TTMSFNCRouteCalculatorCalculateRouteCallback = nil);\r\nvar\r\n ps, ns: TTMSFNCRouteCalculatorSegment;\r\n et, st: TTMSFNCMapsCoordinateRec;\r\n r: TTMSFNCRouteCalculatorRoute;\r\n o: TTMSFNCRouteCalculatorInfo;\r\nbegin\r\n if not Assigned(ASegment) then\r\n Exit;\r\n\r\n if Assigned(ASegment.Route) and (ASegment.Route.Segments.Count = 1) then\r\n begin\r\n r := ASegment.Route;\r\n ASegment.Free;\r\n if Assigned(ACallback) then\r\n ACallback(r);\r\n o := TTMSFNCRouteCalculatorInfo.Create;\r\n DoCalculateRoute(r, o);\r\n o.Free;\r\n r.Free;\r\n Exit;\r\n end;\r\n\r\n ps := ASegment.PreviousSegment;\r\n ns := ASegment.NextSegment;\r\n\r\n et := ASegment.EndCoordinate.ToRec;\r\n st := ASegment.StartCoordinate.ToRec;\r\n\r\n ASegment.Free;\r\n\r\n if Assigned(ps) then\r\n UpdateRouteSegmentEndCoordinate(ps, st, ACallback)\r\n else if Assigned(ns) then\r\n UpdateRouteSegmentStartCoordinate(ns, et, ACallback)\r\nend;\r\n\r\ndestructor TTMSFNCCustomRouteCalculator.Destroy;\r\nbegin\r\n if Assigned(FHistoryManager) then\r\n FHistoryManager.Free;\r\n FGeocoding.Free;\r\n FGeocoding := nil;\r\n FDirections.Free;\r\n FDirections := nil;\r\n FLocation.Free;\r\n FLocation := nil;\r\n FRoutes.Free;\r\n FOptions.Free;\r\n {$IFDEF SENSORSUPPORT}\r\n FLocationSensor.Free;\r\n FLocationSensor := nil;\r\n {$ENDIF}\r\n inherited;\r\nend;\r\n\r\nfunction TTMSFNCCustomRouteCalculator.DirectionsReady: Boolean;\r\nbegin\r\n if Assigned(FDirections) then\r\n FDirections.APIKey := APIKey;\r\n Result := Assigned(FDirections) and (FDirections.APIKey <> '');\r\nend;\r\n\r\n{ TTMSFNCRouteCalculatorSegment }\r\n\r\nprocedure TTMSFNCRouteCalculatorSegment.Assign(Source: TPersistent);\r\nbegin\r\n if Source is TTMSFNCRouteCalculatorSegment then\r\n begin\r\n FCoordinates.Assign(TTMSFNCRouteCalculatorSegment(Source).Coordinates);\r\n FDistance := TTMSFNCRouteCalculatorSegment(Source).Distance;\r\n FDuration := TTMSFNCRouteCalculatorSegment(Source).Duration;\r\n FID := (Source as TTMSFNCRouteCalculatorSegment).ID;\r\n FStartAddress := (Source as TTMSFNCRouteCalculatorSegment).StartAddress;\r\n FEndAddress := (Source as TTMSFNCRouteCalculatorSegment).EndAddress;\r\n FStartCoordinate.Assign((Source as TTMSFNCRouteCalculatorSegment).StartCoordinate);\r\n FEndCoordinate.Assign((Source as TTMSFNCRouteCalculatorSegment).EndCoordinate);\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCRouteCalculatorSegment.SetAlternativeSegments(\r\n const Value: TTMSFNCRouteCalculatorAlternativeSegments);\r\nbegin\r\n FAlternativeSegments.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCRouteCalculatorSegment.SetCoordinates(\r\n const Value: TTMSFNCMapsCoordinates);\r\nbegin\r\n FCoordinates.Assign(Value);\r\nend;\r\n\r\nconstructor TTMSFNCRouteCalculatorSegment.Create(ACollection: TCollection);\r\nbegin\r\n inherited;\r\n if Assigned(ACollection) and (Collection is TTMSFNCRouteCalculatorSegments) then\r\n FOwner := (Collection as TTMSFNCRouteCalculatorSegments);\r\n\r\n FID := '';\r\n FStartAddress := '';\r\n FEndAddress := '';\r\n FStartCoordinate := TTMSFNCMapsCoordinate.Create;\r\n FEndCoordinate := TTMSFNCMapsCoordinate.Create;\r\n\r\n FCoordinates := TTMSFNCMapsCoordinates.Create(Self);\r\n FDistance := 0;\r\n FDuration := 0;\r\n\r\n FAlternativeSegments := TTMSFNCRouteCalculatorAlternativeSegments.Create(Self);\r\nend;\r\n\r\ndestructor TTMSFNCRouteCalculatorSegment.Destroy;\r\nbegin\r\n FAlternativeSegments.Free;\r\n FCoordinates.Free;\r\n FStartCoordinate.Free;\r\n FEndCoordinate.Free;\r\n inherited;\r\nend;\r\n\r\nfunction TTMSFNCRouteCalculatorSegment.GetPolyline: TTMSFNCMapsCoordinateRecArray;\r\nvar\r\n I: Integer;\r\n r: TTMSFNCMapsCoordinateRec;\r\nbegin\r\n SetLength(Result, 0);\r\n SetLength(Result, Coordinates.Count);\r\n for I := 0 to Coordinates.Count - 1 do\r\n begin\r\n r := EmptyCoordinate;\r\n r.Latitude := Coordinates[I].Latitude;\r\n r.Longitude := Coordinates[I].Longitude;\r\n Result[I] := r;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCRouteCalculatorSegment.GetRoute: TTMSFNCRouteCalculatorRoute;\r\nbegin\r\n Result := nil;\r\n if Assigned(Segments) then\r\n Result := Segments.Route;\r\nend;\r\n\r\nfunction TTMSFNCRouteCalculatorSegment.GetSegments: TTMSFNCRouteCalculatorSegments;\r\nbegin\r\n Result := FOwner;\r\nend;\r\n\r\nfunction TTMSFNCRouteCalculatorSegment.GetNextSegment: TTMSFNCRouteCalculatorSegment;\r\nvar\r\n i: Integer;\r\nbegin\r\n Result := nil;\r\n\r\n if not Assigned(FOwner) then\r\n Exit;\r\n\r\n i := Self.Index;\r\n if (i + 1) < FOwner.Count then\r\n Result := FOwner[i + 1];\r\nend;\r\n\r\nfunction TTMSFNCRouteCalculatorSegment.GetPreviousSegment: TTMSFNCRouteCalculatorSegment;\r\nvar\r\n i: Integer;\r\nbegin\r\n Result := nil;\r\n\r\n if not Assigned(FOwner) then\r\n Exit;\r\n\r\n i := Self.Index;\r\n if (i > 0) and (i < FOwner.Count) then\r\n Result := FOwner[i - 1];\r\nend;\r\n\r\n{ TTMSFNCRouteCalculatorSegments }\r\n\r\nfunction TTMSFNCRouteCalculatorSegments.Add: TTMSFNCRouteCalculatorSegment;\r\nbegin\r\n Result := TTMSFNCRouteCalculatorSegment(inherited Add);\r\nend;\r\n\r\nconstructor TTMSFNCRouteCalculatorSegments.Create(AOwner: TTMSFNCRouteCalculatorRoute);\r\nbegin\r\n inherited Create(AOwner, CreateItemClass);\r\n FOwner := AOwner;\r\nend;\r\n\r\nfunction TTMSFNCRouteCalculatorSegments.CreateItemClass: TCollectionItemClass;\r\nbegin\r\n Result := TTMSFNCRouteCalculatorSegment;\r\nend;\r\n\r\nfunction TTMSFNCRouteCalculatorSegments.GetItem(\r\n Index: Integer): TTMSFNCRouteCalculatorSegment;\r\nbegin\r\n Result := TTMSFNCRouteCalculatorSegment(inherited Items[Index]);\r\nend;\r\n\r\nfunction TTMSFNCRouteCalculatorSegments.GetOwner: TPersistent;\r\nbegin\r\n Result := FOwner;\r\nend;\r\n\r\nfunction TTMSFNCRouteCalculatorSegments.GetRoute: TTMSFNCRouteCalculatorRoute;\r\nbegin\r\n Result := FOwner;\r\nend;\r\n\r\nfunction TTMSFNCRouteCalculatorSegments.Insert(\r\n Index: Integer): TTMSFNCRouteCalculatorSegment;\r\nbegin\r\n Result := TTMSFNCRouteCalculatorSegment(inherited Insert(Index));\r\nend;\r\n\r\nprocedure TTMSFNCRouteCalculatorSegments.SetItem(Index: Integer;\r\n const Value: TTMSFNCRouteCalculatorSegment);\r\nbegin\r\n inherited Items[Index] := Value;\r\nend;\r\n\r\n{ TTMSFNCRouteCalculatorAlternativeSegment }\r\n\r\nprocedure TTMSFNCRouteCalculatorAlternativeSegment.Assign(Source: TPersistent);\r\nbegin\r\n if Source is TTMSFNCRouteCalculatorAlternativeSegment then\r\n begin\r\n FCoordinates.Assign(TTMSFNCRouteCalculatorAlternativeSegment(Source).Coordinates);\r\n FDistance := TTMSFNCRouteCalculatorAlternativeSegment(Source).Distance;\r\n FDuration := TTMSFNCRouteCalculatorAlternativeSegment(Source).Duration;\r\n FStartCoordinate.Assign((Source as TTMSFNCRouteCalculatorAlternativeSegment).StartCoordinate);\r\n FEndCoordinate.Assign((Source as TTMSFNCRouteCalculatorAlternativeSegment).EndCoordinate);\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCRouteCalculatorAlternativeSegment.SetCoordinates(\r\n const Value: TTMSFNCMapsCoordinates);\r\nbegin\r\n FCoordinates.Assign(Value);\r\nend;\r\n\r\nconstructor TTMSFNCRouteCalculatorAlternativeSegment.Create(ACollection: TCollection);\r\nbegin\r\n inherited;\r\n if Assigned(ACollection) and (Collection is TTMSFNCRouteCalculatorAlternativeSegments) then\r\n FOwner := (Collection as TTMSFNCRouteCalculatorAlternativeSegments);\r\n\r\n FStartCoordinate := TTMSFNCMapsCoordinate.Create;\r\n FEndCoordinate := TTMSFNCMapsCoordinate.Create;\r\n\r\n FCoordinates := TTMSFNCMapsCoordinates.Create(Self);\r\n FDistance := 0;\r\n FDuration := 0;\r\nend;\r\n\r\ndestructor TTMSFNCRouteCalculatorAlternativeSegment.Destroy;\r\nbegin\r\n FCoordinates.Free;\r\n FStartCoordinate.Free;\r\n FEndCoordinate.Free;\r\n inherited;\r\nend;\r\n\r\nfunction TTMSFNCRouteCalculatorAlternativeSegment.GetPolyline: TTMSFNCMapsCoordinateRecArray;\r\nvar\r\n I: Integer;\r\n r: TTMSFNCMapsCoordinateRec;\r\nbegin\r\n SetLength(Result, 0);\r\n SetLength(Result, Coordinates.Count);\r\n for I := 0 to Coordinates.Count - 1 do\r\n begin\r\n r := EmptyCoordinate;\r\n r.Latitude := Coordinates[I].Latitude;\r\n r.Longitude := Coordinates[I].Longitude;\r\n Result[I] := r;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCRouteCalculatorAlternativeSegment.GetSegment: TTMSFNCRouteCalculatorSegment;\r\nbegin\r\n Result := nil;\r\n if Assigned(FOwner) then\r\n Result := FOwner.Segment;\r\nend;\r\n\r\n{ TTMSFNCRouteCalculatorAlternativeSegments }\r\n\r\nfunction TTMSFNCRouteCalculatorAlternativeSegments.Add: TTMSFNCRouteCalculatorAlternativeSegment;\r\nbegin\r\n Result := TTMSFNCRouteCalculatorAlternativeSegment(inherited Add);\r\nend;\r\n\r\nconstructor TTMSFNCRouteCalculatorAlternativeSegments.Create(AOwner: TTMSFNCRouteCalculatorSegment);\r\nbegin\r\n inherited Create(AOwner, CreateItemClass);\r\n FOwner := AOwner;\r\nend;\r\n\r\nfunction TTMSFNCRouteCalculatorAlternativeSegments.CreateItemClass: TCollectionItemClass;\r\nbegin\r\n Result := TTMSFNCRouteCalculatorAlternativeSegment;\r\nend;\r\n\r\nfunction TTMSFNCRouteCalculatorAlternativeSegments.GetItem(\r\n Index: Integer): TTMSFNCRouteCalculatorAlternativeSegment;\r\nbegin\r\n Result := TTMSFNCRouteCalculatorAlternativeSegment(inherited Items[Index]);\r\nend;\r\n\r\nfunction TTMSFNCRouteCalculatorAlternativeSegments.GetOwner: TPersistent;\r\nbegin\r\n Result := FOwner;\r\nend;\r\n\r\nfunction TTMSFNCRouteCalculatorAlternativeSegments.GetSegment: TTMSFNCRouteCalculatorSegment;\r\nbegin\r\n Result := FOwner;\r\nend;\r\n\r\nfunction TTMSFNCRouteCalculatorAlternativeSegments.Insert(\r\n Index: Integer): TTMSFNCRouteCalculatorAlternativeSegment;\r\nbegin\r\n Result := TTMSFNCRouteCalculatorAlternativeSegment(inherited Insert(Index));\r\nend;\r\n\r\nprocedure TTMSFNCRouteCalculatorAlternativeSegments.SetItem(Index: Integer;\r\n const Value: TTMSFNCRouteCalculatorAlternativeSegment);\r\nbegin\r\n inherited Items[Index] := Value;\r\nend;\r\n\r\n\r\n{ TTMSFNCRouteCalculatorRoute }\r\n\r\nprocedure TTMSFNCRouteCalculatorRoute.Assign(Source: TPersistent);\r\nbegin\r\n if Source is TTMSFNCRouteCalculatorRoute then\r\n begin\r\n FSegments.Assign((Source as TTMSFNCRouteCalculatorRoute).Segments);\r\n FID := (Source as TTMSFNCRouteCalculatorRoute).ID;\r\n FRouteName := (Source as TTMSFNCRouteCalculatorRoute).RouteName;\r\n FActive := (Source as TTMSFNCRouteCalculatorRoute).Active;\r\n FSteps.Assign((Source as TTMSFNCRouteCalculatorRoute).Steps);\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCRouteCalculatorRoute.SetSteps(const Value: TTMSFNCDirectionsSteps);\r\nbegin\r\n FSteps.Assign(Value);\r\nend;\r\n\r\nconstructor TTMSFNCRouteCalculatorRoute.Create(ACollection: TCollection);\r\nbegin\r\n inherited;\r\n if Assigned(ACollection) and (Collection is TTMSFNCRouteCalculatorRoutes) then\r\n FOwner := (Collection as TTMSFNCRouteCalculatorRoutes).RouteCalculator;\r\n\r\n FSegments := TTMSFNCRouteCalculatorSegments.Create(Self);\r\n FID := '';\r\n FStartAddress := '';\r\n FEndAddress := '';\r\n FRouteName := '';\r\n FActive := True;\r\n FStartCoordinate := TTMSFNCMapsCoordinate.Create;\r\n FEndCoordinate := TTMSFNCMapsCoordinate.Create;\r\n FSteps := TTMSFNCDirectionsSteps.Create(Self);\r\nend;\r\n\r\ndestructor TTMSFNCRouteCalculatorRoute.Destroy;\r\nbegin\r\n FSteps.Free;\r\n FStartCoordinate.Free;\r\n FEndCoordinate.Free;\r\n FSegments.Free;\r\n inherited;\r\nend;\r\n\r\nfunction TTMSFNCRouteCalculatorRoute.FirstSegment: TTMSFNCRouteCalculatorSegment;\r\nbegin\r\n if Segments.Count > 0 then\r\n Result := Segments[0]\r\n else\r\n Result := nil;\r\nend;\r\n\r\nfunction TTMSFNCRouteCalculatorRoute.GetDistance: Double;\r\nvar\r\n I: Integer;\r\nbegin\r\n Result := 0;\r\n for I := 0 to Segments.Count - 1 do\r\n Result := Result + Segments[I].Distance;\r\nend;\r\n\r\nfunction TTMSFNCRouteCalculatorRoute.GetDuration: Double;\r\nvar\r\n I: Integer;\r\nbegin\r\n Result := 0;\r\n for I := 0 to Segments.Count - 1 do\r\n Result := Result + Segments[I].Duration;\r\nend;\r\n\r\nfunction TTMSFNCRouteCalculatorRoute.GetPolyline: TTMSFNCMapsCoordinateRecArray;\r\nvar\r\n I, J, K: Integer;\r\n r: TTMSFNCMapsCoordinateRec;\r\nbegin\r\n SetLength(Result, 0);\r\n K := 0;\r\n for I := 0 to Segments.Count - 1 do\r\n begin\r\n for J := 0 to Segments[I].Coordinates.Count - 1 do\r\n begin\r\n SetLength(Result, K + 1);\r\n r := EmptyCoordinate;\r\n r.Latitude := Segments[I].Coordinates[J].Latitude;\r\n r.Longitude := Segments[I].Coordinates[J].Longitude;\r\n Result[K] := r;\r\n K := K + 1;\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCRouteCalculatorRoute.GetRouteCalculator: TTMSFNCCustomRouteCalculator;\r\nbegin\r\n Result := FOwner;\r\nend;\r\n\r\nfunction TTMSFNCRouteCalculatorRoute.GetWayPoints: TTMSFNCMapsCoordinateRecArray;\r\nvar\r\n I, J: Integer;\r\n r: TTMSFNCMapsCoordinateRec;\r\nbegin\r\n Result := nil;\r\n if Segments.Count = 0 then\r\n Exit;\r\n \r\n J := Segments.Count;\r\n SetLength(Result, J + 1);\r\n for I := 0 to Segments.Count - 1 do\r\n begin\r\n r := EmptyCoordinate;\r\n r.Latitude := Segments[I].StartCoordinate.Latitude;\r\n r.Longitude := Segments[I].StartCoordinate.Longitude;\r\n r.Description := Segments[I].StartAddress;\r\n Result[I] := r;\r\n end;\r\n\r\n r := EmptyCoordinate;\r\n r.Latitude := Segments[J - 1].EndCoordinate.Latitude;\r\n r.Longitude := Segments[J - 1].EndCoordinate.Longitude;\r\n r.Description := Segments[J - 1].EndAddress;\r\n Result[J] := r;\r\nend;\r\n\r\nfunction TTMSFNCRouteCalculatorRoute.LastSegment: TTMSFNCRouteCalculatorSegment;\r\nbegin\r\n if Segments.Count > 0 then\r\n Result := Segments[Segments.Count - 1]\r\n else\r\n Result := nil;\r\nend;\r\n\r\n{ TTMSFNCRouteCalculatorRoutes }\r\n\r\nfunction TTMSFNCRouteCalculatorRoutes.Add: TTMSFNCRouteCalculatorRoute;\r\nbegin\r\n Result := TTMSFNCRouteCalculatorRoute(inherited Add);\r\nend;\r\n\r\nconstructor TTMSFNCRouteCalculatorRoutes.Create(AOwner: TTMSFNCCustomRouteCalculator);\r\nbegin\r\n inherited Create(AOwner, CreateItemClass);\r\n FOwner := AOwner;\r\nend;\r\n\r\nfunction TTMSFNCRouteCalculatorRoutes.CreateItemClass: TCollectionItemClass;\r\nbegin\r\n Result := TTMSFNCRouteCalculatorRoute;\r\nend;\r\n\r\nfunction TTMSFNCRouteCalculatorRoutes.GetItem(\r\n Index: Integer): TTMSFNCRouteCalculatorRoute;\r\nbegin\r\n Result := TTMSFNCRouteCalculatorRoute(inherited Items[Index]);\r\nend;\r\n\r\nfunction TTMSFNCRouteCalculatorRoutes.GetOwner: TPersistent;\r\nbegin\r\n Result := FOwner;\r\nend;\r\n\r\nfunction TTMSFNCRouteCalculatorRoutes.GetRouteCalculator: TTMSFNCCustomRouteCalculator;\r\nbegin\r\n Result := FOwner;\r\nend;\r\n\r\nfunction TTMSFNCRouteCalculatorRoutes.Insert(\r\n Index: Integer): TTMSFNCRouteCalculatorRoute;\r\nbegin\r\n Result := TTMSFNCRouteCalculatorRoute(inherited Insert(Index));\r\nend;\r\n\r\nprocedure TTMSFNCRouteCalculatorRoutes.SetItem(Index: Integer;\r\n const Value: TTMSFNCRouteCalculatorRoute);\r\nbegin\r\n inherited Items[Index] := Value;\r\nend;\r\n\r\n{ TTMSFNCRouteCalculatorDirectionsItems }\r\n\r\nfunction TTMSFNCRouteCalculatorDirectionsItems.Add: TTMSFNCDirectionsItem;\r\nbegin\r\n Result := TTMSFNCDirectionsItem(inherited Add);\r\nend;\r\n\r\nconstructor TTMSFNCRouteCalculatorDirectionsItems.Create(AOwner: TTMSFNCRouteCalculatorSegment);\r\nbegin\r\n inherited Create(AOwner, CreateItemClass);\r\n FOwner := AOwner;\r\nend;\r\n\r\nfunction TTMSFNCRouteCalculatorDirectionsItems.CreateItemClass: TCollectionItemClass;\r\nbegin\r\n Result := TTMSFNCDirectionsItem;\r\nend;\r\n\r\nfunction TTMSFNCRouteCalculatorDirectionsItems.GetItem(\r\n Index: Integer): TTMSFNCDirectionsItem;\r\nbegin\r\n Result := TTMSFNCDirectionsItem(inherited Items[Index]);\r\nend;\r\n\r\nfunction TTMSFNCRouteCalculatorDirectionsItems.GetOwner: TPersistent;\r\nbegin\r\n Result := FOwner;\r\nend;\r\n\r\nfunction TTMSFNCRouteCalculatorDirectionsItems.Insert(\r\n Index: Integer): TTMSFNCDirectionsItem;\r\nbegin\r\n Result := TTMSFNCDirectionsItem(inherited Insert(Index));\r\nend;\r\n\r\nprocedure TTMSFNCRouteCalculatorDirectionsItems.SetItem(Index: Integer;\r\n const Value: TTMSFNCDirectionsItem);\r\nbegin\r\n inherited Items[Index] := Value;\r\nend;\r\n\r\n\r\n{ TTMSFNCRouteCalculator }\r\n\r\nprocedure TTMSFNCRouteCalculator.RegisterRuntimeClasses;\r\nbegin\r\n inherited;\r\n RegisterClasses([TTMSFNCRouteCalculator, TTMSFNCRouteCalculatorRoute, TTMSFNCRouteCalculatorSegment,\r\n TTMSFNCMapsCoordinateItem, TTMSFNCMapsCoordinate, TTMSFNCDirectionsStep, TTMSFNCDirectionsItem, TTMSFNCRouteCalculatorAlternativeSegment]);\r\nend;\r\n\r\n{ TTMSFNCRouteCalculatorRouteCallBackWrapper }\r\n\r\nconstructor TTMSFNCRouteCalculatorRouteCallBackWrapper.Create(\r\n ACallback: TTMSFNCRouteCalculatorCalculateRouteCallback);\r\nbegin\r\n FCallback := ACallback;\r\nend;\r\n\r\n{ TTMSFNCRouteCalculatorOptions }\r\n\r\nprocedure TTMSFNCRouteCalculatorOptions.Assign(Source: TPersistent);\r\nbegin\r\n if Source is TTMSFNCRouteCalculatorOptions then\r\n begin\r\n FAvoidTolls := (Source as TTMSFNCRouteCalculatorOptions).AvoidTolls;\r\n FIncludeAlternativeRoutes := (Source as TTMSFNCRouteCalculatorOptions).IncludeAlternativeRoutes;\r\n FTravelMode := (Source as TTMSFNCRouteCalculatorOptions).TravelMode;\r\n FPolyline.Assign((Source as TTMSFNCRouteCalculatorOptions).Polyline);\r\n FHistoryEnabled := (Source as TTMSFNCRouteCalculatorOptions).HistoryEnabled;\r\n FLocale := (Source as TTMSFNCRouteCalculatorOptions).Locale;\r\n FLocaleMode := (Source as TTMSFNCRouteCalculatorOptions).LocaleMode;\r\n end;\r\nend;\r\n\r\nconstructor TTMSFNCRouteCalculatorOptions.Create;\r\nbegin\r\n inherited;\r\n FHistoryEnabled := False;\r\n FAvoidTolls := False;\r\n FIncludeAlternativeRoutes := False;\r\n FTravelMode := tmDriving;\r\n FPolyline := TTMSFNCRouteCalculatorPolylineOptions.Create;\r\n FLocale := '';\r\n FLocaleMode := mlmDefault;\r\nend;\r\n\r\ndestructor TTMSFNCRouteCalculatorOptions.Destroy;\r\nbegin\r\n FPolyline.Free;\r\n inherited;\r\nend;\r\n\r\nprocedure TTMSFNCRouteCalculatorOptions.SetPolyline(\r\n const Value: TTMSFNCRouteCalculatorPolylineOptions);\r\nbegin\r\n FPolyline.Assign(Value);\r\nend;\r\n\r\n{ TTMSFNCRouteCalculatorPolylineOptions }\r\n\r\nprocedure TTMSFNCRouteCalculatorPolylineOptions.Assign(Source: TPersistent);\r\nbegin\r\n if Source is TTMSFNCRouteCalculatorPolylineOptions then\r\n begin\r\n FStartMarker := (Source as TTMSFNCRouteCalculatorPolylineOptions).FStartMarker;\r\n FEndMarker := (Source as TTMSFNCRouteCalculatorPolylineOptions).FEndMarker;\r\n FWayPointMarker := (Source as TTMSFNCRouteCalculatorPolylineOptions).FWayPointMarker;\r\n FAddWayPointMarker := (Source as TTMSFNCRouteCalculatorPolylineOptions).FAddWayPointMarker;\r\n FSelectedWayPointMarker := (Source as TTMSFNCRouteCalculatorPolylineOptions).FSelectedWayPointMarker;\r\n FStrokeColor := (Source as TTMSFNCRouteCalculatorPolylineOptions).FStrokeColor;\r\n FStrokeWidth := (Source as TTMSFNCRouteCalculatorPolylineOptions).FStrokeWidth;\r\n FStrokeOpacity := (Source as TTMSFNCRouteCalculatorPolylineOptions).FStrokeOpacity;\r\n FSelectedStrokeColor := (Source as TTMSFNCRouteCalculatorPolylineOptions).FSelectedStrokeColor;\r\n end;\r\nend;\r\n\r\nconstructor TTMSFNCRouteCalculatorPolylineOptions.Create;\r\nbegin\r\n inherited;\r\n StartMarker := '';\r\n EndMarker := '';\r\n WayPointMarker := '';\r\n AddWayPointMarker := '';\r\n SelectedWayPointMarker := '';\r\n StrokeColor := gcBlue;\r\n StrokeWidth := 5;\r\n StrokeOpacity := 1.0;\r\n SelectedStrokeColor := gcRed;\r\nend;\r\n\r\ndestructor TTMSFNCRouteCalculatorPolylineOptions.Destroy;\r\nbegin\r\n inherited;\r\nend;\r\n\r\nfunction TTMSFNCRouteCalculatorPolylineOptions.IsStrokeOpacityStored: Boolean;\r\nbegin\r\n Result := StrokeOpacity <> 1;\r\nend;\r\n\r\nprocedure TTMSFNCRouteCalculatorPolylineOptions.SetStrokeOpacity(\r\n const Value: Single);\r\nbegin\r\n FStrokeOpacity := Value;\r\nend;\r\n\r\n{ TTMSFNCRouteCalculatorInfo }\r\n\r\nconstructor TTMSFNCRouteCalculatorInfo.Create;\r\nbegin\r\n FStartCoordinate := EmptyCoordinate;\r\n FEndCoordinate := EmptyCoordinate;\r\n FStartFound := False;\r\n FStartGeocoded := False;\r\n FEndFound := False;\r\n FEndGeocoded := False;\r\n FMode := cimDefault;\r\n SetLength(FUpdateSegments, 0);\r\nend;\r\n\r\ndestructor TTMSFNCRouteCalculatorInfo.Destroy;\r\nbegin\r\n FCallBack := nil;\r\n inherited;\r\nend;\r\n\r\nend.\r\n","{********************************************************************}\r\n{ }\r\n{ written by TMS Software }\r\n{ copyright (c) 2020 - 2025 }\r\n{ Email : info@tmssoftware.com }\r\n{ Web : http://www.tmssoftware.com }\r\n{ }\r\n{ The source code is given as is. The author is not responsible }\r\n{ for any possible damage done due to the use of this code. }\r\n{ The complete source code remains property of the author and may }\r\n{ not be distributed, published, given or sold in any form as such. }\r\n{ No parts of the source code can be included in any other component }\r\n{ or application without written authorization of the author. }\r\n{********************************************************************}\r\n\r\nunit WEBLib.TMSFNCMaps.GoogleMaps;\r\n\r\n{$I WEBLib.TMSFNCDefines.inc}\r\n\r\n{$IFDEF WEBLIB}\r\n{$DEFINE LCLWEBLIB}\r\n{$ENDIF}\r\n{$IFDEF LCLLIB}\r\n{$DEFINE LCLWEBLIB}\r\n{$ENDIF}\r\n\r\ninterface\r\n\r\nconst\r\n GOOGLEMAPSAPIURL = 'https://maps.googleapis.com/maps/api/';\r\n MAPSERVICEVAR = 'window.google.maps';\r\n MAPCALCLAYER = 'calclayer';\r\n\r\nprocedure RegisterGoogleMapsService;\r\nprocedure UnRegisterGoogleMapsService;\r\n\r\nimplementation\r\n\r\nuses\r\n Classes, Math, DateUtils, Types, SysUtils, WEBLib.TMSFNCMaps, WEBLib.TMSFNCUtils, WEBLib.TMSFNCTypes, WEBLib.TMSFNCGraphics, WEBLib.TMSFNCMapsCommonTypes\r\n {$IFDEF WEBLIB}\r\n ,Contnrs, Web\r\n {$ENDIF}\r\n {$IFNDEF LCLWEBLIB}\r\n ,Generics.Collections, Generics.Defaults\r\n {$HINTS OFF}\r\n {$IF COMPILERVERSION > 22}\r\n , UITypes\r\n {$IFEND}\r\n {$HINTS ON}\r\n {$ENDIF}\r\n {$IFDEF LCLLIB}\r\n ,fgl\r\n {$ENDIF}\r\n ;\r\n\r\ntype\r\n TTMSFNCMapsGoogleMapsService = class;\r\n\r\n TTMSFNCMapsGoogleMapsFactoryService = class(TTMSFNCMapsFactoryService, ITMSFNCMapsServiceGoogleMaps);\r\n\r\n TTMSFNCMapsGoogleMapsService = class(TTMSFNCMapsGoogleMapsFactoryService)\r\n protected\r\n function DoCreateMaps: ITMSFNCCustomMaps; override;\r\n end;\r\n\r\ntype\r\n TTMSFNCMapsGoogleMaps = class;\r\n\r\n TTMSFNCMapsGoogleMaps = class(TTMSFNCCustomMapsInterfacedObject, ITMSFNCCustomMaps)\r\n protected\r\n procedure GetHeadLinks(const AList: TTMSFNCMapsLinksList);\r\n procedure RemoveScripts;\r\n function GetResetMap: string;\r\n function GetShowPopup: string;\r\n function GetClosePopup: string;\r\n function GetHeadStyle: string;\r\n function GetDelayLoadEvent: string;\r\n function GetMapsServiceCheck: string;\r\n function GetIdentifier: string;\r\n function GetInitializeMap: string;\r\n function GetInitializeEvents: string;\r\n function GetAddOrUpdateMarker: string;\r\n function GetDeleteMarker: string;\r\n function GetAddOrUpdatePolyElement: string;\r\n function GetDeletePolyElement: string;\r\n function GetZoomToBounds: string;\r\n function GetGetCenterCoordinate: string;\r\n function GetGetBounds: string;\r\n function GetGetZoomLevel: string;\r\n function GetLatLonToXY: string;\r\n function GetXYToLatLon: string;\r\n function GetSetCenterCoordinate: string;\r\n function GetSetZoomLevel: string;\r\n function GetUpdateOptions: string;\r\n function GetGlobalVariables: string;\r\n function GetAddCoordinateToArray: string;\r\n function GetAddHoleToArray: string;\r\n function GetInitializeCoordinateArray: string;\r\n function GetInitializeHolesArray: string;\r\n function IsValid: Boolean;\r\n function GetService: TTMSFNCMapsService;\r\n procedure DestroyMaps;\r\n public\r\n constructor Create;\r\n destructor Destroy; override;\r\n end;\r\n\r\nvar\r\n MapsService: ITMSFNCMapsServiceGoogleMaps;\r\n\r\nprocedure RegisterGoogleMapsService;\r\nbegin\r\n if not TTMSFNCMapsPlatformServices.Current.SupportsPlatformService(ITMSFNCMapsServiceGoogleMaps, IInterface(MapsService)) then\r\n begin\r\n MapsService := TTMSFNCMapsGoogleMapsService.Create;\r\n TTMSFNCMapsPlatformServices.Current.AddPlatformService(ITMSFNCMapsServiceGoogleMaps, MapsService);\r\n end;\r\nend;\r\n\r\nprocedure UnregisterGoogleMapsService;\r\nbegin\r\n TTMSFNCMapsPlatformServices.Current.RemovePlatformService(ITMSFNCMapsServiceGoogleMaps);\r\nend;\r\n\r\n{ TTMSFNCMapsGoogleMapsService }\r\n\r\nfunction TTMSFNCMapsGoogleMapsService.DoCreateMaps: ITMSFNCCustomMaps;\r\nbegin\r\n Result := TTMSFNCMapsGoogleMaps.Create;\r\nend;\r\n\r\nconstructor TTMSFNCMapsGoogleMaps.Create;\r\nbegin\r\n inherited;\r\nend;\r\n\r\ndestructor TTMSFNCMapsGoogleMaps.Destroy;\r\nbegin\r\n inherited;\r\nend;\r\n\r\nfunction TTMSFNCMapsGoogleMaps.GetMapsServiceCheck: string;\r\nbegin\r\n Result := '!window.google || !' + MAPSERVICEVAR;\r\nend;\r\n\r\nfunction TTMSFNCMapsGoogleMaps.GetResetMap: string;\r\nbegin\r\n Result := '';\r\nend;\r\n\r\nfunction TTMSFNCMapsGoogleMaps.GetService: TTMSFNCMapsService;\r\nbegin\r\n Result := msGoogleMaps;\r\nend;\r\n\r\nfunction TTMSFNCMapsGoogleMaps.GetSetCenterCoordinate: string;\r\nbegin\r\n Result :=\r\n ' var lat = new ' + MAPSERVICEVAR + '.LatLng(' + PARAMSNAME + '[\"Latitude\"], ' + PARAMSNAME + '[\"Longitude\"]);' + LB +\r\n ' ' + MAPVAR + '.panTo(lat);';\r\nend;\r\n\r\nfunction TTMSFNCMapsGoogleMaps.GetSetZoomLevel: string;\r\nbegin\r\n Result :=\r\n ' ' + MAPVAR + '.setZoom(' + PARAMSNAME + ');';\r\nend;\r\n\r\nfunction TTMSFNCMapsGoogleMaps.GetShowPopup: string;\r\nbegin\r\n Result :=\r\n ' var lat = new ' + MAPSERVICEVAR + '.LatLng(' + PARAMSNAME + '[\"Latitude\"], ' + PARAMSNAME + '[\"Longitude\"]);' + LB +\r\n ' ' + POPUPVAR + ' = new ' + MAPSERVICEVAR + '.InfoWindow({' + LB +\r\n ' position: lat,' + LB +\r\n ' pixelOffset: new ' + MAPSERVICEVAR + '.Size(' + PARAMSNAME + '[\"OffsetX\"], ' + PARAMSNAME + '[\"OffsetY\"]),' + LB +\r\n ' content: ' + PARAMSNAME + '[\"Text\"],' + LB +\r\n ' disableAutoPan: !' + PARAMSNAME + '[\"PanMap\"],' + LB +\r\n ' });' + LB +\r\n ' ' + POPUPVAR + '.open(' + MAPVAR + ');';\r\nend;\r\n\r\nfunction TTMSFNCMapsGoogleMaps.GetUpdateOptions: string;\r\nbegin\r\n Result :=\r\n ' var opt = {' + LB +\r\n ' draggable: ' + PARAMSNAME + '[\"Panning\"],' + LB +\r\n ' scrollwheel: ' + PARAMSNAME + '[\"ZoomOnWheelScroll\"],' + LB +\r\n ' disableDoubleClickZoom: !' + PARAMSNAME + '[\"ZoomOnDblClick\"],' + LB +\r\n ' mapTypeControl: ' + PARAMSNAME + '[\"ShowMapTypeControl\"],' + LB +\r\n ' zoomControl: ' + PARAMSNAME + '[\"ShowZoomControl\"],' + LB +\r\n ' tilt: ' + PARAMSNAME + '[\"Tilt\"],' + LB +\r\n ' heading: ' + PARAMSNAME + '[\"Heading\"],' + LB +\r\n ' }' + LB +\r\n ' ' + MAPVAR + '.setOptions(opt);';\r\nend;\r\n\r\nfunction TTMSFNCMapsGoogleMaps.GetZoomToBounds: string;\r\nbegin\r\n Result :=\r\n ' var sw = new ' + MAPSERVICEVAR + '.LatLng(' + PARAMSNAME + '[\"SouthWest\"][\"Latitude\"], ' + PARAMSNAME + '[\"SouthWest\"][\"Longitude\"]);' + LB +\r\n ' var ne = new ' + MAPSERVICEVAR + '.LatLng(' + PARAMSNAME + '[\"NorthEast\"][\"Latitude\"], ' + PARAMSNAME + '[\"NorthEast\"][\"Longitude\"]);' + LB +\r\n ' ' + MAPVAR + '.fitBounds(new ' + MAPSERVICEVAR + '.LatLngBounds(sw, ne));';\r\nend;\r\n\r\nprocedure TTMSFNCMapsGoogleMaps.DestroyMaps;\r\nbegin\r\n MapsService.DestroyMaps(Self);\r\nend;\r\n\r\nfunction TTMSFNCMapsGoogleMaps.GetAddCoordinateToArray: string;\r\nbegin\r\n Result := ' ' + COORDINATEARRAYVAR + '.push({lat: ' + PARAMSNAME + '[\"Latitude\"], lng: ' + PARAMSNAME + '[\"Longitude\"]});';\r\nend;\r\n\r\nfunction TTMSFNCMapsGoogleMaps.GetAddHoleToArray: string;\r\nbegin\r\n Result := 'var o = ' + HOLEARRAYVAR + '[' + PARAMSNAME + '[0]];' + LB +\r\n 'if (o){' + LB +\r\n ' ' + HOLEARRAYVAR + '[' + PARAMSNAME + '[0]].push({lat: ' + PARAMSNAME + '[1][\"Latitude\"], lng: ' + PARAMSNAME + '[1][\"Longitude\"]});' + LB +\r\n '}else{' + LB +\r\n ' ' + HOLEARRAYVAR + '[' + PARAMSNAME + '[0]] = [{lat: ' + PARAMSNAME + '[1][\"Latitude\"], lng: ' + PARAMSNAME + '[1][\"Longitude\"]}];' + LB +\r\n '}';\r\nend;\r\n\r\nfunction TTMSFNCMapsGoogleMaps.GetAddOrUpdateMarker: string;\r\nbegin\r\n Result :=\r\n ' var markericon = ' + CUSTOMDEFAULTMARKERICON + '(' +\r\n PARAMSNAME + '[\"DefaultIcon\"],' + LB +\r\n PARAMSNAME + '[\"IconURL\"]);' + LB +\r\n\r\n ' var animation; ' + LB +\r\n ' if (' + PARAMSNAME + '[\"Animation\"]){ animation = ' + MAPSERVICEVAR + '.Animation.BOUNCE } else { animation = null }' + LB +\r\n ' var ic;' + LB +\r\n ' var sz = null;' + LB +\r\n ' if (!(typeof ' + PARAMSNAME + '[\"DefaultIconSize\"] == \"undefined\")) {' + LB +\r\n ' if (!' + PARAMSNAME + '[\"DefaultIconSize\"]) {' + LB +\r\n ' sz = new ' + MAPSERVICEVAR + '.Size(' + PARAMSNAME + '[\"IconWidth\"], ' + PARAMSNAME + '[\"IconHeight\"])' + LB +\r\n ' }' + LB +\r\n ' }' + LB +\r\n ' if (' + PARAMSNAME + '[\"IconURL\"] != \"\" && ' + PARAMSNAME + '[\"Anchor\"] && !' + PARAMSNAME + '[\"DefaultAnchor\"]){' + LB +\r\n ' ic = {' + LB +\r\n ' url: ' + PARAMSNAME + '[\"IconURL\"],' + LB +\r\n ' anchor: new ' + MAPSERVICEVAR + '.Point(' + PARAMSNAME + '[\"Anchor\"][\"X\"], ' + PARAMSNAME + '[\"Anchor\"][\"Y\"]),' + LB +\r\n ' scaledSize: sz' + LB +\r\n ' }' + LB +\r\n ' }' + LB +\r\n ' else if (markericon != \"\"){' + LB +\r\n ' ic = {' + LB +\r\n ' url: markericon,' + LB +\r\n ' scaledSize: sz' + LB +\r\n ' }' + LB +\r\n ' }' + LB +\r\n ' else{' + LB +\r\n ' ic = null;' + LB +\r\n ' }' + LB + LB +\r\n\r\n ' var options;' + LB +\r\n ' if (ic != null) {' + LB +\r\n ' options = {' + LB +\r\n ' position: new ' + MAPSERVICEVAR + '.LatLng(' + PARAMSNAME + '[\"Latitude\"], ' + PARAMSNAME + '[\"Longitude\"]),' + LB +\r\n ' title: ' + PARAMSNAME + '[\"Title\"],' + LB +\r\n ' icon: ic,' + LB +\r\n ' visible: ' + PARAMSNAME + '[\"Visible\"],' + LB +\r\n ' clickable: ' + PARAMSNAME + '[\"Clickable\"],' + LB +\r\n ' zIndex: ' + PARAMSNAME + '[\"ZIndex\"],' + LB +\r\n ' draggable: ' + PARAMSNAME + '[\"Draggable\"],' + LB +\r\n ' animation: animation,' + LB +\r\n ' map: ' + MAPVAR + LB +\r\n ' }' + LB +\r\n ' }else{' + LB +\r\n ' options = {' + LB +\r\n ' position: new ' + MAPSERVICEVAR + '.LatLng(' + PARAMSNAME + '[\"Latitude\"], ' + PARAMSNAME + '[\"Longitude\"]),' + LB +\r\n ' title: ' + PARAMSNAME + '[\"Title\"],' + LB +\r\n ' visible: ' + PARAMSNAME + '[\"Visible\"],' + LB +\r\n ' clickable: ' + PARAMSNAME + '[\"Clickable\"],' + LB +\r\n ' zIndex: ' + PARAMSNAME + '[\"ZIndex\"],' + LB +\r\n ' draggable: ' + PARAMSNAME + '[\"Draggable\"],' + LB +\r\n ' animation: animation,' + LB +\r\n ' map: ' + MAPVAR + LB +\r\n ' }' + LB +\r\n ' }' + LB + LB +\r\n\r\n// ' var pinOptions;' + LB +\r\n// ' if (' + PARAMSNAME + '[\"IconURL\"] != \"\"){' + LB +\r\n// ' pinOptions = document.createElement(\"img\");' + LB +\r\n// ' pinOptions.src = ' + PARAMSNAME + '[\"IconURL\"];' + LB +\r\n// ' } else { ' + LB +\r\n// ' pinOptionsElement = new ' + MAPSERVICEVAR + '.marker.PinElement({background: \"#0000FF\", borderColor: \"#000099\", glyphColor: \"#000099\"});' + LB +\r\n// ' pinOptions = pinOptionsElement.element;' + LB +\r\n// ' } ' + LB +\r\n//\r\n// ' var advancedoptions;' + LB +\r\n// ' advancedoptions = {' + LB +\r\n// ' ' + MAPVAR + ',' + LB +\r\n// ' position: {lat: ' + PARAMSNAME + '[\"Latitude\"], lng:' + PARAMSNAME + '[\"Longitude\"]},' + LB +\r\n// ' content: pinOptions,' + LB +\r\n// ' gmpDraggable: ' + PARAMSNAME + '[\"Draggable\"],' + LB +\r\n// ' gmpClickable: ' + PARAMSNAME + '[\"Clickable\"],' + LB +\r\n// ' title: ' + PARAMSNAME + '[\"Title\"],' + LB +\r\n// ' zIndex: ' + PARAMSNAME + '[\"ZIndex\"],' + LB +\r\n// ' }' + LB +\r\n\r\n ' if (!' + MARKERVAR + '){' + LB +\r\n\r\n ' ' + MARKERVAR + ' = new ' + MAPSERVICEVAR + '.Marker(options);' + LB +\r\n// ' ' + MARKERVAR + ' = new ' + MAPSERVICEVAR + '.marker.AdvancedMarkerElement(advancedoptions);' + LB +\r\n\r\n ' ' + MARKERVAR + '.addListener(''click'', function(event){' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"MarkerClick\", ' + PARAMSNAME + '[\"ID\"]));' + LB +\r\n ' })' + LB + LB +\r\n\r\n ' ' + MARKERVAR + '.addListener(''rightclick'', function(event){' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"MarkerRightClick\", ' + PARAMSNAME + '[\"ID\"]));' + LB +\r\n ' })' + LB + LB +\r\n ' ' + MARKERVAR + '.addListener(''dblclick'', function(event){' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"MarkerDblClick\", ' + PARAMSNAME + '[\"ID\"]));' + LB +\r\n ' })' + LB + LB +\r\n ' ' + MARKERVAR + '.addListener(''mouseup'', function(event){' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"MarkerMouseUp\", ' + PARAMSNAME + '[\"ID\"]));' + LB +\r\n ' })' + LB + LB +\r\n ' ' + MARKERVAR + '.addListener(''mousedown'', function(event){' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"MarkerMouseDown\", ' + PARAMSNAME + '[\"ID\"]));' + LB +\r\n ' })' + LB + LB +\r\n ' ' + MARKERVAR + '.addListener(''mouseout'', function(event){' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"MarkerMouseLeave\", ' + PARAMSNAME + '[\"ID\"]));' + LB +\r\n ' })' + LB + LB +\r\n ' ' + MARKERVAR + '.addListener(''mouseleave'', function(event){' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"MarkerMouseLeave\", ' + PARAMSNAME + '[\"ID\"]));' + LB +\r\n ' })' + LB + LB +\r\n ' ' + MARKERVAR + '.addListener(''mouseover'', function(event){' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"MarkerMouseEnter\", ' + PARAMSNAME + '[\"ID\"]));' + LB +\r\n ' })' + LB + LB +\r\n\r\n// ' ' + MARKERVAR + '.content.addEventListener(''rightclick'', function(event){' + LB +\r\n// ' ' + GETSENDEVENT + '(parseEvent(event, \"MarkerRightClick\", ' + PARAMSNAME + '[\"ID\"]));' + LB +\r\n// ' })' + LB + LB +\r\n// ' ' + MARKERVAR + '.content.addEventListener(''dblclick'', function(event){' + LB +\r\n// ' ' + GETSENDEVENT + '(parseEvent(event, \"MarkerDblClick\", ' + PARAMSNAME + '[\"ID\"]));' + LB +\r\n// ' })' + LB + LB +\r\n// ' ' + MARKERVAR + '.content.addEventListener(''mouseup'', function(event){' + LB +\r\n// ' ' + GETSENDEVENT + '(parseEvent(event, \"MarkerMouseUp\", ' + PARAMSNAME + '[\"ID\"]));' + LB +\r\n// ' })' + LB + LB +\r\n// ' ' + MARKERVAR + '.content.addEventListener(''mousedown'', function(event){' + LB +\r\n// ' ' + GETSENDEVENT + '(parseEvent(event, \"MarkerMouseDown\", ' + PARAMSNAME + '[\"ID\"]));' + LB +\r\n// ' })' + LB + LB +\r\n// ' ' + MARKERVAR + '.content.addEventListener(''mouseout'', function(event){' + LB +\r\n// ' ' + GETSENDEVENT + '(parseEvent(event, \"MarkerMouseLeave\", ' + PARAMSNAME + '[\"ID\"]));' + LB +\r\n// ' })' + LB + LB +\r\n// ' ' + MARKERVAR + '.content.addEventListener(''mouseleave'', function(event){' + LB +\r\n// ' ' + GETSENDEVENT + '(parseEvent(event, \"MarkerMouseLeave\", ' + PARAMSNAME + '[\"ID\"]));' + LB +\r\n// ' })' + LB + LB +\r\n// ' ' + MARKERVAR + '.content.addEventListener(''mouseover'', function(event){' + LB +\r\n// ' ' + GETSENDEVENT + '(parseEvent(event, \"MarkerMouseEnter\", ' + PARAMSNAME + '[\"ID\"]));' + LB +\r\n// ' })' + LB + LB +\r\n\r\n ' ' + MARKERVAR + '.addListener(''dragend'', function(event){' + LB +\r\n ' var ptmarker = this.getPosition()' + LB +\r\n ' var lat = parseFloat(ptmarker.lat());' + LB +\r\n ' var lng = parseFloat(ptmarker.lng());' + LB +\r\n ' var jsonObj = getDefaultCoordinateObject();' + LB +\r\n ' jsonObj[\"Latitude\"] = lat;' + LB +\r\n ' jsonObj[\"Longitude\"] = lng;' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"MarkerDragEnd\", ' + PARAMSNAME + '[\"ID\"]), jsonObj);' + LB +\r\n ' })' + LB + LB +\r\n\r\n ' }else{' + LB +\r\n ' ' + MARKERVAR + '.setOptions(options);' + LB +\r\n// ' ' + MARKERVAR + '.setOptions(advancedoptions);' + LB +\r\n ' }';\r\nend;\r\n\r\nfunction TTMSFNCMapsGoogleMaps.GetAddOrUpdatePolyElement: string;\r\nbegin\r\n Result :=\r\n ' var c = ' + PARAMSNAME + '[\"$type\"];' + LB +\r\n ' var options;'+ LB +\r\n ' var symbols = null;'+ LB +\r\n\r\n ' if (!(typeof ' + PARAMSNAME + '[\"Symbols\"] == \"undefined\")) {' + LB +\r\n ' symbols = [];' + LB +\r\n ' for (I = 0; I < ' + PARAMSNAME + '[\"Symbols\"].length; I++){' + LB +\r\n ' sstrokecolor = ' + PARAMSNAME + '[\"Symbols\"][I][\"StrokeColor\"];' + LB +\r\n ' if (sstrokecolor == \"gcNull\")' + LB +\r\n ' sstrokecolor = null;' + LB +\r\n ' sstrokeopacity = ' + PARAMSNAME + '[\"Symbols\"][I][\"StrokeOpacity\"];' + LB +\r\n ' if (sstrokeopacity == 0)' + LB +\r\n ' sstrokeopacity = null;' + LB +\r\n ' sstrokewidth = ' + PARAMSNAME + '[\"Symbols\"][I][\"StrokeWidth\"];' + LB +\r\n ' if (sstrokewidth == 0)' + LB +\r\n ' sstrokewidth = null;' + LB +\r\n ' sfillcolor = ' + PARAMSNAME + '[\"Symbols\"][I][\"FillColor\"];' + LB +\r\n ' if (sfillcolor == \"gcNull\")' + LB +\r\n ' sfillcolor = null;' + LB +\r\n ' sfillopacity = ' + PARAMSNAME + '[\"Symbols\"][I][\"FillOpacity\"];' + LB +\r\n ' if (sfillopacity == 0)' + LB +\r\n ' sfillopacity = null;' + LB +\r\n ' sscale = ' + PARAMSNAME + '[\"Symbols\"][I][\"Scale\"];' + LB +\r\n ' if (sscale == 0)' + LB +\r\n ' sscale = null;' + LB +\r\n ' srotation = ' + PARAMSNAME + '[\"Symbols\"][I][\"Rotation\"];' + LB +\r\n ' if (srotation == 0)' + LB +\r\n ' srotation = null;' + LB +\r\n ' srepeat = ' + PARAMSNAME + '[\"Symbols\"][I][\"RepeatSymbol\"];' + LB +\r\n ' if (' + PARAMSNAME + '[\"Symbols\"][I][\"RepeatSymbolUnits\"] == 0)' + LB +\r\n ' srepeat += \"%\";' + LB +\r\n ' else if ((' + PARAMSNAME + '[\"Symbols\"][I][\"RepeatSymbolUnits\"] == 1) && (srepeat != 0))' + LB +\r\n ' srepeat += \"px\";' + LB +\r\n ' soffset = ' + PARAMSNAME + '[\"Symbols\"][I][\"Offset\"];' + LB +\r\n ' if (' + PARAMSNAME + '[\"Symbols\"][I][\"OffsetUnits\"] == 0)' + LB +\r\n ' soffset += \"%\";' + LB +\r\n ' else if ((' + PARAMSNAME + '[\"Symbols\"][I][\"OffsetUnits\"] == 1) && (soffset != 0))' + LB +\r\n ' soffset += \"px\";' + LB +\r\n ' spath = google.maps.SymbolPath.FORWARD_OPEN_ARROW;' + LB +\r\n ' switch (' + PARAMSNAME + '[\"Symbols\"][I][\"Path\"]) {' + LB +\r\n ' case 0:' + LB +\r\n ' spath = google.maps.SymbolPath.BACKWARD_CLOSED_ARROW;' + LB +\r\n ' break;' + LB +\r\n ' case 1:' + LB +\r\n ' spath = google.maps.SymbolPath.BACKWARD_OPEN_ARROW;' + LB +\r\n ' break;' + LB +\r\n ' case 2:' + LB +\r\n ' spath = google.maps.SymbolPath.CIRCLE;' + LB +\r\n ' break;' + LB +\r\n ' case 3:' + LB +\r\n ' spath = google.maps.SymbolPath.FORWARD_CLOSED_ARROW;' + LB +\r\n ' break;' + LB +\r\n ' case 5:' + LB +\r\n ' spath = ' + PARAMSNAME + '[\"Symbols\"][I][\"CustomPath\"];' + LB +\r\n ' break;' + LB +\r\n ' }' + LB + LB +\r\n ' symbols.push({ icon: { path: spath,' + LB +\r\n ' scale: sscale, ' + LB +\r\n ' strokeColor: sstrokecolor, ' + LB +\r\n ' strokeOpacity: sstrokeopacity, ' + LB +\r\n ' strokeWeight: sstrokewidth,' + LB +\r\n ' fillColor: sfillcolor,' + LB +\r\n ' fillOpacity: sfillopacity,' + LB +\r\n ' rotation: srotation,' + LB +\r\n ' }, ' + LB +\r\n ' repeat: srepeat, offset: soffset, fixedRotation: false' + LB +\r\n ' });' + LB +\r\n ' }' + LB + LB +\r\n ' }' + LB + LB +\r\n\r\n ' function getJsonArray(path){' + LB +\r\n ' var jsonArray = [];' + LB +\r\n ' for (var i = 0; i < path.getLength(); i++) {' + LB +\r\n ' var jsonObj = getDefaultCoordinateObject();' + LB +\r\n ' jsonObj[\"Latitude\"] = parseFloat(path.getAt(i).lat());' + LB +\r\n ' jsonObj[\"Longitude\"] = parseFloat(path.getAt(i).lng());' + LB +\r\n ' jsonArray.push(jsonObj);' + LB +\r\n ' }' + LB +\r\n ' return jsonArray;' + LB +\r\n ' }' + LB + LB +\r\n\r\n ' function getJsonBounds(ctrl){' + LB +\r\n ' var bounds = ctrl.getBounds();' + LB +\r\n ' var jsonBounds = getDefaultBoundsObject();' + LB +\r\n ' jsonBounds[\"NorthEast\"][\"Latitude\"] = bounds.getNorthEast().lat();' + LB +\r\n ' jsonBounds[\"NorthEast\"][\"Longitude\"] = bounds.getNorthEast().lng();' + LB +\r\n ' jsonBounds[\"SouthWest\"][\"Latitude\"] = bounds.getSouthWest().lat();' + LB +\r\n ' jsonBounds[\"SouthWest\"][\"Longitude\"] = bounds.getSouthWest().lng();' + LB +\r\n ' return jsonBounds;' + LB +\r\n ' }' + LB + LB +\r\n\r\n ' function getJsonCircle(ctrl){' + LB +\r\n ' var center = ctrl.getCenter();' + LB +\r\n ' var jsonCircle = getDefaultCircleObject();' + LB +\r\n ' jsonCircle[\"Radius\"] = ctrl.getRadius();' + LB +\r\n ' jsonCircle[\"Center\"][\"Latitude\"] = center.lat();' + LB +\r\n ' jsonCircle[\"Center\"][\"Longitude\"] = center.lng();' + LB +\r\n ' return jsonCircle;' + LB +\r\n ' }' + LB + LB +\r\n\r\n ' switch(c){' + LB +\r\n ' case \"TTMSFNCMapsCircle\":' + LB +\r\n ' case \"TTMSFNCGoogleMapsCircle\":' + LB +\r\n ' options = {' + LB +\r\n ' center: {lat: ' + PARAMSNAME + '[\"Center\"][\"Latitude\"], lng: ' + PARAMSNAME + '[\"Center\"][\"Longitude\"]},' + LB +\r\n ' fillColor: ' + PARAMSNAME + '[\"FillColor\"],' + LB +\r\n ' fillOpacity: ' + PARAMSNAME + '[\"FillOpacity\"],' + LB +\r\n ' strokeColor: ' + PARAMSNAME + '[\"StrokeColor\"],' + LB +\r\n ' strokeOpacity: ' + PARAMSNAME + '[\"StrokeOpacity\"],' + LB +\r\n ' strokeWeight: ' + PARAMSNAME + '[\"StrokeWidth\"],' + LB +\r\n ' radius: ' + PARAMSNAME + '[\"Radius\"],' + LB +\r\n ' visible: ' + PARAMSNAME + '[\"Visible\"],' + LB +\r\n ' draggable: ' + PARAMSNAME + '[\"Draggable\"],' + LB +\r\n ' clickable: ' + PARAMSNAME + '[\"Clickable\"],' + LB +\r\n ' zIndex: ' + PARAMSNAME + '[\"ZIndex\"],' + LB +\r\n ' editable: ' + PARAMSNAME + '[\"Editable\"],' + LB +\r\n ' map: ' + MAPVAR + LB +\r\n ' };' + LB + LB +\r\n ' break;' + LB +\r\n ' case \"TTMSFNCMapsRectangle\":' + LB +\r\n ' case \"TTMSFNCGoogleMapsRectangle\":' + LB +\r\n ' options = {' + LB +\r\n ' fillColor: ' + PARAMSNAME + '[\"FillColor\"],' + LB +\r\n ' fillOpacity: ' + PARAMSNAME + '[\"FillOpacity\"],' + LB +\r\n ' strokeColor: ' + PARAMSNAME + '[\"StrokeColor\"],' + LB +\r\n ' strokeOpacity: ' + PARAMSNAME + '[\"StrokeOpacity\"],' + LB +\r\n ' strokeWeight: ' + PARAMSNAME + '[\"StrokeWidth\"],' + LB +\r\n ' draggable: ' + PARAMSNAME + '[\"Draggable\"],' + LB +\r\n ' visible: ' + PARAMSNAME + '[\"Visible\"],' + LB +\r\n ' clickable: ' + PARAMSNAME + '[\"Clickable\"],' + LB +\r\n ' zIndex: ' + PARAMSNAME + '[\"ZIndex\"],' + LB +\r\n ' editable: ' + PARAMSNAME + '[\"Editable\"],' + LB +\r\n ' bounds: {' + LB +\r\n ' north: ' + PARAMSNAME + '[\"Bounds\"][\"NorthEast\"][\"Latitude\"],' + LB +\r\n ' south: ' + PARAMSNAME + '[\"Bounds\"][\"SouthWest\"][\"Latitude\"],' + LB +\r\n ' east: ' + PARAMSNAME + '[\"Bounds\"][\"NorthEast\"][\"Longitude\"],' + LB +\r\n ' west: ' + PARAMSNAME + '[\"Bounds\"][\"SouthWest\"][\"Longitude\"],' + LB +\r\n ' },' + LB +\r\n ' map: ' + MAPVAR + LB +\r\n ' };' + LB + LB +\r\n ' break;' + LB +\r\n ' case \"TTMSFNCMapsPolygon\":' + LB +\r\n ' case \"TTMSFNCGoogleMapsPolygon\":' + LB +\r\n\r\n ' var pthArr = [];' + LB +\r\n ' pthArr.push(' + COORDINATEARRAYVAR + ');' + LB +\r\n ' for (var key in ' + HOLEARRAYVAR + '){' + LB +\r\n ' pthArr.push(' + HOLEARRAYVAR + '[key]);' + LB +\r\n ' }' + LB +\r\n\r\n ' options = {' + LB +\r\n ' icons: symbols,' + LB +\r\n ' paths: pthArr,' + LB +\r\n ' fillColor: ' + PARAMSNAME + '[\"FillColor\"],' + LB +\r\n ' fillOpacity: ' + PARAMSNAME + '[\"FillOpacity\"],' + LB +\r\n ' strokeColor: ' + PARAMSNAME + '[\"StrokeColor\"],' + LB +\r\n ' strokeOpacity: ' + PARAMSNAME + '[\"StrokeOpacity\"],' + LB +\r\n ' strokeWeight: ' + PARAMSNAME + '[\"StrokeWidth\"],' + LB +\r\n ' draggable: ' + PARAMSNAME + '[\"Draggable\"],' + LB +\r\n ' visible: ' + PARAMSNAME + '[\"Visible\"],' + LB +\r\n ' clickable: ' + PARAMSNAME + '[\"Clickable\"],' + LB +\r\n ' zIndex: ' + PARAMSNAME + '[\"ZIndex\"],' + LB +\r\n ' editable: ' + PARAMSNAME + '[\"Editable\"],' + LB +\r\n ' geodesic: ' + PARAMSNAME + '[\"Geodesic\"],' + LB +\r\n ' map: ' + MAPVAR + LB +\r\n ' };' + LB + LB +\r\n ' break;' + LB +\r\n ' case \"TTMSFNCMapsPolyline\":' + LB +\r\n ' case \"TTMSFNCGoogleMapsPolyline\":' + LB +\r\n\r\n ' options = {' + LB +\r\n ' icons: symbols,' + LB +\r\n ' path: ' + COORDINATEARRAYVAR + ',' + LB +\r\n ' fillColor: ' + PARAMSNAME + '[\"FillColor\"],' + LB +\r\n ' fillOpacity: ' + PARAMSNAME + '[\"FillOpacity\"],' + LB +\r\n ' strokeColor: ' + PARAMSNAME + '[\"StrokeColor\"],' + LB +\r\n ' strokeOpacity: ' + PARAMSNAME + '[\"StrokeOpacity\"],' + LB +\r\n ' strokeWeight: ' + PARAMSNAME + '[\"StrokeWidth\"],' + LB +\r\n ' draggable: ' + PARAMSNAME + '[\"Draggable\"],' + LB +\r\n ' visible: ' + PARAMSNAME + '[\"Visible\"],' + LB +\r\n ' clickable: ' + PARAMSNAME + '[\"Clickable\"],' + LB +\r\n ' zIndex: ' + PARAMSNAME + '[\"ZIndex\"],' + LB +\r\n ' editable: ' + PARAMSNAME + '[\"Editable\"],' + LB +\r\n ' geodesic: ' + PARAMSNAME + '[\"Geodesic\"],' + LB +\r\n ' map: ' + MAPVAR + LB +\r\n ' };' + LB + LB +\r\n ' break;' + LB +\r\n ' }' + LB + LB +\r\n\r\n ' if (!' + POLYELEMENTVAR + '){' + LB +\r\n ' switch(c){' + LB +\r\n ' case \"TTMSFNCMapsCircle\":' + LB +\r\n ' case \"TTMSFNCGoogleMapsCircle\":' + LB +\r\n ' ' + POLYELEMENTVAR + ' = new ' + MAPSERVICEVAR + '.Circle(options);' + LB +\r\n ' break;' + LB +\r\n ' case \"TTMSFNCMapsRectangle\":' + LB +\r\n ' case \"TTMSFNCGoogleMapsRectangle\":' + LB +\r\n ' ' + POLYELEMENTVAR + ' = new ' + MAPSERVICEVAR + '.Rectangle(options);' + LB +\r\n ' break;' + LB +\r\n ' case \"TTMSFNCMapsPolyline\":' + LB +\r\n ' case \"TTMSFNCGoogleMapsPolyline\":' + LB +\r\n ' ' + POLYELEMENTVAR + ' = new ' + MAPSERVICEVAR + '.Polyline(options);' + LB +\r\n ' break;' + LB +\r\n ' case \"TTMSFNCMapsPolygon\":' + LB +\r\n ' case \"TTMSFNCGoogleMapsPolygon\":' + LB +\r\n ' ' + POLYELEMENTVAR + ' = new ' + MAPSERVICEVAR + '.Polygon(options);' + LB +\r\n ' break;' + LB +\r\n ' }' + LB +\r\n\r\n ' ' + POLYELEMENTVAR + '.addListener(''click'', function(event){' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"PolyElementClick\", ' + PARAMSNAME + '[\"ID\"]));' + LB +\r\n ' })' + LB + LB +\r\n ' ' + POLYELEMENTVAR + '.addListener(''rightclick'', function(event){' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"PolyElementRightClick\", ' + PARAMSNAME + '[\"ID\"]));' + LB +\r\n ' })' + LB + LB +\r\n ' ' + POLYELEMENTVAR + '.addListener(''dblclick'', function(event){' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"PolyElementDblClick\", ' + PARAMSNAME + '[\"ID\"]));' + LB +\r\n ' })' + LB + LB +\r\n ' ' + POLYELEMENTVAR + '.addListener(''mouseup'', function(event){' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"PolyElementMouseUp\", ' + PARAMSNAME + '[\"ID\"]));' + LB +\r\n ' })' + LB + LB +\r\n ' ' + POLYELEMENTVAR + '.addListener(''mousedown'', function(event){' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"PolyElementMouseDown\", ' + PARAMSNAME + '[\"ID\"]));' + LB +\r\n ' })' + LB + LB +\r\n ' ' + POLYELEMENTVAR + '.addListener(''mouseout'', function(event){' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"PolyElementMouseLeave\", ' + PARAMSNAME + '[\"ID\"]));' + LB +\r\n ' })' + LB + LB +\r\n ' ' + POLYELEMENTVAR + '.addListener(''mouseover'', function(event){' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"PolyElementMouseEnter\", ' + PARAMSNAME + '[\"ID\"]));' + LB +\r\n ' })' + LB + LB +\r\n\r\n ' ' + POLYELEMENTVAR + '.addListener(''dragend'', function(event){' + LB +\r\n ' switch(c){' + LB +\r\n ' case \"TTMSFNCGoogleMapsPolyline\":' + LB +\r\n ' case \"TTMSFNCGoogleMapsPolygon\":' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"PolyElementDragEnd\", ' + PARAMSNAME + '[\"ID\"]), getJsonArray(this.getPath()));' + LB +\r\n ' break;' + LB +\r\n ' case \"TTMSFNCGoogleMapsRectangle\":' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"PolyElementDragEnd\", ' + PARAMSNAME + '[\"ID\"]), getJsonBounds(this));' + LB +\r\n ' break;' + LB +\r\n ' case \"TTMSFNCGoogleMapsCircle\":' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"PolyElementDragEnd\", ' + PARAMSNAME + '[\"ID\"]), getJsonCircle(this));' + LB +\r\n ' break;' + LB +\r\n ' }' + LB + LB +\r\n ' });' + LB + LB +\r\n\r\n ' switch(c){' + LB +\r\n ' case \"TTMSFNCGoogleMapsRectangle\":' + LB +\r\n ' ' + POLYELEMENTVAR + '.addListener(''bounds_changed'', function(event){' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"PolyElementEditEnd\", ' + PARAMSNAME + '[\"ID\"]), getJsonBounds(this));' + LB +\r\n ' });' + LB + LB +\r\n ' break;' + LB +\r\n ' case \"TTMSFNCGoogleMapsCircle\":' + LB +\r\n ' ' + POLYELEMENTVAR + '.addListener(''radius_changed'', function(event){' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"PolyElementEditEnd\", ' + PARAMSNAME + '[\"ID\"]), getJsonCircle(this));' + LB +\r\n ' });' + LB + LB +\r\n ' ' + POLYELEMENTVAR + '.addListener(''center_changed'', function(event){' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"PolyElementEditEnd\", ' + PARAMSNAME + '[\"ID\"]), getJsonCircle(this));' + LB +\r\n ' });' + LB + LB +\r\n ' break;' + LB +\r\n ' }' + LB + LB +\r\n\r\n ' }else{' + LB +\r\n ' ' + POLYELEMENTVAR + '.setOptions(options);' + LB +\r\n ' }' + LB + LB +\r\n\r\n ' switch(c){' + LB +\r\n ' case \"TTMSFNCGoogleMapsPolyline\":' + LB +\r\n ' case \"TTMSFNCGoogleMapsPolygon\":' + LB +\r\n ' ' + POLYELEMENTVAR + '.getPath().addListener(''set_at'', function(event){' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"PolyElementEditEnd\", ' + PARAMSNAME + '[\"ID\"]), getJsonArray(this));' + LB +\r\n ' });' + LB + LB +\r\n ' ' + POLYELEMENTVAR + '.getPath().addListener(''insert_at'', function(event){' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"PolyElementEditEnd\", ' + PARAMSNAME + '[\"ID\"]), getJsonArray(this));' + LB +\r\n ' });' + LB + LB +\r\n ' ' + POLYELEMENTVAR + '.getPath().addListener(''remove_at'', function(event){' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"PolyElementEditEnd\", ' + PARAMSNAME + '[\"ID\"]), getJsonArray(this));' + LB +\r\n ' });' + LB + LB +\r\n ' break;' + LB +\r\n ' }';\r\nend;\r\n\r\nfunction TTMSFNCMapsGoogleMaps.GetClosePopup: string;\r\nbegin\r\n Result := ' ' + POPUPVAR + '.close();';\r\nend;\r\n\r\nfunction TTMSFNCMapsGoogleMaps.GetDelayLoadEvent: string;\r\nbegin\r\n Result := '';\r\nend;\r\n\r\nfunction TTMSFNCMapsGoogleMaps.GetDeleteMarker: string;\r\nbegin\r\n Result := ' ' + MARKERVAR + '.setMap(null)';\r\nend;\r\n\r\nfunction TTMSFNCMapsGoogleMaps.GetDeletePolyElement: string;\r\nbegin\r\n Result := ' ' + POLYELEMENTVAR + '.setMap(null)';\r\nend;\r\n\r\nfunction TTMSFNCMapsGoogleMaps.GetGetCenterCoordinate: string;\r\nbegin\r\n Result :=\r\n ' var loc = ' + MAPVAR + '.getCenter();' + LB +\r\n ' jsonObj[\"Latitude\"] = loc.lat();' + LB +\r\n ' jsonObj[\"Longitude\"] = loc.lng();';\r\nend;\r\n\r\nfunction TTMSFNCMapsGoogleMaps.GetGetBounds: string;\r\nbegin\r\n Result :=\r\n ' var loc = ' + MAPVAR + '.getBounds();' + LB +\r\n ' jsonObj[\"NorthEast\"][\"Latitude\"] = loc.getNorthEast().lat();' + LB +\r\n ' jsonObj[\"NorthEast\"][\"Longitude\"] = loc.getNorthEast().lng();' + LB +\r\n ' jsonObj[\"SouthWest\"][\"Latitude\"] = loc.getSouthWest().lat();' + LB +\r\n ' jsonObj[\"SouthWest\"][\"Longitude\"] = loc.getSouthWest().lng();';\r\nend;\r\n\r\nfunction TTMSFNCMapsGoogleMaps.GetGetZoomLevel: string;\r\nbegin\r\n Result := ' var z = ' + MAPVAR + '.getZoom();';\r\nend;\r\n\r\nfunction TTMSFNCMapsGoogleMaps.GetGlobalVariables: string;\r\nbegin\r\n Result :=\r\n 'function gm_authFailure() { ' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"Error\", \"Google Maps API Key error\"));' + LB +\r\n '}' + LB +\r\n 'function parseEvent(event, eventname, id = ''''){' + LB +\r\n ' var loc = {''Latitude'': 0, ''Longitude'': 0};' + LB +\r\n ' var x = 0.0;' + LB +\r\n ' var y = 0.0;' + LB +\r\n ' if ((eventname == \"MapMoveStart\") || (eventname == \"MapMoveEnd\")){ ' +\r\n ' var ptcenter = ' + MAPVAR + '.getCenter();' + LB +\r\n ' var lat = ptcenter.lat();' + LB +\r\n ' var lng = ptcenter.lng();' + LB +\r\n ' loc = {''Latitude'': lat, ''Longitude'': lng};' + LB +\r\n ' } else if (event) {' + LB +\r\n ' if (event.latLng){' + LB +\r\n ' loc = {''Latitude'': event.latLng.lat(), ''Longitude'': event.latLng.lng()};' + LB +\r\n ' }' + LB +\r\n ' if (event.pixel){' + LB +\r\n ' x = event.pixel.x;' + LB +\r\n ' y = event.pixel.y;' + LB +\r\n ' }' + LB +\r\n ' }' + LB +\r\n\r\n ' var r = {''Coordinate'': loc, ''X'': x, ''Y'': y, ''ID'': id, ''EventName'': eventname};' + LB +\r\n ' return r;' + LB +\r\n '}';\r\nend;\r\n\r\nprocedure TTMSFNCMapsGoogleMaps.GetHeadLinks(\r\n const AList: TTMSFNCMapsLinksList);\r\nvar\r\n APIVersion: string;\r\nbegin\r\n if MapsProperties.GetAPIVersion = '' then\r\n APIVersion := '&v=weekly'\r\n else\r\n APIVersion := '&v=' + MapsProperties.GetAPIVersion;\r\n\r\n AList.Add(TTMSFNCMapsLink.CreateScript(GOOGLEMAPSAPIURL + 'js?'\r\n + '&key=' + MapsProperties.GetAPIKey\r\n + APIVersion\r\n + '&language=' + MapsProperties.GetLocale\r\n// + '&libraries=marker'\r\n + '&libraries=visualization'\r\n , 'text/javascript', 'utf-8', '', True, True));\r\nend;\r\n\r\nfunction TTMSFNCMapsGoogleMaps.GetHeadStyle: string;\r\nbegin\r\n Result := '';\r\nend;\r\n\r\nfunction TTMSFNCMapsGoogleMaps.GetIdentifier: string;\r\nbegin\r\n Result := 'Google Maps';\r\nend;\r\n\r\nfunction TTMSFNCMapsGoogleMaps.GetInitializeCoordinateArray: string;\r\nbegin\r\n Result := '[]';\r\nend;\r\n\r\nfunction TTMSFNCMapsGoogleMaps.GetInitializeHolesArray: string;\r\nbegin\r\n Result := '[]';\r\nend;\r\n\r\nfunction TTMSFNCMapsGoogleMaps.GetInitializeEvents: string;\r\nbegin\r\n Result :=\r\n ' ' + MAPVAR + '.addListener(''mapcapabilities_changed'', function(){' + LB +\r\n// ' const mapCapabilities = ' + MAPVAR + '.getMapCapabilities();' + LB +\r\n// ' if (!mapCapabilities.isAdvancedMarkersAvailable) {' + LB +\r\n// ' console.log(\"advanced markers FALSE\");' + LB +\r\n// ' } else {' + LB +\r\n// ' console.log(\"advanced markers TRUE\");' + LB +\r\n// ' }' + LB +\r\n ' })' + LB + LB +\r\n ' ' + MAPVAR + '.addListener(''zoom_changed'', function(){' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(null, \"ZoomChanged\"));' + LB +\r\n ' })' + LB + LB +\r\n ' ' + MAPVAR + '.addListener(''center_changed'', function(){' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(null, \"MapCenterChanged\"));' + LB +\r\n ' })' + LB + LB +\r\n ' ' + MAPVAR + '.addListener(''maptypeid_changed'', function(){' + LB +\r\n ' var mapType = JSON.stringify(' + MAPVAR + '.getMapTypeId()).replace(/\"/g, \"\");' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(null, \"MapTypeChanged\"), mapType);' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(null, \"UpdateMapType\"), mapType);' + LB +\r\n ' })' + LB + LB +\r\n ' ' + MAPVAR + '.addListener(''dragstart'', function(event){' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"MapMoveStart\"));' + LB +\r\n ' })' + LB + LB +\r\n ' ' + MAPVAR + '.addListener(''dragend'', function(event){' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"MapMoveEnd\"));' + LB +\r\n ' })' + LB + LB +\r\n//not implemented yet\r\n// ' ' + MAPVAR + '.addListener(''drag'', function(event){' + LB +\r\n// ' ' + GETSENDEVENT + '(parseEvent(event, \"MapMove\"));' + LB +\r\n// ' })' + LB + LB +\r\n ' ' + MAPVAR + '.addListener(''idle'', function(event){' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"MapIdle\"));' + LB +\r\n ' })' + LB + LB +\r\n ' ' + MAPVAR + '.addListener(''click'', function(event){' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"MapClick\"));' + LB +\r\n ' })' + LB + LB +\r\n ' ' + MAPVAR + '.addListener(''rightclick'', function(event){' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"MapRightClick\"));' + LB +\r\n ' })' + LB + LB +\r\n ' ' + MAPVAR + '.addListener(''dblclick'', function(event){' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"MapDblClick\"));' + LB +\r\n ' })' + LB + LB +\r\n ' ' + MAPVAR + '.addListener(''mouseup'', function(event){' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"MapMouseUp\"));' + LB +\r\n ' })' + LB + LB +\r\n ' ' + MAPVAR + '.addListener(''mousedown'', function(event){' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"MapMouseDown\"));' + LB +\r\n ' })' + LB + LB +\r\n ' ' + MAPVAR + '.addListener(''mouseout'', function(event){' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"MapMouseLeave\"));' + LB +\r\n ' })' + LB + LB +\r\n ' ' + MAPVAR + '.addListener(''mouseover'', function(event){' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"MapMouseEnter\"));' + LB +\r\n ' })' + LB + LB +\r\n ' ' + MAPVAR + '.addListener(''mousemove'', function(event){' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"MapMouseMove\"));' + LB +\r\n ' })';\r\nend;\r\n\r\nfunction TTMSFNCMapsGoogleMaps.GetInitializeMap: string;\r\nbegin\r\n Result :=\r\n ' ' + MAPOPTIONS + ' = {' + LB +\r\n ' draggable: ' + BoolToStrEx(MapsProperties.GetPanning) + ',' + LB +\r\n ' scrollwheel: ' + BoolToStrEx(MapsProperties.GetZoomOnWheelScroll) + ',' + LB +\r\n ' disableDoubleClickZoom: ' + BoolToStrEx(not MapsProperties.GetZoomOnDblClick) + ',' + LB +\r\n ' mapTypeControl: ' + BoolToStrEx(MapsProperties.GetShowMapTypeControl) + ',' + LB +\r\n ' mapId: \"' + MapsProperties.GetMapID + '\",' + LB +\r\n ' zoomControl: ' + BoolToStrEx(MapsProperties.GetShowZoomControl) + ',' + LB +\r\n{$IFNDEF WEBLIB}\r\n ' fullscreenControl: false,' + LB +\r\n{$ENDIF}\r\n ' center: {lat: ' + MapsProperties.GetDefaultLatitude + ', lng: ' + MapsProperties.GetDefaultLongitude + '},' + LB +\r\n ' backgroundColor: \"' + TTMSFNCGraphics.ColorToHTml(MapsProperties.GetBackgroundColor) + '\",' + LB +\r\n ' zoom: ' + MapsProperties.GetDefaultZoomLevel + ',' + LB +\r\n ' heading: ' + TTMSFNCUtils.FloatToStrDot(MapsProperties.GetHeading) + ',' + LB +\r\n ' tilt: ' + TTMSFNCUtils.FloatToStrDot(MapsProperties.GetTilt) + ',' + LB +\r\n ' }'+ LB + LB +\r\n\r\n ' ' + MAPVAR + ' = new ' + MAPSERVICEVAR + '.Map(document.getElementById(\"' + MAPID + '\"), ' + MAPOPTIONS + ');' + LB + LB +\r\n\r\n ' ' + MAPCALCLAYER + ' = new ' + MAPSERVICEVAR + '.OverlayView();' + LB +\r\n ' ' + MAPCALCLAYER + '.draw = function() {};' + LB +\r\n ' ' + MAPCALCLAYER + '.setMap(' + MAPVAR + ');';\r\nend;\r\n\r\nfunction TTMSFNCMapsGoogleMaps.GetLatLonToXY: string;\r\nbegin\r\n Result :=\r\n ' var projection = ' + MAPCALCLAYER + '.getProjection();' + LB +\r\n ' if (projection) {' + LB +\r\n ' myLatLng = new ' + MAPSERVICEVAR + '.LatLng(parseFloat(' + PARAMSNAME + '[\"Latitude\"]), parseFloat(' + PARAMSNAME + '[\"Longitude\"]));' + LB +\r\n ' var position = projection.fromLatLngToContainerPixel(myLatLng);' + LB +\r\n ' jsonObj[\"X\"] = parseFloat(position.x);' + LB +\r\n ' jsonObj[\"Y\"] = parseFloat(position.y);' + LB +\r\n ' }';\r\nend;\r\n\r\nfunction TTMSFNCMapsGoogleMaps.GetXYToLatLon: string;\r\nbegin\r\n Result :=\r\n ' var projection = ' + MAPCALCLAYER + '.getProjection();' + LB +\r\n ' if (projection) {' + LB +\r\n ' myPoint = new ' + MAPSERVICEVAR + '.Point(parseInt(' + PARAMSNAME + '[\"X\"]), parseInt(' + PARAMSNAME + '[\"Y\"]));' + #13 +\r\n ' var position = projection.fromContainerPixelToLatLng(myPoint);' + LB +\r\n ' jsonObj[\"Latitude\"] = position.lat();' + LB +\r\n ' jsonObj[\"Longitude\"] = position.lng();' + LB +\r\n ' }';\r\nend;\r\n\r\nfunction TTMSFNCMapsGoogleMaps.IsValid: Boolean;\r\nbegin\r\n Result := MapsProperties.GetAPIKey <> '';\r\nend;\r\n\r\nprocedure TTMSFNCMapsGoogleMaps.RemoveScripts;\r\nbegin\r\n {$IFDEF WEBLIB}\r\n asm\r\n let keywords = ['maps.googleapis'];\r\n\r\n if (window.google){\r\n window.google.maps = undefined;\r\n }\r\n\r\n let scripts = document.querySelectorAll('script,link');\r\n for (let i = scripts.length - 1; i >= 0; i--) {\r\n let scriptSource = scripts[i].getAttribute('src');\r\n if (!scriptSource){\r\n scriptSource = scripts[i].getAttribute('href');\r\n }\r\n if (scriptSource != null) {\r\n if (keywords.filter(item => scriptSource.includes(item)).length) {\r\n scripts[i].remove();\r\n // scripts[i].parentNode.removeChild(scripts[i]);\r\n }\r\n }\r\n }\r\n end;\r\n {$ENDIF}\r\nend;\r\n\r\nend.\r\n\r\n\r\n","{********************************************************************}\r\n{ }\r\n{ written by TMS Software }\r\n{ copyright (c) 2020 - 2025 }\r\n{ Email : info@tmssoftware.com }\r\n{ Web : http://www.tmssoftware.com }\r\n{ }\r\n{ The source code is given as is. The author is not responsible }\r\n{ for any possible damage done due to the use of this code. }\r\n{ The complete source code remains property of the author and may }\r\n{ not be distributed, published, given or sold in any form as such. }\r\n{ No parts of the source code can be included in any other component }\r\n{ or application without written authorization of the author. }\r\n{********************************************************************}\r\n\r\nunit WEBLib.TMSFNCMaps;\r\n\r\n{$I WEBLib.TMSFNCDefines.inc}\r\n\r\n{$IFDEF WEBLIB}\r\n{$DEFINE LCLWEBLIB}\r\n{$ENDIF}\r\n{$IFDEF LCLLIB}\r\n{$DEFINE LCLWEBLIB}\r\n{$ENDIF}\r\n\r\n{$IFNDEF LCLLIB}\r\n{$HINTS OFF}\r\n{$IF COMPILERVERSION > 23}\r\n{$DEFINE UNREGISTER}\r\n{$IFEND}\r\n{$HINTS ON}\r\n{$ENDIF}\r\n{$IFDEF LCLLIB}\r\n{$DEFINE UNREGISTER}\r\n{$ENDIF}\r\n\r\n{$IFDEF WEBLIB}\r\n{$DEFINE NEEDSSTRINGIFY}\r\n{$ENDIF}\r\n{$IFDEF MACOS}\r\n{$DEFINE NEEDSSTRINGIFY}\r\n{$ENDIF}\r\n\r\ninterface\r\n\r\nuses\r\n Classes, Types, DateUtils, WEBLib.Forms, SysUtils\r\n {$IFNDEF LCLWEBLIB}\r\n ,Generics.Collections, XmlIntf, XMLDom, XMLDoc, Variants\r\n {$ENDIF}\r\n {$IFDEF LCLLIB}\r\n ,fgl, XMLRead, XMLWrite, DOM\r\n {$ENDIF}\r\n {$IFDEF WEBLIB}\r\n ,web, Contnrs, WEBLib.Controls\r\n {$ENDIF}\r\n {$IFNDEF WEBLIB}\r\n {$IFNDEF LCLLIB}\r\n {$IF COMPILERVERSION > 26}\r\n ,JSON\r\n {$ELSE}\r\n ,DBXJSON\r\n {$IFEND}\r\n {$HINTS ON}\r\n {$ELSE}\r\n ,fpjson\r\n {$ENDIF}\r\n {$ENDIF}\r\n {$IFDEF WEBLIB}\r\n ,WEBLIB.JSON\r\n {$ENDIF}\r\n ,WEBLib.TMSFNCRouteCalculator\r\n ,WEBLib.TMSFNCMapsCommonTypes\r\n ,WEBLib.TMSFNCTypes\r\n ,WEBLib.TMSFNCJSONReader\r\n ,WEBLib.TMSFNCGraphicsTypes\r\n ,WEBLib.TMSFNCWebBrowser;\r\n\r\nconst\r\n TTMSFNCMapsDocURL = TTMSFNCBaseDocURL + 'tmsfncmaps/';\r\n TTMSFNCMapsTipsURL = 'https://www.tmssoftware.com/site/tmsfncmaps.asp?s=faq';\r\n MAJ_VER = 2; // Major version nr.\r\n MIN_VER = 8; // Minor version nr.\r\n REL_VER = 0; // Release nr.\r\n BLD_VER = 1; // Build nr.\r\n\r\n //v1.0.0.0: First release\r\n //v1.0.0.1: Improved : property LocalFileAccess to provide access to local files such as images for markers (HERE Maps not supported)\r\n //v1.0.1.0: New : GetZoomLevel, GetCenterCoordinate with OnGetZoomLevel and OnGetCenterCoordinate asynchronous events\r\n // : New : Options.ZoomOnDblClick, Options.ZoomOnWheelScroll, Options.Panning\r\n //v1.0.1.1: Fixed : Issue with Openlayers being slow when having multiple elements such as markers and polygons, polylines\r\n // : Fixed : Issue with Bing Maps ZoomOnDblClick also disabling ZoomOnWheelScroll\r\n //v1.1.0.0: New : LoadGPXFromFile/LoadGPXFromStream/LoadGPXFromText now also supports elevation and timestamp data\r\n // : New : Events OnCreateGPXTrack, OnCreateGPXSegment\r\n //v1.1.0.1: Fixed : Issue with updating high number of poly elements\r\n //v1.2.0.0: New : Support for Apple MapKit JS\r\n // : New : GetBounds\r\n // : Improved : Event propagation across different services\r\n // : Fixed : Issue with updating high number of markers\r\n //v1.2.1.0: New : SaveToGPXFile, SaveToGPXStream, SaveToGPXText support\r\n // : New : Support for Plus Codes encoding/decoding via TTMSFNCMapsPlusCode (available in *TMSFNCMapsCommonTypes unit)\r\n //v1.2.2.0: New : OnCreateGeoJSONObject event\r\n //v1.2.2.1: Fixed : Issue with creating and destroying maps instance\r\n //v1.2.2.2: Fixed : Issue resizing OpenLayers in TMS WEB Core\r\n //v1.2.2.3: Fixed : Issue with LoadGPX for Elevation & Timestamp\r\n // : Fixed : Issue with GetBounds not returning correct coordinates in OpenLayers\r\n //v1.2.2.4: Fixed : Issue with OnRouteCalculatorWayPointUpdated event not being triggered correctly for the end segment\r\n //v1.2.2.5: Improved : RouteCalculator custom Markers config\r\n //v1.2.3.0: New : OnMapMoveStart, OnMapMoveEnd events\r\n // : Fixed : Issue with map events in Azure Maps\r\n //v1.2.4.0: New : LatLonToXY & XYToLatLon functions for Google Maps, MapBox and Here\r\n //v1.2.4.1: Fixed : Issue with displaying custom marker icons for Google Maps\r\n //v2.0.0.0: New : ElementContainers collection\r\n // : New : HeadLinks collection\r\n //v2.0.1.0: New : MeasureArea: Calculate PolyElement area in square metres\r\n // : Fixed : Issue in OpenLayers marker & poly element click detection\r\n //v2.0.1.1: Fixed : Issue with title popup being shown more than once\r\n //v2.0.2.0: New : IsPointInArea / PolyElement.ContainsPoint: Check if coordinate is inside Poly area\r\n //v2.0.3.0: New : PolyLine Distance property\r\n //v2.0.4.0: New : Route calculator extended with support for MapBox & TomTom\r\n //v2.0.4.1: Fixed : OpenLayers API URLs updated\r\n //v2.0.5.0: New : LoadGeoJSON complex polygon support added\r\n // : Fixed : Issue with displaying polylines in Google Maps\r\n //v2.1.0.0: New : Labels\r\n // : New : ElementContainers: Coordinate positioning support\r\n // : New : LatLonToXY & XYToLatLon functions for MapKit, Azure, OpenLayers, Bing\r\n // : Fixed : Azure Maps: Fixed issue with Map events due to changes in the API\r\n //v2.1.1.0: New : Bounds positioning for ElementContainers and Labels\r\n //v2.5.0.0: New : Leaflet mapping service support\r\n //v2.6.0.0: New : OpenLayers v8 API compatibilty\r\n // : Fixed : MapKit: Fixed issue with adding polylines\r\n //v2.6.1.0: New : ShowPopup PanMap parameter added (Google, OpenLayers, Leaflet)\r\n //v2.6.1.1: Fixed : Issue with unicode characters in ElementContainers and Labels\r\n //v2.6.1.2: Fixed : Issue with closing Popups in OpenLayers\r\n //v2.6.1.3: Improved : LoadGeoJSON compatibility for MultiPolygon type\r\n //v2.7.0.0: New : FindNearestCoordinate: Find the nearest coordinate in an array for a given coordinate\r\n // : New : FindNearestPolylineCoordinate: Find the nearest coordinate in Polylines\r\n // : New : Markers DefaultIcon added\r\n // : New : Polyline.Split, Polyline.Merge, Polyline.Segment added\r\n //v2.7.0.1: Improved : Polyline.Segment usage\r\n //v2.7.1.0: New : Support for WayPoints (POI) in LoadGPX/SaveToGPX\r\n // : New : Event OnCreateGPXWayPoint\r\n //v2.7.2.0: New : TTMSFNCMapsCoordinates.ToArray setter added\r\n //v2.7.2.1: Fixed : Issue with OpenLayers ClearMarkers\r\n //v2.7.2.2: Fixed : Issue with Azure map mouse events\r\n //v2.7.3.0: Improved : Boolean to String conversion in JavaScript, JSON\r\n //v2.8.0.0: New : OnError event added\r\n //v2.8.0.1: Fixed : Error during destroy in TMS WEB Core\r\n\r\n LB = #13;\r\n STARTHTMLTAG = '';\r\n STARTHEADTAG = '';\r\n STARTBODYTAG = '';\r\n STARTTITLETAG = '';\r\n STARTSCRIPTTAG = '<script>';\r\n STARTSTYLETAG = '<style>';\r\n ENDHTMLTAG = '</html>';\r\n ENDHEADTAG = '</head>';\r\n ENDBODYTAG = '</body>';\r\n ENDTITLETAG = '';\r\n ENDSCRIPTTAG = '';\r\n ENDSTYLETAG = '';\r\n MAPID = 'mapContainer';\r\n MARKERVAR = 'marker';\r\n ELEMENTCONTAINERVAR = 'elementContainer';\r\n POPUPVAR = 'popup';\r\n POLYELEMENTVAR = 'polyelement';\r\n MAPVAR = 'map';\r\n MAPOPTIONS = 'mapoptions';\r\n MAPBOUNDS = 'mapbounds';\r\n MAPCOMPONENT = 'mapcomponent';\r\n PARAMSNAME = 'params';\r\n MARKERARRAYVAR = 'markerarray';\r\n HEATMAPVAR = 'heatmap';\r\n HEATMAPARRAYVAR = 'heatmaparray';\r\n GETHEATMAPARRAYVAR = 'get' + HEATMAPARRAYVAR + '()';\r\n ADDORUPDATEHEATMAPFUNCTION = 'addOrUpdateHeatMap';\r\n DELETEHEATMAPFUNCTION = 'deleteHeatMap';\r\n ELEMENTCONTAINERARRAYVAR = 'elementContainerArray';\r\n POPUPARRAYVAR = 'popuparray';\r\n GETMARKERARRAYVAR = 'get' + MARKERARRAYVAR + '()';\r\n GETELEMENTCONTAINERARRAYVAR = 'get' + ELEMENTCONTAINERARRAYVAR + '()';\r\n GETSENDEVENT = 'sendEvent';\r\n GETFOCUSMAP = 'focusMap';\r\n POLYELEMENTARRAYVAR = 'polyelementarray';\r\n COORDINATEARRAYVAR = 'coordinatearray';\r\n HOLEARRAYVAR = 'holearray';\r\n GETPOLYELEMENTARRAYVAR = 'get' + POLYELEMENTARRAYVAR + '()';\r\n GETPOPUPARRAYVAR = 'get' + POPUPARRAYVAR + '()';\r\n DEFAULT_ZOOMLEVEL = 12;\r\n DEFAULT_MARKERTEXT = 'Sample Marker';\r\n SHOWPOPUPFUNCTION = 'showPopup';\r\n CLOSEPOPUPFUNCTION = 'closePopup';\r\n ADDORUPDATEMARKERFUNCTION = 'addOrUpdateMarker';\r\n DELETEMARKERFUNCTION = 'deleteMarker';\r\n ADDORUPDATEELEMENTCONTAINERFUNCTION = 'addOrUpdateElementContainer';\r\n DELETEELEMENTCONTAINERFUNCTION = 'deleteElementContainer';\r\n ADDORUPDATEPOLYELEMENTFUNCTION = 'addOrUpdatePolyElement';\r\n INITIALIZECOORDINATEARRAY = 'initializeCoordinateArray';\r\n INITIALIZEHOLESARRAY = 'initializeHolesArray';\r\n ADDCOORDINATETOARRAY = 'addCoordinateToArray';\r\n ADDHOLETOARRAY = 'addHoleToArray';\r\n ADDCOORDINATESTOARRAY = 'addCoordinatesToArray';\r\n ADDHOLESTOARRAY = 'addHolesToArray';\r\n DELETEPOLYELEMENTFUNCTION = 'deletePolyElement';\r\n ZOOMTOBOUNDSFUNCTION = 'zoomToBounds';\r\n SETCENTERCOORDINATEFUNCTION = 'setCenterCoordinate';\r\n GETCENTERCOORDINATEFUNCTION = 'getCenterCoordinate';\r\n GETLATLONTOXYFUNCTION = 'getLatLonToXY';\r\n GETXYTOLATLONFUNCTION = 'getXYToLatLon';\r\n GETBOUNDSFUNCTION = 'getBounds';\r\n SETZOOMLEVELFUNCTION = 'setZoomLevel';\r\n GETZOOMLEVELFUNCTION = 'getZoomLevel';\r\n UPDATEOPTIONSFUNCTION = 'updateOptions';\r\n DEBUGCONSOLELINK = 'https://download.tmssoftware.com/webgmaps/firebug/firebug-lite.js#startOpened';\r\n ROUTECALCULATORROUTE = '#TTMSFNCMapsRouteCalculatorRoute';\r\n ROUTECALCULATORSEGMENT = '#TTMSFNCMapsRouteCalculatorSegment';\r\n ROUTECALCULATORMARKER = '#TTMSFNCRouteCalculatorMarker';\r\n ROUTECALCULATORSTARTMARKER = '#TTMSFNCRouteCalculatorStartMarker';\r\n ROUTECALCULATORENDMARKER = '#TTMSFNCRouteCalculatorEndMarker';\r\n ROUTECALCULATORDRAGMARKER = '#TMSFNCRouteCalculatorDragMarker';\r\n ACTIONCLICKEVENT = 'ActionClick';\r\n ACTIONDBLCLICKEVENT = 'ActionDblClick';\r\n ACTIONKEYPRESSEVENT = 'ActionKeyPress';\r\n ACTIONKEYDOWNEVENT = 'ActionKeyDown';\r\n ACTIONKEYUPEVENT = 'ActionKeyUp';\r\n ACTIONMOUSEDOWNEVENT = 'ActionMouseDown';\r\n ACTIONMOUSEMOVEEVENT = 'ActionMouseMove';\r\n ACTIONMOUSEUPEVENT = 'ActionMouseUp';\r\n ACTIONMOUSEENTEREVENT = 'ActionMouseEnter';\r\n ACTIONMOUSELEAVEEVENT = 'ActionMouseLeave';\r\n ACTIONBLUREVENT = 'ActionBlur';\r\n ACTIONFOCUSEVENT = 'ActionFocus';\r\n ACTIONCHANGEEVENT = 'ActionChange';\r\n ACTIONSELECTEVENT = 'ActionSelect';\r\n ACTIONCUSTOMEVENT = 'ActionCustomEvent';\r\n CUSTOMDEFAULTMARKERICON = 'CustomDefaultMarkerIcon';\r\n\r\ntype\r\n TTMSFNCCustomMaps = class;\r\n\r\n TTMSFNCMapsJavaScriptError = class(TTMSFNCWebBrowserError)\r\n protected\r\n function GetDefaultType: string; override;\r\n end;\r\n\r\n\r\n ITMSFNCCustomMapsProperties = interface(IInterface)\r\n ['{A081EF51-171D-4C04-9F2C-28A4EBE9E1DE}']\r\n function GetDefaultLatitude: string;\r\n function GetDefaultLongitude: string;\r\n function GetDefaultZoomLevel: string;\r\n function GetAPIKey: string;\r\n function GetLocale(AMode: TTMSFNCMapsLocaleMode = mlmDefault): string;\r\n function GetShowZoomControl: Boolean;\r\n function GetZoomOnDblClick: Boolean;\r\n function GetPanning: Boolean;\r\n function GetMapID: string;\r\n function GetAPIVersion: string;\r\n function GetHeading: Double;\r\n function GetTilt: Double;\r\n function GetZoomOnWheelScroll: Boolean;\r\n function GetShowMapTypeControl: Boolean;\r\n function GetBackgroundColor: TTMSFNCGraphicsColor;\r\n end;\r\n\r\n ITMSFNCCustomMapsInstance = interface(IInterface)\r\n ['{419FAD22-8164-47EB-8CFE-C60BBFF57751}']\r\n procedure SetMapsProperties(const Value: ITMSFNCCustomMapsProperties);\r\n end;\r\n\r\n TTMSFNCMapsLinkKind = (mlkLink, mlkScript, mlkStyle);\r\n\r\n TTMSFNCMapsLink = class\r\n private\r\n FCharSet: string;\r\n FType: string;\r\n FURL: string;\r\n FContent: string;\r\n FDefer: Boolean;\r\n FAsync: Boolean;\r\n FRel: string;\r\n FKind: TTMSFNCMapsLinkKind;\r\n public\r\n constructor CreateScript(AURL: string; AType: string = ''; ACharSet: string = ''; AContent: string = ''; ADefer: Boolean = False; AAsync: Boolean = False); virtual;\r\n constructor CreateLink(AURL: string; AType: string = ''; ARel: string = ''); virtual;\r\n constructor Create(AKind: TTMSFNCMapsLinkKind; AURL: string; AType: string; ACharSet: string; ARel: string; AContent: string; ADefer: Boolean; AAsync: Boolean); virtual;\r\n property URL: string read FURL write FURL;\r\n property &Type: string read FType write FType;\r\n property CharSet: string read FCharSet write FCharSet;\r\n property Content: string read FContent write FContent;\r\n property Rel: string read FRel write FRel;\r\n property Defer: Boolean read FDefer write FDefer;\r\n property Async: Boolean read FAsync write FAsync;\r\n property Kind: TTMSFNCMapsLinkKind read FKind write FKind;\r\n end;\r\n\r\n {$IFDEF WEBLIB}\r\n TTMSFNCMapsLinksList = class(TObjectList)\r\n private\r\n function GetItem(Index: Integer): TTMSFNCMapsLink;\r\n procedure SetItem(Index: Integer; const Value: TTMSFNCMapsLink);\r\n public\r\n property Items[Index: Integer]: TTMSFNCMapsLink read GetItem write SetItem; default;\r\n end;\r\n {$ENDIF}\r\n {$IFNDEF WEBLIB}\r\n TTMSFNCMapsLinksList = class(TObjectList);\r\n {$ENDIF}\r\n\r\n TTMSFNCMapsLibraryLocation = (llOffline, llOnline);\r\n TTMSFNCMapsService = (msGoogleMaps, msHere, msAzureMaps, msBingMaps, msTomTom, msMapBox, msOpenLayers, msMapKit, msLeaflet);\r\n\r\n ITMSFNCCustomMaps = interface(IInterface)\r\n ['{B305522A-852B-4A51-B9C0-C9D91B9A8C8B}']\r\n procedure GetHeadLinks(const AList: TTMSFNCMapsLinksList);\r\n procedure RemoveScripts;\r\n function GetResetMap: string;\r\n function GetHeadStyle: string;\r\n function GetDelayLoadEvent: string;\r\n function GetIdentifier: string;\r\n function GetMapsServiceCheck: string;\r\n function GetInitializeMap: string;\r\n function GetInitializeEvents: string;\r\n function GetAddOrUpdateMarker: string;\r\n function GetShowPopup: string;\r\n function GetClosePopup: string;\r\n function GetDeleteMarker: string;\r\n function GetAddOrUpdatePolyElement: string;\r\n function GetDeletePolyElement: string;\r\n function GetZoomToBounds: string;\r\n function GetSetCenterCoordinate: string;\r\n function GetGetCenterCoordinate: string;\r\n function GetLatLonToXY: string;\r\n function GetXYToLatLon: string;\r\n function GetGetBounds: string;\r\n function GetGetZoomLevel: string;\r\n function GetSetZoomLevel: string;\r\n function GetUpdateOptions: string;\r\n function GetGlobalVariables: string;\r\n function GetAddCoordinateToArray: string;\r\n function GetAddHoleToArray: string;\r\n function GetInitializeCoordinateArray: string;\r\n function GetInitializeHolesArray: string;\r\n function IsValid: Boolean;\r\n procedure DestroyMaps;\r\n end;\r\n\r\n ITMSFNCMapsService = interface(IInterface)\r\n ['{6E91727E-EFA6-4A74-B523-97DAF6605F09}']\r\n function CreateMaps: ITMSFNCCustomMaps;\r\n procedure DestroyMaps(AMaps: ITMSFNCCustomMaps);\r\n end;\r\n\r\n ITMSFNCMapsServiceGoogleMaps = interface(ITMSFNCMapsService)\r\n ['{71E5D88A-366B-4573-B54D-DE0B3848CB15}']\r\n end;\r\n\r\n ITMSFNCMapsServiceHere = interface(ITMSFNCMapsService)\r\n ['{646B2E30-657D-4D64-BDE7-13357E46255B}']\r\n end;\r\n\r\n ITMSFNCMapsServiceAzureMaps = interface(ITMSFNCMapsService)\r\n ['{CB46E849-C6D7-4B6C-AE8E-39A404FDE4BE}']\r\n end;\r\n\r\n ITMSFNCMapsServiceBingMaps = interface(ITMSFNCMapsService)\r\n ['{382BB281-E709-4028-9E10-3D3790C04C7B}']\r\n end;\r\n\r\n ITMSFNCMapsServiceTomTom = interface(ITMSFNCMapsService)\r\n ['{AFDD0113-F2BB-44FE-8DD3-4EAEC70BA851}']\r\n end;\r\n\r\n ITMSFNCMapsServiceMapBox = interface(ITMSFNCMapsService)\r\n ['{B141412A-AD1C-4C5F-9729-952BD04B9D6D}']\r\n end;\r\n\r\n ITMSFNCMapsServiceMapKit = interface(ITMSFNCMapsService)\r\n ['{3EAC77BF-DBDA-4328-910F-B2C23C5E9229}']\r\n end;\r\n\r\n ITMSFNCMapsServiceOpenLayers = interface(ITMSFNCMapsService)\r\n ['{424129BB-9C0E-44C5-BD30-E6399A5BC5CE}']\r\n end;\r\n\r\n ITMSFNCMapsServiceLeaflet = interface(ITMSFNCMapsService)\r\n ['{CEB938F6-48D3-4173-BB7C-7D5C56BFAA51}']\r\n end;\r\n\r\n TTMSFNCMapsGPXColorRec = record\r\n Color: TTMSFNCGraphicsColor;\r\n end;\r\n\r\n TTMSFNCMapsGPXColorRecArray = array of TTMSFNCMapsGPXColorRec;\r\n\r\n TTMSFNCMapsPointRec = record\r\n Coordinate: TTMSFNCMapsCoordinateRec;\r\n Name: string;\r\n end;\r\n\r\n TTMSFNCMapsPolyElementRec = record\r\n Coordinates: TTMSFNCMapsCoordinateRecArray;\r\n Holes: TTMSFNCMapsCoordinateRecArrayArray;\r\n Name: string;\r\n end;\r\n\r\n TTMSFNCMapsGeoJSONRec = record\r\n Points: array of TTMSFNCMapsPointRec;\r\n Polylines: array of TTMSFNCMapsPolyElementRec;\r\n Polygons: array of TTMSFNCMapsPolyElementRec;\r\n end;\r\n\r\n TTMSFNCMapsHeatMap = class;\r\n\r\n TTMSFNCMapsWeightedCoordinate = class(TCollectionItem)\r\n private\r\n FID: string;\r\n FOwner: TTMSFNCMapsHeatMap;\r\n FCoordinate: TTMSFNCMapsCoordinate;\r\n FWeight: Double;\r\n function GetID: string;\r\n procedure SetCoordinate(const Value: TTMSFNCMapsCoordinate);\r\n procedure SetWeight(const Value: Double);\r\n protected\r\n procedure UpdateHeatmap;\r\n procedure DoBeginUpdate(Sender: TObject);\r\n procedure DoEndUpdate(Sender: TObject);\r\n procedure DoUpdateCoordinate(Sender: TObject);\r\n public\r\n constructor Create(ACollection: TCollection); override;\r\n procedure Assign(Source: TPersistent); override;\r\n destructor Destroy; override;\r\n published\r\n property Coordinate: TTMSFNCMapsCoordinate read FCoordinate write SetCoordinate;\r\n property Weight: Double read FWeight write SetWeight;\r\n property ID: string read GetID;\r\n end;\r\n\r\n {$IFDEF WEBLIB}\r\n TTMSFNCMapsWeightedCoordinates = class(TTMSFNCOwnedCollection)\r\n {$ELSE}\r\n TTMSFNCMapsWeightedCoordinates = class({$IFDEF LCLLIB}specialize {$ENDIF}TTMSFNCOwnedCollection)\r\n {$ENDIF}\r\n private\r\n FOwner: TTMSFNCMapsHeatMap;\r\n function GetItem(Index: Integer): TTMSFNCMapsWeightedCoordinate;\r\n procedure SetItem(Index: Integer; const Value: TTMSFNCMapsWeightedCoordinate);\r\n protected\r\n function CreateItemClass: TCollectionItemClass; virtual;\r\n function GetOwner: TPersistent; override;\r\n public\r\n constructor Create(AOwner: TTMSFNCMapsHeatMap); virtual;\r\n property Items[Index: Integer]: TTMSFNCMapsWeightedCoordinate read GetItem write SetItem; default;\r\n procedure Clear; virtual;\r\n function Add: TTMSFNCMapsWeightedCoordinate;\r\n function Insert(Index: Integer): TTMSFNCMapsWeightedCoordinate;\r\n end;\r\n\r\n TTMSFNCMapsHeatMap = class(TCollectionItem)\r\n private\r\n FID: string;\r\n FOwner: TTMSFNCCustomMaps;\r\n FDataBoolean: Boolean;\r\n FDataString: String;\r\n FDataObject: TObject;\r\n FDataInteger: NativeInt;\r\n FDataPointer: Pointer;\r\n FRecreate: Boolean;\r\n FWeightedCoordinates: TTMSFNCMapsWeightedCoordinates;\r\n FOpacity: Single;\r\n FGradientStartColor: TTMSFNCGraphicsColor;\r\n FGradientMidColor: TTMSFNCGraphicsColor;\r\n FGradientEndColor: TTMSFNCGraphicsColor;\r\n function GetID: string;\r\n procedure SetCoordinates(const Value: TTMSFNCMapsWeightedCoordinates);\r\n procedure SetOpacity(const Value: Single);\r\n procedure SetGradientEndColor(const Value: TTMSFNCGraphicsColor);\r\n procedure SetGradientMidColor(const Value: TTMSFNCGraphicsColor);\r\n procedure SetGradientStartColor(const Value: TTMSFNCGraphicsColor);\r\n protected\r\n procedure UpdateHeatMap; virtual;\r\n public\r\n constructor Create(ACollection: TCollection); override;\r\n procedure Assign(Source: TPersistent); override;\r\n destructor Destroy; override;\r\n property DataPointer: Pointer read FDataPointer write FDataPointer;\r\n property DataBoolean: Boolean read FDataBoolean write FDataBoolean;\r\n property DataObject: TObject read FDataObject write FDataObject;\r\n property DataString: String read FDataString write FDataString;\r\n property DataInteger: NativeInt read FDataInteger write FDataInteger;\r\n property Recreate: Boolean read FRecreate write FRecreate;\r\n published\r\n property ID: string read GetID;\r\n property Opacity: Single read FOpacity write SetOpacity;\r\n property GradientStartColor: TTMSFNCGraphicsColor read FGradientStartColor write SetGradientStartColor default gcGreen;\r\n property GradientMidColor: TTMSFNCGraphicsColor read FGradientMidColor write SetGradientMidColor default gcYellow;\r\n property GradientEndColor: TTMSFNCGraphicsColor read FGradientEndColor write SetGradientEndColor default gcRed;\r\n property WeightedCoordinates: TTMSFNCMapsWeightedCoordinates read FWeightedCoordinates write SetCoordinates;\r\n end;\r\n\r\n {$IFDEF WEBLIB}\r\n TTMSFNCMapsHeatMaps = class(TTMSFNCOwnedCollection)\r\n {$ELSE}\r\n TTMSFNCMapsHeatMaps = class({$IFDEF LCLLIB}specialize {$ENDIF}TTMSFNCOwnedCollection)\r\n {$ENDIF}\r\n private\r\n FOwner: TTMSFNCCustomMaps;\r\n function GetItem(Index: Integer): TTMSFNCMapsHeatMap;\r\n procedure SetItem(Index: Integer; const Value: TTMSFNCMapsHeatMap);\r\n protected\r\n function CreateItemClass: TCollectionItemClass; virtual;\r\n function GetOwner: TPersistent; override;\r\n public\r\n constructor Create(AOwner: TTMSFNCCustomMaps); virtual;\r\n property Items[Index: Integer]: TTMSFNCMapsHeatMap read GetItem write SetItem; default;\r\n procedure Clear; virtual;\r\n function Add: TTMSFNCMapsHeatMap;\r\n function Insert(Index: Integer): TTMSFNCMapsHeatMap;\r\n end;\r\n\r\n TTMSFNCMapsPopup = class(TPersistent)\r\n private\r\n FID: string;\r\n FText: string;\r\n FOffsetX, FOffsetY: Double;\r\n FCoordinate: TTMSFNCMapsCoordinate;\r\n FPanMap: Boolean;\r\n function GetID: string;\r\n function GetLatitude: Double;\r\n function GetLongitude: Double;\r\n procedure SetLatitude(const Value: Double);\r\n procedure SetLongitude(const Value: Double);\r\n public\r\n constructor Create; virtual;\r\n destructor Destroy; override;\r\n published\r\n property ID: string read GetID;\r\n property Text: string read FText write FText;\r\n property Coordinate: TTMSFNCMapsCoordinate read FCoordinate;\r\n property Longitude: Double read GetLongitude write SetLongitude;\r\n property Latitude: Double read GetLatitude write SetLatitude;\r\n property OffsetX: Double read FOffsetX write FOffsetX;\r\n property OffsetY: Double read FOffsetY write FOffsetY;\r\n property PanMap: Boolean read FPanMap write FPanMap;\r\n end;\r\n\r\n TTMSFNCMapsMarker = class;\r\n\r\n TTMSFNCMapsMarkerIcon = class(TPersistent)\r\n private\r\n FEnabled: Boolean;\r\n FFill: TTMSFNCGraphicsColor;\r\n FSize: Integer;\r\n FOwner: TTMSFNCMapsMarker;\r\n procedure SetFill(const Value: TTMSFNCGraphicsColor);\r\n procedure SetEnabled(const Value: Boolean);\r\n procedure SetSize(const Value: Integer);\r\n public\r\n constructor Create(AMarker: TTMSFNCMapsMarker); virtual;\r\n procedure Assign(Source: TPersistent); override;\r\n destructor Destroy; override;\r\n procedure UpdateMarkerIcon;\r\n property Owner: TTMSFNCMapsMarker read FOwner write FOwner;\r\n published\r\n property Enabled: Boolean read FEnabled write SetEnabled;\r\n property Fill: TTMSFNCGraphicsColor read FFill write SetFill default gcRed;\r\n property Size: Integer read FSize write SetSize default 32;\r\n end;\r\n\r\n TTMSFNCMapsMarker = class(TCollectionItem)\r\n private\r\n FReload: Boolean;\r\n FID: string;\r\n FDataBoolean: Boolean;\r\n FDataString: String;\r\n FDataObject: TObject;\r\n FDataInteger: NativeInt;\r\n FDataPointer: Pointer;\r\n FTitle: string;\r\n FCoordinate: TTMSFNCMapsCoordinate;\r\n FIconURL: string;\r\n FRecreate: Boolean;\r\n FVisible: Boolean;\r\n FUseDefaultMarkerIcon: Boolean;\r\n FDefaultMarkerIconColor: TTMSFNCGraphicsColor;\r\n FDefaultMarkerIconSize: Integer;\r\n FDefaultIcon: TTMSFNCMapsMarkerIcon;\r\n procedure SetTitle(const Value: string);\r\n function GetID: string;\r\n function IsTitleStored: Boolean;\r\n procedure SetCoordinate(const Value: TTMSFNCMapsCoordinate);\r\n function GetLatitude: Double;\r\n function GetLongitude: Double;\r\n procedure SetLatitude(const Value: Double);\r\n procedure SetLongitude(const Value: Double);\r\n function IsLatitudeStored: Boolean;\r\n function IsLongitudeStored: Boolean;\r\n function IsIconURLStored: Boolean;\r\n procedure SetIconURL(const Value: string);\r\n procedure SetVisible(const Value: Boolean);\r\n procedure SetDefaultIcon(const Value: TTMSFNCMapsMarkerIcon);\r\n protected\r\n FOwner: TTMSFNCCustomMaps;\r\n procedure UpdateMarker; virtual;\r\n procedure CoordinateChanged(Sender: TObject);\r\n public\r\n constructor Create(ACollection: TCollection); override;\r\n procedure Assign(Source: TPersistent); override;\r\n destructor Destroy; override;\r\n property DataPointer: Pointer read FDataPointer write FDataPointer;\r\n property DataBoolean: Boolean read FDataBoolean write FDataBoolean;\r\n property DataObject: TObject read FDataObject write FDataObject;\r\n property DataString: String read FDataString write FDataString;\r\n property DataInteger: NativeInt read FDataInteger write FDataInteger;\r\n property Coordinate: TTMSFNCMapsCoordinate read FCoordinate write SetCoordinate;\r\n property Recreate: Boolean read FRecreate write FRecreate default False;\r\n published\r\n property ID: string read GetID;\r\n property Longitude: Double read GetLongitude write SetLongitude stored IsLongitudeStored nodefault;\r\n property Latitude: Double read GetLatitude write SetLatitude stored IsLatitudeStored nodefault;\r\n property Title: string read FTitle write SetTitle stored IsTitleStored nodefault;\r\n property IconURL: string read FIconURL write SetIconURL stored IsIconURLStored nodefault;\r\n property Visible: Boolean read FVisible write SetVisible default True;\r\n property DefaultIcon: TTMSFNCMapsMarkerIcon read FDefaultIcon write SetDefaultIcon;\r\n\r\n end;\r\n\r\n {$IFDEF WEBLIB}\r\n TTMSFNCMapsMarkers = class(TTMSFNCOwnedCollection)\r\n {$ELSE}\r\n TTMSFNCMapsMarkers = class({$IFDEF LCLLIB}specialize {$ENDIF}TTMSFNCOwnedCollection)\r\n {$ENDIF}\r\n private\r\n FOwner: TTMSFNCCustomMaps;\r\n function GetItem(Index: Integer): TTMSFNCMapsMarker;\r\n procedure SetItem(Index: Integer; const Value: TTMSFNCMapsMarker);\r\n function GetItemByID(ID: string): TTMSFNCMapsMarker;\r\n protected\r\n function CreateItemClass: TCollectionItemClass; virtual;\r\n function GetOwner: TPersistent; override;\r\n public\r\n constructor Create(AOwner: TTMSFNCCustomMaps); virtual;\r\n property Items[Index: Integer]: TTMSFNCMapsMarker read GetItem write SetItem; default;\r\n procedure Clear; virtual;\r\n procedure Recreate; virtual;\r\n function Add: TTMSFNCMapsMarker;\r\n function Insert(Index: Integer): TTMSFNCMapsMarker;\r\n function ToCoordinateArray: TTMSFNCMapsCoordinateRecArrayArray; virtual;\r\n property ItemByID[ID: string]: TTMSFNCMapsMarker read GetItemByID;\r\n end;\r\n\r\n TTMSFNCMapsPolyElement = class;\r\n\r\n TTMSFNCMapsPolyElementHole = class(TCollectionItem)\r\n private\r\n FID: string;\r\n FOwner: TTMSFNCMapsPolyElement;\r\n FCoordinates: TTMSFNCMapsCoordinates;\r\n function GetID: string;\r\n procedure SetCoordinates(const Value: TTMSFNCMapsCoordinates);\r\n protected\r\n procedure UpdatePolyElement;\r\n procedure DoBeginUpdate(Sender: TObject);\r\n procedure DoEndUpdate(Sender: TObject);\r\n procedure DoUpdateCoordinates(Sender: TObject);\r\n public\r\n constructor Create(ACollection: TCollection); override;\r\n procedure Assign(Source: TPersistent); override;\r\n destructor Destroy; override;\r\n published\r\n property Coordinates: TTMSFNCMapsCoordinates read FCoordinates write SetCoordinates;\r\n property ID: string read GetID;\r\n end;\r\n\r\n {$IFDEF WEBLIB}\r\n TTMSFNCMapsPolyElementHoles = class(TTMSFNCOwnedCollection)\r\n {$ELSE}\r\n TTMSFNCMapsPolyElementHoles = class({$IFDEF LCLLIB}specialize {$ENDIF}TTMSFNCOwnedCollection)\r\n {$ENDIF}\r\n private\r\n FOwner: TTMSFNCMapsPolyElement;\r\n function GetItem(Index: Integer): TTMSFNCMapsPolyElementHole;\r\n procedure SetItem(Index: Integer; const Value: TTMSFNCMapsPolyElementHole);\r\n protected\r\n function CreateItemClass: TCollectionItemClass; virtual;\r\n function GetOwner: TPersistent; override;\r\n public\r\n constructor Create(AOwner: TTMSFNCMapsPolyElement); virtual;\r\n property Items[Index: Integer]: TTMSFNCMapsPolyElementHole read GetItem write SetItem; default;\r\n procedure Clear; virtual;\r\n function Add: TTMSFNCMapsPolyElementHole;\r\n function Insert(Index: Integer): TTMSFNCMapsPolyElementHole;\r\n end;\r\n\r\n TTMSFNCMapsPolyElement = class(TCollectionItem)\r\n private\r\n FReload: Boolean;\r\n FID: string;\r\n FOwner: TTMSFNCCustomMaps;\r\n FDataBoolean: Boolean;\r\n FDataString: String;\r\n FDataObject: TObject;\r\n FDataInteger: NativeInt;\r\n FDataPointer: Pointer;\r\n FStrokeColor: TTMSFNCGraphicsColor;\r\n FCoordinates: TTMSFNCMapsCoordinates;\r\n FStrokeOpacity: Single;\r\n FStrokeWidth: Integer;\r\n FRecreate: Boolean;\r\n FVisible: Boolean;\r\n FHoles: TTMSFNCMapsPolyElementHoles;\r\n function GetID: string;\r\n procedure SetStrokeColor(const Value: TTMSFNCGraphicsColor);\r\n procedure SetCoordinates(const Value: TTMSFNCMapsCoordinates);\r\n procedure SetHoles(const Value: TTMSFNCMapsPolyElementHoles);\r\n function IsStrokeOpacityStored: Boolean;\r\n procedure SetStrokeOpacity(const Value: Single);\r\n procedure SetStrokeWidth(const Value: Integer);\r\n procedure SetVisible(const Value: Boolean);\r\n protected\r\n procedure BeginUpdate;\r\n procedure EndUpdate;\r\n procedure UpdatePolyElement; virtual;\r\n procedure DoUpdateCoordinates(Sender: TObject); virtual;\r\n procedure DoBeginUpdate(Sender: TObject); virtual;\r\n procedure DoEndUpdate(Sender: TObject); virtual;\r\n property Coordinates: TTMSFNCMapsCoordinates read FCoordinates write SetCoordinates;\r\n property Holes: TTMSFNCMapsPolyElementHoles read FHoles write SetHoles;\r\n function AddHole(ACoordinates: TTMSFNCMapsCoordinateRecArray): TTMSFNCMapsPolyElementHole; reintroduce; virtual;\r\n public\r\n constructor Create(ACollection: TCollection); override;\r\n procedure Assign(Source: TPersistent); override;\r\n destructor Destroy; override;\r\n function Area: Double; virtual;\r\n function ContainsPoint(ACoordinate: TTMSFNCMapsCoordinateRec): Boolean; virtual;\r\n property DataPointer: Pointer read FDataPointer write FDataPointer;\r\n property DataBoolean: Boolean read FDataBoolean write FDataBoolean;\r\n property DataObject: TObject read FDataObject write FDataObject;\r\n property DataString: String read FDataString write FDataString;\r\n property DataInteger: NativeInt read FDataInteger write FDataInteger;\r\n property Recreate: Boolean read FRecreate write FRecreate default False;\r\n published\r\n property ID: string read GetID;\r\n property StrokeColor: TTMSFNCGraphicsColor read FStrokeColor write SetStrokeColor default gcBlack;\r\n property StrokeOpacity: Single read FStrokeOpacity write SetStrokeOpacity stored IsStrokeOpacityStored nodefault;\r\n property StrokeWidth: Integer read FStrokeWidth write SetStrokeWidth default 2;\r\n property Visible: Boolean read FVisible write SetVisible default True;\r\n end;\r\n\r\n {$IFDEF WEBLIB}\r\n TTMSFNCMapsPolyElements = class(TTMSFNCOwnedCollection)\r\n {$ELSE}\r\n TTMSFNCMapsPolyElements = class({$IFDEF LCLLIB}specialize {$ENDIF}TTMSFNCOwnedCollection)\r\n {$ENDIF}\r\n private\r\n FOwner: TTMSFNCCustomMaps;\r\n function GetItem(Index: Integer): TTMSFNCMapsPolyElement;\r\n procedure SetItem(Index: Integer; const Value: TTMSFNCMapsPolyElement);\r\n function GetItemByID(ID: string): TTMSFNCMapsPolyElement;\r\n protected\r\n function CreateItemClass: TCollectionItemClass; virtual;\r\n function GetOwner: TPersistent; override;\r\n public\r\n constructor Create(AOwner: TTMSFNCCustomMaps); virtual;\r\n property Items[Index: Integer]: TTMSFNCMapsPolyElement read GetItem write SetItem; default;\r\n procedure Clear; virtual;\r\n procedure Recreate; virtual;\r\n function Add: TTMSFNCMapsPolyElement;\r\n function Insert(Index: Integer): TTMSFNCMapsPolyElement;\r\n function ToCoordinateArray: TTMSFNCMapsCoordinateRecArrayArray; virtual;\r\n property ItemByID[ID: string]: TTMSFNCMapsPolyElement read GetItemByID;\r\n end;\r\n\r\n TTMSFNCMapsPolyline = class(TTMSFNCMapsPolyElement)\r\n public\r\n function Distance: Double; virtual;\r\n function Split(ACoordinate: TTMSFNCMapsCoordinateRec): TTMSFNCMapsPolyline; overload;\r\n function Split(AIndex: Integer): TTMSFNCMapsPolyline; overload;\r\n function Segment(AStartCoordinate, AEndCoordinate: TTMSFNCMapsCoordinateRec): TTMSFNCMapsPolyline; overload;\r\n function Segment(AStartIndex, AEndIndex: Integer): TTMSFNCMapsPolyline; overload;\r\n procedure Merge(APolyline: TTMSFNCMapsPolyline); overload;\r\n procedure Merge(ACoordinates: TTMSFNCMapsCoordinateRecArray); overload;\r\n published\r\n property Coordinates;\r\n end;\r\n\r\n TTMSFNCMapsPolylines = class(TTMSFNCMapsPolyElements)\r\n private\r\n function GetItem(Index: Integer): TTMSFNCMapsPolyline;\r\n procedure SetItem(Index: Integer; const Value: TTMSFNCMapsPolyline);\r\n protected\r\n function CreateItemClass: TCollectionItemClass; override;\r\n public\r\n property Items[Index: Integer]: TTMSFNCMapsPolyline read GetItem write SetItem; default;\r\n function Add: TTMSFNCMapsPolyline;\r\n function Insert(Index: Integer): TTMSFNCMapsPolyline;\r\n end;\r\n\r\n TTMSFNCMapsCustomPolygon = class(TTMSFNCMapsPolyElement)\r\n private\r\n FFillColor: TTMSFNCGraphicsColor;\r\n FFillOpacity: Single;\r\n procedure SetFillColor(const Value: TTMSFNCGraphicsColor);\r\n function IsFillOpacityStored: Boolean;\r\n procedure SetFillOpacity(const Value: Single);\r\n public\r\n constructor Create(ACollection: TCollection); override;\r\n procedure Assign(Source: TPersistent); override;\r\n published\r\n property FillColor: TTMSFNCGraphicsColor read FFillColor write SetFillColor default gcWhite;\r\n property FillOpacity: Single read FFillOpacity write SetFillOpacity stored IsFillOpacityStored nodefault;\r\n end;\r\n\r\n TTMSFNCMapsCustomPolygons = class(TTMSFNCMapsPolyElements)\r\n private\r\n function GetItem(Index: Integer): TTMSFNCMapsCustomPolygon;\r\n procedure SetItem(Index: Integer; const Value: TTMSFNCMapsCustomPolygon);\r\n protected\r\n function CreateItemClass: TCollectionItemClass; override;\r\n public\r\n property Items[Index: Integer]: TTMSFNCMapsCustomPolygon read GetItem write SetItem; default;\r\n function Add: TTMSFNCMapsCustomPolygon;\r\n function Insert(Index: Integer): TTMSFNCMapsCustomPolygon;\r\n end;\r\n\r\n TTMSFNCMapsPolygon = class(TTMSFNCMapsCustomPolygon)\r\n protected\r\n function AddHole(ACoordinates: TTMSFNCMapsCoordinateRecArray): TTMSFNCMapsPolyElementHole; override;\r\n property Holes;\r\n published\r\n property Coordinates;\r\n end;\r\n\r\n TTMSFNCMapsPolygons = class(TTMSFNCMapsPolyElements)\r\n private\r\n function GetItem(Index: Integer): TTMSFNCMapsPolygon;\r\n procedure SetItem(Index: Integer; const Value: TTMSFNCMapsPolygon);\r\n protected\r\n function CreateItemClass: TCollectionItemClass; override;\r\n public\r\n property Items[Index: Integer]: TTMSFNCMapsPolygon read GetItem write SetItem; default;\r\n function Add: TTMSFNCMapsPolygon;\r\n function Insert(Index: Integer): TTMSFNCMapsPolygon;\r\n end;\r\n\r\n TTMSFNCMapsRectangle = class(TTMSFNCMapsCustomPolygon)\r\n private\r\n FBounds: TTMSFNCMapsBounds;\r\n procedure SetBounds(const Value: TTMSFNCMapsBounds);\r\n protected\r\n procedure DoBoundsChanged(Sender: TObject);\r\n public\r\n constructor Create(ACollection: TCollection); override;\r\n destructor Destroy; override;\r\n procedure Assign(Source: TPersistent); override;\r\n function Area: Double; override;\r\n function ContainsPoint(ACoordinate: TTMSFNCMapsCoordinateRec): Boolean; override;\r\n published\r\n property Bounds: TTMSFNCMapsBounds read FBounds write SetBounds;\r\n end;\r\n\r\n TTMSFNCMapsRectangles = class(TTMSFNCMapsCustomPolygons)\r\n private\r\n function GetItem(Index: Integer): TTMSFNCMapsRectangle;\r\n procedure SetItem(Index: Integer; const Value: TTMSFNCMapsRectangle);\r\n protected\r\n function CreateItemClass: TCollectionItemClass; override;\r\n public\r\n property Items[Index: Integer]: TTMSFNCMapsRectangle read GetItem write SetItem; default;\r\n function Add: TTMSFNCMapsRectangle;\r\n function Insert(Index: Integer): TTMSFNCMapsRectangle;\r\n function ToCoordinateArray: TTMSFNCMapsCoordinateRecArrayArray; override;\r\n end;\r\n\r\n TTMSFNCMapsCircle = class(TTMSFNCMapsCustomPolygon)\r\n private\r\n FRadius: Double;\r\n FCenter: TTMSFNCMapsCoordinate;\r\n procedure SetRadius(const Value: Double);\r\n procedure SetCenter(const Value: TTMSFNCMapsCoordinate);\r\n function IsRadiusStored: Boolean;\r\n protected\r\n procedure DoCenterChanged(Sender: TObject);\r\n public\r\n constructor Create(ACollection: TCollection); override;\r\n destructor Destroy; override;\r\n procedure Assign(Source: TPersistent); override;\r\n function Area: Double; override;\r\n function ContainsPoint(ACoordinate: TTMSFNCMapsCoordinateRec): Boolean; override;\r\n published\r\n property Center: TTMSFNCMapsCoordinate read FCenter write SetCenter;\r\n property Radius: Double read FRadius write SetRadius stored IsRadiusStored nodefault;\r\n end;\r\n\r\n TTMSFNCMapsCircles = class(TTMSFNCMapsCustomPolygons)\r\n private\r\n function GetItem(Index: Integer): TTMSFNCMapsCircle;\r\n procedure SetItem(Index: Integer; const Value: TTMSFNCMapsCircle);\r\n protected\r\n function CreateItemClass: TCollectionItemClass; override;\r\n public\r\n property Items[Index: Integer]: TTMSFNCMapsCircle read GetItem write SetItem; default;\r\n function Add: TTMSFNCMapsCircle;\r\n function Insert(Index: Integer): TTMSFNCMapsCircle;\r\n function ToCoordinateArray: TTMSFNCMapsCoordinateRecArrayArray; override;\r\n end;\r\n\r\n TTMSFNCMapsHeadLink = class(TCollectionItem)\r\n private\r\n FOwner: TTMSFNCCustomMaps;\r\n FURL: string;\r\n FEnabled: Boolean;\r\n FRel: string;\r\n FDefer: Boolean;\r\n FCharSet: string;\r\n FKind: TTMSFNCMapsLinkKind;\r\n FType: string;\r\n FContent: TStringList;\r\n FAsync: Boolean;\r\n procedure SetURL(const Value: string);\r\n function IsURLStored: Boolean;\r\n procedure SetEnabled(const Value: Boolean);\r\n procedure SetContent(const Value: TStringList);\r\n procedure SetAsync(const Value: Boolean);\r\n procedure SetCharSet(const Value: string);\r\n procedure SetDefer(const Value: Boolean);\r\n procedure SetRel(const Value: string);\r\n procedure SetType(const Value: string);\r\n procedure SetKind(const Value: TTMSFNCMapsLinkKind);\r\n public\r\n constructor Create(ACollection: TCollection); override;\r\n procedure Assign(Source: TPersistent); override;\r\n destructor Destroy; override;\r\n procedure HeadLinkChanged(Sender: TObject);\r\n procedure UpdateHeadLink; virtual;\r\n published\r\n property URL: string read FURL write SetURL stored IsURLStored nodefault;\r\n property Enabled: Boolean read FEnabled write SetEnabled default True;\r\n property &Type: string read FType write SetType;\r\n property CharSet: string read FCharSet write SetCharSet;\r\n property Content: TStringList read FContent write SetContent;\r\n property Rel: string read FRel write SetRel;\r\n property Defer: Boolean read FDefer write SetDefer;\r\n property Async: Boolean read FAsync write SetAsync;\r\n property Kind: TTMSFNCMapsLinkKind read FKind write SetKind;\r\n end;\r\n\r\n {$IFDEF WEBLIB}\r\n TTMSFNCMapsHeadLinks = class(TTMSFNCOwnedCollection)\r\n {$ELSE}\r\n TTMSFNCMapsHeadLinks = class({$IFDEF LCLLIB}specialize {$ENDIF}TTMSFNCOwnedCollection)\r\n {$ENDIF}\r\n private\r\n FOwner: TTMSFNCCustomMaps;\r\n function GetItem(Index: Integer): TTMSFNCMapsHeadLink;\r\n procedure SetItem(Index: Integer; const Value: TTMSFNCMapsHeadLink);\r\n protected\r\n function CreateItemClass: TCollectionItemClass; virtual;\r\n function GetOwner: TPersistent; override;\r\n public\r\n constructor Create(AOwner: TTMSFNCCustomMaps); virtual;\r\n property Items[Index: Integer]: TTMSFNCMapsHeadLink read GetItem write SetItem; default;\r\n procedure Clear; virtual;\r\n function Add: TTMSFNCMapsHeadLink;\r\n function AddScript(AURL: string): TTMSFNCMapsHeadLink;\r\n function AddLink(AURL: string): TTMSFNCMapsHeadLink;\r\n function AddStyleSheetLink(AURL: string): TTMSFNCMapsHeadLink;\r\n function AddStyle(AStyle: TStrings): TTMSFNCMapsHeadLink;\r\n function Insert(Index: Integer): TTMSFNCMapsHeadLink;\r\n end;\r\n\r\n TTMSFNCMapsOptions = class(TPersistent)\r\n private\r\n FDefaultLongitude: Double;\r\n FDefaultLatitude: Double;\r\n FOnChange: TNotifyEvent;\r\n FConsole: Boolean;\r\n FDefaultZoomLevel: Double;\r\n FShowZoomControl: Boolean;\r\n FShowMapTypeControl: Boolean;\r\n FLocale: string;\r\n FZoomOnDblClick: Boolean;\r\n FZoomOnWheelScroll: Boolean;\r\n FPanning: Boolean;\r\n FBackgroundColor: TTMSFNCGraphicsColor;\r\n function IsDefaultLatitudeStored: Boolean;\r\n function IsDefaultLongitudeStored: Boolean;\r\n procedure SetDefaultLatitude(const Value: Double);\r\n procedure SetDefaultLongitude(const Value: Double);\r\n procedure SetConsole(const Value: Boolean);\r\n procedure SetDefaultZoomLevel(const Value: Double);\r\n procedure SetShowMapTypeControl(const Value: Boolean);\r\n procedure SetShowZoomControl(const Value: Boolean);\r\n function IsLocaleStored: Boolean;\r\n procedure SetLocale(const Value: string);\r\n procedure SetZoomOnDblClick(const Value: Boolean);\r\n procedure SetPanning(const Value: Boolean);\r\n procedure SetZoomOnWheelScroll(const Value: Boolean);\r\n procedure SetBackgroundColor(const Value: TTMSFNCGraphicsColor);\r\n protected\r\n procedure Changed;\r\n property BackgroundColor: TTMSFNCGraphicsColor read FBackgroundColor write SetBackgroundColor default gcSilver;\r\n public\r\n procedure Assign(Source: TPersistent); override;\r\n constructor Create; virtual;\r\n property OnChange: TNotifyEvent read FOnChange write FOnChange;\r\n published\r\n property Console: Boolean read FConsole write SetConsole default False;\r\n property Locale: string read FLocale write SetLocale stored IsLocaleStored nodefault;\r\n property DefaultLatitude: Double read FDefaultLatitude write SetDefaultLatitude stored IsDefaultLatitudeStored nodefault;\r\n property DefaultLongitude: Double read FDefaultLongitude write SetDefaultLongitude stored IsDefaultLongitudeStored nodefault;\r\n property DefaultZoomLevel: Double read FDefaultZoomLevel write SetDefaultZoomLevel;\r\n property ShowZoomControl: Boolean read FShowZoomControl write SetShowZoomControl default True;\r\n property ShowMapTypeControl: Boolean read FShowMapTypeControl write SetShowMapTypeControl default True;\r\n property ZoomOnDblClick: Boolean read FZoomOnDblClick write SetZoomOnDblClick default True;\r\n property ZoomOnWheelScroll: Boolean read FZoomOnWheelScroll write SetZoomOnWheelScroll default True;\r\n property Panning: Boolean read FPanning write SetPanning default True;\r\n end;\r\n\r\n TTMSFNCMapsGetDefaultHTMLMessageEvent = procedure(Sender: TObject; var ADefaultHTMLMessage: string) of object;\r\n TTMSFNCMapsCustomizePolyElementEvent = procedure(Sender: TObject; var ACustomizePolyElement: string) of object;\r\n TTMSFNCMapsCustomizeMarkerEvent = procedure(Sender: TObject; var ACustomizeMarker: string) of object;\r\n TTMSFNCMapsCustomizePopupEvent = procedure(Sender: TObject; var ACustomizePopup: string) of object;\r\n TTMSFNCMapsCustomizeOptionsEvent = procedure(Sender: TObject; var ACustomizeOptions: string) of object;\r\n TTMSFNCMapsCustomizeMapEvent = procedure(Sender: TObject; var ACustomizeMap: string) of object;\r\n TTMSFNCMapsCustomizeGlobalVariablesEvent = procedure(Sender: TObject; var ACustomizeGlobalVariables: string) of object;\r\n TTMSFNCMapsCustomizeJavaScriptEvent = procedure(Sender: TObject; var ACustomizeJavaScript: string) of object;\r\n TTMSFNCMapsCustomizeCSSEvent = procedure(Sender: TObject; var ACustomizeCSS: string) of object;\r\n TTMSFNCMapsCustomizeHeadLinksEvent = procedure(Sender: TObject; AList: TTMSFNCMapsLinksList) of object;\r\n TTMSFNCMapsCustomizeLocalAccessFileNameEvent = procedure(Sender: TObject; var AFileName: string) of object;\r\n\r\n TTMSFNCMapsMarkersArray = array of TTMSFNCMapsMarker;\r\n\r\n TTMSFNCMapsEventData = class(TPersistent)\r\n private\r\n FEvent: string;\r\n FCoordinate: TTMSFNCMapsCoordinate;\r\n FEventName: string;\r\n FX: Double;\r\n FY: Double;\r\n FID: string;\r\n FPolyElement: TTMSFNCMapsPolyElement;\r\n FMarker: TTMSFNCMapsMarker;\r\n FCustomData: string;\r\n public\r\n constructor Create; virtual;\r\n destructor Destroy; override;\r\n property Marker: TTMSFNCMapsMarker read FMarker;\r\n property PolyElement: TTMSFNCMapsPolyElement read FPolyElement;\r\n property CustomData: string read FCustomData write FCustomData;\r\n published\r\n property ID: string read FID write FID;\r\n property EventName: string read FEventName write FEventName;\r\n property Coordinate: TTMSFNCMapsCoordinate read FCoordinate;\r\n property X: Double read FX write FX;\r\n property Y: Double read FY write FY;\r\n end;\r\n\r\n TTMSFNCMapsGeoJSONEventData = class(TPersistent)\r\n private\r\n FJSONValue: TJSONValue;\r\n FPolygon: TTMSFNCMapsCoordinateRecArray;\r\n FPolyline: TTMSFNCMapsCoordinateRecArray;\r\n FPoint: TTMSFNCMapsCoordinateRec;\r\n public\r\n constructor Create; virtual;\r\n destructor Destroy; override;\r\n property Polygon: TTMSFNCMapsCoordinateRecArray read FPolygon write FPolygon;\r\n property Polyline: TTMSFNCMapsCoordinateRecArray read FPolyline write FPolyline;\r\n property Point: TTMSFNCMapsCoordinateRec read FPoint write FPoint;\r\n property JSONValue: TJSONValue read FJSONValue write FJSONValue;\r\n end;\r\n\r\n TTMSFNCMapsGeoJSONObjectEvent = procedure(Sender: TObject; AEventData: TTMSFNCMapsGeoJSONEventData) of object;\r\n TTMSFNCMapsBaseEvent = procedure(Sender: TObject; AEventData: TTMSFNCMapsEventData) of object;\r\n TTMSFNCMapsGetCenterCoordinateEvent = procedure(Sender: TObject; ACoordinate: TTMSFNCMapsCoordinateRec) of object;\r\n TTMSFNCMapsGetBoundsEvent = procedure(Sender: TObject; ABounds: TTMSFNCMapsBoundsRec) of object;\r\n TTMSFNCMapsGetZoomLevelEvent = procedure(Sender: TObject; AZoomLevel: Double) of object;\r\n TTMSFNCMapsRouteCalculatorWayPointEvent = procedure(Sender: TObject; AMarker: TTMSFNCMapsMarker; ASegment: TTMSFNCRouteCalculatorSegment) of object;\r\n TTMSFNCMapsRouteCalculatorPolylineEvent = procedure(Sender: TObject; APolyline: TTMSFNCMapsPolyline; ASegment: TTMSFNCRouteCalculatorSegment) of object;\r\n TTMSFNCMapsRouteCalculatorDeletePolylineEvent = procedure(Sender: TObject; var ACanDelete: Boolean; APolyline: TTMSFNCMapsPolyline; ASegment: TTMSFNCRouteCalculatorSegment) of object;\r\n TTMSFNCMapsRouteCalculatorDeleteMarkerEvent = procedure(Sender: TObject; var ACanDelete: Boolean; AMarker: TTMSFNCMapsMarker; ASegment: TTMSFNCRouteCalculatorSegment) of object;\r\n\r\n TTMSFNCMapsOptionsClass = class of TTMSFNCMapsOptions;\r\n TTMSFNCMapsMarkersClass = class of TTMSFNCMapsMarkers;\r\n TTMSFNCMapsHeatMapsClass = class of TTMSFNCMapsHeatMaps;\r\n TTMSFNCMapsElementContainersClass = class of TTMSFNCMapsElementContainers;\r\n TTMSFNCMapsLabelsClass = class of TTMSFNCMapsLabels;\r\n TTMSFNCMapsHeadLinksClass = class of TTMSFNCMapsHeadLinks;\r\n TTMSFNCMapsRectanglesClass = class of TTMSFNCMapsRectangles;\r\n TTMSFNCMapsCirclesClass = class of TTMSFNCMapsCircles;\r\n TTMSFNCMapsPolylinesClass = class of TTMSFNCMapsPolylines;\r\n TTMSFNCMapsPolygonsClass = class of TTMSFNCMapsPolygons;\r\n\r\n TTMSFNCMapsElementActions = class;\r\n TTMSFNCMapsElementContainer = class;\r\n\r\n TTMSFNCMapsHTMLEvent = (heClick, heDblClick, heKeyPress, heKeyDown, heKeyUp, heMouseDown, heMouseMove, heMouseUp, heMouseEnter, heMouseLeave, heBlur, heFocus, heChange, heSelect, heCustom, heNone);\r\n TTMSFNCMapsPosition = (poCustom, poTopLeft, poTopCenter, poTopRight, poCenterLeft, poCenterCenter, poBottomLeft, poBottomCenter, poBottomRight, poCoordinate, poBounds, poCenterRight);\r\n TTMSFNCMapsPositionType = (ptCoordinate, ptBounds);\r\n TTMSFNCMapsReturnValue = (rvNone, rvValue, rvChecked, rvInnerHTML, rvInnerText, rvSelectedIndex);\r\n TTMSFNCMapsLabelType = (ltLabel, ltBalloon);\r\n\r\n TTMSFNCMapsElementAction = class(TCollectionItem)\r\n private\r\n FHTMLElementID: string;\r\n FElementEvent: TTMSFNCMapsHTMLEvent;\r\n FTag: integer;\r\n FEnabled: boolean;\r\n FName: string;\r\n FOnExecute: TTMSFNCMapsBaseEvent;\r\n FCustomEvent: string;\r\n FEventReturnValue: TTMSFNCMapsReturnValue;\r\n procedure SetHTMLElementID(const Value: string);\r\n procedure SetName(const Value: string);\r\n procedure SetElementEvent(const Value: TTMSFNCMapsHTMLEvent);\r\n procedure SetEnabled(const Value: boolean);\r\n procedure SetCustomEvent(const Value: string);\r\n procedure SetEventReturnValue(const Value: TTMSFNCMapsReturnValue);\r\n protected\r\n FOwner: TTMSFNCMapsElementContainer;\r\n procedure UpdateAction; virtual;\r\n public\r\n constructor Create(ACollection: TCollection); override;\r\n destructor Destroy; override;\r\n procedure Assign(Source: TPersistent); override;\r\n property ElementContainer: TTMSFNCMapsElementContainer read FOwner;\r\n published\r\n property Enabled: Boolean read FEnabled write SetEnabled default True;\r\n property Event: TTMSFNCMapsHTMLEvent read FElementEvent write SetElementEvent default heClick;\r\n property CustomEvent: string read FCustomEvent write SetCustomEvent;\r\n property EventReturnValue: TTMSFNCMapsReturnValue read FEventReturnValue write SetEventReturnValue default rvNone;\r\n property HTMLElementID: string read FHTMLElementID write SetHTMLElementID;\r\n property Name: string read FName write SetName;\r\n property Tag: integer read FTag write FTag default 0;\r\n property OnExecute: TTMSFNCMapsBaseEvent read FOnExecute write FOnExecute;\r\n end;\r\n\r\n TTMSFNCMapsElementActions = class(TOwnedCollection)\r\n private\r\n FOwner: TTMSFNCMapsElementContainer;\r\n function GetItems(AIndex: Integer): TTMSFNCMapsElementAction;\r\n procedure SetItems(AIndex: Integer; const Value: TTMSFNCMapsElementAction);\r\n function GetAction(AName: string): TTMSFNCMapsElementAction;\r\n public\r\n constructor Create(AOwner: TTMSFNCMapsElementContainer); reintroduce;\r\n function Add: TTMSFNCMapsElementAction; reintroduce;\r\n function Insert(AIndex: Integer): TTMSFNCMapsElementAction; reintroduce;\r\n property Items[AIndex: Integer]: TTMSFNCMapsElementAction read GetItems write SetItems; default;\r\n property Action[AName: string]: TTMSFNCMapsElementAction Read GetAction;\r\n function GetActionByName(AName: string): TTMSFNCMapsElementAction;\r\n function GetByName(AName: string): TTMSFNCMapsElementAction;\r\n function FindByName(AName: string): TTMSFNCMapsElementAction;\r\n end;\r\n\r\n TTMSFNCMapsLabel = class(TCollectionItem)\r\n private\r\n FOwner: TTMSFNCCustomMaps;\r\n FReload: Boolean;\r\n FID: string;\r\n FText: string;\r\n FDataPointer: Pointer;\r\n FDataBoolean: Boolean;\r\n FDataObject: TObject;\r\n FDataString: string;\r\n FDataInteger: NativeInt;\r\n FRecreate: Boolean;\r\n FCoordinate: TTMSFNCMapsCoordinate;\r\n FVisible: Boolean;\r\n FBorderColor: TTMSFNCGraphicsColor;\r\n FFont: TTMSFNCGraphicsFont;\r\n FBackgroundColor: TTMSFNCGraphicsColor;\r\n FBorderWidth: Integer;\r\n FBounds: TTMSFNCMapsBounds;\r\n FPosition: TTMSFNCMapsPositionType;\r\n FLabelType: TTMSFNCMapsLabelType;\r\n function GetID: string;\r\n procedure SetText(const Value: string);\r\n procedure SetCoordinate(const Value: TTMSFNCMapsCoordinate);\r\n procedure SetVisible(const Value: Boolean);\r\n procedure SetBackgroundColor(const Value: TTMSFNCGraphicsColor);\r\n procedure SetBorderColor(const Value: TTMSFNCGraphicsColor);\r\n procedure SetBorderWidth(const Value: Integer);\r\n procedure SetFont(const Value: TTMSFNCGraphicsFont);\r\n procedure SetBounds(const Value: TTMSFNCMapsBounds);\r\n procedure SetPosition(const Value: TTMSFNCMapsPositionType);\r\n procedure SetLabelType(const Value: TTMSFNCMapsLabelType);\r\n protected\r\n procedure UpdateLabel; virtual;\r\n procedure LabelChanged(Sender: TObject);\r\n public\r\n constructor Create(ACollection: TCollection); override;\r\n procedure Assign(Source: TPersistent); override;\r\n destructor Destroy; override;\r\n property Maps: TTMSFNCCustomMaps read FOwner;\r\n property DataPointer: Pointer read FDataPointer write FDataPointer;\r\n property DataBoolean: Boolean read FDataBoolean write FDataBoolean;\r\n property DataObject: TObject read FDataObject write FDataObject;\r\n property DataString: string read FDataString write FDataString;\r\n property DataInteger: NativeInt read FDataInteger write FDataInteger;\r\n property Recreate: Boolean read FRecreate write FRecreate default False;\r\n published\r\n property ID: string read GetID;\r\n property Text: string read FText write SetText nodefault;\r\n property Coordinate: TTMSFNCMapsCoordinate read FCoordinate write SetCoordinate;\r\n property Bounds: TTMSFNCMapsBounds read FBounds write SetBounds;\r\n property Visible: Boolean read FVisible write SetVisible;\r\n property BackgroundColor: TTMSFNCGraphicsColor read FBackgroundColor write SetBackgroundColor default gcNull;\r\n property BorderColor: TTMSFNCGraphicsColor read FBorderColor write SetBorderColor default gcNull;\r\n property BorderWidth: Integer read FBorderWidth write SetBorderWidth default 2;\r\n property Font: TTMSFNCGraphicsFont read FFont write SetFont;\r\n property Position: TTMSFNCMapsPositionType read FPosition write SetPosition default ptCoordinate;\r\n property LabelType: TTMSFNCMapsLabelType read FLabelType write SetLabelType default ltLabel;\r\n\r\n end;\r\n\r\n {$IFDEF WEBLIB}\r\n TTMSFNCMapsLabels = class(TTMSFNCOwnedCollection)\r\n {$ELSE}\r\n TTMSFNCMapsLabels = class({$IFDEF LCLLIB}specialize {$ENDIF}TTMSFNCOwnedCollection)\r\n {$ENDIF}\r\n private\r\n FOwner: TTMSFNCCustomMaps;\r\n function GetItem(Index: Integer): TTMSFNCMapsLabel;\r\n procedure SetItem(Index: Integer; const Value: TTMSFNCMapsLabel);\r\n function GetItemByID(ID: string): TTMSFNCMapsLabel;\r\n protected\r\n function CreateItemClass: TCollectionItemClass; virtual;\r\n function GetOwner: TPersistent; override;\r\n public\r\n constructor Create(AOwner: TTMSFNCCustomMaps); virtual;\r\n property Items[Index: Integer]: TTMSFNCMapsLabel read GetItem write SetItem; default;\r\n procedure Clear; virtual;\r\n procedure Recreate; virtual;\r\n function Add: TTMSFNCMapsLabel;\r\n function Insert(Index: Integer): TTMSFNCMapsLabel;\r\n property ItemByID[ID: string]: TTMSFNCMapsLabel read GetItemByID;\r\n end;\r\n\r\n TTMSFNCMapsElementContainer = class(TCollectionItem)\r\n private\r\n FReload: Boolean;\r\n FID: string;\r\n FDataBoolean: Boolean;\r\n FDataString: String;\r\n FDataObject: TObject;\r\n FDataInteger: NativeInt;\r\n FDataPointer: Pointer;\r\n FHTML: TStringList;\r\n FRecreate: Boolean;\r\n FVisible: Boolean;\r\n FActions: TTMSFNCMapsElementActions;\r\n FPosition: TTMSFNCMapsPosition;\r\n FHTMLElementID: string;\r\n FHTMLElementClassName: string;\r\n FUseDefaultStyle: Boolean;\r\n FScript: TStringList;\r\n FStyle: TStringList;\r\n FMargins: TTMSFNCMargins;\r\n FCoordinate: TTMSFNCMapsCoordinate;\r\n FBounds: TTMSFNCMapsBounds;\r\n FLabelType: TTMSFNCMapsLabelType;\r\n procedure SetHTML(const Value: TStringList);\r\n function GetID: string;\r\n procedure SetVisible(const Value: Boolean);\r\n procedure SetActions(const Value: TTMSFNCMapsElementActions);\r\n procedure SetPosition(const Value: TTMSFNCMapsPosition);\r\n procedure SetHTMLElementClassName(const Value: string);\r\n procedure SetHTMLElementID(const Value: string);\r\n procedure SetUseDefaultStyle(const Value: Boolean);\r\n function GetHTMLAsBase64: string;\r\n procedure SetStyle(const Value: TStringList);\r\n procedure SetScript(const Value: TStringList);\r\n function GetScriptAsBase64: string;\r\n function GetStyleAsBase64: string;\r\n procedure SetMargins(const Value: TTMSFNCMargins);\r\n procedure SetCoordinate(const Value: TTMSFNCMapsCoordinate);\r\n procedure SetBounds(const Value: TTMSFNCMapsBounds);\r\n procedure SetLabelType(const Value: TTMSFNCMapsLabelType);\r\n protected\r\n FOwner: TTMSFNCCustomMaps;\r\n procedure UpdateElementContainer; virtual;\r\n procedure ElementContainerChanged(Sender: TObject);\r\n public\r\n constructor Create(ACollection: TCollection); override;\r\n procedure Assign(Source: TPersistent); override;\r\n destructor Destroy; override;\r\n function AddAction(AHTMLElementID: string; AEvent: TTMSFNCMapsHTMLEvent = heClick): TTMSFNCMapsElementAction; virtual;\r\n property Maps: TTMSFNCCustomMaps read FOwner;\r\n property DataPointer: Pointer read FDataPointer write FDataPointer;\r\n property DataBoolean: Boolean read FDataBoolean write FDataBoolean;\r\n property DataObject: TObject read FDataObject write FDataObject;\r\n property DataString: String read FDataString write FDataString;\r\n property DataInteger: NativeInt read FDataInteger write FDataInteger;\r\n property Recreate: Boolean read FRecreate write FRecreate default False;\r\n published\r\n property ID: string read GetID;\r\n property HTML: TStringList read FHTML write SetHTML nodefault;\r\n property HTMLAsBase64: string read GetHTMLAsBase64;\r\n property Visible: Boolean read FVisible write SetVisible default True;\r\n property Actions: TTMSFNCMapsElementActions read FActions write SetActions;\r\n property Coordinate: TTMSFNCMapsCoordinate read FCoordinate write SetCoordinate;\r\n property Bounds: TTMSFNCMapsBounds read FBounds write SetBounds;\r\n property Position: TTMSFNCMapsPosition read FPosition write SetPosition default poTopLeft;\r\n property HTMLElementID: string read FHTMLElementID write SetHTMLElementID;\r\n property HTMLElementClassName: string read FHTMLElementClassName write SetHTMLElementClassName;\r\n property UseDefaultStyle: Boolean read FUseDefaultStyle write SetUseDefaultStyle default True;\r\n property Style: TStringList read FStyle write SetStyle;\r\n property StyleAsBase64: string read GetStyleAsBase64;\r\n property Script: TStringList read FScript write SetScript;\r\n property ScriptAsBase64: string read GetScriptAsBase64;\r\n property Margins: TTMSFNCMargins read FMargins write SetMargins;\r\n property LabelType: TTMSFNCMapsLabelType read FLabelType write SetLabelType default ltLabel;\r\n end;\r\n\r\n {$IFDEF WEBLIB}\r\n TTMSFNCMapsElementContainers = class(TTMSFNCOwnedCollection)\r\n {$ELSE}\r\n TTMSFNCMapsElementContainers = class({$IFDEF LCLLIB}specialize {$ENDIF}TTMSFNCOwnedCollection)\r\n {$ENDIF}\r\n private\r\n FOwner: TTMSFNCCustomMaps;\r\n function GetItem(Index: Integer): TTMSFNCMapsElementContainer;\r\n procedure SetItem(Index: Integer; const Value: TTMSFNCMapsElementContainer);\r\n function GetItemByID(ID: string): TTMSFNCMapsElementContainer;\r\n protected\r\n function CreateItemClass: TCollectionItemClass; virtual;\r\n function GetOwner: TPersistent; override;\r\n public\r\n constructor Create(AOwner: TTMSFNCCustomMaps); virtual;\r\n property Items[Index: Integer]: TTMSFNCMapsElementContainer read GetItem write SetItem; default;\r\n procedure Clear; virtual;\r\n procedure Recreate; virtual;\r\n function Add: TTMSFNCMapsElementContainer;\r\n function Insert(Index: Integer): TTMSFNCMapsElementContainer;\r\n property ItemByID[ID: string]: TTMSFNCMapsElementContainer read GetItemByID;\r\n end;\r\n\r\n TTMSFNCCustomMaps = class(TTMSFNCCustomWebBrowser, ITMSFNCCustomMapsProperties)\r\n private\r\n {$IFDEF WEBLIB}\r\n FMapEventData: Pointer;\r\n {$ENDIF}\r\n FRouteCalculator: TTMSFNCRouteCalculator;\r\n FRouteCalculatorMarker: TTMSFNCMapsMarker;\r\n FRouteCalculatorDragMarker: TTMSFNCMapsMarker;\r\n FRouteCalculatorDragStarted: Boolean;\r\n FRouteCalculatorPolyline: TTMSFNCMapsPolyElement;\r\n FRouteCalculatorSelectedPolyline: TTMSFNCMapsPolyline;\r\n FRouteCalculatorDragX, FRouteCalculatorDragY, FRouteCalculatorDragLat, FRouteCalculatorDragLon: Double;\r\n FMapInitialized: Boolean;\r\n FUpdateCount: Integer;\r\n FMaps: ITMSFNCCustomMaps;\r\n FMapsInstance: ITMSFNCCustomMapsInstance;\r\n FMapsProperties: ITMSFNCCustomMapsProperties;\r\n FService: TTMSFNCMapsService;\r\n FAPIKey: string;\r\n FOptions: TTMSFNCMapsOptions;\r\n FOnCustomizeJavaScript: TTMSFNCMapsCustomizeJavaScriptEvent;\r\n FOnCustomizeMap: TTMSFNCMapsCustomizeMapEvent;\r\n FOnCustomizeGlobalVariables: TTMSFNCMapsCustomizeGlobalVariablesEvent;\r\n FOnCustomizeMarker: TTMSFNCMapsCustomizeMarkerEvent;\r\n FOnCustomizePopup: TTMSFNCMapsCustomizePopupEvent;\r\n FOnCustomizeOptions: TTMSFNCMapsCustomizeOptionsEvent;\r\n FOnCustomizePolyElement: TTMSFNCMapsCustomizePolyElementEvent;\r\n FOnMapTypeChanged: TTMSFNCMapsBaseEvent;\r\n FOnZoomChanged: TTMSFNCMapsBaseEvent;\r\n FOnMapClick: TTMSFNCMapsBaseEvent;\r\n FOnMapDblClick: TTMSFNCMapsBaseEvent;\r\n FOnMapMouseUp: TTMSFNCMapsBaseEvent;\r\n FOnMapMouseDown: TTMSFNCMapsBaseEvent;\r\n FOnMapMouseMove: TTMSFNCMapsBaseEvent;\r\n FOnMapMouseEnter: TTMSFNCMapsBaseEvent;\r\n FOnMapMouseLeave: TTMSFNCMapsBaseEvent;\r\n FOnMapCenterChanged: TTMSFNCMapsBaseEvent;\r\n FOnMarkerClick: TTMSFNCMapsBaseEvent;\r\n FOnMarkerRightClick: TTMSFNCMapsBaseEvent;\r\n FOnMarkerDblClick: TTMSFNCMapsBaseEvent;\r\n FOnMarkerMouseUp: TTMSFNCMapsBaseEvent;\r\n FOnMarkerMouseDown: TTMSFNCMapsBaseEvent;\r\n FOnMarkerMouseEnter: TTMSFNCMapsBaseEvent;\r\n FOnMarkerMouseLeave: TTMSFNCMapsBaseEvent;\r\n FOnPolyElementClick: TTMSFNCMapsBaseEvent;\r\n FOnPolyElementRightClick: TTMSFNCMapsBaseEvent;\r\n FOnPolyElementDblClick: TTMSFNCMapsBaseEvent;\r\n FOnPolyElementMouseUp: TTMSFNCMapsBaseEvent;\r\n FOnPolyElementMouseDown: TTMSFNCMapsBaseEvent;\r\n FOnPolyElementMouseEnter: TTMSFNCMapsBaseEvent;\r\n FOnPolyElementMouseLeave: TTMSFNCMapsBaseEvent;\r\n FOnCustomEvent: TTMSFNCMapsBaseEvent;\r\n FOnMapInitialized: TNotifyEvent;\r\n FMarkers: TTMSFNCMapsMarkers;\r\n FPolygons: TTMSFNCMapsPolygons;\r\n FPolylines: TTMSFNCMapsPolylines;\r\n FCircles: TTMSFNCMapsCircles;\r\n FRectangles: TTMSFNCMapsRectangles;\r\n FOnCustomizeCSS: TTMSFNCMapsCustomizeCSSEvent;\r\n FOnGetDefaultHTMLMessage: TTMSFNCMapsGetDefaultHTMLMessageEvent;\r\n FLocalFileAccess: Boolean;\r\n FOnGetCenterCoordinate: TTMSFNCMapsGetCenterCoordinateEvent;\r\n FOnGetBoundsCoordinate: TTMSFNCMapsGetBoundsEvent;\r\n FOnGetZoomLevel: TTMSFNCMapsGetZoomLevelEvent;\r\n FOnCreateGPXTrack: TTMSFNCMapsGPXTrackEvent;\r\n FOnCreateGPXSegment: TTMSFNCMapsGPXSegmentEvent;\r\n FOnCreateGPXWayPoint: TTMSFNCMapsGPXWayPointEvent;\r\n FOnCreateGeoJSONObject: TTMSFNCMapsGeoJSONObjectEvent;\r\n FOnRouteCalculatorWayPointAdded: TTMSFNCMapsRouteCalculatorWayPointEvent;\r\n FOnRouteCalculatorWayPointUpdated: TTMSFNCMapsRouteCalculatorWayPointEvent;\r\n FOnRouteCalculatorPolylineAdded: TTMSFNCMapsRouteCalculatorPolylineEvent;\r\n FOnRouteCalculatorPolylineUpdated: TTMSFNCMapsRouteCalculatorPolylineEvent;\r\n FRouteCalculatorSelectedMarker: TTMSFNCMapsMarker;\r\n FOnRouteCalculatorDeletePolylineEvent: TTMSFNCMapsRouteCalculatorDeletePolylineEvent;\r\n FOnRouteCalculatorAfterDeletePolylineEvent: TNotifyEvent;\r\n FOnRouteCalculatorAfterDeleteMarkerEvent: TNotifyEvent;\r\n FOnRouteCalculatorDeleteMarkerEvent: TTMSFNCMapsRouteCalculatorDeleteMarkerEvent;\r\n FOnMapMoveEnd: TTMSFNCMapsBaseEvent;\r\n FOnMapMoveStart: TTMSFNCMapsBaseEvent;\r\n FOnCustomizeHeadLinks: TTMSFNCMapsCustomizeHeadLinksEvent;\r\n FOnMapRightClick: TTMSFNCMapsBaseEvent;\r\n FElementContainers: TTMSFNCMapsElementContainers;\r\n FHeadLinks: TTMSFNCMapsHeadLinks;\r\n FOnCustomizeLocalAccessFileName: TTMSFNCMapsCustomizeLocalAccessFileNameEvent;\r\n FLibraryLocation: TTMSFNCMapsLibraryLocation;\r\n FLabels: TTMSFNCMapsLabels;\r\n FHeatMaps: TTMSFNCMapsHeatMaps;\r\n// FOnMapMove: TTMSFNCMapsBaseEvent;\r\n// FOnMapIdle: TTMSFNCMapsBaseEvent;\r\n procedure SetService(const Value: TTMSFNCMapsService);\r\n procedure SetAPIKey(const Value: string);\r\n procedure SetOptions(const Value: TTMSFNCMapsOptions);\r\n procedure SetMarkers(const Value: TTMSFNCMapsMarkers);\r\n procedure SetPolylines(const Value: TTMSFNCMapsPolylines);\r\n procedure SetPolygons(const Value: TTMSFNCMapsPolygons);\r\n procedure SetRectangles(const Value: TTMSFNCMapsRectangles);\r\n procedure SetCircles(const Value: TTMSFNCMapsCircles);\r\n procedure SetMapInitialized(const Value: Boolean);\r\n procedure SetLocalFileAccess(const Value: Boolean);\r\n procedure SetRouteCalculator(const Value: TTMSFNCRouteCalculator);\r\n procedure SetElementContainers(const Value: TTMSFNCMapsElementContainers);\r\n procedure SetHeadLinks(const Value: TTMSFNCMapsHeadLinks);\r\n procedure SetLibraryLocation(const Value: TTMSFNCMapsLibraryLocation);\r\n procedure SetLabels(const Value: TTMSFNCMapsLabels);\r\n procedure SetHeatMaps(const Value: TTMSFNCMapsHeatMaps);\r\n protected\r\n function GetMarkersClass: TTMSFNCMapsMarkersClass; virtual;\r\n function GetHeatMapsClass: TTMSFNCMapsHeatMapsClass; virtual;\r\n function GetElementContainersClass: TTMSFNCMapsElementContainersClass; virtual;\r\n function GetLabelsClass: TTMSFNCMapsLabelsClass; virtual;\r\n function GetHeadLinksClass: TTMSFNCMapsHeadLinksClass; virtual;\r\n function GetRectanglesClass: TTMSFNCMapsRectanglesClass; virtual;\r\n function GetCirclesClass: TTMSFNCMapsCirclesClass; virtual;\r\n function GetPolygonsClass: TTMSFNCMapsPolygonsClass; virtual;\r\n function GetPolylinesClass: TTMSFNCMapsPolylinesClass; virtual;\r\n function GetOptionsClass: TTMSFNCMapsOptionsClass; virtual;\r\n function ParseEvent(AValue: string): Boolean;\r\n function ParseScript(AValue: string): string;\r\n function InternalLoadGPX(AText: string; AAutoDisplay: Boolean = True; AZoomToBounds: Boolean = True;\r\n AStrokeWidth: Integer = 3; AStrokeColor: TTMSFNCGraphicsColor = gcBlack; ADisplayElevation: Boolean = False;\r\n ADisplayTimeStamps: Boolean = False; AMinSecondsBetweenTimeStamps: Integer = 600): TTMSFNCMapsGPXRec; overload; virtual;\r\n function InternalLoadGPX(AText: string; AAutoDisplay: Boolean = True; AZoomToBounds: Boolean = True;\r\n AStrokeWidth: Integer = 3; AElevationColors: TTMSFNCMapsGPXColorRecArray = nil; ADisplayElevation: Boolean = False;\r\n ADisplayTimeStamps: Boolean = False; AMinSecondsBetweenTimeStamps: Integer = 600): TTMSFNCMapsGPXRec; overload; virtual;\r\n function InternalLoadGeoJSON(AText: string; AAutoDisplay: Boolean = True; AZoomToBounds: Boolean = True): TTMSFNCMapsGeoJSONRec; virtual;\r\n function GetCustomGlobalVariables: string; virtual;\r\n function GetLocalAccessFileName: string; virtual;\r\n function GetCustomFunctions: string; virtual;\r\n function GetCustomOptions: string; virtual;\r\n function GetCustomMap: string; virtual;\r\n function GetAddCustomObjects: string; virtual;\r\n function RouteCalculatorCheck: Boolean;\r\n function GetRouteCalculatorStartMarker: string;\r\n function GetRouteCalculatorEndMarker: string;\r\n function GetRouteCalculatorWayPointMarker: string;\r\n function GetRouteCalculatorAddWayPointMarker: string;\r\n function GetRouteCalculatorSelectedWayPointMarker: string;\r\n procedure RouteCalculatorClearSelected;\r\n {$IFDEF WEBLIB}\r\n procedure SetName(const NewName: TComponentName); override;\r\n {$ENDIF}\r\n procedure Notification(AComponent: TComponent; Operation: TOperation); override;\r\n procedure Loaded; override;\r\n procedure DestroyMap;\r\n procedure DoMapInitialized; virtual;\r\n procedure DoCustomizeLocalAccessFileName(var AFileName: string); virtual;\r\n procedure DoGetZoomLevel(const AValue: string); virtual;\r\n procedure DoGetCenterCoordinate(const AValue: string); virtual;\r\n procedure DoGetBounds(const AValue: string); virtual;\r\n procedure DoZoomChanged(AEventData: TTMSFNCMapsEventData); virtual;\r\n procedure DoMapTypeChanged(AEventData: TTMSFNCMapsEventData); virtual;\r\n procedure DoMapMoveStart(AEventData: TTMSFNCMapsEventData); virtual;\r\n procedure DoMapMoveEnd(AEventData: TTMSFNCMapsEventData); virtual;\r\n// procedure DoMapMove(AEventData: TTMSFNCMapsEventData); virtual;\r\n// procedure DoMapIdle(AEventData: TTMSFNCMapsEventData); virtual;\r\n procedure DoMapClick(AEventData: TTMSFNCMapsEventData); virtual;\r\n procedure DoMapRightClick(AEventData: TTMSFNCMapsEventData); virtual;\r\n procedure DoMapKeyDown(AEventData: TTMSFNCMapsEventData); virtual;\r\n procedure DoMapDblClick(AEventData: TTMSFNCMapsEventData); virtual;\r\n procedure DoMapMouseUp(AEventData: TTMSFNCMapsEventData); virtual;\r\n procedure DoMapMouseDown(AEventData: TTMSFNCMapsEventData); virtual;\r\n procedure DoMapMouseMove(AEventData: TTMSFNCMapsEventData); virtual;\r\n procedure DoMapMouseEnter(AEventData: TTMSFNCMapsEventData); virtual;\r\n procedure DoMapMouseLeave(AEventData: TTMSFNCMapsEventData); virtual;\r\n procedure DoMapCenterChanged(AEventData: TTMSFNCMapsEventData); virtual;\r\n procedure DoMarkerClick(AEventData: TTMSFNCMapsEventData); virtual;\r\n procedure DoMarkerRightClick(AEventData: TTMSFNCMapsEventData); virtual;\r\n procedure DoMarkerDblClick(AEventData: TTMSFNCMapsEventData); virtual;\r\n procedure DoMarkerMouseUp(AEventData: TTMSFNCMapsEventData); virtual;\r\n procedure DoMarkerMouseDown(AEventData: TTMSFNCMapsEventData); virtual;\r\n procedure DoMarkerMouseEnter(AEventData: TTMSFNCMapsEventData); virtual;\r\n procedure DoMarkerMouseLeave(AEventData: TTMSFNCMapsEventData); virtual;\r\n procedure DoPolyElementClick(AEventData: TTMSFNCMapsEventData); virtual;\r\n procedure DoPolyElementRightClick(AEventData: TTMSFNCMapsEventData); virtual;\r\n procedure DoPolyElementDblClick(AEventData: TTMSFNCMapsEventData); virtual;\r\n procedure DoPolyElementMouseUp(AEventData: TTMSFNCMapsEventData); virtual;\r\n procedure DoPolyElementMouseDown(AEventData: TTMSFNCMapsEventData); virtual;\r\n procedure DoPolyElementMouseEnter(AEventData: TTMSFNCMapsEventData); virtual;\r\n procedure DoPolyElementMouseLeave(AEventData: TTMSFNCMapsEventData); virtual;\r\n procedure DoCreateGPXTrack(AEventData: TTMSFNCMapsGPXTrackEventData); virtual;\r\n procedure DoCreateGPXSegment(AEventData: TTMSFNCMapsGPXSegmentEventData); virtual;\r\n procedure DoCreateGPXWayPoint(AEventData: TTMSFNCMapsGPXWayPointEventData); virtual;\r\n procedure DoCreateGeoJSONObject(AEventData: TTMSFNCMapsGeoJSONEventData); virtual;\r\n procedure DoCustomEvent(AEventData: TTMSFNCMapsEventData); virtual;\r\n procedure DoCustomizeMap(var ACustomizeMap: string); virtual;\r\n procedure DoCustomizeGlobalVariables(var ACustomizeGlobalVariables: string); virtual;\r\n procedure DoCustomizeMarker(var ACustomizeMarker: string); virtual;\r\n procedure DoCustomizePopup(var ACustomizePopup: string); virtual;\r\n procedure DoCustomizeOptions(var ACustomizeOptions: string); virtual;\r\n procedure DoCustomizePolyElement(var ACustomizePolyElement: string); virtual;\r\n procedure DoCustomizeJavaScript(var ACustomizeJavaScript: string); virtual;\r\n procedure DoCustomizeHeadLinks(AList: TTMSFNCMapsLinksList); virtual;\r\n procedure DoCustomizeCSS(var ACustomizeCSS: string); virtual;\r\n procedure DoGetDefaultHTMLMessage(var AMessage: string); virtual;\r\n procedure DoRouteCalculatorWayPointAdded(AMarker: TTMSFNCMapsMarker; ASegment: TTMSFNCRouteCalculatorSegment);\r\n procedure DoRouteCalculatorWayPointUpdated(AMarker: TTMSFNCMapsMarker; ASegment: TTMSFNCRouteCalculatorSegment);\r\n procedure DoRouteCalculatorPolylineAdded(APolyline: TTMSFNCMapsPolyline; ASegment: TTMSFNCRouteCalculatorSegment);\r\n procedure DoRouteCalculatorPolylineUpdated(APolyline: TTMSFNCMapsPolyline; ASegment: TTMSFNCRouteCalculatorSegment);\r\n procedure DoRouteCalculatorBeforeDeletePolyline(var ACanDelete: Boolean; APolyline: TTMSFNCMapsPolyline; ASegment: TTMSFNCRouteCalculatorSegment);\r\n procedure DoRouteCalculatorAfterDeletePolyline;\r\n procedure DoRouteCalculatorBeforeDeleteMarker(var ACanDelete: Boolean; AMarker: TTMSFNCMapsMarker; ASegment: TTMSFNCRouteCalculatorSegment);\r\n procedure DoRouteCalculatorAfterDeleteMarker;\r\n procedure CallCustomEvent(AEventData: TTMSFNCMapsEventData); virtual;\r\n procedure BeforeNavigate(var Params: TTMSFNCCustomWebBrowserBeforeNavigateParams); override;\r\n procedure OptionsChanged(Sender: TObject);\r\n procedure Initialized; override;\r\n procedure InitializeMap; virtual;\r\n procedure InitializeHTML; virtual;\r\n {$IFDEF WEBLIB}\r\n procedure LoadScripts(AHead: Boolean); virtual;\r\n procedure RemoveScripts; virtual;\r\n procedure LoadStyles; virtual;\r\n procedure RemoveStyles; virtual;\r\n {$ENDIF}\r\n procedure CreateClasses; override;\r\n procedure GetLinks(AList: TTMSFNCMapsLinksList; AIncludeContent: Boolean = True; ACheckReady: Boolean = True); virtual;\r\n procedure GetBodyLinks(AList: TTMSFNCMapsLinksList; AIncludeContent: Boolean = True; ACheckReady: Boolean = True); virtual;\r\n procedure GetHeadLinks(AList: TTMSFNCMapsLinksList; ACheckReady: Boolean = True); virtual;\r\n\r\n procedure UpdateElementContainers; virtual;\r\n procedure DoUpdateElementContainers(const AValue: string); virtual;\r\n procedure UpdateMarkers; virtual;\r\n procedure DoUpdateMarkers(const AValue: string); virtual;\r\n procedure UpdateHeatMaps; virtual;\r\n procedure DoUpdateHeatMaps(const AValue: string); virtual;\r\n procedure UpdatePolyElements; virtual;\r\n procedure DoUpdatePolyElements(const AValue: string); virtual;\r\n procedure DoCloseAllPopups(const AValue: string); virtual;\r\n procedure SyncLabels(ACollection: TTMSFNCMapsElementContainers);\r\n\r\n procedure UpdateOptions; virtual;\r\n\r\n procedure DoKeyPressed(var Key: Word); override;\r\n procedure RouteCalculatorMarkerMoved(ACoordinate: TTMSFNCMapsCoordinateRec); virtual;\r\n procedure RouteCalculatorPolylineMoved(ACoordinate: TTMSFNCMapsCoordinateRec); virtual;\r\n procedure RouteCalculatorDoCalculateRoute(Sender: TObject; const ARoute: TTMSFNCRouteCalculatorRoute); virtual;\r\n\r\n {$IFDEF WEBLIB}\r\n function HandleDoMapEventData(Event: TJSEvent): Boolean; virtual;\r\n procedure BindEvents; override;\r\n procedure UnbindEvents; override;\r\n procedure ClearMethodPointers; override;\r\n procedure GetMethodPointers; override;\r\n {$ENDIF}\r\n\r\n procedure CheckInstances;\r\n\r\n function CanLoadDefaultHTML: Boolean; override;\r\n function GetDefaultLatitude: string;\r\n function GetDefaultLongitude: string;\r\n function GetDefaultZoomLevel: string;\r\n function GetAPIKey: string;\r\n function GetBackgroundColor: TTMSFNCGraphicsColor;\r\n function GetLocale(AMode: TTMSFNCMapsLocaleMode = mlmDefault): string;\r\n function GetShowZoomControl: Boolean;\r\n function GetShowMapTypeControl: Boolean;\r\n function GetZoomOnDblClick: Boolean;\r\n function GetPanning: Boolean;\r\n function GetMapID: string; virtual;\r\n function GetTilt: Double; virtual;\r\n function GetHeading: Double; virtual;\r\n function GetZoomOnWheelScroll: Boolean;\r\n\r\n function GetPolyElementByID(AID: string): TTMSFNCMapsPolyElement; virtual;\r\n function GetMarkerByID(AID: string): TTMSFNCMapsMarker; virtual;\r\n function GetElementContainerByID(AID: string): TTMSFNCMapsElementContainer; virtual;\r\n function GetCommunicationLayer: string; virtual;\r\n function GetZoomToBoundsFunction: string; virtual;\r\n function GetSetCenterCoordinateFunction: string; virtual;\r\n function GetGetCenterCoordinateFunction: string; virtual;\r\n function GetGetLatLonToXYFunction: string; virtual;\r\n function GetGetXYToLatLonFunction: string; virtual;\r\n function GetGetBoundsFunction: string; virtual;\r\n function GetSetZoomLevelFunction: string; virtual;\r\n function GetGetZoomLevelFunction: string; virtual;\r\n function GetUpdateOptions: string; virtual;\r\n function GetAddOrUpdateMarkerFunction: string; virtual;\r\n function GetAddOrUpdateElementContainerFunction: string; virtual;\r\n function GetShowPopupFunction: string; virtual;\r\n function GetClosePopupFunction: string; virtual;\r\n function GetDeleteMarkerFunction: string; virtual;\r\n function GetAddMarkers: string; virtual;\r\n function GetDeleteElementContainerFunction: string; virtual;\r\n function GetAddElementContainers: string; virtual;\r\n function GetAddOrUpdatePolyElementFunction: string; virtual;\r\n function GetDeletePolyElementFunction: string; virtual;\r\n function InternalGetAddPolyElements(AElements: TTMSFNCMapsPolyElements): string; virtual;\r\n function GetAddPolyElements: string; virtual;\r\n function GetGlobalVariables: string; virtual;\r\n function GetCallInitialize: string; virtual;\r\n function GetWaitForMapInitialized: string; virtual;\r\n function GetDefaultHTML: string; virtual;\r\n function MapReady: Boolean;\r\n function GetVersionNr: Integer; virtual;\r\n function GetDocURL: string; override;\r\n function GetTipsURL: string; override;\r\n function Maps: ITMSFNCCustomMaps;\r\n function ParseLinks(AList: TTMSFNCMapsLinksList): string; virtual;\r\n function GetVersion: string; override;\r\n function GetAPIVersion: string; virtual;\r\n function GetHeadStyle: string; virtual;\r\n function GetBody: string; virtual;\r\n function AddHeatMap(ACoordinates: TTMSFNCMapsCoordinateRecArray): TTMSFNCMapsHeatMap; virtual;\r\n\r\n property MapInitialized: Boolean read FMapInitialized write SetMapInitialized;\r\n property UpdateCount: Integer read FUpdateCount;\r\n property Service: TTMSFNCMapsService read FService write SetService default msGoogleMaps;\r\n property APIKey: string read FAPIKey write SetAPIKey;\r\n property LocalFileAccess: Boolean read FLocalFileAccess write SetLocalFileAccess default False;\r\n property LibraryLocation: TTMSFNCMapsLibraryLocation read FLibraryLocation write SetLibraryLocation default llOnline;\r\n property Options: TTMSFNCMapsOptions read FOptions write SetOptions;\r\n property HeatMaps: TTMSFNCMapsHeatMaps read FHeatMaps write SetHeatMaps;\r\n property Markers: TTMSFNCMapsMarkers read FMarkers write SetMarkers;\r\n property ElementContainers: TTMSFNCMapsElementContainers read FElementContainers write SetElementContainers;\r\n property Labels: TTMSFNCMapsLabels read FLabels write SetLabels;\r\n property HeadLinks: TTMSFNCMapsHeadLinks read FHeadLinks write SetHeadLinks;\r\n property Polylines: TTMSFNCMapsPolylines read FPolylines write SetPolylines;\r\n property Polygons: TTMSFNCMapsPolygons read FPolygons write SetPolygons;\r\n property Circles: TTMSFNCMapsCircles read FCircles write SetCircles;\r\n property Rectangles: TTMSFNCMapsRectangles read FRectangles write SetRectangles;\r\n\r\n property OnCustomizeLocalAccessFileName: TTMSFNCMapsCustomizeLocalAccessFileNameEvent read FOnCustomizeLocalAccessFileName write FOnCustomizeLocalAccessFileName;\r\n property OnCustomizeCSS: TTMSFNCMapsCustomizeCSSEvent read FOnCustomizeCSS write FOnCustomizeCSS;\r\n property OnCustomizeJavaScript: TTMSFNCMapsCustomizeJavaScriptEvent read FOnCustomizeJavaScript write FOnCustomizeJavaScript;\r\n property OnCustomizeHeadLinks: TTMSFNCMapsCustomizeHeadLinksEvent read FOnCustomizeHeadLinks write FOnCustomizeHeadLinks;\r\n property OnCustomizeMap: TTMSFNCMapsCustomizeMapEvent read FOnCustomizeMap write FOnCustomizeMap;\r\n property OnCustomizeGlobalVariables: TTMSFNCMapsCustomizeGlobalVariablesEvent read FOnCustomizeGlobalVariables write FOnCustomizeGlobalVariables;\r\n property OnCustomizeMarker: TTMSFNCMapsCustomizeMarkerEvent read FOnCustomizeMarker write FOnCustomizeMarker;\r\n property OnCustomizePopup: TTMSFNCMapsCustomizePopupEvent read FOnCustomizePopup write FOnCustomizePopup;\r\n property OnGetDefaultHTMLMessage: TTMSFNCMapsGetDefaultHTMLMessageEvent read FOnGetDefaultHTMLMessage write FOnGetDefaultHTMLMessage;\r\n property OnCustomizeOptions: TTMSFNCMapsCustomizeOptionsEvent read FOnCustomizeOptions write FOnCustomizeOptions;\r\n property OnCustomizePolyElement: TTMSFNCMapsCustomizePolyElementEvent read FOnCustomizePolyElement write FOnCustomizePolyElement;\r\n property OnZoomChanged: TTMSFNCMapsBaseEvent read FOnZoomChanged write FOnZoomChanged;\r\n property OnMapTypeChanged: TTMSFNCMapsBaseEvent read FOnMapTypeChanged write FOnMapTypeChanged;\r\n property OnMapMoveStart: TTMSFNCMapsBaseEvent read FOnMapMoveStart write FOnMapMoveStart;\r\n property OnMapMoveEnd: TTMSFNCMapsBaseEvent read FOnMapMoveEnd write FOnMapMoveEnd;\r\n// property OnMapMove: TTMSFNCMapsBaseEvent read FOnMapMove write FOnMapMove;\r\n// property OnMapIdle: TTMSFNCMapsBaseEvent read FOnMapIdle write FOnMapIdle;\r\n property OnMapClick: TTMSFNCMapsBaseEvent read FOnMapClick write FOnMapClick;\r\n property OnMapRightClick: TTMSFNCMapsBaseEvent read FOnMapRightClick write FOnMapRightClick;\r\n property OnMapDblClick: TTMSFNCMapsBaseEvent read FOnMapDblClick write FOnMapDblClick;\r\n property OnMapMouseUp: TTMSFNCMapsBaseEvent read FOnMapMouseUp write FOnMapMouseUp;\r\n property OnMapMouseDown: TTMSFNCMapsBaseEvent read FOnMapMouseDown write FOnMapMouseDown;\r\n property OnMapMouseMove: TTMSFNCMapsBaseEvent read FOnMapMouseMove write FOnMapMouseMove;\r\n property OnMapMouseEnter: TTMSFNCMapsBaseEvent read FOnMapMouseEnter write FOnMapMouseEnter;\r\n property OnMapMouseLeave: TTMSFNCMapsBaseEvent read FOnMapMouseLeave write FOnMapMouseLeave;\r\n property OnMapCenterChanged: TTMSFNCMapsBaseEvent read FOnMapCenterChanged write FOnMapCenterChanged;\r\n property OnMarkerClick: TTMSFNCMapsBaseEvent read FOnMarkerClick write FOnMarkerClick;\r\n property OnMarkerRightClick: TTMSFNCMapsBaseEvent read FOnMarkerRightClick write FOnMarkerRightClick;\r\n property OnMarkerDblClick: TTMSFNCMapsBaseEvent read FOnMarkerDblClick write FOnMarkerDblClick;\r\n property OnMarkerMouseUp: TTMSFNCMapsBaseEvent read FOnMarkerMouseUp write FOnMarkerMouseUp;\r\n property OnMarkerMouseDown: TTMSFNCMapsBaseEvent read FOnMarkerMouseDown write FOnMarkerMouseDown;\r\n property OnMarkerMouseEnter: TTMSFNCMapsBaseEvent read FOnMarkerMouseEnter write FOnMarkerMouseEnter;\r\n property OnMarkerMouseLeave: TTMSFNCMapsBaseEvent read FOnMarkerMouseLeave write FOnMarkerMouseLeave;\r\n property OnPolyElementClick: TTMSFNCMapsBaseEvent read FOnPolyElementClick write FOnPolyElementClick;\r\n property OnPolyElementRightClick: TTMSFNCMapsBaseEvent read FOnPolyElementRightClick write FOnPolyElementRightClick;\r\n property OnPolyElementDblClick: TTMSFNCMapsBaseEvent read FOnPolyElementDblClick write FOnPolyElementDblClick;\r\n property OnPolyElementMouseUp: TTMSFNCMapsBaseEvent read FOnPolyElementMouseUp write FOnPolyElementMouseUp;\r\n property OnPolyElementMouseDown: TTMSFNCMapsBaseEvent read FOnPolyElementMouseDown write FOnPolyElementMouseDown;\r\n property OnPolyElementMouseEnter: TTMSFNCMapsBaseEvent read FOnPolyElementMouseEnter write FOnPolyElementMouseEnter;\r\n property OnPolyElementMouseLeave: TTMSFNCMapsBaseEvent read FOnPolyElementMouseLeave write FOnPolyElementMouseLeave;\r\n property OnGetCenterCoordinate: TTMSFNCMapsGetCenterCoordinateEvent read FOnGetCenterCoordinate write FOnGetCenterCoordinate;\r\n property OnGetBounds: TTMSFNCMapsGetBoundsEvent read FOnGetBoundsCoordinate write FOnGetBoundsCoordinate;\r\n property OnGetZoomLevel: TTMSFNCMapsGetZoomLevelEvent read FOnGetZoomLevel write FOnGetZoomLevel;\r\n property OnCreateGPXTrack: TTMSFNCMapsGPXTrackEvent read FOnCreateGPXTrack write FOnCreateGPXTrack;\r\n property OnCreateGPXSegment: TTMSFNCMapsGPXSegmentEvent read FOnCreateGPXSegment write FOnCreateGPXSegment;\r\n property OnCreateGPXWayPoint: TTMSFNCMapsGPXWayPointEvent read FOnCreateGPXWayPoint write FOnCreateGPXWayPoint;\r\n property OnCreateGeoJSONObject: TTMSFNCMapsGeoJSONObjectEvent read FOnCreateGeoJSONObject write FOnCreateGeoJSONObject;\r\n property OnCustomEvent: TTMSFNCMapsBaseEvent read FOnCustomEvent write FOnCustomEvent;\r\n property OnMapInitialized: TNotifyEvent read FOnMapInitialized write FOnMapInitialized;\r\n property OnRouteCalculatorWayPointAdded: TTMSFNCMapsRouteCalculatorWayPointEvent read FOnRouteCalculatorWayPointAdded write FOnRouteCalculatorWayPointAdded;\r\n property OnRouteCalculatorWayPointUpdated: TTMSFNCMapsRouteCalculatorWayPointEvent read FOnRouteCalculatorWayPointUpdated write FOnRouteCalculatorWayPointUpdated;\r\n property OnRouteCalculatorPolylineAdded: TTMSFNCMapsRouteCalculatorPolylineEvent read FOnRouteCalculatorPolylineAdded write FOnRouteCalculatorPolylineAdded;\r\n property OnRouteCalculatorPolylineUpdated: TTMSFNCMapsRouteCalculatorPolylineEvent read FOnRouteCalculatorPolylineUpdated write FOnRouteCalculatorPolylineUpdated;\r\n property OnRouteCalculatorBeforeDeletePolyline: TTMSFNCMapsRouteCalculatorDeletePolylineEvent read FOnRouteCalculatorDeletePolylineEvent write FOnRouteCalculatorDeletePolylineEvent;\r\n property OnRouteCalculatorAfterDeletePolyline: TNotifyEvent read FOnRouteCalculatorAfterDeletePolylineEvent write FOnRouteCalculatorAfterDeletePolylineEvent;\r\n property OnRouteCalculatorBeforeDeleteMarker: TTMSFNCMapsRouteCalculatorDeleteMarkerEvent read FOnRouteCalculatorDeleteMarkerEvent write FOnRouteCalculatorDeleteMarkerEvent;\r\n property OnRouteCalculatorAfterDeleteMarker: TNotifyEvent read FOnRouteCalculatorAfterDeleteMarkerEvent write FOnRouteCalculatorAfterDeleteMarkerEvent;\r\n\r\n property MapsInstance: ITMSFNCCustomMaps read FMaps;\r\n property MapsProperties: ITMSFNCCustomMapsProperties read FMapsProperties;\r\n\r\n property RouteCalculator: TTMSFNCRouteCalculator read FRouteCalculator write SetRouteCalculator;\r\n public\r\n procedure Assign(Source: TPersistent); override;\r\n constructor Create(AOwner: TComponent); override;\r\n destructor Destroy; override;\r\n procedure BeginUpdate; override;\r\n procedure EndUpdate; override;\r\n procedure ReInitialize; virtual;\r\n procedure ConnectMarkers(AMarkersArray: TTMSFNCMapsMarkersArray);\r\n procedure ClearMarkers; virtual;\r\n procedure ClearElementContainers; virtual;\r\n procedure ClearLabels; virtual;\r\n procedure ClearHeadLinks; virtual;\r\n procedure Clear; virtual;\r\n procedure ClearPolylines; virtual;\r\n procedure ClearPolygons; virtual;\r\n procedure ClearCircles; virtual;\r\n procedure ClearRectangles; virtual;\r\n procedure UpdateControlAfterResize; override;\r\n procedure ZoomToBounds(ACoordinates: TTMSFNCMapsCoordinateRecArray); overload; virtual;\r\n procedure ZoomToBounds(ACoordinates: TTMSFNCMapsCoordinateRecArrayArray); overload; virtual;\r\n procedure ZoomToBounds(ACoordinates: TTMSFNCMapsCoordinateRecArrayArrayArray); overload; virtual;\r\n procedure ZoomToBounds(ABounds: TTMSFNCMapsBoundsRec); overload; virtual;\r\n procedure ZoomToBounds(ANorthEast: TTMSFNCMapsCoordinateRec; ASouthWest: TTMSFNCMapsCoordinateRec); overload; virtual;\r\n\r\n procedure GetZoomLevel; virtual;\r\n procedure GetCenterCoordinate; virtual;\r\n procedure GetBounds; virtual;\r\n procedure SetCenterCoordinate(ACoordinate: TTMSFNCMapsCoordinateRec); overload; virtual;\r\n procedure SetCenterCoordinate(ALatitude: Double; ALongitude: Double); overload; virtual;\r\n procedure SetZoomLevel(AZoomLevel: Double); virtual;\r\n function LatLonToXY(ACoordinate: TTMSFNCMapsCoordinateRec): TTMSFNCMapsAnchorPointRec; overload; virtual;\r\n function LatLonToXY(ALatitude: Double; ALongitude: Double): TTMSFNCMapsAnchorPointRec; overload; virtual;\r\n function CoordinateToXY(ACoordinate: TTMSFNCMapsCoordinateRec): TTMSFNCMapsAnchorPointRec; virtual;\r\n function XYToLatLon(AX: Single; AY: Single): TTMSFNCMapsCoordinateRec; virtual;\r\n function XYToCoordinate(AX: Single; AY: Single): TTMSFNCMapsCoordinateRec; virtual;\r\n function GetHTML: string; virtual;\r\n function FindNearestPolylineCoordinate(ACoordinate: TTMSFNCMapsCoordinateRec; AMaxDistance: Double;\r\n var APolylineIndex: Integer; var ACoordinateIndex: Integer; var ACoordinateRec: TTMSFNCMapsCoordinateRec): Boolean;\r\n\r\n function LoadGPXFromStream(const AStream: TStream; AAutoDisplay: Boolean = True;\r\n AZoomToBounds: Boolean = True; AStrokeWidth: Integer = 3; AStrokeColor: TTMSFNCGraphicsColor = gcBlack; ADisplayElevation: Boolean = False;\r\n ADisplayTimeStamps: Boolean = False; AMinSecondsBetweenTimeStamps: Integer = 600): TTMSFNCMapsGPXRec; overload; virtual;\r\n\r\n function LoadGPXFromStream(const AStream: TStream; AAutoDisplay: Boolean;\r\n AZoomToBounds: Boolean; AStrokeWidth: Integer; AElevationColors: TTMSFNCMapsGPXColorRecArray; ADisplayElevation: Boolean;\r\n ADisplayTimeStamps: Boolean = False; AMinSecondsBetweenTimeStamps: Integer = 600): TTMSFNCMapsGPXRec; overload; virtual;\r\n\r\n {$IFNDEF LCLLIB}\r\n function LoadGPXFromStream(const AStream: TStream; AEncoding: TEncoding; AAutoDisplay: Boolean = True;\r\n AZoomToBounds: Boolean = True; AStrokeWidth: Integer = 3; AStrokeColor: TTMSFNCGraphicsColor = gcBlack; ADisplayElevation: Boolean = False;\r\n ADisplayTimeStamps: Boolean = False; AMinSecondsBetweenTimeStamps: Integer = 600): TTMSFNCMapsGPXRec; overload; virtual;\r\n\r\n function LoadGPXFromStream(const AStream: TStream; AEncoding: TEncoding; AAutoDisplay: Boolean;\r\n AZoomToBounds: Boolean; AStrokeWidth: Integer; AElevationColors: TTMSFNCMapsGPXColorRecArray; ADisplayElevation: Boolean;\r\n ADisplayTimeStamps: Boolean = False; AMinSecondsBetweenTimeStamps: Integer = 600): TTMSFNCMapsGPXRec; overload; virtual;\r\n {$ENDIF}\r\n\r\n {$IFNDEF WEBLIB}\r\n function LoadGPXFromFile(AFileName: string; AAutoDisplay: Boolean = True;\r\n AZoomToBounds: Boolean = True; AStrokeWidth: Integer = 3; AStrokeColor: TTMSFNCGraphicsColor = gcBlack; ADisplayElevation: Boolean = False;\r\n ADisplayTimeStamps: Boolean = False; AMinSecondsBetweenTimeStamps: Integer = 600): TTMSFNCMapsGPXRec; overload; virtual;\r\n\r\n function LoadGPXFromFile(AFileName: string; AAutoDisplay: Boolean;\r\n AZoomToBounds: Boolean; AStrokeWidth: Integer; AElevationColors: TTMSFNCMapsGPXColorRecArray; ADisplayElevation: Boolean;\r\n ADisplayTimeStamps: Boolean = False; AMinSecondsBetweenTimeStamps: Integer = 600): TTMSFNCMapsGPXRec; overload; virtual;\r\n\r\n {$IFNDEF LCLLIB}\r\n function LoadGPXFromFile(AFileName: string; AEncoding: TEncoding; AAutoDisplay: Boolean = True;\r\n AZoomToBounds: Boolean = True; AStrokeWidth: Integer = 3; AStrokeColor: TTMSFNCGraphicsColor = gcBlack; ADisplayElevation: Boolean = False;\r\n ADisplayTimeStamps: Boolean = False; AMinSecondsBetweenTimeStamps: Integer = 600): TTMSFNCMapsGPXRec; overload; virtual;\r\n\r\n function LoadGPXFromFile(AFileName: string; AEncoding: TEncoding; AAutoDisplay: Boolean;\r\n AZoomToBounds: Boolean; AStrokeWidth: Integer; AElevationColors: TTMSFNCMapsGPXColorRecArray; ADisplayElevation: Boolean;\r\n ADisplayTimeStamps: Boolean = False; AMinSecondsBetweenTimeStamps: Integer = 600): TTMSFNCMapsGPXRec; overload; virtual;\r\n {$ENDIF}\r\n {$ENDIF}\r\n\r\n function LoadGPXFromText(AText: string; AAutoDisplay: Boolean = True;\r\n AZoomToBounds: Boolean = True; AStrokeWidth: Integer = 3; AStrokeColor: TTMSFNCGraphicsColor = gcBlack; ADisplayElevation: Boolean = False;\r\n ADisplayTimeStamps: Boolean = False; AMinSecondsBetweenTimeStamps: Integer = 600): TTMSFNCMapsGPXRec; overload; virtual;\r\n\r\n function LoadGPXFromText(AText: string; AAutoDisplay: Boolean;\r\n AZoomToBounds: Boolean; AStrokeWidth: Integer; AElevationColors: TTMSFNCMapsGPXColorRecArray; ADisplayElevation: Boolean;\r\n ADisplayTimeStamps: Boolean = False; AMinSecondsBetweenTimeStamps: Integer = 600): TTMSFNCMapsGPXRec; overload; virtual;\r\n\r\n procedure SaveToGPXStream(ACoordinates: TTMSFNCMapsCoordinateRecArray; AStream: TStream); overload; virtual;\r\n procedure SaveToGPXStream(ACoordinates: TTMSFNCMapsCoordinateRecArray; AStream: TStream; AMetaData: TTMSFNCMapsGPXMetaData; AWayPoints: TTMSFNCMapsGPXWayPointRecArray = nil); overload; virtual;\r\n\r\n {$IFNDEF LCLLIB}\r\n procedure SaveToGPXStream(ACoordinates: TTMSFNCMapsCoordinateRecArray; AStream: TStream; AEncoding: TEncoding); overload; virtual;\r\n procedure SaveToGPXStream(ACoordinates: TTMSFNCMapsCoordinateRecArray; AStream: TStream; AEncoding: TEncoding; AMetaData: TTMSFNCMapsGPXMetaData; AWayPoints: TTMSFNCMapsGPXWayPointRecArray = nil); overload; virtual;\r\n {$ENDIF}\r\n\r\n procedure SaveToGPXFile(ACoordinates: TTMSFNCMapsCoordinateRecArray; AFileName: string); overload; virtual;\r\n procedure SaveToGPXFile(ACoordinates: TTMSFNCMapsCoordinateRecArray; AFileName: string; AMetaData: TTMSFNCMapsGPXMetaData; AWayPoints: TTMSFNCMapsGPXWayPointRecArray = nil); overload; virtual;\r\n\r\n {$IFNDEF LCLLIB}\r\n procedure SaveToGPXFile(ACoordinates: TTMSFNCMapsCoordinateRecArray; AFileName: string; AEncoding: TEncoding); overload; virtual;\r\n procedure SaveToGPXFile(ACoordinates: TTMSFNCMapsCoordinateRecArray; AFileName: string; AEncoding: TEncoding; AMetaData: TTMSFNCMapsGPXMetaData; AWayPoints: TTMSFNCMapsGPXWayPointRecArray = nil); overload; virtual;\r\n {$ENDIF}\r\n\r\n function SaveToGPXText(ACoordinates: TTMSFNCMapsCoordinateRecArray): string; overload; virtual;\r\n function SaveToGPXText(ACoordinates: TTMSFNCMapsCoordinateRecArray; AMetaData: TTMSFNCMapsGPXMetaData; AWayPoints: TTMSFNCMapsGPXWayPointRecArray = nil): string; overload; virtual;\r\n\r\n function LoadGeoJSONFromStream(const AStream: TStream; AAutoDisplay: Boolean = True; AZoomToBounds: Boolean = True): TTMSFNCMapsGeoJSONRec; overload; virtual;\r\n\r\n {$IFNDEF LCLLIB}\r\n function LoadGeoJSONFromStream(const AStream: TStream; AEncoding: TEncoding; AAutoDisplay: Boolean = True; AZoomToBounds: Boolean = True): TTMSFNCMapsGeoJSONRec; overload; virtual;\r\n {$ENDIF}\r\n\r\n {$IFNDEF WEBLIB}\r\n function LoadGeoJSONFromFile(AFileName: string; AAutoDisplay: Boolean = True; AZoomToBounds: Boolean = True): TTMSFNCMapsGeoJSONRec; overload; virtual;\r\n {$IFNDEF LCLLIB}\r\n function LoadGeoJSONFromFile(AFileName: string; AEncoding: TEncoding; AAutoDisplay: Boolean = True; AZoomToBounds: Boolean = True): TTMSFNCMapsGeoJSONRec; overload; virtual;\r\n {$ENDIF}\r\n {$ENDIF}\r\n\r\n function LoadGeoJSONFromText(AText: string; AAutoDisplay: Boolean = True; AZoomToBounds: Boolean = True): TTMSFNCMapsGeoJSONRec; virtual;\r\n\r\n function AddMarker(ACoordinate: TTMSFNCMapsCoordinateRec; ATitle: string = ''; AIconURL: string = ''): TTMSFNCMapsMarker; overload; virtual;\r\n function AddMarker(ALatitude: Double; ALongitude: Double; ATitle: string = ''; AIconURL: string = ''): TTMSFNCMapsMarker; overload; virtual;\r\n function AddPolyline(ACoordinates: TTMSFNCMapsCoordinateRecArray; AClose: Boolean = False): TTMSFNCMapsPolyline; virtual;\r\n function AddPolygon(ACoordinates: TTMSFNCMapsCoordinateRecArray; AClose: Boolean = False): TTMSFNCMapsPolygon; virtual;\r\n function AddCircle(ACenter: TTMSFNCMapsCoordinateRec; ARadius: Double = 10000): TTMSFNCMapsCircle; virtual;\r\n function AddRectangle(ABounds: TTMSFNCMapsBoundsRec): TTMSFNCMapsRectangle; virtual;\r\n function ShowPopup(ACoordinate: TTMSFNCMapsCoordinateRec; AText: string; AOffsetX: Double = 0; AOffsetY: Double = 0; APanMap: Boolean = True): string; overload; virtual;\r\n function ShowPopup(ALatitude: Double; ALongitude: Double; AText: string; AOffsetX: Double = 0; AOffsetY: Double = 0; APanMap: Boolean = True): string; overload; virtual;\r\n function AddElementContainer(AHTML: TStrings; AStyle: TStrings = nil; AScript: TStrings = nil; APosition: TTMSFNCMapsPosition = poTopLeft; AHTMLElementID: string = ''): TTMSFNCMapsElementContainer; virtual;\r\n function AddHeadLink(AURL: string; AKind: TTMSFNCMapsLinkKind = mlkScript; ARel: string = ''): TTMSFNCMapsHeadLink; virtual;\r\n function AddLabel(ACoordinate: TTMSFNCMapsCoordinateRec; AText: string; AFontColor: TTMSFNCGraphicsColor = gcNull; ABackgroundColor: TTMSFNCGraphicsColor = gcNull): TTMSFNCMapsLabel; overload; virtual;\r\n function AddLabel(ABounds: TTMSFNCMapsBoundsRec; AText: string; AFontColor: TTMSFNCGraphicsColor = gcNull; ABackgroundColor: TTMSFNCGraphicsColor = gcNull): TTMSFNCMapsLabel; overload; virtual;\r\n function AddLabel(ANorthEastLatitude: Double; ANorthEastLongitude: Double; ASouthWestLatitude: Double; ASouthWestLongitude: Double; AText: string; AFontColor: TTMSFNCGraphicsColor = gcNull; ABackgroundColor: TTMSFNCGraphicsColor = gcNull): TTMSFNCMapsLabel; overload; virtual;\r\n function AddLabel(ALatitude: Double; ALongitude: Double; AText: string; AFontColor: TTMSFNCGraphicsColor = gcNull; ABackgroundColor: TTMSFNCGraphicsColor = gcNull): TTMSFNCMapsLabel; overload; virtual;\r\n procedure ClosePopup(AID: string); virtual;\r\n procedure CloseAllPopups; virtual;\r\n procedure RouteCalculatorPlotRoute(ARoute: TTMSFNCRouteCalculatorRoute); virtual;\r\n procedure RouteCalculatorPlotRoutes; virtual;\r\n procedure RouteCalculatorClearRoutes; virtual;\r\n procedure RouteCalculatorDeletePolyline(APolyline: TTMSFNCMapsPolyline; AUpdateRoute: Boolean = True);\r\n procedure RouteCalculatorDeleteMarker(AMarker: TTMSFNCMapsMarker; AUpdateRoute: Boolean = True);\r\n procedure RouteCalculatorDeleteSelectedPolyline(AUpdateRoute: Boolean = True);\r\n procedure RouteCalculatorDeleteSelectedMarker(AUpdateRoute: Boolean = True);\r\n property RouteCalculatorSelectedPolyline: TTMSFNCMapsPolyline read FRouteCalculatorSelectedPolyline write FRouteCalculatorSelectedPolyline;\r\n property RouteCalculatorSelectedMarker: TTMSFNCMapsMarker read FRouteCalculatorSelectedMarker write FRouteCalculatorSelectedMarker;\r\n end;\r\n\r\n TTMSFNCCustomMapsInterfacedObject = class(TInterfacedObject, ITMSFNCCustomMapsInstance)\r\n private\r\n FMapsProperties: ITMSFNCCustomMapsProperties;\r\n function GetMapsProperties: ITMSFNCCustomMapsProperties;\r\n protected\r\n procedure SetMapsProperties(const Value: ITMSFNCCustomMapsProperties);\r\n public\r\n property MapsProperties: ITMSFNCCustomMapsProperties read GetMapsProperties;\r\n destructor Destroy; override;\r\n end;\r\n\r\n {$IFDEF WEBLIB}\r\n TTMSFNCMapsList = class(TList)\r\n private\r\n function GetItem(Index: Integer): ITMSFNCCustomMaps;\r\n procedure SetItem(Index: Integer; const Value: ITMSFNCCustomMaps);\r\n public\r\n property Items[Index: Integer]: ITMSFNCCustomMaps read GetItem write SetItem; default;\r\n end;\r\n {$ENDIF}\r\n {$IFNDEF WEBLIB}\r\n TTMSFNCMapsList = class(TList);\r\n {$ENDIF}\r\n\r\n TTMSFNCMapsFactoryService = class(TInterfacedObject, ITMSFNCMapsService)\r\n private\r\n FMaps: TTMSFNCMapsList;\r\n protected\r\n function DoCreateMaps: ITMSFNCCustomMaps; virtual; abstract;\r\n function CreateMaps: ITMSFNCCustomMaps;\r\n procedure DestroyMaps(AMaps: ITMSFNCCustomMaps);\r\n public\r\n constructor Create;\r\n destructor Destroy; override;\r\n end;\r\n\r\n {$IFNDEF LCLLIB}\r\n {$HINTS OFF}\r\n {$IF COMPILERVERSION > 22}\r\n {$IFNDEF LCLLIB}\r\n [ComponentPlatformsAttribute(TMSPlatformsWeb)]\r\n {$ENDIF}\r\n {$IFEND}\r\n {$HINTS ON}\r\n {$ENDIF}\r\n TTMSFNCMaps = class(TTMSFNCCustomMaps)\r\n protected\r\n procedure RegisterRuntimeClasses; override;\r\n public\r\n procedure Navigate; overload; override;\r\n procedure Navigate(const AURL: string); overload; override;\r\n procedure ExecuteJavaScript(AScript: String; ACompleteEvent: TTMSFNCWebBrowserJavaScriptCompleteEvent = nil; AImmediate: Boolean = False); override;\r\n function ExecuteJavaScriptSync(AScript: String): string; override;\r\n procedure LoadHTML(AHTML: String); override;\r\n procedure LoadFile(AFile: String); override;\r\n procedure Initialize; override;\r\n procedure DeInitialize; override;\r\n procedure GoForward; override;\r\n procedure GoBack; override;\r\n procedure Reload; override;\r\n procedure StopLoading; override;\r\n procedure AddBridge(ABridgeName: string; ABridgeObject: TObject); override;\r\n procedure RemoveBridge(ABridgeName: string); override;\r\n procedure CaptureScreenShot(ACompleteEvent: TTMSFNCWebBrowserCaptureScreenShotCompleteEvent = nil); override;\r\n function GetBridgeCommunicationLayer(ABridgeName: string): string; override;\r\n function NativeEnvironment: Pointer; override;\r\n function NativeBrowser: Pointer; override;\r\n function IsFMXBrowser: Boolean; override;\r\n function CanGoBack: Boolean; override;\r\n function CanGoForward: Boolean; override;\r\n {$IFDEF ANDROID}\r\n function NativeDialog: Pointer; override;\r\n {$ENDIF}\r\n {$IFDEF MSWINDOWS}\r\n function GetWebBrowserInstance: IInterface; override;\r\n {$ENDIF}\r\n property OnCloseForm;\r\n property EnableContextMenu;\r\n property EnableShowDebugConsole;\r\n property EnableAcceleratorKeys;\r\n property CacheFolder;\r\n property CacheFolderName;\r\n property AutoClearCache;\r\n procedure ClearCache; override;\r\n procedure ShowDebugConsole; override;\r\n\r\n property MapsInstance;\r\n property MapsProperties;\r\n published\r\n property OnCustomizeLocalAccessFileName;\r\n property RouteCalculator;\r\n property OnCaptureScreenShot;\r\n property OnCustomizeCSS;\r\n property OnCustomizeJavaScript;\r\n property OnCustomizeMap;\r\n property OnCustomizeGlobalVariables;\r\n property OnCustomizeMarker;\r\n property OnCustomizePopup;\r\n property OnCustomizeHeadLinks;\r\n property OnCustomizeOptions;\r\n property OnCustomizePolyElement;\r\n property OnGetDefaultHTMLMessage;\r\n property OnZoomChanged;\r\n property OnMapTypeChanged;\r\n property OnMapMoveStart;\r\n property OnMapMoveEnd;\r\n// property OnMapMove;\r\n// property OnMapIdle;\r\n property OnMapClick;\r\n property OnMapDblClick;\r\n property OnMapMouseUp;\r\n property OnMapMouseDown;\r\n property OnMapMouseMove;\r\n property OnMapMouseEnter;\r\n property OnMapMouseLeave;\r\n property OnMarkerClick;\r\n property OnMarkerRightClick;\r\n property OnMarkerDblClick;\r\n property OnMarkerMouseUp;\r\n property OnMarkerMouseDown;\r\n property OnMarkerMouseEnter;\r\n property OnMarkerMouseLeave;\r\n property OnPolyElementClick;\r\n property OnPolyElementDblClick;\r\n property OnPolyElementMouseUp;\r\n property OnPolyElementMouseDown;\r\n property OnPolyElementMouseEnter;\r\n property OnPolyElementMouseLeave;\r\n property OnCustomEvent;\r\n property OnMapInitialized;\r\n property OnGetCenterCoordinate;\r\n property OnGetBounds;\r\n property OnGetZoomLevel;\r\n property OnCreateGPXTrack;\r\n property OnCreateGPXSegment;\r\n property OnCreateGPXWayPoint;\r\n property OnCreateGeoJSONObject;\r\n property OnRouteCalculatorWayPointAdded;\r\n property OnRouteCalculatorWayPointUpdated;\r\n property OnRouteCalculatorPolylineAdded;\r\n property OnRouteCalculatorPolylineUpdated;\r\n property OnRouteCalculatorBeforeDeletePolyline;\r\n property OnRouteCalculatorAfterDeletePolyline;\r\n property OnRouteCalculatorBeforeDeleteMarker;\r\n property OnRouteCalculatorAfterDeleteMarker;\r\n property OnError;\r\n\r\n property APIKey;\r\n property Polylines;\r\n property Polygons;\r\n property Circles;\r\n property Rectangles;\r\n property Markers;\r\n property ElementContainers;\r\n property Labels;\r\n property HeadLinks;\r\n property Options;\r\n property Service;\r\n property Version;\r\n property LocalFileAccess;\r\n property DesigntimeEnabled;\r\n end;\r\n\r\n TTMSFNCMapsPlatformServicesService = class\r\n private\r\n FInterface: IInterface;\r\n FGUID: string;\r\n public\r\n constructor Create(AGUID: string; AInterface: IInterface);\r\n property GUID: string read FGUID;\r\n property &Interface: IInterface read FInterface;\r\n end;\r\n\r\n {$IFDEF WEBLIB}\r\n TTMSFNCMapsPlatformServicesList = class(TObjectList)\r\n private\r\n function GetItem(Index: Integer): TTMSFNCMapsPlatformServicesService;\r\n procedure SetItem(Index: Integer; const Value: TTMSFNCMapsPlatformServicesService);\r\n public\r\n property Items[Index: Integer]: TTMSFNCMapsPlatformServicesService read GetItem write SetItem; default;\r\n {$ENDIF}\r\n {$IFNDEF WEBLIB}\r\n TTMSFNCMapsPlatformServicesList = class(TObjectList)\r\n {$ENDIF}\r\n private\r\n function GetValue(AGUID: string): IInterface;\r\n public\r\n function ContainsKey(AGUID: string): Boolean;\r\n procedure RemoveByGUID(AGUID: string);\r\n property Interfaces[AGUID: string]: IInterface read GetValue;\r\n end;\r\n\r\n TTMSFNCMapsPlatformServices = class\r\n private\r\n FServicesList: TTMSFNCMapsPlatformServicesList;\r\n class var FCurrent: TTMSFNCMapsPlatformServices;\r\n class var FCurrentReleased: Boolean;\r\n{$IFNDEF AUTOREFCOUNT}\r\n class procedure ReleaseCurrent;\r\n{$ENDIF}\r\n public\r\n constructor Create;\r\n destructor Destroy; override;\r\n procedure AddPlatformService(const AServiceGUID: TGUID; const AService: IInterface);\r\n procedure RemovePlatformService(const AServiceGUID: TGUID);\r\n function GetPlatformService(const AServiceGUID: TGUID): IInterface;\r\n function SupportsPlatformService(const AServiceGUID: TGUID): Boolean; overload;\r\n function SupportsPlatformService(const AServiceGUID: TGUID; var AService: IInterface): Boolean; overload;\r\n class function Current: TTMSFNCMapsPlatformServices;\r\n end;\r\n\r\nimplementation\r\n\r\nuses\r\n {%H-}Math,\r\n WEBLib.TMSFNCPersistence,\r\n WEBLib.TMSFNCUtils,\r\n WEBLib.TMSFNCGraphics,\r\n WEBLib.TMSFNCMaps.GoogleMaps,\r\n WEBLib.TMSFNCMaps.Here,\r\n WEBLib.TMSFNCMaps.BingMaps,\r\n WEBLib.TMSFNCMaps.TomTom,\r\n WEBLib.TMSFNCMaps.AzureMaps,\r\n WEBLib.TMSFNCMaps.OpenLayers,\r\n WEBLib.TMSFNCMaps.Leaflet,\r\n WEBLib.TMSFNCMaps.MapBox,\r\n WEBLib.TMSFNCMaps.MapKit\r\n {$IFNDEF LCLWEBLIB}\r\n ,UITypes\r\n {$ENDIF}\r\n {$IFDEF FMXLIB}\r\n ,FMX.Types\r\n {$ENDIF}\r\n ;\r\n\r\nconst\r\n EVENTDATAPREFIX = 'jsevent://';\r\n CUSTOMDATAPREFIX = 'customdata://';\r\n LOADMAPFUNC = 'loadMap';\r\n WAITFORMAPINITIALIZEDFUNC = 'waitForMapInitialized';\r\n MAPEVENTDATA = 'JSEVENT';\r\n\r\ntype\r\n TTMSFNCMapsRouteCalculatorOpen = class(TTMSFNCRouteCalculator);\r\n\r\n{ TTMSFNCMapsEventData }\r\n\r\nconstructor TTMSFNCMapsEventData.Create;\r\nbegin\r\n FEvent := '';\r\n FCoordinate := TTMSFNCMapsCoordinate.Create;\r\nend;\r\n\r\ndestructor TTMSFNCMapsEventData.Destroy;\r\nbegin\r\n FCoordinate.Free;\r\n inherited;\r\nend;\r\n\r\n{ TTMSFNCMapsGeoJSONEventData }\r\n\r\nconstructor TTMSFNCMapsGeoJSONEventData.Create;\r\nbegin\r\n FJSONValue := nil;\r\nend;\r\n\r\ndestructor TTMSFNCMapsGeoJSONEventData.Destroy;\r\nbegin\r\n inherited;\r\nend;\r\n\r\n{ TTMSFNCCustomMaps }\r\n\r\nfunction TTMSFNCCustomMaps.GetShowZoomControl: Boolean;\r\nbegin\r\n Result := Options.ShowZoomControl;\r\nend;\r\n\r\nfunction TTMSFNCCustomMaps.GetTilt: Double;\r\nbegin\r\n Result := 0;\r\nend;\r\n\r\nfunction TTMSFNCCustomMaps.GetTipsURL: string;\r\nbegin\r\n Result := TTMSFNCMapsTipsURL;\r\nend;\r\n\r\nfunction TTMSFNCCustomMaps.GetShowMapTypeControl: Boolean;\r\nbegin\r\n Result := Options.ShowMapTypeControl;\r\nend;\r\n\r\nfunction TTMSFNCCustomMaps.GetLocalAccessFileName: string;\r\nbegin\r\n Result := TTMSFNCUtils.AddBackslash(TTMSFNCUtils.GetTempPath) + CreateNewGUID + '.html';\r\n DoCustomizeLocalAccessFileName(Result);\r\nend;\r\n\r\nfunction TTMSFNCCustomMaps.GetLocale(AMode: TTMSFNCMapsLocaleMode = mlmDefault): string;\r\nbegin\r\n Result := ParseLocale(Options.Locale, AMode);\r\nend;\r\n\r\nfunction TTMSFNCCustomMaps.GetAPIKey: string;\r\nbegin\r\n Result := APIKey;\r\nend;\r\n\r\nfunction TTMSFNCCustomMaps.GetAPIVersion: string;\r\nbegin\r\n Result := '';\r\nend;\r\n\r\nfunction TTMSFNCCustomMaps.GetBackgroundColor: TTMSFNCGraphicsColor;\r\nbegin\r\n Result := Options.BackgroundColor;\r\nend;\r\n\r\nfunction TTMSFNCCustomMaps.GetBody: string;\r\nbegin\r\n {$IFDEF WEBLIB}\r\n Result := '
';\r\n {$ELSE}\r\n Result := '
';\r\n {$ENDIF}\r\nend;\r\n\r\nfunction TTMSFNCCustomMaps.GetHeadStyle: string;\r\nvar\r\n m: string;\r\n hs: string;\r\nbegin\r\n Result := '';\r\n if not Assigned(FMaps) then\r\n Exit;\r\n\r\n hs := '';\r\n DoCustomizeCSS(hs);\r\n\r\n {$IFDEF WEBLIB}\r\n Result := '#' + MAPID + ' {' + LB +\r\n {$ELSE}\r\n Result := '#' + MAPID + ', html, body {' + LB +\r\n {$ENDIF}\r\n ' height: 100%;' + LB +\r\n ' margin: 0;' + LB +\r\n ' padding: 0;' + LB +\r\n ' overflow: hidden;' + LB +\r\n '}';\r\n\r\n Result := Result +\r\n ' .tmsfncmaps_sb:after {' + LB +\r\n ' content: \"\";' + LB +\r\n ' \tposition: absolute;' + LB +\r\n ' left: 50%;' + lB +\r\n ' \twidth: 10px;' + LB +\r\n ' \theight: 10px;' + LB +\r\n ' margin-left: -5px;' +\r\n ' \tborder-left: inherit;' + LB +\r\n ' \tborder-top: inherit;' + LB +\r\n ' \tbackground-color: inherit;' + LB +\r\n ' \tdisplay: block;' + LB +\r\n ' \ttransform: rotate(-135deg);' + LB +\r\n ' }';\r\n\r\n if hs <> '' then\r\n Result := Result + LB + hs;\r\n\r\n m := FMaps.GetHeadStyle;\r\n if m <> '' then\r\n Result := Result + LB + m;\r\nend;\r\n\r\nfunction TTMSFNCCustomMaps.GetDefaultHTML: string;\r\nvar\r\n m: string;\r\nbegin\r\n Result :=\r\n {$IFNDEF WEBLIB}\r\n ''+\r\n ''+\r\n\r\n ''+\r\n ' ' + LB +\r\n ' ' + LB +\r\n ' ' + LB +\r\n ' 404 HTML Template by Colorlib' + LB +\r\n ' ' + LB +\r\n ' ' + LB +\r\n {$ENDIF}\r\n ' ' + LB +\r\n {$IFNDEF WEBLIB}\r\n '' + LB +\r\n {$ENDIF}\r\n\r\n {$IFNDEF WEBLIB}\r\n '' + LB +\r\n {$ENDIF}\r\n '
' + LB +\r\n '
' + LB +\r\n '
' + LB;\r\n\r\n\r\n m := '';\r\n if not MapReady then\r\n begin\r\n if Assigned(FMaps) then\r\n m := FMaps.GetIdentifier + ' can''t be displayed - please verify if API key is set!'\r\n else\r\n m := 'Map can''t be initialized - please verify if correct Service is set!';\r\n end;\r\n\r\n DoGetDefaultHTMLMessage(m);\r\n\r\n Result := Result + '

' + m + '

' + LB;\r\n\r\n Result := Result +\r\n '
' + LB +\r\n '
' + LB +\r\n '
' + LB\r\n {$IFNDEF WEBLIB}\r\n +'' + LB +\r\n ''\r\n {$ENDIF}\r\n ;\r\nend;\r\n\r\nfunction TTMSFNCCustomMaps.GetDocURL: string;\r\nbegin\r\n Result := TTMSFNCMapsDocURL;\r\nend;\r\n\r\nfunction TTMSFNCCustomMaps.GetElementContainerByID(\r\n AID: string): TTMSFNCMapsElementContainer;\r\nbegin\r\n Result := ElementContainers.ItemByID[AID];\r\nend;\r\n\r\nfunction TTMSFNCCustomMaps.GetElementContainersClass: TTMSFNCMapsElementContainersClass;\r\nbegin\r\n Result := TTMSFNCMapsElementContainers;\r\nend;\r\n\r\nfunction TTMSFNCCustomMaps.GetHeadLinksClass: TTMSFNCMapsHeadLinksClass;\r\nbegin\r\n Result := TTMSFNCMapsHeadLinks;\r\nend;\r\n\r\nfunction TTMSFNCCustomMaps.GetHTML: string;\r\nvar\r\n hs, bs: string;\r\n l: TTMSFNCMapsLinksList;\r\nbegin\r\n Result := '';\r\n if not MapReady then\r\n begin\r\n Result :=\r\n {$IFNDEF WEBLIB}\r\n StartHTMLTag + LB +\r\n StartBODYTag + LB +\r\n {$ENDIF}\r\n GetDefaultHTML\r\n {$IFNDEF WEBLIB}\r\n + LB + EndBODYTag + LB +\r\n EndHTMLTag\r\n {$ENDIF}\r\n ;\r\n Exit;\r\n end;\r\n\r\n {$IFDEF WEBLIB}\r\n Result := GetBody;\r\n {$ELSE}\r\n Result :=\r\n StartHTMLTag + LB +\r\n StartHEADTag + LB +\r\n '' + LB +\r\n '' + LB +\r\n '' + LB;\r\n\r\n if Options.Console then\r\n Result := Result + '' + LB;\r\n\r\n l := TTMSFNCMapsLinksList.Create;\r\n try\r\n GetHeadLinks(l);\r\n hs := ParseLinks(l);\r\n l.Clear;\r\n GetBodyLinks(l);\r\n bs := ParseLinks(l);\r\n finally\r\n l.Free;\r\n end;\r\n\r\n Result := Result +\r\n hs + LB +\r\n StartSTYLETag + LB +\r\n GetHeadStyle + LB +\r\n EndStyleTag + LB +\r\n StartTITLETag + LB +\r\n FMaps.GetIdentifier + LB +\r\n EndTITLETag + LB +\r\n EndHEADTag + LB +\r\n StartBODYTag + LB +\r\n GetBody + LB +\r\n bs + LB +\r\n EndBODYTag + LB +\r\n EndHTMLTag + LB;\r\n {$ENDIF}\r\nend;\r\n\r\nfunction TTMSFNCCustomMaps.GetVersion: string;\r\nvar\r\n vn: Integer;\r\nbegin\r\n vn := GetVersionNr;\r\n Result := IntToStr(Hi(Hiword(vn)))+'.'+IntToStr(Lo(Hiword(vn)))+'.'+IntToStr(Hi(Loword(vn)))+'.'+IntToStr(Lo(Loword(vn)));\r\nend;\r\n\r\nfunction TTMSFNCCustomMaps.GetVersionNr: Integer;\r\nbegin\r\n Result := MakeLong(MakeWord(BLD_VER,REL_VER),MakeWord(MIN_VER,MAJ_VER));\r\nend;\r\n\r\nprocedure TTMSFNCCustomMaps.Assign(Source: TPersistent);\r\nbegin\r\n inherited;\r\n if (Source is TTMSFNCCustomMaps) then\r\n begin\r\n FService := (Source as TTMSFNCCustomMaps).Service;\r\n FOptions.Assign((Source as TTMSFNCCustomMaps).Options);\r\n FAPIKey := (Source as TTMSFNCCustomMaps).APIKey;\r\n FMarkers.Assign((Source as TTMSFNCCustomMaps).Markers);\r\n FElementContainers.Assign((Source as TTMSFNCCustomMaps).ElementContainers);\r\n FLabels.Assign((Source as TTMSFNCCustomMaps).Labels);\r\n FPolylines.Assign((Source as TTMSFNCCustomMaps).Polylines);\r\n FPolygons.Assign((Source as TTMSFNCCustomMaps).Polygons);\r\n FCircles.Assign((Source as TTMSFNCCustomMaps).Circles);\r\n FRectangles.Assign((Source as TTMSFNCCustomMaps).Rectangles);\r\n FHeadLinks.Assign((Source as TTMSFNCCustomMaps).HeadLinks);\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomMaps.BeginUpdate;\r\nbegin\r\n inherited;\r\n Inc(FUpdateCount);\r\nend;\r\n\r\nconstructor TTMSFNCCustomMaps.Create(AOwner: TComponent);\r\nbegin\r\n inherited;\r\n {$IFDEF WEBLIB}\r\n if (ElementID = '') and IsDesigning then\r\n ElementID := GetNewName;\r\n {$ENDIF}\r\n\r\n FMarkers := GetMarkersClass.Create(Self);\r\n FHeatMaps := GetHeatMapsClass.Create(Self);\r\n FElementContainers := GetElementContainersClass.Create(Self);\r\n FLabels := GetLabelsClass.Create(Self);\r\n FPolygons := GetPolygonsClass.Create(Self);\r\n FRectangles := GetRectanglesClass.Create(Self);\r\n FCircles := GetCirclesClass.Create(Self);\r\n FPolylines := GetPolylinesClass.Create(Self);\r\n FHeadLinks := GetHeadLinksClass.Create(Self);\r\n\r\n CheckInstances;\r\nend;\r\n\r\nprocedure TTMSFNCCustomMaps.CreateClasses;\r\nbegin\r\n inherited;\r\n\r\n Supports(Self, ITMSFNCCustomMapsProperties, FMapsProperties);\r\n\r\n FOptions := GetOptionsClass.Create;\r\n FOptions.OnChange := @OptionsChanged;\r\nend;\r\n\r\nprocedure TTMSFNCCustomMaps.Initialized;\r\nbegin\r\n inherited;\r\n FMapInitialized := False;\r\n InitializeMap;\r\nend;\r\n\r\nprocedure TTMSFNCCustomMaps.InitializeHTML;\r\n{$IFNDEF WEBLIB}\r\n{$IFNDEF ANDROID}\r\nvar\r\n s: TStringList;\r\n fn: string;\r\n{$ENDIF}\r\n{$ENDIF}\r\n{$IFDEF WEBLIB}\r\nvar\r\n v: Boolean;\r\n{$ENDIF}\r\nbegin\r\n if (FUpdateCount > 0) or IsDestroying or MapInitialized then\r\n Exit;\r\n\r\n {$IFDEF WEBLIB}\r\n LoadStyles;\r\n v := False;\r\n LoadScripts(True);\r\n LoadScripts(False);\r\n {$ENDIF}\r\n {$IFNDEF WEBLIB}\r\n {$IFNDEF ANDROID}\r\n if (Service = msHere) or LocalFileAccess then\r\n begin\r\n s := TStringList.Create;\r\n try\r\n s.Text := GetHTML;\r\n fn := GetLocalAccessFileName;\r\n s.SaveToFile(fn{$IFNDEF LCLWEBLIB}, TEncoding.UTF8{$ENDIF});\r\n LoadFile(fn);\r\n finally\r\n s.Free;\r\n end;\r\n end\r\n else\r\n {$ENDIF}\r\n {$ENDIF}\r\n begin\r\n LoadHTML(GetHTML);\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomMaps.InitializeMap;\r\nvar\r\n MapsServiceGoogleMaps: ITMSFNCMapsServiceGoogleMaps;\r\n MapsServiceHere: ITMSFNCMapsServiceHere;\r\n MapsServiceTomTom: ITMSFNCMapsServiceTomTom;\r\n MapsServiceAzureMaps: ITMSFNCMapsServiceAzureMaps;\r\n MapsServiceBingMaps: ITMSFNCMapsServiceBingMaps;\r\n MapsServiceOpenLayers: ITMSFNCMapsServiceOpenLayers;\r\n MapsServiceLeaflet: ITMSFNCMapsServiceLeaflet;\r\n MapsServiceMapBox: ITMSFNCMapsServiceMapBox;\r\n MapsServiceMapKit: ITMSFNCMapsServiceMapKit;\r\nbegin\r\n if (FUpdateCount > 0) or IsDestroying or MapInitialized then\r\n Exit;\r\n\r\n {$IFNDEF WEBLIB}\r\n if Assigned(FMaps) then\r\n FMaps.DestroyMaps;\r\n {$ENDIF}\r\n\r\n FMaps := nil;\r\n FMapsInstance := nil;\r\n\r\n case Service of\r\n msGoogleMaps:\r\n begin\r\n if TTMSFNCMapsPlatformServices.Current.SupportsPlatformService(ITMSFNCMapsServiceGoogleMaps, IInterface(MapsServiceGoogleMaps)) then\r\n FMaps := MapsServiceGoogleMaps.CreateMaps;\r\n end;\r\n msHere:\r\n begin\r\n if TTMSFNCMapsPlatformServices.Current.SupportsPlatformService(ITMSFNCMapsServiceHere, IInterface(MapsServiceHere)) then\r\n FMaps := MapsServiceHere.CreateMaps;\r\n end;\r\n msTomTom:\r\n begin\r\n if TTMSFNCMapsPlatformServices.Current.SupportsPlatformService(ITMSFNCMapsServiceTomTom, IInterface(MapsServiceTomTom)) then\r\n FMaps := MapsServiceTomTom.CreateMaps;\r\n TTMSFNCUtils.Log('The TomTom Maps service is deprecated. It is recommend to use a different service.');\r\n end;\r\n msAzureMaps:\r\n begin\r\n if TTMSFNCMapsPlatformServices.Current.SupportsPlatformService(ITMSFNCMapsServiceAzureMaps, IInterface(MapsServiceAzureMaps)) then\r\n FMaps := MapsServiceAzureMaps.CreateMaps;\r\n end;\r\n msBingMaps:\r\n begin\r\n if TTMSFNCMapsPlatformServices.Current.SupportsPlatformService(ITMSFNCMapsServiceBingMaps, IInterface(MapsServiceBingMaps)) then\r\n FMaps := MapsServiceBingMaps.CreateMaps;\r\n TTMSFNCUtils.Log('The Bing Maps service is deprecated. It is recommend to use a different service.');\r\n end;\r\n msOpenLayers:\r\n begin\r\n if TTMSFNCMapsPlatformServices.Current.SupportsPlatformService(ITMSFNCMapsServiceOpenLayers, IInterface(MapsServiceOpenLayers)) then\r\n FMaps := MapsServiceOpenLayers.CreateMaps;\r\n end;\r\n msLeaflet:\r\n begin\r\n if TTMSFNCMapsPlatformServices.Current.SupportsPlatformService(ITMSFNCMapsServiceLeaflet, IInterface(MapsServiceLeaflet)) then\r\n FMaps := MapsServiceLeaflet.CreateMaps;\r\n end;\r\n msMapBox:\r\n begin\r\n if TTMSFNCMapsPlatformServices.Current.SupportsPlatformService(ITMSFNCMapsServiceMapBox, IInterface(MapsServiceMapBox)) then\r\n FMaps := MapsServiceMapBox.CreateMaps;\r\n end;\r\n msMapKit:\r\n begin\r\n if TTMSFNCMapsPlatformServices.Current.SupportsPlatformService(ITMSFNCMapsServiceMapKit, IInterface(MapsServiceMapKit)) then\r\n FMaps := MapsServiceMapKit.CreateMaps;\r\n end;\r\n end;\r\n\r\n if Assigned(FMaps) and Supports(FMaps, ITMSFNCCustomMapsInstance, FMapsInstance) then\r\n FMapsInstance.SetMapsProperties(FMapsProperties);\r\n\r\n InitializeHTML;\r\nend;\r\n\r\nprocedure TTMSFNCCustomMaps.GetBodyLinks(AList: TTMSFNCMapsLinksList; AIncludeContent: Boolean = True; ACheckReady: Boolean = True);\r\nbegin\r\n if ACheckReady and not MapReady then\r\n Exit;\r\n\r\n GetLinks(AList, AIncludeContent, ACheckReady);\r\nend;\r\n\r\nfunction TTMSFNCCustomMaps.GetHeading: Double;\r\nbegin\r\n Result := 0;\r\nend;\r\n\r\nprocedure TTMSFNCCustomMaps.GetHeadLinks(AList: TTMSFNCMapsLinksList; ACheckReady: Boolean = True);\r\nvar\r\n I: Integer;\r\nbegin\r\n if ACheckReady and not MapReady then\r\n Exit;\r\n\r\n for I := 0 to HeadLinks.Count - 1 do\r\n begin\r\n if HeadLinks[I].Enabled then\r\n begin\r\n case HeadLinks[I].Kind of\r\n mlkLink: AList.Add(TTMSFNCMapsLink.CreateLink(HeadLinks[I].URL, HeadLinks[I].&Type, HeadLinks[I].Rel));\r\n mlkScript: AList.Add(TTMSFNCMapsLink.CreateScript(HeadLinks[I].URL, HeadLinks[I].&Type, HeadLinks[I].CharSet, HeadLinks[I].Content.Text, HeadLinks[I].Defer, HeadLinks[I].Async));\r\n mlkStyle: AList.Add(TTMSFNCMapsLink.Create(HeadLinks[I].Kind, HeadLinks[I].URL, '', '', '', HeadLinks[I].Content.Text, False, False));\r\n end;\r\n end;\r\n end;\r\n\r\n FMaps.GetHeadLinks(AList);\r\n DoCustomizeHeadLinks(AList);\r\nend;\r\n\r\nfunction TTMSFNCCustomMaps.GetWaitForMapInitialized: string;\r\nbegin\r\n Result := '';\r\n if not Assigned(FMaps) then\r\n Exit;\r\n\r\n Result :=\r\n 'function ' + WAITFORMAPINITIALIZEDFUNC + '(){' + LB +\r\n ' if (' + FMaps.GetMapsServiceCheck + ') {' + LB +\r\n ' setTimeout(' + WAITFORMAPINITIALIZEDFUNC + ', 200);' + LB +\r\n ' } else if (!' + MAPVAR + ') {' + LB +\r\n ' ' + LOADMAPFUNC + '();' + LB +\r\n ' }' + LB +\r\n '};' + LB +\r\n WAITFORMAPINITIALIZEDFUNC + '();';\r\nend;\r\n\r\nfunction TTMSFNCCustomMaps.GetDeleteMarkerFunction: string;\r\nbegin\r\n Result := '';\r\n if not Assigned(FMaps) then\r\n Exit;\r\n\r\n Result :=\r\n 'function ' + DELETEMARKERFUNCTION + '(' + PARAMSNAME + '){' + LB +\r\n TryCatchStart +\r\n ' var ' + MARKERVAR + ' = ' + MARKERARRAYVAR + '[' + PARAMSNAME + '[\"ID\"]];' + LB +\r\n FMaps.GetDeleteMarker + LB + LB +\r\n ' if (' + MARKERVAR + '){' + LB +\r\n ' delete ' + MARKERARRAYVAR + '[' + PARAMSNAME + '[\"ID\"]];' + LB +\r\n ' ' + MARKERVAR + ' = null;' + LB +\r\n ' }' + LB +\r\n TryCatchEnd('TMS FNC Maps Marker error') +\r\n '}';\r\nend;\r\n\r\nfunction TTMSFNCCustomMaps.GetAddOrUpdateElementContainerFunction: string;\r\nbegin\r\n Result :=\r\n 'function updateElementPositions(){' + LB +\r\n ' for (var key in ' + ELEMENTCONTAINERARRAYVAR + '){' + LB +\r\n ' var v = key;' + LB +\r\n ' var it = ' + ELEMENTCONTAINERARRAYVAR + '[v];' + LB +\r\n ' var obj = it[0];' + LB +\r\n ' var posType = obj.getAttribute(\"data-position\");' + LB +\r\n\r\n //Label positioned at coordinate\r\n ' if (posType == 9){ ' + LB +\r\n\r\n //LabelType\r\n //0 = Label (default)\r\n //1 = Balloon\r\n\r\n ' var lat = parseFloat(obj.getAttribute(\"data-latitude\"));' + LB +\r\n ' var lon = parseFloat(obj.getAttribute(\"data-longitude\"));' + LB +\r\n ' var xy = ' + GETLATLONTOXYFUNCTION + '({\"Latitude\": lat, \"Longitude\": lon})' + LB +\r\n ' var labeltype = obj.getAttribute(\"data-labeltype\");' + LB +\r\n ' var tadapt = 0;' + LB +\r\n ' var tailheight = 0;' + LB +\r\n\r\n ' if (labeltype == 1) {' + LB +\r\n ' tailheight = 10;' + LB +\r\n ' tadapt = (obj.offsetHeight + tailheight);' + LB +\r\n ' obj.classList.add(\"tmsfncmaps_sb\");' + LB +\r\n ' } else { ' + LB +\r\n ' obj.classList.remove(\"tmsfncmaps_sb\");' + LB +\r\n ' }' + LB +\r\n\r\n ' var xyObj;' + LB +\r\n ' if (typeof xy == \"string\")' + LB +\r\n ' xyObj = JSON.parse(xy);' + LB +\r\n ' else' + LB +\r\n ' xyObj = xy;' + LB +\r\n\r\n// ' obj.style.margin = xyObj.Y + \"px 0px 0px \" + xyObj.X + \"px\";' + LB +\r\n ' obj.style.margin = (xyObj.Y - tadapt) + \"px 0px 0px \" + (xyObj.X - (obj.offsetWidth / 2)) + \"px\";' + LB +\r\n ' obj.style.cursor = \"default\";' + LB +\r\n\r\n ' }' + LB +\r\n\r\n //Label positioned at bounds\r\n ' if (posType == 10){ ' + LB +\r\n\r\n ' var nelat = parseFloat(obj.getAttribute(\"data-ne-latitude\"));' + LB +\r\n ' var nelon = parseFloat(obj.getAttribute(\"data-ne-longitude\"));' + LB +\r\n\r\n ' var swlat = parseFloat(obj.getAttribute(\"data-sw-latitude\"));' + LB +\r\n ' var swlon = parseFloat(obj.getAttribute(\"data-sw-longitude\"));' + LB +\r\n\r\n ' var xyne = ' + GETLATLONTOXYFUNCTION + '({\"Latitude\": nelat, \"Longitude\": nelon})' + LB +\r\n ' var xysw = ' + GETLATLONTOXYFUNCTION + '({\"Latitude\": swlat, \"Longitude\": swlon})' + LB +\r\n\r\n ' var xyneObj;' + LB +\r\n ' if (typeof xyne == \"string\")' + LB +\r\n ' xyneObj = JSON.parse(xyne);' + LB +\r\n ' else' + LB +\r\n ' xyneObj = xyne;' + LB +\r\n\r\n ' var xyswObj;' + LB +\r\n ' if (typeof xysw == \"string\")' + LB +\r\n ' xyswObj = JSON.parse(xysw);' + LB +\r\n ' else' + LB +\r\n ' xyswObj = xysw;' + LB +\r\n\r\n ' obj.style.margin = xyneObj.Y + \"px 0px 0px \" + xyswObj.X + \"px\";' + LB +\r\n\r\n ' var top = xyneObj.Y;' + LB +\r\n ' var right = xyneObj.X;' + LB +\r\n ' var bottom = xyswObj.Y;' + LB +\r\n ' var left = xyswObj.X;' + LB +\r\n\r\n ' var width = right - left;' + LB +\r\n ' var height = bottom - top;' + LB +\r\n ' if (left > right) {' + LB +\r\n ' width = right - left;' + LB +\r\n ' }' + LB +\r\n ' if (top > bottom) {' + LB +\r\n ' height = bottom - top;' + LB +\r\n ' }' + LB +\r\n\r\n ' obj.style.width = width;' + LB +\r\n ' obj.style.height = height;' + LB +\r\n\r\n ' obj.style.overflow = \"hidden\";' + LB +\r\n ' obj.style.cursor = \"default\";' + LB +\r\n\r\n ' }' + LB +\r\n\r\n ' }' + LB +\r\n '}' + LB +\r\n\r\n 'setInterval(updateElementPositions, 1);' + LB +\r\n\r\n 'function ' + ADDORUPDATEELEMENTCONTAINERFUNCTION + '(' + PARAMSNAME + '){' + LB +\r\n TryCatchStart +\r\n\r\n ' var ' + ELEMENTCONTAINERVAR + ' = ' + ELEMENTCONTAINERARRAYVAR + '[' + PARAMSNAME + '[\"ID\"]];' + LB +\r\n\r\n ' if (!' + ELEMENTCONTAINERVAR + '){' + LB +\r\n ' ' + ELEMENTCONTAINERVAR + ' = [];' + LB +\r\n ' ' + ELEMENTCONTAINERVAR + '.push(document.createElement(\"div\"));' + LB +\r\n ' ' + ELEMENTCONTAINERVAR + '[0].id = ' + PARAMSNAME + '[\"HTMLElementID\"];' + LB +\r\n ' ' + ELEMENTCONTAINERVAR + '[0].className = ' + PARAMSNAME + '[\"HTMLElementClassName\"];' + LB +\r\n\r\n ' ' + ELEMENTCONTAINERVAR + '.push(document.createElement(\"style\"));' + LB +\r\n ' ' + ELEMENTCONTAINERVAR + '[1].id = ' + PARAMSNAME + '[\"HTMLElementID\"] + \"Style\";' + LB +\r\n ' var elementStyle = TMSFNCMaps_base64Decode(' + PARAMSNAME + '[\"StyleAsBase64\"]);' + LB +\r\n ' ' + ELEMENTCONTAINERVAR + '[1].innerHTML = elementStyle;' + LB +\r\n\r\n ' ' + ELEMENTCONTAINERVAR + '.push(document.createElement(\"script\"));' + LB +\r\n ' ' + ELEMENTCONTAINERVAR + '[2].id = ' + PARAMSNAME + '[\"HTMLElementID\"] + \"Script\";' + LB +\r\n ' var elementScript = TMSFNCMaps_base64Decode(' + PARAMSNAME + '[\"ScriptAsBase64\"]);' + LB +\r\n ' ' + ELEMENTCONTAINERVAR + '[2].innerHTML = elementScript;' + LB +\r\n\r\n ' document.head.appendChild(' + ELEMENTCONTAINERVAR + '[2]);' + LB +\r\n ' document.head.appendChild(' + ELEMENTCONTAINERVAR + '[1]);' + LB +\r\n {$IFDEF WEBLIB}\r\n ' ' + ElementID + '.appendChild(' + ELEMENTCONTAINERVAR + '[0]);' + LB +\r\n {$ELSE}\r\n ' document.body.appendChild(' + ELEMENTCONTAINERVAR + '[0]);' + LB +\r\n {$ENDIF}\r\n\r\n\r\n ' }' + LB +\r\n\r\n// TTMSFNCMapsPosition = (poCustom, poTopLeft, poTopCenter, poTopRight, poCenterLeft, poCenterCenter, poBottomLeft, poBottomCenter, poBottomRight, poCoordinate, poBounds, poCenterRight);\r\n\r\n ' var elementPosition = \"\";' + LB +\r\n\r\n ' switch (' + PARAMSNAME + '[\"Position\"]){' + LB +\r\n ' case 1:' + LB +\r\n ' elementPosition = \"top: 0; left: 0;\";' + LB +\r\n ' break;' + LB +\r\n ' case 2:' + LB +\r\n ' elementPosition = \"top: 0; left: 50%; transform: translate(-50%, 0);\";' + LB +\r\n ' break;' + LB +\r\n ' case 3:' + LB +\r\n ' elementPosition = \"top: 0; right: 0;\";' + LB +\r\n ' break;' + LB +\r\n ' case 4:' + LB +\r\n ' elementPosition = \"top: 50%; left: 0;\";' + LB +\r\n ' break;' + LB +\r\n ' case 5:' + LB +\r\n ' elementPosition = \"position: fixed; top: 50%; left: 50%; transform: translate(-50%,-50%);\";' + LB +\r\n ' break;' + LB +\r\n ' case 6:' + LB +\r\n ' elementPosition = \"bottom: 0; left: 0;\";' + LB +\r\n ' break;' + LB +\r\n ' case 7:' + LB +\r\n ' elementPosition = \"bottom: 0; left: 50%; transform: translate(-50%, 0);\"' + LB +\r\n ' break;' + LB +\r\n ' case 8:' + LB +\r\n ' elementPosition = \"bottom: 0; right: 0;\";' + LB +\r\n ' break;' + LB +\r\n ' case 9:' + LB +\r\n ' elementPosition = \"top: 0; left: 0;\";' + LB +\r\n ' break;' + LB +\r\n ' case 10:' + LB +\r\n ' elementPosition = \"top: 0; left: 0;\";' + LB +\r\n ' break;' + LB +\r\n ' case 11:' + LB +\r\n ' elementPosition = \"top: 50%; right: 0;\";' + LB +\r\n ' break;' + LB +\r\n\r\n ' }' + LB +\r\n\r\n ' ' + ELEMENTCONTAINERVAR + '[0].setAttribute(\"data-latitude\", ' + PARAMSNAME + '[\"Coordinate\"][\"Latitude\"]);' + LB +\r\n ' ' + ELEMENTCONTAINERVAR + '[0].setAttribute(\"data-longitude\", ' + PARAMSNAME + '[\"Coordinate\"][\"Longitude\"]);' + LB +\r\n ' ' + ELEMENTCONTAINERVAR + '[0].setAttribute(\"data-position\", ' + PARAMSNAME + '[\"Position\"]);' + LB +\r\n ' ' + ELEMENTCONTAINERVAR + '[0].setAttribute(\"data-labeltype\", ' + PARAMSNAME + '[\"LabelType\"]);' + LB +\r\n ' ' + ELEMENTCONTAINERVAR + '[0].setAttribute(\"data-alignment\", ' + PARAMSNAME + '[\"Alignment\"]);' + LB +\r\n\r\n ' ' + ELEMENTCONTAINERVAR + '[0].setAttribute(\"data-ne-latitude\", ' + PARAMSNAME + '[\"Bounds\"][\"NorthEast\"][\"Latitude\"]);' + LB +\r\n ' ' + ELEMENTCONTAINERVAR + '[0].setAttribute(\"data-ne-longitude\", ' + PARAMSNAME + '[\"Bounds\"][\"NorthEast\"][\"Longitude\"]);' + LB +\r\n ' ' + ELEMENTCONTAINERVAR + '[0].setAttribute(\"data-sw-latitude\", ' + PARAMSNAME + '[\"Bounds\"][\"SouthWest\"][\"Latitude\"]);' + LB +\r\n ' ' + ELEMENTCONTAINERVAR + '[0].setAttribute(\"data-sw-longitude\", ' + PARAMSNAME + '[\"Bounds\"][\"SouthWest\"][\"Longitude\"]);' + LB +\r\n\r\n ' elementPosition += \"margin-top: \" + ' + PARAMSNAME + '[\"Margins\"][\"Top\"] + \"px;\";' + LB +\r\n ' elementPosition += \"margin-left: \" + ' + PARAMSNAME + '[\"Margins\"][\"Left\"] + \"px;\";' + LB +\r\n ' elementPosition += \"margin-bottom: \" + ' + PARAMSNAME + '[\"Margins\"][\"Bottom\"] + \"px;\";' + LB +\r\n ' elementPosition += \"margin-right: \" + ' + PARAMSNAME + '[\"Margins\"][\"Right\"] + \"px;\";' + LB +\r\n\r\n ' var cssText = \"z-index: 9999;\";' + LB +\r\n ' if (' + PARAMSNAME + '[\"UseDefaultStyle\"]){' + LB +\r\n ' cssText += \"border-radius: 5px; padding: 5px; min-height: 50px; min-width: 50px;\" + '+\r\n\t\t' \"background-color: white; font-size: 14px; font-family: Roboto;\" +'+\r\n\t\t' \"text-align: center; color: grey;line-height: 18px; overflow: hidden;\" + elementPosition;' + LB +\r\n ' }' + LB +\r\n ' cssText += \"position: absolute;\" + elementPosition;' + LB +\r\n \t' ' + ELEMENTCONTAINERVAR + '[0].style.cssText = cssText;' + LB +\r\n\r\n ' if (! ' + PARAMSNAME + '[\"Visible\"])' + LB +\r\n ' ' + ELEMENTCONTAINERVAR + '[0].style.display = \"none\";' + LB +\r\n ' else' + LB +\r\n ' ' + ELEMENTCONTAINERVAR + '[0].style.display = \"\";' + LB +\r\n\r\n ' var elementHTML = TMSFNCMaps_base64Decode(' + PARAMSNAME + '[\"HTMLAsBase64\"]);' + LB +\r\n ' ' + ELEMENTCONTAINERVAR + '[0].innerHTML = elementHTML;' + LB +\r\n\r\n ' var elementStyle = TMSFNCMaps_base64Decode(' + PARAMSNAME + '[\"StyleAsBase64\"]);' + LB +\r\n ' ' + ELEMENTCONTAINERVAR + '[1].innerHTML = elementStyle;' + LB +\r\n\r\n ' var elementScript = TMSFNCMaps_base64Decode(' + PARAMSNAME + '[\"ScriptAsBase64\"]);' + LB +\r\n ' ' + ELEMENTCONTAINERVAR + '[2].innerHTML = elementScript;' + LB;\r\n\r\n Result := Result +\r\n ' var customControl = null;' + LB +\r\n ' for (i = 0; i < ' + PARAMSNAME + '[\"Actions\"].length; i++){' + LB +\r\n ' if (' + PARAMSNAME + '[\"Actions\"][i][\"Enabled\"]){' + LB +\r\n ' customControl = document.getElementById(' + PARAMSNAME + '[\"Actions\"][i][\"HTMLElementID\"]);' + LB +\r\n ' if (customControl){' + LB +\r\n ' switch (' + PARAMSNAME + '[\"Actions\"][i][\"Event\"]){' + LB +\r\n ' case 0:' + LB +\r\n ' switch (' + PARAMSNAME + '[\"Actions\"][i][\"EventReturnValue\"]){' + LB +\r\n ' case 0:' + LB +\r\n ' customControl.addEventListener(\"click\", function(event){' + GETSENDEVENT + '(parseEvent(event, \"' + ACTIONCLICKEVENT + '\", this.id), null);});' + LB +\r\n ' break;' + LB +\r\n ' case 1:' + LB +\r\n ' customControl.addEventListener(\"click\", function(event){' + GETSENDEVENT + '(parseEvent(event, \"' + ACTIONCLICKEVENT + '\", this.id), this.value);});' + LB +\r\n ' break;' + LB +\r\n ' case 2:' + LB +\r\n ' customControl.addEventListener(\"click\", function(event){' + GETSENDEVENT + '(parseEvent(event, \"' + ACTIONCLICKEVENT + '\", this.id), this.checked);});' + LB +\r\n ' break;' + LB +\r\n ' case 3:' + LB +\r\n ' customControl.addEventListener(\"click\", function(event){' + GETSENDEVENT + '(parseEvent(event, \"' + ACTIONCLICKEVENT + '\", this.id), this.innerHTML);});' + LB +\r\n ' break;' + LB +\r\n ' case 4:' + LB +\r\n ' customControl.addEventListener(\"click\", function(event){' + GETSENDEVENT + '(parseEvent(event, \"' + ACTIONCLICKEVENT + '\", this.id), this.innerText);});' + LB +\r\n ' break;' + LB +\r\n ' case 5:' + LB +\r\n ' customControl.addEventListener(\"click\", function(event){' + GETSENDEVENT + '(parseEvent(event, \"' + ACTIONCLICKEVENT + '\", this.id), this.selectedIndex);});' + LB +\r\n ' break;' + LB +\r\n ' }' + LB +\r\n ' break;' + LB +\r\n ' case 1:' + LB +\r\n ' switch (' + PARAMSNAME + '[\"Actions\"][i][\"EventReturnValue\"]){' + LB +\r\n ' case 0:' + LB +\r\n ' customControl.addEventListener(\"dblclick\", function(event){' + GETSENDEVENT + '(parseEvent(event, \"' + ACTIONDBLCLICKEVENT + '\", this.id), null);});' + LB +\r\n ' break;' + LB +\r\n ' case 1:' + LB +\r\n ' customControl.addEventListener(\"dblclick\", function(event){' + GETSENDEVENT + '(parseEvent(event, \"' + ACTIONDBLCLICKEVENT + '\", this.id), this.value);});' + LB +\r\n ' break;' + LB +\r\n ' case 2:' + LB +\r\n ' customControl.addEventListener(\"dblclick\", function(event){' + GETSENDEVENT + '(parseEvent(event, \"' + ACTIONDBLCLICKEVENT + '\", this.id), this.checked);});' + LB +\r\n ' break;' + LB +\r\n ' case 3:' + LB +\r\n ' customControl.addEventListener(\"dblclick\", function(event){' + GETSENDEVENT + '(parseEvent(event, \"' + ACTIONDBLCLICKEVENT + '\", this.id), this.innerHTML);});' + LB +\r\n ' break;' + LB +\r\n ' case 4:' + LB +\r\n ' customControl.addEventListener(\"dblclick\", function(event){' + GETSENDEVENT + '(parseEvent(event, \"' + ACTIONDBLCLICKEVENT + '\", this.id), this.innerText);});' + LB +\r\n ' break;' + LB +\r\n ' case 5:' + LB +\r\n ' customControl.addEventListener(\"dblclick\", function(event){' + GETSENDEVENT + '(parseEvent(event, \"' + ACTIONDBLCLICKEVENT + '\", this.id), this.selectedIndex);});' + LB +\r\n ' break;' + LB +\r\n ' }' + LB +\r\n ' break;' + LB +\r\n ' case 2:' + LB +\r\n ' switch (' + PARAMSNAME + '[\"Actions\"][i][\"EventReturnValue\"]){' + LB +\r\n ' case 0:' + LB +\r\n ' customControl.addEventListener(\"keypress\", function(event){' + GETSENDEVENT + '(parseEvent(event, \"' + ACTIONKEYPRESSEVENT + '\", this.id), null);});' + LB +\r\n ' break;' + LB +\r\n ' case 1:' + LB +\r\n ' customControl.addEventListener(\"keypress\", function(event){' + GETSENDEVENT + '(parseEvent(event, \"' + ACTIONKEYPRESSEVENT + '\", this.id), this.value);});' + LB +\r\n ' break;' + LB +\r\n ' case 2:' + LB +\r\n ' customControl.addEventListener(\"keypress\", function(event){' + GETSENDEVENT + '(parseEvent(event, \"' + ACTIONKEYPRESSEVENT + '\", this.id), this.checked);});' + LB +\r\n ' break;' + LB +\r\n ' case 3:' + LB +\r\n ' customControl.addEventListener(\"keypress\", function(event){' + GETSENDEVENT + '(parseEvent(event, \"' + ACTIONKEYPRESSEVENT + '\", this.id), this.innerHTML);});' + LB +\r\n ' break;' + LB +\r\n ' case 4:' + LB +\r\n ' customControl.addEventListener(\"keypress\", function(event){' + GETSENDEVENT + '(parseEvent(event, \"' + ACTIONKEYPRESSEVENT + '\", this.id), this.innerText);});' + LB +\r\n ' break;' + LB +\r\n ' case 5:' + LB +\r\n ' customControl.addEventListener(\"keypress\", function(event){' + GETSENDEVENT + '(parseEvent(event, \"' + ACTIONKEYPRESSEVENT + '\", this.id), this.selectedIndex);});' + LB +\r\n ' break;' + LB +\r\n ' }' + LB +\r\n ' break;' + LB +\r\n ' case 3:' + LB +\r\n ' switch (' + PARAMSNAME + '[\"Actions\"][i][\"EventReturnValue\"]){' + LB +\r\n ' case 0:' + LB +\r\n ' customControl.addEventListener(\"keydown\", function(event){' + GETSENDEVENT + '(parseEvent(event, \"' + ACTIONKEYDOWNEVENT + '\", this.id), null);});' + LB +\r\n ' break;' + LB +\r\n ' case 1:' + LB +\r\n ' customControl.addEventListener(\"keydown\", function(event){' + GETSENDEVENT + '(parseEvent(event, \"' + ACTIONKEYDOWNEVENT + '\", this.id), this.value);});' + LB +\r\n ' break;' + LB +\r\n ' case 2:' + LB +\r\n ' customControl.addEventListener(\"keydown\", function(event){' + GETSENDEVENT + '(parseEvent(event, \"' + ACTIONKEYDOWNEVENT + '\", this.id), this.checked);});' + LB +\r\n ' break;' + LB +\r\n ' case 3:' + LB +\r\n ' customControl.addEventListener(\"keydown\", function(event){' + GETSENDEVENT + '(parseEvent(event, \"' + ACTIONKEYDOWNEVENT + '\", this.id), this.innerHTML);});' + LB +\r\n ' break;' + LB +\r\n ' case 4:' + LB +\r\n ' customControl.addEventListener(\"keydown\", function(event){' + GETSENDEVENT + '(parseEvent(event, \"' + ACTIONKEYDOWNEVENT + '\", this.id), this.innerText);});' + LB +\r\n ' break;' + LB +\r\n ' case 5:' + LB +\r\n ' customControl.addEventListener(\"keydown\", function(event){' + GETSENDEVENT + '(parseEvent(event, \"' + ACTIONKEYDOWNEVENT + '\", this.id), this.selectedIndex);});' + LB +\r\n ' break;' + LB +\r\n ' }' + LB +\r\n ' break;' + LB +\r\n ' case 4:' + LB +\r\n ' switch (' + PARAMSNAME + '[\"Actions\"][i][\"EventReturnValue\"]){' + LB +\r\n ' case 0:' + LB +\r\n ' customControl.addEventListener(\"keyup\", function(event){' + GETSENDEVENT + '(parseEvent(event, \"' + ACTIONKEYUPEVENT + '\", this.id), null);});' + LB +\r\n ' break;' + LB +\r\n ' case 1:' + LB +\r\n ' customControl.addEventListener(\"keyup\", function(event){' + GETSENDEVENT + '(parseEvent(event, \"' + ACTIONKEYUPEVENT + '\", this.id), this.value);});' + LB +\r\n ' break;' + LB +\r\n ' case 2:' + LB +\r\n ' customControl.addEventListener(\"keyup\", function(event){' + GETSENDEVENT + '(parseEvent(event, \"' + ACTIONKEYUPEVENT + '\", this.id), this.checked);});' + LB +\r\n ' break;' + LB +\r\n ' case 3:' + LB +\r\n ' customControl.addEventListener(\"keyup\", function(event){' + GETSENDEVENT + '(parseEvent(event, \"' + ACTIONKEYUPEVENT + '\", this.id), this.innerHTML);});' + LB +\r\n ' break;' + LB +\r\n ' case 4:' + LB +\r\n ' customControl.addEventListener(\"keyup\", function(event){' + GETSENDEVENT + '(parseEvent(event, \"' + ACTIONKEYUPEVENT + '\", this.id), this.innerText);});' + LB +\r\n ' break;' + LB +\r\n ' case 5:' + LB +\r\n ' customControl.addEventListener(\"keyup\", function(event){' + GETSENDEVENT + '(parseEvent(event, \"' + ACTIONKEYUPEVENT + '\", this.id), this.selectedIndex);});' + LB +\r\n ' break;' + LB +\r\n ' }' + LB +\r\n ' break;' + LB +\r\n ' case 5:' + LB +\r\n ' switch (' + PARAMSNAME + '[\"Actions\"][i][\"EventReturnValue\"]){' + LB +\r\n ' case 0:' + LB +\r\n ' customControl.addEventListener(\"mousedown\", function(event){' + GETSENDEVENT + '(parseEvent(event, \"' + ACTIONMOUSEDOWNEVENT + '\", this.id), null);});' + LB +\r\n ' break;' + LB +\r\n ' case 1:' + LB +\r\n ' customControl.addEventListener(\"mousedown\", function(event){' + GETSENDEVENT + '(parseEvent(event, \"' + ACTIONMOUSEDOWNEVENT + '\", this.id), this.value);});' + LB +\r\n ' break;' + LB +\r\n ' case 2:' + LB +\r\n ' customControl.addEventListener(\"mousedown\", function(event){' + GETSENDEVENT + '(parseEvent(event, \"' + ACTIONMOUSEDOWNEVENT + '\", this.id), this.checked);});' + LB +\r\n ' break;' + LB +\r\n ' case 3:' + LB +\r\n ' customControl.addEventListener(\"mousedown\", function(event){' + GETSENDEVENT + '(parseEvent(event, \"' + ACTIONMOUSEDOWNEVENT + '\", this.id), this.innerHTML);});' + LB +\r\n ' break;' + LB +\r\n ' case 4:' + LB +\r\n ' customControl.addEventListener(\"mousedown\", function(event){' + GETSENDEVENT + '(parseEvent(event, \"' + ACTIONMOUSEDOWNEVENT + '\", this.id), this.innerText);});' + LB +\r\n ' break;' + LB +\r\n ' case 5:' + LB +\r\n ' customControl.addEventListener(\"mousedown\", function(event){' + GETSENDEVENT + '(parseEvent(event, \"' + ACTIONMOUSEDOWNEVENT + '\", this.id), this.selectedIndex);});' + LB +\r\n ' break;' + LB +\r\n ' }' + LB +\r\n ' break;' + LB +\r\n ' case 6:' + LB +\r\n ' switch (' + PARAMSNAME + '[\"Actions\"][i][\"EventReturnValue\"]){' + LB +\r\n ' case 0:' + LB +\r\n ' customControl.addEventListener(\"mousemove\", function(event){' + GETSENDEVENT + '(parseEvent(event, \"' + ACTIONMOUSEMOVEEVENT + '\", this.id), null);});' + LB +\r\n ' break;' + LB +\r\n ' case 1:' + LB +\r\n ' customControl.addEventListener(\"mousemove\", function(event){' + GETSENDEVENT + '(parseEvent(event, \"' + ACTIONMOUSEMOVEEVENT + '\", this.id), this.value);});' + LB +\r\n ' break;' + LB +\r\n ' case 2:' + LB +\r\n ' customControl.addEventListener(\"mousemove\", function(event){' + GETSENDEVENT + '(parseEvent(event, \"' + ACTIONMOUSEMOVEEVENT + '\", this.id), this.checked);});' + LB +\r\n ' break;' + LB +\r\n ' case 3:' + LB +\r\n ' customControl.addEventListener(\"mousemove\", function(event){' + GETSENDEVENT + '(parseEvent(event, \"' + ACTIONMOUSEMOVEEVENT + '\", this.id), this.innerHTML);});' + LB +\r\n ' break;' + LB +\r\n ' case 4:' + LB +\r\n ' customControl.addEventListener(\"mousemove\", function(event){' + GETSENDEVENT + '(parseEvent(event, \"' + ACTIONMOUSEMOVEEVENT + '\", this.id), this.innerText);});' + LB +\r\n ' break;' + LB +\r\n ' case 5:' + LB +\r\n ' customControl.addEventListener(\"mousemove\", function(event){' + GETSENDEVENT + '(parseEvent(event, \"' + ACTIONMOUSEMOVEEVENT + '\", this.id), this.selectedIndex);});' + LB +\r\n ' break;' + LB +\r\n ' }' + LB +\r\n ' break;' + LB +\r\n ' case 7:' + LB +\r\n ' switch (' + PARAMSNAME + '[\"Actions\"][i][\"EventReturnValue\"]){' + LB +\r\n ' case 0:' + LB +\r\n ' customControl.addEventListener(\"mouseup\", function(event){' + GETSENDEVENT + '(parseEvent(event, \"' + ACTIONMOUSEUPEVENT + '\", this.id), null);});' + LB +\r\n ' break;' + LB +\r\n ' case 1:' + LB +\r\n ' customControl.addEventListener(\"mouseup\", function(event){' + GETSENDEVENT + '(parseEvent(event, \"' + ACTIONMOUSEUPEVENT + '\", this.id), this.value);});' + LB +\r\n ' break;' + LB +\r\n ' case 2:' + LB +\r\n ' customControl.addEventListener(\"mouseup\", function(event){' + GETSENDEVENT + '(parseEvent(event, \"' + ACTIONMOUSEUPEVENT + '\", this.id), this.checked);});' + LB +\r\n ' break;' + LB +\r\n ' case 3:' + LB +\r\n ' customControl.addEventListener(\"mouseup\", function(event){' + GETSENDEVENT + '(parseEvent(event, \"' + ACTIONMOUSEUPEVENT + '\", this.id), this.innerHTML);});' + LB +\r\n ' break;' + LB +\r\n ' case 4:' + LB +\r\n ' customControl.addEventListener(\"mouseup\", function(event){' + GETSENDEVENT + '(parseEvent(event, \"' + ACTIONMOUSEUPEVENT + '\", this.id), this.innerText);});' + LB +\r\n ' break;' + LB +\r\n ' case 5:' + LB +\r\n ' customControl.addEventListener(\"mouseup\", function(event){' + GETSENDEVENT + '(parseEvent(event, \"' + ACTIONMOUSEUPEVENT + '\", this.id), this.selectedIndex);});' + LB +\r\n ' break;' + LB +\r\n ' }' + LB +\r\n ' break;' + LB +\r\n ' case 8:' + LB +\r\n ' switch (' + PARAMSNAME + '[\"Actions\"][i][\"EventReturnValue\"]){' + LB +\r\n ' case 0:' + LB +\r\n ' customControl.addEventListener(\"mouseenter\", function(event){' + GETSENDEVENT + '(parseEvent(event, \"' + ACTIONMOUSEENTEREVENT + '\", this.id), null);});' + LB +\r\n ' break;' + LB +\r\n ' case 1:' + LB +\r\n ' customControl.addEventListener(\"mouseenter\", function(event){' + GETSENDEVENT + '(parseEvent(event, \"' + ACTIONMOUSEENTEREVENT + '\", this.id), this.value);});' + LB +\r\n ' break;' + LB +\r\n ' case 2:' + LB +\r\n ' customControl.addEventListener(\"mouseenter\", function(event){' + GETSENDEVENT + '(parseEvent(event, \"' + ACTIONMOUSEENTEREVENT + '\", this.id), this.checked);});' + LB +\r\n ' break;' + LB +\r\n ' case 3:' + LB +\r\n ' customControl.addEventListener(\"mouseenter\", function(event){' + GETSENDEVENT + '(parseEvent(event, \"' + ACTIONMOUSEENTEREVENT + '\", this.id), this.innerHTML);});' + LB +\r\n ' break;' + LB +\r\n ' case 4:' + LB +\r\n ' customControl.addEventListener(\"mouseenter\", function(event){' + GETSENDEVENT + '(parseEvent(event, \"' + ACTIONMOUSEENTEREVENT + '\", this.id), this.innerText);});' + LB +\r\n ' break;' + LB +\r\n ' case 5:' + LB +\r\n ' customControl.addEventListener(\"mouseenter\", function(event){' + GETSENDEVENT + '(parseEvent(event, \"' + ACTIONMOUSEENTEREVENT + '\", this.id), this.selectedIndex);});' + LB +\r\n ' break;' + LB +\r\n ' }' + LB +\r\n ' break;' + LB +\r\n ' case 9:' + LB +\r\n ' switch (' + PARAMSNAME + '[\"Actions\"][i][\"EventReturnValue\"]){' + LB +\r\n ' case 0:' + LB +\r\n ' customControl.addEventListener(\"mouseleave\", function(event){' + GETSENDEVENT + '(parseEvent(event, \"' + ACTIONMOUSELEAVEEVENT + '\", this.id), null);});' + LB +\r\n ' break;' + LB +\r\n ' case 1:' + LB +\r\n ' customControl.addEventListener(\"mouseleave\", function(event){' + GETSENDEVENT + '(parseEvent(event, \"' + ACTIONMOUSELEAVEEVENT + '\", this.id), this.value);});' + LB +\r\n ' break;' + LB +\r\n ' case 2:' + LB +\r\n ' customControl.addEventListener(\"mouseleave\", function(event){' + GETSENDEVENT + '(parseEvent(event, \"' + ACTIONMOUSELEAVEEVENT + '\", this.id), this.checked);});' + LB +\r\n ' break;' + LB +\r\n ' case 3:' + LB +\r\n ' customControl.addEventListener(\"mouseleave\", function(event){' + GETSENDEVENT + '(parseEvent(event, \"' + ACTIONMOUSELEAVEEVENT + '\", this.id), this.innerHTML);});' + LB +\r\n ' break;' + LB +\r\n ' case 4:' + LB +\r\n ' customControl.addEventListener(\"mouseleave\", function(event){' + GETSENDEVENT + '(parseEvent(event, \"' + ACTIONMOUSELEAVEEVENT + '\", this.id), this.innerText);});' + LB +\r\n ' break;' + LB +\r\n ' case 5:' + LB +\r\n ' customControl.addEventListener(\"mouseleave\", function(event){' + GETSENDEVENT + '(parseEvent(event, \"' + ACTIONMOUSELEAVEEVENT + '\", this.id), this.selectedIndex);});' + LB +\r\n ' break;' + LB +\r\n ' }' + LB +\r\n ' break;' + LB +\r\n ' case 10:' + LB +\r\n ' switch (' + PARAMSNAME + '[\"Actions\"][i][\"EventReturnValue\"]){' + LB +\r\n ' case 0:' + LB +\r\n ' customControl.addEventListener(\"blur\", function(event){' + GETSENDEVENT + '(parseEvent(event, \"' + ACTIONBLUREVENT + '\", this.id), null);});' + LB +\r\n ' break;' + LB +\r\n ' case 1:' + LB +\r\n ' customControl.addEventListener(\"blur\", function(event){' + GETSENDEVENT + '(parseEvent(event, \"' + ACTIONBLUREVENT + '\", this.id), this.value);});' + LB +\r\n ' break;' + LB +\r\n ' case 2:' + LB +\r\n ' customControl.addEventListener(\"blur\", function(event){' + GETSENDEVENT + '(parseEvent(event, \"' + ACTIONBLUREVENT + '\", this.id), this.checked);});' + LB +\r\n ' break;' + LB +\r\n ' case 3:' + LB +\r\n ' customControl.addEventListener(\"blur\", function(event){' + GETSENDEVENT + '(parseEvent(event, \"' + ACTIONBLUREVENT + '\", this.id), this.innerHTML);});' + LB +\r\n ' break;' + LB +\r\n ' case 4:' + LB +\r\n ' customControl.addEventListener(\"blur\", function(event){' + GETSENDEVENT + '(parseEvent(event, \"' + ACTIONBLUREVENT + '\", this.id), this.innerText);});' + LB +\r\n ' break;' + LB +\r\n ' case 5:' + LB +\r\n ' customControl.addEventListener(\"blur\", function(event){' + GETSENDEVENT + '(parseEvent(event, \"' + ACTIONBLUREVENT + '\", this.id), this.selectedIndex);});' + LB +\r\n ' break;' + LB +\r\n ' }' + LB +\r\n ' break;' + LB +\r\n ' case 11:' + LB +\r\n ' switch (' + PARAMSNAME + '[\"Actions\"][i][\"EventReturnValue\"]){' + LB +\r\n ' case 0:' + LB +\r\n ' customControl.addEventListener(\"focus\", function(event){' + GETSENDEVENT + '(parseEvent(event, \"' + ACTIONFOCUSEVENT + '\", this.id), null);});' + LB +\r\n ' break;' + LB +\r\n ' case 1:' + LB +\r\n ' customControl.addEventListener(\"focus\", function(event){' + GETSENDEVENT + '(parseEvent(event, \"' + ACTIONFOCUSEVENT + '\", this.id), this.value);});' + LB +\r\n ' break;' + LB +\r\n ' case 2:' + LB +\r\n ' customControl.addEventListener(\"focus\", function(event){' + GETSENDEVENT + '(parseEvent(event, \"' + ACTIONFOCUSEVENT + '\", this.id), this.checked);});' + LB +\r\n ' break;' + LB +\r\n ' case 3:' + LB +\r\n ' customControl.addEventListener(\"focus\", function(event){' + GETSENDEVENT + '(parseEvent(event, \"' + ACTIONFOCUSEVENT + '\", this.id), this.innerHTML);});' + LB +\r\n ' break;' + LB +\r\n ' case 4:' + LB +\r\n ' customControl.addEventListener(\"focus\", function(event){' + GETSENDEVENT + '(parseEvent(event, \"' + ACTIONFOCUSEVENT + '\", this.id), this.innerText);});' + LB +\r\n ' break;' + LB +\r\n ' case 5:' + LB +\r\n ' customControl.addEventListener(\"focus\", function(event){' + GETSENDEVENT + '(parseEvent(event, \"' + ACTIONFOCUSEVENT + '\", this.id), this.selectedIndex);});' + LB +\r\n ' break;' + LB +\r\n ' }' + LB +\r\n ' break;' + LB +\r\n ' case 12:' + LB +\r\n ' switch (' + PARAMSNAME + '[\"Actions\"][i][\"EventReturnValue\"]){' + LB +\r\n ' case 0:' + LB +\r\n ' customControl.addEventListener(\"change\", function(event){' + GETSENDEVENT + '(parseEvent(event, \"' + ACTIONCHANGEEVENT + '\", this.id), null);});' + LB +\r\n ' break;' + LB +\r\n ' case 1:' + LB +\r\n ' customControl.addEventListener(\"change\", function(event){' + GETSENDEVENT + '(parseEvent(event, \"' + ACTIONCHANGEEVENT + '\", this.id), this.value);});' + LB +\r\n ' break;' + LB +\r\n ' case 2:' + LB +\r\n ' customControl.addEventListener(\"change\", function(event){' + GETSENDEVENT + '(parseEvent(event, \"' + ACTIONCHANGEEVENT + '\", this.id), this.checked);});' + LB +\r\n ' break;' + LB +\r\n ' case 3:' + LB +\r\n ' customControl.addEventListener(\"change\", function(event){' + GETSENDEVENT + '(parseEvent(event, \"' + ACTIONCHANGEEVENT + '\", this.id), this.innerHTML);});' + LB +\r\n ' break;' + LB +\r\n ' case 4:' + LB +\r\n ' customControl.addEventListener(\"change\", function(event){' + GETSENDEVENT + '(parseEvent(event, \"' + ACTIONCHANGEEVENT + '\", this.id), this.innerText);});' + LB +\r\n ' break;' + LB +\r\n ' case 5:' + LB +\r\n ' customControl.addEventListener(\"change\", function(event){' + GETSENDEVENT + '(parseEvent(event, \"' + ACTIONCHANGEEVENT + '\", this.id), this.selectedIndex);});' + LB +\r\n ' break;' + LB +\r\n ' }' + LB +\r\n ' break;' + LB +\r\n ' case 13:' + LB +\r\n ' switch (' + PARAMSNAME + '[\"Actions\"][i][\"EventReturnValue\"]){' + LB +\r\n ' case 0:' + LB +\r\n ' customControl.addEventListener(\"select\", function(event){' + GETSENDEVENT + '(parseEvent(event, \"' + ACTIONSELECTEVENT + '\", this.id), null);});' + LB +\r\n ' break;' + LB +\r\n ' case 1:' + LB +\r\n ' customControl.addEventListener(\"select\", function(event){' + GETSENDEVENT + '(parseEvent(event, \"' + ACTIONSELECTEVENT + '\", this.id), this.value);});' + LB +\r\n ' break;' + LB +\r\n ' case 2:' + LB +\r\n ' customControl.addEventListener(\"select\", function(event){' + GETSENDEVENT + '(parseEvent(event, \"' + ACTIONSELECTEVENT + '\", this.id), this.checked);});' + LB +\r\n ' break;' + LB +\r\n ' case 3:' + LB +\r\n ' customControl.addEventListener(\"select\", function(event){' + GETSENDEVENT + '(parseEvent(event, \"' + ACTIONSELECTEVENT + '\", this.id), this.innerHTML);});' + LB +\r\n ' break;' + LB +\r\n ' case 4:' + LB +\r\n ' customControl.addEventListener(\"select\", function(event){' + GETSENDEVENT + '(parseEvent(event, \"' + ACTIONSELECTEVENT + '\", this.id), this.innerText);});' + LB +\r\n ' break;' + LB +\r\n ' case 5:' + LB +\r\n ' customControl.addEventListener(\"select\", function(event){' + GETSENDEVENT + '(parseEvent(event, \"' + ACTIONSELECTEVENT + '\", this.id), this.selectedIndex);});' + LB +\r\n ' break;' + LB +\r\n ' }' + LB +\r\n ' break;' + LB +\r\n ' case 14:' + LB +\r\n ' switch (' + PARAMSNAME + '[\"Actions\"][i][\"EventReturnValue\"]){' + LB +\r\n ' case 0:' + LB +\r\n ' customControl.addEventListener(' + PARAMSNAME + '[\"Actions\"][i][\"CustomEvent\"], function(event){' + GETSENDEVENT + '(parseEvent(event, \"' + ACTIONCUSTOMEVENT + '\", this.id), null);});' + LB +\r\n ' break;' + LB +\r\n ' case 1:' + LB +\r\n ' customControl.addEventListener(' + PARAMSNAME + '[\"Actions\"][i][\"CustomEvent\"], function(event){' + GETSENDEVENT + '(parseEvent(event, \"' + ACTIONCUSTOMEVENT + '\", this.id), this.value);});' + LB +\r\n ' break;' + LB +\r\n ' case 2:' + LB +\r\n ' customControl.addEventListener(' + PARAMSNAME + '[\"Actions\"][i][\"CustomEvent\"], function(event){' + GETSENDEVENT + '(parseEvent(event, \"' + ACTIONCUSTOMEVENT + '\", this.id), this.checked);});' + LB +\r\n ' break;' + LB +\r\n ' case 3:' + LB +\r\n ' customControl.addEventListener(' + PARAMSNAME + '[\"Actions\"][i][\"CustomEvent\"], function(event){' + GETSENDEVENT + '(parseEvent(event, \"' + ACTIONCUSTOMEVENT + '\", this.id), this.innerHTML);});' + LB +\r\n ' break;' + LB +\r\n ' case 4:' + LB +\r\n ' customControl.addEventListener(' + PARAMSNAME + '[\"Actions\"][i][\"CustomEvent\"], function(event){' + GETSENDEVENT + '(parseEvent(event, \"' + ACTIONCUSTOMEVENT + '\", this.id), this.innerText);});' + LB +\r\n ' break;' + LB +\r\n ' case 5:' + LB +\r\n ' customControl.addEventListener(' + PARAMSNAME + '[\"Actions\"][i][\"CustomEvent\"], function(event){' + GETSENDEVENT + '(parseEvent(event, \"' + ACTIONCUSTOMEVENT + '\", this.id), this.selectedIndex);});' + LB +\r\n ' break;' + LB +\r\n ' }' + LB +\r\n ' break;' + LB +\r\n ' }' + LB +\r\n ' }' + LB +\r\n ' }' + LB +\r\n ' }' + LB;\r\n\r\n Result := Result +\r\n ' if (' + ELEMENTCONTAINERVAR + '){' + LB +\r\n ' ' + ELEMENTCONTAINERARRAYVAR + '[' + PARAMSNAME + '[\"ID\"]] = ' + ELEMENTCONTAINERVAR + ';' + LB +\r\n ' }' + LB +\r\n\r\n TryCatchEnd('TMS FNC Maps ElementContainer error') +\r\n '}';\r\nend;\r\n\r\nfunction TTMSFNCCustomMaps.GetDeleteElementContainerFunction: string;\r\nbegin\r\n Result := '';\r\n if not Assigned(FMaps) then\r\n Exit;\r\n\r\n Result :=\r\n 'function ' + DELETEELEMENTCONTAINERFUNCTION + '(' + PARAMSNAME + '){' + LB +\r\n TryCatchStart +\r\n ' var ' + ELEMENTCONTAINERVAR + ' = ' + ELEMENTCONTAINERARRAYVAR + '[' + PARAMSNAME + '[\"ID\"]];' + LB +\r\n ' if (' + ELEMENTCONTAINERVAR + '){' + LB +\r\n {$IFDEF WEBLIB}\r\n ' ' + ElementID + '.removeChild(' + ELEMENTCONTAINERVAR + '[0]);' + LB +\r\n {$ELSE}\r\n ' document.body.removeChild(' + ELEMENTCONTAINERVAR + '[0]);' + LB +\r\n {$ENDIF}\r\n ' document.head.removeChild(' + ELEMENTCONTAINERVAR + '[1]);' + LB +\r\n ' document.head.removeChild(' + ELEMENTCONTAINERVAR + '[2]);' + LB +\r\n ' delete ' + ELEMENTCONTAINERARRAYVAR + '[' + PARAMSNAME + '[\"ID\"]];' + LB +\r\n ' ' + ELEMENTCONTAINERVAR + ' = null;' + LB +\r\n ' }' + LB +\r\n TryCatchEnd('TMS FNC Maps ElementContainer error') +\r\n '}';\r\nend;\r\n\r\nfunction TTMSFNCCustomMaps.GetAddOrUpdateMarkerFunction: string;\r\nvar\r\n m: string;\r\nbegin\r\n Result := '';\r\n if not Assigned(FMaps) then\r\n Exit;\r\n\r\n m := '';\r\n DoCustomizeMarker(m);\r\n\r\n Result :=\r\n 'function ' + ADDORUPDATEMARKERFUNCTION + '(' + PARAMSNAME + '){' + LB +\r\n TryCatchStart +\r\n ' var ' + MARKERVAR + ' = ' + MARKERARRAYVAR + '[' + PARAMSNAME + '[\"ID\"]];' + LB +\r\n ' if (' + MARKERVAR + '){' + LB +\r\n ' }' +\r\n FMaps.GetAddOrUpdateMarker + LB + LB;\r\n\r\n if m <> '' then\r\n Result := Result + m + LB + LB;\r\n\r\n Result := Result +\r\n ' if (' + MARKERVAR + '){' + LB +\r\n ' ' + MARKERARRAYVAR + '[' + PARAMSNAME + '[\"ID\"]] = ' + MARKERVAR + ';' + LB +\r\n ' }' + LB +\r\n TryCatchEnd('TMS FNC Maps Marker error') +\r\n '}';\r\nend;\r\n\r\nfunction TTMSFNCCustomMaps.GetClosePopupFunction: string;\r\nbegin\r\n Result := '';\r\n if not Assigned(FMaps) then\r\n Exit;\r\n\r\n Result :=\r\n 'function ' + CLOSEPOPUPFUNCTION + '(' + PARAMSNAME + '){' + LB +\r\n TryCatchStart +\r\n ' var ' + POPUPVAR + ' = ' + POPUPARRAYVAR + '[' + PARAMSNAME + '[\"ID\"]];' + LB +\r\n FMaps.GetClosePopup + LB + LB +\r\n ' if (' + POPUPVAR + '){' + LB +\r\n ' delete ' + POPUPARRAYVAR + '[' + PARAMSNAME + '[\"ID\"]];' + LB +\r\n ' ' + POPUPVAR + ' = null;' + LB +\r\n ' }' + LB +\r\n TryCatchEnd('TMS FNC Maps close Popup error') +\r\n '}';\r\nend;\r\n\r\nfunction TTMSFNCCustomMaps.GetShowPopupFunction: string;\r\nvar\r\n m: string;\r\nbegin\r\n Result := '';\r\n if not Assigned(FMaps) then\r\n Exit;\r\n\r\n m := '';\r\n DoCustomizePopup(m);\r\n\r\n Result :=\r\n 'function ' + SHOWPOPUPFUNCTION + '(' + PARAMSNAME + '){' + LB +\r\n TryCatchStart +\r\n ' var ' + POPUPVAR + ' = ' + POPUPARRAYVAR + '[' + PARAMSNAME + '[\"ID\"]];' + LB +\r\n FMaps.GetShowPopup + LB + LB;\r\n\r\n if m <> '' then\r\n Result := Result + m + LB + LB;\r\n\r\n Result := Result +\r\n ' if (' + POPUPVAR + '){' + LB +\r\n ' ' + POPUPARRAYVAR + '[' + PARAMSNAME + '[\"ID\"]] = ' + POPUPVAR + ';' + LB +\r\n ' }' + LB +\r\n TryCatchEnd('TMS FNC Maps show Popup error') +\r\n '}';\r\nend;\r\n\r\nfunction TTMSFNCCustomMaps.GetUpdateOptions: string;\r\nvar\r\n m, cm: string;\r\nbegin\r\n Result := '';\r\n if not Assigned(FMaps) then\r\n Exit;\r\n\r\n m := '';\r\n DoCustomizeOptions(m);\r\n\r\n Result :=\r\n 'function ' + UPDATEOPTIONSFUNCTION + '(' + PARAMSNAME + '){' + LB +\r\n TryCatchStart;\r\n\r\n if m <> '' then\r\n Result := Result + m + LB + LB;\r\n\r\n cm := GetCustomOptions;\r\n if cm <> '' then\r\n Result := Result + cm + LB + LB;\r\n\r\n Result := Result +\r\n FMaps.GetUpdateOptions + LB +\r\n TryCatchEnd('TMS FNC Maps update Options error') +\r\n '}';\r\nend;\r\n\r\nprocedure TTMSFNCCustomMaps.GetZoomLevel;\r\nbegin\r\n if MapInitialized and MapReady then\r\n ExecuteJavaScript(GETZOOMLEVELFUNCTION + '()', {$IFDEF LCLWEBLIB}@{$ENDIF}DoGetZoomLevel);\r\nend;\r\n\r\nfunction TTMSFNCCustomMaps.GetZoomOnDblClick: Boolean;\r\nbegin\r\n Result := Options.ZoomOnDblClick;\r\nend;\r\n\r\nfunction TTMSFNCCustomMaps.GetZoomOnWheelScroll: Boolean;\r\nbegin\r\n Result := Options.ZoomOnWheelScroll;\r\nend;\r\n\r\nfunction TTMSFNCCustomMaps.GetZoomToBoundsFunction: string;\r\nbegin\r\n Result := '';\r\n if not Assigned(FMaps) then\r\n Exit;\r\n\r\n Result :=\r\n 'function ' + ZOOMTOBOUNDSFUNCTION + '(' + PARAMSNAME + '){' + LB +\r\n TryCatchStart +\r\n FMaps.GetZoomToBounds + LB +\r\n TryCatchEnd('TMS FNC Maps ZoomToBounds error') +\r\n '}';\r\nend;\r\n\r\nfunction TTMSFNCCustomMaps.GetSetCenterCoordinateFunction: string;\r\nbegin\r\n Result := '';\r\n if not Assigned(FMaps) then\r\n Exit;\r\n\r\n Result :=\r\n 'function ' + SETCENTERCOORDINATEFUNCTION + '(' + PARAMSNAME + '){' + LB +\r\n TryCatchStart +\r\n FMaps.GetSetCenterCoordinate + LB +\r\n TryCatchEnd('TMS FNC Maps SetCenterCoordinate error') +\r\n '}';\r\nend;\r\n\r\nfunction TTMSFNCCustomMaps.GetSetZoomLevelFunction: string;\r\nbegin\r\n Result := '';\r\n if not Assigned(FMaps) then\r\n Exit;\r\n\r\n Result :=\r\n 'function ' + SETZOOMLEVELFUNCTION + '(' + PARAMSNAME + '){' + LB +\r\n TryCatchStart +\r\n FMaps.GetSetZoomLevel + LB +\r\n TryCatchEnd('TMS FNC Maps SetZoomLevel error') +\r\n '}';\r\nend;\r\n\r\nfunction TTMSFNCCustomMaps.GetAddMarkers: string;\r\nvar\r\n I: Integer;\r\nbegin\r\n Result := '';\r\n for I := 0 to Markers.Count - 1 do\r\n Result := Result + ' ' + ADDORUPDATEMARKERFUNCTION + '(' + Markers[I].ToJSON + ');' + LB;\r\nend;\r\n\r\nfunction TTMSFNCCustomMaps.GetDeletePolyElementFunction: string;\r\nbegin\r\n Result := '';\r\n if not Assigned(FMaps) then\r\n Exit;\r\n\r\n Result :=\r\n 'function ' + DELETEPOLYELEMENTFUNCTION + '(' + PARAMSNAME + '){' + LB +\r\n TryCatchStart +\r\n ' var ' + POLYELEMENTVAR + ' = ' + POLYELEMENTARRAYVAR + '[' + PARAMSNAME + '[\"ID\"]];' + LB +\r\n FMaps.GetDeletePolyElement + LB + LB +\r\n ' if (' + POLYELEMENTVAR + '){' + LB +\r\n ' delete ' + POLYELEMENTARRAYVAR + '[' + PARAMSNAME + '[\"ID\"]];' + LB +\r\n ' ' + POLYELEMENTVAR + ' = null;' + LB +\r\n ' }' + LB +\r\n TryCatchEnd('TMS FNC Maps delete PolyElement error') +\r\n '}';\r\nend;\r\n\r\nfunction TTMSFNCCustomMaps.GetAddOrUpdatePolyElementFunction: string;\r\nvar\r\n p: string;\r\nbegin\r\n Result := '';\r\n if not Assigned(FMaps) then\r\n Exit;\r\n\r\n p := '';\r\n DoCustomizePolyElement(p);\r\n\r\n Result :=\r\n 'function ' + ADDORUPDATEPOLYELEMENTFUNCTION + '(' + PARAMSNAME + '){' + LB +\r\n TryCatchStart +\r\n ' var ' + POLYELEMENTVAR + ' = ' + POLYELEMENTARRAYVAR + '[' + PARAMSNAME + '[\"ID\"]];' + LB +\r\n FMaps.GetAddOrUpdatePolyElement + LB + LB;\r\n\r\n if p <> '' then\r\n Result := Result + p + LB + LB;\r\n\r\n Result := Result +\r\n ' if (' + POLYELEMENTVAR + '){' + LB +\r\n ' ' + POLYELEMENTARRAYVAR + '[' + PARAMSNAME + '[\"ID\"]] = ' + POLYELEMENTVAR + ';' + LB +\r\n ' }' + LB +\r\n TryCatchEnd('TMS FNC Maps PolyElement error') +\r\n '}';\r\nend;\r\n\r\nfunction TTMSFNCCustomMaps.InternalGetAddPolyElements(AElements: TTMSFNCMapsPolyElements): string;\r\nvar\r\n I, K, C: Integer;\r\n arr: TTMSFNCObjectExcludePropertyListArray;\r\nbegin\r\n Result := '';\r\n SetLength(arr, 1);\r\n arr[0] := 'Coordinates';\r\n\r\n for I := 0 to AElements.Count - 1 do\r\n begin\r\n Result := Result + INITIALIZECOORDINATEARRAY + '();' + LB;\r\n for C := 0 to AElements[I].Coordinates.Count - 1 do\r\n Result := Result + ADDCOORDINATETOARRAY + '(' + AElements[I].Coordinates[C].ToJSON + ');' + LB;\r\n\r\n Result := Result + INITIALIZEHOLESARRAY + '();' + LB;\r\n for C := 0 to AElements[I].Holes.Count - 1 do\r\n begin\r\n for K := AElements[I].Holes[C].Coordinates.Count - 1 downto 0 do\r\n Result := Result + ADDHOLETOARRAY + '([\"' + AElements[I].Holes[C].ID + '\",' + AElements[I].Holes[C].Coordinates[K].ToJSON + ']);' + LB;\r\n end;\r\n\r\n Result := Result + ' ' + ADDORUPDATEPOLYELEMENTFUNCTION + '(' + AElements[I].ToJSON(arr) + ');' + LB;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCCustomMaps.GetAddPolyElements: string;\r\nvar\r\n apl, apg, apc, apr: string;\r\nbegin\r\n Result := '';\r\n apl := InternalGetAddPolyElements(Polygons);\r\n if apl <> '' then\r\n Result := Result + apl + LB;\r\n\r\n apr := InternalGetAddPolyElements(Rectangles);\r\n if apr <> '' then\r\n Result := Result + apr + LB;\r\n\r\n apc := InternalGetAddPolyElements(Circles);\r\n if apc <> '' then\r\n Result := Result + apc + LB;\r\n\r\n apg := InternalGetAddPolyElements(Polylines);\r\n if apg <> '' then\r\n Result := Result + apg + LB;\r\nend;\r\n\r\nfunction TTMSFNCCustomMaps.GetCallInitialize: string;\r\nbegin\r\n Result :=\r\n ' var jsonObj = getDefaultEventDataObject();' + LB +\r\n ' jsonObj[\"EventName\"] = \"Initialized\";' + LB +\r\n ' sendObjectMessage(JSON.stringify(jsonObj));';\r\nend;\r\n\r\nprocedure TTMSFNCCustomMaps.GetCenterCoordinate;\r\nbegin\r\n if MapInitialized and MapReady then\r\n ExecuteJavaScript(GETCENTERCOORDINATEFUNCTION + '()', {$IFDEF LCLWEBLIB}@{$ENDIF}DoGetCenterCoordinate);\r\nend;\r\n\r\nfunction TTMSFNCCustomMaps.GetGetCenterCoordinateFunction: string;\r\nbegin\r\n Result := '';\r\n if not Assigned(FMaps) then\r\n Exit;\r\n\r\n Result :=\r\n 'function ' + GETCENTERCOORDINATEFUNCTION + '(){' + LB +\r\n ' var jsonObj = getDefaultCoordinateObject();' + LB +\r\n FMaps.GetGetCenterCoordinate + LB +\r\n {$IFDEF NEEDSSTRINGIFY}\r\n ' return JSON.stringify(jsonObj);' + LB +\r\n {$ELSE}\r\n ' return jsonObj;' + LB +\r\n {$ENDIF}\r\n '}';\r\nend;\r\n\r\nfunction TTMSFNCCustomMaps.LatLonToXY(ALatitude: Double; ALongitude: Double): TTMSFNCMapsAnchorPointRec;\r\nbegin\r\n Result := LatLonToXY(CreateCoordinate(ALatitude, ALongitude));\r\nend;\r\n\r\nfunction TTMSFNCCustomMaps.LatLonToXY(\r\n ACoordinate: TTMSFNCMapsCoordinateRec): TTMSFNCMapsAnchorPointRec;\r\nvar\r\n b: TTMSFNCMapsCoordinate;\r\n p: TTMSFNCMapsAnchorPoint;\r\n s: String;\r\nbegin\r\n Result.X := 0;\r\n Result.Y := 0;\r\n if MapInitialized and MapReady then\r\n begin\r\n b := TTMSFNCMapsCoordinate.Create(ACoordinate.Latitude, ACoordinate.Longitude);\r\n p := TTMSFNCMapsAnchorPoint.Create;\r\n p.X := 0;\r\n p.Y := 0;\r\n try\r\n s := ExecuteJavaScriptSync(GETLATLONTOXYFUNCTION + '(' + b.ToJSON + ')');\r\n if (s <> '') and (s <> 'null') then\r\n begin\r\n p.json := s;\r\n Result.X := p.X;\r\n Result.Y := p.Y;\r\n end;\r\n finally\r\n b.Free;\r\n p.Free;\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCCustomMaps.GetGetLatLonToXYFunction: string;\r\nbegin\r\n Result := '';\r\n if not Assigned(FMaps) then\r\n Exit;\r\n\r\n Result :=\r\n 'function ' + GETLATLONTOXYFUNCTION + '(' + PARAMSNAME + '){' + LB +\r\n ' var jsonObj = getDefaultPointObject();' + LB +\r\n FMaps.GetLatLonToXY + LB +\r\n {$IFDEF NEEDSSTRINGIFY}\r\n ' return JSON.stringify(jsonObj);' + LB +\r\n {$ELSE}\r\n ' return jsonObj;' + LB +\r\n {$ENDIF}\r\n '}';\r\nend;\r\n\r\nfunction TTMSFNCCustomMaps.XYToCoordinate(AX,\r\n AY: Single): TTMSFNCMapsCoordinateRec;\r\nbegin\r\n Result := XYToLatLon(AX, AY);\r\nend;\r\n\r\nfunction TTMSFNCCustomMaps.XYToLatLon(AX: Single; AY: Single): TTMSFNCMapsCoordinateRec;\r\nvar\r\n b: TTMSFNCMapsAnchorPoint;\r\n c: TTMSFNCMapsCoordinate;\r\n s: String;\r\nbegin\r\n Result := DefaultCoordinate;\r\n if MapInitialized and MapReady then\r\n begin\r\n c := TTMSFNCMapsCoordinate.Create;\r\n b := TTMSFNCMapsAnchorPoint.Create;\r\n b.X := AX;\r\n b.Y := AY;\r\n try\r\n s := ExecuteJavaScriptSync(GETXYTOLATLONFUNCTION + '(' + b.ToJSON + ')');\r\n if (s <> '') and (s <> 'null') then\r\n begin\r\n c.JSON := s;\r\n Result.Latitude := c.Latitude;\r\n Result.Longitude := c.Longitude;\r\n end;\r\n finally\r\n b.Free;\r\n c.Free;\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCCustomMaps.GetGetXYToLatLonFunction: string;\r\nbegin\r\n Result := '';\r\n if not Assigned(FMaps) then\r\n Exit;\r\n\r\n Result :=\r\n 'function ' + GETXYTOLATLONFUNCTION + '(' + PARAMSNAME + '){' + LB +\r\n ' var jsonObj = getDefaultCoordinateObject();' + LB +\r\n FMaps.GetXYToLatLon + LB +\r\n {$IFDEF NEEDSSTRINGIFY}\r\n ' return JSON.stringify(jsonObj);' + LB +\r\n {$ELSE}\r\n ' return jsonObj;' + LB +\r\n {$ENDIF}\r\n '}';\r\nend;\r\n\r\nprocedure TTMSFNCCustomMaps.GetBounds;\r\nbegin\r\n if MapInitialized and MapReady then\r\n ExecuteJavaScript(GETBOUNDSFUNCTION + '()', {$IFDEF LCLWEBLIB}@{$ENDIF}DoGetBounds);\r\nend;\r\n\r\nfunction TTMSFNCCustomMaps.GetGetBoundsFunction: string;\r\nbegin\r\n Result := '';\r\n if not Assigned(FMaps) then\r\n Exit;\r\n\r\n Result :=\r\n 'function ' + GETBOUNDSFUNCTION + '(){' + LB +\r\n ' var jsonObj = getDefaultBoundsObject();' + LB +\r\n FMaps.GetGetBounds + LB +\r\n {$IFDEF NEEDSSTRINGIFY}\r\n ' return JSON.stringify(jsonObj);' + LB +\r\n {$ELSE}\r\n ' return jsonObj;' + LB +\r\n {$ENDIF}\r\n '}';\r\nend;\r\n\r\nfunction TTMSFNCCustomMaps.GetGetZoomLevelFunction: string;\r\nbegin\r\n Result := '';\r\n if not Assigned(FMaps) then\r\n Exit;\r\n\r\n Result :=\r\n 'function ' + GETZOOMLEVELFUNCTION + '(){' + LB +\r\n ' var z;' + LB +\r\n FMaps.GetGetZoomLevel + LB +\r\n ' return z;' + LB +\r\n '}';\r\nend;\r\n\r\nfunction TTMSFNCCustomMaps.GetGlobalVariables: string;\r\nvar\r\n m: string;\r\n o: string;\r\n c: string;\r\n b: string;\r\n ci: string;\r\n p: string;\r\n co: TTMSFNCMapsCoordinate;\r\n obj: TTMSFNCMapsEventData;\r\n bo: TTMSFNCMapsBounds;\r\n cir: TTMSFNCMapsCircle;\r\n po: TTMSFNCMapsBasePoint;\r\nbegin\r\n Result := '';\r\n if not Assigned(FMaps) then\r\n Exit;\r\n\r\n co := TTMSFNCMapsCoordinate.Create(0, 0);\r\n try\r\n c := co.JSON;\r\n finally\r\n co.Free;\r\n end;\r\n\r\n po := TTMSFNCMapsBasePoint.Create;\r\n try\r\n p := po.JSON;\r\n finally\r\n po.Free;\r\n end;\r\n\r\n obj := TTMSFNCMapsEventData.Create;\r\n try\r\n o := obj.JSON;\r\n finally\r\n obj.Free;\r\n end;\r\n\r\n bo := TTMSFNCMapsBounds.Create(CreateCoordinate(0 , 0), CreateCoordinate(0 , 0));\r\n try\r\n b := bo.JSON;\r\n finally\r\n bo.Free;\r\n end;\r\n\r\n cir := TTMSFNCMapsCircle.Create(nil);\r\n try\r\n ci := cir.JSON;\r\n finally\r\n cir.Free;\r\n end;\r\n\r\n m := '';\r\n DoCustomizeGlobalVariables(m);\r\n if m <> '' then\r\n Result := Result + m + LB;\r\n\r\n Result := Result + FMaps.GetGlobalVariables + LB;\r\n\r\n Result := Result +\r\n\r\n {$IFDEF WEBLIB}\r\n 'var ' + MAPCOMPONENT + ' = null;' + LB +\r\n {$ENDIF}\r\n 'var ' + MAPBOUNDS + ';' + LB +\r\n 'var ' + MAPOPTIONS + ';' + LB +\r\n 'var ' + MAPVAR + ' = null;' + LB +\r\n 'var ' + MARKERARRAYVAR + ' = {};' + LB +\r\n 'var ' + ELEMENTCONTAINERARRAYVAR + ' = {};' + LB +\r\n 'var ' + POPUPARRAYVAR + ' = {};' + LB +\r\n 'var ' + POLYELEMENTARRAYVAR + ' = {};' + LB +\r\n 'var ' + COORDINATEARRAYVAR + ';' + LB +\r\n 'var ' + HOLEARRAYVAR + ' = {};' + LB +\r\n 'var MapCallBackFlag = false;' + LB + LB +\r\n\r\n 'function ' + CUSTOMDEFAULTMARKERICON + '(AOptions, AUrl){' + LB +\r\n ' if (AOptions[\"Enabled\"]) {' + LB +\r\n ' return \"data:image/svg+xml;charset=utf-8,' +\r\n '' +\r\n '' +\r\n '\";' + LB +\r\n ' } else {' + LB +\r\n ' return AUrl;' + LB +\r\n ' }' + LB +\r\n '}' + LB + LB +\r\n 'function ' + INITIALIZECOORDINATEARRAY + '(){' + LB +\r\n ' ' + COORDINATEARRAYVAR + ' = ' + FMaps.GetInitializeCoordinateArray + LB +\r\n '}' + LB + LB +\r\n 'function ' + INITIALIZEHOLESARRAY + '(){' + LB +\r\n ' ' + HOLEARRAYVAR + ' = ' + FMaps.GetInitializeHolesArray + LB +\r\n '}' + LB + LB +\r\n 'function ' + ADDCOORDINATETOARRAY + '(' + PARAMSNAME + '){' + LB +\r\n ' ' + FMaps.GetAddCoordinateToArray + LB +\r\n '}' + LB + LB +\r\n 'function ' + ADDHOLETOARRAY + '(' + PARAMSNAME + '){' + LB +\r\n ' ' + FMaps.GetAddHoleToArray + LB +\r\n '}' + LB + LB +\r\n 'function ' + ADDCOORDINATESTOARRAY + '(' + PARAMSNAME + '){' + LB +\r\n ' for (var i=0; i < ' + PARAMSNAME + '.length; i++){' + LB +\r\n ' ' + ADDCOORDINATETOARRAY + '({\"Latitude\": ' + PARAMSNAME + '[i][\"Latitude\"], \"Longitude\": ' + PARAMSNAME + '[i][\"Longitude\"]});' + LB +\r\n ' }' + LB +\r\n '}' + LB + LB +\r\n 'function ' + ADDHOLESTOARRAY + '(' + PARAMSNAME + '){' + LB +\r\n ' for (var i=' + PARAMSNAME + '[1].length - 1; i >= 0; i--){' + LB +\r\n ' ' + ADDHOLETOARRAY + '([' + PARAMSNAME + '[0]' + ', {\"Latitude\": ' + PARAMSNAME + '[1][i][\"Latitude\"], \"Longitude\": ' + PARAMSNAME + '[1][i][\"Longitude\"]}]);' + LB +\r\n ' }' + LB +\r\n '}' + LB + LB +\r\n\r\n {$IFDEF WEBLIB}\r\n 'function MapKeyDown(event){' + LB +\r\n ' var r = {''EventName'': ''MapKeyDown''};' + LB +\r\n ' ' + GETSENDEVENT + '(r, event.keyCode);' + LB +\r\n '}' + LB +\r\n {$ENDIF}\r\n 'function ResetMap(){' + LB +\r\n {$IFDEF WEBLIB}\r\n 'if (typeof ' + MAPID + ' !== \"undefined\") {' + LB +\r\n MAPID + '.removeEventListener(''keydown'', MapKeyDown)' + LB +\r\n ' }' + LB +\r\n {$ENDIF}\r\n FMaps.GetResetMap + LB +\r\n ' ' + MAPVAR + ' = null;' + LB +\r\n '}' + LB +\r\n 'function MapCallBack(){' + LB +\r\n ' MapCallBackFlag = true;' + LB +\r\n '}' + LB + LB +\r\n 'function ' + GETMARKERARRAYVAR + '{' + LB +\r\n ' var arr = [];' + LB +\r\n ' for (var key in ' + MARKERARRAYVAR + '){' + LB +\r\n ' var v = key;' + LB +\r\n ' arr.push(v);' + LB +\r\n ' }' + LB +\r\n ' return arr.toString();' + LB +\r\n '}' + LB + LB +\r\n 'function ' + GETELEMENTCONTAINERARRAYVAR + '{' + LB +\r\n ' var arr = [];' + LB +\r\n ' for (var key in ' + ELEMENTCONTAINERARRAYVAR + '){' + LB +\r\n ' var v = key;' + LB +\r\n ' arr.push(v);' + LB +\r\n ' }' + LB +\r\n ' return arr.toString();' + LB +\r\n '}' + LB + LB +\r\n 'function ' + GETPOPUPARRAYVAR + '{' + LB +\r\n ' var arr = [];' + LB +\r\n ' for (var key in ' + POPUPARRAYVAR + '){' + LB +\r\n ' var v = key;' + LB +\r\n ' arr.push(v);' + LB +\r\n ' }' + LB +\r\n ' return arr.toString();' + LB +\r\n '}' + LB + LB +\r\n 'function ' + GETPOLYELEMENTARRAYVAR + '{' + LB +\r\n ' var arr = [];' + LB +\r\n ' for (var key in ' + POLYELEMENTARRAYVAR + '){' + LB +\r\n ' var v = key;' + LB +\r\n ' arr.push(v);' + LB +\r\n ' }' + LB +\r\n ' return arr.toString();' + LB +\r\n '}' + LB + LB +\r\n 'function ' + GETFOCUSMAP + '(){' + LB +\r\n ' if (document.activeElement != ' + MAPID + '){' + LB +\r\n ' ' + MAPID + '.focus();' + LB +\r\n ' }' + LB +\r\n '}' + LB + LB +\r\n 'function ' + GETSENDEVENT + '(' + PARAMSNAME + ', customdata = undefined){' + LB +\r\n ' var jsonObj = getDefaultEventDataObject();' + LB +\r\n ' if (' + PARAMSNAME + '[\"ID\"]){' + LB +\r\n ' jsonObj[\"ID\"] = ' + PARAMSNAME + '[\"ID\"];' + LB +\r\n ' }' + LB +\r\n ' if (' + PARAMSNAME + '[\"X\"]){' + LB +\r\n ' jsonObj[\"X\"] = ' + PARAMSNAME + '[\"X\"];' + LB +\r\n ' }' + LB +\r\n ' if (' + PARAMSNAME + '[\"Y\"]){' + LB +\r\n ' jsonObj[\"Y\"] = ' + PARAMSNAME + '[\"Y\"];' + LB +\r\n ' }' + LB +\r\n ' if (' + PARAMSNAME + '[\"EventName\"]){' + LB +\r\n ' jsonObj[\"EventName\"] = ' + PARAMSNAME + '[\"EventName\"];' + LB +\r\n ' }' + LB +\r\n ' if (' + PARAMSNAME + '[\"Coordinate\"]){' + LB +\r\n ' jsonObj[\"Coordinate\"][\"Latitude\"] = ' + PARAMSNAME + '[\"Coordinate\"][\"Latitude\"];' + LB +\r\n ' jsonObj[\"Coordinate\"][\"Longitude\"] = ' + PARAMSNAME + '[\"Coordinate\"][\"Longitude\"];' + LB +\r\n ' }' + LB +\r\n ' var cd = undefined;' + LB +\r\n ' if (customdata) {' + LB +\r\n ' cd = encodeURIComponent(JSON.stringify(customdata));' + LB +\r\n ' }' + LB +\r\n ' sendObjectMessage(JSON.stringify(jsonObj), cd); ' + LB +\r\n '}' + LB + LB +\r\n 'function toRGBA(c, o){' + LB +\r\n ' c = c.replace(''#'','''');' + LB +\r\n ' r = parseInt(c.substring(0,2), 16);' + LB +\r\n ' g = parseInt(c.substring(2,4), 16);' + LB +\r\n ' b = parseInt(c.substring(4,6), 16);' + LB +\r\n\r\n ' result = ''rgba(''+r+'',''+g+'',''+b+'',''+o+'')'';' + LB +\r\n ' return result;' + LB +\r\n '}' + LB + LB +\r\n 'function getDefaultEventDataObject(){' + LB +\r\n ' return ' + o + LB +\r\n '}' + LB + LB +\r\n 'function getDefaultCoordinateObject(){' + LB +\r\n ' return ' + c + LB +\r\n '}' + LB + LB +\r\n 'function getDefaultPointObject(){' + LB +\r\n ' return ' + p + LB +\r\n '}' + LB + LB +\r\n 'function getDefaultBoundsObject(){' + LB +\r\n ' return ' + b + LB +\r\n '}' + LB + LB +\r\n 'function getDefaultCircleObject(){' + LB +\r\n ' return ' + ci + LB +\r\n '}' + LB + LB +\r\n 'function calculateCoordinate(ACoordinate, ABearing, ADistance, AReverse) {' + LB +\r\n ' var a = 0.0;' + LB +\r\n ' var ad = 0.0;' + LB +\r\n ' var r = 0.0;' + LB +\r\n ' var a1 = 0.0;' + LB +\r\n ' var sina2 = 0.0;' + LB +\r\n ' var a2 = 0.0;' + LB +\r\n ' var y = 0.0;' + LB +\r\n ' var x = 0.0;' + LB +\r\n ' var d1 = 0.0;' + LB +\r\n ' var d2 = 0.0;' + LB +\r\n ' r = 6371000;' + LB +\r\n ' a = ADistance / r;' + LB +\r\n ' ad = ABearing * (Math.PI / 180);' + LB +\r\n ' var lat1 = ACoordinate[\"Latitude\"];' + LB +\r\n ' var lng1 = ACoordinate[\"Longitude\"];' + LB +\r\n ' a1 = lat1 * (Math.PI / 180);' + LB +\r\n ' d1 = lng1 * (Math.PI / 180);' + LB +\r\n ' sina2 = (Math.sin(a1) * Math.cos(a)) + (Math.cos(a1) * Math.sin(a) * Math.cos(ad));' + LB +\r\n ' a2 = Math.asin(sina2);' + LB +\r\n ' y = Math.sin(ad) * Math.sin(a) * Math.cos(a1);' + LB +\r\n ' x = Math.cos(a) - (Math.sin(a1) * sina2);' + LB +\r\n ' d2 = d1 + Math.atan2(y,x);' + LB +\r\n ' var lat = a2 * (180 / Math.PI);' + LB +\r\n ' var lon = d2 * (180 / Math.PI);' + LB +\r\n ' if (AReverse == true) {' + LB +\r\n ' return [lon, lat];' + LB +\r\n ' }else{' + LB +\r\n ' return [lat, lon];' + LB +\r\n ' }' + LB +\r\n '};' + LB + LB +\r\n 'function createCircle(ACenter, ARadius, AReverse) {' + LB +\r\n ' var Result = [];' + LB +\r\n ' for (var I = 0; I <= 100; I++) {' + LB +\r\n ' Result.push(calculateCoordinate(ACenter, (I * -360) / 100, ARadius, AReverse));' + LB +\r\n ' };' + LB +\r\n ' return Result;' + LB +\r\n '};' + LB +\r\n 'function TMSFNCMaps_base64Decode(base64EncodedString) {' + LB +\r\n ' return new TextDecoder().decode(Uint8Array.from(atob(base64EncodedString), m => m.codePointAt(0)));' + LB +\r\n '}' + LB;\r\nend;\r\n\r\n{$IFDEF WEBLIB}\r\nprocedure TTMSFNCCustomMaps.ClearMethodPointers;\r\nbegin\r\n inherited;\r\n FMapEventData := nil;\r\nend;\r\n\r\nprocedure TTMSFNCCustomMaps.GetMethodPointers;\r\nbegin\r\n inherited;\r\n if FMapEventData = nil then\r\n FMapEventData := @HandleDoMapEventData;\r\nend;\r\n\r\nfunction TTMSFNCCustomMaps.HandleDoMapEventData(Event: TJSEvent): Boolean;\r\nvar\r\n s: string;\r\nbegin\r\n asm\r\n s = Event.detail;\r\n end;\r\n ParseEvent(s);\r\n Result := True;\r\nend;\r\n\r\nprocedure TTMSFNCCustomMaps.BindEvents;\r\nvar\r\n eh: TJSEventTarget;\r\nbegin\r\n if Assigned(ElementBindHandle) then\r\n begin\r\n GetMethodPointers;\r\n eh := ElementBindHandle;\r\n eh.addEventListener(MAPEVENTDATA, FMapEventData);\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomMaps.UnbindEvents;\r\nvar\r\n eh: TJSEventTarget;\r\nbegin\r\n if Assigned(ElementBindHandle) then\r\n begin\r\n eh := ElementBindHandle;\r\n eh.removeEventListener(MAPEVENTDATA, FMapEventData);\r\n end;\r\nend;\r\n{$ENDIF}\r\n\r\nfunction TTMSFNCCustomMaps.GetCommunicationLayer: string;\r\n function GetWindowsComm: string;\r\n begin\r\n if IsDesignTime then\r\n begin\r\n Result := 'window.location = v;';\r\n end\r\n else\r\n begin\r\n Result :=\r\n ' if (!window.chrome || !window.chrome.webview || !window.chrome.webview.hostObjects || !window.chrome.webview.hostObjects.sync) {' + LB +\r\n ' return;' + LB +\r\n ' }' + LB +\r\n ' var obj = window.chrome.webview.hostObjects.sync.bridge;' + LB +\r\n ' if (obj) {' + LB +\r\n ' obj.ObjectMessage = v;' + LB +\r\n ' }else{' + #13 +\r\n ' window.location = v;' + LB +\r\n ' }';\r\n end;\r\n end;\r\nbegin\r\n Result :=\r\n 'var sendObjectMessage = function(parameters, customdata = undefined) {' + LB +\r\n ' var v = \"' + EVENTDATAPREFIX + '\" + parameters;' + LB +\r\n ' if (customdata) {' + LB +\r\n ' v = v + \"' + CUSTOMDATAPREFIX + '\" + customdata;' + LB +\r\n ' }' + LB +\r\n {$IFDEF ANDROID}\r\n ' if (!injectedObject) {' + LB +\r\n ' return;' + LB +\r\n ' }' + LB +\r\n ' injectedObject.Setjsvalue(v); ' + LB +\r\n ' injectedObject.performClick();' + LB +\r\n {$ENDIF}\r\n {$IFDEF LINUX}\r\n ' if (!window.webkit || !window.webkit.messageHandlers || !window.webkit.messageHandlers.bridge) {' + LB +\r\n ' return;' + LB +\r\n ' }' + LB +\r\n ' window.webkit.messageHandlers.bridge.postMessage(v);' + LB +\r\n {$ENDIF}\r\n {$IFDEF MACOS}\r\n ' if (!window.webkit || !window.webkit.messageHandlers || !window.webkit.messageHandlers.bridge) {' + LB +\r\n ' return;' + LB +\r\n ' }' + LB +\r\n ' window.webkit.messageHandlers.bridge.postMessage(v);' + LB +\r\n {$ENDIF}\r\n {$IFDEF MSWINDOWS}\r\n GetWindowsComm + LB +\r\n {$ENDIF}\r\n {$IFNDEF LINUX}\r\n {$IFNDEF MSWINDOWS}\r\n {$IFNDEF MACOS}\r\n {$IFNDEF ANDROID}\r\n {$IFDEF WEBLIB}\r\n ' var event = new CustomEvent(\"' + MAPEVENTDATA +'\", {detail: v});' + LB +\r\n ' if (!' + MAPCOMPONENT + '){' + LB +\r\n ' ' + MAPCOMPONENT + ' = document.getElementById(\"' + ElementID + '\");' + LB +\r\n ' }' + LB +\r\n ' ' + MAPCOMPONENT + '.dispatchEvent(event);' + LB +\r\n {$ELSE}\r\n ' window.location = v;' + LB +\r\n {$ENDIF}\r\n {$ENDIF}\r\n {$ENDIF}\r\n {$ENDIF}\r\n {$ENDIF}\r\n '};';\r\nend;\r\n\r\nfunction TTMSFNCCustomMaps.CoordinateToXY(\r\n ACoordinate: TTMSFNCMapsCoordinateRec): TTMSFNCMapsAnchorPointRec;\r\nbegin\r\n Result := LatLonToXY(ACoordinate);\r\nend;\r\n\r\nfunction TTMSFNCCustomMaps.GetLabelsClass: TTMSFNCMapsLabelsClass;\r\nbegin\r\n Result := TTMSFNCMapsLabels;\r\nend;\r\n\r\nprocedure TTMSFNCCustomMaps.GetLinks(AList: TTMSFNCMapsLinksList; AIncludeContent: Boolean = True; ACheckReady: Boolean = True);\r\nvar\r\n acf, cf, s, a, m, cm, cmm, gv, am, em, apl,\r\n dl, c: string;\r\nbegin\r\n if ACheckReady and not MapReady then\r\n Exit;\r\n\r\n if AIncludeContent then\r\n begin\r\n s := s + GetGlobalVariables + LB + LB;\r\n\r\n gv := GetCustomGlobalVariables;\r\n if gv <> '' then\r\n s := s + gv + LB + LB;\r\n\r\n s := s + GetCommunicationLayer + LB + LB;\r\n\r\n cf := GetCustomFunctions;\r\n if cf <> '' then\r\n s := s + cf + LB + LB;\r\n\r\n s := s + GetShowPopupFunction + LB + LB;\r\n s := s + GetClosePopupFunction + LB + LB;\r\n\r\n s := s + GetAddOrUpdateMarkerFunction + LB + LB;\r\n s := s + GetDeleteMarkerFunction + LB + LB;\r\n\r\n s := s + GetAddOrUpdateElementContainerFunction + LB + LB;\r\n s := s + GetDeleteElementContainerFunction + LB + LB;\r\n\r\n s := s + GetAddOrUpdatePolyElementFunction + LB + LB;\r\n s := s + GetDeletePolyElementFunction + LB + LB;\r\n\r\n s := s + GetZoomToBoundsFunction + LB + LB;\r\n s := s + GetSetCenterCoordinateFunction + LB + LB;\r\n s := s + GetSetZoomLevelFunction + LB + LB;\r\n s := s + GetGetCenterCoordinateFunction + LB + LB;\r\n s := s + GetGetLatLonToXYFunction + LB + LB;\r\n s := s + GetGetXYToLatLonFunction + LB + LB;\r\n s := s + GetGetBoundsFunction + LB + LB;\r\n s := s + GetGetZoomLevelFunction + LB + LB;\r\n\r\n s := s + GetUpdateOptions + LB + LB;\r\n\r\n s := s + GetWaitForMapInitialized + LB + LB;\r\n\r\n //begin mapload\r\n s := s + 'async function ' + LOADMAPFUNC + '(){' + LB;\r\n\r\n s := s + TryCatchStart;\r\n\r\n m := FMaps.GetInitializeMap;\r\n\r\n if m <> '' then\r\n s := s + m + LB + LB;\r\n\r\n a := FMaps.GetInitializeEvents;\r\n {$IFDEF WEBLIB}\r\n a := a + LB + LB + MAPID + '.addEventListener(''keydown'', MapKeyDown);' + LB;\r\n {$ENDIF}\r\n\r\n if a <> '' then\r\n s := s + a + LB + LB;\r\n\r\n dl := FMaps.GetDelayLoadEvent;\r\n if dl <> '' then\r\n s := s + dl + LB + LB;\r\n\r\n cm := '';\r\n DoCustomizeMap(cm);\r\n if cm <> '' then\r\n s := s + cm + LB + LB;\r\n\r\n cmm := GetCustomMap;\r\n if cmm <> '' then\r\n s := s + cmm + LB + LB;\r\n\r\n am := GetAddMarkers;\r\n if am <> '' then\r\n s := s + am + LB;\r\n\r\n em := GetAddElementContainers;\r\n if em <> '' then\r\n s := s + em + LB;\r\n\r\n apl := GetAddPolyElements;\r\n if apl <> '' then\r\n s := s + apl + LB;\r\n\r\n acf := GetAddCustomObjects;\r\n if acf <> '' then\r\n s := s + acf + LB;\r\n\r\n s := s + GetCallInitialize + LB;\r\n\r\n if dl <> '' then\r\n s := s + '})' + LB;\r\n\r\n s:= s + TryCatchEnd('TMS FNC Maps initialization error');\r\n\r\n //end map load\r\n s := s + '}' + LB + LB;\r\n\r\n c := '';\r\n DoCustomizeJavaScript(c);\r\n\r\n if c <> '' then\r\n s := s + c + LB;\r\n end\r\n else\r\n s := 'Include';\r\n\r\n if s <> '' then\r\n begin\r\n AList.Add(TTMSFNCMapsLink.CreateScript('', 'text/javascript', '', s));\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCCustomMaps.RouteCalculatorCheck: Boolean;\r\nbegin\r\n if (Assigned(RouteCalculator) and (RouteCalculator.Active)\r\n and (Service in [msGoogleMaps, msOpenLayers, msHere, msMapBox, msTomTom, msBingMaps])) then\r\n Result := True\r\n else\r\n Result := False;\r\nend;\r\n\r\nprocedure TTMSFNCCustomMaps.DoCustomizeOptions(var ACustomizeOptions: string);\r\nbegin\r\n if Assigned(OnCustomizeOptions) then\r\n OnCustomizeOptions(Self, ACustomizeOptions);\r\nend;\r\n\r\nprocedure TTMSFNCCustomMaps.DoCustomizeMarker(var ACustomizeMarker: string);\r\nbegin\r\n if Assigned(OnCustomizeMarker) then\r\n OnCustomizeMarker(Self, ACustomizeMarker);\r\nend;\r\n\r\nprocedure TTMSFNCCustomMaps.DoCustomizePopup(var ACustomizePopup: string);\r\nbegin\r\n if Assigned(OnCustomizePopup) then\r\n OnCustomizePopup(Self, ACustomizePopup);\r\nend;\r\n\r\nprocedure TTMSFNCCustomMaps.DoGetCenterCoordinate(const AValue: string);\r\nvar\r\n c: TTMSFNCMapsCoordinate;\r\n v: string;\r\nbegin\r\n if AValue = 'null' then\r\n Exit;\r\n\r\n v := TTMSFNCUtils.URLDecode(AValue);\r\n c := TTMSFNCMapsCoordinate.Create;\r\n try\r\n c.JSON := v;\r\n if Assigned(OnGetCenterCoordinate) then\r\n OnGetCenterCoordinate(Self, c.ToRec);\r\n finally\r\n c.Free;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomMaps.DoGetBounds(const AValue: string);\r\nvar\r\n c: TTMSFNCMapsBounds;\r\n v: string;\r\nbegin\r\n if AValue = 'null' then\r\n Exit;\r\n\r\n v := TTMSFNCUtils.URLDecode(AValue);\r\n c := TTMSFNCMapsBounds.Create;\r\n try\r\n c.JSON := v;\r\n if Assigned(OnGetBounds) then\r\n OnGetBounds(Self, c.ToRec);\r\n finally\r\n c.Free;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomMaps.DoGetDefaultHTMLMessage(var AMessage: string);\r\nbegin\r\n if Assigned(OnGetDefaultHTMLMessage) then\r\n OnGetDefaultHTMLMessage(Self, AMessage);\r\nend;\r\n\r\nprocedure TTMSFNCCustomMaps.DoGetZoomLevel(const AValue: string);\r\nvar\r\n z: Double;\r\nbegin\r\n if AValue = 'null' then\r\n Exit;\r\n\r\n if TTMSFNCUtils.TryStrToFloatDot(AValue, z) then\r\n begin\r\n if Assigned(OnGetZoomLevel) then\r\n OnGetZoomLevel(Self, z);\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomMaps.DoKeyPressed(var Key: Word);\r\nvar\r\n ASegment: TTMSFNCRouteCalculatorSegment;\r\n CanDelete: Boolean;\r\nbegin\r\n if Key = KEY_DELETE then\r\n begin\r\n if RouteCalculatorCheck then\r\n begin\r\n CanDelete := True;\r\n\r\n if Assigned(RouteCalculatorSelectedMarker) then\r\n begin\r\n if Assigned(RouteCalculatorSelectedMarker.DataPointer) and (TObject(RouteCalculatorSelectedMarker.DataPointer) is TTMSFNCRouteCalculatorSegment) then\r\n begin\r\n ASegment := (TObject(RouteCalculatorSelectedMarker.DataPointer) as TTMSFNCRouteCalculatorSegment);\r\n if Assigned(ASegment) then\r\n begin\r\n DoRouteCalculatorBeforeDeleteMarker(CanDelete, RouteCalculatorSelectedMarker, ASegment);\r\n if CanDelete then\r\n begin\r\n RouteCalculatorDeleteMarker(RouteCalculatorSelectedMarker);\r\n DoRouteCalculatorAfterDeleteMarker;\r\n end;\r\n end;\r\n RouteCalculatorClearSelected;\r\n end;\r\n end\r\n else if Assigned(RouteCalculatorSelectedPolyline) then\r\n begin\r\n if Assigned(RouteCalculatorSelectedPolyline.DataPointer) and (TObject(RouteCalculatorSelectedPolyline.DataPointer) is TTMSFNCRouteCalculatorSegment) then\r\n begin\r\n ASegment := (TObject(RouteCalculatorSelectedPolyline.DataPointer) as TTMSFNCRouteCalculatorSegment);\r\n if Assigned(ASegment) then\r\n begin\r\n DoRouteCalculatorBeforeDeletePolyline(CanDelete, RouteCalculatorSelectedPolyline, ASegment);\r\n if CanDelete then\r\n begin\r\n RouteCalculatorDeletePolyline(RouteCalculatorSelectedPolyline);\r\n DoRouteCalculatorAfterDeletePolyline;\r\n end;\r\n end;\r\n RouteCalculatorClearSelected;\r\n end;\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCCustomMaps.GetAddCustomObjects: string;\r\nbegin\r\n Result := '';\r\nend;\r\n\r\nfunction TTMSFNCCustomMaps.GetAddElementContainers: string;\r\nvar\r\n I: Integer;\r\n arr: TTMSFNCObjectExcludePropertyListArray;\r\n c: TTMSFNCMapsElementContainers;\r\nbegin\r\n Result := '';\r\n SetLength(arr, 3);\r\n arr[0] := 'HTML';\r\n arr[1] := 'Script';\r\n arr[2] := 'Style';\r\n\r\n c := TTMSFNCMapsElementContainers.Create(nil);\r\n try\r\n c.Assign(ElementContainers);\r\n\r\n SyncLabels(c);\r\n\r\n for I := 0 to c.Count - 1 do\r\n begin\r\n Result := Result + ' ' + ADDORUPDATEELEMENTCONTAINERFUNCTION + '(' + c[I].ToJSON(arr) + ');' + LB;\r\n end;\r\n finally\r\n c.Free;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCCustomMaps.GetCustomOptions: string;\r\nbegin\r\n Result := '';\r\nend;\r\n\r\nfunction TTMSFNCCustomMaps.GetCustomMap: string;\r\nbegin\r\n Result := '';\r\nend;\r\n\r\nfunction TTMSFNCCustomMaps.GetCustomGlobalVariables: string;\r\nbegin\r\n Result := '';\r\nend;\r\n\r\nfunction TTMSFNCCustomMaps.GetCustomFunctions: string;\r\nbegin\r\n Result := '';\r\nend;\r\n\r\nfunction TTMSFNCCustomMaps.GetOptionsClass: TTMSFNCMapsOptionsClass;\r\nbegin\r\n Result := TTMSFNCMapsOptions;\r\nend;\r\n\r\n//procedure TTMSFNCCustomMaps.DoMapIdle(AEventData: TTMSFNCMapsEventData);\r\n//begin\r\n// if Assigned(OnMapIdle) then\r\n// OnMapIdle(Self, AEventData);\r\n//end;\r\n\r\nprocedure TTMSFNCCustomMaps.DoMapInitialized;\r\nbegin\r\n if Assigned(OnMapInitialized) then\r\n OnMapInitialized(Self);\r\nend;\r\n\r\nprocedure TTMSFNCCustomMaps.DoMapKeyDown(AEventData: TTMSFNCMapsEventData);\r\nvar\r\n key: Integer;\r\n k: Word;\r\nbegin\r\n key := 0;\r\n if TryStrToInt(AEventData.CustomData, key) then\r\n begin\r\n k := key;\r\n DoKeyPressed(k);\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomMaps.DoZoomChanged(AEventData: TTMSFNCMapsEventData);\r\nbegin\r\n if Assigned(OnZoomChanged) then\r\n OnZoomChanged(Self, AEventData);\r\nend;\r\n\r\nprocedure TTMSFNCCustomMaps.DoMapTypeChanged(AEventData: TTMSFNCMapsEventData);\r\nbegin\r\n if Assigned(OnMapTypeChanged) then\r\n OnMapTypeChanged(Self, AEventData);\r\nend;\r\n\r\nfunction TTMSFNCCustomMaps.GetRouteCalculatorSelectedWayPointMarker: string;\r\nbegin\r\n if RouteCalculatorCheck then\r\n begin\r\n if RouteCalculator.Options.Polyline.AddWayPointMarker = '' then\r\n Result := DEFAULTSELECTEDWAYPOINTMARKER\r\n else\r\n Result := RouteCalculator.Options.Polyline.SelectedWayPointMarker;\r\n end\r\n else\r\n Result := '';\r\nend;\r\n\r\nfunction TTMSFNCCustomMaps.GetRouteCalculatorStartMarker: string;\r\nbegin\r\n if RouteCalculatorCheck then\r\n begin\r\n if RouteCalculator.Options.Polyline.StartMarker = '' then\r\n Result := DEFAULTSTARTMARKER\r\n else\r\n Result := RouteCalculator.Options.Polyline.StartMarker;\r\n end\r\n else\r\n Result := '';\r\nend;\r\n\r\nfunction TTMSFNCCustomMaps.GetRouteCalculatorEndMarker: string;\r\nbegin\r\n if RouteCalculatorCheck then\r\n begin\r\n if RouteCalculator.Options.Polyline.EndMarker = '' then\r\n Result := DEFAULTENDMARKER\r\n else\r\n Result := RouteCalculator.Options.Polyline.EndMarker;\r\n end\r\n else\r\n Result := '';\r\nend;\r\n\r\nfunction TTMSFNCCustomMaps.GetRouteCalculatorWayPointMarker: string;\r\nbegin\r\n if RouteCalculatorCheck then\r\n begin\r\n if RouteCalculator.Options.Polyline.WayPointMarker = '' then\r\n Result := DEFAULTWAYPOINTMARKER\r\n else\r\n Result := RouteCalculator.Options.Polyline.WayPointMarker;\r\n end\r\n else\r\n Result := '';\r\nend;\r\n\r\nfunction TTMSFNCCustomMaps.GetRouteCalculatorAddWayPointMarker: string;\r\nbegin\r\n if RouteCalculatorCheck then\r\n begin\r\n if RouteCalculator.Options.Polyline.AddWayPointMarker = '' then\r\n Result := DEFAULTADDWAYPOINTMARKER\r\n else\r\n Result := RouteCalculator.Options.Polyline.AddWayPointMarker;\r\n end\r\n else\r\n Result := '';\r\nend;\r\n\r\nprocedure TTMSFNCCustomMaps.DoMapCenterChanged(\r\n AEventData: TTMSFNCMapsEventData);\r\nbegin\r\n if Assigned(OnMapCenterChanged) then\r\n OnMapCenterChanged(Self, AEventData);\r\nend;\r\n\r\nprocedure TTMSFNCCustomMaps.DoMapClick(AEventData: TTMSFNCMapsEventData);\r\n\r\n function GetRouteStartMarker: TTMSFNCMapsMarker;\r\n var\r\n I: Integer;\r\n begin\r\n Result := nil;\r\n for I := 0 to Markers.Count - 1 do\r\n begin\r\n if Markers[I].DataString = ROUTECALCULATORSTARTMARKER then\r\n begin\r\n Result := Markers[I];\r\n Exit;\r\n end;\r\n end;\r\n end;\r\n\r\n function GetRouteMarkerCount: Integer;\r\n var\r\n I: Integer;\r\n begin\r\n Result := 0;\r\n for I := 0 to Markers.Count - 1 do\r\n begin\r\n if ((Markers[I].DataString = ROUTECALCULATORMARKER)\r\n or (Markers[I].DataString = ROUTECALCULATORSTARTMARKER)\r\n or (Markers[I].DataString = ROUTECALCULATORENDMARKER)) then\r\n Result := Result + 1;\r\n end;\r\n end;\r\n\r\n function GetRoute: TTMSFNCRouteCalculatorRoute;\r\n var\r\n I: Integer;\r\n begin\r\n Result := nil;\r\n for I := 0 to RouteCalculator.Routes.Count - 1 do\r\n begin\r\n if RouteCalculator.Routes[I].DataString = ROUTECALCULATORROUTE then\r\n begin\r\n Result := RouteCalculator.Routes[I];\r\n Exit;\r\n end;\r\n end;\r\n end;\r\n\r\nvar\r\n m: TTMSFNCMapsMarker;\r\n r: TTMSFNCRouteCalculatorRoute;\r\nbegin\r\n if RouteCalculatorCheck then\r\n begin\r\n RouteCalculatorClearSelected;\r\n\r\n m := GetRouteStartMarker;\r\n if not Assigned(m) then\r\n begin\r\n m := AddMarker(AEventData.Coordinate.ToRec);\r\n m.IconURL := GetRouteCalculatorStartMarker;\r\n m.DataString := ROUTECALCULATORSTARTMARKER;\r\n end\r\n else if GetRouteMarkerCount = 1 then\r\n begin\r\n RouteCalculator.CalculateRoute(m.Coordinate.ToRec, AEventData.Coordinate.ToRec);\r\n end\r\n else\r\n begin\r\n r := GetRoute;\r\n if Assigned(r) then\r\n RouteCalculator.AddRouteSegment(r, AEventData.Coordinate.ToRec);\r\n end;\r\n end;\r\n\r\n if Assigned(OnMapClick) then\r\n OnMapClick(Self, AEventData);\r\nend;\r\n\r\nprocedure TTMSFNCCustomMaps.DoMapDblClick(AEventData: TTMSFNCMapsEventData);\r\nbegin\r\n if Assigned(OnMapDblClick) then\r\n OnMapDblClick(Self, AEventData);\r\nend;\r\n\r\nprocedure TTMSFNCCustomMaps.DoMapMouseUp(AEventData: TTMSFNCMapsEventData);\r\nbegin\r\n if RouteCalculatorCheck then\r\n begin\r\n RouteCalculatorMarkerMoved(AEventData.Coordinate.ToRec);\r\n RouteCalculatorPolylineMoved(AEventData.Coordinate.ToRec);\r\n end;\r\n\r\n if Assigned(OnMapMouseUp) then\r\n OnMapMouseUp(Self, AEventData);\r\nend;\r\n\r\n//procedure TTMSFNCCustomMaps.DoMapMove(AEventData: TTMSFNCMapsEventData);\r\n//begin\r\n// if Assigned(OnMapMove) then\r\n// OnMapMove(Self, AEventData);\r\n//end;\r\n\r\nprocedure TTMSFNCCustomMaps.DoMapMoveEnd(AEventData: TTMSFNCMapsEventData);\r\nbegin\r\n if Assigned(OnMapMoveEnd) then\r\n OnMapMoveEnd(Self, AEventData);\r\nend;\r\n\r\nprocedure TTMSFNCCustomMaps.DoMapMoveStart(AEventData: TTMSFNCMapsEventData);\r\nbegin\r\n if Assigned(OnMapMoveStart) then\r\n OnMapMoveStart(Self, AEventData);\r\nend;\r\n\r\nprocedure TTMSFNCCustomMaps.DoMapRightClick(AEventData: TTMSFNCMapsEventData);\r\nbegin\r\n if Assigned(OnMapRightClick) then\r\n OnMapRightClick(Self, AEventData);\r\nend;\r\n\r\nprocedure TTMSFNCCustomMaps.DoMapMouseDown(AEventData: TTMSFNCMapsEventData);\r\nbegin\r\n ExecuteJavaScript(GETFOCUSMAP + '()');\r\n\r\n if RouteCalculatorCheck then\r\n RouteCalculatorClearSelected;\r\n\r\n if Assigned(OnMapMouseDown) then\r\n OnMapMouseDown(Self, AEventData);\r\nend;\r\n\r\nprocedure TTMSFNCCustomMaps.DoMapMouseMove(AEventData: TTMSFNCMapsEventData);\r\nbegin\r\n if RouteCalculatorCheck then\r\n begin\r\n if (AEventData.X <> FRouteCalculatorDragX) or (AEventData.Y <> FRouteCalculatorDragY) or\r\n (AEventData.Coordinate.Latitude <> FRouteCalculatorDragLat) or (AEventData.Coordinate.Longitude <> FRouteCalculatorDragLon) then\r\n begin\r\n FRouteCalculatorDragX := AEventData.X;\r\n FRouteCalculatorDragY := AEventData.Y;\r\n FRouteCalculatorDragLat := AEventData.Coordinate.Latitude;\r\n FRouteCalculatorDragLon := AEventData.Coordinate.Longitude;\r\n\r\n if Assigned(FRouteCalculatorPolyline) then\r\n begin\r\n Options.Panning := False;\r\n FRouteCalculatorDragStarted := True;\r\n if Assigned(FRouteCalculatorDragMarker) then\r\n begin\r\n BeginUpdate;\r\n FRouteCalculatorDragMarker.Coordinate.Latitude := AEventData.Coordinate.Latitude;\r\n FRouteCalculatorDragMarker.Coordinate.Longitude := AEventData.Coordinate.Longitude;\r\n EndUpdate;\r\n end\r\n else\r\n begin\r\n BeginUpdate;\r\n FRouteCalculatorDragMarker := AddMarker(AEventData.Coordinate.ToRec);\r\n FRouteCalculatorDragMarker.IconURL := GetRouteCalculatorAddWayPointMarker;\r\n FRouteCalculatorDragMarker.DataString := ROUTECALCULATORDRAGMARKER;\r\n EndUpdate;\r\n end;\r\n end;\r\n\r\n if Assigned(FRouteCalculatorMarker) then\r\n begin\r\n Options.Panning := False;\r\n FRouteCalculatorDragStarted := True;\r\n BeginUpdate;\r\n FRouteCalculatorMarker.Coordinate.Latitude := AEventData.Coordinate.Latitude;\r\n FRouteCalculatorMarker.Coordinate.Longitude := AEventData.Coordinate.Longitude;\r\n EndUpdate;\r\n end;\r\n end;\r\n end;\r\n\r\n if Assigned(OnMapMouseMove) then\r\n OnMapMouseMove(Self, AEventData);\r\nend;\r\n\r\nprocedure TTMSFNCCustomMaps.DoMapMouseEnter(AEventData: TTMSFNCMapsEventData);\r\nbegin\r\n if Assigned(OnMapMouseEnter) then\r\n OnMapMouseEnter(Self, AEventData);\r\nend;\r\n\r\nprocedure TTMSFNCCustomMaps.DoMapMouseLeave(AEventData: TTMSFNCMapsEventData);\r\nbegin\r\n if Assigned(OnMapMouseLeave) then\r\n OnMapMouseLeave(Self, AEventData);\r\nend;\r\n\r\nprocedure TTMSFNCCustomMaps.DoMarkerRightClick(AEventData: TTMSFNCMapsEventData);\r\nbegin\r\n if Assigned(OnMarkerRightClick) then\r\n OnMarkerRightClick(Self, AEventData);\r\nend;\r\n\r\nprocedure TTMSFNCCustomMaps.DoMarkerClick(AEventData: TTMSFNCMapsEventData);\r\nbegin\r\n if RouteCalculatorCheck then\r\n begin\r\n RouteCalculatorClearSelected;\r\n if Assigned(AEventData.Marker) then\r\n begin\r\n if (AEventData.Marker.DataString = ROUTECALCULATORMARKER)\r\n or (AEventData.Marker.DataString = ROUTECALCULATORSTARTMARKER)\r\n or (AEventData.Marker.DataString = ROUTECALCULATORENDMARKER) then\r\n begin\r\n FRouteCalculatorSelectedMarker := AEventData.Marker;\r\n FRouteCalculatorSelectedMarker.IconURL := GetRouteCalculatorSelectedWayPointMarker;\r\n FRouteCalculatorSelectedMarker.Recreate := True;\r\n end;\r\n end;\r\n end;\r\n\r\n if Assigned(OnMarkerClick) then\r\n OnMarkerClick(Self, AEventData);\r\nend;\r\n\r\nprocedure TTMSFNCCustomMaps.DoMarkerDblClick(AEventData: TTMSFNCMapsEventData);\r\nbegin\r\n if Assigned(OnMarkerDblClick) then\r\n OnMarkerDblClick(Self, AEventData);\r\nend;\r\n\r\nprocedure TTMSFNCCustomMaps.DoMarkerMouseUp(AEventData: TTMSFNCMapsEventData);\r\nbegin\r\n if RouteCalculatorCheck then\r\n begin\r\n RouteCalculatorMarkerMoved(AEventData.Coordinate.ToRec);\r\n RouteCalculatorPolylineMoved(AEventData.Coordinate.ToRec);\r\n end;\r\n\r\n if Assigned(OnMarkerMouseUp) then\r\n OnMarkerMouseUp(Self, AEventData);\r\nend;\r\n\r\nprocedure TTMSFNCCustomMaps.DoMarkerMouseDown(AEventData: TTMSFNCMapsEventData);\r\nbegin\r\n if RouteCalculatorCheck then\r\n begin\r\n RouteCalculatorClearSelected;\r\n if Assigned(AEventData.Marker) then\r\n begin\r\n Options.Panning := False;\r\n FRouteCalculatorMarker := AEventData.Marker;\r\n FRouteCalculatorPolyline := nil;\r\n FRouteCalculatorDragStarted := False;\r\n end;\r\n end;\r\n\r\n if Assigned(OnMarkerMouseDown) then\r\n OnMarkerMouseDown(Self, AEventData);\r\nend;\r\n\r\nprocedure TTMSFNCCustomMaps.DoMarkerMouseEnter(AEventData: TTMSFNCMapsEventData);\r\nbegin\r\n if Assigned(OnMarkerMouseEnter) then\r\n OnMarkerMouseEnter(Self, AEventData);\r\nend;\r\n\r\nprocedure TTMSFNCCustomMaps.DoMarkerMouseLeave(AEventData: TTMSFNCMapsEventData);\r\nbegin\r\n if Assigned(OnMarkerMouseLeave) then\r\n OnMarkerMouseLeave(Self, AEventData);\r\nend;\r\n\r\nprocedure TTMSFNCCustomMaps.DoPolyElementRightClick(AEventData: TTMSFNCMapsEventData);\r\nbegin\r\n if Assigned(OnPolyElementRightClick) then\r\n OnPolyElementRightClick(Self, AEventData);\r\nend;\r\n\r\nprocedure TTMSFNCCustomMaps.DoPolyElementClick(AEventData: TTMSFNCMapsEventData);\r\nbegin\r\n if RouteCalculatorCheck then\r\n begin\r\n if AEventData.PolyElement.DataString = ROUTECALCULATORSEGMENT then\r\n begin\r\n RouteCalculatorClearSelected;\r\n if Assigned(AEventData.PolyElement) then\r\n begin\r\n FRouteCalculatorSelectedPolyline := TTMSFNCMapsPolyline(AEventData.PolyElement);\r\n FRouteCalculatorSelectedPolyline.StrokeColor := FRouteCalculator.Options.Polyline.SelectedStrokeColor;\r\n FRouteCalculatorSelectedPolyline.Recreate := True;\r\n end;\r\n end;\r\n end;\r\n\r\n if Assigned(OnPolyElementClick) then\r\n OnPolyElementClick(Self, AEventData);\r\nend;\r\n\r\nprocedure TTMSFNCCustomMaps.DoPolyElementDblClick(AEventData: TTMSFNCMapsEventData);\r\nbegin\r\n if Assigned(OnPolyElementDblClick) then\r\n OnPolyElementDblClick(Self, AEventData);\r\nend;\r\n\r\nprocedure TTMSFNCCustomMaps.DoPolyElementMouseUp(AEventData: TTMSFNCMapsEventData);\r\nbegin\r\n if RouteCalculatorCheck then\r\n begin\r\n RouteCalculatorMarkerMoved(AEventData.Coordinate.ToRec);\r\n RouteCalculatorPolylineMoved(AEventData.Coordinate.ToRec);\r\n end;\r\n\r\n if Assigned(OnPolyElementMouseUp) then\r\n OnPolyElementMouseUp(Self, AEventData);\r\nend;\r\n\r\nprocedure TTMSFNCCustomMaps.DoRouteCalculatorAfterDeleteMarker;\r\nbegin\r\n if Assigned(OnRouteCalculatorAfterDeleteMarker) then\r\n OnRouteCalculatorAfterDeleteMarker(Self);\r\nend;\r\n\r\nprocedure TTMSFNCCustomMaps.DoRouteCalculatorAfterDeletePolyline;\r\nbegin\r\n if Assigned(OnRouteCalculatorAfterDeletePolyline) then\r\n OnRouteCalculatorAfterDeletePolyline(Self);\r\nend;\r\n\r\nprocedure TTMSFNCCustomMaps.DoRouteCalculatorBeforeDeleteMarker(\r\n var ACanDelete: Boolean; AMarker: TTMSFNCMapsMarker;\r\n ASegment: TTMSFNCRouteCalculatorSegment);\r\nbegin\r\n if Assigned(OnRouteCalculatorBeforeDeleteMarker) then\r\n OnRouteCalculatorBeforeDeleteMarker(Self, ACanDelete, AMarker, ASegment);\r\nend;\r\n\r\nprocedure TTMSFNCCustomMaps.DoRouteCalculatorBeforeDeletePolyline(\r\n var ACanDelete: Boolean; APolyline: TTMSFNCMapsPolyline; ASegment: TTMSFNCRouteCalculatorSegment);\r\nbegin\r\n if Assigned(OnRouteCalculatorBeforeDeletePolyline) then\r\n OnRouteCalculatorBeforeDeletePolyline(Self, ACanDelete, APolyline, ASegment);\r\nend;\r\n\r\nprocedure TTMSFNCCustomMaps.DoRouteCalculatorPolylineAdded(\r\n APolyline: TTMSFNCMapsPolyline; ASegment: TTMSFNCRouteCalculatorSegment);\r\nbegin\r\n if Assigned(OnRouteCalculatorPolylineAdded) then\r\n OnRouteCalculatorPolylineAdded(Self, APolyline, ASegment);\r\nend;\r\n\r\nprocedure TTMSFNCCustomMaps.DoRouteCalculatorPolylineUpdated(\r\n APolyline: TTMSFNCMapsPolyline; ASegment: TTMSFNCRouteCalculatorSegment);\r\nbegin\r\n if Assigned(OnRouteCalculatorPolylineUpdated) then\r\n OnRouteCalculatorPolylineUpdated(Self, APolyline, ASegment);\r\nend;\r\n\r\nprocedure TTMSFNCCustomMaps.DoRouteCalculatorWayPointAdded(\r\n AMarker: TTMSFNCMapsMarker; ASegment: TTMSFNCRouteCalculatorSegment);\r\nbegin\r\n if Assigned(OnRouteCalculatorWayPointAdded) then\r\n OnRouteCalculatorWayPointAdded(Self, AMarker, ASegment);\r\nend;\r\n\r\nprocedure TTMSFNCCustomMaps.DoRouteCalculatorWayPointUpdated(\r\n AMarker: TTMSFNCMapsMarker; ASegment: TTMSFNCRouteCalculatorSegment);\r\nbegin\r\n if Assigned(OnRouteCalculatorWayPointUpdated) then\r\n OnRouteCalculatorWayPointUpdated(Self, AMarker, ASegment);\r\nend;\r\n\r\nprocedure TTMSFNCCustomMaps.DoPolyElementMouseDown(AEventData: TTMSFNCMapsEventData);\r\nbegin\r\n if RouteCalculatorCheck then\r\n begin\r\n RouteCalculatorClearSelected;\r\n if Assigned(AEventData.PolyElement) then\r\n begin\r\n Options.Panning := False;\r\n FRouteCalculatorPolyline := AEventData.PolyElement;\r\n FRouteCalculatorMarker := nil;\r\n FRouteCalculatorDragStarted := False;\r\n end;\r\n end;\r\n\r\n if Assigned(OnPolyElementMouseDown) then\r\n OnPolyElementMouseDown(Self, AEventData);\r\nend;\r\n\r\nprocedure TTMSFNCCustomMaps.DoPolyElementMouseEnter(AEventData: TTMSFNCMapsEventData);\r\nbegin\r\n if Assigned(OnPolyElementMouseEnter) then\r\n OnPolyElementMouseEnter(Self, AEventData);\r\nend;\r\n\r\nprocedure TTMSFNCCustomMaps.DoPolyElementMouseLeave(AEventData: TTMSFNCMapsEventData);\r\nbegin\r\n if Assigned(OnPolyElementMouseLeave) then\r\n OnPolyElementMouseLeave(Self, AEventData);\r\nend;\r\n\r\nprocedure TTMSFNCCustomMaps.CallCustomEvent(AEventData: TTMSFNCMapsEventData);\r\nvar\r\n I, J: Integer;\r\n ActionEventFound: Boolean;\r\nbegin\r\n ActionEventFound := False;\r\n\r\n for I := 0 to ElementContainers.Count - 1 do\r\n begin\r\n for J := 0 to ElementContainers[I].Actions.Count - 1 do\r\n begin\r\n if Assigned(ElementContainers[I].Actions[J].OnExecute) then\r\n begin\r\n if ElementContainers[I].Actions[J].HTMLElementID = AEventData.ID then\r\n begin\r\n if ((ElementContainers[I].Actions[J].Event = heClick) and (AEventData.EventName = ACTIONCLICKEVENT))\r\n or ((ElementContainers[I].Actions[J].Event = heDblClick) and (AEventData.EventName = ACTIONDBLCLICKEVENT))\r\n or ((ElementContainers[I].Actions[J].Event = heKeyPress) and (AEventData.EventName = ACTIONKEYPRESSEVENT))\r\n or ((ElementContainers[I].Actions[J].Event = heKeyDown) and (AEventData.EventName = ACTIONKEYDOWNEVENT))\r\n or ((ElementContainers[I].Actions[J].Event = heKeyUp) and (AEventData.EventName = ACTIONKEYUPEVENT))\r\n or ((ElementContainers[I].Actions[J].Event = heMouseDown) and (AEventData.EventName = ACTIONMOUSEDOWNEVENT))\r\n or ((ElementContainers[I].Actions[J].Event = heMouseMove) and (AEventData.EventName = ACTIONMOUSEMOVEEVENT))\r\n or ((ElementContainers[I].Actions[J].Event = heMouseUp) and (AEventData.EventName = ACTIONMOUSEUPEVENT))\r\n or ((ElementContainers[I].Actions[J].Event = heMouseEnter) and (AEventData.EventName = ACTIONMOUSEENTEREVENT))\r\n or ((ElementContainers[I].Actions[J].Event = heMouseLeave) and (AEventData.EventName = ACTIONMOUSELEAVEEVENT))\r\n or ((ElementContainers[I].Actions[J].Event = heBlur) and (AEventData.EventName = ACTIONBLUREVENT))\r\n or ((ElementContainers[I].Actions[J].Event = heFocus) and (AEventData.EventName = ACTIONFOCUSEVENT))\r\n or ((ElementContainers[I].Actions[J].Event = heChange) and (AEventData.EventName = ACTIONCHANGEEVENT))\r\n or ((ElementContainers[I].Actions[J].Event = heSelect) and (AEventData.EventName = ACTIONSELECTEVENT))\r\n or ((ElementContainers[I].Actions[J].Event = heCustom) and (AEventData.EventName = ACTIONCUSTOMEVENT))\r\n then\r\n begin\r\n ActionEventFound := True;\r\n ElementContainers[I].Actions[J].OnExecute(Self, AEventData);\r\n end;\r\n end;\r\n end;\r\n end;\r\n end;\r\n\r\n if not ActionEventFound then\r\n DoCustomEvent(AEventData);\r\nend;\r\n\r\nprocedure TTMSFNCCustomMaps.CheckInstances;\r\n{$IFDEF WEBLIB}\r\nvar\r\n I, Instances: Integer;\r\n{$ENDIF}\r\nbegin\r\n {$IFDEF WEBLIB}\r\n Instances := 0;\r\n for I := 0 to Owner.ComponentCount - 1 do\r\n begin\r\n if (Owner.Components[I] is TTMSFNCCustomMaps) then\r\n begin\r\n if (Owner.Components[I] as TTMSFNCCustomMaps).Service = Service then\r\n Inc(Instances);\r\n end;\r\n end;\r\n\r\n if (Instances > 1) then\r\n raise Exception.Create('Only one instance of ' + ClassName + ' with service ' + TTMSFNCPersistence.GetEnumName(TypeInfo(TTMSFNCMapsService), Integer(Service)) +' allowed!');\r\n {$ENDIF}\r\nend;\r\n\r\nprocedure TTMSFNCCustomMaps.DoCloseAllPopups(const AValue: string);\r\nvar\r\n I: Integer;\r\n sl: TStringList;\r\n ma: string;\r\nbegin\r\n ma := ParseScript(AValue);\r\n sl := TStringList.Create;\r\n try\r\n TTMSFNCUtils.Split(',', ma, sl);\r\n if sl.Count = 0 then\r\n begin\r\n //Make sure marker title popups (OpenLayers) are closed as well\r\n ClosePopup('');\r\n end\r\n else\r\n begin\r\n for I := 0 to sl.Count - 1 do\r\n ClosePopup(sl[I]);\r\n end;\r\n finally\r\n sl.Free;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomMaps.DoCreateGeoJSONObject(\r\n AEventData: TTMSFNCMapsGeoJSONEventData);\r\nbegin\r\n if Assigned(OnCreateGeoJSONObject) then\r\n OnCreateGeoJSONObject(Self, AEventData);\r\nend;\r\n\r\nprocedure TTMSFNCCustomMaps.DoCreateGPXSegment(\r\n AEventData: TTMSFNCMapsGPXSegmentEventData);\r\nbegin\r\n if Assigned(OnCreateGPXSegment) then\r\n OnCreateGPXSegment(Self, AEventData);\r\nend;\r\n\r\nprocedure TTMSFNCCustomMaps.DoCreateGPXTrack(\r\n AEventData: TTMSFNCMapsGPXTrackEventData);\r\nbegin\r\n if Assigned(OnCreateGPXTrack) then\r\n OnCreateGPXTrack(Self, AEventData);\r\nend;\r\n\r\nprocedure TTMSFNCCustomMaps.DoCreateGPXWayPoint(\r\n AEventData: TTMSFNCMapsGPXWayPointEventData);\r\nbegin\r\n if Assigned(OnCreateGPXWayPoint) then\r\n OnCreateGPXWayPoint(Self, AEventData);\r\nend;\r\n\r\nprocedure TTMSFNCCustomMaps.DoCustomEvent(AEventData: TTMSFNCMapsEventData);\r\nbegin\r\n if Assigned(OnCustomEvent) then\r\n OnCustomEvent(Self, AEventData);\r\nend;\r\n\r\nprocedure TTMSFNCCustomMaps.DoCustomizeMap(var ACustomizeMap: string);\r\nbegin\r\n if Assigned(OnCustomizeMap) then\r\n OnCustomizeMap(Self, ACustomizeMap);\r\nend;\r\n\r\nprocedure TTMSFNCCustomMaps.DoCustomizeCSS(var ACustomizeCSS: string);\r\nbegin\r\n if Assigned(OnCustomizeCSS) then\r\n OnCustomizeCSS(Self, ACustomizeCSS);\r\nend;\r\n\r\nprocedure TTMSFNCCustomMaps.DoCustomizeGlobalVariables(var ACustomizeGlobalVariables: string);\r\nbegin\r\n if Assigned(OnCustomizeGlobalVariables) then\r\n OnCustomizeGlobalVariables(Self, ACustomizeGlobalVariables);\r\nend;\r\n\r\nprocedure TTMSFNCCustomMaps.DoCustomizeHeadLinks(AList: TTMSFNCMapsLinksList);\r\nbegin\r\n if Assigned(OnCustomizeHeadLinks) then\r\n OnCustomizeHeadLinks(Self, AList);\r\nend;\r\n\r\nprocedure TTMSFNCCustomMaps.DoCustomizePolyElement(var ACustomizePolyElement: string);\r\nbegin\r\n if Assigned(OnCustomizePolyElement) then\r\n OnCustomizePolyElement(Self, ACustomizePolyElement);\r\nend;\r\n\r\nprocedure TTMSFNCCustomMaps.DoCustomizeJavaScript(var ACustomizeJavaScript: string);\r\nbegin\r\n if Assigned(OnCustomizeJavaScript) then\r\n OnCustomizeJavaScript(Self, ACustomizeJavaScript);\r\nend;\r\n\r\nprocedure TTMSFNCCustomMaps.DoCustomizeLocalAccessFileName(\r\n var AFileName: string);\r\nbegin\r\n if Assigned(OnCustomizeLocalAccessFileName) then\r\n OnCustomizeLocalAccessFileName(Self, AFileName);\r\nend;\r\n\r\nprocedure TTMSFNCCustomMaps.BeforeNavigate(var Params: TTMSFNCCustomWebBrowserBeforeNavigateParams);\r\nbegin\r\n Params.Cancel := ParseEvent(Params.URL);\r\n inherited;\r\nend;\r\n\r\nprocedure TTMSFNCCustomMaps.DoUpdatePolyElements(const AValue: string);\r\nvar\r\n I, J, K: Integer;\r\n sl: TStringList;\r\n ma: string;\r\n arr: TTMSFNCObjectExcludePropertyListArray;\r\n s: string;\r\nbegin\r\n if not MapInitialized or IsDestroying or (FUpdateCount > 0) then\r\n Exit;\r\n\r\n SetLength(arr, 1);\r\n arr[0] := 'Coordinates';\r\n\r\n ma := ParseScript(AValue);\r\n\r\n sl := TStringList.Create;\r\n try\r\n TTMSFNCUtils.Split(',', ma, sl);\r\n\r\n s := 'function updateAllPolygons(){' + LB;\r\n for I := 0 to Polygons.Count - 1 do\r\n begin\r\n j := sl.IndexOf(Polygons[I].ID);\r\n if (j = -1) or (Polygons[I].FReload) then\r\n begin\r\n Polygons[I].FReload := False;\r\n s := s + INITIALIZECOORDINATEARRAY + '();' + LB;\r\n s := s + ADDCOORDINATESTOARRAY + '(' + Polygons[I].Coordinates.ToJSON + ');' + LB;\r\n s := s + INITIALIZEHOLESARRAY + '();' + LB;\r\n for K := 0 to Polygons[I].Holes.Count - 1 do\r\n s := s + ADDHOLESTOARRAY + '([\"' + Polygons[I].Holes[K].ID + '\",' + Polygons[I].Holes[K].Coordinates.ToJSON + ']);' + LB;\r\n s := s + ADDORUPDATEPOLYELEMENTFUNCTION + '(' + Polygons[I].ToJSON(arr) + ');' + LB;\r\n s := s + INITIALIZECOORDINATEARRAY + '();' + LB;\r\n end;\r\n\r\n if j <> -1 then\r\n sl.Delete(j)\r\n end;\r\n\r\n s := s + '}updateAllPolygons();';\r\n ExecuteJavaScript(s, nil, True);\r\n\r\n s := 'function updateAllRectangles(){' + LB;\r\n\r\n for I := 0 to Rectangles.Count - 1 do\r\n begin\r\n j := sl.IndexOf(Rectangles[I].ID);\r\n if (j = -1) or (Rectangles[I].FReload) then\r\n begin\r\n Rectangles[I].FReload := False;\r\n s := s + INITIALIZECOORDINATEARRAY + '();' + LB;\r\n s := s + ADDCOORDINATESTOARRAY + '(' + Rectangles[I].Coordinates.ToJSON + ');' + LB;\r\n s := s + ADDORUPDATEPOLYELEMENTFUNCTION + '(' + Rectangles[I].ToJSON(arr) + ');' + LB;\r\n s := s + INITIALIZECOORDINATEARRAY + '();' + LB;\r\n end;\r\n\r\n if j <> -1 then\r\n sl.Delete(j)\r\n end;\r\n\r\n s := s + '}updateAllRectangles();';\r\n ExecuteJavaScript(s, nil, True);\r\n\r\n s := 'function updateAllCircles(){' + LB;\r\n\r\n for I := 0 to Circles.Count - 1 do\r\n begin\r\n j := sl.IndexOf(Circles[I].ID);\r\n if (j = -1) or (Circles[I].FReload) then\r\n begin\r\n Circles[I].FReload := False;\r\n s := s + INITIALIZECOORDINATEARRAY + '();' + LB;\r\n s := s + ADDCOORDINATESTOARRAY + '(' + Circles[I].Coordinates.ToJSON + ');' + LB;\r\n s := s + ADDORUPDATEPOLYELEMENTFUNCTION + '(' + Circles[I].ToJSON(arr) + ');' + LB;\r\n s := s + INITIALIZECOORDINATEARRAY + '();' + LB;\r\n end;\r\n\r\n if j <> -1 then\r\n sl.Delete(j)\r\n end;\r\n\r\n s := s + '}updateAllCircles();';\r\n ExecuteJavaScript(s, nil, True);\r\n\r\n s := 'function updateAllPolylines(){' + LB;\r\n\r\n for I := 0 to Polylines.Count - 1 do\r\n begin\r\n j := sl.IndexOf(Polylines[I].ID);\r\n if (j = -1) or (Polylines[I].FReload) then\r\n begin\r\n PolyLines[I].FReload := False;\r\n s := s + INITIALIZECOORDINATEARRAY + '();' + LB;\r\n s := s + ADDCOORDINATESTOARRAY + '(' + Polylines[I].Coordinates.ToJSON + ');' + LB;\r\n s := s + ADDORUPDATEPOLYELEMENTFUNCTION + '(' + Polylines[I].ToJSON(arr) + ');' + LB;\r\n s := s + INITIALIZECOORDINATEARRAY + '();' + LB;\r\n end;\r\n\r\n if j <> -1 then\r\n sl.Delete(j)\r\n end;\r\n\r\n s := s + '}updateAllPolylines();';\r\n ExecuteJavaScript(s, nil, True);\r\n\r\n s := 'function deleteAllPolyElements(){' + LB;\r\n for I := 0 to sl.Count - 1 do\r\n s := s + DELETEPOLYELEMENTFUNCTION + '({\"ID\": \"' + sl[I] + '\"});' + LB;\r\n\r\n s := s + '}deleteAllPolyElements();';\r\n ExecuteJavaScript(s, nil, True);\r\n\r\n finally\r\n sl.Free;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomMaps.UpdatePolyElements;\r\nbegin\r\n if not MapInitialized or IsDestroying or (FUpdateCount > 0) then\r\n Exit;\r\n\r\n ExecuteJavaScript(GETPOLYELEMENTARRAYVAR, {$IFDEF LCLWEBLIB}@{$ENDIF}DoUpdatePolyElements, True);\r\nend;\r\n\r\nprocedure TTMSFNCCustomMaps.UpdateControlAfterResize;\r\nbegin\r\n inherited;\r\n {$IFDEF WEBLIB}\r\n if not MapInitialized or IsDestroying or (FUpdateCount > 0) then\r\n Exit;\r\n\r\n if Service = msOpenLayers then\r\n ExecuteJavaScript(MAPVAR + '.updateSize()', {$IFDEF LCLWEBLIB}@{$ENDIF}DoUpdateMarkers);\r\n {$ENDIF}\r\nend;\r\n\r\nprocedure TTMSFNCCustomMaps.UpdateElementContainers;\r\nbegin\r\n if not MapInitialized or IsDestroying or (FUpdateCount > 0) then\r\n Exit;\r\n\r\n ExecuteJavaScript(GETELEMENTCONTAINERARRAYVAR, {$IFDEF LCLWEBLIB}@{$ENDIF}DoUpdateElementContainers, True);\r\nend;\r\n\r\nprocedure TTMSFNCCustomMaps.UpdateHeatMaps;\r\nbegin\r\n if not MapInitialized or IsDestroying or (UpdateCount > 0) then\r\n Exit;\r\n\r\n ExecuteJavaScript(GETHEATMAPARRAYVAR, {$IFDEF LCLWEBLIB}@{$ENDIF}DoUpdateHeatMaps);\r\nend;\r\n\r\nprocedure TTMSFNCCustomMaps.UpdateMarkers;\r\nbegin\r\n if not MapInitialized or IsDestroying or (FUpdateCount > 0) then\r\n Exit;\r\n\r\n ExecuteJavaScript(GETMARKERARRAYVAR, {$IFDEF LCLWEBLIB}@{$ENDIF}DoUpdateMarkers, True);\r\nend;\r\n\r\nprocedure TTMSFNCCustomMaps.DoUpdateElementContainers(const AValue: string);\r\nvar\r\n I, j: Integer;\r\n ma: string;\r\n sl: TStringList;\r\n s: string;\r\n c: TTMSFNCMapsElementContainers;\r\nbegin\r\n if not MapInitialized or IsDestroying or (FUpdateCount > 0) then\r\n Exit;\r\n\r\n ma := ParseScript(AValue);\r\n\r\n sl := TStringList.Create;\r\n c := TTMSFNCMapsElementContainers.Create(nil);\r\n c.Assign(ElementContainers);\r\n SyncLabels(c);\r\n\r\n try\r\n TTMSFNCUtils.Split(',', ma, sl);\r\n\r\n s := 'function updateAllElementContainers(){' + LB;\r\n\r\n for I := 0 to c.Count - 1 do\r\n begin\r\n j := sl.IndexOf(c[I].ID);\r\n if (j = -1) or (c[I].FReload) then\r\n begin\r\n c[I].FReload := False;\r\n s := s + ADDORUPDATEELEMENTCONTAINERFUNCTION + '(' + c[I].ToJSON + ');' + LB;\r\n end;\r\n\r\n if j <> -1 then\r\n sl.Delete(j);\r\n end;\r\n\r\n s := s + '}updateAllElementContainers();';\r\n ExecuteJavaScript(s, nil, True);\r\n\r\n s := 'function deleteAllElementContainers(){' + LB;\r\n\r\n for I := 0 to sl.Count - 1 do\r\n s := s + DELETEELEMENTCONTAINERFUNCTION + '({\"ID\": \"' + sl[I] + '\"});' + LB;\r\n\r\n s := s + '}deleteAllElementContainers();';\r\n ExecuteJavaScript(s, nil, True);\r\n\r\n finally\r\n c.Free;\r\n sl.Free;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomMaps.DoUpdateHeatMaps(const AValue: string);\r\nvar\r\n I, j: Integer;\r\n ma: string;\r\n sl: TStringList;\r\n s: string;\r\nbegin\r\n if not MapInitialized or IsDestroying or (UpdateCount > 0) then\r\n Exit;\r\n\r\n ma := ParseScript(AValue);\r\n\r\n sl := TStringList.Create;\r\n try\r\n TTMSFNCUtils.Split(',', ma, sl);\r\n\r\n s := 'function updateAllHeatMaps(){' + LB;\r\n\r\n for I := 0 to HeatMaps.Count - 1 do\r\n begin\r\n j := sl.IndexOf(HeatMaps[I].ID);\r\n s := s + ADDORUPDATEHEATMAPFUNCTION + '(' + HeatMaps[I].ToJSON + ');' + LB;\r\n if j <> -1 then\r\n sl.Delete(j);\r\n end;\r\n\r\n s := s + '}updateAllHeatMaps();';\r\n ExecuteJavaScript(s);\r\n\r\n s := 'function deleteAllHeatMaps(){' + LB;\r\n for I := 0 to sl.Count - 1 do\r\n s := s + DELETEHEATMAPFUNCTION + '({\"ID\": \"' + sl[I] + '\"});' + LB;\r\n\r\n s := s + '}deleteAllHeatMaps();';\r\n ExecuteJavaScript(s);\r\n\r\n finally\r\n sl.Free;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomMaps.DoUpdateMarkers(const AValue: string);\r\nvar\r\n I, j: Integer;\r\n ma: string;\r\n sl: TStringList;\r\n s: string;\r\nbegin\r\n if not MapInitialized or IsDestroying or (FUpdateCount > 0) then\r\n Exit;\r\n\r\n ma := ParseScript(AValue);\r\n\r\n sl := TStringList.Create;\r\n try\r\n TTMSFNCUtils.Split(',', ma, sl);\r\n\r\n s := 'function updateAllMarkers(){' + LB;\r\n\r\n for I := 0 to Markers.Count - 1 do\r\n begin\r\n j := sl.IndexOf(Markers[I].ID);\r\n if (j = -1) or (Markers[I].FReload) then\r\n begin\r\n Markers[I].FReload := False;\r\n s := s + ADDORUPDATEMARKERFUNCTION + '(' + Markers[I].ToJSON + ');' + LB;\r\n end;\r\n\r\n if j <> -1 then\r\n sl.Delete(j);\r\n end;\r\n\r\n s := s + '}updateAllMarkers();';\r\n ExecuteJavaScript(s, nil, True);\r\n\r\n s := 'function deleteAllMarkers(){' + LB;\r\n\r\n for I := 0 to sl.Count - 1 do\r\n s := s + DELETEMARKERFUNCTION + '({\"ID\": \"' + sl[I] + '\"});' + LB;\r\n\r\n s := s + '}deleteAllMarkers();';\r\n ExecuteJavaScript(s, nil, True);\r\n\r\n finally\r\n sl.Free;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomMaps.UpdateOptions;\r\nbegin\r\n if not MapInitialized or IsDestroying or (FUpdateCount > 0) then\r\n Exit;\r\n\r\n ExecuteJavaScript(UPDATEOPTIONSFUNCTION + '(' + Options.ToJSON + ')');\r\nend;\r\n\r\nfunction TTMSFNCCustomMaps.MapReady: Boolean;\r\nbegin\r\n Result := Assigned(FMaps) and Assigned(FMapsInstance) and Assigned(FMapsProperties) and FMaps.IsValid;\r\nend;\r\n\r\nfunction TTMSFNCCustomMaps.Maps: ITMSFNCCustomMaps;\r\nbegin\r\n Result := FMaps;\r\nend;\r\n\r\nprocedure TTMSFNCCustomMaps.Notification(AComponent: TComponent;\r\n Operation: TOperation);\r\nbegin\r\n inherited;\r\n if (Operation = opRemove) and (AComponent = FRouteCalculator) then\r\n FRouteCalculator := nil;\r\nend;\r\n\r\nprocedure TTMSFNCCustomMaps.OptionsChanged(Sender: TObject);\r\nbegin\r\n InitializeHTML;\r\n UpdateOptions;\r\nend;\r\n\r\nfunction TTMSFNCCustomMaps.ParseLinks(AList: TTMSFNCMapsLinksList): string;\r\nvar\r\n I: Integer;\r\n lk: TTMSFNCMapsLink;\r\nbegin\r\n Result := '';\r\n for I := 0 to AList.Count - 1 do\r\n begin\r\n lk := AList[I];\r\n case lk.Kind of\r\n mlkLink: Result := Result + ' '' then\r\n begin\r\n case lk.Kind of\r\n mlkLink: Result := Result + ' href=\"';\r\n mlkScript: Result := Result + ' src=\"';\r\n end;\r\n\r\n Result := Result + lk.URL + '\"';\r\n end;\r\n\r\n if lk.&Type <> '' then\r\n Result := Result + ' type=\"' + lk.&Type + '\"';\r\n\r\n if lk.CharSet <> '' then\r\n Result := Result + ' charset=\"' + lk.CharSet + '\"';\r\n\r\n if lk.Rel <> '' then\r\n Result := Result + ' rel=\"' + lk.Rel +'\"';\r\n\r\n if lk.Async then\r\n Result := Result + ' async';\r\n\r\n if lk.Defer then\r\n Result := Result + ' defer';\r\n\r\n Result := Result + '>';\r\n\r\n if lk.Content <> '' then\r\n Result := Result + LB + lk.Content;\r\n\r\n case lk.Kind of\r\n mlkLink: Result := Result + LB + '';\r\n mlkScript: Result := Result + LB + '';\r\n mlkStyle: Result := Result + LB + '';\r\n end;\r\n\r\n if (I < AList.Count - 1) then\r\n Result := Result + LB;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomMaps.SaveToGPXFile(\r\n ACoordinates: TTMSFNCMapsCoordinateRecArray; AFileName: string);\r\nbegin\r\n SaveToGPXFile(ACoordinates, AFileName, DefaultGPXMetaData);\r\nend;\r\n\r\nprocedure TTMSFNCCustomMaps.SaveToGPXFile(\r\n ACoordinates: TTMSFNCMapsCoordinateRecArray; AFileName: string;\r\n AMetaData: TTMSFNCMapsGPXMetaData; AWayPoints: TTMSFNCMapsGPXWayPointRecArray);\r\nbegin\r\n SaveToGPXFile(ACoordinates, AFileName{$IFNDEF LCLLIB}, TEncoding.Default{$ENDIF}, AMetaData, AWayPoints);\r\nend;\r\n\r\n{$IFNDEF LCLLIB}\r\nprocedure TTMSFNCCustomMaps.SaveToGPXFile(\r\n ACoordinates: TTMSFNCMapsCoordinateRecArray; AFileName: string\r\n ;AEncoding: TEncoding);\r\nbegin\r\n SaveToGPXFile(ACoordinates, AFileName, AEncoding, DefaultGPXMetaData);\r\nend;\r\n\r\nprocedure TTMSFNCCustomMaps.SaveToGPXFile(\r\n ACoordinates: TTMSFNCMapsCoordinateRecArray; AFileName: string\r\n ;AEncoding: TEncoding; AMetaData: TTMSFNCMapsGPXMetaData;\r\n AWayPoints: TTMSFNCMapsGPXWayPointRecArray);\r\nvar\r\n sl: TStringList;\r\nbegin\r\n sl := TStringList.Create;\r\n try\r\n sl.Text := SaveToGPXText(ACoordinates, AMetaData, AWayPoints);\r\n sl.SaveToFile(AFileName{$IFNDEF LCLWEBLIB}, AEncoding{$ENDIF});\r\n finally\r\n sl.Free;\r\n end;\r\nend;\r\n{$ENDIF}\r\n\r\nprocedure TTMSFNCCustomMaps.SaveToGPXStream(\r\n ACoordinates: TTMSFNCMapsCoordinateRecArray; AStream: TStream);\r\nbegin\r\n SaveToGPXStream(ACoordinates, AStream{$IFNDEF LCLLIB}, TEncoding.Default{$ENDIF}, DefaultGPXMetaData);\r\nend;\r\n\r\nprocedure TTMSFNCCustomMaps.SaveToGPXStream(\r\n ACoordinates: TTMSFNCMapsCoordinateRecArray; AStream: TStream;\r\n AMetaData: TTMSFNCMapsGPXMetaData; AWayPoints: TTMSFNCMapsGPXWayPointRecArray);\r\nbegin\r\n SaveToGPXStream(ACoordinates, AStream{$IFNDEF LCLLIB}, TEncoding.Default{$ENDIF}, AMetaData, AWayPoints);\r\nend;\r\n\r\n{$IFNDEF LCLLIB}\r\nprocedure TTMSFNCCustomMaps.SaveToGPXStream(\r\n ACoordinates: TTMSFNCMapsCoordinateRecArray; AStream: TStream;\r\n AEncoding: TEncoding);\r\nbegin\r\n SaveToGPXStream(ACoordinates, AStream, AEncoding, DefaultGPXMetaData);\r\nend;\r\n\r\nprocedure TTMSFNCCustomMaps.SaveToGPXStream(\r\n ACoordinates: TTMSFNCMapsCoordinateRecArray; AStream: TStream;\r\n AEncoding: TEncoding; AMetaData: TTMSFNCMapsGPXMetaData;\r\n AWayPoints: TTMSFNCMapsGPXWayPointRecArray);\r\nvar\r\n ss: TStringStream;\r\nbegin\r\n ss := TStringStream.Create(SaveToGPXText(ACoordinates, AMetaData, AWayPoints), AEncoding);\r\n try\r\n AStream.CopyFrom(ss, ss.Size);\r\n finally\r\n ss.Free;\r\n end;\r\nend;\r\n{$ENDIF}\r\n\r\nfunction TTMSFNCCustomMaps.SaveToGPXText(\r\n ACoordinates: TTMSFNCMapsCoordinateRecArray): string;\r\nbegin\r\n Result := SaveToGPX(ACoordinates, DefaultGPXMetaData);\r\nend;\r\n\r\nfunction TTMSFNCCustomMaps.SaveToGPXText(\r\n ACoordinates: TTMSFNCMapsCoordinateRecArray;\r\n AMetaData: TTMSFNCMapsGPXMetaData; AWayPoints: TTMSFNCMapsGPXWayPointRecArray): string;\r\nbegin\r\n Result := SaveToGPX(ACoordinates, AMetaData, True, True, '', AWayPoints);\r\nend;\r\n\r\nprocedure TTMSFNCCustomMaps.SetAPIKey(const Value: string);\r\nbegin\r\n if FAPIKey <> Value then\r\n begin\r\n FAPIKey := Value;\r\n MapInitialized := False;\r\n InitializeHTML;\r\n end;\r\nend;\r\n\r\n{$IFDEF WEBLIB}\r\nprocedure TTMSFNCCustomMaps.SetName(const NewName: TComponentName);\r\nbegin\r\n DestroyMap;\r\n FMapInitialized := False;\r\n inherited;\r\n\r\n if FUpdateCount > 0 then\r\n Exit;\r\n\r\n InitializeMap;\r\nend;\r\n{$ENDIF}\r\n\r\nprocedure TTMSFNCCustomMaps.SetHeadLinks(const Value: TTMSFNCMapsHeadLinks);\r\nbegin\r\n FHeadLinks.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCCustomMaps.SetHeatMaps(const Value: TTMSFNCMapsHeatMaps);\r\nbegin\r\n FHeatMaps.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCCustomMaps.SetService(const Value: TTMSFNCMapsService);\r\nbegin\r\n if FService <> Value then\r\n begin\r\n DestroyMap;\r\n FService := Value;\r\n if (Assigned(RouteCalculator) and (not (Service in [msGoogleMaps, msOpenLayers, msHere, msMapBox, msTomTom, msBingMaps]))) then\r\n raise Exception.Create('The TTMSFNCRouteCalculator is not compatible with the selected mapping service.');\r\n MapInitialized := False;\r\n InitializeMap;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomMaps.SetOptions(const Value: TTMSFNCMapsOptions);\r\nbegin\r\n FOptions.Assign(Value);\r\nend;\r\n\r\ndestructor TTMSFNCCustomMaps.Destroy;\r\nbegin\r\n DestroyMap;\r\n MapInitialized := False;\r\n FOptions.Free;\r\n FMarkers.Free;\r\n FHeatMaps.Free;\r\n FElementContainers.Free;\r\n FLabels.Free;\r\n FPolygons.Free;\r\n FCircles.Free;\r\n FRectangles.Free;\r\n FPolylines.Free;\r\n FHeadLinks.Free;\r\n\r\n {$IFNDEF WEBLIB}\r\n if Assigned(FMaps) then\r\n FMaps.DestroyMaps;\r\n {$ENDIF}\r\n\r\n FMaps := nil;\r\n FMapsInstance := nil;\r\n inherited;\r\nend;\r\n\r\nprocedure TTMSFNCCustomMaps.DestroyMap;\r\nbegin\r\n {$IFDEF WEBLIB}\r\n RemoveStyles;\r\n RemoveScripts;\r\n {$ENDIF}\r\nend;\r\n\r\nprocedure TTMSFNCCustomMaps.EndUpdate;\r\nbegin\r\n inherited;\r\n Dec(FUpdateCount);\r\n if FUpdateCount = 0 then\r\n begin\r\n if not MapInitialized then\r\n InitializeMap;\r\n UpdatePolyElements;\r\n UpdateMarkers;\r\n UpdateElementContainers;\r\n UpdateOptions;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCCustomMaps.FindNearestPolylineCoordinate(\r\n ACoordinate: TTMSFNCMapsCoordinateRec; AMaxDistance: Double;\r\n var APolylineIndex, ACoordinateIndex: Integer; var ACoordinateRec: TTMSFNCMapsCoordinateRec): Boolean;\r\nvar\r\n I, nc: Integer;\r\n c: TTMSFNCMapsCoordinateRec;\r\n MinDistance, md: Double;\r\nbegin\r\n Result := False;\r\n MinDistance := -1;\r\n for I := 0 to FPolylines.Count - 1 do\r\n begin\r\n nc := FindNearestCoordinate(ACoordinate, FPolylines[I].Coordinates.ToArray);\r\n c := FPolylines[I].Coordinates[nc].Coordinate.ToRec;\r\n md := MeasureDistance(ACoordinate, c);\r\n if ((AMaxDistance >= md) or (AMaxDistance < 0)) and ((md < MinDistance) or (MinDistance < 0)) then\r\n begin\r\n MinDistance := md;\r\n APolylineIndex := I;\r\n ACoordinateIndex := nc;\r\n ACoordinateRec := c;\r\n Result := True;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomMaps.SetPolylines(const Value: TTMSFNCMapsPolylines);\r\nbegin\r\n FPolylines.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCCustomMaps.SetPolygons(const Value: TTMSFNCMapsPolygons);\r\nbegin\r\n FPolygons.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCCustomMaps.SetRectangles(const Value: TTMSFNCMapsRectangles);\r\nbegin\r\n FRectangles.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCCustomMaps.SetRouteCalculator(\r\n const Value: TTMSFNCRouteCalculator);\r\nbegin\r\n FRouteCalculator := Value;\r\n if Assigned(FRouteCalculator) and not Assigned(TTMSFNCMapsRouteCalculatorOpen(RouteCalculator).OnCalculateRouteInternal) then\r\n TTMSFNCMapsRouteCalculatorOpen(RouteCalculator).OnCalculateRouteInternal := {$IFDEF LCLLIB}@{$ENDIF}RouteCalculatorDoCalculateRoute;\r\nend;\r\n\r\nprocedure TTMSFNCCustomMaps.SetCircles(const Value: TTMSFNCMapsCircles);\r\nbegin\r\n FCircles.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCCustomMaps.SetElementContainers(\r\n const Value: TTMSFNCMapsElementContainers);\r\nbegin\r\n FElementContainers.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCCustomMaps.SetLabels(const Value: TTMSFNCMapsLabels);\r\nbegin\r\n FLabels.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCCustomMaps.SetLibraryLocation(\r\n const Value: TTMSFNCMapsLibraryLocation);\r\nbegin\r\n if FLibraryLocation <> Value then\r\n begin\r\n FLibraryLocation := Value;\r\n FMapInitialized := False;\r\n InitializeHTML;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomMaps.SetLocalFileAccess(const Value: Boolean);\r\nbegin\r\n if FLocalFileAccess <> Value then\r\n begin\r\n FLocalFileAccess := Value;\r\n FMapInitialized := False;\r\n InitializeHTML;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomMaps.SetMapInitialized(const Value: Boolean);\r\nbegin\r\n {$IFDEF WEBLIB}\r\n if MapInitialized and not Value then\r\n ExecuteJavaScript('ResetMap();');\r\n {$ENDIF}\r\n\r\n FMapInitialized := Value;\r\nend;\r\n\r\nprocedure TTMSFNCCustomMaps.SetMarkers(const Value: TTMSFNCMapsMarkers);\r\nbegin\r\n FMarkers.Assign(Value);\r\nend;\r\n\r\n{ TTMSFNCMapsFactoryService }\r\n\r\nconstructor TTMSFNCMapsFactoryService.Create;\r\nbegin\r\n inherited Create;\r\n FMaps := TTMSFNCMapsList.Create;\r\nend;\r\n\r\nfunction TTMSFNCMapsFactoryService.CreateMaps: ITMSFNCCustomMaps;\r\nbegin\r\n Result := DoCreateMaps;\r\n FMaps.Add(Result);\r\nend;\r\n\r\ndestructor TTMSFNCMapsFactoryService.Destroy;\r\nbegin\r\n FreeAndNil(FMaps);\r\n inherited Destroy;\r\nend;\r\n\r\nprocedure TTMSFNCMapsFactoryService.DestroyMaps(AMaps: ITMSFNCCustomMaps);\r\nbegin\r\n FMaps.Remove(AMaps);\r\nend;\r\n\r\n{ TTMSFNCMapsPlatformServices }\r\n\r\nprocedure TTMSFNCMapsPlatformServices.AddPlatformService(const AServiceGUID: TGUID; const AService: IInterface);\r\nvar\r\n LService: IInterface;\r\nbegin\r\n if not FServicesList.ContainsKey(GUIDToString(AServiceGUID)) then\r\n begin\r\n if Supports(AService, AServiceGUID, LService) then\r\n FServicesList.Add(TTMSFNCMapsPlatformServicesService.Create(GUIDToString(AServiceGUID), AService));\r\n end;\r\nend;\r\n\r\nconstructor TTMSFNCMapsPlatformServices.Create;\r\nbegin\r\n inherited;\r\n FServicesList := TTMSFNCMapsPlatformServicesList.Create;\r\nend;\r\n\r\ndestructor TTMSFNCMapsPlatformServices.Destroy;\r\nbegin\r\n FreeAndNil(FServicesList);\r\n inherited;\r\nend;\r\n\r\n{$IFNDEF AUTOREFCOUNT}\r\nclass procedure TTMSFNCMapsPlatformServices.ReleaseCurrent;\r\nbegin\r\n FreeAndNil(FCurrent);\r\n FCurrentReleased := True;\r\nend;\r\n{$ENDIF}\r\n\r\nclass function TTMSFNCMapsPlatformServices.Current: TTMSFNCMapsPlatformServices;\r\nbegin\r\n if (FCurrent = nil) and not FCurrentReleased then\r\n FCurrent := TTMSFNCMapsPlatformServices.Create;\r\n Result := FCurrent;\r\nend;\r\n\r\nfunction TTMSFNCMapsPlatformServices.GetPlatformService(const AServiceGUID: TGUID): IInterface;\r\nvar\r\n k: IInterface;\r\nbegin\r\n k := FServicesList.Interfaces[GUIDToString(AServiceGUID)];\r\n Supports(k, AServiceGUID, Result);\r\nend;\r\n\r\nprocedure TTMSFNCMapsPlatformServices.RemovePlatformService(const AServiceGUID: TGUID);\r\nbegin\r\n FServicesList.RemoveByGUID(GUIDToString(AServiceGUID));\r\nend;\r\n\r\nfunction TTMSFNCMapsPlatformServices.SupportsPlatformService(const AServiceGUID: TGUID;\r\n var AService: IInterface): Boolean;\r\nbegin\r\n if FServicesList.ContainsKey(GUIDToString(AServiceGUID)) then\r\n Result := Supports(FServicesList.Interfaces[GUIDToString(AServiceGUID)], AServiceGUID, AService)\r\n else\r\n begin\r\n AService := nil;\r\n Result := False;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCMapsPlatformServices.SupportsPlatformService(const AServiceGUID: TGUID): Boolean;\r\nbegin\r\n Result := FServicesList.ContainsKey(GUIDToString(AServiceGUID));\r\nend;\r\n\r\n{ TTMSFNCMapsPlatformServicesService }\r\n\r\nconstructor TTMSFNCMapsPlatformServicesService.Create(AGUID: string;\r\n AInterface: IInterface);\r\nbegin\r\n FGUID := AGUID;\r\n FInterface := AInterface;\r\nend;\r\n\r\n{ TTMSFNCMapsPlatformServicesList }\r\n\r\nfunction TTMSFNCMapsPlatformServicesList.ContainsKey(AGUID: string): Boolean;\r\nvar\r\n I: Integer;\r\nbegin\r\n Result := False;\r\n for I := 0 to Count - 1 do\r\n begin\r\n if Items[I].GUID = AGUID then\r\n begin\r\n Result := True;\r\n Break;\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCMapsPlatformServicesList.GetValue(AGUID: string): IInterface;\r\nvar\r\n I: Integer;\r\nbegin\r\n Result := nil;\r\n for I := 0 to Count - 1 do\r\n begin\r\n if Items[I].GUID = AGUID then\r\n begin\r\n Result := Items[I].&Interface;\r\n Break;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCMapsPlatformServicesList.RemoveByGUID(AGUID: string);\r\nvar\r\n I: Integer;\r\nbegin\r\n for I := Count - 1 downto 0 do\r\n begin\r\n if Items[I].GUID = AGUID then\r\n begin\r\n Remove(Items[I]);\r\n Break;\r\n end;\r\n end;\r\nend;\r\n\r\n{$IFDEF WEBLIB}\r\nfunction TTMSFNCMapsPlatformServicesList.GetItem(Index: Integer): TTMSFNCMapsPlatformServicesService;\r\nbegin\r\n Result := TTMSFNCMapsPlatformServicesService(inherited Items[Index]);\r\nend;\r\n\r\nprocedure TTMSFNCMapsPlatformServicesList.SetItem(Index: Integer; const Value: TTMSFNCMapsPlatformServicesService);\r\nbegin\r\n inherited Items[Index] := Value;\r\nend;\r\n\r\nfunction TTMSFNCMapsList.GetItem(Index: Integer): ITMSFNCCustomMaps;\r\nbegin\r\n Result := ITMSFNCCustomMaps(inherited Items[Index]);\r\nend;\r\n\r\nprocedure TTMSFNCMapsList.SetItem(Index: Integer; const Value: ITMSFNCCustomMaps);\r\nbegin\r\n inherited Items[Index] := Value;\r\nend;\r\n\r\nfunction TTMSFNCMapsLinksList.GetItem(Index: Integer): TTMSFNCMapsLink;\r\nbegin\r\n Result := TTMSFNCMapsLink(inherited Items[Index]);\r\nend;\r\n\r\nprocedure TTMSFNCMapsLinksList.SetItem(Index: Integer; const Value: TTMSFNCMapsLink);\r\nbegin\r\n inherited Items[Index] := Value;\r\nend;\r\n{$ENDIF}\r\n\r\n{ TTMSFNCMapsOptions }\r\n\r\nprocedure TTMSFNCMapsOptions.Assign(Source: TPersistent);\r\nbegin\r\n if (Source is TTMSFNCMapsOptions) then\r\n begin\r\n FDefaultLongitude := (Source as TTMSFNCMapsOptions).DefaultLongitude;\r\n FDefaultLatitude := (Source as TTMSFNCMapsOptions).DefaultLatitude;\r\n FConsole := (Source as TTMSFNCMapsOptions).Console;\r\n FShowZoomControl := (Source as TTMSFNCMapsOptions).ShowZoomControl;\r\n FShowMapTypeControl := (Source as TTMSFNCMapsOptions).ShowMapTypeControl;\r\n FZoomOnDblClick := (Source as TTMSFNCMapsOptions).ZoomOnDblClick;\r\n FZoomOnWheelScroll := (Source as TTMSFNCMapsOptions).ZoomOnWheelScroll;\r\n FPanning := (Source as TTMSFNCMapsOptions).Panning;\r\n end\r\n else\r\n inherited;\r\nend;\r\n\r\nprocedure TTMSFNCMapsOptions.Changed;\r\nbegin\r\n if Assigned(OnChange) then\r\n OnChange(Self);\r\nend;\r\n\r\nconstructor TTMSFNCMapsOptions.Create;\r\nbegin\r\n FZoomOnDblClick := True;\r\n FDefaultLatitude := DEFAULT_LATITUDE;\r\n FDefaultLongitude := DEFAULT_LONGITUDE;\r\n FDefaultZoomLevel := DEFAULT_ZOOMLEVEL;\r\n FShowZoomControl := True;\r\n FShowMapTypeControl := True;\r\n FLocale := DEFAULT_LOCALE;\r\n FZoomOnWheelScroll := True;\r\n FPanning := True;\r\nend;\r\n\r\nfunction TTMSFNCMapsOptions.IsDefaultLatitudeStored: Boolean;\r\nbegin\r\n Result := DefaultLatitude <> DEFAULT_LATITUDE;\r\nend;\r\n\r\nfunction TTMSFNCMapsOptions.IsDefaultLongitudeStored: Boolean;\r\nbegin\r\n Result := DefaultLongitude <> DEFAULT_LONGITUDE;\r\nend;\r\n\r\nfunction TTMSFNCMapsOptions.IsLocaleStored: Boolean;\r\nbegin\r\n Result := Locale <> DEFAULT_LOCALE;\r\nend;\r\n\r\nprocedure TTMSFNCMapsOptions.SetBackgroundColor(\r\n const Value: TTMSFNCGraphicsColor);\r\nbegin\r\n if FBackGroundColor <> Value then\r\n begin\r\n FBackgroundColor := Value;\r\n Changed;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCMapsOptions.SetConsole(const Value: Boolean);\r\nbegin\r\n if FConsole <> Value then\r\n begin\r\n FConsole := Value;\r\n Changed;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCMapsOptions.SetDefaultLatitude(const Value: Double);\r\nbegin\r\n if FDefaultLatitude <> Value then\r\n begin\r\n FDefaultLatitude := Value;\r\n Changed;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCMapsOptions.SetDefaultLongitude(const Value: Double);\r\nbegin\r\n if FDefaultLongitude <> Value then\r\n begin\r\n FDefaultLongitude := Value;\r\n Changed;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCMapsOptions.SetDefaultZoomLevel(const Value: Double);\r\nbegin\r\n if FDefaultZoomLevel <> Value then\r\n begin\r\n FDefaultZoomLevel := Value;\r\n Changed;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCMapsOptions.SetLocale(const Value: string);\r\nbegin\r\n if FLocale <> Value then\r\n begin\r\n FLocale := Value;\r\n Changed;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCMapsOptions.SetPanning(const Value: Boolean);\r\nbegin\r\n if FPanning <> Value then\r\n begin\r\n FPanning := Value;\r\n Changed;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCMapsOptions.SetShowMapTypeControl(const Value: Boolean);\r\nbegin\r\n if FShowMapTypeControl <> Value then\r\n begin\r\n FShowMapTypeControl := Value;\r\n Changed;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCMapsOptions.SetShowZoomControl(const Value: Boolean);\r\nbegin\r\n if FShowZoomControl <> Value then\r\n begin\r\n FShowZoomControl := Value;\r\n Changed;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCMapsOptions.SetZoomOnDblClick(const Value: Boolean);\r\nbegin\r\n if FZoomOnDblClick <> Value then\r\n begin\r\n FZoomOnDblClick := Value;\r\n Changed;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCMapsOptions.SetZoomOnWheelScroll(const Value: Boolean);\r\nbegin\r\n if FZoomOnWheelScroll <> Value then\r\n begin\r\n FZoomOnWheelScroll := Value;\r\n Changed;\r\n end;\r\nend;\r\n\r\n{ TTMSFNCCustomMapsInterfacedObject }\r\n\r\ndestructor TTMSFNCCustomMapsInterfacedObject.Destroy;\r\nbegin\r\n FMapsProperties := nil;\r\n inherited;\r\nend;\r\n\r\nfunction TTMSFNCCustomMapsInterfacedObject.GetMapsProperties: ITMSFNCCustomMapsProperties;\r\nbegin\r\n Result := FMapsProperties;\r\nend;\r\n\r\nprocedure TTMSFNCCustomMapsInterfacedObject.SetMapsProperties(\r\n const Value: ITMSFNCCustomMapsProperties);\r\nbegin\r\n FMapsProperties := Value;\r\nend;\r\n\r\n{ TTMSFNCCustomMaps }\r\n\r\nfunction TTMSFNCCustomMaps.CanLoadDefaultHTML: Boolean;\r\nbegin\r\n Result := False;\r\nend;\r\n\r\nfunction TTMSFNCCustomMaps.GetDefaultLatitude: string;\r\nbegin\r\n Result := TTMSFNCUtils.FloatToStrDot(Options.DefaultLatitude);\r\nend;\r\n\r\nfunction TTMSFNCCustomMaps.GetDefaultLongitude: string;\r\nbegin\r\n Result := TTMSFNCUtils.FloatToStrDot(Options.DefaultLongitude);\r\nend;\r\n\r\nfunction TTMSFNCCustomMaps.GetDefaultZoomLevel: string;\r\nbegin\r\n Result := FloatToStr(Options.DefaultZoomLevel);\r\nend;\r\n\r\nfunction TTMSFNCCustomMaps.AddPolyline(ACoordinates: TTMSFNCMapsCoordinateRecArray; AClose: Boolean = False): TTMSFNCMapsPolyline;\r\nvar\r\n I: Integer;\r\n co: TTMSFNCMapsCoordinateItem;\r\nbegin\r\n Result := nil;\r\n if Length(ACoordinates) = 0 then\r\n Exit;\r\n\r\n BeginUpdate;\r\n Result := Polylines.Add;\r\n for I := 0 to Length(ACoordinates) - 1 do\r\n begin\r\n co := Result.Coordinates.Add;\r\n co.Coordinate.Longitude := ACoordinates[I].Longitude;\r\n co.Coordinate.Latitude := ACoordinates[I].Latitude;\r\n end;\r\n\r\n if AClose then\r\n begin\r\n co := Result.Coordinates.Add;\r\n co.Assign(Result.Coordinates[0]);\r\n end;\r\n EndUpdate;\r\nend;\r\n\r\nfunction TTMSFNCCustomMaps.AddPolygon(ACoordinates: TTMSFNCMapsCoordinateRecArray; AClose: Boolean = False): TTMSFNCMapsPolygon;\r\nvar\r\n I: Integer;\r\n co: TTMSFNCMapsCoordinateItem;\r\nbegin\r\n Result := nil;\r\n if Length(ACoordinates) = 0 then\r\n Exit;\r\n\r\n BeginUpdate;\r\n Result := Polygons.Add;\r\n for I := 0 to Length(ACoordinates) - 1 do\r\n begin\r\n co := Result.Coordinates.Add;\r\n co.Coordinate.Longitude := ACoordinates[I].Longitude;\r\n co.Coordinate.Latitude := ACoordinates[I].Latitude;\r\n end;\r\n\r\n if AClose then\r\n begin\r\n co := Result.Coordinates.Add;\r\n co.Assign(Result.Coordinates[0]);\r\n end;\r\n EndUpdate;\r\nend;\r\n\r\nfunction TTMSFNCCustomMaps.AddCircle(ACenter: TTMSFNCMapsCoordinateRec; ARadius: Double = 10000): TTMSFNCMapsCircle;\r\nbegin\r\n BeginUpdate;\r\n Result := Circles.Add;\r\n Result.Center.ToRec := ACenter;\r\n Result.Radius := ARadius;\r\n EndUpdate;\r\nend;\r\n\r\nfunction TTMSFNCCustomMaps.ShowPopup(ACoordinate: TTMSFNCMapsCoordinateRec; AText: string; AOffsetX: Double = 0; AOffsetY: Double = 0; APanMap: Boolean = True): string;\r\nvar\r\n p: TTMSFNCMapsPopup;\r\nbegin\r\n p := TTMSFNCMapsPopup.Create;\r\n try\r\n Result := p.ID;\r\n p.Text := AText;\r\n p.OffsetX := AOffsetX;\r\n p.OffsetY := AOffsetY;\r\n p.Coordinate.ToRec := ACoordinate;\r\n p.PanMap := APanMap;\r\n ExecuteJavaScript(SHOWPOPUPFUNCTION + '(' + p.JSON + ')');\r\n finally\r\n p.Free;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCCustomMaps.ShowPopup(ALatitude: Double; ALongitude: Double; AText: string; AOffsetX: Double = 0; AOffsetY: Double = 0; APanMap: Boolean = True): string;\r\nbegin\r\n Result := ShowPopup(CreateCoordinate(ALatitude, ALongitude), AText, AOffsetX, AOffsetY, APanMap);\r\nend;\r\n\r\nprocedure TTMSFNCCustomMaps.SyncLabels(\r\n ACollection: TTMSFNCMapsElementContainers);\r\nvar\r\n l: TTMSFNCMapsLabel;\r\n el: TTMSFNCMapsElementContainer;\r\n I: Integer;\r\n style: string;\r\nbegin\r\n for I := 0 to Labels.Count - 1 do\r\n begin\r\n l := Labels[I];\r\n el := ACollection.Add;\r\n el.HTMLElementID := 'ElementContainerLabel' + IntToStr(I);\r\n el.Visible := l.Visible;\r\n el.HTML.Text := l.Text;\r\n el.LabelType := l.LabelType;\r\n\r\n el.Coordinate.Assign(l.Coordinate);\r\n el.Bounds.Assign(l.Bounds);\r\n\r\n if l.Position = ptCoordinate then\r\n el.Position := poCoordinate\r\n else if l.Position = ptBounds then\r\n el.Position := poBounds;\r\n\r\n style := '';\r\n\r\n if l.BackgroundColor <> gcNull then\r\n begin\r\n style := style + 'background-color:' + TTMSFNCGraphics.ColorToHTML(l.BackgroundColor) + ';';\r\n style := style + 'padding:5px;border-radius:5px;';\r\n end\r\n else\r\n begin\r\n style := style + 'text-shadow:-1px -1px 0 rgba(255,255,255, 0.5),1px -1px 0 rgba(255,255,255, 0.5),-1px 1px 0 rgba(255,255,255, 0.5),1px 1px 0 rgba(255,255,255, 0.5);';\r\n end;\r\n\r\n if l.BorderColor <> gcNull then\r\n begin\r\n style := style + 'border-color: ' + TTMSFNCGraphics.ColorToHTML(l.BorderColor) + ';';\r\n if l.BorderWidth > 0 then\r\n begin\r\n style := style + 'border-style:solid;';\r\n style := style + 'border-width:' + IntToStr(l.BorderWidth) + 'px;';\r\n end;\r\n end;\r\n\r\n if l.Font.Color <> gcNull then\r\n begin\r\n style := style + 'color:' + TTMSFNCGraphics.ColorToHTML(l.Font.Color) + ';';\r\n end;\r\n\r\n if l.Font.Name <> '' then\r\n begin\r\n style := style + 'font-family:\"' + l.Font.Name + '\";';\r\n end\r\n else\r\n begin\r\n style := style + 'font-family:\"Roboto\";';\r\n end;\r\n\r\n {$IFNDEF LCLWEBLIB}\r\n if TFontStyle.fsBold in l.Font.Style then\r\n begin\r\n style := style + 'font-weight:bold;'\r\n end;\r\n\r\n if TFontStyle.fsItalic in l.Font.Style then\r\n begin\r\n style := style + 'font-style:italic;'\r\n end;\r\n\r\n if TFontStyle.fsUnderline in l.Font.Style then\r\n begin\r\n style := style + 'text-decoration:underline;'\r\n end;\r\n\r\n if TFontStyle.fsStrikeOut in l.Font.Style then\r\n begin\r\n style := style + 'text-decoration-line:line-through;'\r\n end;\r\n {$ENDIF}\r\n\r\n style := style + 'font-size:' + TTMSFNCUtils.FloatToStrDot(l.Font.Size) + 'px;';\r\n\r\n el.Style.Text := '.' + el.HTMLElementID + '{' + style + '}';\r\n el.HTMLElementClassName := el.HTMLElementID;\r\n el.UseDefaultStyle := False;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomMaps.CloseAllPopups;\r\nbegin\r\n ExecuteJavaScript(GETPOPUPARRAYVAR, {$IFDEF LCLWEBLIB}@{$ENDIF}DoCloseAllPopups);\r\nend;\r\n\r\nprocedure TTMSFNCCustomMaps.ClosePopup(AID: string);\r\nbegin\r\n ExecuteJavaScript(CLOSEPOPUPFUNCTION + '({\"ID\": \"' + AID + '\"})');\r\nend;\r\n\r\nfunction TTMSFNCCustomMaps.AddRectangle(ABounds: TTMSFNCMapsBoundsRec): TTMSFNCMapsRectangle;\r\nbegin\r\n BeginUpdate;\r\n Result := Rectangles.Add;\r\n Result.Bounds.ToRec := ABounds;\r\n EndUpdate;\r\nend;\r\n\r\nprocedure TTMSFNCCustomMaps.ConnectMarkers(AMarkersArray: TTMSFNCMapsMarkersArray);\r\nvar\r\n I: Integer;\r\n arr: TTMSFNCMapsCoordinateRecArray;\r\nbegin\r\n BeginUpdate;\r\n if Length(AMarkersArray) <= 1 then\r\n Exit;\r\n\r\n for I := 0 to Length(AMarkersArray) - 2 do\r\n begin\r\n SetLength(arr, Length(arr) + 1);\r\n arr[Length(arr) - 1] := AMarkersArray[I].Coordinate.ToRec;\r\n SetLength(arr, Length(arr) + 1);\r\n arr[Length(arr) - 1] := AMarkersArray[I + 1].Coordinate.ToRec;\r\n end;\r\n\r\n SetLength(arr, Length(arr) + 1);\r\n arr[Length(arr) - 1] := AMarkersArray[Length(AMarkersArray) - 1].Coordinate.ToRec;\r\n SetLength(arr, Length(arr) + 1);\r\n arr[Length(arr) - 1] := AMarkersArray[0].Coordinate.ToRec;\r\n\r\n AddPolyline(arr);\r\n\r\n EndUpdate;\r\nend;\r\n\r\nfunction TTMSFNCCustomMaps.AddElementContainer(AHTML, AStyle, AScript: TStrings;\r\n APosition: TTMSFNCMapsPosition; AHTMLElementID: string): TTMSFNCMapsElementContainer;\r\nbegin\r\n BeginUpdate;\r\n Result := ElementContainers.Add;\r\n if Assigned(AHTML) then\r\n Result.HTML.Assign(AHTML);\r\n if Assigned(AStyle) then\r\n Result.Style.Assign(AStyle);\r\n if Assigned(AScript) then\r\n Result.Script.Assign(AScript);\r\n Result.Position := APosition;\r\n if AHTMLElementID <> '' then\r\n Result.HTMLElementID := AHTMLElementID;\r\n EndUpdate;\r\nend;\r\n\r\nfunction TTMSFNCCustomMaps.AddHeadLink(AURL: string; AKind: TTMSFNCMapsLinkKind;\r\n ARel: string): TTMSFNCMapsHeadLink;\r\nbegin\r\n BeginUpdate;\r\n Result := HeadLinks.Add;\r\n Result.URL := AURL;\r\n Result.Kind := AKind;\r\n Result.Rel := ARel;\r\n EndUpdate;\r\nend;\r\n\r\nfunction TTMSFNCCustomMaps.AddHeatMap(\r\n ACoordinates: TTMSFNCMapsCoordinateRecArray): TTMSFNCMapsHeatMap;\r\nvar\r\n I: Integer;\r\n wc: TTMSFNCMapsWeightedCoordinate;\r\nbegin\r\n BeginUpdate;\r\n Result := HeatMaps.Add;\r\n for I := 0 to Length(ACoordinates) - 1 do\r\n begin\r\n wc := Result.WeightedCoordinates.Add;\r\n wc.Coordinate.Latitude := ACoordinates[I].Latitude;\r\n wc.Coordinate.Longitude := ACoordinates[I].Longitude;\r\n wc.Weight := ACoordinates[I].Weight;\r\n end;\r\n EndUpdate;\r\nend;\r\n\r\nfunction TTMSFNCCustomMaps.AddLabel(ALatitude, ALongitude: Double;\r\n AText: string; AFontColor: TTMSFNCGraphicsColor = gcNull; ABackgroundColor: TTMSFNCGraphicsColor = gcNull): TTMSFNCMapsLabel;\r\nbegin\r\n BeginUpdate;\r\n Result := Labels.Add;\r\n Result.Text := AText;\r\n Result.Coordinate.Longitude := ALongitude;\r\n Result.Coordinate.Latitude := ALatitude;\r\n Result.BackgroundColor := ABackgroundColor;\r\n Result.Font.Color := AFontColor;\r\n Result.Position := ptCoordinate;\r\n EndUpdate;\r\nend;\r\n\r\nfunction TTMSFNCCustomMaps.AddLabel(ANorthEastLatitude, ANorthEastLongitude,\r\n ASouthWestLatitude, ASouthWestLongitude: Double; AText: string; AFontColor,\r\n ABackgroundColor: TTMSFNCGraphicsColor): TTMSFNCMapsLabel;\r\nbegin\r\n BeginUpdate;\r\n Result := Labels.Add;\r\n Result.Text := AText;\r\n Result.Bounds.NorthEast.Longitude := ANorthEastLongitude;\r\n Result.Bounds.NorthEast.Latitude := ANorthEastLatitude;\r\n Result.Bounds.SouthWest.Longitude := ASouthWestLongitude;\r\n Result.Bounds.SouthWest.Latitude := ASouthWestLatitude;\r\n Result.BackgroundColor := ABackgroundColor;\r\n Result.Font.Color := AFontColor;\r\n Result.Position := ptBounds;\r\n EndUpdate;\r\nend;\r\n\r\nfunction TTMSFNCCustomMaps.AddLabel(ABounds: TTMSFNCMapsBoundsRec; AText: string;\r\n AFontColor, ABackgroundColor: TTMSFNCGraphicsColor): TTMSFNCMapsLabel;\r\nbegin\r\n Result := AddLabel(ABounds.NorthEast.Latitude, ABounds.NorthEast.Longitude, ABounds.SouthWest.Latitude, ABounds.SouthWest.Longitude, AText, AFontColor, ABackgroundColor);\r\nend;\r\n\r\nfunction TTMSFNCCustomMaps.AddLabel(ACoordinate: TTMSFNCMapsCoordinateRec;\r\n AText: string; AFontColor: TTMSFNCGraphicsColor = gcNull; ABackgroundColor: TTMSFNCGraphicsColor = gcNull): TTMSFNCMapsLabel;\r\nbegin\r\n Result := AddLabel(ACoordinate.Latitude, ACoordinate.Longitude, AText, AFontColor, ABackgroundColor);\r\nend;\r\n\r\nfunction TTMSFNCCustomMaps.AddMarker(ALatitude: Double; ALongitude: Double; ATitle: string = ''; AIconURL: string = ''): TTMSFNCMapsMarker;\r\nbegin\r\n BeginUpdate;\r\n Result := Markers.Add;\r\n Result.Title := ATitle;\r\n Result.Coordinate.Longitude := ALongitude;\r\n Result.Coordinate.Latitude := ALatitude;\r\n Result.IconURL := AIconURL;\r\n EndUpdate;\r\nend;\r\n\r\nfunction TTMSFNCCustomMaps.AddMarker(ACoordinate: TTMSFNCMapsCoordinateRec; ATitle: string = ''; AIconURL: string = ''): TTMSFNCMapsMarker;\r\nbegin\r\n Result := AddMarker(ACoordinate.Latitude, ACoordinate.Longitude, ATitle, AIconURL);\r\nend;\r\n\r\n{ TTMSFNCMapsMarker }\r\n\r\nprocedure TTMSFNCMapsMarker.Assign(Source: TPersistent);\r\nbegin\r\n if Source is TTMSFNCMapsMarker then\r\n begin\r\n FCoordinate.Assign((Source as TTMSFNCMapsMarker).Coordinate);\r\n FTitle := (Source as TTMSFNCMapsMarker).Title;\r\n FIconURL := (Source as TTMSFNCMapsMarker).IconURL;\r\n FVisible := (Source as TTMSFNCMapsMarker).Visible;\r\n FDefaultIcon.Assign((Source as TTMSFNCMapsMarker).DefaultIcon);\r\n end;\r\nend;\r\n\r\nconstructor TTMSFNCMapsMarker.Create(ACollection: TCollection);\r\nbegin\r\n inherited;\r\n if Assigned(ACollection) then\r\n FOwner := (Collection as TTMSFNCMapsMarkers).FOwner;\r\n\r\n FTitle := DEFAULT_MARKERTEXT;\r\n FCoordinate := TTMSFNCMapsCoordinate.Create;\r\n FCoordinate.OnChange := @CoordinateChanged;\r\n FVisible := True;\r\n FUseDefaultMarkerIcon := False;\r\n FDefaultMarkerIconColor := gcRed;\r\n FDefaultMarkerIconSize := 32;\r\n FDefaultIcon := TTMSFNCMapsMarkerIcon.Create(Self);\r\n\r\n UpdateMarker;\r\nend;\r\n\r\ndestructor TTMSFNCMapsMarker.Destroy;\r\nbegin\r\n FCoordinate.Free;\r\n FDefaultIcon.Free;\r\n inherited;\r\n UpdateMarker;\r\nend;\r\n\r\nfunction TTMSFNCMapsMarker.GetID: string;\r\nbegin\r\n if (FID = '') or FRecreate then\r\n FID := CreateNewGUID;\r\n\r\n FRecreate := False;\r\n Result := FID;\r\nend;\r\n\r\nfunction TTMSFNCMapsMarker.GetLatitude: Double;\r\nbegin\r\n Result := Coordinate.Latitude;\r\nend;\r\n\r\nfunction TTMSFNCMapsMarker.GetLongitude: Double;\r\nbegin\r\n Result := Coordinate.Longitude;\r\nend;\r\n\r\nfunction TTMSFNCMapsMarker.IsIconURLStored: Boolean;\r\nbegin\r\n Result := IconURL <> '';\r\nend;\r\n\r\nfunction TTMSFNCMapsMarker.IsLatitudeStored: Boolean;\r\nbegin\r\n Result := Latitude <> DEFAULT_LATITUDE;\r\nend;\r\n\r\nfunction TTMSFNCMapsMarker.IsLongitudeStored: Boolean;\r\nbegin\r\n Result := Longitude <> DEFAULT_LONGITUDE;\r\nend;\r\n\r\nfunction TTMSFNCMapsMarker.IsTitleStored: Boolean;\r\nbegin\r\n Result := Title <> DEFAULT_MARKERTEXT;\r\nend;\r\n\r\nprocedure TTMSFNCMapsMarker.CoordinateChanged(Sender: TObject);\r\nbegin\r\n UpdateMarker;\r\nend;\r\n\r\nprocedure TTMSFNCMapsMarker.SetCoordinate(const Value: TTMSFNCMapsCoordinate);\r\nbegin\r\n if FCoordinate <> Value then\r\n begin\r\n FCoordinate.Assign(Value);\r\n UpdateMarker;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCMapsMarker.SetDefaultIcon(const Value: TTMSFNCMapsMarkerIcon);\r\nbegin\r\n if FDefaultIcon <> Value then\r\n begin\r\n FDefaultIcon.Assign(Value);\r\n UpdateMarker\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCMapsMarker.SetIconURL(const Value: string);\r\nbegin\r\n if FIconURL <> Value then\r\n begin\r\n FIconURL := Value;\r\n UpdateMarker;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCMapsMarker.SetLatitude(const Value: Double);\r\nbegin\r\n Coordinate.Latitude := Value;\r\nend;\r\n\r\nprocedure TTMSFNCMapsMarker.SetLongitude(const Value: Double);\r\nbegin\r\n Coordinate.Longitude := Value;\r\nend;\r\n\r\nprocedure TTMSFNCMapsMarker.SetTitle(const Value: string);\r\nbegin\r\n if FTitle <> Value then\r\n begin\r\n FTitle := Value;\r\n UpdateMarker;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCMapsMarker.SetVisible(const Value: Boolean);\r\nbegin\r\n if FVisible <> Value then\r\n begin\r\n FVisible := Value;\r\n UpdateMarker;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCMapsMarker.UpdateMarker;\r\nbegin\r\n FReload := True;\r\n if Assigned(FOwner) then\r\n FOwner.UpdateMarkers;\r\nend;\r\n\r\n{ TTMSFNCMapsMarkers }\r\n\r\nfunction TTMSFNCMapsMarkers.Add: TTMSFNCMapsMarker;\r\nbegin\r\n Result := TTMSFNCMapsMarker(inherited Add);\r\nend;\r\n\r\nprocedure TTMSFNCMapsMarkers.Clear;\r\nvar\r\n l: TTMSFNCCustomMaps;\r\n ci: TCollectionItem;\r\nbegin\r\n l := FOwner;\r\n if Assigned(l) then\r\n l.BeginUpdate;\r\n\r\n if Count > 0 then\r\n begin\r\n while Count > 0 do\r\n begin\r\n ci := TCollectionItem(Items[Count - 1]);\r\n ci.Free;\r\n end;\r\n end;\r\n\r\n if Assigned(l) then\r\n l.EndUpdate;\r\nend;\r\n\r\nconstructor TTMSFNCMapsMarkers.Create(AOwner: TTMSFNCCustomMaps);\r\nbegin\r\n inherited Create(AOwner, CreateItemClass);\r\n FOwner := AOwner;\r\nend;\r\n\r\nfunction TTMSFNCMapsMarkers.CreateItemClass: TCollectionItemClass;\r\nbegin\r\n Result := TTMSFNCMapsMarker;\r\nend;\r\n\r\nfunction TTMSFNCMapsMarkers.GetItem(\r\n Index: Integer): TTMSFNCMapsMarker;\r\nbegin\r\n Result := TTMSFNCMapsMarker(inherited Items[Index]);\r\nend;\r\n\r\nfunction TTMSFNCMapsMarkers.GetItemByID(ID: string): TTMSFNCMapsMarker;\r\nvar\r\n I: Integer;\r\n m: TTMSFNCMapsMarker;\r\nbegin\r\n Result := nil;\r\n for I := 0 to Count - 1 do\r\n begin\r\n m := Items[I];\r\n if m.ID = ID then\r\n begin\r\n Result := m;\r\n Break;\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCMapsMarkers.GetOwner: TPersistent;\r\nbegin\r\n Result := FOwner;\r\nend;\r\n\r\nfunction TTMSFNCMapsMarkers.Insert(\r\n Index: Integer): TTMSFNCMapsMarker;\r\nbegin\r\n Result := TTMSFNCMapsMarker(inherited Insert(Index));\r\nend;\r\n\r\nprocedure TTMSFNCMapsMarkers.Recreate;\r\nvar\r\n I: Integer;\r\nbegin\r\n for I := 0 to Count - 1 do\r\n Items[I].Recreate := True;\r\nend;\r\n\r\nprocedure TTMSFNCMapsMarkers.SetItem(Index: Integer;\r\n const Value: TTMSFNCMapsMarker);\r\nbegin\r\n inherited Items[Index] := Value;\r\nend;\r\n\r\nfunction TTMSFNCMapsMarkers.ToCoordinateArray: TTMSFNCMapsCoordinateRecArrayArray;\r\nvar\r\n I: Integer;\r\n arr: TTMSFNCMapsCoordinateRecArray;\r\nbegin\r\n SetLength(Result, Count);\r\n for I := 0 to Count - 1 do\r\n begin\r\n SetLength(arr, 1);\r\n arr[0] := Items[I].Coordinate.ToRec;\r\n Result[I] := arr;\r\n end;\r\nend;\r\n\r\n{ TTMSFNCMapsPolyline }\r\n\r\nfunction TTMSFNCMapsPolyline.Distance: Double;\r\nvar\r\n I: Integer;\r\nbegin\r\n Result := 0;\r\n for I := 0 to Coordinates.Count - 2 do\r\n begin\r\n Result := Result + MeasureDistance(Coordinates[I].Coordinate.ToRec, Coordinates[I + 1].Coordinate.ToRec);\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCMapsPolyline.Merge(\r\n ACoordinates: TTMSFNCMapsCoordinateRecArray);\r\nvar\r\n I: Integer;\r\n c: TTMSFNCMapsCoordinateItem;\r\nbegin\r\n for I := 0 to Length(ACoordinates) - 1 do\r\n begin\r\n c:= Coordinates.Add;\r\n c.Latitude := ACoordinates[I].Latitude;\r\n c.Longitude := ACoordinates[I].Longitude;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCMapsPolyline.Merge(APolyline: TTMSFNCMapsPolyline);\r\nbegin\r\n if not Assigned(APolyline) then\r\n Exit;\r\n\r\n Merge(APolyline.Coordinates.ToArray);\r\nend;\r\n\r\nfunction TTMSFNCMapsPolyline.Segment(AStartIndex,\r\n AEndIndex: Integer): TTMSFNCMapsPolyline;\r\nvar\r\n c, cr: TTMSFNCMapsCoordinateRecArray;\r\n I, J: Integer;\r\nbegin\r\n Result := nil;\r\n\r\n if (AStartIndex >= 0) and (AStartIndex < Coordinates.Count) and (AEndIndex >= 0) and (AEndIndex < Coordinates.Count) then\r\n begin\r\n if (AStartIndex <= AEndIndex) then\r\n begin\r\n c := Copy(Coordinates.ToArray, AStartIndex, AEndIndex - AStartIndex + 1);\r\n Result := FOwner.AddPolyline(c);\r\n end\r\n else\r\n begin\r\n c := Copy(Coordinates.ToArray, AEndIndex, AStartIndex - AEndIndex + 1);\r\n\r\n SetLength(cr, Length(c));\r\n J := 0;\r\n for I := Length(c) - 1 downto 0 do\r\n begin\r\n cr[J] := c[I];\r\n J := J + 1;\r\n end;\r\n Result := FOwner.AddPolyline(cr);\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCMapsPolyline.Segment(AStartCoordinate,\r\n AEndCoordinate: TTMSFNCMapsCoordinateRec): TTMSFNCMapsPolyline;\r\nvar\r\n I: Integer;\r\n StartIndex, EndIndex: Integer;\r\nbegin\r\n StartIndex := -1;\r\n EndIndex := -1;\r\n\r\n for I := 0 to Coordinates.Count - 1 do\r\n begin\r\n if SameValue(AStartCoordinate.Latitude, Coordinates[I].Latitude) and SameValue(AStartCoordinate.Longitude, Coordinates[I].Longitude) then\r\n begin\r\n StartIndex := I;\r\n end;\r\n if SameValue(AEndCoordinate.Latitude, Coordinates[I].Latitude) and SameValue(AEndCoordinate.Longitude, Coordinates[I].Longitude) then\r\n begin\r\n EndIndex := I;\r\n end;\r\n end;\r\n\r\n Result := Segment(StartIndex, EndIndex);\r\nend;\r\n\r\nfunction TTMSFNCMapsPolyline.Split(\r\n AIndex: Integer): TTMSFNCMapsPolyline;\r\nvar\r\n J: Integer;\r\n c1, c2: TTMSFNCMapsCoordinateRecArray;\r\n c: TTMSFNCMapsCoordinateItem;\r\nbegin\r\n Result := nil;\r\n\r\n if (AIndex >= 0) and (AIndex < Coordinates.Count) then\r\n begin\r\n c2 := Copy(Coordinates.ToArray, AIndex, Length(Coordinates.ToArray));\r\n Result := FOwner.AddPolyline(c2);\r\n\r\n c1 := Copy(Coordinates.ToArray, 0, AIndex);\r\n Coordinates.Clear;\r\n for J := 0 to Length(c1) - 1 do\r\n begin\r\n c := Coordinates.Add;\r\n c.Latitude := c1[J].Latitude;\r\n c.Longitude := c1[J].Longitude;\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCMapsPolyline.Split(\r\n ACoordinate: TTMSFNCMapsCoordinateRec): TTMSFNCMapsPolyline;\r\nvar\r\n I: Integer;\r\nbegin\r\n Result := nil;\r\n\r\n for I := 0 to Coordinates.Count - 1 do\r\n begin\r\n if SameValue(ACoordinate.Latitude, Coordinates[I].Latitude) and SameValue(ACoordinate.Longitude, Coordinates[I].Longitude) then\r\n begin\r\n Result := Split(I);\r\n Exit;\r\n end;\r\n end;\r\nend;\r\n\r\n{ TTMSFNCMapsPolyElement }\r\n\r\nfunction TTMSFNCMapsPolyElement.AddHole(\r\n ACoordinates: TTMSFNCMapsCoordinateRecArray): TTMSFNCMapsPolyElementHole;\r\nvar\r\n I: Integer;\r\n co: TTMSFNCMapsCoordinateItem;\r\nbegin\r\n Result := nil;\r\n if Length(ACoordinates) = 0 then\r\n Exit;\r\n\r\n BeginUpdate;\r\n Result := Holes.Add;\r\n for I := 0 to Length(ACoordinates) - 1 do\r\n begin\r\n co := Result.Coordinates.Add;\r\n co.Coordinate.Longitude := ACoordinates[I].Longitude;\r\n co.Coordinate.Latitude := ACoordinates[I].Latitude;\r\n end;\r\n EndUpdate;\r\nend;\r\n\r\nfunction TTMSFNCMapsPolyElement.Area: Double;\r\nbegin\r\n Result := MeasureArea(FCoordinates.ToArray);\r\nend;\r\n\r\nprocedure TTMSFNCMapsPolyElement.Assign(Source: TPersistent);\r\nbegin\r\n if Source is TTMSFNCMapsPolyElement then\r\n begin\r\n FCoordinates.Assign((Source as TTMSFNCMapsPolyElement).Coordinates);\r\n FStrokeColor := (Source as TTMSFNCMapsPolyElement).StrokeColor;\r\n FStrokeOpacity := (Source as TTMSFNCMapsPolyElement).StrokeOpacity;\r\n FStrokeWidth := (Source as TTMSFNCMapsPolyElement).StrokeWidth;\r\n FVisible := (Source as TTMSFNCMapsPolyElement).Visible;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCMapsPolyElement.BeginUpdate;\r\nbegin\r\n if Assigned(FOwner) then\r\n FOwner.BeginUpdate;\r\nend;\r\n\r\nfunction TTMSFNCMapsPolyElement.ContainsPoint(\r\n ACoordinate: TTMSFNCMapsCoordinateRec): Boolean;\r\nbegin\r\n Result := IsPointInArea(ACoordinate.Latitude, ACoordinate.Longitude, FCoordinates.ToArray);\r\nend;\r\n\r\nconstructor TTMSFNCMapsPolyElement.Create(ACollection: TCollection);\r\nbegin\r\n inherited;\r\n if Assigned(ACollection) then\r\n FOwner := (Collection as TTMSFNCMapsPolyElements).FOwner;\r\n\r\n FCoordinates := TTMSFNCMapsCoordinates.Create(Self);\r\n FCoordinates.OnBeginUpdate := DoBeginUpdate;\r\n FCoordinates.OnEndUpdate := DoEndUpdate;\r\n FCoordinates.OnUpdateCoordinates := DoUpdateCoordinates;\r\n\r\n FStrokeColor := gcBlack;\r\n FStrokeOpacity := 1.0;\r\n FStrokeWidth := 2;\r\n FVisible := True;\r\n\r\n FHoles := TTMSFNCMapsPolyElementHoles.Create(Self);\r\n\r\n UpdatePolyElement;\r\nend;\r\n\r\ndestructor TTMSFNCMapsPolyElement.Destroy;\r\nbegin\r\n FCoordinates.Free;\r\n FHoles.Free;\r\n inherited;\r\n UpdatePolyElement;\r\nend;\r\n\r\nprocedure TTMSFNCMapsPolyElement.DoBeginUpdate(Sender: TObject);\r\nbegin\r\n if Assigned(FOwner) then\r\n FOwner.BeginUpdate;\r\nend;\r\n\r\nprocedure TTMSFNCMapsPolyElement.DoEndUpdate(Sender: TObject);\r\nbegin\r\n if Assigned(FOwner) then\r\n FOwner.EndUpdate;\r\nend;\r\n\r\nprocedure TTMSFNCMapsPolyElement.DoUpdateCoordinates(Sender: TObject);\r\nbegin\r\n if Assigned(FOwner) then\r\n FOwner.UpdatePolyElements;\r\nend;\r\n\r\nprocedure TTMSFNCMapsPolyElement.EndUpdate;\r\nbegin\r\n if Assigned(FOwner) then\r\n FOwner.EndUpdate;\r\nend;\r\n\r\nfunction TTMSFNCMapsPolyElement.GetID: string;\r\nbegin\r\n if (FID = '') or FRecreate then\r\n FID := CreateNewGUID;\r\n FRecreate := False;\r\n Result := FID;\r\nend;\r\n\r\nfunction TTMSFNCMapsPolyElement.IsStrokeOpacityStored: Boolean;\r\nbegin\r\n Result := StrokeOpacity <> 1;\r\nend;\r\n\r\nprocedure TTMSFNCMapsPolyElement.SetStrokeColor(\r\n const Value: TTMSFNCGraphicsColor);\r\nbegin\r\n if FStrokeColor <> Value then\r\n begin\r\n FStrokeColor := Value;\r\n UpdatePolyElement;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCMapsPolyElement.SetStrokeOpacity(const Value: Single);\r\nbegin\r\n if FStrokeOpacity <> Value then\r\n begin\r\n FStrokeOpacity := Value;\r\n UpdatePolyElement;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCMapsPolyElement.SetStrokeWidth(const Value: Integer);\r\nbegin\r\n if FStrokeWidth <> Value then\r\n begin\r\n FStrokeWidth := Value;\r\n UpdatePolyElement;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCMapsPolyElement.SetVisible(const Value: Boolean);\r\nbegin\r\n if FVisible <> Value then\r\n begin\r\n FVisible := Value;\r\n UpdatePolyElement;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCMapsPolyElement.UpdatePolyElement;\r\nbegin\r\n if Assigned(FOwner) then\r\n begin\r\n FReload := True;\r\n FOwner.UpdatePolyElements;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCMapsPolyElement.SetCoordinates(\r\n const Value: TTMSFNCMapsCoordinates);\r\nbegin\r\n if FCoordinates <> Value then\r\n begin\r\n FCoordinates.Assign(Value);\r\n UpdatePolyElement;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCMapsPolyElement.SetHoles(\r\n const Value: TTMSFNCMapsPolyElementHoles);\r\nbegin\r\n if FHoles <> Value then\r\n begin\r\n FHoles.Assign(Value);\r\n UpdatePolyElement;\r\n end;\r\nend;\r\n\r\n{ TTMSFNCMapsPolyElementHoles }\r\n\r\nfunction TTMSFNCMapsPolyElementHoles.Add: TTMSFNCMapsPolyElementHole;\r\nbegin\r\n Result := TTMSFNCMapsPolyElementHole(inherited Add);\r\nend;\r\n\r\nprocedure TTMSFNCMapsPolyElementHoles.Clear;\r\nbegin\r\n//\r\nend;\r\n\r\nconstructor TTMSFNCMapsPolyElementHoles.Create(AOwner: TTMSFNCMapsPolyElement);\r\nbegin\r\n inherited Create(AOwner, CreateItemClass);\r\n FOwner := AOwner;\r\nend;\r\n\r\nfunction TTMSFNCMapsPolyElementHoles.CreateItemClass: TCollectionItemClass;\r\nbegin\r\n Result := TTMSFNCMapsPolyElementHole;\r\nend;\r\n\r\nfunction TTMSFNCMapsPolyElementHoles.GetItem(\r\n Index: Integer): TTMSFNCMapsPolyElementHole;\r\nbegin\r\n Result := TTMSFNCMapsPolyElementHole(inherited Items[Index]);\r\nend;\r\n\r\nfunction TTMSFNCMapsPolyElementHoles.GetOwner: TPersistent;\r\nbegin\r\n Result := FOwner;\r\nend;\r\n\r\nfunction TTMSFNCMapsPolyElementHoles.Insert(Index: Integer): TTMSFNCMapsPolyElementHole;\r\nbegin\r\n Result := TTMSFNCMapsPolyElementHole(inherited Insert(Index));\r\nend;\r\n\r\nprocedure TTMSFNCMapsPolyElementHoles.SetItem(Index: Integer;\r\n const Value: TTMSFNCMapsPolyElementHole);\r\nbegin\r\n inherited Items[Index] := Value;\r\nend;\r\n\r\n{ TTMSFNCMapsPolyElementHole }\r\n\r\nprocedure TTMSFNCMapsPolyElementHole.Assign(Source: TPersistent);\r\nbegin\r\n FID := (Source as TTMSFNCMapsPolyElementHole).ID;\r\n FCoordinates.Assign((Source as TTMSFNCMapsPolyElementHole).Coordinates);\r\nend;\r\n\r\nconstructor TTMSFNCMapsPolyElementHole.Create(ACollection: TCollection);\r\nbegin\r\n inherited;\r\n if Assigned(ACollection) then\r\n FOwner := (Collection as TTMSFNCMapsPolyElementHoles).FOwner;\r\n\r\n FCoordinates := TTMSFNCMapsCoordinates.Create(Self);\r\n FCoordinates.OnBeginUpdate := DoBeginUpdate;\r\n FCoordinates.OnEndUpdate := DoEndUpdate;\r\n FCoordinates.OnUpdateCoordinates := DoUpdateCoordinates;\r\nend;\r\n\r\ndestructor TTMSFNCMapsPolyElementHole.Destroy;\r\nbegin\r\n FCoordinates.Free;\r\n inherited;\r\nend;\r\n\r\nfunction TTMSFNCMapsPolyElementHole.GetID: string;\r\nbegin\r\n if (FID = '') or FOwner.Recreate then\r\n FID := CreateNewGUID;\r\n\r\n Result := FID;\r\nend;\r\n\r\nprocedure TTMSFNCMapsPolyElementHole.DoBeginUpdate(Sender: TObject);\r\nbegin\r\n if Assigned(FOwner) then\r\n FOwner.BeginUpdate;\r\nend;\r\n\r\nprocedure TTMSFNCMapsPolyElementHole.DoEndUpdate(Sender: TObject);\r\nbegin\r\n if Assigned(FOwner) then\r\n FOwner.EndUpdate;\r\nend;\r\n\r\nprocedure TTMSFNCMapsPolyElementHole.DoUpdateCoordinates(Sender: TObject);\r\nbegin\r\n if Assigned(FOwner) then\r\n FOwner.UpdatePolyElement;\r\nend;\r\n\r\nprocedure TTMSFNCMapsPolyElementHole.UpdatePolyElement;\r\nbegin\r\n if Assigned(FOwner) then\r\n FOwner.UpdatePolyElement;\r\nend;\r\n\r\nprocedure TTMSFNCMapsPolyElementHole.SetCoordinates(\r\n const Value: TTMSFNCMapsCoordinates);\r\nbegin\r\n if FCoordinates <> Value then\r\n begin\r\n FCoordinates.Assign(Value);\r\n UpdatePolyElement;\r\n end;\r\nend;\r\n\r\n{ TTMSFNCMapsRectangle }\r\n\r\nfunction TTMSFNCMapsRectangle.Area: Double;\r\nbegin\r\n Result := MeasureArea(BoundsRectangle(Bounds.ToRec));\r\nend;\r\n\r\nprocedure TTMSFNCMapsRectangle.Assign(Source: TPersistent);\r\nbegin\r\n inherited;\r\n if Source is TTMSFNCMapsRectangle then\r\n begin\r\n FBounds.Assign((Source as TTMSFNCMapsRectangle).Bounds);\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCMapsRectangle.ContainsPoint(\r\n ACoordinate: TTMSFNCMapsCoordinateRec): Boolean;\r\nbegin\r\n Result := IsPointInArea(ACoordinate.Latitude, ACoordinate.Longitude, BoundsRectangle(Bounds.ToRec));\r\nend;\r\n\r\nconstructor TTMSFNCMapsRectangle.Create(ACollection: TCollection);\r\nbegin\r\n inherited;\r\n FBounds := TTMSFNCMapsBounds.Create;\r\n FBounds.OnChange := @DoBoundsChanged;\r\nend;\r\n\r\ndestructor TTMSFNCMapsRectangle.Destroy;\r\nbegin\r\n FBounds.Free;\r\n inherited;\r\nend;\r\n\r\nprocedure TTMSFNCMapsRectangle.DoBoundsChanged(Sender: TObject);\r\nbegin\r\n UpdatePolyElement;\r\nend;\r\n\r\nprocedure TTMSFNCMapsRectangle.SetBounds(const Value: TTMSFNCMapsBounds);\r\nbegin\r\n if FBounds <> Value then\r\n begin\r\n FBounds.Assign(Value);\r\n UpdatePolyElement;\r\n end;\r\nend;\r\n\r\n{ TTMSFNCMapsCircle }\r\n\r\nfunction TTMSFNCMapsCircle.Area: Double;\r\nbegin\r\n Result := MeasureArea(CreateCircle(Center.ToRec, Radius));\r\nend;\r\n\r\nprocedure TTMSFNCMapsCircle.Assign(Source: TPersistent);\r\nbegin\r\n inherited;\r\n if Source is TTMSFNCMapsCircle then\r\n begin\r\n FRadius := (Source as TTMSFNCMapsCircle).Radius;\r\n FCenter.Assign((Source as TTMSFNCMapsCircle).Center);\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCMapsCircle.ContainsPoint(\r\n ACoordinate: TTMSFNCMapsCoordinateRec): Boolean;\r\nbegin\r\n Result := IsPointInArea(ACoordinate.Latitude, ACoordinate.Longitude, CreateCircle(Center.ToRec, Radius));\r\nend;\r\n\r\nconstructor TTMSFNCMapsCircle.Create(ACollection: TCollection);\r\nbegin\r\n inherited;\r\n FRadius := 10000;\r\n FCenter := TTMSFNCMapsCoordinate.Create;\r\n FCenter.OnChange := @DoCenterChanged;\r\nend;\r\n\r\ndestructor TTMSFNCMapsCircle.Destroy;\r\nbegin\r\n FCenter.Free;\r\n inherited;\r\nend;\r\n\r\nprocedure TTMSFNCMapsCircle.DoCenterChanged(Sender: TObject);\r\nbegin\r\n UpdatePolyElement;\r\nend;\r\n\r\nfunction TTMSFNCMapsCircle.IsRadiusStored: Boolean;\r\nbegin\r\n Result := Radius <> 10000;\r\nend;\r\n\r\nprocedure TTMSFNCMapsCircle.SetCenter(const Value: TTMSFNCMapsCoordinate);\r\nbegin\r\n if FCenter <> Value then\r\n begin\r\n FCenter.Assign(Value);\r\n UpdatePolyElement;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCMapsCircle.SetRadius(const Value: Double);\r\nbegin\r\n if FRadius <> Value then\r\n begin\r\n FRadius := Value;\r\n UpdatePolyElement;\r\n end;\r\nend;\r\n\r\n{ TTMSFNCMapsCustomPolygon }\r\n\r\nprocedure TTMSFNCMapsCustomPolygon.Assign(Source: TPersistent);\r\nbegin\r\n inherited;\r\n if Source is TTMSFNCMapsPolygon then\r\n begin\r\n FFillColor := (Source as TTMSFNCMapsPolygon).FillColor;\r\n FFillOpacity := (Source as TTMSFNCMapsPolygon).FillOpacity;\r\n end;\r\nend;\r\n\r\nconstructor TTMSFNCMapsCustomPolygon.Create(ACollection: TCollection);\r\nbegin\r\n inherited;\r\n FFillColor := gcWhite;\r\n FFillOpacity := 1.0;\r\nend;\r\n\r\nfunction TTMSFNCMapsCustomPolygon.IsFillOpacityStored: Boolean;\r\nbegin\r\n Result := FillOpacity <> 1.0;\r\nend;\r\n\r\nprocedure TTMSFNCMapsCustomPolygon.SetFillColor(\r\n const Value: TTMSFNCGraphicsColor);\r\nbegin\r\n if FFillColor <> Value then\r\n begin\r\n FFillColor := Value;\r\n UpdatePolyElement;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCMapsCustomPolygon.SetFillOpacity(const Value: Single);\r\nbegin\r\n if FFillOpacity <> Value then\r\n begin\r\n FFillOpacity := Value;\r\n UpdatePolyElement;\r\n end;\r\nend;\r\n\r\n{ TTMSFNCMapsPolyElements }\r\n\r\nfunction TTMSFNCMapsPolyElements.Add: TTMSFNCMapsPolyElement;\r\nbegin\r\n Result := TTMSFNCMapsPolyElement(inherited Add);\r\nend;\r\n\r\nprocedure TTMSFNCMapsPolyElements.Clear;\r\nvar\r\n l: TTMSFNCCustomMaps;\r\n ci: TCollectionItem;\r\nbegin\r\n l := FOwner;\r\n if Assigned(l) then\r\n l.BeginUpdate;\r\n\r\n if Count > 0 then\r\n begin\r\n while Count > 0 do\r\n begin\r\n ci := TCollectionItem(Items[Count - 1]);\r\n ci.Free;\r\n end;\r\n end;\r\n\r\n if Assigned(l) then\r\n l.EndUpdate;\r\nend;\r\n\r\nconstructor TTMSFNCMapsPolyElements.Create(AOwner: TTMSFNCCustomMaps);\r\nbegin\r\n inherited Create(AOwner, CreateItemClass);\r\n FOwner := AOwner;\r\nend;\r\n\r\nfunction TTMSFNCMapsPolyElements.CreateItemClass: TCollectionItemClass;\r\nbegin\r\n Result := TTMSFNCMapsPolyElement;\r\nend;\r\n\r\nfunction TTMSFNCMapsPolyElements.GetItem(\r\n Index: Integer): TTMSFNCMapsPolyElement;\r\nbegin\r\n Result := TTMSFNCMapsPolyElement(inherited Items[Index]);\r\nend;\r\n\r\nfunction TTMSFNCMapsPolyElements.GetItemByID(\r\n ID: string): TTMSFNCMapsPolyElement;\r\nvar\r\n I: Integer;\r\n m: TTMSFNCMapsPolyElement;\r\nbegin\r\n Result := nil;\r\n for I := 0 to Count - 1 do\r\n begin\r\n m := Items[I];\r\n if m.ID = ID then\r\n begin\r\n Result := m;\r\n Break;\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCMapsPolyElements.GetOwner: TPersistent;\r\nbegin\r\n Result := FOwner;\r\nend;\r\n\r\nfunction TTMSFNCMapsPolyElements.Insert(\r\n Index: Integer): TTMSFNCMapsPolyElement;\r\nbegin\r\n Result := TTMSFNCMapsPolyElement(inherited Insert(Index));\r\nend;\r\n\r\nprocedure TTMSFNCMapsPolyElements.Recreate;\r\nvar\r\n I: Integer;\r\nbegin\r\n for I := 0 to Count - 1 do\r\n Items[I].Recreate := True;\r\nend;\r\n\r\nprocedure TTMSFNCMapsPolyElements.SetItem(Index: Integer;\r\n const Value: TTMSFNCMapsPolyElement);\r\nbegin\r\n inherited Items[Index] := Value;\r\nend;\r\n\r\nfunction TTMSFNCMapsPolyElements.ToCoordinateArray: TTMSFNCMapsCoordinateRecArrayArray;\r\nvar\r\n I: Integer;\r\nbegin\r\n SetLength(Result, Count);\r\n for I := 0 to Count - 1 do\r\n Result[I] := Items[I].Coordinates.ToArray;\r\nend;\r\n\r\n{ TTMSFNCMapsPolylines }\r\n\r\nfunction TTMSFNCMapsPolylines.Add: TTMSFNCMapsPolyline;\r\nbegin\r\n Result := TTMSFNCMapsPolyline(inherited Add);\r\nend;\r\n\r\nfunction TTMSFNCMapsPolylines.CreateItemClass: TCollectionItemClass;\r\nbegin\r\n Result := TTMSFNCMapsPolyline;\r\nend;\r\n\r\nfunction TTMSFNCMapsPolylines.GetItem(Index: Integer): TTMSFNCMapsPolyline;\r\nbegin\r\n Result := TTMSFNCMapsPolyline(inherited Items[Index]);\r\nend;\r\n\r\nfunction TTMSFNCMapsPolylines.Insert(Index: Integer): TTMSFNCMapsPolyline;\r\nbegin\r\n Result := TTMSFNCMapsPolyline(inherited Insert(Index));\r\nend;\r\n\r\nprocedure TTMSFNCMapsPolylines.SetItem(Index: Integer;\r\n const Value: TTMSFNCMapsPolyline);\r\nbegin\r\n inherited Items[Index] := Value;\r\nend;\r\n\r\n{ TTMSFNCMapsPolygons }\r\n\r\nfunction TTMSFNCMapsPolygons.Add: TTMSFNCMapsPolygon;\r\nbegin\r\n Result := TTMSFNCMapsPolygon(inherited Add);\r\nend;\r\n\r\nfunction TTMSFNCMapsPolygons.CreateItemClass: TCollectionItemClass;\r\nbegin\r\n Result := TTMSFNCMapsPolygon;\r\nend;\r\n\r\nfunction TTMSFNCMapsPolygons.GetItem(Index: Integer): TTMSFNCMapsPolygon;\r\nbegin\r\n Result := TTMSFNCMapsPolygon(inherited Items[Index]);\r\nend;\r\n\r\nfunction TTMSFNCMapsPolygons.Insert(Index: Integer): TTMSFNCMapsPolygon;\r\nbegin\r\n Result := TTMSFNCMapsPolygon(inherited Insert(Index));\r\nend;\r\n\r\nprocedure TTMSFNCMapsPolygons.SetItem(Index: Integer;\r\n const Value: TTMSFNCMapsPolygon);\r\nbegin\r\n inherited Items[Index] := Value;\r\nend;\r\n\r\n{ TTMSFNCMapsPolygons }\r\n\r\nfunction TTMSFNCMapsCustomPolygons.Add: TTMSFNCMapsCustomPolygon;\r\nbegin\r\n Result := TTMSFNCMapsCustomPolygon(inherited Add);\r\nend;\r\n\r\nfunction TTMSFNCMapsCustomPolygons.CreateItemClass: TCollectionItemClass;\r\nbegin\r\n Result := TTMSFNCMapsCustomPolygon;\r\nend;\r\n\r\nfunction TTMSFNCMapsCustomPolygons.GetItem(Index: Integer): TTMSFNCMapsCustomPolygon;\r\nbegin\r\n Result := TTMSFNCMapsCustomPolygon(inherited Items[Index]);\r\nend;\r\n\r\nfunction TTMSFNCMapsCustomPolygons.Insert(Index: Integer): TTMSFNCMapsCustomPolygon;\r\nbegin\r\n Result := TTMSFNCMapsCustomPolygon(inherited Insert(Index));\r\nend;\r\n\r\nprocedure TTMSFNCMapsCustomPolygons.SetItem(Index: Integer;\r\n const Value: TTMSFNCMapsCustomPolygon);\r\nbegin\r\n inherited Items[Index] := Value;\r\nend;\r\n\r\n{ TTMSFNCMapsRectangles }\r\n\r\nfunction TTMSFNCMapsRectangles.Add: TTMSFNCMapsRectangle;\r\nbegin\r\n Result := TTMSFNCMapsRectangle(inherited Add);\r\nend;\r\n\r\nfunction TTMSFNCMapsRectangles.CreateItemClass: TCollectionItemClass;\r\nbegin\r\n Result := TTMSFNCMapsRectangle;\r\nend;\r\n\r\nfunction TTMSFNCMapsRectangles.GetItem(Index: Integer): TTMSFNCMapsRectangle;\r\nbegin\r\n Result := TTMSFNCMapsRectangle(inherited Items[Index]);\r\nend;\r\n\r\nfunction TTMSFNCMapsRectangles.Insert(Index: Integer): TTMSFNCMapsRectangle;\r\nbegin\r\n Result := TTMSFNCMapsRectangle(inherited Insert(Index));\r\nend;\r\n\r\nprocedure TTMSFNCMapsRectangles.SetItem(Index: Integer;\r\n const Value: TTMSFNCMapsRectangle);\r\nbegin\r\n inherited Items[Index] := Value;\r\nend;\r\n\r\nfunction TTMSFNCMapsRectangles.ToCoordinateArray: TTMSFNCMapsCoordinateRecArrayArray;\r\nvar\r\n I: Integer;\r\n arr: TTMSFNCMapsCoordinateRecArray;\r\nbegin\r\n SetLength(Result, Count);\r\n for I := 0 to Count - 1 do\r\n begin\r\n SetLength(arr, 2);\r\n arr[0] := Items[I].Bounds.NorthEast.ToRec;\r\n arr[1] := Items[I].Bounds.SouthWest.ToRec;\r\n Result[I] := arr;\r\n end;\r\nend;\r\n\r\n{ TTMSFNCMapsCircles }\r\n\r\nfunction TTMSFNCMapsCircles.Add: TTMSFNCMapsCircle;\r\nbegin\r\n Result := TTMSFNCMapsCircle(inherited Add);\r\nend;\r\n\r\nfunction TTMSFNCMapsCircles.CreateItemClass: TCollectionItemClass;\r\nbegin\r\n Result := TTMSFNCMapsCircle;\r\nend;\r\n\r\nfunction TTMSFNCMapsCircles.GetItem(Index: Integer): TTMSFNCMapsCircle;\r\nbegin\r\n Result := TTMSFNCMapsCircle(inherited Items[Index]);\r\nend;\r\n\r\nfunction TTMSFNCMapsCircles.Insert(Index: Integer): TTMSFNCMapsCircle;\r\nbegin\r\n Result := TTMSFNCMapsCircle(inherited Insert(Index));\r\nend;\r\n\r\nprocedure TTMSFNCMapsCircles.SetItem(Index: Integer;\r\n const Value: TTMSFNCMapsCircle);\r\nbegin\r\n inherited Items[Index] := Value;\r\nend;\r\n\r\nfunction TTMSFNCMapsCircles.ToCoordinateArray: TTMSFNCMapsCoordinateRecArrayArray;\r\nvar\r\n I: Integer;\r\n arr: TTMSFNCMapsCoordinateRecArray;\r\nbegin\r\n SetLength(Result, Count);\r\n for I := 0 to Count - 1 do\r\n begin\r\n SetLength(arr, 1);\r\n arr[0] := Items[I].Center.ToRec;\r\n Result[I] := arr;\r\n end;\r\nend;\r\n\r\n{ TTMSFNCMapsLink }\r\n\r\nconstructor TTMSFNCMapsLink.CreateScript(AURL: string; AType: string = ''; ACharSet: string = ''; AContent: string = ''; ADefer: Boolean = False; AAsync: Boolean = False);\r\nbegin\r\n Create(mlkScript, AURL, AType, ACharSet, '', AContent, ADefer, AASync);\r\nend;\r\n\r\nconstructor TTMSFNCMapsLink.CreateLink(AURL: string; AType: string = ''; ARel: string = '');\r\nbegin\r\n Create(mlkLink, AURL, AType, '', ARel, '', False, False);\r\nend;\r\n\r\nconstructor TTMSFNCMapsLink.Create(AKind: TTMSFNCMapsLinkKind; AURL: string; AType: string; ACharSet: string; ARel: string; AContent: string; ADefer: Boolean; AAsync: Boolean);\r\nbegin\r\n FKind := AKind;\r\n FURL := AURL;\r\n FType := AType;\r\n FCharSet := ACharSet;\r\n FDefer := ADefer;\r\n FRel := ARel;\r\n FAsync := AAsync;\r\n FContent := AContent;\r\nend;\r\n\r\nprocedure TTMSFNCCustomMaps.ReInitialize;\r\nbegin\r\n MapInitialized := False;\r\n InitializeHTML;\r\nend;\r\n\r\nprocedure TTMSFNCCustomMaps.RouteCalculatorDeleteMarker(\r\n AMarker: TTMSFNCMapsMarker; AUpdateRoute: Boolean);\r\nvar\r\n Segment, ps: TTMSFNCRouteCalculatorSegment;\r\n ec: TTMSFNCMapsCoordinateRec;\r\nbegin\r\n if not RouteCalculatorCheck then\r\n Exit;\r\n\r\n if not Assigned(AMarker) then\r\n Exit;\r\n\r\n if Assigned(AMarker.DataPointer) and (TObject(AMarker.DataPointer) is TTMSFNCRouteCalculatorSegment) then\r\n begin\r\n Segment := (TObject(AMarker.DataPointer) as TTMSFNCRouteCalculatorSegment);\r\n if Assigned(Segment) then\r\n begin\r\n if (AMarker.DataString <> ROUTECALCULATORMARKER) and (AMarker.DataString <> '') then\r\n RouteCalculator.DeleteRouteSegment(Segment)\r\n else\r\n begin\r\n ps := Segment.PreviousSegment;\r\n if Assigned(ps) then\r\n begin\r\n ec := Segment.EndCoordinate.ToRec;\r\n Segment.Free;\r\n RouteCalculator.UpdateRouteSegment(ps, ps.StartCoordinate.ToRec, ec);\r\n end;\r\n end;\r\n if AUpdateRoute then\r\n begin\r\n RouteCalculatorClearRoutes;\r\n RouteCalculatorPlotRoutes;\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomMaps.RouteCalculatorDeletePolyline(\r\n APolyline: TTMSFNCMapsPolyline; AUpdateRoute: Boolean);\r\nvar\r\n Segment: TTMSFNCRouteCalculatorSegment;\r\nbegin\r\n if not RouteCalculatorCheck then\r\n Exit;\r\n\r\n if not Assigned(APolyline) then\r\n Exit;\r\n\r\n if Assigned(APolyline.DataPointer) and (TObject(APolyline.DataPointer) is TTMSFNCRouteCalculatorSegment) then\r\n begin\r\n Segment := (TObject(APolyline.DataPointer) as TTMSFNCRouteCalculatorSegment);\r\n if Assigned(Segment) then\r\n begin\r\n RouteCalculator.DeleteRouteSegment(Segment);\r\n if AUpdateRoute then\r\n begin\r\n RouteCalculatorClearRoutes;\r\n RouteCalculatorPlotRoutes;\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomMaps.RouteCalculatorDeleteSelectedMarker(\r\n AUpdateRoute: Boolean);\r\nbegin\r\n if Assigned(RouteCalculatorSelectedMarker) then\r\n begin\r\n RouteCalculatorDeleteMarker(RouteCalculatorSelectedMarker, AUpdateRoute);\r\n RouteCalculatorSelectedMarker := nil;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomMaps.RouteCalculatorDeleteSelectedPolyline(\r\n AUpdateRoute: Boolean);\r\nbegin\r\n if Assigned(RouteCalculatorSelectedPolyline) then\r\n begin\r\n RouteCalculatorDeletePolyline(RouteCalculatorSelectedPolyline, AUpdateRoute);\r\n RouteCalculatorSelectedPolyline := nil;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomMaps.RouteCalculatorDoCalculateRoute(Sender: TObject;\r\n const ARoute: TTMSFNCRouteCalculatorRoute);\r\nbegin\r\n RouteCalculatorPlotRoute(ARoute);\r\nend;\r\n\r\nprocedure TTMSFNCCustomMaps.RouteCalculatorMarkerMoved(\r\n ACoordinate: TTMSFNCMapsCoordinateRec);\r\nvar\r\n ASegment, ps: TTMSFNCRouteCalculatorSegment;\r\nbegin\r\n if RouteCalculatorCheck then\r\n begin\r\n Options.Panning := True;\r\n if FRouteCalculatorDragStarted and Assigned(FRouteCalculatorMarker) then\r\n begin\r\n FRouteCalculatorDragStarted := False;\r\n Options.Panning := True;\r\n FRouteCalculatorMarker.Coordinate.Latitude := ACoordinate.Latitude;\r\n FRouteCalculatorMarker.Coordinate.Longitude := ACoordinate.Longitude;\r\n if Assigned(FRouteCalculatorMarker.DataPointer) and (TObject(FRouteCalculatorMarker.DataPointer) is TTMSFNCRouteCalculatorSegment) then\r\n begin\r\n ASegment := (TObject(FRouteCalculatorMarker.DataPointer) as TTMSFNCRouteCalculatorSegment);\r\n if Assigned(ASegment) then\r\n begin\r\n if not FRouteCalculatorMarker.DataBoolean then\r\n RouteCalculator.UpdateRouteSegment(ASegment, ASegment.StartCoordinate.ToRec, FRouteCalculatorMarker.Coordinate.ToRec)\r\n else\r\n begin\r\n RouteCalculator.UpdateRouteSegment(ASegment, FRouteCalculatorMarker.Coordinate.ToRec, ASegment.EndCoordinate.ToRec);\r\n ps := ASegment.PreviousSegment;\r\n if Assigned(ps) then\r\n RouteCalculator.UpdateRouteSegment(ps, ps.StartCoordinate.ToRec, FRouteCalculatorMarker.Coordinate.ToRec);\r\n end;\r\n end;\r\n end;\r\n end;\r\n FRouteCalculatorMarker := nil;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomMaps.RouteCalculatorPlotRoute(\r\n ARoute: TTMSFNCRouteCalculatorRoute);\r\n function SegmentExists(ASegment: TTMSFNCRouteCalculatorSegment): TTMSFNCMapsPolyline;\r\n var\r\n I: Integer;\r\n begin\r\n Result := nil;\r\n for I := 0 to Polylines.Count - 1 do\r\n begin\r\n if TTMSFNCRouteCalculatorSegment(Polylines[I].DataPointer) = ASegment then\r\n begin\r\n Result := Polylines[I];\r\n Break;\r\n end;\r\n end;\r\n end;\r\n\r\n function WayPointExists(ASegment: TTMSFNCRouteCalculatorSegment): TTMSFNCMapsMarker;\r\n var\r\n I: Integer;\r\n begin\r\n Result := nil;\r\n for I := 0 to Markers.Count - 1 do\r\n begin\r\n if ((TTMSFNCRouteCalculatorSegment(Markers[I].DataPointer) = ASegment)\r\n and (Markers[I].DataString <> ROUTECALCULATORENDMARKER)) then\r\n begin\r\n Result := Markers[I];\r\n Break;\r\n end;\r\n end;\r\n end;\r\n\r\n function GetStartMarker: TTMSFNCMapsMarker;\r\n var\r\n I: Integer;\r\n begin\r\n Result := nil;\r\n for I := 0 to Markers.Count - 1 do\r\n begin\r\n if Markers[I].DataString = ROUTECALCULATORSTARTMARKER then\r\n begin\r\n Result := Markers[I];\r\n Break;\r\n end;\r\n end;\r\n end;\r\n\r\n function GetEndMarker: TTMSFNCMapsMarker;\r\n var\r\n I: Integer;\r\n begin\r\n Result := nil;\r\n for I := 0 to Markers.Count - 1 do\r\n begin\r\n if Markers[I].DataString = ROUTECALCULATORENDMARKER then\r\n begin\r\n Result := Markers[I];\r\n Break;\r\n end;\r\n end;\r\n end;\r\n\r\n procedure ConfigMarker(AMarker: TTMSFNCMapsMarker; ARoute: TTMSFNCRouteCalculatorRoute; AIndex: Integer);\r\n begin\r\n if AIndex = 0 then\r\n begin\r\n AMarker.IconURL := GetRouteCalculatorStartMarker;\r\n AMarker.DataString := ROUTECALCULATORSTARTMARKER;\r\n AMarker.DataBoolean := True;\r\n AMarker.DataPointer := ARoute.Segments[AIndex];\r\n end\r\n else if AIndex = ARoute.Segments.Count then\r\n begin\r\n AMarker.IconURL := GetRouteCalculatorEndMarker;\r\n AMarker.DataString := ROUTECALCULATORENDMARKER;\r\n AMarker.DataBoolean := False;\r\n AMarker.DataPointer := ARoute.Segments[AIndex - 1];\r\n end\r\n else\r\n begin\r\n AMarker.IconURL := GetRouteCalculatorWayPointMarker;\r\n AMarker.DataString := ROUTECALCULATORMARKER;\r\n AMarker.DataBoolean := True;\r\n AMarker.DataPointer := ARoute.Segments[AIndex];\r\n end;\r\n end;\r\n\r\nvar\r\n p: TTMSFNCMapsPolyline;\r\n ci: TTMSFNCMapsCoordinateItem;\r\n pl: TTMSFNCMapsCoordinateRecArray;\r\n wp: TTMSFNCMapsCoordinateRecArray;\r\n m: TTMSFNCMapsMarker;\r\n I, K: Integer;\r\n pRecreate: Boolean;\r\nbegin\r\n BeginUpdate;\r\n\r\n ARoute.DataString := ROUTECALCULATORROUTE;\r\n wp := ARoute.WayPoints;\r\n\r\n for I := 0 to ARoute.Segments.Count - 1 do\r\n begin\r\n p := SegmentExists(ARoute.Segments[I]);\r\n pl := ARoute.Segments[I].Polyline;\r\n\r\n if Assigned(p) then\r\n begin\r\n pRecreate := False;\r\n if (p.Coordinates.Count <> Length(pl)) then\r\n pRecreate := True\r\n else\r\n for K := 0 to Length(pl) - 1 do\r\n begin\r\n if ((p.Coordinates[K].Latitude <> pl[K].Latitude)\r\n or (p.Coordinates[K].Longitude <> pl[K].Longitude)) then\r\n begin\r\n pRecreate := True;\r\n break;\r\n end;\r\n end;\r\n\r\n if pRecreate then\r\n begin\r\n p.Coordinates.Clear;\r\n for K := 0 to Length(pl) - 1 do\r\n begin\r\n ci := p.Coordinates.Add;\r\n ci.Latitude := pl[K].Latitude;\r\n ci.Longitude := pl[K].Longitude;\r\n end;\r\n p.Recreate := True;\r\n DoRouteCalculatorPolylineUpdated(p, ARoute.Segments[I]);\r\n end;\r\n end\r\n else\r\n begin\r\n p := AddPolyline(pl);\r\n p.DataString := ROUTECALCULATORSEGMENT;\r\n p.StrokeWidth := RouteCalculator.Options.Polyline.StrokeWidth;\r\n p.StrokeColor := RouteCalculator.Options.Polyline.StrokeColor;\r\n DoRouteCalculatorPolylineAdded(p, ARoute.Segments[I]);\r\n end;\r\n p.DataPointer := ARoute.Segments[I];\r\n\r\n if I = 0 then\r\n m := GetStartMarker\r\n else\r\n m := WayPointExists(ARoute.Segments[I]);\r\n\r\n if Assigned(m) then\r\n begin\r\n if ((m.Latitude <> wp[I].Latitude) or (m.Longitude <> wp[I].Longitude)) then\r\n begin\r\n m.Latitude := wp[I].Latitude;\r\n m.Longitude := wp[I].Longitude;\r\n m.Recreate := True;\r\n ConfigMarker(m, ARoute, I);\r\n DoRouteCalculatorWayPointUpdated(m, ARoute.Segments[I]);\r\n end;\r\n end\r\n else\r\n begin\r\n m := AddMarker(ARoute.Segments[I].StartCoordinate.ToRec);\r\n ConfigMarker(m, ARoute, I);\r\n DoRouteCalculatorWayPointAdded(m, ARoute.Segments[I]);\r\n end;\r\n end;\r\n\r\n if ARoute.Segments.Count > 0 then\r\n begin\r\n //add end marker\r\n m := GetEndMarker;\r\n I := Length(wp) - 1;\r\n\r\n if Assigned(m) then\r\n begin\r\n if ((m.Latitude <> wp[I].Latitude) or (m.Longitude <> wp[I].Longitude)) then\r\n begin\r\n m.Latitude := wp[I].Latitude;\r\n m.Longitude := wp[I].Longitude;\r\n m.Recreate := True;\r\n ConfigMarker(m, ARoute, ARoute.Segments.Count);\r\n DoRouteCalculatorWayPointUpdated(m, ARoute.Segments[ARoute.Segments.Count - 1]);\r\n end;\r\n end\r\n else\r\n begin\r\n m := AddMarker(ARoute.Segments[ARoute.Segments.Count - 1].EndCoordinate.ToRec);\r\n ConfigMarker(m, ARoute, ARoute.Segments.Count);\r\n DoRouteCalculatorWayPointAdded(m, ARoute.Segments[ARoute.Segments.Count - 1]);\r\n end;\r\n end;\r\n\r\n EndUpdate;\r\nend;\r\n\r\nprocedure TTMSFNCCustomMaps.RouteCalculatorPlotRoutes;\r\nvar\r\n I: Integer;\r\nbegin\r\n if RouteCalculatorCheck then\r\n begin\r\n BeginUpdate;\r\n for I := 0 to RouteCalculator.Routes.Count - 1 do\r\n RouteCalculatorPlotRoute(RouteCalculator.Routes[I]);\r\n EndUpdate;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomMaps.RouteCalculatorClearRoutes;\r\nvar\r\n I: Integer;\r\n p: TTMSFNCMapsPolyline;\r\n m: TTMSFNCMapsMarker;\r\nbegin\r\n if RouteCalculatorCheck then\r\n begin\r\n BeginUpdate;\r\n for I := Polylines.Count - 1 downto 0 do\r\n begin\r\n p := Polylines[I];\r\n if p.DataString = ROUTECALCULATORSEGMENT then\r\n p.Free;\r\n end;\r\n\r\n for I := Markers.Count - 1 downto 0 do\r\n begin\r\n m := Markers[I];\r\n if (m.DataString = ROUTECALCULATORMARKER)\r\n or (m.DataString = ROUTECALCULATORSTARTMARKER)\r\n or (m.DataString = ROUTECALCULATORENDMARKER) then\r\n m.Free;\r\n end;\r\n EndUpdate;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomMaps.RouteCalculatorClearSelected;\r\nbegin\r\n if Assigned(RouteCalculatorSelectedPolyline) then\r\n begin\r\n RouteCalculatorSelectedPolyline.StrokeColor := RouteCalculator.Options.Polyline.StrokeColor;\r\n RouteCalculatorSelectedPolyline := nil;\r\n end;\r\n\r\n if Assigned(RouteCalculatorSelectedMarker) then\r\n begin\r\n if (RouteCalculatorSelectedMarker.DataString = ROUTECALCULATORMARKER) then\r\n RouteCalculatorSelectedMarker.IconURL := GetRouteCalculatorWayPointMarker\r\n else if (RouteCalculatorSelectedMarker.DataString = ROUTECALCULATORSTARTMARKER) then\r\n RouteCalculatorSelectedMarker.IconURL := GetRouteCalculatorStartMarker\r\n else if (RouteCalculatorSelectedMarker.DataString = ROUTECALCULATORENDMARKER) then\r\n RouteCalculatorSelectedMarker.IconURL := GetRouteCalculatorEndMarker;\r\n RouteCalculatorSelectedMarker := nil;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomMaps.RouteCalculatorPolylineMoved(\r\n ACoordinate: TTMSFNCMapsCoordinateRec);\r\nvar\r\n ASegment: TTMSFNCRouteCalculatorSegment;\r\n ar: TTMSFNCMapsCoordinateRecArray;\r\nbegin\r\n if RouteCalculatorCheck then\r\n begin\r\n Options.Panning := True;\r\n if FRouteCalculatorDragStarted and Assigned(FRouteCalculatorPolyline) then\r\n begin\r\n FRouteCalculatorDragStarted := False;\r\n Options.Panning := True;\r\n if Assigned(FRouteCalculatorPolyline.DataPointer) and (TObject(FRouteCalculatorPolyline.DataPointer) is TTMSFNCRouteCalculatorSegment) then\r\n begin\r\n ASegment := (TObject(FRouteCalculatorPolyline.DataPointer) as TTMSFNCRouteCalculatorSegment);\r\n if Assigned(ASegment) then\r\n begin\r\n SetLength(ar, 1);\r\n ar[0] := ACoordinate;\r\n RouteCalculator.AddWayPointsToSegment(ASegment, ar);\r\n end;\r\n end;\r\n end;\r\n\r\n FRouteCalculatorPolyline := nil;\r\n if Assigned(FRouteCalculatorDragMarker) then\r\n begin\r\n FRouteCalculatorDragMarker.Free;\r\n FRouteCalculatorDragMarker := nil\r\n end;\r\n\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCCustomMaps.ParseScript(AValue: string): string;\r\nbegin\r\n Result := AValue;\r\n if Result = 'null' then\r\n begin\r\n Result := '';\r\n Exit;\r\n end;\r\n\r\n Result := StringReplace(Result, '[', '', [rfReplaceAll]);\r\n Result := StringReplace(Result, ']', '', [rfReplaceAll]);\r\n Result := StringReplace(Result, '\"', '', [rfReplaceAll]);\r\nend;\r\n\r\nfunction TTMSFNCCustomMaps.ParseEvent(AValue: string): Boolean;\r\nvar\r\n s, cd: string;\r\n b: Boolean;\r\n ed: TTMSFNCMapsEventData;\r\n p, pcd: Integer;\r\n e: TTMSFNCMapsJavaScriptError;\r\nbegin\r\n s := AValue;\r\n b := (Pos(EVENTDATAPREFIX, s) = 1);\r\n Result := b;\r\n if b then\r\n begin\r\n p := Pos(EVENTDATAPREFIX, s);\r\n pcd := Pos(CUSTOMDATAPREFIX, s);\r\n if pcd > 0 then\r\n begin\r\n cd := Copy(s, pcd + Length(CUSTOMDATAPREFIX), Length(s) - pcd - 1);\r\n s := Copy(s, p + Length(EVENTDATAPREFIX), pcd - Length(EVENTDATAPREFIX) - 1);\r\n end\r\n else\r\n begin\r\n s := Copy(s, p + Length(EVENTDATAPREFIX), Length(s) - 1);\r\n cd := '';\r\n end;\r\n\r\n if cd <> '' then\r\n cd := TTMSFNCUtils.URLDecode(cd);\r\n\r\n s := TTMSFNCUtils.URLDecode(s);\r\n\r\n ed := TTMSFNCMapsEventData.Create;\r\n try\r\n ed.JSON := s;\r\n ed.CustomData := cd;\r\n\r\n if ed.ID <> '' then\r\n begin\r\n if Pos('Marker', ed.EventName) > 0 then\r\n ed.FMarker := GetMarkerByID(ed.ID);\r\n\r\n if Pos('PolyElement', ed.EventName) > 0 then\r\n ed.FPolyElement := GetPolyElementByID(ed.ID);\r\n end;\r\n\r\n if ed.EventName = 'Initialized' then\r\n begin\r\n MapInitialized := True;\r\n DoMapInitialized;\r\n end\r\n else if ed.EventName = 'MapTypeChanged' then\r\n DoMapTypeChanged(ed)\r\n else if ed.EventName = 'ZoomChanged' then\r\n DoZoomChanged(ed)\r\n else if ed.EventName = 'MapMoveStart' then\r\n DoMapMoveStart(ed)\r\n else if ed.EventName = 'MapMoveEnd' then\r\n DoMapMoveEnd(ed)\r\n// else if ed.EventName = 'MapMove' then\r\n// DoMapMove(ed)\r\n else if ed.EventName = 'MapClick' then\r\n DoMapClick(ed)\r\n else if ed.EventName = 'MapRightClick' then\r\n DoMapRightClick(ed)\r\n else if ed.EventName = 'MapKeyDown' then\r\n DoMapKeyDown(ed)\r\n else if ed.EventName = 'MapDblClick' then\r\n DoMapDblClick(ed)\r\n else if ed.EventName = 'MapMouseMove' then\r\n DoMapMouseMove(ed)\r\n else if ed.EventName = 'MapMouseDown' then\r\n DoMapMouseDown(ed)\r\n else if ed.EventName = 'MapMouseUp' then\r\n DoMapMouseUp(ed)\r\n else if ed.EventName = 'MapMouseEnter' then\r\n DoMapMouseEnter(ed)\r\n else if ed.EventName = 'MapMouseLeave' then\r\n DoMapMouseLeave(ed)\r\n else if ed.EventName = 'MapCenterChanged' then\r\n DoMapCenterChanged(ed)\r\n else if ed.EventName = 'MarkerClick' then\r\n DoMarkerClick(ed)\r\n else if ed.EventName = 'MarkerRightClick' then\r\n DoMarkerRightClick(ed)\r\n else if ed.EventName = 'MarkerDblClick' then\r\n DoMarkerDblClick(ed)\r\n else if ed.EventName = 'MarkerMouseDown' then\r\n DoMarkerMouseDown(ed)\r\n else if ed.EventName = 'MarkerMouseUp' then\r\n DoMarkerMouseUp(ed)\r\n else if ed.EventName = 'MarkerMouseEnter' then\r\n DoMarkerMouseEnter(ed)\r\n else if ed.EventName = 'MarkerMouseLeave' then\r\n DoMarkerMouseLeave(ed)\r\n else if ed.EventName = 'PolyElementClick' then\r\n DoPolyElementClick(ed)\r\n else if ed.EventName = 'PolyElementRightClick' then\r\n DoPolyElementRightClick(ed)\r\n else if ed.EventName = 'PolyElementDblClick' then\r\n DoPolyElementDblClick(ed)\r\n else if ed.EventName = 'PolyElementMouseDown' then\r\n DoPolyElementMouseDown(ed)\r\n else if ed.EventName = 'PolyElementMouseUp' then\r\n DoPolyElementMouseUp(ed)\r\n else if ed.EventName = 'PolyElementMouseEnter' then\r\n DoPolyElementMouseEnter(ed)\r\n else if ed.EventName = 'PolyElementMouseLeave' then\r\n DoPolyElementMouseLeave(ed)\r\n else if ed.EventName = 'Error' then\r\n begin\r\n e := TTMSFNCMapsJavaScriptError.Create(ed.ID);\r\n try\r\n DoError(e);\r\n finally\r\n e.Free;\r\n end;\r\n end\r\n else\r\n begin\r\n CallCustomEvent(ed);\r\n end;\r\n finally\r\n ed.Free;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomMaps.Clear;\r\nbegin\r\n BeginUpdate;\r\n ClearMarkers;\r\n ClearPolygons;\r\n ClearCircles;\r\n ClearLabels;\r\n ClearElementContainers;\r\n ClearRectangles;\r\n ClearPolylines;\r\n EndUpdate;\r\nend;\r\n\r\nprocedure TTMSFNCCustomMaps.ClearMarkers;\r\nbegin\r\n BeginUpdate;\r\n Markers.Clear;\r\n EndUpdate;\r\nend;\r\n\r\nprocedure TTMSFNCCustomMaps.ClearPolylines;\r\nbegin\r\n BeginUpdate;\r\n Polylines.Clear;\r\n EndUpdate;\r\nend;\r\n\r\nprocedure TTMSFNCCustomMaps.ClearPolygons;\r\nbegin\r\n BeginUpdate;\r\n Polygons.Clear;\r\n EndUpdate;\r\nend;\r\n\r\nprocedure TTMSFNCCustomMaps.ClearRectangles;\r\nbegin\r\n BeginUpdate;\r\n Rectangles.Clear;\r\n EndUpdate;\r\nend;\r\n\r\nprocedure TTMSFNCCustomMaps.ClearCircles;\r\nbegin\r\n BeginUpdate;\r\n Circles.Clear;\r\n EndUpdate;\r\nend;\r\n\r\nprocedure TTMSFNCCustomMaps.ClearElementContainers;\r\nbegin\r\n BeginUpdate;\r\n ElementContainers.Clear;\r\n EndUpdate;\r\nend;\r\n\r\nprocedure TTMSFNCCustomMaps.ClearHeadLinks;\r\nbegin\r\n BeginUpdate;\r\n HeadLinks.Clear;\r\n EndUpdate;\r\nend;\r\n\r\nprocedure TTMSFNCCustomMaps.ClearLabels;\r\nbegin\r\n BeginUpdate;\r\n Labels.Clear;\r\n EndUpdate;\r\nend;\r\n\r\nprocedure TTMSFNCCustomMaps.SetCenterCoordinate(ALatitude: Double; ALongitude: Double);\r\nbegin\r\n SetCenterCoordinate(CreateCoordinate(ALatitude, ALongitude));\r\nend;\r\n\r\nprocedure TTMSFNCCustomMaps.SetCenterCoordinate(ACoordinate: TTMSFNCMapsCoordinateRec);\r\nvar\r\n b: TTMSFNCMapsCoordinate;\r\nbegin\r\n if MapInitialized and MapReady then\r\n begin\r\n b := TTMSFNCMapsCoordinate.Create(ACoordinate);\r\n try\r\n ExecuteJavaScript(SETCENTERCOORDINATEFUNCTION + '(' + b.ToJSON + ')');\r\n finally\r\n b.Free;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomMaps.ZoomToBounds(ANorthEast: TTMSFNCMapsCoordinateRec; ASouthWest: TTMSFNCMapsCoordinateRec);\r\nvar\r\n b: TTMSFNCMapsBounds;\r\nbegin\r\n if MapInitialized and MapReady then\r\n begin\r\n b := TTMSFNCMapsBounds.Create(ANorthEast, ASouthWest);\r\n try\r\n ExecuteJavaScript(ZOOMTOBOUNDSFUNCTION + '(' + b.ToJSON + ')');\r\n finally\r\n b.Free;\r\n end;\r\n end;\r\nend;\r\n\r\n{ TTMSFNCMaps }\r\n\r\nprocedure TTMSFNCMaps.RegisterRuntimeClasses;\r\nbegin\r\n RegisterClass(TTMSFNCMaps);\r\n RegisterClass(TTMSFNCMapsMarker);\r\n RegisterClass(TTMSFNCMapsPolyElement);\r\n RegisterClass(TTMSFNCMapsPolyline);\r\n RegisterClass(TTMSFNCMapsPolygon);\r\nend;\r\n\r\nfunction GetFirstChildNode(const ANode: TTMSFNCMapsXMLNode): TTMSFNCMapsXMLDomNode;\r\nbegin\r\n {$IFNDEF LCLWEBLIB}\r\n Result := ANode.DOMNode.firstChild;\r\n {$ELSE}\r\n Result := ANode.firstChild;\r\n {$ENDIF}\r\nend;\r\n\r\nfunction FindNodeAttribute(const ANode: TTMSFNCMapsXMLDOMNode; const ANodeName: string): TTMSFNCMapsXMLDomNode;\r\nbegin\r\n {$IFDEF WEBLIB}\r\n asm\r\n if (ANode.attributes){\r\n return ANode.attributes.getNamedItem(ANodeName);\r\n }else{\r\n return undefined;\r\n }\r\n end;\r\n {$ELSE}\r\n Result := ANode.Attributes.GetNamedItem(ANodeName);\r\n {$ENDIF}\r\nend;\r\n\r\nfunction FindNode(const ANode: TTMSFNCMapsXMLNode; const ANodeName: string): TTMSFNCMapsXMLNode;\r\nbegin\r\n {$IFNDEF LCLLIB}\r\n Result := ANode.ChildNodes.FindNode(ANodeName);\r\n {$ELSE}\r\n Result := ANode.FindNode(ANodeName);\r\n {$ENDIF}\r\nend;\r\n\r\nfunction FindDOMNode(const ANode: TTMSFNCMapsXMLDOMNode; const ANodeName: string): TTMSFNCMapsXMLDOMNode;\r\nvar\r\n I: Integer;\r\n rNode: TTMSFNCMapsXMLDOMNode;\r\nbegin\r\n {$IFNDEF LCLLIB}\r\n Result := nil;\r\n for I := 0 to ANode.childNodes.length - 1 do\r\n begin\r\n rNode := ANode.childNodes[I];\r\n if rNode.NodeName = ANodeName then\r\n Result := rNode;\r\n end;\r\n {$ELSE}\r\n Result := ANode.FindNode(ANodeName);\r\n {$ENDIF}\r\nend;\r\n\r\nfunction NodeToString(ANode: TTMSFNCMapsXMLDOMNode): string;\r\nbegin\r\n Result := '';\r\n if not Assigned(ANode) then\r\n Exit;\r\n\r\n Result := ANode.firstChild.nodeValue;\r\nend;\r\n\r\n{$IFNDEF WEBLIB}\r\nfunction TTMSFNCCustomMaps.LoadGPXFromFile(AFileName: string; AAutoDisplay: Boolean = True;\r\n AZoomToBounds: Boolean = True; AStrokeWidth: Integer = 3; AStrokeColor: TTMSFNCGraphicsColor = gcBlack; ADisplayElevation: Boolean = False;\r\n ADisplayTimeStamps: Boolean = False; AMinSecondsBetweenTimeStamps: Integer = 600): TTMSFNCMapsGPXRec;\r\nvar\r\n ms: TMemoryStream;\r\nbegin\r\n ms := TMemoryStream.Create;\r\n try\r\n ms.LoadFromFile(AFileName);\r\n Result := LoadGPXFromStream(ms, AAutoDisplay, AZoomToBounds, AStrokeWidth, AStrokeColor, ADisplayElevation, ADisplayTimeStamps, AMinSecondsBetweenTimeStamps);\r\n finally\r\n ms.Free;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCCustomMaps.LoadGPXFromFile(AFileName: string; AAutoDisplay: Boolean;\r\n AZoomToBounds: Boolean; AStrokeWidth: Integer; AElevationColors: TTMSFNCMapsGPXColorRecArray; ADisplayElevation: Boolean;\r\n ADisplayTimeStamps: Boolean = False; AMinSecondsBetweenTimeStamps: Integer = 600): TTMSFNCMapsGPXRec;\r\nvar\r\n ms: TMemoryStream;\r\nbegin\r\n ms := TMemoryStream.Create;\r\n try\r\n ms.LoadFromFile(AFileName);\r\n Result := LoadGPXFromStream(ms, AAutoDisplay, AZoomToBounds, AStrokeWidth, AElevationColors, ADisplayElevation, ADisplayTimeStamps, AMinSecondsBetweenTimeStamps);\r\n finally\r\n ms.Free;\r\n end;\r\nend;\r\n\r\n{$IFNDEF LCLLIB}\r\nfunction TTMSFNCCustomMaps.LoadGPXFromFile(AFileName: string;\r\n AEncoding: TEncoding; AAutoDisplay, AZoomToBounds: Boolean;\r\n AStrokeWidth: Integer; AElevationColors: TTMSFNCMapsGPXColorRecArray;\r\n ADisplayElevation, ADisplayTimeStamps: Boolean;\r\n AMinSecondsBetweenTimeStamps: Integer): TTMSFNCMapsGPXRec;\r\nvar\r\n ms: TMemoryStream;\r\nbegin\r\n ms := TMemoryStream.Create;\r\n try\r\n ms.LoadFromFile(AFileName);\r\n Result := LoadGPXFromStream(ms, AEncoding, AAutoDisplay, AZoomToBounds, AStrokeWidth, AElevationColors, ADisplayElevation, ADisplayTimeStamps, AMinSecondsBetweenTimeStamps);\r\n finally\r\n ms.Free;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCCustomMaps.LoadGPXFromFile(AFileName: string;\r\n AEncoding: TEncoding; AAutoDisplay, AZoomToBounds: Boolean;\r\n AStrokeWidth: Integer; AStrokeColor: TTMSFNCGraphicsColor; ADisplayElevation,\r\n ADisplayTimeStamps: Boolean;\r\n AMinSecondsBetweenTimeStamps: Integer): TTMSFNCMapsGPXRec;\r\nvar\r\n ms: TMemoryStream;\r\nbegin\r\n ms := TMemoryStream.Create;\r\n try\r\n ms.LoadFromFile(AFileName);\r\n Result := LoadGPXFromStream(ms, AEncoding, AAutoDisplay, AZoomToBounds, AStrokeWidth, AStrokeColor, ADisplayElevation, ADisplayTimeStamps, AMinSecondsBetweenTimeStamps);\r\n finally\r\n ms.Free;\r\n end;\r\nend;\r\n{$ENDIF}\r\n\r\n{$ENDIF}\r\n\r\nfunction TTMSFNCCustomMaps.LoadGPXFromStream(const AStream: TStream; AAutoDisplay: Boolean = True;\r\n AZoomToBounds: Boolean = True; AStrokeWidth: Integer = 3; AStrokeColor: TTMSFNCGraphicsColor = gcBlack; ADisplayElevation: Boolean = False;\r\n ADisplayTimeStamps: Boolean = False; AMinSecondsBetweenTimeStamps: Integer = 600): TTMSFNCMapsGPXRec;\r\nvar\r\n s: TStringStream;\r\nbegin\r\n s := TStringStream.Create('');\r\n try\r\n AStream.Position := 0;\r\n s.CopyFrom(AStream, AStream.Size);\r\n Result := LoadGPXFromText(s.DataString, AAutoDisplay, AZoomToBounds, AStrokeWidth, AStrokeColor, ADisplayElevation, ADisplayTimeStamps, AMinSecondsBetweenTimeStamps);\r\n finally\r\n s.Free;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCCustomMaps.LoadGPXFromStream(const AStream: TStream; AAutoDisplay: Boolean;\r\n AZoomToBounds: Boolean; AStrokeWidth: Integer; AElevationColors: TTMSFNCMapsGPXColorRecArray; ADisplayElevation: Boolean;\r\n ADisplayTimeStamps: Boolean = False; AMinSecondsBetweenTimeStamps: Integer = 600): TTMSFNCMapsGPXRec;\r\nvar\r\n s: TStringStream;\r\nbegin\r\n s := TStringStream.Create('');\r\n try\r\n AStream.Position := 0;\r\n s.CopyFrom(AStream, AStream.Size);\r\n Result := LoadGPXFromText(s.DataString, AAutoDisplay, AZoomToBounds, AStrokeWidth, AElevationColors, ADisplayElevation, ADisplayTimeStamps, AMinSecondsBetweenTimeStamps);\r\n finally\r\n s.Free;\r\n end;\r\nend;\r\n\r\n{$IFNDEF LCLLIB}\r\nfunction TTMSFNCCustomMaps.LoadGPXFromStream(const AStream: TStream;\r\n AEncoding: TEncoding; AAutoDisplay, AZoomToBounds: Boolean;\r\n AStrokeWidth: Integer; AElevationColors: TTMSFNCMapsGPXColorRecArray;\r\n ADisplayElevation, ADisplayTimeStamps: Boolean;\r\n AMinSecondsBetweenTimeStamps: Integer): TTMSFNCMapsGPXRec;\r\nvar\r\n s: TStringStream;\r\nbegin\r\n s := TStringStream.Create('', AEncoding);\r\n try\r\n AStream.Position := 0;\r\n s.CopyFrom(AStream, AStream.Size);\r\n Result := LoadGPXFromText(s.DataString, AAutoDisplay, AZoomToBounds, AStrokeWidth, AElevationColors, ADisplayElevation, ADisplayTimeStamps, AMinSecondsBetweenTimeStamps);\r\n finally\r\n s.Free;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCCustomMaps.LoadGPXFromStream(const AStream: TStream;\r\n AEncoding: TEncoding; AAutoDisplay, AZoomToBounds: Boolean;\r\n AStrokeWidth: Integer; AStrokeColor: TTMSFNCGraphicsColor; ADisplayElevation,\r\n ADisplayTimeStamps: Boolean;\r\n AMinSecondsBetweenTimeStamps: Integer): TTMSFNCMapsGPXRec;\r\nvar\r\n s: TStringStream;\r\nbegin\r\n s := TStringStream.Create('', AEncoding);\r\n try\r\n AStream.Position := 0;\r\n s.CopyFrom(AStream, AStream.Size);\r\n Result := LoadGPXFromText(s.DataString, AAutoDisplay, AZoomToBounds, AStrokeWidth, AStrokeColor, ADisplayElevation, ADisplayTimeStamps, AMinSecondsBetweenTimeStamps);\r\n finally\r\n s.Free;\r\n end;\r\nend;\r\n{$ENDIF}\r\n\r\nfunction TTMSFNCCustomMaps.LoadGPXFromText(AText: string; AAutoDisplay: Boolean = True;\r\n AZoomToBounds: Boolean = True; AStrokeWidth: Integer = 3; AStrokeColor: TTMSFNCGraphicsColor = gcBlack; ADisplayElevation: Boolean = False;\r\n ADisplayTimeStamps: Boolean = False; AMinSecondsBetweenTimeStamps: Integer = 600): TTMSFNCMapsGPXRec;\r\nbegin\r\n Result := InternalLoadGPX(AText, AAutoDisplay, AZoomToBounds, AStrokeWidth, AStrokeColor, ADisplayElevation, ADisplayTimeStamps, AMinSecondsBetweenTimeStamps);\r\nend;\r\n\r\nfunction TTMSFNCCustomMaps.LoadGPXFromText(AText: string; AAutoDisplay: Boolean;\r\n AZoomToBounds: Boolean; AStrokeWidth: Integer; AElevationColors: TTMSFNCMapsGPXColorRecArray; ADisplayElevation: Boolean;\r\n ADisplayTimeStamps: Boolean = False; AMinSecondsBetweenTimeStamps: Integer = 600): TTMSFNCMapsGPXRec;\r\nbegin\r\n Result := InternalLoadGPX(AText, AAutoDisplay, AZoomToBounds, AStrokeWidth, AElevationColors, ADisplayElevation, ADisplayTimeStamps, AMinSecondsBetweenTimeStamps);\r\nend;\r\n\r\nprocedure TTMSFNCCustomMaps.Loaded;\r\nbegin\r\n inherited;\r\n BeginUpdate;\r\n EndUpdate;\r\nend;\r\n\r\n{$IFNDEF WEBLIB}\r\nfunction TTMSFNCCustomMaps.LoadGeoJSONFromFile(\r\n AFileName: string; AAutoDisplay: Boolean = True; AZoomToBounds: Boolean = True): TTMSFNCMapsGeoJSONRec;\r\nvar\r\n ms: TMemoryStream;\r\nbegin\r\n ms := TMemoryStream.Create;\r\n try\r\n ms.LoadFromFile(AFileName);\r\n Result := LoadGeoJSONFromStream(ms, AAutoDisplay, AZoomToBounds);\r\n finally\r\n ms.Free;\r\n end;\r\nend;\r\n\r\n{$IFNDEF LCLLIB}\r\nfunction TTMSFNCCustomMaps.LoadGeoJSONFromFile(AFileName: string;\r\n AEncoding: TEncoding; AAutoDisplay,\r\n AZoomToBounds: Boolean): TTMSFNCMapsGeoJSONRec;\r\nvar\r\n ms: TMemoryStream;\r\nbegin\r\n ms := TMemoryStream.Create;\r\n try\r\n ms.LoadFromFile(AFileName);\r\n Result := LoadGeoJSONFromStream(ms, AEncoding, AAutoDisplay, AZoomToBounds);\r\n finally\r\n ms.Free;\r\n end;\r\nend;\r\n{$ENDIF}\r\n{$ENDIF}\r\n\r\n{$IFNDEF LCLLIB}\r\nfunction TTMSFNCCustomMaps.LoadGeoJSONFromStream(const AStream: TStream;\r\n AEncoding: TEncoding; AAutoDisplay,\r\n AZoomToBounds: Boolean): TTMSFNCMapsGeoJSONRec;\r\nvar\r\n s: TStringStream;\r\nbegin\r\n s := TStringStream.Create('', AEncoding);\r\n try\r\n AStream.Position := 0;\r\n s.CopyFrom(AStream, AStream.Size);\r\n Result := LoadGeoJSONFromText(s.DataString, AAutoDisplay, AZoomToBounds);\r\n finally\r\n s.Free;\r\n end;\r\nend;\r\n{$ENDIF}\r\n\r\nfunction TTMSFNCCustomMaps.LoadGeoJSONFromStream(\r\n const AStream: TStream; AAutoDisplay: Boolean = True; AZoomToBounds: Boolean = True): TTMSFNCMapsGeoJSONRec;\r\nbegin\r\n Result := LoadGeoJSONFromStream(AStream{$IFNDEF LCLLIB}, TEncoding.Default{$ENDIF}, AAutoDisplay, AZoomToBounds);\r\nend;\r\n\r\nfunction TTMSFNCCustomMaps.LoadGeoJSONFromText(\r\n AText: string; AAutoDisplay: Boolean = True; AZoomToBounds: Boolean = True): TTMSFNCMapsGeoJSONRec;\r\nbegin\r\n Result := InternalLoadGeoJSON(AText, AAutoDisplay, AZoomToBounds);\r\nend;\r\n\r\nfunction TTMSFNCCustomMaps.InternalLoadGeoJSON(\r\n AText: string; AAutoDisplay: Boolean = True; AZoomToBounds: Boolean = True): TTMSFNCMapsGeoJSONRec;\r\nvar\r\n jv, jvv: TJSONValue;\r\n ja: TJSONArray;\r\n f, I, J: Integer;\r\n coords: TTMSFNCMapsCoordinateRecArrayArray;\r\n minlon, maxlon, minlat, maxlat, lon, lat: double;\r\n typeid: string;\r\n featname: string;\r\n path, allpath: TTMSFNCMapsCoordinateRecArray;\r\n p: TTMSFNCMapsPolygon;\r\n\r\n procedure AddCoords(arr: TJSONArray);\r\n begin\r\n SetLength(coords[Length(coords) - 1], Length(coords[Length(coords) - 1]) + 1);\r\n\r\n if TTMSFNCUtils.GetJSONArraySize(arr) in [2,3] then\r\n begin\r\n lon := TTMSFNCUtils.GetJSONValueAsDouble(TTMSFNCUtils.GetJSONArrayItem(arr, 0));\r\n lat := TTMSFNCUtils.GetJSONValueAsDouble(TTMSFNCUtils.GetJSONArrayItem(arr, 1));\r\n coords[Length(coords) - 1][Length(coords[Length(coords) - 1]) - 1].Longitude := lon;\r\n coords[Length(coords) - 1][Length(coords[Length(coords) - 1]) - 1].Latitude := lat;\r\n\r\n if lon > maxlon then\r\n maxlon := lon;\r\n if lon < minlon then\r\n minlon := lon;\r\n if lat > maxlat then\r\n maxlat := lat;\r\n if lat < minlat then\r\n minlat := lat;\r\n end;\r\n end;\r\n\r\n procedure AddCoordArray;\r\n begin\r\n SetLength(coords, Length(coords) + 1);\r\n end;\r\n\r\n procedure ParseFeature(AValue: TJSONValue);\r\n var\r\n l, j, k, m, n: integer;\r\n jp, geojsondata: TJSONValue;\r\n jaf, jac, jacc, jaccc: TJSONArray;\r\n geoJSONEventData: TTMSFNCMapsGeoJSONEventData;\r\n begin\r\n SetLength(coords, 0);\r\n\r\n jp := TTMSFNCUtils.GetJSONValue(AValue, 'name');\r\n if not Assigned(jp) then\r\n jp := TTMSFNCUtils.GetJSONValue(AValue, 'properties');\r\n\r\n if Assigned(jp) then\r\n featname := TTMSFNCUtils.GetJSONProp(jp, 'name');\r\n\r\n // get geometry of each feature\r\n jp := TTMSFNCUtils.GetJSONValue(AValue, 'geometry');\r\n if Assigned(jp) then\r\n begin\r\n geojsondata := jp;\r\n typeid := Uppercase(TTMSFNCUtils.GetJSONProp(jp, 'type'));\r\n\r\n if (typeid = 'POLYGON') or (typeid = 'MULTIPOLYGON') or (typeid = 'LINESTRING') or (typeid = 'MULTILINESTRING') or (typeid = 'POINT') then\r\n begin\r\n jp := TTMSFNCUtils.GetJSONValue(jp, 'coordinates');\r\n\r\n if Assigned(jp) and (jp is TJSONArray) then\r\n begin\r\n jaf := jp as TJSONArray;\r\n\r\n if (TTMSFNCUtils.GetJSONArraySize(jaf) in [2,3]) and not (TTMSFNCUtils.GetJSONArrayItem(jaf, 0) is TJSONArray) then\r\n begin\r\n AddCoords(jaf)\r\n end\r\n else\r\n begin\r\n for l := 0 to TTMSFNCUtils.GetJSONArraySize(jaf) - 1 do\r\n begin\r\n jac := TTMSFNCUtils.GetJSONArrayItem(jaf, l) as TJSONArray;\r\n AddCoordArray;\r\n\r\n if (TTMSFNCUtils.GetJSONArraySize(jac) in [2,3]) and not (TTMSFNCUtils.GetJSONArrayItem(jac, 0) is TJSONArray) then\r\n begin\r\n AddCoords(jac);\r\n end\r\n else\r\n begin\r\n for j := 0 to TTMSFNCUtils.GetJSONArraySize(jac) - 1 do\r\n begin\r\n if TTMSFNCUtils.GetJSONArrayItem(jac, j) is TJSONArray then\r\n begin\r\n jacc := TTMSFNCUtils.GetJSONArrayItem(jac, j) as TJSONArray;\r\n\r\n if (TTMSFNCUtils.GetJSONArraySize(jacc) in [2,3]) and not (TTMSFNCUtils.GetJSONArrayItem(jacc, 0) is TJSONArray) then\r\n begin\r\n AddCoords(jacc);\r\n end\r\n else\r\n begin\r\n for k := 0 to TTMSFNCUtils.GetJSONArraySize(jacc) - 1 do\r\n begin\r\n if TTMSFNCUtils.GetJSONArrayItem(jacc, k) is TJSONArray then\r\n begin\r\n jaccc := TTMSFNCUtils.GetJSONArrayItem(jacc, k) as TJSONArray;\r\n AddCoords(jaccc);\r\n end;\r\n end;\r\n end;\r\n end;\r\n end;\r\n end;\r\n end;\r\n end;\r\n end;\r\n\r\n SetLength(path, 0);\r\n\r\n for n := 0 to Length(coords) - 1 do\r\n begin\r\n for k := 0 to Length(coords[n]) - 1 do\r\n begin\r\n if n = 0 then\r\n begin\r\n SetLength(path, Length(path) + 1);\r\n path[Length(path) - 1] := CreateCoordinate(coords[n][k].Latitude, coords[n][k].Longitude);\r\n end;\r\n\r\n SetLength(allpath, Length(allpath) + 1);\r\n allpath[Length(allpath) - 1] := CreateCoordinate(coords[n][k].Latitude, coords[n][k].Longitude);\r\n end;\r\n end;\r\n\r\n geoJSONEventData := TTMSFNCMapsGeoJSONEventData.Create;\r\n geoJSONEventData.JSONValue := geojsondata;\r\n\r\n if typeid = 'POINT' then\r\n begin\r\n SetLength(Result.Points, Length(Result.Points) + 1);\r\n Result.Points[Length(Result.Points) - 1].Coordinate := path[0];\r\n Result.Points[Length(Result.Points) - 1].Name := featname;\r\n geoJSONEventData.Point := Result.Points[Length(Result.Points) - 1].Coordinate;\r\n end\r\n else if (typeid = 'LINESTRING') or (typeid = 'MULTILINESTRING') then\r\n begin\r\n SetLength(Result.Polylines, Length(Result.Polylines) + 1);\r\n Result.Polylines[Length(Result.Polylines) - 1].Coordinates := path;\r\n Result.Polylines[Length(Result.Polylines) - 1].Name := featname;\r\n geoJSONEventData.Polyline := Result.Polylines[Length(Result.Polylines) - 1].Coordinates;\r\n end\r\n else\r\n begin\r\n SetLength(Result.Polygons, Length(Result.Polygons) + 1);\r\n Result.Polygons[Length(Result.Polygons) - 1].Coordinates := path;\r\n Result.Polygons[Length(Result.Polygons) - 1].Name := featname;\r\n for m := 1 to Length(coords) - 1 do\r\n begin\r\n SetLength(Result.Polygons[Length(Result.Polygons) - 1].Holes, Length(Result.Polygons[Length(Result.Polygons) - 1].Holes) + 1);\r\n Result.Polygons[Length(Result.Polygons) - 1].Holes[m - 1] := coords[m];\r\n end;\r\n geoJSONEventData.Polygon := Result.Polygons[Length(Result.Polygons) - 1].Coordinates;\r\n end;\r\n\r\n try\r\n DoCreateGeoJSONObject(geoJSONEventData);\r\n finally\r\n geoJSONEventData.Free;\r\n end;\r\n\r\n end;\r\n end;\r\n end;\r\n\r\nbegin\r\n jv := TTMSFNCUtils.ParseJSON(AText);\r\n\r\n if Assigned(jv) then\r\n begin\r\n try\r\n jvv := TTMSFNCUtils.GetJSONValue(jv, 'features');\r\n\r\n minlon := +1000;\r\n maxlon := -1000;\r\n minlat := +1000;\r\n maxlat := -1000;\r\n\r\n if Assigned(jvv) and (jvv is TJSONArray) then\r\n begin\r\n ja := jvv as TJSONArray;\r\n for f := 0 to TTMSFNCUtils.GetJSONArraySize(ja) - 1 do\r\n ParseFeature(TTMSFNCUtils.GetJSONArrayItem(ja, f));\r\n end\r\n else\r\n ParseFeature(jv);\r\n finally\r\n jv.Free;\r\n end;\r\n\r\n if AAutoDisplay then\r\n begin\r\n for I := 0 to Length(Result.Points) - 1 do\r\n AddMarker(Result.Points[I].Coordinate);\r\n for I := 0 to Length(Result.Polylines) - 1 do\r\n AddPolyline(Result.Polylines[I].Coordinates);\r\n for I := 0 to Length(Result.Polygons) - 1 do\r\n begin\r\n p := AddPolygon(Result.Polygons[I].Coordinates);\r\n for J := 0 to Length(Result.Polygons[I].Holes) - 1 do\r\n begin\r\n p.AddHole(Result.Polygons[I].Holes[J]);\r\n end;\r\n end;\r\n if AZoomToBounds then\r\n ZoomToBounds(allpath);\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCCustomMaps.InternalLoadGPX(AText: string; AAutoDisplay: Boolean = True;\r\n AZoomToBounds: Boolean = True; AStrokeWidth: Integer = 3; AStrokeColor: TTMSFNCGraphicsColor = gcBlack; ADisplayElevation: Boolean = False;\r\n ADisplayTimeStamps: Boolean = False; AMinSecondsBetweenTimeStamps: Integer = 600): TTMSFNCMapsGPXRec;\r\nvar\r\n AElevationColors: TTMSFNCMapsGPXColorRecArray;\r\nbegin\r\n SetLength(AElevationColors, 1);\r\n AElevationColors[0].Color := AStrokeColor;\r\n\r\n Result := InternalLoadGPX(AText, AAutoDisplay, AZoomToBounds, AStrokeWidth, AElevationColors, ADisplayElevation, ADisplayTimeStamps, AMinSecondsBetweenTimeStamps);\r\nend;\r\n\r\nfunction TTMSFNCCustomMaps.InternalLoadGPX(AText: string; AAutoDisplay: Boolean = True;\r\n AZoomToBounds: Boolean = True; AStrokeWidth: Integer = 3; AElevationColors: TTMSFNCMapsGPXColorRecArray = nil; ADisplayElevation: Boolean = False;\r\n ADisplayTimeStamps: Boolean = False; AMinSecondsBetweenTimeStamps: Integer = 600): TTMSFNCMapsGPXRec;\r\n\r\n function GetNodeString(ANode: TTMSFNCMapsXMLNode): string;\r\n begin\r\n Result := '';\r\n if Assigned(ANode) {$IFNDEF LCLWEBLIB} and Assigned(ANode.DOMNode){$ENDIF} then\r\n begin\r\n Result := ANode{$IFNDEF LCLWEBLIB}.DOMNode{$ENDIF}.firstChild.nodeValue;\r\n end;\r\n end;\r\n\r\nvar\r\n xmldoc: TTMSFNCMapsXMLDocument;\r\n I, J, K, L: Integer;\r\n iNode, nNode, sNode: TTMSFNCMapsXMLNode;\r\n snlat, snlng, cNode, pNode, eNode, lNode: TTMSFNCMapsXMLDomNode;\r\n v: Double;\r\n parentNode: TTMSFNCMapsXMLNode;\r\n gpx11: Boolean;\r\n cnt, cntTr, cntSeg, cntWpt: Integer;\r\n {$IFDEF LCLLIB}\r\n ss: TStringStream;\r\n {$ENDIF}\r\n allpath, arr: TTMSFNCMapsCoordinateRecArray;\r\n nodeName, timeStamp: string;\r\n ele, maxHeight, minHeight, divHeight: Double;\r\n heightFound: Boolean;\r\n p: TTMSFNCMapsPolyline;\r\n prevColor: TTMSFNCGraphicsColor;\r\n clr: TTMSFNCMapsGPXColorRec;\r\n clrs: TTMSFNCMapsGPXColorRecArray;\r\n startTime, endTime: TDateTime;\r\n grade, prevGrade, gradeCount: Integer;\r\n trackEventData: TTMSFNCMapsGPXTrackEventData;\r\n segmentEventData: TTMSFNCMapsGPXSegmentEventData;\r\n waypointEventData: TTMSFNCMapsGPXWayPointEventData;\r\n m: TTMSFNCMapsMarker;\r\nbegin\r\n {$IFDEF LCLLIB}\r\n ss := TStringStream.Create(AText);\r\n try\r\n ReadXMLFile(xmldoc, ss);\r\n finally\r\n ss.Free;\r\n end;\r\n {$ELSE}\r\n {$IFDEF WEBLIB}\r\n asm\r\n var parser = new DOMParser();\r\n xmldoc = parser.parseFromString(AText, 'text/xml');\r\n end;\r\n {$ELSE}\r\n xmldoc := TXmlDocument.Create(nil);\r\n xmldoc.LoadFromXML(AText);\r\n {$ENDIF}\r\n {$ENDIF}\r\n\r\n parentNode := xmldoc.DocumentElement;\r\n\r\n gpx11 := false;\r\n cntTr := -1;\r\n minHeight := 0;\r\n maxHeight := 0;\r\n endTime := 0;\r\n cntWpt := -1;\r\n v := 0;\r\n\r\n if Assigned(parentNode) then\r\n begin\r\n\r\n iNode := FindNode(parentNode, 'wpt');\r\n\r\n repeat\r\n if Assigned(iNode) then\r\n begin\r\n snlat := FindNodeAttribute(iNode{$IFNDEF LCLWEBLIB}.DOMNode{$ENDIF}, 'lat');\r\n snlng := FindNodeAttribute(iNode{$IFNDEF LCLWEBLIB}.DOMNode{$ENDIF}, 'lon');\r\n\r\n if Assigned(snlat) and Assigned(snlng) then\r\n begin\r\n inc(cntWpt);\r\n SetLength(Result.WayPoints, cntWpt + 1);\r\n\r\n if TTMSFNCUtils.TryStrToFloatDot(snlat.nodeValue, v) then\r\n begin\r\n Result.WayPoints[cntWpt].WayPoint.Latitude := v;\r\n end;\r\n\r\n if TTMSFNCUtils.TryStrToFloatDot(snlng.nodeValue, v) then\r\n begin\r\n Result.WayPoints[cntWpt].WayPoint.Longitude := v;\r\n end;\r\n\r\n nNode := FindNode(iNode, 'name');\r\n Result.WayPoints[cntWpt].Name := GetNodeString(nNode);\r\n\r\n nNode := FindNode(iNode, 'cmt');\r\n Result.WayPoints[cntWpt].Comment := GetNodeString(nNode);\r\n\r\n nNode := FindNode(iNode, 'desc');\r\n Result.WayPoints[cntWpt].Description := GetNodeString(nNode);\r\n\r\n nNode := FindNode(iNode, 'sym');\r\n Result.WayPoints[cntWpt].Symbol := GetNodeString(nNode);\r\n\r\n nNode := FindNode(iNode, 'type');\r\n Result.WayPoints[cntWpt].WayPointType := GetNodeString(nNode);\r\n\r\n Result.WayPoints[cntWpt].HasTimeStamp := False;\r\n nNode := FindNode(iNode, 'time');\r\n timeStamp := GetNodeString(nNode);\r\n if timeStamp <> '' then\r\n begin\r\n Result.WayPoints[cntWpt].TimeStamp := TTMSFNCUtils.ISOToDateTime(timestamp, True);\r\n Result.WayPoints[cntWpt].HasTimeStamp := True;\r\n end;\r\n\r\n Result.WayPoints[cntWpt].HasElevation := False;\r\n nNode := FindNode(iNode, 'ele');\r\n if TTMSFNCUtils.TryStrToFloatDot(GetNodeString(nNode), v) then\r\n begin\r\n Result.WayPoints[cntWpt].Elevation := v;\r\n Result.WayPoints[cntWpt].HasElevation := True;\r\n end;\r\n\r\n nNode := FindNode(iNode, 'link');\r\n if Assigned(nNode) {$IFNDEF LCLWEBLIB} and Assigned(nNode.DOMNode){$ENDIF} then\r\n begin\r\n lNode := FindNodeAttribute(nNode{$IFNDEF LCLWEBLIB}.DOMNode{$ENDIF}, 'href');\r\n\r\n if Assigned(lNode) then\r\n begin\r\n Result.WayPoints[cntWpt].Link := lNode.nodeValue;\r\n end;\r\n end;\r\n\r\n waypointEventData := TTMSFNCMapsGPXWayPointEventData.Create;\r\n waypointEventData.Node := iNode{$IFNDEF LCLWEBLIB}.DOMNode{$ENDIF};\r\n waypointEventData.Data := Result.WayPoints[cntWpt];\r\n try\r\n DoCreateGPXWayPoint(waypointEventData);\r\n finally\r\n waypointEventData.Free;\r\n end;\r\n\r\n end;\r\n end;\r\n if Assigned(iNode) then\r\n iNode := iNode.NextSibling;\r\n until (not Assigned(iNode));\r\n\r\n iNode := FindNode(parentNode, 'trk');\r\n\r\n if not Assigned(iNode) then\r\n begin\r\n iNode := FindNode(parentNode, 'rte');\r\n gpx11 := true;\r\n end;\r\n\r\n repeat\r\n if Assigned(iNode) then\r\n begin\r\n cntSeg := -1;\r\n inc(cntTr);\r\n\r\n SetLength(Result.Tracks, cntTr + 1);\r\n\r\n nNode := FindNode(iNode, 'name');\r\n if Assigned(nNode) {$IFNDEF LCLWEBLIB} and Assigned(nNode.DOMNode){$ENDIF} then\r\n Result.Tracks[cntTr].Name := nNode{$IFNDEF LCLWEBLIB}.DOMNode{$ENDIF}.nodeName;\r\n\r\n trackEventData := TTMSFNCMapsGPXTrackEventData.Create;\r\n trackEventData.Node := iNode{$IFNDEF LCLWEBLIB}.DOMNode{$ENDIF};\r\n trackEventData.Data := Result.Tracks[cntTr];\r\n try\r\n DoCreateGPXTrack(trackEventData);\r\n finally\r\n trackEventData.Free;\r\n end;\r\n\r\n if not gpx11 then\r\n sNode := FindNode(iNode, 'trkseg')\r\n else\r\n sNode := iNode;\r\n\r\n repeat\r\n if Assigned(sNode) and sNode.HasChildNodes then\r\n begin\r\n cnt := -1;\r\n inc(cntSeg);\r\n SetLength(Result.Tracks[cntTr].Segments, cntSeg + 1);\r\n heightFound := false;\r\n\r\n cNode := GetFirstChildNode(sNode);\r\n\r\n while Assigned(cNode) do\r\n begin\r\n pNode := cNode;\r\n nodeName := pNode.NodeName;\r\n\r\n if not gpx11 or (gpx11 and (pNode.NodeName = 'rtept')) then\r\n begin\r\n snlat := FindNodeAttribute(pNode, 'lat');\r\n snlng := FindNodeAttribute(pNode, 'lon');\r\n\r\n if Assigned(snlat) and Assigned(snlng) then\r\n begin\r\n inc(cnt);\r\n SetLength(Result.Tracks[cntTr].Segments[cntSeg], cnt + 1);\r\n\r\n if nodeName = 'trkpt' then\r\n begin\r\n eNode := FindDomNode(pNode, 'ele');\r\n if Assigned(eNode) then\r\n begin\r\n ele := 0;\r\n if TTMSFNCUtils.TryStrToFloatDot(eNode.firstChild.nodeValue, ele) then\r\n begin\r\n if heightFound then\r\n begin\r\n if ele > maxHeight then\r\n maxHeight := ele;\r\n if ele < minHeight then\r\n minHeight := ele;\r\n end\r\n else\r\n begin\r\n heightFound := true;\r\n maxHeight := ele;\r\n minHeight := ele;\r\n end;\r\n\r\n Result.Tracks[cntTr].Segments[cntSeg][cnt].Elevation := ele;\r\n Result.Tracks[cntTr].Segments[cntSeg][cnt].HasElevation := True;\r\n end;\r\n end;\r\n\r\n eNode := FindDOMNode(pNode, 'time');\r\n if Assigned(eNode) then\r\n begin\r\n timestamp := eNode.firstChild.nodeValue;\r\n if timestamp <> '' then\r\n begin\r\n Result.Tracks[cntTr].Segments[cntSeg][cnt].TimeStamp := TTMSFNCUtils.ISOToDateTime(timestamp, True);\r\n Result.Tracks[cntTr].Segments[cntSeg][cnt].HasTimeStamp := True;\r\n end;\r\n end;\r\n end;\r\n\r\n v := 0;\r\n if TTMSFNCUtils.TryStrToFloatDot(snlat.nodeValue, v) then\r\n Result.Tracks[cntTr].Segments[cntSeg][cnt].Latitude := v;\r\n\r\n v := 0;\r\n if TTMSFNCUtils.TryStrToFloatDot(snlng.nodeValue, v) then\r\n Result.Tracks[cntTr].Segments[cntSeg][cnt].Longitude := v;\r\n\r\n SetLength(allpath, Length(allpath) + 1);\r\n allpath[Length(allpath) - 1] := CreateCoordinate(Result.Tracks[cntTr].Segments[cntSeg][cnt].Latitude, Result.Tracks[cntTr].Segments[cntSeg][cnt].Longitude);\r\n\r\n segmentEventData := TTMSFNCMapsGPXSegmentEventData.Create;\r\n segmentEventData.Node := pNode;\r\n segmentEventData.Data := Result.Tracks[cntTr].Segments[cntSeg][cnt];\r\n try\r\n DoCreateGPXSegment(segmentEventData);\r\n finally\r\n segmentEventData.Free;\r\n end;\r\n end;\r\n end;\r\n\r\n cNode := cNode.nextSibling;\r\n end;\r\n end;\r\n\r\n if Assigned(sNode) then\r\n sNode := sNode.NextSibling;\r\n\r\n until (not Assigned(sNode));\r\n end;\r\n\r\n if Assigned(iNode) then\r\n iNode := iNode.NextSibling;\r\n until (not Assigned(iNode));\r\n end;\r\n\r\n if AAutoDisplay then\r\n begin\r\n if Assigned(AElevationColors) then\r\n begin\r\n SetLength(clrs, Length(AElevationColors));\r\n clrs := AElevationColors;\r\n end\r\n else\r\n begin\r\n SetLength(clrs, 5);\r\n clr.Color := gcBlack;\r\n clrs[0] := clr;\r\n clr.Color := gcGreen;\r\n clrs[1] := clr;\r\n clr.Color := gcYellow;\r\n clrs[2] := clr;\r\n clr.Color := gcOrange;\r\n clrs[3] := clr;\r\n clr.Color := gcRed;\r\n clrs[4] := clr;\r\n end;\r\n color := clrs[0].Color;\r\n prevColor := color;\r\n grade := 0;\r\n prevGrade := grade;\r\n\r\n BeginUpdate;\r\n for I := 0 to Length(Result.WayPoints) - 1 do\r\n begin\r\n m := AddMarker(Result.WayPoints[I].WayPoint);\r\n m.DefaultIcon.Enabled := True;\r\n// if Result.WayPoints[I].Name <> '' then\r\n// begin\r\n// //AddLabel(Result.WayPoints[I].WayPoint, Result.WayPoints[I].Name, gcBlack, gcWhite);\r\n// end;\r\n// + '
' + Result.WayPoints[I].Description\r\n// + '
' + Result.WayPoints[I].Comment\r\n// + '
' + Result.WayPoints[I].Link + ''\r\n// + '
' + FloatToStr(Result.WayPoints[I].Elevation)\r\n// + '
' + DateTimeToStr(Result.WayPoints[I].TimeStamp)\r\n// + '
' + Result.WayPoints[I].Symbol\r\n end;\r\n\r\n for I := 0 to Length(Result.Tracks) - 1 do\r\n begin\r\n for J := 0 to Length(Result.Tracks[I].Segments) - 1 do\r\n begin\r\n\r\n if ADisplayElevation or ADisplayTimeStamps then\r\n begin\r\n for K := 0 to Length(Result.Tracks[I].Segments[J]) - 1 do\r\n begin\r\n\r\n if ADisplayTimeStamps and (AMinSecondsBetweenTimeStamps > 0) then\r\n begin\r\n startTime := Result.Tracks[I].Segments[J][K].TimeStamp;\r\n if (startTime <> endTime) and (starttime <> 0) and (SecondsBetween(startTime, endTime) > AMinSecondsBetweenTimeStamps) then\r\n begin\r\n endTime := startTime;\r\n AddMarker(Result.Tracks[I].Segments[J][K + 1], DateTimeToStr(endTime));\r\n end;\r\n end;\r\n\r\n if ADisplayElevation then\r\n begin\r\n gradeCount := 5;\r\n if Length(clrs) > 1 then\r\n gradeCount := Length(clrs);\r\n\r\n divHeight := (maxHeight - minHeight) / gradeCount;\r\n\r\n grade := 0;\r\n for L := 0 to gradeCount - 1 do\r\n begin\r\n if Result.Tracks[I].Segments[J][K].Elevation > (minHeight + (divHeight * L)) then\r\n grade := L;\r\n end;\r\n\r\n SetLength(arr, Length(arr) + 1);\r\n arr[Length(arr) - 1] := Result.Tracks[I].Segments[J][K];\r\n\r\n if Length(clrs) > 1 then\r\n color := clrs[grade].Color\r\n else\r\n color := Lighter(clrs[0].Color, (grade * Round(100 / gradeCount)));\r\n\r\n if (grade <> prevGrade) or (K = Length(Result.Tracks[I].Segments[J]) - 2) then\r\n begin\r\n prevGrade := grade;\r\n\r\n SetLength(arr, Length(arr) + 1);\r\n arr[Length(arr) - 1] := Result.Tracks[I].Segments[J][K + 1];\r\n\r\n p := AddPolyline(arr);\r\n p.StrokeColor := color;\r\n p.StrokeWidth := AStrokeWidth;\r\n SetLength(arr, 0);\r\n //WEB workaround\r\n arr := nil;\r\n end;\r\n\r\n end;\r\n end;\r\n end\r\n else\r\n begin\r\n p := AddPolyline(Result.Tracks[I].Segments[J]);\r\n p.StrokeColor := color;\r\n p.StrokeWidth := AStrokeWidth;\r\n end;\r\n end;\r\n end;\r\n EndUpdate;\r\n\r\n if AZoomToBounds then\r\n ZoomToBounds(allpath);\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomMaps.ZoomToBounds(ACoordinates: TTMSFNCMapsCoordinateRecArray);\r\nbegin\r\n ZoomToBounds(CreateBounds(ACoordinates));\r\nend;\r\n\r\nprocedure TTMSFNCCustomMaps.ZoomToBounds(ACoordinates: TTMSFNCMapsCoordinateRecArrayArrayArray);\r\nbegin\r\n ZoomToBounds(CreateBounds(ACoordinates));\r\nend;\r\n\r\nprocedure TTMSFNCCustomMaps.ZoomToBounds(ACoordinates: TTMSFNCMapsCoordinateRecArrayArray);\r\nbegin\r\n ZoomToBounds(CreateBounds(ACoordinates));\r\nend;\r\n\r\nprocedure TTMSFNCCustomMaps.ZoomToBounds(ABounds: TTMSFNCMapsBoundsRec);\r\nbegin\r\n ZoomToBounds(ABounds.NorthEast, ABounds.SouthWest);\r\nend;\r\n\r\nprocedure TTMSFNCCustomMaps.SetZoomLevel(AZoomLevel: Double);\r\nbegin\r\n if MapInitialized and MapReady then\r\n ExecuteJavaScript(SETZOOMLEVELFUNCTION + '(' + TTMSFNCUtils.FloatToStrDot(AZoomLevel) + ')');\r\nend;\r\n\r\nfunction TTMSFNCCustomMaps.GetPolylinesClass: TTMSFNCMapsPolylinesClass;\r\nbegin\r\n Result := TTMSFNCMapsPolylines;\r\nend;\r\n\r\nfunction TTMSFNCCustomMaps.GetPolygonsClass: TTMSFNCMapsPolygonsClass;\r\nbegin\r\n Result := TTMSFNCMapsPolygons;\r\nend;\r\n\r\nfunction TTMSFNCCustomMaps.GetCirclesClass: TTMSFNCMapsCirclesClass;\r\nbegin\r\n Result := TTMSFNCMapsCircles;\r\nend;\r\n\r\nfunction TTMSFNCCustomMaps.GetRectanglesClass: TTMSFNCMapsRectanglesClass;\r\nbegin\r\n Result := TTMSFNCMapsRectangles;\r\nend;\r\n\r\nfunction TTMSFNCCustomMaps.GetMarkerByID(AID: string): TTMSFNCMapsMarker;\r\nbegin\r\n Result := Markers.ItemByID[AID];\r\nend;\r\n\r\nfunction TTMSFNCCustomMaps.GetMapID: string;\r\nbegin\r\n Result := '';\r\nend;\r\n\r\nfunction TTMSFNCCustomMaps.GetPanning: Boolean;\r\nbegin\r\n Result := Options.Panning;\r\nend;\r\n\r\nfunction TTMSFNCCustomMaps.GetPolyElementByID(AID: string): TTMSFNCMapsPolyElement;\r\nvar\r\n pl, pg, r, c: TTMSFNCMapsPolyElement;\r\nbegin\r\n Result := nil;\r\n pl := Polylines.ItemByID[AID];\r\n pg := Polygons.ItemByID[AID];\r\n r := Rectangles.ItemByID[AID];\r\n c := Circles.ItemByID[AID];\r\n\r\n if Assigned(pl) then\r\n Result := pl;\r\n if Assigned(pg) then\r\n Result := pg;\r\n if Assigned(r) then\r\n Result := r;\r\n if Assigned(c) then\r\n Result := c;\r\nend;\r\n\r\nfunction TTMSFNCCustomMaps.GetMarkersClass: TTMSFNCMapsMarkersClass;\r\nbegin\r\n Result := TTMSFNCMapsMarkers;\r\nend;\r\n\r\nfunction TTMSFNCCustomMaps.GetHeatMapsClass: TTMSFNCMapsHeatMapsClass;\r\nbegin\r\n Result := TTMSFNCMapsHeatMaps;\r\nend;\r\n\r\n{ TTMSFNCMaps }\r\n\r\nprocedure TTMSFNCMaps.AddBridge(ABridgeName: string; ABridgeObject: TObject);\r\nbegin\r\n inherited AddBridge(ABridgeName, ABridgeObject);\r\nend;\r\n\r\nfunction TTMSFNCMaps.CanGoBack: Boolean;\r\nbegin\r\n Result := inherited CanGoBack;\r\nend;\r\n\r\nfunction TTMSFNCMaps.CanGoForward: Boolean;\r\nbegin\r\n Result := inherited CanGoForward;\r\nend;\r\n\r\nprocedure TTMSFNCMaps.CaptureScreenShot(ACompleteEvent: TTMSFNCWebBrowserCaptureScreenShotCompleteEvent = nil);\r\nbegin\r\n inherited CaptureScreenShot(ACompleteEvent);\r\nend;\r\n\r\nprocedure TTMSFNCMaps.ClearCache;\r\nbegin\r\n inherited ClearCache;\r\nend;\r\n\r\nprocedure TTMSFNCMaps.DeInitialize;\r\nbegin\r\n inherited DeInitialize;\r\nend;\r\n\r\nprocedure TTMSFNCMaps.ExecuteJavaScript(AScript: String;\r\n ACompleteEvent: TTMSFNCWebBrowserJavaScriptCompleteEvent = nil; AImmediate: Boolean = False);\r\nbegin\r\n inherited ExecuteJavaScript(AScript, ACompleteEvent, AImmediate);\r\nend;\r\n\r\nfunction TTMSFNCMaps.ExecuteJavaScriptSync(AScript: String): string;\r\nbegin\r\n Result := inherited ExecuteJavaScriptSync(AScript);\r\nend;\r\n\r\nfunction TTMSFNCMaps.GetBridgeCommunicationLayer(ABridgeName: string): string;\r\nbegin\r\n Result := inherited GetBridgeCommunicationLayer(ABridgeName);\r\nend;\r\n\r\n{$IFDEF ANDROID}\r\nfunction TTMSFNCMaps.NativeDialog: Pointer;\r\nbegin\r\n Result := inherited NativeDialog;\r\nend;\r\n{$ENDIF}\r\n\r\n{$IFDEF MSWINDOWS}\r\nfunction TTMSFNCMaps.GetWebBrowserInstance: IInterface;\r\nbegin\r\n Result := inherited GetWebBrowserInstance;\r\nend;\r\n{$ENDIF}\r\n\r\nprocedure TTMSFNCMaps.GoBack;\r\nbegin\r\n inherited GoBack;\r\nend;\r\n\r\nprocedure TTMSFNCMaps.GoForward;\r\nbegin\r\n inherited GoForward;\r\nend;\r\n\r\nprocedure TTMSFNCMaps.Initialize;\r\nbegin\r\n inherited Initialize;\r\nend;\r\n\r\nfunction TTMSFNCMaps.IsFMXBrowser: Boolean;\r\nbegin\r\n Result := inherited IsFMXBrowser;\r\nend;\r\n\r\nprocedure TTMSFNCMaps.LoadFile(AFile: String);\r\nbegin\r\n inherited LoadFile(AFile);\r\nend;\r\n\r\nprocedure TTMSFNCMaps.LoadHTML(AHTML: String);\r\nbegin\r\n inherited LoadHTML(AHTML);\r\nend;\r\n\r\nfunction TTMSFNCMaps.NativeBrowser: Pointer;\r\nbegin\r\n Result := inherited NativeBrowser;\r\nend;\r\n\r\nfunction TTMSFNCMaps.NativeEnvironment: Pointer;\r\nbegin\r\n Result := inherited NativeEnvironment;\r\nend;\r\n\r\nprocedure TTMSFNCMaps.Navigate;\r\nbegin\r\n inherited Navigate;\r\nend;\r\n\r\nprocedure TTMSFNCMaps.Navigate(const AURL: string);\r\nbegin\r\n inherited Navigate(AURL);\r\nend;\r\n\r\nprocedure TTMSFNCMaps.Reload;\r\nbegin\r\n inherited Reload;\r\nend;\r\n\r\nprocedure TTMSFNCMaps.RemoveBridge(ABridgeName: string);\r\nbegin\r\n inherited RemoveBridge(ABridgeName);\r\nend;\r\n\r\nprocedure TTMSFNCMaps.ShowDebugConsole;\r\nbegin\r\n inherited ShowDebugConsole;\r\nend;\r\n\r\nprocedure TTMSFNCMaps.StopLoading;\r\nbegin\r\n inherited StopLoading;\r\nend;\r\n\r\n{ TTMSFNCMapsElementAction }\r\n\r\nprocedure TTMSFNCMapsElementAction.Assign(Source: TPersistent);\r\nbegin\r\n if (Source is TTMSFNCMapsElementAction) then\r\n begin\r\n FEnabled := (Source as TTMSFNCMapsElementAction).Enabled;\r\n FElementEvent := (Source as TTMSFNCMapsElementAction).Event;\r\n FHTMLElementID := (Source as TTMSFNCMapsElementAction).HTMLElementID;\r\n FTag := (Source as TTMSFNCMapsElementAction).Tag;\r\n FCustomEvent := (Source as TTMSFNCMapsElementAction).CustomEvent;\r\n FEventReturnValue := (Source as TTMSFNCMapsElementAction).EventReturnValue;\r\n FName := (Source as TTMSFNCMapsElementAction).Name;\r\n FTag := (Source as TTMSFNCMapsElementAction).Tag;\r\n FOnExecute := (Source as TTMSFNCMapsElementAction).OnExecute;\r\n end;\r\nend;\r\n\r\nconstructor TTMSFNCMapsElementAction.Create(ACollection: TCollection);\r\nbegin\r\n inherited;\r\n if Assigned(ACollection) then\r\n FOwner := (Collection as TTMSFNCMapsElementActions).FOwner;\r\n\r\n FTag := 0;\r\n FName := 'Action' + IntToStr(Index);\r\n FEnabled := true;\r\n FElementEvent := heClick;\r\n FHTMLElementID := '';\r\n FCustomEvent := '';\r\n FEventReturnValue := rvNone;\r\nend;\r\n\r\ndestructor TTMSFNCMapsElementAction.Destroy;\r\nbegin\r\n inherited;\r\nend;\r\n\r\nprocedure TTMSFNCMapsElementAction.SetCustomEvent(const Value: string);\r\nbegin\r\n if FCustomEvent <> Value then\r\n begin\r\n FCustomEvent := Value;\r\n UpdateAction;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCMapsElementAction.SetElementEvent(const Value: TTMSFNCMapsHTMLEvent);\r\nbegin\r\n if FElementEvent <> Value then\r\n begin\r\n FElementEvent := Value;\r\n UpdateAction;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCMapsElementAction.SetHTMLElementID(const Value: string);\r\nbegin\r\n if FHTMLElementID <> Value then\r\n begin\r\n FHTMLElementID := Value;\r\n UpdateAction;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCMapsElementAction.SetEnabled(const Value: boolean);\r\nbegin\r\n if FEnabled <> Value then\r\n begin\r\n FEnabled := Value;\r\n UpdateAction;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCMapsElementAction.SetEventReturnValue(\r\n const Value: TTMSFNCMapsReturnValue);\r\nbegin\r\n if FEventReturnValue <> Value then\r\n begin\r\n FEventReturnValue := Value;\r\n UpdateAction;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCMapsElementAction.SetName(const Value: string);\r\nbegin\r\n FName := Value;\r\nend;\r\n\r\nprocedure TTMSFNCMapsElementAction.UpdateAction;\r\nbegin\r\n if Assigned(FOwner) then\r\n FOwner.UpdateElementContainer;\r\nend;\r\n\r\n{ TTMSFNCMapsElementActions }\r\n\r\nfunction TTMSFNCMapsElementActions.Add: TTMSFNCMapsElementAction;\r\nbegin\r\n Result := TTMSFNCMapsElementAction(inherited Add);\r\nend;\r\n\r\nconstructor TTMSFNCMapsElementActions.Create(AOwner: TTMSFNCMapsElementContainer);\r\nbegin\r\n inherited Create(AOwner, TTMSFNCMapsElementAction);\r\n FOwner := AOwner;\r\nend;\r\n\r\nfunction TTMSFNCMapsElementActions.FindByName(AName: string): TTMSFNCMapsElementAction;\r\nbegin\r\n Result := GetActionByName(AName);\r\nend;\r\n\r\nfunction TTMSFNCMapsElementActions.GetAction(AName: string): TTMSFNCMapsElementAction;\r\nbegin\r\n Result := GetActionByName(AName);\r\nend;\r\n\r\nfunction TTMSFNCMapsElementActions.GetActionByName(AName: string): TTMSFNCMapsElementAction;\r\nvar\r\n i: integer;\r\nbegin\r\n Result := nil;\r\n\r\n for I := 0 to Count - 1 do\r\n begin\r\n if CompareText(AName, Items[i].Name) = 0 then\r\n begin\r\n Result := Items[i];\r\n break;\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCMapsElementActions.GetByName(AName: string): TTMSFNCMapsElementAction;\r\nbegin\r\n Result := GetActionByName(AName);\r\n if not Assigned(Result) then\r\n raise Exception.Create('Action ' + AName + ' not found');\r\nend;\r\n\r\nfunction TTMSFNCMapsElementActions.GetItems(AIndex: integer): TTMSFNCMapsElementAction;\r\nbegin\r\n Result := TTMSFNCMapsElementAction(inherited Items[AIndex]);\r\nend;\r\n\r\nfunction TTMSFNCMapsElementActions.Insert(AIndex: integer): TTMSFNCMapsElementAction;\r\nbegin\r\n Result := TTMSFNCMapsElementAction(inherited Insert(AIndex));\r\nend;\r\n\r\nprocedure TTMSFNCMapsElementActions.SetItems(AIndex: integer;\r\n const Value: TTMSFNCMapsElementAction);\r\nbegin\r\n inherited Items[AIndex] := Value;\r\nend;\r\n\r\n{ TTMSFNCMapsElementContainers }\r\n\r\nfunction TTMSFNCMapsElementContainers.Add: TTMSFNCMapsElementContainer;\r\nbegin\r\n Result := TTMSFNCMapsElementContainer(inherited Add);\r\nend;\r\n\r\nprocedure TTMSFNCMapsElementContainers.Clear;\r\nvar\r\n l: TTMSFNCCustomMaps;\r\n ci: TCollectionItem;\r\nbegin\r\n l := FOwner;\r\n if Assigned(l) then\r\n l.BeginUpdate;\r\n\r\n if Count > 0 then\r\n begin\r\n while Count > 0 do\r\n begin\r\n ci := TCollectionItem(Items[Count - 1]);\r\n ci.Free;\r\n end;\r\n end;\r\n\r\n if Assigned(l) then\r\n l.EndUpdate;\r\nend;\r\n\r\nconstructor TTMSFNCMapsElementContainers.Create(AOwner: TTMSFNCCustomMaps);\r\nbegin\r\n inherited Create(AOwner, CreateItemClass);\r\n FOwner := AOwner;\r\nend;\r\n\r\nfunction TTMSFNCMapsElementContainers.CreateItemClass: TCollectionItemClass;\r\nbegin\r\n Result := TTMSFNCMapsElementContainer;\r\nend;\r\n\r\nfunction TTMSFNCMapsElementContainers.GetItem(\r\n Index: Integer): TTMSFNCMapsElementContainer;\r\nbegin\r\n Result := TTMSFNCMapsElementContainer(inherited Items[Index]);\r\nend;\r\n\r\nfunction TTMSFNCMapsElementContainers.GetItemByID(\r\n ID: string): TTMSFNCMapsElementContainer;\r\nvar\r\n I: Integer;\r\n c: TTMSFNCMapsElementContainer;\r\nbegin\r\n Result := nil;\r\n for I := 0 to Count - 1 do\r\n begin\r\n c := Items[I];\r\n if c.ID = ID then\r\n begin\r\n Result := c;\r\n Break;\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCMapsElementContainers.GetOwner: TPersistent;\r\nbegin\r\n Result := FOwner;\r\nend;\r\n\r\nfunction TTMSFNCMapsElementContainers.Insert(\r\n Index: Integer): TTMSFNCMapsElementContainer;\r\nbegin\r\n Result := TTMSFNCMapsElementContainer(inherited Insert(Index));\r\nend;\r\n\r\nprocedure TTMSFNCMapsElementContainers.Recreate;\r\nvar\r\n I: Integer;\r\nbegin\r\n for I := 0 to Count - 1 do\r\n Items[I].Recreate := True;\r\nend;\r\n\r\nprocedure TTMSFNCMapsElementContainers.SetItem(Index: Integer;\r\n const Value: TTMSFNCMapsElementContainer);\r\nbegin\r\n inherited Items[Index] := Value;\r\nend;\r\n\r\n{ TTMSFNCMapsElementContainer }\r\n\r\nfunction TTMSFNCMapsElementContainer.AddAction(AHTMLElementID: string;\r\n AEvent: TTMSFNCMapsHTMLEvent): TTMSFNCMapsElementAction;\r\nbegin\r\n FOwner.BeginUpdate;\r\n Result := Actions.Add;\r\n Result.HTMLElementID := AHTMLElementID;\r\n Result.Event := AEvent;\r\n FOwner.EndUpdate;\r\nend;\r\n\r\nprocedure TTMSFNCMapsElementContainer.Assign(Source: TPersistent);\r\nbegin\r\n if Source is TTMSFNCMapsElementContainer then\r\n begin\r\n FID := (Source as TTMSFNCMapsElementContainer).ID;\r\n FHTML.Assign((Source as TTMSFNCMapsElementContainer).HTML);\r\n FVisible := (Source as TTMSFNCMapsElementContainer).Visible;\r\n FPosition := (Source as TTMSFNCMapsElementContainer).Position;\r\n FActions.Assign((Source as TTMSFNCMapsElementContainer).Actions);\r\n FHTMLElementID := (Source as TTMSFNCMapsElementContainer).HTMLElementID;\r\n FHTMLElementClassName := (Source as TTMSFNCMapsElementContainer).HTMLElementClassName;\r\n FUseDefaultStyle := (Source as TTMSFNCMapsElementContainer).UseDefaultStyle;\r\n FStyle.Assign((Source as TTMSFNCMapsElementContainer).Style);\r\n FScript.Assign((Source as TTMSFNCMapsElementContainer).Script);\r\n FMargins.Assign((Source as TTMSFNCMapsElementContainer).Margins);\r\n FCoordinate.Assign((Source as TTMSFNCMapsElementContainer).Coordinate);\r\n FBounds.Assign((Source as TTMSFNCMapsElementContainer).Bounds);\r\n FLabelType := (Source as TTMSFNCMapsElementContainer).LabelType;\r\n end;\r\nend;\r\n\r\nconstructor TTMSFNCMapsElementContainer.Create(ACollection: TCollection);\r\nbegin\r\n inherited;\r\n if Assigned(ACollection) then\r\n FOwner := (Collection as TTMSFNCMapsElementContainers).FOwner;\r\n\r\n FCoordinate := TTMSFNCMapsCoordinate.Create;\r\n FCoordinate.OnChange := @ElementContainerChanged;\r\n FBounds := TTMSFNCMapsBounds.Create;\r\n FBounds.OnChange := @ElementContainerChanged;\r\n FHTML := TStringList.Create;\r\n FHTML.OnChange := @ElementContainerChanged;\r\n FVisible := True;\r\n FActions := TTMSFNCMapsElementActions.Create(Self);\r\n FPosition := poTopLeft;\r\n FHTMLElementID := 'ElementContainer' + IntToStr(Index);\r\n FHTMLElementClassName := '';\r\n FUseDefaultStyle := True;\r\n FStyle := TStringList.Create;\r\n FStyle.OnChange := @ElementContainerChanged;\r\n FScript := TStringList.Create;\r\n FScript.OnChange := @ElementContainerChanged;\r\n FMargins := TTMSFNCMargins.Create;\r\n FMargins.Top := 10;\r\n FMargins.Left := 10;\r\n FMargins.Right := 10;\r\n FMargins.Bottom := 10;\r\n FMargins.OnChange := @ElementContainerChanged;\r\n FLabelType := ltLabel;\r\n\r\n UpdateElementContainer;\r\nend;\r\n\r\ndestructor TTMSFNCMapsElementContainer.Destroy;\r\nbegin\r\n FHTML.Free;\r\n FActions.Free;\r\n FStyle.Free;\r\n FScript.Free;\r\n FMargins.Free;\r\n FCoordinate.Free;\r\n FBounds.Free;\r\n UpdateElementContainer;\r\n inherited;\r\nend;\r\n\r\nprocedure TTMSFNCMapsElementContainer.ElementContainerChanged(Sender: TObject);\r\nbegin\r\n UpdateElementContainer;\r\nend;\r\n\r\nfunction TTMSFNCMapsElementContainer.GetHTMLAsBase64: string;\r\nbegin\r\n Result := TTMSFNCUtils.Encode64(FHTML.Text);\r\nend;\r\n\r\nfunction TTMSFNCMapsElementContainer.GetID: string;\r\nbegin\r\n if (FID = '') or FRecreate then\r\n FID := CreateNewGUID;\r\n\r\n FRecreate := False;\r\n Result := FID;\r\nend;\r\n\r\nfunction TTMSFNCMapsElementContainer.GetScriptAsBase64: string;\r\nbegin\r\n Result := TTMSFNCUtils.Encode64(FScript.Text);\r\nend;\r\n\r\nfunction TTMSFNCMapsElementContainer.GetStyleAsBase64: string;\r\nbegin\r\n Result := TTMSFNCUtils.Encode64(FStyle.Text);\r\nend;\r\n\r\nprocedure TTMSFNCMapsElementContainer.SetActions(\r\n const Value: TTMSFNCMapsElementActions);\r\nbegin\r\n if FActions <> Value then\r\n begin\r\n FActions.Assign(Value);\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCMapsElementContainer.SetBounds(const Value: TTMSFNCMapsBounds);\r\nbegin\r\n if FBounds <> Value then\r\n begin\r\n FBounds := Value;\r\n UpdateElementContainer;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCMapsElementContainer.SetCoordinate(\r\n const Value: TTMSFNCMapsCoordinate);\r\nbegin\r\n if FCoordinate <> Value then\r\n begin\r\n FCoordinate.Assign(Value);\r\n UpdateElementContainer;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCMapsElementContainer.SetStyle(const Value: TStringList);\r\nbegin\r\n if FStyle <> Value then\r\n begin\r\n FStyle.Assign(Value);\r\n UpdateElementContainer;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCMapsElementContainer.SetHTMLElementClassName(const Value: string);\r\nbegin\r\n if FHTMLElementClassName <> Value then\r\n begin\r\n FHTMLElementClassName := Value;\r\n UpdateElementContainer;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCMapsElementContainer.SetHTMLElementID(const Value: string);\r\nbegin\r\n if FHTMLElementID <> Value then\r\n begin\r\n FHTMLElementID := Value;\r\n UpdateElementContainer;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCMapsElementContainer.SetLabelType(\r\n const Value: TTMSFNCMapsLabelType);\r\nbegin\r\n if FLabelType <> Value then\r\n begin\r\n FLabelType := Value;\r\n UpdateElementContainer;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCMapsElementContainer.SetHTML(const Value: TStringList);\r\nbegin\r\n if FHTML <> Value then\r\n begin\r\n FHTML.Assign(Value);\r\n UpdateElementContainer;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCMapsElementContainer.SetMargins(const Value: TTMSFNCMargins);\r\nbegin\r\n if FMargins <> Value then\r\n begin\r\n FMargins.Assign(Value);\r\n UpdateElementContainer;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCMapsElementContainer.SetPosition(\r\n const Value: TTMSFNCMapsPosition);\r\nbegin\r\n if FPosition <> Value then\r\n begin\r\n FPosition := Value;\r\n UpdateElementContainer;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCMapsElementContainer.SetScript(const Value: TStringList);\r\nbegin\r\n if FScript <> Value then\r\n begin\r\n FScript.Assign(Value);\r\n UpdateElementContainer;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCMapsElementContainer.SetUseDefaultStyle(const Value: Boolean);\r\nbegin\r\n if FUseDefaultStyle <> Value then\r\n begin\r\n FUseDefaultStyle := Value;\r\n UpdateElementContainer;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCMapsElementContainer.SetVisible(const Value: Boolean);\r\nbegin\r\n if FVisible <> Value then\r\n begin\r\n FVisible := Value;\r\n UpdateElementContainer;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCMapsElementContainer.UpdateElementContainer;\r\nbegin\r\n FReload := True;\r\n if Assigned(FOwner) then\r\n FOwner.UpdateElementContainers;\r\nend;\r\n\r\n\r\n{ TTMSFNCMapsHeadLink }\r\n\r\nprocedure TTMSFNCMapsHeadLink.Assign(Source: TPersistent);\r\nbegin\r\n if Source is TTMSFNCMapsHeadLink then\r\n begin\r\n FURL := (Source as TTMSFNCMapsHeadLink).URL;\r\n FEnabled := (Source as TTMSFNCMapsHeadLink).Enabled;\r\n FType := (Source as TTMSFNCMapsHeadLink).&Type;\r\n FCharSet := (Source as TTMSFNCMapsHeadLink).CharSet;\r\n FContent.Assign((Source as TTMSFNCMapsHeadLink).Content);\r\n FRel := (Source as TTMSFNCMapsHeadLink).Rel;\r\n FDefer := (Source as TTMSFNCMapsHeadLink).Defer;\r\n FAsync := (Source as TTMSFNCMapsHeadLink).Async;\r\n FKind := (Source as TTMSFNCMapsHeadLink).Kind;\r\n end;\r\nend;\r\n\r\nconstructor TTMSFNCMapsHeadLink.Create(ACollection: TCollection);\r\nbegin\r\n inherited;\r\n if Assigned(ACollection) then\r\n FOwner := (Collection as TTMSFNCMapsHeadLinks).FOwner;\r\n\r\n FURL := '';\r\n FEnabled := True;\r\n FType := '';\r\n FCharSet := '';\r\n FContent := TStringList.Create;\r\n FContent.OnChange := @HeadLinkChanged;\r\n FRel := '';\r\n FDefer := False;\r\n FAsync := False;\r\n FKind := mlkScript;\r\n\r\n UpdateHeadLink;\r\nend;\r\n\r\ndestructor TTMSFNCMapsHeadLink.Destroy;\r\nbegin\r\n FContent.Free;\r\n inherited;\r\n\r\n UpdateHeadLink;\r\nend;\r\n\r\nprocedure TTMSFNCMapsHeadLink.HeadLinkChanged(Sender: TObject);\r\nbegin\r\n UpdateHeadLink;\r\nend;\r\n\r\nfunction TTMSFNCMapsHeadLink.IsURLStored: Boolean;\r\nbegin\r\n Result := FURL <> '';\r\nend;\r\n\r\nprocedure TTMSFNCMapsHeadLink.SetAsync(const Value: Boolean);\r\nbegin\r\n if FAsync <> Value then\r\n begin\r\n FAsync := Value;\r\n UpdateHeadLink;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCMapsHeadLink.SetCharSet(const Value: string);\r\nbegin\r\n if FCharSet <> Value then\r\n begin\r\n FCharSet := Value;\r\n UpdateHeadLink;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCMapsHeadLink.SetContent(const Value: TStringList);\r\nbegin\r\n if FContent <> Value then\r\n begin\r\n FContent.Assign(Value);\r\n UpdateHeadLink;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCMapsHeadLink.SetDefer(const Value: Boolean);\r\nbegin\r\n if FDefer <> Value then\r\n begin\r\n FDefer := Value;\r\n UpdateHeadLink;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCMapsHeadLink.SetEnabled(const Value: Boolean);\r\nbegin\r\n if FEnabled <> Value then\r\n begin\r\n FEnabled := Value;\r\n UpdateHeadLink;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCMapsHeadLink.SetKind(const Value: TTMSFNCMapsLinkKind);\r\nbegin\r\n if FKind <> Value then\r\n begin\r\n FKind := Value;\r\n UpdateHeadLink;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCMapsHeadLink.SetRel(const Value: string);\r\nbegin\r\n if FRel <> Value then\r\n begin\r\n FRel := Value;\r\n UpdateHeadLink;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCMapsHeadLink.SetType(const Value: string);\r\nbegin\r\n if FType <> Value then\r\n begin\r\n FType := Value;\r\n UpdateHeadLink;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCMapsHeadLink.SetURL(const Value: string);\r\nbegin\r\n if FURL <> Value then\r\n begin\r\n FURL := Value;\r\n UpdateHeadLink;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCMapsHeadLink.UpdateHeadLink;\r\nbegin\r\n if FOwner.IsDesignTime then\r\n FOwner.ReInitialize;\r\nend;\r\n\r\n{ TTMSFNCMapsScriptLinks }\r\n\r\nfunction TTMSFNCMapsHeadLinks.Add: TTMSFNCMapsHeadLink;\r\nbegin\r\n Result := TTMSFNCMapsHeadLink(inherited Add);\r\nend;\r\n\r\nfunction TTMSFNCMapsHeadLinks.AddLink(AURL: string): TTMSFNCMapsHeadLink;\r\nbegin\r\n Result := TTMSFNCMapsHeadLink(inherited Add);\r\n Result.Kind := mlkLink;\r\n Result.URL := AURL;\r\nend;\r\n\r\nfunction TTMSFNCMapsHeadLinks.AddScript(AURL: string): TTMSFNCMapsHeadLink;\r\nbegin\r\n Result := TTMSFNCMapsHeadLink(inherited Add);\r\n Result.Kind := mlkScript;\r\n Result.URL := AURL;\r\nend;\r\n\r\nfunction TTMSFNCMapsHeadLinks.AddStyle(AStyle: TStrings): TTMSFNCMapsHeadLink;\r\nbegin\r\n Result := TTMSFNCMapsHeadLink(inherited Add);\r\n Result.Kind := mlkStyle;\r\n Result.Content.Assign(AStyle);\r\nend;\r\n\r\nfunction TTMSFNCMapsHeadLinks.AddStyleSheetLink(\r\n AURL: string): TTMSFNCMapsHeadLink;\r\nbegin\r\n Result := TTMSFNCMapsHeadLink(inherited Add);\r\n Result.Kind := mlkLink;\r\n Result.URL := AURL;\r\n Result.Rel := 'stylesheet';\r\nend;\r\n\r\nprocedure TTMSFNCMapsHeadLinks.Clear;\r\nvar\r\n l: TTMSFNCCustomMaps;\r\n ci: TCollectionItem;\r\nbegin\r\n l := FOwner;\r\n if Assigned(l) then\r\n l.BeginUpdate;\r\n\r\n if Count > 0 then\r\n begin\r\n while Count > 0 do\r\n begin\r\n ci := TCollectionItem(Items[Count - 1]);\r\n ci.Free;\r\n end;\r\n end;\r\n\r\n if Assigned(l) then\r\n l.EndUpdate;\r\nend;\r\n\r\nconstructor TTMSFNCMapsHeadLinks.Create(AOwner: TTMSFNCCustomMaps);\r\nbegin\r\n inherited Create(AOwner, TTMSFNCMapsHeadLink);\r\n FOwner := AOwner;\r\nend;\r\n\r\nfunction TTMSFNCMapsHeadLinks.CreateItemClass: TCollectionItemClass;\r\nbegin\r\n Result := TTMSFNCMapsHeadLink;\r\nend;\r\n\r\nfunction TTMSFNCMapsHeadLinks.GetItem(Index: Integer): TTMSFNCMapsHeadLink;\r\nbegin\r\n Result := TTMSFNCMapsHeadLink(inherited Items[Index]);\r\nend;\r\n\r\nfunction TTMSFNCMapsHeadLinks.GetOwner: TPersistent;\r\nbegin\r\n Result := FOwner;\r\nend;\r\n\r\nfunction TTMSFNCMapsHeadLinks.Insert(Index: Integer): TTMSFNCMapsHeadLink;\r\nbegin\r\n Result := TTMSFNCMapsHeadLink(inherited Insert(Index));\r\nend;\r\n\r\nprocedure TTMSFNCMapsHeadLinks.SetItem(Index: Integer;\r\n const Value: TTMSFNCMapsHeadLink);\r\nbegin\r\n inherited Items[Index] := Value;\r\nend;\r\n\r\n\r\n{ TTMSFNCMapsPopup }\r\n\r\nfunction TTMSFNCMapsPopup.GetLatitude: Double;\r\nbegin\r\n Result := Coordinate.Latitude;\r\nend;\r\n\r\nfunction TTMSFNCMapsPopup.GetLongitude: Double;\r\nbegin\r\n Result := Coordinate.Longitude;\r\nend;\r\n\r\nprocedure TTMSFNCMapsPopup.SetLatitude(const Value: Double);\r\nbegin\r\n Coordinate.Latitude := Value;\r\nend;\r\n\r\nprocedure TTMSFNCMapsPopup.SetLongitude(const Value: Double);\r\nbegin\r\n Coordinate.Longitude := Value;\r\nend;\r\n\r\nconstructor TTMSFNCMapsPopup.Create;\r\nbegin\r\n FCoordinate := TTMSFNCMapsCoordinate.Create;\r\nend;\r\n\r\ndestructor TTMSFNCMapsPopup.Destroy;\r\nbegin\r\n FCoordinate.Free;\r\n inherited;\r\nend;\r\n\r\nfunction TTMSFNCMapsPopup.GetID: string;\r\nbegin\r\n if FID = '' then\r\n FID := CreateNewGUID;\r\n\r\n Result := FID;\r\nend;\r\n\r\n{$IFDEF WEBLIB}\r\nprocedure TTMSFNCCustomMaps.RemoveScripts;\r\nvar\r\n I: Integer;\r\n t, id: string;\r\n l: TTMSFNCMapsLinksList;\r\n lk: TTMSFNCMapsLink;\r\nbegin\r\n if Assigned(FMaps) then\r\n begin\r\n l := TTMSFNCMapsLinksList.Create;\r\n\r\n GetHeadLinks(l, False);\r\n\r\n try\r\n for I := 0 to l.Count - 1 do\r\n begin\r\n lk := l[I];\r\n id := 'WEBLib.TMSFNCMaps.' + StringReplace(FMaps.GetIdentifier, ' ', '', [rfReplaceAll]) + '.';\r\n\r\n case lk.Kind of\r\n mlkLink: t := 'LINK';\r\n mlkScript: t := 'SCRIPT';\r\n end;\r\n\r\n id := id + t + 'HEAD' + IntToStr(I);\r\n\r\n asm\r\n var exScript = document.getElementById(id);\r\n if (exScript){\r\n exScript.parentNode.removeChild(exScript);\r\n }\r\n end;\r\n end;\r\n\r\n l.Clear;\r\n\r\n GetBodyLinks(l, False, False);\r\n\r\n for I := 0 to l.Count - 1 do\r\n begin\r\n lk := l[I];\r\n id := 'WEBLib.TMSFNCMaps.' + StringReplace(FMaps.GetIdentifier, ' ', '', [rfReplaceAll]) + '.';\r\n\r\n case lk.Kind of\r\n mlkLink: t := 'LINK';\r\n mlkScript: t := 'SCRIPT';\r\n end;\r\n\r\n id := id + t + 'BODY' + IntToStr(I);\r\n\r\n asm\r\n var exScript = document.getElementById(id);\r\n if (exScript){\r\n exScript.parentNode.removeChild(exScript);\r\n }\r\n end;\r\n end;\r\n\r\n FMaps.RemoveScripts;\r\n\r\n finally\r\n l.Free;\r\n end;\r\n end;\r\n\r\n asm\r\n var exScript = document.getElementById(\"WEBLib.TMSFNCMaps.Console\");\r\n if (exScript){\r\n exScript.parentNode.removeChild(exScript);\r\n }\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomMaps.RemoveStyles;\r\nbegin\r\n if Assigned(FMaps) then\r\n begin\r\n asm\r\n var exScript = document.getElementById(\"WEBLib.TMSFNCMaps.Styles\");\r\n if (exScript){\r\n exScript.parentNode.removeChild(exScript);\r\n }\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomMaps.LoadScripts(AHead: Boolean);\r\nvar\r\n l: TTMSFNCMapsLinksList;\r\n I: Integer;\r\n lk: TTMSFNCMapsLink;\r\n dcl, id, src, tp, t, cs, rl, ct: string;\r\n asc, def: Boolean;\r\n h: Boolean;\r\n e: TJSHTMLElement;\r\nbegin\r\n if MapReady then\r\n begin\r\n dcl := DEBUGCONSOLELINK;\r\n h := AHead;\r\n\r\n e := ElementHandle;\r\n\r\n l := TTMSFNCMapsLinksList.Create;\r\n try\r\n if h then\r\n GetHeadLinks(l)\r\n else\r\n GetBodyLinks(l);\r\n\r\n for I := 0 to l.Count - 1 do\r\n begin\r\n lk := l[I];\r\n id := 'WEBLib.TMSFNCMaps.' + StringReplace(FMaps.GetIdentifier, ' ', '', [rfReplaceAll]) + '.';\r\n src := lk.URL;\r\n tp := lk.&Type;\r\n cs := lk.CharSet;\r\n def := lk.Defer;\r\n asc := lk.Async;\r\n rl := lk.Rel;\r\n ct := lk.Content;\r\n\r\n case lk.Kind of\r\n mlkLink: t := 'LINK';\r\n mlkScript: t := 'SCRIPT';\r\n end;\r\n\r\n if h then\r\n id := id + t + 'HEAD' + IntToStr(I)\r\n else\r\n id := id + t + 'BODY' + IntToStr(I);\r\n\r\n asm\r\n var exScript = document.getElementById(id) || document.querySelector('script[src=\"' + src + '\"]') || document.querySelector('link[href=\"' + src + '\"]');\r\n end;\r\n\r\n asm\r\n if (!exScript){\r\n var s = document.createElement(t);\r\n s.id = id;\r\n\r\n if (tp != ''){\r\n s.type = tp;\r\n }\r\n\r\n if (t == 'LINK'){\r\n if (rl != ''){\r\n s.rel = rl;\r\n }\r\n if (src != ''){\r\n s.href = src;\r\n }\r\n }\r\n else{\r\n s.defer = def;\r\n s.async = asc;\r\n if (src != ''){\r\n s.src = src;\r\n }\r\n }\r\n\r\n s.innerHTML = ct;\r\n\r\n if (e && e.ownerDocument) {\r\n if (h){\r\n e.ownerDocument.head.appendChild(s);\r\n }\r\n else{\r\n e.ownerDocument.body.appendChild(s);\r\n }\r\n }else{\r\n if (h){\r\n document.head.appendChild(s);\r\n }\r\n else{\r\n document.body.appendChild(s);\r\n }\r\n }\r\n }\r\n end;\r\n end;\r\n finally\r\n l.Free;\r\n end;\r\n\r\n if Options.Console and h then\r\n begin\r\n asm\r\n var exScript = document.getElementById(\"WEBLib.TMSFNCMaps.Console\");\r\n if (exScript){\r\n return;\r\n }\r\n\r\n var s = document.createElement(\"script\");\r\n s.id = \"WEBLib.TMSFNCMaps.Console\";\r\n s.src = dcl;\r\n document.head.appendChild(s);\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomMaps.LoadStyles;\r\nvar\r\n sc: string;\r\n e: TJSHTMLElement;\r\nbegin\r\n if MapReady then\r\n begin\r\n e := ElementHandle;\r\n\r\n sc := GetHeadStyle;\r\n asm\r\n var exScript = document.getElementById(\"WEBLib.TMSFNCMaps.Styles\");\r\n if (exScript){\r\n return;\r\n }\r\n\r\n var s = document.createElement(\"style\");\r\n s.id = \"WEBLib.TMSFNCMaps.Styles\";\r\n s.innerHTML = sc;\r\n\r\n if (e && e.ownerDocument){\r\n e.ownerDocument.head.appendChild(s);\r\n }else{\r\n document.head.appendChild(s);\r\n }\r\n end;\r\n end;\r\nend;\r\n{$ENDIF}\r\n\r\n{ TTMSFNCMapsMarkerIcon }\r\n\r\nconstructor TTMSFNCMapsMarkerIcon.Create(AMarker: TTMSFNCMapsMarker);\r\nbegin\r\n if Assigned(AMarker) then\r\n FOwner := AMarker;\r\n\r\n FEnabled := False;\r\n FFill := gcRed;\r\n FSize := 32;\r\nend;\r\n\r\nprocedure TTMSFNCMapsMarkerIcon.Assign(Source: TPersistent);\r\nbegin\r\n if Source is TTMSFNCMapsMarkerIcon then\r\n begin\r\n FEnabled := (Source as TTMSFNCMapsMarkerIcon).Enabled;\r\n FFill := (Source as TTMSFNCMapsMarkerIcon).Fill;\r\n FSize := (Source as TTMSFNCMapsMarkerIcon).Size;\r\n end;\r\nend;\r\n\r\ndestructor TTMSFNCMapsMarkerIcon.Destroy;\r\nbegin\r\n inherited;\r\nend;\r\n\r\nprocedure TTMSFNCMapsMarkerIcon.SetFill(const Value: TTMSFNCGraphicsColor);\r\nbegin\r\n if FFill <> Value then\r\n begin\r\n FFill := Value;\r\n UpdateMarkerIcon;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCMapsMarkerIcon.SetEnabled(const Value: Boolean);\r\nbegin\r\n if FEnabled <> Value then\r\n begin\r\n FEnabled := Value;\r\n UpdateMarkerIcon;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCMapsMarkerIcon.SetSize(const Value: Integer);\r\nbegin\r\n if FSize <> Value then\r\n begin\r\n FSize := Value;\r\n UpdateMarkerIcon;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCMapsMarkerIcon.UpdateMarkerIcon;\r\nbegin\r\n if Assigned(FOwner) then\r\n FOwner.UpdateMarker;\r\nend;\r\n\r\n{ TTMSFNCMapsLabel }\r\n\r\nprocedure TTMSFNCMapsLabel.Assign(Source: TPersistent);\r\nbegin\r\n inherited;\r\n if Source is TTMSFNCMapsLabel then\r\n begin\r\n FText := (Source as TTMSFNCMapsLabel).Text;\r\n FCoordinate.Assign((Source as TTMSFNCMapsLabel).Coordinate);\r\n FBounds.Assign((Source as TTMSFNCMapsLabel).Bounds);\r\n FVisible := (Source as TTMSFNCMapsLabel).Visible;\r\n FBackgroundColor := (Source as TTMSFNCMapsLabel).BackgroundColor;\r\n FBorderColor := (Source as TTMSFNCMapsLabel).BorderColor;\r\n FBorderWidth := (Source as TTMSFNCMapsLabel).BorderWidth;\r\n FFont.Assign((Source as TTMSFNCMapsLabel).Font);\r\n FPosition := (Source as TTMSFNCMapsLabel).Position;\r\n FLabelType := (Source as TTMSFNCMapsLabel).LabelType;\r\n end;\r\nend;\r\n\r\nconstructor TTMSFNCMapsLabel.Create(ACollection: TCollection);\r\nbegin\r\n inherited;\r\n if Assigned(ACollection) then\r\n FOwner := (Collection as TTMSFNCMapsLabels).FOwner;\r\n\r\n FText := '';\r\n FCoordinate := TTMSFNCMapsCoordinate.Create;\r\n FCoordinate.OnChange := @LabelChanged;\r\n FBounds := TTMSFNCMapsBounds.Create;\r\n FBounds.OnChange := @LabelChanged;\r\n FVisible := True;\r\n FBackgroundColor := gcNull;\r\n FBorderColor := gcNull;\r\n FBorderWidth := 2;\r\n FFont := TTMSFNCGraphicsFont.Create;\r\n FFont.Size := 14;\r\n FFont.Name := 'Roboto';\r\n FFont.OnChanged := @LabelChanged;\r\n FPosition := ptCoordinate;\r\n FLabelType := ltLabel;\r\n\r\n UpdateLabel;\r\nend;\r\n\r\ndestructor TTMSFNCMapsLabel.Destroy;\r\nbegin\r\n FCoordinate.Free;\r\n FBounds.Free;\r\n FFont.Free;\r\n inherited;\r\nend;\r\n\r\nfunction TTMSFNCMapsLabel.GetID: string;\r\nbegin\r\n if (FID = '') or FRecreate then\r\n FID := CreateNewGUID;\r\n\r\n FRecreate := False;\r\n Result := FID;\r\nend;\r\n\r\nprocedure TTMSFNCMapsLabel.LabelChanged(Sender: TObject);\r\nbegin\r\n UpdateLabel;\r\nend;\r\n\r\nprocedure TTMSFNCMapsLabel.SetBackgroundColor(\r\n const Value: TTMSFNCGraphicsColor);\r\nbegin\r\n if FBackgroundColor <> Value then\r\n begin\r\n FBackgroundColor := Value;\r\n UpdateLabel;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCMapsLabel.SetBorderColor(const Value: TTMSFNCGraphicsColor);\r\nbegin\r\n if FBorderColor <> Value then\r\n begin\r\n FBorderColor := Value;\r\n UpdateLabel;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCMapsLabel.SetBorderWidth(const Value: Integer);\r\nbegin\r\n if FBorderWidth <> Value then\r\n begin\r\n FBorderWidth := Value;\r\n UpdateLabel;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCMapsLabel.SetBounds(const Value: TTMSFNCMapsBounds);\r\nbegin\r\n if FBounds <> Value then\r\n begin\r\n FBounds.Assign(Value);\r\n UpdateLabel;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCMapsLabel.SetCoordinate(const Value: TTMSFNCMapsCoordinate);\r\nbegin\r\n if FCoordinate <> Value then\r\n begin\r\n FCoordinate.Assign(Value);\r\n UpdateLabel;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCMapsLabel.SetFont(const Value: TTMSFNCGraphicsFont);\r\nbegin\r\n FFont.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCMapsLabel.SetLabelType(const Value: TTMSFNCMapsLabelType);\r\nbegin\r\n if FLabelType <> Value then\r\n begin\r\n FLabelType := Value;\r\n UpdateLabel;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCMapsLabel.SetPosition(const Value: TTMSFNCMapsPositionType);\r\nbegin\r\n if FPosition <> Value then\r\n begin\r\n FPosition := Value;\r\n UpdateLabel;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCMapsLabel.SetText(const Value: string);\r\nbegin\r\n if FText <> Value then\r\n begin\r\n FText := Value;\r\n UpdateLabel;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCMapsLabel.SetVisible(const Value: Boolean);\r\nbegin\r\n if FVisible <> Value then\r\n begin\r\n FVisible := Value;\r\n UpdateLabel;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCMapsLabel.UpdateLabel;\r\nbegin\r\n FReload := True;\r\n if Assigned(FOwner) then\r\n FOwner.UpdateElementContainers;\r\nend;\r\n\r\n{ TTMSFNCMapsLabels }\r\n\r\nfunction TTMSFNCMapsLabels.Add: TTMSFNCMapsLabel;\r\nbegin\r\n Result := TTMSFNCMapsLabel(inherited Add);\r\nend;\r\n\r\nprocedure TTMSFNCMapsLabels.Clear;\r\nvar\r\n l: TTMSFNCCustomMaps;\r\n ci: TCollectionItem;\r\nbegin\r\n l := FOwner;\r\n if Assigned(l) then\r\n l.BeginUpdate;\r\n\r\n if Count > 0 then\r\n begin\r\n while Count > 0 do\r\n begin\r\n ci := TCollectionItem(Items[Count - 1]);\r\n ci.Free;\r\n end;\r\n end;\r\n\r\n if Assigned(l) then\r\n l.EndUpdate;\r\nend;\r\n\r\nconstructor TTMSFNCMapsLabels.Create(AOwner: TTMSFNCCustomMaps);\r\nbegin\r\n inherited Create(AOwner, CreateItemClass);\r\n FOwner := AOwner;\r\nend;\r\n\r\nfunction TTMSFNCMapsLabels.CreateItemClass: TCollectionItemClass;\r\nbegin\r\n Result := TTMSFNCMapsLabel;\r\nend;\r\n\r\nfunction TTMSFNCMapsLabels.GetItem(Index: Integer): TTMSFNCMapsLabel;\r\nbegin\r\n Result := TTMSFNCMapsLabel(inherited Items[Index]);\r\nend;\r\n\r\nfunction TTMSFNCMapsLabels.GetItemByID(ID: string): TTMSFNCMapsLabel;\r\nvar\r\n I: Integer;\r\n c: TTMSFNCMapsLabel;\r\nbegin\r\n Result := nil;\r\n for I := 0 to Count - 1 do\r\n begin\r\n c := Items[I];\r\n if c.ID = ID then\r\n begin\r\n Result := c;\r\n Break;\r\n end;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCMapsLabels.GetOwner: TPersistent;\r\nbegin\r\n Result := FOwner;\r\nend;\r\n\r\nfunction TTMSFNCMapsLabels.Insert(Index: Integer): TTMSFNCMapsLabel;\r\nbegin\r\n Result := TTMSFNCMapsLabel(inherited Insert(Index));\r\nend;\r\n\r\nprocedure TTMSFNCMapsLabels.Recreate;\r\nvar\r\n I: Integer;\r\nbegin\r\n for I := 0 to Count - 1 do\r\n Items[I].Recreate := True;\r\nend;\r\n\r\nprocedure TTMSFNCMapsLabels.SetItem(Index: Integer;\r\n const Value: TTMSFNCMapsLabel);\r\nbegin\r\n inherited Items[Index] := Value;\r\nend;\r\n\r\n\r\n{ TTMSFNCMapsWeightedCoordinate }\r\n\r\nprocedure TTMSFNCMapsWeightedCoordinate.Assign(Source: TPersistent);\r\nbegin\r\n inherited;\r\n if (Source is TTMSFNCMapsWeightedCoordinate) then\r\n begin\r\n FCoordinate.Assign((Source as TTMSFNCMapsWeightedCoordinate).Coordinate);\r\n FWeight := (Source as TTMSFNCMapsWeightedCoordinate).Weight;\r\n end;\r\nend;\r\n\r\nconstructor TTMSFNCMapsWeightedCoordinate.Create(ACollection: TCollection);\r\nbegin\r\n inherited;\r\n if Assigned(ACollection) then\r\n FOwner := (Collection as TTMSFNCMapsWeightedCoordinates).FOwner;\r\n\r\n FCoordinate := TTMSFNCMapsCoordinate.Create;\r\n FWeight := 0;\r\nend;\r\n\r\ndestructor TTMSFNCMapsWeightedCoordinate.Destroy;\r\nbegin\r\n FCoordinate.Free;\r\n inherited;\r\nend;\r\n\r\nprocedure TTMSFNCMapsWeightedCoordinate.DoBeginUpdate(Sender: TObject);\r\nbegin\r\n if Assigned(FOwner) then\r\n FOwner.FOwner.BeginUpdate;\r\nend;\r\n\r\nprocedure TTMSFNCMapsWeightedCoordinate.DoEndUpdate(Sender: TObject);\r\nbegin\r\n if Assigned(FOwner) then\r\n FOwner.FOwner.EndUpdate;\r\nend;\r\n\r\nprocedure TTMSFNCMapsWeightedCoordinate.DoUpdateCoordinate(Sender: TObject);\r\nbegin\r\n if Assigned(FOwner) then\r\n FOwner.UpdateHeatMap;\r\nend;\r\n\r\nfunction TTMSFNCMapsWeightedCoordinate.GetID: string;\r\nbegin\r\n if (FID = '') then\r\n FID := CreateNewGUID;\r\n\r\n Result := FID;\r\nend;\r\n\r\nprocedure TTMSFNCMapsWeightedCoordinate.SetCoordinate(\r\n const Value: TTMSFNCMapsCoordinate);\r\nbegin\r\n FCoordinate.Assign(Value);\r\n UpdateHeatMap;\r\nend;\r\n\r\nprocedure TTMSFNCMapsWeightedCoordinate.SetWeight(const Value: Double);\r\nbegin\r\n FWeight := Value;\r\nend;\r\n\r\nprocedure TTMSFNCMapsWeightedCoordinate.UpdateHeatmap;\r\nbegin\r\n if Assigned(FOWner) then\r\n FOwner.UpdateHeatMap;\r\nend;\r\n\r\n{ TTMSFNCMapsWeightedCoordinates }\r\n\r\nfunction TTMSFNCMapsWeightedCoordinates.Add: TTMSFNCMapsWeightedCoordinate;\r\nbegin\r\n Result := TTMSFNCMapsWeightedCoordinate(inherited Add);\r\nend;\r\n\r\nprocedure TTMSFNCMapsWeightedCoordinates.Clear;\r\nvar\r\n l: TTMSFNCCustomMaps;\r\n ci: TCollectionItem;\r\nbegin\r\n l := FOwner.FOwner;\r\n if Assigned(l) then\r\n l.BeginUpdate;\r\n\r\n if Count > 0 then\r\n begin\r\n while Count > 0 do\r\n begin\r\n ci := TCollectionItem(Items[Count - 1]);\r\n ci.Free;\r\n end;\r\n end;\r\n\r\n if Assigned(l) then\r\n l.EndUpdate;\r\nend;\r\n\r\nconstructor TTMSFNCMapsWeightedCoordinates.Create(\r\n AOwner: TTMSFNCMapsHeatMap);\r\nbegin\r\n inherited Create(AOwner, CreateItemClass);\r\n FOwner := AOwner;\r\nend;\r\n\r\nfunction TTMSFNCMapsWeightedCoordinates.CreateItemClass: TCollectionItemClass;\r\nbegin\r\n Result := TTMSFNCMapsWeightedCoordinate;\r\nend;\r\n\r\nfunction TTMSFNCMapsWeightedCoordinates.GetItem(\r\n Index: Integer): TTMSFNCMapsWeightedCoordinate;\r\nbegin\r\n Result := TTMSFNCMapsWeightedCoordinate(inherited Items[Index]);\r\nend;\r\n\r\nfunction TTMSFNCMapsWeightedCoordinates.GetOwner: TPersistent;\r\nbegin\r\n Result := FOwner;\r\nend;\r\n\r\nfunction TTMSFNCMapsWeightedCoordinates.Insert(\r\n Index: Integer): TTMSFNCMapsWeightedCoordinate;\r\nbegin\r\n Result := TTMSFNCMapsWeightedCoordinate(inherited Insert(Index));\r\nend;\r\n\r\nprocedure TTMSFNCMapsWeightedCoordinates.SetItem(Index: Integer;\r\n const Value: TTMSFNCMapsWeightedCoordinate);\r\nbegin\r\n inherited Items[Index] := Value;\r\nend;\r\n\r\n\r\n{ TTMSFNCMapsHeatMap }\r\n\r\nprocedure TTMSFNCMapsHeatMap.Assign(Source: TPersistent);\r\nbegin\r\n if Source is TTMSFNCMapsHeatMap then\r\n begin\r\n FID := (Source as TTMSFNCMapsHeatMap).ID;\r\n FOpacity := (Source as TTMSFNCMapsHeatMap).Opacity;\r\n FGradientStartColor := (Source as TTMSFNCMapsHeatMap).GradientStartColor;\r\n FGradientMidColor := (Source as TTMSFNCMapsHeatMap).GradientMidColor;\r\n FGradientEndColor := (Source as TTMSFNCMapsHeatMap).GradientEndColor;\r\n FWeightedCoordinates.Assign((Source as TTMSFNCMapsHeatMap));\r\n end;\r\nend;\r\n\r\nconstructor TTMSFNCMapsHeatMap.Create(ACollection: TCollection);\r\nbegin\r\n inherited;\r\n if Assigned(ACollection) then\r\n FOwner := (Collection as TTMSFNCMapsHeatMaps).FOwner;\r\n\r\n FID := '';\r\n FOpacity := 1.0;\r\n FGradientStartColor := gcGreen;\r\n FGradientMidColor := gcYellow;\r\n FGradientEndColor := gcRed;\r\n FWeightedCoordinates := TTMSFNCMapsWeightedCoordinates.Create(Self);\r\n\r\n UpdateHeatMap;\r\nend;\r\n\r\ndestructor TTMSFNCMapsHeatMap.Destroy;\r\nbegin\r\n FWeightedCoordinates.Free;\r\n UpdateHeatMap;\r\n inherited;\r\nend;\r\n\r\nfunction TTMSFNCMapsHeatMap.GetID: string;\r\nbegin\r\n if (FID = '') or FRecreate then\r\n FID := CreateNewGUID;\r\n\r\n FRecreate := False;\r\n Result := FID;\r\nend;\r\n\r\nprocedure TTMSFNCMapsHeatMap.SetCoordinates(\r\n const Value: TTMSFNCMapsWeightedCoordinates);\r\nbegin\r\n FWeightedCoordinates.Assign(Value);\r\n UpdateHeatMap;\r\nend;\r\n\r\nprocedure TTMSFNCMapsHeatMap.SetGradientEndColor(\r\n const Value: TTMSFNCGraphicsColor);\r\nbegin\r\n if FGradientEndColor <> Value then\r\n begin\r\n FGradientEndColor := Value;\r\n UpdateHeatMap;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCMapsHeatMap.SetGradientMidColor(\r\n const Value: TTMSFNCGraphicsColor);\r\nbegin\r\n if FGradientMidColor <> Value then\r\n begin\r\n FGradientMidColor := Value;\r\n UpdateHeatMap;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCMapsHeatMap.SetGradientStartColor(\r\n const Value: TTMSFNCGraphicsColor);\r\nbegin\r\n if FGradientStartColor <> Value then\r\n begin\r\n FGradientStartColor := Value;\r\n UpdateHeatMap;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCMapsHeatMap.SetOpacity(const Value: Single);\r\nbegin\r\n if FOpacity <> Value then\r\n begin\r\n FOpacity := Value;\r\n UpdateHeatMap;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCMapsHeatMap.UpdateHeatMap;\r\nbegin\r\n if Assigned(FOwner) then\r\n (FOwner as TTMSFNCCustomMaps).UpdateHeatMaps;\r\nend;\r\n\r\n{ TTMSFNCMapsHeatMaps }\r\n\r\nfunction TTMSFNCMapsHeatMaps.Add: TTMSFNCMapsHeatMap;\r\nbegin\r\n Result := TTMSFNCMapsHeatMap(inherited Add);\r\nend;\r\n\r\nprocedure TTMSFNCMapsHeatMaps.Clear;\r\nvar\r\n l: TTMSFNCCustomMaps;\r\n ci: TCollectionItem;\r\nbegin\r\n l := FOwner;\r\n if Assigned(l) then\r\n l.BeginUpdate;\r\n\r\n TTMSFNCUtils.Log('clear ' + IntToStr(Count) + ' heatmaps');\r\n\r\n if Count > 0 then\r\n begin\r\n while Count > 0 do\r\n begin\r\n\r\n TTMSFNCUtils.Log('clear 1 heatmap');\r\n\r\n ci := TCollectionItem(Items[Count - 1]);\r\n ci.Free;\r\n end;\r\n end;\r\n\r\n if Assigned(l) then\r\n l.EndUpdate;\r\nend;\r\n\r\nconstructor TTMSFNCMapsHeatMaps.Create(AOwner: TTMSFNCCustomMaps);\r\nbegin\r\n inherited Create(AOwner, CreateItemClass);\r\n FOwner := AOwner;\r\nend;\r\n\r\nfunction TTMSFNCMapsHeatMaps.CreateItemClass: TCollectionItemClass;\r\nbegin\r\n Result := TTMSFNCMapsHeatMap;\r\nend;\r\n\r\nfunction TTMSFNCMapsHeatMaps.GetItem(\r\n Index: Integer): TTMSFNCMapsHeatMap;\r\nbegin\r\n Result := TTMSFNCMapsHeatmap(inherited Items[Index]);\r\nend;\r\n\r\nfunction TTMSFNCMapsHeatMaps.GetOwner: TPersistent;\r\nbegin\r\n Result := FOwner;\r\nend;\r\n\r\nfunction TTMSFNCMapsHeatMaps.Insert(\r\n Index: Integer): TTMSFNCMapsHeatMap;\r\nbegin\r\n Result := TTMSFNCMapsHeatMap(inherited Insert(Index));\r\nend;\r\n\r\nprocedure TTMSFNCMapsHeatMaps.SetItem(Index: Integer;\r\n const Value: TTMSFNCMapsHeatMap);\r\nbegin\r\n inherited Items[Index] := Value;\r\nend;\r\n\r\n\r\n{ TTMSFNCMapsPolygon }\r\n\r\nfunction TTMSFNCMapsPolygon.AddHole(\r\n ACoordinates: TTMSFNCMapsCoordinateRecArray): TTMSFNCMapsPolyElementHole;\r\nbegin\r\n Result := inherited AddHole(ACoordinates);\r\nend;\r\n\r\n{ TTMSFNCMapsJavaScriptError }\r\n\r\nfunction TTMSFNCMapsJavaScriptError.GetDefaultType: string;\r\nbegin\r\n Result := 'JAVASCRIPT_ERROR';\r\nend;\r\n\r\n\r\ninitialization\r\nbegin\r\n TTMSFNCMapsPlatformServices.FCurrentReleased := False;\r\n RegisterGoogleMapsService;\r\n RegisterHereService;\r\n RegisterBingMapsService;\r\n RegisterAzureMapsService;\r\n RegisterTomTomService;\r\n RegisterOpenLayersService;\r\n RegisterLeafletService;\r\n RegisterMapBoxService;\r\n RegisterMapKitService;\r\nend;\r\n\r\n{$IFNDEF WEBLIB}\r\nfinalization\r\nbegin\r\n {$IFDEF UNREGISTER}\r\n UnRegisterMapKitService;\r\n UnRegisterMapBoxService;\r\n UnRegisterOpenLayersService;\r\n UnRegisterLeafletService;\r\n UnRegisterTomTomService;\r\n UnRegisterAzureMapsService;\r\n UnRegisterBingMapsService;\r\n UnRegisterHereService;\r\n UnRegisterGoogleMapsService;\r\n {$ENDIF}\r\n {$IFNDEF AUTOREFCOUNT}\r\n TTMSFNCMapsPlatformServices.ReleaseCurrent;\r\n {$ENDIF}\r\nend;\r\n{$ENDIF}\r\n\r\nend.\r\n\r\n","{********************************************************************}\r\n{ }\r\n{ written by TMS Software }\r\n{ copyright (c) 2020 - 2024 }\r\n{ Email : info@tmssoftware.com }\r\n{ Web : http://www.tmssoftware.com }\r\n{ }\r\n{ The source code is given as is. The author is not responsible }\r\n{ for any possible damage done due to the use of this code. }\r\n{ The complete source code remains property of the author and may }\r\n{ not be distributed, published, given or sold in any form as such. }\r\n{ No parts of the source code can be included in any other component }\r\n{ or application without written authorization of the author. }\r\n{********************************************************************}\r\n\r\nunit WEBLib.TMSFNCMaps.Here;\r\n\r\n{$I WEBLib.TMSFNCDefines.inc}\r\n\r\n{$IFDEF WEBLIB}\r\n{$DEFINE LCLWEBLIB}\r\n{$ENDIF}\r\n{$IFDEF LCLLIB}\r\n{$DEFINE LCLWEBLIB}\r\n{$ENDIF}\r\n\r\ninterface\r\n\r\nconst\r\n MAJ_VER = 2; // Major version nr.\r\n MIN_VER = 0; // Minor version nr.\r\n REL_VER = 0; // Release nr.\r\n BLD_VER = 0; // Build nr.\r\n\r\n //v1.0.0.0: First release\r\n //v1.0.1.0: Improved : Support for base64 encoded marker icons\r\n // : Improved : OnMapMouseMove event handling\r\n //v1.0.2.0: New : API version updated\r\n //v2.0.0.0: New : API version updated from v3.1.42.2 to v3.1.54.0\r\n // : New : Migrated to HARP map engine\r\n // : New : 3D Maps\r\n\r\n\r\n MAPSERVICEVAR = 'window.H';\r\n\r\nprocedure RegisterHereService;\r\nprocedure UnRegisterHereService;\r\n\r\nimplementation\r\n\r\nuses\r\n Classes, Math, DateUtils, Types, SysUtils, WEBLib.TMSFNCMaps, WEBLib.TMSFNCUtils, WEBLib.TMSFNCTypes, WEBLib.TMSFNCMapsCommonTypes\r\n {$IFDEF WEBLIB}\r\n ,Contnrs, Web\r\n {$ENDIF}\r\n {$IFNDEF LCLWEBLIB}\r\n ,Generics.Collections, Generics.Defaults\r\n {$HINTS OFF}\r\n {$IF COMPILERVERSION > 22}\r\n ,UITypes\r\n {$IFEND}\r\n {$HINTS ON}\r\n {$ENDIF}\r\n {$IFDEF LCLLIB}\r\n ,fgl\r\n {$ENDIF}\r\n ;\r\n\r\ntype\r\n TTMSFNCMapsHereService = class;\r\n\r\n TTMSFNCMapsHereFactoryService = class(TTMSFNCMapsFactoryService, ITMSFNCMapsServiceHere);\r\n\r\n TTMSFNCMapsHereService = class(TTMSFNCMapsHereFactoryService)\r\n protected\r\n function DoCreateMaps: ITMSFNCCustomMaps; override;\r\n end;\r\n\r\ntype\r\n TTMSFNCMapsHere = class;\r\n\r\n TTMSFNCMapsHere = class(TTMSFNCCustomMapsInterfacedObject, ITMSFNCCustomMaps)\r\n protected\r\n procedure GetHeadLinks(const AList: TTMSFNCMapsLinksList);\r\n procedure RemoveScripts;\r\n function GetResetMap: string;\r\n function GetShowPopup: string;\r\n function GetClosePopup: string;\r\n function GetHeadStyle: string;\r\n function GetDelayLoadEvent: string;\r\n function GetMapsServiceCheck: string;\r\n function GetIdentifier: string;\r\n function GetInitializeMap: string;\r\n function GetInitializeEvents: string;\r\n function GetAddOrUpdateMarker: string;\r\n function GetDeleteMarker: string;\r\n function GetAddOrUpdatePolyElement: string;\r\n function GetDeletePolyElement: string;\r\n function GetZoomToBounds: string;\r\n function GetGetBounds: string;\r\n function GetGetCenterCoordinate: string;\r\n function GetGetZoomLevel: string;\r\n function GetLatLonToXY: string;\r\n function GetXYToLatLon: string;\r\n function GetSetCenterCoordinate: string;\r\n function GetSetZoomLevel: string;\r\n function GetUpdateOptions: string;\r\n function GetGlobalVariables: string;\r\n function GetAddCoordinateToArray: string;\r\n function GetAddHoleToArray: string;\r\n function GetInitializeCoordinateArray: string;\r\n function GetInitializeHolesArray: string;\r\n function IsValid: Boolean;\r\n procedure DestroyMaps;\r\n public\r\n constructor Create;\r\n destructor Destroy; override;\r\n end;\r\n\r\nvar\r\n MapsService: ITMSFNCMapsServiceHere;\r\n\r\nconst\r\n HEREAPIVERSION = 'v3/3.1.54.0';\r\n HEREAPIURL = 'https://js.api.here.com/';\r\n MAPUI = 'mapUI';\r\n MAPBEHAVIOR = 'mapBehavior';\r\n\r\nprocedure RegisterHereService;\r\nbegin\r\n if not TTMSFNCMapsPlatformServices.Current.SupportsPlatformService(ITMSFNCMapsServiceHere, IInterface(MapsService)) then\r\n begin\r\n MapsService := TTMSFNCMapsHereService.Create;\r\n TTMSFNCMapsPlatformServices.Current.AddPlatformService(ITMSFNCMapsServiceHere, MapsService);\r\n end;\r\nend;\r\n\r\nprocedure UnregisterHereService;\r\nbegin\r\n TTMSFNCMapsPlatformServices.Current.RemovePlatformService(ITMSFNCMapsServiceHere);\r\nend;\r\n\r\n{ TTMSFNCMapsHereService }\r\n\r\nfunction TTMSFNCMapsHereService.DoCreateMaps: ITMSFNCCustomMaps;\r\nbegin\r\n Result := TTMSFNCMapsHere.Create;\r\nend;\r\n\r\nconstructor TTMSFNCMapsHere.Create;\r\nbegin\r\n inherited;\r\nend;\r\n\r\ndestructor TTMSFNCMapsHere.Destroy;\r\nbegin\r\n inherited;\r\nend;\r\n\r\nprocedure TTMSFNCMapsHere.DestroyMaps;\r\nbegin\r\n MapsService.DestroyMaps(Self);\r\nend;\r\n\r\nfunction TTMSFNCMapsHere.GetDelayLoadEvent: string;\r\nbegin\r\n Result := '';\r\nend;\r\n\r\nfunction TTMSFNCMapsHere.GetDeleteMarker: string;\r\nbegin\r\n Result := ' ' + MAPVAR + '.removeObject(' + MARKERVAR + ')';\r\nend;\r\n\r\nfunction TTMSFNCMapsHere.GetDeletePolyElement: string;\r\nbegin\r\n Result := ' ' + MAPVAR + '.removeObject(' + POLYELEMENTVAR + ')';\r\nend;\r\n\r\nfunction TTMSFNCMapsHere.GetGetBounds: string;\r\nbegin\r\n Result :=\r\n ' var loc = ' + MAPVAR + '.getViewModel().getLookAtData().bounds.toGeoJSON();' + LB +\r\n ' jsonObj[\"NorthEast\"][\"Latitude\"] = loc.coordinates[0][0][1];' + LB +\r\n ' jsonObj[\"NorthEast\"][\"Longitude\"] = loc.coordinates[0][0][0];' + LB +\r\n ' jsonObj[\"SouthWest\"][\"Latitude\"] = loc.coordinates[0][2][1];' + LB +\r\n ' jsonObj[\"SouthWest\"][\"Longitude\"] = loc.coordinates[0][2][0];';\r\nend;\r\n\r\nfunction TTMSFNCMapsHere.GetGetCenterCoordinate: string;\r\nbegin\r\n Result :=\r\n ' var loc = ' + MAPVAR + '.getCenter();' + LB +\r\n ' jsonObj[\"Latitude\"] = loc.lat;' + LB +\r\n ' jsonObj[\"Longitude\"] = loc.lng;';\r\nend;\r\n\r\nfunction TTMSFNCMapsHere.GetGetZoomLevel: string;\r\nbegin\r\n Result := ' z = ' + MAPVAR + '.getZoom();';\r\nend;\r\n\r\nfunction TTMSFNCMapsHere.GetGlobalVariables: string;\r\nbegin\r\n Result :=\r\n 'var ' + MAPUI + ';' + LB +\r\n 'var ' + MAPBEHAVIOR + ';' + LB +\r\n 'var engineType;' + LB +\r\n 'var platform;' + LB +\r\n 'var defaultLayers;' + LB +\r\n 'var mapLayer;' + LB +\r\n 'function parseEvent(event, eventname, id = ''''){' + LB +\r\n ' var loc = {''Latitude'': 0, ''Longitude'': 0};' + LB +\r\n ' var x = 0.0;' + LB +\r\n ' var y = 0.0;' + LB +\r\n ' if (event) {' + LB +\r\n ' event.stopPropagation();' + LB +\r\n ' if (event.currentPointer){' + LB +\r\n ' x = event.currentPointer.viewportX;' + LB +\r\n ' y = event.currentPointer.viewportY;' + LB +\r\n ' var l = ' + MAPVAR + '.screenToGeo(x, y);' + LB +\r\n ' var loc = {''Latitude'': l.lat, ''Longitude'': l.lng};' + LB +\r\n ' }' + LB +\r\n ' }' + LB +\r\n\r\n ' var r = {''Coordinate'': loc, ''X'': x, ''Y'': y, ''ID'': id, ''EventName'': eventname};' + LB +\r\n ' return r;' + LB +\r\n '}';\r\nend;\r\n\r\nprocedure TTMSFNCMapsHere.GetHeadLinks(const AList: TTMSFNCMapsLinksList);\r\nbegin\r\n AList.Add(TTMSFNCMapsLink.CreateLink(HEREAPIURL + HEREAPIVERSION + '/mapsjs-ui.css', 'text/css', 'stylesheet'));\r\n AList.Add(TTMSFNCMapsLink.CreateScript(HEREAPIURL + HEREAPIVERSION + '/mapsjs-core.js', 'text/javascript', 'utf-8'));\r\n AList.Add(TTMSFNCMapsLink.CreateScript(HEREAPIURL + HEREAPIVERSION + '/mapsjs-service.js', 'text/javascript', 'utf-8'));\r\n AList.Add(TTMSFNCMapsLink.CreateScript(HEREAPIURL + HEREAPIVERSION + '/mapsjs-ui.js', 'text/javascript', 'utf-8'));\r\n AList.Add(TTMSFNCMapsLink.CreateScript(HEREAPIURL + HEREAPIVERSION + '/mapsjs-mapevents.js', 'text/javascript', 'utf-8'));\r\n AList.Add(TTMSFNCMapsLink.CreateScript(HEREAPIURL + HEREAPIVERSION + '/mapsjs-harp.js', 'text/javascript', 'utf-8'));\r\n AList.Add(TTMSFNCMapsLink.CreateScript(HEREAPIURL + HEREAPIVERSION + '/mapsjs-data.js', 'text/javascript', 'utf-8'));\r\nend;\r\n\r\nfunction TTMSFNCMapsHere.GetHeadStyle: string;\r\nbegin\r\n Result := '';\r\nend;\r\n\r\nfunction TTMSFNCMapsHere.GetIdentifier: string;\r\nbegin\r\n Result := 'Here';\r\nend;\r\n\r\nfunction TTMSFNCMapsHere.GetInitializeCoordinateArray: string;\r\nbegin\r\n Result := 'new ' + MAPSERVICEVAR + '.geo.LineString();';\r\nend;\r\n\r\nfunction TTMSFNCMapsHere.GetInitializeHolesArray: string;\r\nbegin\r\n Result := '[]';\r\nend;\r\n\r\nfunction TTMSFNCMapsHere.GetInitializeEvents: string;\r\nbegin\r\n Result :=\r\n ' var oldZoom = ' + MAPVAR + '.getZoom();' + LB +\r\n ' ' + MAPVAR + '.addEventListener(''mapviewchangeend'', function(){' + LB +\r\n ' var newZoom = ' + MAPVAR + '.getZoom();' + LB +\r\n ' if(newZoom != oldZoom){' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(null, \"ZoomChanged\"));' + LB +\r\n ' }' + LB +\r\n ' oldZoom = newZoom;' + LB +\r\n ' })' + LB + LB +\r\n ' ' + MAPVAR + '.addEventListener(''baselayerchange'', function(){' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(null, \"MapTypeChanged\"));' + LB +\r\n ' })' + LB + LB +\r\n ' ' + MAPVAR + '.addEventListener(''dragstart'', function(event){' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"MapMoveStart\"));' + LB +\r\n ' })' + LB + LB +\r\n ' ' + MAPVAR + '.addEventListener(''dragend'', function(event){' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"MapMoveEnd\"));' + LB +\r\n ' })' + LB + LB +\r\n ' ' + MAPVAR + '.addEventListener(''tap'', function(event){' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"MapClick\"));' + LB +\r\n ' })' + LB + LB +\r\n ' ' + MAPVAR + '.addEventListener(''dbltap'', function(event){' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"MapDblClick\"));' + LB +\r\n ' })' + LB + LB +\r\n ' ' + MAPVAR + '.addEventListener(''contextmenu'', function(event){' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"MapRightClick\"));' + LB +\r\n ' })' + LB + LB +\r\n ' ' + MAPVAR + '.addEventListener(''pointerup'', function(event){' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"MapMouseUp\"));' + LB +\r\n ' })' + LB + LB +\r\n ' ' + MAPVAR + '.addEventListener(''pointerdown'', function(event){' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"MapMouseDown\"));' + LB +\r\n ' })' + LB + LB +\r\n ' ' + MAPVAR + '.addEventListener(''pointerleave'', function(event){' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"MapMouseLeave\"));' + LB +\r\n ' })' + LB + LB +\r\n ' ' + MAPVAR + '.addEventListener(''pointerenter'', function(event){' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"MapMouseEnter\"));' + LB +\r\n ' })' + LB + LB +\r\n ' ' + MAPVAR + '.addEventListener(''pointermove'', function(event){' + LB +\r\n// ' console.log(\"pointer move\");' +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"MapMouseMove\"));' + LB +\r\n ' })' + LB + LB +\r\n ' ' + MAPVAR + '.addEventListener(''drag'', function(event){' + LB +\r\n// ' console.log(\"pointer drag\");' +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"MapMouseMove\"));' + LB +\r\n ' })';\r\nend;\r\n\r\nfunction TTMSFNCMapsHere.GetInitializeMap: string;\r\nvar\r\n v: string;\r\nbegin\r\n v := MAPSERVICEVAR;\r\n Result :=\r\n ' engineType = ' + v + '.Map.EngineType[\"HARP\"];' + LB +\r\n\r\n ' ' + MAPOPTIONS + ' = {' + LB +\r\n ' engineType,' + LB +\r\n ' zoom: ' + MapsProperties.GetDefaultZoomLevel + ',' + LB +\r\n// ' pois: false,' + LB +\r\n ' center: { lng: ' + MapsProperties.GetDefaultLongitude + ', lat: ' + MapsProperties.GetDefaultLatitude + ' },' + LB +\r\n ' pixelRatio: window.devicePixelRatio || 1' + LB +\r\n ' };' + LB + LB +\r\n\r\n ' platform = new ' + v + '.service.Platform({' + LB +\r\n ' \"apikey\": \"' + MapsProperties.GetAPIKey + '\", ' + LB +\r\n ' });' + LB + LB +\r\n\r\n ' defaultLayers = platform.createDefaultLayers({' + LB +\r\n ' engineType,' + LB +\r\n ' lg: ''' + MapsProperties.GetLocale(mlmCountry) + '''' + LB +\r\n ' });' + LB +\r\n\r\n {$IFDEF ANDROID}\r\n ' mapLayer = defaultLayers.raster.normal.map;' + LB +\r\n {$ELSE}\r\n ' mapLayer = defaultLayers.vector.normal.map;' + LB +\r\n {$ENDIF}\r\n\r\n ' ' + MAPVAR + ' = new ' + v + '.Map(document.getElementById(\"' + MAPID + '\"), mapLayer, ' + MAPOPTIONS + ');' + LB + LB;\r\n\r\n Result := Result +\r\n ' window.addEventListener(\"resize\", () => ' + MAPVAR + '.getViewPort().resize());' + LB + LB +\r\n ' ' + MAPBEHAVIOR + ' = new ' + v + '.mapevents.Behavior(new ' + v + '.mapevents.MapEvents(' + MAPVAR + '));' + LB;\r\n\r\n if not MapsProperties.GetZoomOnDblClick then\r\n begin\r\n Result := Result +\r\n ' ' + MAPBEHAVIOR + '.disable(' + MAPSERVICEVAR + '.mapevents.Behavior.DBLTAPZOOM)' + LB;\r\n end;\r\n\r\n if not MapsProperties.GetPanning then\r\n begin\r\n Result := Result +\r\n ' ' + MAPBEHAVIOR + '.disable(' + MAPSERVICEVAR + '.mapevents.Behavior.DRAGGING)' + LB;\r\n end;\r\n\r\n if not MapsProperties.GetZoomOnWheelScroll then\r\n begin\r\n Result := Result +\r\n ' ' + MAPBEHAVIOR + '.disable(' + MAPSERVICEVAR + '.mapevents.Behavior.WHEELZOOM)' + LB;\r\n end;\r\n\r\n Result := Result +\r\n ' ' + MAPUI + ' = ' + v + '.ui.UI.createDefault(' + MAPVAR + ', defaultLayers, ''' + MapsProperties.GetLocale + ''');' + LB +\r\n ' ' + MAPUI + '.getControl(''zoom'').setVisibility(' + BoolToStrEx(MapsProperties.GetShowZoomControl) + ');' + LB +\r\n ' ' + MAPUI + '.getControl(''mapsettings'').setVisibility(' + BoolToStrEx(MapsProperties.GetShowMapTypeControl) + ');';\r\nend;\r\n\r\nfunction TTMSFNCMapsHere.GetLatLonToXY: string;\r\nbegin\r\n Result :=\r\n ' var geopos = {' + LB +\r\n ' lat: ' + PARAMSNAME + '[\"Latitude\"],' + LB +\r\n ' lng: ' + PARAMSNAME + '[\"Longitude\"]' + LB +\r\n ' }' + LB +\r\n ' var point = ' + MAPVAR + '.geoToScreen(geopos);' + LB +\r\n ' jsonObj[\"X\"] = parseFloat(point.x);' + LB +\r\n ' jsonObj[\"Y\"] = parseFloat(point.y);';\r\nend;\r\n\r\nfunction TTMSFNCMapsHere.GetXYToLatLon: string;\r\nbegin\r\n Result :=\r\n ' var point = ' + MAPVAR + '.screenToGeo(' + PARAMSNAME + '[\"X\"], ' + PARAMSNAME + '[\"Y\"]);' + LB +\r\n ' jsonObj[\"Latitude\"] = parseFloat(point.lat);' + LB +\r\n ' jsonObj[\"Longitude\"] = parseFloat(point.lng);';\r\nend;\r\n\r\nfunction TTMSFNCMapsHere.GetMapsServiceCheck: string;\r\nbegin\r\n Result := '!' + MAPSERVICEVAR;\r\nend;\r\n\r\nfunction TTMSFNCMapsHere.GetResetMap: string;\r\nbegin\r\n Result := '';\r\nend;\r\n\r\nfunction TTMSFNCMapsHere.GetSetCenterCoordinate: string;\r\nbegin\r\n Result := ' ' + MAPVAR + '.setCenter({lat:' + PARAMSNAME + '[\"Latitude\"], lng:' + PARAMSNAME + '[\"Longitude\"]});';\r\nend;\r\n\r\nfunction TTMSFNCMapsHere.GetSetZoomLevel: string;\r\nbegin\r\n Result :=\r\n ' ' + MAPVAR + '.setZoom(' + PARAMSNAME + ');';\r\nend;\r\n\r\nfunction TTMSFNCMapsHere.GetShowPopup: string;\r\nbegin\r\n Result :=\r\n ' var pos = {' + LB +\r\n ' lat: ' + PARAMSNAME + '[\"Latitude\"],' + LB +\r\n ' lng: ' + PARAMSNAME + '[\"Longitude\"]' + LB +\r\n ' }' + LB +\r\n ' var xy = ' + MAPVAR + '.geoToScreen(pos);' + LB +\r\n ' var newpos = ' + MAPVAR + '.screenToGeo(xy.x + ' + PARAMSNAME + '[\"OffsetX\"], xy.y + ' + PARAMSNAME + '[\"OffsetY\"]);' + LB +\r\n ' ' + POPUPVAR + ' = new ' + MAPSERVICEVAR + '.ui.InfoBubble(newpos, {' + LB +\r\n ' content: ' + PARAMSNAME + '[\"Text\"]' + LB +\r\n ' });' + LB +\r\n ' ' + POPUPVAR + '.close = function(){' + LB +\r\n ' ' + MAPUI + '.removeBubble(' + POPUPVAR + ');' + LB +\r\n ' ' + POPUPVAR + ' = null;' + LB +\r\n ' }' + LB +\r\n ' ' + MAPUI + '.addBubble(' + POPUPVAR + ');';\r\nend;\r\n\r\nfunction TTMSFNCMapsHere.GetUpdateOptions: string;\r\nbegin\r\n Result :=\r\n ' if (' + PARAMSNAME + '[\"ZoomOnDblClick\"]){' + LB +\r\n ' ' + MAPBEHAVIOR + '.enable(' + MAPSERVICEVAR + '.mapevents.Behavior.DBLTAPZOOM)' + LB +\r\n ' }' + LB +\r\n ' else{' + LB +\r\n ' ' + MAPBEHAVIOR + '.disable(' + MAPSERVICEVAR + '.mapevents.Behavior.DBLTAPZOOM)' + LB +\r\n ' }' + LB +\r\n ' if (' + PARAMSNAME + '[\"Panning\"]){' + LB +\r\n ' ' + MAPBEHAVIOR + '.enable(' + MAPSERVICEVAR + '.mapevents.Behavior.DRAGGING)' + LB +\r\n ' }' + LB +\r\n ' else{' + LB +\r\n ' ' + MAPBEHAVIOR + '.disable(' + MAPSERVICEVAR + '.mapevents.Behavior.DRAGGING)' + LB +\r\n ' }' + LB +\r\n ' if (' + PARAMSNAME + '[\"ZoomOnWheelScroll\"]){' + LB +\r\n ' ' + MAPBEHAVIOR + '.enable(' + MAPSERVICEVAR + '.mapevents.Behavior.WHEELZOOM)' + LB +\r\n ' }' + LB +\r\n ' else{' + LB +\r\n ' ' + MAPBEHAVIOR + '.disable(' + MAPSERVICEVAR + '.mapevents.Behavior.WHEELZOOM)' + LB +\r\n ' }' + LB +\r\n ' ' + MAPUI + '.getControl(''zoom'').setVisibility(' + PARAMSNAME + '[\"ShowZoomControl\"]);' + LB +\r\n ' ' + MAPUI + '.getControl(''mapsettings'').setVisibility(' + PARAMSNAME + '[\"ShowMapTypeControl\"]);';\r\nend;\r\n\r\nfunction TTMSFNCMapsHere.GetZoomToBounds: string;\r\nbegin\r\n Result := ' ' + MAPVAR + '.getViewModel().setLookAtData({' + LB +\r\n ' bounds: new ' + MAPSERVICEVAR + '.geo.Rect(' + PARAMSNAME + '[\"NorthEast\"][\"Latitude\"], ' + PARAMSNAME + '[\"SouthWest\"][\"Longitude\"], ' +\r\n PARAMSNAME + '[\"SouthWest\"][\"Latitude\"], ' + PARAMSNAME + '[\"NorthEast\"][\"Longitude\"])' + LB +\r\n ' });';\r\nend;\r\n\r\nfunction TTMSFNCMapsHere.GetAddCoordinateToArray: string;\r\nbegin\r\n Result := ' ' + COORDINATEARRAYVAR + '.pushLatLngAlt(' + PARAMSNAME + '[\"Latitude\"],' + PARAMSNAME + '[\"Longitude\"]);';\r\nend;\r\n\r\nfunction TTMSFNCMapsHere.GetAddHoleToArray: string;\r\nbegin\r\n Result := 'var o = ' + HOLEARRAYVAR + '[' + PARAMSNAME + '[0]];' + LB +\r\n 'if (o){' + LB +\r\n ' ' + HOLEARRAYVAR + '[' + PARAMSNAME + '[0]].pushLatLngAlt(' + PARAMSNAME + '[1][\"Latitude\"], ' + PARAMSNAME + '[1][\"Longitude\"]);' + LB +\r\n '}else{' + LB +\r\n ' ' + HOLEARRAYVAR + '[' + PARAMSNAME + '[0]] = new ' + MAPSERVICEVAR + '.geo.LineString();' +\r\n ' ' + HOLEARRAYVAR + '[' + PARAMSNAME + '[0]].pushLatLngAlt(' + PARAMSNAME + '[1][\"Latitude\"], ' + PARAMSNAME + '[1][\"Longitude\"]);' + LB +\r\n '}';\r\nend;\r\n\r\nfunction TTMSFNCMapsHere.GetAddOrUpdateMarker: string;\r\nbegin\r\n Result :=\r\n ' var pos = {' + LB +\r\n ' lat: ' + PARAMSNAME + '[\"Latitude\"],' + LB +\r\n ' lng: ' + PARAMSNAME + '[\"Longitude\"]' + LB +\r\n ' }' + LB +\r\n\r\n ' var markericon = ' + CUSTOMDEFAULTMARKERICON + '(' +\r\n PARAMSNAME + '[\"DefaultIcon\"],' + LB +\r\n PARAMSNAME + '[\"IconURL\"]);' + LB +\r\n\r\n ' var opt;' + LB +\r\n ' if ((markericon != \"\") && ' +\r\n ' ((markericon.toLowerCase().startsWith(\"http\")) || (markericon.toLowerCase().startsWith(\"data:image/\")))){' + LB +\r\n ' opt = {' + LB +\r\n ' icon: new ' + MAPSERVICEVAR + '.map.Icon(markericon),' + LB +\r\n ' visibility: ' + PARAMSNAME + '[\"Visible\"]' + LB +\r\n ' , volatility: true' + LB +\r\n ' }' + LB +\r\n ' }else{' + LB +\r\n ' opt = {' + LB +\r\n ' visibility: ' + PARAMSNAME + '[\"Visible\"]' + LB +\r\n ' , volatility: true' + LB +\r\n ' }' + LB +\r\n ' }' + LB + LB +\r\n\r\n ' if (!' + MARKERVAR + '){' + LB +\r\n ' ' + MARKERVAR + ' = new ' + MAPSERVICEVAR + '.map.Marker(pos, opt);' + LB +\r\n ' ' + MARKERVAR + '.addEventListener(''tap'', function(event){' + LB +\r\n ' if (' + PARAMSNAME + '[\"Title\"]){' + LB +\r\n ' var xy = ' + MAPVAR + '.geoToScreen(event.target.getGeometry());' + LB +\r\n ' var newpos = ' + MAPVAR + '.screenToGeo(xy.x, xy.y - 50);' + LB +\r\n ' var bubble = new ' + MAPSERVICEVAR + '.ui.InfoBubble(newpos, {' + LB +\r\n ' content: event.target.getData()' + LB +\r\n ' });' + LB +\r\n ' ' + MAPUI + '.addBubble(bubble);' + LB +\r\n ' }' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"MarkerClick\", ' + PARAMSNAME + '[\"ID\"]));' + LB +\r\n ' })' + LB + LB +\r\n ' ' + MARKERVAR + '.addEventListener(''dbltap'', function(event){' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"MarkerDblClick\", ' + PARAMSNAME + '[\"ID\"]));' + LB +\r\n ' })' + LB + LB +\r\n ' ' + MARKERVAR + '.addEventListener(''contextmenu'', function(event){' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"MarkerRightClick\", ' + PARAMSNAME + '[\"ID\"]));' + LB +\r\n ' })' + LB + LB +\r\n ' ' + MARKERVAR + '.addEventListener(''pointerup'', function(event){' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"MarkerMouseUp\", ' + PARAMSNAME + '[\"ID\"]));' + LB +\r\n ' })' + LB + LB +\r\n ' ' + MARKERVAR + '.addEventListener(''pointerdown'', function(event){' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"MarkerMouseDown\", ' + PARAMSNAME + '[\"ID\"]));' + LB +\r\n ' })' + LB + LB +\r\n ' ' + MARKERVAR + '.addEventListener(''pointerleave'', function(event){' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"MarkerMouseLeave\", ' + PARAMSNAME + '[\"ID\"]));' + LB +\r\n ' })' + LB + LB +\r\n ' ' + MARKERVAR + '.addEventListener(''pointerenter'', function(event){' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"MarkerMouseEnter\", ' + PARAMSNAME + '[\"ID\"]));' + LB +\r\n ' })' + LB + LB +\r\n ' ' + MARKERVAR + '.setData(' + PARAMSNAME + '[\"Title\"]);' + LB +\r\n\r\n ' ' + MAPVAR + '.addObject(' + MARKERVAR + ');' + LB +\r\n\r\n ' }else{' + LB +\r\n ' ' + MARKERVAR + '.setGeometry(pos);' + LB +\r\n ' ' + MARKERVAR + '.setData(' + PARAMSNAME + '[\"Title\"]);' + LB +\r\n ' ' + MARKERVAR + '.setVisibility(' + PARAMSNAME + '[\"Visible\"]);' + LB +\r\n ' }';\r\nend;\r\n\r\nfunction TTMSFNCMapsHere.GetAddOrUpdatePolyElement: string;\r\nbegin\r\n Result :=\r\n ' var c = ' + PARAMSNAME + '[\"$type\"];' + LB +\r\n ' var options;' + LB +\r\n\r\n ' switch(c){' + LB +\r\n ' case \"TTMSFNCMapsPolyline\":' + LB +\r\n ' options = {' + LB +\r\n ' visibility: ' + PARAMSNAME + '[\"Visible\"],' + LB +\r\n ' style: {' + LB +\r\n ' strokeColor: toRGBA(' + PARAMSNAME + '[\"StrokeColor\"], ' + PARAMSNAME + '[\"StrokeOpacity\"]),' + LB +\r\n ' lineWidth: ' + PARAMSNAME + '[\"StrokeWidth\"]' + LB +\r\n ' },' + LB +\r\n ' };' + LB +\r\n ' break;' + LB +\r\n ' case \"TTMSFNCMapsCircle\":' + LB +\r\n ' case \"TTMSFNCMapsRectangle\":' + LB +\r\n ' case \"TTMSFNCMapsPolygon\":' + LB +\r\n ' case \"TTMSFNCHerePolygon\":' + LB +\r\n ' options = {' + LB +\r\n ' visibility: ' + PARAMSNAME + '[\"Visible\"],' + LB +\r\n ' style: {' + LB +\r\n ' fillColor: toRGBA(' + PARAMSNAME + '[\"FillColor\"], ' + PARAMSNAME + '[\"FillOpacity\"]),' + LB +\r\n ' strokeColor: toRGBA(' + PARAMSNAME + '[\"StrokeColor\"], ' + PARAMSNAME + '[\"StrokeOpacity\"]),' + LB +\r\n ' lineWidth: ' + PARAMSNAME + '[\"StrokeWidth\"]' + LB +\r\n ' }' + LB +\r\n ' };' + LB +\r\n ' break;' + LB +\r\n ' }'+ LB + LB +\r\n\r\n ' if (!' + POLYELEMENTVAR + '){' + LB +\r\n ' switch(c){' + LB +\r\n ' case \"TTMSFNCMapsCircle\":' + LB +\r\n ' ' + POLYELEMENTVAR + ' = new ' + MAPSERVICEVAR + '.map.Circle({lat: ' + PARAMSNAME + '[\"Center\"][\"Latitude\"], lng: ' + PARAMSNAME + '[\"Center\"][\"Longitude\"]}, ' + PARAMSNAME + '[\"Radius\"], options);' + LB +\r\n ' break;' + LB +\r\n ' case \"TTMSFNCMapsRectangle\":' + LB +\r\n ' ' + POLYELEMENTVAR + ' = new ' + MAPSERVICEVAR + '.map.Rect(new ' + MAPSERVICEVAR + '.geo.Rect(' +\r\n PARAMSNAME + '[\"Bounds\"][\"NorthEast\"][\"Latitude\"], ' + PARAMSNAME + '[\"Bounds\"][\"SouthWest\"][\"Longitude\"], ' +\r\n PARAMSNAME + '[\"Bounds\"][\"SouthWest\"][\"Latitude\"], ' + PARAMSNAME + '[\"Bounds\"][\"NorthEast\"][\"Longitude\"]), options);' + LB +\r\n ' break;' + LB +\r\n ' case \"TTMSFNCMapsPolyline\":' + LB +\r\n ' ' + POLYELEMENTVAR + ' = new ' + MAPSERVICEVAR + '.map.Polyline(' + COORDINATEARRAYVAR + ', options);' + LB +\r\n ' break;' + LB +\r\n ' case \"TTMSFNCMapsPolygon\":' + LB +\r\n ' case \"TTMSFNCHerePolygon\":' + LB +\r\n ' co = ' + COORDINATEARRAYVAR + ';' + LB +\r\n ' var pthArr = [];' + LB +\r\n ' for (var key in ' + HOLEARRAYVAR + '){' + LB +\r\n ' pthArr.push(' + HOLEARRAYVAR + '[key]);' + LB +\r\n ' }' + LB +\r\n ' co = new ' + MAPSERVICEVAR + '.geo.Polygon(co, pthArr);' +\r\n ' ' + POLYELEMENTVAR + ' = new ' + MAPSERVICEVAR + '.map.Polygon(co, options);' + LB +\r\n ' break;' + LB +\r\n ' }' + LB +\r\n ' ' + POLYELEMENTVAR + '.addEventListener(''tap'', function(event){' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"PolyElementClick\", ' + PARAMSNAME + '[\"ID\"]));' + LB +\r\n ' })' + LB + LB +\r\n ' ' + POLYELEMENTVAR + '.addEventListener(''dbltap'', function(event){' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"PolyElementDblClick\", ' + PARAMSNAME + '[\"ID\"]));' + LB +\r\n ' })' + LB + LB +\r\n ' ' + POLYELEMENTVAR + '.addEventListener(''contextmenu'', function(event){' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"PolyElementRightClick\", ' + PARAMSNAME + '[\"ID\"]));' + LB +\r\n ' })' + LB + LB +\r\n ' ' + POLYELEMENTVAR + '.addEventListener(''pointerup'', function(event){' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"PolyElementMouseUp\", ' + PARAMSNAME + '[\"ID\"]));' + LB +\r\n ' })' + LB + LB +\r\n ' ' + POLYELEMENTVAR + '.addEventListener(''pointerdown'', function(event){' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"PolyElementMouseDown\", ' + PARAMSNAME + '[\"ID\"]));' + LB +\r\n ' })' + LB + LB +\r\n ' ' + POLYELEMENTVAR + '.addEventListener(''pointerleave'', function(event){' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"PolyElementMouseLeave\", ' + PARAMSNAME + '[\"ID\"]));' + LB +\r\n ' })' + LB + LB +\r\n ' ' + POLYELEMENTVAR + '.addEventListener(''pointerenter'', function(event){' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"PolyElementMouseEnter\", ' + PARAMSNAME + '[\"ID\"]));' + LB +\r\n ' })' + LB + LB +\r\n ' ' + MAPVAR + '.addObject(' + POLYELEMENTVAR + ');' + LB +\r\n ' }else{' + LB +\r\n ' ' + POLYELEMENTVAR + '.setStyle(options.style);' + LB +\r\n ' ' + POLYELEMENTVAR + '.setVisibility(options.visibility);' + LB +\r\n ' switch(c){' + LB +\r\n ' case \"TTMSFNCMapsCircle\":' + LB +\r\n ' ' + POLYELEMENTVAR + '.setCenter({lat: ' + PARAMSNAME + '[\"Center\"][\"Latitude\"], lng: ' + PARAMSNAME + '[\"Center\"][\"Longitude\"]});' + LB +\r\n ' ' + POLYELEMENTVAR + '.setRadius(' + PARAMSNAME + '[\"Radius\"]);' + LB +\r\n ' break;' + LB +\r\n ' case \"TTMSFNCMapsRectangle\":' + LB +\r\n ' ' + POLYELEMENTVAR + '.setBoundingBox(new ' + MAPSERVICEVAR + '.geo.Rect(' +\r\n PARAMSNAME + '[\"Bounds\"][\"NorthEast\"][\"Latitude\"], ' + PARAMSNAME + '[\"Bounds\"][\"SouthWest\"][\"Longitude\"], ' +\r\n PARAMSNAME + '[\"Bounds\"][\"SouthWest\"][\"Latitude\"], ' + PARAMSNAME + '[\"Bounds\"][\"NorthEast\"][\"Longitude\"]));' + LB +\r\n ' break;' + LB +\r\n ' case \"TTMSFNCMapsPolyline\":' + LB +\r\n ' ' + POLYELEMENTVAR + '.setGeometry(' + COORDINATEARRAYVAR + ');' + LB +\r\n ' break;' + LB +\r\n ' case \"TTMSFNCMapsPolygon\":' + LB +\r\n ' case \"TTMSFNCHerePolygon\":' + LB +\r\n ' co = ' + COORDINATEARRAYVAR + ';' + LB +\r\n ' var pthArr = [];' + LB +\r\n ' for (var key in ' + HOLEARRAYVAR + '){' + LB +\r\n ' pthArr.push(' + HOLEARRAYVAR + '[key]);' + LB +\r\n ' }' + LB +\r\n ' ' + POLYELEMENTVAR + '.setGeometry(new ' + MAPSERVICEVAR + '.geo.Polygon(co, pthArr));' + LB +\r\n ' break;' + LB +\r\n ' }' + LB +\r\n ' }';\r\nend;\r\n\r\nfunction TTMSFNCMapsHere.GetClosePopup: string;\r\nbegin\r\n Result := ' ' + POPUPVAR + '.close();' + LB +\r\n ' ' + MAPUI + '.removeBubble(' + POPUPVAR + ');' + LB +\r\n ' ' + POPUPVAR + ' = null;';\r\nend;\r\n\r\nfunction TTMSFNCMapsHere.IsValid: Boolean;\r\nbegin\r\n Result := (MapsProperties.GetAPIKey <> '');\r\nend;\r\n\r\nprocedure TTMSFNCMapsHere.RemoveScripts;\r\nbegin\r\n {$IFDEF WEBLIB}\r\n asm\r\n if (window.H){\r\n window.H = undefined;\r\n }\r\n end;\r\n {$ENDIF}\r\nend;\r\n\r\nend.\r\n\r\n","{********************************************************************}\r\n{ }\r\n{ written by TMS Software }\r\n{ copyright (c) 2020 - 2023 }\r\n{ Email : info@tmssoftware.com }\r\n{ Web : http://www.tmssoftware.com }\r\n{ }\r\n{ The source code is given as is. The author is not responsible }\r\n{ for any possible damage done due to the use of this code. }\r\n{ The complete source code remains property of the author and may }\r\n{ not be distributed, published, given or sold in any form as such. }\r\n{ No parts of the source code can be included in any other component }\r\n{ or application without written authorization of the author. }\r\n{********************************************************************}\r\n\r\nunit WEBLib.TMSFNCMaps.BingMaps;\r\n\r\n{$I WEBLib.TMSFNCDefines.inc}\r\n\r\n{$IFDEF WEBLIB}\r\n{$DEFINE LCLWEBLIB}\r\n{$ENDIF}\r\n{$IFDEF LCLLIB}\r\n{$DEFINE LCLWEBLIB}\r\n{$ENDIF}\r\n\r\ninterface\r\n\r\nprocedure RegisterBingMapsService;\r\nprocedure UnRegisterBingMapsService;\r\n\r\nimplementation\r\n\r\nuses\r\n Classes, Math, DateUtils, Types, SysUtils, WEBLib.TMSFNCMaps, WEBLib.TMSFNCUtils, WEBLib.TMSFNCTypes, WEBLib.TMSFNCMapsCommonTypes\r\n {$IFDEF WEBLIB}\r\n ,Contnrs, Web\r\n {$ENDIF}\r\n {$IFNDEF LCLWEBLIB}\r\n ,Generics.Collections, Generics.Defaults\r\n {$HINTS OFF}\r\n {$IF COMPILERVERSION > 22}\r\n , UITypes\r\n {$IFEND}\r\n {$HINTS ON}\r\n {$ENDIF}\r\n {$IFDEF LCLLIB}\r\n ,fgl\r\n {$ENDIF}\r\n ;\r\n\r\ntype\r\n TTMSFNCMapsBingMapsService = class;\r\n\r\n TTMSFNCMapsBingMapsFactoryService = class(TTMSFNCMapsFactoryService, ITMSFNCMapsServiceBingMaps);\r\n\r\n TTMSFNCMapsBingMapsService = class(TTMSFNCMapsBingMapsFactoryService)\r\n protected\r\n function DoCreateMaps: ITMSFNCCustomMaps; override;\r\n end;\r\n\r\ntype\r\n TTMSFNCMapsBingMaps = class;\r\n\r\n TTMSFNCMapsBingMaps = class(TTMSFNCCustomMapsInterfacedObject, ITMSFNCCustomMaps)\r\n protected\r\n procedure GetHeadLinks(const AList: TTMSFNCMapsLinksList);\r\n procedure RemoveScripts;\r\n function GetResetMap: string;\r\n function GetShowPopup: string;\r\n function GetClosePopup: string;\r\n function GetHeadStyle: string;\r\n function GetDelayLoadEvent: string;\r\n function GetMapsServiceCheck: string;\r\n function GetIdentifier: string;\r\n function GetInitializeMap: string;\r\n function GetInitializeEvents: string;\r\n function GetAddOrUpdateMarker: string;\r\n function GetDeleteMarker: string;\r\n function GetAddOrUpdatePolyElement: string;\r\n function GetDeletePolyElement: string;\r\n function GetZoomToBounds: string;\r\n function GetGetBounds: string;\r\n function GetGetCenterCoordinate: string;\r\n function GetGetZoomLevel: string;\r\n function GetLatLonToXY: string;\r\n function GetXYToLatLon: string;\r\n function GetSetCenterCoordinate: string;\r\n function GetSetZoomLevel: string;\r\n function GetUpdateOptions: string;\r\n function GetGlobalVariables: string;\r\n function GetAddCoordinateToArray: string;\r\n function GetAddHoleToArray: string;\r\n function GetInitializeCoordinateArray: string;\r\n function GetInitializeHolesArray: string;\r\n function IsValid: Boolean;\r\n procedure DestroyMaps;\r\n public\r\n constructor Create;\r\n destructor Destroy; override;\r\n end;\r\n\r\nvar\r\n MapsService: ITMSFNCMapsServiceBingMaps;\r\n\r\nconst\r\n BINGMAPSAPIURL = 'https://www.bing.com/api/maps/';\r\n MAPSERVICEVAR = 'window.Microsoft.Maps';\r\n DOUBLECLICKZOOM = 'dblclickZoom';\r\n SCROLLZOOM = 'scrollZoom';\r\n\r\nprocedure RegisterBingMapsService;\r\nbegin\r\n if not TTMSFNCMapsPlatformServices.Current.SupportsPlatformService(ITMSFNCMapsServiceBingMaps, IInterface(MapsService)) then\r\n begin\r\n MapsService := TTMSFNCMapsBingMapsService.Create;\r\n TTMSFNCMapsPlatformServices.Current.AddPlatformService(ITMSFNCMapsServiceBingMaps, MapsService);\r\n end;\r\nend;\r\n\r\nprocedure UnregisterBingMapsService;\r\nbegin\r\n TTMSFNCMapsPlatformServices.Current.RemovePlatformService(ITMSFNCMapsServiceBingMaps);\r\nend;\r\n\r\n{ TTMSFNCMapsBingMapsService }\r\n\r\nfunction TTMSFNCMapsBingMapsService.DoCreateMaps: ITMSFNCCustomMaps;\r\nbegin\r\n Result := TTMSFNCMapsBingMaps.Create;\r\nend;\r\n\r\nconstructor TTMSFNCMapsBingMaps.Create;\r\nbegin\r\n inherited;\r\nend;\r\n\r\ndestructor TTMSFNCMapsBingMaps.Destroy;\r\nbegin\r\n inherited;\r\nend;\r\n\r\nprocedure TTMSFNCMapsBingMaps.DestroyMaps;\r\nbegin\r\n MapsService.DestroyMaps(Self);\r\nend;\r\n\r\nfunction TTMSFNCMapsBingMaps.GetAddCoordinateToArray: string;\r\nbegin\r\n Result := ' ' + COORDINATEARRAYVAR + '.push(new ' + MAPSERVICEVAR + '.Location(' + PARAMSNAME + '[\"Latitude\"],' + PARAMSNAME + '[\"Longitude\"]));';\r\nend;\r\n\r\nfunction TTMSFNCMapsBingMaps.GetAddHoleToArray: string;\r\nbegin\r\n Result := 'var o = ' + HOLEARRAYVAR + '[' + PARAMSNAME + '[0]];' + LB +\r\n 'if (o){' + LB +\r\n ' ' + HOLEARRAYVAR + '[' + PARAMSNAME + '[0]].push(new ' + MAPSERVICEVAR + '.Location(' + PARAMSNAME + '[1][\"Latitude\"], ' + PARAMSNAME + '[1][\"Longitude\"]));' + LB +\r\n '}else{' + LB +\r\n ' ' + HOLEARRAYVAR + '[' + PARAMSNAME + '[0]] = [new ' + MAPSERVICEVAR + '.Location(' + PARAMSNAME + '[1][\"Latitude\"], ' + PARAMSNAME + '[1][\"Longitude\"])];' + LB +\r\n '}';\r\nend;\r\n\r\nfunction TTMSFNCMapsBingMaps.GetAddOrUpdateMarker: string;\r\nbegin\r\n Result :=\r\n ' var options = {' + LB +\r\n ' title: ' + PARAMSNAME + '[\"Title\"],' + LB +\r\n ' icon: ' + PARAMSNAME + '[\"IconURL\"],' + LB +\r\n ' visible: ' + PARAMSNAME + '[\"Visible\"]' + LB +\r\n ' }' + LB + LB +\r\n\r\n ' var loc = new ' + MAPSERVICEVAR + '.Location(' + PARAMSNAME + '[\"Latitude\"], ' + PARAMSNAME + '[\"Longitude\"])' + LB + LB +\r\n\r\n ' if (!' + MARKERVAR + '){' + LB +\r\n ' ' + MARKERVAR + ' = new ' + MAPSERVICEVAR + '.Pushpin(loc, options);' + LB +\r\n ' ' + MAPVAR + '.entities.push(' + MARKERVAR + ');' + LB +\r\n ' ' + MAPSERVICEVAR + '.Events.addHandler(' + MARKERVAR + ', ''click'', function(event){' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"MarkerClick\", ' + PARAMSNAME + '[\"ID\"]));' + LB +\r\n ' })' + LB + LB +\r\n ' ' + MAPSERVICEVAR + '.Events.addHandler(' + MARKERVAR + ', ''dblclick'', function(event){' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"MarkerDblClick\", ' + PARAMSNAME + '[\"ID\"]));' + LB +\r\n ' })' + LB + LB +\r\n ' ' + MAPSERVICEVAR + '.Events.addHandler(' + MARKERVAR + ', ''mouseup'', function(event){' + LB +\r\n ' activeElement = ' + MARKERVAR + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"MarkerMouseUp\", ' + PARAMSNAME + '[\"ID\"]));' + LB +\r\n ' })' + LB + LB +\r\n ' ' + MAPSERVICEVAR + '.Events.addHandler(' + MARKERVAR + ', ''mousedown'', function(event){' + LB +\r\n ' activeElement = ' + MARKERVAR + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"MarkerMouseDown\", ' + PARAMSNAME + '[\"ID\"]));' + LB +\r\n ' })' + LB + LB +\r\n ' ' + MAPSERVICEVAR + '.Events.addHandler(' + MARKERVAR + ', ''mouseout'', function(event){' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"MarkerMouseLeave\", ' + PARAMSNAME + '[\"ID\"]));' + LB +\r\n ' })' + LB + LB +\r\n ' ' + MAPSERVICEVAR + '.Events.addHandler(' + MARKERVAR + ', ''mouseover'', function(event){' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"MarkerMouseEnter\", ' + PARAMSNAME + '[\"ID\"]));' + LB +\r\n ' })' + LB + LB +\r\n\r\n ' if (mouseUpId != -1) {' + LB +\r\n ' ' + MAPSERVICEVAR + '.Events.removeHandler(mouseUpId);' + LB +\r\n ' }' + LB +\r\n ' if (mouseDownId != -1) {' + LB +\r\n ' ' + MAPSERVICEVAR + '.Events.removeHandler(mouseDownId);' + LB +\r\n ' }' + LB +\r\n ' mouseUpId = ' + MAPSERVICEVAR + '.Events.addHandler(' + MAPVAR + ', ''mouseup'', function(event){' + LB +\r\n ' if (activeElement){' + LB +\r\n ' activeElement = null; ' + LB +\r\n ' return;' + LB +\r\n ' }' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"MapMouseUp\"));' + LB +\r\n ' })' + LB + LB +\r\n ' mouseDownId = ' + MAPSERVICEVAR + '.Events.addHandler(' + MAPVAR + ', ''mousedown'', function(event){' + LB +\r\n ' if (activeElement){' + LB +\r\n ' activeElement = null; ' + LB +\r\n ' return;' + LB +\r\n ' }' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"MapMouseDown\"));' + LB +\r\n ' })' + LB + LB +\r\n\r\n ' }else{' + LB +\r\n ' ' + MARKERVAR + '.setOptions(options);' + LB +\r\n ' ' + MARKERVAR + '.setLocation(loc);' + LB +\r\n ' }';\r\nend;\r\n\r\nfunction TTMSFNCMapsBingMaps.GetAddOrUpdatePolyElement: string;\r\nbegin\r\n Result :=\r\n ' var c = ' + PARAMSNAME + '[\"$type\"];' + LB +\r\n ' var options;' + LB +\r\n ' var co = [];' + LB +\r\n\r\n ' switch(c){' + LB +\r\n ' case \"TTMSFNCMapsRectangle\":' + LB +\r\n ' co.push(new ' + MAPSERVICEVAR + '.Location(' + PARAMSNAME + '[\"Bounds\"][\"SouthWest\"][\"Latitude\"], ' + PARAMSNAME + '[\"Bounds\"][\"NorthEast\"][\"Longitude\"]));' + LB +\r\n ' co.push(new ' + MAPSERVICEVAR + '.Location(' + PARAMSNAME + '[\"Bounds\"][\"NorthEast\"][\"Latitude\"], ' + PARAMSNAME + '[\"Bounds\"][\"NorthEast\"][\"Longitude\"]));' + LB +\r\n ' co.push(new ' + MAPSERVICEVAR + '.Location(' + PARAMSNAME + '[\"Bounds\"][\"NorthEast\"][\"Latitude\"], ' + PARAMSNAME + '[\"Bounds\"][\"SouthWest\"][\"Longitude\"]));' + LB +\r\n ' co.push(new ' + MAPSERVICEVAR + '.Location(' + PARAMSNAME + '[\"Bounds\"][\"SouthWest\"][\"Latitude\"], ' + PARAMSNAME + '[\"Bounds\"][\"SouthWest\"][\"Longitude\"]));' + LB +\r\n ' co.push(new ' + MAPSERVICEVAR + '.Location(' + PARAMSNAME + '[\"Bounds\"][\"SouthWest\"][\"Latitude\"], ' + PARAMSNAME + '[\"Bounds\"][\"NorthEast\"][\"Longitude\"]));' + LB +\r\n ' break;' + LB +\r\n ' case \"TTMSFNCMapsCircle\":' + LB +\r\n ' if (' + MAPSERVICEVAR + '.SpatialMath){' + LB +\r\n ' co = ' + MAPSERVICEVAR + '.SpatialMath.getRegularPolygon(new ' + MAPSERVICEVAR + '.Location(' + PARAMSNAME + '[\"Center\"][\"Latitude\"], ' + PARAMSNAME + '[\"Center\"][\"Longitude\"]), ' + PARAMSNAME + '[\"Radius\"], 100);' + LB +\r\n ' }else{' + LB +\r\n ' co.push(new ' + MAPSERVICEVAR + '.Location(' + PARAMSNAME + '[\"Center\"][\"Latitude\"], ' + PARAMSNAME + '[\"Center\"][\"Latitude\"]));' + LB +\r\n ' }' + LB +\r\n ' break;' + LB +\r\n ' }' + LB + LB +\r\n\r\n ' switch(c){' + LB +\r\n ' case \"TTMSFNCMapsPolyline\":' + LB +\r\n ' options = {' + LB +\r\n ' visible: ' + PARAMSNAME + '[\"Visible\"],' + LB +\r\n ' strokeColor: toRGBA(' + PARAMSNAME + '[\"StrokeColor\"], ' + PARAMSNAME + '[\"StrokeOpacity\"]),' + LB +\r\n ' strokeThickness: ' + PARAMSNAME + '[\"StrokeWidth\"]' + LB +\r\n ' }' + LB + LB +\r\n ' break;' + LB +\r\n ' case \"TTMSFNCMapsPolygon\":' + LB +\r\n ' case \"TTMSFNCBingMapsPolygon\":' + LB +\r\n ' case \"TTMSFNCMapsCircle\":' + LB +\r\n ' case \"TTMSFNCMapsRectangle\":' + LB +\r\n ' options = {' + LB +\r\n ' visible: ' + PARAMSNAME + '[\"Visible\"],' + LB +\r\n ' fillColor: toRGBA(' + PARAMSNAME + '[\"FillColor\"], ' + PARAMSNAME + '[\"FillOpacity\"]),' + LB +\r\n ' strokeColor: toRGBA(' + PARAMSNAME + '[\"StrokeColor\"], ' + PARAMSNAME + '[\"StrokeOpacity\"]),' + LB +\r\n ' strokeThickness: ' + PARAMSNAME + '[\"StrokeWidth\"]' + LB +\r\n ' }' + LB +\r\n ' break;' + LB +\r\n ' }' + LB + LB +\r\n\r\n ' if (!' + POLYELEMENTVAR + '){' + LB +\r\n ' switch(c){' + LB +\r\n ' case \"TTMSFNCMapsPolyline\":' + LB +\r\n ' ' + POLYELEMENTVAR + ' = new ' + MAPSERVICEVAR + '.Polyline(' + COORDINATEARRAYVAR + ', options);' + LB +\r\n ' break;' + LB +\r\n ' case \"TTMSFNCMapsCircle\":' + LB +\r\n ' case \"TTMSFNCMapsRectangle\":' + LB +\r\n ' ' + POLYELEMENTVAR + ' = new ' + MAPSERVICEVAR + '.Polygon(co, options);' + LB +\r\n ' break;' + LB +\r\n ' case \"TTMSFNCMapsPolygon\":' + LB +\r\n ' case \"TTMSFNCBingMapsPolygon\":' + LB +\r\n\r\n ' var pthArr = [];' + LB +\r\n ' pthArr.push(' + COORDINATEARRAYVAR + ');' + LB +\r\n ' for (var key in ' + HOLEARRAYVAR + '){' + LB +\r\n ' pthArr.push(' + HOLEARRAYVAR + '[key]);' + LB +\r\n ' }' + LB +\r\n\r\n ' ' + POLYELEMENTVAR + ' = new ' + MAPSERVICEVAR + '.Polygon(pthArr, options);' + LB +\r\n ' break;' + LB +\r\n ' }' + LB +\r\n ' ' + MAPVAR + '.entities.push(' + POLYELEMENTVAR + ');' + LB +\r\n ' ' + MAPSERVICEVAR + '.Events.addHandler(' + POLYELEMENTVAR + ', ''click'', function(event){' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"PolyElementClick\", ' + PARAMSNAME + '[\"ID\"]));' + LB +\r\n ' })' + LB + LB +\r\n ' ' + MAPSERVICEVAR + '.Events.addHandler(' + POLYELEMENTVAR + ', ''dblclick'', function(event){' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"PolyElementDblClick\", ' + PARAMSNAME + '[\"ID\"]));' + LB +\r\n ' })' + LB + LB +\r\n ' ' + MAPSERVICEVAR + '.Events.addHandler(' + POLYELEMENTVAR + ', ''mouseup'', function(event){' + LB +\r\n ' activeElement = ' + POLYELEMENTVAR + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"PolyElementMouseUp\", ' + PARAMSNAME + '[\"ID\"]));' + LB +\r\n ' })' + LB + LB +\r\n ' ' + MAPSERVICEVAR + '.Events.addHandler(' + POLYELEMENTVAR + ', ''mousedown'', function(event){' + LB +\r\n ' activeElement = ' + POLYELEMENTVAR + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"PolyElementMouseDown\", ' + PARAMSNAME + '[\"ID\"]));' + LB +\r\n ' })' + LB + LB +\r\n ' ' + MAPSERVICEVAR + '.Events.addHandler(' + POLYELEMENTVAR + ', ''mouseout'', function(event){' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"PolyElementMouseLeave\", ' + PARAMSNAME + '[\"ID\"]));' + LB +\r\n ' })' + LB + LB +\r\n ' ' + MAPSERVICEVAR + '.Events.addHandler(' + POLYELEMENTVAR + ', ''mouseover'', function(event){' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"PolyElementMouseEnter\", ' + PARAMSNAME + '[\"ID\"]));' + LB +\r\n ' })' + LB + LB +\r\n\r\n ' if (mouseUpId != -1) {' + LB +\r\n ' ' + MAPSERVICEVAR + '.Events.removeHandler(mouseUpId);' + LB +\r\n ' }' + LB +\r\n ' if (mouseDownId != -1) {' + LB +\r\n ' ' + MAPSERVICEVAR + '.Events.removeHandler(mouseDownId);' + LB +\r\n ' }' + LB +\r\n ' mouseUpId = ' + MAPSERVICEVAR + '.Events.addHandler(' + MAPVAR + ', ''mouseup'', function(event){' + LB +\r\n ' if (activeElement){' + LB +\r\n ' activeElement = null; ' + LB +\r\n ' return;' + LB +\r\n ' }' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"MapMouseUp\"));' + LB +\r\n ' })' + LB + LB +\r\n ' mouseDownId = ' + MAPSERVICEVAR + '.Events.addHandler(' + MAPVAR + ', ''mousedown'', function(event){' + LB +\r\n ' if (activeElement){' + LB +\r\n ' activeElement = null; ' + LB +\r\n ' return;' + LB +\r\n ' }' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"MapMouseDown\"));' + LB +\r\n ' })' + LB + LB +\r\n\r\n ' }else{' + LB +\r\n ' switch(c){' + LB +\r\n ' case \"TTMSFNCMapsPolyline\":' + LB +\r\n ' case \"TTMSFNCMapsPolygon\":' + LB +\r\n ' ' + POLYELEMENTVAR + '.setLocations(' + COORDINATEARRAYVAR + ');' + LB +\r\n ' break;' + LB +\r\n ' case \"TTMSFNCMapsRectangle\":' + LB +\r\n ' case \"TTMSFNCMapsCircle\":' + LB +\r\n ' ' + POLYELEMENTVAR + '.setLocations(co);' + LB +\r\n ' break;' + LB +\r\n ' }' + LB +\r\n ' ' + POLYELEMENTVAR + '.setOptions(options);' + LB +\r\n ' }';\r\nend;\r\n\r\nfunction TTMSFNCMapsBingMaps.GetClosePopup: string;\r\nbegin\r\n Result := ' ' + POPUPVAR + '.setMap(null);';\r\nend;\r\n\r\nfunction TTMSFNCMapsBingMaps.GetDelayLoadEvent: string;\r\nbegin\r\n Result := ' ' + MAPSERVICEVAR + '.loadModule(''Microsoft.Maps.SpatialMath'', function () {';\r\nend;\r\n\r\nfunction TTMSFNCMapsBingMaps.GetDeleteMarker: string;\r\nbegin\r\n Result := ' ' + MAPVAR + '.entities.remove(' + MARKERVAR + ')';\r\nend;\r\n\r\nfunction TTMSFNCMapsBingMaps.GetDeletePolyElement: string;\r\nbegin\r\n Result := ' ' + MAPVAR + '.entities.remove(' + POLYELEMENTVAR + ')';\r\nend;\r\n\r\nfunction TTMSFNCMapsBingMaps.GetGetBounds: string;\r\nbegin\r\n Result :=\r\n ' var loc = ' + MAPVAR + '.getBounds();' + LB +\r\n ' jsonObj[\"NorthEast\"][\"Latitude\"] = loc.getNorth();' + LB +\r\n ' jsonObj[\"NorthEast\"][\"Longitude\"] = loc.getEast();' + LB +\r\n ' jsonObj[\"SouthWest\"][\"Latitude\"] = loc.getSouth();' + LB +\r\n ' jsonObj[\"SouthWest\"][\"Longitude\"] = loc.getWest();';\r\nend;\r\n\r\nfunction TTMSFNCMapsBingMaps.GetGetCenterCoordinate: string;\r\nbegin\r\n Result :=\r\n ' var loc = ' + MAPVAR + '.getCenter();' + LB +\r\n ' jsonObj[\"Latitude\"] = loc.latitude;' + LB +\r\n ' jsonObj[\"Longitude\"] = loc.longitude;';\r\nend;\r\n\r\nfunction TTMSFNCMapsBingMaps.GetLatLonToXY: string;\r\nbegin\r\n Result :=\r\n ' var loc = new ' + MAPSERVICEVAR + '.Location(' + PARAMSNAME + '[\"Latitude\"], ' + PARAMSNAME + '[\"Longitude\"]);' + LB +\r\n ' point = ' + MAPVAR + '.tryLocationToPixel(loc, ' + MAPSERVICEVAR + '.PixelReference.control);' + LB +\r\n ' jsonObj[\"X\"] = parseFloat(point.x);' + LB +\r\n ' jsonObj[\"Y\"] = parseFloat(point.y);';\r\nend;\r\n\r\nfunction TTMSFNCMapsBingMaps.GetXYToLatLon: string;\r\nbegin\r\n Result :=\r\n ' var point = new ' + MAPSERVICEVAR + '.Point(' + PARAMSNAME + '[\"X\"], ' + PARAMSNAME + '[\"Y\"]);' + LB +\r\n ' var loc = map.tryPixelToLocation(point, ' + MAPSERVICEVAR + '.PixelReference.control);' + LB +\r\n ' jsonObj[\"Latitude\"] = parseFloat(loc.lat);' + LB +\r\n ' jsonObj[\"Longitude\"] = parseFloat(loc.lng);';\r\nend;\r\n\r\nfunction TTMSFNCMapsBingMaps.GetGetZoomLevel: string;\r\nbegin\r\n Result := ' var z = ' + MAPVAR + '.getZoom();';\r\nend;\r\n\r\nfunction TTMSFNCMapsBingMaps.GetGlobalVariables: string;\r\nbegin\r\n Result :=\r\n 'var activeElement = null;' + LB +\r\n 'var mouseDownId = -1;' + LB +\r\n 'var mouseUpId = -1;' + LB +\r\n 'var ' + DOUBLECLICKZOOM + ';' + LB +\r\n 'var ' + SCROLLZOOM + ';' + LB + LB +\r\n 'function parseEvent(event, eventname, id = ''''){' + LB +\r\n ' var loc = {''Latitude'': 0, ''Longitude'': 0};' + LB +\r\n ' var x = 0.0;' + LB +\r\n ' var y = 0.0;' + LB +\r\n ' if (event) {' + LB +\r\n ' if (event.location){' + LB +\r\n ' loc = {''Latitude'': event.location.latitude, ''Longitude'': event.location.longitude};' + LB +\r\n ' }' + LB +\r\n ' if (event.pageX && event.pageY){' + LB +\r\n ' x = event.pageX;' + LB +\r\n ' y = event.pageY;' + LB +\r\n ' }' + LB +\r\n ' }' + LB +\r\n\r\n ' var r = {''Coordinate'': loc, ''X'': x, ''Y'': y, ''ID'': id, ''EventName'': eventname};' + LB +\r\n ' return r;' + LB +\r\n '}';\r\nend;\r\n\r\nprocedure TTMSFNCMapsBingMaps.GetHeadLinks(\r\n const AList: TTMSFNCMapsLinksList);\r\nbegin\r\n AList.Add(TTMSFNCMapsLink.CreateScript(BINGMAPSAPIURL + 'mapcontrol?callback=MapCallBack&setMkt=' + MapsProperties.GetLocale + '&setLang=' +\r\n MapsProperties.GetLocale(mlmCountry) + '&key=' + MapsProperties.GetAPIKey, 'text/javascript'));\r\nend;\r\n\r\nfunction TTMSFNCMapsBingMaps.GetHeadStyle: string;\r\nbegin\r\n Result :=\r\n '.customInfobox {' + LB +\r\n ' background:white;' + LB +\r\n ' white-space:normal;' + LB +\r\n ' padding: 10px;' + LB +\r\n '}';\r\nend;\r\n\r\nfunction TTMSFNCMapsBingMaps.GetIdentifier: string;\r\nbegin\r\n Result := 'Bing Maps';\r\nend;\r\n\r\nfunction TTMSFNCMapsBingMaps.GetInitializeCoordinateArray: string;\r\nbegin\r\n Result := '[]';\r\nend;\r\n\r\nfunction TTMSFNCMapsBingMaps.GetInitializeHolesArray: string;\r\nbegin\r\n Result := '[]';\r\nend;\r\n\r\nfunction TTMSFNCMapsBingMaps.GetInitializeEvents: string;\r\nbegin\r\n Result :=\r\n ' var oldZoom = ' + MAPVAR + '.getZoom();' + LB +\r\n ' ' + MAPSERVICEVAR + '.Events.addHandler(' + MAPVAR + ',''viewchangeend'', function(){' + LB +\r\n ' var newZoom = ' + MAPVAR + '.getZoom();' + LB +\r\n ' if(newZoom != oldZoom){' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(null, \"ZoomChanged\"));' + LB +\r\n ' }' + LB +\r\n ' oldZoom = newZoom;' + LB +\r\n ' })' + LB + LB +\r\n ' ' + MAPSERVICEVAR + '.Events.addHandler(' + MAPVAR + ', ''maptypechanged'', function(){' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(null, \"MapTypeChanged\"));' + LB +\r\n ' })' + LB + LB +\r\n ' ' + MAPSERVICEVAR + '.Events.addHandler(' + MAPVAR + ', ''viewchangestart'', function(event){' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"MapMoveStart\"));' + LB +\r\n ' })' + LB + LB +\r\n ' ' + MAPSERVICEVAR + '.Events.addHandler(' + MAPVAR + ', ''viewchangeend'', function(event){' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"MapMoveEnd\"));' + LB +\r\n ' })' + LB + LB +\r\n ' ' + MAPSERVICEVAR + '.Events.addHandler(' + MAPVAR + ', ''click'', function(event){' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"MapClick\"));' + LB +\r\n ' })' + LB + LB +\r\n ' ' + MAPSERVICEVAR + '.Events.addHandler(' + MAPVAR + ', ''dblclick'', function(event){' + LB +\r\n ' if (!' + DOUBLECLICKZOOM + '){' + LB +\r\n ' ' + MAPVAR + '.setOptions({ disableZooming: true });' + LB +\r\n ' setTimeout(function () { return ' + MAPVAR + '.setOptions({ disableZooming: false}); });' + LB +\r\n ' }' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"MapDblClick\"));' + LB +\r\n ' })' + LB + LB +\r\n ' mouseUpId = ' + MAPSERVICEVAR + '.Events.addHandler(' + MAPVAR + ', ''mouseup'', function(event){' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"MapMouseUp\"));' + LB +\r\n ' })' + LB + LB +\r\n ' mouseDownId = ' + MAPSERVICEVAR + '.Events.addHandler(' + MAPVAR + ', ''mousedown'', function(event){' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"MapMouseDown\"));' + LB +\r\n ' })' + LB + LB +\r\n ' ' + MAPSERVICEVAR + '.Events.addHandler(' + MAPVAR + ', ''mouseout'', function(event){' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"MapMouseLeave\"));' + LB +\r\n ' })' + LB + LB +\r\n ' ' + MAPSERVICEVAR + '.Events.addHandler(' + MAPVAR + ', ''mouseover'', function(event){' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"MapMouseEnter\"));' + LB +\r\n ' })' + LB + LB +\r\n ' ' + MAPSERVICEVAR + '.Events.addHandler(' + MAPVAR + ', ''mousemove'', function(event){' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"MapMouseMove\"));' + LB +\r\n ' })' + LB + LB +\r\n ' ' + MAPSERVICEVAR + '.Events.addHandler(' + MAPVAR + ', ''mousewheel'', function(event){' + LB +\r\n ' if (' + SCROLLZOOM + '){' + LB +\r\n ' var zoom = ' + MAPVAR + '.getZoom();' + LB +\r\n\r\n ' if (event.wheelDelta > 0 || event.detail < 0) {' + LB +\r\n ' zoom++;' + LB +\r\n ' } else {' + LB +\r\n ' zoom--;' + LB +\r\n ' }' + LB +\r\n\r\n ' if (zoom <= 0) {' + LB +\r\n ' zoom = 1;' + LB +\r\n ' } else if (zoom >= 21) {' + LB +\r\n ' zoom = 21;' + LB +\r\n ' }' + LB +\r\n\r\n ' ' + MAPVAR + '.setView({ zoom: zoom });' + LB +\r\n ' }' + LB +\r\n ' })';\r\nend;\r\n\r\nfunction TTMSFNCMapsBingMaps.GetInitializeMap: string;\r\nbegin\r\n Result :=\r\n ' ' + DOUBLECLICKZOOM + ' = ' + BoolToStrEx(MapsProperties.GetZoomOnDblClick) + ';' + LB +\r\n ' ' + SCROLLZOOM + ' = ' + BoolToStrEx(MapsProperties.GetZoomOnWheelScroll) + ';' + LB + LB +\r\n\r\n ' ' + MAPVAR + ' = new ' + MAPSERVICEVAR + '.Map(\"#' + MAPID + '\", {' + LB +\r\n ' disableScrollWheelZoom: true,' + LB +\r\n ' disablePanning: ' + BoolToStrEx(not MapsProperties.GetPanning) + ',' + LB +\r\n ' showZoomButtons: ' + BoolToStrEx(MapsProperties.GetShowZoomControl) + ',' + LB +\r\n ' showMapTypeSelector: ' + BoolToStrEx(MapsProperties.GetShowMapTypeControl) + LB +\r\n ' });' + LB + LB +\r\n\r\n ' ' + MAPVAR + '.setView({' + LB +\r\n ' zoom: ' + MapsProperties.GetDefaultZoomLevel +',' + LB +\r\n ' center: new ' + MAPSERVICEVAR + '.Location(' + MapsProperties.GetDefaultLatitude +', ' + MapsProperties.GetDefaultLongitude + ')' + LB +\r\n ' });';\r\nend;\r\n\r\nfunction TTMSFNCMapsBingMaps.GetMapsServiceCheck: string;\r\nbegin\r\n Result := '!(MapCallBackFlag == true) || !window.Microsoft || !' + MAPSERVICEVAR + ' || !' + MAPSERVICEVAR + '.Map';\r\nend;\r\n\r\nfunction TTMSFNCMapsBingMaps.GetResetMap: string;\r\nbegin\r\n Result := '';\r\nend;\r\n\r\nfunction TTMSFNCMapsBingMaps.GetSetCenterCoordinate: string;\r\nbegin\r\n Result :=\r\n ' var lat = new ' + MAPSERVICEVAR + '.Location(' + PARAMSNAME + '[\"Latitude\"], ' + PARAMSNAME + '[\"Longitude\"])' + LB +\r\n ' ' + MAPVAR + '.setView({ center: lat});';\r\nend;\r\n\r\nfunction TTMSFNCMapsBingMaps.GetSetZoomLevel: string;\r\nbegin\r\n Result :=\r\n ' ' + MAPVAR + '.setView({ zoom: ' + PARAMSNAME + '});';\r\nend;\r\n\r\nfunction TTMSFNCMapsBingMaps.GetShowPopup: string;\r\nbegin\r\n Result :=\r\n ' var popupTemplate = ''
{text}
'';' + LB +\r\n ' var loc = new ' + MAPSERVICEVAR + '.Location(' + PARAMSNAME + '[\"Latitude\"], ' + PARAMSNAME + '[\"Longitude\"]);' + LB +\r\n ' ' + POPUPVAR + ' = new ' + MAPSERVICEVAR + '.Infobox(loc, {' + LB +\r\n ' showCloseButton: true,' + LB +\r\n ' offset: new ' + MAPSERVICEVAR + '.Point(-' + PARAMSNAME + '[\"OffsetX\"], -' + PARAMSNAME + '[\"OffsetY\"]),' + LB +\r\n ' maxHeight: 10000,' + LB +\r\n ' maxWidth: 10000,' + LB +\r\n ' description: popupTemplate.replace(/{text}/g, ' + PARAMSNAME + '[\"Text\"])' + LB +\r\n ' });' + LB +\r\n ' ' + POPUPVAR + '.setMap(' + MAPVAR + ');' + LB +\r\n ' ' + MAPSERVICEVAR + '.Events.addHandler(' + POPUPVAR + ', ''click'', handleClickInfoBox);' + LB +\r\n ' function handleClickInfoBox(e){' + LB +\r\n ' var isCloseAction = e.originalEvent.target.className == \"infobox-close-img\";' + LB +\r\n ' if(isCloseAction){' + LB +\r\n ' ' + POPUPVAR + '.setMap(null);' + LB +\r\n ' }' + LB +\r\n ' }';\r\n\r\nend;\r\n\r\nfunction TTMSFNCMapsBingMaps.GetUpdateOptions: string;\r\nbegin\r\n Result :=\r\n ' ' + DOUBLECLICKZOOM + ' = ' + PARAMSNAME + '[\"ZoomOnDblClick\"];' + LB +\r\n ' ' + SCROLLZOOM + ' = ' + PARAMSNAME + '[\"ZoomOnWheelScroll\"];' + LB + LB +\r\n\r\n ' var opt = {' + LB +\r\n ' disablePanning: !' + PARAMSNAME + '[\"Panning\"],' + LB +\r\n ' showZoomButtons: ' + PARAMSNAME + '[\"ShowZoomControl\"],' + LB +\r\n ' showMapTypeSelector: ' + PARAMSNAME + '[\"ShowMapTypeControl\"]' + LB +\r\n ' };' + LB + LB +\r\n\r\n ' ' + MAPVAR + '.setOptions(opt);';\r\nend;\r\n\r\nfunction TTMSFNCMapsBingMaps.GetZoomToBounds: string;\r\nbegin\r\n Result :=\r\n ' var sw = new ' + MAPSERVICEVAR + '.Location(' + PARAMSNAME + '[\"SouthWest\"][\"Latitude\"], ' + PARAMSNAME + '[\"SouthWest\"][\"Longitude\"])' + LB +\r\n ' var ne = new ' + MAPSERVICEVAR + '.Location(' + PARAMSNAME + '[\"NorthEast\"][\"Latitude\"], ' + PARAMSNAME + '[\"NorthEast\"][\"Longitude\"])' + LB +\r\n ' var locs = [sw, ne];' + LB +\r\n ' var rect = ' + MAPSERVICEVAR + '.LocationRect.fromLocations(locs);' + LB +\r\n ' ' + MAPVAR + '.setView({ bounds: rect, padding: 0 });';\r\nend;\r\n\r\nfunction TTMSFNCMapsBingMaps.IsValid: Boolean;\r\nbegin\r\n Result := (MapsProperties.GetAPIKey <> '');\r\nend;\r\n\r\nprocedure TTMSFNCMapsBingMaps.RemoveScripts;\r\nbegin\r\n {$IFDEF WEBLIB}\r\n asm\r\n let keywords = ['www.bing.com/rb/3A', 'www.bing.com/rp'];\r\n\r\n if (window.Microsoft){\r\n window.Microsoft.Maps = undefined;\r\n }\r\n\r\n let scripts = document.querySelectorAll('script,link');\r\n for (let i = scripts.length - 1; i >= 0; i--) {\r\n let scriptSource = scripts[i].getAttribute('src');\r\n if (!scriptSource){\r\n scriptSource = scripts[i].getAttribute('href');\r\n }\r\n if (scriptSource != null) {\r\n if (keywords.filter(item => scriptSource.includes(item)).length) {\r\n scripts[i].remove();\r\n // scripts[i].parentNode.removeChild(scripts[i]);\r\n }\r\n }\r\n }\r\n end;\r\n {$ENDIF}\r\nend;\r\n\r\nend.\r\n\r\n","{********************************************************************}\r\n{ }\r\n{ written by TMS Software }\r\n{ copyright (c) 2020 - 2024 }\r\n{ Email : info@tmssoftware.com }\r\n{ Web : http://www.tmssoftware.com }\r\n{ }\r\n{ The source code is given as is. The author is not responsible }\r\n{ for any possible damage done due to the use of this code. }\r\n{ The complete source code remains property of the author and may }\r\n{ not be distributed, published, given or sold in any form as such. }\r\n{ No parts of the source code can be included in any other component }\r\n{ or application without written authorization of the author. }\r\n{********************************************************************}\r\n\r\nunit WEBLib.TMSFNCMaps.TomTom;\r\n\r\n{$I WEBLib.TMSFNCDefines.inc}\r\n\r\n{$IFDEF WEBLIB}\r\n{$DEFINE LCLWEBLIB}\r\n{$ENDIF}\r\n{$IFDEF LCLLIB}\r\n{$DEFINE LCLWEBLIB}\r\n{$ENDIF}\r\n\r\ninterface\r\n\r\nprocedure RegisterTomTomService;\r\nprocedure UnRegisterTomTomService;\r\n\r\nimplementation\r\n\r\nuses\r\n Classes, Math, DateUtils, Types, SysUtils, WEBLib.TMSFNCMaps,\r\n WEBLib.TMSFNCMapsCommonTypes, WEBLib.TMSFNCUtils, WEBLib.TMSFNCTypes\r\n {$IFDEF WEBLIB}\r\n ,Contnrs, Web\r\n {$ENDIF}\r\n {$IFNDEF LCLWEBLIB}\r\n ,Generics.Collections, Generics.Defaults\r\n {$HINTS OFF}\r\n {$IF COMPILERVERSION > 22}\r\n , UITypes\r\n {$IFEND}\r\n {$HINTS ON}\r\n {$ENDIF}\r\n {$IFDEF LCLLIB}\r\n ,fgl\r\n {$ENDIF}\r\n ;\r\n\r\nconst\r\n MAJ_VER = 1; // Major version nr.\r\n MIN_VER = 0; // Minor version nr.\r\n REL_VER = 3; // Release nr.\r\n BLD_VER = 1; // Build nr.\r\n\r\n //v1.0.0.0: First release\r\n //v1.0.1.0: New : API version updated\r\n //v1.0.2.0: New : API version updated\r\n //v1.0.3.0: Improved : Default Marker anchoring\r\n //v1.0.3.1: Fixed : Issue OnZoomChanged triggered multiple times\r\n\r\ntype\r\n TTMSFNCMapsTomTomService = class;\r\n\r\n TTMSFNCMapsTomTomFactoryService = class(TTMSFNCMapsFactoryService, ITMSFNCMapsServiceTomTom);\r\n\r\n TTMSFNCMapsTomTomService = class(TTMSFNCMapsTomTomFactoryService)\r\n protected\r\n function DoCreateMaps: ITMSFNCCustomMaps; override;\r\n end;\r\n\r\ntype\r\n TTMSFNCMapsTomTom = class;\r\n\r\n TTMSFNCMapsTomTom = class(TTMSFNCCustomMapsInterfacedObject, ITMSFNCCustomMaps)\r\n protected\r\n procedure GetHeadLinks(const AList: TTMSFNCMapsLinksList);\r\n procedure RemoveScripts;\r\n function GetResetMap: string;\r\n function GetShowPopup: string;\r\n function GetClosePopup: string;\r\n function GetHeadStyle: string;\r\n function GetDelayLoadEvent: string;\r\n function GetMapsServiceCheck: string;\r\n function GetIdentifier: string;\r\n function GetInitializeMap: string;\r\n function GetInitializeEvents: string;\r\n function GetAddOrUpdateMarker: string;\r\n function GetDeleteMarker: string;\r\n function GetAddOrUpdatePolyElement: string;\r\n function GetDeletePolyElement: string;\r\n function GetZoomToBounds: string;\r\n function GetGetBounds: string;\r\n function GetSetCenterCoordinate: string;\r\n function GetGetCenterCoordinate: string;\r\n function GetGetZoomLevel: string;\r\n function GetSetZoomLevel: string;\r\n function GetLatLonToXY: string;\r\n function GetXYToLatLon: string;\r\n function GetUpdateOptions: string;\r\n function GetGlobalVariables: string;\r\n function GetAddCoordinateToArray: string;\r\n function GetAddHoleToArray: string;\r\n function GetInitializeCoordinateArray: string;\r\n function GetInitializeHolesArray: string;\r\n function IsValid: Boolean;\r\n procedure DestroyMaps;\r\n public\r\n constructor Create;\r\n destructor Destroy; override;\r\n end;\r\n\r\nvar\r\n MapsService: ITMSFNCMapsServiceTomTom;\r\n\r\nconst\r\n TOMTOMAPIVERSION = '6.x/6.25.0';\r\n TOMTOMAPIURL = 'https://api.tomtom.com/maps-sdk-for-web/cdn/';\r\n TOMTOMMAPSTYLE = 'https://api.tomtom.com/style/1/style/21.1.0-*?map=basic_main&poi=poi_main';\r\n MAPSERVICEVAR = 'window.tt';\r\n MAPZOOMCONTROLVAR = 'mapZoomControl';\r\n MAPCONTROLARRAYVAR = 'mapControls';\r\n\r\nprocedure RegisterTomTomService;\r\nbegin\r\n if not TTMSFNCMapsPlatformServices.Current.SupportsPlatformService(ITMSFNCMapsServiceTomTom, IInterface(MapsService)) then\r\n begin\r\n MapsService := TTMSFNCMapsTomTomService.Create;\r\n TTMSFNCMapsPlatformServices.Current.AddPlatformService(ITMSFNCMapsServiceTomTom, MapsService);\r\n end;\r\nend;\r\n\r\nprocedure UnregisterTomTomService;\r\nbegin\r\n TTMSFNCMapsPlatformServices.Current.RemovePlatformService(ITMSFNCMapsServiceTomTom);\r\nend;\r\n\r\n{ TTMSFNCMapsTomTomService }\r\n\r\nfunction TTMSFNCMapsTomTomService.DoCreateMaps: ITMSFNCCustomMaps;\r\nbegin\r\n Result := TTMSFNCMapsTomTom.Create;\r\nend;\r\n\r\nconstructor TTMSFNCMapsTomTom.Create;\r\nbegin\r\n inherited;\r\nend;\r\n\r\ndestructor TTMSFNCMapsTomTom.Destroy;\r\nbegin\r\n inherited;\r\nend;\r\n\r\nprocedure TTMSFNCMapsTomTom.DestroyMaps;\r\nbegin\r\n MapsService.DestroyMaps(Self);\r\nend;\r\n\r\nfunction TTMSFNCMapsTomTom.GetAddCoordinateToArray: string;\r\nbegin\r\n Result := ' ' + COORDINATEARRAYVAR + '.push([' + PARAMSNAME + '[\"Longitude\"], ' + PARAMSNAME + '[\"Latitude\"]]);';\r\nend;\r\n\r\nfunction TTMSFNCMapsTomTom.GetAddHoleToArray: string;\r\nbegin\r\n Result := '';\r\nend;\r\n\r\nfunction TTMSFNCMapsTomTom.GetAddOrUpdateMarker: string;\r\nbegin\r\n Result :=\r\n ' var loc = [' + PARAMSNAME + '[\"Longitude\"], ' + PARAMSNAME + '[\"Latitude\"]]' + LB + LB +\r\n\r\n ' if (!' + MARKERVAR + '){' + LB +\r\n ' var el = document.createElement(''div'');' + LB +\r\n ' el.style.width = ''48px'';' + LB +\r\n ' el.style.height = ''48px'';' + LB +\r\n ' el.innerHTML = '''';' + LB +\r\n ' ' + MARKERVAR + ' = new ' + MAPSERVICEVAR + '.Marker({anchor: \"bottom\", element: el, draggable:' + PARAMSNAME + '[\"Draggable\"]});' + LB +\r\n ' ' + MARKERVAR + '.setLngLat(loc).addTo(' + MAPVAR + ');' + LB +\r\n ' el.addEventListener(''click'', function(event){' + LB +\r\n ' event.stopPropagation();' + LB +\r\n ' if (' + PARAMSNAME + '[\"Title\"] != \"\"){' + LB +\r\n ' var popup = new ' + MAPSERVICEVAR + '.Popup({ closeOnClick: true, maxWidth: \"none\", offset: [0, -30]}).setLngLat(loc).setHTML(' + PARAMSNAME + '[\"Title\"]).addTo(' + MAPVAR + ');' + LB +\r\n ' }' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"MarkerClick\", ' + PARAMSNAME + '[\"ID\"]));' + LB +\r\n ' })' + LB + LB +\r\n ' el.addEventListener(''dblclick'', function(event){' + LB +\r\n ' event.stopPropagation();' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"MarkerDblClick\", ' + PARAMSNAME + '[\"ID\"]));' + LB +\r\n ' })' + LB + LB +\r\n ' el.addEventListener(''mouseup'', function(event){' + LB +\r\n ' if (!' + PARAMSNAME + '[\"Draggable\"]){' + LB +\r\n ' event.stopPropagation();' + LB +\r\n ' }' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"MarkerMouseUp\", ' + PARAMSNAME + '[\"ID\"]));' + LB +\r\n ' } )' + LB + LB +\r\n ' el.addEventListener(''mousedown'', function(event){' + LB +\r\n ' if (!' + PARAMSNAME + '[\"Draggable\"]){' + LB +\r\n ' event.stopPropagation();' + LB +\r\n ' }' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"MarkerMouseDown\", ' + PARAMSNAME + '[\"ID\"]));' + LB +\r\n ' })' + LB + LB +\r\n ' el.addEventListener(''mouseout'', function(event){' + LB +\r\n ' event.stopPropagation();' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"MarkerMouseLeave\", ' + PARAMSNAME + '[\"ID\"]));' + LB +\r\n ' })' + LB + LB +\r\n ' el.addEventListener(''mouseover'', function(event){' + LB +\r\n ' event.stopPropagation();' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"MarkerMouseEnter\", ' + PARAMSNAME + '[\"ID\"]));' + LB +\r\n ' })' + LB + LB +\r\n ' }else{' + LB +\r\n ' ' + MARKERVAR + '.setLngLat(loc);' + LB +\r\n ' }' + LB + LB +\r\n\r\n MARKERVAR + '.setDraggable(' + PARAMSNAME + '[\"Draggable\"]);' + LB +\r\n\r\n 'function onDragEnd() {' + LB +\r\n ' const lngLat = ' + MARKERVAR + '.getLngLat();' + LB +\r\n ' var jsonObj = getDefaultCoordinateObject();' + LB +\r\n ' jsonObj[\"Latitude\"] = lngLat.latitude;' + LB +\r\n ' jsonObj[\"Longitude\"] = lngLat.longitude;' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"MarkerDragEnd\", ' + PARAMSNAME + '[\"ID\"]), jsonObj);' + LB +\r\n '}' + LB +\r\n\r\n MARKERVAR + '.on(''dragend'', onDragEnd)' + LB +\r\n\r\n ' var elx = ' + MARKERVAR + '.getElement();' + LB +\r\n ' if (elx){' + LB +\r\n\r\n ' var markericon = ' + CUSTOMDEFAULTMARKERICON + '(' +\r\n PARAMSNAME + '[\"DefaultIcon\"],' + LB +\r\n PARAMSNAME + '[\"IconURL\"]);' + LB +\r\n\r\n ' if (markericon != \"\"){' + LB +\r\n ' var mimg = document.createElement(''img'');' +\r\n ' mimg.src = markericon;' +\r\n ' elx.innerHTML = mimg.outerHTML;' + LB +\r\n ' if (' + PARAMSNAME + '[\"DefaultIcon\"][\"Enabled\"]) {' + LB +\r\n ' elx.style.width = ' + PARAMSNAME + '[\"DefaultIcon\"][\"Size\"] + \"px\";' + LB +\r\n ' elx.style.height = ' + PARAMSNAME + '[\"DefaultIcon\"][\"Size\"] + \"px\";' + LB +\r\n ' }' + LB +\r\n ' }' + LB +\r\n ' if (' + PARAMSNAME + '[\"Visible\"]){' + LB +\r\n ' elx.style.visibility = \"visible\";' + LB +\r\n ' }else{' + LB +\r\n ' elx.style.visibility = \"hidden\";' + LB +\r\n ' }' + LB +\r\n ' }';\r\nend;\r\n\r\nfunction TTMSFNCMapsTomTom.GetAddOrUpdatePolyElement: string;\r\nbegin\r\n Result :=\r\n ' var c = ' + PARAMSNAME + '[\"$type\"];' + LB +\r\n ' var pg, dpg, pl, dpl, spg, spl;' + LB +\r\n ' var co = [];' + LB +\r\n\r\n ' switch(c){' + LB +\r\n ' case \"TTMSFNCMapsRectangle\":' + LB +\r\n ' co.push([' + PARAMSNAME + '[\"Bounds\"][\"SouthWest\"][\"Longitude\"], ' + PARAMSNAME + '[\"Bounds\"][\"NorthEast\"][\"Latitude\"]]);' + LB +\r\n ' co.push([' + PARAMSNAME + '[\"Bounds\"][\"NorthEast\"][\"Longitude\"], ' + PARAMSNAME + '[\"Bounds\"][\"NorthEast\"][\"Latitude\"]]);' + LB +\r\n ' co.push([' + PARAMSNAME + '[\"Bounds\"][\"NorthEast\"][\"Longitude\"], ' + PARAMSNAME + '[\"Bounds\"][\"SouthWest\"][\"Latitude\"]]);' + LB +\r\n ' co.push([' + PARAMSNAME + '[\"Bounds\"][\"SouthWest\"][\"Longitude\"], ' + PARAMSNAME + '[\"Bounds\"][\"SouthWest\"][\"Latitude\"]]);' + LB +\r\n ' co.push([' + PARAMSNAME + '[\"Bounds\"][\"SouthWest\"][\"Longitude\"], ' + PARAMSNAME + '[\"Bounds\"][\"NorthEast\"][\"Latitude\"]]);' + LB +\r\n ' break;' + LB +\r\n ' case \"TTMSFNCMapsCircle\":' + LB +\r\n ' co = createCircle(' + PARAMSNAME + '[\"Center\"], ' + PARAMSNAME + '[\"Radius\"], true);' + LB +\r\n ' break;' + LB +\r\n ' default:' + LB +\r\n ' co = ' + COORDINATEARRAYVAR + ';' + LB +\r\n ' break;' + LB +\r\n ' }' + LB + LB +\r\n\r\n ' switch(c){' + LB +\r\n ' case \"TTMSFNCMapsRectangle\":' + LB +\r\n ' case \"TTMSFNCMapsCircle\":' + LB +\r\n ' case \"TTMSFNCMapsPolygon\":' + LB +\r\n ' dpg = {' + LB +\r\n ' ''type'': ''Feature'',' + LB +\r\n ' ''geometry'': {' + LB +\r\n ' ''type'': ''Polygon'',' + LB +\r\n ' ''coordinates'': [co]' + LB +\r\n ' }' + LB +\r\n ' }' + LB + LB +\r\n\r\n ' spg = {' + LB +\r\n ' ''type'': ''geojson'',' + LB +\r\n ' ''data'': dpg' + LB +\r\n ' };' + LB +\r\n\r\n ' pg = {' + LB +\r\n ' ''id'': ' + PARAMSNAME + '[\"ID\"] + \"_polygon\",' + LB +\r\n ' ''type'': ''fill'',' + LB +\r\n ' ''source'': spg, ' + LB +\r\n ' ''layout'': {' + LB +\r\n ' ''visibility'': (' + PARAMSNAME + '[\"Visible\"] ? ''visible'' : ''none'')' + LB +\r\n ' },' + LB +\r\n ' ''paint'': {' + LB +\r\n ' ''fill-color'': ' + PARAMSNAME + '[\"FillColor\"],' + LB +\r\n ' ''fill-opacity'': ' + PARAMSNAME + '[\"FillOpacity\"],' + LB +\r\n ' }' + LB +\r\n ' };' + LB + LB +\r\n\r\n ' co.push(co[0]);' + LB +\r\n ' break;' + LB +\r\n ' }' + LB +\r\n\r\n ' dpl = {' + LB +\r\n ' ''type'': ''Feature'',' + LB +\r\n ' ''geometry'': {' + LB +\r\n ' ''type'': ''LineString'',' + LB +\r\n ' ''coordinates'': co' + LB +\r\n ' }' + LB +\r\n ' }' + LB + LB +\r\n\r\n ' spl = {' + LB +\r\n ' ''type'': ''geojson'',' + LB +\r\n ' ''data'': dpl' + LB +\r\n ' };' + LB +\r\n\r\n ' pl = {' + LB +\r\n ' ''id'': ' + PARAMSNAME + '[\"ID\"] + \"_polyline\",' + LB +\r\n ' ''type'': ''line'',' + LB +\r\n ' ''source'': spl, ' + LB +\r\n ' ''layout'': {' + LB +\r\n ' ''visibility'': (' + PARAMSNAME + '[\"Visible\"] ? ''visible'' : ''none'')' + LB +\r\n ' },' + LB +\r\n ' ''paint'': {' + LB +\r\n ' ''line-color'': ' + PARAMSNAME + '[\"StrokeColor\"],' + LB +\r\n ' ''line-opacity'': ' + PARAMSNAME + '[\"StrokeOpacity\"],' + LB +\r\n ' ''line-width'': ' + PARAMSNAME + '[\"StrokeWidth\"],' + LB +\r\n ' }' + LB +\r\n ' }' + LB + LB +\r\n\r\n ' if (!' + POLYELEMENTVAR + '){' + LB +\r\n ' switch(c){' + LB +\r\n ' case \"TTMSFNCMapsPolyline\":' + LB +\r\n ' ' + MAPVAR + '.addLayer(pl);' + LB +\r\n ' break;' + LB +\r\n ' case \"TTMSFNCMapsCircle\":' + LB +\r\n ' case \"TTMSFNCMapsRectangle\":' + LB +\r\n ' case \"TTMSFNCMapsPolygon\":' + LB +\r\n ' ' + MAPVAR + '.addLayer(pg);' + LB +\r\n ' ' + MAPVAR + '.addLayer(pl);' + LB +\r\n ' break;' + LB +\r\n ' }' + LB +\r\n\r\n ' if (pg) {' + LB +\r\n ' ' + MAPVAR + '.on(''click'', pg.id, function(event){' + LB +\r\n ' activeElement = pl;' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"PolyElementClick\", ' + PARAMSNAME + '[\"ID\"]));' + LB +\r\n ' })' + LB + LB +\r\n ' ' + MAPVAR + '.on(''dblclick'', pg.id, function(event){' + LB +\r\n ' activeElement = pl;' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"PolyElementDblClick\", ' + PARAMSNAME + '[\"ID\"]));' + LB +\r\n ' })' + LB + LB +\r\n ' ' + MAPVAR + '.on(''mouseup'', pg.id, function(event){' + LB +\r\n ' activeElement = pl;' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"PolyElementMouseUp\", ' + PARAMSNAME + '[\"ID\"]));' + LB +\r\n ' })' + LB + LB +\r\n ' ' + MAPVAR + '.on(''mousedown'', pg.id, function(event){' + LB +\r\n ' activeElement = pl;' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"PolyElementMouseDown\", ' + PARAMSNAME + '[\"ID\"]));' + LB +\r\n ' })' + LB + LB +\r\n ' ' + MAPVAR + '.on(''mouseout'', pg.id, function(event){' + LB +\r\n ' activeElement = pl;' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"PolyElementMouseLeave\", ' + PARAMSNAME + '[\"ID\"]));' + LB +\r\n ' })' + LB + LB +\r\n ' ' + MAPVAR + '.on(''mouseover'', pg.id, function(event){' + LB +\r\n ' activeElement = pl;' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"PolyElementMouseEnter\", ' + PARAMSNAME + '[\"ID\"]));' + LB +\r\n ' })' + LB +\r\n ' }' + LB + LB +\r\n\r\n ' if (pl && !pg) {' + LB +\r\n ' ' + MAPVAR + '.on(''click'', pl.id, function(event){' + LB +\r\n ' activeElement = pl;' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"PolyElementClick\", ' + PARAMSNAME + '[\"ID\"]));' + LB +\r\n ' })' + LB + LB +\r\n ' ' + MAPVAR + '.on(''dblclick'', pl.id, function(event){' + LB +\r\n ' activeElement = pl;' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"PolyElementDblClick\", ' + PARAMSNAME + '[\"ID\"]));' + LB +\r\n ' })' + LB + LB +\r\n ' ' + MAPVAR + '.on(''mouseup'', pl.id, function(event){' + LB +\r\n ' activeElement = pl;' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"PolyElementMouseUp\", ' + PARAMSNAME + '[\"ID\"]));' + LB +\r\n ' })' + LB + LB +\r\n ' ' + MAPVAR + '.on(''mousedown'', pl.id, function(event){' + LB +\r\n ' activeElement = pl;' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"PolyElementMouseDown\", ' + PARAMSNAME + '[\"ID\"]));' + LB +\r\n ' })' + LB + LB +\r\n ' ' + MAPVAR + '.on(''mouseout'', pl.id, function(event){' + LB +\r\n ' activeElement = pl;' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"PolyElementMouseLeave\", ' + PARAMSNAME + '[\"ID\"]));' + LB +\r\n ' })' + LB + LB +\r\n ' ' + MAPVAR + '.on(''mouseover'', pl.id, function(event){' + LB +\r\n ' activeElement = pl;' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"PolyElementMouseEnter\", ' + PARAMSNAME + '[\"ID\"]));' + LB +\r\n ' })' + LB +\r\n ' }' + LB + LB +\r\n\r\n GetInitializeEvents + LB + LB +\r\n\r\n ' }else{' + LB +\r\n ' if (pg) {' + LB +\r\n ' var pgu = ' + MAPVAR + '.getLayer(pg.id);' + LB +\r\n ' if (pgu){' + LB +\r\n ' ' + MAPVAR + '.setLayoutProperty(pgu.id, ''visibility'', (' + PARAMSNAME + '[\"Visible\"] ? ''visible'' : ''none''));' + LB +\r\n ' ' + MAPVAR + '.setPaintProperty(pgu.id, ''fill-color'', ' + PARAMSNAME + '[\"FillColor\"]);' + LB +\r\n ' ' + MAPVAR + '.setPaintProperty(pgu.id, ''fill-opacity'', ' + PARAMSNAME + '[\"FillOpacity\"]);' + LB +\r\n ' ' + MAPVAR + '.getSource(pgu.id).setData(dpg);' + LB +\r\n ' }' + LB +\r\n ' }' + LB +\r\n\r\n ' if (pl) {' + LB +\r\n ' var plu = ' + MAPVAR + '.getLayer(pl.id);' + LB +\r\n ' if (plu){' + LB +\r\n ' ' + MAPVAR + '.setLayoutProperty(plu.id, ''visibility'', (' + PARAMSNAME + '[\"Visible\"] ? ''visible'' : ''none''));' + LB +\r\n ' ' + MAPVAR + '.setPaintProperty(plu.id, ''line-color'', ' + PARAMSNAME + '[\"StrokeColor\"]);' + LB +\r\n ' ' + MAPVAR + '.setPaintProperty(plu.id, ''line-opacity'', ' + PARAMSNAME + '[\"StrokeOpacity\"]);' + LB +\r\n ' ' + MAPVAR + '.setPaintProperty(plu.id, ''line-width'', ' + PARAMSNAME + '[\"StrokeWidth\"]);' + LB +\r\n ' ' + MAPVAR + '.getSource(plu.id).setData(dpl);' + LB +\r\n ' }' + LB +\r\n ' }' + LB +\r\n ' }' + LB +\r\n\r\n ' ' + POLYELEMENTVAR + ' = ' + PARAMSNAME + '[\"ID\"]';\r\nend;\r\n\r\nfunction TTMSFNCMapsTomTom.GetClosePopup: string;\r\nbegin\r\n Result := ' ' + POPUPVAR + '.remove();';\r\nend;\r\n\r\nfunction TTMSFNCMapsTomTom.GetDelayLoadEvent: string;\r\nbegin\r\n Result := ' ' + MAPVAR + '.on(''load'', function () {';\r\nend;\r\n\r\nfunction TTMSFNCMapsTomTom.GetDeleteMarker: string;\r\nbegin\r\n Result := ' ' + MARKERVAR + '.remove();';\r\nend;\r\n\r\nfunction TTMSFNCMapsTomTom.GetDeletePolyElement: string;\r\nbegin\r\n Result :=\r\n ' var pgu = ' + MAPVAR + '.getLayer(' + POLYELEMENTVAR + ' + \"_polygon\");' + LB +\r\n ' if (pgu){' + LB +\r\n ' ' + MAPVAR + '.removeLayer(' + POLYELEMENTVAR + ' + \"_polygon\");' + LB +\r\n ' }' + LB +\r\n\r\n ' var plu = ' + MAPVAR + '.getLayer(' + POLYELEMENTVAR + ' + \"_polyline\");' + LB +\r\n ' if (plu){' + LB +\r\n ' ' + MAPVAR + '.removeLayer(' + POLYELEMENTVAR + ' + \"_polyline\");' + LB +\r\n ' }';\r\nend;\r\n\r\nfunction TTMSFNCMapsTomTom.GetGetBounds: string;\r\nbegin\r\n Result :=\r\n ' var loc = ' + MAPVAR + '.getBounds();' + LB +\r\n ' jsonObj[\"NorthEast\"][\"Latitude\"] = loc.getNorthEast().lat;' + LB +\r\n ' jsonObj[\"NorthEast\"][\"Longitude\"] = loc.getNorthEast().lng;' + LB +\r\n ' jsonObj[\"SouthWest\"][\"Latitude\"] = loc.getSouthWest().lat;' + LB +\r\n ' jsonObj[\"SouthWest\"][\"Longitude\"] = loc.getSouthWest().lng;';\r\nend;\r\n\r\nfunction TTMSFNCMapsTomTom.GetGetCenterCoordinate: string;\r\nbegin\r\n Result :=\r\n ' var loc = ' + MAPVAR + '.getCenter();' + LB +\r\n ' jsonObj[\"Latitude\"] = loc.lat;' + LB +\r\n ' jsonObj[\"Longitude\"] = loc.lng;';\r\nend;\r\n\r\nfunction TTMSFNCMapsTomTom.GetLatLonToXY: string;\r\nbegin\r\n Result :=\r\n ' var coordinate = [' + PARAMSNAME + '[\"Longitude\"], ' + PARAMSNAME + '[\"Latitude\"]];' + LB +\r\n ' var point = ' + MAPVAR +'.project(coordinate);' + LB +\r\n ' jsonObj[\"X\"] = parseFloat(point.x);' + LB +\r\n ' jsonObj[\"Y\"] = parseFloat(point.y);';\r\nend;\r\n\r\nfunction TTMSFNCMapsTomTom.GetXYToLatLon: string;\r\nbegin\r\n Result :=\r\n ' var point = [' + PARAMSNAME + '[\"X\"], ' + PARAMSNAME + '[\"Y\"]];' + LB +\r\n ' var coordinate = ' + MAPVAR +'.unproject(point);' + LB +\r\n ' jsonObj[\"Latitude\"] = parseFloat(coordinate.lat);' + LB +\r\n ' jsonObj[\"Longitude\"] = parseFloat(coordinate.lng);';\r\nend;\r\n\r\nfunction TTMSFNCMapsTomTom.GetGetZoomLevel: string;\r\nbegin\r\n Result := ' var z = ' + MAPVAR + '.getZoom();';\r\nend;\r\n\r\nfunction TTMSFNCMapsTomTom.GetGlobalVariables: string;\r\nbegin\r\n Result :=\r\n 'var activeElement = null;' + LB +\r\n 'var ' + MAPZOOMCONTROLVAR + ';' + LB +\r\n 'var ' + MAPCONTROLARRAYVAR + ' = [];' + LB +\r\n 'var mouseLatLng = {''Latitude'': 0, ''Longitude'': 0};' + LB +\r\n 'function parseEvent(event, eventname, id = ''''){' + LB +\r\n ' var loc = {''Latitude'': 0, ''Longitude'': 0};' + LB +\r\n ' var x = 0.0;' + LB +\r\n ' var y = 0.0;' + LB +\r\n ' if ((eventname == \"MapMoveStart\") || (eventname == \"MapMoveEnd\")){ ' +\r\n ' var ptcenter = ' + MAPVAR + '.getCenter();' + LB +\r\n ' var lat = ptcenter.lat;' + LB +\r\n ' var lng = ptcenter.lng;' + LB +\r\n ' loc = {''Latitude'': lat, ''Longitude'': lng};' + LB +\r\n ' } else if (event) {' + LB +\r\n ' if (event.clientX && event.clientY){' + LB +\r\n ' x = event.clientX;' + LB +\r\n ' y = event.clientY;' + LB +\r\n ' loc = mouseLatLng;' + LB +\r\n ' }' + LB +\r\n ' else{' + LB +\r\n ' if (event.lngLat){' + LB +\r\n ' loc = {''Latitude'': event.lngLat.lat, ''Longitude'': event.lngLat.lng};' + LB +\r\n ' mouseLatLng = loc;' + LB +\r\n ' }' + LB +\r\n ' if (event.point){' + LB +\r\n ' x = event.point.x;' + LB +\r\n ' y = event.point.y;' + LB +\r\n ' }' + LB +\r\n ' }' + LB +\r\n ' }' + LB +\r\n\r\n ' var r = {''Coordinate'': loc, ''X'': x, ''Y'': y, ''ID'': id, ''EventName'': eventname};' + LB +\r\n ' return r;' + LB +\r\n '}' + LB + LB +\r\n\r\n 'function MapMoveStart(event){' + LB +\r\n ' if (activeElement){' + LB +\r\n ' activeElement = null;' + LB +\r\n ' return;' + LB +\r\n ' }' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"MapMoveStart\"));' + LB +\r\n '}' + LB + LB +\r\n 'function MapMoveEnd(event){' + LB +\r\n ' if (activeElement){' + LB +\r\n ' activeElement = null;' + LB +\r\n ' return;' + LB +\r\n ' }' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"MapMoveEnd\"));' + LB +\r\n '}' + LB + LB +\r\n\r\n 'function MapClick(event){' + LB +\r\n ' if (activeElement){' + LB +\r\n ' activeElement = null;' + LB +\r\n ' return;' + LB +\r\n ' }' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"MapClick\"));' + LB +\r\n '}' + LB + LB +\r\n 'function MapDblClick(event){' + LB +\r\n ' if (activeElement){' + LB +\r\n ' activeElement = null;' + LB +\r\n ' return;' + LB +\r\n ' }' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"MapDblClick\"));' + LB +\r\n '}' + LB + LB +\r\n 'function MapMouseDown(event){' + LB +\r\n ' if (activeElement){' + LB +\r\n ' activeElement = null;' + LB +\r\n ' return;' + LB +\r\n ' }' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"MapMouseDown\"));' + LB +\r\n '}' + LB + LB +\r\n 'function MapMouseUp(event){' + LB +\r\n ' if (activeElement){' + LB +\r\n ' activeElement = null;' + LB +\r\n ' return;' + LB +\r\n ' }' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"MapMouseUp\"));' + LB +\r\n '}' + LB + LB +\r\n 'function MapMouseLeave(event){' + LB +\r\n ' if (activeElement){' + LB +\r\n ' activeElement = null;' + LB +\r\n ' return;' + LB +\r\n ' }' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"MapMouseLeave\"));' + LB +\r\n '}' + LB + LB +\r\n 'function MapMouseEnter(event){' + LB +\r\n ' if (activeElement){' + LB +\r\n ' activeElement = null;' + LB +\r\n ' return;' + LB +\r\n ' }' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"MapMousEnter\"));' + LB +\r\n '}' + LB + LB +\r\n 'function MapMouseMove(event){' + LB +\r\n ' if (activeElement){' + LB +\r\n ' activeElement = null;' + LB +\r\n ' return;' + LB +\r\n ' }' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"MapMouseMove\"));' + LB +\r\n '}';\r\nend;\r\n\r\nprocedure TTMSFNCMapsTomTom.GetHeadLinks(const AList: TTMSFNCMapsLinksList);\r\nbegin\r\n AList.Add(TTMSFNCMapsLink.CreateLink(TOMTOMAPIURL + TOMTOMAPIVERSION +'/maps/maps.css', 'text/css', 'stylesheet'));\r\n AList.Add(TTMSFNCMapsLink.CreateScript(TOMTOMAPIURL + TOMTOMAPIVERSION + '/maps/maps-web.min.js'));\r\nend;\r\n\r\nfunction TTMSFNCMapsTomTom.GetHeadStyle: string;\r\nbegin\r\n Result := '';\r\nend;\r\n\r\nfunction TTMSFNCMapsTomTom.GetIdentifier: string;\r\nbegin\r\n Result := 'TomTom';\r\nend;\r\n\r\nfunction TTMSFNCMapsTomTom.GetInitializeCoordinateArray: string;\r\nbegin\r\n Result := '[]';\r\nend;\r\n\r\nfunction TTMSFNCMapsTomTom.GetInitializeHolesArray: string;\r\nbegin\r\n Result := '[]';\r\nend;\r\n\r\nfunction TTMSFNCMapsTomTom.GetInitializeEvents: string;\r\nbegin\r\n Result :=\r\n ' ' + MAPVAR + '.on(''zoomend'', function(){' + LB +\r\n ' console.log(\"zoom changed\");'+\r\n ' ' + GETSENDEVENT + '(parseEvent(null, \"ZoomChanged\"));' + LB +\r\n ' })' + LB + LB +\r\n// ' ' + MAPVAR + '.on(''maptypeid_changed'', function(){' + LB +\r\n// ' ' + GETSENDEVENT + '(parseEvent(null, \"MapTypeChanged\"));' + LB +\r\n// ' })' + LB + LB +\r\n ' ' + MAPVAR + '.off(''movestart'', MapMoveStart);' + LB +\r\n ' ' + MAPVAR + '.on(''movestart'', MapMoveStart);' + LB +\r\n ' ' + MAPVAR + '.off(''moveend'', MapMoveEnd);' + LB +\r\n ' ' + MAPVAR + '.on(''moveend'', MapMoveEnd);' + LB +\r\n ' ' + MAPVAR + '.off(''click'', MapClick);' + LB +\r\n ' ' + MAPVAR + '.on(''click'', MapClick);' + LB +\r\n ' ' + MAPVAR + '.off(''dblclick'', MapDblClick);' + LB +\r\n ' ' + MAPVAR + '.on(''dblclick'', MapDblClick);' + LB +\r\n ' ' + MAPVAR + '.off(''mouseup'', MapMouseUp);' + LB +\r\n ' ' + MAPVAR + '.on(''mouseup'', MapMouseUp);' + LB +\r\n ' ' + MAPVAR + '.off(''mousedown'', MapMouseDown);' + LB +\r\n ' ' + MAPVAR + '.on(''mousedown'', MapMouseDown);' + LB +\r\n ' ' + MAPVAR + '.off(''mouseout'', MapMouseLeave);' + LB +\r\n ' ' + MAPVAR + '.on(''mouseout'', MapMouseLeave);' + LB +\r\n ' ' + MAPVAR + '.off(''mouseover'', MapMouseEnter);' + LB +\r\n ' ' + MAPVAR + '.on(''mouseover'', MapMouseEnter);' + LB +\r\n ' ' + MAPVAR + '.off(''mousemove'', MapMouseMove);' + LB +\r\n ' ' + MAPVAR + '.on(''mousemove'', MapMouseMove);';\r\nend;\r\n\r\nfunction TTMSFNCMapsTomTom.GetInitializeMap: string;\r\nvar\r\n v: string;\r\nbegin\r\n v := MAPSERVICEVAR;\r\n Result :=\r\n ' ' + MAPVAR + ' = ' + v + '.map({' + LB +\r\n ' key: \"' + MapsProperties.GetAPIKey + '\",' + LB +\r\n ' container: \"' + MAPID + '\",' + LB +\r\n ' style: \"' + TOMTOMMAPSTYLE + '\",' + LB +\r\n ' center: [' + MapsProperties.GetDefaultLongitude + ', ' + MapsProperties.GetDefaultLatitude +'],' + LB +\r\n ' zoom: ' + MapsProperties.GetDefaultZoomLevel + LB +\r\n ' });' + LB + LB;\r\n\r\n Result := Result + ' ' + MAPZOOMCONTROLVAR + ' = new ' + MAPSERVICEVAR + '.NavigationControl();' + LB;\r\n\r\n if MapsProperties.GetShowZoomControl then\r\n begin\r\n Result := Result +\r\n ' ' + MAPVAR + '.addControl(' + MAPZOOMCONTROLVAR + ');' + LB +\r\n ' ' + MAPCONTROLARRAYVAR + '.push(' + MAPZOOMCONTROLVAR + ');' + LB + LB;\r\n end;\r\n\r\n if MapsProperties.GetZoomOnDblClick then\r\n begin\r\n Result := Result +\r\n ' ' + MAPVAR + '.doubleClickZoom.enable();' + LB + LB;\r\n end\r\n else\r\n begin\r\n Result := Result +\r\n ' ' + MAPVAR + '.doubleClickZoom.disable();' + LB + LB;\r\n end;\r\n\r\n if MapsProperties.GetZoomOnWheelScroll then\r\n begin\r\n Result := Result +\r\n ' ' + MAPVAR + '.scrollZoom.enable();' + LB + LB;\r\n end\r\n else\r\n begin\r\n Result := Result +\r\n ' ' + MAPVAR + '.scrollZoom.disable();' + LB + LB;\r\n end;\r\n\r\n if MapsProperties.GetPanning then\r\n begin\r\n Result := Result +\r\n ' ' + MAPVAR + '.dragPan.enable();' + LB + LB;\r\n end\r\n else\r\n begin\r\n Result := Result +\r\n ' ' + MAPVAR + '.dragPan.disable();' + LB + LB;\r\n end;\r\n\r\n Result := Result + ' ' + MAPVAR + '.setLanguage(''' + MapsProperties.GetLocale + ''');';\r\nend;\r\n\r\nfunction TTMSFNCMapsTomTom.GetMapsServiceCheck: string;\r\nbegin\r\n Result := '!' + MAPSERVICEVAR;\r\nend;\r\n\r\nfunction TTMSFNCMapsTomTom.GetResetMap: string;\r\nbegin\r\n Result := '';\r\nend;\r\n\r\nfunction TTMSFNCMapsTomTom.GetSetCenterCoordinate: string;\r\nbegin\r\n Result := ' ' + MAPVAR + '.flyTo({duration: 0, center: [' + PARAMSNAME + '[\"Longitude\"],' + PARAMSNAME + '[\"Latitude\"]]});';\r\nend;\r\n\r\nfunction TTMSFNCMapsTomTom.GetSetZoomLevel: string;\r\nbegin\r\n Result := ' ' + MAPVAR + '.setZoom(' + PARAMSNAME + ');';\r\nend;\r\n\r\nfunction TTMSFNCMapsTomTom.GetShowPopup: string;\r\nbegin\r\n Result :=\r\n ' var loc = [' + PARAMSNAME + '[\"Longitude\"], ' + PARAMSNAME + '[\"Latitude\"]]' + LB +\r\n POPUPVAR + ' = new ' + MAPSERVICEVAR + '.Popup({ closeOnClick: true, maxWidth: \"none\", offset: [' + PARAMSNAME + '[\"OffsetX\"], ' + PARAMSNAME + '[\"OffsetY\"]]}).setLngLat(loc).setHTML(' + PARAMSNAME + '[\"Text\"]).addTo(' + MAPVAR + ');';\r\nend;\r\n\r\nfunction TTMSFNCMapsTomTom.GetUpdateOptions: string;\r\nbegin\r\n Result := Result +\r\n ' ' + MAPCONTROLARRAYVAR + '.forEach(removeElement);' + LB +\r\n ' function removeElement(value){' + LB +\r\n ' ' + MAPVAR + '.removeControl(value);' + LB +\r\n ' }' + LB +\r\n ' ' + MAPCONTROLARRAYVAR + ' = [];' + LB + LB;\r\n\r\n Result := Result +\r\n ' if (' + PARAMSNAME + '[\"ShowZoomControl\"]){' + LB +\r\n ' ' + MAPVAR + '.addControl(' + MAPZOOMCONTROLVAR + ');' + LB +\r\n ' ' + MAPCONTROLARRAYVAR + '.push(' + MAPZOOMCONTROLVAR + ');' + LB +\r\n ' }' + LB + LB;\r\n\r\n Result := Result +\r\n ' if (' + PARAMSNAME + '[\"ZoomOnDblClick\"]){' + LB +\r\n ' ' + MAPVAR + '.doubleClickZoom.enable();' + LB +\r\n ' }' + LB +\r\n ' else{' + LB +\r\n ' ' + MAPVAR + '.doubleClickZoom.disable();' + LB +\r\n ' }' + LB + LB;\r\n\r\n Result := Result +\r\n ' if (' + PARAMSNAME + '[\"ZoomOnWheelScroll\"]){' + LB +\r\n ' ' + MAPVAR + '.scrollZoom.enable();' + LB +\r\n ' }' + LB +\r\n ' else{' + LB +\r\n ' ' + MAPVAR + '.scrollZoom.disable();' + LB +\r\n ' }' + LB + LB;\r\n\r\n Result := Result +\r\n ' if (' + PARAMSNAME + '[\"Panning\"]){' + LB +\r\n ' ' + MAPVAR + '.dragPan.enable();' + LB +\r\n ' }' + LB +\r\n ' else{' + LB +\r\n ' ' + MAPVAR + '.dragPan.disable();' + LB +\r\n ' }' + LB + LB;\r\n\r\n Result := Result + ' ' + MAPVAR + '.setLanguage('''' + ' + PARAMSNAME + '[\"Locale\"] + '''');';\r\nend;\r\n\r\nfunction TTMSFNCMapsTomTom.GetZoomToBounds: string;\r\nbegin\r\n Result :=\r\n ' var sw = [' + PARAMSNAME + '[\"SouthWest\"][\"Longitude\"], ' + PARAMSNAME + '[\"SouthWest\"][\"Latitude\"]];' + LB +\r\n ' var ne = [' + PARAMSNAME + '[\"NorthEast\"][\"Longitude\"], ' + PARAMSNAME + '[\"NorthEast\"][\"Latitude\"]];' + LB +\r\n ' ' + MAPVAR + '.fitBounds([sw, ne], {duration: 0});';\r\nend;\r\n\r\nfunction TTMSFNCMapsTomTom.IsValid: Boolean;\r\nbegin\r\n Result := (MapsProperties.GetAPIKey <> '');\r\nend;\r\n\r\nprocedure TTMSFNCMapsTomTom.RemoveScripts;\r\nbegin\r\n {$IFDEF WEBLIB}\r\n asm\r\n if (window.tt){\r\n window.tt = undefined;\r\n }\r\n end;\r\n {$ENDIF}\r\nend;\r\n\r\nend.\r\n\r\n","{********************************************************************}\r\n{ }\r\n{ written by TMS Software }\r\n{ copyright (c) 2020 - 2025 }\r\n{ Email : info@tmssoftware.com }\r\n{ Web : http://www.tmssoftware.com }\r\n{ }\r\n{ The source code is given as is. The author is not responsible }\r\n{ for any possible damage done due to the use of this code. }\r\n{ The complete source code remains property of the author and may }\r\n{ not be distributed, published, given or sold in any form as such. }\r\n{ No parts of the source code can be included in any other component }\r\n{ or application without written authorization of the author. }\r\n{********************************************************************}\r\n\r\nunit WEBLib.TMSFNCMaps.AzureMaps;\r\n\r\n{$I WEBLib.TMSFNCDefines.inc}\r\n\r\n{$IFDEF WEBLIB}\r\n{$DEFINE LCLWEBLIB}\r\n{$ENDIF}\r\n{$IFDEF LCLLIB}\r\n{$DEFINE LCLWEBLIB}\r\n{$ENDIF}\r\n\r\ninterface\r\n\r\nprocedure RegisterAzureMapsService;\r\nprocedure UnRegisterAzureMapsService;\r\n\r\nimplementation\r\n\r\nuses\r\n Classes, Math, DateUtils, Types, SysUtils, WEBLib.TMSFNCMaps, WEBLib.TMSFNCUtils, WEBLib.TMSFNCTypes, WEBLib.TMSFNCMapsCommonTypes\r\n {$IFDEF WEBLIB}\r\n ,Contnrs, Web\r\n {$ENDIF}\r\n {$IFNDEF LCLWEBLIB}\r\n ,Generics.Collections, Generics.Defaults\r\n {$HINTS OFF}\r\n {$IF COMPILERVERSION > 22}\r\n , UITypes\r\n {$IFEND}\r\n {$HINTS ON}\r\n {$ENDIF}\r\n {$IFDEF LCLLIB}\r\n ,fgl\r\n {$ENDIF}\r\n ;\r\n\r\ntype\r\n TTMSFNCMapsAzureMapsService = class;\r\n\r\n TTMSFNCMapsAzureMapsFactoryService = class(TTMSFNCMapsFactoryService, ITMSFNCMapsServiceAzureMaps);\r\n\r\n TTMSFNCMapsAzureMapsService = class(TTMSFNCMapsAzureMapsFactoryService)\r\n protected\r\n function DoCreateMaps: ITMSFNCCustomMaps; override;\r\n end;\r\n\r\ntype\r\n TTMSFNCMapsAzureMaps = class;\r\n\r\n TTMSFNCMapsAzureMaps = class(TTMSFNCCustomMapsInterfacedObject, ITMSFNCCustomMaps)\r\n protected\r\n procedure GetHeadLinks(const AList: TTMSFNCMapsLinksList);\r\n procedure RemoveScripts;\r\n function GetResetMap: string;\r\n function GetShowPopup: string;\r\n function GetClosePopup: string;\r\n function GetHeadStyle: string;\r\n function GetDelayLoadEvent: string;\r\n function GetMapsServiceCheck: string;\r\n function GetIdentifier: string;\r\n function GetInitializeMap: string;\r\n function GetInitializeEvents: string;\r\n function GetAddOrUpdateMarker: string;\r\n function GetDeleteMarker: string;\r\n function GetAddOrUpdatePolyElement: string;\r\n function GetDeletePolyElement: string;\r\n function GetZoomToBounds: string;\r\n function GetGetBounds: string;\r\n function GetSetCenterCoordinate: string;\r\n function GetSetZoomLevel: string;\r\n function GetLatLonToXY: string;\r\n function GetXYToLatLon: string;\r\n function GetGetCenterCoordinate: string;\r\n function GetGetZoomLevel: string;\r\n function GetUpdateOptions: string;\r\n function GetGlobalVariables: string;\r\n function GetAddCoordinateToArray: string;\r\n function GetAddHoleToArray: string;\r\n function GetInitializeCoordinateArray: string;\r\n function GetInitializeHolesArray: string;\r\n function IsValid: Boolean;\r\n procedure DestroyMaps;\r\n public\r\n constructor Create;\r\n destructor Destroy; override;\r\n end;\r\n\r\nvar\r\n MapsService: ITMSFNCMapsServiceAzureMaps;\r\n\r\nconst\r\n AZUREMAPSAPIVERSION = '3';\r\n AZUREMAPSAPIURL = 'https://atlas.microsoft.com/sdk/javascript/mapcontrol/';\r\n MAPSERVICEVAR = 'window.atlas';\r\n MAPZOOMCONTROLVAR = 'mapZoomControl';\r\n MAPMAPTYPECONTROLVAR = 'mapMapTypeControl';\r\n MAPCONTROLARRAYVAR = 'mapControls';\r\n\r\nprocedure RegisterAzureMapsService;\r\nbegin\r\n if not TTMSFNCMapsPlatformServices.Current.SupportsPlatformService(ITMSFNCMapsServiceAzureMaps, IInterface(MapsService)) then\r\n begin\r\n MapsService := TTMSFNCMapsAzureMapsService.Create;\r\n TTMSFNCMapsPlatformServices.Current.AddPlatformService(ITMSFNCMapsServiceAzureMaps, MapsService);\r\n end;\r\nend;\r\n\r\nprocedure UnregisterAzureMapsService;\r\nbegin\r\n TTMSFNCMapsPlatformServices.Current.RemovePlatformService(ITMSFNCMapsServiceAzureMaps);\r\nend;\r\n\r\n{ TTMSFNCMapsAzureMapsService }\r\n\r\nfunction TTMSFNCMapsAzureMapsService.DoCreateMaps: ITMSFNCCustomMaps;\r\nbegin\r\n Result := TTMSFNCMapsAzureMaps.Create;\r\nend;\r\n\r\nconstructor TTMSFNCMapsAzureMaps.Create;\r\nbegin\r\n inherited;\r\nend;\r\n\r\ndestructor TTMSFNCMapsAzureMaps.Destroy;\r\nbegin\r\n inherited;\r\nend;\r\n\r\nprocedure TTMSFNCMapsAzureMaps.DestroyMaps;\r\nbegin\r\n MapsService.DestroyMaps(Self);\r\nend;\r\n\r\nfunction TTMSFNCMapsAzureMaps.GetAddCoordinateToArray: string;\r\nbegin\r\n Result := ' ' + COORDINATEARRAYVAR + '.push([' + PARAMSNAME + '[\"Longitude\"],' + PARAMSNAME + '[\"Latitude\"]]);';\r\nend;\r\n\r\nfunction TTMSFNCMapsAzureMaps.GetAddHoleToArray: string;\r\nbegin\r\n Result := '';\r\nend;\r\n\r\nfunction TTMSFNCMapsAzureMaps.GetAddOrUpdateMarker: string;\r\nbegin\r\n Result :=\r\n ' var popupTemplate = ''
{title}
'';' + LB +\r\n ' var options = {' + LB +\r\n ' visible: ' + PARAMSNAME + '[\"Visible\"],' + LB +\r\n ' position: new ' + MAPSERVICEVAR + '.data.Position(' + PARAMSNAME + '[\"Longitude\"], ' + PARAMSNAME + '[\"Latitude\"]),' + LB +\r\n ' popup: new ' + MAPSERVICEVAR + '.Popup({' + LB +\r\n ' content: popupTemplate.replace(/{title}/g, ' + PARAMSNAME + '[\"Title\"]),' + LB +\r\n ' pixelOffset: [0, -30]' + LB +\r\n ' }),' + LB +\r\n ' }' + LB +\r\n\r\n ' var markericon = ' + CUSTOMDEFAULTMARKERICON + '(' +\r\n PARAMSNAME + '[\"DefaultIcon\"],' + LB +\r\n PARAMSNAME + '[\"IconURL\"]);' + LB +\r\n\r\n ' if (markericon != \"\"){' + LB +\r\n ' mimg = document.createElement(''img'');' +\r\n ' mimg.src = markericon;' +\r\n ' options.htmlContent = mimg;' + LB +\r\n// ' options.htmlContent = ''''' + LB +\r\n ' }' + LB + LB +\r\n\r\n ' if (!' + MARKERVAR + '){' + LB +\r\n ' ' + MARKERVAR + ' = new ' + MAPSERVICEVAR + '.HtmlMarker(options);' + LB +\r\n ' ' + MAPVAR + '.events.add(''click'',' + MARKERVAR + ', function(event){' + LB +\r\n ' if (' + PARAMSNAME + '[\"Title\"]){' + LB +\r\n ' ' + MARKERVAR + '.togglePopup();' + LB +\r\n ' }' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"MarkerClick\", ' + PARAMSNAME + '[\"ID\"]));' + LB +\r\n ' })' + LB + LB +\r\n ' ' + MAPVAR + '.events.add(''dblclick'',' + MARKERVAR + ', function(event){' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"MarkerDblClick\", ' + PARAMSNAME + '[\"ID\"]));' + LB +\r\n ' })' + LB + LB +\r\n ' ' + MAPVAR + '.events.add(''mouseup'',' + MARKERVAR + ', function(event){' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"MarkerMouseUp\", ' + PARAMSNAME + '[\"ID\"]));' + LB +\r\n ' })' + LB + LB +\r\n ' ' + MAPVAR + '.events.add(''mousedown'',' + MARKERVAR + ', function(event){' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"MarkerMouseDown\", ' + PARAMSNAME + '[\"ID\"]));' + LB +\r\n ' })' + LB + LB +\r\n ' ' + MAPVAR + '.events.add(''mouseleave'',' + MARKERVAR + ', function(event){' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"MarkerMouseLeave\", ' + PARAMSNAME + '[\"ID\"]));' + LB +\r\n ' })' + LB + LB +\r\n ' ' + MAPVAR + '.events.add(''mouseover'',' + MARKERVAR + ', function(event){' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"MarkerMouseEnter\", ' + PARAMSNAME + '[\"ID\"]));' + LB +\r\n ' })' + LB + LB +\r\n ' ' + MAPVAR + '.markers.add(' + MARKERVAR + ');' + LB +\r\n ' }else{' + LB +\r\n ' ' + MARKERVAR + '.setOptions(options);' + LB +\r\n ' }';\r\nend;\r\n\r\nfunction TTMSFNCMapsAzureMaps.GetAddOrUpdatePolyElement: string;\r\nbegin\r\n Result :=\r\n ' var c = ' + PARAMSNAME + '[\"$type\"];' + LB +\r\n ' var co = [];' + LB +\r\n ' var pgo, plo;' + LB + LB +\r\n\r\n ' switch(c){' + LB +\r\n ' case \"TTMSFNCMapsRectangle\":' + LB +\r\n ' co.push([' + PARAMSNAME + '[\"Bounds\"][\"SouthWest\"][\"Longitude\"], ' + PARAMSNAME + '[\"Bounds\"][\"NorthEast\"][\"Latitude\"]]);' + LB +\r\n ' co.push([' + PARAMSNAME + '[\"Bounds\"][\"NorthEast\"][\"Longitude\"], ' + PARAMSNAME + '[\"Bounds\"][\"NorthEast\"][\"Latitude\"]]);' + LB +\r\n ' co.push([' + PARAMSNAME + '[\"Bounds\"][\"NorthEast\"][\"Longitude\"], ' + PARAMSNAME + '[\"Bounds\"][\"SouthWest\"][\"Latitude\"]]);' + LB +\r\n ' co.push([' + PARAMSNAME + '[\"Bounds\"][\"SouthWest\"][\"Longitude\"], ' + PARAMSNAME + '[\"Bounds\"][\"SouthWest\"][\"Latitude\"]]);' + LB +\r\n ' co.push([' + PARAMSNAME + '[\"Bounds\"][\"SouthWest\"][\"Longitude\"], ' + PARAMSNAME + '[\"Bounds\"][\"NorthEast\"][\"Latitude\"]]);' + LB +\r\n ' break;' + LB +\r\n ' }' + LB + LB +\r\n\r\n ' switch(c){' + LB +\r\n ' case \"TTMSFNCMapsPolygon\":' + LB +\r\n ' case \"TTMSFNCMapsRectangle\":' + LB +\r\n ' case \"TTMSFNCMapsCircle\":' + LB +\r\n ' pgo = {' + LB +\r\n ' visible: ' + PARAMSNAME + '[\"Visible\"],' + LB +\r\n ' fillColor: toRGBA(' + PARAMSNAME + '[\"FillColor\"], ' + PARAMSNAME + '[\"FillOpacity\"])' + LB +\r\n ' }' + LB +\r\n ' case \"TTMSFNCMapsPolyline\":' + LB +\r\n ' plo = {' + LB +\r\n ' visible: ' + PARAMSNAME + '[\"Visible\"],' + LB +\r\n ' strokeColor: toRGBA(' + PARAMSNAME + '[\"StrokeColor\"], ' + PARAMSNAME + '[\"StrokeOpacity\"]),' + LB +\r\n ' strokeWidth: ' + PARAMSNAME + '[\"StrokeWidth\"]' + LB +\r\n ' }' + LB +\r\n ' break;' + LB +\r\n ' }' + LB + LB +\r\n\r\n ' if (!' + POLYELEMENTVAR + '){' + LB +\r\n ' ' + POLYELEMENTVAR + ' = new ' + MAPSERVICEVAR + '.source.DataSource();' + LB +\r\n ' ' + MAPVAR + '.sources.add(' + POLYELEMENTVAR + ');' + LB +\r\n\r\n ' switch(c){' + LB +\r\n ' case \"TTMSFNCMapsPolyline\":' + LB +\r\n ' ' + POLYELEMENTVAR + '.add(new ' + MAPSERVICEVAR + '.data.LineString(' + COORDINATEARRAYVAR + '));' + LB +\r\n ' break;' + LB +\r\n ' case \"TTMSFNCMapsCircle\":' + LB +\r\n ' ' + POLYELEMENTVAR + '.add(new ' + MAPSERVICEVAR + '.data.Feature(new ' + MAPSERVICEVAR + '.data.Point([' + PARAMSNAME + '[\"Center\"][\"Longitude\"], ' + PARAMSNAME + '[\"Center\"][\"Latitude\"]]), {subType: \"Circle\", radius: ' + PARAMSNAME + '[\"Radius\"]}));' + LB +\r\n ' break;' + LB +\r\n ' case \"TTMSFNCMapsPolygon\":' + LB +\r\n ' ' + POLYELEMENTVAR + '.add(new ' + MAPSERVICEVAR + '.data.Polygon([' + COORDINATEARRAYVAR + ']));' + LB +\r\n ' break;' + LB +\r\n ' case \"TTMSFNCMapsRectangle\":' + LB +\r\n ' ' + POLYELEMENTVAR + '.add(new ' + MAPSERVICEVAR + '.data.Polygon([co]));' + LB +\r\n ' break;' + LB +\r\n ' }' + LB +\r\n\r\n ' switch(c){' + LB +\r\n ' case \"TTMSFNCMapsCircle\":' + LB +\r\n ' case \"TTMSFNCMapsRectangle\":' + LB +\r\n ' case \"TTMSFNCMapsPolygon\":' + LB +\r\n ' var pg = new ' + MAPSERVICEVAR + '.layer.PolygonLayer(' + POLYELEMENTVAR + ', ' + PARAMSNAME + '[\"ID\"] + \"_polygon\", pgo);' + LB +\r\n ' var pl = new ' + MAPSERVICEVAR + '.layer.LineLayer(' + POLYELEMENTVAR + ', ' + PARAMSNAME + '[\"ID\"] + \"_polyline\", plo);' + LB +\r\n ' ' + MAPVAR + '.layers.add(pg);' + LB +\r\n ' case \"TTMSFNCMapsPolyline\":' + LB +\r\n ' var pl = new ' + MAPSERVICEVAR + '.layer.LineLayer(' + POLYELEMENTVAR + ', ' + PARAMSNAME + '[\"ID\"] + \"_polyline\", plo);' + LB +\r\n ' ' + MAPVAR + '.layers.add(pl);' + LB +\r\n ' break;' + LB +\r\n ' }' + LB +\r\n\r\n ' if (pg) {' + LB +\r\n ' ' + MAPVAR + '.events.add(''click'', pg, function(event){' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"PolyElementClick\", ' + PARAMSNAME + '[\"ID\"]));' + LB +\r\n ' })' + LB + LB +\r\n ' ' + MAPVAR + '.events.add(''dblclick'', pg, function(event){' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"PolyElementDblClick\", ' + PARAMSNAME + '[\"ID\"]));' + LB +\r\n ' })' + LB + LB +\r\n ' ' + MAPVAR + '.events.add(''mouseup'', pg, function(event){' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"PolyElementMouseUp\", ' + PARAMSNAME + '[\"ID\"]));' + LB +\r\n ' })' + LB + LB +\r\n ' ' + MAPVAR + '.events.add(''mousedown'', pg, function(event){' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"PolyElementMouseDown\", ' + PARAMSNAME + '[\"ID\"]));' + LB +\r\n ' })' + LB + LB +\r\n ' ' + MAPVAR + '.events.add(''mouseleave'', pg, function(event){' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"PolyElementMouseLeave\", ' + PARAMSNAME + '[\"ID\"]));' + LB +\r\n ' })' + LB + LB +\r\n ' ' + MAPVAR + '.events.add(''mouseover'', pg, function(event){' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"PolyElementMouseEnter\", ' + PARAMSNAME + '[\"ID\"]));' + LB +\r\n ' })' + LB +\r\n ' }' + LB + LB +\r\n\r\n ' if (pl && !pg) {' + LB +\r\n ' ' + MAPVAR + '.events.add(''click'', pl, function(event){' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"PolyElementClick\", ' + PARAMSNAME + '[\"ID\"]));' + LB +\r\n ' })' + LB + LB +\r\n ' ' + MAPVAR + '.events.add(''dblclick'', pl, function(event){' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"PolyElementDblClick\", ' + PARAMSNAME + '[\"ID\"]));' + LB +\r\n ' })' + LB + LB +\r\n ' ' + MAPVAR + '.events.add(''mouseup'', pl, function(event){' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"PolyElementMouseUp\", ' + PARAMSNAME + '[\"ID\"]));' + LB +\r\n ' })' + LB + LB +\r\n ' ' + MAPVAR + '.events.add(''mousedown'', pl, function(event){' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"PolyElementMouseDown\", ' + PARAMSNAME + '[\"ID\"]));' + LB +\r\n ' })' + LB + LB +\r\n ' ' + MAPVAR + '.events.add(''mouseleave'', pl, function(event){' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"PolyElementMouseLeave\", ' + PARAMSNAME + '[\"ID\"]));' + LB +\r\n ' })' + LB + LB +\r\n ' ' + MAPVAR + '.events.add(''mouseover'', pl, function(event){' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"PolyElementMouseEnter\", ' + PARAMSNAME + '[\"ID\"]));' + LB +\r\n ' })' + LB +\r\n ' }' + LB + LB +\r\n\r\n ' }else{' + LB +\r\n ' ' + POLYELEMENTVAR + '.clear();' + LB +\r\n ' switch(c){' + LB +\r\n ' case \"TTMSFNCMapsPolyline\":' + LB +\r\n ' ' + POLYELEMENTVAR + '.add(new ' + MAPSERVICEVAR + '.data.LineString(' + COORDINATEARRAYVAR + '));' + LB +\r\n ' break;' + LB +\r\n ' case \"TTMSFNCMapsCircle\":' + LB +\r\n ' ' + POLYELEMENTVAR + '.add(new ' + MAPSERVICEVAR + '.data.Feature(new ' + MAPSERVICEVAR + '.data.Point([' + PARAMSNAME + '[\"Center\"][\"Longitude\"], ' + PARAMSNAME + '[\"Center\"][\"Latitude\"]]), {subType: \"Circle\", radius: ' + PARAMSNAME + '[\"Radius\"]}));' + LB +\r\n ' break;' + LB +\r\n ' case \"TTMSFNCMapsPolygon\":' + LB +\r\n ' ' + POLYELEMENTVAR + '.add(new ' + MAPSERVICEVAR + '.data.Polygon([' + COORDINATEARRAYVAR + ']));' + LB +\r\n ' break;' + LB +\r\n ' case \"TTMSFNCMapsRectangle\":' + LB +\r\n ' ' + POLYELEMENTVAR + '.add(new ' + MAPSERVICEVAR + '.data.Polygon([co]));' + LB +\r\n ' break;' + LB +\r\n ' }' + LB +\r\n ' var pl = ' + MAPVAR + '.layers.getLayerById(' + PARAMSNAME + '[\"ID\"] + \"_polyline\");' + LB +\r\n ' var pg = ' + MAPVAR + '.layers.getLayerById(' + PARAMSNAME + '[\"ID\"] + \"_polygon\");' + LB +\r\n ' if (pl) {' + LB +\r\n ' pl.setOptions(plo);' + LB +\r\n ' }' + LB +\r\n ' if (pg) {' + LB +\r\n ' pg.setOptions(pgo);' + LB +\r\n ' }' + LB +\r\n ' }';\r\nend;\r\n\r\nfunction TTMSFNCMapsAzureMaps.GetClosePopup: string;\r\nbegin\r\n Result := ' ' + POPUPVAR + '.remove();' + LB +\r\n ' ' + POPUPVAR + ' = null;';\r\nend;\r\n\r\nfunction TTMSFNCMapsAzureMaps.GetDelayLoadEvent: string;\r\nbegin\r\n Result := ' ' + MAPVAR + '.events.add(''ready'', function () {';\r\nend;\r\n\r\nfunction TTMSFNCMapsAzureMaps.GetDeleteMarker: string;\r\nbegin\r\n Result := ' ' + MAPVAR + '.markers.remove(' + MARKERVAR + ');';\r\nend;\r\n\r\nfunction TTMSFNCMapsAzureMaps.GetDeletePolyElement: string;\r\nbegin\r\n Result :=\r\n ' var pl = ' + MAPVAR + '.layers.getLayerById(' + PARAMSNAME + '[\"ID\"] + \"_polyline\");' + LB +\r\n ' var pg = ' + MAPVAR + '.layers.getLayerById(' + PARAMSNAME + '[\"ID\"] + \"_polygon\");' + LB +\r\n ' var s = ' + MAPVAR + '.sources.getById(' + PARAMSNAME + '[\"ID\"]);' + LB +\r\n ' if (pl) {' + LB +\r\n ' ' + MAPVAR + '.layers.remove(' + PARAMSNAME + '[\"ID\"] + \"_polyline\");' + LB +\r\n ' }' + LB +\r\n ' if (pg) {' + LB +\r\n ' ' + MAPVAR + '.layers.remove(' + PARAMSNAME + '[\"ID\"] + \"_polygon\");' + LB +\r\n ' }' + LB +\r\n ' if (s) {' + LB +\r\n ' ' + MAPVAR + '.sources.remove(' + PARAMSNAME + '[\"ID\"]);' + LB +\r\n ' }';\r\nend;\r\n\r\nfunction TTMSFNCMapsAzureMaps.GetGetBounds: string;\r\nbegin\r\n Result :=\r\n ' var loc = ' + MAPVAR + '.getCamera().bounds;' + LB +\r\n ' jsonObj[\"NorthEast\"][\"Latitude\"] = loc[1];' + LB +\r\n ' jsonObj[\"NorthEast\"][\"Longitude\"] = loc[0];' + LB +\r\n ' jsonObj[\"SouthWest\"][\"Latitude\"] = loc[3];' + LB +\r\n ' jsonObj[\"SouthWest\"][\"Longitude\"] = loc[2];';\r\nend;\r\n\r\nfunction TTMSFNCMapsAzureMaps.GetGetCenterCoordinate: string;\r\nbegin\r\n Result :=\r\n ' var loc = ' + MAPVAR + '.getCamera().center;' + LB +\r\n ' jsonObj[\"Latitude\"] = loc[1];' + LB +\r\n ' jsonObj[\"Longitude\"] = loc[0];';\r\nend;\r\n\r\nfunction TTMSFNCMapsAzureMaps.GetLatLonToXY: string;\r\nbegin\r\n Result :=\r\n ' var pos = [parseFloat(' + PARAMSNAME + '[\"Longitude\"]), parseFloat(' + PARAMSNAME + '[\"Latitude\"])];' + LB +\r\n\r\n ' var ts = 512;' + LB +\r\n ' var zo = ' + MAPVAR + '.getCamera().zoom;' + LB +\r\n ' var MinLatitude = -85.05112878;' + LB +\r\n ' var MaxLatitude = 85.05112878;' + LB +\r\n ' var MinLongitude = -180;' + LB +\r\n ' var MaxLongitude = 180;' + LB +\r\n\r\n ' function Clip(n, minValue, maxValue) {' + LB +\r\n ' return Math.min(Math.max(n, minValue), maxValue);' + LB +\r\n ' }' + LB +\r\n\r\n ' function MapSize(zoom, tileSize) {' + LB +\r\n ' return Math.ceil(tileSize * Math.pow(2, zoom));' + LB +\r\n ' }' + LB +\r\n\r\n ' function PositionToGlobalPixel(position, zoom, tileSize) {' + LB +\r\n\r\n ' var latitude = Clip(position[1], MinLatitude, MaxLatitude);' + LB +\r\n ' var longitude = Clip(position[0], MinLongitude, MaxLongitude);' + LB +\r\n\r\n ' var x = (longitude + 180) / 360;' + LB +\r\n ' var sinLatitude = Math.sin(latitude * Math.PI / 180);' + LB +\r\n ' var y = 0.5 - Math.log((1 + sinLatitude) / (1 - sinLatitude)) / (4 * Math.PI);' + LB +\r\n\r\n ' var ms = MapSize(zoom, tileSize);' + LB +\r\n\r\n ' return [' + LB +\r\n ' Clip(x * ms + 0.5, 0, ms - 1),' + LB +\r\n ' Clip(y * ms + 0.5, 0, ms - 1)' + LB +\r\n ' ];' + LB +\r\n ' }' + LB +\r\n\r\n ' var centerPixel = PositionToGlobalPixel(' + MAPVAR + '.getCamera().center, zo, ts);' + LB +\r\n\r\n ' var w = ' + MAPVAR + '.getCanvas().offsetWidth;' + LB +\r\n ' var h = ' + MAPVAR + '.getCanvas().offsetHeight;' + LB +\r\n\r\n ' var topLeftPixel = [' + LB +\r\n ' centerPixel[0] - w / 2,' + LB +\r\n ' centerPixel[1] - h / 2' + LB +\r\n ' ];' + LB +\r\n\r\n ' var transform = (position) => {' + LB +\r\n ' var pixel = PositionToGlobalPixel(position, zo, ts);' + LB +\r\n\r\n ' pixel[0] -= topLeftPixel[0];' + LB +\r\n ' pixel[1] -= topLeftPixel[1];' + LB +\r\n\r\n ' return pixel;' + LB +\r\n ' };' + LB +\r\n\r\n ' var pixel = transform(pos);' + LB +\r\n\r\n ' jsonObj[\"X\"] = parseFloat(pixel[0]);' + LB +\r\n ' jsonObj[\"Y\"] = parseFloat(pixel[1]);';\r\nend;\r\n\r\nfunction TTMSFNCMapsAzureMaps.GetXYToLatLon: string;\r\nbegin\r\n Result := '';\r\nend;\r\n\r\nfunction TTMSFNCMapsAzureMaps.GetGetZoomLevel: string;\r\nbegin\r\n Result := ' var z = ' + MAPVAR + '.getCamera().zoom;';\r\nend;\r\n\r\nfunction TTMSFNCMapsAzureMaps.GetGlobalVariables: string;\r\nbegin\r\n Result :=\r\n 'var ' + MAPZOOMCONTROLVAR + ';' + LB +\r\n 'var ' + MAPMAPTYPECONTROLVAR + ';' + LB +\r\n 'var ' + MAPCONTROLARRAYVAR + ' = [];' + LB +\r\n 'function parseEvent(event, eventname, id = ''''){' + LB +\r\n ' var loc = {''Latitude'': 0, ''Longitude'': 0};' + LB +\r\n ' var x = 0.0;' + LB +\r\n ' var y = 0.0;' + LB +\r\n ' if ((eventname == \"MapMoveStart\") || (eventname == \"MapMoveEnd\")){ ' +\r\n ' var centerpt = ' + MAPVAR + '.getCamera().center;' + LB +\r\n ' loc = {''Latitude'': centerpt[1], ''Longitude'': centerpt[0]};' + LB +\r\n ' } else if (event) {' + LB +\r\n ' if (event.position){' + LB +\r\n ' loc = {''Latitude'': event.position[1], ''Longitude'': event.position[0]};' + LB +\r\n ' }' + LB +\r\n ' if (event.pixel){' + LB +\r\n ' x = event.pixel[0];' + LB +\r\n ' y = event.pixel[1];' + LB +\r\n ' }' + LB +\r\n ' }' + LB +\r\n\r\n ' var r = {''Coordinate'': loc, ''X'': x, ''Y'': y, ''ID'': id, ''EventName'': eventname};' + LB +\r\n ' return r;' + LB +\r\n '}';\r\nend;\r\n\r\nprocedure TTMSFNCMapsAzureMaps.GetHeadLinks(\r\n const AList: TTMSFNCMapsLinksList);\r\nbegin\r\n AList.Add(TTMSFNCMapsLink.CreateLink(AZUREMAPSAPIURL + AZUREMAPSAPIVERSION +'/atlas.min.css', 'text/css', 'stylesheet'));\r\n AList.Add(TTMSFNCMapsLink.CreateScript(AZUREMAPSAPIURL + AZUREMAPSAPIVERSION + '/atlas.min.js'));\r\nend;\r\n\r\nfunction TTMSFNCMapsAzureMaps.GetHeadStyle: string;\r\nbegin\r\n Result :=\r\n '.customInfobox {' + LB +\r\n ' white-space:normal;' + LB +\r\n ' padding: 10px;' + LB +\r\n '}';\r\nend;\r\n\r\nfunction TTMSFNCMapsAzureMaps.GetIdentifier: string;\r\nbegin\r\n Result := 'Azure Maps';\r\nend;\r\n\r\nfunction TTMSFNCMapsAzureMaps.GetInitializeCoordinateArray: string;\r\nbegin\r\n Result := '[]';\r\nend;\r\n\r\nfunction TTMSFNCMapsAzureMaps.GetInitializeHolesArray: string;\r\nbegin\r\n Result := '[]';\r\nend;\r\n\r\nfunction TTMSFNCMapsAzureMaps.GetInitializeEvents: string;\r\nbegin\r\n Result :=\r\n ' ' + MAPVAR + '.events.add(''error'', function(event){' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"Error\", event.error.message));' + LB +\r\n ' })' + LB + LB +\r\n ' ' + MAPVAR + '.events.add(''zoom'', function(){' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(null, \"ZoomChanged\"));' + LB +\r\n ' })' + LB + LB +\r\n ' ' + MAPVAR + '.events.add(''styledata'', function(){' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(null, \"MapTypeChanged\"));' + LB +\r\n ' })' + LB + LB +\r\n ' ' + MAPVAR + '.events.add(''dragstart'', function(event){' + LB +\r\n ' if (event.originalEvent.target.tagName == \"CANVAS\")' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"MapMoveStart\"));' + LB +\r\n ' })' + LB + LB +\r\n ' ' + MAPVAR + '.events.add(''dragend'', function(event){' + LB +\r\n ' if (event.originalEvent.target.tagName == \"CANVAS\")' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"MapMoveEnd\"));' + LB +\r\n ' })' + LB + LB +\r\n ' ' + MAPVAR + '.events.add(''click'', function(event){' + LB +\r\n ' if (event.originalEvent.target.tagName == \"CANVAS\" && ((event.shapes.length > 0 && event.shapes[0].constructor.name == \"gc\") || event.shapes.length == 0))' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"MapClick\"));' + LB +\r\n ' })' + LB + LB +\r\n ' ' + MAPVAR + '.events.add(''dblclick'', function(event){' + LB +\r\n ' if (event.originalEvent.target.tagName == \"CANVAS\" && ((event.shapes.length > 0 && event.shapes[0].constructor.name == \"gc\") || event.shapes.length == 0))' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"MapDblClick\"));' + LB +\r\n ' })' + LB + LB +\r\n ' ' + MAPVAR + '.events.add(''mouseup'', function(event){' + LB +\r\n ' if (event.originalEvent.target.tagName == \"CANVAS\" && ((event.shapes.length > 0 && event.shapes[0].constructor.name == \"gc\") || event.shapes.length == 0))' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"MapMouseUp\"));' + LB +\r\n ' })' + LB + LB +\r\n ' ' + MAPVAR + '.events.add(''mousedown'', function(event){' + LB +\r\n ' if (event.originalEvent.target.tagName == \"CANVAS\" && ((event.shapes.length > 0 && event.shapes[0].constructor.name == \"gc\") || event.shapes.length == 0))' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"MapMouseDown\"));' + LB +\r\n ' })' + LB + LB +\r\n ' ' + MAPVAR + '.events.add(''mouseleave'', function(event){' + LB +\r\n ' if (event.originalEvent.target.tagName == \"CANVAS\" && ((event.shapes.length > 0 && event.shapes[0].constructor.name == \"gc\") || event.shapes.length == 0))' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"MapMouseLeave\"));' + LB +\r\n ' })' + LB + LB +\r\n ' ' + MAPVAR + '.events.add(''mouseover'', function(event){' + LB +\r\n ' if (event.originalEvent.target.tagName == \"CANVAS\")' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"MapMouseEnter\"));' + LB +\r\n ' })' + LB + LB +\r\n ' ' + MAPVAR + '.events.add(''mousemove'', function(event){' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"MapMouseMove\"));' + LB +\r\n ' })';\r\nend;\r\n\r\nfunction TTMSFNCMapsAzureMaps.GetInitializeMap: string;\r\nvar\r\n v: string;\r\nbegin\r\n v := MAPSERVICEVAR;\r\n Result :=\r\n ' ' + MAPVAR + ' = new ' + v + '.Map(\"' + MAPID + '\", {' + LB +\r\n ' language: ''' + MapsProperties.GetLocale(mlmCountry) + ''',' + LB +\r\n ' center: [' + MapsProperties.GetDefaultLongitude + ', ' + MapsProperties.GetDefaultLatitude +'],' + LB +\r\n ' zoom: ' + MapsProperties.GetDefaultZoomLevel + ',' + LB +\r\n ' authOptions: {' + LB +\r\n ' authType: \"subscriptionKey\",' + LB +\r\n ' subscriptionKey: \"' + MapsProperties.GetAPIKey + '\"' + LB +\r\n ' }' + LB +\r\n ' });' + LB + LB;\r\n\r\n Result := Result + ' ' + MAPZOOMCONTROLVAR + ' = new ' + MAPSERVICEVAR + '.control.ZoomControl();' + LB;\r\n Result := Result + ' ' + MAPMAPTYPECONTROLVAR + ' = new ' + MAPSERVICEVAR + '.control.StyleControl({mapStyles: ''all''});' + LB;\r\n\r\n if MapsProperties.GetShowZoomControl then\r\n begin\r\n Result := Result +\r\n ' ' + MAPVAR + '.controls.add(' + MAPZOOMCONTROLVAR + ', {' + LB +\r\n ' position: ''bottom-right''' + LB +\r\n ' });' + LB +\r\n\r\n ' ' + MAPCONTROLARRAYVAR + '.push(' + MAPZOOMCONTROLVAR + ');' + LB + LB;\r\n end;\r\n\r\n if not MapsProperties.GetZoomOnDblClick then\r\n begin\r\n Result := Result +\r\n ' ' + MAPVAR + '.setUserInteraction({dblClickZoomInteraction: false})' + LB + LB;\r\n end;\r\n\r\n if not MapsProperties.GetPanning then\r\n begin\r\n Result := Result +\r\n ' ' + MAPVAR + '.setUserInteraction({dragPanInteraction: false})' + LB + LB;\r\n end;\r\n\r\n if not MapsProperties.GetZoomOnWheelScroll then\r\n begin\r\n Result := Result +\r\n ' ' + MAPVAR + '.setUserInteraction({scrollZoomInteraction: false})' + LB + LB;\r\n end;\r\n\r\n if MapsProperties.GetShowMapTypeControl then\r\n begin\r\n Result := Result +\r\n ' ' + MAPVAR + '.controls.add(' + MAPMAPTYPECONTROLVAR + ', {' + LB +\r\n ' position: ''bottom-right''' + LB +\r\n ' });' + LB +\r\n\r\n ' ' + MAPCONTROLARRAYVAR + '.push(' + MAPMAPTYPECONTROLVAR + ');' + LB + LB;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCMapsAzureMaps.GetMapsServiceCheck: string;\r\nbegin\r\n Result := '!' + MAPSERVICEVAR;\r\nend;\r\n\r\nfunction TTMSFNCMapsAzureMaps.GetResetMap: string;\r\nbegin\r\n Result := '';\r\nend;\r\n\r\nfunction TTMSFNCMapsAzureMaps.GetSetCenterCoordinate: string;\r\nbegin\r\n Result :=\r\n ' ' + MAPVAR + '.setCamera({' + LB +\r\n ' center: [' + PARAMSNAME + '[\"Longitude\"], ' + PARAMSNAME + '[\"Latitude\"]] ' + LB +\r\n ' });';\r\nend;\r\n\r\nfunction TTMSFNCMapsAzureMaps.GetSetZoomLevel: string;\r\nbegin\r\n Result :=\r\n ' ' + MAPVAR + '.setCamera({' + LB +\r\n ' zoom: ' + PARAMSNAME + LB +\r\n ' });';\r\nend;\r\n\r\nfunction TTMSFNCMapsAzureMaps.GetShowPopup: string;\r\nbegin\r\n Result :=\r\n ' var popupTemplate = ''
{text}
'';' + LB +\r\n ' ' + POPUPVAR + ' = new ' + MAPSERVICEVAR + '.Popup({' + LB +\r\n ' pixelOffset: [' + PARAMSNAME + '[\"OffsetX\"], ' + PARAMSNAME + '[\"OffsetY\"]],' + LB +\r\n ' content: popupTemplate.replace(/{text}/g, ' + PARAMSNAME + '[\"Text\"]),' + LB +\r\n ' position: new ' + MAPSERVICEVAR + '.data.Position(' + PARAMSNAME + '[\"Longitude\"], ' + PARAMSNAME + '[\"Latitude\"]),' + LB +\r\n ' });' + LB +\r\n ' ' + MAPVAR + '.events.add(''close'',' + POPUPVAR + ', function(event){' + LB +\r\n ' ' + POPUPVAR + '.remove();' + LB +\r\n ' ' + POPUPVAR + ' = null' + LB +\r\n ' })' + LB + LB +\r\n ' ' + POPUPVAR + '.open(' + MAPVAR + ');';\r\nend;\r\n\r\nfunction TTMSFNCMapsAzureMaps.GetUpdateOptions: string;\r\nbegin\r\n Result := Result +\r\n ' ' + MAPCONTROLARRAYVAR + '.forEach(removeElement);' + LB +\r\n ' function removeElement(value){' + LB +\r\n ' ' + MAPVAR + '.controls.remove([value]);' + LB +\r\n ' }' + LB +\r\n ' ' + MAPCONTROLARRAYVAR + ' = [];' + LB + LB;\r\n\r\n Result := Result +\r\n ' ' + MAPVAR + '.setUserInteraction({dblClickZoomInteraction: ' + PARAMSNAME + '[\"ZoomOnDblClick\"]})' + LB + LB;\r\n\r\n Result := Result +\r\n ' ' + MAPVAR + '.setUserInteraction({dragPanInteraction: ' + PARAMSNAME + '[\"Panning\"]})' + LB + LB;\r\n\r\n Result := Result +\r\n ' ' + MAPVAR + '.setUserInteraction({scrollZoomInteraction: ' + PARAMSNAME + '[\"ZoomOnWheelScroll\"]})' + LB + LB;\r\n\r\n Result := Result +\r\n ' if (' + PARAMSNAME + '[\"ShowZoomControl\"]){' + LB +\r\n ' ' + MAPVAR + '.controls.add(' + MAPZOOMCONTROLVAR + ', {' + LB +\r\n ' position: ''bottom-right''' + LB +\r\n ' });' + LB +\r\n ' ' + MAPCONTROLARRAYVAR + '.push(' + MAPZOOMCONTROLVAR + ');' + LB +\r\n ' }' + LB + LB +\r\n\r\n ' if (' + PARAMSNAME + '[\"ShowMapTypeControl\"]){' + LB +\r\n ' ' + MAPVAR + '.controls.add(' + MAPMAPTYPECONTROLVAR + ', {' + LB +\r\n ' position: ''bottom-right''' + LB +\r\n ' });' + LB +\r\n ' ' + MAPCONTROLARRAYVAR + '.push(' + MAPMAPTYPECONTROLVAR + ');' + LB +\r\n ' }';\r\nend;\r\n\r\nfunction TTMSFNCMapsAzureMaps.GetZoomToBounds: string;\r\nbegin\r\n Result :=\r\n ' ' + MAPVAR + '.setCamera({' + LB +\r\n ' bounds: [' + PARAMSNAME + '[\"SouthWest\"][\"Longitude\"], ' + PARAMSNAME + '[\"SouthWest\"][\"Latitude\"] , ' + PARAMSNAME + '[\"NorthEast\"][\"Longitude\"], ' + PARAMSNAME + '[\"NorthEast\"][\"Latitude\"]], ' + LB +\r\n ' padding: 10' + LB +\r\n ' });';\r\nend;\r\n\r\nfunction TTMSFNCMapsAzureMaps.IsValid: Boolean;\r\nbegin\r\n Result := (MapsProperties.GetAPIKey <> '');\r\nend;\r\n\r\nprocedure TTMSFNCMapsAzureMaps.RemoveScripts;\r\nbegin\r\n {$IFDEF WEBLIB}\r\n asm\r\n if (window.atlas){\r\n window.atlas = undefined;\r\n }\r\n end;\r\n {$ENDIF}\r\nend;\r\n\r\nend.\r\n\r\n","{********************************************************************}\r\n{ }\r\n{ written by TMS Software }\r\n{ copyright (c) 2020 - 2024 }\r\n{ Email : info@tmssoftware.com }\r\n{ Web : http://www.tmssoftware.com }\r\n{ }\r\n{ The source code is given as is. The author is not responsible }\r\n{ for any possible damage done due to the use of this code. }\r\n{ The complete source code remains property of the author and may }\r\n{ not be distributed, published, given or sold in any form as such. }\r\n{ No parts of the source code can be included in any other component }\r\n{ or application without written authorization of the author. }\r\n{********************************************************************}\r\n\r\nunit WEBLib.TMSFNCMaps.OpenLayers;\r\n\r\n{$I WEBLib.TMSFNCDefines.inc}\r\n\r\n{$IFDEF WEBLIB}\r\n{$DEFINE LCLWEBLIB}\r\n{$ENDIF}\r\n{$IFDEF LCLLIB}\r\n{$DEFINE LCLWEBLIB}\r\n{$ENDIF}\r\n\r\ninterface\r\n\r\nconst\r\n OPENLAYERSAPIURL = 'https://cdn.jsdelivr.net/npm/ol@';\r\n\r\n MAPSERVICEVAR = 'window.ol';\r\n MAPSOURCEVAR = '.source.OSM()';\r\n\r\n CLUSTERVAR = 'cluster';\r\n CLUSTERARRAYVAR = 'clusterarray';\r\n GETCLUSTERARRAYVAR = 'get' + CLUSTERARRAYVAR + '()';\r\n ADDORUPDATECLUSTERFUNCTION = 'addOrUpdateCluster';\r\n DELETECLUSTERFUNCTION = 'deleteCluster';\r\n\r\nprocedure RegisterOpenLayersService;\r\nprocedure UnRegisterOpenLayersService;\r\n\r\nimplementation\r\n\r\nuses\r\n Classes, Math, DateUtils, Types, SysUtils, WEBLib.TMSFNCMaps, WEBLib.TMSFNCUtils, WEBLib.TMSFNCTypes, WEBLib.TMSFNCMapsCommonTypes\r\n {$IFDEF WEBLIB}\r\n ,Contnrs, Web\r\n {$ENDIF}\r\n {$IFNDEF LCLWEBLIB}\r\n ,Generics.Collections, Generics.Defaults\r\n {$HINTS OFF}\r\n {$IF COMPILERVERSION > 22}\r\n , UITypes\r\n {$IFEND}\r\n {$HINTS ON}\r\n {$ENDIF}\r\n {$IFDEF LCLLIB}\r\n ,fgl\r\n {$ENDIF}\r\n ;\r\n\r\ntype\r\n TTMSFNCMapsOpenLayersService = class;\r\n\r\n TTMSFNCMapsOpenLayersFactoryService = class(TTMSFNCMapsFactoryService, ITMSFNCMapsServiceOpenLayers);\r\n\r\n TTMSFNCMapsOpenLayersService = class(TTMSFNCMapsOpenLayersFactoryService)\r\n protected\r\n function DoCreateMaps: ITMSFNCCustomMaps; override;\r\n end;\r\n\r\ntype\r\n TTMSFNCMapsOpenLayers = class;\r\n\r\n TTMSFNCMapsOpenLayers = class(TTMSFNCCustomMapsInterfacedObject, ITMSFNCCustomMaps)\r\n protected\r\n procedure GetHeadLinks(const AList: TTMSFNCMapsLinksList);\r\n procedure RemoveScripts;\r\n function GetResetMap: string;\r\n function GetShowPopup: string;\r\n function GetClosePopup: string;\r\n function GetHeadStyle: string;\r\n function GetDelayLoadEvent: string;\r\n function GetMapsServiceCheck: string;\r\n function GetIdentifier: string;\r\n function GetInitializeMap: string;\r\n function GetInitializeEvents: string;\r\n function GetAddOrUpdateMarker: string;\r\n function GetDeleteMarker: string;\r\n function GetAddOrUpdatePolyElement: string;\r\n function GetDeletePolyElement: string;\r\n function GetZoomToBounds: string;\r\n function GetGetBounds: string;\r\n function GetGetCenterCoordinate: string;\r\n function GetGetZoomLevel: string;\r\n function GetLatLonToXY: string;\r\n function GetXYToLatLon: string;\r\n function GetSetCenterCoordinate: string;\r\n function GetSetZoomLevel: string;\r\n function GetUpdateOptions: string;\r\n function GetGlobalVariables: string;\r\n function GetAddCoordinateToArray: string;\r\n function GetAddHoleToArray: string;\r\n function GetInitializeCoordinateArray: string;\r\n function GetInitializeHolesArray: string;\r\n function IsValid: Boolean;\r\n procedure DestroyMaps;\r\n public\r\n constructor Create;\r\n destructor Destroy; override;\r\n end;\r\n\r\nvar\r\n MapsService: ITMSFNCMapsServiceOpenLayers;\r\n\r\nconst\r\n MAPZOOMCONTROLVAR = 'mapZoomControl';\r\n MAPCONTROLARRAYVAR = 'mapControls';\r\n MAPDOUBLECLICK = 'mapDoubleClick';\r\n MAPWHEELZOOM = 'mapWheelZoom';\r\n MAPPANNING = 'mapPanning';\r\n\r\nprocedure RegisterOpenLayersService;\r\nbegin\r\n if not TTMSFNCMapsPlatformServices.Current.SupportsPlatformService(ITMSFNCMapsServiceOpenLayers, IInterface(MapsService)) then\r\n begin\r\n MapsService := TTMSFNCMapsOpenLayersService.Create;\r\n TTMSFNCMapsPlatformServices.Current.AddPlatformService(ITMSFNCMapsServiceOpenLayers, MapsService);\r\n end;\r\nend;\r\n\r\nprocedure UnregisterOpenLayersService;\r\nbegin\r\n TTMSFNCMapsPlatformServices.Current.RemovePlatformService(ITMSFNCMapsServiceOpenLayers);\r\nend;\r\n\r\n{ TTMSFNCMapsOpenLayersService }\r\n\r\nfunction TTMSFNCMapsOpenLayersService.DoCreateMaps: ITMSFNCCustomMaps;\r\nbegin\r\n Result := TTMSFNCMapsOpenLayers.Create;\r\nend;\r\n\r\nconstructor TTMSFNCMapsOpenLayers.Create;\r\nbegin\r\n inherited;\r\nend;\r\n\r\ndestructor TTMSFNCMapsOpenLayers.Destroy;\r\nbegin\r\n inherited;\r\nend;\r\n\r\nprocedure TTMSFNCMapsOpenLayers.DestroyMaps;\r\nbegin\r\n MapsService.DestroyMaps(Self);\r\nend;\r\n\r\nfunction TTMSFNCMapsOpenLayers.GetAddCoordinateToArray: string;\r\nbegin\r\n Result := ' ' + COORDINATEARRAYVAR + '.push([' + PARAMSNAME + '[\"Longitude\"],' + PARAMSNAME + '[\"Latitude\"]]);';\r\nend;\r\n\r\nfunction TTMSFNCMapsOpenLayers.GetAddHoleToArray: string;\r\nbegin\r\n Result := 'var o = ' + HOLEARRAYVAR + '[' + PARAMSNAME + '[0]];' + LB +\r\n 'if (o){' + LB +\r\n ' ' + HOLEARRAYVAR + '[' + PARAMSNAME + '[0]].push([' + PARAMSNAME + '[1][\"Longitude\"], ' + PARAMSNAME + '[1][\"Latitude\"]]);' + LB +\r\n '}else{' + LB +\r\n ' ' + HOLEARRAYVAR + '[' + PARAMSNAME + '[0]] = [[' + PARAMSNAME + '[1][\"Longitude\"], ' + PARAMSNAME + '[1][\"Latitude\"]]];' + LB +\r\n '}';\r\nend;\r\n\r\nfunction TTMSFNCMapsOpenLayers.GetAddOrUpdateMarker: string;\r\nbegin\r\n Result :=\r\n ' var lnlt = ' + MAPSERVICEVAR + '.proj.fromLonLat([' + PARAMSNAME + '[\"Longitude\"], ' + PARAMSNAME + '[\"Latitude\"]]);' + LB +\r\n ' var loc = new ' + MAPSERVICEVAR + '.geom.Point(lnlt);' + LB +\r\n\r\n ' var markericon = ' + CUSTOMDEFAULTMARKERICON + '(' +\r\n PARAMSNAME + '[\"DefaultIcon\"],' + LB +\r\n PARAMSNAME + '[\"IconURL\"]);' + LB +\r\n ' var iconStyle;' + LB +\r\n\r\n ' if (markericon != \"\"){' + LB +\r\n ' iconStyle = new ' + MAPSERVICEVAR + '.style.Style({' + LB +\r\n ' image: new ' + MAPSERVICEVAR + '.style.Icon(({' + LB +\r\n ' anchor: [0.5, 1],' + LB +\r\n ' src: markericon' + LB +\r\n ' }))' + LB +\r\n\r\n ' });' + LB + LB +\r\n ' }' + LB + LB +\r\n\r\n ' if (!' + MARKERVAR + '){' + LB +\r\n ' var f = new ' + MAPSERVICEVAR + '.Feature({' + LB +\r\n ' geometry: loc,' + LB +\r\n ' })' + LB + LB +\r\n\r\n ' f.setId(' + PARAMSNAME + '[\"ID\"].toString());' + LB +\r\n\r\n ' function getFeature(event){' + LB +\r\n ' var feature = ' + MAPVAR + '.forEachFeatureAtPixel(event.pixel,' + LB +\r\n ' function(ft) {' + LB +\r\n ' return ft;' + LB +\r\n ' }, {' + LB +\r\n ' layerFilter: function(layer) {' + LB +\r\n ' var foundlayer = false;' + LB +\r\n ' foundlayer = layer === ' + MARKERVAR + ';' + LB +\r\n\r\n ' if (' + CLUSTERARRAYVAR + ') {' + LB +\r\n ' for (var key in ' + CLUSTERARRAYVAR + ') {' + LB +\r\n ' if (' + CLUSTERARRAYVAR + '.hasOwnProperty(key)) {' + LB +\r\n ' if (layer === ' + CLUSTERARRAYVAR + '[key])' + LB +\r\n ' foundlayer = true;' + LB +\r\n ' }' + LB +\r\n ' }' + LB +\r\n ' }' + LB +\r\n\r\n ' return foundlayer;' + LB +\r\n ' }});' + LB +\r\n\r\n ' if (feature) {' +\r\n ' clusterfeatures = feature.get(\"features\"); ' + LB +\r\n ' if (clusterfeatures) {' + LB +\r\n ' if (clusterfeatures.length == 1){' + LB +\r\n ' if (clusterfeatures[0] === f)' + LB +\r\n ' feature = clusterfeatures[0];' + LB +\r\n ' }' + LB +\r\n ' }' + LB +\r\n ' }' +\r\n\r\n ' return feature;' + LB +\r\n ' }' + LB + LB +\r\n\r\n ' var MarkerPopup = null;' + LB + LB +\r\n\r\n ' var MarkerClick = function(event){' + LB +\r\n ' var ft = getFeature(event);' + LB +\r\n ' if (ft === f && !activeMarker) {' + LB +\r\n ' activeMarker = f;' + LB +\r\n ' if (' + PARAMSNAME + '[\"Title\"] != \"\" && !MarkerPopup){' + LB +\r\n ' var el = document.createElement(''div'');' + LB +\r\n ' var t = ' + PARAMSNAME + '[\"Title\"];' + LB +\r\n ' el.className = \"ol-popup\"' + LB +\r\n ' el.innerHTML = ''
'' + t + ''
''' + LB +\r\n ' MarkerPopup = new ' + MAPSERVICEVAR + '.Overlay({element: el, offset: [0, -50]});' + LB +\r\n ' MarkerPopup.setPosition(activeMarker.getGeometry().getCoordinates());' + LB +\r\n ' ' + MAPVAR + '.addOverlay(MarkerPopup);' + LB +\r\n ' var closer = document.getElementById(''popup-closer-marker'');' + LB +\r\n ' closer.onclick = function() {' + LB +\r\n ' MarkerPopup.setPosition(undefined);' + LB +\r\n ' MarkerPopup = null;' + LB +\r\n ' closer.blur();' + LB +\r\n ' return false;' + LB +\r\n ' };' + LB +\r\n ' }' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"MarkerClick\", ' + PARAMSNAME + '[\"ID\"]));' + LB +\r\n ' }' + LB +\r\n ' }' + LB + LB +\r\n ' ' + MAPVAR + '.on(''click'', MarkerClick);' + LB +\r\n ' var MarkerRightClick = function(event){' + LB +\r\n ' var ft = getFeature(event);' + LB +\r\n ' if (ft === f && !activeMarker) {' + LB +\r\n ' activeMarker = f;' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"MarkerRightClick\", ' + PARAMSNAME + '[\"ID\"]));' + LB +\r\n ' }' + LB +\r\n ' }' + LB + LB +\r\n ' ' + MAPVAR + '.on(''contextmenu'', MarkerRightClick);' + LB +\r\n ' var MarkerDblClick = function(event){' + LB +\r\n ' var ft = getFeature(event);' + LB +\r\n ' if (ft === f && !activeMarker) {' + LB +\r\n ' activeMarker = f;' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"MarkerDblClick\", ' + PARAMSNAME + '[\"ID\"]));' + LB +\r\n ' }' + LB +\r\n ' }' + LB + LB +\r\n ' ' + MAPVAR + '.on(''dblclick'', MarkerDblClick);' + LB +\r\n ' var MarkerMouseUp = function(event){' + LB +\r\n ' var ft = getFeature(event);' + LB +\r\n ' if (ft === f && !activeMarker) {' + LB +\r\n ' activeMarker = f;' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"MarkerMouseUp\", ' + PARAMSNAME + '[\"ID\"]));' + LB +\r\n ' }' + LB +\r\n ' }' + LB + LB +\r\n ' ' + MAPVAR + '.on(''pointerup'', MarkerMouseUp);' + LB +\r\n ' var MarkerMouseDown = function(event){' + LB +\r\n ' var ft = getFeature(event);' + LB +\r\n ' if (ft === f && !activeMarker) {' + LB +\r\n ' activeMarker = f;' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"MarkerMouseDown\", ' + PARAMSNAME + '[\"ID\"]));' + LB +\r\n ' }' + LB +\r\n ' }' + LB + LB +\r\n ' ' + MAPVAR + '.on(''pointerdown'', MarkerMouseDown);' + LB +\r\n ' var MarkerMouseMove = function(event){' + LB +\r\n ' var ft = getFeature(event);' + LB +\r\n ' if (ft && ft === f && ft != hoverFeature) {' + LB +\r\n ' hoverFeature = ft;' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"MarkerMouseEnter\", ' + PARAMSNAME + '[\"ID\"]));' + LB +\r\n ' }' + LB +\r\n ' else if (ft != hoverFeature && hoverFeature === f){' + LB +\r\n ' hoverFeature = null;' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"MarkerMouseLeave\", ' + PARAMSNAME + '[\"ID\"]));' + LB +\r\n ' }' + LB +\r\n ' }' + LB + LB +\r\n ' ' + MAPVAR + '.on(''pointermove'', MarkerMouseMove);' + LB +\r\n\r\n ' f.setStyle(iconStyle);' + LB +\r\n\r\n ' var vectorSource = new ' + MAPSERVICEVAR + '.source.Vector({' + LB +\r\n ' features: [f]' + LB +\r\n ' });' + LB + LB +\r\n\r\n ' ' + MARKERVAR + ' = new ' + MAPSERVICEVAR + '.layer.Vector({' + LB +\r\n ' source: vectorSource, ' + LB +\r\n ' visible: ' + PARAMSNAME + '[\"Visible\"],' + LB +\r\n ' zIndex: 999' + LB +\r\n ' });' + LB + LB +\r\n\r\n ' if (' + PARAMSNAME + '[\"Draggable\"]) {' + LB +\r\n ' const t = new ' + MAPSERVICEVAR + '.interaction.Translate({' + LB +\r\n ' features: new ' + MAPSERVICEVAR + '.Collection([f]),' + LB +\r\n ' })' + LB +\r\n\r\n ' t.on(''translatestart'', e => {' + LB +\r\n ' if (MarkerPopup){' + LB +\r\n ' MarkerPopup.setPosition(undefined);' + LB +\r\n ' MarkerPopup = null;' + LB +\r\n ' }' + LB +\r\n ' })' + LB +\r\n\r\n ' t.on(''translateend'', e => {' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(e, \"MarkerDragEnd\", ' + PARAMSNAME + '[\"ID\"]));' + LB +\r\n ' })' + LB +\r\n\r\n ' ' + MAPVAR + '.addInteraction(t);' + LB +\r\n ' }' + LB + LB +\r\n\r\n ' ' + MARKERVAR + '.MarkerClick = MarkerClick;' + LB +\r\n ' ' + MARKERVAR + '.MarkerDblClick = MarkerDblClick;' + LB +\r\n ' ' + MARKERVAR + '.MarkerMouseUp = MarkerMouseUp;' + LB +\r\n ' ' + MARKERVAR + '.MarkerMouseDown = MarkerMouseDown;' + LB +\r\n ' ' + MARKERVAR + '.MarkerMouseMove = MarkerMouseMove;' + LB +\r\n\r\n ' ' + MAPVAR + '.addLayer(' + MARKERVAR + ');' + LB +\r\n\r\n ' ' + GetInitializeEvents + LB +\r\n ' }else{' + LB +\r\n ' ' + MARKERVAR + '.setVisible(' + PARAMSNAME + '[\"Visible\"]);' + LB +\r\n ' ' + MARKERVAR + '.getSource().getFeatures()[0].setGeometry(loc);' + LB +\r\n ' ' + MARKERVAR + '.getSource().getFeatures()[0].setStyle(iconStyle);' + LB +\r\n ' }';\r\nend;\r\n\r\nfunction TTMSFNCMapsOpenLayers.GetAddOrUpdatePolyElement: string;\r\nbegin\r\n Result :=\r\n ' var c = ' + PARAMSNAME + '[\"$type\"];' + LB +\r\n ' var vectorStyle;' + LB +\r\n ' var labelstyle = null;' + LB +\r\n ' var d;' + LB +\r\n ' var co = [];' + LB +\r\n ' var spot;' +\r\n\r\n ' switch(c){' + LB +\r\n ' case \"TTMSFNCMapsRectangle\":' + LB +\r\n ' case \"TTMSFNCMapsOpenLayersRectangle\":' + LB +\r\n ' co.push([' + PARAMSNAME + '[\"Bounds\"][\"SouthWest\"][\"Longitude\"], ' + PARAMSNAME + '[\"Bounds\"][\"NorthEast\"][\"Latitude\"]]);' + LB +\r\n ' co.push([' + PARAMSNAME + '[\"Bounds\"][\"NorthEast\"][\"Longitude\"], ' + PARAMSNAME + '[\"Bounds\"][\"NorthEast\"][\"Latitude\"]]);' + LB +\r\n ' co.push([' + PARAMSNAME + '[\"Bounds\"][\"NorthEast\"][\"Longitude\"], ' + PARAMSNAME + '[\"Bounds\"][\"SouthWest\"][\"Latitude\"]]);' + LB +\r\n ' co.push([' + PARAMSNAME + '[\"Bounds\"][\"SouthWest\"][\"Longitude\"], ' + PARAMSNAME + '[\"Bounds\"][\"SouthWest\"][\"Latitude\"]]);' + LB +\r\n ' co.push([' + PARAMSNAME + '[\"Bounds\"][\"SouthWest\"][\"Longitude\"], ' + PARAMSNAME + '[\"Bounds\"][\"NorthEast\"][\"Latitude\"]]);' + LB +\r\n ' break;' + LB +\r\n ' case \"TTMSFNCMapsCircle\":' + LB +\r\n ' case \"TTMSFNCOpenLayersCircle\":' + LB +\r\n ' co = createCircle(' + PARAMSNAME + '[\"Center\"], ' + PARAMSNAME + '[\"Radius\"], true);' + LB +\r\n ' break;' + LB +\r\n ' default:' + LB +\r\n ' co = ' + COORDINATEARRAYVAR + ';' + LB +\r\n ' break;' + LB +\r\n ' }' + LB + LB +\r\n\r\n ' switch(c){' + LB +\r\n ' case \"TTMSFNCMapsPolyline\":' + LB +\r\n ' case \"TTMSFNCOpenLayersPolyline\":' + LB +\r\n ' d = new ' + MAPSERVICEVAR + '.geom.LineString(co)' + LB +\r\n ' break;' + LB +\r\n ' case \"TTMSFNCMapsCircle\":' + LB +\r\n ' case \"TTMSFNCOpenLayersCircle\":' + LB +\r\n ' case \"TTMSFNCMapsRectangle\":' + LB +\r\n ' case \"TTMSFNCOpenLayersRectangle\":' + LB +\r\n ' case \"TTMSFNCMapsPolygon\":' + LB +\r\n ' case \"TTMSFNCOpenLayersPolygon\":' + LB +\r\n ' d = new ' + MAPSERVICEVAR + '.geom.Polygon([co])' + LB +\r\n ' for (var key in ' + HOLEARRAYVAR + '){' + LB +\r\n ' let linear_ring = new ' + MAPSERVICEVAR + '.geom.LinearRing(' + HOLEARRAYVAR + '[key]);' + LB +\r\n ' d.appendLinearRing(linear_ring);' + LB +\r\n ' }' + LB +\r\n ' break;' + LB +\r\n ' }' + LB + LB +\r\n\r\n ' if ((' + PARAMSNAME + '.hasOwnProperty(\"Label\"))){ ' + LB +\r\n\r\n ' bgFill = new ' + MAPSERVICEVAR + '.style.Fill({color: toRGBA(' + PARAMSNAME + '[\"Label\"][\"BackgroundColor\"], 1)});' + LB +\r\n ' if (' + PARAMSNAME + '[\"Label\"][\"BackgroundColor\"] == \"gcNull\")' +\r\n ' bgFill = null;' + LB +\r\n\r\n ' bgStroke = new ' + MAPSERVICEVAR + '.style.Stroke({color: toRGBA(' + PARAMSNAME + '[\"Label\"][\"BorderColor\"], 1)});' + LB +\r\n ' if (' + PARAMSNAME + '[\"Label\"][\"BorderColor\"] == \"gcNull\")' +\r\n ' bgStroke = null;' + LB +\r\n\r\n ' labelstyle = '+ LB +\r\n ' new ' + MAPSERVICEVAR + '.style.Text({ ' + LB +\r\n ' fill: new ' + MAPSERVICEVAR + '.style.Fill({color: toRGBA(' + PARAMSNAME + '[\"Label\"][\"FontColor\"], 1)}),' + LB +\r\n ' backgroundFill: bgFill,' + LB +\r\n ' backgroundStroke: bgStroke,' + LB +\r\n ' padding: [' + PARAMSNAME + '[\"Label\"][\"Padding\"] + 2, ' + PARAMSNAME + '[\"Label\"][\"Padding\"], ' + PARAMSNAME + '[\"Label\"][\"Padding\"], ' + PARAMSNAME + '[\"Label\"][\"Padding\"]], ' + LB +\r\n ' placement: \"point\", ' + LB +\r\n ' overflow: true, ' + LB +\r\n ' offsetX: ' + PARAMSNAME + '[\"Label\"][\"OffsetX\"], ' + LB +\r\n ' offsetY: ' + PARAMSNAME + '[\"Label\"][\"OffsetY\"], ' + LB +\r\n ' font: ' + PARAMSNAME + '[\"Label\"][\"FontSize\"] + \"px sans-serif\", ' +\r\n ' text: ' + PARAMSNAME + '[\"Label\"][\"Text\"]' + LB +\r\n ' });' + LB +\r\n ' }' + LB +\r\n\r\n ' switch(c){' + LB +\r\n ' case \"TTMSFNCMapsPolyline\":' + LB +\r\n ' case \"TTMSFNCOpenLayersPolyline\":' + LB +\r\n ' vectorStyle = new ' + MAPSERVICEVAR + '.style.Style({' + LB +\r\n ' text: labelstyle, '+ LB +\r\n ' stroke: new ' + MAPSERVICEVAR + '.style.Stroke({' + LB +\r\n ' color: toRGBA(' + PARAMSNAME + '[\"StrokeColor\"], ' + PARAMSNAME + '[\"StrokeOpacity\"]),' + LB +\r\n ' width: ' + PARAMSNAME + '[\"StrokeWidth\"]' + LB +\r\n ' }),' + LB +\r\n ' });' + LB +\r\n ' break;' + LB +\r\n ' case \"TTMSFNCMapsCircle\":' + LB +\r\n ' case \"TTMSFNCOpenLayersCircle\":' + LB +\r\n ' case \"TTMSFNCMapsRectangle\":' + LB +\r\n ' case \"TTMSFNCOpenLayersRectangle\":' + LB +\r\n ' case \"TTMSFNCMapsPolygon\":' + LB +\r\n ' case \"TTMSFNCOpenLayersPolygon\":' + LB +\r\n ' vectorStyle = new ' + MAPSERVICEVAR + '.style.Style({' + LB +\r\n ' text: labelstyle, '+ LB +\r\n ' stroke: new ' + MAPSERVICEVAR + '.style.Stroke({' + LB +\r\n ' color: toRGBA(' + PARAMSNAME + '[\"StrokeColor\"], ' + PARAMSNAME + '[\"StrokeOpacity\"]),' + LB +\r\n ' width: ' + PARAMSNAME + '[\"StrokeWidth\"]' + LB +\r\n ' }),' + LB +\r\n ' fill: new ' + MAPSERVICEVAR + '.style.Fill({' + LB +\r\n ' color: toRGBA(' + PARAMSNAME + '[\"FillColor\"], ' + PARAMSNAME + '[\"FillOpacity\"])' + LB +\r\n ' })' + LB +\r\n ' });' + LB +\r\n ' break;' + LB +\r\n ' }' + LB + LB +\r\n\r\n ' if (d) {' + LB +\r\n ' d.transform(''EPSG:4326'', ' + MAPVAR + '.getView().getProjection());' + LB +\r\n ' }' + LB + LB +\r\n\r\n ' if (!' + POLYELEMENTVAR + '){' + LB +\r\n ' var f = new ' + MAPSERVICEVAR + '.Feature({' + LB +\r\n ' geometry: d' + LB +\r\n ' })' + LB + LB +\r\n\r\n ' function getFeature(event){' + LB +\r\n ' var feature = ' + MAPVAR + '.forEachFeatureAtPixel(event.pixel,' + LB +\r\n ' function(ft) {' + LB +\r\n ' return ft;' + LB +\r\n ' }, {' + LB +\r\n ' layerFilter: function(layer) {' + LB +\r\n ' return layer === ' + POLYELEMENTVAR + ';' + LB +\r\n ' }});' + LB +\r\n ' return feature;' + LB +\r\n ' }' + LB + LB +\r\n\r\n ' var PolyElementClick = function(event){' + LB +\r\n ' var ft = getFeature(event);' + LB +\r\n ' if (ft === f && !activePolyElement) {' + LB +\r\n ' activePolyElement = f;' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"PolyElementClick\", ' + PARAMSNAME + '[\"ID\"]));' + LB +\r\n ' }' + LB +\r\n ' }' + LB + LB +\r\n ' ' + MAPVAR + '.on(''click'', PolyElementClick);' + LB +\r\n ' var PolyElementDblClick = function(event){' + LB +\r\n ' var ft = getFeature(event);' + LB +\r\n ' if (ft === f && !activePolyElement) {' + LB +\r\n ' activePolyElement = f;' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"PolyElementDblClick\", ' + PARAMSNAME + '[\"ID\"]));' + LB +\r\n ' }' + LB +\r\n ' }' + LB + LB +\r\n ' ' + MAPVAR + '.on(''dblclick'', PolyElementDblClick);' + LB +\r\n ' var PolyElementMouseUp = function(event){' + LB +\r\n ' var ft = getFeature(event);' + LB +\r\n ' if (ft === f && !activePolyElement) {' + LB +\r\n ' activePolyElement = f;' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"PolyElementMouseUp\", ' + PARAMSNAME + '[\"ID\"]));' + LB +\r\n ' }' + LB +\r\n ' }' + LB + LB +\r\n ' ' + MAPVAR + '.on(''pointerup'', PolyElementMouseUp);' + LB +\r\n ' var PolyElementMouseDown = function(event){' + LB +\r\n ' var ft = getFeature(event);' + LB +\r\n ' if (ft === f && !activePolyElement) {' + LB +\r\n ' activePolyElement = f;' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"PolyElementMouseDown\", ' + PARAMSNAME + '[\"ID\"]));' + LB +\r\n ' }' + LB +\r\n ' }' + LB + LB +\r\n ' ' + MAPVAR + '.on(''pointerdown'', PolyElementMouseDown);' + LB +\r\n ' var PolyElementMouseMove = function(event){' + LB +\r\n ' var ft = getFeature(event);' + LB +\r\n ' if (ft && ft === f && ft != hoverFeature) {' + LB +\r\n ' hoverFeature = ft;' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"PolyElementMouseEnter\", ' + PARAMSNAME + '[\"ID\"]));' + LB +\r\n ' }' + LB +\r\n ' else if (ft != hoverFeature && hoverFeature === f){' + LB +\r\n ' hoverFeature = null;' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"PolyElementMouseLeave\", ' + PARAMSNAME + '[\"ID\"]));' + LB +\r\n ' }' + LB +\r\n ' }' + LB + LB +\r\n ' ' + MAPVAR + '.on(''pointermove'', PolyElementMouseMove);' + LB +\r\n\r\n ' var vectorSource = new ' + MAPSERVICEVAR + '.source.Vector({' + LB +\r\n ' features: [f]' + LB +\r\n ' });' + LB + LB +\r\n\r\n ' ' + POLYELEMENTVAR + ' = new ' + MAPSERVICEVAR + '.layer.Vector({' + LB +\r\n ' source: vectorSource,' + LB +\r\n ' style: vectorStyle,' + LB +\r\n ' visible: ' + PARAMSNAME + '[\"Visible\"]' + LB +\r\n ' });' + LB + LB +\r\n\r\n ' if (' + PARAMSNAME + '[\"Draggable\"]) {' + LB +\r\n ' const t = new ' + MAPSERVICEVAR + '.interaction.Translate({' + LB +\r\n ' features: new ' + MAPSERVICEVAR + '.Collection([f]),' + LB +\r\n ' })' + LB +\r\n\r\n ' t.on(''translateend'', e => {' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(e, \"PolyElementDragEnd\", ' + PARAMSNAME + '[\"ID\"]));' + LB +\r\n ' })' + LB +\r\n\r\n ' ' + MAPVAR + '.addInteraction(t);' + LB +\r\n ' }' + LB + LB +\r\n\r\n ' ' + POLYELEMENTVAR + '.PolyElementClick = PolyElementClick;' + LB +\r\n ' ' + POLYELEMENTVAR + '.PolyElementDblClick = PolyElementDblClick;' + LB +\r\n ' ' + POLYELEMENTVAR + '.PolyElementMouseUp = PolyElementMouseUp;' + LB +\r\n ' ' + POLYELEMENTVAR + '.PolyElementMouseDown = PolyElementMouseDown;' + LB +\r\n ' ' + POLYELEMENTVAR + '.PolyElementMouseMove = PolyElementMouseMove;' + LB +\r\n\r\n ' ' + MAPVAR + '.addLayer(' + POLYELEMENTVAR + ');' + LB +\r\n\r\n ' ' + GetInitializeEvents + LB +\r\n ' }else{' + LB +\r\n ' ' + POLYELEMENTVAR + '.setVisible(' + PARAMSNAME + '[\"Visible\"]);' + LB +\r\n ' ' + POLYELEMENTVAR + '.getSource().getFeatures()[0].setGeometry(d);' + LB +\r\n ' ' + POLYELEMENTVAR + '.setStyle(vectorStyle);' + LB +\r\n ' }';\r\nend;\r\n\r\nfunction TTMSFNCMapsOpenLayers.GetClosePopup: string;\r\nbegin\r\n Result := 'if (' + POPUPVAR + '){' + LB +\r\n ' ' + POPUPVAR + '.setPosition(undefined);' + LB +\r\n ' ' + MAPVAR + '.removeOverlay(' + POPUPVAR + ');' + LB +\r\n ' ' + POPUPVAR + ' = null;' + LB +\r\n '}';\r\nend;\r\n\r\nfunction TTMSFNCMapsOpenLayers.GetDelayLoadEvent: string;\r\nbegin\r\n Result := '';\r\nend;\r\n\r\nfunction TTMSFNCMapsOpenLayers.GetDeleteMarker: string;\r\nbegin\r\n Result := 'if (' + MARKERVAR + '){' + LB;\r\n Result := Result + ' ' + MARKERVAR + '.setSource(null);' + LB;\r\n Result := Result + ' ' + MAPVAR + '.un(''click'', ' + MARKERVAR + '.MarkerClick);' + LB;\r\n// Result := Result + ' ' + MAPVAR + '.un(''contextmenu'', ' + MARKERVAR + '.MarkerRightClick);' + LB;\r\n Result := Result + ' ' + MAPVAR + '.un(''dblclick'', ' + MARKERVAR + '.MarkerDblClick);' + LB;\r\n Result := Result + ' ' + MAPVAR + '.un(''pointerup'', ' + MARKERVAR + '.MarkerMouseUp);' + LB;\r\n Result := Result + ' ' + MAPVAR + '.un(''pointerdown'', ' + MARKERVAR + '.MarkerMouseDown);' + LB;\r\n Result := Result + ' ' + MAPVAR + '.un(''pointermove'', ' + MARKERVAR + '.MarkerMouseMove);';\r\n Result := Result + ' ' + MAPVAR + '.removeLayer(' + MARKERVAR + ');' + LB;\r\n Result := Result + '}'\r\nend;\r\n\r\nfunction TTMSFNCMapsOpenLayers.GetDeletePolyElement: string;\r\nbegin\r\n Result := 'if (' + POLYELEMENTVAR + '){' + LB;\r\n Result := Result + ' ' + POLYELEMENTVAR + '.setSource(null);' + LB;\r\n Result := Result + ' ' + MAPVAR + '.un(''click'', ' + POLYELEMENTVAR + '.PolyElementClick);' + LB;\r\n// Result := Result + ' ' + MAPVAR + '.un(''contextmenu'', ' + POLYELEMENTVAR + '.PolyElementRightClick);' + LB;\r\n Result := Result + ' ' + MAPVAR + '.un(''dblclick'', ' + POLYELEMENTVAR + '.PolyElementDblClick);' + LB;\r\n Result := Result + ' ' + MAPVAR + '.un(''pointerup'', ' + POLYELEMENTVAR + '.PolyElementMouseUp);' + LB;\r\n Result := Result + ' ' + MAPVAR + '.un(''pointerdown'', ' + POLYELEMENTVAR + '.PolyElementMouseDown);' + LB;\r\n Result := Result + ' ' + MAPVAR + '.un(''pointermove'', ' + POLYELEMENTVAR + '.PolyElementMouseMove);';\r\n Result := Result + ' ' + MAPVAR + '.removeLayer(' + POLYELEMENTVAR + ');' + LB;\r\n Result := Result + '}'\r\nend;\r\n\r\nfunction TTMSFNCMapsOpenLayers.GetGetBounds: string;\r\nbegin\r\n Result :=\r\n ' var loc = ' + MAPVAR + '.getView().calculateExtent();' + LB +\r\n ' var l = ' + MAPSERVICEVAR + '.proj.transformExtent(loc, ' + MAPVAR + '.getView().getProjection(), ''EPSG:4326'');' + LB +\r\n ' jsonObj[\"NorthEast\"][\"Latitude\"] = l[3];' + LB +\r\n ' jsonObj[\"NorthEast\"][\"Longitude\"] = l[2];' + LB +\r\n ' jsonObj[\"SouthWest\"][\"Latitude\"] = l[1];' + LB +\r\n ' jsonObj[\"SouthWest\"][\"Longitude\"] = l[0];';\r\nend;\r\n\r\nfunction TTMSFNCMapsOpenLayers.GetGetCenterCoordinate: string;\r\nbegin\r\n Result :=\r\n ' var loc = ' + MAPVAR + '.getView().getCenter();' + LB +\r\n ' var l = ' + MAPSERVICEVAR + '.proj.transform(loc, ' + MAPVAR + '.getView().getProjection(), ''EPSG:4326'');' + LB +\r\n ' jsonObj[\"Latitude\"] = l[1];' + LB +\r\n ' jsonObj[\"Longitude\"] = l[0];';\r\nend;\r\n\r\nfunction TTMSFNCMapsOpenLayers.GetLatLonToXY: string;\r\nbegin\r\n Result :=\r\n ' var coordinate = ' + MAPSERVICEVAR + '.proj.fromLonLat([parseFloat(' + PARAMSNAME + '[\"Longitude\"]), parseFloat(' + PARAMSNAME + '[\"Latitude\"])]);' + LB +\r\n ' var pixel = ' + MAPVAR + '.getPixelFromCoordinate(coordinate);' + LB +\r\n ' jsonObj[\"X\"] = parseFloat(pixel[0]);' + LB +\r\n ' jsonObj[\"Y\"] = parseFloat(pixel[1]);';\r\nend;\r\n\r\nfunction TTMSFNCMapsOpenLayers.GetXYToLatLon: string;\r\nbegin\r\n Result := '';\r\nend;\r\n\r\nfunction TTMSFNCMapsOpenLayers.GetGetZoomLevel: string;\r\nbegin\r\n Result := ' var z = ' + MAPVAR + '.getView().getZoom();';\r\nend;\r\n\r\nfunction TTMSFNCMapsOpenLayers.GetGlobalVariables: string;\r\nbegin\r\n Result :=\r\n 'var activePolyElement = null;' + LB +\r\n 'var activeMarker = null;' + LB +\r\n 'var ' + MAPZOOMCONTROLVAR + ';' + LB +\r\n 'var ' + MAPCONTROLARRAYVAR + ' = [];' +\r\n 'var oldZoom;' + LB +\r\n 'var hoverFeature;' + LB +\r\n 'var mouseLatLng = {''Latitude'': 0, ''Longitude'': 0};' + LB +\r\n 'function parseEvent(event, eventname, id = ''''){' + LB +\r\n ' var loc = {''Latitude'': 0, ''Longitude'': 0};' + LB +\r\n ' var x = 0.0;' + LB +\r\n ' var y = 0.0;' + LB +\r\n ' if ((eventname == \"MapMoveStart\") || (eventname == \"MapMoveEnd\")){ ' +\r\n ' centerpt = ' + MAPVAR + '.getView().getCenter();' + LB +\r\n ' var l = ' + MAPSERVICEVAR + '.proj.transform(centerpt, ' + MAPVAR + '.getView().getProjection(), ''EPSG:4326'');' + LB +\r\n ' loc = {''Latitude'': l[1], ''Longitude'': l[0]};' + LB +\r\n ' } else if (event) {' + LB +\r\n ' if (event.coordinate){' + LB +\r\n ' var l = ' + MAPSERVICEVAR + '.proj.transform(event.coordinate, ' + MAPVAR + '.getView().getProjection(), ''EPSG:4326'');' + LB +\r\n ' loc = {''Latitude'': l[1], ''Longitude'': l[0]};' + LB +\r\n ' mouseLatLng = loc;' + LB +\r\n ' }' + LB +\r\n ' if (event.pixel){' + LB +\r\n ' x = event.pixel[0];' + LB +\r\n ' y = event.pixel[1];' + LB +\r\n ' }' + LB +\r\n ' }' + LB +\r\n\r\n ' var r = {''Coordinate'': loc, ''X'': x, ''Y'': y, ''ID'': id, ''EventName'': eventname};' + LB +\r\n ' return r;' + LB +\r\n '}' + LB + LB +\r\n\r\n\r\n 'function ResetActive(){' + LB +\r\n ' if (activeMarker){' + LB +\r\n ' activeMarker = null;' + LB +\r\n ' return true;' + LB +\r\n ' }' + LB +\r\n ' if (activePolyElement){' + LB +\r\n ' activePolyElement = null;' + LB +\r\n ' return true;' + LB +\r\n ' }' + LB +\r\n ' return false;' + LB +\r\n '}' + LB + LB +\r\n\r\n 'function MapMoveStart(event){' + LB +\r\n ' if (ResetActive()){' + LB +\r\n ' return;' + LB +\r\n ' }' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"MapMoveStart\"));' + LB +\r\n '}' + LB + LB +\r\n 'function MapMoveEnd(event){' + LB +\r\n ' if (ResetActive()){' + LB +\r\n ' return;' + LB +\r\n ' }' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"MapMoveEnd\"));' + LB +\r\n\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"MapCenterChanged\"));' + LB +\r\n ' if (' + MAPVAR + '){' + LB +\r\n ' if (!oldZoom){' + LB +\r\n ' oldZoom = ' + MAPVAR + '.getView().getZoom();' + LB +\r\n ' }' + LB +\r\n ' var newZoom = ' + MAPVAR + '.getView().getZoom();' + LB +\r\n ' if(newZoom != oldZoom){' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(null, \"ZoomChanged\"));' + LB +\r\n ' }' + LB +\r\n ' oldZoom = newZoom;' + LB +\r\n ' }' + LB +\r\n\r\n '}' + LB + LB +\r\n 'function MapClick(event){' + LB +\r\n ' if (ResetActive()){' + LB +\r\n ' return;' + LB +\r\n ' }' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"MapClick\"));' + LB +\r\n '}' + LB + LB +\r\n 'function MapRightClick(event){' + LB +\r\n ' if (ResetActive()){' + LB +\r\n ' return;' + LB +\r\n ' }' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"MapRightClick\"));' + LB +\r\n '}' + LB + LB +\r\n 'function MapDblClick(event){' + LB +\r\n ' if (ResetActive()){' + LB +\r\n ' return;' + LB +\r\n ' }' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"MapDblClick\"));' + LB +\r\n '}' + LB + LB +\r\n 'function MapMouseDown(event){' + LB +\r\n ' if (ResetActive()){' + LB +\r\n ' return;' + LB +\r\n ' }' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"MapMouseDown\"));' + LB +\r\n '}' + LB + LB +\r\n 'function MapMouseUp(event){' + LB +\r\n ' if (ResetActive()){' + LB +\r\n ' return;' + LB +\r\n ' }' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"MapMouseUp\"));' + LB +\r\n '}' + LB + LB +\r\n 'function MapMouseLeave(event){' + LB +\r\n ' if (ResetActive()){' + LB +\r\n ' return;' + LB +\r\n ' }' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"MapMouseLeave\"));' + LB +\r\n '}' + LB + LB +\r\n 'function MapMouseEnter(event){' + LB +\r\n ' if (ResetActive()){' + LB +\r\n ' return;' + LB +\r\n ' }' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"MapMousEnter\"));' + LB +\r\n '}' + LB + LB +\r\n 'function MapMouseMove(event){' + LB +\r\n ' if (ResetActive()){' + LB +\r\n ' return;' + LB +\r\n ' }' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"MapMouseMove\"));' + LB +\r\n '}' + LB + LB +\r\n 'function MapRenderComplete(event){' + LB +\r\n ' if (ResetActive()){' + LB +\r\n ' return;' + LB +\r\n ' }' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"MapRenderComplete\"));' + LB +\r\n '}' + LB;\r\n\r\n Result := Result +\r\n 'var ' + CLUSTERVAR + ';' + LB +\r\n 'var ' + CLUSTERARRAYVAR + ' = {};' + LB +\r\n 'function ' + GETCLUSTERARRAYVAR + '{' + LB +\r\n ' var arr = [];' + LB +\r\n ' for (var key in ' + CLUSTERARRAYVAR + '){' + LB +\r\n ' var v = key;' + LB +\r\n ' arr.push(v);' + LB +\r\n ' }' + LB +\r\n ' return arr.toString();' + LB +\r\n '}';\r\nend;\r\n\r\nprocedure TTMSFNCMapsOpenLayers.GetHeadLinks(\r\n const AList: TTMSFNCMapsLinksList);\r\nvar\r\n APIVersion: string;\r\nbegin\r\n// OPENLAYERSAPIVERSION = 'v7.5.2';\r\n// OPENLAYERSAPIVERSION = 'v8.1.0';\r\n// OPENLAYERSAPIVERSION = 'v10.2.1';\r\n\r\n if MapsProperties.GetAPIVersion = '' then\r\n APIVersion := 'v10.2.1'\r\n else\r\n APIVersion := MapsProperties.GetAPIVersion;\r\n\r\n// AList.Add(TTMSFNCMapsLink.CreateLink(OPENLAYERSAPIURL + APIVersion + '/css/ol.css', 'text/css', 'stylesheet'));\r\n// AList.Add(TTMSFNCMapsLink.CreateScript(OPENLAYERSAPIURL + APIVersion + '/build/ol.js', 'text/javascript'));\r\n\r\n //v8\r\n AList.Add(TTMSFNCMapsLink.CreateLink(OPENLAYERSAPIURL + APIVersion + '/ol.css', 'text/css', 'stylesheet'));\r\n AList.Add(TTMSFNCMapsLink.CreateScript(OPENLAYERSAPIURL + APIVersion + '/dist/ol.js', 'text/javascript'));\r\nend;\r\n\r\nfunction TTMSFNCMapsOpenLayers.GetHeadStyle: string;\r\nbegin\r\n Result := '.ol-popup {' + LB +\r\n ' position: absolute;' + LB +\r\n ' background-color: white;' + LB +\r\n ' box-shadow: 0 1px 4px rgba(0,0,0,0.2);' + LB +\r\n ' padding: 15px;' + LB +\r\n ' border-radius: 10px;' + LB +\r\n ' border: 1px solid #cccccc;' + LB +\r\n ' bottom: 12px;' + LB +\r\n ' left: -50px;' + LB +\r\n ' min-width: 100px;' + LB +\r\n '}' + LB +\r\n '.ol-popup:after, .ol-popup:before {' + LB +\r\n ' top: 100%;' + LB +\r\n ' border: solid transparent;' + LB +\r\n ' content: \" \";' + LB +\r\n ' height: 0;' + LB +\r\n ' width: 0;' + LB +\r\n ' position: absolute;' + LB +\r\n ' pointer-events: none;' + LB +\r\n '}' + LB +\r\n '.ol-popup:after {' + LB +\r\n ' border-top-color: white;' + LB +\r\n ' border-width: 10px;' + LB +\r\n ' left: 48px;' + LB +\r\n ' margin-left: -10px;' + LB +\r\n '}' + LB +\r\n '.ol-popup:before {' + LB +\r\n ' border-top-color: #cccccc;' + LB +\r\n ' border-width: 11px;' + LB +\r\n ' left: 48px;' + LB +\r\n ' margin-left: -11px;' + LB +\r\n '}' + LB +\r\n '.ol-popup-closer {' + LB +\r\n ' text-decoration: none;' + LB +\r\n ' position: absolute;' + LB +\r\n ' top: 2px;' + LB +\r\n ' right: 8px;' + LB +\r\n '}' + LB +\r\n '.ol-popup-closer:after {' + LB +\r\n ' content: \"✖\";' + LB +\r\n '}';\r\nend;\r\n\r\nfunction TTMSFNCMapsOpenLayers.GetIdentifier: string;\r\nbegin\r\n Result := 'OpenLayers';\r\nend;\r\n\r\nfunction TTMSFNCMapsOpenLayers.GetInitializeCoordinateArray: string;\r\nbegin\r\n Result := '[]';\r\nend;\r\n\r\nfunction TTMSFNCMapsOpenLayers.GetInitializeHolesArray: string;\r\nbegin\r\n Result := '[]';\r\nend;\r\n\r\nfunction TTMSFNCMapsOpenLayers.GetInitializeEvents: string;\r\nbegin\r\n Result :=\r\n ' ' + MAPVAR + '.addEventListener(''rendercomplete'', MapRenderComplete);' + LB +\r\n ' ' + MAPVAR + '.addEventListener(''error'', function(){' + LB +\r\n ' console.log(\"openlayers map error\");' + LB +\r\n ' })' + LB + LB +\r\n// ' ' + MAPVAR + '.on(''maptypeid_changed'', function(){' + LB +\r\n// ' ' + GETSENDEVENT + '(parseEvent(null, \"MapTypeChanged\"));' + LB +\r\n// ' })' + LB + LB +\r\n ' ' + MAPVAR + '.un(''movestart'', MapMoveStart);' + LB +\r\n ' ' + MAPVAR + '.on(''movestart'', MapMoveStart);' + LB +\r\n ' ' + MAPVAR + '.un(''moveend'', MapMoveEnd);' + LB +\r\n ' ' + MAPVAR + '.on(''moveend'', MapMoveEnd);' + LB +\r\n ' ' + MAPVAR + '.un(''click'', MapClick);' + LB +\r\n ' ' + MAPVAR + '.on(''click'', MapClick);' + LB +\r\n ' ' + MAPVAR + '.un(''contextmenu'', MapRightClick);' + LB +\r\n ' ' + MAPVAR + '.on(''contextmenu'', MapRightClick);' + LB +\r\n ' ' + MAPVAR + '.un(''dblclick'', MapDblClick);' + LB +\r\n ' ' + MAPVAR + '.on(''dblclick'', MapDblClick);' + LB +\r\n ' ' + MAPVAR + '.un(''pointerup'', MapMouseUp);' + LB +\r\n ' ' + MAPVAR + '.on(''pointerup'', MapMouseUp);' + LB +\r\n ' ' + MAPVAR + '.un(''pointerdown'', MapMouseDown);' + LB +\r\n ' ' + MAPVAR + '.on(''pointerdown'', MapMouseDown);' + LB +\r\n ' ' + MAPVAR + '.un(''pointermove'', MapMouseMove);' + LB +\r\n ' ' + MAPVAR + '.on(''pointermove'', MapMouseMove);';\r\nend;\r\n\r\nfunction TTMSFNCMapsOpenLayers.GetInitializeMap: string;\r\nbegin\r\n Result :=\r\n ' var int;' + LB +\r\n ' ' + MAPDOUBLECLICK + ' = new ' + MAPSERVICEVAR + '.interaction.DoubleClickZoom();' + LB +\r\n ' ' + MAPPANNING + ' = new ' + MAPSERVICEVAR + '.interaction.DragPan();' + LB +\r\n ' ' + MAPWHEELZOOM + ' = new ' + MAPSERVICEVAR + '.interaction.MouseWheelZoom();' + LB;\r\n\r\n// Result := Result + ' int = ' + MAPSERVICEVAR + '.interaction.defaults({doubleClickZoom: false, dragPan: false, mouseWheelZoom: false}).extend([' + MAPDOUBLECLICK + ', ' + MAPPANNING + ', ' + MAPWHEELZOOM + '])' + LB;\r\n\r\n //v8\r\n Result := Result + ' int = ' + MAPSERVICEVAR + '.interaction.defaults.defaults({doubleClickZoom: false, dragPan: false, mouseWheelZoom: false}).extend([' + MAPDOUBLECLICK + ', ' + MAPPANNING + ', ' + MAPWHEELZOOM + '])' + LB;\r\n\r\n Result := Result +\r\n ' ' + MAPVAR + ' = new ' + MAPSERVICEVAR + '.Map({' + LB +\r\n ' interactions: int,' + LB +\r\n ' target: \"' + MAPID +'\",' + LB +\r\n ' layers: [' + LB +\r\n ' new ' + MAPSERVICEVAR + '.layer.Tile({' + LB +\r\n ' source: new ' + MAPSERVICEVAR + MAPSOURCEVAR + LB +\r\n ' })' + LB +\r\n ' ],' + LB +\r\n ' view: new ' + MAPSERVICEVAR + '.View({' + LB +\r\n ' center: ' + MAPSERVICEVAR + '.proj.fromLonLat([' + MapsProperties.GetDefaultLongitude + ', ' + MapsProperties.GetDefaultLatitude + ']),' + LB +\r\n ' zoom: ' + MapsProperties.GetDefaultZoomLevel + LB +\r\n ' }),' + LB +\r\n ' controls:[]' + LB +\r\n ' });' + LB + LB;\r\n\r\n Result := Result + ' ' + MAPZOOMCONTROLVAR + ' = new ' + MAPSERVICEVAR + '.control.Zoom();' + LB;\r\n\r\n if MapsProperties.GetShowZoomControl then\r\n begin\r\n Result := Result +\r\n ' ' + MAPVAR + '.addControl(' + MAPZOOMCONTROLVAR + ');' + LB +\r\n ' ' + MAPCONTROLARRAYVAR + '.push(' + MAPZOOMCONTROLVAR + ');' + LB + LB;\r\n end;\r\n\r\n if not MapsProperties.GetZoomOnDblClick then\r\n begin\r\n Result := Result +\r\n ' ' + MAPDOUBLECLICK + '.setActive(false);' + LB + LB;\r\n end\r\n else\r\n begin\r\n Result := Result +\r\n ' ' + MAPDOUBLECLICK + '.setActive(true);' + LB + LB\r\n end;\r\n\r\n if not MapsProperties.GetZoomOnWheelScroll then\r\n begin\r\n Result := Result +\r\n ' ' + MAPWHEELZOOM + '.setActive(false);' + LB + LB;\r\n end\r\n else\r\n begin\r\n Result := Result +\r\n ' ' + MAPWHEELZOOM + '.setActive(true);' + LB + LB\r\n end;\r\n\r\n if not MapsProperties.GetPanning then\r\n begin\r\n Result := Result +\r\n ' ' + MAPPANNING + '.setActive(false);' + LB + LB;\r\n end\r\n else\r\n begin\r\n Result := Result +\r\n ' ' + MAPPANNING + '.setActive(true);' + LB + LB\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCMapsOpenLayers.GetMapsServiceCheck: string;\r\nbegin\r\n Result := '!' + MAPSERVICEVAR;\r\nend;\r\n\r\nfunction TTMSFNCMapsOpenLayers.GetResetMap: string;\r\nbegin\r\n\r\nend;\r\n\r\nfunction TTMSFNCMapsOpenLayers.GetSetCenterCoordinate: string;\r\nbegin\r\n Result := ' ' + MAPVAR + '.getView().setCenter(' + MAPSERVICEVAR + '.proj.fromLonLat([' + PARAMSNAME + '[\"Longitude\"], ' + PARAMSNAME + '[\"Latitude\"]]));';\r\nend;\r\n\r\nfunction TTMSFNCMapsOpenLayers.GetSetZoomLevel: string;\r\nbegin\r\n Result := ' ' + MAPVAR + '.getView().setZoom(' + PARAMSNAME + ');';\r\nend;\r\n\r\nfunction TTMSFNCMapsOpenLayers.GetShowPopup: string;\r\nbegin\r\n Result :=\r\n ' var lnlt = ' + MAPSERVICEVAR + '.proj.fromLonLat([' + PARAMSNAME + '[\"Longitude\"], ' + PARAMSNAME + '[\"Latitude\"]]);' + LB +\r\n ' var el = document.createElement(''div'');' + LB +\r\n ' var t = ' + PARAMSNAME + '[\"Text\"];' + LB +\r\n ' el.className = \"ol-popup\"' + LB +\r\n ' el.innerHTML = ''
'' + t + ''
''' + LB +\r\n ' ' + POPUPVAR + ' = new ' + MAPSERVICEVAR + '.Overlay({element: el, autoPan: ' + PARAMSNAME + '[\"PanMap\"], offset: [' + PARAMSNAME + '[\"OffsetX\"], ' + PARAMSNAME + '[\"OffsetY\"]]});' + LB +\r\n ' ' + POPUPVAR + '.setPosition(lnlt);' + LB +\r\n ' ' + MAPVAR + '.addOverlay(' + POPUPVAR + ');' + LB +\r\n ' var closer = document.getElementById(''popup-closer-popup'');' + LB +\r\n ' closer.onclick = function() {' + LB +\r\n ' ' + POPUPVAR + '.setPosition(undefined);' + LB +\r\n ' ' + MAPVAR + '.removeOverlay(' + POPUPVAR + ');' + LB +\r\n ' ' + POPUPVAR + ' = null;' + LB +\r\n ' closer.blur();' + LB +\r\n ' return false;' + LB +\r\n ' };';\r\nend;\r\n\r\nfunction TTMSFNCMapsOpenLayers.GetUpdateOptions: string;\r\nbegin\r\n Result := Result +\r\n ' ' + MAPCONTROLARRAYVAR + '.forEach(removeElement);' + LB +\r\n ' function removeElement(value){' + LB +\r\n ' ' + MAPVAR + '.removeControl(value);' + LB +\r\n ' }' + LB +\r\n ' ' + MAPCONTROLARRAYVAR + ' = [];' + LB + LB;\r\n\r\n Result := Result + ' ' + MAPDOUBLECLICK + '.setActive(' + PARAMSNAME + '[\"ZoomOnDblClick\"]);' + LB + LB;\r\n Result := Result + ' ' + MAPPANNING + '.setActive(' + PARAMSNAME + '[\"Panning\"]);' + LB + LB;\r\n Result := Result + ' ' + MAPWHEELZOOM + '.setActive(' + PARAMSNAME + '[\"ZoomOnWheelScroll\"]);' + LB + LB;\r\n\r\n Result := Result +\r\n ' if (' + PARAMSNAME + '[\"ShowZoomControl\"]){' + LB +\r\n ' ' + MAPVAR + '.addControl(' + MAPZOOMCONTROLVAR + ');' + LB +\r\n ' ' + MAPCONTROLARRAYVAR + '.push(' + MAPZOOMCONTROLVAR + ');' + LB +\r\n ' }';\r\nend;\r\n\r\nfunction TTMSFNCMapsOpenLayers.GetZoomToBounds: string;\r\nbegin\r\n Result := ' ' + MAPVAR + '.getView().fit(' + MAPSERVICEVAR + '.proj.transformExtent([' + PARAMSNAME + '[\"SouthWest\"][\"Longitude\"],' +\r\n PARAMSNAME + '[\"SouthWest\"][\"Latitude\"],' + PARAMSNAME + '[\"NorthEast\"][\"Longitude\"],' + PARAMSNAME + '[\"NorthEast\"][\"Latitude\"]], ''EPSG:4326'', '\r\n + MAPVAR + '.getView().getProjection()), { size: ' + MAPVAR + '.getSize() })';\r\nend;\r\n\r\nfunction TTMSFNCMapsOpenLayers.IsValid: Boolean;\r\nbegin\r\n Result := True;\r\nend;\r\n\r\nprocedure TTMSFNCMapsOpenLayers.RemoveScripts;\r\nbegin\r\n {$IFDEF WEBLIB}\r\n asm\r\n if (window.ol){\r\n window.ol = undefined;\r\n }\r\n end;\r\n {$ENDIF}\r\nend;\r\n\r\nend.\r\n\r\n","{********************************************************************}\r\n{ }\r\n{ written by TMS Software }\r\n{ copyright (c) 2023 - 2025 }\r\n{ Email : info@tmssoftware.com }\r\n{ Web : http://www.tmssoftware.com }\r\n{ }\r\n{ The source code is given as is. The author is not responsible }\r\n{ for any possible damage done due to the use of this code. }\r\n{ The complete source code remains property of the author and may }\r\n{ not be distributed, published, given or sold in any form as such. }\r\n{ No parts of the source code can be included in any other component }\r\n{ or application without written authorization of the author. }\r\n{********************************************************************}\r\n\r\nunit WEBLib.TMSFNCMaps.Leaflet;\r\n\r\n{$I WEBLib.TMSFNCDefines.inc}\r\n\r\n{$IFDEF WEBLIB}\r\n{$DEFINE LCLWEBLIB}\r\n{$ENDIF}\r\n{$IFDEF LCLLIB}\r\n{$DEFINE LCLWEBLIB}\r\n{$ENDIF}\r\n\r\ninterface\r\n\r\nconst\r\n LeafletAPIVERSION = '1.9.4';\r\n LeafletAPIURL = 'https://unpkg.com/leaflet@';\r\n MAPSERVICEVAR = 'window.L';\r\n MAPSOURCEVAR = 'https://tile.openstreetmap.org/{z}/{x}/{y}.png';\r\n MAPBASELAYERVAR = 'baseLayer';\r\n MAPATTRIBUTIONPREFIX = 'Leaflet';\r\n MAPATTRIBUTIONTEXT = '© OpenStreetMap';\r\n\r\n CLUSTERVAR = 'cluster';\r\n CLUSTERARRAYVAR = 'clusterarray';\r\n GETCLUSTERARRAYVAR = 'get' + CLUSTERARRAYVAR + '()';\r\n ADDORUPDATECLUSTERFUNCTION = 'addOrUpdateCluster';\r\n DELETECLUSTERFUNCTION = 'deleteCluster';\r\n\r\nprocedure RegisterLeafletService;\r\nprocedure UnRegisterLeafletService;\r\n\r\nimplementation\r\n\r\nuses\r\n Classes, Math, DateUtils, Types, SysUtils, WEBLib.TMSFNCMaps, WEBLib.TMSFNCUtils, WEBLib.TMSFNCTypes, WEBLib.TMSFNCMapsCommonTypes\r\n {$IFDEF WEBLIB}\r\n ,Contnrs, Web\r\n {$ENDIF}\r\n {$IFNDEF LCLWEBLIB}\r\n ,Generics.Collections, Generics.Defaults\r\n {$HINTS OFF}\r\n {$IF COMPILERVERSION > 22}\r\n , UITypes\r\n {$IFEND}\r\n {$HINTS ON}\r\n {$ENDIF}\r\n {$IFDEF LCLLIB}\r\n ,fgl\r\n {$ENDIF}\r\n ;\r\n\r\ntype\r\n TTMSFNCMapsLeafletService = class;\r\n\r\n TTMSFNCMapsLeafletFactoryService = class(TTMSFNCMapsFactoryService, ITMSFNCMapsServiceLeaflet);\r\n\r\n TTMSFNCMapsLeafletService = class(TTMSFNCMapsLeafletFactoryService)\r\n protected\r\n function DoCreateMaps: ITMSFNCCustomMaps; override;\r\n end;\r\n\r\ntype\r\n TTMSFNCMapsLeaflet = class;\r\n\r\n TTMSFNCMapsLeaflet = class(TTMSFNCCustomMapsInterfacedObject, ITMSFNCCustomMaps)\r\n protected\r\n procedure GetHeadLinks(const AList: TTMSFNCMapsLinksList);\r\n procedure RemoveScripts;\r\n function GetResetMap: string;\r\n function GetShowPopup: string;\r\n function GetClosePopup: string;\r\n function GetHeadStyle: string;\r\n function GetDelayLoadEvent: string;\r\n function GetMapsServiceCheck: string;\r\n function GetIdentifier: string;\r\n function GetInitializeMap: string;\r\n function GetInitializeEvents: string;\r\n function GetAddOrUpdateMarker: string;\r\n function GetDeleteMarker: string;\r\n function GetAddOrUpdatePolyElement: string;\r\n function GetDeletePolyElement: string;\r\n function GetZoomToBounds: string;\r\n function GetGetBounds: string;\r\n function GetGetCenterCoordinate: string;\r\n function GetGetZoomLevel: string;\r\n function GetLatLonToXY: string;\r\n function GetXYToLatLon: string;\r\n function GetSetCenterCoordinate: string;\r\n function GetSetZoomLevel: string;\r\n function GetUpdateOptions: string;\r\n function GetGlobalVariables: string;\r\n function GetAddCoordinateToArray: string;\r\n function GetAddHoleToArray: string;\r\n function GetInitializeCoordinateArray: string;\r\n function GetInitializeHolesArray: string;\r\n function IsValid: Boolean;\r\n procedure DestroyMaps;\r\n public\r\n constructor Create;\r\n destructor Destroy; override;\r\n end;\r\n\r\nvar\r\n MapsService: ITMSFNCMapsServiceLeaflet;\r\n\r\nconst\r\n MAPZOOMCONTROLVAR = 'mapZoomControl';\r\n MAPCONTROLARRAYVAR = 'mapControls';\r\n MAPDOUBLECLICK = 'mapDoubleClick';\r\n MAPWHEELZOOM = 'mapWheelZoom';\r\n MAPPANNING = 'mapPanning';\r\n\r\nprocedure RegisterLeafletService;\r\nbegin\r\n if not TTMSFNCMapsPlatformServices.Current.SupportsPlatformService(ITMSFNCMapsServiceLeaflet, IInterface(MapsService)) then\r\n begin\r\n MapsService := TTMSFNCMapsLeafletService.Create;\r\n TTMSFNCMapsPlatformServices.Current.AddPlatformService(ITMSFNCMapsServiceLeaflet, MapsService);\r\n end;\r\nend;\r\n\r\nprocedure UnregisterLeafletService;\r\nbegin\r\n TTMSFNCMapsPlatformServices.Current.RemovePlatformService(ITMSFNCMapsServiceLeaflet);\r\nend;\r\n\r\n{ TTMSFNCMapsLeafletService }\r\n\r\nfunction TTMSFNCMapsLeafletService.DoCreateMaps: ITMSFNCCustomMaps;\r\nbegin\r\n Result := TTMSFNCMapsLeaflet.Create;\r\nend;\r\n\r\nconstructor TTMSFNCMapsLeaflet.Create;\r\nbegin\r\n inherited;\r\nend;\r\n\r\ndestructor TTMSFNCMapsLeaflet.Destroy;\r\nbegin\r\n inherited;\r\nend;\r\n\r\nprocedure TTMSFNCMapsLeaflet.DestroyMaps;\r\nbegin\r\n MapsService.DestroyMaps(Self);\r\nend;\r\n\r\nfunction TTMSFNCMapsLeaflet.GetAddCoordinateToArray: string;\r\nbegin\r\n Result := ' ' + COORDINATEARRAYVAR + '.push([' + PARAMSNAME + '[\"Latitude\"],' + PARAMSNAME + '[\"Longitude\"]]);';\r\nend;\r\n\r\nfunction TTMSFNCMapsLeaflet.GetAddHoleToArray: string;\r\nbegin\r\n Result := 'var o = ' + HOLEARRAYVAR + '[' + PARAMSNAME + '[0]];' + LB +\r\n 'if (o){' + LB +\r\n ' ' + HOLEARRAYVAR + '[' + PARAMSNAME + '[0]].push([' + PARAMSNAME + '[1][\"Latitude\"], ' + PARAMSNAME + '[1][\"Longitude\"]]);' + LB +\r\n '}else{' + LB +\r\n ' ' + HOLEARRAYVAR + '[' + PARAMSNAME + '[0]] = [[' + PARAMSNAME + '[1][\"Latitude\"], ' + PARAMSNAME + '[1][\"Longitude\"]]];' + LB +\r\n '}';\r\nend;\r\n\r\nfunction TTMSFNCMapsLeaflet.GetAddOrUpdateMarker: string;\r\nbegin\r\n\r\n Result :=\r\n ' var pos = ' + MAPSERVICEVAR + '.latLng([' + PARAMSNAME + '[\"Latitude\"], ' + PARAMSNAME + '[\"Longitude\"]]);' + LB +\r\n ' var ic = null;' + LB +\r\n\r\n ' var markericon = ' + CUSTOMDEFAULTMARKERICON + '(' +\r\n PARAMSNAME + '[\"DefaultIcon\"],' + LB +\r\n PARAMSNAME + '[\"IconURL\"]);' + LB +\r\n\r\n ' if (markericon != \"\"){' + LB +\r\n\r\n ' ic = ' + MAPSERVICEVAR + '.icon({' + LB +\r\n ' iconUrl: markericon,' + LB +\r\n ' className: \"tms_leaflet_iconImage\",' + LB +\r\n// ' iconSize: sz' + LB +\r\n// ' iconAnchor: ac' + LB +\r\n ' });' + LB +\r\n\r\n ' var options = {' + LB +\r\n ' icon: ic,' + LB +\r\n ' title: ' + PARAMSNAME + '[\"Title\"],' + LB +\r\n ' alt: ' + PARAMSNAME + '[\"Title\"],' + LB +\r\n// ' interactive: ' + PARAMSNAME + '[\"Clickable\"],' + LB +\r\n// ' zIndexOffset: ' + PARAMSNAME + '[\"ZIndex\"],' + LB +\r\n ' draggable: ' + PARAMSNAME + '[\"Draggable\"],' + LB +\r\n ' bubblingMouseEvents: false' + LB +\r\n ' }' + LB +\r\n\r\n ' } else {' + LB +\r\n\r\n ' var options = {' + LB +\r\n ' title: ' + PARAMSNAME + '[\"Title\"],' + LB +\r\n ' alt: ' + PARAMSNAME + '[\"Title\"],' + LB +\r\n// ' interactive: ' + PARAMSNAME + '[\"Clickable\"],' + LB +\r\n// ' zIndexOffset: ' + PARAMSNAME + '[\"ZIndex\"],' + LB +\r\n ' draggable: ' + PARAMSNAME + '[\"Draggable\"],' + LB +\r\n ' bubblingMouseEvents: false' + LB +\r\n ' }' + LB +\r\n\r\n ' }' + LB + LB +\r\n\r\n ' if (' + MARKERVAR + ')' + LB +\r\n ' ' + MARKERVAR + '.remove();' + LB +\r\n\r\n// ' if (!' + MARKERVAR + '){' + LB +\r\n ' ' + MARKERVAR + ' = ' + MAPSERVICEVAR + '.marker(pos, options);' + LB +\r\n\r\n ' ' + MARKERVAR + '.on(''click'', function(event){' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"MarkerClick\", ' + PARAMSNAME + '[\"ID\"]));' + LB +\r\n ' })' + LB + LB +\r\n ' ' + MARKERVAR + '.on(''contextmenu'', function(event){' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"MarkerRightClick\", ' + PARAMSNAME + '[\"ID\"]));' + LB +\r\n ' })' + LB + LB +\r\n ' ' + MARKERVAR + '.on(''dblclick'', function(event){' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"MarkerDblClick\", ' + PARAMSNAME + '[\"ID\"]));' + LB +\r\n ' })' + LB + LB +\r\n ' ' + MARKERVAR + '.on(''mouseup'', function(event){' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"MarkerMouseUp\", ' + PARAMSNAME + '[\"ID\"]));' + LB +\r\n ' })' + LB + LB +\r\n ' ' + MARKERVAR + '.on(''mousedown'', function(event){' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"MarkerMouseDown\", ' + PARAMSNAME + '[\"ID\"]));' + LB +\r\n ' })' + LB + LB +\r\n ' ' + MARKERVAR + '.on(''mouseout'', function(event){' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"MarkerMouseLeave\", ' + PARAMSNAME + '[\"ID\"]));' + LB +\r\n ' })' + LB + LB +\r\n ' ' + MARKERVAR + '.on(''mouseover'', function(event){' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"MarkerMouseEnter\", ' + PARAMSNAME + '[\"ID\"]));' + LB +\r\n ' })' + LB + LB +\r\n ' ' + MARKERVAR + '.on(''dragend'', function(event){' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"MarkerDragEnd\", ' + PARAMSNAME + '[\"ID\"]));' + LB +\r\n ' })' + LB + LB +\r\n\r\n// ' } else {' + LB +\r\n// ' ' + MARKERVAR + '.setLatLng(pos);' + LB +\r\n// ' }' + LB +\r\n\r\n ' if (' + PARAMSNAME + '[\"Visible\"]) {' + LB +\r\n ' ' + MARKERVAR + '.addTo(' + MAPVAR + ');' + LB +\r\n ' } else { ' + LB +\r\n ' ' + MARKERVAR + '.remove();' + LB +\r\n ' }';\r\nend;\r\n\r\nfunction TTMSFNCMapsLeaflet.GetAddOrUpdatePolyElement: string;\r\nbegin\r\n\r\n Result :=\r\n ' var c = ' + PARAMSNAME + '[\"$type\"];' + LB +\r\n ' var co = [];' + LB +\r\n\r\n ' switch(c){' + LB +\r\n ' case \"TTMSFNCMapsRectangle\":' + LB +\r\n ' case \"TTMSFNCMapsLeafletRectangle\":' + LB +\r\n ' case \"TTMSFNCMapsCircle\":' + LB +\r\n ' case \"TTMSFNCLeafletCircle\":' + LB +\r\n ' case \"TTMSFNCMapsPolygon\":' + LB +\r\n ' case \"TTMSFNCLeafletPolygon\":' + LB +\r\n ' var options = {' + LB +\r\n ' color: ' + PARAMSNAME + '[\"StrokeColor\"],' + LB +\r\n ' weight: ' + PARAMSNAME + '[\"StrokeWidth\"],' + LB +\r\n ' opacity: ' + PARAMSNAME + '[\"StrokeOpacity\"],' + LB +\r\n ' fill: true,' + LB +\r\n ' fillColor: ' + PARAMSNAME + '[\"FillColor\"],' + LB +\r\n ' fillOpacity: ' + PARAMSNAME + '[\"FillOpacity\"],' + LB +\r\n// ' interactive: ' + PARAMSNAME + '[\"Clickable\"],' + LB +\r\n// ' zIndex: ' + PARAMSNAME + '[\"ZIndex\"],' + LB +\r\n ' radius: ' + PARAMSNAME + '[\"Radius\"],' + LB +\r\n ' bubblingMouseEvents: false' + LB +\r\n ' }' + LB +\r\n ' break;' + LB +\r\n ' default:' + LB +\r\n ' var options = {' + LB +\r\n ' color: ' + PARAMSNAME + '[\"StrokeColor\"],' + LB +\r\n ' weight: ' + PARAMSNAME + '[\"StrokeWidth\"],' + LB +\r\n ' opacity: ' + PARAMSNAME + '[\"StrokeOpacity\"],' + LB +\r\n// ' interactive: ' + PARAMSNAME + '[\"Clickable\"],' + LB +\r\n ' bubblingMouseEvents: false' + LB +\r\n ' }' + LB +\r\n ' break;' + LB +\r\n ' }' + LB + LB +\r\n\r\n ' switch(c){' + LB +\r\n ' case \"TTMSFNCMapsRectangle\":' + LB +\r\n ' case \"TTMSFNCMapsLeafletRectangle\":' + LB +\r\n ' co.push([' + PARAMSNAME + '[\"Bounds\"][\"SouthWest\"][\"Latitude\"], ' + PARAMSNAME + '[\"Bounds\"][\"NorthEast\"][\"Longitude\"]]);' + LB +\r\n ' co.push([' + PARAMSNAME + '[\"Bounds\"][\"NorthEast\"][\"Latitude\"], ' + PARAMSNAME + '[\"Bounds\"][\"NorthEast\"][\"Longitude\"]]);' + LB +\r\n ' co.push([' + PARAMSNAME + '[\"Bounds\"][\"NorthEast\"][\"Latitude\"], ' + PARAMSNAME + '[\"Bounds\"][\"SouthWest\"][\"Longitude\"]]);' + LB +\r\n ' co.push([' + PARAMSNAME + '[\"Bounds\"][\"SouthWest\"][\"Latitude\"], ' + PARAMSNAME + '[\"Bounds\"][\"SouthWest\"][\"Longitude\"]]);' + LB +\r\n ' co.push([' + PARAMSNAME + '[\"Bounds\"][\"SouthWest\"][\"Latitude\"], ' + PARAMSNAME + '[\"Bounds\"][\"NorthEast\"][\"Longitude\"]]);' + LB +\r\n ' break;' + LB +\r\n ' case \"TTMSFNCMapsCircle\":' + LB +\r\n ' case \"TTMSFNCLeafletCircle\":' + LB +\r\n ' co = [' + PARAMSNAME + '[\"Center\"][\"Latitude\"], ' + PARAMSNAME + '[\"Center\"][\"Longitude\"]];' + LB +\r\n ' break;' + LB +\r\n ' default:' + LB +\r\n\r\n ' var pthArr = [];' + LB +\r\n ' pthArr.push(' + COORDINATEARRAYVAR + ');' + LB +\r\n ' for (var key in ' + HOLEARRAYVAR + '){' + LB +\r\n ' pthArr.push(' + HOLEARRAYVAR + '[key]);' + LB +\r\n ' }' + LB +\r\n\r\n ' co = pthArr;' + LB +\r\n ' break;' + LB +\r\n ' }' + LB + LB +\r\n\r\n ' if (' + POLYELEMENTVAR + ')' + LB +\r\n ' ' + POLYELEMENTVAR + '.remove();' + LB +\r\n\r\n// ' if (!' + POLYELEMENTVAR + '){' + LB +\r\n\r\n ' switch(c){' + LB +\r\n ' case \"TTMSFNCMapsRectangle\":' + LB +\r\n ' case \"TTMSFNCMapsLeafletRectangle\":' + LB +\r\n ' ' + POLYELEMENTVAR + ' = ' + MAPSERVICEVAR + '.rectangle(co, options).addTo(' + MAPVAR + ');' + LB +\r\n ' break;' + LB +\r\n ' case \"TTMSFNCMapsCircle\":' + LB +\r\n ' case \"TTMSFNCLeafletCircle\":' + LB +\r\n ' ' + POLYELEMENTVAR + ' = ' + MAPSERVICEVAR + '.circle(co, options).addTo(' + MAPVAR + ');' + LB +\r\n ' break;' + LB +\r\n ' case \"TTMSFNCMapsPolygon\":' + LB +\r\n ' case \"TTMSFNCLeafletPolygon\":' + LB +\r\n ' ' + POLYELEMENTVAR + ' = ' + MAPSERVICEVAR + '.polygon(co, options).addTo(' + MAPVAR + ');' + LB +\r\n ' break;' + LB +\r\n ' default:' + LB +\r\n ' ' + POLYELEMENTVAR + ' = ' + MAPSERVICEVAR + '.polyline(co, options).addTo(' + MAPVAR + ');' + LB +\r\n ' break;' + LB +\r\n ' }' + LB + LB +\r\n\r\n ' ' + POLYELEMENTVAR + '.on(''click'', function(event){' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"PolyElementClick\", ' + PARAMSNAME + '[\"ID\"]));' + LB +\r\n ' })' + LB + LB +\r\n ' ' + POLYELEMENTVAR + '.on(''contextmenu'', function(event){' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"PolyElementRightClick\", ' + PARAMSNAME + '[\"ID\"]));' + LB +\r\n ' })' + LB + LB +\r\n ' ' + POLYELEMENTVAR + '.on(''dblclick'', function(event){' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"PolyElementDblClick\", ' + PARAMSNAME + '[\"ID\"]));' + LB +\r\n ' })' + LB + LB +\r\n ' ' + POLYELEMENTVAR + '.on(''mouseup'', function(event){' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"PolyElementMouseUp\", ' + PARAMSNAME + '[\"ID\"]));' + LB +\r\n ' })' + LB + LB +\r\n ' ' + POLYELEMENTVAR + '.on(''mousedown'', function(event){' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"PolyElementMouseDown\", ' + PARAMSNAME + '[\"ID\"]));' + LB +\r\n ' })' + LB + LB +\r\n ' ' + POLYELEMENTVAR + '.on(''mouseout'', function(event){' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"PolyElementMouseLeave\", ' + PARAMSNAME + '[\"ID\"]));' + LB +\r\n ' })' + LB + LB +\r\n ' ' + POLYELEMENTVAR + '.on(''mouseover'', function(event){' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"PolyElementMouseEnter\", ' + PARAMSNAME + '[\"ID\"]));' + LB +\r\n ' })' + LB + LB +\r\n\r\n// ' } else {' + LB +\r\n//\r\n// ' switch(c){' + LB +\r\n// ' case \"TTMSFNCMapsRectangle\":' + LB +\r\n// ' case \"TTMSFNCMapsLeafletRectangle\":' + LB +\r\n// ' ' + POLYELEMENTVAR + ' = ' + MAPSERVICEVAR + '.setBounds(co);' + LB +\r\n// ' break;' + LB +\r\n// ' case \"TTMSFNCMapsCircle\":' + LB +\r\n// ' case \"TTMSFNCLeafletCircle\":' + LB +\r\n// ' ' + POLYELEMENTVAR + '.setCenter(co);' + LB +\r\n// ' break;' + LB +\r\n// ' default:' + LB +\r\n// ' ' + POLYELEMENTVAR + '.setLatLng(co);' + LB +\r\n// ' break;' + LB +\r\n// ' }' + LB + LB +\r\n//\r\n// ' }' + LB +\r\n\r\n ' if (' + PARAMSNAME + '[\"Visible\"]) {' + LB +\r\n ' ' + POLYELEMENTVAR + '.addTo(' + MAPVAR + ');' + LB +\r\n ' } else { ' + LB +\r\n ' ' + POLYELEMENTVAR + '.remove();' + LB +\r\n ' }';\r\n\r\nend;\r\n\r\nfunction TTMSFNCMapsLeaflet.GetDelayLoadEvent: string;\r\nbegin\r\n Result := '';\r\nend;\r\n\r\nfunction TTMSFNCMapsLeaflet.GetDeleteMarker: string;\r\nbegin\r\n Result := ' ' + MAPVAR + '.removeLayer(' + MARKERVAR + ');' + LB;\r\nend;\r\n\r\nfunction TTMSFNCMapsLeaflet.GetDeletePolyElement: string;\r\nbegin\r\n Result := ' ' + MAPVAR + '.removeLayer(' + POLYELEMENTVAR + ');' + LB;\r\nend;\r\n\r\nfunction TTMSFNCMapsLeaflet.GetGetBounds: string;\r\nbegin\r\n Result :=\r\n ' var loc = ' + MAPVAR + '.getBounds();' + LB +\r\n ' jsonObj[\"NorthEast\"][\"Latitude\"] = loc._northEast.lat;' + LB +\r\n ' jsonObj[\"NorthEast\"][\"Longitude\"] = loc._northEast.lng;' + LB +\r\n ' jsonObj[\"SouthWest\"][\"Latitude\"] = loc._southWest.lat;' + LB +\r\n ' jsonObj[\"SouthWest\"][\"Longitude\"] = loc._southWest.lng;';\r\nend;\r\n\r\nfunction TTMSFNCMapsLeaflet.GetGetCenterCoordinate: string;\r\nbegin\r\n Result :=\r\n ' var loc = ' + MAPVAR + '.getCenter();' + LB +\r\n ' jsonObj[\"Latitude\"] = loc.lat;' + LB +\r\n ' jsonObj[\"Longitude\"] = loc.lng;';\r\nend;\r\n\r\nfunction TTMSFNCMapsLeaflet.GetLatLonToXY: string;\r\nbegin\r\n Result :=\r\n ' var pixel = ' + MAPVAR + '.latLngToContainerPoint([parseFloat(' + PARAMSNAME + '[\"Latitude\"]), parseFloat(' + PARAMSNAME + '[\"Longitude\"])]);' + LB +\r\n ' jsonObj[\"X\"] = parseFloat(pixel.x);' + LB +\r\n ' jsonObj[\"Y\"] = parseFloat(pixel.y);' + LB +\r\n '';\r\nend;\r\n\r\nfunction TTMSFNCMapsLeaflet.GetXYToLatLon: string;\r\nbegin\r\n Result :=\r\n ' var co = ' + MAPVAR + '.containerPointToLatLng([parseInt(' + PARAMSNAME + '[\"X\"]), parseInt(' + PARAMSNAME + '[\"Y\"])]);' + LB +\r\n ' jsonObj[\"Latitude\"] = parseFloat(co.lat);' + LB +\r\n ' jsonObj[\"Longitude\"] = parseFloat(co.lng);' + LB +\r\n '';\r\nend;\r\n\r\nfunction TTMSFNCMapsLeaflet.GetGetZoomLevel: string;\r\nbegin\r\n Result := ' var z = ' + MAPVAR + '.getZoom();';\r\nend;\r\n\r\nfunction TTMSFNCMapsLeaflet.GetGlobalVariables: string;\r\nbegin\r\n Result :=\r\n 'var activePolyElement = null;' + LB +\r\n 'var activeMarker = null;' + LB +\r\n 'var ' + MAPBASELAYERVAR + ';' + LB +\r\n 'var ' + MAPZOOMCONTROLVAR + ';' + LB +\r\n 'var ' + MAPCONTROLARRAYVAR + ' = [];' +\r\n 'var oldZoom;' + LB +\r\n 'var hoverFeature;' + LB +\r\n 'var mouseLatLng = {''Latitude'': 0, ''Longitude'': 0};' + LB +\r\n 'function parseEvent(event, eventname, id = ''''){' + LB +\r\n ' var loc = {''Latitude'': 0, ''Longitude'': 0};' + LB +\r\n ' var x = 0.0;' + LB +\r\n ' var y = 0.0;' + LB +\r\n ' if ((eventname == \"MapMoveStart\") || (eventname == \"MapMoveEnd\")){ ' +\r\n ' centerpt = ' + MAPVAR + '.getCenter();' + LB +\r\n ' loc = {''Latitude'': centerpt.lat, ''Longitude'': centerpt.lng};' + LB +\r\n ' } if (eventname == \"MarkerDragEnd\"){ ' +\r\n ' centerpt = event.target.getLatLng();' + LB +\r\n ' loc = {''Latitude'': centerpt.lat, ''Longitude'': centerpt.lng};' + LB +\r\n ' } else if (event) {' + LB +\r\n ' if (event.latlng) {' + LB +\r\n ' loc = {''Latitude'': event.latlng.lat, ''Longitude'': event.latlng.lng};' + LB +\r\n ' mouseLatLng = loc;' + LB +\r\n ' }' + LB +\r\n ' if (event.layerPoint) {' + LB +\r\n ' x = event.layerPoint.x;' + LB +\r\n ' y = event.layerPoint.y;' + LB +\r\n ' }' + LB +\r\n ' }' + LB +\r\n\r\n ' var r = {''Coordinate'': loc, ''X'': x, ''Y'': y, ''ID'': id, ''EventName'': eventname};' + LB +\r\n ' return r;' + LB +\r\n '}' + LB + LB +\r\n\r\n 'function MapMoveStart(event){' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"MapMoveStart\"));' + LB +\r\n '}' + LB + LB +\r\n 'function MapMoveEnd(event){' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"MapMoveEnd\"));' + LB +\r\n '}' + LB + LB +\r\n 'function MapClick(event){' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"MapClick\"));' + LB +\r\n '}' + LB + LB +\r\n 'function MapRightClick(event){' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"MapRightClick\"));' + LB +\r\n '}' + LB + LB +\r\n 'function MapDblClick(event){' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"MapDblClick\"));' + LB +\r\n '}' + LB + LB +\r\n 'function MapMouseDown(event){' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"MapMouseDown\"));' + LB +\r\n '}' + LB + LB +\r\n 'function MapMouseUp(event){' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"MapMouseUp\"));' + LB +\r\n '}' + LB + LB +\r\n 'function MapMouseLeave(event){' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"MapMouseLeave\"));' + LB +\r\n '}' + LB + LB +\r\n 'function MapMouseEnter(event){' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"MapMousEnter\"));' + LB +\r\n '}' + LB + LB +\r\n 'function MapMouseMove(event){' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"MapMouseMove\"));' + LB +\r\n '}' + LB + LB +\r\n 'function MapZoomChanged(event){' + LB +\r\n ' if (' + MAPVAR + '){' + LB +\r\n ' if (!oldZoom){' + LB +\r\n ' oldZoom = ' + MAPVAR + '.getZoom();' + LB +\r\n ' }' + LB +\r\n ' var newZoom = ' + MAPVAR + '.getZoom();' + LB +\r\n ' if(newZoom != oldZoom){' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(null, \"ZoomChanged\"));' + LB +\r\n ' }' + LB +\r\n ' oldZoom = newZoom;' + LB +\r\n ' }' + LB +\r\n '}' + LB + LB;\r\nend;\r\n\r\nprocedure TTMSFNCMapsLeaflet.GetHeadLinks(\r\n const AList: TTMSFNCMapsLinksList);\r\nbegin\r\n AList.Add(TTMSFNCMapsLink.CreateLink(LeafletAPIURL + LeafletAPIVERSION + '/dist/leaflet.css', 'text/css', 'stylesheet'));\r\n AList.Add(TTMSFNCMapsLink.CreateScript(LeafletAPIURL + LeafletAPIVERSION + '/dist/leaflet.js', 'text/javascript'));\r\nend;\r\n\r\nfunction TTMSFNCMapsLeaflet.GetHeadStyle: string;\r\nbegin\r\n Result := '.tms_leaflet_iconImage{' + LB +\r\n ' position: relative!important;' + LB +\r\n ' margin-top: -100%;' + LB +\r\n ' margin-left: -50%;' + LB +\r\n '}' + LB;\r\nend;\r\n\r\nfunction TTMSFNCMapsLeaflet.GetIdentifier: string;\r\nbegin\r\n Result := 'Leaflet';\r\nend;\r\n\r\nfunction TTMSFNCMapsLeaflet.GetInitializeCoordinateArray: string;\r\nbegin\r\n Result := '[]';\r\nend;\r\n\r\nfunction TTMSFNCMapsLeaflet.GetInitializeHolesArray: string;\r\nbegin\r\n Result := '[]';\r\nend;\r\n\r\nfunction TTMSFNCMapsLeaflet.GetInitializeEvents: string;\r\nbegin\r\n Result :=\r\n ' ' + MAPVAR + '.on(''movestart'', MapMoveStart);' + LB +\r\n ' ' + MAPVAR + '.on(''moveend'', MapMoveEnd);' + LB +\r\n ' ' + MAPVAR + '.on(''zoomend'', MapZoomChanged);' + LB +\r\n ' ' + MAPVAR + '.on(''click'', MapClick);' + LB +\r\n ' ' + MAPVAR + '.on(''contextmenu'', MapRightClick);' + LB +\r\n ' ' + MAPVAR + '.on(''dblclick'', MapDblClick);' + LB +\r\n ' ' + MAPVAR + '.on(''mouseup'', MapMouseUp);' + LB +\r\n ' ' + MAPVAR + '.on(''mousedown'', MapMouseDown);' + LB +\r\n ' ' + MAPVAR + '.on(''mousemove'', MapMouseMove);' + LB;\r\nend;\r\n\r\nfunction TTMSFNCMapsLeaflet.GetInitializeMap: string;\r\nbegin\r\n Result := Result +\r\n ' ' + MAPBASELAYERVAR + ' = ' + MAPSERVICEVAR + '.tileLayer(\"' + MAPSOURCEVAR + '\", {' + LB +\r\n ' maxZoom: 19,' + LB +\r\n ' })' + LB +\r\n '';\r\n\r\n Result := Result +\r\n ' ' + MAPBASELAYERVAR + '.on(''tileerror'', function(event){' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"Error\", \"Leaflet Tile error\"));' + LB +\r\n '});';\r\n\r\n Result := Result +\r\n ' ' + MAPVAR + ' = ' + MAPSERVICEVAR + '.map(\"' + MAPID + '\", {' + LB +\r\n ' center: [' + MapsProperties.GetDefaultLatitude + ', ' + MapsProperties.GetDefaultLongitude + '],' + LB +\r\n ' zoom: ' + MapsProperties.GetDefaultZoomLevel + ',' + LB +\r\n\r\n ' dragging: ' + BoolToStrEx(MapsProperties.GetPanning) + ',' + LB +\r\n ' scrollWheelZoom: ' + BoolToStrEx(MapsProperties.GetZoomOnWheelScroll) + ',' + LB +\r\n ' doubleClickZoom: ' + BoolToStrEx(MapsProperties.GetZoomOnDblClick) + ',' + LB +\r\n ' zoomControl: ' + BoolToStrEx(MapsProperties.GetShowZoomControl) + ',' + LB +\r\n ' layers: [' + MAPBASELAYERVAR + '],' + LB +\r\n ' })' + LB + LB;\r\n\r\n Result := Result +\r\n ' ' + MAPVAR + '.removeControl(' + MAPVAR + '.attributionControl);' + LB +\r\n ' var attr = ' + MAPSERVICEVAR + '.control.attribution();' + LB +\r\n ' if (\"' + MAPATTRIBUTIONPREFIX + '\" != \"\") {' + LB +\r\n ' attr.setPrefix(\"' + MAPATTRIBUTIONPREFIX + '\");' + LB +\r\n ' }' + LB +\r\n ' if (\"' + MAPATTRIBUTIONTEXT + '\" != \"\") {' + LB +\r\n ' attr.addAttribution(\"' + MAPATTRIBUTIONTEXT + '\");' + LB +\r\n ' }' + LB +\r\n ' attr.addTo(' + MAPVAR + ');';\r\nend;\r\n\r\nfunction TTMSFNCMapsLeaflet.GetMapsServiceCheck: string;\r\nbegin\r\n Result := '!' + MAPSERVICEVAR;\r\nend;\r\n\r\nfunction TTMSFNCMapsLeaflet.GetResetMap: string;\r\nbegin\r\n Result := '';\r\nend;\r\n\r\nfunction TTMSFNCMapsLeaflet.GetSetCenterCoordinate: string;\r\nbegin\r\n Result := ' ' + MAPVAR + '.setView([' + PARAMSNAME + '[\"Latitude\"], ' + PARAMSNAME + '[\"Longitude\"]]);';\r\nend;\r\n\r\nfunction TTMSFNCMapsLeaflet.GetSetZoomLevel: string;\r\nbegin\r\n Result := ' ' + MAPVAR + '.setZoom(' + PARAMSNAME + ');';\r\nend;\r\n\r\nfunction TTMSFNCMapsLeaflet.GetClosePopup: string;\r\nbegin\r\n Result := ' ' + MAPVAR + '.closePopup();' + LB;\r\nend;\r\n\r\nfunction TTMSFNCMapsLeaflet.GetShowPopup: string;\r\nbegin\r\n Result :=\r\n ' var lat = [' + PARAMSNAME + '[\"Latitude\"], ' + PARAMSNAME + '[\"Longitude\"]];' + LB +\r\n ' ' + POPUPVAR + ' = ' + MAPSERVICEVAR + '.popup(lat, {' + LB +\r\n ' offset: ' + MAPSERVICEVAR + '.point(' + PARAMSNAME + '[\"OffsetX\"], ' + PARAMSNAME + '[\"OffsetY\"]),' + LB +\r\n ' content: ' + PARAMSNAME + '[\"Text\"],' + LB +\r\n ' autoPan: ' + PARAMSNAME + '[\"PanMap\"],' + LB +\r\n ' });' + LB +\r\n ' ' + POPUPVAR + '.openOn(' + MAPVAR + ');';\r\nend;\r\n\r\nfunction TTMSFNCMapsLeaflet.GetUpdateOptions: string;\r\nbegin\r\n Result := Result +\r\n ' if (' + PARAMSNAME + '[\"ShowZoomControl\"]){' + LB +\r\n ' ' + MAPVAR + '.addControl(' + MAPVAR + '.zoomControl);' + LB +\r\n ' } else { ' + LB +\r\n ' ' + MAPVAR + '.removeControl(' + MAPVAR + '.zoomControl);' + LB +\r\n ' }';\r\n\r\n Result := Result +\r\n ' if (' + PARAMSNAME + '[\"ZoomOnWheelScroll\"]){' + LB +\r\n ' ' + MAPVAR + '.scrollWheelZoom.enable();' + LB +\r\n ' } else { ' + LB +\r\n ' ' + MAPVAR + '.scrollWheelZoom.disable();' + LB +\r\n ' }';\r\n\r\n Result := Result +\r\n ' if (' + PARAMSNAME + '[\"ZoomOnDblClick\"]){' + LB +\r\n ' ' + MAPVAR + '.doubleClickZoom.enable();' + LB +\r\n ' } else { ' + LB +\r\n ' ' + MAPVAR + '.doubleClickZoom.disable();' + LB +\r\n ' }';\r\n\r\n Result := Result +\r\n ' if (' + PARAMSNAME + '[\"Panning\"]){' + LB +\r\n ' ' + MAPVAR + '.dragging.enable();' + LB +\r\n ' } else { ' + LB +\r\n ' ' + MAPVAR + '.dragging.disable();' + LB +\r\n ' }';\r\nend;\r\n\r\nfunction TTMSFNCMapsLeaflet.GetZoomToBounds: string;\r\nbegin\r\n Result := MAPVAR + '.fitBounds([[' + PARAMSNAME + '[\"SouthWest\"][\"Latitude\"],' + PARAMSNAME + '[\"SouthWest\"][\"Longitude\"]], ' +\r\n '[' + PARAMSNAME + '[\"NorthEast\"][\"Latitude\"], ' + PARAMSNAME + '[\"NorthEast\"][\"Longitude\"]]])';\r\nend;\r\n\r\nfunction TTMSFNCMapsLeaflet.IsValid: Boolean;\r\nbegin\r\n Result := True;\r\nend;\r\n\r\nprocedure TTMSFNCMapsLeaflet.RemoveScripts;\r\nbegin\r\n {$IFDEF WEBLIB}\r\n asm\r\n if (window.L){\r\n window.L = undefined;\r\n }\r\n end;\r\n {$ENDIF}\r\nend;\r\n\r\nend.\r\n\r\n","{********************************************************************}\r\n{ }\r\n{ written by TMS Software }\r\n{ copyright (c) 2020 - 2025 }\r\n{ Email : info@tmssoftware.com }\r\n{ Web : http://www.tmssoftware.com }\r\n{ }\r\n{ The source code is given as is. The author is not responsible }\r\n{ for any possible damage done due to the use of this code. }\r\n{ The complete source code remains property of the author and may }\r\n{ not be distributed, published, given or sold in any form as such. }\r\n{ No parts of the source code can be included in any other component }\r\n{ or application without written authorization of the author. }\r\n{********************************************************************}\r\n\r\nunit WEBLib.TMSFNCMaps.MapBox;\r\n\r\n{$I WEBLib.TMSFNCDefines.inc}\r\n\r\n{$IFDEF WEBLIB}\r\n{$DEFINE LCLWEBLIB}\r\n{$ENDIF}\r\n{$IFDEF LCLLIB}\r\n{$DEFINE LCLWEBLIB}\r\n{$ENDIF}\r\n\r\ninterface\r\n\r\nprocedure RegisterMapBoxService;\r\nprocedure UnRegisterMapBoxService;\r\n\r\nimplementation\r\n\r\nuses\r\n Classes, Math, DateUtils, Types, SysUtils, WEBLib.TMSFNCMaps, WEBLib.TMSFNCUtils, WEBLib.TMSFNCTypes, WEBLib.TMSFNCMapsCommonTypes\r\n {$IFDEF WEBLIB}\r\n ,Contnrs, Web\r\n {$ENDIF}\r\n {$IFNDEF LCLWEBLIB}\r\n ,Generics.Collections, Generics.Defaults\r\n {$HINTS OFF}\r\n {$IF COMPILERVERSION > 22}\r\n , UITypes\r\n {$IFEND}\r\n {$HINTS ON}\r\n {$ENDIF}\r\n {$IFDEF LCLLIB}\r\n ,fgl\r\n {$ENDIF}\r\n ;\r\n\r\nconst\r\n MAJ_VER = 2; // Major version nr.\r\n MIN_VER = 1; // Minor version nr.\r\n REL_VER = 0; // Release nr.\r\n BLD_VER = 0; // Build nr.\r\n\r\n //v1.0.0.0: First release\r\n //v1.0.1.0: New : API version updated\r\n //v2.0.0.0: New : API version updated from v2.15 to v3.5.1\r\n //v2.0.0.0: New : Support for 3D Maps\r\n //v2.1.0.0: New : OnError event added\r\n\r\ntype\r\n TTMSFNCMapsMapBoxService = class;\r\n\r\n TTMSFNCMapsMapBoxFactoryService = class(TTMSFNCMapsFactoryService, ITMSFNCMapsServiceMapBox);\r\n\r\n TTMSFNCMapsMapBoxService = class(TTMSFNCMapsMapBoxFactoryService)\r\n protected\r\n function DoCreateMaps: ITMSFNCCustomMaps; override;\r\n end;\r\n\r\ntype\r\n TTMSFNCMapsMapBox = class;\r\n\r\n TTMSFNCMapsMapBox = class(TTMSFNCCustomMapsInterfacedObject, ITMSFNCCustomMaps)\r\n protected\r\n procedure GetHeadLinks(const AList: TTMSFNCMapsLinksList);\r\n procedure RemoveScripts;\r\n function GetResetMap: string;\r\n function GetShowPopup: string;\r\n function GetClosePopup: string;\r\n function GetHeadStyle: string;\r\n function GetDelayLoadEvent: string;\r\n function GetMapsServiceCheck: string;\r\n function GetIdentifier: string;\r\n function GetInitializeMap: string;\r\n function GetInitializeEvents: string;\r\n function GetAddOrUpdateMarker: string;\r\n function GetDeleteMarker: string;\r\n function GetAddOrUpdatePolyElement: string;\r\n function GetDeletePolyElement: string;\r\n function GetZoomToBounds: string;\r\n function GetGetBounds: string;\r\n function GetSetCenterCoordinate: string;\r\n function GetGetCenterCoordinate: string;\r\n function GetGetZoomLevel: string;\r\n function GetSetZoomLevel: string;\r\n function GetLatLonToXY: string;\r\n function GetXYToLatLon: string;\r\n function GetUpdateOptions: string;\r\n function GetGlobalVariables: string;\r\n function GetAddCoordinateToArray: string;\r\n function GetAddHoleToArray: string;\r\n function GetInitializeCoordinateArray: string;\r\n function GetInitializeHolesArray: string;\r\n function IsValid: Boolean;\r\n procedure DestroyMaps;\r\n public\r\n constructor Create;\r\n destructor Destroy; override;\r\n end;\r\n\r\nvar\r\n MapsService: ITMSFNCMapsServiceMapBox;\r\n\r\nconst\r\n MAPBOXAPIURL = 'https://api.tiles.mapbox.com/mapbox-gl-js/';\r\n MAPSERVICEVAR = 'window.mapboxgl';\r\n MAPZOOMCONTROLVAR = 'mapZoomControl';\r\n MAPCONTROLARRAYVAR = 'mapControls';\r\n\r\nprocedure RegisterMapBoxService;\r\nbegin\r\n if not TTMSFNCMapsPlatformServices.Current.SupportsPlatformService(ITMSFNCMapsServiceMapBox, IInterface(MapsService)) then\r\n begin\r\n MapsService := TTMSFNCMapsMapBoxService.Create;\r\n TTMSFNCMapsPlatformServices.Current.AddPlatformService(ITMSFNCMapsServiceMapBox, MapsService);\r\n end;\r\nend;\r\n\r\nprocedure UnregisterMapBoxService;\r\nbegin\r\n TTMSFNCMapsPlatformServices.Current.RemovePlatformService(ITMSFNCMapsServiceMapBox);\r\nend;\r\n\r\n{ TTMSFNCMapsMapBoxService }\r\n\r\nfunction TTMSFNCMapsMapBoxService.DoCreateMaps: ITMSFNCCustomMaps;\r\nbegin\r\n Result := TTMSFNCMapsMapBox.Create;\r\nend;\r\n\r\nconstructor TTMSFNCMapsMapBox.Create;\r\nbegin\r\n inherited;\r\nend;\r\n\r\ndestructor TTMSFNCMapsMapBox.Destroy;\r\nbegin\r\n inherited;\r\nend;\r\n\r\nprocedure TTMSFNCMapsMapBox.DestroyMaps;\r\nbegin\r\n MapsService.DestroyMaps(Self);\r\nend;\r\n\r\nfunction TTMSFNCMapsMapBox.GetAddCoordinateToArray: string;\r\nbegin\r\n Result := ' ' + COORDINATEARRAYVAR + '.push([' + PARAMSNAME + '[\"Longitude\"], ' + PARAMSNAME + '[\"Latitude\"]]);';\r\nend;\r\n\r\nfunction TTMSFNCMapsMapBox.GetAddHoleToArray: string;\r\nbegin\r\n Result := '';\r\nend;\r\n\r\nfunction TTMSFNCMapsMapBox.GetAddOrUpdateMarker: string;\r\nbegin\r\n Result :=\r\n ' var loc = [' + PARAMSNAME + '[\"Longitude\"], ' + PARAMSNAME + '[\"Latitude\"]]' + LB + LB +\r\n\r\n ' if (!' + MARKERVAR + '){' + LB +\r\n ' var el = document.createElement(''div'');' + LB +\r\n ' el.style.width = ''48px'';' + LB +\r\n ' el.style.height = ''48px'';' + LB +\r\n ' el.style.zIndex = ' + PARAMSNAME + '[\"ZIndex\"];' + LB +\r\n ' el.innerHTML = '''';' + LB +\r\n\r\n ' ' + MARKERVAR + ' = new ' + MAPSERVICEVAR + '.Marker({anchor: \"bottom\", element: el, draggable:' + PARAMSNAME + '[\"Draggable\"]});' + LB +\r\n\r\n ' ' + MARKERVAR + '.setLngLat(loc).addTo(' + MAPVAR + ');' + LB +\r\n ' el.addEventListener(''click'', function(event){' + LB +\r\n ' event.stopPropagation();' + LB +\r\n ' if (' + PARAMSNAME + '[\"Title\"] != \"\"){' + LB +\r\n ' var popup = new ' + MAPSERVICEVAR + '.Popup({ closeOnClick: true, maxWidth: \"none\", offset: [0, -30]}).setLngLat(loc).setHTML(' + PARAMSNAME + '[\"Title\"]).addTo(' + MAPVAR + ');' + LB +\r\n ' }' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"MarkerClick\", ' + PARAMSNAME + '[\"ID\"]));' + LB +\r\n ' })' + LB + LB +\r\n ' el.addEventListener(''contextmenu'', function(event){' + LB +\r\n ' event.stopPropagation();' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"MarkerRightClick\", ' + PARAMSNAME + '[\"ID\"]));' + LB +\r\n ' })' + LB + LB +\r\n ' el.addEventListener(''dblclick'', function(event){' + LB +\r\n ' event.stopPropagation();' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"MarkerDblClick\", ' + PARAMSNAME + '[\"ID\"]));' + LB +\r\n ' })' + LB + LB +\r\n ' el.addEventListener(''mouseup'', function(event){' + LB +\r\n ' if (!' + PARAMSNAME + '[\"Draggable\"]){' + LB +\r\n ' event.stopPropagation();' + LB +\r\n ' }' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"MarkerMouseUp\", ' + PARAMSNAME + '[\"ID\"]));' + LB +\r\n ' } )' + LB + LB +\r\n ' el.addEventListener(''mousedown'', function(event){' + LB +\r\n ' if (!' + PARAMSNAME + '[\"Draggable\"]){' + LB +\r\n ' event.stopPropagation();' + LB +\r\n ' }' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"MarkerMouseDown\", ' + PARAMSNAME + '[\"ID\"]));' + LB +\r\n ' })' + LB + LB +\r\n ' el.addEventListener(''mouseout'', function(event){' + LB +\r\n ' event.stopPropagation();' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"MarkerMouseLeave\", ' + PARAMSNAME + '[\"ID\"]));' + LB +\r\n ' })' + LB + LB +\r\n ' el.addEventListener(''mouseover'', function(event){' + LB +\r\n ' event.stopPropagation();' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"MarkerMouseEnter\", ' + PARAMSNAME + '[\"ID\"]));' + LB +\r\n ' })' + LB + LB +\r\n ' }else{' + LB +\r\n ' ' + MARKERVAR + '.setLngLat(loc);' + LB +\r\n ' }' + LB + LB +\r\n\r\n MARKERVAR + '.setDraggable(' + PARAMSNAME + '[\"Draggable\"]);' + LB +\r\n\r\n 'function onDragEnd() {' + LB +\r\n ' const lngLat = ' + MARKERVAR + '.getLngLat();' + LB +\r\n ' var jsonObj = getDefaultCoordinateObject();' + LB +\r\n ' jsonObj[\"Latitude\"] = lngLat.latitude;' + LB +\r\n ' jsonObj[\"Longitude\"] = lngLat.longitude;' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"MarkerDragEnd\", ' + PARAMSNAME + '[\"ID\"]), jsonObj);' + LB +\r\n '}' + LB +\r\n\r\n MARKERVAR + '.on(''dragend'', onDragEnd)' + LB +\r\n\r\n ' var elx = ' + MARKERVAR + '.getElement();' + LB +\r\n ' if (elx){' + LB +\r\n\r\n ' var markericon = ' + CUSTOMDEFAULTMARKERICON + '(' +\r\n PARAMSNAME + '[\"DefaultIcon\"],' + LB +\r\n PARAMSNAME + '[\"IconURL\"]);' + LB +\r\n\r\n ' if (markericon != \"\"){' + LB +\r\n ' var mimg = document.createElement(''img'');' +\r\n ' mimg.src = markericon;' +\r\n ' elx.innerHTML = mimg.outerHTML;' + LB +\r\n ' if (' + PARAMSNAME + '[\"DefaultIcon\"][\"Enabled\"]) {' + LB +\r\n ' elx.style.width = ' + PARAMSNAME + '[\"DefaultIcon\"][\"Size\"] + \"px\";' + LB +\r\n ' elx.style.height = ' + PARAMSNAME + '[\"DefaultIcon\"][\"Size\"] + \"px\";' + LB +\r\n ' }' + LB +\r\n ' }' + LB +\r\n ' if (' + PARAMSNAME + '[\"Visible\"]){' + LB +\r\n ' elx.style.visibility = \"visible\";' + LB +\r\n ' }else{' + LB +\r\n ' elx.style.visibility = \"hidden\";' + LB +\r\n ' }' + LB +\r\n ' }';\r\nend;\r\n\r\nfunction TTMSFNCMapsMapBox.GetAddOrUpdatePolyElement: string;\r\nbegin\r\n Result :=\r\n ' var c = ' + PARAMSNAME + '[\"$type\"];' + LB +\r\n ' var pg, dpg, pl, dpl, spg, spl;' + LB +\r\n ' var co = [];' + LB +\r\n\r\n ' switch(c){' + LB +\r\n ' case \"TTMSFNCMapsRectangle\":' + LB +\r\n ' co.push([' + PARAMSNAME + '[\"Bounds\"][\"SouthWest\"][\"Longitude\"], ' + PARAMSNAME + '[\"Bounds\"][\"NorthEast\"][\"Latitude\"]]);' + LB +\r\n ' co.push([' + PARAMSNAME + '[\"Bounds\"][\"NorthEast\"][\"Longitude\"], ' + PARAMSNAME + '[\"Bounds\"][\"NorthEast\"][\"Latitude\"]]);' + LB +\r\n ' co.push([' + PARAMSNAME + '[\"Bounds\"][\"NorthEast\"][\"Longitude\"], ' + PARAMSNAME + '[\"Bounds\"][\"SouthWest\"][\"Latitude\"]]);' + LB +\r\n ' co.push([' + PARAMSNAME + '[\"Bounds\"][\"SouthWest\"][\"Longitude\"], ' + PARAMSNAME + '[\"Bounds\"][\"SouthWest\"][\"Latitude\"]]);' + LB +\r\n ' co.push([' + PARAMSNAME + '[\"Bounds\"][\"SouthWest\"][\"Longitude\"], ' + PARAMSNAME + '[\"Bounds\"][\"NorthEast\"][\"Latitude\"]]);' + LB +\r\n ' break;' + LB +\r\n ' case \"TTMSFNCMapsCircle\":' + LB +\r\n ' co = createCircle(' + PARAMSNAME + '[\"Center\"], ' + PARAMSNAME + '[\"Radius\"], true);' + LB +\r\n ' break;' + LB +\r\n ' default:' + LB +\r\n ' co = ' + COORDINATEARRAYVAR + ';' + LB +\r\n ' break;' + LB +\r\n ' }' + LB + LB +\r\n\r\n ' switch(c){' + LB +\r\n ' case \"TTMSFNCMapsRectangle\":' + LB +\r\n ' case \"TTMSFNCMapsCircle\":' + LB +\r\n ' case \"TTMSFNCMapsPolygon\":' + LB +\r\n ' dpg = {' + LB +\r\n ' ''type'': ''Feature'',' + LB +\r\n ' ''geometry'': {' + LB +\r\n ' ''type'': ''Polygon'',' + LB +\r\n ' ''coordinates'': [co]' + LB +\r\n ' }' + LB +\r\n ' }' + LB + LB +\r\n\r\n ' spg = {' + LB +\r\n ' ''type'': ''geojson'',' + LB +\r\n ' ''data'': dpg' + LB +\r\n ' };' + LB +\r\n\r\n ' pg = {' + LB +\r\n ' ''id'': ' + PARAMSNAME + '[\"ID\"] + \"_polygon\",' + LB +\r\n ' ''type'': ''fill'',' + LB +\r\n ' ''source'': spg, ' + LB +\r\n ' ''layout'': {' + LB +\r\n ' ''visibility'': (' + PARAMSNAME + '[\"Visible\"] ? ''visible'' : ''none'')' + LB +\r\n ' },' + LB +\r\n ' ''paint'': {' + LB +\r\n ' ''fill-color'': ' + PARAMSNAME + '[\"FillColor\"],' + LB +\r\n ' ''fill-opacity'': ' + PARAMSNAME + '[\"FillOpacity\"],' + LB +\r\n ' }' + LB +\r\n ' };' + LB + LB +\r\n\r\n ' co.push(co[0]);' + LB +\r\n ' break;' + LB +\r\n ' }' + LB +\r\n\r\n ' dpl = {' + LB +\r\n ' ''type'': ''Feature'',' + LB +\r\n ' ''geometry'': {' + LB +\r\n ' ''type'': ''LineString'',' + LB +\r\n ' ''coordinates'': co' + LB +\r\n ' }' + LB +\r\n ' }' + LB + LB +\r\n\r\n ' spl = {' + LB +\r\n ' ''type'': ''geojson'',' + LB +\r\n ' ''data'': dpl' + LB +\r\n ' };' + LB +\r\n\r\n ' pl = {' + LB +\r\n ' ''id'': ' + PARAMSNAME + '[\"ID\"] + \"_polyline\",' + LB +\r\n ' ''type'': ''line'',' + LB +\r\n ' ''source'': spl, ' + LB +\r\n ' ''layout'': {' + LB +\r\n ' ''visibility'': (' + PARAMSNAME + '[\"Visible\"] ? ''visible'' : ''none'')' + LB +\r\n ' },' + LB +\r\n ' ''paint'': {' + LB +\r\n ' ''line-color'': ' + PARAMSNAME + '[\"StrokeColor\"],' + LB +\r\n ' ''line-opacity'': ' + PARAMSNAME + '[\"StrokeOpacity\"],' + LB +\r\n ' ''line-width'': ' + PARAMSNAME + '[\"StrokeWidth\"],' + LB +\r\n ' }' + LB +\r\n ' }' + LB + LB +\r\n\r\n ' if (!' + POLYELEMENTVAR + '){' + LB +\r\n ' switch(c){' + LB +\r\n ' case \"TTMSFNCMapsPolyline\":' + LB +\r\n ' ' + MAPVAR + '.addLayer(pl);' + LB +\r\n ' break;' + LB +\r\n ' case \"TTMSFNCMapsCircle\":' + LB +\r\n ' case \"TTMSFNCMapsRectangle\":' + LB +\r\n ' case \"TTMSFNCMapsPolygon\":' + LB +\r\n ' ' + MAPVAR + '.addLayer(pg);' + LB +\r\n ' ' + MAPVAR + '.addLayer(pl);' + LB +\r\n ' break;' + LB +\r\n ' }' + LB +\r\n\r\n ' if (pg) {' + LB +\r\n ' ' + MAPVAR + '.on(''click'', pg.id, function(event){' + LB +\r\n ' activeElement = pl;' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"PolyElementClick\", ' + PARAMSNAME + '[\"ID\"]));' + LB +\r\n ' })' + LB + LB +\r\n ' ' + MAPVAR + '.on(''dblclick'', pg.id, function(event){' + LB +\r\n ' activeElement = pl;' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"PolyElementDblClick\", ' + PARAMSNAME + '[\"ID\"]));' + LB +\r\n ' })' + LB + LB +\r\n ' ' + MAPVAR + '.on(''contextmenu'', pg.id, function(event){' + LB +\r\n ' activeElement = pl;' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"PolyElementRightClick\", ' + PARAMSNAME + '[\"ID\"]));' + LB +\r\n ' })' + LB + LB +\r\n ' ' + MAPVAR + '.on(''mouseup'', pg.id, function(event){' + LB +\r\n ' activeElement = pl;' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"PolyElementMouseUp\", ' + PARAMSNAME + '[\"ID\"]));' + LB +\r\n ' })' + LB + LB +\r\n ' ' + MAPVAR + '.on(''mousedown'', pg.id, function(event){' + LB +\r\n ' activeElement = pl;' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"PolyElementMouseDown\", ' + PARAMSNAME + '[\"ID\"]));' + LB +\r\n ' })' + LB + LB +\r\n ' ' + MAPVAR + '.on(''mouseout'', pg.id, function(event){' + LB +\r\n ' activeElement = pl;' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"PolyElementMouseLeave\", ' + PARAMSNAME + '[\"ID\"]));' + LB +\r\n ' })' + LB + LB +\r\n ' ' + MAPVAR + '.on(''mouseover'', pg.id, function(event){' + LB +\r\n ' activeElement = pl;' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"PolyElementMouseEnter\", ' + PARAMSNAME + '[\"ID\"]));' + LB +\r\n ' })' + LB +\r\n ' }' + LB + LB +\r\n\r\n ' if (pl && !pg) {' + LB +\r\n ' ' + MAPVAR + '.on(''click'', pl.id, function(event){' + LB +\r\n ' activeElement = pl;' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"PolyElementClick\", ' + PARAMSNAME + '[\"ID\"]));' + LB +\r\n ' })' + LB + LB +\r\n ' ' + MAPVAR + '.on(''contextmenu'', pl.id, function(event){' + LB +\r\n ' activeElement = pl;' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"PolyElementRightClick\", ' + PARAMSNAME + '[\"ID\"]));' + LB +\r\n ' })' + LB + LB +\r\n ' ' + MAPVAR + '.on(''dblclick'', pl.id, function(event){' + LB +\r\n ' activeElement = pl;' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"PolyElementDblClick\", ' + PARAMSNAME + '[\"ID\"]));' + LB +\r\n ' })' + LB + LB +\r\n ' ' + MAPVAR + '.on(''mouseup'', pl.id, function(event){' + LB +\r\n ' activeElement = pl;' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"PolyElementMouseUp\", ' + PARAMSNAME + '[\"ID\"]));' + LB +\r\n ' })' + LB + LB +\r\n ' ' + MAPVAR + '.on(''mousedown'', pl.id, function(event){' + LB +\r\n ' activeElement = pl;' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"PolyElementMouseDown\", ' + PARAMSNAME + '[\"ID\"]));' + LB +\r\n ' })' + LB + LB +\r\n ' ' + MAPVAR + '.on(''mouseout'', pl.id, function(event){' + LB +\r\n ' activeElement = pl;' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"PolyElementMouseLeave\", ' + PARAMSNAME + '[\"ID\"]));' + LB +\r\n ' })' + LB + LB +\r\n ' ' + MAPVAR + '.on(''mouseover'', pl.id, function(event){' + LB +\r\n ' activeElement = pl;' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"PolyElementMouseEnter\", ' + PARAMSNAME + '[\"ID\"]));' + LB +\r\n ' })' + LB +\r\n ' }' + LB + LB +\r\n\r\n GetInitializeEvents + LB + LB +\r\n\r\n ' }else{' + LB +\r\n ' if (pg) {' + LB +\r\n ' var pgu = ' + MAPVAR + '.getLayer(pg.id);' + LB +\r\n ' if (pgu){' + LB +\r\n ' ' + MAPVAR + '.setLayoutProperty(pgu.id, ''visibility'', (' + PARAMSNAME + '[\"Visible\"] ? ''visible'' : ''none''));' + LB +\r\n ' ' + MAPVAR + '.setPaintProperty(pgu.id, ''fill-color'', ' + PARAMSNAME + '[\"FillColor\"]);' + LB +\r\n ' ' + MAPVAR + '.setPaintProperty(pgu.id, ''fill-opacity'', ' + PARAMSNAME + '[\"FillOpacity\"]);' + LB +\r\n ' ' + MAPVAR + '.getSource(pgu.id).setData(dpg);' + LB +\r\n ' }' + LB +\r\n ' }' + LB +\r\n\r\n ' if (pl) {' + LB +\r\n ' var plu = ' + MAPVAR + '.getLayer(pl.id);' + LB +\r\n ' if (plu){' + LB +\r\n ' ' + MAPVAR + '.setLayoutProperty(plu.id, ''visibility'', (' + PARAMSNAME + '[\"Visible\"] ? ''visible'' : ''none''));' + LB +\r\n ' ' + MAPVAR + '.setPaintProperty(plu.id, ''line-color'', ' + PARAMSNAME + '[\"StrokeColor\"]);' + LB +\r\n ' ' + MAPVAR + '.setPaintProperty(plu.id, ''line-opacity'', ' + PARAMSNAME + '[\"StrokeOpacity\"]);' + LB +\r\n ' ' + MAPVAR + '.setPaintProperty(plu.id, ''line-width'', ' + PARAMSNAME + '[\"StrokeWidth\"]);' + LB +\r\n ' ' + MAPVAR + '.getSource(plu.id).setData(dpl);' + LB +\r\n ' }' + LB +\r\n ' }' + LB +\r\n ' }' + LB +\r\n\r\n ' ' + POLYELEMENTVAR + ' = ' + PARAMSNAME + '[\"ID\"]';\r\nend;\r\n\r\nfunction TTMSFNCMapsMapBox.GetClosePopup: string;\r\nbegin\r\n Result := ' ' + POPUPVAR + '.remove();';\r\nend;\r\n\r\nfunction TTMSFNCMapsMapBox.GetDelayLoadEvent: string;\r\nbegin\r\n Result := ' ' + MAPVAR + '.on(''load'', function () {';\r\nend;\r\n\r\nfunction TTMSFNCMapsMapBox.GetDeleteMarker: string;\r\nbegin\r\n Result := ' ' + MARKERVAR + '.remove();';\r\nend;\r\n\r\nfunction TTMSFNCMapsMapBox.GetDeletePolyElement: string;\r\nbegin\r\n Result :=\r\n ' var pgu = ' + MAPVAR + '.getLayer(' + POLYELEMENTVAR + ' + \"_polygon\");' + LB +\r\n ' if (pgu){' + LB +\r\n ' ' + MAPVAR + '.removeLayer(' + POLYELEMENTVAR + ' + \"_polygon\");' + LB +\r\n ' }' + LB +\r\n\r\n ' var plu = ' + MAPVAR + '.getLayer(' + POLYELEMENTVAR + ' + \"_polyline\");' + LB +\r\n ' if (plu){' + LB +\r\n ' ' + MAPVAR + '.removeLayer(' + POLYELEMENTVAR + ' + \"_polyline\");' + LB +\r\n ' }';\r\nend;\r\n\r\nfunction TTMSFNCMapsMapBox.GetGetBounds: string;\r\nbegin\r\n Result :=\r\n ' var loc = ' + MAPVAR + '.getBounds();' + LB +\r\n ' jsonObj[\"NorthEast\"][\"Latitude\"] = loc.getNorthEast().lat;' + LB +\r\n ' jsonObj[\"NorthEast\"][\"Longitude\"] = loc.getNorthEast().lng;' + LB +\r\n ' jsonObj[\"SouthWest\"][\"Latitude\"] = loc.getSouthWest().lat;' + LB +\r\n ' jsonObj[\"SouthWest\"][\"Longitude\"] = loc.getSouthWest().lng;';\r\nend;\r\n\r\nfunction TTMSFNCMapsMapBox.GetGetCenterCoordinate: string;\r\nbegin\r\n Result :=\r\n ' var loc = ' + MAPVAR + '.getCenter();' + LB +\r\n ' jsonObj[\"Latitude\"] = loc.lat;' + LB +\r\n ' jsonObj[\"Longitude\"] = loc.lng;';\r\nend;\r\n\r\nfunction TTMSFNCMapsMapBox.GetLatLonToXY: string;\r\nbegin\r\n Result :=\r\n ' var coordinate = [' + PARAMSNAME + '[\"Longitude\"], ' + PARAMSNAME + '[\"Latitude\"]];' + LB +\r\n ' var point = ' + MAPVAR +'.project(coordinate);' + LB +\r\n ' jsonObj[\"X\"] = parseFloat(point.x);' + LB +\r\n ' jsonObj[\"Y\"] = parseFloat(point.y);';\r\nend;\r\n\r\nfunction TTMSFNCMapsMapBox.GetXYToLatLon: string;\r\nbegin\r\n Result :=\r\n ' var point = [' + PARAMSNAME + '[\"X\"], ' + PARAMSNAME + '[\"Y\"]];' + LB +\r\n ' var coordinate = ' + MAPVAR +'.unproject(point);' + LB +\r\n ' jsonObj[\"Latitude\"] = parseFloat(coordinate.lat);' + LB +\r\n ' jsonObj[\"Longitude\"] = parseFloat(coordinate.lng);';\r\nend;\r\n\r\nfunction TTMSFNCMapsMapBox.GetGetZoomLevel: string;\r\nbegin\r\n Result := ' var z = ' + MAPVAR + '.getZoom();';\r\nend;\r\n\r\nfunction TTMSFNCMapsMapBox.GetGlobalVariables: string;\r\nbegin\r\n Result :=\r\n 'var activeElement = null;' + LB +\r\n 'var ' + MAPZOOMCONTROLVAR + ';' + LB +\r\n 'var ' + MAPCONTROLARRAYVAR + ' = [];' + LB +\r\n 'var mouseLatLng = {''Latitude'': 0, ''Longitude'': 0};' + LB +\r\n 'function parseEvent(event, eventname, id = ''''){' + LB +\r\n ' var loc = {''Latitude'': 0, ''Longitude'': 0};' + LB +\r\n ' var x = 0.0;' + LB +\r\n ' var y = 0.0;' + LB +\r\n ' if ((eventname == \"MapMoveStart\") || (eventname == \"MapMoveEnd\")){ ' +\r\n ' var ptcenter = ' + MAPVAR + '.getCenter();' + LB +\r\n ' var lat = ptcenter.lat;' + LB +\r\n ' var lng = ptcenter.lng;' + LB +\r\n ' loc = {''Latitude'': lat, ''Longitude'': lng};' + LB +\r\n ' } else if (event) {' + LB +\r\n ' if (event.clientX && event.clientY){' + LB +\r\n ' x = event.clientX;' + LB +\r\n ' y = event.clientY;' + LB +\r\n ' loc = mouseLatLng;' + LB +\r\n ' }' + LB +\r\n ' else{' + LB +\r\n ' if (event.lngLat){' + LB +\r\n ' loc = {''Latitude'': event.lngLat.lat, ''Longitude'': event.lngLat.lng};' + LB +\r\n ' mouseLatLng = loc;' + LB +\r\n ' }' + LB +\r\n ' if (event.point){' + LB +\r\n ' x = event.point.x;' + LB +\r\n ' y = event.point.y;' + LB +\r\n ' }' + LB +\r\n ' }' + LB +\r\n ' }' + LB +\r\n\r\n ' var r = {''Coordinate'': loc, ''X'': x, ''Y'': y, ''ID'': id, ''EventName'': eventname};' + LB +\r\n ' return r;' + LB +\r\n '}' + LB + LB +\r\n\r\n 'function MapMoveStart(event){' + LB +\r\n ' if (activeElement){' + LB +\r\n ' activeElement = null;' + LB +\r\n ' return;' + LB +\r\n ' }' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"MapMoveStart\"));' + LB +\r\n '}' + LB + LB +\r\n 'function MapMoveEnd(event){' + LB +\r\n ' if (activeElement){' + LB +\r\n ' activeElement = null;' + LB +\r\n ' return;' + LB +\r\n ' }' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"MapMoveEnd\"));' + LB +\r\n '}' + LB + LB +\r\n\r\n 'function MapClick(event){' + LB +\r\n ' if (activeElement){' + LB +\r\n ' activeElement = null;' + LB +\r\n ' return;' + LB +\r\n ' }' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"MapClick\"));' + LB +\r\n '}' + LB + LB +\r\n\r\n 'function MapRightClick(event){' + LB +\r\n ' if (activeElement){' + LB +\r\n ' activeElement = null;' + LB +\r\n ' return;' + LB +\r\n ' }' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"MapRightClick\"));' + LB +\r\n '}' + LB + LB +\r\n\r\n 'function MapDblClick(event){' + LB +\r\n ' if (activeElement){' + LB +\r\n ' activeElement = null;' + LB +\r\n ' return;' + LB +\r\n ' }' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"MapDblClick\"));' + LB +\r\n '}' + LB + LB +\r\n 'function MapMouseDown(event){' + LB +\r\n ' if (activeElement){' + LB +\r\n ' activeElement = null;' + LB +\r\n ' return;' + LB +\r\n ' }' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"MapMouseDown\"));' + LB +\r\n '}' + LB + LB +\r\n 'function MapMouseUp(event){' + LB +\r\n ' if (activeElement){' + LB +\r\n ' activeElement = null;' + LB +\r\n ' return;' + LB +\r\n ' }' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"MapMouseUp\"));' + LB +\r\n '}' + LB + LB +\r\n 'function MapMouseLeave(event){' + LB +\r\n ' if (activeElement){' + LB +\r\n ' activeElement = null;' + LB +\r\n ' return;' + LB +\r\n ' }' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"MapMouseLeave\"));' + LB +\r\n '}' + LB + LB +\r\n 'function MapMouseEnter(event){' + LB +\r\n ' if (activeElement){' + LB +\r\n ' activeElement = null;' + LB +\r\n ' return;' + LB +\r\n ' }' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"MapMousEnter\"));' + LB +\r\n '}' + LB + LB +\r\n 'function MapMouseMove(event){' + LB +\r\n ' if (activeElement){' + LB +\r\n ' activeElement = null;' + LB +\r\n ' return;' + LB +\r\n ' }' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"MapMouseMove\"));' + LB +\r\n '}';\r\nend;\r\n\r\nprocedure TTMSFNCMapsMapBox.GetHeadLinks(const AList: TTMSFNCMapsLinksList);\r\nvar\r\n APIVersion: string;\r\nbegin\r\n if MapsProperties.GetAPIVersion = '' then\r\n APIVersion := 'v3.5.1'\r\n else\r\n APIVersion := 'v' + MapsProperties.GetAPIVersion;\r\n\r\n AList.Add(TTMSFNCMapsLink.CreateLink(MAPBOXAPIURL + APIVersion + '/mapbox-gl.css', 'text/css', 'stylesheet'));\r\n AList.Add(TTMSFNCMapsLink.CreateScript(MAPBOXAPIURL + APIVersion + '/mapbox-gl.js', 'text/javascript'));\r\nend;\r\n\r\nfunction TTMSFNCMapsMapBox.GetHeadStyle: string;\r\nbegin\r\n Result := '';\r\nend;\r\n\r\nfunction TTMSFNCMapsMapBox.GetIdentifier: string;\r\nbegin\r\n Result := 'MapBox';\r\nend;\r\n\r\nfunction TTMSFNCMapsMapBox.GetInitializeCoordinateArray: string;\r\nbegin\r\n Result := '[]';\r\nend;\r\n\r\nfunction TTMSFNCMapsMapBox.GetInitializeHolesArray: string;\r\nbegin\r\n Result := '[]';\r\nend;\r\n\r\nfunction TTMSFNCMapsMapBox.GetInitializeEvents: string;\r\nbegin\r\n Result :=\r\n ' ' + MAPVAR + '.on(''error'', function(e){' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"Error\", e.error.message));' + LB +\r\n ' })' + LB + LB +\r\n ' ' + MAPVAR + '.on(''zoomend'', function(){' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(null, \"ZoomChanged\"));' + LB +\r\n ' })' + LB + LB +\r\n ' ' + MAPVAR + '.on(''moveend'', function(){' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(null, \"MapCenterChanged\"));' + LB +\r\n ' })' + LB + LB +\r\n// ' ' + MAPVAR + '.on(''maptypeid_changed'', function(){' + LB +\r\n// ' ' + GETSENDEVENT + '(parseEvent(null, \"MapTypeChanged\"));' + LB +\r\n// ' })' + LB + LB +\r\n ' ' + MAPVAR + '.off(''dragstart'', MapMoveStart);' + LB +\r\n ' ' + MAPVAR + '.on(''dragstart'', MapMoveStart);' + LB +\r\n ' ' + MAPVAR + '.off(''dragend'', MapMoveEnd);' + LB +\r\n ' ' + MAPVAR + '.on(''dragend'', MapMoveEnd);' + LB +\r\n ' ' + MAPVAR + '.off(''click'', MapClick);' + LB +\r\n ' ' + MAPVAR + '.on(''click'', MapClick);' + LB +\r\n ' ' + MAPVAR + '.off(''contextmenu'', MapRightClick);' + LB +\r\n ' ' + MAPVAR + '.on(''contextmenu'', MapRightClick);' + LB +\r\n ' ' + MAPVAR + '.off(''dblclick'', MapDblClick);' + LB +\r\n ' ' + MAPVAR + '.on(''dblclick'', MapDblClick);' + LB +\r\n ' ' + MAPVAR + '.off(''mouseup'', MapMouseUp);' + LB +\r\n ' ' + MAPVAR + '.on(''mouseup'', MapMouseUp);' + LB +\r\n ' ' + MAPVAR + '.off(''mousedown'', MapMouseDown);' + LB +\r\n ' ' + MAPVAR + '.on(''mousedown'', MapMouseDown);' + LB +\r\n ' ' + MAPVAR + '.off(''mouseout'', MapMouseLeave);' + LB +\r\n ' ' + MAPVAR + '.on(''mouseout'', MapMouseLeave);' + LB +\r\n ' ' + MAPVAR + '.off(''mouseover'', MapMouseEnter);' + LB +\r\n ' ' + MAPVAR + '.on(''mouseover'', MapMouseEnter);' + LB +\r\n ' ' + MAPVAR + '.off(''mousemove'', MapMouseMove);' + LB +\r\n ' ' + MAPVAR + '.on(''mousemove'', MapMouseMove);';\r\nend;\r\n\r\nfunction TTMSFNCMapsMapBox.GetInitializeMap: string;\r\nvar\r\n v: string;\r\nbegin\r\n v := MAPSERVICEVAR;\r\n Result :=\r\n ' ' + v + '.accessToken = \"' + MapsProperties.GetAPIKey + '\";' + LB +\r\n ' ' + MAPVAR + ' = new ' + v + '.Map({' + LB +\r\n ' container: \"' + MAPID +'\", ' + LB +\r\n// ' style: \"mapbox://styles/mapbox/standard\",' + LB +\r\n ' style: \"mapbox://styles/mapbox/streets-v12\",' + LB +\r\n ' center: [' + MapsProperties.GetDefaultLongitude + ', ' + MapsProperties.GetDefaultLatitude +'], ' + LB +\r\n ' zoom: ' + MapsProperties.GetDefaultZoomLevel + LB +\r\n ' });' + LB + LB;\r\n\r\n Result := Result + ' ' + MAPZOOMCONTROLVAR + ' = new ' + MAPSERVICEVAR + '.NavigationControl();' + LB;\r\n\r\n if MapsProperties.GetShowZoomControl then\r\n begin\r\n Result := Result +\r\n ' ' + MAPVAR + '.addControl(' + MAPZOOMCONTROLVAR + ');' + LB +\r\n ' ' + MAPCONTROLARRAYVAR + '.push(' + MAPZOOMCONTROLVAR + ');' + LB + LB;\r\n end;\r\n\r\n if MapsProperties.GetZoomOnDblClick then\r\n begin\r\n Result := Result +\r\n ' ' + MAPVAR + '.doubleClickZoom.enable();' + LB + LB;\r\n end\r\n else\r\n begin\r\n Result := Result +\r\n ' ' + MAPVAR + '.doubleClickZoom.disable();' + LB + LB;\r\n end;\r\n\r\n if MapsProperties.GetZoomOnWheelScroll then\r\n begin\r\n Result := Result +\r\n ' ' + MAPVAR + '.scrollZoom.enable();' + LB + LB;\r\n end\r\n else\r\n begin\r\n Result := Result +\r\n ' ' + MAPVAR + '.scrollZoom.disable();' + LB + LB;\r\n end;\r\n\r\n if MapsProperties.GetPanning then\r\n begin\r\n Result := Result +\r\n ' ' + MAPVAR + '.dragPan.enable();' + LB + LB;\r\n end\r\n else\r\n begin\r\n Result := Result +\r\n ' ' + MAPVAR + '.dragPan.disable();' + LB + LB;\r\n end;\r\n\r\n Result := Result + ' ' + MAPVAR + '.on(''load'', function(){' +\r\n\r\n// ' ' + MAPVAR + '.setLayoutProperty(''country-label'', ''text-field'', [''get'',''name_' + MapsProperties.GetLocale(mlmCountry) + ''']);' + LB +\r\n\r\n '});'+\r\n\r\n '' + MAPVAR + '.on(\"sourcedata\", function (e) {' + LB +\r\n ' console.log(\"sourcedata loaded \" + e.sourceId);' +\r\n ' if (e.sourceId === \"earthquakes\" && e.isSourceLoaded) {' + LB +\r\n ' console.log(\"Earthquake data loaded:\", e.source.data);' + LB +\r\n ' }' + LB +\r\n '});' + LB +\r\n\r\n '';\r\nend;\r\n\r\nfunction TTMSFNCMapsMapBox.GetMapsServiceCheck: string;\r\nbegin\r\n Result := '!' + MAPSERVICEVAR;\r\nend;\r\n\r\nfunction TTMSFNCMapsMapBox.GetResetMap: string;\r\nbegin\r\n Result := '';\r\nend;\r\n\r\nfunction TTMSFNCMapsMapBox.GetSetCenterCoordinate: string;\r\nbegin\r\n Result := ' ' + MAPVAR + '.flyTo({duration: 0, center: [' + PARAMSNAME + '[\"Longitude\"],' + PARAMSNAME + '[\"Latitude\"]]});';\r\nend;\r\n\r\nfunction TTMSFNCMapsMapBox.GetSetZoomLevel: string;\r\nbegin\r\n Result := ' ' + MAPVAR + '.setZoom(' + PARAMSNAME + ');';\r\nend;\r\n\r\nfunction TTMSFNCMapsMapBox.GetShowPopup: string;\r\nbegin\r\n Result :=\r\n ' var loc = [' + PARAMSNAME + '[\"Longitude\"], ' + PARAMSNAME + '[\"Latitude\"]]' + LB +\r\n POPUPVAR + ' = new ' + MAPSERVICEVAR + '.Popup({ closeOnClick: true, maxWidth: \"none\", offset: [' + PARAMSNAME + '[\"OffsetX\"], ' + PARAMSNAME + '[\"OffsetY\"]]}).setLngLat(loc).setHTML(' + PARAMSNAME + '[\"Text\"]).addTo(' + MAPVAR + ');';\r\nend;\r\n\r\nfunction TTMSFNCMapsMapBox.GetUpdateOptions: string;\r\nbegin\r\n Result := Result +\r\n ' ' + MAPCONTROLARRAYVAR + '.forEach(removeElement);' + LB +\r\n ' function removeElement(value){' + LB +\r\n ' ' + MAPVAR + '.removeControl(value);' + LB +\r\n ' }' + LB +\r\n ' ' + MAPCONTROLARRAYVAR + ' = [];' + LB + LB;\r\n\r\n Result := Result +\r\n ' if (' + PARAMSNAME + '[\"ShowZoomControl\"]){' + LB +\r\n ' ' + MAPVAR + '.addControl(' + MAPZOOMCONTROLVAR + ');' + LB +\r\n ' ' + MAPCONTROLARRAYVAR + '.push(' + MAPZOOMCONTROLVAR + ');' + LB +\r\n ' }' + LB + LB;\r\n\r\n Result := Result +\r\n ' if (' + PARAMSNAME + '[\"ZoomOnDblClick\"]){' + LB +\r\n ' ' + MAPVAR + '.doubleClickZoom.enable();' + LB +\r\n ' }' + LB +\r\n ' else{' + LB +\r\n ' ' + MAPVAR + '.doubleClickZoom.disable();' + LB +\r\n ' }' + LB + LB;\r\n\r\n Result := Result +\r\n ' if (' + PARAMSNAME + '[\"ZoomOnWheelScroll\"]){' + LB +\r\n ' ' + MAPVAR + '.scrollZoom.enable();' + LB +\r\n ' }' + LB +\r\n ' else{' + LB +\r\n ' ' + MAPVAR + '.scrollZoom.disable();' + LB +\r\n ' }' + LB + LB;\r\n\r\n Result := Result +\r\n ' if (' + PARAMSNAME + '[\"Panning\"]){' + LB +\r\n ' ' + MAPVAR + '.dragPan.enable();' + LB +\r\n ' }' + LB +\r\n ' else{' + LB +\r\n ' ' + MAPVAR + '.dragPan.disable();' + LB +\r\n ' }' + LB + LB;\r\n\r\n Result := Result + ' ' + MAPVAR + '.setLayoutProperty(''country-label'', ''text-field'', [''get'',''name_'' + ' + PARAMSNAME + '[\"Locale\"] + '''']);';\r\nend;\r\n\r\nfunction TTMSFNCMapsMapBox.GetZoomToBounds: string;\r\nbegin\r\n Result :=\r\n ' var sw = [' + PARAMSNAME + '[\"SouthWest\"][\"Longitude\"], ' + PARAMSNAME + '[\"SouthWest\"][\"Latitude\"]];' + LB +\r\n ' var ne = [' + PARAMSNAME + '[\"NorthEast\"][\"Longitude\"], ' + PARAMSNAME + '[\"NorthEast\"][\"Latitude\"]];' + LB +\r\n ' ' + MAPVAR + '.fitBounds([sw, ne], {duration: 0});';\r\nend;\r\n\r\nfunction TTMSFNCMapsMapBox.IsValid: Boolean;\r\nbegin\r\n Result := (MapsProperties.GetAPIKey <> '');\r\nend;\r\n\r\nprocedure TTMSFNCMapsMapBox.RemoveScripts;\r\nbegin\r\n {$IFDEF WEBLIB}\r\n asm\r\n if (window.mapboxgl){\r\n window.mapboxgl = undefined;\r\n }\r\n end;\r\n {$ENDIF}\r\nend;\r\n\r\nend.\r\n\r\n\r\n","{********************************************************************}\r\n{ }\r\n{ written by TMS Software }\r\n{ copyright (c) 2020 - 2023 }\r\n{ Email : info@tmssoftware.com }\r\n{ Web : http://www.tmssoftware.com }\r\n{ }\r\n{ The source code is given as is. The author is not responsible }\r\n{ for any possible damage done due to the use of this code. }\r\n{ The complete source code remains property of the author and may }\r\n{ not be distributed, published, given or sold in any form as such. }\r\n{ No parts of the source code can be included in any other component }\r\n{ or application without written authorization of the author. }\r\n{********************************************************************}\r\n\r\nunit WEBLib.TMSFNCMaps.MapKit;\r\n\r\n{$I WEBLib.TMSFNCDefines.inc}\r\n\r\n{$IFDEF WEBLIB}\r\n{$DEFINE LCLWEBLIB}\r\n{$ENDIF}\r\n{$IFDEF LCLLIB}\r\n{$DEFINE LCLWEBLIB}\r\n{$ENDIF}\r\n\r\ninterface\r\n\r\nconst\r\n MAPSERVICEVAR = 'window.mapkit';\r\n\r\nprocedure RegisterMapKitService;\r\nprocedure UnRegisterMapKitService;\r\n\r\nimplementation\r\n\r\nuses\r\n Classes, Math, DateUtils, Types, SysUtils, WEBLib.TMSFNCMaps, WEBLib.TMSFNCUtils, WEBLib.TMSFNCTypes, WEBLib.TMSFNCMapsCommonTypes\r\n {$IFDEF WEBLIB}\r\n ,Contnrs, Web\r\n {$ENDIF}\r\n {$IFNDEF LCLWEBLIB}\r\n ,Generics.Collections, Generics.Defaults\r\n {$HINTS OFF}\r\n {$IF COMPILERVERSION > 22}\r\n , UITypes\r\n {$IFEND}\r\n {$HINTS ON}\r\n {$ENDIF}\r\n {$IFDEF LCLLIB}\r\n ,fgl\r\n {$ENDIF}\r\n ;\r\n\r\ntype\r\n TTMSFNCMapsMapKitService = class;\r\n\r\n TTMSFNCMapsMapKitFactoryService = class(TTMSFNCMapsFactoryService, ITMSFNCMapsServiceMapKit);\r\n\r\n TTMSFNCMapsMapKitService = class(TTMSFNCMapsMapKitFactoryService)\r\n protected\r\n function DoCreateMaps: ITMSFNCCustomMaps; override;\r\n end;\r\n\r\ntype\r\n TTMSFNCMapsMapKit = class;\r\n\r\n TTMSFNCMapsMapKit = class(TTMSFNCCustomMapsInterfacedObject, ITMSFNCCustomMaps)\r\n protected\r\n procedure GetHeadLinks(const AList: TTMSFNCMapsLinksList);\r\n procedure RemoveScripts;\r\n function GetResetMap: string;\r\n function GetShowPopup: string;\r\n function GetClosePopup: string;\r\n function GetHeadStyle: string;\r\n function GetDelayLoadEvent: string;\r\n function GetMapsServiceCheck: string;\r\n function GetIdentifier: string;\r\n function GetInitializeMap: string;\r\n function GetInitializeEvents: string;\r\n function GetAddOrUpdateMarker: string;\r\n function GetDeleteMarker: string;\r\n function GetAddOrUpdatePolyElement: string;\r\n function GetDeletePolyElement: string;\r\n function GetZoomToBounds: string;\r\n function GetGetBounds: string;\r\n function GetSetCenterCoordinate: string;\r\n function GetGetCenterCoordinate: string;\r\n function GetGetZoomLevel: string;\r\n function GetSetZoomLevel: string;\r\n function GetLatLonToXY: string;\r\n function GetXYToLatLon: string;\r\n function GetUpdateOptions: string;\r\n function GetGlobalVariables: string;\r\n function GetAddCoordinateToArray: string;\r\n function GetAddHoleToArray: string;\r\n function GetInitializeCoordinateArray: string;\r\n function GetInitializeHolesArray: string;\r\n function IsValid: Boolean;\r\n procedure DestroyMaps;\r\n public\r\n constructor Create;\r\n destructor Destroy; override;\r\n end;\r\n\r\nvar\r\n MapsService: ITMSFNCMapsServiceMapKit;\r\n\r\nconst\r\n MAPKITAPIVERSION = '5.x.x';\r\n MAPKITAPIURL = 'https://cdn.apple-mapkit.com/mk/';\r\n MAPMAXZOOMLEVEL = 51200000;\r\n\r\nprocedure RegisterMapKitService;\r\nbegin\r\n if not TTMSFNCMapsPlatformServices.Current.SupportsPlatformService(ITMSFNCMapsServiceMapKit, IInterface(MapsService)) then\r\n begin\r\n MapsService := TTMSFNCMapsMapKitService.Create;\r\n TTMSFNCMapsPlatformServices.Current.AddPlatformService(ITMSFNCMapsServiceMapKit, MapsService);\r\n end;\r\nend;\r\n\r\nprocedure UnregisterMapKitService;\r\nbegin\r\n TTMSFNCMapsPlatformServices.Current.RemovePlatformService(ITMSFNCMapsServiceMapKit);\r\nend;\r\n\r\n{ TTMSFNCMapsMapKitService }\r\n\r\nfunction TTMSFNCMapsMapKitService.DoCreateMaps: ITMSFNCCustomMaps;\r\nbegin\r\n Result := TTMSFNCMapsMapKit.Create;\r\nend;\r\n\r\nconstructor TTMSFNCMapsMapKit.Create;\r\nbegin\r\n inherited;\r\nend;\r\n\r\ndestructor TTMSFNCMapsMapKit.Destroy;\r\nbegin\r\n inherited;\r\nend;\r\n\r\nprocedure TTMSFNCMapsMapKit.DestroyMaps;\r\nbegin\r\n MapsService.DestroyMaps(Self);\r\nend;\r\n\r\nfunction TTMSFNCMapsMapKit.GetMapsServiceCheck: string;\r\nbegin\r\n Result := '!' + MAPSERVICEVAR;\r\nend;\r\n\r\nfunction TTMSFNCMapsMapKit.GetResetMap: string;\r\nbegin\r\n Result := '';\r\nend;\r\n\r\nfunction TTMSFNCMapsMapKit.GetSetCenterCoordinate: string;\r\nbegin\r\n Result :=\r\n ' var co = new ' + MAPSERVICEVAR + '.Coordinate(' + PARAMSNAME + '[\"Latitude\"], ' + PARAMSNAME + '[\"Longitude\"]);' + LB +\r\n ' ' + MAPVAR + '.setCenterAnimated(co, true);';\r\nend;\r\n\r\nfunction TTMSFNCMapsMapKit.GetSetZoomLevel: string;\r\nbegin\r\n Result :=\r\n 'var zoomlevel = ' + IntToStr(MAPMAXZOOMLEVEL) + ' / (Math.pow(2, ' + PARAMSNAME + '));' + LB +\r\n ' ' + MAPVAR + '.setCameraDistanceAnimated(zoomlevel);';\r\nend;\r\n\r\nfunction TTMSFNCMapsMapKit.GetShowPopup: string;\r\nbegin\r\n Result :=\r\n ' var pid = ' + PARAMSNAME + '[\"ID\"];' + LB +\r\n ' var co = new ' + MAPSERVICEVAR + '.Coordinate(' + PARAMSNAME + '[\"Latitude\"], ' + PARAMSNAME + '[\"Longitude\"]);' + LB +\r\n ' var custompopup = function(coordinate, options) {' + LB +\r\n\r\n ' var div = document.createElement(\"div\");' + LB +\r\n ' div.className = ''bubble'';' + LB +\r\n ' var t = ' + PARAMSNAME + '[\"Text\"];' + LB +\r\n ' div.innerHTML = ''
'' + t + ''
''' + LB +\r\n ' return div;' + LB +\r\n ' };' + LB +\r\n ' ' + POPUPVAR + ' = new ' + MAPSERVICEVAR + '.Annotation(co, custompopup);' + LB +\r\n ' ' + MAPVAR + '.addAnnotation(' + POPUPVAR + ');' + LB +\r\n\r\n ' var closer = document.getElementById(''popup-closer-popup'' + pid);' + LB +\r\n ' closer.onclick = function() {' + LB +\r\n ' ' + MAPVAR + '.removeAnnotation(' + POPUPVAR + ');' + LB +\r\n ' closer.blur();' + LB +\r\n ' return false;' + LB +\r\n ' };'\r\n ;\r\nend;\r\n\r\nfunction TTMSFNCMapsMapKit.GetUpdateOptions: string;\r\nbegin\r\n Result :=\r\n ' ' + MAPVAR + '.isScrollEnabled = ' + PARAMSNAME + '[\"Panning\"];' + LB +\r\n ' ' + MAPVAR + '.showsMapTypeControl = ' + PARAMSNAME + '[\"ShowMapTypeControl\"];' + LB +\r\n ' ' + MAPVAR + '.showsZoomControl = ' + PARAMSNAME + '[\"ShowZoomControl\"];' + LB +\r\n ' ' + MAPVAR + '.isZoomEnabled = ((' + PARAMSNAME + '[\"ZoomOnDblClick\"]) && (' + PARAMSNAME + '[\"ZoomOnWheelScroll\"]));';\r\nend;\r\n\r\nfunction TTMSFNCMapsMapKit.GetZoomToBounds: string;\r\nbegin\r\n Result :=\r\n ' var def = new ' + MAPSERVICEVAR + '.BoundingRegion(' + PARAMSNAME + '[\"NorthEast\"][\"Latitude\"],' + PARAMSNAME + '[\"NorthEast\"][\"Longitude\"],' + PARAMSNAME + '[\"SouthWest\"][\"Latitude\"],' + PARAMSNAME + '[\"SouthWest\"][\"Longitude\"]);' + LB + LB +\r\n ' ' + MAPVAR + '.region = def.toCoordinateRegion();';\r\nend;\r\n\r\nfunction TTMSFNCMapsMapKit.GetAddCoordinateToArray: string;\r\nbegin\r\n Result := ' ' + COORDINATEARRAYVAR + '.push([' + PARAMSNAME + '[\"Latitude\"], ' + PARAMSNAME + '[\"Longitude\"]]);';\r\nend;\r\n\r\nfunction TTMSFNCMapsMapKit.GetAddHoleToArray: string;\r\nbegin\r\n Result := 'var o = ' + HOLEARRAYVAR + '[' + PARAMSNAME + '[0]];' + LB +\r\n 'if (o){' + LB +\r\n ' ' + HOLEARRAYVAR + '[' + PARAMSNAME + '[0]].push([' + PARAMSNAME + '[1][\"Latitude\"], ' + PARAMSNAME + '[1][\"Longitude\"]]);' + LB +\r\n '}else{' + LB +\r\n ' ' + HOLEARRAYVAR + '[' + PARAMSNAME + '[0]] = [[' + PARAMSNAME + '[1][\"Latitude\"], ' + PARAMSNAME + '[1][\"Longitude\"]]];' + LB +\r\n '}';\r\nend;\r\n\r\nfunction TTMSFNCMapsMapKit.GetAddOrUpdateMarker: string;\r\nbegin\r\n Result :=\r\n ' var co = new ' + MAPSERVICEVAR + '.Coordinate(' + PARAMSNAME + '[\"Latitude\"], ' + PARAMSNAME + '[\"Longitude\"]);' + LB +\r\n\r\n ' var markericon = ' + CUSTOMDEFAULTMARKERICON + '(' +\r\n PARAMSNAME + '[\"DefaultIcon\"],' + LB +\r\n PARAMSNAME + '[\"IconURL\"]);' + LB +\r\n\r\n ' if (!' + MARKERVAR + '){' + LB +\r\n ' if(markericon == \"\") {' + LB +\r\n ' ' + MARKERVAR + ' = new ' + MAPSERVICEVAR + '.MarkerAnnotation(co, { title: ' + PARAMSNAME + '[\"Title\"], visible: ' + PARAMSNAME + '[\"Visible\"], data: { id: ' + PARAMSNAME + '[\"ID\"] } } );' + LB +\r\n ' } else { ' + LB +\r\n ' ' + MARKERVAR + ' = new ' + MAPSERVICEVAR + '.ImageAnnotation(co, { title: ' + PARAMSNAME + '[\"Title\"], visible: ' + PARAMSNAME + '[\"Visible\"], data: { id: ' + PARAMSNAME + '[\"ID\"] }, url: { 1: markericon}});' + LB +\r\n ' }' + LB +\r\n ' ' + MARKERVAR + '.addEventListener(''select'', function(event){' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"MarkerClick\", ' + PARAMSNAME + '[\"ID\"]));' + LB +\r\n ' })' + LB + LB +\r\n ' ' + MAPVAR + '.addAnnotation(' + MARKERVAR + ');' + LB +\r\n ' } else {' + LB +\r\n ' ' + MARKERVAR + '.coordinate = co;' + LB +\r\n ' ' + MARKERVAR + '.title = ' + PARAMSNAME + '[\"Title\"];' + LB +\r\n ' ' + MARKERVAR + '.visible = ' + PARAMSNAME + '[\"Visible\"];' + LB +\r\n ' if(' + PARAMSNAME + '[\"IconURL\"] != \"\")' + LB +\r\n ' ' + MARKERVAR + '.url = { 1: ' + PARAMSNAME + '[\"IconURL\"] };' + LB +\r\n ' }';\r\nend;\r\n\r\nfunction TTMSFNCMapsMapKit.GetAddOrUpdatePolyElement: string;\r\nbegin\r\n Result :=\r\n ' var c = ' + PARAMSNAME + '[\"$type\"];' + LB +\r\n ' var options;'+ LB +\r\n\r\n ' switch(c){' + LB +\r\n ' case \"TTMSFNCMapsRectangle\":' + LB +\r\n ' case \"TTMSFNCMapsPolygon\":' + LB +\r\n ' case \"TTMSFNCMapsCircle\":' + LB +\r\n ' options = new ' + MAPSERVICEVAR + '.Style({' + LB +\r\n ' strokeColor: ' + PARAMSNAME + '[\"StrokeColor\"],' + LB +\r\n ' strokeOpacity: ' + PARAMSNAME + '[\"StrokeOpacity\"],' + LB +\r\n ' lineWidth: ' + PARAMSNAME + '[\"StrokeWidth\"],' + LB +\r\n ' fillColor: ' + PARAMSNAME + '[\"FillColor\"],' + LB +\r\n ' fillOpacity: ' + PARAMSNAME + '[\"FillOpacity\"],' + LB +\r\n ' fillRule: \"evenodd\",' + LB +\r\n ' });' + LB + LB +\r\n ' break;' + LB +\r\n ' case \"TTMSFNCMapsPolyline\":' + LB +\r\n ' options = new ' + MAPSERVICEVAR + '.Style({' + LB +\r\n ' strokeColor: ' + PARAMSNAME + '[\"StrokeColor\"],' + LB +\r\n ' strokeOpacity: ' + PARAMSNAME + '[\"StrokeOpacity\"],' + LB +\r\n ' lineWidth: ' + PARAMSNAME + '[\"StrokeWidth\"],' + LB +\r\n ' });' + LB + LB +\r\n ' break;' + LB +\r\n ' }' + LB + LB +\r\n\r\n ' function toCoordinates(array) {' + LB +\r\n ' return array.map(function(element) {' + LB +\r\n ' return new ' + MAPSERVICEVAR + '.Coordinate(element[0], element[1]);' + LB +\r\n ' });' + LB +\r\n ' }' + LB +\r\n\r\n ' switch(c){' + LB +\r\n ' case \"TTMSFNCMapsRectangle\":' + LB +\r\n ' var points = ' + COORDINATEARRAYVAR + ';' + lB +\r\n ' points.push([' + PARAMSNAME + '[\"Bounds\"][\"SouthWest\"][\"Latitude\"], ' + PARAMSNAME + '[\"Bounds\"][\"NorthEast\"][\"Longitude\"]]);' + LB +\r\n ' points.push([' + PARAMSNAME + '[\"Bounds\"][\"NorthEast\"][\"Latitude\"], ' + PARAMSNAME + '[\"Bounds\"][\"NorthEast\"][\"Longitude\"]]);' + LB +\r\n ' points.push([' + PARAMSNAME + '[\"Bounds\"][\"NorthEast\"][\"Latitude\"], ' + PARAMSNAME + '[\"Bounds\"][\"SouthWest\"][\"Longitude\"]]);' + LB +\r\n ' points.push([' + PARAMSNAME + '[\"Bounds\"][\"SouthWest\"][\"Latitude\"], ' + PARAMSNAME + '[\"Bounds\"][\"SouthWest\"][\"Longitude\"]]);' + LB +\r\n ' var coords = points.map(function(point) {' + lB +\r\n ' return new ' + MAPSERVICEVAR + '.Coordinate(point[0], point[1]);' + lB +\r\n ' });' + lB +\r\n ' break;' + LB +\r\n ' case \"TTMSFNCMapsPolyline\":' + LB +\r\n ' var coords = toCoordinates(' + COORDINATEARRAYVAR + ');' + LB +\r\n ' break;' + LB +\r\n ' case \"TTMSFNCMapsPolygon\":' + LB +\r\n ' var coords = [];' + LB +\r\n ' coords.push(toCoordinates(' + COORDINATEARRAYVAR + '));' + LB +\r\n ' for (var key in ' + HOLEARRAYVAR + '){' + LB +\r\n ' coords.push(toCoordinates(' + HOLEARRAYVAR + '[key]));' + LB +\r\n ' }' + LB +\r\n ' break;' + LB +\r\n ' case \"TTMSFNCMapsCircle\":' + LB +\r\n ' var coord = new ' + MAPSERVICEVAR + '.Coordinate(' + PARAMSNAME + '[\"Center\"][\"Latitude\"], ' + PARAMSNAME + '[\"Center\"][\"Longitude\"]);' +\r\n ' break;' + LB +\r\n ' }' + LB + LB +\r\n\r\n ' if (!' + POLYELEMENTVAR + '){' + LB +\r\n ' switch(c){' + LB +\r\n ' case \"TTMSFNCMapsPolyline\":' + LB +\r\n ' ' + POLYELEMENTVAR + ' = new ' + MAPSERVICEVAR + '.PolylineOverlay(coords, { style: options });' + LB +\r\n ' break;' + LB +\r\n ' case \"TTMSFNCMapsPolygon\":' + LB +\r\n ' case \"TTMSFNCMapsRectangle\":' + LB +\r\n ' ' + POLYELEMENTVAR + ' = new ' + MAPSERVICEVAR + '.PolygonOverlay(coords, { style: options });' + LB +\r\n ' break;' + LB +\r\n ' case \"TTMSFNCMapsCircle\":' + LB +\r\n ' ' + POLYELEMENTVAR + ' = new ' + MAPSERVICEVAR + '.CircleOverlay(coord, ' + PARAMSNAME + '[\"Radius\"], { style: options });' + LB +\r\n ' break;' + LB +\r\n ' }' + LB +\r\n ' ' + POLYELEMENTVAR + '.data = { id: ' + PARAMSNAME + '[\"ID\"] };' + LB +\r\n ' ' + POLYELEMENTVAR + '.addEventListener(''select'', function(event){' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"PolyElementClick\", ' + PARAMSNAME + '[\"ID\"]));' + LB +\r\n ' })' + LB + LB +\r\n ' ' + MAPVAR + '.addOverlay(' + POLYELEMENTVAR + ');' + LB +\r\n\r\n ' }else{' + LB +\r\n ' ' + POLYELEMENTVAR + '.style = options;' + LB +\r\n ' }' + LB + LB +\r\n\r\n ' ' + POLYELEMENTVAR + '.visible = ' + PARAMSNAME + '[\"Visible\"];' + LB + LB;\r\nend;\r\n\r\nfunction TTMSFNCMapsMapKit.GetClosePopup: string;\r\nbegin\r\n Result := ' ' + MAPVAR + '.removeAnnotation(' + POPUPVAR + ');';\r\nend;\r\n\r\nfunction TTMSFNCMapsMapKit.GetDelayLoadEvent: string;\r\nbegin\r\n Result := '';\r\nend;\r\n\r\nfunction TTMSFNCMapsMapKit.GetDeleteMarker: string;\r\nbegin\r\n Result := ' ' + MAPVAR + '.removeAnnotation(' + MARKERVAR + ');';\r\nend;\r\n\r\nfunction TTMSFNCMapsMapKit.GetDeletePolyElement: string;\r\nbegin\r\n Result := ' ' + MAPVAR + '.removeOverlay(' + POLYELEMENTVAR + ');';\r\nend;\r\n\r\nfunction TTMSFNCMapsMapKit.GetGetBounds: string;\r\nbegin\r\n Result :=\r\n ' var loc = ' + MAPVAR + '.region;' +\r\n ' var bounds = loc.toBoundingRegion(loc);' +\r\n ' jsonObj[\"NorthEast\"][\"Latitude\"] = bounds.northLatitude;' + LB +\r\n ' jsonObj[\"NorthEast\"][\"Longitude\"] = bounds.eastLongitude;' + LB +\r\n ' jsonObj[\"SouthWest\"][\"Latitude\"] = bounds.southLatitude;' + LB +\r\n ' jsonObj[\"SouthWest\"][\"Longitude\"] = bounds.westLongitude;';\r\nend;\r\n\r\nfunction TTMSFNCMapsMapKit.GetGetCenterCoordinate: string;\r\nbegin\r\n Result :=\r\n ' var loc = ' + MAPVAR + '.center;' + LB +\r\n ' jsonObj[\"Latitude\"] = loc.latitude;' + LB +\r\n ' jsonObj[\"Longitude\"] = loc.longitude;';\r\nend;\r\n\r\nfunction TTMSFNCMapsMapKit.GetLatLonToXY: string;\r\nbegin\r\n Result :=\r\n ' var loc = ' + MAPVAR + '.region;' +\r\n ' var bounds = loc.toBoundingRegion(loc);' +\r\n\r\n ' var coordinate = new ' + MAPSERVICEVAR + '.Coordinate(' + PARAMSNAME + '[\"Latitude\"], ' + PARAMSNAME + '[\"Longitude\"]);' + LB +\r\n ' var point = coordinate.toMapPoint();' + LB +\r\n\r\n ' var coordinateNE = new ' + MAPSERVICEVAR + '.Coordinate(bounds.northLatitude, bounds.westLongitude);' + LB +\r\n ' var pointNE = coordinateNE.toMapPoint();' + LB +\r\n\r\n ' var coordinateSW = new ' + MAPSERVICEVAR + '.Coordinate(bounds.southLatitude, bounds.eastLongitude);' + LB +\r\n ' var pointSW = coordinateSW.toMapPoint();' + LB +\r\n\r\n ' var heightMap = pointSW.y - pointNE.y;' + LB +\r\n ' var widthMap = pointSW.x - pointNE.x;' + LB +\r\n\r\n ' var heightPoint = point.y - pointNE.y;' + LB +\r\n ' var widthPoint = point.x - pointNE.x;' + LB +\r\n\r\n ' var heightResult = heightMap / heightPoint;' + LB +\r\n ' var widthResult = widthMap / widthPoint;' + LB +\r\n\r\n ' var heightDIV = document.getElementById(\"' + MAPID + '\").offsetHeight;' + LB +\r\n ' var widthDIV = document.getElementById(\"' + MAPID + '\").offsetWidth;' + LB +\r\n\r\n ' jsonObj[\"Y\"] = Math.ceil(parseFloat(heightDIV / heightResult));' + LB +\r\n ' jsonObj[\"X\"] = Math.ceil(parseFloat(widthDIV / widthResult));';\r\nend;\r\n\r\nfunction TTMSFNCMapsMapKit.GetXYToLatLon: string;\r\nbegin\r\n Result :=\r\n ' var loc = ' + MAPVAR + '.region;' +\r\n ' var bounds = loc.toBoundingRegion(loc);' +\r\n\r\n ' var pointX = ' + PARAMSNAME + '[\"X\"];' + LB +\r\n ' var pointY = ' + PARAMSNAME + '[\"Y\"];' + LB +\r\n\r\n ' var heightDIV = document.getElementById(\"' + MAPID + '\").offsetHeight;' + LB +\r\n ' var widthDIV = document.getElementById(\"' + MAPID + '\").offsetWidth;' + LB +\r\n\r\n ' var coordinateNE = new ' + MAPSERVICEVAR + '.Coordinate(bounds.northLatitude, bounds.westLongitude);' + LB +\r\n ' var pointNE = coordinateNE.toMapPoint();' + LB +\r\n\r\n ' var coordinateSW = new ' + MAPSERVICEVAR + '.Coordinate(bounds.southLatitude, bounds.eastLongitude);' + LB +\r\n ' var pointSW = coordinateSW.toMapPoint();' + LB +\r\n\r\n ' var heightMap = pointSW.y - pointNE.y;' + LB +\r\n ' var widthMap = pointSW.x - pointNE.x;' + LB +\r\n\r\n ' var resultY = (heightMap / heightDIV) * pointY;' + LB +\r\n ' var resultX = (widthMap / widthDIV) * pointX;' + LB +\r\n\r\n ' var point = new ' + MAPSERVICEVAR + '.MapPoint(pointNE.x + resultX, pointNE.y + resultY);' + LB +\r\n ' var coordinate = point.toCoordinate();' + LB +\r\n\r\n ' jsonObj[\"Latitude\"] = parseFloat(coordinate.latitude);' + LB +\r\n ' jsonObj[\"Longitude\"] = parseFloat(coordinate.longitude);';\r\nend;\r\n\r\nfunction TTMSFNCMapsMapKit.GetGetZoomLevel: string;\r\nbegin\r\n Result :=\r\n ' var maxzoomlevel = ' + IntToStr(MAPMAXZOOMLEVEL) + ';' + LB +\r\n ' var z = -1;' + LB +\r\n ' while (maxzoomlevel >= ' + MAPVAR + '.cameraDistance){' + LB +\r\n ' maxzoomlevel = maxzoomlevel / 2;' + LB +\r\n ' z++;' + LB +\r\n ' }';\r\nend;\r\n\r\nfunction TTMSFNCMapsMapKit.GetGlobalVariables: string;\r\nbegin\r\n Result :=\r\n 'function parseEvent(event, eventname, id = ''''){' + LB +\r\n ' var loc = {''Latitude'': 0, ''Longitude'': 0};' + LB +\r\n ' var x = 0.0;' + LB +\r\n ' var y = 0.0;' + LB +\r\n ' if ((eventname == \"MapMoveStart\") || (eventname == \"MapMoveEnd\")){ ' +\r\n ' var centerpt = ' + MAPVAR + '.center;' + LB +\r\n ' loc = {''Latitude'': centerpt.latitude, ''Longitude'': centerpt.longitude};' + LB +\r\n ' } else if (event) {' + LB +\r\n ' if (event.pointOnPage){' + LB +\r\n ' x = event.pointOnPage.x;' + LB +\r\n ' y = event.pointOnPage.y;' + LB +\r\n ' var dp = new DOMPoint(x, y);' + LB +\r\n ' var l = ' + MAPVAR + '.convertPointOnPageToCoordinate(dp);' + LB +\r\n ' loc = {''Latitude'': l.latitude, ''Longitude'': l.longitude};' + LB +\r\n ' }else if ((event.x) && (event.y)){' + LB +\r\n ' x = event.x;' + LB +\r\n ' y = event.y;' + LB +\r\n ' var dp = new DOMPoint(x, y);' + LB +\r\n ' var l = ' + MAPVAR + '.convertPointOnPageToCoordinate(dp);' + LB +\r\n ' loc = {''Latitude'': l.latitude, ''Longitude'': l.longitude};' + LB +\r\n ' }else{' + LB +\r\n ' if (event.target){' +\r\n ' if (event.target.coordinate){' + LB +\r\n ' loc = {''Latitude'': event.target.coordinate.latitude, ''Longitude'': event.target.coordinate.longitude};' + LB +\r\n ' }' +\r\n ' else if (event.target.points){' + LB +\r\n ' if (event.target.points.length > 0){' + LB +\r\n ' var p = event.target.points[0];' + LB +\r\n ' if (Array.isArray(p) && (p.length > 0)){' + LB +\r\n ' p = p[0]' + LB +\r\n ' }' + LB +\r\n ' loc = {''Latitude'': p.latitude, ''Longitude'': p.longitude};' + LB +\r\n ' }' + LB +\r\n ' }' + LB +\r\n ' }' + LB +\r\n ' }' + LB +\r\n ' }' + LB +\r\n\r\n ' var r = {''Coordinate'': loc, ''X'': x, ''Y'': y, ''ID'': id, ''EventName'': eventname};' + LB +\r\n ' return r;' + LB +\r\n '}';\r\nend;\r\n\r\nprocedure TTMSFNCMapsMapKit.GetHeadLinks(\r\n const AList: TTMSFNCMapsLinksList);\r\nbegin\r\n AList.Add(TTMSFNCMapsLink.CreateScript(MAPKITAPIURL + MAPKITAPIVERSION + '/mapkit.js', 'text/javascript', 'utf-8'));\r\nend;\r\n\r\nfunction TTMSFNCMapsMapKit.GetHeadStyle: string;\r\nbegin\r\n Result :=\r\n\r\n '.bubble {' + LB +\r\n ' background-color: #FAFAFA;' + LB +\r\n\t\t' border-radius: 5px;' + LB +\r\n\t\t' box-shadow: 0 0 6px #B2B2B2;' + LB +\r\n\t\t' display: inline-block;' + LB +\r\n\t\t' padding: 10px 28px 10px 18px;' + LB +\r\n\t\t' position: relative;' + LB +\r\n\t\t' vertical-align: top;' + LB +\r\n\t\t' margin: 20px 10px;' + LB +\r\n ' font-family: sans-serif;' + LB +\r\n '}' + LB +\r\n '.bubble::before {' + LB +\r\n ' background-color: #FAFAFA; ' + LB +\r\n ' content: \"\";' + LB +\r\n ' display: block;' + LB +\r\n ' height: 16px;' + LB +\r\n ' width: 16px;' + LB +\r\n ' position: absolute;' + LB +\r\n ' bottom: -7.5px;' + LB +\r\n ' left: 50%;' + LB +\r\n ' right: 50%;' + LB +\r\n ' transform: rotate(47deg) skew(5deg);' + LB +\r\n '\t -moz-transform: rotate(47deg) skew(5deg);' + LB +\r\n ' -ms-transform: rotate(47deg) skew(5deg);' + LB +\r\n ' -o-transform: rotate(47deg) skew(5deg);' + LB +\r\n ' -webkit-transform: rotate(47deg) skew(5deg);' + LB +\r\n ' box-shadow: 2px 2px 2px 0 rgba( 178, 178, 178, .4 );' + LB +\r\n '}' + LB +\r\n '.ol-popup:before {' + LB +\r\n ' border-top-color: #cccccc;' + LB +\r\n ' border-width: 11px;' + LB +\r\n ' left: 48px;' + LB +\r\n ' margin-left: -11px;' + LB +\r\n '}' + LB +\r\n '.ol-popup-closer {' + LB +\r\n ' text-decoration: none;' + LB +\r\n ' position: absolute;' + LB +\r\n ' top: 2px;' + LB +\r\n ' right: 8px;' + LB +\r\n '}' + LB +\r\n '.ol-popup-closer:after {' + LB +\r\n ' content: \"✖\";' + LB +\r\n '}';\r\nend;\r\n\r\nfunction TTMSFNCMapsMapKit.GetIdentifier: string;\r\nbegin\r\n Result := 'Apple MapKit';\r\nend;\r\n\r\nfunction TTMSFNCMapsMapKit.GetInitializeCoordinateArray: string;\r\nbegin\r\n Result := '[]';\r\nend;\r\n\r\nfunction TTMSFNCMapsMapKit.GetInitializeHolesArray: string;\r\nbegin\r\n Result := '[]';\r\nend;\r\n\r\nfunction TTMSFNCMapsMapKit.GetInitializeEvents: string;\r\nbegin\r\n Result :=\r\n ' ' + MAPVAR + '.addEventListener(''zoom-end'', function(){' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(null, \"ZoomChanged\"));' + LB +\r\n ' })' + LB + LB +\r\n ' ' + MAPVAR + '.addEventListener(''map-type-change'', function(){' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(null, \"MapTypeChanged\"));' + LB +\r\n ' })' + LB + LB +\r\n ' ' + MAPVAR + '.addEventListener(''rotation-end'', function(event){' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(null, \"MapRotationChanged\"), ' + MAPVAR +'.rotation);' + LB +\r\n ' })' + LB + LB +\r\n ' ' + MAPVAR + '.addEventListener(''scroll-start'', function(event){' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"MapMoveStart\"));' + LB +\r\n ' })' + LB + LB +\r\n ' ' + MAPVAR + '.addEventListener(''scroll-end'', function(event){' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"MapMoveEnd\"));' + LB +\r\n ' })' + LB + LB +\r\n ' ' + MAPVAR + '.addEventListener(''single-tap'', function(event){' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"MapClick\"));' + LB +\r\n ' })' + LB + LB +\r\n ' ' + MAPVAR + '.element.addEventListener(''click'', function(event){' + LB +\r\n ' ' + MAPVAR + '.selectedAnnotation = null;' + LB +\r\n ' ' + MAPVAR + '.selectedOverlay = null;' + LB +\r\n ' })' + LB + LB +\r\n ' ' + MAPVAR + '.addEventListener(''double-tap'', function(event){' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"MapDblClick\"));' + LB +\r\n ' })' + LB + LB +\r\n ' ' + MAPVAR + '.element.addEventListener(''mousemove'', function(event){' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"MapMouseMove\"));' + LB +\r\n ' })' + LB + LB +\r\n ' ' + MAPVAR + '.element.addEventListener(''mouseover'', function(event){' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"MapMouseEnter\"));' + LB +\r\n ' })' + LB + LB +\r\n ' ' + MAPVAR + '.element.addEventListener(''mouseout'', function(event){' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"MapMouseLeave\"));' + LB +\r\n ' })';\r\nend;\r\n\r\nfunction TTMSFNCMapsMapKit.GetInitializeMap: string;\r\nvar\r\n v: string;\r\nbegin\r\n v := MAPSERVICEVAR;\r\n Result :=\r\n ' ' + v + '.init({' + LB +\r\n ' language: ''' + MapsProperties.GetLocale + ''',' + LB +\r\n ' authorizationCallback: function(done) {' + LB +\r\n ' done(\"' + MapsProperties.GetAPIKey + '\");' + LB +\r\n ' },' + LB +\r\n ' });' + LB + LB +\r\n\r\n ' ' + MAPVAR + ' = new ' + MAPSERVICEVAR + '.Map(\"' + MAPID + '\");' + LB +\r\n ' var co = new ' + MAPSERVICEVAR + '.Coordinate(' + MapsProperties.GetDefaultLatitude + ', ' + MapsProperties.GetDefaultLongitude + ');' + LB +\r\n ' ' + MAPVAR + '.center = co;' + LB +\r\n ' var zoomlevel = ' + IntToStr(MAPMAXZOOMLEVEL) + ' / (Math.pow(2, ' + MapsProperties.GetDefaultZoomLevel + '));' + LB +\r\n ' ' + MAPVAR + '.cameraDistance = zoomlevel;' + LB +\r\n ' ' + MAPVAR + '.isScrollEnabled = ' + BoolToStrEx(MapsProperties.GetPanning) + ';' + LB +\r\n ' ' + MAPVAR + '.showsMapTypeControl = ' + BoolToStrEx(MapsProperties.GetShowMapTypeControl) + ';' + LB +\r\n ' ' + MAPVAR + '.showsZoomControl = ' + BoolToStrEx(MapsProperties.GetShowZoomControl) + ';' + LB +\r\n ' ' + MAPVAR + '.isZoomEnabled = ((' + BoolToStrEx(MapsProperties.GetZoomOnDblClick) + ') && (' + BoolToStrEx(MapsProperties.GetZoomOnWheelScroll) + '));';\r\nend;\r\n\r\nfunction TTMSFNCMapsMapKit.IsValid: Boolean;\r\nbegin\r\n Result := MapsProperties.GetAPIKey <> '';\r\nend;\r\n\r\nprocedure TTMSFNCMapsMapKit.RemoveScripts;\r\nbegin\r\n {$IFDEF WEBLIB}\r\n asm\r\n let keywords = ['cdn.apple-mapkit'];\r\n\r\n if (window.mapkit){\r\n window.mapkit = undefined;\r\n }\r\n\r\n let scripts = document.querySelectorAll('script,link');\r\n for (let i = scripts.length - 1; i >= 0; i--) {\r\n let scriptSource = scripts[i].getAttribute('src');\r\n if (!scriptSource){\r\n scriptSource = scripts[i].getAttribute('href');\r\n }\r\n if (scriptSource != null) {\r\n if (keywords.filter(item => scriptSource.includes(item)).length) {\r\n scripts[i].remove();\r\n // scripts[i].parentNode.removeChild(scripts[i]);\r\n }\r\n }\r\n }\r\n end;\r\n {$ENDIF}\r\nend;\r\n\r\nend.\r\n\r\n","{********************************************************************}\r\n{ }\r\n{ written by TMS Software }\r\n{ copyright (c) 2020 - 2025 }\r\n{ Email : info@tmssoftware.com }\r\n{ Web : http://www.tmssoftware.com }\r\n{ }\r\n{ The source code is given as is. The author is not responsible }\r\n{ for any possible damage done due to the use of this code. }\r\n{ The complete source code remains property of the author and may }\r\n{ not be distributed, published, given or sold in any form as such. }\r\n{ No parts of the source code can be included in any other component }\r\n{ or application without written authorization of the author. }\r\n{********************************************************************}\r\n\r\nunit WEBLib.TMSFNCOpenLayers;\r\n\r\n{$I WEBLib.TMSFNCDefines.inc}\r\n\r\n{$IFDEF WEBLIB}\r\n{$DEFINE LCLWEBLIB}\r\n{$ENDIF}\r\n{$IFDEF LCLLIB}\r\n{$DEFINE LCLWEBLIB}\r\n{$ENDIF}\r\n\r\ninterface\r\n\r\nuses\r\n Classes, Types, WEBLib.Forms\r\n {$IFNDEF LCLWEBLIB}\r\n ,Generics.Collections\r\n {$ENDIF}\r\n {$IFDEF LCLLIB}\r\n ,fgl\r\n {$ENDIF}\r\n {$IFDEF WEBLIB}\r\n ,web, Contnrs\r\n {$ENDIF}\r\n ,WEBLib.TMSFNCWebBrowser\r\n ,WEBLib.TMSFNCMapsCommonTypes\r\n ,WEBLib.TMSFNCTypes\r\n ,WEBLib.TMSFNCGraphicsTypes\r\n ,WEBLib.TMSFNCMaps;\r\n\r\nconst\r\n MAJ_VER = 4; // Major version nr.\r\n MIN_VER = 1; // Minor version nr.\r\n REL_VER = 0; // Release nr.\r\n BLD_VER = 0; // Build nr.\r\n\r\n //v1.0.0.0: First release\r\n // : New : Options.TileServer property\r\n //v1.0.1.0: New : Support for TileLayers\r\n //v1.0.2.0: New : Support to update TileLayers\r\n //v1.1.0.0: New : Support for Polyline/Polygon Labels\r\n // : New : Improved TileServer updating\r\n // : Fixed : Issue with flickering when updating maps\r\n //v1.1.1.0: New : Added Polyline.Label.BackgroundColor/BorderColor/Padding properties\r\n //v1.1.1.1: Improved : Polyline.Label.BackgroundColor/BorderColor rendering\r\n //v1.2.0.0: New : Draggable Markers and Poly elements\r\n //v1.2.0.1: Fixed : Issue with popup visible when dragging markers\r\n //v1.3.0.0: New : OnMapRenderComplete event added\r\n //v1.3.0.1: Fixed : Issue with popup position after marker changed position\r\n //v1.3.0.2: Fixed : API URLs updated\r\n //v1.4.0.0: New : Complex Polygons support added\r\n //v1.5.0.0: New : Marker Clusters support added\r\n //v1.6.0.0: New : Support for WMS and GeoJSON type tilelayers\r\n // : New : LibraryLocation property for offline support\r\n // : New : Options.ShowBaseLayer property\r\n //v1.6.0.1: Fixed : Issue with MarkerMouseEnter/MarkerMouseLeave events\r\n //v2.0.0.0: New : OpenLayers v8 API compatibilty\r\n //v3.0.0.0: New : OpenLayers v9 API compatibilty\r\n // : Fixed : Issue with CloseAllPopups in TMS WEB Core\r\n //v3.0.0.1: Fixed : Issue with Runtime Packages\r\n //v4.0.0.0: New : OpenLayers v10 API compatibilty\r\n // : New : HeatMaps added\r\n // : New : Options.Version property added to select the OpenLayers API version\r\n // : New : OnMapRightClick, OnMarkerRightClick, OnPolyElementRightClick events\r\n //v4.1.0.0: New : Layers CSSClassName property added\r\n // : New : Clusters: ImagePath, FillColor, FontColor, StrokeColor added\r\n\r\ntype\r\n TTMSFNCCustomOpenLayers = class;\r\n TTMSFNCOpenLayersCluster = class;\r\n TTMSFNCOpenLayersLabelClass = class of TTMSFNCOpenLayersLabel;\r\n\r\n TTMSFNCOpenLayersLabel = class(TPersistent)\r\n private\r\n FOnChange: TNotifyEvent;\r\n FText: string;\r\n FOffsetX: Double;\r\n FOffsetY: Double;\r\n FFontSize: Integer;\r\n FFontColor: TTMSFNCGraphicsColor;\r\n FBorderColor: TTMSFNCGraphicsColor;\r\n FPadding: Integer;\r\n FBackgroundColor: TTMSFNCGraphicsColor;\r\n procedure SetBackgroundColor(const Value: TTMSFNCGraphicsColor);\r\n procedure SetBorderColor(const Value: TTMSFNCGraphicsColor);\r\n procedure SetFontColor(const Value: TTMSFNCGraphicsColor);\r\n procedure SetFontSize(const Value: Integer);\r\n procedure SetOffsetX(const Value: Double);\r\n procedure SetOffsetY(const Value: Double);\r\n procedure SetPadding(const Value: Integer);\r\n procedure SetText(const Value: string);\r\n protected\r\n procedure Changed;\r\n public\r\n procedure Assign(Source: TPersistent); override;\r\n constructor Create; virtual;\r\n property OnChange: TNotifyEvent read FOnChange write FOnChange;\r\n published\r\n property Text: string read FText write SetText;\r\n property OffsetX: Double read FOffsetX write SetOffsetX;\r\n property OffsetY: Double read FOffsetY write SetOffsetY;\r\n property FontColor: TTMSFNCGraphicsColor read FFontColor write SetFontColor default gcBlack;\r\n property FontSize: Integer read FFontSize write SetFontSize default 12;\r\n property BackgroundColor: TTMSFNCGraphicsColor read FBackgroundColor write SetBackgroundColor default gcWhite;\r\n property BorderColor: TTMSFNCGraphicsColor read FBorderColor write SetBorderColor default gcBlack;\r\n property Padding: Integer read FPadding write SetPadding default 3;\r\n end;\r\n\r\n TTMSFNCOpenLayersPolygon = class(TTMSFNCMapsPolygon)\r\n private\r\n FLabel: TTMSFNCOpenLayersLabel;\r\n FDraggable: Boolean;\r\n procedure SetLabel(const Value: TTMSFNCOpenLayersLabel);\r\n procedure SetDraggable(const Value: Boolean);\r\n public\r\n constructor Create(ACollection: TCollection); override;\r\n procedure Assign(Source: TPersistent); override;\r\n destructor Destroy; override;\r\n procedure LabelChanged(Sender: TObject);\r\n function AddHole(ACoordinates: TTMSFNCMapsCoordinateRecArray): TTMSFNCMapsPolyElementHole; override;\r\n published\r\n property Draggable: Boolean read FDraggable write SetDraggable default false;\r\n property &Label: TTMSFNCOpenLayersLabel read FLabel write SetLabel;\r\n property Holes;\r\n end;\r\n\r\n TTMSFNCOpenLayersPolygons = class(TTMSFNCMapsPolygons)\r\n private\r\n function GetItem(Index: Integer): TTMSFNCOpenLayersPolygon;\r\n procedure SetItem(Index: Integer; const Value: TTMSFNCOpenLayersPolygon);\r\n protected\r\n function CreateItemClass: TCollectionItemClass; override;\r\n public\r\n property Items[Index: Integer]: TTMSFNCOpenLayersPolygon read GetItem write SetItem; default;\r\n function Add: TTMSFNCOpenLayersPolygon;\r\n function Insert(Index: Integer): TTMSFNCOpenLayersPolygon;\r\n end;\r\n\r\n TTMSFNCOpenLayersPolyline = class(TTMSFNCMapsPolyline)\r\n private\r\n FLabel: TTMSFNCOpenLayersLabel;\r\n FDraggable: Boolean;\r\n procedure SetLabel(const Value: TTMSFNCOpenLayersLabel);\r\n procedure SetDraggable(const Value: Boolean);\r\n public\r\n constructor Create(ACollection: TCollection); override;\r\n procedure Assign(Source: TPersistent); override;\r\n destructor Destroy; override;\r\n procedure LabelChanged(Sender: TObject);\r\n published\r\n property &Label: TTMSFNCOpenLayersLabel read FLabel write SetLabel;\r\n property Draggable: Boolean read FDraggable write SetDraggable default False;\r\n end;\r\n\r\n TTMSFNCOpenLayersPolylines = class(TTMSFNCMapsPolylines)\r\n private\r\n function GetItem(Index: Integer): TTMSFNCOpenLayersPolyline;\r\n procedure SetItem(Index: Integer; const Value: TTMSFNCOpenLayersPolyline);\r\n protected\r\n function CreateItemClass: TCollectionItemClass; override;\r\n public\r\n property Items[Index: Integer]: TTMSFNCOpenLayersPolyline read GetItem write SetItem; default;\r\n function Add: TTMSFNCOpenLayersPolyline;\r\n function Insert(Index: Integer): TTMSFNCOpenLayersPolyline;\r\n end;\r\n\r\n TTMSFNCOpenLayersCircle = class(TTMSFNCMapsCircle)\r\n private\r\n FDraggable: Boolean;\r\n procedure SetDraggable(const Value: Boolean);\r\n public\r\n procedure Assign(Source: TPersistent); override;\r\n constructor Create(ACollection: TCollection); override;\r\n destructor Destroy; override;\r\n published\r\n property Draggable: Boolean read FDraggable write SetDraggable default False;\r\n end;\r\n\r\n TTMSFNCOpenLayersCircles = class(TTMSFNCMapsCircles)\r\n private\r\n function GetItem(Index: Integer): TTMSFNCOpenLayersCircle;\r\n procedure SetItem(Index: Integer; const Value: TTMSFNCOpenLayersCircle);\r\n protected\r\n function CreateItemClass: TCollectionItemClass; override;\r\n public\r\n property Items[Index: Integer]: TTMSFNCOpenLayersCircle read GetItem write SetItem; default;\r\n function Add: TTMSFNCOpenLayersCircle;\r\n function Insert(Index: Integer): TTMSFNCOpenLayersCircle;\r\n end;\r\n\r\n TTMSFNCOpenLayersRectangle = class(TTMSFNCMapsRectangle)\r\n private\r\n FDraggable: Boolean;\r\n procedure SetDraggable(const Value: Boolean);\r\n public\r\n procedure Assign(Source: TPersistent); override;\r\n constructor Create(ACollection: TCollection); override;\r\n destructor Destroy; override;\r\n published\r\n property Draggable: Boolean read FDraggable write SetDraggable default False;\r\n end;\r\n\r\n TTMSFNCOpenLayersRectangles = class(TTMSFNCMapsRectangles)\r\n private\r\n function GetItem(Index: Integer): TTMSFNCOpenLayersRectangle;\r\n procedure SetItem(Index: Integer; const Value: TTMSFNCOpenLayersRectangle);\r\n protected\r\n function CreateItemClass: TCollectionItemClass; override;\r\n public\r\n property Items[Index: Integer]: TTMSFNCOpenLayersRectangle read GetItem write SetItem; default;\r\n function Add: TTMSFNCOpenLayersRectangle;\r\n function Insert(Index: Integer): TTMSFNCOpenLayersRectangle;\r\n end;\r\n\r\n TTMSFNCOpenLayersMarker = class(TTMSFNCMapsMarker)\r\n private\r\n FDraggable: Boolean;\r\n FCluster: TTMSFNCOpenLayersCluster;\r\n procedure SetDraggable(const Value: Boolean);\r\n public\r\n constructor Create(ACollection: TCollection); override;\r\n destructor Destroy; override;\r\n property Cluster: TTMSFNCOpenLayersCluster read FCluster write FCluster;\r\n published\r\n property Draggable: Boolean read FDraggable write SetDraggable default False;\r\n end;\r\n\r\n TTMSFNCOpenLayersMarkers = class(TTMSFNCMapsMarkers)\r\n private\r\n function GetItem(Index: Integer): TTMSFNCOpenLayersMarker;\r\n procedure SetItem(Index: Integer; const Value: TTMSFNCOpenLayersMarker);\r\n protected\r\n function CreateItemClass: TCollectionItemClass; override;\r\n public\r\n property Items[Index: Integer]: TTMSFNCOpenLayersMarker read GetItem write SetItem; default;\r\n function Add: TTMSFNCOpenLayersMarker;\r\n function Insert(Index: Integer): TTMSFNCOpenLayersMarker;\r\n end;\r\n\r\n {$IFDEF WEBLIB}\r\n TTMSFNCOpenLayersMarkersList = class(TList)\r\n private\r\n function GetItem(Index: Integer): TTMSFNCOpenLayersMarker;\r\n procedure SetItem(Index: Integer; const Value: TTMSFNCOpenLayersMarker);\r\n public\r\n property Items[Index: Integer]: TTMSFNCOpenLayersMarker read GetItem write SetItem; default;\r\n end;\r\n {$ENDIF}\r\n {$IFNDEF WEBLIB}\r\n TTMSFNCOpenLayersMarkersList = class(TList);\r\n {$ENDIF}\r\n\r\n TTMSFNCOpenLayersCluster = class(TCollectionItem)\r\n private\r\n FReload: Boolean;\r\n FMarkers: TTMSFNCOpenLayersMarkersList;\r\n FID: string;\r\n FOwner: TTMSFNCCustomMaps;\r\n FDataBoolean: Boolean;\r\n FDataString: String;\r\n FDataObject: TObject;\r\n FDataInteger: NativeInt;\r\n FDataPointer: Pointer;\r\n FRecreate: Boolean;\r\n FImagePath: string;\r\n FFontColor: TTMSFNCGraphicsColor;\r\n FFillColor: TTMSFNCGraphicsColor;\r\n FStrokeColor: TTMSFNCGraphicsColor;\r\n function GetID: string;\r\n function GetMarkers: TTMSFNCOpenLayersMarkersList;\r\n procedure SetFontColor(const Value: TTMSFNCGraphicsColor);\r\n procedure SetImagePath(const Value: string);\r\n function IsImagePathStored: Boolean;\r\n procedure SetFillColor(const Value: TTMSFNCGraphicsColor);\r\n procedure SetStrokeColor(const Value: TTMSFNCGraphicsColor);\r\n protected\r\n procedure UpdateCluster; virtual;\r\n public\r\n constructor Create(ACollection: TCollection); override;\r\n procedure Assign(Source: TPersistent); override;\r\n destructor Destroy; override;\r\n property DataPointer: Pointer read FDataPointer write FDataPointer;\r\n property DataBoolean: Boolean read FDataBoolean write FDataBoolean;\r\n property DataObject: TObject read FDataObject write FDataObject;\r\n property DataString: String read FDataString write FDataString;\r\n property DataInteger: NativeInt read FDataInteger write FDataInteger;\r\n property Markers: TTMSFNCOpenLayersMarkersList read GetMarkers;\r\n property Recreate: Boolean read FRecreate write FRecreate;\r\n published\r\n property ID: string read GetID;\r\n property ImagePath: string read FImagePath write SetImagePath stored IsImagePathStored nodefault;\r\n property StrokeColor: TTMSFNCGraphicsColor read FStrokeColor write SetStrokeColor default gcWhite;\r\n property FillColor: TTMSFNCGraphicsColor read FFillColor write SetFillColor default gcLightskyblue;\r\n property FontColor: TTMSFNCGraphicsColor read FFontColor write SetFontColor default gcWhite;\r\n end;\r\n\r\n {$IFDEF WEBLIB}\r\n TTMSFNCOpenLayersClusters = class(TTMSFNCOwnedCollection)\r\n {$ELSE}\r\n TTMSFNCOpenLayersClusters = class({$IFDEF LCLLIB}specialize {$ENDIF}TTMSFNCOwnedCollection)\r\n {$ENDIF}\r\n private\r\n FOwner: TTMSFNCCustomMaps;\r\n function GetItem(Index: Integer): TTMSFNCOpenLayersCluster;\r\n procedure SetItem(Index: Integer; const Value: TTMSFNCOpenLayersCluster);\r\n protected\r\n function CreateItemClass: TCollectionItemClass; virtual;\r\n function GetOwner: TPersistent; override;\r\n public\r\n constructor Create(AOwner: TTMSFNCCustomMaps); virtual;\r\n property Items[Index: Integer]: TTMSFNCOpenLayersCluster read GetItem write SetItem; default;\r\n procedure Clear; virtual;\r\n procedure Recreate; virtual;\r\n function Add: TTMSFNCOpenLayersCluster;\r\n function Insert(Index: Integer): TTMSFNCOpenLayersCluster;\r\n end;\r\n\r\n TTMSFNCOpenLayersHeatMap = class(TTMSFNCMapsHeatMap)\r\n public\r\n constructor Create(ACollection: TCollection); override;\r\n procedure Assign(Source: TPersistent); override;\r\n destructor Destroy; override;\r\n end;\r\n\r\n TTMSFNCOpenLayersHeatMaps = class(TTMSFNCMapsHeatMaps)\r\n private\r\n function GetItem(Index: Integer): TTMSFNCOpenLayersHeatMap;\r\n procedure SetItem(Index: Integer; const Value: TTMSFNCOpenLayersHeatMap);\r\n protected\r\n function CreateItemClass: TCollectionItemClass; override;\r\n public\r\n property Items[Index: Integer]: TTMSFNCOpenLayersHeatMap read GetItem write SetItem; default;\r\n function Add: TTMSFNCOpenLayersHeatMap;\r\n function Insert(Index: Integer): TTMSFNCOpenLayersHeatMap;\r\n end;\r\n\r\n TTMSFNCOpenLayersTileLayerSource = (tlsXYZ, tlsWMS, tlsJSON);\r\n\r\n TTMSFNCOpenLayersTileLayerParams = class(TPersistent)\r\n private\r\n FOnChange: TNotifyEvent;\r\n FLayers: string;\r\n procedure SetLayers(const Value: string);\r\n protected\r\n procedure Changed;\r\n public\r\n procedure Assign(Source: TPersistent); override;\r\n constructor Create; virtual;\r\n property OnChange: TNotifyEvent read FOnChange write FOnChange;\r\n published\r\n property Layers: string read FLayers write SetLayers;\r\n end;\r\n\r\n TTMSFNCOpenLayersTileLayer = class(TCollectionItem)\r\n private\r\n FReload: Boolean;\r\n FID: string;\r\n FOwner: TTMSFNCCustomMaps;\r\n FDataBoolean: Boolean;\r\n FDataString: String;\r\n FDataObject: TObject;\r\n FDataInteger: NativeInt;\r\n FDataPointer: Pointer;\r\n FRecreate: Boolean;\r\n FURL: string;\r\n FOpacity: Single;\r\n FSource: TTMSFNCOpenLayersTileLayerSource;\r\n FParams: TTMSFNCOpenLayersTileLayerParams;\r\n FCSSClassName: string;\r\n function GetID: string;\r\n function IsURLStored: Boolean;\r\n function IsOpacityStored: Boolean;\r\n procedure SetOpacity(const Value: Single);\r\n procedure SetURL(const Value: string);\r\n procedure SetSource(const Value: TTMSFNCOpenLayersTileLayerSource);\r\n procedure SetParams(const Value: TTMSFNCOpenLayersTileLayerParams);\r\n procedure SetCSSClassName(const Value: string);\r\n protected\r\n procedure DoParamsChanged(Sender: TObject);\r\n procedure UpdateTileLayer; virtual;\r\n public\r\n constructor Create(ACollection: TCollection); override;\r\n procedure Assign(Source: TPersistent); override;\r\n destructor Destroy; override;\r\n property DataPointer: Pointer read FDataPointer write FDataPointer;\r\n property DataBoolean: Boolean read FDataBoolean write FDataBoolean;\r\n property DataObject: TObject read FDataObject write FDataObject;\r\n property DataString: String read FDataString write FDataString;\r\n property DataInteger: NativeInt read FDataInteger write FDataInteger;\r\n property Recreate: Boolean read FRecreate write FRecreate;\r\n published\r\n property ID: string read GetID;\r\n property URL: string read FURL write SetURL stored IsURLStored nodefault;\r\n property Opacity: Single read FOpacity write SetOpacity stored IsOpacityStored nodefault;\r\n property Source: TTMSFNCOpenLayersTileLayerSource read FSource write SetSource default tlsXYZ;\r\n property Params: TTMSFNCOpenLayersTileLayerParams read FParams write SetParams;\r\n property CSSClassName: string read FCSSClassName write SetCSSClassName;\r\n end;\r\n\r\n {$IFDEF WEBLIB}\r\n TTMSFNCOpenLayersTileLayers = class(TTMSFNCOwnedCollection)\r\n {$ELSE}\r\n TTMSFNCOpenLayersTileLayers = class({$IFDEF LCLLIB}specialize {$ENDIF}TTMSFNCOwnedCollection)\r\n {$ENDIF}\r\n private\r\n FOwner: TTMSFNCCustomMaps;\r\n function GetItem(Index: Integer): TTMSFNCOpenLayersTileLayer;\r\n procedure SetItem(Index: Integer; const Value: TTMSFNCOpenLayersTileLayer);\r\n protected\r\n function CreateItemClass: TCollectionItemClass; virtual;\r\n function GetOwner: TPersistent; override;\r\n public\r\n constructor Create(AOwner: TTMSFNCCustomMaps); virtual;\r\n property Items[Index: Integer]: TTMSFNCOpenLayersTileLayer read GetItem write SetItem; default;\r\n procedure Clear; virtual;\r\n procedure Recreate; virtual;\r\n function Add: TTMSFNCOpenLayersTileLayer;\r\n function Insert(Index: Integer): TTMSFNCOpenLayersTileLayer;\r\n end;\r\n\r\n TTMSFNCOpenLayersOptions = class(TTMSFNCMapsOptions)\r\n private\r\n FTileServer: string;\r\n FShowBaseLayer: Boolean;\r\n FVersion: string;\r\n procedure SetTileServer(const Value: string);\r\n procedure SetShowBaseLayer(const Value: Boolean);\r\n procedure SetVersion(const Value: string);\r\n public\r\n constructor Create; override;\r\n published\r\n property TileServer: string read FTileServer write SetTileServer;\r\n property ShowBaseLayer: Boolean read FShowBaseLayer write SetShowBaseLayer default True;\r\n property Version: string read FVersion write SetVersion;\r\n end;\r\n\r\n TTMSFNCCustomOpenLayers = class(TTMSFNCCustomMaps)\r\n private\r\n FTileLayers: TTMSFNCOpenLayersTileLayers;\r\n FOnPolyElementDragEnd: TTMSFNCMapsBaseEvent;\r\n FOnMarkerDragEnd: TTMSFNCMapsBaseEvent;\r\n FOnMapRenderComplete: TNotifyEvent;\r\n FClusters: TTMSFNCOpenLayersClusters;\r\n FOnClusterClick: TTMSFNCMapsBaseEvent;\r\n function GetOptions: TTMSFNCOpenLayersOptions;\r\n procedure SetOptions(const Value: TTMSFNCOpenLayersOptions);\r\n procedure SetTileLayers(const Value: TTMSFNCOpenLayersTileLayers);\r\n procedure SetPolygons(const Value: TTMSFNCOpenLayersPolygons);\r\n function GetPolygons: TTMSFNCOpenLayersPolygons;\r\n function GetPolylines: TTMSFNCOpenLayersPolylines;\r\n procedure SetPolylines(const Value: TTMSFNCOpenLayersPolylines);\r\n function GetMarkers: TTMSFNCOpenLayersMarkers;\r\n procedure SetMarkers(const Value: TTMSFNCOpenLayersMarkers);\r\n procedure SetClusters(const Value: TTMSFNCOpenLayersClusters);\r\n function GetHeatMaps: TTMSFNCOpenLayersHeatMaps;\r\n procedure SetHeatMaps(const Value: TTMSFNCOpenLayersHeatMaps);\r\n protected\r\n function GetAPIVersion: string; override;\r\n function GetDocURL: string; override;\r\n function GetVersionNr: Integer; override;\r\n function GetAddOrUpdateTileLayerFunction: string; virtual;\r\n function GetDeleteTileLayerFunction: string; virtual;\r\n function GetAddOrUpdateHeatMapFunction: string; virtual;\r\n function GetDeleteHeatMapFunction: string; virtual;\r\n function GetOptionsClass: TTMSFNCMapsOptionsClass; override;\r\n function GetCustomFunctions: string; override;\r\n function GetCustomGlobalVariables: string; override;\r\n function GetCustomOptions: string; override;\r\n function GetAddCustomObjects: string; override;\r\n function GetCustomMap: string; override;\r\n function GetMarkersClass: TTMSFNCMapsMarkersClass; override;\r\n function GetHeatMapsClass: TTMSFNCMapsHeatMapsClass; override;\r\n function GetPolylinesClass: TTMSFNCMapsPolylinesClass; override;\r\n function GetPolygonsClass: TTMSFNCMapsPolygonsClass; override;\r\n function GetRectanglesClass: TTMSFNCMapsRectanglesClass; override;\r\n function GetCirclesClass: TTMSFNCMapsCirclesClass; override;\r\n function GetAddOrUpdateClusterFunction: string; virtual;\r\n function GetDeleteClusterFunction: string; virtual;\r\n procedure DoPolyElementDragEnd(AEventData: TTMSFNCMapsEventData); virtual;\r\n procedure DoMarkerDragEnd(AEventData: TTMSFNCMapsEventData); virtual;\r\n procedure DoMapRenderComplete; virtual;\r\n procedure DoClusterClick(AEventData: TTMSFNCMapsEventData); virtual;\r\n procedure CallCustomEvent(AEventData: TTMSFNCMapsEventData); override;\r\n procedure UpdateTileLayers; virtual;\r\n procedure DoUpdateTileLayers(const AValue: string); virtual;\r\n procedure UpdateClusters; virtual;\r\n procedure DoUpdateClusters(const AValue: string); virtual;\r\n property Options: TTMSFNCOpenLayersOptions read GetOptions write SetOptions;\r\n property Clusters: TTMSFNCOpenLayersClusters read FClusters write SetClusters;\r\n property TileLayers: TTMSFNCOpenLayersTileLayers read FTileLayers write SetTileLayers;\r\n property Markers: TTMSFNCOpenLayersMarkers read GetMarkers write SetMarkers;\r\n property HeatMaps: TTMSFNCOpenLayersHeatMaps read GetHeatMaps write SetHeatMaps;\r\n property Polylines: TTMSFNCOpenLayersPolylines read GetPolylines write SetPolylines;\r\n property Polygons: TTMSFNCOpenLayersPolygons read GetPolygons write SetPolygons;\r\n property OnPolyElementDragEnd: TTMSFNCMapsBaseEvent read FOnPolyElementDragEnd write FOnPolyElementDragEnd;\r\n property OnMarkerDragEnd: TTMSFNCMapsBaseEvent read FOnMarkerDragEnd write FOnMarkerDragEnd;\r\n property OnMapRenderComplete: TNotifyEvent read FOnMapRenderComplete write FOnMapRenderComplete;\r\n property OnClusterClick: TTMSFNCMapsBaseEvent read FOnClusterClick write FOnClusterClick;\r\n public\r\n constructor Create(AOwner: TComponent); override;\r\n destructor Destroy; override;\r\n procedure EndUpdate; override;\r\n\r\n function AddMarker(ACoordinate: TTMSFNCMapsCoordinateRec; ATitle: string = ''; AIconURL: string = ''): TTMSFNCOpenLayersMarker; reintroduce; overload; virtual;\r\n function AddMarker(ALatitude: Double; ALongitude: Double; ATitle: string = ''; AIconURL: string = ''): TTMSFNCOpenLayersMarker; reintroduce; overload; virtual;\r\n\r\n function AddPolyline(ACoordinates: TTMSFNCMapsCoordinateRecArray; AClose: Boolean = False): TTMSFNCOpenLayersPolyline; reintroduce; virtual;\r\n function AddPolygon(ACoordinates: TTMSFNCMapsCoordinateRecArray; AClose: Boolean = False): TTMSFNCOpenLayersPolygon; reintroduce; virtual;\r\n function AddCircle(ACenter: TTMSFNCMapsCoordinateRec; ARadius: Double = 10000): TTMSFNCOpenLayersCircle; reintroduce; virtual;\r\n function AddRectangle(ABounds: TTMSFNCMapsBoundsRec): TTMSFNCOpenLayersRectangle; reintroduce; virtual;\r\n function AddHeatMap(ACoordinates: TTMSFNCMapsCoordinateRecArray): TTMSFNCOpenLayersHeatMap; reintroduce; virtual;\r\n\r\n function AddTileLayer(AURL: string; AOpacity: Single = 1): TTMSFNCOpenLayersTileLayer;\r\n procedure Clear; override;\r\n procedure ClearTileLayers;\r\n procedure ClearClusters;\r\n procedure ClearHeatMaps;\r\n end;\r\n\r\n {$IFNDEF LCLLIB}\r\n {$HINTS OFF}\r\n {$IF COMPILERVERSION > 22}\r\n {$IFNDEF LCLLIB}\r\n [ComponentPlatformsAttribute(TMSPlatformsWeb)]\r\n {$ENDIF}\r\n {$IFEND}\r\n {$HINTS ON}\r\n {$ENDIF}\r\n TTMSFNCOpenLayers = class(TTMSFNCCustomOpenLayers)\r\n protected\r\n procedure RegisterRuntimeClasses; override;\r\n procedure GetHeadLinks(AList: TTMSFNCMapsLinksList; ACheckReady: Boolean = True); override;\r\n public\r\n procedure Navigate; overload; override;\r\n procedure Navigate(const AURL: string); overload; override;\r\n procedure ExecuteJavaScript(AScript: String; ACompleteEvent: TTMSFNCWebBrowserJavaScriptCompleteEvent = nil; AImmediate: Boolean = False); override;\r\n function ExecuteJavaScriptSync(AScript: String): string; override;\r\n procedure LoadHTML(AHTML: String); override;\r\n procedure LoadFile(AFile: String); override;\r\n procedure Initialize; override;\r\n procedure DeInitialize; override;\r\n procedure GoForward; override;\r\n procedure GoBack; override;\r\n procedure Reload; override;\r\n procedure StopLoading; override;\r\n procedure AddBridge(ABridgeName: string; ABridgeObject: TObject); override;\r\n procedure RemoveBridge(ABridgeName: string); override;\r\n procedure CaptureScreenShot(ACompleteEvent: TTMSFNCWebBrowserCaptureScreenShotCompleteEvent = nil); override;\r\n function GetBridgeCommunicationLayer(ABridgeName: string): string; override;\r\n function NativeEnvironment: Pointer; override;\r\n function NativeBrowser: Pointer; override;\r\n function IsFMXBrowser: Boolean; override;\r\n function CanGoBack: Boolean; override;\r\n function CanGoForward: Boolean; override;\r\n {$IFDEF ANDROID}\r\n function NativeDialog: Pointer; override;\r\n {$ENDIF}\r\n {$IFDEF MSWINDOWS}\r\n function GetWebBrowserInstance: IInterface; override;\r\n {$ENDIF}\r\n property OnCloseForm;\r\n property EnableContextMenu;\r\n property EnableShowDebugConsole;\r\n property EnableAcceleratorKeys;\r\n property CacheFolder;\r\n property CacheFolderName;\r\n property AutoClearCache;\r\n procedure ClearCache; override;\r\n procedure ShowDebugConsole; override;\r\n\r\n property MapsInstance;\r\n property MapsProperties;\r\n published\r\n property OnCustomizeLocalAccessFileName;\r\n property OnCaptureScreenShot;\r\n property OnCustomizeCSS;\r\n property OnCustomizeHeadLinks;\r\n property OnCustomizeJavaScript;\r\n property OnCustomizeMap;\r\n property OnCustomizeGlobalVariables;\r\n property OnCustomizeMarker;\r\n property OnCustomizePopup;\r\n property OnCustomizeOptions;\r\n property OnCustomizePolyElement;\r\n property OnGetDefaultHTMLMessage;\r\n property OnZoomChanged;\r\n property OnMapCenterChanged;\r\n property OnMapTypeChanged;\r\n property OnMapMoveStart;\r\n property OnMapMoveEnd;\r\n property OnMapClick;\r\n property OnMapRightClick;\r\n property OnMapDblClick;\r\n property OnMapMouseUp;\r\n property OnMapMouseDown;\r\n property OnMapMouseMove;\r\n property OnMapMouseEnter;\r\n property OnMapMouseLeave;\r\n property OnMapRenderComplete;\r\n property OnMarkerDragEnd;\r\n property OnMarkerClick;\r\n property OnMarkerRightClick;\r\n property OnMarkerDblClick;\r\n property OnMarkerMouseUp;\r\n property OnMarkerMouseDown;\r\n property OnMarkerMouseEnter;\r\n property OnMarkerMouseLeave;\r\n property OnPolyElementDragEnd;\r\n property OnPolyElementClick;\r\n property OnPolyElementRightClick;\r\n property OnPolyElementDblClick;\r\n property OnPolyElementMouseUp;\r\n property OnPolyElementMouseDown;\r\n property OnPolyElementMouseEnter;\r\n property OnPolyElementMouseLeave;\r\n property OnCustomEvent;\r\n property OnMapInitialized;\r\n property OnGetCenterCoordinate;\r\n property OnGetZoomLevel;\r\n property OnGetBounds;\r\n property OnCreateGPXTrack;\r\n property OnCreateGPXSegment;\r\n property OnCreateGeoJSONObject;\r\n property OnClusterClick;\r\n\r\n property Polylines;\r\n property Polygons;\r\n property Circles;\r\n property Rectangles;\r\n property Markers;\r\n property Options;\r\n property Version;\r\n property LocalFileAccess;\r\n property LibraryLocation;\r\n property TileLayers;\r\n property RouteCalculator;\r\n property ElementContainers;\r\n property HeadLinks;\r\n property DesigntimeEnabled;\r\n property Clusters;\r\n property HeatMaps;\r\n end;\r\n\r\nimplementation\r\n\r\n{$R TMSFNCMapsOpenLayers.res}\r\n\r\nuses\r\n {%H-}Math,\r\n WEBLib.TMSFNCPersistence,\r\n WEBLib.TMSFNCUtils,\r\n WEBLib.TMSFNCMaps.OpenLayers,\r\n SysUtils\r\n {$IFDEF FMXLIB}\r\n ,FMX.Types, IOUtils\r\n {$ENDIF}\r\n {$IFDEF VCLLIB}\r\n ,IOUtils\r\n {$ENDIF}\r\n ;\r\n\r\nconst\r\n TILELAYERVAR = 'tileLayer';\r\n TILELAYERARRAYVAR = 'tileLayerArray';\r\n TILESERVERVAR = 'tileServer';\r\n GETTILELAYERARRAYVAR = 'get' + TILELAYERARRAYVAR + '()';\r\n ADDORUPDATETILELAYERFUNCTION = 'addOrUpdateTileLayer';\r\n DELETETILELAYERFUNCTION = 'deleteTileLayer';\r\n\r\n\r\n{ TTMSFNCCustomOpenLayers }\r\n\r\nconstructor TTMSFNCCustomOpenLayers.Create(AOwner: TComponent);\r\n{$IFNDEF WEBLIB}\r\nvar\r\n f: string;\r\n r: TResourceStream;\r\n{$ENDIF}\r\nbegin\r\n inherited;\r\n FTileLayers := TTMSFNCOpenLayersTileLayers.Create(Self);\r\n FClusters := TTMSFNCOpenLayersClusters.Create(Self);\r\n LibraryLocation := llOnline;\r\n Service := msOpenLayers;\r\n\r\n LocalFileAccess := true;\r\n\r\n if csDesigning in ComponentState then\r\n Exit;\r\n\r\n {$IFNDEF LCLWEBLIB}\r\n TDirectory.CreateDirectory(TTMSFNCUtils.AddBackslash(TTMSFNCUtils.GetTempPath) + 'ttmsfncopenlayers');\r\n {$ENDIF}\r\n {$IFDEF LCLLIB}\r\n CreateDir(TTMSFNCUtils.AddBackslash(TTMSFNCUtils.GetTempPath) + 'ttmsfncopenlayers');\r\n {$ENDIF}\r\n\r\n {$IFNDEF WEBLIB}\r\n f := TTMSFNCUtils.AddBackslash(TTMSFNCUtils.GetTempPath) + 'ttmsfncopenlayers\\ol.js';\r\n r := TTMSFNCUtils.GetResourceStream('OL_JS', HInstance);\r\n\r\n try\r\n r.SaveToFile(f);\r\n finally\r\n r.Free;\r\n end;\r\n\r\n f := TTMSFNCUtils.AddBackslash(TTMSFNCUtils.GetTempPath) + 'ttmsfncopenlayers\\ol.css';\r\n r := TTMSFNCUtils.GetResourceStream('OL_CSS', HInstance);\r\n\r\n try\r\n r.SaveToFile(f);\r\n finally\r\n r.Free;\r\n end;\r\n {$ENDIF}\r\nend;\r\n\r\nfunction TTMSFNCCustomOpenLayers.GetOptionsClass: TTMSFNCMapsOptionsClass;\r\nbegin\r\n Result := TTMSFNCOpenLayersOptions;\r\nend;\r\n\r\nfunction TTMSFNCCustomOpenLayers.GetPolygons: TTMSFNCOpenLayersPolygons;\r\nbegin\r\n Result := TTMSFNCOpenLayersPolygons(inherited Polygons);\r\nend;\r\n\r\nfunction TTMSFNCCustomOpenLayers.GetPolygonsClass: TTMSFNCMapsPolygonsClass;\r\nbegin\r\n Result := TTMSFNCOpenLayersPolygons;\r\nend;\r\n\r\nfunction TTMSFNCCustomOpenLayers.GetPolylines: TTMSFNCOpenLayersPolylines;\r\nbegin\r\n Result := TTMSFNCOpenLayersPolylines(inherited Polylines);\r\nend;\r\n\r\nfunction TTMSFNCCustomOpenLayers.GetPolylinesClass: TTMSFNCMapsPolylinesClass;\r\nbegin\r\n Result := TTMSFNCOpenLayersPolylines;\r\nend;\r\n\r\nfunction TTMSFNCCustomOpenLayers.GetRectanglesClass: TTMSFNCMapsRectanglesClass;\r\nbegin\r\n Result := TTMSFNCOpenLayersRectangles;\r\nend;\r\n\r\ndestructor TTMSFNCCustomOpenLayers.Destroy;\r\nbegin\r\n FTileLayers.Free;\r\n FClusters.Free;\r\n inherited;\r\nend;\r\n\r\nprocedure TTMSFNCCustomOpenLayers.DoUpdateClusters(const AValue: string);\r\nvar\r\n I, j: Integer;\r\n ma: string;\r\n sl: TStringList;\r\n m: TTMSFNCOpenLayersMarkersList;\r\nbegin\r\n if not MapInitialized or IsDestroying or (UpdateCount > 0) then\r\n Exit;\r\n\r\n ma := ParseScript(AValue);\r\n\r\n sl := TStringList.Create;\r\n try\r\n TTMSFNCUtils.Split(',', ma, sl);\r\n for I := 0 to Clusters.Count - 1 do\r\n begin\r\n j := sl.IndexOf(Clusters[I].ID);\r\n if (j = -1) or (Clusters[I].FReload) then\r\n begin\r\n Clusters[I].FReload := False;\r\n m := Clusters[I].Markers;\r\n ExecuteJavaScript(ADDORUPDATECLUSTERFUNCTION + '([' + Clusters[I].ToJSON + ', ' + m.ToJSON + ']);');\r\n end;\r\n if j <> -1 then\r\n sl.Delete(j);\r\n end;\r\n\r\n for I := 0 to sl.Count - 1 do\r\n ExecuteJavaScript(DELETECLUSTERFUNCTION + '({\"ID\": \"' + sl[I] + '\"})');\r\n\r\n finally\r\n sl.Free;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomOpenLayers.DoUpdateTileLayers(const AValue: string);\r\nvar\r\n I, j: Integer;\r\n ma: string;\r\n sl: TStringList;\r\nbegin\r\n if not MapInitialized or IsDestroying or (UpdateCount > 0) then\r\n Exit;\r\n\r\n ma := ParseScript(AValue);\r\n\r\n sl := TStringList.Create;\r\n try\r\n TTMSFNCUtils.Split(',', ma, sl);\r\n for I := 0 to TileLayers.Count - 1 do\r\n begin\r\n j := sl.IndexOf(TileLayers[I].ID);\r\n ExecuteJavaScript(ADDORUPDATETILELAYERFUNCTION + '(' + TileLayers[I].ToJSON + ');');\r\n if j <> -1 then\r\n sl.Delete(j);\r\n end;\r\n\r\n for I := 0 to sl.Count - 1 do\r\n ExecuteJavaScript(DELETETILELAYERFUNCTION + '({\"ID\": \"' + sl[I] + '\"})');\r\n\r\n finally\r\n sl.Free;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCCustomOpenLayers.EndUpdate;\r\nbegin\r\n inherited;\r\n if UpdateCount = 0 then\r\n begin\r\n UpdateTileLayers;\r\n UpdateClusters;\r\n UpdateHeatMaps;\r\n end;\r\nend;\r\n\r\nfunction TTMSFNCCustomOpenLayers.GetCustomMap: string;\r\nvar\r\n TileServer: string;\r\nbegin\r\n if not Options.ShowBaseLayer then\r\n TileServer := ''\r\n else\r\n TileServer := Options.TileServer;\r\n\r\n if (Options.TileServer <> '') then\r\n Result :=\r\n ' ' + MAPVAR + '.getLayers().getArray()[0].setSource(new ' + MAPSERVICEVAR + '.source.XYZ({url: \"' + TileServer + '\"}));' + LB\r\n else\r\n Result :=\r\n ' ' + MAPVAR + '.getLayers().getArray()[0].setSource(new ' + MAPSERVICEVAR + MAPSOURCEVAR + ');' + LB;\r\nend;\r\n\r\nfunction TTMSFNCCustomOpenLayers.GetCustomOptions: string;\r\nbegin\r\n Result :=\r\n 'var TileServer = ' + PARAMSNAME + '[\"TileServer\"];' + LB +\r\n 'if (!' + PARAMSNAME + '[\"ShowBaseLayer\"]) {' + LB +\r\n ' TileServer = \" \";' + LB +\r\n '}' + LB +\r\n 'if (TileServer != \"\" && TileServer != ' + TILESERVERVAR + '){' + LB +\r\n ' ' + MAPVAR + '.getLayers().getArray()[0].setSource(new ' + MAPSERVICEVAR + '.source.XYZ({url: TileServer}));' + LB +\r\n '} else if (TileServer == \"\" && TileServer != ' + TILESERVERVAR + '){' + LB +\r\n ' ' + MAPVAR + '.getLayers().getArray()[0].setSource(new ' + MAPSERVICEVAR + MAPSOURCEVAR + ');' + LB +\r\n '}' + LB +\r\n\r\n TILESERVERVAR + ' = TileServer;' + LB;\r\nend;\r\n\r\nfunction TTMSFNCCustomOpenLayers.GetAddOrUpdateClusterFunction: string;\r\nbegin\r\n Result := '';\r\n if not Assigned(MapsInstance) then\r\n Exit;\r\n\r\n Result :=\r\n 'function ' + ADDORUPDATECLUSTERFUNCTION + '(' + PARAMSNAME + '){' + LB +\r\n\r\n TryCatchStart +\r\n\r\n ' var ' + CLUSTERVAR + ' = ' + CLUSTERARRAYVAR + '[' + PARAMSNAME + '[0][\"ID\"]];' + LB +\r\n\r\n ' var m = [];' + LB +\r\n ' for (var k in ' + PARAMSNAME + '[1]){' + LB +\r\n ' var mi = ' + PARAMSNAME + '[1][k];' + LB +\r\n ' layer = ' + MARKERARRAYVAR + '[mi[\"ID\"]];' + LB +\r\n ' layer.setVisible(false);' + LB +\r\n ' var feature = layer.getSource().getFeatures()[0];' + LB +\r\n ' m.push(feature);' + LB +\r\n ' }' + LB +\r\n\r\n ' if (!' + CLUSTERVAR + '){' + LB +\r\n\r\n ' var source = new ' + MAPSERVICEVAR + '.source.Vector({' + LB +\r\n ' features: m' + LB +\r\n ' });' + LB +\r\n\r\n ' var clusterSource = new ' + MAPSERVICEVAR + '.source.Cluster({' + LB +\r\n ' distance: 40,' + LB +\r\n ' source: source' + LB +\r\n ' });' + LB +\r\n\r\n ' var styleCache = {};' + LB +\r\n ' var cimage = {};' + LB +\r\n\r\n ' if (' + PARAMSNAME + '[0][\"ImagePath\"] != \"\"){' + LB +\r\n ' cimage = new ' + MAPSERVICEVAR + '.style.Icon({' + LB +\r\n ' src: ' + PARAMSNAME + '[0][\"ImagePath\"]' + LB +\r\n ' });' + LB +\r\n ' } else {' + LB +\r\n ' cimage = new ' + MAPSERVICEVAR + '.style.Circle({' + LB +\r\n ' radius: 15,' + LB +\r\n ' stroke: new ' + MAPSERVICEVAR + '.style.Stroke({' + LB +\r\n ' color: ' + PARAMSNAME + '[0][\"StrokeColor\"]' + LB +\r\n ' }),' + LB +\r\n ' fill: new ' + MAPSERVICEVAR + '.style.Fill({' + LB +\r\n ' color: ' + PARAMSNAME + '[0][\"FillColor\"]' + LB +\r\n ' })' + LB +\r\n ' });' + LB +\r\n ' }' + LB +\r\n\r\n ' var ' + CLUSTERVAR + ' = new ' + MAPSERVICEVAR + '.layer.Vector({' + LB +\r\n ' zIndex: 1,' + LB +\r\n ' source: clusterSource,' + LB +\r\n ' style: function(feature, resolution) {' + LB +\r\n ' var size = feature.get(''features'').length;' + LB +\r\n ' var style = styleCache[size];' + LB +\r\n ' if (!style) {' + LB +\r\n ' style = [new ' + MAPSERVICEVAR + '.style.Style({' + LB +\r\n ' image: cimage,' + LB +\r\n ' text: new ' + MAPSERVICEVAR + '.style.Text({' + LB +\r\n ' text: size.toString(),' + LB +\r\n ' fill: new ' + MAPSERVICEVAR + '.style.Fill({' + LB +\r\n ' color: ' + PARAMSNAME + '[0][\"FontColor\"]' + LB +\r\n ' })' + LB +\r\n ' })' + LB +\r\n\r\n ' })];' + LB +\r\n ' styleCache[size] = style;' + LB +\r\n ' }' + LB +\r\n ' return style;' + LB +\r\n ' }' + LB +\r\n ' });' + LB +\r\n\r\n ' ' + MAPVAR + '.addLayer('+ CLUSTERVAR +');' + LB +\r\n\r\n ' };';\r\n\r\n\r\n Result := Result +\r\n ' if (' + CLUSTERVAR + '){' + LB +\r\n ' ' + CLUSTERARRAYVAR + '[' + PARAMSNAME + '[0][\"ID\"]] = ' + CLUSTERVAR + ';' + LB +\r\n\r\n ' ' + CLUSTERVAR + '.ClusterClick = ClusterClick;' + LB +\r\n ' var ClusterClick = function(event){' + LB +\r\n ' ' + GETSENDEVENT + '(parseEvent(event, \"ClusterClick\", ' + PARAMSNAME + '[0][\"ID\"]));' + LB +\r\n ' }' + LB + LB +\r\n ' ' + MAPVAR + '.on(''click'', ClusterClick);' + LB +\r\n\r\n ' }' + LB +\r\n\r\n TryCatchEnd('TMS FNC OpenLayers Marker Cluster error') +\r\n '}';\r\n\r\nend;\r\n\r\nfunction TTMSFNCCustomOpenLayers.GetAddOrUpdateHeatMapFunction: string;\r\nbegin\r\n Result := '';\r\n if not Assigned(MapsInstance) then\r\n Exit;\r\n\r\n Result :=\r\n 'function ' + ADDORUPDATEHEATMAPFUNCTION + '(' + PARAMSNAME + '){' + LB +\r\n\r\n TryCatchStart +\r\n\r\n ' var heatmapData = new ol.source.Vector();' + LB +\r\n ' var coord;' + LB +\r\n ' var lonLat;' + LB +\r\n ' var pointFeature;' + LB +\r\n\r\n ' if (!(typeof ' + PARAMSNAME + '[\"WeightedCoordinates\"] == \"undefined\")) {' + LB +\r\n ' for (I = 0; I < ' + PARAMSNAME + '[\"WeightedCoordinates\"].length; I++){' + LB +\r\n ' var lat = ' + PARAMSNAME + '[\"WeightedCoordinates\"][I][\"Coordinate\"][\"Latitude\"];' + LB +\r\n ' var lng = ' + PARAMSNAME + '[\"WeightedCoordinates\"][I][\"Coordinate\"][\"Longitude\"];' + LB +\r\n ' var cw = ' + PARAMSNAME + '[\"WeightedCoordinates\"][I][\"Weight\"];' + LB +\r\n ' if (cw < 1) { cw = 1; }' + LB +\r\n ' coord = ol.proj.fromLonLat([lng, lat]);' + LB +\r\n ' lonLat = new ol.geom.Point(coord);' + LB +\r\n ' pointFeature = new ol.Feature({' + LB +\r\n ' geometry: lonLat,' + LB +\r\n ' weight: cw' + LB +\r\n ' });' + LB +\r\n ' heatmapData.addFeature(pointFeature);' + LB +\r\n ' }'+ LB +\r\n ' }'+ LB +\r\n\r\n ' var ' + HEATMAPVAR + ' = ' + HEATMAPARRAYVAR + '[' + PARAMSNAME + '[\"ID\"]];' + LB +\r\n ' ' + HEATMAPVAR + ' = new ' + MAPSERVICEVAR + '.layer.Heatmap({' + LB +\r\n ' source: heatmapData,' + LB +\r\n ' opacity: ' + PARAMSNAME + '[\"Opacity\"],' + LB +\r\n ' gradient: [toRGBA(' + PARAMSNAME + '[\"GradientStartColor\"], 1), toRGBA(' + PARAMSNAME + '[\"GradientMidColor\"], 1), toRGBA(' + PARAMSNAME + '[\"GradientEndColor\"], 1)]' + LB +\r\n ' });' + LB +\r\n ' map.addLayer(' + HEATMAPVAR + ');' + LB +\r\n\r\n ' if (' + HEATMAPVAR + '){' + LB +\r\n ' ' + HEATMAPARRAYVAR + '[' + PARAMSNAME + '[\"ID\"]] = ' + HEATMAPVAR + ';' + LB +\r\n ' }' + LB +\r\n\r\n TryCatchEnd('TMS FNC OpenLayers HeatMap error') +\r\n '}';\r\nend;\r\n\r\nfunction TTMSFNCCustomOpenLayers.GetDeleteHeatMapFunction: string;\r\nbegin\r\n Result := '';\r\n if not Assigned(MapsInstance) then\r\n Exit;\r\n\r\n Result :=\r\n 'function ' + DELETEHEATMAPFUNCTION + '(' + PARAMSNAME + '){' + LB +\r\n TryCatchStart +\r\n ' var ' + HEATMAPVAR + ' = ' + HEATMAPARRAYVAR + '[' + PARAMSNAME + '[\"ID\"]];' + LB +\r\n ' if (' + HEATMAPVAR + '){' + LB +\r\n ' map.removeLayer(' + HEATMAPVAR + ');' + LB +\r\n ' delete ' + HEATMAPARRAYVAR + '[' + PARAMSNAME + '[\"ID\"]];' + LB +\r\n ' ' + HEATMAPVAR + ' = null;' + LB +\r\n ' }' + LB +\r\n TryCatchEnd('TMS FNC OpenLayers delete HeatMap error') +\r\n '}';\r\nend;\r\n\r\nfunction TTMSFNCCustomOpenLayers.GetAddOrUpdateTileLayerFunction: string;\r\nbegin\r\n Result := '';\r\n if not Assigned(MapsInstance) then\r\n Exit;\r\n\r\n Result :=\r\n 'function ' + ADDORUPDATETILELAYERFUNCTION + '(' + PARAMSNAME + '){' + LB +\r\n TryCatchStart +\r\n ' var ' + TILELAYERVAR + ' = ' + TILELAYERARRAYVAR + '[' + PARAMSNAME + '[\"ID\"]];' + LB +\r\n ' var l;' + LB +\r\n ' var s;' + LB +\r\n\r\n ' switch(' + PARAMSNAME + '[\"Source\"]){' + LB +\r\n\r\n //XYZ\r\n ' case 0:' + LB +\r\n ' s = new ' + MAPSERVICEVAR + '.source.XYZ({' + LB +\r\n ' url: ' + PARAMSNAME + '[\"URL\"]' + LB +\r\n ' });' + LB +\r\n\r\n ' l = new ' + MAPSERVICEVAR + '.layer.Tile({' + LB +\r\n ' name: ' + PARAMSNAME + '[\"ID\"],' + LB +\r\n ' className: ' + PARAMSNAME + '[\"CSSClassName\"],' + LB +\r\n ' opacity: ' + PARAMSNAME + '[\"Opacity\"]' + ',' + LB +\r\n ' source: s' + LB +\r\n ' });' + LB +\r\n\r\n ' break;' + LB +\r\n\r\n //WMS\r\n ' case 1:' + LB +\r\n ' s = new ' + MAPSERVICEVAR + '.source.TileWMS({' + LB +\r\n ' url: ' + PARAMSNAME + '[\"URL\"],' + LB +\r\n ' params: {\"LAYERS\":' + PARAMSNAME + '[\"Params\"][\"Layers\"]},' + LB +\r\n ' });' + LB +\r\n\r\n ' l = new ' + MAPSERVICEVAR + '.layer.Tile({' + LB +\r\n ' name: ' + PARAMSNAME + '[\"ID\"],' + LB +\r\n ' className: ' + PARAMSNAME + '[\"CSSClassName\"],' + LB +\r\n ' opacity: ' + PARAMSNAME + '[\"Opacity\"]' + ',' + LB +\r\n ' source: s' + LB +\r\n ' });' + LB +\r\n\r\n ' break;' + LB +\r\n\r\n //JSON\r\n ' case 2:' + LB +\r\n\r\n ' const style = new ' + MAPSERVICEVAR + '.style.Style({' + LB +\r\n ' fill: new ' + MAPSERVICEVAR + '.style.Fill({' + LB +\r\n ' color: \"#eeeeee\",' + LB +\r\n ' }),' + LB +\r\n ' });' + LB +\r\n\r\n ' s = new ' + MAPSERVICEVAR + '.source.Vector({' + LB +\r\n ' url: ' + PARAMSNAME + '[\"URL\"],' + LB +\r\n ' format: new ' + MAPSERVICEVAR + '.format.GeoJSON(),' + LB +\r\n ' })' + LB +\r\n\r\n ' l = new ' + MAPSERVICEVAR + '.layer.Vector({' + LB +\r\n ' background: \"#1a2b39\",' + LB +\r\n ' name: ' + PARAMSNAME + '[\"ID\"],' + LB +\r\n ' className: ' + PARAMSNAME + '[\"CSSClassName\"],' + LB +\r\n ' source: s,' + LB +\r\n ' opacity: ' + PARAMSNAME + '[\"Opacity\"]' + ',' + LB +\r\n ' style: function (feature) {' + LB +\r\n ' style.getFill().setColor(feature.get(\"COLOR\"));' + LB +\r\n ' return style;' + LB +\r\n ' },' + LB +\r\n ' });' + LB +\r\n\r\n ' break;' + LB +\r\n ' }' + LB +\r\n\r\n ' if (!' + TILELAYERVAR + ') ' + LB +\r\n ' ' + MAPVAR + '.addLayer(l);' + LB +\r\n ' ' + TILELAYERVAR + ' = true;' + LB +\r\n ' if (' + TILELAYERVAR + '){' + LB +\r\n ' ' + TILELAYERARRAYVAR + '[' + PARAMSNAME + '[\"ID\"]] = ' + TILELAYERVAR + ';' + LB +\r\n ' ' + MAPVAR + '.getLayers().forEach(layer => {' + LB +\r\n ' if (layer && layer.get(\"name\") === ' + PARAMSNAME + '[\"ID\"]) {' + LB +\r\n ' layer.setOpacity(' + PARAMSNAME + '[\"Opacity\"]);' + LB +\r\n ' layer.setSource(s);' + LB +\r\n ' }' + LB +\r\n ' });' + LB +\r\n ' }' + LB +\r\n\r\n TryCatchEnd('TMS FNC OpenLayers TileLayer error') +\r\n '}';\r\nend;\r\n\r\nfunction TTMSFNCCustomOpenLayers.GetAPIVersion: string;\r\nbegin\r\n Result := Options.Version;\r\nend;\r\n\r\nfunction TTMSFNCCustomOpenLayers.GetDeleteClusterFunction: string;\r\nbegin\r\n Result := '';\r\n if not Assigned(MapsInstance) then\r\n Exit;\r\n\r\n Result :=\r\n 'function ' + DELETECLUSTERFUNCTION + '(' + PARAMSNAME + '){' + LB +\r\n TryCatchStart +\r\n ' var ' + CLUSTERVAR + ' = ' + CLUSTERARRAYVAR + '[' + PARAMSNAME + '[\"ID\"]];' + LB +\r\n ' if (' + CLUSTERVAR + '){' + LB +\r\n ' ' + MAPVAR + '.removeLayer(' + CLUSTERVAR + ');' + LB +\r\n ' delete ' + CLUSTERARRAYVAR + '[' + PARAMSNAME + '[\"ID\"]];' + LB +\r\n ' ' + CLUSTERVAR + ' = null;' + LB +\r\n ' }' + LB +\r\n TryCatchEnd('TMS FNC OpenLayers delete Marker Cluster error') +\r\n '}';\r\nend;\r\n\r\nfunction TTMSFNCCustomOpenLayers.GetDeleteTileLayerFunction: string;\r\nbegin\r\n Result := '';\r\n if not Assigned(MapsInstance) then\r\n Exit;\r\n\r\n Result :=\r\n 'function ' + DELETETILELAYERFUNCTION + '(' + PARAMSNAME + '){' + LB +\r\n TryCatchStart +\r\n ' var ' + TILELAYERVAR + ' = ' + TILELAYERARRAYVAR + '[' + PARAMSNAME + '[\"ID\"]];' + LB +\r\n ' if (' + TILELAYERVAR + '){' + LB +\r\n ' ' + MAPVAR + '.getLayers().forEach(layer => {' + LB +\r\n ' if (layer && layer.get(\"name\") === ' + PARAMSNAME + '[\"ID\"]) {' + LB +\r\n ' ' + MAPVAR + '.removeLayer(layer);' + LB +\r\n ' }' + LB +\r\n ' });' + LB +\r\n\r\n ' delete ' + TILELAYERARRAYVAR + '[' + PARAMSNAME + '[\"ID\"]];' + LB +\r\n ' ' + TILELAYERVAR + ' = null;' + LB +\r\n ' }' + LB +\r\n TryCatchEnd('TMS FNC OpenLayers delete TileLayer error') +\r\n '}';\r\nend;\r\n\r\nfunction TTMSFNCCustomOpenLayers.GetDocURL: string;\r\nbegin\r\n Result := TTMSFNCBaseDocURL + 'tmsfncmaps/components/ttmsfncmaps/#ttmsfncopenlayers';\r\nend;\r\n\r\nfunction TTMSFNCCustomOpenLayers.GetHeatMaps: TTMSFNCOpenLayersHeatMaps;\r\nbegin\r\n Result := TTMSFNCOpenLayersHeatMaps(inherited HeatMaps);\r\nend;\r\n\r\nfunction TTMSFNCCustomOpenLayers.GetHeatMapsClass: TTMSFNCMapsHeatMapsClass;\r\nbegin\r\n Result := TTMSFNCOpenLayersHeatMaps;\r\nend;\r\n\r\nfunction TTMSFNCCustomOpenLayers.GetMarkers: TTMSFNCOpenLayersMarkers;\r\nbegin\r\n Result := TTMSFNCOpenLayersMarkers(inherited Markers);\r\nend;\r\n\r\nfunction TTMSFNCCustomOpenLayers.GetMarkersClass: TTMSFNCMapsMarkersClass;\r\nbegin\r\n Result := TTMSFNCOpenLayersMarkers;\r\nend;\r\n\r\nfunction TTMSFNCCustomOpenLayers.GetAddCustomObjects: string;\r\nvar\r\n I: Integer;\r\nbegin\r\n Result := '';\r\n for I := 0 to TileLayers.Count - 1 do\r\n Result := Result + ' ' + ADDORUPDATETILELAYERFUNCTION + '(' + TileLayers[I].ToJSON + ');' + LB;\r\n\r\n for I := 0 to HeatMaps.Count - 1 do\r\n Result := Result + ' ' + ADDORUPDATEHEATMAPFUNCTION + '(' + HeatMaps[I].ToJSON + ');' + LB;\r\n\r\n for I := 0 to Clusters.Count - 1 do\r\n Result := Result + ' ' + ADDORUPDATECLUSTERFUNCTION + '([' + Clusters[I].ToJSON + ', []]);' + LB;\r\nend;\r\n\r\nfunction TTMSFNCCustomOpenLayers.GetCustomGlobalVariables: string;\r\nbegin\r\n Result :=\r\n 'var ' + TILELAYERVAR + ';' + LB +\r\n 'var ' + TILELAYERARRAYVAR + ' = {};' + LB +\r\n 'var ' + TILESERVERVAR + ' = \"\";' + LB +\r\n 'function ' + GETTILELAYERARRAYVAR + '{' + LB +\r\n ' var arr = [];' + LB +\r\n ' for (var key in ' + TILELAYERARRAYVAR + '){' + LB +\r\n ' var v = key;' + LB +\r\n ' arr.push(v);' + LB +\r\n ' }' + LB +\r\n ' return arr.toString();' + LB +\r\n '}' + LB +\r\n 'var ' + HEATMAPVAR + ';' + LB +\r\n 'var ' + HEATMAPARRAYVAR + ' = {};' + LB +\r\n 'function ' + GETHEATMAPARRAYVAR + '{' + LB +\r\n ' var arr = [];' + LB +\r\n ' for (var key in ' + HEATMAPARRAYVAR + '){' + LB +\r\n ' var v = key;' + LB +\r\n ' arr.push(v);' + LB +\r\n ' }' + LB +\r\n ' return arr.toString();' + LB +\r\n '}';\r\nend;\r\n\r\nfunction TTMSFNCCustomOpenLayers.GetCirclesClass: TTMSFNCMapsCirclesClass;\r\nbegin\r\n Result := TTMSFNCOpenLayersCircles;\r\nend;\r\n\r\nfunction TTMSFNCCustomOpenLayers.GetCustomFunctions: string;\r\nbegin\r\n Result := GetAddOrUpdateTileLayerFunction + LB + LB +\r\n GetDeleteTileLayerFunction + LB + LB +\r\n GetAddOrUpdateHeatMapFunction + LB + LB +\r\n GetDeleteHeatMapFunction + LB + LB +\r\n GetAddOrUpdateClusterFunction + LB + LB +\r\n GetDeleteClusterFunction;\r\nend;\r\n\r\nfunction TTMSFNCCustomOpenLayers.GetOptions: TTMSFNCOpenLayersOptions;\r\nbegin\r\n Result := inherited Options as TTMSFNCOpenLayersOptions;\r\nend;\r\n\r\nfunction TTMSFNCCustomOpenLayers.GetVersionNr: Integer;\r\nbegin\r\n Result := MakeLong(MakeWord(BLD_VER,REL_VER),MakeWord(MIN_VER,MAJ_VER));\r\nend;\r\n\r\nprocedure TTMSFNCCustomOpenLayers.SetClusters(\r\n const Value: TTMSFNCOpenLayersClusters);\r\nbegin\r\n FClusters.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCCustomOpenLayers.SetHeatMaps(\r\n const Value: TTMSFNCOpenLayersHeatMaps);\r\nbegin\r\n HeatMaps.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCCustomOpenLayers.SetMarkers(\r\n const Value: TTMSFNCOpenLayersMarkers);\r\nbegin\r\n Markers.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCCustomOpenLayers.SetOptions(\r\n const Value: TTMSFNCOpenLayersOptions);\r\nbegin\r\n Options.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCCustomOpenLayers.SetPolygons(\r\n const Value: TTMSFNCOpenLayersPolygons);\r\nbegin\r\n Polygons.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCCustomOpenLayers.SetPolylines(\r\n const Value: TTMSFNCOpenLayersPolylines);\r\nbegin\r\n Polylines.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCCustomOpenLayers.SetTileLayers(\r\n const Value: TTMSFNCOpenLayersTileLayers);\r\nbegin\r\n FTileLayers.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCCustomOpenLayers.UpdateClusters;\r\nbegin\r\n if not MapInitialized or IsDestroying or (UpdateCount > 0) then\r\n Exit;\r\n\r\n ExecuteJavaScript(GETCLUSTERARRAYVAR, {$IFDEF LCLWEBLIB}@{$ENDIF}DoUpdateClusters);\r\nend;\r\n\r\nprocedure TTMSFNCCustomOpenLayers.UpdateTileLayers;\r\nbegin\r\n if not MapInitialized or IsDestroying or (UpdateCount > 0) then\r\n Exit;\r\n\r\n ExecuteJavaScript(GETTILELAYERARRAYVAR, {$IFDEF LCLWEBLIB}@{$ENDIF}DoUpdateTileLayers);\r\nend;\r\n\r\nfunction TTMSFNCCustomOpenLayers.AddMarker(\r\n ACoordinate: TTMSFNCMapsCoordinateRec; ATitle,\r\n AIconURL: string): TTMSFNCOpenLayersMarker;\r\nbegin\r\n Result := TTMSFNCOpenLayersMarker(inherited AddMarker(ACoordinate, ATitle, AIconURL));\r\nend;\r\n\r\nfunction TTMSFNCCustomOpenLayers.AddCircle(ACenter: TTMSFNCMapsCoordinateRec;\r\n ARadius: Double): TTMSFNCOpenLayersCircle;\r\nbegin\r\n Result := TTMSFNCOpenLayersCircle(inherited AddCircle(ACenter, ARadius));\r\nend;\r\n\r\nfunction TTMSFNCCustomOpenLayers.AddHeatMap(\r\n ACoordinates: TTMSFNCMapsCoordinateRecArray): TTMSFNCOpenLayersHeatMap;\r\nbegin\r\n Result := TTMSFNCOpenLayersHeatMap(inherited AddHeatMap(ACoordinates));\r\nend;\r\n\r\nfunction TTMSFNCCustomOpenLayers.AddMarker(ALatitude, ALongitude: Double;\r\n ATitle, AIconURL: string): TTMSFNCOpenLayersMarker;\r\nbegin\r\n Result := TTMSFNCOpenLayersMarker(inherited AddMarker(ALatitude, ALongitude, ATitle, AIconURL));\r\nend;\r\n\r\nfunction TTMSFNCCustomOpenLayers.AddPolygon(\r\n ACoordinates: TTMSFNCMapsCoordinateRecArray;\r\n AClose: Boolean): TTMSFNCOpenLayersPolygon;\r\nbegin\r\n Result := TTMSFNCOpenLayersPolygon(inherited AddPolygon(ACoordinates, AClose));\r\nend;\r\n\r\nfunction TTMSFNCCustomOpenLayers.AddPolyline(\r\n ACoordinates: TTMSFNCMapsCoordinateRecArray;\r\n AClose: Boolean): TTMSFNCOpenLayersPolyline;\r\nbegin\r\n Result := TTMSFNCOpenLayersPolyline(inherited AddPolyline(ACoordinates, AClose));\r\nend;\r\n\r\nfunction TTMSFNCCustomOpenLayers.AddRectangle(\r\n ABounds: TTMSFNCMapsBoundsRec): TTMSFNCOpenLayersRectangle;\r\nbegin\r\n Result := TTMSFNCOpenLayersRectangle(inherited AddRectangle(ABounds));\r\nend;\r\n\r\nfunction TTMSFNCCustomOpenLayers.AddTileLayer(\r\n AURL: string; AOpacity: Single = 1): TTMSFNCOpenLayersTileLayer;\r\nbegin\r\n BeginUpdate;\r\n Result := TileLayers.Add;\r\n Result.FURL := AURL;\r\n Result.FOpacity := AOpacity;\r\n EndUpdate;\r\nend;\r\n\r\nprocedure TTMSFNCCustomOpenLayers.DoClusterClick(\r\n AEventData: TTMSFNCMapsEventData);\r\nbegin\r\n if Assigned(OnClusterClick) then\r\n OnClusterClick(Self, AEventData);\r\nend;\r\n\r\nprocedure TTMSFNCCustomOpenLayers.DoMapRenderComplete;\r\nbegin\r\n if Assigned(OnMapRenderComplete) then\r\n OnMapRenderComplete(Self);\r\nend;\r\n\r\nprocedure TTMSFNCCustomOpenLayers.DoMarkerDragEnd(\r\n AEventData: TTMSFNCMapsEventData);\r\nbegin\r\n if Assigned(OnMarkerDragEnd) then\r\n OnMarkerDragEnd(Self, AEventData);\r\nend;\r\n\r\nprocedure TTMSFNCCustomOpenLayers.DoPolyElementDragEnd(\r\n AEventData: TTMSFNCMapsEventData);\r\nbegin\r\n if Assigned(OnPolyElementDragEnd) then\r\n OnPolyElementDragEnd(Self, AEventData);\r\nend;\r\n\r\nprocedure TTMSFNCCustomOpenLayers.CallCustomEvent(\r\n AEventData: TTMSFNCMapsEventData);\r\nbegin\r\n inherited;\r\n if AEventData.EventName = 'MarkerDragEnd' then\r\n DoMarkerDragEnd(AEventData);\r\n\r\n if AEventData.EventName = 'PolyElementDragEnd' then\r\n DoPolyElementDragEnd(AEventData);\r\n\r\n if AEventData.EventName = 'MapRenderComplete' then\r\n DoMapRenderComplete;\r\n\r\n if AEventData.EventName = 'ClusterClick' then\r\n DoClusterClick(AEventData);\r\nend;\r\n\r\nprocedure TTMSFNCCustomOpenLayers.Clear;\r\nbegin\r\n inherited;\r\n BeginUpdate;\r\n ClearTileLayers;\r\n ClearClusters;\r\n EndUpdate;\r\nend;\r\n\r\nprocedure TTMSFNCCustomOpenLayers.ClearClusters;\r\nbegin\r\n BeginUpdate;\r\n Clusters.Clear;\r\n EndUpdate;\r\nend;\r\n\r\nprocedure TTMSFNCCustomOpenLayers.ClearHeatMaps;\r\nbegin\r\n BeginUpdate;\r\n HeatMaps.Clear;\r\n EndUpdate;\r\nend;\r\n\r\nprocedure TTMSFNCCustomOpenLayers.ClearTileLayers;\r\nbegin\r\n BeginUpdate;\r\n TileLayers.Clear;\r\n EndUpdate;\r\nend;\r\n\r\nconstructor TTMSFNCOpenLayersOptions.Create;\r\nbegin\r\n inherited;\r\n TileServer := '';\r\n ShowBaseLayer := True;\r\n Version := 'v10.2.1'\r\nend;\r\n\r\nprocedure TTMSFNCOpenLayersOptions.SetShowBaseLayer(const Value: Boolean);\r\nbegin\r\n if FShowBaseLayer <> Value then\r\n begin\r\n FShowBaseLayer := Value;\r\n Changed;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCOpenLayersOptions.SetTileServer(const Value: string);\r\nbegin\r\n if FTileServer <> Value then\r\n begin\r\n FTileServer := Value;\r\n Changed;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCOpenLayersOptions.SetVersion(const Value: string);\r\nbegin\r\n if FVersion <> Value then\r\n begin\r\n FVersion := Value;\r\n Changed;\r\n end;\r\nend;\r\n\r\n{ TTMSFNCOpenLayersTileLayer }\r\n\r\nprocedure TTMSFNCOpenLayersTileLayer.Assign(Source: TPersistent);\r\nbegin\r\n if Source is TTMSFNCOpenLayersTileLayer then\r\n begin\r\n FURL := (Source as TTMSFNCOpenLayersTileLayer).URL;\r\n FOpacity := (Source as TTMSFNCOpenLayersTileLayer).Opacity;\r\n FParams.Assign((Source as TTMSFNCOpenLayersTileLayer).Params);\r\n FSource := (Source as TTMSFNCOpenLayersTileLayer).Source;\r\n// FType := (Source as TTMSFNCOpenLayersTileLayer).&Type;\r\n FCSSClassName := (Source as TTMSFNCOpenLayersTileLayer).CSSClassName;\r\n end;\r\nend;\r\n\r\nconstructor TTMSFNCOpenLayersTileLayer.Create(ACollection: TCollection);\r\nbegin\r\n inherited;\r\n\r\n FParams := TTMSFNCOpenLayersTileLayerParams.Create;\r\n FParams.OnChange := @DoParamsChanged;\r\n// FType := tltTile;\r\n\r\n FURL := '';\r\n FOpacity := 1;\r\n FSource := tlsXYZ;\r\n FCSSClassName := '';\r\n\r\n if Assigned(ACollection) then\r\n FOwner := (Collection as TTMSFNCOpenLayersTileLayers).FOwner;\r\n\r\n UpdateTileLayer;\r\nend;\r\n\r\ndestructor TTMSFNCOpenLayersTileLayer.Destroy;\r\nbegin\r\n FParams.Free;\r\n inherited;\r\n UpdateTileLayer;\r\nend;\r\n\r\nprocedure TTMSFNCOpenLayersTileLayer.DoParamsChanged(Sender: TObject);\r\nbegin\r\n UpdateTileLayer;\r\nend;\r\n\r\nfunction TTMSFNCOpenLayersTileLayer.GetID: string;\r\nbegin\r\n if (FID = '') or FRecreate then\r\n FID := CreateNewGUID;\r\n\r\n FRecreate := False;\r\n Result := FID;\r\nend;\r\n\r\nfunction TTMSFNCOpenLayersTileLayer.IsOpacityStored: Boolean;\r\nbegin\r\n Result := Opacity <> 0;\r\nend;\r\n\r\nfunction TTMSFNCOpenLayersTileLayer.IsURLStored: Boolean;\r\nbegin\r\n Result := URL <> '';\r\nend;\r\n\r\nprocedure TTMSFNCOpenLayersTileLayer.SetSource(\r\n const Value: TTMSFNCOpenLayersTileLayerSource);\r\nbegin\r\n if FSource <> Value then\r\n begin\r\n FSource := Value;\r\n UpdateTileLayer;\r\n end;\r\nend;\r\n\r\n//procedure TTMSFNCOpenLayersTileLayer.SetType(\r\n// const Value: TTMSFNCOpenLayersTileLayerType);\r\n//begin\r\n// if FType <> Value then\r\n// begin\r\n// FType := Value;\r\n// UpdateTileLayer;\r\n// end;\r\n//end;\r\n\r\nprocedure TTMSFNCOpenLayersTileLayer.SetCSSClassName(const Value: string);\r\nbegin\r\n if FCSSClassName <> Value then\r\n begin\r\n FCSSClassName := Value;\r\n UpdateTileLayer;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCOpenLayersTileLayer.SetOpacity(const Value: Single);\r\nbegin\r\n if FOpacity <> Value then\r\n begin\r\n FOpacity := Value;\r\n UpdateTileLayer;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCOpenLayersTileLayer.SetParams(\r\n const Value: TTMSFNCOpenLayersTileLayerParams);\r\nbegin\r\n FParams.Assign(Value);\r\nend;\r\n\r\nprocedure TTMSFNCOpenLayersTileLayer.SetURL(const Value: string);\r\nbegin\r\n if FURL <> Value then\r\n begin\r\n FURL := Value;\r\n UpdateTileLayer;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCOpenLayersTileLayer.UpdateTileLayer;\r\nbegin\r\n FReload := True;\r\n if Assigned(FOwner) then\r\n (FOwner as TTMSFNCCustomOpenLayers).UpdateTileLayers;\r\nend;\r\n\r\n{ TTMSFNCOpenLayersTileLayers }\r\n\r\nfunction TTMSFNCOpenLayersTileLayers.Add: TTMSFNCOpenLayersTileLayer;\r\nbegin\r\n Result := TTMSFNCOpenLayersTileLayer(inherited Add);\r\nend;\r\n\r\nprocedure TTMSFNCOpenLayersTileLayers.Clear;\r\nvar\r\n l: TTMSFNCCustomMaps;\r\n ci: TCollectionItem;\r\nbegin\r\n l := FOwner;\r\n if Assigned(l) then\r\n l.BeginUpdate;\r\n\r\n if Count > 0 then\r\n begin\r\n while Count > 0 do\r\n begin\r\n ci := TCollectionItem(Items[Count - 1]);\r\n ci.Free;\r\n end;\r\n end;\r\n\r\n if Assigned(l) then\r\n l.EndUpdate;\r\nend;\r\n\r\nconstructor TTMSFNCOpenLayersTileLayers.Create(AOwner: TTMSFNCCustomMaps);\r\nbegin\r\n inherited Create(AOwner, CreateItemClass);\r\n FOwner := AOwner;\r\nend;\r\n\r\nfunction TTMSFNCOpenLayersTileLayers.CreateItemClass: TCollectionItemClass;\r\nbegin\r\n Result := TTMSFNCOpenLayersTileLayer;\r\nend;\r\n\r\nfunction TTMSFNCOpenLayersTileLayers.GetItem(\r\n Index: Integer): TTMSFNCOpenLayersTileLayer;\r\nbegin\r\n Result := TTMSFNCOpenLayersTileLayer(inherited Items[Index]);\r\nend;\r\n\r\nfunction TTMSFNCOpenLayersTileLayers.GetOwner: TPersistent;\r\nbegin\r\n Result := FOwner;\r\nend;\r\n\r\nfunction TTMSFNCOpenLayersTileLayers.Insert(\r\n Index: Integer): TTMSFNCOpenLayersTileLayer;\r\nbegin\r\n Result := TTMSFNCOpenLayersTileLayer(inherited Insert(Index));\r\nend;\r\n\r\nprocedure TTMSFNCOpenLayersTileLayers.Recreate;\r\nvar\r\n I: Integer;\r\nbegin\r\n for I := 0 to Count - 1 do\r\n Items[I].Recreate := True;\r\nend;\r\n\r\nprocedure TTMSFNCOpenLayersTileLayers.SetItem(Index: Integer;\r\n const Value: TTMSFNCOpenLayersTileLayer);\r\nbegin\r\n inherited Items[Index] := Value;\r\nend;\r\n\r\n{ TTMSFNCOpenLayers }\r\n\r\nprocedure TTMSFNCOpenLayers.RegisterRuntimeClasses;\r\nbegin\r\n inherited;\r\n RegisterClass(TTMSFNCOpenLayers);\r\nend;\r\n\r\nprocedure TTMSFNCOpenLayers.AddBridge(ABridgeName: string; ABridgeObject: TObject);\r\nbegin\r\n inherited AddBridge(ABridgeName, ABridgeObject);\r\nend;\r\n\r\nfunction TTMSFNCOpenLayers.CanGoBack: Boolean;\r\nbegin\r\n Result := inherited CanGoBack;\r\nend;\r\n\r\nfunction TTMSFNCOpenLayers.CanGoForward: Boolean;\r\nbegin\r\n Result := inherited CanGoForward;\r\nend;\r\n\r\nprocedure TTMSFNCOpenLayers.CaptureScreenShot(ACompleteEvent: TTMSFNCWebBrowserCaptureScreenShotCompleteEvent = nil);\r\nbegin\r\n inherited CaptureScreenShot(ACompleteEvent);\r\nend;\r\n\r\nprocedure TTMSFNCOpenLayers.ClearCache;\r\nbegin\r\n inherited ClearCache;\r\nend;\r\n\r\nprocedure TTMSFNCOpenLayers.DeInitialize;\r\nbegin\r\n inherited DeInitialize;\r\nend;\r\n\r\nprocedure TTMSFNCOpenLayers.ExecuteJavaScript(AScript: String;\r\n ACompleteEvent: TTMSFNCWebBrowserJavaScriptCompleteEvent = nil; AImmediate: Boolean = False);\r\nbegin\r\n inherited ExecuteJavaScript(AScript, ACompleteEvent, AImmediate);\r\nend;\r\n\r\nfunction TTMSFNCOpenLayers.ExecuteJavaScriptSync(AScript: String): string;\r\nbegin\r\n Result := inherited ExecuteJavaScriptSync(AScript);\r\nend;\r\n\r\nfunction TTMSFNCOpenLayers.GetBridgeCommunicationLayer(ABridgeName: string): string;\r\nbegin\r\n Result := inherited GetBridgeCommunicationLayer(ABridgeName);\r\nend;\r\n\r\nprocedure TTMSFNCOpenLayers.GetHeadLinks(AList: TTMSFNCMapsLinksList;\r\n ACheckReady: Boolean);\r\n{$IFNDEF WEBLIB}\r\nvar\r\n I: Integer;\r\n l: TTMSFNCMapsLink;\r\n{$ENDIF}\r\nbegin\r\n inherited;\r\n\r\n {$IFNDEF WEBLIB}\r\n if not IsDesigning and (LibraryLocation = llOffline) then\r\n begin\r\n for I := AList.Count - 1 downto 0 do\r\n begin\r\n l := AList[I];\r\n if (l.URL = OPENLAYERSAPIURL + GetAPIVersion + '/ol.css') or (l.URL = OPENLAYERSAPIURL + GetAPIVersion + '/dist/ol.js') then\r\n AList.Delete(I);\r\n end;\r\n\r\n AList.Add(TTMSFNCMapsLink.CreateLink(TTMSFNCUtils.AddBackslash(TTMSFNCUtils.GetTempPath) + 'ttmsfncopenlayers/ol.css', 'text/css', 'stylesheet'));\r\n AList.Add(TTMSFNCMapsLink.CreateScript(TTMSFNCUtils.AddBackslash(TTMSFNCUtils.GetTempPath) + 'ttmsfncopenlayers/ol.js', 'text/javascript'));\r\n end;\r\n {$ENDIF}\r\nend;\r\n\r\n{$IFDEF ANDROID}\r\nfunction TTMSFNCOpenLayers.NativeDialog: Pointer;\r\nbegin\r\n Result := inherited NativeDialog;\r\nend;\r\n{$ENDIF}\r\n\r\n{$IFDEF MSWINDOWS}\r\nfunction TTMSFNCOpenLayers.GetWebBrowserInstance: IInterface;\r\nbegin\r\n Result := inherited GetWebBrowserInstance;\r\nend;\r\n{$ENDIF}\r\n\r\nprocedure TTMSFNCOpenLayers.GoBack;\r\nbegin\r\n inherited GoBack;\r\nend;\r\n\r\nprocedure TTMSFNCOpenLayers.GoForward;\r\nbegin\r\n inherited GoForward;\r\nend;\r\n\r\nprocedure TTMSFNCOpenLayers.Initialize;\r\nbegin\r\n inherited Initialize;\r\nend;\r\n\r\nfunction TTMSFNCOpenLayers.IsFMXBrowser: Boolean;\r\nbegin\r\n Result := inherited IsFMXBrowser;\r\nend;\r\n\r\nprocedure TTMSFNCOpenLayers.LoadFile(AFile: String);\r\nbegin\r\n inherited LoadFile(AFile);\r\nend;\r\n\r\nprocedure TTMSFNCOpenLayers.LoadHTML(AHTML: String);\r\nbegin\r\n inherited LoadHTML(AHTML);\r\nend;\r\n\r\nfunction TTMSFNCOpenLayers.NativeBrowser: Pointer;\r\nbegin\r\n Result := inherited NativeBrowser;\r\nend;\r\n\r\nfunction TTMSFNCOpenLayers.NativeEnvironment: Pointer;\r\nbegin\r\n Result := inherited NativeEnvironment;\r\nend;\r\n\r\nprocedure TTMSFNCOpenLayers.Navigate;\r\nbegin\r\n inherited Navigate;\r\nend;\r\n\r\nprocedure TTMSFNCOpenLayers.Navigate(const AURL: string);\r\nbegin\r\n inherited Navigate(AURL);\r\nend;\r\n\r\nprocedure TTMSFNCOpenLayers.Reload;\r\nbegin\r\n inherited Reload;\r\nend;\r\n\r\nprocedure TTMSFNCOpenLayers.RemoveBridge(ABridgeName: string);\r\nbegin\r\n inherited RemoveBridge(ABridgeName);\r\nend;\r\n\r\nprocedure TTMSFNCOpenLayers.ShowDebugConsole;\r\nbegin\r\n inherited ShowDebugConsole;\r\nend;\r\n\r\nprocedure TTMSFNCOpenLayers.StopLoading;\r\nbegin\r\n inherited StopLoading;\r\nend;\r\n\r\n{ TTMSFNCOpenLayersPolyline }\r\n\r\nprocedure TTMSFNCOpenLayersPolyline.Assign(Source: TPersistent);\r\nbegin\r\n if Source is TTMSFNCOpenLayersPolyline then\r\n begin\r\n FLabel.Assign((Source as TTMSFNCOpenLayersPolyline).FLabel);\r\n FDraggable := (Source as TTMSFNCOpenLayersPolyline).Draggable;\r\n end;\r\nend;\r\n\r\nconstructor TTMSFNCOpenLayersPolyline.Create(ACollection: TCollection);\r\nbegin\r\n inherited;\r\n FLabel := TTMSFNCOpenLayersLabel.Create;\r\n FLabel.OnChange := @LabelChanged;\r\n FDraggable := False;\r\nend;\r\n\r\ndestructor TTMSFNCOpenLayersPolyline.Destroy;\r\nbegin\r\n FLabel.Free;\r\n inherited;\r\nend;\r\n\r\nprocedure TTMSFNCOpenLayersPolyline.LabelChanged(Sender: TObject);\r\nbegin\r\n UpdatePolyElement;\r\nend;\r\n\r\nprocedure TTMSFNCOpenLayersPolyline.SetDraggable(const Value: Boolean);\r\nbegin\r\n FDraggable := Value;\r\n UpdatePolyElement;\r\nend;\r\n\r\nprocedure TTMSFNCOpenLayersPolyline.SetLabel(\r\n const Value: TTMSFNCOpenLayersLabel);\r\nbegin\r\n FLabel.Assign(Value);\r\n UpdatePolyElement;\r\nend;\r\n\r\n{ TTMSFNCOpenLayersPolylines }\r\n\r\nfunction TTMSFNCOpenLayersPolylines.Add: TTMSFNCOpenLayersPolyline;\r\nbegin\r\n Result := TTMSFNCOpenLayersPolyline(inherited Add);\r\nend;\r\n\r\nfunction TTMSFNCOpenLayersPolylines.CreateItemClass: TCollectionItemClass;\r\nbegin\r\n Result := TTMSFNCOpenLayersPolyline;\r\nend;\r\n\r\nfunction TTMSFNCOpenLayersPolylines.GetItem(\r\n Index: Integer): TTMSFNCOpenLayersPolyline;\r\nbegin\r\n Result := TTMSFNCOpenLayersPolyline(inherited Items[Index]);\r\nend;\r\n\r\nfunction TTMSFNCOpenLayersPolylines.Insert(\r\n Index: Integer): TTMSFNCOpenLayersPolyline;\r\nbegin\r\n Result := TTMSFNCOpenLayersPolyline(inherited Insert(Index));\r\nend;\r\n\r\nprocedure TTMSFNCOpenLayersPolylines.SetItem(Index: Integer;\r\n const Value: TTMSFNCOpenLayersPolyline);\r\nbegin\r\n inherited Items[Index] := Value;\r\nend;\r\n\r\n\r\n{ TTMSFNCOpenLayersPolygon }\r\n\r\nfunction TTMSFNCOpenLayersPolygon.AddHole(\r\n ACoordinates: TTMSFNCMapsCoordinateRecArray): TTMSFNCMapsPolyElementHole;\r\nbegin\r\n Result := inherited AddHole(ACoordinates);\r\nend;\r\n\r\nprocedure TTMSFNCOpenLayersPolygon.Assign(Source: TPersistent);\r\nbegin\r\n if Source is TTMSFNCOpenLayersPolygon then\r\n begin\r\n FLabel.Assign((Source as TTMSFNCOpenLayersPolygon).FLabel);\r\n FDraggable := (Source as TTMSFNCOpenLayersPolygon).Draggable;\r\n end;\r\nend;\r\n\r\nconstructor TTMSFNCOpenLayersPolygon.Create(ACollection: TCollection);\r\nbegin\r\n inherited;\r\n FLabel := TTMSFNCOpenLayersLabel.Create;\r\n FLabel.OnChange := @LabelChanged;\r\n FDraggable := False;\r\nend;\r\n\r\ndestructor TTMSFNCOpenLayersPolygon.Destroy;\r\nbegin\r\n FLabel.Free;\r\n inherited;\r\nend;\r\n\r\nprocedure TTMSFNCOpenLayersPolygon.LabelChanged(Sender: TObject);\r\nbegin\r\n UpdatePolyElement;\r\nend;\r\n\r\nprocedure TTMSFNCOpenLayersPolygon.SetDraggable(const Value: Boolean);\r\nbegin\r\n FDraggable := Value;\r\n UpdatePolyElement;\r\nend;\r\n\r\nprocedure TTMSFNCOpenLayersPolygon.SetLabel(\r\n const Value: TTMSFNCOpenLayersLabel);\r\nbegin\r\n FLabel.Assign(Value);\r\n UpdatePolyElement;\r\nend;\r\n\r\n{ TTMSFNCOpenLayersPolygons }\r\n\r\nfunction TTMSFNCOpenLayersPolygons.Add: TTMSFNCOpenLayersPolygon;\r\nbegin\r\n Result := TTMSFNCOpenLayersPolygon(inherited Add);\r\nend;\r\n\r\nfunction TTMSFNCOpenLayersPolygons.CreateItemClass: TCollectionItemClass;\r\nbegin\r\n Result := TTMSFNCOpenLayersPolygon;\r\nend;\r\n\r\nfunction TTMSFNCOpenLayersPolygons.GetItem(\r\n Index: Integer): TTMSFNCOpenLayersPolygon;\r\nbegin\r\n Result := TTMSFNCOpenLayersPolygon(inherited Items[Index]);\r\nend;\r\n\r\nfunction TTMSFNCOpenLayersPolygons.Insert(\r\n Index: Integer): TTMSFNCOpenLayersPolygon;\r\nbegin\r\n Result := TTMSFNCOpenLayersPolygon(inherited Insert(Index));\r\nend;\r\n\r\nprocedure TTMSFNCOpenLayersPolygons.SetItem(Index: Integer;\r\n const Value: TTMSFNCOpenLayersPolygon);\r\nbegin\r\n inherited Items[Index] := Value;\r\nend;\r\n\r\n{ TTMSFNCOpenLayersLabel }\r\n\r\nprocedure TTMSFNCOpenLayersLabel.Assign(Source: TPersistent);\r\nbegin\r\n if (Source is TTMSFNCOpenLayersLabel) then\r\n begin\r\n FText := (Source as TTMSFNCOpenLayersLabel).Text;\r\n FOffsetX := (Source as TTMSFNCOpenLayersLabel).OffsetX;\r\n FOffsetY := (Source as TTMSFNCOpenLayersLabel).OffsetY;\r\n FFontColor := (Source as TTMSFNCOpenLayersLabel).FontColor;\r\n FFontSize := (Source as TTMSFNCOpenLayersLabel).FontSize;\r\n FBackgroundColor := (Source as TTMSFNCOpenLayersLabel).BackgroundColor;\r\n FBorderColor := (Source as TTMSFNCOpenLayersLabel).BorderColor;\r\n FPadding := (Source as TTMSFNCOpenLayersLabel).Padding;\r\n end\r\n else\r\n inherited;\r\nend;\r\n\r\nprocedure TTMSFNCOpenLayersLabel.Changed;\r\nbegin\r\n if Assigned(OnChange) then\r\n OnChange(Self);\r\nend;\r\n\r\nconstructor TTMSFNCOpenLayersLabel.Create;\r\nbegin\r\n FText := '';\r\n FOffsetX := 0;\r\n FOffsetY := 0;\r\n FFontColor := gcBlack;\r\n FFontSize := 12;\r\n FBackgroundColor := gcWhite;\r\n FBorderColor := gcBlack;\r\n FPadding := 3;\r\nend;\r\n\r\nprocedure TTMSFNCOpenLayersLabel.SetBackgroundColor(\r\n const Value: TTMSFNCGraphicsColor);\r\nbegin\r\n if FBackgroundColor <> Value then\r\n begin\r\n FBackgroundColor := Value;\r\n Changed;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCOpenLayersLabel.SetBorderColor(\r\n const Value: TTMSFNCGraphicsColor);\r\nbegin\r\n if FBorderColor <> Value then\r\n begin\r\n FBorderColor := Value;\r\n Changed;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCOpenLayersLabel.SetFontColor(\r\n const Value: TTMSFNCGraphicsColor);\r\nbegin\r\n if FFontColor <> Value then\r\n begin\r\n FFontColor := Value;\r\n Changed;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCOpenLayersLabel.SetFontSize(const Value: Integer);\r\nbegin\r\n if FFontSize <> Value then\r\n begin\r\n FFontSize := Value;\r\n Changed;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCOpenLayersLabel.SetOffsetX(const Value: Double);\r\nbegin\r\n if FOffsetX <> Value then\r\n begin\r\n FOffsetX := Value;\r\n Changed;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCOpenLayersLabel.SetOffsetY(const Value: Double);\r\nbegin\r\n if FOffsetY <> Value then\r\n begin\r\n FOffsetY := Value;\r\n Changed;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCOpenLayersLabel.SetPadding(const Value: Integer);\r\nbegin\r\n if FPadding <> Value then\r\n begin\r\n FPadding := Value;\r\n Changed;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCOpenLayersLabel.SetText(const Value: string);\r\nbegin\r\n if FText <> Value then\r\n begin\r\n FText := Value;\r\n Changed;\r\n end;\r\nend;\r\n\r\n{ TTMSFNCOpenLayersMarker }\r\n\r\nconstructor TTMSFNCOpenLayersMarker.Create(ACollection: TCollection);\r\nbegin\r\n inherited;\r\n FDraggable := False;\r\nend;\r\n\r\ndestructor TTMSFNCOpenLayersMarker.Destroy;\r\nbegin\r\n inherited;\r\nend;\r\n\r\nprocedure TTMSFNCOpenLayersMarker.SetDraggable(const Value: Boolean);\r\nbegin\r\n if (Draggable <> Value) then\r\n begin\r\n FDraggable := Value;\r\n UpdateMarker;\r\n end;\r\nend;\r\n\r\n{ TTMSFNCOpenLayersMarkers }\r\n\r\nfunction TTMSFNCOpenLayersMarkers.Add: TTMSFNCOpenLayersMarker;\r\nbegin\r\n Result := TTMSFNCOpenLayersMarker(inherited Add);\r\nend;\r\n\r\nfunction TTMSFNCOpenLayersMarkers.CreateItemClass: TCollectionItemClass;\r\nbegin\r\n Result := TTMSFNCOpenLayersMarker;\r\nend;\r\n\r\nfunction TTMSFNCOpenLayersMarkers.GetItem(Index: Integer): TTMSFNCOpenLayersMarker;\r\nbegin\r\n Result := TTMSFNCOpenLayersMarker(inherited Items[Index]);\r\nend;\r\n\r\nfunction TTMSFNCOpenLayersMarkers.Insert(Index: Integer): TTMSFNCOpenLayersMarker;\r\nbegin\r\n Result := TTMSFNCOpenLayersMarker(inherited Insert(Index));\r\nend;\r\n\r\nprocedure TTMSFNCOpenLayersMarkers.SetItem(Index: Integer;\r\n const Value: TTMSFNCOpenLayersMarker);\r\nbegin\r\n inherited Items[Index] := Value;\r\nend;\r\n\r\n{ TTMSFNCOpenLayersCircle }\r\n\r\nprocedure TTMSFNCOpenLayersCircle.Assign(Source: TPersistent);\r\nbegin\r\n inherited;\r\n if Source is TTMSFNCOpenLayersCircle then\r\n begin\r\n FDraggable := (Source as TTMSFNCOpenLayersCircle).Draggable;\r\n end;\r\nend;\r\n\r\nconstructor TTMSFNCOpenLayersCircle.Create(ACollection: TCollection);\r\nbegin\r\n inherited;\r\n FDraggable := False;\r\nend;\r\n\r\ndestructor TTMSFNCOpenLayersCircle.Destroy;\r\nbegin\r\n inherited;\r\nend;\r\n\r\nprocedure TTMSFNCOpenLayersCircle.SetDraggable(const Value: Boolean);\r\nbegin\r\n if (FDraggable <> Value) then\r\n begin\r\n FDraggable := Value;\r\n UpdatePolyElement;\r\n end;\r\nend;\r\n\r\n{ TTMSFNCOpenLayersCircles }\r\n\r\nfunction TTMSFNCOpenLayersCircles.Add: TTMSFNCOpenLayersCircle;\r\nbegin\r\n Result := TTMSFNCOpenLayersCircle(inherited Add);\r\nend;\r\n\r\nfunction TTMSFNCOpenLayersCircles.CreateItemClass: TCollectionItemClass;\r\nbegin\r\n Result := TTMSFNCOpenLayersCircle;\r\nend;\r\n\r\nfunction TTMSFNCOpenLayersCircles.GetItem(\r\n Index: Integer): TTMSFNCOpenLayersCircle;\r\nbegin\r\n Result := TTMSFNCOpenLayersCircle(inherited Items[Index]);\r\nend;\r\n\r\nfunction TTMSFNCOpenLayersCircles.Insert(\r\n Index: Integer): TTMSFNCOpenLayersCircle;\r\nbegin\r\n Result := TTMSFNCOpenLayersCircle(inherited Insert(Index));\r\nend;\r\n\r\nprocedure TTMSFNCOpenLayersCircles.SetItem(Index: Integer;\r\n const Value: TTMSFNCOpenLayersCircle);\r\nbegin\r\n inherited Items[Index] := Value;\r\nend;\r\n\r\n{ TTMSFNCOpenLayersRectangle }\r\n\r\nprocedure TTMSFNCOpenLayersRectangle.Assign(Source: TPersistent);\r\nbegin\r\n inherited;\r\n if Source is TTMSFNCOpenLayersRectangle then\r\n begin\r\n FDraggable := (Source as TTMSFNCOpenLayersRectangle).Draggable;\r\n end;\r\nend;\r\n\r\nconstructor TTMSFNCOpenLayersRectangle.Create(ACollection: TCollection);\r\nbegin\r\n inherited;\r\n FDraggable := False;\r\nend;\r\n\r\ndestructor TTMSFNCOpenLayersRectangle.Destroy;\r\nbegin\r\n inherited;\r\nend;\r\n\r\nprocedure TTMSFNCOpenLayersRectangle.SetDraggable(const Value: Boolean);\r\nbegin\r\n if (FDraggable <> Value) then\r\n begin\r\n FDraggable := Value;\r\n UpdatePolyElement;\r\n end;\r\nend;\r\n\r\n{ TTMSFNCOpenLayersRectangles }\r\n\r\nfunction TTMSFNCOpenLayersRectangles.Add: TTMSFNCOpenLayersRectangle;\r\nbegin\r\n Result := TTMSFNCOpenLayersRectangle(inherited Add);\r\nend;\r\n\r\nfunction TTMSFNCOpenLayersRectangles.CreateItemClass: TCollectionItemClass;\r\nbegin\r\n Result := TTMSFNCOpenLayersRectangle;\r\nend;\r\n\r\nfunction TTMSFNCOpenLayersRectangles.GetItem(\r\n Index: Integer): TTMSFNCOpenLayersRectangle;\r\nbegin\r\n Result := TTMSFNCOpenLayersRectangle(inherited Items[Index]);\r\nend;\r\n\r\nfunction TTMSFNCOpenLayersRectangles.Insert(\r\n Index: Integer): TTMSFNCOpenLayersRectangle;\r\nbegin\r\n Result := TTMSFNCOpenLayersRectangle(inherited Insert(Index));\r\nend;\r\n\r\nprocedure TTMSFNCOpenLayersRectangles.SetItem(Index: Integer;\r\n const Value: TTMSFNCOpenLayersRectangle);\r\nbegin\r\n inherited Items[Index] := Value;\r\nend;\r\n\r\n{ TTMSFNCOpenLayersTileLayerParams }\r\n\r\nprocedure TTMSFNCOpenLayersTileLayerParams.Assign(Source: TPersistent);\r\nbegin\r\n if Source is TTMSFNCOpenLayersTileLayerParams then\r\n begin\r\n FLayers := (Source as TTMSFNCOpenLayersTileLayerParams).Layers;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCOpenLayersTileLayerParams.Changed;\r\nbegin\r\n if Assigned(OnChange) then\r\n OnChange(Self);\r\nend;\r\n\r\nconstructor TTMSFNCOpenLayersTileLayerParams.Create;\r\nbegin\r\nend;\r\n\r\nprocedure TTMSFNCOpenLayersTileLayerParams.SetLayers(const Value: string);\r\nbegin\r\n if FLayers <> Value then\r\n begin\r\n FLayers := Value;\r\n Changed;\r\n end;\r\nend;\r\n\r\n{ TTMSFNCOpenLayersClusters }\r\n\r\nfunction TTMSFNCOpenLayersClusters.Add: TTMSFNCOpenLayersCluster;\r\nbegin\r\n Result := TTMSFNCOpenLayersCluster(inherited Add);\r\nend;\r\n\r\nprocedure TTMSFNCOpenLayersClusters.Clear;\r\nvar\r\n l: TTMSFNCCustomMaps;\r\n ci: TCollectionItem;\r\nbegin\r\n l := FOwner;\r\n if Assigned(l) then\r\n l.BeginUpdate;\r\n\r\n if Count > 0 then\r\n begin\r\n while Count > 0 do\r\n begin\r\n ci := TCollectionItem(Items[Count - 1]);\r\n ci.Free;\r\n end;\r\n end;\r\n\r\n if Assigned(l) then\r\n l.EndUpdate;\r\nend;\r\n\r\nconstructor TTMSFNCOpenLayersClusters.Create(AOwner: TTMSFNCCustomMaps);\r\nbegin\r\n inherited Create(AOwner, CreateItemClass);\r\n FOwner := AOwner;\r\nend;\r\n\r\nfunction TTMSFNCOpenLayersClusters.CreateItemClass: TCollectionItemClass;\r\nbegin\r\n Result := TTMSFNCOpenLayersCluster;\r\nend;\r\n\r\nfunction TTMSFNCOpenLayersClusters.GetItem(\r\n Index: Integer): TTMSFNCOpenLayersCluster;\r\nbegin\r\n Result := TTMSFNCOpenLayersCluster(inherited Items[Index]);\r\nend;\r\n\r\nfunction TTMSFNCOpenLayersClusters.GetOwner: TPersistent;\r\nbegin\r\n Result := FOwner;\r\nend;\r\n\r\nfunction TTMSFNCOpenLayersClusters.Insert(\r\n Index: Integer): TTMSFNCOpenLayersCluster;\r\nbegin\r\n Result := TTMSFNCOpenLayersCluster(inherited Insert(Index));\r\nend;\r\n\r\nprocedure TTMSFNCOpenLayersClusters.Recreate;\r\nvar\r\n I: Integer;\r\nbegin\r\n for I := 0 to Count - 1 do\r\n Items[I].Recreate := True;\r\nend;\r\n\r\nprocedure TTMSFNCOpenLayersClusters.SetItem(Index: Integer;\r\n const Value: TTMSFNCOpenLayersCluster);\r\nbegin\r\n inherited Items[Index] := Value;\r\nend;\r\n\r\n{ TTMSFNCOpenLayersCluster }\r\n\r\nprocedure TTMSFNCOpenLayersCluster.Assign(Source: TPersistent);\r\nbegin\r\n if Source is TTMSFNCOpenLayersCluster then\r\n begin\r\n FImagePath := (Source as TTMSFNCOpenLayersCluster).ImagePath;\r\n FFontColor := (Source as TTMSFNCOpenLayersCluster).FontColor;\r\n FFillColor := (Source as TTMSFNCOpenLayersCluster).FillColor;\r\n FStrokeColor := (Source as TTMSFNCOpenLayersCluster).StrokeColor;\r\n end;\r\nend;\r\n\r\nconstructor TTMSFNCOpenLayersCluster.Create(ACollection: TCollection);\r\nbegin\r\n inherited;\r\n FImagePath := '';\r\n FFontColor := gcWhite;\r\n FillColor := gcLightskyblue;\r\n StrokeColor := gcWhite;\r\n\r\n if Assigned(ACollection) then\r\n FOwner := (Collection as TTMSFNCOpenLayersClusters).FOwner;\r\n\r\n UpdateCluster;\r\nend;\r\n\r\ndestructor TTMSFNCOpenLayersCluster.Destroy;\r\nbegin\r\n inherited;\r\n if Assigned(FMarkers) then\r\n FMarkers.Free;\r\n UpdateCluster;\r\nend;\r\n\r\nfunction TTMSFNCOpenLayersCluster.GetID: string;\r\nbegin\r\n if (FID = '') or FRecreate then\r\n FID := CreateNewGUID;\r\n\r\n FRecreate := False;\r\n Result := FID;\r\nend;\r\n\r\nfunction TTMSFNCOpenLayersCluster.GetMarkers: TTMSFNCOpenLayersMarkersList;\r\nvar\r\n I: Integer;\r\n m: TTMSFNCOpenLayersMarker;\r\nbegin\r\n if not Assigned(FMarkers) then\r\n FMarkers := TTMSFNCOpenLayersMarkersList.Create;\r\n\r\n FMarkers.Clear;\r\n\r\n if Assigned(FOwner) then\r\n begin\r\n for I := 0 to TTMSFNCCustomOpenLayers(FOwner).Markers.Count - 1 do\r\n begin\r\n m := TTMSFNCCustomOpenLayers(FOwner).Markers[I];\r\n if m.Cluster = Self then\r\n FMarkers.Add(m);\r\n end;\r\n end;\r\n\r\n Result := FMarkers;\r\nend;\r\n\r\nfunction TTMSFNCOpenLayersCluster.IsImagePathStored: Boolean;\r\nbegin\r\n Result := ImagePath <> '';\r\nend;\r\n\r\nprocedure TTMSFNCOpenLayersCluster.SetFillColor(\r\n const Value: TTMSFNCGraphicsColor);\r\nbegin\r\n if FFillColor <> Value then\r\n begin\r\n FFillColor := Value;\r\n UpdateCluster;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCOpenLayersCluster.SetFontColor(\r\n const Value: TTMSFNCGraphicsColor);\r\nbegin\r\n if FFontColor <> Value then\r\n begin\r\n FFontColor := Value;\r\n UpdateCluster;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCOpenLayersCluster.SetImagePath(const Value: string);\r\nbegin\r\n if FImagePath <> Value then\r\n begin\r\n FImagePath := Value;\r\n UpdateCluster;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCOpenLayersCluster.SetStrokeColor(\r\n const Value: TTMSFNCGraphicsColor);\r\nbegin\r\n if FStrokeColor <> Value then\r\n begin\r\n FStrokeColor := Value;\r\n UpdateCluster;\r\n end;\r\nend;\r\n\r\nprocedure TTMSFNCOpenLayersCluster.UpdateCluster;\r\nbegin\r\n FReload := True;\r\n if Assigned(FOwner) then\r\n (FOwner as TTMSFNCCustomOpenLayers).UpdateClusters;\r\nend;\r\n\r\n{$IFDEF WEBLIB}\r\nfunction TTMSFNCOpenLayersMarkersList.GetItem(Index: Integer): TTMSFNCOpenLayersMarker;\r\nbegin\r\n Result := TTMSFNCOpenLayersMarker(inherited Items[Index]);\r\nend;\r\n\r\nprocedure TTMSFNCOpenLayersMarkersList.SetItem(Index: Integer; const Value: TTMSFNCOpenLayersMarker);\r\nbegin\r\n inherited Items[Index] := Value;\r\nend;\r\n{$ENDIF}\r\n\r\n\r\n{ TTMSFNCOpenLayersHeatMap }\r\n\r\nprocedure TTMSFNCOpenLayersHeatMap.Assign(Source: TPersistent);\r\nbegin\r\n inherited;\r\nend;\r\n\r\nconstructor TTMSFNCOpenLayersHeatMap.Create(ACollection: TCollection);\r\nbegin\r\n inherited;\r\nend;\r\n\r\ndestructor TTMSFNCOpenLayersHeatMap.Destroy;\r\nbegin\r\n inherited;\r\nend;\r\n\r\n{ TTMSFNCOpenLayersHeatMaps }\r\n\r\nfunction TTMSFNCOpenLayersHeatMaps.Add: TTMSFNCOpenLayersHeatMap;\r\nbegin\r\n Result := TTMSFNCOpenLayersHeatMap(inherited Add);\r\nend;\r\n\r\nfunction TTMSFNCOpenLayersHeatMaps.CreateItemClass: TCollectionItemClass;\r\nbegin\r\n Result := TTMSFNCOpenLayersHeatMap;\r\nend;\r\n\r\nfunction TTMSFNCOpenLayersHeatMaps.GetItem(\r\n Index: Integer): TTMSFNCOpenLayersHeatMap;\r\nbegin\r\n Result := TTMSFNCOpenLayersHeatMap(inherited Items[Index]);\r\nend;\r\n\r\nfunction TTMSFNCOpenLayersHeatMaps.Insert(\r\n Index: Integer): TTMSFNCOpenLayersHeatMap;\r\nbegin\r\n Result := TTMSFNCOpenLayersHeatMap(inherited Insert(Index));\r\nend;\r\n\r\nprocedure TTMSFNCOpenLayersHeatMaps.SetItem(Index: Integer;\r\n const Value: TTMSFNCOpenLayersHeatMap);\r\nbegin\r\n inherited Items[Index] := Value;\r\nend;\r\n\r\n\r\nend.\r\n","unit unit_Karte;\r\n\r\ninterface\r\n\r\nuses\r\n System.SysUtils, System.Classes, JS, Web, WEBLib.Graphics, WEBLib.Controls,\r\n WEBLib.Forms, WEBLib.Dialogs, WEBLib.ExtCtrls, WEBLib.Buttons, Vcl.Controls,\r\n Vcl.StdCtrls, WEBLib.StdCtrls, WEBLib.WebCtrls, VCL.TMSFNCTypes,\r\n VCL.TMSFNCUtils, VCL.TMSFNCGraphics, VCL.TMSFNCGraphicsTypes,\r\n VCL.TMSFNCCustomControl, VCL.TMSFNCWebBrowser, VCL.TMSFNCMaps,\r\n VCL.TMSFNCOpenLayers, VCL.TMSFNCCustomComponent, VCL.TMSFNCCloudBase,\r\n VCL.TMSFNCGeocoding, VCL.TMSFNCRouteCalculator;\r\n\r\ntype\r\n TKarte = class(TForm)\r\n Container1: THTMLContainer;\r\n Container2: THTMLContainer;\r\n btnzurueck: TButton;\r\n WebLabel2: TLabel;\r\n edtFromAddress: TEdit;\r\n btnroute: TButton;\r\n WebLabel1: TLabel;\r\n edtToAddress: TEdit;\r\n btnAnzeigen: TButton;\r\n Container3: THTMLContainer;\r\n container4: THTMLContainer;\r\n MGC: TTMSFNCGeocoding;\r\n Container5: THTMLContainer;\r\n FNCMAP: TTMSFNCOpenLayers;\r\n RouteCalculator1: TTMSFNCRouteCalculator;\r\n procedure WebFormShow(Sender: TObject);\r\n procedure btnAnzeigenClick(Sender: TObject);\r\n procedure btnrouteClick(Sender: TObject);\r\n procedure btnzurueckClick(Sender: TObject);\r\n procedure FNCMAPMapInitialized(Sender: TObject);\r\n private\r\n { Private-Deklarationen }\r\n public\r\n { Public-Deklarationen }\r\n mykundehint:string;\r\n protected procedure LoadDFMValues; override; end;\r\n\r\nvar\r\n Karte: TKarte;\r\n mylongitude:double;\r\n mylatitude:double;\r\n\r\nimplementation\r\n uses unit1, unit2;\r\n{$R *.dfm}\r\n\r\nprocedure TKarte.btnrouteClick(Sender: TObject);\r\nvar\r\n mapsurl:string;\r\nbegin\r\n\r\n\r\n\r\n if (edtFromAddress.Text <> '') and (edtToAddress.Text <> '') then\r\n begin\r\n //RouteCalculator1.CalculateRoute(edtFromAddress.Text, edtToAddress.Text);\r\n mapsurl:='https://www.google.com/maps/dir/'+edtfromaddress.Text+'/'+edtToAddress.Text;\r\n application.Navigate(mapsurl, ntblank);\r\n end\r\n else\r\n MessageDlg('Sie müssen Start- und Zieladresse eingeben',mtWarning, [MBOK]);\r\nend;\r\n\r\nprocedure TKarte.btnzurueckClick(Sender: TObject);\r\nbegin\r\n self.Close;\r\nend;\r\n\r\nprocedure TKarte.FNCMAPMapInitialized(Sender: TObject);\r\nbegin\r\n btnAnzeigenClick(Sender);\r\nend;\r\n\r\nprocedure TKarte.btnAnzeigenClick(Sender: TObject);\r\nbegin\r\n if edtToAddress.text<>'' then\r\n begin\r\n mgc.GetGeocoding(edtToAddress.text,\r\n procedure(const ARequest: TTMSFNCGeocodingRequest; const ARequestResult:TTMSFNCCloudBaseRequestResult)\r\n begin\r\n if (ARequestresult.Success) AND (ARequest.Items.Count > 0) then\r\n begin\r\n FNCMap.Options.DefaultZoomLevel:=15;\r\n FNCMap.SetCenterCoordinate(arequest.Items[0].Coordinate.Latitude,arequest.Items[0].Coordinate.Longitude);\r\n fncmap.Markers[0].Longitude:=arequest.Items[0].Coordinate.Longitude;\r\n fncmap.Markers[0].Latitude:=arequest.Items[0].Coordinate.Latitude;\r\n fncmap.markers[0].Title:='ZIEL';\r\n end;\r\n end\r\n );\r\n end;\r\nend;\r\n\r\nprocedure TKarte.WebFormShow(Sender: TObject);\r\nvar\r\n myelement:TJSHTMLElement;\r\nbegin\r\n Container1.html.text:='';\r\n myelement:=container1.ElementHandle;\r\n btnzurueck.ParentElement:=myelement;\r\n Container2.HTML.Text:='';\r\n container2.ParentElement:=myelement;\r\n myelement:=container2.ElementHandle;\r\n container3.parentelement:=myelement;\r\n container4.parentelement:=myelement;\r\n container5.parentelement:=myelement;\r\n myelement:=container5.ElementHandle;\r\n fncmap.parentelement:=myelement;\r\n\r\n\r\n\r\n\r\n\r\n\r\n myelement:=container3.ElementHandle;\r\n weblabel2.ParentElement:=myelement;\r\n edtFromAddress.ParentElement:=myelement;\r\n btnroute.ParentElement:=myelement;\r\n\r\n myelement:=container4.ElementHandle;\r\n weblabel1.ParentElement:=myelement;\r\n edtToAddress.ParentElement:=myelement;\r\n btnAnzeigen.ParentElement:=myelement;\r\n\r\n edtFromAddress.Text:=dm2.tableSYSDATPostleitzahl.AsString+' '+dm2.tableSYSDATOrt.AsString+', '+dm2.tableSYSDATStrasse.AsString;\r\n\r\nend;\r\n\r\nprocedure TKarte.LoadDFMValues;\r\nbegin\r\n inherited LoadDFMValues;\r\n\r\n WebLabel2 := TLabel.Create(Self);\r\n WebLabel1 := TLabel.Create(Self);\r\n Container1 := THTMLContainer.Create(Self);\r\n Container2 := THTMLContainer.Create(Self);\r\n btnzurueck := TButton.Create(Self);\r\n edtFromAddress := TEdit.Create(Self);\r\n btnroute := TButton.Create(Self);\r\n edtToAddress := TEdit.Create(Self);\r\n btnAnzeigen := TButton.Create(Self);\r\n Container3 := THTMLContainer.Create(Self);\r\n container4 := THTMLContainer.Create(Self);\r\n MGC := TTMSFNCGeocoding.Create(Self);\r\n Container5 := THTMLContainer.Create(Self);\r\n FNCMAP := TTMSFNCOpenLayers.Create(Self);\r\n RouteCalculator1 := TTMSFNCRouteCalculator.Create(Self);\r\n\r\n WebLabel2.BeforeLoadDFMValues;\r\n WebLabel1.BeforeLoadDFMValues;\r\n Container1.BeforeLoadDFMValues;\r\n Container2.BeforeLoadDFMValues;\r\n btnzurueck.BeforeLoadDFMValues;\r\n edtFromAddress.BeforeLoadDFMValues;\r\n btnroute.BeforeLoadDFMValues;\r\n edtToAddress.BeforeLoadDFMValues;\r\n btnAnzeigen.BeforeLoadDFMValues;\r\n Container3.BeforeLoadDFMValues;\r\n container4.BeforeLoadDFMValues;\r\n MGC.BeforeLoadDFMValues;\r\n Container5.BeforeLoadDFMValues;\r\n FNCMAP.BeforeLoadDFMValues;\r\n RouteCalculator1.BeforeLoadDFMValues;\r\n try\r\n Name := 'Karte';\r\n Width := 437;\r\n Height := 529;\r\n CSSLibrary := cssBootstrap;\r\n ElementFont := efCSS;\r\n ElementPosition := epIgnore;\r\n Font.Charset := DEFAULT_CHARSET;\r\n Font.Color := clWindowText;\r\n Font.Height := -11;\r\n Font.Name := 'Tahoma';\r\n Font.Style := [];\r\n ParentFont := False;\r\n SetEvent(Self, 'OnShow', 'WebFormShow');\r\n WebLabel2.SetParentComponent(Self);\r\n WebLabel2.Name := 'WebLabel2';\r\n WebLabel2.Left := 15;\r\n WebLabel2.Top := 131;\r\n WebLabel2.Width := 24;\r\n WebLabel2.Height := 13;\r\n WebLabel2.AutoSize := False;\r\n WebLabel2.Caption := 'Start';\r\n WebLabel2.ElementClassName := 'h5 text-primary m-1';\r\n WebLabel2.ElementFont := efCSS;\r\n WebLabel2.ElementPosition := epIgnore;\r\n WebLabel2.HeightStyle := ssAuto;\r\n WebLabel2.HeightPercent := 100.000000000000000000;\r\n WebLabel2.WidthStyle := ssAuto;\r\n WebLabel2.WidthPercent := 100.000000000000000000;\r\n WebLabel1.SetParentComponent(Self);\r\n WebLabel1.Name := 'WebLabel1';\r\n WebLabel1.Left := 15;\r\n WebLabel1.Top := 188;\r\n WebLabel1.Width := 20;\r\n WebLabel1.Height := 13;\r\n WebLabel1.AutoSize := False;\r\n WebLabel1.Caption := 'Ziel';\r\n WebLabel1.ElementClassName := 'h5 text-primary m-1';\r\n WebLabel1.ElementFont := efCSS;\r\n WebLabel1.ElementPosition := epIgnore;\r\n WebLabel1.HeightStyle := ssAuto;\r\n WebLabel1.HeightPercent := 100.000000000000000000;\r\n WebLabel1.WidthStyle := ssAuto;\r\n WebLabel1.WidthPercent := 100.000000000000000000;\r\n Container1.SetParentComponent(Self);\r\n Container1.Name := 'Container1';\r\n Container1.Left := 0;\r\n Container1.Top := 0;\r\n Container1.Width := 437;\r\n Container1.Height := 41;\r\n Container1.HeightStyle := ssAuto;\r\n Container1.WidthStyle := ssPercent;\r\n Container1.Align := alTop;\r\n Container1.ElementFont := efCSS;\r\n Container1.ElementPosition := epIgnore;\r\n Container2.SetParentComponent(Self);\r\n Container2.Name := 'Container2';\r\n Container2.Left := 0;\r\n Container2.Top := 41;\r\n Container2.Width := 437;\r\n Container2.Height := 41;\r\n Container2.ElementClassName := 'd-flex flex-column m-1';\r\n Container2.HeightStyle := ssAuto;\r\n Container2.WidthStyle := ssAuto;\r\n Container2.Align := alTop;\r\n Container2.ChildOrder := 1;\r\n Container2.ElementFont := efCSS;\r\n Container2.ElementPosition := epIgnore;\r\n btnzurueck.SetParentComponent(Self);\r\n btnzurueck.Name := 'btnzurueck';\r\n btnzurueck.Left := 0;\r\n btnzurueck.Top := 94;\r\n btnzurueck.Width := 96;\r\n btnzurueck.Height := 25;\r\n btnzurueck.Caption := '<< zur'#252'ck';\r\n btnzurueck.ChildOrder := 4;\r\n btnzurueck.ElementClassName := 'btn btn-info btn-sm m-1 text-left';\r\n btnzurueck.ElementFont := efCSS;\r\n btnzurueck.ElementPosition := epIgnore;\r\n btnzurueck.HeightStyle := ssAuto;\r\n btnzurueck.HeightPercent := 100.000000000000000000;\r\n btnzurueck.WidthStyle := ssAuto;\r\n btnzurueck.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnzurueck, Self, 'OnClick', 'btnzurueckClick');\r\n edtFromAddress.SetParentComponent(Self);\r\n edtFromAddress.Name := 'edtFromAddress';\r\n edtFromAddress.Left := 16;\r\n edtFromAddress.Top := 157;\r\n edtFromAddress.Width := 329;\r\n edtFromAddress.Height := 19;\r\n edtFromAddress.ChildOrder := 6;\r\n edtFromAddress.ElementClassName := 'form-control input-sm';\r\n edtFromAddress.ElementFont := efCSS;\r\n edtFromAddress.ElementPosition := epIgnore;\r\n edtFromAddress.HeightStyle := ssAuto;\r\n edtFromAddress.HeightPercent := 100.000000000000000000;\r\n edtFromAddress.Text := 'edtFromAddress';\r\n edtFromAddress.WidthPercent := 100.000000000000000000;\r\n btnroute.SetParentComponent(Self);\r\n btnroute.Name := 'btnroute';\r\n btnroute.Left := 16;\r\n btnroute.Top := 207;\r\n btnroute.Width := 96;\r\n btnroute.Height := 25;\r\n btnroute.Caption := 'Route';\r\n btnroute.ChildOrder := 8;\r\n btnroute.ElementClassName := 'btn btn-info btn-sm m-1 text-left';\r\n btnroute.ElementFont := efCSS;\r\n btnroute.ElementPosition := epIgnore;\r\n btnroute.HeightStyle := ssAuto;\r\n btnroute.HeightPercent := 100.000000000000000000;\r\n btnroute.WidthStyle := ssAuto;\r\n btnroute.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnroute, Self, 'OnClick', 'btnrouteClick');\r\n edtToAddress.SetParentComponent(Self);\r\n edtToAddress.Name := 'edtToAddress';\r\n edtToAddress.Left := 16;\r\n edtToAddress.Top := 182;\r\n edtToAddress.Width := 329;\r\n edtToAddress.Height := 19;\r\n edtToAddress.ChildOrder := 1;\r\n edtToAddress.ElementClassName := 'form-control input-sm';\r\n edtToAddress.ElementFont := efCSS;\r\n edtToAddress.ElementPosition := epIgnore;\r\n edtToAddress.HeightStyle := ssAuto;\r\n edtToAddress.HeightPercent := 100.000000000000000000;\r\n edtToAddress.Text := 'edtToAddress';\r\n edtToAddress.WidthPercent := 100.000000000000000000;\r\n btnAnzeigen.SetParentComponent(Self);\r\n btnAnzeigen.Name := 'btnAnzeigen';\r\n btnAnzeigen.Left := 16;\r\n btnAnzeigen.Top := 238;\r\n btnAnzeigen.Width := 96;\r\n btnAnzeigen.Height := 25;\r\n btnAnzeigen.Caption := 'anzeigen';\r\n btnAnzeigen.ChildOrder := 2;\r\n btnAnzeigen.ElementClassName := 'btn btn-info btn-sm m-1 text-left';\r\n btnAnzeigen.ElementFont := efCSS;\r\n btnAnzeigen.ElementPosition := epIgnore;\r\n btnAnzeigen.HeightStyle := ssAuto;\r\n btnAnzeigen.HeightPercent := 100.000000000000000000;\r\n btnAnzeigen.WidthStyle := ssAuto;\r\n btnAnzeigen.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnAnzeigen, Self, 'OnClick', 'btnAnzeigenClick');\r\n Container3.SetParentComponent(Self);\r\n Container3.Name := 'Container3';\r\n Container3.Left := 102;\r\n Container3.Top := 103;\r\n Container3.Width := 169;\r\n Container3.Height := 41;\r\n Container3.ElementClassName := 'd-flex flex-wrap m-1 border border-info';\r\n Container3.HeightStyle := ssAuto;\r\n Container3.WidthStyle := ssAuto;\r\n Container3.ChildOrder := 2;\r\n Container3.ElementFont := efCSS;\r\n Container3.ElementPosition := epIgnore;\r\n container4.SetParentComponent(Self);\r\n container4.Name := 'container4';\r\n container4.Left := 200;\r\n container4.Top := 110;\r\n container4.Width := 169;\r\n container4.Height := 41;\r\n container4.ElementClassName := 'd-flex flex-wrap m-1 border border-info';\r\n container4.HeightStyle := ssAuto;\r\n container4.WidthStyle := ssAuto;\r\n container4.ChildOrder := 2;\r\n container4.ElementFont := efCSS;\r\n container4.ElementPosition := epIgnore;\r\n MGC.SetParentComponent(Self);\r\n MGC.Name := 'MGC';\r\n MGC.Left := 56;\r\n MGC.Top := 496;\r\n MGC.Width := 26;\r\n MGC.Height := 26;\r\n MGC.Visible := True;\r\n MGC.Service := gsOpenStreetMap;\r\n Container5.SetParentComponent(Self);\r\n Container5.Name := 'Container5';\r\n Container5.Left := 200;\r\n Container5.Top := 222;\r\n Container5.Width := 169;\r\n Container5.Height := 41;\r\n Container5.ElementClassName := 'd-flex m-1 border border-info';\r\n Container5.HeightStyle := ssAuto;\r\n Container5.WidthStyle := ssAuto;\r\n Container5.ChildOrder := 2;\r\n Container5.ElementFont := efCSS;\r\n Container5.ElementPosition := epIgnore;\r\n FNCMAP.SetParentComponent(Self);\r\n FNCMAP.Name := 'FNCMAP';\r\n FNCMAP.AlignWithMargins := True;\r\n FNCMAP.Left := 3;\r\n FNCMAP.Top := 332;\r\n FNCMAP.Width := 431;\r\n FNCMAP.Height := 194;\r\n FNCMAP.Margins.Top := 250;\r\n FNCMAP.Align := alClient;\r\n FNCMAP.ParentDoubleBuffered := False;\r\n FNCMAP.DoubleBuffered := True;\r\n FNCMAP.TabOrder := 11;\r\n SetEvent(FNCMAP, Self, 'OnMapInitialized', 'FNCMAPMapInitialized');\r\n FNCMAP.Markers.Clear;\r\n with FNCMAP.Markers.Add do\r\n begin\r\n Longitude := -74.044501999999990000;\r\n Latitude := 40.689247000000000000;\r\n end;\r\n FNCMAP.Options.Locale := 'de-DE';\r\n FNCMAP.Options.DefaultLatitude := 40.689247000000000000;\r\n FNCMAP.Options.DefaultLongitude := -74.044501999999990000;\r\n FNCMAP.Options.DefaultZoomLevel := 14.000000000000000000;\r\n FNCMAP.LocalFileAccess := True;\r\n FNCMAP.RouteCalculator := RouteCalculator1;\r\n RouteCalculator1.SetParentComponent(Self);\r\n RouteCalculator1.Name := 'RouteCalculator1';\r\n RouteCalculator1.Left := 136;\r\n RouteCalculator1.Top := 296;\r\n RouteCalculator1.Width := 26;\r\n RouteCalculator1.Height := 26;\r\n RouteCalculator1.Visible := True;\r\n RouteCalculator1.Service := csOpenRouteService;\r\n RouteCalculator1.Routes.Clear;\r\n with RouteCalculator1.Routes.Add do\r\n begin\r\n ID := '';\r\n Active := True;\r\n end;\r\n RouteCalculator1.Options.IncludeAlternativeRoutes := True;\r\n finally\r\n WebLabel2.AfterLoadDFMValues;\r\n WebLabel1.AfterLoadDFMValues;\r\n Container1.AfterLoadDFMValues;\r\n Container2.AfterLoadDFMValues;\r\n btnzurueck.AfterLoadDFMValues;\r\n edtFromAddress.AfterLoadDFMValues;\r\n btnroute.AfterLoadDFMValues;\r\n edtToAddress.AfterLoadDFMValues;\r\n btnAnzeigen.AfterLoadDFMValues;\r\n Container3.AfterLoadDFMValues;\r\n container4.AfterLoadDFMValues;\r\n MGC.AfterLoadDFMValues;\r\n Container5.AfterLoadDFMValues;\r\n FNCMAP.AfterLoadDFMValues;\r\n RouteCalculator1.AfterLoadDFMValues;\r\n end;\r\nend;\r\n\r\nend.\r\n","unit unit_EinzelBeleg;\r\n\r\ninterface\r\n\r\nuses\r\n System.SysUtils, System.Classes, JS, Web, WEBLib.Graphics, WEBLib.Controls,\r\n WEBLib.Forms, WEBLib.Dialogs, WEBLib.Buttons, Vcl.Controls, Vcl.StdCtrls,\r\n WEBLib.StdCtrls, WEBLib.ExtCtrls, Data.DB, XData.Web.JsonDataset,\r\n XData.Web.Dataset, WEBLib.Grids, strutils, XData.Web.Client, DB;\r\n\r\ntype\r\n TEinzelBeleg = class(TForm)\r\n xdsBeleg: TXDataWebDataSet;\r\n TC: TTableControl;\r\n PTC: TTableControl;\r\n xdsPositionen: TXDataWebDataSet;\r\n Container1: THTMLContainer;\r\n Container2: THTMLContainer;\r\n btnzurueck: TButton;\r\n btnPDF: TButton;\r\n WClient: TXDataWebClient;\r\n procedure WebFormShow(Sender: TObject);\r\n procedure xdsBelegAfterOpen(DataSet: TDataSet);\r\n procedure xdsPositionenAfterOpen(DataSet: TDataSet);\r\n procedure btnPDFClick(Sender: TObject);\r\n procedure btnzurueckClick(Sender: TObject);\r\n private\r\n { Private-Deklarationen }\r\n public\r\n { Public-Deklarationen }\r\n Belegnummer:string;\r\n Belegart:string;\r\n\r\n protected procedure LoadDFMValues; override; end;\r\n\r\nvar\r\n EinzelBeleg: TEinzelBeleg;\r\n Einkauf:boolean;\r\n\r\nimplementation\r\n uses unit1, unit2, unit_BelegeUndPositionen;\r\n{$R *.dfm}\r\n\r\nprocedure TEinzelBeleg.btnPDFClick(Sender: TObject);\r\n procedure OnResponse(Response:TXDataClientResponse);\r\n var\r\n mydownload:string;\r\n begin\r\n mydownload:=string(TJSObject(response.Result)['value']);\r\n if mydownload='WRONG' then\r\n begin\r\n showmessage('Download kann nicht bereitgestellt werden');\r\n end\r\n else\r\n begin\r\n application.Navigate(downloadconnection+mydownload,ntblank);\r\n end;\r\n end;\r\nbegin\r\n if LizenzOK then\r\n begin\r\n WClient.RawInvoke('IServerService.BelegPDF',[Belegnummer],@OnResponse);\r\n end\r\n else\r\n begin\r\n showmessage('Für das Abrufen von Dateien sind Sie noch nicht freigeschaltet, bitte erwerben Sie eine Lizenz');\r\n end;\r\n\r\nend;\r\n\r\nprocedure TEinzelBeleg.btnzurueckClick(Sender: TObject);\r\nbegin\r\n xdsbeleg.Close;\r\n\r\n self.Close;\r\nend;\r\n\r\nprocedure TEinzelBeleg.WebFormShow(Sender: TObject);\r\nvar\r\n myelement:TJSHTMLElement;\r\nbegin\r\n Container1.html.text:='';\r\n myelement:=container1.ElementHandle;\r\n btnzurueck.ParentElement:=myelement;\r\n btnPDF.ParentElement:=myelement;\r\n container2.ParentElement:=myelement;\r\n myelement:=container2.ElementHandle;\r\n tc.ParentElement:=myelement;\r\n ptc.ParentElement:=myelement;\r\n if Belegart='Angebote' then xdsbeleg.EntitySetName:='Angebote';\r\n if Belegart='Aufträge' then xdsbeleg.EntitySetName:='Auftrag';\r\n if Belegart='Lieferscheine' then xdsbeleg.EntitySetName:='Lieferschein';\r\n if Belegart='Rechnungen' then xdsbeleg.EntitySetName:='Rechnung';\r\n if Belegart='Anfragen' then xdsbeleg.EntitySetName:='Anfrage';\r\n if Belegart='Bestellungen' then xdsbeleg.EntitySetName:='Bestellung';\r\n if Belegart='Wareneingänge' then xdsbeleg.EntitySetName:='Wareneingang';\r\n if Belegart='EingangsRechnungen' then xdsbeleg.EntitySetName:='EingangsRE';\r\n\r\n if Belegart='Angebote' then Einkauf:=false;\r\n if Belegart='Aufträge' then Einkauf:=false;\r\n if Belegart='Lieferscheine' then Einkauf:=false;\r\n if Belegart='Rechnungen' then Einkauf:=false;\r\n if Belegart='Anfragen' then Einkauf:=true;\r\n if Belegart='Bestellungen' then Einkauf:=true;\r\n if Belegart='Wareneingänge' then Einkauf:=true;\r\n if Belegart='EingangsRechnungen' then Einkauf:=true;\r\n\r\n xdsBeleg.QueryString:='$expand=Kundennummer&$filter=Nummerkomplett eq '+QuotedStr(Belegnummer);\r\n xdsBeleg.Load;\r\nend;\r\n\r\nprocedure TEinzelBeleg.xdsBelegAfterOpen(DataSet: TDataSet);\r\nbegin\r\n TC.RowCount:=8;\r\n TC.Cells[0,0]:='Bezeichnung';\r\n TC.Cells[1,0]:='Wert';\r\n if Belegart='Angebote' then TC.Cells[0,1]:='Angebot | Datum';\r\n if Belegart='Aufträge' then TC.Cells[0,1]:='Auftrrag | Datum';\r\n if Belegart='Lieferscheine' then TC.Cells[0,1]:='Lieferschein | Datum';\r\n if Belegart='Rechnungen' then TC.Cells[0,1]:='Rechnung | Datum';\r\n if Belegart='Anfragen' then TC.Cells[0,1]:='Anfrage | Datum';\r\n if Belegart='Bestellungen' then TC.Cells[0,1]:='Bestellung | Datum';\r\n if Belegart='Wareneingänge' then TC.Cells[0,1]:='Wareneingang | Datum';\r\n if Belegart='EingangsRechnungen' then TC.Cells[0,1]:='Eingangsrechnung | Datum';\r\n TC.Cells[1,1]:='
'+xdsbeleg.FieldByName('Nummerkomplett').asstring +' | '+formatdatetime('DD.MM.YYYY',xdsbeleg.FieldByName('Datum').asdatetime);\r\n\r\n TC.Cells[0,2]:='Kontaktnummer';\r\n TC.Cells[1,2]:='
'+xdsBeleg.FieldByName('Kundennummer.Kundennummer').asstring;\r\n\r\n TC.Cells[0,3]:='Anschrift';\r\n TC.Cells[1,3]:='
'+ReplaceStr(xdsbeleg.FieldByName('Adressebild').asstring,#13+#10,'
');\r\n\r\n TC.Cells[0,4]:='Auftragsbezeichnung';\r\n TC.Cells[1,4]:='
'+xdsBeleg.FieldByName('Auftragsbezeichnung').asstring;\r\n\r\n TC.Cells[0,5]:='Objektnummer';\r\n TC.Cells[1,5]:='
'+xdsBeleg.FieldByName('Objektnummer').asstring;\r\n\r\n TC.Cells[0,6]:='Lieferanschrift';\r\n try\r\n TC.Cells[1,6]:='
'+ReplaceStr(xdsbeleg.FieldByName('Lieferanschriftbild').asstring,#13+#10,'
');\r\n except\r\n end;\r\n TC.Cells[0,7]:='Nettosumme';\r\n if form1.rcw.Verkaufspreise=true then TC.Cells[1,7]:=formatfloat('#,##0.00',xdsbeleg.fieldbyname('Nettosumme').asfloat);\r\n if form1.rcw.Verkaufspreise=false then TC.Cells[1,7]:='XXX';\r\n\r\n xdspositionen.Close;\r\n if Belegart='Angebote' then xdsPositionen.EntitySetName:='PositionenAngebote';\r\n if Belegart='Aufträge' then xdsPositionen.EntitySetName:='PositionenAuftrag';\r\n if Belegart='Lieferscheine' then xdsPositionen.EntitySetName:='PositionenLieferschein';\r\n if Belegart='Rechnungen' then xdsPositionen.EntitySetName:='PositionenRechnung';\r\n if Belegart='Anfragen' then xdsPositionen.EntitySetName:='PositionenAnfrage';\r\n if Belegart='Bestellungen' then xdsPositionen.EntitySetName:='PositionenBestellung';\r\n if Belegart='Wareneingänge' then xdsPositionen.EntitySetName:='PositionenWareneingang';\r\n if Belegart='EingangsRechnungen' then xdsPositionen.EntitySetName:='PositionenEingangsRE';\r\n xdsPositionen.QueryString:='$expand=Artikelnummer&$filter=Nummerkomplett eq '+QuotedStr(Belegnummer)+'&$orderby=PosNr';\r\n xdsPositionen.Load;\r\nend;\r\n\r\nprocedure TEinzelBeleg.xdsPositionenAfterOpen(DataSet: TDataSet);\r\nvar\r\n I: Integer;\r\nbegin\r\n PTC.RowCount:=xdsPositionen.RecordCount+1;\r\n PTC.ColCount:=8;\r\n PTC.Cells[0,0]:='PosNr';\r\n PTC.Cells[1,0]:='PosUNr';\r\n PTC.Cells[2,0]:='Artikelnummer';\r\n PTC.Cells[3,0]:='Artikelüberschrift';\r\n PTC.Cells[4,0]:='Beschreibung';\r\n PTC.Cells[5,0]:='Menge';\r\n PTC.Cells[6,0]:='Einzel-VKP';\r\n if Einkauf then PTC.Cells[6,0]:='Einzel-EKP';\r\n PTC.Cells[7,0]:='Endpreis';\r\n\r\n xdspositionen.First;\r\n btnpdf.Enabled:=true;\r\n for I := 1 to xdspositionen.RecordCount do\r\n begin\r\n PTC.Cells[0,i]:=xdspositionen.FieldByName('PosNr').AsString;\r\n PTC.Cells[1,i]:=xdspositionen.FieldByName('PosUNr').AsString;\r\n PTC.Cells[2,i]:=xdspositionen.FieldByName('Artikelnummer.Artikelnummer').AsString;\r\n PTC.Cells[3,i]:=xdspositionen.FieldByName('Artikelueberschrift').AsString;\r\n PTC.Cells[4,i]:=xdspositionen.FieldByName('Artikelbeschreibung').AsString;\r\n PTC.Cells[5,i]:='

'+xdspositionen.FieldByName('Menge').AsString;\r\n\r\n if not einkauf then\r\n begin\r\n if form1.RCW.Verkaufspreise=true then\r\n begin\r\n PTC.Cells[6,i]:='

'+formatfloat('#,##0.00',xdsPositionen.fieldbyname('Verkaufspreis').asfloat);\r\n PTC.Cells[7,i]:='

'+formatfloat('#,##0.00',xdsPositionen.fieldbyname('Endpreis').asfloat);\r\n end\r\n else\r\n begin\r\n PTC.Cells[6,i]:='XXX';\r\n PTC.Cells[7,i]:='XXX';\r\n btnPDF.Enabled:=false;\r\n end;\r\n end;\r\n if einkauf then\r\n begin\r\n if form1.RCW.Einkaufspreise=true then\r\n begin\r\n PTC.Cells[6,i]:='

'+formatfloat('#,##0.00',xdsPositionen.fieldbyname('Einkaufspreis').asfloat);\r\n PTC.Cells[7,i]:='

'+formatfloat('#,##0.00',xdsPositionen.fieldbyname('Endpreis').asfloat);\r\n end\r\n else\r\n begin\r\n PTC.Cells[6,i]:='XXX';\r\n PTC.Cells[7,i]:='XXX';\r\n btnPDF.Enabled:=false;\r\n end;\r\n end;\r\n\r\n\r\n\r\n xdspositionen.Next;\r\n end;\r\nend;\r\n\r\nprocedure TEinzelBeleg.LoadDFMValues;\r\nbegin\r\n inherited LoadDFMValues;\r\n\r\n TC := TTableControl.Create(Self);\r\n PTC := TTableControl.Create(Self);\r\n Container1 := THTMLContainer.Create(Self);\r\n Container2 := THTMLContainer.Create(Self);\r\n btnzurueck := TButton.Create(Self);\r\n btnPDF := TButton.Create(Self);\r\n xdsBeleg := TXDataWebDataSet.Create(Self);\r\n xdsPositionen := TXDataWebDataSet.Create(Self);\r\n WClient := TXDataWebClient.Create(Self);\r\n\r\n TC.BeforeLoadDFMValues;\r\n PTC.BeforeLoadDFMValues;\r\n Container1.BeforeLoadDFMValues;\r\n Container2.BeforeLoadDFMValues;\r\n btnzurueck.BeforeLoadDFMValues;\r\n btnPDF.BeforeLoadDFMValues;\r\n xdsBeleg.BeforeLoadDFMValues;\r\n xdsPositionen.BeforeLoadDFMValues;\r\n WClient.BeforeLoadDFMValues;\r\n try\r\n Name := 'EinzelBeleg';\r\n Width := 213;\r\n Height := 417;\r\n Caption := 'EinzelBeleg';\r\n CSSLibrary := cssBootstrap;\r\n ElementFont := efCSS;\r\n SetEvent(Self, 'OnShow', 'WebFormShow');\r\n TC.SetParentComponent(Self);\r\n TC.Name := 'TC';\r\n TC.Left := 0;\r\n TC.Top := 189;\r\n TC.Width := 169;\r\n TC.Height := 143;\r\n TC.ElementClassName := 'table table-hover table-bordered table-striped';\r\n TC.HeightStyle := ssAuto;\r\n TC.WidthStyle := ssPercent;\r\n TC.BorderColor := clSilver;\r\n TC.ChildOrder := 2;\r\n TC.ColHeader := False;\r\n TC.ElementFont := efCSS;\r\n TC.ElementHeaderClassName := 'table-info';\r\n TC.ElementPosition := epIgnore;\r\n TC.ElementTableClassName := 'table table-hover table-bordered table-striped';\r\n TC.WordWrap := True;\r\n TC.ColCount := 2;\r\n PTC.SetParentComponent(Self);\r\n PTC.Name := 'PTC';\r\n PTC.Left := 0;\r\n PTC.Top := 338;\r\n PTC.Width := 169;\r\n PTC.Height := 48;\r\n PTC.ElementClassName := 'table table-hover table-bordered table-striped';\r\n PTC.HeightStyle := ssAuto;\r\n PTC.WidthStyle := ssPercent;\r\n PTC.BorderColor := clSilver;\r\n PTC.ChildOrder := 2;\r\n PTC.ColHeader := False;\r\n PTC.ElementFont := efCSS;\r\n PTC.ElementHeaderClassName := 'table-info';\r\n PTC.ElementPosition := epIgnore;\r\n PTC.ElementTableClassName := 'table table-hover table-bordered table-striped';\r\n PTC.WordWrap := True;\r\n PTC.ColCount := 2;\r\n Container1.SetParentComponent(Self);\r\n Container1.Name := 'Container1';\r\n Container1.Left := 0;\r\n Container1.Top := 0;\r\n Container1.Width := 169;\r\n Container1.Height := 41;\r\n Container1.HeightStyle := ssAuto;\r\n Container1.WidthStyle := ssPercent;\r\n Container1.ChildOrder := 4;\r\n Container1.ElementFont := efCSS;\r\n Container1.ElementPosition := epIgnore;\r\n Container2.SetParentComponent(Self);\r\n Container2.Name := 'Container2';\r\n Container2.Left := 0;\r\n Container2.Top := 47;\r\n Container2.Width := 169;\r\n Container2.Height := 41;\r\n Container2.ElementClassName := 'd-flex flex-wrap m-1';\r\n Container2.HeightStyle := ssAuto;\r\n Container2.WidthStyle := ssAuto;\r\n Container2.ChildOrder := 1;\r\n Container2.ElementFont := efCSS;\r\n Container2.ElementPosition := epIgnore;\r\n btnzurueck.SetParentComponent(Self);\r\n btnzurueck.Name := 'btnzurueck';\r\n btnzurueck.Left := 0;\r\n btnzurueck.Top := 158;\r\n btnzurueck.Width := 96;\r\n btnzurueck.Height := 25;\r\n btnzurueck.Caption := '<< zur'#252'ck';\r\n btnzurueck.ChildOrder := 4;\r\n btnzurueck.ElementClassName := 'btn btn-info btn-sm m-1 text-left';\r\n btnzurueck.ElementFont := efCSS;\r\n btnzurueck.ElementPosition := epIgnore;\r\n btnzurueck.HeightStyle := ssAuto;\r\n btnzurueck.HeightPercent := 100.000000000000000000;\r\n btnzurueck.WidthStyle := ssAuto;\r\n btnzurueck.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnzurueck, Self, 'OnClick', 'btnzurueckClick');\r\n btnPDF.SetParentComponent(Self);\r\n btnPDF.Name := 'btnPDF';\r\n btnPDF.Left := 102;\r\n btnPDF.Top := 158;\r\n btnPDF.Width := 96;\r\n btnPDF.Height := 25;\r\n btnPDF.Caption := 'PDF';\r\n btnPDF.ChildOrder := 4;\r\n btnPDF.ElementClassName := 'btn btn-info btn-sm m-1 text-left';\r\n btnPDF.ElementFont := efCSS;\r\n btnPDF.ElementPosition := epIgnore;\r\n btnPDF.HeightStyle := ssAuto;\r\n btnPDF.HeightPercent := 100.000000000000000000;\r\n btnPDF.WidthStyle := ssAuto;\r\n btnPDF.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnPDF, Self, 'OnClick', 'btnPDFClick');\r\n xdsBeleg.SetParentComponent(Self);\r\n xdsBeleg.Name := 'xdsBeleg';\r\n xdsBeleg.AfterOpen := xdsBelegAfterOpen;\r\n xdsBeleg.EntitySetName := 'Angebote';\r\n xdsBeleg.Connection := DM2.XDataWebConnection1;\r\n xdsBeleg.SubpropsDepth := 1;\r\n xdsBeleg.QueryString := '$expand=Kundennummer';\r\n xdsBeleg.Left := 476;\r\n xdsBeleg.Top := 72;\r\n xdsPositionen.SetParentComponent(Self);\r\n xdsPositionen.Name := 'xdsPositionen';\r\n xdsPositionen.AfterOpen := xdsPositionenAfterOpen;\r\n xdsPositionen.EntitySetName := 'PositionenAnfrage';\r\n xdsPositionen.Connection := DM2.XDataWebConnection1;\r\n xdsPositionen.SubpropsDepth := 1;\r\n xdsPositionen.QueryString := '$expand=Artikelnummer';\r\n xdsPositionen.Left := 476;\r\n xdsPositionen.Top := 128;\r\n WClient.SetParentComponent(Self);\r\n WClient.Name := 'WClient';\r\n WClient.Connection := DM2.XDataWebConnection1;\r\n WClient.Left := 72;\r\n WClient.Top := 98;\r\n finally\r\n TC.AfterLoadDFMValues;\r\n PTC.AfterLoadDFMValues;\r\n Container1.AfterLoadDFMValues;\r\n Container2.AfterLoadDFMValues;\r\n btnzurueck.AfterLoadDFMValues;\r\n btnPDF.AfterLoadDFMValues;\r\n xdsBeleg.AfterLoadDFMValues;\r\n xdsPositionen.AfterLoadDFMValues;\r\n WClient.AfterLoadDFMValues;\r\n end;\r\nend;\r\n\r\nend.","unit unit_BelegeUndPositionen;\r\n\r\ninterface\r\n\r\nuses\r\n System.SysUtils, System.Classes, JS, Web, WEBLib.Graphics, WEBLib.Controls,\r\n WEBLib.Forms, WEBLib.Dialogs, WEBLib.Buttons, Vcl.Controls, Vcl.StdCtrls,\r\n WEBLib.StdCtrls, WEBLib.ExtCtrls, Data.DB, XData.Web.JsonDataset,\r\n XData.Web.Dataset, Vcl.Grids, WEBLib.DBCtrls, WEBLib.DB, WEBLib.Grids, DB;\r\n\r\ntype\r\n TBelegePositionen = class(TForm)\r\n xdsBelege: TXDataWebDataSet;\r\n xdsPositionen: TXDataWebDataSet;\r\n sourceBelege: TDataSource;\r\n TC: TTableControl;\r\n Container1: THTMLContainer;\r\n Container2: THTMLContainer;\r\n btnzurueck: TButton;\r\n comboBelegart: TComboBox;\r\n btnAnzeigen: TButton;\r\n edtsuchbegriff: TEdit;\r\n btnSuchePos: TButton;\r\n lblKunde: TLabel;\r\n Container3: THTMLContainer;\r\n container4: THTMLContainer;\r\n Container5: THTMLContainer;\r\n lbKunde: TLabel;\r\n ResultLabel: TLabel;\r\n procedure WebFormShow(Sender: TObject);\r\n procedure btnAnzeigenClick(Sender: TObject);\r\n procedure xdsBelegeAfterOpen(DataSet: TDataSet);\r\n procedure btnSuchePosClick(Sender: TObject);\r\n procedure xdsPositionenAfterOpen(DataSet: TDataSet);\r\n procedure TCClickCell(Sender: TObject; ACol, ARow: Integer);\r\n procedure btnzurueckClick(Sender: TObject);\r\n private\r\n { Private-Deklarationen }\r\n public\r\n { Public-Deklarationen }\r\n BPKundennummer:string;\r\n BPName:string;\r\n BP:boolean;\r\n CurrentAnzeige:integer;\r\n protected procedure LoadDFMValues; override; end;\r\n\r\nvar\r\n BelegePositionen: TBelegePositionen;\r\n\r\nimplementation\r\n uses unit1, unit2, unit_EinzelBeleg;\r\n{$R *.dfm}\r\n\r\nprocedure TBelegePositionen.btnAnzeigenClick(Sender: TObject);\r\nbegin\r\n currentanzeige:=0;\r\n decodedate(date,ajahr,amonat,atag);\r\n ajahr:=ajahr-2;\r\n xdspositionen.Close;\r\n xdsbelege.Close;\r\n if comboBelegart.Text='Angebote' then xdsbelege.EntitySetName:='Angebote';\r\n if comboBelegart.Text='Aufträge' then xdsbelege.EntitySetName:='Auftrag';\r\n if comboBelegart.Text='Lieferscheine' then xdsbelege.EntitySetName:='Lieferschein';\r\n if comboBelegart.Text='Rechnungen' then xdsbelege.EntitySetName:='Rechnung';\r\n if comboBelegart.Text='Anfragen' then xdsbelege.EntitySetName:='Anfrage';\r\n if comboBelegart.Text='Bestellungen' then xdsbelege.EntitySetName:='Bestellung';\r\n if comboBelegart.Text='Wareneingänge' then xdsbelege.EntitySetName:='Wareneingang';\r\n if comboBelegart.Text='EingangsRechnungen' then xdsbelege.EntitySetName:='EingangsRE';\r\n if bp then\r\n begin\r\n xdsbelege.QueryTop:=500;\r\n xdsbelege.QueryString:='$filter=Kundennummer eq '+QuotedStr(BPKundennummer)+'&$orderby=Nummerkomplett DESC';\r\n end\r\n else\r\n begin\r\n xdsbelege.QueryTop:=500;\r\n xdsbelege.QueryString:='$expand=Kundennummer&$filter=Jahr gt '+inttostr(ajahr)+'&$orderby=Nummerkomplett DESC';\r\n end;\r\n xdsbelege.Load;\r\nend;\r\n\r\nprocedure TBelegePositionen.btnSuchePosClick(Sender: TObject);\r\nvar\r\n mysuchbegriff:string;\r\nbegin\r\n currentanzeige:=1;\r\n mysuchbegriff:=trim(edtsuchbegriff.Text);\r\n xdspositionen.Close;\r\n xdsbelege.Close;\r\n if comboBelegart.Text='Angebote' then xdsPositionen.EntitySetName:='PositionenAngebote';\r\n if comboBelegart.Text='Aufträge' then xdsPositionen.EntitySetName:='PositionenAuftrag';\r\n if comboBelegart.Text='Lieferscheine' then xdsPositionen.EntitySetName:='PositionenLieferschein';\r\n if comboBelegart.Text='Rechnungen' then xdsPositionen.EntitySetName:='PositionenRechnung';\r\n if comboBelegart.Text='Anfragen' then xdsPositionen.EntitySetName:='PositionenAnfrage';\r\n if comboBelegart.Text='Bestellungen' then xdsPositionen.EntitySetName:='PositionenBestellung';\r\n if comboBelegart.Text='Wareneingänge' then xdsPositionen.EntitySetName:='PositionenWareneingang';\r\n if comboBelegart.Text='EingangsRechnungen' then xdsPositionen.EntitySetName:='PositionenEingangsRE';\r\n\r\n if bp then\r\n begin\r\n xdsPositionen.QueryTop:=500;\r\n if mysuchbegriff='' then\r\n begin\r\n xdsPositionen.QueryString:='$expand=Nummerkomplett,Artikelnummer&$filter=Nummerkomplett/Kundennummer eq '+QuotedStr(BPKundennummer)+'&$orderby=Nummerkomplett/Nummerkomplett DESC';\r\n end\r\n else\r\n begin\r\n xdsPositionen.QueryString:='$expand=Nummerkomplett,Artikelnummer&$filter=((Nummerkomplett/Kundennummer eq '+QuotedStr(BPKundennummer)+')';\r\n xdsPositionen.QueryString:=xdsPositionen.QueryString+' AND ((contains(Artikelbeschreibung,'+quotedstr(mysuchbegriff)+'))';\r\n xdsPositionen.QueryString:=xdsPositionen.QueryString+' OR (contains(Artikelueberschrift,'+quotedstr(mysuchbegriff)+'))))';\r\n xdsPositionen.QueryString:=xdsPositionen.QueryString+'&$orderby=Nummerkomplett/Nummerkomplett DESC';\r\n end;\r\n end\r\n else\r\n begin\r\n xdsPositionen.QueryTop:=500;\r\n if mysuchbegriff='' then\r\n begin\r\n xdsPositionen.QueryString:='$expand=Nummerkomplett,Artikelnummer&$orderby=Nummerkomplett/Nummerkomplett DESC';\r\n end\r\n else\r\n begin\r\n xdsPositionen.QueryString:='$expand=Nummerkomplett,Artikelnummer&$filter=(';\r\n xdsPositionen.QueryString:=xdsPositionen.QueryString+' ((contains(Artikelbeschreibung,'+quotedstr(mysuchbegriff)+'))';\r\n xdsPositionen.QueryString:=xdsPositionen.QueryString+' OR (contains(Artikelueberschrift,'+quotedstr(mysuchbegriff)+'))))';\r\n xdsPositionen.QueryString:=xdsPositionen.QueryString+'&$orderby=Nummerkomplett/Nummerkomplett DESC';\r\n end;\r\n end;\r\n xdspositionen.Load;\r\nend;\r\n\r\nprocedure TBelegePositionen.btnzurueckClick(Sender: TObject);\r\nbegin\r\n xdspositionen.Close;\r\n xdsbelege.Close;\r\n self.Close;\r\nend;\r\n\r\nprocedure TBelegePositionen.TCClickCell(Sender: TObject; ACol, ARow: Integer);\r\nvar\r\n EinzelBeleg:TEinzelBeleg;\r\n procedure AfterCreate(AForm:TObject);\r\n begin\r\n (AForm as TEinzelBeleg).Belegnummer:=tc.Cells[0,arow];\r\n (AForm as TEinzelBeleg).Belegart:=comboBelegart.text;\r\n tc.Visible:=false;\r\n end;\r\n\r\n procedure AfterShowmodal(Avalue:TModalResult);\r\n begin\r\n //nothing to do\r\n if currentanzeige=0 then btnAnzeigenClick(nil);\r\n if currentanzeige=1 then btnSuchePosClick(nil);\r\n\r\n\r\n end;\r\n\r\n begin\r\n EinzelBeleg:=TEinzelBeleg.CreateNew(@AfterCreate);\r\n EinzelBeleg.ShowModal(@AfterShowmodal);\r\nend;\r\n\r\nprocedure TBelegePositionen.WebFormShow(Sender: TObject);\r\nvar\r\n myelement:TJSHTMLElement;\r\nbegin\r\n Container1.html.text:='

';\r\n myelement:=container1.ElementHandle;\r\n btnzurueck.ParentElement:=myelement;\r\n resultlabel.ParentElement:=myelement;\r\n Container2.HTML.Text:='';\r\n container2.ParentElement:=myelement;\r\n\r\n\r\n myelement:=container2.ElementHandle;\r\n\r\n container3.parentelement:=myelement;\r\n container4.parentelement:=myelement;\r\n container5.parentelement:=myelement;\r\n tc.ParentElement:=myelement;\r\n\r\n myelement:=container3.ElementHandle;\r\n combobelegart.ParentElement:=myelement;\r\n btnanzeigen.ParentElement:=myelement;\r\n\r\n myelement:=container4.ElementHandle;\r\n edtsuchbegriff.ParentElement:=myelement;\r\n btnSuchePos.ParentElement:=myelement;\r\n\r\n myelement:=container5.ElementHandle;\r\n lbKunde.ParentElement:=myelement;\r\n lblkunde.ParentElement:=myelement;\r\n if bpKundennummer<>'' then\r\n begin\r\n bp:=true;\r\n lblkunde.Caption:=BPKundennummer+' '+BPName;\r\n end\r\n else\r\n begin\r\n bp:=false;\r\n lblkunde.Caption:='ALLE';\r\n end;\r\n btnAnzeigenClick(sender);\r\nend;\r\n\r\nprocedure TBelegePositionen.xdsBelegeAfterOpen(DataSet: TDataSet);\r\nvar\r\n i:integer;\r\n o:integer;\r\nbegin\r\n if bp then o:=0 else o:=2;\r\n tc.Visible:=true;\r\n if comboBelegart.Text='Angebote' then\r\n begin\r\n xdsBelege.First;\r\n tc.RowCount:=xdsbelege.RecordCount+1;\r\n tc.ColCount:=5+o;\r\n tc.Cells[0,0]:='Belegnummer';\r\n tc.Cells[1,0]:='Datum';\r\n if not bp then\r\n begin\r\n tc.Cells[2,0]:='K-Nr';\r\n tc.Cells[3,0]:='Nachname';\r\n end;\r\n tc.Cells[2+o,0]:='Auftragsbezeichnung';\r\n tc.Cells[3+o,0]:='Nettosumme';\r\n tc.Cells[4+o,0]:='Auftrag erhalten';\r\n resultlabel.Caption:=inttostr(xdsbelege.RecordCount)+' Angebote gefunden';\r\n while not xdsbelege.eof do\r\n begin\r\n i:=xdsbelege.RecNo;\r\n TC.Cells[0,i]:=xdsbelege.fieldbyname('Nummerkomplett').asstring;\r\n TC.Cells[1,i]:=formatdatetime('DD.MM.YYYY',xdsbelege.fieldbyname('Datum').asdatetime);\r\n if not bp then\r\n begin\r\n tc.Cells[2,i]:=xdsbelege.fieldbyname('Kundennummer.Kundennummer').asstring;\r\n tc.Cells[3,i]:=xdsbelege.fieldbyname('Nachname').asstring;\r\n end;\r\n TC.Cells[2+o,i]:=xdsbelege.fieldbyname('Auftragsbezeichnung').asstring;\r\n if form1.rcw.Verkaufspreise=true then\r\n begin\r\n TC.Cells[3+o,i]:='

'+formatfloat('#,##0.00',xdsbelege.fieldbyname('Nettosumme').asfloat);\r\n end\r\n else\r\n begin\r\n TC.Cells[3+o,i]:='

XXX';\r\n end;\r\n if xdsbelege.FieldByName('Auftragerhaltenam').AsFloat>0 then\r\n begin\r\n TC.Cells[4+o,i]:=formatdatetime('DD.MM.YYYY',xdsbelege.fieldbyname('Auftragerhaltenam').asdatetime);\r\n end\r\n else\r\n begin\r\n if xdsbelege.FieldByName('Auftragnichterhalten').asboolean then\r\n begin\r\n TC.Cells[4+o,i]:='nicht erhalten';\r\n end\r\n else\r\n begin\r\n TC.Cells[4+o,i]:='noch nicht entschieden';\r\n end;\r\n end;\r\n xdsbelege.Next;\r\n end;\r\n end;\r\n\r\n if comboBelegart.Text='Aufträge' then\r\n begin\r\n xdsBelege.First;\r\n tc.RowCount:=xdsbelege.RecordCount+1;\r\n tc.ColCount:=6+o;\r\n tc.Cells[0,0]:='Belegnummer';\r\n tc.Cells[1,0]:='Datum';\r\n if not bp then\r\n begin\r\n tc.Cells[2,0]:='K-Nr';\r\n tc.Cells[3,0]:='Nachname';\r\n end;\r\n tc.Cells[2+o,0]:='Auftragsbezeichnung';\r\n tc.Cells[3+o,0]:='Nettosumme';\r\n tc.Cells[4+o,0]:='Status';\r\n tc.Cells[5+o,0]:='Lieferschein';\r\n resultlabel.Caption:=inttostr(xdsbelege.RecordCount)+' Aufträge gefunden';\r\n while not xdsbelege.eof do\r\n begin\r\n i:=xdsbelege.RecNo;\r\n TC.Cells[0,i]:=xdsbelege.fieldbyname('Nummerkomplett').asstring;\r\n TC.Cells[1,i]:=formatdatetime('DD.MM.YYYY',xdsbelege.fieldbyname('Datum').asdatetime);\r\n if not bp then\r\n begin\r\n tc.Cells[2,i]:=xdsbelege.fieldbyname('Kundennummer.Kundennummer').asstring;\r\n tc.Cells[3,i]:=xdsbelege.fieldbyname('Nachname').asstring;\r\n end;\r\n TC.Cells[2+o,i]:=xdsbelege.fieldbyname('Auftragsbezeichnung').asstring;\r\n if form1.rcw.Verkaufspreise=true then\r\n begin\r\n TC.Cells[3+o,i]:='

'+formatfloat('#,##0.00',xdsbelege.fieldbyname('Nettosumme').asfloat);\r\n end\r\n else\r\n begin\r\n TC.Cells[3+o,i]:='

XXX';\r\n end;\r\n\r\n TC.Cells[4+o,i]:=xdsbelege.fieldbyname('AuftragStatus').asstring;\r\n TC.Cells[5+o,i]:=xdsbelege.fieldbyname('ReferenzLieferschein').asstring;\r\n xdsbelege.Next;\r\n end;\r\n end;\r\n\r\n if comboBelegart.Text='Lieferscheine' then\r\n begin\r\n xdsBelege.First;\r\n tc.RowCount:=xdsbelege.RecordCount+1;\r\n tc.ColCount:=6+o;\r\n tc.Cells[0,0]:='Belegnummer';\r\n tc.Cells[1,0]:='Datum';\r\n if not bp then\r\n begin\r\n tc.Cells[2,0]:='K-Nr';\r\n tc.Cells[3,0]:='Nachname';\r\n end;\r\n tc.Cells[2+o,0]:='Auftragsbezeichnung';\r\n tc.Cells[3+o,0]:='Nettosumme';\r\n tc.Cells[4+o,0]:='Fakturiert';\r\n tc.Cells[5+o,0]:='Rechnung';\r\n resultlabel.Caption:=inttostr(xdsbelege.RecordCount)+' Lieferscheine gefunden';\r\n while not xdsbelege.eof do\r\n begin\r\n i:=xdsbelege.RecNo;\r\n TC.Cells[0,i]:=xdsbelege.fieldbyname('Nummerkomplett').asstring;\r\n TC.Cells[1,i]:=formatdatetime('DD.MM.YYYY',xdsbelege.fieldbyname('Datum').asdatetime);\r\n if not bp then\r\n begin\r\n tc.Cells[2,i]:=xdsbelege.fieldbyname('Kundennummer.Kundennummer').asstring;\r\n tc.Cells[3,i]:=xdsbelege.fieldbyname('Nachname').asstring;\r\n end;\r\n TC.Cells[2+o,i]:=xdsbelege.fieldbyname('Auftragsbezeichnung').asstring;\r\n if form1.rcw.Verkaufspreise=true then\r\n begin\r\n TC.Cells[3+o,i]:='

'+formatfloat('#,##0.00',xdsbelege.fieldbyname('Nettosumme').asfloat);\r\n end\r\n else\r\n begin\r\n TC.Cells[3+o,i]:='

XXX';\r\n end;\r\n TC.Cells[4+o,i]:=xdsbelege.fieldbyname('VollstaendigFakturiert').asstring;\r\n TC.Cells[5+o,i]:=xdsbelege.fieldbyname('ReferenzRechnung').asstring;\r\n xdsbelege.Next;\r\n end;\r\n end;\r\n\r\n if comboBelegart.Text='Rechnungen' then\r\n begin\r\n xdsBelege.First;\r\n tc.RowCount:=xdsbelege.RecordCount+1;\r\n tc.ColCount:=6+o;\r\n tc.Cells[0,0]:='Belegnummer';\r\n tc.Cells[1,0]:='Datum';\r\n if not bp then\r\n begin\r\n tc.Cells[2,0]:='K-Nr';\r\n tc.Cells[3,0]:='Nachname';\r\n end;\r\n tc.Cells[2+o,0]:='Auftragsbezeichnung';\r\n tc.Cells[3+o,0]:='Nettosumme';\r\n tc.Cells[4+o,0]:='Restbetrag(brutto)';\r\n tc.Cells[5+o,0]:='Belegvariante';\r\n resultlabel.Caption:=inttostr(xdsbelege.RecordCount)+' Rechnungen gefunden';\r\n while not xdsbelege.eof do\r\n begin\r\n i:=xdsbelege.RecNo;\r\n TC.Cells[0,i]:=xdsbelege.fieldbyname('Nummerkomplett').asstring;\r\n TC.Cells[1,i]:=formatdatetime('DD.MM.YYYY',xdsbelege.fieldbyname('Datum').asdatetime);\r\n if not bp then\r\n begin\r\n tc.Cells[2,i]:=xdsbelege.fieldbyname('Kundennummer.Kundennummer').asstring;\r\n tc.Cells[3,i]:=xdsbelege.fieldbyname('Nachname').asstring;\r\n end;\r\n TC.Cells[2+o,i]:=xdsbelege.fieldbyname('Auftragsbezeichnung').asstring;\r\n\r\n\r\n if form1.rcw.Verkaufspreise=true then\r\n begin\r\n TC.Cells[3+o,i]:='

'+formatfloat('#,##0.00',xdsbelege.fieldbyname('Nettosumme').asfloat);\r\n TC.Cells[4+o,i]:='

'+formatfloat('#,##0.00',xdsbelege.fieldbyname('Restbetrag').asfloat);\r\n end\r\n else\r\n begin\r\n TC.Cells[3+o,i]:='

XXX';\r\n TC.Cells[4+o,i]:='

XXX';\r\n end;\r\n\r\n TC.Cells[5+o,i]:=xdsbelege.fieldbyname('Belegvariante').asstring;\r\n xdsbelege.Next;\r\n end;\r\n end;\r\n\r\n if comboBelegart.Text='Anfragen' then\r\n begin\r\n xdsBelege.First;\r\n tc.RowCount:=xdsbelege.RecordCount+1;\r\n tc.ColCount:=5+o;\r\n tc.Cells[0,0]:='Belegnummer';\r\n tc.Cells[1,0]:='Datum';\r\n if not bp then\r\n begin\r\n tc.Cells[2,0]:='K-Nr';\r\n tc.Cells[3,0]:='Nachname';\r\n end;\r\n tc.Cells[2+o,0]:='Auftragsbezeichnung';\r\n tc.Cells[3+o,0]:='Nettosumme';\r\n tc.Cells[4+o,0]:='Angebot erhalten';\r\n resultlabel.Caption:=inttostr(xdsbelege.RecordCount)+' Anfragen gefunden';\r\n while not xdsbelege.eof do\r\n begin\r\n i:=xdsbelege.RecNo;\r\n TC.Cells[0,i]:=xdsbelege.fieldbyname('Nummerkomplett').asstring;\r\n TC.Cells[1,i]:=formatdatetime('DD.MM.YYYY',xdsbelege.fieldbyname('Datum').asdatetime);\r\n if not bp then\r\n begin\r\n tc.Cells[2,i]:=xdsbelege.fieldbyname('Kundennummer.Kundennummer').asstring;\r\n tc.Cells[3,i]:=xdsbelege.fieldbyname('Nachname').asstring;\r\n end;\r\n TC.Cells[2+o,i]:=xdsbelege.fieldbyname('Auftragsbezeichnung').asstring;\r\n if form1.rcw.Einkaufspreise=true then\r\n begin\r\n TC.Cells[3+o,i]:='

'+formatfloat('#,##0.00',xdsbelege.fieldbyname('Nettosumme').asfloat);\r\n end\r\n else\r\n begin\r\n TC.Cells[3+o,i]:='

XXX';\r\n end;\r\n if xdsbelege.fieldbyname('Angeboterhaltenam').asfloat>0 then TC.Cells[4+o,i]:=xdsbelege.fieldbyname('Angeboterhaltenam').asstring;\r\n xdsbelege.Next;\r\n end;\r\n end;\r\n\r\n if comboBelegart.Text='Bestellungen' then\r\n begin\r\n xdsBelege.First;\r\n tc.RowCount:=xdsbelege.RecordCount+1;\r\n tc.ColCount:=5+o;\r\n tc.Cells[0,0]:='Belegnummer';\r\n tc.Cells[1,0]:='Datum';\r\n if not bp then\r\n begin\r\n tc.Cells[2,0]:='K-Nr';\r\n tc.Cells[3,0]:='Nachname';\r\n end;\r\n tc.Cells[2+o,0]:='Auftragsbezeichnung';\r\n tc.Cells[3+o,0]:='Nettosumme';\r\n tc.Cells[4+o,0]:='geliefert';\r\n resultlabel.Caption:=inttostr(xdsbelege.RecordCount)+' Bestellungen gefunden';\r\n while not xdsbelege.eof do\r\n begin\r\n i:=xdsbelege.RecNo;\r\n TC.Cells[0,i]:=xdsbelege.fieldbyname('Nummerkomplett').asstring;\r\n TC.Cells[1,i]:=formatdatetime('DD.MM.YYYY',xdsbelege.fieldbyname('Datum').asdatetime);\r\n if not bp then\r\n begin\r\n tc.Cells[2,i]:=xdsbelege.fieldbyname('Kundennummer.Kundennummer').asstring;\r\n tc.Cells[3,i]:=xdsbelege.fieldbyname('Nachname').asstring;\r\n end;\r\n TC.Cells[2+o,i]:=xdsbelege.fieldbyname('Auftragsbezeichnung').asstring;\r\n if form1.rcw.Einkaufspreise=true then\r\n begin\r\n TC.Cells[3+o,i]:='

'+formatfloat('#,##0.00',xdsbelege.fieldbyname('Nettosumme').asfloat);\r\n end\r\n else\r\n begin\r\n TC.Cells[3+o,i]:='

XXX';\r\n end;\r\n\r\n if xdsbelege.fieldbyname('vollstaendiggeliefert').asboolean=true then TC.Cells[4+o,i]:='JA' else TC.Cells[4+o,i]:='NEIN';\r\n xdsbelege.Next;\r\n end;\r\n end;\r\n\r\n if comboBelegart.Text='Wareneingänge' then\r\n begin\r\n xdsBelege.First;\r\n tc.RowCount:=xdsbelege.RecordCount+1;\r\n tc.ColCount:=5+o;\r\n tc.Cells[0,0]:='Belegnummer';\r\n tc.Cells[1,0]:='Datum';\r\n if not bp then\r\n begin\r\n tc.Cells[2,0]:='K-Nr';\r\n tc.Cells[3,0]:='Nachname';\r\n end;\r\n tc.Cells[2+o,0]:='Auftragsbezeichnung';\r\n tc.Cells[3+o,0]:='Nettosumme';\r\n tc.Cells[4+o,0]:='abgerechnet';\r\n resultlabel.Caption:=inttostr(xdsbelege.RecordCount)+' Wareneingänge gefunden';\r\n while not xdsbelege.eof do\r\n begin\r\n i:=xdsbelege.RecNo;\r\n TC.Cells[0,i]:=xdsbelege.fieldbyname('Nummerkomplett').asstring;\r\n TC.Cells[1,i]:=formatdatetime('DD.MM.YYYY',xdsbelege.fieldbyname('Datum').asdatetime);\r\n if not bp then\r\n begin\r\n tc.Cells[2,i]:=xdsbelege.fieldbyname('Kundennummer.Kundennummer').asstring;\r\n tc.Cells[3,i]:=xdsbelege.fieldbyname('Nachname').asstring;\r\n end;\r\n TC.Cells[2+o,i]:=xdsbelege.fieldbyname('Auftragsbezeichnung').asstring;\r\n if form1.rcw.Einkaufspreise=true then\r\n begin\r\n TC.Cells[3+o,i]:='

'+formatfloat('#,##0.00',xdsbelege.fieldbyname('Nettosumme').asfloat);\r\n end\r\n else\r\n begin\r\n TC.Cells[3+o,i]:='

XXX';\r\n end;\r\n TC.Cells[4+o,i]:=xdsbelege.fieldbyname('vollstaendigabgerechnet').asstring;\r\n xdsbelege.Next;\r\n end;\r\n end;\r\n\r\n if comboBelegart.Text='EingangsRechnungen' then\r\n begin\r\n xdsBelege.First;\r\n tc.RowCount:=xdsbelege.RecordCount+1;\r\n tc.ColCount:=6+o;\r\n tc.Cells[0,0]:='Belegnummer';\r\n tc.Cells[1,0]:='Datum';\r\n if not bp then\r\n begin\r\n tc.Cells[2,0]:='K-Nr';\r\n tc.Cells[3,0]:='Nachname';\r\n end;\r\n tc.Cells[2+o,0]:='Auftragsbezeichnung';\r\n tc.Cells[3+o,0]:='Nettosumme';\r\n tc.Cells[4+o,0]:='Restbetrag(brutto)';\r\n tc.Cells[5+o,0]:='Belegvariante';\r\n resultlabel.Caption:=inttostr(xdsbelege.RecordCount)+' Eingangsrechnungen gefunden';\r\n while not xdsbelege.eof do\r\n begin\r\n i:=xdsbelege.RecNo;\r\n TC.Cells[0,i]:=xdsbelege.fieldbyname('Nummerkomplett').asstring;\r\n TC.Cells[1,i]:=formatdatetime('DD.MM.YYYY',xdsbelege.fieldbyname('Datum').asdatetime);\r\n if not bp then\r\n begin\r\n tc.Cells[2,i]:=xdsbelege.fieldbyname('Kundennummer.Kundennummer').asstring;\r\n tc.Cells[3,i]:=xdsbelege.fieldbyname('Nachname').asstring;\r\n end;\r\n TC.Cells[2+o,i]:=xdsbelege.fieldbyname('Auftragsbezeichnung').asstring;\r\n\r\n\r\n if form1.rcw.Einkaufspreise=true then\r\n begin\r\n TC.Cells[3+o,i]:='

'+formatfloat('#,##0.00',xdsbelege.fieldbyname('Nettosumme').asfloat);\r\n TC.Cells[4+o,i]:='

'+formatfloat('#,##0.00',xdsbelege.fieldbyname('Restbetrag').asfloat);\r\n end\r\n else\r\n begin\r\n TC.Cells[3+o,i]:='

XXX';\r\n TC.Cells[4+o,i]:='

XXX';\r\n end;\r\n TC.Cells[5+o,i]:=xdsbelege.fieldbyname('Belegvariante').asstring;\r\n xdsbelege.Next;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TBelegePositionen.xdsPositionenAfterOpen(DataSet: TDataSet);\r\nvar\r\n i:integer;\r\n einkauf:boolean;\r\n o:integer;\r\nbegin\r\n tc.Visible:=true;\r\n if bp then o:=0 else o:=1;\r\n xdsPositionen.First;\r\n tc.RowCount:=xdsPositionen.RecordCount+1;\r\n tc.ColCount:=7+o;\r\n einkauf:=false;\r\n if comboBelegart.Text='Angebote' then tc.Cells[0,0]:='Angebot';\r\n if comboBelegart.Text='Aufträge' then tc.Cells[0,0]:='Auftrag';\r\n if comboBelegart.Text='Lieferscheine' then tc.Cells[0,0]:='Lieferschein';\r\n if comboBelegart.Text='Rechnungen' then tc.Cells[0,0]:='Rechnung';\r\n if comboBelegart.Text='Anfragen' then tc.Cells[0,0]:='Anfrage';\r\n if comboBelegart.Text='Bestellungen' then tc.Cells[0,0]:='Bestellung';\r\n if comboBelegart.Text='Wareneingänge' then tc.Cells[0,0]:='Wareneingang';\r\n if comboBelegart.Text='EingangsRechnungen' then tc.Cells[0,0]:='EingangsRechnung';\r\n if comboBelegart.Text='Anfragen' then einkauf:=true;\r\n if comboBelegart.Text='Bestellungen' then einkauf:=true;\r\n if comboBelegart.Text='Wareneingänge' then einkauf:=true;\r\n if comboBelegart.Text='EingangsRechnungen' then einkauf:=true;\r\n tc.Cells[1,0]:='Datum';\r\n if not bp then\r\n begin\r\n tc.Cells[2,0]:='Nachname';\r\n end;\r\n tc.Cells[2+o,0]:='Artikelnr.';\r\n tc.Cells[3+o,0]:='Artikelüberschrift';\r\n tc.Cells[4+o,0]:='Beschreibung';\r\n tc.Cells[5+o,0]:='Menge';\r\n tc.Cells[6+o,0]:='Einzel-VKP';\r\n if einkauf then tc.Cells[6+o,0]:='Einzel-EKP';\r\n resultlabel.Caption:=inttostr(xdspositionen.RecordCount)+' Positionen gefunden';\r\n while not xdsPositionen.eof do\r\n begin\r\n i:=xdsPositionen.RecNo;\r\n TC.Cells[0,i]:=xdsPositionen.fieldbyname('Nummerkomplett.Nummerkomplett').asstring;\r\n TC.Cells[1,i]:=formatdatetime('DD.MM.YYYY',xdsPositionen.fieldbyname('Nummerkomplett.Datum').asdatetime);\r\n if not bp then\r\n begin\r\n tc.Cells[2,i]:=xdspositionen.fieldbyname('Nummerkomplett.Nachname').asstring;\r\n end;\r\n TC.Cells[2+o,i]:=xdsPositionen.fieldbyname('Artikelnummer.Artikelnummer').asstring;\r\n TC.Cells[3+o,i]:=xdsPositionen.fieldbyname('Artikelueberschrift').asstring;\r\n TC.Cells[4+o,i]:=xdsPositionen.fieldbyname('Artikelbeschreibung').asstring;\r\n TC.Cells[5+o,i]:='

'+xdsPositionen.fieldbyname('Menge').asstring;\r\n if not einkauf then\r\n begin\r\n if form1.rcw.Verkaufspreise=true then\r\n begin\r\n TC.Cells[6+o,i]:='

'+formatfloat('#,##0.00',xdsPositionen.fieldbyname('Verkaufspreis').asfloat);\r\n end\r\n else\r\n begin\r\n TC.Cells[6+o,i]:='XXX';\r\n end;\r\n end;\r\n if einkauf then\r\n begin\r\n if form1.rcw.Einkaufspreise=true then\r\n begin\r\n TC.Cells[6+o,i]:='

'+formatfloat('#,##0.00',xdsPositionen.fieldbyname('Einkaufspreis').asfloat);\r\n end\r\n else\r\n begin\r\n TC.Cells[6+o,i]:='XXX';\r\n end;\r\n end;\r\n xdsPositionen.Next;\r\n end;\r\n\r\nend;\r\n\r\nprocedure TBelegePositionen.LoadDFMValues;\r\nbegin\r\n inherited LoadDFMValues;\r\n\r\n lblKunde := TLabel.Create(Self);\r\n lbKunde := TLabel.Create(Self);\r\n ResultLabel := TLabel.Create(Self);\r\n TC := TTableControl.Create(Self);\r\n Container1 := THTMLContainer.Create(Self);\r\n Container2 := THTMLContainer.Create(Self);\r\n btnzurueck := TButton.Create(Self);\r\n comboBelegart := TComboBox.Create(Self);\r\n btnAnzeigen := TButton.Create(Self);\r\n edtsuchbegriff := TEdit.Create(Self);\r\n btnSuchePos := TButton.Create(Self);\r\n Container3 := THTMLContainer.Create(Self);\r\n container4 := THTMLContainer.Create(Self);\r\n Container5 := THTMLContainer.Create(Self);\r\n xdsBelege := TXDataWebDataSet.Create(Self);\r\n xdsPositionen := TXDataWebDataSet.Create(Self);\r\n sourceBelege := TDataSource.Create(Self);\r\n\r\n lblKunde.BeforeLoadDFMValues;\r\n lbKunde.BeforeLoadDFMValues;\r\n ResultLabel.BeforeLoadDFMValues;\r\n TC.BeforeLoadDFMValues;\r\n Container1.BeforeLoadDFMValues;\r\n Container2.BeforeLoadDFMValues;\r\n btnzurueck.BeforeLoadDFMValues;\r\n comboBelegart.BeforeLoadDFMValues;\r\n btnAnzeigen.BeforeLoadDFMValues;\r\n edtsuchbegriff.BeforeLoadDFMValues;\r\n btnSuchePos.BeforeLoadDFMValues;\r\n Container3.BeforeLoadDFMValues;\r\n container4.BeforeLoadDFMValues;\r\n Container5.BeforeLoadDFMValues;\r\n xdsBelege.BeforeLoadDFMValues;\r\n xdsPositionen.BeforeLoadDFMValues;\r\n sourceBelege.BeforeLoadDFMValues;\r\n try\r\n Name := 'BelegePositionen';\r\n Width := 255;\r\n Height := 442;\r\n Caption := 'Belege und Positionen';\r\n CSSLibrary := cssBootstrap;\r\n ElementFont := efCSS;\r\n ElementPosition := epIgnore;\r\n SetEvent(Self, 'OnShow', 'WebFormShow');\r\n lblKunde.SetParentComponent(Self);\r\n lblKunde.Name := 'lblKunde';\r\n lblKunde.Left := 181;\r\n lblKunde.Top := 187;\r\n lblKunde.Width := 47;\r\n lblKunde.Height := 15;\r\n lblKunde.Caption := 'lblKunde';\r\n lblKunde.ChildOrder := 9;\r\n lblKunde.ElementClassName := 'h5 text-info m-2';\r\n lblKunde.ElementFont := efCSS;\r\n lblKunde.ElementPosition := epIgnore;\r\n lblKunde.HeightStyle := ssAuto;\r\n lblKunde.HeightPercent := 100.000000000000000000;\r\n lblKunde.WidthStyle := ssAuto;\r\n lblKunde.WidthPercent := 100.000000000000000000;\r\n lbKunde.SetParentComponent(Self);\r\n lbKunde.Name := 'lbKunde';\r\n lbKunde.Left := 189;\r\n lbKunde.Top := 195;\r\n lbKunde.Width := 61;\r\n lbKunde.Height := 15;\r\n lbKunde.Caption := 'Kontakt(e): ';\r\n lbKunde.ChildOrder := 9;\r\n lbKunde.ElementClassName := 'h5 text-info m-2';\r\n lbKunde.ElementFont := efCSS;\r\n lbKunde.ElementPosition := epIgnore;\r\n lbKunde.HeightStyle := ssAuto;\r\n lbKunde.HeightPercent := 100.000000000000000000;\r\n lbKunde.WidthStyle := ssAuto;\r\n lbKunde.WidthPercent := 100.000000000000000000;\r\n ResultLabel.SetParentComponent(Self);\r\n ResultLabel.Name := 'ResultLabel';\r\n ResultLabel.Left := 184;\r\n ResultLabel.Top := 72;\r\n ResultLabel.Width := 60;\r\n ResultLabel.Height := 15;\r\n ResultLabel.Caption := 'ResultLabel';\r\n ResultLabel.ElementClassName := 'h6 m-1';\r\n ResultLabel.ElementFont := efCSS;\r\n ResultLabel.ElementPosition := epIgnore;\r\n ResultLabel.HeightStyle := ssAuto;\r\n ResultLabel.HeightPercent := 100.000000000000000000;\r\n ResultLabel.WidthStyle := ssPercent;\r\n ResultLabel.WidthPercent := 100.000000000000000000;\r\n TC.SetParentComponent(Self);\r\n TC.Name := 'TC';\r\n TC.Left := 0;\r\n TC.Top := 256;\r\n TC.Width := 247;\r\n TC.Height := 186;\r\n TC.ElementClassName := 'table table-sm table-hover table-bordered table-striped m-1';\r\n TC.HeightStyle := ssAuto;\r\n TC.WidthStyle := ssPercent;\r\n TC.BorderColor := clSilver;\r\n TC.ChildOrder := 3;\r\n TC.ColHeader := False;\r\n TC.ElementFont := efCSS;\r\n TC.ElementHeaderClassName := 'table-info';\r\n TC.ElementPosition := epIgnore;\r\n TC.ElementTableClassName := 'table table-sm table-hover table-bordered table-striped';\r\n TC.WordWrap := True;\r\n SetEvent(TC, Self, 'OnClickCell', 'TCClickCell');\r\n TC.ColCount := 2;\r\n Container1.SetParentComponent(Self);\r\n Container1.Name := 'Container1';\r\n Container1.Left := 0;\r\n Container1.Top := 0;\r\n Container1.Width := 169;\r\n Container1.Height := 41;\r\n Container1.HeightStyle := ssAuto;\r\n Container1.WidthStyle := ssPercent;\r\n Container1.ElementFont := efCSS;\r\n Container1.ElementPosition := epIgnore;\r\n Container2.SetParentComponent(Self);\r\n Container2.Name := 'Container2';\r\n Container2.Left := 0;\r\n Container2.Top := 47;\r\n Container2.Width := 169;\r\n Container2.Height := 41;\r\n Container2.ElementClassName := 'd-flex flex-wrap m-1';\r\n Container2.HeightStyle := ssAuto;\r\n Container2.WidthStyle := ssAuto;\r\n Container2.ChildOrder := 1;\r\n Container2.ElementFont := efCSS;\r\n Container2.ElementPosition := epIgnore;\r\n btnzurueck.SetParentComponent(Self);\r\n btnzurueck.Name := 'btnzurueck';\r\n btnzurueck.Left := 0;\r\n btnzurueck.Top := 156;\r\n btnzurueck.Width := 96;\r\n btnzurueck.Height := 25;\r\n btnzurueck.Caption := '<< zur'#252'ck';\r\n btnzurueck.ChildOrder := 4;\r\n btnzurueck.ElementClassName := 'btn btn-info btn-sm m-1 text-left';\r\n btnzurueck.ElementFont := efCSS;\r\n btnzurueck.ElementPosition := epIgnore;\r\n btnzurueck.HeightStyle := ssAuto;\r\n btnzurueck.HeightPercent := 100.000000000000000000;\r\n btnzurueck.WidthStyle := ssAuto;\r\n btnzurueck.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnzurueck, Self, 'OnClick', 'btnzurueckClick');\r\n comboBelegart.SetParentComponent(Self);\r\n comboBelegart.Name := 'comboBelegart';\r\n comboBelegart.Left := 0;\r\n comboBelegart.Top := 187;\r\n comboBelegart.Width := 175;\r\n comboBelegart.Height := 23;\r\n comboBelegart.ChildOrder := 5;\r\n comboBelegart.ElementClassName := 'form-control';\r\n comboBelegart.ElementFont := efCSS;\r\n comboBelegart.ElementPosition := epIgnore;\r\n comboBelegart.HeightStyle := ssAuto;\r\n comboBelegart.HeightPercent := 100.000000000000000000;\r\n comboBelegart.Text := 'Angebote';\r\n comboBelegart.WidthPercent := 100.000000000000000000;\r\n comboBelegart.ItemIndex := 0;\r\n comboBelegart.Items.BeginUpdate;\r\n try\r\n comboBelegart.Items.Clear;\r\n comboBelegart.Items.Add('Angebote');\r\n comboBelegart.Items.Add('Auftr'#228'ge');\r\n comboBelegart.Items.Add('Lieferscheine');\r\n comboBelegart.Items.Add('Rechnungen');\r\n comboBelegart.Items.Add('Anfragen');\r\n comboBelegart.Items.Add('Bestellungen');\r\n comboBelegart.Items.Add('Wareneing'#228'nge');\r\n comboBelegart.Items.Add('EingangsRechnungen');\r\n finally\r\n comboBelegart.Items.EndUpdate;\r\n end;\r\n btnAnzeigen.SetParentComponent(Self);\r\n btnAnzeigen.Name := 'btnAnzeigen';\r\n btnAnzeigen.Left := 0;\r\n btnAnzeigen.Top := 214;\r\n btnAnzeigen.Width := 96;\r\n btnAnzeigen.Height := 25;\r\n btnAnzeigen.Caption := 'Anzeigen';\r\n btnAnzeigen.ChildOrder := 6;\r\n btnAnzeigen.ElementClassName := 'btn btn-info btn-sm m-1 text-left';\r\n btnAnzeigen.ElementFont := efCSS;\r\n btnAnzeigen.ElementPosition := epIgnore;\r\n btnAnzeigen.HeightStyle := ssAuto;\r\n btnAnzeigen.HeightPercent := 100.000000000000000000;\r\n btnAnzeigen.WidthStyle := ssAuto;\r\n btnAnzeigen.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnAnzeigen, Self, 'OnClick', 'btnAnzeigenClick');\r\n edtsuchbegriff.SetParentComponent(Self);\r\n edtsuchbegriff.Name := 'edtsuchbegriff';\r\n edtsuchbegriff.Left := 102;\r\n edtsuchbegriff.Top := 162;\r\n edtsuchbegriff.Width := 121;\r\n edtsuchbegriff.Height := 19;\r\n edtsuchbegriff.ChildOrder := 7;\r\n edtsuchbegriff.ElementClassName := 'form-control input-sm';\r\n edtsuchbegriff.ElementFont := efCSS;\r\n edtsuchbegriff.ElementPosition := epIgnore;\r\n edtsuchbegriff.HeightStyle := ssAuto;\r\n edtsuchbegriff.HeightPercent := 100.000000000000000000;\r\n edtsuchbegriff.TextHint := 'Suchbegriff';\r\n edtsuchbegriff.WidthPercent := 100.000000000000000000;\r\n btnSuchePos.SetParentComponent(Self);\r\n btnSuchePos.Name := 'btnSuchePos';\r\n btnSuchePos.Left := 102;\r\n btnSuchePos.Top := 214;\r\n btnSuchePos.Width := 170;\r\n btnSuchePos.Height := 25;\r\n btnSuchePos.Caption := 'in Positionen suchen';\r\n btnSuchePos.ChildOrder := 8;\r\n btnSuchePos.ElementClassName := 'btn btn-info btn-sm m-1 text-left';\r\n btnSuchePos.ElementFont := efCSS;\r\n btnSuchePos.ElementPosition := epIgnore;\r\n btnSuchePos.HeightStyle := ssAuto;\r\n btnSuchePos.HeightPercent := 100.000000000000000000;\r\n btnSuchePos.WidthStyle := ssAuto;\r\n btnSuchePos.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnSuchePos, Self, 'OnClick', 'btnSuchePosClick');\r\n Container3.SetParentComponent(Self);\r\n Container3.Name := 'Container3';\r\n Container3.Left := 0;\r\n Container3.Top := 94;\r\n Container3.Width := 169;\r\n Container3.Height := 41;\r\n Container3.ElementClassName := 'd-flex flex-wrap m-1 border border-info';\r\n Container3.HeightStyle := ssAuto;\r\n Container3.WidthStyle := ssAuto;\r\n Container3.ChildOrder := 2;\r\n Container3.ElementFont := efCSS;\r\n Container3.ElementPosition := epIgnore;\r\n container4.SetParentComponent(Self);\r\n container4.Name := 'container4';\r\n container4.Left := 8;\r\n container4.Top := 102;\r\n container4.Width := 169;\r\n container4.Height := 41;\r\n container4.ElementClassName := 'd-flex flex-wrap m-1 border border-info';\r\n container4.HeightStyle := ssAuto;\r\n container4.WidthStyle := ssAuto;\r\n container4.ChildOrder := 2;\r\n container4.ElementFont := efCSS;\r\n container4.ElementPosition := epIgnore;\r\n Container5.SetParentComponent(Self);\r\n Container5.Name := 'Container5';\r\n Container5.Left := 16;\r\n Container5.Top := 110;\r\n Container5.Width := 169;\r\n Container5.Height := 41;\r\n Container5.ElementClassName := 'd-flex flex-wrap m-1 border border-info';\r\n Container5.HeightStyle := ssAuto;\r\n Container5.WidthStyle := ssAuto;\r\n Container5.ChildOrder := 2;\r\n Container5.ElementFont := efCSS;\r\n Container5.ElementPosition := epIgnore;\r\n xdsBelege.SetParentComponent(Self);\r\n xdsBelege.Name := 'xdsBelege';\r\n xdsBelege.AfterOpen := xdsBelegeAfterOpen;\r\n xdsBelege.Connection := DM2.XDataWebConnection1;\r\n xdsBelege.SubpropsDepth := 1;\r\n xdsBelege.Left := 72;\r\n xdsBelege.Top := 8;\r\n xdsPositionen.SetParentComponent(Self);\r\n xdsPositionen.Name := 'xdsPositionen';\r\n xdsPositionen.AfterOpen := xdsPositionenAfterOpen;\r\n xdsPositionen.Connection := DM2.XDataWebConnection1;\r\n xdsPositionen.SubpropsDepth := 1;\r\n xdsPositionen.Left := 24;\r\n xdsPositionen.Top := 64;\r\n sourceBelege.SetParentComponent(Self);\r\n sourceBelege.Name := 'sourceBelege';\r\n sourceBelege.DataSet := xdsBelege;\r\n sourceBelege.Left := 24;\r\n sourceBelege.Top := 8;\r\n finally\r\n lblKunde.AfterLoadDFMValues;\r\n lbKunde.AfterLoadDFMValues;\r\n ResultLabel.AfterLoadDFMValues;\r\n TC.AfterLoadDFMValues;\r\n Container1.AfterLoadDFMValues;\r\n Container2.AfterLoadDFMValues;\r\n btnzurueck.AfterLoadDFMValues;\r\n comboBelegart.AfterLoadDFMValues;\r\n btnAnzeigen.AfterLoadDFMValues;\r\n edtsuchbegriff.AfterLoadDFMValues;\r\n btnSuchePos.AfterLoadDFMValues;\r\n Container3.AfterLoadDFMValues;\r\n container4.AfterLoadDFMValues;\r\n Container5.AfterLoadDFMValues;\r\n xdsBelege.AfterLoadDFMValues;\r\n xdsPositionen.AfterLoadDFMValues;\r\n sourceBelege.AfterLoadDFMValues;\r\n end;\r\nend;\r\n\r\nend.","unit unit_Preise;\r\n\r\ninterface\r\n\r\nuses\r\n System.SysUtils, System.Classes, JS, Web, WEBLib.Graphics, WEBLib.Controls,\r\n WEBLib.Forms, WEBLib.Dialogs, Vcl.Controls, WEBLib.Grids, Data.DB,\r\n XData.Web.JsonDataset, XData.Web.Dataset, Vcl.StdCtrls, WEBLib.StdCtrls, DB,\r\n WEBLib.ExtCtrls;\r\n\r\ntype\r\n TPreise = class(TForm)\r\n TC: TTableControl;\r\n xdsKundenpreise: TXDataWebDataSet;\r\n xdsKundenpreiseArtikelnummer: TXDataWebEntityField;\r\n xdsKundenpreiseKundennummer: TXDataWebEntityField;\r\n xdsKundenpreiseVerkaufspreis: TFloatField;\r\n xdsKundenpreiseNachname: TStringField;\r\n xdsKundenpreiseRabattsatz: TFloatField;\r\n xdsKundenpreiseVerleihpreis: TFloatField;\r\n xdsKundenpreiseZusatzPreis: TFloatField;\r\n xdsKundenpreiseArtikelnummerKunde: TStringField;\r\n xdsKundenpreiseDatumGeaendert: TDateTimeField;\r\n xdsKundenpreiseArtikelueberschrift: TStringField;\r\n xdsKundenpreiseArtikelnummerArtikelnummer: TStringField;\r\n xdsKundenpreiseArtikelnummerArtikelueberschrift: TStringField;\r\n xdsKundenpreiseArtikelnummerArtikelbeschreibung: TStringField;\r\n xdsLieferantenpreise: TXDataWebDataSet;\r\n xdsLieferantenpreiseArtikelnummer: TXDataWebEntityField;\r\n xdsLieferantenpreiseEinkaufspreis: TFloatField;\r\n xdsLieferantenpreiseNachname: TStringField;\r\n xdsLieferantenpreiseDatumGeaendert: TDateTimeField;\r\n xdsLieferantenpreiseArtikelnummerLieferant: TStringField;\r\n xdsLieferantenpreiseERabattsatz: TFloatField;\r\n xdsLieferantenpreiseMindestbestellmenge: TFloatField;\r\n xdsLieferantenpreiseKundennummer: TXDataWebEntityField;\r\n xdsLieferantenpreiseArtikelnummerArtikelnummer: TStringField;\r\n xdsLieferantenpreiseArtikelnummerArtikelueberschrift: TStringField;\r\n xdsLieferantenpreiseArtikelnummerArtikelbeschreibung: TStringField;\r\n Container1: THTMLContainer;\r\n btnzurueck: TButton;\r\n Container2: THTMLContainer;\r\n TCEinkauf: TTableControl;\r\n Container3: THTMLContainer;\r\n procedure WebFormShow(Sender: TObject);\r\n procedure xdsKundenpreiseAfterOpen(DataSet: TDataSet);\r\n procedure xdsLieferantenpreiseAfterOpen(DataSet: TDataSet);\r\n procedure btnzurueckClick(Sender: TObject);\r\n private\r\n { Private-Deklarationen }\r\n public\r\n { Public-Deklarationen }\r\n mykontaktnummer:string;\r\n mykontaktname:string;\r\n\r\n protected procedure LoadDFMValues; override; end;\r\n\r\nvar\r\n Preise: TPreise;\r\n\r\nimplementation\r\n uses unit1, unit2;\r\n{$R *.dfm}\r\n\r\nprocedure TPreise.btnzurueckClick(Sender: TObject);\r\nbegin\r\n xdsKundenpreise.Close;\r\n xdsLieferantenpreise.Close;\r\n self.Close;\r\nend;\r\n\r\n\r\n\r\nprocedure TPreise.WebFormShow(Sender: TObject);\r\nvar\r\n myelement:TJSHTMLElement;\r\nbegin\r\n Container1.html.text:='

';\r\n myelement:=container1.ElementHandle;\r\n btnzurueck.ParentElement:=myelement;\r\n container2.ParentElement:=myelement;\r\n container3.ParentElement:=myelement;\r\n myelement:=container2.ElementHandle;\r\n tc.ParentElement:=myelement;\r\n myelement:=container3.ElementHandle;\r\n TCEinkauf.ParentElement:=myelement;\r\n xdsKundenpreise.Close;\r\n xdskundenpreise.QueryString:='$expand=Artikelnummer&$filter=Kundennummer eq '+QuotedStr(mykontaktnummer);\r\n xdsKundenpreise.Load;\r\nend;\r\n\r\nprocedure TPreise.xdsKundenpreiseAfterOpen(DataSet: TDataSet);\r\nbegin\r\n xdsLieferantenpreise.Close;\r\n xdsLieferantenpreise.QueryString:='$expand=Artikelnummer&$filter=Kundennummer eq '+QuotedStr(mykontaktnummer);\r\n xdsLieferantenpreise.Load;\r\nend;\r\n\r\nprocedure TPreise.xdsLieferantenpreiseAfterOpen(DataSet: TDataSet);\r\nvar\r\n i:integer;\r\n myelement:TJSHTMLElement;\r\nbegin\r\n i:=0;\r\n TC.ColCount:=3;\r\n TC.Rowcount:=xdsKundenpreise.RecordCount+2;\r\n TC.Cells[0,i]:='
Kundenpreise';\r\n TC.Cells[1,i]:='
Verkaufspreis';\r\n TC.Cells[2,i]:='
Rabattsatz';\r\n\r\n if xdsKundenpreise.RecordCount>0 then\r\n begin\r\n\r\n xdsKundenpreise.First;\r\n while not xdskundenpreise.eof do\r\n begin\r\n inc(i);\r\n TC.Cells[0,i]:=xdsKundenpreiseArtikelnummerArtikelnummer.AsString+'
'+xdsKundenpreiseArtikelnummerArtikelueberschrift.asstring;\r\n TC.Cells[1,i]:=formatfloat('#,##0.00',xdsKundenpreiseVerkaufspreis.Asfloat);\r\n TC.Cells[2,i]:=formatfloat('#,##0.00 %',xdsKundenpreiseRabattsatz.Asfloat);\r\n xdskundenpreise.Next;\r\n end;\r\n end;\r\n I:=0;\r\n TCEinkauf.ColCount:=3;\r\n TCEinkauf.Rowcount:=xdsLieferantenpreise.RecordCount+2;\r\n TCEinkauf.Cells[0,i]:='
Lieferantenpreise';\r\n TCEinkauf.Cells[1,i]:='
Einkaufspreis';\r\n TCEinkauf.Cells[2,i]:='
Rabattsatz';\r\n if xdsLieferantenpreise.RecordCount>0 then\r\n begin\r\n\r\n xdsLieferantenpreise.First;\r\n while not xdsLieferantenpreise.eof do\r\n begin\r\n inc(i);\r\n TCEinkauf.Cells[0,i]:=xdsLieferantenpreiseArtikelnummerArtikelnummer.AsString+'
'+xdsLieferantenpreiseArtikelnummerArtikelnummer.asstring;\r\n if xdsLieferantenpreiseArtikelnummerLieferant.AsString<>'' then\r\n begin\r\n TCEinkauf.Cells[0,i]:=TCEinkauf.Cells[0,i]+'
AN-Lieferant: '+xdsLieferantenpreiseArtikelnummerLieferant.AsString;\r\n end;\r\n if xdsLieferantenpreiseMindestbestellmenge.Asfloat>0 then\r\n begin\r\n TCEinkauf.Cells[0,i]:=TCEinkauf.Cells[0,i]+'
Mindestbestellmenge: '+xdsLieferantenpreiseMindestbestellmenge.AsString;\r\n end;\r\n TCEinkauf.Cells[1,i]:=formatfloat('#,##0.00',xdsLieferantenpreiseEinkaufspreis.Asfloat);\r\n TCEinkauf.Cells[2,i]:=formatfloat('#,##0.00 %',xdsLieferantenpreiseERabattsatz.Asfloat);\r\n xdsLieferantenpreise.Next;\r\n end;\r\n end;\r\n\r\n\r\nend;\r\n\r\nprocedure TPreise.LoadDFMValues;\r\nbegin\r\n inherited LoadDFMValues;\r\n\r\n TC := TTableControl.Create(Self);\r\n Container1 := THTMLContainer.Create(Self);\r\n btnzurueck := TButton.Create(Self);\r\n Container2 := THTMLContainer.Create(Self);\r\n TCEinkauf := TTableControl.Create(Self);\r\n Container3 := THTMLContainer.Create(Self);\r\n xdsKundenpreise := TXDataWebDataSet.Create(Self);\r\n xdsKundenpreiseArtikelnummer := TXDataWebEntityField.Create(Self);\r\n xdsKundenpreiseKundennummer := TXDataWebEntityField.Create(Self);\r\n xdsKundenpreiseVerkaufspreis := TFloatField.Create(Self);\r\n xdsKundenpreiseNachname := TStringField.Create(Self);\r\n xdsKundenpreiseRabattsatz := TFloatField.Create(Self);\r\n xdsKundenpreiseVerleihpreis := TFloatField.Create(Self);\r\n xdsKundenpreiseZusatzPreis := TFloatField.Create(Self);\r\n xdsKundenpreiseArtikelnummerKunde := TStringField.Create(Self);\r\n xdsKundenpreiseDatumGeaendert := TDateTimeField.Create(Self);\r\n xdsKundenpreiseArtikelueberschrift := TStringField.Create(Self);\r\n xdsKundenpreiseArtikelnummerArtikelnummer := TStringField.Create(Self);\r\n xdsKundenpreiseArtikelnummerArtikelueberschrift := TStringField.Create(Self);\r\n xdsKundenpreiseArtikelnummerArtikelbeschreibung := TStringField.Create(Self);\r\n xdsLieferantenpreise := TXDataWebDataSet.Create(Self);\r\n xdsLieferantenpreiseArtikelnummer := TXDataWebEntityField.Create(Self);\r\n xdsLieferantenpreiseKundennummer := TXDataWebEntityField.Create(Self);\r\n xdsLieferantenpreiseEinkaufspreis := TFloatField.Create(Self);\r\n xdsLieferantenpreiseNachname := TStringField.Create(Self);\r\n xdsLieferantenpreiseDatumGeaendert := TDateTimeField.Create(Self);\r\n xdsLieferantenpreiseArtikelnummerLieferant := TStringField.Create(Self);\r\n xdsLieferantenpreiseERabattsatz := TFloatField.Create(Self);\r\n xdsLieferantenpreiseMindestbestellmenge := TFloatField.Create(Self);\r\n xdsLieferantenpreiseArtikelnummerArtikelnummer := TStringField.Create(Self);\r\n xdsLieferantenpreiseArtikelnummerArtikelueberschrift := TStringField.Create(Self);\r\n xdsLieferantenpreiseArtikelnummerArtikelbeschreibung := TStringField.Create(Self);\r\n\r\n TC.BeforeLoadDFMValues;\r\n Container1.BeforeLoadDFMValues;\r\n btnzurueck.BeforeLoadDFMValues;\r\n Container2.BeforeLoadDFMValues;\r\n TCEinkauf.BeforeLoadDFMValues;\r\n Container3.BeforeLoadDFMValues;\r\n xdsKundenpreise.BeforeLoadDFMValues;\r\n xdsKundenpreiseArtikelnummer.BeforeLoadDFMValues;\r\n xdsKundenpreiseKundennummer.BeforeLoadDFMValues;\r\n xdsKundenpreiseVerkaufspreis.BeforeLoadDFMValues;\r\n xdsKundenpreiseNachname.BeforeLoadDFMValues;\r\n xdsKundenpreiseRabattsatz.BeforeLoadDFMValues;\r\n xdsKundenpreiseVerleihpreis.BeforeLoadDFMValues;\r\n xdsKundenpreiseZusatzPreis.BeforeLoadDFMValues;\r\n xdsKundenpreiseArtikelnummerKunde.BeforeLoadDFMValues;\r\n xdsKundenpreiseDatumGeaendert.BeforeLoadDFMValues;\r\n xdsKundenpreiseArtikelueberschrift.BeforeLoadDFMValues;\r\n xdsKundenpreiseArtikelnummerArtikelnummer.BeforeLoadDFMValues;\r\n xdsKundenpreiseArtikelnummerArtikelueberschrift.BeforeLoadDFMValues;\r\n xdsKundenpreiseArtikelnummerArtikelbeschreibung.BeforeLoadDFMValues;\r\n xdsLieferantenpreise.BeforeLoadDFMValues;\r\n xdsLieferantenpreiseArtikelnummer.BeforeLoadDFMValues;\r\n xdsLieferantenpreiseKundennummer.BeforeLoadDFMValues;\r\n xdsLieferantenpreiseEinkaufspreis.BeforeLoadDFMValues;\r\n xdsLieferantenpreiseNachname.BeforeLoadDFMValues;\r\n xdsLieferantenpreiseDatumGeaendert.BeforeLoadDFMValues;\r\n xdsLieferantenpreiseArtikelnummerLieferant.BeforeLoadDFMValues;\r\n xdsLieferantenpreiseERabattsatz.BeforeLoadDFMValues;\r\n xdsLieferantenpreiseMindestbestellmenge.BeforeLoadDFMValues;\r\n xdsLieferantenpreiseArtikelnummerArtikelnummer.BeforeLoadDFMValues;\r\n xdsLieferantenpreiseArtikelnummerArtikelueberschrift.BeforeLoadDFMValues;\r\n xdsLieferantenpreiseArtikelnummerArtikelbeschreibung.BeforeLoadDFMValues;\r\n try\r\n Name := 'Preise';\r\n Width := 205;\r\n Height := 436;\r\n CSSLibrary := cssBootstrap;\r\n ElementFont := efCSS;\r\n SetEvent(Self, 'OnShow', 'WebFormShow');\r\n TC.SetParentComponent(Self);\r\n TC.Name := 'TC';\r\n TC.Left := 0;\r\n TC.Top := 176;\r\n TC.Width := 121;\r\n TC.Height := 73;\r\n TC.ElementClassName := 'table table-hover table-bordered table-striped';\r\n TC.HeightStyle := ssAuto;\r\n TC.WidthStyle := ssPercent;\r\n TC.BorderColor := clSilver;\r\n TC.ColHeader := False;\r\n TC.ElementFont := efCSS;\r\n TC.ElementHeaderClassName := 'table-info';\r\n TC.ElementPosition := epIgnore;\r\n TC.ElementTableClassName := 'table table-hover table-bordered table-striped';\r\n TC.WordWrap := True;\r\n TC.ColCount := 2;\r\n Container1.SetParentComponent(Self);\r\n Container1.Name := 'Container1';\r\n Container1.Left := 0;\r\n Container1.Top := 0;\r\n Container1.Width := 169;\r\n Container1.Height := 41;\r\n Container1.HeightStyle := ssAuto;\r\n Container1.WidthStyle := ssPercent;\r\n Container1.ChildOrder := 4;\r\n Container1.ElementFont := efCSS;\r\n Container1.ElementPosition := epIgnore;\r\n btnzurueck.SetParentComponent(Self);\r\n btnzurueck.Name := 'btnzurueck';\r\n btnzurueck.Left := 0;\r\n btnzurueck.Top := 145;\r\n btnzurueck.Width := 96;\r\n btnzurueck.Height := 25;\r\n btnzurueck.Caption := '<< zur'#252'ck';\r\n btnzurueck.ChildOrder := 4;\r\n btnzurueck.ElementClassName := 'btn btn-info btn-sm m-1 text-left';\r\n btnzurueck.ElementFont := efCSS;\r\n btnzurueck.ElementPosition := epIgnore;\r\n btnzurueck.HeightStyle := ssAuto;\r\n btnzurueck.HeightPercent := 100.000000000000000000;\r\n btnzurueck.WidthStyle := ssAuto;\r\n btnzurueck.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnzurueck, Self, 'OnClick', 'btnzurueckClick');\r\n Container2.SetParentComponent(Self);\r\n Container2.Name := 'Container2';\r\n Container2.Left := 0;\r\n Container2.Top := 47;\r\n Container2.Width := 169;\r\n Container2.Height := 41;\r\n Container2.ElementClassName := 'd-flex flex-wrap m-1';\r\n Container2.HeightStyle := ssAuto;\r\n Container2.WidthStyle := ssAuto;\r\n Container2.ChildOrder := 1;\r\n Container2.ElementFont := efCSS;\r\n Container2.ElementPosition := epIgnore;\r\n TCEinkauf.SetParentComponent(Self);\r\n TCEinkauf.Name := 'TCEinkauf';\r\n TCEinkauf.Left := 0;\r\n TCEinkauf.Top := 272;\r\n TCEinkauf.Width := 121;\r\n TCEinkauf.Height := 73;\r\n TCEinkauf.ElementClassName := 'table table-hover table-bordered table-striped';\r\n TCEinkauf.HeightStyle := ssAuto;\r\n TCEinkauf.WidthStyle := ssPercent;\r\n TCEinkauf.BorderColor := clSilver;\r\n TCEinkauf.ChildOrder := 4;\r\n TCEinkauf.ColHeader := False;\r\n TCEinkauf.ElementFont := efCSS;\r\n TCEinkauf.ElementHeaderClassName := 'table-info';\r\n TCEinkauf.ElementPosition := epIgnore;\r\n TCEinkauf.ElementTableClassName := 'table table-hover table-bordered table-striped';\r\n TCEinkauf.WordWrap := True;\r\n TCEinkauf.ColCount := 2;\r\n Container3.SetParentComponent(Self);\r\n Container3.Name := 'Container3';\r\n Container3.Left := 0;\r\n Container3.Top := 94;\r\n Container3.Width := 169;\r\n Container3.Height := 41;\r\n Container3.ElementClassName := 'd-flex flex-wrap m-1';\r\n Container3.HeightStyle := ssAuto;\r\n Container3.WidthStyle := ssAuto;\r\n Container3.ChildOrder := 1;\r\n Container3.ElementFont := efCSS;\r\n Container3.ElementPosition := epIgnore;\r\n xdsKundenpreise.SetParentComponent(Self);\r\n xdsKundenpreise.Name := 'xdsKundenpreise';\r\n xdsKundenpreise.AfterOpen := xdsKundenpreiseAfterOpen;\r\n xdsKundenpreise.EntitySetName := 'ArtikelKundenpreise';\r\n xdsKundenpreise.Connection := DM2.XDataWebConnection1;\r\n xdsKundenpreise.SubpropsDepth := 1;\r\n xdsKundenpreise.QueryString := '$expand=Artikelnummer';\r\n xdsKundenpreise.Left := 71;\r\n xdsKundenpreise.Top := 22;\r\n xdsKundenpreiseArtikelnummer.SetParentComponent(xdsKundenpreise);\r\n xdsKundenpreiseArtikelnummer.Name := 'xdsKundenpreiseArtikelnummer';\r\n xdsKundenpreiseArtikelnummer.FieldName := 'Artikelnummer';\r\n xdsKundenpreiseArtikelnummer.Required := True;\r\n xdsKundenpreiseKundennummer.SetParentComponent(xdsKundenpreise);\r\n xdsKundenpreiseKundennummer.Name := 'xdsKundenpreiseKundennummer';\r\n xdsKundenpreiseKundennummer.FieldName := 'Kundennummer';\r\n xdsKundenpreiseKundennummer.Required := True;\r\n xdsKundenpreiseVerkaufspreis.SetParentComponent(xdsKundenpreise);\r\n xdsKundenpreiseVerkaufspreis.Name := 'xdsKundenpreiseVerkaufspreis';\r\n xdsKundenpreiseVerkaufspreis.FieldName := 'Verkaufspreis';\r\n xdsKundenpreiseNachname.SetParentComponent(xdsKundenpreise);\r\n xdsKundenpreiseNachname.Name := 'xdsKundenpreiseNachname';\r\n xdsKundenpreiseNachname.FieldName := 'Nachname';\r\n xdsKundenpreiseNachname.Size := 40;\r\n xdsKundenpreiseRabattsatz.SetParentComponent(xdsKundenpreise);\r\n xdsKundenpreiseRabattsatz.Name := 'xdsKundenpreiseRabattsatz';\r\n xdsKundenpreiseRabattsatz.FieldName := 'Rabattsatz';\r\n xdsKundenpreiseVerleihpreis.SetParentComponent(xdsKundenpreise);\r\n xdsKundenpreiseVerleihpreis.Name := 'xdsKundenpreiseVerleihpreis';\r\n xdsKundenpreiseVerleihpreis.FieldName := 'Verleihpreis';\r\n xdsKundenpreiseZusatzPreis.SetParentComponent(xdsKundenpreise);\r\n xdsKundenpreiseZusatzPreis.Name := 'xdsKundenpreiseZusatzPreis';\r\n xdsKundenpreiseZusatzPreis.FieldName := 'ZusatzPreis';\r\n xdsKundenpreiseArtikelnummerKunde.SetParentComponent(xdsKundenpreise);\r\n xdsKundenpreiseArtikelnummerKunde.Name := 'xdsKundenpreiseArtikelnummerKunde';\r\n xdsKundenpreiseArtikelnummerKunde.FieldName := 'ArtikelnummerKunde';\r\n xdsKundenpreiseArtikelnummerKunde.Size := 25;\r\n xdsKundenpreiseDatumGeaendert.SetParentComponent(xdsKundenpreise);\r\n xdsKundenpreiseDatumGeaendert.Name := 'xdsKundenpreiseDatumGeaendert';\r\n xdsKundenpreiseDatumGeaendert.FieldName := 'DatumGeaendert';\r\n xdsKundenpreiseArtikelueberschrift.SetParentComponent(xdsKundenpreise);\r\n xdsKundenpreiseArtikelueberschrift.Name := 'xdsKundenpreiseArtikelueberschrift';\r\n xdsKundenpreiseArtikelueberschrift.FieldName := 'Artikelueberschrift';\r\n xdsKundenpreiseArtikelueberschrift.Size := 50;\r\n xdsKundenpreiseArtikelnummerArtikelnummer.SetParentComponent(xdsKundenpreise);\r\n xdsKundenpreiseArtikelnummerArtikelnummer.Name := 'xdsKundenpreiseArtikelnummerArtikelnummer';\r\n xdsKundenpreiseArtikelnummerArtikelnummer.FieldName := 'Artikelnummer.Artikelnummer';\r\n xdsKundenpreiseArtikelnummerArtikelnummer.Size := 25;\r\n xdsKundenpreiseArtikelnummerArtikelueberschrift.SetParentComponent(xdsKundenpreise);\r\n xdsKundenpreiseArtikelnummerArtikelueberschrift.Name := 'xdsKundenpreiseArtikelnummerArtikelueberschrift';\r\n xdsKundenpreiseArtikelnummerArtikelueberschrift.FieldName := 'Artikelnummer.Artikelueberschrift';\r\n xdsKundenpreiseArtikelnummerArtikelueberschrift.Size := 50;\r\n xdsKundenpreiseArtikelnummerArtikelbeschreibung.SetParentComponent(xdsKundenpreise);\r\n xdsKundenpreiseArtikelnummerArtikelbeschreibung.Name := 'xdsKundenpreiseArtikelnummerArtikelbeschreibung';\r\n xdsKundenpreiseArtikelnummerArtikelbeschreibung.FieldName := 'Artikelnummer.Artikelbeschreibung';\r\n xdsKundenpreiseArtikelnummerArtikelbeschreibung.Size := 255;\r\n xdsLieferantenpreise.SetParentComponent(Self);\r\n xdsLieferantenpreise.Name := 'xdsLieferantenpreise';\r\n xdsLieferantenpreise.AfterOpen := xdsLieferantenpreiseAfterOpen;\r\n xdsLieferantenpreise.EntitySetName := 'ArtikelLieferantenpreise';\r\n xdsLieferantenpreise.Connection := DM2.XDataWebConnection1;\r\n xdsLieferantenpreise.SubpropsDepth := 1;\r\n xdsLieferantenpreise.QueryString := '$expand=Artikelnummer';\r\n xdsLieferantenpreise.Left := 71;\r\n xdsLieferantenpreise.Top := 134;\r\n xdsLieferantenpreiseArtikelnummer.SetParentComponent(xdsLieferantenpreise);\r\n xdsLieferantenpreiseArtikelnummer.Name := 'xdsLieferantenpreiseArtikelnummer';\r\n xdsLieferantenpreiseArtikelnummer.FieldName := 'Artikelnummer';\r\n xdsLieferantenpreiseArtikelnummer.Required := True;\r\n xdsLieferantenpreiseKundennummer.SetParentComponent(xdsLieferantenpreise);\r\n xdsLieferantenpreiseKundennummer.Name := 'xdsLieferantenpreiseKundennummer';\r\n xdsLieferantenpreiseKundennummer.FieldName := 'Kundennummer';\r\n xdsLieferantenpreiseKundennummer.Required := True;\r\n xdsLieferantenpreiseEinkaufspreis.SetParentComponent(xdsLieferantenpreise);\r\n xdsLieferantenpreiseEinkaufspreis.Name := 'xdsLieferantenpreiseEinkaufspreis';\r\n xdsLieferantenpreiseEinkaufspreis.FieldName := 'Einkaufspreis';\r\n xdsLieferantenpreiseNachname.SetParentComponent(xdsLieferantenpreise);\r\n xdsLieferantenpreiseNachname.Name := 'xdsLieferantenpreiseNachname';\r\n xdsLieferantenpreiseNachname.FieldName := 'Nachname';\r\n xdsLieferantenpreiseNachname.Size := 40;\r\n xdsLieferantenpreiseDatumGeaendert.SetParentComponent(xdsLieferantenpreise);\r\n xdsLieferantenpreiseDatumGeaendert.Name := 'xdsLieferantenpreiseDatumGeaendert';\r\n xdsLieferantenpreiseDatumGeaendert.FieldName := 'DatumGeaendert';\r\n xdsLieferantenpreiseArtikelnummerLieferant.SetParentComponent(xdsLieferantenpreise);\r\n xdsLieferantenpreiseArtikelnummerLieferant.Name := 'xdsLieferantenpreiseArtikelnummerLieferant';\r\n xdsLieferantenpreiseArtikelnummerLieferant.FieldName := 'ArtikelnummerLieferant';\r\n xdsLieferantenpreiseArtikelnummerLieferant.Size := 25;\r\n xdsLieferantenpreiseERabattsatz.SetParentComponent(xdsLieferantenpreise);\r\n xdsLieferantenpreiseERabattsatz.Name := 'xdsLieferantenpreiseERabattsatz';\r\n xdsLieferantenpreiseERabattsatz.FieldName := 'ERabattsatz';\r\n xdsLieferantenpreiseMindestbestellmenge.SetParentComponent(xdsLieferantenpreise);\r\n xdsLieferantenpreiseMindestbestellmenge.Name := 'xdsLieferantenpreiseMindestbestellmenge';\r\n xdsLieferantenpreiseMindestbestellmenge.FieldName := 'Mindestbestellmenge';\r\n xdsLieferantenpreiseArtikelnummerArtikelnummer.SetParentComponent(xdsLieferantenpreise);\r\n xdsLieferantenpreiseArtikelnummerArtikelnummer.Name := 'xdsLieferantenpreiseArtikelnummerArtikelnummer';\r\n xdsLieferantenpreiseArtikelnummerArtikelnummer.FieldName := 'Artikelnummer.Artikelnummer';\r\n xdsLieferantenpreiseArtikelnummerArtikelnummer.Size := 25;\r\n xdsLieferantenpreiseArtikelnummerArtikelueberschrift.SetParentComponent(xdsLieferantenpreise);\r\n xdsLieferantenpreiseArtikelnummerArtikelueberschrift.Name := 'xdsLieferantenpreiseArtikelnummerArtikelueberschrift';\r\n xdsLieferantenpreiseArtikelnummerArtikelueberschrift.FieldName := 'Artikelnummer.Artikelueberschrift';\r\n xdsLieferantenpreiseArtikelnummerArtikelueberschrift.Size := 50;\r\n xdsLieferantenpreiseArtikelnummerArtikelbeschreibung.SetParentComponent(xdsLieferantenpreise);\r\n xdsLieferantenpreiseArtikelnummerArtikelbeschreibung.Name := 'xdsLieferantenpreiseArtikelnummerArtikelbeschreibung';\r\n xdsLieferantenpreiseArtikelnummerArtikelbeschreibung.FieldName := 'Artikelnummer.Artikelbeschreibung';\r\n xdsLieferantenpreiseArtikelnummerArtikelbeschreibung.Size := 255;\r\n finally\r\n TC.AfterLoadDFMValues;\r\n Container1.AfterLoadDFMValues;\r\n btnzurueck.AfterLoadDFMValues;\r\n Container2.AfterLoadDFMValues;\r\n TCEinkauf.AfterLoadDFMValues;\r\n Container3.AfterLoadDFMValues;\r\n xdsKundenpreise.AfterLoadDFMValues;\r\n xdsKundenpreiseArtikelnummer.AfterLoadDFMValues;\r\n xdsKundenpreiseKundennummer.AfterLoadDFMValues;\r\n xdsKundenpreiseVerkaufspreis.AfterLoadDFMValues;\r\n xdsKundenpreiseNachname.AfterLoadDFMValues;\r\n xdsKundenpreiseRabattsatz.AfterLoadDFMValues;\r\n xdsKundenpreiseVerleihpreis.AfterLoadDFMValues;\r\n xdsKundenpreiseZusatzPreis.AfterLoadDFMValues;\r\n xdsKundenpreiseArtikelnummerKunde.AfterLoadDFMValues;\r\n xdsKundenpreiseDatumGeaendert.AfterLoadDFMValues;\r\n xdsKundenpreiseArtikelueberschrift.AfterLoadDFMValues;\r\n xdsKundenpreiseArtikelnummerArtikelnummer.AfterLoadDFMValues;\r\n xdsKundenpreiseArtikelnummerArtikelueberschrift.AfterLoadDFMValues;\r\n xdsKundenpreiseArtikelnummerArtikelbeschreibung.AfterLoadDFMValues;\r\n xdsLieferantenpreise.AfterLoadDFMValues;\r\n xdsLieferantenpreiseArtikelnummer.AfterLoadDFMValues;\r\n xdsLieferantenpreiseKundennummer.AfterLoadDFMValues;\r\n xdsLieferantenpreiseEinkaufspreis.AfterLoadDFMValues;\r\n xdsLieferantenpreiseNachname.AfterLoadDFMValues;\r\n xdsLieferantenpreiseDatumGeaendert.AfterLoadDFMValues;\r\n xdsLieferantenpreiseArtikelnummerLieferant.AfterLoadDFMValues;\r\n xdsLieferantenpreiseERabattsatz.AfterLoadDFMValues;\r\n xdsLieferantenpreiseMindestbestellmenge.AfterLoadDFMValues;\r\n xdsLieferantenpreiseArtikelnummerArtikelnummer.AfterLoadDFMValues;\r\n xdsLieferantenpreiseArtikelnummerArtikelueberschrift.AfterLoadDFMValues;\r\n xdsLieferantenpreiseArtikelnummerArtikelbeschreibung.AfterLoadDFMValues;\r\n end;\r\nend;\r\n\r\nend.","unit unit_EinzelAnsprechpartner;\r\n\r\ninterface\r\n\r\nuses\r\n System.SysUtils, System.Classes, JS, Web, WEBLib.Graphics, WEBLib.Controls,\r\n WEBLib.Forms, WEBLib.Dialogs, WEBLib.StdCtrls, WEBLib.Buttons, Vcl.StdCtrls,\r\n WEBLib.DBCtrls, Vcl.Controls, WEBLib.ExtCtrls, Data.DB, WEBLib.DB,\r\n XData.Web.JsonDataset, XData.Web.Dataset, WEBLib.Grids, strutils,\r\n WEBLib.ComCtrls, XData.Web.Client, DB;\r\n\r\ntype\r\n TEinzelAnsprechpartner = class(TForm)\r\n xdsEinzelAP: TXDataWebDataSet;\r\n TC: TTableControl;\r\n WClient: TXDataWebClient;\r\n Container1: THTMLContainer;\r\n Container2: THTMLContainer;\r\n btnzurueck: TButton;\r\n Container3: THTMLContainer;\r\n xdsEinzelAPKundennummerKundennummer: TStringField;\r\n xdsEinzelAPKundennummerNachname: TStringField;\r\n xdsEinzelAPAnsprechpartner: TStringField;\r\n xdsEinzelAPAbteilung: TStringField;\r\n xdsEinzelAPNachname: TStringField;\r\n xdsEinzelAPVorname: TStringField;\r\n xdsEinzelAPTelefonNummer: TStringField;\r\n xdsEinzelAPTelefonDurchwahl: TStringField;\r\n xdsEinzelAPTelefaxNummer: TStringField;\r\n xdsEinzelAPMobilTelefon: TStringField;\r\n xdsEinzelAPEMail: TStringField;\r\n xdsEinzelAPInternet: TStringField;\r\n xdsEinzelAPGeburtstag: TDateTimeField;\r\n xdsEinzelAPBemerkung: TStringField;\r\n xdsEinzelAPKeinNewsletter: TBooleanField;\r\n xdsEinzelAPAdresseBild: TStringField;\r\n xdsEinzelAPBriefanrede1: TStringField;\r\n xdsEinzelAPTitel: TStringField;\r\n xdsEinzelAPAPID: TStringField;\r\n xdsEinzelAPAnrede: TStringField;\r\n procedure xdsEinzelAPAfterOpen(DataSet: TDataSet);\r\n procedure WebFormShow(Sender: TObject);\r\n procedure btnzurueckClick(Sender: TObject);\r\n private\r\n { Private-Deklarationen }\r\n public\r\n { Public-Deklarationen }\r\n APID:string;\r\n BemerkungenText:string;\r\n procedure fensteraufbauen;\r\n protected procedure LoadDFMValues; override; end;\r\n\r\nvar\r\n EinzelAnsprechpartner: TEinzelAnsprechpartner;\r\n\r\nimplementation\r\n uses unit1, unit2, unit_ListeAnsprechpartner;\r\n{$R *.dfm}\r\n\r\n\r\n\r\nprocedure TEinzelAnsprechpartner.btnzurueckClick(Sender: TObject);\r\nbegin\r\n xdsEinzelAP.Close;\r\n self.Close;\r\nend;\r\n\r\n\r\n\r\nprocedure TEinzelAnsprechpartner.WebFormShow(Sender: TObject);\r\nvar\r\n myelement:TJSHTMLElement;\r\nbegin\r\n Container1.html.text:='';\r\n myelement:=container1.ElementHandle;\r\n container2.ParentElement:=myelement;\r\n container3.ParentElement:=myelement;\r\n myelement:=container2.ElementHandle;\r\n btnzurueck.ParentElement:=myelement;\r\n\r\n myelement:=container2.ElementHandle;\r\n tc.ParentElement:=myElement;\r\n xdsEinzelAP.Close;\r\n xdseinzelAP.QueryString:='$expand=Kundennummer&$filter=APID eq '+quotedstr(APID);\r\n xdseinzelAP.Load;\r\nend;\r\n\r\nprocedure TEinzelAnsprechpartner.xdsEinzelAPAfterOpen(DataSet: TDataSet);\r\n\r\n procedure OnResponse(Response:TXDataClientResponse);\r\n var\r\n mydownload:string;\r\n begin\r\n mydownload:=string(TJSObject(response.Result)['value']);\r\n BemerkungenText:=ReplaceStr(mydownload,#13+#10,'
');\r\n fensteraufbauen;\r\n\r\n\r\n end;\r\nbegin\r\n WClient.RawInvoke('IServerService.RTFTOTEXT',[xdsEinzelAPBemerkung.AsString],@OnResponse);\r\nend;\r\n\r\nprocedure TEinzelAnsprechpartner.fensteraufbauen;\r\nvar\r\n i:integer;\r\n myelement:TJSHTMLElement;\r\nbegin\r\n TC.Visible:=true;\r\n TC.RowCount:=19;\r\n TC.ColCount:=2;\r\n i:=0;\r\n\r\n TC.Cells[0,i]:='Kontakt-/Kundennummer';\r\n TC.Cells[1,i]:='
'+xdsEinzelAPKundennummerKundennummer.asstring+' '+xdsEinzelAPKundennummerNachname.asstring;\r\n inc(i);\r\n TC.Cells[0,i]:='Ansprechpartner';\r\n TC.Cells[1,i]:='
'+xdsEinzelAPAnsprechpartner.asstring;\r\n inc(i);\r\n TC.Cells[0,i]:='Nachname';\r\n TC.Cells[1,i]:='
'+xdsEinzelAPNachname.asstring;\r\n inc(i);\r\n TC.Cells[0,i]:='Vorname';\r\n TC.Cells[1,i]:='
'+xdsEinzelAPVorname.asstring;\r\n inc(i);\r\n TC.Cells[0,i]:='Anrede';\r\n TC.Cells[1,i]:=xdsEinzelAPAnrede.Asstring;\r\n inc(i);\r\n TC.Cells[0,i]:='Titel';\r\n TC.Cells[1,i]:=xdsEinzelAPTitel.Asstring;\r\n inc(i);\r\n TC.Cells[0,i]:='Abteilung';\r\n TC.Cells[1,i]:=xdsEinzelAPAbteilung.Asstring;\r\n inc(i);\r\n TC.Cells[0,i]:='Anschrift';\r\n TC.Cells[1,i]:='
'+ReplaceStr(xdsEinzelAPAdresseBild.asstring,#13+#10,'
');\r\n inc(i);\r\n TC.Cells[0,i]:='Telefon';\r\n TC.Cells[1,i]:=''+xdsEinzelAPTelefonnummer.Asstring+'';\r\n inc(i);\r\n TC.Cells[0,i]:='T-Durchwahl';\r\n TC.Cells[1,i]:=''+xdsEinzelAPTelefonDurchwahl.Asstring+'';\r\n inc(i);\r\n TC.Cells[0,i]:='Mobil';\r\n TC.Cells[1,i]:=''+xdsEinzelAPMobilTelefon.Asstring+'';\r\n inc(i);\r\n TC.Cells[0,i]:='Telefax';\r\n TC.Cells[1,i]:=xdsEinzelAPTelefaxNummer.Asstring;\r\n inc(i);\r\n TC.Cells[0,i]:='Email';\r\n TC.Cells[1,i]:=''+xdsEinzelAPEMail.AsString+'';\r\n inc(i);\r\n TC.Cells[0,i]:='Webseite';\r\n TC.Cells[1,i]:=''+xdsEinzelAPInternet.AsString+'';\r\n inc(i);\r\n TC.Cells[0,i]:='Briefanrede';\r\n TC.Cells[1,i]:=xdsEinzelAPBriefanrede1.Asstring;\r\n inc(i);\r\n TC.Cells[0,i]:='Geburtstag';\r\n if xdsEinzelAPGeburtstag.AsString<>'' then TC.Cells[1,i]:=formatdatetime('DD.MM.YYYY',xdsEinzelAPGeburtstag.asdatetime);\r\n inc(i);\r\n TC.Cells[0,i]:='Newsletter';\r\n if xdsEinzelAPKeinNewsletter.AsBoolean=true then TC.Cells[1,i]:='kein Newsletter' else TC.Cells[1,i]:='Ja';\r\n inc(i);\r\n TC.Cells[0,i]:='Bemerkung';\r\n TC.Cells[1,i]:=BemerkungenText;\r\n\r\n end;\r\n\r\n\r\nprocedure TEinzelAnsprechpartner.LoadDFMValues;\r\nbegin\r\n inherited LoadDFMValues;\r\n\r\n TC := TTableControl.Create(Self);\r\n Container1 := THTMLContainer.Create(Self);\r\n Container2 := THTMLContainer.Create(Self);\r\n btnzurueck := TButton.Create(Self);\r\n Container3 := THTMLContainer.Create(Self);\r\n xdsEinzelAP := TXDataWebDataSet.Create(Self);\r\n xdsEinzelAPKundennummerKundennummer := TStringField.Create(Self);\r\n xdsEinzelAPKundennummerNachname := TStringField.Create(Self);\r\n xdsEinzelAPAnsprechpartner := TStringField.Create(Self);\r\n xdsEinzelAPAbteilung := TStringField.Create(Self);\r\n xdsEinzelAPNachname := TStringField.Create(Self);\r\n xdsEinzelAPVorname := TStringField.Create(Self);\r\n xdsEinzelAPTelefonNummer := TStringField.Create(Self);\r\n xdsEinzelAPTelefonDurchwahl := TStringField.Create(Self);\r\n xdsEinzelAPTelefaxNummer := TStringField.Create(Self);\r\n xdsEinzelAPMobilTelefon := TStringField.Create(Self);\r\n xdsEinzelAPEMail := TStringField.Create(Self);\r\n xdsEinzelAPInternet := TStringField.Create(Self);\r\n xdsEinzelAPGeburtstag := TDateTimeField.Create(Self);\r\n xdsEinzelAPBemerkung := TStringField.Create(Self);\r\n xdsEinzelAPKeinNewsletter := TBooleanField.Create(Self);\r\n xdsEinzelAPAdresseBild := TStringField.Create(Self);\r\n xdsEinzelAPBriefanrede1 := TStringField.Create(Self);\r\n xdsEinzelAPTitel := TStringField.Create(Self);\r\n xdsEinzelAPAPID := TStringField.Create(Self);\r\n xdsEinzelAPAnrede := TStringField.Create(Self);\r\n WClient := TXDataWebClient.Create(Self);\r\n\r\n TC.BeforeLoadDFMValues;\r\n Container1.BeforeLoadDFMValues;\r\n Container2.BeforeLoadDFMValues;\r\n btnzurueck.BeforeLoadDFMValues;\r\n Container3.BeforeLoadDFMValues;\r\n xdsEinzelAP.BeforeLoadDFMValues;\r\n xdsEinzelAPKundennummerKundennummer.BeforeLoadDFMValues;\r\n xdsEinzelAPKundennummerNachname.BeforeLoadDFMValues;\r\n xdsEinzelAPAnsprechpartner.BeforeLoadDFMValues;\r\n xdsEinzelAPAbteilung.BeforeLoadDFMValues;\r\n xdsEinzelAPNachname.BeforeLoadDFMValues;\r\n xdsEinzelAPVorname.BeforeLoadDFMValues;\r\n xdsEinzelAPTelefonNummer.BeforeLoadDFMValues;\r\n xdsEinzelAPTelefonDurchwahl.BeforeLoadDFMValues;\r\n xdsEinzelAPTelefaxNummer.BeforeLoadDFMValues;\r\n xdsEinzelAPMobilTelefon.BeforeLoadDFMValues;\r\n xdsEinzelAPEMail.BeforeLoadDFMValues;\r\n xdsEinzelAPInternet.BeforeLoadDFMValues;\r\n xdsEinzelAPGeburtstag.BeforeLoadDFMValues;\r\n xdsEinzelAPBemerkung.BeforeLoadDFMValues;\r\n xdsEinzelAPKeinNewsletter.BeforeLoadDFMValues;\r\n xdsEinzelAPAdresseBild.BeforeLoadDFMValues;\r\n xdsEinzelAPBriefanrede1.BeforeLoadDFMValues;\r\n xdsEinzelAPTitel.BeforeLoadDFMValues;\r\n xdsEinzelAPAPID.BeforeLoadDFMValues;\r\n xdsEinzelAPAnrede.BeforeLoadDFMValues;\r\n WClient.BeforeLoadDFMValues;\r\n try\r\n Name := 'EinzelAnsprechpartner';\r\n Width := 223;\r\n Height := 393;\r\n CSSLibrary := cssBootstrap;\r\n ElementFont := efCSS;\r\n SetEvent(Self, 'OnShow', 'WebFormShow');\r\n TC.SetParentComponent(Self);\r\n TC.Name := 'TC';\r\n TC.Left := 32;\r\n TC.Top := 251;\r\n TC.Width := 152;\r\n TC.Height := 110;\r\n TC.ElementClassName := 'table table-hover table-bordered table-striped';\r\n TC.HeightStyle := ssAuto;\r\n TC.WidthStyle := ssPercent;\r\n TC.BorderColor := clSilver;\r\n TC.ColHeader := False;\r\n TC.ElementFont := efCSS;\r\n TC.ElementHeaderClassName := 'table-info';\r\n TC.ElementPosition := epIgnore;\r\n TC.ElementTableClassName := 'table table-hover table-bordered table-striped';\r\n TC.WordWrap := True;\r\n TC.ColCount := 2;\r\n Container1.SetParentComponent(Self);\r\n Container1.Name := 'Container1';\r\n Container1.Left := 0;\r\n Container1.Top := 0;\r\n Container1.Width := 169;\r\n Container1.Height := 41;\r\n Container1.HeightStyle := ssAuto;\r\n Container1.WidthStyle := ssPercent;\r\n Container1.ChildOrder := 4;\r\n Container1.ElementFont := efCSS;\r\n Container1.ElementPosition := epIgnore;\r\n Container2.SetParentComponent(Self);\r\n Container2.Name := 'Container2';\r\n Container2.Left := 0;\r\n Container2.Top := 47;\r\n Container2.Width := 169;\r\n Container2.Height := 41;\r\n Container2.ElementClassName := 'd-flex flex-wrap m-1';\r\n Container2.HeightStyle := ssAuto;\r\n Container2.WidthStyle := ssAuto;\r\n Container2.ChildOrder := 1;\r\n Container2.ElementFont := efCSS;\r\n Container2.ElementPosition := epIgnore;\r\n btnzurueck.SetParentComponent(Self);\r\n btnzurueck.Name := 'btnzurueck';\r\n btnzurueck.Left := 0;\r\n btnzurueck.Top := 158;\r\n btnzurueck.Width := 96;\r\n btnzurueck.Height := 25;\r\n btnzurueck.Caption := '<< zur'#252'ck';\r\n btnzurueck.ChildOrder := 4;\r\n btnzurueck.ElementClassName := 'btn btn-info btn-sm m-1 text-left';\r\n btnzurueck.ElementFont := efCSS;\r\n btnzurueck.ElementPosition := epIgnore;\r\n btnzurueck.HeightStyle := ssAuto;\r\n btnzurueck.HeightPercent := 100.000000000000000000;\r\n btnzurueck.WidthStyle := ssAuto;\r\n btnzurueck.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnzurueck, Self, 'OnClick', 'btnzurueckClick');\r\n Container3.SetParentComponent(Self);\r\n Container3.Name := 'Container3';\r\n Container3.Left := 0;\r\n Container3.Top := 94;\r\n Container3.Width := 169;\r\n Container3.Height := 41;\r\n Container3.ElementClassName := 'd-flex flex-wrap m-1';\r\n Container3.HeightStyle := ssAuto;\r\n Container3.WidthStyle := ssAuto;\r\n Container3.ChildOrder := 1;\r\n Container3.ElementFont := efCSS;\r\n Container3.ElementPosition := epIgnore;\r\n xdsEinzelAP.SetParentComponent(Self);\r\n xdsEinzelAP.Name := 'xdsEinzelAP';\r\n xdsEinzelAP.AfterOpen := xdsEinzelAPAfterOpen;\r\n xdsEinzelAP.EntitySetName := 'Ansprechpartner';\r\n xdsEinzelAP.Connection := DM2.XDataWebConnection1;\r\n xdsEinzelAP.SubpropsDepth := 1;\r\n xdsEinzelAP.QueryTop := 1;\r\n xdsEinzelAP.Left := 20;\r\n xdsEinzelAP.Top := 125;\r\n xdsEinzelAPKundennummerKundennummer.SetParentComponent(xdsEinzelAP);\r\n xdsEinzelAPKundennummerKundennummer.Name := 'xdsEinzelAPKundennummerKundennummer';\r\n xdsEinzelAPKundennummerKundennummer.FieldName := 'Kundennummer.Kundennummer';\r\n xdsEinzelAPKundennummerKundennummer.Size := 13;\r\n xdsEinzelAPKundennummerNachname.SetParentComponent(xdsEinzelAP);\r\n xdsEinzelAPKundennummerNachname.Name := 'xdsEinzelAPKundennummerNachname';\r\n xdsEinzelAPKundennummerNachname.FieldName := 'Kundennummer.Nachname';\r\n xdsEinzelAPKundennummerNachname.Size := 40;\r\n xdsEinzelAPAnsprechpartner.SetParentComponent(xdsEinzelAP);\r\n xdsEinzelAPAnsprechpartner.Name := 'xdsEinzelAPAnsprechpartner';\r\n xdsEinzelAPAnsprechpartner.FieldName := 'Ansprechpartner';\r\n xdsEinzelAPAnsprechpartner.Size := 50;\r\n xdsEinzelAPAbteilung.SetParentComponent(xdsEinzelAP);\r\n xdsEinzelAPAbteilung.Name := 'xdsEinzelAPAbteilung';\r\n xdsEinzelAPAbteilung.FieldName := 'Abteilung';\r\n xdsEinzelAPAbteilung.Size := 50;\r\n xdsEinzelAPNachname.SetParentComponent(xdsEinzelAP);\r\n xdsEinzelAPNachname.Name := 'xdsEinzelAPNachname';\r\n xdsEinzelAPNachname.FieldName := 'Nachname';\r\n xdsEinzelAPNachname.Size := 40;\r\n xdsEinzelAPVorname.SetParentComponent(xdsEinzelAP);\r\n xdsEinzelAPVorname.Name := 'xdsEinzelAPVorname';\r\n xdsEinzelAPVorname.FieldName := 'Vorname';\r\n xdsEinzelAPVorname.Size := 40;\r\n xdsEinzelAPTelefonNummer.SetParentComponent(xdsEinzelAP);\r\n xdsEinzelAPTelefonNummer.Name := 'xdsEinzelAPTelefonNummer';\r\n xdsEinzelAPTelefonNummer.FieldName := 'TelefonNummer';\r\n xdsEinzelAPTelefonNummer.Size := 25;\r\n xdsEinzelAPTelefonDurchwahl.SetParentComponent(xdsEinzelAP);\r\n xdsEinzelAPTelefonDurchwahl.Name := 'xdsEinzelAPTelefonDurchwahl';\r\n xdsEinzelAPTelefonDurchwahl.FieldName := 'TelefonDurchwahl';\r\n xdsEinzelAPTelefonDurchwahl.Size := 10;\r\n xdsEinzelAPTelefaxNummer.SetParentComponent(xdsEinzelAP);\r\n xdsEinzelAPTelefaxNummer.Name := 'xdsEinzelAPTelefaxNummer';\r\n xdsEinzelAPTelefaxNummer.FieldName := 'TelefaxNummer';\r\n xdsEinzelAPTelefaxNummer.Size := 25;\r\n xdsEinzelAPMobilTelefon.SetParentComponent(xdsEinzelAP);\r\n xdsEinzelAPMobilTelefon.Name := 'xdsEinzelAPMobilTelefon';\r\n xdsEinzelAPMobilTelefon.FieldName := 'MobilTelefon';\r\n xdsEinzelAPMobilTelefon.Size := 25;\r\n xdsEinzelAPEMail.SetParentComponent(xdsEinzelAP);\r\n xdsEinzelAPEMail.Name := 'xdsEinzelAPEMail';\r\n xdsEinzelAPEMail.FieldName := 'EMail';\r\n xdsEinzelAPEMail.Size := 50;\r\n xdsEinzelAPInternet.SetParentComponent(xdsEinzelAP);\r\n xdsEinzelAPInternet.Name := 'xdsEinzelAPInternet';\r\n xdsEinzelAPInternet.FieldName := 'Internet';\r\n xdsEinzelAPInternet.Size := 50;\r\n xdsEinzelAPGeburtstag.SetParentComponent(xdsEinzelAP);\r\n xdsEinzelAPGeburtstag.Name := 'xdsEinzelAPGeburtstag';\r\n xdsEinzelAPGeburtstag.FieldName := 'Geburtstag';\r\n xdsEinzelAPBemerkung.SetParentComponent(xdsEinzelAP);\r\n xdsEinzelAPBemerkung.Name := 'xdsEinzelAPBemerkung';\r\n xdsEinzelAPBemerkung.FieldName := 'Bemerkung';\r\n xdsEinzelAPBemerkung.Size := 255;\r\n xdsEinzelAPKeinNewsletter.SetParentComponent(xdsEinzelAP);\r\n xdsEinzelAPKeinNewsletter.Name := 'xdsEinzelAPKeinNewsletter';\r\n xdsEinzelAPKeinNewsletter.FieldName := 'KeinNewsletter';\r\n xdsEinzelAPAdresseBild.SetParentComponent(xdsEinzelAP);\r\n xdsEinzelAPAdresseBild.Name := 'xdsEinzelAPAdresseBild';\r\n xdsEinzelAPAdresseBild.FieldName := 'AdresseBild';\r\n xdsEinzelAPAdresseBild.Size := 255;\r\n xdsEinzelAPBriefanrede1.SetParentComponent(xdsEinzelAP);\r\n xdsEinzelAPBriefanrede1.Name := 'xdsEinzelAPBriefanrede1';\r\n xdsEinzelAPBriefanrede1.FieldName := 'Briefanrede1';\r\n xdsEinzelAPBriefanrede1.Size := 255;\r\n xdsEinzelAPTitel.SetParentComponent(xdsEinzelAP);\r\n xdsEinzelAPTitel.Name := 'xdsEinzelAPTitel';\r\n xdsEinzelAPTitel.FieldName := 'Titel';\r\n xdsEinzelAPAPID.SetParentComponent(xdsEinzelAP);\r\n xdsEinzelAPAPID.Name := 'xdsEinzelAPAPID';\r\n xdsEinzelAPAPID.FieldName := 'APID';\r\n xdsEinzelAPAPID.Required := True;\r\n xdsEinzelAPAPID.Size := 38;\r\n xdsEinzelAPAnrede.SetParentComponent(xdsEinzelAP);\r\n xdsEinzelAPAnrede.Name := 'xdsEinzelAPAnrede';\r\n xdsEinzelAPAnrede.FieldName := 'Anrede';\r\n xdsEinzelAPAnrede.Size := 15;\r\n WClient.SetParentComponent(Self);\r\n WClient.Name := 'WClient';\r\n WClient.Connection := DM2.XDataWebConnection1;\r\n WClient.Left := 24;\r\n WClient.Top := 8;\r\n finally\r\n TC.AfterLoadDFMValues;\r\n Container1.AfterLoadDFMValues;\r\n Container2.AfterLoadDFMValues;\r\n btnzurueck.AfterLoadDFMValues;\r\n Container3.AfterLoadDFMValues;\r\n xdsEinzelAP.AfterLoadDFMValues;\r\n xdsEinzelAPKundennummerKundennummer.AfterLoadDFMValues;\r\n xdsEinzelAPKundennummerNachname.AfterLoadDFMValues;\r\n xdsEinzelAPAnsprechpartner.AfterLoadDFMValues;\r\n xdsEinzelAPAbteilung.AfterLoadDFMValues;\r\n xdsEinzelAPNachname.AfterLoadDFMValues;\r\n xdsEinzelAPVorname.AfterLoadDFMValues;\r\n xdsEinzelAPTelefonNummer.AfterLoadDFMValues;\r\n xdsEinzelAPTelefonDurchwahl.AfterLoadDFMValues;\r\n xdsEinzelAPTelefaxNummer.AfterLoadDFMValues;\r\n xdsEinzelAPMobilTelefon.AfterLoadDFMValues;\r\n xdsEinzelAPEMail.AfterLoadDFMValues;\r\n xdsEinzelAPInternet.AfterLoadDFMValues;\r\n xdsEinzelAPGeburtstag.AfterLoadDFMValues;\r\n xdsEinzelAPBemerkung.AfterLoadDFMValues;\r\n xdsEinzelAPKeinNewsletter.AfterLoadDFMValues;\r\n xdsEinzelAPAdresseBild.AfterLoadDFMValues;\r\n xdsEinzelAPBriefanrede1.AfterLoadDFMValues;\r\n xdsEinzelAPTitel.AfterLoadDFMValues;\r\n xdsEinzelAPAPID.AfterLoadDFMValues;\r\n xdsEinzelAPAnrede.AfterLoadDFMValues;\r\n WClient.AfterLoadDFMValues;\r\n end;\r\nend;\r\n\r\nend.\r\n","unit unit_ListeAnsprechpartner;\r\n\r\ninterface\r\n\r\nuses\r\n System.SysUtils, System.Classes, JS, Web, WEBLib.Graphics, WEBLib.Controls,\r\n WEBLib.Forms, WEBLib.Dialogs, Vcl.Controls, WEBLib.ExtCtrls, WEBLib.Buttons,\r\n WEBLib.Grids, WEBLib.DBCtrls, Data.DB, WEBLib.DB, XData.Web.JsonDataset,\r\n XData.Web.Dataset, Vcl.StdCtrls, WEBLib.StdCtrls, XData.Web.Client,\r\n WEBLib.WebCtrls, strutils;\r\n\r\ntype\r\n TListeAnsprechpartner = class(TForm)\r\n xdsListe: TXDataWebDataSet;\r\n Container3: THTMLContainer;\r\n Container2: THTMLContainer;\r\n Container1: THTMLContainer;\r\n xdsListeAnsprechpartner: TStringField;\r\n xdsListeAbteilung: TStringField;\r\n xdsListeNachname: TStringField;\r\n xdsListeVorname: TStringField;\r\n xdsListeTelefonNummer: TStringField;\r\n xdsListeTelefonDurchwahl: TStringField;\r\n xdsListeTelefaxNummer: TStringField;\r\n xdsListeMobilTelefon: TStringField;\r\n xdsListeEMail: TStringField;\r\n xdsListeInternet: TStringField;\r\n xdsListeGeburtstag: TDateTimeField;\r\n xdsListeBemerkung: TStringField;\r\n xdsListeKeinNewsletter: TBooleanField;\r\n xdsListeAdresseBild: TStringField;\r\n xdsListeBriefanrede1: TStringField;\r\n xdsListeTitel: TStringField;\r\n xdsListeAPID: TStringField;\r\n xdsListeAnrede: TStringField;\r\n procedure WebFormShow(Sender: TObject);\r\n procedure xdsListeAfterOpen(DataSet: TDataSet);\r\n private\r\n { Private-Deklarationen }\r\n public\r\n { Public-Deklarationen }\r\n KundennummerID:string;\r\n NachnameID:string;\r\n buttonzurueck:TButton;\r\n EinzelCard:THTMLDiv;\r\n procedure buttonzurueckclick(Sender:TObject);\r\n procedure EinzelCardclick(Sender:TObject);\r\n protected procedure LoadDFMValues; override; end;\r\n\r\nvar\r\n ListeAnsprechpartner: TListeAnsprechpartner;\r\n\r\nimplementation\r\n uses unit1, unit2, unit_Kontaktsuche, unit_EinzelAnsprechpartner;\r\n{$R *.dfm}\r\n\r\nprocedure TListeAnsprechpartner.buttonzurueckclick(Sender:TObject);\r\nbegin\r\n xdsListe.Close;\r\n self.close;\r\nend;\r\n\r\nprocedure TListeAnsprechpartner.EinzelCardclick(Sender:TObject);\r\nvar\r\n EinzelEinzelAnsprechpartner:TEinzelAnsprechpartner;\r\n MyMerkerAP:string;\r\nbegin\r\n myMerkerAP:=(sender as THTMLDiv).ElementID;\r\n Container3.HTML.text:='';\r\n EinzelAnsprechpartner := TEinzelAnsprechpartner.CreateNew(procedure(AForm: TObject)\r\n begin\r\n (AForm as TEinzelAnsprechpartner).APID:=myMerkerAP;\r\n end\r\n );\r\n\r\n EinzelAnsprechpartner.ShowModal(procedure(AValue: TModalResult)\r\n begin\r\n xdsListe.close;\r\n xdsListe.Load;\r\n end\r\n );\r\nend;\r\n\r\nprocedure TListeAnsprechpartner.WebFormShow(Sender: TObject);\r\nbegin\r\n xdsListe.QueryString:='$filter=Kundennummer eq '+quotedstr(KundennummerID)+'&$orderby=Ansprechpartner';\r\n xdsListe.Load;\r\nend;\r\n\r\nprocedure TListeAnsprechpartner.xdsListeAfterOpen(DataSet: TDataSet);\r\nvar\r\n myelement:TJSHTMLElement;\r\n EinzelKarte:string;\r\nbegin\r\n Container1.html.text:='';\r\n Container2.HTML.Text:='';\r\n myelement:=container2.ElementHandle;\r\n buttonzurueck:=TButton.Create(self);\r\n buttonzurueck.ElementClassName:='btn btn-info m-1 text-left';\r\n buttonzurueck.HeightStyle:=ssauto;\r\n buttonzurueck.WidthStyle:=ssauto;\r\n buttonzurueck.tag:=0;\r\n buttonzurueck.Caption:='<< zurück';\r\n buttonzurueck.OnClick:=@buttonzurueckClick;\r\n buttonzurueck.ParentElement:=myelement;\r\n\r\n while not xdsListe.eof do\r\n begin\r\n Einzelkarte:='
'+xdsListeAnsprechpartner.asstring+'
';\r\n Einzelkarte:=Einzelkarte+'
'+xdsListeNachname.AsString+' ,'+xdsListeVorname.AsString;\r\n Einzelkarte:=Einzelkarte+'
'+xdsListeAbteilung.Asstring+'
';\r\n Einzelkarte:=Einzelkarte+'
'+xdsListeTelefonNummer.Asstring+'
';\r\n Einzelkarte:=Einzelkarte+'
'+xdsListeMobilTelefon.Asstring+'
';\r\n Einzelkarte:=Einzelkarte+'
'+xdsListeEMail.Asstring+'
';\r\n Einzelkarte:=Einzelkarte+'
'+xdsListeInternet.Asstring+'
';\r\n if xdsListeBemerkung.AsString<>'' then Einzelkarte:=Einzelkarte+'Bemerkung: '+xdsListeBemerkung.asstring+'
';\r\n Einzelkarte:=Einzelkarte+'
';\r\n myelement:=Container3.ElementHandle;\r\n EinzelCard:=THTMLDiv.Create(self);\r\n EinzelCard.ElementID:=xdsListeAPID.asstring;\r\n EinzelCard.HeightStyle:=ssauto;\r\n EinzelCard.Width:=350;\r\n EinzelCard.HTML.Text:=Einzelkarte;\r\n EinzelCard.ElementClassName:='card m-1 border-info';\r\n EinzelCard.OnClick:=@EinzelCardClick;\r\n EinzelCard.ParentElement:=myelement;\r\n xdsListe.Next;\r\n end;\r\nend;\r\n\r\nprocedure TListeAnsprechpartner.LoadDFMValues;\r\nbegin\r\n inherited LoadDFMValues;\r\n\r\n Container3 := THTMLContainer.Create(Self);\r\n Container2 := THTMLContainer.Create(Self);\r\n Container1 := THTMLContainer.Create(Self);\r\n xdsListe := TXDataWebDataSet.Create(Self);\r\n xdsListeAnsprechpartner := TStringField.Create(Self);\r\n xdsListeAbteilung := TStringField.Create(Self);\r\n xdsListeNachname := TStringField.Create(Self);\r\n xdsListeVorname := TStringField.Create(Self);\r\n xdsListeTelefonNummer := TStringField.Create(Self);\r\n xdsListeTelefonDurchwahl := TStringField.Create(Self);\r\n xdsListeTelefaxNummer := TStringField.Create(Self);\r\n xdsListeMobilTelefon := TStringField.Create(Self);\r\n xdsListeEMail := TStringField.Create(Self);\r\n xdsListeInternet := TStringField.Create(Self);\r\n xdsListeGeburtstag := TDateTimeField.Create(Self);\r\n xdsListeBemerkung := TStringField.Create(Self);\r\n xdsListeKeinNewsletter := TBooleanField.Create(Self);\r\n xdsListeAdresseBild := TStringField.Create(Self);\r\n xdsListeBriefanrede1 := TStringField.Create(Self);\r\n xdsListeTitel := TStringField.Create(Self);\r\n xdsListeAPID := TStringField.Create(Self);\r\n xdsListeAnrede := TStringField.Create(Self);\r\n\r\n Container3.BeforeLoadDFMValues;\r\n Container2.BeforeLoadDFMValues;\r\n Container1.BeforeLoadDFMValues;\r\n xdsListe.BeforeLoadDFMValues;\r\n xdsListeAnsprechpartner.BeforeLoadDFMValues;\r\n xdsListeAbteilung.BeforeLoadDFMValues;\r\n xdsListeNachname.BeforeLoadDFMValues;\r\n xdsListeVorname.BeforeLoadDFMValues;\r\n xdsListeTelefonNummer.BeforeLoadDFMValues;\r\n xdsListeTelefonDurchwahl.BeforeLoadDFMValues;\r\n xdsListeTelefaxNummer.BeforeLoadDFMValues;\r\n xdsListeMobilTelefon.BeforeLoadDFMValues;\r\n xdsListeEMail.BeforeLoadDFMValues;\r\n xdsListeInternet.BeforeLoadDFMValues;\r\n xdsListeGeburtstag.BeforeLoadDFMValues;\r\n xdsListeBemerkung.BeforeLoadDFMValues;\r\n xdsListeKeinNewsletter.BeforeLoadDFMValues;\r\n xdsListeAdresseBild.BeforeLoadDFMValues;\r\n xdsListeBriefanrede1.BeforeLoadDFMValues;\r\n xdsListeTitel.BeforeLoadDFMValues;\r\n xdsListeAPID.BeforeLoadDFMValues;\r\n xdsListeAnrede.BeforeLoadDFMValues;\r\n try\r\n Name := 'ListeAnsprechpartner';\r\n Width := 180;\r\n Height := 319;\r\n CSSLibrary := cssBootstrap;\r\n ElementFont := efCSS;\r\n Font.Charset := DEFAULT_CHARSET;\r\n Font.Color := clWindowText;\r\n Font.Height := -11;\r\n Font.Name := 'Tahoma';\r\n Font.Style := [];\r\n ParentFont := False;\r\n SetEvent(Self, 'OnShow', 'WebFormShow');\r\n Container3.SetParentComponent(Self);\r\n Container3.Name := 'Container3';\r\n Container3.Left := 0;\r\n Container3.Top := 94;\r\n Container3.Width := 169;\r\n Container3.Height := 41;\r\n Container3.ElementClassName := 'd-flex flex-wrap m-1';\r\n Container3.HeightStyle := ssAuto;\r\n Container3.WidthStyle := ssAuto;\r\n Container3.HeightPercent := 100.000000000000000000;\r\n Container3.WidthPercent := 100.000000000000000000;\r\n Container3.ChildOrder := 5;\r\n Container3.ElementFont := efCSS;\r\n Container3.ElementPosition := epIgnore;\r\n Container2.SetParentComponent(Self);\r\n Container2.Name := 'Container2';\r\n Container2.Left := 0;\r\n Container2.Top := 47;\r\n Container2.Width := 169;\r\n Container2.Height := 41;\r\n Container2.ElementClassName := 'd-flex flex-wrap m-1';\r\n Container2.HeightStyle := ssAuto;\r\n Container2.WidthStyle := ssAuto;\r\n Container2.HeightPercent := 100.000000000000000000;\r\n Container2.WidthPercent := 100.000000000000000000;\r\n Container2.ChildOrder := 5;\r\n Container2.ElementFont := efCSS;\r\n Container2.ElementPosition := epIgnore;\r\n Container1.SetParentComponent(Self);\r\n Container1.Name := 'Container1';\r\n Container1.Left := 0;\r\n Container1.Top := 0;\r\n Container1.Width := 169;\r\n Container1.Height := 41;\r\n Container1.HeightStyle := ssAuto;\r\n Container1.WidthStyle := ssPercent;\r\n Container1.HeightPercent := 100.000000000000000000;\r\n Container1.WidthPercent := 100.000000000000000000;\r\n Container1.ElementFont := efCSS;\r\n Container1.ElementPosition := epIgnore;\r\n xdsListe.SetParentComponent(Self);\r\n xdsListe.Name := 'xdsListe';\r\n xdsListe.AfterOpen := xdsListeAfterOpen;\r\n xdsListe.EntitySetName := 'Ansprechpartner';\r\n xdsListe.Connection := DM2.XDataWebConnection1;\r\n xdsListe.SubpropsDepth := 1;\r\n xdsListe.QueryTop := 100;\r\n xdsListe.Left := 20;\r\n xdsListe.Top := 142;\r\n xdsListeAnsprechpartner.SetParentComponent(xdsListe);\r\n xdsListeAnsprechpartner.Name := 'xdsListeAnsprechpartner';\r\n xdsListeAnsprechpartner.FieldName := 'Ansprechpartner';\r\n xdsListeAnsprechpartner.Size := 50;\r\n xdsListeAbteilung.SetParentComponent(xdsListe);\r\n xdsListeAbteilung.Name := 'xdsListeAbteilung';\r\n xdsListeAbteilung.FieldName := 'Abteilung';\r\n xdsListeAbteilung.Size := 50;\r\n xdsListeNachname.SetParentComponent(xdsListe);\r\n xdsListeNachname.Name := 'xdsListeNachname';\r\n xdsListeNachname.FieldName := 'Nachname';\r\n xdsListeNachname.Size := 40;\r\n xdsListeVorname.SetParentComponent(xdsListe);\r\n xdsListeVorname.Name := 'xdsListeVorname';\r\n xdsListeVorname.FieldName := 'Vorname';\r\n xdsListeVorname.Size := 40;\r\n xdsListeTelefonNummer.SetParentComponent(xdsListe);\r\n xdsListeTelefonNummer.Name := 'xdsListeTelefonNummer';\r\n xdsListeTelefonNummer.FieldName := 'TelefonNummer';\r\n xdsListeTelefonNummer.Size := 25;\r\n xdsListeTelefonDurchwahl.SetParentComponent(xdsListe);\r\n xdsListeTelefonDurchwahl.Name := 'xdsListeTelefonDurchwahl';\r\n xdsListeTelefonDurchwahl.FieldName := 'TelefonDurchwahl';\r\n xdsListeTelefonDurchwahl.Size := 10;\r\n xdsListeTelefaxNummer.SetParentComponent(xdsListe);\r\n xdsListeTelefaxNummer.Name := 'xdsListeTelefaxNummer';\r\n xdsListeTelefaxNummer.FieldName := 'TelefaxNummer';\r\n xdsListeTelefaxNummer.Size := 25;\r\n xdsListeMobilTelefon.SetParentComponent(xdsListe);\r\n xdsListeMobilTelefon.Name := 'xdsListeMobilTelefon';\r\n xdsListeMobilTelefon.FieldName := 'MobilTelefon';\r\n xdsListeMobilTelefon.Size := 25;\r\n xdsListeEMail.SetParentComponent(xdsListe);\r\n xdsListeEMail.Name := 'xdsListeEMail';\r\n xdsListeEMail.FieldName := 'EMail';\r\n xdsListeEMail.Size := 50;\r\n xdsListeInternet.SetParentComponent(xdsListe);\r\n xdsListeInternet.Name := 'xdsListeInternet';\r\n xdsListeInternet.FieldName := 'Internet';\r\n xdsListeInternet.Size := 50;\r\n xdsListeGeburtstag.SetParentComponent(xdsListe);\r\n xdsListeGeburtstag.Name := 'xdsListeGeburtstag';\r\n xdsListeGeburtstag.FieldName := 'Geburtstag';\r\n xdsListeBemerkung.SetParentComponent(xdsListe);\r\n xdsListeBemerkung.Name := 'xdsListeBemerkung';\r\n xdsListeBemerkung.FieldName := 'Bemerkung';\r\n xdsListeBemerkung.Size := 255;\r\n xdsListeKeinNewsletter.SetParentComponent(xdsListe);\r\n xdsListeKeinNewsletter.Name := 'xdsListeKeinNewsletter';\r\n xdsListeKeinNewsletter.FieldName := 'KeinNewsletter';\r\n xdsListeAdresseBild.SetParentComponent(xdsListe);\r\n xdsListeAdresseBild.Name := 'xdsListeAdresseBild';\r\n xdsListeAdresseBild.FieldName := 'AdresseBild';\r\n xdsListeAdresseBild.Size := 255;\r\n xdsListeBriefanrede1.SetParentComponent(xdsListe);\r\n xdsListeBriefanrede1.Name := 'xdsListeBriefanrede1';\r\n xdsListeBriefanrede1.FieldName := 'Briefanrede1';\r\n xdsListeBriefanrede1.Size := 255;\r\n xdsListeTitel.SetParentComponent(xdsListe);\r\n xdsListeTitel.Name := 'xdsListeTitel';\r\n xdsListeTitel.FieldName := 'Titel';\r\n xdsListeAPID.SetParentComponent(xdsListe);\r\n xdsListeAPID.Name := 'xdsListeAPID';\r\n xdsListeAPID.FieldName := 'APID';\r\n xdsListeAPID.Required := True;\r\n xdsListeAPID.Size := 38;\r\n xdsListeAnrede.SetParentComponent(xdsListe);\r\n xdsListeAnrede.Name := 'xdsListeAnrede';\r\n xdsListeAnrede.FieldName := 'Anrede';\r\n xdsListeAnrede.Size := 15;\r\n finally\r\n Container3.AfterLoadDFMValues;\r\n Container2.AfterLoadDFMValues;\r\n Container1.AfterLoadDFMValues;\r\n xdsListe.AfterLoadDFMValues;\r\n xdsListeAnsprechpartner.AfterLoadDFMValues;\r\n xdsListeAbteilung.AfterLoadDFMValues;\r\n xdsListeNachname.AfterLoadDFMValues;\r\n xdsListeVorname.AfterLoadDFMValues;\r\n xdsListeTelefonNummer.AfterLoadDFMValues;\r\n xdsListeTelefonDurchwahl.AfterLoadDFMValues;\r\n xdsListeTelefaxNummer.AfterLoadDFMValues;\r\n xdsListeMobilTelefon.AfterLoadDFMValues;\r\n xdsListeEMail.AfterLoadDFMValues;\r\n xdsListeInternet.AfterLoadDFMValues;\r\n xdsListeGeburtstag.AfterLoadDFMValues;\r\n xdsListeBemerkung.AfterLoadDFMValues;\r\n xdsListeKeinNewsletter.AfterLoadDFMValues;\r\n xdsListeAdresseBild.AfterLoadDFMValues;\r\n xdsListeBriefanrede1.AfterLoadDFMValues;\r\n xdsListeTitel.AfterLoadDFMValues;\r\n xdsListeAPID.AfterLoadDFMValues;\r\n xdsListeAnrede.AfterLoadDFMValues;\r\n end;\r\nend;\r\n\r\nend.","unit unit_GetPhoto;\r\n\r\ninterface\r\n\r\nuses\r\n System.SysUtils, System.Classes, JS, Web, WEBLib.Graphics, WEBLib.Controls,\r\n WEBLib.Forms, WEBLib.Dialogs, WEBLib.Devices, Vcl.StdCtrls, WEBLib.StdCtrls,\r\n Vcl.Controls, WEBLib.ExtCtrls, Data.DB, XData.Web.JsonDataset,\r\n XData.Web.Dataset, WEBLib.WebCtrls, strutils;\r\n\r\ntype\r\n TGetPhoto = class(TForm)\r\n WebCamera1: TCamera;\r\n Container2: THTMLContainer;\r\n Container1: THTMLContainer;\r\n btnCameraAus: TButton;\r\n btnCameraStart: TButton;\r\n Container3: THTMLContainer;\r\n MyImage: TImageControl;\r\n dsDateien: TXDataWebDataSet;\r\n edtBetreff: TEdit;\r\n WebFilePicker1: TFilePicker;\r\n btnzurueck: TButton;\r\n dsDateienID: TIntegerField;\r\n dsDateienDatumUhrzeit: TDateTimeField;\r\n dsDateienDateiMime: TStringField;\r\n dsDateienDateiName: TStringField;\r\n dsDateienDateiGroesse: TIntegerField;\r\n dsDateienDateiInhaltText: TStringField;\r\n dsDateienDateiInhaltThumb: TStringField;\r\n dsDateienProtokoll: TStringField;\r\n dsDateienDateiBetreff: TStringField;\r\n dsDateienKundennummer: TStringField;\r\n dsDateienNummerkomplett: TStringField;\r\n dsDateienObjektReferenz: TStringField;\r\n dsDateienFahrzeugID: TIntegerField;\r\n lblBetreff: TLabel;\r\n btnSpeichern: TButton;\r\n lblCamera: TLabel;\r\n Container4: THTMLContainer;\r\n procedure WebCamera1CameraDevicesInitialized(Sender: TObject);\r\n procedure WebFormShow(Sender: TObject);\r\n procedure btnCameraAusClick(Sender: TObject);\r\n procedure btnCameraStartClick(Sender: TObject);\r\n procedure WebCamera1Click(Sender: TObject);\r\n procedure dsDateienAfterOpen(DataSet: TDataSet);\r\n procedure btnzurueckClick(Sender: TObject);\r\n procedure WebFormCloseQuery(Sender: TObject; var CanClose: Boolean);\r\n procedure WebFilePicker1Change(Sender: TObject);\r\n procedure WebFilePicker1GetFileAsBase64(Sender: TObject;\r\n AFileIndex: Integer; ABase64: string);\r\n procedure btnSpeichernClick(Sender: TObject);\r\n procedure dsDateienAfterPost(DataSet: TDataSet);\r\n procedure dsDateienAfterApplyUpdates(Sender: TDataSet;\r\n Info: TResolveResults);\r\n procedure WebFormClose(Sender: TObject; var Action: TCloseAction);\r\n private\r\n { Private-Deklarationen }\r\n public\r\n { Public-Deklarationen }\r\n PhotoMerkerArt:string;\r\n PhotoMerkerNummerkomplett:string;\r\n PhotoMerkerObjektreferenz:string;\r\n PhotoMerkerFahrzeugID:string;\r\n PhotoMerkerKundennummer:string;\r\n PhotoMerkerName:string;\r\n PhotoHeadlineText:string;\r\n PhotoEinzelDateiID:string;\r\n PhotoFunktion:string;\r\n PhotoPNG:string;\r\n file1base64str1:string;\r\n protected procedure LoadDFMValues; override; end;\r\n\r\nvar\r\n GetPhoto: TGetPhoto;\r\n\r\nimplementation\r\n uses unit1,unit2;\r\n{$R *.dfm}\r\n\r\n\r\nprocedure TGetPhoto.btnSpeichernClick(Sender: TObject);\r\nvar\r\n myfileextension:string;\r\n myfilewithoutext:string;\r\nbegin\r\n if edtBetreff.Text='' then\r\n begin\r\n showmessage('Bitte Betreff eintragen');\r\n exit;\r\n end;\r\n if file1base64str1='' then\r\n begin\r\n showmessage('Es gibt nichts zu speichern');\r\n exit;\r\n end;\r\n\r\n dsDateien.Append;\r\n dsDateienDatumUhrzeit.AsDateTime:=date+time;\r\n dsDateienDateiBetreff.AsString:=edtBetreff.Text;\r\n if PhotoFunktion='Foto' then\r\n begin\r\n dsDateienDateiMime.AsString:='image/png';\r\n dsDateienDateiGroesse.AsInteger:=length(file1base64str1);\r\n dsDateienDateiName.AsString:=form1.stripsonderzeichen(leftstr(edtbetreff.Text,50))+'.png';\r\n end\r\n else\r\n begin\r\n dsDateienDateiMime.AsString:=WebFilePicker1.Files.Items[0].MimeType;\r\n dsDateienDateiGroesse.AsInteger:=WebFilePicker1.Files.Items[0].Size;\r\n myfilewithoutext:=WebFilePicker1.Files.Items[0].Name;\r\n myfileextension:=ExtractFileExt(WebFilePicker1.Files.Items[0].Name);\r\n myfilewithoutext:=replacestr(myfilewithoutext,myfileextension,'');\r\n myfilewithoutext:=form1.StripSonderzeichen(myfilewithoutext);\r\n dsDateienDateiName.AsString:=myfilewithoutext+myfileextension;\r\n end;\r\n dsDateienDateiInhaltText.AsString:=file1base64str1;\r\n dsDateienKundennummer.AsString:=PhotoMerkerKundennummer;\r\n dsDateienNummerkomplett.AsString:=PhotoMerkerNummerkomplett;\r\n dsDateienObjektReferenz.AsString:=PhotoMerkerObjektreferenz;\r\n dsDateienFahrzeugID.AsString:=PhotoMerkerFahrzeugID;\r\n dsdateien.Post;\r\nend;\r\n\r\nprocedure TGetPhoto.btnCameraStartClick(Sender: TObject);\r\nbegin\r\n if WebCamera1.CameraDevices.Count<1 then\r\n begin\r\n lblCamera.Caption:='Keine Camera vorhanden';\r\n btnSpeichern.Enabled:=false;\r\n exit;\r\n end\r\n else\r\n begin\r\n lblCamera.Caption:='';\r\n end;\r\n WebCamera1.Visible:=true;\r\n WebCamera1.Start;\r\n\r\nend;\r\n\r\nprocedure TGetPhoto.btnzurueckClick(Sender: TObject);\r\nbegin\r\n self.Close;\r\nend;\r\n\r\nprocedure TGetPhoto.dsDateienAfterApplyUpdates(Sender: TDataSet;\r\n Info: TResolveResults);\r\n var\r\n i:integer;\r\nbegin\r\n for i := 0 to High(info.Records) do\r\n begin\r\n if info.Records[i].Error<>'' then showmessage(info.Records[i].Error);\r\n end;\r\n if info.Records[0].Error='' then\r\n begin\r\n close;\r\n end;\r\nend;\r\n\r\nprocedure TGetPhoto.dsDateienAfterOpen(DataSet: TDataSet);\r\nvar\r\n myelement:TJSHTMLElement;\r\n myheadline:string;\r\nbegin\r\n if PhotoFunktion='Foto' then myheadline:='Foto hinzufügen' else myheadline:='Datei hinzufügen';\r\n Container1.html.text:='';\r\n myelement:=container1.ElementHandle;\r\n btnzurueck.parentelement:=myelement;\r\n btnspeichern.parentelement:=myelement;\r\n btncameraStart.ParentElement:=myelement;\r\n btncameraAus.ParentElement:=myelement;\r\n myimage.ParentElement:=myelement;\r\n myelement:=container2.ElementHandle;\r\n Container2.HTML.Text:='';\r\n WebFilePicker1.ParentElement:=myelement;\r\n lblBetreff.parentelement:=myelement;\r\n edtbetreff.ParentElement:=myelement;\r\n\r\n Container3.html.text:='';\r\n myelement:=container3.elementhandle;\r\n lblcamera.parentelement:=myelement;\r\n\r\n Container4.html.text:='';\r\n myelement:=container4.elementhandle;\r\n webcamera1.ParentElement:=myelement;\r\n\r\n\r\n if PhotoFunktion='Foto' then\r\n begin\r\n WebFilePicker1.visible:=false;\r\n btnCameraStart.visible:=true;\r\n btnCameraAus.visible:=true;\r\n lblcamera.visible:=true;\r\n btncamerastartClick(nil);\r\n end\r\n else\r\n begin\r\n WebFilePicker1.visible:=true;\r\n webcamera1.visible:=false;\r\n btnCameraStart.visible:=false;\r\n btnCameraAus.visible:=false;\r\n lblcamera.visible:=false;\r\n end;\r\nend;\r\n\r\nprocedure TGetPhoto.dsDateienAfterPost(DataSet: TDataSet);\r\nbegin\r\n dsdateien.applyupdates;\r\nend;\r\n\r\nprocedure TGetPhoto.btnCameraAusClick(Sender: TObject);\r\nbegin\r\n webcamera1.Stop;\r\n webcamera1.Visible:=false;\r\n btnCamerastart.enabled:=true;\r\n btnCameraAus.Enabled:=false;\r\nend;\r\n\r\nprocedure TGetPhoto.WebCamera1CameraDevicesInitialized(Sender: TObject);\r\nbegin\r\n btnCamerastart.enabled:=false;\r\n btnCameraAus.Enabled:=true;\r\n btnSpeichern.Enabled:=true;\r\nend;\r\n\r\nprocedure TGetPhoto.WebCamera1Click(Sender: TObject);\r\nbegin\r\n file1base64str1:=WebCamera1.SnapShotAsBase64;\r\n MyImage.URL := WebCamera1.SnapShotAsBase64;\r\n btnCameraAusClick(sender);\r\n edtbetreff.SetFocus;\r\nend;\r\n\r\nprocedure TGetPhoto.WebFilePicker1Change(Sender: TObject);\r\nbegin\r\n file1base64str1:='';\r\n if WebFilePicker1.Files.Count>0 then\r\n begin\r\n if WebFilePicker1.Files.Items[0].Size<2097153 then\r\n begin\r\n webfilepicker1.Files.Items[0].GetFileAsBase64;\r\n end\r\n else\r\n begin\r\n showmessage('Datei ist zu groß, bitte andere Datei wählen');\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TGetPhoto.WebFilePicker1GetFileAsBase64(Sender: TObject;\r\n AFileIndex: Integer; ABase64: string);\r\nbegin\r\n file1base64str1:= 'data:' + WebFilePicker1.Files.Items[0].MimeType + ';base64,' + ABase64;\r\n if Webfilepicker1.Files.Items[0].MimeType='image/png' then myimage.URL := file1base64str1;\r\n if Webfilepicker1.Files.Items[0].MimeType='image/jpeg' then myimage.URL := file1base64str1;\r\n if Webfilepicker1.Files.Items[0].MimeType='image/bmp' then myimage.URL := file1base64str1;\r\nend;\r\n\r\nprocedure TGetPhoto.WebFormClose(Sender: TObject; var Action: TCloseAction);\r\nbegin\r\n action:=cafree;\r\nend;\r\n\r\nprocedure TGetPhoto.WebFormCloseQuery(Sender: TObject; var CanClose: Boolean);\r\nbegin\r\n dsDateien.Close;\r\nend;\r\n\r\nprocedure TGetPhoto.WebFormShow(Sender: TObject);\r\nbegin\r\n dsdateien.Load;\r\nend;\r\nprocedure TGetPhoto.LoadDFMValues;\r\nbegin\r\n inherited LoadDFMValues;\r\n\r\n MyImage := TImageControl.Create(Self);\r\n lblBetreff := TLabel.Create(Self);\r\n lblCamera := TLabel.Create(Self);\r\n WebCamera1 := TCamera.Create(Self);\r\n Container2 := THTMLContainer.Create(Self);\r\n Container1 := THTMLContainer.Create(Self);\r\n btnCameraAus := TButton.Create(Self);\r\n btnCameraStart := TButton.Create(Self);\r\n Container3 := THTMLContainer.Create(Self);\r\n edtBetreff := TEdit.Create(Self);\r\n WebFilePicker1 := TFilePicker.Create(Self);\r\n btnzurueck := TButton.Create(Self);\r\n btnSpeichern := TButton.Create(Self);\r\n Container4 := THTMLContainer.Create(Self);\r\n dsDateien := TXDataWebDataSet.Create(Self);\r\n dsDateienID := TIntegerField.Create(Self);\r\n dsDateienDatumUhrzeit := TDateTimeField.Create(Self);\r\n dsDateienDateiMime := TStringField.Create(Self);\r\n dsDateienDateiName := TStringField.Create(Self);\r\n dsDateienDateiGroesse := TIntegerField.Create(Self);\r\n dsDateienDateiInhaltText := TStringField.Create(Self);\r\n dsDateienDateiInhaltThumb := TStringField.Create(Self);\r\n dsDateienProtokoll := TStringField.Create(Self);\r\n dsDateienDateiBetreff := TStringField.Create(Self);\r\n dsDateienKundennummer := TStringField.Create(Self);\r\n dsDateienNummerkomplett := TStringField.Create(Self);\r\n dsDateienObjektReferenz := TStringField.Create(Self);\r\n dsDateienFahrzeugID := TIntegerField.Create(Self);\r\n\r\n MyImage.BeforeLoadDFMValues;\r\n lblBetreff.BeforeLoadDFMValues;\r\n lblCamera.BeforeLoadDFMValues;\r\n WebCamera1.BeforeLoadDFMValues;\r\n Container2.BeforeLoadDFMValues;\r\n Container1.BeforeLoadDFMValues;\r\n btnCameraAus.BeforeLoadDFMValues;\r\n btnCameraStart.BeforeLoadDFMValues;\r\n Container3.BeforeLoadDFMValues;\r\n edtBetreff.BeforeLoadDFMValues;\r\n WebFilePicker1.BeforeLoadDFMValues;\r\n btnzurueck.BeforeLoadDFMValues;\r\n btnSpeichern.BeforeLoadDFMValues;\r\n Container4.BeforeLoadDFMValues;\r\n dsDateien.BeforeLoadDFMValues;\r\n dsDateienID.BeforeLoadDFMValues;\r\n dsDateienDatumUhrzeit.BeforeLoadDFMValues;\r\n dsDateienDateiMime.BeforeLoadDFMValues;\r\n dsDateienDateiName.BeforeLoadDFMValues;\r\n dsDateienDateiGroesse.BeforeLoadDFMValues;\r\n dsDateienDateiInhaltText.BeforeLoadDFMValues;\r\n dsDateienDateiInhaltThumb.BeforeLoadDFMValues;\r\n dsDateienProtokoll.BeforeLoadDFMValues;\r\n dsDateienDateiBetreff.BeforeLoadDFMValues;\r\n dsDateienKundennummer.BeforeLoadDFMValues;\r\n dsDateienNummerkomplett.BeforeLoadDFMValues;\r\n dsDateienObjektReferenz.BeforeLoadDFMValues;\r\n dsDateienFahrzeugID.BeforeLoadDFMValues;\r\n try\r\n Name := 'GetPhoto';\r\n Top := 1;\r\n Width := 175;\r\n Height := 614;\r\n Caption := 'GetPhoto';\r\n CSSLibrary := cssBootstrap;\r\n ElementFont := efCSS;\r\n Font.Charset := DEFAULT_CHARSET;\r\n Font.Color := clWindowText;\r\n Font.Height := -11;\r\n Font.Name := 'Arial';\r\n Font.Style := [];\r\n ParentFont := False;\r\n SetEvent(Self, 'OnClose', 'WebFormClose');\r\n SetEvent(Self, 'OnCloseQuery', 'WebFormCloseQuery');\r\n SetEvent(Self, 'OnShow', 'WebFormShow');\r\n MyImage.SetParentComponent(Self);\r\n MyImage.Name := 'MyImage';\r\n MyImage.Left := 8;\r\n MyImage.Top := 360;\r\n MyImage.Width := 145;\r\n MyImage.Height := 94;\r\n MyImage.WidthStyle := ssAuto;\r\n MyImage.HeightPercent := 100.000000000000000000;\r\n MyImage.WidthPercent := 100.000000000000000000;\r\n MyImage.ChildOrder := 8;\r\n MyImage.ElementFont := efCSS;\r\n lblBetreff.SetParentComponent(Self);\r\n lblBetreff.Name := 'lblBetreff';\r\n lblBetreff.Left := 20;\r\n lblBetreff.Top := 472;\r\n lblBetreff.Width := 147;\r\n lblBetreff.Height := 14;\r\n lblBetreff.Caption := 'Bitte geben Sie den Betreff ein';\r\n lblBetreff.ChildOrder := 5;\r\n lblBetreff.ElementClassName := 'h6 m-2';\r\n lblBetreff.ElementFont := efCSS;\r\n lblBetreff.ElementPosition := epIgnore;\r\n lblBetreff.HeightStyle := ssAuto;\r\n lblBetreff.HeightPercent := 100.000000000000000000;\r\n lblBetreff.WidthStyle := ssPercent;\r\n lblBetreff.WidthPercent := 80.000000000000000000;\r\n lblCamera.SetParentComponent(Self);\r\n lblCamera.Name := 'lblCamera';\r\n lblCamera.Left := 24;\r\n lblCamera.Top := 456;\r\n lblCamera.Width := 47;\r\n lblCamera.Height := 14;\r\n lblCamera.Caption := 'lblCamera';\r\n lblCamera.ElementClassName := 'h5 m-2';\r\n lblCamera.ElementFont := efCSS;\r\n lblCamera.ElementPosition := epIgnore;\r\n lblCamera.HeightStyle := ssAuto;\r\n lblCamera.HeightPercent := 100.000000000000000000;\r\n lblCamera.WidthStyle := ssAuto;\r\n lblCamera.WidthPercent := 100.000000000000000000;\r\n WebCamera1.SetParentComponent(Self);\r\n WebCamera1.Name := 'WebCamera1';\r\n WebCamera1.AlignWithMargins := True;\r\n WebCamera1.Left := 0;\r\n WebCamera1.Top := 222;\r\n WebCamera1.Width := 169;\r\n WebCamera1.Height := 118;\r\n WebCamera1.HeightStyle := ssAuto;\r\n WebCamera1.WidthStyle := ssPercent;\r\n WebCamera1.WidthPercent := 95.000000000000000000;\r\n WebCamera1.BaseFormat := cbfPNG;\r\n WebCamera1.CameraType := ctRear;\r\n SetEvent(WebCamera1, Self, 'OnCameraDevicesInitialized', 'WebCamera1CameraDevicesInitialized');\r\n SetEvent(WebCamera1, Self, 'OnClick', 'WebCamera1Click');\r\n Container2.SetParentComponent(Self);\r\n Container2.Name := 'Container2';\r\n Container2.Left := 0;\r\n Container2.Top := 47;\r\n Container2.Width := 169;\r\n Container2.Height := 41;\r\n Container2.ElementClassName := 'd-flex flex-column m-1';\r\n Container2.HeightStyle := ssAuto;\r\n Container2.WidthStyle := ssAuto;\r\n Container2.ChildOrder := 1;\r\n Container2.ElementFont := efCSS;\r\n Container2.ElementPosition := epIgnore;\r\n Container1.SetParentComponent(Self);\r\n Container1.Name := 'Container1';\r\n Container1.Left := 0;\r\n Container1.Top := 0;\r\n Container1.Width := 169;\r\n Container1.Height := 41;\r\n Container1.HeightStyle := ssAuto;\r\n Container1.WidthStyle := ssPercent;\r\n Container1.ElementFont := efCSS;\r\n Container1.ElementPosition := epIgnore;\r\n btnCameraAus.SetParentComponent(Self);\r\n btnCameraAus.Name := 'btnCameraAus';\r\n btnCameraAus.Left := 0;\r\n btnCameraAus.Top := 160;\r\n btnCameraAus.Width := 96;\r\n btnCameraAus.Height := 25;\r\n btnCameraAus.Caption := 'CAM aus';\r\n btnCameraAus.ChildOrder := 3;\r\n btnCameraAus.ElementClassName := 'btn btn-info btn-sm m-1 text-left';\r\n btnCameraAus.ElementFont := efCSS;\r\n btnCameraAus.ElementPosition := epIgnore;\r\n btnCameraAus.HeightStyle := ssAuto;\r\n btnCameraAus.HeightPercent := 100.000000000000000000;\r\n btnCameraAus.WidthStyle := ssAuto;\r\n btnCameraAus.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnCameraAus, Self, 'OnClick', 'btnCameraAusClick');\r\n btnCameraStart.SetParentComponent(Self);\r\n btnCameraStart.Name := 'btnCameraStart';\r\n btnCameraStart.Left := 0;\r\n btnCameraStart.Top := 191;\r\n btnCameraStart.Width := 96;\r\n btnCameraStart.Height := 25;\r\n btnCameraStart.Caption := 'CAM an';\r\n btnCameraStart.ChildOrder := 3;\r\n btnCameraStart.ElementClassName := 'btn btn-info btn-sm m-1 text-left';\r\n btnCameraStart.ElementFont := efCSS;\r\n btnCameraStart.ElementPosition := epIgnore;\r\n btnCameraStart.HeightStyle := ssAuto;\r\n btnCameraStart.HeightPercent := 100.000000000000000000;\r\n btnCameraStart.WidthStyle := ssAuto;\r\n btnCameraStart.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnCameraStart, Self, 'OnClick', 'btnCameraStartClick');\r\n Container3.SetParentComponent(Self);\r\n Container3.Name := 'Container3';\r\n Container3.Left := 0;\r\n Container3.Top := 94;\r\n Container3.Width := 169;\r\n Container3.Height := 41;\r\n Container3.ElementClassName := 'd-flex flex-wrap m-1';\r\n Container3.HeightStyle := ssAuto;\r\n Container3.WidthStyle := ssAuto;\r\n Container3.ChildOrder := 3;\r\n Container3.ElementFont := efCSS;\r\n Container3.ElementPosition := epIgnore;\r\n edtBetreff.SetParentComponent(Self);\r\n edtBetreff.Name := 'edtBetreff';\r\n edtBetreff.Left := 16;\r\n edtBetreff.Top := 536;\r\n edtBetreff.Width := 121;\r\n edtBetreff.Height := 22;\r\n edtBetreff.ChildOrder := 6;\r\n edtBetreff.ElementClassName := 'form-control m-1';\r\n edtBetreff.ElementFont := efCSS;\r\n edtBetreff.ElementPosition := epIgnore;\r\n edtBetreff.HeightStyle := ssAuto;\r\n edtBetreff.HeightPercent := 100.000000000000000000;\r\n edtBetreff.TextHint := 'Geben Sie hier einen Betreff f'#252'r die Datei/das Foto ein';\r\n edtBetreff.WidthStyle := ssPercent;\r\n edtBetreff.WidthPercent := 80.000000000000000000;\r\n WebFilePicker1.SetParentComponent(Self);\r\n WebFilePicker1.Name := 'WebFilePicker1';\r\n WebFilePicker1.Left := 8;\r\n WebFilePicker1.Top := 564;\r\n WebFilePicker1.Width := 121;\r\n WebFilePicker1.Height := 19;\r\n WebFilePicker1.ElementClassName := 'form-control m-1';\r\n WebFilePicker1.HeightStyle := ssAuto;\r\n WebFilePicker1.WidthStyle := ssPercent;\r\n WebFilePicker1.WidthPercent := 80.000000000000000000;\r\n WebFilePicker1.Accept := '.jpg,.jpeg,.png,.txt,.pdf,.zip';\r\n WebFilePicker1.ChildOrder := 7;\r\n WebFilePicker1.ElementFont := efCSS;\r\n WebFilePicker1.ElementPosition := epIgnore;\r\n SetEvent(WebFilePicker1, Self, 'OnChange', 'WebFilePicker1Change');\r\n SetEvent(WebFilePicker1, Self, 'OnGetFileAsBase64', 'WebFilePicker1GetFileAsBase64');\r\n btnzurueck.SetParentComponent(Self);\r\n btnzurueck.Name := 'btnzurueck';\r\n btnzurueck.Left := 8;\r\n btnzurueck.Top := 141;\r\n btnzurueck.Width := 110;\r\n btnzurueck.Height := 25;\r\n btnzurueck.Caption := '<< zur'#252'ck';\r\n btnzurueck.ChildOrder := 4;\r\n btnzurueck.ElementClassName := 'btn btn-info btn-sm m-1 text-left';\r\n btnzurueck.ElementFont := efCSS;\r\n btnzurueck.ElementPosition := epIgnore;\r\n btnzurueck.HeightStyle := ssAuto;\r\n btnzurueck.HeightPercent := 100.000000000000000000;\r\n btnzurueck.WidthStyle := ssAuto;\r\n btnzurueck.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnzurueck, Self, 'OnClick', 'btnzurueckClick');\r\n btnSpeichern.SetParentComponent(Self);\r\n btnSpeichern.Name := 'btnSpeichern';\r\n btnSpeichern.Left := 27;\r\n btnSpeichern.Top := 581;\r\n btnSpeichern.Width := 110;\r\n btnSpeichern.Height := 25;\r\n btnSpeichern.Caption := 'speichern';\r\n btnSpeichern.ChildOrder := 4;\r\n btnSpeichern.ElementClassName := 'btn btn-info btn-sm m-1 text-left';\r\n btnSpeichern.ElementFont := efCSS;\r\n btnSpeichern.ElementPosition := epIgnore;\r\n btnSpeichern.HeightStyle := ssAuto;\r\n btnSpeichern.HeightPercent := 100.000000000000000000;\r\n btnSpeichern.WidthStyle := ssAuto;\r\n btnSpeichern.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnSpeichern, Self, 'OnClick', 'btnSpeichernClick');\r\n Container4.SetParentComponent(Self);\r\n Container4.Name := 'Container4';\r\n Container4.Left := -2;\r\n Container4.Top := 141;\r\n Container4.Width := 169;\r\n Container4.Height := 41;\r\n Container4.ElementClassName := 'd-flex m-1';\r\n Container4.HeightStyle := ssAuto;\r\n Container4.WidthStyle := ssAuto;\r\n Container4.ChildOrder := 4;\r\n Container4.ElementFont := efCSS;\r\n Container4.ElementPosition := epIgnore;\r\n dsDateien.SetParentComponent(Self);\r\n dsDateien.Name := 'dsDateien';\r\n dsDateien.AfterApplyUpdates := dsDateienAfterApplyUpdates;\r\n dsDateien.AfterOpen := dsDateienAfterOpen;\r\n dsDateien.AfterPost := dsDateienAfterPost;\r\n dsDateien.EntitySetName := 'DokumenteDateien';\r\n dsDateien.Connection := DM2.XDataWebConnection1;\r\n dsDateien.QueryTop := 1;\r\n dsDateien.Left := 60;\r\n dsDateien.Top := 480;\r\n dsDateienID.SetParentComponent(dsDateien);\r\n dsDateienID.Name := 'dsDateienID';\r\n dsDateienID.FieldName := 'ID';\r\n dsDateienDatumUhrzeit.SetParentComponent(dsDateien);\r\n dsDateienDatumUhrzeit.Name := 'dsDateienDatumUhrzeit';\r\n dsDateienDatumUhrzeit.FieldName := 'DatumUhrzeit';\r\n dsDateienDatumUhrzeit.Required := True;\r\n dsDateienDateiMime.SetParentComponent(dsDateien);\r\n dsDateienDateiMime.Name := 'dsDateienDateiMime';\r\n dsDateienDateiMime.FieldName := 'DateiMime';\r\n dsDateienDateiMime.Size := 50;\r\n dsDateienDateiName.SetParentComponent(dsDateien);\r\n dsDateienDateiName.Name := 'dsDateienDateiName';\r\n dsDateienDateiName.FieldName := 'DateiName';\r\n dsDateienDateiName.Size := 255;\r\n dsDateienDateiGroesse.SetParentComponent(dsDateien);\r\n dsDateienDateiGroesse.Name := 'dsDateienDateiGroesse';\r\n dsDateienDateiGroesse.FieldName := 'DateiGroesse';\r\n dsDateienDateiInhaltText.SetParentComponent(dsDateien);\r\n dsDateienDateiInhaltText.Name := 'dsDateienDateiInhaltText';\r\n dsDateienDateiInhaltText.FieldName := 'DateiInhaltText';\r\n dsDateienDateiInhaltText.Size := 255;\r\n dsDateienDateiInhaltThumb.SetParentComponent(dsDateien);\r\n dsDateienDateiInhaltThumb.Name := 'dsDateienDateiInhaltThumb';\r\n dsDateienDateiInhaltThumb.FieldName := 'DateiInhaltThumb';\r\n dsDateienDateiInhaltThumb.Size := 255;\r\n dsDateienProtokoll.SetParentComponent(dsDateien);\r\n dsDateienProtokoll.Name := 'dsDateienProtokoll';\r\n dsDateienProtokoll.FieldName := 'Protokoll';\r\n dsDateienProtokoll.Size := 255;\r\n dsDateienDateiBetreff.SetParentComponent(dsDateien);\r\n dsDateienDateiBetreff.Name := 'dsDateienDateiBetreff';\r\n dsDateienDateiBetreff.FieldName := 'DateiBetreff';\r\n dsDateienDateiBetreff.Size := 50;\r\n dsDateienKundennummer.SetParentComponent(dsDateien);\r\n dsDateienKundennummer.Name := 'dsDateienKundennummer';\r\n dsDateienKundennummer.FieldName := 'Kundennummer';\r\n dsDateienKundennummer.Size := 13;\r\n dsDateienNummerkomplett.SetParentComponent(dsDateien);\r\n dsDateienNummerkomplett.Name := 'dsDateienNummerkomplett';\r\n dsDateienNummerkomplett.FieldName := 'Nummerkomplett';\r\n dsDateienNummerkomplett.Size := 10;\r\n dsDateienObjektReferenz.SetParentComponent(dsDateien);\r\n dsDateienObjektReferenz.Name := 'dsDateienObjektReferenz';\r\n dsDateienObjektReferenz.FieldName := 'ObjektReferenz';\r\n dsDateienObjektReferenz.Size := 13;\r\n dsDateienFahrzeugID.SetParentComponent(dsDateien);\r\n dsDateienFahrzeugID.Name := 'dsDateienFahrzeugID';\r\n dsDateienFahrzeugID.FieldName := 'FahrzeugID';\r\n finally\r\n MyImage.AfterLoadDFMValues;\r\n lblBetreff.AfterLoadDFMValues;\r\n lblCamera.AfterLoadDFMValues;\r\n WebCamera1.AfterLoadDFMValues;\r\n Container2.AfterLoadDFMValues;\r\n Container1.AfterLoadDFMValues;\r\n btnCameraAus.AfterLoadDFMValues;\r\n btnCameraStart.AfterLoadDFMValues;\r\n Container3.AfterLoadDFMValues;\r\n edtBetreff.AfterLoadDFMValues;\r\n WebFilePicker1.AfterLoadDFMValues;\r\n btnzurueck.AfterLoadDFMValues;\r\n btnSpeichern.AfterLoadDFMValues;\r\n Container4.AfterLoadDFMValues;\r\n dsDateien.AfterLoadDFMValues;\r\n dsDateienID.AfterLoadDFMValues;\r\n dsDateienDatumUhrzeit.AfterLoadDFMValues;\r\n dsDateienDateiMime.AfterLoadDFMValues;\r\n dsDateienDateiName.AfterLoadDFMValues;\r\n dsDateienDateiGroesse.AfterLoadDFMValues;\r\n dsDateienDateiInhaltText.AfterLoadDFMValues;\r\n dsDateienDateiInhaltThumb.AfterLoadDFMValues;\r\n dsDateienProtokoll.AfterLoadDFMValues;\r\n dsDateienDateiBetreff.AfterLoadDFMValues;\r\n dsDateienKundennummer.AfterLoadDFMValues;\r\n dsDateienNummerkomplett.AfterLoadDFMValues;\r\n dsDateienObjektReferenz.AfterLoadDFMValues;\r\n dsDateienFahrzeugID.AfterLoadDFMValues;\r\n end;\r\nend;\r\n\r\nend.\r\n","unit unit_EinzelDatei;\r\n\r\ninterface\r\n\r\nuses\r\n System.SysUtils, System.Classes, JS, Web, WEBLib.Graphics, WEBLib.Controls,\r\n WEBLib.Forms, WEBLib.Dialogs, Vcl.Controls, WEBLib.ExtCtrls, Vcl.StdCtrls,\r\n WEBLib.StdCtrls, Data.DB, XData.Web.JsonDataset, XData.Web.Dataset, DB,\r\n WEBLib.Grids, XData.Web.Client, strutils, WEBLib.DBCtrls, VCL.TMSFNCTypes,\r\n VCL.TMSFNCUtils, VCL.TMSFNCGraphics, VCL.TMSFNCGraphicsTypes,\r\n VCL.TMSFNCCustomControl;\r\n\r\ntype\r\n TEinzelDatei = class(TForm)\r\n Container1: THTMLContainer;\r\n Container2: THTMLContainer;\r\n Container3: THTMLContainer;\r\n btnzurueck: TButton;\r\n TC: TTableControl;\r\n dsEinzelDatei: TXDataWebDataSet;\r\n dsEinzelDateiID: TIntegerField;\r\n dsEinzelDateiDatumUhrzeit: TDateTimeField;\r\n dsEinzelDateiDateiMime: TStringField;\r\n dsEinzelDateiDateiName: TStringField;\r\n dsEinzelDateiDateiGroesse: TIntegerField;\r\n dsEinzelDateiDateiInhaltText: TStringField;\r\n dsEinzelDateiDateiInhaltThumb: TStringField;\r\n dsEinzelDateiProtokoll: TStringField;\r\n dsEinzelDateiDateiBetreff: TStringField;\r\n dsEinzelDateiKundennummer: TStringField;\r\n dsEinzelDateiNummerkomplett: TStringField;\r\n dsEinzelDateiObjektReferenz: TStringField;\r\n dsEinzelDateiFahrzeugID: TIntegerField;\r\n WebImageControl1: TImageControl;\r\n btnDateiLoeschen: TButton;\r\n MSGLOESCHEN: TMessageDlg;\r\n xdsProtokolleLoeschungen: TXDataWebDataSet;\r\n xdsProtokolleLoeschungenID: TStringField;\r\n xdsProtokolleLoeschungenDatum: TDateTimeField;\r\n xdsProtokolleLoeschungenBenutzer: TStringField;\r\n xdsProtokolleLoeschungenBelegart: TStringField;\r\n xdsProtokolleLoeschungenBelegnummer: TStringField;\r\n xdsProtokolleLoeschungenProtokoll: TStringField;\r\n procedure WebFormShow(Sender: TObject);\r\n procedure WebFormClose(Sender: TObject; var Action: TCloseAction);\r\n procedure btnzurueckClick(Sender: TObject);\r\n procedure dsEinzelDateiAfterOpen(DataSet: TDataSet);\r\n procedure WebImageControl1Click(Sender: TObject);\r\n [async]procedure btnDateiLoeschenClick(Sender: TObject); async;\r\n procedure dsEinzelDateiAfterDelete(DataSet: TDataSet);\r\n procedure dsEinzelDateiAfterApplyUpdates(Sender: TDataSet;\r\n Info: TResolveResults);\r\n procedure dsEinzelDateiBeforeDelete(DataSet: TDataSet);\r\n procedure xdsProtokolleLoeschungenAfterPost(DataSet: TDataSet);\r\n private\r\n { Private-Deklarationen }\r\n public\r\n { Public-Deklarationen }\r\n EinzeldateiID:string;\r\n Funktion:string;\r\n SL:TStringList;\r\n protected procedure LoadDFMValues; override; end;\r\n\r\nvar\r\n EinzelDatei: TEinzelDatei;\r\n\r\nimplementation\r\n uses unit1, unit2;\r\n{$R *.dfm}\r\n\r\n\r\n\r\nprocedure TEinzelDatei.btnDateiLoeschenClick(Sender: TObject);\r\nvar\r\n mr: TModalResult;\r\nbegin\r\n mr := await(TModalResult, Msgloeschen.ShowDialog('Das Löschen einer Datei kann nicht rückgängig gemacht werden.Wollen Sie die Datei wirklich löschen?', WEBLib.Dialogs.mtConfirmation,[mbYes, mbNo]));\r\n if mr = mrYes then dsEinzelDatei.Delete;\r\nend;\r\n\r\nprocedure TEinzelDatei.btnzurueckClick(Sender: TObject);\r\nbegin\r\n self.close;\r\nend;\r\n\r\nprocedure TEinzelDatei.dsEinzelDateiAfterApplyUpdates(Sender: TDataSet;\r\n Info: TResolveResults);\r\nbegin\r\n self.close;\r\nend;\r\n\r\nprocedure TEinzelDatei.dsEinzelDateiAfterDelete(DataSet: TDataSet);\r\nbegin\r\n dsEinzelDatei.ApplyUpdates;\r\nend;\r\n\r\nprocedure TEinzelDatei.dsEinzelDateiAfterOpen(DataSet: TDataSet);\r\nvar\r\n myelement:TJSHTMLElement;\r\n mytext:string;\r\n myencoded:string;\r\n mydecoded:string;\r\nbegin\r\n Container1.html.text:='';\r\n myelement:=container1.ElementHandle;\r\n btnzurueck.ParentElement:=myelement;\r\n btnDateiLoeschen.ParentElement:=myelement;\r\n container2.ParentElement:=myelement;\r\n myelement:=container2.ElementHandle;\r\n tc.ParentElement:=myelement;\r\n\r\n container3.parentelement:=myelement;\r\n myelement:=container3.ElementHandle;\r\n WebImageControl1.parentelement:=myelement;\r\n webimagecontrol1.autosize:=false;\r\n webimagecontrol1.visible:=false;\r\n\r\n TC.RowHeader:=false;\r\n TC.Visible:=true;\r\n TC.RowCount:=3;\r\n TC.colcount:=1;\r\n mytext:='';\r\n mytext:=mytext+'ID: '+dseinzeldateiid.asstring;\r\n mytext:=mytext+'
Datei: '+dseinzeldateiDateiName.asstring+'';\r\n mytext:=mytext+'
vom: '+formatdatetime('DD.MM.YYYY hh:mm:ss',dseinzeldateiDatumUhrzeit.asdatetime)+'';\r\n mytext:=mytext+'
Betreff: '+dseinzeldateiDateiBetreff.asstring+'';\r\n //mytext:=mytext+'
DateiMime: '+dseinzeldateiDateiMime.asstring;\r\n mytext:=mytext+'
DateiGroesse: '+dseinzeldateiDateiGroesse.asstring;\r\n if dseinzeldateiKundennummer.asstring<>'' then mytext:=mytext+'
Kundennummer: '+dseinzeldateiKundennummer.asstring+'';\r\n if dseinzeldateiNummerkomplett.asstring<>'' then mytext:=mytext+'
Belegnummer: '+dseinzeldateiNummerkomplett.asstring+'';\r\n if dseinzeldateiObjektreferenz.asstring<>'' then mytext:=mytext+'
Objekt: '+dseinzeldateiObjektreferenz.asstring+'';\r\n if (dseinzeldateiFahrzeugID.asstring<>'') AND (dseinzeldateiFahrzeugID.asstring<>'0') then mytext:=mytext+'
Fahrzeug: '+dseinzeldateiFahrzeugID.asstring+'';\r\n\r\n TC.Cells[0,0]:= mytext;\r\n if (lowercase(dseinzeldateidateimime.asstring)='.png') OR (lowercase(dseinzeldateidateimime.asstring)='image/png') then\r\n begin\r\n webimagecontrol1.visible:=true;\r\n WebImageControl1.URL := dsEinzelDateiDateiInhaltText.asstring;\r\n end;\r\n if (lowercase(dseinzeldateidateimime.asstring)='.jpg') OR (lowercase(dseinzeldateidateimime.asstring)='image/jpeg') then\r\n begin\r\n webimagecontrol1.visible:=true;\r\n WebImageControl1.URL := dsEinzelDateiDateiInhaltText.asstring;\r\n end;\r\n if (lowercase(dseinzeldateidateimime.asstring)='.bmp') OR (lowercase(dseinzeldateidateimime.asstring)='image/jpeg') then\r\n begin\r\n webimagecontrol1.visible:=true;\r\n WebImageControl1.URL := dsEinzelDateiDateiInhaltText.asstring;\r\n end;\r\n\r\n if lowercase(dseinzeldateidateimime.asstring)='.txt' then\r\n begin\r\n SL:=TStringList.Create;\r\n SL.delimiter:=',';\r\n SL.StrictDelimiter:=true;\r\n SL.delimitedtext:=dsEinzelDateiDateiInhaltText.asstring;\r\n myencoded:=sl[1];\r\n sl.free;\r\n mydecoded:=web.window.atob(myencoded);\r\n mydecoded:=ReplaceStr(mydecoded,#13+#10,'
');\r\n TC.Cells[0,1]:= mydecoded;\r\n end;\r\n\r\nend;\r\n\r\nprocedure TEinzelDatei.dsEinzelDateiBeforeDelete(DataSet: TDataSet);\r\nbegin\r\n xdsProtokolleLoeschungen.Append;\r\n xdsProtokolleLoeschungenDatum.AsDateTime:=date+time;\r\n xdsProtokolleLoeschungenBenutzer.AsString:=BenutzerSchreibzeichen;\r\n xdsProtokolleLoeschungenBelegart.AsString:='Datei via CadiaWeb';\r\n xdsProtokolleLoeschungenBelegnummer.AsString:=dsEinzelDateiID.AsString;\r\n xdsProtokolleLoeschungenProtokoll.AsString:=dsEinzelDateiDateiName.AsString;\r\n xdsProtokolleLoeschungen.Post;\r\nend;\r\n\r\nprocedure TEinzelDatei.WebFormClose(Sender: TObject; var Action: TCloseAction);\r\nbegin\r\n action:=cafree;\r\nend;\r\n\r\nprocedure TEinzelDatei.WebFormShow(Sender: TObject);\r\nbegin\r\n xdsProtokolleLoeschungen.Load;\r\n dsEinzelDatei.Close;\r\n dsEinzeldatei.QueryString:='$filter=ID eq '+EinzeldateiID;\r\n dsEinzeldatei.Load;\r\nend;\r\n\r\nprocedure TEinzelDatei.WebImageControl1Click(Sender: TObject);\r\nbegin\r\n webimagecontrol1.AutoSize:=true;\r\nend;\r\n\r\nprocedure TEinzelDatei.xdsProtokolleLoeschungenAfterPost(DataSet: TDataSet);\r\nbegin\r\n xdsprotokolleloeschungen.ApplyUpdates;\r\nend;\r\n\r\nprocedure TEinzelDatei.LoadDFMValues;\r\nbegin\r\n inherited LoadDFMValues;\r\n\r\n WebImageControl1 := TImageControl.Create(Self);\r\n Container1 := THTMLContainer.Create(Self);\r\n Container2 := THTMLContainer.Create(Self);\r\n Container3 := THTMLContainer.Create(Self);\r\n btnzurueck := TButton.Create(Self);\r\n TC := TTableControl.Create(Self);\r\n btnDateiLoeschen := TButton.Create(Self);\r\n MSGLOESCHEN := TMessageDlg.Create(Self);\r\n dsEinzelDatei := TXDataWebDataSet.Create(Self);\r\n dsEinzelDateiID := TIntegerField.Create(Self);\r\n dsEinzelDateiDatumUhrzeit := TDateTimeField.Create(Self);\r\n dsEinzelDateiDateiMime := TStringField.Create(Self);\r\n dsEinzelDateiDateiName := TStringField.Create(Self);\r\n dsEinzelDateiDateiGroesse := TIntegerField.Create(Self);\r\n dsEinzelDateiDateiInhaltText := TStringField.Create(Self);\r\n dsEinzelDateiDateiInhaltThumb := TStringField.Create(Self);\r\n dsEinzelDateiProtokoll := TStringField.Create(Self);\r\n dsEinzelDateiDateiBetreff := TStringField.Create(Self);\r\n dsEinzelDateiKundennummer := TStringField.Create(Self);\r\n dsEinzelDateiNummerkomplett := TStringField.Create(Self);\r\n dsEinzelDateiObjektReferenz := TStringField.Create(Self);\r\n dsEinzelDateiFahrzeugID := TIntegerField.Create(Self);\r\n xdsProtokolleLoeschungen := TXDataWebDataSet.Create(Self);\r\n xdsProtokolleLoeschungenID := TStringField.Create(Self);\r\n xdsProtokolleLoeschungenDatum := TDateTimeField.Create(Self);\r\n xdsProtokolleLoeschungenBenutzer := TStringField.Create(Self);\r\n xdsProtokolleLoeschungenBelegart := TStringField.Create(Self);\r\n xdsProtokolleLoeschungenBelegnummer := TStringField.Create(Self);\r\n xdsProtokolleLoeschungenProtokoll := TStringField.Create(Self);\r\n\r\n WebImageControl1.BeforeLoadDFMValues;\r\n Container1.BeforeLoadDFMValues;\r\n Container2.BeforeLoadDFMValues;\r\n Container3.BeforeLoadDFMValues;\r\n btnzurueck.BeforeLoadDFMValues;\r\n TC.BeforeLoadDFMValues;\r\n btnDateiLoeschen.BeforeLoadDFMValues;\r\n MSGLOESCHEN.BeforeLoadDFMValues;\r\n dsEinzelDatei.BeforeLoadDFMValues;\r\n dsEinzelDateiID.BeforeLoadDFMValues;\r\n dsEinzelDateiDatumUhrzeit.BeforeLoadDFMValues;\r\n dsEinzelDateiDateiMime.BeforeLoadDFMValues;\r\n dsEinzelDateiDateiName.BeforeLoadDFMValues;\r\n dsEinzelDateiDateiGroesse.BeforeLoadDFMValues;\r\n dsEinzelDateiDateiInhaltText.BeforeLoadDFMValues;\r\n dsEinzelDateiDateiInhaltThumb.BeforeLoadDFMValues;\r\n dsEinzelDateiProtokoll.BeforeLoadDFMValues;\r\n dsEinzelDateiDateiBetreff.BeforeLoadDFMValues;\r\n dsEinzelDateiKundennummer.BeforeLoadDFMValues;\r\n dsEinzelDateiNummerkomplett.BeforeLoadDFMValues;\r\n dsEinzelDateiObjektReferenz.BeforeLoadDFMValues;\r\n dsEinzelDateiFahrzeugID.BeforeLoadDFMValues;\r\n xdsProtokolleLoeschungen.BeforeLoadDFMValues;\r\n xdsProtokolleLoeschungenID.BeforeLoadDFMValues;\r\n xdsProtokolleLoeschungenDatum.BeforeLoadDFMValues;\r\n xdsProtokolleLoeschungenBenutzer.BeforeLoadDFMValues;\r\n xdsProtokolleLoeschungenBelegart.BeforeLoadDFMValues;\r\n xdsProtokolleLoeschungenBelegnummer.BeforeLoadDFMValues;\r\n xdsProtokolleLoeschungenProtokoll.BeforeLoadDFMValues;\r\n try\r\n Name := 'EinzelDatei';\r\n Width := 260;\r\n Height := 617;\r\n CSSLibrary := cssBootstrap;\r\n ElementFont := efCSS;\r\n SetEvent(Self, 'OnClose', 'WebFormClose');\r\n SetEvent(Self, 'OnShow', 'WebFormShow');\r\n WebImageControl1.SetParentComponent(Self);\r\n WebImageControl1.Name := 'WebImageControl1';\r\n WebImageControl1.Left := 32;\r\n WebImageControl1.Top := 296;\r\n WebImageControl1.Width := 100;\r\n WebImageControl1.Height := 41;\r\n WebImageControl1.HeightStyle := ssAuto;\r\n WebImageControl1.WidthStyle := ssAuto;\r\n WebImageControl1.HeightPercent := 100.000000000000000000;\r\n WebImageControl1.WidthPercent := 100.000000000000000000;\r\n WebImageControl1.ChildOrder := 6;\r\n WebImageControl1.ElementPosition := epIgnore;\r\n SetEvent(WebImageControl1, Self, 'OnClick', 'WebImageControl1Click');\r\n Container1.SetParentComponent(Self);\r\n Container1.Name := 'Container1';\r\n Container1.Left := 0;\r\n Container1.Top := 0;\r\n Container1.Width := 169;\r\n Container1.Height := 41;\r\n Container1.HeightStyle := ssAuto;\r\n Container1.WidthStyle := ssPercent;\r\n Container1.ChildOrder := 1;\r\n Container1.ElementFont := efCSS;\r\n Container1.ElementPosition := epIgnore;\r\n Container2.SetParentComponent(Self);\r\n Container2.Name := 'Container2';\r\n Container2.Left := 0;\r\n Container2.Top := 47;\r\n Container2.Width := 169;\r\n Container2.Height := 41;\r\n Container2.ElementClassName := 'd-flex flex-wrap m-1';\r\n Container2.HeightStyle := ssAuto;\r\n Container2.WidthStyle := ssAuto;\r\n Container2.ChildOrder := 2;\r\n Container2.ElementFont := efCSS;\r\n Container2.ElementPosition := epIgnore;\r\n Container3.SetParentComponent(Self);\r\n Container3.Name := 'Container3';\r\n Container3.Left := 0;\r\n Container3.Top := 94;\r\n Container3.Width := 169;\r\n Container3.Height := 41;\r\n Container3.ElementClassName := 'd-flex flex-wrap m-1';\r\n Container3.HeightStyle := ssAuto;\r\n Container3.WidthStyle := ssAuto;\r\n Container3.ChildOrder := 3;\r\n Container3.ElementFont := efCSS;\r\n Container3.ElementPosition := epIgnore;\r\n btnzurueck.SetParentComponent(Self);\r\n btnzurueck.Name := 'btnzurueck';\r\n btnzurueck.Left := 0;\r\n btnzurueck.Top := 156;\r\n btnzurueck.Width := 96;\r\n btnzurueck.Height := 25;\r\n btnzurueck.Caption := '<< zur'#252'ck';\r\n btnzurueck.ChildOrder := 4;\r\n btnzurueck.ElementClassName := 'btn btn-info btn-sm m-1 text-left';\r\n btnzurueck.ElementFont := efCSS;\r\n btnzurueck.ElementPosition := epIgnore;\r\n btnzurueck.HeightStyle := ssAuto;\r\n btnzurueck.HeightPercent := 100.000000000000000000;\r\n btnzurueck.WidthStyle := ssAuto;\r\n btnzurueck.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnzurueck, Self, 'OnClick', 'btnzurueckClick');\r\n TC.SetParentComponent(Self);\r\n TC.Name := 'TC';\r\n TC.Left := -1;\r\n TC.Top := 191;\r\n TC.Width := 247;\r\n TC.Height := 91;\r\n TC.ElementClassName := 'table table-bordered border-primary';\r\n TC.HeightStyle := ssAuto;\r\n TC.WidthStyle := ssPercent;\r\n TC.BorderColor := clSilver;\r\n TC.ChildOrder := 3;\r\n TC.ColHeader := False;\r\n TC.ElementFont := efCSS;\r\n TC.ElementHeaderClassName := 'thead-light';\r\n TC.ElementPosition := epIgnore;\r\n TC.ElementTableClassName := 'table table-striped table-bordered table-hover';\r\n TC.WordWrap := True;\r\n TC.ColCount := 1;\r\n btnDateiLoeschen.SetParentComponent(Self);\r\n btnDateiLoeschen.Name := 'btnDateiLoeschen';\r\n btnDateiLoeschen.Left := 8;\r\n btnDateiLoeschen.Top := 380;\r\n btnDateiLoeschen.Width := 96;\r\n btnDateiLoeschen.Height := 25;\r\n btnDateiLoeschen.Caption := 'Datei l'#246'schen';\r\n btnDateiLoeschen.ChildOrder := 4;\r\n btnDateiLoeschen.ElementClassName := 'btn btn-info btn-sm m-1 text-left';\r\n btnDateiLoeschen.ElementFont := efCSS;\r\n btnDateiLoeschen.ElementPosition := epIgnore;\r\n btnDateiLoeschen.HeightStyle := ssAuto;\r\n btnDateiLoeschen.HeightPercent := 100.000000000000000000;\r\n btnDateiLoeschen.WidthStyle := ssAuto;\r\n btnDateiLoeschen.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnDateiLoeschen, Self, 'OnClick', 'btnDateiLoeschenClick');\r\n MSGLOESCHEN.SetParentComponent(Self);\r\n MSGLOESCHEN.Name := 'MSGLOESCHEN';\r\n MSGLOESCHEN.Left := 136;\r\n MSGLOESCHEN.Top := 416;\r\n MSGLOESCHEN.Width := 24;\r\n MSGLOESCHEN.Height := 24;\r\n MSGLOESCHEN.HeightStyle := ssAuto;\r\n MSGLOESCHEN.WidthStyle := ssAuto;\r\n MSGLOESCHEN.Buttons := [mbYes,mbNo];\r\n MSGLOESCHEN.DialogType := mtConfirmation;\r\n MSGLOESCHEN.Message := 'Das L'#246'schen einer Datei kann nicht r'#252'ckg'#228'ngig gemacht werden.Wollen Sie die Datei wirklich l'#246'schen?';\r\n MSGLOESCHEN.Opacity := 0.200000000000000000;\r\n MSGLOESCHEN.ElementButtonClassName := 'btn';\r\n MSGLOESCHEN.ElementDialogClassName := 'shadow-lg p-3 mb-5 bg-white rounded';\r\n MSGLOESCHEN.ElementTitleClassName := 'text-body';\r\n MSGLOESCHEN.ElementContentClassName := 'text-body';\r\n dsEinzelDatei.SetParentComponent(Self);\r\n dsEinzelDatei.Name := 'dsEinzelDatei';\r\n dsEinzelDatei.AfterApplyUpdates := dsEinzelDateiAfterApplyUpdates;\r\n dsEinzelDatei.AfterOpen := dsEinzelDateiAfterOpen;\r\n dsEinzelDatei.BeforeDelete := dsEinzelDateiBeforeDelete;\r\n dsEinzelDatei.AfterDelete := dsEinzelDateiAfterDelete;\r\n dsEinzelDatei.EntitySetName := 'DokumenteDateien';\r\n dsEinzelDatei.Connection := DM2.XDataWebConnection1;\r\n dsEinzelDatei.QueryTop := 1;\r\n dsEinzelDatei.Left := 112;\r\n dsEinzelDatei.Top := 312;\r\n dsEinzelDateiID.SetParentComponent(dsEinzelDatei);\r\n dsEinzelDateiID.Name := 'dsEinzelDateiID';\r\n dsEinzelDateiID.FieldName := 'ID';\r\n dsEinzelDateiID.Required := True;\r\n dsEinzelDateiDatumUhrzeit.SetParentComponent(dsEinzelDatei);\r\n dsEinzelDateiDatumUhrzeit.Name := 'dsEinzelDateiDatumUhrzeit';\r\n dsEinzelDateiDatumUhrzeit.FieldName := 'DatumUhrzeit';\r\n dsEinzelDateiDatumUhrzeit.Required := True;\r\n dsEinzelDateiDateiMime.SetParentComponent(dsEinzelDatei);\r\n dsEinzelDateiDateiMime.Name := 'dsEinzelDateiDateiMime';\r\n dsEinzelDateiDateiMime.FieldName := 'DateiMime';\r\n dsEinzelDateiDateiMime.Size := 50;\r\n dsEinzelDateiDateiName.SetParentComponent(dsEinzelDatei);\r\n dsEinzelDateiDateiName.Name := 'dsEinzelDateiDateiName';\r\n dsEinzelDateiDateiName.FieldName := 'DateiName';\r\n dsEinzelDateiDateiName.Size := 255;\r\n dsEinzelDateiDateiGroesse.SetParentComponent(dsEinzelDatei);\r\n dsEinzelDateiDateiGroesse.Name := 'dsEinzelDateiDateiGroesse';\r\n dsEinzelDateiDateiGroesse.FieldName := 'DateiGroesse';\r\n dsEinzelDateiDateiInhaltText.SetParentComponent(dsEinzelDatei);\r\n dsEinzelDateiDateiInhaltText.Name := 'dsEinzelDateiDateiInhaltText';\r\n dsEinzelDateiDateiInhaltText.FieldName := 'DateiInhaltText';\r\n dsEinzelDateiDateiInhaltText.Size := 255;\r\n dsEinzelDateiDateiInhaltThumb.SetParentComponent(dsEinzelDatei);\r\n dsEinzelDateiDateiInhaltThumb.Name := 'dsEinzelDateiDateiInhaltThumb';\r\n dsEinzelDateiDateiInhaltThumb.FieldName := 'DateiInhaltThumb';\r\n dsEinzelDateiDateiInhaltThumb.Size := 255;\r\n dsEinzelDateiProtokoll.SetParentComponent(dsEinzelDatei);\r\n dsEinzelDateiProtokoll.Name := 'dsEinzelDateiProtokoll';\r\n dsEinzelDateiProtokoll.FieldName := 'Protokoll';\r\n dsEinzelDateiProtokoll.Size := 255;\r\n dsEinzelDateiDateiBetreff.SetParentComponent(dsEinzelDatei);\r\n dsEinzelDateiDateiBetreff.Name := 'dsEinzelDateiDateiBetreff';\r\n dsEinzelDateiDateiBetreff.FieldName := 'DateiBetreff';\r\n dsEinzelDateiDateiBetreff.Size := 50;\r\n dsEinzelDateiKundennummer.SetParentComponent(dsEinzelDatei);\r\n dsEinzelDateiKundennummer.Name := 'dsEinzelDateiKundennummer';\r\n dsEinzelDateiKundennummer.FieldName := 'Kundennummer';\r\n dsEinzelDateiKundennummer.Size := 13;\r\n dsEinzelDateiNummerkomplett.SetParentComponent(dsEinzelDatei);\r\n dsEinzelDateiNummerkomplett.Name := 'dsEinzelDateiNummerkomplett';\r\n dsEinzelDateiNummerkomplett.FieldName := 'Nummerkomplett';\r\n dsEinzelDateiNummerkomplett.Size := 10;\r\n dsEinzelDateiObjektReferenz.SetParentComponent(dsEinzelDatei);\r\n dsEinzelDateiObjektReferenz.Name := 'dsEinzelDateiObjektReferenz';\r\n dsEinzelDateiObjektReferenz.FieldName := 'ObjektReferenz';\r\n dsEinzelDateiObjektReferenz.Size := 13;\r\n dsEinzelDateiFahrzeugID.SetParentComponent(dsEinzelDatei);\r\n dsEinzelDateiFahrzeugID.Name := 'dsEinzelDateiFahrzeugID';\r\n dsEinzelDateiFahrzeugID.FieldName := 'FahrzeugID';\r\n xdsProtokolleLoeschungen.SetParentComponent(Self);\r\n xdsProtokolleLoeschungen.Name := 'xdsProtokolleLoeschungen';\r\n xdsProtokolleLoeschungen.AfterPost := xdsProtokolleLoeschungenAfterPost;\r\n xdsProtokolleLoeschungen.EntitySetName := 'ProtokolleLoeschungen';\r\n xdsProtokolleLoeschungen.Connection := DM2.XDataWebConnection1;\r\n xdsProtokolleLoeschungen.QueryTop := 1;\r\n xdsProtokolleLoeschungen.Left := 104;\r\n xdsProtokolleLoeschungen.Top := 472;\r\n xdsProtokolleLoeschungenID.SetParentComponent(xdsProtokolleLoeschungen);\r\n xdsProtokolleLoeschungenID.Name := 'xdsProtokolleLoeschungenID';\r\n xdsProtokolleLoeschungenID.FieldName := 'ID';\r\n xdsProtokolleLoeschungenID.Required := True;\r\n xdsProtokolleLoeschungenID.Size := 38;\r\n xdsProtokolleLoeschungenDatum.SetParentComponent(xdsProtokolleLoeschungen);\r\n xdsProtokolleLoeschungenDatum.Name := 'xdsProtokolleLoeschungenDatum';\r\n xdsProtokolleLoeschungenDatum.FieldName := 'Datum';\r\n xdsProtokolleLoeschungenBenutzer.SetParentComponent(xdsProtokolleLoeschungen);\r\n xdsProtokolleLoeschungenBenutzer.Name := 'xdsProtokolleLoeschungenBenutzer';\r\n xdsProtokolleLoeschungenBenutzer.FieldName := 'Benutzer';\r\n xdsProtokolleLoeschungenBenutzer.Size := 50;\r\n xdsProtokolleLoeschungenBelegart.SetParentComponent(xdsProtokolleLoeschungen);\r\n xdsProtokolleLoeschungenBelegart.Name := 'xdsProtokolleLoeschungenBelegart';\r\n xdsProtokolleLoeschungenBelegart.FieldName := 'Belegart';\r\n xdsProtokolleLoeschungenBelegart.Size := 50;\r\n xdsProtokolleLoeschungenBelegnummer.SetParentComponent(xdsProtokolleLoeschungen);\r\n xdsProtokolleLoeschungenBelegnummer.Name := 'xdsProtokolleLoeschungenBelegnummer';\r\n xdsProtokolleLoeschungenBelegnummer.FieldName := 'Belegnummer';\r\n xdsProtokolleLoeschungenBelegnummer.Size := 25;\r\n xdsProtokolleLoeschungenProtokoll.SetParentComponent(xdsProtokolleLoeschungen);\r\n xdsProtokolleLoeschungenProtokoll.Name := 'xdsProtokolleLoeschungenProtokoll';\r\n xdsProtokolleLoeschungenProtokoll.FieldName := 'Protokoll';\r\n xdsProtokolleLoeschungenProtokoll.Size := 255;\r\n finally\r\n WebImageControl1.AfterLoadDFMValues;\r\n Container1.AfterLoadDFMValues;\r\n Container2.AfterLoadDFMValues;\r\n Container3.AfterLoadDFMValues;\r\n btnzurueck.AfterLoadDFMValues;\r\n TC.AfterLoadDFMValues;\r\n btnDateiLoeschen.AfterLoadDFMValues;\r\n MSGLOESCHEN.AfterLoadDFMValues;\r\n dsEinzelDatei.AfterLoadDFMValues;\r\n dsEinzelDateiID.AfterLoadDFMValues;\r\n dsEinzelDateiDatumUhrzeit.AfterLoadDFMValues;\r\n dsEinzelDateiDateiMime.AfterLoadDFMValues;\r\n dsEinzelDateiDateiName.AfterLoadDFMValues;\r\n dsEinzelDateiDateiGroesse.AfterLoadDFMValues;\r\n dsEinzelDateiDateiInhaltText.AfterLoadDFMValues;\r\n dsEinzelDateiDateiInhaltThumb.AfterLoadDFMValues;\r\n dsEinzelDateiProtokoll.AfterLoadDFMValues;\r\n dsEinzelDateiDateiBetreff.AfterLoadDFMValues;\r\n dsEinzelDateiKundennummer.AfterLoadDFMValues;\r\n dsEinzelDateiNummerkomplett.AfterLoadDFMValues;\r\n dsEinzelDateiObjektReferenz.AfterLoadDFMValues;\r\n dsEinzelDateiFahrzeugID.AfterLoadDFMValues;\r\n xdsProtokolleLoeschungen.AfterLoadDFMValues;\r\n xdsProtokolleLoeschungenID.AfterLoadDFMValues;\r\n xdsProtokolleLoeschungenDatum.AfterLoadDFMValues;\r\n xdsProtokolleLoeschungenBenutzer.AfterLoadDFMValues;\r\n xdsProtokolleLoeschungenBelegart.AfterLoadDFMValues;\r\n xdsProtokolleLoeschungenBelegnummer.AfterLoadDFMValues;\r\n xdsProtokolleLoeschungenProtokoll.AfterLoadDFMValues;\r\n end;\r\nend;\r\n\r\nend.\r\n","unit unit_Dateien;\r\n\r\ninterface\r\n\r\nuses\r\n System.SysUtils, System.Classes, JS, Web, WEBLib.Graphics, WEBLib.Controls,\r\n WEBLib.Forms, WEBLib.Dialogs, WEBLib.Buttons, Vcl.Controls, Vcl.StdCtrls,\r\n WEBLib.StdCtrls, WEBLib.ExtCtrls, Data.DB, XData.Web.JsonDataset, strutils,\r\n XData.Web.Dataset, WEBLib.Grids, WEBLib.DBCtrls, WEBLib.DB, WEBLib.WebCtrls,\r\n XData.Web.Client;\r\n\r\ntype\r\n TfrmDateien = class(TForm)\r\n dsDateien: TXDataWebDataSet;\r\n sourceDateien: TDataSource;\r\n Container1: THTMLContainer;\r\n Container2: THTMLContainer;\r\n Container3: THTMLContainer;\r\n btnzurueck: TButton;\r\n dsDateienID: TIntegerField;\r\n dsDateienDatumUhrzeit: TDateTimeField;\r\n dsDateienDateiMime: TStringField;\r\n dsDateienDateiName: TStringField;\r\n dsDateienDateiGroesse: TIntegerField;\r\n dsDateienDateiInhaltThumb: TStringField;\r\n dsDateienProtokoll: TStringField;\r\n dsDateienDateiBetreff: TStringField;\r\n dsDateienKundennummer: TStringField;\r\n dsDateienNummerkomplett: TStringField;\r\n dsDateienObjektReferenz: TStringField;\r\n dsDateienFahrzeugID: TIntegerField;\r\n btnNeu: TButton;\r\n btnFoto: TButton;\r\n WClient: TXDataWebClient;\r\n MSGLOESCHEN: TMessageDlg;\r\n xdsProtokolleLoeschungen: TXDataWebDataSet;\r\n xdsProtokolleLoeschungenID: TStringField;\r\n xdsProtokolleLoeschungenDatum: TDateTimeField;\r\n xdsProtokolleLoeschungenBenutzer: TStringField;\r\n xdsProtokolleLoeschungenBelegart: TStringField;\r\n xdsProtokolleLoeschungenBelegnummer: TStringField;\r\n xdsProtokolleLoeschungenProtokoll: TStringField;\r\n procedure WebFormShow(Sender: TObject);\r\n procedure dsDateienAfterOpen(DataSet: TDataSet);\r\n procedure btnzurueckClick(Sender: TObject);\r\n procedure btnNeuClick(Sender: TObject);\r\n procedure btnFotoClick(Sender: TObject);\r\n procedure dsDateienAfterDelete(DataSet: TDataSet);\r\n procedure dsDateienAfterApplyUpdates(Sender: TDataSet;\r\n Info: TResolveResults);\r\n procedure dsDateienBeforeDelete(DataSet: TDataSet);\r\n procedure xdsProtokolleLoeschungenAfterPost(DataSet: TDataSet);\r\n private\r\n { Private-Deklarationen }\r\n public\r\n { Public-Deklarationen }\r\n MerkerArt:string;\r\n MerkerNummerkomplett:string;\r\n MerkerObjektreferenz:string;\r\n MerkerFahrzeugID:string;\r\n MerkerKundennummer:string;\r\n MerkerName:string;\r\n HeadlineText:string;\r\n EinzelCard:THTMLDiv;\r\n btnDateiLoeschen:TButton;\r\n procedure EinzelCardclick(Sender:TObject);\r\n procedure openeinzeldateiform(id:string);\r\n [async] procedure btnDateiLoeschenClick(Sender:TObject); async;\r\n protected procedure LoadDFMValues; override; end;\r\n\r\nvar\r\n frmDateien: TfrmDateien;\r\n\r\nimplementation\r\n uses unit1, unit2, unit_GetPhoto, unit_Einzeldatei;\r\n{$R *.dfm}\r\n\r\nprocedure TfrmDateien.btnDateiLoeschenClick(Sender: TObject);\r\n\r\n //myPositionsID:=inttostr((sender as TWebButton).tag);\r\n //myArtikelnummer:=(sender as TWebButton).Hint;\r\nvar\r\n mr: TModalResult;\r\n myEinzeldateiID:string;\r\n myEinzeldateiName:string;\r\nbegin\r\n myEinzeldateiID:=inttostr((sender as TButton).Tag);\r\n myEinzeldateiName:=(sender as TButton).Hint;\r\n if dsdateien.Locate('Id',myeinzeldateiid,[])=true then\r\n begin\r\n mr := await(TModalResult, Msgloeschen.ShowDialog('Das Löschen einer Datei kann nicht rückgängig gemacht werden. Wollen Sie die Datei \"'+myEinzeldateiName+'\" wirklich löschen?', WEBLib.Dialogs.mtConfirmation,[mbYes, mbNo]));\r\n if mr = mrYes then dsdateien.Delete;\r\n end;\r\nend;\r\n\r\nprocedure TfrmDateien.btnFotoClick(Sender: TObject);\r\nvar\r\n LFrm:TGetPhoto;\r\n myEinzeldateiID:string;\r\nbegin\r\n myEinzeldateiID:='';\r\n Container3.HTML.text:='';\r\n GetPhoto := TGetPhoto.CreateNew(procedure(AForm: TObject)\r\n begin\r\n (AForm as TGetPhoto).PhotoFunktion:='Foto';\r\n (AForm as TGetPhoto).PhotoMerkerNummerkomplett:=MerkerNummerkomplett;\r\n (AForm as TGetPhoto).PhotoMerkerObjektreferenz:=MerkerObjektreferenz;\r\n (AForm as TGetPhoto).PhotoMerkerFahrzeugID:=MerkerFahrzeugID;\r\n (AForm as TGetPhoto).PhotoMerkerKundennummer:=MerkerKundennummer;\r\n end\r\n );\r\n\r\n GetPhoto.ShowModal(procedure(AValue: TModalResult)\r\n begin\r\n dsDateien.close;\r\n dsDateien.Load;\r\n end\r\n );\r\nend;\r\n\r\nprocedure TfrmDateien.btnNeuClick(Sender: TObject);\r\nvar\r\n LFrm:TGetPhoto;\r\n myEinzeldateiID:string;\r\nbegin\r\n myEinzeldateiID:='';\r\n Container3.HTML.text:='';\r\n GetPhoto := TGetPhoto.CreateNew(procedure(AForm: TObject)\r\n begin\r\n (AForm as TGetPhoto).PhotoFunktion:='Datei';\r\n (AForm as TGetPhoto).PhotoMerkerNummerkomplett:=MerkerNummerkomplett;\r\n (AForm as TGetPhoto).PhotoMerkerObjektreferenz:=MerkerObjektreferenz;\r\n (AForm as TGetPhoto).PhotoMerkerFahrzeugID:=MerkerFahrzeugID;\r\n (AForm as TGetPhoto).PhotoMerkerKundennummer:=MerkerKundennummer;\r\n end\r\n );\r\n\r\n GetPhoto.ShowModal(procedure(AValue: TModalResult)\r\n begin\r\n dsDateien.close;\r\n dsDateien.Load;\r\n end\r\n );\r\n\r\nend;\r\n\r\nprocedure TfrmDateien.btnzurueckClick(Sender: TObject);\r\nbegin\r\n dsDateien.Close;\r\n self.close;\r\nend;\r\n\r\n\r\nprocedure TfrmDateien.EinzelCardclick(Sender:TObject);\r\n procedure OnResponse(Response:TXDataClientResponse);\r\n var\r\n mydownload:string;\r\n begin\r\n mydownload:=string(TJSObject(response.Result)['value']);\r\n if mydownload='WRONG' then\r\n begin\r\n showmessage('Download kann nicht bereitgestellt werden');\r\n end\r\n else\r\n begin\r\n application.Navigate(downloadconnection+mydownload,ntblank);\r\n end;\r\n end;\r\nvar\r\n myEinzeldateiID:string;\r\nbegin\r\n myEinzeldateiID:=(sender as THTMLDiv).ElementID;\r\n dsdateien.Locate('Id',myeinzeldateiid,[]);\r\n if lowercase(extractfileext(dsDateienDateiName.AsString))='.pdf' then\r\n begin\r\n WClient.RawInvoke('IServerService.GetDateiFromDokument',[myEinzeldateiID],@OnResponse);\r\n end\r\n else\r\n begin\r\n if lowercase(extractfileext(dsDateienDateiName.AsString))='.zip' then\r\n begin\r\n WClient.RawInvoke('IServerService.GetDateiFromDokument',[myEinzeldateiID],@OnResponse);\r\n end\r\n else\r\n begin\r\n openeinzeldateiform(myEinzeldateiID);\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TfrmDateien.openeinzeldateiform(id:string);\r\nvar\r\n LFrm:TEinzelDatei;\r\n myEinzeldateiID:string;\r\nbegin\r\n myEinzeldateiID:=id;\r\n Container3.HTML.text:='';\r\n EinzelDatei := TEinzelDatei.CreateNew(procedure(AForm: TObject)\r\n begin\r\n (AForm as TEinzelDatei).EinzelDateiID:=myEinzeldateiID;\r\n (AForm as TEinzelDatei).Funktion:='Anzeige';\r\n end\r\n );\r\n\r\n Einzeldatei.ShowModal(procedure(AValue: TModalResult)\r\n begin\r\n dsDateien.close;\r\n dsDateien.Load;\r\n end\r\n );\r\n\r\nend;\r\n\r\nprocedure TfrmDateien.dsDateienAfterApplyUpdates(Sender: TDataSet;\r\n Info: TResolveResults);\r\nbegin\r\n self.close;\r\nend;\r\n\r\nprocedure TfrmDateien.dsDateienAfterDelete(DataSet: TDataSet);\r\nbegin\r\n dsDateien.ApplyUpdates;\r\nend;\r\n\r\nprocedure TfrmDateien.dsDateienAfterOpen(DataSet: TDataSet);\r\nvar\r\n myelement:TJSHTMLElement;\r\n EinzelKarte:string;\r\n MyFileExt:string;\r\nbegin\r\n Container1.html.text:='';\r\n myelement:=Container1.ElementHandle;\r\n btnzurueck.ParentElement:=myelement;\r\n btnneu.ParentElement:=myelement;\r\n btnFoto.ParentElement:=myelement;\r\n Container2.HTML.Text:='';\r\n myelement:=container2.ElementHandle;\r\n\r\n while not dsDateien.eof do\r\n begin\r\n\r\n Einzelkarte:='
'+dsDateienDateiBetreff.AsString+'
';\r\n Einzelkarte:=Einzelkarte+'
Datei: '+trim(dsDateienDateiname.AsString)+'';\r\n Einzelkarte:=Einzelkarte+'
vom: '+formatdatetime('DD.MM.YY hh:mm',dsdateienDatumUhrzeit.Asdatetime)+'';\r\n Einzelkarte:=Einzelkarte+'
Kunde: '+dsDateienKundennummer.AsString+' '+merkername+'';\r\n Einzelkarte:=Einzelkarte+'
Objekt: '+dsDateienObjektReferenz.AsString+'';\r\n Einzelkarte:=Einzelkarte+'
'+Merkerart+': '+dsDateienNummerkomplett.AsString+'';\r\n Einzelkarte:=Einzelkarte+'
';\r\n\r\n myelement:=Container3.ElementHandle;\r\n EinzelCard:=THTMLDiv.Create(self);\r\n EinzelCard.ElementID:=dsDateienID.asstring;\r\n EinzelCard.HeightStyle:=ssauto;\r\n EinzelCard.Width:=400;\r\n EinzelCard.HTML.Text:=Einzelkarte;\r\n EinzelCard.ElementClassName:='card m-1 border-info';\r\n EinzelCard.OnClick:=@EinzelCardClick;\r\n EinzelCard.ParentElement:=myelement;\r\n MyFileExt:=lowercase(extractfileext(dsDateienDateiName.AsString));\r\n if (MyFileExt='.pdf') OR (MyFileExt='.zip') then\r\n begin\r\n myelement:=Einzelcard.ElementHandle;\r\n btnDateiLoeschen:=TButton.Create(self);\r\n btnDateiLoeschen.ElementClassName:='btn btn-info m-1 btn-sm text-left';\r\n btnDateiLoeschen.HeightStyle:=ssauto;\r\n btnDateiLoeschen.WidthStyle:=ssauto;\r\n btnDateiLoeschen.TabStop:=false;\r\n btnDateiLoeschen.tag:=dsDateienID.asinteger;\r\n btnDateiLoeschen.Hint:=trim(dsDateienDateiname.AsString);\r\n btnDateiLoeschen.Caption:='Datei löschen';\r\n btnDateiLoeschen.ElementPosition:=epIgnore;\r\n btnDateiLoeschen.OnClick:=@btnDateiLoeschenClick;\r\n btnDateiLoeschen.ParentElement:=myelement;\r\n end;\r\n dsDateien.Next;\r\n end;\r\n\r\nend;\r\n\r\nprocedure TfrmDateien.dsDateienBeforeDelete(DataSet: TDataSet);\r\nvar\r\n guid:TGUID;\r\n guidstring:string;\r\nbegin\r\n createguid(guid);\r\n guidstring:=guidtostring(guid);\r\n guidstring:=ReplaceStr(guidstring,'{','');\r\n guidstring:=ReplaceStr(guidstring,'}','');\r\n xdsProtokolleLoeschungen.Append;\r\n xdsProtokolleLoeschungenID.asstring:=guidstring;\r\n xdsProtokolleLoeschungenDatum.AsDateTime:=date+time;\r\n xdsProtokolleLoeschungenBenutzer.AsString:=BenutzerSchreibzeichen;\r\n xdsProtokolleLoeschungenBelegart.AsString:='Datei via CadiaWeb';\r\n xdsProtokolleLoeschungenBelegnummer.AsString:=dsDateienID.AsString;\r\n xdsProtokolleLoeschungenProtokoll.AsString:=dsDateienDateiName.AsString;\r\n xdsProtokolleLoeschungen.Post;\r\nend;\r\n\r\nprocedure TfrmDateien.WebFormShow(Sender: TObject);\r\nvar\r\n myselect:string;\r\nbegin\r\n xdsProtokolleLoeschungen.Load;\r\n myselect:='$select=ID,DatumUhrzeit,DateiMime,DateiName,DateiGroesse,DateiInhaltThumb,DateiBetreff,Kundennummer,Nummerkomplett,ObjektReferenz,FahrzeugID';\r\n dsDateien.Close;\r\n if MerkerArt='Auftrag' then dsDateien.QueryString:=myselect+'&$filter=contains(Nummerkomplett, '+QuotedStr(MerkerNummerkomplett)+')';\r\n if MerkerArt='Angebot' then dsDateien.QueryString:=myselect+'&$filter=contains(Nummerkomplett, '+QuotedStr(MerkerNummerkomplett)+')';\r\n if MerkerArt='Kontakt' then dsDateien.QueryString:=myselect+'&$filter=contains(Kundennummer, '+QuotedStr(MerkerKundennummer)+')';\r\n if MerkerArt='Objekt' then dsDateien.QueryString:=myselect+'&$filter=contains(Objektreferenz, '+QuotedStr(MerkerObjektreferenz)+')';\r\n dsDateien.Load;\r\nend;\r\n\r\nprocedure TfrmDateien.xdsProtokolleLoeschungenAfterPost(DataSet: TDataSet);\r\nbegin\r\n xdsProtokolleLoeschungen.ApplyUpdates;\r\nend;\r\n\r\nprocedure TfrmDateien.LoadDFMValues;\r\nbegin\r\n inherited LoadDFMValues;\r\n\r\n Container1 := THTMLContainer.Create(Self);\r\n Container2 := THTMLContainer.Create(Self);\r\n Container3 := THTMLContainer.Create(Self);\r\n btnzurueck := TButton.Create(Self);\r\n btnNeu := TButton.Create(Self);\r\n btnFoto := TButton.Create(Self);\r\n MSGLOESCHEN := TMessageDlg.Create(Self);\r\n dsDateien := TXDataWebDataSet.Create(Self);\r\n dsDateienID := TIntegerField.Create(Self);\r\n dsDateienDatumUhrzeit := TDateTimeField.Create(Self);\r\n dsDateienDateiMime := TStringField.Create(Self);\r\n dsDateienDateiName := TStringField.Create(Self);\r\n dsDateienDateiGroesse := TIntegerField.Create(Self);\r\n dsDateienDateiInhaltThumb := TStringField.Create(Self);\r\n dsDateienProtokoll := TStringField.Create(Self);\r\n dsDateienDateiBetreff := TStringField.Create(Self);\r\n dsDateienKundennummer := TStringField.Create(Self);\r\n dsDateienNummerkomplett := TStringField.Create(Self);\r\n dsDateienObjektReferenz := TStringField.Create(Self);\r\n dsDateienFahrzeugID := TIntegerField.Create(Self);\r\n sourceDateien := TDataSource.Create(Self);\r\n WClient := TXDataWebClient.Create(Self);\r\n xdsProtokolleLoeschungen := TXDataWebDataSet.Create(Self);\r\n xdsProtokolleLoeschungenID := TStringField.Create(Self);\r\n xdsProtokolleLoeschungenDatum := TDateTimeField.Create(Self);\r\n xdsProtokolleLoeschungenBenutzer := TStringField.Create(Self);\r\n xdsProtokolleLoeschungenBelegart := TStringField.Create(Self);\r\n xdsProtokolleLoeschungenBelegnummer := TStringField.Create(Self);\r\n xdsProtokolleLoeschungenProtokoll := TStringField.Create(Self);\r\n\r\n Container1.BeforeLoadDFMValues;\r\n Container2.BeforeLoadDFMValues;\r\n Container3.BeforeLoadDFMValues;\r\n btnzurueck.BeforeLoadDFMValues;\r\n btnNeu.BeforeLoadDFMValues;\r\n btnFoto.BeforeLoadDFMValues;\r\n MSGLOESCHEN.BeforeLoadDFMValues;\r\n dsDateien.BeforeLoadDFMValues;\r\n dsDateienID.BeforeLoadDFMValues;\r\n dsDateienDatumUhrzeit.BeforeLoadDFMValues;\r\n dsDateienDateiMime.BeforeLoadDFMValues;\r\n dsDateienDateiName.BeforeLoadDFMValues;\r\n dsDateienDateiGroesse.BeforeLoadDFMValues;\r\n dsDateienDateiInhaltThumb.BeforeLoadDFMValues;\r\n dsDateienProtokoll.BeforeLoadDFMValues;\r\n dsDateienDateiBetreff.BeforeLoadDFMValues;\r\n dsDateienKundennummer.BeforeLoadDFMValues;\r\n dsDateienNummerkomplett.BeforeLoadDFMValues;\r\n dsDateienObjektReferenz.BeforeLoadDFMValues;\r\n dsDateienFahrzeugID.BeforeLoadDFMValues;\r\n sourceDateien.BeforeLoadDFMValues;\r\n WClient.BeforeLoadDFMValues;\r\n xdsProtokolleLoeschungen.BeforeLoadDFMValues;\r\n xdsProtokolleLoeschungenID.BeforeLoadDFMValues;\r\n xdsProtokolleLoeschungenDatum.BeforeLoadDFMValues;\r\n xdsProtokolleLoeschungenBenutzer.BeforeLoadDFMValues;\r\n xdsProtokolleLoeschungenBelegart.BeforeLoadDFMValues;\r\n xdsProtokolleLoeschungenBelegnummer.BeforeLoadDFMValues;\r\n xdsProtokolleLoeschungenProtokoll.BeforeLoadDFMValues;\r\n try\r\n Name := 'frmDateien';\r\n Width := 222;\r\n Height := 310;\r\n CSSLibrary := cssBootstrap;\r\n ElementFont := efCSS;\r\n Font.Charset := DEFAULT_CHARSET;\r\n Font.Color := clWindowText;\r\n Font.Height := -11;\r\n Font.Name := 'Tahoma';\r\n Font.Style := [];\r\n ParentFont := False;\r\n SetEvent(Self, 'OnShow', 'WebFormShow');\r\n Container1.SetParentComponent(Self);\r\n Container1.Name := 'Container1';\r\n Container1.Left := 0;\r\n Container1.Top := 0;\r\n Container1.Width := 169;\r\n Container1.Height := 41;\r\n Container1.HeightStyle := ssAuto;\r\n Container1.WidthStyle := ssPercent;\r\n Container1.ElementFont := efCSS;\r\n Container1.ElementPosition := epIgnore;\r\n Container2.SetParentComponent(Self);\r\n Container2.Name := 'Container2';\r\n Container2.Left := 0;\r\n Container2.Top := 47;\r\n Container2.Width := 169;\r\n Container2.Height := 41;\r\n Container2.ElementClassName := 'd-flex flex-wrap m-1';\r\n Container2.HeightStyle := ssAuto;\r\n Container2.WidthStyle := ssAuto;\r\n Container2.ChildOrder := 1;\r\n Container2.ElementFont := efCSS;\r\n Container2.ElementPosition := epIgnore;\r\n Container3.SetParentComponent(Self);\r\n Container3.Name := 'Container3';\r\n Container3.Left := 0;\r\n Container3.Top := 94;\r\n Container3.Width := 169;\r\n Container3.Height := 41;\r\n Container3.ElementClassName := 'd-flex flex-wrap m-1';\r\n Container3.HeightStyle := ssAuto;\r\n Container3.WidthStyle := ssAuto;\r\n Container3.ChildOrder := 2;\r\n Container3.ElementFont := efCSS;\r\n Container3.ElementPosition := epIgnore;\r\n btnzurueck.SetParentComponent(Self);\r\n btnzurueck.Name := 'btnzurueck';\r\n btnzurueck.Left := 64;\r\n btnzurueck.Top := 141;\r\n btnzurueck.Width := 110;\r\n btnzurueck.Height := 25;\r\n btnzurueck.Caption := '<< zur'#252'ck';\r\n btnzurueck.ChildOrder := 4;\r\n btnzurueck.ElementClassName := 'btn btn-info m-1 text-left';\r\n btnzurueck.ElementFont := efCSS;\r\n btnzurueck.ElementPosition := epIgnore;\r\n btnzurueck.HeightStyle := ssAuto;\r\n btnzurueck.HeightPercent := 100.000000000000000000;\r\n btnzurueck.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnzurueck, Self, 'OnClick', 'btnzurueckClick');\r\n btnNeu.SetParentComponent(Self);\r\n btnNeu.Name := 'btnNeu';\r\n btnNeu.Left := 64;\r\n btnNeu.Top := 168;\r\n btnNeu.Width := 110;\r\n btnNeu.Height := 25;\r\n btnNeu.Caption := '+ Datei';\r\n btnNeu.ChildOrder := 4;\r\n btnNeu.ElementClassName := 'btn btn-info m-1 text-left';\r\n btnNeu.ElementFont := efCSS;\r\n btnNeu.ElementPosition := epIgnore;\r\n btnNeu.HeightStyle := ssAuto;\r\n btnNeu.HeightPercent := 100.000000000000000000;\r\n btnNeu.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnNeu, Self, 'OnClick', 'btnNeuClick');\r\n btnFoto.SetParentComponent(Self);\r\n btnFoto.Name := 'btnFoto';\r\n btnFoto.Left := 64;\r\n btnFoto.Top := 196;\r\n btnFoto.Width := 110;\r\n btnFoto.Height := 25;\r\n btnFoto.Caption := '+ Foto';\r\n btnFoto.ChildOrder := 4;\r\n btnFoto.ElementClassName := 'btn btn-info m-1 text-left';\r\n btnFoto.ElementFont := efCSS;\r\n btnFoto.ElementPosition := epIgnore;\r\n btnFoto.HeightStyle := ssAuto;\r\n btnFoto.HeightPercent := 100.000000000000000000;\r\n btnFoto.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnFoto, Self, 'OnClick', 'btnFotoClick');\r\n MSGLOESCHEN.SetParentComponent(Self);\r\n MSGLOESCHEN.Name := 'MSGLOESCHEN';\r\n MSGLOESCHEN.Left := 136;\r\n MSGLOESCHEN.Top := 286;\r\n MSGLOESCHEN.Width := 24;\r\n MSGLOESCHEN.Height := 24;\r\n MSGLOESCHEN.HeightStyle := ssAuto;\r\n MSGLOESCHEN.WidthStyle := ssAuto;\r\n MSGLOESCHEN.Buttons := [mbYes,mbNo];\r\n MSGLOESCHEN.DialogType := mtConfirmation;\r\n MSGLOESCHEN.Message := 'Das L'#246'schen einer Datei kann nicht r'#252'ckg'#228'ngig gemacht werden.Wollen Sie die Datei wirklich l'#246'schen?';\r\n MSGLOESCHEN.Opacity := 0.200000000000000000;\r\n MSGLOESCHEN.ElementButtonClassName := 'btn';\r\n MSGLOESCHEN.ElementDialogClassName := 'shadow-lg p-3 mb-5 bg-white rounded';\r\n MSGLOESCHEN.ElementTitleClassName := 'text-body';\r\n MSGLOESCHEN.ElementContentClassName := 'text-body';\r\n dsDateien.SetParentComponent(Self);\r\n dsDateien.Name := 'dsDateien';\r\n dsDateien.AfterApplyUpdates := dsDateienAfterApplyUpdates;\r\n dsDateien.AfterOpen := dsDateienAfterOpen;\r\n dsDateien.BeforeDelete := dsDateienBeforeDelete;\r\n dsDateien.AfterDelete := dsDateienAfterDelete;\r\n dsDateien.EntitySetName := 'DokumenteDateien';\r\n dsDateien.Connection := DM2.XDataWebConnection1;\r\n dsDateien.Left := 116;\r\n dsDateien.Top := 72;\r\n dsDateienID.SetParentComponent(dsDateien);\r\n dsDateienID.Name := 'dsDateienID';\r\n dsDateienID.FieldName := 'ID';\r\n dsDateienDatumUhrzeit.SetParentComponent(dsDateien);\r\n dsDateienDatumUhrzeit.Name := 'dsDateienDatumUhrzeit';\r\n dsDateienDatumUhrzeit.FieldName := 'DatumUhrzeit';\r\n dsDateienDatumUhrzeit.Required := True;\r\n dsDateienDateiMime.SetParentComponent(dsDateien);\r\n dsDateienDateiMime.Name := 'dsDateienDateiMime';\r\n dsDateienDateiMime.FieldName := 'DateiMime';\r\n dsDateienDateiMime.Size := 50;\r\n dsDateienDateiName.SetParentComponent(dsDateien);\r\n dsDateienDateiName.Name := 'dsDateienDateiName';\r\n dsDateienDateiName.FieldName := 'DateiName';\r\n dsDateienDateiName.Size := 255;\r\n dsDateienDateiGroesse.SetParentComponent(dsDateien);\r\n dsDateienDateiGroesse.Name := 'dsDateienDateiGroesse';\r\n dsDateienDateiGroesse.FieldName := 'DateiGroesse';\r\n dsDateienDateiInhaltThumb.SetParentComponent(dsDateien);\r\n dsDateienDateiInhaltThumb.Name := 'dsDateienDateiInhaltThumb';\r\n dsDateienDateiInhaltThumb.FieldName := 'DateiInhaltThumb';\r\n dsDateienDateiInhaltThumb.Size := 255;\r\n dsDateienProtokoll.SetParentComponent(dsDateien);\r\n dsDateienProtokoll.Name := 'dsDateienProtokoll';\r\n dsDateienProtokoll.FieldName := 'Protokoll';\r\n dsDateienProtokoll.Size := 255;\r\n dsDateienDateiBetreff.SetParentComponent(dsDateien);\r\n dsDateienDateiBetreff.Name := 'dsDateienDateiBetreff';\r\n dsDateienDateiBetreff.FieldName := 'DateiBetreff';\r\n dsDateienDateiBetreff.Size := 50;\r\n dsDateienKundennummer.SetParentComponent(dsDateien);\r\n dsDateienKundennummer.Name := 'dsDateienKundennummer';\r\n dsDateienKundennummer.FieldName := 'Kundennummer';\r\n dsDateienKundennummer.Size := 13;\r\n dsDateienNummerkomplett.SetParentComponent(dsDateien);\r\n dsDateienNummerkomplett.Name := 'dsDateienNummerkomplett';\r\n dsDateienNummerkomplett.FieldName := 'Nummerkomplett';\r\n dsDateienNummerkomplett.Size := 10;\r\n dsDateienObjektReferenz.SetParentComponent(dsDateien);\r\n dsDateienObjektReferenz.Name := 'dsDateienObjektReferenz';\r\n dsDateienObjektReferenz.FieldName := 'ObjektReferenz';\r\n dsDateienObjektReferenz.Size := 13;\r\n dsDateienFahrzeugID.SetParentComponent(dsDateien);\r\n dsDateienFahrzeugID.Name := 'dsDateienFahrzeugID';\r\n dsDateienFahrzeugID.FieldName := 'FahrzeugID';\r\n sourceDateien.SetParentComponent(Self);\r\n sourceDateien.Name := 'sourceDateien';\r\n sourceDateien.DataSet := dsDateien;\r\n sourceDateien.Left := 32;\r\n sourceDateien.Top := 72;\r\n WClient.SetParentComponent(Self);\r\n WClient.Name := 'WClient';\r\n WClient.Connection := DM2.XDataWebConnection1;\r\n WClient.Left := 24;\r\n WClient.Top := 154;\r\n xdsProtokolleLoeschungen.SetParentComponent(Self);\r\n xdsProtokolleLoeschungen.Name := 'xdsProtokolleLoeschungen';\r\n xdsProtokolleLoeschungen.AfterPost := xdsProtokolleLoeschungenAfterPost;\r\n xdsProtokolleLoeschungen.EntitySetName := 'ProtokolleLoeschungen';\r\n xdsProtokolleLoeschungen.Connection := DM2.XDataWebConnection1;\r\n xdsProtokolleLoeschungen.QueryTop := 1;\r\n xdsProtokolleLoeschungen.Left := 80;\r\n xdsProtokolleLoeschungen.Top := 248;\r\n xdsProtokolleLoeschungenID.SetParentComponent(xdsProtokolleLoeschungen);\r\n xdsProtokolleLoeschungenID.Name := 'xdsProtokolleLoeschungenID';\r\n xdsProtokolleLoeschungenID.FieldName := 'ID';\r\n xdsProtokolleLoeschungenID.Required := True;\r\n xdsProtokolleLoeschungenID.Size := 38;\r\n xdsProtokolleLoeschungenDatum.SetParentComponent(xdsProtokolleLoeschungen);\r\n xdsProtokolleLoeschungenDatum.Name := 'xdsProtokolleLoeschungenDatum';\r\n xdsProtokolleLoeschungenDatum.FieldName := 'Datum';\r\n xdsProtokolleLoeschungenBenutzer.SetParentComponent(xdsProtokolleLoeschungen);\r\n xdsProtokolleLoeschungenBenutzer.Name := 'xdsProtokolleLoeschungenBenutzer';\r\n xdsProtokolleLoeschungenBenutzer.FieldName := 'Benutzer';\r\n xdsProtokolleLoeschungenBenutzer.Size := 50;\r\n xdsProtokolleLoeschungenBelegart.SetParentComponent(xdsProtokolleLoeschungen);\r\n xdsProtokolleLoeschungenBelegart.Name := 'xdsProtokolleLoeschungenBelegart';\r\n xdsProtokolleLoeschungenBelegart.FieldName := 'Belegart';\r\n xdsProtokolleLoeschungenBelegart.Size := 50;\r\n xdsProtokolleLoeschungenBelegnummer.SetParentComponent(xdsProtokolleLoeschungen);\r\n xdsProtokolleLoeschungenBelegnummer.Name := 'xdsProtokolleLoeschungenBelegnummer';\r\n xdsProtokolleLoeschungenBelegnummer.FieldName := 'Belegnummer';\r\n xdsProtokolleLoeschungenBelegnummer.Size := 25;\r\n xdsProtokolleLoeschungenProtokoll.SetParentComponent(xdsProtokolleLoeschungen);\r\n xdsProtokolleLoeschungenProtokoll.Name := 'xdsProtokolleLoeschungenProtokoll';\r\n xdsProtokolleLoeschungenProtokoll.FieldName := 'Protokoll';\r\n xdsProtokolleLoeschungenProtokoll.Size := 255;\r\n finally\r\n Container1.AfterLoadDFMValues;\r\n Container2.AfterLoadDFMValues;\r\n Container3.AfterLoadDFMValues;\r\n btnzurueck.AfterLoadDFMValues;\r\n btnNeu.AfterLoadDFMValues;\r\n btnFoto.AfterLoadDFMValues;\r\n MSGLOESCHEN.AfterLoadDFMValues;\r\n dsDateien.AfterLoadDFMValues;\r\n dsDateienID.AfterLoadDFMValues;\r\n dsDateienDatumUhrzeit.AfterLoadDFMValues;\r\n dsDateienDateiMime.AfterLoadDFMValues;\r\n dsDateienDateiName.AfterLoadDFMValues;\r\n dsDateienDateiGroesse.AfterLoadDFMValues;\r\n dsDateienDateiInhaltThumb.AfterLoadDFMValues;\r\n dsDateienProtokoll.AfterLoadDFMValues;\r\n dsDateienDateiBetreff.AfterLoadDFMValues;\r\n dsDateienKundennummer.AfterLoadDFMValues;\r\n dsDateienNummerkomplett.AfterLoadDFMValues;\r\n dsDateienObjektReferenz.AfterLoadDFMValues;\r\n dsDateienFahrzeugID.AfterLoadDFMValues;\r\n sourceDateien.AfterLoadDFMValues;\r\n WClient.AfterLoadDFMValues;\r\n xdsProtokolleLoeschungen.AfterLoadDFMValues;\r\n xdsProtokolleLoeschungenID.AfterLoadDFMValues;\r\n xdsProtokolleLoeschungenDatum.AfterLoadDFMValues;\r\n xdsProtokolleLoeschungenBenutzer.AfterLoadDFMValues;\r\n xdsProtokolleLoeschungenBelegart.AfterLoadDFMValues;\r\n xdsProtokolleLoeschungenBelegnummer.AfterLoadDFMValues;\r\n xdsProtokolleLoeschungenProtokoll.AfterLoadDFMValues;\r\n end;\r\nend;\r\n\r\nend.\r\n","unit unit_TicketNeu;\r\n\r\ninterface\r\n\r\nuses\r\n System.SysUtils, System.Classes, JS, Web, WEBLib.Graphics, WEBLib.Controls,\r\n WEBLib.Forms, WEBLib.Dialogs, WEBLib.Grids, Data.DB, XData.Web.JsonDataset,\r\n XData.Web.Dataset, Vcl.Controls, Vcl.StdCtrls, WEBLib.StdCtrls,\r\n WEBLib.ExtCtrls, DB, WEBLib.WebCtrls;\r\n\r\ntype\r\n TTicketNeu = class(TForm)\r\n xdsKontosaldo: TXDataWebDataSet;\r\n TC: TTableControl;\r\n xdsTicket: TXDataWebDataSet;\r\n xdsKontosaldoKundennummer: TStringField;\r\n xdsKontosaldoZeitaufwand: TIntegerField;\r\n xdsKontosaldoAbzurechnen: TIntegerField;\r\n xdsKontosaldoGutschrift: TIntegerField;\r\n xdsKontosaldoAbzug: TIntegerField;\r\n xdsKontosaldoSaldo: TIntegerField;\r\n xdsKontosaldoBetrag: TFloatField;\r\n xdsKontosaldoMinutenpreis: TFloatField;\r\n xdsKontosaldoSRestguthaben: TIntegerField;\r\n xdsTicketKundennummer: TXDataWebEntityField;\r\n xdsTicketProdukt: TXDataWebEntityField;\r\n xdsTicketKategorie: TXDataWebEntityField;\r\n xdsTicketPrioritaet: TXDataWebEntityField;\r\n xdsTicketStatus: TXDataWebEntityField;\r\n xdsTicketID: TIntegerField;\r\n xdsTicketErstelltAm: TDateTimeField;\r\n xdsTicketBetreff: TStringField;\r\n xdsTicketBeschreibung: TStringField;\r\n xdsTicketAbrechnungsbetrag: TFloatField;\r\n xdsTicketAbrechnungRechnungsnummer: TStringField;\r\n xdsTicketAberechnetAm: TDateTimeField;\r\n xdsTicketErledigtAm: TDateTimeField;\r\n xdsTicketNachname: TStringField;\r\n xdsTicketVorname: TStringField;\r\n xdsTicketEmail: TStringField;\r\n xdsTicketSystemInfo: TStringField;\r\n xdsTicketLoesung: TStringField;\r\n xdsTicketProtokoll: TStringField;\r\n xdsTicketZeitaufwandMinuten: TIntegerField;\r\n xdsTicketAbzurechnendeMinuten: TIntegerField;\r\n xdsTicketAbgerechneteMinuten: TIntegerField;\r\n xdsTicketBenachrichtigungNEU: TDateTimeField;\r\n xdsTicketBenachrichtigungLoesung: TDateTimeField;\r\n xdsTicketInterneBemerkung: TStringField;\r\n xdsTicketLoesungInfoSenden: TIntegerField;\r\n xdsTicketKontaktperson: TStringField;\r\n xdsTicketErreichbarkeitTelefon: TStringField;\r\n xdsTicketErreichbarkeitWann: TStringField;\r\n xdsProdukte: TXDataWebDataSet;\r\n xdsProdukteProdukt: TStringField;\r\n xdsKundendaten: TXDataWebDataSet;\r\n xdsKundendatenKundennummer: TStringField;\r\n xdsKundendatenGruppeKunden: TBooleanField;\r\n xdsKundendatenGruppeLieferanten: TBooleanField;\r\n xdsKundendatenGruppeSonstige: TBooleanField;\r\n xdsKundendatenGruppeNichtkunden: TBooleanField;\r\n xdsKundendatenKontaktgruppe: TStringField;\r\n xdsKundendatenNachname: TStringField;\r\n xdsKundendatenVorname: TStringField;\r\n xdsKundendatenAdresszeile2: TStringField;\r\n xdsKundendatenAdresszeile3: TStringField;\r\n xdsKundendatenStrasse: TStringField;\r\n xdsKundendatenPostleitzahl: TStringField;\r\n xdsKundendatenOrt: TStringField;\r\n xdsKundendatenLaenderkuerzel: TStringField;\r\n xdsKundendatenLand: TStringField;\r\n xdsKundendatenLaenderkennzeichen: TBooleanField;\r\n xdsKundendatenAdressanrede: TStringField;\r\n xdsKundendatenBriefanrede1: TStringField;\r\n xdsKundendatenAdresseBild: TStringField;\r\n xdsKundendatenLieferanschrift: TStringField;\r\n xdsKundendatenTelefonNummer: TStringField;\r\n xdsKundendatenTelefaxNummer: TStringField;\r\n xdsKundendatenMobilTelefon: TStringField;\r\n xdsKundendatenEMail: TStringField;\r\n xdsKundendatenInternet: TStringField;\r\n xdsKundendatenUmsatzsteuerID: TStringField;\r\n xdsKundendatenUmsatzsteuerausweis: TBooleanField;\r\n xdsKundendatenZahlungsbedingung: TIntegerField;\r\n xdsKundendatenTransportbedingung: TStringField;\r\n xdsKundendatenKeinNewsletter: TBooleanField;\r\n xdsKundendatenTelefonAlternativ: TStringField;\r\n xdsKundendatenTitel: TStringField;\r\n xdsKundendatenKundenklasseFarbe: TIntegerField;\r\n xdsKundendatenRechnungEmail: TStringField;\r\n xdsKundendatenLoginPW: TStringField;\r\n xdsKundendatenBesteuerungKey: TIntegerField;\r\n xdsKundendatenAuftraegeJahr: TFloatField;\r\n xdsKundendatenAuftraegeVorjahr: TFloatField;\r\n xdsKundendatenLieferadresseID: TIntegerField;\r\n xdsKundendatenUSTIDgeprueft: TDateTimeField;\r\n xdsKundendatenKontaktverbund: TStringField;\r\n xdsKundendatenHinweis: TStringField;\r\n xdsKundendatenLatitude: TFloatField;\r\n xdsKundendatenLongitude: TFloatField;\r\n xdsKundendatenkmLuftlinie: TFloatField;\r\n xdsKundendatenGoogleID: TStringField;\r\n xdsKundendatenGoogleUpdatedUTC: TDateTimeField;\r\n xdsKundendatenBundesland: TStringField;\r\n xdsKundendatenRegion: TStringField;\r\n xdsKundendatenMandatsreferenz: TStringField;\r\n xdsKundendatenMandatsreferenzVom: TDateTimeField;\r\n xdsKundendatenLastschriftArt: TStringField;\r\n xdsKundendatenMahnsperre: TBooleanField;\r\n xdsKundendatenSuchbegriff: TStringField;\r\n xdsKundendatenLieferanschriftDaten: TStringField;\r\n xdsKundendatenExportKasse: TBooleanField;\r\n xdsKundendatenLoeschvormerkungDatum: TDateTimeField;\r\n xdsKundendatenLoeschvormerkungGrund: TStringField;\r\n xdsKundendatenPseudonymisiert: TStringField;\r\n xdsKundendatenLoginAktiv: TIntegerField;\r\n xdsKundendatenSonstigeDaten: TStringField;\r\n xdsStatus: TXDataWebDataSet;\r\n xdsStatusStatus: TStringField;\r\n xdsKategorie: TXDataWebDataSet;\r\n xdsKategorieKategorie: TStringField;\r\n xdsprioritaet: TXDataWebDataSet;\r\n xdsprioritaetPrioritaet: TIntegerField;\r\n xdsprioritaetPrioText: TStringField;\r\n xdsprioritaetPrioFarbe: TIntegerField;\r\n xdsTicketDateien: TXDataWebDataSet;\r\n xdsTicketDateienTicketID: TXDataWebEntityField;\r\n xdsTicketDateienID: TIntegerField;\r\n xdsTicketDateienDatumUhrzeit: TDateTimeField;\r\n xdsTicketDateienFuerLoesung: TIntegerField;\r\n xdsTicketDateienDateiMime: TStringField;\r\n xdsTicketDateienDateiName: TStringField;\r\n xdsTicketDateienDateiGroesse: TIntegerField;\r\n xdsTicketDateienDateiInhaltText: TStringField;\r\n WebFilePicker1: TFilePicker;\r\n WebFilePicker2: TFilePicker;\r\n WebFilePicker3: TFilePicker;\r\n xdsticket2: TXDataWebDataSet;\r\n xdsTicketKontaktpersonEmail: TStringField;\r\n Container1: THTMLContainer;\r\n Container2: THTMLContainer;\r\n PanelTop: TPanel;\r\n lblSeite: TLabel;\r\n panelfunctions: TPanel;\r\n btnzurueck: TButton;\r\n xdsticket2Kundennummer: TXDataWebEntityField;\r\n xdsticket2Produkt: TXDataWebEntityField;\r\n xdsticket2Kategorie: TXDataWebEntityField;\r\n xdsticket2Prioritaet: TXDataWebEntityField;\r\n xdsticket2Status: TXDataWebEntityField;\r\n xdsticket2ID: TIntegerField;\r\n xdsticket2ErstelltAm: TDateTimeField;\r\n xdsticket2Betreff: TStringField;\r\n xdsticket2Beschreibung: TStringField;\r\n xdsticket2Abrechnungsbetrag: TFloatField;\r\n xdsticket2AbrechnungRechnungsnummer: TStringField;\r\n xdsticket2AberechnetAm: TDateTimeField;\r\n xdsticket2ErledigtAm: TDateTimeField;\r\n xdsticket2Nachname: TStringField;\r\n xdsticket2Vorname: TStringField;\r\n xdsticket2Email: TStringField;\r\n xdsticket2SystemInfo: TStringField;\r\n xdsticket2Loesung: TStringField;\r\n xdsticket2Protokoll: TStringField;\r\n xdsticket2ZeitaufwandMinuten: TIntegerField;\r\n xdsticket2AbzurechnendeMinuten: TIntegerField;\r\n xdsticket2AbgerechneteMinuten: TIntegerField;\r\n xdsticket2BenachrichtigungNEU: TDateTimeField;\r\n xdsticket2BenachrichtigungLoesung: TDateTimeField;\r\n xdsticket2InterneBemerkung: TStringField;\r\n xdsticket2LoesungInfoSenden: TIntegerField;\r\n xdsticket2Kontaktperson: TStringField;\r\n xdsticket2KontaktpersonEmail: TStringField;\r\n xdsticket2ErreichbarkeitTelefon: TStringField;\r\n xdsticket2ErreichbarkeitWann: TStringField;\r\n procedure WebFormShow(Sender: TObject);\r\n procedure xdsKontosaldoAfterOpen(DataSet: TDataSet);\r\n procedure xdsProdukteAfterOpen(DataSet: TDataSet);\r\n procedure xdsTicketAfterOpen(DataSet: TDataSet);\r\n procedure xdsKundendatenAfterOpen(DataSet: TDataSet);\r\n procedure xdsTicketAfterPost(DataSet: TDataSet);\r\n procedure xdsTicketAfterApplyUpdates(Sender: TDataSet;\r\n Info: TResolveResults);\r\n procedure xdsStatusAfterOpen(DataSet: TDataSet);\r\n procedure xdsKategorieAfterOpen(DataSet: TDataSet);\r\n procedure xdsprioritaetAfterOpen(DataSet: TDataSet);\r\n procedure xdsTicketDateienNewRecord(DataSet: TDataSet);\r\n procedure WebFilePicker1Change(Sender: TObject);\r\n procedure xdsticket2AfterOpen(DataSet: TDataSet);\r\n procedure WebFilePicker1GetFileAsBase64(Sender: TObject;\r\n AFileIndex: Integer; ABase64: string);\r\n procedure WebFilePicker2Change(Sender: TObject);\r\n procedure WebFilePicker3Change(Sender: TObject);\r\n procedure WebFilePicker2GetFileAsBase64(Sender: TObject;\r\n AFileIndex: Integer; ABase64: string);\r\n procedure WebFilePicker3GetFileAsBase64(Sender: TObject;\r\n AFileIndex: Integer; ABase64: string);\r\n procedure xdsTicketDateienAfterApplyUpdates(Sender: TDataSet;\r\n Info: TResolveResults);\r\n procedure xdsTicketDateienAfterOpen(DataSet: TDataSet);\r\n procedure btnzurueckClick(Sender: TObject);\r\n private\r\n { Private-Deklarationen }\r\n public\r\n { Public-Deklarationen }\r\n TicketNeuFuerKundennummer:string;\r\n TicketNeuBetreff:string;\r\n TicketNeuText:string;\r\n NewTicketNumber:string;\r\n btnAbsenden:TButton;\r\n procedure btnAbsendenclick(Sender:TObject);\r\n procedure Formularaktualisieren;\r\n procedure uploadfilepickers;\r\n protected procedure LoadDFMValues; override; end;\r\n\r\nvar\r\n TicketNeu: TTicketNeu;\r\n edtTicketGrund:TComboBox;\r\n edtBetreff:TEdit;\r\n edtBeschreibung:TMemo;\r\n edtKontaktperson:TEdit;\r\n edtKontaktpersonEmail:TEdit;\r\n edtTelefon:TEdit;\r\n edtWann:TEdit;\r\n edtSystemInfo:TMemo;\r\n file1base64str1:string;\r\n file1base64str2:string;\r\n file1base64str3:string;\r\n\r\nimplementation\r\n uses unit1, unit2;\r\n{$R *.dfm}\r\n\r\nprocedure TTicketNeu.uploadfilepickers;\r\nvar\r\n hasnewrecord:boolean;\r\nbegin\r\n hasnewrecord:=false;\r\n if file1base64str1<>'' then\r\n begin\r\n xdsTicketDateien.Append();\r\n xdsTicketDateienTicketID.Value:=xdsticket2.CurrentData;\r\n xdsTicketDateienDatumUhrzeit.AsDateTime:=Date+time;\r\n xdsTicketDateienFuerLoesung.AsInteger:=0;\r\n xdsTicketDateienDateiMime.AsString:=WebFilePicker1.Files.Items[0].MimeType;\r\n xdsTicketDateienDateiGroesse.AsInteger:=WebFilePicker1.Files.Items[0].Size;\r\n xdsTicketDateienDateiName.AsString:=WebFilePicker1.Files.Items[0].Name;\r\n xdsTicketDateienDateiInhaltText.AsString:=file1base64str1;\r\n xdsTicketDateien.Post();\r\n hasnewrecord:=true;\r\n end;\r\n if file1base64str2<>'' then\r\n begin\r\n xdsTicketDateien.Append();\r\n xdsTicketDateienTicketID.Value:=xdsticket2.CurrentData;\r\n xdsTicketDateienDatumUhrzeit.AsDateTime:=Date+time;\r\n xdsTicketDateienFuerLoesung.AsInteger:=0;\r\n xdsTicketDateienDateiMime.AsString:=WebFilePicker2.Files.Items[0].MimeType;\r\n xdsTicketDateienDateiGroesse.AsInteger:=WebFilePicker2.Files.Items[0].Size;\r\n xdsTicketDateienDateiName.AsString:=WebFilePicker2.Files.Items[0].Name;\r\n xdsTicketDateienDateiInhaltText.AsString:=file1base64str2;\r\n xdsTicketDateien.Post();\r\n hasnewrecord:=true;\r\n end;\r\n if file1base64str3<>'' then\r\n begin\r\n xdsTicketDateien.Append();\r\n xdsTicketDateienTicketID.Value:=xdsticket2.CurrentData;\r\n xdsTicketDateienDatumUhrzeit.AsDateTime:=Date+time;\r\n xdsTicketDateienFuerLoesung.AsInteger:=0;\r\n xdsTicketDateienDateiMime.AsString:=WebFilePicker3.Files.Items[0].MimeType;\r\n xdsTicketDateienDateiGroesse.AsInteger:=WebFilePicker3.Files.Items[0].Size;\r\n xdsTicketDateienDateiName.AsString:=WebFilePicker3.Files.Items[0].Name;\r\n xdsTicketDateienDateiInhaltText.AsString:=file1base64str3;\r\n xdsTicketDateien.Post();\r\n hasnewrecord:=true;\r\n end;\r\n if hasnewrecord=true then\r\n begin\r\n xdsticketdateien.ApplyUpdates;\r\n end\r\n else\r\n begin\r\n showmessage('Das Ticket wurde erfolgreich erstellt.');\r\n close;\r\n end;\r\nend;\r\n\r\nprocedure TTicketNeu.btnzurueckClick(Sender: TObject);\r\nbegin\r\n close;\r\nend;\r\n\r\nprocedure TTicketNeu.btnAbsendenClick(Sender: TObject);\r\nbegin\r\n if edtBetreff.Text='' then\r\n begin\r\n showmessage('Sie müssen einen Betreff eingeben');\r\n exit;\r\n end;\r\n if edtBeschreibung.Text='' then\r\n begin\r\n showmessage('Sie müssen eine Beschreibung eingeben');\r\n exit;\r\n end;\r\n if edtKontaktperson.Text='' then\r\n begin\r\n showmessage('Sie müssen eine Kontaktperson eingeben');\r\n exit;\r\n end;\r\n if edtTelefon.Text='' then\r\n begin\r\n showmessage('Sie müssen eine Telefonnummer eingeben');\r\n exit;\r\n end;\r\n if edtWann.Text='' then\r\n begin\r\n showmessage('Sie müssen die Erreichbarkeit eingeben');\r\n exit;\r\n end;\r\n if edtTicketGrund.Text='' then\r\n begin\r\n showmessage('Sie müssen einen Grund/Produkt auswählen');\r\n exit;\r\n end;\r\n\r\n if edtKontaktpersonEmail.Text<>'' then\r\n begin\r\n if Not form1.ValidateEmail(edtKontaktpersonEmail.text) then\r\n begin\r\n edtKontaktpersonEmail.SetFocus;\r\n showmessage('Kontaktperson Email ist nicht gültig');\r\n exit;\r\n end;\r\n end;\r\n xdsProdukte.Locate('Produkt',edtTicketGrund.Text,[]);\r\n\r\n xdsTicket.Append;\r\n xdsTicketKundennummer.Value:=xdsKundendaten.CurrentData;\r\n xdsTicketProdukt.Value:=xdsProdukte.CurrentData;\r\n xdsTicketStatus.Value:=xdsStatus.CurrentData;\r\n xdsTicketKategorie.Value:=xdsKategorie.CurrentData;\r\n xdsTicketPrioritaet.Value:=xdsprioritaet.CurrentData;\r\n xdsTicketErstelltAm.AsDateTime:=date+time;\r\n xdsTicketBetreff.AsString:=edtBetreff.Text;\r\n xdsTicketBeschreibung.AsString:=edtBeschreibung.Text;\r\n xdsTicketAbrechnungsbetrag.AsFloat:=0;\r\n xdsTicketSystemInfo.AsString:=edtSystemInfo.Text;\r\n xdsTicketZeitaufwandMinuten.AsInteger:=0;\r\n xdsTicketAbzurechnendeMinuten.AsInteger:=0;\r\n xdsTicketKontaktperson.AsString:=edtKontaktperson.Text;\r\n xdsTicketKontaktpersonEmail.AsString:=edtKontaktpersonEmail.Text;\r\n xdsTicketErreichbarkeitTelefon.AsString:=edtTelefon.Text;\r\n xdsTicketErreichbarkeitWann.AsString:=edtWann.Text;\r\n xdsTicketNachname.AsString:=xdsKundendatenNachname.AsString;\r\n xdsTicketVorname.AsString:=xdsKundendatenVorname.AsString;\r\n xdsTicketEmail.AsString:=xdsKundendatenEMail.AsString;\r\n xdsTicketProtokoll.AsString:=datetimetostr(date+time)+' NEU Kundenportal';\r\n xdsticket.Post;\r\nend;\r\n\r\nprocedure TTicketNeu.Formularaktualisieren;\r\nvar\r\n i:integer;\r\n myelement:TJSHTMLElement;\r\n myhtmlstring:string;\r\nbegin\r\n myelement:=container1.ElementHandle;\r\n paneltop.parentelement:=myelement;\r\n panelfunctions.ParentElement:=myelement;\r\n container2.ParentElement:=myelement;\r\n\r\n myelement:=paneltop.ElementHandle;\r\n lblseite.ParentElement:=myelement;\r\n\r\n myelement:=panelfunctions.ElementHandle;\r\n btnZurueck.ParentElement:=myelement;\r\n\r\n myelement:=container2.ElementHandle;\r\n tc.ParentElement:=myelement;\r\n\r\n TC.ColCount:=1;\r\n tc.RowCount:=19;\r\n\r\n i:=0;\r\n\r\n tc.Cells[0,i]:='
Daten für das neue Ticket';\r\n inc(i);\r\n TC.Cells[0,i]:='Produkt auswählen*
';\r\n myelement:=TC.CellElements[0,i];\r\n edtTicketGrund:=TComboBox.Create(self);\r\n edtTicketGrund.ElementClassName:='form-control';\r\n edtTicketGrund.Width:=400;\r\n edtTicketGrund.HeightStyle:=ssAuto;\r\n edtTicketGrund.ItemIndex:=-1;\r\n edtTicketGrund.ParentElement:=myelement;\r\n edtTicketGrund.Items.Clear;\r\n xdsProdukte.First;\r\n while not xdsProdukte.eof do\r\n begin\r\n edtTicketGrund.Items.Add(xdsProdukteProdukt.AsString);\r\n xdsProdukte.Next;\r\n end;\r\n\r\n\r\n inc(i);\r\n TC.Cells[0,i]:='Betreff*
';\r\n myelement:=TC.CellElements[0,i];\r\n edtBetreff:=TEdit.Create(self);\r\n edtBetreff.ElementClassName:='form-control';\r\n edtBetreff.Width:=400;\r\n edtBetreff.HeightStyle:=ssAuto;\r\n edtBetreff.TextHint:='Betreff';\r\n edtBetreff.MaxLength:=100;\r\n edtBetreff.ParentElement:=myelement;\r\n\r\n if TicketNeuBetreff<>'' then\r\n begin\r\n edtbetreff.Text:=TicketNeuBetreff;\r\n ticketneubetreff:='';\r\n end;\r\n\r\n inc(i);\r\n TC.Cells[0,i]:='Beschreibung*
';\r\n myelement:=TC.CellElements[0,i];\r\n edtBeschreibung:=TMemo.Create(self);\r\n edtBeschreibung.ElementClassName:='form-control';\r\n edtBeschreibung.WidthStyle:=ssAuto;\r\n edtBeschreibung.Height:=200;\r\n edtBeschreibung.HeightStyle:=ssAbsolute;\r\n edtBeschreibung.TextHint:='Beschreibung';\r\n edtBeschreibung.ParentElement:=myelement;\r\n if TicketNeuText<>'' then\r\n begin\r\n edtbeschreibung.Text:=TicketNeuText;\r\n TicketNeuText:='';\r\n end;\r\n inc(i);\r\n TC.Cells[0,i]:='Kontaktperson*
';\r\n myelement:=TC.CellElements[0,i];\r\n edtKontaktperson:=TEdit.Create(self);\r\n edtKontaktperson.ElementClassName:='form-control';\r\n edtKontaktperson.Width:=400;\r\n edtKontaktperson.HeightStyle:=ssAuto;\r\n edtKontaktperson.TextHint:='Ansprechpartner für diese Ticket';\r\n edtKontaktperson.MaxLength:=100;\r\n edtKontaktperson.ParentElement:=myelement;\r\n\r\n inc(i);\r\n TC.Cells[0,i]:='Kontaktperson Email für Ticket-Benachrichtigungen (optional)
';\r\n myelement:=TC.CellElements[0,i];\r\n edtKontaktpersonEmail:=TEdit.Create(self);\r\n edtKontaktpersonEmail.ElementClassName:='form-control email';\r\n edtKontaktpersonEmail.Width:=400;\r\n edtKontaktpersonEmail.HeightStyle:=ssAuto;\r\n edtKontaktpersonEmail.TextHint:='Benachrichtigungen zusätzlich an diese Emailadresse senden';\r\n edtKontaktpersonEmail.MaxLength:=100;\r\n edtKontaktpersonEmail.ParentElement:=myelement;\r\n\r\n inc(i);\r\n TC.Cells[0,i]:='Ihre Telefonnummer*
';\r\n myelement:=TC.CellElements[0,i];\r\n edtTelefon:=TEdit.Create(self);\r\n edtTelefon.ElementClassName:='form-control';\r\n edtTelefon.Width:=400;\r\n edtTelefon.HeightStyle:=ssAuto;\r\n edtTelefon.TextHint:='Ansprechpartner Telefonnummer';\r\n edtTelefon.MaxLength:=100;\r\n edtTelefon.ParentElement:=myelement;\r\n\r\n inc(i);\r\n TC.Cells[0,i]:='Wann sind Sie erreichbar?*
';\r\n myelement:=TC.CellElements[0,i];\r\n edtWann:=TEdit.Create(self);\r\n edtWann.ElementClassName:='form-control';\r\n edtWann.Width:=400;\r\n edtWann.HeightStyle:=ssAuto;\r\n edtWann.TextHint:='Uhrzeit für Erreichbarkeit';\r\n edtWann.MaxLength:=100;\r\n edtWann.ParentElement:=myelement;\r\n\r\n inc(i);\r\n TC.Cells[0,i]:='Informationen zum Betriebssystem, Programmversions-Nr. und -Datum, andere hilfreiche Infos
';\r\n myelement:=TC.CellElements[0,i];\r\n edtSystemInfo:=TMemo.Create(self);\r\n edtSystemInfo.ElementClassName:='form-control';\r\n edtSystemInfo.WidthStyle:=ssAuto;\r\n edtSystemInfo.Height:=200;\r\n edtSystemInfo.HeightStyle:=ssAbsolute;\r\n edtSystemInfo.TextHint:='weitere Infos';\r\n edtSystemInfo.ParentElement:=myelement;\r\n\r\n inc(i);\r\n TC.Cells[0,i]:='Anlagen (max. 3 Dateien) JPG, JPEG, PNG, PDF, ZIP, TXT (max. 2 MB pro Datei) hinzufügen:';\r\n\r\n inc(i);\r\n myelement:=TC.cellelements[0,i];\r\n WebFilePicker1.ParentElement:=myelement;\r\n\r\n inc(i);\r\n myelement:=TC.cellelements[0,i];\r\n WebFilePicker2.ParentElement:=myelement;\r\n\r\n inc(i);\r\n myelement:=TC.cellelements[0,i];\r\n WebFilePicker3.ParentElement:=myelement;\r\n\r\n inc(i);\r\n myelement:=TC.cellelements[0,i];\r\n btnAbsenden:=TButton.Create(self);\r\n btnAbsenden.ElementClassName:='btn btn-sm bg-info m-1';\r\n btnAbsenden.HeightStyle:=ssauto;\r\n btnAbsenden.WidthStyle:=ssauto;\r\n btnAbsenden.tag:=0;\r\n btnAbsenden.Caption:='Absenden';\r\n btnAbsenden.OnClick:=@btnAbsendenClick;\r\n btnAbsenden.ParentElement:=myelement;\r\n\r\n\r\n\r\n\r\nend;\r\n\r\nprocedure TTicketNeu.WebFilePicker1Change(Sender: TObject);\r\nbegin\r\n file1base64str1:='';\r\n if WebFilePicker1.Files.Count>0 then\r\n begin\r\n if WebFilePicker1.Files.Items[0].Size<2097153 then\r\n begin\r\n webfilepicker1.Files.Items[0].GetFileAsBase64;\r\n end\r\n else\r\n begin\r\n showmessage('Datei ist zu groß, bitte andere Datei wählen');\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TTicketNeu.WebFilePicker1GetFileAsBase64(Sender: TObject;\r\n AFileIndex: Integer; ABase64: string);\r\nbegin\r\n file1base64str1:= 'data:' + WebFilePicker1.Files.Items[0].MimeType + ';base64,' + ABase64;\r\nend;\r\n\r\nprocedure TTicketNeu.WebFilePicker2Change(Sender: TObject);\r\nbegin\r\n file1base64str2:='';\r\n if WebFilePicker2.Files.Count>0 then\r\n begin\r\n if WebFilePicker2.Files.Items[0].Size<2097153 then\r\n begin\r\n webfilepicker2.Files.Items[0].GetFileAsBase64;\r\n end\r\n else\r\n begin\r\n showmessage('Datei ist zu groß, bitte andere Datei wählen');\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TTicketNeu.WebFilePicker2GetFileAsBase64(Sender: TObject;\r\n AFileIndex: Integer; ABase64: string);\r\nbegin\r\nfile1base64str2:= 'data:' + WebFilePicker2.Files.Items[0].MimeType + ';base64,' + ABase64;\r\nend;\r\n\r\nprocedure TTicketNeu.WebFilePicker3Change(Sender: TObject);\r\nbegin\r\n file1base64str3:='';\r\n if WebFilePicker3.Files.Count>0 then\r\n begin\r\n if WebFilePicker3.Files.Items[0].Size<2097153 then\r\n begin\r\n webfilepicker3.Files.Items[0].GetFileAsBase64;\r\n end\r\n else\r\n begin\r\n showmessage('Datei ist zu groß, bitte andere Datei wählen');\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TTicketNeu.WebFilePicker3GetFileAsBase64(Sender: TObject;\r\n AFileIndex: Integer; ABase64: string);\r\nbegin\r\n file1base64str3:= 'data:' + WebFilePicker3.Files.Items[0].MimeType + ';base64,' + ABase64;\r\nend;\r\n\r\nprocedure TTicketNeu.WebFormShow(Sender: TObject);\r\nbegin\r\n xdsKontosaldo.Close;\r\n xdsKontosaldo.QueryString:='$filter=Kundennummer eq '+QuotedStr(TicketNeuFuerKundennummer);\r\n xdsKontosaldo.Load;\r\nend;\r\n\r\nprocedure TTicketNeu.xdsKategorieAfterOpen(DataSet: TDataSet);\r\nbegin\r\n xdsKategorie.Locate('Kategorie','[-]',[]);\r\n xdsprioritaet.Load;\r\n\r\nend;\r\n\r\nprocedure TTicketNeu.xdsKontosaldoAfterOpen(DataSet: TDataSet);\r\nbegin\r\n xdsProdukte.Load;\r\n\r\nend;\r\n\r\nprocedure TTicketNeu.xdsKundendatenAfterOpen(DataSet: TDataSet);\r\nbegin\r\n xdsStatus.Load;\r\n\r\nend;\r\n\r\nprocedure TTicketNeu.xdsprioritaetAfterOpen(DataSet: TDataSet);\r\nbegin\r\n xdsprioritaet.Locate('Prioritaet','3',[]);\r\n Formularaktualisieren;\r\nend;\r\n\r\nprocedure TTicketNeu.xdsProdukteAfterOpen(DataSet: TDataSet);\r\nbegin\r\n xdsTicket.Load;\r\nend;\r\n\r\nprocedure TTicketNeu.xdsStatusAfterOpen(DataSet: TDataSet);\r\nbegin\r\n xdsStatus.Locate('Status','ungelesen',[]);\r\n xdsKategorie.Load;\r\n\r\nend;\r\n\r\nprocedure TTicketNeu.xdsticket2AfterOpen(DataSet: TDataSet);\r\nbegin\r\n NewTicketNumber:=xdsticket2id.asstring;\r\n uploadfilepickers;\r\nend;\r\n\r\nprocedure TTicketNeu.xdsTicketAfterApplyUpdates(Sender: TDataSet;\r\n Info: TResolveResults);\r\n var\r\n i:integer;\r\nbegin\r\n for i := 0 to High(info.Records) do\r\n begin\r\n if info.Records[i].Error<>'' then showmessage(info.Records[i].Error);\r\n end;\r\n if info.Records[0].Error='' then\r\n begin\r\n xdsticket2.Load;\r\n\r\n end;\r\nend;\r\n\r\nprocedure TTicketNeu.xdsTicketAfterOpen(DataSet: TDataSet);\r\nbegin\r\n xdsTicketDateien.Load;\r\nend;\r\n\r\nprocedure TTicketNeu.xdsTicketAfterPost(DataSet: TDataSet);\r\nbegin\r\n xdsTicket.ApplyUpdates;\r\nend;\r\n\r\nprocedure TTicketNeu.xdsTicketDateienAfterApplyUpdates(Sender: TDataSet;\r\n Info: TResolveResults);\r\n var\r\n i:integer;\r\nbegin\r\n for i := 0 to High(info.Records) do\r\n begin\r\n if info.Records[i].Error<>'' then showmessage(info.Records[i].Error);\r\n end;\r\n if info.Records[0].Error='' then\r\n begin\r\n showmessage('Das Ticket wurde erfolgreich erstellt.');\r\n close;\r\n end;\r\n\r\nend;\r\n\r\nprocedure TTicketNeu.xdsTicketDateienAfterOpen(DataSet: TDataSet);\r\nbegin\r\n xdsKundendaten.Close;\r\n xdsKundendaten.QueryString:='$filter=Kundennummer eq '+QuotedStr(TicketNeuFuerKundennummer);\r\n xdsKundendaten.Load;\r\nend;\r\n\r\nprocedure TTicketNeu.xdsTicketDateienNewRecord(DataSet: TDataSet);\r\nbegin\r\n xdsTicketDateienDatumUhrzeit.AsDateTime:=date+time;\r\n xdsTicketDateienFuerLoesung.AsInteger:=0;\r\n xdsTicketDateienTicketID.Value:=xdsTicket.CurrentData;\r\nend;\r\n\r\nprocedure TTicketNeu.LoadDFMValues;\r\nbegin\r\n inherited LoadDFMValues;\r\n\r\n TC := TTableControl.Create(Self);\r\n WebFilePicker1 := TFilePicker.Create(Self);\r\n WebFilePicker2 := TFilePicker.Create(Self);\r\n WebFilePicker3 := TFilePicker.Create(Self);\r\n Container1 := THTMLContainer.Create(Self);\r\n Container2 := THTMLContainer.Create(Self);\r\n PanelTop := TPanel.Create(Self);\r\n lblSeite := TLabel.Create(Self);\r\n panelfunctions := TPanel.Create(Self);\r\n btnzurueck := TButton.Create(Self);\r\n xdsKontosaldo := TXDataWebDataSet.Create(Self);\r\n xdsKontosaldoKundennummer := TStringField.Create(Self);\r\n xdsKontosaldoZeitaufwand := TIntegerField.Create(Self);\r\n xdsKontosaldoAbzurechnen := TIntegerField.Create(Self);\r\n xdsKontosaldoGutschrift := TIntegerField.Create(Self);\r\n xdsKontosaldoAbzug := TIntegerField.Create(Self);\r\n xdsKontosaldoSaldo := TIntegerField.Create(Self);\r\n xdsKontosaldoBetrag := TFloatField.Create(Self);\r\n xdsKontosaldoMinutenpreis := TFloatField.Create(Self);\r\n xdsKontosaldoSRestguthaben := TIntegerField.Create(Self);\r\n xdsTicket := TXDataWebDataSet.Create(Self);\r\n xdsTicketKundennummer := TXDataWebEntityField.Create(Self);\r\n xdsTicketProdukt := TXDataWebEntityField.Create(Self);\r\n xdsTicketKategorie := TXDataWebEntityField.Create(Self);\r\n xdsTicketPrioritaet := TXDataWebEntityField.Create(Self);\r\n xdsTicketStatus := TXDataWebEntityField.Create(Self);\r\n xdsTicketID := TIntegerField.Create(Self);\r\n xdsTicketErstelltAm := TDateTimeField.Create(Self);\r\n xdsTicketBetreff := TStringField.Create(Self);\r\n xdsTicketBeschreibung := TStringField.Create(Self);\r\n xdsTicketAbrechnungsbetrag := TFloatField.Create(Self);\r\n xdsTicketAbrechnungRechnungsnummer := TStringField.Create(Self);\r\n xdsTicketAberechnetAm := TDateTimeField.Create(Self);\r\n xdsTicketErledigtAm := TDateTimeField.Create(Self);\r\n xdsTicketNachname := TStringField.Create(Self);\r\n xdsTicketVorname := TStringField.Create(Self);\r\n xdsTicketEmail := TStringField.Create(Self);\r\n xdsTicketSystemInfo := TStringField.Create(Self);\r\n xdsTicketLoesung := TStringField.Create(Self);\r\n xdsTicketProtokoll := TStringField.Create(Self);\r\n xdsTicketZeitaufwandMinuten := TIntegerField.Create(Self);\r\n xdsTicketAbzurechnendeMinuten := TIntegerField.Create(Self);\r\n xdsTicketAbgerechneteMinuten := TIntegerField.Create(Self);\r\n xdsTicketBenachrichtigungNEU := TDateTimeField.Create(Self);\r\n xdsTicketBenachrichtigungLoesung := TDateTimeField.Create(Self);\r\n xdsTicketInterneBemerkung := TStringField.Create(Self);\r\n xdsTicketLoesungInfoSenden := TIntegerField.Create(Self);\r\n xdsTicketKontaktperson := TStringField.Create(Self);\r\n xdsTicketErreichbarkeitTelefon := TStringField.Create(Self);\r\n xdsTicketErreichbarkeitWann := TStringField.Create(Self);\r\n xdsTicketKontaktpersonEmail := TStringField.Create(Self);\r\n xdsProdukte := TXDataWebDataSet.Create(Self);\r\n xdsProdukteProdukt := TStringField.Create(Self);\r\n xdsKundendaten := TXDataWebDataSet.Create(Self);\r\n xdsKundendatenKundennummer := TStringField.Create(Self);\r\n xdsKundendatenGruppeKunden := TBooleanField.Create(Self);\r\n xdsKundendatenGruppeLieferanten := TBooleanField.Create(Self);\r\n xdsKundendatenGruppeSonstige := TBooleanField.Create(Self);\r\n xdsKundendatenGruppeNichtkunden := TBooleanField.Create(Self);\r\n xdsKundendatenKontaktgruppe := TStringField.Create(Self);\r\n xdsKundendatenNachname := TStringField.Create(Self);\r\n xdsKundendatenVorname := TStringField.Create(Self);\r\n xdsKundendatenAdresszeile2 := TStringField.Create(Self);\r\n xdsKundendatenAdresszeile3 := TStringField.Create(Self);\r\n xdsKundendatenStrasse := TStringField.Create(Self);\r\n xdsKundendatenPostleitzahl := TStringField.Create(Self);\r\n xdsKundendatenOrt := TStringField.Create(Self);\r\n xdsKundendatenLaenderkuerzel := TStringField.Create(Self);\r\n xdsKundendatenLand := TStringField.Create(Self);\r\n xdsKundendatenLaenderkennzeichen := TBooleanField.Create(Self);\r\n xdsKundendatenAdressanrede := TStringField.Create(Self);\r\n xdsKundendatenBriefanrede1 := TStringField.Create(Self);\r\n xdsKundendatenAdresseBild := TStringField.Create(Self);\r\n xdsKundendatenLieferanschrift := TStringField.Create(Self);\r\n xdsKundendatenTelefonNummer := TStringField.Create(Self);\r\n xdsKundendatenTelefaxNummer := TStringField.Create(Self);\r\n xdsKundendatenMobilTelefon := TStringField.Create(Self);\r\n xdsKundendatenEMail := TStringField.Create(Self);\r\n xdsKundendatenInternet := TStringField.Create(Self);\r\n xdsKundendatenUmsatzsteuerID := TStringField.Create(Self);\r\n xdsKundendatenUmsatzsteuerausweis := TBooleanField.Create(Self);\r\n xdsKundendatenZahlungsbedingung := TIntegerField.Create(Self);\r\n xdsKundendatenTransportbedingung := TStringField.Create(Self);\r\n xdsKundendatenKeinNewsletter := TBooleanField.Create(Self);\r\n xdsKundendatenTelefonAlternativ := TStringField.Create(Self);\r\n xdsKundendatenTitel := TStringField.Create(Self);\r\n xdsKundendatenKundenklasseFarbe := TIntegerField.Create(Self);\r\n xdsKundendatenRechnungEmail := TStringField.Create(Self);\r\n xdsKundendatenLoginPW := TStringField.Create(Self);\r\n xdsKundendatenBesteuerungKey := TIntegerField.Create(Self);\r\n xdsKundendatenAuftraegeJahr := TFloatField.Create(Self);\r\n xdsKundendatenAuftraegeVorjahr := TFloatField.Create(Self);\r\n xdsKundendatenLieferadresseID := TIntegerField.Create(Self);\r\n xdsKundendatenUSTIDgeprueft := TDateTimeField.Create(Self);\r\n xdsKundendatenKontaktverbund := TStringField.Create(Self);\r\n xdsKundendatenHinweis := TStringField.Create(Self);\r\n xdsKundendatenLatitude := TFloatField.Create(Self);\r\n xdsKundendatenLongitude := TFloatField.Create(Self);\r\n xdsKundendatenkmLuftlinie := TFloatField.Create(Self);\r\n xdsKundendatenGoogleID := TStringField.Create(Self);\r\n xdsKundendatenGoogleUpdatedUTC := TDateTimeField.Create(Self);\r\n xdsKundendatenBundesland := TStringField.Create(Self);\r\n xdsKundendatenRegion := TStringField.Create(Self);\r\n xdsKundendatenMandatsreferenz := TStringField.Create(Self);\r\n xdsKundendatenMandatsreferenzVom := TDateTimeField.Create(Self);\r\n xdsKundendatenLastschriftArt := TStringField.Create(Self);\r\n xdsKundendatenMahnsperre := TBooleanField.Create(Self);\r\n xdsKundendatenSuchbegriff := TStringField.Create(Self);\r\n xdsKundendatenLieferanschriftDaten := TStringField.Create(Self);\r\n xdsKundendatenExportKasse := TBooleanField.Create(Self);\r\n xdsKundendatenLoeschvormerkungDatum := TDateTimeField.Create(Self);\r\n xdsKundendatenLoeschvormerkungGrund := TStringField.Create(Self);\r\n xdsKundendatenPseudonymisiert := TStringField.Create(Self);\r\n xdsKundendatenLoginAktiv := TIntegerField.Create(Self);\r\n xdsKundendatenSonstigeDaten := TStringField.Create(Self);\r\n xdsStatus := TXDataWebDataSet.Create(Self);\r\n xdsStatusStatus := TStringField.Create(Self);\r\n xdsKategorie := TXDataWebDataSet.Create(Self);\r\n xdsKategorieKategorie := TStringField.Create(Self);\r\n xdsprioritaet := TXDataWebDataSet.Create(Self);\r\n xdsprioritaetPrioritaet := TIntegerField.Create(Self);\r\n xdsprioritaetPrioText := TStringField.Create(Self);\r\n xdsprioritaetPrioFarbe := TIntegerField.Create(Self);\r\n xdsTicketDateien := TXDataWebDataSet.Create(Self);\r\n xdsTicketDateienTicketID := TXDataWebEntityField.Create(Self);\r\n xdsTicketDateienID := TIntegerField.Create(Self);\r\n xdsTicketDateienDatumUhrzeit := TDateTimeField.Create(Self);\r\n xdsTicketDateienFuerLoesung := TIntegerField.Create(Self);\r\n xdsTicketDateienDateiMime := TStringField.Create(Self);\r\n xdsTicketDateienDateiName := TStringField.Create(Self);\r\n xdsTicketDateienDateiGroesse := TIntegerField.Create(Self);\r\n xdsTicketDateienDateiInhaltText := TStringField.Create(Self);\r\n xdsticket2 := TXDataWebDataSet.Create(Self);\r\n xdsticket2Kundennummer := TXDataWebEntityField.Create(Self);\r\n xdsticket2Produkt := TXDataWebEntityField.Create(Self);\r\n xdsticket2Kategorie := TXDataWebEntityField.Create(Self);\r\n xdsticket2Prioritaet := TXDataWebEntityField.Create(Self);\r\n xdsticket2Status := TXDataWebEntityField.Create(Self);\r\n xdsticket2ID := TIntegerField.Create(Self);\r\n xdsticket2ErstelltAm := TDateTimeField.Create(Self);\r\n xdsticket2Betreff := TStringField.Create(Self);\r\n xdsticket2Beschreibung := TStringField.Create(Self);\r\n xdsticket2Abrechnungsbetrag := TFloatField.Create(Self);\r\n xdsticket2AbrechnungRechnungsnummer := TStringField.Create(Self);\r\n xdsticket2AberechnetAm := TDateTimeField.Create(Self);\r\n xdsticket2ErledigtAm := TDateTimeField.Create(Self);\r\n xdsticket2Nachname := TStringField.Create(Self);\r\n xdsticket2Vorname := TStringField.Create(Self);\r\n xdsticket2Email := TStringField.Create(Self);\r\n xdsticket2SystemInfo := TStringField.Create(Self);\r\n xdsticket2Loesung := TStringField.Create(Self);\r\n xdsticket2Protokoll := TStringField.Create(Self);\r\n xdsticket2ZeitaufwandMinuten := TIntegerField.Create(Self);\r\n xdsticket2AbzurechnendeMinuten := TIntegerField.Create(Self);\r\n xdsticket2AbgerechneteMinuten := TIntegerField.Create(Self);\r\n xdsticket2BenachrichtigungNEU := TDateTimeField.Create(Self);\r\n xdsticket2BenachrichtigungLoesung := TDateTimeField.Create(Self);\r\n xdsticket2InterneBemerkung := TStringField.Create(Self);\r\n xdsticket2LoesungInfoSenden := TIntegerField.Create(Self);\r\n xdsticket2Kontaktperson := TStringField.Create(Self);\r\n xdsticket2KontaktpersonEmail := TStringField.Create(Self);\r\n xdsticket2ErreichbarkeitTelefon := TStringField.Create(Self);\r\n xdsticket2ErreichbarkeitWann := TStringField.Create(Self);\r\n\r\n TC.BeforeLoadDFMValues;\r\n WebFilePicker1.BeforeLoadDFMValues;\r\n WebFilePicker2.BeforeLoadDFMValues;\r\n WebFilePicker3.BeforeLoadDFMValues;\r\n Container1.BeforeLoadDFMValues;\r\n Container2.BeforeLoadDFMValues;\r\n PanelTop.BeforeLoadDFMValues;\r\n lblSeite.BeforeLoadDFMValues;\r\n panelfunctions.BeforeLoadDFMValues;\r\n btnzurueck.BeforeLoadDFMValues;\r\n xdsKontosaldo.BeforeLoadDFMValues;\r\n xdsKontosaldoKundennummer.BeforeLoadDFMValues;\r\n xdsKontosaldoZeitaufwand.BeforeLoadDFMValues;\r\n xdsKontosaldoAbzurechnen.BeforeLoadDFMValues;\r\n xdsKontosaldoGutschrift.BeforeLoadDFMValues;\r\n xdsKontosaldoAbzug.BeforeLoadDFMValues;\r\n xdsKontosaldoSaldo.BeforeLoadDFMValues;\r\n xdsKontosaldoBetrag.BeforeLoadDFMValues;\r\n xdsKontosaldoMinutenpreis.BeforeLoadDFMValues;\r\n xdsKontosaldoSRestguthaben.BeforeLoadDFMValues;\r\n xdsTicket.BeforeLoadDFMValues;\r\n xdsTicketKundennummer.BeforeLoadDFMValues;\r\n xdsTicketProdukt.BeforeLoadDFMValues;\r\n xdsTicketKategorie.BeforeLoadDFMValues;\r\n xdsTicketPrioritaet.BeforeLoadDFMValues;\r\n xdsTicketStatus.BeforeLoadDFMValues;\r\n xdsTicketID.BeforeLoadDFMValues;\r\n xdsTicketErstelltAm.BeforeLoadDFMValues;\r\n xdsTicketBetreff.BeforeLoadDFMValues;\r\n xdsTicketBeschreibung.BeforeLoadDFMValues;\r\n xdsTicketAbrechnungsbetrag.BeforeLoadDFMValues;\r\n xdsTicketAbrechnungRechnungsnummer.BeforeLoadDFMValues;\r\n xdsTicketAberechnetAm.BeforeLoadDFMValues;\r\n xdsTicketErledigtAm.BeforeLoadDFMValues;\r\n xdsTicketNachname.BeforeLoadDFMValues;\r\n xdsTicketVorname.BeforeLoadDFMValues;\r\n xdsTicketEmail.BeforeLoadDFMValues;\r\n xdsTicketSystemInfo.BeforeLoadDFMValues;\r\n xdsTicketLoesung.BeforeLoadDFMValues;\r\n xdsTicketProtokoll.BeforeLoadDFMValues;\r\n xdsTicketZeitaufwandMinuten.BeforeLoadDFMValues;\r\n xdsTicketAbzurechnendeMinuten.BeforeLoadDFMValues;\r\n xdsTicketAbgerechneteMinuten.BeforeLoadDFMValues;\r\n xdsTicketBenachrichtigungNEU.BeforeLoadDFMValues;\r\n xdsTicketBenachrichtigungLoesung.BeforeLoadDFMValues;\r\n xdsTicketInterneBemerkung.BeforeLoadDFMValues;\r\n xdsTicketLoesungInfoSenden.BeforeLoadDFMValues;\r\n xdsTicketKontaktperson.BeforeLoadDFMValues;\r\n xdsTicketErreichbarkeitTelefon.BeforeLoadDFMValues;\r\n xdsTicketErreichbarkeitWann.BeforeLoadDFMValues;\r\n xdsTicketKontaktpersonEmail.BeforeLoadDFMValues;\r\n xdsProdukte.BeforeLoadDFMValues;\r\n xdsProdukteProdukt.BeforeLoadDFMValues;\r\n xdsKundendaten.BeforeLoadDFMValues;\r\n xdsKundendatenKundennummer.BeforeLoadDFMValues;\r\n xdsKundendatenGruppeKunden.BeforeLoadDFMValues;\r\n xdsKundendatenGruppeLieferanten.BeforeLoadDFMValues;\r\n xdsKundendatenGruppeSonstige.BeforeLoadDFMValues;\r\n xdsKundendatenGruppeNichtkunden.BeforeLoadDFMValues;\r\n xdsKundendatenKontaktgruppe.BeforeLoadDFMValues;\r\n xdsKundendatenNachname.BeforeLoadDFMValues;\r\n xdsKundendatenVorname.BeforeLoadDFMValues;\r\n xdsKundendatenAdresszeile2.BeforeLoadDFMValues;\r\n xdsKundendatenAdresszeile3.BeforeLoadDFMValues;\r\n xdsKundendatenStrasse.BeforeLoadDFMValues;\r\n xdsKundendatenPostleitzahl.BeforeLoadDFMValues;\r\n xdsKundendatenOrt.BeforeLoadDFMValues;\r\n xdsKundendatenLaenderkuerzel.BeforeLoadDFMValues;\r\n xdsKundendatenLand.BeforeLoadDFMValues;\r\n xdsKundendatenLaenderkennzeichen.BeforeLoadDFMValues;\r\n xdsKundendatenAdressanrede.BeforeLoadDFMValues;\r\n xdsKundendatenBriefanrede1.BeforeLoadDFMValues;\r\n xdsKundendatenAdresseBild.BeforeLoadDFMValues;\r\n xdsKundendatenLieferanschrift.BeforeLoadDFMValues;\r\n xdsKundendatenTelefonNummer.BeforeLoadDFMValues;\r\n xdsKundendatenTelefaxNummer.BeforeLoadDFMValues;\r\n xdsKundendatenMobilTelefon.BeforeLoadDFMValues;\r\n xdsKundendatenEMail.BeforeLoadDFMValues;\r\n xdsKundendatenInternet.BeforeLoadDFMValues;\r\n xdsKundendatenUmsatzsteuerID.BeforeLoadDFMValues;\r\n xdsKundendatenUmsatzsteuerausweis.BeforeLoadDFMValues;\r\n xdsKundendatenZahlungsbedingung.BeforeLoadDFMValues;\r\n xdsKundendatenTransportbedingung.BeforeLoadDFMValues;\r\n xdsKundendatenKeinNewsletter.BeforeLoadDFMValues;\r\n xdsKundendatenTelefonAlternativ.BeforeLoadDFMValues;\r\n xdsKundendatenTitel.BeforeLoadDFMValues;\r\n xdsKundendatenKundenklasseFarbe.BeforeLoadDFMValues;\r\n xdsKundendatenRechnungEmail.BeforeLoadDFMValues;\r\n xdsKundendatenLoginPW.BeforeLoadDFMValues;\r\n xdsKundendatenBesteuerungKey.BeforeLoadDFMValues;\r\n xdsKundendatenAuftraegeJahr.BeforeLoadDFMValues;\r\n xdsKundendatenAuftraegeVorjahr.BeforeLoadDFMValues;\r\n xdsKundendatenLieferadresseID.BeforeLoadDFMValues;\r\n xdsKundendatenUSTIDgeprueft.BeforeLoadDFMValues;\r\n xdsKundendatenKontaktverbund.BeforeLoadDFMValues;\r\n xdsKundendatenHinweis.BeforeLoadDFMValues;\r\n xdsKundendatenLatitude.BeforeLoadDFMValues;\r\n xdsKundendatenLongitude.BeforeLoadDFMValues;\r\n xdsKundendatenkmLuftlinie.BeforeLoadDFMValues;\r\n xdsKundendatenGoogleID.BeforeLoadDFMValues;\r\n xdsKundendatenGoogleUpdatedUTC.BeforeLoadDFMValues;\r\n xdsKundendatenBundesland.BeforeLoadDFMValues;\r\n xdsKundendatenRegion.BeforeLoadDFMValues;\r\n xdsKundendatenMandatsreferenz.BeforeLoadDFMValues;\r\n xdsKundendatenMandatsreferenzVom.BeforeLoadDFMValues;\r\n xdsKundendatenLastschriftArt.BeforeLoadDFMValues;\r\n xdsKundendatenMahnsperre.BeforeLoadDFMValues;\r\n xdsKundendatenSuchbegriff.BeforeLoadDFMValues;\r\n xdsKundendatenLieferanschriftDaten.BeforeLoadDFMValues;\r\n xdsKundendatenExportKasse.BeforeLoadDFMValues;\r\n xdsKundendatenLoeschvormerkungDatum.BeforeLoadDFMValues;\r\n xdsKundendatenLoeschvormerkungGrund.BeforeLoadDFMValues;\r\n xdsKundendatenPseudonymisiert.BeforeLoadDFMValues;\r\n xdsKundendatenLoginAktiv.BeforeLoadDFMValues;\r\n xdsKundendatenSonstigeDaten.BeforeLoadDFMValues;\r\n xdsStatus.BeforeLoadDFMValues;\r\n xdsStatusStatus.BeforeLoadDFMValues;\r\n xdsKategorie.BeforeLoadDFMValues;\r\n xdsKategorieKategorie.BeforeLoadDFMValues;\r\n xdsprioritaet.BeforeLoadDFMValues;\r\n xdsprioritaetPrioritaet.BeforeLoadDFMValues;\r\n xdsprioritaetPrioText.BeforeLoadDFMValues;\r\n xdsprioritaetPrioFarbe.BeforeLoadDFMValues;\r\n xdsTicketDateien.BeforeLoadDFMValues;\r\n xdsTicketDateienTicketID.BeforeLoadDFMValues;\r\n xdsTicketDateienID.BeforeLoadDFMValues;\r\n xdsTicketDateienDatumUhrzeit.BeforeLoadDFMValues;\r\n xdsTicketDateienFuerLoesung.BeforeLoadDFMValues;\r\n xdsTicketDateienDateiMime.BeforeLoadDFMValues;\r\n xdsTicketDateienDateiName.BeforeLoadDFMValues;\r\n xdsTicketDateienDateiGroesse.BeforeLoadDFMValues;\r\n xdsTicketDateienDateiInhaltText.BeforeLoadDFMValues;\r\n xdsticket2.BeforeLoadDFMValues;\r\n xdsticket2Kundennummer.BeforeLoadDFMValues;\r\n xdsticket2Produkt.BeforeLoadDFMValues;\r\n xdsticket2Kategorie.BeforeLoadDFMValues;\r\n xdsticket2Prioritaet.BeforeLoadDFMValues;\r\n xdsticket2Status.BeforeLoadDFMValues;\r\n xdsticket2ID.BeforeLoadDFMValues;\r\n xdsticket2ErstelltAm.BeforeLoadDFMValues;\r\n xdsticket2Betreff.BeforeLoadDFMValues;\r\n xdsticket2Beschreibung.BeforeLoadDFMValues;\r\n xdsticket2Abrechnungsbetrag.BeforeLoadDFMValues;\r\n xdsticket2AbrechnungRechnungsnummer.BeforeLoadDFMValues;\r\n xdsticket2AberechnetAm.BeforeLoadDFMValues;\r\n xdsticket2ErledigtAm.BeforeLoadDFMValues;\r\n xdsticket2Nachname.BeforeLoadDFMValues;\r\n xdsticket2Vorname.BeforeLoadDFMValues;\r\n xdsticket2Email.BeforeLoadDFMValues;\r\n xdsticket2SystemInfo.BeforeLoadDFMValues;\r\n xdsticket2Loesung.BeforeLoadDFMValues;\r\n xdsticket2Protokoll.BeforeLoadDFMValues;\r\n xdsticket2ZeitaufwandMinuten.BeforeLoadDFMValues;\r\n xdsticket2AbzurechnendeMinuten.BeforeLoadDFMValues;\r\n xdsticket2AbgerechneteMinuten.BeforeLoadDFMValues;\r\n xdsticket2BenachrichtigungNEU.BeforeLoadDFMValues;\r\n xdsticket2BenachrichtigungLoesung.BeforeLoadDFMValues;\r\n xdsticket2InterneBemerkung.BeforeLoadDFMValues;\r\n xdsticket2LoesungInfoSenden.BeforeLoadDFMValues;\r\n xdsticket2Kontaktperson.BeforeLoadDFMValues;\r\n xdsticket2KontaktpersonEmail.BeforeLoadDFMValues;\r\n xdsticket2ErreichbarkeitTelefon.BeforeLoadDFMValues;\r\n xdsticket2ErreichbarkeitWann.BeforeLoadDFMValues;\r\n try\r\n Name := 'TicketNeu';\r\n Width := 617;\r\n Height := 480;\r\n CSSLibrary := cssBootstrap;\r\n ElementFont := efCSS;\r\n SetEvent(Self, 'OnShow', 'WebFormShow');\r\n TC.SetParentComponent(Self);\r\n TC.Name := 'TC';\r\n TC.Left := 0;\r\n TC.Top := 344;\r\n TC.Width := 190;\r\n TC.Height := 136;\r\n TC.ElementClassName := 'table table-hover table-bordered table-striped';\r\n TC.HeightStyle := ssAuto;\r\n TC.WidthStyle := ssPercent;\r\n TC.BorderColor := clSilver;\r\n TC.ChildOrder := 2;\r\n TC.ColHeader := False;\r\n TC.ElementFont := efCSS;\r\n TC.ElementHeaderClassName := 'table-primary';\r\n TC.ElementPosition := epIgnore;\r\n TC.ElementTableClassName := 'table table-hover table-bordered table-striped';\r\n TC.WordWrap := True;\r\n TC.ColCount := 2;\r\n WebFilePicker1.SetParentComponent(Self);\r\n WebFilePicker1.Name := 'WebFilePicker1';\r\n WebFilePicker1.Left := 32;\r\n WebFilePicker1.Top := 216;\r\n WebFilePicker1.Width := 129;\r\n WebFilePicker1.Height := 19;\r\n WebFilePicker1.ElementClassName := 'form-control';\r\n WebFilePicker1.HeightStyle := ssAuto;\r\n WebFilePicker1.WidthStyle := ssAuto;\r\n WebFilePicker1.Accept := '.jpg,.jpeg,.png,.txt,.pdf,.zip';\r\n WebFilePicker1.ChildOrder := 1;\r\n WebFilePicker1.ElementFont := efCSS;\r\n WebFilePicker1.ElementPosition := epIgnore;\r\n SetEvent(WebFilePicker1, Self, 'OnChange', 'WebFilePicker1Change');\r\n SetEvent(WebFilePicker1, Self, 'OnGetFileAsBase64', 'WebFilePicker1GetFileAsBase64');\r\n WebFilePicker2.SetParentComponent(Self);\r\n WebFilePicker2.Name := 'WebFilePicker2';\r\n WebFilePicker2.Left := 32;\r\n WebFilePicker2.Top := 241;\r\n WebFilePicker2.Width := 129;\r\n WebFilePicker2.Height := 19;\r\n WebFilePicker2.ElementClassName := 'form-control';\r\n WebFilePicker2.HeightStyle := ssAuto;\r\n WebFilePicker2.WidthStyle := ssAuto;\r\n WebFilePicker2.Accept := '.jpg,.jpeg,.png,.pdf,.txt';\r\n WebFilePicker2.ChildOrder := 1;\r\n WebFilePicker2.ElementFont := efCSS;\r\n WebFilePicker2.ElementPosition := epIgnore;\r\n SetEvent(WebFilePicker2, Self, 'OnChange', 'WebFilePicker2Change');\r\n SetEvent(WebFilePicker2, Self, 'OnGetFileAsBase64', 'WebFilePicker2GetFileAsBase64');\r\n WebFilePicker3.SetParentComponent(Self);\r\n WebFilePicker3.Name := 'WebFilePicker3';\r\n WebFilePicker3.Left := 32;\r\n WebFilePicker3.Top := 266;\r\n WebFilePicker3.Width := 129;\r\n WebFilePicker3.Height := 19;\r\n WebFilePicker3.ElementClassName := 'form-control';\r\n WebFilePicker3.HeightStyle := ssAuto;\r\n WebFilePicker3.WidthStyle := ssAuto;\r\n WebFilePicker3.Accept := '.jpg,.jpeg,.png,.pdf,.txt';\r\n WebFilePicker3.ChildOrder := 1;\r\n WebFilePicker3.ElementFont := efCSS;\r\n WebFilePicker3.ElementPosition := epIgnore;\r\n SetEvent(WebFilePicker3, Self, 'OnChange', 'WebFilePicker3Change');\r\n SetEvent(WebFilePicker3, Self, 'OnGetFileAsBase64', 'WebFilePicker3GetFileAsBase64');\r\n Container1.SetParentComponent(Self);\r\n Container1.Name := 'Container1';\r\n Container1.Left := 0;\r\n Container1.Top := 0;\r\n Container1.Width := 169;\r\n Container1.Height := 41;\r\n Container1.ElementClassName := 'container-fluid rounded';\r\n Container1.HeightStyle := ssAuto;\r\n Container1.WidthStyle := ssPercent;\r\n Container1.ChildOrder := 2;\r\n Container1.ElementFont := efCSS;\r\n Container1.ElementPosition := epIgnore;\r\n Container2.SetParentComponent(Self);\r\n Container2.Name := 'Container2';\r\n Container2.Left := 0;\r\n Container2.Top := 47;\r\n Container2.Width := 169;\r\n Container2.Height := 41;\r\n Container2.ElementClassName := 'd-flex flex-wrap m-1';\r\n Container2.HeightStyle := ssAuto;\r\n Container2.WidthStyle := ssAuto;\r\n Container2.ChildOrder := 5;\r\n Container2.ElementFont := efCSS;\r\n Container2.ElementPosition := epIgnore;\r\n Container2.ScrollStyle := ssNone;\r\n PanelTop.SetParentComponent(Self);\r\n PanelTop.Name := 'PanelTop';\r\n PanelTop.Left := 0;\r\n PanelTop.Top := 94;\r\n PanelTop.Width := 463;\r\n PanelTop.Height := 76;\r\n PanelTop.ElementClassName := 'd-flex flex-wrap bg-info rounded';\r\n PanelTop.HeightStyle := ssAuto;\r\n PanelTop.WidthStyle := ssPercent;\r\n PanelTop.BorderStyle := bsNone;\r\n PanelTop.Caption := 'WebPanel1';\r\n PanelTop.ChildOrder := 2;\r\n PanelTop.Color := 8340248;\r\n PanelTop.ElementFont := efCSS;\r\n PanelTop.ElementPosition := epIgnore;\r\n PanelTop.ShowCaption := False;\r\n lblSeite.SetParentComponent(PanelTop);\r\n lblSeite.Name := 'lblSeite';\r\n lblSeite.Left := 1;\r\n lblSeite.Top := 1;\r\n lblSeite.Width := 163;\r\n lblSeite.Height := 25;\r\n lblSeite.AutoSize := False;\r\n lblSeite.Caption := 'Neues Ticket';\r\n lblSeite.ElementClassName := 'h2 text-light m-1';\r\n lblSeite.ElementLabelClassName := 'align-self-start';\r\n lblSeite.ElementFont := efCSS;\r\n lblSeite.ElementPosition := epIgnore;\r\n lblSeite.Font.Charset := DEFAULT_CHARSET;\r\n lblSeite.Font.Color := clWindowText;\r\n lblSeite.Font.Height := -19;\r\n lblSeite.Font.Name := 'Segoe UI';\r\n lblSeite.Font.Style := [];\r\n lblSeite.HeightStyle := ssAuto;\r\n lblSeite.HeightPercent := 100.000000000000000000;\r\n lblSeite.ParentFont := False;\r\n lblSeite.WidthStyle := ssPercent;\r\n lblSeite.WidthPercent := 100.000000000000000000;\r\n panelfunctions.SetParentComponent(Self);\r\n panelfunctions.Name := 'panelfunctions';\r\n panelfunctions.Left := 8;\r\n panelfunctions.Top := 212;\r\n panelfunctions.Width := 257;\r\n panelfunctions.Height := 37;\r\n panelfunctions.ElementClassName := 'd-flex flex-wrap';\r\n panelfunctions.HeightStyle := ssAuto;\r\n panelfunctions.WidthStyle := ssPercent;\r\n panelfunctions.BorderColor := 13892310;\r\n panelfunctions.BorderStyle := bsNone;\r\n panelfunctions.ChildOrder := 1;\r\n panelfunctions.Color := clWhite;\r\n panelfunctions.ElementFont := efCSS;\r\n panelfunctions.ElementPosition := epIgnore;\r\n panelfunctions.ShowCaption := False;\r\n btnzurueck.SetParentComponent(panelfunctions);\r\n btnzurueck.Name := 'btnzurueck';\r\n btnzurueck.Left := 0;\r\n btnzurueck.Top := 3;\r\n btnzurueck.Width := 96;\r\n btnzurueck.Height := 25;\r\n btnzurueck.Caption := '<< zur'#252'ck';\r\n btnzurueck.ChildOrder := 4;\r\n btnzurueck.ElementClassName := 'btn btn-sm bg-info m-1';\r\n btnzurueck.ElementFont := efCSS;\r\n btnzurueck.ElementPosition := epIgnore;\r\n btnzurueck.HeightStyle := ssAuto;\r\n btnzurueck.HeightPercent := 100.000000000000000000;\r\n btnzurueck.WidthStyle := ssAuto;\r\n btnzurueck.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnzurueck, Self, 'OnClick', 'btnzurueckClick');\r\n xdsKontosaldo.SetParentComponent(Self);\r\n xdsKontosaldo.Name := 'xdsKontosaldo';\r\n xdsKontosaldo.AfterOpen := xdsKontosaldoAfterOpen;\r\n xdsKontosaldo.EntitySetName := 'ITS_Kontosalden';\r\n xdsKontosaldo.Connection := DM2.XDataWebConnection1;\r\n xdsKontosaldo.Left := 32;\r\n xdsKontosaldo.Top := 288;\r\n xdsKontosaldoKundennummer.SetParentComponent(xdsKontosaldo);\r\n xdsKontosaldoKundennummer.Name := 'xdsKontosaldoKundennummer';\r\n xdsKontosaldoKundennummer.FieldName := 'Kundennummer';\r\n xdsKontosaldoKundennummer.Required := True;\r\n xdsKontosaldoKundennummer.Size := 13;\r\n xdsKontosaldoZeitaufwand.SetParentComponent(xdsKontosaldo);\r\n xdsKontosaldoZeitaufwand.Name := 'xdsKontosaldoZeitaufwand';\r\n xdsKontosaldoZeitaufwand.FieldName := 'Zeitaufwand';\r\n xdsKontosaldoAbzurechnen.SetParentComponent(xdsKontosaldo);\r\n xdsKontosaldoAbzurechnen.Name := 'xdsKontosaldoAbzurechnen';\r\n xdsKontosaldoAbzurechnen.FieldName := 'Abzurechnen';\r\n xdsKontosaldoGutschrift.SetParentComponent(xdsKontosaldo);\r\n xdsKontosaldoGutschrift.Name := 'xdsKontosaldoGutschrift';\r\n xdsKontosaldoGutschrift.FieldName := 'Gutschrift';\r\n xdsKontosaldoAbzug.SetParentComponent(xdsKontosaldo);\r\n xdsKontosaldoAbzug.Name := 'xdsKontosaldoAbzug';\r\n xdsKontosaldoAbzug.FieldName := 'Abzug';\r\n xdsKontosaldoSaldo.SetParentComponent(xdsKontosaldo);\r\n xdsKontosaldoSaldo.Name := 'xdsKontosaldoSaldo';\r\n xdsKontosaldoSaldo.FieldName := 'Saldo';\r\n xdsKontosaldoBetrag.SetParentComponent(xdsKontosaldo);\r\n xdsKontosaldoBetrag.Name := 'xdsKontosaldoBetrag';\r\n xdsKontosaldoBetrag.FieldName := 'Betrag';\r\n xdsKontosaldoMinutenpreis.SetParentComponent(xdsKontosaldo);\r\n xdsKontosaldoMinutenpreis.Name := 'xdsKontosaldoMinutenpreis';\r\n xdsKontosaldoMinutenpreis.FieldName := 'Minutenpreis';\r\n xdsKontosaldoSRestguthaben.SetParentComponent(xdsKontosaldo);\r\n xdsKontosaldoSRestguthaben.Name := 'xdsKontosaldoSRestguthaben';\r\n xdsKontosaldoSRestguthaben.FieldName := 'SRestguthaben';\r\n xdsTicket.SetParentComponent(Self);\r\n xdsTicket.Name := 'xdsTicket';\r\n xdsTicket.AfterApplyUpdates := xdsTicketAfterApplyUpdates;\r\n xdsTicket.AfterOpen := xdsTicketAfterOpen;\r\n xdsTicket.AfterPost := xdsTicketAfterPost;\r\n xdsTicket.EntitySetName := 'ITS_TicketMain';\r\n xdsTicket.Connection := DM2.XDataWebConnection1;\r\n xdsTicket.QueryTop := 1;\r\n xdsTicket.Left := 32;\r\n xdsTicket.Top := 360;\r\n xdsTicketKundennummer.SetParentComponent(xdsTicket);\r\n xdsTicketKundennummer.Name := 'xdsTicketKundennummer';\r\n xdsTicketKundennummer.FieldName := 'Kundennummer';\r\n xdsTicketProdukt.SetParentComponent(xdsTicket);\r\n xdsTicketProdukt.Name := 'xdsTicketProdukt';\r\n xdsTicketProdukt.FieldName := 'Produkt';\r\n xdsTicketKategorie.SetParentComponent(xdsTicket);\r\n xdsTicketKategorie.Name := 'xdsTicketKategorie';\r\n xdsTicketKategorie.FieldName := 'Kategorie';\r\n xdsTicketPrioritaet.SetParentComponent(xdsTicket);\r\n xdsTicketPrioritaet.Name := 'xdsTicketPrioritaet';\r\n xdsTicketPrioritaet.FieldName := 'Prioritaet';\r\n xdsTicketStatus.SetParentComponent(xdsTicket);\r\n xdsTicketStatus.Name := 'xdsTicketStatus';\r\n xdsTicketStatus.FieldName := 'Status';\r\n xdsTicketID.SetParentComponent(xdsTicket);\r\n xdsTicketID.Name := 'xdsTicketID';\r\n xdsTicketID.FieldName := 'ID';\r\n xdsTicketID.Required := True;\r\n xdsTicketErstelltAm.SetParentComponent(xdsTicket);\r\n xdsTicketErstelltAm.Name := 'xdsTicketErstelltAm';\r\n xdsTicketErstelltAm.FieldName := 'ErstelltAm';\r\n xdsTicketBetreff.SetParentComponent(xdsTicket);\r\n xdsTicketBetreff.Name := 'xdsTicketBetreff';\r\n xdsTicketBetreff.FieldName := 'Betreff';\r\n xdsTicketBetreff.Size := 100;\r\n xdsTicketBeschreibung.SetParentComponent(xdsTicket);\r\n xdsTicketBeschreibung.Name := 'xdsTicketBeschreibung';\r\n xdsTicketBeschreibung.FieldName := 'Beschreibung';\r\n xdsTicketBeschreibung.Size := 255;\r\n xdsTicketAbrechnungsbetrag.SetParentComponent(xdsTicket);\r\n xdsTicketAbrechnungsbetrag.Name := 'xdsTicketAbrechnungsbetrag';\r\n xdsTicketAbrechnungsbetrag.FieldName := 'Abrechnungsbetrag';\r\n xdsTicketAbrechnungRechnungsnummer.SetParentComponent(xdsTicket);\r\n xdsTicketAbrechnungRechnungsnummer.Name := 'xdsTicketAbrechnungRechnungsnummer';\r\n xdsTicketAbrechnungRechnungsnummer.FieldName := 'AbrechnungRechnungsnummer';\r\n xdsTicketAbrechnungRechnungsnummer.Size := 10;\r\n xdsTicketAberechnetAm.SetParentComponent(xdsTicket);\r\n xdsTicketAberechnetAm.Name := 'xdsTicketAberechnetAm';\r\n xdsTicketAberechnetAm.FieldName := 'AberechnetAm';\r\n xdsTicketErledigtAm.SetParentComponent(xdsTicket);\r\n xdsTicketErledigtAm.Name := 'xdsTicketErledigtAm';\r\n xdsTicketErledigtAm.FieldName := 'ErledigtAm';\r\n xdsTicketNachname.SetParentComponent(xdsTicket);\r\n xdsTicketNachname.Name := 'xdsTicketNachname';\r\n xdsTicketNachname.FieldName := 'Nachname';\r\n xdsTicketNachname.Size := 40;\r\n xdsTicketVorname.SetParentComponent(xdsTicket);\r\n xdsTicketVorname.Name := 'xdsTicketVorname';\r\n xdsTicketVorname.FieldName := 'Vorname';\r\n xdsTicketVorname.Size := 40;\r\n xdsTicketEmail.SetParentComponent(xdsTicket);\r\n xdsTicketEmail.Name := 'xdsTicketEmail';\r\n xdsTicketEmail.FieldName := 'Email';\r\n xdsTicketEmail.Size := 50;\r\n xdsTicketSystemInfo.SetParentComponent(xdsTicket);\r\n xdsTicketSystemInfo.Name := 'xdsTicketSystemInfo';\r\n xdsTicketSystemInfo.FieldName := 'SystemInfo';\r\n xdsTicketSystemInfo.Size := 255;\r\n xdsTicketLoesung.SetParentComponent(xdsTicket);\r\n xdsTicketLoesung.Name := 'xdsTicketLoesung';\r\n xdsTicketLoesung.FieldName := 'Loesung';\r\n xdsTicketLoesung.Size := 255;\r\n xdsTicketProtokoll.SetParentComponent(xdsTicket);\r\n xdsTicketProtokoll.Name := 'xdsTicketProtokoll';\r\n xdsTicketProtokoll.FieldName := 'Protokoll';\r\n xdsTicketProtokoll.Size := 255;\r\n xdsTicketZeitaufwandMinuten.SetParentComponent(xdsTicket);\r\n xdsTicketZeitaufwandMinuten.Name := 'xdsTicketZeitaufwandMinuten';\r\n xdsTicketZeitaufwandMinuten.FieldName := 'ZeitaufwandMinuten';\r\n xdsTicketAbzurechnendeMinuten.SetParentComponent(xdsTicket);\r\n xdsTicketAbzurechnendeMinuten.Name := 'xdsTicketAbzurechnendeMinuten';\r\n xdsTicketAbzurechnendeMinuten.FieldName := 'AbzurechnendeMinuten';\r\n xdsTicketAbgerechneteMinuten.SetParentComponent(xdsTicket);\r\n xdsTicketAbgerechneteMinuten.Name := 'xdsTicketAbgerechneteMinuten';\r\n xdsTicketAbgerechneteMinuten.FieldName := 'AbgerechneteMinuten';\r\n xdsTicketBenachrichtigungNEU.SetParentComponent(xdsTicket);\r\n xdsTicketBenachrichtigungNEU.Name := 'xdsTicketBenachrichtigungNEU';\r\n xdsTicketBenachrichtigungNEU.FieldName := 'BenachrichtigungNEU';\r\n xdsTicketBenachrichtigungLoesung.SetParentComponent(xdsTicket);\r\n xdsTicketBenachrichtigungLoesung.Name := 'xdsTicketBenachrichtigungLoesung';\r\n xdsTicketBenachrichtigungLoesung.FieldName := 'BenachrichtigungLoesung';\r\n xdsTicketInterneBemerkung.SetParentComponent(xdsTicket);\r\n xdsTicketInterneBemerkung.Name := 'xdsTicketInterneBemerkung';\r\n xdsTicketInterneBemerkung.FieldName := 'InterneBemerkung';\r\n xdsTicketInterneBemerkung.Size := 255;\r\n xdsTicketLoesungInfoSenden.SetParentComponent(xdsTicket);\r\n xdsTicketLoesungInfoSenden.Name := 'xdsTicketLoesungInfoSenden';\r\n xdsTicketLoesungInfoSenden.FieldName := 'LoesungInfoSenden';\r\n xdsTicketKontaktperson.SetParentComponent(xdsTicket);\r\n xdsTicketKontaktperson.Name := 'xdsTicketKontaktperson';\r\n xdsTicketKontaktperson.FieldName := 'Kontaktperson';\r\n xdsTicketKontaktperson.Size := 100;\r\n xdsTicketErreichbarkeitTelefon.SetParentComponent(xdsTicket);\r\n xdsTicketErreichbarkeitTelefon.Name := 'xdsTicketErreichbarkeitTelefon';\r\n xdsTicketErreichbarkeitTelefon.FieldName := 'ErreichbarkeitTelefon';\r\n xdsTicketErreichbarkeitTelefon.Size := 100;\r\n xdsTicketErreichbarkeitWann.SetParentComponent(xdsTicket);\r\n xdsTicketErreichbarkeitWann.Name := 'xdsTicketErreichbarkeitWann';\r\n xdsTicketErreichbarkeitWann.FieldName := 'ErreichbarkeitWann';\r\n xdsTicketErreichbarkeitWann.Size := 100;\r\n xdsTicketKontaktpersonEmail.SetParentComponent(xdsTicket);\r\n xdsTicketKontaktpersonEmail.Name := 'xdsTicketKontaktpersonEmail';\r\n xdsTicketKontaktpersonEmail.FieldName := 'KontaktpersonEmail';\r\n xdsTicketKontaktpersonEmail.Size := 100;\r\n xdsProdukte.SetParentComponent(Self);\r\n xdsProdukte.Name := 'xdsProdukte';\r\n xdsProdukte.AfterOpen := xdsProdukteAfterOpen;\r\n xdsProdukte.EntitySetName := 'ITS_Produkte';\r\n xdsProdukte.Connection := DM2.XDataWebConnection1;\r\n xdsProdukte.Left := 32;\r\n xdsProdukte.Top := 416;\r\n xdsProdukteProdukt.SetParentComponent(xdsProdukte);\r\n xdsProdukteProdukt.Name := 'xdsProdukteProdukt';\r\n xdsProdukteProdukt.FieldName := 'Produkt';\r\n xdsProdukteProdukt.Required := True;\r\n xdsProdukteProdukt.Size := 50;\r\n xdsKundendaten.SetParentComponent(Self);\r\n xdsKundendaten.Name := 'xdsKundendaten';\r\n xdsKundendaten.AfterOpen := xdsKundendatenAfterOpen;\r\n xdsKundendaten.EntitySetName := 'Adressen';\r\n xdsKundendaten.Connection := DM2.XDataWebConnection1;\r\n xdsKundendaten.Left := 32;\r\n xdsKundendaten.Top := 232;\r\n xdsKundendatenKundennummer.SetParentComponent(xdsKundendaten);\r\n xdsKundendatenKundennummer.Name := 'xdsKundendatenKundennummer';\r\n xdsKundendatenKundennummer.FieldName := 'Kundennummer';\r\n xdsKundendatenKundennummer.Required := True;\r\n xdsKundendatenKundennummer.Size := 13;\r\n xdsKundendatenGruppeKunden.SetParentComponent(xdsKundendaten);\r\n xdsKundendatenGruppeKunden.Name := 'xdsKundendatenGruppeKunden';\r\n xdsKundendatenGruppeKunden.FieldName := 'GruppeKunden';\r\n xdsKundendatenGruppeLieferanten.SetParentComponent(xdsKundendaten);\r\n xdsKundendatenGruppeLieferanten.Name := 'xdsKundendatenGruppeLieferanten';\r\n xdsKundendatenGruppeLieferanten.FieldName := 'GruppeLieferanten';\r\n xdsKundendatenGruppeSonstige.SetParentComponent(xdsKundendaten);\r\n xdsKundendatenGruppeSonstige.Name := 'xdsKundendatenGruppeSonstige';\r\n xdsKundendatenGruppeSonstige.FieldName := 'GruppeSonstige';\r\n xdsKundendatenGruppeNichtkunden.SetParentComponent(xdsKundendaten);\r\n xdsKundendatenGruppeNichtkunden.Name := 'xdsKundendatenGruppeNichtkunden';\r\n xdsKundendatenGruppeNichtkunden.FieldName := 'GruppeNichtkunden';\r\n xdsKundendatenKontaktgruppe.SetParentComponent(xdsKundendaten);\r\n xdsKundendatenKontaktgruppe.Name := 'xdsKundendatenKontaktgruppe';\r\n xdsKundendatenKontaktgruppe.FieldName := 'Kontaktgruppe';\r\n xdsKundendatenKontaktgruppe.Size := 50;\r\n xdsKundendatenNachname.SetParentComponent(xdsKundendaten);\r\n xdsKundendatenNachname.Name := 'xdsKundendatenNachname';\r\n xdsKundendatenNachname.FieldName := 'Nachname';\r\n xdsKundendatenNachname.Size := 40;\r\n xdsKundendatenVorname.SetParentComponent(xdsKundendaten);\r\n xdsKundendatenVorname.Name := 'xdsKundendatenVorname';\r\n xdsKundendatenVorname.FieldName := 'Vorname';\r\n xdsKundendatenVorname.Size := 40;\r\n xdsKundendatenAdresszeile2.SetParentComponent(xdsKundendaten);\r\n xdsKundendatenAdresszeile2.Name := 'xdsKundendatenAdresszeile2';\r\n xdsKundendatenAdresszeile2.FieldName := 'Adresszeile2';\r\n xdsKundendatenAdresszeile2.Size := 40;\r\n xdsKundendatenAdresszeile3.SetParentComponent(xdsKundendaten);\r\n xdsKundendatenAdresszeile3.Name := 'xdsKundendatenAdresszeile3';\r\n xdsKundendatenAdresszeile3.FieldName := 'Adresszeile3';\r\n xdsKundendatenAdresszeile3.Size := 40;\r\n xdsKundendatenStrasse.SetParentComponent(xdsKundendaten);\r\n xdsKundendatenStrasse.Name := 'xdsKundendatenStrasse';\r\n xdsKundendatenStrasse.FieldName := 'Strasse';\r\n xdsKundendatenStrasse.Size := 40;\r\n xdsKundendatenPostleitzahl.SetParentComponent(xdsKundendaten);\r\n xdsKundendatenPostleitzahl.Name := 'xdsKundendatenPostleitzahl';\r\n xdsKundendatenPostleitzahl.FieldName := 'Postleitzahl';\r\n xdsKundendatenPostleitzahl.Size := 6;\r\n xdsKundendatenOrt.SetParentComponent(xdsKundendaten);\r\n xdsKundendatenOrt.Name := 'xdsKundendatenOrt';\r\n xdsKundendatenOrt.FieldName := 'Ort';\r\n xdsKundendatenOrt.Size := 40;\r\n xdsKundendatenLaenderkuerzel.SetParentComponent(xdsKundendaten);\r\n xdsKundendatenLaenderkuerzel.Name := 'xdsKundendatenLaenderkuerzel';\r\n xdsKundendatenLaenderkuerzel.FieldName := 'Laenderkuerzel';\r\n xdsKundendatenLaenderkuerzel.Size := 5;\r\n xdsKundendatenLand.SetParentComponent(xdsKundendaten);\r\n xdsKundendatenLand.Name := 'xdsKundendatenLand';\r\n xdsKundendatenLand.FieldName := 'Land';\r\n xdsKundendatenLand.Size := 40;\r\n xdsKundendatenLaenderkennzeichen.SetParentComponent(xdsKundendaten);\r\n xdsKundendatenLaenderkennzeichen.Name := 'xdsKundendatenLaenderkennzeichen';\r\n xdsKundendatenLaenderkennzeichen.FieldName := 'Laenderkennzeichen';\r\n xdsKundendatenAdressanrede.SetParentComponent(xdsKundendaten);\r\n xdsKundendatenAdressanrede.Name := 'xdsKundendatenAdressanrede';\r\n xdsKundendatenAdressanrede.FieldName := 'Adressanrede';\r\n xdsKundendatenAdressanrede.Size := 15;\r\n xdsKundendatenBriefanrede1.SetParentComponent(xdsKundendaten);\r\n xdsKundendatenBriefanrede1.Name := 'xdsKundendatenBriefanrede1';\r\n xdsKundendatenBriefanrede1.FieldName := 'Briefanrede1';\r\n xdsKundendatenBriefanrede1.Size := 255;\r\n xdsKundendatenAdresseBild.SetParentComponent(xdsKundendaten);\r\n xdsKundendatenAdresseBild.Name := 'xdsKundendatenAdresseBild';\r\n xdsKundendatenAdresseBild.FieldName := 'AdresseBild';\r\n xdsKundendatenAdresseBild.Size := 255;\r\n xdsKundendatenLieferanschrift.SetParentComponent(xdsKundendaten);\r\n xdsKundendatenLieferanschrift.Name := 'xdsKundendatenLieferanschrift';\r\n xdsKundendatenLieferanschrift.FieldName := 'Lieferanschrift';\r\n xdsKundendatenLieferanschrift.Size := 255;\r\n xdsKundendatenTelefonNummer.SetParentComponent(xdsKundendaten);\r\n xdsKundendatenTelefonNummer.Name := 'xdsKundendatenTelefonNummer';\r\n xdsKundendatenTelefonNummer.FieldName := 'TelefonNummer';\r\n xdsKundendatenTelefonNummer.Size := 25;\r\n xdsKundendatenTelefaxNummer.SetParentComponent(xdsKundendaten);\r\n xdsKundendatenTelefaxNummer.Name := 'xdsKundendatenTelefaxNummer';\r\n xdsKundendatenTelefaxNummer.FieldName := 'TelefaxNummer';\r\n xdsKundendatenTelefaxNummer.Size := 25;\r\n xdsKundendatenMobilTelefon.SetParentComponent(xdsKundendaten);\r\n xdsKundendatenMobilTelefon.Name := 'xdsKundendatenMobilTelefon';\r\n xdsKundendatenMobilTelefon.FieldName := 'MobilTelefon';\r\n xdsKundendatenMobilTelefon.Size := 25;\r\n xdsKundendatenEMail.SetParentComponent(xdsKundendaten);\r\n xdsKundendatenEMail.Name := 'xdsKundendatenEMail';\r\n xdsKundendatenEMail.FieldName := 'EMail';\r\n xdsKundendatenEMail.Size := 50;\r\n xdsKundendatenInternet.SetParentComponent(xdsKundendaten);\r\n xdsKundendatenInternet.Name := 'xdsKundendatenInternet';\r\n xdsKundendatenInternet.FieldName := 'Internet';\r\n xdsKundendatenInternet.Size := 50;\r\n xdsKundendatenUmsatzsteuerID.SetParentComponent(xdsKundendaten);\r\n xdsKundendatenUmsatzsteuerID.Name := 'xdsKundendatenUmsatzsteuerID';\r\n xdsKundendatenUmsatzsteuerID.FieldName := 'UmsatzsteuerID';\r\n xdsKundendatenUmsatzsteuerausweis.SetParentComponent(xdsKundendaten);\r\n xdsKundendatenUmsatzsteuerausweis.Name := 'xdsKundendatenUmsatzsteuerausweis';\r\n xdsKundendatenUmsatzsteuerausweis.FieldName := 'Umsatzsteuerausweis';\r\n xdsKundendatenZahlungsbedingung.SetParentComponent(xdsKundendaten);\r\n xdsKundendatenZahlungsbedingung.Name := 'xdsKundendatenZahlungsbedingung';\r\n xdsKundendatenZahlungsbedingung.FieldName := 'Zahlungsbedingung';\r\n xdsKundendatenTransportbedingung.SetParentComponent(xdsKundendaten);\r\n xdsKundendatenTransportbedingung.Name := 'xdsKundendatenTransportbedingung';\r\n xdsKundendatenTransportbedingung.FieldName := 'Transportbedingung';\r\n xdsKundendatenTransportbedingung.Size := 100;\r\n xdsKundendatenKeinNewsletter.SetParentComponent(xdsKundendaten);\r\n xdsKundendatenKeinNewsletter.Name := 'xdsKundendatenKeinNewsletter';\r\n xdsKundendatenKeinNewsletter.FieldName := 'KeinNewsletter';\r\n xdsKundendatenTelefonAlternativ.SetParentComponent(xdsKundendaten);\r\n xdsKundendatenTelefonAlternativ.Name := 'xdsKundendatenTelefonAlternativ';\r\n xdsKundendatenTelefonAlternativ.FieldName := 'TelefonAlternativ';\r\n xdsKundendatenTelefonAlternativ.Size := 50;\r\n xdsKundendatenTitel.SetParentComponent(xdsKundendaten);\r\n xdsKundendatenTitel.Name := 'xdsKundendatenTitel';\r\n xdsKundendatenTitel.FieldName := 'Titel';\r\n xdsKundendatenKundenklasseFarbe.SetParentComponent(xdsKundendaten);\r\n xdsKundendatenKundenklasseFarbe.Name := 'xdsKundendatenKundenklasseFarbe';\r\n xdsKundendatenKundenklasseFarbe.FieldName := 'KundenklasseFarbe';\r\n xdsKundendatenRechnungEmail.SetParentComponent(xdsKundendaten);\r\n xdsKundendatenRechnungEmail.Name := 'xdsKundendatenRechnungEmail';\r\n xdsKundendatenRechnungEmail.FieldName := 'RechnungEmail';\r\n xdsKundendatenRechnungEmail.Size := 50;\r\n xdsKundendatenLoginPW.SetParentComponent(xdsKundendaten);\r\n xdsKundendatenLoginPW.Name := 'xdsKundendatenLoginPW';\r\n xdsKundendatenLoginPW.FieldName := 'LoginPW';\r\n xdsKundendatenBesteuerungKey.SetParentComponent(xdsKundendaten);\r\n xdsKundendatenBesteuerungKey.Name := 'xdsKundendatenBesteuerungKey';\r\n xdsKundendatenBesteuerungKey.FieldName := 'BesteuerungKey';\r\n xdsKundendatenAuftraegeJahr.SetParentComponent(xdsKundendaten);\r\n xdsKundendatenAuftraegeJahr.Name := 'xdsKundendatenAuftraegeJahr';\r\n xdsKundendatenAuftraegeJahr.FieldName := 'AuftraegeJahr';\r\n xdsKundendatenAuftraegeVorjahr.SetParentComponent(xdsKundendaten);\r\n xdsKundendatenAuftraegeVorjahr.Name := 'xdsKundendatenAuftraegeVorjahr';\r\n xdsKundendatenAuftraegeVorjahr.FieldName := 'AuftraegeVorjahr';\r\n xdsKundendatenLieferadresseID.SetParentComponent(xdsKundendaten);\r\n xdsKundendatenLieferadresseID.Name := 'xdsKundendatenLieferadresseID';\r\n xdsKundendatenLieferadresseID.FieldName := 'LieferadresseID';\r\n xdsKundendatenUSTIDgeprueft.SetParentComponent(xdsKundendaten);\r\n xdsKundendatenUSTIDgeprueft.Name := 'xdsKundendatenUSTIDgeprueft';\r\n xdsKundendatenUSTIDgeprueft.FieldName := 'USTIDgeprueft';\r\n xdsKundendatenKontaktverbund.SetParentComponent(xdsKundendaten);\r\n xdsKundendatenKontaktverbund.Name := 'xdsKundendatenKontaktverbund';\r\n xdsKundendatenKontaktverbund.FieldName := 'Kontaktverbund';\r\n xdsKundendatenKontaktverbund.Size := 25;\r\n xdsKundendatenHinweis.SetParentComponent(xdsKundendaten);\r\n xdsKundendatenHinweis.Name := 'xdsKundendatenHinweis';\r\n xdsKundendatenHinweis.FieldName := 'Hinweis';\r\n xdsKundendatenHinweis.Size := 255;\r\n xdsKundendatenLatitude.SetParentComponent(xdsKundendaten);\r\n xdsKundendatenLatitude.Name := 'xdsKundendatenLatitude';\r\n xdsKundendatenLatitude.FieldName := 'Latitude';\r\n xdsKundendatenLongitude.SetParentComponent(xdsKundendaten);\r\n xdsKundendatenLongitude.Name := 'xdsKundendatenLongitude';\r\n xdsKundendatenLongitude.FieldName := 'Longitude';\r\n xdsKundendatenkmLuftlinie.SetParentComponent(xdsKundendaten);\r\n xdsKundendatenkmLuftlinie.Name := 'xdsKundendatenkmLuftlinie';\r\n xdsKundendatenkmLuftlinie.FieldName := 'kmLuftlinie';\r\n xdsKundendatenGoogleID.SetParentComponent(xdsKundendaten);\r\n xdsKundendatenGoogleID.Name := 'xdsKundendatenGoogleID';\r\n xdsKundendatenGoogleID.FieldName := 'GoogleID';\r\n xdsKundendatenGoogleID.Size := 50;\r\n xdsKundendatenGoogleUpdatedUTC.SetParentComponent(xdsKundendaten);\r\n xdsKundendatenGoogleUpdatedUTC.Name := 'xdsKundendatenGoogleUpdatedUTC';\r\n xdsKundendatenGoogleUpdatedUTC.FieldName := 'GoogleUpdatedUTC';\r\n xdsKundendatenBundesland.SetParentComponent(xdsKundendaten);\r\n xdsKundendatenBundesland.Name := 'xdsKundendatenBundesland';\r\n xdsKundendatenBundesland.FieldName := 'Bundesland';\r\n xdsKundendatenBundesland.Size := 50;\r\n xdsKundendatenRegion.SetParentComponent(xdsKundendaten);\r\n xdsKundendatenRegion.Name := 'xdsKundendatenRegion';\r\n xdsKundendatenRegion.FieldName := 'Region';\r\n xdsKundendatenRegion.Size := 50;\r\n xdsKundendatenMandatsreferenz.SetParentComponent(xdsKundendaten);\r\n xdsKundendatenMandatsreferenz.Name := 'xdsKundendatenMandatsreferenz';\r\n xdsKundendatenMandatsreferenz.FieldName := 'Mandatsreferenz';\r\n xdsKundendatenMandatsreferenz.Size := 34;\r\n xdsKundendatenMandatsreferenzVom.SetParentComponent(xdsKundendaten);\r\n xdsKundendatenMandatsreferenzVom.Name := 'xdsKundendatenMandatsreferenzVom';\r\n xdsKundendatenMandatsreferenzVom.FieldName := 'MandatsreferenzVom';\r\n xdsKundendatenLastschriftArt.SetParentComponent(xdsKundendaten);\r\n xdsKundendatenLastschriftArt.Name := 'xdsKundendatenLastschriftArt';\r\n xdsKundendatenLastschriftArt.FieldName := 'LastschriftArt';\r\n xdsKundendatenLastschriftArt.Size := 2;\r\n xdsKundendatenMahnsperre.SetParentComponent(xdsKundendaten);\r\n xdsKundendatenMahnsperre.Name := 'xdsKundendatenMahnsperre';\r\n xdsKundendatenMahnsperre.FieldName := 'Mahnsperre';\r\n xdsKundendatenSuchbegriff.SetParentComponent(xdsKundendaten);\r\n xdsKundendatenSuchbegriff.Name := 'xdsKundendatenSuchbegriff';\r\n xdsKundendatenSuchbegriff.FieldName := 'Suchbegriff';\r\n xdsKundendatenSuchbegriff.Size := 25;\r\n xdsKundendatenLieferanschriftDaten.SetParentComponent(xdsKundendaten);\r\n xdsKundendatenLieferanschriftDaten.Name := 'xdsKundendatenLieferanschriftDaten';\r\n xdsKundendatenLieferanschriftDaten.FieldName := 'LieferanschriftDaten';\r\n xdsKundendatenLieferanschriftDaten.Size := 255;\r\n xdsKundendatenExportKasse.SetParentComponent(xdsKundendaten);\r\n xdsKundendatenExportKasse.Name := 'xdsKundendatenExportKasse';\r\n xdsKundendatenExportKasse.FieldName := 'ExportKasse';\r\n xdsKundendatenLoeschvormerkungDatum.SetParentComponent(xdsKundendaten);\r\n xdsKundendatenLoeschvormerkungDatum.Name := 'xdsKundendatenLoeschvormerkungDatum';\r\n xdsKundendatenLoeschvormerkungDatum.FieldName := 'LoeschvormerkungDatum';\r\n xdsKundendatenLoeschvormerkungGrund.SetParentComponent(xdsKundendaten);\r\n xdsKundendatenLoeschvormerkungGrund.Name := 'xdsKundendatenLoeschvormerkungGrund';\r\n xdsKundendatenLoeschvormerkungGrund.FieldName := 'LoeschvormerkungGrund';\r\n xdsKundendatenLoeschvormerkungGrund.Size := 250;\r\n xdsKundendatenPseudonymisiert.SetParentComponent(xdsKundendaten);\r\n xdsKundendatenPseudonymisiert.Name := 'xdsKundendatenPseudonymisiert';\r\n xdsKundendatenPseudonymisiert.FieldName := 'Pseudonymisiert';\r\n xdsKundendatenPseudonymisiert.Size := 255;\r\n xdsKundendatenLoginAktiv.SetParentComponent(xdsKundendaten);\r\n xdsKundendatenLoginAktiv.Name := 'xdsKundendatenLoginAktiv';\r\n xdsKundendatenLoginAktiv.FieldName := 'LoginAktiv';\r\n xdsKundendatenSonstigeDaten.SetParentComponent(xdsKundendaten);\r\n xdsKundendatenSonstigeDaten.Name := 'xdsKundendatenSonstigeDaten';\r\n xdsKundendatenSonstigeDaten.FieldName := 'SonstigeDaten';\r\n xdsKundendatenSonstigeDaten.Size := 255;\r\n xdsStatus.SetParentComponent(Self);\r\n xdsStatus.Name := 'xdsStatus';\r\n xdsStatus.AfterOpen := xdsStatusAfterOpen;\r\n xdsStatus.EntitySetName := 'ITS_TicketStatus';\r\n xdsStatus.Connection := DM2.XDataWebConnection1;\r\n xdsStatus.Left := 32;\r\n xdsStatus.Top := 168;\r\n xdsStatusStatus.SetParentComponent(xdsStatus);\r\n xdsStatusStatus.Name := 'xdsStatusStatus';\r\n xdsStatusStatus.FieldName := 'Status';\r\n xdsStatusStatus.Required := True;\r\n xdsStatusStatus.Size := 25;\r\n xdsKategorie.SetParentComponent(Self);\r\n xdsKategorie.Name := 'xdsKategorie';\r\n xdsKategorie.AfterOpen := xdsKategorieAfterOpen;\r\n xdsKategorie.EntitySetName := 'ITS_TicketKategorie';\r\n xdsKategorie.Connection := DM2.XDataWebConnection1;\r\n xdsKategorie.Left := 32;\r\n xdsKategorie.Top := 112;\r\n xdsKategorieKategorie.SetParentComponent(xdsKategorie);\r\n xdsKategorieKategorie.Name := 'xdsKategorieKategorie';\r\n xdsKategorieKategorie.FieldName := 'Kategorie';\r\n xdsKategorieKategorie.Required := True;\r\n xdsKategorieKategorie.Size := 25;\r\n xdsprioritaet.SetParentComponent(Self);\r\n xdsprioritaet.Name := 'xdsprioritaet';\r\n xdsprioritaet.AfterOpen := xdsprioritaetAfterOpen;\r\n xdsprioritaet.EntitySetName := 'ITS_TicketPrioritaet';\r\n xdsprioritaet.Connection := DM2.XDataWebConnection1;\r\n xdsprioritaet.QueryString := '$filter=Prioritaet gt 0';\r\n xdsprioritaet.Left := 32;\r\n xdsprioritaet.Top := 56;\r\n xdsprioritaetPrioritaet.SetParentComponent(xdsprioritaet);\r\n xdsprioritaetPrioritaet.Name := 'xdsprioritaetPrioritaet';\r\n xdsprioritaetPrioritaet.FieldName := 'Prioritaet';\r\n xdsprioritaetPrioritaet.Required := True;\r\n xdsprioritaetPrioText.SetParentComponent(xdsprioritaet);\r\n xdsprioritaetPrioText.Name := 'xdsprioritaetPrioText';\r\n xdsprioritaetPrioText.FieldName := 'PrioText';\r\n xdsprioritaetPrioFarbe.SetParentComponent(xdsprioritaet);\r\n xdsprioritaetPrioFarbe.Name := 'xdsprioritaetPrioFarbe';\r\n xdsprioritaetPrioFarbe.FieldName := 'PrioFarbe';\r\n xdsTicketDateien.SetParentComponent(Self);\r\n xdsTicketDateien.Name := 'xdsTicketDateien';\r\n xdsTicketDateien.AfterApplyUpdates := xdsTicketDateienAfterApplyUpdates;\r\n xdsTicketDateien.AfterOpen := xdsTicketDateienAfterOpen;\r\n SetEvent(xdsTicketDateien, Self, 'OnNewRecord', 'xdsTicketDateienNewRecord');\r\n xdsTicketDateien.EntitySetName := 'ITS_TicketDateien';\r\n xdsTicketDateien.Connection := DM2.XDataWebConnection1;\r\n xdsTicketDateien.QueryTop := 1;\r\n xdsTicketDateien.Left := 128;\r\n xdsTicketDateien.Top := 56;\r\n xdsTicketDateienTicketID.SetParentComponent(xdsTicketDateien);\r\n xdsTicketDateienTicketID.Name := 'xdsTicketDateienTicketID';\r\n xdsTicketDateienTicketID.FieldName := 'TicketID';\r\n xdsTicketDateienTicketID.Required := True;\r\n xdsTicketDateienID.SetParentComponent(xdsTicketDateien);\r\n xdsTicketDateienID.Name := 'xdsTicketDateienID';\r\n xdsTicketDateienID.FieldName := 'ID';\r\n xdsTicketDateienID.Required := True;\r\n xdsTicketDateienDatumUhrzeit.SetParentComponent(xdsTicketDateien);\r\n xdsTicketDateienDatumUhrzeit.Name := 'xdsTicketDateienDatumUhrzeit';\r\n xdsTicketDateienDatumUhrzeit.FieldName := 'DatumUhrzeit';\r\n xdsTicketDateienDatumUhrzeit.Required := True;\r\n xdsTicketDateienFuerLoesung.SetParentComponent(xdsTicketDateien);\r\n xdsTicketDateienFuerLoesung.Name := 'xdsTicketDateienFuerLoesung';\r\n xdsTicketDateienFuerLoesung.FieldName := 'FuerLoesung';\r\n xdsTicketDateienDateiMime.SetParentComponent(xdsTicketDateien);\r\n xdsTicketDateienDateiMime.Name := 'xdsTicketDateienDateiMime';\r\n xdsTicketDateienDateiMime.FieldName := 'DateiMime';\r\n xdsTicketDateienDateiMime.Size := 50;\r\n xdsTicketDateienDateiName.SetParentComponent(xdsTicketDateien);\r\n xdsTicketDateienDateiName.Name := 'xdsTicketDateienDateiName';\r\n xdsTicketDateienDateiName.FieldName := 'DateiName';\r\n xdsTicketDateienDateiName.Size := 255;\r\n xdsTicketDateienDateiGroesse.SetParentComponent(xdsTicketDateien);\r\n xdsTicketDateienDateiGroesse.Name := 'xdsTicketDateienDateiGroesse';\r\n xdsTicketDateienDateiGroesse.FieldName := 'DateiGroesse';\r\n xdsTicketDateienDateiInhaltText.SetParentComponent(xdsTicketDateien);\r\n xdsTicketDateienDateiInhaltText.Name := 'xdsTicketDateienDateiInhaltText';\r\n xdsTicketDateienDateiInhaltText.FieldName := 'DateiInhaltText';\r\n xdsTicketDateienDateiInhaltText.Size := 255;\r\n xdsticket2.SetParentComponent(Self);\r\n xdsticket2.Name := 'xdsticket2';\r\n xdsticket2.AfterOpen := xdsticket2AfterOpen;\r\n xdsticket2.EntitySetName := 'ITS_TicketMain';\r\n xdsticket2.Connection := DM2.XDataWebConnection1;\r\n xdsticket2.QueryString := '$orderby=ID DESC';\r\n xdsticket2.QueryTop := 1;\r\n xdsticket2.Left := 136;\r\n xdsticket2.Top := 360;\r\n xdsticket2Kundennummer.SetParentComponent(xdsticket2);\r\n xdsticket2Kundennummer.Name := 'xdsticket2Kundennummer';\r\n xdsticket2Kundennummer.FieldName := 'Kundennummer';\r\n xdsticket2Produkt.SetParentComponent(xdsticket2);\r\n xdsticket2Produkt.Name := 'xdsticket2Produkt';\r\n xdsticket2Produkt.FieldName := 'Produkt';\r\n xdsticket2Kategorie.SetParentComponent(xdsticket2);\r\n xdsticket2Kategorie.Name := 'xdsticket2Kategorie';\r\n xdsticket2Kategorie.FieldName := 'Kategorie';\r\n xdsticket2Prioritaet.SetParentComponent(xdsticket2);\r\n xdsticket2Prioritaet.Name := 'xdsticket2Prioritaet';\r\n xdsticket2Prioritaet.FieldName := 'Prioritaet';\r\n xdsticket2Status.SetParentComponent(xdsticket2);\r\n xdsticket2Status.Name := 'xdsticket2Status';\r\n xdsticket2Status.FieldName := 'Status';\r\n xdsticket2ID.SetParentComponent(xdsticket2);\r\n xdsticket2ID.Name := 'xdsticket2ID';\r\n xdsticket2ID.FieldName := 'ID';\r\n xdsticket2ID.Required := True;\r\n xdsticket2ErstelltAm.SetParentComponent(xdsticket2);\r\n xdsticket2ErstelltAm.Name := 'xdsticket2ErstelltAm';\r\n xdsticket2ErstelltAm.FieldName := 'ErstelltAm';\r\n xdsticket2Betreff.SetParentComponent(xdsticket2);\r\n xdsticket2Betreff.Name := 'xdsticket2Betreff';\r\n xdsticket2Betreff.FieldName := 'Betreff';\r\n xdsticket2Betreff.Size := 100;\r\n xdsticket2Beschreibung.SetParentComponent(xdsticket2);\r\n xdsticket2Beschreibung.Name := 'xdsticket2Beschreibung';\r\n xdsticket2Beschreibung.FieldName := 'Beschreibung';\r\n xdsticket2Beschreibung.Size := 255;\r\n xdsticket2Abrechnungsbetrag.SetParentComponent(xdsticket2);\r\n xdsticket2Abrechnungsbetrag.Name := 'xdsticket2Abrechnungsbetrag';\r\n xdsticket2Abrechnungsbetrag.FieldName := 'Abrechnungsbetrag';\r\n xdsticket2AbrechnungRechnungsnummer.SetParentComponent(xdsticket2);\r\n xdsticket2AbrechnungRechnungsnummer.Name := 'xdsticket2AbrechnungRechnungsnummer';\r\n xdsticket2AbrechnungRechnungsnummer.FieldName := 'AbrechnungRechnungsnummer';\r\n xdsticket2AbrechnungRechnungsnummer.Size := 10;\r\n xdsticket2AberechnetAm.SetParentComponent(xdsticket2);\r\n xdsticket2AberechnetAm.Name := 'xdsticket2AberechnetAm';\r\n xdsticket2AberechnetAm.FieldName := 'AberechnetAm';\r\n xdsticket2ErledigtAm.SetParentComponent(xdsticket2);\r\n xdsticket2ErledigtAm.Name := 'xdsticket2ErledigtAm';\r\n xdsticket2ErledigtAm.FieldName := 'ErledigtAm';\r\n xdsticket2Nachname.SetParentComponent(xdsticket2);\r\n xdsticket2Nachname.Name := 'xdsticket2Nachname';\r\n xdsticket2Nachname.FieldName := 'Nachname';\r\n xdsticket2Nachname.Size := 40;\r\n xdsticket2Vorname.SetParentComponent(xdsticket2);\r\n xdsticket2Vorname.Name := 'xdsticket2Vorname';\r\n xdsticket2Vorname.FieldName := 'Vorname';\r\n xdsticket2Vorname.Size := 40;\r\n xdsticket2Email.SetParentComponent(xdsticket2);\r\n xdsticket2Email.Name := 'xdsticket2Email';\r\n xdsticket2Email.FieldName := 'Email';\r\n xdsticket2Email.Size := 50;\r\n xdsticket2SystemInfo.SetParentComponent(xdsticket2);\r\n xdsticket2SystemInfo.Name := 'xdsticket2SystemInfo';\r\n xdsticket2SystemInfo.FieldName := 'SystemInfo';\r\n xdsticket2SystemInfo.Size := 255;\r\n xdsticket2Loesung.SetParentComponent(xdsticket2);\r\n xdsticket2Loesung.Name := 'xdsticket2Loesung';\r\n xdsticket2Loesung.FieldName := 'Loesung';\r\n xdsticket2Loesung.Size := 255;\r\n xdsticket2Protokoll.SetParentComponent(xdsticket2);\r\n xdsticket2Protokoll.Name := 'xdsticket2Protokoll';\r\n xdsticket2Protokoll.FieldName := 'Protokoll';\r\n xdsticket2Protokoll.Size := 255;\r\n xdsticket2ZeitaufwandMinuten.SetParentComponent(xdsticket2);\r\n xdsticket2ZeitaufwandMinuten.Name := 'xdsticket2ZeitaufwandMinuten';\r\n xdsticket2ZeitaufwandMinuten.FieldName := 'ZeitaufwandMinuten';\r\n xdsticket2AbzurechnendeMinuten.SetParentComponent(xdsticket2);\r\n xdsticket2AbzurechnendeMinuten.Name := 'xdsticket2AbzurechnendeMinuten';\r\n xdsticket2AbzurechnendeMinuten.FieldName := 'AbzurechnendeMinuten';\r\n xdsticket2AbgerechneteMinuten.SetParentComponent(xdsticket2);\r\n xdsticket2AbgerechneteMinuten.Name := 'xdsticket2AbgerechneteMinuten';\r\n xdsticket2AbgerechneteMinuten.FieldName := 'AbgerechneteMinuten';\r\n xdsticket2BenachrichtigungNEU.SetParentComponent(xdsticket2);\r\n xdsticket2BenachrichtigungNEU.Name := 'xdsticket2BenachrichtigungNEU';\r\n xdsticket2BenachrichtigungNEU.FieldName := 'BenachrichtigungNEU';\r\n xdsticket2BenachrichtigungLoesung.SetParentComponent(xdsticket2);\r\n xdsticket2BenachrichtigungLoesung.Name := 'xdsticket2BenachrichtigungLoesung';\r\n xdsticket2BenachrichtigungLoesung.FieldName := 'BenachrichtigungLoesung';\r\n xdsticket2InterneBemerkung.SetParentComponent(xdsticket2);\r\n xdsticket2InterneBemerkung.Name := 'xdsticket2InterneBemerkung';\r\n xdsticket2InterneBemerkung.FieldName := 'InterneBemerkung';\r\n xdsticket2InterneBemerkung.Size := 255;\r\n xdsticket2LoesungInfoSenden.SetParentComponent(xdsticket2);\r\n xdsticket2LoesungInfoSenden.Name := 'xdsticket2LoesungInfoSenden';\r\n xdsticket2LoesungInfoSenden.FieldName := 'LoesungInfoSenden';\r\n xdsticket2Kontaktperson.SetParentComponent(xdsticket2);\r\n xdsticket2Kontaktperson.Name := 'xdsticket2Kontaktperson';\r\n xdsticket2Kontaktperson.FieldName := 'Kontaktperson';\r\n xdsticket2Kontaktperson.Size := 100;\r\n xdsticket2KontaktpersonEmail.SetParentComponent(xdsticket2);\r\n xdsticket2KontaktpersonEmail.Name := 'xdsticket2KontaktpersonEmail';\r\n xdsticket2KontaktpersonEmail.FieldName := 'KontaktpersonEmail';\r\n xdsticket2KontaktpersonEmail.Size := 100;\r\n xdsticket2ErreichbarkeitTelefon.SetParentComponent(xdsticket2);\r\n xdsticket2ErreichbarkeitTelefon.Name := 'xdsticket2ErreichbarkeitTelefon';\r\n xdsticket2ErreichbarkeitTelefon.FieldName := 'ErreichbarkeitTelefon';\r\n xdsticket2ErreichbarkeitTelefon.Size := 100;\r\n xdsticket2ErreichbarkeitWann.SetParentComponent(xdsticket2);\r\n xdsticket2ErreichbarkeitWann.Name := 'xdsticket2ErreichbarkeitWann';\r\n xdsticket2ErreichbarkeitWann.FieldName := 'ErreichbarkeitWann';\r\n xdsticket2ErreichbarkeitWann.Size := 100;\r\n finally\r\n TC.AfterLoadDFMValues;\r\n WebFilePicker1.AfterLoadDFMValues;\r\n WebFilePicker2.AfterLoadDFMValues;\r\n WebFilePicker3.AfterLoadDFMValues;\r\n Container1.AfterLoadDFMValues;\r\n Container2.AfterLoadDFMValues;\r\n PanelTop.AfterLoadDFMValues;\r\n lblSeite.AfterLoadDFMValues;\r\n panelfunctions.AfterLoadDFMValues;\r\n btnzurueck.AfterLoadDFMValues;\r\n xdsKontosaldo.AfterLoadDFMValues;\r\n xdsKontosaldoKundennummer.AfterLoadDFMValues;\r\n xdsKontosaldoZeitaufwand.AfterLoadDFMValues;\r\n xdsKontosaldoAbzurechnen.AfterLoadDFMValues;\r\n xdsKontosaldoGutschrift.AfterLoadDFMValues;\r\n xdsKontosaldoAbzug.AfterLoadDFMValues;\r\n xdsKontosaldoSaldo.AfterLoadDFMValues;\r\n xdsKontosaldoBetrag.AfterLoadDFMValues;\r\n xdsKontosaldoMinutenpreis.AfterLoadDFMValues;\r\n xdsKontosaldoSRestguthaben.AfterLoadDFMValues;\r\n xdsTicket.AfterLoadDFMValues;\r\n xdsTicketKundennummer.AfterLoadDFMValues;\r\n xdsTicketProdukt.AfterLoadDFMValues;\r\n xdsTicketKategorie.AfterLoadDFMValues;\r\n xdsTicketPrioritaet.AfterLoadDFMValues;\r\n xdsTicketStatus.AfterLoadDFMValues;\r\n xdsTicketID.AfterLoadDFMValues;\r\n xdsTicketErstelltAm.AfterLoadDFMValues;\r\n xdsTicketBetreff.AfterLoadDFMValues;\r\n xdsTicketBeschreibung.AfterLoadDFMValues;\r\n xdsTicketAbrechnungsbetrag.AfterLoadDFMValues;\r\n xdsTicketAbrechnungRechnungsnummer.AfterLoadDFMValues;\r\n xdsTicketAberechnetAm.AfterLoadDFMValues;\r\n xdsTicketErledigtAm.AfterLoadDFMValues;\r\n xdsTicketNachname.AfterLoadDFMValues;\r\n xdsTicketVorname.AfterLoadDFMValues;\r\n xdsTicketEmail.AfterLoadDFMValues;\r\n xdsTicketSystemInfo.AfterLoadDFMValues;\r\n xdsTicketLoesung.AfterLoadDFMValues;\r\n xdsTicketProtokoll.AfterLoadDFMValues;\r\n xdsTicketZeitaufwandMinuten.AfterLoadDFMValues;\r\n xdsTicketAbzurechnendeMinuten.AfterLoadDFMValues;\r\n xdsTicketAbgerechneteMinuten.AfterLoadDFMValues;\r\n xdsTicketBenachrichtigungNEU.AfterLoadDFMValues;\r\n xdsTicketBenachrichtigungLoesung.AfterLoadDFMValues;\r\n xdsTicketInterneBemerkung.AfterLoadDFMValues;\r\n xdsTicketLoesungInfoSenden.AfterLoadDFMValues;\r\n xdsTicketKontaktperson.AfterLoadDFMValues;\r\n xdsTicketErreichbarkeitTelefon.AfterLoadDFMValues;\r\n xdsTicketErreichbarkeitWann.AfterLoadDFMValues;\r\n xdsTicketKontaktpersonEmail.AfterLoadDFMValues;\r\n xdsProdukte.AfterLoadDFMValues;\r\n xdsProdukteProdukt.AfterLoadDFMValues;\r\n xdsKundendaten.AfterLoadDFMValues;\r\n xdsKundendatenKundennummer.AfterLoadDFMValues;\r\n xdsKundendatenGruppeKunden.AfterLoadDFMValues;\r\n xdsKundendatenGruppeLieferanten.AfterLoadDFMValues;\r\n xdsKundendatenGruppeSonstige.AfterLoadDFMValues;\r\n xdsKundendatenGruppeNichtkunden.AfterLoadDFMValues;\r\n xdsKundendatenKontaktgruppe.AfterLoadDFMValues;\r\n xdsKundendatenNachname.AfterLoadDFMValues;\r\n xdsKundendatenVorname.AfterLoadDFMValues;\r\n xdsKundendatenAdresszeile2.AfterLoadDFMValues;\r\n xdsKundendatenAdresszeile3.AfterLoadDFMValues;\r\n xdsKundendatenStrasse.AfterLoadDFMValues;\r\n xdsKundendatenPostleitzahl.AfterLoadDFMValues;\r\n xdsKundendatenOrt.AfterLoadDFMValues;\r\n xdsKundendatenLaenderkuerzel.AfterLoadDFMValues;\r\n xdsKundendatenLand.AfterLoadDFMValues;\r\n xdsKundendatenLaenderkennzeichen.AfterLoadDFMValues;\r\n xdsKundendatenAdressanrede.AfterLoadDFMValues;\r\n xdsKundendatenBriefanrede1.AfterLoadDFMValues;\r\n xdsKundendatenAdresseBild.AfterLoadDFMValues;\r\n xdsKundendatenLieferanschrift.AfterLoadDFMValues;\r\n xdsKundendatenTelefonNummer.AfterLoadDFMValues;\r\n xdsKundendatenTelefaxNummer.AfterLoadDFMValues;\r\n xdsKundendatenMobilTelefon.AfterLoadDFMValues;\r\n xdsKundendatenEMail.AfterLoadDFMValues;\r\n xdsKundendatenInternet.AfterLoadDFMValues;\r\n xdsKundendatenUmsatzsteuerID.AfterLoadDFMValues;\r\n xdsKundendatenUmsatzsteuerausweis.AfterLoadDFMValues;\r\n xdsKundendatenZahlungsbedingung.AfterLoadDFMValues;\r\n xdsKundendatenTransportbedingung.AfterLoadDFMValues;\r\n xdsKundendatenKeinNewsletter.AfterLoadDFMValues;\r\n xdsKundendatenTelefonAlternativ.AfterLoadDFMValues;\r\n xdsKundendatenTitel.AfterLoadDFMValues;\r\n xdsKundendatenKundenklasseFarbe.AfterLoadDFMValues;\r\n xdsKundendatenRechnungEmail.AfterLoadDFMValues;\r\n xdsKundendatenLoginPW.AfterLoadDFMValues;\r\n xdsKundendatenBesteuerungKey.AfterLoadDFMValues;\r\n xdsKundendatenAuftraegeJahr.AfterLoadDFMValues;\r\n xdsKundendatenAuftraegeVorjahr.AfterLoadDFMValues;\r\n xdsKundendatenLieferadresseID.AfterLoadDFMValues;\r\n xdsKundendatenUSTIDgeprueft.AfterLoadDFMValues;\r\n xdsKundendatenKontaktverbund.AfterLoadDFMValues;\r\n xdsKundendatenHinweis.AfterLoadDFMValues;\r\n xdsKundendatenLatitude.AfterLoadDFMValues;\r\n xdsKundendatenLongitude.AfterLoadDFMValues;\r\n xdsKundendatenkmLuftlinie.AfterLoadDFMValues;\r\n xdsKundendatenGoogleID.AfterLoadDFMValues;\r\n xdsKundendatenGoogleUpdatedUTC.AfterLoadDFMValues;\r\n xdsKundendatenBundesland.AfterLoadDFMValues;\r\n xdsKundendatenRegion.AfterLoadDFMValues;\r\n xdsKundendatenMandatsreferenz.AfterLoadDFMValues;\r\n xdsKundendatenMandatsreferenzVom.AfterLoadDFMValues;\r\n xdsKundendatenLastschriftArt.AfterLoadDFMValues;\r\n xdsKundendatenMahnsperre.AfterLoadDFMValues;\r\n xdsKundendatenSuchbegriff.AfterLoadDFMValues;\r\n xdsKundendatenLieferanschriftDaten.AfterLoadDFMValues;\r\n xdsKundendatenExportKasse.AfterLoadDFMValues;\r\n xdsKundendatenLoeschvormerkungDatum.AfterLoadDFMValues;\r\n xdsKundendatenLoeschvormerkungGrund.AfterLoadDFMValues;\r\n xdsKundendatenPseudonymisiert.AfterLoadDFMValues;\r\n xdsKundendatenLoginAktiv.AfterLoadDFMValues;\r\n xdsKundendatenSonstigeDaten.AfterLoadDFMValues;\r\n xdsStatus.AfterLoadDFMValues;\r\n xdsStatusStatus.AfterLoadDFMValues;\r\n xdsKategorie.AfterLoadDFMValues;\r\n xdsKategorieKategorie.AfterLoadDFMValues;\r\n xdsprioritaet.AfterLoadDFMValues;\r\n xdsprioritaetPrioritaet.AfterLoadDFMValues;\r\n xdsprioritaetPrioText.AfterLoadDFMValues;\r\n xdsprioritaetPrioFarbe.AfterLoadDFMValues;\r\n xdsTicketDateien.AfterLoadDFMValues;\r\n xdsTicketDateienTicketID.AfterLoadDFMValues;\r\n xdsTicketDateienID.AfterLoadDFMValues;\r\n xdsTicketDateienDatumUhrzeit.AfterLoadDFMValues;\r\n xdsTicketDateienFuerLoesung.AfterLoadDFMValues;\r\n xdsTicketDateienDateiMime.AfterLoadDFMValues;\r\n xdsTicketDateienDateiName.AfterLoadDFMValues;\r\n xdsTicketDateienDateiGroesse.AfterLoadDFMValues;\r\n xdsTicketDateienDateiInhaltText.AfterLoadDFMValues;\r\n xdsticket2.AfterLoadDFMValues;\r\n xdsticket2Kundennummer.AfterLoadDFMValues;\r\n xdsticket2Produkt.AfterLoadDFMValues;\r\n xdsticket2Kategorie.AfterLoadDFMValues;\r\n xdsticket2Prioritaet.AfterLoadDFMValues;\r\n xdsticket2Status.AfterLoadDFMValues;\r\n xdsticket2ID.AfterLoadDFMValues;\r\n xdsticket2ErstelltAm.AfterLoadDFMValues;\r\n xdsticket2Betreff.AfterLoadDFMValues;\r\n xdsticket2Beschreibung.AfterLoadDFMValues;\r\n xdsticket2Abrechnungsbetrag.AfterLoadDFMValues;\r\n xdsticket2AbrechnungRechnungsnummer.AfterLoadDFMValues;\r\n xdsticket2AberechnetAm.AfterLoadDFMValues;\r\n xdsticket2ErledigtAm.AfterLoadDFMValues;\r\n xdsticket2Nachname.AfterLoadDFMValues;\r\n xdsticket2Vorname.AfterLoadDFMValues;\r\n xdsticket2Email.AfterLoadDFMValues;\r\n xdsticket2SystemInfo.AfterLoadDFMValues;\r\n xdsticket2Loesung.AfterLoadDFMValues;\r\n xdsticket2Protokoll.AfterLoadDFMValues;\r\n xdsticket2ZeitaufwandMinuten.AfterLoadDFMValues;\r\n xdsticket2AbzurechnendeMinuten.AfterLoadDFMValues;\r\n xdsticket2AbgerechneteMinuten.AfterLoadDFMValues;\r\n xdsticket2BenachrichtigungNEU.AfterLoadDFMValues;\r\n xdsticket2BenachrichtigungLoesung.AfterLoadDFMValues;\r\n xdsticket2InterneBemerkung.AfterLoadDFMValues;\r\n xdsticket2LoesungInfoSenden.AfterLoadDFMValues;\r\n xdsticket2Kontaktperson.AfterLoadDFMValues;\r\n xdsticket2KontaktpersonEmail.AfterLoadDFMValues;\r\n xdsticket2ErreichbarkeitTelefon.AfterLoadDFMValues;\r\n xdsticket2ErreichbarkeitWann.AfterLoadDFMValues;\r\n end;\r\nend;\r\n\r\nend.","unit unit_KontaktAenderung;\r\n\r\ninterface\r\n\r\nuses\r\n System.SysUtils, System.Classes, JS, Web, WEBLib.Graphics, WEBLib.Controls,\r\n WEBLib.Forms, WEBLib.Dialogs, Vcl.Controls, WEBLib.ExtCtrls, Data.DB,\r\n XData.Web.JsonDataset, XData.Web.Dataset, WEBLib.DB, DB, Vcl.StdCtrls,\r\n WEBLib.StdCtrls, WEBLib.DBCtrls, WEBLib.Grids;\r\n\r\ntype\r\n TKontaktAenderung = class(TForm)\r\n Container1: THTMLContainer;\r\n Container2: THTMLContainer;\r\n Container3: THTMLContainer;\r\n sourceEinzelkontakt: TDataSource;\r\n xdsEinzelkontakt: TXDataWebDataSet;\r\n xdsEinzelkontaktKundennummer: TStringField;\r\n xdsEinzelkontaktGruppeKunden: TBooleanField;\r\n xdsEinzelkontaktGruppeLieferanten: TBooleanField;\r\n xdsEinzelkontaktGruppeSonstige: TBooleanField;\r\n xdsEinzelkontaktGruppeNichtkunden: TBooleanField;\r\n xdsEinzelkontaktKontaktgruppe: TStringField;\r\n xdsEinzelkontaktNachname: TStringField;\r\n xdsEinzelkontaktVorname: TStringField;\r\n xdsEinzelkontaktAdresszeile2: TStringField;\r\n xdsEinzelkontaktAdresszeile3: TStringField;\r\n xdsEinzelkontaktStrasse: TStringField;\r\n xdsEinzelkontaktPostleitzahl: TStringField;\r\n xdsEinzelkontaktOrt: TStringField;\r\n xdsEinzelkontaktLaenderkuerzel: TStringField;\r\n xdsEinzelkontaktLand: TStringField;\r\n xdsEinzelkontaktLaenderkennzeichen: TBooleanField;\r\n xdsEinzelkontaktAdressanrede: TStringField;\r\n xdsEinzelkontaktBriefanrede1: TStringField;\r\n xdsEinzelkontaktBriefanrede2: TStringField;\r\n xdsEinzelkontaktAdresseBild: TStringField;\r\n xdsEinzelkontaktLieferanschrift: TStringField;\r\n xdsEinzelkontaktGeburtsdatum: TDateTimeField;\r\n xdsEinzelkontaktTelefonNummer: TStringField;\r\n xdsEinzelkontaktTelefaxNummer: TStringField;\r\n xdsEinzelkontaktMobilTelefon: TStringField;\r\n xdsEinzelkontaktEMail: TStringField;\r\n xdsEinzelkontaktInternet: TStringField;\r\n xdsEinzelkontaktUmsatzsteuerID: TStringField;\r\n xdsEinzelkontaktUmsatzsteuerausweis: TBooleanField;\r\n xdsEinzelkontaktBemerkungen: TStringField;\r\n xdsEinzelkontaktBranche: TStringField;\r\n xdsEinzelkontaktSelektiert1: TBooleanField;\r\n xdsEinzelkontaktSelektiert2: TBooleanField;\r\n xdsEinzelkontaktSelektiert3: TBooleanField;\r\n xdsEinzelkontaktZahlungsbedingung: TIntegerField;\r\n xdsEinzelkontaktTransportbedingung: TStringField;\r\n xdsEinzelkontaktKilometer: TIntegerField;\r\n xdsEinzelkontaktRabattsatz: TFloatField;\r\n xdsEinzelkontaktStundensatz: TFloatField;\r\n xdsEinzelkontaktKontonummer: TStringField;\r\n xdsEinzelkontaktBank: TStringField;\r\n xdsEinzelkontaktBankleitzahl: TFloatField;\r\n xdsEinzelkontaktKontoinhaber: TStringField;\r\n xdsEinzelkontaktBetreuer: TStringField;\r\n xdsEinzelkontaktQuelle: TStringField;\r\n xdsEinzelkontaktSuchmerkmal: TStringField;\r\n xdsEinzelkontaktWarenkreditlimit: TFloatField;\r\n xdsEinzelkontaktWarenkreditgesperrt: TBooleanField;\r\n xdsEinzelkontaktKundennummerFremd: TStringField;\r\n xdsEinzelkontaktKeinNewsletter: TBooleanField;\r\n xdsEinzelkontaktDebitorennummer: TStringField;\r\n xdsEinzelkontaktKreditorennummer: TStringField;\r\n xdsEinzelkontaktTelefonAlternativ: TStringField;\r\n xdsEinzelkontaktKostentraeger: TStringField;\r\n xdsEinzelkontaktIBAN: TStringField;\r\n xdsEinzelkontaktBIC: TStringField;\r\n xdsEinzelkontaktEmailkonto: TStringField;\r\n xdsEinzelkontaktBenutzername: TStringField;\r\n xdsEinzelkontaktPasswort: TStringField;\r\n xdsEinzelkontaktExportOutlook: TBooleanField;\r\n xdsEinzelkontaktNichtInListeAnzeigen: TBooleanField;\r\n xdsEinzelkontaktKreditkarteArt: TStringField;\r\n xdsEinzelkontaktKreditkarteInhaber: TStringField;\r\n xdsEinzelkontaktKreditkarteNummer: TStringField;\r\n xdsEinzelkontaktKreditkarteGueltigMonat: TStringField;\r\n xdsEinzelkontaktKreditkarteGueltigJahr: TIntegerField;\r\n xdsEinzelkontaktKreditkartePruefziffer: TStringField;\r\n xdsEinzelkontaktDatumNeu: TDateTimeField;\r\n xdsEinzelkontaktDatumgeaendert: TDateTimeField;\r\n xdsEinzelkontaktTitel: TStringField;\r\n xdsEinzelkontaktStundensatzMontage: TFloatField;\r\n xdsEinzelkontaktStdMontageU25: TFloatField;\r\n xdsEinzelkontaktStdMontageU50: TFloatField;\r\n xdsEinzelkontaktStdMontageU70: TFloatField;\r\n xdsEinzelkontaktStdMontageU100: TFloatField;\r\n xdsEinzelkontaktStdMontageU150: TFloatField;\r\n xdsEinzelkontaktStundensatzWerkstatt: TFloatField;\r\n xdsEinzelkontaktStdWerkstattU25: TFloatField;\r\n xdsEinzelkontaktStdWerkstattU50: TFloatField;\r\n xdsEinzelkontaktStdWerkstattU70: TFloatField;\r\n xdsEinzelkontaktStdWerkstattU100: TFloatField;\r\n xdsEinzelkontaktStdWerkstattU150: TFloatField;\r\n xdsEinzelkontaktArchivReferenz: TStringField;\r\n xdsEinzelkontaktErloesKontoUST1: TStringField;\r\n xdsEinzelkontaktErloesKontoUST2: TStringField;\r\n xdsEinzelkontaktErloesKontoUST3: TStringField;\r\n xdsEinzelkontaktGebKal: TBooleanField;\r\n xdsEinzelkontaktEmailversand: TBooleanField;\r\n xdsEinzelkontaktMahnspesen: TBooleanField;\r\n xdsEinzelkontaktRechnungSchluss: TStringField;\r\n xdsEinzelkontaktBenutzerNeu: TStringField;\r\n xdsEinzelkontaktBenutzerGeaendert: TStringField;\r\n xdsEinzelkontaktBelegsprache: TStringField;\r\n xdsEinzelkontaktkmSatz: TFloatField;\r\n xdsEinzelkontaktKundenklassetext: TStringField;\r\n xdsEinzelkontaktKundenklasseFarbe: TIntegerField;\r\n xdsEinzelkontaktAbweichenderRechnungsEmpfaenger: TStringField;\r\n xdsEinzelkontaktProtokoll: TStringField;\r\n xdsEinzelkontaktILNTyp1: TStringField;\r\n xdsEinzelkontaktILNTyp2: TStringField;\r\n xdsEinzelkontaktKontaktGUID: TStringField;\r\n xdsEinzelkontaktPLZGUID: TStringField;\r\n xdsEinzelkontaktPreislistenVariantePakete: TStringField;\r\n xdsEinzelkontaktSchluesselRechnungslauf: TStringField;\r\n xdsEinzelkontaktRechnungEmail: TStringField;\r\n xdsEinzelkontaktZahlungsbedingungEK: TIntegerField;\r\n xdsEinzelkontaktTransportbedingungEK: TStringField;\r\n xdsEinzelkontaktRabattsatzEK: TFloatField;\r\n xdsEinzelkontaktVertreterMatchcode: TStringField;\r\n xdsEinzelkontaktVertreterProvisionssatz: TFloatField;\r\n xdsEinzelkontaktUmsatzVKJahr: TFloatField;\r\n xdsEinzelkontaktUmsatzVKVorjahr: TFloatField;\r\n xdsEinzelkontaktUmsatzEKJahr: TFloatField;\r\n xdsEinzelkontaktUmsatzEKVorjahr: TFloatField;\r\n xdsEinzelkontaktSteuernummer: TStringField;\r\n xdsEinzelkontaktLoginPW: TStringField;\r\n xdsEinzelkontaktREperFax: TBooleanField;\r\n xdsEinzelkontaktErreichbarkeit: TStringField;\r\n xdsEinzelkontaktErloesKontoUST4: TStringField;\r\n xdsEinzelkontaktErloesKontoUST5: TStringField;\r\n xdsEinzelkontaktErloesKontoUST6: TStringField;\r\n xdsEinzelkontaktBesteuerungKey: TIntegerField;\r\n xdsEinzelkontaktAuftraegeJahr: TFloatField;\r\n xdsEinzelkontaktAuftraegeVorjahr: TFloatField;\r\n xdsEinzelkontaktLieferadresseID: TIntegerField;\r\n xdsEinzelkontaktUSTIDgeprueft: TDateTimeField;\r\n xdsEinzelkontaktKontaktverbund: TStringField;\r\n xdsEinzelkontaktHinweis: TStringField;\r\n xdsEinzelkontaktLatitude: TFloatField;\r\n xdsEinzelkontaktLongitude: TFloatField;\r\n xdsEinzelkontaktkmLuftlinie: TFloatField;\r\n xdsEinzelkontaktGoogleID: TStringField;\r\n xdsEinzelkontaktGoogleUpdatedUTC: TDateTimeField;\r\n xdsEinzelkontaktBundesland: TStringField;\r\n xdsEinzelkontaktRegion: TStringField;\r\n xdsEinzelkontaktMandatsreferenz: TStringField;\r\n xdsEinzelkontaktMandatsreferenzVom: TDateTimeField;\r\n xdsEinzelkontaktLastschriftArt: TStringField;\r\n xdsEinzelkontaktMahnsperre: TBooleanField;\r\n xdsEinzelkontaktSuchbegriff: TStringField;\r\n xdsEinzelkontaktLieferanschriftDaten: TStringField;\r\n xdsEinzelkontaktExportKasse: TBooleanField;\r\n xdsEinzelkontaktLoeschvormerkungDatum: TDateTimeField;\r\n xdsEinzelkontaktLoeschvormerkungGrund: TStringField;\r\n xdsEinzelkontaktPseudonymisiert: TStringField;\r\n xdsEinzelkontaktLoginAktiv: TIntegerField;\r\n xdsEinzelkontaktSonstigeDaten: TStringField;\r\n xdsEinzelkontaktB2C: TBooleanField;\r\n xdsEinzelkontaktTIN: TStringField;\r\n xdsEinzelkontaktMindestbestellwert: TFloatField;\r\n TC: TTableControl;\r\n edtStrasse: TDBEdit;\r\n edtPostleitzahl: TDBEdit;\r\n btnzurueck: TButton;\r\n btnSpeichern: TButton;\r\n edtVorname: TDBEdit;\r\n edtAdresszeile2: TDBEdit;\r\n edtAdresszeile3: TDBEdit;\r\n edtOrt: TDBEdit;\r\n xdsLaender: TXDataWebDataSet;\r\n sourceLaender: TDataSource;\r\n xdsLaenderLaenderkuerzel: TStringField;\r\n xdsLaenderLand: TStringField;\r\n edtLand: TDBLookupComboBox;\r\n edtTelefon: TDBEdit;\r\n edtTelefonAlternativ: TDBEdit;\r\n edtTelefonMobil: TDBEdit;\r\n edtInternet: TDBEdit;\r\n edtEmail: TDBEdit;\r\n xdsBestKey: TXDataWebDataSet;\r\n sourceBestKey: TDataSource;\r\n xdsBestKeyBesteuerungKey: TIntegerField;\r\n xdsBestKeyBesteuerungKurzText: TStringField;\r\n xdsBestKeyBesteuerungLangText: TStringField;\r\n xdsBestKeyUmsatzsteuerausweis: TBooleanField;\r\n xdsBestKeyKtoVorsteuerSatz1: TIntegerField;\r\n xdsBestKeyKtoVorsteuerSatz2: TIntegerField;\r\n xdsBestKeyKtoVorsteuerSatz3: TIntegerField;\r\n xdsBestKeyKtoVorsteuerSatz4: TIntegerField;\r\n xdsBestKeyKtoVorsteuerSatz5: TIntegerField;\r\n xdsBestKeyKtoVorsteuerSatz6: TIntegerField;\r\n xdsBestKeyKtoErloeseSatz1: TIntegerField;\r\n xdsBestKeyKtoErloeseSatz2: TIntegerField;\r\n xdsBestKeyKtoErloeseSatz3: TIntegerField;\r\n xdsBestKeyKtoErloeseSatz4: TIntegerField;\r\n xdsBestKeyKtoErloeseSatz5: TIntegerField;\r\n xdsBestKeyKtoErloeseSatz6: TIntegerField;\r\n xdsBestKeyKtoSkontoaufwandSatz1: TIntegerField;\r\n xdsBestKeyKtoSkontoaufwandSatz2: TIntegerField;\r\n xdsBestKeyKtoSkontoaufwandSatz3: TIntegerField;\r\n xdsBestKeyKtoSkontoaufwandSatz4: TIntegerField;\r\n xdsBestKeyKtoSkontoaufwandSatz5: TIntegerField;\r\n xdsBestKeyKtoSkontoaufwandSatz6: TIntegerField;\r\n xdsBestKeyKtoSkontoertragSatz1: TIntegerField;\r\n xdsBestKeyKtoSkontoertragSatz2: TIntegerField;\r\n xdsBestKeyKtoSkontoertragSatz3: TIntegerField;\r\n xdsBestKeyKtoSkontoertragSatz4: TIntegerField;\r\n xdsBestKeyKtoSkontoertragSatz5: TIntegerField;\r\n xdsBestKeyKtoSkontoertragSatz6: TIntegerField;\r\n xdsBestKeyKtoErloesschmaelerungenSatz1: TIntegerField;\r\n xdsBestKeyKtoErloesschmaelerungenSatz2: TIntegerField;\r\n xdsBestKeyKtoErloesschmaelerungenSatz3: TIntegerField;\r\n xdsBestKeyKtoErloesschmaelerungenSatz4: TIntegerField;\r\n xdsBestKeyKtoErloesschmaelerungenSatz5: TIntegerField;\r\n xdsBestKeyKtoErloesschmaelerungenSatz6: TIntegerField;\r\n xdsBestKeyNatura: TStringField;\r\n xdsBestKeyBSchl_UST_Satz1: TIntegerField;\r\n xdsBestKeyBSchl_UST_Satz2: TIntegerField;\r\n xdsBestKeyBSchl_UST_Satz3: TIntegerField;\r\n xdsBestKeyBSchl_UST_Satz4: TIntegerField;\r\n xdsBestKeyBSchl_UST_Satz5: TIntegerField;\r\n xdsBestKeyBSchl_UST_Satz6: TIntegerField;\r\n xdsBestKeyBSchl_Vorsteuer_Satz1: TIntegerField;\r\n xdsBestKeyBSchl_Vorsteuer_Satz2: TIntegerField;\r\n xdsBestKeyBSchl_Vorsteuer_Satz3: TIntegerField;\r\n xdsBestKeyBSchl_Vorsteuer_Satz4: TIntegerField;\r\n xdsBestKeyBSchl_Vorsteuer_Satz5: TIntegerField;\r\n xdsBestKeyBSchl_Vorsteuer_Satz6: TIntegerField;\r\n xdsBestKeyDokTyp: TStringField;\r\n edtAdressanrede: TDBEdit;\r\n edtTitel: TDBEdit;\r\n edtNachname: TDBEdit;\r\n procedure WebFormShow(Sender: TObject);\r\n procedure btnzurueckClick(Sender: TObject);\r\n procedure xdsLaenderAfterOpen(DataSet: TDataSet);\r\n procedure xdsEinzelkontaktAfterOpen(DataSet: TDataSet);\r\n procedure sourceEinzelkontaktStateChange(Sender: TObject);\r\n procedure btnSpeichernClick(Sender: TObject);\r\n procedure xdsBestKeyAfterOpen(DataSet: TDataSet);\r\n procedure xdsEinzelkontaktBeforePost(DataSet: TDataSet);\r\n procedure xdsEinzelkontaktAfterPost(DataSet: TDataSet);\r\n procedure xdsEinzelkontaktAfterApplyUpdates(Sender: TDataSet;\r\n Info: TResolveResults);\r\n private\r\n { Private-Deklarationen }\r\n public\r\n { Public-Deklarationen }\r\n AEKundennummer:string;\r\n protected procedure LoadDFMValues; override; end;\r\n\r\nvar\r\n KontaktAenderung: TKontaktAenderung;\r\n\r\nimplementation\r\n uses unit1, unit2;\r\n{$R *.dfm}\r\n\r\nprocedure TKontaktAenderung.btnSpeichernClick(Sender: TObject);\r\nbegin\r\n if xdslaender.Locate('Land', xdsEinzelkontaktLand.asstring,[])=true then\r\n begin\r\n xdsEinzelkontaktLaenderkuerzel.asstring:=xdsLaenderLaenderkuerzel.asstring;\r\n if xdsEinzelkontaktLaenderkuerzel.asstring<>dm2.tableSYSDATLaenderkuerzel.asstring then xdsEinzelkontaktLaenderkennzeichen.asboolean:=true else xdsEinzelkontaktLaenderkennzeichen.asboolean:=false;\r\n xdsEinzelkontakt.post;\r\n end\r\n else\r\n begin\r\n showmessage('Sie haben noch kein Land ausgewählt, Vorgang wird abgebrochen');\r\n exit;\r\n end;\r\nend;\r\n\r\nprocedure TKontaktAenderung.btnzurueckClick(Sender: TObject);\r\nbegin\r\n xdsEinzelkontakt.Close;\r\n self.Close;\r\nend;\r\n\r\nprocedure TKontaktAenderung.sourceEinzelkontaktStateChange(Sender: TObject);\r\nbegin\r\n if sourceEinzelkontakt.state<>dsBrowse then btnSpeichern.enabled:=true else btnspeichern.Enabled:=false;\r\n\r\nend;\r\n\r\nprocedure TKontaktAenderung.WebFormShow(Sender: TObject);\r\nvar\r\n myelement:TJSHTMLElement;\r\n i:integer;\r\nbegin\r\n Container1.html.text:='';\r\n myelement:=container1.ElementHandle;\r\n container2.ParentElement:=myelement;\r\n container3.ParentElement:=myelement;\r\n myelement:=container2.ElementHandle;\r\n btnzurueck.ParentElement:=myelement;\r\n\r\n\r\n myelement:=container2.ElementHandle;\r\n tc.ParentElement:=myElement;\r\n TC.Visible:=true;\r\n TC.RowCount:=17;\r\n TC.ColCount:=2;\r\n i:=0;\r\n TC.Cells[0,i]:='Nachname';\r\n myelement:=TC.CellElements[1,i];\r\n edtNachname.ParentElement:=myelement;\r\n inc(i);\r\n TC.Cells[0,i]:='Adressanrede';\r\n myelement:=TC.CellElements[1,i];\r\n edtAdressanrede.ParentElement:=myelement;\r\n inc(i);\r\n TC.Cells[0,i]:='Titel';\r\n myelement:=TC.CellElements[1,i];\r\n edttitel.ParentElement:=myelement;\r\n inc(i);\r\n TC.Cells[0,i]:='Vorname';\r\n myelement:=TC.CellElements[1,i];\r\n edtVorname.ParentElement:=myelement;\r\n inc(i);\r\n TC.Cells[0,i]:='Adresszeile2';\r\n myelement:=TC.CellElements[1,i];\r\n edtAdresszeile2.ParentElement:=myelement;\r\n inc(i);\r\n TC.Cells[0,i]:='Adresszeile3';\r\n myelement:=TC.CellElements[1,i];\r\n edtAdresszeile3.ParentElement:=myelement;\r\n inc(i);\r\n TC.Cells[0,i]:='Strasse';\r\n myelement:=TC.CellElements[1,i];\r\n edtStrasse.ParentElement:=myelement;\r\n inc(i);\r\n TC.Cells[0,i]:='Postleizahl';\r\n myelement:=TC.CellElements[1,i];\r\n edtPostleitzahl.ParentElement:=myelement;\r\n inc(i);\r\n TC.Cells[0,i]:='Ort';\r\n myelement:=TC.CellElements[1,i];\r\n edtOrt.ParentElement:=myelement;\r\n inc(i);\r\n TC.Cells[0,i]:='Land';\r\n myelement:=TC.CellElements[1,i];\r\n edtLand.ParentElement:=myelement;\r\n inc(i);\r\n TC.Cells[0,i]:='Telefon';\r\n myelement:=TC.CellElements[1,i];\r\n edtTelefon.ParentElement:=myelement;\r\n inc(i);\r\n TC.Cells[0,i]:='Telefon Alternativ';\r\n myelement:=TC.CellElements[1,i];\r\n edtTelefonAlternativ.ParentElement:=myelement;\r\n inc(i);\r\n TC.Cells[0,i]:='Mobiltelefon';\r\n myelement:=TC.CellElements[1,i];\r\n edtTelefonMobil.ParentElement:=myelement;\r\n inc(i);\r\n TC.Cells[0,i]:='Internet';\r\n myelement:=TC.CellElements[1,i];\r\n edtInternet.ParentElement:=myelement;\r\n inc(i);\r\n TC.Cells[0,i]:='Email';\r\n myelement:=TC.CellElements[1,i];\r\n edtEmail.ParentElement:=myelement;\r\n inc(i);\r\n TC.Cells[0,i]:='';\r\n myelement:=TC.CellElements[1,i];\r\n btnSpeichern.ParentElement:=myelement;\r\n dm2.tableSYSDAT.load;\r\n xdsBestKey.load;\r\n\r\nend;\r\n\r\nprocedure TKontaktAenderung.xdsBestKeyAfterOpen(DataSet: TDataSet);\r\nbegin\r\n xdsLaender.load;\r\n\r\nend;\r\n\r\nprocedure TKontaktAenderung.xdsEinzelkontaktAfterApplyUpdates(Sender: TDataSet;\r\n Info: TResolveResults);\r\n var\r\n i:integer;\r\nbegin\r\n for i := 0 to High(info.Records) do\r\n begin\r\n if info.Records[i].Error<>'' then showmessage(info.Records[i].Error);\r\n end;\r\n if info.Records[0].Error='' then\r\n begin\r\n xdsBestKey.Close;\r\n xdsLaender.close;;\r\n xdsEinzelkontakt.close;\r\n close;\r\n end;\r\nend;\r\n\r\nprocedure TKontaktAenderung.xdsEinzelkontaktAfterOpen(DataSet: TDataSet);\r\nvar\r\n myelement:TJSHTMLElement;\r\n\r\nbegin\r\n\r\nend;\r\n\r\nprocedure TKontaktAenderung.xdsEinzelkontaktAfterPost(DataSet: TDataSet);\r\nbegin\r\n xdsEinzelkontakt.ApplyUpdates;\r\nend;\r\n\r\nprocedure TKontaktAenderung.xdsEinzelkontaktBeforePost(DataSet: TDataSet);\r\nvar\r\n adrbild:string;\r\nbegin\r\n adrbild:='';\r\n if length(xdsEinzelkontaktadressanrede.asstring)>1 then\r\n begin\r\n adrbild:=adrbild + xdsEinzelkontaktadressanrede.asstring+chr(13)+chr(10);\r\n end;\r\n if (length(xdsEinzelkontakttitel.asstring)>1) then\r\n begin\r\n adrbild:=adrbild + xdsEinzelkontakttitel.asstring+' ';\r\n end;\r\n if length(xdsEinzelkontaktvorname.asstring)>1 then\r\n begin\r\n adrbild:=adrbild + xdsEinzelkontaktvorname.asstring+' ';\r\n end;\r\n adrbild:=adrbild + xdsEinzelkontaktnachname.asstring+chr(13)+chr(10);\r\n if length(xdsEinzelkontaktAdresszeile2.asstring)>0 then\r\n begin\r\n adrbild:=adrbild + xdsEinzelkontaktadresszeile2.asstring+chr(13)+chr(10);\r\n end;\r\n if length(xdsEinzelkontaktAdresszeile3.asstring)>0 then\r\n begin\r\n adrbild:=adrbild + xdsEinzelkontaktadresszeile3.asstring+chr(13)+chr(10);\r\n end;\r\n adrbild:=adrbild + xdsEinzelkontaktStrasse.asstring+chr(13)+chr(10);\r\n if xdsEinzelkontaktLaenderkennzeichen.asboolean=true then\r\n begin\r\n adrbild:=adrbild + xdsEinzelkontaktpostleitzahl.asstring+ ' ';\r\n adrbild:=adrbild + uppercase(xdsEinzelkontaktort.asstring)+chr(13)+chr(10);\r\n adrbild:=adrbild + uppercase(xdsEinzelkontaktland.asstring);\r\n end\r\n else\r\n begin\r\n adrbild:=adrbild +xdsEinzelkontaktpostleitzahl.asstring+ ' ';\r\n adrbild:=adrbild + xdsEinzelkontaktort.asstring+chr(13)+chr(10);\r\n end;\r\n xdsEinzelkontaktAdresseBild.asstring:=adrbild;\r\n\r\n if xdsbestkey.Locate('BesteuerungKey',xdsEinzelkontaktBesteuerungKey.AsString,[])=true then\r\n begin\r\n xdsEinzelkontaktumsatzsteuerausweis.AsBoolean:=xdsbestkeyUmsatzsteuerausweis.AsBoolean;\r\n xdsEinzelkontaktErloesKontoUST1.AsString:=xdsBestKeyKtoErloeseSatz1.asstring;\r\n xdsEinzelkontaktErloesKontoUST2.AsString:=xdsBestKeyKtoErloeseSatz2.asstring;\r\n xdsEinzelkontaktErloesKontoUST3.AsString:=xdsBestKeyKtoErloeseSatz3.asstring;\r\n xdsEinzelkontaktErloesKontoUST4.AsString:=xdsBestKeyKtoErloeseSatz4.asstring;\r\n xdsEinzelkontaktErloesKontoUST5.AsString:=xdsBestKeyKtoErloeseSatz5.asstring;\r\n xdsEinzelkontaktErloesKontoUST6.AsString:=xdsBestKeyKtoErloeseSatz6.asstring;\r\n end;\r\n xdsEinzelkontaktprotokoll.asstring:=xdsEinzelkontaktprotokoll.asstring+datetimetostr(date+time)+' CADIAWEB '+ BenutzerLoginName+#13+#10;\r\n xdsEinzelkontaktDatumgeaendert.asdatetime:=date+time;\r\nend;\r\n\r\nprocedure TKontaktAenderung.xdsLaenderAfterOpen(DataSet: TDataSet);\r\nbegin\r\n xdsEinzelkontakt.Close;\r\n xdseinzelkontakt.QueryString:='$filter=Kundennummer eq '+quotedstr(AEKundennummer);\r\n xdseinzelkontakt.Load;\r\nend;\r\n\r\nprocedure TKontaktAenderung.LoadDFMValues;\r\nbegin\r\n inherited LoadDFMValues;\r\n\r\n Container1 := THTMLContainer.Create(Self);\r\n Container2 := THTMLContainer.Create(Self);\r\n Container3 := THTMLContainer.Create(Self);\r\n TC := TTableControl.Create(Self);\r\n edtStrasse := TDBEdit.Create(Self);\r\n edtPostleitzahl := TDBEdit.Create(Self);\r\n btnzurueck := TButton.Create(Self);\r\n btnSpeichern := TButton.Create(Self);\r\n edtVorname := TDBEdit.Create(Self);\r\n edtAdresszeile2 := TDBEdit.Create(Self);\r\n edtAdresszeile3 := TDBEdit.Create(Self);\r\n edtOrt := TDBEdit.Create(Self);\r\n edtLand := TDBLookupComboBox.Create(Self);\r\n edtTelefon := TDBEdit.Create(Self);\r\n edtTelefonAlternativ := TDBEdit.Create(Self);\r\n edtTelefonMobil := TDBEdit.Create(Self);\r\n edtInternet := TDBEdit.Create(Self);\r\n edtEmail := TDBEdit.Create(Self);\r\n edtAdressanrede := TDBEdit.Create(Self);\r\n edtTitel := TDBEdit.Create(Self);\r\n edtNachname := TDBEdit.Create(Self);\r\n sourceEinzelkontakt := TDataSource.Create(Self);\r\n xdsEinzelkontakt := TXDataWebDataSet.Create(Self);\r\n xdsEinzelkontaktKundennummer := TStringField.Create(Self);\r\n xdsEinzelkontaktGruppeKunden := TBooleanField.Create(Self);\r\n xdsEinzelkontaktGruppeLieferanten := TBooleanField.Create(Self);\r\n xdsEinzelkontaktGruppeSonstige := TBooleanField.Create(Self);\r\n xdsEinzelkontaktGruppeNichtkunden := TBooleanField.Create(Self);\r\n xdsEinzelkontaktKontaktgruppe := TStringField.Create(Self);\r\n xdsEinzelkontaktNachname := TStringField.Create(Self);\r\n xdsEinzelkontaktVorname := TStringField.Create(Self);\r\n xdsEinzelkontaktAdresszeile2 := TStringField.Create(Self);\r\n xdsEinzelkontaktAdresszeile3 := TStringField.Create(Self);\r\n xdsEinzelkontaktStrasse := TStringField.Create(Self);\r\n xdsEinzelkontaktPostleitzahl := TStringField.Create(Self);\r\n xdsEinzelkontaktOrt := TStringField.Create(Self);\r\n xdsEinzelkontaktLaenderkuerzel := TStringField.Create(Self);\r\n xdsEinzelkontaktLand := TStringField.Create(Self);\r\n xdsEinzelkontaktLaenderkennzeichen := TBooleanField.Create(Self);\r\n xdsEinzelkontaktAdressanrede := TStringField.Create(Self);\r\n xdsEinzelkontaktBriefanrede1 := TStringField.Create(Self);\r\n xdsEinzelkontaktBriefanrede2 := TStringField.Create(Self);\r\n xdsEinzelkontaktAdresseBild := TStringField.Create(Self);\r\n xdsEinzelkontaktLieferanschrift := TStringField.Create(Self);\r\n xdsEinzelkontaktGeburtsdatum := TDateTimeField.Create(Self);\r\n xdsEinzelkontaktTelefonNummer := TStringField.Create(Self);\r\n xdsEinzelkontaktTelefaxNummer := TStringField.Create(Self);\r\n xdsEinzelkontaktMobilTelefon := TStringField.Create(Self);\r\n xdsEinzelkontaktEMail := TStringField.Create(Self);\r\n xdsEinzelkontaktInternet := TStringField.Create(Self);\r\n xdsEinzelkontaktUmsatzsteuerID := TStringField.Create(Self);\r\n xdsEinzelkontaktUmsatzsteuerausweis := TBooleanField.Create(Self);\r\n xdsEinzelkontaktBemerkungen := TStringField.Create(Self);\r\n xdsEinzelkontaktBranche := TStringField.Create(Self);\r\n xdsEinzelkontaktSelektiert1 := TBooleanField.Create(Self);\r\n xdsEinzelkontaktSelektiert2 := TBooleanField.Create(Self);\r\n xdsEinzelkontaktSelektiert3 := TBooleanField.Create(Self);\r\n xdsEinzelkontaktZahlungsbedingung := TIntegerField.Create(Self);\r\n xdsEinzelkontaktTransportbedingung := TStringField.Create(Self);\r\n xdsEinzelkontaktKilometer := TIntegerField.Create(Self);\r\n xdsEinzelkontaktRabattsatz := TFloatField.Create(Self);\r\n xdsEinzelkontaktStundensatz := TFloatField.Create(Self);\r\n xdsEinzelkontaktKontonummer := TStringField.Create(Self);\r\n xdsEinzelkontaktBank := TStringField.Create(Self);\r\n xdsEinzelkontaktBankleitzahl := TFloatField.Create(Self);\r\n xdsEinzelkontaktKontoinhaber := TStringField.Create(Self);\r\n xdsEinzelkontaktBetreuer := TStringField.Create(Self);\r\n xdsEinzelkontaktQuelle := TStringField.Create(Self);\r\n xdsEinzelkontaktSuchmerkmal := TStringField.Create(Self);\r\n xdsEinzelkontaktWarenkreditlimit := TFloatField.Create(Self);\r\n xdsEinzelkontaktWarenkreditgesperrt := TBooleanField.Create(Self);\r\n xdsEinzelkontaktKundennummerFremd := TStringField.Create(Self);\r\n xdsEinzelkontaktKeinNewsletter := TBooleanField.Create(Self);\r\n xdsEinzelkontaktDebitorennummer := TStringField.Create(Self);\r\n xdsEinzelkontaktKreditorennummer := TStringField.Create(Self);\r\n xdsEinzelkontaktTelefonAlternativ := TStringField.Create(Self);\r\n xdsEinzelkontaktKostentraeger := TStringField.Create(Self);\r\n xdsEinzelkontaktIBAN := TStringField.Create(Self);\r\n xdsEinzelkontaktBIC := TStringField.Create(Self);\r\n xdsEinzelkontaktEmailkonto := TStringField.Create(Self);\r\n xdsEinzelkontaktBenutzername := TStringField.Create(Self);\r\n xdsEinzelkontaktPasswort := TStringField.Create(Self);\r\n xdsEinzelkontaktExportOutlook := TBooleanField.Create(Self);\r\n xdsEinzelkontaktNichtInListeAnzeigen := TBooleanField.Create(Self);\r\n xdsEinzelkontaktKreditkarteArt := TStringField.Create(Self);\r\n xdsEinzelkontaktKreditkarteInhaber := TStringField.Create(Self);\r\n xdsEinzelkontaktKreditkarteNummer := TStringField.Create(Self);\r\n xdsEinzelkontaktKreditkarteGueltigMonat := TStringField.Create(Self);\r\n xdsEinzelkontaktKreditkarteGueltigJahr := TIntegerField.Create(Self);\r\n xdsEinzelkontaktKreditkartePruefziffer := TStringField.Create(Self);\r\n xdsEinzelkontaktDatumNeu := TDateTimeField.Create(Self);\r\n xdsEinzelkontaktDatumgeaendert := TDateTimeField.Create(Self);\r\n xdsEinzelkontaktTitel := TStringField.Create(Self);\r\n xdsEinzelkontaktStundensatzMontage := TFloatField.Create(Self);\r\n xdsEinzelkontaktStdMontageU25 := TFloatField.Create(Self);\r\n xdsEinzelkontaktStdMontageU50 := TFloatField.Create(Self);\r\n xdsEinzelkontaktStdMontageU70 := TFloatField.Create(Self);\r\n xdsEinzelkontaktStdMontageU100 := TFloatField.Create(Self);\r\n xdsEinzelkontaktStdMontageU150 := TFloatField.Create(Self);\r\n xdsEinzelkontaktStundensatzWerkstatt := TFloatField.Create(Self);\r\n xdsEinzelkontaktStdWerkstattU25 := TFloatField.Create(Self);\r\n xdsEinzelkontaktStdWerkstattU50 := TFloatField.Create(Self);\r\n xdsEinzelkontaktStdWerkstattU70 := TFloatField.Create(Self);\r\n xdsEinzelkontaktStdWerkstattU100 := TFloatField.Create(Self);\r\n xdsEinzelkontaktStdWerkstattU150 := TFloatField.Create(Self);\r\n xdsEinzelkontaktArchivReferenz := TStringField.Create(Self);\r\n xdsEinzelkontaktErloesKontoUST1 := TStringField.Create(Self);\r\n xdsEinzelkontaktErloesKontoUST2 := TStringField.Create(Self);\r\n xdsEinzelkontaktErloesKontoUST3 := TStringField.Create(Self);\r\n xdsEinzelkontaktGebKal := TBooleanField.Create(Self);\r\n xdsEinzelkontaktEmailversand := TBooleanField.Create(Self);\r\n xdsEinzelkontaktMahnspesen := TBooleanField.Create(Self);\r\n xdsEinzelkontaktRechnungSchluss := TStringField.Create(Self);\r\n xdsEinzelkontaktBenutzerNeu := TStringField.Create(Self);\r\n xdsEinzelkontaktBenutzerGeaendert := TStringField.Create(Self);\r\n xdsEinzelkontaktBelegsprache := TStringField.Create(Self);\r\n xdsEinzelkontaktkmSatz := TFloatField.Create(Self);\r\n xdsEinzelkontaktKundenklassetext := TStringField.Create(Self);\r\n xdsEinzelkontaktKundenklasseFarbe := TIntegerField.Create(Self);\r\n xdsEinzelkontaktAbweichenderRechnungsEmpfaenger := TStringField.Create(Self);\r\n xdsEinzelkontaktProtokoll := TStringField.Create(Self);\r\n xdsEinzelkontaktILNTyp1 := TStringField.Create(Self);\r\n xdsEinzelkontaktILNTyp2 := TStringField.Create(Self);\r\n xdsEinzelkontaktKontaktGUID := TStringField.Create(Self);\r\n xdsEinzelkontaktPLZGUID := TStringField.Create(Self);\r\n xdsEinzelkontaktPreislistenVariantePakete := TStringField.Create(Self);\r\n xdsEinzelkontaktSchluesselRechnungslauf := TStringField.Create(Self);\r\n xdsEinzelkontaktRechnungEmail := TStringField.Create(Self);\r\n xdsEinzelkontaktZahlungsbedingungEK := TIntegerField.Create(Self);\r\n xdsEinzelkontaktTransportbedingungEK := TStringField.Create(Self);\r\n xdsEinzelkontaktRabattsatzEK := TFloatField.Create(Self);\r\n xdsEinzelkontaktVertreterMatchcode := TStringField.Create(Self);\r\n xdsEinzelkontaktVertreterProvisionssatz := TFloatField.Create(Self);\r\n xdsEinzelkontaktUmsatzVKJahr := TFloatField.Create(Self);\r\n xdsEinzelkontaktUmsatzVKVorjahr := TFloatField.Create(Self);\r\n xdsEinzelkontaktUmsatzEKJahr := TFloatField.Create(Self);\r\n xdsEinzelkontaktUmsatzEKVorjahr := TFloatField.Create(Self);\r\n xdsEinzelkontaktSteuernummer := TStringField.Create(Self);\r\n xdsEinzelkontaktLoginPW := TStringField.Create(Self);\r\n xdsEinzelkontaktREperFax := TBooleanField.Create(Self);\r\n xdsEinzelkontaktErreichbarkeit := TStringField.Create(Self);\r\n xdsEinzelkontaktErloesKontoUST4 := TStringField.Create(Self);\r\n xdsEinzelkontaktErloesKontoUST5 := TStringField.Create(Self);\r\n xdsEinzelkontaktErloesKontoUST6 := TStringField.Create(Self);\r\n xdsEinzelkontaktBesteuerungKey := TIntegerField.Create(Self);\r\n xdsEinzelkontaktAuftraegeJahr := TFloatField.Create(Self);\r\n xdsEinzelkontaktAuftraegeVorjahr := TFloatField.Create(Self);\r\n xdsEinzelkontaktLieferadresseID := TIntegerField.Create(Self);\r\n xdsEinzelkontaktUSTIDgeprueft := TDateTimeField.Create(Self);\r\n xdsEinzelkontaktKontaktverbund := TStringField.Create(Self);\r\n xdsEinzelkontaktHinweis := TStringField.Create(Self);\r\n xdsEinzelkontaktLatitude := TFloatField.Create(Self);\r\n xdsEinzelkontaktLongitude := TFloatField.Create(Self);\r\n xdsEinzelkontaktkmLuftlinie := TFloatField.Create(Self);\r\n xdsEinzelkontaktGoogleID := TStringField.Create(Self);\r\n xdsEinzelkontaktGoogleUpdatedUTC := TDateTimeField.Create(Self);\r\n xdsEinzelkontaktBundesland := TStringField.Create(Self);\r\n xdsEinzelkontaktRegion := TStringField.Create(Self);\r\n xdsEinzelkontaktMandatsreferenz := TStringField.Create(Self);\r\n xdsEinzelkontaktMandatsreferenzVom := TDateTimeField.Create(Self);\r\n xdsEinzelkontaktLastschriftArt := TStringField.Create(Self);\r\n xdsEinzelkontaktMahnsperre := TBooleanField.Create(Self);\r\n xdsEinzelkontaktSuchbegriff := TStringField.Create(Self);\r\n xdsEinzelkontaktLieferanschriftDaten := TStringField.Create(Self);\r\n xdsEinzelkontaktExportKasse := TBooleanField.Create(Self);\r\n xdsEinzelkontaktLoeschvormerkungDatum := TDateTimeField.Create(Self);\r\n xdsEinzelkontaktLoeschvormerkungGrund := TStringField.Create(Self);\r\n xdsEinzelkontaktPseudonymisiert := TStringField.Create(Self);\r\n xdsEinzelkontaktLoginAktiv := TIntegerField.Create(Self);\r\n xdsEinzelkontaktSonstigeDaten := TStringField.Create(Self);\r\n xdsEinzelkontaktB2C := TBooleanField.Create(Self);\r\n xdsEinzelkontaktTIN := TStringField.Create(Self);\r\n xdsEinzelkontaktMindestbestellwert := TFloatField.Create(Self);\r\n xdsLaender := TXDataWebDataSet.Create(Self);\r\n xdsLaenderLaenderkuerzel := TStringField.Create(Self);\r\n xdsLaenderLand := TStringField.Create(Self);\r\n sourceLaender := TDataSource.Create(Self);\r\n xdsBestKey := TXDataWebDataSet.Create(Self);\r\n xdsBestKeyBesteuerungKey := TIntegerField.Create(Self);\r\n xdsBestKeyBesteuerungKurzText := TStringField.Create(Self);\r\n xdsBestKeyBesteuerungLangText := TStringField.Create(Self);\r\n xdsBestKeyUmsatzsteuerausweis := TBooleanField.Create(Self);\r\n xdsBestKeyKtoVorsteuerSatz1 := TIntegerField.Create(Self);\r\n xdsBestKeyKtoVorsteuerSatz2 := TIntegerField.Create(Self);\r\n xdsBestKeyKtoVorsteuerSatz3 := TIntegerField.Create(Self);\r\n xdsBestKeyKtoVorsteuerSatz4 := TIntegerField.Create(Self);\r\n xdsBestKeyKtoVorsteuerSatz5 := TIntegerField.Create(Self);\r\n xdsBestKeyKtoVorsteuerSatz6 := TIntegerField.Create(Self);\r\n xdsBestKeyKtoErloeseSatz1 := TIntegerField.Create(Self);\r\n xdsBestKeyKtoErloeseSatz2 := TIntegerField.Create(Self);\r\n xdsBestKeyKtoErloeseSatz3 := TIntegerField.Create(Self);\r\n xdsBestKeyKtoErloeseSatz4 := TIntegerField.Create(Self);\r\n xdsBestKeyKtoErloeseSatz5 := TIntegerField.Create(Self);\r\n xdsBestKeyKtoErloeseSatz6 := TIntegerField.Create(Self);\r\n xdsBestKeyKtoSkontoaufwandSatz1 := TIntegerField.Create(Self);\r\n xdsBestKeyKtoSkontoaufwandSatz2 := TIntegerField.Create(Self);\r\n xdsBestKeyKtoSkontoaufwandSatz3 := TIntegerField.Create(Self);\r\n xdsBestKeyKtoSkontoaufwandSatz4 := TIntegerField.Create(Self);\r\n xdsBestKeyKtoSkontoaufwandSatz5 := TIntegerField.Create(Self);\r\n xdsBestKeyKtoSkontoaufwandSatz6 := TIntegerField.Create(Self);\r\n xdsBestKeyKtoSkontoertragSatz1 := TIntegerField.Create(Self);\r\n xdsBestKeyKtoSkontoertragSatz2 := TIntegerField.Create(Self);\r\n xdsBestKeyKtoSkontoertragSatz3 := TIntegerField.Create(Self);\r\n xdsBestKeyKtoSkontoertragSatz4 := TIntegerField.Create(Self);\r\n xdsBestKeyKtoSkontoertragSatz5 := TIntegerField.Create(Self);\r\n xdsBestKeyKtoSkontoertragSatz6 := TIntegerField.Create(Self);\r\n xdsBestKeyKtoErloesschmaelerungenSatz1 := TIntegerField.Create(Self);\r\n xdsBestKeyKtoErloesschmaelerungenSatz2 := TIntegerField.Create(Self);\r\n xdsBestKeyKtoErloesschmaelerungenSatz3 := TIntegerField.Create(Self);\r\n xdsBestKeyKtoErloesschmaelerungenSatz4 := TIntegerField.Create(Self);\r\n xdsBestKeyKtoErloesschmaelerungenSatz5 := TIntegerField.Create(Self);\r\n xdsBestKeyKtoErloesschmaelerungenSatz6 := TIntegerField.Create(Self);\r\n xdsBestKeyNatura := TStringField.Create(Self);\r\n xdsBestKeyBSchl_UST_Satz1 := TIntegerField.Create(Self);\r\n xdsBestKeyBSchl_UST_Satz2 := TIntegerField.Create(Self);\r\n xdsBestKeyBSchl_UST_Satz3 := TIntegerField.Create(Self);\r\n xdsBestKeyBSchl_UST_Satz4 := TIntegerField.Create(Self);\r\n xdsBestKeyBSchl_UST_Satz5 := TIntegerField.Create(Self);\r\n xdsBestKeyBSchl_UST_Satz6 := TIntegerField.Create(Self);\r\n xdsBestKeyBSchl_Vorsteuer_Satz1 := TIntegerField.Create(Self);\r\n xdsBestKeyBSchl_Vorsteuer_Satz2 := TIntegerField.Create(Self);\r\n xdsBestKeyBSchl_Vorsteuer_Satz3 := TIntegerField.Create(Self);\r\n xdsBestKeyBSchl_Vorsteuer_Satz4 := TIntegerField.Create(Self);\r\n xdsBestKeyBSchl_Vorsteuer_Satz5 := TIntegerField.Create(Self);\r\n xdsBestKeyBSchl_Vorsteuer_Satz6 := TIntegerField.Create(Self);\r\n xdsBestKeyDokTyp := TStringField.Create(Self);\r\n sourceBestKey := TDataSource.Create(Self);\r\n\r\n Container1.BeforeLoadDFMValues;\r\n Container2.BeforeLoadDFMValues;\r\n Container3.BeforeLoadDFMValues;\r\n TC.BeforeLoadDFMValues;\r\n edtStrasse.BeforeLoadDFMValues;\r\n edtPostleitzahl.BeforeLoadDFMValues;\r\n btnzurueck.BeforeLoadDFMValues;\r\n btnSpeichern.BeforeLoadDFMValues;\r\n edtVorname.BeforeLoadDFMValues;\r\n edtAdresszeile2.BeforeLoadDFMValues;\r\n edtAdresszeile3.BeforeLoadDFMValues;\r\n edtOrt.BeforeLoadDFMValues;\r\n edtLand.BeforeLoadDFMValues;\r\n edtTelefon.BeforeLoadDFMValues;\r\n edtTelefonAlternativ.BeforeLoadDFMValues;\r\n edtTelefonMobil.BeforeLoadDFMValues;\r\n edtInternet.BeforeLoadDFMValues;\r\n edtEmail.BeforeLoadDFMValues;\r\n edtAdressanrede.BeforeLoadDFMValues;\r\n edtTitel.BeforeLoadDFMValues;\r\n edtNachname.BeforeLoadDFMValues;\r\n sourceEinzelkontakt.BeforeLoadDFMValues;\r\n xdsEinzelkontakt.BeforeLoadDFMValues;\r\n xdsEinzelkontaktKundennummer.BeforeLoadDFMValues;\r\n xdsEinzelkontaktGruppeKunden.BeforeLoadDFMValues;\r\n xdsEinzelkontaktGruppeLieferanten.BeforeLoadDFMValues;\r\n xdsEinzelkontaktGruppeSonstige.BeforeLoadDFMValues;\r\n xdsEinzelkontaktGruppeNichtkunden.BeforeLoadDFMValues;\r\n xdsEinzelkontaktKontaktgruppe.BeforeLoadDFMValues;\r\n xdsEinzelkontaktNachname.BeforeLoadDFMValues;\r\n xdsEinzelkontaktVorname.BeforeLoadDFMValues;\r\n xdsEinzelkontaktAdresszeile2.BeforeLoadDFMValues;\r\n xdsEinzelkontaktAdresszeile3.BeforeLoadDFMValues;\r\n xdsEinzelkontaktStrasse.BeforeLoadDFMValues;\r\n xdsEinzelkontaktPostleitzahl.BeforeLoadDFMValues;\r\n xdsEinzelkontaktOrt.BeforeLoadDFMValues;\r\n xdsEinzelkontaktLaenderkuerzel.BeforeLoadDFMValues;\r\n xdsEinzelkontaktLand.BeforeLoadDFMValues;\r\n xdsEinzelkontaktLaenderkennzeichen.BeforeLoadDFMValues;\r\n xdsEinzelkontaktAdressanrede.BeforeLoadDFMValues;\r\n xdsEinzelkontaktBriefanrede1.BeforeLoadDFMValues;\r\n xdsEinzelkontaktBriefanrede2.BeforeLoadDFMValues;\r\n xdsEinzelkontaktAdresseBild.BeforeLoadDFMValues;\r\n xdsEinzelkontaktLieferanschrift.BeforeLoadDFMValues;\r\n xdsEinzelkontaktGeburtsdatum.BeforeLoadDFMValues;\r\n xdsEinzelkontaktTelefonNummer.BeforeLoadDFMValues;\r\n xdsEinzelkontaktTelefaxNummer.BeforeLoadDFMValues;\r\n xdsEinzelkontaktMobilTelefon.BeforeLoadDFMValues;\r\n xdsEinzelkontaktEMail.BeforeLoadDFMValues;\r\n xdsEinzelkontaktInternet.BeforeLoadDFMValues;\r\n xdsEinzelkontaktUmsatzsteuerID.BeforeLoadDFMValues;\r\n xdsEinzelkontaktUmsatzsteuerausweis.BeforeLoadDFMValues;\r\n xdsEinzelkontaktBemerkungen.BeforeLoadDFMValues;\r\n xdsEinzelkontaktBranche.BeforeLoadDFMValues;\r\n xdsEinzelkontaktSelektiert1.BeforeLoadDFMValues;\r\n xdsEinzelkontaktSelektiert2.BeforeLoadDFMValues;\r\n xdsEinzelkontaktSelektiert3.BeforeLoadDFMValues;\r\n xdsEinzelkontaktZahlungsbedingung.BeforeLoadDFMValues;\r\n xdsEinzelkontaktTransportbedingung.BeforeLoadDFMValues;\r\n xdsEinzelkontaktKilometer.BeforeLoadDFMValues;\r\n xdsEinzelkontaktRabattsatz.BeforeLoadDFMValues;\r\n xdsEinzelkontaktStundensatz.BeforeLoadDFMValues;\r\n xdsEinzelkontaktKontonummer.BeforeLoadDFMValues;\r\n xdsEinzelkontaktBank.BeforeLoadDFMValues;\r\n xdsEinzelkontaktBankleitzahl.BeforeLoadDFMValues;\r\n xdsEinzelkontaktKontoinhaber.BeforeLoadDFMValues;\r\n xdsEinzelkontaktBetreuer.BeforeLoadDFMValues;\r\n xdsEinzelkontaktQuelle.BeforeLoadDFMValues;\r\n xdsEinzelkontaktSuchmerkmal.BeforeLoadDFMValues;\r\n xdsEinzelkontaktWarenkreditlimit.BeforeLoadDFMValues;\r\n xdsEinzelkontaktWarenkreditgesperrt.BeforeLoadDFMValues;\r\n xdsEinzelkontaktKundennummerFremd.BeforeLoadDFMValues;\r\n xdsEinzelkontaktKeinNewsletter.BeforeLoadDFMValues;\r\n xdsEinzelkontaktDebitorennummer.BeforeLoadDFMValues;\r\n xdsEinzelkontaktKreditorennummer.BeforeLoadDFMValues;\r\n xdsEinzelkontaktTelefonAlternativ.BeforeLoadDFMValues;\r\n xdsEinzelkontaktKostentraeger.BeforeLoadDFMValues;\r\n xdsEinzelkontaktIBAN.BeforeLoadDFMValues;\r\n xdsEinzelkontaktBIC.BeforeLoadDFMValues;\r\n xdsEinzelkontaktEmailkonto.BeforeLoadDFMValues;\r\n xdsEinzelkontaktBenutzername.BeforeLoadDFMValues;\r\n xdsEinzelkontaktPasswort.BeforeLoadDFMValues;\r\n xdsEinzelkontaktExportOutlook.BeforeLoadDFMValues;\r\n xdsEinzelkontaktNichtInListeAnzeigen.BeforeLoadDFMValues;\r\n xdsEinzelkontaktKreditkarteArt.BeforeLoadDFMValues;\r\n xdsEinzelkontaktKreditkarteInhaber.BeforeLoadDFMValues;\r\n xdsEinzelkontaktKreditkarteNummer.BeforeLoadDFMValues;\r\n xdsEinzelkontaktKreditkarteGueltigMonat.BeforeLoadDFMValues;\r\n xdsEinzelkontaktKreditkarteGueltigJahr.BeforeLoadDFMValues;\r\n xdsEinzelkontaktKreditkartePruefziffer.BeforeLoadDFMValues;\r\n xdsEinzelkontaktDatumNeu.BeforeLoadDFMValues;\r\n xdsEinzelkontaktDatumgeaendert.BeforeLoadDFMValues;\r\n xdsEinzelkontaktTitel.BeforeLoadDFMValues;\r\n xdsEinzelkontaktStundensatzMontage.BeforeLoadDFMValues;\r\n xdsEinzelkontaktStdMontageU25.BeforeLoadDFMValues;\r\n xdsEinzelkontaktStdMontageU50.BeforeLoadDFMValues;\r\n xdsEinzelkontaktStdMontageU70.BeforeLoadDFMValues;\r\n xdsEinzelkontaktStdMontageU100.BeforeLoadDFMValues;\r\n xdsEinzelkontaktStdMontageU150.BeforeLoadDFMValues;\r\n xdsEinzelkontaktStundensatzWerkstatt.BeforeLoadDFMValues;\r\n xdsEinzelkontaktStdWerkstattU25.BeforeLoadDFMValues;\r\n xdsEinzelkontaktStdWerkstattU50.BeforeLoadDFMValues;\r\n xdsEinzelkontaktStdWerkstattU70.BeforeLoadDFMValues;\r\n xdsEinzelkontaktStdWerkstattU100.BeforeLoadDFMValues;\r\n xdsEinzelkontaktStdWerkstattU150.BeforeLoadDFMValues;\r\n xdsEinzelkontaktArchivReferenz.BeforeLoadDFMValues;\r\n xdsEinzelkontaktErloesKontoUST1.BeforeLoadDFMValues;\r\n xdsEinzelkontaktErloesKontoUST2.BeforeLoadDFMValues;\r\n xdsEinzelkontaktErloesKontoUST3.BeforeLoadDFMValues;\r\n xdsEinzelkontaktGebKal.BeforeLoadDFMValues;\r\n xdsEinzelkontaktEmailversand.BeforeLoadDFMValues;\r\n xdsEinzelkontaktMahnspesen.BeforeLoadDFMValues;\r\n xdsEinzelkontaktRechnungSchluss.BeforeLoadDFMValues;\r\n xdsEinzelkontaktBenutzerNeu.BeforeLoadDFMValues;\r\n xdsEinzelkontaktBenutzerGeaendert.BeforeLoadDFMValues;\r\n xdsEinzelkontaktBelegsprache.BeforeLoadDFMValues;\r\n xdsEinzelkontaktkmSatz.BeforeLoadDFMValues;\r\n xdsEinzelkontaktKundenklassetext.BeforeLoadDFMValues;\r\n xdsEinzelkontaktKundenklasseFarbe.BeforeLoadDFMValues;\r\n xdsEinzelkontaktAbweichenderRechnungsEmpfaenger.BeforeLoadDFMValues;\r\n xdsEinzelkontaktProtokoll.BeforeLoadDFMValues;\r\n xdsEinzelkontaktILNTyp1.BeforeLoadDFMValues;\r\n xdsEinzelkontaktILNTyp2.BeforeLoadDFMValues;\r\n xdsEinzelkontaktKontaktGUID.BeforeLoadDFMValues;\r\n xdsEinzelkontaktPLZGUID.BeforeLoadDFMValues;\r\n xdsEinzelkontaktPreislistenVariantePakete.BeforeLoadDFMValues;\r\n xdsEinzelkontaktSchluesselRechnungslauf.BeforeLoadDFMValues;\r\n xdsEinzelkontaktRechnungEmail.BeforeLoadDFMValues;\r\n xdsEinzelkontaktZahlungsbedingungEK.BeforeLoadDFMValues;\r\n xdsEinzelkontaktTransportbedingungEK.BeforeLoadDFMValues;\r\n xdsEinzelkontaktRabattsatzEK.BeforeLoadDFMValues;\r\n xdsEinzelkontaktVertreterMatchcode.BeforeLoadDFMValues;\r\n xdsEinzelkontaktVertreterProvisionssatz.BeforeLoadDFMValues;\r\n xdsEinzelkontaktUmsatzVKJahr.BeforeLoadDFMValues;\r\n xdsEinzelkontaktUmsatzVKVorjahr.BeforeLoadDFMValues;\r\n xdsEinzelkontaktUmsatzEKJahr.BeforeLoadDFMValues;\r\n xdsEinzelkontaktUmsatzEKVorjahr.BeforeLoadDFMValues;\r\n xdsEinzelkontaktSteuernummer.BeforeLoadDFMValues;\r\n xdsEinzelkontaktLoginPW.BeforeLoadDFMValues;\r\n xdsEinzelkontaktREperFax.BeforeLoadDFMValues;\r\n xdsEinzelkontaktErreichbarkeit.BeforeLoadDFMValues;\r\n xdsEinzelkontaktErloesKontoUST4.BeforeLoadDFMValues;\r\n xdsEinzelkontaktErloesKontoUST5.BeforeLoadDFMValues;\r\n xdsEinzelkontaktErloesKontoUST6.BeforeLoadDFMValues;\r\n xdsEinzelkontaktBesteuerungKey.BeforeLoadDFMValues;\r\n xdsEinzelkontaktAuftraegeJahr.BeforeLoadDFMValues;\r\n xdsEinzelkontaktAuftraegeVorjahr.BeforeLoadDFMValues;\r\n xdsEinzelkontaktLieferadresseID.BeforeLoadDFMValues;\r\n xdsEinzelkontaktUSTIDgeprueft.BeforeLoadDFMValues;\r\n xdsEinzelkontaktKontaktverbund.BeforeLoadDFMValues;\r\n xdsEinzelkontaktHinweis.BeforeLoadDFMValues;\r\n xdsEinzelkontaktLatitude.BeforeLoadDFMValues;\r\n xdsEinzelkontaktLongitude.BeforeLoadDFMValues;\r\n xdsEinzelkontaktkmLuftlinie.BeforeLoadDFMValues;\r\n xdsEinzelkontaktGoogleID.BeforeLoadDFMValues;\r\n xdsEinzelkontaktGoogleUpdatedUTC.BeforeLoadDFMValues;\r\n xdsEinzelkontaktBundesland.BeforeLoadDFMValues;\r\n xdsEinzelkontaktRegion.BeforeLoadDFMValues;\r\n xdsEinzelkontaktMandatsreferenz.BeforeLoadDFMValues;\r\n xdsEinzelkontaktMandatsreferenzVom.BeforeLoadDFMValues;\r\n xdsEinzelkontaktLastschriftArt.BeforeLoadDFMValues;\r\n xdsEinzelkontaktMahnsperre.BeforeLoadDFMValues;\r\n xdsEinzelkontaktSuchbegriff.BeforeLoadDFMValues;\r\n xdsEinzelkontaktLieferanschriftDaten.BeforeLoadDFMValues;\r\n xdsEinzelkontaktExportKasse.BeforeLoadDFMValues;\r\n xdsEinzelkontaktLoeschvormerkungDatum.BeforeLoadDFMValues;\r\n xdsEinzelkontaktLoeschvormerkungGrund.BeforeLoadDFMValues;\r\n xdsEinzelkontaktPseudonymisiert.BeforeLoadDFMValues;\r\n xdsEinzelkontaktLoginAktiv.BeforeLoadDFMValues;\r\n xdsEinzelkontaktSonstigeDaten.BeforeLoadDFMValues;\r\n xdsEinzelkontaktB2C.BeforeLoadDFMValues;\r\n xdsEinzelkontaktTIN.BeforeLoadDFMValues;\r\n xdsEinzelkontaktMindestbestellwert.BeforeLoadDFMValues;\r\n xdsLaender.BeforeLoadDFMValues;\r\n xdsLaenderLaenderkuerzel.BeforeLoadDFMValues;\r\n xdsLaenderLand.BeforeLoadDFMValues;\r\n sourceLaender.BeforeLoadDFMValues;\r\n xdsBestKey.BeforeLoadDFMValues;\r\n xdsBestKeyBesteuerungKey.BeforeLoadDFMValues;\r\n xdsBestKeyBesteuerungKurzText.BeforeLoadDFMValues;\r\n xdsBestKeyBesteuerungLangText.BeforeLoadDFMValues;\r\n xdsBestKeyUmsatzsteuerausweis.BeforeLoadDFMValues;\r\n xdsBestKeyKtoVorsteuerSatz1.BeforeLoadDFMValues;\r\n xdsBestKeyKtoVorsteuerSatz2.BeforeLoadDFMValues;\r\n xdsBestKeyKtoVorsteuerSatz3.BeforeLoadDFMValues;\r\n xdsBestKeyKtoVorsteuerSatz4.BeforeLoadDFMValues;\r\n xdsBestKeyKtoVorsteuerSatz5.BeforeLoadDFMValues;\r\n xdsBestKeyKtoVorsteuerSatz6.BeforeLoadDFMValues;\r\n xdsBestKeyKtoErloeseSatz1.BeforeLoadDFMValues;\r\n xdsBestKeyKtoErloeseSatz2.BeforeLoadDFMValues;\r\n xdsBestKeyKtoErloeseSatz3.BeforeLoadDFMValues;\r\n xdsBestKeyKtoErloeseSatz4.BeforeLoadDFMValues;\r\n xdsBestKeyKtoErloeseSatz5.BeforeLoadDFMValues;\r\n xdsBestKeyKtoErloeseSatz6.BeforeLoadDFMValues;\r\n xdsBestKeyKtoSkontoaufwandSatz1.BeforeLoadDFMValues;\r\n xdsBestKeyKtoSkontoaufwandSatz2.BeforeLoadDFMValues;\r\n xdsBestKeyKtoSkontoaufwandSatz3.BeforeLoadDFMValues;\r\n xdsBestKeyKtoSkontoaufwandSatz4.BeforeLoadDFMValues;\r\n xdsBestKeyKtoSkontoaufwandSatz5.BeforeLoadDFMValues;\r\n xdsBestKeyKtoSkontoaufwandSatz6.BeforeLoadDFMValues;\r\n xdsBestKeyKtoSkontoertragSatz1.BeforeLoadDFMValues;\r\n xdsBestKeyKtoSkontoertragSatz2.BeforeLoadDFMValues;\r\n xdsBestKeyKtoSkontoertragSatz3.BeforeLoadDFMValues;\r\n xdsBestKeyKtoSkontoertragSatz4.BeforeLoadDFMValues;\r\n xdsBestKeyKtoSkontoertragSatz5.BeforeLoadDFMValues;\r\n xdsBestKeyKtoSkontoertragSatz6.BeforeLoadDFMValues;\r\n xdsBestKeyKtoErloesschmaelerungenSatz1.BeforeLoadDFMValues;\r\n xdsBestKeyKtoErloesschmaelerungenSatz2.BeforeLoadDFMValues;\r\n xdsBestKeyKtoErloesschmaelerungenSatz3.BeforeLoadDFMValues;\r\n xdsBestKeyKtoErloesschmaelerungenSatz4.BeforeLoadDFMValues;\r\n xdsBestKeyKtoErloesschmaelerungenSatz5.BeforeLoadDFMValues;\r\n xdsBestKeyKtoErloesschmaelerungenSatz6.BeforeLoadDFMValues;\r\n xdsBestKeyNatura.BeforeLoadDFMValues;\r\n xdsBestKeyBSchl_UST_Satz1.BeforeLoadDFMValues;\r\n xdsBestKeyBSchl_UST_Satz2.BeforeLoadDFMValues;\r\n xdsBestKeyBSchl_UST_Satz3.BeforeLoadDFMValues;\r\n xdsBestKeyBSchl_UST_Satz4.BeforeLoadDFMValues;\r\n xdsBestKeyBSchl_UST_Satz5.BeforeLoadDFMValues;\r\n xdsBestKeyBSchl_UST_Satz6.BeforeLoadDFMValues;\r\n xdsBestKeyBSchl_Vorsteuer_Satz1.BeforeLoadDFMValues;\r\n xdsBestKeyBSchl_Vorsteuer_Satz2.BeforeLoadDFMValues;\r\n xdsBestKeyBSchl_Vorsteuer_Satz3.BeforeLoadDFMValues;\r\n xdsBestKeyBSchl_Vorsteuer_Satz4.BeforeLoadDFMValues;\r\n xdsBestKeyBSchl_Vorsteuer_Satz5.BeforeLoadDFMValues;\r\n xdsBestKeyBSchl_Vorsteuer_Satz6.BeforeLoadDFMValues;\r\n xdsBestKeyDokTyp.BeforeLoadDFMValues;\r\n sourceBestKey.BeforeLoadDFMValues;\r\n try\r\n Name := 'KontaktAenderung';\r\n Width := 640;\r\n Height := 480;\r\n CSSLibrary := cssBootstrap;\r\n ElementFont := efCSS;\r\n SetEvent(Self, 'OnShow', 'WebFormShow');\r\n Container1.SetParentComponent(Self);\r\n Container1.Name := 'Container1';\r\n Container1.Left := 0;\r\n Container1.Top := 0;\r\n Container1.Width := 169;\r\n Container1.Height := 41;\r\n Container1.HeightStyle := ssAuto;\r\n Container1.WidthStyle := ssPercent;\r\n Container1.ElementFont := efCSS;\r\n Container1.ElementPosition := epIgnore;\r\n Container2.SetParentComponent(Self);\r\n Container2.Name := 'Container2';\r\n Container2.Left := 0;\r\n Container2.Top := 47;\r\n Container2.Width := 169;\r\n Container2.Height := 41;\r\n Container2.ElementClassName := 'd-flex flex-wrap m-1 border border-info';\r\n Container2.HeightStyle := ssAuto;\r\n Container2.WidthStyle := ssAuto;\r\n Container2.ChildOrder := 1;\r\n Container2.ElementFont := efCSS;\r\n Container2.ElementPosition := epIgnore;\r\n Container3.SetParentComponent(Self);\r\n Container3.Name := 'Container3';\r\n Container3.Left := 0;\r\n Container3.Top := 94;\r\n Container3.Width := 169;\r\n Container3.Height := 41;\r\n Container3.ElementClassName := 'd-flex m-1';\r\n Container3.HeightStyle := ssAuto;\r\n Container3.WidthStyle := ssAuto;\r\n Container3.ChildOrder := 2;\r\n Container3.ElementFont := efCSS;\r\n Container3.ElementPosition := epIgnore;\r\n TC.SetParentComponent(Self);\r\n TC.Name := 'TC';\r\n TC.Left := 32;\r\n TC.Top := 251;\r\n TC.Width := 152;\r\n TC.Height := 110;\r\n TC.ElementClassName := 'table table-hover table-bordered table-striped';\r\n TC.HeightStyle := ssAuto;\r\n TC.WidthStyle := ssPercent;\r\n TC.BorderColor := clSilver;\r\n TC.ChildOrder := 3;\r\n TC.ColHeader := False;\r\n TC.ElementFont := efCSS;\r\n TC.ElementHeaderClassName := 'table-info';\r\n TC.ElementPosition := epIgnore;\r\n TC.ElementTableClassName := 'table table-hover table-bordered table-striped';\r\n TC.Footer.ButtonActiveElementClassName := 'btn btn-primary';\r\n TC.Footer.ButtonElementClassName := 'btn btn-light';\r\n TC.Footer.DropDownElementClassName := 'form-control';\r\n TC.Footer.InputElementClassName := 'form-control';\r\n TC.Footer.LinkActiveElementClassName := 'link-primary';\r\n TC.Footer.LinkElementClassName := 'link-secondary';\r\n TC.Footer.ListElementClassName := 'pagination';\r\n TC.Footer.ListItemElementClassName := 'page-item';\r\n TC.Footer.ListLinkElementClassName := 'page-link';\r\n TC.Header.ButtonActiveElementClassName := 'btn btn-primary';\r\n TC.Header.ButtonElementClassName := 'btn btn-light';\r\n TC.Header.DropDownElementClassName := 'form-control';\r\n TC.Header.InputElementClassName := 'form-control';\r\n TC.Header.LinkActiveElementClassName := 'link-primary';\r\n TC.Header.LinkElementClassName := 'link-secondary';\r\n TC.Header.ListElementClassName := 'pagination';\r\n TC.Header.ListItemElementClassName := 'page-item';\r\n TC.Header.ListLinkElementClassName := 'page-link';\r\n TC.WordWrap := True;\r\n TC.ColCount := 2;\r\n edtStrasse.SetParentComponent(Self);\r\n edtStrasse.Name := 'edtStrasse';\r\n edtStrasse.Left := 352;\r\n edtStrasse.Top := 200;\r\n edtStrasse.Width := 220;\r\n edtStrasse.Height := 22;\r\n edtStrasse.ChildOrder := 4;\r\n edtStrasse.ElementClassName := 'form-control';\r\n edtStrasse.ElementFont := efCSS;\r\n edtStrasse.HeightStyle := ssAuto;\r\n edtStrasse.HeightPercent := 100.000000000000000000;\r\n edtStrasse.Text := 'edtStrasse';\r\n edtStrasse.WidthPercent := 100.000000000000000000;\r\n edtStrasse.DataField := 'Strasse';\r\n edtStrasse.DataSource := sourceEinzelkontakt;\r\n edtPostleitzahl.SetParentComponent(Self);\r\n edtPostleitzahl.Name := 'edtPostleitzahl';\r\n edtPostleitzahl.Left := 352;\r\n edtPostleitzahl.Top := 228;\r\n edtPostleitzahl.Width := 220;\r\n edtPostleitzahl.Height := 22;\r\n edtPostleitzahl.ChildOrder := 4;\r\n edtPostleitzahl.ElementClassName := 'form-control';\r\n edtPostleitzahl.ElementFont := efCSS;\r\n edtPostleitzahl.HeightStyle := ssAuto;\r\n edtPostleitzahl.HeightPercent := 100.000000000000000000;\r\n edtPostleitzahl.Text := 'WebDBEdit1';\r\n edtPostleitzahl.WidthPercent := 100.000000000000000000;\r\n edtPostleitzahl.DataField := 'Postleitzahl';\r\n edtPostleitzahl.DataSource := sourceEinzelkontakt;\r\n btnzurueck.SetParentComponent(Self);\r\n btnzurueck.Name := 'btnzurueck';\r\n btnzurueck.Left := 0;\r\n btnzurueck.Top := 158;\r\n btnzurueck.Width := 96;\r\n btnzurueck.Height := 25;\r\n btnzurueck.Caption := '<< zur'#252'ck';\r\n btnzurueck.ChildOrder := 4;\r\n btnzurueck.ElementClassName := 'btn btn-info btn-sm m-1 text-left';\r\n btnzurueck.ElementFont := efCSS;\r\n btnzurueck.ElementPosition := epIgnore;\r\n btnzurueck.HeightStyle := ssAuto;\r\n btnzurueck.HeightPercent := 100.000000000000000000;\r\n btnzurueck.WidthStyle := ssAuto;\r\n btnzurueck.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnzurueck, Self, 'OnClick', 'btnzurueckClick');\r\n btnSpeichern.SetParentComponent(Self);\r\n btnSpeichern.Name := 'btnSpeichern';\r\n btnSpeichern.Left := 102;\r\n btnSpeichern.Top := 158;\r\n btnSpeichern.Width := 96;\r\n btnSpeichern.Height := 25;\r\n btnSpeichern.Caption := 'speichern';\r\n btnSpeichern.ChildOrder := 4;\r\n btnSpeichern.ElementClassName := 'btn btn-info btn-sm m-1 text-left';\r\n btnSpeichern.ElementFont := efCSS;\r\n btnSpeichern.ElementPosition := epIgnore;\r\n btnSpeichern.HeightStyle := ssAuto;\r\n btnSpeichern.HeightPercent := 100.000000000000000000;\r\n btnSpeichern.WidthStyle := ssAuto;\r\n btnSpeichern.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnSpeichern, Self, 'OnClick', 'btnSpeichernClick');\r\n edtVorname.SetParentComponent(Self);\r\n edtVorname.Name := 'edtVorname';\r\n edtVorname.Left := 352;\r\n edtVorname.Top := 80;\r\n edtVorname.Width := 220;\r\n edtVorname.Height := 22;\r\n edtVorname.ChildOrder := 4;\r\n edtVorname.ElementClassName := 'form-control';\r\n edtVorname.ElementFont := efCSS;\r\n edtVorname.HeightStyle := ssAuto;\r\n edtVorname.HeightPercent := 100.000000000000000000;\r\n edtVorname.Text := 'edtStrasse';\r\n edtVorname.WidthPercent := 100.000000000000000000;\r\n edtVorname.DataField := 'Vorname';\r\n edtVorname.DataSource := sourceEinzelkontakt;\r\n edtAdresszeile2.SetParentComponent(Self);\r\n edtAdresszeile2.Name := 'edtAdresszeile2';\r\n edtAdresszeile2.Left := 352;\r\n edtAdresszeile2.Top := 108;\r\n edtAdresszeile2.Width := 220;\r\n edtAdresszeile2.Height := 22;\r\n edtAdresszeile2.ChildOrder := 4;\r\n edtAdresszeile2.ElementClassName := 'form-control';\r\n edtAdresszeile2.ElementFont := efCSS;\r\n edtAdresszeile2.HeightStyle := ssAuto;\r\n edtAdresszeile2.HeightPercent := 100.000000000000000000;\r\n edtAdresszeile2.Text := 'edtStrasse';\r\n edtAdresszeile2.WidthPercent := 100.000000000000000000;\r\n edtAdresszeile2.DataField := 'Adresszeile2';\r\n edtAdresszeile2.DataSource := sourceEinzelkontakt;\r\n edtAdresszeile3.SetParentComponent(Self);\r\n edtAdresszeile3.Name := 'edtAdresszeile3';\r\n edtAdresszeile3.Left := 352;\r\n edtAdresszeile3.Top := 136;\r\n edtAdresszeile3.Width := 220;\r\n edtAdresszeile3.Height := 22;\r\n edtAdresszeile3.ChildOrder := 4;\r\n edtAdresszeile3.ElementClassName := 'form-control';\r\n edtAdresszeile3.ElementFont := efCSS;\r\n edtAdresszeile3.HeightStyle := ssAuto;\r\n edtAdresszeile3.HeightPercent := 100.000000000000000000;\r\n edtAdresszeile3.Text := 'edtStrasse';\r\n edtAdresszeile3.WidthPercent := 100.000000000000000000;\r\n edtAdresszeile3.DataField := 'Adresszeile3';\r\n edtAdresszeile3.DataSource := sourceEinzelkontakt;\r\n edtOrt.SetParentComponent(Self);\r\n edtOrt.Name := 'edtOrt';\r\n edtOrt.Left := 352;\r\n edtOrt.Top := 256;\r\n edtOrt.Width := 220;\r\n edtOrt.Height := 22;\r\n edtOrt.ChildOrder := 4;\r\n edtOrt.ElementClassName := 'form-control';\r\n edtOrt.ElementFont := efCSS;\r\n edtOrt.HeightStyle := ssAuto;\r\n edtOrt.HeightPercent := 100.000000000000000000;\r\n edtOrt.Text := 'edtOrt';\r\n edtOrt.WidthPercent := 100.000000000000000000;\r\n edtOrt.DataField := 'Ort';\r\n edtOrt.DataSource := sourceEinzelkontakt;\r\n edtLand.SetParentComponent(Self);\r\n edtLand.Name := 'edtLand';\r\n edtLand.Left := 352;\r\n edtLand.Top := 296;\r\n edtLand.Width := 220;\r\n edtLand.Height := 22;\r\n edtLand.ElementClassName := 'form-control';\r\n edtLand.ElementFont := efCSS;\r\n edtLand.HeightStyle := ssAuto;\r\n edtLand.HeightPercent := 100.000000000000000000;\r\n edtLand.WidthPercent := 100.000000000000000000;\r\n edtLand.DataField := 'Land';\r\n edtLand.DataSource := sourceEinzelkontakt;\r\n edtLand.KeyField := 'Land';\r\n edtLand.ListField := 'Land';\r\n edtLand.ListSource := sourceLaender;\r\n edtTelefon.SetParentComponent(Self);\r\n edtTelefon.Name := 'edtTelefon';\r\n edtTelefon.Left := 352;\r\n edtTelefon.Top := 324;\r\n edtTelefon.Width := 220;\r\n edtTelefon.Height := 22;\r\n edtTelefon.ChildOrder := 4;\r\n edtTelefon.ElementClassName := 'form-control';\r\n edtTelefon.ElementFont := efCSS;\r\n edtTelefon.HeightStyle := ssAuto;\r\n edtTelefon.HeightPercent := 100.000000000000000000;\r\n edtTelefon.Text := 'edtTelefon';\r\n edtTelefon.WidthPercent := 100.000000000000000000;\r\n edtTelefon.DataField := 'TelefonNummer';\r\n edtTelefon.DataSource := sourceEinzelkontakt;\r\n edtTelefonAlternativ.SetParentComponent(Self);\r\n edtTelefonAlternativ.Name := 'edtTelefonAlternativ';\r\n edtTelefonAlternativ.Left := 352;\r\n edtTelefonAlternativ.Top := 352;\r\n edtTelefonAlternativ.Width := 220;\r\n edtTelefonAlternativ.Height := 22;\r\n edtTelefonAlternativ.ChildOrder := 4;\r\n edtTelefonAlternativ.ElementClassName := 'form-control';\r\n edtTelefonAlternativ.ElementFont := efCSS;\r\n edtTelefonAlternativ.HeightStyle := ssAuto;\r\n edtTelefonAlternativ.HeightPercent := 100.000000000000000000;\r\n edtTelefonAlternativ.Text := 'edtTelefon';\r\n edtTelefonAlternativ.WidthPercent := 100.000000000000000000;\r\n edtTelefonAlternativ.DataField := 'TelefonAlternativ';\r\n edtTelefonAlternativ.DataSource := sourceEinzelkontakt;\r\n edtTelefonMobil.SetParentComponent(Self);\r\n edtTelefonMobil.Name := 'edtTelefonMobil';\r\n edtTelefonMobil.Left := 352;\r\n edtTelefonMobil.Top := 380;\r\n edtTelefonMobil.Width := 220;\r\n edtTelefonMobil.Height := 22;\r\n edtTelefonMobil.ChildOrder := 4;\r\n edtTelefonMobil.ElementClassName := 'form-control';\r\n edtTelefonMobil.ElementFont := efCSS;\r\n edtTelefonMobil.HeightStyle := ssAuto;\r\n edtTelefonMobil.HeightPercent := 100.000000000000000000;\r\n edtTelefonMobil.Text := 'edtTelefon';\r\n edtTelefonMobil.WidthPercent := 100.000000000000000000;\r\n edtTelefonMobil.DataField := 'MobilTelefon';\r\n edtTelefonMobil.DataSource := sourceEinzelkontakt;\r\n edtInternet.SetParentComponent(Self);\r\n edtInternet.Name := 'edtInternet';\r\n edtInternet.Left := 352;\r\n edtInternet.Top := 408;\r\n edtInternet.Width := 220;\r\n edtInternet.Height := 22;\r\n edtInternet.ChildOrder := 4;\r\n edtInternet.ElementClassName := 'form-control';\r\n edtInternet.ElementFont := efCSS;\r\n edtInternet.HeightStyle := ssAuto;\r\n edtInternet.HeightPercent := 100.000000000000000000;\r\n edtInternet.Text := 'edtTelefon';\r\n edtInternet.WidthPercent := 100.000000000000000000;\r\n edtInternet.DataField := 'Internet';\r\n edtInternet.DataSource := sourceEinzelkontakt;\r\n edtEmail.SetParentComponent(Self);\r\n edtEmail.Name := 'edtEmail';\r\n edtEmail.Left := 352;\r\n edtEmail.Top := 436;\r\n edtEmail.Width := 220;\r\n edtEmail.Height := 22;\r\n edtEmail.ChildOrder := 4;\r\n edtEmail.ElementClassName := 'form-control';\r\n edtEmail.ElementFont := efCSS;\r\n edtEmail.HeightStyle := ssAuto;\r\n edtEmail.HeightPercent := 100.000000000000000000;\r\n edtEmail.Text := 'edtTelefon';\r\n edtEmail.WidthPercent := 100.000000000000000000;\r\n edtEmail.DataField := 'EMail';\r\n edtEmail.DataSource := sourceEinzelkontakt;\r\n edtAdressanrede.SetParentComponent(Self);\r\n edtAdressanrede.Name := 'edtAdressanrede';\r\n edtAdressanrede.Left := 352;\r\n edtAdressanrede.Top := 52;\r\n edtAdressanrede.Width := 220;\r\n edtAdressanrede.Height := 22;\r\n edtAdressanrede.ChildOrder := 4;\r\n edtAdressanrede.ElementClassName := 'form-control';\r\n edtAdressanrede.ElementFont := efCSS;\r\n edtAdressanrede.HeightStyle := ssAuto;\r\n edtAdressanrede.HeightPercent := 100.000000000000000000;\r\n edtAdressanrede.Text := 'edtStrasse';\r\n edtAdressanrede.WidthPercent := 100.000000000000000000;\r\n edtAdressanrede.DataField := 'Adressanrede';\r\n edtAdressanrede.DataSource := sourceEinzelkontakt;\r\n edtTitel.SetParentComponent(Self);\r\n edtTitel.Name := 'edtTitel';\r\n edtTitel.Left := 352;\r\n edtTitel.Top := 24;\r\n edtTitel.Width := 220;\r\n edtTitel.Height := 22;\r\n edtTitel.ChildOrder := 4;\r\n edtTitel.ElementClassName := 'form-control';\r\n edtTitel.ElementFont := efCSS;\r\n edtTitel.HeightStyle := ssAuto;\r\n edtTitel.HeightPercent := 100.000000000000000000;\r\n edtTitel.Text := 'edtStrasse';\r\n edtTitel.WidthPercent := 100.000000000000000000;\r\n edtTitel.DataField := 'Titel';\r\n edtTitel.DataSource := sourceEinzelkontakt;\r\n edtNachname.SetParentComponent(Self);\r\n edtNachname.Name := 'edtNachname';\r\n edtNachname.Left := 352;\r\n edtNachname.Top := -4;\r\n edtNachname.Width := 220;\r\n edtNachname.Height := 22;\r\n edtNachname.ChildOrder := 4;\r\n edtNachname.ElementClassName := 'form-control';\r\n edtNachname.ElementFont := efCSS;\r\n edtNachname.HeightStyle := ssAuto;\r\n edtNachname.HeightPercent := 100.000000000000000000;\r\n edtNachname.ReadOnly := True;\r\n edtNachname.Text := 'edtStrasse';\r\n edtNachname.WidthPercent := 100.000000000000000000;\r\n edtNachname.DataField := 'Nachname';\r\n edtNachname.DataSource := sourceEinzelkontakt;\r\n sourceEinzelkontakt.SetParentComponent(Self);\r\n sourceEinzelkontakt.Name := 'sourceEinzelkontakt';\r\n sourceEinzelkontakt.DataSet := xdsEinzelkontakt;\r\n SetEvent(sourceEinzelkontakt, Self, 'OnStateChange', 'sourceEinzelkontaktStateChange');\r\n sourceEinzelkontakt.Left := 52;\r\n sourceEinzelkontakt.Top := 165;\r\n xdsEinzelkontakt.SetParentComponent(Self);\r\n xdsEinzelkontakt.Name := 'xdsEinzelkontakt';\r\n xdsEinzelkontakt.AfterApplyUpdates := xdsEinzelkontaktAfterApplyUpdates;\r\n xdsEinzelkontakt.AfterOpen := xdsEinzelkontaktAfterOpen;\r\n xdsEinzelkontakt.BeforePost := xdsEinzelkontaktBeforePost;\r\n xdsEinzelkontakt.AfterPost := xdsEinzelkontaktAfterPost;\r\n xdsEinzelkontakt.EntitySetName := 'Adressen';\r\n xdsEinzelkontakt.Connection := DM2.XDataWebConnection1;\r\n xdsEinzelkontakt.QueryTop := 1;\r\n xdsEinzelkontakt.Left := 52;\r\n xdsEinzelkontakt.Top := 221;\r\n xdsEinzelkontaktKundennummer.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktKundennummer.Name := 'xdsEinzelkontaktKundennummer';\r\n xdsEinzelkontaktKundennummer.FieldName := 'Kundennummer';\r\n xdsEinzelkontaktKundennummer.Required := True;\r\n xdsEinzelkontaktKundennummer.Size := 13;\r\n xdsEinzelkontaktGruppeKunden.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktGruppeKunden.Name := 'xdsEinzelkontaktGruppeKunden';\r\n xdsEinzelkontaktGruppeKunden.FieldName := 'GruppeKunden';\r\n xdsEinzelkontaktGruppeLieferanten.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktGruppeLieferanten.Name := 'xdsEinzelkontaktGruppeLieferanten';\r\n xdsEinzelkontaktGruppeLieferanten.FieldName := 'GruppeLieferanten';\r\n xdsEinzelkontaktGruppeSonstige.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktGruppeSonstige.Name := 'xdsEinzelkontaktGruppeSonstige';\r\n xdsEinzelkontaktGruppeSonstige.FieldName := 'GruppeSonstige';\r\n xdsEinzelkontaktGruppeNichtkunden.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktGruppeNichtkunden.Name := 'xdsEinzelkontaktGruppeNichtkunden';\r\n xdsEinzelkontaktGruppeNichtkunden.FieldName := 'GruppeNichtkunden';\r\n xdsEinzelkontaktKontaktgruppe.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktKontaktgruppe.Name := 'xdsEinzelkontaktKontaktgruppe';\r\n xdsEinzelkontaktKontaktgruppe.FieldName := 'Kontaktgruppe';\r\n xdsEinzelkontaktKontaktgruppe.Size := 50;\r\n xdsEinzelkontaktNachname.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktNachname.Name := 'xdsEinzelkontaktNachname';\r\n xdsEinzelkontaktNachname.FieldName := 'Nachname';\r\n xdsEinzelkontaktNachname.Size := 40;\r\n xdsEinzelkontaktVorname.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktVorname.Name := 'xdsEinzelkontaktVorname';\r\n xdsEinzelkontaktVorname.FieldName := 'Vorname';\r\n xdsEinzelkontaktVorname.Size := 40;\r\n xdsEinzelkontaktAdresszeile2.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktAdresszeile2.Name := 'xdsEinzelkontaktAdresszeile2';\r\n xdsEinzelkontaktAdresszeile2.FieldName := 'Adresszeile2';\r\n xdsEinzelkontaktAdresszeile2.Size := 40;\r\n xdsEinzelkontaktAdresszeile3.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktAdresszeile3.Name := 'xdsEinzelkontaktAdresszeile3';\r\n xdsEinzelkontaktAdresszeile3.FieldName := 'Adresszeile3';\r\n xdsEinzelkontaktAdresszeile3.Size := 40;\r\n xdsEinzelkontaktStrasse.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktStrasse.Name := 'xdsEinzelkontaktStrasse';\r\n xdsEinzelkontaktStrasse.FieldName := 'Strasse';\r\n xdsEinzelkontaktStrasse.Size := 40;\r\n xdsEinzelkontaktPostleitzahl.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktPostleitzahl.Name := 'xdsEinzelkontaktPostleitzahl';\r\n xdsEinzelkontaktPostleitzahl.FieldName := 'Postleitzahl';\r\n xdsEinzelkontaktPostleitzahl.Size := 6;\r\n xdsEinzelkontaktOrt.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktOrt.Name := 'xdsEinzelkontaktOrt';\r\n xdsEinzelkontaktOrt.FieldName := 'Ort';\r\n xdsEinzelkontaktOrt.Size := 40;\r\n xdsEinzelkontaktLaenderkuerzel.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktLaenderkuerzel.Name := 'xdsEinzelkontaktLaenderkuerzel';\r\n xdsEinzelkontaktLaenderkuerzel.FieldName := 'Laenderkuerzel';\r\n xdsEinzelkontaktLaenderkuerzel.Size := 5;\r\n xdsEinzelkontaktLand.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktLand.Name := 'xdsEinzelkontaktLand';\r\n xdsEinzelkontaktLand.FieldName := 'Land';\r\n xdsEinzelkontaktLand.Size := 40;\r\n xdsEinzelkontaktLaenderkennzeichen.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktLaenderkennzeichen.Name := 'xdsEinzelkontaktLaenderkennzeichen';\r\n xdsEinzelkontaktLaenderkennzeichen.FieldName := 'Laenderkennzeichen';\r\n xdsEinzelkontaktAdressanrede.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktAdressanrede.Name := 'xdsEinzelkontaktAdressanrede';\r\n xdsEinzelkontaktAdressanrede.FieldName := 'Adressanrede';\r\n xdsEinzelkontaktAdressanrede.Size := 15;\r\n xdsEinzelkontaktBriefanrede1.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktBriefanrede1.Name := 'xdsEinzelkontaktBriefanrede1';\r\n xdsEinzelkontaktBriefanrede1.FieldName := 'Briefanrede1';\r\n xdsEinzelkontaktBriefanrede1.Size := 255;\r\n xdsEinzelkontaktBriefanrede2.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktBriefanrede2.Name := 'xdsEinzelkontaktBriefanrede2';\r\n xdsEinzelkontaktBriefanrede2.FieldName := 'Briefanrede2';\r\n xdsEinzelkontaktBriefanrede2.Size := 40;\r\n xdsEinzelkontaktAdresseBild.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktAdresseBild.Name := 'xdsEinzelkontaktAdresseBild';\r\n xdsEinzelkontaktAdresseBild.FieldName := 'AdresseBild';\r\n xdsEinzelkontaktAdresseBild.Size := 255;\r\n xdsEinzelkontaktLieferanschrift.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktLieferanschrift.Name := 'xdsEinzelkontaktLieferanschrift';\r\n xdsEinzelkontaktLieferanschrift.FieldName := 'Lieferanschrift';\r\n xdsEinzelkontaktLieferanschrift.Size := 255;\r\n xdsEinzelkontaktGeburtsdatum.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktGeburtsdatum.Name := 'xdsEinzelkontaktGeburtsdatum';\r\n xdsEinzelkontaktGeburtsdatum.FieldName := 'Geburtsdatum';\r\n xdsEinzelkontaktTelefonNummer.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktTelefonNummer.Name := 'xdsEinzelkontaktTelefonNummer';\r\n xdsEinzelkontaktTelefonNummer.FieldName := 'TelefonNummer';\r\n xdsEinzelkontaktTelefonNummer.Size := 25;\r\n xdsEinzelkontaktTelefaxNummer.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktTelefaxNummer.Name := 'xdsEinzelkontaktTelefaxNummer';\r\n xdsEinzelkontaktTelefaxNummer.FieldName := 'TelefaxNummer';\r\n xdsEinzelkontaktTelefaxNummer.Size := 25;\r\n xdsEinzelkontaktMobilTelefon.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktMobilTelefon.Name := 'xdsEinzelkontaktMobilTelefon';\r\n xdsEinzelkontaktMobilTelefon.FieldName := 'MobilTelefon';\r\n xdsEinzelkontaktMobilTelefon.Size := 25;\r\n xdsEinzelkontaktEMail.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktEMail.Name := 'xdsEinzelkontaktEMail';\r\n xdsEinzelkontaktEMail.FieldName := 'EMail';\r\n xdsEinzelkontaktEMail.Size := 50;\r\n xdsEinzelkontaktInternet.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktInternet.Name := 'xdsEinzelkontaktInternet';\r\n xdsEinzelkontaktInternet.FieldName := 'Internet';\r\n xdsEinzelkontaktInternet.Size := 50;\r\n xdsEinzelkontaktUmsatzsteuerID.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktUmsatzsteuerID.Name := 'xdsEinzelkontaktUmsatzsteuerID';\r\n xdsEinzelkontaktUmsatzsteuerID.FieldName := 'UmsatzsteuerID';\r\n xdsEinzelkontaktUmsatzsteuerausweis.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktUmsatzsteuerausweis.Name := 'xdsEinzelkontaktUmsatzsteuerausweis';\r\n xdsEinzelkontaktUmsatzsteuerausweis.FieldName := 'Umsatzsteuerausweis';\r\n xdsEinzelkontaktBemerkungen.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktBemerkungen.Name := 'xdsEinzelkontaktBemerkungen';\r\n xdsEinzelkontaktBemerkungen.FieldName := 'Bemerkungen';\r\n xdsEinzelkontaktBemerkungen.Size := 255;\r\n xdsEinzelkontaktBranche.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktBranche.Name := 'xdsEinzelkontaktBranche';\r\n xdsEinzelkontaktBranche.FieldName := 'Branche';\r\n xdsEinzelkontaktBranche.Size := 50;\r\n xdsEinzelkontaktSelektiert1.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktSelektiert1.Name := 'xdsEinzelkontaktSelektiert1';\r\n xdsEinzelkontaktSelektiert1.FieldName := 'Selektiert1';\r\n xdsEinzelkontaktSelektiert2.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktSelektiert2.Name := 'xdsEinzelkontaktSelektiert2';\r\n xdsEinzelkontaktSelektiert2.FieldName := 'Selektiert2';\r\n xdsEinzelkontaktSelektiert3.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktSelektiert3.Name := 'xdsEinzelkontaktSelektiert3';\r\n xdsEinzelkontaktSelektiert3.FieldName := 'Selektiert3';\r\n xdsEinzelkontaktZahlungsbedingung.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktZahlungsbedingung.Name := 'xdsEinzelkontaktZahlungsbedingung';\r\n xdsEinzelkontaktZahlungsbedingung.FieldName := 'Zahlungsbedingung';\r\n xdsEinzelkontaktTransportbedingung.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktTransportbedingung.Name := 'xdsEinzelkontaktTransportbedingung';\r\n xdsEinzelkontaktTransportbedingung.FieldName := 'Transportbedingung';\r\n xdsEinzelkontaktTransportbedingung.Size := 100;\r\n xdsEinzelkontaktKilometer.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktKilometer.Name := 'xdsEinzelkontaktKilometer';\r\n xdsEinzelkontaktKilometer.FieldName := 'Kilometer';\r\n xdsEinzelkontaktRabattsatz.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktRabattsatz.Name := 'xdsEinzelkontaktRabattsatz';\r\n xdsEinzelkontaktRabattsatz.FieldName := 'Rabattsatz';\r\n xdsEinzelkontaktStundensatz.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktStundensatz.Name := 'xdsEinzelkontaktStundensatz';\r\n xdsEinzelkontaktStundensatz.FieldName := 'Stundensatz';\r\n xdsEinzelkontaktKontonummer.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktKontonummer.Name := 'xdsEinzelkontaktKontonummer';\r\n xdsEinzelkontaktKontonummer.FieldName := 'Kontonummer';\r\n xdsEinzelkontaktKontonummer.Size := 50;\r\n xdsEinzelkontaktBank.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktBank.Name := 'xdsEinzelkontaktBank';\r\n xdsEinzelkontaktBank.FieldName := 'Bank';\r\n xdsEinzelkontaktBank.Size := 50;\r\n xdsEinzelkontaktBankleitzahl.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktBankleitzahl.Name := 'xdsEinzelkontaktBankleitzahl';\r\n xdsEinzelkontaktBankleitzahl.FieldName := 'Bankleitzahl';\r\n xdsEinzelkontaktKontoinhaber.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktKontoinhaber.Name := 'xdsEinzelkontaktKontoinhaber';\r\n xdsEinzelkontaktKontoinhaber.FieldName := 'Kontoinhaber';\r\n xdsEinzelkontaktKontoinhaber.Size := 50;\r\n xdsEinzelkontaktBetreuer.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktBetreuer.Name := 'xdsEinzelkontaktBetreuer';\r\n xdsEinzelkontaktBetreuer.FieldName := 'Betreuer';\r\n xdsEinzelkontaktBetreuer.Size := 50;\r\n xdsEinzelkontaktQuelle.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktQuelle.Name := 'xdsEinzelkontaktQuelle';\r\n xdsEinzelkontaktQuelle.FieldName := 'Quelle';\r\n xdsEinzelkontaktQuelle.Size := 100;\r\n xdsEinzelkontaktSuchmerkmal.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktSuchmerkmal.Name := 'xdsEinzelkontaktSuchmerkmal';\r\n xdsEinzelkontaktSuchmerkmal.FieldName := 'Suchmerkmal';\r\n xdsEinzelkontaktSuchmerkmal.Size := 250;\r\n xdsEinzelkontaktWarenkreditlimit.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktWarenkreditlimit.Name := 'xdsEinzelkontaktWarenkreditlimit';\r\n xdsEinzelkontaktWarenkreditlimit.FieldName := 'Warenkreditlimit';\r\n xdsEinzelkontaktWarenkreditgesperrt.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktWarenkreditgesperrt.Name := 'xdsEinzelkontaktWarenkreditgesperrt';\r\n xdsEinzelkontaktWarenkreditgesperrt.FieldName := 'Warenkreditgesperrt';\r\n xdsEinzelkontaktKundennummerFremd.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktKundennummerFremd.Name := 'xdsEinzelkontaktKundennummerFremd';\r\n xdsEinzelkontaktKundennummerFremd.FieldName := 'KundennummerFremd';\r\n xdsEinzelkontaktKeinNewsletter.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktKeinNewsletter.Name := 'xdsEinzelkontaktKeinNewsletter';\r\n xdsEinzelkontaktKeinNewsletter.FieldName := 'KeinNewsletter';\r\n xdsEinzelkontaktDebitorennummer.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktDebitorennummer.Name := 'xdsEinzelkontaktDebitorennummer';\r\n xdsEinzelkontaktDebitorennummer.FieldName := 'Debitorennummer';\r\n xdsEinzelkontaktDebitorennummer.Size := 13;\r\n xdsEinzelkontaktKreditorennummer.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktKreditorennummer.Name := 'xdsEinzelkontaktKreditorennummer';\r\n xdsEinzelkontaktKreditorennummer.FieldName := 'Kreditorennummer';\r\n xdsEinzelkontaktKreditorennummer.Size := 13;\r\n xdsEinzelkontaktTelefonAlternativ.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktTelefonAlternativ.Name := 'xdsEinzelkontaktTelefonAlternativ';\r\n xdsEinzelkontaktTelefonAlternativ.FieldName := 'TelefonAlternativ';\r\n xdsEinzelkontaktTelefonAlternativ.Size := 50;\r\n xdsEinzelkontaktKostentraeger.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktKostentraeger.Name := 'xdsEinzelkontaktKostentraeger';\r\n xdsEinzelkontaktKostentraeger.FieldName := 'Kostentraeger';\r\n xdsEinzelkontaktKostentraeger.Size := 13;\r\n xdsEinzelkontaktIBAN.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktIBAN.Name := 'xdsEinzelkontaktIBAN';\r\n xdsEinzelkontaktIBAN.FieldName := 'IBAN';\r\n xdsEinzelkontaktIBAN.Size := 50;\r\n xdsEinzelkontaktBIC.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktBIC.Name := 'xdsEinzelkontaktBIC';\r\n xdsEinzelkontaktBIC.FieldName := 'BIC';\r\n xdsEinzelkontaktEmailkonto.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktEmailkonto.Name := 'xdsEinzelkontaktEmailkonto';\r\n xdsEinzelkontaktEmailkonto.FieldName := 'Emailkonto';\r\n xdsEinzelkontaktEmailkonto.Size := 50;\r\n xdsEinzelkontaktBenutzername.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktBenutzername.Name := 'xdsEinzelkontaktBenutzername';\r\n xdsEinzelkontaktBenutzername.FieldName := 'Benutzername';\r\n xdsEinzelkontaktBenutzername.Size := 50;\r\n xdsEinzelkontaktPasswort.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktPasswort.Name := 'xdsEinzelkontaktPasswort';\r\n xdsEinzelkontaktPasswort.FieldName := 'Passwort';\r\n xdsEinzelkontaktPasswort.Size := 25;\r\n xdsEinzelkontaktExportOutlook.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktExportOutlook.Name := 'xdsEinzelkontaktExportOutlook';\r\n xdsEinzelkontaktExportOutlook.FieldName := 'ExportOutlook';\r\n xdsEinzelkontaktNichtInListeAnzeigen.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktNichtInListeAnzeigen.Name := 'xdsEinzelkontaktNichtInListeAnzeigen';\r\n xdsEinzelkontaktNichtInListeAnzeigen.FieldName := 'NichtInListeAnzeigen';\r\n xdsEinzelkontaktKreditkarteArt.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktKreditkarteArt.Name := 'xdsEinzelkontaktKreditkarteArt';\r\n xdsEinzelkontaktKreditkarteArt.FieldName := 'KreditkarteArt';\r\n xdsEinzelkontaktKreditkarteArt.Size := 30;\r\n xdsEinzelkontaktKreditkarteInhaber.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktKreditkarteInhaber.Name := 'xdsEinzelkontaktKreditkarteInhaber';\r\n xdsEinzelkontaktKreditkarteInhaber.FieldName := 'KreditkarteInhaber';\r\n xdsEinzelkontaktKreditkarteInhaber.Size := 50;\r\n xdsEinzelkontaktKreditkarteNummer.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktKreditkarteNummer.Name := 'xdsEinzelkontaktKreditkarteNummer';\r\n xdsEinzelkontaktKreditkarteNummer.FieldName := 'KreditkarteNummer';\r\n xdsEinzelkontaktKreditkarteGueltigMonat.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktKreditkarteGueltigMonat.Name := 'xdsEinzelkontaktKreditkarteGueltigMonat';\r\n xdsEinzelkontaktKreditkarteGueltigMonat.FieldName := 'KreditkarteGueltigMonat';\r\n xdsEinzelkontaktKreditkarteGueltigMonat.Size := 2;\r\n xdsEinzelkontaktKreditkarteGueltigJahr.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktKreditkarteGueltigJahr.Name := 'xdsEinzelkontaktKreditkarteGueltigJahr';\r\n xdsEinzelkontaktKreditkarteGueltigJahr.FieldName := 'KreditkarteGueltigJahr';\r\n xdsEinzelkontaktKreditkartePruefziffer.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktKreditkartePruefziffer.Name := 'xdsEinzelkontaktKreditkartePruefziffer';\r\n xdsEinzelkontaktKreditkartePruefziffer.FieldName := 'KreditkartePruefziffer';\r\n xdsEinzelkontaktKreditkartePruefziffer.Size := 10;\r\n xdsEinzelkontaktDatumNeu.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktDatumNeu.Name := 'xdsEinzelkontaktDatumNeu';\r\n xdsEinzelkontaktDatumNeu.FieldName := 'DatumNeu';\r\n xdsEinzelkontaktDatumgeaendert.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktDatumgeaendert.Name := 'xdsEinzelkontaktDatumgeaendert';\r\n xdsEinzelkontaktDatumgeaendert.FieldName := 'Datumgeaendert';\r\n xdsEinzelkontaktTitel.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktTitel.Name := 'xdsEinzelkontaktTitel';\r\n xdsEinzelkontaktTitel.FieldName := 'Titel';\r\n xdsEinzelkontaktStundensatzMontage.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktStundensatzMontage.Name := 'xdsEinzelkontaktStundensatzMontage';\r\n xdsEinzelkontaktStundensatzMontage.FieldName := 'StundensatzMontage';\r\n xdsEinzelkontaktStdMontageU25.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktStdMontageU25.Name := 'xdsEinzelkontaktStdMontageU25';\r\n xdsEinzelkontaktStdMontageU25.FieldName := 'StdMontageU25';\r\n xdsEinzelkontaktStdMontageU50.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktStdMontageU50.Name := 'xdsEinzelkontaktStdMontageU50';\r\n xdsEinzelkontaktStdMontageU50.FieldName := 'StdMontageU50';\r\n xdsEinzelkontaktStdMontageU70.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktStdMontageU70.Name := 'xdsEinzelkontaktStdMontageU70';\r\n xdsEinzelkontaktStdMontageU70.FieldName := 'StdMontageU70';\r\n xdsEinzelkontaktStdMontageU100.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktStdMontageU100.Name := 'xdsEinzelkontaktStdMontageU100';\r\n xdsEinzelkontaktStdMontageU100.FieldName := 'StdMontageU100';\r\n xdsEinzelkontaktStdMontageU150.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktStdMontageU150.Name := 'xdsEinzelkontaktStdMontageU150';\r\n xdsEinzelkontaktStdMontageU150.FieldName := 'StdMontageU150';\r\n xdsEinzelkontaktStundensatzWerkstatt.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktStundensatzWerkstatt.Name := 'xdsEinzelkontaktStundensatzWerkstatt';\r\n xdsEinzelkontaktStundensatzWerkstatt.FieldName := 'StundensatzWerkstatt';\r\n xdsEinzelkontaktStdWerkstattU25.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktStdWerkstattU25.Name := 'xdsEinzelkontaktStdWerkstattU25';\r\n xdsEinzelkontaktStdWerkstattU25.FieldName := 'StdWerkstattU25';\r\n xdsEinzelkontaktStdWerkstattU50.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktStdWerkstattU50.Name := 'xdsEinzelkontaktStdWerkstattU50';\r\n xdsEinzelkontaktStdWerkstattU50.FieldName := 'StdWerkstattU50';\r\n xdsEinzelkontaktStdWerkstattU70.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktStdWerkstattU70.Name := 'xdsEinzelkontaktStdWerkstattU70';\r\n xdsEinzelkontaktStdWerkstattU70.FieldName := 'StdWerkstattU70';\r\n xdsEinzelkontaktStdWerkstattU100.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktStdWerkstattU100.Name := 'xdsEinzelkontaktStdWerkstattU100';\r\n xdsEinzelkontaktStdWerkstattU100.FieldName := 'StdWerkstattU100';\r\n xdsEinzelkontaktStdWerkstattU150.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktStdWerkstattU150.Name := 'xdsEinzelkontaktStdWerkstattU150';\r\n xdsEinzelkontaktStdWerkstattU150.FieldName := 'StdWerkstattU150';\r\n xdsEinzelkontaktArchivReferenz.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktArchivReferenz.Name := 'xdsEinzelkontaktArchivReferenz';\r\n xdsEinzelkontaktArchivReferenz.FieldName := 'ArchivReferenz';\r\n xdsEinzelkontaktArchivReferenz.Size := 55;\r\n xdsEinzelkontaktErloesKontoUST1.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktErloesKontoUST1.Name := 'xdsEinzelkontaktErloesKontoUST1';\r\n xdsEinzelkontaktErloesKontoUST1.FieldName := 'ErloesKontoUST1';\r\n xdsEinzelkontaktErloesKontoUST1.Size := 10;\r\n xdsEinzelkontaktErloesKontoUST2.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktErloesKontoUST2.Name := 'xdsEinzelkontaktErloesKontoUST2';\r\n xdsEinzelkontaktErloesKontoUST2.FieldName := 'ErloesKontoUST2';\r\n xdsEinzelkontaktErloesKontoUST2.Size := 10;\r\n xdsEinzelkontaktErloesKontoUST3.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktErloesKontoUST3.Name := 'xdsEinzelkontaktErloesKontoUST3';\r\n xdsEinzelkontaktErloesKontoUST3.FieldName := 'ErloesKontoUST3';\r\n xdsEinzelkontaktErloesKontoUST3.Size := 10;\r\n xdsEinzelkontaktGebKal.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktGebKal.Name := 'xdsEinzelkontaktGebKal';\r\n xdsEinzelkontaktGebKal.FieldName := 'GebKal';\r\n xdsEinzelkontaktEmailversand.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktEmailversand.Name := 'xdsEinzelkontaktEmailversand';\r\n xdsEinzelkontaktEmailversand.FieldName := 'Emailversand';\r\n xdsEinzelkontaktMahnspesen.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktMahnspesen.Name := 'xdsEinzelkontaktMahnspesen';\r\n xdsEinzelkontaktMahnspesen.FieldName := 'Mahnspesen';\r\n xdsEinzelkontaktRechnungSchluss.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktRechnungSchluss.Name := 'xdsEinzelkontaktRechnungSchluss';\r\n xdsEinzelkontaktRechnungSchluss.FieldName := 'RechnungSchluss';\r\n xdsEinzelkontaktRechnungSchluss.Size := 255;\r\n xdsEinzelkontaktBenutzerNeu.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktBenutzerNeu.Name := 'xdsEinzelkontaktBenutzerNeu';\r\n xdsEinzelkontaktBenutzerNeu.FieldName := 'BenutzerNeu';\r\n xdsEinzelkontaktBenutzerNeu.Size := 50;\r\n xdsEinzelkontaktBenutzerGeaendert.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktBenutzerGeaendert.Name := 'xdsEinzelkontaktBenutzerGeaendert';\r\n xdsEinzelkontaktBenutzerGeaendert.FieldName := 'BenutzerGeaendert';\r\n xdsEinzelkontaktBenutzerGeaendert.Size := 50;\r\n xdsEinzelkontaktBelegsprache.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktBelegsprache.Name := 'xdsEinzelkontaktBelegsprache';\r\n xdsEinzelkontaktBelegsprache.FieldName := 'Belegsprache';\r\n xdsEinzelkontaktBelegsprache.Size := 10;\r\n xdsEinzelkontaktkmSatz.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktkmSatz.Name := 'xdsEinzelkontaktkmSatz';\r\n xdsEinzelkontaktkmSatz.FieldName := 'kmSatz';\r\n xdsEinzelkontaktKundenklassetext.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktKundenklassetext.Name := 'xdsEinzelkontaktKundenklassetext';\r\n xdsEinzelkontaktKundenklassetext.FieldName := 'Kundenklassetext';\r\n xdsEinzelkontaktKundenklassetext.Size := 50;\r\n xdsEinzelkontaktKundenklasseFarbe.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktKundenklasseFarbe.Name := 'xdsEinzelkontaktKundenklasseFarbe';\r\n xdsEinzelkontaktKundenklasseFarbe.FieldName := 'KundenklasseFarbe';\r\n xdsEinzelkontaktAbweichenderRechnungsEmpfaenger.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktAbweichenderRechnungsEmpfaenger.Name := 'xdsEinzelkontaktAbweichenderRechnungsEmpfaenger';\r\n xdsEinzelkontaktAbweichenderRechnungsEmpfaenger.FieldName := 'AbweichenderRechnungsEmpfaenger';\r\n xdsEinzelkontaktAbweichenderRechnungsEmpfaenger.Size := 13;\r\n xdsEinzelkontaktProtokoll.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktProtokoll.Name := 'xdsEinzelkontaktProtokoll';\r\n xdsEinzelkontaktProtokoll.FieldName := 'Protokoll';\r\n xdsEinzelkontaktProtokoll.Size := 255;\r\n xdsEinzelkontaktILNTyp1.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktILNTyp1.Name := 'xdsEinzelkontaktILNTyp1';\r\n xdsEinzelkontaktILNTyp1.FieldName := 'ILNTyp1';\r\n xdsEinzelkontaktILNTyp1.Size := 13;\r\n xdsEinzelkontaktILNTyp2.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktILNTyp2.Name := 'xdsEinzelkontaktILNTyp2';\r\n xdsEinzelkontaktILNTyp2.FieldName := 'ILNTyp2';\r\n xdsEinzelkontaktILNTyp2.Size := 13;\r\n xdsEinzelkontaktKontaktGUID.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktKontaktGUID.Name := 'xdsEinzelkontaktKontaktGUID';\r\n xdsEinzelkontaktKontaktGUID.FieldName := 'KontaktGUID';\r\n xdsEinzelkontaktKontaktGUID.Size := 38;\r\n xdsEinzelkontaktPLZGUID.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktPLZGUID.Name := 'xdsEinzelkontaktPLZGUID';\r\n xdsEinzelkontaktPLZGUID.FieldName := 'PLZGUID';\r\n xdsEinzelkontaktPLZGUID.Size := 38;\r\n xdsEinzelkontaktPreislistenVariantePakete.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktPreislistenVariantePakete.Name := 'xdsEinzelkontaktPreislistenVariantePakete';\r\n xdsEinzelkontaktPreislistenVariantePakete.FieldName := 'PreislistenVariantePakete';\r\n xdsEinzelkontaktPreislistenVariantePakete.Size := 50;\r\n xdsEinzelkontaktSchluesselRechnungslauf.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktSchluesselRechnungslauf.Name := 'xdsEinzelkontaktSchluesselRechnungslauf';\r\n xdsEinzelkontaktSchluesselRechnungslauf.FieldName := 'SchluesselRechnungslauf';\r\n xdsEinzelkontaktSchluesselRechnungslauf.Size := 50;\r\n xdsEinzelkontaktRechnungEmail.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktRechnungEmail.Name := 'xdsEinzelkontaktRechnungEmail';\r\n xdsEinzelkontaktRechnungEmail.FieldName := 'RechnungEmail';\r\n xdsEinzelkontaktRechnungEmail.Size := 50;\r\n xdsEinzelkontaktZahlungsbedingungEK.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktZahlungsbedingungEK.Name := 'xdsEinzelkontaktZahlungsbedingungEK';\r\n xdsEinzelkontaktZahlungsbedingungEK.FieldName := 'ZahlungsbedingungEK';\r\n xdsEinzelkontaktTransportbedingungEK.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktTransportbedingungEK.Name := 'xdsEinzelkontaktTransportbedingungEK';\r\n xdsEinzelkontaktTransportbedingungEK.FieldName := 'TransportbedingungEK';\r\n xdsEinzelkontaktTransportbedingungEK.Size := 100;\r\n xdsEinzelkontaktRabattsatzEK.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktRabattsatzEK.Name := 'xdsEinzelkontaktRabattsatzEK';\r\n xdsEinzelkontaktRabattsatzEK.FieldName := 'RabattsatzEK';\r\n xdsEinzelkontaktVertreterMatchcode.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktVertreterMatchcode.Name := 'xdsEinzelkontaktVertreterMatchcode';\r\n xdsEinzelkontaktVertreterMatchcode.FieldName := 'VertreterMatchcode';\r\n xdsEinzelkontaktVertreterMatchcode.Size := 50;\r\n xdsEinzelkontaktVertreterProvisionssatz.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktVertreterProvisionssatz.Name := 'xdsEinzelkontaktVertreterProvisionssatz';\r\n xdsEinzelkontaktVertreterProvisionssatz.FieldName := 'VertreterProvisionssatz';\r\n xdsEinzelkontaktUmsatzVKJahr.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktUmsatzVKJahr.Name := 'xdsEinzelkontaktUmsatzVKJahr';\r\n xdsEinzelkontaktUmsatzVKJahr.FieldName := 'UmsatzVKJahr';\r\n xdsEinzelkontaktUmsatzVKVorjahr.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktUmsatzVKVorjahr.Name := 'xdsEinzelkontaktUmsatzVKVorjahr';\r\n xdsEinzelkontaktUmsatzVKVorjahr.FieldName := 'UmsatzVKVorjahr';\r\n xdsEinzelkontaktUmsatzEKJahr.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktUmsatzEKJahr.Name := 'xdsEinzelkontaktUmsatzEKJahr';\r\n xdsEinzelkontaktUmsatzEKJahr.FieldName := 'UmsatzEKJahr';\r\n xdsEinzelkontaktUmsatzEKVorjahr.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktUmsatzEKVorjahr.Name := 'xdsEinzelkontaktUmsatzEKVorjahr';\r\n xdsEinzelkontaktUmsatzEKVorjahr.FieldName := 'UmsatzEKVorjahr';\r\n xdsEinzelkontaktSteuernummer.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktSteuernummer.Name := 'xdsEinzelkontaktSteuernummer';\r\n xdsEinzelkontaktSteuernummer.FieldName := 'Steuernummer';\r\n xdsEinzelkontaktSteuernummer.Size := 25;\r\n xdsEinzelkontaktLoginPW.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktLoginPW.Name := 'xdsEinzelkontaktLoginPW';\r\n xdsEinzelkontaktLoginPW.FieldName := 'LoginPW';\r\n xdsEinzelkontaktREperFax.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktREperFax.Name := 'xdsEinzelkontaktREperFax';\r\n xdsEinzelkontaktREperFax.FieldName := 'REperFax';\r\n xdsEinzelkontaktErreichbarkeit.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktErreichbarkeit.Name := 'xdsEinzelkontaktErreichbarkeit';\r\n xdsEinzelkontaktErreichbarkeit.FieldName := 'Erreichbarkeit';\r\n xdsEinzelkontaktErreichbarkeit.Size := 250;\r\n xdsEinzelkontaktErloesKontoUST4.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktErloesKontoUST4.Name := 'xdsEinzelkontaktErloesKontoUST4';\r\n xdsEinzelkontaktErloesKontoUST4.FieldName := 'ErloesKontoUST4';\r\n xdsEinzelkontaktErloesKontoUST4.Size := 10;\r\n xdsEinzelkontaktErloesKontoUST5.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktErloesKontoUST5.Name := 'xdsEinzelkontaktErloesKontoUST5';\r\n xdsEinzelkontaktErloesKontoUST5.FieldName := 'ErloesKontoUST5';\r\n xdsEinzelkontaktErloesKontoUST5.Size := 10;\r\n xdsEinzelkontaktErloesKontoUST6.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktErloesKontoUST6.Name := 'xdsEinzelkontaktErloesKontoUST6';\r\n xdsEinzelkontaktErloesKontoUST6.FieldName := 'ErloesKontoUST6';\r\n xdsEinzelkontaktErloesKontoUST6.Size := 10;\r\n xdsEinzelkontaktBesteuerungKey.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktBesteuerungKey.Name := 'xdsEinzelkontaktBesteuerungKey';\r\n xdsEinzelkontaktBesteuerungKey.FieldName := 'BesteuerungKey';\r\n xdsEinzelkontaktAuftraegeJahr.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktAuftraegeJahr.Name := 'xdsEinzelkontaktAuftraegeJahr';\r\n xdsEinzelkontaktAuftraegeJahr.FieldName := 'AuftraegeJahr';\r\n xdsEinzelkontaktAuftraegeVorjahr.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktAuftraegeVorjahr.Name := 'xdsEinzelkontaktAuftraegeVorjahr';\r\n xdsEinzelkontaktAuftraegeVorjahr.FieldName := 'AuftraegeVorjahr';\r\n xdsEinzelkontaktLieferadresseID.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktLieferadresseID.Name := 'xdsEinzelkontaktLieferadresseID';\r\n xdsEinzelkontaktLieferadresseID.FieldName := 'LieferadresseID';\r\n xdsEinzelkontaktUSTIDgeprueft.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktUSTIDgeprueft.Name := 'xdsEinzelkontaktUSTIDgeprueft';\r\n xdsEinzelkontaktUSTIDgeprueft.FieldName := 'USTIDgeprueft';\r\n xdsEinzelkontaktKontaktverbund.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktKontaktverbund.Name := 'xdsEinzelkontaktKontaktverbund';\r\n xdsEinzelkontaktKontaktverbund.FieldName := 'Kontaktverbund';\r\n xdsEinzelkontaktKontaktverbund.Size := 25;\r\n xdsEinzelkontaktHinweis.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktHinweis.Name := 'xdsEinzelkontaktHinweis';\r\n xdsEinzelkontaktHinweis.FieldName := 'Hinweis';\r\n xdsEinzelkontaktHinweis.Size := 255;\r\n xdsEinzelkontaktLatitude.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktLatitude.Name := 'xdsEinzelkontaktLatitude';\r\n xdsEinzelkontaktLatitude.FieldName := 'Latitude';\r\n xdsEinzelkontaktLongitude.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktLongitude.Name := 'xdsEinzelkontaktLongitude';\r\n xdsEinzelkontaktLongitude.FieldName := 'Longitude';\r\n xdsEinzelkontaktkmLuftlinie.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktkmLuftlinie.Name := 'xdsEinzelkontaktkmLuftlinie';\r\n xdsEinzelkontaktkmLuftlinie.FieldName := 'kmLuftlinie';\r\n xdsEinzelkontaktGoogleID.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktGoogleID.Name := 'xdsEinzelkontaktGoogleID';\r\n xdsEinzelkontaktGoogleID.FieldName := 'GoogleID';\r\n xdsEinzelkontaktGoogleID.Size := 50;\r\n xdsEinzelkontaktGoogleUpdatedUTC.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktGoogleUpdatedUTC.Name := 'xdsEinzelkontaktGoogleUpdatedUTC';\r\n xdsEinzelkontaktGoogleUpdatedUTC.FieldName := 'GoogleUpdatedUTC';\r\n xdsEinzelkontaktBundesland.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktBundesland.Name := 'xdsEinzelkontaktBundesland';\r\n xdsEinzelkontaktBundesland.FieldName := 'Bundesland';\r\n xdsEinzelkontaktBundesland.Size := 50;\r\n xdsEinzelkontaktRegion.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktRegion.Name := 'xdsEinzelkontaktRegion';\r\n xdsEinzelkontaktRegion.FieldName := 'Region';\r\n xdsEinzelkontaktRegion.Size := 50;\r\n xdsEinzelkontaktMandatsreferenz.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktMandatsreferenz.Name := 'xdsEinzelkontaktMandatsreferenz';\r\n xdsEinzelkontaktMandatsreferenz.FieldName := 'Mandatsreferenz';\r\n xdsEinzelkontaktMandatsreferenz.Size := 34;\r\n xdsEinzelkontaktMandatsreferenzVom.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktMandatsreferenzVom.Name := 'xdsEinzelkontaktMandatsreferenzVom';\r\n xdsEinzelkontaktMandatsreferenzVom.FieldName := 'MandatsreferenzVom';\r\n xdsEinzelkontaktLastschriftArt.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktLastschriftArt.Name := 'xdsEinzelkontaktLastschriftArt';\r\n xdsEinzelkontaktLastschriftArt.FieldName := 'LastschriftArt';\r\n xdsEinzelkontaktLastschriftArt.Size := 2;\r\n xdsEinzelkontaktMahnsperre.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktMahnsperre.Name := 'xdsEinzelkontaktMahnsperre';\r\n xdsEinzelkontaktMahnsperre.FieldName := 'Mahnsperre';\r\n xdsEinzelkontaktSuchbegriff.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktSuchbegriff.Name := 'xdsEinzelkontaktSuchbegriff';\r\n xdsEinzelkontaktSuchbegriff.FieldName := 'Suchbegriff';\r\n xdsEinzelkontaktSuchbegriff.Size := 25;\r\n xdsEinzelkontaktLieferanschriftDaten.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktLieferanschriftDaten.Name := 'xdsEinzelkontaktLieferanschriftDaten';\r\n xdsEinzelkontaktLieferanschriftDaten.FieldName := 'LieferanschriftDaten';\r\n xdsEinzelkontaktLieferanschriftDaten.Size := 255;\r\n xdsEinzelkontaktExportKasse.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktExportKasse.Name := 'xdsEinzelkontaktExportKasse';\r\n xdsEinzelkontaktExportKasse.FieldName := 'ExportKasse';\r\n xdsEinzelkontaktLoeschvormerkungDatum.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktLoeschvormerkungDatum.Name := 'xdsEinzelkontaktLoeschvormerkungDatum';\r\n xdsEinzelkontaktLoeschvormerkungDatum.FieldName := 'LoeschvormerkungDatum';\r\n xdsEinzelkontaktLoeschvormerkungGrund.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktLoeschvormerkungGrund.Name := 'xdsEinzelkontaktLoeschvormerkungGrund';\r\n xdsEinzelkontaktLoeschvormerkungGrund.FieldName := 'LoeschvormerkungGrund';\r\n xdsEinzelkontaktLoeschvormerkungGrund.Size := 250;\r\n xdsEinzelkontaktPseudonymisiert.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktPseudonymisiert.Name := 'xdsEinzelkontaktPseudonymisiert';\r\n xdsEinzelkontaktPseudonymisiert.FieldName := 'Pseudonymisiert';\r\n xdsEinzelkontaktPseudonymisiert.Size := 255;\r\n xdsEinzelkontaktLoginAktiv.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktLoginAktiv.Name := 'xdsEinzelkontaktLoginAktiv';\r\n xdsEinzelkontaktLoginAktiv.FieldName := 'LoginAktiv';\r\n xdsEinzelkontaktSonstigeDaten.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktSonstigeDaten.Name := 'xdsEinzelkontaktSonstigeDaten';\r\n xdsEinzelkontaktSonstigeDaten.FieldName := 'SonstigeDaten';\r\n xdsEinzelkontaktSonstigeDaten.Size := 255;\r\n xdsEinzelkontaktB2C.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktB2C.Name := 'xdsEinzelkontaktB2C';\r\n xdsEinzelkontaktB2C.FieldName := 'B2C';\r\n xdsEinzelkontaktTIN.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktTIN.Name := 'xdsEinzelkontaktTIN';\r\n xdsEinzelkontaktTIN.FieldName := 'TIN';\r\n xdsEinzelkontaktTIN.Size := 25;\r\n xdsEinzelkontaktMindestbestellwert.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktMindestbestellwert.Name := 'xdsEinzelkontaktMindestbestellwert';\r\n xdsEinzelkontaktMindestbestellwert.FieldName := 'Mindestbestellwert';\r\n xdsLaender.SetParentComponent(Self);\r\n xdsLaender.Name := 'xdsLaender';\r\n xdsLaender.AfterOpen := xdsLaenderAfterOpen;\r\n xdsLaender.EntitySetName := 'Laender';\r\n xdsLaender.Connection := DM2.XDataWebConnection1;\r\n xdsLaender.QueryString := '$OrderBy=Land';\r\n xdsLaender.Left := 260;\r\n xdsLaender.Top := 349;\r\n xdsLaenderLaenderkuerzel.SetParentComponent(xdsLaender);\r\n xdsLaenderLaenderkuerzel.Name := 'xdsLaenderLaenderkuerzel';\r\n xdsLaenderLaenderkuerzel.FieldName := 'Laenderkuerzel';\r\n xdsLaenderLaenderkuerzel.Required := True;\r\n xdsLaenderLaenderkuerzel.Size := 5;\r\n xdsLaenderLand.SetParentComponent(xdsLaender);\r\n xdsLaenderLand.Name := 'xdsLaenderLand';\r\n xdsLaenderLand.FieldName := 'Land';\r\n sourceLaender.SetParentComponent(Self);\r\n sourceLaender.Name := 'sourceLaender';\r\n sourceLaender.DataSet := xdsLaender;\r\n sourceLaender.Left := 260;\r\n sourceLaender.Top := 293;\r\n xdsBestKey.SetParentComponent(Self);\r\n xdsBestKey.Name := 'xdsBestKey';\r\n xdsBestKey.AfterOpen := xdsBestKeyAfterOpen;\r\n xdsBestKey.EntitySetName := 'MWStBesteuerung';\r\n xdsBestKey.Connection := DM2.XDataWebConnection1;\r\n xdsBestKey.Left := 260;\r\n xdsBestKey.Top := 77;\r\n xdsBestKeyBesteuerungKey.SetParentComponent(xdsBestKey);\r\n xdsBestKeyBesteuerungKey.Name := 'xdsBestKeyBesteuerungKey';\r\n xdsBestKeyBesteuerungKey.FieldName := 'BesteuerungKey';\r\n xdsBestKeyBesteuerungKey.Required := True;\r\n xdsBestKeyBesteuerungKurzText.SetParentComponent(xdsBestKey);\r\n xdsBestKeyBesteuerungKurzText.Name := 'xdsBestKeyBesteuerungKurzText';\r\n xdsBestKeyBesteuerungKurzText.FieldName := 'BesteuerungKurzText';\r\n xdsBestKeyBesteuerungKurzText.Size := 50;\r\n xdsBestKeyBesteuerungLangText.SetParentComponent(xdsBestKey);\r\n xdsBestKeyBesteuerungLangText.Name := 'xdsBestKeyBesteuerungLangText';\r\n xdsBestKeyBesteuerungLangText.FieldName := 'BesteuerungLangText';\r\n xdsBestKeyBesteuerungLangText.Size := 255;\r\n xdsBestKeyUmsatzsteuerausweis.SetParentComponent(xdsBestKey);\r\n xdsBestKeyUmsatzsteuerausweis.Name := 'xdsBestKeyUmsatzsteuerausweis';\r\n xdsBestKeyUmsatzsteuerausweis.FieldName := 'Umsatzsteuerausweis';\r\n xdsBestKeyKtoVorsteuerSatz1.SetParentComponent(xdsBestKey);\r\n xdsBestKeyKtoVorsteuerSatz1.Name := 'xdsBestKeyKtoVorsteuerSatz1';\r\n xdsBestKeyKtoVorsteuerSatz1.FieldName := 'KtoVorsteuerSatz1';\r\n xdsBestKeyKtoVorsteuerSatz2.SetParentComponent(xdsBestKey);\r\n xdsBestKeyKtoVorsteuerSatz2.Name := 'xdsBestKeyKtoVorsteuerSatz2';\r\n xdsBestKeyKtoVorsteuerSatz2.FieldName := 'KtoVorsteuerSatz2';\r\n xdsBestKeyKtoVorsteuerSatz3.SetParentComponent(xdsBestKey);\r\n xdsBestKeyKtoVorsteuerSatz3.Name := 'xdsBestKeyKtoVorsteuerSatz3';\r\n xdsBestKeyKtoVorsteuerSatz3.FieldName := 'KtoVorsteuerSatz3';\r\n xdsBestKeyKtoVorsteuerSatz4.SetParentComponent(xdsBestKey);\r\n xdsBestKeyKtoVorsteuerSatz4.Name := 'xdsBestKeyKtoVorsteuerSatz4';\r\n xdsBestKeyKtoVorsteuerSatz4.FieldName := 'KtoVorsteuerSatz4';\r\n xdsBestKeyKtoVorsteuerSatz5.SetParentComponent(xdsBestKey);\r\n xdsBestKeyKtoVorsteuerSatz5.Name := 'xdsBestKeyKtoVorsteuerSatz5';\r\n xdsBestKeyKtoVorsteuerSatz5.FieldName := 'KtoVorsteuerSatz5';\r\n xdsBestKeyKtoVorsteuerSatz6.SetParentComponent(xdsBestKey);\r\n xdsBestKeyKtoVorsteuerSatz6.Name := 'xdsBestKeyKtoVorsteuerSatz6';\r\n xdsBestKeyKtoVorsteuerSatz6.FieldName := 'KtoVorsteuerSatz6';\r\n xdsBestKeyKtoErloeseSatz1.SetParentComponent(xdsBestKey);\r\n xdsBestKeyKtoErloeseSatz1.Name := 'xdsBestKeyKtoErloeseSatz1';\r\n xdsBestKeyKtoErloeseSatz1.FieldName := 'KtoErloeseSatz1';\r\n xdsBestKeyKtoErloeseSatz2.SetParentComponent(xdsBestKey);\r\n xdsBestKeyKtoErloeseSatz2.Name := 'xdsBestKeyKtoErloeseSatz2';\r\n xdsBestKeyKtoErloeseSatz2.FieldName := 'KtoErloeseSatz2';\r\n xdsBestKeyKtoErloeseSatz3.SetParentComponent(xdsBestKey);\r\n xdsBestKeyKtoErloeseSatz3.Name := 'xdsBestKeyKtoErloeseSatz3';\r\n xdsBestKeyKtoErloeseSatz3.FieldName := 'KtoErloeseSatz3';\r\n xdsBestKeyKtoErloeseSatz4.SetParentComponent(xdsBestKey);\r\n xdsBestKeyKtoErloeseSatz4.Name := 'xdsBestKeyKtoErloeseSatz4';\r\n xdsBestKeyKtoErloeseSatz4.FieldName := 'KtoErloeseSatz4';\r\n xdsBestKeyKtoErloeseSatz5.SetParentComponent(xdsBestKey);\r\n xdsBestKeyKtoErloeseSatz5.Name := 'xdsBestKeyKtoErloeseSatz5';\r\n xdsBestKeyKtoErloeseSatz5.FieldName := 'KtoErloeseSatz5';\r\n xdsBestKeyKtoErloeseSatz6.SetParentComponent(xdsBestKey);\r\n xdsBestKeyKtoErloeseSatz6.Name := 'xdsBestKeyKtoErloeseSatz6';\r\n xdsBestKeyKtoErloeseSatz6.FieldName := 'KtoErloeseSatz6';\r\n xdsBestKeyKtoSkontoaufwandSatz1.SetParentComponent(xdsBestKey);\r\n xdsBestKeyKtoSkontoaufwandSatz1.Name := 'xdsBestKeyKtoSkontoaufwandSatz1';\r\n xdsBestKeyKtoSkontoaufwandSatz1.FieldName := 'KtoSkontoaufwandSatz1';\r\n xdsBestKeyKtoSkontoaufwandSatz2.SetParentComponent(xdsBestKey);\r\n xdsBestKeyKtoSkontoaufwandSatz2.Name := 'xdsBestKeyKtoSkontoaufwandSatz2';\r\n xdsBestKeyKtoSkontoaufwandSatz2.FieldName := 'KtoSkontoaufwandSatz2';\r\n xdsBestKeyKtoSkontoaufwandSatz3.SetParentComponent(xdsBestKey);\r\n xdsBestKeyKtoSkontoaufwandSatz3.Name := 'xdsBestKeyKtoSkontoaufwandSatz3';\r\n xdsBestKeyKtoSkontoaufwandSatz3.FieldName := 'KtoSkontoaufwandSatz3';\r\n xdsBestKeyKtoSkontoaufwandSatz4.SetParentComponent(xdsBestKey);\r\n xdsBestKeyKtoSkontoaufwandSatz4.Name := 'xdsBestKeyKtoSkontoaufwandSatz4';\r\n xdsBestKeyKtoSkontoaufwandSatz4.FieldName := 'KtoSkontoaufwandSatz4';\r\n xdsBestKeyKtoSkontoaufwandSatz5.SetParentComponent(xdsBestKey);\r\n xdsBestKeyKtoSkontoaufwandSatz5.Name := 'xdsBestKeyKtoSkontoaufwandSatz5';\r\n xdsBestKeyKtoSkontoaufwandSatz5.FieldName := 'KtoSkontoaufwandSatz5';\r\n xdsBestKeyKtoSkontoaufwandSatz6.SetParentComponent(xdsBestKey);\r\n xdsBestKeyKtoSkontoaufwandSatz6.Name := 'xdsBestKeyKtoSkontoaufwandSatz6';\r\n xdsBestKeyKtoSkontoaufwandSatz6.FieldName := 'KtoSkontoaufwandSatz6';\r\n xdsBestKeyKtoSkontoertragSatz1.SetParentComponent(xdsBestKey);\r\n xdsBestKeyKtoSkontoertragSatz1.Name := 'xdsBestKeyKtoSkontoertragSatz1';\r\n xdsBestKeyKtoSkontoertragSatz1.FieldName := 'KtoSkontoertragSatz1';\r\n xdsBestKeyKtoSkontoertragSatz2.SetParentComponent(xdsBestKey);\r\n xdsBestKeyKtoSkontoertragSatz2.Name := 'xdsBestKeyKtoSkontoertragSatz2';\r\n xdsBestKeyKtoSkontoertragSatz2.FieldName := 'KtoSkontoertragSatz2';\r\n xdsBestKeyKtoSkontoertragSatz3.SetParentComponent(xdsBestKey);\r\n xdsBestKeyKtoSkontoertragSatz3.Name := 'xdsBestKeyKtoSkontoertragSatz3';\r\n xdsBestKeyKtoSkontoertragSatz3.FieldName := 'KtoSkontoertragSatz3';\r\n xdsBestKeyKtoSkontoertragSatz4.SetParentComponent(xdsBestKey);\r\n xdsBestKeyKtoSkontoertragSatz4.Name := 'xdsBestKeyKtoSkontoertragSatz4';\r\n xdsBestKeyKtoSkontoertragSatz4.FieldName := 'KtoSkontoertragSatz4';\r\n xdsBestKeyKtoSkontoertragSatz5.SetParentComponent(xdsBestKey);\r\n xdsBestKeyKtoSkontoertragSatz5.Name := 'xdsBestKeyKtoSkontoertragSatz5';\r\n xdsBestKeyKtoSkontoertragSatz5.FieldName := 'KtoSkontoertragSatz5';\r\n xdsBestKeyKtoSkontoertragSatz6.SetParentComponent(xdsBestKey);\r\n xdsBestKeyKtoSkontoertragSatz6.Name := 'xdsBestKeyKtoSkontoertragSatz6';\r\n xdsBestKeyKtoSkontoertragSatz6.FieldName := 'KtoSkontoertragSatz6';\r\n xdsBestKeyKtoErloesschmaelerungenSatz1.SetParentComponent(xdsBestKey);\r\n xdsBestKeyKtoErloesschmaelerungenSatz1.Name := 'xdsBestKeyKtoErloesschmaelerungenSatz1';\r\n xdsBestKeyKtoErloesschmaelerungenSatz1.FieldName := 'KtoErloesschmaelerungenSatz1';\r\n xdsBestKeyKtoErloesschmaelerungenSatz2.SetParentComponent(xdsBestKey);\r\n xdsBestKeyKtoErloesschmaelerungenSatz2.Name := 'xdsBestKeyKtoErloesschmaelerungenSatz2';\r\n xdsBestKeyKtoErloesschmaelerungenSatz2.FieldName := 'KtoErloesschmaelerungenSatz2';\r\n xdsBestKeyKtoErloesschmaelerungenSatz3.SetParentComponent(xdsBestKey);\r\n xdsBestKeyKtoErloesschmaelerungenSatz3.Name := 'xdsBestKeyKtoErloesschmaelerungenSatz3';\r\n xdsBestKeyKtoErloesschmaelerungenSatz3.FieldName := 'KtoErloesschmaelerungenSatz3';\r\n xdsBestKeyKtoErloesschmaelerungenSatz4.SetParentComponent(xdsBestKey);\r\n xdsBestKeyKtoErloesschmaelerungenSatz4.Name := 'xdsBestKeyKtoErloesschmaelerungenSatz4';\r\n xdsBestKeyKtoErloesschmaelerungenSatz4.FieldName := 'KtoErloesschmaelerungenSatz4';\r\n xdsBestKeyKtoErloesschmaelerungenSatz5.SetParentComponent(xdsBestKey);\r\n xdsBestKeyKtoErloesschmaelerungenSatz5.Name := 'xdsBestKeyKtoErloesschmaelerungenSatz5';\r\n xdsBestKeyKtoErloesschmaelerungenSatz5.FieldName := 'KtoErloesschmaelerungenSatz5';\r\n xdsBestKeyKtoErloesschmaelerungenSatz6.SetParentComponent(xdsBestKey);\r\n xdsBestKeyKtoErloesschmaelerungenSatz6.Name := 'xdsBestKeyKtoErloesschmaelerungenSatz6';\r\n xdsBestKeyKtoErloesschmaelerungenSatz6.FieldName := 'KtoErloesschmaelerungenSatz6';\r\n xdsBestKeyNatura.SetParentComponent(xdsBestKey);\r\n xdsBestKeyNatura.Name := 'xdsBestKeyNatura';\r\n xdsBestKeyNatura.FieldName := 'Natura';\r\n xdsBestKeyNatura.Size := 5;\r\n xdsBestKeyBSchl_UST_Satz1.SetParentComponent(xdsBestKey);\r\n xdsBestKeyBSchl_UST_Satz1.Name := 'xdsBestKeyBSchl_UST_Satz1';\r\n xdsBestKeyBSchl_UST_Satz1.FieldName := 'BSchl_UST_Satz1';\r\n xdsBestKeyBSchl_UST_Satz2.SetParentComponent(xdsBestKey);\r\n xdsBestKeyBSchl_UST_Satz2.Name := 'xdsBestKeyBSchl_UST_Satz2';\r\n xdsBestKeyBSchl_UST_Satz2.FieldName := 'BSchl_UST_Satz2';\r\n xdsBestKeyBSchl_UST_Satz3.SetParentComponent(xdsBestKey);\r\n xdsBestKeyBSchl_UST_Satz3.Name := 'xdsBestKeyBSchl_UST_Satz3';\r\n xdsBestKeyBSchl_UST_Satz3.FieldName := 'BSchl_UST_Satz3';\r\n xdsBestKeyBSchl_UST_Satz4.SetParentComponent(xdsBestKey);\r\n xdsBestKeyBSchl_UST_Satz4.Name := 'xdsBestKeyBSchl_UST_Satz4';\r\n xdsBestKeyBSchl_UST_Satz4.FieldName := 'BSchl_UST_Satz4';\r\n xdsBestKeyBSchl_UST_Satz5.SetParentComponent(xdsBestKey);\r\n xdsBestKeyBSchl_UST_Satz5.Name := 'xdsBestKeyBSchl_UST_Satz5';\r\n xdsBestKeyBSchl_UST_Satz5.FieldName := 'BSchl_UST_Satz5';\r\n xdsBestKeyBSchl_UST_Satz6.SetParentComponent(xdsBestKey);\r\n xdsBestKeyBSchl_UST_Satz6.Name := 'xdsBestKeyBSchl_UST_Satz6';\r\n xdsBestKeyBSchl_UST_Satz6.FieldName := 'BSchl_UST_Satz6';\r\n xdsBestKeyBSchl_Vorsteuer_Satz1.SetParentComponent(xdsBestKey);\r\n xdsBestKeyBSchl_Vorsteuer_Satz1.Name := 'xdsBestKeyBSchl_Vorsteuer_Satz1';\r\n xdsBestKeyBSchl_Vorsteuer_Satz1.FieldName := 'BSchl_Vorsteuer_Satz1';\r\n xdsBestKeyBSchl_Vorsteuer_Satz2.SetParentComponent(xdsBestKey);\r\n xdsBestKeyBSchl_Vorsteuer_Satz2.Name := 'xdsBestKeyBSchl_Vorsteuer_Satz2';\r\n xdsBestKeyBSchl_Vorsteuer_Satz2.FieldName := 'BSchl_Vorsteuer_Satz2';\r\n xdsBestKeyBSchl_Vorsteuer_Satz3.SetParentComponent(xdsBestKey);\r\n xdsBestKeyBSchl_Vorsteuer_Satz3.Name := 'xdsBestKeyBSchl_Vorsteuer_Satz3';\r\n xdsBestKeyBSchl_Vorsteuer_Satz3.FieldName := 'BSchl_Vorsteuer_Satz3';\r\n xdsBestKeyBSchl_Vorsteuer_Satz4.SetParentComponent(xdsBestKey);\r\n xdsBestKeyBSchl_Vorsteuer_Satz4.Name := 'xdsBestKeyBSchl_Vorsteuer_Satz4';\r\n xdsBestKeyBSchl_Vorsteuer_Satz4.FieldName := 'BSchl_Vorsteuer_Satz4';\r\n xdsBestKeyBSchl_Vorsteuer_Satz5.SetParentComponent(xdsBestKey);\r\n xdsBestKeyBSchl_Vorsteuer_Satz5.Name := 'xdsBestKeyBSchl_Vorsteuer_Satz5';\r\n xdsBestKeyBSchl_Vorsteuer_Satz5.FieldName := 'BSchl_Vorsteuer_Satz5';\r\n xdsBestKeyBSchl_Vorsteuer_Satz6.SetParentComponent(xdsBestKey);\r\n xdsBestKeyBSchl_Vorsteuer_Satz6.Name := 'xdsBestKeyBSchl_Vorsteuer_Satz6';\r\n xdsBestKeyBSchl_Vorsteuer_Satz6.FieldName := 'BSchl_Vorsteuer_Satz6';\r\n xdsBestKeyDokTyp.SetParentComponent(xdsBestKey);\r\n xdsBestKeyDokTyp.Name := 'xdsBestKeyDokTyp';\r\n xdsBestKeyDokTyp.FieldName := 'DokTyp';\r\n xdsBestKeyDokTyp.Size := 5;\r\n sourceBestKey.SetParentComponent(Self);\r\n sourceBestKey.Name := 'sourceBestKey';\r\n sourceBestKey.DataSet := xdsBestKey;\r\n sourceBestKey.Left := 260;\r\n sourceBestKey.Top := 21;\r\n finally\r\n Container1.AfterLoadDFMValues;\r\n Container2.AfterLoadDFMValues;\r\n Container3.AfterLoadDFMValues;\r\n TC.AfterLoadDFMValues;\r\n edtStrasse.AfterLoadDFMValues;\r\n edtPostleitzahl.AfterLoadDFMValues;\r\n btnzurueck.AfterLoadDFMValues;\r\n btnSpeichern.AfterLoadDFMValues;\r\n edtVorname.AfterLoadDFMValues;\r\n edtAdresszeile2.AfterLoadDFMValues;\r\n edtAdresszeile3.AfterLoadDFMValues;\r\n edtOrt.AfterLoadDFMValues;\r\n edtLand.AfterLoadDFMValues;\r\n edtTelefon.AfterLoadDFMValues;\r\n edtTelefonAlternativ.AfterLoadDFMValues;\r\n edtTelefonMobil.AfterLoadDFMValues;\r\n edtInternet.AfterLoadDFMValues;\r\n edtEmail.AfterLoadDFMValues;\r\n edtAdressanrede.AfterLoadDFMValues;\r\n edtTitel.AfterLoadDFMValues;\r\n edtNachname.AfterLoadDFMValues;\r\n sourceEinzelkontakt.AfterLoadDFMValues;\r\n xdsEinzelkontakt.AfterLoadDFMValues;\r\n xdsEinzelkontaktKundennummer.AfterLoadDFMValues;\r\n xdsEinzelkontaktGruppeKunden.AfterLoadDFMValues;\r\n xdsEinzelkontaktGruppeLieferanten.AfterLoadDFMValues;\r\n xdsEinzelkontaktGruppeSonstige.AfterLoadDFMValues;\r\n xdsEinzelkontaktGruppeNichtkunden.AfterLoadDFMValues;\r\n xdsEinzelkontaktKontaktgruppe.AfterLoadDFMValues;\r\n xdsEinzelkontaktNachname.AfterLoadDFMValues;\r\n xdsEinzelkontaktVorname.AfterLoadDFMValues;\r\n xdsEinzelkontaktAdresszeile2.AfterLoadDFMValues;\r\n xdsEinzelkontaktAdresszeile3.AfterLoadDFMValues;\r\n xdsEinzelkontaktStrasse.AfterLoadDFMValues;\r\n xdsEinzelkontaktPostleitzahl.AfterLoadDFMValues;\r\n xdsEinzelkontaktOrt.AfterLoadDFMValues;\r\n xdsEinzelkontaktLaenderkuerzel.AfterLoadDFMValues;\r\n xdsEinzelkontaktLand.AfterLoadDFMValues;\r\n xdsEinzelkontaktLaenderkennzeichen.AfterLoadDFMValues;\r\n xdsEinzelkontaktAdressanrede.AfterLoadDFMValues;\r\n xdsEinzelkontaktBriefanrede1.AfterLoadDFMValues;\r\n xdsEinzelkontaktBriefanrede2.AfterLoadDFMValues;\r\n xdsEinzelkontaktAdresseBild.AfterLoadDFMValues;\r\n xdsEinzelkontaktLieferanschrift.AfterLoadDFMValues;\r\n xdsEinzelkontaktGeburtsdatum.AfterLoadDFMValues;\r\n xdsEinzelkontaktTelefonNummer.AfterLoadDFMValues;\r\n xdsEinzelkontaktTelefaxNummer.AfterLoadDFMValues;\r\n xdsEinzelkontaktMobilTelefon.AfterLoadDFMValues;\r\n xdsEinzelkontaktEMail.AfterLoadDFMValues;\r\n xdsEinzelkontaktInternet.AfterLoadDFMValues;\r\n xdsEinzelkontaktUmsatzsteuerID.AfterLoadDFMValues;\r\n xdsEinzelkontaktUmsatzsteuerausweis.AfterLoadDFMValues;\r\n xdsEinzelkontaktBemerkungen.AfterLoadDFMValues;\r\n xdsEinzelkontaktBranche.AfterLoadDFMValues;\r\n xdsEinzelkontaktSelektiert1.AfterLoadDFMValues;\r\n xdsEinzelkontaktSelektiert2.AfterLoadDFMValues;\r\n xdsEinzelkontaktSelektiert3.AfterLoadDFMValues;\r\n xdsEinzelkontaktZahlungsbedingung.AfterLoadDFMValues;\r\n xdsEinzelkontaktTransportbedingung.AfterLoadDFMValues;\r\n xdsEinzelkontaktKilometer.AfterLoadDFMValues;\r\n xdsEinzelkontaktRabattsatz.AfterLoadDFMValues;\r\n xdsEinzelkontaktStundensatz.AfterLoadDFMValues;\r\n xdsEinzelkontaktKontonummer.AfterLoadDFMValues;\r\n xdsEinzelkontaktBank.AfterLoadDFMValues;\r\n xdsEinzelkontaktBankleitzahl.AfterLoadDFMValues;\r\n xdsEinzelkontaktKontoinhaber.AfterLoadDFMValues;\r\n xdsEinzelkontaktBetreuer.AfterLoadDFMValues;\r\n xdsEinzelkontaktQuelle.AfterLoadDFMValues;\r\n xdsEinzelkontaktSuchmerkmal.AfterLoadDFMValues;\r\n xdsEinzelkontaktWarenkreditlimit.AfterLoadDFMValues;\r\n xdsEinzelkontaktWarenkreditgesperrt.AfterLoadDFMValues;\r\n xdsEinzelkontaktKundennummerFremd.AfterLoadDFMValues;\r\n xdsEinzelkontaktKeinNewsletter.AfterLoadDFMValues;\r\n xdsEinzelkontaktDebitorennummer.AfterLoadDFMValues;\r\n xdsEinzelkontaktKreditorennummer.AfterLoadDFMValues;\r\n xdsEinzelkontaktTelefonAlternativ.AfterLoadDFMValues;\r\n xdsEinzelkontaktKostentraeger.AfterLoadDFMValues;\r\n xdsEinzelkontaktIBAN.AfterLoadDFMValues;\r\n xdsEinzelkontaktBIC.AfterLoadDFMValues;\r\n xdsEinzelkontaktEmailkonto.AfterLoadDFMValues;\r\n xdsEinzelkontaktBenutzername.AfterLoadDFMValues;\r\n xdsEinzelkontaktPasswort.AfterLoadDFMValues;\r\n xdsEinzelkontaktExportOutlook.AfterLoadDFMValues;\r\n xdsEinzelkontaktNichtInListeAnzeigen.AfterLoadDFMValues;\r\n xdsEinzelkontaktKreditkarteArt.AfterLoadDFMValues;\r\n xdsEinzelkontaktKreditkarteInhaber.AfterLoadDFMValues;\r\n xdsEinzelkontaktKreditkarteNummer.AfterLoadDFMValues;\r\n xdsEinzelkontaktKreditkarteGueltigMonat.AfterLoadDFMValues;\r\n xdsEinzelkontaktKreditkarteGueltigJahr.AfterLoadDFMValues;\r\n xdsEinzelkontaktKreditkartePruefziffer.AfterLoadDFMValues;\r\n xdsEinzelkontaktDatumNeu.AfterLoadDFMValues;\r\n xdsEinzelkontaktDatumgeaendert.AfterLoadDFMValues;\r\n xdsEinzelkontaktTitel.AfterLoadDFMValues;\r\n xdsEinzelkontaktStundensatzMontage.AfterLoadDFMValues;\r\n xdsEinzelkontaktStdMontageU25.AfterLoadDFMValues;\r\n xdsEinzelkontaktStdMontageU50.AfterLoadDFMValues;\r\n xdsEinzelkontaktStdMontageU70.AfterLoadDFMValues;\r\n xdsEinzelkontaktStdMontageU100.AfterLoadDFMValues;\r\n xdsEinzelkontaktStdMontageU150.AfterLoadDFMValues;\r\n xdsEinzelkontaktStundensatzWerkstatt.AfterLoadDFMValues;\r\n xdsEinzelkontaktStdWerkstattU25.AfterLoadDFMValues;\r\n xdsEinzelkontaktStdWerkstattU50.AfterLoadDFMValues;\r\n xdsEinzelkontaktStdWerkstattU70.AfterLoadDFMValues;\r\n xdsEinzelkontaktStdWerkstattU100.AfterLoadDFMValues;\r\n xdsEinzelkontaktStdWerkstattU150.AfterLoadDFMValues;\r\n xdsEinzelkontaktArchivReferenz.AfterLoadDFMValues;\r\n xdsEinzelkontaktErloesKontoUST1.AfterLoadDFMValues;\r\n xdsEinzelkontaktErloesKontoUST2.AfterLoadDFMValues;\r\n xdsEinzelkontaktErloesKontoUST3.AfterLoadDFMValues;\r\n xdsEinzelkontaktGebKal.AfterLoadDFMValues;\r\n xdsEinzelkontaktEmailversand.AfterLoadDFMValues;\r\n xdsEinzelkontaktMahnspesen.AfterLoadDFMValues;\r\n xdsEinzelkontaktRechnungSchluss.AfterLoadDFMValues;\r\n xdsEinzelkontaktBenutzerNeu.AfterLoadDFMValues;\r\n xdsEinzelkontaktBenutzerGeaendert.AfterLoadDFMValues;\r\n xdsEinzelkontaktBelegsprache.AfterLoadDFMValues;\r\n xdsEinzelkontaktkmSatz.AfterLoadDFMValues;\r\n xdsEinzelkontaktKundenklassetext.AfterLoadDFMValues;\r\n xdsEinzelkontaktKundenklasseFarbe.AfterLoadDFMValues;\r\n xdsEinzelkontaktAbweichenderRechnungsEmpfaenger.AfterLoadDFMValues;\r\n xdsEinzelkontaktProtokoll.AfterLoadDFMValues;\r\n xdsEinzelkontaktILNTyp1.AfterLoadDFMValues;\r\n xdsEinzelkontaktILNTyp2.AfterLoadDFMValues;\r\n xdsEinzelkontaktKontaktGUID.AfterLoadDFMValues;\r\n xdsEinzelkontaktPLZGUID.AfterLoadDFMValues;\r\n xdsEinzelkontaktPreislistenVariantePakete.AfterLoadDFMValues;\r\n xdsEinzelkontaktSchluesselRechnungslauf.AfterLoadDFMValues;\r\n xdsEinzelkontaktRechnungEmail.AfterLoadDFMValues;\r\n xdsEinzelkontaktZahlungsbedingungEK.AfterLoadDFMValues;\r\n xdsEinzelkontaktTransportbedingungEK.AfterLoadDFMValues;\r\n xdsEinzelkontaktRabattsatzEK.AfterLoadDFMValues;\r\n xdsEinzelkontaktVertreterMatchcode.AfterLoadDFMValues;\r\n xdsEinzelkontaktVertreterProvisionssatz.AfterLoadDFMValues;\r\n xdsEinzelkontaktUmsatzVKJahr.AfterLoadDFMValues;\r\n xdsEinzelkontaktUmsatzVKVorjahr.AfterLoadDFMValues;\r\n xdsEinzelkontaktUmsatzEKJahr.AfterLoadDFMValues;\r\n xdsEinzelkontaktUmsatzEKVorjahr.AfterLoadDFMValues;\r\n xdsEinzelkontaktSteuernummer.AfterLoadDFMValues;\r\n xdsEinzelkontaktLoginPW.AfterLoadDFMValues;\r\n xdsEinzelkontaktREperFax.AfterLoadDFMValues;\r\n xdsEinzelkontaktErreichbarkeit.AfterLoadDFMValues;\r\n xdsEinzelkontaktErloesKontoUST4.AfterLoadDFMValues;\r\n xdsEinzelkontaktErloesKontoUST5.AfterLoadDFMValues;\r\n xdsEinzelkontaktErloesKontoUST6.AfterLoadDFMValues;\r\n xdsEinzelkontaktBesteuerungKey.AfterLoadDFMValues;\r\n xdsEinzelkontaktAuftraegeJahr.AfterLoadDFMValues;\r\n xdsEinzelkontaktAuftraegeVorjahr.AfterLoadDFMValues;\r\n xdsEinzelkontaktLieferadresseID.AfterLoadDFMValues;\r\n xdsEinzelkontaktUSTIDgeprueft.AfterLoadDFMValues;\r\n xdsEinzelkontaktKontaktverbund.AfterLoadDFMValues;\r\n xdsEinzelkontaktHinweis.AfterLoadDFMValues;\r\n xdsEinzelkontaktLatitude.AfterLoadDFMValues;\r\n xdsEinzelkontaktLongitude.AfterLoadDFMValues;\r\n xdsEinzelkontaktkmLuftlinie.AfterLoadDFMValues;\r\n xdsEinzelkontaktGoogleID.AfterLoadDFMValues;\r\n xdsEinzelkontaktGoogleUpdatedUTC.AfterLoadDFMValues;\r\n xdsEinzelkontaktBundesland.AfterLoadDFMValues;\r\n xdsEinzelkontaktRegion.AfterLoadDFMValues;\r\n xdsEinzelkontaktMandatsreferenz.AfterLoadDFMValues;\r\n xdsEinzelkontaktMandatsreferenzVom.AfterLoadDFMValues;\r\n xdsEinzelkontaktLastschriftArt.AfterLoadDFMValues;\r\n xdsEinzelkontaktMahnsperre.AfterLoadDFMValues;\r\n xdsEinzelkontaktSuchbegriff.AfterLoadDFMValues;\r\n xdsEinzelkontaktLieferanschriftDaten.AfterLoadDFMValues;\r\n xdsEinzelkontaktExportKasse.AfterLoadDFMValues;\r\n xdsEinzelkontaktLoeschvormerkungDatum.AfterLoadDFMValues;\r\n xdsEinzelkontaktLoeschvormerkungGrund.AfterLoadDFMValues;\r\n xdsEinzelkontaktPseudonymisiert.AfterLoadDFMValues;\r\n xdsEinzelkontaktLoginAktiv.AfterLoadDFMValues;\r\n xdsEinzelkontaktSonstigeDaten.AfterLoadDFMValues;\r\n xdsEinzelkontaktB2C.AfterLoadDFMValues;\r\n xdsEinzelkontaktTIN.AfterLoadDFMValues;\r\n xdsEinzelkontaktMindestbestellwert.AfterLoadDFMValues;\r\n xdsLaender.AfterLoadDFMValues;\r\n xdsLaenderLaenderkuerzel.AfterLoadDFMValues;\r\n xdsLaenderLand.AfterLoadDFMValues;\r\n sourceLaender.AfterLoadDFMValues;\r\n xdsBestKey.AfterLoadDFMValues;\r\n xdsBestKeyBesteuerungKey.AfterLoadDFMValues;\r\n xdsBestKeyBesteuerungKurzText.AfterLoadDFMValues;\r\n xdsBestKeyBesteuerungLangText.AfterLoadDFMValues;\r\n xdsBestKeyUmsatzsteuerausweis.AfterLoadDFMValues;\r\n xdsBestKeyKtoVorsteuerSatz1.AfterLoadDFMValues;\r\n xdsBestKeyKtoVorsteuerSatz2.AfterLoadDFMValues;\r\n xdsBestKeyKtoVorsteuerSatz3.AfterLoadDFMValues;\r\n xdsBestKeyKtoVorsteuerSatz4.AfterLoadDFMValues;\r\n xdsBestKeyKtoVorsteuerSatz5.AfterLoadDFMValues;\r\n xdsBestKeyKtoVorsteuerSatz6.AfterLoadDFMValues;\r\n xdsBestKeyKtoErloeseSatz1.AfterLoadDFMValues;\r\n xdsBestKeyKtoErloeseSatz2.AfterLoadDFMValues;\r\n xdsBestKeyKtoErloeseSatz3.AfterLoadDFMValues;\r\n xdsBestKeyKtoErloeseSatz4.AfterLoadDFMValues;\r\n xdsBestKeyKtoErloeseSatz5.AfterLoadDFMValues;\r\n xdsBestKeyKtoErloeseSatz6.AfterLoadDFMValues;\r\n xdsBestKeyKtoSkontoaufwandSatz1.AfterLoadDFMValues;\r\n xdsBestKeyKtoSkontoaufwandSatz2.AfterLoadDFMValues;\r\n xdsBestKeyKtoSkontoaufwandSatz3.AfterLoadDFMValues;\r\n xdsBestKeyKtoSkontoaufwandSatz4.AfterLoadDFMValues;\r\n xdsBestKeyKtoSkontoaufwandSatz5.AfterLoadDFMValues;\r\n xdsBestKeyKtoSkontoaufwandSatz6.AfterLoadDFMValues;\r\n xdsBestKeyKtoSkontoertragSatz1.AfterLoadDFMValues;\r\n xdsBestKeyKtoSkontoertragSatz2.AfterLoadDFMValues;\r\n xdsBestKeyKtoSkontoertragSatz3.AfterLoadDFMValues;\r\n xdsBestKeyKtoSkontoertragSatz4.AfterLoadDFMValues;\r\n xdsBestKeyKtoSkontoertragSatz5.AfterLoadDFMValues;\r\n xdsBestKeyKtoSkontoertragSatz6.AfterLoadDFMValues;\r\n xdsBestKeyKtoErloesschmaelerungenSatz1.AfterLoadDFMValues;\r\n xdsBestKeyKtoErloesschmaelerungenSatz2.AfterLoadDFMValues;\r\n xdsBestKeyKtoErloesschmaelerungenSatz3.AfterLoadDFMValues;\r\n xdsBestKeyKtoErloesschmaelerungenSatz4.AfterLoadDFMValues;\r\n xdsBestKeyKtoErloesschmaelerungenSatz5.AfterLoadDFMValues;\r\n xdsBestKeyKtoErloesschmaelerungenSatz6.AfterLoadDFMValues;\r\n xdsBestKeyNatura.AfterLoadDFMValues;\r\n xdsBestKeyBSchl_UST_Satz1.AfterLoadDFMValues;\r\n xdsBestKeyBSchl_UST_Satz2.AfterLoadDFMValues;\r\n xdsBestKeyBSchl_UST_Satz3.AfterLoadDFMValues;\r\n xdsBestKeyBSchl_UST_Satz4.AfterLoadDFMValues;\r\n xdsBestKeyBSchl_UST_Satz5.AfterLoadDFMValues;\r\n xdsBestKeyBSchl_UST_Satz6.AfterLoadDFMValues;\r\n xdsBestKeyBSchl_Vorsteuer_Satz1.AfterLoadDFMValues;\r\n xdsBestKeyBSchl_Vorsteuer_Satz2.AfterLoadDFMValues;\r\n xdsBestKeyBSchl_Vorsteuer_Satz3.AfterLoadDFMValues;\r\n xdsBestKeyBSchl_Vorsteuer_Satz4.AfterLoadDFMValues;\r\n xdsBestKeyBSchl_Vorsteuer_Satz5.AfterLoadDFMValues;\r\n xdsBestKeyBSchl_Vorsteuer_Satz6.AfterLoadDFMValues;\r\n xdsBestKeyDokTyp.AfterLoadDFMValues;\r\n sourceBestKey.AfterLoadDFMValues;\r\n end;\r\nend;\r\n\r\nend.","unit unit_EinzelKontakt;\r\n\r\ninterface\r\n\r\nuses\r\n System.SysUtils, System.Classes, JS, Web, WEBLib.Graphics, WEBLib.Controls,\r\n WEBLib.Forms, WEBLib.Dialogs, WEBLib.StdCtrls, WEBLib.Buttons, Vcl.StdCtrls,\r\n WEBLib.DBCtrls, Vcl.Controls, WEBLib.ExtCtrls, Data.DB, WEBLib.DB,\r\n XData.Web.JsonDataset, XData.Web.Dataset, WEBLib.Grids, strutils,\r\n WEBLib.ComCtrls, XData.Web.Client, DB;\r\n\r\ntype\r\n TEinzelKontakt = class(TForm)\r\n xdsEinzelkontakt: TXDataWebDataSet;\r\n xdsEinzelkontaktKundennummer: TStringField;\r\n xdsEinzelkontaktGruppeKunden: TBooleanField;\r\n xdsEinzelkontaktGruppeLieferanten: TBooleanField;\r\n xdsEinzelkontaktGruppeSonstige: TBooleanField;\r\n xdsEinzelkontaktGruppeNichtkunden: TBooleanField;\r\n xdsEinzelkontaktKontaktgruppe: TStringField;\r\n xdsEinzelkontaktNachname: TStringField;\r\n xdsEinzelkontaktVorname: TStringField;\r\n xdsEinzelkontaktAdresszeile2: TStringField;\r\n xdsEinzelkontaktAdresszeile3: TStringField;\r\n xdsEinzelkontaktStrasse: TStringField;\r\n xdsEinzelkontaktPostleitzahl: TStringField;\r\n xdsEinzelkontaktOrt: TStringField;\r\n xdsEinzelkontaktLaenderkuerzel: TStringField;\r\n xdsEinzelkontaktLand: TStringField;\r\n xdsEinzelkontaktLaenderkennzeichen: TBooleanField;\r\n xdsEinzelkontaktAdressanrede: TStringField;\r\n xdsEinzelkontaktBriefanrede1: TStringField;\r\n xdsEinzelkontaktBriefanrede2: TStringField;\r\n xdsEinzelkontaktAdresseBild: TStringField;\r\n xdsEinzelkontaktLieferanschrift: TStringField;\r\n xdsEinzelkontaktGeburtsdatum: TDateTimeField;\r\n xdsEinzelkontaktTelefonNummer: TStringField;\r\n xdsEinzelkontaktTelefaxNummer: TStringField;\r\n xdsEinzelkontaktMobilTelefon: TStringField;\r\n xdsEinzelkontaktEMail: TStringField;\r\n xdsEinzelkontaktInternet: TStringField;\r\n xdsEinzelkontaktUmsatzsteuerID: TStringField;\r\n xdsEinzelkontaktUmsatzsteuerausweis: TBooleanField;\r\n xdsEinzelkontaktBemerkungen: TStringField;\r\n xdsEinzelkontaktBranche: TStringField;\r\n xdsEinzelkontaktSelektiert1: TBooleanField;\r\n xdsEinzelkontaktSelektiert2: TBooleanField;\r\n xdsEinzelkontaktSelektiert3: TBooleanField;\r\n xdsEinzelkontaktZahlungsbedingung: TIntegerField;\r\n xdsEinzelkontaktTransportbedingung: TStringField;\r\n xdsEinzelkontaktKilometer: TIntegerField;\r\n xdsEinzelkontaktRabattsatz: TFloatField;\r\n xdsEinzelkontaktStundensatz: TFloatField;\r\n xdsEinzelkontaktKontonummer: TStringField;\r\n xdsEinzelkontaktBank: TStringField;\r\n xdsEinzelkontaktBankleitzahl: TFloatField;\r\n xdsEinzelkontaktKontoinhaber: TStringField;\r\n xdsEinzelkontaktBetreuer: TStringField;\r\n xdsEinzelkontaktQuelle: TStringField;\r\n xdsEinzelkontaktSuchmerkmal: TStringField;\r\n xdsEinzelkontaktWarenkreditlimit: TFloatField;\r\n xdsEinzelkontaktWarenkreditgesperrt: TBooleanField;\r\n xdsEinzelkontaktKundennummerFremd: TStringField;\r\n xdsEinzelkontaktKeinNewsletter: TBooleanField;\r\n xdsEinzelkontaktDebitorennummer: TStringField;\r\n xdsEinzelkontaktKreditorennummer: TStringField;\r\n xdsEinzelkontaktTelefonAlternativ: TStringField;\r\n xdsEinzelkontaktKostentraeger: TStringField;\r\n xdsEinzelkontaktIBAN: TStringField;\r\n xdsEinzelkontaktBIC: TStringField;\r\n xdsEinzelkontaktEmailkonto: TStringField;\r\n xdsEinzelkontaktBenutzername: TStringField;\r\n xdsEinzelkontaktPasswort: TStringField;\r\n xdsEinzelkontaktExportOutlook: TBooleanField;\r\n xdsEinzelkontaktNichtInListeAnzeigen: TBooleanField;\r\n xdsEinzelkontaktKreditkarteArt: TStringField;\r\n xdsEinzelkontaktKreditkarteInhaber: TStringField;\r\n xdsEinzelkontaktKreditkarteNummer: TStringField;\r\n xdsEinzelkontaktKreditkarteGueltigMonat: TStringField;\r\n xdsEinzelkontaktKreditkarteGueltigJahr: TIntegerField;\r\n xdsEinzelkontaktKreditkartePruefziffer: TStringField;\r\n xdsEinzelkontaktDatumNeu: TDateTimeField;\r\n xdsEinzelkontaktDatumgeaendert: TDateTimeField;\r\n xdsEinzelkontaktTitel: TStringField;\r\n xdsEinzelkontaktStundensatzMontage: TFloatField;\r\n xdsEinzelkontaktStdMontageU25: TFloatField;\r\n xdsEinzelkontaktStdMontageU50: TFloatField;\r\n xdsEinzelkontaktStdMontageU70: TFloatField;\r\n xdsEinzelkontaktStdMontageU100: TFloatField;\r\n xdsEinzelkontaktStdMontageU150: TFloatField;\r\n xdsEinzelkontaktStundensatzWerkstatt: TFloatField;\r\n xdsEinzelkontaktStdWerkstattU25: TFloatField;\r\n xdsEinzelkontaktStdWerkstattU50: TFloatField;\r\n xdsEinzelkontaktStdWerkstattU70: TFloatField;\r\n xdsEinzelkontaktStdWerkstattU100: TFloatField;\r\n xdsEinzelkontaktStdWerkstattU150: TFloatField;\r\n xdsEinzelkontaktArchivReferenz: TStringField;\r\n xdsEinzelkontaktErloesKontoUST1: TStringField;\r\n xdsEinzelkontaktErloesKontoUST2: TStringField;\r\n xdsEinzelkontaktErloesKontoUST3: TStringField;\r\n xdsEinzelkontaktGebKal: TBooleanField;\r\n xdsEinzelkontaktEmailversand: TBooleanField;\r\n xdsEinzelkontaktMahnspesen: TBooleanField;\r\n xdsEinzelkontaktRechnungSchluss: TStringField;\r\n xdsEinzelkontaktBenutzerNeu: TStringField;\r\n xdsEinzelkontaktBenutzerGeaendert: TStringField;\r\n xdsEinzelkontaktBelegsprache: TStringField;\r\n xdsEinzelkontaktkmSatz: TFloatField;\r\n xdsEinzelkontaktKundenklassetext: TStringField;\r\n xdsEinzelkontaktKundenklasseFarbe: TIntegerField;\r\n xdsEinzelkontaktAbweichenderRechnungsEmpfaenger: TStringField;\r\n xdsEinzelkontaktProtokoll: TStringField;\r\n xdsEinzelkontaktILNTyp1: TStringField;\r\n xdsEinzelkontaktILNTyp2: TStringField;\r\n xdsEinzelkontaktKontaktGUID: TStringField;\r\n xdsEinzelkontaktPLZGUID: TStringField;\r\n xdsEinzelkontaktPreislistenVariantePakete: TStringField;\r\n xdsEinzelkontaktSchluesselRechnungslauf: TStringField;\r\n xdsEinzelkontaktRechnungEmail: TStringField;\r\n xdsEinzelkontaktZahlungsbedingungEK: TIntegerField;\r\n xdsEinzelkontaktTransportbedingungEK: TStringField;\r\n xdsEinzelkontaktRabattsatzEK: TFloatField;\r\n xdsEinzelkontaktVertreterMatchcode: TStringField;\r\n xdsEinzelkontaktVertreterProvisionssatz: TFloatField;\r\n xdsEinzelkontaktUmsatzVKJahr: TFloatField;\r\n xdsEinzelkontaktUmsatzVKVorjahr: TFloatField;\r\n xdsEinzelkontaktUmsatzEKJahr: TFloatField;\r\n xdsEinzelkontaktUmsatzEKVorjahr: TFloatField;\r\n xdsEinzelkontaktSteuernummer: TStringField;\r\n xdsEinzelkontaktLoginPW: TStringField;\r\n xdsEinzelkontaktREperFax: TBooleanField;\r\n xdsEinzelkontaktErreichbarkeit: TStringField;\r\n xdsEinzelkontaktErloesKontoUST4: TStringField;\r\n xdsEinzelkontaktErloesKontoUST5: TStringField;\r\n xdsEinzelkontaktErloesKontoUST6: TStringField;\r\n xdsEinzelkontaktBesteuerungKey: TIntegerField;\r\n xdsEinzelkontaktAuftraegeJahr: TFloatField;\r\n xdsEinzelkontaktAuftraegeVorjahr: TFloatField;\r\n xdsEinzelkontaktLieferadresseID: TIntegerField;\r\n xdsEinzelkontaktUSTIDgeprueft: TDateTimeField;\r\n xdsEinzelkontaktKontaktverbund: TStringField;\r\n xdsEinzelkontaktHinweis: TStringField;\r\n xdsEinzelkontaktLatitude: TFloatField;\r\n xdsEinzelkontaktLongitude: TFloatField;\r\n xdsEinzelkontaktkmLuftlinie: TFloatField;\r\n xdsEinzelkontaktGoogleID: TStringField;\r\n xdsEinzelkontaktGoogleUpdatedUTC: TDateTimeField;\r\n xdsEinzelkontaktBundesland: TStringField;\r\n xdsEinzelkontaktRegion: TStringField;\r\n xdsEinzelkontaktMandatsreferenz: TStringField;\r\n xdsEinzelkontaktMandatsreferenzVom: TDateTimeField;\r\n xdsEinzelkontaktLastschriftArt: TStringField;\r\n xdsEinzelkontaktMahnsperre: TBooleanField;\r\n xdsEinzelkontaktSuchbegriff: TStringField;\r\n xdsEinzelkontaktLieferanschriftDaten: TStringField;\r\n xdsEinzelkontaktExportKasse: TBooleanField;\r\n xdsEinzelkontaktLoeschvormerkungDatum: TDateTimeField;\r\n xdsEinzelkontaktLoeschvormerkungGrund: TStringField;\r\n xdsEinzelkontaktPseudonymisiert: TStringField;\r\n xdsEinzelkontaktLoginAktiv: TIntegerField;\r\n xdsEinzelkontaktSonstigeDaten: TStringField;\r\n xdsEinzelkontaktB2C: TBooleanField;\r\n xdsEinzelkontaktTIN: TStringField;\r\n xdsEinzelkontaktMindestbestellwert: TFloatField;\r\n sourceEinzelkontakt: TDataSource;\r\n TC: TTableControl;\r\n WClient: TXDataWebClient;\r\n Container1: THTMLContainer;\r\n Container2: THTMLContainer;\r\n btnzurueck: TButton;\r\n btnBelege: TButton;\r\n btnKarte: TButton;\r\n btnPreise: TButton;\r\n Container3: THTMLContainer;\r\n btnAnsprechpartner: TButton;\r\n btnDateien: TButton;\r\n xdskontosaldo: TXDataWebDataSet;\r\n xdskontosaldoKundennummer: TStringField;\r\n xdskontosaldoZeitaufwand: TIntegerField;\r\n xdskontosaldoAbzurechnen: TIntegerField;\r\n xdskontosaldoGutschrift: TIntegerField;\r\n xdskontosaldoAbzug: TIntegerField;\r\n xdskontosaldoSaldo: TIntegerField;\r\n xdskontosaldoBetrag: TFloatField;\r\n xdskontosaldoMinutenpreis: TFloatField;\r\n xdskontosaldoSRestguthaben: TIntegerField;\r\n btnTicketNeu: TButton;\r\n btnKontaktAendern: TButton;\r\n procedure xdsEinzelkontaktAfterOpen(DataSet: TDataSet);\r\n procedure WebFormShow(Sender: TObject);\r\n procedure btnzurueckClick(Sender: TObject);\r\n procedure btnBelegeClick(Sender: TObject);\r\n procedure btnKarteClick(Sender: TObject);\r\n procedure btnPreiseClick(Sender: TObject);\r\n procedure btnAnsprechpartnerClick(Sender: TObject);\r\n procedure btnDateienClick(Sender: TObject);\r\n procedure xdskontosaldoAfterOpen(DataSet: TDataSet);\r\n procedure btnTicketNeuClick(Sender: TObject);\r\n procedure btnKontaktAendernClick(Sender: TObject);\r\n private\r\n { Private-Deklarationen }\r\n public\r\n { Public-Deklarationen }\r\n KundennummerID:string;\r\n procedure fensteraufbauen;\r\n protected procedure LoadDFMValues; override; end;\r\n\r\nvar\r\n EinzelKontakt: TEinzelKontakt;\r\n\r\nimplementation\r\n uses unit1, unit2, unit_Kontaktsuche, unit_karte, unit_BelegeUndPositionen, unit_Preise, unit_ListeAnsprechpartner, unit_Dateien, unit_TicketNeu,\r\n unit_KontaktAenderung;\r\n{$R *.dfm}\r\n\r\n\r\n\r\nprocedure TEinzelKontakt.btnAnsprechpartnerClick(Sender: TObject);\r\nvar\r\n LFrm:TListeAnsprechpartner;\r\n procedure AfterCreate(AForm:TObject);\r\n var\r\n LForm:TListeAnsprechpartner;\r\n begin\r\n TC.Visible:=false;\r\n LForm:=(AForm as TListeAnsprechpartner);\r\n lform.KundennummerID:=xdsEinzelkontaktKundennummer.AsString;\r\n lform.NachnameID:=xdsEinzelkontaktNachname.AsString;\r\n end;\r\n\r\n procedure AfterShowmodal(Avalue:TModalResult);\r\n begin\r\n //MerkerKontaktnummer:=lfrm.Kontaktnummer;\r\n fensteraufbauen;\r\n end;\r\n begin\r\n LFrm:=TListeAnsprechpartner.CreateNew(@AfterCreate);\r\n LFrm.ShowModal(@AfterShowmodal);\r\n\r\nend;\r\n\r\nprocedure TEinzelKontakt.btnBelegeClick(Sender: TObject);\r\nvar\r\n LFrm:TBelegePositionen;\r\n procedure AfterCreate(AForm:TObject);\r\n var\r\n LForm:TBelegePositionen;\r\n begin\r\n TC.Visible:=false;\r\n LForm:=(AForm as TBelegePositionen);\r\n lform.BPKundennummer:=xdsEinzelkontaktKundennummer.AsString;\r\n lForm.BPName:=xdsEinzelkontaktNachname.asstring;\r\n\r\n end;\r\n\r\n procedure AfterShowmodal(Avalue:TModalResult);\r\n begin\r\n //MerkerKontaktnummer:=lfrm.Kontaktnummer;\r\n fensteraufbauen;\r\n end;\r\n begin\r\n\r\n LFrm:=TBelegePositionen.CreateNew(@AfterCreate);\r\n LFrm.ShowModal(@AfterShowmodal);\r\n\r\nend;\r\n\r\nprocedure TEinzelKontakt.btnDateienClick(Sender: TObject);\r\nvar\r\n LFrm:TfrmDateien;\r\n procedure AfterCreate(AForm:TObject);\r\n var\r\n LForm:TfrmDateien;\r\n begin\r\n LForm:=(AForm as TfrmDateien);\r\n lform.MerkerObjektreferenz:='';\r\n lform.MerkerNummerkomplett:='';\r\n lform.MerkerKundennummer:=xdsEinzelkontaktKundennummer.AsString;\r\n lform.MerkerFahrzeugID:='';\r\n lform.MerkerName:=trim(xdsEinzelkontaktVorname.asstring+' '+ xdsEinzelkontaktNachname.asstring);\r\n lform.MerkerArt:='Kontakt';\r\n lform.HeadlineText:='Dateien zu Kontakt '+xdsEinzelkontaktKundennummer.AsString+' | '+trim(xdsEinzelkontaktVorname.asstring+' '+ xdsEinzelkontaktNachname.asstring);\r\n end;\r\n\r\n procedure AfterShowmodal(Avalue:TModalResult);\r\n begin\r\n fensteraufbauen;\r\n end;\r\n\r\n begin\r\n //Container4.HTML.text:='';\r\n Container3.HTML.Text:='';\r\n LFrm:=TfrmDateien.CreateNew(@AfterCreate);\r\n LFrm.ShowModal(@AfterShowmodal);\r\n\r\nend;\r\n\r\nprocedure TEinzelKontakt.btnKarteClick(Sender: TObject);\r\nvar\r\n LFrm:TKarte;\r\n procedure AfterCreate(AForm:TObject);\r\n var\r\n LForm:TKarte;\r\n begin\r\n TC.Visible:=false;\r\n LForm:=(AForm as TKarte);\r\n lform.mykundehint:=xdsEinzelkontaktKundennummer.AsString+' '+xdsEinzelkontaktNachname.AsString+', '+xdsEinzelkontaktVorname.asstring;\r\n lForm.edttoaddress.Text:= xdsEinzelkontaktPostleitzahl.AsString+' '+xdsEinzelkontaktort.AsString+', '+xdsEinzelkontaktStrasse.AsString;\r\n end;\r\n\r\n procedure AfterShowmodal(Avalue:TModalResult);\r\n begin\r\n //MerkerKontaktnummer:=lfrm.Kontaktnummer;\r\n fensteraufbauen;\r\n end;\r\n begin\r\n LFrm:=TKarte.CreateNew(@AfterCreate);\r\n LFrm.ShowModal(@AfterShowmodal);\r\nend;\r\n\r\nprocedure TEinzelKontakt.btnKontaktAendernClick(Sender: TObject);\r\nvar\r\n LFrm:TKontaktAenderung;\r\n procedure AfterCreate(AForm:TObject);\r\n var\r\n LForm:TKontaktAenderung;\r\n begin\r\n tc.RowCount:=1;\r\n TC.Visible:=false;\r\n LForm:=(AForm as TKontaktAenderung);\r\n lform.AEKundennummer:=xdsEinzelkontaktKundennummer.AsString;\r\n end;\r\n\r\n procedure AfterShowmodal(Avalue:TModalResult);\r\n begin\r\n xdseinzelkontakt.close;\r\n xdseinzelkontakt.Load;\r\n end;\r\n begin\r\n\r\n LFrm:=TKontaktAenderung.CreateNew(@AfterCreate);\r\n LFrm.ShowModal(@AfterShowmodal);\r\nend;\r\n\r\nprocedure TEinzelKontakt.btnPreiseClick(Sender: TObject);\r\nvar\r\n LFrm:TPreise;\r\n procedure AfterCreate(AForm:TObject);\r\n var\r\n LForm:TPreise;\r\n begin\r\n TC.Visible:=false;\r\n LForm:=(AForm as TPreise);\r\n lform.mykontaktnummer:=xdsEinzelkontaktKundennummer.AsString;\r\n lform.mykontaktname:=xdsEinzelkontaktNachname.AsString;\r\n if xdseinzelkontaktvorname.AsString<>'' then lform.mykontaktname:=lform.mykontaktname+', '+xdsEinzelkontaktVorname.asstring;\r\n end;\r\n\r\n procedure AfterShowmodal(Avalue:TModalResult);\r\n begin\r\n //MerkerKontaktnummer:=lfrm.Kontaktnummer;\r\n fensteraufbauen;\r\n end;\r\n begin\r\n if LizenzOK then\r\n begin\r\n LFrm:=TPreise.CreateNew(@AfterCreate);\r\n LFrm.ShowModal(@AfterShowmodal);\r\n end\r\n else\r\n begin\r\n showmessage('Für diese Funktion sind Sie noch nicht freigeschaltet, bitte erwerben Sie eine Lizenz');\r\n end;\r\n\r\nend;\r\n\r\nprocedure TEinzelKontakt.btnTicketNeuClick(Sender: TObject);\r\nvar\r\n LFrm:TTicketNeu;\r\n procedure AfterCreate(AForm:TObject);\r\n var\r\n LForm:TTicketNeu;\r\n begin\r\n TC.Visible:=false;\r\n LForm:=(AForm as TTicketNeu);\r\n lform.TicketNeuFuerKundennummer:=xdsEinzelkontaktKundennummer.AsString;\r\n end;\r\n\r\n procedure AfterShowmodal(Avalue:TModalResult);\r\n begin\r\n //MerkerKontaktnummer:=lfrm.Kontaktnummer;\r\n fensteraufbauen;\r\n end;\r\n begin\r\n LFrm:=TTicketNeu.CreateNew(@AfterCreate);\r\n LFrm.ShowModal(@AfterShowmodal);\r\nend;\r\n\r\nprocedure TEinzelKontakt.btnzurueckClick(Sender: TObject);\r\nbegin\r\n xdsEinzelkontakt.Close;\r\n self.Close;\r\nend;\r\n\r\nprocedure TEinzelKontakt.WebFormShow(Sender: TObject);\r\nvar\r\n myelement:TJSHTMLElement;\r\nbegin\r\n Container1.html.text:='';\r\n myelement:=container1.ElementHandle;\r\n container2.ParentElement:=myelement;\r\n container3.ParentElement:=myelement;\r\n myelement:=container2.ElementHandle;\r\n btnzurueck.ParentElement:=myelement;\r\n btnKontaktAendern.ParentElement:=myelement;\r\n btnBelege.ParentElement:=myelement;\r\n btnAnsprechpartner.ParentElement:=myelement;\r\n btnPreise.ParentElement:=myelement;\r\n if (form1.RCW.Einkaufspreise=true) AND (form1.RCW.Verkaufspreise=true) then btnpreise.Enabled:=true else btnpreise.Enabled:=false;\r\n\r\n btnKarte.ParentElement:=myelement;\r\n btnDateien.ParentElement:=myelement;\r\n btnTicketNeu.ParentElement:=myelement;\r\n myelement:=container2.ElementHandle;\r\n tc.ParentElement:=myElement;\r\n xdsEinzelkontakt.Close;\r\n xdseinzelkontakt.QueryString:='$filter=Kundennummer eq '+quotedstr(KundennummerID);\r\n xdseinzelkontakt.Load;\r\nend;\r\n\r\nprocedure TEinzelKontakt.xdsEinzelkontaktAfterOpen(DataSet: TDataSet);\r\nbegin\r\n xdskontosaldo.close;\r\n xdskontosaldo.querystring:='$filter=Kundennummer eq '+xdsEinzelkontaktKundennummer.asstring;\r\n xdskontosaldo.load;\r\n\r\nend;\r\n\r\nprocedure TEinzelKontakt.xdskontosaldoAfterOpen(DataSet: TDataSet);\r\nbegin\r\n fensteraufbauen;\r\nend;\r\n\r\nprocedure TEinzelkontakt.fensteraufbauen;\r\nvar\r\n i:integer;\r\n myelement:TJSHTMLElement;\r\nbegin\r\n TC.Visible:=true;\r\n TC.RowCount:=22;\r\n TC.ColCount:=2;\r\n i:=0;\r\n\r\n TC.Cells[0,i]:='Kontakt-/Kundennummer';\r\n TC.Cells[1,i]:='
'+xdsEinzelkontaktKundennummer.asstring;\r\n inc(i);\r\n TC.Cells[0,i]:='Nachname/Firma';\r\n TC.Cells[1,i]:='
'+xdsEinzelkontaktNachname.asstring;\r\n inc(i);\r\n TC.Cells[0,i]:='Anschrift';\r\n TC.Cells[1,i]:='
'+ReplaceStr(xdsEinzelkontaktAdresseBild.asstring,#13+#10,'
');\r\n\r\n inc(i);\r\n TC.Cells[0,i]:='Support';\r\n If xdskontosaldo.RecordCount>0 then\r\n begin\r\n TC.Cells[1,i]:='Guthaben in Minuten: '+xdskontosaldoSRestguthaben.asstring+' | Gesamtbetrag erworben: '+FormatFloat('#,##0.00',xdskontosaldoBetrag.asfloat);\r\n end;\r\n inc(i);\r\n TC.Cells[0,i]:='Telefon';\r\n TC.Cells[1,i]:=''+xdsEinzelkontaktTelefonnummer.Asstring+'';\r\n inc(i);\r\n TC.Cells[0,i]:='T-Alternativ';\r\n TC.Cells[1,i]:=''+xdsEinzelkontaktTelefonAlternativ.Asstring+'';\r\n\r\n inc(i);\r\n TC.Cells[0,i]:='Mobil';\r\n TC.Cells[1,i]:=''+xdsEinzelkontaktMobiltelefon.Asstring+'';\r\n\r\n inc(i);\r\n TC.Cells[0,i]:='Email';\r\n TC.Cells[1,i]:=''+xdsEinzelkontaktEmail.AsString+'';\r\n inc(i);\r\n TC.Cells[0,i]:='Webseite';\r\n TC.Cells[1,i]:=''+xdsEinzelkontaktInternet.AsString+'';\r\n inc(i);\r\n TC.Cells[0,i]:='Kontaktgruppe';\r\n TC.Cells[1,i]:=xdsEinzelkontaktKontaktgruppe.Asstring;\r\n inc(i);\r\n TC.Cells[0,i]:='Kundenklasse';\r\n TC.Cells[1,i]:=xdsEinzelkontaktKundenklassetext.Asstring;\r\n inc(i);\r\n TC.Cells[0,i]:='Betreuer/MA';\r\n TC.Cells[1,i]:=xdsEinzelkontaktBetreuer.Asstring;\r\n inc(i);\r\n TC.Cells[0,i]:='Vertreter';\r\n TC.Cells[1,i]:=xdsEinzelkontaktVertreterMatchcode.Asstring;\r\n inc(i);\r\n TC.Cells[0,i]:='Erreichbarkeit';\r\n TC.Cells[1,i]:=xdsEinzelkontaktErreichbarkeit.Asstring;\r\n inc(i);\r\n TC.Cells[0,i]:='Entfernung/km';\r\n TC.Cells[1,i]:=xdsEinzelkontaktKilometer.AsString;\r\n inc(i);\r\n TC.Cells[0,i]:='Lieferanschrift';\r\n TC.Cells[1,i]:=ReplaceStr(xdsEinzelkontaktLieferanschrift.AsString,#13+#10,'
');\r\n inc(i);\r\n TC.Cells[0,i]:='USt-ID';\r\n TC.Cells[1,i]:=xdsEinzelkontaktUmsatzsteuerID.AsString;\r\n inc(i);\r\n TC.Cells[0,i]:='Erreichbarkeit';\r\n TC.Cells[1,i]:=xdsEinzelkontaktErreichbarkeit.AsString;\r\n inc(i);\r\n TC.Cells[0,i]:='Bemerkungen';\r\n TC.Cells[1,i]:=ReplaceStr(xdsEinzelkontaktBemerkungen.AsString,#13+#10,'
');\r\n end;\r\n\r\n\r\nprocedure TEinzelKontakt.LoadDFMValues;\r\nbegin\r\n inherited LoadDFMValues;\r\n\r\n TC := TTableControl.Create(Self);\r\n Container1 := THTMLContainer.Create(Self);\r\n Container2 := THTMLContainer.Create(Self);\r\n btnzurueck := TButton.Create(Self);\r\n btnBelege := TButton.Create(Self);\r\n btnKarte := TButton.Create(Self);\r\n btnPreise := TButton.Create(Self);\r\n Container3 := THTMLContainer.Create(Self);\r\n btnAnsprechpartner := TButton.Create(Self);\r\n btnDateien := TButton.Create(Self);\r\n btnTicketNeu := TButton.Create(Self);\r\n btnKontaktAendern := TButton.Create(Self);\r\n xdsEinzelkontakt := TXDataWebDataSet.Create(Self);\r\n xdsEinzelkontaktKundennummer := TStringField.Create(Self);\r\n xdsEinzelkontaktGruppeKunden := TBooleanField.Create(Self);\r\n xdsEinzelkontaktGruppeLieferanten := TBooleanField.Create(Self);\r\n xdsEinzelkontaktGruppeSonstige := TBooleanField.Create(Self);\r\n xdsEinzelkontaktGruppeNichtkunden := TBooleanField.Create(Self);\r\n xdsEinzelkontaktKontaktgruppe := TStringField.Create(Self);\r\n xdsEinzelkontaktNachname := TStringField.Create(Self);\r\n xdsEinzelkontaktVorname := TStringField.Create(Self);\r\n xdsEinzelkontaktAdresszeile2 := TStringField.Create(Self);\r\n xdsEinzelkontaktAdresszeile3 := TStringField.Create(Self);\r\n xdsEinzelkontaktStrasse := TStringField.Create(Self);\r\n xdsEinzelkontaktPostleitzahl := TStringField.Create(Self);\r\n xdsEinzelkontaktOrt := TStringField.Create(Self);\r\n xdsEinzelkontaktLaenderkuerzel := TStringField.Create(Self);\r\n xdsEinzelkontaktLand := TStringField.Create(Self);\r\n xdsEinzelkontaktLaenderkennzeichen := TBooleanField.Create(Self);\r\n xdsEinzelkontaktAdressanrede := TStringField.Create(Self);\r\n xdsEinzelkontaktBriefanrede1 := TStringField.Create(Self);\r\n xdsEinzelkontaktBriefanrede2 := TStringField.Create(Self);\r\n xdsEinzelkontaktAdresseBild := TStringField.Create(Self);\r\n xdsEinzelkontaktLieferanschrift := TStringField.Create(Self);\r\n xdsEinzelkontaktGeburtsdatum := TDateTimeField.Create(Self);\r\n xdsEinzelkontaktTelefonNummer := TStringField.Create(Self);\r\n xdsEinzelkontaktTelefaxNummer := TStringField.Create(Self);\r\n xdsEinzelkontaktMobilTelefon := TStringField.Create(Self);\r\n xdsEinzelkontaktEMail := TStringField.Create(Self);\r\n xdsEinzelkontaktInternet := TStringField.Create(Self);\r\n xdsEinzelkontaktUmsatzsteuerID := TStringField.Create(Self);\r\n xdsEinzelkontaktUmsatzsteuerausweis := TBooleanField.Create(Self);\r\n xdsEinzelkontaktBemerkungen := TStringField.Create(Self);\r\n xdsEinzelkontaktBranche := TStringField.Create(Self);\r\n xdsEinzelkontaktSelektiert1 := TBooleanField.Create(Self);\r\n xdsEinzelkontaktSelektiert2 := TBooleanField.Create(Self);\r\n xdsEinzelkontaktSelektiert3 := TBooleanField.Create(Self);\r\n xdsEinzelkontaktZahlungsbedingung := TIntegerField.Create(Self);\r\n xdsEinzelkontaktTransportbedingung := TStringField.Create(Self);\r\n xdsEinzelkontaktKilometer := TIntegerField.Create(Self);\r\n xdsEinzelkontaktRabattsatz := TFloatField.Create(Self);\r\n xdsEinzelkontaktStundensatz := TFloatField.Create(Self);\r\n xdsEinzelkontaktKontonummer := TStringField.Create(Self);\r\n xdsEinzelkontaktBank := TStringField.Create(Self);\r\n xdsEinzelkontaktBankleitzahl := TFloatField.Create(Self);\r\n xdsEinzelkontaktKontoinhaber := TStringField.Create(Self);\r\n xdsEinzelkontaktBetreuer := TStringField.Create(Self);\r\n xdsEinzelkontaktQuelle := TStringField.Create(Self);\r\n xdsEinzelkontaktSuchmerkmal := TStringField.Create(Self);\r\n xdsEinzelkontaktWarenkreditlimit := TFloatField.Create(Self);\r\n xdsEinzelkontaktWarenkreditgesperrt := TBooleanField.Create(Self);\r\n xdsEinzelkontaktKundennummerFremd := TStringField.Create(Self);\r\n xdsEinzelkontaktKeinNewsletter := TBooleanField.Create(Self);\r\n xdsEinzelkontaktDebitorennummer := TStringField.Create(Self);\r\n xdsEinzelkontaktKreditorennummer := TStringField.Create(Self);\r\n xdsEinzelkontaktTelefonAlternativ := TStringField.Create(Self);\r\n xdsEinzelkontaktKostentraeger := TStringField.Create(Self);\r\n xdsEinzelkontaktIBAN := TStringField.Create(Self);\r\n xdsEinzelkontaktBIC := TStringField.Create(Self);\r\n xdsEinzelkontaktEmailkonto := TStringField.Create(Self);\r\n xdsEinzelkontaktBenutzername := TStringField.Create(Self);\r\n xdsEinzelkontaktPasswort := TStringField.Create(Self);\r\n xdsEinzelkontaktExportOutlook := TBooleanField.Create(Self);\r\n xdsEinzelkontaktNichtInListeAnzeigen := TBooleanField.Create(Self);\r\n xdsEinzelkontaktKreditkarteArt := TStringField.Create(Self);\r\n xdsEinzelkontaktKreditkarteInhaber := TStringField.Create(Self);\r\n xdsEinzelkontaktKreditkarteNummer := TStringField.Create(Self);\r\n xdsEinzelkontaktKreditkarteGueltigMonat := TStringField.Create(Self);\r\n xdsEinzelkontaktKreditkarteGueltigJahr := TIntegerField.Create(Self);\r\n xdsEinzelkontaktKreditkartePruefziffer := TStringField.Create(Self);\r\n xdsEinzelkontaktDatumNeu := TDateTimeField.Create(Self);\r\n xdsEinzelkontaktDatumgeaendert := TDateTimeField.Create(Self);\r\n xdsEinzelkontaktTitel := TStringField.Create(Self);\r\n xdsEinzelkontaktStundensatzMontage := TFloatField.Create(Self);\r\n xdsEinzelkontaktStdMontageU25 := TFloatField.Create(Self);\r\n xdsEinzelkontaktStdMontageU50 := TFloatField.Create(Self);\r\n xdsEinzelkontaktStdMontageU70 := TFloatField.Create(Self);\r\n xdsEinzelkontaktStdMontageU100 := TFloatField.Create(Self);\r\n xdsEinzelkontaktStdMontageU150 := TFloatField.Create(Self);\r\n xdsEinzelkontaktStundensatzWerkstatt := TFloatField.Create(Self);\r\n xdsEinzelkontaktStdWerkstattU25 := TFloatField.Create(Self);\r\n xdsEinzelkontaktStdWerkstattU50 := TFloatField.Create(Self);\r\n xdsEinzelkontaktStdWerkstattU70 := TFloatField.Create(Self);\r\n xdsEinzelkontaktStdWerkstattU100 := TFloatField.Create(Self);\r\n xdsEinzelkontaktStdWerkstattU150 := TFloatField.Create(Self);\r\n xdsEinzelkontaktArchivReferenz := TStringField.Create(Self);\r\n xdsEinzelkontaktErloesKontoUST1 := TStringField.Create(Self);\r\n xdsEinzelkontaktErloesKontoUST2 := TStringField.Create(Self);\r\n xdsEinzelkontaktErloesKontoUST3 := TStringField.Create(Self);\r\n xdsEinzelkontaktGebKal := TBooleanField.Create(Self);\r\n xdsEinzelkontaktEmailversand := TBooleanField.Create(Self);\r\n xdsEinzelkontaktMahnspesen := TBooleanField.Create(Self);\r\n xdsEinzelkontaktRechnungSchluss := TStringField.Create(Self);\r\n xdsEinzelkontaktBenutzerNeu := TStringField.Create(Self);\r\n xdsEinzelkontaktBenutzerGeaendert := TStringField.Create(Self);\r\n xdsEinzelkontaktBelegsprache := TStringField.Create(Self);\r\n xdsEinzelkontaktkmSatz := TFloatField.Create(Self);\r\n xdsEinzelkontaktKundenklassetext := TStringField.Create(Self);\r\n xdsEinzelkontaktKundenklasseFarbe := TIntegerField.Create(Self);\r\n xdsEinzelkontaktAbweichenderRechnungsEmpfaenger := TStringField.Create(Self);\r\n xdsEinzelkontaktProtokoll := TStringField.Create(Self);\r\n xdsEinzelkontaktILNTyp1 := TStringField.Create(Self);\r\n xdsEinzelkontaktILNTyp2 := TStringField.Create(Self);\r\n xdsEinzelkontaktKontaktGUID := TStringField.Create(Self);\r\n xdsEinzelkontaktPLZGUID := TStringField.Create(Self);\r\n xdsEinzelkontaktPreislistenVariantePakete := TStringField.Create(Self);\r\n xdsEinzelkontaktSchluesselRechnungslauf := TStringField.Create(Self);\r\n xdsEinzelkontaktRechnungEmail := TStringField.Create(Self);\r\n xdsEinzelkontaktZahlungsbedingungEK := TIntegerField.Create(Self);\r\n xdsEinzelkontaktTransportbedingungEK := TStringField.Create(Self);\r\n xdsEinzelkontaktRabattsatzEK := TFloatField.Create(Self);\r\n xdsEinzelkontaktVertreterMatchcode := TStringField.Create(Self);\r\n xdsEinzelkontaktVertreterProvisionssatz := TFloatField.Create(Self);\r\n xdsEinzelkontaktUmsatzVKJahr := TFloatField.Create(Self);\r\n xdsEinzelkontaktUmsatzVKVorjahr := TFloatField.Create(Self);\r\n xdsEinzelkontaktUmsatzEKJahr := TFloatField.Create(Self);\r\n xdsEinzelkontaktUmsatzEKVorjahr := TFloatField.Create(Self);\r\n xdsEinzelkontaktSteuernummer := TStringField.Create(Self);\r\n xdsEinzelkontaktLoginPW := TStringField.Create(Self);\r\n xdsEinzelkontaktREperFax := TBooleanField.Create(Self);\r\n xdsEinzelkontaktErreichbarkeit := TStringField.Create(Self);\r\n xdsEinzelkontaktErloesKontoUST4 := TStringField.Create(Self);\r\n xdsEinzelkontaktErloesKontoUST5 := TStringField.Create(Self);\r\n xdsEinzelkontaktErloesKontoUST6 := TStringField.Create(Self);\r\n xdsEinzelkontaktBesteuerungKey := TIntegerField.Create(Self);\r\n xdsEinzelkontaktAuftraegeJahr := TFloatField.Create(Self);\r\n xdsEinzelkontaktAuftraegeVorjahr := TFloatField.Create(Self);\r\n xdsEinzelkontaktLieferadresseID := TIntegerField.Create(Self);\r\n xdsEinzelkontaktUSTIDgeprueft := TDateTimeField.Create(Self);\r\n xdsEinzelkontaktKontaktverbund := TStringField.Create(Self);\r\n xdsEinzelkontaktHinweis := TStringField.Create(Self);\r\n xdsEinzelkontaktLatitude := TFloatField.Create(Self);\r\n xdsEinzelkontaktLongitude := TFloatField.Create(Self);\r\n xdsEinzelkontaktkmLuftlinie := TFloatField.Create(Self);\r\n xdsEinzelkontaktGoogleID := TStringField.Create(Self);\r\n xdsEinzelkontaktGoogleUpdatedUTC := TDateTimeField.Create(Self);\r\n xdsEinzelkontaktBundesland := TStringField.Create(Self);\r\n xdsEinzelkontaktRegion := TStringField.Create(Self);\r\n xdsEinzelkontaktMandatsreferenz := TStringField.Create(Self);\r\n xdsEinzelkontaktMandatsreferenzVom := TDateTimeField.Create(Self);\r\n xdsEinzelkontaktLastschriftArt := TStringField.Create(Self);\r\n xdsEinzelkontaktMahnsperre := TBooleanField.Create(Self);\r\n xdsEinzelkontaktSuchbegriff := TStringField.Create(Self);\r\n xdsEinzelkontaktLieferanschriftDaten := TStringField.Create(Self);\r\n xdsEinzelkontaktExportKasse := TBooleanField.Create(Self);\r\n xdsEinzelkontaktLoeschvormerkungDatum := TDateTimeField.Create(Self);\r\n xdsEinzelkontaktLoeschvormerkungGrund := TStringField.Create(Self);\r\n xdsEinzelkontaktPseudonymisiert := TStringField.Create(Self);\r\n xdsEinzelkontaktLoginAktiv := TIntegerField.Create(Self);\r\n xdsEinzelkontaktSonstigeDaten := TStringField.Create(Self);\r\n xdsEinzelkontaktB2C := TBooleanField.Create(Self);\r\n xdsEinzelkontaktTIN := TStringField.Create(Self);\r\n xdsEinzelkontaktMindestbestellwert := TFloatField.Create(Self);\r\n sourceEinzelkontakt := TDataSource.Create(Self);\r\n WClient := TXDataWebClient.Create(Self);\r\n xdskontosaldo := TXDataWebDataSet.Create(Self);\r\n xdskontosaldoKundennummer := TStringField.Create(Self);\r\n xdskontosaldoZeitaufwand := TIntegerField.Create(Self);\r\n xdskontosaldoAbzurechnen := TIntegerField.Create(Self);\r\n xdskontosaldoGutschrift := TIntegerField.Create(Self);\r\n xdskontosaldoAbzug := TIntegerField.Create(Self);\r\n xdskontosaldoSaldo := TIntegerField.Create(Self);\r\n xdskontosaldoBetrag := TFloatField.Create(Self);\r\n xdskontosaldoMinutenpreis := TFloatField.Create(Self);\r\n xdskontosaldoSRestguthaben := TIntegerField.Create(Self);\r\n\r\n TC.BeforeLoadDFMValues;\r\n Container1.BeforeLoadDFMValues;\r\n Container2.BeforeLoadDFMValues;\r\n btnzurueck.BeforeLoadDFMValues;\r\n btnBelege.BeforeLoadDFMValues;\r\n btnKarte.BeforeLoadDFMValues;\r\n btnPreise.BeforeLoadDFMValues;\r\n Container3.BeforeLoadDFMValues;\r\n btnAnsprechpartner.BeforeLoadDFMValues;\r\n btnDateien.BeforeLoadDFMValues;\r\n btnTicketNeu.BeforeLoadDFMValues;\r\n btnKontaktAendern.BeforeLoadDFMValues;\r\n xdsEinzelkontakt.BeforeLoadDFMValues;\r\n xdsEinzelkontaktKundennummer.BeforeLoadDFMValues;\r\n xdsEinzelkontaktGruppeKunden.BeforeLoadDFMValues;\r\n xdsEinzelkontaktGruppeLieferanten.BeforeLoadDFMValues;\r\n xdsEinzelkontaktGruppeSonstige.BeforeLoadDFMValues;\r\n xdsEinzelkontaktGruppeNichtkunden.BeforeLoadDFMValues;\r\n xdsEinzelkontaktKontaktgruppe.BeforeLoadDFMValues;\r\n xdsEinzelkontaktNachname.BeforeLoadDFMValues;\r\n xdsEinzelkontaktVorname.BeforeLoadDFMValues;\r\n xdsEinzelkontaktAdresszeile2.BeforeLoadDFMValues;\r\n xdsEinzelkontaktAdresszeile3.BeforeLoadDFMValues;\r\n xdsEinzelkontaktStrasse.BeforeLoadDFMValues;\r\n xdsEinzelkontaktPostleitzahl.BeforeLoadDFMValues;\r\n xdsEinzelkontaktOrt.BeforeLoadDFMValues;\r\n xdsEinzelkontaktLaenderkuerzel.BeforeLoadDFMValues;\r\n xdsEinzelkontaktLand.BeforeLoadDFMValues;\r\n xdsEinzelkontaktLaenderkennzeichen.BeforeLoadDFMValues;\r\n xdsEinzelkontaktAdressanrede.BeforeLoadDFMValues;\r\n xdsEinzelkontaktBriefanrede1.BeforeLoadDFMValues;\r\n xdsEinzelkontaktBriefanrede2.BeforeLoadDFMValues;\r\n xdsEinzelkontaktAdresseBild.BeforeLoadDFMValues;\r\n xdsEinzelkontaktLieferanschrift.BeforeLoadDFMValues;\r\n xdsEinzelkontaktGeburtsdatum.BeforeLoadDFMValues;\r\n xdsEinzelkontaktTelefonNummer.BeforeLoadDFMValues;\r\n xdsEinzelkontaktTelefaxNummer.BeforeLoadDFMValues;\r\n xdsEinzelkontaktMobilTelefon.BeforeLoadDFMValues;\r\n xdsEinzelkontaktEMail.BeforeLoadDFMValues;\r\n xdsEinzelkontaktInternet.BeforeLoadDFMValues;\r\n xdsEinzelkontaktUmsatzsteuerID.BeforeLoadDFMValues;\r\n xdsEinzelkontaktUmsatzsteuerausweis.BeforeLoadDFMValues;\r\n xdsEinzelkontaktBemerkungen.BeforeLoadDFMValues;\r\n xdsEinzelkontaktBranche.BeforeLoadDFMValues;\r\n xdsEinzelkontaktSelektiert1.BeforeLoadDFMValues;\r\n xdsEinzelkontaktSelektiert2.BeforeLoadDFMValues;\r\n xdsEinzelkontaktSelektiert3.BeforeLoadDFMValues;\r\n xdsEinzelkontaktZahlungsbedingung.BeforeLoadDFMValues;\r\n xdsEinzelkontaktTransportbedingung.BeforeLoadDFMValues;\r\n xdsEinzelkontaktKilometer.BeforeLoadDFMValues;\r\n xdsEinzelkontaktRabattsatz.BeforeLoadDFMValues;\r\n xdsEinzelkontaktStundensatz.BeforeLoadDFMValues;\r\n xdsEinzelkontaktKontonummer.BeforeLoadDFMValues;\r\n xdsEinzelkontaktBank.BeforeLoadDFMValues;\r\n xdsEinzelkontaktBankleitzahl.BeforeLoadDFMValues;\r\n xdsEinzelkontaktKontoinhaber.BeforeLoadDFMValues;\r\n xdsEinzelkontaktBetreuer.BeforeLoadDFMValues;\r\n xdsEinzelkontaktQuelle.BeforeLoadDFMValues;\r\n xdsEinzelkontaktSuchmerkmal.BeforeLoadDFMValues;\r\n xdsEinzelkontaktWarenkreditlimit.BeforeLoadDFMValues;\r\n xdsEinzelkontaktWarenkreditgesperrt.BeforeLoadDFMValues;\r\n xdsEinzelkontaktKundennummerFremd.BeforeLoadDFMValues;\r\n xdsEinzelkontaktKeinNewsletter.BeforeLoadDFMValues;\r\n xdsEinzelkontaktDebitorennummer.BeforeLoadDFMValues;\r\n xdsEinzelkontaktKreditorennummer.BeforeLoadDFMValues;\r\n xdsEinzelkontaktTelefonAlternativ.BeforeLoadDFMValues;\r\n xdsEinzelkontaktKostentraeger.BeforeLoadDFMValues;\r\n xdsEinzelkontaktIBAN.BeforeLoadDFMValues;\r\n xdsEinzelkontaktBIC.BeforeLoadDFMValues;\r\n xdsEinzelkontaktEmailkonto.BeforeLoadDFMValues;\r\n xdsEinzelkontaktBenutzername.BeforeLoadDFMValues;\r\n xdsEinzelkontaktPasswort.BeforeLoadDFMValues;\r\n xdsEinzelkontaktExportOutlook.BeforeLoadDFMValues;\r\n xdsEinzelkontaktNichtInListeAnzeigen.BeforeLoadDFMValues;\r\n xdsEinzelkontaktKreditkarteArt.BeforeLoadDFMValues;\r\n xdsEinzelkontaktKreditkarteInhaber.BeforeLoadDFMValues;\r\n xdsEinzelkontaktKreditkarteNummer.BeforeLoadDFMValues;\r\n xdsEinzelkontaktKreditkarteGueltigMonat.BeforeLoadDFMValues;\r\n xdsEinzelkontaktKreditkarteGueltigJahr.BeforeLoadDFMValues;\r\n xdsEinzelkontaktKreditkartePruefziffer.BeforeLoadDFMValues;\r\n xdsEinzelkontaktDatumNeu.BeforeLoadDFMValues;\r\n xdsEinzelkontaktDatumgeaendert.BeforeLoadDFMValues;\r\n xdsEinzelkontaktTitel.BeforeLoadDFMValues;\r\n xdsEinzelkontaktStundensatzMontage.BeforeLoadDFMValues;\r\n xdsEinzelkontaktStdMontageU25.BeforeLoadDFMValues;\r\n xdsEinzelkontaktStdMontageU50.BeforeLoadDFMValues;\r\n xdsEinzelkontaktStdMontageU70.BeforeLoadDFMValues;\r\n xdsEinzelkontaktStdMontageU100.BeforeLoadDFMValues;\r\n xdsEinzelkontaktStdMontageU150.BeforeLoadDFMValues;\r\n xdsEinzelkontaktStundensatzWerkstatt.BeforeLoadDFMValues;\r\n xdsEinzelkontaktStdWerkstattU25.BeforeLoadDFMValues;\r\n xdsEinzelkontaktStdWerkstattU50.BeforeLoadDFMValues;\r\n xdsEinzelkontaktStdWerkstattU70.BeforeLoadDFMValues;\r\n xdsEinzelkontaktStdWerkstattU100.BeforeLoadDFMValues;\r\n xdsEinzelkontaktStdWerkstattU150.BeforeLoadDFMValues;\r\n xdsEinzelkontaktArchivReferenz.BeforeLoadDFMValues;\r\n xdsEinzelkontaktErloesKontoUST1.BeforeLoadDFMValues;\r\n xdsEinzelkontaktErloesKontoUST2.BeforeLoadDFMValues;\r\n xdsEinzelkontaktErloesKontoUST3.BeforeLoadDFMValues;\r\n xdsEinzelkontaktGebKal.BeforeLoadDFMValues;\r\n xdsEinzelkontaktEmailversand.BeforeLoadDFMValues;\r\n xdsEinzelkontaktMahnspesen.BeforeLoadDFMValues;\r\n xdsEinzelkontaktRechnungSchluss.BeforeLoadDFMValues;\r\n xdsEinzelkontaktBenutzerNeu.BeforeLoadDFMValues;\r\n xdsEinzelkontaktBenutzerGeaendert.BeforeLoadDFMValues;\r\n xdsEinzelkontaktBelegsprache.BeforeLoadDFMValues;\r\n xdsEinzelkontaktkmSatz.BeforeLoadDFMValues;\r\n xdsEinzelkontaktKundenklassetext.BeforeLoadDFMValues;\r\n xdsEinzelkontaktKundenklasseFarbe.BeforeLoadDFMValues;\r\n xdsEinzelkontaktAbweichenderRechnungsEmpfaenger.BeforeLoadDFMValues;\r\n xdsEinzelkontaktProtokoll.BeforeLoadDFMValues;\r\n xdsEinzelkontaktILNTyp1.BeforeLoadDFMValues;\r\n xdsEinzelkontaktILNTyp2.BeforeLoadDFMValues;\r\n xdsEinzelkontaktKontaktGUID.BeforeLoadDFMValues;\r\n xdsEinzelkontaktPLZGUID.BeforeLoadDFMValues;\r\n xdsEinzelkontaktPreislistenVariantePakete.BeforeLoadDFMValues;\r\n xdsEinzelkontaktSchluesselRechnungslauf.BeforeLoadDFMValues;\r\n xdsEinzelkontaktRechnungEmail.BeforeLoadDFMValues;\r\n xdsEinzelkontaktZahlungsbedingungEK.BeforeLoadDFMValues;\r\n xdsEinzelkontaktTransportbedingungEK.BeforeLoadDFMValues;\r\n xdsEinzelkontaktRabattsatzEK.BeforeLoadDFMValues;\r\n xdsEinzelkontaktVertreterMatchcode.BeforeLoadDFMValues;\r\n xdsEinzelkontaktVertreterProvisionssatz.BeforeLoadDFMValues;\r\n xdsEinzelkontaktUmsatzVKJahr.BeforeLoadDFMValues;\r\n xdsEinzelkontaktUmsatzVKVorjahr.BeforeLoadDFMValues;\r\n xdsEinzelkontaktUmsatzEKJahr.BeforeLoadDFMValues;\r\n xdsEinzelkontaktUmsatzEKVorjahr.BeforeLoadDFMValues;\r\n xdsEinzelkontaktSteuernummer.BeforeLoadDFMValues;\r\n xdsEinzelkontaktLoginPW.BeforeLoadDFMValues;\r\n xdsEinzelkontaktREperFax.BeforeLoadDFMValues;\r\n xdsEinzelkontaktErreichbarkeit.BeforeLoadDFMValues;\r\n xdsEinzelkontaktErloesKontoUST4.BeforeLoadDFMValues;\r\n xdsEinzelkontaktErloesKontoUST5.BeforeLoadDFMValues;\r\n xdsEinzelkontaktErloesKontoUST6.BeforeLoadDFMValues;\r\n xdsEinzelkontaktBesteuerungKey.BeforeLoadDFMValues;\r\n xdsEinzelkontaktAuftraegeJahr.BeforeLoadDFMValues;\r\n xdsEinzelkontaktAuftraegeVorjahr.BeforeLoadDFMValues;\r\n xdsEinzelkontaktLieferadresseID.BeforeLoadDFMValues;\r\n xdsEinzelkontaktUSTIDgeprueft.BeforeLoadDFMValues;\r\n xdsEinzelkontaktKontaktverbund.BeforeLoadDFMValues;\r\n xdsEinzelkontaktHinweis.BeforeLoadDFMValues;\r\n xdsEinzelkontaktLatitude.BeforeLoadDFMValues;\r\n xdsEinzelkontaktLongitude.BeforeLoadDFMValues;\r\n xdsEinzelkontaktkmLuftlinie.BeforeLoadDFMValues;\r\n xdsEinzelkontaktGoogleID.BeforeLoadDFMValues;\r\n xdsEinzelkontaktGoogleUpdatedUTC.BeforeLoadDFMValues;\r\n xdsEinzelkontaktBundesland.BeforeLoadDFMValues;\r\n xdsEinzelkontaktRegion.BeforeLoadDFMValues;\r\n xdsEinzelkontaktMandatsreferenz.BeforeLoadDFMValues;\r\n xdsEinzelkontaktMandatsreferenzVom.BeforeLoadDFMValues;\r\n xdsEinzelkontaktLastschriftArt.BeforeLoadDFMValues;\r\n xdsEinzelkontaktMahnsperre.BeforeLoadDFMValues;\r\n xdsEinzelkontaktSuchbegriff.BeforeLoadDFMValues;\r\n xdsEinzelkontaktLieferanschriftDaten.BeforeLoadDFMValues;\r\n xdsEinzelkontaktExportKasse.BeforeLoadDFMValues;\r\n xdsEinzelkontaktLoeschvormerkungDatum.BeforeLoadDFMValues;\r\n xdsEinzelkontaktLoeschvormerkungGrund.BeforeLoadDFMValues;\r\n xdsEinzelkontaktPseudonymisiert.BeforeLoadDFMValues;\r\n xdsEinzelkontaktLoginAktiv.BeforeLoadDFMValues;\r\n xdsEinzelkontaktSonstigeDaten.BeforeLoadDFMValues;\r\n xdsEinzelkontaktB2C.BeforeLoadDFMValues;\r\n xdsEinzelkontaktTIN.BeforeLoadDFMValues;\r\n xdsEinzelkontaktMindestbestellwert.BeforeLoadDFMValues;\r\n sourceEinzelkontakt.BeforeLoadDFMValues;\r\n WClient.BeforeLoadDFMValues;\r\n xdskontosaldo.BeforeLoadDFMValues;\r\n xdskontosaldoKundennummer.BeforeLoadDFMValues;\r\n xdskontosaldoZeitaufwand.BeforeLoadDFMValues;\r\n xdskontosaldoAbzurechnen.BeforeLoadDFMValues;\r\n xdskontosaldoGutschrift.BeforeLoadDFMValues;\r\n xdskontosaldoAbzug.BeforeLoadDFMValues;\r\n xdskontosaldoSaldo.BeforeLoadDFMValues;\r\n xdskontosaldoBetrag.BeforeLoadDFMValues;\r\n xdskontosaldoMinutenpreis.BeforeLoadDFMValues;\r\n xdskontosaldoSRestguthaben.BeforeLoadDFMValues;\r\n try\r\n Name := 'EinzelKontakt';\r\n Width := 255;\r\n Height := 416;\r\n CSSLibrary := cssBootstrap;\r\n ElementFont := efCSS;\r\n SetEvent(Self, 'OnShow', 'WebFormShow');\r\n TC.SetParentComponent(Self);\r\n TC.Name := 'TC';\r\n TC.Left := 32;\r\n TC.Top := 251;\r\n TC.Width := 152;\r\n TC.Height := 110;\r\n TC.ElementClassName := 'table table-hover table-bordered table-striped';\r\n TC.HeightStyle := ssAuto;\r\n TC.WidthStyle := ssPercent;\r\n TC.BorderColor := clSilver;\r\n TC.ColHeader := False;\r\n TC.ElementFont := efCSS;\r\n TC.ElementHeaderClassName := 'table-info';\r\n TC.ElementPosition := epIgnore;\r\n TC.ElementTableClassName := 'table table-hover table-bordered table-striped';\r\n TC.WordWrap := True;\r\n TC.ColCount := 2;\r\n Container1.SetParentComponent(Self);\r\n Container1.Name := 'Container1';\r\n Container1.Left := 0;\r\n Container1.Top := 0;\r\n Container1.Width := 169;\r\n Container1.Height := 41;\r\n Container1.HeightStyle := ssAuto;\r\n Container1.WidthStyle := ssPercent;\r\n Container1.ChildOrder := 4;\r\n Container1.ElementFont := efCSS;\r\n Container1.ElementPosition := epIgnore;\r\n Container2.SetParentComponent(Self);\r\n Container2.Name := 'Container2';\r\n Container2.Left := 0;\r\n Container2.Top := 47;\r\n Container2.Width := 169;\r\n Container2.Height := 41;\r\n Container2.ElementClassName := 'd-flex flex-wrap m-1';\r\n Container2.HeightStyle := ssAuto;\r\n Container2.WidthStyle := ssAuto;\r\n Container2.ChildOrder := 1;\r\n Container2.ElementFont := efCSS;\r\n Container2.ElementPosition := epIgnore;\r\n btnzurueck.SetParentComponent(Self);\r\n btnzurueck.Name := 'btnzurueck';\r\n btnzurueck.Left := 0;\r\n btnzurueck.Top := 158;\r\n btnzurueck.Width := 96;\r\n btnzurueck.Height := 25;\r\n btnzurueck.Caption := '<< zur'#252'ck';\r\n btnzurueck.ChildOrder := 4;\r\n btnzurueck.ElementClassName := 'btn btn-info btn-sm m-1 text-left';\r\n btnzurueck.ElementFont := efCSS;\r\n btnzurueck.ElementPosition := epIgnore;\r\n btnzurueck.HeightStyle := ssAuto;\r\n btnzurueck.HeightPercent := 100.000000000000000000;\r\n btnzurueck.WidthStyle := ssAuto;\r\n btnzurueck.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnzurueck, Self, 'OnClick', 'btnzurueckClick');\r\n btnBelege.SetParentComponent(Self);\r\n btnBelege.Name := 'btnBelege';\r\n btnBelege.Left := 0;\r\n btnBelege.Top := 189;\r\n btnBelege.Width := 96;\r\n btnBelege.Height := 25;\r\n btnBelege.Caption := 'Belege';\r\n btnBelege.ChildOrder := 4;\r\n btnBelege.ElementClassName := 'btn btn-info btn-sm m-1 text-left';\r\n btnBelege.ElementFont := efCSS;\r\n btnBelege.ElementPosition := epIgnore;\r\n btnBelege.HeightStyle := ssAuto;\r\n btnBelege.HeightPercent := 100.000000000000000000;\r\n btnBelege.WidthStyle := ssAuto;\r\n btnBelege.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnBelege, Self, 'OnClick', 'btnBelegeClick');\r\n btnKarte.SetParentComponent(Self);\r\n btnKarte.Name := 'btnKarte';\r\n btnKarte.Left := 102;\r\n btnKarte.Top := 189;\r\n btnKarte.Width := 96;\r\n btnKarte.Height := 25;\r\n btnKarte.Caption := 'Karte';\r\n btnKarte.ChildOrder := 4;\r\n btnKarte.ElementClassName := 'btn btn-info btn-sm m-1 text-left';\r\n btnKarte.ElementFont := efCSS;\r\n btnKarte.ElementPosition := epIgnore;\r\n btnKarte.HeightStyle := ssAuto;\r\n btnKarte.HeightPercent := 100.000000000000000000;\r\n btnKarte.WidthStyle := ssAuto;\r\n btnKarte.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnKarte, Self, 'OnClick', 'btnKarteClick');\r\n btnPreise.SetParentComponent(Self);\r\n btnPreise.Name := 'btnPreise';\r\n btnPreise.Left := 0;\r\n btnPreise.Top := 220;\r\n btnPreise.Width := 96;\r\n btnPreise.Height := 25;\r\n btnPreise.Caption := 'Preise';\r\n btnPreise.ChildOrder := 4;\r\n btnPreise.ElementClassName := 'btn btn-info btn-sm m-1 text-left';\r\n btnPreise.ElementFont := efCSS;\r\n btnPreise.ElementPosition := epIgnore;\r\n btnPreise.HeightStyle := ssAuto;\r\n btnPreise.HeightPercent := 100.000000000000000000;\r\n btnPreise.WidthStyle := ssAuto;\r\n btnPreise.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnPreise, Self, 'OnClick', 'btnPreiseClick');\r\n Container3.SetParentComponent(Self);\r\n Container3.Name := 'Container3';\r\n Container3.Left := 0;\r\n Container3.Top := 94;\r\n Container3.Width := 169;\r\n Container3.Height := 41;\r\n Container3.ElementClassName := 'd-flex flex-wrap m-1';\r\n Container3.HeightStyle := ssAuto;\r\n Container3.WidthStyle := ssAuto;\r\n Container3.ChildOrder := 1;\r\n Container3.ElementFont := efCSS;\r\n Container3.ElementPosition := epIgnore;\r\n btnAnsprechpartner.SetParentComponent(Self);\r\n btnAnsprechpartner.Name := 'btnAnsprechpartner';\r\n btnAnsprechpartner.Left := 102;\r\n btnAnsprechpartner.Top := 220;\r\n btnAnsprechpartner.Width := 96;\r\n btnAnsprechpartner.Height := 25;\r\n btnAnsprechpartner.Caption := 'Ansprechpartner';\r\n btnAnsprechpartner.ChildOrder := 4;\r\n btnAnsprechpartner.ElementClassName := 'btn btn-info btn-sm m-1 text-left';\r\n btnAnsprechpartner.ElementFont := efCSS;\r\n btnAnsprechpartner.ElementPosition := epIgnore;\r\n btnAnsprechpartner.HeightStyle := ssAuto;\r\n btnAnsprechpartner.HeightPercent := 100.000000000000000000;\r\n btnAnsprechpartner.WidthStyle := ssAuto;\r\n btnAnsprechpartner.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnAnsprechpartner, Self, 'OnClick', 'btnAnsprechpartnerClick');\r\n btnDateien.SetParentComponent(Self);\r\n btnDateien.Name := 'btnDateien';\r\n btnDateien.Left := 173;\r\n btnDateien.Top := 368;\r\n btnDateien.Width := 50;\r\n btnDateien.Height := 25;\r\n btnDateien.Caption := 'Dateien';\r\n btnDateien.ChildOrder := 4;\r\n btnDateien.ElementClassName := 'btn btn-info btn-sm m-1 text-left';\r\n btnDateien.ElementFont := efCSS;\r\n btnDateien.ElementPosition := epIgnore;\r\n btnDateien.HeightStyle := ssAuto;\r\n btnDateien.HeightPercent := 100.000000000000000000;\r\n btnDateien.WidthStyle := ssAuto;\r\n btnDateien.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnDateien, Self, 'OnClick', 'btnDateienClick');\r\n btnTicketNeu.SetParentComponent(Self);\r\n btnTicketNeu.Name := 'btnTicketNeu';\r\n btnTicketNeu.Left := 127;\r\n btnTicketNeu.Top := 383;\r\n btnTicketNeu.Width := 96;\r\n btnTicketNeu.Height := 25;\r\n btnTicketNeu.Caption := 'Neues Ticket';\r\n btnTicketNeu.ChildOrder := 4;\r\n btnTicketNeu.ElementClassName := 'btn btn-info btn-sm m-1 text-left';\r\n btnTicketNeu.ElementFont := efCSS;\r\n btnTicketNeu.ElementPosition := epIgnore;\r\n btnTicketNeu.HeightStyle := ssAuto;\r\n btnTicketNeu.HeightPercent := 100.000000000000000000;\r\n btnTicketNeu.WidthStyle := ssAuto;\r\n btnTicketNeu.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnTicketNeu, Self, 'OnClick', 'btnTicketNeuClick');\r\n btnKontaktAendern.SetParentComponent(Self);\r\n btnKontaktAendern.Name := 'btnKontaktAendern';\r\n btnKontaktAendern.Left := 102;\r\n btnKontaktAendern.Top := 158;\r\n btnKontaktAendern.Width := 96;\r\n btnKontaktAendern.Height := 25;\r\n btnKontaktAendern.Caption := #228'ndern';\r\n btnKontaktAendern.ChildOrder := 4;\r\n btnKontaktAendern.ElementClassName := 'btn btn-info btn-sm m-1 text-left';\r\n btnKontaktAendern.ElementFont := efCSS;\r\n btnKontaktAendern.ElementPosition := epIgnore;\r\n btnKontaktAendern.HeightStyle := ssAuto;\r\n btnKontaktAendern.HeightPercent := 100.000000000000000000;\r\n btnKontaktAendern.WidthStyle := ssAuto;\r\n btnKontaktAendern.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnKontaktAendern, Self, 'OnClick', 'btnKontaktAendernClick');\r\n xdsEinzelkontakt.SetParentComponent(Self);\r\n xdsEinzelkontakt.Name := 'xdsEinzelkontakt';\r\n xdsEinzelkontakt.AfterOpen := xdsEinzelkontaktAfterOpen;\r\n xdsEinzelkontakt.EntitySetName := 'Adressen';\r\n xdsEinzelkontakt.Connection := DM2.XDataWebConnection1;\r\n xdsEinzelkontakt.QueryTop := 1;\r\n xdsEinzelkontakt.Left := 116;\r\n xdsEinzelkontakt.Top := 109;\r\n xdsEinzelkontaktKundennummer.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktKundennummer.Name := 'xdsEinzelkontaktKundennummer';\r\n xdsEinzelkontaktKundennummer.FieldName := 'Kundennummer';\r\n xdsEinzelkontaktKundennummer.Required := True;\r\n xdsEinzelkontaktKundennummer.Size := 13;\r\n xdsEinzelkontaktGruppeKunden.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktGruppeKunden.Name := 'xdsEinzelkontaktGruppeKunden';\r\n xdsEinzelkontaktGruppeKunden.FieldName := 'GruppeKunden';\r\n xdsEinzelkontaktGruppeLieferanten.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktGruppeLieferanten.Name := 'xdsEinzelkontaktGruppeLieferanten';\r\n xdsEinzelkontaktGruppeLieferanten.FieldName := 'GruppeLieferanten';\r\n xdsEinzelkontaktGruppeSonstige.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktGruppeSonstige.Name := 'xdsEinzelkontaktGruppeSonstige';\r\n xdsEinzelkontaktGruppeSonstige.FieldName := 'GruppeSonstige';\r\n xdsEinzelkontaktGruppeNichtkunden.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktGruppeNichtkunden.Name := 'xdsEinzelkontaktGruppeNichtkunden';\r\n xdsEinzelkontaktGruppeNichtkunden.FieldName := 'GruppeNichtkunden';\r\n xdsEinzelkontaktKontaktgruppe.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktKontaktgruppe.Name := 'xdsEinzelkontaktKontaktgruppe';\r\n xdsEinzelkontaktKontaktgruppe.FieldName := 'Kontaktgruppe';\r\n xdsEinzelkontaktKontaktgruppe.Size := 50;\r\n xdsEinzelkontaktNachname.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktNachname.Name := 'xdsEinzelkontaktNachname';\r\n xdsEinzelkontaktNachname.FieldName := 'Nachname';\r\n xdsEinzelkontaktNachname.Size := 40;\r\n xdsEinzelkontaktVorname.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktVorname.Name := 'xdsEinzelkontaktVorname';\r\n xdsEinzelkontaktVorname.FieldName := 'Vorname';\r\n xdsEinzelkontaktVorname.Size := 40;\r\n xdsEinzelkontaktAdresszeile2.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktAdresszeile2.Name := 'xdsEinzelkontaktAdresszeile2';\r\n xdsEinzelkontaktAdresszeile2.FieldName := 'Adresszeile2';\r\n xdsEinzelkontaktAdresszeile2.Size := 40;\r\n xdsEinzelkontaktAdresszeile3.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktAdresszeile3.Name := 'xdsEinzelkontaktAdresszeile3';\r\n xdsEinzelkontaktAdresszeile3.FieldName := 'Adresszeile3';\r\n xdsEinzelkontaktAdresszeile3.Size := 40;\r\n xdsEinzelkontaktStrasse.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktStrasse.Name := 'xdsEinzelkontaktStrasse';\r\n xdsEinzelkontaktStrasse.FieldName := 'Strasse';\r\n xdsEinzelkontaktStrasse.Size := 40;\r\n xdsEinzelkontaktPostleitzahl.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktPostleitzahl.Name := 'xdsEinzelkontaktPostleitzahl';\r\n xdsEinzelkontaktPostleitzahl.FieldName := 'Postleitzahl';\r\n xdsEinzelkontaktPostleitzahl.Size := 6;\r\n xdsEinzelkontaktOrt.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktOrt.Name := 'xdsEinzelkontaktOrt';\r\n xdsEinzelkontaktOrt.FieldName := 'Ort';\r\n xdsEinzelkontaktOrt.Size := 40;\r\n xdsEinzelkontaktLaenderkuerzel.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktLaenderkuerzel.Name := 'xdsEinzelkontaktLaenderkuerzel';\r\n xdsEinzelkontaktLaenderkuerzel.FieldName := 'Laenderkuerzel';\r\n xdsEinzelkontaktLaenderkuerzel.Size := 5;\r\n xdsEinzelkontaktLand.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktLand.Name := 'xdsEinzelkontaktLand';\r\n xdsEinzelkontaktLand.FieldName := 'Land';\r\n xdsEinzelkontaktLand.Size := 40;\r\n xdsEinzelkontaktLaenderkennzeichen.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktLaenderkennzeichen.Name := 'xdsEinzelkontaktLaenderkennzeichen';\r\n xdsEinzelkontaktLaenderkennzeichen.FieldName := 'Laenderkennzeichen';\r\n xdsEinzelkontaktAdressanrede.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktAdressanrede.Name := 'xdsEinzelkontaktAdressanrede';\r\n xdsEinzelkontaktAdressanrede.FieldName := 'Adressanrede';\r\n xdsEinzelkontaktAdressanrede.Size := 15;\r\n xdsEinzelkontaktBriefanrede1.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktBriefanrede1.Name := 'xdsEinzelkontaktBriefanrede1';\r\n xdsEinzelkontaktBriefanrede1.FieldName := 'Briefanrede1';\r\n xdsEinzelkontaktBriefanrede1.Size := 255;\r\n xdsEinzelkontaktBriefanrede2.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktBriefanrede2.Name := 'xdsEinzelkontaktBriefanrede2';\r\n xdsEinzelkontaktBriefanrede2.FieldName := 'Briefanrede2';\r\n xdsEinzelkontaktBriefanrede2.Size := 40;\r\n xdsEinzelkontaktAdresseBild.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktAdresseBild.Name := 'xdsEinzelkontaktAdresseBild';\r\n xdsEinzelkontaktAdresseBild.FieldName := 'AdresseBild';\r\n xdsEinzelkontaktAdresseBild.Size := 255;\r\n xdsEinzelkontaktLieferanschrift.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktLieferanschrift.Name := 'xdsEinzelkontaktLieferanschrift';\r\n xdsEinzelkontaktLieferanschrift.FieldName := 'Lieferanschrift';\r\n xdsEinzelkontaktLieferanschrift.Size := 255;\r\n xdsEinzelkontaktGeburtsdatum.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktGeburtsdatum.Name := 'xdsEinzelkontaktGeburtsdatum';\r\n xdsEinzelkontaktGeburtsdatum.FieldName := 'Geburtsdatum';\r\n xdsEinzelkontaktTelefonNummer.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktTelefonNummer.Name := 'xdsEinzelkontaktTelefonNummer';\r\n xdsEinzelkontaktTelefonNummer.FieldName := 'TelefonNummer';\r\n xdsEinzelkontaktTelefonNummer.Size := 25;\r\n xdsEinzelkontaktTelefaxNummer.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktTelefaxNummer.Name := 'xdsEinzelkontaktTelefaxNummer';\r\n xdsEinzelkontaktTelefaxNummer.FieldName := 'TelefaxNummer';\r\n xdsEinzelkontaktTelefaxNummer.Size := 25;\r\n xdsEinzelkontaktMobilTelefon.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktMobilTelefon.Name := 'xdsEinzelkontaktMobilTelefon';\r\n xdsEinzelkontaktMobilTelefon.FieldName := 'MobilTelefon';\r\n xdsEinzelkontaktMobilTelefon.Size := 25;\r\n xdsEinzelkontaktEMail.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktEMail.Name := 'xdsEinzelkontaktEMail';\r\n xdsEinzelkontaktEMail.FieldName := 'EMail';\r\n xdsEinzelkontaktEMail.Size := 50;\r\n xdsEinzelkontaktInternet.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktInternet.Name := 'xdsEinzelkontaktInternet';\r\n xdsEinzelkontaktInternet.FieldName := 'Internet';\r\n xdsEinzelkontaktInternet.Size := 50;\r\n xdsEinzelkontaktUmsatzsteuerID.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktUmsatzsteuerID.Name := 'xdsEinzelkontaktUmsatzsteuerID';\r\n xdsEinzelkontaktUmsatzsteuerID.FieldName := 'UmsatzsteuerID';\r\n xdsEinzelkontaktUmsatzsteuerausweis.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktUmsatzsteuerausweis.Name := 'xdsEinzelkontaktUmsatzsteuerausweis';\r\n xdsEinzelkontaktUmsatzsteuerausweis.FieldName := 'Umsatzsteuerausweis';\r\n xdsEinzelkontaktBemerkungen.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktBemerkungen.Name := 'xdsEinzelkontaktBemerkungen';\r\n xdsEinzelkontaktBemerkungen.FieldName := 'Bemerkungen';\r\n xdsEinzelkontaktBemerkungen.Size := 255;\r\n xdsEinzelkontaktBranche.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktBranche.Name := 'xdsEinzelkontaktBranche';\r\n xdsEinzelkontaktBranche.FieldName := 'Branche';\r\n xdsEinzelkontaktBranche.Size := 50;\r\n xdsEinzelkontaktSelektiert1.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktSelektiert1.Name := 'xdsEinzelkontaktSelektiert1';\r\n xdsEinzelkontaktSelektiert1.FieldName := 'Selektiert1';\r\n xdsEinzelkontaktSelektiert2.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktSelektiert2.Name := 'xdsEinzelkontaktSelektiert2';\r\n xdsEinzelkontaktSelektiert2.FieldName := 'Selektiert2';\r\n xdsEinzelkontaktSelektiert3.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktSelektiert3.Name := 'xdsEinzelkontaktSelektiert3';\r\n xdsEinzelkontaktSelektiert3.FieldName := 'Selektiert3';\r\n xdsEinzelkontaktZahlungsbedingung.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktZahlungsbedingung.Name := 'xdsEinzelkontaktZahlungsbedingung';\r\n xdsEinzelkontaktZahlungsbedingung.FieldName := 'Zahlungsbedingung';\r\n xdsEinzelkontaktTransportbedingung.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktTransportbedingung.Name := 'xdsEinzelkontaktTransportbedingung';\r\n xdsEinzelkontaktTransportbedingung.FieldName := 'Transportbedingung';\r\n xdsEinzelkontaktTransportbedingung.Size := 100;\r\n xdsEinzelkontaktKilometer.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktKilometer.Name := 'xdsEinzelkontaktKilometer';\r\n xdsEinzelkontaktKilometer.FieldName := 'Kilometer';\r\n xdsEinzelkontaktRabattsatz.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktRabattsatz.Name := 'xdsEinzelkontaktRabattsatz';\r\n xdsEinzelkontaktRabattsatz.FieldName := 'Rabattsatz';\r\n xdsEinzelkontaktStundensatz.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktStundensatz.Name := 'xdsEinzelkontaktStundensatz';\r\n xdsEinzelkontaktStundensatz.FieldName := 'Stundensatz';\r\n xdsEinzelkontaktKontonummer.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktKontonummer.Name := 'xdsEinzelkontaktKontonummer';\r\n xdsEinzelkontaktKontonummer.FieldName := 'Kontonummer';\r\n xdsEinzelkontaktKontonummer.Size := 50;\r\n xdsEinzelkontaktBank.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktBank.Name := 'xdsEinzelkontaktBank';\r\n xdsEinzelkontaktBank.FieldName := 'Bank';\r\n xdsEinzelkontaktBank.Size := 50;\r\n xdsEinzelkontaktBankleitzahl.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktBankleitzahl.Name := 'xdsEinzelkontaktBankleitzahl';\r\n xdsEinzelkontaktBankleitzahl.FieldName := 'Bankleitzahl';\r\n xdsEinzelkontaktKontoinhaber.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktKontoinhaber.Name := 'xdsEinzelkontaktKontoinhaber';\r\n xdsEinzelkontaktKontoinhaber.FieldName := 'Kontoinhaber';\r\n xdsEinzelkontaktKontoinhaber.Size := 50;\r\n xdsEinzelkontaktBetreuer.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktBetreuer.Name := 'xdsEinzelkontaktBetreuer';\r\n xdsEinzelkontaktBetreuer.FieldName := 'Betreuer';\r\n xdsEinzelkontaktBetreuer.Size := 50;\r\n xdsEinzelkontaktQuelle.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktQuelle.Name := 'xdsEinzelkontaktQuelle';\r\n xdsEinzelkontaktQuelle.FieldName := 'Quelle';\r\n xdsEinzelkontaktQuelle.Size := 100;\r\n xdsEinzelkontaktSuchmerkmal.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktSuchmerkmal.Name := 'xdsEinzelkontaktSuchmerkmal';\r\n xdsEinzelkontaktSuchmerkmal.FieldName := 'Suchmerkmal';\r\n xdsEinzelkontaktSuchmerkmal.Size := 250;\r\n xdsEinzelkontaktWarenkreditlimit.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktWarenkreditlimit.Name := 'xdsEinzelkontaktWarenkreditlimit';\r\n xdsEinzelkontaktWarenkreditlimit.FieldName := 'Warenkreditlimit';\r\n xdsEinzelkontaktWarenkreditgesperrt.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktWarenkreditgesperrt.Name := 'xdsEinzelkontaktWarenkreditgesperrt';\r\n xdsEinzelkontaktWarenkreditgesperrt.FieldName := 'Warenkreditgesperrt';\r\n xdsEinzelkontaktKundennummerFremd.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktKundennummerFremd.Name := 'xdsEinzelkontaktKundennummerFremd';\r\n xdsEinzelkontaktKundennummerFremd.FieldName := 'KundennummerFremd';\r\n xdsEinzelkontaktKeinNewsletter.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktKeinNewsletter.Name := 'xdsEinzelkontaktKeinNewsletter';\r\n xdsEinzelkontaktKeinNewsletter.FieldName := 'KeinNewsletter';\r\n xdsEinzelkontaktDebitorennummer.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktDebitorennummer.Name := 'xdsEinzelkontaktDebitorennummer';\r\n xdsEinzelkontaktDebitorennummer.FieldName := 'Debitorennummer';\r\n xdsEinzelkontaktDebitorennummer.Size := 13;\r\n xdsEinzelkontaktKreditorennummer.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktKreditorennummer.Name := 'xdsEinzelkontaktKreditorennummer';\r\n xdsEinzelkontaktKreditorennummer.FieldName := 'Kreditorennummer';\r\n xdsEinzelkontaktKreditorennummer.Size := 13;\r\n xdsEinzelkontaktTelefonAlternativ.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktTelefonAlternativ.Name := 'xdsEinzelkontaktTelefonAlternativ';\r\n xdsEinzelkontaktTelefonAlternativ.FieldName := 'TelefonAlternativ';\r\n xdsEinzelkontaktTelefonAlternativ.Size := 50;\r\n xdsEinzelkontaktKostentraeger.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktKostentraeger.Name := 'xdsEinzelkontaktKostentraeger';\r\n xdsEinzelkontaktKostentraeger.FieldName := 'Kostentraeger';\r\n xdsEinzelkontaktKostentraeger.Size := 13;\r\n xdsEinzelkontaktIBAN.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktIBAN.Name := 'xdsEinzelkontaktIBAN';\r\n xdsEinzelkontaktIBAN.FieldName := 'IBAN';\r\n xdsEinzelkontaktIBAN.Size := 50;\r\n xdsEinzelkontaktBIC.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktBIC.Name := 'xdsEinzelkontaktBIC';\r\n xdsEinzelkontaktBIC.FieldName := 'BIC';\r\n xdsEinzelkontaktEmailkonto.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktEmailkonto.Name := 'xdsEinzelkontaktEmailkonto';\r\n xdsEinzelkontaktEmailkonto.FieldName := 'Emailkonto';\r\n xdsEinzelkontaktEmailkonto.Size := 50;\r\n xdsEinzelkontaktBenutzername.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktBenutzername.Name := 'xdsEinzelkontaktBenutzername';\r\n xdsEinzelkontaktBenutzername.FieldName := 'Benutzername';\r\n xdsEinzelkontaktBenutzername.Size := 50;\r\n xdsEinzelkontaktPasswort.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktPasswort.Name := 'xdsEinzelkontaktPasswort';\r\n xdsEinzelkontaktPasswort.FieldName := 'Passwort';\r\n xdsEinzelkontaktPasswort.Size := 25;\r\n xdsEinzelkontaktExportOutlook.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktExportOutlook.Name := 'xdsEinzelkontaktExportOutlook';\r\n xdsEinzelkontaktExportOutlook.FieldName := 'ExportOutlook';\r\n xdsEinzelkontaktNichtInListeAnzeigen.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktNichtInListeAnzeigen.Name := 'xdsEinzelkontaktNichtInListeAnzeigen';\r\n xdsEinzelkontaktNichtInListeAnzeigen.FieldName := 'NichtInListeAnzeigen';\r\n xdsEinzelkontaktKreditkarteArt.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktKreditkarteArt.Name := 'xdsEinzelkontaktKreditkarteArt';\r\n xdsEinzelkontaktKreditkarteArt.FieldName := 'KreditkarteArt';\r\n xdsEinzelkontaktKreditkarteArt.Size := 30;\r\n xdsEinzelkontaktKreditkarteInhaber.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktKreditkarteInhaber.Name := 'xdsEinzelkontaktKreditkarteInhaber';\r\n xdsEinzelkontaktKreditkarteInhaber.FieldName := 'KreditkarteInhaber';\r\n xdsEinzelkontaktKreditkarteInhaber.Size := 50;\r\n xdsEinzelkontaktKreditkarteNummer.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktKreditkarteNummer.Name := 'xdsEinzelkontaktKreditkarteNummer';\r\n xdsEinzelkontaktKreditkarteNummer.FieldName := 'KreditkarteNummer';\r\n xdsEinzelkontaktKreditkarteGueltigMonat.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktKreditkarteGueltigMonat.Name := 'xdsEinzelkontaktKreditkarteGueltigMonat';\r\n xdsEinzelkontaktKreditkarteGueltigMonat.FieldName := 'KreditkarteGueltigMonat';\r\n xdsEinzelkontaktKreditkarteGueltigMonat.Size := 2;\r\n xdsEinzelkontaktKreditkarteGueltigJahr.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktKreditkarteGueltigJahr.Name := 'xdsEinzelkontaktKreditkarteGueltigJahr';\r\n xdsEinzelkontaktKreditkarteGueltigJahr.FieldName := 'KreditkarteGueltigJahr';\r\n xdsEinzelkontaktKreditkartePruefziffer.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktKreditkartePruefziffer.Name := 'xdsEinzelkontaktKreditkartePruefziffer';\r\n xdsEinzelkontaktKreditkartePruefziffer.FieldName := 'KreditkartePruefziffer';\r\n xdsEinzelkontaktKreditkartePruefziffer.Size := 10;\r\n xdsEinzelkontaktDatumNeu.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktDatumNeu.Name := 'xdsEinzelkontaktDatumNeu';\r\n xdsEinzelkontaktDatumNeu.FieldName := 'DatumNeu';\r\n xdsEinzelkontaktDatumgeaendert.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktDatumgeaendert.Name := 'xdsEinzelkontaktDatumgeaendert';\r\n xdsEinzelkontaktDatumgeaendert.FieldName := 'Datumgeaendert';\r\n xdsEinzelkontaktTitel.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktTitel.Name := 'xdsEinzelkontaktTitel';\r\n xdsEinzelkontaktTitel.FieldName := 'Titel';\r\n xdsEinzelkontaktStundensatzMontage.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktStundensatzMontage.Name := 'xdsEinzelkontaktStundensatzMontage';\r\n xdsEinzelkontaktStundensatzMontage.FieldName := 'StundensatzMontage';\r\n xdsEinzelkontaktStdMontageU25.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktStdMontageU25.Name := 'xdsEinzelkontaktStdMontageU25';\r\n xdsEinzelkontaktStdMontageU25.FieldName := 'StdMontageU25';\r\n xdsEinzelkontaktStdMontageU50.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktStdMontageU50.Name := 'xdsEinzelkontaktStdMontageU50';\r\n xdsEinzelkontaktStdMontageU50.FieldName := 'StdMontageU50';\r\n xdsEinzelkontaktStdMontageU70.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktStdMontageU70.Name := 'xdsEinzelkontaktStdMontageU70';\r\n xdsEinzelkontaktStdMontageU70.FieldName := 'StdMontageU70';\r\n xdsEinzelkontaktStdMontageU100.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktStdMontageU100.Name := 'xdsEinzelkontaktStdMontageU100';\r\n xdsEinzelkontaktStdMontageU100.FieldName := 'StdMontageU100';\r\n xdsEinzelkontaktStdMontageU150.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktStdMontageU150.Name := 'xdsEinzelkontaktStdMontageU150';\r\n xdsEinzelkontaktStdMontageU150.FieldName := 'StdMontageU150';\r\n xdsEinzelkontaktStundensatzWerkstatt.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktStundensatzWerkstatt.Name := 'xdsEinzelkontaktStundensatzWerkstatt';\r\n xdsEinzelkontaktStundensatzWerkstatt.FieldName := 'StundensatzWerkstatt';\r\n xdsEinzelkontaktStdWerkstattU25.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktStdWerkstattU25.Name := 'xdsEinzelkontaktStdWerkstattU25';\r\n xdsEinzelkontaktStdWerkstattU25.FieldName := 'StdWerkstattU25';\r\n xdsEinzelkontaktStdWerkstattU50.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktStdWerkstattU50.Name := 'xdsEinzelkontaktStdWerkstattU50';\r\n xdsEinzelkontaktStdWerkstattU50.FieldName := 'StdWerkstattU50';\r\n xdsEinzelkontaktStdWerkstattU70.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktStdWerkstattU70.Name := 'xdsEinzelkontaktStdWerkstattU70';\r\n xdsEinzelkontaktStdWerkstattU70.FieldName := 'StdWerkstattU70';\r\n xdsEinzelkontaktStdWerkstattU100.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktStdWerkstattU100.Name := 'xdsEinzelkontaktStdWerkstattU100';\r\n xdsEinzelkontaktStdWerkstattU100.FieldName := 'StdWerkstattU100';\r\n xdsEinzelkontaktStdWerkstattU150.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktStdWerkstattU150.Name := 'xdsEinzelkontaktStdWerkstattU150';\r\n xdsEinzelkontaktStdWerkstattU150.FieldName := 'StdWerkstattU150';\r\n xdsEinzelkontaktArchivReferenz.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktArchivReferenz.Name := 'xdsEinzelkontaktArchivReferenz';\r\n xdsEinzelkontaktArchivReferenz.FieldName := 'ArchivReferenz';\r\n xdsEinzelkontaktArchivReferenz.Size := 55;\r\n xdsEinzelkontaktErloesKontoUST1.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktErloesKontoUST1.Name := 'xdsEinzelkontaktErloesKontoUST1';\r\n xdsEinzelkontaktErloesKontoUST1.FieldName := 'ErloesKontoUST1';\r\n xdsEinzelkontaktErloesKontoUST1.Size := 10;\r\n xdsEinzelkontaktErloesKontoUST2.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktErloesKontoUST2.Name := 'xdsEinzelkontaktErloesKontoUST2';\r\n xdsEinzelkontaktErloesKontoUST2.FieldName := 'ErloesKontoUST2';\r\n xdsEinzelkontaktErloesKontoUST2.Size := 10;\r\n xdsEinzelkontaktErloesKontoUST3.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktErloesKontoUST3.Name := 'xdsEinzelkontaktErloesKontoUST3';\r\n xdsEinzelkontaktErloesKontoUST3.FieldName := 'ErloesKontoUST3';\r\n xdsEinzelkontaktErloesKontoUST3.Size := 10;\r\n xdsEinzelkontaktGebKal.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktGebKal.Name := 'xdsEinzelkontaktGebKal';\r\n xdsEinzelkontaktGebKal.FieldName := 'GebKal';\r\n xdsEinzelkontaktEmailversand.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktEmailversand.Name := 'xdsEinzelkontaktEmailversand';\r\n xdsEinzelkontaktEmailversand.FieldName := 'Emailversand';\r\n xdsEinzelkontaktMahnspesen.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktMahnspesen.Name := 'xdsEinzelkontaktMahnspesen';\r\n xdsEinzelkontaktMahnspesen.FieldName := 'Mahnspesen';\r\n xdsEinzelkontaktRechnungSchluss.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktRechnungSchluss.Name := 'xdsEinzelkontaktRechnungSchluss';\r\n xdsEinzelkontaktRechnungSchluss.FieldName := 'RechnungSchluss';\r\n xdsEinzelkontaktRechnungSchluss.Size := 255;\r\n xdsEinzelkontaktBenutzerNeu.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktBenutzerNeu.Name := 'xdsEinzelkontaktBenutzerNeu';\r\n xdsEinzelkontaktBenutzerNeu.FieldName := 'BenutzerNeu';\r\n xdsEinzelkontaktBenutzerNeu.Size := 50;\r\n xdsEinzelkontaktBenutzerGeaendert.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktBenutzerGeaendert.Name := 'xdsEinzelkontaktBenutzerGeaendert';\r\n xdsEinzelkontaktBenutzerGeaendert.FieldName := 'BenutzerGeaendert';\r\n xdsEinzelkontaktBenutzerGeaendert.Size := 50;\r\n xdsEinzelkontaktBelegsprache.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktBelegsprache.Name := 'xdsEinzelkontaktBelegsprache';\r\n xdsEinzelkontaktBelegsprache.FieldName := 'Belegsprache';\r\n xdsEinzelkontaktBelegsprache.Size := 10;\r\n xdsEinzelkontaktkmSatz.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktkmSatz.Name := 'xdsEinzelkontaktkmSatz';\r\n xdsEinzelkontaktkmSatz.FieldName := 'kmSatz';\r\n xdsEinzelkontaktKundenklassetext.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktKundenklassetext.Name := 'xdsEinzelkontaktKundenklassetext';\r\n xdsEinzelkontaktKundenklassetext.FieldName := 'Kundenklassetext';\r\n xdsEinzelkontaktKundenklassetext.Size := 50;\r\n xdsEinzelkontaktKundenklasseFarbe.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktKundenklasseFarbe.Name := 'xdsEinzelkontaktKundenklasseFarbe';\r\n xdsEinzelkontaktKundenklasseFarbe.FieldName := 'KundenklasseFarbe';\r\n xdsEinzelkontaktAbweichenderRechnungsEmpfaenger.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktAbweichenderRechnungsEmpfaenger.Name := 'xdsEinzelkontaktAbweichenderRechnungsEmpfaenger';\r\n xdsEinzelkontaktAbweichenderRechnungsEmpfaenger.FieldName := 'AbweichenderRechnungsEmpfaenger';\r\n xdsEinzelkontaktAbweichenderRechnungsEmpfaenger.Size := 13;\r\n xdsEinzelkontaktProtokoll.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktProtokoll.Name := 'xdsEinzelkontaktProtokoll';\r\n xdsEinzelkontaktProtokoll.FieldName := 'Protokoll';\r\n xdsEinzelkontaktProtokoll.Size := 255;\r\n xdsEinzelkontaktILNTyp1.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktILNTyp1.Name := 'xdsEinzelkontaktILNTyp1';\r\n xdsEinzelkontaktILNTyp1.FieldName := 'ILNTyp1';\r\n xdsEinzelkontaktILNTyp1.Size := 13;\r\n xdsEinzelkontaktILNTyp2.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktILNTyp2.Name := 'xdsEinzelkontaktILNTyp2';\r\n xdsEinzelkontaktILNTyp2.FieldName := 'ILNTyp2';\r\n xdsEinzelkontaktILNTyp2.Size := 13;\r\n xdsEinzelkontaktKontaktGUID.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktKontaktGUID.Name := 'xdsEinzelkontaktKontaktGUID';\r\n xdsEinzelkontaktKontaktGUID.FieldName := 'KontaktGUID';\r\n xdsEinzelkontaktKontaktGUID.Size := 38;\r\n xdsEinzelkontaktPLZGUID.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktPLZGUID.Name := 'xdsEinzelkontaktPLZGUID';\r\n xdsEinzelkontaktPLZGUID.FieldName := 'PLZGUID';\r\n xdsEinzelkontaktPLZGUID.Size := 38;\r\n xdsEinzelkontaktPreislistenVariantePakete.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktPreislistenVariantePakete.Name := 'xdsEinzelkontaktPreislistenVariantePakete';\r\n xdsEinzelkontaktPreislistenVariantePakete.FieldName := 'PreislistenVariantePakete';\r\n xdsEinzelkontaktPreislistenVariantePakete.Size := 50;\r\n xdsEinzelkontaktSchluesselRechnungslauf.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktSchluesselRechnungslauf.Name := 'xdsEinzelkontaktSchluesselRechnungslauf';\r\n xdsEinzelkontaktSchluesselRechnungslauf.FieldName := 'SchluesselRechnungslauf';\r\n xdsEinzelkontaktSchluesselRechnungslauf.Size := 50;\r\n xdsEinzelkontaktRechnungEmail.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktRechnungEmail.Name := 'xdsEinzelkontaktRechnungEmail';\r\n xdsEinzelkontaktRechnungEmail.FieldName := 'RechnungEmail';\r\n xdsEinzelkontaktRechnungEmail.Size := 50;\r\n xdsEinzelkontaktZahlungsbedingungEK.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktZahlungsbedingungEK.Name := 'xdsEinzelkontaktZahlungsbedingungEK';\r\n xdsEinzelkontaktZahlungsbedingungEK.FieldName := 'ZahlungsbedingungEK';\r\n xdsEinzelkontaktTransportbedingungEK.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktTransportbedingungEK.Name := 'xdsEinzelkontaktTransportbedingungEK';\r\n xdsEinzelkontaktTransportbedingungEK.FieldName := 'TransportbedingungEK';\r\n xdsEinzelkontaktTransportbedingungEK.Size := 100;\r\n xdsEinzelkontaktRabattsatzEK.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktRabattsatzEK.Name := 'xdsEinzelkontaktRabattsatzEK';\r\n xdsEinzelkontaktRabattsatzEK.FieldName := 'RabattsatzEK';\r\n xdsEinzelkontaktVertreterMatchcode.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktVertreterMatchcode.Name := 'xdsEinzelkontaktVertreterMatchcode';\r\n xdsEinzelkontaktVertreterMatchcode.FieldName := 'VertreterMatchcode';\r\n xdsEinzelkontaktVertreterMatchcode.Size := 50;\r\n xdsEinzelkontaktVertreterProvisionssatz.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktVertreterProvisionssatz.Name := 'xdsEinzelkontaktVertreterProvisionssatz';\r\n xdsEinzelkontaktVertreterProvisionssatz.FieldName := 'VertreterProvisionssatz';\r\n xdsEinzelkontaktUmsatzVKJahr.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktUmsatzVKJahr.Name := 'xdsEinzelkontaktUmsatzVKJahr';\r\n xdsEinzelkontaktUmsatzVKJahr.FieldName := 'UmsatzVKJahr';\r\n xdsEinzelkontaktUmsatzVKVorjahr.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktUmsatzVKVorjahr.Name := 'xdsEinzelkontaktUmsatzVKVorjahr';\r\n xdsEinzelkontaktUmsatzVKVorjahr.FieldName := 'UmsatzVKVorjahr';\r\n xdsEinzelkontaktUmsatzEKJahr.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktUmsatzEKJahr.Name := 'xdsEinzelkontaktUmsatzEKJahr';\r\n xdsEinzelkontaktUmsatzEKJahr.FieldName := 'UmsatzEKJahr';\r\n xdsEinzelkontaktUmsatzEKVorjahr.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktUmsatzEKVorjahr.Name := 'xdsEinzelkontaktUmsatzEKVorjahr';\r\n xdsEinzelkontaktUmsatzEKVorjahr.FieldName := 'UmsatzEKVorjahr';\r\n xdsEinzelkontaktSteuernummer.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktSteuernummer.Name := 'xdsEinzelkontaktSteuernummer';\r\n xdsEinzelkontaktSteuernummer.FieldName := 'Steuernummer';\r\n xdsEinzelkontaktSteuernummer.Size := 25;\r\n xdsEinzelkontaktLoginPW.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktLoginPW.Name := 'xdsEinzelkontaktLoginPW';\r\n xdsEinzelkontaktLoginPW.FieldName := 'LoginPW';\r\n xdsEinzelkontaktREperFax.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktREperFax.Name := 'xdsEinzelkontaktREperFax';\r\n xdsEinzelkontaktREperFax.FieldName := 'REperFax';\r\n xdsEinzelkontaktErreichbarkeit.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktErreichbarkeit.Name := 'xdsEinzelkontaktErreichbarkeit';\r\n xdsEinzelkontaktErreichbarkeit.FieldName := 'Erreichbarkeit';\r\n xdsEinzelkontaktErreichbarkeit.Size := 250;\r\n xdsEinzelkontaktErloesKontoUST4.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktErloesKontoUST4.Name := 'xdsEinzelkontaktErloesKontoUST4';\r\n xdsEinzelkontaktErloesKontoUST4.FieldName := 'ErloesKontoUST4';\r\n xdsEinzelkontaktErloesKontoUST4.Size := 10;\r\n xdsEinzelkontaktErloesKontoUST5.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktErloesKontoUST5.Name := 'xdsEinzelkontaktErloesKontoUST5';\r\n xdsEinzelkontaktErloesKontoUST5.FieldName := 'ErloesKontoUST5';\r\n xdsEinzelkontaktErloesKontoUST5.Size := 10;\r\n xdsEinzelkontaktErloesKontoUST6.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktErloesKontoUST6.Name := 'xdsEinzelkontaktErloesKontoUST6';\r\n xdsEinzelkontaktErloesKontoUST6.FieldName := 'ErloesKontoUST6';\r\n xdsEinzelkontaktErloesKontoUST6.Size := 10;\r\n xdsEinzelkontaktBesteuerungKey.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktBesteuerungKey.Name := 'xdsEinzelkontaktBesteuerungKey';\r\n xdsEinzelkontaktBesteuerungKey.FieldName := 'BesteuerungKey';\r\n xdsEinzelkontaktAuftraegeJahr.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktAuftraegeJahr.Name := 'xdsEinzelkontaktAuftraegeJahr';\r\n xdsEinzelkontaktAuftraegeJahr.FieldName := 'AuftraegeJahr';\r\n xdsEinzelkontaktAuftraegeVorjahr.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktAuftraegeVorjahr.Name := 'xdsEinzelkontaktAuftraegeVorjahr';\r\n xdsEinzelkontaktAuftraegeVorjahr.FieldName := 'AuftraegeVorjahr';\r\n xdsEinzelkontaktLieferadresseID.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktLieferadresseID.Name := 'xdsEinzelkontaktLieferadresseID';\r\n xdsEinzelkontaktLieferadresseID.FieldName := 'LieferadresseID';\r\n xdsEinzelkontaktUSTIDgeprueft.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktUSTIDgeprueft.Name := 'xdsEinzelkontaktUSTIDgeprueft';\r\n xdsEinzelkontaktUSTIDgeprueft.FieldName := 'USTIDgeprueft';\r\n xdsEinzelkontaktKontaktverbund.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktKontaktverbund.Name := 'xdsEinzelkontaktKontaktverbund';\r\n xdsEinzelkontaktKontaktverbund.FieldName := 'Kontaktverbund';\r\n xdsEinzelkontaktKontaktverbund.Size := 25;\r\n xdsEinzelkontaktHinweis.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktHinweis.Name := 'xdsEinzelkontaktHinweis';\r\n xdsEinzelkontaktHinweis.FieldName := 'Hinweis';\r\n xdsEinzelkontaktHinweis.Size := 255;\r\n xdsEinzelkontaktLatitude.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktLatitude.Name := 'xdsEinzelkontaktLatitude';\r\n xdsEinzelkontaktLatitude.FieldName := 'Latitude';\r\n xdsEinzelkontaktLongitude.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktLongitude.Name := 'xdsEinzelkontaktLongitude';\r\n xdsEinzelkontaktLongitude.FieldName := 'Longitude';\r\n xdsEinzelkontaktkmLuftlinie.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktkmLuftlinie.Name := 'xdsEinzelkontaktkmLuftlinie';\r\n xdsEinzelkontaktkmLuftlinie.FieldName := 'kmLuftlinie';\r\n xdsEinzelkontaktGoogleID.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktGoogleID.Name := 'xdsEinzelkontaktGoogleID';\r\n xdsEinzelkontaktGoogleID.FieldName := 'GoogleID';\r\n xdsEinzelkontaktGoogleID.Size := 50;\r\n xdsEinzelkontaktGoogleUpdatedUTC.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktGoogleUpdatedUTC.Name := 'xdsEinzelkontaktGoogleUpdatedUTC';\r\n xdsEinzelkontaktGoogleUpdatedUTC.FieldName := 'GoogleUpdatedUTC';\r\n xdsEinzelkontaktBundesland.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktBundesland.Name := 'xdsEinzelkontaktBundesland';\r\n xdsEinzelkontaktBundesland.FieldName := 'Bundesland';\r\n xdsEinzelkontaktBundesland.Size := 50;\r\n xdsEinzelkontaktRegion.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktRegion.Name := 'xdsEinzelkontaktRegion';\r\n xdsEinzelkontaktRegion.FieldName := 'Region';\r\n xdsEinzelkontaktRegion.Size := 50;\r\n xdsEinzelkontaktMandatsreferenz.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktMandatsreferenz.Name := 'xdsEinzelkontaktMandatsreferenz';\r\n xdsEinzelkontaktMandatsreferenz.FieldName := 'Mandatsreferenz';\r\n xdsEinzelkontaktMandatsreferenz.Size := 34;\r\n xdsEinzelkontaktMandatsreferenzVom.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktMandatsreferenzVom.Name := 'xdsEinzelkontaktMandatsreferenzVom';\r\n xdsEinzelkontaktMandatsreferenzVom.FieldName := 'MandatsreferenzVom';\r\n xdsEinzelkontaktLastschriftArt.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktLastschriftArt.Name := 'xdsEinzelkontaktLastschriftArt';\r\n xdsEinzelkontaktLastschriftArt.FieldName := 'LastschriftArt';\r\n xdsEinzelkontaktLastschriftArt.Size := 2;\r\n xdsEinzelkontaktMahnsperre.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktMahnsperre.Name := 'xdsEinzelkontaktMahnsperre';\r\n xdsEinzelkontaktMahnsperre.FieldName := 'Mahnsperre';\r\n xdsEinzelkontaktSuchbegriff.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktSuchbegriff.Name := 'xdsEinzelkontaktSuchbegriff';\r\n xdsEinzelkontaktSuchbegriff.FieldName := 'Suchbegriff';\r\n xdsEinzelkontaktSuchbegriff.Size := 25;\r\n xdsEinzelkontaktLieferanschriftDaten.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktLieferanschriftDaten.Name := 'xdsEinzelkontaktLieferanschriftDaten';\r\n xdsEinzelkontaktLieferanschriftDaten.FieldName := 'LieferanschriftDaten';\r\n xdsEinzelkontaktLieferanschriftDaten.Size := 255;\r\n xdsEinzelkontaktExportKasse.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktExportKasse.Name := 'xdsEinzelkontaktExportKasse';\r\n xdsEinzelkontaktExportKasse.FieldName := 'ExportKasse';\r\n xdsEinzelkontaktLoeschvormerkungDatum.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktLoeschvormerkungDatum.Name := 'xdsEinzelkontaktLoeschvormerkungDatum';\r\n xdsEinzelkontaktLoeschvormerkungDatum.FieldName := 'LoeschvormerkungDatum';\r\n xdsEinzelkontaktLoeschvormerkungGrund.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktLoeschvormerkungGrund.Name := 'xdsEinzelkontaktLoeschvormerkungGrund';\r\n xdsEinzelkontaktLoeschvormerkungGrund.FieldName := 'LoeschvormerkungGrund';\r\n xdsEinzelkontaktLoeschvormerkungGrund.Size := 250;\r\n xdsEinzelkontaktPseudonymisiert.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktPseudonymisiert.Name := 'xdsEinzelkontaktPseudonymisiert';\r\n xdsEinzelkontaktPseudonymisiert.FieldName := 'Pseudonymisiert';\r\n xdsEinzelkontaktPseudonymisiert.Size := 255;\r\n xdsEinzelkontaktLoginAktiv.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktLoginAktiv.Name := 'xdsEinzelkontaktLoginAktiv';\r\n xdsEinzelkontaktLoginAktiv.FieldName := 'LoginAktiv';\r\n xdsEinzelkontaktSonstigeDaten.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktSonstigeDaten.Name := 'xdsEinzelkontaktSonstigeDaten';\r\n xdsEinzelkontaktSonstigeDaten.FieldName := 'SonstigeDaten';\r\n xdsEinzelkontaktSonstigeDaten.Size := 255;\r\n xdsEinzelkontaktB2C.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktB2C.Name := 'xdsEinzelkontaktB2C';\r\n xdsEinzelkontaktB2C.FieldName := 'B2C';\r\n xdsEinzelkontaktTIN.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktTIN.Name := 'xdsEinzelkontaktTIN';\r\n xdsEinzelkontaktTIN.FieldName := 'TIN';\r\n xdsEinzelkontaktTIN.Size := 25;\r\n xdsEinzelkontaktMindestbestellwert.SetParentComponent(xdsEinzelkontakt);\r\n xdsEinzelkontaktMindestbestellwert.Name := 'xdsEinzelkontaktMindestbestellwert';\r\n xdsEinzelkontaktMindestbestellwert.FieldName := 'Mindestbestellwert';\r\n sourceEinzelkontakt.SetParentComponent(Self);\r\n sourceEinzelkontakt.Name := 'sourceEinzelkontakt';\r\n sourceEinzelkontakt.DataSet := xdsEinzelkontakt;\r\n sourceEinzelkontakt.Left := 20;\r\n sourceEinzelkontakt.Top := 69;\r\n WClient.SetParentComponent(Self);\r\n WClient.Name := 'WClient';\r\n WClient.Connection := DM2.XDataWebConnection1;\r\n WClient.Left := 24;\r\n WClient.Top := 8;\r\n xdskontosaldo.SetParentComponent(Self);\r\n xdskontosaldo.Name := 'xdskontosaldo';\r\n xdskontosaldo.AfterOpen := xdskontosaldoAfterOpen;\r\n xdskontosaldo.EntitySetName := 'ITS_Kontosalden';\r\n xdskontosaldo.Connection := DM2.XDataWebConnection1;\r\n xdskontosaldo.Left := 56;\r\n xdskontosaldo.Top := 348;\r\n xdskontosaldoKundennummer.SetParentComponent(xdskontosaldo);\r\n xdskontosaldoKundennummer.Name := 'xdskontosaldoKundennummer';\r\n xdskontosaldoKundennummer.FieldName := 'Kundennummer';\r\n xdskontosaldoKundennummer.Required := True;\r\n xdskontosaldoKundennummer.Size := 13;\r\n xdskontosaldoZeitaufwand.SetParentComponent(xdskontosaldo);\r\n xdskontosaldoZeitaufwand.Name := 'xdskontosaldoZeitaufwand';\r\n xdskontosaldoZeitaufwand.FieldName := 'Zeitaufwand';\r\n xdskontosaldoAbzurechnen.SetParentComponent(xdskontosaldo);\r\n xdskontosaldoAbzurechnen.Name := 'xdskontosaldoAbzurechnen';\r\n xdskontosaldoAbzurechnen.FieldName := 'Abzurechnen';\r\n xdskontosaldoGutschrift.SetParentComponent(xdskontosaldo);\r\n xdskontosaldoGutschrift.Name := 'xdskontosaldoGutschrift';\r\n xdskontosaldoGutschrift.FieldName := 'Gutschrift';\r\n xdskontosaldoAbzug.SetParentComponent(xdskontosaldo);\r\n xdskontosaldoAbzug.Name := 'xdskontosaldoAbzug';\r\n xdskontosaldoAbzug.FieldName := 'Abzug';\r\n xdskontosaldoSaldo.SetParentComponent(xdskontosaldo);\r\n xdskontosaldoSaldo.Name := 'xdskontosaldoSaldo';\r\n xdskontosaldoSaldo.FieldName := 'Saldo';\r\n xdskontosaldoBetrag.SetParentComponent(xdskontosaldo);\r\n xdskontosaldoBetrag.Name := 'xdskontosaldoBetrag';\r\n xdskontosaldoBetrag.FieldName := 'Betrag';\r\n xdskontosaldoMinutenpreis.SetParentComponent(xdskontosaldo);\r\n xdskontosaldoMinutenpreis.Name := 'xdskontosaldoMinutenpreis';\r\n xdskontosaldoMinutenpreis.FieldName := 'Minutenpreis';\r\n xdskontosaldoSRestguthaben.SetParentComponent(xdskontosaldo);\r\n xdskontosaldoSRestguthaben.Name := 'xdskontosaldoSRestguthaben';\r\n xdskontosaldoSRestguthaben.FieldName := 'SRestguthaben';\r\n finally\r\n TC.AfterLoadDFMValues;\r\n Container1.AfterLoadDFMValues;\r\n Container2.AfterLoadDFMValues;\r\n btnzurueck.AfterLoadDFMValues;\r\n btnBelege.AfterLoadDFMValues;\r\n btnKarte.AfterLoadDFMValues;\r\n btnPreise.AfterLoadDFMValues;\r\n Container3.AfterLoadDFMValues;\r\n btnAnsprechpartner.AfterLoadDFMValues;\r\n btnDateien.AfterLoadDFMValues;\r\n btnTicketNeu.AfterLoadDFMValues;\r\n btnKontaktAendern.AfterLoadDFMValues;\r\n xdsEinzelkontakt.AfterLoadDFMValues;\r\n xdsEinzelkontaktKundennummer.AfterLoadDFMValues;\r\n xdsEinzelkontaktGruppeKunden.AfterLoadDFMValues;\r\n xdsEinzelkontaktGruppeLieferanten.AfterLoadDFMValues;\r\n xdsEinzelkontaktGruppeSonstige.AfterLoadDFMValues;\r\n xdsEinzelkontaktGruppeNichtkunden.AfterLoadDFMValues;\r\n xdsEinzelkontaktKontaktgruppe.AfterLoadDFMValues;\r\n xdsEinzelkontaktNachname.AfterLoadDFMValues;\r\n xdsEinzelkontaktVorname.AfterLoadDFMValues;\r\n xdsEinzelkontaktAdresszeile2.AfterLoadDFMValues;\r\n xdsEinzelkontaktAdresszeile3.AfterLoadDFMValues;\r\n xdsEinzelkontaktStrasse.AfterLoadDFMValues;\r\n xdsEinzelkontaktPostleitzahl.AfterLoadDFMValues;\r\n xdsEinzelkontaktOrt.AfterLoadDFMValues;\r\n xdsEinzelkontaktLaenderkuerzel.AfterLoadDFMValues;\r\n xdsEinzelkontaktLand.AfterLoadDFMValues;\r\n xdsEinzelkontaktLaenderkennzeichen.AfterLoadDFMValues;\r\n xdsEinzelkontaktAdressanrede.AfterLoadDFMValues;\r\n xdsEinzelkontaktBriefanrede1.AfterLoadDFMValues;\r\n xdsEinzelkontaktBriefanrede2.AfterLoadDFMValues;\r\n xdsEinzelkontaktAdresseBild.AfterLoadDFMValues;\r\n xdsEinzelkontaktLieferanschrift.AfterLoadDFMValues;\r\n xdsEinzelkontaktGeburtsdatum.AfterLoadDFMValues;\r\n xdsEinzelkontaktTelefonNummer.AfterLoadDFMValues;\r\n xdsEinzelkontaktTelefaxNummer.AfterLoadDFMValues;\r\n xdsEinzelkontaktMobilTelefon.AfterLoadDFMValues;\r\n xdsEinzelkontaktEMail.AfterLoadDFMValues;\r\n xdsEinzelkontaktInternet.AfterLoadDFMValues;\r\n xdsEinzelkontaktUmsatzsteuerID.AfterLoadDFMValues;\r\n xdsEinzelkontaktUmsatzsteuerausweis.AfterLoadDFMValues;\r\n xdsEinzelkontaktBemerkungen.AfterLoadDFMValues;\r\n xdsEinzelkontaktBranche.AfterLoadDFMValues;\r\n xdsEinzelkontaktSelektiert1.AfterLoadDFMValues;\r\n xdsEinzelkontaktSelektiert2.AfterLoadDFMValues;\r\n xdsEinzelkontaktSelektiert3.AfterLoadDFMValues;\r\n xdsEinzelkontaktZahlungsbedingung.AfterLoadDFMValues;\r\n xdsEinzelkontaktTransportbedingung.AfterLoadDFMValues;\r\n xdsEinzelkontaktKilometer.AfterLoadDFMValues;\r\n xdsEinzelkontaktRabattsatz.AfterLoadDFMValues;\r\n xdsEinzelkontaktStundensatz.AfterLoadDFMValues;\r\n xdsEinzelkontaktKontonummer.AfterLoadDFMValues;\r\n xdsEinzelkontaktBank.AfterLoadDFMValues;\r\n xdsEinzelkontaktBankleitzahl.AfterLoadDFMValues;\r\n xdsEinzelkontaktKontoinhaber.AfterLoadDFMValues;\r\n xdsEinzelkontaktBetreuer.AfterLoadDFMValues;\r\n xdsEinzelkontaktQuelle.AfterLoadDFMValues;\r\n xdsEinzelkontaktSuchmerkmal.AfterLoadDFMValues;\r\n xdsEinzelkontaktWarenkreditlimit.AfterLoadDFMValues;\r\n xdsEinzelkontaktWarenkreditgesperrt.AfterLoadDFMValues;\r\n xdsEinzelkontaktKundennummerFremd.AfterLoadDFMValues;\r\n xdsEinzelkontaktKeinNewsletter.AfterLoadDFMValues;\r\n xdsEinzelkontaktDebitorennummer.AfterLoadDFMValues;\r\n xdsEinzelkontaktKreditorennummer.AfterLoadDFMValues;\r\n xdsEinzelkontaktTelefonAlternativ.AfterLoadDFMValues;\r\n xdsEinzelkontaktKostentraeger.AfterLoadDFMValues;\r\n xdsEinzelkontaktIBAN.AfterLoadDFMValues;\r\n xdsEinzelkontaktBIC.AfterLoadDFMValues;\r\n xdsEinzelkontaktEmailkonto.AfterLoadDFMValues;\r\n xdsEinzelkontaktBenutzername.AfterLoadDFMValues;\r\n xdsEinzelkontaktPasswort.AfterLoadDFMValues;\r\n xdsEinzelkontaktExportOutlook.AfterLoadDFMValues;\r\n xdsEinzelkontaktNichtInListeAnzeigen.AfterLoadDFMValues;\r\n xdsEinzelkontaktKreditkarteArt.AfterLoadDFMValues;\r\n xdsEinzelkontaktKreditkarteInhaber.AfterLoadDFMValues;\r\n xdsEinzelkontaktKreditkarteNummer.AfterLoadDFMValues;\r\n xdsEinzelkontaktKreditkarteGueltigMonat.AfterLoadDFMValues;\r\n xdsEinzelkontaktKreditkarteGueltigJahr.AfterLoadDFMValues;\r\n xdsEinzelkontaktKreditkartePruefziffer.AfterLoadDFMValues;\r\n xdsEinzelkontaktDatumNeu.AfterLoadDFMValues;\r\n xdsEinzelkontaktDatumgeaendert.AfterLoadDFMValues;\r\n xdsEinzelkontaktTitel.AfterLoadDFMValues;\r\n xdsEinzelkontaktStundensatzMontage.AfterLoadDFMValues;\r\n xdsEinzelkontaktStdMontageU25.AfterLoadDFMValues;\r\n xdsEinzelkontaktStdMontageU50.AfterLoadDFMValues;\r\n xdsEinzelkontaktStdMontageU70.AfterLoadDFMValues;\r\n xdsEinzelkontaktStdMontageU100.AfterLoadDFMValues;\r\n xdsEinzelkontaktStdMontageU150.AfterLoadDFMValues;\r\n xdsEinzelkontaktStundensatzWerkstatt.AfterLoadDFMValues;\r\n xdsEinzelkontaktStdWerkstattU25.AfterLoadDFMValues;\r\n xdsEinzelkontaktStdWerkstattU50.AfterLoadDFMValues;\r\n xdsEinzelkontaktStdWerkstattU70.AfterLoadDFMValues;\r\n xdsEinzelkontaktStdWerkstattU100.AfterLoadDFMValues;\r\n xdsEinzelkontaktStdWerkstattU150.AfterLoadDFMValues;\r\n xdsEinzelkontaktArchivReferenz.AfterLoadDFMValues;\r\n xdsEinzelkontaktErloesKontoUST1.AfterLoadDFMValues;\r\n xdsEinzelkontaktErloesKontoUST2.AfterLoadDFMValues;\r\n xdsEinzelkontaktErloesKontoUST3.AfterLoadDFMValues;\r\n xdsEinzelkontaktGebKal.AfterLoadDFMValues;\r\n xdsEinzelkontaktEmailversand.AfterLoadDFMValues;\r\n xdsEinzelkontaktMahnspesen.AfterLoadDFMValues;\r\n xdsEinzelkontaktRechnungSchluss.AfterLoadDFMValues;\r\n xdsEinzelkontaktBenutzerNeu.AfterLoadDFMValues;\r\n xdsEinzelkontaktBenutzerGeaendert.AfterLoadDFMValues;\r\n xdsEinzelkontaktBelegsprache.AfterLoadDFMValues;\r\n xdsEinzelkontaktkmSatz.AfterLoadDFMValues;\r\n xdsEinzelkontaktKundenklassetext.AfterLoadDFMValues;\r\n xdsEinzelkontaktKundenklasseFarbe.AfterLoadDFMValues;\r\n xdsEinzelkontaktAbweichenderRechnungsEmpfaenger.AfterLoadDFMValues;\r\n xdsEinzelkontaktProtokoll.AfterLoadDFMValues;\r\n xdsEinzelkontaktILNTyp1.AfterLoadDFMValues;\r\n xdsEinzelkontaktILNTyp2.AfterLoadDFMValues;\r\n xdsEinzelkontaktKontaktGUID.AfterLoadDFMValues;\r\n xdsEinzelkontaktPLZGUID.AfterLoadDFMValues;\r\n xdsEinzelkontaktPreislistenVariantePakete.AfterLoadDFMValues;\r\n xdsEinzelkontaktSchluesselRechnungslauf.AfterLoadDFMValues;\r\n xdsEinzelkontaktRechnungEmail.AfterLoadDFMValues;\r\n xdsEinzelkontaktZahlungsbedingungEK.AfterLoadDFMValues;\r\n xdsEinzelkontaktTransportbedingungEK.AfterLoadDFMValues;\r\n xdsEinzelkontaktRabattsatzEK.AfterLoadDFMValues;\r\n xdsEinzelkontaktVertreterMatchcode.AfterLoadDFMValues;\r\n xdsEinzelkontaktVertreterProvisionssatz.AfterLoadDFMValues;\r\n xdsEinzelkontaktUmsatzVKJahr.AfterLoadDFMValues;\r\n xdsEinzelkontaktUmsatzVKVorjahr.AfterLoadDFMValues;\r\n xdsEinzelkontaktUmsatzEKJahr.AfterLoadDFMValues;\r\n xdsEinzelkontaktUmsatzEKVorjahr.AfterLoadDFMValues;\r\n xdsEinzelkontaktSteuernummer.AfterLoadDFMValues;\r\n xdsEinzelkontaktLoginPW.AfterLoadDFMValues;\r\n xdsEinzelkontaktREperFax.AfterLoadDFMValues;\r\n xdsEinzelkontaktErreichbarkeit.AfterLoadDFMValues;\r\n xdsEinzelkontaktErloesKontoUST4.AfterLoadDFMValues;\r\n xdsEinzelkontaktErloesKontoUST5.AfterLoadDFMValues;\r\n xdsEinzelkontaktErloesKontoUST6.AfterLoadDFMValues;\r\n xdsEinzelkontaktBesteuerungKey.AfterLoadDFMValues;\r\n xdsEinzelkontaktAuftraegeJahr.AfterLoadDFMValues;\r\n xdsEinzelkontaktAuftraegeVorjahr.AfterLoadDFMValues;\r\n xdsEinzelkontaktLieferadresseID.AfterLoadDFMValues;\r\n xdsEinzelkontaktUSTIDgeprueft.AfterLoadDFMValues;\r\n xdsEinzelkontaktKontaktverbund.AfterLoadDFMValues;\r\n xdsEinzelkontaktHinweis.AfterLoadDFMValues;\r\n xdsEinzelkontaktLatitude.AfterLoadDFMValues;\r\n xdsEinzelkontaktLongitude.AfterLoadDFMValues;\r\n xdsEinzelkontaktkmLuftlinie.AfterLoadDFMValues;\r\n xdsEinzelkontaktGoogleID.AfterLoadDFMValues;\r\n xdsEinzelkontaktGoogleUpdatedUTC.AfterLoadDFMValues;\r\n xdsEinzelkontaktBundesland.AfterLoadDFMValues;\r\n xdsEinzelkontaktRegion.AfterLoadDFMValues;\r\n xdsEinzelkontaktMandatsreferenz.AfterLoadDFMValues;\r\n xdsEinzelkontaktMandatsreferenzVom.AfterLoadDFMValues;\r\n xdsEinzelkontaktLastschriftArt.AfterLoadDFMValues;\r\n xdsEinzelkontaktMahnsperre.AfterLoadDFMValues;\r\n xdsEinzelkontaktSuchbegriff.AfterLoadDFMValues;\r\n xdsEinzelkontaktLieferanschriftDaten.AfterLoadDFMValues;\r\n xdsEinzelkontaktExportKasse.AfterLoadDFMValues;\r\n xdsEinzelkontaktLoeschvormerkungDatum.AfterLoadDFMValues;\r\n xdsEinzelkontaktLoeschvormerkungGrund.AfterLoadDFMValues;\r\n xdsEinzelkontaktPseudonymisiert.AfterLoadDFMValues;\r\n xdsEinzelkontaktLoginAktiv.AfterLoadDFMValues;\r\n xdsEinzelkontaktSonstigeDaten.AfterLoadDFMValues;\r\n xdsEinzelkontaktB2C.AfterLoadDFMValues;\r\n xdsEinzelkontaktTIN.AfterLoadDFMValues;\r\n xdsEinzelkontaktMindestbestellwert.AfterLoadDFMValues;\r\n sourceEinzelkontakt.AfterLoadDFMValues;\r\n WClient.AfterLoadDFMValues;\r\n xdskontosaldo.AfterLoadDFMValues;\r\n xdskontosaldoKundennummer.AfterLoadDFMValues;\r\n xdskontosaldoZeitaufwand.AfterLoadDFMValues;\r\n xdskontosaldoAbzurechnen.AfterLoadDFMValues;\r\n xdskontosaldoGutschrift.AfterLoadDFMValues;\r\n xdskontosaldoAbzug.AfterLoadDFMValues;\r\n xdskontosaldoSaldo.AfterLoadDFMValues;\r\n xdskontosaldoBetrag.AfterLoadDFMValues;\r\n xdskontosaldoMinutenpreis.AfterLoadDFMValues;\r\n xdskontosaldoSRestguthaben.AfterLoadDFMValues;\r\n end;\r\nend;\r\n\r\nend.\r\n","unit unit_Kontaktsuche;\r\n\r\ninterface\r\n\r\nuses\r\n System.SysUtils, System.Classes, JS, Web, WEBLib.Graphics, WEBLib.Controls,\r\n WEBLib.Forms, WEBLib.Dialogs, Data.DB, WEBLib.DB, XData.Web.JsonDataset,\r\n XData.Web.Dataset, XData.Web.Connection, Vcl.Controls, Vcl.StdCtrls,\r\n WEBLib.StdCtrls, WEBLib.ExtCtrls, Vcl.Grids, WEBLib.DBCtrls, VCL.TMSFNCTypes,\r\n VCL.TMSFNCUtils, VCL.TMSFNCGraphics, VCL.TMSFNCGraphicsTypes, strutils,\r\n VCL.TMSFNCCustomControl, VCL.TMSFNCTableView, WEBLib.Grids, WEBLib.Buttons, DB,\r\n XData.Web.Client;\r\n\r\ntype\r\n TfrmKontaktSuche = class(TForm)\r\n DataSet: TXDataWebDataSet;\r\n Source: TDataSource;\r\n DataSetKundennummer: TStringField;\r\n DataSetNachname: TStringField;\r\n DataSetVorname: TStringField;\r\n DataSetAdresseBild: TStringField;\r\n Container1: THTMLContainer;\r\n Container2: THTMLContainer;\r\n Container3: THTMLContainer;\r\n TC: TTableControl;\r\n btnzurueck: TButton;\r\n btnScan: TButton;\r\n edtSuchbegriff: TEdit;\r\n ResultLabel: TLabel;\r\n btnNeuerKontakt: TButton;\r\n InputNachname: TInputMessageDlg;\r\n WClient: TXDataWebClient;\r\n btnKontaktAendern: TButton;\r\n procedure WebFormShow(Sender: TObject);\r\n procedure DataSetAfterOpen(DataSet: TDataSet);\r\n procedure btnzurueckClick(Sender: TObject);\r\n procedure btnScanClick(Sender: TObject);\r\n procedure edtSuchbegriffChange(Sender: TObject);\r\n [async]\r\n procedure btnNeuerKontaktClick(Sender: TObject); async;\r\n procedure btnKontaktAendernClick(Sender: TObject);\r\n\r\n public\r\n Kontaktnummer:string;\r\n NeueKontaktnummer:string;\r\n LUNachname:string;\r\n LUVorname:string;\r\n LUAdressebild:string;\r\n weiterzuEinzelkontakt:boolean;\r\n buttonkundennummer:TButton;\r\n procedure buttonkundennummerclick(Sender:TObject);\r\n protected procedure LoadDFMValues; override; end;\r\n\r\nvar\r\n frmKontaktSuche: TfrmKontaktSuche;\r\n\r\nimplementation\r\n uses unit1, unit2, unit_EinzelKontakt, unit_BarcodeScan, unit_KontaktAenderung;\r\n{$R *.dfm}\r\n\r\n\r\nprocedure TfrmKontaktSuche.btnNeuerKontaktClick(Sender: TObject);\r\n procedure OnResponse(Response:TXDataClientResponse);\r\n var\r\n ergebnis:string;\r\n begin\r\n ergebnis:=string(TJSObject(response.Result)['value']);\r\n if ergebnis='WRONG' then\r\n begin\r\n NeueKontaktnummer:='';\r\n showmessage('Es konnte kein neuer Kontakt hinzugefügt werden.');\r\n end\r\n else\r\n begin\r\n NeueKontaktnummer:=ergebnis;\r\n if NeueKontaktnummer<>'' then\r\n begin\r\n edtsuchbegriff.text:=NeueKontaktnummer;\r\n edtSuchbegriffChange(nil);\r\n btnKontaktAendernClick(nil);\r\n end;\r\n end;\r\n end;\r\n\r\n var\r\n res: TModalResult;\r\n mynachname:string;\r\nbegin\r\n InputNachname.DialogType := mtConfirmation;\r\n InputNachname.InputValue := '';\r\n InputNachname.InputType := ittext;\r\n InputNachname.Message := 'Bitte geben Sie den Nachname des neuen Kontakts ein';\r\n InputNachname.Buttons := [mbOK, mbCancel];\r\n res := await(TModalResult, InputNachname.ShowAsync);\r\n If res=mrOK then\r\n begin\r\n WClient.RawInvoke('IServerService.NeuerKontakt',[InputNachname.InputValue],@OnResponse);\r\n end;\r\nend;\r\n\r\nprocedure TfrmKontaktSuche.btnScanClick(Sender: TObject);\r\nvar\r\n LFrm:TBarcodeScan;\r\n procedure AfterCreate(AForm:TObject);\r\n var\r\n LForm:TBarcodeScan;\r\n begin\r\n LForm:=(AForm as TBarcodeScan);\r\n //lform.mykundehint:=xdsEinzelkontaktKundennummer.AsString+' '+xdsEinzelkontaktNachname.AsString+', '+xdsEinzelkontaktVorname.asstring;\r\n //lForm.edttoaddress.Text:= xdsEinzelkontaktPostleitzahl.AsString+' '+xdsEinzelkontaktort.AsString+', '+xdsEinzelkontaktStrasse.AsString;\r\n\r\n end;\r\n\r\n procedure AfterShowmodal(Avalue:TModalResult);\r\n begin\r\n edtsuchbegriff.text:=lfrm.ScanErgebnis;\r\n edtsuchbegriffChange(self);\r\n end;\r\n begin\r\n LFrm:=TBarcodeScan.CreateNew(@AfterCreate);\r\n LFrm.ShowModal(@AfterShowmodal);\r\nend;\r\n\r\nprocedure TfrmKontaktSuche.btnzurueckClick(Sender: TObject);\r\nbegin\r\n self.Close;\r\nend;\r\n\r\nprocedure TfrmKontaktSuche.buttonkundennummerclick(Sender:TObject);\r\nvar\r\n MFrm:TEinzelkontakt;\r\n procedure AfterCreate(AForm:TObject);\r\n var\r\n MForm:TEinzelkontakt;\r\n begin\r\n MForm:=(AForm as TEinzelkontakt);\r\n MForm.KundennummerID:=Kontaktnummer;\r\n end;\r\n\r\n procedure AfterShowmodal(Avalue:TModalResult);\r\n begin\r\n edtsuchbegriffChange(nil);\r\n end;\r\n\r\n begin\r\n\r\n Kontaktnummer:=(sender as TButton).Caption;\r\n dataset.Locate('Kundennummer',kontaktnummer,[]);\r\n LUNachname:=DataSetNachname.AsString;\r\n LUVorname:=DataSetVorname.AsString;\r\n LUAdressebild:=DataSetAdresseBild.AsString;\r\n if weiterzueinzelkontakt then\r\n begin\r\n Container3.HTML.Text:='';\r\n MFrm:=TEinzelkontakt.CreateNew(@AfterCreate);\r\n MFrm.ShowModal(@AfterShowmodal);\r\n end\r\n else\r\n begin\r\n self.Close;\r\n end;\r\nend;\r\n\r\n\r\n\r\nprocedure TfrmKontaktSuche.DataSetAfterOpen(DataSet: TDataSet);\r\nvar\r\n i:integer;\r\n myelement:TJSHTMLElement;\r\nbegin\r\n myelement:=container3.ElementHandle;\r\n tc.ParentElement:=myelement;\r\n i:=0;\r\n TC.visible:=true;\r\n TC.ColCount:=4;\r\n tc.RowCount:=dataset.RecordCount+1;\r\n tc.Cells[0,i]:='Kundennummer';\r\n tc.Cells[1,i]:='Nachname';\r\n tc.Cells[2,i]:='Vorname';\r\n tc.Cells[3,i]:='Anschrift';\r\n dataset.First;\r\n if dataset.RecordCount=0 then resultlabel.Caption:='nichts gefunden';\r\n if dataset.RecordCount>0 then resultlabel.Caption:='Übereinstimmungen: '+inttostr(dataset.RecordCount);\r\n if dataset.RecordCount>20 then resultlabel.Caption:='mehr als 20 Übereinstimmungen';\r\n\r\n while not dataset.eof do\r\n begin\r\n inc(i);\r\n myelement:=TC.cellelements[0,i];\r\n myelement.innerHTML:='';\r\n buttonkundennummer:=TButton.Create(self);\r\n buttonkundennummer.ElementClassName:='btn btn-sm btn-info';\r\n buttonkundennummer.HeightStyle:=ssauto;\r\n buttonkundennummer.Width:=150;\r\n buttonkundennummer.tag:=0;\r\n buttonkundennummer.Caption:=DataSetKundennummer.AsString;\r\n buttonkundennummer.OnClick:=@buttonkundennummerClick;\r\n buttonkundennummer.ParentElement:=myelement;\r\n TC.Cells[1,i]:=DataSetNachname.AsString;\r\n TC.Cells[2,i]:=DataSetVorname.AsString;\r\n TC.Cells[3,i]:='
'+ReplaceStr(DataSetAdresseBild.AsString,#13+#10,'
');;\r\n dataset.Next;\r\n end;\r\n\r\n\r\nend;\r\n\r\n\r\n\r\nprocedure TfrmKontaktSuche.edtSuchbegriffChange(Sender: TObject);\r\nvar\r\n suchtextkontakt:string;\r\nbegin\r\n suchtextkontakt:=replacestr(edtsuchbegriff.Text,'&','%');\r\n\r\n if length(suchtextkontakt)>0 then\r\n begin\r\n\r\n dataset.Close;\r\n dataset.QueryString:='$filter=contains(Nachname, '''+suchtextkontakt+''') OR contains(Kundennummer, '''+suchtextkontakt+''') OR contains(AdresseBild, '''+suchtextkontakt+''')';\r\n dataset.Load;\r\n end;\r\n\r\nend;\r\n\r\nprocedure TfrmKontaktSuche.btnKontaktAendernClick(Sender: TObject);\r\nvar\r\n LFrm:TKontaktAenderung;\r\n procedure AfterCreate(AForm:TObject);\r\n var\r\n LForm:TKontaktAenderung;\r\n begin\r\n TC.Visible:=false;\r\n LForm:=(AForm as TKontaktAenderung);\r\n lform.AEKundennummer:=NeueKontaktnummer;\r\n end;\r\n\r\n procedure AfterShowmodal(Avalue:TModalResult);\r\n begin\r\n TC.Visible:=false;\r\n edtsuchbegriff.text:=NeueKontaktnummer;\r\n edtSuchbegriffChange(nil);\r\n end;\r\n begin\r\n\r\n LFrm:=TKontaktAenderung.CreateNew(@AfterCreate);\r\n LFrm.ShowModal(@AfterShowmodal);\r\n\r\nend;\r\n\r\nprocedure TfrmKontaktSuche.WebFormShow(Sender: TObject);\r\nvar\r\n myelement:TJSHTMLElement;\r\nbegin\r\n Container1.html.text:='';\r\n myelement:=container1.ElementHandle;\r\n btnzurueck.ParentElement:=myelement;\r\n btnscan.ParentElement:=myelement;\r\n btnNeuerKontakt.ParentElement:=myelement;\r\n container2.ParentElement:=myelement;\r\n Container3.ParentElement:=myelement;\r\n myelement:=container2.ElementHandle;\r\n resultlabel.Caption:='Suchbegriff';\r\n resultlabel.ParentElement:=myelement;\r\n edtsuchbegriff.ParentElement:=myelement;\r\n TC.Visible:=false;\r\n Kontaktnummer:='';\r\n edtsuchbegriff.SetFocus;\r\nend;\r\n\r\nprocedure TfrmKontaktSuche.LoadDFMValues;\r\nbegin\r\n inherited LoadDFMValues;\r\n\r\n ResultLabel := TLabel.Create(Self);\r\n Container1 := THTMLContainer.Create(Self);\r\n Container2 := THTMLContainer.Create(Self);\r\n Container3 := THTMLContainer.Create(Self);\r\n TC := TTableControl.Create(Self);\r\n btnzurueck := TButton.Create(Self);\r\n btnScan := TButton.Create(Self);\r\n edtSuchbegriff := TEdit.Create(Self);\r\n btnNeuerKontakt := TButton.Create(Self);\r\n InputNachname := TInputMessageDlg.Create(Self);\r\n btnKontaktAendern := TButton.Create(Self);\r\n DataSet := TXDataWebDataSet.Create(Self);\r\n DataSetKundennummer := TStringField.Create(Self);\r\n DataSetNachname := TStringField.Create(Self);\r\n DataSetVorname := TStringField.Create(Self);\r\n DataSetAdresseBild := TStringField.Create(Self);\r\n Source := TDataSource.Create(Self);\r\n WClient := TXDataWebClient.Create(Self);\r\n\r\n ResultLabel.BeforeLoadDFMValues;\r\n Container1.BeforeLoadDFMValues;\r\n Container2.BeforeLoadDFMValues;\r\n Container3.BeforeLoadDFMValues;\r\n TC.BeforeLoadDFMValues;\r\n btnzurueck.BeforeLoadDFMValues;\r\n btnScan.BeforeLoadDFMValues;\r\n edtSuchbegriff.BeforeLoadDFMValues;\r\n btnNeuerKontakt.BeforeLoadDFMValues;\r\n InputNachname.BeforeLoadDFMValues;\r\n btnKontaktAendern.BeforeLoadDFMValues;\r\n DataSet.BeforeLoadDFMValues;\r\n DataSetKundennummer.BeforeLoadDFMValues;\r\n DataSetNachname.BeforeLoadDFMValues;\r\n DataSetVorname.BeforeLoadDFMValues;\r\n DataSetAdresseBild.BeforeLoadDFMValues;\r\n Source.BeforeLoadDFMValues;\r\n WClient.BeforeLoadDFMValues;\r\n try\r\n Name := 'frmKontaktSuche';\r\n Width := 223;\r\n Height := 376;\r\n CSSLibrary := cssBootstrap;\r\n ElementFont := efCSS;\r\n SetEvent(Self, 'OnShow', 'WebFormShow');\r\n ResultLabel.SetParentComponent(Self);\r\n ResultLabel.Name := 'ResultLabel';\r\n ResultLabel.Left := 114;\r\n ResultLabel.Top := 231;\r\n ResultLabel.Width := 60;\r\n ResultLabel.Height := 15;\r\n ResultLabel.Caption := 'ResultLabel';\r\n ResultLabel.ElementClassName := 'h6 m-2';\r\n ResultLabel.ElementFont := efCSS;\r\n ResultLabel.ElementPosition := epIgnore;\r\n ResultLabel.HeightStyle := ssAuto;\r\n ResultLabel.HeightPercent := 100.000000000000000000;\r\n ResultLabel.WidthStyle := ssPercent;\r\n ResultLabel.WidthPercent := 100.000000000000000000;\r\n Container1.SetParentComponent(Self);\r\n Container1.Name := 'Container1';\r\n Container1.Left := 0;\r\n Container1.Top := 0;\r\n Container1.Width := 169;\r\n Container1.Height := 41;\r\n Container1.HeightStyle := ssAuto;\r\n Container1.WidthStyle := ssPercent;\r\n Container1.ElementFont := efCSS;\r\n Container1.ElementPosition := epIgnore;\r\n Container2.SetParentComponent(Self);\r\n Container2.Name := 'Container2';\r\n Container2.Left := 0;\r\n Container2.Top := 47;\r\n Container2.Width := 169;\r\n Container2.Height := 41;\r\n Container2.ElementClassName := 'd-flex flex-wrap m-1 border border-info';\r\n Container2.HeightStyle := ssAuto;\r\n Container2.WidthStyle := ssAuto;\r\n Container2.ChildOrder := 1;\r\n Container2.ElementFont := efCSS;\r\n Container2.ElementPosition := epIgnore;\r\n Container3.SetParentComponent(Self);\r\n Container3.Name := 'Container3';\r\n Container3.Left := 0;\r\n Container3.Top := 94;\r\n Container3.Width := 169;\r\n Container3.Height := 41;\r\n Container3.ElementClassName := 'd-flex m-1';\r\n Container3.HeightStyle := ssAuto;\r\n Container3.WidthStyle := ssAuto;\r\n Container3.ChildOrder := 2;\r\n Container3.ElementFont := efCSS;\r\n Container3.ElementPosition := epIgnore;\r\n TC.SetParentComponent(Self);\r\n TC.Name := 'TC';\r\n TC.Left := 0;\r\n TC.Top := 141;\r\n TC.Width := 169;\r\n TC.Height := 79;\r\n TC.ElementClassName := 'table table-hover table-bordered table-striped';\r\n TC.HeightStyle := ssAuto;\r\n TC.WidthStyle := ssPercent;\r\n TC.BorderColor := clSilver;\r\n TC.ChildOrder := 3;\r\n TC.ColHeader := False;\r\n TC.ElementFont := efCSS;\r\n TC.ElementHeaderClassName := 'table-info';\r\n TC.ElementPosition := epIgnore;\r\n TC.ElementTableClassName := 'table table-hover table-bordered table-striped';\r\n TC.WordWrap := True;\r\n TC.ColCount := 1;\r\n TC.RowCount := 5;\r\n btnzurueck.SetParentComponent(Self);\r\n btnzurueck.Name := 'btnzurueck';\r\n btnzurueck.Left := 0;\r\n btnzurueck.Top := 226;\r\n btnzurueck.Width := 96;\r\n btnzurueck.Height := 25;\r\n btnzurueck.Caption := '<< zur'#252'ck';\r\n btnzurueck.ChildOrder := 4;\r\n btnzurueck.ElementClassName := 'btn btn-info btn-sm m-1 text-left';\r\n btnzurueck.ElementFont := efCSS;\r\n btnzurueck.ElementPosition := epIgnore;\r\n btnzurueck.HeightStyle := ssAuto;\r\n btnzurueck.HeightPercent := 100.000000000000000000;\r\n btnzurueck.WidthStyle := ssAuto;\r\n btnzurueck.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnzurueck, Self, 'OnClick', 'btnzurueckClick');\r\n btnScan.SetParentComponent(Self);\r\n btnScan.Name := 'btnScan';\r\n btnScan.Left := 0;\r\n btnScan.Top := 257;\r\n btnScan.Width := 96;\r\n btnScan.Height := 25;\r\n btnScan.Caption := 'Bar-/QR-Code scannen';\r\n btnScan.ChildOrder := 4;\r\n btnScan.ElementClassName := 'btn btn-info btn-sm m-1 text-left';\r\n btnScan.ElementFont := efCSS;\r\n btnScan.ElementPosition := epIgnore;\r\n btnScan.HeightStyle := ssAuto;\r\n btnScan.HeightPercent := 100.000000000000000000;\r\n btnScan.WidthStyle := ssAuto;\r\n btnScan.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnScan, Self, 'OnClick', 'btnScanClick');\r\n edtSuchbegriff.SetParentComponent(Self);\r\n edtSuchbegriff.Name := 'edtSuchbegriff';\r\n edtSuchbegriff.Left := 8;\r\n edtSuchbegriff.Top := 296;\r\n edtSuchbegriff.Width := 150;\r\n edtSuchbegriff.Height := 22;\r\n edtSuchbegriff.ChildOrder := 6;\r\n edtSuchbegriff.ElementClassName := 'form-control input-sm m-1';\r\n edtSuchbegriff.ElementFont := efCSS;\r\n edtSuchbegriff.ElementPosition := epIgnore;\r\n edtSuchbegriff.HeightStyle := ssAuto;\r\n edtSuchbegriff.HeightPercent := 100.000000000000000000;\r\n edtSuchbegriff.ShowHint := True;\r\n edtSuchbegriff.TextHint := 'Suchbegriff eingeben';\r\n edtSuchbegriff.WidthPercent := 60.000000000000000000;\r\n SetEvent(edtSuchbegriff, Self, 'OnChange', 'edtSuchbegriffChange');\r\n btnNeuerKontakt.SetParentComponent(Self);\r\n btnNeuerKontakt.Name := 'btnNeuerKontakt';\r\n btnNeuerKontakt.Left := 32;\r\n btnNeuerKontakt.Top := 324;\r\n btnNeuerKontakt.Width := 96;\r\n btnNeuerKontakt.Height := 25;\r\n btnNeuerKontakt.Caption := '+ Neuer Kontakt';\r\n btnNeuerKontakt.ChildOrder := 4;\r\n btnNeuerKontakt.ElementClassName := 'btn btn-info btn-sm m-1 text-left';\r\n btnNeuerKontakt.ElementFont := efCSS;\r\n btnNeuerKontakt.ElementPosition := epIgnore;\r\n btnNeuerKontakt.HeightStyle := ssAuto;\r\n btnNeuerKontakt.HeightPercent := 100.000000000000000000;\r\n btnNeuerKontakt.WidthStyle := ssAuto;\r\n btnNeuerKontakt.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnNeuerKontakt, Self, 'OnClick', 'btnNeuerKontaktClick');\r\n InputNachname.SetParentComponent(Self);\r\n InputNachname.Name := 'InputNachname';\r\n InputNachname.Left := 99;\r\n InputNachname.Top := 176;\r\n InputNachname.Width := 24;\r\n InputNachname.Height := 24;\r\n InputNachname.Center.Horizontal := True;\r\n InputNachname.Center.Vertical := True;\r\n InputNachname.Buttons := [mbOK,mbCancel];\r\n InputNachname.Opacity := 0.200000000000000000;\r\n InputNachname.Title := 'Nachname';\r\n InputNachname.ElementButtonClassName := 'btn';\r\n InputNachname.ElementDialogClassName := 'shadow-lg p-3 mb-5 bg-white rounded';\r\n InputNachname.ElementTitleClassName := 'text-body';\r\n InputNachname.ElementContentClassName := 'text-body';\r\n btnKontaktAendern.SetParentComponent(Self);\r\n btnKontaktAendern.Name := 'btnKontaktAendern';\r\n btnKontaktAendern.Left := 114;\r\n btnKontaktAendern.Top := 119;\r\n btnKontaktAendern.Width := 96;\r\n btnKontaktAendern.Height := 25;\r\n btnKontaktAendern.Caption := 'btnKontaktAendern';\r\n btnKontaktAendern.ChildOrder := 10;\r\n btnKontaktAendern.ElementClassName := 'btn btn-light';\r\n btnKontaktAendern.ElementFont := efCSS;\r\n btnKontaktAendern.HeightStyle := ssAuto;\r\n btnKontaktAendern.HeightPercent := 100.000000000000000000;\r\n btnKontaktAendern.Visible := False;\r\n btnKontaktAendern.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnKontaktAendern, Self, 'OnClick', 'btnKontaktAendernClick');\r\n DataSet.SetParentComponent(Self);\r\n DataSet.Name := 'DataSet';\r\n DataSet.AfterOpen := DataSetAfterOpen;\r\n DataSet.EntitySetName := 'Adressen';\r\n DataSet.Connection := DM2.XDataWebConnection1;\r\n DataSet.QueryTop := 21;\r\n DataSet.Left := 8;\r\n DataSet.Top := 56;\r\n DataSetKundennummer.SetParentComponent(DataSet);\r\n DataSetKundennummer.Name := 'DataSetKundennummer';\r\n DataSetKundennummer.FieldName := 'Kundennummer';\r\n DataSetKundennummer.Required := True;\r\n DataSetKundennummer.Size := 13;\r\n DataSetNachname.SetParentComponent(DataSet);\r\n DataSetNachname.Name := 'DataSetNachname';\r\n DataSetNachname.FieldName := 'Nachname';\r\n DataSetNachname.Required := True;\r\n DataSetNachname.Size := 40;\r\n DataSetVorname.SetParentComponent(DataSet);\r\n DataSetVorname.Name := 'DataSetVorname';\r\n DataSetVorname.FieldName := 'Vorname';\r\n DataSetVorname.Size := 40;\r\n DataSetAdresseBild.SetParentComponent(DataSet);\r\n DataSetAdresseBild.Name := 'DataSetAdresseBild';\r\n DataSetAdresseBild.FieldName := 'AdresseBild';\r\n DataSetAdresseBild.Size := 255;\r\n Source.SetParentComponent(Self);\r\n Source.Name := 'Source';\r\n Source.DataSet := DataSet;\r\n Source.Left := 56;\r\n Source.Top := 56;\r\n WClient.SetParentComponent(Self);\r\n WClient.Name := 'WClient';\r\n WClient.Connection := DM2.XDataWebConnection1;\r\n WClient.Left := 152;\r\n WClient.Top := 56;\r\n finally\r\n ResultLabel.AfterLoadDFMValues;\r\n Container1.AfterLoadDFMValues;\r\n Container2.AfterLoadDFMValues;\r\n Container3.AfterLoadDFMValues;\r\n TC.AfterLoadDFMValues;\r\n btnzurueck.AfterLoadDFMValues;\r\n btnScan.AfterLoadDFMValues;\r\n edtSuchbegriff.AfterLoadDFMValues;\r\n btnNeuerKontakt.AfterLoadDFMValues;\r\n InputNachname.AfterLoadDFMValues;\r\n btnKontaktAendern.AfterLoadDFMValues;\r\n DataSet.AfterLoadDFMValues;\r\n DataSetKundennummer.AfterLoadDFMValues;\r\n DataSetNachname.AfterLoadDFMValues;\r\n DataSetVorname.AfterLoadDFMValues;\r\n DataSetAdresseBild.AfterLoadDFMValues;\r\n Source.AfterLoadDFMValues;\r\n WClient.AfterLoadDFMValues;\r\n end;\r\nend;\r\n\r\nend.\r\n","unit unit_Objektsuche;\r\n\r\ninterface\r\n\r\nuses\r\n System.SysUtils, System.Classes, JS, Web, WEBLib.Graphics, WEBLib.Controls,\r\n WEBLib.Forms, WEBLib.Dialogs, Data.DB, WEBLib.DB, XData.Web.JsonDataset,\r\n XData.Web.Dataset, XData.Web.Connection, Vcl.Controls, Vcl.StdCtrls,\r\n WEBLib.StdCtrls, WEBLib.ExtCtrls, Vcl.Grids, WEBLib.DBCtrls, VCL.TMSFNCTypes,\r\n VCL.TMSFNCUtils, VCL.TMSFNCGraphics, VCL.TMSFNCGraphicsTypes,\r\n VCL.TMSFNCCustomControl, VCL.TMSFNCTableView, WEBLib.Buttons, WEBLib.Grids, DB;\r\n\r\ntype\r\n TfrmObjektsuche = class(TForm)\r\n DataSet: TXDataWebDataSet;\r\n Source: TDataSource;\r\n DataSetObjektReferenz: TStringField;\r\n DataSetKurzbezeichnung: TStringField;\r\n DataSetBezeichnung: TStringField;\r\n DataSetNachname: TStringField;\r\n DataSetObjektnummer: TStringField;\r\n DataSetKundennummer: TStringField;\r\n TC: TTableControl;\r\n procedure WebFormCreate(Sender: TObject);\r\n procedure DataSetAfterOpen(DataSet: TDataSet);\r\n procedure WebFormShow(Sender: TObject);\r\n\r\n public\r\n Objektreferenz:string;\r\n luObjektnummer:string;\r\n luObjektkurzbezeichnung:string;\r\n edtsuchbegriff:TEdit;\r\n infolabel:TLabel;\r\n buttonzurueck:TButton;\r\n buttonscan:TButton;\r\n buttonobjektreferenz:TButton;\r\n procedure buttonzurueckclick(Sender:TObject);\r\n procedure edtsuchbegriffChange(Sender: TObject);\r\n procedure buttonscanclick(Sender:TObject);\r\n procedure buttonobjektreferenzclick(Sender:TObject);\r\n protected procedure LoadDFMValues; override; end;\r\n\r\nvar\r\n frmObjektsuche: TfrmObjektsuche;\r\n\r\nimplementation\r\n uses unit1, unit2, unit_BarcodeScan;\r\n{$R *.dfm}\r\n\r\nprocedure TfrmObjektsuche.buttonzurueckclick(Sender:TObject);\r\nbegin\r\n self.close;\r\nend;\r\n\r\nprocedure TfrmObjektsuche.buttonscanclick(Sender:TObject);\r\nvar\r\n LFrm:TBarcodeScan;\r\n procedure AfterCreate(AForm:TObject);\r\n var\r\n LForm:TBarcodeScan;\r\n begin\r\n LForm:=(AForm as TBarcodeScan);\r\n //lform.mykundehint:=xdsEinzelkontaktKundennummer.AsString+' '+xdsEinzelkontaktNachname.AsString+', '+xdsEinzelkontaktVorname.asstring;\r\n //lForm.edttoaddress.Text:= xdsEinzelkontaktPostleitzahl.AsString+' '+xdsEinzelkontaktort.AsString+', '+xdsEinzelkontaktStrasse.AsString;\r\n\r\n end;\r\n\r\n procedure AfterShowmodal(Avalue:TModalResult);\r\n begin\r\n edtsuchbegriff.text:=lfrm.ScanErgebnis;\r\n edtsuchbegriffChange(self);\r\n end;\r\n begin\r\n if LizenzOK then\r\n begin\r\n LFrm:=TBarcodeScan.CreateNew(@AfterCreate);\r\n LFrm.ShowModal(@AfterShowmodal);\r\n end\r\n else\r\n begin\r\n showmessage('Für diese Funktion sind Sie noch nicht freigeschaltet, bitte erwerben Sie eine Lizenz');\r\n end;\r\nend;\r\n\r\nprocedure TfrmObjektsuche.DataSetAfterOpen(DataSet: TDataSet);\r\nvar\r\n i:integer;\r\n myelement:TJSHTMLElement;\r\nbegin\r\n i:=3;\r\n\r\n tc.RowCount:=dataset.RecordCount+4;\r\n dataset.First;\r\n if dataset.RecordCount=0 then infolabel.Caption:='nichts gefunden';\r\n if dataset.RecordCount>0 then infolabel.Caption:='Übereinstimmungen: '+inttostr(dataset.RecordCount);\r\n if dataset.RecordCount>20 then infolabel.Caption:='mehr als 20 Übereinstimmungen';\r\n\r\n while not dataset.eof do\r\n begin\r\n inc(i);\r\n myelement:=TC.cellelements[0,i];\r\n myelement.innerHTML:='';\r\n buttonobjektreferenz:=TButton.Create(self);\r\n buttonobjektreferenz.ElementClassName:='btn btn-sm btn-outline-info';\r\n buttonobjektreferenz.HeightStyle:=ssauto;\r\n buttonobjektreferenz.Width:=150;\r\n buttonobjektreferenz.tag:=0;\r\n buttonobjektreferenz.Caption:=DataSetObjektReferenz.AsString;\r\n buttonobjektreferenz.OnClick:=@buttonobjektreferenzClick;\r\n buttonobjektreferenz.ParentElement:=myelement;\r\n TC.Cells[1,i]:=DataSetObjektReferenz.AsString;\r\n TC.Cells[2,i]:=DataSetObjektnummer.AsString;\r\n TC.Cells[3,i]:=DataSetKurzbezeichnung.AsString;\r\n TC.Cells[4,i]:=DataSetKundennummer.AsString;\r\n TC.Cells[5,i]:=DataSetNachname.AsString;\r\n TC.Cells[65,i]:=DataSetBezeichnung.AsString;\r\n dataset.Next;\r\n end;\r\n\r\n\r\nend;\r\n\r\nprocedure TfrmObjektsuche.buttonobjektreferenzclick(Sender:TObject);\r\nbegin\r\n Objektreferenz:=(sender AS Tbutton).Caption;\r\n dataset.Locate('ObjektReferenz',objektreferenz,[]);\r\n luObjektnummer:=DataSetObjektnummer.AsString;\r\n luObjektkurzbezeichnung:=DataSetKurzbezeichnung.AsString;\r\n self.close;\r\nend;\r\n\r\nprocedure TfrmObjektsuche.edtsuchbegriffChange(Sender: TObject);\r\nvar\r\n suchtext:string;\r\nbegin\r\n suchtext:=edtsuchbegriff.Text;\r\n if length(suchtext)>0 then\r\n begin\r\n dataset.Close;\r\n dataset.QueryString:='$filter=contains(Kurzbezeichnung, '+QuotedStr(suchtext)+') OR contains(Objektnummer, '+QuotedStr(suchtext)+')';\r\n dataset.Load;\r\n end;\r\nend;\r\n\r\nprocedure TfrmObjektsuche.WebFormCreate(Sender: TObject);\r\nvar\r\n myelement:TJSHTMLElement;\r\nbegin\r\n TC.ColCount:=6;\r\n TC.RowCount:=5;\r\n TC.Cells[0,0]:='

Objektsuche';\r\n\r\n myelement:=TC.cellelements[0,1];\r\n myelement.innerHTML:='';\r\n buttonzurueck:=TButton.Create(self);\r\n buttonzurueck.ElementClassName:='btn btn-info text-left';\r\n buttonzurueck.HeightStyle:=ssauto;\r\n buttonzurueck.WidthStyle:=ssauto;\r\n buttonzurueck.tag:=0;\r\n buttonzurueck.Caption:='<< zurück';\r\n buttonzurueck.OnClick:=@buttonzurueckClick;\r\n buttonzurueck.ParentElement:=myelement;\r\n myelement:=TC.cellelements[0,2];\r\n myelement.innerHTML:='';\r\n infolabel:=TLabel.Create(self);\r\n infolabel.Caption:='Suchbegriff eingeben oder Code scannen->';\r\n infolabel.ElementFont:=efCSS;\r\n infolabel.ParentElement:=myelement;\r\n edtsuchbegriff:=TEdit.Create(self);\r\n edtsuchbegriff.ElementClassName:='form-control';\r\n edtsuchbegriff.ElementFont:=efCSS;\r\n edtsuchbegriff.HeightStyle:=ssauto;\r\n edtsuchbegriff.Width:=150;\r\n edtsuchbegriff.OnChange:=@edtsuchbegriffChange;\r\n edtsuchbegriff.ParentElement:=myelement;\r\n myelement:=TC.cellelements[1,2];\r\n myelement.innerHTML:='';\r\n buttonscan:=TButton.Create(self);\r\n buttonscan.ElementClassName:='btn btn-info text-left';\r\n buttonscan.HeightStyle:=ssauto;\r\n buttonscan.WidthStyle:=ssauto;\r\n buttonscan.tag:=0;\r\n buttonscan.Caption:='Scan';\r\n buttonscan.OnClick:=@buttonscanClick;\r\n buttonscan.ParentElement:=myelement;\r\n\r\n tc.Cells[0,3]:='Objektreferenz';\r\n tc.Cells[1,3]:='Objektnummer';\r\n tc.Cells[2,3]:='Kurzbezeichnung';\r\n tc.Cells[3,3]:='Kundennummer';\r\n tc.Cells[4,3]:='Nachname';\r\n tc.Cells[5,3]:='Bezeichnung';\r\nend;\r\n\r\n\r\nprocedure TfrmObjektsuche.WebFormShow(Sender: TObject);\r\nbegin\r\n edtsuchbegriff.SetFocus;\r\n edtsuchbegriff.Text:='';\r\n if PZE_AutoObjektnummer<>'' then\r\n begin\r\n edtsuchbegriff.Text:=PZE_AutoObjektnummer;\r\n edtsuchbegriffChange(sender);\r\n PZE_AutoObjektnummer:='';\r\n end;\r\nend;\r\n\r\nprocedure TfrmObjektsuche.LoadDFMValues;\r\nbegin\r\n inherited LoadDFMValues;\r\n\r\n TC := TTableControl.Create(Self);\r\n DataSet := TXDataWebDataSet.Create(Self);\r\n DataSetObjektnummer := TStringField.Create(Self);\r\n DataSetKurzbezeichnung := TStringField.Create(Self);\r\n DataSetBezeichnung := TStringField.Create(Self);\r\n DataSetNachname := TStringField.Create(Self);\r\n DataSetObjektReferenz := TStringField.Create(Self);\r\n DataSetKundennummer := TStringField.Create(Self);\r\n Source := TDataSource.Create(Self);\r\n\r\n TC.BeforeLoadDFMValues;\r\n DataSet.BeforeLoadDFMValues;\r\n DataSetObjektnummer.BeforeLoadDFMValues;\r\n DataSetKurzbezeichnung.BeforeLoadDFMValues;\r\n DataSetBezeichnung.BeforeLoadDFMValues;\r\n DataSetNachname.BeforeLoadDFMValues;\r\n DataSetObjektReferenz.BeforeLoadDFMValues;\r\n DataSetKundennummer.BeforeLoadDFMValues;\r\n Source.BeforeLoadDFMValues;\r\n try\r\n Name := 'frmObjektsuche';\r\n Width := 243;\r\n Height := 318;\r\n CSSLibrary := cssBootstrap;\r\n ElementFont := efCSS;\r\n FormStyle := fsStayOnTop;\r\n SetEvent(Self, 'OnCreate', 'WebFormCreate');\r\n SetEvent(Self, 'OnShow', 'WebFormShow');\r\n TC.SetParentComponent(Self);\r\n TC.Name := 'TC';\r\n TC.Left := 0;\r\n TC.Top := 0;\r\n TC.Width := 243;\r\n TC.Height := 318;\r\n TC.ElementClassName := 'table table-hover table-bordered table-striped';\r\n TC.Align := alClient;\r\n TC.BorderColor := clSilver;\r\n TC.ChildOrder := 3;\r\n TC.ColHeader := False;\r\n TC.ElementHeaderClassName := 'table-info';\r\n TC.ElementTableClassName := 'table table-hover table-bordered table-striped';\r\n TC.Options.ScrollVertical := True;\r\n TC.WordWrap := True;\r\n TC.ColCount := 1;\r\n TC.RowCount := 5;\r\n DataSet.SetParentComponent(Self);\r\n DataSet.Name := 'DataSet';\r\n DataSet.AfterOpen := DataSetAfterOpen;\r\n DataSet.EntitySetName := 'Objekte';\r\n DataSet.Connection := DM2.XDataWebConnection1;\r\n DataSet.Left := 56;\r\n DataSet.Top := 168;\r\n DataSetObjektnummer.SetParentComponent(DataSet);\r\n DataSetObjektnummer.Name := 'DataSetObjektnummer';\r\n DataSetObjektnummer.FieldName := 'Objektnummer';\r\n DataSetObjektnummer.Size := 25;\r\n DataSetKurzbezeichnung.SetParentComponent(DataSet);\r\n DataSetKurzbezeichnung.Name := 'DataSetKurzbezeichnung';\r\n DataSetKurzbezeichnung.FieldName := 'Kurzbezeichnung';\r\n DataSetKurzbezeichnung.Size := 25;\r\n DataSetBezeichnung.SetParentComponent(DataSet);\r\n DataSetBezeichnung.Name := 'DataSetBezeichnung';\r\n DataSetBezeichnung.FieldName := 'Bezeichnung';\r\n DataSetBezeichnung.Size := 255;\r\n DataSetNachname.SetParentComponent(DataSet);\r\n DataSetNachname.Name := 'DataSetNachname';\r\n DataSetNachname.FieldName := 'Nachname';\r\n DataSetNachname.Size := 40;\r\n DataSetObjektReferenz.SetParentComponent(DataSet);\r\n DataSetObjektReferenz.Name := 'DataSetObjektReferenz';\r\n DataSetObjektReferenz.FieldName := 'ObjektReferenz';\r\n DataSetObjektReferenz.Required := True;\r\n DataSetObjektReferenz.Size := 13;\r\n DataSetKundennummer.SetParentComponent(DataSet);\r\n DataSetKundennummer.Name := 'DataSetKundennummer';\r\n DataSetKundennummer.FieldName := 'Kundennummer';\r\n DataSetKundennummer.Size := 13;\r\n Source.SetParentComponent(Self);\r\n Source.Name := 'Source';\r\n Source.DataSet := DataSet;\r\n Source.Left := 56;\r\n Source.Top := 224;\r\n finally\r\n TC.AfterLoadDFMValues;\r\n DataSet.AfterLoadDFMValues;\r\n DataSetObjektnummer.AfterLoadDFMValues;\r\n DataSetKurzbezeichnung.AfterLoadDFMValues;\r\n DataSetBezeichnung.AfterLoadDFMValues;\r\n DataSetNachname.AfterLoadDFMValues;\r\n DataSetObjektReferenz.AfterLoadDFMValues;\r\n DataSetKundennummer.AfterLoadDFMValues;\r\n Source.AfterLoadDFMValues;\r\n end;\r\nend;\r\n\r\nend.\r\n","unit unit_Einzeltermin;\r\n\r\ninterface\r\n\r\nuses\r\n System.SysUtils, System.Classes, JS, Web, WEBLib.Graphics, WEBLib.Controls,\r\n WEBLib.Forms, WEBLib.Dialogs, Data.DB, WEBLib.DB, XData.Web.JsonDataset,\r\n XData.Web.Dataset, XData.Web.Connection, Vcl.Controls, Vcl.StdCtrls,\r\n WEBLib.StdCtrls, WEBLib.ExtCtrls, Vcl.Grids, WEBLib.DBCtrls, VCL.TMSFNCTypes,\r\n VCL.TMSFNCUtils, VCL.TMSFNCGraphics, VCL.TMSFNCGraphicsTypes,\r\n VCL.TMSFNCCustomControl, VCL.TMSFNCTableView, strutils, WEBLib.Buttons,\r\n VCL.TMSFNCDateTimePicker, WEBLib.Grids, WEBLib.WebCtrls;\r\n\r\ntype\r\n TfrmEinzeltermin = class(TForm)\r\n myDataSet: TXDataWebDataSet;\r\n Source: TDataSource;\r\n myDataSetArtikelnummer: TXDataWebEntityField;\r\n myDataSetUID: TStringField;\r\n myDataSetBeginn: TDateTimeField;\r\n myDataSetEnde: TDateTimeField;\r\n myDataSetBetreff: TStringField;\r\n myDataSetTerminNotiz: TStringField;\r\n myDataSetQuelle: TStringField;\r\n myDataSetGUIDOutlook: TStringField;\r\n myDataSetShape: TIntegerField;\r\n myDataSetColor: TIntegerField;\r\n myDataSetAlarm: TBooleanField;\r\n myDataSetResource: TIntegerField;\r\n myDataSetLastModificationTime: TDateTimeField;\r\n myDataSetGeburtstag: TBooleanField;\r\n myDataSetAlarmBefore: TIntegerField;\r\n myDataSetPersonalnummer: TIntegerField;\r\n myDataSetKundennummer: TStringField;\r\n myDataSetAllDayEventOutlook: TBooleanField;\r\n myDataSetTMSCaption: TBooleanField;\r\n myDataSetRECURRENCY: TStringField;\r\n myDataSetMINTIME: TDateTimeField;\r\n myDataSetMAXTIME: TDateTimeField;\r\n myDataSetNachname: TStringField;\r\n myDataSetObjektReferenz: TStringField;\r\n myDataSetObjektnummer: TStringField;\r\n myDataSetTerminArt: TIntegerField;\r\n myDataSetBeginnDatum: TDateTimeField;\r\n myDataSetBeginnUhrzeit: TDateTimeField;\r\n myDataSetEndeDatum: TDateTimeField;\r\n myDataSetEndeUhrzeit: TDateTimeField;\r\n myDataSetKalenderAnzeige: TBooleanField;\r\n myDataSetStundensatz: TFloatField;\r\n myDataSetDauerStunden: TFloatField;\r\n myDataSetgefahrenekm: TFloatField;\r\n myDataSetAufwand: TFloatField;\r\n myDataSetabgerechnet: TBooleanField;\r\n myDataSetverteilt: TDateTimeField;\r\n myDataSetTerminErledigt: TDateTimeField;\r\n myDataSetAnsprechpartner: TStringField;\r\n myDataSetLocation: TStringField;\r\n myDataSetGoogleID: TStringField;\r\n myDataSetGoogleCreatedUTC: TDateTimeField;\r\n myDataSetGoogleUpdatedUTC: TDateTimeField;\r\n myDataSetGoogleStatus: TStringField;\r\n myDataSetVorname: TStringField;\r\n myDataSetPNachname: TStringField;\r\n myDataSetPVorname: TStringField;\r\n myDataSetArtikelueberschrift: TStringField;\r\n myDataSetPFarbe: TIntegerField;\r\n myDataSetKontaktart: TStringField;\r\n dsArtikel: TXDataWebDataSet;\r\n dsArtikelArtikelnummer: TStringField;\r\n dskontakt: TXDataWebDataSet;\r\n dskontaktKundennummer: TStringField;\r\n dskontaktNachname: TStringField;\r\n dskontaktVorname: TStringField;\r\n dskontaktAdresszeile2: TStringField;\r\n dskontaktAdresszeile3: TStringField;\r\n dskontaktStrasse: TStringField;\r\n dskontaktPostleitzahl: TStringField;\r\n dskontaktOrt: TStringField;\r\n dskontaktLaenderkuerzel: TStringField;\r\n dskontaktLand: TStringField;\r\n dskontaktKilometer: TIntegerField;\r\n dskontaktStundensatz: TFloatField;\r\n dsKArten: TXDataWebDataSet;\r\n dsKArtenKontaktart: TStringField;\r\n dsKArtenArtikelnummer: TStringField;\r\n dsObjekt: TXDataWebDataSet;\r\n dsObjektObjektReferenz: TStringField;\r\n dsObjektKurzbezeichnung: TStringField;\r\n dsObjektObjektnummer: TStringField;\r\n dsAP: TXDataWebDataSet;\r\n dsAPKundennummer: TXDataWebEntityField;\r\n dsAPAnsprechpartner: TStringField;\r\n dsAPNachname: TStringField;\r\n dsAPVorname: TStringField;\r\n Container1: THTMLContainer;\r\n btnObjektwahl: TButton;\r\n btnzurueck: TButton;\r\n btnSpeichern: TButton;\r\n Container2: THTMLContainer;\r\n btnWV: TButton;\r\n btnAktivitaet: TButton;\r\n comboKontaktart: TDBComboBox;\r\n lblTerminart: TLabel;\r\n Container3: THTMLContainer;\r\n lblBeginn: TLabel;\r\n lblEnde: TLabel;\r\n lblBetreff: TLabel;\r\n lblNotiz: TLabel;\r\n PickDateBeginn: TDBDateTimePicker;\r\n pickDateEnde: TDBDateTimePicker;\r\n PickTimeBeginn: TDBDateTimePicker;\r\n picktimeEnde: TDBDateTimePicker;\r\n edtBetreff: TDBEdit;\r\n edtNotiz: TMemo;\r\n ContainerBeginn: THTMLContainer;\r\n ContainerEnde: THTMLContainer;\r\n Container4: THTMLContainer;\r\n Container5: THTMLContainer;\r\n Container6: THTMLContainer;\r\n btnKontaktZuordnen: TButton;\r\n Container7: THTMLContainer;\r\n Container8: THTMLContainer;\r\n comboap: TDBComboBox;\r\n lblAnsprechpartner: TLabel;\r\n lblort: TLabel;\r\n edtOrt: TDBEdit;\r\n lblkm: TLabel;\r\n edtkm: TDBEdit;\r\n Container9: THTMLContainer;\r\n Container10: THTMLContainer;\r\n lblMitarbeiter: TLabel;\r\n Container11: THTMLContainer;\r\n btnTerminerledigt: TButton;\r\n edtTerminerledigt: TDBEdit;\r\n edtAlarmBefore: TDBSpinEdit;\r\n edtErinnerung: TDBCheckBox;\r\n WebLabel2: TLabel;\r\n Container12: THTMLContainer;\r\n lblKontakt: TLabel;\r\n XDSlookupObjekt: TXDataWebDataSet;\r\n XDSlookupObjektObjektReferenz: TStringField;\r\n XDSlookupObjektKurzbezeichnung: TStringField;\r\n XDSlookupObjektObjektnummer: TStringField;\r\n DivTextIntern: THTMLDiv;\r\n DivTextObjekt: THTMLDiv;\r\n DivTextAP: THTMLDiv;\r\n btnroute: TButton;\r\n\r\n procedure btncloseClick(Sender: TObject);\r\n procedure WebFormShow(Sender: TObject);\r\n procedure myDataSetAfterApplyUpdates(Sender: TDataSet;\r\n Info: TResolveResults);\r\n procedure myDataSetBeforePost(DataSet: TDataSet);\r\n procedure btnKontaktZuordnenClick(Sender: TObject);\r\n procedure myDataSetAfterOpen(DataSet: TDataSet);\r\n procedure myDataSetNewRecord(DataSet: TDataSet);\r\n procedure myDataSetAfterPost(DataSet: TDataSet);\r\n procedure dskontaktAfterOpen(DataSet: TDataSet);\r\n procedure edtNotizEnter(Sender: TObject);\r\n procedure btnObjektwahlClick(Sender: TObject);\r\n procedure comboAPEnter(Sender: TObject);\r\n procedure dsAPAfterOpen(DataSet: TDataSet);\r\n procedure dsKArtenAfterOpen(DataSet: TDataSet);\r\n procedure myDataSetBeforeEdit(DataSet: TDataSet);\r\n procedure btnWVClick(Sender: TObject);\r\n procedure btnaktivitaetClick(Sender: TObject);\r\n procedure dsArtikelAfterOpen(DataSet: TDataSet);\r\n procedure btnzurueckClick(Sender: TObject);\r\n procedure SourceStateChange(Sender: TObject);\r\n procedure btnSpeichernClick(Sender: TObject);\r\n procedure btnTerminerledigtClick(Sender: TObject);\r\n procedure XDSlookupObjektAfterOpen(DataSet: TDataSet);\r\n procedure dsObjektAfterOpen(DataSet: TDataSet);\r\n procedure btnrouteClick(Sender: TObject);\r\n\r\n public\r\n TerminUID:string;\r\n NeuStartDateTime:TDateTime;\r\n NeuEndDateTime:TDateTime;\r\n procedure setcontrols;\r\n protected procedure LoadDFMValues; override; end;\r\n\r\nvar\r\n frmEinzeltermin: TfrmEinzeltermin;\r\n\r\nimplementation\r\n uses unit1, unit2, unit_Kontaktsuche, unit_Artikelsuche, unit_Objektsuche, unit_Karte;\r\n{$R *.dfm}\r\n\r\n\r\nprocedure TfrmEinzeltermin.setcontrols;\r\nbegin\r\n lblMitarbeiter.HTML:='Mitarbeiter '+trim(myDataSetPVorname.AsString+' '+myDataSetPNachname.AsString)+' ('+myDataSetPersonalnummer.asstring+')';\r\n divtextintern.HTML.text:='geändert: '+formatdatetime('DD.MM.YYYY hh:mm:ss',myDataSetLastModificationTime.AsDateTime)+'
ID: '+myDataSetUID.AsString+'
Google-ID: '+myDataSetGoogleID.AsString;\r\n lblkontakt.Caption:=myDataSetKundennummer.AsString+' '+trim(myDataSetVorname.AsString+' '+myDataSetNachname.asstring);\r\n if myDataSetAnsprechpartner.AsString<>'' then\r\n begin\r\n DivTextAP.HTML.text:=myDataSetAnsprechpartner.AsString;\r\n end\r\n else\r\n begin\r\n DivTextAP.HTML.text:='kein Ansprechpartner zugeordnet';\r\n end;\r\n\r\n if myDataSetObjektReferenz.AsString<>'' then\r\n begin\r\n xdslookupobjekt.Close;\r\n xdslookupobjekt.QueryString:='$filter=Objektreferenz eq '+QuotedStr(myDataSetObjektReferenz.asstring);\r\n xdslookupobjekt.Load;\r\n\r\n end\r\n else\r\n begin\r\n divtextobjekt.HTML.text:='kein Objekt zugeordnet';\r\n end;\r\nend;\r\n\r\nprocedure TfrmEinzeltermin.btncloseClick(Sender: TObject);\r\nbegin\r\n self.Close;\r\nend;\r\n\r\nprocedure TfrmEinzeltermin.btnKontaktZuordnenClick(Sender: TObject);\r\nvar\r\n LFrm:TfrmKontaktsuche;\r\n procedure AfterCreate(AForm:TObject);\r\n var\r\n LForm:TfrmKontaktsuche;\r\n begin\r\n LForm:=(AForm as TfrmKontaktsuche);\r\n lform.Kontaktnummer:='';\r\n end;\r\n\r\n procedure AfterShowmodal(Avalue:TModalResult);\r\n begin\r\n if lfrm.Kontaktnummer<>'' then\r\n begin\r\n dskontakt.Close;\r\n dskontakt.QueryString:='$filter=Kundennummer eq '+QuotedStr(lfrm.kontaktnummer);\r\n dskontakt.Load;\r\n end;\r\n\r\n\r\n end;\r\n\r\n begin\r\n LFrm:=TfrmKontaktsuche.CreateNew(@AfterCreate);\r\n //LFrm.Popup:=true;\r\n LFrm.ShowModal(@AfterShowmodal);\r\n\r\nend;\r\n\r\nprocedure TfrmEinzeltermin.btnObjektwahlClick(Sender: TObject);\r\nvar\r\n LFrm:TfrmObjektsuche;\r\n procedure AfterCreate(AForm:TObject);\r\n var\r\n LForm:TfrmObjektsuche;\r\n begin\r\n LForm:=(AForm as TfrmObjektsuche);\r\n LForm.Objektreferenz:='';\r\n\r\n\r\n end;\r\n\r\n procedure AfterShowmodal(Avalue:TModalResult);\r\n begin\r\n if lfrm.Objektreferenz<>'' then\r\n begin\r\n dsobjekt.Close;\r\n dsobjekt.QueryString:='$filter=Objektreferenz eq '+QuotedStr(lfrm.Objektreferenz);\r\n dsobjekt.Load;\r\n end;\r\n\r\n\r\n end;\r\n\r\n begin\r\n LFrm:=TfrmObjektsuche.CreateNew(@AfterCreate);\r\n // LFrm.Popup:=true;\r\n LFrm.ShowModal(@AfterShowmodal);\r\n\r\nend;\r\n\r\nprocedure TfrmEinzeltermin.btnrouteClick(Sender: TObject);\r\nvar\r\n mapsurl:string;\r\nbegin\r\n if (edtOrt.Text <> '') then\r\n begin\r\n mapsurl:='https://www.google.com/maps/dir/'+edtort.Text;\r\n application.Navigate(mapsurl, ntblank);\r\n end\r\n else\r\n begin\r\n MessageDlg('Es ist kein Ort eingegeben',mtWarning, [MBOK]);\r\n end;\r\nend;\r\n\r\nprocedure TfrmEinzeltermin.btnSpeichernClick(Sender: TObject);\r\nbegin\r\n mydataset.Post;\r\nend;\r\n\r\nprocedure TfrmEinzeltermin.btnTerminerledigtClick(Sender: TObject);\r\nbegin\r\n mydataset.Edit;\r\n myDataSetTerminErledigt.AsDateTime:=Date;\r\nend;\r\n\r\nprocedure TfrmEinzeltermin.btnWVClick(Sender: TObject);\r\nbegin\r\n if myDataSetKundennummer.AsString='' then\r\n begin\r\n showmessage('Es ist kein Kontakt zugeordnet');\r\n exit;\r\n end;\r\n mydataset.Edit;\r\n myDataSetTerminArt.AsInteger:=1;\r\n mydataset.Post;\r\n lblTerminart.Caption:='Wiedervorlage';\r\n comboKontaktart.enabled:=false;\r\n btnWV.enabled:=false;\r\nend;\r\n\r\nprocedure TfrmEinzeltermin.btnzurueckClick(Sender: TObject);\r\nbegin\r\n self.Close;\r\nend;\r\n\r\nprocedure TfrmEinzeltermin.comboAPEnter(Sender: TObject);\r\nbegin\r\n dsap.Close;\r\n comboAP.Items.Clear;\r\n if mydatasetkundennummer.AsString='' then\r\n begin\r\n showmessage('Es ist kein Kontakt zugeordnet');\r\n end\r\n else\r\n begin\r\n dsap.QueryString:='$filter=Kundennummer eq '+quotedstr(myDataSetKundennummer.AsString);\r\n dsap.Load;\r\n end;\r\nend;\r\n\r\nprocedure TfrmEinzeltermin.dsAPAfterOpen(DataSet: TDataSet);\r\nbegin\r\n dsap.First;\r\n while not dsap.eof do\r\n begin\r\n comboAP.Items.Add(dsAPAnsprechpartner.asstring);\r\n dsap.Next;\r\n end;\r\nend;\r\n\r\nprocedure TfrmEinzeltermin.dsArtikelAfterOpen(DataSet: TDataSet);\r\nbegin\r\n dsKArten.load;\r\nend;\r\n\r\nprocedure TfrmEinzeltermin.dsKArtenAfterOpen(DataSet: TDataSet);\r\nbegin\r\n combokontaktart.Items.Clear;\r\n dskarten.First;\r\n while not dskarten.eof do\r\n begin\r\n combokontaktart.Items.Add(dsKArtenKontaktart.asstring);\r\n dskarten.Next;\r\n end;\r\n if TerminUID='' then\r\n begin\r\n myDataSet.Close;\r\n myDataSet.QueryString:='$expand=Artikelnummer&$orderby=LastModificationTime DESC';\r\n myDataset.QueryTop:=1;\r\n myDataSet.Load;\r\n end\r\n else\r\n begin\r\n myDataSet.Close;\r\n myDataSet.QueryString:='$expand=Artikelnummer&$filter=UID eq '+quotedstr(TerminUID);\r\n myDataSet.Load;\r\n end;\r\nend;\r\n\r\nprocedure TfrmEinzeltermin.dskontaktAfterOpen(DataSet: TDataSet);\r\nbegin\r\n mydataset.Edit;\r\n myDataSetKundennummer.AsString:=dskontaktKundennummer.asstring;\r\n myDataSetNachname.AsString:=dskontaktNachname.AsString;\r\n myDataSetVorname.AsString:=dskontaktVorname.AsString;\r\n if mydatasetlocation.AsString='' then mydatasetLocation.AsString:=dskontaktLaenderkuerzel.AsString+'-'+dskontaktPostleitzahl.AsString+' '+dskontaktOrt.AsString+', '+dskontaktStrasse.AsString;\r\n myDataSetgefahrenekm.AsFloat:=dskontaktKilometer.AsFloat*2;\r\n myDataSetStundensatz.AsFloat:=dskontaktStundensatz.AsFloat;\r\n dskontakt.Close;\r\n setcontrols;\r\nend;\r\n\r\nprocedure TfrmEinzeltermin.dsObjektAfterOpen(DataSet: TDataSet);\r\nbegin\r\n myDataSet.Edit;\r\n myDataSetObjektReferenz.AsString:=dsObjektObjektReferenz.AsString;\r\n myDataSetObjektnummer.AsString:=dsObjektObjektnummer.AsString;\r\n setcontrols;\r\nend;\r\n\r\nprocedure TfrmEinzeltermin.myDataSetAfterApplyUpdates(Sender: TDataSet;\r\n Info: TResolveResults);\r\nbegin\r\n if info.Records[0].Error='' then weblabel2.caption:='gespeichert' else weblabel2.caption:=info.Records[0].Error;\r\n setcontrols;\r\nend;\r\n\r\nprocedure TfrmEinzeltermin.myDataSetAfterOpen(DataSet: TDataSet);\r\nbegin\r\n if TerminUID='' then\r\n begin\r\n mydataset.insert;\r\n end;\r\n if TerminUID<>'' then\r\n begin\r\n edtNotiz.Text:=myDataSetTerminNotiz.AsString;\r\n end;\r\n if myDataSetTerminArt.AsInteger=0 then\r\n begin\r\n lblTerminart.HTML:='Termin';\r\n comboKontaktart.enabled:=false;\r\n btnWV.enabled:=true;\r\n btnaktivitaet.enabled:=true;\r\n end;\r\n if myDataSetTerminArt.AsInteger=1 then\r\n begin\r\n lblTerminart.HTML:='Wiedervorlage';\r\n comboKontaktart.enabled:=false;\r\n btnWV.enabled:=false;\r\n btnaktivitaet.enabled:=true;\r\n end;\r\n if myDataSetTerminArt.AsInteger=2 then\r\n begin\r\n lblTerminart.HTML:='Geburtstag';\r\n comboKontaktart.enabled:=false;\r\n btnWV.enabled:=false;\r\n btnaktivitaet.enabled:=false;\r\n btnObjektwahl.Enabled:=false;\r\n end;\r\n if myDataSetTerminArt.AsInteger=3 then\r\n begin\r\n lblTerminart.HTML:='Aktivität';\r\n comboKontaktart.enabled:=true;\r\n btnWV.enabled:=false;\r\n btnaktivitaet.enabled:=false;\r\n end;\r\n if myDataSetTerminArt.AsInteger=4 then\r\n begin\r\n lblTerminart.HTML:='unklar';\r\n comboKontaktart.enabled:=false;\r\n btnWV.enabled:=false;\r\n btnaktivitaet.enabled:=false;\r\n btnobjektwahl.Enabled:=false;\r\n end;\r\n if myDataSetTerminArt.AsInteger=5 then\r\n begin\r\n lblTerminart.HTML:='Feiertag';\r\n comboKontaktart.enabled:=false;\r\n btnWV.enabled:=false;\r\n btnaktivitaet.enabled:=false;\r\n btnobjektwahl.Enabled:=false;\r\n end;\r\n setcontrols;\r\n //edtBetreff.SetFocus;\r\nend;\r\n\r\nprocedure TfrmEinzeltermin.myDataSetAfterPost(DataSet: TDataSet);\r\nbegin\r\n setcontrols;\r\n weblabel2.caption:='wird gespeichert';\r\n if LizenzOK then\r\n begin\r\n mydataset.ApplyUpdates;\r\n end\r\n else\r\n begin\r\n showmessage('Für das Speichern von Daten sind Sie noch nicht freigeschaltet, bitte erwerben Sie eine Lizenz');\r\n end;\r\nend;\r\n\r\nprocedure TfrmEinzeltermin.myDataSetBeforeEdit(DataSet: TDataSet);\r\nbegin\r\n if myDataSetTerminArt.AsInteger=2 then dataset.Cancel;\r\n if myDataSetTerminArt.AsInteger=4 then dataset.Cancel;\r\n if myDataSetTerminArt.AsInteger=5 then dataset.Cancel;\r\nend;\r\n\r\nprocedure TfrmEinzeltermin.myDataSetBeforePost(DataSet: TDataSet);\r\nbegin\r\n myDataSetTerminNotiz.AsString:=edtnotiz.Text;\r\n if myDataSetAllDayEventOutlook.AsBoolean then\r\n begin\r\n if myDataSetendedatum.asdatetime'' then myDataSetAlarm.asboolean:=False;\r\n myDataSetlastmodificationtime.asdatetime:=date+time;\r\nend;\r\n\r\nprocedure TfrmEinzeltermin.myDataSetNewRecord(DataSet: TDataSet);\r\nbegin\r\n myDataSetgeburtstag.asboolean:=FALSE;\r\n myDataSetterminart.asinteger:=0;\r\n myDataSetAlarm.AsBoolean:=True;\r\n myDataSetTerminNotiz.AsString:='';\r\n myDataSetShape.AsInteger:=0;\r\n myDataSetColor.AsInteger:=16777215;\r\n myDataSetabgerechnet.AsBoolean:=false;\r\n myDataSetgefahrenekm.AsFloat:=0;\r\n myDataSetStundensatz.AsFloat:=0;\r\n myDataSetAllDayEventOutlook.AsBoolean:=false;\r\n myDataSetKalenderAnzeige.AsBoolean:=true;\r\n myDataSetDauerStunden.AsFloat:=0;\r\n myDataSetAufwand.AsFloat:=0;\r\n myDataSetPersonalnummer.AsString:=BenutzerPersonalnummer;\r\n myDataSetPNachname.AsString:=BenutzerNachname;\r\n myDataSetPVorname.AsString:=BenutzerVorname;\r\n myDataSetPFarbe.AsInteger:=BenutzerFarbe;\r\n\r\n myDataSetAlarmBefore.AsInteger:=15;\r\n myDataSetBeginnDatum.AsDateTime:=trunc(NeuStartDateTime);\r\n myDataSetEndeDatum.AsDateTime:=trunc(NeuEndDateTime);\r\n myDataSetBeginnUhrzeit.AsDateTime:=frac(NeuStartDateTime);\r\n mydatasetendeUhrzeit.AsDateTime:=frac(NeuEndDateTime);\r\n mydatasetartikelnummer.Value:=dsArtikel.CurrentData;\r\n edtnotiz.Lines.Clear;\r\nend;\r\n\r\nprocedure TfrmEinzeltermin.SourceStateChange(Sender: TObject);\r\nbegin\r\n if myDataSet.State in dseditmodes then btnspeichern.Enabled:=true else btnspeichern.Enabled:=false;\r\nend;\r\n\r\nprocedure TfrmEinzeltermin.btnaktivitaetClick(Sender: TObject);\r\nbegin\r\n if myDataSetKundennummer.AsString='' then\r\n begin\r\n showmessage('Es ist kein Kontakt zugeordnet');\r\n exit;\r\n end;\r\n mydataset.Edit;\r\n myDataSetTerminArt.AsInteger:=3;\r\n myDataSetColor.AsInteger:=16776960;\r\n mydataset.Post;\r\n lblTerminart.Caption:='Aktivität';\r\n comboKontaktart.enabled:=true;\r\n btnWV.enabled:=false;\r\n btnaktivitaet.enabled:=false;\r\nend;\r\n\r\nprocedure TfrmEinzeltermin.WebFormShow(Sender: TObject);\r\nvar\r\n myelement:TJSHTMLElement;\r\nbegin\r\n Container1.html.text:='';\r\n myelement:=container1.ElementHandle;\r\n WebLabel2.ParentElement:=myelement;\r\n lblterminart.ParentElement:=myelement;\r\n container2.ParentElement:=myelement;\r\n container3.ParentElement:=myelement;\r\n container4.ParentElement:=myelement;\r\n container5.ParentElement:=myelement;\r\n container6.ParentElement:=myelement;\r\n container7.ParentElement:=myelement;\r\n container8.ParentElement:=myelement;\r\n container9.ParentElement:=myelement;\r\n container10.ParentElement:=myelement;\r\n container11.ParentElement:=myelement;\r\n container12.ParentElement:=myelement;\r\n\r\n myelement:=container2.ElementHandle;\r\n btnzurueck.ParentElement:=myelement;\r\n btnspeichern.ParentElement:=myelement;\r\n\r\n btnwv.ParentElement:=myelement;\r\n btnAktivitaet.ParentElement:=myelement;\r\n comboKontaktart.ParentElement:=myelement;\r\n\r\n myelement:=container3.ElementHandle;\r\n containerbeginn.ParentElement:=myelement;\r\n containerende.ParentElement:=myelement;\r\n\r\n myelement:=ContainerBeginn.ElementHandle;\r\n lblBeginn.ParentElement:=myelement;\r\n PickDateBeginn.ParentElement:=myelement;\r\n PickTimeBeginn.ParentElement:=myelement;\r\n\r\n myelement:=ContainerEnde.ElementHandle;\r\n lblEnde.ParentElement:=myelement;\r\n PickDateEnde.ParentElement:=myelement;\r\n PickTimeEnde.ParentElement:=myelement;\r\n\r\n myelement:=container4.ElementHandle;\r\n lblBetreff.ParentElement:=myelement;\r\n edtBetreff.ParentElement:=myelement;\r\n\r\n myelement:=container5.ElementHandle;\r\n lblNotiz.ParentElement:=myelement;\r\n edtNotiz.ParentElement:=myelement;\r\n\r\n myelement:=container6.ElementHandle;\r\n btnKontaktZuordnen.ParentElement:=myelement;\r\n lblkontakt.ParentElement:=myelement;\r\n\r\n myelement:=container7.ElementHandle;\r\n lblAnsprechpartner.ParentElement:=myelement;\r\n comboap.ParentElement:=myelement;\r\n DivTextAP.ParentElement:=myelement;\r\n\r\n myelement:=container8.ElementHandle;\r\n lblort.ParentElement:=myelement;\r\n edtort.ParentElement:=myelement;\r\n btnroute.ParentElement:=myelement;\r\n lblkm.ParentElement:=myelement;\r\n edtkm.ParentElement:=myelement;\r\n\r\n myelement:=container9.ElementHandle;\r\n btnObjektwahl.parentelement:=myelement;\r\n divtextobjekt.ParentElement:=myelement;\r\n\r\n myelement:=container10.ElementHandle;\r\n lblMitarbeiter.ParentElement:=myelement;\r\n\r\n myelement:=container11.ElementHandle;\r\n edtErinnerung.ParentElement:=myelement;\r\n edtAlarmBefore.ParentElement:=myelement;\r\n btnTerminerledigt.ParentElement:=myelement;\r\n edtTerminerledigt.ParentElement:=myelement;\r\n\r\n myelement:=container12.ElementHandle;\r\n divtextintern.ParentElement:=myelement;\r\n\r\n btnKontaktZuordnen.Enabled:=form1.RCW.Kontakte;\r\n dsKArten.Close;\r\n dsartikel.Close;\r\n dsartikel.querystring:='$filter=Artikelnummer eq '+QuotedStr('0');\r\n dsartikel.Load;\r\nend;\r\n\r\nprocedure TfrmEinzeltermin.XDSlookupObjektAfterOpen(DataSet: TDataSet);\r\nbegin\r\n if XDSlookupObjekt.RecordCount>0 then\r\n begin\r\n divtextobjekt.HTML.text:='Ref.: '+XDSlookupObjektObjektReferenz.asstring+' Nr.: '+XDSlookupObjektObjektnummer.asstring+' '+XDSlookupObjektKurzbezeichnung.asstring;\r\n end\r\n else\r\n begin\r\n divtextobjekt.HTML.text:='nicht gefunden';\r\n end;\r\n\r\nend;\r\n\r\nprocedure TfrmEinzeltermin.edtNotizEnter(Sender: TObject);\r\nbegin\r\n if mydataset.active then myDataSet.Edit;\r\nend;\r\n\r\nprocedure TfrmEinzeltermin.LoadDFMValues;\r\nbegin\r\n inherited LoadDFMValues;\r\n\r\n lblTerminart := TLabel.Create(Self);\r\n lblBeginn := TLabel.Create(Self);\r\n lblEnde := TLabel.Create(Self);\r\n lblBetreff := TLabel.Create(Self);\r\n lblNotiz := TLabel.Create(Self);\r\n lblAnsprechpartner := TLabel.Create(Self);\r\n lblort := TLabel.Create(Self);\r\n lblkm := TLabel.Create(Self);\r\n lblMitarbeiter := TLabel.Create(Self);\r\n WebLabel2 := TLabel.Create(Self);\r\n lblKontakt := TLabel.Create(Self);\r\n Container1 := THTMLContainer.Create(Self);\r\n btnObjektwahl := TButton.Create(Self);\r\n btnzurueck := TButton.Create(Self);\r\n btnSpeichern := TButton.Create(Self);\r\n Container2 := THTMLContainer.Create(Self);\r\n btnWV := TButton.Create(Self);\r\n btnAktivitaet := TButton.Create(Self);\r\n comboKontaktart := TDBComboBox.Create(Self);\r\n Container3 := THTMLContainer.Create(Self);\r\n PickDateBeginn := TDBDateTimePicker.Create(Self);\r\n pickDateEnde := TDBDateTimePicker.Create(Self);\r\n PickTimeBeginn := TDBDateTimePicker.Create(Self);\r\n picktimeEnde := TDBDateTimePicker.Create(Self);\r\n edtBetreff := TDBEdit.Create(Self);\r\n edtNotiz := TMemo.Create(Self);\r\n ContainerBeginn := THTMLContainer.Create(Self);\r\n ContainerEnde := THTMLContainer.Create(Self);\r\n Container4 := THTMLContainer.Create(Self);\r\n Container5 := THTMLContainer.Create(Self);\r\n Container6 := THTMLContainer.Create(Self);\r\n btnKontaktZuordnen := TButton.Create(Self);\r\n Container7 := THTMLContainer.Create(Self);\r\n Container8 := THTMLContainer.Create(Self);\r\n comboap := TDBComboBox.Create(Self);\r\n edtOrt := TDBEdit.Create(Self);\r\n edtkm := TDBEdit.Create(Self);\r\n Container9 := THTMLContainer.Create(Self);\r\n Container10 := THTMLContainer.Create(Self);\r\n Container11 := THTMLContainer.Create(Self);\r\n btnTerminerledigt := TButton.Create(Self);\r\n edtTerminerledigt := TDBEdit.Create(Self);\r\n edtAlarmBefore := TDBSpinEdit.Create(Self);\r\n edtErinnerung := TDBCheckBox.Create(Self);\r\n Container12 := THTMLContainer.Create(Self);\r\n DivTextIntern := THTMLDiv.Create(Self);\r\n DivTextObjekt := THTMLDiv.Create(Self);\r\n DivTextAP := THTMLDiv.Create(Self);\r\n btnroute := TButton.Create(Self);\r\n myDataSet := TXDataWebDataSet.Create(Self);\r\n myDataSetArtikelnummer := TXDataWebEntityField.Create(Self);\r\n myDataSetUID := TStringField.Create(Self);\r\n myDataSetBeginn := TDateTimeField.Create(Self);\r\n myDataSetEnde := TDateTimeField.Create(Self);\r\n myDataSetBetreff := TStringField.Create(Self);\r\n myDataSetTerminNotiz := TStringField.Create(Self);\r\n myDataSetQuelle := TStringField.Create(Self);\r\n myDataSetGUIDOutlook := TStringField.Create(Self);\r\n myDataSetShape := TIntegerField.Create(Self);\r\n myDataSetColor := TIntegerField.Create(Self);\r\n myDataSetAlarm := TBooleanField.Create(Self);\r\n myDataSetResource := TIntegerField.Create(Self);\r\n myDataSetLastModificationTime := TDateTimeField.Create(Self);\r\n myDataSetGeburtstag := TBooleanField.Create(Self);\r\n myDataSetAlarmBefore := TIntegerField.Create(Self);\r\n myDataSetPersonalnummer := TIntegerField.Create(Self);\r\n myDataSetKundennummer := TStringField.Create(Self);\r\n myDataSetAllDayEventOutlook := TBooleanField.Create(Self);\r\n myDataSetTMSCaption := TBooleanField.Create(Self);\r\n myDataSetRECURRENCY := TStringField.Create(Self);\r\n myDataSetMINTIME := TDateTimeField.Create(Self);\r\n myDataSetMAXTIME := TDateTimeField.Create(Self);\r\n myDataSetNachname := TStringField.Create(Self);\r\n myDataSetObjektReferenz := TStringField.Create(Self);\r\n myDataSetObjektnummer := TStringField.Create(Self);\r\n myDataSetTerminArt := TIntegerField.Create(Self);\r\n myDataSetBeginnDatum := TDateTimeField.Create(Self);\r\n myDataSetBeginnUhrzeit := TDateTimeField.Create(Self);\r\n myDataSetEndeDatum := TDateTimeField.Create(Self);\r\n myDataSetEndeUhrzeit := TDateTimeField.Create(Self);\r\n myDataSetKalenderAnzeige := TBooleanField.Create(Self);\r\n myDataSetStundensatz := TFloatField.Create(Self);\r\n myDataSetDauerStunden := TFloatField.Create(Self);\r\n myDataSetgefahrenekm := TFloatField.Create(Self);\r\n myDataSetAufwand := TFloatField.Create(Self);\r\n myDataSetabgerechnet := TBooleanField.Create(Self);\r\n myDataSetverteilt := TDateTimeField.Create(Self);\r\n myDataSetTerminErledigt := TDateTimeField.Create(Self);\r\n myDataSetAnsprechpartner := TStringField.Create(Self);\r\n myDataSetLocation := TStringField.Create(Self);\r\n myDataSetGoogleID := TStringField.Create(Self);\r\n myDataSetGoogleCreatedUTC := TDateTimeField.Create(Self);\r\n myDataSetGoogleUpdatedUTC := TDateTimeField.Create(Self);\r\n myDataSetGoogleStatus := TStringField.Create(Self);\r\n myDataSetVorname := TStringField.Create(Self);\r\n myDataSetPNachname := TStringField.Create(Self);\r\n myDataSetPVorname := TStringField.Create(Self);\r\n myDataSetArtikelueberschrift := TStringField.Create(Self);\r\n myDataSetPFarbe := TIntegerField.Create(Self);\r\n myDataSetKontaktart := TStringField.Create(Self);\r\n Source := TDataSource.Create(Self);\r\n dsArtikel := TXDataWebDataSet.Create(Self);\r\n dsArtikelArtikelnummer := TStringField.Create(Self);\r\n dskontakt := TXDataWebDataSet.Create(Self);\r\n dskontaktKundennummer := TStringField.Create(Self);\r\n dskontaktNachname := TStringField.Create(Self);\r\n dskontaktVorname := TStringField.Create(Self);\r\n dskontaktAdresszeile2 := TStringField.Create(Self);\r\n dskontaktAdresszeile3 := TStringField.Create(Self);\r\n dskontaktStrasse := TStringField.Create(Self);\r\n dskontaktPostleitzahl := TStringField.Create(Self);\r\n dskontaktOrt := TStringField.Create(Self);\r\n dskontaktLaenderkuerzel := TStringField.Create(Self);\r\n dskontaktLand := TStringField.Create(Self);\r\n dskontaktKilometer := TIntegerField.Create(Self);\r\n dskontaktStundensatz := TFloatField.Create(Self);\r\n dsKArten := TXDataWebDataSet.Create(Self);\r\n dsKArtenKontaktart := TStringField.Create(Self);\r\n dsKArtenArtikelnummer := TStringField.Create(Self);\r\n dsObjekt := TXDataWebDataSet.Create(Self);\r\n dsObjektObjektReferenz := TStringField.Create(Self);\r\n dsObjektKurzbezeichnung := TStringField.Create(Self);\r\n dsObjektObjektnummer := TStringField.Create(Self);\r\n dsAP := TXDataWebDataSet.Create(Self);\r\n dsAPKundennummer := TXDataWebEntityField.Create(Self);\r\n dsAPAnsprechpartner := TStringField.Create(Self);\r\n dsAPNachname := TStringField.Create(Self);\r\n dsAPVorname := TStringField.Create(Self);\r\n XDSlookupObjekt := TXDataWebDataSet.Create(Self);\r\n XDSlookupObjektObjektReferenz := TStringField.Create(Self);\r\n XDSlookupObjektKurzbezeichnung := TStringField.Create(Self);\r\n XDSlookupObjektObjektnummer := TStringField.Create(Self);\r\n\r\n lblTerminart.BeforeLoadDFMValues;\r\n lblBeginn.BeforeLoadDFMValues;\r\n lblEnde.BeforeLoadDFMValues;\r\n lblBetreff.BeforeLoadDFMValues;\r\n lblNotiz.BeforeLoadDFMValues;\r\n lblAnsprechpartner.BeforeLoadDFMValues;\r\n lblort.BeforeLoadDFMValues;\r\n lblkm.BeforeLoadDFMValues;\r\n lblMitarbeiter.BeforeLoadDFMValues;\r\n WebLabel2.BeforeLoadDFMValues;\r\n lblKontakt.BeforeLoadDFMValues;\r\n Container1.BeforeLoadDFMValues;\r\n btnObjektwahl.BeforeLoadDFMValues;\r\n btnzurueck.BeforeLoadDFMValues;\r\n btnSpeichern.BeforeLoadDFMValues;\r\n Container2.BeforeLoadDFMValues;\r\n btnWV.BeforeLoadDFMValues;\r\n btnAktivitaet.BeforeLoadDFMValues;\r\n comboKontaktart.BeforeLoadDFMValues;\r\n Container3.BeforeLoadDFMValues;\r\n PickDateBeginn.BeforeLoadDFMValues;\r\n pickDateEnde.BeforeLoadDFMValues;\r\n PickTimeBeginn.BeforeLoadDFMValues;\r\n picktimeEnde.BeforeLoadDFMValues;\r\n edtBetreff.BeforeLoadDFMValues;\r\n edtNotiz.BeforeLoadDFMValues;\r\n ContainerBeginn.BeforeLoadDFMValues;\r\n ContainerEnde.BeforeLoadDFMValues;\r\n Container4.BeforeLoadDFMValues;\r\n Container5.BeforeLoadDFMValues;\r\n Container6.BeforeLoadDFMValues;\r\n btnKontaktZuordnen.BeforeLoadDFMValues;\r\n Container7.BeforeLoadDFMValues;\r\n Container8.BeforeLoadDFMValues;\r\n comboap.BeforeLoadDFMValues;\r\n edtOrt.BeforeLoadDFMValues;\r\n edtkm.BeforeLoadDFMValues;\r\n Container9.BeforeLoadDFMValues;\r\n Container10.BeforeLoadDFMValues;\r\n Container11.BeforeLoadDFMValues;\r\n btnTerminerledigt.BeforeLoadDFMValues;\r\n edtTerminerledigt.BeforeLoadDFMValues;\r\n edtAlarmBefore.BeforeLoadDFMValues;\r\n edtErinnerung.BeforeLoadDFMValues;\r\n Container12.BeforeLoadDFMValues;\r\n DivTextIntern.BeforeLoadDFMValues;\r\n DivTextObjekt.BeforeLoadDFMValues;\r\n DivTextAP.BeforeLoadDFMValues;\r\n btnroute.BeforeLoadDFMValues;\r\n myDataSet.BeforeLoadDFMValues;\r\n myDataSetArtikelnummer.BeforeLoadDFMValues;\r\n myDataSetUID.BeforeLoadDFMValues;\r\n myDataSetBeginn.BeforeLoadDFMValues;\r\n myDataSetEnde.BeforeLoadDFMValues;\r\n myDataSetBetreff.BeforeLoadDFMValues;\r\n myDataSetTerminNotiz.BeforeLoadDFMValues;\r\n myDataSetQuelle.BeforeLoadDFMValues;\r\n myDataSetGUIDOutlook.BeforeLoadDFMValues;\r\n myDataSetShape.BeforeLoadDFMValues;\r\n myDataSetColor.BeforeLoadDFMValues;\r\n myDataSetAlarm.BeforeLoadDFMValues;\r\n myDataSetResource.BeforeLoadDFMValues;\r\n myDataSetLastModificationTime.BeforeLoadDFMValues;\r\n myDataSetGeburtstag.BeforeLoadDFMValues;\r\n myDataSetAlarmBefore.BeforeLoadDFMValues;\r\n myDataSetPersonalnummer.BeforeLoadDFMValues;\r\n myDataSetKundennummer.BeforeLoadDFMValues;\r\n myDataSetAllDayEventOutlook.BeforeLoadDFMValues;\r\n myDataSetTMSCaption.BeforeLoadDFMValues;\r\n myDataSetRECURRENCY.BeforeLoadDFMValues;\r\n myDataSetMINTIME.BeforeLoadDFMValues;\r\n myDataSetMAXTIME.BeforeLoadDFMValues;\r\n myDataSetNachname.BeforeLoadDFMValues;\r\n myDataSetObjektReferenz.BeforeLoadDFMValues;\r\n myDataSetObjektnummer.BeforeLoadDFMValues;\r\n myDataSetTerminArt.BeforeLoadDFMValues;\r\n myDataSetBeginnDatum.BeforeLoadDFMValues;\r\n myDataSetBeginnUhrzeit.BeforeLoadDFMValues;\r\n myDataSetEndeDatum.BeforeLoadDFMValues;\r\n myDataSetEndeUhrzeit.BeforeLoadDFMValues;\r\n myDataSetKalenderAnzeige.BeforeLoadDFMValues;\r\n myDataSetStundensatz.BeforeLoadDFMValues;\r\n myDataSetDauerStunden.BeforeLoadDFMValues;\r\n myDataSetgefahrenekm.BeforeLoadDFMValues;\r\n myDataSetAufwand.BeforeLoadDFMValues;\r\n myDataSetabgerechnet.BeforeLoadDFMValues;\r\n myDataSetverteilt.BeforeLoadDFMValues;\r\n myDataSetTerminErledigt.BeforeLoadDFMValues;\r\n myDataSetAnsprechpartner.BeforeLoadDFMValues;\r\n myDataSetLocation.BeforeLoadDFMValues;\r\n myDataSetGoogleID.BeforeLoadDFMValues;\r\n myDataSetGoogleCreatedUTC.BeforeLoadDFMValues;\r\n myDataSetGoogleUpdatedUTC.BeforeLoadDFMValues;\r\n myDataSetGoogleStatus.BeforeLoadDFMValues;\r\n myDataSetVorname.BeforeLoadDFMValues;\r\n myDataSetPNachname.BeforeLoadDFMValues;\r\n myDataSetPVorname.BeforeLoadDFMValues;\r\n myDataSetArtikelueberschrift.BeforeLoadDFMValues;\r\n myDataSetPFarbe.BeforeLoadDFMValues;\r\n myDataSetKontaktart.BeforeLoadDFMValues;\r\n Source.BeforeLoadDFMValues;\r\n dsArtikel.BeforeLoadDFMValues;\r\n dsArtikelArtikelnummer.BeforeLoadDFMValues;\r\n dskontakt.BeforeLoadDFMValues;\r\n dskontaktKundennummer.BeforeLoadDFMValues;\r\n dskontaktNachname.BeforeLoadDFMValues;\r\n dskontaktVorname.BeforeLoadDFMValues;\r\n dskontaktAdresszeile2.BeforeLoadDFMValues;\r\n dskontaktAdresszeile3.BeforeLoadDFMValues;\r\n dskontaktStrasse.BeforeLoadDFMValues;\r\n dskontaktPostleitzahl.BeforeLoadDFMValues;\r\n dskontaktOrt.BeforeLoadDFMValues;\r\n dskontaktLaenderkuerzel.BeforeLoadDFMValues;\r\n dskontaktLand.BeforeLoadDFMValues;\r\n dskontaktKilometer.BeforeLoadDFMValues;\r\n dskontaktStundensatz.BeforeLoadDFMValues;\r\n dsKArten.BeforeLoadDFMValues;\r\n dsKArtenKontaktart.BeforeLoadDFMValues;\r\n dsKArtenArtikelnummer.BeforeLoadDFMValues;\r\n dsObjekt.BeforeLoadDFMValues;\r\n dsObjektObjektReferenz.BeforeLoadDFMValues;\r\n dsObjektKurzbezeichnung.BeforeLoadDFMValues;\r\n dsObjektObjektnummer.BeforeLoadDFMValues;\r\n dsAP.BeforeLoadDFMValues;\r\n dsAPKundennummer.BeforeLoadDFMValues;\r\n dsAPAnsprechpartner.BeforeLoadDFMValues;\r\n dsAPNachname.BeforeLoadDFMValues;\r\n dsAPVorname.BeforeLoadDFMValues;\r\n XDSlookupObjekt.BeforeLoadDFMValues;\r\n XDSlookupObjektObjektReferenz.BeforeLoadDFMValues;\r\n XDSlookupObjektKurzbezeichnung.BeforeLoadDFMValues;\r\n XDSlookupObjektObjektnummer.BeforeLoadDFMValues;\r\n try\r\n Name := 'frmEinzeltermin';\r\n Width := 781;\r\n Height := 709;\r\n CSSLibrary := cssBootstrap;\r\n ElementFont := efCSS;\r\n Font.Charset := DEFAULT_CHARSET;\r\n Font.Color := clWindowText;\r\n Font.Height := -11;\r\n Font.Name := 'Tahoma';\r\n Font.Style := [];\r\n ParentFont := False;\r\n ShowHint := True;\r\n TabStop := True;\r\n SetEvent(Self, 'OnShow', 'WebFormShow');\r\n lblTerminart.SetParentComponent(Self);\r\n lblTerminart.Name := 'lblTerminart';\r\n lblTerminart.Left := 8;\r\n lblTerminart.Top := 585;\r\n lblTerminart.Width := 41;\r\n lblTerminart.Height := 16;\r\n lblTerminart.Caption := 'Termin';\r\n lblTerminart.ElementClassName := 'text-lg ml-2';\r\n lblTerminart.ElementFont := efCSS;\r\n lblTerminart.ElementPosition := epIgnore;\r\n lblTerminart.Font.Charset := DEFAULT_CHARSET;\r\n lblTerminart.Font.Color := clWindowText;\r\n lblTerminart.Font.Height := -13;\r\n lblTerminart.Font.Name := 'Tahoma';\r\n lblTerminart.Font.Style := [];\r\n lblTerminart.HeightStyle := ssAuto;\r\n lblTerminart.HeightPercent := 100.000000000000000000;\r\n lblTerminart.ParentFont := False;\r\n lblTerminart.Transparent := False;\r\n lblTerminart.WidthStyle := ssAuto;\r\n lblTerminart.WidthPercent := 100.000000000000000000;\r\n lblBeginn.SetParentComponent(Self);\r\n lblBeginn.Name := 'lblBeginn';\r\n lblBeginn.Left := 8;\r\n lblBeginn.Top := 173;\r\n lblBeginn.Width := 40;\r\n lblBeginn.Height := 13;\r\n lblBeginn.AutoSize := False;\r\n lblBeginn.Caption := 'Beginn';\r\n lblBeginn.ElementClassName := 'text-small m-2';\r\n lblBeginn.ElementFont := efCSS;\r\n lblBeginn.ElementPosition := epIgnore;\r\n lblBeginn.HeightStyle := ssAuto;\r\n lblBeginn.HeightPercent := 100.000000000000000000;\r\n lblBeginn.Transparent := False;\r\n lblBeginn.WidthStyle := ssAuto;\r\n lblBeginn.WidthPercent := 100.000000000000000000;\r\n lblEnde.SetParentComponent(Self);\r\n lblEnde.Name := 'lblEnde';\r\n lblEnde.Left := 49;\r\n lblEnde.Top := 192;\r\n lblEnde.Width := 40;\r\n lblEnde.Height := 13;\r\n lblEnde.AutoSize := False;\r\n lblEnde.Caption := 'Ende';\r\n lblEnde.ElementClassName := 'text-small m-2';\r\n lblEnde.ElementFont := efCSS;\r\n lblEnde.ElementPosition := epIgnore;\r\n lblEnde.HeightStyle := ssAuto;\r\n lblEnde.HeightPercent := 100.000000000000000000;\r\n lblEnde.Transparent := False;\r\n lblEnde.WidthPercent := 100.000000000000000000;\r\n lblBetreff.SetParentComponent(Self);\r\n lblBetreff.Name := 'lblBetreff';\r\n lblBetreff.AlignWithMargins := True;\r\n lblBetreff.Left := 29;\r\n lblBetreff.Top := 231;\r\n lblBetreff.Width := 50;\r\n lblBetreff.Height := 13;\r\n lblBetreff.AutoSize := False;\r\n lblBetreff.Caption := 'Betreff:';\r\n lblBetreff.ElementClassName := 'text-small m-2';\r\n lblBetreff.ElementFont := efCSS;\r\n lblBetreff.ElementPosition := epIgnore;\r\n lblBetreff.Font.Charset := DEFAULT_CHARSET;\r\n lblBetreff.Font.Color := clWindowText;\r\n lblBetreff.Font.Height := -11;\r\n lblBetreff.Font.Name := 'Tahoma';\r\n lblBetreff.Font.Style := [];\r\n lblBetreff.HeightStyle := ssAuto;\r\n lblBetreff.HeightPercent := 100.000000000000000000;\r\n lblBetreff.ParentFont := False;\r\n lblBetreff.Transparent := False;\r\n lblBetreff.WidthPercent := 100.000000000000000000;\r\n lblNotiz.SetParentComponent(Self);\r\n lblNotiz.Name := 'lblNotiz';\r\n lblNotiz.AlignWithMargins := True;\r\n lblNotiz.Left := 40;\r\n lblNotiz.Top := 266;\r\n lblNotiz.Width := 50;\r\n lblNotiz.Height := 13;\r\n lblNotiz.AutoSize := False;\r\n lblNotiz.Caption := 'Notiz:';\r\n lblNotiz.ElementClassName := 'text-small m-2';\r\n lblNotiz.ElementFont := efCSS;\r\n lblNotiz.ElementPosition := epIgnore;\r\n lblNotiz.Font.Charset := DEFAULT_CHARSET;\r\n lblNotiz.Font.Color := clWindowText;\r\n lblNotiz.Font.Height := -11;\r\n lblNotiz.Font.Name := 'Tahoma';\r\n lblNotiz.Font.Style := [];\r\n lblNotiz.HeightStyle := ssAuto;\r\n lblNotiz.HeightPercent := 100.000000000000000000;\r\n lblNotiz.ParentFont := False;\r\n lblNotiz.Transparent := False;\r\n lblNotiz.WidthPercent := 100.000000000000000000;\r\n lblAnsprechpartner.SetParentComponent(Self);\r\n lblAnsprechpartner.Name := 'lblAnsprechpartner';\r\n lblAnsprechpartner.AlignWithMargins := True;\r\n lblAnsprechpartner.Left := 209;\r\n lblAnsprechpartner.Top := 376;\r\n lblAnsprechpartner.Width := 50;\r\n lblAnsprechpartner.Height := 17;\r\n lblAnsprechpartner.AutoSize := False;\r\n lblAnsprechpartner.Caption := 'AP:';\r\n lblAnsprechpartner.ElementClassName := 'text-small m-2';\r\n lblAnsprechpartner.ElementFont := efCSS;\r\n lblAnsprechpartner.ElementPosition := epIgnore;\r\n lblAnsprechpartner.Font.Charset := DEFAULT_CHARSET;\r\n lblAnsprechpartner.Font.Color := clWindowText;\r\n lblAnsprechpartner.Font.Height := -11;\r\n lblAnsprechpartner.Font.Name := 'Tahoma';\r\n lblAnsprechpartner.Font.Style := [];\r\n lblAnsprechpartner.HeightStyle := ssAuto;\r\n lblAnsprechpartner.HeightPercent := 100.000000000000000000;\r\n lblAnsprechpartner.ParentFont := False;\r\n lblAnsprechpartner.Transparent := False;\r\n lblAnsprechpartner.WidthPercent := 100.000000000000000000;\r\n lblort.SetParentComponent(Self);\r\n lblort.Name := 'lblort';\r\n lblort.AlignWithMargins := True;\r\n lblort.Left := 8;\r\n lblort.Top := 435;\r\n lblort.Width := 50;\r\n lblort.Height := 13;\r\n lblort.AutoSize := False;\r\n lblort.Caption := 'Ort:';\r\n lblort.ElementClassName := 'text-small m-2';\r\n lblort.ElementFont := efCSS;\r\n lblort.ElementPosition := epIgnore;\r\n lblort.Font.Charset := DEFAULT_CHARSET;\r\n lblort.Font.Color := clWindowText;\r\n lblort.Font.Height := -11;\r\n lblort.Font.Name := 'Tahoma';\r\n lblort.Font.Style := [];\r\n lblort.HeightStyle := ssAuto;\r\n lblort.HeightPercent := 100.000000000000000000;\r\n lblort.ParentFont := False;\r\n lblort.Transparent := False;\r\n lblort.WidthPercent := 100.000000000000000000;\r\n lblkm.SetParentComponent(Self);\r\n lblkm.Name := 'lblkm';\r\n lblkm.Left := 329;\r\n lblkm.Top := 435;\r\n lblkm.Width := 13;\r\n lblkm.Height := 13;\r\n lblkm.AutoSize := False;\r\n lblkm.Caption := 'km';\r\n lblkm.ElementClassName := 'text-small m-2';\r\n lblkm.ElementFont := efCSS;\r\n lblkm.ElementPosition := epIgnore;\r\n lblkm.HeightStyle := ssAuto;\r\n lblkm.HeightPercent := 100.000000000000000000;\r\n lblkm.WidthStyle := ssAuto;\r\n lblkm.WidthPercent := 100.000000000000000000;\r\n lblMitarbeiter.SetParentComponent(Self);\r\n lblMitarbeiter.Name := 'lblMitarbeiter';\r\n lblMitarbeiter.AlignWithMargins := True;\r\n lblMitarbeiter.Left := 3;\r\n lblMitarbeiter.Top := 470;\r\n lblMitarbeiter.Width := 99;\r\n lblMitarbeiter.Height := 11;\r\n lblMitarbeiter.AutoSize := False;\r\n lblMitarbeiter.Caption := 'Mitarbeiter:';\r\n lblMitarbeiter.ElementClassName := 'text-small m-2';\r\n lblMitarbeiter.ElementFont := efCSS;\r\n lblMitarbeiter.ElementPosition := epIgnore;\r\n lblMitarbeiter.Font.Charset := DEFAULT_CHARSET;\r\n lblMitarbeiter.Font.Color := clWindowText;\r\n lblMitarbeiter.Font.Height := -11;\r\n lblMitarbeiter.Font.Name := 'Tahoma';\r\n lblMitarbeiter.Font.Style := [];\r\n lblMitarbeiter.HeightStyle := ssAuto;\r\n lblMitarbeiter.HeightPercent := 100.000000000000000000;\r\n lblMitarbeiter.ParentFont := False;\r\n lblMitarbeiter.WidthStyle := ssAuto;\r\n lblMitarbeiter.WidthPercent := 100.000000000000000000;\r\n WebLabel2.SetParentComponent(Self);\r\n WebLabel2.Name := 'WebLabel2';\r\n WebLabel2.Left := 576;\r\n WebLabel2.Top := 560;\r\n WebLabel2.Width := 3;\r\n WebLabel2.Height := 13;\r\n WebLabel2.ElementClassName := 'text-small text-danger ml-2';\r\n WebLabel2.ElementFont := efCSS;\r\n WebLabel2.ElementPosition := epIgnore;\r\n WebLabel2.HeightStyle := ssAuto;\r\n WebLabel2.HeightPercent := 100.000000000000000000;\r\n WebLabel2.WidthStyle := ssAuto;\r\n WebLabel2.WidthPercent := 100.000000000000000000;\r\n lblKontakt.SetParentComponent(Self);\r\n lblKontakt.Name := 'lblKontakt';\r\n lblKontakt.Left := 32;\r\n lblKontakt.Top := 120;\r\n lblKontakt.Width := 47;\r\n lblKontakt.Height := 13;\r\n lblKontakt.Caption := 'lblKontakt';\r\n lblKontakt.ElementClassName := 'h6 m-2';\r\n lblKontakt.ElementFont := efCSS;\r\n lblKontakt.ElementPosition := epIgnore;\r\n lblKontakt.HeightPercent := 100.000000000000000000;\r\n lblKontakt.WidthPercent := 100.000000000000000000;\r\n Container1.SetParentComponent(Self);\r\n Container1.Name := 'Container1';\r\n Container1.Left := 0;\r\n Container1.Top := 0;\r\n Container1.Width := 781;\r\n Container1.Height := 41;\r\n Container1.HeightStyle := ssAuto;\r\n Container1.WidthStyle := ssPercent;\r\n Container1.Align := alTop;\r\n Container1.ElementFont := efCSS;\r\n Container1.ElementPosition := epIgnore;\r\n btnObjektwahl.SetParentComponent(Self);\r\n btnObjektwahl.Name := 'btnObjektwahl';\r\n btnObjektwahl.Left := 48;\r\n btnObjektwahl.Top := 536;\r\n btnObjektwahl.Width := 96;\r\n btnObjektwahl.Height := 25;\r\n btnObjektwahl.Caption := 'Objekt';\r\n btnObjektwahl.ChildOrder := 12;\r\n btnObjektwahl.ElementClassName := 'btn btn-info btn-sm m-1 text-left';\r\n btnObjektwahl.ElementFont := efCSS;\r\n btnObjektwahl.ElementPosition := epIgnore;\r\n btnObjektwahl.HeightStyle := ssAuto;\r\n btnObjektwahl.HeightPercent := 100.000000000000000000;\r\n btnObjektwahl.WidthStyle := ssAuto;\r\n btnObjektwahl.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnObjektwahl, Self, 'OnClick', 'btnObjektwahlClick');\r\n btnzurueck.SetParentComponent(Self);\r\n btnzurueck.Name := 'btnzurueck';\r\n btnzurueck.Left := 157;\r\n btnzurueck.Top := 536;\r\n btnzurueck.Width := 96;\r\n btnzurueck.Height := 25;\r\n btnzurueck.Caption := '<< zur'#252'ck';\r\n btnzurueck.ChildOrder := 12;\r\n btnzurueck.ElementClassName := 'btn btn-info btn-sm m-1 text-left';\r\n btnzurueck.ElementFont := efCSS;\r\n btnzurueck.ElementPosition := epIgnore;\r\n btnzurueck.HeightStyle := ssAuto;\r\n btnzurueck.HeightPercent := 100.000000000000000000;\r\n btnzurueck.WidthStyle := ssAuto;\r\n btnzurueck.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnzurueck, Self, 'OnClick', 'btnzurueckClick');\r\n btnSpeichern.SetParentComponent(Self);\r\n btnSpeichern.Name := 'btnSpeichern';\r\n btnSpeichern.Left := 259;\r\n btnSpeichern.Top := 536;\r\n btnSpeichern.Width := 96;\r\n btnSpeichern.Height := 25;\r\n btnSpeichern.Caption := 'speichern';\r\n btnSpeichern.ChildOrder := 4;\r\n btnSpeichern.ElementClassName := 'btn btn-info btn-sm m-1 text-left';\r\n btnSpeichern.ElementFont := efCSS;\r\n btnSpeichern.ElementPosition := epIgnore;\r\n btnSpeichern.HeightStyle := ssAuto;\r\n btnSpeichern.HeightPercent := 100.000000000000000000;\r\n btnSpeichern.WidthStyle := ssAuto;\r\n btnSpeichern.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnSpeichern, Self, 'OnClick', 'btnSpeichernClick');\r\n Container2.SetParentComponent(Self);\r\n Container2.Name := 'Container2';\r\n Container2.Left := 472;\r\n Container2.Top := 41;\r\n Container2.Width := 174;\r\n Container2.Height := 41;\r\n Container2.ElementClassName := 'd-flex flex-wrap m-1';\r\n Container2.HeightStyle := ssAuto;\r\n Container2.WidthStyle := ssAuto;\r\n Container2.ChildOrder := 1;\r\n Container2.ElementFont := efCSS;\r\n Container2.ElementPosition := epIgnore;\r\n btnWV.SetParentComponent(Self);\r\n btnWV.Name := 'btnWV';\r\n btnWV.Left := 157;\r\n btnWV.Top := 576;\r\n btnWV.Width := 96;\r\n btnWV.Height := 25;\r\n btnWV.Caption := 'WV';\r\n btnWV.ChildOrder := 12;\r\n btnWV.ElementClassName := 'btn btn-info btn-sm m-1 text-left';\r\n btnWV.ElementFont := efCSS;\r\n btnWV.ElementPosition := epIgnore;\r\n btnWV.HeightStyle := ssAuto;\r\n btnWV.HeightPercent := 100.000000000000000000;\r\n btnWV.WidthStyle := ssAuto;\r\n btnWV.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnWV, Self, 'OnClick', 'btnWVClick');\r\n btnAktivitaet.SetParentComponent(Self);\r\n btnAktivitaet.Name := 'btnAktivitaet';\r\n btnAktivitaet.Left := 157;\r\n btnAktivitaet.Top := 607;\r\n btnAktivitaet.Width := 96;\r\n btnAktivitaet.Height := 25;\r\n btnAktivitaet.Caption := 'Aktivit'#228't';\r\n btnAktivitaet.ChildOrder := 12;\r\n btnAktivitaet.ElementClassName := 'btn btn-info btn-sm m-1 text-left';\r\n btnAktivitaet.ElementFont := efCSS;\r\n btnAktivitaet.ElementPosition := epIgnore;\r\n btnAktivitaet.HeightStyle := ssAuto;\r\n btnAktivitaet.HeightPercent := 100.000000000000000000;\r\n btnAktivitaet.WidthStyle := ssAuto;\r\n btnAktivitaet.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnAktivitaet, Self, 'OnClick', 'btnaktivitaetClick');\r\n comboKontaktart.SetParentComponent(Self);\r\n comboKontaktart.Name := 'comboKontaktart';\r\n comboKontaktart.AlignWithMargins := True;\r\n comboKontaktart.Left := 157;\r\n comboKontaktart.Top := 638;\r\n comboKontaktart.Width := 200;\r\n comboKontaktart.Height := 21;\r\n comboKontaktart.ElementClassName := 'form-control form-control-sm m-1';\r\n comboKontaktart.ElementFont := efCSS;\r\n comboKontaktart.ElementPosition := epIgnore;\r\n comboKontaktart.HeightStyle := ssAuto;\r\n comboKontaktart.HeightPercent := 100.000000000000000000;\r\n comboKontaktart.WidthPercent := 100.000000000000000000;\r\n comboKontaktart.ItemIndex := -1;\r\n comboKontaktart.DataField := 'Kontaktart';\r\n comboKontaktart.DataSource := Source;\r\n Container3.SetParentComponent(Self);\r\n Container3.Name := 'Container3';\r\n Container3.Left := 472;\r\n Container3.Top := 82;\r\n Container3.Width := 174;\r\n Container3.Height := 41;\r\n Container3.ElementClassName := 'd-flex flex-wrap m-1';\r\n Container3.HeightStyle := ssAuto;\r\n Container3.WidthStyle := ssAuto;\r\n Container3.ChildOrder := 2;\r\n Container3.ElementFont := efCSS;\r\n Container3.ElementPosition := epIgnore;\r\n PickDateBeginn.SetParentComponent(Self);\r\n PickDateBeginn.Name := 'PickDateBeginn';\r\n PickDateBeginn.Left := 74;\r\n PickDateBeginn.Top := 156;\r\n PickDateBeginn.Width := 164;\r\n PickDateBeginn.Height := 30;\r\n PickDateBeginn.ElementClassName := 'form-control form-control-sm m-1';\r\n PickDateBeginn.HeightStyle := ssAuto;\r\n PickDateBeginn.BorderStyle := bsSingle;\r\n PickDateBeginn.ChildOrder := 24;\r\n PickDateBeginn.Color := clWhite;\r\n PickDateBeginn.Date := 43625.314923055560000000;\r\n PickDateBeginn.ElementFont := efCSS;\r\n PickDateBeginn.ElementPosition := epIgnore;\r\n PickDateBeginn.Role := '';\r\n PickDateBeginn.Text := '';\r\n PickDateBeginn.DataField := 'BeginnDatum';\r\n PickDateBeginn.DataSource := Source;\r\n pickDateEnde.SetParentComponent(Self);\r\n pickDateEnde.Name := 'pickDateEnde';\r\n pickDateEnde.Left := 73;\r\n pickDateEnde.Top := 191;\r\n pickDateEnde.Width := 164;\r\n pickDateEnde.Height := 30;\r\n pickDateEnde.ElementClassName := 'form-control form-control-sm m-1';\r\n pickDateEnde.HeightStyle := ssAuto;\r\n pickDateEnde.BorderStyle := bsSingle;\r\n pickDateEnde.ChildOrder := 26;\r\n pickDateEnde.Color := clWhite;\r\n pickDateEnde.Date := 43625.314923055560000000;\r\n pickDateEnde.ElementFont := efCSS;\r\n pickDateEnde.ElementPosition := epIgnore;\r\n pickDateEnde.Role := '';\r\n pickDateEnde.TabOrder := 2;\r\n pickDateEnde.Text := '';\r\n pickDateEnde.DataField := 'EndeDatum';\r\n pickDateEnde.DataSource := Source;\r\n PickTimeBeginn.SetParentComponent(Self);\r\n PickTimeBeginn.Name := 'PickTimeBeginn';\r\n PickTimeBeginn.Left := 263;\r\n PickTimeBeginn.Top := 156;\r\n PickTimeBeginn.Width := 140;\r\n PickTimeBeginn.Height := 30;\r\n PickTimeBeginn.ElementClassName := 'form-control form-control-sm m-1';\r\n PickTimeBeginn.HeightStyle := ssAuto;\r\n PickTimeBeginn.BorderStyle := bsSingle;\r\n PickTimeBeginn.ChildOrder := 25;\r\n PickTimeBeginn.Color := clWhite;\r\n PickTimeBeginn.Date := 43625.314923055560000000;\r\n PickTimeBeginn.ElementFont := efCSS;\r\n PickTimeBeginn.ElementPosition := epIgnore;\r\n PickTimeBeginn.Kind := dtkTime;\r\n PickTimeBeginn.Role := '';\r\n PickTimeBeginn.ShowSeconds := False;\r\n PickTimeBeginn.TabOrder := 1;\r\n PickTimeBeginn.Text := '';\r\n PickTimeBeginn.DataField := 'BeginnUhrzeit';\r\n PickTimeBeginn.DataSource := Source;\r\n picktimeEnde.SetParentComponent(Self);\r\n picktimeEnde.Name := 'picktimeEnde';\r\n picktimeEnde.Left := 263;\r\n picktimeEnde.Top := 191;\r\n picktimeEnde.Width := 140;\r\n picktimeEnde.Height := 30;\r\n picktimeEnde.ElementClassName := 'form-control form-control-sm m-1';\r\n picktimeEnde.HeightStyle := ssAuto;\r\n picktimeEnde.BorderStyle := bsSingle;\r\n picktimeEnde.ChildOrder := 27;\r\n picktimeEnde.Color := clWhite;\r\n picktimeEnde.Date := 43625.314923055560000000;\r\n picktimeEnde.ElementFont := efCSS;\r\n picktimeEnde.ElementPosition := epIgnore;\r\n picktimeEnde.Kind := dtkTime;\r\n picktimeEnde.Role := '';\r\n picktimeEnde.ShowSeconds := False;\r\n picktimeEnde.TabOrder := 3;\r\n picktimeEnde.Text := '';\r\n picktimeEnde.DataField := 'EndeUhrzeit';\r\n picktimeEnde.DataSource := Source;\r\n edtBetreff.SetParentComponent(Self);\r\n edtBetreff.Name := 'edtBetreff';\r\n edtBetreff.Left := 73;\r\n edtBetreff.Top := 227;\r\n edtBetreff.Width := 353;\r\n edtBetreff.Height := 21;\r\n edtBetreff.AutoSize := True;\r\n edtBetreff.ChildOrder := 28;\r\n edtBetreff.ElementClassName := 'form-control form-control-sm m-1';\r\n edtBetreff.ElementFont := efCSS;\r\n edtBetreff.ElementPosition := epIgnore;\r\n edtBetreff.HeightStyle := ssAuto;\r\n edtBetreff.HeightPercent := 100.000000000000000000;\r\n edtBetreff.TabOrder := 4;\r\n edtBetreff.Text := 'edtBetreff';\r\n edtBetreff.WidthStyle := ssPercent;\r\n edtBetreff.WidthPercent := 80.000000000000000000;\r\n edtBetreff.DataField := 'Betreff';\r\n edtBetreff.DataSource := Source;\r\n edtNotiz.SetParentComponent(Self);\r\n edtNotiz.Name := 'edtNotiz';\r\n edtNotiz.Left := 74;\r\n edtNotiz.Top := 266;\r\n edtNotiz.Width := 352;\r\n edtNotiz.Height := 91;\r\n edtNotiz.ChildOrder := 29;\r\n edtNotiz.ElementClassName := 'form-control form-control-sm m-1';\r\n edtNotiz.ElementFont := efCSS;\r\n edtNotiz.ElementPosition := epIgnore;\r\n edtNotiz.HeightPercent := 100.000000000000000000;\r\n edtNotiz.Lines.BeginUpdate;\r\n try\r\n edtNotiz.Lines.Clear;\r\n edtNotiz.Lines.Add('WebMemo1');\r\n finally\r\n edtNotiz.Lines.EndUpdate;\r\n end;\r\n edtNotiz.SelLength := 0;\r\n edtNotiz.SelStart := 0;\r\n edtNotiz.TabOrder := 5;\r\n edtNotiz.WidthStyle := ssPercent;\r\n edtNotiz.WidthPercent := 80.000000000000000000;\r\n SetEvent(edtNotiz, Self, 'OnEnter', 'edtNotizEnter');\r\n ContainerBeginn.SetParentComponent(Self);\r\n ContainerBeginn.Name := 'ContainerBeginn';\r\n ContainerBeginn.Left := 284;\r\n ContainerBeginn.Top := 576;\r\n ContainerBeginn.Width := 152;\r\n ContainerBeginn.Height := 41;\r\n ContainerBeginn.ElementClassName := 'd-flex flex-wrap m-1 border border-info';\r\n ContainerBeginn.HeightStyle := ssAuto;\r\n ContainerBeginn.WidthStyle := ssAuto;\r\n ContainerBeginn.ChildOrder := 4;\r\n ContainerBeginn.ElementFont := efCSS;\r\n ContainerBeginn.ElementPosition := epIgnore;\r\n ContainerEnde.SetParentComponent(Self);\r\n ContainerEnde.Name := 'ContainerEnde';\r\n ContainerEnde.Left := 284;\r\n ContainerEnde.Top := 623;\r\n ContainerEnde.Width := 152;\r\n ContainerEnde.Height := 41;\r\n ContainerEnde.ElementClassName := 'd-flex flex-wrap m-1 border border-info';\r\n ContainerEnde.HeightStyle := ssAuto;\r\n ContainerEnde.WidthStyle := ssAuto;\r\n ContainerEnde.ChildOrder := 4;\r\n ContainerEnde.ElementFont := efCSS;\r\n ContainerEnde.ElementPosition := epIgnore;\r\n Container4.SetParentComponent(Self);\r\n Container4.Name := 'Container4';\r\n Container4.Left := 472;\r\n Container4.Top := 124;\r\n Container4.Width := 174;\r\n Container4.Height := 41;\r\n Container4.ElementClassName := 'd-flex flex-wrap m-1';\r\n Container4.HeightStyle := ssAuto;\r\n Container4.WidthStyle := ssAuto;\r\n Container4.ChildOrder := 3;\r\n Container4.ElementFont := efCSS;\r\n Container4.ElementPosition := epIgnore;\r\n Container5.SetParentComponent(Self);\r\n Container5.Name := 'Container5';\r\n Container5.Left := 472;\r\n Container5.Top := 167;\r\n Container5.Width := 174;\r\n Container5.Height := 41;\r\n Container5.ElementClassName := 'd-flex flex-wrap m-1';\r\n Container5.HeightStyle := ssAuto;\r\n Container5.WidthStyle := ssAuto;\r\n Container5.ChildOrder := 4;\r\n Container5.ElementFont := efCSS;\r\n Container5.ElementPosition := epIgnore;\r\n Container6.SetParentComponent(Self);\r\n Container6.Name := 'Container6';\r\n Container6.Left := 472;\r\n Container6.Top := 210;\r\n Container6.Width := 174;\r\n Container6.Height := 41;\r\n Container6.ElementClassName := 'd-flex flex-wrap m-1 border border-info';\r\n Container6.HeightStyle := ssAuto;\r\n Container6.WidthStyle := ssPercent;\r\n Container6.WidthPercent := 85.000000000000000000;\r\n Container6.ChildOrder := 5;\r\n Container6.ElementFont := efCSS;\r\n Container6.ElementPosition := epIgnore;\r\n btnKontaktZuordnen.SetParentComponent(Self);\r\n btnKontaktZuordnen.Name := 'btnKontaktZuordnen';\r\n btnKontaktZuordnen.Left := 361;\r\n btnKontaktZuordnen.Top := 536;\r\n btnKontaktZuordnen.Width := 96;\r\n btnKontaktZuordnen.Height := 25;\r\n btnKontaktZuordnen.Caption := 'Kontakt';\r\n btnKontaktZuordnen.ChildOrder := 12;\r\n btnKontaktZuordnen.ElementClassName := 'btn btn-info btn-sm m-1 text-left';\r\n btnKontaktZuordnen.ElementFont := efCSS;\r\n btnKontaktZuordnen.ElementPosition := epIgnore;\r\n btnKontaktZuordnen.HeightStyle := ssAuto;\r\n btnKontaktZuordnen.HeightPercent := 100.000000000000000000;\r\n btnKontaktZuordnen.WidthStyle := ssAuto;\r\n btnKontaktZuordnen.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnKontaktZuordnen, Self, 'OnClick', 'btnKontaktZuordnenClick');\r\n Container7.SetParentComponent(Self);\r\n Container7.Name := 'Container7';\r\n Container7.Left := 472;\r\n Container7.Top := 257;\r\n Container7.Width := 174;\r\n Container7.Height := 41;\r\n Container7.ElementClassName := 'd-flex flex-wrap m-1 border border-info';\r\n Container7.HeightStyle := ssAuto;\r\n Container7.WidthStyle := ssPercent;\r\n Container7.WidthPercent := 85.000000000000000000;\r\n Container7.ChildOrder := 6;\r\n Container7.ElementFont := efCSS;\r\n Container7.ElementPosition := epIgnore;\r\n Container8.SetParentComponent(Self);\r\n Container8.Name := 'Container8';\r\n Container8.Left := 472;\r\n Container8.Top := 304;\r\n Container8.Width := 174;\r\n Container8.Height := 41;\r\n Container8.ElementClassName := 'd-flex flex-wrap m-1 border border-info';\r\n Container8.HeightStyle := ssAuto;\r\n Container8.WidthStyle := ssPercent;\r\n Container8.WidthPercent := 85.000000000000000000;\r\n Container8.ChildOrder := 7;\r\n Container8.ElementFont := efCSS;\r\n Container8.ElementPosition := epIgnore;\r\n comboap.SetParentComponent(Self);\r\n comboap.Name := 'comboap';\r\n comboap.Left := 11;\r\n comboap.Top := 388;\r\n comboap.Width := 145;\r\n comboap.Height := 21;\r\n comboap.ChildOrder := 30;\r\n comboap.ElementClassName := 'form-control form-control-sm m-1';\r\n comboap.ElementFont := efCSS;\r\n comboap.ElementPosition := epIgnore;\r\n comboap.HeightStyle := ssAuto;\r\n comboap.HeightPercent := 100.000000000000000000;\r\n comboap.WidthPercent := 100.000000000000000000;\r\n SetEvent(comboap, Self, 'OnEnter', 'comboAPEnter');\r\n comboap.ItemIndex := -1;\r\n comboap.DataField := 'Ansprechpartner';\r\n comboap.DataSource := Source;\r\n edtOrt.SetParentComponent(Self);\r\n edtOrt.Name := 'edtOrt';\r\n edtOrt.Left := 54;\r\n edtOrt.Top := 432;\r\n edtOrt.Width := 269;\r\n edtOrt.Height := 21;\r\n edtOrt.ChildOrder := 41;\r\n edtOrt.ElementClassName := 'form-control form-control-sm m-1';\r\n edtOrt.ElementFont := efCSS;\r\n edtOrt.ElementPosition := epIgnore;\r\n edtOrt.HeightStyle := ssAuto;\r\n edtOrt.HeightPercent := 100.000000000000000000;\r\n edtOrt.Text := 'edtOrt';\r\n edtOrt.WidthStyle := ssPercent;\r\n edtOrt.WidthPercent := 60.000000000000000000;\r\n edtOrt.DataField := 'Location';\r\n edtOrt.DataSource := Source;\r\n edtkm.SetParentComponent(Self);\r\n edtkm.Name := 'edtkm';\r\n edtkm.Left := 348;\r\n edtkm.Top := 432;\r\n edtkm.Width := 60;\r\n edtkm.Height := 21;\r\n edtkm.ChildOrder := 43;\r\n edtkm.ElementClassName := 'form-control form-control-sm m-1';\r\n edtkm.ElementFont := efCSS;\r\n edtkm.ElementPosition := epIgnore;\r\n edtkm.HeightStyle := ssAuto;\r\n edtkm.HeightPercent := 100.000000000000000000;\r\n edtkm.Text := 'edtkm';\r\n edtkm.WidthPercent := 100.000000000000000000;\r\n edtkm.DataField := 'gefahrenekm';\r\n edtkm.DataSource := Source;\r\n Container9.SetParentComponent(Self);\r\n Container9.Name := 'Container9';\r\n Container9.Left := 472;\r\n Container9.Top := 351;\r\n Container9.Width := 174;\r\n Container9.Height := 41;\r\n Container9.ElementClassName := 'd-flex flex-wrap m-1 border border-info';\r\n Container9.HeightStyle := ssAuto;\r\n Container9.WidthStyle := ssPercent;\r\n Container9.WidthPercent := 85.000000000000000000;\r\n Container9.ChildOrder := 8;\r\n Container9.ElementFont := efCSS;\r\n Container9.ElementPosition := epIgnore;\r\n Container10.SetParentComponent(Self);\r\n Container10.Name := 'Container10';\r\n Container10.Left := 472;\r\n Container10.Top := 398;\r\n Container10.Width := 174;\r\n Container10.Height := 41;\r\n Container10.ElementClassName := 'd-flex flex-wrap m-1 border border-info';\r\n Container10.HeightStyle := ssAuto;\r\n Container10.WidthStyle := ssPercent;\r\n Container10.WidthPercent := 85.000000000000000000;\r\n Container10.ChildOrder := 9;\r\n Container10.ElementFont := efCSS;\r\n Container10.ElementPosition := epIgnore;\r\n Container11.SetParentComponent(Self);\r\n Container11.Name := 'Container11';\r\n Container11.Left := 472;\r\n Container11.Top := 445;\r\n Container11.Width := 174;\r\n Container11.Height := 41;\r\n Container11.ElementClassName := 'd-flex flex-wrap m-1 border border-info';\r\n Container11.HeightStyle := ssAuto;\r\n Container11.WidthStyle := ssPercent;\r\n Container11.WidthPercent := 85.000000000000000000;\r\n Container11.ChildOrder := 10;\r\n Container11.ElementFont := efCSS;\r\n Container11.ElementPosition := epIgnore;\r\n btnTerminerledigt.SetParentComponent(Self);\r\n btnTerminerledigt.Name := 'btnTerminerledigt';\r\n btnTerminerledigt.Left := 361;\r\n btnTerminerledigt.Top := 505;\r\n btnTerminerledigt.Width := 96;\r\n btnTerminerledigt.Height := 25;\r\n btnTerminerledigt.Caption := 'Termin erledigt';\r\n btnTerminerledigt.ChildOrder := 12;\r\n btnTerminerledigt.ElementClassName := 'btn btn-info btn-sm m-1 text-left';\r\n btnTerminerledigt.ElementFont := efCSS;\r\n btnTerminerledigt.ElementPosition := epIgnore;\r\n btnTerminerledigt.HeightStyle := ssAuto;\r\n btnTerminerledigt.HeightPercent := 100.000000000000000000;\r\n btnTerminerledigt.WidthStyle := ssAuto;\r\n btnTerminerledigt.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnTerminerledigt, Self, 'OnClick', 'btnTerminerledigtClick');\r\n edtTerminerledigt.SetParentComponent(Self);\r\n edtTerminerledigt.Name := 'edtTerminerledigt';\r\n edtTerminerledigt.Left := 214;\r\n edtTerminerledigt.Top := 500;\r\n edtTerminerledigt.Width := 109;\r\n edtTerminerledigt.Height := 24;\r\n edtTerminerledigt.Margins.Left := 25;\r\n edtTerminerledigt.ChildOrder := 47;\r\n edtTerminerledigt.ElementClassName := 'form-control form-control-sm m-1';\r\n edtTerminerledigt.ElementFont := efCSS;\r\n edtTerminerledigt.ElementPosition := epIgnore;\r\n edtTerminerledigt.HeightStyle := ssAuto;\r\n edtTerminerledigt.HeightPercent := 100.000000000000000000;\r\n edtTerminerledigt.Text := 'edtTerminerledigt';\r\n edtTerminerledigt.WidthPercent := 100.000000000000000000;\r\n edtTerminerledigt.DataField := 'TerminErledigt';\r\n edtTerminerledigt.DataSource := Source;\r\n edtAlarmBefore.SetParentComponent(Self);\r\n edtAlarmBefore.Name := 'edtAlarmBefore';\r\n edtAlarmBefore.AlignWithMargins := True;\r\n edtAlarmBefore.Left := 157;\r\n edtAlarmBefore.Top := 470;\r\n edtAlarmBefore.Width := 65;\r\n edtAlarmBefore.Height := 24;\r\n edtAlarmBefore.ElementClassName := 'form-control form-control-sm m-1';\r\n edtAlarmBefore.HeightStyle := ssAuto;\r\n edtAlarmBefore.AutoSize := False;\r\n edtAlarmBefore.BorderStyle := bsSingle;\r\n edtAlarmBefore.ChildOrder := 48;\r\n edtAlarmBefore.Color := clWhite;\r\n edtAlarmBefore.ElementFont := efCSS;\r\n edtAlarmBefore.ElementPosition := epIgnore;\r\n edtAlarmBefore.Increment := 1;\r\n edtAlarmBefore.MaxValue := 60;\r\n edtAlarmBefore.MinValue := 1;\r\n edtAlarmBefore.Role := '';\r\n edtAlarmBefore.Value := 0;\r\n edtAlarmBefore.DataField := 'AlarmBefore';\r\n edtAlarmBefore.DataSource := Source;\r\n edtErinnerung.SetParentComponent(Self);\r\n edtErinnerung.Name := 'edtErinnerung';\r\n edtErinnerung.AlignWithMargins := True;\r\n edtErinnerung.Left := 8;\r\n edtErinnerung.Top := 358;\r\n edtErinnerung.Width := 148;\r\n edtErinnerung.Height := 24;\r\n edtErinnerung.Caption := 'Erinnerung / Min.';\r\n edtErinnerung.ChildOrder := 49;\r\n edtErinnerung.ElementClassName := 'custom-control custom-checkbox m-1';\r\n edtErinnerung.ElementButtonClassName := 'custom-control-input';\r\n edtErinnerung.ElementLabelClassName := 'custom-control-label';\r\n edtErinnerung.ElementFont := efCSS;\r\n edtErinnerung.ElementPosition := epIgnore;\r\n edtErinnerung.HeightStyle := ssAuto;\r\n edtErinnerung.HeightPercent := 100.000000000000000000;\r\n edtErinnerung.WidthPercent := 100.000000000000000000;\r\n edtErinnerung.DataField := 'Alarm';\r\n edtErinnerung.DataSource := Source;\r\n Container12.SetParentComponent(Self);\r\n Container12.Name := 'Container12';\r\n Container12.Left := 472;\r\n Container12.Top := 492;\r\n Container12.Width := 174;\r\n Container12.Height := 41;\r\n Container12.ElementClassName := 'd-flex flex-wrap m-1';\r\n Container12.HeightStyle := ssAuto;\r\n Container12.WidthStyle := ssPercent;\r\n Container12.WidthPercent := 85.000000000000000000;\r\n Container12.ChildOrder := 11;\r\n Container12.ElementFont := efCSS;\r\n Container12.ElementPosition := epIgnore;\r\n DivTextIntern.SetParentComponent(Self);\r\n DivTextIntern.Name := 'DivTextIntern';\r\n DivTextIntern.Left := 546;\r\n DivTextIntern.Top := 539;\r\n DivTextIntern.Width := 100;\r\n DivTextIntern.Height := 41;\r\n DivTextIntern.ElementClassName := 'h6 ml-1';\r\n DivTextIntern.HeightStyle := ssAuto;\r\n DivTextIntern.WidthStyle := ssAuto;\r\n DivTextIntern.ChildOrder := 48;\r\n DivTextIntern.ElementPosition := epIgnore;\r\n DivTextIntern.ElementFont := efCSS;\r\n DivTextIntern.Role := '';\r\n DivTextObjekt.SetParentComponent(Self);\r\n DivTextObjekt.Name := 'DivTextObjekt';\r\n DivTextObjekt.Left := 576;\r\n DivTextObjekt.Top := 586;\r\n DivTextObjekt.Width := 100;\r\n DivTextObjekt.Height := 41;\r\n DivTextObjekt.ElementClassName := 'h6 m-2';\r\n DivTextObjekt.HeightStyle := ssAuto;\r\n DivTextObjekt.WidthStyle := ssAuto;\r\n DivTextObjekt.ChildOrder := 48;\r\n DivTextObjekt.ElementPosition := epIgnore;\r\n DivTextObjekt.ElementFont := efCSS;\r\n DivTextObjekt.Role := '';\r\n DivTextAP.SetParentComponent(Self);\r\n DivTextAP.Name := 'DivTextAP';\r\n DivTextAP.Left := 576;\r\n DivTextAP.Top := 633;\r\n DivTextAP.Width := 100;\r\n DivTextAP.Height := 41;\r\n DivTextAP.ElementClassName := 'h6 m-2';\r\n DivTextAP.HeightStyle := ssAuto;\r\n DivTextAP.WidthStyle := ssAuto;\r\n DivTextAP.ChildOrder := 48;\r\n DivTextAP.ElementPosition := epIgnore;\r\n DivTextAP.ElementFont := efCSS;\r\n DivTextAP.Role := '';\r\n btnroute.SetParentComponent(Self);\r\n btnroute.Name := 'btnroute';\r\n btnroute.Left := 16;\r\n btnroute.Top := 207;\r\n btnroute.Width := 96;\r\n btnroute.Height := 25;\r\n btnroute.Caption := 'Route';\r\n btnroute.ChildOrder := 8;\r\n btnroute.ElementClassName := 'btn btn-info btn-sm m-1 text-left';\r\n btnroute.ElementFont := efCSS;\r\n btnroute.ElementPosition := epIgnore;\r\n btnroute.HeightStyle := ssAuto;\r\n btnroute.HeightPercent := 100.000000000000000000;\r\n btnroute.WidthStyle := ssAuto;\r\n btnroute.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnroute, Self, 'OnClick', 'btnrouteClick');\r\n myDataSet.SetParentComponent(Self);\r\n myDataSet.Name := 'myDataSet';\r\n myDataSet.AfterApplyUpdates := myDataSetAfterApplyUpdates;\r\n myDataSet.AfterOpen := myDataSetAfterOpen;\r\n myDataSet.BeforeEdit := myDataSetBeforeEdit;\r\n myDataSet.BeforePost := myDataSetBeforePost;\r\n myDataSet.AfterPost := myDataSetAfterPost;\r\n SetEvent(myDataSet, Self, 'OnNewRecord', 'myDataSetNewRecord');\r\n myDataSet.EntitySetName := 'TermineNeu';\r\n myDataSet.Connection := DM2.XDataWebConnection1;\r\n myDataSet.SubpropsDepth := 1;\r\n myDataSet.QueryTop := 1;\r\n myDataSet.Left := 392;\r\n myDataSet.Top := 15;\r\n myDataSetArtikelnummer.SetParentComponent(myDataSet);\r\n myDataSetArtikelnummer.Name := 'myDataSetArtikelnummer';\r\n myDataSetArtikelnummer.FieldName := 'Artikelnummer';\r\n myDataSetUID.SetParentComponent(myDataSet);\r\n myDataSetUID.Name := 'myDataSetUID';\r\n myDataSetUID.FieldName := 'UID';\r\n myDataSetUID.Size := 38;\r\n myDataSetBeginn.SetParentComponent(myDataSet);\r\n myDataSetBeginn.Name := 'myDataSetBeginn';\r\n myDataSetBeginn.FieldName := 'Beginn';\r\n myDataSetEnde.SetParentComponent(myDataSet);\r\n myDataSetEnde.Name := 'myDataSetEnde';\r\n myDataSetEnde.FieldName := 'Ende';\r\n myDataSetBetreff.SetParentComponent(myDataSet);\r\n myDataSetBetreff.Name := 'myDataSetBetreff';\r\n myDataSetBetreff.FieldName := 'Betreff';\r\n myDataSetBetreff.Size := 255;\r\n myDataSetTerminNotiz.SetParentComponent(myDataSet);\r\n myDataSetTerminNotiz.Name := 'myDataSetTerminNotiz';\r\n myDataSetTerminNotiz.FieldName := 'TerminNotiz';\r\n myDataSetTerminNotiz.Size := 255;\r\n myDataSetQuelle.SetParentComponent(myDataSet);\r\n myDataSetQuelle.Name := 'myDataSetQuelle';\r\n myDataSetQuelle.FieldName := 'Quelle';\r\n myDataSetQuelle.Size := 10;\r\n myDataSetGUIDOutlook.SetParentComponent(myDataSet);\r\n myDataSetGUIDOutlook.Name := 'myDataSetGUIDOutlook';\r\n myDataSetGUIDOutlook.FieldName := 'GUIDOutlook';\r\n myDataSetGUIDOutlook.Size := 250;\r\n myDataSetShape.SetParentComponent(myDataSet);\r\n myDataSetShape.Name := 'myDataSetShape';\r\n myDataSetShape.FieldName := 'Shape';\r\n myDataSetColor.SetParentComponent(myDataSet);\r\n myDataSetColor.Name := 'myDataSetColor';\r\n myDataSetColor.FieldName := 'Color';\r\n myDataSetAlarm.SetParentComponent(myDataSet);\r\n myDataSetAlarm.Name := 'myDataSetAlarm';\r\n myDataSetAlarm.FieldName := 'Alarm';\r\n myDataSetResource.SetParentComponent(myDataSet);\r\n myDataSetResource.Name := 'myDataSetResource';\r\n myDataSetResource.FieldName := 'Resource';\r\n myDataSetLastModificationTime.SetParentComponent(myDataSet);\r\n myDataSetLastModificationTime.Name := 'myDataSetLastModificationTime';\r\n myDataSetLastModificationTime.FieldName := 'LastModificationTime';\r\n myDataSetGeburtstag.SetParentComponent(myDataSet);\r\n myDataSetGeburtstag.Name := 'myDataSetGeburtstag';\r\n myDataSetGeburtstag.FieldName := 'Geburtstag';\r\n myDataSetAlarmBefore.SetParentComponent(myDataSet);\r\n myDataSetAlarmBefore.Name := 'myDataSetAlarmBefore';\r\n myDataSetAlarmBefore.FieldName := 'AlarmBefore';\r\n myDataSetPersonalnummer.SetParentComponent(myDataSet);\r\n myDataSetPersonalnummer.Name := 'myDataSetPersonalnummer';\r\n myDataSetPersonalnummer.FieldName := 'Personalnummer';\r\n myDataSetKundennummer.SetParentComponent(myDataSet);\r\n myDataSetKundennummer.Name := 'myDataSetKundennummer';\r\n myDataSetKundennummer.FieldName := 'Kundennummer';\r\n myDataSetKundennummer.Size := 13;\r\n myDataSetAllDayEventOutlook.SetParentComponent(myDataSet);\r\n myDataSetAllDayEventOutlook.Name := 'myDataSetAllDayEventOutlook';\r\n myDataSetAllDayEventOutlook.FieldName := 'AllDayEventOutlook';\r\n myDataSetTMSCaption.SetParentComponent(myDataSet);\r\n myDataSetTMSCaption.Name := 'myDataSetTMSCaption';\r\n myDataSetTMSCaption.FieldName := 'TMSCaption';\r\n myDataSetRECURRENCY.SetParentComponent(myDataSet);\r\n myDataSetRECURRENCY.Name := 'myDataSetRECURRENCY';\r\n myDataSetRECURRENCY.FieldName := 'RECURRENCY';\r\n myDataSetRECURRENCY.Size := 255;\r\n myDataSetMINTIME.SetParentComponent(myDataSet);\r\n myDataSetMINTIME.Name := 'myDataSetMINTIME';\r\n myDataSetMINTIME.FieldName := 'MINTIME';\r\n myDataSetMAXTIME.SetParentComponent(myDataSet);\r\n myDataSetMAXTIME.Name := 'myDataSetMAXTIME';\r\n myDataSetMAXTIME.FieldName := 'MAXTIME';\r\n myDataSetNachname.SetParentComponent(myDataSet);\r\n myDataSetNachname.Name := 'myDataSetNachname';\r\n myDataSetNachname.FieldName := 'Nachname';\r\n myDataSetNachname.Size := 40;\r\n myDataSetObjektReferenz.SetParentComponent(myDataSet);\r\n myDataSetObjektReferenz.Name := 'myDataSetObjektReferenz';\r\n myDataSetObjektReferenz.FieldName := 'ObjektReferenz';\r\n myDataSetObjektReferenz.Size := 13;\r\n myDataSetObjektnummer.SetParentComponent(myDataSet);\r\n myDataSetObjektnummer.Name := 'myDataSetObjektnummer';\r\n myDataSetObjektnummer.FieldName := 'Objektnummer';\r\n myDataSetObjektnummer.Size := 25;\r\n myDataSetTerminArt.SetParentComponent(myDataSet);\r\n myDataSetTerminArt.Name := 'myDataSetTerminArt';\r\n myDataSetTerminArt.FieldName := 'TerminArt';\r\n myDataSetBeginnDatum.SetParentComponent(myDataSet);\r\n myDataSetBeginnDatum.Name := 'myDataSetBeginnDatum';\r\n myDataSetBeginnDatum.FieldName := 'BeginnDatum';\r\n myDataSetBeginnUhrzeit.SetParentComponent(myDataSet);\r\n myDataSetBeginnUhrzeit.Name := 'myDataSetBeginnUhrzeit';\r\n myDataSetBeginnUhrzeit.FieldName := 'BeginnUhrzeit';\r\n myDataSetEndeDatum.SetParentComponent(myDataSet);\r\n myDataSetEndeDatum.Name := 'myDataSetEndeDatum';\r\n myDataSetEndeDatum.FieldName := 'EndeDatum';\r\n myDataSetEndeUhrzeit.SetParentComponent(myDataSet);\r\n myDataSetEndeUhrzeit.Name := 'myDataSetEndeUhrzeit';\r\n myDataSetEndeUhrzeit.FieldName := 'EndeUhrzeit';\r\n myDataSetKalenderAnzeige.SetParentComponent(myDataSet);\r\n myDataSetKalenderAnzeige.Name := 'myDataSetKalenderAnzeige';\r\n myDataSetKalenderAnzeige.FieldName := 'KalenderAnzeige';\r\n myDataSetStundensatz.SetParentComponent(myDataSet);\r\n myDataSetStundensatz.Name := 'myDataSetStundensatz';\r\n myDataSetStundensatz.FieldName := 'Stundensatz';\r\n myDataSetStundensatz.DisplayFormat := '0.00';\r\n myDataSetDauerStunden.SetParentComponent(myDataSet);\r\n myDataSetDauerStunden.Name := 'myDataSetDauerStunden';\r\n myDataSetDauerStunden.FieldName := 'DauerStunden';\r\n myDataSetDauerStunden.DisplayFormat := '0.00 h';\r\n myDataSetgefahrenekm.SetParentComponent(myDataSet);\r\n myDataSetgefahrenekm.Name := 'myDataSetgefahrenekm';\r\n myDataSetgefahrenekm.FieldName := 'gefahrenekm';\r\n myDataSetAufwand.SetParentComponent(myDataSet);\r\n myDataSetAufwand.Name := 'myDataSetAufwand';\r\n myDataSetAufwand.FieldName := 'Aufwand';\r\n myDataSetAufwand.DisplayFormat := '#,##0.00';\r\n myDataSetabgerechnet.SetParentComponent(myDataSet);\r\n myDataSetabgerechnet.Name := 'myDataSetabgerechnet';\r\n myDataSetabgerechnet.FieldName := 'abgerechnet';\r\n myDataSetverteilt.SetParentComponent(myDataSet);\r\n myDataSetverteilt.Name := 'myDataSetverteilt';\r\n myDataSetverteilt.FieldName := 'verteilt';\r\n myDataSetTerminErledigt.SetParentComponent(myDataSet);\r\n myDataSetTerminErledigt.Name := 'myDataSetTerminErledigt';\r\n myDataSetTerminErledigt.FieldName := 'TerminErledigt';\r\n myDataSetTerminErledigt.DisplayFormat := 'DD.MM.YYYY';\r\n myDataSetAnsprechpartner.SetParentComponent(myDataSet);\r\n myDataSetAnsprechpartner.Name := 'myDataSetAnsprechpartner';\r\n myDataSetAnsprechpartner.FieldName := 'Ansprechpartner';\r\n myDataSetAnsprechpartner.Size := 50;\r\n myDataSetLocation.SetParentComponent(myDataSet);\r\n myDataSetLocation.Name := 'myDataSetLocation';\r\n myDataSetLocation.FieldName := 'Location';\r\n myDataSetLocation.Size := 100;\r\n myDataSetGoogleID.SetParentComponent(myDataSet);\r\n myDataSetGoogleID.Name := 'myDataSetGoogleID';\r\n myDataSetGoogleID.FieldName := 'GoogleID';\r\n myDataSetGoogleID.Size := 50;\r\n myDataSetGoogleCreatedUTC.SetParentComponent(myDataSet);\r\n myDataSetGoogleCreatedUTC.Name := 'myDataSetGoogleCreatedUTC';\r\n myDataSetGoogleCreatedUTC.FieldName := 'GoogleCreatedUTC';\r\n myDataSetGoogleUpdatedUTC.SetParentComponent(myDataSet);\r\n myDataSetGoogleUpdatedUTC.Name := 'myDataSetGoogleUpdatedUTC';\r\n myDataSetGoogleUpdatedUTC.FieldName := 'GoogleUpdatedUTC';\r\n myDataSetGoogleStatus.SetParentComponent(myDataSet);\r\n myDataSetGoogleStatus.Name := 'myDataSetGoogleStatus';\r\n myDataSetGoogleStatus.FieldName := 'GoogleStatus';\r\n myDataSetGoogleStatus.Size := 50;\r\n myDataSetVorname.SetParentComponent(myDataSet);\r\n myDataSetVorname.Name := 'myDataSetVorname';\r\n myDataSetVorname.FieldName := 'Vorname';\r\n myDataSetVorname.Size := 40;\r\n myDataSetPNachname.SetParentComponent(myDataSet);\r\n myDataSetPNachname.Name := 'myDataSetPNachname';\r\n myDataSetPNachname.FieldName := 'PNachname';\r\n myDataSetPNachname.Size := 40;\r\n myDataSetPVorname.SetParentComponent(myDataSet);\r\n myDataSetPVorname.Name := 'myDataSetPVorname';\r\n myDataSetPVorname.FieldName := 'PVorname';\r\n myDataSetPVorname.Size := 40;\r\n myDataSetArtikelueberschrift.SetParentComponent(myDataSet);\r\n myDataSetArtikelueberschrift.Name := 'myDataSetArtikelueberschrift';\r\n myDataSetArtikelueberschrift.FieldName := 'Artikelueberschrift';\r\n myDataSetArtikelueberschrift.Size := 50;\r\n myDataSetPFarbe.SetParentComponent(myDataSet);\r\n myDataSetPFarbe.Name := 'myDataSetPFarbe';\r\n myDataSetPFarbe.FieldName := 'PFarbe';\r\n myDataSetKontaktart.SetParentComponent(myDataSet);\r\n myDataSetKontaktart.Name := 'myDataSetKontaktart';\r\n myDataSetKontaktart.FieldName := 'Kontaktart';\r\n myDataSetKontaktart.Size := 25;\r\n Source.SetParentComponent(Self);\r\n Source.Name := 'Source';\r\n Source.DataSet := myDataSet;\r\n SetEvent(Source, Self, 'OnStateChange', 'SourceStateChange');\r\n Source.Left := 392;\r\n Source.Top := 63;\r\n dsArtikel.SetParentComponent(Self);\r\n dsArtikel.Name := 'dsArtikel';\r\n dsArtikel.AfterOpen := dsArtikelAfterOpen;\r\n dsArtikel.EntitySetName := 'Artikel';\r\n dsArtikel.Connection := DM2.XDataWebConnection1;\r\n dsArtikel.Left := 440;\r\n dsArtikel.Top := 87;\r\n dsArtikelArtikelnummer.SetParentComponent(dsArtikel);\r\n dsArtikelArtikelnummer.Name := 'dsArtikelArtikelnummer';\r\n dsArtikelArtikelnummer.FieldName := 'Artikelnummer';\r\n dsArtikelArtikelnummer.Required := True;\r\n dsArtikelArtikelnummer.Size := 25;\r\n dskontakt.SetParentComponent(Self);\r\n dskontakt.Name := 'dskontakt';\r\n dskontakt.AfterOpen := dskontaktAfterOpen;\r\n dskontakt.EntitySetName := 'Adressen';\r\n dskontakt.Connection := DM2.XDataWebConnection1;\r\n dskontakt.Left := 400;\r\n dskontakt.Top := 159;\r\n dskontaktKundennummer.SetParentComponent(dskontakt);\r\n dskontaktKundennummer.Name := 'dskontaktKundennummer';\r\n dskontaktKundennummer.FieldName := 'Kundennummer';\r\n dskontaktKundennummer.Required := True;\r\n dskontaktKundennummer.Size := 13;\r\n dskontaktNachname.SetParentComponent(dskontakt);\r\n dskontaktNachname.Name := 'dskontaktNachname';\r\n dskontaktNachname.FieldName := 'Nachname';\r\n dskontaktNachname.Size := 40;\r\n dskontaktVorname.SetParentComponent(dskontakt);\r\n dskontaktVorname.Name := 'dskontaktVorname';\r\n dskontaktVorname.FieldName := 'Vorname';\r\n dskontaktVorname.Size := 40;\r\n dskontaktAdresszeile2.SetParentComponent(dskontakt);\r\n dskontaktAdresszeile2.Name := 'dskontaktAdresszeile2';\r\n dskontaktAdresszeile2.FieldName := 'Adresszeile2';\r\n dskontaktAdresszeile2.Size := 40;\r\n dskontaktAdresszeile3.SetParentComponent(dskontakt);\r\n dskontaktAdresszeile3.Name := 'dskontaktAdresszeile3';\r\n dskontaktAdresszeile3.FieldName := 'Adresszeile3';\r\n dskontaktAdresszeile3.Size := 40;\r\n dskontaktStrasse.SetParentComponent(dskontakt);\r\n dskontaktStrasse.Name := 'dskontaktStrasse';\r\n dskontaktStrasse.FieldName := 'Strasse';\r\n dskontaktStrasse.Size := 40;\r\n dskontaktPostleitzahl.SetParentComponent(dskontakt);\r\n dskontaktPostleitzahl.Name := 'dskontaktPostleitzahl';\r\n dskontaktPostleitzahl.FieldName := 'Postleitzahl';\r\n dskontaktPostleitzahl.Size := 6;\r\n dskontaktOrt.SetParentComponent(dskontakt);\r\n dskontaktOrt.Name := 'dskontaktOrt';\r\n dskontaktOrt.FieldName := 'Ort';\r\n dskontaktOrt.Size := 40;\r\n dskontaktLaenderkuerzel.SetParentComponent(dskontakt);\r\n dskontaktLaenderkuerzel.Name := 'dskontaktLaenderkuerzel';\r\n dskontaktLaenderkuerzel.FieldName := 'Laenderkuerzel';\r\n dskontaktLaenderkuerzel.Size := 5;\r\n dskontaktLand.SetParentComponent(dskontakt);\r\n dskontaktLand.Name := 'dskontaktLand';\r\n dskontaktLand.FieldName := 'Land';\r\n dskontaktLand.Size := 40;\r\n dskontaktKilometer.SetParentComponent(dskontakt);\r\n dskontaktKilometer.Name := 'dskontaktKilometer';\r\n dskontaktKilometer.FieldName := 'Kilometer';\r\n dskontaktStundensatz.SetParentComponent(dskontakt);\r\n dskontaktStundensatz.Name := 'dskontaktStundensatz';\r\n dskontaktStundensatz.FieldName := 'Stundensatz';\r\n dsKArten.SetParentComponent(Self);\r\n dsKArten.Name := 'dsKArten';\r\n dsKArten.AfterOpen := dsKArtenAfterOpen;\r\n dsKArten.EntitySetName := 'kontaktart';\r\n dsKArten.Connection := DM2.XDataWebConnection1;\r\n dsKArten.Left := 400;\r\n dsKArten.Top := 215;\r\n dsKArtenKontaktart.SetParentComponent(dsKArten);\r\n dsKArtenKontaktart.Name := 'dsKArtenKontaktart';\r\n dsKArtenKontaktart.FieldName := 'Kontaktart';\r\n dsKArtenKontaktart.Required := True;\r\n dsKArtenKontaktart.Size := 25;\r\n dsKArtenArtikelnummer.SetParentComponent(dsKArten);\r\n dsKArtenArtikelnummer.Name := 'dsKArtenArtikelnummer';\r\n dsKArtenArtikelnummer.FieldName := 'Artikelnummer';\r\n dsKArtenArtikelnummer.Size := 25;\r\n dsObjekt.SetParentComponent(Self);\r\n dsObjekt.Name := 'dsObjekt';\r\n dsObjekt.AfterOpen := dsObjektAfterOpen;\r\n dsObjekt.EntitySetName := 'Objekte';\r\n dsObjekt.Connection := DM2.XDataWebConnection1;\r\n dsObjekt.Left := 400;\r\n dsObjekt.Top := 271;\r\n dsObjektObjektReferenz.SetParentComponent(dsObjekt);\r\n dsObjektObjektReferenz.Name := 'dsObjektObjektReferenz';\r\n dsObjektObjektReferenz.FieldName := 'ObjektReferenz';\r\n dsObjektObjektReferenz.Required := True;\r\n dsObjektObjektReferenz.Size := 13;\r\n dsObjektKurzbezeichnung.SetParentComponent(dsObjekt);\r\n dsObjektKurzbezeichnung.Name := 'dsObjektKurzbezeichnung';\r\n dsObjektKurzbezeichnung.FieldName := 'Kurzbezeichnung';\r\n dsObjektKurzbezeichnung.Size := 25;\r\n dsObjektObjektnummer.SetParentComponent(dsObjekt);\r\n dsObjektObjektnummer.Name := 'dsObjektObjektnummer';\r\n dsObjektObjektnummer.FieldName := 'Objektnummer';\r\n dsObjektObjektnummer.Size := 25;\r\n dsAP.SetParentComponent(Self);\r\n dsAP.Name := 'dsAP';\r\n dsAP.AfterOpen := dsAPAfterOpen;\r\n dsAP.EntitySetName := 'Ansprechpartner';\r\n dsAP.Connection := DM2.XDataWebConnection1;\r\n dsAP.Left := 400;\r\n dsAP.Top := 327;\r\n dsAPKundennummer.SetParentComponent(dsAP);\r\n dsAPKundennummer.Name := 'dsAPKundennummer';\r\n dsAPKundennummer.FieldName := 'Kundennummer';\r\n dsAPKundennummer.Required := True;\r\n dsAPAnsprechpartner.SetParentComponent(dsAP);\r\n dsAPAnsprechpartner.Name := 'dsAPAnsprechpartner';\r\n dsAPAnsprechpartner.FieldName := 'Ansprechpartner';\r\n dsAPAnsprechpartner.Size := 50;\r\n dsAPNachname.SetParentComponent(dsAP);\r\n dsAPNachname.Name := 'dsAPNachname';\r\n dsAPNachname.FieldName := 'Nachname';\r\n dsAPNachname.Size := 40;\r\n dsAPVorname.SetParentComponent(dsAP);\r\n dsAPVorname.Name := 'dsAPVorname';\r\n dsAPVorname.FieldName := 'Vorname';\r\n dsAPVorname.Size := 40;\r\n XDSlookupObjekt.SetParentComponent(Self);\r\n XDSlookupObjekt.Name := 'XDSlookupObjekt';\r\n XDSlookupObjekt.AfterOpen := XDSlookupObjektAfterOpen;\r\n XDSlookupObjekt.EntitySetName := 'Objekte';\r\n XDSlookupObjekt.Connection := DM2.XDataWebConnection1;\r\n XDSlookupObjekt.QueryTop := 1;\r\n XDSlookupObjekt.Left := 304;\r\n XDSlookupObjekt.Top := 64;\r\n XDSlookupObjektObjektReferenz.SetParentComponent(XDSlookupObjekt);\r\n XDSlookupObjektObjektReferenz.Name := 'XDSlookupObjektObjektReferenz';\r\n XDSlookupObjektObjektReferenz.FieldName := 'ObjektReferenz';\r\n XDSlookupObjektObjektReferenz.Required := True;\r\n XDSlookupObjektObjektReferenz.Size := 13;\r\n XDSlookupObjektKurzbezeichnung.SetParentComponent(XDSlookupObjekt);\r\n XDSlookupObjektKurzbezeichnung.Name := 'XDSlookupObjektKurzbezeichnung';\r\n XDSlookupObjektKurzbezeichnung.FieldName := 'Kurzbezeichnung';\r\n XDSlookupObjektKurzbezeichnung.Size := 25;\r\n XDSlookupObjektObjektnummer.SetParentComponent(XDSlookupObjekt);\r\n XDSlookupObjektObjektnummer.Name := 'XDSlookupObjektObjektnummer';\r\n XDSlookupObjektObjektnummer.FieldName := 'Objektnummer';\r\n XDSlookupObjektObjektnummer.Size := 25;\r\n finally\r\n lblTerminart.AfterLoadDFMValues;\r\n lblBeginn.AfterLoadDFMValues;\r\n lblEnde.AfterLoadDFMValues;\r\n lblBetreff.AfterLoadDFMValues;\r\n lblNotiz.AfterLoadDFMValues;\r\n lblAnsprechpartner.AfterLoadDFMValues;\r\n lblort.AfterLoadDFMValues;\r\n lblkm.AfterLoadDFMValues;\r\n lblMitarbeiter.AfterLoadDFMValues;\r\n WebLabel2.AfterLoadDFMValues;\r\n lblKontakt.AfterLoadDFMValues;\r\n Container1.AfterLoadDFMValues;\r\n btnObjektwahl.AfterLoadDFMValues;\r\n btnzurueck.AfterLoadDFMValues;\r\n btnSpeichern.AfterLoadDFMValues;\r\n Container2.AfterLoadDFMValues;\r\n btnWV.AfterLoadDFMValues;\r\n btnAktivitaet.AfterLoadDFMValues;\r\n comboKontaktart.AfterLoadDFMValues;\r\n Container3.AfterLoadDFMValues;\r\n PickDateBeginn.AfterLoadDFMValues;\r\n pickDateEnde.AfterLoadDFMValues;\r\n PickTimeBeginn.AfterLoadDFMValues;\r\n picktimeEnde.AfterLoadDFMValues;\r\n edtBetreff.AfterLoadDFMValues;\r\n edtNotiz.AfterLoadDFMValues;\r\n ContainerBeginn.AfterLoadDFMValues;\r\n ContainerEnde.AfterLoadDFMValues;\r\n Container4.AfterLoadDFMValues;\r\n Container5.AfterLoadDFMValues;\r\n Container6.AfterLoadDFMValues;\r\n btnKontaktZuordnen.AfterLoadDFMValues;\r\n Container7.AfterLoadDFMValues;\r\n Container8.AfterLoadDFMValues;\r\n comboap.AfterLoadDFMValues;\r\n edtOrt.AfterLoadDFMValues;\r\n edtkm.AfterLoadDFMValues;\r\n Container9.AfterLoadDFMValues;\r\n Container10.AfterLoadDFMValues;\r\n Container11.AfterLoadDFMValues;\r\n btnTerminerledigt.AfterLoadDFMValues;\r\n edtTerminerledigt.AfterLoadDFMValues;\r\n edtAlarmBefore.AfterLoadDFMValues;\r\n edtErinnerung.AfterLoadDFMValues;\r\n Container12.AfterLoadDFMValues;\r\n DivTextIntern.AfterLoadDFMValues;\r\n DivTextObjekt.AfterLoadDFMValues;\r\n DivTextAP.AfterLoadDFMValues;\r\n btnroute.AfterLoadDFMValues;\r\n myDataSet.AfterLoadDFMValues;\r\n myDataSetArtikelnummer.AfterLoadDFMValues;\r\n myDataSetUID.AfterLoadDFMValues;\r\n myDataSetBeginn.AfterLoadDFMValues;\r\n myDataSetEnde.AfterLoadDFMValues;\r\n myDataSetBetreff.AfterLoadDFMValues;\r\n myDataSetTerminNotiz.AfterLoadDFMValues;\r\n myDataSetQuelle.AfterLoadDFMValues;\r\n myDataSetGUIDOutlook.AfterLoadDFMValues;\r\n myDataSetShape.AfterLoadDFMValues;\r\n myDataSetColor.AfterLoadDFMValues;\r\n myDataSetAlarm.AfterLoadDFMValues;\r\n myDataSetResource.AfterLoadDFMValues;\r\n myDataSetLastModificationTime.AfterLoadDFMValues;\r\n myDataSetGeburtstag.AfterLoadDFMValues;\r\n myDataSetAlarmBefore.AfterLoadDFMValues;\r\n myDataSetPersonalnummer.AfterLoadDFMValues;\r\n myDataSetKundennummer.AfterLoadDFMValues;\r\n myDataSetAllDayEventOutlook.AfterLoadDFMValues;\r\n myDataSetTMSCaption.AfterLoadDFMValues;\r\n myDataSetRECURRENCY.AfterLoadDFMValues;\r\n myDataSetMINTIME.AfterLoadDFMValues;\r\n myDataSetMAXTIME.AfterLoadDFMValues;\r\n myDataSetNachname.AfterLoadDFMValues;\r\n myDataSetObjektReferenz.AfterLoadDFMValues;\r\n myDataSetObjektnummer.AfterLoadDFMValues;\r\n myDataSetTerminArt.AfterLoadDFMValues;\r\n myDataSetBeginnDatum.AfterLoadDFMValues;\r\n myDataSetBeginnUhrzeit.AfterLoadDFMValues;\r\n myDataSetEndeDatum.AfterLoadDFMValues;\r\n myDataSetEndeUhrzeit.AfterLoadDFMValues;\r\n myDataSetKalenderAnzeige.AfterLoadDFMValues;\r\n myDataSetStundensatz.AfterLoadDFMValues;\r\n myDataSetDauerStunden.AfterLoadDFMValues;\r\n myDataSetgefahrenekm.AfterLoadDFMValues;\r\n myDataSetAufwand.AfterLoadDFMValues;\r\n myDataSetabgerechnet.AfterLoadDFMValues;\r\n myDataSetverteilt.AfterLoadDFMValues;\r\n myDataSetTerminErledigt.AfterLoadDFMValues;\r\n myDataSetAnsprechpartner.AfterLoadDFMValues;\r\n myDataSetLocation.AfterLoadDFMValues;\r\n myDataSetGoogleID.AfterLoadDFMValues;\r\n myDataSetGoogleCreatedUTC.AfterLoadDFMValues;\r\n myDataSetGoogleUpdatedUTC.AfterLoadDFMValues;\r\n myDataSetGoogleStatus.AfterLoadDFMValues;\r\n myDataSetVorname.AfterLoadDFMValues;\r\n myDataSetPNachname.AfterLoadDFMValues;\r\n myDataSetPVorname.AfterLoadDFMValues;\r\n myDataSetArtikelueberschrift.AfterLoadDFMValues;\r\n myDataSetPFarbe.AfterLoadDFMValues;\r\n myDataSetKontaktart.AfterLoadDFMValues;\r\n Source.AfterLoadDFMValues;\r\n dsArtikel.AfterLoadDFMValues;\r\n dsArtikelArtikelnummer.AfterLoadDFMValues;\r\n dskontakt.AfterLoadDFMValues;\r\n dskontaktKundennummer.AfterLoadDFMValues;\r\n dskontaktNachname.AfterLoadDFMValues;\r\n dskontaktVorname.AfterLoadDFMValues;\r\n dskontaktAdresszeile2.AfterLoadDFMValues;\r\n dskontaktAdresszeile3.AfterLoadDFMValues;\r\n dskontaktStrasse.AfterLoadDFMValues;\r\n dskontaktPostleitzahl.AfterLoadDFMValues;\r\n dskontaktOrt.AfterLoadDFMValues;\r\n dskontaktLaenderkuerzel.AfterLoadDFMValues;\r\n dskontaktLand.AfterLoadDFMValues;\r\n dskontaktKilometer.AfterLoadDFMValues;\r\n dskontaktStundensatz.AfterLoadDFMValues;\r\n dsKArten.AfterLoadDFMValues;\r\n dsKArtenKontaktart.AfterLoadDFMValues;\r\n dsKArtenArtikelnummer.AfterLoadDFMValues;\r\n dsObjekt.AfterLoadDFMValues;\r\n dsObjektObjektReferenz.AfterLoadDFMValues;\r\n dsObjektKurzbezeichnung.AfterLoadDFMValues;\r\n dsObjektObjektnummer.AfterLoadDFMValues;\r\n dsAP.AfterLoadDFMValues;\r\n dsAPKundennummer.AfterLoadDFMValues;\r\n dsAPAnsprechpartner.AfterLoadDFMValues;\r\n dsAPNachname.AfterLoadDFMValues;\r\n dsAPVorname.AfterLoadDFMValues;\r\n XDSlookupObjekt.AfterLoadDFMValues;\r\n XDSlookupObjektObjektReferenz.AfterLoadDFMValues;\r\n XDSlookupObjektKurzbezeichnung.AfterLoadDFMValues;\r\n XDSlookupObjektObjektnummer.AfterLoadDFMValues;\r\n end;\r\nend;\r\n\r\nend.\r\n","unit unit_AuftragTermine;\r\n\r\ninterface\r\n\r\nuses\r\n System.SysUtils, System.Classes, JS, Web, WEBLib.Graphics, WEBLib.Controls,\r\n WEBLib.Forms, WEBLib.Dialogs, WEBLib.Buttons, Vcl.Controls, Vcl.StdCtrls,\r\n WEBLib.StdCtrls, WEBLib.ExtCtrls, Data.DB, XData.Web.JsonDataset,\r\n XData.Web.Dataset, WEBLib.Grids, WEBLib.DBCtrls, WEBLib.DB, WEBLib.WebCtrls;\r\n\r\ntype\r\n TAuftragTermine = class(TForm)\r\n dsTermine: TXDataWebDataSet;\r\n dsTermineArtikelnummer: TXDataWebEntityField;\r\n dsTermineUID: TStringField;\r\n dsTermineBeginn: TDateTimeField;\r\n dsTermineEnde: TDateTimeField;\r\n dsTermineBetreff: TStringField;\r\n dsTermineTerminNotiz: TStringField;\r\n dsTermineQuelle: TStringField;\r\n dsTermineGUIDOutlook: TStringField;\r\n dsTermineShape: TIntegerField;\r\n dsTermineColor: TIntegerField;\r\n dsTermineAlarm: TBooleanField;\r\n dsTermineResource: TIntegerField;\r\n dsTermineLastModificationTime: TDateTimeField;\r\n dsTermineGeburtstag: TBooleanField;\r\n dsTermineAlarmBefore: TIntegerField;\r\n dsTerminePersonalnummer: TIntegerField;\r\n dsTermineKundennummer: TStringField;\r\n dsTermineAllDayEventOutlook: TBooleanField;\r\n dsTermineTMSCaption: TBooleanField;\r\n dsTermineRECURRENCY: TStringField;\r\n dsTermineMINTIME: TDateTimeField;\r\n dsTermineMAXTIME: TDateTimeField;\r\n dsTermineNachname: TStringField;\r\n dsTermineObjektReferenz: TStringField;\r\n dsTermineObjektnummer: TStringField;\r\n dsTermineTerminArt: TIntegerField;\r\n dsTermineBeginnDatum: TDateTimeField;\r\n dsTermineBeginnUhrzeit: TDateTimeField;\r\n dsTermineEndeDatum: TDateTimeField;\r\n dsTermineEndeUhrzeit: TDateTimeField;\r\n dsTermineKalenderAnzeige: TBooleanField;\r\n dsTermineStundensatz: TFloatField;\r\n dsTermineDauerStunden: TFloatField;\r\n dsTerminegefahrenekm: TFloatField;\r\n dsTermineAufwand: TFloatField;\r\n dsTermineabgerechnet: TBooleanField;\r\n dsTermineverteilt: TDateTimeField;\r\n dsTermineTerminErledigt: TDateTimeField;\r\n dsTermineAnsprechpartner: TStringField;\r\n dsTermineLocation: TStringField;\r\n dsTermineGoogleID: TStringField;\r\n dsTermineGoogleCreatedUTC: TDateTimeField;\r\n dsTermineGoogleUpdatedUTC: TDateTimeField;\r\n dsTermineGoogleStatus: TStringField;\r\n dsTermineVorname: TStringField;\r\n dsTerminePNachname: TStringField;\r\n dsTerminePVorname: TStringField;\r\n dsTermineArtikelueberschrift: TStringField;\r\n dsTerminePFarbe: TIntegerField;\r\n dsTermineKontaktart: TStringField;\r\n dsTermineAuftrag: TStringField;\r\n sourceTermine: TDataSource;\r\n Container1: THTMLContainer;\r\n Container2: THTMLContainer;\r\n Container3: THTMLContainer;\r\n procedure WebFormShow(Sender: TObject);\r\n procedure dsTermineAfterOpen(DataSet: TDataSet);\r\n private\r\n { Private-Deklarationen }\r\n public\r\n { Public-Deklarationen }\r\n MerkerAuftragTermine:string;\r\n buttonzurueck:TButton;\r\n EinzelCard:THTMLDiv;\r\n procedure buttonzurueckclick(Sender:TObject);\r\n procedure EinzelCardclick(Sender:TObject);\r\n protected procedure LoadDFMValues; override; end;\r\n\r\nvar\r\n AuftragTermine: TAuftragTermine;\r\n\r\nimplementation\r\n uses unit1, unit2, unit_Einzeltermin;\r\n{$R *.dfm}\r\n\r\nprocedure TAuftragTermine.buttonzurueckclick(Sender:TObject);\r\nbegin\r\n dsTermine.Close;\r\n self.close;\r\nend;\r\n\r\nprocedure TAuftragTermine.EinzelCardclick(Sender:TObject);\r\nvar\r\n LFrm:TfrmEinzeltermin;\r\n myTerminUID:string;\r\nbegin\r\n myTerminUID:=(sender as THTMLDiv).ElementID;\r\n Container3.HTML.text:='';\r\n frmEinzeltermin := TfrmEinzeltermin.CreateNew(procedure(AForm: TObject)\r\n begin\r\n (AForm as TfrmEinzeltermin).TerminUID:=myTerminUID;\r\n end\r\n );\r\n\r\n frmEinzeltermin.ShowModal(procedure(AValue: TModalResult)\r\n begin\r\n dsTermine.close;\r\n dsTermine.Load;\r\n end\r\n );\r\nend;\r\n\r\n\r\nprocedure TAuftragTermine.dsTermineAfterOpen(DataSet: TDataSet);\r\nvar\r\n myelement:TJSHTMLElement;\r\n EinzelKarte:string;\r\nbegin\r\n Container1.html.text:='';\r\n\r\n Container2.HTML.Text:='';\r\n myelement:=container2.ElementHandle;\r\n buttonzurueck:=TButton.Create(self);\r\n buttonzurueck.ElementClassName:='btn btn-info m-1 text-left';\r\n buttonzurueck.HeightStyle:=ssauto;\r\n buttonzurueck.WidthStyle:=ssauto;\r\n buttonzurueck.tag:=0;\r\n buttonzurueck.Caption:='<< zurück';\r\n buttonzurueck.OnClick:=@buttonzurueckClick;\r\n buttonzurueck.ParentElement:=myelement;\r\n while not dsTermine.eof do\r\n begin\r\n\r\n Einzelkarte:='
'+formatdatetime('DD.MM.YY hh:mm',dsTermineBeginn.Asdatetime)+' - '+formatdatetime('DD.MM.YY hh:mm',dsTermineEnde.Asdatetime)+'
'+dsTermineBetreff.AsString+'
';\r\n Einzelkarte:=Einzelkarte+'
'+trim(dsTerminePVorname.AsString+' '+dsTerminePNachname.AsString);\r\n Einzelkarte:=Einzelkarte+'
'+dsTermineTerminNotiz.AsString+'
';\r\n Einzelkarte:=Einzelkarte+dsTermineKundennummer.AsString+' '+dsTermineNachname.AsString+'
';\r\n Einzelkarte:=Einzelkarte+'
';\r\n\r\n\r\n myelement:=Container3.ElementHandle;\r\n EinzelCard:=THTMLDiv.Create(self);\r\n EinzelCard.ElementID:=dsTermineUID.asstring;\r\n EinzelCard.HeightStyle:=ssauto;\r\n EinzelCard.Width:=350;\r\n EinzelCard.HTML.Text:=Einzelkarte;\r\n EinzelCard.ElementClassName:='card m-1 border-info';\r\n EinzelCard.OnClick:=@EinzelCardClick;\r\n EinzelCard.ParentElement:=myelement;\r\n\r\n dsTermine.Next;\r\n end;\r\n\r\nend;\r\n\r\nprocedure TAuftragTermine.WebFormShow(Sender: TObject);\r\nbegin\r\n dsTermine.Close;\r\n dsTermine.QueryString:='$filter=Auftrag eq '+QuotedStr(MerkerAuftragTermine);\r\n dsTermine.Load;\r\nend;\r\n\r\nprocedure TAuftragTermine.LoadDFMValues;\r\nbegin\r\n inherited LoadDFMValues;\r\n\r\n Container1 := THTMLContainer.Create(Self);\r\n Container2 := THTMLContainer.Create(Self);\r\n Container3 := THTMLContainer.Create(Self);\r\n dsTermine := TXDataWebDataSet.Create(Self);\r\n dsTermineArtikelnummer := TXDataWebEntityField.Create(Self);\r\n dsTermineUID := TStringField.Create(Self);\r\n dsTermineBeginn := TDateTimeField.Create(Self);\r\n dsTermineEnde := TDateTimeField.Create(Self);\r\n dsTermineBetreff := TStringField.Create(Self);\r\n dsTermineTerminNotiz := TStringField.Create(Self);\r\n dsTermineQuelle := TStringField.Create(Self);\r\n dsTermineGUIDOutlook := TStringField.Create(Self);\r\n dsTermineShape := TIntegerField.Create(Self);\r\n dsTermineColor := TIntegerField.Create(Self);\r\n dsTermineAlarm := TBooleanField.Create(Self);\r\n dsTermineResource := TIntegerField.Create(Self);\r\n dsTermineLastModificationTime := TDateTimeField.Create(Self);\r\n dsTermineGeburtstag := TBooleanField.Create(Self);\r\n dsTermineAlarmBefore := TIntegerField.Create(Self);\r\n dsTerminePersonalnummer := TIntegerField.Create(Self);\r\n dsTermineKundennummer := TStringField.Create(Self);\r\n dsTermineAllDayEventOutlook := TBooleanField.Create(Self);\r\n dsTermineTMSCaption := TBooleanField.Create(Self);\r\n dsTermineRECURRENCY := TStringField.Create(Self);\r\n dsTermineMINTIME := TDateTimeField.Create(Self);\r\n dsTermineMAXTIME := TDateTimeField.Create(Self);\r\n dsTermineNachname := TStringField.Create(Self);\r\n dsTermineObjektReferenz := TStringField.Create(Self);\r\n dsTermineObjektnummer := TStringField.Create(Self);\r\n dsTermineTerminArt := TIntegerField.Create(Self);\r\n dsTermineBeginnDatum := TDateTimeField.Create(Self);\r\n dsTermineBeginnUhrzeit := TDateTimeField.Create(Self);\r\n dsTermineEndeDatum := TDateTimeField.Create(Self);\r\n dsTermineEndeUhrzeit := TDateTimeField.Create(Self);\r\n dsTermineKalenderAnzeige := TBooleanField.Create(Self);\r\n dsTermineStundensatz := TFloatField.Create(Self);\r\n dsTermineDauerStunden := TFloatField.Create(Self);\r\n dsTerminegefahrenekm := TFloatField.Create(Self);\r\n dsTermineAufwand := TFloatField.Create(Self);\r\n dsTermineabgerechnet := TBooleanField.Create(Self);\r\n dsTermineverteilt := TDateTimeField.Create(Self);\r\n dsTermineTerminErledigt := TDateTimeField.Create(Self);\r\n dsTermineAnsprechpartner := TStringField.Create(Self);\r\n dsTermineLocation := TStringField.Create(Self);\r\n dsTermineGoogleID := TStringField.Create(Self);\r\n dsTermineGoogleCreatedUTC := TDateTimeField.Create(Self);\r\n dsTermineGoogleUpdatedUTC := TDateTimeField.Create(Self);\r\n dsTermineGoogleStatus := TStringField.Create(Self);\r\n dsTermineVorname := TStringField.Create(Self);\r\n dsTerminePNachname := TStringField.Create(Self);\r\n dsTerminePVorname := TStringField.Create(Self);\r\n dsTermineArtikelueberschrift := TStringField.Create(Self);\r\n dsTerminePFarbe := TIntegerField.Create(Self);\r\n dsTermineKontaktart := TStringField.Create(Self);\r\n dsTermineAuftrag := TStringField.Create(Self);\r\n sourceTermine := TDataSource.Create(Self);\r\n\r\n Container1.BeforeLoadDFMValues;\r\n Container2.BeforeLoadDFMValues;\r\n Container3.BeforeLoadDFMValues;\r\n dsTermine.BeforeLoadDFMValues;\r\n dsTermineArtikelnummer.BeforeLoadDFMValues;\r\n dsTermineUID.BeforeLoadDFMValues;\r\n dsTermineBeginn.BeforeLoadDFMValues;\r\n dsTermineEnde.BeforeLoadDFMValues;\r\n dsTermineBetreff.BeforeLoadDFMValues;\r\n dsTermineTerminNotiz.BeforeLoadDFMValues;\r\n dsTermineQuelle.BeforeLoadDFMValues;\r\n dsTermineGUIDOutlook.BeforeLoadDFMValues;\r\n dsTermineShape.BeforeLoadDFMValues;\r\n dsTermineColor.BeforeLoadDFMValues;\r\n dsTermineAlarm.BeforeLoadDFMValues;\r\n dsTermineResource.BeforeLoadDFMValues;\r\n dsTermineLastModificationTime.BeforeLoadDFMValues;\r\n dsTermineGeburtstag.BeforeLoadDFMValues;\r\n dsTermineAlarmBefore.BeforeLoadDFMValues;\r\n dsTerminePersonalnummer.BeforeLoadDFMValues;\r\n dsTermineKundennummer.BeforeLoadDFMValues;\r\n dsTermineAllDayEventOutlook.BeforeLoadDFMValues;\r\n dsTermineTMSCaption.BeforeLoadDFMValues;\r\n dsTermineRECURRENCY.BeforeLoadDFMValues;\r\n dsTermineMINTIME.BeforeLoadDFMValues;\r\n dsTermineMAXTIME.BeforeLoadDFMValues;\r\n dsTermineNachname.BeforeLoadDFMValues;\r\n dsTermineObjektReferenz.BeforeLoadDFMValues;\r\n dsTermineObjektnummer.BeforeLoadDFMValues;\r\n dsTermineTerminArt.BeforeLoadDFMValues;\r\n dsTermineBeginnDatum.BeforeLoadDFMValues;\r\n dsTermineBeginnUhrzeit.BeforeLoadDFMValues;\r\n dsTermineEndeDatum.BeforeLoadDFMValues;\r\n dsTermineEndeUhrzeit.BeforeLoadDFMValues;\r\n dsTermineKalenderAnzeige.BeforeLoadDFMValues;\r\n dsTermineStundensatz.BeforeLoadDFMValues;\r\n dsTermineDauerStunden.BeforeLoadDFMValues;\r\n dsTerminegefahrenekm.BeforeLoadDFMValues;\r\n dsTermineAufwand.BeforeLoadDFMValues;\r\n dsTermineabgerechnet.BeforeLoadDFMValues;\r\n dsTermineverteilt.BeforeLoadDFMValues;\r\n dsTermineTerminErledigt.BeforeLoadDFMValues;\r\n dsTermineAnsprechpartner.BeforeLoadDFMValues;\r\n dsTermineLocation.BeforeLoadDFMValues;\r\n dsTermineGoogleID.BeforeLoadDFMValues;\r\n dsTermineGoogleCreatedUTC.BeforeLoadDFMValues;\r\n dsTermineGoogleUpdatedUTC.BeforeLoadDFMValues;\r\n dsTermineGoogleStatus.BeforeLoadDFMValues;\r\n dsTermineVorname.BeforeLoadDFMValues;\r\n dsTerminePNachname.BeforeLoadDFMValues;\r\n dsTerminePVorname.BeforeLoadDFMValues;\r\n dsTermineArtikelueberschrift.BeforeLoadDFMValues;\r\n dsTerminePFarbe.BeforeLoadDFMValues;\r\n dsTermineKontaktart.BeforeLoadDFMValues;\r\n dsTermineAuftrag.BeforeLoadDFMValues;\r\n sourceTermine.BeforeLoadDFMValues;\r\n try\r\n Name := 'AuftragTermine';\r\n Width := 174;\r\n Height := 201;\r\n CSSLibrary := cssBootstrap;\r\n ElementFont := efCSS;\r\n Font.Charset := DEFAULT_CHARSET;\r\n Font.Color := clWindowText;\r\n Font.Height := -11;\r\n Font.Name := 'Tahoma';\r\n Font.Style := [];\r\n ParentFont := False;\r\n SetEvent(Self, 'OnShow', 'WebFormShow');\r\n Container1.SetParentComponent(Self);\r\n Container1.Name := 'Container1';\r\n Container1.Left := 0;\r\n Container1.Top := 0;\r\n Container1.Width := 169;\r\n Container1.Height := 41;\r\n Container1.HeightStyle := ssAuto;\r\n Container1.WidthStyle := ssPercent;\r\n Container1.HeightPercent := 100.000000000000000000;\r\n Container1.WidthPercent := 100.000000000000000000;\r\n Container1.ChildOrder := 1;\r\n Container1.ElementFont := efCSS;\r\n Container1.ElementPosition := epIgnore;\r\n Container2.SetParentComponent(Self);\r\n Container2.Name := 'Container2';\r\n Container2.Left := 0;\r\n Container2.Top := 47;\r\n Container2.Width := 169;\r\n Container2.Height := 41;\r\n Container2.ElementClassName := 'd-flex flex-wrap m-1';\r\n Container2.HeightStyle := ssAuto;\r\n Container2.WidthStyle := ssAuto;\r\n Container2.HeightPercent := 100.000000000000000000;\r\n Container2.WidthPercent := 100.000000000000000000;\r\n Container2.ChildOrder := 5;\r\n Container2.ElementFont := efCSS;\r\n Container2.ElementPosition := epIgnore;\r\n Container3.SetParentComponent(Self);\r\n Container3.Name := 'Container3';\r\n Container3.Left := 0;\r\n Container3.Top := 94;\r\n Container3.Width := 169;\r\n Container3.Height := 41;\r\n Container3.ElementClassName := 'd-flex flex-wrap m-1';\r\n Container3.HeightStyle := ssAuto;\r\n Container3.WidthStyle := ssAuto;\r\n Container3.HeightPercent := 100.000000000000000000;\r\n Container3.WidthPercent := 100.000000000000000000;\r\n Container3.ChildOrder := 5;\r\n Container3.ElementFont := efCSS;\r\n Container3.ElementPosition := epIgnore;\r\n dsTermine.SetParentComponent(Self);\r\n dsTermine.Name := 'dsTermine';\r\n dsTermine.AfterOpen := dsTermineAfterOpen;\r\n dsTermine.EntitySetName := 'TermineNeu';\r\n dsTermine.Connection := DM2.XDataWebConnection1;\r\n dsTermine.Left := 116;\r\n dsTermine.Top := 72;\r\n dsTermineArtikelnummer.SetParentComponent(dsTermine);\r\n dsTermineArtikelnummer.Name := 'dsTermineArtikelnummer';\r\n dsTermineArtikelnummer.FieldName := 'Artikelnummer';\r\n dsTermineUID.SetParentComponent(dsTermine);\r\n dsTermineUID.Name := 'dsTermineUID';\r\n dsTermineUID.FieldName := 'UID';\r\n dsTermineUID.Required := True;\r\n dsTermineUID.Size := 38;\r\n dsTermineBeginn.SetParentComponent(dsTermine);\r\n dsTermineBeginn.Name := 'dsTermineBeginn';\r\n dsTermineBeginn.FieldName := 'Beginn';\r\n dsTermineEnde.SetParentComponent(dsTermine);\r\n dsTermineEnde.Name := 'dsTermineEnde';\r\n dsTermineEnde.FieldName := 'Ende';\r\n dsTermineBetreff.SetParentComponent(dsTermine);\r\n dsTermineBetreff.Name := 'dsTermineBetreff';\r\n dsTermineBetreff.FieldName := 'Betreff';\r\n dsTermineBetreff.Size := 255;\r\n dsTermineTerminNotiz.SetParentComponent(dsTermine);\r\n dsTermineTerminNotiz.Name := 'dsTermineTerminNotiz';\r\n dsTermineTerminNotiz.FieldName := 'TerminNotiz';\r\n dsTermineTerminNotiz.Size := 255;\r\n dsTermineQuelle.SetParentComponent(dsTermine);\r\n dsTermineQuelle.Name := 'dsTermineQuelle';\r\n dsTermineQuelle.FieldName := 'Quelle';\r\n dsTermineQuelle.Size := 10;\r\n dsTermineGUIDOutlook.SetParentComponent(dsTermine);\r\n dsTermineGUIDOutlook.Name := 'dsTermineGUIDOutlook';\r\n dsTermineGUIDOutlook.FieldName := 'GUIDOutlook';\r\n dsTermineGUIDOutlook.Size := 250;\r\n dsTermineShape.SetParentComponent(dsTermine);\r\n dsTermineShape.Name := 'dsTermineShape';\r\n dsTermineShape.FieldName := 'Shape';\r\n dsTermineColor.SetParentComponent(dsTermine);\r\n dsTermineColor.Name := 'dsTermineColor';\r\n dsTermineColor.FieldName := 'Color';\r\n dsTermineAlarm.SetParentComponent(dsTermine);\r\n dsTermineAlarm.Name := 'dsTermineAlarm';\r\n dsTermineAlarm.FieldName := 'Alarm';\r\n dsTermineResource.SetParentComponent(dsTermine);\r\n dsTermineResource.Name := 'dsTermineResource';\r\n dsTermineResource.FieldName := 'Resource';\r\n dsTermineLastModificationTime.SetParentComponent(dsTermine);\r\n dsTermineLastModificationTime.Name := 'dsTermineLastModificationTime';\r\n dsTermineLastModificationTime.FieldName := 'LastModificationTime';\r\n dsTermineGeburtstag.SetParentComponent(dsTermine);\r\n dsTermineGeburtstag.Name := 'dsTermineGeburtstag';\r\n dsTermineGeburtstag.FieldName := 'Geburtstag';\r\n dsTermineAlarmBefore.SetParentComponent(dsTermine);\r\n dsTermineAlarmBefore.Name := 'dsTermineAlarmBefore';\r\n dsTermineAlarmBefore.FieldName := 'AlarmBefore';\r\n dsTerminePersonalnummer.SetParentComponent(dsTermine);\r\n dsTerminePersonalnummer.Name := 'dsTerminePersonalnummer';\r\n dsTerminePersonalnummer.FieldName := 'Personalnummer';\r\n dsTermineKundennummer.SetParentComponent(dsTermine);\r\n dsTermineKundennummer.Name := 'dsTermineKundennummer';\r\n dsTermineKundennummer.FieldName := 'Kundennummer';\r\n dsTermineKundennummer.Size := 13;\r\n dsTermineAllDayEventOutlook.SetParentComponent(dsTermine);\r\n dsTermineAllDayEventOutlook.Name := 'dsTermineAllDayEventOutlook';\r\n dsTermineAllDayEventOutlook.FieldName := 'AllDayEventOutlook';\r\n dsTermineTMSCaption.SetParentComponent(dsTermine);\r\n dsTermineTMSCaption.Name := 'dsTermineTMSCaption';\r\n dsTermineTMSCaption.FieldName := 'TMSCaption';\r\n dsTermineRECURRENCY.SetParentComponent(dsTermine);\r\n dsTermineRECURRENCY.Name := 'dsTermineRECURRENCY';\r\n dsTermineRECURRENCY.FieldName := 'RECURRENCY';\r\n dsTermineRECURRENCY.Size := 255;\r\n dsTermineMINTIME.SetParentComponent(dsTermine);\r\n dsTermineMINTIME.Name := 'dsTermineMINTIME';\r\n dsTermineMINTIME.FieldName := 'MINTIME';\r\n dsTermineMAXTIME.SetParentComponent(dsTermine);\r\n dsTermineMAXTIME.Name := 'dsTermineMAXTIME';\r\n dsTermineMAXTIME.FieldName := 'MAXTIME';\r\n dsTermineNachname.SetParentComponent(dsTermine);\r\n dsTermineNachname.Name := 'dsTermineNachname';\r\n dsTermineNachname.FieldName := 'Nachname';\r\n dsTermineNachname.Size := 40;\r\n dsTermineObjektReferenz.SetParentComponent(dsTermine);\r\n dsTermineObjektReferenz.Name := 'dsTermineObjektReferenz';\r\n dsTermineObjektReferenz.FieldName := 'ObjektReferenz';\r\n dsTermineObjektReferenz.Size := 13;\r\n dsTermineObjektnummer.SetParentComponent(dsTermine);\r\n dsTermineObjektnummer.Name := 'dsTermineObjektnummer';\r\n dsTermineObjektnummer.FieldName := 'Objektnummer';\r\n dsTermineObjektnummer.Size := 25;\r\n dsTermineTerminArt.SetParentComponent(dsTermine);\r\n dsTermineTerminArt.Name := 'dsTermineTerminArt';\r\n dsTermineTerminArt.FieldName := 'TerminArt';\r\n dsTermineBeginnDatum.SetParentComponent(dsTermine);\r\n dsTermineBeginnDatum.Name := 'dsTermineBeginnDatum';\r\n dsTermineBeginnDatum.FieldName := 'BeginnDatum';\r\n dsTermineBeginnUhrzeit.SetParentComponent(dsTermine);\r\n dsTermineBeginnUhrzeit.Name := 'dsTermineBeginnUhrzeit';\r\n dsTermineBeginnUhrzeit.FieldName := 'BeginnUhrzeit';\r\n dsTermineEndeDatum.SetParentComponent(dsTermine);\r\n dsTermineEndeDatum.Name := 'dsTermineEndeDatum';\r\n dsTermineEndeDatum.FieldName := 'EndeDatum';\r\n dsTermineEndeUhrzeit.SetParentComponent(dsTermine);\r\n dsTermineEndeUhrzeit.Name := 'dsTermineEndeUhrzeit';\r\n dsTermineEndeUhrzeit.FieldName := 'EndeUhrzeit';\r\n dsTermineKalenderAnzeige.SetParentComponent(dsTermine);\r\n dsTermineKalenderAnzeige.Name := 'dsTermineKalenderAnzeige';\r\n dsTermineKalenderAnzeige.FieldName := 'KalenderAnzeige';\r\n dsTermineStundensatz.SetParentComponent(dsTermine);\r\n dsTermineStundensatz.Name := 'dsTermineStundensatz';\r\n dsTermineStundensatz.FieldName := 'Stundensatz';\r\n dsTermineDauerStunden.SetParentComponent(dsTermine);\r\n dsTermineDauerStunden.Name := 'dsTermineDauerStunden';\r\n dsTermineDauerStunden.FieldName := 'DauerStunden';\r\n dsTerminegefahrenekm.SetParentComponent(dsTermine);\r\n dsTerminegefahrenekm.Name := 'dsTerminegefahrenekm';\r\n dsTerminegefahrenekm.FieldName := 'gefahrenekm';\r\n dsTermineAufwand.SetParentComponent(dsTermine);\r\n dsTermineAufwand.Name := 'dsTermineAufwand';\r\n dsTermineAufwand.FieldName := 'Aufwand';\r\n dsTermineabgerechnet.SetParentComponent(dsTermine);\r\n dsTermineabgerechnet.Name := 'dsTermineabgerechnet';\r\n dsTermineabgerechnet.FieldName := 'abgerechnet';\r\n dsTermineverteilt.SetParentComponent(dsTermine);\r\n dsTermineverteilt.Name := 'dsTermineverteilt';\r\n dsTermineverteilt.FieldName := 'verteilt';\r\n dsTermineTerminErledigt.SetParentComponent(dsTermine);\r\n dsTermineTerminErledigt.Name := 'dsTermineTerminErledigt';\r\n dsTermineTerminErledigt.FieldName := 'TerminErledigt';\r\n dsTermineAnsprechpartner.SetParentComponent(dsTermine);\r\n dsTermineAnsprechpartner.Name := 'dsTermineAnsprechpartner';\r\n dsTermineAnsprechpartner.FieldName := 'Ansprechpartner';\r\n dsTermineAnsprechpartner.Size := 50;\r\n dsTermineLocation.SetParentComponent(dsTermine);\r\n dsTermineLocation.Name := 'dsTermineLocation';\r\n dsTermineLocation.FieldName := 'Location';\r\n dsTermineLocation.Size := 100;\r\n dsTermineGoogleID.SetParentComponent(dsTermine);\r\n dsTermineGoogleID.Name := 'dsTermineGoogleID';\r\n dsTermineGoogleID.FieldName := 'GoogleID';\r\n dsTermineGoogleID.Size := 50;\r\n dsTermineGoogleCreatedUTC.SetParentComponent(dsTermine);\r\n dsTermineGoogleCreatedUTC.Name := 'dsTermineGoogleCreatedUTC';\r\n dsTermineGoogleCreatedUTC.FieldName := 'GoogleCreatedUTC';\r\n dsTermineGoogleUpdatedUTC.SetParentComponent(dsTermine);\r\n dsTermineGoogleUpdatedUTC.Name := 'dsTermineGoogleUpdatedUTC';\r\n dsTermineGoogleUpdatedUTC.FieldName := 'GoogleUpdatedUTC';\r\n dsTermineGoogleStatus.SetParentComponent(dsTermine);\r\n dsTermineGoogleStatus.Name := 'dsTermineGoogleStatus';\r\n dsTermineGoogleStatus.FieldName := 'GoogleStatus';\r\n dsTermineGoogleStatus.Size := 50;\r\n dsTermineVorname.SetParentComponent(dsTermine);\r\n dsTermineVorname.Name := 'dsTermineVorname';\r\n dsTermineVorname.FieldName := 'Vorname';\r\n dsTermineVorname.Size := 40;\r\n dsTerminePNachname.SetParentComponent(dsTermine);\r\n dsTerminePNachname.Name := 'dsTerminePNachname';\r\n dsTerminePNachname.FieldName := 'PNachname';\r\n dsTerminePNachname.Size := 40;\r\n dsTerminePVorname.SetParentComponent(dsTermine);\r\n dsTerminePVorname.Name := 'dsTerminePVorname';\r\n dsTerminePVorname.FieldName := 'PVorname';\r\n dsTerminePVorname.Size := 40;\r\n dsTermineArtikelueberschrift.SetParentComponent(dsTermine);\r\n dsTermineArtikelueberschrift.Name := 'dsTermineArtikelueberschrift';\r\n dsTermineArtikelueberschrift.FieldName := 'Artikelueberschrift';\r\n dsTermineArtikelueberschrift.Size := 50;\r\n dsTerminePFarbe.SetParentComponent(dsTermine);\r\n dsTerminePFarbe.Name := 'dsTerminePFarbe';\r\n dsTerminePFarbe.FieldName := 'PFarbe';\r\n dsTermineKontaktart.SetParentComponent(dsTermine);\r\n dsTermineKontaktart.Name := 'dsTermineKontaktart';\r\n dsTermineKontaktart.FieldName := 'Kontaktart';\r\n dsTermineKontaktart.Size := 25;\r\n dsTermineAuftrag.SetParentComponent(dsTermine);\r\n dsTermineAuftrag.Name := 'dsTermineAuftrag';\r\n dsTermineAuftrag.FieldName := 'Auftrag';\r\n dsTermineAuftrag.Size := 10;\r\n sourceTermine.SetParentComponent(Self);\r\n sourceTermine.Name := 'sourceTermine';\r\n sourceTermine.DataSet := dsTermine;\r\n sourceTermine.Left := 32;\r\n sourceTermine.Top := 72;\r\n finally\r\n Container1.AfterLoadDFMValues;\r\n Container2.AfterLoadDFMValues;\r\n Container3.AfterLoadDFMValues;\r\n dsTermine.AfterLoadDFMValues;\r\n dsTermineArtikelnummer.AfterLoadDFMValues;\r\n dsTermineUID.AfterLoadDFMValues;\r\n dsTermineBeginn.AfterLoadDFMValues;\r\n dsTermineEnde.AfterLoadDFMValues;\r\n dsTermineBetreff.AfterLoadDFMValues;\r\n dsTermineTerminNotiz.AfterLoadDFMValues;\r\n dsTermineQuelle.AfterLoadDFMValues;\r\n dsTermineGUIDOutlook.AfterLoadDFMValues;\r\n dsTermineShape.AfterLoadDFMValues;\r\n dsTermineColor.AfterLoadDFMValues;\r\n dsTermineAlarm.AfterLoadDFMValues;\r\n dsTermineResource.AfterLoadDFMValues;\r\n dsTermineLastModificationTime.AfterLoadDFMValues;\r\n dsTermineGeburtstag.AfterLoadDFMValues;\r\n dsTermineAlarmBefore.AfterLoadDFMValues;\r\n dsTerminePersonalnummer.AfterLoadDFMValues;\r\n dsTermineKundennummer.AfterLoadDFMValues;\r\n dsTermineAllDayEventOutlook.AfterLoadDFMValues;\r\n dsTermineTMSCaption.AfterLoadDFMValues;\r\n dsTermineRECURRENCY.AfterLoadDFMValues;\r\n dsTermineMINTIME.AfterLoadDFMValues;\r\n dsTermineMAXTIME.AfterLoadDFMValues;\r\n dsTermineNachname.AfterLoadDFMValues;\r\n dsTermineObjektReferenz.AfterLoadDFMValues;\r\n dsTermineObjektnummer.AfterLoadDFMValues;\r\n dsTermineTerminArt.AfterLoadDFMValues;\r\n dsTermineBeginnDatum.AfterLoadDFMValues;\r\n dsTermineBeginnUhrzeit.AfterLoadDFMValues;\r\n dsTermineEndeDatum.AfterLoadDFMValues;\r\n dsTermineEndeUhrzeit.AfterLoadDFMValues;\r\n dsTermineKalenderAnzeige.AfterLoadDFMValues;\r\n dsTermineStundensatz.AfterLoadDFMValues;\r\n dsTermineDauerStunden.AfterLoadDFMValues;\r\n dsTerminegefahrenekm.AfterLoadDFMValues;\r\n dsTermineAufwand.AfterLoadDFMValues;\r\n dsTermineabgerechnet.AfterLoadDFMValues;\r\n dsTermineverteilt.AfterLoadDFMValues;\r\n dsTermineTerminErledigt.AfterLoadDFMValues;\r\n dsTermineAnsprechpartner.AfterLoadDFMValues;\r\n dsTermineLocation.AfterLoadDFMValues;\r\n dsTermineGoogleID.AfterLoadDFMValues;\r\n dsTermineGoogleCreatedUTC.AfterLoadDFMValues;\r\n dsTermineGoogleUpdatedUTC.AfterLoadDFMValues;\r\n dsTermineGoogleStatus.AfterLoadDFMValues;\r\n dsTermineVorname.AfterLoadDFMValues;\r\n dsTerminePNachname.AfterLoadDFMValues;\r\n dsTerminePVorname.AfterLoadDFMValues;\r\n dsTermineArtikelueberschrift.AfterLoadDFMValues;\r\n dsTerminePFarbe.AfterLoadDFMValues;\r\n dsTermineKontaktart.AfterLoadDFMValues;\r\n dsTermineAuftrag.AfterLoadDFMValues;\r\n sourceTermine.AfterLoadDFMValues;\r\n end;\r\nend;\r\n\r\nend.\r\n","unit unit_AuftragPosEinzel;\r\n\r\ninterface\r\n\r\nuses\r\n System.SysUtils, System.Classes, JS, Web, WEBLib.Graphics, WEBLib.Controls,\r\n WEBLib.Forms, WEBLib.Dialogs, DB, XData.Web.JsonDataset, XData.Web.Dataset,\r\n Vcl.StdCtrls, WEBLib.StdCtrls, WEBLib.Grids, Vcl.Controls, WEBLib.ExtCtrls, dateutils, strutils,\r\n WEBLib.DBCtrls;\r\n\r\ntype\r\n TAuftragPosEinzel = class(TForm)\r\n Container1: THTMLContainer;\r\n Container2: THTMLContainer;\r\n btnPosAbbrechen: TButton;\r\n btnPosSpeichern: TButton;\r\n btnPositionLoeschen: TButton;\r\n xdsPosition: TXDataWebDataSet;\r\n xdsPositionID: TIntegerField;\r\n xdsPositionPosNr: TFloatField;\r\n xdsPositionPosUNr: TFloatField;\r\n xdsPositionArtikelueberschrift: TStringField;\r\n xdsPositionArtikelbeschreibung: TStringField;\r\n xdsPositionMenge: TFloatField;\r\n xdsPositionArtderMenge: TStringField;\r\n xdsPositionVerkaufspreis: TFloatField;\r\n xdsPositionEinkaufspreis: TFloatField;\r\n xdsPositionArtikelnummer: TXDataWebEntityField;\r\n xdsPositionMonteurP: TIntegerField;\r\n xdsPositionArbeitszeitDatum: TDateTimeField;\r\n xdsPositionArbeitszeitVON: TDateTimeField;\r\n xdsPositionArbeitszeitBIS: TDateTimeField;\r\n xdsPositionSumme: TBooleanField;\r\n xdsPositionSeriennummer: TStringField;\r\n xdsPositionWarengruppe: TStringField;\r\n xdsPositionWarenuntergruppe: TStringField;\r\n xdsPositionArtikelnummerKunde: TStringField;\r\n xdsPositionLieferant: TStringField;\r\n xdsPositionGewicht: TFloatField;\r\n xdsPositionLaenge: TFloatField;\r\n xdsPositionBreite: TFloatField;\r\n xdsPositionHoehe: TFloatField;\r\n xdsPositionMehrwertsteuersatz: TFloatField;\r\n xdsPositionEndpreis: TFloatField;\r\n xdsPositionPosMWST: TFloatField;\r\n xdsPositionBruttoEndpreis: TFloatField;\r\n xdsPositionEndpreis_EK: TFloatField;\r\n xdsPositionRabattsatz: TFloatField;\r\n xdsPositionPreisvorRabatt: TFloatField;\r\n xdsPositionPKZ: TFloatField;\r\n xdsPositionTextfrei10: TStringField;\r\n xdsPositionTextfrei20: TStringField;\r\n xdsPositionProduktionAbgeschlossen: TDateTimeField;\r\n xdsPositionEinzelpreisBrutto: TFloatField;\r\n xdsPositionPosMarge: TFloatField;\r\n xdsPositionPosMargeProzent: TFloatField;\r\n xdsPositionBereitsGeliefert: TFloatField;\r\n xdsPositionausliefern: TFloatField;\r\n xdsPositionBestellungErledigt: TBooleanField;\r\n xdsPositionLager: TStringField;\r\n xdsPositionbestellen: TBooleanField;\r\n xdsPositionWarenbestand: TBooleanField;\r\n xdsPositionArtikelbeschreibungRTF: TStringField;\r\n xdsPositionQuellartikel: TStringField;\r\n xdsPositionArtikelnummerWB: TStringField;\r\n xdsPositionPreisanteilNetto: TFloatField;\r\n xdsPositionSetHPos: TStringField;\r\n xdsPositionSetUPos: TStringField;\r\n xdsPositionProvisionssatz: TFloatField;\r\n xdsPositionProvisionsbetrag: TFloatField;\r\n xdsPositionArtikelsprache: TStringField;\r\n xdsPositionEKvom: TDateTimeField;\r\n xdsPositionMengenberechnungID: TStringField;\r\n xdsPositionTaraID: TStringField;\r\n xdsPositionTara: TFloatField;\r\n xdsPositionBruttoGewicht: TFloatField;\r\n xdsPositionAussenflaeche: TFloatField;\r\n xdsPositionLadeort: TStringField;\r\n xdsPositionSeitenumbruch: TBooleanField;\r\n xdsPositionPlanerFarbe: TIntegerField;\r\n xdsPositionMWStKey: TIntegerField;\r\n xdsPositionZSnachPos: TBooleanField;\r\n xdsPositionLieferzeit: TStringField;\r\n xdsPositionPreisVorRabattWHG: TFloatField;\r\n xdsPositionReferenzKalkulation: TStringField;\r\n xdsPositionPKey: TIntegerField;\r\n xdsPositionAuftragsnummer: TStringField;\r\n xdsPositionlwbID: TStringField;\r\n xdsPositionBelegdatum: TDateTimeField;\r\n xdsPositionWarenkontrollnummern: TStringField;\r\n xdsPositionVolumen: TFloatField;\r\n xdsPositionPosVolumen: TFloatField;\r\n xdsPositionArtikelAttribute: TStringField;\r\n xdsPositionNummerkomplett: TXDataWebEntityField;\r\n sourcePosition: TDataSource;\r\n dsArtikel: TXDataWebDataSet;\r\n dsArtikelHersteller: TXDataWebEntityField;\r\n dsArtikelArtderMenge: TXDataWebEntityField;\r\n dsArtikelPfandArt: TXDataWebEntityField;\r\n dsArtikelWarengruppe: TXDataWebEntityField;\r\n dsArtikelWarenuntergruppe: TXDataWebEntityField;\r\n dsArtikelArtikelnummer: TStringField;\r\n dsArtikelArtikelueberschrift: TStringField;\r\n dsArtikelArtikelbeschreibung: TStringField;\r\n dsArtikelVerkaufspreis: TFloatField;\r\n dsArtikelMindestbestand: TFloatField;\r\n dsArtikelPreisliste: TStringField;\r\n dsArtikelGewicht: TFloatField;\r\n dsArtikelLaenge: TFloatField;\r\n dsArtikelBreite: TFloatField;\r\n dsArtikelHoehe: TFloatField;\r\n dsArtikelArtikelZusatz: TStringField;\r\n dsArtikelLagerort: TStringField;\r\n dsArtikelBuchungskonto: TIntegerField;\r\n dsArtikelEingangMenge: TFloatField;\r\n dsArtikelEingangEndpreis: TFloatField;\r\n dsArtikelAusgangMenge: TFloatField;\r\n dsArtikelAusgangEndpreisEK: TFloatField;\r\n dsArtikelAusgangEndpreisVK: TFloatField;\r\n dsArtikelBestand: TFloatField;\r\n dsArtikelBestandswert: TFloatField;\r\n dsArtikelMarge: TFloatField;\r\n dsArtikelMargeProzent: TFloatField;\r\n dsArtikelArtikelnummer2: TStringField;\r\n dsArtikelArtikelmatchcode: TStringField;\r\n dsArtikelRabattpreis1: TFloatField;\r\n dsArtikelRabattpreis2: TFloatField;\r\n dsArtikelRabattpreis3: TFloatField;\r\n dsArtikelRabattpreis4: TFloatField;\r\n dsArtikelRabattpreis5: TFloatField;\r\n dsArtikelArtikelnichtmehrgueltig: TBooleanField;\r\n dsArtikelEinkaufspreis: TFloatField;\r\n dsArtikelAufschlag: TFloatField;\r\n dsArtikelWarenbestand: TBooleanField;\r\n dsArtikelTextfrei10: TStringField;\r\n dsArtikelTextfrei20: TStringField;\r\n dsArtikelArtikelbeschreibungRTF: TStringField;\r\n dsArtikelArtikeldatei1: TStringField;\r\n dsArtikelArtikeldatei2: TStringField;\r\n dsArtikelArtikeldatei3: TStringField;\r\n dsArtikelArtikeldatei4: TStringField;\r\n dsArtikelArtikeldatei5: TStringField;\r\n dsArtikelEinkaufspreisVom: TDateTimeField;\r\n dsArtikelEAN: TStringField;\r\n dsArtikelVGPFaktor: TFloatField;\r\n dsArtikelVGPMengenart: TStringField;\r\n dsArtikelVerleihpreis: TFloatField;\r\n dsArtikelZusatzPreis: TFloatField;\r\n dsArtikelVerpackungsart: TStringField;\r\n dsArtikelVerpackungsMenge: TFloatField;\r\n dsArtikelQuellartikel: TStringField;\r\n dsArtikelrabattierfaehig: TBooleanField;\r\n dsArtikelAngebotAlternativeAN: TStringField;\r\n dsArtikelPreisanteilNetto: TFloatField;\r\n dsArtikelFarbe: TIntegerField;\r\n dsArtikelAEinkauf: TBooleanField;\r\n dsArtikelAVerkauf: TBooleanField;\r\n dsArtikelArtikelnummerLieferant: TStringField;\r\n dsArtikelLieferantnummer: TStringField;\r\n dsArtikelVerkaufspreisBrutto: TFloatField;\r\n dsArtikelArtikelSet: TBooleanField;\r\n dsArtikelProvisionssatz: TFloatField;\r\n dsArtikelWarentarifnummer: TStringField;\r\n dsArtikelHandelsartikel: TBooleanField;\r\n dsArtikelUrsprungsland: TStringField;\r\n dsArtikelKategorie: TStringField;\r\n dsArtikelStandardRabattsatzEK: TFloatField;\r\n dsArtikelStandardRabattsatzVK: TFloatField;\r\n dsArtikelRabattpreiseManuell: TBooleanField;\r\n dsArtikelMengeBestellt: TFloatField;\r\n dsArtikelMengeBeauftragt: TFloatField;\r\n dsArtikelBestandDisponiert: TFloatField;\r\n dsArtikelMengeAngeboten: TFloatField;\r\n dsArtikelBestandDispInclAngebot: TFloatField;\r\n dsArtikelMWStKey: TIntegerField;\r\n dsArtikelShopAmazon: TBooleanField;\r\n dsArtikelShopQuelle: TBooleanField;\r\n dsArtikelGeraet: TBooleanField;\r\n dsArtikelArtgewicht: TFloatField;\r\n dsArtikelVolumen: TFloatField;\r\n dsArtikelPacklisteNichtAnzeigen: TBooleanField;\r\n dsArtikelKeineAufschlagskalkulation: TBooleanField;\r\n dsArtikelKorrekturMenge: TFloatField;\r\n dsArtikelKorrekturWert: TFloatField;\r\n dsArtikelNachfolgeartikel: TStringField;\r\n dsArtikelMindestbestellmenge: TFloatField;\r\n dsArtikelSchnittEK: TFloatField;\r\n dsArtikelVerkaufspreisVom: TDateTimeField;\r\n dsArtikelPruefungChargeSNR: TIntegerField;\r\n dsArtikelArtikelbeschreibungHTML: TStringField;\r\n dsArtikelProduktKurzbeschreibungHTML: TStringField;\r\n dsArtikelStatusFuerShop: TStringField;\r\n dsArtikelAmpelFuerShop: TStringField;\r\n dsArtikelEXP_Anzahl: TFloatField;\r\n dsArtikelEXP_Inhalt: TFloatField;\r\n dsArtikelEXP_Faktor: TFloatField;\r\n dsArtikelFach: TStringField;\r\n dsArtikelExportKasse: TIntegerField;\r\n dsArtikelWKNR: TIntegerField;\r\n dsArtikelArtikelAttribute: TStringField;\r\n dsArtikelErstelltAm: TDateTimeField;\r\n dsArtikelVarianteVonAN: TStringField;\r\n dsArtikelGurtmassWerte: TStringField;\r\n dsArtikelGurtmass: TFloatField;\r\n dsArtikelAltersgrenze: TIntegerField;\r\n dsArtikelMWStKeyImHaus: TIntegerField;\r\n dsArtikelKasseBewegung: TFloatField;\r\n dsArtikelKasseBewegungEK: TFloatField;\r\n dsArtikelKasseBewegungVK: TFloatField;\r\n dsArtikelProduktionBewegung: TFloatField;\r\n dsArtikelProduktionBewegungEK: TFloatField;\r\n dsArtikelProduktionBewegungVK: TFloatField;\r\n dsArtikelWaWiAB: TIntegerField;\r\n dsArtikelGeaendertAm: TDateTimeField;\r\n dsArtikelGefahrgutKennzeichen: TStringField;\r\n dsArtikelVerpackG: TBooleanField;\r\n dsArtikelUPE: TFloatField;\r\n dsArtikelArtikelbeschreibungEinkauf: TStringField;\r\n dsArtikelHerstellerArtikelnummer: TStringField;\r\n dsArtikelNatura: TStringField;\r\n dsArtikelArbeitszeit: TBooleanField;\r\n dsArtikelArtderMengeArtderMenge: TStringField;\r\n xdsKundenpreise: TXDataWebDataSet;\r\n xdsKundenpreiseArtikelnummer: TXDataWebEntityField;\r\n xdsKundenpreiseKundennummer: TXDataWebEntityField;\r\n xdsKundenpreiseVerkaufspreis: TFloatField;\r\n xdsKundenpreiseNachname: TStringField;\r\n xdsKundenpreiseRabattsatz: TFloatField;\r\n xdsKundenpreiseVerleihpreis: TFloatField;\r\n xdsKundenpreiseZusatzPreis: TFloatField;\r\n xdsKundenpreiseArtikelnummerKunde: TStringField;\r\n xdsKundenpreiseDatumGeaendert: TDateTimeField;\r\n xdsKundenpreiseArtikelueberschrift: TStringField;\r\n xdsKundenpreiseArtikelnummerArtikelnummer: TStringField;\r\n xdsKundenpreiseArtikelnummerArtikelueberschrift: TStringField;\r\n xdsKundenpreiseArtikelnummerArtikelbeschreibung: TStringField;\r\n dsBeleg2: TXDataWebDataSet;\r\n dsBeleg2Kundennummer: TXDataWebEntityField;\r\n dsBeleg2Nummerkomplett: TStringField;\r\n dsBeleg2ReferenzAngebot: TStringField;\r\n dsBeleg2ReferenzLieferschein: TStringField;\r\n dsBeleg2ReferenzRechnung: TStringField;\r\n dsBeleg2Datum: TDateTimeField;\r\n dsBeleg2Jahr: TFloatField;\r\n dsBeleg2Kalenderwoche: TIntegerField;\r\n dsBeleg2Nachname: TStringField;\r\n dsBeleg2Vorname: TStringField;\r\n dsBeleg2Postleitzahl: TStringField;\r\n dsBeleg2Ort: TStringField;\r\n dsBeleg2Laenderkuerzel: TStringField;\r\n dsBeleg2Land: TStringField;\r\n dsBeleg2Briefanrede1: TStringField;\r\n dsBeleg2Briefanrede2: TStringField;\r\n dsBeleg2EMail: TStringField;\r\n dsBeleg2AdresseBild: TStringField;\r\n dsBeleg2LieferanschriftBild: TStringField;\r\n dsBeleg2Zahlungsbedingung: TIntegerField;\r\n dsBeleg2ZahlungsbedingungText: TStringField;\r\n dsBeleg2Auftragsbezeichnung: TStringField;\r\n dsBeleg2AuftragnummerKunde: TStringField;\r\n dsBeleg2BestelldatumKunde: TDateTimeField;\r\n dsBeleg2ILN: TStringField;\r\n dsBeleg2Kopftext: TStringField;\r\n dsBeleg2Schlussbemerkung: TStringField;\r\n dsBeleg2Gruss: TStringField;\r\n dsBeleg2Mehrwertsteuersatz1: TFloatField;\r\n dsBeleg2Mehrwertsteuersatz2: TFloatField;\r\n dsBeleg2Nettosumme01: TFloatField;\r\n dsBeleg2Nettosumme02: TFloatField;\r\n dsBeleg2Nettosumme: TFloatField;\r\n dsBeleg2Mehrwertsteuer01: TFloatField;\r\n dsBeleg2Mehrwertsteuer02: TFloatField;\r\n dsBeleg2Mehrwertsteuer: TFloatField;\r\n dsBeleg2Bruttosumme: TFloatField;\r\n dsBeleg2Versanddatum: TDateTimeField;\r\n dsBeleg2Skontosatz: TFloatField;\r\n dsBeleg2NettosummeEK: TFloatField;\r\n dsBeleg2NettoMarge: TFloatField;\r\n dsBeleg2Schreibzeichen: TStringField;\r\n dsBeleg2Unterzeichner: TStringField;\r\n dsBeleg2TelefonMA: TStringField;\r\n dsBeleg2EmailMA: TStringField;\r\n dsBeleg2USTID: TStringField;\r\n dsBeleg2Umsatzsteuerausweis: TBooleanField;\r\n dsBeleg2gebucht: TBooleanField;\r\n dsBeleg2Lieferdatum: TDateTimeField;\r\n dsBeleg2Transportbedingung: TStringField;\r\n dsBeleg2Mehrwertsteuersatz3: TFloatField;\r\n dsBeleg2Mehrwertsteuer03: TFloatField;\r\n dsBeleg2Nettosumme03: TFloatField;\r\n dsBeleg2RundungsDifferenz: TFloatField;\r\n dsBeleg2EmailText: TStringField;\r\n dsBeleg2Auftragerledigt: TBooleanField;\r\n dsBeleg2Rabattstufe: TStringField;\r\n dsBeleg2KFZKennzeichen: TStringField;\r\n dsBeleg2Fahrgestellnummer: TStringField;\r\n dsBeleg2KFZHersteller: TStringField;\r\n dsBeleg2Erstzulassungsdatum: TDateTimeField;\r\n dsBeleg2KMStand: TStringField;\r\n dsBeleg2KFZType: TStringField;\r\n dsBeleg2Inspektionsdatum: TDateTimeField;\r\n dsBeleg2Debitorennummer: TStringField;\r\n dsBeleg2Kostentraeger: TStringField;\r\n dsBeleg2Rabattsatz: TFloatField;\r\n dsBeleg2ObjektReferenz: TStringField;\r\n dsBeleg2Bank: TStringField;\r\n dsBeleg2Bankleitzahl: TFloatField;\r\n dsBeleg2Kontonummer: TStringField;\r\n dsBeleg2Kontoinhaber: TStringField;\r\n dsBeleg2Telefaxnummer: TStringField;\r\n dsBeleg2DatumNeu: TDateTimeField;\r\n dsBeleg2Datumgeaendert: TDateTimeField;\r\n dsBeleg2Objektnummer: TStringField;\r\n dsBeleg2Liefertermin: TStringField;\r\n dsBeleg2Emailversand: TBooleanField;\r\n dsBeleg2Telefonnummer: TStringField;\r\n dsBeleg2MobilTelefon: TStringField;\r\n dsBeleg2AuftragFax: TBooleanField;\r\n dsBeleg2REDatum: TDateTimeField;\r\n dsBeleg2BenutzerNeu: TStringField;\r\n dsBeleg2BenutzerGeaendert: TStringField;\r\n dsBeleg2BerechnungBrutto: TBooleanField;\r\n dsBeleg2Bruttosumme01: TFloatField;\r\n dsBeleg2Bruttosumme02: TFloatField;\r\n dsBeleg2Bruttosumme03: TFloatField;\r\n dsBeleg2Notiz: TStringField;\r\n dsBeleg2MargeProzent: TFloatField;\r\n dsBeleg2Warenkreditgesperrt: TBooleanField;\r\n dsBeleg2Belegsprache: TStringField;\r\n dsBeleg2Duplicate: TStringField;\r\n dsBeleg2perEmail: TBooleanField;\r\n dsBeleg2Ansprechpartner: TStringField;\r\n dsBeleg2KundennummerFremd: TStringField;\r\n dsBeleg2Protokoll: TStringField;\r\n dsBeleg2Verleihauftrag: TBooleanField;\r\n dsBeleg2VerleihVon: TDateTimeField;\r\n dsBeleg2VerleihBis: TDateTimeField;\r\n dsBeleg2AuftragGenehmigt: TBooleanField;\r\n dsBeleg2gesperrt: TBooleanField;\r\n dsBeleg2VerleihvonText: TStringField;\r\n dsBeleg2VerleihbisText: TStringField;\r\n dsBeleg2DruckWHG: TStringField;\r\n dsBeleg2DruckWHGKurs: TFloatField;\r\n dsBeleg2ProzentsatzZusatzposition: TFloatField;\r\n dsBeleg2TextZusatzposition: TStringField;\r\n dsBeleg2TextzusatzBeschreibung: TStringField;\r\n dsBeleg2Layoutname: TStringField;\r\n dsBeleg2Gesamtgewicht: TFloatField;\r\n dsBeleg2BetragZusatzposition: TFloatField;\r\n dsBeleg2ReferenzBestellung: TStringField;\r\n dsBeleg2Termin1: TDateTimeField;\r\n dsBeleg2Termin2: TDateTimeField;\r\n dsBeleg2Zielkontaktnummer: TStringField;\r\n dsBeleg2Zielkontaktname: TStringField;\r\n dsBeleg2Bilddatei1: TStringField;\r\n dsBeleg2Bilddatei2: TStringField;\r\n dsBeleg2Zielkontaktnummer2: TStringField;\r\n dsBeleg2Zielkontaktname2: TStringField;\r\n dsBeleg2bestaetigt: TDateTimeField;\r\n dsBeleg2Zielkontaktnummer3: TStringField;\r\n dsBeleg2Zielkontaktname3: TStringField;\r\n dsBeleg2Termin3: TDateTimeField;\r\n dsBeleg2Termin4: TDateTimeField;\r\n dsBeleg2Muster: TBooleanField;\r\n dsBeleg2KW: TIntegerField;\r\n dsBeleg2Datenlink: TStringField;\r\n dsBeleg2Mehrwertsteuersatz4: TFloatField;\r\n dsBeleg2Mehrwertsteuersatz5: TFloatField;\r\n dsBeleg2Mehrwertsteuersatz6: TFloatField;\r\n dsBeleg2BesteuerungKey: TIntegerField;\r\n dsBeleg2VertreterMatchcode: TStringField;\r\n dsBeleg2Verfasser: TStringField;\r\n dsBeleg2LieferadresseID: TIntegerField;\r\n dsBeleg2AuftragStatus: TStringField;\r\n dsBeleg2MonatJahr: TDateTimeField;\r\n dsBeleg2Belegvariante: TStringField;\r\n dsBeleg2Produktionsfreigabe: TBooleanField;\r\n dsBeleg2ReferenzRahmenAuftrag: TStringField;\r\n dsBeleg2DatumRahmenAuftrag: TDateTimeField;\r\n dsBeleg2FahrzeugID: TIntegerField;\r\n dsBeleg2AuslieferungKW: TStringField;\r\n dsBeleg2BereitstellungDatum: TDateTimeField;\r\n dsBeleg2VTUID: TStringField;\r\n dsBeleg2LieferanschriftDaten: TStringField;\r\n dsBeleg2GesamtVolumen: TFloatField;\r\n dsBeleg2BelegPKey: TIntegerField;\r\n dsBeleg2DruckParameter: TStringField;\r\n dsBeleg2ReferenzService: TStringField;\r\n dsBeleg2ZusatzDaten: TStringField;\r\n dsBeleg2StandPDF: TStringField;\r\n dsBeleg2Paketdienst: TStringField;\r\n dsBeleg2Monteur: TIntegerField;\r\n dsBeleg2KundennummerKundennummer: TStringField;\r\n dsBeleg2ServiceBemerkung: TStringField;\r\n edtPosNr: TDBEdit;\r\n edtPosUNr: TDBEdit;\r\n edtArtikelueberschrift: TDBEdit;\r\n edtMenge: TDBEdit;\r\n btnArtikelnummer: TButton;\r\n edtArbeitszeitDatum: TDBDateTimePicker;\r\n edtArbeitszeitVON: TDBDateTimePicker;\r\n edtArbeitszeitBIS: TDBDateTimePicker;\r\n edtArtikelbeschreibung: TDBMemo;\r\n PosComboMonteur: TComboBox;\r\n edtMengenart: TDBLookupComboBox;\r\n btnNeuePosition: TButton;\r\n WTCPosition: TTableControl;\r\n procedure WebFormShow(Sender: TObject);\r\n procedure btnPosAbbrechenClick(Sender: TObject);\r\n procedure xdsPositionAfterOpen(DataSet: TDataSet);\r\n procedure xdsPositionAfterDelete(DataSet: TDataSet);\r\n procedure xdsPositionAfterPost(DataSet: TDataSet);\r\n procedure xdsPositionBeforePost(DataSet: TDataSet);\r\n procedure xdsPositionNewRecord(DataSet: TDataSet);\r\n procedure WebFormCreate(Sender: TObject);\r\n procedure WebFormCloseQuery(Sender: TObject; var CanClose: Boolean);\r\n procedure xdsPositionAfterApplyUpdates(Sender: TDataSet;\r\n Info: TResolveResults);\r\n procedure btnPositionLoeschenClick(Sender: TObject);\r\n procedure btnPosSpeichernClick(Sender: TObject);\r\n procedure xdsKundenpreiseAfterOpen(DataSet: TDataSet);\r\n procedure dsArtikelAfterOpen(DataSet: TDataSet);\r\n procedure dsBeleg2AfterOpen(DataSet: TDataSet);\r\n procedure sourcePositionStateChange(Sender: TObject);\r\n procedure edtArbeitszeitDatumEnter(Sender: TObject);\r\n procedure PosComboMonteurEnter(Sender: TObject);\r\n procedure btnArtikelnummerClick(Sender: TObject);\r\n procedure btnNeuePositionClick(Sender: TObject);\r\n procedure WebFormClose(Sender: TObject; var Action: TCloseAction);\r\n private\r\n { Private-Deklarationen }\r\n public\r\n { Public-Deklarationen }\r\n PositionsID:string;\r\n tmpArtikelnummer:string;\r\n tmpKundennummer:string;\r\n tmpMerkerAuftrag:string;\r\n tmpLetztePosNr:double;\r\n NeuePosition:boolean;\r\n Arbeitszeitstringlist:TStringList;\r\n Monteurstringlist:TStringList;\r\n AltePosition:boolean;\r\n protected procedure LoadDFMValues; override; end;\r\n\r\nvar\r\n AuftragPosEinzel: TAuftragPosEinzel;\r\n\r\nimplementation\r\n uses unit1, unit2, unit_EinzelAuftrag, unit_Artikelsuche;\r\n{$R *.dfm}\r\n\r\n\r\nprocedure TAuftragPosEinzel.edtArbeitszeitDatumEnter(Sender: TObject);\r\nbegin\r\n xdsPosition.Edit;\r\n if xdsPositionArbeitszeitDatum.AsDateTime'' then\r\n begin\r\n tmpArtikelnummer:=lfrm.Artikelnummer;\r\n if tmpArtikelnummer<>'' then\r\n begin\r\n dsArtikel.Close;\r\n dsArtikel.QueryString:='$filter=Artikelnummer eq '+QuotedStr(tmpArtikelnummer)+'&$expand=ArtderMenge,Hersteller';\r\n dsArtikel.Load;\r\n end\r\n else\r\n begin\r\n if NeuePosition then btnPosAbbrechenClick(nil);\r\n\r\n end;\r\n end;\r\n end;\r\n\r\n begin\r\n AltePosition:=true;\r\n LFrm:=TfrmArtikelsuche.CreateNew(@AfterCreate);\r\n LFrm.ShowModal(@AfterShowmodal);\r\n\r\nend;\r\n\r\nprocedure TAuftragPosEinzel.btnNeuePositionClick(Sender: TObject);\r\nvar\r\n LFrm:TfrmArtikelsuche;\r\n procedure AfterCreate(AForm:TObject);\r\n var\r\n LForm:TfrmArtikelsuche;\r\n begin\r\n LForm:=(AForm as TfrmArtikelsuche);\r\n end;\r\n\r\n procedure AfterShowmodal(Avalue:TModalResult);\r\n begin\r\n if LFrm.Artikelnummer<>'' then\r\n begin\r\n tmpArtikelnummer:=lfrm.Artikelnummer;\r\n if tmpArtikelnummer<>'' then\r\n begin\r\n dsArtikel.Close;\r\n dsArtikel.QueryString:='$filter=Artikelnummer eq '+QuotedStr(tmpArtikelnummer)+'&$expand=ArtderMenge,Hersteller';\r\n dsArtikel.Load;\r\n end\r\n else\r\n begin\r\n if NeuePosition then btnPosAbbrechenClick(nil);\r\n\r\n end;\r\n end;\r\n end;\r\n\r\n begin\r\n AltePosition:=false;\r\n LFrm:=TfrmArtikelsuche.CreateNew(@AfterCreate);\r\n LFrm.ShowModal(@AfterShowmodal);\r\n\r\nend;\r\n\r\nprocedure TAuftragPosEinzel.btnPosAbbrechenClick(Sender: TObject);\r\nbegin\r\n dsartikel.Close;\r\n xdsposition.close;\r\n self.Close;\r\nend;\r\n\r\nprocedure TAuftragPosEinzel.btnPositionLoeschenClick(Sender: TObject);\r\nbegin\r\n xdsposition.Delete;\r\nend;\r\n\r\nprocedure TAuftragPosEinzel.btnPosSpeichernClick(Sender: TObject);\r\nbegin\r\n if xdsPosition.State=dsbrowse then xdsposition.Edit;\r\n\r\n if xdsPosition.State in dseditmodes then\r\n begin\r\n xdsPosition.Post;\r\n end\r\n else\r\n begin\r\n xdsPosition.Close;\r\n end;\r\nend;\r\n\r\nprocedure TAuftragPosEinzel.dsArtikelAfterOpen(DataSet: TDataSet);\r\nbegin\r\n xdsKundenpreise.Close;\r\n xdskundenpreise.QueryString:='$expand=Artikelnummer&$filter=Kundennummer eq '+QuotedStr(tmpKundennummer)+ ' AND Artikelnummer eq '+QuotedStr(dsArtikelArtikelnummer.asstring);\r\n xdsKundenpreise.Load;\r\nend;\r\n\r\nprocedure TAuftragPosEinzel.dsBeleg2AfterOpen(DataSet: TDataSet);\r\nbegin\r\n if NeuePosition then btnNeuePositionClick(nil);\r\n\r\n if tmpArtikelnummer<>'' then\r\n begin\r\n dsArtikel.Close;\r\n dsArtikel.QueryString:='$filter=Artikelnummer eq '+QuotedStr(tmpArtikelnummer)+'&$expand=ArtderMenge,Hersteller';\r\n dsArtikel.Load;\r\n end;\r\nend;\r\n\r\nprocedure TAuftragPosEinzel.WebFormClose(Sender: TObject;\r\n var Action: TCloseAction);\r\nbegin\r\n action:=cafree;\r\nend;\r\n\r\nprocedure TAuftragPosEinzel.WebFormCloseQuery(Sender: TObject;\r\n var CanClose: Boolean);\r\nbegin\r\nArbeitszeitstringlist.Free;\r\nend;\r\n\r\nprocedure TAuftragPosEinzel.WebFormCreate(Sender: TObject);\r\nbegin\r\n Arbeitszeitstringlist:=TStringList.Create;\r\n Arbeitszeitstringlist.Delimiter:='|';\r\n Arbeitszeitstringlist.StrictDelimiter:=true;\r\n Monteurstringlist:=TStringList.Create;\r\n Monteurstringlist.Delimiter:='|';\r\n Monteurstringlist.StrictDelimiter:=true;\r\nend;\r\n\r\nprocedure TAuftragPosEinzel.WebFormShow(Sender: TObject);\r\n var\r\n myelement:TJSHTMLElement;\r\nbegin\r\n Container1.html.text:='';\r\n myelement:=container1.ElementHandle;\r\n container2.ParentElement:=myelement;\r\n myelement:=container2.ElementHandle;\r\n btnPosAbbrechen.ParentElement:=myelement;\r\n btnPosSpeichern.ParentElement:=myelement;\r\n btnPositionLoeschen.ParentElement:=myelement;\r\n WTCPosition.ParentElement:=myelement;\r\n WTCPosition.ColCount:=2;\r\n WTCPosition.RowCount:=13;\r\n WTCPosition.Cells[0,0]:='Beleg';\r\n\r\n WTCPosition.Cells[0,1]:='Pos-Nr';\r\n myelement:=WTCPosition.CellElements[1,1];\r\n edtPosNr.ParentElement:=myelement;\r\n\r\n WTCPosition.Cells[0,2]:='Pos.UNr';\r\n myelement:=WTCPosition.CellElements[1,2];\r\n edtPosUNr.ParentElement:=myelement;\r\n\r\n myelement:=WTCPosition.CellElements[0,3];\r\n btnArtikelnummer.ParentElement:=myelement;\r\n\r\n WTCPosition.Cells[0,4]:='Artikelüberschrift';\r\n myelement:=WTCPosition.CellElements[1,4];\r\n edtArtikelueberschrift.ParentElement:=myelement;\r\n\r\n WTCPosition.Cells[0,5]:='Artikelbeschreibung';\r\n\r\n WTCPosition.Cells[0,6]:='Menge';\r\n myelement:=WTCPosition.CellElements[1,6];\r\n edtMenge.ParentElement:=myelement;\r\n\r\n WTCPosition.Cells[0,7]:='Mengenart';\r\n WTCPosition.Cells[0,8]:='Arbeitszeit Datum';\r\n WTCPosition.Cells[0,9]:='AZ Beginn';\r\n WTCPosition.Cells[0,10]:='AZ Ende';\r\n WTCPosition.Cells[0,11]:='Monteur';\r\n\r\n dsBeleg2.Close;\r\n dsBeleg2.QueryString:='$expand=Kundennummer&$filter=Nummerkomplett eq '+QuotedStr(tmpMerkerAuftrag);\r\n dsBeleg2.Load;\r\n\r\nend;\r\n\r\nprocedure TAuftragPosEinzel.xdsKundenpreiseAfterOpen(DataSet: TDataSet);\r\nbegin\r\n xdsPosition.Close;\r\n if PositionsID<>'' then xdsPosition.QueryString:='$filter=ID eq '+QuotedStr(PositionsID);\r\n if PositionsID='' then xdsPosition.QueryString:='';\r\n xdsPosition.Load;\r\nend;\r\n\r\nprocedure TAuftragPosEinzel.xdsPositionAfterApplyUpdates(Sender: TDataSet;\r\n Info: TResolveResults);\r\nbegin\r\n xdsposition.Close;\r\n self.Close;\r\nend;\r\n\r\nprocedure TAuftragPosEinzel.xdsPositionAfterDelete(DataSet: TDataSet);\r\nbegin\r\n if LizenzOK then\r\n begin\r\n xdsposition.ApplyUpdates;\r\n end\r\n else\r\n begin\r\n showmessage('Für das Speichern von Daten sind Sie noch nicht freigeschaltet, bitte erwerben Sie eine Lizenz');\r\n end;\r\nend;\r\n\r\nprocedure TAuftragPosEinzel.xdsPositionAfterOpen(DataSet: TDataSet);\r\n var\r\n myelement:TJSHTMLElement;\r\nbegin\r\n\r\n myelement:=WTCPosition.CellElements[1,5];\r\n edtArtikelbeschreibung.ParentElement:=myelement;\r\n\r\n myelement:=WTCPosition.CellElements[1,7];\r\n edtMengenart.ParentElement:=myelement;\r\n\r\n myelement:=WTCPosition.CellElements[1,8];\r\n edtArbeitszeitDatum.ParentElement:=myelement;\r\n\r\n myelement:=WTCPosition.CellElements[1,9];\r\n edtArbeitszeitVON.ParentElement:=myelement;\r\n\r\n myelement:=WTCPosition.CellElements[1,10];\r\n edtArbeitszeitBIS.ParentElement:=myelement;\r\n\r\n myelement:=WTCPosition.CellElements[1,11];\r\n PosComboMonteur.ParentElement:=myelement;\r\n PosComboMonteur.Items.clear;\r\n\r\n dm2.queryMonteur.First;\r\n while not dm2.queryMonteur.eof do\r\n begin\r\n PosComboMonteur.Items.Add(dm2.queryMonteurPersonalnummer.asstring+'| '+dm2.queryMonteurNachname.asstring+', '+dm2.queryMonteurVorname.asstring);\r\n dm2.queryMonteur.Next;\r\n end;\r\n PosComboMonteur.Items.Add('');\r\n\r\n WTCPosition.Cells[1,0]:=dsBeleg2Nummerkomplett.asstring+' | '+xdsPositionID.asstring;\r\n\r\n WTCPosition.Cells[1,3]:=tmpArtikelnummer;\r\n WTCPosition.Cells[1,7]:=xdsPositionArtderMenge.AsString;\r\n if xdsPositionMonteurP.AsString<>'' then\r\n begin\r\n dm2.queryMonteur.Locate('Personalnummer',xdsPositionMonteurP.AsString,[]);\r\n Poscombomonteur.Text:=dm2.queryMonteurPersonalnummer.asstring+'| '+dm2.queryMonteurNachname.asstring+', '+dm2.queryMonteurVorname.asstring;\r\n end\r\n else\r\n begin\r\n PosComboMonteur.Text:='';\r\n end;\r\n if neueposition=true then xdsposition.append;\r\n if AltePosition=true then\r\n begin\r\n xdsPosition.Edit;\r\n xdsPositionArtikelnummer.value:=dsArtikel.CurrentData;\r\n xdsPositionMenge.AsInteger:=1;\r\n xdsPositionArtderMenge.asstring:=dsArtikelArtderMengeArtderMenge.AsString;\r\n xdsPositionVerkaufspreis.AsFloat:=dsArtikelVerkaufspreis.asfloat;\r\n if dsBeleg2rabattsatz.asfloat=0 then xdsPositionRabattsatz.asfloat:=dsArtikelstandardRabattsatzVK.asfloat;\r\n if dsBeleg2rabattstufe.asstring='Rabattpreis1' then xdsPositionverkaufspreis.asstring:=dsArtikelRabattpreis1.asstring;\r\n if dsBeleg2rabattstufe.asstring='Rabattpreis2' then xdsPositionverkaufspreis.asstring:=dsArtikelRabattpreis2.asstring;\r\n if dsBeleg2rabattstufe.asstring='Rabattpreis3' then xdsPositionverkaufspreis.asstring:=dsArtikelRabattpreis3.asstring;\r\n if dsBeleg2rabattstufe.asstring='Rabattpreis4' then xdsPositionverkaufspreis.asstring:=dsArtikelRabattpreis4.asstring;\r\n if dsBeleg2rabattstufe.asstring='Rabattpreis5' then xdsPositionverkaufspreis.asstring:=dsArtikelRabattpreis5.asstring;\r\n xdsPositionPreisvorRabatt.asfloat:=xdsPositionVerkaufspreis.AsFloat;\r\n xdsPositionPreisanteilNetto.asfloat:=dsArtikelpreisanteilnetto.asfloat;\r\n xdsPositionEinkaufspreis.asfloat:=dsArtikelEinkaufspreis.asfloat;\r\n xdsPositionRabattsatz.AsFloat:=dsBeleg2Rabattsatz.asfloat;\r\n if xdsKundenpreise.RecordCount>0 then\r\n begin\r\n xdsPositionPreisvorrabatt.asfloat:=xdsKundenpreiseVerkaufspreis.asfloat;\r\n if xdsKundenpreiseRabattsatz.AsFloat<>0 then xdsPositionRabattsatz.AsFloat:=xdsKundenpreiseRabattsatz.AsFloat;\r\n end;\r\n xdsPositionPKZ.asfloat:=0;\r\n if dsBeleg2verleihauftrag.AsBoolean=true then xdsPositionpkz.asfloat:=2;\r\n xdsPositionposmwst.asfloat:=0;\r\n xdsPositionMWStKey.asinteger:=1;\r\n xdsPositionEndpreis.asfloat:=0;\r\n xdsPositionEndpreis_EK.asfloat:=0;\r\n xdsPositionBruttoEndpreis.asfloat:=0;\r\n xdsPositionEinzelpreisBrutto.asfloat:=0;\r\n xdsPositionbereitsGeliefert.asfloat:=0;\r\n xdsPositionBestellungErledigt.asboolean:=false;\r\n xdsPositionausliefern.asfloat:=0;\r\n xdsPositionbestellen.asboolean:=false;\r\n xdsPositionlager.asstring:='[-]';\r\n xdsPositionwarenbestand.asboolean:=dsArtikelWarenbestand.asboolean;\r\n xdsPositionPosMargeProzent.asfloat:=0;\r\n xdsPositionPosMarge.asfloat:=0;\r\n xdsPositionPreisanteilnetto.asfloat:=0;\r\n xdsPositionprovisionssatz.asfloat:=0;\r\n xdsPositionprovisionsbetrag.asfloat:=0;\r\n xdsPositionaussenflaeche.asfloat:=0;\r\n xdsPositionBruttogewicht.asfloat:=0;\r\n xdsPositionTara.asfloat:=0;\r\n xdsPositionPlanerFarbe.asinteger:=0;\r\n xdsPositionSeitenumbruch.asboolean:=FALSE;\r\n xdsPositionZSnachPos.asboolean:=False;\r\n xdsPositionPreisanteilnetto.asfloat:=0;\r\n xdsPositionPreisVorRabattWHG.asfloat:=0;\r\n xdsPositionpkey.asinteger:=0;\r\n xdsPositionVolumen.AsFloat:=0;\r\n xdsPositionPosVolumen.AsFloat:=0;\r\n xdsPositionArtikelueberschrift.asstring:=dsArtikelArtikelueberschrift.asstring;\r\n xdsPositionArtikelbeschreibung.asstring:=dsArtikelArtikelbeschreibung.asstring;\r\n xdsPositionArtikelbeschreibungRTF.value:=dsArtikelArtikelbeschreibungRTF.value;\r\n xdsPositionArtikelsprache.value:='';\r\n xdsPositiongewicht.asstring:=dsArtikelGewicht.AsString;\r\n xdsPositionLaenge.asstring:=dsArtikelLaenge.AsString;\r\n xdsPositionBreite.asstring:=dsArtikelBreite.AsString;\r\n xdsPositionHoehe.asstring:=dsArtikelHoehe.AsString;\r\n xdsPositionMWStKey.asInteger:=dsArtikelMWStKey.asInteger;\r\n xdsPositionWarenbestand.asboolean:=dsArtikelWarenbestand.asboolean;\r\n xdsPositionLieferant.asstring:=dsArtikellieferantnummer.asstring;\r\n xdsPositionEinkaufspreis.AsString:=dsArtikeleinkaufspreis.asstring;\r\n xdsPositionEKvom.asstring:=dsArtikeleinkaufspreisvom.asstring;\r\n xdsPositionLager.asstring:=dsArtikelLagerort.asstring;\r\n xdsPositionVolumen.AsFloat:=dsArtikelVolumen.AsFloat;\r\n xdsPositionArtikelAttribute.AsString:=dsArtikelArtikelAttribute.AsString;\r\n xdsPositionTextfrei10.asstring:=dsArtikeltextfrei10.asstring;\r\n xdsPositionTextfrei20.asstring:=dsArtikeltextfrei20.asstring;\r\n\r\n // Preis nach PKZ holen\r\n if xdsPositionpkz.asfloat=2 then xdsPositionpreisvorrabatt.asfloat:=dsArtikelverleihpreis.asfloat;\r\n if xdsPositionpkz.asfloat=3 then xdsPositionpreisvorrabatt.asfloat:=dsArtikelZusatzpreis.asfloat;\r\n if xdsPositionpkz.asfloat=4 then xdsPositionpreisvorrabatt.asfloat:=dsArtikelverleihpreis.asfloat + dsArtikelZusatzpreis.asfloat;\r\n\r\n end;\r\n\r\n if dsartikel.active then\r\n begin\r\n if dsartikelarbeitszeit.asboolean=true then\r\n begin\r\n edtArbeitszeitDatum.visible:=true;\r\n edtArbeitszeitVON.visible:=true;\r\n edtArbeitszeitBIS.visible:=true;\r\n end\r\n else\r\n begin\r\n edtArbeitszeitDatum.visible:=false;\r\n edtArbeitszeitVON.visible:=false;\r\n edtArbeitszeitBIS.visible:=false;\r\n end;\r\n end;\r\n\r\nend;\r\n\r\nprocedure TAuftragPosEinzel.xdsPositionAfterPost(DataSet: TDataSet);\r\nbegin\r\n if LizenzOK then\r\n begin\r\n xdsPosition.ApplyUpdates;\r\n end\r\n else\r\n begin\r\n showmessage('Für das Speichern von Daten sind Sie noch nicht freigeschaltet, bitte erwerben Sie eine Lizenz');\r\n end;\r\nend;\r\n\r\nprocedure TAuftragPosEinzel.xdsPositionBeforePost(DataSet: TDataSet);\r\nbegin\r\n if dsArtikelArbeitszeit.AsBoolean=true then\r\n begin\r\n arbeitszeitstringlist.DelimitedText:=xdsPositionArtikelueberschrift.AsString;\r\n arbeitszeitstringlist[0]:=leftstr(arbeitszeitstringlist[0],21);\r\n xdspositionArtikelueberschrift.AsString:=arbeitszeitstringlist[0]+' | '+Formatdatetime('DD.MM.YYYY',xdsPositionArbeitszeitDatum.AsDateTime)+' | ' +formatdatetime('hh:mm',xdsPositionArbeitszeitVON.AsDateTime)+' - '+formatdatetime('hh:mm',xdspositionArbeitszeitBIS.AsDateTime);\r\n xdsPositionArbeitszeitVON.AsDateTime:=trunc(xdsPositionArbeitszeitDatum.AsDateTime)+frac(xdsPositionArbeitszeitVon.AsDateTime);\r\n xdsPositionArbeitszeitBIS.AsDateTime:=trunc(xdsPositionArbeitszeitDatum.AsDateTime)+frac(xdsPositionArbeitszeitBIS.AsDateTime);\r\n xdsPositionMenge.AsFloat:=dm2.roundkfm(MinutesBetween(xdspositionArbeitszeitVON.AsDateTime,xdspositionArbeitszeitBIS.asdatetime)/60,-2);\r\n end;\r\n\r\n\r\n if PosComboMonteur.Text='' then\r\n begin\r\n xdsPositionMonteurP.AsString:='';\r\n end\r\n else\r\n begin\r\n Monteurstringlist.DelimitedText:=PosComboMonteur.Text;\r\n xdsPositionMonteurP.AsString:=Monteurstringlist[0];\r\n end;\r\n\r\n xdsPositionBelegdatum.AsDateTime:=dsBeleg2Datum.AsDateTime;\r\n if xdsPositionMWStKey.asinteger=1 then xdsPositionMehrwertsteuersatz.AsFloat:=dsBeleg2Mehrwertsteuersatz1.asfloat;\r\n if xdsPositionMWStKey.asinteger=2 then xdsPositionMehrwertsteuersatz.AsFloat:=dsBeleg2Mehrwertsteuersatz2.asfloat;\r\n if xdsPositionMWStKey.asinteger=3 then xdsPositionMehrwertsteuersatz.AsFloat:=dsBeleg2Mehrwertsteuersatz3.asfloat;\r\n if xdsPositionMWStKey.asinteger=4 then xdsPositionMehrwertsteuersatz.AsFloat:=dsBeleg2Mehrwertsteuersatz4.asfloat;\r\n if xdsPositionMWStKey.asinteger=5 then xdsPositionMehrwertsteuersatz.AsFloat:=dsBeleg2Mehrwertsteuersatz5.asfloat;\r\n if xdsPositionMWStKey.asinteger=6 then xdsPositionMehrwertsteuersatz.AsFloat:=dsBeleg2Mehrwertsteuersatz6.asfloat;\r\n if dsBeleg2Umsatzsteuerausweis.asboolean=false then xdsPositionMehrwertsteuersatz.AsFloat:=0;\r\n\r\n // Artikelnummer für den Warenbestand setzen\r\n if xdsPositionquellartikel.asstring='' then\r\n begin\r\n xdsPositionartikelnummerwb.asstring:=xdsPositionartikelnummer.asstring;\r\n end\r\n else\r\n begin\r\n xdsPositionartikelnummerwb.asstring:=xdsPositionquellartikel.asstring;\r\n end;\r\n if xdsPositionpreisvorrabatt.asstring='' then xdsPositionpreisvorrabatt.asfloat:=0;\r\n if xdsPositionpkz.asfloat=3 then xdsPositionrabattsatz.asfloat:=0;\r\n if xdsPositioneinkaufspreis.asstring='' then xdsPositioneinkaufspreis.asstring:='0';\r\n\r\n // Prüfung auf Textpositionen\r\n if leftstr(xdsPositionArtikelnummer.asstring,4)='Text' then xdsPositionpreisvorrabatt.asfloat:=0;\r\n\r\n {\r\n // Pruefung wegen Staffelpreis\r\n if dm2.tablesysdatStaffelpreise.asboolean then\r\n begin\r\n tempstp:=GF.checkstaffelpreis(EinzelAuftrag.dsBelegKundennummer.asstring,xdsPositionArtikelnummer.asstring,EinzelAuftrag.dsBelegDatum.asdatetime,xdsPositionMenge.asfloat,xdsPositionPreisVorRabatt.asfloat);\r\n if tempstp<>0 then\r\n begin\r\n messagetext:=MSGStaffelpreisuebernehmen+' '+formatfloat(fstr,tempstp);\r\n if MessageDlg(MSGStaffelpreisuebernehmen, mtConfirmation, [mbYes, mbNo], 0) = mrYes then\r\n begin\r\n xdsPositionpreisvorrabatt.asfloat:=tempstp;\r\n xdsPositionEinkaufspreis.asfloat:=tempeinkaufspreis;\r\n end;\r\n end;\r\n end;\r\n }\r\n // Pruefung wegen Rabattfaehig\r\n if xdsPositionrabattsatz.AsFloat<>0 then\r\n begin\r\n if (dm2.checkrabattierung(xdsPositionArtikelnummer.asstring)=false) then xdsPositionrabattsatz.asfloat:=0;\r\n end;\r\n\r\n // check der SET-Positionen\r\n if (xdsPositionSetHPos.AsString<>'') AND (xdsPositionSetHPos.AsString<>'00000000-0000-0000-0000-000000000000') then xdsPositioneinkaufspreis.asfloat:=0;\r\n if (xdsPositionSetUPos.AsString<>'') AND (xdsPositionSetUPos.AsString<>'00000000-0000-0000-0000-000000000000') then\r\n begin\r\n xdsPositionPreisVorRabatt.asfloat:=0;\r\n xdsPositioneinzelpreisbrutto.asfloat:=0;\r\n end;\r\n\r\n {\r\n // wenn währungserfassung\r\n if (EinzelAuftrag.dsBelegDruckWHG.AsString<>'') AND (dm2.tablesysdatMultipleWHG.AsBoolean=TRUE) then\r\n begin\r\n if EinzelAuftrag.dsBelegDruckWHG.AsString<>dm2.tablesysdatBWHG.asstring then\r\n begin\r\n xdsPositionPreisvorRabatt.AsFloat:=xdsPositionPreisVorRabattWHG.AsFloat/EinzelAuftrag.dsBelegDruckWHGKurs.AsFloat;\r\n end;\r\n end;\r\n }\r\n\r\n\r\n xdsPositionVerkaufspreis.asfloat:=xdsPositionPreisvorRabatt.asfloat-((xdsPositionPreisvorRabatt.asfloat-xdsPositionpreisanteilnetto.asfloat)*xdsPositionRabattsatz.AsFloat/100);\r\n xdsPositioneinzelpreisbrutto.asfloat:=xdsPositionverkaufspreis.asfloat+(xdsPositionVerkaufspreis.asfloat*xdsPositionmehrwertsteuersatz.asfloat/100);\r\n\r\n\r\n if dm2.tablesysdatrundungIT.asboolean=true then xdsPositionVerkaufspreis.asfloat:=dm2.roundkfm(xdsPositionVerkaufspreis.asfloat,-2);\r\n\r\n tempvgpdivisor:=DM2.holevkpdivisor(xdsPositionArtderMenge.asstring);\r\n xdsPositionEndpreis.asfloat:=xdsPositionMenge.AsFloat*xdsPositionVerkaufspreis.AsFloat/tempvgpdivisor;\r\n xdsPositionEndpreis_EK.asfloat:=dm2.roundkfm(xdsPositionMenge.AsFloat*xdsPositionEinkaufspreis.AsFloat/tempvgpdivisor,frund);\r\n\r\n xdsPositionPosMWST.asfloat:=xdsPositionEndpreis.asfloat*xdsPositionMehrwertsteuersatz.asfloat/100;\r\n xdsPositionBruttoEndpreis.asfloat:=xdsPositionposMWST.asfloat+xdsPositionEndpreis.asfloat;\r\n xdsPositionProvisionsbetrag.asfloat:=dm2.roundkfm((xdsPositionEndpreis.asfloat*xdsPositionProvisionssatz.asfloat/100),-2);\r\n\r\n xdsPositionPosMarge.asfloat:=xdsPositionEndpreis.asfloat-xdsPositionEndpreis_EK.AsFloat;\r\n if xdsPositionEndpreis_EK.AsFloat<>0 then\r\n begin\r\n xdsPositionPosMargeProzent.asfloat:=xdsPositionPosMarge.asfloat/xdsPositionEndpreis_EK.asfloat*100;\r\n end\r\n else\r\n begin\r\n xdsPositionPosMargeProzent.AsFloat:=0;\r\n end;\r\n\r\n {\r\n // Pruefung auf die Artikelverfügbarkeit\r\n if xdsPositionBereitsGeliefert.AsFloat<>xdsPositionMenge.asfloat then\r\n begin\r\n if xdsPositionWarenbestand.asboolean=false then xdsPositionbestellen.AsBoolean:=false;\r\n if xdsPositionWarenbestand.asboolean=true then\r\n begin\r\n dm2.queryeinzelartikelbestand.close;\r\n dm2.queryEinzelartikelbestand.SQL.Clear;\r\n dm2.queryeinzelartikelbestand.SQL.append('select Bestand+Mindestbestand AS Bestand from Artikel where Artikelnummer = '''+xdsPositionartikelnummerwb.asstring+'''');\r\n dm2.queryEinzelartikelbestand.open;\r\n if dm2.queryEinzelartikelbestandBestand.asfloat>=xdsPositionMenge.asfloat then\r\n begin\r\n xdsPositionbestellen.asboolean:=false;\r\n end\r\n else\r\n begin\r\n xdsPositionbestellen.asboolean:=true;\r\n end;\r\n dm2.queryEinzelartikelbestand.close;\r\n end;\r\n end;\r\n }\r\n\r\n //RTF-Austausch Beginn\r\n //xdsPositionArtikelbeschreibung.value:=Auftrag.richartikel.Text;\r\n xdsPositionArtikelbeschreibungRTF.asstring:=xdsPositionArtikelbeschreibung.AsString;\r\n //RTF-Austausch fertig\r\n if xdsPositionArtikelbeschreibung.asstring='' then xdsPositionArtikelbeschreibung.asstring:=' ';\r\n xdsPositionPosVolumen.AsFloat:=xdsPositionVolumen.AsFloat*xdsPositionMenge.AsFloat;\r\n\r\nend;\r\n\r\nprocedure TAuftragPosEinzel.xdsPositionNewRecord(DataSet: TDataSet);\r\nvar\r\n guid:TGUID;\r\n guidstring:string;\r\nbegin\r\n createguid(guid);\r\n guidstring:=guidtostring(guid);\r\n guidstring:=ReplaceStr(guidstring,'{','');\r\n guidstring:=ReplaceStr(guidstring,'}','');\r\n xdsPositionlwbID.Asstring:=guidstring;\r\n xdsPositionNummerkomplett.value:=dsBeleg2.CurrentData;\r\n xdsPositionArtikelnummer.value:=dsArtikel.CurrentData;\r\n xdsPositionBelegdatum.AsDateTime:=dsBeleg2Datum.AsDateTime;\r\n xdsPositionposnr.AsFloat:=tmpLetztePosNr+1;\r\n xdsPositionPosUNr.AsFloat:=0;\r\n xdsPositionSumme.asboolean:=false;\r\n xdsPositionMenge.AsInteger:=1;\r\n xdsPositionArtderMenge.asstring:=dsArtikelArtderMengeArtderMenge.AsString;\r\n xdsPositionMehrwertsteuersatz.AsFloat:=dsBeleg2mehrwertsteuersatz1.AsFloat;\r\n xdsPositionVerkaufspreis.AsFloat:=dsArtikelVerkaufspreis.asfloat;\r\n if dsBeleg2rabattsatz.asfloat=0 then xdsPositionRabattsatz.asfloat:=dsArtikelstandardRabattsatzVK.asfloat;\r\n if dsBeleg2rabattstufe.asstring='Rabattpreis1' then xdsPositionverkaufspreis.asstring:=dsArtikelRabattpreis1.asstring;\r\n if dsBeleg2rabattstufe.asstring='Rabattpreis2' then xdsPositionverkaufspreis.asstring:=dsArtikelRabattpreis2.asstring;\r\n if dsBeleg2rabattstufe.asstring='Rabattpreis3' then xdsPositionverkaufspreis.asstring:=dsArtikelRabattpreis3.asstring;\r\n if dsBeleg2rabattstufe.asstring='Rabattpreis4' then xdsPositionverkaufspreis.asstring:=dsArtikelRabattpreis4.asstring;\r\n if dsBeleg2rabattstufe.asstring='Rabattpreis5' then xdsPositionverkaufspreis.asstring:=dsArtikelRabattpreis5.asstring;\r\n xdsPositionPreisvorRabatt.asfloat:=xdsPositionVerkaufspreis.AsFloat;\r\n xdsPositionPreisanteilNetto.asfloat:=dsArtikelpreisanteilnetto.asfloat;\r\n xdsPositionEinkaufspreis.asfloat:=dsArtikelEinkaufspreis.asfloat;\r\n xdsPositionRabattsatz.AsFloat:=dsBeleg2Rabattsatz.asfloat;\r\n if xdsKundenpreise.RecordCount>0 then\r\n begin\r\n xdsPositionPreisvorrabatt.asfloat:=xdsKundenpreiseVerkaufspreis.asfloat;\r\n if xdsKundenpreiseRabattsatz.AsFloat<>0 then xdsPositionRabattsatz.AsFloat:=xdsKundenpreiseRabattsatz.AsFloat;\r\n\r\n end;\r\n xdsPositionPKZ.asfloat:=0;\r\n if dsBeleg2verleihauftrag.AsBoolean=true then xdsPositionpkz.asfloat:=2;\r\n xdsPositionposmwst.asfloat:=0;\r\n xdsPositionMWStKey.asinteger:=1;\r\n xdsPositionEndpreis.asfloat:=0;\r\n xdsPositionEndpreis_EK.asfloat:=0;\r\n xdsPositionBruttoEndpreis.asfloat:=0;\r\n xdsPositionEinzelpreisBrutto.asfloat:=0;\r\n xdsPositionbereitsGeliefert.asfloat:=0;\r\n xdsPositionBestellungErledigt.asboolean:=false;\r\n xdsPositionausliefern.asfloat:=0;\r\n xdsPositionbestellen.asboolean:=false;\r\n xdsPositionlager.asstring:='[-]';\r\n xdsPositionwarenbestand.asboolean:=dsArtikelWarenbestand.asboolean;\r\n xdsPositionPosMargeProzent.asfloat:=0;\r\n xdsPositionPosMarge.asfloat:=0;\r\n xdsPositionPreisanteilnetto.asfloat:=0;\r\n xdsPositionprovisionssatz.asfloat:=0;\r\n xdsPositionprovisionsbetrag.asfloat:=0;\r\n xdsPositionaussenflaeche.asfloat:=0;\r\n xdsPositionBruttogewicht.asfloat:=0;\r\n xdsPositionTara.asfloat:=0;\r\n xdsPositionPlanerFarbe.asinteger:=0;\r\n xdsPositionSeitenumbruch.asboolean:=FALSE;\r\n xdsPositionZSnachPos.asboolean:=False;\r\n xdsPositionPreisanteilnetto.asfloat:=0;\r\n xdsPositionPreisVorRabattWHG.asfloat:=0;\r\n xdsPositionpkey.asinteger:=0;\r\n xdsPositionVolumen.AsFloat:=0;\r\n xdsPositionPosVolumen.AsFloat:=0;\r\n xdsPositionArtikelueberschrift.asstring:=dsArtikelArtikelueberschrift.asstring;\r\n xdsPositionArtikelbeschreibung.asstring:=dsArtikelArtikelbeschreibung.asstring;\r\n xdsPositionArtikelbeschreibungRTF.value:=dsArtikelArtikelbeschreibungRTF.value;\r\n xdsPositionArtikelsprache.value:='';\r\n {\r\n if xdsPositionPKZ.asfloat=3 then\r\n begin\r\n xdsPositionArtikelbeschreibung.asstring:=dm2.tablesysdatZusatzpreisText.asstring+' '+dsArtikelArtikelbeschreibung.asstring;\r\n xdsPositionArtikelbeschreibungRTF.value:=dm2.tablesysdatZusatzpreisText.asstring+' '+dsArtikelArtikelbeschreibungRTF.value;\r\n end;\r\n\r\n if xdsPositionPKZ.asfloat=4 then\r\n begin\r\n xdsPositionArtikelbeschreibung.asstring:=dsArtikelArtikelbeschreibung.asstring+#13+#10+dm2.tablesysdatZusatzpreisText.asstring;\r\n xdsPositionArtikelbeschreibungRTF.value:=dsArtikelArtikelbeschreibungRTF.value+#13+#10+dm2.tablesysdatZusatzpreisText.asstring;\r\n end;\r\n }\r\n\r\n xdsPositiongewicht.asstring:=dsArtikelGewicht.AsString;\r\n xdsPositionLaenge.asstring:=dsArtikelLaenge.AsString;\r\n xdsPositionBreite.asstring:=dsArtikelBreite.AsString;\r\n xdsPositionHoehe.asstring:=dsArtikelHoehe.AsString;\r\n xdsPositionMWStKey.asInteger:=dsArtikelMWStKey.asInteger;\r\n xdsPositionWarenbestand.asboolean:=dsArtikelWarenbestand.asboolean;\r\n xdsPositionLieferant.asstring:=dsArtikellieferantnummer.asstring;\r\n xdsPositionEinkaufspreis.AsString:=dsArtikeleinkaufspreis.asstring;\r\n xdsPositionEKvom.asstring:=dsArtikeleinkaufspreisvom.asstring;\r\n xdsPositionLager.asstring:=dsArtikelLagerort.asstring;\r\n xdsPositionVolumen.AsFloat:=dsArtikelVolumen.AsFloat;\r\n xdsPositionArtikelAttribute.AsString:=dsArtikelArtikelAttribute.AsString;\r\n {\r\n xdsPositionProvisionssatz.Asfloat:=GF.GetProvisionssatz(dsBelegVertreterMatchcode.AsString,dsBelegKundennummer.AsString,xdsPositionartikelnummer.AsString);\r\n\r\n\r\n xdsPositionquellartikel.asstring:=dsArtikelquellartikel.asstring;\r\n xdsPositionEinkaufspreis.Asfloat:=GF.ekpreisquellartikel(xdsPositionquellartikel.asstring,xdsPositionEinkaufspreis.Asfloat);\r\n }\r\n xdsPositionTextfrei10.asstring:=dsArtikeltextfrei10.asstring;\r\n xdsPositionTextfrei20.asstring:=dsArtikeltextfrei20.asstring;\r\n\r\n // Preis nach PKZ holen\r\n if xdsPositionpkz.asfloat=2 then xdsPositionpreisvorrabatt.asfloat:=dsArtikelverleihpreis.asfloat;\r\n if xdsPositionpkz.asfloat=3 then xdsPositionpreisvorrabatt.asfloat:=dsArtikelZusatzpreis.asfloat;\r\n if xdsPositionpkz.asfloat=4 then xdsPositionpreisvorrabatt.asfloat:=dsArtikelverleihpreis.asfloat + dsArtikelZusatzpreis.asfloat;\r\n\r\n {\r\n\r\n //Zusatz\r\n if xdsPositionPKZ.asfloat=3 then\r\n begin\r\n if dm2.queryKundenpreisZusatzpreis.AsFloat<>0 then\r\n begin\r\n xdsPositionPreisvorRabatt.AsFloat:=dm2.queryKundenpreisZusatzpreis.AsFloat;\r\n xdsPositionRabattsatz.asfloat:=0;\r\n xdsPositionVerkaufspreis.asfloat:=xdsPositionPreisvorRabatt.asfloat;\r\n end;\r\n end;\r\n\r\n //Verleih+Zusatzpreis kundenbezogen\r\n if xdsPositionPKZ.asfloat=4 then\r\n begin\r\n if dm2.queryKundenpreisVerleihpreis.AsFloat<>0 then\r\n begin\r\n xdsPositionPreisvorRabatt.AsFloat:=dm2.queryKundenpreisVerleihpreis.AsFloat+dm2.querykundenpreiszusatzpreis.asfloat;\r\n xdsPositionRabattsatz.asfloat:=0;\r\n xdsPositionVerkaufspreis.asfloat:=xdsPositionPreisvorRabatt.asfloat;\r\n end;\r\n end;\r\n\r\n dm2.queryKundenpreis.close;\r\n\r\n\r\n\r\n\r\n //Preiszuschlag für Artikel Beginn\r\n if gf.checkpreiszuschlag(AN) then\r\n begin\r\n Application.CreateForm(TArtikelAuswahlPreiszuschlag, ArtikelAuswahlPreiszuschlag);\r\n ArtikelAuswahlPreiszuschlag.zuschlagartikelnummer:=AN;\r\n ArtikelAuswahlPreiszuschlag.showmodal;\r\n if artikelauswahlpreiszuschlag.resultzuschlagpreisgruppe<>'' then\r\n begin\r\n xdsPositiontextfrei10.asstring:=artikelauswahlpreiszuschlag.resultzuschlagtextfrei10;\r\n xdsPositiontextfrei20.asstring:=artikelauswahlpreiszuschlag.resultzuschlagtextfrei20;\r\n if artikelauswahlpreiszuschlag.resultzuschlagvk>0 then\r\n begin\r\n xdsPositionpreisvorrabatt.asfloat:=xdsPositionpreisvorrabatt.asfloat+artikelauswahlpreiszuschlag.resultzuschlagvk;\r\n end\r\n else\r\n begin\r\n if artikelauswahlpreiszuschlag.resultzuschlagvkprozent<>0 then\r\n begin\r\n xdsPositionpreisvorrabatt.asfloat:=xdsPositionpreisvorrabatt.asfloat+(xdsPositionpreisvorrabatt.asfloat*artikelauswahlpreiszuschlag.resultzuschlagvkprozent/100);\r\n end;\r\n end;\r\n end;\r\n ArtikelauswahlPreiszuschlag.free;\r\n end;\r\n // Preiszuschlag für Artikel ENDE\r\n\r\n // Sonderpreis holen\r\n xdsPositionpreisvorrabatt.AsFloat:=gf.artikelsonderpreisholenVK(AN,dsBelegDatum.AsDateTime,xdsPositionPreisvorRabatt.asfloat);\r\n // Fremdwährungspreis holen\r\n if dm2.tablesysdatMultipleWHG.asboolean then\r\n begin\r\n if dsBelegDruckWHG.AsString<>dm2.tablesysdatBWHG.asstring then\r\n begin\r\n xdsPositionpreisvorrabattwhg.asfloat:=gf.artikelpreisWHGholenVK(AN, dsBelegdruckwhg.asstring,dsBelegdruckwhgkurs.asfloat,xdsPositionpreisvorrabatt.asfloat);\r\n end;\r\n end;\r\n // Artikeltranslation gemäß Belegsprache\r\n if (dsBelegbelegsprache.asstring<>'German') AND (dsBelegbelegsprache.asstring<>'') then\r\n begin\r\n dm2.tablesprachen.locate('Belegsprache',dsBelegbelegsprache.asstring,[LOCASEINSENSITIVE]);\r\n dm2.adoquery1.close;\r\n dm2.adoquery1.sql.clear;\r\n dm2.adoquery1.sql.append('select Artikelsprache from ArtikelTranslation WHERE Artikelnummer='''+AN+''' AND ISO6392Code='''+dm2.tablespracheniso6392Code.asstring+'''');\r\n dm2.adoquery1.open;\r\n if dm2.adoquery1.fieldbyname('Artikelsprache').asstring<>'' then xdsPositionArtikelsprache.value:=dm2.adoquery1.fieldbyname('Artikelsprache').value;\r\n dm2.adoquery1.close;\r\n end;\r\n }\r\n\r\n\r\n\r\n\r\n\r\nend;\r\n\r\nprocedure TAuftragPosEinzel.LoadDFMValues;\r\nbegin\r\n inherited LoadDFMValues;\r\n\r\n Container1 := THTMLContainer.Create(Self);\r\n Container2 := THTMLContainer.Create(Self);\r\n btnPosAbbrechen := TButton.Create(Self);\r\n btnPosSpeichern := TButton.Create(Self);\r\n btnPositionLoeschen := TButton.Create(Self);\r\n edtPosNr := TDBEdit.Create(Self);\r\n edtPosUNr := TDBEdit.Create(Self);\r\n edtArtikelueberschrift := TDBEdit.Create(Self);\r\n edtMenge := TDBEdit.Create(Self);\r\n btnArtikelnummer := TButton.Create(Self);\r\n edtArbeitszeitDatum := TDBDateTimePicker.Create(Self);\r\n edtArbeitszeitVON := TDBDateTimePicker.Create(Self);\r\n edtArbeitszeitBIS := TDBDateTimePicker.Create(Self);\r\n edtArtikelbeschreibung := TDBMemo.Create(Self);\r\n PosComboMonteur := TComboBox.Create(Self);\r\n edtMengenart := TDBLookupComboBox.Create(Self);\r\n btnNeuePosition := TButton.Create(Self);\r\n WTCPosition := TTableControl.Create(Self);\r\n xdsPosition := TXDataWebDataSet.Create(Self);\r\n xdsPositionID := TIntegerField.Create(Self);\r\n xdsPositionPosNr := TFloatField.Create(Self);\r\n xdsPositionPosUNr := TFloatField.Create(Self);\r\n xdsPositionArtikelueberschrift := TStringField.Create(Self);\r\n xdsPositionArtikelbeschreibung := TStringField.Create(Self);\r\n xdsPositionMenge := TFloatField.Create(Self);\r\n xdsPositionArtderMenge := TStringField.Create(Self);\r\n xdsPositionVerkaufspreis := TFloatField.Create(Self);\r\n xdsPositionEinkaufspreis := TFloatField.Create(Self);\r\n xdsPositionArtikelnummer := TXDataWebEntityField.Create(Self);\r\n xdsPositionMonteurP := TIntegerField.Create(Self);\r\n xdsPositionArbeitszeitDatum := TDateTimeField.Create(Self);\r\n xdsPositionArbeitszeitVON := TDateTimeField.Create(Self);\r\n xdsPositionArbeitszeitBIS := TDateTimeField.Create(Self);\r\n xdsPositionSumme := TBooleanField.Create(Self);\r\n xdsPositionSeriennummer := TStringField.Create(Self);\r\n xdsPositionWarengruppe := TStringField.Create(Self);\r\n xdsPositionWarenuntergruppe := TStringField.Create(Self);\r\n xdsPositionArtikelnummerKunde := TStringField.Create(Self);\r\n xdsPositionLieferant := TStringField.Create(Self);\r\n xdsPositionGewicht := TFloatField.Create(Self);\r\n xdsPositionLaenge := TFloatField.Create(Self);\r\n xdsPositionBreite := TFloatField.Create(Self);\r\n xdsPositionHoehe := TFloatField.Create(Self);\r\n xdsPositionMehrwertsteuersatz := TFloatField.Create(Self);\r\n xdsPositionEndpreis := TFloatField.Create(Self);\r\n xdsPositionPosMWST := TFloatField.Create(Self);\r\n xdsPositionBruttoEndpreis := TFloatField.Create(Self);\r\n xdsPositionEndpreis_EK := TFloatField.Create(Self);\r\n xdsPositionRabattsatz := TFloatField.Create(Self);\r\n xdsPositionPreisvorRabatt := TFloatField.Create(Self);\r\n xdsPositionPKZ := TFloatField.Create(Self);\r\n xdsPositionTextfrei10 := TStringField.Create(Self);\r\n xdsPositionTextfrei20 := TStringField.Create(Self);\r\n xdsPositionProduktionAbgeschlossen := TDateTimeField.Create(Self);\r\n xdsPositionEinzelpreisBrutto := TFloatField.Create(Self);\r\n xdsPositionPosMarge := TFloatField.Create(Self);\r\n xdsPositionPosMargeProzent := TFloatField.Create(Self);\r\n xdsPositionBereitsGeliefert := TFloatField.Create(Self);\r\n xdsPositionausliefern := TFloatField.Create(Self);\r\n xdsPositionBestellungErledigt := TBooleanField.Create(Self);\r\n xdsPositionLager := TStringField.Create(Self);\r\n xdsPositionbestellen := TBooleanField.Create(Self);\r\n xdsPositionWarenbestand := TBooleanField.Create(Self);\r\n xdsPositionArtikelbeschreibungRTF := TStringField.Create(Self);\r\n xdsPositionQuellartikel := TStringField.Create(Self);\r\n xdsPositionArtikelnummerWB := TStringField.Create(Self);\r\n xdsPositionPreisanteilNetto := TFloatField.Create(Self);\r\n xdsPositionSetHPos := TStringField.Create(Self);\r\n xdsPositionSetUPos := TStringField.Create(Self);\r\n xdsPositionProvisionssatz := TFloatField.Create(Self);\r\n xdsPositionProvisionsbetrag := TFloatField.Create(Self);\r\n xdsPositionArtikelsprache := TStringField.Create(Self);\r\n xdsPositionEKvom := TDateTimeField.Create(Self);\r\n xdsPositionMengenberechnungID := TStringField.Create(Self);\r\n xdsPositionTaraID := TStringField.Create(Self);\r\n xdsPositionTara := TFloatField.Create(Self);\r\n xdsPositionBruttoGewicht := TFloatField.Create(Self);\r\n xdsPositionAussenflaeche := TFloatField.Create(Self);\r\n xdsPositionLadeort := TStringField.Create(Self);\r\n xdsPositionSeitenumbruch := TBooleanField.Create(Self);\r\n xdsPositionPlanerFarbe := TIntegerField.Create(Self);\r\n xdsPositionMWStKey := TIntegerField.Create(Self);\r\n xdsPositionZSnachPos := TBooleanField.Create(Self);\r\n xdsPositionLieferzeit := TStringField.Create(Self);\r\n xdsPositionPreisVorRabattWHG := TFloatField.Create(Self);\r\n xdsPositionReferenzKalkulation := TStringField.Create(Self);\r\n xdsPositionPKey := TIntegerField.Create(Self);\r\n xdsPositionAuftragsnummer := TStringField.Create(Self);\r\n xdsPositionlwbID := TStringField.Create(Self);\r\n xdsPositionBelegdatum := TDateTimeField.Create(Self);\r\n xdsPositionWarenkontrollnummern := TStringField.Create(Self);\r\n xdsPositionVolumen := TFloatField.Create(Self);\r\n xdsPositionPosVolumen := TFloatField.Create(Self);\r\n xdsPositionArtikelAttribute := TStringField.Create(Self);\r\n xdsPositionNummerkomplett := TXDataWebEntityField.Create(Self);\r\n sourcePosition := TDataSource.Create(Self);\r\n dsArtikel := TXDataWebDataSet.Create(Self);\r\n dsArtikelHersteller := TXDataWebEntityField.Create(Self);\r\n dsArtikelArtderMenge := TXDataWebEntityField.Create(Self);\r\n dsArtikelPfandArt := TXDataWebEntityField.Create(Self);\r\n dsArtikelWarengruppe := TXDataWebEntityField.Create(Self);\r\n dsArtikelWarenuntergruppe := TXDataWebEntityField.Create(Self);\r\n dsArtikelArtikelnummer := TStringField.Create(Self);\r\n dsArtikelArtikelueberschrift := TStringField.Create(Self);\r\n dsArtikelArtikelbeschreibung := TStringField.Create(Self);\r\n dsArtikelVerkaufspreis := TFloatField.Create(Self);\r\n dsArtikelMindestbestand := TFloatField.Create(Self);\r\n dsArtikelPreisliste := TStringField.Create(Self);\r\n dsArtikelGewicht := TFloatField.Create(Self);\r\n dsArtikelLaenge := TFloatField.Create(Self);\r\n dsArtikelBreite := TFloatField.Create(Self);\r\n dsArtikelHoehe := TFloatField.Create(Self);\r\n dsArtikelArtikelZusatz := TStringField.Create(Self);\r\n dsArtikelLagerort := TStringField.Create(Self);\r\n dsArtikelBuchungskonto := TIntegerField.Create(Self);\r\n dsArtikelEingangMenge := TFloatField.Create(Self);\r\n dsArtikelEingangEndpreis := TFloatField.Create(Self);\r\n dsArtikelAusgangMenge := TFloatField.Create(Self);\r\n dsArtikelAusgangEndpreisEK := TFloatField.Create(Self);\r\n dsArtikelAusgangEndpreisVK := TFloatField.Create(Self);\r\n dsArtikelBestand := TFloatField.Create(Self);\r\n dsArtikelBestandswert := TFloatField.Create(Self);\r\n dsArtikelMarge := TFloatField.Create(Self);\r\n dsArtikelMargeProzent := TFloatField.Create(Self);\r\n dsArtikelArtikelnummer2 := TStringField.Create(Self);\r\n dsArtikelArtikelmatchcode := TStringField.Create(Self);\r\n dsArtikelRabattpreis1 := TFloatField.Create(Self);\r\n dsArtikelRabattpreis2 := TFloatField.Create(Self);\r\n dsArtikelRabattpreis3 := TFloatField.Create(Self);\r\n dsArtikelRabattpreis4 := TFloatField.Create(Self);\r\n dsArtikelRabattpreis5 := TFloatField.Create(Self);\r\n dsArtikelArtikelnichtmehrgueltig := TBooleanField.Create(Self);\r\n dsArtikelEinkaufspreis := TFloatField.Create(Self);\r\n dsArtikelAufschlag := TFloatField.Create(Self);\r\n dsArtikelWarenbestand := TBooleanField.Create(Self);\r\n dsArtikelTextfrei10 := TStringField.Create(Self);\r\n dsArtikelTextfrei20 := TStringField.Create(Self);\r\n dsArtikelArtikelbeschreibungRTF := TStringField.Create(Self);\r\n dsArtikelArtikeldatei1 := TStringField.Create(Self);\r\n dsArtikelArtikeldatei2 := TStringField.Create(Self);\r\n dsArtikelArtikeldatei3 := TStringField.Create(Self);\r\n dsArtikelArtikeldatei4 := TStringField.Create(Self);\r\n dsArtikelArtikeldatei5 := TStringField.Create(Self);\r\n dsArtikelEinkaufspreisVom := TDateTimeField.Create(Self);\r\n dsArtikelEAN := TStringField.Create(Self);\r\n dsArtikelVGPFaktor := TFloatField.Create(Self);\r\n dsArtikelVGPMengenart := TStringField.Create(Self);\r\n dsArtikelVerleihpreis := TFloatField.Create(Self);\r\n dsArtikelZusatzPreis := TFloatField.Create(Self);\r\n dsArtikelVerpackungsart := TStringField.Create(Self);\r\n dsArtikelVerpackungsMenge := TFloatField.Create(Self);\r\n dsArtikelQuellartikel := TStringField.Create(Self);\r\n dsArtikelrabattierfaehig := TBooleanField.Create(Self);\r\n dsArtikelAngebotAlternativeAN := TStringField.Create(Self);\r\n dsArtikelPreisanteilNetto := TFloatField.Create(Self);\r\n dsArtikelFarbe := TIntegerField.Create(Self);\r\n dsArtikelAEinkauf := TBooleanField.Create(Self);\r\n dsArtikelAVerkauf := TBooleanField.Create(Self);\r\n dsArtikelArtikelnummerLieferant := TStringField.Create(Self);\r\n dsArtikelLieferantnummer := TStringField.Create(Self);\r\n dsArtikelVerkaufspreisBrutto := TFloatField.Create(Self);\r\n dsArtikelArtikelSet := TBooleanField.Create(Self);\r\n dsArtikelProvisionssatz := TFloatField.Create(Self);\r\n dsArtikelWarentarifnummer := TStringField.Create(Self);\r\n dsArtikelHandelsartikel := TBooleanField.Create(Self);\r\n dsArtikelUrsprungsland := TStringField.Create(Self);\r\n dsArtikelKategorie := TStringField.Create(Self);\r\n dsArtikelStandardRabattsatzEK := TFloatField.Create(Self);\r\n dsArtikelStandardRabattsatzVK := TFloatField.Create(Self);\r\n dsArtikelRabattpreiseManuell := TBooleanField.Create(Self);\r\n dsArtikelMengeBestellt := TFloatField.Create(Self);\r\n dsArtikelMengeBeauftragt := TFloatField.Create(Self);\r\n dsArtikelBestandDisponiert := TFloatField.Create(Self);\r\n dsArtikelMengeAngeboten := TFloatField.Create(Self);\r\n dsArtikelBestandDispInclAngebot := TFloatField.Create(Self);\r\n dsArtikelMWStKey := TIntegerField.Create(Self);\r\n dsArtikelShopAmazon := TBooleanField.Create(Self);\r\n dsArtikelShopQuelle := TBooleanField.Create(Self);\r\n dsArtikelGeraet := TBooleanField.Create(Self);\r\n dsArtikelArtgewicht := TFloatField.Create(Self);\r\n dsArtikelVolumen := TFloatField.Create(Self);\r\n dsArtikelPacklisteNichtAnzeigen := TBooleanField.Create(Self);\r\n dsArtikelKeineAufschlagskalkulation := TBooleanField.Create(Self);\r\n dsArtikelKorrekturMenge := TFloatField.Create(Self);\r\n dsArtikelKorrekturWert := TFloatField.Create(Self);\r\n dsArtikelNachfolgeartikel := TStringField.Create(Self);\r\n dsArtikelMindestbestellmenge := TFloatField.Create(Self);\r\n dsArtikelSchnittEK := TFloatField.Create(Self);\r\n dsArtikelVerkaufspreisVom := TDateTimeField.Create(Self);\r\n dsArtikelPruefungChargeSNR := TIntegerField.Create(Self);\r\n dsArtikelArtikelbeschreibungHTML := TStringField.Create(Self);\r\n dsArtikelProduktKurzbeschreibungHTML := TStringField.Create(Self);\r\n dsArtikelStatusFuerShop := TStringField.Create(Self);\r\n dsArtikelAmpelFuerShop := TStringField.Create(Self);\r\n dsArtikelEXP_Anzahl := TFloatField.Create(Self);\r\n dsArtikelEXP_Inhalt := TFloatField.Create(Self);\r\n dsArtikelEXP_Faktor := TFloatField.Create(Self);\r\n dsArtikelFach := TStringField.Create(Self);\r\n dsArtikelExportKasse := TIntegerField.Create(Self);\r\n dsArtikelWKNR := TIntegerField.Create(Self);\r\n dsArtikelArtikelAttribute := TStringField.Create(Self);\r\n dsArtikelErstelltAm := TDateTimeField.Create(Self);\r\n dsArtikelVarianteVonAN := TStringField.Create(Self);\r\n dsArtikelGurtmassWerte := TStringField.Create(Self);\r\n dsArtikelGurtmass := TFloatField.Create(Self);\r\n dsArtikelAltersgrenze := TIntegerField.Create(Self);\r\n dsArtikelMWStKeyImHaus := TIntegerField.Create(Self);\r\n dsArtikelKasseBewegung := TFloatField.Create(Self);\r\n dsArtikelKasseBewegungEK := TFloatField.Create(Self);\r\n dsArtikelKasseBewegungVK := TFloatField.Create(Self);\r\n dsArtikelProduktionBewegung := TFloatField.Create(Self);\r\n dsArtikelProduktionBewegungEK := TFloatField.Create(Self);\r\n dsArtikelProduktionBewegungVK := TFloatField.Create(Self);\r\n dsArtikelWaWiAB := TIntegerField.Create(Self);\r\n dsArtikelGeaendertAm := TDateTimeField.Create(Self);\r\n dsArtikelGefahrgutKennzeichen := TStringField.Create(Self);\r\n dsArtikelVerpackG := TBooleanField.Create(Self);\r\n dsArtikelUPE := TFloatField.Create(Self);\r\n dsArtikelArtikelbeschreibungEinkauf := TStringField.Create(Self);\r\n dsArtikelHerstellerArtikelnummer := TStringField.Create(Self);\r\n dsArtikelNatura := TStringField.Create(Self);\r\n dsArtikelArbeitszeit := TBooleanField.Create(Self);\r\n dsArtikelArtderMengeArtderMenge := TStringField.Create(Self);\r\n xdsKundenpreise := TXDataWebDataSet.Create(Self);\r\n xdsKundenpreiseArtikelnummer := TXDataWebEntityField.Create(Self);\r\n xdsKundenpreiseKundennummer := TXDataWebEntityField.Create(Self);\r\n xdsKundenpreiseVerkaufspreis := TFloatField.Create(Self);\r\n xdsKundenpreiseNachname := TStringField.Create(Self);\r\n xdsKundenpreiseRabattsatz := TFloatField.Create(Self);\r\n xdsKundenpreiseVerleihpreis := TFloatField.Create(Self);\r\n xdsKundenpreiseZusatzPreis := TFloatField.Create(Self);\r\n xdsKundenpreiseArtikelnummerKunde := TStringField.Create(Self);\r\n xdsKundenpreiseDatumGeaendert := TDateTimeField.Create(Self);\r\n xdsKundenpreiseArtikelueberschrift := TStringField.Create(Self);\r\n xdsKundenpreiseArtikelnummerArtikelnummer := TStringField.Create(Self);\r\n xdsKundenpreiseArtikelnummerArtikelueberschrift := TStringField.Create(Self);\r\n xdsKundenpreiseArtikelnummerArtikelbeschreibung := TStringField.Create(Self);\r\n dsBeleg2 := TXDataWebDataSet.Create(Self);\r\n dsBeleg2Kundennummer := TXDataWebEntityField.Create(Self);\r\n dsBeleg2Nummerkomplett := TStringField.Create(Self);\r\n dsBeleg2ReferenzAngebot := TStringField.Create(Self);\r\n dsBeleg2ReferenzLieferschein := TStringField.Create(Self);\r\n dsBeleg2ReferenzRechnung := TStringField.Create(Self);\r\n dsBeleg2Datum := TDateTimeField.Create(Self);\r\n dsBeleg2Jahr := TFloatField.Create(Self);\r\n dsBeleg2Kalenderwoche := TIntegerField.Create(Self);\r\n dsBeleg2Nachname := TStringField.Create(Self);\r\n dsBeleg2Vorname := TStringField.Create(Self);\r\n dsBeleg2Postleitzahl := TStringField.Create(Self);\r\n dsBeleg2Ort := TStringField.Create(Self);\r\n dsBeleg2Laenderkuerzel := TStringField.Create(Self);\r\n dsBeleg2Land := TStringField.Create(Self);\r\n dsBeleg2Briefanrede1 := TStringField.Create(Self);\r\n dsBeleg2Briefanrede2 := TStringField.Create(Self);\r\n dsBeleg2EMail := TStringField.Create(Self);\r\n dsBeleg2AdresseBild := TStringField.Create(Self);\r\n dsBeleg2LieferanschriftBild := TStringField.Create(Self);\r\n dsBeleg2Zahlungsbedingung := TIntegerField.Create(Self);\r\n dsBeleg2ZahlungsbedingungText := TStringField.Create(Self);\r\n dsBeleg2Auftragsbezeichnung := TStringField.Create(Self);\r\n dsBeleg2AuftragnummerKunde := TStringField.Create(Self);\r\n dsBeleg2BestelldatumKunde := TDateTimeField.Create(Self);\r\n dsBeleg2ILN := TStringField.Create(Self);\r\n dsBeleg2Kopftext := TStringField.Create(Self);\r\n dsBeleg2Schlussbemerkung := TStringField.Create(Self);\r\n dsBeleg2Gruss := TStringField.Create(Self);\r\n dsBeleg2Mehrwertsteuersatz1 := TFloatField.Create(Self);\r\n dsBeleg2Mehrwertsteuersatz2 := TFloatField.Create(Self);\r\n dsBeleg2Nettosumme01 := TFloatField.Create(Self);\r\n dsBeleg2Nettosumme02 := TFloatField.Create(Self);\r\n dsBeleg2Nettosumme := TFloatField.Create(Self);\r\n dsBeleg2Mehrwertsteuer01 := TFloatField.Create(Self);\r\n dsBeleg2Mehrwertsteuer02 := TFloatField.Create(Self);\r\n dsBeleg2Mehrwertsteuer := TFloatField.Create(Self);\r\n dsBeleg2Bruttosumme := TFloatField.Create(Self);\r\n dsBeleg2Versanddatum := TDateTimeField.Create(Self);\r\n dsBeleg2Skontosatz := TFloatField.Create(Self);\r\n dsBeleg2NettosummeEK := TFloatField.Create(Self);\r\n dsBeleg2NettoMarge := TFloatField.Create(Self);\r\n dsBeleg2Schreibzeichen := TStringField.Create(Self);\r\n dsBeleg2Unterzeichner := TStringField.Create(Self);\r\n dsBeleg2TelefonMA := TStringField.Create(Self);\r\n dsBeleg2EmailMA := TStringField.Create(Self);\r\n dsBeleg2USTID := TStringField.Create(Self);\r\n dsBeleg2Umsatzsteuerausweis := TBooleanField.Create(Self);\r\n dsBeleg2gebucht := TBooleanField.Create(Self);\r\n dsBeleg2Lieferdatum := TDateTimeField.Create(Self);\r\n dsBeleg2Transportbedingung := TStringField.Create(Self);\r\n dsBeleg2Mehrwertsteuersatz3 := TFloatField.Create(Self);\r\n dsBeleg2Mehrwertsteuer03 := TFloatField.Create(Self);\r\n dsBeleg2Nettosumme03 := TFloatField.Create(Self);\r\n dsBeleg2RundungsDifferenz := TFloatField.Create(Self);\r\n dsBeleg2EmailText := TStringField.Create(Self);\r\n dsBeleg2Auftragerledigt := TBooleanField.Create(Self);\r\n dsBeleg2Rabattstufe := TStringField.Create(Self);\r\n dsBeleg2KFZKennzeichen := TStringField.Create(Self);\r\n dsBeleg2Fahrgestellnummer := TStringField.Create(Self);\r\n dsBeleg2KFZHersteller := TStringField.Create(Self);\r\n dsBeleg2Erstzulassungsdatum := TDateTimeField.Create(Self);\r\n dsBeleg2KMStand := TStringField.Create(Self);\r\n dsBeleg2KFZType := TStringField.Create(Self);\r\n dsBeleg2Inspektionsdatum := TDateTimeField.Create(Self);\r\n dsBeleg2Debitorennummer := TStringField.Create(Self);\r\n dsBeleg2Kostentraeger := TStringField.Create(Self);\r\n dsBeleg2Rabattsatz := TFloatField.Create(Self);\r\n dsBeleg2ObjektReferenz := TStringField.Create(Self);\r\n dsBeleg2Bank := TStringField.Create(Self);\r\n dsBeleg2Bankleitzahl := TFloatField.Create(Self);\r\n dsBeleg2Kontonummer := TStringField.Create(Self);\r\n dsBeleg2Kontoinhaber := TStringField.Create(Self);\r\n dsBeleg2Telefaxnummer := TStringField.Create(Self);\r\n dsBeleg2DatumNeu := TDateTimeField.Create(Self);\r\n dsBeleg2Datumgeaendert := TDateTimeField.Create(Self);\r\n dsBeleg2Objektnummer := TStringField.Create(Self);\r\n dsBeleg2Liefertermin := TStringField.Create(Self);\r\n dsBeleg2Emailversand := TBooleanField.Create(Self);\r\n dsBeleg2Telefonnummer := TStringField.Create(Self);\r\n dsBeleg2MobilTelefon := TStringField.Create(Self);\r\n dsBeleg2AuftragFax := TBooleanField.Create(Self);\r\n dsBeleg2REDatum := TDateTimeField.Create(Self);\r\n dsBeleg2BenutzerNeu := TStringField.Create(Self);\r\n dsBeleg2BenutzerGeaendert := TStringField.Create(Self);\r\n dsBeleg2BerechnungBrutto := TBooleanField.Create(Self);\r\n dsBeleg2Bruttosumme01 := TFloatField.Create(Self);\r\n dsBeleg2Bruttosumme02 := TFloatField.Create(Self);\r\n dsBeleg2Bruttosumme03 := TFloatField.Create(Self);\r\n dsBeleg2Notiz := TStringField.Create(Self);\r\n dsBeleg2MargeProzent := TFloatField.Create(Self);\r\n dsBeleg2Warenkreditgesperrt := TBooleanField.Create(Self);\r\n dsBeleg2Belegsprache := TStringField.Create(Self);\r\n dsBeleg2Duplicate := TStringField.Create(Self);\r\n dsBeleg2perEmail := TBooleanField.Create(Self);\r\n dsBeleg2Ansprechpartner := TStringField.Create(Self);\r\n dsBeleg2KundennummerFremd := TStringField.Create(Self);\r\n dsBeleg2Protokoll := TStringField.Create(Self);\r\n dsBeleg2Verleihauftrag := TBooleanField.Create(Self);\r\n dsBeleg2VerleihVon := TDateTimeField.Create(Self);\r\n dsBeleg2VerleihBis := TDateTimeField.Create(Self);\r\n dsBeleg2AuftragGenehmigt := TBooleanField.Create(Self);\r\n dsBeleg2gesperrt := TBooleanField.Create(Self);\r\n dsBeleg2VerleihvonText := TStringField.Create(Self);\r\n dsBeleg2VerleihbisText := TStringField.Create(Self);\r\n dsBeleg2DruckWHG := TStringField.Create(Self);\r\n dsBeleg2DruckWHGKurs := TFloatField.Create(Self);\r\n dsBeleg2ProzentsatzZusatzposition := TFloatField.Create(Self);\r\n dsBeleg2TextZusatzposition := TStringField.Create(Self);\r\n dsBeleg2TextzusatzBeschreibung := TStringField.Create(Self);\r\n dsBeleg2Layoutname := TStringField.Create(Self);\r\n dsBeleg2Gesamtgewicht := TFloatField.Create(Self);\r\n dsBeleg2BetragZusatzposition := TFloatField.Create(Self);\r\n dsBeleg2ReferenzBestellung := TStringField.Create(Self);\r\n dsBeleg2Termin1 := TDateTimeField.Create(Self);\r\n dsBeleg2Termin2 := TDateTimeField.Create(Self);\r\n dsBeleg2Zielkontaktnummer := TStringField.Create(Self);\r\n dsBeleg2Zielkontaktname := TStringField.Create(Self);\r\n dsBeleg2Bilddatei1 := TStringField.Create(Self);\r\n dsBeleg2Bilddatei2 := TStringField.Create(Self);\r\n dsBeleg2Zielkontaktnummer2 := TStringField.Create(Self);\r\n dsBeleg2Zielkontaktname2 := TStringField.Create(Self);\r\n dsBeleg2bestaetigt := TDateTimeField.Create(Self);\r\n dsBeleg2Zielkontaktnummer3 := TStringField.Create(Self);\r\n dsBeleg2Zielkontaktname3 := TStringField.Create(Self);\r\n dsBeleg2Termin3 := TDateTimeField.Create(Self);\r\n dsBeleg2Termin4 := TDateTimeField.Create(Self);\r\n dsBeleg2Muster := TBooleanField.Create(Self);\r\n dsBeleg2KW := TIntegerField.Create(Self);\r\n dsBeleg2Datenlink := TStringField.Create(Self);\r\n dsBeleg2Mehrwertsteuersatz4 := TFloatField.Create(Self);\r\n dsBeleg2Mehrwertsteuersatz5 := TFloatField.Create(Self);\r\n dsBeleg2Mehrwertsteuersatz6 := TFloatField.Create(Self);\r\n dsBeleg2BesteuerungKey := TIntegerField.Create(Self);\r\n dsBeleg2VertreterMatchcode := TStringField.Create(Self);\r\n dsBeleg2Verfasser := TStringField.Create(Self);\r\n dsBeleg2LieferadresseID := TIntegerField.Create(Self);\r\n dsBeleg2AuftragStatus := TStringField.Create(Self);\r\n dsBeleg2MonatJahr := TDateTimeField.Create(Self);\r\n dsBeleg2Belegvariante := TStringField.Create(Self);\r\n dsBeleg2Produktionsfreigabe := TBooleanField.Create(Self);\r\n dsBeleg2ReferenzRahmenAuftrag := TStringField.Create(Self);\r\n dsBeleg2DatumRahmenAuftrag := TDateTimeField.Create(Self);\r\n dsBeleg2FahrzeugID := TIntegerField.Create(Self);\r\n dsBeleg2AuslieferungKW := TStringField.Create(Self);\r\n dsBeleg2BereitstellungDatum := TDateTimeField.Create(Self);\r\n dsBeleg2VTUID := TStringField.Create(Self);\r\n dsBeleg2LieferanschriftDaten := TStringField.Create(Self);\r\n dsBeleg2GesamtVolumen := TFloatField.Create(Self);\r\n dsBeleg2BelegPKey := TIntegerField.Create(Self);\r\n dsBeleg2DruckParameter := TStringField.Create(Self);\r\n dsBeleg2ReferenzService := TStringField.Create(Self);\r\n dsBeleg2ZusatzDaten := TStringField.Create(Self);\r\n dsBeleg2StandPDF := TStringField.Create(Self);\r\n dsBeleg2Paketdienst := TStringField.Create(Self);\r\n dsBeleg2Monteur := TIntegerField.Create(Self);\r\n dsBeleg2KundennummerKundennummer := TStringField.Create(Self);\r\n dsBeleg2ServiceBemerkung := TStringField.Create(Self);\r\n\r\n Container1.BeforeLoadDFMValues;\r\n Container2.BeforeLoadDFMValues;\r\n btnPosAbbrechen.BeforeLoadDFMValues;\r\n btnPosSpeichern.BeforeLoadDFMValues;\r\n btnPositionLoeschen.BeforeLoadDFMValues;\r\n edtPosNr.BeforeLoadDFMValues;\r\n edtPosUNr.BeforeLoadDFMValues;\r\n edtArtikelueberschrift.BeforeLoadDFMValues;\r\n edtMenge.BeforeLoadDFMValues;\r\n btnArtikelnummer.BeforeLoadDFMValues;\r\n edtArbeitszeitDatum.BeforeLoadDFMValues;\r\n edtArbeitszeitVON.BeforeLoadDFMValues;\r\n edtArbeitszeitBIS.BeforeLoadDFMValues;\r\n edtArtikelbeschreibung.BeforeLoadDFMValues;\r\n PosComboMonteur.BeforeLoadDFMValues;\r\n edtMengenart.BeforeLoadDFMValues;\r\n btnNeuePosition.BeforeLoadDFMValues;\r\n WTCPosition.BeforeLoadDFMValues;\r\n xdsPosition.BeforeLoadDFMValues;\r\n xdsPositionID.BeforeLoadDFMValues;\r\n xdsPositionPosNr.BeforeLoadDFMValues;\r\n xdsPositionPosUNr.BeforeLoadDFMValues;\r\n xdsPositionArtikelueberschrift.BeforeLoadDFMValues;\r\n xdsPositionArtikelbeschreibung.BeforeLoadDFMValues;\r\n xdsPositionMenge.BeforeLoadDFMValues;\r\n xdsPositionArtderMenge.BeforeLoadDFMValues;\r\n xdsPositionVerkaufspreis.BeforeLoadDFMValues;\r\n xdsPositionEinkaufspreis.BeforeLoadDFMValues;\r\n xdsPositionArtikelnummer.BeforeLoadDFMValues;\r\n xdsPositionMonteurP.BeforeLoadDFMValues;\r\n xdsPositionArbeitszeitDatum.BeforeLoadDFMValues;\r\n xdsPositionArbeitszeitVON.BeforeLoadDFMValues;\r\n xdsPositionArbeitszeitBIS.BeforeLoadDFMValues;\r\n xdsPositionSumme.BeforeLoadDFMValues;\r\n xdsPositionSeriennummer.BeforeLoadDFMValues;\r\n xdsPositionWarengruppe.BeforeLoadDFMValues;\r\n xdsPositionWarenuntergruppe.BeforeLoadDFMValues;\r\n xdsPositionArtikelnummerKunde.BeforeLoadDFMValues;\r\n xdsPositionLieferant.BeforeLoadDFMValues;\r\n xdsPositionGewicht.BeforeLoadDFMValues;\r\n xdsPositionLaenge.BeforeLoadDFMValues;\r\n xdsPositionBreite.BeforeLoadDFMValues;\r\n xdsPositionHoehe.BeforeLoadDFMValues;\r\n xdsPositionMehrwertsteuersatz.BeforeLoadDFMValues;\r\n xdsPositionEndpreis.BeforeLoadDFMValues;\r\n xdsPositionPosMWST.BeforeLoadDFMValues;\r\n xdsPositionBruttoEndpreis.BeforeLoadDFMValues;\r\n xdsPositionEndpreis_EK.BeforeLoadDFMValues;\r\n xdsPositionRabattsatz.BeforeLoadDFMValues;\r\n xdsPositionPreisvorRabatt.BeforeLoadDFMValues;\r\n xdsPositionPKZ.BeforeLoadDFMValues;\r\n xdsPositionTextfrei10.BeforeLoadDFMValues;\r\n xdsPositionTextfrei20.BeforeLoadDFMValues;\r\n xdsPositionProduktionAbgeschlossen.BeforeLoadDFMValues;\r\n xdsPositionEinzelpreisBrutto.BeforeLoadDFMValues;\r\n xdsPositionPosMarge.BeforeLoadDFMValues;\r\n xdsPositionPosMargeProzent.BeforeLoadDFMValues;\r\n xdsPositionBereitsGeliefert.BeforeLoadDFMValues;\r\n xdsPositionausliefern.BeforeLoadDFMValues;\r\n xdsPositionBestellungErledigt.BeforeLoadDFMValues;\r\n xdsPositionLager.BeforeLoadDFMValues;\r\n xdsPositionbestellen.BeforeLoadDFMValues;\r\n xdsPositionWarenbestand.BeforeLoadDFMValues;\r\n xdsPositionArtikelbeschreibungRTF.BeforeLoadDFMValues;\r\n xdsPositionQuellartikel.BeforeLoadDFMValues;\r\n xdsPositionArtikelnummerWB.BeforeLoadDFMValues;\r\n xdsPositionPreisanteilNetto.BeforeLoadDFMValues;\r\n xdsPositionSetHPos.BeforeLoadDFMValues;\r\n xdsPositionSetUPos.BeforeLoadDFMValues;\r\n xdsPositionProvisionssatz.BeforeLoadDFMValues;\r\n xdsPositionProvisionsbetrag.BeforeLoadDFMValues;\r\n xdsPositionArtikelsprache.BeforeLoadDFMValues;\r\n xdsPositionEKvom.BeforeLoadDFMValues;\r\n xdsPositionMengenberechnungID.BeforeLoadDFMValues;\r\n xdsPositionTaraID.BeforeLoadDFMValues;\r\n xdsPositionTara.BeforeLoadDFMValues;\r\n xdsPositionBruttoGewicht.BeforeLoadDFMValues;\r\n xdsPositionAussenflaeche.BeforeLoadDFMValues;\r\n xdsPositionLadeort.BeforeLoadDFMValues;\r\n xdsPositionSeitenumbruch.BeforeLoadDFMValues;\r\n xdsPositionPlanerFarbe.BeforeLoadDFMValues;\r\n xdsPositionMWStKey.BeforeLoadDFMValues;\r\n xdsPositionZSnachPos.BeforeLoadDFMValues;\r\n xdsPositionLieferzeit.BeforeLoadDFMValues;\r\n xdsPositionPreisVorRabattWHG.BeforeLoadDFMValues;\r\n xdsPositionReferenzKalkulation.BeforeLoadDFMValues;\r\n xdsPositionPKey.BeforeLoadDFMValues;\r\n xdsPositionAuftragsnummer.BeforeLoadDFMValues;\r\n xdsPositionlwbID.BeforeLoadDFMValues;\r\n xdsPositionBelegdatum.BeforeLoadDFMValues;\r\n xdsPositionWarenkontrollnummern.BeforeLoadDFMValues;\r\n xdsPositionVolumen.BeforeLoadDFMValues;\r\n xdsPositionPosVolumen.BeforeLoadDFMValues;\r\n xdsPositionArtikelAttribute.BeforeLoadDFMValues;\r\n xdsPositionNummerkomplett.BeforeLoadDFMValues;\r\n sourcePosition.BeforeLoadDFMValues;\r\n dsArtikel.BeforeLoadDFMValues;\r\n dsArtikelHersteller.BeforeLoadDFMValues;\r\n dsArtikelArtderMenge.BeforeLoadDFMValues;\r\n dsArtikelPfandArt.BeforeLoadDFMValues;\r\n dsArtikelWarengruppe.BeforeLoadDFMValues;\r\n dsArtikelWarenuntergruppe.BeforeLoadDFMValues;\r\n dsArtikelArtikelnummer.BeforeLoadDFMValues;\r\n dsArtikelArtikelueberschrift.BeforeLoadDFMValues;\r\n dsArtikelArtikelbeschreibung.BeforeLoadDFMValues;\r\n dsArtikelVerkaufspreis.BeforeLoadDFMValues;\r\n dsArtikelMindestbestand.BeforeLoadDFMValues;\r\n dsArtikelPreisliste.BeforeLoadDFMValues;\r\n dsArtikelGewicht.BeforeLoadDFMValues;\r\n dsArtikelLaenge.BeforeLoadDFMValues;\r\n dsArtikelBreite.BeforeLoadDFMValues;\r\n dsArtikelHoehe.BeforeLoadDFMValues;\r\n dsArtikelArtikelZusatz.BeforeLoadDFMValues;\r\n dsArtikelLagerort.BeforeLoadDFMValues;\r\n dsArtikelBuchungskonto.BeforeLoadDFMValues;\r\n dsArtikelEingangMenge.BeforeLoadDFMValues;\r\n dsArtikelEingangEndpreis.BeforeLoadDFMValues;\r\n dsArtikelAusgangMenge.BeforeLoadDFMValues;\r\n dsArtikelAusgangEndpreisEK.BeforeLoadDFMValues;\r\n dsArtikelAusgangEndpreisVK.BeforeLoadDFMValues;\r\n dsArtikelBestand.BeforeLoadDFMValues;\r\n dsArtikelBestandswert.BeforeLoadDFMValues;\r\n dsArtikelMarge.BeforeLoadDFMValues;\r\n dsArtikelMargeProzent.BeforeLoadDFMValues;\r\n dsArtikelArtikelnummer2.BeforeLoadDFMValues;\r\n dsArtikelArtikelmatchcode.BeforeLoadDFMValues;\r\n dsArtikelRabattpreis1.BeforeLoadDFMValues;\r\n dsArtikelRabattpreis2.BeforeLoadDFMValues;\r\n dsArtikelRabattpreis3.BeforeLoadDFMValues;\r\n dsArtikelRabattpreis4.BeforeLoadDFMValues;\r\n dsArtikelRabattpreis5.BeforeLoadDFMValues;\r\n dsArtikelArtikelnichtmehrgueltig.BeforeLoadDFMValues;\r\n dsArtikelEinkaufspreis.BeforeLoadDFMValues;\r\n dsArtikelAufschlag.BeforeLoadDFMValues;\r\n dsArtikelWarenbestand.BeforeLoadDFMValues;\r\n dsArtikelTextfrei10.BeforeLoadDFMValues;\r\n dsArtikelTextfrei20.BeforeLoadDFMValues;\r\n dsArtikelArtikelbeschreibungRTF.BeforeLoadDFMValues;\r\n dsArtikelArtikeldatei1.BeforeLoadDFMValues;\r\n dsArtikelArtikeldatei2.BeforeLoadDFMValues;\r\n dsArtikelArtikeldatei3.BeforeLoadDFMValues;\r\n dsArtikelArtikeldatei4.BeforeLoadDFMValues;\r\n dsArtikelArtikeldatei5.BeforeLoadDFMValues;\r\n dsArtikelEinkaufspreisVom.BeforeLoadDFMValues;\r\n dsArtikelEAN.BeforeLoadDFMValues;\r\n dsArtikelVGPFaktor.BeforeLoadDFMValues;\r\n dsArtikelVGPMengenart.BeforeLoadDFMValues;\r\n dsArtikelVerleihpreis.BeforeLoadDFMValues;\r\n dsArtikelZusatzPreis.BeforeLoadDFMValues;\r\n dsArtikelVerpackungsart.BeforeLoadDFMValues;\r\n dsArtikelVerpackungsMenge.BeforeLoadDFMValues;\r\n dsArtikelQuellartikel.BeforeLoadDFMValues;\r\n dsArtikelrabattierfaehig.BeforeLoadDFMValues;\r\n dsArtikelAngebotAlternativeAN.BeforeLoadDFMValues;\r\n dsArtikelPreisanteilNetto.BeforeLoadDFMValues;\r\n dsArtikelFarbe.BeforeLoadDFMValues;\r\n dsArtikelAEinkauf.BeforeLoadDFMValues;\r\n dsArtikelAVerkauf.BeforeLoadDFMValues;\r\n dsArtikelArtikelnummerLieferant.BeforeLoadDFMValues;\r\n dsArtikelLieferantnummer.BeforeLoadDFMValues;\r\n dsArtikelVerkaufspreisBrutto.BeforeLoadDFMValues;\r\n dsArtikelArtikelSet.BeforeLoadDFMValues;\r\n dsArtikelProvisionssatz.BeforeLoadDFMValues;\r\n dsArtikelWarentarifnummer.BeforeLoadDFMValues;\r\n dsArtikelHandelsartikel.BeforeLoadDFMValues;\r\n dsArtikelUrsprungsland.BeforeLoadDFMValues;\r\n dsArtikelKategorie.BeforeLoadDFMValues;\r\n dsArtikelStandardRabattsatzEK.BeforeLoadDFMValues;\r\n dsArtikelStandardRabattsatzVK.BeforeLoadDFMValues;\r\n dsArtikelRabattpreiseManuell.BeforeLoadDFMValues;\r\n dsArtikelMengeBestellt.BeforeLoadDFMValues;\r\n dsArtikelMengeBeauftragt.BeforeLoadDFMValues;\r\n dsArtikelBestandDisponiert.BeforeLoadDFMValues;\r\n dsArtikelMengeAngeboten.BeforeLoadDFMValues;\r\n dsArtikelBestandDispInclAngebot.BeforeLoadDFMValues;\r\n dsArtikelMWStKey.BeforeLoadDFMValues;\r\n dsArtikelShopAmazon.BeforeLoadDFMValues;\r\n dsArtikelShopQuelle.BeforeLoadDFMValues;\r\n dsArtikelGeraet.BeforeLoadDFMValues;\r\n dsArtikelArtgewicht.BeforeLoadDFMValues;\r\n dsArtikelVolumen.BeforeLoadDFMValues;\r\n dsArtikelPacklisteNichtAnzeigen.BeforeLoadDFMValues;\r\n dsArtikelKeineAufschlagskalkulation.BeforeLoadDFMValues;\r\n dsArtikelKorrekturMenge.BeforeLoadDFMValues;\r\n dsArtikelKorrekturWert.BeforeLoadDFMValues;\r\n dsArtikelNachfolgeartikel.BeforeLoadDFMValues;\r\n dsArtikelMindestbestellmenge.BeforeLoadDFMValues;\r\n dsArtikelSchnittEK.BeforeLoadDFMValues;\r\n dsArtikelVerkaufspreisVom.BeforeLoadDFMValues;\r\n dsArtikelPruefungChargeSNR.BeforeLoadDFMValues;\r\n dsArtikelArtikelbeschreibungHTML.BeforeLoadDFMValues;\r\n dsArtikelProduktKurzbeschreibungHTML.BeforeLoadDFMValues;\r\n dsArtikelStatusFuerShop.BeforeLoadDFMValues;\r\n dsArtikelAmpelFuerShop.BeforeLoadDFMValues;\r\n dsArtikelEXP_Anzahl.BeforeLoadDFMValues;\r\n dsArtikelEXP_Inhalt.BeforeLoadDFMValues;\r\n dsArtikelEXP_Faktor.BeforeLoadDFMValues;\r\n dsArtikelFach.BeforeLoadDFMValues;\r\n dsArtikelExportKasse.BeforeLoadDFMValues;\r\n dsArtikelWKNR.BeforeLoadDFMValues;\r\n dsArtikelArtikelAttribute.BeforeLoadDFMValues;\r\n dsArtikelErstelltAm.BeforeLoadDFMValues;\r\n dsArtikelVarianteVonAN.BeforeLoadDFMValues;\r\n dsArtikelGurtmassWerte.BeforeLoadDFMValues;\r\n dsArtikelGurtmass.BeforeLoadDFMValues;\r\n dsArtikelAltersgrenze.BeforeLoadDFMValues;\r\n dsArtikelMWStKeyImHaus.BeforeLoadDFMValues;\r\n dsArtikelKasseBewegung.BeforeLoadDFMValues;\r\n dsArtikelKasseBewegungEK.BeforeLoadDFMValues;\r\n dsArtikelKasseBewegungVK.BeforeLoadDFMValues;\r\n dsArtikelProduktionBewegung.BeforeLoadDFMValues;\r\n dsArtikelProduktionBewegungEK.BeforeLoadDFMValues;\r\n dsArtikelProduktionBewegungVK.BeforeLoadDFMValues;\r\n dsArtikelWaWiAB.BeforeLoadDFMValues;\r\n dsArtikelGeaendertAm.BeforeLoadDFMValues;\r\n dsArtikelGefahrgutKennzeichen.BeforeLoadDFMValues;\r\n dsArtikelVerpackG.BeforeLoadDFMValues;\r\n dsArtikelUPE.BeforeLoadDFMValues;\r\n dsArtikelArtikelbeschreibungEinkauf.BeforeLoadDFMValues;\r\n dsArtikelHerstellerArtikelnummer.BeforeLoadDFMValues;\r\n dsArtikelNatura.BeforeLoadDFMValues;\r\n dsArtikelArbeitszeit.BeforeLoadDFMValues;\r\n dsArtikelArtderMengeArtderMenge.BeforeLoadDFMValues;\r\n xdsKundenpreise.BeforeLoadDFMValues;\r\n xdsKundenpreiseArtikelnummer.BeforeLoadDFMValues;\r\n xdsKundenpreiseKundennummer.BeforeLoadDFMValues;\r\n xdsKundenpreiseVerkaufspreis.BeforeLoadDFMValues;\r\n xdsKundenpreiseNachname.BeforeLoadDFMValues;\r\n xdsKundenpreiseRabattsatz.BeforeLoadDFMValues;\r\n xdsKundenpreiseVerleihpreis.BeforeLoadDFMValues;\r\n xdsKundenpreiseZusatzPreis.BeforeLoadDFMValues;\r\n xdsKundenpreiseArtikelnummerKunde.BeforeLoadDFMValues;\r\n xdsKundenpreiseDatumGeaendert.BeforeLoadDFMValues;\r\n xdsKundenpreiseArtikelueberschrift.BeforeLoadDFMValues;\r\n xdsKundenpreiseArtikelnummerArtikelnummer.BeforeLoadDFMValues;\r\n xdsKundenpreiseArtikelnummerArtikelueberschrift.BeforeLoadDFMValues;\r\n xdsKundenpreiseArtikelnummerArtikelbeschreibung.BeforeLoadDFMValues;\r\n dsBeleg2.BeforeLoadDFMValues;\r\n dsBeleg2Kundennummer.BeforeLoadDFMValues;\r\n dsBeleg2Nummerkomplett.BeforeLoadDFMValues;\r\n dsBeleg2ReferenzAngebot.BeforeLoadDFMValues;\r\n dsBeleg2ReferenzLieferschein.BeforeLoadDFMValues;\r\n dsBeleg2ReferenzRechnung.BeforeLoadDFMValues;\r\n dsBeleg2Datum.BeforeLoadDFMValues;\r\n dsBeleg2Jahr.BeforeLoadDFMValues;\r\n dsBeleg2Kalenderwoche.BeforeLoadDFMValues;\r\n dsBeleg2Nachname.BeforeLoadDFMValues;\r\n dsBeleg2Vorname.BeforeLoadDFMValues;\r\n dsBeleg2Postleitzahl.BeforeLoadDFMValues;\r\n dsBeleg2Ort.BeforeLoadDFMValues;\r\n dsBeleg2Laenderkuerzel.BeforeLoadDFMValues;\r\n dsBeleg2Land.BeforeLoadDFMValues;\r\n dsBeleg2Briefanrede1.BeforeLoadDFMValues;\r\n dsBeleg2Briefanrede2.BeforeLoadDFMValues;\r\n dsBeleg2EMail.BeforeLoadDFMValues;\r\n dsBeleg2AdresseBild.BeforeLoadDFMValues;\r\n dsBeleg2LieferanschriftBild.BeforeLoadDFMValues;\r\n dsBeleg2Zahlungsbedingung.BeforeLoadDFMValues;\r\n dsBeleg2ZahlungsbedingungText.BeforeLoadDFMValues;\r\n dsBeleg2Auftragsbezeichnung.BeforeLoadDFMValues;\r\n dsBeleg2AuftragnummerKunde.BeforeLoadDFMValues;\r\n dsBeleg2BestelldatumKunde.BeforeLoadDFMValues;\r\n dsBeleg2ILN.BeforeLoadDFMValues;\r\n dsBeleg2Kopftext.BeforeLoadDFMValues;\r\n dsBeleg2Schlussbemerkung.BeforeLoadDFMValues;\r\n dsBeleg2Gruss.BeforeLoadDFMValues;\r\n dsBeleg2Mehrwertsteuersatz1.BeforeLoadDFMValues;\r\n dsBeleg2Mehrwertsteuersatz2.BeforeLoadDFMValues;\r\n dsBeleg2Nettosumme01.BeforeLoadDFMValues;\r\n dsBeleg2Nettosumme02.BeforeLoadDFMValues;\r\n dsBeleg2Nettosumme.BeforeLoadDFMValues;\r\n dsBeleg2Mehrwertsteuer01.BeforeLoadDFMValues;\r\n dsBeleg2Mehrwertsteuer02.BeforeLoadDFMValues;\r\n dsBeleg2Mehrwertsteuer.BeforeLoadDFMValues;\r\n dsBeleg2Bruttosumme.BeforeLoadDFMValues;\r\n dsBeleg2Versanddatum.BeforeLoadDFMValues;\r\n dsBeleg2Skontosatz.BeforeLoadDFMValues;\r\n dsBeleg2NettosummeEK.BeforeLoadDFMValues;\r\n dsBeleg2NettoMarge.BeforeLoadDFMValues;\r\n dsBeleg2Schreibzeichen.BeforeLoadDFMValues;\r\n dsBeleg2Unterzeichner.BeforeLoadDFMValues;\r\n dsBeleg2TelefonMA.BeforeLoadDFMValues;\r\n dsBeleg2EmailMA.BeforeLoadDFMValues;\r\n dsBeleg2USTID.BeforeLoadDFMValues;\r\n dsBeleg2Umsatzsteuerausweis.BeforeLoadDFMValues;\r\n dsBeleg2gebucht.BeforeLoadDFMValues;\r\n dsBeleg2Lieferdatum.BeforeLoadDFMValues;\r\n dsBeleg2Transportbedingung.BeforeLoadDFMValues;\r\n dsBeleg2Mehrwertsteuersatz3.BeforeLoadDFMValues;\r\n dsBeleg2Mehrwertsteuer03.BeforeLoadDFMValues;\r\n dsBeleg2Nettosumme03.BeforeLoadDFMValues;\r\n dsBeleg2RundungsDifferenz.BeforeLoadDFMValues;\r\n dsBeleg2EmailText.BeforeLoadDFMValues;\r\n dsBeleg2Auftragerledigt.BeforeLoadDFMValues;\r\n dsBeleg2Rabattstufe.BeforeLoadDFMValues;\r\n dsBeleg2KFZKennzeichen.BeforeLoadDFMValues;\r\n dsBeleg2Fahrgestellnummer.BeforeLoadDFMValues;\r\n dsBeleg2KFZHersteller.BeforeLoadDFMValues;\r\n dsBeleg2Erstzulassungsdatum.BeforeLoadDFMValues;\r\n dsBeleg2KMStand.BeforeLoadDFMValues;\r\n dsBeleg2KFZType.BeforeLoadDFMValues;\r\n dsBeleg2Inspektionsdatum.BeforeLoadDFMValues;\r\n dsBeleg2Debitorennummer.BeforeLoadDFMValues;\r\n dsBeleg2Kostentraeger.BeforeLoadDFMValues;\r\n dsBeleg2Rabattsatz.BeforeLoadDFMValues;\r\n dsBeleg2ObjektReferenz.BeforeLoadDFMValues;\r\n dsBeleg2Bank.BeforeLoadDFMValues;\r\n dsBeleg2Bankleitzahl.BeforeLoadDFMValues;\r\n dsBeleg2Kontonummer.BeforeLoadDFMValues;\r\n dsBeleg2Kontoinhaber.BeforeLoadDFMValues;\r\n dsBeleg2Telefaxnummer.BeforeLoadDFMValues;\r\n dsBeleg2DatumNeu.BeforeLoadDFMValues;\r\n dsBeleg2Datumgeaendert.BeforeLoadDFMValues;\r\n dsBeleg2Objektnummer.BeforeLoadDFMValues;\r\n dsBeleg2Liefertermin.BeforeLoadDFMValues;\r\n dsBeleg2Emailversand.BeforeLoadDFMValues;\r\n dsBeleg2Telefonnummer.BeforeLoadDFMValues;\r\n dsBeleg2MobilTelefon.BeforeLoadDFMValues;\r\n dsBeleg2AuftragFax.BeforeLoadDFMValues;\r\n dsBeleg2REDatum.BeforeLoadDFMValues;\r\n dsBeleg2BenutzerNeu.BeforeLoadDFMValues;\r\n dsBeleg2BenutzerGeaendert.BeforeLoadDFMValues;\r\n dsBeleg2BerechnungBrutto.BeforeLoadDFMValues;\r\n dsBeleg2Bruttosumme01.BeforeLoadDFMValues;\r\n dsBeleg2Bruttosumme02.BeforeLoadDFMValues;\r\n dsBeleg2Bruttosumme03.BeforeLoadDFMValues;\r\n dsBeleg2Notiz.BeforeLoadDFMValues;\r\n dsBeleg2MargeProzent.BeforeLoadDFMValues;\r\n dsBeleg2Warenkreditgesperrt.BeforeLoadDFMValues;\r\n dsBeleg2Belegsprache.BeforeLoadDFMValues;\r\n dsBeleg2Duplicate.BeforeLoadDFMValues;\r\n dsBeleg2perEmail.BeforeLoadDFMValues;\r\n dsBeleg2Ansprechpartner.BeforeLoadDFMValues;\r\n dsBeleg2KundennummerFremd.BeforeLoadDFMValues;\r\n dsBeleg2Protokoll.BeforeLoadDFMValues;\r\n dsBeleg2Verleihauftrag.BeforeLoadDFMValues;\r\n dsBeleg2VerleihVon.BeforeLoadDFMValues;\r\n dsBeleg2VerleihBis.BeforeLoadDFMValues;\r\n dsBeleg2AuftragGenehmigt.BeforeLoadDFMValues;\r\n dsBeleg2gesperrt.BeforeLoadDFMValues;\r\n dsBeleg2VerleihvonText.BeforeLoadDFMValues;\r\n dsBeleg2VerleihbisText.BeforeLoadDFMValues;\r\n dsBeleg2DruckWHG.BeforeLoadDFMValues;\r\n dsBeleg2DruckWHGKurs.BeforeLoadDFMValues;\r\n dsBeleg2ProzentsatzZusatzposition.BeforeLoadDFMValues;\r\n dsBeleg2TextZusatzposition.BeforeLoadDFMValues;\r\n dsBeleg2TextzusatzBeschreibung.BeforeLoadDFMValues;\r\n dsBeleg2Layoutname.BeforeLoadDFMValues;\r\n dsBeleg2Gesamtgewicht.BeforeLoadDFMValues;\r\n dsBeleg2BetragZusatzposition.BeforeLoadDFMValues;\r\n dsBeleg2ReferenzBestellung.BeforeLoadDFMValues;\r\n dsBeleg2Termin1.BeforeLoadDFMValues;\r\n dsBeleg2Termin2.BeforeLoadDFMValues;\r\n dsBeleg2Zielkontaktnummer.BeforeLoadDFMValues;\r\n dsBeleg2Zielkontaktname.BeforeLoadDFMValues;\r\n dsBeleg2Bilddatei1.BeforeLoadDFMValues;\r\n dsBeleg2Bilddatei2.BeforeLoadDFMValues;\r\n dsBeleg2Zielkontaktnummer2.BeforeLoadDFMValues;\r\n dsBeleg2Zielkontaktname2.BeforeLoadDFMValues;\r\n dsBeleg2bestaetigt.BeforeLoadDFMValues;\r\n dsBeleg2Zielkontaktnummer3.BeforeLoadDFMValues;\r\n dsBeleg2Zielkontaktname3.BeforeLoadDFMValues;\r\n dsBeleg2Termin3.BeforeLoadDFMValues;\r\n dsBeleg2Termin4.BeforeLoadDFMValues;\r\n dsBeleg2Muster.BeforeLoadDFMValues;\r\n dsBeleg2KW.BeforeLoadDFMValues;\r\n dsBeleg2Datenlink.BeforeLoadDFMValues;\r\n dsBeleg2Mehrwertsteuersatz4.BeforeLoadDFMValues;\r\n dsBeleg2Mehrwertsteuersatz5.BeforeLoadDFMValues;\r\n dsBeleg2Mehrwertsteuersatz6.BeforeLoadDFMValues;\r\n dsBeleg2BesteuerungKey.BeforeLoadDFMValues;\r\n dsBeleg2VertreterMatchcode.BeforeLoadDFMValues;\r\n dsBeleg2Verfasser.BeforeLoadDFMValues;\r\n dsBeleg2LieferadresseID.BeforeLoadDFMValues;\r\n dsBeleg2AuftragStatus.BeforeLoadDFMValues;\r\n dsBeleg2MonatJahr.BeforeLoadDFMValues;\r\n dsBeleg2Belegvariante.BeforeLoadDFMValues;\r\n dsBeleg2Produktionsfreigabe.BeforeLoadDFMValues;\r\n dsBeleg2ReferenzRahmenAuftrag.BeforeLoadDFMValues;\r\n dsBeleg2DatumRahmenAuftrag.BeforeLoadDFMValues;\r\n dsBeleg2FahrzeugID.BeforeLoadDFMValues;\r\n dsBeleg2AuslieferungKW.BeforeLoadDFMValues;\r\n dsBeleg2BereitstellungDatum.BeforeLoadDFMValues;\r\n dsBeleg2VTUID.BeforeLoadDFMValues;\r\n dsBeleg2LieferanschriftDaten.BeforeLoadDFMValues;\r\n dsBeleg2GesamtVolumen.BeforeLoadDFMValues;\r\n dsBeleg2BelegPKey.BeforeLoadDFMValues;\r\n dsBeleg2DruckParameter.BeforeLoadDFMValues;\r\n dsBeleg2ReferenzService.BeforeLoadDFMValues;\r\n dsBeleg2ZusatzDaten.BeforeLoadDFMValues;\r\n dsBeleg2StandPDF.BeforeLoadDFMValues;\r\n dsBeleg2Paketdienst.BeforeLoadDFMValues;\r\n dsBeleg2Monteur.BeforeLoadDFMValues;\r\n dsBeleg2KundennummerKundennummer.BeforeLoadDFMValues;\r\n dsBeleg2ServiceBemerkung.BeforeLoadDFMValues;\r\n try\r\n Name := 'AuftragPosEinzel';\r\n Width := 235;\r\n Height := 511;\r\n CSSLibrary := cssBootstrap;\r\n ElementFont := efCSS;\r\n SetEvent(Self, 'OnClose', 'WebFormClose');\r\n SetEvent(Self, 'OnCloseQuery', 'WebFormCloseQuery');\r\n SetEvent(Self, 'OnCreate', 'WebFormCreate');\r\n SetEvent(Self, 'OnShow', 'WebFormShow');\r\n Container1.SetParentComponent(Self);\r\n Container1.Name := 'Container1';\r\n Container1.Left := 0;\r\n Container1.Top := 0;\r\n Container1.Width := 235;\r\n Container1.Height := 41;\r\n Container1.HeightStyle := ssAuto;\r\n Container1.WidthStyle := ssPercent;\r\n Container1.Align := alTop;\r\n Container1.ElementFont := efCSS;\r\n Container1.ElementPosition := epIgnore;\r\n Container2.SetParentComponent(Self);\r\n Container2.Name := 'Container2';\r\n Container2.Left := 0;\r\n Container2.Top := 41;\r\n Container2.Width := 235;\r\n Container2.Height := 41;\r\n Container2.ElementClassName := 'd-flex flex-wrap m-1';\r\n Container2.HeightStyle := ssAuto;\r\n Container2.WidthStyle := ssAuto;\r\n Container2.Align := alTop;\r\n Container2.ChildOrder := 1;\r\n Container2.ElementFont := efCSS;\r\n Container2.ElementPosition := epIgnore;\r\n btnPosAbbrechen.SetParentComponent(Self);\r\n btnPosAbbrechen.Name := 'btnPosAbbrechen';\r\n btnPosAbbrechen.Left := 0;\r\n btnPosAbbrechen.Top := 206;\r\n btnPosAbbrechen.Width := 96;\r\n btnPosAbbrechen.Height := 25;\r\n btnPosAbbrechen.Caption := 'Abbrechen';\r\n btnPosAbbrechen.ChildOrder := 4;\r\n btnPosAbbrechen.ElementClassName := 'btn btn-info btn-sm m-1 text-left';\r\n btnPosAbbrechen.ElementFont := efCSS;\r\n btnPosAbbrechen.ElementPosition := epIgnore;\r\n btnPosAbbrechen.HeightStyle := ssAuto;\r\n btnPosAbbrechen.HeightPercent := 100.000000000000000000;\r\n btnPosAbbrechen.WidthStyle := ssAuto;\r\n btnPosAbbrechen.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnPosAbbrechen, Self, 'OnClick', 'btnPosAbbrechenClick');\r\n btnPosSpeichern.SetParentComponent(Self);\r\n btnPosSpeichern.Name := 'btnPosSpeichern';\r\n btnPosSpeichern.Left := 0;\r\n btnPosSpeichern.Top := 237;\r\n btnPosSpeichern.Width := 96;\r\n btnPosSpeichern.Height := 25;\r\n btnPosSpeichern.Caption := 'Speichern';\r\n btnPosSpeichern.ChildOrder := 4;\r\n btnPosSpeichern.ElementClassName := 'btn btn-info btn-sm m-1 text-left';\r\n btnPosSpeichern.ElementFont := efCSS;\r\n btnPosSpeichern.ElementPosition := epIgnore;\r\n btnPosSpeichern.HeightStyle := ssAuto;\r\n btnPosSpeichern.HeightPercent := 100.000000000000000000;\r\n btnPosSpeichern.WidthStyle := ssAuto;\r\n btnPosSpeichern.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnPosSpeichern, Self, 'OnClick', 'btnPosSpeichernClick');\r\n btnPositionLoeschen.SetParentComponent(Self);\r\n btnPositionLoeschen.Name := 'btnPositionLoeschen';\r\n btnPositionLoeschen.Left := 0;\r\n btnPositionLoeschen.Top := 268;\r\n btnPositionLoeschen.Width := 96;\r\n btnPositionLoeschen.Height := 25;\r\n btnPositionLoeschen.Caption := 'Position l'#246'schen';\r\n btnPositionLoeschen.ChildOrder := 4;\r\n btnPositionLoeschen.ElementClassName := 'btn btn-info btn-sm m-1 text-left';\r\n btnPositionLoeschen.ElementFont := efCSS;\r\n btnPositionLoeschen.ElementPosition := epIgnore;\r\n btnPositionLoeschen.HeightStyle := ssAuto;\r\n btnPositionLoeschen.HeightPercent := 100.000000000000000000;\r\n btnPositionLoeschen.WidthStyle := ssAuto;\r\n btnPositionLoeschen.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnPositionLoeschen, Self, 'OnClick', 'btnPositionLoeschenClick');\r\n edtPosNr.SetParentComponent(Self);\r\n edtPosNr.Name := 'edtPosNr';\r\n edtPosNr.Left := 8;\r\n edtPosNr.Top := 299;\r\n edtPosNr.Width := 121;\r\n edtPosNr.Height := 22;\r\n edtPosNr.ChildOrder := 12;\r\n edtPosNr.EditType := weNumeric;\r\n edtPosNr.ElementClassName := 'form-control form-control-sm';\r\n edtPosNr.ElementFont := efCSS;\r\n edtPosNr.ElementPosition := epIgnore;\r\n edtPosNr.HeightStyle := ssAuto;\r\n edtPosNr.HeightPercent := 100.000000000000000000;\r\n edtPosNr.WidthStyle := ssPercent;\r\n edtPosNr.WidthPercent := 95.000000000000000000;\r\n edtPosNr.DataField := 'PosNr';\r\n edtPosNr.DataSource := sourcePosition;\r\n edtPosUNr.SetParentComponent(Self);\r\n edtPosUNr.Name := 'edtPosUNr';\r\n edtPosUNr.Left := 8;\r\n edtPosUNr.Top := 327;\r\n edtPosUNr.Width := 121;\r\n edtPosUNr.Height := 22;\r\n edtPosUNr.ChildOrder := 12;\r\n edtPosUNr.EditType := weNumeric;\r\n edtPosUNr.ElementClassName := 'form-control form-control-sm';\r\n edtPosUNr.ElementFont := efCSS;\r\n edtPosUNr.ElementPosition := epIgnore;\r\n edtPosUNr.HeightStyle := ssAuto;\r\n edtPosUNr.HeightPercent := 100.000000000000000000;\r\n edtPosUNr.WidthStyle := ssPercent;\r\n edtPosUNr.WidthPercent := 95.000000000000000000;\r\n edtPosUNr.DataField := 'PosUNr';\r\n edtPosUNr.DataSource := sourcePosition;\r\n edtArtikelueberschrift.SetParentComponent(Self);\r\n edtArtikelueberschrift.Name := 'edtArtikelueberschrift';\r\n edtArtikelueberschrift.Left := 8;\r\n edtArtikelueberschrift.Top := 355;\r\n edtArtikelueberschrift.Width := 121;\r\n edtArtikelueberschrift.Height := 22;\r\n edtArtikelueberschrift.ChildOrder := 12;\r\n edtArtikelueberschrift.ElementClassName := 'form-control form-control-sm';\r\n edtArtikelueberschrift.ElementFont := efCSS;\r\n edtArtikelueberschrift.ElementPosition := epIgnore;\r\n edtArtikelueberschrift.HeightStyle := ssAuto;\r\n edtArtikelueberschrift.HeightPercent := 100.000000000000000000;\r\n edtArtikelueberschrift.WidthStyle := ssPercent;\r\n edtArtikelueberschrift.WidthPercent := 95.000000000000000000;\r\n edtArtikelueberschrift.DataField := 'Artikelueberschrift';\r\n edtArtikelueberschrift.DataSource := sourcePosition;\r\n edtMenge.SetParentComponent(Self);\r\n edtMenge.Name := 'edtMenge';\r\n edtMenge.Left := 8;\r\n edtMenge.Top := 383;\r\n edtMenge.Width := 121;\r\n edtMenge.Height := 22;\r\n edtMenge.ChildOrder := 12;\r\n edtMenge.EditType := weSignedFloat;\r\n edtMenge.ElementClassName := 'form-control form-control-sm';\r\n edtMenge.ElementFont := efCSS;\r\n edtMenge.ElementPosition := epIgnore;\r\n edtMenge.HeightStyle := ssAuto;\r\n edtMenge.HeightPercent := 100.000000000000000000;\r\n edtMenge.WidthStyle := ssPercent;\r\n edtMenge.WidthPercent := 95.000000000000000000;\r\n edtMenge.DataField := 'Menge';\r\n edtMenge.DataSource := sourcePosition;\r\n btnArtikelnummer.SetParentComponent(Self);\r\n btnArtikelnummer.Name := 'btnArtikelnummer';\r\n btnArtikelnummer.Left := 8;\r\n btnArtikelnummer.Top := 411;\r\n btnArtikelnummer.Width := 96;\r\n btnArtikelnummer.Height := 25;\r\n btnArtikelnummer.Caption := 'Artikel w'#228'hlen';\r\n btnArtikelnummer.ChildOrder := 4;\r\n btnArtikelnummer.ElementClassName := 'btn btn-info btn-sm m-1 text-left';\r\n btnArtikelnummer.ElementFont := efCSS;\r\n btnArtikelnummer.ElementPosition := epIgnore;\r\n btnArtikelnummer.HeightStyle := ssAuto;\r\n btnArtikelnummer.HeightPercent := 100.000000000000000000;\r\n btnArtikelnummer.WidthStyle := ssAuto;\r\n btnArtikelnummer.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnArtikelnummer, Self, 'OnClick', 'btnArtikelnummerClick');\r\n edtArbeitszeitDatum.SetParentComponent(Self);\r\n edtArbeitszeitDatum.Name := 'edtArbeitszeitDatum';\r\n edtArbeitszeitDatum.Left := 139;\r\n edtArbeitszeitDatum.Top := 299;\r\n edtArbeitszeitDatum.Width := 88;\r\n edtArbeitszeitDatum.Height := 22;\r\n edtArbeitszeitDatum.ElementClassName := 'form-control form-control-sm';\r\n edtArbeitszeitDatum.HeightStyle := ssAuto;\r\n edtArbeitszeitDatum.WidthStyle := ssPercent;\r\n edtArbeitszeitDatum.WidthPercent := 95.000000000000000000;\r\n edtArbeitszeitDatum.BorderStyle := bsSingle;\r\n edtArbeitszeitDatum.ChildOrder := 11;\r\n edtArbeitszeitDatum.Color := clWhite;\r\n edtArbeitszeitDatum.Date := 44129.377583032410000000;\r\n edtArbeitszeitDatum.ElementFont := efCSS;\r\n edtArbeitszeitDatum.ElementPosition := epIgnore;\r\n edtArbeitszeitDatum.Role := '';\r\n edtArbeitszeitDatum.Text := '';\r\n SetEvent(edtArbeitszeitDatum, Self, 'OnEnter', 'edtArbeitszeitDatumEnter');\r\n edtArbeitszeitDatum.DataField := 'ArbeitszeitDatum';\r\n edtArbeitszeitDatum.DataSource := sourcePosition;\r\n edtArbeitszeitVON.SetParentComponent(Self);\r\n edtArbeitszeitVON.Name := 'edtArbeitszeitVON';\r\n edtArbeitszeitVON.Left := 139;\r\n edtArbeitszeitVON.Top := 327;\r\n edtArbeitszeitVON.Width := 88;\r\n edtArbeitszeitVON.Height := 22;\r\n edtArbeitszeitVON.ElementClassName := 'form-control form-control-sm';\r\n edtArbeitszeitVON.HeightStyle := ssAuto;\r\n edtArbeitszeitVON.WidthStyle := ssPercent;\r\n edtArbeitszeitVON.WidthPercent := 95.000000000000000000;\r\n edtArbeitszeitVON.BorderStyle := bsSingle;\r\n edtArbeitszeitVON.ChildOrder := 11;\r\n edtArbeitszeitVON.Color := clWhite;\r\n edtArbeitszeitVON.Date := 44129.377583032410000000;\r\n edtArbeitszeitVON.ElementFont := efCSS;\r\n edtArbeitszeitVON.ElementPosition := epIgnore;\r\n edtArbeitszeitVON.Kind := dtkTime;\r\n edtArbeitszeitVON.Role := '';\r\n edtArbeitszeitVON.Text := '';\r\n edtArbeitszeitVON.DataField := 'ArbeitszeitVON';\r\n edtArbeitszeitVON.DataSource := sourcePosition;\r\n edtArbeitszeitBIS.SetParentComponent(Self);\r\n edtArbeitszeitBIS.Name := 'edtArbeitszeitBIS';\r\n edtArbeitszeitBIS.Left := 139;\r\n edtArbeitszeitBIS.Top := 355;\r\n edtArbeitszeitBIS.Width := 88;\r\n edtArbeitszeitBIS.Height := 22;\r\n edtArbeitszeitBIS.ElementClassName := 'form-control form-control-sm';\r\n edtArbeitszeitBIS.HeightStyle := ssAuto;\r\n edtArbeitszeitBIS.WidthStyle := ssPercent;\r\n edtArbeitszeitBIS.WidthPercent := 95.000000000000000000;\r\n edtArbeitszeitBIS.BorderStyle := bsSingle;\r\n edtArbeitszeitBIS.ChildOrder := 11;\r\n edtArbeitszeitBIS.Color := clWhite;\r\n edtArbeitszeitBIS.Date := 44129.377583032410000000;\r\n edtArbeitszeitBIS.ElementFont := efCSS;\r\n edtArbeitszeitBIS.ElementPosition := epIgnore;\r\n edtArbeitszeitBIS.Kind := dtkTime;\r\n edtArbeitszeitBIS.Role := '';\r\n edtArbeitszeitBIS.Text := '';\r\n edtArbeitszeitBIS.DataField := 'ArbeitszeitBIS';\r\n edtArbeitszeitBIS.DataSource := sourcePosition;\r\n edtArtikelbeschreibung.SetParentComponent(Self);\r\n edtArtikelbeschreibung.Name := 'edtArtikelbeschreibung';\r\n edtArtikelbeschreibung.Left := 144;\r\n edtArtikelbeschreibung.Top := 384;\r\n edtArtikelbeschreibung.Width := 185;\r\n edtArtikelbeschreibung.Height := 200;\r\n edtArtikelbeschreibung.BorderStyle := bsNone;\r\n edtArtikelbeschreibung.ElementClassName := 'form-control form-control-sm';\r\n edtArtikelbeschreibung.ElementFont := efCSS;\r\n edtArtikelbeschreibung.ElementPosition := epIgnore;\r\n edtArtikelbeschreibung.HeightPercent := 100.000000000000000000;\r\n edtArtikelbeschreibung.Lines.BeginUpdate;\r\n try\r\n edtArtikelbeschreibung.Lines.Clear;\r\n edtArtikelbeschreibung.Lines.Add('edtArtikelbeschreibung');\r\n finally\r\n edtArtikelbeschreibung.Lines.EndUpdate;\r\n end;\r\n edtArtikelbeschreibung.SelLength := 0;\r\n edtArtikelbeschreibung.SelStart := 0;\r\n edtArtikelbeschreibung.WidthStyle := ssPercent;\r\n edtArtikelbeschreibung.WidthPercent := 95.000000000000000000;\r\n edtArtikelbeschreibung.DataField := 'Artikelbeschreibung';\r\n edtArtikelbeschreibung.DataSource := sourcePosition;\r\n PosComboMonteur.SetParentComponent(Self);\r\n PosComboMonteur.Name := 'PosComboMonteur';\r\n PosComboMonteur.Left := 8;\r\n PosComboMonteur.Top := 442;\r\n PosComboMonteur.Width := 145;\r\n PosComboMonteur.Height := 23;\r\n PosComboMonteur.ElementClassName := 'form-control form-control-sm';\r\n PosComboMonteur.ElementFont := efCSS;\r\n PosComboMonteur.ElementPosition := epIgnore;\r\n PosComboMonteur.HeightStyle := ssAuto;\r\n PosComboMonteur.HeightPercent := 100.000000000000000000;\r\n PosComboMonteur.Text := 'PosComboMonteur';\r\n PosComboMonteur.WidthStyle := ssPercent;\r\n PosComboMonteur.WidthPercent := 95.000000000000000000;\r\n SetEvent(PosComboMonteur, Self, 'OnEnter', 'PosComboMonteurEnter');\r\n PosComboMonteur.ItemIndex := -1;\r\n edtMengenart.SetParentComponent(Self);\r\n edtMengenart.Name := 'edtMengenart';\r\n edtMengenart.Left := 8;\r\n edtMengenart.Top := 472;\r\n edtMengenart.Width := 145;\r\n edtMengenart.Height := 22;\r\n edtMengenart.ElementClassName := 'form-control form-control-sm';\r\n edtMengenart.ElementFont := efCSS;\r\n edtMengenart.ElementPosition := epIgnore;\r\n edtMengenart.HeightStyle := ssAuto;\r\n edtMengenart.HeightPercent := 100.000000000000000000;\r\n edtMengenart.WidthStyle := ssPercent;\r\n edtMengenart.WidthPercent := 95.000000000000000000;\r\n edtMengenart.DataField := 'ArtderMenge';\r\n edtMengenart.DataSource := sourcePosition;\r\n edtMengenart.KeyField := 'ArtderMenge';\r\n edtMengenart.ListField := 'ArtderMenge';\r\n edtMengenart.ListSource := DM2.sourceMengenarten;\r\n btnNeuePosition.SetParentComponent(Self);\r\n btnNeuePosition.Name := 'btnNeuePosition';\r\n btnNeuePosition.Left := 0;\r\n btnNeuePosition.Top := 175;\r\n btnNeuePosition.Width := 96;\r\n btnNeuePosition.Height := 25;\r\n btnNeuePosition.Caption := '+ NEU';\r\n btnNeuePosition.ChildOrder := 4;\r\n btnNeuePosition.ElementClassName := 'btn btn-info btn-sm m-1 text-left';\r\n btnNeuePosition.ElementFont := efCSS;\r\n btnNeuePosition.ElementPosition := epIgnore;\r\n btnNeuePosition.HeightStyle := ssAuto;\r\n btnNeuePosition.HeightPercent := 100.000000000000000000;\r\n btnNeuePosition.Visible := False;\r\n btnNeuePosition.WidthStyle := ssAuto;\r\n btnNeuePosition.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnNeuePosition, Self, 'OnClick', 'btnNeuePositionClick');\r\n WTCPosition.SetParentComponent(Self);\r\n WTCPosition.Name := 'WTCPosition';\r\n WTCPosition.Left := 0;\r\n WTCPosition.Top := 82;\r\n WTCPosition.Width := 235;\r\n WTCPosition.Height := 75;\r\n WTCPosition.ElementClassName := 'table';\r\n WTCPosition.HeightStyle := ssAuto;\r\n WTCPosition.WidthStyle := ssPercent;\r\n WTCPosition.BorderColor := clSilver;\r\n WTCPosition.ChildOrder := 2;\r\n WTCPosition.ColHeader := False;\r\n WTCPosition.ElementFont := efCSS;\r\n WTCPosition.ElementHeaderClassName := 'table-info';\r\n WTCPosition.ElementPosition := epIgnore;\r\n WTCPosition.ElementTableClassName := 'table table-bordered';\r\n WTCPosition.Footer.ButtonActiveElementClassName := 'btn btn-primary';\r\n WTCPosition.Footer.ButtonElementClassName := 'btn btn-light';\r\n WTCPosition.Footer.DropDownElementClassName := 'form-control';\r\n WTCPosition.Footer.InputElementClassName := 'form-control';\r\n WTCPosition.Footer.LinkActiveElementClassName := 'link-primary';\r\n WTCPosition.Footer.LinkElementClassName := 'link-secondary';\r\n WTCPosition.Footer.ListElementClassName := 'pagination';\r\n WTCPosition.Footer.ListItemElementClassName := 'page-item';\r\n WTCPosition.Footer.ListLinkElementClassName := 'page-link';\r\n WTCPosition.Header.ButtonActiveElementClassName := 'btn btn-primary';\r\n WTCPosition.Header.ButtonElementClassName := 'btn btn-light';\r\n WTCPosition.Header.DropDownElementClassName := 'form-control';\r\n WTCPosition.Header.InputElementClassName := 'form-control';\r\n WTCPosition.Header.LinkActiveElementClassName := 'link-primary';\r\n WTCPosition.Header.LinkElementClassName := 'link-secondary';\r\n WTCPosition.Header.ListElementClassName := 'pagination';\r\n WTCPosition.Header.ListItemElementClassName := 'page-item';\r\n WTCPosition.Header.ListLinkElementClassName := 'page-link';\r\n WTCPosition.WordWrap := True;\r\n WTCPosition.ColCount := 2;\r\n WTCPosition.RowCount := 13;\r\n xdsPosition.SetParentComponent(Self);\r\n xdsPosition.Name := 'xdsPosition';\r\n xdsPosition.AfterApplyUpdates := xdsPositionAfterApplyUpdates;\r\n xdsPosition.AfterOpen := xdsPositionAfterOpen;\r\n xdsPosition.BeforePost := xdsPositionBeforePost;\r\n xdsPosition.AfterPost := xdsPositionAfterPost;\r\n xdsPosition.AfterDelete := xdsPositionAfterDelete;\r\n SetEvent(xdsPosition, Self, 'OnNewRecord', 'xdsPositionNewRecord');\r\n xdsPosition.EntitySetName := 'PositionenAuftrag';\r\n xdsPosition.Connection := DM2.XDataWebConnection1;\r\n xdsPosition.QueryTop := 1;\r\n xdsPosition.Left := 92;\r\n xdsPosition.Top := 101;\r\n xdsPositionID.SetParentComponent(xdsPosition);\r\n xdsPositionID.Name := 'xdsPositionID';\r\n xdsPositionID.FieldName := 'ID';\r\n xdsPositionPosNr.SetParentComponent(xdsPosition);\r\n xdsPositionPosNr.Name := 'xdsPositionPosNr';\r\n xdsPositionPosNr.FieldName := 'PosNr';\r\n xdsPositionPosNr.Required := True;\r\n xdsPositionPosUNr.SetParentComponent(xdsPosition);\r\n xdsPositionPosUNr.Name := 'xdsPositionPosUNr';\r\n xdsPositionPosUNr.FieldName := 'PosUNr';\r\n xdsPositionArtikelueberschrift.SetParentComponent(xdsPosition);\r\n xdsPositionArtikelueberschrift.Name := 'xdsPositionArtikelueberschrift';\r\n xdsPositionArtikelueberschrift.FieldName := 'Artikelueberschrift';\r\n xdsPositionArtikelueberschrift.Size := 50;\r\n xdsPositionArtikelbeschreibung.SetParentComponent(xdsPosition);\r\n xdsPositionArtikelbeschreibung.Name := 'xdsPositionArtikelbeschreibung';\r\n xdsPositionArtikelbeschreibung.FieldName := 'Artikelbeschreibung';\r\n xdsPositionArtikelbeschreibung.Size := 255;\r\n xdsPositionMenge.SetParentComponent(xdsPosition);\r\n xdsPositionMenge.Name := 'xdsPositionMenge';\r\n xdsPositionMenge.FieldName := 'Menge';\r\n xdsPositionArtderMenge.SetParentComponent(xdsPosition);\r\n xdsPositionArtderMenge.Name := 'xdsPositionArtderMenge';\r\n xdsPositionArtderMenge.FieldName := 'ArtderMenge';\r\n xdsPositionArtderMenge.Size := 50;\r\n xdsPositionVerkaufspreis.SetParentComponent(xdsPosition);\r\n xdsPositionVerkaufspreis.Name := 'xdsPositionVerkaufspreis';\r\n xdsPositionVerkaufspreis.FieldName := 'Verkaufspreis';\r\n xdsPositionEinkaufspreis.SetParentComponent(xdsPosition);\r\n xdsPositionEinkaufspreis.Name := 'xdsPositionEinkaufspreis';\r\n xdsPositionEinkaufspreis.FieldName := 'Einkaufspreis';\r\n xdsPositionArtikelnummer.SetParentComponent(xdsPosition);\r\n xdsPositionArtikelnummer.Name := 'xdsPositionArtikelnummer';\r\n xdsPositionArtikelnummer.FieldName := 'Artikelnummer';\r\n xdsPositionMonteurP.SetParentComponent(xdsPosition);\r\n xdsPositionMonteurP.Name := 'xdsPositionMonteurP';\r\n xdsPositionMonteurP.FieldName := 'MonteurP';\r\n xdsPositionArbeitszeitDatum.SetParentComponent(xdsPosition);\r\n xdsPositionArbeitszeitDatum.Name := 'xdsPositionArbeitszeitDatum';\r\n xdsPositionArbeitszeitDatum.FieldName := 'ArbeitszeitDatum';\r\n xdsPositionArbeitszeitVON.SetParentComponent(xdsPosition);\r\n xdsPositionArbeitszeitVON.Name := 'xdsPositionArbeitszeitVON';\r\n xdsPositionArbeitszeitVON.FieldName := 'ArbeitszeitVON';\r\n xdsPositionArbeitszeitVON.DisplayFormat := 'hh:mm';\r\n xdsPositionArbeitszeitBIS.SetParentComponent(xdsPosition);\r\n xdsPositionArbeitszeitBIS.Name := 'xdsPositionArbeitszeitBIS';\r\n xdsPositionArbeitszeitBIS.FieldName := 'ArbeitszeitBIS';\r\n xdsPositionArbeitszeitBIS.DisplayFormat := 'hh:mm';\r\n xdsPositionSumme.SetParentComponent(xdsPosition);\r\n xdsPositionSumme.Name := 'xdsPositionSumme';\r\n xdsPositionSumme.FieldName := 'Summe';\r\n xdsPositionSeriennummer.SetParentComponent(xdsPosition);\r\n xdsPositionSeriennummer.Name := 'xdsPositionSeriennummer';\r\n xdsPositionSeriennummer.FieldName := 'Seriennummer';\r\n xdsPositionSeriennummer.Size := 30;\r\n xdsPositionWarengruppe.SetParentComponent(xdsPosition);\r\n xdsPositionWarengruppe.Name := 'xdsPositionWarengruppe';\r\n xdsPositionWarengruppe.FieldName := 'Warengruppe';\r\n xdsPositionWarengruppe.Size := 50;\r\n xdsPositionWarenuntergruppe.SetParentComponent(xdsPosition);\r\n xdsPositionWarenuntergruppe.Name := 'xdsPositionWarenuntergruppe';\r\n xdsPositionWarenuntergruppe.FieldName := 'Warenuntergruppe';\r\n xdsPositionWarenuntergruppe.Size := 50;\r\n xdsPositionArtikelnummerKunde.SetParentComponent(xdsPosition);\r\n xdsPositionArtikelnummerKunde.Name := 'xdsPositionArtikelnummerKunde';\r\n xdsPositionArtikelnummerKunde.FieldName := 'ArtikelnummerKunde';\r\n xdsPositionLieferant.SetParentComponent(xdsPosition);\r\n xdsPositionLieferant.Name := 'xdsPositionLieferant';\r\n xdsPositionLieferant.FieldName := 'Lieferant';\r\n xdsPositionLieferant.Size := 13;\r\n xdsPositionGewicht.SetParentComponent(xdsPosition);\r\n xdsPositionGewicht.Name := 'xdsPositionGewicht';\r\n xdsPositionGewicht.FieldName := 'Gewicht';\r\n xdsPositionLaenge.SetParentComponent(xdsPosition);\r\n xdsPositionLaenge.Name := 'xdsPositionLaenge';\r\n xdsPositionLaenge.FieldName := 'Laenge';\r\n xdsPositionBreite.SetParentComponent(xdsPosition);\r\n xdsPositionBreite.Name := 'xdsPositionBreite';\r\n xdsPositionBreite.FieldName := 'Breite';\r\n xdsPositionHoehe.SetParentComponent(xdsPosition);\r\n xdsPositionHoehe.Name := 'xdsPositionHoehe';\r\n xdsPositionHoehe.FieldName := 'Hoehe';\r\n xdsPositionMehrwertsteuersatz.SetParentComponent(xdsPosition);\r\n xdsPositionMehrwertsteuersatz.Name := 'xdsPositionMehrwertsteuersatz';\r\n xdsPositionMehrwertsteuersatz.FieldName := 'Mehrwertsteuersatz';\r\n xdsPositionEndpreis.SetParentComponent(xdsPosition);\r\n xdsPositionEndpreis.Name := 'xdsPositionEndpreis';\r\n xdsPositionEndpreis.FieldName := 'Endpreis';\r\n xdsPositionPosMWST.SetParentComponent(xdsPosition);\r\n xdsPositionPosMWST.Name := 'xdsPositionPosMWST';\r\n xdsPositionPosMWST.FieldName := 'PosMWST';\r\n xdsPositionBruttoEndpreis.SetParentComponent(xdsPosition);\r\n xdsPositionBruttoEndpreis.Name := 'xdsPositionBruttoEndpreis';\r\n xdsPositionBruttoEndpreis.FieldName := 'BruttoEndpreis';\r\n xdsPositionEndpreis_EK.SetParentComponent(xdsPosition);\r\n xdsPositionEndpreis_EK.Name := 'xdsPositionEndpreis_EK';\r\n xdsPositionEndpreis_EK.FieldName := 'Endpreis_EK';\r\n xdsPositionRabattsatz.SetParentComponent(xdsPosition);\r\n xdsPositionRabattsatz.Name := 'xdsPositionRabattsatz';\r\n xdsPositionRabattsatz.FieldName := 'Rabattsatz';\r\n xdsPositionPreisvorRabatt.SetParentComponent(xdsPosition);\r\n xdsPositionPreisvorRabatt.Name := 'xdsPositionPreisvorRabatt';\r\n xdsPositionPreisvorRabatt.FieldName := 'PreisvorRabatt';\r\n xdsPositionPKZ.SetParentComponent(xdsPosition);\r\n xdsPositionPKZ.Name := 'xdsPositionPKZ';\r\n xdsPositionPKZ.FieldName := 'PKZ';\r\n xdsPositionTextfrei10.SetParentComponent(xdsPosition);\r\n xdsPositionTextfrei10.Name := 'xdsPositionTextfrei10';\r\n xdsPositionTextfrei10.FieldName := 'Textfrei10';\r\n xdsPositionTextfrei10.Size := 50;\r\n xdsPositionTextfrei20.SetParentComponent(xdsPosition);\r\n xdsPositionTextfrei20.Name := 'xdsPositionTextfrei20';\r\n xdsPositionTextfrei20.FieldName := 'Textfrei20';\r\n xdsPositionTextfrei20.Size := 50;\r\n xdsPositionProduktionAbgeschlossen.SetParentComponent(xdsPosition);\r\n xdsPositionProduktionAbgeschlossen.Name := 'xdsPositionProduktionAbgeschlossen';\r\n xdsPositionProduktionAbgeschlossen.FieldName := 'ProduktionAbgeschlossen';\r\n xdsPositionEinzelpreisBrutto.SetParentComponent(xdsPosition);\r\n xdsPositionEinzelpreisBrutto.Name := 'xdsPositionEinzelpreisBrutto';\r\n xdsPositionEinzelpreisBrutto.FieldName := 'EinzelpreisBrutto';\r\n xdsPositionPosMarge.SetParentComponent(xdsPosition);\r\n xdsPositionPosMarge.Name := 'xdsPositionPosMarge';\r\n xdsPositionPosMarge.FieldName := 'PosMarge';\r\n xdsPositionPosMargeProzent.SetParentComponent(xdsPosition);\r\n xdsPositionPosMargeProzent.Name := 'xdsPositionPosMargeProzent';\r\n xdsPositionPosMargeProzent.FieldName := 'PosMargeProzent';\r\n xdsPositionBereitsGeliefert.SetParentComponent(xdsPosition);\r\n xdsPositionBereitsGeliefert.Name := 'xdsPositionBereitsGeliefert';\r\n xdsPositionBereitsGeliefert.FieldName := 'BereitsGeliefert';\r\n xdsPositionausliefern.SetParentComponent(xdsPosition);\r\n xdsPositionausliefern.Name := 'xdsPositionausliefern';\r\n xdsPositionausliefern.FieldName := 'ausliefern';\r\n xdsPositionBestellungErledigt.SetParentComponent(xdsPosition);\r\n xdsPositionBestellungErledigt.Name := 'xdsPositionBestellungErledigt';\r\n xdsPositionBestellungErledigt.FieldName := 'BestellungErledigt';\r\n xdsPositionLager.SetParentComponent(xdsPosition);\r\n xdsPositionLager.Name := 'xdsPositionLager';\r\n xdsPositionLager.FieldName := 'Lager';\r\n xdsPositionLager.Size := 50;\r\n xdsPositionbestellen.SetParentComponent(xdsPosition);\r\n xdsPositionbestellen.Name := 'xdsPositionbestellen';\r\n xdsPositionbestellen.FieldName := 'bestellen';\r\n xdsPositionWarenbestand.SetParentComponent(xdsPosition);\r\n xdsPositionWarenbestand.Name := 'xdsPositionWarenbestand';\r\n xdsPositionWarenbestand.FieldName := 'Warenbestand';\r\n xdsPositionArtikelbeschreibungRTF.SetParentComponent(xdsPosition);\r\n xdsPositionArtikelbeschreibungRTF.Name := 'xdsPositionArtikelbeschreibungRTF';\r\n xdsPositionArtikelbeschreibungRTF.FieldName := 'ArtikelbeschreibungRTF';\r\n xdsPositionArtikelbeschreibungRTF.Size := 255;\r\n xdsPositionQuellartikel.SetParentComponent(xdsPosition);\r\n xdsPositionQuellartikel.Name := 'xdsPositionQuellartikel';\r\n xdsPositionQuellartikel.FieldName := 'Quellartikel';\r\n xdsPositionQuellartikel.Size := 25;\r\n xdsPositionArtikelnummerWB.SetParentComponent(xdsPosition);\r\n xdsPositionArtikelnummerWB.Name := 'xdsPositionArtikelnummerWB';\r\n xdsPositionArtikelnummerWB.FieldName := 'ArtikelnummerWB';\r\n xdsPositionArtikelnummerWB.Size := 25;\r\n xdsPositionPreisanteilNetto.SetParentComponent(xdsPosition);\r\n xdsPositionPreisanteilNetto.Name := 'xdsPositionPreisanteilNetto';\r\n xdsPositionPreisanteilNetto.FieldName := 'PreisanteilNetto';\r\n xdsPositionSetHPos.SetParentComponent(xdsPosition);\r\n xdsPositionSetHPos.Name := 'xdsPositionSetHPos';\r\n xdsPositionSetHPos.FieldName := 'SetHPos';\r\n xdsPositionSetHPos.Size := 38;\r\n xdsPositionSetUPos.SetParentComponent(xdsPosition);\r\n xdsPositionSetUPos.Name := 'xdsPositionSetUPos';\r\n xdsPositionSetUPos.FieldName := 'SetUPos';\r\n xdsPositionSetUPos.Size := 38;\r\n xdsPositionProvisionssatz.SetParentComponent(xdsPosition);\r\n xdsPositionProvisionssatz.Name := 'xdsPositionProvisionssatz';\r\n xdsPositionProvisionssatz.FieldName := 'Provisionssatz';\r\n xdsPositionProvisionsbetrag.SetParentComponent(xdsPosition);\r\n xdsPositionProvisionsbetrag.Name := 'xdsPositionProvisionsbetrag';\r\n xdsPositionProvisionsbetrag.FieldName := 'Provisionsbetrag';\r\n xdsPositionArtikelsprache.SetParentComponent(xdsPosition);\r\n xdsPositionArtikelsprache.Name := 'xdsPositionArtikelsprache';\r\n xdsPositionArtikelsprache.FieldName := 'Artikelsprache';\r\n xdsPositionArtikelsprache.Size := 255;\r\n xdsPositionEKvom.SetParentComponent(xdsPosition);\r\n xdsPositionEKvom.Name := 'xdsPositionEKvom';\r\n xdsPositionEKvom.FieldName := 'EKvom';\r\n xdsPositionMengenberechnungID.SetParentComponent(xdsPosition);\r\n xdsPositionMengenberechnungID.Name := 'xdsPositionMengenberechnungID';\r\n xdsPositionMengenberechnungID.FieldName := 'MengenberechnungID';\r\n xdsPositionMengenberechnungID.Size := 38;\r\n xdsPositionTaraID.SetParentComponent(xdsPosition);\r\n xdsPositionTaraID.Name := 'xdsPositionTaraID';\r\n xdsPositionTaraID.FieldName := 'TaraID';\r\n xdsPositionTaraID.Size := 38;\r\n xdsPositionTara.SetParentComponent(xdsPosition);\r\n xdsPositionTara.Name := 'xdsPositionTara';\r\n xdsPositionTara.FieldName := 'Tara';\r\n xdsPositionBruttoGewicht.SetParentComponent(xdsPosition);\r\n xdsPositionBruttoGewicht.Name := 'xdsPositionBruttoGewicht';\r\n xdsPositionBruttoGewicht.FieldName := 'BruttoGewicht';\r\n xdsPositionAussenflaeche.SetParentComponent(xdsPosition);\r\n xdsPositionAussenflaeche.Name := 'xdsPositionAussenflaeche';\r\n xdsPositionAussenflaeche.FieldName := 'Aussenflaeche';\r\n xdsPositionLadeort.SetParentComponent(xdsPosition);\r\n xdsPositionLadeort.Name := 'xdsPositionLadeort';\r\n xdsPositionLadeort.FieldName := 'Ladeort';\r\n xdsPositionLadeort.Size := 50;\r\n xdsPositionSeitenumbruch.SetParentComponent(xdsPosition);\r\n xdsPositionSeitenumbruch.Name := 'xdsPositionSeitenumbruch';\r\n xdsPositionSeitenumbruch.FieldName := 'Seitenumbruch';\r\n xdsPositionPlanerFarbe.SetParentComponent(xdsPosition);\r\n xdsPositionPlanerFarbe.Name := 'xdsPositionPlanerFarbe';\r\n xdsPositionPlanerFarbe.FieldName := 'PlanerFarbe';\r\n xdsPositionMWStKey.SetParentComponent(xdsPosition);\r\n xdsPositionMWStKey.Name := 'xdsPositionMWStKey';\r\n xdsPositionMWStKey.FieldName := 'MWStKey';\r\n xdsPositionZSnachPos.SetParentComponent(xdsPosition);\r\n xdsPositionZSnachPos.Name := 'xdsPositionZSnachPos';\r\n xdsPositionZSnachPos.FieldName := 'ZSnachPos';\r\n xdsPositionLieferzeit.SetParentComponent(xdsPosition);\r\n xdsPositionLieferzeit.Name := 'xdsPositionLieferzeit';\r\n xdsPositionLieferzeit.FieldName := 'Lieferzeit';\r\n xdsPositionLieferzeit.Size := 50;\r\n xdsPositionPreisVorRabattWHG.SetParentComponent(xdsPosition);\r\n xdsPositionPreisVorRabattWHG.Name := 'xdsPositionPreisVorRabattWHG';\r\n xdsPositionPreisVorRabattWHG.FieldName := 'PreisVorRabattWHG';\r\n xdsPositionReferenzKalkulation.SetParentComponent(xdsPosition);\r\n xdsPositionReferenzKalkulation.Name := 'xdsPositionReferenzKalkulation';\r\n xdsPositionReferenzKalkulation.FieldName := 'ReferenzKalkulation';\r\n xdsPositionReferenzKalkulation.Size := 10;\r\n xdsPositionPKey.SetParentComponent(xdsPosition);\r\n xdsPositionPKey.Name := 'xdsPositionPKey';\r\n xdsPositionPKey.FieldName := 'PKey';\r\n xdsPositionAuftragsnummer.SetParentComponent(xdsPosition);\r\n xdsPositionAuftragsnummer.Name := 'xdsPositionAuftragsnummer';\r\n xdsPositionAuftragsnummer.FieldName := 'Auftragsnummer';\r\n xdsPositionlwbID.SetParentComponent(xdsPosition);\r\n xdsPositionlwbID.Name := 'xdsPositionlwbID';\r\n xdsPositionlwbID.FieldName := 'lwbID';\r\n xdsPositionlwbID.Size := 38;\r\n xdsPositionBelegdatum.SetParentComponent(xdsPosition);\r\n xdsPositionBelegdatum.Name := 'xdsPositionBelegdatum';\r\n xdsPositionBelegdatum.FieldName := 'Belegdatum';\r\n xdsPositionWarenkontrollnummern.SetParentComponent(xdsPosition);\r\n xdsPositionWarenkontrollnummern.Name := 'xdsPositionWarenkontrollnummern';\r\n xdsPositionWarenkontrollnummern.FieldName := 'Warenkontrollnummern';\r\n xdsPositionWarenkontrollnummern.Size := 255;\r\n xdsPositionVolumen.SetParentComponent(xdsPosition);\r\n xdsPositionVolumen.Name := 'xdsPositionVolumen';\r\n xdsPositionVolumen.FieldName := 'Volumen';\r\n xdsPositionPosVolumen.SetParentComponent(xdsPosition);\r\n xdsPositionPosVolumen.Name := 'xdsPositionPosVolumen';\r\n xdsPositionPosVolumen.FieldName := 'PosVolumen';\r\n xdsPositionArtikelAttribute.SetParentComponent(xdsPosition);\r\n xdsPositionArtikelAttribute.Name := 'xdsPositionArtikelAttribute';\r\n xdsPositionArtikelAttribute.FieldName := 'ArtikelAttribute';\r\n xdsPositionArtikelAttribute.Size := 255;\r\n xdsPositionNummerkomplett.SetParentComponent(xdsPosition);\r\n xdsPositionNummerkomplett.Name := 'xdsPositionNummerkomplett';\r\n xdsPositionNummerkomplett.FieldName := 'Nummerkomplett';\r\n sourcePosition.SetParentComponent(Self);\r\n sourcePosition.Name := 'sourcePosition';\r\n sourcePosition.DataSet := xdsPosition;\r\n SetEvent(sourcePosition, Self, 'OnStateChange', 'sourcePositionStateChange');\r\n sourcePosition.Left := 29;\r\n sourcePosition.Top := 101;\r\n dsArtikel.SetParentComponent(Self);\r\n dsArtikel.Name := 'dsArtikel';\r\n dsArtikel.AfterOpen := dsArtikelAfterOpen;\r\n dsArtikel.EntitySetName := 'Artikel';\r\n dsArtikel.Connection := DM2.XDataWebConnection1;\r\n dsArtikel.SubpropsDepth := 1;\r\n dsArtikel.QueryTop := 1;\r\n dsArtikel.Left := 156;\r\n dsArtikel.Top := 104;\r\n dsArtikelHersteller.SetParentComponent(dsArtikel);\r\n dsArtikelHersteller.Name := 'dsArtikelHersteller';\r\n dsArtikelHersteller.FieldName := 'Hersteller';\r\n dsArtikelHersteller.Required := True;\r\n dsArtikelArtderMenge.SetParentComponent(dsArtikel);\r\n dsArtikelArtderMenge.Name := 'dsArtikelArtderMenge';\r\n dsArtikelArtderMenge.FieldName := 'ArtderMenge';\r\n dsArtikelArtderMenge.Required := True;\r\n dsArtikelPfandArt.SetParentComponent(dsArtikel);\r\n dsArtikelPfandArt.Name := 'dsArtikelPfandArt';\r\n dsArtikelPfandArt.FieldName := 'PfandArt';\r\n dsArtikelWarengruppe.SetParentComponent(dsArtikel);\r\n dsArtikelWarengruppe.Name := 'dsArtikelWarengruppe';\r\n dsArtikelWarengruppe.FieldName := 'Warengruppe';\r\n dsArtikelWarenuntergruppe.SetParentComponent(dsArtikel);\r\n dsArtikelWarenuntergruppe.Name := 'dsArtikelWarenuntergruppe';\r\n dsArtikelWarenuntergruppe.FieldName := 'Warenuntergruppe';\r\n dsArtikelArtikelnummer.SetParentComponent(dsArtikel);\r\n dsArtikelArtikelnummer.Name := 'dsArtikelArtikelnummer';\r\n dsArtikelArtikelnummer.FieldName := 'Artikelnummer';\r\n dsArtikelArtikelnummer.Required := True;\r\n dsArtikelArtikelnummer.Size := 25;\r\n dsArtikelArtikelueberschrift.SetParentComponent(dsArtikel);\r\n dsArtikelArtikelueberschrift.Name := 'dsArtikelArtikelueberschrift';\r\n dsArtikelArtikelueberschrift.FieldName := 'Artikelueberschrift';\r\n dsArtikelArtikelueberschrift.Size := 50;\r\n dsArtikelArtikelbeschreibung.SetParentComponent(dsArtikel);\r\n dsArtikelArtikelbeschreibung.Name := 'dsArtikelArtikelbeschreibung';\r\n dsArtikelArtikelbeschreibung.FieldName := 'Artikelbeschreibung';\r\n dsArtikelArtikelbeschreibung.Size := 255;\r\n dsArtikelVerkaufspreis.SetParentComponent(dsArtikel);\r\n dsArtikelVerkaufspreis.Name := 'dsArtikelVerkaufspreis';\r\n dsArtikelVerkaufspreis.FieldName := 'Verkaufspreis';\r\n dsArtikelMindestbestand.SetParentComponent(dsArtikel);\r\n dsArtikelMindestbestand.Name := 'dsArtikelMindestbestand';\r\n dsArtikelMindestbestand.FieldName := 'Mindestbestand';\r\n dsArtikelPreisliste.SetParentComponent(dsArtikel);\r\n dsArtikelPreisliste.Name := 'dsArtikelPreisliste';\r\n dsArtikelPreisliste.FieldName := 'Preisliste';\r\n dsArtikelPreisliste.Size := 150;\r\n dsArtikelGewicht.SetParentComponent(dsArtikel);\r\n dsArtikelGewicht.Name := 'dsArtikelGewicht';\r\n dsArtikelGewicht.FieldName := 'Gewicht';\r\n dsArtikelLaenge.SetParentComponent(dsArtikel);\r\n dsArtikelLaenge.Name := 'dsArtikelLaenge';\r\n dsArtikelLaenge.FieldName := 'Laenge';\r\n dsArtikelBreite.SetParentComponent(dsArtikel);\r\n dsArtikelBreite.Name := 'dsArtikelBreite';\r\n dsArtikelBreite.FieldName := 'Breite';\r\n dsArtikelHoehe.SetParentComponent(dsArtikel);\r\n dsArtikelHoehe.Name := 'dsArtikelHoehe';\r\n dsArtikelHoehe.FieldName := 'Hoehe';\r\n dsArtikelArtikelZusatz.SetParentComponent(dsArtikel);\r\n dsArtikelArtikelZusatz.Name := 'dsArtikelArtikelZusatz';\r\n dsArtikelArtikelZusatz.FieldName := 'ArtikelZusatz';\r\n dsArtikelArtikelZusatz.Size := 255;\r\n dsArtikelLagerort.SetParentComponent(dsArtikel);\r\n dsArtikelLagerort.Name := 'dsArtikelLagerort';\r\n dsArtikelLagerort.FieldName := 'Lagerort';\r\n dsArtikelLagerort.Size := 50;\r\n dsArtikelBuchungskonto.SetParentComponent(dsArtikel);\r\n dsArtikelBuchungskonto.Name := 'dsArtikelBuchungskonto';\r\n dsArtikelBuchungskonto.FieldName := 'Buchungskonto';\r\n dsArtikelEingangMenge.SetParentComponent(dsArtikel);\r\n dsArtikelEingangMenge.Name := 'dsArtikelEingangMenge';\r\n dsArtikelEingangMenge.FieldName := 'EingangMenge';\r\n dsArtikelEingangEndpreis.SetParentComponent(dsArtikel);\r\n dsArtikelEingangEndpreis.Name := 'dsArtikelEingangEndpreis';\r\n dsArtikelEingangEndpreis.FieldName := 'EingangEndpreis';\r\n dsArtikelAusgangMenge.SetParentComponent(dsArtikel);\r\n dsArtikelAusgangMenge.Name := 'dsArtikelAusgangMenge';\r\n dsArtikelAusgangMenge.FieldName := 'AusgangMenge';\r\n dsArtikelAusgangEndpreisEK.SetParentComponent(dsArtikel);\r\n dsArtikelAusgangEndpreisEK.Name := 'dsArtikelAusgangEndpreisEK';\r\n dsArtikelAusgangEndpreisEK.FieldName := 'AusgangEndpreisEK';\r\n dsArtikelAusgangEndpreisVK.SetParentComponent(dsArtikel);\r\n dsArtikelAusgangEndpreisVK.Name := 'dsArtikelAusgangEndpreisVK';\r\n dsArtikelAusgangEndpreisVK.FieldName := 'AusgangEndpreisVK';\r\n dsArtikelBestand.SetParentComponent(dsArtikel);\r\n dsArtikelBestand.Name := 'dsArtikelBestand';\r\n dsArtikelBestand.FieldName := 'Bestand';\r\n dsArtikelBestandswert.SetParentComponent(dsArtikel);\r\n dsArtikelBestandswert.Name := 'dsArtikelBestandswert';\r\n dsArtikelBestandswert.FieldName := 'Bestandswert';\r\n dsArtikelMarge.SetParentComponent(dsArtikel);\r\n dsArtikelMarge.Name := 'dsArtikelMarge';\r\n dsArtikelMarge.FieldName := 'Marge';\r\n dsArtikelMargeProzent.SetParentComponent(dsArtikel);\r\n dsArtikelMargeProzent.Name := 'dsArtikelMargeProzent';\r\n dsArtikelMargeProzent.FieldName := 'MargeProzent';\r\n dsArtikelArtikelnummer2.SetParentComponent(dsArtikel);\r\n dsArtikelArtikelnummer2.Name := 'dsArtikelArtikelnummer2';\r\n dsArtikelArtikelnummer2.FieldName := 'Artikelnummer2';\r\n dsArtikelArtikelnummer2.Size := 25;\r\n dsArtikelArtikelmatchcode.SetParentComponent(dsArtikel);\r\n dsArtikelArtikelmatchcode.Name := 'dsArtikelArtikelmatchcode';\r\n dsArtikelArtikelmatchcode.FieldName := 'Artikelmatchcode';\r\n dsArtikelArtikelmatchcode.Size := 30;\r\n dsArtikelRabattpreis1.SetParentComponent(dsArtikel);\r\n dsArtikelRabattpreis1.Name := 'dsArtikelRabattpreis1';\r\n dsArtikelRabattpreis1.FieldName := 'Rabattpreis1';\r\n dsArtikelRabattpreis2.SetParentComponent(dsArtikel);\r\n dsArtikelRabattpreis2.Name := 'dsArtikelRabattpreis2';\r\n dsArtikelRabattpreis2.FieldName := 'Rabattpreis2';\r\n dsArtikelRabattpreis3.SetParentComponent(dsArtikel);\r\n dsArtikelRabattpreis3.Name := 'dsArtikelRabattpreis3';\r\n dsArtikelRabattpreis3.FieldName := 'Rabattpreis3';\r\n dsArtikelRabattpreis4.SetParentComponent(dsArtikel);\r\n dsArtikelRabattpreis4.Name := 'dsArtikelRabattpreis4';\r\n dsArtikelRabattpreis4.FieldName := 'Rabattpreis4';\r\n dsArtikelRabattpreis5.SetParentComponent(dsArtikel);\r\n dsArtikelRabattpreis5.Name := 'dsArtikelRabattpreis5';\r\n dsArtikelRabattpreis5.FieldName := 'Rabattpreis5';\r\n dsArtikelArtikelnichtmehrgueltig.SetParentComponent(dsArtikel);\r\n dsArtikelArtikelnichtmehrgueltig.Name := 'dsArtikelArtikelnichtmehrgueltig';\r\n dsArtikelArtikelnichtmehrgueltig.FieldName := 'Artikelnichtmehrgueltig';\r\n dsArtikelEinkaufspreis.SetParentComponent(dsArtikel);\r\n dsArtikelEinkaufspreis.Name := 'dsArtikelEinkaufspreis';\r\n dsArtikelEinkaufspreis.FieldName := 'Einkaufspreis';\r\n dsArtikelAufschlag.SetParentComponent(dsArtikel);\r\n dsArtikelAufschlag.Name := 'dsArtikelAufschlag';\r\n dsArtikelAufschlag.FieldName := 'Aufschlag';\r\n dsArtikelWarenbestand.SetParentComponent(dsArtikel);\r\n dsArtikelWarenbestand.Name := 'dsArtikelWarenbestand';\r\n dsArtikelWarenbestand.FieldName := 'Warenbestand';\r\n dsArtikelTextfrei10.SetParentComponent(dsArtikel);\r\n dsArtikelTextfrei10.Name := 'dsArtikelTextfrei10';\r\n dsArtikelTextfrei10.FieldName := 'Textfrei10';\r\n dsArtikelTextfrei10.Size := 50;\r\n dsArtikelTextfrei20.SetParentComponent(dsArtikel);\r\n dsArtikelTextfrei20.Name := 'dsArtikelTextfrei20';\r\n dsArtikelTextfrei20.FieldName := 'Textfrei20';\r\n dsArtikelTextfrei20.Size := 50;\r\n dsArtikelArtikelbeschreibungRTF.SetParentComponent(dsArtikel);\r\n dsArtikelArtikelbeschreibungRTF.Name := 'dsArtikelArtikelbeschreibungRTF';\r\n dsArtikelArtikelbeschreibungRTF.FieldName := 'ArtikelbeschreibungRTF';\r\n dsArtikelArtikelbeschreibungRTF.Size := 255;\r\n dsArtikelArtikeldatei1.SetParentComponent(dsArtikel);\r\n dsArtikelArtikeldatei1.Name := 'dsArtikelArtikeldatei1';\r\n dsArtikelArtikeldatei1.FieldName := 'Artikeldatei1';\r\n dsArtikelArtikeldatei1.Size := 255;\r\n dsArtikelArtikeldatei2.SetParentComponent(dsArtikel);\r\n dsArtikelArtikeldatei2.Name := 'dsArtikelArtikeldatei2';\r\n dsArtikelArtikeldatei2.FieldName := 'Artikeldatei2';\r\n dsArtikelArtikeldatei2.Size := 255;\r\n dsArtikelArtikeldatei3.SetParentComponent(dsArtikel);\r\n dsArtikelArtikeldatei3.Name := 'dsArtikelArtikeldatei3';\r\n dsArtikelArtikeldatei3.FieldName := 'Artikeldatei3';\r\n dsArtikelArtikeldatei3.Size := 255;\r\n dsArtikelArtikeldatei4.SetParentComponent(dsArtikel);\r\n dsArtikelArtikeldatei4.Name := 'dsArtikelArtikeldatei4';\r\n dsArtikelArtikeldatei4.FieldName := 'Artikeldatei4';\r\n dsArtikelArtikeldatei4.Size := 255;\r\n dsArtikelArtikeldatei5.SetParentComponent(dsArtikel);\r\n dsArtikelArtikeldatei5.Name := 'dsArtikelArtikeldatei5';\r\n dsArtikelArtikeldatei5.FieldName := 'Artikeldatei5';\r\n dsArtikelArtikeldatei5.Size := 255;\r\n dsArtikelEinkaufspreisVom.SetParentComponent(dsArtikel);\r\n dsArtikelEinkaufspreisVom.Name := 'dsArtikelEinkaufspreisVom';\r\n dsArtikelEinkaufspreisVom.FieldName := 'EinkaufspreisVom';\r\n dsArtikelEAN.SetParentComponent(dsArtikel);\r\n dsArtikelEAN.Name := 'dsArtikelEAN';\r\n dsArtikelEAN.FieldName := 'EAN';\r\n dsArtikelEAN.Size := 15;\r\n dsArtikelVGPFaktor.SetParentComponent(dsArtikel);\r\n dsArtikelVGPFaktor.Name := 'dsArtikelVGPFaktor';\r\n dsArtikelVGPFaktor.FieldName := 'VGPFaktor';\r\n dsArtikelVGPMengenart.SetParentComponent(dsArtikel);\r\n dsArtikelVGPMengenart.Name := 'dsArtikelVGPMengenart';\r\n dsArtikelVGPMengenart.FieldName := 'VGPMengenart';\r\n dsArtikelVGPMengenart.Size := 50;\r\n dsArtikelVerleihpreis.SetParentComponent(dsArtikel);\r\n dsArtikelVerleihpreis.Name := 'dsArtikelVerleihpreis';\r\n dsArtikelVerleihpreis.FieldName := 'Verleihpreis';\r\n dsArtikelZusatzPreis.SetParentComponent(dsArtikel);\r\n dsArtikelZusatzPreis.Name := 'dsArtikelZusatzPreis';\r\n dsArtikelZusatzPreis.FieldName := 'ZusatzPreis';\r\n dsArtikelVerpackungsart.SetParentComponent(dsArtikel);\r\n dsArtikelVerpackungsart.Name := 'dsArtikelVerpackungsart';\r\n dsArtikelVerpackungsart.FieldName := 'Verpackungsart';\r\n dsArtikelVerpackungsart.Size := 50;\r\n dsArtikelVerpackungsMenge.SetParentComponent(dsArtikel);\r\n dsArtikelVerpackungsMenge.Name := 'dsArtikelVerpackungsMenge';\r\n dsArtikelVerpackungsMenge.FieldName := 'VerpackungsMenge';\r\n dsArtikelQuellartikel.SetParentComponent(dsArtikel);\r\n dsArtikelQuellartikel.Name := 'dsArtikelQuellartikel';\r\n dsArtikelQuellartikel.FieldName := 'Quellartikel';\r\n dsArtikelQuellartikel.Size := 25;\r\n dsArtikelrabattierfaehig.SetParentComponent(dsArtikel);\r\n dsArtikelrabattierfaehig.Name := 'dsArtikelrabattierfaehig';\r\n dsArtikelrabattierfaehig.FieldName := 'rabattierfaehig';\r\n dsArtikelAngebotAlternativeAN.SetParentComponent(dsArtikel);\r\n dsArtikelAngebotAlternativeAN.Name := 'dsArtikelAngebotAlternativeAN';\r\n dsArtikelAngebotAlternativeAN.FieldName := 'AngebotAlternativeAN';\r\n dsArtikelAngebotAlternativeAN.Size := 25;\r\n dsArtikelPreisanteilNetto.SetParentComponent(dsArtikel);\r\n dsArtikelPreisanteilNetto.Name := 'dsArtikelPreisanteilNetto';\r\n dsArtikelPreisanteilNetto.FieldName := 'PreisanteilNetto';\r\n dsArtikelFarbe.SetParentComponent(dsArtikel);\r\n dsArtikelFarbe.Name := 'dsArtikelFarbe';\r\n dsArtikelFarbe.FieldName := 'Farbe';\r\n dsArtikelAEinkauf.SetParentComponent(dsArtikel);\r\n dsArtikelAEinkauf.Name := 'dsArtikelAEinkauf';\r\n dsArtikelAEinkauf.FieldName := 'AEinkauf';\r\n dsArtikelAVerkauf.SetParentComponent(dsArtikel);\r\n dsArtikelAVerkauf.Name := 'dsArtikelAVerkauf';\r\n dsArtikelAVerkauf.FieldName := 'AVerkauf';\r\n dsArtikelArtikelnummerLieferant.SetParentComponent(dsArtikel);\r\n dsArtikelArtikelnummerLieferant.Name := 'dsArtikelArtikelnummerLieferant';\r\n dsArtikelArtikelnummerLieferant.FieldName := 'ArtikelnummerLieferant';\r\n dsArtikelLieferantnummer.SetParentComponent(dsArtikel);\r\n dsArtikelLieferantnummer.Name := 'dsArtikelLieferantnummer';\r\n dsArtikelLieferantnummer.FieldName := 'Lieferantnummer';\r\n dsArtikelLieferantnummer.Size := 13;\r\n dsArtikelVerkaufspreisBrutto.SetParentComponent(dsArtikel);\r\n dsArtikelVerkaufspreisBrutto.Name := 'dsArtikelVerkaufspreisBrutto';\r\n dsArtikelVerkaufspreisBrutto.FieldName := 'VerkaufspreisBrutto';\r\n dsArtikelArtikelSet.SetParentComponent(dsArtikel);\r\n dsArtikelArtikelSet.Name := 'dsArtikelArtikelSet';\r\n dsArtikelArtikelSet.FieldName := 'ArtikelSet';\r\n dsArtikelProvisionssatz.SetParentComponent(dsArtikel);\r\n dsArtikelProvisionssatz.Name := 'dsArtikelProvisionssatz';\r\n dsArtikelProvisionssatz.FieldName := 'Provisionssatz';\r\n dsArtikelWarentarifnummer.SetParentComponent(dsArtikel);\r\n dsArtikelWarentarifnummer.Name := 'dsArtikelWarentarifnummer';\r\n dsArtikelWarentarifnummer.FieldName := 'Warentarifnummer';\r\n dsArtikelHandelsartikel.SetParentComponent(dsArtikel);\r\n dsArtikelHandelsartikel.Name := 'dsArtikelHandelsartikel';\r\n dsArtikelHandelsartikel.FieldName := 'Handelsartikel';\r\n dsArtikelUrsprungsland.SetParentComponent(dsArtikel);\r\n dsArtikelUrsprungsland.Name := 'dsArtikelUrsprungsland';\r\n dsArtikelUrsprungsland.FieldName := 'Ursprungsland';\r\n dsArtikelUrsprungsland.Size := 5;\r\n dsArtikelKategorie.SetParentComponent(dsArtikel);\r\n dsArtikelKategorie.Name := 'dsArtikelKategorie';\r\n dsArtikelKategorie.FieldName := 'Kategorie';\r\n dsArtikelKategorie.Size := 25;\r\n dsArtikelStandardRabattsatzEK.SetParentComponent(dsArtikel);\r\n dsArtikelStandardRabattsatzEK.Name := 'dsArtikelStandardRabattsatzEK';\r\n dsArtikelStandardRabattsatzEK.FieldName := 'StandardRabattsatzEK';\r\n dsArtikelStandardRabattsatzVK.SetParentComponent(dsArtikel);\r\n dsArtikelStandardRabattsatzVK.Name := 'dsArtikelStandardRabattsatzVK';\r\n dsArtikelStandardRabattsatzVK.FieldName := 'StandardRabattsatzVK';\r\n dsArtikelRabattpreiseManuell.SetParentComponent(dsArtikel);\r\n dsArtikelRabattpreiseManuell.Name := 'dsArtikelRabattpreiseManuell';\r\n dsArtikelRabattpreiseManuell.FieldName := 'RabattpreiseManuell';\r\n dsArtikelMengeBestellt.SetParentComponent(dsArtikel);\r\n dsArtikelMengeBestellt.Name := 'dsArtikelMengeBestellt';\r\n dsArtikelMengeBestellt.FieldName := 'MengeBestellt';\r\n dsArtikelMengeBeauftragt.SetParentComponent(dsArtikel);\r\n dsArtikelMengeBeauftragt.Name := 'dsArtikelMengeBeauftragt';\r\n dsArtikelMengeBeauftragt.FieldName := 'MengeBeauftragt';\r\n dsArtikelBestandDisponiert.SetParentComponent(dsArtikel);\r\n dsArtikelBestandDisponiert.Name := 'dsArtikelBestandDisponiert';\r\n dsArtikelBestandDisponiert.FieldName := 'BestandDisponiert';\r\n dsArtikelMengeAngeboten.SetParentComponent(dsArtikel);\r\n dsArtikelMengeAngeboten.Name := 'dsArtikelMengeAngeboten';\r\n dsArtikelMengeAngeboten.FieldName := 'MengeAngeboten';\r\n dsArtikelBestandDispInclAngebot.SetParentComponent(dsArtikel);\r\n dsArtikelBestandDispInclAngebot.Name := 'dsArtikelBestandDispInclAngebot';\r\n dsArtikelBestandDispInclAngebot.FieldName := 'BestandDispInclAngebot';\r\n dsArtikelMWStKey.SetParentComponent(dsArtikel);\r\n dsArtikelMWStKey.Name := 'dsArtikelMWStKey';\r\n dsArtikelMWStKey.FieldName := 'MWStKey';\r\n dsArtikelShopAmazon.SetParentComponent(dsArtikel);\r\n dsArtikelShopAmazon.Name := 'dsArtikelShopAmazon';\r\n dsArtikelShopAmazon.FieldName := 'ShopAmazon';\r\n dsArtikelShopQuelle.SetParentComponent(dsArtikel);\r\n dsArtikelShopQuelle.Name := 'dsArtikelShopQuelle';\r\n dsArtikelShopQuelle.FieldName := 'ShopQuelle';\r\n dsArtikelGeraet.SetParentComponent(dsArtikel);\r\n dsArtikelGeraet.Name := 'dsArtikelGeraet';\r\n dsArtikelGeraet.FieldName := 'Geraet';\r\n dsArtikelArtgewicht.SetParentComponent(dsArtikel);\r\n dsArtikelArtgewicht.Name := 'dsArtikelArtgewicht';\r\n dsArtikelArtgewicht.FieldName := 'Artgewicht';\r\n dsArtikelVolumen.SetParentComponent(dsArtikel);\r\n dsArtikelVolumen.Name := 'dsArtikelVolumen';\r\n dsArtikelVolumen.FieldName := 'Volumen';\r\n dsArtikelPacklisteNichtAnzeigen.SetParentComponent(dsArtikel);\r\n dsArtikelPacklisteNichtAnzeigen.Name := 'dsArtikelPacklisteNichtAnzeigen';\r\n dsArtikelPacklisteNichtAnzeigen.FieldName := 'PacklisteNichtAnzeigen';\r\n dsArtikelKeineAufschlagskalkulation.SetParentComponent(dsArtikel);\r\n dsArtikelKeineAufschlagskalkulation.Name := 'dsArtikelKeineAufschlagskalkulation';\r\n dsArtikelKeineAufschlagskalkulation.FieldName := 'KeineAufschlagskalkulation';\r\n dsArtikelKorrekturMenge.SetParentComponent(dsArtikel);\r\n dsArtikelKorrekturMenge.Name := 'dsArtikelKorrekturMenge';\r\n dsArtikelKorrekturMenge.FieldName := 'KorrekturMenge';\r\n dsArtikelKorrekturWert.SetParentComponent(dsArtikel);\r\n dsArtikelKorrekturWert.Name := 'dsArtikelKorrekturWert';\r\n dsArtikelKorrekturWert.FieldName := 'KorrekturWert';\r\n dsArtikelNachfolgeartikel.SetParentComponent(dsArtikel);\r\n dsArtikelNachfolgeartikel.Name := 'dsArtikelNachfolgeartikel';\r\n dsArtikelNachfolgeartikel.FieldName := 'Nachfolgeartikel';\r\n dsArtikelNachfolgeartikel.Size := 25;\r\n dsArtikelMindestbestellmenge.SetParentComponent(dsArtikel);\r\n dsArtikelMindestbestellmenge.Name := 'dsArtikelMindestbestellmenge';\r\n dsArtikelMindestbestellmenge.FieldName := 'Mindestbestellmenge';\r\n dsArtikelSchnittEK.SetParentComponent(dsArtikel);\r\n dsArtikelSchnittEK.Name := 'dsArtikelSchnittEK';\r\n dsArtikelSchnittEK.FieldName := 'SchnittEK';\r\n dsArtikelVerkaufspreisVom.SetParentComponent(dsArtikel);\r\n dsArtikelVerkaufspreisVom.Name := 'dsArtikelVerkaufspreisVom';\r\n dsArtikelVerkaufspreisVom.FieldName := 'VerkaufspreisVom';\r\n dsArtikelPruefungChargeSNR.SetParentComponent(dsArtikel);\r\n dsArtikelPruefungChargeSNR.Name := 'dsArtikelPruefungChargeSNR';\r\n dsArtikelPruefungChargeSNR.FieldName := 'PruefungChargeSNR';\r\n dsArtikelArtikelbeschreibungHTML.SetParentComponent(dsArtikel);\r\n dsArtikelArtikelbeschreibungHTML.Name := 'dsArtikelArtikelbeschreibungHTML';\r\n dsArtikelArtikelbeschreibungHTML.FieldName := 'ArtikelbeschreibungHTML';\r\n dsArtikelArtikelbeschreibungHTML.Size := 255;\r\n dsArtikelProduktKurzbeschreibungHTML.SetParentComponent(dsArtikel);\r\n dsArtikelProduktKurzbeschreibungHTML.Name := 'dsArtikelProduktKurzbeschreibungHTML';\r\n dsArtikelProduktKurzbeschreibungHTML.FieldName := 'ProduktKurzbeschreibungHTML';\r\n dsArtikelProduktKurzbeschreibungHTML.Size := 255;\r\n dsArtikelStatusFuerShop.SetParentComponent(dsArtikel);\r\n dsArtikelStatusFuerShop.Name := 'dsArtikelStatusFuerShop';\r\n dsArtikelStatusFuerShop.FieldName := 'StatusFuerShop';\r\n dsArtikelStatusFuerShop.Size := 25;\r\n dsArtikelAmpelFuerShop.SetParentComponent(dsArtikel);\r\n dsArtikelAmpelFuerShop.Name := 'dsArtikelAmpelFuerShop';\r\n dsArtikelAmpelFuerShop.FieldName := 'AmpelFuerShop';\r\n dsArtikelAmpelFuerShop.Size := 25;\r\n dsArtikelEXP_Anzahl.SetParentComponent(dsArtikel);\r\n dsArtikelEXP_Anzahl.Name := 'dsArtikelEXP_Anzahl';\r\n dsArtikelEXP_Anzahl.FieldName := 'EXP_Anzahl';\r\n dsArtikelEXP_Inhalt.SetParentComponent(dsArtikel);\r\n dsArtikelEXP_Inhalt.Name := 'dsArtikelEXP_Inhalt';\r\n dsArtikelEXP_Inhalt.FieldName := 'EXP_Inhalt';\r\n dsArtikelEXP_Faktor.SetParentComponent(dsArtikel);\r\n dsArtikelEXP_Faktor.Name := 'dsArtikelEXP_Faktor';\r\n dsArtikelEXP_Faktor.FieldName := 'EXP_Faktor';\r\n dsArtikelFach.SetParentComponent(dsArtikel);\r\n dsArtikelFach.Name := 'dsArtikelFach';\r\n dsArtikelFach.FieldName := 'Fach';\r\n dsArtikelExportKasse.SetParentComponent(dsArtikel);\r\n dsArtikelExportKasse.Name := 'dsArtikelExportKasse';\r\n dsArtikelExportKasse.FieldName := 'ExportKasse';\r\n dsArtikelWKNR.SetParentComponent(dsArtikel);\r\n dsArtikelWKNR.Name := 'dsArtikelWKNR';\r\n dsArtikelWKNR.FieldName := 'WKNR';\r\n dsArtikelArtikelAttribute.SetParentComponent(dsArtikel);\r\n dsArtikelArtikelAttribute.Name := 'dsArtikelArtikelAttribute';\r\n dsArtikelArtikelAttribute.FieldName := 'ArtikelAttribute';\r\n dsArtikelArtikelAttribute.Size := 255;\r\n dsArtikelErstelltAm.SetParentComponent(dsArtikel);\r\n dsArtikelErstelltAm.Name := 'dsArtikelErstelltAm';\r\n dsArtikelErstelltAm.FieldName := 'ErstelltAm';\r\n dsArtikelVarianteVonAN.SetParentComponent(dsArtikel);\r\n dsArtikelVarianteVonAN.Name := 'dsArtikelVarianteVonAN';\r\n dsArtikelVarianteVonAN.FieldName := 'VarianteVonAN';\r\n dsArtikelVarianteVonAN.Size := 25;\r\n dsArtikelGurtmassWerte.SetParentComponent(dsArtikel);\r\n dsArtikelGurtmassWerte.Name := 'dsArtikelGurtmassWerte';\r\n dsArtikelGurtmassWerte.FieldName := 'GurtmassWerte';\r\n dsArtikelGurtmassWerte.Size := 250;\r\n dsArtikelGurtmass.SetParentComponent(dsArtikel);\r\n dsArtikelGurtmass.Name := 'dsArtikelGurtmass';\r\n dsArtikelGurtmass.FieldName := 'Gurtmass';\r\n dsArtikelAltersgrenze.SetParentComponent(dsArtikel);\r\n dsArtikelAltersgrenze.Name := 'dsArtikelAltersgrenze';\r\n dsArtikelAltersgrenze.FieldName := 'Altersgrenze';\r\n dsArtikelMWStKeyImHaus.SetParentComponent(dsArtikel);\r\n dsArtikelMWStKeyImHaus.Name := 'dsArtikelMWStKeyImHaus';\r\n dsArtikelMWStKeyImHaus.FieldName := 'MWStKeyImHaus';\r\n dsArtikelKasseBewegung.SetParentComponent(dsArtikel);\r\n dsArtikelKasseBewegung.Name := 'dsArtikelKasseBewegung';\r\n dsArtikelKasseBewegung.FieldName := 'KasseBewegung';\r\n dsArtikelKasseBewegungEK.SetParentComponent(dsArtikel);\r\n dsArtikelKasseBewegungEK.Name := 'dsArtikelKasseBewegungEK';\r\n dsArtikelKasseBewegungEK.FieldName := 'KasseBewegungEK';\r\n dsArtikelKasseBewegungVK.SetParentComponent(dsArtikel);\r\n dsArtikelKasseBewegungVK.Name := 'dsArtikelKasseBewegungVK';\r\n dsArtikelKasseBewegungVK.FieldName := 'KasseBewegungVK';\r\n dsArtikelProduktionBewegung.SetParentComponent(dsArtikel);\r\n dsArtikelProduktionBewegung.Name := 'dsArtikelProduktionBewegung';\r\n dsArtikelProduktionBewegung.FieldName := 'ProduktionBewegung';\r\n dsArtikelProduktionBewegungEK.SetParentComponent(dsArtikel);\r\n dsArtikelProduktionBewegungEK.Name := 'dsArtikelProduktionBewegungEK';\r\n dsArtikelProduktionBewegungEK.FieldName := 'ProduktionBewegungEK';\r\n dsArtikelProduktionBewegungVK.SetParentComponent(dsArtikel);\r\n dsArtikelProduktionBewegungVK.Name := 'dsArtikelProduktionBewegungVK';\r\n dsArtikelProduktionBewegungVK.FieldName := 'ProduktionBewegungVK';\r\n dsArtikelWaWiAB.SetParentComponent(dsArtikel);\r\n dsArtikelWaWiAB.Name := 'dsArtikelWaWiAB';\r\n dsArtikelWaWiAB.FieldName := 'WaWiAB';\r\n dsArtikelGeaendertAm.SetParentComponent(dsArtikel);\r\n dsArtikelGeaendertAm.Name := 'dsArtikelGeaendertAm';\r\n dsArtikelGeaendertAm.FieldName := 'GeaendertAm';\r\n dsArtikelGefahrgutKennzeichen.SetParentComponent(dsArtikel);\r\n dsArtikelGefahrgutKennzeichen.Name := 'dsArtikelGefahrgutKennzeichen';\r\n dsArtikelGefahrgutKennzeichen.FieldName := 'GefahrgutKennzeichen';\r\n dsArtikelGefahrgutKennzeichen.Size := 50;\r\n dsArtikelVerpackG.SetParentComponent(dsArtikel);\r\n dsArtikelVerpackG.Name := 'dsArtikelVerpackG';\r\n dsArtikelVerpackG.FieldName := 'VerpackG';\r\n dsArtikelUPE.SetParentComponent(dsArtikel);\r\n dsArtikelUPE.Name := 'dsArtikelUPE';\r\n dsArtikelUPE.FieldName := 'UPE';\r\n dsArtikelArtikelbeschreibungEinkauf.SetParentComponent(dsArtikel);\r\n dsArtikelArtikelbeschreibungEinkauf.Name := 'dsArtikelArtikelbeschreibungEinkauf';\r\n dsArtikelArtikelbeschreibungEinkauf.FieldName := 'ArtikelbeschreibungEinkauf';\r\n dsArtikelArtikelbeschreibungEinkauf.Size := 255;\r\n dsArtikelHerstellerArtikelnummer.SetParentComponent(dsArtikel);\r\n dsArtikelHerstellerArtikelnummer.Name := 'dsArtikelHerstellerArtikelnummer';\r\n dsArtikelHerstellerArtikelnummer.FieldName := 'HerstellerArtikelnummer';\r\n dsArtikelHerstellerArtikelnummer.Size := 25;\r\n dsArtikelNatura.SetParentComponent(dsArtikel);\r\n dsArtikelNatura.Name := 'dsArtikelNatura';\r\n dsArtikelNatura.FieldName := 'Natura';\r\n dsArtikelNatura.Size := 2;\r\n dsArtikelArbeitszeit.SetParentComponent(dsArtikel);\r\n dsArtikelArbeitszeit.Name := 'dsArtikelArbeitszeit';\r\n dsArtikelArbeitszeit.FieldName := 'Arbeitszeit';\r\n dsArtikelArtderMengeArtderMenge.SetParentComponent(dsArtikel);\r\n dsArtikelArtderMengeArtderMenge.Name := 'dsArtikelArtderMengeArtderMenge';\r\n dsArtikelArtderMengeArtderMenge.FieldName := 'ArtderMenge.ArtderMenge';\r\n dsArtikelArtderMengeArtderMenge.Size := 50;\r\n xdsKundenpreise.SetParentComponent(Self);\r\n xdsKundenpreise.Name := 'xdsKundenpreise';\r\n xdsKundenpreise.AfterOpen := xdsKundenpreiseAfterOpen;\r\n xdsKundenpreise.EntitySetName := 'ArtikelKundenpreise';\r\n xdsKundenpreise.Connection := DM2.XDataWebConnection1;\r\n xdsKundenpreise.SubpropsDepth := 1;\r\n xdsKundenpreise.QueryString := '$expand=Artikelnummer';\r\n xdsKundenpreise.ServerRecordCountMode := smInlineCount;\r\n xdsKundenpreise.Left := 151;\r\n xdsKundenpreise.Top := 174;\r\n xdsKundenpreiseArtikelnummer.SetParentComponent(xdsKundenpreise);\r\n xdsKundenpreiseArtikelnummer.Name := 'xdsKundenpreiseArtikelnummer';\r\n xdsKundenpreiseArtikelnummer.FieldName := 'Artikelnummer';\r\n xdsKundenpreiseArtikelnummer.Required := True;\r\n xdsKundenpreiseKundennummer.SetParentComponent(xdsKundenpreise);\r\n xdsKundenpreiseKundennummer.Name := 'xdsKundenpreiseKundennummer';\r\n xdsKundenpreiseKundennummer.FieldName := 'Kundennummer';\r\n xdsKundenpreiseKundennummer.Required := True;\r\n xdsKundenpreiseVerkaufspreis.SetParentComponent(xdsKundenpreise);\r\n xdsKundenpreiseVerkaufspreis.Name := 'xdsKundenpreiseVerkaufspreis';\r\n xdsKundenpreiseVerkaufspreis.FieldName := 'Verkaufspreis';\r\n xdsKundenpreiseNachname.SetParentComponent(xdsKundenpreise);\r\n xdsKundenpreiseNachname.Name := 'xdsKundenpreiseNachname';\r\n xdsKundenpreiseNachname.FieldName := 'Nachname';\r\n xdsKundenpreiseNachname.Size := 40;\r\n xdsKundenpreiseRabattsatz.SetParentComponent(xdsKundenpreise);\r\n xdsKundenpreiseRabattsatz.Name := 'xdsKundenpreiseRabattsatz';\r\n xdsKundenpreiseRabattsatz.FieldName := 'Rabattsatz';\r\n xdsKundenpreiseVerleihpreis.SetParentComponent(xdsKundenpreise);\r\n xdsKundenpreiseVerleihpreis.Name := 'xdsKundenpreiseVerleihpreis';\r\n xdsKundenpreiseVerleihpreis.FieldName := 'Verleihpreis';\r\n xdsKundenpreiseZusatzPreis.SetParentComponent(xdsKundenpreise);\r\n xdsKundenpreiseZusatzPreis.Name := 'xdsKundenpreiseZusatzPreis';\r\n xdsKundenpreiseZusatzPreis.FieldName := 'ZusatzPreis';\r\n xdsKundenpreiseArtikelnummerKunde.SetParentComponent(xdsKundenpreise);\r\n xdsKundenpreiseArtikelnummerKunde.Name := 'xdsKundenpreiseArtikelnummerKunde';\r\n xdsKundenpreiseArtikelnummerKunde.FieldName := 'ArtikelnummerKunde';\r\n xdsKundenpreiseArtikelnummerKunde.Size := 25;\r\n xdsKundenpreiseDatumGeaendert.SetParentComponent(xdsKundenpreise);\r\n xdsKundenpreiseDatumGeaendert.Name := 'xdsKundenpreiseDatumGeaendert';\r\n xdsKundenpreiseDatumGeaendert.FieldName := 'DatumGeaendert';\r\n xdsKundenpreiseArtikelueberschrift.SetParentComponent(xdsKundenpreise);\r\n xdsKundenpreiseArtikelueberschrift.Name := 'xdsKundenpreiseArtikelueberschrift';\r\n xdsKundenpreiseArtikelueberschrift.FieldName := 'Artikelueberschrift';\r\n xdsKundenpreiseArtikelueberschrift.Size := 50;\r\n xdsKundenpreiseArtikelnummerArtikelnummer.SetParentComponent(xdsKundenpreise);\r\n xdsKundenpreiseArtikelnummerArtikelnummer.Name := 'xdsKundenpreiseArtikelnummerArtikelnummer';\r\n xdsKundenpreiseArtikelnummerArtikelnummer.FieldName := 'Artikelnummer.Artikelnummer';\r\n xdsKundenpreiseArtikelnummerArtikelnummer.Size := 25;\r\n xdsKundenpreiseArtikelnummerArtikelueberschrift.SetParentComponent(xdsKundenpreise);\r\n xdsKundenpreiseArtikelnummerArtikelueberschrift.Name := 'xdsKundenpreiseArtikelnummerArtikelueberschrift';\r\n xdsKundenpreiseArtikelnummerArtikelueberschrift.FieldName := 'Artikelnummer.Artikelueberschrift';\r\n xdsKundenpreiseArtikelnummerArtikelueberschrift.Size := 50;\r\n xdsKundenpreiseArtikelnummerArtikelbeschreibung.SetParentComponent(xdsKundenpreise);\r\n xdsKundenpreiseArtikelnummerArtikelbeschreibung.Name := 'xdsKundenpreiseArtikelnummerArtikelbeschreibung';\r\n xdsKundenpreiseArtikelnummerArtikelbeschreibung.FieldName := 'Artikelnummer.Artikelbeschreibung';\r\n xdsKundenpreiseArtikelnummerArtikelbeschreibung.Size := 255;\r\n dsBeleg2.SetParentComponent(Self);\r\n dsBeleg2.Name := 'dsBeleg2';\r\n dsBeleg2.AfterOpen := dsBeleg2AfterOpen;\r\n dsBeleg2.EntitySetName := 'Auftrag';\r\n dsBeleg2.Connection := DM2.XDataWebConnection1;\r\n dsBeleg2.SubpropsDepth := 1;\r\n dsBeleg2.QueryString := '$expand=Kundennummer';\r\n dsBeleg2.Left := 152;\r\n dsBeleg2.Top := 240;\r\n dsBeleg2Kundennummer.SetParentComponent(dsBeleg2);\r\n dsBeleg2Kundennummer.Name := 'dsBeleg2Kundennummer';\r\n dsBeleg2Kundennummer.FieldName := 'Kundennummer';\r\n dsBeleg2Kundennummer.Required := True;\r\n dsBeleg2Nummerkomplett.SetParentComponent(dsBeleg2);\r\n dsBeleg2Nummerkomplett.Name := 'dsBeleg2Nummerkomplett';\r\n dsBeleg2Nummerkomplett.FieldName := 'Nummerkomplett';\r\n dsBeleg2Nummerkomplett.Required := True;\r\n dsBeleg2Nummerkomplett.Size := 10;\r\n dsBeleg2ReferenzAngebot.SetParentComponent(dsBeleg2);\r\n dsBeleg2ReferenzAngebot.Name := 'dsBeleg2ReferenzAngebot';\r\n dsBeleg2ReferenzAngebot.FieldName := 'ReferenzAngebot';\r\n dsBeleg2ReferenzAngebot.Size := 10;\r\n dsBeleg2ReferenzLieferschein.SetParentComponent(dsBeleg2);\r\n dsBeleg2ReferenzLieferschein.Name := 'dsBeleg2ReferenzLieferschein';\r\n dsBeleg2ReferenzLieferschein.FieldName := 'ReferenzLieferschein';\r\n dsBeleg2ReferenzLieferschein.Size := 10;\r\n dsBeleg2ReferenzRechnung.SetParentComponent(dsBeleg2);\r\n dsBeleg2ReferenzRechnung.Name := 'dsBeleg2ReferenzRechnung';\r\n dsBeleg2ReferenzRechnung.FieldName := 'ReferenzRechnung';\r\n dsBeleg2ReferenzRechnung.Size := 10;\r\n dsBeleg2Datum.SetParentComponent(dsBeleg2);\r\n dsBeleg2Datum.Name := 'dsBeleg2Datum';\r\n dsBeleg2Datum.FieldName := 'Datum';\r\n dsBeleg2Datum.Required := True;\r\n dsBeleg2Jahr.SetParentComponent(dsBeleg2);\r\n dsBeleg2Jahr.Name := 'dsBeleg2Jahr';\r\n dsBeleg2Jahr.FieldName := 'Jahr';\r\n dsBeleg2Kalenderwoche.SetParentComponent(dsBeleg2);\r\n dsBeleg2Kalenderwoche.Name := 'dsBeleg2Kalenderwoche';\r\n dsBeleg2Kalenderwoche.FieldName := 'Kalenderwoche';\r\n dsBeleg2Nachname.SetParentComponent(dsBeleg2);\r\n dsBeleg2Nachname.Name := 'dsBeleg2Nachname';\r\n dsBeleg2Nachname.FieldName := 'Nachname';\r\n dsBeleg2Nachname.Size := 50;\r\n dsBeleg2Vorname.SetParentComponent(dsBeleg2);\r\n dsBeleg2Vorname.Name := 'dsBeleg2Vorname';\r\n dsBeleg2Vorname.FieldName := 'Vorname';\r\n dsBeleg2Vorname.Size := 50;\r\n dsBeleg2Postleitzahl.SetParentComponent(dsBeleg2);\r\n dsBeleg2Postleitzahl.Name := 'dsBeleg2Postleitzahl';\r\n dsBeleg2Postleitzahl.FieldName := 'Postleitzahl';\r\n dsBeleg2Postleitzahl.Size := 10;\r\n dsBeleg2Ort.SetParentComponent(dsBeleg2);\r\n dsBeleg2Ort.Name := 'dsBeleg2Ort';\r\n dsBeleg2Ort.FieldName := 'Ort';\r\n dsBeleg2Ort.Size := 50;\r\n dsBeleg2Laenderkuerzel.SetParentComponent(dsBeleg2);\r\n dsBeleg2Laenderkuerzel.Name := 'dsBeleg2Laenderkuerzel';\r\n dsBeleg2Laenderkuerzel.FieldName := 'Laenderkuerzel';\r\n dsBeleg2Laenderkuerzel.Size := 5;\r\n dsBeleg2Land.SetParentComponent(dsBeleg2);\r\n dsBeleg2Land.Name := 'dsBeleg2Land';\r\n dsBeleg2Land.FieldName := 'Land';\r\n dsBeleg2Land.Size := 50;\r\n dsBeleg2Briefanrede1.SetParentComponent(dsBeleg2);\r\n dsBeleg2Briefanrede1.Name := 'dsBeleg2Briefanrede1';\r\n dsBeleg2Briefanrede1.FieldName := 'Briefanrede1';\r\n dsBeleg2Briefanrede1.Size := 255;\r\n dsBeleg2Briefanrede2.SetParentComponent(dsBeleg2);\r\n dsBeleg2Briefanrede2.Name := 'dsBeleg2Briefanrede2';\r\n dsBeleg2Briefanrede2.FieldName := 'Briefanrede2';\r\n dsBeleg2Briefanrede2.Size := 40;\r\n dsBeleg2EMail.SetParentComponent(dsBeleg2);\r\n dsBeleg2EMail.Name := 'dsBeleg2EMail';\r\n dsBeleg2EMail.FieldName := 'EMail';\r\n dsBeleg2EMail.Size := 50;\r\n dsBeleg2AdresseBild.SetParentComponent(dsBeleg2);\r\n dsBeleg2AdresseBild.Name := 'dsBeleg2AdresseBild';\r\n dsBeleg2AdresseBild.FieldName := 'AdresseBild';\r\n dsBeleg2AdresseBild.Size := 255;\r\n dsBeleg2LieferanschriftBild.SetParentComponent(dsBeleg2);\r\n dsBeleg2LieferanschriftBild.Name := 'dsBeleg2LieferanschriftBild';\r\n dsBeleg2LieferanschriftBild.FieldName := 'LieferanschriftBild';\r\n dsBeleg2LieferanschriftBild.Size := 255;\r\n dsBeleg2Zahlungsbedingung.SetParentComponent(dsBeleg2);\r\n dsBeleg2Zahlungsbedingung.Name := 'dsBeleg2Zahlungsbedingung';\r\n dsBeleg2Zahlungsbedingung.FieldName := 'Zahlungsbedingung';\r\n dsBeleg2ZahlungsbedingungText.SetParentComponent(dsBeleg2);\r\n dsBeleg2ZahlungsbedingungText.Name := 'dsBeleg2ZahlungsbedingungText';\r\n dsBeleg2ZahlungsbedingungText.FieldName := 'ZahlungsbedingungText';\r\n dsBeleg2ZahlungsbedingungText.Size := 250;\r\n dsBeleg2Auftragsbezeichnung.SetParentComponent(dsBeleg2);\r\n dsBeleg2Auftragsbezeichnung.Name := 'dsBeleg2Auftragsbezeichnung';\r\n dsBeleg2Auftragsbezeichnung.FieldName := 'Auftragsbezeichnung';\r\n dsBeleg2Auftragsbezeichnung.Size := 255;\r\n dsBeleg2AuftragnummerKunde.SetParentComponent(dsBeleg2);\r\n dsBeleg2AuftragnummerKunde.Name := 'dsBeleg2AuftragnummerKunde';\r\n dsBeleg2AuftragnummerKunde.FieldName := 'AuftragnummerKunde';\r\n dsBeleg2AuftragnummerKunde.Size := 50;\r\n dsBeleg2BestelldatumKunde.SetParentComponent(dsBeleg2);\r\n dsBeleg2BestelldatumKunde.Name := 'dsBeleg2BestelldatumKunde';\r\n dsBeleg2BestelldatumKunde.FieldName := 'BestelldatumKunde';\r\n dsBeleg2ILN.SetParentComponent(dsBeleg2);\r\n dsBeleg2ILN.Name := 'dsBeleg2ILN';\r\n dsBeleg2ILN.FieldName := 'ILN';\r\n dsBeleg2ILN.Size := 50;\r\n dsBeleg2Kopftext.SetParentComponent(dsBeleg2);\r\n dsBeleg2Kopftext.Name := 'dsBeleg2Kopftext';\r\n dsBeleg2Kopftext.FieldName := 'Kopftext';\r\n dsBeleg2Kopftext.Size := 255;\r\n dsBeleg2Schlussbemerkung.SetParentComponent(dsBeleg2);\r\n dsBeleg2Schlussbemerkung.Name := 'dsBeleg2Schlussbemerkung';\r\n dsBeleg2Schlussbemerkung.FieldName := 'Schlussbemerkung';\r\n dsBeleg2Schlussbemerkung.Size := 255;\r\n dsBeleg2Gruss.SetParentComponent(dsBeleg2);\r\n dsBeleg2Gruss.Name := 'dsBeleg2Gruss';\r\n dsBeleg2Gruss.FieldName := 'Gruss';\r\n dsBeleg2Gruss.Size := 255;\r\n dsBeleg2Mehrwertsteuersatz1.SetParentComponent(dsBeleg2);\r\n dsBeleg2Mehrwertsteuersatz1.Name := 'dsBeleg2Mehrwertsteuersatz1';\r\n dsBeleg2Mehrwertsteuersatz1.FieldName := 'Mehrwertsteuersatz1';\r\n dsBeleg2Mehrwertsteuersatz2.SetParentComponent(dsBeleg2);\r\n dsBeleg2Mehrwertsteuersatz2.Name := 'dsBeleg2Mehrwertsteuersatz2';\r\n dsBeleg2Mehrwertsteuersatz2.FieldName := 'Mehrwertsteuersatz2';\r\n dsBeleg2Nettosumme01.SetParentComponent(dsBeleg2);\r\n dsBeleg2Nettosumme01.Name := 'dsBeleg2Nettosumme01';\r\n dsBeleg2Nettosumme01.FieldName := 'Nettosumme01';\r\n dsBeleg2Nettosumme02.SetParentComponent(dsBeleg2);\r\n dsBeleg2Nettosumme02.Name := 'dsBeleg2Nettosumme02';\r\n dsBeleg2Nettosumme02.FieldName := 'Nettosumme02';\r\n dsBeleg2Nettosumme.SetParentComponent(dsBeleg2);\r\n dsBeleg2Nettosumme.Name := 'dsBeleg2Nettosumme';\r\n dsBeleg2Nettosumme.FieldName := 'Nettosumme';\r\n dsBeleg2Mehrwertsteuer01.SetParentComponent(dsBeleg2);\r\n dsBeleg2Mehrwertsteuer01.Name := 'dsBeleg2Mehrwertsteuer01';\r\n dsBeleg2Mehrwertsteuer01.FieldName := 'Mehrwertsteuer01';\r\n dsBeleg2Mehrwertsteuer02.SetParentComponent(dsBeleg2);\r\n dsBeleg2Mehrwertsteuer02.Name := 'dsBeleg2Mehrwertsteuer02';\r\n dsBeleg2Mehrwertsteuer02.FieldName := 'Mehrwertsteuer02';\r\n dsBeleg2Mehrwertsteuer.SetParentComponent(dsBeleg2);\r\n dsBeleg2Mehrwertsteuer.Name := 'dsBeleg2Mehrwertsteuer';\r\n dsBeleg2Mehrwertsteuer.FieldName := 'Mehrwertsteuer';\r\n dsBeleg2Bruttosumme.SetParentComponent(dsBeleg2);\r\n dsBeleg2Bruttosumme.Name := 'dsBeleg2Bruttosumme';\r\n dsBeleg2Bruttosumme.FieldName := 'Bruttosumme';\r\n dsBeleg2Versanddatum.SetParentComponent(dsBeleg2);\r\n dsBeleg2Versanddatum.Name := 'dsBeleg2Versanddatum';\r\n dsBeleg2Versanddatum.FieldName := 'Versanddatum';\r\n dsBeleg2Skontosatz.SetParentComponent(dsBeleg2);\r\n dsBeleg2Skontosatz.Name := 'dsBeleg2Skontosatz';\r\n dsBeleg2Skontosatz.FieldName := 'Skontosatz';\r\n dsBeleg2NettosummeEK.SetParentComponent(dsBeleg2);\r\n dsBeleg2NettosummeEK.Name := 'dsBeleg2NettosummeEK';\r\n dsBeleg2NettosummeEK.FieldName := 'NettosummeEK';\r\n dsBeleg2NettoMarge.SetParentComponent(dsBeleg2);\r\n dsBeleg2NettoMarge.Name := 'dsBeleg2NettoMarge';\r\n dsBeleg2NettoMarge.FieldName := 'NettoMarge';\r\n dsBeleg2Schreibzeichen.SetParentComponent(dsBeleg2);\r\n dsBeleg2Schreibzeichen.Name := 'dsBeleg2Schreibzeichen';\r\n dsBeleg2Schreibzeichen.FieldName := 'Schreibzeichen';\r\n dsBeleg2Schreibzeichen.Size := 10;\r\n dsBeleg2Unterzeichner.SetParentComponent(dsBeleg2);\r\n dsBeleg2Unterzeichner.Name := 'dsBeleg2Unterzeichner';\r\n dsBeleg2Unterzeichner.FieldName := 'Unterzeichner';\r\n dsBeleg2Unterzeichner.Size := 50;\r\n dsBeleg2TelefonMA.SetParentComponent(dsBeleg2);\r\n dsBeleg2TelefonMA.Name := 'dsBeleg2TelefonMA';\r\n dsBeleg2TelefonMA.FieldName := 'TelefonMA';\r\n dsBeleg2TelefonMA.Size := 30;\r\n dsBeleg2EmailMA.SetParentComponent(dsBeleg2);\r\n dsBeleg2EmailMA.Name := 'dsBeleg2EmailMA';\r\n dsBeleg2EmailMA.FieldName := 'EmailMA';\r\n dsBeleg2EmailMA.Size := 50;\r\n dsBeleg2USTID.SetParentComponent(dsBeleg2);\r\n dsBeleg2USTID.Name := 'dsBeleg2USTID';\r\n dsBeleg2USTID.FieldName := 'USTID';\r\n dsBeleg2Umsatzsteuerausweis.SetParentComponent(dsBeleg2);\r\n dsBeleg2Umsatzsteuerausweis.Name := 'dsBeleg2Umsatzsteuerausweis';\r\n dsBeleg2Umsatzsteuerausweis.FieldName := 'Umsatzsteuerausweis';\r\n dsBeleg2gebucht.SetParentComponent(dsBeleg2);\r\n dsBeleg2gebucht.Name := 'dsBeleg2gebucht';\r\n dsBeleg2gebucht.FieldName := 'gebucht';\r\n dsBeleg2Lieferdatum.SetParentComponent(dsBeleg2);\r\n dsBeleg2Lieferdatum.Name := 'dsBeleg2Lieferdatum';\r\n dsBeleg2Lieferdatum.FieldName := 'Lieferdatum';\r\n dsBeleg2Transportbedingung.SetParentComponent(dsBeleg2);\r\n dsBeleg2Transportbedingung.Name := 'dsBeleg2Transportbedingung';\r\n dsBeleg2Transportbedingung.FieldName := 'Transportbedingung';\r\n dsBeleg2Transportbedingung.Size := 100;\r\n dsBeleg2Mehrwertsteuersatz3.SetParentComponent(dsBeleg2);\r\n dsBeleg2Mehrwertsteuersatz3.Name := 'dsBeleg2Mehrwertsteuersatz3';\r\n dsBeleg2Mehrwertsteuersatz3.FieldName := 'Mehrwertsteuersatz3';\r\n dsBeleg2Mehrwertsteuer03.SetParentComponent(dsBeleg2);\r\n dsBeleg2Mehrwertsteuer03.Name := 'dsBeleg2Mehrwertsteuer03';\r\n dsBeleg2Mehrwertsteuer03.FieldName := 'Mehrwertsteuer03';\r\n dsBeleg2Nettosumme03.SetParentComponent(dsBeleg2);\r\n dsBeleg2Nettosumme03.Name := 'dsBeleg2Nettosumme03';\r\n dsBeleg2Nettosumme03.FieldName := 'Nettosumme03';\r\n dsBeleg2RundungsDifferenz.SetParentComponent(dsBeleg2);\r\n dsBeleg2RundungsDifferenz.Name := 'dsBeleg2RundungsDifferenz';\r\n dsBeleg2RundungsDifferenz.FieldName := 'RundungsDifferenz';\r\n dsBeleg2EmailText.SetParentComponent(dsBeleg2);\r\n dsBeleg2EmailText.Name := 'dsBeleg2EmailText';\r\n dsBeleg2EmailText.FieldName := 'EmailText';\r\n dsBeleg2EmailText.Size := 255;\r\n dsBeleg2Auftragerledigt.SetParentComponent(dsBeleg2);\r\n dsBeleg2Auftragerledigt.Name := 'dsBeleg2Auftragerledigt';\r\n dsBeleg2Auftragerledigt.FieldName := 'Auftragerledigt';\r\n dsBeleg2Rabattstufe.SetParentComponent(dsBeleg2);\r\n dsBeleg2Rabattstufe.Name := 'dsBeleg2Rabattstufe';\r\n dsBeleg2Rabattstufe.FieldName := 'Rabattstufe';\r\n dsBeleg2Rabattstufe.Size := 15;\r\n dsBeleg2KFZKennzeichen.SetParentComponent(dsBeleg2);\r\n dsBeleg2KFZKennzeichen.Name := 'dsBeleg2KFZKennzeichen';\r\n dsBeleg2KFZKennzeichen.FieldName := 'KFZKennzeichen';\r\n dsBeleg2KFZKennzeichen.Size := 13;\r\n dsBeleg2Fahrgestellnummer.SetParentComponent(dsBeleg2);\r\n dsBeleg2Fahrgestellnummer.Name := 'dsBeleg2Fahrgestellnummer';\r\n dsBeleg2Fahrgestellnummer.FieldName := 'Fahrgestellnummer';\r\n dsBeleg2KFZHersteller.SetParentComponent(dsBeleg2);\r\n dsBeleg2KFZHersteller.Name := 'dsBeleg2KFZHersteller';\r\n dsBeleg2KFZHersteller.FieldName := 'KFZHersteller';\r\n dsBeleg2Erstzulassungsdatum.SetParentComponent(dsBeleg2);\r\n dsBeleg2Erstzulassungsdatum.Name := 'dsBeleg2Erstzulassungsdatum';\r\n dsBeleg2Erstzulassungsdatum.FieldName := 'Erstzulassungsdatum';\r\n dsBeleg2KMStand.SetParentComponent(dsBeleg2);\r\n dsBeleg2KMStand.Name := 'dsBeleg2KMStand';\r\n dsBeleg2KMStand.FieldName := 'KMStand';\r\n dsBeleg2KMStand.Size := 6;\r\n dsBeleg2KFZType.SetParentComponent(dsBeleg2);\r\n dsBeleg2KFZType.Name := 'dsBeleg2KFZType';\r\n dsBeleg2KFZType.FieldName := 'KFZType';\r\n dsBeleg2KFZType.Size := 25;\r\n dsBeleg2Inspektionsdatum.SetParentComponent(dsBeleg2);\r\n dsBeleg2Inspektionsdatum.Name := 'dsBeleg2Inspektionsdatum';\r\n dsBeleg2Inspektionsdatum.FieldName := 'Inspektionsdatum';\r\n dsBeleg2Debitorennummer.SetParentComponent(dsBeleg2);\r\n dsBeleg2Debitorennummer.Name := 'dsBeleg2Debitorennummer';\r\n dsBeleg2Debitorennummer.FieldName := 'Debitorennummer';\r\n dsBeleg2Debitorennummer.Size := 13;\r\n dsBeleg2Kostentraeger.SetParentComponent(dsBeleg2);\r\n dsBeleg2Kostentraeger.Name := 'dsBeleg2Kostentraeger';\r\n dsBeleg2Kostentraeger.FieldName := 'Kostentraeger';\r\n dsBeleg2Kostentraeger.Size := 13;\r\n dsBeleg2Rabattsatz.SetParentComponent(dsBeleg2);\r\n dsBeleg2Rabattsatz.Name := 'dsBeleg2Rabattsatz';\r\n dsBeleg2Rabattsatz.FieldName := 'Rabattsatz';\r\n dsBeleg2ObjektReferenz.SetParentComponent(dsBeleg2);\r\n dsBeleg2ObjektReferenz.Name := 'dsBeleg2ObjektReferenz';\r\n dsBeleg2ObjektReferenz.FieldName := 'ObjektReferenz';\r\n dsBeleg2ObjektReferenz.Size := 13;\r\n dsBeleg2Bank.SetParentComponent(dsBeleg2);\r\n dsBeleg2Bank.Name := 'dsBeleg2Bank';\r\n dsBeleg2Bank.FieldName := 'Bank';\r\n dsBeleg2Bank.Size := 50;\r\n dsBeleg2Bankleitzahl.SetParentComponent(dsBeleg2);\r\n dsBeleg2Bankleitzahl.Name := 'dsBeleg2Bankleitzahl';\r\n dsBeleg2Bankleitzahl.FieldName := 'Bankleitzahl';\r\n dsBeleg2Kontonummer.SetParentComponent(dsBeleg2);\r\n dsBeleg2Kontonummer.Name := 'dsBeleg2Kontonummer';\r\n dsBeleg2Kontonummer.FieldName := 'Kontonummer';\r\n dsBeleg2Kontonummer.Size := 50;\r\n dsBeleg2Kontoinhaber.SetParentComponent(dsBeleg2);\r\n dsBeleg2Kontoinhaber.Name := 'dsBeleg2Kontoinhaber';\r\n dsBeleg2Kontoinhaber.FieldName := 'Kontoinhaber';\r\n dsBeleg2Kontoinhaber.Size := 50;\r\n dsBeleg2Telefaxnummer.SetParentComponent(dsBeleg2);\r\n dsBeleg2Telefaxnummer.Name := 'dsBeleg2Telefaxnummer';\r\n dsBeleg2Telefaxnummer.FieldName := 'Telefaxnummer';\r\n dsBeleg2Telefaxnummer.Size := 25;\r\n dsBeleg2DatumNeu.SetParentComponent(dsBeleg2);\r\n dsBeleg2DatumNeu.Name := 'dsBeleg2DatumNeu';\r\n dsBeleg2DatumNeu.FieldName := 'DatumNeu';\r\n dsBeleg2Datumgeaendert.SetParentComponent(dsBeleg2);\r\n dsBeleg2Datumgeaendert.Name := 'dsBeleg2Datumgeaendert';\r\n dsBeleg2Datumgeaendert.FieldName := 'Datumgeaendert';\r\n dsBeleg2Objektnummer.SetParentComponent(dsBeleg2);\r\n dsBeleg2Objektnummer.Name := 'dsBeleg2Objektnummer';\r\n dsBeleg2Objektnummer.FieldName := 'Objektnummer';\r\n dsBeleg2Objektnummer.Size := 25;\r\n dsBeleg2Liefertermin.SetParentComponent(dsBeleg2);\r\n dsBeleg2Liefertermin.Name := 'dsBeleg2Liefertermin';\r\n dsBeleg2Liefertermin.FieldName := 'Liefertermin';\r\n dsBeleg2Liefertermin.Size := 50;\r\n dsBeleg2Emailversand.SetParentComponent(dsBeleg2);\r\n dsBeleg2Emailversand.Name := 'dsBeleg2Emailversand';\r\n dsBeleg2Emailversand.FieldName := 'Emailversand';\r\n dsBeleg2Telefonnummer.SetParentComponent(dsBeleg2);\r\n dsBeleg2Telefonnummer.Name := 'dsBeleg2Telefonnummer';\r\n dsBeleg2Telefonnummer.FieldName := 'Telefonnummer';\r\n dsBeleg2Telefonnummer.Size := 35;\r\n dsBeleg2MobilTelefon.SetParentComponent(dsBeleg2);\r\n dsBeleg2MobilTelefon.Name := 'dsBeleg2MobilTelefon';\r\n dsBeleg2MobilTelefon.FieldName := 'MobilTelefon';\r\n dsBeleg2MobilTelefon.Size := 25;\r\n dsBeleg2AuftragFax.SetParentComponent(dsBeleg2);\r\n dsBeleg2AuftragFax.Name := 'dsBeleg2AuftragFax';\r\n dsBeleg2AuftragFax.FieldName := 'AuftragFax';\r\n dsBeleg2REDatum.SetParentComponent(dsBeleg2);\r\n dsBeleg2REDatum.Name := 'dsBeleg2REDatum';\r\n dsBeleg2REDatum.FieldName := 'REDatum';\r\n dsBeleg2BenutzerNeu.SetParentComponent(dsBeleg2);\r\n dsBeleg2BenutzerNeu.Name := 'dsBeleg2BenutzerNeu';\r\n dsBeleg2BenutzerNeu.FieldName := 'BenutzerNeu';\r\n dsBeleg2BenutzerNeu.Size := 50;\r\n dsBeleg2BenutzerGeaendert.SetParentComponent(dsBeleg2);\r\n dsBeleg2BenutzerGeaendert.Name := 'dsBeleg2BenutzerGeaendert';\r\n dsBeleg2BenutzerGeaendert.FieldName := 'BenutzerGeaendert';\r\n dsBeleg2BenutzerGeaendert.Size := 50;\r\n dsBeleg2BerechnungBrutto.SetParentComponent(dsBeleg2);\r\n dsBeleg2BerechnungBrutto.Name := 'dsBeleg2BerechnungBrutto';\r\n dsBeleg2BerechnungBrutto.FieldName := 'BerechnungBrutto';\r\n dsBeleg2Bruttosumme01.SetParentComponent(dsBeleg2);\r\n dsBeleg2Bruttosumme01.Name := 'dsBeleg2Bruttosumme01';\r\n dsBeleg2Bruttosumme01.FieldName := 'Bruttosumme01';\r\n dsBeleg2Bruttosumme02.SetParentComponent(dsBeleg2);\r\n dsBeleg2Bruttosumme02.Name := 'dsBeleg2Bruttosumme02';\r\n dsBeleg2Bruttosumme02.FieldName := 'Bruttosumme02';\r\n dsBeleg2Bruttosumme03.SetParentComponent(dsBeleg2);\r\n dsBeleg2Bruttosumme03.Name := 'dsBeleg2Bruttosumme03';\r\n dsBeleg2Bruttosumme03.FieldName := 'Bruttosumme03';\r\n dsBeleg2Notiz.SetParentComponent(dsBeleg2);\r\n dsBeleg2Notiz.Name := 'dsBeleg2Notiz';\r\n dsBeleg2Notiz.FieldName := 'Notiz';\r\n dsBeleg2Notiz.Size := 255;\r\n dsBeleg2MargeProzent.SetParentComponent(dsBeleg2);\r\n dsBeleg2MargeProzent.Name := 'dsBeleg2MargeProzent';\r\n dsBeleg2MargeProzent.FieldName := 'MargeProzent';\r\n dsBeleg2Warenkreditgesperrt.SetParentComponent(dsBeleg2);\r\n dsBeleg2Warenkreditgesperrt.Name := 'dsBeleg2Warenkreditgesperrt';\r\n dsBeleg2Warenkreditgesperrt.FieldName := 'Warenkreditgesperrt';\r\n dsBeleg2Belegsprache.SetParentComponent(dsBeleg2);\r\n dsBeleg2Belegsprache.Name := 'dsBeleg2Belegsprache';\r\n dsBeleg2Belegsprache.FieldName := 'Belegsprache';\r\n dsBeleg2Belegsprache.Size := 10;\r\n dsBeleg2Duplicate.SetParentComponent(dsBeleg2);\r\n dsBeleg2Duplicate.Name := 'dsBeleg2Duplicate';\r\n dsBeleg2Duplicate.FieldName := 'Duplicate';\r\n dsBeleg2perEmail.SetParentComponent(dsBeleg2);\r\n dsBeleg2perEmail.Name := 'dsBeleg2perEmail';\r\n dsBeleg2perEmail.FieldName := 'perEmail';\r\n dsBeleg2Ansprechpartner.SetParentComponent(dsBeleg2);\r\n dsBeleg2Ansprechpartner.Name := 'dsBeleg2Ansprechpartner';\r\n dsBeleg2Ansprechpartner.FieldName := 'Ansprechpartner';\r\n dsBeleg2Ansprechpartner.Size := 105;\r\n dsBeleg2KundennummerFremd.SetParentComponent(dsBeleg2);\r\n dsBeleg2KundennummerFremd.Name := 'dsBeleg2KundennummerFremd';\r\n dsBeleg2KundennummerFremd.FieldName := 'KundennummerFremd';\r\n dsBeleg2Protokoll.SetParentComponent(dsBeleg2);\r\n dsBeleg2Protokoll.Name := 'dsBeleg2Protokoll';\r\n dsBeleg2Protokoll.FieldName := 'Protokoll';\r\n dsBeleg2Protokoll.Size := 255;\r\n dsBeleg2Verleihauftrag.SetParentComponent(dsBeleg2);\r\n dsBeleg2Verleihauftrag.Name := 'dsBeleg2Verleihauftrag';\r\n dsBeleg2Verleihauftrag.FieldName := 'Verleihauftrag';\r\n dsBeleg2VerleihVon.SetParentComponent(dsBeleg2);\r\n dsBeleg2VerleihVon.Name := 'dsBeleg2VerleihVon';\r\n dsBeleg2VerleihVon.FieldName := 'VerleihVon';\r\n dsBeleg2VerleihBis.SetParentComponent(dsBeleg2);\r\n dsBeleg2VerleihBis.Name := 'dsBeleg2VerleihBis';\r\n dsBeleg2VerleihBis.FieldName := 'VerleihBis';\r\n dsBeleg2AuftragGenehmigt.SetParentComponent(dsBeleg2);\r\n dsBeleg2AuftragGenehmigt.Name := 'dsBeleg2AuftragGenehmigt';\r\n dsBeleg2AuftragGenehmigt.FieldName := 'AuftragGenehmigt';\r\n dsBeleg2gesperrt.SetParentComponent(dsBeleg2);\r\n dsBeleg2gesperrt.Name := 'dsBeleg2gesperrt';\r\n dsBeleg2gesperrt.FieldName := 'gesperrt';\r\n dsBeleg2VerleihvonText.SetParentComponent(dsBeleg2);\r\n dsBeleg2VerleihvonText.Name := 'dsBeleg2VerleihvonText';\r\n dsBeleg2VerleihvonText.FieldName := 'VerleihvonText';\r\n dsBeleg2VerleihvonText.Size := 50;\r\n dsBeleg2VerleihbisText.SetParentComponent(dsBeleg2);\r\n dsBeleg2VerleihbisText.Name := 'dsBeleg2VerleihbisText';\r\n dsBeleg2VerleihbisText.FieldName := 'VerleihbisText';\r\n dsBeleg2VerleihbisText.Size := 50;\r\n dsBeleg2DruckWHG.SetParentComponent(dsBeleg2);\r\n dsBeleg2DruckWHG.Name := 'dsBeleg2DruckWHG';\r\n dsBeleg2DruckWHG.FieldName := 'DruckWHG';\r\n dsBeleg2DruckWHG.Size := 3;\r\n dsBeleg2DruckWHGKurs.SetParentComponent(dsBeleg2);\r\n dsBeleg2DruckWHGKurs.Name := 'dsBeleg2DruckWHGKurs';\r\n dsBeleg2DruckWHGKurs.FieldName := 'DruckWHGKurs';\r\n dsBeleg2ProzentsatzZusatzposition.SetParentComponent(dsBeleg2);\r\n dsBeleg2ProzentsatzZusatzposition.Name := 'dsBeleg2ProzentsatzZusatzposition';\r\n dsBeleg2ProzentsatzZusatzposition.FieldName := 'ProzentsatzZusatzposition';\r\n dsBeleg2TextZusatzposition.SetParentComponent(dsBeleg2);\r\n dsBeleg2TextZusatzposition.Name := 'dsBeleg2TextZusatzposition';\r\n dsBeleg2TextZusatzposition.FieldName := 'TextZusatzposition';\r\n dsBeleg2TextZusatzposition.Size := 255;\r\n dsBeleg2TextzusatzBeschreibung.SetParentComponent(dsBeleg2);\r\n dsBeleg2TextzusatzBeschreibung.Name := 'dsBeleg2TextzusatzBeschreibung';\r\n dsBeleg2TextzusatzBeschreibung.FieldName := 'TextzusatzBeschreibung';\r\n dsBeleg2TextzusatzBeschreibung.Size := 50;\r\n dsBeleg2Layoutname.SetParentComponent(dsBeleg2);\r\n dsBeleg2Layoutname.Name := 'dsBeleg2Layoutname';\r\n dsBeleg2Layoutname.FieldName := 'Layoutname';\r\n dsBeleg2Layoutname.Size := 50;\r\n dsBeleg2Gesamtgewicht.SetParentComponent(dsBeleg2);\r\n dsBeleg2Gesamtgewicht.Name := 'dsBeleg2Gesamtgewicht';\r\n dsBeleg2Gesamtgewicht.FieldName := 'Gesamtgewicht';\r\n dsBeleg2BetragZusatzposition.SetParentComponent(dsBeleg2);\r\n dsBeleg2BetragZusatzposition.Name := 'dsBeleg2BetragZusatzposition';\r\n dsBeleg2BetragZusatzposition.FieldName := 'BetragZusatzposition';\r\n dsBeleg2ReferenzBestellung.SetParentComponent(dsBeleg2);\r\n dsBeleg2ReferenzBestellung.Name := 'dsBeleg2ReferenzBestellung';\r\n dsBeleg2ReferenzBestellung.FieldName := 'ReferenzBestellung';\r\n dsBeleg2ReferenzBestellung.Size := 10;\r\n dsBeleg2Termin1.SetParentComponent(dsBeleg2);\r\n dsBeleg2Termin1.Name := 'dsBeleg2Termin1';\r\n dsBeleg2Termin1.FieldName := 'Termin1';\r\n dsBeleg2Termin2.SetParentComponent(dsBeleg2);\r\n dsBeleg2Termin2.Name := 'dsBeleg2Termin2';\r\n dsBeleg2Termin2.FieldName := 'Termin2';\r\n dsBeleg2Zielkontaktnummer.SetParentComponent(dsBeleg2);\r\n dsBeleg2Zielkontaktnummer.Name := 'dsBeleg2Zielkontaktnummer';\r\n dsBeleg2Zielkontaktnummer.FieldName := 'Zielkontaktnummer';\r\n dsBeleg2Zielkontaktnummer.Size := 13;\r\n dsBeleg2Zielkontaktname.SetParentComponent(dsBeleg2);\r\n dsBeleg2Zielkontaktname.Name := 'dsBeleg2Zielkontaktname';\r\n dsBeleg2Zielkontaktname.FieldName := 'Zielkontaktname';\r\n dsBeleg2Zielkontaktname.Size := 40;\r\n dsBeleg2Bilddatei1.SetParentComponent(dsBeleg2);\r\n dsBeleg2Bilddatei1.Name := 'dsBeleg2Bilddatei1';\r\n dsBeleg2Bilddatei1.FieldName := 'Bilddatei1';\r\n dsBeleg2Bilddatei1.Size := 255;\r\n dsBeleg2Bilddatei2.SetParentComponent(dsBeleg2);\r\n dsBeleg2Bilddatei2.Name := 'dsBeleg2Bilddatei2';\r\n dsBeleg2Bilddatei2.FieldName := 'Bilddatei2';\r\n dsBeleg2Bilddatei2.Size := 255;\r\n dsBeleg2Zielkontaktnummer2.SetParentComponent(dsBeleg2);\r\n dsBeleg2Zielkontaktnummer2.Name := 'dsBeleg2Zielkontaktnummer2';\r\n dsBeleg2Zielkontaktnummer2.FieldName := 'Zielkontaktnummer2';\r\n dsBeleg2Zielkontaktnummer2.Size := 13;\r\n dsBeleg2Zielkontaktname2.SetParentComponent(dsBeleg2);\r\n dsBeleg2Zielkontaktname2.Name := 'dsBeleg2Zielkontaktname2';\r\n dsBeleg2Zielkontaktname2.FieldName := 'Zielkontaktname2';\r\n dsBeleg2Zielkontaktname2.Size := 40;\r\n dsBeleg2bestaetigt.SetParentComponent(dsBeleg2);\r\n dsBeleg2bestaetigt.Name := 'dsBeleg2bestaetigt';\r\n dsBeleg2bestaetigt.FieldName := 'bestaetigt';\r\n dsBeleg2Zielkontaktnummer3.SetParentComponent(dsBeleg2);\r\n dsBeleg2Zielkontaktnummer3.Name := 'dsBeleg2Zielkontaktnummer3';\r\n dsBeleg2Zielkontaktnummer3.FieldName := 'Zielkontaktnummer3';\r\n dsBeleg2Zielkontaktnummer3.Size := 13;\r\n dsBeleg2Zielkontaktname3.SetParentComponent(dsBeleg2);\r\n dsBeleg2Zielkontaktname3.Name := 'dsBeleg2Zielkontaktname3';\r\n dsBeleg2Zielkontaktname3.FieldName := 'Zielkontaktname3';\r\n dsBeleg2Zielkontaktname3.Size := 40;\r\n dsBeleg2Termin3.SetParentComponent(dsBeleg2);\r\n dsBeleg2Termin3.Name := 'dsBeleg2Termin3';\r\n dsBeleg2Termin3.FieldName := 'Termin3';\r\n dsBeleg2Termin4.SetParentComponent(dsBeleg2);\r\n dsBeleg2Termin4.Name := 'dsBeleg2Termin4';\r\n dsBeleg2Termin4.FieldName := 'Termin4';\r\n dsBeleg2Muster.SetParentComponent(dsBeleg2);\r\n dsBeleg2Muster.Name := 'dsBeleg2Muster';\r\n dsBeleg2Muster.FieldName := 'Muster';\r\n dsBeleg2KW.SetParentComponent(dsBeleg2);\r\n dsBeleg2KW.Name := 'dsBeleg2KW';\r\n dsBeleg2KW.FieldName := 'KW';\r\n dsBeleg2Datenlink.SetParentComponent(dsBeleg2);\r\n dsBeleg2Datenlink.Name := 'dsBeleg2Datenlink';\r\n dsBeleg2Datenlink.FieldName := 'Datenlink';\r\n dsBeleg2Datenlink.Size := 255;\r\n dsBeleg2Mehrwertsteuersatz4.SetParentComponent(dsBeleg2);\r\n dsBeleg2Mehrwertsteuersatz4.Name := 'dsBeleg2Mehrwertsteuersatz4';\r\n dsBeleg2Mehrwertsteuersatz4.FieldName := 'Mehrwertsteuersatz4';\r\n dsBeleg2Mehrwertsteuersatz5.SetParentComponent(dsBeleg2);\r\n dsBeleg2Mehrwertsteuersatz5.Name := 'dsBeleg2Mehrwertsteuersatz5';\r\n dsBeleg2Mehrwertsteuersatz5.FieldName := 'Mehrwertsteuersatz5';\r\n dsBeleg2Mehrwertsteuersatz6.SetParentComponent(dsBeleg2);\r\n dsBeleg2Mehrwertsteuersatz6.Name := 'dsBeleg2Mehrwertsteuersatz6';\r\n dsBeleg2Mehrwertsteuersatz6.FieldName := 'Mehrwertsteuersatz6';\r\n dsBeleg2BesteuerungKey.SetParentComponent(dsBeleg2);\r\n dsBeleg2BesteuerungKey.Name := 'dsBeleg2BesteuerungKey';\r\n dsBeleg2BesteuerungKey.FieldName := 'BesteuerungKey';\r\n dsBeleg2VertreterMatchcode.SetParentComponent(dsBeleg2);\r\n dsBeleg2VertreterMatchcode.Name := 'dsBeleg2VertreterMatchcode';\r\n dsBeleg2VertreterMatchcode.FieldName := 'VertreterMatchcode';\r\n dsBeleg2VertreterMatchcode.Size := 50;\r\n dsBeleg2Verfasser.SetParentComponent(dsBeleg2);\r\n dsBeleg2Verfasser.Name := 'dsBeleg2Verfasser';\r\n dsBeleg2Verfasser.FieldName := 'Verfasser';\r\n dsBeleg2Verfasser.Size := 10;\r\n dsBeleg2LieferadresseID.SetParentComponent(dsBeleg2);\r\n dsBeleg2LieferadresseID.Name := 'dsBeleg2LieferadresseID';\r\n dsBeleg2LieferadresseID.FieldName := 'LieferadresseID';\r\n dsBeleg2AuftragStatus.SetParentComponent(dsBeleg2);\r\n dsBeleg2AuftragStatus.Name := 'dsBeleg2AuftragStatus';\r\n dsBeleg2AuftragStatus.FieldName := 'AuftragStatus';\r\n dsBeleg2AuftragStatus.Size := 30;\r\n dsBeleg2MonatJahr.SetParentComponent(dsBeleg2);\r\n dsBeleg2MonatJahr.Name := 'dsBeleg2MonatJahr';\r\n dsBeleg2MonatJahr.FieldName := 'MonatJahr';\r\n dsBeleg2Belegvariante.SetParentComponent(dsBeleg2);\r\n dsBeleg2Belegvariante.Name := 'dsBeleg2Belegvariante';\r\n dsBeleg2Belegvariante.FieldName := 'Belegvariante';\r\n dsBeleg2Belegvariante.Size := 25;\r\n dsBeleg2Produktionsfreigabe.SetParentComponent(dsBeleg2);\r\n dsBeleg2Produktionsfreigabe.Name := 'dsBeleg2Produktionsfreigabe';\r\n dsBeleg2Produktionsfreigabe.FieldName := 'Produktionsfreigabe';\r\n dsBeleg2ReferenzRahmenAuftrag.SetParentComponent(dsBeleg2);\r\n dsBeleg2ReferenzRahmenAuftrag.Name := 'dsBeleg2ReferenzRahmenAuftrag';\r\n dsBeleg2ReferenzRahmenAuftrag.FieldName := 'ReferenzRahmenAuftrag';\r\n dsBeleg2ReferenzRahmenAuftrag.Size := 10;\r\n dsBeleg2DatumRahmenAuftrag.SetParentComponent(dsBeleg2);\r\n dsBeleg2DatumRahmenAuftrag.Name := 'dsBeleg2DatumRahmenAuftrag';\r\n dsBeleg2DatumRahmenAuftrag.FieldName := 'DatumRahmenAuftrag';\r\n dsBeleg2FahrzeugID.SetParentComponent(dsBeleg2);\r\n dsBeleg2FahrzeugID.Name := 'dsBeleg2FahrzeugID';\r\n dsBeleg2FahrzeugID.FieldName := 'FahrzeugID';\r\n dsBeleg2AuslieferungKW.SetParentComponent(dsBeleg2);\r\n dsBeleg2AuslieferungKW.Name := 'dsBeleg2AuslieferungKW';\r\n dsBeleg2AuslieferungKW.FieldName := 'AuslieferungKW';\r\n dsBeleg2AuslieferungKW.Size := 25;\r\n dsBeleg2BereitstellungDatum.SetParentComponent(dsBeleg2);\r\n dsBeleg2BereitstellungDatum.Name := 'dsBeleg2BereitstellungDatum';\r\n dsBeleg2BereitstellungDatum.FieldName := 'BereitstellungDatum';\r\n dsBeleg2VTUID.SetParentComponent(dsBeleg2);\r\n dsBeleg2VTUID.Name := 'dsBeleg2VTUID';\r\n dsBeleg2VTUID.FieldName := 'VTUID';\r\n dsBeleg2VTUID.Size := 38;\r\n dsBeleg2LieferanschriftDaten.SetParentComponent(dsBeleg2);\r\n dsBeleg2LieferanschriftDaten.Name := 'dsBeleg2LieferanschriftDaten';\r\n dsBeleg2LieferanschriftDaten.FieldName := 'LieferanschriftDaten';\r\n dsBeleg2LieferanschriftDaten.Size := 255;\r\n dsBeleg2GesamtVolumen.SetParentComponent(dsBeleg2);\r\n dsBeleg2GesamtVolumen.Name := 'dsBeleg2GesamtVolumen';\r\n dsBeleg2GesamtVolumen.FieldName := 'GesamtVolumen';\r\n dsBeleg2BelegPKey.SetParentComponent(dsBeleg2);\r\n dsBeleg2BelegPKey.Name := 'dsBeleg2BelegPKey';\r\n dsBeleg2BelegPKey.FieldName := 'BelegPKey';\r\n dsBeleg2DruckParameter.SetParentComponent(dsBeleg2);\r\n dsBeleg2DruckParameter.Name := 'dsBeleg2DruckParameter';\r\n dsBeleg2DruckParameter.FieldName := 'DruckParameter';\r\n dsBeleg2DruckParameter.Size := 255;\r\n dsBeleg2ReferenzService.SetParentComponent(dsBeleg2);\r\n dsBeleg2ReferenzService.Name := 'dsBeleg2ReferenzService';\r\n dsBeleg2ReferenzService.FieldName := 'ReferenzService';\r\n dsBeleg2ReferenzService.Size := 10;\r\n dsBeleg2ZusatzDaten.SetParentComponent(dsBeleg2);\r\n dsBeleg2ZusatzDaten.Name := 'dsBeleg2ZusatzDaten';\r\n dsBeleg2ZusatzDaten.FieldName := 'ZusatzDaten';\r\n dsBeleg2ZusatzDaten.Size := 255;\r\n dsBeleg2StandPDF.SetParentComponent(dsBeleg2);\r\n dsBeleg2StandPDF.Name := 'dsBeleg2StandPDF';\r\n dsBeleg2StandPDF.FieldName := 'StandPDF';\r\n dsBeleg2StandPDF.Size := 255;\r\n dsBeleg2Paketdienst.SetParentComponent(dsBeleg2);\r\n dsBeleg2Paketdienst.Name := 'dsBeleg2Paketdienst';\r\n dsBeleg2Paketdienst.FieldName := 'Paketdienst';\r\n dsBeleg2Paketdienst.Size := 30;\r\n dsBeleg2Monteur.SetParentComponent(dsBeleg2);\r\n dsBeleg2Monteur.Name := 'dsBeleg2Monteur';\r\n dsBeleg2Monteur.FieldName := 'Monteur';\r\n dsBeleg2KundennummerKundennummer.SetParentComponent(dsBeleg2);\r\n dsBeleg2KundennummerKundennummer.Name := 'dsBeleg2KundennummerKundennummer';\r\n dsBeleg2KundennummerKundennummer.FieldName := 'Kundennummer.Kundennummer';\r\n dsBeleg2KundennummerKundennummer.Size := 13;\r\n dsBeleg2ServiceBemerkung.SetParentComponent(dsBeleg2);\r\n dsBeleg2ServiceBemerkung.Name := 'dsBeleg2ServiceBemerkung';\r\n dsBeleg2ServiceBemerkung.FieldName := 'ServiceBemerkung';\r\n dsBeleg2ServiceBemerkung.Size := 255;\r\n finally\r\n Container1.AfterLoadDFMValues;\r\n Container2.AfterLoadDFMValues;\r\n btnPosAbbrechen.AfterLoadDFMValues;\r\n btnPosSpeichern.AfterLoadDFMValues;\r\n btnPositionLoeschen.AfterLoadDFMValues;\r\n edtPosNr.AfterLoadDFMValues;\r\n edtPosUNr.AfterLoadDFMValues;\r\n edtArtikelueberschrift.AfterLoadDFMValues;\r\n edtMenge.AfterLoadDFMValues;\r\n btnArtikelnummer.AfterLoadDFMValues;\r\n edtArbeitszeitDatum.AfterLoadDFMValues;\r\n edtArbeitszeitVON.AfterLoadDFMValues;\r\n edtArbeitszeitBIS.AfterLoadDFMValues;\r\n edtArtikelbeschreibung.AfterLoadDFMValues;\r\n PosComboMonteur.AfterLoadDFMValues;\r\n edtMengenart.AfterLoadDFMValues;\r\n btnNeuePosition.AfterLoadDFMValues;\r\n WTCPosition.AfterLoadDFMValues;\r\n xdsPosition.AfterLoadDFMValues;\r\n xdsPositionID.AfterLoadDFMValues;\r\n xdsPositionPosNr.AfterLoadDFMValues;\r\n xdsPositionPosUNr.AfterLoadDFMValues;\r\n xdsPositionArtikelueberschrift.AfterLoadDFMValues;\r\n xdsPositionArtikelbeschreibung.AfterLoadDFMValues;\r\n xdsPositionMenge.AfterLoadDFMValues;\r\n xdsPositionArtderMenge.AfterLoadDFMValues;\r\n xdsPositionVerkaufspreis.AfterLoadDFMValues;\r\n xdsPositionEinkaufspreis.AfterLoadDFMValues;\r\n xdsPositionArtikelnummer.AfterLoadDFMValues;\r\n xdsPositionMonteurP.AfterLoadDFMValues;\r\n xdsPositionArbeitszeitDatum.AfterLoadDFMValues;\r\n xdsPositionArbeitszeitVON.AfterLoadDFMValues;\r\n xdsPositionArbeitszeitBIS.AfterLoadDFMValues;\r\n xdsPositionSumme.AfterLoadDFMValues;\r\n xdsPositionSeriennummer.AfterLoadDFMValues;\r\n xdsPositionWarengruppe.AfterLoadDFMValues;\r\n xdsPositionWarenuntergruppe.AfterLoadDFMValues;\r\n xdsPositionArtikelnummerKunde.AfterLoadDFMValues;\r\n xdsPositionLieferant.AfterLoadDFMValues;\r\n xdsPositionGewicht.AfterLoadDFMValues;\r\n xdsPositionLaenge.AfterLoadDFMValues;\r\n xdsPositionBreite.AfterLoadDFMValues;\r\n xdsPositionHoehe.AfterLoadDFMValues;\r\n xdsPositionMehrwertsteuersatz.AfterLoadDFMValues;\r\n xdsPositionEndpreis.AfterLoadDFMValues;\r\n xdsPositionPosMWST.AfterLoadDFMValues;\r\n xdsPositionBruttoEndpreis.AfterLoadDFMValues;\r\n xdsPositionEndpreis_EK.AfterLoadDFMValues;\r\n xdsPositionRabattsatz.AfterLoadDFMValues;\r\n xdsPositionPreisvorRabatt.AfterLoadDFMValues;\r\n xdsPositionPKZ.AfterLoadDFMValues;\r\n xdsPositionTextfrei10.AfterLoadDFMValues;\r\n xdsPositionTextfrei20.AfterLoadDFMValues;\r\n xdsPositionProduktionAbgeschlossen.AfterLoadDFMValues;\r\n xdsPositionEinzelpreisBrutto.AfterLoadDFMValues;\r\n xdsPositionPosMarge.AfterLoadDFMValues;\r\n xdsPositionPosMargeProzent.AfterLoadDFMValues;\r\n xdsPositionBereitsGeliefert.AfterLoadDFMValues;\r\n xdsPositionausliefern.AfterLoadDFMValues;\r\n xdsPositionBestellungErledigt.AfterLoadDFMValues;\r\n xdsPositionLager.AfterLoadDFMValues;\r\n xdsPositionbestellen.AfterLoadDFMValues;\r\n xdsPositionWarenbestand.AfterLoadDFMValues;\r\n xdsPositionArtikelbeschreibungRTF.AfterLoadDFMValues;\r\n xdsPositionQuellartikel.AfterLoadDFMValues;\r\n xdsPositionArtikelnummerWB.AfterLoadDFMValues;\r\n xdsPositionPreisanteilNetto.AfterLoadDFMValues;\r\n xdsPositionSetHPos.AfterLoadDFMValues;\r\n xdsPositionSetUPos.AfterLoadDFMValues;\r\n xdsPositionProvisionssatz.AfterLoadDFMValues;\r\n xdsPositionProvisionsbetrag.AfterLoadDFMValues;\r\n xdsPositionArtikelsprache.AfterLoadDFMValues;\r\n xdsPositionEKvom.AfterLoadDFMValues;\r\n xdsPositionMengenberechnungID.AfterLoadDFMValues;\r\n xdsPositionTaraID.AfterLoadDFMValues;\r\n xdsPositionTara.AfterLoadDFMValues;\r\n xdsPositionBruttoGewicht.AfterLoadDFMValues;\r\n xdsPositionAussenflaeche.AfterLoadDFMValues;\r\n xdsPositionLadeort.AfterLoadDFMValues;\r\n xdsPositionSeitenumbruch.AfterLoadDFMValues;\r\n xdsPositionPlanerFarbe.AfterLoadDFMValues;\r\n xdsPositionMWStKey.AfterLoadDFMValues;\r\n xdsPositionZSnachPos.AfterLoadDFMValues;\r\n xdsPositionLieferzeit.AfterLoadDFMValues;\r\n xdsPositionPreisVorRabattWHG.AfterLoadDFMValues;\r\n xdsPositionReferenzKalkulation.AfterLoadDFMValues;\r\n xdsPositionPKey.AfterLoadDFMValues;\r\n xdsPositionAuftragsnummer.AfterLoadDFMValues;\r\n xdsPositionlwbID.AfterLoadDFMValues;\r\n xdsPositionBelegdatum.AfterLoadDFMValues;\r\n xdsPositionWarenkontrollnummern.AfterLoadDFMValues;\r\n xdsPositionVolumen.AfterLoadDFMValues;\r\n xdsPositionPosVolumen.AfterLoadDFMValues;\r\n xdsPositionArtikelAttribute.AfterLoadDFMValues;\r\n xdsPositionNummerkomplett.AfterLoadDFMValues;\r\n sourcePosition.AfterLoadDFMValues;\r\n dsArtikel.AfterLoadDFMValues;\r\n dsArtikelHersteller.AfterLoadDFMValues;\r\n dsArtikelArtderMenge.AfterLoadDFMValues;\r\n dsArtikelPfandArt.AfterLoadDFMValues;\r\n dsArtikelWarengruppe.AfterLoadDFMValues;\r\n dsArtikelWarenuntergruppe.AfterLoadDFMValues;\r\n dsArtikelArtikelnummer.AfterLoadDFMValues;\r\n dsArtikelArtikelueberschrift.AfterLoadDFMValues;\r\n dsArtikelArtikelbeschreibung.AfterLoadDFMValues;\r\n dsArtikelVerkaufspreis.AfterLoadDFMValues;\r\n dsArtikelMindestbestand.AfterLoadDFMValues;\r\n dsArtikelPreisliste.AfterLoadDFMValues;\r\n dsArtikelGewicht.AfterLoadDFMValues;\r\n dsArtikelLaenge.AfterLoadDFMValues;\r\n dsArtikelBreite.AfterLoadDFMValues;\r\n dsArtikelHoehe.AfterLoadDFMValues;\r\n dsArtikelArtikelZusatz.AfterLoadDFMValues;\r\n dsArtikelLagerort.AfterLoadDFMValues;\r\n dsArtikelBuchungskonto.AfterLoadDFMValues;\r\n dsArtikelEingangMenge.AfterLoadDFMValues;\r\n dsArtikelEingangEndpreis.AfterLoadDFMValues;\r\n dsArtikelAusgangMenge.AfterLoadDFMValues;\r\n dsArtikelAusgangEndpreisEK.AfterLoadDFMValues;\r\n dsArtikelAusgangEndpreisVK.AfterLoadDFMValues;\r\n dsArtikelBestand.AfterLoadDFMValues;\r\n dsArtikelBestandswert.AfterLoadDFMValues;\r\n dsArtikelMarge.AfterLoadDFMValues;\r\n dsArtikelMargeProzent.AfterLoadDFMValues;\r\n dsArtikelArtikelnummer2.AfterLoadDFMValues;\r\n dsArtikelArtikelmatchcode.AfterLoadDFMValues;\r\n dsArtikelRabattpreis1.AfterLoadDFMValues;\r\n dsArtikelRabattpreis2.AfterLoadDFMValues;\r\n dsArtikelRabattpreis3.AfterLoadDFMValues;\r\n dsArtikelRabattpreis4.AfterLoadDFMValues;\r\n dsArtikelRabattpreis5.AfterLoadDFMValues;\r\n dsArtikelArtikelnichtmehrgueltig.AfterLoadDFMValues;\r\n dsArtikelEinkaufspreis.AfterLoadDFMValues;\r\n dsArtikelAufschlag.AfterLoadDFMValues;\r\n dsArtikelWarenbestand.AfterLoadDFMValues;\r\n dsArtikelTextfrei10.AfterLoadDFMValues;\r\n dsArtikelTextfrei20.AfterLoadDFMValues;\r\n dsArtikelArtikelbeschreibungRTF.AfterLoadDFMValues;\r\n dsArtikelArtikeldatei1.AfterLoadDFMValues;\r\n dsArtikelArtikeldatei2.AfterLoadDFMValues;\r\n dsArtikelArtikeldatei3.AfterLoadDFMValues;\r\n dsArtikelArtikeldatei4.AfterLoadDFMValues;\r\n dsArtikelArtikeldatei5.AfterLoadDFMValues;\r\n dsArtikelEinkaufspreisVom.AfterLoadDFMValues;\r\n dsArtikelEAN.AfterLoadDFMValues;\r\n dsArtikelVGPFaktor.AfterLoadDFMValues;\r\n dsArtikelVGPMengenart.AfterLoadDFMValues;\r\n dsArtikelVerleihpreis.AfterLoadDFMValues;\r\n dsArtikelZusatzPreis.AfterLoadDFMValues;\r\n dsArtikelVerpackungsart.AfterLoadDFMValues;\r\n dsArtikelVerpackungsMenge.AfterLoadDFMValues;\r\n dsArtikelQuellartikel.AfterLoadDFMValues;\r\n dsArtikelrabattierfaehig.AfterLoadDFMValues;\r\n dsArtikelAngebotAlternativeAN.AfterLoadDFMValues;\r\n dsArtikelPreisanteilNetto.AfterLoadDFMValues;\r\n dsArtikelFarbe.AfterLoadDFMValues;\r\n dsArtikelAEinkauf.AfterLoadDFMValues;\r\n dsArtikelAVerkauf.AfterLoadDFMValues;\r\n dsArtikelArtikelnummerLieferant.AfterLoadDFMValues;\r\n dsArtikelLieferantnummer.AfterLoadDFMValues;\r\n dsArtikelVerkaufspreisBrutto.AfterLoadDFMValues;\r\n dsArtikelArtikelSet.AfterLoadDFMValues;\r\n dsArtikelProvisionssatz.AfterLoadDFMValues;\r\n dsArtikelWarentarifnummer.AfterLoadDFMValues;\r\n dsArtikelHandelsartikel.AfterLoadDFMValues;\r\n dsArtikelUrsprungsland.AfterLoadDFMValues;\r\n dsArtikelKategorie.AfterLoadDFMValues;\r\n dsArtikelStandardRabattsatzEK.AfterLoadDFMValues;\r\n dsArtikelStandardRabattsatzVK.AfterLoadDFMValues;\r\n dsArtikelRabattpreiseManuell.AfterLoadDFMValues;\r\n dsArtikelMengeBestellt.AfterLoadDFMValues;\r\n dsArtikelMengeBeauftragt.AfterLoadDFMValues;\r\n dsArtikelBestandDisponiert.AfterLoadDFMValues;\r\n dsArtikelMengeAngeboten.AfterLoadDFMValues;\r\n dsArtikelBestandDispInclAngebot.AfterLoadDFMValues;\r\n dsArtikelMWStKey.AfterLoadDFMValues;\r\n dsArtikelShopAmazon.AfterLoadDFMValues;\r\n dsArtikelShopQuelle.AfterLoadDFMValues;\r\n dsArtikelGeraet.AfterLoadDFMValues;\r\n dsArtikelArtgewicht.AfterLoadDFMValues;\r\n dsArtikelVolumen.AfterLoadDFMValues;\r\n dsArtikelPacklisteNichtAnzeigen.AfterLoadDFMValues;\r\n dsArtikelKeineAufschlagskalkulation.AfterLoadDFMValues;\r\n dsArtikelKorrekturMenge.AfterLoadDFMValues;\r\n dsArtikelKorrekturWert.AfterLoadDFMValues;\r\n dsArtikelNachfolgeartikel.AfterLoadDFMValues;\r\n dsArtikelMindestbestellmenge.AfterLoadDFMValues;\r\n dsArtikelSchnittEK.AfterLoadDFMValues;\r\n dsArtikelVerkaufspreisVom.AfterLoadDFMValues;\r\n dsArtikelPruefungChargeSNR.AfterLoadDFMValues;\r\n dsArtikelArtikelbeschreibungHTML.AfterLoadDFMValues;\r\n dsArtikelProduktKurzbeschreibungHTML.AfterLoadDFMValues;\r\n dsArtikelStatusFuerShop.AfterLoadDFMValues;\r\n dsArtikelAmpelFuerShop.AfterLoadDFMValues;\r\n dsArtikelEXP_Anzahl.AfterLoadDFMValues;\r\n dsArtikelEXP_Inhalt.AfterLoadDFMValues;\r\n dsArtikelEXP_Faktor.AfterLoadDFMValues;\r\n dsArtikelFach.AfterLoadDFMValues;\r\n dsArtikelExportKasse.AfterLoadDFMValues;\r\n dsArtikelWKNR.AfterLoadDFMValues;\r\n dsArtikelArtikelAttribute.AfterLoadDFMValues;\r\n dsArtikelErstelltAm.AfterLoadDFMValues;\r\n dsArtikelVarianteVonAN.AfterLoadDFMValues;\r\n dsArtikelGurtmassWerte.AfterLoadDFMValues;\r\n dsArtikelGurtmass.AfterLoadDFMValues;\r\n dsArtikelAltersgrenze.AfterLoadDFMValues;\r\n dsArtikelMWStKeyImHaus.AfterLoadDFMValues;\r\n dsArtikelKasseBewegung.AfterLoadDFMValues;\r\n dsArtikelKasseBewegungEK.AfterLoadDFMValues;\r\n dsArtikelKasseBewegungVK.AfterLoadDFMValues;\r\n dsArtikelProduktionBewegung.AfterLoadDFMValues;\r\n dsArtikelProduktionBewegungEK.AfterLoadDFMValues;\r\n dsArtikelProduktionBewegungVK.AfterLoadDFMValues;\r\n dsArtikelWaWiAB.AfterLoadDFMValues;\r\n dsArtikelGeaendertAm.AfterLoadDFMValues;\r\n dsArtikelGefahrgutKennzeichen.AfterLoadDFMValues;\r\n dsArtikelVerpackG.AfterLoadDFMValues;\r\n dsArtikelUPE.AfterLoadDFMValues;\r\n dsArtikelArtikelbeschreibungEinkauf.AfterLoadDFMValues;\r\n dsArtikelHerstellerArtikelnummer.AfterLoadDFMValues;\r\n dsArtikelNatura.AfterLoadDFMValues;\r\n dsArtikelArbeitszeit.AfterLoadDFMValues;\r\n dsArtikelArtderMengeArtderMenge.AfterLoadDFMValues;\r\n xdsKundenpreise.AfterLoadDFMValues;\r\n xdsKundenpreiseArtikelnummer.AfterLoadDFMValues;\r\n xdsKundenpreiseKundennummer.AfterLoadDFMValues;\r\n xdsKundenpreiseVerkaufspreis.AfterLoadDFMValues;\r\n xdsKundenpreiseNachname.AfterLoadDFMValues;\r\n xdsKundenpreiseRabattsatz.AfterLoadDFMValues;\r\n xdsKundenpreiseVerleihpreis.AfterLoadDFMValues;\r\n xdsKundenpreiseZusatzPreis.AfterLoadDFMValues;\r\n xdsKundenpreiseArtikelnummerKunde.AfterLoadDFMValues;\r\n xdsKundenpreiseDatumGeaendert.AfterLoadDFMValues;\r\n xdsKundenpreiseArtikelueberschrift.AfterLoadDFMValues;\r\n xdsKundenpreiseArtikelnummerArtikelnummer.AfterLoadDFMValues;\r\n xdsKundenpreiseArtikelnummerArtikelueberschrift.AfterLoadDFMValues;\r\n xdsKundenpreiseArtikelnummerArtikelbeschreibung.AfterLoadDFMValues;\r\n dsBeleg2.AfterLoadDFMValues;\r\n dsBeleg2Kundennummer.AfterLoadDFMValues;\r\n dsBeleg2Nummerkomplett.AfterLoadDFMValues;\r\n dsBeleg2ReferenzAngebot.AfterLoadDFMValues;\r\n dsBeleg2ReferenzLieferschein.AfterLoadDFMValues;\r\n dsBeleg2ReferenzRechnung.AfterLoadDFMValues;\r\n dsBeleg2Datum.AfterLoadDFMValues;\r\n dsBeleg2Jahr.AfterLoadDFMValues;\r\n dsBeleg2Kalenderwoche.AfterLoadDFMValues;\r\n dsBeleg2Nachname.AfterLoadDFMValues;\r\n dsBeleg2Vorname.AfterLoadDFMValues;\r\n dsBeleg2Postleitzahl.AfterLoadDFMValues;\r\n dsBeleg2Ort.AfterLoadDFMValues;\r\n dsBeleg2Laenderkuerzel.AfterLoadDFMValues;\r\n dsBeleg2Land.AfterLoadDFMValues;\r\n dsBeleg2Briefanrede1.AfterLoadDFMValues;\r\n dsBeleg2Briefanrede2.AfterLoadDFMValues;\r\n dsBeleg2EMail.AfterLoadDFMValues;\r\n dsBeleg2AdresseBild.AfterLoadDFMValues;\r\n dsBeleg2LieferanschriftBild.AfterLoadDFMValues;\r\n dsBeleg2Zahlungsbedingung.AfterLoadDFMValues;\r\n dsBeleg2ZahlungsbedingungText.AfterLoadDFMValues;\r\n dsBeleg2Auftragsbezeichnung.AfterLoadDFMValues;\r\n dsBeleg2AuftragnummerKunde.AfterLoadDFMValues;\r\n dsBeleg2BestelldatumKunde.AfterLoadDFMValues;\r\n dsBeleg2ILN.AfterLoadDFMValues;\r\n dsBeleg2Kopftext.AfterLoadDFMValues;\r\n dsBeleg2Schlussbemerkung.AfterLoadDFMValues;\r\n dsBeleg2Gruss.AfterLoadDFMValues;\r\n dsBeleg2Mehrwertsteuersatz1.AfterLoadDFMValues;\r\n dsBeleg2Mehrwertsteuersatz2.AfterLoadDFMValues;\r\n dsBeleg2Nettosumme01.AfterLoadDFMValues;\r\n dsBeleg2Nettosumme02.AfterLoadDFMValues;\r\n dsBeleg2Nettosumme.AfterLoadDFMValues;\r\n dsBeleg2Mehrwertsteuer01.AfterLoadDFMValues;\r\n dsBeleg2Mehrwertsteuer02.AfterLoadDFMValues;\r\n dsBeleg2Mehrwertsteuer.AfterLoadDFMValues;\r\n dsBeleg2Bruttosumme.AfterLoadDFMValues;\r\n dsBeleg2Versanddatum.AfterLoadDFMValues;\r\n dsBeleg2Skontosatz.AfterLoadDFMValues;\r\n dsBeleg2NettosummeEK.AfterLoadDFMValues;\r\n dsBeleg2NettoMarge.AfterLoadDFMValues;\r\n dsBeleg2Schreibzeichen.AfterLoadDFMValues;\r\n dsBeleg2Unterzeichner.AfterLoadDFMValues;\r\n dsBeleg2TelefonMA.AfterLoadDFMValues;\r\n dsBeleg2EmailMA.AfterLoadDFMValues;\r\n dsBeleg2USTID.AfterLoadDFMValues;\r\n dsBeleg2Umsatzsteuerausweis.AfterLoadDFMValues;\r\n dsBeleg2gebucht.AfterLoadDFMValues;\r\n dsBeleg2Lieferdatum.AfterLoadDFMValues;\r\n dsBeleg2Transportbedingung.AfterLoadDFMValues;\r\n dsBeleg2Mehrwertsteuersatz3.AfterLoadDFMValues;\r\n dsBeleg2Mehrwertsteuer03.AfterLoadDFMValues;\r\n dsBeleg2Nettosumme03.AfterLoadDFMValues;\r\n dsBeleg2RundungsDifferenz.AfterLoadDFMValues;\r\n dsBeleg2EmailText.AfterLoadDFMValues;\r\n dsBeleg2Auftragerledigt.AfterLoadDFMValues;\r\n dsBeleg2Rabattstufe.AfterLoadDFMValues;\r\n dsBeleg2KFZKennzeichen.AfterLoadDFMValues;\r\n dsBeleg2Fahrgestellnummer.AfterLoadDFMValues;\r\n dsBeleg2KFZHersteller.AfterLoadDFMValues;\r\n dsBeleg2Erstzulassungsdatum.AfterLoadDFMValues;\r\n dsBeleg2KMStand.AfterLoadDFMValues;\r\n dsBeleg2KFZType.AfterLoadDFMValues;\r\n dsBeleg2Inspektionsdatum.AfterLoadDFMValues;\r\n dsBeleg2Debitorennummer.AfterLoadDFMValues;\r\n dsBeleg2Kostentraeger.AfterLoadDFMValues;\r\n dsBeleg2Rabattsatz.AfterLoadDFMValues;\r\n dsBeleg2ObjektReferenz.AfterLoadDFMValues;\r\n dsBeleg2Bank.AfterLoadDFMValues;\r\n dsBeleg2Bankleitzahl.AfterLoadDFMValues;\r\n dsBeleg2Kontonummer.AfterLoadDFMValues;\r\n dsBeleg2Kontoinhaber.AfterLoadDFMValues;\r\n dsBeleg2Telefaxnummer.AfterLoadDFMValues;\r\n dsBeleg2DatumNeu.AfterLoadDFMValues;\r\n dsBeleg2Datumgeaendert.AfterLoadDFMValues;\r\n dsBeleg2Objektnummer.AfterLoadDFMValues;\r\n dsBeleg2Liefertermin.AfterLoadDFMValues;\r\n dsBeleg2Emailversand.AfterLoadDFMValues;\r\n dsBeleg2Telefonnummer.AfterLoadDFMValues;\r\n dsBeleg2MobilTelefon.AfterLoadDFMValues;\r\n dsBeleg2AuftragFax.AfterLoadDFMValues;\r\n dsBeleg2REDatum.AfterLoadDFMValues;\r\n dsBeleg2BenutzerNeu.AfterLoadDFMValues;\r\n dsBeleg2BenutzerGeaendert.AfterLoadDFMValues;\r\n dsBeleg2BerechnungBrutto.AfterLoadDFMValues;\r\n dsBeleg2Bruttosumme01.AfterLoadDFMValues;\r\n dsBeleg2Bruttosumme02.AfterLoadDFMValues;\r\n dsBeleg2Bruttosumme03.AfterLoadDFMValues;\r\n dsBeleg2Notiz.AfterLoadDFMValues;\r\n dsBeleg2MargeProzent.AfterLoadDFMValues;\r\n dsBeleg2Warenkreditgesperrt.AfterLoadDFMValues;\r\n dsBeleg2Belegsprache.AfterLoadDFMValues;\r\n dsBeleg2Duplicate.AfterLoadDFMValues;\r\n dsBeleg2perEmail.AfterLoadDFMValues;\r\n dsBeleg2Ansprechpartner.AfterLoadDFMValues;\r\n dsBeleg2KundennummerFremd.AfterLoadDFMValues;\r\n dsBeleg2Protokoll.AfterLoadDFMValues;\r\n dsBeleg2Verleihauftrag.AfterLoadDFMValues;\r\n dsBeleg2VerleihVon.AfterLoadDFMValues;\r\n dsBeleg2VerleihBis.AfterLoadDFMValues;\r\n dsBeleg2AuftragGenehmigt.AfterLoadDFMValues;\r\n dsBeleg2gesperrt.AfterLoadDFMValues;\r\n dsBeleg2VerleihvonText.AfterLoadDFMValues;\r\n dsBeleg2VerleihbisText.AfterLoadDFMValues;\r\n dsBeleg2DruckWHG.AfterLoadDFMValues;\r\n dsBeleg2DruckWHGKurs.AfterLoadDFMValues;\r\n dsBeleg2ProzentsatzZusatzposition.AfterLoadDFMValues;\r\n dsBeleg2TextZusatzposition.AfterLoadDFMValues;\r\n dsBeleg2TextzusatzBeschreibung.AfterLoadDFMValues;\r\n dsBeleg2Layoutname.AfterLoadDFMValues;\r\n dsBeleg2Gesamtgewicht.AfterLoadDFMValues;\r\n dsBeleg2BetragZusatzposition.AfterLoadDFMValues;\r\n dsBeleg2ReferenzBestellung.AfterLoadDFMValues;\r\n dsBeleg2Termin1.AfterLoadDFMValues;\r\n dsBeleg2Termin2.AfterLoadDFMValues;\r\n dsBeleg2Zielkontaktnummer.AfterLoadDFMValues;\r\n dsBeleg2Zielkontaktname.AfterLoadDFMValues;\r\n dsBeleg2Bilddatei1.AfterLoadDFMValues;\r\n dsBeleg2Bilddatei2.AfterLoadDFMValues;\r\n dsBeleg2Zielkontaktnummer2.AfterLoadDFMValues;\r\n dsBeleg2Zielkontaktname2.AfterLoadDFMValues;\r\n dsBeleg2bestaetigt.AfterLoadDFMValues;\r\n dsBeleg2Zielkontaktnummer3.AfterLoadDFMValues;\r\n dsBeleg2Zielkontaktname3.AfterLoadDFMValues;\r\n dsBeleg2Termin3.AfterLoadDFMValues;\r\n dsBeleg2Termin4.AfterLoadDFMValues;\r\n dsBeleg2Muster.AfterLoadDFMValues;\r\n dsBeleg2KW.AfterLoadDFMValues;\r\n dsBeleg2Datenlink.AfterLoadDFMValues;\r\n dsBeleg2Mehrwertsteuersatz4.AfterLoadDFMValues;\r\n dsBeleg2Mehrwertsteuersatz5.AfterLoadDFMValues;\r\n dsBeleg2Mehrwertsteuersatz6.AfterLoadDFMValues;\r\n dsBeleg2BesteuerungKey.AfterLoadDFMValues;\r\n dsBeleg2VertreterMatchcode.AfterLoadDFMValues;\r\n dsBeleg2Verfasser.AfterLoadDFMValues;\r\n dsBeleg2LieferadresseID.AfterLoadDFMValues;\r\n dsBeleg2AuftragStatus.AfterLoadDFMValues;\r\n dsBeleg2MonatJahr.AfterLoadDFMValues;\r\n dsBeleg2Belegvariante.AfterLoadDFMValues;\r\n dsBeleg2Produktionsfreigabe.AfterLoadDFMValues;\r\n dsBeleg2ReferenzRahmenAuftrag.AfterLoadDFMValues;\r\n dsBeleg2DatumRahmenAuftrag.AfterLoadDFMValues;\r\n dsBeleg2FahrzeugID.AfterLoadDFMValues;\r\n dsBeleg2AuslieferungKW.AfterLoadDFMValues;\r\n dsBeleg2BereitstellungDatum.AfterLoadDFMValues;\r\n dsBeleg2VTUID.AfterLoadDFMValues;\r\n dsBeleg2LieferanschriftDaten.AfterLoadDFMValues;\r\n dsBeleg2GesamtVolumen.AfterLoadDFMValues;\r\n dsBeleg2BelegPKey.AfterLoadDFMValues;\r\n dsBeleg2DruckParameter.AfterLoadDFMValues;\r\n dsBeleg2ReferenzService.AfterLoadDFMValues;\r\n dsBeleg2ZusatzDaten.AfterLoadDFMValues;\r\n dsBeleg2StandPDF.AfterLoadDFMValues;\r\n dsBeleg2Paketdienst.AfterLoadDFMValues;\r\n dsBeleg2Monteur.AfterLoadDFMValues;\r\n dsBeleg2KundennummerKundennummer.AfterLoadDFMValues;\r\n dsBeleg2ServiceBemerkung.AfterLoadDFMValues;\r\n end;\r\nend;\r\n\r\nend.","unit unit_AuftragSuche;\r\n\r\ninterface\r\n\r\nuses\r\n System.SysUtils, System.Classes, JS, Web, WEBLib.Graphics, WEBLib.Controls,\r\n WEBLib.Forms, WEBLib.Dialogs, Data.DB, WEBLib.DB, XData.Web.JsonDataset,\r\n XData.Web.Dataset, XData.Web.Connection, Vcl.Controls, Vcl.StdCtrls,\r\n WEBLib.StdCtrls, WEBLib.ExtCtrls, Vcl.Grids, WEBLib.DBCtrls, VCL.TMSFNCTypes,\r\n VCL.TMSFNCUtils, VCL.TMSFNCGraphics, VCL.TMSFNCGraphicsTypes, strutils,\r\n VCL.TMSFNCCustomControl, VCL.TMSFNCTableView, WEBLib.Grids, WEBLib.Buttons, DB;\r\n\r\ntype\r\n TfrmAuftragSuche = class(TForm)\r\n DataSet: TXDataWebDataSet;\r\n Source: TDataSource;\r\n Container1: THTMLContainer;\r\n Container2: THTMLContainer;\r\n Container3: THTMLContainer;\r\n TC: TTableControl;\r\n btnzurueck: TButton;\r\n edtSuchbegriff: TEdit;\r\n ResultLabel: TLabel;\r\n DataSetNummerkomplett: TStringField;\r\n DataSetKundennummerKundennummer: TStringField;\r\n DataSetDatum: TDateTimeField;\r\n DataSetAuftragsbezeichnung: TStringField;\r\n DataSetNachname: TStringField;\r\n DataSetVorname: TStringField;\r\n procedure WebFormShow(Sender: TObject);\r\n procedure DataSetAfterOpen(DataSet: TDataSet);\r\n procedure btnzurueckClick(Sender: TObject);\r\n procedure edtSuchbegriffChange(Sender: TObject);\r\n\r\n public\r\n Auftragnummer:string;\r\n LUNachname:string;\r\n LUVorname:string;\r\n LUAuftragsbezeichnung:string;\r\n buttonAuftragnummer:TButton;\r\n procedure buttonAuftragnummerclick(Sender:TObject);\r\n protected procedure LoadDFMValues; override; end;\r\n\r\nvar\r\n frmAuftragSuche: TfrmAuftragSuche;\r\n\r\nimplementation\r\n uses unit1, unit2;\r\n{$R *.dfm}\r\n\r\n\r\nprocedure TfrmAuftragSuche.btnzurueckClick(Sender: TObject);\r\nbegin\r\n self.Close;\r\nend;\r\n\r\nprocedure TfrmAuftragSuche.buttonauftragnummerclick(Sender:TObject);\r\nbegin\r\n Auftragnummer:=(sender as TButton).Caption;\r\n dataset.Locate('Nummerkomplett',Auftragnummer,[]);\r\n LUNachname:=DataSetNachname.AsString;\r\n LUVorname:=DataSetVorname.AsString;\r\n LUAuftragsbezeichnung:=DataSetAuftragsbezeichnung.AsString;\r\n self.Close;\r\nend;\r\n\r\nprocedure TfrmAuftragSuche.DataSetAfterOpen(DataSet: TDataSet);\r\nvar\r\n i:integer;\r\n myelement:TJSHTMLElement;\r\nbegin\r\n myelement:=container3.ElementHandle;\r\n tc.ParentElement:=myelement;\r\n i:=0;\r\n TC.visible:=true;\r\n TC.ColCount:=4;\r\n tc.RowCount:=dataset.RecordCount+1;\r\n tc.Cells[0,i]:='Nummerkomplett';\r\n tc.Cells[1,i]:='Datum';\r\n tc.Cells[2,i]:='Auftragsbezeichnung';\r\n tc.Cells[3,i]:='Kunde';\r\n dataset.First;\r\n if dataset.RecordCount=0 then resultlabel.Caption:='nichts gefunden';\r\n if dataset.RecordCount>0 then resultlabel.Caption:='Übereinstimmungen: '+inttostr(dataset.RecordCount);\r\n if dataset.RecordCount>20 then resultlabel.Caption:='mehr als 20 Übereinstimmungen';\r\n\r\n while not dataset.eof do\r\n begin\r\n inc(i);\r\n myelement:=TC.cellelements[0,i];\r\n myelement.innerHTML:='';\r\n buttonauftragnummer:=TButton.Create(self);\r\n buttonauftragnummer.ElementClassName:='btn btn-sm btn-info';\r\n buttonauftragnummer.HeightStyle:=ssauto;\r\n buttonauftragnummer.Width:=150;\r\n buttonauftragnummer.tag:=0;\r\n buttonauftragnummer.Caption:=DataSetNummerkomplett.AsString;\r\n buttonauftragnummer.OnClick:=@buttonauftragnummerClick;\r\n buttonauftragnummer.ParentElement:=myelement;\r\n TC.Cells[1,i]:=formatdatetime('DD.MM.YYYY',DataSetDatum.Asdatetime);\r\n TC.Cells[2,i]:=DataSetAuftragsbezeichnung.AsString;\r\n TC.Cells[3,i]:=trim(DataSetVorname.AsString+' '+DataSetNachname.AsString)+' ('+DataSetKundennummerKundennummer.AsString+')';\r\n dataset.Next;\r\n end;\r\n\r\nend;\r\n\r\n\r\n\r\nprocedure TfrmAuftragSuche.edtSuchbegriffChange(Sender: TObject);\r\nvar\r\n suchtextkontakt:string;\r\nbegin\r\n suchtextkontakt:=edtsuchbegriff.Text;\r\n if length(suchtextkontakt)>0 then\r\n begin\r\n dataset.Close;\r\n dataset.QueryString:='$expand=Kundennummer&$filter=(Auftragerledigt eq 0) AND (contains(Nummerkomplett, '''+edtsuchbegriff.Text+''') OR contains(Kundennummer, '''+edtsuchbegriff.Text+''') OR contains(Auftragsbezeichnung, '''+edtsuchbegriff.Text+'''))&$orderby=Nummerkomplett DESC';\r\n dataset.Load;\r\n end;\r\n\r\nend;\r\n\r\nprocedure TfrmAuftragSuche.WebFormShow(Sender: TObject);\r\nvar\r\n myelement:TJSHTMLElement;\r\nbegin\r\n Container1.html.text:='';\r\n myelement:=container1.ElementHandle;\r\n btnzurueck.ParentElement:=myelement;\r\n container2.ParentElement:=myelement;\r\n Container3.ParentElement:=myelement;\r\n myelement:=container2.ElementHandle;\r\n resultlabel.Caption:='Suchbegriff';\r\n resultlabel.ParentElement:=myelement;\r\n edtsuchbegriff.ParentElement:=myelement;\r\n TC.Visible:=false;\r\n Auftragnummer:='';\r\n edtsuchbegriff.SetFocus;\r\n if PZE_AutoAuftragnummer<>'' then\r\n begin\r\n edtsuchbegriff.Text:=PZE_AutoAuftragnummer;\r\n edtsuchbegriffChange(sender);\r\n PZE_AutoAuftragnummer:='';\r\n end;\r\nend;\r\n\r\nprocedure TfrmAuftragSuche.LoadDFMValues;\r\nbegin\r\n inherited LoadDFMValues;\r\n\r\n ResultLabel := TLabel.Create(Self);\r\n Container1 := THTMLContainer.Create(Self);\r\n Container2 := THTMLContainer.Create(Self);\r\n Container3 := THTMLContainer.Create(Self);\r\n TC := TTableControl.Create(Self);\r\n btnzurueck := TButton.Create(Self);\r\n edtSuchbegriff := TEdit.Create(Self);\r\n DataSet := TXDataWebDataSet.Create(Self);\r\n DataSetNummerkomplett := TStringField.Create(Self);\r\n DataSetDatum := TDateTimeField.Create(Self);\r\n DataSetAuftragsbezeichnung := TStringField.Create(Self);\r\n DataSetKundennummerKundennummer := TStringField.Create(Self);\r\n DataSetNachname := TStringField.Create(Self);\r\n DataSetVorname := TStringField.Create(Self);\r\n Source := TDataSource.Create(Self);\r\n\r\n ResultLabel.BeforeLoadDFMValues;\r\n Container1.BeforeLoadDFMValues;\r\n Container2.BeforeLoadDFMValues;\r\n Container3.BeforeLoadDFMValues;\r\n TC.BeforeLoadDFMValues;\r\n btnzurueck.BeforeLoadDFMValues;\r\n edtSuchbegriff.BeforeLoadDFMValues;\r\n DataSet.BeforeLoadDFMValues;\r\n DataSetNummerkomplett.BeforeLoadDFMValues;\r\n DataSetDatum.BeforeLoadDFMValues;\r\n DataSetAuftragsbezeichnung.BeforeLoadDFMValues;\r\n DataSetKundennummerKundennummer.BeforeLoadDFMValues;\r\n DataSetNachname.BeforeLoadDFMValues;\r\n DataSetVorname.BeforeLoadDFMValues;\r\n Source.BeforeLoadDFMValues;\r\n try\r\n Name := 'frmAuftragSuche';\r\n Width := 223;\r\n Height := 376;\r\n CSSLibrary := cssBootstrap;\r\n ElementFont := efCSS;\r\n SetEvent(Self, 'OnShow', 'WebFormShow');\r\n ResultLabel.SetParentComponent(Self);\r\n ResultLabel.Name := 'ResultLabel';\r\n ResultLabel.Left := 114;\r\n ResultLabel.Top := 231;\r\n ResultLabel.Width := 60;\r\n ResultLabel.Height := 15;\r\n ResultLabel.Caption := 'ResultLabel';\r\n ResultLabel.ElementClassName := 'h6 m-2';\r\n ResultLabel.ElementFont := efCSS;\r\n ResultLabel.ElementPosition := epIgnore;\r\n ResultLabel.HeightStyle := ssAuto;\r\n ResultLabel.HeightPercent := 100.000000000000000000;\r\n ResultLabel.WidthStyle := ssPercent;\r\n ResultLabel.WidthPercent := 100.000000000000000000;\r\n Container1.SetParentComponent(Self);\r\n Container1.Name := 'Container1';\r\n Container1.Left := 0;\r\n Container1.Top := 0;\r\n Container1.Width := 169;\r\n Container1.Height := 41;\r\n Container1.HeightStyle := ssAuto;\r\n Container1.WidthStyle := ssPercent;\r\n Container1.ElementFont := efCSS;\r\n Container1.ElementPosition := epIgnore;\r\n Container2.SetParentComponent(Self);\r\n Container2.Name := 'Container2';\r\n Container2.Left := 0;\r\n Container2.Top := 47;\r\n Container2.Width := 169;\r\n Container2.Height := 41;\r\n Container2.ElementClassName := 'd-flex flex-wrap m-1 border border-info';\r\n Container2.HeightStyle := ssAuto;\r\n Container2.WidthStyle := ssAuto;\r\n Container2.ChildOrder := 1;\r\n Container2.ElementFont := efCSS;\r\n Container2.ElementPosition := epIgnore;\r\n Container3.SetParentComponent(Self);\r\n Container3.Name := 'Container3';\r\n Container3.Left := 0;\r\n Container3.Top := 94;\r\n Container3.Width := 169;\r\n Container3.Height := 41;\r\n Container3.ElementClassName := 'd-flex m-1';\r\n Container3.HeightStyle := ssAuto;\r\n Container3.WidthStyle := ssAuto;\r\n Container3.ChildOrder := 2;\r\n Container3.ElementFont := efCSS;\r\n Container3.ElementPosition := epIgnore;\r\n TC.SetParentComponent(Self);\r\n TC.Name := 'TC';\r\n TC.Left := 0;\r\n TC.Top := 141;\r\n TC.Width := 169;\r\n TC.Height := 79;\r\n TC.ElementClassName := 'table table-hover table-bordered table-striped';\r\n TC.HeightStyle := ssAuto;\r\n TC.WidthStyle := ssPercent;\r\n TC.BorderColor := clSilver;\r\n TC.ChildOrder := 3;\r\n TC.ColHeader := False;\r\n TC.ElementFont := efCSS;\r\n TC.ElementHeaderClassName := 'table-info';\r\n TC.ElementPosition := epIgnore;\r\n TC.ElementTableClassName := 'table table-hover table-bordered table-striped';\r\n TC.WordWrap := True;\r\n TC.ColCount := 1;\r\n TC.RowCount := 5;\r\n btnzurueck.SetParentComponent(Self);\r\n btnzurueck.Name := 'btnzurueck';\r\n btnzurueck.Left := 0;\r\n btnzurueck.Top := 226;\r\n btnzurueck.Width := 96;\r\n btnzurueck.Height := 25;\r\n btnzurueck.Caption := '<< zur'#252'ck';\r\n btnzurueck.ChildOrder := 4;\r\n btnzurueck.ElementClassName := 'btn btn-info btn-sm m-1 text-left';\r\n btnzurueck.ElementFont := efCSS;\r\n btnzurueck.ElementPosition := epIgnore;\r\n btnzurueck.HeightStyle := ssAuto;\r\n btnzurueck.HeightPercent := 100.000000000000000000;\r\n btnzurueck.WidthStyle := ssAuto;\r\n btnzurueck.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnzurueck, Self, 'OnClick', 'btnzurueckClick');\r\n edtSuchbegriff.SetParentComponent(Self);\r\n edtSuchbegriff.Name := 'edtSuchbegriff';\r\n edtSuchbegriff.Left := 8;\r\n edtSuchbegriff.Top := 296;\r\n edtSuchbegriff.Width := 150;\r\n edtSuchbegriff.Height := 22;\r\n edtSuchbegriff.AutoSelect := False;\r\n edtSuchbegriff.ChildOrder := 6;\r\n edtSuchbegriff.ElementClassName := 'form-control input-sm m-1';\r\n edtSuchbegriff.ElementFont := efCSS;\r\n edtSuchbegriff.ElementPosition := epIgnore;\r\n edtSuchbegriff.HeightStyle := ssAuto;\r\n edtSuchbegriff.HeightPercent := 100.000000000000000000;\r\n edtSuchbegriff.ShowHint := True;\r\n edtSuchbegriff.TextHint := 'Suchbegriff eingeben';\r\n edtSuchbegriff.WidthPercent := 60.000000000000000000;\r\n SetEvent(edtSuchbegriff, Self, 'OnChange', 'edtSuchbegriffChange');\r\n DataSet.SetParentComponent(Self);\r\n DataSet.Name := 'DataSet';\r\n DataSet.AfterOpen := DataSetAfterOpen;\r\n DataSet.EntitySetName := 'Auftrag';\r\n DataSet.Connection := DM2.XDataWebConnection1;\r\n DataSet.SubpropsDepth := 1;\r\n DataSet.QueryString := '$expand=Kundennummer&$filter=(Auftragerledigt eq 0)&$orderby=Nummerkomplett DESC';\r\n DataSet.QueryTop := 20;\r\n DataSet.Left := 8;\r\n DataSet.Top := 56;\r\n DataSetNummerkomplett.SetParentComponent(DataSet);\r\n DataSetNummerkomplett.Name := 'DataSetNummerkomplett';\r\n DataSetNummerkomplett.FieldName := 'Nummerkomplett';\r\n DataSetNummerkomplett.Required := True;\r\n DataSetNummerkomplett.Size := 10;\r\n DataSetDatum.SetParentComponent(DataSet);\r\n DataSetDatum.Name := 'DataSetDatum';\r\n DataSetDatum.FieldName := 'Datum';\r\n DataSetDatum.Required := True;\r\n DataSetAuftragsbezeichnung.SetParentComponent(DataSet);\r\n DataSetAuftragsbezeichnung.Name := 'DataSetAuftragsbezeichnung';\r\n DataSetAuftragsbezeichnung.FieldName := 'Auftragsbezeichnung';\r\n DataSetAuftragsbezeichnung.Size := 255;\r\n DataSetKundennummerKundennummer.SetParentComponent(DataSet);\r\n DataSetKundennummerKundennummer.Name := 'DataSetKundennummerKundennummer';\r\n DataSetKundennummerKundennummer.FieldName := 'Kundennummer.Kundennummer';\r\n DataSetKundennummerKundennummer.Size := 13;\r\n DataSetNachname.SetParentComponent(DataSet);\r\n DataSetNachname.Name := 'DataSetNachname';\r\n DataSetNachname.FieldName := 'Nachname';\r\n DataSetNachname.Size := 50;\r\n DataSetVorname.SetParentComponent(DataSet);\r\n DataSetVorname.Name := 'DataSetVorname';\r\n DataSetVorname.FieldName := 'Vorname';\r\n DataSetVorname.Size := 50;\r\n Source.SetParentComponent(Self);\r\n Source.Name := 'Source';\r\n Source.DataSet := DataSet;\r\n Source.Left := 56;\r\n Source.Top := 56;\r\n finally\r\n ResultLabel.AfterLoadDFMValues;\r\n Container1.AfterLoadDFMValues;\r\n Container2.AfterLoadDFMValues;\r\n Container3.AfterLoadDFMValues;\r\n TC.AfterLoadDFMValues;\r\n btnzurueck.AfterLoadDFMValues;\r\n edtSuchbegriff.AfterLoadDFMValues;\r\n DataSet.AfterLoadDFMValues;\r\n DataSetNummerkomplett.AfterLoadDFMValues;\r\n DataSetDatum.AfterLoadDFMValues;\r\n DataSetAuftragsbezeichnung.AfterLoadDFMValues;\r\n DataSetKundennummerKundennummer.AfterLoadDFMValues;\r\n DataSetNachname.AfterLoadDFMValues;\r\n DataSetVorname.AfterLoadDFMValues;\r\n Source.AfterLoadDFMValues;\r\n end;\r\nend;\r\n\r\nend.\r\n","unit unit_ProduktionSuche;\r\n\r\ninterface\r\n\r\nuses\r\n System.SysUtils, System.Classes, JS, Web, WEBLib.Graphics, WEBLib.Controls,\r\n WEBLib.Forms, WEBLib.Dialogs, Data.DB, WEBLib.DB, XData.Web.JsonDataset,\r\n XData.Web.Dataset, XData.Web.Connection, Vcl.Controls, Vcl.StdCtrls,\r\n WEBLib.StdCtrls, WEBLib.ExtCtrls, Vcl.Grids, WEBLib.DBCtrls, VCL.TMSFNCTypes,\r\n VCL.TMSFNCUtils, VCL.TMSFNCGraphics, VCL.TMSFNCGraphicsTypes, strutils,\r\n VCL.TMSFNCCustomControl, VCL.TMSFNCTableView, WEBLib.Grids, WEBLib.Buttons, DB;\r\n\r\ntype\r\n TfrmProduktionSuche = class(TForm)\r\n DataSet: TXDataWebDataSet;\r\n Source: TDataSource;\r\n Container1: THTMLContainer;\r\n Container2: THTMLContainer;\r\n Container3: THTMLContainer;\r\n TC: TTableControl;\r\n btnzurueck: TButton;\r\n edtSuchbegriff: TEdit;\r\n ResultLabel: TLabel;\r\n DataSetNummerkomplett: TStringField;\r\n DataSetDatum: TDateTimeField;\r\n DataSetAuftragsbezeichnung: TStringField;\r\n DataSetInterneReferenz: TStringField;\r\n procedure WebFormShow(Sender: TObject);\r\n procedure DataSetAfterOpen(DataSet: TDataSet);\r\n procedure btnzurueckClick(Sender: TObject);\r\n procedure edtSuchbegriffChange(Sender: TObject);\r\n\r\n public\r\n Produktionnummer:string;\r\n LUAuftragsbezeichnung:string;\r\n buttonAuftragnummer:TButton;\r\n procedure buttonAuftragnummerclick(Sender:TObject);\r\n protected procedure LoadDFMValues; override; end;\r\n\r\nvar\r\n frmProduktionSuche: TfrmProduktionSuche;\r\n\r\nimplementation\r\n uses unit1, unit2;\r\n{$R *.dfm}\r\n\r\n\r\nprocedure TfrmProduktionSuche.btnzurueckClick(Sender: TObject);\r\nbegin\r\n self.Close;\r\nend;\r\n\r\nprocedure TfrmProduktionSuche.buttonauftragnummerclick(Sender:TObject);\r\nbegin\r\n Produktionnummer:=(sender as TButton).Caption;\r\n dataset.Locate('Nummerkomplett',Produktionnummer,[]);\r\n LUAuftragsbezeichnung:=DataSetAuftragsbezeichnung.AsString;\r\n self.Close;\r\nend;\r\n\r\nprocedure TfrmProduktionSuche.DataSetAfterOpen(DataSet: TDataSet);\r\nvar\r\n i:integer;\r\n myelement:TJSHTMLElement;\r\nbegin\r\n myelement:=container3.ElementHandle;\r\n tc.ParentElement:=myelement;\r\n i:=0;\r\n TC.visible:=true;\r\n TC.ColCount:=4;\r\n tc.RowCount:=dataset.RecordCount+1;\r\n tc.Cells[0,i]:='Nummerkomplett';\r\n tc.Cells[1,i]:='Datum';\r\n tc.Cells[2,i]:='Auftragsbezeichnung';\r\n tc.Cells[3,i]:='InterneReferenz';\r\n dataset.First;\r\n if dataset.RecordCount=0 then resultlabel.Caption:='nichts gefunden';\r\n if dataset.RecordCount>0 then resultlabel.Caption:='Übereinstimmungen: '+inttostr(dataset.RecordCount);\r\n if dataset.RecordCount>20 then resultlabel.Caption:='mehr als 20 Übereinstimmungen';\r\n\r\n while not dataset.eof do\r\n begin\r\n inc(i);\r\n myelement:=TC.cellelements[0,i];\r\n myelement.innerHTML:='';\r\n buttonauftragnummer:=TButton.Create(self);\r\n buttonauftragnummer.ElementClassName:='btn btn-sm btn-info';\r\n buttonauftragnummer.HeightStyle:=ssauto;\r\n buttonauftragnummer.Width:=150;\r\n buttonauftragnummer.tag:=0;\r\n buttonauftragnummer.Caption:=DataSetNummerkomplett.AsString;\r\n buttonauftragnummer.OnClick:=@buttonauftragnummerClick;\r\n buttonauftragnummer.ParentElement:=myelement;\r\n TC.Cells[1,i]:=formatdatetime('DD.MM.YYYY',DataSetDatum.Asdatetime);\r\n TC.Cells[2,i]:=DataSetAuftragsbezeichnung.AsString;\r\n TC.Cells[3,i]:=DataSetInterneReferenz.AsString;\r\n dataset.Next;\r\n end;\r\n\r\nend;\r\n\r\n\r\n\r\nprocedure TfrmProduktionSuche.edtSuchbegriffChange(Sender: TObject);\r\nvar\r\n suchtextkontakt:string;\r\nbegin\r\n suchtextkontakt:=edtsuchbegriff.Text;\r\n if length(suchtextkontakt)>0 then\r\n begin\r\n dataset.Close;\r\n dataset.QueryString:='$filter=(PStatus lt 9) AND (contains(Nummerkomplett, '''+edtsuchbegriff.Text+''') OR contains(InterneReferenz, '''+edtsuchbegriff.Text+''') OR contains(Auftragsbezeichnung, '''+edtsuchbegriff.Text+'''))&$orderby=Nummerkomplett DESC';\r\n dataset.Load;\r\n end;\r\n\r\nend;\r\n\r\nprocedure TfrmProduktionSuche.WebFormShow(Sender: TObject);\r\nvar\r\n myelement:TJSHTMLElement;\r\nbegin\r\n Container1.html.text:='';\r\n myelement:=container1.ElementHandle;\r\n btnzurueck.ParentElement:=myelement;\r\n container2.ParentElement:=myelement;\r\n Container3.ParentElement:=myelement;\r\n myelement:=container2.ElementHandle;\r\n resultlabel.Caption:='Suchbegriff';\r\n resultlabel.ParentElement:=myelement;\r\n edtsuchbegriff.ParentElement:=myelement;\r\n TC.Visible:=false;\r\n Produktionnummer:='';\r\n edtsuchbegriff.SetFocus;\r\nend;\r\n\r\nprocedure TfrmProduktionSuche.LoadDFMValues;\r\nbegin\r\n inherited LoadDFMValues;\r\n\r\n ResultLabel := TLabel.Create(Self);\r\n Container1 := THTMLContainer.Create(Self);\r\n Container2 := THTMLContainer.Create(Self);\r\n Container3 := THTMLContainer.Create(Self);\r\n TC := TTableControl.Create(Self);\r\n btnzurueck := TButton.Create(Self);\r\n edtSuchbegriff := TEdit.Create(Self);\r\n DataSet := TXDataWebDataSet.Create(Self);\r\n DataSetNummerkomplett := TStringField.Create(Self);\r\n DataSetDatum := TDateTimeField.Create(Self);\r\n DataSetAuftragsbezeichnung := TStringField.Create(Self);\r\n DataSetInterneReferenz := TStringField.Create(Self);\r\n Source := TDataSource.Create(Self);\r\n\r\n ResultLabel.BeforeLoadDFMValues;\r\n Container1.BeforeLoadDFMValues;\r\n Container2.BeforeLoadDFMValues;\r\n Container3.BeforeLoadDFMValues;\r\n TC.BeforeLoadDFMValues;\r\n btnzurueck.BeforeLoadDFMValues;\r\n edtSuchbegriff.BeforeLoadDFMValues;\r\n DataSet.BeforeLoadDFMValues;\r\n DataSetNummerkomplett.BeforeLoadDFMValues;\r\n DataSetDatum.BeforeLoadDFMValues;\r\n DataSetAuftragsbezeichnung.BeforeLoadDFMValues;\r\n DataSetInterneReferenz.BeforeLoadDFMValues;\r\n Source.BeforeLoadDFMValues;\r\n try\r\n Name := 'frmProduktionSuche';\r\n Width := 223;\r\n Height := 376;\r\n CSSLibrary := cssBootstrap;\r\n ElementFont := efCSS;\r\n SetEvent(Self, 'OnShow', 'WebFormShow');\r\n ResultLabel.SetParentComponent(Self);\r\n ResultLabel.Name := 'ResultLabel';\r\n ResultLabel.Left := 114;\r\n ResultLabel.Top := 231;\r\n ResultLabel.Width := 60;\r\n ResultLabel.Height := 15;\r\n ResultLabel.Caption := 'ResultLabel';\r\n ResultLabel.ElementClassName := 'h6 m-2';\r\n ResultLabel.ElementFont := efCSS;\r\n ResultLabel.ElementPosition := epIgnore;\r\n ResultLabel.HeightStyle := ssAuto;\r\n ResultLabel.HeightPercent := 100.000000000000000000;\r\n ResultLabel.WidthStyle := ssPercent;\r\n ResultLabel.WidthPercent := 100.000000000000000000;\r\n Container1.SetParentComponent(Self);\r\n Container1.Name := 'Container1';\r\n Container1.Left := 0;\r\n Container1.Top := 0;\r\n Container1.Width := 169;\r\n Container1.Height := 41;\r\n Container1.HeightStyle := ssAuto;\r\n Container1.WidthStyle := ssPercent;\r\n Container1.ElementFont := efCSS;\r\n Container1.ElementPosition := epIgnore;\r\n Container2.SetParentComponent(Self);\r\n Container2.Name := 'Container2';\r\n Container2.Left := 0;\r\n Container2.Top := 47;\r\n Container2.Width := 169;\r\n Container2.Height := 41;\r\n Container2.ElementClassName := 'd-flex flex-wrap m-1 border border-info';\r\n Container2.HeightStyle := ssAuto;\r\n Container2.WidthStyle := ssAuto;\r\n Container2.ChildOrder := 1;\r\n Container2.ElementFont := efCSS;\r\n Container2.ElementPosition := epIgnore;\r\n Container3.SetParentComponent(Self);\r\n Container3.Name := 'Container3';\r\n Container3.Left := 0;\r\n Container3.Top := 94;\r\n Container3.Width := 169;\r\n Container3.Height := 41;\r\n Container3.ElementClassName := 'd-flex m-1';\r\n Container3.HeightStyle := ssAuto;\r\n Container3.WidthStyle := ssAuto;\r\n Container3.ChildOrder := 2;\r\n Container3.ElementFont := efCSS;\r\n Container3.ElementPosition := epIgnore;\r\n TC.SetParentComponent(Self);\r\n TC.Name := 'TC';\r\n TC.Left := 0;\r\n TC.Top := 141;\r\n TC.Width := 169;\r\n TC.Height := 79;\r\n TC.ElementClassName := 'table table-hover table-bordered table-striped';\r\n TC.HeightStyle := ssAuto;\r\n TC.WidthStyle := ssPercent;\r\n TC.BorderColor := clSilver;\r\n TC.ChildOrder := 3;\r\n TC.ColHeader := False;\r\n TC.ElementFont := efCSS;\r\n TC.ElementHeaderClassName := 'table-info';\r\n TC.ElementPosition := epIgnore;\r\n TC.ElementTableClassName := 'table table-hover table-bordered table-striped';\r\n TC.WordWrap := True;\r\n TC.ColCount := 1;\r\n TC.RowCount := 5;\r\n btnzurueck.SetParentComponent(Self);\r\n btnzurueck.Name := 'btnzurueck';\r\n btnzurueck.Left := 0;\r\n btnzurueck.Top := 226;\r\n btnzurueck.Width := 96;\r\n btnzurueck.Height := 25;\r\n btnzurueck.Caption := '<< zur'#252'ck';\r\n btnzurueck.ChildOrder := 4;\r\n btnzurueck.ElementClassName := 'btn btn-info btn-sm m-1 text-left';\r\n btnzurueck.ElementFont := efCSS;\r\n btnzurueck.ElementPosition := epIgnore;\r\n btnzurueck.HeightStyle := ssAuto;\r\n btnzurueck.HeightPercent := 100.000000000000000000;\r\n btnzurueck.WidthStyle := ssAuto;\r\n btnzurueck.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnzurueck, Self, 'OnClick', 'btnzurueckClick');\r\n edtSuchbegriff.SetParentComponent(Self);\r\n edtSuchbegriff.Name := 'edtSuchbegriff';\r\n edtSuchbegriff.Left := 8;\r\n edtSuchbegriff.Top := 296;\r\n edtSuchbegriff.Width := 150;\r\n edtSuchbegriff.Height := 22;\r\n edtSuchbegriff.AutoSelect := False;\r\n edtSuchbegriff.ChildOrder := 6;\r\n edtSuchbegriff.ElementClassName := 'form-control input-sm m-1';\r\n edtSuchbegriff.ElementFont := efCSS;\r\n edtSuchbegriff.ElementPosition := epIgnore;\r\n edtSuchbegriff.HeightStyle := ssAuto;\r\n edtSuchbegriff.HeightPercent := 100.000000000000000000;\r\n edtSuchbegriff.ShowHint := True;\r\n edtSuchbegriff.TextHint := 'Suchbegriff eingeben';\r\n edtSuchbegriff.WidthPercent := 60.000000000000000000;\r\n SetEvent(edtSuchbegriff, Self, 'OnChange', 'edtSuchbegriffChange');\r\n DataSet.SetParentComponent(Self);\r\n DataSet.Name := 'DataSet';\r\n DataSet.AfterOpen := DataSetAfterOpen;\r\n DataSet.EntitySetName := 'Produktion';\r\n DataSet.Connection := DM2.XDataWebConnection1;\r\n DataSet.QueryString := '$filter=(PStatus lt 9)&$orderby=Nummerkomplett DESC';\r\n DataSet.QueryTop := 20;\r\n DataSet.Left := 8;\r\n DataSet.Top := 56;\r\n DataSetNummerkomplett.SetParentComponent(DataSet);\r\n DataSetNummerkomplett.Name := 'DataSetNummerkomplett';\r\n DataSetNummerkomplett.FieldName := 'Nummerkomplett';\r\n DataSetNummerkomplett.Required := True;\r\n DataSetNummerkomplett.Size := 10;\r\n DataSetDatum.SetParentComponent(DataSet);\r\n DataSetDatum.Name := 'DataSetDatum';\r\n DataSetDatum.FieldName := 'Datum';\r\n DataSetDatum.Required := True;\r\n DataSetAuftragsbezeichnung.SetParentComponent(DataSet);\r\n DataSetAuftragsbezeichnung.Name := 'DataSetAuftragsbezeichnung';\r\n DataSetAuftragsbezeichnung.FieldName := 'Auftragsbezeichnung';\r\n DataSetAuftragsbezeichnung.Size := 255;\r\n DataSetInterneReferenz.SetParentComponent(DataSet);\r\n DataSetInterneReferenz.Name := 'DataSetInterneReferenz';\r\n DataSetInterneReferenz.FieldName := 'InterneReferenz';\r\n DataSetInterneReferenz.Size := 50;\r\n Source.SetParentComponent(Self);\r\n Source.Name := 'Source';\r\n Source.DataSet := DataSet;\r\n Source.Left := 56;\r\n Source.Top := 56;\r\n finally\r\n ResultLabel.AfterLoadDFMValues;\r\n Container1.AfterLoadDFMValues;\r\n Container2.AfterLoadDFMValues;\r\n Container3.AfterLoadDFMValues;\r\n TC.AfterLoadDFMValues;\r\n btnzurueck.AfterLoadDFMValues;\r\n edtSuchbegriff.AfterLoadDFMValues;\r\n DataSet.AfterLoadDFMValues;\r\n DataSetNummerkomplett.AfterLoadDFMValues;\r\n DataSetDatum.AfterLoadDFMValues;\r\n DataSetAuftragsbezeichnung.AfterLoadDFMValues;\r\n DataSetInterneReferenz.AfterLoadDFMValues;\r\n Source.AfterLoadDFMValues;\r\n end;\r\nend;\r\n\r\nend.\r\n","unit unit_Kontaktnummersuche;\r\n\r\ninterface\r\n\r\nuses\r\n System.SysUtils, System.Classes, JS, Web, WEBLib.Graphics, WEBLib.Controls,\r\n WEBLib.Forms, WEBLib.Dialogs, Data.DB, WEBLib.DB, XData.Web.JsonDataset,\r\n XData.Web.Dataset, XData.Web.Connection, Vcl.Controls, Vcl.StdCtrls,\r\n WEBLib.StdCtrls, WEBLib.ExtCtrls, Vcl.Grids, WEBLib.DBCtrls, VCL.TMSFNCTypes,\r\n VCL.TMSFNCUtils, VCL.TMSFNCGraphics, VCL.TMSFNCGraphicsTypes, strutils,\r\n VCL.TMSFNCCustomControl, VCL.TMSFNCTableView, WEBLib.Grids, WEBLib.Buttons, DB;\r\n\r\ntype\r\n TfrmKontaktNummerSuche = class(TForm)\r\n DataSet: TXDataWebDataSet;\r\n Source: TDataSource;\r\n DataSetKundennummer: TStringField;\r\n DataSetNachname: TStringField;\r\n DataSetVorname: TStringField;\r\n DataSetAdresseBild: TStringField;\r\n Container1: THTMLContainer;\r\n Container2: THTMLContainer;\r\n Container3: THTMLContainer;\r\n TC: TTableControl;\r\n btnzurueck: TButton;\r\n btnScan: TButton;\r\n edtSuchbegriff: TEdit;\r\n ResultLabel: TLabel;\r\n procedure WebFormShow(Sender: TObject);\r\n procedure DataSetAfterOpen(DataSet: TDataSet);\r\n procedure btnzurueckClick(Sender: TObject);\r\n procedure btnScanClick(Sender: TObject);\r\n procedure edtSuchbegriffChange(Sender: TObject);\r\n\r\n public\r\n Kontaktnummer:string;\r\n LUNachname:string;\r\n LUVorname:string;\r\n LUAdressebild:string;\r\n weiterzuEinzelkontakt:boolean;\r\n buttonkundennummer:TButton;\r\n procedure buttonkundennummerclick(Sender:TObject);\r\n protected procedure LoadDFMValues; override; end;\r\n\r\nvar\r\n frmKontaktNummerSuche: TfrmKontaktNummerSuche;\r\n\r\nimplementation\r\n uses unit1, unit2, unit_EinzelKontakt, unit_BarcodeScan;\r\n{$R *.dfm}\r\n\r\n\r\nprocedure TfrmKontaktNummerSuche.btnScanClick(Sender: TObject);\r\nvar\r\n LFrm:TBarcodeScan;\r\n procedure AfterCreate(AForm:TObject);\r\n var\r\n LForm:TBarcodeScan;\r\n begin\r\n LForm:=(AForm as TBarcodeScan);\r\n //lform.mykundehint:=xdsEinzelkontaktKundennummer.AsString+' '+xdsEinzelkontaktNachname.AsString+', '+xdsEinzelkontaktVorname.asstring;\r\n //lForm.edttoaddress.Text:= xdsEinzelkontaktPostleitzahl.AsString+' '+xdsEinzelkontaktort.AsString+', '+xdsEinzelkontaktStrasse.AsString;\r\n\r\n end;\r\n\r\n procedure AfterShowmodal(Avalue:TModalResult);\r\n begin\r\n edtsuchbegriff.text:=lfrm.ScanErgebnis;\r\n edtsuchbegriffChange(self);\r\n end;\r\n begin\r\n if LizenzOK then\r\n begin\r\n LFrm:=TBarcodeScan.CreateNew(@AfterCreate);\r\n LFrm.ShowModal(@AfterShowmodal);\r\n end\r\n else\r\n begin\r\n showmessage('Für diese Funktion sind Sie noch nicht freigeschaltet, bitte erwerben Sie eine Lizenz');\r\n end;\r\n\r\nend;\r\n\r\nprocedure TfrmKontaktNummerSuche.btnzurueckClick(Sender: TObject);\r\nbegin\r\n self.Close;\r\nend;\r\n\r\nprocedure TfrmKontaktNummerSuche.buttonkundennummerclick(Sender:TObject);\r\nvar\r\n MFrm:TEinzelkontakt;\r\n procedure AfterCreate(AForm:TObject);\r\n var\r\n MForm:TEinzelkontakt;\r\n begin\r\n MForm:=(AForm as TEinzelkontakt);\r\n MForm.KundennummerID:=Kontaktnummer;\r\n end;\r\n\r\n procedure AfterShowmodal(Avalue:TModalResult);\r\n begin\r\n edtsuchbegriffChange(nil);\r\n end;\r\n\r\n begin\r\n\r\n Kontaktnummer:=(sender as TButton).Caption;\r\n dataset.Locate('Kundennummer',kontaktnummer,[]);\r\n LUNachname:=DataSetNachname.AsString;\r\n LUVorname:=DataSetVorname.AsString;\r\n LUAdressebild:=DataSetAdresseBild.AsString;\r\n if weiterzueinzelkontakt then\r\n begin\r\n Container3.HTML.Text:='';\r\n MFrm:=TEinzelkontakt.CreateNew(@AfterCreate);\r\n MFrm.ShowModal(@AfterShowmodal);\r\n end\r\n else\r\n begin\r\n self.Close;\r\n end;\r\nend;\r\n\r\n\r\n\r\nprocedure TfrmKontaktNummerSuche.DataSetAfterOpen(DataSet: TDataSet);\r\nvar\r\n i:integer;\r\n myelement:TJSHTMLElement;\r\nbegin\r\n myelement:=container3.ElementHandle;\r\n tc.ParentElement:=myelement;\r\n i:=0;\r\n TC.visible:=true;\r\n TC.ColCount:=4;\r\n tc.RowCount:=dataset.RecordCount+1;\r\n tc.Cells[0,i]:='Kundennummer';\r\n tc.Cells[1,i]:='Nachname';\r\n tc.Cells[2,i]:='Vorname';\r\n tc.Cells[3,i]:='Anschrift';\r\n dataset.First;\r\n if dataset.RecordCount=0 then resultlabel.Caption:='nichts gefunden';\r\n if dataset.RecordCount>0 then resultlabel.Caption:='Übereinstimmungen: '+inttostr(dataset.RecordCount);\r\n if dataset.RecordCount>20 then resultlabel.Caption:='mehr als 20 Übereinstimmungen';\r\n\r\n while not dataset.eof do\r\n begin\r\n inc(i);\r\n myelement:=TC.cellelements[0,i];\r\n myelement.innerHTML:='';\r\n buttonkundennummer:=TButton.Create(self);\r\n buttonkundennummer.ElementClassName:='btn btn-sm btn-info';\r\n buttonkundennummer.HeightStyle:=ssauto;\r\n buttonkundennummer.Width:=150;\r\n buttonkundennummer.tag:=0;\r\n buttonkundennummer.Caption:=DataSetKundennummer.AsString;\r\n buttonkundennummer.OnClick:=@buttonkundennummerClick;\r\n buttonkundennummer.ParentElement:=myelement;\r\n TC.Cells[1,i]:=DataSetNachname.AsString;\r\n TC.Cells[2,i]:=DataSetVorname.AsString;\r\n TC.Cells[3,i]:='
'+ReplaceStr(DataSetAdresseBild.AsString,#13+#10,'
');;\r\n dataset.Next;\r\n end;\r\n\r\nend;\r\n\r\n\r\n\r\nprocedure TfrmKontaktNummerSuche.edtSuchbegriffChange(Sender: TObject);\r\nvar\r\n suchtextkontakt:string;\r\nbegin\r\n suchtextkontakt:=edtsuchbegriff.Text;\r\n if length(suchtextkontakt)>0 then\r\n begin\r\n dataset.Close;\r\n dataset.QueryString:='$filter= Kundennummer eq '+quotedstr(edtsuchbegriff.Text);\r\n dataset.Load;\r\n end;\r\n\r\nend;\r\n\r\nprocedure TfrmKontaktNummerSuche.WebFormShow(Sender: TObject);\r\nvar\r\n myelement:TJSHTMLElement;\r\nbegin\r\n Container1.html.text:='';\r\n myelement:=container1.ElementHandle;\r\n btnzurueck.ParentElement:=myelement;\r\n btnscan.ParentElement:=myelement;\r\n container2.ParentElement:=myelement;\r\n Container3.ParentElement:=myelement;\r\n myelement:=container2.ElementHandle;\r\n resultlabel.Caption:='Kundennummer';\r\n resultlabel.ParentElement:=myelement;\r\n edtsuchbegriff.ParentElement:=myelement;\r\n TC.Visible:=false;\r\n Kontaktnummer:='';\r\n edtsuchbegriff.SetFocus;\r\nend;\r\n\r\nprocedure TfrmKontaktNummerSuche.LoadDFMValues;\r\nbegin\r\n inherited LoadDFMValues;\r\n\r\n ResultLabel := TLabel.Create(Self);\r\n Container1 := THTMLContainer.Create(Self);\r\n Container2 := THTMLContainer.Create(Self);\r\n Container3 := THTMLContainer.Create(Self);\r\n TC := TTableControl.Create(Self);\r\n btnzurueck := TButton.Create(Self);\r\n btnScan := TButton.Create(Self);\r\n edtSuchbegriff := TEdit.Create(Self);\r\n DataSet := TXDataWebDataSet.Create(Self);\r\n DataSetKundennummer := TStringField.Create(Self);\r\n DataSetNachname := TStringField.Create(Self);\r\n DataSetVorname := TStringField.Create(Self);\r\n DataSetAdresseBild := TStringField.Create(Self);\r\n Source := TDataSource.Create(Self);\r\n\r\n ResultLabel.BeforeLoadDFMValues;\r\n Container1.BeforeLoadDFMValues;\r\n Container2.BeforeLoadDFMValues;\r\n Container3.BeforeLoadDFMValues;\r\n TC.BeforeLoadDFMValues;\r\n btnzurueck.BeforeLoadDFMValues;\r\n btnScan.BeforeLoadDFMValues;\r\n edtSuchbegriff.BeforeLoadDFMValues;\r\n DataSet.BeforeLoadDFMValues;\r\n DataSetKundennummer.BeforeLoadDFMValues;\r\n DataSetNachname.BeforeLoadDFMValues;\r\n DataSetVorname.BeforeLoadDFMValues;\r\n DataSetAdresseBild.BeforeLoadDFMValues;\r\n Source.BeforeLoadDFMValues;\r\n try\r\n Name := 'frmKontaktNummerSuche';\r\n Width := 223;\r\n Height := 376;\r\n CSSLibrary := cssBootstrap;\r\n ElementFont := efCSS;\r\n SetEvent(Self, 'OnShow', 'WebFormShow');\r\n ResultLabel.SetParentComponent(Self);\r\n ResultLabel.Name := 'ResultLabel';\r\n ResultLabel.Left := 114;\r\n ResultLabel.Top := 231;\r\n ResultLabel.Width := 60;\r\n ResultLabel.Height := 15;\r\n ResultLabel.Caption := 'ResultLabel';\r\n ResultLabel.ElementClassName := 'h6 m-2';\r\n ResultLabel.ElementFont := efCSS;\r\n ResultLabel.ElementPosition := epIgnore;\r\n ResultLabel.HeightStyle := ssAuto;\r\n ResultLabel.HeightPercent := 100.000000000000000000;\r\n ResultLabel.WidthStyle := ssPercent;\r\n ResultLabel.WidthPercent := 100.000000000000000000;\r\n Container1.SetParentComponent(Self);\r\n Container1.Name := 'Container1';\r\n Container1.Left := 0;\r\n Container1.Top := 0;\r\n Container1.Width := 169;\r\n Container1.Height := 41;\r\n Container1.HeightStyle := ssAuto;\r\n Container1.WidthStyle := ssPercent;\r\n Container1.ElementFont := efCSS;\r\n Container1.ElementPosition := epIgnore;\r\n Container2.SetParentComponent(Self);\r\n Container2.Name := 'Container2';\r\n Container2.Left := 0;\r\n Container2.Top := 47;\r\n Container2.Width := 169;\r\n Container2.Height := 41;\r\n Container2.ElementClassName := 'd-flex flex-wrap m-1 border border-info';\r\n Container2.HeightStyle := ssAuto;\r\n Container2.WidthStyle := ssAuto;\r\n Container2.ChildOrder := 1;\r\n Container2.ElementFont := efCSS;\r\n Container2.ElementPosition := epIgnore;\r\n Container3.SetParentComponent(Self);\r\n Container3.Name := 'Container3';\r\n Container3.Left := 0;\r\n Container3.Top := 94;\r\n Container3.Width := 169;\r\n Container3.Height := 41;\r\n Container3.ElementClassName := 'd-flex m-1';\r\n Container3.HeightStyle := ssAuto;\r\n Container3.WidthStyle := ssAuto;\r\n Container3.ChildOrder := 2;\r\n Container3.ElementFont := efCSS;\r\n Container3.ElementPosition := epIgnore;\r\n TC.SetParentComponent(Self);\r\n TC.Name := 'TC';\r\n TC.Left := 0;\r\n TC.Top := 141;\r\n TC.Width := 169;\r\n TC.Height := 79;\r\n TC.ElementClassName := 'table table-hover table-bordered table-striped';\r\n TC.HeightStyle := ssAuto;\r\n TC.WidthStyle := ssPercent;\r\n TC.BorderColor := clSilver;\r\n TC.ChildOrder := 3;\r\n TC.ColHeader := False;\r\n TC.ElementFont := efCSS;\r\n TC.ElementHeaderClassName := 'table-info';\r\n TC.ElementPosition := epIgnore;\r\n TC.ElementTableClassName := 'table table-hover table-bordered table-striped';\r\n TC.WordWrap := True;\r\n TC.ColCount := 1;\r\n TC.RowCount := 5;\r\n btnzurueck.SetParentComponent(Self);\r\n btnzurueck.Name := 'btnzurueck';\r\n btnzurueck.Left := 0;\r\n btnzurueck.Top := 226;\r\n btnzurueck.Width := 96;\r\n btnzurueck.Height := 25;\r\n btnzurueck.Caption := '<< zur'#252'ck';\r\n btnzurueck.ChildOrder := 4;\r\n btnzurueck.ElementClassName := 'btn btn-info btn-sm m-1 text-left';\r\n btnzurueck.ElementFont := efCSS;\r\n btnzurueck.ElementPosition := epIgnore;\r\n btnzurueck.HeightStyle := ssAuto;\r\n btnzurueck.HeightPercent := 100.000000000000000000;\r\n btnzurueck.WidthStyle := ssAuto;\r\n btnzurueck.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnzurueck, Self, 'OnClick', 'btnzurueckClick');\r\n btnScan.SetParentComponent(Self);\r\n btnScan.Name := 'btnScan';\r\n btnScan.Left := 0;\r\n btnScan.Top := 257;\r\n btnScan.Width := 96;\r\n btnScan.Height := 25;\r\n btnScan.Caption := 'Bar-/QR-Code scannen';\r\n btnScan.ChildOrder := 4;\r\n btnScan.ElementClassName := 'btn btn-info btn-sm m-1 text-left';\r\n btnScan.ElementFont := efCSS;\r\n btnScan.ElementPosition := epIgnore;\r\n btnScan.HeightStyle := ssAuto;\r\n btnScan.HeightPercent := 100.000000000000000000;\r\n btnScan.WidthStyle := ssAuto;\r\n btnScan.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnScan, Self, 'OnClick', 'btnScanClick');\r\n edtSuchbegriff.SetParentComponent(Self);\r\n edtSuchbegriff.Name := 'edtSuchbegriff';\r\n edtSuchbegriff.Left := 8;\r\n edtSuchbegriff.Top := 296;\r\n edtSuchbegriff.Width := 150;\r\n edtSuchbegriff.Height := 22;\r\n edtSuchbegriff.ChildOrder := 6;\r\n edtSuchbegriff.ElementClassName := 'form-control input-sm m-1';\r\n edtSuchbegriff.ElementFont := efCSS;\r\n edtSuchbegriff.ElementPosition := epIgnore;\r\n edtSuchbegriff.HeightStyle := ssAuto;\r\n edtSuchbegriff.HeightPercent := 100.000000000000000000;\r\n edtSuchbegriff.ShowHint := True;\r\n edtSuchbegriff.TextHint := 'Suchbegriff eingeben';\r\n edtSuchbegriff.WidthPercent := 60.000000000000000000;\r\n SetEvent(edtSuchbegriff, Self, 'OnChange', 'edtSuchbegriffChange');\r\n DataSet.SetParentComponent(Self);\r\n DataSet.Name := 'DataSet';\r\n DataSet.AfterOpen := DataSetAfterOpen;\r\n DataSet.EntitySetName := 'Adressen';\r\n DataSet.Connection := DM2.XDataWebConnection1;\r\n DataSet.QueryTop := 20;\r\n DataSet.Left := 8;\r\n DataSet.Top := 56;\r\n DataSetKundennummer.SetParentComponent(DataSet);\r\n DataSetKundennummer.Name := 'DataSetKundennummer';\r\n DataSetKundennummer.FieldName := 'Kundennummer';\r\n DataSetKundennummer.Required := True;\r\n DataSetKundennummer.Size := 13;\r\n DataSetNachname.SetParentComponent(DataSet);\r\n DataSetNachname.Name := 'DataSetNachname';\r\n DataSetNachname.FieldName := 'Nachname';\r\n DataSetNachname.Required := True;\r\n DataSetNachname.Size := 40;\r\n DataSetVorname.SetParentComponent(DataSet);\r\n DataSetVorname.Name := 'DataSetVorname';\r\n DataSetVorname.FieldName := 'Vorname';\r\n DataSetVorname.Size := 40;\r\n DataSetAdresseBild.SetParentComponent(DataSet);\r\n DataSetAdresseBild.Name := 'DataSetAdresseBild';\r\n DataSetAdresseBild.FieldName := 'AdresseBild';\r\n DataSetAdresseBild.Size := 255;\r\n Source.SetParentComponent(Self);\r\n Source.Name := 'Source';\r\n Source.DataSet := DataSet;\r\n Source.Left := 56;\r\n Source.Top := 56;\r\n finally\r\n ResultLabel.AfterLoadDFMValues;\r\n Container1.AfterLoadDFMValues;\r\n Container2.AfterLoadDFMValues;\r\n Container3.AfterLoadDFMValues;\r\n TC.AfterLoadDFMValues;\r\n btnzurueck.AfterLoadDFMValues;\r\n btnScan.AfterLoadDFMValues;\r\n edtSuchbegriff.AfterLoadDFMValues;\r\n DataSet.AfterLoadDFMValues;\r\n DataSetKundennummer.AfterLoadDFMValues;\r\n DataSetNachname.AfterLoadDFMValues;\r\n DataSetVorname.AfterLoadDFMValues;\r\n DataSetAdresseBild.AfterLoadDFMValues;\r\n Source.AfterLoadDFMValues;\r\n end;\r\nend;\r\n\r\nend.\r\n","unit unit_PZE;\r\n\r\ninterface\r\n\r\nuses\r\n System.SysUtils, System.Classes, JS, Web, WEBLib.Graphics, WEBLib.Controls,\r\n WEBLib.Forms, WEBLib.Dialogs, WEBLib.DBCtrls, WEBLib.Buttons, Vcl.Controls,\r\n Vcl.StdCtrls, WEBLib.StdCtrls, WEBLib.ExtCtrls, Data.DB, strutils,\r\n XData.Web.JsonDataset, XData.Web.Dataset, WEBLib.DB, WEBLib.Grids, dateutils,\r\n Vcl.Grids, DB;\r\n\r\ntype\r\n TPZE = class(TForm)\r\n xdsSingleArbeitszeit: TXDataWebDataSet;\r\n xdsSingleArbeitszeitID: TStringField;\r\n sourceSingleArbeitszeit: TDataSource;\r\n xdsSingleArbeitszeitPersonalnummer: TIntegerField;\r\n xdsSingleArbeitszeitDatum: TDateTimeField;\r\n xdsSingleArbeitszeitEintragsArt: TIntegerField;\r\n xdsScan: TXDataWebDataSet;\r\n sourceScan: TDataSource;\r\n xdsScanPersonalnummer: TIntegerField;\r\n xdsScanScanDatumZeit: TDateTimeField;\r\n xdsScanDatum: TDateTimeField;\r\n xdsScanScanArt: TIntegerField;\r\n xdsScanObjektreferenz: TStringField;\r\n xdsScanScanBegin: TDateTimeField;\r\n xdsScanScanEnde: TDateTimeField;\r\n xdsScanausgewertet: TBooleanField;\r\n xdsScanAMS: TFloatField;\r\n xdsScanStundenArt: TStringField;\r\n xdsScanFAID: TXDataWebEntityField;\r\n xdsScanID: TStringField;\r\n panelfunktionen: TPanel;\r\n btnAnmelden: TButton;\r\n btnPauseBeginn: TButton;\r\n btnPauseEnde: TButton;\r\n btnAbmelden: TButton;\r\n btnObjektBeginn: TButton;\r\n btnObjektEnde: TButton;\r\n btnErneutAnmelden: TButton;\r\n Container1: THTMLContainer;\r\n Container2: THTMLContainer;\r\n btnzurueck: TButton;\r\n lblstatus: TLabel;\r\n lblPInfo: TLabel;\r\n WebDBLabel2: TDBLabel;\r\n TC: TTableControl;\r\n xdsScanKundennummer: TStringField;\r\n xdsScanAuftrag: TStringField;\r\n xdsScanPAuftrag: TStringField;\r\n xdsScanArbeitArt: TStringField;\r\n xdsScanInfos: TStringField;\r\n xdsScanDauerMinuten: TFloatField;\r\n btnKontaktBeginn: TButton;\r\n btnKontaktEnde: TButton;\r\n xdsPZEEinstellungen: TXDataWebDataSet;\r\n sourcePZEEinstellungen: TDataSource;\r\n xdsPZEEinstellungenZuordnungObjekt: TIntegerField;\r\n xdsPZEEinstellungenZuordnungKontakt: TIntegerField;\r\n xdsPZEEinstellungenZuordnungAuftrag: TIntegerField;\r\n xdsPZEEinstellungenZuordnungProduktion: TIntegerField;\r\n btnAuftragBeginn: TButton;\r\n btnAuftragEnde: TButton;\r\n btnProduktionBeginn: TButton;\r\n btnProduktionEnde: TButton;\r\n panelArbeitsart: TPanel;\r\n radioarbeitsart: TRadioGroup;\r\n btnOK: TButton;\r\n btnAbbrechen: TButton;\r\n lblauswahlinfo: TLabel;\r\n panelstundenart: TPanel;\r\n lblauswahlobjekt: TLabel;\r\n btnObjektOK: TButton;\r\n btnObjektAbbrechen: TButton;\r\n xdsStundenart: TXDataWebDataSet;\r\n sourceStundenart: TDataSource;\r\n xdsStundenartStundenArt: TStringField;\r\n lookupstundenart: TComboBox;\r\n xdsPZEEinstellungenAuswahlNurKontaktnummer: TIntegerField;\r\n xdsScanKalkStundensatz: TFloatField;\r\n xdsScanKalkKosten: TFloatField;\r\n btnPauseVorgabe: TButton;\r\n xdsSingleArbeitszeitSollPause: TDateTimeField;\r\n xdsPZEEinstellungenPauseVorgabe: TIntegerField;\r\n xdsPauseFix: TXDataWebDataSet;\r\n xdsPauseFixFAID: TXDataWebEntityField;\r\n xdsPauseFixID: TStringField;\r\n xdsPauseFixPersonalnummer: TIntegerField;\r\n xdsPauseFixScanDatumZeit: TDateTimeField;\r\n xdsPauseFixDatum: TDateTimeField;\r\n xdsPauseFixScanArt: TIntegerField;\r\n xdsPauseFixObjektreferenz: TStringField;\r\n xdsPauseFixScanBegin: TDateTimeField;\r\n xdsPauseFixScanEnde: TDateTimeField;\r\n xdsPauseFixausgewertet: TBooleanField;\r\n xdsPauseFixAMS: TFloatField;\r\n xdsPauseFixStundenArt: TStringField;\r\n xdsPauseFixKundennummer: TStringField;\r\n xdsPauseFixAuftrag: TStringField;\r\n xdsPauseFixPAuftrag: TStringField;\r\n xdsPauseFixArbeitArt: TStringField;\r\n xdsPauseFixInfos: TStringField;\r\n xdsPauseFixDauerMinuten: TFloatField;\r\n xdsPauseFixKalkStundensatz: TFloatField;\r\n xdsPauseFixKalkKosten: TFloatField;\r\n lblAutoObjekt: TLabel;\r\n lblAutoAuftrag: TLabel;\r\n procedure WebFormShow(Sender: TObject);\r\n procedure xdsSingleArbeitszeitAfterOpen(DataSet: TDataSet);\r\n procedure btnAnmeldenClick(Sender: TObject);\r\n procedure xdsScanNewRecord(DataSet: TDataSet);\r\n procedure btnPauseBeginnClick(Sender: TObject);\r\n procedure btnPauseEndeClick(Sender: TObject);\r\n procedure xdsScanAfterPost(DataSet: TDataSet);\r\n procedure xdsScanAfterApplyUpdates(Sender: TDataSet; Info: TResolveResults);\r\n procedure xdsScanAfterOpen(DataSet: TDataSet);\r\n procedure btnAbmeldenClick(Sender: TObject);\r\n procedure btnErneutAnmeldenClick(Sender: TObject);\r\n procedure btnObjektEndeClick(Sender: TObject);\r\n procedure btnObjektBeginnClick(Sender: TObject);\r\n procedure btnzurueckClick(Sender: TObject);\r\n procedure xdsPZEEinstellungenAfterOpen(DataSet: TDataSet);\r\n procedure btnKontaktEndeClick(Sender: TObject);\r\n procedure btnKontaktBeginnClick(Sender: TObject);\r\n procedure btnOKClick(Sender: TObject);\r\n procedure btnAbbrechenClick(Sender: TObject);\r\n procedure btnAuftragBeginnClick(Sender: TObject);\r\n procedure btnAuftragEndeClick(Sender: TObject);\r\n procedure btnProduktionEndeClick(Sender: TObject);\r\n procedure btnProduktionBeginnClick(Sender: TObject);\r\n procedure btnObjektAbbrechenClick(Sender: TObject);\r\n procedure btnObjektOKClick(Sender: TObject);\r\n procedure xdsStundenartAfterOpen(DataSet: TDataSet);\r\n procedure btnPauseVorgabeClick(Sender: TObject);\r\n procedure xdsPauseFixAfterApplyUpdates(Sender: TDataSet;\r\n Info: TResolveResults);\r\n procedure xdsPauseFixAfterOpen(DataSet: TDataSet);\r\n procedure xdsPauseFixAfterPost(DataSet: TDataSet);\r\n private\r\n { Private-Deklarationen }\r\n public\r\n { Public-Deklarationen }\r\n procedure showstatus;\r\n procedure kontaktsuche1;\r\n procedure kontaktsuche2;\r\n protected procedure LoadDFMValues; override; end;\r\n\r\nvar\r\n PZE: TPZE;\r\n ftjahr,ftmonat,fttag,ftstunde,ftminute,ftsekunde,ftms:word;\r\n fjjahr,fjmonat,fjtag,fjstunde,fjminute,fjsekunde,fjms:word;\r\n datumohnezeit:string;\r\n mytempdatumzeit:TDateTime;\r\n myScanArt:integer;\r\n myDoApply:integer;\r\n myObjektReferenz:string;\r\n myKontaktReferenz:string;\r\n myAuftragReferenz:string;\r\n myProduktionReferenz:string;\r\n myInfos:string;\r\n myArbeitArt:string;\r\n myStundenart:string;\r\n myPauseSoll:TDateTime;\r\n myPauseVorgabe:integer;\r\n\r\n //ScanArten\r\n // 1=Anmelden\r\n // 2=Pause\r\n // 3=Pause Ende\r\n // 4=Objekt\r\n // 5=Objekt Ende\r\n // 9=Abmelden\r\n // 14=Kontakt\r\n // 15=Kontak Ende\r\n // 24=Auftrag\r\n // 25=AuftragEnde\r\n // 34=Produktion\r\n // 35=ProduktionEnde\r\n\r\nimplementation\r\n uses unit1, unit2, unit_objektsuche, unit_Kontaktsuche, unit_AuftragSuche, unit_produktionSuche, unit_Kontaktnummersuche;\r\n{$R *.dfm}\r\n\r\nprocedure TPZE.btnAbbrechenClick(Sender: TObject);\r\nbegin\r\n panelArbeitsart.Visible:=false;\r\n showstatus;\r\nend;\r\n\r\nprocedure TPZE.btnAbmeldenClick(Sender: TObject);\r\nbegin\r\n myDoApply:=0;\r\n mytempdatumzeit:=date+time;\r\n decodedatetime(mytempdatumzeit,ftjahr,ftmonat,fttag,ftstunde,ftminute,ftsekunde,ftms);\r\n myScanArt:=9;\r\n xdsscan.Last;\r\n xdsscan.Edit;\r\n xdsScanScanEnde.AsDateTime:=encodetime(ftstunde,ftminute,0,0);\r\n xdsscan.Post;\r\n myDoApply:=1;\r\n xdsscan.Append;\r\nend;\r\n\r\nprocedure TPZE.btnAnmeldenClick(Sender: TObject);\r\nbegin\r\n mytempdatumzeit:=date+time;\r\n decodedatetime(mytempdatumzeit,ftjahr,ftmonat,fttag,ftstunde,ftminute,ftsekunde,ftms);\r\n mydoapply:=1;\r\n myscanart:=1;\r\n xdsSCAN.Append;\r\nend;\r\n\r\nprocedure TPZE.btnAuftragBeginnClick(Sender: TObject);\r\nvar\r\n LFrm:TfrmAuftragSuche;\r\n procedure AfterCreate(AForm:TObject);\r\n var\r\n LForm:TfrmAuftragSuche;\r\n begin\r\n LForm:=(AForm as TfrmAuftragSuche);\r\n lform.Auftragnummer:='';\r\n end;\r\n\r\n procedure AfterShowmodal(Avalue:TModalResult);\r\n begin\r\n if lfrm.Auftragnummer<>'' then\r\n begin\r\n myAuftragReferenz:=lfrm.Auftragnummer;\r\n myInfos:=trim(lfrm.LUAuftragsbezeichnung);\r\n myDoApply:=0;\r\n myScanArt:=24;\r\n panelfunktionen.Visible:=false;\r\n panelArbeitsart.Visible:=true;\r\n lblauswahlinfo.Caption:=myAuftragReferenz+' '+myinfos;\r\n\r\n end;\r\n if lfrm.Auftragnummer='' then\r\n begin\r\n showmessage('Der Vorgang wird abgebrochen, da Sie keinen Auftrag ausgewählt haben');\r\n end;\r\n\r\n end;\r\n\r\n begin\r\n LFrm:=TfrmAuftragSuche.CreateNew(@AfterCreate);\r\n // LFrm.Popup:=true;\r\n LFrm.ShowModal(@AfterShowmodal);\r\nend;\r\n\r\nprocedure TPZE.btnAuftragEndeClick(Sender: TObject);\r\nbegin\r\n myDoApply:=0;\r\n mytempdatumzeit:=date+time;\r\n decodedatetime(mytempdatumzeit,ftjahr,ftmonat,fttag,ftstunde,ftminute,ftsekunde,ftms);\r\n myScanArt:=25;\r\n xdsscan.Last;\r\n xdsscan.Edit;\r\n xdsScanScanEnde.AsDateTime:=encodetime(ftstunde,ftminute,0,0);\r\n xdsScanDauerMinuten.AsFloat:=Minutesbetween(xdsScanScanBegin.AsDateTime,xdsScanScanEnde.AsDateTime);\r\n xdsScanKalkStundensatz.AsFloat:=BenutzerStundensatzIntern;\r\n\r\n try\r\n xdsScanKalkKosten.AsFloat:=xdsScanKalkStundensatz.AsFloat/60*xdsScanDauerMinuten.AsFloat;\r\n except\r\n\r\n end;\r\n\r\n xdsscan.Post;\r\n myDoApply:=1;\r\n xdsscan.Append;\r\nend;\r\n\r\nprocedure TPZE.btnErneutAnmeldenClick(Sender: TObject);\r\nbegin\r\n myDoApply:=0;\r\n mytempdatumzeit:=date+time;\r\n decodedatetime(mytempdatumzeit,ftjahr,ftmonat,fttag,ftstunde,ftminute,ftsekunde,ftms);\r\n myScanArt:=3;\r\n xdsscan.Last;\r\n xdsscan.Edit;\r\n xdsScanScanEnde.AsDateTime:=encodetime(ftstunde,ftminute,0,0);\r\n xdsScanScanArt.AsInteger:=2;\r\n xdsscan.Post;\r\n myDoApply:=1;\r\n xdsscan.Append;\r\nend;\r\n\r\nprocedure TPZE.btnKontaktBeginnClick(Sender: TObject);\r\nbegin\r\n if xdsPZEEinstellungenAuswahlNurKontaktnummer.AsInteger=0 then kontaktsuche1;\r\n if xdsPZEEinstellungenAuswahlNurKontaktnummer.AsInteger=1 then kontaktsuche2;\r\nend;\r\n\r\nprocedure TPZE.btnKontaktEndeClick(Sender: TObject);\r\nbegin\r\n myDoApply:=0;\r\n mytempdatumzeit:=date+time;\r\n decodedatetime(mytempdatumzeit,ftjahr,ftmonat,fttag,ftstunde,ftminute,ftsekunde,ftms);\r\n myScanArt:=15;\r\n xdsscan.Last;\r\n xdsscan.Edit;\r\n xdsScanScanEnde.AsDateTime:=encodetime(ftstunde,ftminute,0,0);\r\n xdsScanDauerMinuten.AsFloat:=Minutesbetween(xdsScanScanBegin.AsDateTime,xdsScanScanEnde.AsDateTime);\r\n xdsScanKalkStundensatz.AsFloat:=BenutzerStundensatzIntern;\r\n\r\n try\r\n xdsScanKalkKosten.AsFloat:=xdsScanKalkStundensatz.AsFloat/60*xdsScanDauerMinuten.AsFloat;\r\n except\r\n\r\n end;\r\n\r\n xdsscan.Post;\r\n myDoApply:=1;\r\n xdsscan.Append;\r\nend;\r\n\r\nprocedure TPZE.btnObjektAbbrechenClick(Sender: TObject);\r\nbegin\r\n panelstundenart.Visible:=false;\r\n showstatus;\r\nend;\r\n\r\nprocedure TPZE.btnObjektBeginnClick(Sender: TObject);\r\nvar\r\n LFrm:TfrmObjektsuche;\r\n procedure AfterCreate(AForm:TObject);\r\n var\r\n LForm:TfrmObjektsuche;\r\n begin\r\n LForm:=(AForm as TfrmObjektsuche);\r\n lform.Objektreferenz:='';\r\n end;\r\n\r\n procedure AfterShowmodal(Avalue:TModalResult);\r\n begin\r\n if lfrm.Objektreferenz<>'' then\r\n begin\r\n myobjektreferenz:=lfrm.Objektreferenz;\r\n myinfos:=trim(lfrm.luObjektnummer+' '+lfrm.luObjektkurzbezeichnung);\r\n myDoApply:=0;\r\n mytempdatumzeit:=date+time;\r\n decodedatetime(mytempdatumzeit,ftjahr,ftmonat,fttag,ftstunde,ftminute,ftsekunde,ftms);\r\n myScanArt:=4;\r\n panelfunktionen.Visible:=false;\r\n panelstundenart.Visible:=true;\r\n lookupstundenart.text:='[-]';\r\n lblauswahlobjekt.Caption:=myobjektreferenz+' '+myinfos;\r\n\r\n end;\r\n if lfrm.Objektreferenz='' then\r\n begin\r\n showmessage('Der Vorgang wird abgebrochen, da Sie kein Objekt ausgewählt haben');\r\n end;\r\n\r\n end;\r\n\r\n begin\r\n LFrm:=TfrmObjektsuche.CreateNew(@AfterCreate);\r\n // LFrm.Popup:=true;\r\n LFrm.ShowModal(@AfterShowmodal);\r\n\r\nend;\r\n\r\nprocedure TPZE.btnObjektEndeClick(Sender: TObject);\r\nbegin\r\n myDoApply:=0;\r\n mytempdatumzeit:=date+time;\r\n decodedatetime(mytempdatumzeit,ftjahr,ftmonat,fttag,ftstunde,ftminute,ftsekunde,ftms);\r\n myScanArt:=5;\r\n xdsscan.Last;\r\n xdsscan.Edit;\r\n xdsScanScanEnde.AsDateTime:=encodetime(ftstunde,ftminute,0,0);\r\n xdsScanDauerMinuten.AsFloat:=Minutesbetween(xdsScanScanBegin.AsDateTime,xdsScanScanEnde.AsDateTime);\r\n xdsscan.Post;\r\n myDoApply:=1;\r\n xdsscan.Append;\r\nend;\r\n\r\nprocedure TPZE.btnObjektOKClick(Sender: TObject);\r\nbegin\r\n panelstundenart.Visible:=false;\r\n mytempdatumzeit:=date+time;\r\n myArbeitArt:='[-]';\r\n mystundenart:=lookupstundenart.text;\r\n decodedatetime(mytempdatumzeit,ftjahr,ftmonat,fttag,ftstunde,ftminute,ftsekunde,ftms);\r\n xdsscan.Last;\r\n xdsscan.Edit;\r\n xdsScanScanEnde.AsDateTime:=encodetime(ftstunde,ftminute,0,0);\r\n xdsscan.Post;\r\n myDoApply:=1;\r\n xdsscan.Append;\r\nend;\r\n\r\nprocedure TPZE.btnOKClick(Sender: TObject);\r\nbegin\r\n panelArbeitsart.Visible:=false;\r\n mytempdatumzeit:=date+time;\r\n myArbeitArt:='[-]';\r\n if radioarbeitsart.ItemIndex=1 then myArbeitArt:='Arbeitszeit';\r\n if radioarbeitsart.ItemIndex=2 then myArbeitArt:='Fahrzeit';\r\n\r\n\r\n decodedatetime(mytempdatumzeit,ftjahr,ftmonat,fttag,ftstunde,ftminute,ftsekunde,ftms);\r\n\r\n xdsscan.Last;\r\n xdsscan.Edit;\r\n xdsScanScanEnde.AsDateTime:=encodetime(ftstunde,ftminute,0,0);\r\n xdsscan.Post;\r\n myDoApply:=1;\r\n xdsscan.Append;\r\nend;\r\n\r\nprocedure TPZE.btnPauseBeginnClick(Sender: TObject);\r\nbegin\r\n myDoApply:=0;\r\n mytempdatumzeit:=date+time;\r\n decodedatetime(mytempdatumzeit,ftjahr,ftmonat,fttag,ftstunde,ftminute,ftsekunde,ftms);\r\n myScanArt:=2;\r\n xdsscan.Last;\r\n xdsscan.Edit;\r\n xdsScanScanEnde.AsDateTime:=encodetime(ftstunde,ftminute,0,0);\r\n xdsscan.Post;\r\n myDoApply:=1;\r\n myInfos:='Pause';\r\n myPauseVorgabe:=0;\r\n xdsscan.Append;\r\nend;\r\n\r\nprocedure TPZE.btnPauseEndeClick(Sender: TObject);\r\nbegin\r\n myDoApply:=0;\r\n mytempdatumzeit:=date+time;\r\n decodedatetime(mytempdatumzeit,ftjahr,ftmonat,fttag,ftstunde,ftminute,ftsekunde,ftms);\r\n myScanArt:=3;\r\n xdsscan.Last;\r\n xdsscan.Edit;\r\n xdsScanScanEnde.AsDateTime:=encodetime(ftstunde,ftminute,0,0);\r\n xdsScanDauerMinuten.AsFloat:=Minutesbetween(xdsScanScanBegin.AsDateTime,xdsScanScanEnde.AsDateTime);\r\n xdsscan.Post;\r\n myDoApply:=1;\r\n xdsscan.Append;\r\nend;\r\n\r\nprocedure TPZE.btnPauseVorgabeClick(Sender: TObject);\r\nbegin\r\n xdsPauseFix.Load;\r\nend;\r\n\r\nprocedure TPZE.btnProduktionBeginnClick(Sender: TObject);\r\nvar\r\n LFrm:TfrmProduktionSuche;\r\n procedure AfterCreate(AForm:TObject);\r\n var\r\n LForm:TfrmProduktionSuche;\r\n begin\r\n LForm:=(AForm as TfrmProduktionSuche);\r\n lform.Produktionnummer:='';\r\n end;\r\n\r\n procedure AfterShowmodal(Avalue:TModalResult);\r\n begin\r\n if lfrm.Produktionnummer<>'' then\r\n begin\r\n myProduktionReferenz:=lfrm.Produktionnummer;\r\n myInfos:=trim(lfrm.LUAuftragsbezeichnung);\r\n myDoApply:=0;\r\n myScanArt:=34;\r\n mytempdatumzeit:=date+time;\r\n myArbeitArt:='[-]';\r\n decodedatetime(mytempdatumzeit,ftjahr,ftmonat,fttag,ftstunde,ftminute,ftsekunde,ftms);\r\n xdsscan.Last;\r\n xdsscan.Edit;\r\n xdsScanScanEnde.AsDateTime:=encodetime(ftstunde,ftminute,0,0);\r\n xdsscan.Post;\r\n myDoApply:=1;\r\n xdsscan.Append;\r\n\r\n end;\r\n if lfrm.Produktionnummer='' then\r\n begin\r\n showmessage('Der Vorgang wird abgebrochen, da Sie keinen Produktions-Auftrag ausgewählt haben');\r\n end;\r\n\r\n end;\r\n\r\n begin\r\n LFrm:=TfrmProduktionSuche.CreateNew(@AfterCreate);\r\n // LFrm.Popup:=true;\r\n LFrm.ShowModal(@AfterShowmodal);\r\n\r\nend;\r\n\r\nprocedure TPZE.btnProduktionEndeClick(Sender: TObject);\r\nbegin\r\n myDoApply:=0;\r\n mytempdatumzeit:=date+time;\r\n decodedatetime(mytempdatumzeit,ftjahr,ftmonat,fttag,ftstunde,ftminute,ftsekunde,ftms);\r\n myScanArt:=35;\r\n xdsscan.Last;\r\n xdsscan.Edit;\r\n xdsScanScanEnde.AsDateTime:=encodetime(ftstunde,ftminute,0,0);\r\n xdsScanDauerMinuten.AsFloat:=Minutesbetween(xdsScanScanBegin.AsDateTime,xdsScanScanEnde.AsDateTime);\r\n xdsScanKalkStundensatz.AsFloat:=BenutzerStundensatzIntern;\r\n\r\n try\r\n xdsScanKalkKosten.AsFloat:=xdsScanKalkStundensatz.AsFloat/60*xdsScanDauerMinuten.AsFloat;\r\n except\r\n\r\n end;\r\n\r\n xdsscan.Post;\r\n myDoApply:=1;\r\n xdsscan.Append;\r\nend;\r\n\r\nprocedure TPZE.btnzurueckClick(Sender: TObject);\r\nbegin\r\n self.Close;\r\nend;\r\n\r\nprocedure TPZE.showstatus;\r\nbegin\r\n xdsscan.Close;\r\n xdsPZEEinstellungen.Close;\r\n xdsPZEEinstellungen.Load;\r\nend;\r\n\r\nprocedure TPZE.WebFormShow(Sender: TObject);\r\nvar\r\n myelement:TJSHTMLElement;\r\nbegin\r\n Container1.html.text:='';\r\n myelement:=container1.ElementHandle;\r\n btnzurueck.ParentElement:=myelement;\r\n lblpinfo.ParentElement:=myelement;\r\n webdblabel2.ParentElement:=myelement;\r\n lblstatus.ParentElement:=myelement;\r\n lblAutoObjekt.ParentElement:=myelement;\r\n lblAutoAuftrag.ParentElement:=myelement;\r\n myelement:=container2.ElementHandle;\r\n panelfunktionen.ParentElement:=myelement;\r\n panelarbeitsart.ParentElement:=myelement;\r\n panelstundenart.ParentElement:=myelement;\r\n lblpinfo.Caption:=BenutzerPersonalnummer+' '+BenutzerVorname+' '+BenutzerNachname;\r\n panelarbeitsart.Visible:=false;\r\n panelstundenart.Visible:=false;\r\n myDoApply:=0;\r\n showstatus;\r\n\r\nend;\r\n\r\nprocedure TPZE.xdsPauseFixAfterApplyUpdates(Sender: TDataSet;\r\n Info: TResolveResults);\r\n var\r\n i:integer;\r\nbegin\r\n for i := 0 to High(info.Records) do\r\n begin\r\n if info.Records[i].Error<>'' then showmessage(info.Records[i].Error);\r\n end;\r\n showstatus;\r\nend;\r\n\r\nprocedure TPZE.xdsPauseFixAfterOpen(DataSet: TDataSet);\r\nbegin\r\n myDoApply:=0;\r\n mytempdatumzeit:=date+time;\r\n decodedatetime(mytempdatumzeit,ftjahr,ftmonat,fttag,ftstunde,ftminute,ftsekunde,ftms);\r\n xdsPauseFix.Last;\r\n xdsPauseFix.Edit;\r\n xdsPauseFixScanEnde.AsDateTime:=encodetime(ftstunde,ftminute,0,0);\r\n xdsPauseFix.Post;\r\n xdsPauseFix.Append;\r\n\r\n xdsPauseFixFAID.Value:=xdsSingleArbeitszeit.CurrentData;\r\n xdsPauseFixPersonalnummer.AsString:=Benutzerpersonalnummer;\r\n xdsPauseFixScanDatumZeit.AsDateTime:=mytempdatumzeit;\r\n xdsPauseFixDatum.AsDateTime:=encodedate(ftjahr,ftmonat,fttag);\r\n xdsPauseFixScanArt.AsInteger:=2;\r\n xdsPauseFixScanBegin.AsDateTime:=encodetime(ftstunde,ftminute,0,0);\r\n xdsPauseFixausgewertet.AsBoolean:=false;\r\n xdsPauseFixAMS.AsFloat:=ftms;\r\n xdsPauseFixObjektreferenz.AsString:='';\r\n xdsPauseFixKundennummer.AsString:='';\r\n xdsPauseFixAuftrag.AsString:='';\r\n xdsPauseFixPAuftrag.AsString:='';\r\n xdsPauseFixStundenArt.AsString:='[-]';\r\n xdsPauseFixArbeitArt.AsString:='[-]';\r\n xdsPauseFixDauerMinuten.AsFloat:=0;\r\n xdsPauseFixInfos.AsString:='Pause';\r\n xdsPauseFixKalkStundensatz.AsFloat:=0;\r\n xdsPauseFixKalkKosten.AsFloat:=0;\r\n xdsPauseFixScanEnde.AsDateTime:=encodetime(ftstunde,ftminute,0,0)+myPauseSoll;\r\n xdsPauseFixDauerMinuten.AsFloat:=Minutesbetween(xdsPauseFixScanBegin.AsDateTime,xdsPauseFixScanEnde.AsDateTime);\r\n myDoApply:=0;\r\n xdsPauseFix.Post;\r\n xdsPauseFix.Append;\r\n xdsPauseFixFAID.Value:=xdsSingleArbeitszeit.CurrentData;\r\n xdsPauseFixPersonalnummer.AsString:=Benutzerpersonalnummer;\r\n xdsPauseFixScanDatumZeit.AsDateTime:=mytempdatumzeit+myPauseSoll;\r\n xdsPauseFixDatum.AsDateTime:=encodedate(ftjahr,ftmonat,fttag);\r\n xdsPauseFixScanArt.AsInteger:=3;\r\n xdsPauseFixScanBegin.AsDateTime:=encodetime(ftstunde,ftminute,0,0)+myPauseSoll;\r\n xdsPauseFixausgewertet.AsBoolean:=false;\r\n xdsPauseFixAMS.AsFloat:=ftms+1;\r\n xdsPauseFixObjektreferenz.AsString:='';\r\n xdsPauseFixKundennummer.AsString:='';\r\n xdsPauseFixAuftrag.AsString:='';\r\n xdsPauseFixPAuftrag.AsString:='';\r\n xdsPauseFixStundenArt.AsString:='[-]';\r\n xdsPauseFixArbeitArt.AsString:='[-]';\r\n xdsPauseFixDauerMinuten.AsFloat:=0;\r\n xdsPauseFixInfos.AsString:='';\r\n xdsPauseFixKalkStundensatz.AsFloat:=0;\r\n xdsPauseFixKalkKosten.AsFloat:=0;\r\n xdsPauseFixDauerMinuten.AsFloat:=0;\r\n myDoApply:=1;\r\n xdsPauseFix.Post;\r\n\r\nend;\r\n\r\nprocedure TPZE.xdsPauseFixAfterPost(DataSet: TDataSet);\r\nbegin\r\n if myDoApply=1 then xdsPauseFix.ApplyUpdates;\r\nend;\r\n\r\nprocedure TPZE.xdsPZEEinstellungenAfterOpen(DataSet: TDataSet);\r\nbegin\r\n xdsstundenart.Close;\r\n xdsstundenart.load;\r\nend;\r\n\r\nprocedure TPZE.xdsScanAfterApplyUpdates(Sender: TDataSet;\r\n Info: TResolveResults);\r\n var\r\n i:integer;\r\nbegin\r\n for i := 0 to High(info.Records) do\r\n begin\r\n if info.Records[i].Error<>'' then showmessage(info.Records[i].Error);\r\n end;\r\n showstatus;\r\nend;\r\n\r\nprocedure TPZE.xdsScanAfterOpen(DataSet: TDataSet);\r\nvar\r\n i:integer;\r\n infostext:string;\r\nbegin\r\n xdsscan.First;\r\n tc.RowCount:=xdsscan.RecordCount+1;\r\n tc.ColCount:=6;\r\n i:=0;\r\n tc.Cells[0,i]:='DatumZeit';\r\n tc.Cells[1,i]:='Beginn';\r\n tc.Cells[2,i]:='Ende';\r\n tc.Cells[3,i]:='Minuten';\r\n tc.Cells[4,i]:='Infos';\r\n\r\n while not xdsscan.eof do\r\n begin\r\n inc(i);\r\n tc.Cells[0,i]:=formatdatetime('DD.MM.YYYY hh:mm:ss', xdsScanScanDatumZeit.asdatetime);\r\n tc.Cells[1,i]:=formatdatetime('hh:mm:ss', xdsScanScanBegin.asdatetime);\r\n tc.Cells[2,i]:=formatdatetime('hh:mm:ss', xdsScanScanEnde.asdatetime);\r\n tc.Cells[3,i]:=xdsScanDauerMinuten.asstring;\r\n infostext:='';\r\n if xdsScanScanArt.AsInteger=2 then\r\n begin\r\n infostext:='Pause';\r\n end;\r\n if xdsScanScanArt.AsInteger=4 then\r\n begin\r\n infostext:='Objekt: '+xdsScanObjektreferenz.AsString+' '+xdsScanInfos.AsString+ ' ('+xdsScanStundenArt.asstring+')';\r\n end;\r\n if xdsScanScanArt.AsInteger=5 then\r\n begin\r\n infostext:='';\r\n end;\r\n if xdsScanScanArt.AsInteger=9 then\r\n begin\r\n infostext:='abgemeldet';\r\n end;\r\n if xdsScanScanArt.AsInteger=14 then\r\n begin\r\n infostext:='Kontakt: '+xdsScanKundennummer.AsString+' '+xdsScanInfos.AsString+ ' ('+xdsScanArbeitArt.asstring+')';\r\n end;\r\n if xdsScanScanArt.AsInteger=15 then\r\n begin\r\n infostext:='';\r\n end;\r\n if xdsScanScanArt.AsInteger=24 then\r\n begin\r\n infostext:='Auftrag: '+xdsScanAuftrag.AsString+' '+xdsScanInfos.AsString+ ' ('+xdsScanArbeitArt.asstring+')';\r\n end;\r\n if xdsScanScanArt.AsInteger=25 then\r\n begin\r\n infostext:='';\r\n end;\r\n if xdsScanScanArt.AsInteger=34 then\r\n begin\r\n infostext:='Produktion: '+xdsScanPAuftrag.AsString+' '+xdsScanInfos.AsString+ ' ('+xdsScanArbeitArt.asstring+')';\r\n end;\r\n if xdsScanScanArt.AsInteger=35 then\r\n begin\r\n infostext:='';\r\n end;\r\n\r\n tc.Cells[4,i]:=infostext;\r\n\r\n xdsscan.Next;\r\n end;\r\n\r\n decodedatetime(date+time,fjjahr,fjmonat,fjtag,fjstunde,fjminute,fjsekunde,fjms);\r\n xdsscan.last;\r\n panelArbeitsart.Visible:=false;\r\n panelstundenart.Visible:=false;\r\n panelfunktionen.Visible:=true;\r\n btnanmelden.Visible:=false;\r\n btnabmelden.Visible:=false;\r\n btnPauseBeginn.Visible:=false;\r\n btnpauseende.Visible:=false;\r\n btnPauseVorgabe.Visible:=false;\r\n btnobjektbeginn.Visible:=false;\r\n btnobjektende.Visible:=false;\r\n btnErneutAnmelden.Visible:=false;\r\n btnKontaktBeginn.Visible:=false;\r\n btnKontaktEnde.Visible:=false;\r\n btnAuftragBeginn.Visible:=false;\r\n btnAuftragEnde.visible:=false;\r\n btnProduktionBeginn.Visible:=false;\r\n btnProduktionEnde.Visible:=false;\r\n if xdsScanScanArt.AsString='' then\r\n begin\r\n btnAnmelden.Visible:=true;\r\n lblstatus.Caption:='Sie haben sich heute noch nicht angemeldet';\r\n end;\r\n if xdsScanScanArt.AsInteger=1 then\r\n begin\r\n btnabmelden.visible:=true;\r\n btnPauseBeginn.visible:=true;\r\n btnObjektBeginn.visible:=true;\r\n btnKontaktBeginn.Visible:=true;\r\n btnAuftragBeginn.Visible:=true;\r\n btnProduktionBeginn.Visible:=true;\r\n lblstatus.Caption:='Sie sind in der Zeiterfassung angemeldet';\r\n end;\r\n\r\n if xdsScanScanArt.AsInteger=2 then\r\n begin\r\n btnPauseEnde.Visible:=true;\r\n lblstatus.Caption:='Sie sind momentan in einer Pause';\r\n end;\r\n\r\n if xdsScanScanArt.AsInteger=3 then\r\n begin\r\n btnabmelden.visible:=true;\r\n btnPauseBeginn.visible:=true;\r\n btnObjektBeginn.visible:=true;\r\n btnKontaktBeginn.Visible:=true;\r\n btnAuftragBeginn.Visible:=true;\r\n btnProduktionBeginn.Visible:=true;\r\n lblstatus.Caption:='Pause beendet';\r\n end;\r\n\r\n if xdsScanScanArt.AsInteger=4 then\r\n begin\r\n btnObjektEnde.visible:=true;\r\n lblstatus.Caption:='Objekt: '+xdsSCANObjektreferenz.AsString+' '+xdsSCANInfos.asstring+ ' ('+xdsScanStundenArt.asstring+')';\r\n end;\r\n\r\n if xdsScanScanArt.AsInteger=5 then\r\n begin\r\n btnabmelden.visible:=true;\r\n btnPauseBeginn.visible:=true;\r\n btnObjektBeginn.visible:=true;\r\n btnKontaktBeginn.Visible:=true;\r\n btnAuftragBeginn.Visible:=true;\r\n btnProduktionBeginn.Visible:=true;\r\n lblstatus.Caption:='Objekt beendet';\r\n end;\r\n\r\n if xdsScanScanArt.AsInteger=14 then\r\n begin\r\n lblstatus.Caption:='Kontakt: '+xdsSCANKundennummer.AsString+' ('+xdsSCANArbeitArt.asstring+') '+xdsSCANInfos.asstring;\r\n btnKontaktEnde.Visible:=true;\r\n end;\r\n\r\n if xdsScanScanArt.AsInteger=15 then\r\n begin\r\n lblstatus.Caption:='Kontakt beendet';\r\n btnabmelden.visible:=true;\r\n btnPauseBeginn.visible:=true;\r\n btnObjektBeginn.visible:=true;\r\n btnKontaktBeginn.Visible:=true;\r\n btnAuftragBeginn.Visible:=true;\r\n btnProduktionBeginn.Visible:=true;\r\n end;\r\n\r\n if xdsScanScanArt.AsInteger=24 then\r\n begin\r\n lblstatus.Caption:='Auftrag: '+xdsScanAuftrag.AsString+' ('+xdsSCANArbeitArt.asstring+') '+xdsSCANInfos.asstring;\r\n btnAuftragEnde.Visible:=true;\r\n end;\r\n\r\n if xdsScanScanArt.AsInteger=25 then\r\n begin\r\n lblstatus.Caption:='Auftrag beendet';\r\n btnabmelden.visible:=true;\r\n btnPauseBeginn.visible:=true;\r\n btnObjektBeginn.visible:=true;\r\n btnKontaktBeginn.Visible:=true;\r\n btnAuftragBeginn.Visible:=true;\r\n btnProduktionBeginn.Visible:=true;\r\n end;\r\n\r\n if xdsScanScanArt.AsInteger=34 then\r\n begin\r\n lblstatus.Caption:='Produktion: '+xdsScanPAuftrag.AsString+' '+xdsSCANInfos.asstring;\r\n btnProduktionEnde.Visible:=true;\r\n end;\r\n\r\n if xdsScanScanArt.AsInteger=35 then\r\n begin\r\n lblstatus.Caption:='Produktion beendet';\r\n btnabmelden.visible:=true;\r\n btnPauseBeginn.visible:=true;\r\n btnObjektBeginn.visible:=true;\r\n btnKontaktBeginn.Visible:=true;\r\n btnAuftragBeginn.Visible:=true;\r\n btnProduktionBeginn.Visible:=true;\r\n end;\r\n\r\n if xdsScanScanArt.AsInteger=9 then\r\n begin\r\n lblstatus.Caption:='Sie haben sich für heute bereits abgemeldet';\r\n btnErneutAnmelden.Visible:=true;\r\n end;\r\n if xdsPZEEinstellungenZuordnungObjekt.AsInteger<>1 then btnObjektBeginn.Visible:=false;\r\n if xdsPZEEinstellungenZuordnungKontakt.AsInteger<>1 then btnKontaktBeginn.Visible:=false;\r\n if xdsPZEEinstellungenZuordnungAuftrag.AsInteger<>1 then btnAuftragBeginn.Visible:=false;\r\n if xdsPZEEinstellungenZuordnungProduktion.AsInteger<>1 then btnProduktionBeginn.Visible:=false;\r\n if xdsPZEEinstellungenPauseVorgabe.AsInteger=1 then btnPauseVorgabe.Visible:=btnPauseBeginn.Visible;\r\n\r\n if xdsScanScanBegin.Asdatetime>encodetime(fjstunde,fjminute,0,0) then\r\n begin\r\n btnanmelden.visible:=false;\r\n btnPauseBeginn.visible:=false;\r\n btnPauseEnde.visible:=false;\r\n btnObjektBeginn.visible:=false;\r\n btnObjektEnde.visible:=false;\r\n btnabmelden.visible:=false;\r\n btnErneutAnmelden.Visible:=false;\r\n btnKontaktBeginn.Visible:=false;\r\n btnKontaktEnde.Visible:=false;\r\n btnProduktionBeginn.Visible:=false;\r\n btnProduktionEnde.Visible:=false;\r\n btnAuftragBeginn.Visible:=false;\r\n btnAuftragEnde.Visible:=false;\r\n btnPauseVorgabe.Visible:=false;\r\n lblstatus.Caption:='Sie sind noch in einer Pause';\r\n end;\r\n //automatisch von bisheriger Tätigkeit abmelden w/Herkunft aus Auftrag\r\n\r\n if (PZE_AutoObjektnummer<>'') OR (PZE_AutoAuftragnummer<>'') then\r\n begin\r\n if xdsScanScanArt.AsInteger=24 then btnAuftragEndeClick(nil);\r\n if xdsscanscanart.AsInteger=14 then btnKontaktEndeClick(nil);\r\n if xdsscanscanart.AsInteger=2 then btnPauseEndeClick(nil);\r\n if xdsscanscanart.AsInteger=4 then btnObjektEndeClick(nil);\r\n if xdsScanScanArt.AsInteger=34 then btnProduktionEndeClick(nil);\r\n end;\r\n lblAutoObjekt.Caption:=PZE_AutoObjektnummer;\r\n lblAutoAuftrag.Caption:=PZE_AutoAuftragnummer;\r\n\r\nend;\r\n\r\nprocedure TPZE.xdsScanAfterPost(DataSet: TDataSet);\r\nbegin\r\n if myDoApply=1 then xdsScan.ApplyUpdates;\r\n\r\nend;\r\n\r\nprocedure TPZE.xdsScanNewRecord(DataSet: TDataSet);\r\nbegin\r\n xdsScanFAID.Value:=xdsSingleArbeitszeit.CurrentData;\r\n xdsSCANPersonalnummer.AsString:=Benutzerpersonalnummer;\r\n xdsScanScanDatumZeit.AsDateTime:=date+time;\r\n xdsSCANDatum.AsDateTime:=encodedate(ftjahr,ftmonat,fttag);\r\n xdsSCANScanArt.AsInteger:=myScanArt;\r\n xdsSCANScanBegin.AsDateTime:=encodetime(ftstunde,ftminute,0,0);\r\n xdsScanausgewertet.AsBoolean:=false;\r\n xdsScanAMS.AsFloat:=ftms;\r\n xdsScanObjektreferenz.AsString:=myObjektReferenz;\r\n xdsScanKundennummer.AsString:=myKontaktReferenz;\r\n xdsScanAuftrag.AsString:=myAuftragReferenz;\r\n xdsScanPAuftrag.AsString:=myProduktionReferenz;\r\n xdsScanStundenArt.AsString:=mystundenart;\r\n xdsScanArbeitArt.AsString:=myArbeitArt;\r\n xdsScanDauerMinuten.AsFloat:=0;\r\n xdsScanInfos.AsString:=myInfos;\r\n xdsScanKalkStundensatz.AsFloat:=0;\r\n xdsScanKalkKosten.AsFloat:=0;\r\n myObjektReferenz:='';\r\n myKontaktReferenz:='';\r\n myArbeitArt:='[-]';\r\n myProduktionReferenz:='';\r\n myAuftragReferenz:='';\r\n mystundenart:='[-]';\r\n myInfos:='';\r\n\r\n xdsscan.Post;\r\nend;\r\n\r\nprocedure TPZE.xdsSingleArbeitszeitAfterOpen(DataSet: TDataSet);\r\nbegin\r\n if xdsSingleArbeitszeit.RecordCount<1 then\r\n begin\r\n showmessage('CadiaPZE scheint für Sie nicht eingerichtet zu sein, sprechen Sie bitte Ihren Administrator an');\r\n end\r\n else\r\n begin\r\n myPauseSoll:=xdsSingleArbeitszeitSollPause.AsDateTime;\r\n btnPauseVorgabe.Caption:='Pause FIX '+formatdatetime('hh:mm',myPauseSoll);\r\n xdsPauseFix.Close;\r\n xdsPauseFix.QueryString:='$filter=FAID eq '+ xdsSingleArbeitszeitID.AsString+' &$orderby=ScanDatumZeit,ams';\r\n xdsScan.Close;\r\n xdsscan.QueryString:='$filter=FAID eq '+ xdsSingleArbeitszeitID.AsString+' &$orderby=ScanDatumZeit,ams';\r\n xdsscan.load;\r\n end;\r\nend;\r\n\r\nprocedure TPZE.xdsStundenartAfterOpen(DataSet: TDataSet);\r\nbegin\r\n lookupstundenart.Items.Clear;\r\n xdsStundenart.First;\r\n while not xdsstundenart.eof do\r\n begin\r\n lookupstundenart.Items.Add(xdsStundenartStundenArt.asstring);\r\n xdsstundenart.Next;\r\n end;\r\n\r\n xdsSingleArbeitszeit.Close;\r\n xdssingleArbeitszeit.QueryString:='$filter=(EintragsArt eq 0) AND (Personalnummer eq '+Benutzerpersonalnummer+') AND (Datum eq '+formatdatetime('yyyy-mm-dd',date)+')';\r\n xdsSingleArbeitszeit.load;\r\nend;\r\n\r\n\r\nprocedure TPZE.kontaktsuche1;\r\nvar\r\n LFrm:TfrmKontaktsuche;\r\n procedure AfterCreate(AForm:TObject);\r\n var\r\n LForm:TfrmKontaktsuche;\r\n begin\r\n LForm:=(AForm as TfrmKontaktsuche);\r\n lform.Kontaktnummer:='';\r\n lform.weiterzuEinzelkontakt:=false;\r\n end;\r\n\r\n procedure AfterShowmodal(Avalue:TModalResult);\r\n begin\r\n if lfrm.Kontaktnummer<>'' then\r\n begin\r\n myKontaktReferenz:=lfrm.kontaktnummer;\r\n myInfos:=trim(lfrm.LUVorname+' '+lfrm.LUNachname);\r\n myDoApply:=0;\r\n myScanArt:=14;\r\n panelfunktionen.Visible:=false;\r\n panelArbeitsart.Visible:=true;\r\n lblauswahlinfo.Caption:=mykontaktreferenz+' '+myinfos;\r\n\r\n end;\r\n if lfrm.kontaktnummer='' then\r\n begin\r\n showmessage('Der Vorgang wird abgebrochen, da Sie keinen Kontakt ausgewählt haben');\r\n end;\r\n\r\n end;\r\n\r\n begin\r\n LFrm:=TfrmKontaktsuche.CreateNew(@AfterCreate);\r\n // LFrm.Popup:=true;\r\n LFrm.ShowModal(@AfterShowmodal);\r\n\r\n end;\r\n\r\nprocedure TPZE.kontaktsuche2;\r\nvar\r\n LFrm:TfrmKontaktNummerSuche;\r\n procedure AfterCreate(AForm:TObject);\r\n var\r\n LForm:TfrmKontaktNummerSuche;\r\n begin\r\n LForm:=(AForm as TfrmKontaktNummerSuche);\r\n lform.Kontaktnummer:='';\r\n lform.weiterzuEinzelkontakt:=false;\r\n end;\r\n\r\n procedure AfterShowmodal(Avalue:TModalResult);\r\n begin\r\n if lfrm.Kontaktnummer<>'' then\r\n begin\r\n myKontaktReferenz:=lfrm.kontaktnummer;\r\n myInfos:=trim(lfrm.LUVorname+' '+lfrm.LUNachname);\r\n myDoApply:=0;\r\n myScanArt:=14;\r\n panelfunktionen.Visible:=false;\r\n panelArbeitsart.Visible:=true;\r\n lblauswahlinfo.Caption:=mykontaktreferenz+' '+myinfos;\r\n\r\n end;\r\n if lfrm.kontaktnummer='' then\r\n begin\r\n showmessage('Der Vorgang wird abgebrochen, da Sie keinen Kontakt ausgewählt haben');\r\n end;\r\n\r\n end;\r\n\r\n begin\r\n LFrm:=TfrmKontaktNummerSuche.CreateNew(@AfterCreate);\r\n // LFrm.Popup:=true;\r\n LFrm.ShowModal(@AfterShowmodal);\r\n\r\n end;\r\n\r\nprocedure TPZE.LoadDFMValues;\r\nbegin\r\n inherited LoadDFMValues;\r\n\r\n lblstatus := TLabel.Create(Self);\r\n lblPInfo := TLabel.Create(Self);\r\n WebDBLabel2 := TDBLabel.Create(Self);\r\n lblAutoObjekt := TLabel.Create(Self);\r\n lblAutoAuftrag := TLabel.Create(Self);\r\n panelfunktionen := TPanel.Create(Self);\r\n btnAnmelden := TButton.Create(Self);\r\n btnPauseBeginn := TButton.Create(Self);\r\n btnPauseEnde := TButton.Create(Self);\r\n btnAbmelden := TButton.Create(Self);\r\n btnObjektBeginn := TButton.Create(Self);\r\n btnObjektEnde := TButton.Create(Self);\r\n btnErneutAnmelden := TButton.Create(Self);\r\n btnKontaktBeginn := TButton.Create(Self);\r\n btnKontaktEnde := TButton.Create(Self);\r\n btnAuftragBeginn := TButton.Create(Self);\r\n btnAuftragEnde := TButton.Create(Self);\r\n btnProduktionBeginn := TButton.Create(Self);\r\n btnProduktionEnde := TButton.Create(Self);\r\n btnPauseVorgabe := TButton.Create(Self);\r\n Container1 := THTMLContainer.Create(Self);\r\n Container2 := THTMLContainer.Create(Self);\r\n btnzurueck := TButton.Create(Self);\r\n TC := TTableControl.Create(Self);\r\n panelArbeitsart := TPanel.Create(Self);\r\n lblauswahlinfo := TLabel.Create(Self);\r\n radioarbeitsart := TRadioGroup.Create(Self);\r\n btnOK := TButton.Create(Self);\r\n btnAbbrechen := TButton.Create(Self);\r\n panelstundenart := TPanel.Create(Self);\r\n lblauswahlobjekt := TLabel.Create(Self);\r\n btnObjektOK := TButton.Create(Self);\r\n btnObjektAbbrechen := TButton.Create(Self);\r\n lookupstundenart := TComboBox.Create(Self);\r\n xdsSingleArbeitszeit := TXDataWebDataSet.Create(Self);\r\n xdsSingleArbeitszeitID := TStringField.Create(Self);\r\n xdsSingleArbeitszeitPersonalnummer := TIntegerField.Create(Self);\r\n xdsSingleArbeitszeitDatum := TDateTimeField.Create(Self);\r\n xdsSingleArbeitszeitEintragsArt := TIntegerField.Create(Self);\r\n xdsSingleArbeitszeitSollPause := TDateTimeField.Create(Self);\r\n sourceSingleArbeitszeit := TDataSource.Create(Self);\r\n xdsScan := TXDataWebDataSet.Create(Self);\r\n xdsScanPersonalnummer := TIntegerField.Create(Self);\r\n xdsScanScanDatumZeit := TDateTimeField.Create(Self);\r\n xdsScanDatum := TDateTimeField.Create(Self);\r\n xdsScanScanArt := TIntegerField.Create(Self);\r\n xdsScanObjektreferenz := TStringField.Create(Self);\r\n xdsScanScanBegin := TDateTimeField.Create(Self);\r\n xdsScanScanEnde := TDateTimeField.Create(Self);\r\n xdsScanausgewertet := TBooleanField.Create(Self);\r\n xdsScanAMS := TFloatField.Create(Self);\r\n xdsScanStundenArt := TStringField.Create(Self);\r\n xdsScanFAID := TXDataWebEntityField.Create(Self);\r\n xdsScanID := TStringField.Create(Self);\r\n xdsScanKundennummer := TStringField.Create(Self);\r\n xdsScanAuftrag := TStringField.Create(Self);\r\n xdsScanPAuftrag := TStringField.Create(Self);\r\n xdsScanArbeitArt := TStringField.Create(Self);\r\n xdsScanInfos := TStringField.Create(Self);\r\n xdsScanDauerMinuten := TFloatField.Create(Self);\r\n xdsScanKalkStundensatz := TFloatField.Create(Self);\r\n xdsScanKalkKosten := TFloatField.Create(Self);\r\n sourceScan := TDataSource.Create(Self);\r\n xdsPZEEinstellungen := TXDataWebDataSet.Create(Self);\r\n xdsPZEEinstellungenZuordnungObjekt := TIntegerField.Create(Self);\r\n xdsPZEEinstellungenZuordnungKontakt := TIntegerField.Create(Self);\r\n xdsPZEEinstellungenZuordnungAuftrag := TIntegerField.Create(Self);\r\n xdsPZEEinstellungenZuordnungProduktion := TIntegerField.Create(Self);\r\n xdsPZEEinstellungenAuswahlNurKontaktnummer := TIntegerField.Create(Self);\r\n xdsPZEEinstellungenPauseVorgabe := TIntegerField.Create(Self);\r\n sourcePZEEinstellungen := TDataSource.Create(Self);\r\n xdsStundenart := TXDataWebDataSet.Create(Self);\r\n xdsStundenartStundenArt := TStringField.Create(Self);\r\n sourceStundenart := TDataSource.Create(Self);\r\n xdsPauseFix := TXDataWebDataSet.Create(Self);\r\n xdsPauseFixFAID := TXDataWebEntityField.Create(Self);\r\n xdsPauseFixID := TStringField.Create(Self);\r\n xdsPauseFixPersonalnummer := TIntegerField.Create(Self);\r\n xdsPauseFixScanDatumZeit := TDateTimeField.Create(Self);\r\n xdsPauseFixDatum := TDateTimeField.Create(Self);\r\n xdsPauseFixScanArt := TIntegerField.Create(Self);\r\n xdsPauseFixObjektreferenz := TStringField.Create(Self);\r\n xdsPauseFixScanBegin := TDateTimeField.Create(Self);\r\n xdsPauseFixScanEnde := TDateTimeField.Create(Self);\r\n xdsPauseFixausgewertet := TBooleanField.Create(Self);\r\n xdsPauseFixAMS := TFloatField.Create(Self);\r\n xdsPauseFixStundenArt := TStringField.Create(Self);\r\n xdsPauseFixKundennummer := TStringField.Create(Self);\r\n xdsPauseFixAuftrag := TStringField.Create(Self);\r\n xdsPauseFixPAuftrag := TStringField.Create(Self);\r\n xdsPauseFixArbeitArt := TStringField.Create(Self);\r\n xdsPauseFixInfos := TStringField.Create(Self);\r\n xdsPauseFixDauerMinuten := TFloatField.Create(Self);\r\n xdsPauseFixKalkStundensatz := TFloatField.Create(Self);\r\n xdsPauseFixKalkKosten := TFloatField.Create(Self);\r\n\r\n lblstatus.BeforeLoadDFMValues;\r\n lblPInfo.BeforeLoadDFMValues;\r\n WebDBLabel2.BeforeLoadDFMValues;\r\n lblAutoObjekt.BeforeLoadDFMValues;\r\n lblAutoAuftrag.BeforeLoadDFMValues;\r\n panelfunktionen.BeforeLoadDFMValues;\r\n btnAnmelden.BeforeLoadDFMValues;\r\n btnPauseBeginn.BeforeLoadDFMValues;\r\n btnPauseEnde.BeforeLoadDFMValues;\r\n btnAbmelden.BeforeLoadDFMValues;\r\n btnObjektBeginn.BeforeLoadDFMValues;\r\n btnObjektEnde.BeforeLoadDFMValues;\r\n btnErneutAnmelden.BeforeLoadDFMValues;\r\n btnKontaktBeginn.BeforeLoadDFMValues;\r\n btnKontaktEnde.BeforeLoadDFMValues;\r\n btnAuftragBeginn.BeforeLoadDFMValues;\r\n btnAuftragEnde.BeforeLoadDFMValues;\r\n btnProduktionBeginn.BeforeLoadDFMValues;\r\n btnProduktionEnde.BeforeLoadDFMValues;\r\n btnPauseVorgabe.BeforeLoadDFMValues;\r\n Container1.BeforeLoadDFMValues;\r\n Container2.BeforeLoadDFMValues;\r\n btnzurueck.BeforeLoadDFMValues;\r\n TC.BeforeLoadDFMValues;\r\n panelArbeitsart.BeforeLoadDFMValues;\r\n lblauswahlinfo.BeforeLoadDFMValues;\r\n radioarbeitsart.BeforeLoadDFMValues;\r\n btnOK.BeforeLoadDFMValues;\r\n btnAbbrechen.BeforeLoadDFMValues;\r\n panelstundenart.BeforeLoadDFMValues;\r\n lblauswahlobjekt.BeforeLoadDFMValues;\r\n btnObjektOK.BeforeLoadDFMValues;\r\n btnObjektAbbrechen.BeforeLoadDFMValues;\r\n lookupstundenart.BeforeLoadDFMValues;\r\n xdsSingleArbeitszeit.BeforeLoadDFMValues;\r\n xdsSingleArbeitszeitID.BeforeLoadDFMValues;\r\n xdsSingleArbeitszeitPersonalnummer.BeforeLoadDFMValues;\r\n xdsSingleArbeitszeitDatum.BeforeLoadDFMValues;\r\n xdsSingleArbeitszeitEintragsArt.BeforeLoadDFMValues;\r\n xdsSingleArbeitszeitSollPause.BeforeLoadDFMValues;\r\n sourceSingleArbeitszeit.BeforeLoadDFMValues;\r\n xdsScan.BeforeLoadDFMValues;\r\n xdsScanPersonalnummer.BeforeLoadDFMValues;\r\n xdsScanScanDatumZeit.BeforeLoadDFMValues;\r\n xdsScanDatum.BeforeLoadDFMValues;\r\n xdsScanScanArt.BeforeLoadDFMValues;\r\n xdsScanObjektreferenz.BeforeLoadDFMValues;\r\n xdsScanScanBegin.BeforeLoadDFMValues;\r\n xdsScanScanEnde.BeforeLoadDFMValues;\r\n xdsScanausgewertet.BeforeLoadDFMValues;\r\n xdsScanAMS.BeforeLoadDFMValues;\r\n xdsScanStundenArt.BeforeLoadDFMValues;\r\n xdsScanFAID.BeforeLoadDFMValues;\r\n xdsScanID.BeforeLoadDFMValues;\r\n xdsScanKundennummer.BeforeLoadDFMValues;\r\n xdsScanAuftrag.BeforeLoadDFMValues;\r\n xdsScanPAuftrag.BeforeLoadDFMValues;\r\n xdsScanArbeitArt.BeforeLoadDFMValues;\r\n xdsScanInfos.BeforeLoadDFMValues;\r\n xdsScanDauerMinuten.BeforeLoadDFMValues;\r\n xdsScanKalkStundensatz.BeforeLoadDFMValues;\r\n xdsScanKalkKosten.BeforeLoadDFMValues;\r\n sourceScan.BeforeLoadDFMValues;\r\n xdsPZEEinstellungen.BeforeLoadDFMValues;\r\n xdsPZEEinstellungenZuordnungObjekt.BeforeLoadDFMValues;\r\n xdsPZEEinstellungenZuordnungKontakt.BeforeLoadDFMValues;\r\n xdsPZEEinstellungenZuordnungAuftrag.BeforeLoadDFMValues;\r\n xdsPZEEinstellungenZuordnungProduktion.BeforeLoadDFMValues;\r\n xdsPZEEinstellungenAuswahlNurKontaktnummer.BeforeLoadDFMValues;\r\n xdsPZEEinstellungenPauseVorgabe.BeforeLoadDFMValues;\r\n sourcePZEEinstellungen.BeforeLoadDFMValues;\r\n xdsStundenart.BeforeLoadDFMValues;\r\n xdsStundenartStundenArt.BeforeLoadDFMValues;\r\n sourceStundenart.BeforeLoadDFMValues;\r\n xdsPauseFix.BeforeLoadDFMValues;\r\n xdsPauseFixFAID.BeforeLoadDFMValues;\r\n xdsPauseFixID.BeforeLoadDFMValues;\r\n xdsPauseFixPersonalnummer.BeforeLoadDFMValues;\r\n xdsPauseFixScanDatumZeit.BeforeLoadDFMValues;\r\n xdsPauseFixDatum.BeforeLoadDFMValues;\r\n xdsPauseFixScanArt.BeforeLoadDFMValues;\r\n xdsPauseFixObjektreferenz.BeforeLoadDFMValues;\r\n xdsPauseFixScanBegin.BeforeLoadDFMValues;\r\n xdsPauseFixScanEnde.BeforeLoadDFMValues;\r\n xdsPauseFixausgewertet.BeforeLoadDFMValues;\r\n xdsPauseFixAMS.BeforeLoadDFMValues;\r\n xdsPauseFixStundenArt.BeforeLoadDFMValues;\r\n xdsPauseFixKundennummer.BeforeLoadDFMValues;\r\n xdsPauseFixAuftrag.BeforeLoadDFMValues;\r\n xdsPauseFixPAuftrag.BeforeLoadDFMValues;\r\n xdsPauseFixArbeitArt.BeforeLoadDFMValues;\r\n xdsPauseFixInfos.BeforeLoadDFMValues;\r\n xdsPauseFixDauerMinuten.BeforeLoadDFMValues;\r\n xdsPauseFixKalkStundensatz.BeforeLoadDFMValues;\r\n xdsPauseFixKalkKosten.BeforeLoadDFMValues;\r\n try\r\n Name := 'PZE';\r\n Width := 400;\r\n Height := 574;\r\n Caption := 'PZE';\r\n CSSLibrary := cssBootstrap;\r\n ElementFont := efCSS;\r\n SetEvent(Self, 'OnShow', 'WebFormShow');\r\n lblstatus.SetParentComponent(Self);\r\n lblstatus.Name := 'lblstatus';\r\n lblstatus.Left := 8;\r\n lblstatus.Top := 125;\r\n lblstatus.Width := 44;\r\n lblstatus.Height := 15;\r\n lblstatus.Caption := 'lblstatus';\r\n lblstatus.ElementClassName := 'h6 text-primary m-1';\r\n lblstatus.ElementFont := efCSS;\r\n lblstatus.ElementPosition := epIgnore;\r\n lblstatus.HeightStyle := ssAuto;\r\n lblstatus.HeightPercent := 100.000000000000000000;\r\n lblstatus.WidthStyle := ssAuto;\r\n lblstatus.WidthPercent := 100.000000000000000000;\r\n lblPInfo.SetParentComponent(Self);\r\n lblPInfo.Name := 'lblPInfo';\r\n lblPInfo.AlignWithMargins := True;\r\n lblPInfo.Left := -2;\r\n lblPInfo.Top := 144;\r\n lblPInfo.Width := 41;\r\n lblPInfo.Height := 15;\r\n lblPInfo.Alignment := taCenter;\r\n lblPInfo.Caption := 'lblPInfo';\r\n lblPInfo.ElementClassName := 'h6 text-primary m-1';\r\n lblPInfo.ElementFont := efCSS;\r\n lblPInfo.ElementPosition := epIgnore;\r\n lblPInfo.HeightStyle := ssAuto;\r\n lblPInfo.HeightPercent := 100.000000000000000000;\r\n lblPInfo.WidthStyle := ssAuto;\r\n lblPInfo.WidthPercent := 100.000000000000000000;\r\n WebDBLabel2.SetParentComponent(Self);\r\n WebDBLabel2.Name := 'WebDBLabel2';\r\n WebDBLabel2.AlignWithMargins := True;\r\n WebDBLabel2.Left := 11;\r\n WebDBLabel2.Top := 160;\r\n WebDBLabel2.Width := 73;\r\n WebDBLabel2.Height := 15;\r\n WebDBLabel2.Caption := 'WebDBLabel2';\r\n WebDBLabel2.ElementClassName := 'h6 text-primary m-1';\r\n WebDBLabel2.ElementFont := efCSS;\r\n WebDBLabel2.ElementPosition := epIgnore;\r\n WebDBLabel2.HeightPercent := 100.000000000000000000;\r\n WebDBLabel2.HTMLType := tP;\r\n WebDBLabel2.WidthStyle := ssAuto;\r\n WebDBLabel2.WidthPercent := 100.000000000000000000;\r\n WebDBLabel2.DataField := 'Datum';\r\n WebDBLabel2.DataSource := sourceSingleArbeitszeit;\r\n lblAutoObjekt.SetParentComponent(Self);\r\n lblAutoObjekt.Name := 'lblAutoObjekt';\r\n lblAutoObjekt.Left := 288;\r\n lblAutoObjekt.Top := 485;\r\n lblAutoObjekt.Width := 44;\r\n lblAutoObjekt.Height := 15;\r\n lblAutoObjekt.Caption := 'lblstatus';\r\n lblAutoObjekt.ElementClassName := 'h6 text-primary m-1';\r\n lblAutoObjekt.ElementFont := efCSS;\r\n lblAutoObjekt.ElementPosition := epIgnore;\r\n lblAutoObjekt.HeightStyle := ssAuto;\r\n lblAutoObjekt.HeightPercent := 100.000000000000000000;\r\n lblAutoObjekt.WidthStyle := ssAuto;\r\n lblAutoObjekt.WidthPercent := 100.000000000000000000;\r\n lblAutoAuftrag.SetParentComponent(Self);\r\n lblAutoAuftrag.Name := 'lblAutoAuftrag';\r\n lblAutoAuftrag.Left := 288;\r\n lblAutoAuftrag.Top := 504;\r\n lblAutoAuftrag.Width := 44;\r\n lblAutoAuftrag.Height := 15;\r\n lblAutoAuftrag.Caption := 'lblstatus';\r\n lblAutoAuftrag.ElementClassName := 'h6 text-primary m-1';\r\n lblAutoAuftrag.ElementFont := efCSS;\r\n lblAutoAuftrag.ElementPosition := epIgnore;\r\n lblAutoAuftrag.HeightStyle := ssAuto;\r\n lblAutoAuftrag.HeightPercent := 100.000000000000000000;\r\n lblAutoAuftrag.WidthStyle := ssAuto;\r\n lblAutoAuftrag.WidthPercent := 100.000000000000000000;\r\n panelfunktionen.SetParentComponent(Self);\r\n panelfunktionen.Name := 'panelfunktionen';\r\n panelfunktionen.Left := 0;\r\n panelfunktionen.Top := 179;\r\n panelfunktionen.Width := 257;\r\n panelfunktionen.Height := 300;\r\n panelfunktionen.ElementClassName := 'card m-1 border-info';\r\n panelfunktionen.Caption := 'panelfunktionen';\r\n panelfunktionen.ChildOrder := 9;\r\n panelfunktionen.Color := 8340248;\r\n panelfunktionen.ElementFont := efCSS;\r\n panelfunktionen.ElementPosition := epIgnore;\r\n panelfunktionen.ShowCaption := False;\r\n btnAnmelden.SetParentComponent(panelfunktionen);\r\n btnAnmelden.Name := 'btnAnmelden';\r\n btnAnmelden.AlignWithMargins := True;\r\n btnAnmelden.Left := 3;\r\n btnAnmelden.Top := 3;\r\n btnAnmelden.Width := 251;\r\n btnAnmelden.Height := 40;\r\n btnAnmelden.Align := alTop;\r\n btnAnmelden.Caption := 'Anmelden';\r\n btnAnmelden.ChildOrder := 7;\r\n btnAnmelden.ElementClassName := 'btn btn-info btn-sm text-center';\r\n btnAnmelden.ElementFont := efCSS;\r\n btnAnmelden.HeightStyle := ssAuto;\r\n btnAnmelden.HeightPercent := 100.000000000000000000;\r\n btnAnmelden.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnAnmelden, Self, 'OnClick', 'btnAnmeldenClick');\r\n btnPauseBeginn.SetParentComponent(panelfunktionen);\r\n btnPauseBeginn.Name := 'btnPauseBeginn';\r\n btnPauseBeginn.AlignWithMargins := True;\r\n btnPauseBeginn.Left := 3;\r\n btnPauseBeginn.Top := 95;\r\n btnPauseBeginn.Width := 251;\r\n btnPauseBeginn.Height := 40;\r\n btnPauseBeginn.Align := alTop;\r\n btnPauseBeginn.Caption := 'Pause';\r\n btnPauseBeginn.ChildOrder := 9;\r\n btnPauseBeginn.ElementClassName := 'btn btn-info btn-sm text-center';\r\n btnPauseBeginn.ElementFont := efCSS;\r\n btnPauseBeginn.HeightStyle := ssAuto;\r\n btnPauseBeginn.HeightPercent := 100.000000000000000000;\r\n btnPauseBeginn.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnPauseBeginn, Self, 'OnClick', 'btnPauseBeginnClick');\r\n btnPauseEnde.SetParentComponent(panelfunktionen);\r\n btnPauseEnde.Name := 'btnPauseEnde';\r\n btnPauseEnde.AlignWithMargins := True;\r\n btnPauseEnde.Left := 3;\r\n btnPauseEnde.Top := 141;\r\n btnPauseEnde.Width := 251;\r\n btnPauseEnde.Height := 40;\r\n btnPauseEnde.Align := alTop;\r\n btnPauseEnde.Caption := 'Pause Ende';\r\n btnPauseEnde.ChildOrder := 10;\r\n btnPauseEnde.ElementClassName := 'btn btn-info btn-sm text-center';\r\n btnPauseEnde.ElementFont := efCSS;\r\n btnPauseEnde.HeightStyle := ssAuto;\r\n btnPauseEnde.HeightPercent := 100.000000000000000000;\r\n btnPauseEnde.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnPauseEnde, Self, 'OnClick', 'btnPauseEndeClick');\r\n btnAbmelden.SetParentComponent(panelfunktionen);\r\n btnAbmelden.Name := 'btnAbmelden';\r\n btnAbmelden.AlignWithMargins := True;\r\n btnAbmelden.Left := 3;\r\n btnAbmelden.Top := 555;\r\n btnAbmelden.Width := 251;\r\n btnAbmelden.Height := 40;\r\n btnAbmelden.Align := alTop;\r\n btnAbmelden.Caption := 'Abmelden';\r\n btnAbmelden.ChildOrder := 11;\r\n btnAbmelden.ElementClassName := 'btn btn-info btn-sm text-center';\r\n btnAbmelden.ElementFont := efCSS;\r\n btnAbmelden.HeightStyle := ssAuto;\r\n btnAbmelden.HeightPercent := 100.000000000000000000;\r\n btnAbmelden.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnAbmelden, Self, 'OnClick', 'btnAbmeldenClick');\r\n btnObjektBeginn.SetParentComponent(panelfunktionen);\r\n btnObjektBeginn.Name := 'btnObjektBeginn';\r\n btnObjektBeginn.AlignWithMargins := True;\r\n btnObjektBeginn.Left := 3;\r\n btnObjektBeginn.Top := 187;\r\n btnObjektBeginn.Width := 251;\r\n btnObjektBeginn.Height := 40;\r\n btnObjektBeginn.Align := alTop;\r\n btnObjektBeginn.Caption := 'Objekt';\r\n btnObjektBeginn.ChildOrder := 13;\r\n btnObjektBeginn.ElementClassName := 'btn btn-info btn-sm text-center';\r\n btnObjektBeginn.ElementFont := efCSS;\r\n btnObjektBeginn.HeightStyle := ssAuto;\r\n btnObjektBeginn.HeightPercent := 100.000000000000000000;\r\n btnObjektBeginn.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnObjektBeginn, Self, 'OnClick', 'btnObjektBeginnClick');\r\n btnObjektEnde.SetParentComponent(panelfunktionen);\r\n btnObjektEnde.Name := 'btnObjektEnde';\r\n btnObjektEnde.AlignWithMargins := True;\r\n btnObjektEnde.Left := 3;\r\n btnObjektEnde.Top := 509;\r\n btnObjektEnde.Width := 251;\r\n btnObjektEnde.Height := 40;\r\n btnObjektEnde.Align := alTop;\r\n btnObjektEnde.Caption := 'Objekt Ende';\r\n btnObjektEnde.ChildOrder := 14;\r\n btnObjektEnde.ElementClassName := 'btn btn-info btn-sm text-center';\r\n btnObjektEnde.ElementFont := efCSS;\r\n btnObjektEnde.HeightStyle := ssAuto;\r\n btnObjektEnde.HeightPercent := 100.000000000000000000;\r\n btnObjektEnde.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnObjektEnde, Self, 'OnClick', 'btnObjektEndeClick');\r\n btnErneutAnmelden.SetParentComponent(panelfunktionen);\r\n btnErneutAnmelden.Name := 'btnErneutAnmelden';\r\n btnErneutAnmelden.AlignWithMargins := True;\r\n btnErneutAnmelden.Left := 3;\r\n btnErneutAnmelden.Top := 601;\r\n btnErneutAnmelden.Width := 251;\r\n btnErneutAnmelden.Height := 40;\r\n btnErneutAnmelden.Align := alTop;\r\n btnErneutAnmelden.Caption := 'erneut anmelden';\r\n btnErneutAnmelden.ChildOrder := 12;\r\n btnErneutAnmelden.ElementClassName := 'btn btn-info btn-sm text-center';\r\n btnErneutAnmelden.ElementFont := efCSS;\r\n btnErneutAnmelden.HeightStyle := ssAuto;\r\n btnErneutAnmelden.HeightPercent := 100.000000000000000000;\r\n btnErneutAnmelden.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnErneutAnmelden, Self, 'OnClick', 'btnErneutAnmeldenClick');\r\n btnKontaktBeginn.SetParentComponent(panelfunktionen);\r\n btnKontaktBeginn.Name := 'btnKontaktBeginn';\r\n btnKontaktBeginn.AlignWithMargins := True;\r\n btnKontaktBeginn.Left := 3;\r\n btnKontaktBeginn.Top := 233;\r\n btnKontaktBeginn.Width := 251;\r\n btnKontaktBeginn.Height := 40;\r\n btnKontaktBeginn.Align := alTop;\r\n btnKontaktBeginn.Caption := 'Kontakt';\r\n btnKontaktBeginn.ChildOrder := 13;\r\n btnKontaktBeginn.ElementClassName := 'btn btn-info btn-sm text-center';\r\n btnKontaktBeginn.ElementFont := efCSS;\r\n btnKontaktBeginn.HeightStyle := ssAuto;\r\n btnKontaktBeginn.HeightPercent := 100.000000000000000000;\r\n btnKontaktBeginn.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnKontaktBeginn, Self, 'OnClick', 'btnKontaktBeginnClick');\r\n btnKontaktEnde.SetParentComponent(panelfunktionen);\r\n btnKontaktEnde.Name := 'btnKontaktEnde';\r\n btnKontaktEnde.AlignWithMargins := True;\r\n btnKontaktEnde.Left := 3;\r\n btnKontaktEnde.Top := 463;\r\n btnKontaktEnde.Width := 251;\r\n btnKontaktEnde.Height := 40;\r\n btnKontaktEnde.Align := alTop;\r\n btnKontaktEnde.Caption := 'Kontakt Ende';\r\n btnKontaktEnde.ChildOrder := 14;\r\n btnKontaktEnde.ElementClassName := 'btn btn-info btn-sm text-center';\r\n btnKontaktEnde.ElementFont := efCSS;\r\n btnKontaktEnde.HeightStyle := ssAuto;\r\n btnKontaktEnde.HeightPercent := 100.000000000000000000;\r\n btnKontaktEnde.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnKontaktEnde, Self, 'OnClick', 'btnKontaktEndeClick');\r\n btnAuftragBeginn.SetParentComponent(panelfunktionen);\r\n btnAuftragBeginn.Name := 'btnAuftragBeginn';\r\n btnAuftragBeginn.AlignWithMargins := True;\r\n btnAuftragBeginn.Left := 3;\r\n btnAuftragBeginn.Top := 279;\r\n btnAuftragBeginn.Width := 251;\r\n btnAuftragBeginn.Height := 40;\r\n btnAuftragBeginn.Align := alTop;\r\n btnAuftragBeginn.Caption := 'Auftrag';\r\n btnAuftragBeginn.ChildOrder := 13;\r\n btnAuftragBeginn.ElementClassName := 'btn btn-info btn-sm text-center';\r\n btnAuftragBeginn.ElementFont := efCSS;\r\n btnAuftragBeginn.HeightStyle := ssAuto;\r\n btnAuftragBeginn.HeightPercent := 100.000000000000000000;\r\n btnAuftragBeginn.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnAuftragBeginn, Self, 'OnClick', 'btnAuftragBeginnClick');\r\n btnAuftragEnde.SetParentComponent(panelfunktionen);\r\n btnAuftragEnde.Name := 'btnAuftragEnde';\r\n btnAuftragEnde.AlignWithMargins := True;\r\n btnAuftragEnde.Left := 3;\r\n btnAuftragEnde.Top := 417;\r\n btnAuftragEnde.Width := 251;\r\n btnAuftragEnde.Height := 40;\r\n btnAuftragEnde.Align := alTop;\r\n btnAuftragEnde.Caption := 'Auftrag Ende';\r\n btnAuftragEnde.ChildOrder := 14;\r\n btnAuftragEnde.ElementClassName := 'btn btn-info btn-sm text-center';\r\n btnAuftragEnde.ElementFont := efCSS;\r\n btnAuftragEnde.HeightStyle := ssAuto;\r\n btnAuftragEnde.HeightPercent := 100.000000000000000000;\r\n btnAuftragEnde.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnAuftragEnde, Self, 'OnClick', 'btnAuftragEndeClick');\r\n btnProduktionBeginn.SetParentComponent(panelfunktionen);\r\n btnProduktionBeginn.Name := 'btnProduktionBeginn';\r\n btnProduktionBeginn.AlignWithMargins := True;\r\n btnProduktionBeginn.Left := 3;\r\n btnProduktionBeginn.Top := 325;\r\n btnProduktionBeginn.Width := 251;\r\n btnProduktionBeginn.Height := 40;\r\n btnProduktionBeginn.Align := alTop;\r\n btnProduktionBeginn.Caption := 'Produktion';\r\n btnProduktionBeginn.ChildOrder := 13;\r\n btnProduktionBeginn.ElementClassName := 'btn btn-info btn-sm text-center';\r\n btnProduktionBeginn.ElementFont := efCSS;\r\n btnProduktionBeginn.HeightStyle := ssAuto;\r\n btnProduktionBeginn.HeightPercent := 100.000000000000000000;\r\n btnProduktionBeginn.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnProduktionBeginn, Self, 'OnClick', 'btnProduktionBeginnClick');\r\n btnProduktionEnde.SetParentComponent(panelfunktionen);\r\n btnProduktionEnde.Name := 'btnProduktionEnde';\r\n btnProduktionEnde.AlignWithMargins := True;\r\n btnProduktionEnde.Left := 3;\r\n btnProduktionEnde.Top := 371;\r\n btnProduktionEnde.Width := 251;\r\n btnProduktionEnde.Height := 40;\r\n btnProduktionEnde.Align := alTop;\r\n btnProduktionEnde.Caption := 'Produktion Ende';\r\n btnProduktionEnde.ChildOrder := 14;\r\n btnProduktionEnde.ElementClassName := 'btn btn-info btn-sm text-center';\r\n btnProduktionEnde.ElementFont := efCSS;\r\n btnProduktionEnde.HeightStyle := ssAuto;\r\n btnProduktionEnde.HeightPercent := 100.000000000000000000;\r\n btnProduktionEnde.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnProduktionEnde, Self, 'OnClick', 'btnProduktionEndeClick');\r\n btnPauseVorgabe.SetParentComponent(panelfunktionen);\r\n btnPauseVorgabe.Name := 'btnPauseVorgabe';\r\n btnPauseVorgabe.AlignWithMargins := True;\r\n btnPauseVorgabe.Left := 3;\r\n btnPauseVorgabe.Top := 49;\r\n btnPauseVorgabe.Width := 251;\r\n btnPauseVorgabe.Height := 40;\r\n btnPauseVorgabe.Align := alTop;\r\n btnPauseVorgabe.Caption := 'Pause';\r\n btnPauseVorgabe.ChildOrder := 9;\r\n btnPauseVorgabe.ElementClassName := 'btn btn-info btn-sm text-center';\r\n btnPauseVorgabe.ElementFont := efCSS;\r\n btnPauseVorgabe.HeightStyle := ssAuto;\r\n btnPauseVorgabe.HeightPercent := 100.000000000000000000;\r\n btnPauseVorgabe.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnPauseVorgabe, Self, 'OnClick', 'btnPauseVorgabeClick');\r\n Container1.SetParentComponent(Self);\r\n Container1.Name := 'Container1';\r\n Container1.Left := 0;\r\n Container1.Top := 0;\r\n Container1.Width := 169;\r\n Container1.Height := 41;\r\n Container1.HeightStyle := ssAuto;\r\n Container1.WidthStyle := ssPercent;\r\n Container1.ElementFont := efCSS;\r\n Container1.ElementPosition := epIgnore;\r\n Container2.SetParentComponent(Self);\r\n Container2.Name := 'Container2';\r\n Container2.Left := 0;\r\n Container2.Top := 47;\r\n Container2.Width := 169;\r\n Container2.Height := 41;\r\n Container2.ElementClassName := 'col d-flex justify-content-center';\r\n Container2.HeightStyle := ssAuto;\r\n Container2.WidthStyle := ssAuto;\r\n Container2.ChildOrder := 1;\r\n Container2.ElementFont := efCSS;\r\n Container2.ElementPosition := epIgnore;\r\n btnzurueck.SetParentComponent(Self);\r\n btnzurueck.Name := 'btnzurueck';\r\n btnzurueck.Left := 0;\r\n btnzurueck.Top := 94;\r\n btnzurueck.Width := 96;\r\n btnzurueck.Height := 25;\r\n btnzurueck.Caption := '<< zur'#252'ck';\r\n btnzurueck.ChildOrder := 4;\r\n btnzurueck.ElementClassName := 'btn btn-info btn-sm m-1 text-left';\r\n btnzurueck.ElementFont := efCSS;\r\n btnzurueck.ElementPosition := epIgnore;\r\n btnzurueck.HeightStyle := ssAuto;\r\n btnzurueck.HeightPercent := 100.000000000000000000;\r\n btnzurueck.WidthStyle := ssAuto;\r\n btnzurueck.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnzurueck, Self, 'OnClick', 'btnzurueckClick');\r\n TC.SetParentComponent(Self);\r\n TC.Name := 'TC';\r\n TC.Left := 0;\r\n TC.Top := 480;\r\n TC.Width := 247;\r\n TC.Height := 81;\r\n TC.ElementClassName := 'table table-sm table-hover table-bordered table-striped';\r\n TC.HeightStyle := ssAuto;\r\n TC.WidthStyle := ssPercent;\r\n TC.BorderColor := clSilver;\r\n TC.ChildOrder := 2;\r\n TC.ColHeader := False;\r\n TC.ElementHeaderClassName := 'table-info';\r\n TC.ElementPosition := epIgnore;\r\n TC.ElementTableClassName := 'table table-sm table-hover table-bordered table-striped';\r\n TC.Options.ScrollVertical := True;\r\n TC.WordWrap := True;\r\n TC.ColCount := 2;\r\n panelArbeitsart.SetParentComponent(Self);\r\n panelArbeitsart.Name := 'panelArbeitsart';\r\n panelArbeitsart.Left := 128;\r\n panelArbeitsart.Top := 182;\r\n panelArbeitsart.Width := 241;\r\n panelArbeitsart.Height := 195;\r\n panelArbeitsart.ElementClassName := 'card m-1 border-info';\r\n panelArbeitsart.HeightStyle := ssAuto;\r\n panelArbeitsart.Caption := 'panelArbeitsart';\r\n panelArbeitsart.ChildOrder := 8;\r\n panelArbeitsart.ElementBodyClassName := 'card-body';\r\n panelArbeitsart.ElementFont := efCSS;\r\n panelArbeitsart.ElementPosition := epIgnore;\r\n panelArbeitsart.ShowCaption := False;\r\n lblauswahlinfo.SetParentComponent(panelArbeitsart);\r\n lblauswahlinfo.Name := 'lblauswahlinfo';\r\n lblauswahlinfo.Left := 16;\r\n lblauswahlinfo.Top := 8;\r\n lblauswahlinfo.Width := 77;\r\n lblauswahlinfo.Height := 15;\r\n lblauswahlinfo.Caption := 'lblauswahlinfo';\r\n lblauswahlinfo.ElementLabelClassName := 'h6';\r\n lblauswahlinfo.ElementFont := efCSS;\r\n lblauswahlinfo.ElementPosition := epIgnore;\r\n lblauswahlinfo.HeightStyle := ssAuto;\r\n lblauswahlinfo.HeightPercent := 100.000000000000000000;\r\n lblauswahlinfo.WordWrap := True;\r\n lblauswahlinfo.WidthStyle := ssAuto;\r\n lblauswahlinfo.WidthPercent := 100.000000000000000000;\r\n radioarbeitsart.SetParentComponent(panelArbeitsart);\r\n radioarbeitsart.Name := 'radioarbeitsart';\r\n radioarbeitsart.Left := 40;\r\n radioarbeitsart.Top := 32;\r\n radioarbeitsart.Width := 160;\r\n radioarbeitsart.Height := 122;\r\n radioarbeitsart.ElementClassName := 'form-check';\r\n radioarbeitsart.HeightStyle := ssAuto;\r\n radioarbeitsart.WidthStyle := ssAuto;\r\n radioarbeitsart.Caption := 'Arbeitsart';\r\n radioarbeitsart.ChildOrder := 1;\r\n radioarbeitsart.Columns := 1;\r\n radioarbeitsart.ControlPosition := epIgnore;\r\n radioarbeitsart.ElementButtonClassName := 'form-check-input type=radio';\r\n radioarbeitsart.ElementGroupClassName := 'form-check type=radio';\r\n radioarbeitsart.ElementLabelClassName := 'form-check-label';\r\n radioarbeitsart.ElementFont := efCSS;\r\n radioarbeitsart.ElementPosition := epIgnore;\r\n radioarbeitsart.ItemIndex := 0;\r\n radioarbeitsart.Items.BeginUpdate;\r\n try\r\n radioarbeitsart.Items.Clear;\r\n radioarbeitsart.Items.Add('[-]');\r\n radioarbeitsart.Items.Add('Arbeitszeit');\r\n radioarbeitsart.Items.Add('Fahrzeit');\r\n finally\r\n radioarbeitsart.Items.EndUpdate;\r\n end;\r\n radioarbeitsart.Role := '';\r\n btnOK.SetParentComponent(panelArbeitsart);\r\n btnOK.Name := 'btnOK';\r\n btnOK.Left := 136;\r\n btnOK.Top := 160;\r\n btnOK.Width := 96;\r\n btnOK.Height := 25;\r\n btnOK.Caption := 'OK';\r\n btnOK.ChildOrder := 3;\r\n btnOK.ElementClassName := 'btn btn-info btn-sm m-2 text-center';\r\n btnOK.ElementFont := efCSS;\r\n btnOK.ElementPosition := epIgnore;\r\n btnOK.HeightStyle := ssAuto;\r\n btnOK.HeightPercent := 100.000000000000000000;\r\n btnOK.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnOK, Self, 'OnClick', 'btnOKClick');\r\n btnAbbrechen.SetParentComponent(panelArbeitsart);\r\n btnAbbrechen.Name := 'btnAbbrechen';\r\n btnAbbrechen.Left := 16;\r\n btnAbbrechen.Top := 160;\r\n btnAbbrechen.Width := 96;\r\n btnAbbrechen.Height := 25;\r\n btnAbbrechen.Caption := 'Abbrechen';\r\n btnAbbrechen.ChildOrder := 2;\r\n btnAbbrechen.ElementClassName := 'btn btn-info btn-sm m-2 text-center';\r\n btnAbbrechen.ElementFont := efCSS;\r\n btnAbbrechen.ElementPosition := epIgnore;\r\n btnAbbrechen.HeightStyle := ssAuto;\r\n btnAbbrechen.HeightPercent := 100.000000000000000000;\r\n btnAbbrechen.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnAbbrechen, Self, 'OnClick', 'btnAbbrechenClick');\r\n panelstundenart.SetParentComponent(Self);\r\n panelstundenart.Name := 'panelstundenart';\r\n panelstundenart.Left := 128;\r\n panelstundenart.Top := 27;\r\n panelstundenart.Width := 241;\r\n panelstundenart.Height := 195;\r\n panelstundenart.ElementClassName := 'card m-1 border-info';\r\n panelstundenart.HeightStyle := ssAuto;\r\n panelstundenart.Caption := 'panelArbeitsart';\r\n panelstundenart.ChildOrder := 8;\r\n panelstundenart.ElementBodyClassName := 'card-body';\r\n panelstundenart.ElementFont := efCSS;\r\n panelstundenart.ElementPosition := epIgnore;\r\n panelstundenart.ShowCaption := False;\r\n lblauswahlobjekt.SetParentComponent(panelstundenart);\r\n lblauswahlobjekt.Name := 'lblauswahlobjekt';\r\n lblauswahlobjekt.Left := 16;\r\n lblauswahlobjekt.Top := 8;\r\n lblauswahlobjekt.Width := 77;\r\n lblauswahlobjekt.Height := 15;\r\n lblauswahlobjekt.Caption := 'lblauswahlinfo';\r\n lblauswahlobjekt.ElementLabelClassName := 'h6';\r\n lblauswahlobjekt.ElementFont := efCSS;\r\n lblauswahlobjekt.ElementPosition := epIgnore;\r\n lblauswahlobjekt.HeightStyle := ssAuto;\r\n lblauswahlobjekt.HeightPercent := 100.000000000000000000;\r\n lblauswahlobjekt.WordWrap := True;\r\n lblauswahlobjekt.WidthStyle := ssAuto;\r\n lblauswahlobjekt.WidthPercent := 100.000000000000000000;\r\n btnObjektOK.SetParentComponent(panelstundenart);\r\n btnObjektOK.Name := 'btnObjektOK';\r\n btnObjektOK.Left := 136;\r\n btnObjektOK.Top := 160;\r\n btnObjektOK.Width := 96;\r\n btnObjektOK.Height := 25;\r\n btnObjektOK.Caption := 'OK';\r\n btnObjektOK.ChildOrder := 3;\r\n btnObjektOK.ElementClassName := 'btn btn-info btn-sm m-2 text-center';\r\n btnObjektOK.ElementFont := efCSS;\r\n btnObjektOK.ElementPosition := epIgnore;\r\n btnObjektOK.HeightStyle := ssAuto;\r\n btnObjektOK.HeightPercent := 100.000000000000000000;\r\n btnObjektOK.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnObjektOK, Self, 'OnClick', 'btnObjektOKClick');\r\n btnObjektAbbrechen.SetParentComponent(panelstundenart);\r\n btnObjektAbbrechen.Name := 'btnObjektAbbrechen';\r\n btnObjektAbbrechen.Left := 16;\r\n btnObjektAbbrechen.Top := 160;\r\n btnObjektAbbrechen.Width := 96;\r\n btnObjektAbbrechen.Height := 25;\r\n btnObjektAbbrechen.Caption := 'Abbrechen';\r\n btnObjektAbbrechen.ChildOrder := 2;\r\n btnObjektAbbrechen.ElementClassName := 'btn btn-info btn-sm m-2 text-center';\r\n btnObjektAbbrechen.ElementFont := efCSS;\r\n btnObjektAbbrechen.ElementPosition := epIgnore;\r\n btnObjektAbbrechen.HeightStyle := ssAuto;\r\n btnObjektAbbrechen.HeightPercent := 100.000000000000000000;\r\n btnObjektAbbrechen.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnObjektAbbrechen, Self, 'OnClick', 'btnObjektAbbrechenClick');\r\n lookupstundenart.SetParentComponent(panelstundenart);\r\n lookupstundenart.Name := 'lookupstundenart';\r\n lookupstundenart.Left := 40;\r\n lookupstundenart.Top := 56;\r\n lookupstundenart.Width := 177;\r\n lookupstundenart.Height := 23;\r\n lookupstundenart.ChildOrder := 1;\r\n lookupstundenart.ElementClassName := 'form-control w-75 m-1';\r\n lookupstundenart.ElementFont := efCSS;\r\n lookupstundenart.ElementPosition := epIgnore;\r\n lookupstundenart.HeightStyle := ssAuto;\r\n lookupstundenart.HeightPercent := 100.000000000000000000;\r\n lookupstundenart.Text := 'lookupstundenart';\r\n lookupstundenart.WidthPercent := 100.000000000000000000;\r\n lookupstundenart.ItemIndex := -1;\r\n xdsSingleArbeitszeit.SetParentComponent(Self);\r\n xdsSingleArbeitszeit.Name := 'xdsSingleArbeitszeit';\r\n xdsSingleArbeitszeit.AfterOpen := xdsSingleArbeitszeitAfterOpen;\r\n xdsSingleArbeitszeit.EntitySetName := 'PZE_Arbeitszeiten';\r\n xdsSingleArbeitszeit.Connection := DM2.XDataWebConnection1;\r\n xdsSingleArbeitszeit.Left := 112;\r\n xdsSingleArbeitszeit.Top := 16;\r\n xdsSingleArbeitszeitID.SetParentComponent(xdsSingleArbeitszeit);\r\n xdsSingleArbeitszeitID.Name := 'xdsSingleArbeitszeitID';\r\n xdsSingleArbeitszeitID.FieldName := 'ID';\r\n xdsSingleArbeitszeitID.Required := True;\r\n xdsSingleArbeitszeitID.Size := 38;\r\n xdsSingleArbeitszeitPersonalnummer.SetParentComponent(xdsSingleArbeitszeit);\r\n xdsSingleArbeitszeitPersonalnummer.Name := 'xdsSingleArbeitszeitPersonalnummer';\r\n xdsSingleArbeitszeitPersonalnummer.FieldName := 'Personalnummer';\r\n xdsSingleArbeitszeitPersonalnummer.Required := True;\r\n xdsSingleArbeitszeitDatum.SetParentComponent(xdsSingleArbeitszeit);\r\n xdsSingleArbeitszeitDatum.Name := 'xdsSingleArbeitszeitDatum';\r\n xdsSingleArbeitszeitDatum.FieldName := 'Datum';\r\n xdsSingleArbeitszeitDatum.Required := True;\r\n xdsSingleArbeitszeitDatum.DisplayFormat := 'DDD DD.MM.YYYY';\r\n xdsSingleArbeitszeitEintragsArt.SetParentComponent(xdsSingleArbeitszeit);\r\n xdsSingleArbeitszeitEintragsArt.Name := 'xdsSingleArbeitszeitEintragsArt';\r\n xdsSingleArbeitszeitEintragsArt.FieldName := 'EintragsArt';\r\n xdsSingleArbeitszeitEintragsArt.Required := True;\r\n xdsSingleArbeitszeitSollPause.SetParentComponent(xdsSingleArbeitszeit);\r\n xdsSingleArbeitszeitSollPause.Name := 'xdsSingleArbeitszeitSollPause';\r\n xdsSingleArbeitszeitSollPause.FieldName := 'SollPause';\r\n sourceSingleArbeitszeit.SetParentComponent(Self);\r\n sourceSingleArbeitszeit.Name := 'sourceSingleArbeitszeit';\r\n sourceSingleArbeitszeit.DataSet := xdsSingleArbeitszeit;\r\n sourceSingleArbeitszeit.Left := 32;\r\n sourceSingleArbeitszeit.Top := 16;\r\n xdsScan.SetParentComponent(Self);\r\n xdsScan.Name := 'xdsScan';\r\n xdsScan.AfterApplyUpdates := xdsScanAfterApplyUpdates;\r\n xdsScan.AfterOpen := xdsScanAfterOpen;\r\n xdsScan.AfterPost := xdsScanAfterPost;\r\n SetEvent(xdsScan, Self, 'OnNewRecord', 'xdsScanNewRecord');\r\n xdsScan.EntitySetName := 'PZE_ArbeitszeitenScan';\r\n xdsScan.Connection := DM2.XDataWebConnection1;\r\n xdsScan.Left := 112;\r\n xdsScan.Top := 64;\r\n xdsScanPersonalnummer.SetParentComponent(xdsScan);\r\n xdsScanPersonalnummer.Name := 'xdsScanPersonalnummer';\r\n xdsScanPersonalnummer.FieldName := 'Personalnummer';\r\n xdsScanPersonalnummer.Required := True;\r\n xdsScanScanDatumZeit.SetParentComponent(xdsScan);\r\n xdsScanScanDatumZeit.Name := 'xdsScanScanDatumZeit';\r\n xdsScanScanDatumZeit.FieldName := 'ScanDatumZeit';\r\n xdsScanScanDatumZeit.DisplayFormat := 'DD.MM.YYYY hh.mm.ss';\r\n xdsScanDatum.SetParentComponent(xdsScan);\r\n xdsScanDatum.Name := 'xdsScanDatum';\r\n xdsScanDatum.FieldName := 'Datum';\r\n xdsScanDatum.Required := True;\r\n xdsScanScanArt.SetParentComponent(xdsScan);\r\n xdsScanScanArt.Name := 'xdsScanScanArt';\r\n xdsScanScanArt.FieldName := 'ScanArt';\r\n xdsScanObjektreferenz.SetParentComponent(xdsScan);\r\n xdsScanObjektreferenz.Name := 'xdsScanObjektreferenz';\r\n xdsScanObjektreferenz.FieldName := 'Objektreferenz';\r\n xdsScanObjektreferenz.Size := 13;\r\n xdsScanScanBegin.SetParentComponent(xdsScan);\r\n xdsScanScanBegin.Name := 'xdsScanScanBegin';\r\n xdsScanScanBegin.FieldName := 'ScanBegin';\r\n xdsScanScanBegin.DisplayFormat := 'hh:mm';\r\n xdsScanScanEnde.SetParentComponent(xdsScan);\r\n xdsScanScanEnde.Name := 'xdsScanScanEnde';\r\n xdsScanScanEnde.FieldName := 'ScanEnde';\r\n xdsScanScanEnde.DisplayFormat := 'hh:mm';\r\n xdsScanausgewertet.SetParentComponent(xdsScan);\r\n xdsScanausgewertet.Name := 'xdsScanausgewertet';\r\n xdsScanausgewertet.FieldName := 'ausgewertet';\r\n xdsScanAMS.SetParentComponent(xdsScan);\r\n xdsScanAMS.Name := 'xdsScanAMS';\r\n xdsScanAMS.FieldName := 'AMS';\r\n xdsScanStundenArt.SetParentComponent(xdsScan);\r\n xdsScanStundenArt.Name := 'xdsScanStundenArt';\r\n xdsScanStundenArt.FieldName := 'StundenArt';\r\n xdsScanStundenArt.Size := 50;\r\n xdsScanFAID.SetParentComponent(xdsScan);\r\n xdsScanFAID.Name := 'xdsScanFAID';\r\n xdsScanFAID.FieldName := 'FAID';\r\n xdsScanFAID.Required := True;\r\n xdsScanID.SetParentComponent(xdsScan);\r\n xdsScanID.Name := 'xdsScanID';\r\n xdsScanID.FieldName := 'ID';\r\n xdsScanID.Required := True;\r\n xdsScanID.Size := 38;\r\n xdsScanKundennummer.SetParentComponent(xdsScan);\r\n xdsScanKundennummer.Name := 'xdsScanKundennummer';\r\n xdsScanKundennummer.FieldName := 'Kundennummer';\r\n xdsScanKundennummer.Size := 13;\r\n xdsScanAuftrag.SetParentComponent(xdsScan);\r\n xdsScanAuftrag.Name := 'xdsScanAuftrag';\r\n xdsScanAuftrag.FieldName := 'Auftrag';\r\n xdsScanAuftrag.Size := 10;\r\n xdsScanPAuftrag.SetParentComponent(xdsScan);\r\n xdsScanPAuftrag.Name := 'xdsScanPAuftrag';\r\n xdsScanPAuftrag.FieldName := 'PAuftrag';\r\n xdsScanPAuftrag.Size := 10;\r\n xdsScanArbeitArt.SetParentComponent(xdsScan);\r\n xdsScanArbeitArt.Name := 'xdsScanArbeitArt';\r\n xdsScanArbeitArt.FieldName := 'ArbeitArt';\r\n xdsScanInfos.SetParentComponent(xdsScan);\r\n xdsScanInfos.Name := 'xdsScanInfos';\r\n xdsScanInfos.FieldName := 'Infos';\r\n xdsScanInfos.Size := 255;\r\n xdsScanDauerMinuten.SetParentComponent(xdsScan);\r\n xdsScanDauerMinuten.Name := 'xdsScanDauerMinuten';\r\n xdsScanDauerMinuten.FieldName := 'DauerMinuten';\r\n xdsScanKalkStundensatz.SetParentComponent(xdsScan);\r\n xdsScanKalkStundensatz.Name := 'xdsScanKalkStundensatz';\r\n xdsScanKalkStundensatz.FieldName := 'KalkStundensatz';\r\n xdsScanKalkKosten.SetParentComponent(xdsScan);\r\n xdsScanKalkKosten.Name := 'xdsScanKalkKosten';\r\n xdsScanKalkKosten.FieldName := 'KalkKosten';\r\n sourceScan.SetParentComponent(Self);\r\n sourceScan.Name := 'sourceScan';\r\n sourceScan.DataSet := xdsScan;\r\n sourceScan.Left := 32;\r\n sourceScan.Top := 56;\r\n xdsPZEEinstellungen.SetParentComponent(Self);\r\n xdsPZEEinstellungen.Name := 'xdsPZEEinstellungen';\r\n xdsPZEEinstellungen.AfterOpen := xdsPZEEinstellungenAfterOpen;\r\n xdsPZEEinstellungen.EntitySetName := 'PZE_Einstellungen';\r\n xdsPZEEinstellungen.Connection := DM2.XDataWebConnection1;\r\n xdsPZEEinstellungen.Left := 184;\r\n xdsPZEEinstellungen.Top := 128;\r\n xdsPZEEinstellungenZuordnungObjekt.SetParentComponent(xdsPZEEinstellungen);\r\n xdsPZEEinstellungenZuordnungObjekt.Name := 'xdsPZEEinstellungenZuordnungObjekt';\r\n xdsPZEEinstellungenZuordnungObjekt.FieldName := 'ZuordnungObjekt';\r\n xdsPZEEinstellungenZuordnungKontakt.SetParentComponent(xdsPZEEinstellungen);\r\n xdsPZEEinstellungenZuordnungKontakt.Name := 'xdsPZEEinstellungenZuordnungKontakt';\r\n xdsPZEEinstellungenZuordnungKontakt.FieldName := 'ZuordnungKontakt';\r\n xdsPZEEinstellungenZuordnungAuftrag.SetParentComponent(xdsPZEEinstellungen);\r\n xdsPZEEinstellungenZuordnungAuftrag.Name := 'xdsPZEEinstellungenZuordnungAuftrag';\r\n xdsPZEEinstellungenZuordnungAuftrag.FieldName := 'ZuordnungAuftrag';\r\n xdsPZEEinstellungenZuordnungProduktion.SetParentComponent(xdsPZEEinstellungen);\r\n xdsPZEEinstellungenZuordnungProduktion.Name := 'xdsPZEEinstellungenZuordnungProduktion';\r\n xdsPZEEinstellungenZuordnungProduktion.FieldName := 'ZuordnungProduktion';\r\n xdsPZEEinstellungenAuswahlNurKontaktnummer.SetParentComponent(xdsPZEEinstellungen);\r\n xdsPZEEinstellungenAuswahlNurKontaktnummer.Name := 'xdsPZEEinstellungenAuswahlNurKontaktnummer';\r\n xdsPZEEinstellungenAuswahlNurKontaktnummer.FieldName := 'AuswahlNurKontaktnummer';\r\n xdsPZEEinstellungenPauseVorgabe.SetParentComponent(xdsPZEEinstellungen);\r\n xdsPZEEinstellungenPauseVorgabe.Name := 'xdsPZEEinstellungenPauseVorgabe';\r\n xdsPZEEinstellungenPauseVorgabe.FieldName := 'PauseVorgabe';\r\n sourcePZEEinstellungen.SetParentComponent(Self);\r\n sourcePZEEinstellungen.Name := 'sourcePZEEinstellungen';\r\n sourcePZEEinstellungen.DataSet := xdsPZEEinstellungen;\r\n sourcePZEEinstellungen.Left := 104;\r\n sourcePZEEinstellungen.Top := 128;\r\n xdsStundenart.SetParentComponent(Self);\r\n xdsStundenart.Name := 'xdsStundenart';\r\n xdsStundenart.AfterOpen := xdsStundenartAfterOpen;\r\n xdsStundenart.EntitySetName := 'ObjekteStundenarten';\r\n xdsStundenart.Connection := DM2.XDataWebConnection1;\r\n xdsStundenart.Left := 152;\r\n xdsStundenart.Top := 440;\r\n xdsStundenartStundenArt.SetParentComponent(xdsStundenart);\r\n xdsStundenartStundenArt.Name := 'xdsStundenartStundenArt';\r\n xdsStundenartStundenArt.FieldName := 'StundenArt';\r\n xdsStundenartStundenArt.Required := True;\r\n xdsStundenartStundenArt.Size := 50;\r\n sourceStundenart.SetParentComponent(Self);\r\n sourceStundenart.Name := 'sourceStundenart';\r\n sourceStundenart.DataSet := xdsStundenart;\r\n sourceStundenart.Left := 72;\r\n sourceStundenart.Top := 440;\r\n xdsPauseFix.SetParentComponent(Self);\r\n xdsPauseFix.Name := 'xdsPauseFix';\r\n xdsPauseFix.AfterApplyUpdates := xdsPauseFixAfterApplyUpdates;\r\n xdsPauseFix.AfterOpen := xdsPauseFixAfterOpen;\r\n xdsPauseFix.AfterPost := xdsPauseFixAfterPost;\r\n xdsPauseFix.EntitySetName := 'PZE_ArbeitszeitenScan';\r\n xdsPauseFix.Connection := DM2.XDataWebConnection1;\r\n xdsPauseFix.Left := 296;\r\n xdsPauseFix.Top := 400;\r\n xdsPauseFixFAID.SetParentComponent(xdsPauseFix);\r\n xdsPauseFixFAID.Name := 'xdsPauseFixFAID';\r\n xdsPauseFixFAID.FieldName := 'FAID';\r\n xdsPauseFixFAID.Required := True;\r\n xdsPauseFixID.SetParentComponent(xdsPauseFix);\r\n xdsPauseFixID.Name := 'xdsPauseFixID';\r\n xdsPauseFixID.FieldName := 'ID';\r\n xdsPauseFixID.Required := True;\r\n xdsPauseFixID.Size := 38;\r\n xdsPauseFixPersonalnummer.SetParentComponent(xdsPauseFix);\r\n xdsPauseFixPersonalnummer.Name := 'xdsPauseFixPersonalnummer';\r\n xdsPauseFixPersonalnummer.FieldName := 'Personalnummer';\r\n xdsPauseFixPersonalnummer.Required := True;\r\n xdsPauseFixScanDatumZeit.SetParentComponent(xdsPauseFix);\r\n xdsPauseFixScanDatumZeit.Name := 'xdsPauseFixScanDatumZeit';\r\n xdsPauseFixScanDatumZeit.FieldName := 'ScanDatumZeit';\r\n xdsPauseFixDatum.SetParentComponent(xdsPauseFix);\r\n xdsPauseFixDatum.Name := 'xdsPauseFixDatum';\r\n xdsPauseFixDatum.FieldName := 'Datum';\r\n xdsPauseFixDatum.Required := True;\r\n xdsPauseFixScanArt.SetParentComponent(xdsPauseFix);\r\n xdsPauseFixScanArt.Name := 'xdsPauseFixScanArt';\r\n xdsPauseFixScanArt.FieldName := 'ScanArt';\r\n xdsPauseFixObjektreferenz.SetParentComponent(xdsPauseFix);\r\n xdsPauseFixObjektreferenz.Name := 'xdsPauseFixObjektreferenz';\r\n xdsPauseFixObjektreferenz.FieldName := 'Objektreferenz';\r\n xdsPauseFixObjektreferenz.Size := 13;\r\n xdsPauseFixScanBegin.SetParentComponent(xdsPauseFix);\r\n xdsPauseFixScanBegin.Name := 'xdsPauseFixScanBegin';\r\n xdsPauseFixScanBegin.FieldName := 'ScanBegin';\r\n xdsPauseFixScanEnde.SetParentComponent(xdsPauseFix);\r\n xdsPauseFixScanEnde.Name := 'xdsPauseFixScanEnde';\r\n xdsPauseFixScanEnde.FieldName := 'ScanEnde';\r\n xdsPauseFixausgewertet.SetParentComponent(xdsPauseFix);\r\n xdsPauseFixausgewertet.Name := 'xdsPauseFixausgewertet';\r\n xdsPauseFixausgewertet.FieldName := 'ausgewertet';\r\n xdsPauseFixAMS.SetParentComponent(xdsPauseFix);\r\n xdsPauseFixAMS.Name := 'xdsPauseFixAMS';\r\n xdsPauseFixAMS.FieldName := 'AMS';\r\n xdsPauseFixStundenArt.SetParentComponent(xdsPauseFix);\r\n xdsPauseFixStundenArt.Name := 'xdsPauseFixStundenArt';\r\n xdsPauseFixStundenArt.FieldName := 'StundenArt';\r\n xdsPauseFixStundenArt.Size := 50;\r\n xdsPauseFixKundennummer.SetParentComponent(xdsPauseFix);\r\n xdsPauseFixKundennummer.Name := 'xdsPauseFixKundennummer';\r\n xdsPauseFixKundennummer.FieldName := 'Kundennummer';\r\n xdsPauseFixKundennummer.Size := 13;\r\n xdsPauseFixAuftrag.SetParentComponent(xdsPauseFix);\r\n xdsPauseFixAuftrag.Name := 'xdsPauseFixAuftrag';\r\n xdsPauseFixAuftrag.FieldName := 'Auftrag';\r\n xdsPauseFixAuftrag.Size := 10;\r\n xdsPauseFixPAuftrag.SetParentComponent(xdsPauseFix);\r\n xdsPauseFixPAuftrag.Name := 'xdsPauseFixPAuftrag';\r\n xdsPauseFixPAuftrag.FieldName := 'PAuftrag';\r\n xdsPauseFixPAuftrag.Size := 10;\r\n xdsPauseFixArbeitArt.SetParentComponent(xdsPauseFix);\r\n xdsPauseFixArbeitArt.Name := 'xdsPauseFixArbeitArt';\r\n xdsPauseFixArbeitArt.FieldName := 'ArbeitArt';\r\n xdsPauseFixInfos.SetParentComponent(xdsPauseFix);\r\n xdsPauseFixInfos.Name := 'xdsPauseFixInfos';\r\n xdsPauseFixInfos.FieldName := 'Infos';\r\n xdsPauseFixInfos.Size := 255;\r\n xdsPauseFixDauerMinuten.SetParentComponent(xdsPauseFix);\r\n xdsPauseFixDauerMinuten.Name := 'xdsPauseFixDauerMinuten';\r\n xdsPauseFixDauerMinuten.FieldName := 'DauerMinuten';\r\n xdsPauseFixKalkStundensatz.SetParentComponent(xdsPauseFix);\r\n xdsPauseFixKalkStundensatz.Name := 'xdsPauseFixKalkStundensatz';\r\n xdsPauseFixKalkStundensatz.FieldName := 'KalkStundensatz';\r\n xdsPauseFixKalkKosten.SetParentComponent(xdsPauseFix);\r\n xdsPauseFixKalkKosten.Name := 'xdsPauseFixKalkKosten';\r\n xdsPauseFixKalkKosten.FieldName := 'KalkKosten';\r\n finally\r\n lblstatus.AfterLoadDFMValues;\r\n lblPInfo.AfterLoadDFMValues;\r\n WebDBLabel2.AfterLoadDFMValues;\r\n lblAutoObjekt.AfterLoadDFMValues;\r\n lblAutoAuftrag.AfterLoadDFMValues;\r\n panelfunktionen.AfterLoadDFMValues;\r\n btnAnmelden.AfterLoadDFMValues;\r\n btnPauseBeginn.AfterLoadDFMValues;\r\n btnPauseEnde.AfterLoadDFMValues;\r\n btnAbmelden.AfterLoadDFMValues;\r\n btnObjektBeginn.AfterLoadDFMValues;\r\n btnObjektEnde.AfterLoadDFMValues;\r\n btnErneutAnmelden.AfterLoadDFMValues;\r\n btnKontaktBeginn.AfterLoadDFMValues;\r\n btnKontaktEnde.AfterLoadDFMValues;\r\n btnAuftragBeginn.AfterLoadDFMValues;\r\n btnAuftragEnde.AfterLoadDFMValues;\r\n btnProduktionBeginn.AfterLoadDFMValues;\r\n btnProduktionEnde.AfterLoadDFMValues;\r\n btnPauseVorgabe.AfterLoadDFMValues;\r\n Container1.AfterLoadDFMValues;\r\n Container2.AfterLoadDFMValues;\r\n btnzurueck.AfterLoadDFMValues;\r\n TC.AfterLoadDFMValues;\r\n panelArbeitsart.AfterLoadDFMValues;\r\n lblauswahlinfo.AfterLoadDFMValues;\r\n radioarbeitsart.AfterLoadDFMValues;\r\n btnOK.AfterLoadDFMValues;\r\n btnAbbrechen.AfterLoadDFMValues;\r\n panelstundenart.AfterLoadDFMValues;\r\n lblauswahlobjekt.AfterLoadDFMValues;\r\n btnObjektOK.AfterLoadDFMValues;\r\n btnObjektAbbrechen.AfterLoadDFMValues;\r\n lookupstundenart.AfterLoadDFMValues;\r\n xdsSingleArbeitszeit.AfterLoadDFMValues;\r\n xdsSingleArbeitszeitID.AfterLoadDFMValues;\r\n xdsSingleArbeitszeitPersonalnummer.AfterLoadDFMValues;\r\n xdsSingleArbeitszeitDatum.AfterLoadDFMValues;\r\n xdsSingleArbeitszeitEintragsArt.AfterLoadDFMValues;\r\n xdsSingleArbeitszeitSollPause.AfterLoadDFMValues;\r\n sourceSingleArbeitszeit.AfterLoadDFMValues;\r\n xdsScan.AfterLoadDFMValues;\r\n xdsScanPersonalnummer.AfterLoadDFMValues;\r\n xdsScanScanDatumZeit.AfterLoadDFMValues;\r\n xdsScanDatum.AfterLoadDFMValues;\r\n xdsScanScanArt.AfterLoadDFMValues;\r\n xdsScanObjektreferenz.AfterLoadDFMValues;\r\n xdsScanScanBegin.AfterLoadDFMValues;\r\n xdsScanScanEnde.AfterLoadDFMValues;\r\n xdsScanausgewertet.AfterLoadDFMValues;\r\n xdsScanAMS.AfterLoadDFMValues;\r\n xdsScanStundenArt.AfterLoadDFMValues;\r\n xdsScanFAID.AfterLoadDFMValues;\r\n xdsScanID.AfterLoadDFMValues;\r\n xdsScanKundennummer.AfterLoadDFMValues;\r\n xdsScanAuftrag.AfterLoadDFMValues;\r\n xdsScanPAuftrag.AfterLoadDFMValues;\r\n xdsScanArbeitArt.AfterLoadDFMValues;\r\n xdsScanInfos.AfterLoadDFMValues;\r\n xdsScanDauerMinuten.AfterLoadDFMValues;\r\n xdsScanKalkStundensatz.AfterLoadDFMValues;\r\n xdsScanKalkKosten.AfterLoadDFMValues;\r\n sourceScan.AfterLoadDFMValues;\r\n xdsPZEEinstellungen.AfterLoadDFMValues;\r\n xdsPZEEinstellungenZuordnungObjekt.AfterLoadDFMValues;\r\n xdsPZEEinstellungenZuordnungKontakt.AfterLoadDFMValues;\r\n xdsPZEEinstellungenZuordnungAuftrag.AfterLoadDFMValues;\r\n xdsPZEEinstellungenZuordnungProduktion.AfterLoadDFMValues;\r\n xdsPZEEinstellungenAuswahlNurKontaktnummer.AfterLoadDFMValues;\r\n xdsPZEEinstellungenPauseVorgabe.AfterLoadDFMValues;\r\n sourcePZEEinstellungen.AfterLoadDFMValues;\r\n xdsStundenart.AfterLoadDFMValues;\r\n xdsStundenartStundenArt.AfterLoadDFMValues;\r\n sourceStundenart.AfterLoadDFMValues;\r\n xdsPauseFix.AfterLoadDFMValues;\r\n xdsPauseFixFAID.AfterLoadDFMValues;\r\n xdsPauseFixID.AfterLoadDFMValues;\r\n xdsPauseFixPersonalnummer.AfterLoadDFMValues;\r\n xdsPauseFixScanDatumZeit.AfterLoadDFMValues;\r\n xdsPauseFixDatum.AfterLoadDFMValues;\r\n xdsPauseFixScanArt.AfterLoadDFMValues;\r\n xdsPauseFixObjektreferenz.AfterLoadDFMValues;\r\n xdsPauseFixScanBegin.AfterLoadDFMValues;\r\n xdsPauseFixScanEnde.AfterLoadDFMValues;\r\n xdsPauseFixausgewertet.AfterLoadDFMValues;\r\n xdsPauseFixAMS.AfterLoadDFMValues;\r\n xdsPauseFixStundenArt.AfterLoadDFMValues;\r\n xdsPauseFixKundennummer.AfterLoadDFMValues;\r\n xdsPauseFixAuftrag.AfterLoadDFMValues;\r\n xdsPauseFixPAuftrag.AfterLoadDFMValues;\r\n xdsPauseFixArbeitArt.AfterLoadDFMValues;\r\n xdsPauseFixInfos.AfterLoadDFMValues;\r\n xdsPauseFixDauerMinuten.AfterLoadDFMValues;\r\n xdsPauseFixKalkStundensatz.AfterLoadDFMValues;\r\n xdsPauseFixKalkKosten.AfterLoadDFMValues;\r\n end;\r\nend;\r\n\r\nend.\r\n","unit unit_EinzelAuftrag;\r\n\r\ninterface\r\n\r\nuses\r\n System.SysUtils, System.Classes, JS, Web, WEBLib.Graphics, WEBLib.Controls,\r\n WEBLib.Forms, WEBLib.Dialogs, Data.DB, WEBLib.DB, XData.Web.JsonDataset,\r\n XData.Web.Dataset, XData.Web.Connection, Vcl.Controls, Vcl.StdCtrls,\r\n WEBLib.StdCtrls, WEBLib.ExtCtrls, Vcl.Grids, WEBLib.DBCtrls, VCL.TMSFNCTypes,\r\n VCL.TMSFNCUtils, VCL.TMSFNCGraphics, VCL.TMSFNCGraphicsTypes, strutils,weblib.json,\r\n VCL.TMSFNCCustomControl, VCL.TMSFNCTableView, WEBLib.Buttons, WEBLib.Grids,\r\n VCL.TMSFNCSignatureCapture, WEBLib.Mask, dateutils,\r\n VCL.TMSFNCCustomPicker, VCL.TMSFNCDatePicker, XData.Web.Client, WEBLib.REST,\r\n DB, Vcl.Mask;\r\n\r\ntype\r\n TEinzelAuftrag = class(TForm)\r\n dsBeleg: TXDataWebDataSet;\r\n SourceBeleg: TDataSource;\r\n dsBelegKundennummer: TXDataWebEntityField;\r\n dsBelegNummerkomplett: TStringField;\r\n dsBelegReferenzAngebot: TStringField;\r\n dsBelegReferenzLieferschein: TStringField;\r\n dsBelegReferenzRechnung: TStringField;\r\n dsBelegDatum: TDateTimeField;\r\n dsBelegJahr: TFloatField;\r\n dsBelegKalenderwoche: TIntegerField;\r\n dsBelegNachname: TStringField;\r\n dsBelegVorname: TStringField;\r\n dsBelegPostleitzahl: TStringField;\r\n dsBelegOrt: TStringField;\r\n dsBelegLaenderkuerzel: TStringField;\r\n dsBelegLand: TStringField;\r\n dsBelegBriefanrede1: TStringField;\r\n dsBelegBriefanrede2: TStringField;\r\n dsBelegEMail: TStringField;\r\n dsBelegAdresseBild: TStringField;\r\n dsBelegLieferanschriftBild: TStringField;\r\n dsBelegZahlungsbedingung: TIntegerField;\r\n dsBelegZahlungsbedingungText: TStringField;\r\n dsBelegAuftragsbezeichnung: TStringField;\r\n dsBelegAuftragnummerKunde: TStringField;\r\n dsBelegBestelldatumKunde: TDateTimeField;\r\n dsBelegILN: TStringField;\r\n dsBelegKopftext: TStringField;\r\n dsBelegSchlussbemerkung: TStringField;\r\n dsBelegGruss: TStringField;\r\n dsBelegMehrwertsteuersatz1: TFloatField;\r\n dsBelegMehrwertsteuersatz2: TFloatField;\r\n dsBelegNettosumme01: TFloatField;\r\n dsBelegNettosumme02: TFloatField;\r\n dsBelegNettosumme: TFloatField;\r\n dsBelegMehrwertsteuer01: TFloatField;\r\n dsBelegMehrwertsteuer02: TFloatField;\r\n dsBelegMehrwertsteuer: TFloatField;\r\n dsBelegBruttosumme: TFloatField;\r\n dsBelegVersanddatum: TDateTimeField;\r\n dsBelegSkontosatz: TFloatField;\r\n dsBelegNettosummeEK: TFloatField;\r\n dsBelegNettoMarge: TFloatField;\r\n dsBelegSchreibzeichen: TStringField;\r\n dsBelegUnterzeichner: TStringField;\r\n dsBelegTelefonMA: TStringField;\r\n dsBelegEmailMA: TStringField;\r\n dsBelegUSTID: TStringField;\r\n dsBelegUmsatzsteuerausweis: TBooleanField;\r\n dsBeleggebucht: TBooleanField;\r\n dsBelegLieferdatum: TDateTimeField;\r\n dsBelegTransportbedingung: TStringField;\r\n dsBelegMehrwertsteuersatz3: TFloatField;\r\n dsBelegMehrwertsteuer03: TFloatField;\r\n dsBelegNettosumme03: TFloatField;\r\n dsBelegRundungsDifferenz: TFloatField;\r\n dsBelegEmailText: TStringField;\r\n dsBelegAuftragerledigt: TBooleanField;\r\n dsBelegRabattstufe: TStringField;\r\n dsBelegKFZKennzeichen: TStringField;\r\n dsBelegFahrgestellnummer: TStringField;\r\n dsBelegKFZHersteller: TStringField;\r\n dsBelegErstzulassungsdatum: TDateTimeField;\r\n dsBelegKMStand: TStringField;\r\n dsBelegKFZType: TStringField;\r\n dsBelegInspektionsdatum: TDateTimeField;\r\n dsBelegDebitorennummer: TStringField;\r\n dsBelegKostentraeger: TStringField;\r\n dsBelegRabattsatz: TFloatField;\r\n dsBelegObjektReferenz: TStringField;\r\n dsBelegBank: TStringField;\r\n dsBelegBankleitzahl: TFloatField;\r\n dsBelegKontonummer: TStringField;\r\n dsBelegKontoinhaber: TStringField;\r\n dsBelegTelefaxnummer: TStringField;\r\n dsBelegDatumNeu: TDateTimeField;\r\n dsBelegDatumgeaendert: TDateTimeField;\r\n dsBelegObjektnummer: TStringField;\r\n dsBelegLiefertermin: TStringField;\r\n dsBelegEmailversand: TBooleanField;\r\n dsBelegTelefonnummer: TStringField;\r\n dsBelegMobilTelefon: TStringField;\r\n dsBelegAuftragFax: TBooleanField;\r\n dsBelegREDatum: TDateTimeField;\r\n dsBelegBenutzerNeu: TStringField;\r\n dsBelegBenutzerGeaendert: TStringField;\r\n dsBelegBerechnungBrutto: TBooleanField;\r\n dsBelegBruttosumme01: TFloatField;\r\n dsBelegBruttosumme02: TFloatField;\r\n dsBelegBruttosumme03: TFloatField;\r\n dsBelegNotiz: TStringField;\r\n dsBelegMargeProzent: TFloatField;\r\n dsBelegWarenkreditgesperrt: TBooleanField;\r\n dsBelegBelegsprache: TStringField;\r\n dsBelegDuplicate: TStringField;\r\n dsBelegperEmail: TBooleanField;\r\n dsBelegAnsprechpartner: TStringField;\r\n dsBelegKundennummerFremd: TStringField;\r\n dsBelegProtokoll: TStringField;\r\n dsBelegVerleihauftrag: TBooleanField;\r\n dsBelegVerleihVon: TDateTimeField;\r\n dsBelegVerleihBis: TDateTimeField;\r\n dsBelegAuftragGenehmigt: TBooleanField;\r\n dsBeleggesperrt: TBooleanField;\r\n dsBelegVerleihvonText: TStringField;\r\n dsBelegVerleihbisText: TStringField;\r\n dsBelegDruckWHG: TStringField;\r\n dsBelegDruckWHGKurs: TFloatField;\r\n dsBelegProzentsatzZusatzposition: TFloatField;\r\n dsBelegTextZusatzposition: TStringField;\r\n dsBelegTextzusatzBeschreibung: TStringField;\r\n dsBelegLayoutname: TStringField;\r\n dsBelegGesamtgewicht: TFloatField;\r\n dsBelegBetragZusatzposition: TFloatField;\r\n dsBelegReferenzBestellung: TStringField;\r\n dsBelegTermin1: TDateTimeField;\r\n dsBelegTermin2: TDateTimeField;\r\n dsBelegZielkontaktnummer: TStringField;\r\n dsBelegZielkontaktname: TStringField;\r\n dsBelegBilddatei1: TStringField;\r\n dsBelegBilddatei2: TStringField;\r\n dsBelegZielkontaktnummer2: TStringField;\r\n dsBelegZielkontaktname2: TStringField;\r\n dsBelegbestaetigt: TDateTimeField;\r\n dsBelegZielkontaktnummer3: TStringField;\r\n dsBelegZielkontaktname3: TStringField;\r\n dsBelegTermin3: TDateTimeField;\r\n dsBelegTermin4: TDateTimeField;\r\n dsBelegMuster: TBooleanField;\r\n dsBelegKW: TIntegerField;\r\n dsBelegDatenlink: TStringField;\r\n dsBelegMehrwertsteuersatz4: TFloatField;\r\n dsBelegMehrwertsteuersatz5: TFloatField;\r\n dsBelegMehrwertsteuersatz6: TFloatField;\r\n dsBelegBesteuerungKey: TIntegerField;\r\n dsBelegVertreterMatchcode: TStringField;\r\n dsBelegVerfasser: TStringField;\r\n dsBelegLieferadresseID: TIntegerField;\r\n dsBelegAuftragStatus: TStringField;\r\n dsBelegMonatJahr: TDateTimeField;\r\n dsBelegBelegvariante: TStringField;\r\n dsBelegProduktionsfreigabe: TBooleanField;\r\n dsBelegReferenzRahmenAuftrag: TStringField;\r\n dsBelegDatumRahmenAuftrag: TDateTimeField;\r\n dsBelegFahrzeugID: TIntegerField;\r\n dsBelegAuslieferungKW: TStringField;\r\n dsBelegBereitstellungDatum: TDateTimeField;\r\n dsBelegVTUID: TStringField;\r\n dsBelegLieferanschriftDaten: TStringField;\r\n dsBelegGesamtVolumen: TFloatField;\r\n dsBelegBelegPKey: TIntegerField;\r\n dsBelegDruckParameter: TStringField;\r\n dsBelegReferenzService: TStringField;\r\n dsBelegZusatzDaten: TStringField;\r\n dsBelegStandPDF: TStringField;\r\n dsBelegPaketdienst: TStringField;\r\n dsBelegMonteur: TIntegerField;\r\n dsPositionen: TXDataWebDataSet;\r\n sourcePositionen: TDataSource;\r\n dsPositionenArtikelnummer: TXDataWebEntityField;\r\n dsPositionenNummerkomplett: TXDataWebEntityField;\r\n dsPositionenID: TIntegerField;\r\n dsPositionenPosNr: TFloatField;\r\n dsPositionenPosUNr: TFloatField;\r\n dsPositionenSumme: TBooleanField;\r\n dsPositionenArtikelueberschrift: TStringField;\r\n dsPositionenArtikelbeschreibung: TStringField;\r\n dsPositionenMenge: TFloatField;\r\n dsPositionenArtderMenge: TStringField;\r\n dsPositionenVerkaufspreis: TFloatField;\r\n dsPositionenEinkaufspreis: TFloatField;\r\n dsPositionenSeriennummer: TStringField;\r\n dsPositionenWarengruppe: TStringField;\r\n dsPositionenWarenuntergruppe: TStringField;\r\n dsPositionenArtikelnummerKunde: TStringField;\r\n dsPositionenLieferant: TStringField;\r\n dsPositionenGewicht: TFloatField;\r\n dsPositionenLaenge: TFloatField;\r\n dsPositionenBreite: TFloatField;\r\n dsPositionenHoehe: TFloatField;\r\n dsPositionenMehrwertsteuersatz: TFloatField;\r\n dsPositionenEndpreis: TFloatField;\r\n dsPositionenPosMWST: TFloatField;\r\n dsPositionenBruttoEndpreis: TFloatField;\r\n dsPositionenEndpreis_EK: TFloatField;\r\n dsPositionenRabattsatz: TFloatField;\r\n dsPositionenPreisvorRabatt: TFloatField;\r\n dsPositionenPKZ: TFloatField;\r\n dsPositionenTextfrei10: TStringField;\r\n dsPositionenTextfrei20: TStringField;\r\n dsPositionenProduktionAbgeschlossen: TDateTimeField;\r\n dsPositionenEinzelpreisBrutto: TFloatField;\r\n dsPositionenPosMarge: TFloatField;\r\n dsPositionenPosMargeProzent: TFloatField;\r\n dsPositionenBereitsGeliefert: TFloatField;\r\n dsPositionenausliefern: TFloatField;\r\n dsPositionenBestellungErledigt: TBooleanField;\r\n dsPositionenLager: TStringField;\r\n dsPositionenbestellen: TBooleanField;\r\n dsPositionenWarenbestand: TBooleanField;\r\n dsPositionenArtikelbeschreibungRTF: TStringField;\r\n dsPositionenQuellartikel: TStringField;\r\n dsPositionenArtikelnummerWB: TStringField;\r\n dsPositionenPreisanteilNetto: TFloatField;\r\n dsPositionenSetHPos: TStringField;\r\n dsPositionenSetUPos: TStringField;\r\n dsPositionenProvisionssatz: TFloatField;\r\n dsPositionenProvisionsbetrag: TFloatField;\r\n dsPositionenArtikelsprache: TStringField;\r\n dsPositionenEKvom: TDateTimeField;\r\n dsPositionenMengenberechnungID: TStringField;\r\n dsPositionenTaraID: TStringField;\r\n dsPositionenTara: TFloatField;\r\n dsPositionenBruttoGewicht: TFloatField;\r\n dsPositionenAussenflaeche: TFloatField;\r\n dsPositionenLadeort: TStringField;\r\n dsPositionenSeitenumbruch: TBooleanField;\r\n dsPositionenPlanerFarbe: TIntegerField;\r\n dsPositionenMWStKey: TIntegerField;\r\n dsPositionenZSnachPos: TBooleanField;\r\n dsPositionenLieferzeit: TStringField;\r\n dsPositionenPreisVorRabattWHG: TFloatField;\r\n dsPositionenReferenzKalkulation: TStringField;\r\n dsPositionenPKey: TIntegerField;\r\n dsPositionenAuftragsnummer: TStringField;\r\n dsPositionenlwbID: TStringField;\r\n dsPositionenBelegdatum: TDateTimeField;\r\n dsPositionenWarenkontrollnummern: TStringField;\r\n dsPositionenVolumen: TFloatField;\r\n dsPositionenPosVolumen: TFloatField;\r\n dsPositionenArtikelAttribute: TStringField;\r\n dsPositionenMonteurP: TIntegerField;\r\n dsPositionenArbeitszeitDatum: TDateTimeField;\r\n dsPositionenArbeitszeitVON: TDateTimeField;\r\n dsPositionenArbeitszeitBIS: TDateTimeField;\r\n TC: TTableControl;\r\n dsBelegKundennummerKundennummer: TStringField;\r\n dsUnterschriften: TXDataWebDataSet;\r\n dsUnterschriftenNummerkomplett: TStringField;\r\n dsUnterschriftenDatum: TDateTimeField;\r\n dsUnterschriftenUnterschriftMonteur: TBlobField;\r\n dsUnterschriftenUnterschriftKunde: TBlobField;\r\n sourceUnterschriften: TDataSource;\r\n dsPositionenArtikelnummerArtikelnummer: TStringField;\r\n dsPositionenArtikelnummerArbeitszeit: TBooleanField;\r\n dsUnterschriftenUnterschriftMonteurText: TStringField;\r\n dsUnterschriftenUnterschriftKundeText: TStringField;\r\n dsSumBeleg: TXDataWebDataSet;\r\n dsSumBelegPosVolumen: TFloatField;\r\n dsSumBelegBruttoGewicht: TFloatField;\r\n dsSumBelegMehrwertsteuersatz: TFloatField;\r\n dsSumBelegEndpreis: TFloatField;\r\n dsSumBelegPosMWST: TFloatField;\r\n dsSumBelegBruttoEndpreis: TFloatField;\r\n dsSumBelegEndpreis_EK: TFloatField;\r\n dsSumBelegPKZ: TFloatField;\r\n dsBelegServiceBemerkung: TStringField;\r\n WClient: TXDataWebClient;\r\n WebHttpRequest1: THttpRequest;\r\n dsObjekt: TXDataWebDataSet;\r\n dsObjektObjektReferenz: TStringField;\r\n dsObjektKurzbezeichnung: TStringField;\r\n dsObjektObjektnummer: TStringField;\r\n Container1: THTMLContainer;\r\n btnzurueck: TButton;\r\n btnUnterschreiben: TButton;\r\n btnPDF: TButton;\r\n btnTermine: TButton;\r\n Container3: THTMLContainer;\r\n Container2: THTMLContainer;\r\n PTC: TTableControl;\r\n btnSpeichern: TButton;\r\n pickLieferdatum: TDBDateTimePicker;\r\n edtAuftragsbezeichnung: TDBEdit;\r\n edtLiefertermin: TDBEdit;\r\n btnNeuePosition: TButton;\r\n Container4: THTMLContainer;\r\n webDBComboAuftragStatus: TDBComboBox;\r\n belegComboMonteur: TComboBox;\r\n belegMemoServiceBemerkung: TDBMemo;\r\n btnPDFSenden: TButton;\r\n edtEmail: TDBEdit;\r\n btnPZE_A: TButton;\r\n btnPZE_O: TButton;\r\n dsDateien: TXDataWebDataSet;\r\n dsDateienID: TIntegerField;\r\n dsDateienDatumUhrzeit: TDateTimeField;\r\n dsDateienDateiBetreff: TStringField;\r\n dsDateienNummerkomplett: TStringField;\r\n btnDateien: TButton;\r\n btnDateienObjekt: TButton;\r\n btnDateienKontakt: TButton;\r\n procedure WebFormShow(Sender: TObject);\r\n procedure dsBelegAfterOpen(DataSet: TDataSet);\r\n procedure WebFormCreate(Sender: TObject);\r\n procedure dsBelegAfterPost(DataSet: TDataSet);\r\n procedure dsBelegAfterApplyUpdates(Sender: TDataSet; Info: TResolveResults);\r\n procedure btnNeuePositionClick(Sender: TObject);\r\n procedure dsUnterschriftenAfterOpen(DataSet: TDataSet);\r\n procedure btnUnterschreibenClick(Sender: TObject);\r\n procedure dsUnterschriftenAfterPost(DataSet: TDataSet);\r\n procedure dsUnterschriftenAfterApplyUpdates(Sender: TDataSet;\r\n Info: TResolveResults);\r\n procedure WebFormCloseQuery(Sender: TObject; var CanClose: Boolean);\r\n procedure dsBelegBeforePost(DataSet: TDataSet);\r\n procedure dsSumBelegAfterOpen(DataSet: TDataSet);\r\n procedure btnPDFClick(Sender: TObject);\r\n procedure btnTermineClick(Sender: TObject);\r\n procedure dsObjektAfterOpen(DataSet: TDataSet);\r\n procedure btnzurueckClick(Sender: TObject);\r\n procedure dsPositionenAfterOpen(DataSet: TDataSet);\r\n procedure SourceBelegStateChange(Sender: TObject);\r\n procedure btnSpeichernClick(Sender: TObject);\r\n procedure belegComboMonteurEnter(Sender: TObject);\r\n procedure pickLieferdatumClick(Sender: TObject);\r\n procedure WebFormHashChange(Sender: TObject; oldURL, newURL: string);\r\n procedure WebFormClose(Sender: TObject; var Action: TCloseAction);\r\n procedure btnPDFSendenClick(Sender: TObject);\r\n procedure btnPZE_AClick(Sender: TObject);\r\n procedure btnPZE_OClick(Sender: TObject);\r\n procedure btnDateienClick(Sender: TObject);\r\n procedure dsDateienAfterOpen(DataSet: TDataSet);\r\n procedure btnDateienObjektClick(Sender: TObject);\r\n procedure btnDateienKontaktClick(Sender: TObject);\r\n\r\n public\r\n\r\n imgUnterschriftMonteur:TImageControl;\r\n imgUnterschriftKunde:TImageControl;\r\n MerkerAuftrag:string;\r\n NeuePosition:boolean;\r\n LetztePosNr:double;\r\n PositionsID:string;\r\n Belegart:string;\r\n Belegvariante:string;\r\n Belegnummer:string;\r\n Artikelnummer:string;\r\n\r\n Monteurstringlist:TStringList;\r\n btnObjektWahl:TButton;\r\n buttonBearbeiten:TButton;\r\n\r\n\r\n procedure btnObjektWahlClick(Sender:TObject);\r\n procedure buttonBearbeitenclick(Sender:TObject);\r\n protected procedure LoadDFMValues; override; end;\r\n\r\nvar\r\n EinzelAuftrag: TEinzelAuftrag;\r\n\r\n\r\nimplementation\r\n uses unit1, unit2, unit_ArtikelSuche, unit_AuftragUnterschriften, unit_AuftragTermine, unit_Objektsuche, unit_AuftragPosEinzel, unit_PZE, unit_Dateien;\r\n{$R *.dfm}\r\n\r\n\r\n\r\nprocedure TEinzelAuftrag.buttonBearbeitenclick(sender:TObject);\r\nvar\r\n AuftragPosEinzel:TAuftragPosEinzel;\r\n MyPositionsID:string;\r\n myArtikelnummer:string;\r\nbegin\r\n myPositionsID:=inttostr((sender as TButton).tag);\r\n myArtikelnummer:=(sender as TButton).Hint;\r\n Container4.HTML.text:='';\r\n Container3.HTML.Text:='';\r\n AuftragPosEinzel:=TAuftragPosEinzel.CreateNew(procedure(AForm: TObject)\r\n begin\r\n (AForm as TAuftragPosEinzel).PositionsID:=myPositionsID;\r\n (AForm as TAuftragPosEinzel).tmpArtikelnummer:=myArtikelnummer;\r\n (AForm as TAuftragPosEinzel).tmpKundennummer:=dsBelegKundennummerKundennummer.AsString;\r\n (AForm as TAuftragPosEinzel).tmpMerkerAuftrag:=MerkerAuftrag;\r\n (AForm as TAuftragPosEinzel).NeuePosition:=False;\r\n end\r\n );\r\n AuftragPosEinzel.ShowModal(procedure(AValue: TModalResult)\r\n begin\r\n dsSumBeleg.Close;\r\n dsSumBeleg.QueryString:='$filter=Nummerkomplett eq '+QuotedStr(MerkerAuftrag);\r\n dsSumBeleg.Load;\r\n end\r\n );\r\nend;\r\n\r\n\r\n\r\n\r\nprocedure TEinzelAuftrag.btnObjektWahlClick(Sender:TObject);\r\nvar\r\n LFrm:TfrmObjektsuche;\r\n procedure AfterCreate(AForm:TObject);\r\n var\r\n LForm:TfrmObjektsuche;\r\n begin\r\n LForm:=(AForm as TfrmObjektsuche);\r\n lform.Objektreferenz:='';\r\n\r\n end;\r\n\r\n procedure AfterShowmodal(Avalue:TModalResult);\r\n begin\r\n if lfrm.Objektreferenz<>'' then\r\n begin\r\n dsobjekt.Close;\r\n dsobjekt.QueryString:='$filter=Objektreferenz eq '+QuotedStr(lfrm.Objektreferenz);\r\n dsobjekt.Load;\r\n end;\r\n\r\n\r\n end;\r\n\r\n begin\r\n LFrm:=TfrmObjektsuche.CreateNew(@AfterCreate);\r\n // LFrm.Popup:=true;\r\n LFrm.ShowModal(@AfterShowmodal);\r\n\r\nend;\r\n\r\nprocedure TEinzelAuftrag.dsBelegAfterApplyUpdates(Sender: TDataSet;\r\n Info: TResolveResults);\r\nbegin\r\n dsPositionen.Close;\r\n dsunterschriften.Close;\r\n dsBeleg.Close;\r\n dsBeleg.QueryString:='$expand=Kundennummer&$filter=Nummerkomplett eq '+QuotedStr(MerkerAuftrag);\r\n dsBeleg.Load;\r\nend;\r\n\r\nprocedure TEinzelAuftrag.dsBelegAfterOpen(DataSet: TDataSet);\r\nvar\r\n myelement:TJSHTMLElement;\r\nbegin\r\n btnPZE_A.visible:=false;\r\n btnPZE_O.visible:=false;\r\n Container1.html.text:='';\r\n //Container2.HTML.Text:='';\r\n myelement:=container1.ElementHandle;\r\n\r\n container2.ParentElement:=myelement;\r\n container3.ParentElement:=myelement;\r\n\r\n\r\n myelement:=container2.ElementHandle;\r\n btnzurueck.ParentElement:=myelement;\r\n btnspeichern.ParentElement:=myelement;\r\n btnUnterschreiben.ParentElement:=myelement;\r\n btnpdf.ParentElement:=myelement;\r\n btnpdf.Enabled:=form1.rcw.Verkaufspreise;\r\n btnPDFSenden.ParentElement:=myelement;\r\n btntermine.ParentElement:=myelement;\r\n\r\n myelement:=container3.elementhandle;\r\n TC.ParentElement:=myelement;\r\n container4.ParentElement:=myelement;\r\n myelement:=container4.elementhandle;\r\n PTC.ParentElement:=myelement;\r\n\r\n\r\n TC.Visible:=true;\r\n TC.RowCount:=21;\r\n TC.Cells[0,0]:='Auftragsnummer | Datum';\r\n TC.Cells[0,1]:='Kundennummer';\r\n myelement:=TC.cellelements[0,1];\r\n btnDateienKontakt.ParentElement:=myelement;\r\n TC.Cells[0,2]:='Anschrift';\r\n TC.Cells[0,3]:='Email';\r\n TC.Cells[0,4]:='Auftragsdatum | -Nr.';\r\n TC.Cells[0,5]:='Objektnr.';\r\n TC.Cells[0,6]:='Auftragsbezeichnung';\r\n TC.Cells[0,7]:='Lieferdatum';\r\n TC.Cells[0,8]:='Liefertermin';\r\n TC.Cells[0,9]:='MonteurIn';\r\n TC.Cells[0,10]:='Status';\r\n TC.Cells[0,11]:='Netto';\r\n TC.Cells[0,12]:='Lieferanschrift';\r\n TC.Cells[0,13]:='Versanddatum';\r\n TC.Cells[0,14]:='Rechnung Nr. | -Datum';\r\n TC.Cells[0,15]:='Unterzeichner';\r\n TC.Cells[0,16]:='Bemerkung';\r\n TC.Cells[0,17]:='Unterschrift Monteur';\r\n TC.Cells[0,18]:='Unterschrift Kunde';\r\n TC.Cells[0,19]:='Unterschriften vom';\r\n TC.Cells[0,20]:='Dateien';\r\n\r\n myelement:=TC.cellelements[0,0];\r\n btnPZE_A.ParentElement:=myelement;\r\n\r\n myelement:=TC.cellelements[0,5];\r\n btnPZE_O.ParentElement:=myelement;\r\n\r\n myelement:=TC.cellelements[0,20];\r\n btnDateien.ParentElement:=myelement;\r\n\r\n myelement:=tc.CellElements[1,3];\r\n edtEmail.ParentElement:=myelement;\r\n\r\n myelement:=tc.CellElements[1,6];\r\n edtAuftragsbezeichnung.ParentElement:=myelement;\r\n\r\n myelement:=tc.CellElements[1,7];\r\n picklieferdatum.ParentElement:=myelement;\r\n\r\n myelement:=tc.CellElements[1,8];\r\n edtLiefertermin.ParentElement:=myelement;\r\n\r\n myelement:=tc.CellElements[1,10];\r\n\r\n webDBComboAuftragStatus.ParentElement:=myelement;\r\n\r\n myelement:=tc.CellElements[1,9];\r\n belegComboMonteur.ParentElement:=myelement;\r\n\r\n myelement:=tc.CellElements[1,16];\r\n belegMemoServiceBemerkung.ParentElement:=myelement;\r\n if dsBeleggesperrt.AsBoolean=true then\r\n begin\r\n TC.Cells[1,0]:='
'+dsbelegNummerkomplett.asstring +' | '+formatdatetime('DD.MM.YYYY',dsbelegDatum.asdatetime)+' | GESPERRT';\r\n end\r\n else\r\n begin\r\n TC.Cells[1,0]:='
'+dsbelegNummerkomplett.asstring +' | '+formatdatetime('DD.MM.YYYY',dsbelegDatum.asdatetime)+' | Bearbeitung möglich';\r\n end;\r\n\r\n TC.Cells[1,1]:='
'+dsBelegKundennummerKundennummer.asstring;\r\n TC.Cells[1,2]:='
'+ReplaceStr(dsbelegAdresseBild.asstring,#13+#10,'
');\r\n\r\n\r\n TC.Cells[1,4]:=formatdatetime('DD.MM.YYYY',dsbelegBestelldatumKunde.Asdatetime)+' | '+dsbelegAuftragnummerKunde.Asstring;\r\n TC.Cells[1,5]:=dsbelegObjektnummer.Asstring;\r\n myelement:=TC.cellelements[0,5];\r\n btnDateienObjekt.ParentElement:=myelement;\r\n if dsbeleggesperrt.asboolean=false then\r\n begin\r\n myelement:=TC.cellelements[1,5];\r\n btnObjektWahl:=TButton.Create(self);\r\n btnObjektWahl.ElementClassName:='btn btn-info btn-sm text-left';\r\n btnObjektWahl.HeightStyle:=ssauto;\r\n btnObjektWahl.WidthStyle:=ssauto;\r\n btnObjektWahl.tag:=0;\r\n btnObjektWahl.Caption:='ändern';\r\n btnObjektWahl.OnClick:=@btnObjektWahlClick;\r\n btnObjektWahl.ParentElement:=myelement;\r\n end;\r\n\r\n belegComboMonteur.ItemIndex:=2;\r\n\r\n if dsBeleggesperrt.AsBoolean=true then TC.Cells[1,10]:=dsbelegauftragstatus.asstring;\r\n if form1.rcw.Verkaufspreise=TRUE then TC.Cells[1,11]:=formatfloat('#,##0.00',dsbelegNettosumme.Asfloat);\r\n if form1.rcw.Verkaufspreise=FALSE then TC.Cells[1,11]:='XXX';\r\n TC.Cells[1,12]:=ReplaceStr(dsBelegLieferanschriftBild.Asstring,#13+#10,'
');\r\n if dsbelegversanddatum.AsString<>'' then TC.Cells[1,13]:=formatdatetime('DD.MM.YYYY',dsbelegVersanddatum.Asdatetime);\r\n TC.Cells[1,14]:=dsbelegreferenzrechnung.AsString+' | '+dsbelegREDatum.AsString;\r\n TC.Cells[1,15]:=dsbelegUnterzeichner.AsString;\r\n if dsBelegMonteur.AsString<>'' then\r\n begin\r\n dm2.queryMonteur.Locate('Personalnummer',dsBelegMonteur.AsString,[]);\r\n belegcombomonteur.Text:=dm2.queryMonteurPersonalnummer.asstring+'| '+dm2.queryMonteurNachname.asstring+', '+dm2.queryMonteurVorname.asstring;\r\n end\r\n else\r\n begin\r\n belegComboMonteur.Text:='';\r\n end;\r\n\r\n //PZE einblenden wenn zugelassen\r\n if form1.rcw.Zeiterfassung=true then\r\n begin\r\n if (PZE_Auftrag_erlaubt=1) AND (dsbelegnummerkomplett.asstring<>'') then btnPZE_A.visible:=true;\r\n if (PZE_Objekt_erlaubt=1) AND (dsbelegObjektReferenz.Asstring<>'') then btnPZE_O.visible:=true;\r\n end;\r\n\r\n\r\n edtAuftragsbezeichnung.SetFocus;\r\n dsUnterschriften.QueryString:='$filter=Nummerkomplett eq '+QuotedStr(MerkerAuftrag);\r\n dsUnterschriften.Load;\r\nend;\r\n\r\nprocedure TEinzelAuftrag.dsBelegAfterPost(DataSet: TDataSet);\r\nbegin\r\n if LizenzOK then\r\n begin\r\n dsBeleg.ApplyUpdates;\r\n end\r\n else\r\n begin\r\n showmessage('Für das Speichern von Daten sind Sie noch nicht freigeschaltet, bitte erwerben Sie eine Lizenz');\r\n end;\r\nend;\r\n\r\nprocedure TEinzelAuftrag.dsBelegBeforePost(DataSet: TDataSet);\r\nvar\r\n tempnettosumme:double;\r\n tempnettosumme01:double;\r\n tempnettosumme02:double;\r\n tempnettosumme03:double;\r\n tempnettosummeEK:double;\r\nbegin\r\n if belegcombomonteur.Text='' then\r\n begin\r\n dsBelegMonteur.AsString:='';\r\n end\r\n else\r\n begin\r\n Monteurstringlist.DelimitedText:=belegComboMonteur.Text;\r\n dsBelegMonteur.AsString:=Monteurstringlist[0];\r\n end;\r\n\r\n if dssumBeleg.Active then\r\n begin\r\n if dsSumBeleg.RecordCount>0 then\r\n begin\r\n tempnettosumme:=0;\r\n tempnettosumme01:=0;\r\n tempnettosumme02:=0;\r\n tempnettosumme03:=0;\r\n tempnettosummeEK:=0;\r\n dsSumBeleg.First;\r\n\r\n while not dsSumBeleg.eof do\r\n begin\r\n tempnettosumme:=tempnettosumme+dsSumBelegEndpreis.AsFloat;\r\n if dsSumBelegPKZ.AsFloat=0 then tempnettosummeEK:=tempnettosummeEK+dsSumBelegEndpreis_EK.AsFloat;\r\n if dsBelegMehrwertsteuersatz1.AsFloat=dsSumBelegMehrwertsteuersatz.asfloat then\r\n begin\r\n tempnettosumme01:=tempnettosumme01+dsSumBelegEndpreis.AsFloat;\r\n end;\r\n if dsBelegMehrwertsteuersatz2.AsFloat=dsSumBelegMehrwertsteuersatz.asfloat then\r\n begin\r\n tempnettosumme02:=tempnettosumme02+dsSumBelegEndpreis.AsFloat;\r\n end;\r\n if dsBelegMehrwertsteuersatz3.AsFloat=dsSumBelegMehrwertsteuersatz.asfloat then\r\n begin\r\n tempnettosumme03:=tempnettosumme03+dsSumBelegEndpreis.AsFloat;\r\n end;\r\n dsSumBeleg.Next;\r\n end;\r\n\r\n dsBelegNettosumme.AsFloat:=tempnettosumme;\r\n dsBelegNettosumme01.AsFloat:=tempnettosumme01;\r\n dsBelegNettosumme02.AsFloat:=tempnettosumme02;\r\n dsBelegNettosumme03.AsFloat:=tempnettosumme03;\r\n dsBelegNettosummeEK.AsFloat:=tempnettosummeEK;\r\n\r\n\r\n end;\r\n end;\r\n dsSumBeleg.Close;\r\n dsbelegprotokoll.asstring:=dsbelegprotokoll.asstring+datetimetostr(date+time)+' CadiaWEB '+ BenutzerSchreibzeichen+#13+#10;\r\n\r\nend;\r\n\r\nprocedure TEinzelAuftrag.dsDateienAfterOpen(DataSet: TDataSet);\r\nvar\r\n tempstringdateien:string;\r\nbegin\r\n dsdateien.first;\r\n while not dsdateien.eof do\r\n begin\r\n tempstringdateien:=tempstringdateien+formatdatetime('DD.MM.YYYY hh:mm:ss',dsdateiendatumuhrzeit.asdatetime)+' | '+dsdateiendateibetreff.asstring+'
';\r\n dsdateien.next;\r\n end;\r\n TC.cells[1,20]:=tempstringdateien;\r\n dsPositionen.QueryString:='$expand=Artikelnummer&$filter=Nummerkomplett eq '+QuotedStr(MerkerAuftrag)+'&$orderby=PosNr';\r\n dsPositionen.Load;\r\nend;\r\n\r\nprocedure TEinzelAuftrag.dsObjektAfterOpen(DataSet: TDataSet);\r\nbegin\r\n dsbeleg.Edit;\r\n dsbelegObjektReferenz.AsString:=dsObjektObjektReferenz.AsString;\r\n dsbelegObjektnummer.AsString:=dsObjektObjektnummer.AsString;\r\n dsobjekt.Close;\r\n dsbeleg.post;\r\nend;\r\n\r\nprocedure TEinzelAuftrag.dsPositionenAfterOpen(DataSet: TDataSet);\r\nvar\r\n I: Integer;\r\n myelement:TJSHTMLElement;\r\nbegin\r\n PTC.Visible:=true;\r\n PTC.RowCount:=dsPositionen.RecordCount+1;\r\n PTC.ColCount:=4;\r\n myelement:=PTC.CellElements[0,0];\r\n btnNeuePosition.ParentElement:=myelement;\r\n PTC.Cells[1,0]:='Positionen/Artikel';\r\n PTC.Cells[2,0]:='Menge';\r\n PTC.Cells[3,0]:='Preise';\r\n //PTC.Cells[7,0]:='Endpreis';\r\n\r\n dspositionen.First;\r\n for I := 1 to dspositionen.RecordCount do\r\n begin\r\n PTC.Cells[0,i]:=dspositionen.FieldByName('PosNr').AsString+'.'+dspositionen.FieldByName('PosUNr').AsString+'
';\r\n\r\n myelement:=PTC.cellelements[0,i];\r\n buttonBearbeiten:=TButton.Create(self);\r\n buttonBearbeiten.ElementClassName:='btn btn-info btn-sm text-left';\r\n buttonBearbeiten.HeightStyle:=ssauto;\r\n buttonBearbeiten.WidthStyle:=ssauto;\r\n buttonBearbeiten.tag:=dsPositionenID.asinteger;\r\n buttonBearbeiten.Hint:=dsPositionenArtikelnummerArtikelnummer.AsString;\r\n buttonBearbeiten.Caption:='bearbeiten';\r\n buttonBearbeiten.OnClick:=@buttonBearbeitenClick;\r\n buttonBearbeiten.ParentElement:=myelement;\r\n\r\n PTC.Cells[1,i]:=dspositionen.FieldByName('Artikelnummer.Artikelnummer').AsString+'
'+dspositionen.FieldByName('Artikelueberschrift').AsString+'
'+leftstr(dspositionenArtikelbeschreibung.AsString,250)+'
'+dsPositionenMonteurP.AsString;;\r\n PTC.Cells[2,i]:='

'+dspositionen.FieldByName('Menge').AsString + '
'+dsPositionenArtderMenge.asstring;\r\n if form1.rcw.Verkaufspreise=true then PTC.Cells[3,i]:='

'+formatfloat('#,##0.00',dsPositionenVerkaufspreis.Asfloat)+'
'+formatfloat('#,##0.00',dsPositionenEndpreis.Asfloat);\r\n if form1.rcw.Verkaufspreise=false then PTC.Cells[3,i]:='

XXX';\r\n //if not einkauf then PTC.Cells[6,i]:='

'+formatfloat('#,##0.00',xdsPositionen.fieldbyname('Verkaufspreis').asfloat);\r\n //if not einkauf then PTC.Cells[7,i]:='

'+formatfloat('#,##0.00',xdsPositionen.fieldbyname('Endpreis').asfloat);\r\n dspositionen.Next;\r\n end;\r\nend;\r\n\r\nprocedure TEinzelAuftrag.dsSumBelegAfterOpen(DataSet: TDataSet);\r\nbegin\r\n dsbeleg.Edit;\r\n dsbeleg.Post;\r\nend;\r\n\r\nprocedure TEinzelAuftrag.dsUnterschriftenAfterApplyUpdates(Sender: TDataSet;\r\n Info: TResolveResults);\r\nbegin\r\n dsPositionen.Close;\r\n dsbeleg.Edit;\r\n dsbeleg.Post;\r\nend;\r\n\r\nprocedure TEinzelAuftrag.dsUnterschriftenAfterOpen(DataSet: TDataSet);\r\n var\r\n myelement:TJSHTMLElement;\r\nbegin\r\n if dsunterschriften.RecordCount=1 then\r\n begin\r\n try\r\n //TC.Cells[1,15]:='';\r\n //TC.Cells[1,16]:='';\r\n\r\n\r\n myelement:=tc.CellElements[1,16];\r\n imgUnterschriftMonteur:=TImageControl.Create(self);\r\n imgUnterschriftMonteur.height:=100;\r\n imgUnterschriftMonteur.width:=200;\r\n imgunterschriftmonteur.url:=dsUnterschriftenUnterschriftMonteurText.asstring;\r\n myelement.innerHTML:='';\r\n imgUnterschriftMonteur.ParentElement:=myelement;\r\n\r\n myelement:=tc.CellElements[1,17];\r\n imgUnterschriftKunde:=TImageControl.Create(self);\r\n imgUnterschriftKunde.height:=100;\r\n imgUnterschriftKunde.Width:=200;\r\n imgunterschriftKunde.url:=dsUnterschriftenUnterschriftKundeText.asstring;\r\n myelement.innerHTML:='';\r\n imgUnterschriftKunde.ParentElement:=myelement;\r\n TC.Cells[1,18]:=formatdatetime('DD.MM.YYYY hh:mm:ss',dsUnterschriftenDatum.Asdatetime);\r\n\r\n btnUnterschreiben.enabled:=false;\r\n except\r\n end;\r\n end;\r\n dsdateien.close;\r\n dsdateien.querystring:='$select=ID,DatumUhrzeit, DateiBetreff&$filter=Nummerkomplett eq '+ QuotedStr(MerkerAuftrag)+'&$orderby=ID';\r\n Dsdateien.load;\r\nend;\r\n\r\nprocedure TEinzelAuftrag.dsUnterschriftenAfterPost(DataSet: TDataSet);\r\nbegin\r\n if LizenzOK then\r\n begin\r\n dsUnterschriften.ApplyUpdates;\r\n end\r\n else\r\n begin\r\n showmessage('Für das Speichern von Daten sind Sie noch nicht freigeschaltet, bitte erwerben Sie eine Lizenz');\r\n end;\r\nend;\r\n\r\nprocedure TEinzelAuftrag.pickLieferdatumClick(Sender: TObject);\r\nbegin\r\n if dsBelegLieferdatum.AsString='' then\r\n begin\r\n try\r\n dsbeleg.Edit;\r\n dsbeleglieferdatum.AsDateTime:=date;\r\n except\r\n\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TEinzelAuftrag.SourceBelegStateChange(Sender: TObject);\r\nbegin\r\n if dsBeleg.State in dseditmodes then btnspeichern.Enabled:=true else btnspeichern.Enabled:=false;\r\nend;\r\n\r\nprocedure TEinzelAuftrag.belegComboMonteurEnter(Sender: TObject);\r\nbegin\r\n if dsbeleg.active then dsbeleg.Edit;\r\nend;\r\n\r\nprocedure TEinzelAuftrag.btnDateienClick(Sender: TObject);\r\nvar\r\n LFrm:TfrmDateien;\r\n procedure AfterCreate(AForm:TObject);\r\n var\r\n LForm:TfrmDateien;\r\n begin\r\n LForm:=(AForm as TfrmDateien);\r\n lform.MerkerObjektreferenz:=dsBelegObjektReferenz.asstring;\r\n lform.MerkerNummerkomplett:=MerkerAuftrag;\r\n lform.MerkerKundennummer:=dsBelegKundennummerKundennummer.AsString;\r\n lform.MerkerFahrzeugID:='';\r\n lform.MerkerName:=trim(dsbelegvorname.asstring+' '+ dsBelegNachname.AsString);\r\n lform.MerkerArt:='Auftrag';\r\n lform.HeadlineText:='Dateien zu Auftrag '+dsBelegNummerkomplett.AsString+' | '+dsBelegAuftragsbezeichnung.AsString;\r\n end;\r\n\r\n procedure AfterShowmodal(Avalue:TModalResult);\r\n begin\r\n dsSumBeleg.Close;\r\n dsSumBeleg.QueryString:='$filter=Nummerkomplett eq '+QuotedStr(MerkerAuftrag);\r\n dsSumBeleg.Load;\r\n end;\r\n\r\n begin\r\n Container4.HTML.text:='';\r\n Container3.HTML.Text:='';\r\n LFrm:=TfrmDateien.CreateNew(@AfterCreate);\r\n LFrm.ShowModal(@AfterShowmodal);\r\nend;\r\n\r\nprocedure TEinzelAuftrag.btnDateienKontaktClick(Sender: TObject);\r\nvar\r\n LFrm:TfrmDateien;\r\n procedure AfterCreate(AForm:TObject);\r\n var\r\n LForm:TfrmDateien;\r\n begin\r\n LForm:=(AForm as TfrmDateien);\r\n lform.MerkerObjektreferenz:=dsBelegObjektReferenz.asstring;\r\n lform.MerkerNummerkomplett:=MerkerAuftrag;\r\n lform.MerkerKundennummer:=dsBelegKundennummerKundennummer.AsString;\r\n lform.MerkerFahrzeugID:='';\r\n lform.MerkerName:=trim(dsbelegvorname.asstring+' '+ dsBelegNachname.AsString);\r\n lform.MerkerArt:='Kontakt';\r\n lform.HeadlineText:='Dateien zu Kontakt '+dsBelegKundennummerKundennummer.AsString+' | '+dsBelegNachname.AsString;\r\n end;\r\n\r\n procedure AfterShowmodal(Avalue:TModalResult);\r\n begin\r\n dsdateien.Close;\r\n dsPositionen.Close;\r\n dsBeleg.Close;\r\n dsBeleg.QueryString:='$expand=Kundennummer&$filter=Nummerkomplett eq '+QuotedStr(MerkerAuftrag);\r\n dsBeleg.Load;\r\n end;\r\n\r\n begin\r\n If dsBelegKundennummerKundennummer.AsString<>'' then\r\n begin\r\n Container4.HTML.text:='';\r\n Container3.HTML.Text:='';\r\n LFrm:=TfrmDateien.CreateNew(@AfterCreate);\r\n LFrm.ShowModal(@AfterShowmodal);\r\n end;\r\n\r\nend;\r\n\r\nprocedure TEinzelAuftrag.btnDateienObjektClick(Sender: TObject);\r\nvar\r\n LFrm:TfrmDateien;\r\n procedure AfterCreate(AForm:TObject);\r\n var\r\n LForm:TfrmDateien;\r\n begin\r\n LForm:=(AForm as TfrmDateien);\r\n lform.MerkerObjektreferenz:=dsBelegObjektReferenz.asstring;\r\n lform.MerkerNummerkomplett:=MerkerAuftrag;\r\n lform.MerkerKundennummer:=dsBelegKundennummerKundennummer.AsString;\r\n lform.MerkerFahrzeugID:='';\r\n lform.MerkerName:=trim(dsbelegvorname.asstring+' '+ dsBelegNachname.AsString);\r\n lform.MerkerArt:='Objekt';\r\n lform.HeadlineText:='Dateien zu Objekt '+dsBelegObjektnummer.AsString;\r\n end;\r\n\r\n procedure AfterShowmodal(Avalue:TModalResult);\r\n begin\r\n dsdateien.Close;\r\n dsPositionen.Close;\r\n dsBeleg.Close;\r\n dsBeleg.QueryString:='$expand=Kundennummer&$filter=Nummerkomplett eq '+QuotedStr(MerkerAuftrag);\r\n dsBeleg.Load;\r\n end;\r\n\r\n begin\r\n if dsBelegObjektReferenz.asstring<>'' then\r\n begin\r\n Container4.HTML.text:='';\r\n Container3.HTML.Text:='';\r\n LFrm:=TfrmDateien.CreateNew(@AfterCreate);\r\n LFrm.ShowModal(@AfterShowmodal);\r\n end;\r\n\r\nend;\r\n\r\nprocedure TEinzelAuftrag.btnNeuePositionClick(Sender: TObject);\r\nvar\r\n AuftragPosEinzel:TAuftragPosEinzel;\r\nbegin\r\n if dspositionen.RecordCount>0 then\r\n begin\r\n dsPositionen.Last;\r\n positionsid:=dsPositionenID.AsString;\r\n LetztePosNr:=dsPositionenPosNr.AsFloat;\r\n end\r\n else\r\n begin\r\n LetztePosNr:=0;\r\n positionsid:='';\r\n end;\r\n Container4.HTML.text:='';\r\n Container3.HTML.Text:='';\r\n\r\n AuftragPosEinzel:=TAuftragPosEinzel.CreateNew(procedure(BForm: TObject)\r\n begin\r\n (BForm as TAuftragPosEinzel).PositionsID:='';\r\n (BForm as TAuftragPosEinzel).tmpArtikelnummer:='';\r\n (BForm as TAuftragPosEinzel).tmpKundennummer:=dsBelegKundennummerKundennummer.AsString;\r\n (BForm as TAuftragPosEinzel).tmpMerkerAuftrag:=MerkerAuftrag;\r\n (BForm as TAuftragPosEinzel).NeuePosition:=True;\r\n (BForm as TAuftragPosEinzel).tmpletztePosNr:=LetztePosNr;\r\n end\r\n );\r\n AuftragPosEinzel.ShowModal(procedure(AValue: TModalResult)\r\n begin\r\n dsSumBeleg.Close;\r\n dsSumBeleg.QueryString:='$filter=Nummerkomplett eq '+QuotedStr(MerkerAuftrag);\r\n dsSumBeleg.Load;\r\n end\r\n );\r\n\r\nend;\r\n\r\nprocedure TEinzelAuftrag.btnPDFClick(Sender: TObject);\r\n procedure OnResponse(Response:TXDataClientResponse);\r\n var\r\n mydownload:string;\r\n begin\r\n mydownload:=string(TJSObject(response.Result)['value']);\r\n if mydownload='WRONG' then\r\n begin\r\n showmessage('Download kann nicht bereitgestellt werden');\r\n end\r\n else\r\n begin\r\n application.Navigate(downloadconnection+mydownload,ntblank);\r\n end;\r\n end;\r\nbegin\r\n if LizenzOK then\r\n begin\r\n WClient.RawInvoke('IServerService.ServiceBerichtPDF',[MerkerAuftrag],@OnResponse);\r\n end\r\n else\r\n begin\r\n showmessage('Für das Abrufen von Dateien sind Sie noch nicht freigeschaltet, bitte erwerben Sie eine Lizenz');\r\n end;\r\nend;\r\n\r\nprocedure TEinzelAuftrag.btnPDFSendenClick(Sender: TObject);\r\n procedure OnResponse(Response:TXDataClientResponse);\r\n var\r\n mydownload:string;\r\n begin\r\n mydownload:=string(TJSObject(response.Result)['value']);\r\n if mydownload='WRONG' then\r\n begin\r\n showmessage('Postausgang konnte nicht erstellt werden.');\r\n end\r\n else\r\n begin\r\n showmessage('Emailversand wurde vorgemerkt.');\r\n end;\r\n end;\r\nbegin\r\n if LizenzOK then\r\n begin\r\n if dsBelegEMail.AsString<>'' then\r\n begin\r\n WClient.RawInvoke('IServerService.ServiceBerichtPDFSENDEN',[MerkerAuftrag],@OnResponse);\r\n end\r\n else\r\n begin\r\n showmessage('Emailadresse fehlt');\r\n end;\r\n end\r\n else\r\n begin\r\n showmessage('Für diese Funktion sind Sie noch nicht freigeschaltet, bitte erwerben Sie eine Lizenz');\r\n end;\r\n\r\nend;\r\n\r\nprocedure TEinzelAuftrag.btnPZE_AClick(Sender: TObject);\r\nvar\r\n newform:TPZE;\r\nbegin\r\n PZE_AutoAuftragnummer:=dsBelegNummerkomplett.asstring;\r\n newform := TPZE.CreateNew;\r\nend;\r\n\r\nprocedure TEinzelAuftrag.btnPZE_OClick(Sender: TObject);\r\nvar\r\n newform:TPZE;\r\nbegin\r\n PZE_AutoObjektnummer:=dsBelegObjektReferenz.asstring;\r\n newform := TPZE.CreateNew;\r\nend;\r\n\r\nprocedure TEinzelAuftrag.btnSpeichernClick(Sender: TObject);\r\nbegin\r\n dsbeleg.Post;\r\nend;\r\n\r\nprocedure TEinzelAuftrag.btnTermineClick(Sender: TObject);\r\nvar\r\n LFrm:TAuftragTermine;\r\n procedure AfterCreate(AForm:TObject);\r\n var\r\n LForm:TAuftragTermine;\r\n begin\r\n LForm:=(AForm as TAuftragTermine);\r\n lform.MerkerAuftragTermine:=MerkerAuftrag;\r\n end;\r\n\r\n procedure AfterShowmodal(Avalue:TModalResult);\r\n begin\r\n\r\n end;\r\n\r\n begin\r\n\r\n LFrm:=TAuftragTermine.CreateNew(@AfterCreate);\r\n //LFrm.Popup:=true;\r\n LFrm.ShowModal(@AfterShowmodal);\r\n\r\nend;\r\n\r\nprocedure TEinzelAuftrag.btnUnterschreibenClick(Sender: TObject);\r\nvar\r\n LFrm:TAuftragUnterschriften;\r\n procedure AfterCreate(AForm:TObject);\r\n var\r\n LForm:TAuftragUnterschriften;\r\n begin\r\n LForm:=(AForm as TAuftragUnterschriften);\r\n lform.UMerkerAuftrag:=MerkerAuftrag;\r\n ptc.Visible:=false;\r\n tc.Visible:=false;\r\n end;\r\n\r\n procedure AfterShowmodal(Avalue:TModalResult);\r\n begin\r\n dsUnterschriften.Close;\r\n dsPositionen.Close;\r\n dsBeleg.Close;\r\n dsBeleg.QueryString:='$expand=Kundennummer&$filter=Nummerkomplett eq '+QuotedStr(MerkerAuftrag);\r\n dsBeleg.Load;\r\n end;\r\n\r\n begin\r\n\r\n LFrm:=TAuftragUnterschriften.CreateNew(@AfterCreate);\r\n //LFrm.Popup:=true;\r\n LFrm.ShowModal(@AfterShowmodal);\r\n\r\nend;\r\n\r\nprocedure TEinzelAuftrag.btnzurueckClick(Sender: TObject);\r\nbegin\r\n dspositionen.Close;\r\n dsbeleg.Close;\r\n self.Close;\r\nend;\r\n\r\nprocedure TEinzelAuftrag.WebFormClose(Sender: TObject;\r\n var Action: TCloseAction);\r\nbegin\r\n action:=cafree;\r\nend;\r\n\r\nprocedure TEinzelAuftrag.WebFormCloseQuery(Sender: TObject;\r\n var CanClose: Boolean);\r\nbegin\r\n monteurstringlist.Free;\r\n\r\nend;\r\n\r\nprocedure TEinzelAuftrag.WebFormCreate(Sender: TObject);\r\nbegin\r\n Monteurstringlist:=TStringList.Create;\r\n Monteurstringlist.Delimiter:='|';\r\n Monteurstringlist.StrictDelimiter:=true;\r\n webDBComboAuftragStatus.Items.clear;\r\n dm2.tableAuftragStatus.First;\r\n while not dm2.tableAuftragStatus.eof do\r\n begin\r\n webDBComboAuftragStatus.Items.Add(dm2.tableAuftragStatusAuftragStatus.asstring);\r\n dm2.tableAuftragStatus.Next;\r\n end;\r\n belegComboMonteur.Items.clear;\r\n\r\n dm2.queryMonteur.First;\r\n while not dm2.queryMonteur.eof do\r\n begin\r\n belegComboMonteur.Items.Add(dm2.queryMonteurPersonalnummer.asstring+'| '+dm2.queryMonteurNachname.asstring+', '+dm2.queryMonteurVorname.asstring);\r\n dm2.queryMonteur.Next;\r\n end;\r\n\r\n belegComboMonteur.Items.Add('');\r\n\r\nend;\r\n\r\nprocedure TEinzelAuftrag.WebFormHashChange(Sender: TObject; oldURL,\r\n newURL: string);\r\nbegin\r\n if window.location.hash = '' then\r\n Close;\r\nend;\r\n\r\nprocedure TEinzelAuftrag.WebFormShow(Sender: TObject);\r\nbegin\r\n\r\n if MerkerAuftrag<>'' then\r\n begin\r\n dsUnterschriften.Close;\r\n dsPositionen.Close;\r\n dsBeleg.Close;\r\n dsBeleg.QueryString:='$expand=Kundennummer&$filter=Nummerkomplett eq '+QuotedStr(MerkerAuftrag);\r\n dsBeleg.Load;\r\n end;\r\nend;\r\n\r\nprocedure TEinzelAuftrag.LoadDFMValues;\r\nbegin\r\n inherited LoadDFMValues;\r\n\r\n TC := TTableControl.Create(Self);\r\n Container1 := THTMLContainer.Create(Self);\r\n btnzurueck := TButton.Create(Self);\r\n btnUnterschreiben := TButton.Create(Self);\r\n btnPDF := TButton.Create(Self);\r\n btnTermine := TButton.Create(Self);\r\n Container3 := THTMLContainer.Create(Self);\r\n Container2 := THTMLContainer.Create(Self);\r\n PTC := TTableControl.Create(Self);\r\n btnSpeichern := TButton.Create(Self);\r\n pickLieferdatum := TDBDateTimePicker.Create(Self);\r\n edtAuftragsbezeichnung := TDBEdit.Create(Self);\r\n edtLiefertermin := TDBEdit.Create(Self);\r\n btnNeuePosition := TButton.Create(Self);\r\n Container4 := THTMLContainer.Create(Self);\r\n webDBComboAuftragStatus := TDBComboBox.Create(Self);\r\n belegComboMonteur := TComboBox.Create(Self);\r\n belegMemoServiceBemerkung := TDBMemo.Create(Self);\r\n btnPDFSenden := TButton.Create(Self);\r\n edtEmail := TDBEdit.Create(Self);\r\n btnPZE_A := TButton.Create(Self);\r\n btnPZE_O := TButton.Create(Self);\r\n btnDateien := TButton.Create(Self);\r\n btnDateienObjekt := TButton.Create(Self);\r\n btnDateienKontakt := TButton.Create(Self);\r\n dsBeleg := TXDataWebDataSet.Create(Self);\r\n dsBelegKundennummer := TXDataWebEntityField.Create(Self);\r\n dsBelegNummerkomplett := TStringField.Create(Self);\r\n dsBelegReferenzAngebot := TStringField.Create(Self);\r\n dsBelegReferenzLieferschein := TStringField.Create(Self);\r\n dsBelegReferenzRechnung := TStringField.Create(Self);\r\n dsBelegDatum := TDateTimeField.Create(Self);\r\n dsBelegJahr := TFloatField.Create(Self);\r\n dsBelegKalenderwoche := TIntegerField.Create(Self);\r\n dsBelegNachname := TStringField.Create(Self);\r\n dsBelegVorname := TStringField.Create(Self);\r\n dsBelegPostleitzahl := TStringField.Create(Self);\r\n dsBelegOrt := TStringField.Create(Self);\r\n dsBelegLaenderkuerzel := TStringField.Create(Self);\r\n dsBelegLand := TStringField.Create(Self);\r\n dsBelegBriefanrede1 := TStringField.Create(Self);\r\n dsBelegBriefanrede2 := TStringField.Create(Self);\r\n dsBelegEMail := TStringField.Create(Self);\r\n dsBelegAdresseBild := TStringField.Create(Self);\r\n dsBelegLieferanschriftBild := TStringField.Create(Self);\r\n dsBelegZahlungsbedingung := TIntegerField.Create(Self);\r\n dsBelegZahlungsbedingungText := TStringField.Create(Self);\r\n dsBelegAuftragsbezeichnung := TStringField.Create(Self);\r\n dsBelegAuftragnummerKunde := TStringField.Create(Self);\r\n dsBelegBestelldatumKunde := TDateTimeField.Create(Self);\r\n dsBelegILN := TStringField.Create(Self);\r\n dsBelegKopftext := TStringField.Create(Self);\r\n dsBelegSchlussbemerkung := TStringField.Create(Self);\r\n dsBelegGruss := TStringField.Create(Self);\r\n dsBelegMehrwertsteuersatz1 := TFloatField.Create(Self);\r\n dsBelegMehrwertsteuersatz2 := TFloatField.Create(Self);\r\n dsBelegNettosumme01 := TFloatField.Create(Self);\r\n dsBelegNettosumme02 := TFloatField.Create(Self);\r\n dsBelegNettosumme := TFloatField.Create(Self);\r\n dsBelegMehrwertsteuer01 := TFloatField.Create(Self);\r\n dsBelegMehrwertsteuer02 := TFloatField.Create(Self);\r\n dsBelegMehrwertsteuer := TFloatField.Create(Self);\r\n dsBelegBruttosumme := TFloatField.Create(Self);\r\n dsBelegVersanddatum := TDateTimeField.Create(Self);\r\n dsBelegSkontosatz := TFloatField.Create(Self);\r\n dsBelegNettosummeEK := TFloatField.Create(Self);\r\n dsBelegNettoMarge := TFloatField.Create(Self);\r\n dsBelegSchreibzeichen := TStringField.Create(Self);\r\n dsBelegUnterzeichner := TStringField.Create(Self);\r\n dsBelegTelefonMA := TStringField.Create(Self);\r\n dsBelegEmailMA := TStringField.Create(Self);\r\n dsBelegUSTID := TStringField.Create(Self);\r\n dsBelegUmsatzsteuerausweis := TBooleanField.Create(Self);\r\n dsBeleggebucht := TBooleanField.Create(Self);\r\n dsBelegLieferdatum := TDateTimeField.Create(Self);\r\n dsBelegTransportbedingung := TStringField.Create(Self);\r\n dsBelegMehrwertsteuersatz3 := TFloatField.Create(Self);\r\n dsBelegMehrwertsteuer03 := TFloatField.Create(Self);\r\n dsBelegNettosumme03 := TFloatField.Create(Self);\r\n dsBelegRundungsDifferenz := TFloatField.Create(Self);\r\n dsBelegEmailText := TStringField.Create(Self);\r\n dsBelegAuftragerledigt := TBooleanField.Create(Self);\r\n dsBelegRabattstufe := TStringField.Create(Self);\r\n dsBelegKFZKennzeichen := TStringField.Create(Self);\r\n dsBelegFahrgestellnummer := TStringField.Create(Self);\r\n dsBelegKFZHersteller := TStringField.Create(Self);\r\n dsBelegErstzulassungsdatum := TDateTimeField.Create(Self);\r\n dsBelegKMStand := TStringField.Create(Self);\r\n dsBelegKFZType := TStringField.Create(Self);\r\n dsBelegInspektionsdatum := TDateTimeField.Create(Self);\r\n dsBelegDebitorennummer := TStringField.Create(Self);\r\n dsBelegKostentraeger := TStringField.Create(Self);\r\n dsBelegRabattsatz := TFloatField.Create(Self);\r\n dsBelegObjektReferenz := TStringField.Create(Self);\r\n dsBelegBank := TStringField.Create(Self);\r\n dsBelegBankleitzahl := TFloatField.Create(Self);\r\n dsBelegKontonummer := TStringField.Create(Self);\r\n dsBelegKontoinhaber := TStringField.Create(Self);\r\n dsBelegTelefaxnummer := TStringField.Create(Self);\r\n dsBelegDatumNeu := TDateTimeField.Create(Self);\r\n dsBelegDatumgeaendert := TDateTimeField.Create(Self);\r\n dsBelegObjektnummer := TStringField.Create(Self);\r\n dsBelegLiefertermin := TStringField.Create(Self);\r\n dsBelegEmailversand := TBooleanField.Create(Self);\r\n dsBelegTelefonnummer := TStringField.Create(Self);\r\n dsBelegMobilTelefon := TStringField.Create(Self);\r\n dsBelegAuftragFax := TBooleanField.Create(Self);\r\n dsBelegREDatum := TDateTimeField.Create(Self);\r\n dsBelegBenutzerNeu := TStringField.Create(Self);\r\n dsBelegBenutzerGeaendert := TStringField.Create(Self);\r\n dsBelegBerechnungBrutto := TBooleanField.Create(Self);\r\n dsBelegBruttosumme01 := TFloatField.Create(Self);\r\n dsBelegBruttosumme02 := TFloatField.Create(Self);\r\n dsBelegBruttosumme03 := TFloatField.Create(Self);\r\n dsBelegNotiz := TStringField.Create(Self);\r\n dsBelegMargeProzent := TFloatField.Create(Self);\r\n dsBelegWarenkreditgesperrt := TBooleanField.Create(Self);\r\n dsBelegBelegsprache := TStringField.Create(Self);\r\n dsBelegDuplicate := TStringField.Create(Self);\r\n dsBelegperEmail := TBooleanField.Create(Self);\r\n dsBelegAnsprechpartner := TStringField.Create(Self);\r\n dsBelegKundennummerFremd := TStringField.Create(Self);\r\n dsBelegProtokoll := TStringField.Create(Self);\r\n dsBelegVerleihauftrag := TBooleanField.Create(Self);\r\n dsBelegVerleihVon := TDateTimeField.Create(Self);\r\n dsBelegVerleihBis := TDateTimeField.Create(Self);\r\n dsBelegAuftragGenehmigt := TBooleanField.Create(Self);\r\n dsBeleggesperrt := TBooleanField.Create(Self);\r\n dsBelegVerleihvonText := TStringField.Create(Self);\r\n dsBelegVerleihbisText := TStringField.Create(Self);\r\n dsBelegDruckWHG := TStringField.Create(Self);\r\n dsBelegDruckWHGKurs := TFloatField.Create(Self);\r\n dsBelegProzentsatzZusatzposition := TFloatField.Create(Self);\r\n dsBelegTextZusatzposition := TStringField.Create(Self);\r\n dsBelegTextzusatzBeschreibung := TStringField.Create(Self);\r\n dsBelegLayoutname := TStringField.Create(Self);\r\n dsBelegGesamtgewicht := TFloatField.Create(Self);\r\n dsBelegBetragZusatzposition := TFloatField.Create(Self);\r\n dsBelegReferenzBestellung := TStringField.Create(Self);\r\n dsBelegTermin1 := TDateTimeField.Create(Self);\r\n dsBelegTermin2 := TDateTimeField.Create(Self);\r\n dsBelegZielkontaktnummer := TStringField.Create(Self);\r\n dsBelegZielkontaktname := TStringField.Create(Self);\r\n dsBelegBilddatei1 := TStringField.Create(Self);\r\n dsBelegBilddatei2 := TStringField.Create(Self);\r\n dsBelegZielkontaktnummer2 := TStringField.Create(Self);\r\n dsBelegZielkontaktname2 := TStringField.Create(Self);\r\n dsBelegbestaetigt := TDateTimeField.Create(Self);\r\n dsBelegZielkontaktnummer3 := TStringField.Create(Self);\r\n dsBelegZielkontaktname3 := TStringField.Create(Self);\r\n dsBelegTermin3 := TDateTimeField.Create(Self);\r\n dsBelegTermin4 := TDateTimeField.Create(Self);\r\n dsBelegMuster := TBooleanField.Create(Self);\r\n dsBelegKW := TIntegerField.Create(Self);\r\n dsBelegDatenlink := TStringField.Create(Self);\r\n dsBelegMehrwertsteuersatz4 := TFloatField.Create(Self);\r\n dsBelegMehrwertsteuersatz5 := TFloatField.Create(Self);\r\n dsBelegMehrwertsteuersatz6 := TFloatField.Create(Self);\r\n dsBelegBesteuerungKey := TIntegerField.Create(Self);\r\n dsBelegVertreterMatchcode := TStringField.Create(Self);\r\n dsBelegVerfasser := TStringField.Create(Self);\r\n dsBelegLieferadresseID := TIntegerField.Create(Self);\r\n dsBelegAuftragStatus := TStringField.Create(Self);\r\n dsBelegMonatJahr := TDateTimeField.Create(Self);\r\n dsBelegBelegvariante := TStringField.Create(Self);\r\n dsBelegProduktionsfreigabe := TBooleanField.Create(Self);\r\n dsBelegReferenzRahmenAuftrag := TStringField.Create(Self);\r\n dsBelegDatumRahmenAuftrag := TDateTimeField.Create(Self);\r\n dsBelegFahrzeugID := TIntegerField.Create(Self);\r\n dsBelegAuslieferungKW := TStringField.Create(Self);\r\n dsBelegBereitstellungDatum := TDateTimeField.Create(Self);\r\n dsBelegVTUID := TStringField.Create(Self);\r\n dsBelegLieferanschriftDaten := TStringField.Create(Self);\r\n dsBelegGesamtVolumen := TFloatField.Create(Self);\r\n dsBelegBelegPKey := TIntegerField.Create(Self);\r\n dsBelegDruckParameter := TStringField.Create(Self);\r\n dsBelegReferenzService := TStringField.Create(Self);\r\n dsBelegZusatzDaten := TStringField.Create(Self);\r\n dsBelegStandPDF := TStringField.Create(Self);\r\n dsBelegPaketdienst := TStringField.Create(Self);\r\n dsBelegMonteur := TIntegerField.Create(Self);\r\n dsBelegKundennummerKundennummer := TStringField.Create(Self);\r\n dsBelegServiceBemerkung := TStringField.Create(Self);\r\n SourceBeleg := TDataSource.Create(Self);\r\n dsPositionen := TXDataWebDataSet.Create(Self);\r\n dsPositionenArtikelnummer := TXDataWebEntityField.Create(Self);\r\n dsPositionenNummerkomplett := TXDataWebEntityField.Create(Self);\r\n dsPositionenID := TIntegerField.Create(Self);\r\n dsPositionenPosNr := TFloatField.Create(Self);\r\n dsPositionenPosUNr := TFloatField.Create(Self);\r\n dsPositionenSumme := TBooleanField.Create(Self);\r\n dsPositionenArtikelueberschrift := TStringField.Create(Self);\r\n dsPositionenArtikelbeschreibung := TStringField.Create(Self);\r\n dsPositionenMenge := TFloatField.Create(Self);\r\n dsPositionenArtderMenge := TStringField.Create(Self);\r\n dsPositionenVerkaufspreis := TFloatField.Create(Self);\r\n dsPositionenEinkaufspreis := TFloatField.Create(Self);\r\n dsPositionenSeriennummer := TStringField.Create(Self);\r\n dsPositionenWarengruppe := TStringField.Create(Self);\r\n dsPositionenWarenuntergruppe := TStringField.Create(Self);\r\n dsPositionenArtikelnummerKunde := TStringField.Create(Self);\r\n dsPositionenLieferant := TStringField.Create(Self);\r\n dsPositionenGewicht := TFloatField.Create(Self);\r\n dsPositionenLaenge := TFloatField.Create(Self);\r\n dsPositionenBreite := TFloatField.Create(Self);\r\n dsPositionenHoehe := TFloatField.Create(Self);\r\n dsPositionenMehrwertsteuersatz := TFloatField.Create(Self);\r\n dsPositionenEndpreis := TFloatField.Create(Self);\r\n dsPositionenPosMWST := TFloatField.Create(Self);\r\n dsPositionenBruttoEndpreis := TFloatField.Create(Self);\r\n dsPositionenEndpreis_EK := TFloatField.Create(Self);\r\n dsPositionenRabattsatz := TFloatField.Create(Self);\r\n dsPositionenPreisvorRabatt := TFloatField.Create(Self);\r\n dsPositionenPKZ := TFloatField.Create(Self);\r\n dsPositionenTextfrei10 := TStringField.Create(Self);\r\n dsPositionenTextfrei20 := TStringField.Create(Self);\r\n dsPositionenProduktionAbgeschlossen := TDateTimeField.Create(Self);\r\n dsPositionenEinzelpreisBrutto := TFloatField.Create(Self);\r\n dsPositionenPosMarge := TFloatField.Create(Self);\r\n dsPositionenPosMargeProzent := TFloatField.Create(Self);\r\n dsPositionenBereitsGeliefert := TFloatField.Create(Self);\r\n dsPositionenausliefern := TFloatField.Create(Self);\r\n dsPositionenBestellungErledigt := TBooleanField.Create(Self);\r\n dsPositionenLager := TStringField.Create(Self);\r\n dsPositionenbestellen := TBooleanField.Create(Self);\r\n dsPositionenWarenbestand := TBooleanField.Create(Self);\r\n dsPositionenArtikelbeschreibungRTF := TStringField.Create(Self);\r\n dsPositionenQuellartikel := TStringField.Create(Self);\r\n dsPositionenArtikelnummerWB := TStringField.Create(Self);\r\n dsPositionenPreisanteilNetto := TFloatField.Create(Self);\r\n dsPositionenSetHPos := TStringField.Create(Self);\r\n dsPositionenSetUPos := TStringField.Create(Self);\r\n dsPositionenProvisionssatz := TFloatField.Create(Self);\r\n dsPositionenProvisionsbetrag := TFloatField.Create(Self);\r\n dsPositionenArtikelsprache := TStringField.Create(Self);\r\n dsPositionenEKvom := TDateTimeField.Create(Self);\r\n dsPositionenMengenberechnungID := TStringField.Create(Self);\r\n dsPositionenTaraID := TStringField.Create(Self);\r\n dsPositionenTara := TFloatField.Create(Self);\r\n dsPositionenBruttoGewicht := TFloatField.Create(Self);\r\n dsPositionenAussenflaeche := TFloatField.Create(Self);\r\n dsPositionenLadeort := TStringField.Create(Self);\r\n dsPositionenSeitenumbruch := TBooleanField.Create(Self);\r\n dsPositionenPlanerFarbe := TIntegerField.Create(Self);\r\n dsPositionenMWStKey := TIntegerField.Create(Self);\r\n dsPositionenZSnachPos := TBooleanField.Create(Self);\r\n dsPositionenLieferzeit := TStringField.Create(Self);\r\n dsPositionenPreisVorRabattWHG := TFloatField.Create(Self);\r\n dsPositionenReferenzKalkulation := TStringField.Create(Self);\r\n dsPositionenPKey := TIntegerField.Create(Self);\r\n dsPositionenAuftragsnummer := TStringField.Create(Self);\r\n dsPositionenlwbID := TStringField.Create(Self);\r\n dsPositionenBelegdatum := TDateTimeField.Create(Self);\r\n dsPositionenWarenkontrollnummern := TStringField.Create(Self);\r\n dsPositionenVolumen := TFloatField.Create(Self);\r\n dsPositionenPosVolumen := TFloatField.Create(Self);\r\n dsPositionenArtikelAttribute := TStringField.Create(Self);\r\n dsPositionenMonteurP := TIntegerField.Create(Self);\r\n dsPositionenArbeitszeitDatum := TDateTimeField.Create(Self);\r\n dsPositionenArbeitszeitVON := TDateTimeField.Create(Self);\r\n dsPositionenArbeitszeitBIS := TDateTimeField.Create(Self);\r\n dsPositionenArtikelnummerArtikelnummer := TStringField.Create(Self);\r\n dsPositionenArtikelnummerArbeitszeit := TBooleanField.Create(Self);\r\n sourcePositionen := TDataSource.Create(Self);\r\n dsUnterschriften := TXDataWebDataSet.Create(Self);\r\n dsUnterschriftenNummerkomplett := TStringField.Create(Self);\r\n dsUnterschriftenDatum := TDateTimeField.Create(Self);\r\n dsUnterschriftenUnterschriftMonteur := TBlobField.Create(Self);\r\n dsUnterschriftenUnterschriftKunde := TBlobField.Create(Self);\r\n dsUnterschriftenUnterschriftMonteurText := TStringField.Create(Self);\r\n dsUnterschriftenUnterschriftKundeText := TStringField.Create(Self);\r\n sourceUnterschriften := TDataSource.Create(Self);\r\n dsSumBeleg := TXDataWebDataSet.Create(Self);\r\n dsSumBelegPosVolumen := TFloatField.Create(Self);\r\n dsSumBelegBruttoGewicht := TFloatField.Create(Self);\r\n dsSumBelegMehrwertsteuersatz := TFloatField.Create(Self);\r\n dsSumBelegEndpreis := TFloatField.Create(Self);\r\n dsSumBelegPosMWST := TFloatField.Create(Self);\r\n dsSumBelegBruttoEndpreis := TFloatField.Create(Self);\r\n dsSumBelegEndpreis_EK := TFloatField.Create(Self);\r\n dsSumBelegPKZ := TFloatField.Create(Self);\r\n WClient := TXDataWebClient.Create(Self);\r\n WebHttpRequest1 := THttpRequest.Create(Self);\r\n dsObjekt := TXDataWebDataSet.Create(Self);\r\n dsObjektObjektReferenz := TStringField.Create(Self);\r\n dsObjektKurzbezeichnung := TStringField.Create(Self);\r\n dsObjektObjektnummer := TStringField.Create(Self);\r\n dsDateien := TXDataWebDataSet.Create(Self);\r\n dsDateienID := TIntegerField.Create(Self);\r\n dsDateienDatumUhrzeit := TDateTimeField.Create(Self);\r\n dsDateienDateiBetreff := TStringField.Create(Self);\r\n dsDateienNummerkomplett := TStringField.Create(Self);\r\n\r\n TC.BeforeLoadDFMValues;\r\n Container1.BeforeLoadDFMValues;\r\n btnzurueck.BeforeLoadDFMValues;\r\n btnUnterschreiben.BeforeLoadDFMValues;\r\n btnPDF.BeforeLoadDFMValues;\r\n btnTermine.BeforeLoadDFMValues;\r\n Container3.BeforeLoadDFMValues;\r\n Container2.BeforeLoadDFMValues;\r\n PTC.BeforeLoadDFMValues;\r\n btnSpeichern.BeforeLoadDFMValues;\r\n pickLieferdatum.BeforeLoadDFMValues;\r\n edtAuftragsbezeichnung.BeforeLoadDFMValues;\r\n edtLiefertermin.BeforeLoadDFMValues;\r\n btnNeuePosition.BeforeLoadDFMValues;\r\n Container4.BeforeLoadDFMValues;\r\n webDBComboAuftragStatus.BeforeLoadDFMValues;\r\n belegComboMonteur.BeforeLoadDFMValues;\r\n belegMemoServiceBemerkung.BeforeLoadDFMValues;\r\n btnPDFSenden.BeforeLoadDFMValues;\r\n edtEmail.BeforeLoadDFMValues;\r\n btnPZE_A.BeforeLoadDFMValues;\r\n btnPZE_O.BeforeLoadDFMValues;\r\n btnDateien.BeforeLoadDFMValues;\r\n btnDateienObjekt.BeforeLoadDFMValues;\r\n btnDateienKontakt.BeforeLoadDFMValues;\r\n dsBeleg.BeforeLoadDFMValues;\r\n dsBelegKundennummer.BeforeLoadDFMValues;\r\n dsBelegNummerkomplett.BeforeLoadDFMValues;\r\n dsBelegReferenzAngebot.BeforeLoadDFMValues;\r\n dsBelegReferenzLieferschein.BeforeLoadDFMValues;\r\n dsBelegReferenzRechnung.BeforeLoadDFMValues;\r\n dsBelegDatum.BeforeLoadDFMValues;\r\n dsBelegJahr.BeforeLoadDFMValues;\r\n dsBelegKalenderwoche.BeforeLoadDFMValues;\r\n dsBelegNachname.BeforeLoadDFMValues;\r\n dsBelegVorname.BeforeLoadDFMValues;\r\n dsBelegPostleitzahl.BeforeLoadDFMValues;\r\n dsBelegOrt.BeforeLoadDFMValues;\r\n dsBelegLaenderkuerzel.BeforeLoadDFMValues;\r\n dsBelegLand.BeforeLoadDFMValues;\r\n dsBelegBriefanrede1.BeforeLoadDFMValues;\r\n dsBelegBriefanrede2.BeforeLoadDFMValues;\r\n dsBelegEMail.BeforeLoadDFMValues;\r\n dsBelegAdresseBild.BeforeLoadDFMValues;\r\n dsBelegLieferanschriftBild.BeforeLoadDFMValues;\r\n dsBelegZahlungsbedingung.BeforeLoadDFMValues;\r\n dsBelegZahlungsbedingungText.BeforeLoadDFMValues;\r\n dsBelegAuftragsbezeichnung.BeforeLoadDFMValues;\r\n dsBelegAuftragnummerKunde.BeforeLoadDFMValues;\r\n dsBelegBestelldatumKunde.BeforeLoadDFMValues;\r\n dsBelegILN.BeforeLoadDFMValues;\r\n dsBelegKopftext.BeforeLoadDFMValues;\r\n dsBelegSchlussbemerkung.BeforeLoadDFMValues;\r\n dsBelegGruss.BeforeLoadDFMValues;\r\n dsBelegMehrwertsteuersatz1.BeforeLoadDFMValues;\r\n dsBelegMehrwertsteuersatz2.BeforeLoadDFMValues;\r\n dsBelegNettosumme01.BeforeLoadDFMValues;\r\n dsBelegNettosumme02.BeforeLoadDFMValues;\r\n dsBelegNettosumme.BeforeLoadDFMValues;\r\n dsBelegMehrwertsteuer01.BeforeLoadDFMValues;\r\n dsBelegMehrwertsteuer02.BeforeLoadDFMValues;\r\n dsBelegMehrwertsteuer.BeforeLoadDFMValues;\r\n dsBelegBruttosumme.BeforeLoadDFMValues;\r\n dsBelegVersanddatum.BeforeLoadDFMValues;\r\n dsBelegSkontosatz.BeforeLoadDFMValues;\r\n dsBelegNettosummeEK.BeforeLoadDFMValues;\r\n dsBelegNettoMarge.BeforeLoadDFMValues;\r\n dsBelegSchreibzeichen.BeforeLoadDFMValues;\r\n dsBelegUnterzeichner.BeforeLoadDFMValues;\r\n dsBelegTelefonMA.BeforeLoadDFMValues;\r\n dsBelegEmailMA.BeforeLoadDFMValues;\r\n dsBelegUSTID.BeforeLoadDFMValues;\r\n dsBelegUmsatzsteuerausweis.BeforeLoadDFMValues;\r\n dsBeleggebucht.BeforeLoadDFMValues;\r\n dsBelegLieferdatum.BeforeLoadDFMValues;\r\n dsBelegTransportbedingung.BeforeLoadDFMValues;\r\n dsBelegMehrwertsteuersatz3.BeforeLoadDFMValues;\r\n dsBelegMehrwertsteuer03.BeforeLoadDFMValues;\r\n dsBelegNettosumme03.BeforeLoadDFMValues;\r\n dsBelegRundungsDifferenz.BeforeLoadDFMValues;\r\n dsBelegEmailText.BeforeLoadDFMValues;\r\n dsBelegAuftragerledigt.BeforeLoadDFMValues;\r\n dsBelegRabattstufe.BeforeLoadDFMValues;\r\n dsBelegKFZKennzeichen.BeforeLoadDFMValues;\r\n dsBelegFahrgestellnummer.BeforeLoadDFMValues;\r\n dsBelegKFZHersteller.BeforeLoadDFMValues;\r\n dsBelegErstzulassungsdatum.BeforeLoadDFMValues;\r\n dsBelegKMStand.BeforeLoadDFMValues;\r\n dsBelegKFZType.BeforeLoadDFMValues;\r\n dsBelegInspektionsdatum.BeforeLoadDFMValues;\r\n dsBelegDebitorennummer.BeforeLoadDFMValues;\r\n dsBelegKostentraeger.BeforeLoadDFMValues;\r\n dsBelegRabattsatz.BeforeLoadDFMValues;\r\n dsBelegObjektReferenz.BeforeLoadDFMValues;\r\n dsBelegBank.BeforeLoadDFMValues;\r\n dsBelegBankleitzahl.BeforeLoadDFMValues;\r\n dsBelegKontonummer.BeforeLoadDFMValues;\r\n dsBelegKontoinhaber.BeforeLoadDFMValues;\r\n dsBelegTelefaxnummer.BeforeLoadDFMValues;\r\n dsBelegDatumNeu.BeforeLoadDFMValues;\r\n dsBelegDatumgeaendert.BeforeLoadDFMValues;\r\n dsBelegObjektnummer.BeforeLoadDFMValues;\r\n dsBelegLiefertermin.BeforeLoadDFMValues;\r\n dsBelegEmailversand.BeforeLoadDFMValues;\r\n dsBelegTelefonnummer.BeforeLoadDFMValues;\r\n dsBelegMobilTelefon.BeforeLoadDFMValues;\r\n dsBelegAuftragFax.BeforeLoadDFMValues;\r\n dsBelegREDatum.BeforeLoadDFMValues;\r\n dsBelegBenutzerNeu.BeforeLoadDFMValues;\r\n dsBelegBenutzerGeaendert.BeforeLoadDFMValues;\r\n dsBelegBerechnungBrutto.BeforeLoadDFMValues;\r\n dsBelegBruttosumme01.BeforeLoadDFMValues;\r\n dsBelegBruttosumme02.BeforeLoadDFMValues;\r\n dsBelegBruttosumme03.BeforeLoadDFMValues;\r\n dsBelegNotiz.BeforeLoadDFMValues;\r\n dsBelegMargeProzent.BeforeLoadDFMValues;\r\n dsBelegWarenkreditgesperrt.BeforeLoadDFMValues;\r\n dsBelegBelegsprache.BeforeLoadDFMValues;\r\n dsBelegDuplicate.BeforeLoadDFMValues;\r\n dsBelegperEmail.BeforeLoadDFMValues;\r\n dsBelegAnsprechpartner.BeforeLoadDFMValues;\r\n dsBelegKundennummerFremd.BeforeLoadDFMValues;\r\n dsBelegProtokoll.BeforeLoadDFMValues;\r\n dsBelegVerleihauftrag.BeforeLoadDFMValues;\r\n dsBelegVerleihVon.BeforeLoadDFMValues;\r\n dsBelegVerleihBis.BeforeLoadDFMValues;\r\n dsBelegAuftragGenehmigt.BeforeLoadDFMValues;\r\n dsBeleggesperrt.BeforeLoadDFMValues;\r\n dsBelegVerleihvonText.BeforeLoadDFMValues;\r\n dsBelegVerleihbisText.BeforeLoadDFMValues;\r\n dsBelegDruckWHG.BeforeLoadDFMValues;\r\n dsBelegDruckWHGKurs.BeforeLoadDFMValues;\r\n dsBelegProzentsatzZusatzposition.BeforeLoadDFMValues;\r\n dsBelegTextZusatzposition.BeforeLoadDFMValues;\r\n dsBelegTextzusatzBeschreibung.BeforeLoadDFMValues;\r\n dsBelegLayoutname.BeforeLoadDFMValues;\r\n dsBelegGesamtgewicht.BeforeLoadDFMValues;\r\n dsBelegBetragZusatzposition.BeforeLoadDFMValues;\r\n dsBelegReferenzBestellung.BeforeLoadDFMValues;\r\n dsBelegTermin1.BeforeLoadDFMValues;\r\n dsBelegTermin2.BeforeLoadDFMValues;\r\n dsBelegZielkontaktnummer.BeforeLoadDFMValues;\r\n dsBelegZielkontaktname.BeforeLoadDFMValues;\r\n dsBelegBilddatei1.BeforeLoadDFMValues;\r\n dsBelegBilddatei2.BeforeLoadDFMValues;\r\n dsBelegZielkontaktnummer2.BeforeLoadDFMValues;\r\n dsBelegZielkontaktname2.BeforeLoadDFMValues;\r\n dsBelegbestaetigt.BeforeLoadDFMValues;\r\n dsBelegZielkontaktnummer3.BeforeLoadDFMValues;\r\n dsBelegZielkontaktname3.BeforeLoadDFMValues;\r\n dsBelegTermin3.BeforeLoadDFMValues;\r\n dsBelegTermin4.BeforeLoadDFMValues;\r\n dsBelegMuster.BeforeLoadDFMValues;\r\n dsBelegKW.BeforeLoadDFMValues;\r\n dsBelegDatenlink.BeforeLoadDFMValues;\r\n dsBelegMehrwertsteuersatz4.BeforeLoadDFMValues;\r\n dsBelegMehrwertsteuersatz5.BeforeLoadDFMValues;\r\n dsBelegMehrwertsteuersatz6.BeforeLoadDFMValues;\r\n dsBelegBesteuerungKey.BeforeLoadDFMValues;\r\n dsBelegVertreterMatchcode.BeforeLoadDFMValues;\r\n dsBelegVerfasser.BeforeLoadDFMValues;\r\n dsBelegLieferadresseID.BeforeLoadDFMValues;\r\n dsBelegAuftragStatus.BeforeLoadDFMValues;\r\n dsBelegMonatJahr.BeforeLoadDFMValues;\r\n dsBelegBelegvariante.BeforeLoadDFMValues;\r\n dsBelegProduktionsfreigabe.BeforeLoadDFMValues;\r\n dsBelegReferenzRahmenAuftrag.BeforeLoadDFMValues;\r\n dsBelegDatumRahmenAuftrag.BeforeLoadDFMValues;\r\n dsBelegFahrzeugID.BeforeLoadDFMValues;\r\n dsBelegAuslieferungKW.BeforeLoadDFMValues;\r\n dsBelegBereitstellungDatum.BeforeLoadDFMValues;\r\n dsBelegVTUID.BeforeLoadDFMValues;\r\n dsBelegLieferanschriftDaten.BeforeLoadDFMValues;\r\n dsBelegGesamtVolumen.BeforeLoadDFMValues;\r\n dsBelegBelegPKey.BeforeLoadDFMValues;\r\n dsBelegDruckParameter.BeforeLoadDFMValues;\r\n dsBelegReferenzService.BeforeLoadDFMValues;\r\n dsBelegZusatzDaten.BeforeLoadDFMValues;\r\n dsBelegStandPDF.BeforeLoadDFMValues;\r\n dsBelegPaketdienst.BeforeLoadDFMValues;\r\n dsBelegMonteur.BeforeLoadDFMValues;\r\n dsBelegKundennummerKundennummer.BeforeLoadDFMValues;\r\n dsBelegServiceBemerkung.BeforeLoadDFMValues;\r\n SourceBeleg.BeforeLoadDFMValues;\r\n dsPositionen.BeforeLoadDFMValues;\r\n dsPositionenArtikelnummer.BeforeLoadDFMValues;\r\n dsPositionenNummerkomplett.BeforeLoadDFMValues;\r\n dsPositionenID.BeforeLoadDFMValues;\r\n dsPositionenPosNr.BeforeLoadDFMValues;\r\n dsPositionenPosUNr.BeforeLoadDFMValues;\r\n dsPositionenSumme.BeforeLoadDFMValues;\r\n dsPositionenArtikelueberschrift.BeforeLoadDFMValues;\r\n dsPositionenArtikelbeschreibung.BeforeLoadDFMValues;\r\n dsPositionenMenge.BeforeLoadDFMValues;\r\n dsPositionenArtderMenge.BeforeLoadDFMValues;\r\n dsPositionenVerkaufspreis.BeforeLoadDFMValues;\r\n dsPositionenEinkaufspreis.BeforeLoadDFMValues;\r\n dsPositionenSeriennummer.BeforeLoadDFMValues;\r\n dsPositionenWarengruppe.BeforeLoadDFMValues;\r\n dsPositionenWarenuntergruppe.BeforeLoadDFMValues;\r\n dsPositionenArtikelnummerKunde.BeforeLoadDFMValues;\r\n dsPositionenLieferant.BeforeLoadDFMValues;\r\n dsPositionenGewicht.BeforeLoadDFMValues;\r\n dsPositionenLaenge.BeforeLoadDFMValues;\r\n dsPositionenBreite.BeforeLoadDFMValues;\r\n dsPositionenHoehe.BeforeLoadDFMValues;\r\n dsPositionenMehrwertsteuersatz.BeforeLoadDFMValues;\r\n dsPositionenEndpreis.BeforeLoadDFMValues;\r\n dsPositionenPosMWST.BeforeLoadDFMValues;\r\n dsPositionenBruttoEndpreis.BeforeLoadDFMValues;\r\n dsPositionenEndpreis_EK.BeforeLoadDFMValues;\r\n dsPositionenRabattsatz.BeforeLoadDFMValues;\r\n dsPositionenPreisvorRabatt.BeforeLoadDFMValues;\r\n dsPositionenPKZ.BeforeLoadDFMValues;\r\n dsPositionenTextfrei10.BeforeLoadDFMValues;\r\n dsPositionenTextfrei20.BeforeLoadDFMValues;\r\n dsPositionenProduktionAbgeschlossen.BeforeLoadDFMValues;\r\n dsPositionenEinzelpreisBrutto.BeforeLoadDFMValues;\r\n dsPositionenPosMarge.BeforeLoadDFMValues;\r\n dsPositionenPosMargeProzent.BeforeLoadDFMValues;\r\n dsPositionenBereitsGeliefert.BeforeLoadDFMValues;\r\n dsPositionenausliefern.BeforeLoadDFMValues;\r\n dsPositionenBestellungErledigt.BeforeLoadDFMValues;\r\n dsPositionenLager.BeforeLoadDFMValues;\r\n dsPositionenbestellen.BeforeLoadDFMValues;\r\n dsPositionenWarenbestand.BeforeLoadDFMValues;\r\n dsPositionenArtikelbeschreibungRTF.BeforeLoadDFMValues;\r\n dsPositionenQuellartikel.BeforeLoadDFMValues;\r\n dsPositionenArtikelnummerWB.BeforeLoadDFMValues;\r\n dsPositionenPreisanteilNetto.BeforeLoadDFMValues;\r\n dsPositionenSetHPos.BeforeLoadDFMValues;\r\n dsPositionenSetUPos.BeforeLoadDFMValues;\r\n dsPositionenProvisionssatz.BeforeLoadDFMValues;\r\n dsPositionenProvisionsbetrag.BeforeLoadDFMValues;\r\n dsPositionenArtikelsprache.BeforeLoadDFMValues;\r\n dsPositionenEKvom.BeforeLoadDFMValues;\r\n dsPositionenMengenberechnungID.BeforeLoadDFMValues;\r\n dsPositionenTaraID.BeforeLoadDFMValues;\r\n dsPositionenTara.BeforeLoadDFMValues;\r\n dsPositionenBruttoGewicht.BeforeLoadDFMValues;\r\n dsPositionenAussenflaeche.BeforeLoadDFMValues;\r\n dsPositionenLadeort.BeforeLoadDFMValues;\r\n dsPositionenSeitenumbruch.BeforeLoadDFMValues;\r\n dsPositionenPlanerFarbe.BeforeLoadDFMValues;\r\n dsPositionenMWStKey.BeforeLoadDFMValues;\r\n dsPositionenZSnachPos.BeforeLoadDFMValues;\r\n dsPositionenLieferzeit.BeforeLoadDFMValues;\r\n dsPositionenPreisVorRabattWHG.BeforeLoadDFMValues;\r\n dsPositionenReferenzKalkulation.BeforeLoadDFMValues;\r\n dsPositionenPKey.BeforeLoadDFMValues;\r\n dsPositionenAuftragsnummer.BeforeLoadDFMValues;\r\n dsPositionenlwbID.BeforeLoadDFMValues;\r\n dsPositionenBelegdatum.BeforeLoadDFMValues;\r\n dsPositionenWarenkontrollnummern.BeforeLoadDFMValues;\r\n dsPositionenVolumen.BeforeLoadDFMValues;\r\n dsPositionenPosVolumen.BeforeLoadDFMValues;\r\n dsPositionenArtikelAttribute.BeforeLoadDFMValues;\r\n dsPositionenMonteurP.BeforeLoadDFMValues;\r\n dsPositionenArbeitszeitDatum.BeforeLoadDFMValues;\r\n dsPositionenArbeitszeitVON.BeforeLoadDFMValues;\r\n dsPositionenArbeitszeitBIS.BeforeLoadDFMValues;\r\n dsPositionenArtikelnummerArtikelnummer.BeforeLoadDFMValues;\r\n dsPositionenArtikelnummerArbeitszeit.BeforeLoadDFMValues;\r\n sourcePositionen.BeforeLoadDFMValues;\r\n dsUnterschriften.BeforeLoadDFMValues;\r\n dsUnterschriftenNummerkomplett.BeforeLoadDFMValues;\r\n dsUnterschriftenDatum.BeforeLoadDFMValues;\r\n dsUnterschriftenUnterschriftMonteur.BeforeLoadDFMValues;\r\n dsUnterschriftenUnterschriftKunde.BeforeLoadDFMValues;\r\n dsUnterschriftenUnterschriftMonteurText.BeforeLoadDFMValues;\r\n dsUnterschriftenUnterschriftKundeText.BeforeLoadDFMValues;\r\n sourceUnterschriften.BeforeLoadDFMValues;\r\n dsSumBeleg.BeforeLoadDFMValues;\r\n dsSumBelegPosVolumen.BeforeLoadDFMValues;\r\n dsSumBelegBruttoGewicht.BeforeLoadDFMValues;\r\n dsSumBelegMehrwertsteuersatz.BeforeLoadDFMValues;\r\n dsSumBelegEndpreis.BeforeLoadDFMValues;\r\n dsSumBelegPosMWST.BeforeLoadDFMValues;\r\n dsSumBelegBruttoEndpreis.BeforeLoadDFMValues;\r\n dsSumBelegEndpreis_EK.BeforeLoadDFMValues;\r\n dsSumBelegPKZ.BeforeLoadDFMValues;\r\n WClient.BeforeLoadDFMValues;\r\n WebHttpRequest1.BeforeLoadDFMValues;\r\n dsObjekt.BeforeLoadDFMValues;\r\n dsObjektObjektReferenz.BeforeLoadDFMValues;\r\n dsObjektKurzbezeichnung.BeforeLoadDFMValues;\r\n dsObjektObjektnummer.BeforeLoadDFMValues;\r\n dsDateien.BeforeLoadDFMValues;\r\n dsDateienID.BeforeLoadDFMValues;\r\n dsDateienDatumUhrzeit.BeforeLoadDFMValues;\r\n dsDateienDateiBetreff.BeforeLoadDFMValues;\r\n dsDateienNummerkomplett.BeforeLoadDFMValues;\r\n try\r\n Name := 'EinzelAuftrag';\r\n Width := 264;\r\n Height := 484;\r\n CSSLibrary := cssBootstrap;\r\n ElementFont := efCSS;\r\n ElementPosition := epIgnore;\r\n SetEvent(Self, 'OnClose', 'WebFormClose');\r\n SetEvent(Self, 'OnCloseQuery', 'WebFormCloseQuery');\r\n SetEvent(Self, 'OnCreate', 'WebFormCreate');\r\n SetEvent(Self, 'OnHashChange', 'WebFormHashChange');\r\n SetEvent(Self, 'OnShow', 'WebFormShow');\r\n TC.SetParentComponent(Self);\r\n TC.Name := 'TC';\r\n TC.Left := 0;\r\n TC.Top := 173;\r\n TC.Width := 236;\r\n TC.Height := 62;\r\n TC.ElementClassName := 'table table-sm table-hover table-bordered table-striped';\r\n TC.HeightStyle := ssAuto;\r\n TC.WidthStyle := ssAuto;\r\n TC.BorderColor := clSilver;\r\n TC.ChildOrder := 5;\r\n TC.ColHeader := False;\r\n TC.ElementHeaderClassName := 'table-info';\r\n TC.ElementPosition := epIgnore;\r\n TC.ElementTableClassName := 'table table-sm table-hover table-bordered table-striped';\r\n TC.WordWrap := True;\r\n TC.ColCount := 2;\r\n TC.RowCount := 17;\r\n Container1.SetParentComponent(Self);\r\n Container1.Name := 'Container1';\r\n Container1.Left := 0;\r\n Container1.Top := 0;\r\n Container1.Width := 264;\r\n Container1.Height := 41;\r\n Container1.HeightStyle := ssAuto;\r\n Container1.WidthStyle := ssPercent;\r\n Container1.Align := alTop;\r\n Container1.ElementFont := efCSS;\r\n Container1.ElementPosition := epIgnore;\r\n btnzurueck.SetParentComponent(Self);\r\n btnzurueck.Name := 'btnzurueck';\r\n btnzurueck.Left := 0;\r\n btnzurueck.Top := 88;\r\n btnzurueck.Width := 96;\r\n btnzurueck.Height := 25;\r\n btnzurueck.Caption := '<< zur'#252'ck';\r\n btnzurueck.ChildOrder := 4;\r\n btnzurueck.ElementClassName := 'btn btn-info btn-sm m-1 text-left';\r\n btnzurueck.ElementFont := efCSS;\r\n btnzurueck.ElementPosition := epIgnore;\r\n btnzurueck.HeightStyle := ssAuto;\r\n btnzurueck.HeightPercent := 100.000000000000000000;\r\n btnzurueck.WidthStyle := ssAuto;\r\n btnzurueck.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnzurueck, Self, 'OnClick', 'btnzurueckClick');\r\n btnUnterschreiben.SetParentComponent(Self);\r\n btnUnterschreiben.Name := 'btnUnterschreiben';\r\n btnUnterschreiben.Left := 239;\r\n btnUnterschreiben.Top := 88;\r\n btnUnterschreiben.Width := 96;\r\n btnUnterschreiben.Height := 25;\r\n btnUnterschreiben.Caption := 'unterschreiben';\r\n btnUnterschreiben.ChildOrder := 4;\r\n btnUnterschreiben.ElementClassName := 'btn btn-info btn-sm m-1 text-left';\r\n btnUnterschreiben.ElementFont := efCSS;\r\n btnUnterschreiben.ElementPosition := epIgnore;\r\n btnUnterschreiben.HeightStyle := ssAuto;\r\n btnUnterschreiben.HeightPercent := 100.000000000000000000;\r\n btnUnterschreiben.WidthStyle := ssAuto;\r\n btnUnterschreiben.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnUnterschreiben, Self, 'OnClick', 'btnUnterschreibenClick');\r\n btnPDF.SetParentComponent(Self);\r\n btnPDF.Name := 'btnPDF';\r\n btnPDF.Left := 341;\r\n btnPDF.Top := 88;\r\n btnPDF.Width := 96;\r\n btnPDF.Height := 25;\r\n btnPDF.Caption := 'PDF';\r\n btnPDF.ChildOrder := 4;\r\n btnPDF.ElementClassName := 'btn btn-info btn-sm m-1 text-left';\r\n btnPDF.ElementFont := efCSS;\r\n btnPDF.ElementPosition := epIgnore;\r\n btnPDF.HeightStyle := ssAuto;\r\n btnPDF.HeightPercent := 100.000000000000000000;\r\n btnPDF.WidthStyle := ssAuto;\r\n btnPDF.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnPDF, Self, 'OnClick', 'btnPDFClick');\r\n btnTermine.SetParentComponent(Self);\r\n btnTermine.Name := 'btnTermine';\r\n btnTermine.Left := 443;\r\n btnTermine.Top := 88;\r\n btnTermine.Width := 96;\r\n btnTermine.Height := 25;\r\n btnTermine.Caption := 'Termine';\r\n btnTermine.ChildOrder := 4;\r\n btnTermine.ElementClassName := 'btn btn-info btn-sm m-1 text-left';\r\n btnTermine.ElementFont := efCSS;\r\n btnTermine.ElementPosition := epIgnore;\r\n btnTermine.HeightStyle := ssAuto;\r\n btnTermine.HeightPercent := 100.000000000000000000;\r\n btnTermine.WidthStyle := ssAuto;\r\n btnTermine.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnTermine, Self, 'OnClick', 'btnTermineClick');\r\n Container3.SetParentComponent(Self);\r\n Container3.Name := 'Container3';\r\n Container3.Left := 0;\r\n Container3.Top := 82;\r\n Container3.Width := 264;\r\n Container3.Height := 41;\r\n Container3.ElementClassName := 'd-flex flex-column m-1';\r\n Container3.HeightStyle := ssAuto;\r\n Container3.WidthStyle := ssAuto;\r\n Container3.Align := alTop;\r\n Container3.ChildOrder := 2;\r\n Container3.ElementFont := efCSS;\r\n Container3.ElementPosition := epIgnore;\r\n Container2.SetParentComponent(Self);\r\n Container2.Name := 'Container2';\r\n Container2.Left := 0;\r\n Container2.Top := 41;\r\n Container2.Width := 264;\r\n Container2.Height := 41;\r\n Container2.ElementClassName := 'd-flex flex-wrap m-1';\r\n Container2.HeightStyle := ssAuto;\r\n Container2.WidthStyle := ssAuto;\r\n Container2.Align := alTop;\r\n Container2.ChildOrder := 1;\r\n Container2.ElementFont := efCSS;\r\n Container2.ElementPosition := epIgnore;\r\n PTC.SetParentComponent(Self);\r\n PTC.Name := 'PTC';\r\n PTC.Left := 0;\r\n PTC.Top := 241;\r\n PTC.Width := 236;\r\n PTC.Height := 80;\r\n PTC.ElementClassName := 'table table-hover table-bordered table-striped';\r\n PTC.HeightStyle := ssAuto;\r\n PTC.WidthStyle := ssAuto;\r\n PTC.BorderColor := clSilver;\r\n PTC.ChildOrder := 6;\r\n PTC.ElementHeaderClassName := 'table-info';\r\n PTC.ElementPosition := epIgnore;\r\n PTC.ElementTableClassName := 'table table-hover table-bordered table-striped';\r\n PTC.WordWrap := True;\r\n PTC.ColCount := 2;\r\n btnSpeichern.SetParentComponent(Self);\r\n btnSpeichern.Name := 'btnSpeichern';\r\n btnSpeichern.Left := 8;\r\n btnSpeichern.Top := 280;\r\n btnSpeichern.Width := 96;\r\n btnSpeichern.Height := 25;\r\n btnSpeichern.Caption := 'speichern';\r\n btnSpeichern.ChildOrder := 4;\r\n btnSpeichern.ElementClassName := 'btn btn-info btn-sm m-1 text-left';\r\n btnSpeichern.ElementFont := efCSS;\r\n btnSpeichern.ElementPosition := epIgnore;\r\n btnSpeichern.HeightStyle := ssAuto;\r\n btnSpeichern.HeightPercent := 100.000000000000000000;\r\n btnSpeichern.WidthStyle := ssAuto;\r\n btnSpeichern.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnSpeichern, Self, 'OnClick', 'btnSpeichernClick');\r\n pickLieferdatum.SetParentComponent(Self);\r\n pickLieferdatum.Name := 'pickLieferdatum';\r\n pickLieferdatum.Left := 8;\r\n pickLieferdatum.Top := 342;\r\n pickLieferdatum.Width := 170;\r\n pickLieferdatum.Height := 22;\r\n pickLieferdatum.ElementClassName := 'form-control';\r\n pickLieferdatum.HeightStyle := ssAuto;\r\n pickLieferdatum.WidthStyle := ssPercent;\r\n pickLieferdatum.WidthPercent := 75.000000000000000000;\r\n pickLieferdatum.BorderStyle := bsSingle;\r\n pickLieferdatum.ChildOrder := 1;\r\n pickLieferdatum.Color := clWhite;\r\n pickLieferdatum.Date := 44128.305122870370000000;\r\n pickLieferdatum.ElementFont := efCSS;\r\n pickLieferdatum.ElementPosition := epIgnore;\r\n pickLieferdatum.Role := '';\r\n pickLieferdatum.Text := '';\r\n SetEvent(pickLieferdatum, Self, 'OnClick', 'pickLieferdatumClick');\r\n pickLieferdatum.DataField := 'Lieferdatum';\r\n pickLieferdatum.DataSource := SourceBeleg;\r\n edtAuftragsbezeichnung.SetParentComponent(Self);\r\n edtAuftragsbezeichnung.Name := 'edtAuftragsbezeichnung';\r\n edtAuftragsbezeichnung.Left := 8;\r\n edtAuftragsbezeichnung.Top := 370;\r\n edtAuftragsbezeichnung.Width := 121;\r\n edtAuftragsbezeichnung.Height := 22;\r\n edtAuftragsbezeichnung.AutoCompletion := acNone;\r\n edtAuftragsbezeichnung.ElementClassName := 'form-control form-control-sm';\r\n edtAuftragsbezeichnung.ElementFont := efCSS;\r\n edtAuftragsbezeichnung.ElementPosition := epIgnore;\r\n edtAuftragsbezeichnung.HeightStyle := ssAuto;\r\n edtAuftragsbezeichnung.HeightPercent := 100.000000000000000000;\r\n edtAuftragsbezeichnung.HideSelection := False;\r\n edtAuftragsbezeichnung.ShowFocus := False;\r\n edtAuftragsbezeichnung.TextHint := 'Auftragsbezeichnung';\r\n edtAuftragsbezeichnung.WidthStyle := ssPercent;\r\n edtAuftragsbezeichnung.WidthPercent := 75.000000000000000000;\r\n edtAuftragsbezeichnung.DataField := 'Auftragsbezeichnung';\r\n edtAuftragsbezeichnung.DataSource := SourceBeleg;\r\n edtLiefertermin.SetParentComponent(Self);\r\n edtLiefertermin.Name := 'edtLiefertermin';\r\n edtLiefertermin.Left := 8;\r\n edtLiefertermin.Top := 398;\r\n edtLiefertermin.Width := 121;\r\n edtLiefertermin.Height := 22;\r\n edtLiefertermin.AutoSelect := False;\r\n edtLiefertermin.ChildOrder := 2;\r\n edtLiefertermin.ElementClassName := 'form-control';\r\n edtLiefertermin.ElementFont := efCSS;\r\n edtLiefertermin.ElementPosition := epIgnore;\r\n edtLiefertermin.HeightStyle := ssAuto;\r\n edtLiefertermin.HeightPercent := 100.000000000000000000;\r\n edtLiefertermin.TextHint := 'Lieferzeitraum';\r\n edtLiefertermin.WidthStyle := ssPercent;\r\n edtLiefertermin.WidthPercent := 75.000000000000000000;\r\n edtLiefertermin.DataField := 'Liefertermin';\r\n edtLiefertermin.DataSource := SourceBeleg;\r\n btnNeuePosition.SetParentComponent(Self);\r\n btnNeuePosition.Name := 'btnNeuePosition';\r\n btnNeuePosition.Left := 8;\r\n btnNeuePosition.Top := 311;\r\n btnNeuePosition.Width := 96;\r\n btnNeuePosition.Height := 25;\r\n btnNeuePosition.Caption := '+ NEU';\r\n btnNeuePosition.ChildOrder := 4;\r\n btnNeuePosition.ElementClassName := 'btn btn-info btn-sm m-1 text-left';\r\n btnNeuePosition.ElementFont := efCSS;\r\n btnNeuePosition.ElementPosition := epIgnore;\r\n btnNeuePosition.HeightStyle := ssAuto;\r\n btnNeuePosition.HeightPercent := 100.000000000000000000;\r\n btnNeuePosition.WidthStyle := ssAuto;\r\n btnNeuePosition.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnNeuePosition, Self, 'OnClick', 'btnNeuePositionClick');\r\n Container4.SetParentComponent(Self);\r\n Container4.Name := 'Container4';\r\n Container4.Left := 0;\r\n Container4.Top := 123;\r\n Container4.Width := 264;\r\n Container4.Height := 41;\r\n Container4.ElementClassName := 'd-flex flex-column m-1';\r\n Container4.HeightStyle := ssAuto;\r\n Container4.WidthStyle := ssAuto;\r\n Container4.Align := alTop;\r\n Container4.ChildOrder := 3;\r\n Container4.ElementFont := efCSS;\r\n Container4.ElementPosition := epIgnore;\r\n webDBComboAuftragStatus.SetParentComponent(Self);\r\n webDBComboAuftragStatus.Name := 'webDBComboAuftragStatus';\r\n webDBComboAuftragStatus.Left := 8;\r\n webDBComboAuftragStatus.Top := 424;\r\n webDBComboAuftragStatus.Width := 145;\r\n webDBComboAuftragStatus.Height := 23;\r\n webDBComboAuftragStatus.ChildOrder := 9;\r\n webDBComboAuftragStatus.ElementClassName := 'form-control w-75';\r\n webDBComboAuftragStatus.ElementFont := efCSS;\r\n webDBComboAuftragStatus.ElementPosition := epIgnore;\r\n webDBComboAuftragStatus.HeightStyle := ssAuto;\r\n webDBComboAuftragStatus.HeightPercent := 100.000000000000000000;\r\n webDBComboAuftragStatus.Text := 'webDBComboAuftragStatus';\r\n webDBComboAuftragStatus.WidthStyle := ssPercent;\r\n webDBComboAuftragStatus.WidthPercent := 75.000000000000000000;\r\n webDBComboAuftragStatus.ItemIndex := -1;\r\n webDBComboAuftragStatus.DataField := 'AuftragStatus';\r\n webDBComboAuftragStatus.DataSource := SourceBeleg;\r\n belegComboMonteur.SetParentComponent(Self);\r\n belegComboMonteur.Name := 'belegComboMonteur';\r\n belegComboMonteur.Left := 8;\r\n belegComboMonteur.Top := 448;\r\n belegComboMonteur.Width := 145;\r\n belegComboMonteur.Height := 23;\r\n belegComboMonteur.ChildOrder := 8;\r\n belegComboMonteur.ElementClassName := 'form-control w-75';\r\n belegComboMonteur.ElementFont := efCSS;\r\n belegComboMonteur.ElementPosition := epIgnore;\r\n belegComboMonteur.HeightStyle := ssAuto;\r\n belegComboMonteur.HeightPercent := 100.000000000000000000;\r\n belegComboMonteur.Text := 'belegComboMonteur';\r\n belegComboMonteur.WidthStyle := ssPercent;\r\n belegComboMonteur.WidthPercent := 75.000000000000000000;\r\n SetEvent(belegComboMonteur, Self, 'OnEnter', 'belegComboMonteurEnter');\r\n belegComboMonteur.ItemIndex := -1;\r\n belegMemoServiceBemerkung.SetParentComponent(Self);\r\n belegMemoServiceBemerkung.Name := 'belegMemoServiceBemerkung';\r\n belegMemoServiceBemerkung.Left := 175;\r\n belegMemoServiceBemerkung.Top := 342;\r\n belegMemoServiceBemerkung.Width := 18;\r\n belegMemoServiceBemerkung.Height := 80;\r\n belegMemoServiceBemerkung.BorderStyle := bsNone;\r\n belegMemoServiceBemerkung.ChildOrder := 10;\r\n belegMemoServiceBemerkung.ElementClassName := 'form-control form-control-sm';\r\n belegMemoServiceBemerkung.ElementFont := efCSS;\r\n belegMemoServiceBemerkung.ElementPosition := epIgnore;\r\n belegMemoServiceBemerkung.HeightPercent := 100.000000000000000000;\r\n belegMemoServiceBemerkung.SelLength := 0;\r\n belegMemoServiceBemerkung.SelStart := 0;\r\n belegMemoServiceBemerkung.WidthStyle := ssPercent;\r\n belegMemoServiceBemerkung.WidthPercent := 75.000000000000000000;\r\n belegMemoServiceBemerkung.DataField := 'ServiceBemerkung';\r\n belegMemoServiceBemerkung.DataSource := SourceBeleg;\r\n btnPDFSenden.SetParentComponent(Self);\r\n btnPDFSenden.Name := 'btnPDFSenden';\r\n btnPDFSenden.Left := 120;\r\n btnPDFSenden.Top := 311;\r\n btnPDFSenden.Width := 49;\r\n btnPDFSenden.Height := 25;\r\n btnPDFSenden.Caption := '@';\r\n btnPDFSenden.ChildOrder := 4;\r\n btnPDFSenden.ElementClassName := 'btn btn-info btn-sm m-1 text-left';\r\n btnPDFSenden.ElementFont := efCSS;\r\n btnPDFSenden.ElementPosition := epIgnore;\r\n btnPDFSenden.HeightStyle := ssAuto;\r\n btnPDFSenden.HeightPercent := 100.000000000000000000;\r\n btnPDFSenden.WidthStyle := ssAuto;\r\n btnPDFSenden.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnPDFSenden, Self, 'OnClick', 'btnPDFSendenClick');\r\n edtEmail.SetParentComponent(Self);\r\n edtEmail.Name := 'edtEmail';\r\n edtEmail.Left := 135;\r\n edtEmail.Top := 428;\r\n edtEmail.Width := 121;\r\n edtEmail.Height := 22;\r\n edtEmail.AutoCompletion := acNone;\r\n edtEmail.ChildOrder := 19;\r\n edtEmail.ElementClassName := 'form-control form-control-sm';\r\n edtEmail.ElementFont := efCSS;\r\n edtEmail.ElementPosition := epIgnore;\r\n edtEmail.HeightStyle := ssAuto;\r\n edtEmail.HeightPercent := 100.000000000000000000;\r\n edtEmail.HideSelection := False;\r\n edtEmail.ShowFocus := False;\r\n edtEmail.TextHint := 'Email';\r\n edtEmail.WidthStyle := ssPercent;\r\n edtEmail.WidthPercent := 75.000000000000000000;\r\n edtEmail.DataField := 'EMail';\r\n edtEmail.DataSource := SourceBeleg;\r\n btnPZE_A.SetParentComponent(Self);\r\n btnPZE_A.Name := 'btnPZE_A';\r\n btnPZE_A.Left := 175;\r\n btnPZE_A.Top := 311;\r\n btnPZE_A.Width := 50;\r\n btnPZE_A.Height := 25;\r\n btnPZE_A.Caption := 'PZE';\r\n btnPZE_A.ChildOrder := 4;\r\n btnPZE_A.ElementClassName := 'btn btn-info btn-sm m-1 text-left';\r\n btnPZE_A.ElementFont := efCSS;\r\n btnPZE_A.ElementPosition := epIgnore;\r\n btnPZE_A.HeightStyle := ssAuto;\r\n btnPZE_A.HeightPercent := 100.000000000000000000;\r\n btnPZE_A.WidthStyle := ssAuto;\r\n btnPZE_A.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnPZE_A, Self, 'OnClick', 'btnPZE_AClick');\r\n btnPZE_O.SetParentComponent(Self);\r\n btnPZE_O.Name := 'btnPZE_O';\r\n btnPZE_O.Left := 175;\r\n btnPZE_O.Top := 342;\r\n btnPZE_O.Width := 50;\r\n btnPZE_O.Height := 25;\r\n btnPZE_O.Caption := 'PZE';\r\n btnPZE_O.ChildOrder := 4;\r\n btnPZE_O.ElementClassName := 'btn btn-info btn-sm m-1 text-left';\r\n btnPZE_O.ElementFont := efCSS;\r\n btnPZE_O.ElementPosition := epIgnore;\r\n btnPZE_O.HeightStyle := ssAuto;\r\n btnPZE_O.HeightPercent := 100.000000000000000000;\r\n btnPZE_O.WidthStyle := ssAuto;\r\n btnPZE_O.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnPZE_O, Self, 'OnClick', 'btnPZE_OClick');\r\n btnDateien.SetParentComponent(Self);\r\n btnDateien.Name := 'btnDateien';\r\n btnDateien.Left := 186;\r\n btnDateien.Top := 373;\r\n btnDateien.Width := 50;\r\n btnDateien.Height := 25;\r\n btnDateien.Caption := 'Dateien';\r\n btnDateien.ChildOrder := 4;\r\n btnDateien.ElementClassName := 'btn btn-info btn-sm m-1 text-left';\r\n btnDateien.ElementFont := efCSS;\r\n btnDateien.ElementPosition := epIgnore;\r\n btnDateien.HeightStyle := ssAuto;\r\n btnDateien.HeightPercent := 100.000000000000000000;\r\n btnDateien.WidthStyle := ssAuto;\r\n btnDateien.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnDateien, Self, 'OnClick', 'btnDateienClick');\r\n btnDateienObjekt.SetParentComponent(Self);\r\n btnDateienObjekt.Name := 'btnDateienObjekt';\r\n btnDateienObjekt.Left := 187;\r\n btnDateienObjekt.Top := 404;\r\n btnDateienObjekt.Width := 50;\r\n btnDateienObjekt.Height := 25;\r\n btnDateienObjekt.Caption := 'Dateien zu Objekt';\r\n btnDateienObjekt.ChildOrder := 4;\r\n btnDateienObjekt.ElementClassName := 'btn btn-info btn-sm m-1 text-left';\r\n btnDateienObjekt.ElementFont := efCSS;\r\n btnDateienObjekt.ElementPosition := epIgnore;\r\n btnDateienObjekt.HeightStyle := ssAuto;\r\n btnDateienObjekt.HeightPercent := 100.000000000000000000;\r\n btnDateienObjekt.WidthStyle := ssAuto;\r\n btnDateienObjekt.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnDateienObjekt, Self, 'OnClick', 'btnDateienObjektClick');\r\n btnDateienKontakt.SetParentComponent(Self);\r\n btnDateienKontakt.Name := 'btnDateienKontakt';\r\n btnDateienKontakt.Left := 187;\r\n btnDateienKontakt.Top := 435;\r\n btnDateienKontakt.Width := 50;\r\n btnDateienKontakt.Height := 25;\r\n btnDateienKontakt.Caption := 'Dateien zu Kontakt';\r\n btnDateienKontakt.ChildOrder := 4;\r\n btnDateienKontakt.ElementClassName := 'btn btn-info btn-sm m-1 text-left';\r\n btnDateienKontakt.ElementFont := efCSS;\r\n btnDateienKontakt.ElementPosition := epIgnore;\r\n btnDateienKontakt.HeightStyle := ssAuto;\r\n btnDateienKontakt.HeightPercent := 100.000000000000000000;\r\n btnDateienKontakt.WidthStyle := ssAuto;\r\n btnDateienKontakt.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnDateienKontakt, Self, 'OnClick', 'btnDateienKontaktClick');\r\n dsBeleg.SetParentComponent(Self);\r\n dsBeleg.Name := 'dsBeleg';\r\n dsBeleg.AfterApplyUpdates := dsBelegAfterApplyUpdates;\r\n dsBeleg.AfterOpen := dsBelegAfterOpen;\r\n dsBeleg.BeforePost := dsBelegBeforePost;\r\n dsBeleg.AfterPost := dsBelegAfterPost;\r\n dsBeleg.EntitySetName := 'Auftrag';\r\n dsBeleg.Connection := DM2.XDataWebConnection1;\r\n dsBeleg.SubpropsDepth := 1;\r\n dsBeleg.QueryString := '$expand=Kundennummer';\r\n dsBeleg.Left := 80;\r\n dsBeleg.Top := 128;\r\n dsBelegKundennummer.SetParentComponent(dsBeleg);\r\n dsBelegKundennummer.Name := 'dsBelegKundennummer';\r\n dsBelegKundennummer.FieldName := 'Kundennummer';\r\n dsBelegKundennummer.Required := True;\r\n dsBelegNummerkomplett.SetParentComponent(dsBeleg);\r\n dsBelegNummerkomplett.Name := 'dsBelegNummerkomplett';\r\n dsBelegNummerkomplett.FieldName := 'Nummerkomplett';\r\n dsBelegNummerkomplett.Required := True;\r\n dsBelegNummerkomplett.Size := 10;\r\n dsBelegReferenzAngebot.SetParentComponent(dsBeleg);\r\n dsBelegReferenzAngebot.Name := 'dsBelegReferenzAngebot';\r\n dsBelegReferenzAngebot.FieldName := 'ReferenzAngebot';\r\n dsBelegReferenzAngebot.Size := 10;\r\n dsBelegReferenzLieferschein.SetParentComponent(dsBeleg);\r\n dsBelegReferenzLieferschein.Name := 'dsBelegReferenzLieferschein';\r\n dsBelegReferenzLieferschein.FieldName := 'ReferenzLieferschein';\r\n dsBelegReferenzLieferschein.Size := 10;\r\n dsBelegReferenzRechnung.SetParentComponent(dsBeleg);\r\n dsBelegReferenzRechnung.Name := 'dsBelegReferenzRechnung';\r\n dsBelegReferenzRechnung.FieldName := 'ReferenzRechnung';\r\n dsBelegReferenzRechnung.Size := 10;\r\n dsBelegDatum.SetParentComponent(dsBeleg);\r\n dsBelegDatum.Name := 'dsBelegDatum';\r\n dsBelegDatum.FieldName := 'Datum';\r\n dsBelegDatum.Required := True;\r\n dsBelegJahr.SetParentComponent(dsBeleg);\r\n dsBelegJahr.Name := 'dsBelegJahr';\r\n dsBelegJahr.FieldName := 'Jahr';\r\n dsBelegKalenderwoche.SetParentComponent(dsBeleg);\r\n dsBelegKalenderwoche.Name := 'dsBelegKalenderwoche';\r\n dsBelegKalenderwoche.FieldName := 'Kalenderwoche';\r\n dsBelegNachname.SetParentComponent(dsBeleg);\r\n dsBelegNachname.Name := 'dsBelegNachname';\r\n dsBelegNachname.FieldName := 'Nachname';\r\n dsBelegNachname.Size := 50;\r\n dsBelegVorname.SetParentComponent(dsBeleg);\r\n dsBelegVorname.Name := 'dsBelegVorname';\r\n dsBelegVorname.FieldName := 'Vorname';\r\n dsBelegVorname.Size := 50;\r\n dsBelegPostleitzahl.SetParentComponent(dsBeleg);\r\n dsBelegPostleitzahl.Name := 'dsBelegPostleitzahl';\r\n dsBelegPostleitzahl.FieldName := 'Postleitzahl';\r\n dsBelegPostleitzahl.Size := 10;\r\n dsBelegOrt.SetParentComponent(dsBeleg);\r\n dsBelegOrt.Name := 'dsBelegOrt';\r\n dsBelegOrt.FieldName := 'Ort';\r\n dsBelegOrt.Size := 50;\r\n dsBelegLaenderkuerzel.SetParentComponent(dsBeleg);\r\n dsBelegLaenderkuerzel.Name := 'dsBelegLaenderkuerzel';\r\n dsBelegLaenderkuerzel.FieldName := 'Laenderkuerzel';\r\n dsBelegLaenderkuerzel.Size := 5;\r\n dsBelegLand.SetParentComponent(dsBeleg);\r\n dsBelegLand.Name := 'dsBelegLand';\r\n dsBelegLand.FieldName := 'Land';\r\n dsBelegLand.Size := 50;\r\n dsBelegBriefanrede1.SetParentComponent(dsBeleg);\r\n dsBelegBriefanrede1.Name := 'dsBelegBriefanrede1';\r\n dsBelegBriefanrede1.FieldName := 'Briefanrede1';\r\n dsBelegBriefanrede1.Size := 255;\r\n dsBelegBriefanrede2.SetParentComponent(dsBeleg);\r\n dsBelegBriefanrede2.Name := 'dsBelegBriefanrede2';\r\n dsBelegBriefanrede2.FieldName := 'Briefanrede2';\r\n dsBelegBriefanrede2.Size := 40;\r\n dsBelegEMail.SetParentComponent(dsBeleg);\r\n dsBelegEMail.Name := 'dsBelegEMail';\r\n dsBelegEMail.FieldName := 'EMail';\r\n dsBelegEMail.Size := 50;\r\n dsBelegAdresseBild.SetParentComponent(dsBeleg);\r\n dsBelegAdresseBild.Name := 'dsBelegAdresseBild';\r\n dsBelegAdresseBild.FieldName := 'AdresseBild';\r\n dsBelegAdresseBild.Size := 255;\r\n dsBelegLieferanschriftBild.SetParentComponent(dsBeleg);\r\n dsBelegLieferanschriftBild.Name := 'dsBelegLieferanschriftBild';\r\n dsBelegLieferanschriftBild.FieldName := 'LieferanschriftBild';\r\n dsBelegLieferanschriftBild.Size := 255;\r\n dsBelegZahlungsbedingung.SetParentComponent(dsBeleg);\r\n dsBelegZahlungsbedingung.Name := 'dsBelegZahlungsbedingung';\r\n dsBelegZahlungsbedingung.FieldName := 'Zahlungsbedingung';\r\n dsBelegZahlungsbedingungText.SetParentComponent(dsBeleg);\r\n dsBelegZahlungsbedingungText.Name := 'dsBelegZahlungsbedingungText';\r\n dsBelegZahlungsbedingungText.FieldName := 'ZahlungsbedingungText';\r\n dsBelegZahlungsbedingungText.Size := 250;\r\n dsBelegAuftragsbezeichnung.SetParentComponent(dsBeleg);\r\n dsBelegAuftragsbezeichnung.Name := 'dsBelegAuftragsbezeichnung';\r\n dsBelegAuftragsbezeichnung.FieldName := 'Auftragsbezeichnung';\r\n dsBelegAuftragsbezeichnung.Size := 255;\r\n dsBelegAuftragnummerKunde.SetParentComponent(dsBeleg);\r\n dsBelegAuftragnummerKunde.Name := 'dsBelegAuftragnummerKunde';\r\n dsBelegAuftragnummerKunde.FieldName := 'AuftragnummerKunde';\r\n dsBelegAuftragnummerKunde.Size := 50;\r\n dsBelegBestelldatumKunde.SetParentComponent(dsBeleg);\r\n dsBelegBestelldatumKunde.Name := 'dsBelegBestelldatumKunde';\r\n dsBelegBestelldatumKunde.FieldName := 'BestelldatumKunde';\r\n dsBelegILN.SetParentComponent(dsBeleg);\r\n dsBelegILN.Name := 'dsBelegILN';\r\n dsBelegILN.FieldName := 'ILN';\r\n dsBelegILN.Size := 50;\r\n dsBelegKopftext.SetParentComponent(dsBeleg);\r\n dsBelegKopftext.Name := 'dsBelegKopftext';\r\n dsBelegKopftext.FieldName := 'Kopftext';\r\n dsBelegKopftext.Size := 255;\r\n dsBelegSchlussbemerkung.SetParentComponent(dsBeleg);\r\n dsBelegSchlussbemerkung.Name := 'dsBelegSchlussbemerkung';\r\n dsBelegSchlussbemerkung.FieldName := 'Schlussbemerkung';\r\n dsBelegSchlussbemerkung.Size := 255;\r\n dsBelegGruss.SetParentComponent(dsBeleg);\r\n dsBelegGruss.Name := 'dsBelegGruss';\r\n dsBelegGruss.FieldName := 'Gruss';\r\n dsBelegGruss.Size := 255;\r\n dsBelegMehrwertsteuersatz1.SetParentComponent(dsBeleg);\r\n dsBelegMehrwertsteuersatz1.Name := 'dsBelegMehrwertsteuersatz1';\r\n dsBelegMehrwertsteuersatz1.FieldName := 'Mehrwertsteuersatz1';\r\n dsBelegMehrwertsteuersatz2.SetParentComponent(dsBeleg);\r\n dsBelegMehrwertsteuersatz2.Name := 'dsBelegMehrwertsteuersatz2';\r\n dsBelegMehrwertsteuersatz2.FieldName := 'Mehrwertsteuersatz2';\r\n dsBelegNettosumme01.SetParentComponent(dsBeleg);\r\n dsBelegNettosumme01.Name := 'dsBelegNettosumme01';\r\n dsBelegNettosumme01.FieldName := 'Nettosumme01';\r\n dsBelegNettosumme02.SetParentComponent(dsBeleg);\r\n dsBelegNettosumme02.Name := 'dsBelegNettosumme02';\r\n dsBelegNettosumme02.FieldName := 'Nettosumme02';\r\n dsBelegNettosumme.SetParentComponent(dsBeleg);\r\n dsBelegNettosumme.Name := 'dsBelegNettosumme';\r\n dsBelegNettosumme.FieldName := 'Nettosumme';\r\n dsBelegMehrwertsteuer01.SetParentComponent(dsBeleg);\r\n dsBelegMehrwertsteuer01.Name := 'dsBelegMehrwertsteuer01';\r\n dsBelegMehrwertsteuer01.FieldName := 'Mehrwertsteuer01';\r\n dsBelegMehrwertsteuer02.SetParentComponent(dsBeleg);\r\n dsBelegMehrwertsteuer02.Name := 'dsBelegMehrwertsteuer02';\r\n dsBelegMehrwertsteuer02.FieldName := 'Mehrwertsteuer02';\r\n dsBelegMehrwertsteuer.SetParentComponent(dsBeleg);\r\n dsBelegMehrwertsteuer.Name := 'dsBelegMehrwertsteuer';\r\n dsBelegMehrwertsteuer.FieldName := 'Mehrwertsteuer';\r\n dsBelegBruttosumme.SetParentComponent(dsBeleg);\r\n dsBelegBruttosumme.Name := 'dsBelegBruttosumme';\r\n dsBelegBruttosumme.FieldName := 'Bruttosumme';\r\n dsBelegVersanddatum.SetParentComponent(dsBeleg);\r\n dsBelegVersanddatum.Name := 'dsBelegVersanddatum';\r\n dsBelegVersanddatum.FieldName := 'Versanddatum';\r\n dsBelegSkontosatz.SetParentComponent(dsBeleg);\r\n dsBelegSkontosatz.Name := 'dsBelegSkontosatz';\r\n dsBelegSkontosatz.FieldName := 'Skontosatz';\r\n dsBelegNettosummeEK.SetParentComponent(dsBeleg);\r\n dsBelegNettosummeEK.Name := 'dsBelegNettosummeEK';\r\n dsBelegNettosummeEK.FieldName := 'NettosummeEK';\r\n dsBelegNettoMarge.SetParentComponent(dsBeleg);\r\n dsBelegNettoMarge.Name := 'dsBelegNettoMarge';\r\n dsBelegNettoMarge.FieldName := 'NettoMarge';\r\n dsBelegSchreibzeichen.SetParentComponent(dsBeleg);\r\n dsBelegSchreibzeichen.Name := 'dsBelegSchreibzeichen';\r\n dsBelegSchreibzeichen.FieldName := 'Schreibzeichen';\r\n dsBelegSchreibzeichen.Size := 10;\r\n dsBelegUnterzeichner.SetParentComponent(dsBeleg);\r\n dsBelegUnterzeichner.Name := 'dsBelegUnterzeichner';\r\n dsBelegUnterzeichner.FieldName := 'Unterzeichner';\r\n dsBelegUnterzeichner.Size := 50;\r\n dsBelegTelefonMA.SetParentComponent(dsBeleg);\r\n dsBelegTelefonMA.Name := 'dsBelegTelefonMA';\r\n dsBelegTelefonMA.FieldName := 'TelefonMA';\r\n dsBelegTelefonMA.Size := 30;\r\n dsBelegEmailMA.SetParentComponent(dsBeleg);\r\n dsBelegEmailMA.Name := 'dsBelegEmailMA';\r\n dsBelegEmailMA.FieldName := 'EmailMA';\r\n dsBelegEmailMA.Size := 50;\r\n dsBelegUSTID.SetParentComponent(dsBeleg);\r\n dsBelegUSTID.Name := 'dsBelegUSTID';\r\n dsBelegUSTID.FieldName := 'USTID';\r\n dsBelegUmsatzsteuerausweis.SetParentComponent(dsBeleg);\r\n dsBelegUmsatzsteuerausweis.Name := 'dsBelegUmsatzsteuerausweis';\r\n dsBelegUmsatzsteuerausweis.FieldName := 'Umsatzsteuerausweis';\r\n dsBeleggebucht.SetParentComponent(dsBeleg);\r\n dsBeleggebucht.Name := 'dsBeleggebucht';\r\n dsBeleggebucht.FieldName := 'gebucht';\r\n dsBelegLieferdatum.SetParentComponent(dsBeleg);\r\n dsBelegLieferdatum.Name := 'dsBelegLieferdatum';\r\n dsBelegLieferdatum.FieldName := 'Lieferdatum';\r\n dsBelegTransportbedingung.SetParentComponent(dsBeleg);\r\n dsBelegTransportbedingung.Name := 'dsBelegTransportbedingung';\r\n dsBelegTransportbedingung.FieldName := 'Transportbedingung';\r\n dsBelegTransportbedingung.Size := 100;\r\n dsBelegMehrwertsteuersatz3.SetParentComponent(dsBeleg);\r\n dsBelegMehrwertsteuersatz3.Name := 'dsBelegMehrwertsteuersatz3';\r\n dsBelegMehrwertsteuersatz3.FieldName := 'Mehrwertsteuersatz3';\r\n dsBelegMehrwertsteuer03.SetParentComponent(dsBeleg);\r\n dsBelegMehrwertsteuer03.Name := 'dsBelegMehrwertsteuer03';\r\n dsBelegMehrwertsteuer03.FieldName := 'Mehrwertsteuer03';\r\n dsBelegNettosumme03.SetParentComponent(dsBeleg);\r\n dsBelegNettosumme03.Name := 'dsBelegNettosumme03';\r\n dsBelegNettosumme03.FieldName := 'Nettosumme03';\r\n dsBelegRundungsDifferenz.SetParentComponent(dsBeleg);\r\n dsBelegRundungsDifferenz.Name := 'dsBelegRundungsDifferenz';\r\n dsBelegRundungsDifferenz.FieldName := 'RundungsDifferenz';\r\n dsBelegEmailText.SetParentComponent(dsBeleg);\r\n dsBelegEmailText.Name := 'dsBelegEmailText';\r\n dsBelegEmailText.FieldName := 'EmailText';\r\n dsBelegEmailText.Size := 255;\r\n dsBelegAuftragerledigt.SetParentComponent(dsBeleg);\r\n dsBelegAuftragerledigt.Name := 'dsBelegAuftragerledigt';\r\n dsBelegAuftragerledigt.FieldName := 'Auftragerledigt';\r\n dsBelegRabattstufe.SetParentComponent(dsBeleg);\r\n dsBelegRabattstufe.Name := 'dsBelegRabattstufe';\r\n dsBelegRabattstufe.FieldName := 'Rabattstufe';\r\n dsBelegRabattstufe.Size := 15;\r\n dsBelegKFZKennzeichen.SetParentComponent(dsBeleg);\r\n dsBelegKFZKennzeichen.Name := 'dsBelegKFZKennzeichen';\r\n dsBelegKFZKennzeichen.FieldName := 'KFZKennzeichen';\r\n dsBelegKFZKennzeichen.Size := 13;\r\n dsBelegFahrgestellnummer.SetParentComponent(dsBeleg);\r\n dsBelegFahrgestellnummer.Name := 'dsBelegFahrgestellnummer';\r\n dsBelegFahrgestellnummer.FieldName := 'Fahrgestellnummer';\r\n dsBelegKFZHersteller.SetParentComponent(dsBeleg);\r\n dsBelegKFZHersteller.Name := 'dsBelegKFZHersteller';\r\n dsBelegKFZHersteller.FieldName := 'KFZHersteller';\r\n dsBelegErstzulassungsdatum.SetParentComponent(dsBeleg);\r\n dsBelegErstzulassungsdatum.Name := 'dsBelegErstzulassungsdatum';\r\n dsBelegErstzulassungsdatum.FieldName := 'Erstzulassungsdatum';\r\n dsBelegKMStand.SetParentComponent(dsBeleg);\r\n dsBelegKMStand.Name := 'dsBelegKMStand';\r\n dsBelegKMStand.FieldName := 'KMStand';\r\n dsBelegKMStand.Size := 6;\r\n dsBelegKFZType.SetParentComponent(dsBeleg);\r\n dsBelegKFZType.Name := 'dsBelegKFZType';\r\n dsBelegKFZType.FieldName := 'KFZType';\r\n dsBelegKFZType.Size := 25;\r\n dsBelegInspektionsdatum.SetParentComponent(dsBeleg);\r\n dsBelegInspektionsdatum.Name := 'dsBelegInspektionsdatum';\r\n dsBelegInspektionsdatum.FieldName := 'Inspektionsdatum';\r\n dsBelegDebitorennummer.SetParentComponent(dsBeleg);\r\n dsBelegDebitorennummer.Name := 'dsBelegDebitorennummer';\r\n dsBelegDebitorennummer.FieldName := 'Debitorennummer';\r\n dsBelegDebitorennummer.Size := 13;\r\n dsBelegKostentraeger.SetParentComponent(dsBeleg);\r\n dsBelegKostentraeger.Name := 'dsBelegKostentraeger';\r\n dsBelegKostentraeger.FieldName := 'Kostentraeger';\r\n dsBelegKostentraeger.Size := 13;\r\n dsBelegRabattsatz.SetParentComponent(dsBeleg);\r\n dsBelegRabattsatz.Name := 'dsBelegRabattsatz';\r\n dsBelegRabattsatz.FieldName := 'Rabattsatz';\r\n dsBelegObjektReferenz.SetParentComponent(dsBeleg);\r\n dsBelegObjektReferenz.Name := 'dsBelegObjektReferenz';\r\n dsBelegObjektReferenz.FieldName := 'ObjektReferenz';\r\n dsBelegObjektReferenz.Size := 13;\r\n dsBelegBank.SetParentComponent(dsBeleg);\r\n dsBelegBank.Name := 'dsBelegBank';\r\n dsBelegBank.FieldName := 'Bank';\r\n dsBelegBank.Size := 50;\r\n dsBelegBankleitzahl.SetParentComponent(dsBeleg);\r\n dsBelegBankleitzahl.Name := 'dsBelegBankleitzahl';\r\n dsBelegBankleitzahl.FieldName := 'Bankleitzahl';\r\n dsBelegKontonummer.SetParentComponent(dsBeleg);\r\n dsBelegKontonummer.Name := 'dsBelegKontonummer';\r\n dsBelegKontonummer.FieldName := 'Kontonummer';\r\n dsBelegKontonummer.Size := 50;\r\n dsBelegKontoinhaber.SetParentComponent(dsBeleg);\r\n dsBelegKontoinhaber.Name := 'dsBelegKontoinhaber';\r\n dsBelegKontoinhaber.FieldName := 'Kontoinhaber';\r\n dsBelegKontoinhaber.Size := 50;\r\n dsBelegTelefaxnummer.SetParentComponent(dsBeleg);\r\n dsBelegTelefaxnummer.Name := 'dsBelegTelefaxnummer';\r\n dsBelegTelefaxnummer.FieldName := 'Telefaxnummer';\r\n dsBelegTelefaxnummer.Size := 25;\r\n dsBelegDatumNeu.SetParentComponent(dsBeleg);\r\n dsBelegDatumNeu.Name := 'dsBelegDatumNeu';\r\n dsBelegDatumNeu.FieldName := 'DatumNeu';\r\n dsBelegDatumgeaendert.SetParentComponent(dsBeleg);\r\n dsBelegDatumgeaendert.Name := 'dsBelegDatumgeaendert';\r\n dsBelegDatumgeaendert.FieldName := 'Datumgeaendert';\r\n dsBelegObjektnummer.SetParentComponent(dsBeleg);\r\n dsBelegObjektnummer.Name := 'dsBelegObjektnummer';\r\n dsBelegObjektnummer.FieldName := 'Objektnummer';\r\n dsBelegObjektnummer.Size := 25;\r\n dsBelegLiefertermin.SetParentComponent(dsBeleg);\r\n dsBelegLiefertermin.Name := 'dsBelegLiefertermin';\r\n dsBelegLiefertermin.FieldName := 'Liefertermin';\r\n dsBelegLiefertermin.Size := 50;\r\n dsBelegEmailversand.SetParentComponent(dsBeleg);\r\n dsBelegEmailversand.Name := 'dsBelegEmailversand';\r\n dsBelegEmailversand.FieldName := 'Emailversand';\r\n dsBelegTelefonnummer.SetParentComponent(dsBeleg);\r\n dsBelegTelefonnummer.Name := 'dsBelegTelefonnummer';\r\n dsBelegTelefonnummer.FieldName := 'Telefonnummer';\r\n dsBelegTelefonnummer.Size := 35;\r\n dsBelegMobilTelefon.SetParentComponent(dsBeleg);\r\n dsBelegMobilTelefon.Name := 'dsBelegMobilTelefon';\r\n dsBelegMobilTelefon.FieldName := 'MobilTelefon';\r\n dsBelegMobilTelefon.Size := 25;\r\n dsBelegAuftragFax.SetParentComponent(dsBeleg);\r\n dsBelegAuftragFax.Name := 'dsBelegAuftragFax';\r\n dsBelegAuftragFax.FieldName := 'AuftragFax';\r\n dsBelegREDatum.SetParentComponent(dsBeleg);\r\n dsBelegREDatum.Name := 'dsBelegREDatum';\r\n dsBelegREDatum.FieldName := 'REDatum';\r\n dsBelegBenutzerNeu.SetParentComponent(dsBeleg);\r\n dsBelegBenutzerNeu.Name := 'dsBelegBenutzerNeu';\r\n dsBelegBenutzerNeu.FieldName := 'BenutzerNeu';\r\n dsBelegBenutzerNeu.Size := 50;\r\n dsBelegBenutzerGeaendert.SetParentComponent(dsBeleg);\r\n dsBelegBenutzerGeaendert.Name := 'dsBelegBenutzerGeaendert';\r\n dsBelegBenutzerGeaendert.FieldName := 'BenutzerGeaendert';\r\n dsBelegBenutzerGeaendert.Size := 50;\r\n dsBelegBerechnungBrutto.SetParentComponent(dsBeleg);\r\n dsBelegBerechnungBrutto.Name := 'dsBelegBerechnungBrutto';\r\n dsBelegBerechnungBrutto.FieldName := 'BerechnungBrutto';\r\n dsBelegBruttosumme01.SetParentComponent(dsBeleg);\r\n dsBelegBruttosumme01.Name := 'dsBelegBruttosumme01';\r\n dsBelegBruttosumme01.FieldName := 'Bruttosumme01';\r\n dsBelegBruttosumme02.SetParentComponent(dsBeleg);\r\n dsBelegBruttosumme02.Name := 'dsBelegBruttosumme02';\r\n dsBelegBruttosumme02.FieldName := 'Bruttosumme02';\r\n dsBelegBruttosumme03.SetParentComponent(dsBeleg);\r\n dsBelegBruttosumme03.Name := 'dsBelegBruttosumme03';\r\n dsBelegBruttosumme03.FieldName := 'Bruttosumme03';\r\n dsBelegNotiz.SetParentComponent(dsBeleg);\r\n dsBelegNotiz.Name := 'dsBelegNotiz';\r\n dsBelegNotiz.FieldName := 'Notiz';\r\n dsBelegNotiz.Size := 255;\r\n dsBelegMargeProzent.SetParentComponent(dsBeleg);\r\n dsBelegMargeProzent.Name := 'dsBelegMargeProzent';\r\n dsBelegMargeProzent.FieldName := 'MargeProzent';\r\n dsBelegWarenkreditgesperrt.SetParentComponent(dsBeleg);\r\n dsBelegWarenkreditgesperrt.Name := 'dsBelegWarenkreditgesperrt';\r\n dsBelegWarenkreditgesperrt.FieldName := 'Warenkreditgesperrt';\r\n dsBelegBelegsprache.SetParentComponent(dsBeleg);\r\n dsBelegBelegsprache.Name := 'dsBelegBelegsprache';\r\n dsBelegBelegsprache.FieldName := 'Belegsprache';\r\n dsBelegBelegsprache.Size := 10;\r\n dsBelegDuplicate.SetParentComponent(dsBeleg);\r\n dsBelegDuplicate.Name := 'dsBelegDuplicate';\r\n dsBelegDuplicate.FieldName := 'Duplicate';\r\n dsBelegperEmail.SetParentComponent(dsBeleg);\r\n dsBelegperEmail.Name := 'dsBelegperEmail';\r\n dsBelegperEmail.FieldName := 'perEmail';\r\n dsBelegAnsprechpartner.SetParentComponent(dsBeleg);\r\n dsBelegAnsprechpartner.Name := 'dsBelegAnsprechpartner';\r\n dsBelegAnsprechpartner.FieldName := 'Ansprechpartner';\r\n dsBelegAnsprechpartner.Size := 105;\r\n dsBelegKundennummerFremd.SetParentComponent(dsBeleg);\r\n dsBelegKundennummerFremd.Name := 'dsBelegKundennummerFremd';\r\n dsBelegKundennummerFremd.FieldName := 'KundennummerFremd';\r\n dsBelegProtokoll.SetParentComponent(dsBeleg);\r\n dsBelegProtokoll.Name := 'dsBelegProtokoll';\r\n dsBelegProtokoll.FieldName := 'Protokoll';\r\n dsBelegProtokoll.Size := 255;\r\n dsBelegVerleihauftrag.SetParentComponent(dsBeleg);\r\n dsBelegVerleihauftrag.Name := 'dsBelegVerleihauftrag';\r\n dsBelegVerleihauftrag.FieldName := 'Verleihauftrag';\r\n dsBelegVerleihVon.SetParentComponent(dsBeleg);\r\n dsBelegVerleihVon.Name := 'dsBelegVerleihVon';\r\n dsBelegVerleihVon.FieldName := 'VerleihVon';\r\n dsBelegVerleihBis.SetParentComponent(dsBeleg);\r\n dsBelegVerleihBis.Name := 'dsBelegVerleihBis';\r\n dsBelegVerleihBis.FieldName := 'VerleihBis';\r\n dsBelegAuftragGenehmigt.SetParentComponent(dsBeleg);\r\n dsBelegAuftragGenehmigt.Name := 'dsBelegAuftragGenehmigt';\r\n dsBelegAuftragGenehmigt.FieldName := 'AuftragGenehmigt';\r\n dsBeleggesperrt.SetParentComponent(dsBeleg);\r\n dsBeleggesperrt.Name := 'dsBeleggesperrt';\r\n dsBeleggesperrt.FieldName := 'gesperrt';\r\n dsBelegVerleihvonText.SetParentComponent(dsBeleg);\r\n dsBelegVerleihvonText.Name := 'dsBelegVerleihvonText';\r\n dsBelegVerleihvonText.FieldName := 'VerleihvonText';\r\n dsBelegVerleihvonText.Size := 50;\r\n dsBelegVerleihbisText.SetParentComponent(dsBeleg);\r\n dsBelegVerleihbisText.Name := 'dsBelegVerleihbisText';\r\n dsBelegVerleihbisText.FieldName := 'VerleihbisText';\r\n dsBelegVerleihbisText.Size := 50;\r\n dsBelegDruckWHG.SetParentComponent(dsBeleg);\r\n dsBelegDruckWHG.Name := 'dsBelegDruckWHG';\r\n dsBelegDruckWHG.FieldName := 'DruckWHG';\r\n dsBelegDruckWHG.Size := 3;\r\n dsBelegDruckWHGKurs.SetParentComponent(dsBeleg);\r\n dsBelegDruckWHGKurs.Name := 'dsBelegDruckWHGKurs';\r\n dsBelegDruckWHGKurs.FieldName := 'DruckWHGKurs';\r\n dsBelegProzentsatzZusatzposition.SetParentComponent(dsBeleg);\r\n dsBelegProzentsatzZusatzposition.Name := 'dsBelegProzentsatzZusatzposition';\r\n dsBelegProzentsatzZusatzposition.FieldName := 'ProzentsatzZusatzposition';\r\n dsBelegTextZusatzposition.SetParentComponent(dsBeleg);\r\n dsBelegTextZusatzposition.Name := 'dsBelegTextZusatzposition';\r\n dsBelegTextZusatzposition.FieldName := 'TextZusatzposition';\r\n dsBelegTextZusatzposition.Size := 255;\r\n dsBelegTextzusatzBeschreibung.SetParentComponent(dsBeleg);\r\n dsBelegTextzusatzBeschreibung.Name := 'dsBelegTextzusatzBeschreibung';\r\n dsBelegTextzusatzBeschreibung.FieldName := 'TextzusatzBeschreibung';\r\n dsBelegTextzusatzBeschreibung.Size := 50;\r\n dsBelegLayoutname.SetParentComponent(dsBeleg);\r\n dsBelegLayoutname.Name := 'dsBelegLayoutname';\r\n dsBelegLayoutname.FieldName := 'Layoutname';\r\n dsBelegLayoutname.Size := 50;\r\n dsBelegGesamtgewicht.SetParentComponent(dsBeleg);\r\n dsBelegGesamtgewicht.Name := 'dsBelegGesamtgewicht';\r\n dsBelegGesamtgewicht.FieldName := 'Gesamtgewicht';\r\n dsBelegBetragZusatzposition.SetParentComponent(dsBeleg);\r\n dsBelegBetragZusatzposition.Name := 'dsBelegBetragZusatzposition';\r\n dsBelegBetragZusatzposition.FieldName := 'BetragZusatzposition';\r\n dsBelegReferenzBestellung.SetParentComponent(dsBeleg);\r\n dsBelegReferenzBestellung.Name := 'dsBelegReferenzBestellung';\r\n dsBelegReferenzBestellung.FieldName := 'ReferenzBestellung';\r\n dsBelegReferenzBestellung.Size := 10;\r\n dsBelegTermin1.SetParentComponent(dsBeleg);\r\n dsBelegTermin1.Name := 'dsBelegTermin1';\r\n dsBelegTermin1.FieldName := 'Termin1';\r\n dsBelegTermin2.SetParentComponent(dsBeleg);\r\n dsBelegTermin2.Name := 'dsBelegTermin2';\r\n dsBelegTermin2.FieldName := 'Termin2';\r\n dsBelegZielkontaktnummer.SetParentComponent(dsBeleg);\r\n dsBelegZielkontaktnummer.Name := 'dsBelegZielkontaktnummer';\r\n dsBelegZielkontaktnummer.FieldName := 'Zielkontaktnummer';\r\n dsBelegZielkontaktnummer.Size := 13;\r\n dsBelegZielkontaktname.SetParentComponent(dsBeleg);\r\n dsBelegZielkontaktname.Name := 'dsBelegZielkontaktname';\r\n dsBelegZielkontaktname.FieldName := 'Zielkontaktname';\r\n dsBelegZielkontaktname.Size := 40;\r\n dsBelegBilddatei1.SetParentComponent(dsBeleg);\r\n dsBelegBilddatei1.Name := 'dsBelegBilddatei1';\r\n dsBelegBilddatei1.FieldName := 'Bilddatei1';\r\n dsBelegBilddatei1.Size := 255;\r\n dsBelegBilddatei2.SetParentComponent(dsBeleg);\r\n dsBelegBilddatei2.Name := 'dsBelegBilddatei2';\r\n dsBelegBilddatei2.FieldName := 'Bilddatei2';\r\n dsBelegBilddatei2.Size := 255;\r\n dsBelegZielkontaktnummer2.SetParentComponent(dsBeleg);\r\n dsBelegZielkontaktnummer2.Name := 'dsBelegZielkontaktnummer2';\r\n dsBelegZielkontaktnummer2.FieldName := 'Zielkontaktnummer2';\r\n dsBelegZielkontaktnummer2.Size := 13;\r\n dsBelegZielkontaktname2.SetParentComponent(dsBeleg);\r\n dsBelegZielkontaktname2.Name := 'dsBelegZielkontaktname2';\r\n dsBelegZielkontaktname2.FieldName := 'Zielkontaktname2';\r\n dsBelegZielkontaktname2.Size := 40;\r\n dsBelegbestaetigt.SetParentComponent(dsBeleg);\r\n dsBelegbestaetigt.Name := 'dsBelegbestaetigt';\r\n dsBelegbestaetigt.FieldName := 'bestaetigt';\r\n dsBelegZielkontaktnummer3.SetParentComponent(dsBeleg);\r\n dsBelegZielkontaktnummer3.Name := 'dsBelegZielkontaktnummer3';\r\n dsBelegZielkontaktnummer3.FieldName := 'Zielkontaktnummer3';\r\n dsBelegZielkontaktnummer3.Size := 13;\r\n dsBelegZielkontaktname3.SetParentComponent(dsBeleg);\r\n dsBelegZielkontaktname3.Name := 'dsBelegZielkontaktname3';\r\n dsBelegZielkontaktname3.FieldName := 'Zielkontaktname3';\r\n dsBelegZielkontaktname3.Size := 40;\r\n dsBelegTermin3.SetParentComponent(dsBeleg);\r\n dsBelegTermin3.Name := 'dsBelegTermin3';\r\n dsBelegTermin3.FieldName := 'Termin3';\r\n dsBelegTermin4.SetParentComponent(dsBeleg);\r\n dsBelegTermin4.Name := 'dsBelegTermin4';\r\n dsBelegTermin4.FieldName := 'Termin4';\r\n dsBelegMuster.SetParentComponent(dsBeleg);\r\n dsBelegMuster.Name := 'dsBelegMuster';\r\n dsBelegMuster.FieldName := 'Muster';\r\n dsBelegKW.SetParentComponent(dsBeleg);\r\n dsBelegKW.Name := 'dsBelegKW';\r\n dsBelegKW.FieldName := 'KW';\r\n dsBelegDatenlink.SetParentComponent(dsBeleg);\r\n dsBelegDatenlink.Name := 'dsBelegDatenlink';\r\n dsBelegDatenlink.FieldName := 'Datenlink';\r\n dsBelegDatenlink.Size := 255;\r\n dsBelegMehrwertsteuersatz4.SetParentComponent(dsBeleg);\r\n dsBelegMehrwertsteuersatz4.Name := 'dsBelegMehrwertsteuersatz4';\r\n dsBelegMehrwertsteuersatz4.FieldName := 'Mehrwertsteuersatz4';\r\n dsBelegMehrwertsteuersatz5.SetParentComponent(dsBeleg);\r\n dsBelegMehrwertsteuersatz5.Name := 'dsBelegMehrwertsteuersatz5';\r\n dsBelegMehrwertsteuersatz5.FieldName := 'Mehrwertsteuersatz5';\r\n dsBelegMehrwertsteuersatz6.SetParentComponent(dsBeleg);\r\n dsBelegMehrwertsteuersatz6.Name := 'dsBelegMehrwertsteuersatz6';\r\n dsBelegMehrwertsteuersatz6.FieldName := 'Mehrwertsteuersatz6';\r\n dsBelegBesteuerungKey.SetParentComponent(dsBeleg);\r\n dsBelegBesteuerungKey.Name := 'dsBelegBesteuerungKey';\r\n dsBelegBesteuerungKey.FieldName := 'BesteuerungKey';\r\n dsBelegVertreterMatchcode.SetParentComponent(dsBeleg);\r\n dsBelegVertreterMatchcode.Name := 'dsBelegVertreterMatchcode';\r\n dsBelegVertreterMatchcode.FieldName := 'VertreterMatchcode';\r\n dsBelegVertreterMatchcode.Size := 50;\r\n dsBelegVerfasser.SetParentComponent(dsBeleg);\r\n dsBelegVerfasser.Name := 'dsBelegVerfasser';\r\n dsBelegVerfasser.FieldName := 'Verfasser';\r\n dsBelegVerfasser.Size := 10;\r\n dsBelegLieferadresseID.SetParentComponent(dsBeleg);\r\n dsBelegLieferadresseID.Name := 'dsBelegLieferadresseID';\r\n dsBelegLieferadresseID.FieldName := 'LieferadresseID';\r\n dsBelegAuftragStatus.SetParentComponent(dsBeleg);\r\n dsBelegAuftragStatus.Name := 'dsBelegAuftragStatus';\r\n dsBelegAuftragStatus.FieldName := 'AuftragStatus';\r\n dsBelegAuftragStatus.Size := 30;\r\n dsBelegMonatJahr.SetParentComponent(dsBeleg);\r\n dsBelegMonatJahr.Name := 'dsBelegMonatJahr';\r\n dsBelegMonatJahr.FieldName := 'MonatJahr';\r\n dsBelegBelegvariante.SetParentComponent(dsBeleg);\r\n dsBelegBelegvariante.Name := 'dsBelegBelegvariante';\r\n dsBelegBelegvariante.FieldName := 'Belegvariante';\r\n dsBelegBelegvariante.Size := 25;\r\n dsBelegProduktionsfreigabe.SetParentComponent(dsBeleg);\r\n dsBelegProduktionsfreigabe.Name := 'dsBelegProduktionsfreigabe';\r\n dsBelegProduktionsfreigabe.FieldName := 'Produktionsfreigabe';\r\n dsBelegReferenzRahmenAuftrag.SetParentComponent(dsBeleg);\r\n dsBelegReferenzRahmenAuftrag.Name := 'dsBelegReferenzRahmenAuftrag';\r\n dsBelegReferenzRahmenAuftrag.FieldName := 'ReferenzRahmenAuftrag';\r\n dsBelegReferenzRahmenAuftrag.Size := 10;\r\n dsBelegDatumRahmenAuftrag.SetParentComponent(dsBeleg);\r\n dsBelegDatumRahmenAuftrag.Name := 'dsBelegDatumRahmenAuftrag';\r\n dsBelegDatumRahmenAuftrag.FieldName := 'DatumRahmenAuftrag';\r\n dsBelegFahrzeugID.SetParentComponent(dsBeleg);\r\n dsBelegFahrzeugID.Name := 'dsBelegFahrzeugID';\r\n dsBelegFahrzeugID.FieldName := 'FahrzeugID';\r\n dsBelegAuslieferungKW.SetParentComponent(dsBeleg);\r\n dsBelegAuslieferungKW.Name := 'dsBelegAuslieferungKW';\r\n dsBelegAuslieferungKW.FieldName := 'AuslieferungKW';\r\n dsBelegAuslieferungKW.Size := 25;\r\n dsBelegBereitstellungDatum.SetParentComponent(dsBeleg);\r\n dsBelegBereitstellungDatum.Name := 'dsBelegBereitstellungDatum';\r\n dsBelegBereitstellungDatum.FieldName := 'BereitstellungDatum';\r\n dsBelegVTUID.SetParentComponent(dsBeleg);\r\n dsBelegVTUID.Name := 'dsBelegVTUID';\r\n dsBelegVTUID.FieldName := 'VTUID';\r\n dsBelegVTUID.Size := 38;\r\n dsBelegLieferanschriftDaten.SetParentComponent(dsBeleg);\r\n dsBelegLieferanschriftDaten.Name := 'dsBelegLieferanschriftDaten';\r\n dsBelegLieferanschriftDaten.FieldName := 'LieferanschriftDaten';\r\n dsBelegLieferanschriftDaten.Size := 255;\r\n dsBelegGesamtVolumen.SetParentComponent(dsBeleg);\r\n dsBelegGesamtVolumen.Name := 'dsBelegGesamtVolumen';\r\n dsBelegGesamtVolumen.FieldName := 'GesamtVolumen';\r\n dsBelegBelegPKey.SetParentComponent(dsBeleg);\r\n dsBelegBelegPKey.Name := 'dsBelegBelegPKey';\r\n dsBelegBelegPKey.FieldName := 'BelegPKey';\r\n dsBelegDruckParameter.SetParentComponent(dsBeleg);\r\n dsBelegDruckParameter.Name := 'dsBelegDruckParameter';\r\n dsBelegDruckParameter.FieldName := 'DruckParameter';\r\n dsBelegDruckParameter.Size := 255;\r\n dsBelegReferenzService.SetParentComponent(dsBeleg);\r\n dsBelegReferenzService.Name := 'dsBelegReferenzService';\r\n dsBelegReferenzService.FieldName := 'ReferenzService';\r\n dsBelegReferenzService.Size := 10;\r\n dsBelegZusatzDaten.SetParentComponent(dsBeleg);\r\n dsBelegZusatzDaten.Name := 'dsBelegZusatzDaten';\r\n dsBelegZusatzDaten.FieldName := 'ZusatzDaten';\r\n dsBelegZusatzDaten.Size := 255;\r\n dsBelegStandPDF.SetParentComponent(dsBeleg);\r\n dsBelegStandPDF.Name := 'dsBelegStandPDF';\r\n dsBelegStandPDF.FieldName := 'StandPDF';\r\n dsBelegStandPDF.Size := 255;\r\n dsBelegPaketdienst.SetParentComponent(dsBeleg);\r\n dsBelegPaketdienst.Name := 'dsBelegPaketdienst';\r\n dsBelegPaketdienst.FieldName := 'Paketdienst';\r\n dsBelegPaketdienst.Size := 30;\r\n dsBelegMonteur.SetParentComponent(dsBeleg);\r\n dsBelegMonteur.Name := 'dsBelegMonteur';\r\n dsBelegMonteur.FieldName := 'Monteur';\r\n dsBelegKundennummerKundennummer.SetParentComponent(dsBeleg);\r\n dsBelegKundennummerKundennummer.Name := 'dsBelegKundennummerKundennummer';\r\n dsBelegKundennummerKundennummer.FieldName := 'Kundennummer.Kundennummer';\r\n dsBelegKundennummerKundennummer.Size := 13;\r\n dsBelegServiceBemerkung.SetParentComponent(dsBeleg);\r\n dsBelegServiceBemerkung.Name := 'dsBelegServiceBemerkung';\r\n dsBelegServiceBemerkung.FieldName := 'ServiceBemerkung';\r\n dsBelegServiceBemerkung.Size := 255;\r\n SourceBeleg.SetParentComponent(Self);\r\n SourceBeleg.Name := 'SourceBeleg';\r\n SourceBeleg.DataSet := dsBeleg;\r\n SetEvent(SourceBeleg, Self, 'OnStateChange', 'SourceBelegStateChange');\r\n SourceBeleg.Left := 16;\r\n SourceBeleg.Top := 128;\r\n dsPositionen.SetParentComponent(Self);\r\n dsPositionen.Name := 'dsPositionen';\r\n dsPositionen.AfterOpen := dsPositionenAfterOpen;\r\n dsPositionen.EntitySetName := 'PositionenAuftrag';\r\n dsPositionen.Connection := DM2.XDataWebConnection1;\r\n dsPositionen.SubpropsDepth := 1;\r\n dsPositionen.QueryString := '$expand=Artikelnummer';\r\n dsPositionen.Left := 216;\r\n dsPositionen.Top := 128;\r\n dsPositionenArtikelnummer.SetParentComponent(dsPositionen);\r\n dsPositionenArtikelnummer.Name := 'dsPositionenArtikelnummer';\r\n dsPositionenArtikelnummer.FieldName := 'Artikelnummer';\r\n dsPositionenNummerkomplett.SetParentComponent(dsPositionen);\r\n dsPositionenNummerkomplett.Name := 'dsPositionenNummerkomplett';\r\n dsPositionenNummerkomplett.FieldName := 'Nummerkomplett';\r\n dsPositionenID.SetParentComponent(dsPositionen);\r\n dsPositionenID.Name := 'dsPositionenID';\r\n dsPositionenID.FieldName := 'ID';\r\n dsPositionenID.Required := True;\r\n dsPositionenPosNr.SetParentComponent(dsPositionen);\r\n dsPositionenPosNr.Name := 'dsPositionenPosNr';\r\n dsPositionenPosNr.FieldName := 'PosNr';\r\n dsPositionenPosNr.Required := True;\r\n dsPositionenPosUNr.SetParentComponent(dsPositionen);\r\n dsPositionenPosUNr.Name := 'dsPositionenPosUNr';\r\n dsPositionenPosUNr.FieldName := 'PosUNr';\r\n dsPositionenSumme.SetParentComponent(dsPositionen);\r\n dsPositionenSumme.Name := 'dsPositionenSumme';\r\n dsPositionenSumme.FieldName := 'Summe';\r\n dsPositionenArtikelueberschrift.SetParentComponent(dsPositionen);\r\n dsPositionenArtikelueberschrift.Name := 'dsPositionenArtikelueberschrift';\r\n dsPositionenArtikelueberschrift.FieldName := 'Artikelueberschrift';\r\n dsPositionenArtikelueberschrift.Size := 50;\r\n dsPositionenArtikelbeschreibung.SetParentComponent(dsPositionen);\r\n dsPositionenArtikelbeschreibung.Name := 'dsPositionenArtikelbeschreibung';\r\n dsPositionenArtikelbeschreibung.FieldName := 'Artikelbeschreibung';\r\n dsPositionenArtikelbeschreibung.Size := 255;\r\n dsPositionenMenge.SetParentComponent(dsPositionen);\r\n dsPositionenMenge.Name := 'dsPositionenMenge';\r\n dsPositionenMenge.FieldName := 'Menge';\r\n dsPositionenArtderMenge.SetParentComponent(dsPositionen);\r\n dsPositionenArtderMenge.Name := 'dsPositionenArtderMenge';\r\n dsPositionenArtderMenge.FieldName := 'ArtderMenge';\r\n dsPositionenArtderMenge.Size := 50;\r\n dsPositionenVerkaufspreis.SetParentComponent(dsPositionen);\r\n dsPositionenVerkaufspreis.Name := 'dsPositionenVerkaufspreis';\r\n dsPositionenVerkaufspreis.FieldName := 'Verkaufspreis';\r\n dsPositionenEinkaufspreis.SetParentComponent(dsPositionen);\r\n dsPositionenEinkaufspreis.Name := 'dsPositionenEinkaufspreis';\r\n dsPositionenEinkaufspreis.FieldName := 'Einkaufspreis';\r\n dsPositionenSeriennummer.SetParentComponent(dsPositionen);\r\n dsPositionenSeriennummer.Name := 'dsPositionenSeriennummer';\r\n dsPositionenSeriennummer.FieldName := 'Seriennummer';\r\n dsPositionenSeriennummer.Size := 30;\r\n dsPositionenWarengruppe.SetParentComponent(dsPositionen);\r\n dsPositionenWarengruppe.Name := 'dsPositionenWarengruppe';\r\n dsPositionenWarengruppe.FieldName := 'Warengruppe';\r\n dsPositionenWarengruppe.Size := 50;\r\n dsPositionenWarenuntergruppe.SetParentComponent(dsPositionen);\r\n dsPositionenWarenuntergruppe.Name := 'dsPositionenWarenuntergruppe';\r\n dsPositionenWarenuntergruppe.FieldName := 'Warenuntergruppe';\r\n dsPositionenWarenuntergruppe.Size := 50;\r\n dsPositionenArtikelnummerKunde.SetParentComponent(dsPositionen);\r\n dsPositionenArtikelnummerKunde.Name := 'dsPositionenArtikelnummerKunde';\r\n dsPositionenArtikelnummerKunde.FieldName := 'ArtikelnummerKunde';\r\n dsPositionenLieferant.SetParentComponent(dsPositionen);\r\n dsPositionenLieferant.Name := 'dsPositionenLieferant';\r\n dsPositionenLieferant.FieldName := 'Lieferant';\r\n dsPositionenLieferant.Size := 13;\r\n dsPositionenGewicht.SetParentComponent(dsPositionen);\r\n dsPositionenGewicht.Name := 'dsPositionenGewicht';\r\n dsPositionenGewicht.FieldName := 'Gewicht';\r\n dsPositionenLaenge.SetParentComponent(dsPositionen);\r\n dsPositionenLaenge.Name := 'dsPositionenLaenge';\r\n dsPositionenLaenge.FieldName := 'Laenge';\r\n dsPositionenBreite.SetParentComponent(dsPositionen);\r\n dsPositionenBreite.Name := 'dsPositionenBreite';\r\n dsPositionenBreite.FieldName := 'Breite';\r\n dsPositionenHoehe.SetParentComponent(dsPositionen);\r\n dsPositionenHoehe.Name := 'dsPositionenHoehe';\r\n dsPositionenHoehe.FieldName := 'Hoehe';\r\n dsPositionenMehrwertsteuersatz.SetParentComponent(dsPositionen);\r\n dsPositionenMehrwertsteuersatz.Name := 'dsPositionenMehrwertsteuersatz';\r\n dsPositionenMehrwertsteuersatz.FieldName := 'Mehrwertsteuersatz';\r\n dsPositionenEndpreis.SetParentComponent(dsPositionen);\r\n dsPositionenEndpreis.Name := 'dsPositionenEndpreis';\r\n dsPositionenEndpreis.FieldName := 'Endpreis';\r\n dsPositionenPosMWST.SetParentComponent(dsPositionen);\r\n dsPositionenPosMWST.Name := 'dsPositionenPosMWST';\r\n dsPositionenPosMWST.FieldName := 'PosMWST';\r\n dsPositionenBruttoEndpreis.SetParentComponent(dsPositionen);\r\n dsPositionenBruttoEndpreis.Name := 'dsPositionenBruttoEndpreis';\r\n dsPositionenBruttoEndpreis.FieldName := 'BruttoEndpreis';\r\n dsPositionenEndpreis_EK.SetParentComponent(dsPositionen);\r\n dsPositionenEndpreis_EK.Name := 'dsPositionenEndpreis_EK';\r\n dsPositionenEndpreis_EK.FieldName := 'Endpreis_EK';\r\n dsPositionenRabattsatz.SetParentComponent(dsPositionen);\r\n dsPositionenRabattsatz.Name := 'dsPositionenRabattsatz';\r\n dsPositionenRabattsatz.FieldName := 'Rabattsatz';\r\n dsPositionenPreisvorRabatt.SetParentComponent(dsPositionen);\r\n dsPositionenPreisvorRabatt.Name := 'dsPositionenPreisvorRabatt';\r\n dsPositionenPreisvorRabatt.FieldName := 'PreisvorRabatt';\r\n dsPositionenPKZ.SetParentComponent(dsPositionen);\r\n dsPositionenPKZ.Name := 'dsPositionenPKZ';\r\n dsPositionenPKZ.FieldName := 'PKZ';\r\n dsPositionenTextfrei10.SetParentComponent(dsPositionen);\r\n dsPositionenTextfrei10.Name := 'dsPositionenTextfrei10';\r\n dsPositionenTextfrei10.FieldName := 'Textfrei10';\r\n dsPositionenTextfrei10.Size := 50;\r\n dsPositionenTextfrei20.SetParentComponent(dsPositionen);\r\n dsPositionenTextfrei20.Name := 'dsPositionenTextfrei20';\r\n dsPositionenTextfrei20.FieldName := 'Textfrei20';\r\n dsPositionenTextfrei20.Size := 50;\r\n dsPositionenProduktionAbgeschlossen.SetParentComponent(dsPositionen);\r\n dsPositionenProduktionAbgeschlossen.Name := 'dsPositionenProduktionAbgeschlossen';\r\n dsPositionenProduktionAbgeschlossen.FieldName := 'ProduktionAbgeschlossen';\r\n dsPositionenEinzelpreisBrutto.SetParentComponent(dsPositionen);\r\n dsPositionenEinzelpreisBrutto.Name := 'dsPositionenEinzelpreisBrutto';\r\n dsPositionenEinzelpreisBrutto.FieldName := 'EinzelpreisBrutto';\r\n dsPositionenPosMarge.SetParentComponent(dsPositionen);\r\n dsPositionenPosMarge.Name := 'dsPositionenPosMarge';\r\n dsPositionenPosMarge.FieldName := 'PosMarge';\r\n dsPositionenPosMargeProzent.SetParentComponent(dsPositionen);\r\n dsPositionenPosMargeProzent.Name := 'dsPositionenPosMargeProzent';\r\n dsPositionenPosMargeProzent.FieldName := 'PosMargeProzent';\r\n dsPositionenBereitsGeliefert.SetParentComponent(dsPositionen);\r\n dsPositionenBereitsGeliefert.Name := 'dsPositionenBereitsGeliefert';\r\n dsPositionenBereitsGeliefert.FieldName := 'BereitsGeliefert';\r\n dsPositionenausliefern.SetParentComponent(dsPositionen);\r\n dsPositionenausliefern.Name := 'dsPositionenausliefern';\r\n dsPositionenausliefern.FieldName := 'ausliefern';\r\n dsPositionenBestellungErledigt.SetParentComponent(dsPositionen);\r\n dsPositionenBestellungErledigt.Name := 'dsPositionenBestellungErledigt';\r\n dsPositionenBestellungErledigt.FieldName := 'BestellungErledigt';\r\n dsPositionenLager.SetParentComponent(dsPositionen);\r\n dsPositionenLager.Name := 'dsPositionenLager';\r\n dsPositionenLager.FieldName := 'Lager';\r\n dsPositionenLager.Size := 50;\r\n dsPositionenbestellen.SetParentComponent(dsPositionen);\r\n dsPositionenbestellen.Name := 'dsPositionenbestellen';\r\n dsPositionenbestellen.FieldName := 'bestellen';\r\n dsPositionenWarenbestand.SetParentComponent(dsPositionen);\r\n dsPositionenWarenbestand.Name := 'dsPositionenWarenbestand';\r\n dsPositionenWarenbestand.FieldName := 'Warenbestand';\r\n dsPositionenArtikelbeschreibungRTF.SetParentComponent(dsPositionen);\r\n dsPositionenArtikelbeschreibungRTF.Name := 'dsPositionenArtikelbeschreibungRTF';\r\n dsPositionenArtikelbeschreibungRTF.FieldName := 'ArtikelbeschreibungRTF';\r\n dsPositionenArtikelbeschreibungRTF.Size := 255;\r\n dsPositionenQuellartikel.SetParentComponent(dsPositionen);\r\n dsPositionenQuellartikel.Name := 'dsPositionenQuellartikel';\r\n dsPositionenQuellartikel.FieldName := 'Quellartikel';\r\n dsPositionenQuellartikel.Size := 25;\r\n dsPositionenArtikelnummerWB.SetParentComponent(dsPositionen);\r\n dsPositionenArtikelnummerWB.Name := 'dsPositionenArtikelnummerWB';\r\n dsPositionenArtikelnummerWB.FieldName := 'ArtikelnummerWB';\r\n dsPositionenArtikelnummerWB.Size := 25;\r\n dsPositionenPreisanteilNetto.SetParentComponent(dsPositionen);\r\n dsPositionenPreisanteilNetto.Name := 'dsPositionenPreisanteilNetto';\r\n dsPositionenPreisanteilNetto.FieldName := 'PreisanteilNetto';\r\n dsPositionenSetHPos.SetParentComponent(dsPositionen);\r\n dsPositionenSetHPos.Name := 'dsPositionenSetHPos';\r\n dsPositionenSetHPos.FieldName := 'SetHPos';\r\n dsPositionenSetHPos.Size := 38;\r\n dsPositionenSetUPos.SetParentComponent(dsPositionen);\r\n dsPositionenSetUPos.Name := 'dsPositionenSetUPos';\r\n dsPositionenSetUPos.FieldName := 'SetUPos';\r\n dsPositionenSetUPos.Size := 38;\r\n dsPositionenProvisionssatz.SetParentComponent(dsPositionen);\r\n dsPositionenProvisionssatz.Name := 'dsPositionenProvisionssatz';\r\n dsPositionenProvisionssatz.FieldName := 'Provisionssatz';\r\n dsPositionenProvisionsbetrag.SetParentComponent(dsPositionen);\r\n dsPositionenProvisionsbetrag.Name := 'dsPositionenProvisionsbetrag';\r\n dsPositionenProvisionsbetrag.FieldName := 'Provisionsbetrag';\r\n dsPositionenArtikelsprache.SetParentComponent(dsPositionen);\r\n dsPositionenArtikelsprache.Name := 'dsPositionenArtikelsprache';\r\n dsPositionenArtikelsprache.FieldName := 'Artikelsprache';\r\n dsPositionenArtikelsprache.Size := 255;\r\n dsPositionenEKvom.SetParentComponent(dsPositionen);\r\n dsPositionenEKvom.Name := 'dsPositionenEKvom';\r\n dsPositionenEKvom.FieldName := 'EKvom';\r\n dsPositionenMengenberechnungID.SetParentComponent(dsPositionen);\r\n dsPositionenMengenberechnungID.Name := 'dsPositionenMengenberechnungID';\r\n dsPositionenMengenberechnungID.FieldName := 'MengenberechnungID';\r\n dsPositionenMengenberechnungID.Size := 38;\r\n dsPositionenTaraID.SetParentComponent(dsPositionen);\r\n dsPositionenTaraID.Name := 'dsPositionenTaraID';\r\n dsPositionenTaraID.FieldName := 'TaraID';\r\n dsPositionenTaraID.Size := 38;\r\n dsPositionenTara.SetParentComponent(dsPositionen);\r\n dsPositionenTara.Name := 'dsPositionenTara';\r\n dsPositionenTara.FieldName := 'Tara';\r\n dsPositionenBruttoGewicht.SetParentComponent(dsPositionen);\r\n dsPositionenBruttoGewicht.Name := 'dsPositionenBruttoGewicht';\r\n dsPositionenBruttoGewicht.FieldName := 'BruttoGewicht';\r\n dsPositionenAussenflaeche.SetParentComponent(dsPositionen);\r\n dsPositionenAussenflaeche.Name := 'dsPositionenAussenflaeche';\r\n dsPositionenAussenflaeche.FieldName := 'Aussenflaeche';\r\n dsPositionenLadeort.SetParentComponent(dsPositionen);\r\n dsPositionenLadeort.Name := 'dsPositionenLadeort';\r\n dsPositionenLadeort.FieldName := 'Ladeort';\r\n dsPositionenLadeort.Size := 50;\r\n dsPositionenSeitenumbruch.SetParentComponent(dsPositionen);\r\n dsPositionenSeitenumbruch.Name := 'dsPositionenSeitenumbruch';\r\n dsPositionenSeitenumbruch.FieldName := 'Seitenumbruch';\r\n dsPositionenPlanerFarbe.SetParentComponent(dsPositionen);\r\n dsPositionenPlanerFarbe.Name := 'dsPositionenPlanerFarbe';\r\n dsPositionenPlanerFarbe.FieldName := 'PlanerFarbe';\r\n dsPositionenMWStKey.SetParentComponent(dsPositionen);\r\n dsPositionenMWStKey.Name := 'dsPositionenMWStKey';\r\n dsPositionenMWStKey.FieldName := 'MWStKey';\r\n dsPositionenZSnachPos.SetParentComponent(dsPositionen);\r\n dsPositionenZSnachPos.Name := 'dsPositionenZSnachPos';\r\n dsPositionenZSnachPos.FieldName := 'ZSnachPos';\r\n dsPositionenLieferzeit.SetParentComponent(dsPositionen);\r\n dsPositionenLieferzeit.Name := 'dsPositionenLieferzeit';\r\n dsPositionenLieferzeit.FieldName := 'Lieferzeit';\r\n dsPositionenLieferzeit.Size := 50;\r\n dsPositionenPreisVorRabattWHG.SetParentComponent(dsPositionen);\r\n dsPositionenPreisVorRabattWHG.Name := 'dsPositionenPreisVorRabattWHG';\r\n dsPositionenPreisVorRabattWHG.FieldName := 'PreisVorRabattWHG';\r\n dsPositionenReferenzKalkulation.SetParentComponent(dsPositionen);\r\n dsPositionenReferenzKalkulation.Name := 'dsPositionenReferenzKalkulation';\r\n dsPositionenReferenzKalkulation.FieldName := 'ReferenzKalkulation';\r\n dsPositionenReferenzKalkulation.Size := 10;\r\n dsPositionenPKey.SetParentComponent(dsPositionen);\r\n dsPositionenPKey.Name := 'dsPositionenPKey';\r\n dsPositionenPKey.FieldName := 'PKey';\r\n dsPositionenAuftragsnummer.SetParentComponent(dsPositionen);\r\n dsPositionenAuftragsnummer.Name := 'dsPositionenAuftragsnummer';\r\n dsPositionenAuftragsnummer.FieldName := 'Auftragsnummer';\r\n dsPositionenlwbID.SetParentComponent(dsPositionen);\r\n dsPositionenlwbID.Name := 'dsPositionenlwbID';\r\n dsPositionenlwbID.FieldName := 'lwbID';\r\n dsPositionenlwbID.Size := 38;\r\n dsPositionenBelegdatum.SetParentComponent(dsPositionen);\r\n dsPositionenBelegdatum.Name := 'dsPositionenBelegdatum';\r\n dsPositionenBelegdatum.FieldName := 'Belegdatum';\r\n dsPositionenWarenkontrollnummern.SetParentComponent(dsPositionen);\r\n dsPositionenWarenkontrollnummern.Name := 'dsPositionenWarenkontrollnummern';\r\n dsPositionenWarenkontrollnummern.FieldName := 'Warenkontrollnummern';\r\n dsPositionenWarenkontrollnummern.Size := 255;\r\n dsPositionenVolumen.SetParentComponent(dsPositionen);\r\n dsPositionenVolumen.Name := 'dsPositionenVolumen';\r\n dsPositionenVolumen.FieldName := 'Volumen';\r\n dsPositionenPosVolumen.SetParentComponent(dsPositionen);\r\n dsPositionenPosVolumen.Name := 'dsPositionenPosVolumen';\r\n dsPositionenPosVolumen.FieldName := 'PosVolumen';\r\n dsPositionenArtikelAttribute.SetParentComponent(dsPositionen);\r\n dsPositionenArtikelAttribute.Name := 'dsPositionenArtikelAttribute';\r\n dsPositionenArtikelAttribute.FieldName := 'ArtikelAttribute';\r\n dsPositionenArtikelAttribute.Size := 255;\r\n dsPositionenMonteurP.SetParentComponent(dsPositionen);\r\n dsPositionenMonteurP.Name := 'dsPositionenMonteurP';\r\n dsPositionenMonteurP.FieldName := 'MonteurP';\r\n dsPositionenArbeitszeitDatum.SetParentComponent(dsPositionen);\r\n dsPositionenArbeitszeitDatum.Name := 'dsPositionenArbeitszeitDatum';\r\n dsPositionenArbeitszeitDatum.FieldName := 'ArbeitszeitDatum';\r\n dsPositionenArbeitszeitVON.SetParentComponent(dsPositionen);\r\n dsPositionenArbeitszeitVON.Name := 'dsPositionenArbeitszeitVON';\r\n dsPositionenArbeitszeitVON.FieldName := 'ArbeitszeitVON';\r\n dsPositionenArbeitszeitVON.DisplayFormat := 'hh:mm';\r\n dsPositionenArbeitszeitBIS.SetParentComponent(dsPositionen);\r\n dsPositionenArbeitszeitBIS.Name := 'dsPositionenArbeitszeitBIS';\r\n dsPositionenArbeitszeitBIS.FieldName := 'ArbeitszeitBIS';\r\n dsPositionenArbeitszeitBIS.DisplayFormat := 'hh:mm';\r\n dsPositionenArtikelnummerArtikelnummer.SetParentComponent(dsPositionen);\r\n dsPositionenArtikelnummerArtikelnummer.Name := 'dsPositionenArtikelnummerArtikelnummer';\r\n dsPositionenArtikelnummerArtikelnummer.FieldName := 'Artikelnummer.Artikelnummer';\r\n dsPositionenArtikelnummerArtikelnummer.Size := 25;\r\n dsPositionenArtikelnummerArbeitszeit.SetParentComponent(dsPositionen);\r\n dsPositionenArtikelnummerArbeitszeit.Name := 'dsPositionenArtikelnummerArbeitszeit';\r\n dsPositionenArtikelnummerArbeitszeit.FieldName := 'Artikelnummer.Arbeitszeit';\r\n sourcePositionen.SetParentComponent(Self);\r\n sourcePositionen.Name := 'sourcePositionen';\r\n sourcePositionen.DataSet := dsPositionen;\r\n sourcePositionen.Left := 136;\r\n sourcePositionen.Top := 128;\r\n dsUnterschriften.SetParentComponent(Self);\r\n dsUnterschriften.Name := 'dsUnterschriften';\r\n dsUnterschriften.AfterApplyUpdates := dsUnterschriftenAfterApplyUpdates;\r\n dsUnterschriften.AfterOpen := dsUnterschriftenAfterOpen;\r\n dsUnterschriften.AfterPost := dsUnterschriftenAfterPost;\r\n dsUnterschriften.EntitySetName := 'AuftragUnterschriften';\r\n dsUnterschriften.Connection := DM2.XDataWebConnection1;\r\n dsUnterschriften.Left := 80;\r\n dsUnterschriften.Top := 176;\r\n dsUnterschriftenNummerkomplett.SetParentComponent(dsUnterschriften);\r\n dsUnterschriftenNummerkomplett.Name := 'dsUnterschriftenNummerkomplett';\r\n dsUnterschriftenNummerkomplett.FieldName := 'Nummerkomplett';\r\n dsUnterschriftenNummerkomplett.Required := True;\r\n dsUnterschriftenNummerkomplett.Size := 10;\r\n dsUnterschriftenDatum.SetParentComponent(dsUnterschriften);\r\n dsUnterschriftenDatum.Name := 'dsUnterschriftenDatum';\r\n dsUnterschriftenDatum.FieldName := 'Datum';\r\n dsUnterschriftenUnterschriftMonteur.SetParentComponent(dsUnterschriften);\r\n dsUnterschriftenUnterschriftMonteur.Name := 'dsUnterschriftenUnterschriftMonteur';\r\n dsUnterschriftenUnterschriftMonteur.FieldName := 'UnterschriftMonteur';\r\n dsUnterschriftenUnterschriftKunde.SetParentComponent(dsUnterschriften);\r\n dsUnterschriftenUnterschriftKunde.Name := 'dsUnterschriftenUnterschriftKunde';\r\n dsUnterschriftenUnterschriftKunde.FieldName := 'UnterschriftKunde';\r\n dsUnterschriftenUnterschriftMonteurText.SetParentComponent(dsUnterschriften);\r\n dsUnterschriftenUnterschriftMonteurText.Name := 'dsUnterschriftenUnterschriftMonteurText';\r\n dsUnterschriftenUnterschriftMonteurText.FieldName := 'UnterschriftMonteurText';\r\n dsUnterschriftenUnterschriftMonteurText.Size := 255;\r\n dsUnterschriftenUnterschriftKundeText.SetParentComponent(dsUnterschriften);\r\n dsUnterschriftenUnterschriftKundeText.Name := 'dsUnterschriftenUnterschriftKundeText';\r\n dsUnterschriftenUnterschriftKundeText.FieldName := 'UnterschriftKundeText';\r\n dsUnterschriftenUnterschriftKundeText.Size := 255;\r\n sourceUnterschriften.SetParentComponent(Self);\r\n sourceUnterschriften.Name := 'sourceUnterschriften';\r\n sourceUnterschriften.DataSet := dsUnterschriften;\r\n sourceUnterschriften.Left := 16;\r\n sourceUnterschriften.Top := 180;\r\n dsSumBeleg.SetParentComponent(Self);\r\n dsSumBeleg.Name := 'dsSumBeleg';\r\n dsSumBeleg.AfterOpen := dsSumBelegAfterOpen;\r\n dsSumBeleg.EntitySetName := 'PositionenAuftrag';\r\n dsSumBeleg.Connection := DM2.XDataWebConnection1;\r\n dsSumBeleg.Left := 136;\r\n dsSumBeleg.Top := 176;\r\n dsSumBelegPosVolumen.SetParentComponent(dsSumBeleg);\r\n dsSumBelegPosVolumen.Name := 'dsSumBelegPosVolumen';\r\n dsSumBelegPosVolumen.FieldName := 'PosVolumen';\r\n dsSumBelegBruttoGewicht.SetParentComponent(dsSumBeleg);\r\n dsSumBelegBruttoGewicht.Name := 'dsSumBelegBruttoGewicht';\r\n dsSumBelegBruttoGewicht.FieldName := 'BruttoGewicht';\r\n dsSumBelegMehrwertsteuersatz.SetParentComponent(dsSumBeleg);\r\n dsSumBelegMehrwertsteuersatz.Name := 'dsSumBelegMehrwertsteuersatz';\r\n dsSumBelegMehrwertsteuersatz.FieldName := 'Mehrwertsteuersatz';\r\n dsSumBelegEndpreis.SetParentComponent(dsSumBeleg);\r\n dsSumBelegEndpreis.Name := 'dsSumBelegEndpreis';\r\n dsSumBelegEndpreis.FieldName := 'Endpreis';\r\n dsSumBelegPosMWST.SetParentComponent(dsSumBeleg);\r\n dsSumBelegPosMWST.Name := 'dsSumBelegPosMWST';\r\n dsSumBelegPosMWST.FieldName := 'PosMWST';\r\n dsSumBelegBruttoEndpreis.SetParentComponent(dsSumBeleg);\r\n dsSumBelegBruttoEndpreis.Name := 'dsSumBelegBruttoEndpreis';\r\n dsSumBelegBruttoEndpreis.FieldName := 'BruttoEndpreis';\r\n dsSumBelegEndpreis_EK.SetParentComponent(dsSumBeleg);\r\n dsSumBelegEndpreis_EK.Name := 'dsSumBelegEndpreis_EK';\r\n dsSumBelegEndpreis_EK.FieldName := 'Endpreis_EK';\r\n dsSumBelegPKZ.SetParentComponent(dsSumBeleg);\r\n dsSumBelegPKZ.Name := 'dsSumBelegPKZ';\r\n dsSumBelegPKZ.FieldName := 'PKZ';\r\n WClient.SetParentComponent(Self);\r\n WClient.Name := 'WClient';\r\n WClient.Connection := DM2.XDataWebConnection1;\r\n WClient.Left := 80;\r\n WClient.Top := 8;\r\n WebHttpRequest1.SetParentComponent(Self);\r\n WebHttpRequest1.Name := 'WebHttpRequest1';\r\n WebHttpRequest1.Headers.BeginUpdate;\r\n try\r\n WebHttpRequest1.Headers.Clear;\r\n WebHttpRequest1.Headers.Add('Cache-Control=no-cache, no-store, must-revalidate');\r\n finally\r\n WebHttpRequest1.Headers.EndUpdate;\r\n end;\r\n WebHttpRequest1.Left := 16;\r\n WebHttpRequest1.Top := 65;\r\n dsObjekt.SetParentComponent(Self);\r\n dsObjekt.Name := 'dsObjekt';\r\n dsObjekt.AfterOpen := dsObjektAfterOpen;\r\n dsObjekt.EntitySetName := 'Objekte';\r\n dsObjekt.Connection := DM2.XDataWebConnection1;\r\n dsObjekt.Left := 16;\r\n dsObjekt.Top := 7;\r\n dsObjektObjektReferenz.SetParentComponent(dsObjekt);\r\n dsObjektObjektReferenz.Name := 'dsObjektObjektReferenz';\r\n dsObjektObjektReferenz.FieldName := 'ObjektReferenz';\r\n dsObjektObjektReferenz.Required := True;\r\n dsObjektObjektReferenz.Size := 13;\r\n dsObjektKurzbezeichnung.SetParentComponent(dsObjekt);\r\n dsObjektKurzbezeichnung.Name := 'dsObjektKurzbezeichnung';\r\n dsObjektKurzbezeichnung.FieldName := 'Kurzbezeichnung';\r\n dsObjektKurzbezeichnung.Size := 25;\r\n dsObjektObjektnummer.SetParentComponent(dsObjekt);\r\n dsObjektObjektnummer.Name := 'dsObjektObjektnummer';\r\n dsObjektObjektnummer.FieldName := 'Objektnummer';\r\n dsObjektObjektnummer.Size := 25;\r\n dsDateien.SetParentComponent(Self);\r\n dsDateien.Name := 'dsDateien';\r\n dsDateien.AfterOpen := dsDateienAfterOpen;\r\n dsDateien.EntitySetName := 'DokumenteDateien';\r\n dsDateien.Connection := DM2.XDataWebConnection1;\r\n dsDateien.Left := 136;\r\n dsDateien.Top := 360;\r\n dsDateienID.SetParentComponent(dsDateien);\r\n dsDateienID.Name := 'dsDateienID';\r\n dsDateienID.FieldName := 'ID';\r\n dsDateienID.Required := True;\r\n dsDateienDatumUhrzeit.SetParentComponent(dsDateien);\r\n dsDateienDatumUhrzeit.Name := 'dsDateienDatumUhrzeit';\r\n dsDateienDatumUhrzeit.FieldName := 'DatumUhrzeit';\r\n dsDateienDatumUhrzeit.Required := True;\r\n dsDateienDateiBetreff.SetParentComponent(dsDateien);\r\n dsDateienDateiBetreff.Name := 'dsDateienDateiBetreff';\r\n dsDateienDateiBetreff.FieldName := 'DateiBetreff';\r\n dsDateienDateiBetreff.Size := 50;\r\n dsDateienNummerkomplett.SetParentComponent(dsDateien);\r\n dsDateienNummerkomplett.Name := 'dsDateienNummerkomplett';\r\n dsDateienNummerkomplett.FieldName := 'Nummerkomplett';\r\n dsDateienNummerkomplett.Size := 10;\r\n finally\r\n TC.AfterLoadDFMValues;\r\n Container1.AfterLoadDFMValues;\r\n btnzurueck.AfterLoadDFMValues;\r\n btnUnterschreiben.AfterLoadDFMValues;\r\n btnPDF.AfterLoadDFMValues;\r\n btnTermine.AfterLoadDFMValues;\r\n Container3.AfterLoadDFMValues;\r\n Container2.AfterLoadDFMValues;\r\n PTC.AfterLoadDFMValues;\r\n btnSpeichern.AfterLoadDFMValues;\r\n pickLieferdatum.AfterLoadDFMValues;\r\n edtAuftragsbezeichnung.AfterLoadDFMValues;\r\n edtLiefertermin.AfterLoadDFMValues;\r\n btnNeuePosition.AfterLoadDFMValues;\r\n Container4.AfterLoadDFMValues;\r\n webDBComboAuftragStatus.AfterLoadDFMValues;\r\n belegComboMonteur.AfterLoadDFMValues;\r\n belegMemoServiceBemerkung.AfterLoadDFMValues;\r\n btnPDFSenden.AfterLoadDFMValues;\r\n edtEmail.AfterLoadDFMValues;\r\n btnPZE_A.AfterLoadDFMValues;\r\n btnPZE_O.AfterLoadDFMValues;\r\n btnDateien.AfterLoadDFMValues;\r\n btnDateienObjekt.AfterLoadDFMValues;\r\n btnDateienKontakt.AfterLoadDFMValues;\r\n dsBeleg.AfterLoadDFMValues;\r\n dsBelegKundennummer.AfterLoadDFMValues;\r\n dsBelegNummerkomplett.AfterLoadDFMValues;\r\n dsBelegReferenzAngebot.AfterLoadDFMValues;\r\n dsBelegReferenzLieferschein.AfterLoadDFMValues;\r\n dsBelegReferenzRechnung.AfterLoadDFMValues;\r\n dsBelegDatum.AfterLoadDFMValues;\r\n dsBelegJahr.AfterLoadDFMValues;\r\n dsBelegKalenderwoche.AfterLoadDFMValues;\r\n dsBelegNachname.AfterLoadDFMValues;\r\n dsBelegVorname.AfterLoadDFMValues;\r\n dsBelegPostleitzahl.AfterLoadDFMValues;\r\n dsBelegOrt.AfterLoadDFMValues;\r\n dsBelegLaenderkuerzel.AfterLoadDFMValues;\r\n dsBelegLand.AfterLoadDFMValues;\r\n dsBelegBriefanrede1.AfterLoadDFMValues;\r\n dsBelegBriefanrede2.AfterLoadDFMValues;\r\n dsBelegEMail.AfterLoadDFMValues;\r\n dsBelegAdresseBild.AfterLoadDFMValues;\r\n dsBelegLieferanschriftBild.AfterLoadDFMValues;\r\n dsBelegZahlungsbedingung.AfterLoadDFMValues;\r\n dsBelegZahlungsbedingungText.AfterLoadDFMValues;\r\n dsBelegAuftragsbezeichnung.AfterLoadDFMValues;\r\n dsBelegAuftragnummerKunde.AfterLoadDFMValues;\r\n dsBelegBestelldatumKunde.AfterLoadDFMValues;\r\n dsBelegILN.AfterLoadDFMValues;\r\n dsBelegKopftext.AfterLoadDFMValues;\r\n dsBelegSchlussbemerkung.AfterLoadDFMValues;\r\n dsBelegGruss.AfterLoadDFMValues;\r\n dsBelegMehrwertsteuersatz1.AfterLoadDFMValues;\r\n dsBelegMehrwertsteuersatz2.AfterLoadDFMValues;\r\n dsBelegNettosumme01.AfterLoadDFMValues;\r\n dsBelegNettosumme02.AfterLoadDFMValues;\r\n dsBelegNettosumme.AfterLoadDFMValues;\r\n dsBelegMehrwertsteuer01.AfterLoadDFMValues;\r\n dsBelegMehrwertsteuer02.AfterLoadDFMValues;\r\n dsBelegMehrwertsteuer.AfterLoadDFMValues;\r\n dsBelegBruttosumme.AfterLoadDFMValues;\r\n dsBelegVersanddatum.AfterLoadDFMValues;\r\n dsBelegSkontosatz.AfterLoadDFMValues;\r\n dsBelegNettosummeEK.AfterLoadDFMValues;\r\n dsBelegNettoMarge.AfterLoadDFMValues;\r\n dsBelegSchreibzeichen.AfterLoadDFMValues;\r\n dsBelegUnterzeichner.AfterLoadDFMValues;\r\n dsBelegTelefonMA.AfterLoadDFMValues;\r\n dsBelegEmailMA.AfterLoadDFMValues;\r\n dsBelegUSTID.AfterLoadDFMValues;\r\n dsBelegUmsatzsteuerausweis.AfterLoadDFMValues;\r\n dsBeleggebucht.AfterLoadDFMValues;\r\n dsBelegLieferdatum.AfterLoadDFMValues;\r\n dsBelegTransportbedingung.AfterLoadDFMValues;\r\n dsBelegMehrwertsteuersatz3.AfterLoadDFMValues;\r\n dsBelegMehrwertsteuer03.AfterLoadDFMValues;\r\n dsBelegNettosumme03.AfterLoadDFMValues;\r\n dsBelegRundungsDifferenz.AfterLoadDFMValues;\r\n dsBelegEmailText.AfterLoadDFMValues;\r\n dsBelegAuftragerledigt.AfterLoadDFMValues;\r\n dsBelegRabattstufe.AfterLoadDFMValues;\r\n dsBelegKFZKennzeichen.AfterLoadDFMValues;\r\n dsBelegFahrgestellnummer.AfterLoadDFMValues;\r\n dsBelegKFZHersteller.AfterLoadDFMValues;\r\n dsBelegErstzulassungsdatum.AfterLoadDFMValues;\r\n dsBelegKMStand.AfterLoadDFMValues;\r\n dsBelegKFZType.AfterLoadDFMValues;\r\n dsBelegInspektionsdatum.AfterLoadDFMValues;\r\n dsBelegDebitorennummer.AfterLoadDFMValues;\r\n dsBelegKostentraeger.AfterLoadDFMValues;\r\n dsBelegRabattsatz.AfterLoadDFMValues;\r\n dsBelegObjektReferenz.AfterLoadDFMValues;\r\n dsBelegBank.AfterLoadDFMValues;\r\n dsBelegBankleitzahl.AfterLoadDFMValues;\r\n dsBelegKontonummer.AfterLoadDFMValues;\r\n dsBelegKontoinhaber.AfterLoadDFMValues;\r\n dsBelegTelefaxnummer.AfterLoadDFMValues;\r\n dsBelegDatumNeu.AfterLoadDFMValues;\r\n dsBelegDatumgeaendert.AfterLoadDFMValues;\r\n dsBelegObjektnummer.AfterLoadDFMValues;\r\n dsBelegLiefertermin.AfterLoadDFMValues;\r\n dsBelegEmailversand.AfterLoadDFMValues;\r\n dsBelegTelefonnummer.AfterLoadDFMValues;\r\n dsBelegMobilTelefon.AfterLoadDFMValues;\r\n dsBelegAuftragFax.AfterLoadDFMValues;\r\n dsBelegREDatum.AfterLoadDFMValues;\r\n dsBelegBenutzerNeu.AfterLoadDFMValues;\r\n dsBelegBenutzerGeaendert.AfterLoadDFMValues;\r\n dsBelegBerechnungBrutto.AfterLoadDFMValues;\r\n dsBelegBruttosumme01.AfterLoadDFMValues;\r\n dsBelegBruttosumme02.AfterLoadDFMValues;\r\n dsBelegBruttosumme03.AfterLoadDFMValues;\r\n dsBelegNotiz.AfterLoadDFMValues;\r\n dsBelegMargeProzent.AfterLoadDFMValues;\r\n dsBelegWarenkreditgesperrt.AfterLoadDFMValues;\r\n dsBelegBelegsprache.AfterLoadDFMValues;\r\n dsBelegDuplicate.AfterLoadDFMValues;\r\n dsBelegperEmail.AfterLoadDFMValues;\r\n dsBelegAnsprechpartner.AfterLoadDFMValues;\r\n dsBelegKundennummerFremd.AfterLoadDFMValues;\r\n dsBelegProtokoll.AfterLoadDFMValues;\r\n dsBelegVerleihauftrag.AfterLoadDFMValues;\r\n dsBelegVerleihVon.AfterLoadDFMValues;\r\n dsBelegVerleihBis.AfterLoadDFMValues;\r\n dsBelegAuftragGenehmigt.AfterLoadDFMValues;\r\n dsBeleggesperrt.AfterLoadDFMValues;\r\n dsBelegVerleihvonText.AfterLoadDFMValues;\r\n dsBelegVerleihbisText.AfterLoadDFMValues;\r\n dsBelegDruckWHG.AfterLoadDFMValues;\r\n dsBelegDruckWHGKurs.AfterLoadDFMValues;\r\n dsBelegProzentsatzZusatzposition.AfterLoadDFMValues;\r\n dsBelegTextZusatzposition.AfterLoadDFMValues;\r\n dsBelegTextzusatzBeschreibung.AfterLoadDFMValues;\r\n dsBelegLayoutname.AfterLoadDFMValues;\r\n dsBelegGesamtgewicht.AfterLoadDFMValues;\r\n dsBelegBetragZusatzposition.AfterLoadDFMValues;\r\n dsBelegReferenzBestellung.AfterLoadDFMValues;\r\n dsBelegTermin1.AfterLoadDFMValues;\r\n dsBelegTermin2.AfterLoadDFMValues;\r\n dsBelegZielkontaktnummer.AfterLoadDFMValues;\r\n dsBelegZielkontaktname.AfterLoadDFMValues;\r\n dsBelegBilddatei1.AfterLoadDFMValues;\r\n dsBelegBilddatei2.AfterLoadDFMValues;\r\n dsBelegZielkontaktnummer2.AfterLoadDFMValues;\r\n dsBelegZielkontaktname2.AfterLoadDFMValues;\r\n dsBelegbestaetigt.AfterLoadDFMValues;\r\n dsBelegZielkontaktnummer3.AfterLoadDFMValues;\r\n dsBelegZielkontaktname3.AfterLoadDFMValues;\r\n dsBelegTermin3.AfterLoadDFMValues;\r\n dsBelegTermin4.AfterLoadDFMValues;\r\n dsBelegMuster.AfterLoadDFMValues;\r\n dsBelegKW.AfterLoadDFMValues;\r\n dsBelegDatenlink.AfterLoadDFMValues;\r\n dsBelegMehrwertsteuersatz4.AfterLoadDFMValues;\r\n dsBelegMehrwertsteuersatz5.AfterLoadDFMValues;\r\n dsBelegMehrwertsteuersatz6.AfterLoadDFMValues;\r\n dsBelegBesteuerungKey.AfterLoadDFMValues;\r\n dsBelegVertreterMatchcode.AfterLoadDFMValues;\r\n dsBelegVerfasser.AfterLoadDFMValues;\r\n dsBelegLieferadresseID.AfterLoadDFMValues;\r\n dsBelegAuftragStatus.AfterLoadDFMValues;\r\n dsBelegMonatJahr.AfterLoadDFMValues;\r\n dsBelegBelegvariante.AfterLoadDFMValues;\r\n dsBelegProduktionsfreigabe.AfterLoadDFMValues;\r\n dsBelegReferenzRahmenAuftrag.AfterLoadDFMValues;\r\n dsBelegDatumRahmenAuftrag.AfterLoadDFMValues;\r\n dsBelegFahrzeugID.AfterLoadDFMValues;\r\n dsBelegAuslieferungKW.AfterLoadDFMValues;\r\n dsBelegBereitstellungDatum.AfterLoadDFMValues;\r\n dsBelegVTUID.AfterLoadDFMValues;\r\n dsBelegLieferanschriftDaten.AfterLoadDFMValues;\r\n dsBelegGesamtVolumen.AfterLoadDFMValues;\r\n dsBelegBelegPKey.AfterLoadDFMValues;\r\n dsBelegDruckParameter.AfterLoadDFMValues;\r\n dsBelegReferenzService.AfterLoadDFMValues;\r\n dsBelegZusatzDaten.AfterLoadDFMValues;\r\n dsBelegStandPDF.AfterLoadDFMValues;\r\n dsBelegPaketdienst.AfterLoadDFMValues;\r\n dsBelegMonteur.AfterLoadDFMValues;\r\n dsBelegKundennummerKundennummer.AfterLoadDFMValues;\r\n dsBelegServiceBemerkung.AfterLoadDFMValues;\r\n SourceBeleg.AfterLoadDFMValues;\r\n dsPositionen.AfterLoadDFMValues;\r\n dsPositionenArtikelnummer.AfterLoadDFMValues;\r\n dsPositionenNummerkomplett.AfterLoadDFMValues;\r\n dsPositionenID.AfterLoadDFMValues;\r\n dsPositionenPosNr.AfterLoadDFMValues;\r\n dsPositionenPosUNr.AfterLoadDFMValues;\r\n dsPositionenSumme.AfterLoadDFMValues;\r\n dsPositionenArtikelueberschrift.AfterLoadDFMValues;\r\n dsPositionenArtikelbeschreibung.AfterLoadDFMValues;\r\n dsPositionenMenge.AfterLoadDFMValues;\r\n dsPositionenArtderMenge.AfterLoadDFMValues;\r\n dsPositionenVerkaufspreis.AfterLoadDFMValues;\r\n dsPositionenEinkaufspreis.AfterLoadDFMValues;\r\n dsPositionenSeriennummer.AfterLoadDFMValues;\r\n dsPositionenWarengruppe.AfterLoadDFMValues;\r\n dsPositionenWarenuntergruppe.AfterLoadDFMValues;\r\n dsPositionenArtikelnummerKunde.AfterLoadDFMValues;\r\n dsPositionenLieferant.AfterLoadDFMValues;\r\n dsPositionenGewicht.AfterLoadDFMValues;\r\n dsPositionenLaenge.AfterLoadDFMValues;\r\n dsPositionenBreite.AfterLoadDFMValues;\r\n dsPositionenHoehe.AfterLoadDFMValues;\r\n dsPositionenMehrwertsteuersatz.AfterLoadDFMValues;\r\n dsPositionenEndpreis.AfterLoadDFMValues;\r\n dsPositionenPosMWST.AfterLoadDFMValues;\r\n dsPositionenBruttoEndpreis.AfterLoadDFMValues;\r\n dsPositionenEndpreis_EK.AfterLoadDFMValues;\r\n dsPositionenRabattsatz.AfterLoadDFMValues;\r\n dsPositionenPreisvorRabatt.AfterLoadDFMValues;\r\n dsPositionenPKZ.AfterLoadDFMValues;\r\n dsPositionenTextfrei10.AfterLoadDFMValues;\r\n dsPositionenTextfrei20.AfterLoadDFMValues;\r\n dsPositionenProduktionAbgeschlossen.AfterLoadDFMValues;\r\n dsPositionenEinzelpreisBrutto.AfterLoadDFMValues;\r\n dsPositionenPosMarge.AfterLoadDFMValues;\r\n dsPositionenPosMargeProzent.AfterLoadDFMValues;\r\n dsPositionenBereitsGeliefert.AfterLoadDFMValues;\r\n dsPositionenausliefern.AfterLoadDFMValues;\r\n dsPositionenBestellungErledigt.AfterLoadDFMValues;\r\n dsPositionenLager.AfterLoadDFMValues;\r\n dsPositionenbestellen.AfterLoadDFMValues;\r\n dsPositionenWarenbestand.AfterLoadDFMValues;\r\n dsPositionenArtikelbeschreibungRTF.AfterLoadDFMValues;\r\n dsPositionenQuellartikel.AfterLoadDFMValues;\r\n dsPositionenArtikelnummerWB.AfterLoadDFMValues;\r\n dsPositionenPreisanteilNetto.AfterLoadDFMValues;\r\n dsPositionenSetHPos.AfterLoadDFMValues;\r\n dsPositionenSetUPos.AfterLoadDFMValues;\r\n dsPositionenProvisionssatz.AfterLoadDFMValues;\r\n dsPositionenProvisionsbetrag.AfterLoadDFMValues;\r\n dsPositionenArtikelsprache.AfterLoadDFMValues;\r\n dsPositionenEKvom.AfterLoadDFMValues;\r\n dsPositionenMengenberechnungID.AfterLoadDFMValues;\r\n dsPositionenTaraID.AfterLoadDFMValues;\r\n dsPositionenTara.AfterLoadDFMValues;\r\n dsPositionenBruttoGewicht.AfterLoadDFMValues;\r\n dsPositionenAussenflaeche.AfterLoadDFMValues;\r\n dsPositionenLadeort.AfterLoadDFMValues;\r\n dsPositionenSeitenumbruch.AfterLoadDFMValues;\r\n dsPositionenPlanerFarbe.AfterLoadDFMValues;\r\n dsPositionenMWStKey.AfterLoadDFMValues;\r\n dsPositionenZSnachPos.AfterLoadDFMValues;\r\n dsPositionenLieferzeit.AfterLoadDFMValues;\r\n dsPositionenPreisVorRabattWHG.AfterLoadDFMValues;\r\n dsPositionenReferenzKalkulation.AfterLoadDFMValues;\r\n dsPositionenPKey.AfterLoadDFMValues;\r\n dsPositionenAuftragsnummer.AfterLoadDFMValues;\r\n dsPositionenlwbID.AfterLoadDFMValues;\r\n dsPositionenBelegdatum.AfterLoadDFMValues;\r\n dsPositionenWarenkontrollnummern.AfterLoadDFMValues;\r\n dsPositionenVolumen.AfterLoadDFMValues;\r\n dsPositionenPosVolumen.AfterLoadDFMValues;\r\n dsPositionenArtikelAttribute.AfterLoadDFMValues;\r\n dsPositionenMonteurP.AfterLoadDFMValues;\r\n dsPositionenArbeitszeitDatum.AfterLoadDFMValues;\r\n dsPositionenArbeitszeitVON.AfterLoadDFMValues;\r\n dsPositionenArbeitszeitBIS.AfterLoadDFMValues;\r\n dsPositionenArtikelnummerArtikelnummer.AfterLoadDFMValues;\r\n dsPositionenArtikelnummerArbeitszeit.AfterLoadDFMValues;\r\n sourcePositionen.AfterLoadDFMValues;\r\n dsUnterschriften.AfterLoadDFMValues;\r\n dsUnterschriftenNummerkomplett.AfterLoadDFMValues;\r\n dsUnterschriftenDatum.AfterLoadDFMValues;\r\n dsUnterschriftenUnterschriftMonteur.AfterLoadDFMValues;\r\n dsUnterschriftenUnterschriftKunde.AfterLoadDFMValues;\r\n dsUnterschriftenUnterschriftMonteurText.AfterLoadDFMValues;\r\n dsUnterschriftenUnterschriftKundeText.AfterLoadDFMValues;\r\n sourceUnterschriften.AfterLoadDFMValues;\r\n dsSumBeleg.AfterLoadDFMValues;\r\n dsSumBelegPosVolumen.AfterLoadDFMValues;\r\n dsSumBelegBruttoGewicht.AfterLoadDFMValues;\r\n dsSumBelegMehrwertsteuersatz.AfterLoadDFMValues;\r\n dsSumBelegEndpreis.AfterLoadDFMValues;\r\n dsSumBelegPosMWST.AfterLoadDFMValues;\r\n dsSumBelegBruttoEndpreis.AfterLoadDFMValues;\r\n dsSumBelegEndpreis_EK.AfterLoadDFMValues;\r\n dsSumBelegPKZ.AfterLoadDFMValues;\r\n WClient.AfterLoadDFMValues;\r\n WebHttpRequest1.AfterLoadDFMValues;\r\n dsObjekt.AfterLoadDFMValues;\r\n dsObjektObjektReferenz.AfterLoadDFMValues;\r\n dsObjektKurzbezeichnung.AfterLoadDFMValues;\r\n dsObjektObjektnummer.AfterLoadDFMValues;\r\n dsDateien.AfterLoadDFMValues;\r\n dsDateienID.AfterLoadDFMValues;\r\n dsDateienDatumUhrzeit.AfterLoadDFMValues;\r\n dsDateienDateiBetreff.AfterLoadDFMValues;\r\n dsDateienNummerkomplett.AfterLoadDFMValues;\r\n end;\r\nend;\r\n\r\nend.\r\n","unit Unit2;\r\n\r\ninterface\r\n\r\nuses\r\n System.SysUtils, System.Classes, JS, Web, WEBLib.Modules, WEBLib.CDS, strutils,\r\n XData.Web.Connection, WEBLib.REST, Data.DB, XData.Web.JsonDataset,\r\n XData.Web.Dataset, WEBLib.DB, WEBLib.JSON, XData.Web.Client;\r\n\r\ntype\r\n TDM2 = class(TDataModule)\r\n XDataWebConnection1: TXDataWebConnection;\r\n tableAuftragStatus: TXDataWebDataSet;\r\n sourceAuftragStatus: TDataSource;\r\n tableAuftragStatusAuftragStatus: TStringField;\r\n tableSYSDAT: TXDataWebDataSet;\r\n sourceSysdat: TDataSource;\r\n tableSYSDATDBKEY: TStringField;\r\n tableSYSDATNachname: TStringField;\r\n tableSYSDATVorname: TStringField;\r\n tableSYSDATNamenzeile2: TStringField;\r\n tableSYSDATNamenzeile3: TStringField;\r\n tableSYSDATStrasse: TStringField;\r\n tableSYSDATPostleitzahl: TStringField;\r\n tableSYSDATOrt: TStringField;\r\n tableSYSDATLaenderkuerzel: TStringField;\r\n tableSYSDATLand: TStringField;\r\n tableSYSDATTelefonnummer: TStringField;\r\n tableSYSDATTelefaxnummer: TStringField;\r\n tableSYSDATMobiltelefon: TStringField;\r\n tableSYSDATEmail: TStringField;\r\n tableSYSDATCadiaKundennummer: TStringField;\r\n queryMonteur: TXDataWebDataSet;\r\n sourceMonteur: TDataSource;\r\n queryMonteurPersonalnummer: TIntegerField;\r\n queryMonteurNachname: TStringField;\r\n queryMonteurVorname: TStringField;\r\n queryMonteurSchreibzeichen: TStringField;\r\n queryMonteurServicetechniker: TBooleanField;\r\n tableMengenarten: TXDataWebDataSet;\r\n sourceMengenarten: TDataSource;\r\n tableMengenartenArtderMenge: TStringField;\r\n tableMengenartenISO3: TStringField;\r\n tableMengenartenMengenauswahl: TBooleanField;\r\n tableMengenartenVGPauswahl: TBooleanField;\r\n tableMengenartenUVPauswahl: TBooleanField;\r\n tableMengenartenVKPDivisor: TFloatField;\r\n tableSYSDATRundungIT: TBooleanField;\r\n tableSYSDATNachkommastellen: TIntegerField;\r\n queryMonteurPersonalGUID: TStringField;\r\n WebHttpRequest2: THttpRequest;\r\n WebHttpRequestLogbuch: THttpRequest;\r\n WClientAbsenderzeile: TXDataWebClient;\r\n tableSYSDATAbsenderzeile: TStringField;\r\n queryMonteurFarbe: TIntegerField;\r\n xdsPZEEinstellungen: TXDataWebDataSet;\r\n xdsPZEEinstellungenZuordnungObjekt: TIntegerField;\r\n xdsPZEEinstellungenZuordnungKontakt: TIntegerField;\r\n xdsPZEEinstellungenZuordnungAuftrag: TIntegerField;\r\n xdsPZEEinstellungenZuordnungProduktion: TIntegerField;\r\n xdsPZEEinstellungenAuswahlNurKontaktnummer: TIntegerField;\r\n xdsPZEEinstellungenPauseVorgabe: TIntegerField;\r\n XDataWebDataSet1: TXDataWebDataSet;\r\n procedure XDataWebConnection1Connect(Sender: TObject);\r\n procedure tableAuftragStatusAfterOpen(DataSet: TDataSet);\r\n procedure tableSYSDATAfterOpen(DataSet: TDataSet);\r\n procedure queryMonteurAfterOpen(DataSet: TDataSet);\r\n procedure tableMengenartenAfterOpen(DataSet: TDataSet);\r\n procedure WebHttpRequest2Response(Sender: TObject; AResponse: string);\r\n procedure XDataWebConnection1Request(Args: TXDataWebConnectionRequest);\r\n procedure xdsPZEEinstellungenAfterOpen(DataSet: TDataSet);\r\n\r\n public\r\n function roundkfm(alterwert:double;kommastellen:integer):double;\r\n function holevkpdivisor(Mengenart:string):double;\r\n function checkrabattierung(Artikelnummer:string):boolean;\r\n protected procedure LoadDFMValues; override; end;\r\n\r\nvar\r\n DM2: TDM2;\r\n tempvgpdivisor:double;\r\n frund:integer;\r\n\r\nimplementation\r\n uses unit1,unit_Einzelauftrag;\r\n{%CLASSGROUP 'Vcl.Controls.TControl'}\r\n\r\n{$R *.dfm}\r\n\r\nprocedure TDM2.queryMonteurAfterOpen(DataSet: TDataSet);\r\nbegin\r\n xdspzeeinstellungen.load;\r\nend;\r\n\r\nfunction TDM2.roundkfm(alterwert:double;kommastellen:integer):double;\r\nvar\r\nfaktor:integer;\r\nneuerwert:double;\r\nbegin\r\n result:=0;\r\n neuerwert:=0;\r\n if kommastellen=0 then faktor:=1;\r\n if kommastellen=-1 then faktor:=10;\r\n if kommastellen=-2 then faktor:=100;\r\n if kommastellen=-3 then faktor:=1000;\r\n if kommastellen=-4 then faktor:=10000;\r\n if kommastellen=-5 then faktor:=100000;\r\n if kommastellen=-6 then faktor:=1000000;\r\n // wenn die zahl positiv ist\r\n if alterwert>0 then neuerwert:=(alterwert*faktor + 0.5000001);\r\n // wenn die zahl negativ ist\r\n if alterwert<0 then neuerwert:=(alterwert*faktor - 0.5000001);\r\n result:=int(neuerwert);\r\n result:=result/faktor;\r\nend;\r\n\r\nfunction TDM2.holevkpdivisor(Mengenart:string):double;\r\nbegin\r\n result:=1;\r\n //dm2.tablemengenarten.Open;\r\n if dm2.tablemengenarten.locate('ArtderMenge',Mengenart,[])=true then\r\n begin\r\n if dm2.tablemengenartenVKPDivisor.AsFloat<>0 then result:=dm2.tablemengenartenVKPDivisor.AsFloat;\r\n end;\r\nend;\r\n\r\nfunction TDM2.checkrabattierung(Artikelnummer:string):boolean;\r\nbegin\r\n result:=false;\r\n {query.close;\r\n query.sql.clear;\r\n query.sql.append('select rabattierfaehig from artikel where artikelnummer='''+Artikelnummer+'''');\r\n query.open;\r\n if query.fieldbyname('rabattierfaehig').asboolean=true then result:=TRUE;\r\n query.close;\r\n }\r\nend;\r\n\r\nprocedure TDM2.tableAuftragStatusAfterOpen(DataSet: TDataSet);\r\nbegin\r\n tablesysdat.Load;\r\nend;\r\n\r\nprocedure TDM2.tableMengenartenAfterOpen(DataSet: TDataSet);\r\nbegin\r\n WebHttpRequest2.URL:='https://cadia-software.net/cadiaautoserver/xdata/InformationService/cwlizenzonly?Kundennummer='+tableSYSDATCadiaKundennummer.AsString+'&AppKey='+CadiaAppKeyServerLizenz;\r\n WebHttpRequest2.Execute;\r\nend;\r\n\r\nprocedure TDM2.tableSYSDATAfterOpen(DataSet: TDataSet);\r\n procedure OnResponse(Response:TXDataClientResponse);\r\n var\r\n mydownload:string;\r\n begin\r\n mydownload:=string(TJSObject(response.Result)['value']);\r\n TextAbsenderzeile:=leftstr(mydownload,70);\r\n queryMonteur.load;\r\n\r\n\r\n end;\r\nbegin\r\n CadiaKundennummer:=dm2.tableSYSDATCadiaKundennummer.AsString;\r\n frund:=dm2.tablesysdatnachkommastellen.asinteger*-1;\r\n WClientAbsenderzeile.RawInvoke('IServerService.RTFTOTEXT',[tableSYSDATAbsenderzeile.AsString],@OnResponse);\r\nend;\r\n\r\nprocedure TDM2.WebHttpRequest2Response(Sender: TObject; AResponse: string);\r\nvar\r\n JS:TJSON;\r\n JV:TJSONValue;\r\nbegin\r\n JS:=TJSON.Create;\r\n JV:=JS.Parse(AResponse);\r\n if assigned(JV) and (JV IS TJSONObject) then\r\n begin\r\n if TJSONObject(JV).GetJSONValue('value')='OK' then LizenzOK:=true;\r\n form1.labelonlinestatus.Caption:='Lizenz vorhanden: '+TJSONObject(JV).GetJSONValue('value');\r\n form1.btnAnmelden.enabled:=LizenzOK;\r\n\r\n end;\r\nend;\r\n\r\nprocedure TDM2.XDataWebConnection1Connect(Sender: TObject);\r\nbegin\r\n tableAuftragStatus.Load;\r\nend;\r\n\r\nprocedure TDM2.XDataWebConnection1Request(Args: TXDataWebConnectionRequest);\r\nbegin\r\n args.Request.Headers.SetValue('Authorization','Bearer ' + vToken);\r\nend;\r\n\r\nprocedure TDM2.xdsPZEEinstellungenAfterOpen(DataSet: TDataSet);\r\nbegin\r\n PZE_Objekt_erlaubt:=0;\r\n PZE_Auftrag_erlaubt:=0;\r\n if xdsPZEEinstellungenZuordnungObjekt.AsInteger=1 then PZE_Objekt_erlaubt:=1;\r\n if xdsPZEEinstellungenZuordnungAuftrag.AsInteger=1 then PZE_Auftrag_erlaubt:=1;\r\n tableMengenarten.Load;\r\nend;\r\n\r\nprocedure TDM2.LoadDFMValues;\r\nbegin\r\n inherited LoadDFMValues;\r\n\r\n XDataWebConnection1 := TXDataWebConnection.Create(Self);\r\n tableAuftragStatus := TXDataWebDataSet.Create(Self);\r\n tableAuftragStatusAuftragStatus := TStringField.Create(Self);\r\n sourceAuftragStatus := TDataSource.Create(Self);\r\n tableSYSDAT := TXDataWebDataSet.Create(Self);\r\n tableSYSDATDBKEY := TStringField.Create(Self);\r\n tableSYSDATNachname := TStringField.Create(Self);\r\n tableSYSDATVorname := TStringField.Create(Self);\r\n tableSYSDATNamenzeile2 := TStringField.Create(Self);\r\n tableSYSDATNamenzeile3 := TStringField.Create(Self);\r\n tableSYSDATStrasse := TStringField.Create(Self);\r\n tableSYSDATPostleitzahl := TStringField.Create(Self);\r\n tableSYSDATOrt := TStringField.Create(Self);\r\n tableSYSDATLaenderkuerzel := TStringField.Create(Self);\r\n tableSYSDATLand := TStringField.Create(Self);\r\n tableSYSDATTelefonnummer := TStringField.Create(Self);\r\n tableSYSDATTelefaxnummer := TStringField.Create(Self);\r\n tableSYSDATMobiltelefon := TStringField.Create(Self);\r\n tableSYSDATEmail := TStringField.Create(Self);\r\n tableSYSDATCadiaKundennummer := TStringField.Create(Self);\r\n tableSYSDATRundungIT := TBooleanField.Create(Self);\r\n tableSYSDATNachkommastellen := TIntegerField.Create(Self);\r\n tableSYSDATAbsenderzeile := TStringField.Create(Self);\r\n sourceSysdat := TDataSource.Create(Self);\r\n queryMonteur := TXDataWebDataSet.Create(Self);\r\n queryMonteurPersonalnummer := TIntegerField.Create(Self);\r\n queryMonteurNachname := TStringField.Create(Self);\r\n queryMonteurVorname := TStringField.Create(Self);\r\n queryMonteurSchreibzeichen := TStringField.Create(Self);\r\n queryMonteurServicetechniker := TBooleanField.Create(Self);\r\n queryMonteurPersonalGUID := TStringField.Create(Self);\r\n queryMonteurFarbe := TIntegerField.Create(Self);\r\n sourceMonteur := TDataSource.Create(Self);\r\n tableMengenarten := TXDataWebDataSet.Create(Self);\r\n tableMengenartenArtderMenge := TStringField.Create(Self);\r\n tableMengenartenISO3 := TStringField.Create(Self);\r\n tableMengenartenMengenauswahl := TBooleanField.Create(Self);\r\n tableMengenartenVGPauswahl := TBooleanField.Create(Self);\r\n tableMengenartenUVPauswahl := TBooleanField.Create(Self);\r\n tableMengenartenVKPDivisor := TFloatField.Create(Self);\r\n sourceMengenarten := TDataSource.Create(Self);\r\n WebHttpRequest2 := THttpRequest.Create(Self);\r\n WebHttpRequestLogbuch := THttpRequest.Create(Self);\r\n WClientAbsenderzeile := TXDataWebClient.Create(Self);\r\n xdsPZEEinstellungen := TXDataWebDataSet.Create(Self);\r\n xdsPZEEinstellungenZuordnungObjekt := TIntegerField.Create(Self);\r\n xdsPZEEinstellungenZuordnungKontakt := TIntegerField.Create(Self);\r\n xdsPZEEinstellungenZuordnungAuftrag := TIntegerField.Create(Self);\r\n xdsPZEEinstellungenZuordnungProduktion := TIntegerField.Create(Self);\r\n xdsPZEEinstellungenAuswahlNurKontaktnummer := TIntegerField.Create(Self);\r\n xdsPZEEinstellungenPauseVorgabe := TIntegerField.Create(Self);\r\n XDataWebDataSet1 := TXDataWebDataSet.Create(Self);\r\n\r\n XDataWebConnection1.BeforeLoadDFMValues;\r\n tableAuftragStatus.BeforeLoadDFMValues;\r\n tableAuftragStatusAuftragStatus.BeforeLoadDFMValues;\r\n sourceAuftragStatus.BeforeLoadDFMValues;\r\n tableSYSDAT.BeforeLoadDFMValues;\r\n tableSYSDATDBKEY.BeforeLoadDFMValues;\r\n tableSYSDATNachname.BeforeLoadDFMValues;\r\n tableSYSDATVorname.BeforeLoadDFMValues;\r\n tableSYSDATNamenzeile2.BeforeLoadDFMValues;\r\n tableSYSDATNamenzeile3.BeforeLoadDFMValues;\r\n tableSYSDATStrasse.BeforeLoadDFMValues;\r\n tableSYSDATPostleitzahl.BeforeLoadDFMValues;\r\n tableSYSDATOrt.BeforeLoadDFMValues;\r\n tableSYSDATLaenderkuerzel.BeforeLoadDFMValues;\r\n tableSYSDATLand.BeforeLoadDFMValues;\r\n tableSYSDATTelefonnummer.BeforeLoadDFMValues;\r\n tableSYSDATTelefaxnummer.BeforeLoadDFMValues;\r\n tableSYSDATMobiltelefon.BeforeLoadDFMValues;\r\n tableSYSDATEmail.BeforeLoadDFMValues;\r\n tableSYSDATCadiaKundennummer.BeforeLoadDFMValues;\r\n tableSYSDATRundungIT.BeforeLoadDFMValues;\r\n tableSYSDATNachkommastellen.BeforeLoadDFMValues;\r\n tableSYSDATAbsenderzeile.BeforeLoadDFMValues;\r\n sourceSysdat.BeforeLoadDFMValues;\r\n queryMonteur.BeforeLoadDFMValues;\r\n queryMonteurPersonalnummer.BeforeLoadDFMValues;\r\n queryMonteurNachname.BeforeLoadDFMValues;\r\n queryMonteurVorname.BeforeLoadDFMValues;\r\n queryMonteurSchreibzeichen.BeforeLoadDFMValues;\r\n queryMonteurServicetechniker.BeforeLoadDFMValues;\r\n queryMonteurPersonalGUID.BeforeLoadDFMValues;\r\n queryMonteurFarbe.BeforeLoadDFMValues;\r\n sourceMonteur.BeforeLoadDFMValues;\r\n tableMengenarten.BeforeLoadDFMValues;\r\n tableMengenartenArtderMenge.BeforeLoadDFMValues;\r\n tableMengenartenISO3.BeforeLoadDFMValues;\r\n tableMengenartenMengenauswahl.BeforeLoadDFMValues;\r\n tableMengenartenVGPauswahl.BeforeLoadDFMValues;\r\n tableMengenartenUVPauswahl.BeforeLoadDFMValues;\r\n tableMengenartenVKPDivisor.BeforeLoadDFMValues;\r\n sourceMengenarten.BeforeLoadDFMValues;\r\n WebHttpRequest2.BeforeLoadDFMValues;\r\n WebHttpRequestLogbuch.BeforeLoadDFMValues;\r\n WClientAbsenderzeile.BeforeLoadDFMValues;\r\n xdsPZEEinstellungen.BeforeLoadDFMValues;\r\n xdsPZEEinstellungenZuordnungObjekt.BeforeLoadDFMValues;\r\n xdsPZEEinstellungenZuordnungKontakt.BeforeLoadDFMValues;\r\n xdsPZEEinstellungenZuordnungAuftrag.BeforeLoadDFMValues;\r\n xdsPZEEinstellungenZuordnungProduktion.BeforeLoadDFMValues;\r\n xdsPZEEinstellungenAuswahlNurKontaktnummer.BeforeLoadDFMValues;\r\n xdsPZEEinstellungenPauseVorgabe.BeforeLoadDFMValues;\r\n XDataWebDataSet1.BeforeLoadDFMValues;\r\n try\r\n Name := 'DM2';\r\n Height := 628;\r\n Width := 652;\r\n XDataWebConnection1.SetParentComponent(Self);\r\n XDataWebConnection1.Name := 'XDataWebConnection1';\r\n XDataWebConnection1.URL := 'https://langwald-edv.net:443/mandant01/cadiaserver/xdata';\r\n SetEvent(XDataWebConnection1, Self, 'OnConnect', 'XDataWebConnection1Connect');\r\n SetEvent(XDataWebConnection1, Self, 'OnRequest', 'XDataWebConnection1Request');\r\n XDataWebConnection1.Left := 64;\r\n XDataWebConnection1.Top := 32;\r\n tableAuftragStatus.SetParentComponent(Self);\r\n tableAuftragStatus.Name := 'tableAuftragStatus';\r\n tableAuftragStatus.AfterOpen := tableAuftragStatusAfterOpen;\r\n tableAuftragStatus.EntitySetName := 'AuftragStatus';\r\n tableAuftragStatus.Connection := XDataWebConnection1;\r\n tableAuftragStatus.Left := 168;\r\n tableAuftragStatus.Top := 200;\r\n tableAuftragStatusAuftragStatus.SetParentComponent(tableAuftragStatus);\r\n tableAuftragStatusAuftragStatus.Name := 'tableAuftragStatusAuftragStatus';\r\n tableAuftragStatusAuftragStatus.FieldName := 'AuftragStatus';\r\n tableAuftragStatusAuftragStatus.Required := True;\r\n tableAuftragStatusAuftragStatus.Size := 30;\r\n sourceAuftragStatus.SetParentComponent(Self);\r\n sourceAuftragStatus.Name := 'sourceAuftragStatus';\r\n sourceAuftragStatus.DataSet := tableAuftragStatus;\r\n sourceAuftragStatus.Left := 64;\r\n sourceAuftragStatus.Top := 200;\r\n tableSYSDAT.SetParentComponent(Self);\r\n tableSYSDAT.Name := 'tableSYSDAT';\r\n tableSYSDAT.AfterOpen := tableSYSDATAfterOpen;\r\n tableSYSDAT.EntitySetName := 'sysdat';\r\n tableSYSDAT.Connection := XDataWebConnection1;\r\n tableSYSDAT.Left := 160;\r\n tableSYSDAT.Top := 272;\r\n tableSYSDATDBKEY.SetParentComponent(tableSYSDAT);\r\n tableSYSDATDBKEY.Name := 'tableSYSDATDBKEY';\r\n tableSYSDATDBKEY.FieldName := 'DBKEY';\r\n tableSYSDATDBKEY.Size := 38;\r\n tableSYSDATNachname.SetParentComponent(tableSYSDAT);\r\n tableSYSDATNachname.Name := 'tableSYSDATNachname';\r\n tableSYSDATNachname.FieldName := 'Nachname';\r\n tableSYSDATNachname.Size := 40;\r\n tableSYSDATVorname.SetParentComponent(tableSYSDAT);\r\n tableSYSDATVorname.Name := 'tableSYSDATVorname';\r\n tableSYSDATVorname.FieldName := 'Vorname';\r\n tableSYSDATVorname.Size := 40;\r\n tableSYSDATNamenzeile2.SetParentComponent(tableSYSDAT);\r\n tableSYSDATNamenzeile2.Name := 'tableSYSDATNamenzeile2';\r\n tableSYSDATNamenzeile2.FieldName := 'Namenzeile2';\r\n tableSYSDATNamenzeile2.Size := 40;\r\n tableSYSDATNamenzeile3.SetParentComponent(tableSYSDAT);\r\n tableSYSDATNamenzeile3.Name := 'tableSYSDATNamenzeile3';\r\n tableSYSDATNamenzeile3.FieldName := 'Namenzeile3';\r\n tableSYSDATNamenzeile3.Size := 40;\r\n tableSYSDATStrasse.SetParentComponent(tableSYSDAT);\r\n tableSYSDATStrasse.Name := 'tableSYSDATStrasse';\r\n tableSYSDATStrasse.FieldName := 'Strasse';\r\n tableSYSDATStrasse.Size := 40;\r\n tableSYSDATPostleitzahl.SetParentComponent(tableSYSDAT);\r\n tableSYSDATPostleitzahl.Name := 'tableSYSDATPostleitzahl';\r\n tableSYSDATPostleitzahl.FieldName := 'Postleitzahl';\r\n tableSYSDATPostleitzahl.Size := 6;\r\n tableSYSDATOrt.SetParentComponent(tableSYSDAT);\r\n tableSYSDATOrt.Name := 'tableSYSDATOrt';\r\n tableSYSDATOrt.FieldName := 'Ort';\r\n tableSYSDATOrt.Size := 40;\r\n tableSYSDATLaenderkuerzel.SetParentComponent(tableSYSDAT);\r\n tableSYSDATLaenderkuerzel.Name := 'tableSYSDATLaenderkuerzel';\r\n tableSYSDATLaenderkuerzel.FieldName := 'Laenderkuerzel';\r\n tableSYSDATLaenderkuerzel.Size := 5;\r\n tableSYSDATLand.SetParentComponent(tableSYSDAT);\r\n tableSYSDATLand.Name := 'tableSYSDATLand';\r\n tableSYSDATLand.FieldName := 'Land';\r\n tableSYSDATLand.Size := 40;\r\n tableSYSDATTelefonnummer.SetParentComponent(tableSYSDAT);\r\n tableSYSDATTelefonnummer.Name := 'tableSYSDATTelefonnummer';\r\n tableSYSDATTelefonnummer.FieldName := 'Telefonnummer';\r\n tableSYSDATTelefonnummer.Size := 25;\r\n tableSYSDATTelefaxnummer.SetParentComponent(tableSYSDAT);\r\n tableSYSDATTelefaxnummer.Name := 'tableSYSDATTelefaxnummer';\r\n tableSYSDATTelefaxnummer.FieldName := 'Telefaxnummer';\r\n tableSYSDATTelefaxnummer.Size := 25;\r\n tableSYSDATMobiltelefon.SetParentComponent(tableSYSDAT);\r\n tableSYSDATMobiltelefon.Name := 'tableSYSDATMobiltelefon';\r\n tableSYSDATMobiltelefon.FieldName := 'Mobiltelefon';\r\n tableSYSDATMobiltelefon.Size := 25;\r\n tableSYSDATEmail.SetParentComponent(tableSYSDAT);\r\n tableSYSDATEmail.Name := 'tableSYSDATEmail';\r\n tableSYSDATEmail.FieldName := 'Email';\r\n tableSYSDATEmail.Size := 70;\r\n tableSYSDATCadiaKundennummer.SetParentComponent(tableSYSDAT);\r\n tableSYSDATCadiaKundennummer.Name := 'tableSYSDATCadiaKundennummer';\r\n tableSYSDATCadiaKundennummer.FieldName := 'CadiaKundennummer';\r\n tableSYSDATCadiaKundennummer.Size := 13;\r\n tableSYSDATRundungIT.SetParentComponent(tableSYSDAT);\r\n tableSYSDATRundungIT.Name := 'tableSYSDATRundungIT';\r\n tableSYSDATRundungIT.FieldName := 'RundungIT';\r\n tableSYSDATNachkommastellen.SetParentComponent(tableSYSDAT);\r\n tableSYSDATNachkommastellen.Name := 'tableSYSDATNachkommastellen';\r\n tableSYSDATNachkommastellen.FieldName := 'Nachkommastellen';\r\n tableSYSDATAbsenderzeile.SetParentComponent(tableSYSDAT);\r\n tableSYSDATAbsenderzeile.Name := 'tableSYSDATAbsenderzeile';\r\n tableSYSDATAbsenderzeile.FieldName := 'Absenderzeile';\r\n tableSYSDATAbsenderzeile.Size := 255;\r\n sourceSysdat.SetParentComponent(Self);\r\n sourceSysdat.Name := 'sourceSysdat';\r\n sourceSysdat.DataSet := tableSYSDAT;\r\n sourceSysdat.Left := 56;\r\n sourceSysdat.Top := 272;\r\n queryMonteur.SetParentComponent(Self);\r\n queryMonteur.Name := 'queryMonteur';\r\n queryMonteur.AfterOpen := queryMonteurAfterOpen;\r\n queryMonteur.EntitySetName := 'Personal';\r\n queryMonteur.Connection := XDataWebConnection1;\r\n queryMonteur.QueryString := '$filter=Servicetechniker eq True';\r\n queryMonteur.Left := 152;\r\n queryMonteur.Top := 360;\r\n queryMonteurPersonalnummer.SetParentComponent(queryMonteur);\r\n queryMonteurPersonalnummer.Name := 'queryMonteurPersonalnummer';\r\n queryMonteurPersonalnummer.FieldName := 'Personalnummer';\r\n queryMonteurPersonalnummer.Required := True;\r\n queryMonteurNachname.SetParentComponent(queryMonteur);\r\n queryMonteurNachname.Name := 'queryMonteurNachname';\r\n queryMonteurNachname.FieldName := 'Nachname';\r\n queryMonteurNachname.Required := True;\r\n queryMonteurNachname.Size := 40;\r\n queryMonteurVorname.SetParentComponent(queryMonteur);\r\n queryMonteurVorname.Name := 'queryMonteurVorname';\r\n queryMonteurVorname.FieldName := 'Vorname';\r\n queryMonteurVorname.Size := 40;\r\n queryMonteurSchreibzeichen.SetParentComponent(queryMonteur);\r\n queryMonteurSchreibzeichen.Name := 'queryMonteurSchreibzeichen';\r\n queryMonteurSchreibzeichen.FieldName := 'Schreibzeichen';\r\n queryMonteurSchreibzeichen.Size := 10;\r\n queryMonteurServicetechniker.SetParentComponent(queryMonteur);\r\n queryMonteurServicetechniker.Name := 'queryMonteurServicetechniker';\r\n queryMonteurServicetechniker.FieldName := 'Servicetechniker';\r\n queryMonteurPersonalGUID.SetParentComponent(queryMonteur);\r\n queryMonteurPersonalGUID.Name := 'queryMonteurPersonalGUID';\r\n queryMonteurPersonalGUID.FieldName := 'PersonalGUID';\r\n queryMonteurPersonalGUID.Size := 38;\r\n queryMonteurFarbe.SetParentComponent(queryMonteur);\r\n queryMonteurFarbe.Name := 'queryMonteurFarbe';\r\n queryMonteurFarbe.FieldName := 'Farbe';\r\n sourceMonteur.SetParentComponent(Self);\r\n sourceMonteur.Name := 'sourceMonteur';\r\n sourceMonteur.DataSet := queryMonteur;\r\n sourceMonteur.Left := 56;\r\n sourceMonteur.Top := 360;\r\n tableMengenarten.SetParentComponent(Self);\r\n tableMengenarten.Name := 'tableMengenarten';\r\n tableMengenarten.AfterOpen := tableMengenartenAfterOpen;\r\n tableMengenarten.EntitySetName := 'Mengenarten';\r\n tableMengenarten.Connection := XDataWebConnection1;\r\n tableMengenarten.Left := 160;\r\n tableMengenarten.Top := 432;\r\n tableMengenartenArtderMenge.SetParentComponent(tableMengenarten);\r\n tableMengenartenArtderMenge.Name := 'tableMengenartenArtderMenge';\r\n tableMengenartenArtderMenge.FieldName := 'ArtderMenge';\r\n tableMengenartenArtderMenge.Required := True;\r\n tableMengenartenArtderMenge.Size := 50;\r\n tableMengenartenISO3.SetParentComponent(tableMengenarten);\r\n tableMengenartenISO3.Name := 'tableMengenartenISO3';\r\n tableMengenartenISO3.FieldName := 'ISO3';\r\n tableMengenartenISO3.Size := 3;\r\n tableMengenartenMengenauswahl.SetParentComponent(tableMengenarten);\r\n tableMengenartenMengenauswahl.Name := 'tableMengenartenMengenauswahl';\r\n tableMengenartenMengenauswahl.FieldName := 'Mengenauswahl';\r\n tableMengenartenVGPauswahl.SetParentComponent(tableMengenarten);\r\n tableMengenartenVGPauswahl.Name := 'tableMengenartenVGPauswahl';\r\n tableMengenartenVGPauswahl.FieldName := 'VGPauswahl';\r\n tableMengenartenUVPauswahl.SetParentComponent(tableMengenarten);\r\n tableMengenartenUVPauswahl.Name := 'tableMengenartenUVPauswahl';\r\n tableMengenartenUVPauswahl.FieldName := 'UVPauswahl';\r\n tableMengenartenVKPDivisor.SetParentComponent(tableMengenarten);\r\n tableMengenartenVKPDivisor.Name := 'tableMengenartenVKPDivisor';\r\n tableMengenartenVKPDivisor.FieldName := 'VKPDivisor';\r\n sourceMengenarten.SetParentComponent(Self);\r\n sourceMengenarten.Name := 'sourceMengenarten';\r\n sourceMengenarten.DataSet := tableMengenarten;\r\n sourceMengenarten.Left := 56;\r\n sourceMengenarten.Top := 432;\r\n WebHttpRequest2.SetParentComponent(Self);\r\n WebHttpRequest2.Name := 'WebHttpRequest2';\r\n WebHttpRequest2.Headers.BeginUpdate;\r\n try\r\n WebHttpRequest2.Headers.Clear;\r\n WebHttpRequest2.Headers.Add('Cache-Control=no-cache, no-store, must-revalidate');\r\n finally\r\n WebHttpRequest2.Headers.EndUpdate;\r\n end;\r\n WebHttpRequest2.URL := 'https://cadia-software/cadiaserver/xdata/$model';\r\n SetEvent(WebHttpRequest2, Self, 'OnResponse', 'WebHttpRequest2Response');\r\n WebHttpRequest2.Left := 64;\r\n WebHttpRequest2.Top := 104;\r\n WebHttpRequestLogbuch.SetParentComponent(Self);\r\n WebHttpRequestLogbuch.Name := 'WebHttpRequestLogbuch';\r\n WebHttpRequestLogbuch.Headers.BeginUpdate;\r\n try\r\n WebHttpRequestLogbuch.Headers.Clear;\r\n WebHttpRequestLogbuch.Headers.Add('Cache-Control=no-cache, no-store, must-revalidate');\r\n finally\r\n WebHttpRequestLogbuch.Headers.EndUpdate;\r\n end;\r\n WebHttpRequestLogbuch.Left := 208;\r\n WebHttpRequestLogbuch.Top := 104;\r\n WClientAbsenderzeile.SetParentComponent(Self);\r\n WClientAbsenderzeile.Name := 'WClientAbsenderzeile';\r\n WClientAbsenderzeile.Connection := XDataWebConnection1;\r\n WClientAbsenderzeile.Left := 56;\r\n WClientAbsenderzeile.Top := 512;\r\n xdsPZEEinstellungen.SetParentComponent(Self);\r\n xdsPZEEinstellungen.Name := 'xdsPZEEinstellungen';\r\n xdsPZEEinstellungen.AfterOpen := xdsPZEEinstellungenAfterOpen;\r\n xdsPZEEinstellungen.EntitySetName := 'PZE_Einstellungen';\r\n xdsPZEEinstellungen.Connection := XDataWebConnection1;\r\n xdsPZEEinstellungen.Left := 232;\r\n xdsPZEEinstellungen.Top := 512;\r\n xdsPZEEinstellungenZuordnungObjekt.SetParentComponent(xdsPZEEinstellungen);\r\n xdsPZEEinstellungenZuordnungObjekt.Name := 'xdsPZEEinstellungenZuordnungObjekt';\r\n xdsPZEEinstellungenZuordnungObjekt.FieldName := 'ZuordnungObjekt';\r\n xdsPZEEinstellungenZuordnungKontakt.SetParentComponent(xdsPZEEinstellungen);\r\n xdsPZEEinstellungenZuordnungKontakt.Name := 'xdsPZEEinstellungenZuordnungKontakt';\r\n xdsPZEEinstellungenZuordnungKontakt.FieldName := 'ZuordnungKontakt';\r\n xdsPZEEinstellungenZuordnungAuftrag.SetParentComponent(xdsPZEEinstellungen);\r\n xdsPZEEinstellungenZuordnungAuftrag.Name := 'xdsPZEEinstellungenZuordnungAuftrag';\r\n xdsPZEEinstellungenZuordnungAuftrag.FieldName := 'ZuordnungAuftrag';\r\n xdsPZEEinstellungenZuordnungProduktion.SetParentComponent(xdsPZEEinstellungen);\r\n xdsPZEEinstellungenZuordnungProduktion.Name := 'xdsPZEEinstellungenZuordnungProduktion';\r\n xdsPZEEinstellungenZuordnungProduktion.FieldName := 'ZuordnungProduktion';\r\n xdsPZEEinstellungenAuswahlNurKontaktnummer.SetParentComponent(xdsPZEEinstellungen);\r\n xdsPZEEinstellungenAuswahlNurKontaktnummer.Name := 'xdsPZEEinstellungenAuswahlNurKontaktnummer';\r\n xdsPZEEinstellungenAuswahlNurKontaktnummer.FieldName := 'AuswahlNurKontaktnummer';\r\n xdsPZEEinstellungenPauseVorgabe.SetParentComponent(xdsPZEEinstellungen);\r\n xdsPZEEinstellungenPauseVorgabe.Name := 'xdsPZEEinstellungenPauseVorgabe';\r\n xdsPZEEinstellungenPauseVorgabe.FieldName := 'PauseVorgabe';\r\n XDataWebDataSet1.SetParentComponent(Self);\r\n XDataWebDataSet1.Name := 'XDataWebDataSet1';\r\n XDataWebDataSet1.Connection := XDataWebConnection1;\r\n XDataWebDataSet1.Left := 400;\r\n XDataWebDataSet1.Top := 216;\r\n finally\r\n XDataWebConnection1.AfterLoadDFMValues;\r\n tableAuftragStatus.AfterLoadDFMValues;\r\n tableAuftragStatusAuftragStatus.AfterLoadDFMValues;\r\n sourceAuftragStatus.AfterLoadDFMValues;\r\n tableSYSDAT.AfterLoadDFMValues;\r\n tableSYSDATDBKEY.AfterLoadDFMValues;\r\n tableSYSDATNachname.AfterLoadDFMValues;\r\n tableSYSDATVorname.AfterLoadDFMValues;\r\n tableSYSDATNamenzeile2.AfterLoadDFMValues;\r\n tableSYSDATNamenzeile3.AfterLoadDFMValues;\r\n tableSYSDATStrasse.AfterLoadDFMValues;\r\n tableSYSDATPostleitzahl.AfterLoadDFMValues;\r\n tableSYSDATOrt.AfterLoadDFMValues;\r\n tableSYSDATLaenderkuerzel.AfterLoadDFMValues;\r\n tableSYSDATLand.AfterLoadDFMValues;\r\n tableSYSDATTelefonnummer.AfterLoadDFMValues;\r\n tableSYSDATTelefaxnummer.AfterLoadDFMValues;\r\n tableSYSDATMobiltelefon.AfterLoadDFMValues;\r\n tableSYSDATEmail.AfterLoadDFMValues;\r\n tableSYSDATCadiaKundennummer.AfterLoadDFMValues;\r\n tableSYSDATRundungIT.AfterLoadDFMValues;\r\n tableSYSDATNachkommastellen.AfterLoadDFMValues;\r\n tableSYSDATAbsenderzeile.AfterLoadDFMValues;\r\n sourceSysdat.AfterLoadDFMValues;\r\n queryMonteur.AfterLoadDFMValues;\r\n queryMonteurPersonalnummer.AfterLoadDFMValues;\r\n queryMonteurNachname.AfterLoadDFMValues;\r\n queryMonteurVorname.AfterLoadDFMValues;\r\n queryMonteurSchreibzeichen.AfterLoadDFMValues;\r\n queryMonteurServicetechniker.AfterLoadDFMValues;\r\n queryMonteurPersonalGUID.AfterLoadDFMValues;\r\n queryMonteurFarbe.AfterLoadDFMValues;\r\n sourceMonteur.AfterLoadDFMValues;\r\n tableMengenarten.AfterLoadDFMValues;\r\n tableMengenartenArtderMenge.AfterLoadDFMValues;\r\n tableMengenartenISO3.AfterLoadDFMValues;\r\n tableMengenartenMengenauswahl.AfterLoadDFMValues;\r\n tableMengenartenVGPauswahl.AfterLoadDFMValues;\r\n tableMengenartenUVPauswahl.AfterLoadDFMValues;\r\n tableMengenartenVKPDivisor.AfterLoadDFMValues;\r\n sourceMengenarten.AfterLoadDFMValues;\r\n WebHttpRequest2.AfterLoadDFMValues;\r\n WebHttpRequestLogbuch.AfterLoadDFMValues;\r\n WClientAbsenderzeile.AfterLoadDFMValues;\r\n xdsPZEEinstellungen.AfterLoadDFMValues;\r\n xdsPZEEinstellungenZuordnungObjekt.AfterLoadDFMValues;\r\n xdsPZEEinstellungenZuordnungKontakt.AfterLoadDFMValues;\r\n xdsPZEEinstellungenZuordnungAuftrag.AfterLoadDFMValues;\r\n xdsPZEEinstellungenZuordnungProduktion.AfterLoadDFMValues;\r\n xdsPZEEinstellungenAuswahlNurKontaktnummer.AfterLoadDFMValues;\r\n xdsPZEEinstellungenPauseVorgabe.AfterLoadDFMValues;\r\n XDataWebDataSet1.AfterLoadDFMValues;\r\n end;\r\nend;\r\n\r\nend.\r\n","{********************************************************************}\r\n{ }\r\n{ written by TMS Software }\r\n{ copyright (c) 2018 - 2021 }\r\n{ Email : info@tmssoftware.com }\r\n{ Web : http://www.tmssoftware.com }\r\n{ }\r\n{ The source code is given as is. The author is not responsible }\r\n{ for any possible damage done due to the use of this code. }\r\n{ The complete source code remains property of the author and may }\r\n{ not be distributed, published, given or sold in any form as such. }\r\n{ No parts of the source code can be included in any other component }\r\n{ or application without written authorization of the author. }\r\n{********************************************************************}\r\n\r\nunit WEBLib.FlexControls;\r\n\r\n{$DEFINE NOPP}\r\n\r\ninterface\r\n\r\nuses\r\n Classes, JS, WEBLib.Controls, WEBLib.StdCtrls, WEBLib.Graphics, Web, WEBLib.WebTools,\r\n WEBLib.Dialogs;\r\n\r\ntype\r\n TStretchPanel = class(TCustomControl)\r\n private\r\n FStretchContent: TJSElement;\r\n FFixedContent: TJSElement;\r\n FFixedHeight: integer;\r\n procedure SetFixedHeight(const Value: integer);\r\n protected\r\n function CreateElement: TJSElement; override;\r\n procedure UpdateElement; override;\r\n public\r\n procedure CreateInitialize; override;\r\n published\r\n property Align;\r\n property AlignWithMargins;\r\n property Anchors;\r\n property BorderColor;\r\n property BorderStyle;\r\n property ChildOrder;\r\n property Color;\r\n property ElementClassName;\r\n property ElementFont;\r\n property ElementID;\r\n property ElementPosition;\r\n property FixedHeight: integer read FFixedHeight write SetFixedHeight;\r\n property HeightPercent;\r\n property HeightStyle;\r\n property Margins;\r\n property WidthPercent;\r\n property WidthStyle;\r\n property Visible;\r\n property OnClick;\r\n property OnDblClick;\r\n property OnMouseDown;\r\n property OnMouseMove;\r\n property OnMouseUp;\r\n end;\r\n\r\n TWebStretchPanel = class(TStretchPanel);\r\n\r\nimplementation\r\n\r\nuses\r\n SysUtils;\r\n\r\n{ TStretchPanel }\r\n\r\nfunction TStretchPanel.CreateElement: TJSElement;\r\nbegin\r\n Result := document.createElement('DIV');\r\n\r\n FStretchContent := document.createElement('DIV');\r\n FFixedContent := document.createElement('DIV');\r\n\r\n Result.appendChild(FStretchContent);\r\n Result.appendChild(FFixedContent);\r\nend;\r\n\r\nprocedure TStretchPanel.CreateInitialize;\r\nbegin\r\n inherited;\r\n FFixedHeight := 100;\r\n BorderStyle := bsSingle;\r\n ControlStyle := ControlStyle + [csAcceptsControls];\r\n Color := clWindow;\r\n CustomBorder := true;\r\n Width := 400;\r\n Height := 300;\r\nend;\r\n\r\nprocedure TStretchPanel.SetFixedHeight(const Value: integer);\r\nbegin\r\n FFixedHeight := Value;\r\nend;\r\n\r\nprocedure TStretchPanel.UpdateElement;\r\nvar\r\n i: integer;\r\n fragment: TJSDocumentFragment;\r\n ctrlid: string;\r\n deltay,newtop: integer;\r\n el: TJSElement;\r\nbegin\r\n inherited;\r\n\r\n if Assigned(ElementHandle) and not IsUpdating and not (csLoading in ComponentState) then\r\n begin\r\n if not Assigned(FFixedContent) then\r\n begin\r\n FStretchContent := document.createElement('DIV');\r\n FFixedContent := document.createElement('DIV');\r\n\r\n ElementHandle.appendChild(FStretchContent);\r\n ElementHandle.appendChild(FFixedContent);\r\n end;\r\n\r\n TJSHTMLElement(FFixedContent).style.setProperty('position','relative');\r\n\r\n if not (csDesigning in ComponentState) then\r\n TJSHTMLElement(FFixedContent).style.setProperty('height',IntToStr(FixedHeight)+'px')\r\n else\r\n TJSHTMLElement(FFixedContent).style.setProperty('height',IntToStr(Height)+'px');\r\n\r\n ElementHandle.style.setProperty('height','');\r\n\r\n // do not block selection in child controls\r\n ElementHandle.style.setProperty('user-select', '');\r\n\r\n // allow default caret on text\r\n if Cursor = crDefault then\r\n ElementHandle.style.setProperty('cursor', '');\r\n\r\n if WidthStyle = ssAbsolute then\r\n TJSHTMLElement(FStretchContent).style.setProperty('width',IntToStr(Width -8)+'px');\r\n\r\n deltay := GetDesignHeight - FixedHeight;\r\n\r\n for i := 0 to ControlCount - 1 do\r\n begin\r\n fragment := document.createDocumentFragment();\r\n ctrlid := Controls[i].GetID;\r\n\r\n if Controls[i].GetDesignTop < GetDesignHeight - FixedHeight then\r\n begin\r\n el := document.getElementById(ctrlid);\r\n if Assigned(el) then\r\n begin\r\n fragment.appendChild(el);\r\n FStretchContent.appendChild(fragment);\r\n Controls[i].ElementHandle.style.setProperty('position','relative');\r\n end;\r\n end\r\n else\r\n begin\r\n newtop := Controls[i].GetDesignTop - deltay;\r\n Controls[i].Top := newtop;\r\n Controls[i].ElementHandle.style.setProperty('top',IntToStr(newtop)+'px');\r\n el := document.getElementById(ctrlid);\r\n if Assigned(el) then\r\n begin\r\n fragment.appendChild(el);\r\n FFixedContent.appendChild(fragment);\r\n end;\r\n end;\r\n end;\r\n end;\r\nend;\r\n\r\nend.\r\n","unit unit_EinzelAnruf;\r\n\r\ninterface\r\n\r\nuses\r\n System.SysUtils, System.Classes, JS, Web, WEBLib.Graphics, WEBLib.Controls,\r\n WEBLib.Forms, WEBLib.Dialogs, Data.DB, WEBLib.DB, XData.Web.JsonDataset,\r\n XData.Web.Dataset, WEBLib.Buttons, Vcl.Controls, Vcl.StdCtrls,\r\n WEBLib.StdCtrls, WEBLib.ExtCtrls, WEBLib.DBCtrls, WEBLib.Grids, DB;\r\n\r\ntype\r\n TEinzelAnruf = class(TForm)\r\n xdsAnruf: TXDataWebDataSet;\r\n xdsAnrufID: TStringField;\r\n xdsAnrufAnrufTyp: TIntegerField;\r\n xdsAnrufDatum: TDateTimeField;\r\n xdsAnrufRufnummer: TStringField;\r\n xdsAnrufNameFritzBox: TStringField;\r\n xdsAnrufNebenstelle: TStringField;\r\n xdsAnrufAnrufArt: TStringField;\r\n xdsAnrufDauer: TDateTimeField;\r\n xdsAnrufKundennummer: TStringField;\r\n xdsAnrufTeilnehmer: TStringField;\r\n xdsAnrufNotiz: TStringField;\r\n xdsAnrufbis: TDateTimeField;\r\n xdsAnrufDauerMinuten: TIntegerField;\r\n xdsAnrufJahr: TIntegerField;\r\n xdsAnrufMonat: TIntegerField;\r\n xdsAnrufTag: TIntegerField;\r\n xdsAnrufMonatJahr: TDateTimeField;\r\n xdsAnrufDatumKurz: TDateTimeField;\r\n xdsAnrufAPID: TStringField;\r\n xdsAnrufFBox: TStringField;\r\n xdsAnrufabrechnen: TBooleanField;\r\n xdsAnrufAbgerechnetAm: TDateTimeField;\r\n xdsAnrufStundensatz: TFloatField;\r\n xdsAnrufKosten: TFloatField;\r\n xdsAnruferstellt: TDateTimeField;\r\n xdsAnrufgeaendert: TDateTimeField;\r\n xdsAnrufAnrufArtText: TStringField;\r\n sourceAnruf: TDataSource;\r\n TC: TTableControl;\r\n procedure WebFormShow(Sender: TObject);\r\n procedure xdsAnrufAfterPost(DataSet: TDataSet);\r\n procedure xdsAnrufAfterApplyUpdates(Sender: TDataSet;\r\n Info: TResolveResults);\r\n procedure xdsAnrufAfterOpen(DataSet: TDataSet);\r\n private\r\n { Private-Deklarationen }\r\n public\r\n { Public-Deklarationen }\r\n MerkerAnruf:string;\r\n buttonzurueck:TButton;\r\n buttonSpeichern:TButton;\r\n buttonAbbrechen:TButton;\r\n procedure buttonzurueckclick(Sender:TObject);\r\n procedure buttonspeichernclick(Sender:TObject);\r\n procedure buttonAbbrechenclick(Sender:TObject);\r\n protected procedure LoadDFMValues; override; end;\r\n\r\nvar\r\n EinzelAnruf: TEinzelAnruf;\r\n edtTeilnehmer:TDBEdit;\r\n edtNotiz:TDBMemo;\r\n\r\nimplementation\r\n uses unit1, unit2;\r\n{$R *.dfm}\r\n\r\nprocedure TEinzelAnruf.buttonzurueckclick(Sender:TObject);\r\nbegin\r\n self.close;\r\nend;\r\n\r\nprocedure TEinzelAnruf.buttonspeichernclick(Sender:TObject);\r\nbegin\r\n if xdsanruf.State in dseditmodes then\r\n begin\r\n ModalResult:=mrOk;\r\n xdsanruf.Post;\r\n end\r\n else\r\n begin\r\n ModalResult:=mrCancel;\r\n xdsanruf.Close;\r\n self.Close;\r\n end;\r\nend;\r\n\r\nprocedure TEinzelAnruf.buttonAbbrechenclick(Sender:TObject);\r\nbegin\r\n ModalResult:=mrCancel;\r\n xdsanruf.Close;\r\n self.Close;\r\nend;\r\n\r\nprocedure TEinzelAnruf.WebFormShow(Sender: TObject);\r\nbegin\r\n if MerkerAnruf<>'' then\r\n begin\r\n xdsAnruf.Close;\r\n xdsAnruf.QueryString:='$filter=ID eq '+QuotedStr(MerkerAnruf);\r\n xdsAnruf.Load;\r\n\r\n end;\r\n\r\nend;\r\n\r\nprocedure TEinzelAnruf.xdsAnrufAfterApplyUpdates(Sender: TDataSet;\r\n Info: TResolveResults);\r\nbegin\r\n self.Close;\r\nend;\r\n\r\nprocedure TEinzelAnruf.xdsAnrufAfterOpen(DataSet: TDataSet);\r\nvar\r\n i:integer;\r\n myelement:TJSHTMLElement;\r\nbegin\r\n\r\n i:=0;\r\n TC.ColCount:=2;\r\n tc.rowcount:=10;\r\n TC.Cells[0,i]:='

Einzel-Anruf';\r\n inc(i);\r\n myelement:=TC.cellelements[0,i];\r\n buttonzurueck:=TButton.Create(self);\r\n buttonzurueck.ElementClassName:='btn btn-info text-left';\r\n buttonzurueck.HeightStyle:=ssauto;\r\n buttonzurueck.WidthStyle:=ssauto;\r\n buttonzurueck.tag:=0;\r\n buttonzurueck.Caption:='<< zurück';\r\n buttonzurueck.OnClick:=@buttonzurueckClick;\r\n buttonzurueck.ParentElement:=myelement;\r\n\r\n inc(i);\r\n TC.Cells[0,i]:='Datum';\r\n TC.Cells[1,i]:=formatdatetime('DD.MM.YYYY hh:mm:ss',xdsAnrufDatum.asdatetime);\r\n inc(i);\r\n TC.Cells[0,i]:='Dauer (Min.)';\r\n TC.Cells[1,i]:=xdsAnrufDauerMinuten.asstring;\r\n inc(i);\r\n TC.Cells[0,i]:='Rufnummer';\r\n TC.Cells[1,i]:=xdsAnrufRufnummer.asstring;\r\n inc(i);\r\n TC.Cells[0,i]:='Kundennummer';\r\n TC.Cells[1,i]:=xdsAnrufKundennummer.asstring;\r\n inc(i);\r\n TC.Cells[0,i]:='Teilnehmer';\r\n TC.Cells[1,i]:=xdsAnrufTeilnehmer.asstring;\r\n\r\n if xdsanrufkundennummer.asstring='' then\r\n begin\r\n myelement:=TC.CellElements[1,i];\r\n edtTeilnehmer:=TDBEdit.Create(self);\r\n edtTeilnehmer.DataSource:=sourceAnruf;\r\n edtTeilnehmer.DataField:='Teilnehmer';\r\n edtTeilnehmer.ElementClassName:='form-control';\r\n edtTeilnehmer.width:=450;\r\n edtTeilnehmer.Height:=35;\r\n myelement.innerHTML:='';\r\n edtTeilnehmer.ParentElement:=myelement;\r\n end;\r\n\r\n\r\n inc(i);\r\n TC.Cells[0,i]:='Notiz';\r\n\r\n myelement:=TC.CellElements[1,i];\r\n edtNotiz:=TDBMemo.Create(self);\r\n edtNotiz.DataSource:=sourceAnruf;\r\n edtNotiz.DataField:='Notiz';\r\n edtNotiz.ElementClassName:='form-control';\r\n edtNotiz.width:=450;\r\n edtNotiz.Height:=135;\r\n myelement.innerHTML:='';\r\n edtNotiz.ParentElement:=myelement;\r\n\r\n\r\n inc(i);\r\n myelement:=TC.cellelements[0,i];\r\n buttonAbbrechen:=TButton.Create(self);\r\n buttonAbbrechen.ElementClassName:='btn btn-info text-left';\r\n buttonAbbrechen.HeightStyle:=ssauto;\r\n buttonAbbrechen.WidthStyle:=ssauto;\r\n buttonAbbrechen.tag:=0;\r\n buttonAbbrechen.Caption:='abbrechen';\r\n buttonAbbrechen.OnClick:=@buttonAbbrechenClick;\r\n buttonAbbrechen.ParentElement:=myelement;\r\n\r\n myelement:=TC.cellelements[1,i];\r\n buttonSpeichern:=TButton.Create(self);\r\n buttonSpeichern.ElementClassName:='btn btn-info text-left';\r\n buttonSpeichern.HeightStyle:=ssauto;\r\n buttonSpeichern.WidthStyle:=ssauto;\r\n buttonSpeichern.tag:=0;\r\n buttonSpeichern.Caption:='speichern';\r\n buttonSpeichern.OnClick:=@buttonSpeichernClick;\r\n buttonSpeichern.ParentElement:=myelement;\r\n xdsAnruf.First;\r\nend;\r\n\r\nprocedure TEinzelAnruf.xdsAnrufAfterPost(DataSet: TDataSet);\r\nbegin\r\n if LizenzOK then\r\n begin\r\n xdsanruf.ApplyUpdates;\r\n end\r\n else\r\n begin\r\n showmessage('Für das Speichern von Daten sind Sie noch nicht freigeschaltet, bitte erwerben Sie eine Lizenz');\r\n end;\r\nend;\r\n\r\nprocedure TEinzelAnruf.LoadDFMValues;\r\nbegin\r\n inherited LoadDFMValues;\r\n\r\n TC := TTableControl.Create(Self);\r\n xdsAnruf := TXDataWebDataSet.Create(Self);\r\n xdsAnrufID := TStringField.Create(Self);\r\n xdsAnrufAnrufTyp := TIntegerField.Create(Self);\r\n xdsAnrufDatum := TDateTimeField.Create(Self);\r\n xdsAnrufRufnummer := TStringField.Create(Self);\r\n xdsAnrufNameFritzBox := TStringField.Create(Self);\r\n xdsAnrufNebenstelle := TStringField.Create(Self);\r\n xdsAnrufAnrufArt := TStringField.Create(Self);\r\n xdsAnrufDauer := TDateTimeField.Create(Self);\r\n xdsAnrufKundennummer := TStringField.Create(Self);\r\n xdsAnrufTeilnehmer := TStringField.Create(Self);\r\n xdsAnrufNotiz := TStringField.Create(Self);\r\n xdsAnrufbis := TDateTimeField.Create(Self);\r\n xdsAnrufDauerMinuten := TIntegerField.Create(Self);\r\n xdsAnrufJahr := TIntegerField.Create(Self);\r\n xdsAnrufMonat := TIntegerField.Create(Self);\r\n xdsAnrufTag := TIntegerField.Create(Self);\r\n xdsAnrufMonatJahr := TDateTimeField.Create(Self);\r\n xdsAnrufDatumKurz := TDateTimeField.Create(Self);\r\n xdsAnrufAPID := TStringField.Create(Self);\r\n xdsAnrufFBox := TStringField.Create(Self);\r\n xdsAnrufabrechnen := TBooleanField.Create(Self);\r\n xdsAnrufAbgerechnetAm := TDateTimeField.Create(Self);\r\n xdsAnrufStundensatz := TFloatField.Create(Self);\r\n xdsAnrufKosten := TFloatField.Create(Self);\r\n xdsAnruferstellt := TDateTimeField.Create(Self);\r\n xdsAnrufgeaendert := TDateTimeField.Create(Self);\r\n xdsAnrufAnrufArtText := TStringField.Create(Self);\r\n sourceAnruf := TDataSource.Create(Self);\r\n\r\n TC.BeforeLoadDFMValues;\r\n xdsAnruf.BeforeLoadDFMValues;\r\n xdsAnrufID.BeforeLoadDFMValues;\r\n xdsAnrufAnrufTyp.BeforeLoadDFMValues;\r\n xdsAnrufDatum.BeforeLoadDFMValues;\r\n xdsAnrufRufnummer.BeforeLoadDFMValues;\r\n xdsAnrufNameFritzBox.BeforeLoadDFMValues;\r\n xdsAnrufNebenstelle.BeforeLoadDFMValues;\r\n xdsAnrufAnrufArt.BeforeLoadDFMValues;\r\n xdsAnrufDauer.BeforeLoadDFMValues;\r\n xdsAnrufKundennummer.BeforeLoadDFMValues;\r\n xdsAnrufTeilnehmer.BeforeLoadDFMValues;\r\n xdsAnrufNotiz.BeforeLoadDFMValues;\r\n xdsAnrufbis.BeforeLoadDFMValues;\r\n xdsAnrufDauerMinuten.BeforeLoadDFMValues;\r\n xdsAnrufJahr.BeforeLoadDFMValues;\r\n xdsAnrufMonat.BeforeLoadDFMValues;\r\n xdsAnrufTag.BeforeLoadDFMValues;\r\n xdsAnrufMonatJahr.BeforeLoadDFMValues;\r\n xdsAnrufDatumKurz.BeforeLoadDFMValues;\r\n xdsAnrufAPID.BeforeLoadDFMValues;\r\n xdsAnrufFBox.BeforeLoadDFMValues;\r\n xdsAnrufabrechnen.BeforeLoadDFMValues;\r\n xdsAnrufAbgerechnetAm.BeforeLoadDFMValues;\r\n xdsAnrufStundensatz.BeforeLoadDFMValues;\r\n xdsAnrufKosten.BeforeLoadDFMValues;\r\n xdsAnruferstellt.BeforeLoadDFMValues;\r\n xdsAnrufgeaendert.BeforeLoadDFMValues;\r\n xdsAnrufAnrufArtText.BeforeLoadDFMValues;\r\n sourceAnruf.BeforeLoadDFMValues;\r\n try\r\n Name := 'EinzelAnruf';\r\n Width := 159;\r\n Height := 226;\r\n CSSLibrary := cssBootstrap;\r\n ElementFont := efCSS;\r\n SetEvent(Self, 'OnShow', 'WebFormShow');\r\n TC.SetParentComponent(Self);\r\n TC.Name := 'TC';\r\n TC.Left := 0;\r\n TC.Top := 0;\r\n TC.Width := 159;\r\n TC.Height := 226;\r\n TC.ElementClassName := 'table table-hover table-bordered table-striped';\r\n TC.HeightStyle := ssAuto;\r\n TC.Align := alClient;\r\n TC.BorderColor := clSilver;\r\n TC.ChildOrder := 3;\r\n TC.ColHeader := False;\r\n TC.ElementFont := efCSS;\r\n TC.ElementHeaderClassName := 'table-info';\r\n TC.ElementTableClassName := 'table table-hover table-bordered table-striped';\r\n TC.Options.ScrollVertical := True;\r\n TC.WordWrap := True;\r\n TC.ColCount := 1;\r\n TC.RowCount := 5;\r\n xdsAnruf.SetParentComponent(Self);\r\n xdsAnruf.Name := 'xdsAnruf';\r\n xdsAnruf.AfterApplyUpdates := xdsAnrufAfterApplyUpdates;\r\n xdsAnruf.AfterOpen := xdsAnrufAfterOpen;\r\n xdsAnruf.AfterPost := xdsAnrufAfterPost;\r\n xdsAnruf.EntitySetName := 'FritzBoxAnrufe';\r\n xdsAnruf.Connection := DM2.XDataWebConnection1;\r\n xdsAnruf.QueryTop := 1;\r\n xdsAnruf.Left := 93;\r\n xdsAnruf.Top := 101;\r\n xdsAnrufID.SetParentComponent(xdsAnruf);\r\n xdsAnrufID.Name := 'xdsAnrufID';\r\n xdsAnrufID.FieldName := 'ID';\r\n xdsAnrufID.Required := True;\r\n xdsAnrufID.Size := 38;\r\n xdsAnrufAnrufTyp.SetParentComponent(xdsAnruf);\r\n xdsAnrufAnrufTyp.Name := 'xdsAnrufAnrufTyp';\r\n xdsAnrufAnrufTyp.FieldName := 'AnrufTyp';\r\n xdsAnrufDatum.SetParentComponent(xdsAnruf);\r\n xdsAnrufDatum.Name := 'xdsAnrufDatum';\r\n xdsAnrufDatum.FieldName := 'Datum';\r\n xdsAnrufRufnummer.SetParentComponent(xdsAnruf);\r\n xdsAnrufRufnummer.Name := 'xdsAnrufRufnummer';\r\n xdsAnrufRufnummer.FieldName := 'Rufnummer';\r\n xdsAnrufRufnummer.Size := 50;\r\n xdsAnrufNameFritzBox.SetParentComponent(xdsAnruf);\r\n xdsAnrufNameFritzBox.Name := 'xdsAnrufNameFritzBox';\r\n xdsAnrufNameFritzBox.FieldName := 'NameFritzBox';\r\n xdsAnrufNameFritzBox.Size := 50;\r\n xdsAnrufNebenstelle.SetParentComponent(xdsAnruf);\r\n xdsAnrufNebenstelle.Name := 'xdsAnrufNebenstelle';\r\n xdsAnrufNebenstelle.FieldName := 'Nebenstelle';\r\n xdsAnrufNebenstelle.Size := 50;\r\n xdsAnrufAnrufArt.SetParentComponent(xdsAnruf);\r\n xdsAnrufAnrufArt.Name := 'xdsAnrufAnrufArt';\r\n xdsAnrufAnrufArt.FieldName := 'AnrufArt';\r\n xdsAnrufAnrufArt.Size := 50;\r\n xdsAnrufDauer.SetParentComponent(xdsAnruf);\r\n xdsAnrufDauer.Name := 'xdsAnrufDauer';\r\n xdsAnrufDauer.FieldName := 'Dauer';\r\n xdsAnrufKundennummer.SetParentComponent(xdsAnruf);\r\n xdsAnrufKundennummer.Name := 'xdsAnrufKundennummer';\r\n xdsAnrufKundennummer.FieldName := 'Kundennummer';\r\n xdsAnrufKundennummer.Size := 13;\r\n xdsAnrufTeilnehmer.SetParentComponent(xdsAnruf);\r\n xdsAnrufTeilnehmer.Name := 'xdsAnrufTeilnehmer';\r\n xdsAnrufTeilnehmer.FieldName := 'Teilnehmer';\r\n xdsAnrufTeilnehmer.Size := 150;\r\n xdsAnrufNotiz.SetParentComponent(xdsAnruf);\r\n xdsAnrufNotiz.Name := 'xdsAnrufNotiz';\r\n xdsAnrufNotiz.FieldName := 'Notiz';\r\n xdsAnrufNotiz.Size := 255;\r\n xdsAnrufbis.SetParentComponent(xdsAnruf);\r\n xdsAnrufbis.Name := 'xdsAnrufbis';\r\n xdsAnrufbis.FieldName := 'bis';\r\n xdsAnrufDauerMinuten.SetParentComponent(xdsAnruf);\r\n xdsAnrufDauerMinuten.Name := 'xdsAnrufDauerMinuten';\r\n xdsAnrufDauerMinuten.FieldName := 'DauerMinuten';\r\n xdsAnrufJahr.SetParentComponent(xdsAnruf);\r\n xdsAnrufJahr.Name := 'xdsAnrufJahr';\r\n xdsAnrufJahr.FieldName := 'Jahr';\r\n xdsAnrufMonat.SetParentComponent(xdsAnruf);\r\n xdsAnrufMonat.Name := 'xdsAnrufMonat';\r\n xdsAnrufMonat.FieldName := 'Monat';\r\n xdsAnrufTag.SetParentComponent(xdsAnruf);\r\n xdsAnrufTag.Name := 'xdsAnrufTag';\r\n xdsAnrufTag.FieldName := 'Tag';\r\n xdsAnrufMonatJahr.SetParentComponent(xdsAnruf);\r\n xdsAnrufMonatJahr.Name := 'xdsAnrufMonatJahr';\r\n xdsAnrufMonatJahr.FieldName := 'MonatJahr';\r\n xdsAnrufDatumKurz.SetParentComponent(xdsAnruf);\r\n xdsAnrufDatumKurz.Name := 'xdsAnrufDatumKurz';\r\n xdsAnrufDatumKurz.FieldName := 'DatumKurz';\r\n xdsAnrufAPID.SetParentComponent(xdsAnruf);\r\n xdsAnrufAPID.Name := 'xdsAnrufAPID';\r\n xdsAnrufAPID.FieldName := 'APID';\r\n xdsAnrufAPID.Size := 38;\r\n xdsAnrufFBox.SetParentComponent(xdsAnruf);\r\n xdsAnrufFBox.Name := 'xdsAnrufFBox';\r\n xdsAnrufFBox.FieldName := 'FBox';\r\n xdsAnrufFBox.Size := 50;\r\n xdsAnrufabrechnen.SetParentComponent(xdsAnruf);\r\n xdsAnrufabrechnen.Name := 'xdsAnrufabrechnen';\r\n xdsAnrufabrechnen.FieldName := 'abrechnen';\r\n xdsAnrufAbgerechnetAm.SetParentComponent(xdsAnruf);\r\n xdsAnrufAbgerechnetAm.Name := 'xdsAnrufAbgerechnetAm';\r\n xdsAnrufAbgerechnetAm.FieldName := 'AbgerechnetAm';\r\n xdsAnrufStundensatz.SetParentComponent(xdsAnruf);\r\n xdsAnrufStundensatz.Name := 'xdsAnrufStundensatz';\r\n xdsAnrufStundensatz.FieldName := 'Stundensatz';\r\n xdsAnrufKosten.SetParentComponent(xdsAnruf);\r\n xdsAnrufKosten.Name := 'xdsAnrufKosten';\r\n xdsAnrufKosten.FieldName := 'Kosten';\r\n xdsAnruferstellt.SetParentComponent(xdsAnruf);\r\n xdsAnruferstellt.Name := 'xdsAnruferstellt';\r\n xdsAnruferstellt.FieldName := 'erstellt';\r\n xdsAnrufgeaendert.SetParentComponent(xdsAnruf);\r\n xdsAnrufgeaendert.Name := 'xdsAnrufgeaendert';\r\n xdsAnrufgeaendert.FieldName := 'geaendert';\r\n xdsAnrufAnrufArtText.SetParentComponent(xdsAnruf);\r\n xdsAnrufAnrufArtText.Name := 'xdsAnrufAnrufArtText';\r\n xdsAnrufAnrufArtText.FieldKind := fkCalculated;\r\n xdsAnrufAnrufArtText.FieldName := 'AnrufArtText';\r\n xdsAnrufAnrufArtText.Calculated := True;\r\n sourceAnruf.SetParentComponent(Self);\r\n sourceAnruf.Name := 'sourceAnruf';\r\n sourceAnruf.DataSet := xdsAnruf;\r\n sourceAnruf.Left := 29;\r\n sourceAnruf.Top := 101;\r\n finally\r\n TC.AfterLoadDFMValues;\r\n xdsAnruf.AfterLoadDFMValues;\r\n xdsAnrufID.AfterLoadDFMValues;\r\n xdsAnrufAnrufTyp.AfterLoadDFMValues;\r\n xdsAnrufDatum.AfterLoadDFMValues;\r\n xdsAnrufRufnummer.AfterLoadDFMValues;\r\n xdsAnrufNameFritzBox.AfterLoadDFMValues;\r\n xdsAnrufNebenstelle.AfterLoadDFMValues;\r\n xdsAnrufAnrufArt.AfterLoadDFMValues;\r\n xdsAnrufDauer.AfterLoadDFMValues;\r\n xdsAnrufKundennummer.AfterLoadDFMValues;\r\n xdsAnrufTeilnehmer.AfterLoadDFMValues;\r\n xdsAnrufNotiz.AfterLoadDFMValues;\r\n xdsAnrufbis.AfterLoadDFMValues;\r\n xdsAnrufDauerMinuten.AfterLoadDFMValues;\r\n xdsAnrufJahr.AfterLoadDFMValues;\r\n xdsAnrufMonat.AfterLoadDFMValues;\r\n xdsAnrufTag.AfterLoadDFMValues;\r\n xdsAnrufMonatJahr.AfterLoadDFMValues;\r\n xdsAnrufDatumKurz.AfterLoadDFMValues;\r\n xdsAnrufAPID.AfterLoadDFMValues;\r\n xdsAnrufFBox.AfterLoadDFMValues;\r\n xdsAnrufabrechnen.AfterLoadDFMValues;\r\n xdsAnrufAbgerechnetAm.AfterLoadDFMValues;\r\n xdsAnrufStundensatz.AfterLoadDFMValues;\r\n xdsAnrufKosten.AfterLoadDFMValues;\r\n xdsAnruferstellt.AfterLoadDFMValues;\r\n xdsAnrufgeaendert.AfterLoadDFMValues;\r\n xdsAnrufAnrufArtText.AfterLoadDFMValues;\r\n sourceAnruf.AfterLoadDFMValues;\r\n end;\r\nend;\r\n\r\nend.","unit unit_Anrufe;\r\n\r\ninterface\r\n\r\nuses\r\n System.SysUtils, System.Classes, JS, Web, WEBLib.Graphics, WEBLib.Controls,\r\n WEBLib.Forms, WEBLib.Dialogs, Data.DB, WEBLib.DB, XData.Web.JsonDataset,\r\n XData.Web.Dataset, XData.Web.Connection, Vcl.Controls, Vcl.StdCtrls,\r\n WEBLib.StdCtrls, WEBLib.ExtCtrls, Vcl.Grids, WEBLib.DBCtrls, VCL.TMSFNCTypes,\r\n VCL.TMSFNCUtils, VCL.TMSFNCGraphics, VCL.TMSFNCGraphicsTypes,\r\n VCL.TMSFNCCustomControl, VCL.TMSFNCTableView, WEBLib.Buttons, WEBLib.Grids,\r\n WEBLib.FlexControls, WEBLib.WebCtrls;\r\n\r\ntype\r\n TfrmAnrufe = class(TForm)\r\n xdsAnrufe: TXDataWebDataSet;\r\n xdsAnrufeID: TStringField;\r\n xdsAnrufeAnrufTyp: TIntegerField;\r\n xdsAnrufeDatum: TDateTimeField;\r\n xdsAnrufeRufnummer: TStringField;\r\n xdsAnrufeNameFritzBox: TStringField;\r\n xdsAnrufeNebenstelle: TStringField;\r\n xdsAnrufeAnrufArt: TStringField;\r\n xdsAnrufeDauer: TDateTimeField;\r\n xdsAnrufeKundennummer: TStringField;\r\n xdsAnrufeTeilnehmer: TStringField;\r\n xdsAnrufeNotiz: TStringField;\r\n xdsAnrufebis: TDateTimeField;\r\n xdsAnrufeDauerMinuten: TIntegerField;\r\n xdsAnrufeJahr: TIntegerField;\r\n xdsAnrufeMonat: TIntegerField;\r\n xdsAnrufeTag: TIntegerField;\r\n xdsAnrufeMonatJahr: TDateTimeField;\r\n xdsAnrufeDatumKurz: TDateTimeField;\r\n xdsAnrufeAPID: TStringField;\r\n xdsAnrufeFBox: TStringField;\r\n xdsAnrufeabrechnen: TBooleanField;\r\n xdsAnrufeAbgerechnetAm: TDateTimeField;\r\n xdsAnrufeStundensatz: TFloatField;\r\n xdsAnrufeKosten: TFloatField;\r\n xdsAnrufeerstellt: TDateTimeField;\r\n xdsAnrufegeaendert: TDateTimeField;\r\n xdsAnrufeAnrufArtText: TStringField;\r\n Container1: THTMLContainer;\r\n Container2: THTMLContainer;\r\n Container3: THTMLContainer;\r\n btnzurueck: TButton;\r\n procedure WebFormShow(Sender: TObject);\r\n procedure xdsAnrufeCalcFields(DataSet: TDataSet);\r\n procedure xdsAnrufeAfterOpen(DataSet: TDataSet);\r\n procedure btnzurueckClick(Sender: TObject);\r\n\r\n public\r\n EinzelCard:THTMLDiv;\r\n procedure EinzelCardclick(Sender:TObject);\r\n protected procedure LoadDFMValues; override; end;\r\n\r\nvar\r\n frmAnrufe: TfrmAnrufe;\r\n\r\nimplementation\r\n uses unit1, unit2, unit_EinzelAnruf;\r\n{$R *.dfm}\r\n\r\nprocedure TfrmAnrufe.btnzurueckClick(Sender: TObject);\r\nbegin\r\n xdsAnrufe.Close;\r\n self.close;\r\nend;\r\n\r\n\r\nprocedure TfrmAnrufe.EinzelCardclick(Sender:TObject);\r\nvar\r\n EinzelAnruf:TEinzelAnruf;\r\n MyMerkerAnruf:string;\r\nbegin\r\n myMerkerAnruf:=(sender as THTMLDiv).hint;\r\n Container3.HTML.text:='';\r\n EinzelAnruf := TEinzelAnruf.CreateNew(procedure(AForm: TObject)\r\n begin\r\n (AForm as TEinzelAnruf).MerkerAnruf:=myMerkerAnruf;\r\n end\r\n );\r\n\r\n EinzelAnruf.ShowModal(procedure(AValue: TModalResult)\r\n begin\r\n xdsAnrufe.close;\r\n xdsAnrufe.Load;\r\n end\r\n );\r\nend;\r\n\r\n\r\n\r\nprocedure TfrmAnrufe.WebFormShow(Sender: TObject);\r\nbegin\r\n xdsAnrufe.Load;\r\nend;\r\n\r\nprocedure TfrmAnrufe.xdsAnrufeAfterOpen(DataSet: TDataSet);\r\nvar\r\n myelement:TJSHTMLElement;\r\n EinzelKarte:string;\r\nbegin\r\n xdsanrufe.First;\r\n Container1.html.text:='';\r\n myelement:=container1.ElementHandle;\r\n btnzurueck.ParentElement:=myelement;\r\n container2.ParentElement:=myelement;\r\n Container3.ParentElement:=myelement;\r\n Container2.HTML.Text:='';\r\n\r\n while not xdsanrufe.eof do\r\n begin\r\n Einzelkarte:='
'+formatdatetime('DD.MM.YYYY hh:mm:ss',xdsAnrufeDatum.asdatetime)+'
' +xdsAnrufeRufnummer.asstring+'
';\r\n Einzelkarte:=Einzelkarte+'

'+xdsAnrufeTeilnehmer.asstring+'


';\r\n Einzelkarte:=Einzelkarte+''+xdsAnrufeAnrufArtText.asstring+'
';\r\n Einzelkarte:=Einzelkarte+'Dauer: '+xdsAnrufeDauerMinuten.asstring+' Minuten
';\r\n Einzelkarte:=Einzelkarte+'Nebenstelle: '+xdsAnrufeNebenstelle.asstring+'
';\r\n Einzelkarte:=Einzelkarte+'Kundennummer: '+xdsAnrufeKundennummer.asstring+'
';\r\n Einzelkarte:=Einzelkarte+xdsAnrufeNotiz.asstring;\r\n if xdsAnrufeRufnummer.Asstring<>'' then Einzelkarte:=Einzelkarte+'anrufen';\r\n Einzelkarte:=Einzelkarte+'
';\r\n\r\n myelement:=Container3.ElementHandle;\r\n EinzelCard:=THTMLDiv.Create(self);\r\n EinzelCard.ElementID:=xdsanrufeid.asstring;\r\n EinzelCard.HeightStyle:=ssauto;\r\n EinzelCard.WidthStyle:=ssPercent;\r\n EinzelCard.hint:=xdsAnrufeID.asstring;\r\n EinzelCard.HTML.Text:=Einzelkarte;\r\n EinzelCard.ElementClassName:='card m-1 border-info';\r\n EinzelCard.OnClick:=@EinzelCardClick;\r\n EinzelCard.ParentElement:=myelement;\r\n\r\n xdsanrufe.Next;\r\n end;\r\nend;\r\n\r\nprocedure TfrmAnrufe.xdsAnrufeCalcFields(DataSet: TDataSet);\r\nbegin\r\n try\r\n if xdsAnrufeAnrufTyp.AsInteger=1 then xdsAnrufeAnrufArtText.AsString:='eingehend';\r\n if xdsAnrufeAnrufTyp.AsInteger=2 then xdsAnrufeAnrufArtText.AsString:='verpasst';\r\n if xdsAnrufeAnrufTyp.AsInteger=3 then xdsAnrufeAnrufArtText.AsString:='nicht erreicht';\r\n if xdsAnrufeAnrufTyp.AsInteger=4 then xdsAnrufeAnrufArtText.AsString:='ausgehend';\r\n except\r\n end;\r\nend;\r\n\r\nprocedure TfrmAnrufe.LoadDFMValues;\r\nbegin\r\n inherited LoadDFMValues;\r\n\r\n Container1 := THTMLContainer.Create(Self);\r\n Container2 := THTMLContainer.Create(Self);\r\n Container3 := THTMLContainer.Create(Self);\r\n btnzurueck := TButton.Create(Self);\r\n xdsAnrufe := TXDataWebDataSet.Create(Self);\r\n xdsAnrufeID := TStringField.Create(Self);\r\n xdsAnrufeAnrufTyp := TIntegerField.Create(Self);\r\n xdsAnrufeDatum := TDateTimeField.Create(Self);\r\n xdsAnrufeRufnummer := TStringField.Create(Self);\r\n xdsAnrufeNameFritzBox := TStringField.Create(Self);\r\n xdsAnrufeNebenstelle := TStringField.Create(Self);\r\n xdsAnrufeAnrufArt := TStringField.Create(Self);\r\n xdsAnrufeDauer := TDateTimeField.Create(Self);\r\n xdsAnrufeKundennummer := TStringField.Create(Self);\r\n xdsAnrufeTeilnehmer := TStringField.Create(Self);\r\n xdsAnrufeNotiz := TStringField.Create(Self);\r\n xdsAnrufebis := TDateTimeField.Create(Self);\r\n xdsAnrufeDauerMinuten := TIntegerField.Create(Self);\r\n xdsAnrufeJahr := TIntegerField.Create(Self);\r\n xdsAnrufeMonat := TIntegerField.Create(Self);\r\n xdsAnrufeTag := TIntegerField.Create(Self);\r\n xdsAnrufeMonatJahr := TDateTimeField.Create(Self);\r\n xdsAnrufeDatumKurz := TDateTimeField.Create(Self);\r\n xdsAnrufeAPID := TStringField.Create(Self);\r\n xdsAnrufeFBox := TStringField.Create(Self);\r\n xdsAnrufeabrechnen := TBooleanField.Create(Self);\r\n xdsAnrufeAbgerechnetAm := TDateTimeField.Create(Self);\r\n xdsAnrufeStundensatz := TFloatField.Create(Self);\r\n xdsAnrufeKosten := TFloatField.Create(Self);\r\n xdsAnrufeerstellt := TDateTimeField.Create(Self);\r\n xdsAnrufegeaendert := TDateTimeField.Create(Self);\r\n xdsAnrufeAnrufArtText := TStringField.Create(Self);\r\n\r\n Container1.BeforeLoadDFMValues;\r\n Container2.BeforeLoadDFMValues;\r\n Container3.BeforeLoadDFMValues;\r\n btnzurueck.BeforeLoadDFMValues;\r\n xdsAnrufe.BeforeLoadDFMValues;\r\n xdsAnrufeID.BeforeLoadDFMValues;\r\n xdsAnrufeAnrufTyp.BeforeLoadDFMValues;\r\n xdsAnrufeDatum.BeforeLoadDFMValues;\r\n xdsAnrufeRufnummer.BeforeLoadDFMValues;\r\n xdsAnrufeNameFritzBox.BeforeLoadDFMValues;\r\n xdsAnrufeNebenstelle.BeforeLoadDFMValues;\r\n xdsAnrufeAnrufArt.BeforeLoadDFMValues;\r\n xdsAnrufeDauer.BeforeLoadDFMValues;\r\n xdsAnrufeKundennummer.BeforeLoadDFMValues;\r\n xdsAnrufeTeilnehmer.BeforeLoadDFMValues;\r\n xdsAnrufeNotiz.BeforeLoadDFMValues;\r\n xdsAnrufebis.BeforeLoadDFMValues;\r\n xdsAnrufeDauerMinuten.BeforeLoadDFMValues;\r\n xdsAnrufeJahr.BeforeLoadDFMValues;\r\n xdsAnrufeMonat.BeforeLoadDFMValues;\r\n xdsAnrufeTag.BeforeLoadDFMValues;\r\n xdsAnrufeMonatJahr.BeforeLoadDFMValues;\r\n xdsAnrufeDatumKurz.BeforeLoadDFMValues;\r\n xdsAnrufeAPID.BeforeLoadDFMValues;\r\n xdsAnrufeFBox.BeforeLoadDFMValues;\r\n xdsAnrufeabrechnen.BeforeLoadDFMValues;\r\n xdsAnrufeAbgerechnetAm.BeforeLoadDFMValues;\r\n xdsAnrufeStundensatz.BeforeLoadDFMValues;\r\n xdsAnrufeKosten.BeforeLoadDFMValues;\r\n xdsAnrufeerstellt.BeforeLoadDFMValues;\r\n xdsAnrufegeaendert.BeforeLoadDFMValues;\r\n xdsAnrufeAnrufArtText.BeforeLoadDFMValues;\r\n try\r\n Name := 'frmAnrufe';\r\n Width := 172;\r\n Height := 223;\r\n CSSLibrary := cssBootstrap;\r\n ElementFont := efCSS;\r\n FormStyle := fsStayOnTop;\r\n SetEvent(Self, 'OnShow', 'WebFormShow');\r\n Container1.SetParentComponent(Self);\r\n Container1.Name := 'Container1';\r\n Container1.Left := 0;\r\n Container1.Top := 0;\r\n Container1.Width := 169;\r\n Container1.Height := 41;\r\n Container1.HeightStyle := ssAuto;\r\n Container1.WidthStyle := ssPercent;\r\n Container1.ChildOrder := 2;\r\n Container1.ElementFont := efCSS;\r\n Container2.SetParentComponent(Self);\r\n Container2.Name := 'Container2';\r\n Container2.Left := 0;\r\n Container2.Top := 47;\r\n Container2.Width := 169;\r\n Container2.Height := 41;\r\n Container2.ElementClassName := 'd-flex flex-wrap m-1 border border-info';\r\n Container2.HeightStyle := ssAuto;\r\n Container2.WidthStyle := ssAuto;\r\n Container2.ChildOrder := 5;\r\n Container2.ElementFont := efCSS;\r\n Container2.ElementPosition := epIgnore;\r\n Container3.SetParentComponent(Self);\r\n Container3.Name := 'Container3';\r\n Container3.Left := 0;\r\n Container3.Top := 94;\r\n Container3.Width := 169;\r\n Container3.Height := 41;\r\n Container3.ElementClassName := 'd-flex flex-wrap m-1';\r\n Container3.HeightStyle := ssAuto;\r\n Container3.WidthStyle := ssAuto;\r\n Container3.ChildOrder := 5;\r\n Container3.ElementFont := efCSS;\r\n Container3.ElementPosition := epIgnore;\r\n btnzurueck.SetParentComponent(Self);\r\n btnzurueck.Name := 'btnzurueck';\r\n btnzurueck.Left := 8;\r\n btnzurueck.Top := 148;\r\n btnzurueck.Width := 96;\r\n btnzurueck.Height := 25;\r\n btnzurueck.Caption := '<< zur'#252'ck';\r\n btnzurueck.ChildOrder := 4;\r\n btnzurueck.ElementClassName := 'btn btn-info btn-sm m-1 text-left';\r\n btnzurueck.ElementFont := efCSS;\r\n btnzurueck.ElementPosition := epIgnore;\r\n btnzurueck.HeightStyle := ssAuto;\r\n btnzurueck.HeightPercent := 100.000000000000000000;\r\n btnzurueck.WidthStyle := ssAuto;\r\n btnzurueck.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnzurueck, Self, 'OnClick', 'btnzurueckClick');\r\n xdsAnrufe.SetParentComponent(Self);\r\n xdsAnrufe.Name := 'xdsAnrufe';\r\n xdsAnrufe.AfterOpen := xdsAnrufeAfterOpen;\r\n SetEvent(xdsAnrufe, Self, 'OnCalcFields', 'xdsAnrufeCalcFields');\r\n xdsAnrufe.EntitySetName := 'FritzBoxAnrufe';\r\n xdsAnrufe.Connection := DM2.XDataWebConnection1;\r\n xdsAnrufe.QueryString := '$orderby=Datum DESC';\r\n xdsAnrufe.QueryTop := 100;\r\n xdsAnrufe.Left := 13;\r\n xdsAnrufe.Top := 109;\r\n xdsAnrufeID.SetParentComponent(xdsAnrufe);\r\n xdsAnrufeID.Name := 'xdsAnrufeID';\r\n xdsAnrufeID.FieldName := 'ID';\r\n xdsAnrufeID.Required := True;\r\n xdsAnrufeID.Size := 38;\r\n xdsAnrufeAnrufTyp.SetParentComponent(xdsAnrufe);\r\n xdsAnrufeAnrufTyp.Name := 'xdsAnrufeAnrufTyp';\r\n xdsAnrufeAnrufTyp.FieldName := 'AnrufTyp';\r\n xdsAnrufeDatum.SetParentComponent(xdsAnrufe);\r\n xdsAnrufeDatum.Name := 'xdsAnrufeDatum';\r\n xdsAnrufeDatum.FieldName := 'Datum';\r\n xdsAnrufeRufnummer.SetParentComponent(xdsAnrufe);\r\n xdsAnrufeRufnummer.Name := 'xdsAnrufeRufnummer';\r\n xdsAnrufeRufnummer.FieldName := 'Rufnummer';\r\n xdsAnrufeRufnummer.Size := 50;\r\n xdsAnrufeNameFritzBox.SetParentComponent(xdsAnrufe);\r\n xdsAnrufeNameFritzBox.Name := 'xdsAnrufeNameFritzBox';\r\n xdsAnrufeNameFritzBox.FieldName := 'NameFritzBox';\r\n xdsAnrufeNameFritzBox.Size := 50;\r\n xdsAnrufeNebenstelle.SetParentComponent(xdsAnrufe);\r\n xdsAnrufeNebenstelle.Name := 'xdsAnrufeNebenstelle';\r\n xdsAnrufeNebenstelle.FieldName := 'Nebenstelle';\r\n xdsAnrufeNebenstelle.Size := 50;\r\n xdsAnrufeAnrufArt.SetParentComponent(xdsAnrufe);\r\n xdsAnrufeAnrufArt.Name := 'xdsAnrufeAnrufArt';\r\n xdsAnrufeAnrufArt.FieldName := 'AnrufArt';\r\n xdsAnrufeAnrufArt.Size := 50;\r\n xdsAnrufeDauer.SetParentComponent(xdsAnrufe);\r\n xdsAnrufeDauer.Name := 'xdsAnrufeDauer';\r\n xdsAnrufeDauer.FieldName := 'Dauer';\r\n xdsAnrufeKundennummer.SetParentComponent(xdsAnrufe);\r\n xdsAnrufeKundennummer.Name := 'xdsAnrufeKundennummer';\r\n xdsAnrufeKundennummer.FieldName := 'Kundennummer';\r\n xdsAnrufeKundennummer.Size := 13;\r\n xdsAnrufeTeilnehmer.SetParentComponent(xdsAnrufe);\r\n xdsAnrufeTeilnehmer.Name := 'xdsAnrufeTeilnehmer';\r\n xdsAnrufeTeilnehmer.FieldName := 'Teilnehmer';\r\n xdsAnrufeTeilnehmer.Size := 150;\r\n xdsAnrufeNotiz.SetParentComponent(xdsAnrufe);\r\n xdsAnrufeNotiz.Name := 'xdsAnrufeNotiz';\r\n xdsAnrufeNotiz.FieldName := 'Notiz';\r\n xdsAnrufeNotiz.Size := 255;\r\n xdsAnrufebis.SetParentComponent(xdsAnrufe);\r\n xdsAnrufebis.Name := 'xdsAnrufebis';\r\n xdsAnrufebis.FieldName := 'bis';\r\n xdsAnrufeDauerMinuten.SetParentComponent(xdsAnrufe);\r\n xdsAnrufeDauerMinuten.Name := 'xdsAnrufeDauerMinuten';\r\n xdsAnrufeDauerMinuten.FieldName := 'DauerMinuten';\r\n xdsAnrufeJahr.SetParentComponent(xdsAnrufe);\r\n xdsAnrufeJahr.Name := 'xdsAnrufeJahr';\r\n xdsAnrufeJahr.FieldName := 'Jahr';\r\n xdsAnrufeMonat.SetParentComponent(xdsAnrufe);\r\n xdsAnrufeMonat.Name := 'xdsAnrufeMonat';\r\n xdsAnrufeMonat.FieldName := 'Monat';\r\n xdsAnrufeTag.SetParentComponent(xdsAnrufe);\r\n xdsAnrufeTag.Name := 'xdsAnrufeTag';\r\n xdsAnrufeTag.FieldName := 'Tag';\r\n xdsAnrufeMonatJahr.SetParentComponent(xdsAnrufe);\r\n xdsAnrufeMonatJahr.Name := 'xdsAnrufeMonatJahr';\r\n xdsAnrufeMonatJahr.FieldName := 'MonatJahr';\r\n xdsAnrufeDatumKurz.SetParentComponent(xdsAnrufe);\r\n xdsAnrufeDatumKurz.Name := 'xdsAnrufeDatumKurz';\r\n xdsAnrufeDatumKurz.FieldName := 'DatumKurz';\r\n xdsAnrufeAPID.SetParentComponent(xdsAnrufe);\r\n xdsAnrufeAPID.Name := 'xdsAnrufeAPID';\r\n xdsAnrufeAPID.FieldName := 'APID';\r\n xdsAnrufeAPID.Size := 38;\r\n xdsAnrufeFBox.SetParentComponent(xdsAnrufe);\r\n xdsAnrufeFBox.Name := 'xdsAnrufeFBox';\r\n xdsAnrufeFBox.FieldName := 'FBox';\r\n xdsAnrufeFBox.Size := 50;\r\n xdsAnrufeabrechnen.SetParentComponent(xdsAnrufe);\r\n xdsAnrufeabrechnen.Name := 'xdsAnrufeabrechnen';\r\n xdsAnrufeabrechnen.FieldName := 'abrechnen';\r\n xdsAnrufeAbgerechnetAm.SetParentComponent(xdsAnrufe);\r\n xdsAnrufeAbgerechnetAm.Name := 'xdsAnrufeAbgerechnetAm';\r\n xdsAnrufeAbgerechnetAm.FieldName := 'AbgerechnetAm';\r\n xdsAnrufeStundensatz.SetParentComponent(xdsAnrufe);\r\n xdsAnrufeStundensatz.Name := 'xdsAnrufeStundensatz';\r\n xdsAnrufeStundensatz.FieldName := 'Stundensatz';\r\n xdsAnrufeKosten.SetParentComponent(xdsAnrufe);\r\n xdsAnrufeKosten.Name := 'xdsAnrufeKosten';\r\n xdsAnrufeKosten.FieldName := 'Kosten';\r\n xdsAnrufeerstellt.SetParentComponent(xdsAnrufe);\r\n xdsAnrufeerstellt.Name := 'xdsAnrufeerstellt';\r\n xdsAnrufeerstellt.FieldName := 'erstellt';\r\n xdsAnrufegeaendert.SetParentComponent(xdsAnrufe);\r\n xdsAnrufegeaendert.Name := 'xdsAnrufegeaendert';\r\n xdsAnrufegeaendert.FieldName := 'geaendert';\r\n xdsAnrufeAnrufArtText.SetParentComponent(xdsAnrufe);\r\n xdsAnrufeAnrufArtText.Name := 'xdsAnrufeAnrufArtText';\r\n xdsAnrufeAnrufArtText.FieldKind := fkCalculated;\r\n xdsAnrufeAnrufArtText.FieldName := 'AnrufArtText';\r\n xdsAnrufeAnrufArtText.Calculated := True;\r\n finally\r\n Container1.AfterLoadDFMValues;\r\n Container2.AfterLoadDFMValues;\r\n Container3.AfterLoadDFMValues;\r\n btnzurueck.AfterLoadDFMValues;\r\n xdsAnrufe.AfterLoadDFMValues;\r\n xdsAnrufeID.AfterLoadDFMValues;\r\n xdsAnrufeAnrufTyp.AfterLoadDFMValues;\r\n xdsAnrufeDatum.AfterLoadDFMValues;\r\n xdsAnrufeRufnummer.AfterLoadDFMValues;\r\n xdsAnrufeNameFritzBox.AfterLoadDFMValues;\r\n xdsAnrufeNebenstelle.AfterLoadDFMValues;\r\n xdsAnrufeAnrufArt.AfterLoadDFMValues;\r\n xdsAnrufeDauer.AfterLoadDFMValues;\r\n xdsAnrufeKundennummer.AfterLoadDFMValues;\r\n xdsAnrufeTeilnehmer.AfterLoadDFMValues;\r\n xdsAnrufeNotiz.AfterLoadDFMValues;\r\n xdsAnrufebis.AfterLoadDFMValues;\r\n xdsAnrufeDauerMinuten.AfterLoadDFMValues;\r\n xdsAnrufeJahr.AfterLoadDFMValues;\r\n xdsAnrufeMonat.AfterLoadDFMValues;\r\n xdsAnrufeTag.AfterLoadDFMValues;\r\n xdsAnrufeMonatJahr.AfterLoadDFMValues;\r\n xdsAnrufeDatumKurz.AfterLoadDFMValues;\r\n xdsAnrufeAPID.AfterLoadDFMValues;\r\n xdsAnrufeFBox.AfterLoadDFMValues;\r\n xdsAnrufeabrechnen.AfterLoadDFMValues;\r\n xdsAnrufeAbgerechnetAm.AfterLoadDFMValues;\r\n xdsAnrufeStundensatz.AfterLoadDFMValues;\r\n xdsAnrufeKosten.AfterLoadDFMValues;\r\n xdsAnrufeerstellt.AfterLoadDFMValues;\r\n xdsAnrufegeaendert.AfterLoadDFMValues;\r\n xdsAnrufeAnrufArtText.AfterLoadDFMValues;\r\n end;\r\nend;\r\n\r\nend.\r\n","unit unit_Terminkalender;\r\n\r\ninterface\r\n\r\nuses\r\n System.SysUtils, System.Classes, JS, Web, WEBLib.Graphics, WEBLib.Controls,\r\n WEBLib.Forms, WEBLib.Dialogs, VCL.TMSFNCTypes, VCL.TMSFNCUtils,\r\n VCL.TMSFNCGraphics, VCL.TMSFNCGraphicsTypes, Data.DB, XData.Web.JsonDataset,\r\n XData.Web.Dataset, WEBLib.DB, Vcl.StdCtrls,\r\n WEBLib.StdCtrls, Vcl.Controls, VCL.TMSFNCCustomControl,\r\n WEBLib.ExtCtrls, dateutils, WEBLib.Buttons, WEBLib.Grids, WEBLib.DBCtrls, WEBLib.WebCtrls,\r\n DB;\r\n\r\ntype\r\n TTerminkalender = class(TForm)\r\n sourceTermine: TDataSource;\r\n XDTermine: TXDataWebDataSet;\r\n XDTermineUID: TStringField;\r\n XDTermineBeginn: TDateTimeField;\r\n XDTermineEnde: TDateTimeField;\r\n XDTermineBetreff: TStringField;\r\n XDTermineColor: TIntegerField;\r\n XDTermineAlarm: TBooleanField;\r\n XDTerminePersonalnummer: TIntegerField;\r\n XDTermineTerminArt: TIntegerField;\r\n XDTermineBeginnDatum: TDateTimeField;\r\n XDTermineBeginnUhrzeit: TDateTimeField;\r\n XDTermineEndeDatum: TDateTimeField;\r\n XDTermineEndeUhrzeit: TDateTimeField;\r\n XDTerminePNachname: TStringField;\r\n XDTerminePVorname: TStringField;\r\n XDTerminePFarbe: TIntegerField;\r\n TC: TTableControl;\r\n comboMonat: TComboBox;\r\n comboJahr: TComboBox;\r\n Container1: THTMLContainer;\r\n Container2: THTMLContainer;\r\n btnzurueck: TButton;\r\n Container3: THTMLContainer;\r\n lblhinweis: TLabel;\r\n XDTermineAuftrag: TStringField;\r\n XDTermineTerminNotiz: TStringField;\r\n XDTermineKundennummer: TStringField;\r\n XDTermineNachname: TStringField;\r\n XDTermineKontaktart: TStringField;\r\n XDTermineVorname: TStringField;\r\n procedure WebFormShow(Sender: TObject);\r\n procedure XDTermineAfterOpen(DataSet: TDataSet);\r\n procedure comboMonatChange(Sender: TObject);\r\n procedure comboJahrChange(Sender: TObject);\r\n procedure btnzurueckClick(Sender: TObject);\r\n private\r\n { Private-Deklarationen }\r\n public\r\n NeuerTermin:THTMLDiv;\r\n einzeltermin:THTMLDiv;\r\n buttonauftragnummer:TButton;\r\n procedure Termineladen;\r\n procedure NeuerTerminclick(Sender:TObject);\r\n procedure einzelterminclick(Sender:TObject);\r\n procedure buttonauftragnummerclick(Sender:TObject);\r\n protected procedure LoadDFMValues; override; end;\r\n\r\nvar\r\n Terminkalender: TTerminkalender;\r\n Startdatum:TDateTime;\r\n EndeDatum:TDateTime;\r\n mymonat:integer;\r\n\r\nimplementation\r\n uses unit1, unit2, unit_artikelsuche, unit_kontaktsuche, unit_einzeltermin, unit_Objektsuche, unit_Einzelauftrag;\r\n{$R *.dfm}\r\n\r\n\r\nprocedure TTerminkalender.buttonauftragnummerclick(Sender:TObject);\r\nvar\r\n EinzelAuftrag:TEinzelAuftrag;\r\n MyMerkerAuftrag:string;\r\nbegin\r\n myMerkerAuftrag:=(sender as TButton).Caption;\r\n EinzelAuftrag := TEinzelAuftrag.CreateNew(procedure(AForm: TObject)\r\n begin\r\n (AForm as TEinzelAuftrag).MerkerAuftrag:=myMerkerAuftrag;\r\n tc.Visible:=false;\r\n end\r\n );\r\n\r\n EinzelAuftrag.ShowModal(procedure(AValue: TModalResult)\r\n begin\r\n Termineladen;\r\n end\r\n );\r\nend;\r\n\r\nprocedure TTerminkalender.btnzurueckClick(Sender: TObject);\r\nbegin\r\n XDTermine.Close;\r\n self.Close;\r\nend;\r\n\r\nprocedure TTerminkalender.comboJahrChange(Sender: TObject);\r\nbegin\r\n Termineladen;\r\nend;\r\n\r\nprocedure TTerminkalender.comboMonatChange(Sender: TObject);\r\nbegin\r\n Termineladen;\r\nend;\r\n\r\nprocedure TTerminkalender.einzelterminclick(Sender:TObject);\r\n var\r\n LFrm:TfrmEinzeltermin;\r\n procedure AfterCreate(AForm:TObject);\r\n var\r\n LForm:TfrmEinzeltermin;\r\n begin\r\n LForm:=(AForm as TfrmEinzeltermin);\r\n lform.TerminUID:=(sender as THTMLDiv).ElementID;;\r\n tc.Visible:=false;\r\n end;\r\n\r\n procedure AfterShowmodal(Avalue:TModalResult);\r\n begin\r\n Termineladen;\r\n end;\r\n\r\n begin\r\n LFrm:=TfrmEinzeltermin.CreateNew(@AfterCreate);\r\n LFrm.ShowModal(@AfterShowmodal);\r\n\r\nend;\r\n\r\nprocedure TTerminkalender.NeuerTerminclick(Sender:TObject);\r\n var\r\n LFrm:TfrmEinzeltermin;\r\n procedure AfterCreate(AForm:TObject);\r\n var\r\n LForm:TfrmEinzeltermin;\r\n begin\r\n LForm:=(AForm as TfrmEinzeltermin);\r\n lform.TerminUID:='';\r\n decodedatetime(date+time,ajahr,amonat,atag,astunde,aminute,asekunde,ams);\r\n decodedate((sender as THTMLDiv).Tag,ajahr,amonat,atag);\r\n lform.NeuStartDateTime:=encodedatetime(ajahr, amonat,atag,astunde,0,0,0);\r\n lform.NeuEndDateTime:=encodedatetime(ajahr, amonat,atag,astunde+1,0,0,0);\r\n tc.Visible:=false;\r\n end;\r\n\r\n procedure AfterShowmodal(Avalue:TModalResult);\r\n begin\r\n Termineladen;\r\n end;\r\n\r\n begin\r\n LFrm:=TfrmEinzeltermin.CreateNew(@AfterCreate);\r\n LFrm.ShowModal(@AfterShowmodal);\r\nend;\r\n\r\nprocedure TTerminkalender.Termineladen;\r\nbegin\r\n if combomonat.ItemIndex=0 then\r\n begin\r\n Startdatum:=date;\r\n mymonat:=MonthOf(Startdatum);\r\n EndeDatum:=EndOfTheMonth(Startdatum);\r\n end\r\n else\r\n begin\r\n mymonat:=combomonat.ItemIndex;\r\n Startdatum:=encodedate(strtoint(combojahr.Text),mymonat,1);\r\n EndeDatum:=EndOfTheMonth(Startdatum);\r\n end;\r\n xdtermine.Close;\r\n if form1.RCW.NurPersTermine=true then\r\n begin\r\n xdtermine.QueryString:='$Filter=(Beginn ge '+formatdatetime('yyyy-mm-dd',Startdatum-1)+') AND (Beginn le '+formatdatetime('yyyy-mm-dd',endedatum+1)+') AND (Personalnummer eq '+BenutzerPersonalnummer+') &$orderby=Beginn';\r\n end\r\n else\r\n begin\r\n xdtermine.QueryString:='$Filter=(Beginn ge '+formatdatetime('yyyy-mm-dd',Startdatum-1)+') AND (Beginn le '+formatdatetime('yyyy-mm-dd',endedatum+1)+') &$orderby=Beginn';\r\n end;\r\n\r\n XDTermine.Load;\r\nend;\r\n\r\nprocedure TTerminkalender.WebFormShow(Sender: TObject);\r\nvar\r\n myelement:TJSHTMLElement;\r\nbegin\r\n Container1.html.text:='';\r\n myelement:=container1.ElementHandle;\r\n btnzurueck.ParentElement:=myelement;\r\n container2.ParentElement:=myelement;\r\n Container3.ParentElement:=myelement;\r\n myelement:=container2.ElementHandle;\r\n lblhinweis.ParentElement:=myelement;\r\n comboJahr.ParentElement:=myelement;\r\n comboMonat.ParentElement:=myelement;\r\n comboJahr.Items.Clear;\r\n decodedate(date,ajahr,amonat,atag);\r\n mymonat:=amonat;\r\n combojahr.Items.Add(inttostr(ajahr-5));\r\n combojahr.Items.Add(inttostr(ajahr-4));\r\n combojahr.Items.Add(inttostr(ajahr-3));\r\n combojahr.Items.Add(inttostr(ajahr-2));\r\n combojahr.Items.Add(inttostr(ajahr-1));\r\n combojahr.Items.Add(inttostr(ajahr));\r\n combojahr.Items.Add(inttostr(ajahr+1));\r\n combojahr.Items.Add(inttostr(ajahr+2));\r\n combojahr.Items.Add(inttostr(ajahr+3));\r\n combojahr.Items.Add(inttostr(ajahr+4));\r\n combojahr.Items.Add(inttostr(ajahr+5));\r\n combojahr.ItemIndex:=5;\r\n combomonat.ItemIndex:=0;\r\n myelement:=container3.ElementHandle;\r\n tc.ParentElement:=myelement;\r\n Termineladen;\r\nend;\r\n\r\nprocedure TTerminkalender.XDTermineAfterOpen(DataSet: TDataSet);\r\nvar\r\n i:integer;\r\n terminstring:string;\r\n myelement:TJSHTMLElement;\r\n mybtnelement:TJSHTMLElement;\r\n laufendesdatum:TDateTime;\r\n myTag:integer;\r\n farbstring:string;\r\n mystarttag:integer;\r\nbegin\r\n TC.Visible:=true;\r\n TC.RowCount:=35;\r\n TC.ColCount:=1;\r\n i:=0;\r\n TC.Cells[0,i]:='Neuer Termin > Tagesdatum anklicken
';\r\n inc(i);\r\n\r\n laufendesdatum:=Startdatum;\r\n while laufendesdatum5 then\r\n begin\r\n NeuerTermin.ElementClassName:='text-danger';\r\n NeuerTermin.HTML.Text:= ''+formatdatetime('DDD DD.MM.YYYY',laufendesdatum)+'';\r\n end\r\n else\r\n begin\r\n NeuerTermin.ElementClassName:='text-dark';\r\n NeuerTermin.HTML.Text:= ''+formatdatetime('DDD DD.MM.YYYY',laufendesdatum)+'';\r\n end;\r\n\r\n NeuerTermin.OnClick:=@NeuerTerminClick;\r\n NeuerTermin.ParentElement:=myelement;\r\n\r\n\r\n laufendesdatum:=laufendesdatum+1;\r\n inc(i);\r\n\r\n end;\r\n TC.RowCount:=i;\r\n mystarttag:=DayOf(startdatum)-1;\r\n xdtermine.First;\r\n while not xdtermine.eof do\r\n begin\r\n DecodeDateTime(xdterminebeginn.asdatetime,ajahr,amonat,atag,astunde,aminute,asekunde,ams);\r\n mytag:=atag-mystarttag;\r\n if (amonat=mymonat) and (mytag>0) then\r\n begin\r\n // Termin (0)\r\n if XDTermineTerminArt.AsInteger=0 then\r\n begin\r\n terminstring:='
';\r\n If trunc(XDTermineBeginn.AsDateTime)=trunc(XDTermineEnde.AsDateTime) then\r\n begin\r\n terminstring:=terminstring+formatdatetime('DDD DD.MM.YYYY hh:mm',XDTermineBeginn.Asdatetime)+' - '+formatdatetime('hh:mm',XDTermineEndeUhrzeit.Asdatetime);\r\n\r\n end\r\n else\r\n begin\r\n terminstring:=terminstring+formatdatetime('DDD DD.MM.YYYY hh:mm',XDTermineBeginn.Asdatetime)+' - '+formatdatetime('DDD DD.MM.YYYY hh:mm',XDTermineEnde.Asdatetime);\r\n end;\r\n terminstring:=terminstring+'
';\r\n terminstring:=terminstring+'
';\r\n terminstring:=terminstring+'
'+XDTermineBetreff.AsString+'
';\r\n if XDTermineTerminNotiz.AsString<>'' then\r\n begin\r\n terminstring:=terminstring+XDTermineTerminNotiz.AsString;\r\n end;\r\n if (XDTerminePersonalnummer.AsString<>'') AND (xdterminePersonalnummer.AsInteger>0) then\r\n begin\r\n farbstring:=inttohex(XDTerminePFarbe.asinteger,6);\r\n farbstring := Copy(farbstring, 5, 2) + Copy(farbstring, 3, 2) + Copy(farbstring, 1, 2);\r\n terminstring:=terminstring+'
';\r\n terminstring:=terminstring+'
';\r\n terminstring:=terminstring+XDTerminePersonalnummer.AsString+' | '+xdterminePVorname.asstring+' '+XDTerminePNachname.asstring;\r\n end;\r\n\r\n\r\n\r\n myelement:=TC.cellelements[0,mytag];\r\n einzeltermin:=THTMLDiv.Create(self);\r\n einzeltermin.ElementID:=xdtermineuid.asstring;\r\n einzeltermin.HeightStyle:=ssauto;\r\n einzeltermin.Width:=350;\r\n einzeltermin.AlignWithMargins:=true;\r\n einzeltermin.HTML.Text:=terminstring;\r\n einzeltermin.ElementClassName:='card my-2 bg-info';\r\n Einzeltermin.OnClick:=@EinzelterminClick;\r\n einzeltermin.ParentElement:=myelement;\r\n if XDTermineAuftrag.AsString<>'' then\r\n begin\r\n buttonauftragnummer:=TButton.Create(self);\r\n buttonauftragnummer.ElementClassName:='btn btn-success btn-sm m-1 text-left';\r\n buttonauftragnummer.HeightStyle:=ssauto;\r\n buttonauftragnummer.Width:=120;\r\n buttonauftragnummer.tag:=0;\r\n buttonauftragnummer.Caption:=XDTermineAuftrag.asstring;\r\n buttonauftragnummer.OnClick:=@buttonauftragnummerClick;\r\n buttonauftragnummer.ParentElement:=einzeltermin.ElementHandle;\r\n end;\r\n end;\r\n // Wiedervorlage (1)\r\n if XDTermineTerminArt.AsInteger=1 then\r\n begin\r\n terminstring:='Wiedervorlage'+ XDTermineBetreff.AsString;\r\n if XDTermineTerminNotiz.AsString<>'' then\r\n begin\r\n terminstring:=terminstring+'
'+XDTermineTerminNotiz.AsString;\r\n\r\n end;\r\n terminstring:=terminstring+'
'+XDTermineKundennummer.AsString+' '+XDTermineNachname.AsString;\r\n myelement:=TC.cellelements[0,mytag];\r\n einzeltermin:=THTMLDiv.Create(self);\r\n einzeltermin.ElementID:=xdtermineuid.asstring;\r\n einzeltermin.HeightStyle:=ssauto;\r\n einzeltermin.Width:=350;\r\n einzeltermin.AlignWithMargins:=true;\r\n einzeltermin.HTML.Text:=terminstring;\r\n einzeltermin.ElementClassName:='card my-2 bg-success';\r\n Einzeltermin.OnClick:=@EinzelterminClick;\r\n einzeltermin.ParentElement:=myelement;\r\n end;\r\n //Geburtstag(2)\r\n if XDTermineTerminArt.AsInteger=2 then\r\n begin\r\n terminstring:='Geburtstag'+ XDTermineBetreff.AsString;\r\n myelement:=TC.cellelements[0,mytag];\r\n einzeltermin:=THTMLDiv.Create(self);\r\n einzeltermin.ElementID:=xdtermineuid.asstring;\r\n einzeltermin.HeightStyle:=ssauto;\r\n einzeltermin.Width:=350;\r\n einzeltermin.AlignWithMargins:=true;\r\n einzeltermin.HTML.Text:=terminstring;\r\n einzeltermin.ElementClassName:='card my-2 bg-danger';\r\n Einzeltermin.OnClick:=@EinzelterminClick;\r\n einzeltermin.ParentElement:=myelement;\r\n end;\r\n // Aktivität (3)\r\n if XDTermineTerminArt.AsInteger=3 then\r\n begin\r\n terminstring:='Aktivität';\r\n If trunc(XDTermineBeginn.AsDateTime)=trunc(XDTermineEnde.AsDateTime) then\r\n begin\r\n terminstring:=terminstring+formatdatetime('DDD DD.MM.YYYY hh:mm',XDTermineBeginn.Asdatetime)+' - '+formatdatetime('hh:mm',XDTermineEndeUhrzeit.Asdatetime);\r\n terminstring:=terminstring+'
'+ XDTermineBetreff.AsString+'
';\r\n end\r\n else\r\n begin\r\n terminstring:=formatdatetime('DDD DD.MM.YYYY hh:mm',XDTermineBeginn.Asdatetime)+' - '+formatdatetime('DDD DD.MM.YYYY hh:mm',XDTermineEnde.Asdatetime);\r\n terminstring:=terminstring+'
'+ XDTermineBetreff.AsString+'
';\r\n end;\r\n if XDTermineTerminNotiz.AsString<>'' then\r\n begin\r\n terminstring:=terminstring+XDTermineTerminNotiz.AsString+'
';\r\n end;\r\n terminstring:=terminstring+'
'+XDTermineKundennummer.AsString+' '+XDTermineNachname.AsString;\r\n terminstring:=terminstring+'
'+XDTermineKontaktart.AsString;\r\n myelement:=TC.cellelements[0,mytag];\r\n einzeltermin:=THTMLDiv.Create(self);\r\n einzeltermin.ElementID:=xdtermineuid.asstring;\r\n einzeltermin.HeightStyle:=ssauto;\r\n einzeltermin.Width:=350;\r\n einzeltermin.AlignWithMargins:=true;\r\n einzeltermin.HTML.Text:=terminstring;\r\n einzeltermin.ElementClassName:='card my-2 bg-primary';\r\n Einzeltermin.OnClick:=@EinzelterminClick;\r\n einzeltermin.ParentElement:=myelement;\r\n end;\r\n // Feiertag (5)\r\n if XDTermineTerminArt.AsInteger=5 then\r\n begin\r\n myelement:=TC.cellelements[0,mytag];\r\n myelement.innerHTML:='';\r\n NeuerTermin:=THTMLDiv.Create(self);\r\n NeuerTermin.HeightStyle:=ssauto;\r\n NeuerTermin.WidthStyle:=ssauto;\r\n NeuerTermin.tag:=trunc(XDTermineBeginn.Asdatetime);\r\n NeuerTermin.ElementID:=inttostr(trunc(XDTermineBeginn.Asdatetime));\r\n NeuerTermin.ElementClassName:='text-danger';\r\n NeuerTermin.HTML.Text:=''+formatdatetime('DDD DD.MM.YYYY',XDTermineBeginn.Asdatetime)+' '+XDTermineBetreff.AsString+'';\r\n NeuerTermin.OnClick:=@NeuerTerminClick;\r\n NeuerTermin.ParentElement:=myelement;\r\n end;\r\n\r\n end;\r\n xdtermine.Next;\r\n end;\r\nend;\r\n\r\nprocedure TTerminkalender.LoadDFMValues;\r\nbegin\r\n inherited LoadDFMValues;\r\n\r\n lblhinweis := TLabel.Create(Self);\r\n TC := TTableControl.Create(Self);\r\n comboMonat := TComboBox.Create(Self);\r\n comboJahr := TComboBox.Create(Self);\r\n Container1 := THTMLContainer.Create(Self);\r\n Container2 := THTMLContainer.Create(Self);\r\n btnzurueck := TButton.Create(Self);\r\n Container3 := THTMLContainer.Create(Self);\r\n sourceTermine := TDataSource.Create(Self);\r\n XDTermine := TXDataWebDataSet.Create(Self);\r\n XDTermineUID := TStringField.Create(Self);\r\n XDTermineBeginn := TDateTimeField.Create(Self);\r\n XDTermineEnde := TDateTimeField.Create(Self);\r\n XDTermineBetreff := TStringField.Create(Self);\r\n XDTermineColor := TIntegerField.Create(Self);\r\n XDTermineAlarm := TBooleanField.Create(Self);\r\n XDTerminePersonalnummer := TIntegerField.Create(Self);\r\n XDTermineTerminArt := TIntegerField.Create(Self);\r\n XDTermineBeginnDatum := TDateTimeField.Create(Self);\r\n XDTermineBeginnUhrzeit := TDateTimeField.Create(Self);\r\n XDTermineEndeDatum := TDateTimeField.Create(Self);\r\n XDTermineEndeUhrzeit := TDateTimeField.Create(Self);\r\n XDTerminePNachname := TStringField.Create(Self);\r\n XDTerminePVorname := TStringField.Create(Self);\r\n XDTerminePFarbe := TIntegerField.Create(Self);\r\n XDTermineAuftrag := TStringField.Create(Self);\r\n XDTermineTerminNotiz := TStringField.Create(Self);\r\n XDTermineKundennummer := TStringField.Create(Self);\r\n XDTermineNachname := TStringField.Create(Self);\r\n XDTermineKontaktart := TStringField.Create(Self);\r\n XDTermineVorname := TStringField.Create(Self);\r\n\r\n lblhinweis.BeforeLoadDFMValues;\r\n TC.BeforeLoadDFMValues;\r\n comboMonat.BeforeLoadDFMValues;\r\n comboJahr.BeforeLoadDFMValues;\r\n Container1.BeforeLoadDFMValues;\r\n Container2.BeforeLoadDFMValues;\r\n btnzurueck.BeforeLoadDFMValues;\r\n Container3.BeforeLoadDFMValues;\r\n sourceTermine.BeforeLoadDFMValues;\r\n XDTermine.BeforeLoadDFMValues;\r\n XDTermineUID.BeforeLoadDFMValues;\r\n XDTermineBeginn.BeforeLoadDFMValues;\r\n XDTermineEnde.BeforeLoadDFMValues;\r\n XDTermineBetreff.BeforeLoadDFMValues;\r\n XDTermineColor.BeforeLoadDFMValues;\r\n XDTermineAlarm.BeforeLoadDFMValues;\r\n XDTerminePersonalnummer.BeforeLoadDFMValues;\r\n XDTermineTerminArt.BeforeLoadDFMValues;\r\n XDTermineBeginnDatum.BeforeLoadDFMValues;\r\n XDTermineBeginnUhrzeit.BeforeLoadDFMValues;\r\n XDTermineEndeDatum.BeforeLoadDFMValues;\r\n XDTermineEndeUhrzeit.BeforeLoadDFMValues;\r\n XDTerminePNachname.BeforeLoadDFMValues;\r\n XDTerminePVorname.BeforeLoadDFMValues;\r\n XDTerminePFarbe.BeforeLoadDFMValues;\r\n XDTermineAuftrag.BeforeLoadDFMValues;\r\n XDTermineTerminNotiz.BeforeLoadDFMValues;\r\n XDTermineKundennummer.BeforeLoadDFMValues;\r\n XDTermineNachname.BeforeLoadDFMValues;\r\n XDTermineKontaktart.BeforeLoadDFMValues;\r\n XDTermineVorname.BeforeLoadDFMValues;\r\n try\r\n Name := 'Terminkalender';\r\n Width := 239;\r\n Height := 484;\r\n CSSLibrary := cssBootstrap;\r\n ElementFont := efCSS;\r\n SetEvent(Self, 'OnShow', 'WebFormShow');\r\n lblhinweis.SetParentComponent(Self);\r\n lblhinweis.Name := 'lblhinweis';\r\n lblhinweis.Left := 128;\r\n lblhinweis.Top := 160;\r\n lblhinweis.Width := 255;\r\n lblhinweis.Height := 15;\r\n lblhinweis.Caption := 'lblhinweis';\r\n lblhinweis.ElementClassName := 'h6 m-2';\r\n lblhinweis.ElementFont := efCSS;\r\n lblhinweis.ElementPosition := epIgnore;\r\n lblhinweis.HeightStyle := ssAuto;\r\n lblhinweis.HeightPercent := 100.000000000000000000;\r\n lblhinweis.HTML := ' Jahr und Monat f'#252'r die Anzeige w'#228'hlen ';\r\n lblhinweis.WidthStyle := ssAuto;\r\n lblhinweis.WidthPercent := 100.000000000000000000;\r\n TC.SetParentComponent(Self);\r\n TC.Name := 'TC';\r\n TC.Left := 8;\r\n TC.Top := 256;\r\n TC.Width := 217;\r\n TC.Height := 134;\r\n TC.ElementClassName := 'table table-sm table-hover table-bordered table-striped';\r\n TC.HeightStyle := ssAuto;\r\n TC.WidthStyle := ssPercent;\r\n TC.BorderStyle := bsNone;\r\n TC.BorderColor := clSilver;\r\n TC.ChildOrder := 5;\r\n TC.ColHeader := False;\r\n TC.ElementFont := efCSS;\r\n TC.ElementHeaderClassName := 'table-info';\r\n TC.ElementPosition := epIgnore;\r\n TC.ElementTableClassName := 'table table-sm table-hover table-bordered table-striped';\r\n TC.WordWrap := True;\r\n TC.ColCount := 2;\r\n comboMonat.SetParentComponent(Self);\r\n comboMonat.Name := 'comboMonat';\r\n comboMonat.Left := 8;\r\n comboMonat.Top := 184;\r\n comboMonat.Width := 145;\r\n comboMonat.Height := 23;\r\n comboMonat.ElementClassName := 'form-select';\r\n comboMonat.ElementFont := efCSS;\r\n comboMonat.ElementPosition := epIgnore;\r\n comboMonat.HeightStyle := ssAuto;\r\n comboMonat.HeightPercent := 100.000000000000000000;\r\n comboMonat.Text := 'Ganzes Jahr';\r\n comboMonat.WidthPercent := 100.000000000000000000;\r\n SetEvent(comboMonat, Self, 'OnChange', 'comboMonatChange');\r\n comboMonat.ItemIndex := -1;\r\n comboMonat.Items.BeginUpdate;\r\n try\r\n comboMonat.Items.Clear;\r\n comboMonat.Items.Add('ab heute');\r\n comboMonat.Items.Add('Januar');\r\n comboMonat.Items.Add('Februar');\r\n comboMonat.Items.Add('M'#228'rz');\r\n comboMonat.Items.Add('April');\r\n comboMonat.Items.Add('Mai');\r\n comboMonat.Items.Add('Juni');\r\n comboMonat.Items.Add('Juli');\r\n comboMonat.Items.Add('August');\r\n comboMonat.Items.Add('September');\r\n comboMonat.Items.Add('Oktober');\r\n comboMonat.Items.Add('November');\r\n comboMonat.Items.Add('Dezember');\r\n finally\r\n comboMonat.Items.EndUpdate;\r\n end;\r\n comboJahr.SetParentComponent(Self);\r\n comboJahr.Name := 'comboJahr';\r\n comboJahr.Left := 8;\r\n comboJahr.Top := 211;\r\n comboJahr.Width := 145;\r\n comboJahr.Height := 23;\r\n comboJahr.ElementClassName := 'form-select';\r\n comboJahr.ElementFont := efCSS;\r\n comboJahr.ElementPosition := epIgnore;\r\n comboJahr.HeightStyle := ssAuto;\r\n comboJahr.HeightPercent := 100.000000000000000000;\r\n comboJahr.Text := '2020';\r\n comboJahr.WidthPercent := 100.000000000000000000;\r\n SetEvent(comboJahr, Self, 'OnChange', 'comboJahrChange');\r\n comboJahr.ItemIndex := 5;\r\n comboJahr.Items.BeginUpdate;\r\n try\r\n comboJahr.Items.Clear;\r\n comboJahr.Items.Add('2015');\r\n comboJahr.Items.Add('2016');\r\n comboJahr.Items.Add('2017');\r\n comboJahr.Items.Add('2018');\r\n comboJahr.Items.Add('2019');\r\n comboJahr.Items.Add('2020');\r\n comboJahr.Items.Add('2021');\r\n comboJahr.Items.Add('2022');\r\n finally\r\n comboJahr.Items.EndUpdate;\r\n end;\r\n Container1.SetParentComponent(Self);\r\n Container1.Name := 'Container1';\r\n Container1.Left := 0;\r\n Container1.Top := 0;\r\n Container1.Width := 169;\r\n Container1.Height := 41;\r\n Container1.HeightStyle := ssAuto;\r\n Container1.WidthStyle := ssPercent;\r\n Container1.ElementFont := efCSS;\r\n Container1.ElementPosition := epIgnore;\r\n Container2.SetParentComponent(Self);\r\n Container2.Name := 'Container2';\r\n Container2.Left := 0;\r\n Container2.Top := 47;\r\n Container2.Width := 169;\r\n Container2.Height := 41;\r\n Container2.ElementClassName := 'd-flex flex-wrap m-1 border border-info';\r\n Container2.HeightStyle := ssAuto;\r\n Container2.WidthStyle := ssAuto;\r\n Container2.ChildOrder := 1;\r\n Container2.ElementFont := efCSS;\r\n Container2.ElementPosition := epIgnore;\r\n btnzurueck.SetParentComponent(Self);\r\n btnzurueck.Name := 'btnzurueck';\r\n btnzurueck.Left := 8;\r\n btnzurueck.Top := 153;\r\n btnzurueck.Width := 96;\r\n btnzurueck.Height := 25;\r\n btnzurueck.Caption := '<< zur'#252'ck';\r\n btnzurueck.ChildOrder := 4;\r\n btnzurueck.ElementClassName := 'btn btn-info btn-sm m-1 text-left';\r\n btnzurueck.ElementFont := efCSS;\r\n btnzurueck.ElementPosition := epIgnore;\r\n btnzurueck.HeightStyle := ssAuto;\r\n btnzurueck.HeightPercent := 100.000000000000000000;\r\n btnzurueck.WidthStyle := ssAuto;\r\n btnzurueck.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnzurueck, Self, 'OnClick', 'btnzurueckClick');\r\n Container3.SetParentComponent(Self);\r\n Container3.Name := 'Container3';\r\n Container3.Left := 0;\r\n Container3.Top := 94;\r\n Container3.Width := 169;\r\n Container3.Height := 41;\r\n Container3.ElementClassName := 'd-flex m-1';\r\n Container3.HeightStyle := ssAuto;\r\n Container3.WidthStyle := ssAuto;\r\n Container3.ChildOrder := 2;\r\n Container3.ElementFont := efCSS;\r\n Container3.ElementPosition := epIgnore;\r\n sourceTermine.SetParentComponent(Self);\r\n sourceTermine.Name := 'sourceTermine';\r\n sourceTermine.DataSet := XDTermine;\r\n sourceTermine.Left := 52;\r\n sourceTermine.Top := 16;\r\n XDTermine.SetParentComponent(Self);\r\n XDTermine.Name := 'XDTermine';\r\n XDTermine.AfterOpen := XDTermineAfterOpen;\r\n XDTermine.EntitySetName := 'TermineNeu';\r\n XDTermine.Connection := DM2.XDataWebConnection1;\r\n XDTermine.QueryString := '$Filter=(Year(Beginn) eq 2019) &$orderby=Beginn';\r\n XDTermine.Left := 124;\r\n XDTermine.Top := 14;\r\n XDTermineUID.SetParentComponent(XDTermine);\r\n XDTermineUID.Name := 'XDTermineUID';\r\n XDTermineUID.FieldName := 'UID';\r\n XDTermineUID.Required := True;\r\n XDTermineUID.Size := 38;\r\n XDTermineBeginn.SetParentComponent(XDTermine);\r\n XDTermineBeginn.Name := 'XDTermineBeginn';\r\n XDTermineBeginn.FieldName := 'Beginn';\r\n XDTermineEnde.SetParentComponent(XDTermine);\r\n XDTermineEnde.Name := 'XDTermineEnde';\r\n XDTermineEnde.FieldName := 'Ende';\r\n XDTermineBetreff.SetParentComponent(XDTermine);\r\n XDTermineBetreff.Name := 'XDTermineBetreff';\r\n XDTermineBetreff.FieldName := 'Betreff';\r\n XDTermineBetreff.Size := 255;\r\n XDTermineColor.SetParentComponent(XDTermine);\r\n XDTermineColor.Name := 'XDTermineColor';\r\n XDTermineColor.FieldName := 'Color';\r\n XDTermineAlarm.SetParentComponent(XDTermine);\r\n XDTermineAlarm.Name := 'XDTermineAlarm';\r\n XDTermineAlarm.FieldName := 'Alarm';\r\n XDTerminePersonalnummer.SetParentComponent(XDTermine);\r\n XDTerminePersonalnummer.Name := 'XDTerminePersonalnummer';\r\n XDTerminePersonalnummer.FieldName := 'Personalnummer';\r\n XDTermineTerminArt.SetParentComponent(XDTermine);\r\n XDTermineTerminArt.Name := 'XDTermineTerminArt';\r\n XDTermineTerminArt.FieldName := 'TerminArt';\r\n XDTermineBeginnDatum.SetParentComponent(XDTermine);\r\n XDTermineBeginnDatum.Name := 'XDTermineBeginnDatum';\r\n XDTermineBeginnDatum.FieldName := 'BeginnDatum';\r\n XDTermineBeginnUhrzeit.SetParentComponent(XDTermine);\r\n XDTermineBeginnUhrzeit.Name := 'XDTermineBeginnUhrzeit';\r\n XDTermineBeginnUhrzeit.FieldName := 'BeginnUhrzeit';\r\n XDTermineEndeDatum.SetParentComponent(XDTermine);\r\n XDTermineEndeDatum.Name := 'XDTermineEndeDatum';\r\n XDTermineEndeDatum.FieldName := 'EndeDatum';\r\n XDTermineEndeUhrzeit.SetParentComponent(XDTermine);\r\n XDTermineEndeUhrzeit.Name := 'XDTermineEndeUhrzeit';\r\n XDTermineEndeUhrzeit.FieldName := 'EndeUhrzeit';\r\n XDTerminePNachname.SetParentComponent(XDTermine);\r\n XDTerminePNachname.Name := 'XDTerminePNachname';\r\n XDTerminePNachname.FieldName := 'PNachname';\r\n XDTerminePNachname.Size := 40;\r\n XDTerminePVorname.SetParentComponent(XDTermine);\r\n XDTerminePVorname.Name := 'XDTerminePVorname';\r\n XDTerminePVorname.FieldName := 'PVorname';\r\n XDTerminePVorname.Size := 40;\r\n XDTerminePFarbe.SetParentComponent(XDTermine);\r\n XDTerminePFarbe.Name := 'XDTerminePFarbe';\r\n XDTerminePFarbe.FieldName := 'PFarbe';\r\n XDTermineAuftrag.SetParentComponent(XDTermine);\r\n XDTermineAuftrag.Name := 'XDTermineAuftrag';\r\n XDTermineAuftrag.FieldName := 'Auftrag';\r\n XDTermineAuftrag.Size := 10;\r\n XDTermineTerminNotiz.SetParentComponent(XDTermine);\r\n XDTermineTerminNotiz.Name := 'XDTermineTerminNotiz';\r\n XDTermineTerminNotiz.FieldName := 'TerminNotiz';\r\n XDTermineTerminNotiz.Size := 255;\r\n XDTermineKundennummer.SetParentComponent(XDTermine);\r\n XDTermineKundennummer.Name := 'XDTermineKundennummer';\r\n XDTermineKundennummer.FieldName := 'Kundennummer';\r\n XDTermineKundennummer.Size := 13;\r\n XDTermineNachname.SetParentComponent(XDTermine);\r\n XDTermineNachname.Name := 'XDTermineNachname';\r\n XDTermineNachname.FieldName := 'Nachname';\r\n XDTermineNachname.Size := 40;\r\n XDTermineKontaktart.SetParentComponent(XDTermine);\r\n XDTermineKontaktart.Name := 'XDTermineKontaktart';\r\n XDTermineKontaktart.FieldName := 'Kontaktart';\r\n XDTermineKontaktart.Size := 25;\r\n XDTermineVorname.SetParentComponent(XDTermine);\r\n XDTermineVorname.Name := 'XDTermineVorname';\r\n XDTermineVorname.FieldName := 'Vorname';\r\n XDTermineVorname.Size := 40;\r\n finally\r\n lblhinweis.AfterLoadDFMValues;\r\n TC.AfterLoadDFMValues;\r\n comboMonat.AfterLoadDFMValues;\r\n comboJahr.AfterLoadDFMValues;\r\n Container1.AfterLoadDFMValues;\r\n Container2.AfterLoadDFMValues;\r\n btnzurueck.AfterLoadDFMValues;\r\n Container3.AfterLoadDFMValues;\r\n sourceTermine.AfterLoadDFMValues;\r\n XDTermine.AfterLoadDFMValues;\r\n XDTermineUID.AfterLoadDFMValues;\r\n XDTermineBeginn.AfterLoadDFMValues;\r\n XDTermineEnde.AfterLoadDFMValues;\r\n XDTermineBetreff.AfterLoadDFMValues;\r\n XDTermineColor.AfterLoadDFMValues;\r\n XDTermineAlarm.AfterLoadDFMValues;\r\n XDTerminePersonalnummer.AfterLoadDFMValues;\r\n XDTermineTerminArt.AfterLoadDFMValues;\r\n XDTermineBeginnDatum.AfterLoadDFMValues;\r\n XDTermineBeginnUhrzeit.AfterLoadDFMValues;\r\n XDTermineEndeDatum.AfterLoadDFMValues;\r\n XDTermineEndeUhrzeit.AfterLoadDFMValues;\r\n XDTerminePNachname.AfterLoadDFMValues;\r\n XDTerminePVorname.AfterLoadDFMValues;\r\n XDTerminePFarbe.AfterLoadDFMValues;\r\n XDTermineAuftrag.AfterLoadDFMValues;\r\n XDTermineTerminNotiz.AfterLoadDFMValues;\r\n XDTermineKundennummer.AfterLoadDFMValues;\r\n XDTermineNachname.AfterLoadDFMValues;\r\n XDTermineKontaktart.AfterLoadDFMValues;\r\n XDTermineVorname.AfterLoadDFMValues;\r\n end;\r\nend;\r\n\r\nend.\r\n","unit unit_ListeAuftrag;\r\n\r\ninterface\r\n\r\nuses\r\n System.SysUtils, System.Classes, JS, Web, WEBLib.Graphics, WEBLib.Controls,\r\n WEBLib.Forms, WEBLib.Dialogs, Vcl.Controls, WEBLib.ExtCtrls, WEBLib.Buttons,\r\n WEBLib.Grids, WEBLib.DBCtrls, Data.DB, WEBLib.DB, XData.Web.JsonDataset,\r\n XData.Web.Dataset, Vcl.StdCtrls, WEBLib.StdCtrls, XData.Web.Client,\r\n WEBLib.WebCtrls;\r\n\r\ntype\r\n TListeAuftrag = class(TForm)\r\n xdsAuftrag: TXDataWebDataSet;\r\n xdsAuftragKundennummer: TXDataWebEntityField;\r\n xdsAuftragNummerkomplett: TStringField;\r\n xdsAuftragReferenzAngebot: TStringField;\r\n xdsAuftragReferenzLieferschein: TStringField;\r\n xdsAuftragReferenzRechnung: TStringField;\r\n xdsAuftragDatum: TDateTimeField;\r\n xdsAuftragJahr: TFloatField;\r\n xdsAuftragKalenderwoche: TIntegerField;\r\n xdsAuftragNachname: TStringField;\r\n xdsAuftragVorname: TStringField;\r\n xdsAuftragPostleitzahl: TStringField;\r\n xdsAuftragOrt: TStringField;\r\n xdsAuftragLaenderkuerzel: TStringField;\r\n xdsAuftragLand: TStringField;\r\n xdsAuftragBriefanrede1: TStringField;\r\n xdsAuftragBriefanrede2: TStringField;\r\n xdsAuftragEMail: TStringField;\r\n xdsAuftragAdresseBild: TStringField;\r\n xdsAuftragLieferanschriftBild: TStringField;\r\n xdsAuftragZahlungsbedingung: TIntegerField;\r\n xdsAuftragZahlungsbedingungText: TStringField;\r\n xdsAuftragAuftragsbezeichnung: TStringField;\r\n xdsAuftragAuftragnummerKunde: TStringField;\r\n xdsAuftragBestelldatumKunde: TDateTimeField;\r\n xdsAuftragILN: TStringField;\r\n xdsAuftragKopftext: TStringField;\r\n xdsAuftragSchlussbemerkung: TStringField;\r\n xdsAuftragGruss: TStringField;\r\n xdsAuftragMehrwertsteuersatz1: TFloatField;\r\n xdsAuftragMehrwertsteuersatz2: TFloatField;\r\n xdsAuftragNettosumme01: TFloatField;\r\n xdsAuftragNettosumme02: TFloatField;\r\n xdsAuftragNettosumme: TFloatField;\r\n xdsAuftragMehrwertsteuer01: TFloatField;\r\n xdsAuftragMehrwertsteuer02: TFloatField;\r\n xdsAuftragMehrwertsteuer: TFloatField;\r\n xdsAuftragBruttosumme: TFloatField;\r\n xdsAuftragVersanddatum: TDateTimeField;\r\n xdsAuftragSkontosatz: TFloatField;\r\n xdsAuftragNettosummeEK: TFloatField;\r\n xdsAuftragNettoMarge: TFloatField;\r\n xdsAuftragSchreibzeichen: TStringField;\r\n xdsAuftragUnterzeichner: TStringField;\r\n xdsAuftragTelefonMA: TStringField;\r\n xdsAuftragEmailMA: TStringField;\r\n xdsAuftragUSTID: TStringField;\r\n xdsAuftragUmsatzsteuerausweis: TBooleanField;\r\n xdsAuftraggebucht: TBooleanField;\r\n xdsAuftragLieferdatum: TDateTimeField;\r\n xdsAuftragTransportbedingung: TStringField;\r\n xdsAuftragMehrwertsteuersatz3: TFloatField;\r\n xdsAuftragMehrwertsteuer03: TFloatField;\r\n xdsAuftragNettosumme03: TFloatField;\r\n xdsAuftragRundungsDifferenz: TFloatField;\r\n xdsAuftragEmailText: TStringField;\r\n xdsAuftragAuftragerledigt: TBooleanField;\r\n xdsAuftragRabattstufe: TStringField;\r\n xdsAuftragKFZKennzeichen: TStringField;\r\n xdsAuftragFahrgestellnummer: TStringField;\r\n xdsAuftragKFZHersteller: TStringField;\r\n xdsAuftragErstzulassungsdatum: TDateTimeField;\r\n xdsAuftragKMStand: TStringField;\r\n xdsAuftragKFZType: TStringField;\r\n xdsAuftragInspektionsdatum: TDateTimeField;\r\n xdsAuftragDebitorennummer: TStringField;\r\n xdsAuftragKostentraeger: TStringField;\r\n xdsAuftragRabattsatz: TFloatField;\r\n xdsAuftragObjektReferenz: TStringField;\r\n xdsAuftragBank: TStringField;\r\n xdsAuftragBankleitzahl: TFloatField;\r\n xdsAuftragKontonummer: TStringField;\r\n xdsAuftragKontoinhaber: TStringField;\r\n xdsAuftragTelefaxnummer: TStringField;\r\n xdsAuftragDatumNeu: TDateTimeField;\r\n xdsAuftragDatumgeaendert: TDateTimeField;\r\n xdsAuftragObjektnummer: TStringField;\r\n xdsAuftragLiefertermin: TStringField;\r\n xdsAuftragEmailversand: TBooleanField;\r\n xdsAuftragTelefonnummer: TStringField;\r\n xdsAuftragMobilTelefon: TStringField;\r\n xdsAuftragAuftragFax: TBooleanField;\r\n xdsAuftragREDatum: TDateTimeField;\r\n xdsAuftragBenutzerNeu: TStringField;\r\n xdsAuftragBenutzerGeaendert: TStringField;\r\n xdsAuftragBerechnungBrutto: TBooleanField;\r\n xdsAuftragBruttosumme01: TFloatField;\r\n xdsAuftragBruttosumme02: TFloatField;\r\n xdsAuftragBruttosumme03: TFloatField;\r\n xdsAuftragNotiz: TStringField;\r\n xdsAuftragMargeProzent: TFloatField;\r\n xdsAuftragWarenkreditgesperrt: TBooleanField;\r\n xdsAuftragBelegsprache: TStringField;\r\n xdsAuftragDuplicate: TStringField;\r\n xdsAuftragperEmail: TBooleanField;\r\n xdsAuftragAnsprechpartner: TStringField;\r\n xdsAuftragKundennummerFremd: TStringField;\r\n xdsAuftragProtokoll: TStringField;\r\n xdsAuftragVerleihauftrag: TBooleanField;\r\n xdsAuftragVerleihVon: TDateTimeField;\r\n xdsAuftragVerleihBis: TDateTimeField;\r\n xdsAuftragAuftragGenehmigt: TBooleanField;\r\n xdsAuftraggesperrt: TBooleanField;\r\n xdsAuftragVerleihvonText: TStringField;\r\n xdsAuftragVerleihbisText: TStringField;\r\n xdsAuftragDruckWHG: TStringField;\r\n xdsAuftragDruckWHGKurs: TFloatField;\r\n xdsAuftragProzentsatzZusatzposition: TFloatField;\r\n xdsAuftragTextZusatzposition: TStringField;\r\n xdsAuftragTextzusatzBeschreibung: TStringField;\r\n xdsAuftragLayoutname: TStringField;\r\n xdsAuftragGesamtgewicht: TFloatField;\r\n xdsAuftragBetragZusatzposition: TFloatField;\r\n xdsAuftragReferenzBestellung: TStringField;\r\n xdsAuftragTermin1: TDateTimeField;\r\n xdsAuftragTermin2: TDateTimeField;\r\n xdsAuftragZielkontaktnummer: TStringField;\r\n xdsAuftragZielkontaktname: TStringField;\r\n xdsAuftragBilddatei1: TStringField;\r\n xdsAuftragBilddatei2: TStringField;\r\n xdsAuftragZielkontaktnummer2: TStringField;\r\n xdsAuftragZielkontaktname2: TStringField;\r\n xdsAuftragbestaetigt: TDateTimeField;\r\n xdsAuftragZielkontaktnummer3: TStringField;\r\n xdsAuftragZielkontaktname3: TStringField;\r\n xdsAuftragTermin3: TDateTimeField;\r\n xdsAuftragTermin4: TDateTimeField;\r\n xdsAuftragMuster: TBooleanField;\r\n xdsAuftragKW: TIntegerField;\r\n xdsAuftragDatenlink: TStringField;\r\n xdsAuftragMehrwertsteuersatz4: TFloatField;\r\n xdsAuftragMehrwertsteuersatz5: TFloatField;\r\n xdsAuftragMehrwertsteuersatz6: TFloatField;\r\n xdsAuftragBesteuerungKey: TIntegerField;\r\n xdsAuftragVertreterMatchcode: TStringField;\r\n xdsAuftragVerfasser: TStringField;\r\n xdsAuftragLieferadresseID: TIntegerField;\r\n xdsAuftragAuftragStatus: TStringField;\r\n xdsAuftragMonatJahr: TDateTimeField;\r\n xdsAuftragBelegvariante: TStringField;\r\n xdsAuftragProduktionsfreigabe: TBooleanField;\r\n xdsAuftragReferenzRahmenAuftrag: TStringField;\r\n xdsAuftragDatumRahmenAuftrag: TDateTimeField;\r\n xdsAuftragFahrzeugID: TIntegerField;\r\n xdsAuftragAuslieferungKW: TStringField;\r\n xdsAuftragBereitstellungDatum: TDateTimeField;\r\n xdsAuftragVTUID: TStringField;\r\n xdsAuftragLieferanschriftDaten: TStringField;\r\n xdsAuftragGesamtVolumen: TFloatField;\r\n xdsAuftragBelegPKey: TIntegerField;\r\n xdsAuftragDruckParameter: TStringField;\r\n xdsAuftragReferenzService: TStringField;\r\n xdsAuftragZusatzDaten: TStringField;\r\n xdsAuftragStandPDF: TStringField;\r\n xdsAuftragPaketdienst: TStringField;\r\n xdsAuftragMonteur: TIntegerField;\r\n xdsAuftragKundennummerKundennummer: TStringField;\r\n WClient: TXDataWebClient;\r\n Container1: THTMLContainer;\r\n Container2: THTMLContainer;\r\n Container3: THTMLContainer;\r\n btnNeuerServiceBericht: TButton;\r\n btnNeuerAuftrag: TButton;\r\n ResultLabel: TLabel;\r\n btnzurueck: TButton;\r\n edtSuchbegriff: TEdit;\r\n procedure WebFormShow(Sender: TObject);\r\n procedure btnNeuerServiceBerichtClick(Sender: TObject);\r\n procedure btnNeuerAuftragClick(Sender: TObject);\r\n procedure xdsAuftragAfterOpen(DataSet: TDataSet);\r\n procedure ResultLabelClick(Sender: TObject);\r\n procedure WebFormClose(Sender: TObject; var Action: TCloseAction);\r\n procedure btnzurueckClick(Sender: TObject);\r\n procedure edtSuchbegriffChange(Sender: TObject);\r\n private\r\n { Private-Deklarationen }\r\n public\r\n { Public-Deklarationen }\r\n EinzelCard:THTMLDiv;\r\n procedure NeuerAuftrag(Kundennummer:string;Belegvariante:string);\r\n procedure Auftragholen(Auftragsnummer:string);\r\n procedure EinzelCardclick(Sender:TObject);\r\n\r\n protected procedure LoadDFMValues; override; end;\r\n\r\nvar\r\n ListeAuftrag: TListeAuftrag;\r\n\r\nimplementation\r\n uses unit1, unit2, unit_EinzelAuftrag,unit_Kontaktsuche;\r\n{$R *.dfm}\r\n\r\nprocedure TListeAuftrag.EinzelCardclick(Sender:TObject);\r\nvar\r\n EinzelAuftrag:TEinzelAuftrag;\r\n MyMerkerAuftrag:string;\r\nbegin\r\n myMerkerAuftrag:=(sender as THTMLDiv).ElementID;\r\n Container3.HTML.text:='';\r\n EinzelAuftrag := TEinzelAuftrag.CreateNew(procedure(AForm: TObject)\r\n begin\r\n (AForm as TEinzelAuftrag).MerkerAuftrag:=myMerkerAuftrag;\r\n Container3.HTML.Text:=''\r\n end\r\n );\r\n\r\n EinzelAuftrag.ShowModal(procedure(AValue: TModalResult)\r\n begin\r\n xdsAuftrag.close;\r\n xdsAuftrag.Load;\r\n end\r\n );\r\nend;\r\n\r\n\r\n\r\nprocedure TListeAuftrag.NeuerAuftrag(Kundennummer:string;Belegvariante:string);\r\n procedure OnResponse(Response:TXDataClientResponse);\r\n var\r\n ergebnis:string;\r\n begin\r\n ergebnis:=string(TJSObject(response.Result)['value']);\r\n if ergebnis='WRONG' then\r\n begin\r\n showmessage('Der Auftrag konnte leider nicht erstellt werden');\r\n end\r\n else\r\n begin\r\n Auftragholen(ergebnis);\r\n end;\r\n end;\r\nbegin\r\n WClient.RawInvoke('IServerService.NeuerAuftrag',[Kundennummer,BenutzerPersonalnummer,Belegvariante],@OnResponse);\r\n\r\nend;\r\n\r\nprocedure TListeAuftrag.ResultLabelClick(Sender: TObject);\r\nbegin\r\n if Pos('mehr anzeigen',resultlabel.html,0)>1 then\r\n begin\r\n xdsAuftrag.close;\r\n xdsAuftrag.QueryTop:=501;\r\n xdsAuftrag.Load;\r\n end;\r\nend;\r\n\r\nprocedure TListeAuftrag.Auftragholen(Auftragsnummer: string);\r\n var\r\n EinzelAuftrag:TEinzelAuftrag;\r\n procedure AfterCreate(AForm:TObject);\r\n var\r\n EinzelAuftrag:TEinzelAuftrag;\r\n begin\r\n EinzelAuftrag:=(AForm as TEinzelAuftrag);\r\n //lform.Connection.URL:=dm2.XDataWebConnection1.URL;\r\n EinzelAuftrag.MerkerAuftrag:=Auftragsnummer;\r\n end;\r\n\r\n procedure AfterShowmodal(Avalue:TModalResult);\r\n begin\r\n xdsAuftrag.Close;\r\n xdsAuftrag.Load;\r\n end;\r\n\r\n begin\r\n if LizenzOK then\r\n begin\r\n EinzelAuftrag:=TEinzelAuftrag.CreateNew(@AfterCreate);\r\n //LFrm.Popup:=true;\r\n\r\n EinzelAuftrag.ShowModal(@AfterShowmodal);\r\n end\r\n else\r\n begin\r\n showmessage('Für das Speichern von Daten sind Sie noch nicht freigeschaltet, bitte erwerben Sie eine Lizenz');\r\n end;\r\n\r\nend;\r\n\r\nprocedure TListeAuftrag.btnNeuerAuftragClick(Sender: TObject);\r\nvar\r\n LFrm:TfrmKontaktsuche;\r\n procedure AfterCreate(AForm:TObject);\r\n var\r\n LForm:TfrmKontaktsuche;\r\n begin\r\n LForm:=(AForm as TfrmKontaktsuche);\r\n Container3.HTML.Text:='';\r\n end;\r\n\r\n procedure AfterShowmodal(Avalue:TModalResult);\r\n begin\r\n if LFrm.Kontaktnummer<>'' then\r\n begin\r\n NeuerAuftrag(Lfrm.Kontaktnummer,'Auftrag');\r\n end\r\n else\r\n begin\r\n xdsauftrag.Close;\r\n xdsauftrag.Load;\r\n end;\r\n end;\r\n\r\n begin\r\n LFrm:=TfrmKontaktsuche.CreateNew(@AfterCreate);\r\n LFrm.ShowModal(@AfterShowmodal);\r\n\r\nend;\r\n\r\nprocedure TListeAuftrag.btnNeuerServiceBerichtClick(Sender: TObject);\r\nvar\r\n LFrm:TfrmKontaktsuche;\r\n procedure AfterCreate(AForm:TObject);\r\n var\r\n LForm:TfrmKontaktsuche;\r\n begin\r\n LForm:=(AForm as TfrmKontaktsuche);\r\n Container3.HTML.Text:='';\r\n end;\r\n\r\n procedure AfterShowmodal(Avalue:TModalResult);\r\n begin\r\n if LFrm.Kontaktnummer<>'' then\r\n begin\r\n NeuerAuftrag(Lfrm.Kontaktnummer,'Servicebericht');\r\n end\r\n else\r\n begin\r\n xdsauftrag.Close;\r\n xdsauftrag.Load;\r\n end;\r\n end;\r\n\r\n begin\r\n LFrm:=TfrmKontaktsuche.CreateNew(@AfterCreate);\r\n LFrm.ShowModal(@AfterShowmodal);\r\n\r\nend;\r\n\r\nprocedure TListeAuftrag.btnzurueckClick(Sender: TObject);\r\nbegin\r\ntry\r\n xdsAuftrag.Close;\r\nexcept\r\n\r\nend;\r\n self.close;\r\nend;\r\n\r\nprocedure TListeAuftrag.edtSuchbegriffChange(Sender: TObject);\r\nvar\r\n tempsuchtext:string;\r\nbegin\r\n tempsuchtext:=edtsuchbegriff.Text;\r\n Container3.HTML.text:='';\r\n if length(tempsuchtext)>0 then\r\n begin\r\n xdsauftrag.Close;\r\n xdsauftrag.querystring:='$expand=Kundennummer&$filter=(Auftragerledigt eq 0) AND (contains(Nachname,'+quotedstr(tempsuchtext)+') OR contains(Kundennummer,'+quotedstr(tempsuchtext)+') OR contains(Auftragsbezeichnung,'+quotedstr(tempsuchtext)+') OR contains(Monteur,'+quotedstr(tempsuchtext)+'))&$orderby=Nummerkomplett DESC';\r\n\r\n end\r\n else\r\n begin\r\n xdsauftrag.Close;\r\n xdsauftrag.querystring:='$expand=Kundennummer&$filter=(Auftragerledigt eq 0)&$orderby=Nummerkomplett DESC';\r\n end;\r\n xdsauftrag.Load;\r\nend;\r\n\r\n\r\nprocedure TListeAuftrag.WebFormClose(Sender: TObject; var Action: TCloseAction);\r\nbegin\r\naction:=cafree;\r\nend;\r\n\r\nprocedure TListeAuftrag.WebFormShow(Sender: TObject);\r\nbegin\r\n xdsAuftrag.QueryTop:=100;\r\n xdsAuftrag.Load;\r\nend;\r\n\r\nprocedure TListeAuftrag.xdsAuftragAfterOpen(DataSet: TDataSet);\r\nvar\r\n myelement:TJSHTMLElement;\r\n EinzelKarte:string;\r\n farbstring:string;\r\nbegin\r\n Container1.html.text:='';\r\n myelement:=container1.ElementHandle;\r\n container2.ParentElement:=myelement;\r\n Container2.HTML.Text:='';\r\n myelement:=container2.ElementHandle;\r\n btnzurueck.ParentElement:=myelement;\r\n btnNeuerServiceBericht.parentelement:=myelement;\r\n btnNeuerAuftrag.parentelement:=myelement;\r\n edtSuchbegriff.ParentElement:=myelement;\r\n ResultLabel.ParentElement:=myelement;\r\n xdsAuftrag.First;\r\n if xdsAuftrag.RecordCount=0 then ResultLabel.HTML:='nichts gefunden';\r\n if xdsAuftrag.RecordCount>0 then ResultLabel.HTML:='Aufträge: '+inttostr(xdsAuftrag.RecordCount);\r\n if xdsAuftrag.RecordCount>99 then ResultLabel.HTML:='mehr als 100 Aufträge mehr anzeigen';\r\n if xdsAuftrag.RecordCount>100 then ResultLabel.HTML:='Aufträge: '+inttostr(xdsAuftrag.RecordCount)+' (max. Anzeige: 500)';\r\n while not xdsAuftrag.eof do\r\n begin\r\n\r\n Einzelkarte:='
'+xdsAuftragNummerkomplett.asstring+' | '+formatdatetime('DD.MM.YYYY',xdsAuftragDatum.AsDateTime)+'
'+xdsAuftragBelegvariante.AsString+'
';\r\n Einzelkarte:=Einzelkarte+'
'+xdsAuftragKundennummerKundennummer.AsString;\r\n Einzelkarte:=Einzelkarte+' | '+xdsAuftragNachname.asstring+'
';\r\n Einzelkarte:=Einzelkarte+''+xdsAuftragAuftragsbezeichnung.AsString+'
';\r\n Einzelkarte:=Einzelkarte+''+xdsAuftragAuftragStatus.AsString+'
';\r\n if form1.rcw.Verkaufspreise=TRUE then Einzelkarte:=Einzelkarte+Formatfloat('#,##0.00 €',xdsAuftragNettosumme.Asfloat)+'
';\r\n Einzelkarte:=Einzelkarte+'
';\r\n if xdsAuftragMonteur.AsString<>'' then\r\n begin\r\n if dm2.queryMonteur.Locate('Personalnummer',xdsAuftragMonteur.AsString,[])=true then\r\n begin\r\n farbstring:=inttohex(dm2.queryMonteurFarbe.asinteger,6);\r\n farbstring := Copy(farbstring, 5, 2) + Copy(farbstring, 3, 2) + Copy(farbstring, 1, 2);\r\n Einzelkarte:=Einzelkarte+'
';\r\n Einzelkarte:=Einzelkarte+dm2.queryMonteurpersonalnummer.asstring+' | '+ dm2.queryMonteurVorname.AsString+' '+dm2.queryMonteurNachname.AsString+'
';\r\n end\r\n else\r\n begin\r\n Einzelkarte:=Einzelkarte+'
';\r\n Einzelkarte:=Einzelkarte+xdsAuftragMonteur.AsString+' ';\r\n Einzelkarte:=Einzelkarte+'
';\r\n end;\r\n Einzelkarte:=Einzelkarte+'
';\r\n end;\r\n\r\n\r\n myelement:=Container3.ElementHandle;\r\n EinzelCard:=THTMLDiv.Create(self);\r\n EinzelCard.ElementID:=xdsAuftragNummerkomplett.asstring;\r\n EinzelCard.HeightStyle:=ssauto;\r\n EinzelCard.Width:=350;\r\n EinzelCard.HTML.Text:=Einzelkarte;\r\n EinzelCard.ElementClassName:='card m-1 border-info';\r\n EinzelCard.OnClick:=@EinzelCardClick;\r\n EinzelCard.ParentElement:=myelement;\r\n\r\n xdsAuftrag.Next;\r\n end;\r\n\r\n edtSuchbegriff.SetFocus;\r\nend;\r\n\r\nprocedure TListeAuftrag.LoadDFMValues;\r\nbegin\r\n inherited LoadDFMValues;\r\n\r\n ResultLabel := TLabel.Create(Self);\r\n Container1 := THTMLContainer.Create(Self);\r\n Container2 := THTMLContainer.Create(Self);\r\n Container3 := THTMLContainer.Create(Self);\r\n btnNeuerServiceBericht := TButton.Create(Self);\r\n btnNeuerAuftrag := TButton.Create(Self);\r\n btnzurueck := TButton.Create(Self);\r\n edtSuchbegriff := TEdit.Create(Self);\r\n xdsAuftrag := TXDataWebDataSet.Create(Self);\r\n xdsAuftragKundennummer := TXDataWebEntityField.Create(Self);\r\n xdsAuftragNummerkomplett := TStringField.Create(Self);\r\n xdsAuftragReferenzAngebot := TStringField.Create(Self);\r\n xdsAuftragReferenzLieferschein := TStringField.Create(Self);\r\n xdsAuftragReferenzRechnung := TStringField.Create(Self);\r\n xdsAuftragDatum := TDateTimeField.Create(Self);\r\n xdsAuftragJahr := TFloatField.Create(Self);\r\n xdsAuftragKalenderwoche := TIntegerField.Create(Self);\r\n xdsAuftragNachname := TStringField.Create(Self);\r\n xdsAuftragVorname := TStringField.Create(Self);\r\n xdsAuftragPostleitzahl := TStringField.Create(Self);\r\n xdsAuftragOrt := TStringField.Create(Self);\r\n xdsAuftragLaenderkuerzel := TStringField.Create(Self);\r\n xdsAuftragLand := TStringField.Create(Self);\r\n xdsAuftragBriefanrede1 := TStringField.Create(Self);\r\n xdsAuftragBriefanrede2 := TStringField.Create(Self);\r\n xdsAuftragEMail := TStringField.Create(Self);\r\n xdsAuftragAdresseBild := TStringField.Create(Self);\r\n xdsAuftragLieferanschriftBild := TStringField.Create(Self);\r\n xdsAuftragZahlungsbedingung := TIntegerField.Create(Self);\r\n xdsAuftragZahlungsbedingungText := TStringField.Create(Self);\r\n xdsAuftragAuftragsbezeichnung := TStringField.Create(Self);\r\n xdsAuftragAuftragnummerKunde := TStringField.Create(Self);\r\n xdsAuftragBestelldatumKunde := TDateTimeField.Create(Self);\r\n xdsAuftragILN := TStringField.Create(Self);\r\n xdsAuftragKopftext := TStringField.Create(Self);\r\n xdsAuftragSchlussbemerkung := TStringField.Create(Self);\r\n xdsAuftragGruss := TStringField.Create(Self);\r\n xdsAuftragMehrwertsteuersatz1 := TFloatField.Create(Self);\r\n xdsAuftragMehrwertsteuersatz2 := TFloatField.Create(Self);\r\n xdsAuftragNettosumme01 := TFloatField.Create(Self);\r\n xdsAuftragNettosumme02 := TFloatField.Create(Self);\r\n xdsAuftragNettosumme := TFloatField.Create(Self);\r\n xdsAuftragMehrwertsteuer01 := TFloatField.Create(Self);\r\n xdsAuftragMehrwertsteuer02 := TFloatField.Create(Self);\r\n xdsAuftragMehrwertsteuer := TFloatField.Create(Self);\r\n xdsAuftragBruttosumme := TFloatField.Create(Self);\r\n xdsAuftragVersanddatum := TDateTimeField.Create(Self);\r\n xdsAuftragSkontosatz := TFloatField.Create(Self);\r\n xdsAuftragNettosummeEK := TFloatField.Create(Self);\r\n xdsAuftragNettoMarge := TFloatField.Create(Self);\r\n xdsAuftragSchreibzeichen := TStringField.Create(Self);\r\n xdsAuftragUnterzeichner := TStringField.Create(Self);\r\n xdsAuftragTelefonMA := TStringField.Create(Self);\r\n xdsAuftragEmailMA := TStringField.Create(Self);\r\n xdsAuftragUSTID := TStringField.Create(Self);\r\n xdsAuftragUmsatzsteuerausweis := TBooleanField.Create(Self);\r\n xdsAuftraggebucht := TBooleanField.Create(Self);\r\n xdsAuftragLieferdatum := TDateTimeField.Create(Self);\r\n xdsAuftragTransportbedingung := TStringField.Create(Self);\r\n xdsAuftragMehrwertsteuersatz3 := TFloatField.Create(Self);\r\n xdsAuftragMehrwertsteuer03 := TFloatField.Create(Self);\r\n xdsAuftragNettosumme03 := TFloatField.Create(Self);\r\n xdsAuftragRundungsDifferenz := TFloatField.Create(Self);\r\n xdsAuftragEmailText := TStringField.Create(Self);\r\n xdsAuftragAuftragerledigt := TBooleanField.Create(Self);\r\n xdsAuftragRabattstufe := TStringField.Create(Self);\r\n xdsAuftragKFZKennzeichen := TStringField.Create(Self);\r\n xdsAuftragFahrgestellnummer := TStringField.Create(Self);\r\n xdsAuftragKFZHersteller := TStringField.Create(Self);\r\n xdsAuftragErstzulassungsdatum := TDateTimeField.Create(Self);\r\n xdsAuftragKMStand := TStringField.Create(Self);\r\n xdsAuftragKFZType := TStringField.Create(Self);\r\n xdsAuftragInspektionsdatum := TDateTimeField.Create(Self);\r\n xdsAuftragDebitorennummer := TStringField.Create(Self);\r\n xdsAuftragKostentraeger := TStringField.Create(Self);\r\n xdsAuftragRabattsatz := TFloatField.Create(Self);\r\n xdsAuftragObjektReferenz := TStringField.Create(Self);\r\n xdsAuftragBank := TStringField.Create(Self);\r\n xdsAuftragBankleitzahl := TFloatField.Create(Self);\r\n xdsAuftragKontonummer := TStringField.Create(Self);\r\n xdsAuftragKontoinhaber := TStringField.Create(Self);\r\n xdsAuftragTelefaxnummer := TStringField.Create(Self);\r\n xdsAuftragDatumNeu := TDateTimeField.Create(Self);\r\n xdsAuftragDatumgeaendert := TDateTimeField.Create(Self);\r\n xdsAuftragObjektnummer := TStringField.Create(Self);\r\n xdsAuftragLiefertermin := TStringField.Create(Self);\r\n xdsAuftragEmailversand := TBooleanField.Create(Self);\r\n xdsAuftragTelefonnummer := TStringField.Create(Self);\r\n xdsAuftragMobilTelefon := TStringField.Create(Self);\r\n xdsAuftragAuftragFax := TBooleanField.Create(Self);\r\n xdsAuftragREDatum := TDateTimeField.Create(Self);\r\n xdsAuftragBenutzerNeu := TStringField.Create(Self);\r\n xdsAuftragBenutzerGeaendert := TStringField.Create(Self);\r\n xdsAuftragBerechnungBrutto := TBooleanField.Create(Self);\r\n xdsAuftragBruttosumme01 := TFloatField.Create(Self);\r\n xdsAuftragBruttosumme02 := TFloatField.Create(Self);\r\n xdsAuftragBruttosumme03 := TFloatField.Create(Self);\r\n xdsAuftragNotiz := TStringField.Create(Self);\r\n xdsAuftragMargeProzent := TFloatField.Create(Self);\r\n xdsAuftragWarenkreditgesperrt := TBooleanField.Create(Self);\r\n xdsAuftragBelegsprache := TStringField.Create(Self);\r\n xdsAuftragDuplicate := TStringField.Create(Self);\r\n xdsAuftragperEmail := TBooleanField.Create(Self);\r\n xdsAuftragAnsprechpartner := TStringField.Create(Self);\r\n xdsAuftragKundennummerFremd := TStringField.Create(Self);\r\n xdsAuftragProtokoll := TStringField.Create(Self);\r\n xdsAuftragVerleihauftrag := TBooleanField.Create(Self);\r\n xdsAuftragVerleihVon := TDateTimeField.Create(Self);\r\n xdsAuftragVerleihBis := TDateTimeField.Create(Self);\r\n xdsAuftragAuftragGenehmigt := TBooleanField.Create(Self);\r\n xdsAuftraggesperrt := TBooleanField.Create(Self);\r\n xdsAuftragVerleihvonText := TStringField.Create(Self);\r\n xdsAuftragVerleihbisText := TStringField.Create(Self);\r\n xdsAuftragDruckWHG := TStringField.Create(Self);\r\n xdsAuftragDruckWHGKurs := TFloatField.Create(Self);\r\n xdsAuftragProzentsatzZusatzposition := TFloatField.Create(Self);\r\n xdsAuftragTextZusatzposition := TStringField.Create(Self);\r\n xdsAuftragTextzusatzBeschreibung := TStringField.Create(Self);\r\n xdsAuftragLayoutname := TStringField.Create(Self);\r\n xdsAuftragGesamtgewicht := TFloatField.Create(Self);\r\n xdsAuftragBetragZusatzposition := TFloatField.Create(Self);\r\n xdsAuftragReferenzBestellung := TStringField.Create(Self);\r\n xdsAuftragTermin1 := TDateTimeField.Create(Self);\r\n xdsAuftragTermin2 := TDateTimeField.Create(Self);\r\n xdsAuftragZielkontaktnummer := TStringField.Create(Self);\r\n xdsAuftragZielkontaktname := TStringField.Create(Self);\r\n xdsAuftragBilddatei1 := TStringField.Create(Self);\r\n xdsAuftragBilddatei2 := TStringField.Create(Self);\r\n xdsAuftragZielkontaktnummer2 := TStringField.Create(Self);\r\n xdsAuftragZielkontaktname2 := TStringField.Create(Self);\r\n xdsAuftragbestaetigt := TDateTimeField.Create(Self);\r\n xdsAuftragZielkontaktnummer3 := TStringField.Create(Self);\r\n xdsAuftragZielkontaktname3 := TStringField.Create(Self);\r\n xdsAuftragTermin3 := TDateTimeField.Create(Self);\r\n xdsAuftragTermin4 := TDateTimeField.Create(Self);\r\n xdsAuftragMuster := TBooleanField.Create(Self);\r\n xdsAuftragKW := TIntegerField.Create(Self);\r\n xdsAuftragDatenlink := TStringField.Create(Self);\r\n xdsAuftragMehrwertsteuersatz4 := TFloatField.Create(Self);\r\n xdsAuftragMehrwertsteuersatz5 := TFloatField.Create(Self);\r\n xdsAuftragMehrwertsteuersatz6 := TFloatField.Create(Self);\r\n xdsAuftragBesteuerungKey := TIntegerField.Create(Self);\r\n xdsAuftragVertreterMatchcode := TStringField.Create(Self);\r\n xdsAuftragVerfasser := TStringField.Create(Self);\r\n xdsAuftragLieferadresseID := TIntegerField.Create(Self);\r\n xdsAuftragAuftragStatus := TStringField.Create(Self);\r\n xdsAuftragMonatJahr := TDateTimeField.Create(Self);\r\n xdsAuftragBelegvariante := TStringField.Create(Self);\r\n xdsAuftragProduktionsfreigabe := TBooleanField.Create(Self);\r\n xdsAuftragReferenzRahmenAuftrag := TStringField.Create(Self);\r\n xdsAuftragDatumRahmenAuftrag := TDateTimeField.Create(Self);\r\n xdsAuftragFahrzeugID := TIntegerField.Create(Self);\r\n xdsAuftragAuslieferungKW := TStringField.Create(Self);\r\n xdsAuftragBereitstellungDatum := TDateTimeField.Create(Self);\r\n xdsAuftragVTUID := TStringField.Create(Self);\r\n xdsAuftragLieferanschriftDaten := TStringField.Create(Self);\r\n xdsAuftragGesamtVolumen := TFloatField.Create(Self);\r\n xdsAuftragBelegPKey := TIntegerField.Create(Self);\r\n xdsAuftragDruckParameter := TStringField.Create(Self);\r\n xdsAuftragReferenzService := TStringField.Create(Self);\r\n xdsAuftragZusatzDaten := TStringField.Create(Self);\r\n xdsAuftragStandPDF := TStringField.Create(Self);\r\n xdsAuftragPaketdienst := TStringField.Create(Self);\r\n xdsAuftragMonteur := TIntegerField.Create(Self);\r\n xdsAuftragKundennummerKundennummer := TStringField.Create(Self);\r\n WClient := TXDataWebClient.Create(Self);\r\n\r\n ResultLabel.BeforeLoadDFMValues;\r\n Container1.BeforeLoadDFMValues;\r\n Container2.BeforeLoadDFMValues;\r\n Container3.BeforeLoadDFMValues;\r\n btnNeuerServiceBericht.BeforeLoadDFMValues;\r\n btnNeuerAuftrag.BeforeLoadDFMValues;\r\n btnzurueck.BeforeLoadDFMValues;\r\n edtSuchbegriff.BeforeLoadDFMValues;\r\n xdsAuftrag.BeforeLoadDFMValues;\r\n xdsAuftragKundennummer.BeforeLoadDFMValues;\r\n xdsAuftragNummerkomplett.BeforeLoadDFMValues;\r\n xdsAuftragReferenzAngebot.BeforeLoadDFMValues;\r\n xdsAuftragReferenzLieferschein.BeforeLoadDFMValues;\r\n xdsAuftragReferenzRechnung.BeforeLoadDFMValues;\r\n xdsAuftragDatum.BeforeLoadDFMValues;\r\n xdsAuftragJahr.BeforeLoadDFMValues;\r\n xdsAuftragKalenderwoche.BeforeLoadDFMValues;\r\n xdsAuftragNachname.BeforeLoadDFMValues;\r\n xdsAuftragVorname.BeforeLoadDFMValues;\r\n xdsAuftragPostleitzahl.BeforeLoadDFMValues;\r\n xdsAuftragOrt.BeforeLoadDFMValues;\r\n xdsAuftragLaenderkuerzel.BeforeLoadDFMValues;\r\n xdsAuftragLand.BeforeLoadDFMValues;\r\n xdsAuftragBriefanrede1.BeforeLoadDFMValues;\r\n xdsAuftragBriefanrede2.BeforeLoadDFMValues;\r\n xdsAuftragEMail.BeforeLoadDFMValues;\r\n xdsAuftragAdresseBild.BeforeLoadDFMValues;\r\n xdsAuftragLieferanschriftBild.BeforeLoadDFMValues;\r\n xdsAuftragZahlungsbedingung.BeforeLoadDFMValues;\r\n xdsAuftragZahlungsbedingungText.BeforeLoadDFMValues;\r\n xdsAuftragAuftragsbezeichnung.BeforeLoadDFMValues;\r\n xdsAuftragAuftragnummerKunde.BeforeLoadDFMValues;\r\n xdsAuftragBestelldatumKunde.BeforeLoadDFMValues;\r\n xdsAuftragILN.BeforeLoadDFMValues;\r\n xdsAuftragKopftext.BeforeLoadDFMValues;\r\n xdsAuftragSchlussbemerkung.BeforeLoadDFMValues;\r\n xdsAuftragGruss.BeforeLoadDFMValues;\r\n xdsAuftragMehrwertsteuersatz1.BeforeLoadDFMValues;\r\n xdsAuftragMehrwertsteuersatz2.BeforeLoadDFMValues;\r\n xdsAuftragNettosumme01.BeforeLoadDFMValues;\r\n xdsAuftragNettosumme02.BeforeLoadDFMValues;\r\n xdsAuftragNettosumme.BeforeLoadDFMValues;\r\n xdsAuftragMehrwertsteuer01.BeforeLoadDFMValues;\r\n xdsAuftragMehrwertsteuer02.BeforeLoadDFMValues;\r\n xdsAuftragMehrwertsteuer.BeforeLoadDFMValues;\r\n xdsAuftragBruttosumme.BeforeLoadDFMValues;\r\n xdsAuftragVersanddatum.BeforeLoadDFMValues;\r\n xdsAuftragSkontosatz.BeforeLoadDFMValues;\r\n xdsAuftragNettosummeEK.BeforeLoadDFMValues;\r\n xdsAuftragNettoMarge.BeforeLoadDFMValues;\r\n xdsAuftragSchreibzeichen.BeforeLoadDFMValues;\r\n xdsAuftragUnterzeichner.BeforeLoadDFMValues;\r\n xdsAuftragTelefonMA.BeforeLoadDFMValues;\r\n xdsAuftragEmailMA.BeforeLoadDFMValues;\r\n xdsAuftragUSTID.BeforeLoadDFMValues;\r\n xdsAuftragUmsatzsteuerausweis.BeforeLoadDFMValues;\r\n xdsAuftraggebucht.BeforeLoadDFMValues;\r\n xdsAuftragLieferdatum.BeforeLoadDFMValues;\r\n xdsAuftragTransportbedingung.BeforeLoadDFMValues;\r\n xdsAuftragMehrwertsteuersatz3.BeforeLoadDFMValues;\r\n xdsAuftragMehrwertsteuer03.BeforeLoadDFMValues;\r\n xdsAuftragNettosumme03.BeforeLoadDFMValues;\r\n xdsAuftragRundungsDifferenz.BeforeLoadDFMValues;\r\n xdsAuftragEmailText.BeforeLoadDFMValues;\r\n xdsAuftragAuftragerledigt.BeforeLoadDFMValues;\r\n xdsAuftragRabattstufe.BeforeLoadDFMValues;\r\n xdsAuftragKFZKennzeichen.BeforeLoadDFMValues;\r\n xdsAuftragFahrgestellnummer.BeforeLoadDFMValues;\r\n xdsAuftragKFZHersteller.BeforeLoadDFMValues;\r\n xdsAuftragErstzulassungsdatum.BeforeLoadDFMValues;\r\n xdsAuftragKMStand.BeforeLoadDFMValues;\r\n xdsAuftragKFZType.BeforeLoadDFMValues;\r\n xdsAuftragInspektionsdatum.BeforeLoadDFMValues;\r\n xdsAuftragDebitorennummer.BeforeLoadDFMValues;\r\n xdsAuftragKostentraeger.BeforeLoadDFMValues;\r\n xdsAuftragRabattsatz.BeforeLoadDFMValues;\r\n xdsAuftragObjektReferenz.BeforeLoadDFMValues;\r\n xdsAuftragBank.BeforeLoadDFMValues;\r\n xdsAuftragBankleitzahl.BeforeLoadDFMValues;\r\n xdsAuftragKontonummer.BeforeLoadDFMValues;\r\n xdsAuftragKontoinhaber.BeforeLoadDFMValues;\r\n xdsAuftragTelefaxnummer.BeforeLoadDFMValues;\r\n xdsAuftragDatumNeu.BeforeLoadDFMValues;\r\n xdsAuftragDatumgeaendert.BeforeLoadDFMValues;\r\n xdsAuftragObjektnummer.BeforeLoadDFMValues;\r\n xdsAuftragLiefertermin.BeforeLoadDFMValues;\r\n xdsAuftragEmailversand.BeforeLoadDFMValues;\r\n xdsAuftragTelefonnummer.BeforeLoadDFMValues;\r\n xdsAuftragMobilTelefon.BeforeLoadDFMValues;\r\n xdsAuftragAuftragFax.BeforeLoadDFMValues;\r\n xdsAuftragREDatum.BeforeLoadDFMValues;\r\n xdsAuftragBenutzerNeu.BeforeLoadDFMValues;\r\n xdsAuftragBenutzerGeaendert.BeforeLoadDFMValues;\r\n xdsAuftragBerechnungBrutto.BeforeLoadDFMValues;\r\n xdsAuftragBruttosumme01.BeforeLoadDFMValues;\r\n xdsAuftragBruttosumme02.BeforeLoadDFMValues;\r\n xdsAuftragBruttosumme03.BeforeLoadDFMValues;\r\n xdsAuftragNotiz.BeforeLoadDFMValues;\r\n xdsAuftragMargeProzent.BeforeLoadDFMValues;\r\n xdsAuftragWarenkreditgesperrt.BeforeLoadDFMValues;\r\n xdsAuftragBelegsprache.BeforeLoadDFMValues;\r\n xdsAuftragDuplicate.BeforeLoadDFMValues;\r\n xdsAuftragperEmail.BeforeLoadDFMValues;\r\n xdsAuftragAnsprechpartner.BeforeLoadDFMValues;\r\n xdsAuftragKundennummerFremd.BeforeLoadDFMValues;\r\n xdsAuftragProtokoll.BeforeLoadDFMValues;\r\n xdsAuftragVerleihauftrag.BeforeLoadDFMValues;\r\n xdsAuftragVerleihVon.BeforeLoadDFMValues;\r\n xdsAuftragVerleihBis.BeforeLoadDFMValues;\r\n xdsAuftragAuftragGenehmigt.BeforeLoadDFMValues;\r\n xdsAuftraggesperrt.BeforeLoadDFMValues;\r\n xdsAuftragVerleihvonText.BeforeLoadDFMValues;\r\n xdsAuftragVerleihbisText.BeforeLoadDFMValues;\r\n xdsAuftragDruckWHG.BeforeLoadDFMValues;\r\n xdsAuftragDruckWHGKurs.BeforeLoadDFMValues;\r\n xdsAuftragProzentsatzZusatzposition.BeforeLoadDFMValues;\r\n xdsAuftragTextZusatzposition.BeforeLoadDFMValues;\r\n xdsAuftragTextzusatzBeschreibung.BeforeLoadDFMValues;\r\n xdsAuftragLayoutname.BeforeLoadDFMValues;\r\n xdsAuftragGesamtgewicht.BeforeLoadDFMValues;\r\n xdsAuftragBetragZusatzposition.BeforeLoadDFMValues;\r\n xdsAuftragReferenzBestellung.BeforeLoadDFMValues;\r\n xdsAuftragTermin1.BeforeLoadDFMValues;\r\n xdsAuftragTermin2.BeforeLoadDFMValues;\r\n xdsAuftragZielkontaktnummer.BeforeLoadDFMValues;\r\n xdsAuftragZielkontaktname.BeforeLoadDFMValues;\r\n xdsAuftragBilddatei1.BeforeLoadDFMValues;\r\n xdsAuftragBilddatei2.BeforeLoadDFMValues;\r\n xdsAuftragZielkontaktnummer2.BeforeLoadDFMValues;\r\n xdsAuftragZielkontaktname2.BeforeLoadDFMValues;\r\n xdsAuftragbestaetigt.BeforeLoadDFMValues;\r\n xdsAuftragZielkontaktnummer3.BeforeLoadDFMValues;\r\n xdsAuftragZielkontaktname3.BeforeLoadDFMValues;\r\n xdsAuftragTermin3.BeforeLoadDFMValues;\r\n xdsAuftragTermin4.BeforeLoadDFMValues;\r\n xdsAuftragMuster.BeforeLoadDFMValues;\r\n xdsAuftragKW.BeforeLoadDFMValues;\r\n xdsAuftragDatenlink.BeforeLoadDFMValues;\r\n xdsAuftragMehrwertsteuersatz4.BeforeLoadDFMValues;\r\n xdsAuftragMehrwertsteuersatz5.BeforeLoadDFMValues;\r\n xdsAuftragMehrwertsteuersatz6.BeforeLoadDFMValues;\r\n xdsAuftragBesteuerungKey.BeforeLoadDFMValues;\r\n xdsAuftragVertreterMatchcode.BeforeLoadDFMValues;\r\n xdsAuftragVerfasser.BeforeLoadDFMValues;\r\n xdsAuftragLieferadresseID.BeforeLoadDFMValues;\r\n xdsAuftragAuftragStatus.BeforeLoadDFMValues;\r\n xdsAuftragMonatJahr.BeforeLoadDFMValues;\r\n xdsAuftragBelegvariante.BeforeLoadDFMValues;\r\n xdsAuftragProduktionsfreigabe.BeforeLoadDFMValues;\r\n xdsAuftragReferenzRahmenAuftrag.BeforeLoadDFMValues;\r\n xdsAuftragDatumRahmenAuftrag.BeforeLoadDFMValues;\r\n xdsAuftragFahrzeugID.BeforeLoadDFMValues;\r\n xdsAuftragAuslieferungKW.BeforeLoadDFMValues;\r\n xdsAuftragBereitstellungDatum.BeforeLoadDFMValues;\r\n xdsAuftragVTUID.BeforeLoadDFMValues;\r\n xdsAuftragLieferanschriftDaten.BeforeLoadDFMValues;\r\n xdsAuftragGesamtVolumen.BeforeLoadDFMValues;\r\n xdsAuftragBelegPKey.BeforeLoadDFMValues;\r\n xdsAuftragDruckParameter.BeforeLoadDFMValues;\r\n xdsAuftragReferenzService.BeforeLoadDFMValues;\r\n xdsAuftragZusatzDaten.BeforeLoadDFMValues;\r\n xdsAuftragStandPDF.BeforeLoadDFMValues;\r\n xdsAuftragPaketdienst.BeforeLoadDFMValues;\r\n xdsAuftragMonteur.BeforeLoadDFMValues;\r\n xdsAuftragKundennummerKundennummer.BeforeLoadDFMValues;\r\n WClient.BeforeLoadDFMValues;\r\n try\r\n Name := 'ListeAuftrag';\r\n Width := 171;\r\n Height := 350;\r\n ElementFont := efCSS;\r\n ElementPosition := epIgnore;\r\n Font.Charset := DEFAULT_CHARSET;\r\n Font.Color := clWindowText;\r\n Font.Height := -11;\r\n Font.Name := 'Tahoma';\r\n Font.Style := [];\r\n ParentFont := False;\r\n SetEvent(Self, 'OnClose', 'WebFormClose');\r\n SetEvent(Self, 'OnShow', 'WebFormShow');\r\n ResultLabel.SetParentComponent(Self);\r\n ResultLabel.Name := 'ResultLabel';\r\n ResultLabel.Left := 8;\r\n ResultLabel.Top := 204;\r\n ResultLabel.Width := 55;\r\n ResultLabel.Height := 13;\r\n ResultLabel.Caption := 'ResultLabel';\r\n ResultLabel.ElementClassName := 'h6 m-2';\r\n ResultLabel.ElementFont := efCSS;\r\n ResultLabel.ElementPosition := epIgnore;\r\n ResultLabel.HeightStyle := ssAuto;\r\n ResultLabel.HeightPercent := 100.000000000000000000;\r\n ResultLabel.WidthStyle := ssAuto;\r\n ResultLabel.WidthPercent := 100.000000000000000000;\r\n SetEvent(ResultLabel, Self, 'OnClick', 'ResultLabelClick');\r\n Container1.SetParentComponent(Self);\r\n Container1.Name := 'Container1';\r\n Container1.Left := 0;\r\n Container1.Top := 0;\r\n Container1.Width := 169;\r\n Container1.Height := 41;\r\n Container1.HeightStyle := ssAuto;\r\n Container1.WidthStyle := ssPercent;\r\n Container1.ChildOrder := 2;\r\n Container1.ElementFont := efCSS;\r\n Container1.ElementPosition := epIgnore;\r\n Container2.SetParentComponent(Self);\r\n Container2.Name := 'Container2';\r\n Container2.Left := 0;\r\n Container2.Top := 47;\r\n Container2.Width := 169;\r\n Container2.Height := 41;\r\n Container2.ElementClassName := 'd-flex flex-wrap m-1';\r\n Container2.HeightStyle := ssAuto;\r\n Container2.WidthStyle := ssAuto;\r\n Container2.ChildOrder := 5;\r\n Container2.ElementFont := efCSS;\r\n Container2.ElementPosition := epIgnore;\r\n Container3.SetParentComponent(Self);\r\n Container3.Name := 'Container3';\r\n Container3.Left := 0;\r\n Container3.Top := 94;\r\n Container3.Width := 169;\r\n Container3.Height := 41;\r\n Container3.ElementClassName := 'd-flex flex-wrap m-1';\r\n Container3.HeightStyle := ssAuto;\r\n Container3.WidthStyle := ssAuto;\r\n Container3.ChildOrder := 5;\r\n Container3.ElementFont := efCSS;\r\n Container3.ElementPosition := epIgnore;\r\n btnNeuerServiceBericht.SetParentComponent(Self);\r\n btnNeuerServiceBericht.Name := 'btnNeuerServiceBericht';\r\n btnNeuerServiceBericht.Left := 73;\r\n btnNeuerServiceBericht.Top := 16;\r\n btnNeuerServiceBericht.Width := 96;\r\n btnNeuerServiceBericht.Height := 25;\r\n btnNeuerServiceBericht.Caption := '+ Servicebericht';\r\n btnNeuerServiceBericht.ChildOrder := 7;\r\n btnNeuerServiceBericht.ElementClassName := 'btn btn-info m-1 text-left';\r\n btnNeuerServiceBericht.ElementFont := efCSS;\r\n btnNeuerServiceBericht.ElementPosition := epIgnore;\r\n btnNeuerServiceBericht.HeightStyle := ssAuto;\r\n btnNeuerServiceBericht.HeightPercent := 100.000000000000000000;\r\n btnNeuerServiceBericht.WidthStyle := ssAuto;\r\n btnNeuerServiceBericht.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnNeuerServiceBericht, Self, 'OnClick', 'btnNeuerServiceBerichtClick');\r\n btnNeuerAuftrag.SetParentComponent(Self);\r\n btnNeuerAuftrag.Name := 'btnNeuerAuftrag';\r\n btnNeuerAuftrag.Left := 73;\r\n btnNeuerAuftrag.Top := 47;\r\n btnNeuerAuftrag.Width := 96;\r\n btnNeuerAuftrag.Height := 25;\r\n btnNeuerAuftrag.Caption := '+ Auftrag';\r\n btnNeuerAuftrag.ChildOrder := 8;\r\n btnNeuerAuftrag.ElementClassName := 'btn btn-info m-1 text-left';\r\n btnNeuerAuftrag.ElementFont := efCSS;\r\n btnNeuerAuftrag.ElementPosition := epIgnore;\r\n btnNeuerAuftrag.HeightStyle := ssAuto;\r\n btnNeuerAuftrag.HeightPercent := 100.000000000000000000;\r\n btnNeuerAuftrag.WidthStyle := ssAuto;\r\n btnNeuerAuftrag.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnNeuerAuftrag, Self, 'OnClick', 'btnNeuerAuftragClick');\r\n btnzurueck.SetParentComponent(Self);\r\n btnzurueck.Name := 'btnzurueck';\r\n btnzurueck.Left := 67;\r\n btnzurueck.Top := 141;\r\n btnzurueck.Width := 96;\r\n btnzurueck.Height := 25;\r\n btnzurueck.Caption := '<< zur'#252'ck';\r\n btnzurueck.ChildOrder := 4;\r\n btnzurueck.ElementClassName := 'btn btn-info m-1 text-left';\r\n btnzurueck.ElementFont := efCSS;\r\n btnzurueck.ElementPosition := epIgnore;\r\n btnzurueck.HeightStyle := ssAuto;\r\n btnzurueck.HeightPercent := 100.000000000000000000;\r\n btnzurueck.WidthStyle := ssAuto;\r\n btnzurueck.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnzurueck, Self, 'OnClick', 'btnzurueckClick');\r\n edtSuchbegriff.SetParentComponent(Self);\r\n edtSuchbegriff.Name := 'edtSuchbegriff';\r\n edtSuchbegriff.Left := 8;\r\n edtSuchbegriff.Top := 296;\r\n edtSuchbegriff.Width := 150;\r\n edtSuchbegriff.Height := 22;\r\n edtSuchbegriff.AutoSelect := False;\r\n edtSuchbegriff.ChildOrder := 6;\r\n edtSuchbegriff.ElementClassName := 'form-control input-sm m-1';\r\n edtSuchbegriff.ElementFont := efCSS;\r\n edtSuchbegriff.ElementPosition := epIgnore;\r\n edtSuchbegriff.HeightStyle := ssAuto;\r\n edtSuchbegriff.HeightPercent := 100.000000000000000000;\r\n edtSuchbegriff.ShowHint := True;\r\n edtSuchbegriff.TextHint := 'Suchbegriff eingeben';\r\n edtSuchbegriff.WidthPercent := 60.000000000000000000;\r\n SetEvent(edtSuchbegriff, Self, 'OnChange', 'edtSuchbegriffChange');\r\n xdsAuftrag.SetParentComponent(Self);\r\n xdsAuftrag.Name := 'xdsAuftrag';\r\n xdsAuftrag.AfterOpen := xdsAuftragAfterOpen;\r\n xdsAuftrag.EntitySetName := 'Auftrag';\r\n xdsAuftrag.Connection := DM2.XDataWebConnection1;\r\n xdsAuftrag.SubpropsDepth := 1;\r\n xdsAuftrag.QueryString := '$expand=Kundennummer&$filter=(Auftragerledigt eq 0)&$orderby=Nummerkomplett DESC';\r\n xdsAuftrag.QueryTop := 100;\r\n xdsAuftrag.Left := 36;\r\n xdsAuftrag.Top := 118;\r\n xdsAuftragKundennummer.SetParentComponent(xdsAuftrag);\r\n xdsAuftragKundennummer.Name := 'xdsAuftragKundennummer';\r\n xdsAuftragKundennummer.FieldName := 'Kundennummer';\r\n xdsAuftragKundennummer.Required := True;\r\n xdsAuftragNummerkomplett.SetParentComponent(xdsAuftrag);\r\n xdsAuftragNummerkomplett.Name := 'xdsAuftragNummerkomplett';\r\n xdsAuftragNummerkomplett.FieldName := 'Nummerkomplett';\r\n xdsAuftragNummerkomplett.Required := True;\r\n xdsAuftragNummerkomplett.Size := 10;\r\n xdsAuftragReferenzAngebot.SetParentComponent(xdsAuftrag);\r\n xdsAuftragReferenzAngebot.Name := 'xdsAuftragReferenzAngebot';\r\n xdsAuftragReferenzAngebot.FieldName := 'ReferenzAngebot';\r\n xdsAuftragReferenzAngebot.Size := 10;\r\n xdsAuftragReferenzLieferschein.SetParentComponent(xdsAuftrag);\r\n xdsAuftragReferenzLieferschein.Name := 'xdsAuftragReferenzLieferschein';\r\n xdsAuftragReferenzLieferschein.FieldName := 'ReferenzLieferschein';\r\n xdsAuftragReferenzLieferschein.Size := 10;\r\n xdsAuftragReferenzRechnung.SetParentComponent(xdsAuftrag);\r\n xdsAuftragReferenzRechnung.Name := 'xdsAuftragReferenzRechnung';\r\n xdsAuftragReferenzRechnung.FieldName := 'ReferenzRechnung';\r\n xdsAuftragReferenzRechnung.Size := 10;\r\n xdsAuftragDatum.SetParentComponent(xdsAuftrag);\r\n xdsAuftragDatum.Name := 'xdsAuftragDatum';\r\n xdsAuftragDatum.FieldName := 'Datum';\r\n xdsAuftragDatum.Required := True;\r\n xdsAuftragDatum.DisplayFormat := 'DD.MM.YYYY';\r\n xdsAuftragJahr.SetParentComponent(xdsAuftrag);\r\n xdsAuftragJahr.Name := 'xdsAuftragJahr';\r\n xdsAuftragJahr.FieldName := 'Jahr';\r\n xdsAuftragKalenderwoche.SetParentComponent(xdsAuftrag);\r\n xdsAuftragKalenderwoche.Name := 'xdsAuftragKalenderwoche';\r\n xdsAuftragKalenderwoche.FieldName := 'Kalenderwoche';\r\n xdsAuftragNachname.SetParentComponent(xdsAuftrag);\r\n xdsAuftragNachname.Name := 'xdsAuftragNachname';\r\n xdsAuftragNachname.FieldName := 'Nachname';\r\n xdsAuftragNachname.Size := 50;\r\n xdsAuftragVorname.SetParentComponent(xdsAuftrag);\r\n xdsAuftragVorname.Name := 'xdsAuftragVorname';\r\n xdsAuftragVorname.FieldName := 'Vorname';\r\n xdsAuftragVorname.Size := 50;\r\n xdsAuftragPostleitzahl.SetParentComponent(xdsAuftrag);\r\n xdsAuftragPostleitzahl.Name := 'xdsAuftragPostleitzahl';\r\n xdsAuftragPostleitzahl.FieldName := 'Postleitzahl';\r\n xdsAuftragPostleitzahl.Size := 10;\r\n xdsAuftragOrt.SetParentComponent(xdsAuftrag);\r\n xdsAuftragOrt.Name := 'xdsAuftragOrt';\r\n xdsAuftragOrt.FieldName := 'Ort';\r\n xdsAuftragOrt.Size := 50;\r\n xdsAuftragLaenderkuerzel.SetParentComponent(xdsAuftrag);\r\n xdsAuftragLaenderkuerzel.Name := 'xdsAuftragLaenderkuerzel';\r\n xdsAuftragLaenderkuerzel.FieldName := 'Laenderkuerzel';\r\n xdsAuftragLaenderkuerzel.Size := 5;\r\n xdsAuftragLand.SetParentComponent(xdsAuftrag);\r\n xdsAuftragLand.Name := 'xdsAuftragLand';\r\n xdsAuftragLand.FieldName := 'Land';\r\n xdsAuftragLand.Size := 50;\r\n xdsAuftragBriefanrede1.SetParentComponent(xdsAuftrag);\r\n xdsAuftragBriefanrede1.Name := 'xdsAuftragBriefanrede1';\r\n xdsAuftragBriefanrede1.FieldName := 'Briefanrede1';\r\n xdsAuftragBriefanrede1.Size := 255;\r\n xdsAuftragBriefanrede2.SetParentComponent(xdsAuftrag);\r\n xdsAuftragBriefanrede2.Name := 'xdsAuftragBriefanrede2';\r\n xdsAuftragBriefanrede2.FieldName := 'Briefanrede2';\r\n xdsAuftragBriefanrede2.Size := 40;\r\n xdsAuftragEMail.SetParentComponent(xdsAuftrag);\r\n xdsAuftragEMail.Name := 'xdsAuftragEMail';\r\n xdsAuftragEMail.FieldName := 'EMail';\r\n xdsAuftragEMail.Size := 50;\r\n xdsAuftragAdresseBild.SetParentComponent(xdsAuftrag);\r\n xdsAuftragAdresseBild.Name := 'xdsAuftragAdresseBild';\r\n xdsAuftragAdresseBild.FieldName := 'AdresseBild';\r\n xdsAuftragAdresseBild.Size := 255;\r\n xdsAuftragLieferanschriftBild.SetParentComponent(xdsAuftrag);\r\n xdsAuftragLieferanschriftBild.Name := 'xdsAuftragLieferanschriftBild';\r\n xdsAuftragLieferanschriftBild.FieldName := 'LieferanschriftBild';\r\n xdsAuftragLieferanschriftBild.Size := 255;\r\n xdsAuftragZahlungsbedingung.SetParentComponent(xdsAuftrag);\r\n xdsAuftragZahlungsbedingung.Name := 'xdsAuftragZahlungsbedingung';\r\n xdsAuftragZahlungsbedingung.FieldName := 'Zahlungsbedingung';\r\n xdsAuftragZahlungsbedingungText.SetParentComponent(xdsAuftrag);\r\n xdsAuftragZahlungsbedingungText.Name := 'xdsAuftragZahlungsbedingungText';\r\n xdsAuftragZahlungsbedingungText.FieldName := 'ZahlungsbedingungText';\r\n xdsAuftragZahlungsbedingungText.Size := 250;\r\n xdsAuftragAuftragsbezeichnung.SetParentComponent(xdsAuftrag);\r\n xdsAuftragAuftragsbezeichnung.Name := 'xdsAuftragAuftragsbezeichnung';\r\n xdsAuftragAuftragsbezeichnung.FieldName := 'Auftragsbezeichnung';\r\n xdsAuftragAuftragsbezeichnung.Size := 255;\r\n xdsAuftragAuftragnummerKunde.SetParentComponent(xdsAuftrag);\r\n xdsAuftragAuftragnummerKunde.Name := 'xdsAuftragAuftragnummerKunde';\r\n xdsAuftragAuftragnummerKunde.FieldName := 'AuftragnummerKunde';\r\n xdsAuftragAuftragnummerKunde.Size := 50;\r\n xdsAuftragBestelldatumKunde.SetParentComponent(xdsAuftrag);\r\n xdsAuftragBestelldatumKunde.Name := 'xdsAuftragBestelldatumKunde';\r\n xdsAuftragBestelldatumKunde.FieldName := 'BestelldatumKunde';\r\n xdsAuftragILN.SetParentComponent(xdsAuftrag);\r\n xdsAuftragILN.Name := 'xdsAuftragILN';\r\n xdsAuftragILN.FieldName := 'ILN';\r\n xdsAuftragILN.Size := 50;\r\n xdsAuftragKopftext.SetParentComponent(xdsAuftrag);\r\n xdsAuftragKopftext.Name := 'xdsAuftragKopftext';\r\n xdsAuftragKopftext.FieldName := 'Kopftext';\r\n xdsAuftragKopftext.Size := 255;\r\n xdsAuftragSchlussbemerkung.SetParentComponent(xdsAuftrag);\r\n xdsAuftragSchlussbemerkung.Name := 'xdsAuftragSchlussbemerkung';\r\n xdsAuftragSchlussbemerkung.FieldName := 'Schlussbemerkung';\r\n xdsAuftragSchlussbemerkung.Size := 255;\r\n xdsAuftragGruss.SetParentComponent(xdsAuftrag);\r\n xdsAuftragGruss.Name := 'xdsAuftragGruss';\r\n xdsAuftragGruss.FieldName := 'Gruss';\r\n xdsAuftragGruss.Size := 255;\r\n xdsAuftragMehrwertsteuersatz1.SetParentComponent(xdsAuftrag);\r\n xdsAuftragMehrwertsteuersatz1.Name := 'xdsAuftragMehrwertsteuersatz1';\r\n xdsAuftragMehrwertsteuersatz1.FieldName := 'Mehrwertsteuersatz1';\r\n xdsAuftragMehrwertsteuersatz2.SetParentComponent(xdsAuftrag);\r\n xdsAuftragMehrwertsteuersatz2.Name := 'xdsAuftragMehrwertsteuersatz2';\r\n xdsAuftragMehrwertsteuersatz2.FieldName := 'Mehrwertsteuersatz2';\r\n xdsAuftragNettosumme01.SetParentComponent(xdsAuftrag);\r\n xdsAuftragNettosumme01.Name := 'xdsAuftragNettosumme01';\r\n xdsAuftragNettosumme01.FieldName := 'Nettosumme01';\r\n xdsAuftragNettosumme02.SetParentComponent(xdsAuftrag);\r\n xdsAuftragNettosumme02.Name := 'xdsAuftragNettosumme02';\r\n xdsAuftragNettosumme02.FieldName := 'Nettosumme02';\r\n xdsAuftragNettosumme.SetParentComponent(xdsAuftrag);\r\n xdsAuftragNettosumme.Name := 'xdsAuftragNettosumme';\r\n xdsAuftragNettosumme.FieldName := 'Nettosumme';\r\n xdsAuftragMehrwertsteuer01.SetParentComponent(xdsAuftrag);\r\n xdsAuftragMehrwertsteuer01.Name := 'xdsAuftragMehrwertsteuer01';\r\n xdsAuftragMehrwertsteuer01.FieldName := 'Mehrwertsteuer01';\r\n xdsAuftragMehrwertsteuer02.SetParentComponent(xdsAuftrag);\r\n xdsAuftragMehrwertsteuer02.Name := 'xdsAuftragMehrwertsteuer02';\r\n xdsAuftragMehrwertsteuer02.FieldName := 'Mehrwertsteuer02';\r\n xdsAuftragMehrwertsteuer.SetParentComponent(xdsAuftrag);\r\n xdsAuftragMehrwertsteuer.Name := 'xdsAuftragMehrwertsteuer';\r\n xdsAuftragMehrwertsteuer.FieldName := 'Mehrwertsteuer';\r\n xdsAuftragBruttosumme.SetParentComponent(xdsAuftrag);\r\n xdsAuftragBruttosumme.Name := 'xdsAuftragBruttosumme';\r\n xdsAuftragBruttosumme.FieldName := 'Bruttosumme';\r\n xdsAuftragVersanddatum.SetParentComponent(xdsAuftrag);\r\n xdsAuftragVersanddatum.Name := 'xdsAuftragVersanddatum';\r\n xdsAuftragVersanddatum.FieldName := 'Versanddatum';\r\n xdsAuftragSkontosatz.SetParentComponent(xdsAuftrag);\r\n xdsAuftragSkontosatz.Name := 'xdsAuftragSkontosatz';\r\n xdsAuftragSkontosatz.FieldName := 'Skontosatz';\r\n xdsAuftragNettosummeEK.SetParentComponent(xdsAuftrag);\r\n xdsAuftragNettosummeEK.Name := 'xdsAuftragNettosummeEK';\r\n xdsAuftragNettosummeEK.FieldName := 'NettosummeEK';\r\n xdsAuftragNettoMarge.SetParentComponent(xdsAuftrag);\r\n xdsAuftragNettoMarge.Name := 'xdsAuftragNettoMarge';\r\n xdsAuftragNettoMarge.FieldName := 'NettoMarge';\r\n xdsAuftragSchreibzeichen.SetParentComponent(xdsAuftrag);\r\n xdsAuftragSchreibzeichen.Name := 'xdsAuftragSchreibzeichen';\r\n xdsAuftragSchreibzeichen.FieldName := 'Schreibzeichen';\r\n xdsAuftragSchreibzeichen.Size := 10;\r\n xdsAuftragUnterzeichner.SetParentComponent(xdsAuftrag);\r\n xdsAuftragUnterzeichner.Name := 'xdsAuftragUnterzeichner';\r\n xdsAuftragUnterzeichner.FieldName := 'Unterzeichner';\r\n xdsAuftragUnterzeichner.Size := 50;\r\n xdsAuftragTelefonMA.SetParentComponent(xdsAuftrag);\r\n xdsAuftragTelefonMA.Name := 'xdsAuftragTelefonMA';\r\n xdsAuftragTelefonMA.FieldName := 'TelefonMA';\r\n xdsAuftragTelefonMA.Size := 30;\r\n xdsAuftragEmailMA.SetParentComponent(xdsAuftrag);\r\n xdsAuftragEmailMA.Name := 'xdsAuftragEmailMA';\r\n xdsAuftragEmailMA.FieldName := 'EmailMA';\r\n xdsAuftragEmailMA.Size := 50;\r\n xdsAuftragUSTID.SetParentComponent(xdsAuftrag);\r\n xdsAuftragUSTID.Name := 'xdsAuftragUSTID';\r\n xdsAuftragUSTID.FieldName := 'USTID';\r\n xdsAuftragUmsatzsteuerausweis.SetParentComponent(xdsAuftrag);\r\n xdsAuftragUmsatzsteuerausweis.Name := 'xdsAuftragUmsatzsteuerausweis';\r\n xdsAuftragUmsatzsteuerausweis.FieldName := 'Umsatzsteuerausweis';\r\n xdsAuftraggebucht.SetParentComponent(xdsAuftrag);\r\n xdsAuftraggebucht.Name := 'xdsAuftraggebucht';\r\n xdsAuftraggebucht.FieldName := 'gebucht';\r\n xdsAuftragLieferdatum.SetParentComponent(xdsAuftrag);\r\n xdsAuftragLieferdatum.Name := 'xdsAuftragLieferdatum';\r\n xdsAuftragLieferdatum.FieldName := 'Lieferdatum';\r\n xdsAuftragTransportbedingung.SetParentComponent(xdsAuftrag);\r\n xdsAuftragTransportbedingung.Name := 'xdsAuftragTransportbedingung';\r\n xdsAuftragTransportbedingung.FieldName := 'Transportbedingung';\r\n xdsAuftragTransportbedingung.Size := 100;\r\n xdsAuftragMehrwertsteuersatz3.SetParentComponent(xdsAuftrag);\r\n xdsAuftragMehrwertsteuersatz3.Name := 'xdsAuftragMehrwertsteuersatz3';\r\n xdsAuftragMehrwertsteuersatz3.FieldName := 'Mehrwertsteuersatz3';\r\n xdsAuftragMehrwertsteuer03.SetParentComponent(xdsAuftrag);\r\n xdsAuftragMehrwertsteuer03.Name := 'xdsAuftragMehrwertsteuer03';\r\n xdsAuftragMehrwertsteuer03.FieldName := 'Mehrwertsteuer03';\r\n xdsAuftragNettosumme03.SetParentComponent(xdsAuftrag);\r\n xdsAuftragNettosumme03.Name := 'xdsAuftragNettosumme03';\r\n xdsAuftragNettosumme03.FieldName := 'Nettosumme03';\r\n xdsAuftragRundungsDifferenz.SetParentComponent(xdsAuftrag);\r\n xdsAuftragRundungsDifferenz.Name := 'xdsAuftragRundungsDifferenz';\r\n xdsAuftragRundungsDifferenz.FieldName := 'RundungsDifferenz';\r\n xdsAuftragEmailText.SetParentComponent(xdsAuftrag);\r\n xdsAuftragEmailText.Name := 'xdsAuftragEmailText';\r\n xdsAuftragEmailText.FieldName := 'EmailText';\r\n xdsAuftragEmailText.Size := 255;\r\n xdsAuftragAuftragerledigt.SetParentComponent(xdsAuftrag);\r\n xdsAuftragAuftragerledigt.Name := 'xdsAuftragAuftragerledigt';\r\n xdsAuftragAuftragerledigt.FieldName := 'Auftragerledigt';\r\n xdsAuftragRabattstufe.SetParentComponent(xdsAuftrag);\r\n xdsAuftragRabattstufe.Name := 'xdsAuftragRabattstufe';\r\n xdsAuftragRabattstufe.FieldName := 'Rabattstufe';\r\n xdsAuftragRabattstufe.Size := 15;\r\n xdsAuftragKFZKennzeichen.SetParentComponent(xdsAuftrag);\r\n xdsAuftragKFZKennzeichen.Name := 'xdsAuftragKFZKennzeichen';\r\n xdsAuftragKFZKennzeichen.FieldName := 'KFZKennzeichen';\r\n xdsAuftragKFZKennzeichen.Size := 13;\r\n xdsAuftragFahrgestellnummer.SetParentComponent(xdsAuftrag);\r\n xdsAuftragFahrgestellnummer.Name := 'xdsAuftragFahrgestellnummer';\r\n xdsAuftragFahrgestellnummer.FieldName := 'Fahrgestellnummer';\r\n xdsAuftragKFZHersteller.SetParentComponent(xdsAuftrag);\r\n xdsAuftragKFZHersteller.Name := 'xdsAuftragKFZHersteller';\r\n xdsAuftragKFZHersteller.FieldName := 'KFZHersteller';\r\n xdsAuftragErstzulassungsdatum.SetParentComponent(xdsAuftrag);\r\n xdsAuftragErstzulassungsdatum.Name := 'xdsAuftragErstzulassungsdatum';\r\n xdsAuftragErstzulassungsdatum.FieldName := 'Erstzulassungsdatum';\r\n xdsAuftragKMStand.SetParentComponent(xdsAuftrag);\r\n xdsAuftragKMStand.Name := 'xdsAuftragKMStand';\r\n xdsAuftragKMStand.FieldName := 'KMStand';\r\n xdsAuftragKMStand.Size := 6;\r\n xdsAuftragKFZType.SetParentComponent(xdsAuftrag);\r\n xdsAuftragKFZType.Name := 'xdsAuftragKFZType';\r\n xdsAuftragKFZType.FieldName := 'KFZType';\r\n xdsAuftragKFZType.Size := 25;\r\n xdsAuftragInspektionsdatum.SetParentComponent(xdsAuftrag);\r\n xdsAuftragInspektionsdatum.Name := 'xdsAuftragInspektionsdatum';\r\n xdsAuftragInspektionsdatum.FieldName := 'Inspektionsdatum';\r\n xdsAuftragDebitorennummer.SetParentComponent(xdsAuftrag);\r\n xdsAuftragDebitorennummer.Name := 'xdsAuftragDebitorennummer';\r\n xdsAuftragDebitorennummer.FieldName := 'Debitorennummer';\r\n xdsAuftragDebitorennummer.Size := 13;\r\n xdsAuftragKostentraeger.SetParentComponent(xdsAuftrag);\r\n xdsAuftragKostentraeger.Name := 'xdsAuftragKostentraeger';\r\n xdsAuftragKostentraeger.FieldName := 'Kostentraeger';\r\n xdsAuftragKostentraeger.Size := 13;\r\n xdsAuftragRabattsatz.SetParentComponent(xdsAuftrag);\r\n xdsAuftragRabattsatz.Name := 'xdsAuftragRabattsatz';\r\n xdsAuftragRabattsatz.FieldName := 'Rabattsatz';\r\n xdsAuftragObjektReferenz.SetParentComponent(xdsAuftrag);\r\n xdsAuftragObjektReferenz.Name := 'xdsAuftragObjektReferenz';\r\n xdsAuftragObjektReferenz.FieldName := 'ObjektReferenz';\r\n xdsAuftragObjektReferenz.Size := 13;\r\n xdsAuftragBank.SetParentComponent(xdsAuftrag);\r\n xdsAuftragBank.Name := 'xdsAuftragBank';\r\n xdsAuftragBank.FieldName := 'Bank';\r\n xdsAuftragBank.Size := 50;\r\n xdsAuftragBankleitzahl.SetParentComponent(xdsAuftrag);\r\n xdsAuftragBankleitzahl.Name := 'xdsAuftragBankleitzahl';\r\n xdsAuftragBankleitzahl.FieldName := 'Bankleitzahl';\r\n xdsAuftragKontonummer.SetParentComponent(xdsAuftrag);\r\n xdsAuftragKontonummer.Name := 'xdsAuftragKontonummer';\r\n xdsAuftragKontonummer.FieldName := 'Kontonummer';\r\n xdsAuftragKontonummer.Size := 50;\r\n xdsAuftragKontoinhaber.SetParentComponent(xdsAuftrag);\r\n xdsAuftragKontoinhaber.Name := 'xdsAuftragKontoinhaber';\r\n xdsAuftragKontoinhaber.FieldName := 'Kontoinhaber';\r\n xdsAuftragKontoinhaber.Size := 50;\r\n xdsAuftragTelefaxnummer.SetParentComponent(xdsAuftrag);\r\n xdsAuftragTelefaxnummer.Name := 'xdsAuftragTelefaxnummer';\r\n xdsAuftragTelefaxnummer.FieldName := 'Telefaxnummer';\r\n xdsAuftragTelefaxnummer.Size := 25;\r\n xdsAuftragDatumNeu.SetParentComponent(xdsAuftrag);\r\n xdsAuftragDatumNeu.Name := 'xdsAuftragDatumNeu';\r\n xdsAuftragDatumNeu.FieldName := 'DatumNeu';\r\n xdsAuftragDatumgeaendert.SetParentComponent(xdsAuftrag);\r\n xdsAuftragDatumgeaendert.Name := 'xdsAuftragDatumgeaendert';\r\n xdsAuftragDatumgeaendert.FieldName := 'Datumgeaendert';\r\n xdsAuftragObjektnummer.SetParentComponent(xdsAuftrag);\r\n xdsAuftragObjektnummer.Name := 'xdsAuftragObjektnummer';\r\n xdsAuftragObjektnummer.FieldName := 'Objektnummer';\r\n xdsAuftragObjektnummer.Size := 25;\r\n xdsAuftragLiefertermin.SetParentComponent(xdsAuftrag);\r\n xdsAuftragLiefertermin.Name := 'xdsAuftragLiefertermin';\r\n xdsAuftragLiefertermin.FieldName := 'Liefertermin';\r\n xdsAuftragLiefertermin.Size := 50;\r\n xdsAuftragEmailversand.SetParentComponent(xdsAuftrag);\r\n xdsAuftragEmailversand.Name := 'xdsAuftragEmailversand';\r\n xdsAuftragEmailversand.FieldName := 'Emailversand';\r\n xdsAuftragTelefonnummer.SetParentComponent(xdsAuftrag);\r\n xdsAuftragTelefonnummer.Name := 'xdsAuftragTelefonnummer';\r\n xdsAuftragTelefonnummer.FieldName := 'Telefonnummer';\r\n xdsAuftragTelefonnummer.Size := 35;\r\n xdsAuftragMobilTelefon.SetParentComponent(xdsAuftrag);\r\n xdsAuftragMobilTelefon.Name := 'xdsAuftragMobilTelefon';\r\n xdsAuftragMobilTelefon.FieldName := 'MobilTelefon';\r\n xdsAuftragMobilTelefon.Size := 25;\r\n xdsAuftragAuftragFax.SetParentComponent(xdsAuftrag);\r\n xdsAuftragAuftragFax.Name := 'xdsAuftragAuftragFax';\r\n xdsAuftragAuftragFax.FieldName := 'AuftragFax';\r\n xdsAuftragREDatum.SetParentComponent(xdsAuftrag);\r\n xdsAuftragREDatum.Name := 'xdsAuftragREDatum';\r\n xdsAuftragREDatum.FieldName := 'REDatum';\r\n xdsAuftragBenutzerNeu.SetParentComponent(xdsAuftrag);\r\n xdsAuftragBenutzerNeu.Name := 'xdsAuftragBenutzerNeu';\r\n xdsAuftragBenutzerNeu.FieldName := 'BenutzerNeu';\r\n xdsAuftragBenutzerNeu.Size := 50;\r\n xdsAuftragBenutzerGeaendert.SetParentComponent(xdsAuftrag);\r\n xdsAuftragBenutzerGeaendert.Name := 'xdsAuftragBenutzerGeaendert';\r\n xdsAuftragBenutzerGeaendert.FieldName := 'BenutzerGeaendert';\r\n xdsAuftragBenutzerGeaendert.Size := 50;\r\n xdsAuftragBerechnungBrutto.SetParentComponent(xdsAuftrag);\r\n xdsAuftragBerechnungBrutto.Name := 'xdsAuftragBerechnungBrutto';\r\n xdsAuftragBerechnungBrutto.FieldName := 'BerechnungBrutto';\r\n xdsAuftragBruttosumme01.SetParentComponent(xdsAuftrag);\r\n xdsAuftragBruttosumme01.Name := 'xdsAuftragBruttosumme01';\r\n xdsAuftragBruttosumme01.FieldName := 'Bruttosumme01';\r\n xdsAuftragBruttosumme02.SetParentComponent(xdsAuftrag);\r\n xdsAuftragBruttosumme02.Name := 'xdsAuftragBruttosumme02';\r\n xdsAuftragBruttosumme02.FieldName := 'Bruttosumme02';\r\n xdsAuftragBruttosumme03.SetParentComponent(xdsAuftrag);\r\n xdsAuftragBruttosumme03.Name := 'xdsAuftragBruttosumme03';\r\n xdsAuftragBruttosumme03.FieldName := 'Bruttosumme03';\r\n xdsAuftragNotiz.SetParentComponent(xdsAuftrag);\r\n xdsAuftragNotiz.Name := 'xdsAuftragNotiz';\r\n xdsAuftragNotiz.FieldName := 'Notiz';\r\n xdsAuftragNotiz.Size := 255;\r\n xdsAuftragMargeProzent.SetParentComponent(xdsAuftrag);\r\n xdsAuftragMargeProzent.Name := 'xdsAuftragMargeProzent';\r\n xdsAuftragMargeProzent.FieldName := 'MargeProzent';\r\n xdsAuftragWarenkreditgesperrt.SetParentComponent(xdsAuftrag);\r\n xdsAuftragWarenkreditgesperrt.Name := 'xdsAuftragWarenkreditgesperrt';\r\n xdsAuftragWarenkreditgesperrt.FieldName := 'Warenkreditgesperrt';\r\n xdsAuftragBelegsprache.SetParentComponent(xdsAuftrag);\r\n xdsAuftragBelegsprache.Name := 'xdsAuftragBelegsprache';\r\n xdsAuftragBelegsprache.FieldName := 'Belegsprache';\r\n xdsAuftragBelegsprache.Size := 10;\r\n xdsAuftragDuplicate.SetParentComponent(xdsAuftrag);\r\n xdsAuftragDuplicate.Name := 'xdsAuftragDuplicate';\r\n xdsAuftragDuplicate.FieldName := 'Duplicate';\r\n xdsAuftragperEmail.SetParentComponent(xdsAuftrag);\r\n xdsAuftragperEmail.Name := 'xdsAuftragperEmail';\r\n xdsAuftragperEmail.FieldName := 'perEmail';\r\n xdsAuftragAnsprechpartner.SetParentComponent(xdsAuftrag);\r\n xdsAuftragAnsprechpartner.Name := 'xdsAuftragAnsprechpartner';\r\n xdsAuftragAnsprechpartner.FieldName := 'Ansprechpartner';\r\n xdsAuftragAnsprechpartner.Size := 105;\r\n xdsAuftragKundennummerFremd.SetParentComponent(xdsAuftrag);\r\n xdsAuftragKundennummerFremd.Name := 'xdsAuftragKundennummerFremd';\r\n xdsAuftragKundennummerFremd.FieldName := 'KundennummerFremd';\r\n xdsAuftragProtokoll.SetParentComponent(xdsAuftrag);\r\n xdsAuftragProtokoll.Name := 'xdsAuftragProtokoll';\r\n xdsAuftragProtokoll.FieldName := 'Protokoll';\r\n xdsAuftragProtokoll.Size := 255;\r\n xdsAuftragVerleihauftrag.SetParentComponent(xdsAuftrag);\r\n xdsAuftragVerleihauftrag.Name := 'xdsAuftragVerleihauftrag';\r\n xdsAuftragVerleihauftrag.FieldName := 'Verleihauftrag';\r\n xdsAuftragVerleihVon.SetParentComponent(xdsAuftrag);\r\n xdsAuftragVerleihVon.Name := 'xdsAuftragVerleihVon';\r\n xdsAuftragVerleihVon.FieldName := 'VerleihVon';\r\n xdsAuftragVerleihBis.SetParentComponent(xdsAuftrag);\r\n xdsAuftragVerleihBis.Name := 'xdsAuftragVerleihBis';\r\n xdsAuftragVerleihBis.FieldName := 'VerleihBis';\r\n xdsAuftragAuftragGenehmigt.SetParentComponent(xdsAuftrag);\r\n xdsAuftragAuftragGenehmigt.Name := 'xdsAuftragAuftragGenehmigt';\r\n xdsAuftragAuftragGenehmigt.FieldName := 'AuftragGenehmigt';\r\n xdsAuftraggesperrt.SetParentComponent(xdsAuftrag);\r\n xdsAuftraggesperrt.Name := 'xdsAuftraggesperrt';\r\n xdsAuftraggesperrt.FieldName := 'gesperrt';\r\n xdsAuftragVerleihvonText.SetParentComponent(xdsAuftrag);\r\n xdsAuftragVerleihvonText.Name := 'xdsAuftragVerleihvonText';\r\n xdsAuftragVerleihvonText.FieldName := 'VerleihvonText';\r\n xdsAuftragVerleihvonText.Size := 50;\r\n xdsAuftragVerleihbisText.SetParentComponent(xdsAuftrag);\r\n xdsAuftragVerleihbisText.Name := 'xdsAuftragVerleihbisText';\r\n xdsAuftragVerleihbisText.FieldName := 'VerleihbisText';\r\n xdsAuftragVerleihbisText.Size := 50;\r\n xdsAuftragDruckWHG.SetParentComponent(xdsAuftrag);\r\n xdsAuftragDruckWHG.Name := 'xdsAuftragDruckWHG';\r\n xdsAuftragDruckWHG.FieldName := 'DruckWHG';\r\n xdsAuftragDruckWHG.Size := 3;\r\n xdsAuftragDruckWHGKurs.SetParentComponent(xdsAuftrag);\r\n xdsAuftragDruckWHGKurs.Name := 'xdsAuftragDruckWHGKurs';\r\n xdsAuftragDruckWHGKurs.FieldName := 'DruckWHGKurs';\r\n xdsAuftragProzentsatzZusatzposition.SetParentComponent(xdsAuftrag);\r\n xdsAuftragProzentsatzZusatzposition.Name := 'xdsAuftragProzentsatzZusatzposition';\r\n xdsAuftragProzentsatzZusatzposition.FieldName := 'ProzentsatzZusatzposition';\r\n xdsAuftragTextZusatzposition.SetParentComponent(xdsAuftrag);\r\n xdsAuftragTextZusatzposition.Name := 'xdsAuftragTextZusatzposition';\r\n xdsAuftragTextZusatzposition.FieldName := 'TextZusatzposition';\r\n xdsAuftragTextZusatzposition.Size := 255;\r\n xdsAuftragTextzusatzBeschreibung.SetParentComponent(xdsAuftrag);\r\n xdsAuftragTextzusatzBeschreibung.Name := 'xdsAuftragTextzusatzBeschreibung';\r\n xdsAuftragTextzusatzBeschreibung.FieldName := 'TextzusatzBeschreibung';\r\n xdsAuftragTextzusatzBeschreibung.Size := 50;\r\n xdsAuftragLayoutname.SetParentComponent(xdsAuftrag);\r\n xdsAuftragLayoutname.Name := 'xdsAuftragLayoutname';\r\n xdsAuftragLayoutname.FieldName := 'Layoutname';\r\n xdsAuftragLayoutname.Size := 50;\r\n xdsAuftragGesamtgewicht.SetParentComponent(xdsAuftrag);\r\n xdsAuftragGesamtgewicht.Name := 'xdsAuftragGesamtgewicht';\r\n xdsAuftragGesamtgewicht.FieldName := 'Gesamtgewicht';\r\n xdsAuftragBetragZusatzposition.SetParentComponent(xdsAuftrag);\r\n xdsAuftragBetragZusatzposition.Name := 'xdsAuftragBetragZusatzposition';\r\n xdsAuftragBetragZusatzposition.FieldName := 'BetragZusatzposition';\r\n xdsAuftragReferenzBestellung.SetParentComponent(xdsAuftrag);\r\n xdsAuftragReferenzBestellung.Name := 'xdsAuftragReferenzBestellung';\r\n xdsAuftragReferenzBestellung.FieldName := 'ReferenzBestellung';\r\n xdsAuftragReferenzBestellung.Size := 10;\r\n xdsAuftragTermin1.SetParentComponent(xdsAuftrag);\r\n xdsAuftragTermin1.Name := 'xdsAuftragTermin1';\r\n xdsAuftragTermin1.FieldName := 'Termin1';\r\n xdsAuftragTermin2.SetParentComponent(xdsAuftrag);\r\n xdsAuftragTermin2.Name := 'xdsAuftragTermin2';\r\n xdsAuftragTermin2.FieldName := 'Termin2';\r\n xdsAuftragZielkontaktnummer.SetParentComponent(xdsAuftrag);\r\n xdsAuftragZielkontaktnummer.Name := 'xdsAuftragZielkontaktnummer';\r\n xdsAuftragZielkontaktnummer.FieldName := 'Zielkontaktnummer';\r\n xdsAuftragZielkontaktnummer.Size := 13;\r\n xdsAuftragZielkontaktname.SetParentComponent(xdsAuftrag);\r\n xdsAuftragZielkontaktname.Name := 'xdsAuftragZielkontaktname';\r\n xdsAuftragZielkontaktname.FieldName := 'Zielkontaktname';\r\n xdsAuftragZielkontaktname.Size := 40;\r\n xdsAuftragBilddatei1.SetParentComponent(xdsAuftrag);\r\n xdsAuftragBilddatei1.Name := 'xdsAuftragBilddatei1';\r\n xdsAuftragBilddatei1.FieldName := 'Bilddatei1';\r\n xdsAuftragBilddatei1.Size := 255;\r\n xdsAuftragBilddatei2.SetParentComponent(xdsAuftrag);\r\n xdsAuftragBilddatei2.Name := 'xdsAuftragBilddatei2';\r\n xdsAuftragBilddatei2.FieldName := 'Bilddatei2';\r\n xdsAuftragBilddatei2.Size := 255;\r\n xdsAuftragZielkontaktnummer2.SetParentComponent(xdsAuftrag);\r\n xdsAuftragZielkontaktnummer2.Name := 'xdsAuftragZielkontaktnummer2';\r\n xdsAuftragZielkontaktnummer2.FieldName := 'Zielkontaktnummer2';\r\n xdsAuftragZielkontaktnummer2.Size := 13;\r\n xdsAuftragZielkontaktname2.SetParentComponent(xdsAuftrag);\r\n xdsAuftragZielkontaktname2.Name := 'xdsAuftragZielkontaktname2';\r\n xdsAuftragZielkontaktname2.FieldName := 'Zielkontaktname2';\r\n xdsAuftragZielkontaktname2.Size := 40;\r\n xdsAuftragbestaetigt.SetParentComponent(xdsAuftrag);\r\n xdsAuftragbestaetigt.Name := 'xdsAuftragbestaetigt';\r\n xdsAuftragbestaetigt.FieldName := 'bestaetigt';\r\n xdsAuftragZielkontaktnummer3.SetParentComponent(xdsAuftrag);\r\n xdsAuftragZielkontaktnummer3.Name := 'xdsAuftragZielkontaktnummer3';\r\n xdsAuftragZielkontaktnummer3.FieldName := 'Zielkontaktnummer3';\r\n xdsAuftragZielkontaktnummer3.Size := 13;\r\n xdsAuftragZielkontaktname3.SetParentComponent(xdsAuftrag);\r\n xdsAuftragZielkontaktname3.Name := 'xdsAuftragZielkontaktname3';\r\n xdsAuftragZielkontaktname3.FieldName := 'Zielkontaktname3';\r\n xdsAuftragZielkontaktname3.Size := 40;\r\n xdsAuftragTermin3.SetParentComponent(xdsAuftrag);\r\n xdsAuftragTermin3.Name := 'xdsAuftragTermin3';\r\n xdsAuftragTermin3.FieldName := 'Termin3';\r\n xdsAuftragTermin4.SetParentComponent(xdsAuftrag);\r\n xdsAuftragTermin4.Name := 'xdsAuftragTermin4';\r\n xdsAuftragTermin4.FieldName := 'Termin4';\r\n xdsAuftragMuster.SetParentComponent(xdsAuftrag);\r\n xdsAuftragMuster.Name := 'xdsAuftragMuster';\r\n xdsAuftragMuster.FieldName := 'Muster';\r\n xdsAuftragKW.SetParentComponent(xdsAuftrag);\r\n xdsAuftragKW.Name := 'xdsAuftragKW';\r\n xdsAuftragKW.FieldName := 'KW';\r\n xdsAuftragDatenlink.SetParentComponent(xdsAuftrag);\r\n xdsAuftragDatenlink.Name := 'xdsAuftragDatenlink';\r\n xdsAuftragDatenlink.FieldName := 'Datenlink';\r\n xdsAuftragDatenlink.Size := 255;\r\n xdsAuftragMehrwertsteuersatz4.SetParentComponent(xdsAuftrag);\r\n xdsAuftragMehrwertsteuersatz4.Name := 'xdsAuftragMehrwertsteuersatz4';\r\n xdsAuftragMehrwertsteuersatz4.FieldName := 'Mehrwertsteuersatz4';\r\n xdsAuftragMehrwertsteuersatz5.SetParentComponent(xdsAuftrag);\r\n xdsAuftragMehrwertsteuersatz5.Name := 'xdsAuftragMehrwertsteuersatz5';\r\n xdsAuftragMehrwertsteuersatz5.FieldName := 'Mehrwertsteuersatz5';\r\n xdsAuftragMehrwertsteuersatz6.SetParentComponent(xdsAuftrag);\r\n xdsAuftragMehrwertsteuersatz6.Name := 'xdsAuftragMehrwertsteuersatz6';\r\n xdsAuftragMehrwertsteuersatz6.FieldName := 'Mehrwertsteuersatz6';\r\n xdsAuftragBesteuerungKey.SetParentComponent(xdsAuftrag);\r\n xdsAuftragBesteuerungKey.Name := 'xdsAuftragBesteuerungKey';\r\n xdsAuftragBesteuerungKey.FieldName := 'BesteuerungKey';\r\n xdsAuftragVertreterMatchcode.SetParentComponent(xdsAuftrag);\r\n xdsAuftragVertreterMatchcode.Name := 'xdsAuftragVertreterMatchcode';\r\n xdsAuftragVertreterMatchcode.FieldName := 'VertreterMatchcode';\r\n xdsAuftragVertreterMatchcode.Size := 50;\r\n xdsAuftragVerfasser.SetParentComponent(xdsAuftrag);\r\n xdsAuftragVerfasser.Name := 'xdsAuftragVerfasser';\r\n xdsAuftragVerfasser.FieldName := 'Verfasser';\r\n xdsAuftragVerfasser.Size := 10;\r\n xdsAuftragLieferadresseID.SetParentComponent(xdsAuftrag);\r\n xdsAuftragLieferadresseID.Name := 'xdsAuftragLieferadresseID';\r\n xdsAuftragLieferadresseID.FieldName := 'LieferadresseID';\r\n xdsAuftragAuftragStatus.SetParentComponent(xdsAuftrag);\r\n xdsAuftragAuftragStatus.Name := 'xdsAuftragAuftragStatus';\r\n xdsAuftragAuftragStatus.FieldName := 'AuftragStatus';\r\n xdsAuftragAuftragStatus.Size := 30;\r\n xdsAuftragMonatJahr.SetParentComponent(xdsAuftrag);\r\n xdsAuftragMonatJahr.Name := 'xdsAuftragMonatJahr';\r\n xdsAuftragMonatJahr.FieldName := 'MonatJahr';\r\n xdsAuftragBelegvariante.SetParentComponent(xdsAuftrag);\r\n xdsAuftragBelegvariante.Name := 'xdsAuftragBelegvariante';\r\n xdsAuftragBelegvariante.FieldName := 'Belegvariante';\r\n xdsAuftragBelegvariante.Size := 25;\r\n xdsAuftragProduktionsfreigabe.SetParentComponent(xdsAuftrag);\r\n xdsAuftragProduktionsfreigabe.Name := 'xdsAuftragProduktionsfreigabe';\r\n xdsAuftragProduktionsfreigabe.FieldName := 'Produktionsfreigabe';\r\n xdsAuftragReferenzRahmenAuftrag.SetParentComponent(xdsAuftrag);\r\n xdsAuftragReferenzRahmenAuftrag.Name := 'xdsAuftragReferenzRahmenAuftrag';\r\n xdsAuftragReferenzRahmenAuftrag.FieldName := 'ReferenzRahmenAuftrag';\r\n xdsAuftragReferenzRahmenAuftrag.Size := 10;\r\n xdsAuftragDatumRahmenAuftrag.SetParentComponent(xdsAuftrag);\r\n xdsAuftragDatumRahmenAuftrag.Name := 'xdsAuftragDatumRahmenAuftrag';\r\n xdsAuftragDatumRahmenAuftrag.FieldName := 'DatumRahmenAuftrag';\r\n xdsAuftragFahrzeugID.SetParentComponent(xdsAuftrag);\r\n xdsAuftragFahrzeugID.Name := 'xdsAuftragFahrzeugID';\r\n xdsAuftragFahrzeugID.FieldName := 'FahrzeugID';\r\n xdsAuftragAuslieferungKW.SetParentComponent(xdsAuftrag);\r\n xdsAuftragAuslieferungKW.Name := 'xdsAuftragAuslieferungKW';\r\n xdsAuftragAuslieferungKW.FieldName := 'AuslieferungKW';\r\n xdsAuftragAuslieferungKW.Size := 25;\r\n xdsAuftragBereitstellungDatum.SetParentComponent(xdsAuftrag);\r\n xdsAuftragBereitstellungDatum.Name := 'xdsAuftragBereitstellungDatum';\r\n xdsAuftragBereitstellungDatum.FieldName := 'BereitstellungDatum';\r\n xdsAuftragVTUID.SetParentComponent(xdsAuftrag);\r\n xdsAuftragVTUID.Name := 'xdsAuftragVTUID';\r\n xdsAuftragVTUID.FieldName := 'VTUID';\r\n xdsAuftragVTUID.Size := 38;\r\n xdsAuftragLieferanschriftDaten.SetParentComponent(xdsAuftrag);\r\n xdsAuftragLieferanschriftDaten.Name := 'xdsAuftragLieferanschriftDaten';\r\n xdsAuftragLieferanschriftDaten.FieldName := 'LieferanschriftDaten';\r\n xdsAuftragLieferanschriftDaten.Size := 255;\r\n xdsAuftragGesamtVolumen.SetParentComponent(xdsAuftrag);\r\n xdsAuftragGesamtVolumen.Name := 'xdsAuftragGesamtVolumen';\r\n xdsAuftragGesamtVolumen.FieldName := 'GesamtVolumen';\r\n xdsAuftragBelegPKey.SetParentComponent(xdsAuftrag);\r\n xdsAuftragBelegPKey.Name := 'xdsAuftragBelegPKey';\r\n xdsAuftragBelegPKey.FieldName := 'BelegPKey';\r\n xdsAuftragDruckParameter.SetParentComponent(xdsAuftrag);\r\n xdsAuftragDruckParameter.Name := 'xdsAuftragDruckParameter';\r\n xdsAuftragDruckParameter.FieldName := 'DruckParameter';\r\n xdsAuftragDruckParameter.Size := 255;\r\n xdsAuftragReferenzService.SetParentComponent(xdsAuftrag);\r\n xdsAuftragReferenzService.Name := 'xdsAuftragReferenzService';\r\n xdsAuftragReferenzService.FieldName := 'ReferenzService';\r\n xdsAuftragReferenzService.Size := 10;\r\n xdsAuftragZusatzDaten.SetParentComponent(xdsAuftrag);\r\n xdsAuftragZusatzDaten.Name := 'xdsAuftragZusatzDaten';\r\n xdsAuftragZusatzDaten.FieldName := 'ZusatzDaten';\r\n xdsAuftragZusatzDaten.Size := 255;\r\n xdsAuftragStandPDF.SetParentComponent(xdsAuftrag);\r\n xdsAuftragStandPDF.Name := 'xdsAuftragStandPDF';\r\n xdsAuftragStandPDF.FieldName := 'StandPDF';\r\n xdsAuftragStandPDF.Size := 255;\r\n xdsAuftragPaketdienst.SetParentComponent(xdsAuftrag);\r\n xdsAuftragPaketdienst.Name := 'xdsAuftragPaketdienst';\r\n xdsAuftragPaketdienst.FieldName := 'Paketdienst';\r\n xdsAuftragPaketdienst.Size := 30;\r\n xdsAuftragMonteur.SetParentComponent(xdsAuftrag);\r\n xdsAuftragMonteur.Name := 'xdsAuftragMonteur';\r\n xdsAuftragMonteur.FieldName := 'Monteur';\r\n xdsAuftragKundennummerKundennummer.SetParentComponent(xdsAuftrag);\r\n xdsAuftragKundennummerKundennummer.Name := 'xdsAuftragKundennummerKundennummer';\r\n xdsAuftragKundennummerKundennummer.FieldName := 'Kundennummer.Kundennummer';\r\n xdsAuftragKundennummerKundennummer.Size := 13;\r\n WClient.SetParentComponent(Self);\r\n WClient.Name := 'WClient';\r\n WClient.Connection := DM2.XDataWebConnection1;\r\n WClient.Left := 40;\r\n WClient.Top := 176;\r\n finally\r\n ResultLabel.AfterLoadDFMValues;\r\n Container1.AfterLoadDFMValues;\r\n Container2.AfterLoadDFMValues;\r\n Container3.AfterLoadDFMValues;\r\n btnNeuerServiceBericht.AfterLoadDFMValues;\r\n btnNeuerAuftrag.AfterLoadDFMValues;\r\n btnzurueck.AfterLoadDFMValues;\r\n edtSuchbegriff.AfterLoadDFMValues;\r\n xdsAuftrag.AfterLoadDFMValues;\r\n xdsAuftragKundennummer.AfterLoadDFMValues;\r\n xdsAuftragNummerkomplett.AfterLoadDFMValues;\r\n xdsAuftragReferenzAngebot.AfterLoadDFMValues;\r\n xdsAuftragReferenzLieferschein.AfterLoadDFMValues;\r\n xdsAuftragReferenzRechnung.AfterLoadDFMValues;\r\n xdsAuftragDatum.AfterLoadDFMValues;\r\n xdsAuftragJahr.AfterLoadDFMValues;\r\n xdsAuftragKalenderwoche.AfterLoadDFMValues;\r\n xdsAuftragNachname.AfterLoadDFMValues;\r\n xdsAuftragVorname.AfterLoadDFMValues;\r\n xdsAuftragPostleitzahl.AfterLoadDFMValues;\r\n xdsAuftragOrt.AfterLoadDFMValues;\r\n xdsAuftragLaenderkuerzel.AfterLoadDFMValues;\r\n xdsAuftragLand.AfterLoadDFMValues;\r\n xdsAuftragBriefanrede1.AfterLoadDFMValues;\r\n xdsAuftragBriefanrede2.AfterLoadDFMValues;\r\n xdsAuftragEMail.AfterLoadDFMValues;\r\n xdsAuftragAdresseBild.AfterLoadDFMValues;\r\n xdsAuftragLieferanschriftBild.AfterLoadDFMValues;\r\n xdsAuftragZahlungsbedingung.AfterLoadDFMValues;\r\n xdsAuftragZahlungsbedingungText.AfterLoadDFMValues;\r\n xdsAuftragAuftragsbezeichnung.AfterLoadDFMValues;\r\n xdsAuftragAuftragnummerKunde.AfterLoadDFMValues;\r\n xdsAuftragBestelldatumKunde.AfterLoadDFMValues;\r\n xdsAuftragILN.AfterLoadDFMValues;\r\n xdsAuftragKopftext.AfterLoadDFMValues;\r\n xdsAuftragSchlussbemerkung.AfterLoadDFMValues;\r\n xdsAuftragGruss.AfterLoadDFMValues;\r\n xdsAuftragMehrwertsteuersatz1.AfterLoadDFMValues;\r\n xdsAuftragMehrwertsteuersatz2.AfterLoadDFMValues;\r\n xdsAuftragNettosumme01.AfterLoadDFMValues;\r\n xdsAuftragNettosumme02.AfterLoadDFMValues;\r\n xdsAuftragNettosumme.AfterLoadDFMValues;\r\n xdsAuftragMehrwertsteuer01.AfterLoadDFMValues;\r\n xdsAuftragMehrwertsteuer02.AfterLoadDFMValues;\r\n xdsAuftragMehrwertsteuer.AfterLoadDFMValues;\r\n xdsAuftragBruttosumme.AfterLoadDFMValues;\r\n xdsAuftragVersanddatum.AfterLoadDFMValues;\r\n xdsAuftragSkontosatz.AfterLoadDFMValues;\r\n xdsAuftragNettosummeEK.AfterLoadDFMValues;\r\n xdsAuftragNettoMarge.AfterLoadDFMValues;\r\n xdsAuftragSchreibzeichen.AfterLoadDFMValues;\r\n xdsAuftragUnterzeichner.AfterLoadDFMValues;\r\n xdsAuftragTelefonMA.AfterLoadDFMValues;\r\n xdsAuftragEmailMA.AfterLoadDFMValues;\r\n xdsAuftragUSTID.AfterLoadDFMValues;\r\n xdsAuftragUmsatzsteuerausweis.AfterLoadDFMValues;\r\n xdsAuftraggebucht.AfterLoadDFMValues;\r\n xdsAuftragLieferdatum.AfterLoadDFMValues;\r\n xdsAuftragTransportbedingung.AfterLoadDFMValues;\r\n xdsAuftragMehrwertsteuersatz3.AfterLoadDFMValues;\r\n xdsAuftragMehrwertsteuer03.AfterLoadDFMValues;\r\n xdsAuftragNettosumme03.AfterLoadDFMValues;\r\n xdsAuftragRundungsDifferenz.AfterLoadDFMValues;\r\n xdsAuftragEmailText.AfterLoadDFMValues;\r\n xdsAuftragAuftragerledigt.AfterLoadDFMValues;\r\n xdsAuftragRabattstufe.AfterLoadDFMValues;\r\n xdsAuftragKFZKennzeichen.AfterLoadDFMValues;\r\n xdsAuftragFahrgestellnummer.AfterLoadDFMValues;\r\n xdsAuftragKFZHersteller.AfterLoadDFMValues;\r\n xdsAuftragErstzulassungsdatum.AfterLoadDFMValues;\r\n xdsAuftragKMStand.AfterLoadDFMValues;\r\n xdsAuftragKFZType.AfterLoadDFMValues;\r\n xdsAuftragInspektionsdatum.AfterLoadDFMValues;\r\n xdsAuftragDebitorennummer.AfterLoadDFMValues;\r\n xdsAuftragKostentraeger.AfterLoadDFMValues;\r\n xdsAuftragRabattsatz.AfterLoadDFMValues;\r\n xdsAuftragObjektReferenz.AfterLoadDFMValues;\r\n xdsAuftragBank.AfterLoadDFMValues;\r\n xdsAuftragBankleitzahl.AfterLoadDFMValues;\r\n xdsAuftragKontonummer.AfterLoadDFMValues;\r\n xdsAuftragKontoinhaber.AfterLoadDFMValues;\r\n xdsAuftragTelefaxnummer.AfterLoadDFMValues;\r\n xdsAuftragDatumNeu.AfterLoadDFMValues;\r\n xdsAuftragDatumgeaendert.AfterLoadDFMValues;\r\n xdsAuftragObjektnummer.AfterLoadDFMValues;\r\n xdsAuftragLiefertermin.AfterLoadDFMValues;\r\n xdsAuftragEmailversand.AfterLoadDFMValues;\r\n xdsAuftragTelefonnummer.AfterLoadDFMValues;\r\n xdsAuftragMobilTelefon.AfterLoadDFMValues;\r\n xdsAuftragAuftragFax.AfterLoadDFMValues;\r\n xdsAuftragREDatum.AfterLoadDFMValues;\r\n xdsAuftragBenutzerNeu.AfterLoadDFMValues;\r\n xdsAuftragBenutzerGeaendert.AfterLoadDFMValues;\r\n xdsAuftragBerechnungBrutto.AfterLoadDFMValues;\r\n xdsAuftragBruttosumme01.AfterLoadDFMValues;\r\n xdsAuftragBruttosumme02.AfterLoadDFMValues;\r\n xdsAuftragBruttosumme03.AfterLoadDFMValues;\r\n xdsAuftragNotiz.AfterLoadDFMValues;\r\n xdsAuftragMargeProzent.AfterLoadDFMValues;\r\n xdsAuftragWarenkreditgesperrt.AfterLoadDFMValues;\r\n xdsAuftragBelegsprache.AfterLoadDFMValues;\r\n xdsAuftragDuplicate.AfterLoadDFMValues;\r\n xdsAuftragperEmail.AfterLoadDFMValues;\r\n xdsAuftragAnsprechpartner.AfterLoadDFMValues;\r\n xdsAuftragKundennummerFremd.AfterLoadDFMValues;\r\n xdsAuftragProtokoll.AfterLoadDFMValues;\r\n xdsAuftragVerleihauftrag.AfterLoadDFMValues;\r\n xdsAuftragVerleihVon.AfterLoadDFMValues;\r\n xdsAuftragVerleihBis.AfterLoadDFMValues;\r\n xdsAuftragAuftragGenehmigt.AfterLoadDFMValues;\r\n xdsAuftraggesperrt.AfterLoadDFMValues;\r\n xdsAuftragVerleihvonText.AfterLoadDFMValues;\r\n xdsAuftragVerleihbisText.AfterLoadDFMValues;\r\n xdsAuftragDruckWHG.AfterLoadDFMValues;\r\n xdsAuftragDruckWHGKurs.AfterLoadDFMValues;\r\n xdsAuftragProzentsatzZusatzposition.AfterLoadDFMValues;\r\n xdsAuftragTextZusatzposition.AfterLoadDFMValues;\r\n xdsAuftragTextzusatzBeschreibung.AfterLoadDFMValues;\r\n xdsAuftragLayoutname.AfterLoadDFMValues;\r\n xdsAuftragGesamtgewicht.AfterLoadDFMValues;\r\n xdsAuftragBetragZusatzposition.AfterLoadDFMValues;\r\n xdsAuftragReferenzBestellung.AfterLoadDFMValues;\r\n xdsAuftragTermin1.AfterLoadDFMValues;\r\n xdsAuftragTermin2.AfterLoadDFMValues;\r\n xdsAuftragZielkontaktnummer.AfterLoadDFMValues;\r\n xdsAuftragZielkontaktname.AfterLoadDFMValues;\r\n xdsAuftragBilddatei1.AfterLoadDFMValues;\r\n xdsAuftragBilddatei2.AfterLoadDFMValues;\r\n xdsAuftragZielkontaktnummer2.AfterLoadDFMValues;\r\n xdsAuftragZielkontaktname2.AfterLoadDFMValues;\r\n xdsAuftragbestaetigt.AfterLoadDFMValues;\r\n xdsAuftragZielkontaktnummer3.AfterLoadDFMValues;\r\n xdsAuftragZielkontaktname3.AfterLoadDFMValues;\r\n xdsAuftragTermin3.AfterLoadDFMValues;\r\n xdsAuftragTermin4.AfterLoadDFMValues;\r\n xdsAuftragMuster.AfterLoadDFMValues;\r\n xdsAuftragKW.AfterLoadDFMValues;\r\n xdsAuftragDatenlink.AfterLoadDFMValues;\r\n xdsAuftragMehrwertsteuersatz4.AfterLoadDFMValues;\r\n xdsAuftragMehrwertsteuersatz5.AfterLoadDFMValues;\r\n xdsAuftragMehrwertsteuersatz6.AfterLoadDFMValues;\r\n xdsAuftragBesteuerungKey.AfterLoadDFMValues;\r\n xdsAuftragVertreterMatchcode.AfterLoadDFMValues;\r\n xdsAuftragVerfasser.AfterLoadDFMValues;\r\n xdsAuftragLieferadresseID.AfterLoadDFMValues;\r\n xdsAuftragAuftragStatus.AfterLoadDFMValues;\r\n xdsAuftragMonatJahr.AfterLoadDFMValues;\r\n xdsAuftragBelegvariante.AfterLoadDFMValues;\r\n xdsAuftragProduktionsfreigabe.AfterLoadDFMValues;\r\n xdsAuftragReferenzRahmenAuftrag.AfterLoadDFMValues;\r\n xdsAuftragDatumRahmenAuftrag.AfterLoadDFMValues;\r\n xdsAuftragFahrzeugID.AfterLoadDFMValues;\r\n xdsAuftragAuslieferungKW.AfterLoadDFMValues;\r\n xdsAuftragBereitstellungDatum.AfterLoadDFMValues;\r\n xdsAuftragVTUID.AfterLoadDFMValues;\r\n xdsAuftragLieferanschriftDaten.AfterLoadDFMValues;\r\n xdsAuftragGesamtVolumen.AfterLoadDFMValues;\r\n xdsAuftragBelegPKey.AfterLoadDFMValues;\r\n xdsAuftragDruckParameter.AfterLoadDFMValues;\r\n xdsAuftragReferenzService.AfterLoadDFMValues;\r\n xdsAuftragZusatzDaten.AfterLoadDFMValues;\r\n xdsAuftragStandPDF.AfterLoadDFMValues;\r\n xdsAuftragPaketdienst.AfterLoadDFMValues;\r\n xdsAuftragMonteur.AfterLoadDFMValues;\r\n xdsAuftragKundennummerKundennummer.AfterLoadDFMValues;\r\n WClient.AfterLoadDFMValues;\r\n end;\r\nend;\r\n\r\nend.","unit Unit_AngebotPosEinzel;\r\n\r\ninterface\r\n\r\nuses\r\n System.SysUtils, System.Classes, JS, Web, WEBLib.Graphics, WEBLib.Controls,\r\n WEBLib.Forms, WEBLib.Dialogs, DB, XData.Web.JsonDataset, XData.Web.Dataset,\r\n Vcl.StdCtrls, WEBLib.StdCtrls, WEBLib.Grids, Vcl.Controls, WEBLib.ExtCtrls, dateutils, strutils,\r\n WEBLib.DBCtrls;\r\n\r\ntype\r\n TAngebotPosEinzel = class(TForm)\r\n Container1: THTMLContainer;\r\n Container2: THTMLContainer;\r\n WTCPosition: TTableControl;\r\n btnPosAbbrechen: TButton;\r\n btnPosSpeichern: TButton;\r\n btnPositionLoeschen: TButton;\r\n xdsPosition: TXDataWebDataSet;\r\n sourcePosition: TDataSource;\r\n dsArtikel: TXDataWebDataSet;\r\n dsArtikelHersteller: TXDataWebEntityField;\r\n dsArtikelArtderMenge: TXDataWebEntityField;\r\n dsArtikelPfandArt: TXDataWebEntityField;\r\n dsArtikelWarengruppe: TXDataWebEntityField;\r\n dsArtikelWarenuntergruppe: TXDataWebEntityField;\r\n dsArtikelArtikelnummer: TStringField;\r\n dsArtikelArtikelueberschrift: TStringField;\r\n dsArtikelArtikelbeschreibung: TStringField;\r\n dsArtikelVerkaufspreis: TFloatField;\r\n dsArtikelMindestbestand: TFloatField;\r\n dsArtikelPreisliste: TStringField;\r\n dsArtikelGewicht: TFloatField;\r\n dsArtikelLaenge: TFloatField;\r\n dsArtikelBreite: TFloatField;\r\n dsArtikelHoehe: TFloatField;\r\n dsArtikelArtikelZusatz: TStringField;\r\n dsArtikelLagerort: TStringField;\r\n dsArtikelBuchungskonto: TIntegerField;\r\n dsArtikelEingangMenge: TFloatField;\r\n dsArtikelEingangEndpreis: TFloatField;\r\n dsArtikelAusgangMenge: TFloatField;\r\n dsArtikelAusgangEndpreisEK: TFloatField;\r\n dsArtikelAusgangEndpreisVK: TFloatField;\r\n dsArtikelBestand: TFloatField;\r\n dsArtikelBestandswert: TFloatField;\r\n dsArtikelMarge: TFloatField;\r\n dsArtikelMargeProzent: TFloatField;\r\n dsArtikelArtikelnummer2: TStringField;\r\n dsArtikelArtikelmatchcode: TStringField;\r\n dsArtikelRabattpreis1: TFloatField;\r\n dsArtikelRabattpreis2: TFloatField;\r\n dsArtikelRabattpreis3: TFloatField;\r\n dsArtikelRabattpreis4: TFloatField;\r\n dsArtikelRabattpreis5: TFloatField;\r\n dsArtikelArtikelnichtmehrgueltig: TBooleanField;\r\n dsArtikelEinkaufspreis: TFloatField;\r\n dsArtikelAufschlag: TFloatField;\r\n dsArtikelWarenbestand: TBooleanField;\r\n dsArtikelTextfrei10: TStringField;\r\n dsArtikelTextfrei20: TStringField;\r\n dsArtikelArtikelbeschreibungRTF: TStringField;\r\n dsArtikelArtikeldatei1: TStringField;\r\n dsArtikelArtikeldatei2: TStringField;\r\n dsArtikelArtikeldatei3: TStringField;\r\n dsArtikelArtikeldatei4: TStringField;\r\n dsArtikelArtikeldatei5: TStringField;\r\n dsArtikelEinkaufspreisVom: TDateTimeField;\r\n dsArtikelEAN: TStringField;\r\n dsArtikelVGPFaktor: TFloatField;\r\n dsArtikelVGPMengenart: TStringField;\r\n dsArtikelVerleihpreis: TFloatField;\r\n dsArtikelZusatzPreis: TFloatField;\r\n dsArtikelVerpackungsart: TStringField;\r\n dsArtikelVerpackungsMenge: TFloatField;\r\n dsArtikelQuellartikel: TStringField;\r\n dsArtikelrabattierfaehig: TBooleanField;\r\n dsArtikelAngebotAlternativeAN: TStringField;\r\n dsArtikelPreisanteilNetto: TFloatField;\r\n dsArtikelFarbe: TIntegerField;\r\n dsArtikelAEinkauf: TBooleanField;\r\n dsArtikelAVerkauf: TBooleanField;\r\n dsArtikelArtikelnummerLieferant: TStringField;\r\n dsArtikelLieferantnummer: TStringField;\r\n dsArtikelVerkaufspreisBrutto: TFloatField;\r\n dsArtikelArtikelSet: TBooleanField;\r\n dsArtikelProvisionssatz: TFloatField;\r\n dsArtikelWarentarifnummer: TStringField;\r\n dsArtikelHandelsartikel: TBooleanField;\r\n dsArtikelUrsprungsland: TStringField;\r\n dsArtikelKategorie: TStringField;\r\n dsArtikelStandardRabattsatzEK: TFloatField;\r\n dsArtikelStandardRabattsatzVK: TFloatField;\r\n dsArtikelRabattpreiseManuell: TBooleanField;\r\n dsArtikelMengeBestellt: TFloatField;\r\n dsArtikelMengeBeauftragt: TFloatField;\r\n dsArtikelBestandDisponiert: TFloatField;\r\n dsArtikelMengeAngeboten: TFloatField;\r\n dsArtikelBestandDispInclAngebot: TFloatField;\r\n dsArtikelMWStKey: TIntegerField;\r\n dsArtikelShopAmazon: TBooleanField;\r\n dsArtikelShopQuelle: TBooleanField;\r\n dsArtikelGeraet: TBooleanField;\r\n dsArtikelArtgewicht: TFloatField;\r\n dsArtikelVolumen: TFloatField;\r\n dsArtikelPacklisteNichtAnzeigen: TBooleanField;\r\n dsArtikelKeineAufschlagskalkulation: TBooleanField;\r\n dsArtikelKorrekturMenge: TFloatField;\r\n dsArtikelKorrekturWert: TFloatField;\r\n dsArtikelNachfolgeartikel: TStringField;\r\n dsArtikelMindestbestellmenge: TFloatField;\r\n dsArtikelSchnittEK: TFloatField;\r\n dsArtikelVerkaufspreisVom: TDateTimeField;\r\n dsArtikelPruefungChargeSNR: TIntegerField;\r\n dsArtikelArtikelbeschreibungHTML: TStringField;\r\n dsArtikelProduktKurzbeschreibungHTML: TStringField;\r\n dsArtikelStatusFuerShop: TStringField;\r\n dsArtikelAmpelFuerShop: TStringField;\r\n dsArtikelEXP_Anzahl: TFloatField;\r\n dsArtikelEXP_Inhalt: TFloatField;\r\n dsArtikelEXP_Faktor: TFloatField;\r\n dsArtikelFach: TStringField;\r\n dsArtikelExportKasse: TIntegerField;\r\n dsArtikelWKNR: TIntegerField;\r\n dsArtikelArtikelAttribute: TStringField;\r\n dsArtikelErstelltAm: TDateTimeField;\r\n dsArtikelVarianteVonAN: TStringField;\r\n dsArtikelGurtmassWerte: TStringField;\r\n dsArtikelGurtmass: TFloatField;\r\n dsArtikelAltersgrenze: TIntegerField;\r\n dsArtikelMWStKeyImHaus: TIntegerField;\r\n dsArtikelKasseBewegung: TFloatField;\r\n dsArtikelKasseBewegungEK: TFloatField;\r\n dsArtikelKasseBewegungVK: TFloatField;\r\n dsArtikelProduktionBewegung: TFloatField;\r\n dsArtikelProduktionBewegungEK: TFloatField;\r\n dsArtikelProduktionBewegungVK: TFloatField;\r\n dsArtikelWaWiAB: TIntegerField;\r\n dsArtikelGeaendertAm: TDateTimeField;\r\n dsArtikelGefahrgutKennzeichen: TStringField;\r\n dsArtikelVerpackG: TBooleanField;\r\n dsArtikelUPE: TFloatField;\r\n dsArtikelArtikelbeschreibungEinkauf: TStringField;\r\n dsArtikelHerstellerArtikelnummer: TStringField;\r\n dsArtikelNatura: TStringField;\r\n dsArtikelArbeitszeit: TBooleanField;\r\n dsArtikelArtderMengeArtderMenge: TStringField;\r\n xdsKundenpreise: TXDataWebDataSet;\r\n xdsKundenpreiseArtikelnummer: TXDataWebEntityField;\r\n xdsKundenpreiseKundennummer: TXDataWebEntityField;\r\n xdsKundenpreiseVerkaufspreis: TFloatField;\r\n xdsKundenpreiseNachname: TStringField;\r\n xdsKundenpreiseRabattsatz: TFloatField;\r\n xdsKundenpreiseVerleihpreis: TFloatField;\r\n xdsKundenpreiseZusatzPreis: TFloatField;\r\n xdsKundenpreiseArtikelnummerKunde: TStringField;\r\n xdsKundenpreiseDatumGeaendert: TDateTimeField;\r\n xdsKundenpreiseArtikelueberschrift: TStringField;\r\n xdsKundenpreiseArtikelnummerArtikelnummer: TStringField;\r\n xdsKundenpreiseArtikelnummerArtikelueberschrift: TStringField;\r\n xdsKundenpreiseArtikelnummerArtikelbeschreibung: TStringField;\r\n dsBeleg2: TXDataWebDataSet;\r\n dsBeleg2Kundennummer: TXDataWebEntityField;\r\n dsBeleg2Nummerkomplett: TStringField;\r\n dsBeleg2ReferenzAngebot: TStringField;\r\n dsBeleg2ReferenzLieferschein: TStringField;\r\n dsBeleg2ReferenzRechnung: TStringField;\r\n dsBeleg2Datum: TDateTimeField;\r\n dsBeleg2Jahr: TFloatField;\r\n dsBeleg2Kalenderwoche: TIntegerField;\r\n dsBeleg2Nachname: TStringField;\r\n dsBeleg2Vorname: TStringField;\r\n dsBeleg2Postleitzahl: TStringField;\r\n dsBeleg2Ort: TStringField;\r\n dsBeleg2Laenderkuerzel: TStringField;\r\n dsBeleg2Land: TStringField;\r\n dsBeleg2Briefanrede1: TStringField;\r\n dsBeleg2Briefanrede2: TStringField;\r\n dsBeleg2EMail: TStringField;\r\n dsBeleg2AdresseBild: TStringField;\r\n dsBeleg2LieferanschriftBild: TStringField;\r\n dsBeleg2Zahlungsbedingung: TIntegerField;\r\n dsBeleg2ZahlungsbedingungText: TStringField;\r\n dsBeleg2Auftragsbezeichnung: TStringField;\r\n dsBeleg2AuftragnummerKunde: TStringField;\r\n dsBeleg2BestelldatumKunde: TDateTimeField;\r\n dsBeleg2ILN: TStringField;\r\n dsBeleg2Kopftext: TStringField;\r\n dsBeleg2Schlussbemerkung: TStringField;\r\n dsBeleg2Gruss: TStringField;\r\n dsBeleg2Mehrwertsteuersatz1: TFloatField;\r\n dsBeleg2Mehrwertsteuersatz2: TFloatField;\r\n dsBeleg2Nettosumme01: TFloatField;\r\n dsBeleg2Nettosumme02: TFloatField;\r\n dsBeleg2Nettosumme: TFloatField;\r\n dsBeleg2Mehrwertsteuer01: TFloatField;\r\n dsBeleg2Mehrwertsteuer02: TFloatField;\r\n dsBeleg2Mehrwertsteuer: TFloatField;\r\n dsBeleg2Bruttosumme: TFloatField;\r\n dsBeleg2Versanddatum: TDateTimeField;\r\n dsBeleg2Skontosatz: TFloatField;\r\n dsBeleg2NettosummeEK: TFloatField;\r\n dsBeleg2NettoMarge: TFloatField;\r\n dsBeleg2Schreibzeichen: TStringField;\r\n dsBeleg2Unterzeichner: TStringField;\r\n dsBeleg2TelefonMA: TStringField;\r\n dsBeleg2EmailMA: TStringField;\r\n dsBeleg2USTID: TStringField;\r\n dsBeleg2Umsatzsteuerausweis: TBooleanField;\r\n dsBeleg2gebucht: TBooleanField;\r\n dsBeleg2Lieferdatum: TDateTimeField;\r\n dsBeleg2Transportbedingung: TStringField;\r\n dsBeleg2Mehrwertsteuersatz3: TFloatField;\r\n dsBeleg2Mehrwertsteuer03: TFloatField;\r\n dsBeleg2Nettosumme03: TFloatField;\r\n dsBeleg2RundungsDifferenz: TFloatField;\r\n dsBeleg2EmailText: TStringField;\r\n dsBeleg2Auftragerledigt: TBooleanField;\r\n dsBeleg2Rabattstufe: TStringField;\r\n dsBeleg2KFZKennzeichen: TStringField;\r\n dsBeleg2Fahrgestellnummer: TStringField;\r\n dsBeleg2KFZHersteller: TStringField;\r\n dsBeleg2Erstzulassungsdatum: TDateTimeField;\r\n dsBeleg2KMStand: TStringField;\r\n dsBeleg2KFZType: TStringField;\r\n dsBeleg2Inspektionsdatum: TDateTimeField;\r\n dsBeleg2Debitorennummer: TStringField;\r\n dsBeleg2Kostentraeger: TStringField;\r\n dsBeleg2Rabattsatz: TFloatField;\r\n dsBeleg2ObjektReferenz: TStringField;\r\n dsBeleg2Bank: TStringField;\r\n dsBeleg2Bankleitzahl: TFloatField;\r\n dsBeleg2Kontonummer: TStringField;\r\n dsBeleg2Kontoinhaber: TStringField;\r\n dsBeleg2Telefaxnummer: TStringField;\r\n dsBeleg2DatumNeu: TDateTimeField;\r\n dsBeleg2Datumgeaendert: TDateTimeField;\r\n dsBeleg2Objektnummer: TStringField;\r\n dsBeleg2Liefertermin: TStringField;\r\n dsBeleg2Emailversand: TBooleanField;\r\n dsBeleg2Telefonnummer: TStringField;\r\n dsBeleg2MobilTelefon: TStringField;\r\n dsBeleg2AuftragFax: TBooleanField;\r\n dsBeleg2REDatum: TDateTimeField;\r\n dsBeleg2BenutzerNeu: TStringField;\r\n dsBeleg2BenutzerGeaendert: TStringField;\r\n dsBeleg2BerechnungBrutto: TBooleanField;\r\n dsBeleg2Bruttosumme01: TFloatField;\r\n dsBeleg2Bruttosumme02: TFloatField;\r\n dsBeleg2Bruttosumme03: TFloatField;\r\n dsBeleg2Notiz: TStringField;\r\n dsBeleg2MargeProzent: TFloatField;\r\n dsBeleg2Warenkreditgesperrt: TBooleanField;\r\n dsBeleg2Belegsprache: TStringField;\r\n dsBeleg2Duplicate: TStringField;\r\n dsBeleg2perEmail: TBooleanField;\r\n dsBeleg2Ansprechpartner: TStringField;\r\n dsBeleg2KundennummerFremd: TStringField;\r\n dsBeleg2Protokoll: TStringField;\r\n dsBeleg2Verleihauftrag: TBooleanField;\r\n dsBeleg2VerleihVon: TDateTimeField;\r\n dsBeleg2VerleihBis: TDateTimeField;\r\n dsBeleg2AuftragGenehmigt: TBooleanField;\r\n dsBeleg2gesperrt: TBooleanField;\r\n dsBeleg2VerleihvonText: TStringField;\r\n dsBeleg2VerleihbisText: TStringField;\r\n dsBeleg2DruckWHG: TStringField;\r\n dsBeleg2DruckWHGKurs: TFloatField;\r\n dsBeleg2ProzentsatzZusatzposition: TFloatField;\r\n dsBeleg2TextZusatzposition: TStringField;\r\n dsBeleg2TextzusatzBeschreibung: TStringField;\r\n dsBeleg2Layoutname: TStringField;\r\n dsBeleg2Gesamtgewicht: TFloatField;\r\n dsBeleg2BetragZusatzposition: TFloatField;\r\n dsBeleg2ReferenzBestellung: TStringField;\r\n dsBeleg2Termin1: TDateTimeField;\r\n dsBeleg2Termin2: TDateTimeField;\r\n dsBeleg2Zielkontaktnummer: TStringField;\r\n dsBeleg2Zielkontaktname: TStringField;\r\n dsBeleg2Bilddatei1: TStringField;\r\n dsBeleg2Bilddatei2: TStringField;\r\n dsBeleg2Zielkontaktnummer2: TStringField;\r\n dsBeleg2Zielkontaktname2: TStringField;\r\n dsBeleg2bestaetigt: TDateTimeField;\r\n dsBeleg2Zielkontaktnummer3: TStringField;\r\n dsBeleg2Zielkontaktname3: TStringField;\r\n dsBeleg2Termin3: TDateTimeField;\r\n dsBeleg2Termin4: TDateTimeField;\r\n dsBeleg2Muster: TBooleanField;\r\n dsBeleg2KW: TIntegerField;\r\n dsBeleg2Datenlink: TStringField;\r\n dsBeleg2Mehrwertsteuersatz4: TFloatField;\r\n dsBeleg2Mehrwertsteuersatz5: TFloatField;\r\n dsBeleg2Mehrwertsteuersatz6: TFloatField;\r\n dsBeleg2BesteuerungKey: TIntegerField;\r\n dsBeleg2VertreterMatchcode: TStringField;\r\n dsBeleg2Verfasser: TStringField;\r\n dsBeleg2LieferadresseID: TIntegerField;\r\n dsBeleg2AuftragStatus: TStringField;\r\n dsBeleg2MonatJahr: TDateTimeField;\r\n dsBeleg2Belegvariante: TStringField;\r\n dsBeleg2Produktionsfreigabe: TBooleanField;\r\n dsBeleg2ReferenzRahmenAuftrag: TStringField;\r\n dsBeleg2DatumRahmenAuftrag: TDateTimeField;\r\n dsBeleg2FahrzeugID: TIntegerField;\r\n dsBeleg2AuslieferungKW: TStringField;\r\n dsBeleg2BereitstellungDatum: TDateTimeField;\r\n dsBeleg2VTUID: TStringField;\r\n dsBeleg2LieferanschriftDaten: TStringField;\r\n dsBeleg2GesamtVolumen: TFloatField;\r\n dsBeleg2BelegPKey: TIntegerField;\r\n dsBeleg2DruckParameter: TStringField;\r\n dsBeleg2ReferenzService: TStringField;\r\n dsBeleg2ZusatzDaten: TStringField;\r\n dsBeleg2StandPDF: TStringField;\r\n dsBeleg2Paketdienst: TStringField;\r\n dsBeleg2Monteur: TIntegerField;\r\n dsBeleg2KundennummerKundennummer: TStringField;\r\n dsBeleg2ServiceBemerkung: TStringField;\r\n edtPosNr: TDBEdit;\r\n edtPosUNr: TDBEdit;\r\n edtArtikelueberschrift: TDBEdit;\r\n edtMenge: TDBEdit;\r\n btnArtikelnummer: TButton;\r\n edtArtikelbeschreibung: TDBMemo;\r\n edtMengenart: TDBLookupComboBox;\r\n btnNeuePosition: TButton;\r\n xdsPositionNummerkomplett: TXDataWebEntityField;\r\n xdsPositionArtikelnummer: TXDataWebEntityField;\r\n xdsPositionID: TIntegerField;\r\n xdsPositionPosNr: TFloatField;\r\n xdsPositionPosUNr: TFloatField;\r\n xdsPositionSumme: TBooleanField;\r\n xdsPositionArtikelueberschrift: TStringField;\r\n xdsPositionArtikelbeschreibung: TStringField;\r\n xdsPositionMenge: TFloatField;\r\n xdsPositionArtderMenge: TStringField;\r\n xdsPositionVerkaufspreis: TFloatField;\r\n xdsPositionEinkaufspreis: TFloatField;\r\n xdsPositionSeriennummer: TStringField;\r\n xdsPositionWarengruppe: TStringField;\r\n xdsPositionWarenuntergruppe: TStringField;\r\n xdsPositionArtikelnummerKunde: TStringField;\r\n xdsPositionLieferant: TStringField;\r\n xdsPositionGewicht: TFloatField;\r\n xdsPositionLaenge: TFloatField;\r\n xdsPositionBreite: TFloatField;\r\n xdsPositionHoehe: TFloatField;\r\n xdsPositionMehrwertsteuersatz: TFloatField;\r\n xdsPositionEndpreis: TFloatField;\r\n xdsPositionPosMWST: TFloatField;\r\n xdsPositionBruttoEndpreis: TFloatField;\r\n xdsPositionEndpreis_EK: TFloatField;\r\n xdsPositionRabattsatz: TFloatField;\r\n xdsPositionPreisvorRabatt: TFloatField;\r\n xdsPositionPKZ: TFloatField;\r\n xdsPositionTextfrei10: TStringField;\r\n xdsPositionTextfrei20: TStringField;\r\n xdsPositionAlternativ: TBooleanField;\r\n xdsPositionEinzelpreisBrutto: TFloatField;\r\n xdsPositionPosMarge: TFloatField;\r\n xdsPositionPosMargeProzent: TFloatField;\r\n xdsPositionWarenbestand: TBooleanField;\r\n xdsPositionArtikelbeschreibungRTF: TStringField;\r\n xdsPositionQuellartikel: TStringField;\r\n xdsPositionArtikelnummerWB: TStringField;\r\n xdsPositionPreisanteilNetto: TFloatField;\r\n xdsPositionSetHPos: TStringField;\r\n xdsPositionSetUPos: TStringField;\r\n xdsPositionProvisionssatz: TFloatField;\r\n xdsPositionProvisionsbetrag: TFloatField;\r\n xdsPositionReferenzKalkulation: TStringField;\r\n xdsPositionArtikelsprache: TStringField;\r\n xdsPositionEKvom: TDateTimeField;\r\n xdsPositionMengenberechnungID: TStringField;\r\n xdsPositionTaraID: TStringField;\r\n xdsPositionTara: TFloatField;\r\n xdsPositionBruttoGewicht: TFloatField;\r\n xdsPositionAussenflaeche: TFloatField;\r\n xdsPositionSeitenumbruch: TBooleanField;\r\n xdsPositionMWStKey: TIntegerField;\r\n xdsPositionZSnachPos: TBooleanField;\r\n xdsPositionPreisVorRabattWHG: TFloatField;\r\n xdsPositionPKey: TIntegerField;\r\n xdsPositionLager: TStringField;\r\n xdsPositionlwbID: TStringField;\r\n xdsPositionBelegdatum: TDateTimeField;\r\n xdsPositionVolumen: TFloatField;\r\n xdsPositionPosVolumen: TFloatField;\r\n xdsPositionArtikelAttribute: TStringField;\r\n procedure WebFormShow(Sender: TObject);\r\n procedure btnPosAbbrechenClick(Sender: TObject);\r\n procedure xdsPositionAfterOpen(DataSet: TDataSet);\r\n procedure xdsPositionAfterDelete(DataSet: TDataSet);\r\n procedure xdsPositionAfterPost(DataSet: TDataSet);\r\n procedure xdsPositionBeforePost(DataSet: TDataSet);\r\n procedure xdsPositionNewRecord(DataSet: TDataSet);\r\n procedure xdsPositionAfterApplyUpdates(Sender: TDataSet;\r\n Info: TResolveResults);\r\n procedure btnPositionLoeschenClick(Sender: TObject);\r\n procedure btnPosSpeichernClick(Sender: TObject);\r\n procedure xdsKundenpreiseAfterOpen(DataSet: TDataSet);\r\n procedure dsArtikelAfterOpen(DataSet: TDataSet);\r\n procedure dsBeleg2AfterOpen(DataSet: TDataSet);\r\n procedure sourcePositionStateChange(Sender: TObject);\r\n procedure btnArtikelnummerClick(Sender: TObject);\r\n procedure btnNeuePositionClick(Sender: TObject);\r\n procedure WebFormClose(Sender: TObject; var Action: TCloseAction);\r\n private\r\n { Private-Deklarationen }\r\n public\r\n { Public-Deklarationen }\r\n PositionsID:string;\r\n tmpArtikelnummer:string;\r\n tmpKundennummer:string;\r\n tmpMerkerAngebot:string;\r\n tmpLetztePosNr:double;\r\n NeuePosition:boolean;\r\n AltePosition:boolean;\r\n protected procedure LoadDFMValues; override; end;\r\n\r\nvar\r\n AngebotPosEinzel: TAngebotPosEinzel;\r\n\r\nimplementation\r\n uses unit1, unit2, unit_EinzelAuftrag, unit_Artikelsuche;\r\n{$R *.dfm}\r\n\r\n\r\nprocedure TAngebotPosEinzel.sourcePositionStateChange(Sender: TObject);\r\nbegin\r\n if xdsPosition.State in dseditmodes then btnPosspeichern.Enabled:=true else btnPosspeichern.Enabled:=false;\r\nend;\r\n\r\nprocedure TAngebotPosEinzel.btnArtikelnummerClick(Sender: TObject);\r\nvar\r\n LFrm:TfrmArtikelsuche;\r\n procedure AfterCreate(AForm:TObject);\r\n var\r\n LForm:TfrmArtikelsuche;\r\n begin\r\n LForm:=(AForm as TfrmArtikelsuche);\r\n end;\r\n\r\n procedure AfterShowmodal(Avalue:TModalResult);\r\n begin\r\n if LFrm.Artikelnummer<>'' then\r\n begin\r\n tmpArtikelnummer:=lfrm.Artikelnummer;\r\n if tmpArtikelnummer<>'' then\r\n begin\r\n dsArtikel.Close;\r\n dsArtikel.QueryString:='$filter=Artikelnummer eq '+QuotedStr(tmpArtikelnummer)+'&$expand=ArtderMenge,Hersteller';\r\n dsArtikel.Load;\r\n end\r\n else\r\n begin\r\n if NeuePosition then btnPosAbbrechenClick(nil);\r\n\r\n end;\r\n end;\r\n end;\r\n\r\n begin\r\n AltePosition:=true;\r\n LFrm:=TfrmArtikelsuche.CreateNew(@AfterCreate);\r\n LFrm.ShowModal(@AfterShowmodal);\r\n\r\nend;\r\n\r\nprocedure TAngebotPosEinzel.btnNeuePositionClick(Sender: TObject);\r\nvar\r\n LFrm:TfrmArtikelsuche;\r\n procedure AfterCreate(AForm:TObject);\r\n var\r\n LForm:TfrmArtikelsuche;\r\n begin\r\n LForm:=(AForm as TfrmArtikelsuche);\r\n end;\r\n\r\n procedure AfterShowmodal(Avalue:TModalResult);\r\n begin\r\n if LFrm.Artikelnummer<>'' then\r\n begin\r\n tmpArtikelnummer:=lfrm.Artikelnummer;\r\n if tmpArtikelnummer<>'' then\r\n begin\r\n dsArtikel.Close;\r\n dsArtikel.QueryString:='$filter=Artikelnummer eq '+QuotedStr(tmpArtikelnummer)+'&$expand=ArtderMenge,Hersteller';\r\n dsArtikel.Load;\r\n end\r\n else\r\n begin\r\n if NeuePosition then btnPosAbbrechenClick(nil);\r\n\r\n end;\r\n end;\r\n end;\r\n\r\n begin\r\n AltePosition:=false;\r\n LFrm:=TfrmArtikelsuche.CreateNew(@AfterCreate);\r\n LFrm.ShowModal(@AfterShowmodal);\r\n\r\nend;\r\n\r\nprocedure TAngebotPosEinzel.btnPosAbbrechenClick(Sender: TObject);\r\nbegin\r\n dsartikel.Close;\r\n xdsposition.close;\r\n self.Close;\r\nend;\r\n\r\nprocedure TAngebotPosEinzel.btnPositionLoeschenClick(Sender: TObject);\r\nbegin\r\n xdsposition.Delete;\r\nend;\r\n\r\nprocedure TAngebotPosEinzel.btnPosSpeichernClick(Sender: TObject);\r\nbegin\r\n if xdsPosition.State=dsbrowse then xdsposition.Edit;\r\n if xdsPosition.State in dseditmodes then\r\n begin\r\n xdsPosition.Post;\r\n end\r\n else\r\n begin\r\n\r\n xdsPosition.Close;\r\n\r\n end;\r\nend;\r\n\r\nprocedure TAngebotPosEinzel.dsArtikelAfterOpen(DataSet: TDataSet);\r\nbegin\r\n xdsKundenpreise.Close;\r\n xdskundenpreise.QueryString:='$expand=Artikelnummer&$filter=Kundennummer eq '+QuotedStr(tmpKundennummer)+ ' AND Artikelnummer eq '+QuotedStr(dsArtikelArtikelnummer.asstring);\r\n xdsKundenpreise.Load;\r\nend;\r\n\r\nprocedure TAngebotPosEinzel.dsBeleg2AfterOpen(DataSet: TDataSet);\r\nbegin\r\n\r\n if NeuePosition then btnNeuePositionClick(nil);\r\n\r\n if tmpArtikelnummer<>'' then\r\n begin\r\n dsArtikel.Close;\r\n dsArtikel.QueryString:='$filter=Artikelnummer eq '+QuotedStr(tmpArtikelnummer)+'&$expand=ArtderMenge,Hersteller';\r\n dsArtikel.Load;\r\n end;\r\nend;\r\n\r\nprocedure TAngebotPosEinzel.WebFormClose(Sender: TObject;\r\n var Action: TCloseAction);\r\nbegin\r\n Action:=TCloseAction.caFree;\r\nend;\r\n\r\nprocedure TAngebotPosEinzel.WebFormShow(Sender: TObject);\r\n var\r\n myelement:TJSHTMLElement;\r\nbegin\r\n Container1.html.text:='';\r\n myelement:=container2.ElementHandle;\r\n btnPosAbbrechen.ParentElement:=myelement;\r\n btnPosSpeichern.ParentElement:=myelement;\r\n btnPositionLoeschen.ParentElement:=myelement;\r\n WTCPosition.ColCount:=2;\r\n WTCPosition.RowCount:=9;\r\n WTCPosition.Cells[0,0]:='Beleg';\r\n\r\n WTCPosition.Cells[0,1]:='Pos-Nr';\r\n myelement:=WTCPosition.CellElements[1,1];\r\n edtPosNr.ParentElement:=myelement;\r\n\r\n WTCPosition.Cells[0,2]:='Pos.UNr';\r\n myelement:=WTCPosition.CellElements[1,2];\r\n edtPosUNr.ParentElement:=myelement;\r\n\r\n myelement:=WTCPosition.CellElements[0,3];\r\n btnArtikelnummer.ParentElement:=myelement;\r\n\r\n WTCPosition.Cells[0,4]:='Artikelüberschrift';\r\n myelement:=WTCPosition.CellElements[1,4];\r\n edtArtikelueberschrift.ParentElement:=myelement;\r\n\r\n WTCPosition.Cells[0,5]:='Artikelbeschreibung';\r\n\r\n WTCPosition.Cells[0,6]:='Menge';\r\n myelement:=WTCPosition.CellElements[1,6];\r\n edtMenge.ParentElement:=myelement;\r\n\r\n WTCPosition.Cells[0,7]:='Mengenart';\r\n\r\n\r\n dsBeleg2.Close;\r\n dsBeleg2.QueryString:='$expand=Kundennummer&$filter=Nummerkomplett eq '+QuotedStr(tmpMerkerAngebot);\r\n dsBeleg2.Load;\r\nend;\r\n\r\nprocedure TAngebotPosEinzel.xdsKundenpreiseAfterOpen(DataSet: TDataSet);\r\nbegin\r\n xdsPosition.Close;\r\n if PositionsID<>'' then xdsPosition.QueryString:='$filter=ID eq '+QuotedStr(PositionsID);\r\n if PositionsID='' then xdsPosition.QueryString:='';\r\n xdsPosition.Load;\r\nend;\r\n\r\nprocedure TAngebotPosEinzel.xdsPositionAfterApplyUpdates(Sender: TDataSet;\r\n Info: TResolveResults);\r\nbegin\r\n if info.Records[0].Error<>'' then showmessage(info.Records[0].Error);\r\n xdsposition.Close;\r\n self.Close;\r\nend;\r\n\r\nprocedure TAngebotPosEinzel.xdsPositionAfterDelete(DataSet: TDataSet);\r\nbegin\r\n if LizenzOK then\r\n begin\r\n xdsposition.ApplyUpdates;\r\n end\r\n else\r\n begin\r\n showmessage('Für das Speichern von Daten sind Sie noch nicht freigeschaltet, bitte erwerben Sie eine Lizenz');\r\n end;\r\nend;\r\n\r\nprocedure TAngebotPosEinzel.xdsPositionAfterOpen(DataSet: TDataSet);\r\n var\r\n myelement:TJSHTMLElement;\r\nbegin\r\n myelement:=WTCPosition.CellElements[1,5];\r\n edtArtikelbeschreibung.ParentElement:=myelement;\r\n\r\n myelement:=WTCPosition.CellElements[1,7];\r\n edtMengenart.ParentElement:=myelement;\r\n\r\n\r\n\r\n\r\n\r\n\r\n WTCPosition.Cells[1,0]:=dsBeleg2Nummerkomplett.asstring+' | '+xdsPositionID.asstring;\r\n\r\n WTCPosition.Cells[1,3]:=tmpArtikelnummer;\r\n WTCPosition.Cells[1,7]:=xdsPositionArtderMenge.AsString;\r\n\r\n if neueposition=true then xdsposition.append;\r\n if AltePosition=true then\r\n begin\r\n xdsPosition.Edit;\r\n xdsPositionArtikelnummer.value:=dsArtikel.CurrentData;\r\n xdsPositionMenge.AsInteger:=1;\r\n xdsPositionArtderMenge.asstring:=dsArtikelArtderMengeArtderMenge.AsString;\r\n xdsPositionVerkaufspreis.AsFloat:=dsArtikelVerkaufspreis.asfloat;\r\n if dsBeleg2rabattsatz.asfloat=0 then xdsPositionRabattsatz.asfloat:=dsArtikelstandardRabattsatzVK.asfloat;\r\n if dsBeleg2rabattstufe.asstring='Rabattpreis1' then xdsPositionverkaufspreis.asstring:=dsArtikelRabattpreis1.asstring;\r\n if dsBeleg2rabattstufe.asstring='Rabattpreis2' then xdsPositionverkaufspreis.asstring:=dsArtikelRabattpreis2.asstring;\r\n if dsBeleg2rabattstufe.asstring='Rabattpreis3' then xdsPositionverkaufspreis.asstring:=dsArtikelRabattpreis3.asstring;\r\n if dsBeleg2rabattstufe.asstring='Rabattpreis4' then xdsPositionverkaufspreis.asstring:=dsArtikelRabattpreis4.asstring;\r\n if dsBeleg2rabattstufe.asstring='Rabattpreis5' then xdsPositionverkaufspreis.asstring:=dsArtikelRabattpreis5.asstring;\r\n xdsPositionPreisvorRabatt.asfloat:=xdsPositionVerkaufspreis.AsFloat;\r\n xdsPositionPreisanteilNetto.asfloat:=dsArtikelpreisanteilnetto.asfloat;\r\n xdsPositionEinkaufspreis.asfloat:=dsArtikelEinkaufspreis.asfloat;\r\n xdsPositionRabattsatz.AsFloat:=dsBeleg2Rabattsatz.asfloat;\r\n if xdsKundenpreise.RecordCount>0 then\r\n begin\r\n xdsPositionPreisvorrabatt.asfloat:=xdsKundenpreiseVerkaufspreis.asfloat;\r\n if xdsKundenpreiseRabattsatz.AsFloat<>0 then xdsPositionRabattsatz.AsFloat:=xdsKundenpreiseRabattsatz.AsFloat;\r\n end;\r\n xdsPositionPKZ.asfloat:=0;\r\n if dsBeleg2verleihauftrag.AsBoolean=true then xdsPositionpkz.asfloat:=2;\r\n xdsPositionposmwst.asfloat:=0;\r\n xdsPositionMWStKey.asinteger:=1;\r\n xdsPositionEndpreis.asfloat:=0;\r\n xdsPositionEndpreis_EK.asfloat:=0;\r\n xdsPositionBruttoEndpreis.asfloat:=0;\r\n xdsPositionEinzelpreisBrutto.asfloat:=0;\r\n xdsPositionlager.asstring:='[-]';\r\n xdsPositionwarenbestand.asboolean:=dsArtikelWarenbestand.asboolean;\r\n xdsPositionPosMargeProzent.asfloat:=0;\r\n xdsPositionPosMarge.asfloat:=0;\r\n xdsPositionPreisanteilnetto.asfloat:=0;\r\n xdsPositionprovisionssatz.asfloat:=0;\r\n xdsPositionprovisionsbetrag.asfloat:=0;\r\n xdsPositionaussenflaeche.asfloat:=0;\r\n xdsPositionBruttogewicht.asfloat:=0;\r\n xdsPositionTara.asfloat:=0;\r\n xdsPositionSeitenumbruch.asboolean:=FALSE;\r\n xdsPositionZSnachPos.asboolean:=False;\r\n xdsPositionPreisanteilnetto.asfloat:=0;\r\n xdsPositionPreisVorRabattWHG.asfloat:=0;\r\n xdsPositionpkey.asinteger:=0;\r\n xdsPositionVolumen.AsFloat:=0;\r\n xdsPositionPosVolumen.AsFloat:=0;\r\n xdsPositionArtikelueberschrift.asstring:=dsArtikelArtikelueberschrift.asstring;\r\n xdsPositionArtikelbeschreibung.asstring:=dsArtikelArtikelbeschreibung.asstring;\r\n xdsPositionArtikelbeschreibungRTF.value:=dsArtikelArtikelbeschreibungRTF.value;\r\n xdsPositionArtikelsprache.value:='';\r\n xdsPositiongewicht.asstring:=dsArtikelGewicht.AsString;\r\n xdsPositionLaenge.asstring:=dsArtikelLaenge.AsString;\r\n xdsPositionBreite.asstring:=dsArtikelBreite.AsString;\r\n xdsPositionHoehe.asstring:=dsArtikelHoehe.AsString;\r\n xdsPositionMWStKey.asInteger:=dsArtikelMWStKey.asInteger;\r\n xdsPositionWarenbestand.asboolean:=dsArtikelWarenbestand.asboolean;\r\n xdsPositionLieferant.asstring:=dsArtikellieferantnummer.asstring;\r\n xdsPositionEinkaufspreis.AsString:=dsArtikeleinkaufspreis.asstring;\r\n xdsPositionEKvom.asstring:=dsArtikeleinkaufspreisvom.asstring;\r\n xdsPositionLager.asstring:=dsArtikelLagerort.asstring;\r\n xdsPositionVolumen.AsFloat:=dsArtikelVolumen.AsFloat;\r\n xdsPositionArtikelAttribute.AsString:=dsArtikelArtikelAttribute.AsString;\r\n xdsPositionTextfrei10.asstring:=dsArtikeltextfrei10.asstring;\r\n xdsPositionTextfrei20.asstring:=dsArtikeltextfrei20.asstring;\r\n\r\n // Preis nach PKZ holen\r\n if xdsPositionpkz.asfloat=2 then xdsPositionpreisvorrabatt.asfloat:=dsArtikelverleihpreis.asfloat;\r\n if xdsPositionpkz.asfloat=3 then xdsPositionpreisvorrabatt.asfloat:=dsArtikelZusatzpreis.asfloat;\r\n if xdsPositionpkz.asfloat=4 then xdsPositionpreisvorrabatt.asfloat:=dsArtikelverleihpreis.asfloat + dsArtikelZusatzpreis.asfloat;\r\n\r\n end;\r\n\r\n\r\n\r\nend;\r\n\r\nprocedure TAngebotPosEinzel.xdsPositionAfterPost(DataSet: TDataSet);\r\nbegin\r\n if LizenzOK then\r\n begin\r\n\r\n xdsPosition.ApplyUpdates;\r\n end\r\n else\r\n begin\r\n showmessage('Für das Speichern von Daten sind Sie noch nicht freigeschaltet, bitte erwerben Sie eine Lizenz');\r\n end;\r\nend;\r\n\r\nprocedure TAngebotPosEinzel.xdsPositionBeforePost(DataSet: TDataSet);\r\nbegin\r\n\r\n xdsPositionBelegdatum.AsDateTime:=dsBeleg2Datum.AsDateTime;\r\n if xdsPositionMWStKey.asinteger=1 then xdsPositionMehrwertsteuersatz.AsFloat:=dsBeleg2Mehrwertsteuersatz1.asfloat;\r\n if xdsPositionMWStKey.asinteger=2 then xdsPositionMehrwertsteuersatz.AsFloat:=dsBeleg2Mehrwertsteuersatz2.asfloat;\r\n if xdsPositionMWStKey.asinteger=3 then xdsPositionMehrwertsteuersatz.AsFloat:=dsBeleg2Mehrwertsteuersatz3.asfloat;\r\n if xdsPositionMWStKey.asinteger=4 then xdsPositionMehrwertsteuersatz.AsFloat:=dsBeleg2Mehrwertsteuersatz4.asfloat;\r\n if xdsPositionMWStKey.asinteger=5 then xdsPositionMehrwertsteuersatz.AsFloat:=dsBeleg2Mehrwertsteuersatz5.asfloat;\r\n if xdsPositionMWStKey.asinteger=6 then xdsPositionMehrwertsteuersatz.AsFloat:=dsBeleg2Mehrwertsteuersatz6.asfloat;\r\n if dsBeleg2Umsatzsteuerausweis.asboolean=false then xdsPositionMehrwertsteuersatz.AsFloat:=0;\r\n\r\n // Artikelnummer für den Warenbestand setzen\r\n if xdsPositionquellartikel.asstring='' then\r\n begin\r\n xdsPositionartikelnummerwb.asstring:=xdsPositionartikelnummer.asstring;\r\n end\r\n else\r\n begin\r\n xdsPositionartikelnummerwb.asstring:=xdsPositionquellartikel.asstring;\r\n end;\r\n\r\n if xdsPositionpreisvorrabatt.asstring='' then xdsPositionpreisvorrabatt.asfloat:=0;\r\n if xdsPositionpkz.asfloat=3 then xdsPositionrabattsatz.asfloat:=0;\r\n if xdsPositioneinkaufspreis.asstring='' then xdsPositioneinkaufspreis.asstring:='0';\r\n\r\n // Prüfung auf Textpositionen\r\n if leftstr(xdsPositionArtikelnummer.asstring,4)='Text' then xdsPositionpreisvorrabatt.asfloat:=0;\r\n\r\n {\r\n // Pruefung wegen Staffelpreis\r\n if dm2.tablesysdatStaffelpreise.asboolean then\r\n begin\r\n tempstp:=GF.checkstaffelpreis(EinzelAuftrag.dsBelegKundennummer.asstring,xdsPositionArtikelnummer.asstring,EinzelAuftrag.dsBelegDatum.asdatetime,xdsPositionMenge.asfloat,xdsPositionPreisVorRabatt.asfloat);\r\n if tempstp<>0 then\r\n begin\r\n messagetext:=MSGStaffelpreisuebernehmen+' '+formatfloat(fstr,tempstp);\r\n if MessageDlg(MSGStaffelpreisuebernehmen, mtConfirmation, [mbYes, mbNo], 0) = mrYes then\r\n begin\r\n xdsPositionpreisvorrabatt.asfloat:=tempstp;\r\n xdsPositionEinkaufspreis.asfloat:=tempeinkaufspreis;\r\n end;\r\n end;\r\n end;\r\n }\r\n // Pruefung wegen Rabattfaehig\r\n if xdsPositionrabattsatz.AsFloat<>0 then\r\n begin\r\n if (dm2.checkrabattierung(xdsPositionArtikelnummer.asstring)=false) then xdsPositionrabattsatz.asfloat:=0;\r\n end;\r\n\r\n // check der SET-Positionen\r\n if (xdsPositionSetHPos.AsString<>'') AND (xdsPositionSetHPos.AsString<>'00000000-0000-0000-0000-000000000000') then xdsPositioneinkaufspreis.asfloat:=0;\r\n if (xdsPositionSetUPos.AsString<>'') AND (xdsPositionSetUPos.AsString<>'00000000-0000-0000-0000-000000000000') then\r\n begin\r\n xdsPositionPreisVorRabatt.asfloat:=0;\r\n xdsPositioneinzelpreisbrutto.asfloat:=0;\r\n end;\r\n\r\n {\r\n // wenn währungserfassung\r\n if (EinzelAuftrag.dsBelegDruckWHG.AsString<>'') AND (dm2.tablesysdatMultipleWHG.AsBoolean=TRUE) then\r\n begin\r\n if EinzelAuftrag.dsBelegDruckWHG.AsString<>dm2.tablesysdatBWHG.asstring then\r\n begin\r\n xdsPositionPreisvorRabatt.AsFloat:=xdsPositionPreisVorRabattWHG.AsFloat/EinzelAuftrag.dsBelegDruckWHGKurs.AsFloat;\r\n end;\r\n end;\r\n }\r\n\r\n\r\n xdsPositionVerkaufspreis.asfloat:=xdsPositionPreisvorRabatt.asfloat-((xdsPositionPreisvorRabatt.asfloat-xdsPositionpreisanteilnetto.asfloat)*xdsPositionRabattsatz.AsFloat/100);\r\n xdsPositioneinzelpreisbrutto.asfloat:=xdsPositionverkaufspreis.asfloat+(xdsPositionVerkaufspreis.asfloat*xdsPositionmehrwertsteuersatz.asfloat/100);\r\n\r\n\r\n if dm2.tablesysdatrundungIT.asboolean=true then xdsPositionVerkaufspreis.asfloat:=dm2.roundkfm(xdsPositionVerkaufspreis.asfloat,-2);\r\n\r\n tempvgpdivisor:=DM2.holevkpdivisor(xdsPositionArtderMenge.asstring);\r\n xdsPositionEndpreis.asfloat:=xdsPositionMenge.AsFloat*xdsPositionVerkaufspreis.AsFloat/tempvgpdivisor;\r\n xdsPositionEndpreis_EK.asfloat:=dm2.roundkfm(xdsPositionMenge.AsFloat*xdsPositionEinkaufspreis.AsFloat/tempvgpdivisor,frund);\r\n\r\n xdsPositionPosMWST.asfloat:=xdsPositionEndpreis.asfloat*xdsPositionMehrwertsteuersatz.asfloat/100;\r\n xdsPositionBruttoEndpreis.asfloat:=xdsPositionposMWST.asfloat+xdsPositionEndpreis.asfloat;\r\n xdsPositionProvisionsbetrag.asfloat:=dm2.roundkfm((xdsPositionEndpreis.asfloat*xdsPositionProvisionssatz.asfloat/100),-2);\r\n\r\n xdsPositionPosMarge.asfloat:=xdsPositionEndpreis.asfloat-xdsPositionEndpreis_EK.AsFloat;\r\n if xdsPositionEndpreis_EK.AsFloat<>0 then\r\n begin\r\n xdsPositionPosMargeProzent.asfloat:=xdsPositionPosMarge.asfloat/xdsPositionEndpreis_EK.asfloat*100;\r\n end\r\n else\r\n begin\r\n xdsPositionPosMargeProzent.AsFloat:=0;\r\n end;\r\n\r\n {\r\n // Pruefung auf die Artikelverfügbarkeit\r\n if xdsPositionBereitsGeliefert.AsFloat<>xdsPositionMenge.asfloat then\r\n begin\r\n if xdsPositionWarenbestand.asboolean=false then xdsPositionbestellen.AsBoolean:=false;\r\n if xdsPositionWarenbestand.asboolean=true then\r\n begin\r\n dm2.queryeinzelartikelbestand.close;\r\n dm2.queryEinzelartikelbestand.SQL.Clear;\r\n dm2.queryeinzelartikelbestand.SQL.append('select Bestand+Mindestbestand AS Bestand from Artikel where Artikelnummer = '''+xdsPositionartikelnummerwb.asstring+'''');\r\n dm2.queryEinzelartikelbestand.open;\r\n if dm2.queryEinzelartikelbestandBestand.asfloat>=xdsPositionMenge.asfloat then\r\n begin\r\n xdsPositionbestellen.asboolean:=false;\r\n end\r\n else\r\n begin\r\n xdsPositionbestellen.asboolean:=true;\r\n end;\r\n dm2.queryEinzelartikelbestand.close;\r\n end;\r\n end;\r\n }\r\n\r\n //RTF-Austausch Beginn\r\n //xdsPositionArtikelbeschreibung.value:=Auftrag.richartikel.Text;\r\n xdsPositionArtikelbeschreibungRTF.asstring:=xdsPositionArtikelbeschreibung.AsString;\r\n //RTF-Austausch fertig\r\n if xdsPositionArtikelbeschreibung.asstring='' then xdsPositionArtikelbeschreibung.asstring:=' ';\r\n xdsPositionPosVolumen.AsFloat:=xdsPositionVolumen.AsFloat*xdsPositionMenge.AsFloat;\r\n\r\nend;\r\n\r\nprocedure TAngebotPosEinzel.xdsPositionNewRecord(DataSet: TDataSet);\r\nvar\r\n guid:TGUID;\r\n guidstring:string;\r\nbegin\r\n createguid(guid);\r\n guidstring:=guidtostring(guid);\r\n guidstring:=ReplaceStr(guidstring,'{','');\r\n guidstring:=ReplaceStr(guidstring,'}','');\r\n xdsPositionlwbID.Asstring:=guidstring;\r\n xdsPositionNummerkomplett.value:=dsBeleg2.CurrentData;\r\n xdsPositionArtikelnummer.value:=dsArtikel.CurrentData;\r\n xdsPositionBelegdatum.AsDateTime:=dsBeleg2Datum.AsDateTime;\r\n xdsPositionposnr.AsFloat:=tmpLetztePosNr+1;\r\n xdsPositionPosUNr.AsFloat:=0;\r\n xdsPositionSumme.asboolean:=false;\r\n xdsPositionMenge.AsInteger:=1;\r\n xdsPositionArtderMenge.asstring:=dsArtikelArtderMengeArtderMenge.AsString;\r\n xdsPositionMehrwertsteuersatz.AsFloat:=dsBeleg2mehrwertsteuersatz1.AsFloat;\r\n xdsPositionVerkaufspreis.AsFloat:=dsArtikelVerkaufspreis.asfloat;\r\n if dsBeleg2rabattsatz.asfloat=0 then xdsPositionRabattsatz.asfloat:=dsArtikelstandardRabattsatzVK.asfloat;\r\n if dsBeleg2rabattstufe.asstring='Rabattpreis1' then xdsPositionverkaufspreis.asstring:=dsArtikelRabattpreis1.asstring;\r\n if dsBeleg2rabattstufe.asstring='Rabattpreis2' then xdsPositionverkaufspreis.asstring:=dsArtikelRabattpreis2.asstring;\r\n if dsBeleg2rabattstufe.asstring='Rabattpreis3' then xdsPositionverkaufspreis.asstring:=dsArtikelRabattpreis3.asstring;\r\n if dsBeleg2rabattstufe.asstring='Rabattpreis4' then xdsPositionverkaufspreis.asstring:=dsArtikelRabattpreis4.asstring;\r\n if dsBeleg2rabattstufe.asstring='Rabattpreis5' then xdsPositionverkaufspreis.asstring:=dsArtikelRabattpreis5.asstring;\r\n xdsPositionPreisvorRabatt.asfloat:=xdsPositionVerkaufspreis.AsFloat;\r\n xdsPositionPreisanteilNetto.asfloat:=dsArtikelpreisanteilnetto.asfloat;\r\n xdsPositionEinkaufspreis.asfloat:=dsArtikelEinkaufspreis.asfloat;\r\n xdsPositionRabattsatz.AsFloat:=dsBeleg2Rabattsatz.asfloat;\r\n if xdsKundenpreise.RecordCount>0 then\r\n begin\r\n xdsPositionPreisvorrabatt.asfloat:=xdsKundenpreiseVerkaufspreis.asfloat;\r\n if xdsKundenpreiseRabattsatz.AsFloat<>0 then xdsPositionRabattsatz.AsFloat:=xdsKundenpreiseRabattsatz.AsFloat;\r\n\r\n end;\r\n xdsPositionPKZ.asfloat:=0;\r\n if dsBeleg2verleihauftrag.AsBoolean=true then xdsPositionpkz.asfloat:=2;\r\n xdsPositionposmwst.asfloat:=0;\r\n xdsPositionMWStKey.asinteger:=1;\r\n xdsPositionEndpreis.asfloat:=0;\r\n xdsPositionEndpreis_EK.asfloat:=0;\r\n xdsPositionBruttoEndpreis.asfloat:=0;\r\n xdsPositionEinzelpreisBrutto.asfloat:=0;\r\n xdsPositionlager.asstring:='[-]';\r\n xdsPositionwarenbestand.asboolean:=dsArtikelWarenbestand.asboolean;\r\n xdsPositionPosMargeProzent.asfloat:=0;\r\n xdsPositionPosMarge.asfloat:=0;\r\n xdsPositionPreisanteilnetto.asfloat:=0;\r\n xdsPositionprovisionssatz.asfloat:=0;\r\n xdsPositionprovisionsbetrag.asfloat:=0;\r\n xdsPositionaussenflaeche.asfloat:=0;\r\n xdsPositionBruttogewicht.asfloat:=0;\r\n xdsPositionTara.asfloat:=0;\r\n xdsPositionSeitenumbruch.asboolean:=FALSE;\r\n xdsPositionZSnachPos.asboolean:=False;\r\n xdsPositionPreisanteilnetto.asfloat:=0;\r\n xdsPositionPreisVorRabattWHG.asfloat:=0;\r\n xdsPositionpkey.asinteger:=0;\r\n xdsPositionVolumen.AsFloat:=0;\r\n xdsPositionPosVolumen.AsFloat:=0;\r\n xdsPositionArtikelueberschrift.asstring:=dsArtikelArtikelueberschrift.asstring;\r\n xdsPositionArtikelbeschreibung.asstring:=dsArtikelArtikelbeschreibung.asstring;\r\n xdsPositionArtikelbeschreibungRTF.value:=dsArtikelArtikelbeschreibungRTF.value;\r\n xdsPositionArtikelsprache.value:='';\r\n {\r\n if xdsPositionPKZ.asfloat=3 then\r\n begin\r\n xdsPositionArtikelbeschreibung.asstring:=dm2.tablesysdatZusatzpreisText.asstring+' '+dsArtikelArtikelbeschreibung.asstring;\r\n xdsPositionArtikelbeschreibungRTF.value:=dm2.tablesysdatZusatzpreisText.asstring+' '+dsArtikelArtikelbeschreibungRTF.value;\r\n end;\r\n\r\n if xdsPositionPKZ.asfloat=4 then\r\n begin\r\n xdsPositionArtikelbeschreibung.asstring:=dsArtikelArtikelbeschreibung.asstring+#13+#10+dm2.tablesysdatZusatzpreisText.asstring;\r\n xdsPositionArtikelbeschreibungRTF.value:=dsArtikelArtikelbeschreibungRTF.value+#13+#10+dm2.tablesysdatZusatzpreisText.asstring;\r\n end;\r\n }\r\n\r\n xdsPositiongewicht.asstring:=dsArtikelGewicht.AsString;\r\n xdsPositionLaenge.asstring:=dsArtikelLaenge.AsString;\r\n xdsPositionBreite.asstring:=dsArtikelBreite.AsString;\r\n xdsPositionHoehe.asstring:=dsArtikelHoehe.AsString;\r\n xdsPositionMWStKey.asInteger:=dsArtikelMWStKey.asInteger;\r\n xdsPositionWarenbestand.asboolean:=dsArtikelWarenbestand.asboolean;\r\n xdsPositionLieferant.asstring:=dsArtikellieferantnummer.asstring;\r\n xdsPositionEinkaufspreis.AsString:=dsArtikeleinkaufspreis.asstring;\r\n xdsPositionEKvom.asstring:=dsArtikeleinkaufspreisvom.asstring;\r\n xdsPositionLager.asstring:=dsArtikelLagerort.asstring;\r\n xdsPositionVolumen.AsFloat:=dsArtikelVolumen.AsFloat;\r\n xdsPositionArtikelAttribute.AsString:=dsArtikelArtikelAttribute.AsString;\r\n {\r\n xdsPositionProvisionssatz.Asfloat:=GF.GetProvisionssatz(dsBelegVertreterMatchcode.AsString,dsBelegKundennummer.AsString,xdsPositionartikelnummer.AsString);\r\n\r\n\r\n xdsPositionquellartikel.asstring:=dsArtikelquellartikel.asstring;\r\n xdsPositionEinkaufspreis.Asfloat:=GF.ekpreisquellartikel(xdsPositionquellartikel.asstring,xdsPositionEinkaufspreis.Asfloat);\r\n }\r\n xdsPositionTextfrei10.asstring:=dsArtikeltextfrei10.asstring;\r\n xdsPositionTextfrei20.asstring:=dsArtikeltextfrei20.asstring;\r\n\r\n // Preis nach PKZ holen\r\n if xdsPositionpkz.asfloat=2 then xdsPositionpreisvorrabatt.asfloat:=dsArtikelverleihpreis.asfloat;\r\n if xdsPositionpkz.asfloat=3 then xdsPositionpreisvorrabatt.asfloat:=dsArtikelZusatzpreis.asfloat;\r\n if xdsPositionpkz.asfloat=4 then xdsPositionpreisvorrabatt.asfloat:=dsArtikelverleihpreis.asfloat + dsArtikelZusatzpreis.asfloat;\r\n\r\n {\r\n\r\n //Zusatz\r\n if xdsPositionPKZ.asfloat=3 then\r\n begin\r\n if dm2.queryKundenpreisZusatzpreis.AsFloat<>0 then\r\n begin\r\n xdsPositionPreisvorRabatt.AsFloat:=dm2.queryKundenpreisZusatzpreis.AsFloat;\r\n xdsPositionRabattsatz.asfloat:=0;\r\n xdsPositionVerkaufspreis.asfloat:=xdsPositionPreisvorRabatt.asfloat;\r\n end;\r\n end;\r\n\r\n //Verleih+Zusatzpreis kundenbezogen\r\n if xdsPositionPKZ.asfloat=4 then\r\n begin\r\n if dm2.queryKundenpreisVerleihpreis.AsFloat<>0 then\r\n begin\r\n xdsPositionPreisvorRabatt.AsFloat:=dm2.queryKundenpreisVerleihpreis.AsFloat+dm2.querykundenpreiszusatzpreis.asfloat;\r\n xdsPositionRabattsatz.asfloat:=0;\r\n xdsPositionVerkaufspreis.asfloat:=xdsPositionPreisvorRabatt.asfloat;\r\n end;\r\n end;\r\n\r\n dm2.queryKundenpreis.close;\r\n\r\n\r\n\r\n\r\n //Preiszuschlag für Artikel Beginn\r\n if gf.checkpreiszuschlag(AN) then\r\n begin\r\n Application.CreateForm(TArtikelAuswahlPreiszuschlag, ArtikelAuswahlPreiszuschlag);\r\n ArtikelAuswahlPreiszuschlag.zuschlagartikelnummer:=AN;\r\n ArtikelAuswahlPreiszuschlag.showmodal;\r\n if artikelauswahlpreiszuschlag.resultzuschlagpreisgruppe<>'' then\r\n begin\r\n xdsPositiontextfrei10.asstring:=artikelauswahlpreiszuschlag.resultzuschlagtextfrei10;\r\n xdsPositiontextfrei20.asstring:=artikelauswahlpreiszuschlag.resultzuschlagtextfrei20;\r\n if artikelauswahlpreiszuschlag.resultzuschlagvk>0 then\r\n begin\r\n xdsPositionpreisvorrabatt.asfloat:=xdsPositionpreisvorrabatt.asfloat+artikelauswahlpreiszuschlag.resultzuschlagvk;\r\n end\r\n else\r\n begin\r\n if artikelauswahlpreiszuschlag.resultzuschlagvkprozent<>0 then\r\n begin\r\n xdsPositionpreisvorrabatt.asfloat:=xdsPositionpreisvorrabatt.asfloat+(xdsPositionpreisvorrabatt.asfloat*artikelauswahlpreiszuschlag.resultzuschlagvkprozent/100);\r\n end;\r\n end;\r\n end;\r\n ArtikelauswahlPreiszuschlag.free;\r\n end;\r\n // Preiszuschlag für Artikel ENDE\r\n\r\n // Sonderpreis holen\r\n xdsPositionpreisvorrabatt.AsFloat:=gf.artikelsonderpreisholenVK(AN,dsBelegDatum.AsDateTime,xdsPositionPreisvorRabatt.asfloat);\r\n // Fremdwährungspreis holen\r\n if dm2.tablesysdatMultipleWHG.asboolean then\r\n begin\r\n if dsBelegDruckWHG.AsString<>dm2.tablesysdatBWHG.asstring then\r\n begin\r\n xdsPositionpreisvorrabattwhg.asfloat:=gf.artikelpreisWHGholenVK(AN, dsBelegdruckwhg.asstring,dsBelegdruckwhgkurs.asfloat,xdsPositionpreisvorrabatt.asfloat);\r\n end;\r\n end;\r\n // Artikeltranslation gemäß Belegsprache\r\n if (dsBelegbelegsprache.asstring<>'German') AND (dsBelegbelegsprache.asstring<>'') then\r\n begin\r\n dm2.tablesprachen.locate('Belegsprache',dsBelegbelegsprache.asstring,[LOCASEINSENSITIVE]);\r\n dm2.adoquery1.close;\r\n dm2.adoquery1.sql.clear;\r\n dm2.adoquery1.sql.append('select Artikelsprache from ArtikelTranslation WHERE Artikelnummer='''+AN+''' AND ISO6392Code='''+dm2.tablespracheniso6392Code.asstring+'''');\r\n dm2.adoquery1.open;\r\n if dm2.adoquery1.fieldbyname('Artikelsprache').asstring<>'' then xdsPositionArtikelsprache.value:=dm2.adoquery1.fieldbyname('Artikelsprache').value;\r\n dm2.adoquery1.close;\r\n end;\r\n }\r\n\r\n\r\n\r\n\r\n\r\nend;\r\n\r\nprocedure TAngebotPosEinzel.LoadDFMValues;\r\nbegin\r\n inherited LoadDFMValues;\r\n\r\n Container1 := THTMLContainer.Create(Self);\r\n Container2 := THTMLContainer.Create(Self);\r\n WTCPosition := TTableControl.Create(Self);\r\n btnPosAbbrechen := TButton.Create(Self);\r\n btnPosSpeichern := TButton.Create(Self);\r\n btnPositionLoeschen := TButton.Create(Self);\r\n edtPosNr := TDBEdit.Create(Self);\r\n edtPosUNr := TDBEdit.Create(Self);\r\n edtArtikelueberschrift := TDBEdit.Create(Self);\r\n edtMenge := TDBEdit.Create(Self);\r\n btnArtikelnummer := TButton.Create(Self);\r\n edtArtikelbeschreibung := TDBMemo.Create(Self);\r\n edtMengenart := TDBLookupComboBox.Create(Self);\r\n btnNeuePosition := TButton.Create(Self);\r\n xdsPosition := TXDataWebDataSet.Create(Self);\r\n xdsPositionNummerkomplett := TXDataWebEntityField.Create(Self);\r\n xdsPositionArtikelnummer := TXDataWebEntityField.Create(Self);\r\n xdsPositionID := TIntegerField.Create(Self);\r\n xdsPositionPosNr := TFloatField.Create(Self);\r\n xdsPositionPosUNr := TFloatField.Create(Self);\r\n xdsPositionSumme := TBooleanField.Create(Self);\r\n xdsPositionArtikelueberschrift := TStringField.Create(Self);\r\n xdsPositionArtikelbeschreibung := TStringField.Create(Self);\r\n xdsPositionMenge := TFloatField.Create(Self);\r\n xdsPositionArtderMenge := TStringField.Create(Self);\r\n xdsPositionVerkaufspreis := TFloatField.Create(Self);\r\n xdsPositionEinkaufspreis := TFloatField.Create(Self);\r\n xdsPositionSeriennummer := TStringField.Create(Self);\r\n xdsPositionWarengruppe := TStringField.Create(Self);\r\n xdsPositionWarenuntergruppe := TStringField.Create(Self);\r\n xdsPositionArtikelnummerKunde := TStringField.Create(Self);\r\n xdsPositionLieferant := TStringField.Create(Self);\r\n xdsPositionGewicht := TFloatField.Create(Self);\r\n xdsPositionLaenge := TFloatField.Create(Self);\r\n xdsPositionBreite := TFloatField.Create(Self);\r\n xdsPositionHoehe := TFloatField.Create(Self);\r\n xdsPositionMehrwertsteuersatz := TFloatField.Create(Self);\r\n xdsPositionEndpreis := TFloatField.Create(Self);\r\n xdsPositionPosMWST := TFloatField.Create(Self);\r\n xdsPositionBruttoEndpreis := TFloatField.Create(Self);\r\n xdsPositionEndpreis_EK := TFloatField.Create(Self);\r\n xdsPositionRabattsatz := TFloatField.Create(Self);\r\n xdsPositionPreisvorRabatt := TFloatField.Create(Self);\r\n xdsPositionPKZ := TFloatField.Create(Self);\r\n xdsPositionTextfrei10 := TStringField.Create(Self);\r\n xdsPositionTextfrei20 := TStringField.Create(Self);\r\n xdsPositionAlternativ := TBooleanField.Create(Self);\r\n xdsPositionEinzelpreisBrutto := TFloatField.Create(Self);\r\n xdsPositionPosMarge := TFloatField.Create(Self);\r\n xdsPositionPosMargeProzent := TFloatField.Create(Self);\r\n xdsPositionWarenbestand := TBooleanField.Create(Self);\r\n xdsPositionArtikelbeschreibungRTF := TStringField.Create(Self);\r\n xdsPositionQuellartikel := TStringField.Create(Self);\r\n xdsPositionArtikelnummerWB := TStringField.Create(Self);\r\n xdsPositionPreisanteilNetto := TFloatField.Create(Self);\r\n xdsPositionSetHPos := TStringField.Create(Self);\r\n xdsPositionSetUPos := TStringField.Create(Self);\r\n xdsPositionProvisionssatz := TFloatField.Create(Self);\r\n xdsPositionProvisionsbetrag := TFloatField.Create(Self);\r\n xdsPositionReferenzKalkulation := TStringField.Create(Self);\r\n xdsPositionArtikelsprache := TStringField.Create(Self);\r\n xdsPositionEKvom := TDateTimeField.Create(Self);\r\n xdsPositionMengenberechnungID := TStringField.Create(Self);\r\n xdsPositionTaraID := TStringField.Create(Self);\r\n xdsPositionTara := TFloatField.Create(Self);\r\n xdsPositionBruttoGewicht := TFloatField.Create(Self);\r\n xdsPositionAussenflaeche := TFloatField.Create(Self);\r\n xdsPositionSeitenumbruch := TBooleanField.Create(Self);\r\n xdsPositionMWStKey := TIntegerField.Create(Self);\r\n xdsPositionZSnachPos := TBooleanField.Create(Self);\r\n xdsPositionPreisVorRabattWHG := TFloatField.Create(Self);\r\n xdsPositionPKey := TIntegerField.Create(Self);\r\n xdsPositionLager := TStringField.Create(Self);\r\n xdsPositionlwbID := TStringField.Create(Self);\r\n xdsPositionBelegdatum := TDateTimeField.Create(Self);\r\n xdsPositionVolumen := TFloatField.Create(Self);\r\n xdsPositionPosVolumen := TFloatField.Create(Self);\r\n xdsPositionArtikelAttribute := TStringField.Create(Self);\r\n sourcePosition := TDataSource.Create(Self);\r\n dsArtikel := TXDataWebDataSet.Create(Self);\r\n dsArtikelHersteller := TXDataWebEntityField.Create(Self);\r\n dsArtikelArtderMenge := TXDataWebEntityField.Create(Self);\r\n dsArtikelPfandArt := TXDataWebEntityField.Create(Self);\r\n dsArtikelWarengruppe := TXDataWebEntityField.Create(Self);\r\n dsArtikelWarenuntergruppe := TXDataWebEntityField.Create(Self);\r\n dsArtikelArtikelnummer := TStringField.Create(Self);\r\n dsArtikelArtikelueberschrift := TStringField.Create(Self);\r\n dsArtikelArtikelbeschreibung := TStringField.Create(Self);\r\n dsArtikelVerkaufspreis := TFloatField.Create(Self);\r\n dsArtikelMindestbestand := TFloatField.Create(Self);\r\n dsArtikelPreisliste := TStringField.Create(Self);\r\n dsArtikelGewicht := TFloatField.Create(Self);\r\n dsArtikelLaenge := TFloatField.Create(Self);\r\n dsArtikelBreite := TFloatField.Create(Self);\r\n dsArtikelHoehe := TFloatField.Create(Self);\r\n dsArtikelArtikelZusatz := TStringField.Create(Self);\r\n dsArtikelLagerort := TStringField.Create(Self);\r\n dsArtikelBuchungskonto := TIntegerField.Create(Self);\r\n dsArtikelEingangMenge := TFloatField.Create(Self);\r\n dsArtikelEingangEndpreis := TFloatField.Create(Self);\r\n dsArtikelAusgangMenge := TFloatField.Create(Self);\r\n dsArtikelAusgangEndpreisEK := TFloatField.Create(Self);\r\n dsArtikelAusgangEndpreisVK := TFloatField.Create(Self);\r\n dsArtikelBestand := TFloatField.Create(Self);\r\n dsArtikelBestandswert := TFloatField.Create(Self);\r\n dsArtikelMarge := TFloatField.Create(Self);\r\n dsArtikelMargeProzent := TFloatField.Create(Self);\r\n dsArtikelArtikelnummer2 := TStringField.Create(Self);\r\n dsArtikelArtikelmatchcode := TStringField.Create(Self);\r\n dsArtikelRabattpreis1 := TFloatField.Create(Self);\r\n dsArtikelRabattpreis2 := TFloatField.Create(Self);\r\n dsArtikelRabattpreis3 := TFloatField.Create(Self);\r\n dsArtikelRabattpreis4 := TFloatField.Create(Self);\r\n dsArtikelRabattpreis5 := TFloatField.Create(Self);\r\n dsArtikelArtikelnichtmehrgueltig := TBooleanField.Create(Self);\r\n dsArtikelEinkaufspreis := TFloatField.Create(Self);\r\n dsArtikelAufschlag := TFloatField.Create(Self);\r\n dsArtikelWarenbestand := TBooleanField.Create(Self);\r\n dsArtikelTextfrei10 := TStringField.Create(Self);\r\n dsArtikelTextfrei20 := TStringField.Create(Self);\r\n dsArtikelArtikelbeschreibungRTF := TStringField.Create(Self);\r\n dsArtikelArtikeldatei1 := TStringField.Create(Self);\r\n dsArtikelArtikeldatei2 := TStringField.Create(Self);\r\n dsArtikelArtikeldatei3 := TStringField.Create(Self);\r\n dsArtikelArtikeldatei4 := TStringField.Create(Self);\r\n dsArtikelArtikeldatei5 := TStringField.Create(Self);\r\n dsArtikelEinkaufspreisVom := TDateTimeField.Create(Self);\r\n dsArtikelEAN := TStringField.Create(Self);\r\n dsArtikelVGPFaktor := TFloatField.Create(Self);\r\n dsArtikelVGPMengenart := TStringField.Create(Self);\r\n dsArtikelVerleihpreis := TFloatField.Create(Self);\r\n dsArtikelZusatzPreis := TFloatField.Create(Self);\r\n dsArtikelVerpackungsart := TStringField.Create(Self);\r\n dsArtikelVerpackungsMenge := TFloatField.Create(Self);\r\n dsArtikelQuellartikel := TStringField.Create(Self);\r\n dsArtikelrabattierfaehig := TBooleanField.Create(Self);\r\n dsArtikelAngebotAlternativeAN := TStringField.Create(Self);\r\n dsArtikelPreisanteilNetto := TFloatField.Create(Self);\r\n dsArtikelFarbe := TIntegerField.Create(Self);\r\n dsArtikelAEinkauf := TBooleanField.Create(Self);\r\n dsArtikelAVerkauf := TBooleanField.Create(Self);\r\n dsArtikelArtikelnummerLieferant := TStringField.Create(Self);\r\n dsArtikelLieferantnummer := TStringField.Create(Self);\r\n dsArtikelVerkaufspreisBrutto := TFloatField.Create(Self);\r\n dsArtikelArtikelSet := TBooleanField.Create(Self);\r\n dsArtikelProvisionssatz := TFloatField.Create(Self);\r\n dsArtikelWarentarifnummer := TStringField.Create(Self);\r\n dsArtikelHandelsartikel := TBooleanField.Create(Self);\r\n dsArtikelUrsprungsland := TStringField.Create(Self);\r\n dsArtikelKategorie := TStringField.Create(Self);\r\n dsArtikelStandardRabattsatzEK := TFloatField.Create(Self);\r\n dsArtikelStandardRabattsatzVK := TFloatField.Create(Self);\r\n dsArtikelRabattpreiseManuell := TBooleanField.Create(Self);\r\n dsArtikelMengeBestellt := TFloatField.Create(Self);\r\n dsArtikelMengeBeauftragt := TFloatField.Create(Self);\r\n dsArtikelBestandDisponiert := TFloatField.Create(Self);\r\n dsArtikelMengeAngeboten := TFloatField.Create(Self);\r\n dsArtikelBestandDispInclAngebot := TFloatField.Create(Self);\r\n dsArtikelMWStKey := TIntegerField.Create(Self);\r\n dsArtikelShopAmazon := TBooleanField.Create(Self);\r\n dsArtikelShopQuelle := TBooleanField.Create(Self);\r\n dsArtikelGeraet := TBooleanField.Create(Self);\r\n dsArtikelArtgewicht := TFloatField.Create(Self);\r\n dsArtikelVolumen := TFloatField.Create(Self);\r\n dsArtikelPacklisteNichtAnzeigen := TBooleanField.Create(Self);\r\n dsArtikelKeineAufschlagskalkulation := TBooleanField.Create(Self);\r\n dsArtikelKorrekturMenge := TFloatField.Create(Self);\r\n dsArtikelKorrekturWert := TFloatField.Create(Self);\r\n dsArtikelNachfolgeartikel := TStringField.Create(Self);\r\n dsArtikelMindestbestellmenge := TFloatField.Create(Self);\r\n dsArtikelSchnittEK := TFloatField.Create(Self);\r\n dsArtikelVerkaufspreisVom := TDateTimeField.Create(Self);\r\n dsArtikelPruefungChargeSNR := TIntegerField.Create(Self);\r\n dsArtikelArtikelbeschreibungHTML := TStringField.Create(Self);\r\n dsArtikelProduktKurzbeschreibungHTML := TStringField.Create(Self);\r\n dsArtikelStatusFuerShop := TStringField.Create(Self);\r\n dsArtikelAmpelFuerShop := TStringField.Create(Self);\r\n dsArtikelEXP_Anzahl := TFloatField.Create(Self);\r\n dsArtikelEXP_Inhalt := TFloatField.Create(Self);\r\n dsArtikelEXP_Faktor := TFloatField.Create(Self);\r\n dsArtikelFach := TStringField.Create(Self);\r\n dsArtikelExportKasse := TIntegerField.Create(Self);\r\n dsArtikelWKNR := TIntegerField.Create(Self);\r\n dsArtikelArtikelAttribute := TStringField.Create(Self);\r\n dsArtikelErstelltAm := TDateTimeField.Create(Self);\r\n dsArtikelVarianteVonAN := TStringField.Create(Self);\r\n dsArtikelGurtmassWerte := TStringField.Create(Self);\r\n dsArtikelGurtmass := TFloatField.Create(Self);\r\n dsArtikelAltersgrenze := TIntegerField.Create(Self);\r\n dsArtikelMWStKeyImHaus := TIntegerField.Create(Self);\r\n dsArtikelKasseBewegung := TFloatField.Create(Self);\r\n dsArtikelKasseBewegungEK := TFloatField.Create(Self);\r\n dsArtikelKasseBewegungVK := TFloatField.Create(Self);\r\n dsArtikelProduktionBewegung := TFloatField.Create(Self);\r\n dsArtikelProduktionBewegungEK := TFloatField.Create(Self);\r\n dsArtikelProduktionBewegungVK := TFloatField.Create(Self);\r\n dsArtikelWaWiAB := TIntegerField.Create(Self);\r\n dsArtikelGeaendertAm := TDateTimeField.Create(Self);\r\n dsArtikelGefahrgutKennzeichen := TStringField.Create(Self);\r\n dsArtikelVerpackG := TBooleanField.Create(Self);\r\n dsArtikelUPE := TFloatField.Create(Self);\r\n dsArtikelArtikelbeschreibungEinkauf := TStringField.Create(Self);\r\n dsArtikelHerstellerArtikelnummer := TStringField.Create(Self);\r\n dsArtikelNatura := TStringField.Create(Self);\r\n dsArtikelArbeitszeit := TBooleanField.Create(Self);\r\n dsArtikelArtderMengeArtderMenge := TStringField.Create(Self);\r\n xdsKundenpreise := TXDataWebDataSet.Create(Self);\r\n xdsKundenpreiseArtikelnummer := TXDataWebEntityField.Create(Self);\r\n xdsKundenpreiseKundennummer := TXDataWebEntityField.Create(Self);\r\n xdsKundenpreiseVerkaufspreis := TFloatField.Create(Self);\r\n xdsKundenpreiseNachname := TStringField.Create(Self);\r\n xdsKundenpreiseRabattsatz := TFloatField.Create(Self);\r\n xdsKundenpreiseVerleihpreis := TFloatField.Create(Self);\r\n xdsKundenpreiseZusatzPreis := TFloatField.Create(Self);\r\n xdsKundenpreiseArtikelnummerKunde := TStringField.Create(Self);\r\n xdsKundenpreiseDatumGeaendert := TDateTimeField.Create(Self);\r\n xdsKundenpreiseArtikelueberschrift := TStringField.Create(Self);\r\n xdsKundenpreiseArtikelnummerArtikelnummer := TStringField.Create(Self);\r\n xdsKundenpreiseArtikelnummerArtikelueberschrift := TStringField.Create(Self);\r\n xdsKundenpreiseArtikelnummerArtikelbeschreibung := TStringField.Create(Self);\r\n dsBeleg2 := TXDataWebDataSet.Create(Self);\r\n dsBeleg2Kundennummer := TXDataWebEntityField.Create(Self);\r\n dsBeleg2Nummerkomplett := TStringField.Create(Self);\r\n dsBeleg2ReferenzAngebot := TStringField.Create(Self);\r\n dsBeleg2ReferenzLieferschein := TStringField.Create(Self);\r\n dsBeleg2ReferenzRechnung := TStringField.Create(Self);\r\n dsBeleg2Datum := TDateTimeField.Create(Self);\r\n dsBeleg2Jahr := TFloatField.Create(Self);\r\n dsBeleg2Kalenderwoche := TIntegerField.Create(Self);\r\n dsBeleg2Nachname := TStringField.Create(Self);\r\n dsBeleg2Vorname := TStringField.Create(Self);\r\n dsBeleg2Postleitzahl := TStringField.Create(Self);\r\n dsBeleg2Ort := TStringField.Create(Self);\r\n dsBeleg2Laenderkuerzel := TStringField.Create(Self);\r\n dsBeleg2Land := TStringField.Create(Self);\r\n dsBeleg2Briefanrede1 := TStringField.Create(Self);\r\n dsBeleg2Briefanrede2 := TStringField.Create(Self);\r\n dsBeleg2EMail := TStringField.Create(Self);\r\n dsBeleg2AdresseBild := TStringField.Create(Self);\r\n dsBeleg2LieferanschriftBild := TStringField.Create(Self);\r\n dsBeleg2Zahlungsbedingung := TIntegerField.Create(Self);\r\n dsBeleg2ZahlungsbedingungText := TStringField.Create(Self);\r\n dsBeleg2Auftragsbezeichnung := TStringField.Create(Self);\r\n dsBeleg2AuftragnummerKunde := TStringField.Create(Self);\r\n dsBeleg2BestelldatumKunde := TDateTimeField.Create(Self);\r\n dsBeleg2ILN := TStringField.Create(Self);\r\n dsBeleg2Kopftext := TStringField.Create(Self);\r\n dsBeleg2Schlussbemerkung := TStringField.Create(Self);\r\n dsBeleg2Gruss := TStringField.Create(Self);\r\n dsBeleg2Mehrwertsteuersatz1 := TFloatField.Create(Self);\r\n dsBeleg2Mehrwertsteuersatz2 := TFloatField.Create(Self);\r\n dsBeleg2Nettosumme01 := TFloatField.Create(Self);\r\n dsBeleg2Nettosumme02 := TFloatField.Create(Self);\r\n dsBeleg2Nettosumme := TFloatField.Create(Self);\r\n dsBeleg2Mehrwertsteuer01 := TFloatField.Create(Self);\r\n dsBeleg2Mehrwertsteuer02 := TFloatField.Create(Self);\r\n dsBeleg2Mehrwertsteuer := TFloatField.Create(Self);\r\n dsBeleg2Bruttosumme := TFloatField.Create(Self);\r\n dsBeleg2Versanddatum := TDateTimeField.Create(Self);\r\n dsBeleg2Skontosatz := TFloatField.Create(Self);\r\n dsBeleg2NettosummeEK := TFloatField.Create(Self);\r\n dsBeleg2NettoMarge := TFloatField.Create(Self);\r\n dsBeleg2Schreibzeichen := TStringField.Create(Self);\r\n dsBeleg2Unterzeichner := TStringField.Create(Self);\r\n dsBeleg2TelefonMA := TStringField.Create(Self);\r\n dsBeleg2EmailMA := TStringField.Create(Self);\r\n dsBeleg2USTID := TStringField.Create(Self);\r\n dsBeleg2Umsatzsteuerausweis := TBooleanField.Create(Self);\r\n dsBeleg2gebucht := TBooleanField.Create(Self);\r\n dsBeleg2Lieferdatum := TDateTimeField.Create(Self);\r\n dsBeleg2Transportbedingung := TStringField.Create(Self);\r\n dsBeleg2Mehrwertsteuersatz3 := TFloatField.Create(Self);\r\n dsBeleg2Mehrwertsteuer03 := TFloatField.Create(Self);\r\n dsBeleg2Nettosumme03 := TFloatField.Create(Self);\r\n dsBeleg2RundungsDifferenz := TFloatField.Create(Self);\r\n dsBeleg2EmailText := TStringField.Create(Self);\r\n dsBeleg2Auftragerledigt := TBooleanField.Create(Self);\r\n dsBeleg2Rabattstufe := TStringField.Create(Self);\r\n dsBeleg2KFZKennzeichen := TStringField.Create(Self);\r\n dsBeleg2Fahrgestellnummer := TStringField.Create(Self);\r\n dsBeleg2KFZHersteller := TStringField.Create(Self);\r\n dsBeleg2Erstzulassungsdatum := TDateTimeField.Create(Self);\r\n dsBeleg2KMStand := TStringField.Create(Self);\r\n dsBeleg2KFZType := TStringField.Create(Self);\r\n dsBeleg2Inspektionsdatum := TDateTimeField.Create(Self);\r\n dsBeleg2Debitorennummer := TStringField.Create(Self);\r\n dsBeleg2Kostentraeger := TStringField.Create(Self);\r\n dsBeleg2Rabattsatz := TFloatField.Create(Self);\r\n dsBeleg2ObjektReferenz := TStringField.Create(Self);\r\n dsBeleg2Bank := TStringField.Create(Self);\r\n dsBeleg2Bankleitzahl := TFloatField.Create(Self);\r\n dsBeleg2Kontonummer := TStringField.Create(Self);\r\n dsBeleg2Kontoinhaber := TStringField.Create(Self);\r\n dsBeleg2Telefaxnummer := TStringField.Create(Self);\r\n dsBeleg2DatumNeu := TDateTimeField.Create(Self);\r\n dsBeleg2Datumgeaendert := TDateTimeField.Create(Self);\r\n dsBeleg2Objektnummer := TStringField.Create(Self);\r\n dsBeleg2Liefertermin := TStringField.Create(Self);\r\n dsBeleg2Emailversand := TBooleanField.Create(Self);\r\n dsBeleg2Telefonnummer := TStringField.Create(Self);\r\n dsBeleg2MobilTelefon := TStringField.Create(Self);\r\n dsBeleg2AuftragFax := TBooleanField.Create(Self);\r\n dsBeleg2REDatum := TDateTimeField.Create(Self);\r\n dsBeleg2BenutzerNeu := TStringField.Create(Self);\r\n dsBeleg2BenutzerGeaendert := TStringField.Create(Self);\r\n dsBeleg2BerechnungBrutto := TBooleanField.Create(Self);\r\n dsBeleg2Bruttosumme01 := TFloatField.Create(Self);\r\n dsBeleg2Bruttosumme02 := TFloatField.Create(Self);\r\n dsBeleg2Bruttosumme03 := TFloatField.Create(Self);\r\n dsBeleg2Notiz := TStringField.Create(Self);\r\n dsBeleg2MargeProzent := TFloatField.Create(Self);\r\n dsBeleg2Warenkreditgesperrt := TBooleanField.Create(Self);\r\n dsBeleg2Belegsprache := TStringField.Create(Self);\r\n dsBeleg2Duplicate := TStringField.Create(Self);\r\n dsBeleg2perEmail := TBooleanField.Create(Self);\r\n dsBeleg2Ansprechpartner := TStringField.Create(Self);\r\n dsBeleg2KundennummerFremd := TStringField.Create(Self);\r\n dsBeleg2Protokoll := TStringField.Create(Self);\r\n dsBeleg2Verleihauftrag := TBooleanField.Create(Self);\r\n dsBeleg2VerleihVon := TDateTimeField.Create(Self);\r\n dsBeleg2VerleihBis := TDateTimeField.Create(Self);\r\n dsBeleg2AuftragGenehmigt := TBooleanField.Create(Self);\r\n dsBeleg2gesperrt := TBooleanField.Create(Self);\r\n dsBeleg2VerleihvonText := TStringField.Create(Self);\r\n dsBeleg2VerleihbisText := TStringField.Create(Self);\r\n dsBeleg2DruckWHG := TStringField.Create(Self);\r\n dsBeleg2DruckWHGKurs := TFloatField.Create(Self);\r\n dsBeleg2ProzentsatzZusatzposition := TFloatField.Create(Self);\r\n dsBeleg2TextZusatzposition := TStringField.Create(Self);\r\n dsBeleg2TextzusatzBeschreibung := TStringField.Create(Self);\r\n dsBeleg2Layoutname := TStringField.Create(Self);\r\n dsBeleg2Gesamtgewicht := TFloatField.Create(Self);\r\n dsBeleg2BetragZusatzposition := TFloatField.Create(Self);\r\n dsBeleg2ReferenzBestellung := TStringField.Create(Self);\r\n dsBeleg2Termin1 := TDateTimeField.Create(Self);\r\n dsBeleg2Termin2 := TDateTimeField.Create(Self);\r\n dsBeleg2Zielkontaktnummer := TStringField.Create(Self);\r\n dsBeleg2Zielkontaktname := TStringField.Create(Self);\r\n dsBeleg2Bilddatei1 := TStringField.Create(Self);\r\n dsBeleg2Bilddatei2 := TStringField.Create(Self);\r\n dsBeleg2Zielkontaktnummer2 := TStringField.Create(Self);\r\n dsBeleg2Zielkontaktname2 := TStringField.Create(Self);\r\n dsBeleg2bestaetigt := TDateTimeField.Create(Self);\r\n dsBeleg2Zielkontaktnummer3 := TStringField.Create(Self);\r\n dsBeleg2Zielkontaktname3 := TStringField.Create(Self);\r\n dsBeleg2Termin3 := TDateTimeField.Create(Self);\r\n dsBeleg2Termin4 := TDateTimeField.Create(Self);\r\n dsBeleg2Muster := TBooleanField.Create(Self);\r\n dsBeleg2KW := TIntegerField.Create(Self);\r\n dsBeleg2Datenlink := TStringField.Create(Self);\r\n dsBeleg2Mehrwertsteuersatz4 := TFloatField.Create(Self);\r\n dsBeleg2Mehrwertsteuersatz5 := TFloatField.Create(Self);\r\n dsBeleg2Mehrwertsteuersatz6 := TFloatField.Create(Self);\r\n dsBeleg2BesteuerungKey := TIntegerField.Create(Self);\r\n dsBeleg2VertreterMatchcode := TStringField.Create(Self);\r\n dsBeleg2Verfasser := TStringField.Create(Self);\r\n dsBeleg2LieferadresseID := TIntegerField.Create(Self);\r\n dsBeleg2AuftragStatus := TStringField.Create(Self);\r\n dsBeleg2MonatJahr := TDateTimeField.Create(Self);\r\n dsBeleg2Belegvariante := TStringField.Create(Self);\r\n dsBeleg2Produktionsfreigabe := TBooleanField.Create(Self);\r\n dsBeleg2ReferenzRahmenAuftrag := TStringField.Create(Self);\r\n dsBeleg2DatumRahmenAuftrag := TDateTimeField.Create(Self);\r\n dsBeleg2FahrzeugID := TIntegerField.Create(Self);\r\n dsBeleg2AuslieferungKW := TStringField.Create(Self);\r\n dsBeleg2BereitstellungDatum := TDateTimeField.Create(Self);\r\n dsBeleg2VTUID := TStringField.Create(Self);\r\n dsBeleg2LieferanschriftDaten := TStringField.Create(Self);\r\n dsBeleg2GesamtVolumen := TFloatField.Create(Self);\r\n dsBeleg2BelegPKey := TIntegerField.Create(Self);\r\n dsBeleg2DruckParameter := TStringField.Create(Self);\r\n dsBeleg2ReferenzService := TStringField.Create(Self);\r\n dsBeleg2ZusatzDaten := TStringField.Create(Self);\r\n dsBeleg2StandPDF := TStringField.Create(Self);\r\n dsBeleg2Paketdienst := TStringField.Create(Self);\r\n dsBeleg2Monteur := TIntegerField.Create(Self);\r\n dsBeleg2KundennummerKundennummer := TStringField.Create(Self);\r\n dsBeleg2ServiceBemerkung := TStringField.Create(Self);\r\n\r\n Container1.BeforeLoadDFMValues;\r\n Container2.BeforeLoadDFMValues;\r\n WTCPosition.BeforeLoadDFMValues;\r\n btnPosAbbrechen.BeforeLoadDFMValues;\r\n btnPosSpeichern.BeforeLoadDFMValues;\r\n btnPositionLoeschen.BeforeLoadDFMValues;\r\n edtPosNr.BeforeLoadDFMValues;\r\n edtPosUNr.BeforeLoadDFMValues;\r\n edtArtikelueberschrift.BeforeLoadDFMValues;\r\n edtMenge.BeforeLoadDFMValues;\r\n btnArtikelnummer.BeforeLoadDFMValues;\r\n edtArtikelbeschreibung.BeforeLoadDFMValues;\r\n edtMengenart.BeforeLoadDFMValues;\r\n btnNeuePosition.BeforeLoadDFMValues;\r\n xdsPosition.BeforeLoadDFMValues;\r\n xdsPositionNummerkomplett.BeforeLoadDFMValues;\r\n xdsPositionArtikelnummer.BeforeLoadDFMValues;\r\n xdsPositionID.BeforeLoadDFMValues;\r\n xdsPositionPosNr.BeforeLoadDFMValues;\r\n xdsPositionPosUNr.BeforeLoadDFMValues;\r\n xdsPositionSumme.BeforeLoadDFMValues;\r\n xdsPositionArtikelueberschrift.BeforeLoadDFMValues;\r\n xdsPositionArtikelbeschreibung.BeforeLoadDFMValues;\r\n xdsPositionMenge.BeforeLoadDFMValues;\r\n xdsPositionArtderMenge.BeforeLoadDFMValues;\r\n xdsPositionVerkaufspreis.BeforeLoadDFMValues;\r\n xdsPositionEinkaufspreis.BeforeLoadDFMValues;\r\n xdsPositionSeriennummer.BeforeLoadDFMValues;\r\n xdsPositionWarengruppe.BeforeLoadDFMValues;\r\n xdsPositionWarenuntergruppe.BeforeLoadDFMValues;\r\n xdsPositionArtikelnummerKunde.BeforeLoadDFMValues;\r\n xdsPositionLieferant.BeforeLoadDFMValues;\r\n xdsPositionGewicht.BeforeLoadDFMValues;\r\n xdsPositionLaenge.BeforeLoadDFMValues;\r\n xdsPositionBreite.BeforeLoadDFMValues;\r\n xdsPositionHoehe.BeforeLoadDFMValues;\r\n xdsPositionMehrwertsteuersatz.BeforeLoadDFMValues;\r\n xdsPositionEndpreis.BeforeLoadDFMValues;\r\n xdsPositionPosMWST.BeforeLoadDFMValues;\r\n xdsPositionBruttoEndpreis.BeforeLoadDFMValues;\r\n xdsPositionEndpreis_EK.BeforeLoadDFMValues;\r\n xdsPositionRabattsatz.BeforeLoadDFMValues;\r\n xdsPositionPreisvorRabatt.BeforeLoadDFMValues;\r\n xdsPositionPKZ.BeforeLoadDFMValues;\r\n xdsPositionTextfrei10.BeforeLoadDFMValues;\r\n xdsPositionTextfrei20.BeforeLoadDFMValues;\r\n xdsPositionAlternativ.BeforeLoadDFMValues;\r\n xdsPositionEinzelpreisBrutto.BeforeLoadDFMValues;\r\n xdsPositionPosMarge.BeforeLoadDFMValues;\r\n xdsPositionPosMargeProzent.BeforeLoadDFMValues;\r\n xdsPositionWarenbestand.BeforeLoadDFMValues;\r\n xdsPositionArtikelbeschreibungRTF.BeforeLoadDFMValues;\r\n xdsPositionQuellartikel.BeforeLoadDFMValues;\r\n xdsPositionArtikelnummerWB.BeforeLoadDFMValues;\r\n xdsPositionPreisanteilNetto.BeforeLoadDFMValues;\r\n xdsPositionSetHPos.BeforeLoadDFMValues;\r\n xdsPositionSetUPos.BeforeLoadDFMValues;\r\n xdsPositionProvisionssatz.BeforeLoadDFMValues;\r\n xdsPositionProvisionsbetrag.BeforeLoadDFMValues;\r\n xdsPositionReferenzKalkulation.BeforeLoadDFMValues;\r\n xdsPositionArtikelsprache.BeforeLoadDFMValues;\r\n xdsPositionEKvom.BeforeLoadDFMValues;\r\n xdsPositionMengenberechnungID.BeforeLoadDFMValues;\r\n xdsPositionTaraID.BeforeLoadDFMValues;\r\n xdsPositionTara.BeforeLoadDFMValues;\r\n xdsPositionBruttoGewicht.BeforeLoadDFMValues;\r\n xdsPositionAussenflaeche.BeforeLoadDFMValues;\r\n xdsPositionSeitenumbruch.BeforeLoadDFMValues;\r\n xdsPositionMWStKey.BeforeLoadDFMValues;\r\n xdsPositionZSnachPos.BeforeLoadDFMValues;\r\n xdsPositionPreisVorRabattWHG.BeforeLoadDFMValues;\r\n xdsPositionPKey.BeforeLoadDFMValues;\r\n xdsPositionLager.BeforeLoadDFMValues;\r\n xdsPositionlwbID.BeforeLoadDFMValues;\r\n xdsPositionBelegdatum.BeforeLoadDFMValues;\r\n xdsPositionVolumen.BeforeLoadDFMValues;\r\n xdsPositionPosVolumen.BeforeLoadDFMValues;\r\n xdsPositionArtikelAttribute.BeforeLoadDFMValues;\r\n sourcePosition.BeforeLoadDFMValues;\r\n dsArtikel.BeforeLoadDFMValues;\r\n dsArtikelHersteller.BeforeLoadDFMValues;\r\n dsArtikelArtderMenge.BeforeLoadDFMValues;\r\n dsArtikelPfandArt.BeforeLoadDFMValues;\r\n dsArtikelWarengruppe.BeforeLoadDFMValues;\r\n dsArtikelWarenuntergruppe.BeforeLoadDFMValues;\r\n dsArtikelArtikelnummer.BeforeLoadDFMValues;\r\n dsArtikelArtikelueberschrift.BeforeLoadDFMValues;\r\n dsArtikelArtikelbeschreibung.BeforeLoadDFMValues;\r\n dsArtikelVerkaufspreis.BeforeLoadDFMValues;\r\n dsArtikelMindestbestand.BeforeLoadDFMValues;\r\n dsArtikelPreisliste.BeforeLoadDFMValues;\r\n dsArtikelGewicht.BeforeLoadDFMValues;\r\n dsArtikelLaenge.BeforeLoadDFMValues;\r\n dsArtikelBreite.BeforeLoadDFMValues;\r\n dsArtikelHoehe.BeforeLoadDFMValues;\r\n dsArtikelArtikelZusatz.BeforeLoadDFMValues;\r\n dsArtikelLagerort.BeforeLoadDFMValues;\r\n dsArtikelBuchungskonto.BeforeLoadDFMValues;\r\n dsArtikelEingangMenge.BeforeLoadDFMValues;\r\n dsArtikelEingangEndpreis.BeforeLoadDFMValues;\r\n dsArtikelAusgangMenge.BeforeLoadDFMValues;\r\n dsArtikelAusgangEndpreisEK.BeforeLoadDFMValues;\r\n dsArtikelAusgangEndpreisVK.BeforeLoadDFMValues;\r\n dsArtikelBestand.BeforeLoadDFMValues;\r\n dsArtikelBestandswert.BeforeLoadDFMValues;\r\n dsArtikelMarge.BeforeLoadDFMValues;\r\n dsArtikelMargeProzent.BeforeLoadDFMValues;\r\n dsArtikelArtikelnummer2.BeforeLoadDFMValues;\r\n dsArtikelArtikelmatchcode.BeforeLoadDFMValues;\r\n dsArtikelRabattpreis1.BeforeLoadDFMValues;\r\n dsArtikelRabattpreis2.BeforeLoadDFMValues;\r\n dsArtikelRabattpreis3.BeforeLoadDFMValues;\r\n dsArtikelRabattpreis4.BeforeLoadDFMValues;\r\n dsArtikelRabattpreis5.BeforeLoadDFMValues;\r\n dsArtikelArtikelnichtmehrgueltig.BeforeLoadDFMValues;\r\n dsArtikelEinkaufspreis.BeforeLoadDFMValues;\r\n dsArtikelAufschlag.BeforeLoadDFMValues;\r\n dsArtikelWarenbestand.BeforeLoadDFMValues;\r\n dsArtikelTextfrei10.BeforeLoadDFMValues;\r\n dsArtikelTextfrei20.BeforeLoadDFMValues;\r\n dsArtikelArtikelbeschreibungRTF.BeforeLoadDFMValues;\r\n dsArtikelArtikeldatei1.BeforeLoadDFMValues;\r\n dsArtikelArtikeldatei2.BeforeLoadDFMValues;\r\n dsArtikelArtikeldatei3.BeforeLoadDFMValues;\r\n dsArtikelArtikeldatei4.BeforeLoadDFMValues;\r\n dsArtikelArtikeldatei5.BeforeLoadDFMValues;\r\n dsArtikelEinkaufspreisVom.BeforeLoadDFMValues;\r\n dsArtikelEAN.BeforeLoadDFMValues;\r\n dsArtikelVGPFaktor.BeforeLoadDFMValues;\r\n dsArtikelVGPMengenart.BeforeLoadDFMValues;\r\n dsArtikelVerleihpreis.BeforeLoadDFMValues;\r\n dsArtikelZusatzPreis.BeforeLoadDFMValues;\r\n dsArtikelVerpackungsart.BeforeLoadDFMValues;\r\n dsArtikelVerpackungsMenge.BeforeLoadDFMValues;\r\n dsArtikelQuellartikel.BeforeLoadDFMValues;\r\n dsArtikelrabattierfaehig.BeforeLoadDFMValues;\r\n dsArtikelAngebotAlternativeAN.BeforeLoadDFMValues;\r\n dsArtikelPreisanteilNetto.BeforeLoadDFMValues;\r\n dsArtikelFarbe.BeforeLoadDFMValues;\r\n dsArtikelAEinkauf.BeforeLoadDFMValues;\r\n dsArtikelAVerkauf.BeforeLoadDFMValues;\r\n dsArtikelArtikelnummerLieferant.BeforeLoadDFMValues;\r\n dsArtikelLieferantnummer.BeforeLoadDFMValues;\r\n dsArtikelVerkaufspreisBrutto.BeforeLoadDFMValues;\r\n dsArtikelArtikelSet.BeforeLoadDFMValues;\r\n dsArtikelProvisionssatz.BeforeLoadDFMValues;\r\n dsArtikelWarentarifnummer.BeforeLoadDFMValues;\r\n dsArtikelHandelsartikel.BeforeLoadDFMValues;\r\n dsArtikelUrsprungsland.BeforeLoadDFMValues;\r\n dsArtikelKategorie.BeforeLoadDFMValues;\r\n dsArtikelStandardRabattsatzEK.BeforeLoadDFMValues;\r\n dsArtikelStandardRabattsatzVK.BeforeLoadDFMValues;\r\n dsArtikelRabattpreiseManuell.BeforeLoadDFMValues;\r\n dsArtikelMengeBestellt.BeforeLoadDFMValues;\r\n dsArtikelMengeBeauftragt.BeforeLoadDFMValues;\r\n dsArtikelBestandDisponiert.BeforeLoadDFMValues;\r\n dsArtikelMengeAngeboten.BeforeLoadDFMValues;\r\n dsArtikelBestandDispInclAngebot.BeforeLoadDFMValues;\r\n dsArtikelMWStKey.BeforeLoadDFMValues;\r\n dsArtikelShopAmazon.BeforeLoadDFMValues;\r\n dsArtikelShopQuelle.BeforeLoadDFMValues;\r\n dsArtikelGeraet.BeforeLoadDFMValues;\r\n dsArtikelArtgewicht.BeforeLoadDFMValues;\r\n dsArtikelVolumen.BeforeLoadDFMValues;\r\n dsArtikelPacklisteNichtAnzeigen.BeforeLoadDFMValues;\r\n dsArtikelKeineAufschlagskalkulation.BeforeLoadDFMValues;\r\n dsArtikelKorrekturMenge.BeforeLoadDFMValues;\r\n dsArtikelKorrekturWert.BeforeLoadDFMValues;\r\n dsArtikelNachfolgeartikel.BeforeLoadDFMValues;\r\n dsArtikelMindestbestellmenge.BeforeLoadDFMValues;\r\n dsArtikelSchnittEK.BeforeLoadDFMValues;\r\n dsArtikelVerkaufspreisVom.BeforeLoadDFMValues;\r\n dsArtikelPruefungChargeSNR.BeforeLoadDFMValues;\r\n dsArtikelArtikelbeschreibungHTML.BeforeLoadDFMValues;\r\n dsArtikelProduktKurzbeschreibungHTML.BeforeLoadDFMValues;\r\n dsArtikelStatusFuerShop.BeforeLoadDFMValues;\r\n dsArtikelAmpelFuerShop.BeforeLoadDFMValues;\r\n dsArtikelEXP_Anzahl.BeforeLoadDFMValues;\r\n dsArtikelEXP_Inhalt.BeforeLoadDFMValues;\r\n dsArtikelEXP_Faktor.BeforeLoadDFMValues;\r\n dsArtikelFach.BeforeLoadDFMValues;\r\n dsArtikelExportKasse.BeforeLoadDFMValues;\r\n dsArtikelWKNR.BeforeLoadDFMValues;\r\n dsArtikelArtikelAttribute.BeforeLoadDFMValues;\r\n dsArtikelErstelltAm.BeforeLoadDFMValues;\r\n dsArtikelVarianteVonAN.BeforeLoadDFMValues;\r\n dsArtikelGurtmassWerte.BeforeLoadDFMValues;\r\n dsArtikelGurtmass.BeforeLoadDFMValues;\r\n dsArtikelAltersgrenze.BeforeLoadDFMValues;\r\n dsArtikelMWStKeyImHaus.BeforeLoadDFMValues;\r\n dsArtikelKasseBewegung.BeforeLoadDFMValues;\r\n dsArtikelKasseBewegungEK.BeforeLoadDFMValues;\r\n dsArtikelKasseBewegungVK.BeforeLoadDFMValues;\r\n dsArtikelProduktionBewegung.BeforeLoadDFMValues;\r\n dsArtikelProduktionBewegungEK.BeforeLoadDFMValues;\r\n dsArtikelProduktionBewegungVK.BeforeLoadDFMValues;\r\n dsArtikelWaWiAB.BeforeLoadDFMValues;\r\n dsArtikelGeaendertAm.BeforeLoadDFMValues;\r\n dsArtikelGefahrgutKennzeichen.BeforeLoadDFMValues;\r\n dsArtikelVerpackG.BeforeLoadDFMValues;\r\n dsArtikelUPE.BeforeLoadDFMValues;\r\n dsArtikelArtikelbeschreibungEinkauf.BeforeLoadDFMValues;\r\n dsArtikelHerstellerArtikelnummer.BeforeLoadDFMValues;\r\n dsArtikelNatura.BeforeLoadDFMValues;\r\n dsArtikelArbeitszeit.BeforeLoadDFMValues;\r\n dsArtikelArtderMengeArtderMenge.BeforeLoadDFMValues;\r\n xdsKundenpreise.BeforeLoadDFMValues;\r\n xdsKundenpreiseArtikelnummer.BeforeLoadDFMValues;\r\n xdsKundenpreiseKundennummer.BeforeLoadDFMValues;\r\n xdsKundenpreiseVerkaufspreis.BeforeLoadDFMValues;\r\n xdsKundenpreiseNachname.BeforeLoadDFMValues;\r\n xdsKundenpreiseRabattsatz.BeforeLoadDFMValues;\r\n xdsKundenpreiseVerleihpreis.BeforeLoadDFMValues;\r\n xdsKundenpreiseZusatzPreis.BeforeLoadDFMValues;\r\n xdsKundenpreiseArtikelnummerKunde.BeforeLoadDFMValues;\r\n xdsKundenpreiseDatumGeaendert.BeforeLoadDFMValues;\r\n xdsKundenpreiseArtikelueberschrift.BeforeLoadDFMValues;\r\n xdsKundenpreiseArtikelnummerArtikelnummer.BeforeLoadDFMValues;\r\n xdsKundenpreiseArtikelnummerArtikelueberschrift.BeforeLoadDFMValues;\r\n xdsKundenpreiseArtikelnummerArtikelbeschreibung.BeforeLoadDFMValues;\r\n dsBeleg2.BeforeLoadDFMValues;\r\n dsBeleg2Kundennummer.BeforeLoadDFMValues;\r\n dsBeleg2Nummerkomplett.BeforeLoadDFMValues;\r\n dsBeleg2ReferenzAngebot.BeforeLoadDFMValues;\r\n dsBeleg2ReferenzLieferschein.BeforeLoadDFMValues;\r\n dsBeleg2ReferenzRechnung.BeforeLoadDFMValues;\r\n dsBeleg2Datum.BeforeLoadDFMValues;\r\n dsBeleg2Jahr.BeforeLoadDFMValues;\r\n dsBeleg2Kalenderwoche.BeforeLoadDFMValues;\r\n dsBeleg2Nachname.BeforeLoadDFMValues;\r\n dsBeleg2Vorname.BeforeLoadDFMValues;\r\n dsBeleg2Postleitzahl.BeforeLoadDFMValues;\r\n dsBeleg2Ort.BeforeLoadDFMValues;\r\n dsBeleg2Laenderkuerzel.BeforeLoadDFMValues;\r\n dsBeleg2Land.BeforeLoadDFMValues;\r\n dsBeleg2Briefanrede1.BeforeLoadDFMValues;\r\n dsBeleg2Briefanrede2.BeforeLoadDFMValues;\r\n dsBeleg2EMail.BeforeLoadDFMValues;\r\n dsBeleg2AdresseBild.BeforeLoadDFMValues;\r\n dsBeleg2LieferanschriftBild.BeforeLoadDFMValues;\r\n dsBeleg2Zahlungsbedingung.BeforeLoadDFMValues;\r\n dsBeleg2ZahlungsbedingungText.BeforeLoadDFMValues;\r\n dsBeleg2Auftragsbezeichnung.BeforeLoadDFMValues;\r\n dsBeleg2AuftragnummerKunde.BeforeLoadDFMValues;\r\n dsBeleg2BestelldatumKunde.BeforeLoadDFMValues;\r\n dsBeleg2ILN.BeforeLoadDFMValues;\r\n dsBeleg2Kopftext.BeforeLoadDFMValues;\r\n dsBeleg2Schlussbemerkung.BeforeLoadDFMValues;\r\n dsBeleg2Gruss.BeforeLoadDFMValues;\r\n dsBeleg2Mehrwertsteuersatz1.BeforeLoadDFMValues;\r\n dsBeleg2Mehrwertsteuersatz2.BeforeLoadDFMValues;\r\n dsBeleg2Nettosumme01.BeforeLoadDFMValues;\r\n dsBeleg2Nettosumme02.BeforeLoadDFMValues;\r\n dsBeleg2Nettosumme.BeforeLoadDFMValues;\r\n dsBeleg2Mehrwertsteuer01.BeforeLoadDFMValues;\r\n dsBeleg2Mehrwertsteuer02.BeforeLoadDFMValues;\r\n dsBeleg2Mehrwertsteuer.BeforeLoadDFMValues;\r\n dsBeleg2Bruttosumme.BeforeLoadDFMValues;\r\n dsBeleg2Versanddatum.BeforeLoadDFMValues;\r\n dsBeleg2Skontosatz.BeforeLoadDFMValues;\r\n dsBeleg2NettosummeEK.BeforeLoadDFMValues;\r\n dsBeleg2NettoMarge.BeforeLoadDFMValues;\r\n dsBeleg2Schreibzeichen.BeforeLoadDFMValues;\r\n dsBeleg2Unterzeichner.BeforeLoadDFMValues;\r\n dsBeleg2TelefonMA.BeforeLoadDFMValues;\r\n dsBeleg2EmailMA.BeforeLoadDFMValues;\r\n dsBeleg2USTID.BeforeLoadDFMValues;\r\n dsBeleg2Umsatzsteuerausweis.BeforeLoadDFMValues;\r\n dsBeleg2gebucht.BeforeLoadDFMValues;\r\n dsBeleg2Lieferdatum.BeforeLoadDFMValues;\r\n dsBeleg2Transportbedingung.BeforeLoadDFMValues;\r\n dsBeleg2Mehrwertsteuersatz3.BeforeLoadDFMValues;\r\n dsBeleg2Mehrwertsteuer03.BeforeLoadDFMValues;\r\n dsBeleg2Nettosumme03.BeforeLoadDFMValues;\r\n dsBeleg2RundungsDifferenz.BeforeLoadDFMValues;\r\n dsBeleg2EmailText.BeforeLoadDFMValues;\r\n dsBeleg2Auftragerledigt.BeforeLoadDFMValues;\r\n dsBeleg2Rabattstufe.BeforeLoadDFMValues;\r\n dsBeleg2KFZKennzeichen.BeforeLoadDFMValues;\r\n dsBeleg2Fahrgestellnummer.BeforeLoadDFMValues;\r\n dsBeleg2KFZHersteller.BeforeLoadDFMValues;\r\n dsBeleg2Erstzulassungsdatum.BeforeLoadDFMValues;\r\n dsBeleg2KMStand.BeforeLoadDFMValues;\r\n dsBeleg2KFZType.BeforeLoadDFMValues;\r\n dsBeleg2Inspektionsdatum.BeforeLoadDFMValues;\r\n dsBeleg2Debitorennummer.BeforeLoadDFMValues;\r\n dsBeleg2Kostentraeger.BeforeLoadDFMValues;\r\n dsBeleg2Rabattsatz.BeforeLoadDFMValues;\r\n dsBeleg2ObjektReferenz.BeforeLoadDFMValues;\r\n dsBeleg2Bank.BeforeLoadDFMValues;\r\n dsBeleg2Bankleitzahl.BeforeLoadDFMValues;\r\n dsBeleg2Kontonummer.BeforeLoadDFMValues;\r\n dsBeleg2Kontoinhaber.BeforeLoadDFMValues;\r\n dsBeleg2Telefaxnummer.BeforeLoadDFMValues;\r\n dsBeleg2DatumNeu.BeforeLoadDFMValues;\r\n dsBeleg2Datumgeaendert.BeforeLoadDFMValues;\r\n dsBeleg2Objektnummer.BeforeLoadDFMValues;\r\n dsBeleg2Liefertermin.BeforeLoadDFMValues;\r\n dsBeleg2Emailversand.BeforeLoadDFMValues;\r\n dsBeleg2Telefonnummer.BeforeLoadDFMValues;\r\n dsBeleg2MobilTelefon.BeforeLoadDFMValues;\r\n dsBeleg2AuftragFax.BeforeLoadDFMValues;\r\n dsBeleg2REDatum.BeforeLoadDFMValues;\r\n dsBeleg2BenutzerNeu.BeforeLoadDFMValues;\r\n dsBeleg2BenutzerGeaendert.BeforeLoadDFMValues;\r\n dsBeleg2BerechnungBrutto.BeforeLoadDFMValues;\r\n dsBeleg2Bruttosumme01.BeforeLoadDFMValues;\r\n dsBeleg2Bruttosumme02.BeforeLoadDFMValues;\r\n dsBeleg2Bruttosumme03.BeforeLoadDFMValues;\r\n dsBeleg2Notiz.BeforeLoadDFMValues;\r\n dsBeleg2MargeProzent.BeforeLoadDFMValues;\r\n dsBeleg2Warenkreditgesperrt.BeforeLoadDFMValues;\r\n dsBeleg2Belegsprache.BeforeLoadDFMValues;\r\n dsBeleg2Duplicate.BeforeLoadDFMValues;\r\n dsBeleg2perEmail.BeforeLoadDFMValues;\r\n dsBeleg2Ansprechpartner.BeforeLoadDFMValues;\r\n dsBeleg2KundennummerFremd.BeforeLoadDFMValues;\r\n dsBeleg2Protokoll.BeforeLoadDFMValues;\r\n dsBeleg2Verleihauftrag.BeforeLoadDFMValues;\r\n dsBeleg2VerleihVon.BeforeLoadDFMValues;\r\n dsBeleg2VerleihBis.BeforeLoadDFMValues;\r\n dsBeleg2AuftragGenehmigt.BeforeLoadDFMValues;\r\n dsBeleg2gesperrt.BeforeLoadDFMValues;\r\n dsBeleg2VerleihvonText.BeforeLoadDFMValues;\r\n dsBeleg2VerleihbisText.BeforeLoadDFMValues;\r\n dsBeleg2DruckWHG.BeforeLoadDFMValues;\r\n dsBeleg2DruckWHGKurs.BeforeLoadDFMValues;\r\n dsBeleg2ProzentsatzZusatzposition.BeforeLoadDFMValues;\r\n dsBeleg2TextZusatzposition.BeforeLoadDFMValues;\r\n dsBeleg2TextzusatzBeschreibung.BeforeLoadDFMValues;\r\n dsBeleg2Layoutname.BeforeLoadDFMValues;\r\n dsBeleg2Gesamtgewicht.BeforeLoadDFMValues;\r\n dsBeleg2BetragZusatzposition.BeforeLoadDFMValues;\r\n dsBeleg2ReferenzBestellung.BeforeLoadDFMValues;\r\n dsBeleg2Termin1.BeforeLoadDFMValues;\r\n dsBeleg2Termin2.BeforeLoadDFMValues;\r\n dsBeleg2Zielkontaktnummer.BeforeLoadDFMValues;\r\n dsBeleg2Zielkontaktname.BeforeLoadDFMValues;\r\n dsBeleg2Bilddatei1.BeforeLoadDFMValues;\r\n dsBeleg2Bilddatei2.BeforeLoadDFMValues;\r\n dsBeleg2Zielkontaktnummer2.BeforeLoadDFMValues;\r\n dsBeleg2Zielkontaktname2.BeforeLoadDFMValues;\r\n dsBeleg2bestaetigt.BeforeLoadDFMValues;\r\n dsBeleg2Zielkontaktnummer3.BeforeLoadDFMValues;\r\n dsBeleg2Zielkontaktname3.BeforeLoadDFMValues;\r\n dsBeleg2Termin3.BeforeLoadDFMValues;\r\n dsBeleg2Termin4.BeforeLoadDFMValues;\r\n dsBeleg2Muster.BeforeLoadDFMValues;\r\n dsBeleg2KW.BeforeLoadDFMValues;\r\n dsBeleg2Datenlink.BeforeLoadDFMValues;\r\n dsBeleg2Mehrwertsteuersatz4.BeforeLoadDFMValues;\r\n dsBeleg2Mehrwertsteuersatz5.BeforeLoadDFMValues;\r\n dsBeleg2Mehrwertsteuersatz6.BeforeLoadDFMValues;\r\n dsBeleg2BesteuerungKey.BeforeLoadDFMValues;\r\n dsBeleg2VertreterMatchcode.BeforeLoadDFMValues;\r\n dsBeleg2Verfasser.BeforeLoadDFMValues;\r\n dsBeleg2LieferadresseID.BeforeLoadDFMValues;\r\n dsBeleg2AuftragStatus.BeforeLoadDFMValues;\r\n dsBeleg2MonatJahr.BeforeLoadDFMValues;\r\n dsBeleg2Belegvariante.BeforeLoadDFMValues;\r\n dsBeleg2Produktionsfreigabe.BeforeLoadDFMValues;\r\n dsBeleg2ReferenzRahmenAuftrag.BeforeLoadDFMValues;\r\n dsBeleg2DatumRahmenAuftrag.BeforeLoadDFMValues;\r\n dsBeleg2FahrzeugID.BeforeLoadDFMValues;\r\n dsBeleg2AuslieferungKW.BeforeLoadDFMValues;\r\n dsBeleg2BereitstellungDatum.BeforeLoadDFMValues;\r\n dsBeleg2VTUID.BeforeLoadDFMValues;\r\n dsBeleg2LieferanschriftDaten.BeforeLoadDFMValues;\r\n dsBeleg2GesamtVolumen.BeforeLoadDFMValues;\r\n dsBeleg2BelegPKey.BeforeLoadDFMValues;\r\n dsBeleg2DruckParameter.BeforeLoadDFMValues;\r\n dsBeleg2ReferenzService.BeforeLoadDFMValues;\r\n dsBeleg2ZusatzDaten.BeforeLoadDFMValues;\r\n dsBeleg2StandPDF.BeforeLoadDFMValues;\r\n dsBeleg2Paketdienst.BeforeLoadDFMValues;\r\n dsBeleg2Monteur.BeforeLoadDFMValues;\r\n dsBeleg2KundennummerKundennummer.BeforeLoadDFMValues;\r\n dsBeleg2ServiceBemerkung.BeforeLoadDFMValues;\r\n try\r\n Name := 'AngebotPosEinzel';\r\n Width := 235;\r\n Height := 511;\r\n CSSLibrary := cssBootstrap;\r\n ElementFont := efCSS;\r\n SetEvent(Self, 'OnClose', 'WebFormClose');\r\n SetEvent(Self, 'OnShow', 'WebFormShow');\r\n Container1.SetParentComponent(Self);\r\n Container1.Name := 'Container1';\r\n Container1.Left := 0;\r\n Container1.Top := 0;\r\n Container1.Width := 235;\r\n Container1.Height := 41;\r\n Container1.HeightStyle := ssAuto;\r\n Container1.WidthStyle := ssPercent;\r\n Container1.Align := alTop;\r\n Container1.ElementFont := efCSS;\r\n Container1.ElementPosition := epIgnore;\r\n Container2.SetParentComponent(Self);\r\n Container2.Name := 'Container2';\r\n Container2.Left := 0;\r\n Container2.Top := 41;\r\n Container2.Width := 235;\r\n Container2.Height := 41;\r\n Container2.ElementClassName := 'd-flex flex-wrap m-1';\r\n Container2.HeightStyle := ssAuto;\r\n Container2.WidthStyle := ssAuto;\r\n Container2.Align := alTop;\r\n Container2.ChildOrder := 1;\r\n Container2.ElementFont := efCSS;\r\n Container2.ElementPosition := epIgnore;\r\n WTCPosition.SetParentComponent(Self);\r\n WTCPosition.Name := 'WTCPosition';\r\n WTCPosition.Left := 0;\r\n WTCPosition.Top := 82;\r\n WTCPosition.Width := 235;\r\n WTCPosition.Height := 75;\r\n WTCPosition.ElementClassName := 'table';\r\n WTCPosition.HeightStyle := ssAuto;\r\n WTCPosition.WidthStyle := ssPercent;\r\n WTCPosition.Align := alTop;\r\n WTCPosition.BorderColor := clSilver;\r\n WTCPosition.ChildOrder := 2;\r\n WTCPosition.ColHeader := False;\r\n WTCPosition.ElementHeaderClassName := 'table-info';\r\n WTCPosition.ElementPosition := epIgnore;\r\n WTCPosition.ElementTableClassName := 'table table-bordered';\r\n WTCPosition.WordWrap := True;\r\n WTCPosition.ColCount := 2;\r\n WTCPosition.RowCount := 13;\r\n btnPosAbbrechen.SetParentComponent(Self);\r\n btnPosAbbrechen.Name := 'btnPosAbbrechen';\r\n btnPosAbbrechen.Left := 0;\r\n btnPosAbbrechen.Top := 206;\r\n btnPosAbbrechen.Width := 96;\r\n btnPosAbbrechen.Height := 25;\r\n btnPosAbbrechen.Caption := 'Abbrechen';\r\n btnPosAbbrechen.ChildOrder := 4;\r\n btnPosAbbrechen.ElementClassName := 'btn btn-info btn-sm m-1 text-left';\r\n btnPosAbbrechen.ElementFont := efCSS;\r\n btnPosAbbrechen.ElementPosition := epIgnore;\r\n btnPosAbbrechen.HeightStyle := ssAuto;\r\n btnPosAbbrechen.HeightPercent := 100.000000000000000000;\r\n btnPosAbbrechen.WidthStyle := ssAuto;\r\n btnPosAbbrechen.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnPosAbbrechen, Self, 'OnClick', 'btnPosAbbrechenClick');\r\n btnPosSpeichern.SetParentComponent(Self);\r\n btnPosSpeichern.Name := 'btnPosSpeichern';\r\n btnPosSpeichern.Left := 0;\r\n btnPosSpeichern.Top := 237;\r\n btnPosSpeichern.Width := 96;\r\n btnPosSpeichern.Height := 25;\r\n btnPosSpeichern.Caption := 'Speichern';\r\n btnPosSpeichern.ChildOrder := 4;\r\n btnPosSpeichern.ElementClassName := 'btn btn-info btn-sm m-1 text-left';\r\n btnPosSpeichern.ElementFont := efCSS;\r\n btnPosSpeichern.ElementPosition := epIgnore;\r\n btnPosSpeichern.HeightStyle := ssAuto;\r\n btnPosSpeichern.HeightPercent := 100.000000000000000000;\r\n btnPosSpeichern.WidthStyle := ssAuto;\r\n btnPosSpeichern.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnPosSpeichern, Self, 'OnClick', 'btnPosSpeichernClick');\r\n btnPositionLoeschen.SetParentComponent(Self);\r\n btnPositionLoeschen.Name := 'btnPositionLoeschen';\r\n btnPositionLoeschen.Left := 0;\r\n btnPositionLoeschen.Top := 268;\r\n btnPositionLoeschen.Width := 96;\r\n btnPositionLoeschen.Height := 25;\r\n btnPositionLoeschen.Caption := 'Position l'#246'schen';\r\n btnPositionLoeschen.ChildOrder := 4;\r\n btnPositionLoeschen.ElementClassName := 'btn btn-info btn-sm m-1 text-left';\r\n btnPositionLoeschen.ElementFont := efCSS;\r\n btnPositionLoeschen.ElementPosition := epIgnore;\r\n btnPositionLoeschen.HeightStyle := ssAuto;\r\n btnPositionLoeschen.HeightPercent := 100.000000000000000000;\r\n btnPositionLoeschen.WidthStyle := ssAuto;\r\n btnPositionLoeschen.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnPositionLoeschen, Self, 'OnClick', 'btnPositionLoeschenClick');\r\n edtPosNr.SetParentComponent(Self);\r\n edtPosNr.Name := 'edtPosNr';\r\n edtPosNr.Left := 8;\r\n edtPosNr.Top := 299;\r\n edtPosNr.Width := 121;\r\n edtPosNr.Height := 22;\r\n edtPosNr.ChildOrder := 12;\r\n edtPosNr.EditType := weNumeric;\r\n edtPosNr.ElementClassName := 'form-control form-control-sm';\r\n edtPosNr.ElementFont := efCSS;\r\n edtPosNr.ElementPosition := epIgnore;\r\n edtPosNr.HeightStyle := ssAuto;\r\n edtPosNr.HeightPercent := 100.000000000000000000;\r\n edtPosNr.WidthStyle := ssPercent;\r\n edtPosNr.WidthPercent := 95.000000000000000000;\r\n edtPosNr.DataField := 'PosNr';\r\n edtPosNr.DataSource := sourcePosition;\r\n edtPosUNr.SetParentComponent(Self);\r\n edtPosUNr.Name := 'edtPosUNr';\r\n edtPosUNr.Left := 8;\r\n edtPosUNr.Top := 327;\r\n edtPosUNr.Width := 121;\r\n edtPosUNr.Height := 22;\r\n edtPosUNr.ChildOrder := 12;\r\n edtPosUNr.EditType := weNumeric;\r\n edtPosUNr.ElementClassName := 'form-control form-control-sm';\r\n edtPosUNr.ElementFont := efCSS;\r\n edtPosUNr.ElementPosition := epIgnore;\r\n edtPosUNr.HeightStyle := ssAuto;\r\n edtPosUNr.HeightPercent := 100.000000000000000000;\r\n edtPosUNr.WidthStyle := ssPercent;\r\n edtPosUNr.WidthPercent := 95.000000000000000000;\r\n edtPosUNr.DataField := 'PosUNr';\r\n edtPosUNr.DataSource := sourcePosition;\r\n edtArtikelueberschrift.SetParentComponent(Self);\r\n edtArtikelueberschrift.Name := 'edtArtikelueberschrift';\r\n edtArtikelueberschrift.Left := 8;\r\n edtArtikelueberschrift.Top := 355;\r\n edtArtikelueberschrift.Width := 121;\r\n edtArtikelueberschrift.Height := 22;\r\n edtArtikelueberschrift.ChildOrder := 12;\r\n edtArtikelueberschrift.ElementClassName := 'form-control form-control-sm';\r\n edtArtikelueberschrift.ElementFont := efCSS;\r\n edtArtikelueberschrift.ElementPosition := epIgnore;\r\n edtArtikelueberschrift.HeightStyle := ssAuto;\r\n edtArtikelueberschrift.HeightPercent := 100.000000000000000000;\r\n edtArtikelueberschrift.WidthStyle := ssPercent;\r\n edtArtikelueberschrift.WidthPercent := 95.000000000000000000;\r\n edtArtikelueberschrift.DataField := 'Artikelueberschrift';\r\n edtArtikelueberschrift.DataSource := sourcePosition;\r\n edtMenge.SetParentComponent(Self);\r\n edtMenge.Name := 'edtMenge';\r\n edtMenge.Left := 8;\r\n edtMenge.Top := 383;\r\n edtMenge.Width := 121;\r\n edtMenge.Height := 22;\r\n edtMenge.ChildOrder := 12;\r\n edtMenge.EditType := weSignedFloat;\r\n edtMenge.ElementClassName := 'form-control form-control-sm';\r\n edtMenge.ElementFont := efCSS;\r\n edtMenge.ElementPosition := epIgnore;\r\n edtMenge.HeightStyle := ssAuto;\r\n edtMenge.HeightPercent := 100.000000000000000000;\r\n edtMenge.WidthStyle := ssPercent;\r\n edtMenge.WidthPercent := 95.000000000000000000;\r\n edtMenge.DataField := 'Menge';\r\n edtMenge.DataSource := sourcePosition;\r\n btnArtikelnummer.SetParentComponent(Self);\r\n btnArtikelnummer.Name := 'btnArtikelnummer';\r\n btnArtikelnummer.Left := 8;\r\n btnArtikelnummer.Top := 411;\r\n btnArtikelnummer.Width := 96;\r\n btnArtikelnummer.Height := 25;\r\n btnArtikelnummer.Caption := 'Artikel w'#228'hlen';\r\n btnArtikelnummer.ChildOrder := 4;\r\n btnArtikelnummer.ElementClassName := 'btn btn-info btn-sm m-1 text-left';\r\n btnArtikelnummer.ElementFont := efCSS;\r\n btnArtikelnummer.ElementPosition := epIgnore;\r\n btnArtikelnummer.HeightStyle := ssAuto;\r\n btnArtikelnummer.HeightPercent := 100.000000000000000000;\r\n btnArtikelnummer.WidthStyle := ssAuto;\r\n btnArtikelnummer.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnArtikelnummer, Self, 'OnClick', 'btnArtikelnummerClick');\r\n edtArtikelbeschreibung.SetParentComponent(Self);\r\n edtArtikelbeschreibung.Name := 'edtArtikelbeschreibung';\r\n edtArtikelbeschreibung.Left := 144;\r\n edtArtikelbeschreibung.Top := 384;\r\n edtArtikelbeschreibung.Width := 185;\r\n edtArtikelbeschreibung.Height := 200;\r\n edtArtikelbeschreibung.BorderStyle := bsNone;\r\n edtArtikelbeschreibung.ElementClassName := 'form-control form-control-sm';\r\n edtArtikelbeschreibung.ElementFont := efCSS;\r\n edtArtikelbeschreibung.ElementPosition := epIgnore;\r\n edtArtikelbeschreibung.HeightPercent := 100.000000000000000000;\r\n edtArtikelbeschreibung.Lines.BeginUpdate;\r\n try\r\n edtArtikelbeschreibung.Lines.Clear;\r\n edtArtikelbeschreibung.Lines.Add('edtArtikelbeschreibung');\r\n finally\r\n edtArtikelbeschreibung.Lines.EndUpdate;\r\n end;\r\n edtArtikelbeschreibung.SelLength := 0;\r\n edtArtikelbeschreibung.SelStart := 0;\r\n edtArtikelbeschreibung.WidthStyle := ssPercent;\r\n edtArtikelbeschreibung.WidthPercent := 95.000000000000000000;\r\n edtArtikelbeschreibung.DataField := 'Artikelbeschreibung';\r\n edtArtikelbeschreibung.DataSource := sourcePosition;\r\n edtMengenart.SetParentComponent(Self);\r\n edtMengenart.Name := 'edtMengenart';\r\n edtMengenart.Left := 8;\r\n edtMengenart.Top := 472;\r\n edtMengenart.Width := 145;\r\n edtMengenart.Height := 22;\r\n edtMengenart.ElementClassName := 'form-control form-control-sm';\r\n edtMengenart.ElementFont := efCSS;\r\n edtMengenart.ElementPosition := epIgnore;\r\n edtMengenart.HeightStyle := ssAuto;\r\n edtMengenart.HeightPercent := 100.000000000000000000;\r\n edtMengenart.WidthStyle := ssPercent;\r\n edtMengenart.WidthPercent := 95.000000000000000000;\r\n edtMengenart.DataField := 'ArtderMenge';\r\n edtMengenart.DataSource := sourcePosition;\r\n edtMengenart.KeyField := 'ArtderMenge';\r\n edtMengenart.ListField := 'ArtderMenge';\r\n edtMengenart.ListSource := DM2.sourceMengenarten;\r\n btnNeuePosition.SetParentComponent(Self);\r\n btnNeuePosition.Name := 'btnNeuePosition';\r\n btnNeuePosition.Left := 0;\r\n btnNeuePosition.Top := 175;\r\n btnNeuePosition.Width := 96;\r\n btnNeuePosition.Height := 25;\r\n btnNeuePosition.Caption := '+ NEU';\r\n btnNeuePosition.ChildOrder := 4;\r\n btnNeuePosition.ElementClassName := 'btn btn-info btn-sm m-1 text-left';\r\n btnNeuePosition.ElementFont := efCSS;\r\n btnNeuePosition.ElementPosition := epIgnore;\r\n btnNeuePosition.HeightStyle := ssAuto;\r\n btnNeuePosition.HeightPercent := 100.000000000000000000;\r\n btnNeuePosition.Visible := False;\r\n btnNeuePosition.WidthStyle := ssAuto;\r\n btnNeuePosition.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnNeuePosition, Self, 'OnClick', 'btnNeuePositionClick');\r\n xdsPosition.SetParentComponent(Self);\r\n xdsPosition.Name := 'xdsPosition';\r\n xdsPosition.AfterApplyUpdates := xdsPositionAfterApplyUpdates;\r\n xdsPosition.AfterOpen := xdsPositionAfterOpen;\r\n xdsPosition.BeforePost := xdsPositionBeforePost;\r\n xdsPosition.AfterPost := xdsPositionAfterPost;\r\n xdsPosition.AfterDelete := xdsPositionAfterDelete;\r\n SetEvent(xdsPosition, Self, 'OnNewRecord', 'xdsPositionNewRecord');\r\n xdsPosition.EntitySetName := 'PositionenAngebote';\r\n xdsPosition.Connection := DM2.XDataWebConnection1;\r\n xdsPosition.QueryTop := 1;\r\n xdsPosition.Left := 92;\r\n xdsPosition.Top := 101;\r\n xdsPositionNummerkomplett.SetParentComponent(xdsPosition);\r\n xdsPositionNummerkomplett.Name := 'xdsPositionNummerkomplett';\r\n xdsPositionNummerkomplett.FieldName := 'Nummerkomplett';\r\n xdsPositionArtikelnummer.SetParentComponent(xdsPosition);\r\n xdsPositionArtikelnummer.Name := 'xdsPositionArtikelnummer';\r\n xdsPositionArtikelnummer.FieldName := 'Artikelnummer';\r\n xdsPositionID.SetParentComponent(xdsPosition);\r\n xdsPositionID.Name := 'xdsPositionID';\r\n xdsPositionID.FieldName := 'ID';\r\n xdsPositionPosNr.SetParentComponent(xdsPosition);\r\n xdsPositionPosNr.Name := 'xdsPositionPosNr';\r\n xdsPositionPosNr.FieldName := 'PosNr';\r\n xdsPositionPosNr.Required := True;\r\n xdsPositionPosUNr.SetParentComponent(xdsPosition);\r\n xdsPositionPosUNr.Name := 'xdsPositionPosUNr';\r\n xdsPositionPosUNr.FieldName := 'PosUNr';\r\n xdsPositionSumme.SetParentComponent(xdsPosition);\r\n xdsPositionSumme.Name := 'xdsPositionSumme';\r\n xdsPositionSumme.FieldName := 'Summe';\r\n xdsPositionArtikelueberschrift.SetParentComponent(xdsPosition);\r\n xdsPositionArtikelueberschrift.Name := 'xdsPositionArtikelueberschrift';\r\n xdsPositionArtikelueberschrift.FieldName := 'Artikelueberschrift';\r\n xdsPositionArtikelueberschrift.Size := 50;\r\n xdsPositionArtikelbeschreibung.SetParentComponent(xdsPosition);\r\n xdsPositionArtikelbeschreibung.Name := 'xdsPositionArtikelbeschreibung';\r\n xdsPositionArtikelbeschreibung.FieldName := 'Artikelbeschreibung';\r\n xdsPositionArtikelbeschreibung.Size := 255;\r\n xdsPositionMenge.SetParentComponent(xdsPosition);\r\n xdsPositionMenge.Name := 'xdsPositionMenge';\r\n xdsPositionMenge.FieldName := 'Menge';\r\n xdsPositionArtderMenge.SetParentComponent(xdsPosition);\r\n xdsPositionArtderMenge.Name := 'xdsPositionArtderMenge';\r\n xdsPositionArtderMenge.FieldName := 'ArtderMenge';\r\n xdsPositionArtderMenge.Size := 50;\r\n xdsPositionVerkaufspreis.SetParentComponent(xdsPosition);\r\n xdsPositionVerkaufspreis.Name := 'xdsPositionVerkaufspreis';\r\n xdsPositionVerkaufspreis.FieldName := 'Verkaufspreis';\r\n xdsPositionEinkaufspreis.SetParentComponent(xdsPosition);\r\n xdsPositionEinkaufspreis.Name := 'xdsPositionEinkaufspreis';\r\n xdsPositionEinkaufspreis.FieldName := 'Einkaufspreis';\r\n xdsPositionSeriennummer.SetParentComponent(xdsPosition);\r\n xdsPositionSeriennummer.Name := 'xdsPositionSeriennummer';\r\n xdsPositionSeriennummer.FieldName := 'Seriennummer';\r\n xdsPositionSeriennummer.Size := 30;\r\n xdsPositionWarengruppe.SetParentComponent(xdsPosition);\r\n xdsPositionWarengruppe.Name := 'xdsPositionWarengruppe';\r\n xdsPositionWarengruppe.FieldName := 'Warengruppe';\r\n xdsPositionWarengruppe.Size := 50;\r\n xdsPositionWarenuntergruppe.SetParentComponent(xdsPosition);\r\n xdsPositionWarenuntergruppe.Name := 'xdsPositionWarenuntergruppe';\r\n xdsPositionWarenuntergruppe.FieldName := 'Warenuntergruppe';\r\n xdsPositionWarenuntergruppe.Size := 50;\r\n xdsPositionArtikelnummerKunde.SetParentComponent(xdsPosition);\r\n xdsPositionArtikelnummerKunde.Name := 'xdsPositionArtikelnummerKunde';\r\n xdsPositionArtikelnummerKunde.FieldName := 'ArtikelnummerKunde';\r\n xdsPositionArtikelnummerKunde.Size := 25;\r\n xdsPositionLieferant.SetParentComponent(xdsPosition);\r\n xdsPositionLieferant.Name := 'xdsPositionLieferant';\r\n xdsPositionLieferant.FieldName := 'Lieferant';\r\n xdsPositionLieferant.Size := 13;\r\n xdsPositionGewicht.SetParentComponent(xdsPosition);\r\n xdsPositionGewicht.Name := 'xdsPositionGewicht';\r\n xdsPositionGewicht.FieldName := 'Gewicht';\r\n xdsPositionLaenge.SetParentComponent(xdsPosition);\r\n xdsPositionLaenge.Name := 'xdsPositionLaenge';\r\n xdsPositionLaenge.FieldName := 'Laenge';\r\n xdsPositionBreite.SetParentComponent(xdsPosition);\r\n xdsPositionBreite.Name := 'xdsPositionBreite';\r\n xdsPositionBreite.FieldName := 'Breite';\r\n xdsPositionHoehe.SetParentComponent(xdsPosition);\r\n xdsPositionHoehe.Name := 'xdsPositionHoehe';\r\n xdsPositionHoehe.FieldName := 'Hoehe';\r\n xdsPositionMehrwertsteuersatz.SetParentComponent(xdsPosition);\r\n xdsPositionMehrwertsteuersatz.Name := 'xdsPositionMehrwertsteuersatz';\r\n xdsPositionMehrwertsteuersatz.FieldName := 'Mehrwertsteuersatz';\r\n xdsPositionEndpreis.SetParentComponent(xdsPosition);\r\n xdsPositionEndpreis.Name := 'xdsPositionEndpreis';\r\n xdsPositionEndpreis.FieldName := 'Endpreis';\r\n xdsPositionPosMWST.SetParentComponent(xdsPosition);\r\n xdsPositionPosMWST.Name := 'xdsPositionPosMWST';\r\n xdsPositionPosMWST.FieldName := 'PosMWST';\r\n xdsPositionBruttoEndpreis.SetParentComponent(xdsPosition);\r\n xdsPositionBruttoEndpreis.Name := 'xdsPositionBruttoEndpreis';\r\n xdsPositionBruttoEndpreis.FieldName := 'BruttoEndpreis';\r\n xdsPositionEndpreis_EK.SetParentComponent(xdsPosition);\r\n xdsPositionEndpreis_EK.Name := 'xdsPositionEndpreis_EK';\r\n xdsPositionEndpreis_EK.FieldName := 'Endpreis_EK';\r\n xdsPositionRabattsatz.SetParentComponent(xdsPosition);\r\n xdsPositionRabattsatz.Name := 'xdsPositionRabattsatz';\r\n xdsPositionRabattsatz.FieldName := 'Rabattsatz';\r\n xdsPositionPreisvorRabatt.SetParentComponent(xdsPosition);\r\n xdsPositionPreisvorRabatt.Name := 'xdsPositionPreisvorRabatt';\r\n xdsPositionPreisvorRabatt.FieldName := 'PreisvorRabatt';\r\n xdsPositionPKZ.SetParentComponent(xdsPosition);\r\n xdsPositionPKZ.Name := 'xdsPositionPKZ';\r\n xdsPositionPKZ.FieldName := 'PKZ';\r\n xdsPositionTextfrei10.SetParentComponent(xdsPosition);\r\n xdsPositionTextfrei10.Name := 'xdsPositionTextfrei10';\r\n xdsPositionTextfrei10.FieldName := 'Textfrei10';\r\n xdsPositionTextfrei10.Size := 50;\r\n xdsPositionTextfrei20.SetParentComponent(xdsPosition);\r\n xdsPositionTextfrei20.Name := 'xdsPositionTextfrei20';\r\n xdsPositionTextfrei20.FieldName := 'Textfrei20';\r\n xdsPositionTextfrei20.Size := 50;\r\n xdsPositionAlternativ.SetParentComponent(xdsPosition);\r\n xdsPositionAlternativ.Name := 'xdsPositionAlternativ';\r\n xdsPositionAlternativ.FieldName := 'Alternativ';\r\n xdsPositionEinzelpreisBrutto.SetParentComponent(xdsPosition);\r\n xdsPositionEinzelpreisBrutto.Name := 'xdsPositionEinzelpreisBrutto';\r\n xdsPositionEinzelpreisBrutto.FieldName := 'EinzelpreisBrutto';\r\n xdsPositionPosMarge.SetParentComponent(xdsPosition);\r\n xdsPositionPosMarge.Name := 'xdsPositionPosMarge';\r\n xdsPositionPosMarge.FieldName := 'PosMarge';\r\n xdsPositionPosMargeProzent.SetParentComponent(xdsPosition);\r\n xdsPositionPosMargeProzent.Name := 'xdsPositionPosMargeProzent';\r\n xdsPositionPosMargeProzent.FieldName := 'PosMargeProzent';\r\n xdsPositionWarenbestand.SetParentComponent(xdsPosition);\r\n xdsPositionWarenbestand.Name := 'xdsPositionWarenbestand';\r\n xdsPositionWarenbestand.FieldName := 'Warenbestand';\r\n xdsPositionArtikelbeschreibungRTF.SetParentComponent(xdsPosition);\r\n xdsPositionArtikelbeschreibungRTF.Name := 'xdsPositionArtikelbeschreibungRTF';\r\n xdsPositionArtikelbeschreibungRTF.FieldName := 'ArtikelbeschreibungRTF';\r\n xdsPositionArtikelbeschreibungRTF.Size := 255;\r\n xdsPositionQuellartikel.SetParentComponent(xdsPosition);\r\n xdsPositionQuellartikel.Name := 'xdsPositionQuellartikel';\r\n xdsPositionQuellartikel.FieldName := 'Quellartikel';\r\n xdsPositionQuellartikel.Size := 25;\r\n xdsPositionArtikelnummerWB.SetParentComponent(xdsPosition);\r\n xdsPositionArtikelnummerWB.Name := 'xdsPositionArtikelnummerWB';\r\n xdsPositionArtikelnummerWB.FieldName := 'ArtikelnummerWB';\r\n xdsPositionArtikelnummerWB.Size := 25;\r\n xdsPositionPreisanteilNetto.SetParentComponent(xdsPosition);\r\n xdsPositionPreisanteilNetto.Name := 'xdsPositionPreisanteilNetto';\r\n xdsPositionPreisanteilNetto.FieldName := 'PreisanteilNetto';\r\n xdsPositionSetHPos.SetParentComponent(xdsPosition);\r\n xdsPositionSetHPos.Name := 'xdsPositionSetHPos';\r\n xdsPositionSetHPos.FieldName := 'SetHPos';\r\n xdsPositionSetHPos.Size := 38;\r\n xdsPositionSetUPos.SetParentComponent(xdsPosition);\r\n xdsPositionSetUPos.Name := 'xdsPositionSetUPos';\r\n xdsPositionSetUPos.FieldName := 'SetUPos';\r\n xdsPositionSetUPos.Size := 38;\r\n xdsPositionProvisionssatz.SetParentComponent(xdsPosition);\r\n xdsPositionProvisionssatz.Name := 'xdsPositionProvisionssatz';\r\n xdsPositionProvisionssatz.FieldName := 'Provisionssatz';\r\n xdsPositionProvisionsbetrag.SetParentComponent(xdsPosition);\r\n xdsPositionProvisionsbetrag.Name := 'xdsPositionProvisionsbetrag';\r\n xdsPositionProvisionsbetrag.FieldName := 'Provisionsbetrag';\r\n xdsPositionReferenzKalkulation.SetParentComponent(xdsPosition);\r\n xdsPositionReferenzKalkulation.Name := 'xdsPositionReferenzKalkulation';\r\n xdsPositionReferenzKalkulation.FieldName := 'ReferenzKalkulation';\r\n xdsPositionReferenzKalkulation.Size := 10;\r\n xdsPositionArtikelsprache.SetParentComponent(xdsPosition);\r\n xdsPositionArtikelsprache.Name := 'xdsPositionArtikelsprache';\r\n xdsPositionArtikelsprache.FieldName := 'Artikelsprache';\r\n xdsPositionArtikelsprache.Size := 255;\r\n xdsPositionEKvom.SetParentComponent(xdsPosition);\r\n xdsPositionEKvom.Name := 'xdsPositionEKvom';\r\n xdsPositionEKvom.FieldName := 'EKvom';\r\n xdsPositionMengenberechnungID.SetParentComponent(xdsPosition);\r\n xdsPositionMengenberechnungID.Name := 'xdsPositionMengenberechnungID';\r\n xdsPositionMengenberechnungID.FieldName := 'MengenberechnungID';\r\n xdsPositionMengenberechnungID.Size := 38;\r\n xdsPositionTaraID.SetParentComponent(xdsPosition);\r\n xdsPositionTaraID.Name := 'xdsPositionTaraID';\r\n xdsPositionTaraID.FieldName := 'TaraID';\r\n xdsPositionTaraID.Size := 38;\r\n xdsPositionTara.SetParentComponent(xdsPosition);\r\n xdsPositionTara.Name := 'xdsPositionTara';\r\n xdsPositionTara.FieldName := 'Tara';\r\n xdsPositionBruttoGewicht.SetParentComponent(xdsPosition);\r\n xdsPositionBruttoGewicht.Name := 'xdsPositionBruttoGewicht';\r\n xdsPositionBruttoGewicht.FieldName := 'BruttoGewicht';\r\n xdsPositionAussenflaeche.SetParentComponent(xdsPosition);\r\n xdsPositionAussenflaeche.Name := 'xdsPositionAussenflaeche';\r\n xdsPositionAussenflaeche.FieldName := 'Aussenflaeche';\r\n xdsPositionSeitenumbruch.SetParentComponent(xdsPosition);\r\n xdsPositionSeitenumbruch.Name := 'xdsPositionSeitenumbruch';\r\n xdsPositionSeitenumbruch.FieldName := 'Seitenumbruch';\r\n xdsPositionMWStKey.SetParentComponent(xdsPosition);\r\n xdsPositionMWStKey.Name := 'xdsPositionMWStKey';\r\n xdsPositionMWStKey.FieldName := 'MWStKey';\r\n xdsPositionZSnachPos.SetParentComponent(xdsPosition);\r\n xdsPositionZSnachPos.Name := 'xdsPositionZSnachPos';\r\n xdsPositionZSnachPos.FieldName := 'ZSnachPos';\r\n xdsPositionPreisVorRabattWHG.SetParentComponent(xdsPosition);\r\n xdsPositionPreisVorRabattWHG.Name := 'xdsPositionPreisVorRabattWHG';\r\n xdsPositionPreisVorRabattWHG.FieldName := 'PreisVorRabattWHG';\r\n xdsPositionPKey.SetParentComponent(xdsPosition);\r\n xdsPositionPKey.Name := 'xdsPositionPKey';\r\n xdsPositionPKey.FieldName := 'PKey';\r\n xdsPositionLager.SetParentComponent(xdsPosition);\r\n xdsPositionLager.Name := 'xdsPositionLager';\r\n xdsPositionLager.FieldName := 'Lager';\r\n xdsPositionLager.Size := 50;\r\n xdsPositionlwbID.SetParentComponent(xdsPosition);\r\n xdsPositionlwbID.Name := 'xdsPositionlwbID';\r\n xdsPositionlwbID.FieldName := 'lwbID';\r\n xdsPositionlwbID.Size := 38;\r\n xdsPositionBelegdatum.SetParentComponent(xdsPosition);\r\n xdsPositionBelegdatum.Name := 'xdsPositionBelegdatum';\r\n xdsPositionBelegdatum.FieldName := 'Belegdatum';\r\n xdsPositionVolumen.SetParentComponent(xdsPosition);\r\n xdsPositionVolumen.Name := 'xdsPositionVolumen';\r\n xdsPositionVolumen.FieldName := 'Volumen';\r\n xdsPositionPosVolumen.SetParentComponent(xdsPosition);\r\n xdsPositionPosVolumen.Name := 'xdsPositionPosVolumen';\r\n xdsPositionPosVolumen.FieldName := 'PosVolumen';\r\n xdsPositionArtikelAttribute.SetParentComponent(xdsPosition);\r\n xdsPositionArtikelAttribute.Name := 'xdsPositionArtikelAttribute';\r\n xdsPositionArtikelAttribute.FieldName := 'ArtikelAttribute';\r\n xdsPositionArtikelAttribute.Size := 255;\r\n sourcePosition.SetParentComponent(Self);\r\n sourcePosition.Name := 'sourcePosition';\r\n sourcePosition.DataSet := xdsPosition;\r\n SetEvent(sourcePosition, Self, 'OnStateChange', 'sourcePositionStateChange');\r\n sourcePosition.Left := 29;\r\n sourcePosition.Top := 101;\r\n dsArtikel.SetParentComponent(Self);\r\n dsArtikel.Name := 'dsArtikel';\r\n dsArtikel.AfterOpen := dsArtikelAfterOpen;\r\n dsArtikel.EntitySetName := 'Artikel';\r\n dsArtikel.Connection := DM2.XDataWebConnection1;\r\n dsArtikel.SubpropsDepth := 1;\r\n dsArtikel.QueryTop := 1;\r\n dsArtikel.Left := 156;\r\n dsArtikel.Top := 104;\r\n dsArtikelHersteller.SetParentComponent(dsArtikel);\r\n dsArtikelHersteller.Name := 'dsArtikelHersteller';\r\n dsArtikelHersteller.FieldName := 'Hersteller';\r\n dsArtikelHersteller.Required := True;\r\n dsArtikelArtderMenge.SetParentComponent(dsArtikel);\r\n dsArtikelArtderMenge.Name := 'dsArtikelArtderMenge';\r\n dsArtikelArtderMenge.FieldName := 'ArtderMenge';\r\n dsArtikelArtderMenge.Required := True;\r\n dsArtikelPfandArt.SetParentComponent(dsArtikel);\r\n dsArtikelPfandArt.Name := 'dsArtikelPfandArt';\r\n dsArtikelPfandArt.FieldName := 'PfandArt';\r\n dsArtikelWarengruppe.SetParentComponent(dsArtikel);\r\n dsArtikelWarengruppe.Name := 'dsArtikelWarengruppe';\r\n dsArtikelWarengruppe.FieldName := 'Warengruppe';\r\n dsArtikelWarenuntergruppe.SetParentComponent(dsArtikel);\r\n dsArtikelWarenuntergruppe.Name := 'dsArtikelWarenuntergruppe';\r\n dsArtikelWarenuntergruppe.FieldName := 'Warenuntergruppe';\r\n dsArtikelArtikelnummer.SetParentComponent(dsArtikel);\r\n dsArtikelArtikelnummer.Name := 'dsArtikelArtikelnummer';\r\n dsArtikelArtikelnummer.FieldName := 'Artikelnummer';\r\n dsArtikelArtikelnummer.Required := True;\r\n dsArtikelArtikelnummer.Size := 25;\r\n dsArtikelArtikelueberschrift.SetParentComponent(dsArtikel);\r\n dsArtikelArtikelueberschrift.Name := 'dsArtikelArtikelueberschrift';\r\n dsArtikelArtikelueberschrift.FieldName := 'Artikelueberschrift';\r\n dsArtikelArtikelueberschrift.Size := 50;\r\n dsArtikelArtikelbeschreibung.SetParentComponent(dsArtikel);\r\n dsArtikelArtikelbeschreibung.Name := 'dsArtikelArtikelbeschreibung';\r\n dsArtikelArtikelbeschreibung.FieldName := 'Artikelbeschreibung';\r\n dsArtikelArtikelbeschreibung.Size := 255;\r\n dsArtikelVerkaufspreis.SetParentComponent(dsArtikel);\r\n dsArtikelVerkaufspreis.Name := 'dsArtikelVerkaufspreis';\r\n dsArtikelVerkaufspreis.FieldName := 'Verkaufspreis';\r\n dsArtikelMindestbestand.SetParentComponent(dsArtikel);\r\n dsArtikelMindestbestand.Name := 'dsArtikelMindestbestand';\r\n dsArtikelMindestbestand.FieldName := 'Mindestbestand';\r\n dsArtikelPreisliste.SetParentComponent(dsArtikel);\r\n dsArtikelPreisliste.Name := 'dsArtikelPreisliste';\r\n dsArtikelPreisliste.FieldName := 'Preisliste';\r\n dsArtikelPreisliste.Size := 150;\r\n dsArtikelGewicht.SetParentComponent(dsArtikel);\r\n dsArtikelGewicht.Name := 'dsArtikelGewicht';\r\n dsArtikelGewicht.FieldName := 'Gewicht';\r\n dsArtikelLaenge.SetParentComponent(dsArtikel);\r\n dsArtikelLaenge.Name := 'dsArtikelLaenge';\r\n dsArtikelLaenge.FieldName := 'Laenge';\r\n dsArtikelBreite.SetParentComponent(dsArtikel);\r\n dsArtikelBreite.Name := 'dsArtikelBreite';\r\n dsArtikelBreite.FieldName := 'Breite';\r\n dsArtikelHoehe.SetParentComponent(dsArtikel);\r\n dsArtikelHoehe.Name := 'dsArtikelHoehe';\r\n dsArtikelHoehe.FieldName := 'Hoehe';\r\n dsArtikelArtikelZusatz.SetParentComponent(dsArtikel);\r\n dsArtikelArtikelZusatz.Name := 'dsArtikelArtikelZusatz';\r\n dsArtikelArtikelZusatz.FieldName := 'ArtikelZusatz';\r\n dsArtikelArtikelZusatz.Size := 255;\r\n dsArtikelLagerort.SetParentComponent(dsArtikel);\r\n dsArtikelLagerort.Name := 'dsArtikelLagerort';\r\n dsArtikelLagerort.FieldName := 'Lagerort';\r\n dsArtikelLagerort.Size := 50;\r\n dsArtikelBuchungskonto.SetParentComponent(dsArtikel);\r\n dsArtikelBuchungskonto.Name := 'dsArtikelBuchungskonto';\r\n dsArtikelBuchungskonto.FieldName := 'Buchungskonto';\r\n dsArtikelEingangMenge.SetParentComponent(dsArtikel);\r\n dsArtikelEingangMenge.Name := 'dsArtikelEingangMenge';\r\n dsArtikelEingangMenge.FieldName := 'EingangMenge';\r\n dsArtikelEingangEndpreis.SetParentComponent(dsArtikel);\r\n dsArtikelEingangEndpreis.Name := 'dsArtikelEingangEndpreis';\r\n dsArtikelEingangEndpreis.FieldName := 'EingangEndpreis';\r\n dsArtikelAusgangMenge.SetParentComponent(dsArtikel);\r\n dsArtikelAusgangMenge.Name := 'dsArtikelAusgangMenge';\r\n dsArtikelAusgangMenge.FieldName := 'AusgangMenge';\r\n dsArtikelAusgangEndpreisEK.SetParentComponent(dsArtikel);\r\n dsArtikelAusgangEndpreisEK.Name := 'dsArtikelAusgangEndpreisEK';\r\n dsArtikelAusgangEndpreisEK.FieldName := 'AusgangEndpreisEK';\r\n dsArtikelAusgangEndpreisVK.SetParentComponent(dsArtikel);\r\n dsArtikelAusgangEndpreisVK.Name := 'dsArtikelAusgangEndpreisVK';\r\n dsArtikelAusgangEndpreisVK.FieldName := 'AusgangEndpreisVK';\r\n dsArtikelBestand.SetParentComponent(dsArtikel);\r\n dsArtikelBestand.Name := 'dsArtikelBestand';\r\n dsArtikelBestand.FieldName := 'Bestand';\r\n dsArtikelBestandswert.SetParentComponent(dsArtikel);\r\n dsArtikelBestandswert.Name := 'dsArtikelBestandswert';\r\n dsArtikelBestandswert.FieldName := 'Bestandswert';\r\n dsArtikelMarge.SetParentComponent(dsArtikel);\r\n dsArtikelMarge.Name := 'dsArtikelMarge';\r\n dsArtikelMarge.FieldName := 'Marge';\r\n dsArtikelMargeProzent.SetParentComponent(dsArtikel);\r\n dsArtikelMargeProzent.Name := 'dsArtikelMargeProzent';\r\n dsArtikelMargeProzent.FieldName := 'MargeProzent';\r\n dsArtikelArtikelnummer2.SetParentComponent(dsArtikel);\r\n dsArtikelArtikelnummer2.Name := 'dsArtikelArtikelnummer2';\r\n dsArtikelArtikelnummer2.FieldName := 'Artikelnummer2';\r\n dsArtikelArtikelnummer2.Size := 25;\r\n dsArtikelArtikelmatchcode.SetParentComponent(dsArtikel);\r\n dsArtikelArtikelmatchcode.Name := 'dsArtikelArtikelmatchcode';\r\n dsArtikelArtikelmatchcode.FieldName := 'Artikelmatchcode';\r\n dsArtikelArtikelmatchcode.Size := 30;\r\n dsArtikelRabattpreis1.SetParentComponent(dsArtikel);\r\n dsArtikelRabattpreis1.Name := 'dsArtikelRabattpreis1';\r\n dsArtikelRabattpreis1.FieldName := 'Rabattpreis1';\r\n dsArtikelRabattpreis2.SetParentComponent(dsArtikel);\r\n dsArtikelRabattpreis2.Name := 'dsArtikelRabattpreis2';\r\n dsArtikelRabattpreis2.FieldName := 'Rabattpreis2';\r\n dsArtikelRabattpreis3.SetParentComponent(dsArtikel);\r\n dsArtikelRabattpreis3.Name := 'dsArtikelRabattpreis3';\r\n dsArtikelRabattpreis3.FieldName := 'Rabattpreis3';\r\n dsArtikelRabattpreis4.SetParentComponent(dsArtikel);\r\n dsArtikelRabattpreis4.Name := 'dsArtikelRabattpreis4';\r\n dsArtikelRabattpreis4.FieldName := 'Rabattpreis4';\r\n dsArtikelRabattpreis5.SetParentComponent(dsArtikel);\r\n dsArtikelRabattpreis5.Name := 'dsArtikelRabattpreis5';\r\n dsArtikelRabattpreis5.FieldName := 'Rabattpreis5';\r\n dsArtikelArtikelnichtmehrgueltig.SetParentComponent(dsArtikel);\r\n dsArtikelArtikelnichtmehrgueltig.Name := 'dsArtikelArtikelnichtmehrgueltig';\r\n dsArtikelArtikelnichtmehrgueltig.FieldName := 'Artikelnichtmehrgueltig';\r\n dsArtikelEinkaufspreis.SetParentComponent(dsArtikel);\r\n dsArtikelEinkaufspreis.Name := 'dsArtikelEinkaufspreis';\r\n dsArtikelEinkaufspreis.FieldName := 'Einkaufspreis';\r\n dsArtikelAufschlag.SetParentComponent(dsArtikel);\r\n dsArtikelAufschlag.Name := 'dsArtikelAufschlag';\r\n dsArtikelAufschlag.FieldName := 'Aufschlag';\r\n dsArtikelWarenbestand.SetParentComponent(dsArtikel);\r\n dsArtikelWarenbestand.Name := 'dsArtikelWarenbestand';\r\n dsArtikelWarenbestand.FieldName := 'Warenbestand';\r\n dsArtikelTextfrei10.SetParentComponent(dsArtikel);\r\n dsArtikelTextfrei10.Name := 'dsArtikelTextfrei10';\r\n dsArtikelTextfrei10.FieldName := 'Textfrei10';\r\n dsArtikelTextfrei10.Size := 50;\r\n dsArtikelTextfrei20.SetParentComponent(dsArtikel);\r\n dsArtikelTextfrei20.Name := 'dsArtikelTextfrei20';\r\n dsArtikelTextfrei20.FieldName := 'Textfrei20';\r\n dsArtikelTextfrei20.Size := 50;\r\n dsArtikelArtikelbeschreibungRTF.SetParentComponent(dsArtikel);\r\n dsArtikelArtikelbeschreibungRTF.Name := 'dsArtikelArtikelbeschreibungRTF';\r\n dsArtikelArtikelbeschreibungRTF.FieldName := 'ArtikelbeschreibungRTF';\r\n dsArtikelArtikelbeschreibungRTF.Size := 255;\r\n dsArtikelArtikeldatei1.SetParentComponent(dsArtikel);\r\n dsArtikelArtikeldatei1.Name := 'dsArtikelArtikeldatei1';\r\n dsArtikelArtikeldatei1.FieldName := 'Artikeldatei1';\r\n dsArtikelArtikeldatei1.Size := 255;\r\n dsArtikelArtikeldatei2.SetParentComponent(dsArtikel);\r\n dsArtikelArtikeldatei2.Name := 'dsArtikelArtikeldatei2';\r\n dsArtikelArtikeldatei2.FieldName := 'Artikeldatei2';\r\n dsArtikelArtikeldatei2.Size := 255;\r\n dsArtikelArtikeldatei3.SetParentComponent(dsArtikel);\r\n dsArtikelArtikeldatei3.Name := 'dsArtikelArtikeldatei3';\r\n dsArtikelArtikeldatei3.FieldName := 'Artikeldatei3';\r\n dsArtikelArtikeldatei3.Size := 255;\r\n dsArtikelArtikeldatei4.SetParentComponent(dsArtikel);\r\n dsArtikelArtikeldatei4.Name := 'dsArtikelArtikeldatei4';\r\n dsArtikelArtikeldatei4.FieldName := 'Artikeldatei4';\r\n dsArtikelArtikeldatei4.Size := 255;\r\n dsArtikelArtikeldatei5.SetParentComponent(dsArtikel);\r\n dsArtikelArtikeldatei5.Name := 'dsArtikelArtikeldatei5';\r\n dsArtikelArtikeldatei5.FieldName := 'Artikeldatei5';\r\n dsArtikelArtikeldatei5.Size := 255;\r\n dsArtikelEinkaufspreisVom.SetParentComponent(dsArtikel);\r\n dsArtikelEinkaufspreisVom.Name := 'dsArtikelEinkaufspreisVom';\r\n dsArtikelEinkaufspreisVom.FieldName := 'EinkaufspreisVom';\r\n dsArtikelEAN.SetParentComponent(dsArtikel);\r\n dsArtikelEAN.Name := 'dsArtikelEAN';\r\n dsArtikelEAN.FieldName := 'EAN';\r\n dsArtikelEAN.Size := 15;\r\n dsArtikelVGPFaktor.SetParentComponent(dsArtikel);\r\n dsArtikelVGPFaktor.Name := 'dsArtikelVGPFaktor';\r\n dsArtikelVGPFaktor.FieldName := 'VGPFaktor';\r\n dsArtikelVGPMengenart.SetParentComponent(dsArtikel);\r\n dsArtikelVGPMengenart.Name := 'dsArtikelVGPMengenart';\r\n dsArtikelVGPMengenart.FieldName := 'VGPMengenart';\r\n dsArtikelVGPMengenart.Size := 50;\r\n dsArtikelVerleihpreis.SetParentComponent(dsArtikel);\r\n dsArtikelVerleihpreis.Name := 'dsArtikelVerleihpreis';\r\n dsArtikelVerleihpreis.FieldName := 'Verleihpreis';\r\n dsArtikelZusatzPreis.SetParentComponent(dsArtikel);\r\n dsArtikelZusatzPreis.Name := 'dsArtikelZusatzPreis';\r\n dsArtikelZusatzPreis.FieldName := 'ZusatzPreis';\r\n dsArtikelVerpackungsart.SetParentComponent(dsArtikel);\r\n dsArtikelVerpackungsart.Name := 'dsArtikelVerpackungsart';\r\n dsArtikelVerpackungsart.FieldName := 'Verpackungsart';\r\n dsArtikelVerpackungsart.Size := 50;\r\n dsArtikelVerpackungsMenge.SetParentComponent(dsArtikel);\r\n dsArtikelVerpackungsMenge.Name := 'dsArtikelVerpackungsMenge';\r\n dsArtikelVerpackungsMenge.FieldName := 'VerpackungsMenge';\r\n dsArtikelQuellartikel.SetParentComponent(dsArtikel);\r\n dsArtikelQuellartikel.Name := 'dsArtikelQuellartikel';\r\n dsArtikelQuellartikel.FieldName := 'Quellartikel';\r\n dsArtikelQuellartikel.Size := 25;\r\n dsArtikelrabattierfaehig.SetParentComponent(dsArtikel);\r\n dsArtikelrabattierfaehig.Name := 'dsArtikelrabattierfaehig';\r\n dsArtikelrabattierfaehig.FieldName := 'rabattierfaehig';\r\n dsArtikelAngebotAlternativeAN.SetParentComponent(dsArtikel);\r\n dsArtikelAngebotAlternativeAN.Name := 'dsArtikelAngebotAlternativeAN';\r\n dsArtikelAngebotAlternativeAN.FieldName := 'AngebotAlternativeAN';\r\n dsArtikelAngebotAlternativeAN.Size := 25;\r\n dsArtikelPreisanteilNetto.SetParentComponent(dsArtikel);\r\n dsArtikelPreisanteilNetto.Name := 'dsArtikelPreisanteilNetto';\r\n dsArtikelPreisanteilNetto.FieldName := 'PreisanteilNetto';\r\n dsArtikelFarbe.SetParentComponent(dsArtikel);\r\n dsArtikelFarbe.Name := 'dsArtikelFarbe';\r\n dsArtikelFarbe.FieldName := 'Farbe';\r\n dsArtikelAEinkauf.SetParentComponent(dsArtikel);\r\n dsArtikelAEinkauf.Name := 'dsArtikelAEinkauf';\r\n dsArtikelAEinkauf.FieldName := 'AEinkauf';\r\n dsArtikelAVerkauf.SetParentComponent(dsArtikel);\r\n dsArtikelAVerkauf.Name := 'dsArtikelAVerkauf';\r\n dsArtikelAVerkauf.FieldName := 'AVerkauf';\r\n dsArtikelArtikelnummerLieferant.SetParentComponent(dsArtikel);\r\n dsArtikelArtikelnummerLieferant.Name := 'dsArtikelArtikelnummerLieferant';\r\n dsArtikelArtikelnummerLieferant.FieldName := 'ArtikelnummerLieferant';\r\n dsArtikelLieferantnummer.SetParentComponent(dsArtikel);\r\n dsArtikelLieferantnummer.Name := 'dsArtikelLieferantnummer';\r\n dsArtikelLieferantnummer.FieldName := 'Lieferantnummer';\r\n dsArtikelLieferantnummer.Size := 13;\r\n dsArtikelVerkaufspreisBrutto.SetParentComponent(dsArtikel);\r\n dsArtikelVerkaufspreisBrutto.Name := 'dsArtikelVerkaufspreisBrutto';\r\n dsArtikelVerkaufspreisBrutto.FieldName := 'VerkaufspreisBrutto';\r\n dsArtikelArtikelSet.SetParentComponent(dsArtikel);\r\n dsArtikelArtikelSet.Name := 'dsArtikelArtikelSet';\r\n dsArtikelArtikelSet.FieldName := 'ArtikelSet';\r\n dsArtikelProvisionssatz.SetParentComponent(dsArtikel);\r\n dsArtikelProvisionssatz.Name := 'dsArtikelProvisionssatz';\r\n dsArtikelProvisionssatz.FieldName := 'Provisionssatz';\r\n dsArtikelWarentarifnummer.SetParentComponent(dsArtikel);\r\n dsArtikelWarentarifnummer.Name := 'dsArtikelWarentarifnummer';\r\n dsArtikelWarentarifnummer.FieldName := 'Warentarifnummer';\r\n dsArtikelHandelsartikel.SetParentComponent(dsArtikel);\r\n dsArtikelHandelsartikel.Name := 'dsArtikelHandelsartikel';\r\n dsArtikelHandelsartikel.FieldName := 'Handelsartikel';\r\n dsArtikelUrsprungsland.SetParentComponent(dsArtikel);\r\n dsArtikelUrsprungsland.Name := 'dsArtikelUrsprungsland';\r\n dsArtikelUrsprungsland.FieldName := 'Ursprungsland';\r\n dsArtikelUrsprungsland.Size := 5;\r\n dsArtikelKategorie.SetParentComponent(dsArtikel);\r\n dsArtikelKategorie.Name := 'dsArtikelKategorie';\r\n dsArtikelKategorie.FieldName := 'Kategorie';\r\n dsArtikelKategorie.Size := 25;\r\n dsArtikelStandardRabattsatzEK.SetParentComponent(dsArtikel);\r\n dsArtikelStandardRabattsatzEK.Name := 'dsArtikelStandardRabattsatzEK';\r\n dsArtikelStandardRabattsatzEK.FieldName := 'StandardRabattsatzEK';\r\n dsArtikelStandardRabattsatzVK.SetParentComponent(dsArtikel);\r\n dsArtikelStandardRabattsatzVK.Name := 'dsArtikelStandardRabattsatzVK';\r\n dsArtikelStandardRabattsatzVK.FieldName := 'StandardRabattsatzVK';\r\n dsArtikelRabattpreiseManuell.SetParentComponent(dsArtikel);\r\n dsArtikelRabattpreiseManuell.Name := 'dsArtikelRabattpreiseManuell';\r\n dsArtikelRabattpreiseManuell.FieldName := 'RabattpreiseManuell';\r\n dsArtikelMengeBestellt.SetParentComponent(dsArtikel);\r\n dsArtikelMengeBestellt.Name := 'dsArtikelMengeBestellt';\r\n dsArtikelMengeBestellt.FieldName := 'MengeBestellt';\r\n dsArtikelMengeBeauftragt.SetParentComponent(dsArtikel);\r\n dsArtikelMengeBeauftragt.Name := 'dsArtikelMengeBeauftragt';\r\n dsArtikelMengeBeauftragt.FieldName := 'MengeBeauftragt';\r\n dsArtikelBestandDisponiert.SetParentComponent(dsArtikel);\r\n dsArtikelBestandDisponiert.Name := 'dsArtikelBestandDisponiert';\r\n dsArtikelBestandDisponiert.FieldName := 'BestandDisponiert';\r\n dsArtikelMengeAngeboten.SetParentComponent(dsArtikel);\r\n dsArtikelMengeAngeboten.Name := 'dsArtikelMengeAngeboten';\r\n dsArtikelMengeAngeboten.FieldName := 'MengeAngeboten';\r\n dsArtikelBestandDispInclAngebot.SetParentComponent(dsArtikel);\r\n dsArtikelBestandDispInclAngebot.Name := 'dsArtikelBestandDispInclAngebot';\r\n dsArtikelBestandDispInclAngebot.FieldName := 'BestandDispInclAngebot';\r\n dsArtikelMWStKey.SetParentComponent(dsArtikel);\r\n dsArtikelMWStKey.Name := 'dsArtikelMWStKey';\r\n dsArtikelMWStKey.FieldName := 'MWStKey';\r\n dsArtikelShopAmazon.SetParentComponent(dsArtikel);\r\n dsArtikelShopAmazon.Name := 'dsArtikelShopAmazon';\r\n dsArtikelShopAmazon.FieldName := 'ShopAmazon';\r\n dsArtikelShopQuelle.SetParentComponent(dsArtikel);\r\n dsArtikelShopQuelle.Name := 'dsArtikelShopQuelle';\r\n dsArtikelShopQuelle.FieldName := 'ShopQuelle';\r\n dsArtikelGeraet.SetParentComponent(dsArtikel);\r\n dsArtikelGeraet.Name := 'dsArtikelGeraet';\r\n dsArtikelGeraet.FieldName := 'Geraet';\r\n dsArtikelArtgewicht.SetParentComponent(dsArtikel);\r\n dsArtikelArtgewicht.Name := 'dsArtikelArtgewicht';\r\n dsArtikelArtgewicht.FieldName := 'Artgewicht';\r\n dsArtikelVolumen.SetParentComponent(dsArtikel);\r\n dsArtikelVolumen.Name := 'dsArtikelVolumen';\r\n dsArtikelVolumen.FieldName := 'Volumen';\r\n dsArtikelPacklisteNichtAnzeigen.SetParentComponent(dsArtikel);\r\n dsArtikelPacklisteNichtAnzeigen.Name := 'dsArtikelPacklisteNichtAnzeigen';\r\n dsArtikelPacklisteNichtAnzeigen.FieldName := 'PacklisteNichtAnzeigen';\r\n dsArtikelKeineAufschlagskalkulation.SetParentComponent(dsArtikel);\r\n dsArtikelKeineAufschlagskalkulation.Name := 'dsArtikelKeineAufschlagskalkulation';\r\n dsArtikelKeineAufschlagskalkulation.FieldName := 'KeineAufschlagskalkulation';\r\n dsArtikelKorrekturMenge.SetParentComponent(dsArtikel);\r\n dsArtikelKorrekturMenge.Name := 'dsArtikelKorrekturMenge';\r\n dsArtikelKorrekturMenge.FieldName := 'KorrekturMenge';\r\n dsArtikelKorrekturWert.SetParentComponent(dsArtikel);\r\n dsArtikelKorrekturWert.Name := 'dsArtikelKorrekturWert';\r\n dsArtikelKorrekturWert.FieldName := 'KorrekturWert';\r\n dsArtikelNachfolgeartikel.SetParentComponent(dsArtikel);\r\n dsArtikelNachfolgeartikel.Name := 'dsArtikelNachfolgeartikel';\r\n dsArtikelNachfolgeartikel.FieldName := 'Nachfolgeartikel';\r\n dsArtikelNachfolgeartikel.Size := 25;\r\n dsArtikelMindestbestellmenge.SetParentComponent(dsArtikel);\r\n dsArtikelMindestbestellmenge.Name := 'dsArtikelMindestbestellmenge';\r\n dsArtikelMindestbestellmenge.FieldName := 'Mindestbestellmenge';\r\n dsArtikelSchnittEK.SetParentComponent(dsArtikel);\r\n dsArtikelSchnittEK.Name := 'dsArtikelSchnittEK';\r\n dsArtikelSchnittEK.FieldName := 'SchnittEK';\r\n dsArtikelVerkaufspreisVom.SetParentComponent(dsArtikel);\r\n dsArtikelVerkaufspreisVom.Name := 'dsArtikelVerkaufspreisVom';\r\n dsArtikelVerkaufspreisVom.FieldName := 'VerkaufspreisVom';\r\n dsArtikelPruefungChargeSNR.SetParentComponent(dsArtikel);\r\n dsArtikelPruefungChargeSNR.Name := 'dsArtikelPruefungChargeSNR';\r\n dsArtikelPruefungChargeSNR.FieldName := 'PruefungChargeSNR';\r\n dsArtikelArtikelbeschreibungHTML.SetParentComponent(dsArtikel);\r\n dsArtikelArtikelbeschreibungHTML.Name := 'dsArtikelArtikelbeschreibungHTML';\r\n dsArtikelArtikelbeschreibungHTML.FieldName := 'ArtikelbeschreibungHTML';\r\n dsArtikelArtikelbeschreibungHTML.Size := 255;\r\n dsArtikelProduktKurzbeschreibungHTML.SetParentComponent(dsArtikel);\r\n dsArtikelProduktKurzbeschreibungHTML.Name := 'dsArtikelProduktKurzbeschreibungHTML';\r\n dsArtikelProduktKurzbeschreibungHTML.FieldName := 'ProduktKurzbeschreibungHTML';\r\n dsArtikelProduktKurzbeschreibungHTML.Size := 255;\r\n dsArtikelStatusFuerShop.SetParentComponent(dsArtikel);\r\n dsArtikelStatusFuerShop.Name := 'dsArtikelStatusFuerShop';\r\n dsArtikelStatusFuerShop.FieldName := 'StatusFuerShop';\r\n dsArtikelStatusFuerShop.Size := 25;\r\n dsArtikelAmpelFuerShop.SetParentComponent(dsArtikel);\r\n dsArtikelAmpelFuerShop.Name := 'dsArtikelAmpelFuerShop';\r\n dsArtikelAmpelFuerShop.FieldName := 'AmpelFuerShop';\r\n dsArtikelAmpelFuerShop.Size := 25;\r\n dsArtikelEXP_Anzahl.SetParentComponent(dsArtikel);\r\n dsArtikelEXP_Anzahl.Name := 'dsArtikelEXP_Anzahl';\r\n dsArtikelEXP_Anzahl.FieldName := 'EXP_Anzahl';\r\n dsArtikelEXP_Inhalt.SetParentComponent(dsArtikel);\r\n dsArtikelEXP_Inhalt.Name := 'dsArtikelEXP_Inhalt';\r\n dsArtikelEXP_Inhalt.FieldName := 'EXP_Inhalt';\r\n dsArtikelEXP_Faktor.SetParentComponent(dsArtikel);\r\n dsArtikelEXP_Faktor.Name := 'dsArtikelEXP_Faktor';\r\n dsArtikelEXP_Faktor.FieldName := 'EXP_Faktor';\r\n dsArtikelFach.SetParentComponent(dsArtikel);\r\n dsArtikelFach.Name := 'dsArtikelFach';\r\n dsArtikelFach.FieldName := 'Fach';\r\n dsArtikelExportKasse.SetParentComponent(dsArtikel);\r\n dsArtikelExportKasse.Name := 'dsArtikelExportKasse';\r\n dsArtikelExportKasse.FieldName := 'ExportKasse';\r\n dsArtikelWKNR.SetParentComponent(dsArtikel);\r\n dsArtikelWKNR.Name := 'dsArtikelWKNR';\r\n dsArtikelWKNR.FieldName := 'WKNR';\r\n dsArtikelArtikelAttribute.SetParentComponent(dsArtikel);\r\n dsArtikelArtikelAttribute.Name := 'dsArtikelArtikelAttribute';\r\n dsArtikelArtikelAttribute.FieldName := 'ArtikelAttribute';\r\n dsArtikelArtikelAttribute.Size := 255;\r\n dsArtikelErstelltAm.SetParentComponent(dsArtikel);\r\n dsArtikelErstelltAm.Name := 'dsArtikelErstelltAm';\r\n dsArtikelErstelltAm.FieldName := 'ErstelltAm';\r\n dsArtikelVarianteVonAN.SetParentComponent(dsArtikel);\r\n dsArtikelVarianteVonAN.Name := 'dsArtikelVarianteVonAN';\r\n dsArtikelVarianteVonAN.FieldName := 'VarianteVonAN';\r\n dsArtikelVarianteVonAN.Size := 25;\r\n dsArtikelGurtmassWerte.SetParentComponent(dsArtikel);\r\n dsArtikelGurtmassWerte.Name := 'dsArtikelGurtmassWerte';\r\n dsArtikelGurtmassWerte.FieldName := 'GurtmassWerte';\r\n dsArtikelGurtmassWerte.Size := 250;\r\n dsArtikelGurtmass.SetParentComponent(dsArtikel);\r\n dsArtikelGurtmass.Name := 'dsArtikelGurtmass';\r\n dsArtikelGurtmass.FieldName := 'Gurtmass';\r\n dsArtikelAltersgrenze.SetParentComponent(dsArtikel);\r\n dsArtikelAltersgrenze.Name := 'dsArtikelAltersgrenze';\r\n dsArtikelAltersgrenze.FieldName := 'Altersgrenze';\r\n dsArtikelMWStKeyImHaus.SetParentComponent(dsArtikel);\r\n dsArtikelMWStKeyImHaus.Name := 'dsArtikelMWStKeyImHaus';\r\n dsArtikelMWStKeyImHaus.FieldName := 'MWStKeyImHaus';\r\n dsArtikelKasseBewegung.SetParentComponent(dsArtikel);\r\n dsArtikelKasseBewegung.Name := 'dsArtikelKasseBewegung';\r\n dsArtikelKasseBewegung.FieldName := 'KasseBewegung';\r\n dsArtikelKasseBewegungEK.SetParentComponent(dsArtikel);\r\n dsArtikelKasseBewegungEK.Name := 'dsArtikelKasseBewegungEK';\r\n dsArtikelKasseBewegungEK.FieldName := 'KasseBewegungEK';\r\n dsArtikelKasseBewegungVK.SetParentComponent(dsArtikel);\r\n dsArtikelKasseBewegungVK.Name := 'dsArtikelKasseBewegungVK';\r\n dsArtikelKasseBewegungVK.FieldName := 'KasseBewegungVK';\r\n dsArtikelProduktionBewegung.SetParentComponent(dsArtikel);\r\n dsArtikelProduktionBewegung.Name := 'dsArtikelProduktionBewegung';\r\n dsArtikelProduktionBewegung.FieldName := 'ProduktionBewegung';\r\n dsArtikelProduktionBewegungEK.SetParentComponent(dsArtikel);\r\n dsArtikelProduktionBewegungEK.Name := 'dsArtikelProduktionBewegungEK';\r\n dsArtikelProduktionBewegungEK.FieldName := 'ProduktionBewegungEK';\r\n dsArtikelProduktionBewegungVK.SetParentComponent(dsArtikel);\r\n dsArtikelProduktionBewegungVK.Name := 'dsArtikelProduktionBewegungVK';\r\n dsArtikelProduktionBewegungVK.FieldName := 'ProduktionBewegungVK';\r\n dsArtikelWaWiAB.SetParentComponent(dsArtikel);\r\n dsArtikelWaWiAB.Name := 'dsArtikelWaWiAB';\r\n dsArtikelWaWiAB.FieldName := 'WaWiAB';\r\n dsArtikelGeaendertAm.SetParentComponent(dsArtikel);\r\n dsArtikelGeaendertAm.Name := 'dsArtikelGeaendertAm';\r\n dsArtikelGeaendertAm.FieldName := 'GeaendertAm';\r\n dsArtikelGefahrgutKennzeichen.SetParentComponent(dsArtikel);\r\n dsArtikelGefahrgutKennzeichen.Name := 'dsArtikelGefahrgutKennzeichen';\r\n dsArtikelGefahrgutKennzeichen.FieldName := 'GefahrgutKennzeichen';\r\n dsArtikelGefahrgutKennzeichen.Size := 50;\r\n dsArtikelVerpackG.SetParentComponent(dsArtikel);\r\n dsArtikelVerpackG.Name := 'dsArtikelVerpackG';\r\n dsArtikelVerpackG.FieldName := 'VerpackG';\r\n dsArtikelUPE.SetParentComponent(dsArtikel);\r\n dsArtikelUPE.Name := 'dsArtikelUPE';\r\n dsArtikelUPE.FieldName := 'UPE';\r\n dsArtikelArtikelbeschreibungEinkauf.SetParentComponent(dsArtikel);\r\n dsArtikelArtikelbeschreibungEinkauf.Name := 'dsArtikelArtikelbeschreibungEinkauf';\r\n dsArtikelArtikelbeschreibungEinkauf.FieldName := 'ArtikelbeschreibungEinkauf';\r\n dsArtikelArtikelbeschreibungEinkauf.Size := 255;\r\n dsArtikelHerstellerArtikelnummer.SetParentComponent(dsArtikel);\r\n dsArtikelHerstellerArtikelnummer.Name := 'dsArtikelHerstellerArtikelnummer';\r\n dsArtikelHerstellerArtikelnummer.FieldName := 'HerstellerArtikelnummer';\r\n dsArtikelHerstellerArtikelnummer.Size := 25;\r\n dsArtikelNatura.SetParentComponent(dsArtikel);\r\n dsArtikelNatura.Name := 'dsArtikelNatura';\r\n dsArtikelNatura.FieldName := 'Natura';\r\n dsArtikelNatura.Size := 2;\r\n dsArtikelArbeitszeit.SetParentComponent(dsArtikel);\r\n dsArtikelArbeitszeit.Name := 'dsArtikelArbeitszeit';\r\n dsArtikelArbeitszeit.FieldName := 'Arbeitszeit';\r\n dsArtikelArtderMengeArtderMenge.SetParentComponent(dsArtikel);\r\n dsArtikelArtderMengeArtderMenge.Name := 'dsArtikelArtderMengeArtderMenge';\r\n dsArtikelArtderMengeArtderMenge.FieldName := 'ArtderMenge.ArtderMenge';\r\n dsArtikelArtderMengeArtderMenge.Size := 50;\r\n xdsKundenpreise.SetParentComponent(Self);\r\n xdsKundenpreise.Name := 'xdsKundenpreise';\r\n xdsKundenpreise.AfterOpen := xdsKundenpreiseAfterOpen;\r\n xdsKundenpreise.EntitySetName := 'ArtikelKundenpreise';\r\n xdsKundenpreise.Connection := DM2.XDataWebConnection1;\r\n xdsKundenpreise.SubpropsDepth := 1;\r\n xdsKundenpreise.QueryString := '$expand=Artikelnummer';\r\n xdsKundenpreise.Left := 151;\r\n xdsKundenpreise.Top := 174;\r\n xdsKundenpreiseArtikelnummer.SetParentComponent(xdsKundenpreise);\r\n xdsKundenpreiseArtikelnummer.Name := 'xdsKundenpreiseArtikelnummer';\r\n xdsKundenpreiseArtikelnummer.FieldName := 'Artikelnummer';\r\n xdsKundenpreiseArtikelnummer.Required := True;\r\n xdsKundenpreiseKundennummer.SetParentComponent(xdsKundenpreise);\r\n xdsKundenpreiseKundennummer.Name := 'xdsKundenpreiseKundennummer';\r\n xdsKundenpreiseKundennummer.FieldName := 'Kundennummer';\r\n xdsKundenpreiseKundennummer.Required := True;\r\n xdsKundenpreiseVerkaufspreis.SetParentComponent(xdsKundenpreise);\r\n xdsKundenpreiseVerkaufspreis.Name := 'xdsKundenpreiseVerkaufspreis';\r\n xdsKundenpreiseVerkaufspreis.FieldName := 'Verkaufspreis';\r\n xdsKundenpreiseNachname.SetParentComponent(xdsKundenpreise);\r\n xdsKundenpreiseNachname.Name := 'xdsKundenpreiseNachname';\r\n xdsKundenpreiseNachname.FieldName := 'Nachname';\r\n xdsKundenpreiseNachname.Size := 40;\r\n xdsKundenpreiseRabattsatz.SetParentComponent(xdsKundenpreise);\r\n xdsKundenpreiseRabattsatz.Name := 'xdsKundenpreiseRabattsatz';\r\n xdsKundenpreiseRabattsatz.FieldName := 'Rabattsatz';\r\n xdsKundenpreiseVerleihpreis.SetParentComponent(xdsKundenpreise);\r\n xdsKundenpreiseVerleihpreis.Name := 'xdsKundenpreiseVerleihpreis';\r\n xdsKundenpreiseVerleihpreis.FieldName := 'Verleihpreis';\r\n xdsKundenpreiseZusatzPreis.SetParentComponent(xdsKundenpreise);\r\n xdsKundenpreiseZusatzPreis.Name := 'xdsKundenpreiseZusatzPreis';\r\n xdsKundenpreiseZusatzPreis.FieldName := 'ZusatzPreis';\r\n xdsKundenpreiseArtikelnummerKunde.SetParentComponent(xdsKundenpreise);\r\n xdsKundenpreiseArtikelnummerKunde.Name := 'xdsKundenpreiseArtikelnummerKunde';\r\n xdsKundenpreiseArtikelnummerKunde.FieldName := 'ArtikelnummerKunde';\r\n xdsKundenpreiseArtikelnummerKunde.Size := 25;\r\n xdsKundenpreiseDatumGeaendert.SetParentComponent(xdsKundenpreise);\r\n xdsKundenpreiseDatumGeaendert.Name := 'xdsKundenpreiseDatumGeaendert';\r\n xdsKundenpreiseDatumGeaendert.FieldName := 'DatumGeaendert';\r\n xdsKundenpreiseArtikelueberschrift.SetParentComponent(xdsKundenpreise);\r\n xdsKundenpreiseArtikelueberschrift.Name := 'xdsKundenpreiseArtikelueberschrift';\r\n xdsKundenpreiseArtikelueberschrift.FieldName := 'Artikelueberschrift';\r\n xdsKundenpreiseArtikelueberschrift.Size := 50;\r\n xdsKundenpreiseArtikelnummerArtikelnummer.SetParentComponent(xdsKundenpreise);\r\n xdsKundenpreiseArtikelnummerArtikelnummer.Name := 'xdsKundenpreiseArtikelnummerArtikelnummer';\r\n xdsKundenpreiseArtikelnummerArtikelnummer.FieldName := 'Artikelnummer.Artikelnummer';\r\n xdsKundenpreiseArtikelnummerArtikelnummer.Size := 25;\r\n xdsKundenpreiseArtikelnummerArtikelueberschrift.SetParentComponent(xdsKundenpreise);\r\n xdsKundenpreiseArtikelnummerArtikelueberschrift.Name := 'xdsKundenpreiseArtikelnummerArtikelueberschrift';\r\n xdsKundenpreiseArtikelnummerArtikelueberschrift.FieldName := 'Artikelnummer.Artikelueberschrift';\r\n xdsKundenpreiseArtikelnummerArtikelueberschrift.Size := 50;\r\n xdsKundenpreiseArtikelnummerArtikelbeschreibung.SetParentComponent(xdsKundenpreise);\r\n xdsKundenpreiseArtikelnummerArtikelbeschreibung.Name := 'xdsKundenpreiseArtikelnummerArtikelbeschreibung';\r\n xdsKundenpreiseArtikelnummerArtikelbeschreibung.FieldName := 'Artikelnummer.Artikelbeschreibung';\r\n xdsKundenpreiseArtikelnummerArtikelbeschreibung.Size := 255;\r\n dsBeleg2.SetParentComponent(Self);\r\n dsBeleg2.Name := 'dsBeleg2';\r\n dsBeleg2.AfterOpen := dsBeleg2AfterOpen;\r\n dsBeleg2.EntitySetName := 'Angebote';\r\n dsBeleg2.Connection := DM2.XDataWebConnection1;\r\n dsBeleg2.SubpropsDepth := 1;\r\n dsBeleg2.QueryString := '$expand=Kundennummer';\r\n dsBeleg2.Left := 152;\r\n dsBeleg2.Top := 240;\r\n dsBeleg2Kundennummer.SetParentComponent(dsBeleg2);\r\n dsBeleg2Kundennummer.Name := 'dsBeleg2Kundennummer';\r\n dsBeleg2Kundennummer.FieldName := 'Kundennummer';\r\n dsBeleg2Kundennummer.Required := True;\r\n dsBeleg2Nummerkomplett.SetParentComponent(dsBeleg2);\r\n dsBeleg2Nummerkomplett.Name := 'dsBeleg2Nummerkomplett';\r\n dsBeleg2Nummerkomplett.FieldName := 'Nummerkomplett';\r\n dsBeleg2Nummerkomplett.Required := True;\r\n dsBeleg2Nummerkomplett.Size := 10;\r\n dsBeleg2ReferenzAngebot.SetParentComponent(dsBeleg2);\r\n dsBeleg2ReferenzAngebot.Name := 'dsBeleg2ReferenzAngebot';\r\n dsBeleg2ReferenzAngebot.FieldName := 'ReferenzAngebot';\r\n dsBeleg2ReferenzAngebot.Size := 10;\r\n dsBeleg2ReferenzLieferschein.SetParentComponent(dsBeleg2);\r\n dsBeleg2ReferenzLieferschein.Name := 'dsBeleg2ReferenzLieferschein';\r\n dsBeleg2ReferenzLieferschein.FieldName := 'ReferenzLieferschein';\r\n dsBeleg2ReferenzLieferschein.Size := 10;\r\n dsBeleg2ReferenzRechnung.SetParentComponent(dsBeleg2);\r\n dsBeleg2ReferenzRechnung.Name := 'dsBeleg2ReferenzRechnung';\r\n dsBeleg2ReferenzRechnung.FieldName := 'ReferenzRechnung';\r\n dsBeleg2ReferenzRechnung.Size := 10;\r\n dsBeleg2Datum.SetParentComponent(dsBeleg2);\r\n dsBeleg2Datum.Name := 'dsBeleg2Datum';\r\n dsBeleg2Datum.FieldName := 'Datum';\r\n dsBeleg2Datum.Required := True;\r\n dsBeleg2Jahr.SetParentComponent(dsBeleg2);\r\n dsBeleg2Jahr.Name := 'dsBeleg2Jahr';\r\n dsBeleg2Jahr.FieldName := 'Jahr';\r\n dsBeleg2Kalenderwoche.SetParentComponent(dsBeleg2);\r\n dsBeleg2Kalenderwoche.Name := 'dsBeleg2Kalenderwoche';\r\n dsBeleg2Kalenderwoche.FieldName := 'Kalenderwoche';\r\n dsBeleg2Nachname.SetParentComponent(dsBeleg2);\r\n dsBeleg2Nachname.Name := 'dsBeleg2Nachname';\r\n dsBeleg2Nachname.FieldName := 'Nachname';\r\n dsBeleg2Nachname.Size := 50;\r\n dsBeleg2Vorname.SetParentComponent(dsBeleg2);\r\n dsBeleg2Vorname.Name := 'dsBeleg2Vorname';\r\n dsBeleg2Vorname.FieldName := 'Vorname';\r\n dsBeleg2Vorname.Size := 50;\r\n dsBeleg2Postleitzahl.SetParentComponent(dsBeleg2);\r\n dsBeleg2Postleitzahl.Name := 'dsBeleg2Postleitzahl';\r\n dsBeleg2Postleitzahl.FieldName := 'Postleitzahl';\r\n dsBeleg2Postleitzahl.Size := 10;\r\n dsBeleg2Ort.SetParentComponent(dsBeleg2);\r\n dsBeleg2Ort.Name := 'dsBeleg2Ort';\r\n dsBeleg2Ort.FieldName := 'Ort';\r\n dsBeleg2Ort.Size := 50;\r\n dsBeleg2Laenderkuerzel.SetParentComponent(dsBeleg2);\r\n dsBeleg2Laenderkuerzel.Name := 'dsBeleg2Laenderkuerzel';\r\n dsBeleg2Laenderkuerzel.FieldName := 'Laenderkuerzel';\r\n dsBeleg2Laenderkuerzel.Size := 5;\r\n dsBeleg2Land.SetParentComponent(dsBeleg2);\r\n dsBeleg2Land.Name := 'dsBeleg2Land';\r\n dsBeleg2Land.FieldName := 'Land';\r\n dsBeleg2Land.Size := 50;\r\n dsBeleg2Briefanrede1.SetParentComponent(dsBeleg2);\r\n dsBeleg2Briefanrede1.Name := 'dsBeleg2Briefanrede1';\r\n dsBeleg2Briefanrede1.FieldName := 'Briefanrede1';\r\n dsBeleg2Briefanrede1.Size := 255;\r\n dsBeleg2Briefanrede2.SetParentComponent(dsBeleg2);\r\n dsBeleg2Briefanrede2.Name := 'dsBeleg2Briefanrede2';\r\n dsBeleg2Briefanrede2.FieldName := 'Briefanrede2';\r\n dsBeleg2Briefanrede2.Size := 40;\r\n dsBeleg2EMail.SetParentComponent(dsBeleg2);\r\n dsBeleg2EMail.Name := 'dsBeleg2EMail';\r\n dsBeleg2EMail.FieldName := 'EMail';\r\n dsBeleg2EMail.Size := 50;\r\n dsBeleg2AdresseBild.SetParentComponent(dsBeleg2);\r\n dsBeleg2AdresseBild.Name := 'dsBeleg2AdresseBild';\r\n dsBeleg2AdresseBild.FieldName := 'AdresseBild';\r\n dsBeleg2AdresseBild.Size := 255;\r\n dsBeleg2LieferanschriftBild.SetParentComponent(dsBeleg2);\r\n dsBeleg2LieferanschriftBild.Name := 'dsBeleg2LieferanschriftBild';\r\n dsBeleg2LieferanschriftBild.FieldName := 'LieferanschriftBild';\r\n dsBeleg2LieferanschriftBild.Size := 255;\r\n dsBeleg2Zahlungsbedingung.SetParentComponent(dsBeleg2);\r\n dsBeleg2Zahlungsbedingung.Name := 'dsBeleg2Zahlungsbedingung';\r\n dsBeleg2Zahlungsbedingung.FieldName := 'Zahlungsbedingung';\r\n dsBeleg2ZahlungsbedingungText.SetParentComponent(dsBeleg2);\r\n dsBeleg2ZahlungsbedingungText.Name := 'dsBeleg2ZahlungsbedingungText';\r\n dsBeleg2ZahlungsbedingungText.FieldName := 'ZahlungsbedingungText';\r\n dsBeleg2ZahlungsbedingungText.Size := 250;\r\n dsBeleg2Auftragsbezeichnung.SetParentComponent(dsBeleg2);\r\n dsBeleg2Auftragsbezeichnung.Name := 'dsBeleg2Auftragsbezeichnung';\r\n dsBeleg2Auftragsbezeichnung.FieldName := 'Auftragsbezeichnung';\r\n dsBeleg2Auftragsbezeichnung.Size := 255;\r\n dsBeleg2AuftragnummerKunde.SetParentComponent(dsBeleg2);\r\n dsBeleg2AuftragnummerKunde.Name := 'dsBeleg2AuftragnummerKunde';\r\n dsBeleg2AuftragnummerKunde.FieldName := 'AuftragnummerKunde';\r\n dsBeleg2AuftragnummerKunde.Size := 50;\r\n dsBeleg2BestelldatumKunde.SetParentComponent(dsBeleg2);\r\n dsBeleg2BestelldatumKunde.Name := 'dsBeleg2BestelldatumKunde';\r\n dsBeleg2BestelldatumKunde.FieldName := 'BestelldatumKunde';\r\n dsBeleg2ILN.SetParentComponent(dsBeleg2);\r\n dsBeleg2ILN.Name := 'dsBeleg2ILN';\r\n dsBeleg2ILN.FieldName := 'ILN';\r\n dsBeleg2ILN.Size := 50;\r\n dsBeleg2Kopftext.SetParentComponent(dsBeleg2);\r\n dsBeleg2Kopftext.Name := 'dsBeleg2Kopftext';\r\n dsBeleg2Kopftext.FieldName := 'Kopftext';\r\n dsBeleg2Kopftext.Size := 255;\r\n dsBeleg2Schlussbemerkung.SetParentComponent(dsBeleg2);\r\n dsBeleg2Schlussbemerkung.Name := 'dsBeleg2Schlussbemerkung';\r\n dsBeleg2Schlussbemerkung.FieldName := 'Schlussbemerkung';\r\n dsBeleg2Schlussbemerkung.Size := 255;\r\n dsBeleg2Gruss.SetParentComponent(dsBeleg2);\r\n dsBeleg2Gruss.Name := 'dsBeleg2Gruss';\r\n dsBeleg2Gruss.FieldName := 'Gruss';\r\n dsBeleg2Gruss.Size := 255;\r\n dsBeleg2Mehrwertsteuersatz1.SetParentComponent(dsBeleg2);\r\n dsBeleg2Mehrwertsteuersatz1.Name := 'dsBeleg2Mehrwertsteuersatz1';\r\n dsBeleg2Mehrwertsteuersatz1.FieldName := 'Mehrwertsteuersatz1';\r\n dsBeleg2Mehrwertsteuersatz2.SetParentComponent(dsBeleg2);\r\n dsBeleg2Mehrwertsteuersatz2.Name := 'dsBeleg2Mehrwertsteuersatz2';\r\n dsBeleg2Mehrwertsteuersatz2.FieldName := 'Mehrwertsteuersatz2';\r\n dsBeleg2Nettosumme01.SetParentComponent(dsBeleg2);\r\n dsBeleg2Nettosumme01.Name := 'dsBeleg2Nettosumme01';\r\n dsBeleg2Nettosumme01.FieldName := 'Nettosumme01';\r\n dsBeleg2Nettosumme02.SetParentComponent(dsBeleg2);\r\n dsBeleg2Nettosumme02.Name := 'dsBeleg2Nettosumme02';\r\n dsBeleg2Nettosumme02.FieldName := 'Nettosumme02';\r\n dsBeleg2Nettosumme.SetParentComponent(dsBeleg2);\r\n dsBeleg2Nettosumme.Name := 'dsBeleg2Nettosumme';\r\n dsBeleg2Nettosumme.FieldName := 'Nettosumme';\r\n dsBeleg2Mehrwertsteuer01.SetParentComponent(dsBeleg2);\r\n dsBeleg2Mehrwertsteuer01.Name := 'dsBeleg2Mehrwertsteuer01';\r\n dsBeleg2Mehrwertsteuer01.FieldName := 'Mehrwertsteuer01';\r\n dsBeleg2Mehrwertsteuer02.SetParentComponent(dsBeleg2);\r\n dsBeleg2Mehrwertsteuer02.Name := 'dsBeleg2Mehrwertsteuer02';\r\n dsBeleg2Mehrwertsteuer02.FieldName := 'Mehrwertsteuer02';\r\n dsBeleg2Mehrwertsteuer.SetParentComponent(dsBeleg2);\r\n dsBeleg2Mehrwertsteuer.Name := 'dsBeleg2Mehrwertsteuer';\r\n dsBeleg2Mehrwertsteuer.FieldName := 'Mehrwertsteuer';\r\n dsBeleg2Bruttosumme.SetParentComponent(dsBeleg2);\r\n dsBeleg2Bruttosumme.Name := 'dsBeleg2Bruttosumme';\r\n dsBeleg2Bruttosumme.FieldName := 'Bruttosumme';\r\n dsBeleg2Versanddatum.SetParentComponent(dsBeleg2);\r\n dsBeleg2Versanddatum.Name := 'dsBeleg2Versanddatum';\r\n dsBeleg2Versanddatum.FieldName := 'Versanddatum';\r\n dsBeleg2Skontosatz.SetParentComponent(dsBeleg2);\r\n dsBeleg2Skontosatz.Name := 'dsBeleg2Skontosatz';\r\n dsBeleg2Skontosatz.FieldName := 'Skontosatz';\r\n dsBeleg2NettosummeEK.SetParentComponent(dsBeleg2);\r\n dsBeleg2NettosummeEK.Name := 'dsBeleg2NettosummeEK';\r\n dsBeleg2NettosummeEK.FieldName := 'NettosummeEK';\r\n dsBeleg2NettoMarge.SetParentComponent(dsBeleg2);\r\n dsBeleg2NettoMarge.Name := 'dsBeleg2NettoMarge';\r\n dsBeleg2NettoMarge.FieldName := 'NettoMarge';\r\n dsBeleg2Schreibzeichen.SetParentComponent(dsBeleg2);\r\n dsBeleg2Schreibzeichen.Name := 'dsBeleg2Schreibzeichen';\r\n dsBeleg2Schreibzeichen.FieldName := 'Schreibzeichen';\r\n dsBeleg2Schreibzeichen.Size := 10;\r\n dsBeleg2Unterzeichner.SetParentComponent(dsBeleg2);\r\n dsBeleg2Unterzeichner.Name := 'dsBeleg2Unterzeichner';\r\n dsBeleg2Unterzeichner.FieldName := 'Unterzeichner';\r\n dsBeleg2Unterzeichner.Size := 50;\r\n dsBeleg2TelefonMA.SetParentComponent(dsBeleg2);\r\n dsBeleg2TelefonMA.Name := 'dsBeleg2TelefonMA';\r\n dsBeleg2TelefonMA.FieldName := 'TelefonMA';\r\n dsBeleg2TelefonMA.Size := 30;\r\n dsBeleg2EmailMA.SetParentComponent(dsBeleg2);\r\n dsBeleg2EmailMA.Name := 'dsBeleg2EmailMA';\r\n dsBeleg2EmailMA.FieldName := 'EmailMA';\r\n dsBeleg2EmailMA.Size := 50;\r\n dsBeleg2USTID.SetParentComponent(dsBeleg2);\r\n dsBeleg2USTID.Name := 'dsBeleg2USTID';\r\n dsBeleg2USTID.FieldName := 'USTID';\r\n dsBeleg2Umsatzsteuerausweis.SetParentComponent(dsBeleg2);\r\n dsBeleg2Umsatzsteuerausweis.Name := 'dsBeleg2Umsatzsteuerausweis';\r\n dsBeleg2Umsatzsteuerausweis.FieldName := 'Umsatzsteuerausweis';\r\n dsBeleg2gebucht.SetParentComponent(dsBeleg2);\r\n dsBeleg2gebucht.Name := 'dsBeleg2gebucht';\r\n dsBeleg2gebucht.FieldName := 'gebucht';\r\n dsBeleg2Lieferdatum.SetParentComponent(dsBeleg2);\r\n dsBeleg2Lieferdatum.Name := 'dsBeleg2Lieferdatum';\r\n dsBeleg2Lieferdatum.FieldName := 'Lieferdatum';\r\n dsBeleg2Transportbedingung.SetParentComponent(dsBeleg2);\r\n dsBeleg2Transportbedingung.Name := 'dsBeleg2Transportbedingung';\r\n dsBeleg2Transportbedingung.FieldName := 'Transportbedingung';\r\n dsBeleg2Transportbedingung.Size := 100;\r\n dsBeleg2Mehrwertsteuersatz3.SetParentComponent(dsBeleg2);\r\n dsBeleg2Mehrwertsteuersatz3.Name := 'dsBeleg2Mehrwertsteuersatz3';\r\n dsBeleg2Mehrwertsteuersatz3.FieldName := 'Mehrwertsteuersatz3';\r\n dsBeleg2Mehrwertsteuer03.SetParentComponent(dsBeleg2);\r\n dsBeleg2Mehrwertsteuer03.Name := 'dsBeleg2Mehrwertsteuer03';\r\n dsBeleg2Mehrwertsteuer03.FieldName := 'Mehrwertsteuer03';\r\n dsBeleg2Nettosumme03.SetParentComponent(dsBeleg2);\r\n dsBeleg2Nettosumme03.Name := 'dsBeleg2Nettosumme03';\r\n dsBeleg2Nettosumme03.FieldName := 'Nettosumme03';\r\n dsBeleg2RundungsDifferenz.SetParentComponent(dsBeleg2);\r\n dsBeleg2RundungsDifferenz.Name := 'dsBeleg2RundungsDifferenz';\r\n dsBeleg2RundungsDifferenz.FieldName := 'RundungsDifferenz';\r\n dsBeleg2EmailText.SetParentComponent(dsBeleg2);\r\n dsBeleg2EmailText.Name := 'dsBeleg2EmailText';\r\n dsBeleg2EmailText.FieldName := 'EmailText';\r\n dsBeleg2EmailText.Size := 255;\r\n dsBeleg2Auftragerledigt.SetParentComponent(dsBeleg2);\r\n dsBeleg2Auftragerledigt.Name := 'dsBeleg2Auftragerledigt';\r\n dsBeleg2Auftragerledigt.FieldName := 'Auftragerledigt';\r\n dsBeleg2Rabattstufe.SetParentComponent(dsBeleg2);\r\n dsBeleg2Rabattstufe.Name := 'dsBeleg2Rabattstufe';\r\n dsBeleg2Rabattstufe.FieldName := 'Rabattstufe';\r\n dsBeleg2Rabattstufe.Size := 15;\r\n dsBeleg2KFZKennzeichen.SetParentComponent(dsBeleg2);\r\n dsBeleg2KFZKennzeichen.Name := 'dsBeleg2KFZKennzeichen';\r\n dsBeleg2KFZKennzeichen.FieldName := 'KFZKennzeichen';\r\n dsBeleg2KFZKennzeichen.Size := 13;\r\n dsBeleg2Fahrgestellnummer.SetParentComponent(dsBeleg2);\r\n dsBeleg2Fahrgestellnummer.Name := 'dsBeleg2Fahrgestellnummer';\r\n dsBeleg2Fahrgestellnummer.FieldName := 'Fahrgestellnummer';\r\n dsBeleg2KFZHersteller.SetParentComponent(dsBeleg2);\r\n dsBeleg2KFZHersteller.Name := 'dsBeleg2KFZHersteller';\r\n dsBeleg2KFZHersteller.FieldName := 'KFZHersteller';\r\n dsBeleg2Erstzulassungsdatum.SetParentComponent(dsBeleg2);\r\n dsBeleg2Erstzulassungsdatum.Name := 'dsBeleg2Erstzulassungsdatum';\r\n dsBeleg2Erstzulassungsdatum.FieldName := 'Erstzulassungsdatum';\r\n dsBeleg2KMStand.SetParentComponent(dsBeleg2);\r\n dsBeleg2KMStand.Name := 'dsBeleg2KMStand';\r\n dsBeleg2KMStand.FieldName := 'KMStand';\r\n dsBeleg2KMStand.Size := 6;\r\n dsBeleg2KFZType.SetParentComponent(dsBeleg2);\r\n dsBeleg2KFZType.Name := 'dsBeleg2KFZType';\r\n dsBeleg2KFZType.FieldName := 'KFZType';\r\n dsBeleg2KFZType.Size := 25;\r\n dsBeleg2Inspektionsdatum.SetParentComponent(dsBeleg2);\r\n dsBeleg2Inspektionsdatum.Name := 'dsBeleg2Inspektionsdatum';\r\n dsBeleg2Inspektionsdatum.FieldName := 'Inspektionsdatum';\r\n dsBeleg2Debitorennummer.SetParentComponent(dsBeleg2);\r\n dsBeleg2Debitorennummer.Name := 'dsBeleg2Debitorennummer';\r\n dsBeleg2Debitorennummer.FieldName := 'Debitorennummer';\r\n dsBeleg2Debitorennummer.Size := 13;\r\n dsBeleg2Kostentraeger.SetParentComponent(dsBeleg2);\r\n dsBeleg2Kostentraeger.Name := 'dsBeleg2Kostentraeger';\r\n dsBeleg2Kostentraeger.FieldName := 'Kostentraeger';\r\n dsBeleg2Kostentraeger.Size := 13;\r\n dsBeleg2Rabattsatz.SetParentComponent(dsBeleg2);\r\n dsBeleg2Rabattsatz.Name := 'dsBeleg2Rabattsatz';\r\n dsBeleg2Rabattsatz.FieldName := 'Rabattsatz';\r\n dsBeleg2ObjektReferenz.SetParentComponent(dsBeleg2);\r\n dsBeleg2ObjektReferenz.Name := 'dsBeleg2ObjektReferenz';\r\n dsBeleg2ObjektReferenz.FieldName := 'ObjektReferenz';\r\n dsBeleg2ObjektReferenz.Size := 13;\r\n dsBeleg2Bank.SetParentComponent(dsBeleg2);\r\n dsBeleg2Bank.Name := 'dsBeleg2Bank';\r\n dsBeleg2Bank.FieldName := 'Bank';\r\n dsBeleg2Bank.Size := 50;\r\n dsBeleg2Bankleitzahl.SetParentComponent(dsBeleg2);\r\n dsBeleg2Bankleitzahl.Name := 'dsBeleg2Bankleitzahl';\r\n dsBeleg2Bankleitzahl.FieldName := 'Bankleitzahl';\r\n dsBeleg2Kontonummer.SetParentComponent(dsBeleg2);\r\n dsBeleg2Kontonummer.Name := 'dsBeleg2Kontonummer';\r\n dsBeleg2Kontonummer.FieldName := 'Kontonummer';\r\n dsBeleg2Kontonummer.Size := 50;\r\n dsBeleg2Kontoinhaber.SetParentComponent(dsBeleg2);\r\n dsBeleg2Kontoinhaber.Name := 'dsBeleg2Kontoinhaber';\r\n dsBeleg2Kontoinhaber.FieldName := 'Kontoinhaber';\r\n dsBeleg2Kontoinhaber.Size := 50;\r\n dsBeleg2Telefaxnummer.SetParentComponent(dsBeleg2);\r\n dsBeleg2Telefaxnummer.Name := 'dsBeleg2Telefaxnummer';\r\n dsBeleg2Telefaxnummer.FieldName := 'Telefaxnummer';\r\n dsBeleg2Telefaxnummer.Size := 25;\r\n dsBeleg2DatumNeu.SetParentComponent(dsBeleg2);\r\n dsBeleg2DatumNeu.Name := 'dsBeleg2DatumNeu';\r\n dsBeleg2DatumNeu.FieldName := 'DatumNeu';\r\n dsBeleg2Datumgeaendert.SetParentComponent(dsBeleg2);\r\n dsBeleg2Datumgeaendert.Name := 'dsBeleg2Datumgeaendert';\r\n dsBeleg2Datumgeaendert.FieldName := 'Datumgeaendert';\r\n dsBeleg2Objektnummer.SetParentComponent(dsBeleg2);\r\n dsBeleg2Objektnummer.Name := 'dsBeleg2Objektnummer';\r\n dsBeleg2Objektnummer.FieldName := 'Objektnummer';\r\n dsBeleg2Objektnummer.Size := 25;\r\n dsBeleg2Liefertermin.SetParentComponent(dsBeleg2);\r\n dsBeleg2Liefertermin.Name := 'dsBeleg2Liefertermin';\r\n dsBeleg2Liefertermin.FieldName := 'Liefertermin';\r\n dsBeleg2Liefertermin.Size := 50;\r\n dsBeleg2Emailversand.SetParentComponent(dsBeleg2);\r\n dsBeleg2Emailversand.Name := 'dsBeleg2Emailversand';\r\n dsBeleg2Emailversand.FieldName := 'Emailversand';\r\n dsBeleg2Telefonnummer.SetParentComponent(dsBeleg2);\r\n dsBeleg2Telefonnummer.Name := 'dsBeleg2Telefonnummer';\r\n dsBeleg2Telefonnummer.FieldName := 'Telefonnummer';\r\n dsBeleg2Telefonnummer.Size := 35;\r\n dsBeleg2MobilTelefon.SetParentComponent(dsBeleg2);\r\n dsBeleg2MobilTelefon.Name := 'dsBeleg2MobilTelefon';\r\n dsBeleg2MobilTelefon.FieldName := 'MobilTelefon';\r\n dsBeleg2MobilTelefon.Size := 25;\r\n dsBeleg2AuftragFax.SetParentComponent(dsBeleg2);\r\n dsBeleg2AuftragFax.Name := 'dsBeleg2AuftragFax';\r\n dsBeleg2AuftragFax.FieldName := 'AuftragFax';\r\n dsBeleg2REDatum.SetParentComponent(dsBeleg2);\r\n dsBeleg2REDatum.Name := 'dsBeleg2REDatum';\r\n dsBeleg2REDatum.FieldName := 'REDatum';\r\n dsBeleg2BenutzerNeu.SetParentComponent(dsBeleg2);\r\n dsBeleg2BenutzerNeu.Name := 'dsBeleg2BenutzerNeu';\r\n dsBeleg2BenutzerNeu.FieldName := 'BenutzerNeu';\r\n dsBeleg2BenutzerNeu.Size := 50;\r\n dsBeleg2BenutzerGeaendert.SetParentComponent(dsBeleg2);\r\n dsBeleg2BenutzerGeaendert.Name := 'dsBeleg2BenutzerGeaendert';\r\n dsBeleg2BenutzerGeaendert.FieldName := 'BenutzerGeaendert';\r\n dsBeleg2BenutzerGeaendert.Size := 50;\r\n dsBeleg2BerechnungBrutto.SetParentComponent(dsBeleg2);\r\n dsBeleg2BerechnungBrutto.Name := 'dsBeleg2BerechnungBrutto';\r\n dsBeleg2BerechnungBrutto.FieldName := 'BerechnungBrutto';\r\n dsBeleg2Bruttosumme01.SetParentComponent(dsBeleg2);\r\n dsBeleg2Bruttosumme01.Name := 'dsBeleg2Bruttosumme01';\r\n dsBeleg2Bruttosumme01.FieldName := 'Bruttosumme01';\r\n dsBeleg2Bruttosumme02.SetParentComponent(dsBeleg2);\r\n dsBeleg2Bruttosumme02.Name := 'dsBeleg2Bruttosumme02';\r\n dsBeleg2Bruttosumme02.FieldName := 'Bruttosumme02';\r\n dsBeleg2Bruttosumme03.SetParentComponent(dsBeleg2);\r\n dsBeleg2Bruttosumme03.Name := 'dsBeleg2Bruttosumme03';\r\n dsBeleg2Bruttosumme03.FieldName := 'Bruttosumme03';\r\n dsBeleg2Notiz.SetParentComponent(dsBeleg2);\r\n dsBeleg2Notiz.Name := 'dsBeleg2Notiz';\r\n dsBeleg2Notiz.FieldName := 'Notiz';\r\n dsBeleg2Notiz.Size := 255;\r\n dsBeleg2MargeProzent.SetParentComponent(dsBeleg2);\r\n dsBeleg2MargeProzent.Name := 'dsBeleg2MargeProzent';\r\n dsBeleg2MargeProzent.FieldName := 'MargeProzent';\r\n dsBeleg2Warenkreditgesperrt.SetParentComponent(dsBeleg2);\r\n dsBeleg2Warenkreditgesperrt.Name := 'dsBeleg2Warenkreditgesperrt';\r\n dsBeleg2Warenkreditgesperrt.FieldName := 'Warenkreditgesperrt';\r\n dsBeleg2Belegsprache.SetParentComponent(dsBeleg2);\r\n dsBeleg2Belegsprache.Name := 'dsBeleg2Belegsprache';\r\n dsBeleg2Belegsprache.FieldName := 'Belegsprache';\r\n dsBeleg2Belegsprache.Size := 10;\r\n dsBeleg2Duplicate.SetParentComponent(dsBeleg2);\r\n dsBeleg2Duplicate.Name := 'dsBeleg2Duplicate';\r\n dsBeleg2Duplicate.FieldName := 'Duplicate';\r\n dsBeleg2perEmail.SetParentComponent(dsBeleg2);\r\n dsBeleg2perEmail.Name := 'dsBeleg2perEmail';\r\n dsBeleg2perEmail.FieldName := 'perEmail';\r\n dsBeleg2Ansprechpartner.SetParentComponent(dsBeleg2);\r\n dsBeleg2Ansprechpartner.Name := 'dsBeleg2Ansprechpartner';\r\n dsBeleg2Ansprechpartner.FieldName := 'Ansprechpartner';\r\n dsBeleg2Ansprechpartner.Size := 105;\r\n dsBeleg2KundennummerFremd.SetParentComponent(dsBeleg2);\r\n dsBeleg2KundennummerFremd.Name := 'dsBeleg2KundennummerFremd';\r\n dsBeleg2KundennummerFremd.FieldName := 'KundennummerFremd';\r\n dsBeleg2Protokoll.SetParentComponent(dsBeleg2);\r\n dsBeleg2Protokoll.Name := 'dsBeleg2Protokoll';\r\n dsBeleg2Protokoll.FieldName := 'Protokoll';\r\n dsBeleg2Protokoll.Size := 255;\r\n dsBeleg2Verleihauftrag.SetParentComponent(dsBeleg2);\r\n dsBeleg2Verleihauftrag.Name := 'dsBeleg2Verleihauftrag';\r\n dsBeleg2Verleihauftrag.FieldName := 'Verleihauftrag';\r\n dsBeleg2VerleihVon.SetParentComponent(dsBeleg2);\r\n dsBeleg2VerleihVon.Name := 'dsBeleg2VerleihVon';\r\n dsBeleg2VerleihVon.FieldName := 'VerleihVon';\r\n dsBeleg2VerleihBis.SetParentComponent(dsBeleg2);\r\n dsBeleg2VerleihBis.Name := 'dsBeleg2VerleihBis';\r\n dsBeleg2VerleihBis.FieldName := 'VerleihBis';\r\n dsBeleg2AuftragGenehmigt.SetParentComponent(dsBeleg2);\r\n dsBeleg2AuftragGenehmigt.Name := 'dsBeleg2AuftragGenehmigt';\r\n dsBeleg2AuftragGenehmigt.FieldName := 'AuftragGenehmigt';\r\n dsBeleg2gesperrt.SetParentComponent(dsBeleg2);\r\n dsBeleg2gesperrt.Name := 'dsBeleg2gesperrt';\r\n dsBeleg2gesperrt.FieldName := 'gesperrt';\r\n dsBeleg2VerleihvonText.SetParentComponent(dsBeleg2);\r\n dsBeleg2VerleihvonText.Name := 'dsBeleg2VerleihvonText';\r\n dsBeleg2VerleihvonText.FieldName := 'VerleihvonText';\r\n dsBeleg2VerleihvonText.Size := 50;\r\n dsBeleg2VerleihbisText.SetParentComponent(dsBeleg2);\r\n dsBeleg2VerleihbisText.Name := 'dsBeleg2VerleihbisText';\r\n dsBeleg2VerleihbisText.FieldName := 'VerleihbisText';\r\n dsBeleg2VerleihbisText.Size := 50;\r\n dsBeleg2DruckWHG.SetParentComponent(dsBeleg2);\r\n dsBeleg2DruckWHG.Name := 'dsBeleg2DruckWHG';\r\n dsBeleg2DruckWHG.FieldName := 'DruckWHG';\r\n dsBeleg2DruckWHG.Size := 3;\r\n dsBeleg2DruckWHGKurs.SetParentComponent(dsBeleg2);\r\n dsBeleg2DruckWHGKurs.Name := 'dsBeleg2DruckWHGKurs';\r\n dsBeleg2DruckWHGKurs.FieldName := 'DruckWHGKurs';\r\n dsBeleg2ProzentsatzZusatzposition.SetParentComponent(dsBeleg2);\r\n dsBeleg2ProzentsatzZusatzposition.Name := 'dsBeleg2ProzentsatzZusatzposition';\r\n dsBeleg2ProzentsatzZusatzposition.FieldName := 'ProzentsatzZusatzposition';\r\n dsBeleg2TextZusatzposition.SetParentComponent(dsBeleg2);\r\n dsBeleg2TextZusatzposition.Name := 'dsBeleg2TextZusatzposition';\r\n dsBeleg2TextZusatzposition.FieldName := 'TextZusatzposition';\r\n dsBeleg2TextZusatzposition.Size := 255;\r\n dsBeleg2TextzusatzBeschreibung.SetParentComponent(dsBeleg2);\r\n dsBeleg2TextzusatzBeschreibung.Name := 'dsBeleg2TextzusatzBeschreibung';\r\n dsBeleg2TextzusatzBeschreibung.FieldName := 'TextzusatzBeschreibung';\r\n dsBeleg2TextzusatzBeschreibung.Size := 50;\r\n dsBeleg2Layoutname.SetParentComponent(dsBeleg2);\r\n dsBeleg2Layoutname.Name := 'dsBeleg2Layoutname';\r\n dsBeleg2Layoutname.FieldName := 'Layoutname';\r\n dsBeleg2Layoutname.Size := 50;\r\n dsBeleg2Gesamtgewicht.SetParentComponent(dsBeleg2);\r\n dsBeleg2Gesamtgewicht.Name := 'dsBeleg2Gesamtgewicht';\r\n dsBeleg2Gesamtgewicht.FieldName := 'Gesamtgewicht';\r\n dsBeleg2BetragZusatzposition.SetParentComponent(dsBeleg2);\r\n dsBeleg2BetragZusatzposition.Name := 'dsBeleg2BetragZusatzposition';\r\n dsBeleg2BetragZusatzposition.FieldName := 'BetragZusatzposition';\r\n dsBeleg2ReferenzBestellung.SetParentComponent(dsBeleg2);\r\n dsBeleg2ReferenzBestellung.Name := 'dsBeleg2ReferenzBestellung';\r\n dsBeleg2ReferenzBestellung.FieldName := 'ReferenzBestellung';\r\n dsBeleg2ReferenzBestellung.Size := 10;\r\n dsBeleg2Termin1.SetParentComponent(dsBeleg2);\r\n dsBeleg2Termin1.Name := 'dsBeleg2Termin1';\r\n dsBeleg2Termin1.FieldName := 'Termin1';\r\n dsBeleg2Termin2.SetParentComponent(dsBeleg2);\r\n dsBeleg2Termin2.Name := 'dsBeleg2Termin2';\r\n dsBeleg2Termin2.FieldName := 'Termin2';\r\n dsBeleg2Zielkontaktnummer.SetParentComponent(dsBeleg2);\r\n dsBeleg2Zielkontaktnummer.Name := 'dsBeleg2Zielkontaktnummer';\r\n dsBeleg2Zielkontaktnummer.FieldName := 'Zielkontaktnummer';\r\n dsBeleg2Zielkontaktnummer.Size := 13;\r\n dsBeleg2Zielkontaktname.SetParentComponent(dsBeleg2);\r\n dsBeleg2Zielkontaktname.Name := 'dsBeleg2Zielkontaktname';\r\n dsBeleg2Zielkontaktname.FieldName := 'Zielkontaktname';\r\n dsBeleg2Zielkontaktname.Size := 40;\r\n dsBeleg2Bilddatei1.SetParentComponent(dsBeleg2);\r\n dsBeleg2Bilddatei1.Name := 'dsBeleg2Bilddatei1';\r\n dsBeleg2Bilddatei1.FieldName := 'Bilddatei1';\r\n dsBeleg2Bilddatei1.Size := 255;\r\n dsBeleg2Bilddatei2.SetParentComponent(dsBeleg2);\r\n dsBeleg2Bilddatei2.Name := 'dsBeleg2Bilddatei2';\r\n dsBeleg2Bilddatei2.FieldName := 'Bilddatei2';\r\n dsBeleg2Bilddatei2.Size := 255;\r\n dsBeleg2Zielkontaktnummer2.SetParentComponent(dsBeleg2);\r\n dsBeleg2Zielkontaktnummer2.Name := 'dsBeleg2Zielkontaktnummer2';\r\n dsBeleg2Zielkontaktnummer2.FieldName := 'Zielkontaktnummer2';\r\n dsBeleg2Zielkontaktnummer2.Size := 13;\r\n dsBeleg2Zielkontaktname2.SetParentComponent(dsBeleg2);\r\n dsBeleg2Zielkontaktname2.Name := 'dsBeleg2Zielkontaktname2';\r\n dsBeleg2Zielkontaktname2.FieldName := 'Zielkontaktname2';\r\n dsBeleg2Zielkontaktname2.Size := 40;\r\n dsBeleg2bestaetigt.SetParentComponent(dsBeleg2);\r\n dsBeleg2bestaetigt.Name := 'dsBeleg2bestaetigt';\r\n dsBeleg2bestaetigt.FieldName := 'bestaetigt';\r\n dsBeleg2Zielkontaktnummer3.SetParentComponent(dsBeleg2);\r\n dsBeleg2Zielkontaktnummer3.Name := 'dsBeleg2Zielkontaktnummer3';\r\n dsBeleg2Zielkontaktnummer3.FieldName := 'Zielkontaktnummer3';\r\n dsBeleg2Zielkontaktnummer3.Size := 13;\r\n dsBeleg2Zielkontaktname3.SetParentComponent(dsBeleg2);\r\n dsBeleg2Zielkontaktname3.Name := 'dsBeleg2Zielkontaktname3';\r\n dsBeleg2Zielkontaktname3.FieldName := 'Zielkontaktname3';\r\n dsBeleg2Zielkontaktname3.Size := 40;\r\n dsBeleg2Termin3.SetParentComponent(dsBeleg2);\r\n dsBeleg2Termin3.Name := 'dsBeleg2Termin3';\r\n dsBeleg2Termin3.FieldName := 'Termin3';\r\n dsBeleg2Termin4.SetParentComponent(dsBeleg2);\r\n dsBeleg2Termin4.Name := 'dsBeleg2Termin4';\r\n dsBeleg2Termin4.FieldName := 'Termin4';\r\n dsBeleg2Muster.SetParentComponent(dsBeleg2);\r\n dsBeleg2Muster.Name := 'dsBeleg2Muster';\r\n dsBeleg2Muster.FieldName := 'Muster';\r\n dsBeleg2KW.SetParentComponent(dsBeleg2);\r\n dsBeleg2KW.Name := 'dsBeleg2KW';\r\n dsBeleg2KW.FieldName := 'KW';\r\n dsBeleg2Datenlink.SetParentComponent(dsBeleg2);\r\n dsBeleg2Datenlink.Name := 'dsBeleg2Datenlink';\r\n dsBeleg2Datenlink.FieldName := 'Datenlink';\r\n dsBeleg2Datenlink.Size := 255;\r\n dsBeleg2Mehrwertsteuersatz4.SetParentComponent(dsBeleg2);\r\n dsBeleg2Mehrwertsteuersatz4.Name := 'dsBeleg2Mehrwertsteuersatz4';\r\n dsBeleg2Mehrwertsteuersatz4.FieldName := 'Mehrwertsteuersatz4';\r\n dsBeleg2Mehrwertsteuersatz5.SetParentComponent(dsBeleg2);\r\n dsBeleg2Mehrwertsteuersatz5.Name := 'dsBeleg2Mehrwertsteuersatz5';\r\n dsBeleg2Mehrwertsteuersatz5.FieldName := 'Mehrwertsteuersatz5';\r\n dsBeleg2Mehrwertsteuersatz6.SetParentComponent(dsBeleg2);\r\n dsBeleg2Mehrwertsteuersatz6.Name := 'dsBeleg2Mehrwertsteuersatz6';\r\n dsBeleg2Mehrwertsteuersatz6.FieldName := 'Mehrwertsteuersatz6';\r\n dsBeleg2BesteuerungKey.SetParentComponent(dsBeleg2);\r\n dsBeleg2BesteuerungKey.Name := 'dsBeleg2BesteuerungKey';\r\n dsBeleg2BesteuerungKey.FieldName := 'BesteuerungKey';\r\n dsBeleg2VertreterMatchcode.SetParentComponent(dsBeleg2);\r\n dsBeleg2VertreterMatchcode.Name := 'dsBeleg2VertreterMatchcode';\r\n dsBeleg2VertreterMatchcode.FieldName := 'VertreterMatchcode';\r\n dsBeleg2VertreterMatchcode.Size := 50;\r\n dsBeleg2Verfasser.SetParentComponent(dsBeleg2);\r\n dsBeleg2Verfasser.Name := 'dsBeleg2Verfasser';\r\n dsBeleg2Verfasser.FieldName := 'Verfasser';\r\n dsBeleg2Verfasser.Size := 10;\r\n dsBeleg2LieferadresseID.SetParentComponent(dsBeleg2);\r\n dsBeleg2LieferadresseID.Name := 'dsBeleg2LieferadresseID';\r\n dsBeleg2LieferadresseID.FieldName := 'LieferadresseID';\r\n dsBeleg2AuftragStatus.SetParentComponent(dsBeleg2);\r\n dsBeleg2AuftragStatus.Name := 'dsBeleg2AuftragStatus';\r\n dsBeleg2AuftragStatus.FieldName := 'AuftragStatus';\r\n dsBeleg2AuftragStatus.Size := 30;\r\n dsBeleg2MonatJahr.SetParentComponent(dsBeleg2);\r\n dsBeleg2MonatJahr.Name := 'dsBeleg2MonatJahr';\r\n dsBeleg2MonatJahr.FieldName := 'MonatJahr';\r\n dsBeleg2Belegvariante.SetParentComponent(dsBeleg2);\r\n dsBeleg2Belegvariante.Name := 'dsBeleg2Belegvariante';\r\n dsBeleg2Belegvariante.FieldName := 'Belegvariante';\r\n dsBeleg2Belegvariante.Size := 25;\r\n dsBeleg2Produktionsfreigabe.SetParentComponent(dsBeleg2);\r\n dsBeleg2Produktionsfreigabe.Name := 'dsBeleg2Produktionsfreigabe';\r\n dsBeleg2Produktionsfreigabe.FieldName := 'Produktionsfreigabe';\r\n dsBeleg2ReferenzRahmenAuftrag.SetParentComponent(dsBeleg2);\r\n dsBeleg2ReferenzRahmenAuftrag.Name := 'dsBeleg2ReferenzRahmenAuftrag';\r\n dsBeleg2ReferenzRahmenAuftrag.FieldName := 'ReferenzRahmenAuftrag';\r\n dsBeleg2ReferenzRahmenAuftrag.Size := 10;\r\n dsBeleg2DatumRahmenAuftrag.SetParentComponent(dsBeleg2);\r\n dsBeleg2DatumRahmenAuftrag.Name := 'dsBeleg2DatumRahmenAuftrag';\r\n dsBeleg2DatumRahmenAuftrag.FieldName := 'DatumRahmenAuftrag';\r\n dsBeleg2FahrzeugID.SetParentComponent(dsBeleg2);\r\n dsBeleg2FahrzeugID.Name := 'dsBeleg2FahrzeugID';\r\n dsBeleg2FahrzeugID.FieldName := 'FahrzeugID';\r\n dsBeleg2AuslieferungKW.SetParentComponent(dsBeleg2);\r\n dsBeleg2AuslieferungKW.Name := 'dsBeleg2AuslieferungKW';\r\n dsBeleg2AuslieferungKW.FieldName := 'AuslieferungKW';\r\n dsBeleg2AuslieferungKW.Size := 25;\r\n dsBeleg2BereitstellungDatum.SetParentComponent(dsBeleg2);\r\n dsBeleg2BereitstellungDatum.Name := 'dsBeleg2BereitstellungDatum';\r\n dsBeleg2BereitstellungDatum.FieldName := 'BereitstellungDatum';\r\n dsBeleg2VTUID.SetParentComponent(dsBeleg2);\r\n dsBeleg2VTUID.Name := 'dsBeleg2VTUID';\r\n dsBeleg2VTUID.FieldName := 'VTUID';\r\n dsBeleg2VTUID.Size := 38;\r\n dsBeleg2LieferanschriftDaten.SetParentComponent(dsBeleg2);\r\n dsBeleg2LieferanschriftDaten.Name := 'dsBeleg2LieferanschriftDaten';\r\n dsBeleg2LieferanschriftDaten.FieldName := 'LieferanschriftDaten';\r\n dsBeleg2LieferanschriftDaten.Size := 255;\r\n dsBeleg2GesamtVolumen.SetParentComponent(dsBeleg2);\r\n dsBeleg2GesamtVolumen.Name := 'dsBeleg2GesamtVolumen';\r\n dsBeleg2GesamtVolumen.FieldName := 'GesamtVolumen';\r\n dsBeleg2BelegPKey.SetParentComponent(dsBeleg2);\r\n dsBeleg2BelegPKey.Name := 'dsBeleg2BelegPKey';\r\n dsBeleg2BelegPKey.FieldName := 'BelegPKey';\r\n dsBeleg2DruckParameter.SetParentComponent(dsBeleg2);\r\n dsBeleg2DruckParameter.Name := 'dsBeleg2DruckParameter';\r\n dsBeleg2DruckParameter.FieldName := 'DruckParameter';\r\n dsBeleg2DruckParameter.Size := 255;\r\n dsBeleg2ReferenzService.SetParentComponent(dsBeleg2);\r\n dsBeleg2ReferenzService.Name := 'dsBeleg2ReferenzService';\r\n dsBeleg2ReferenzService.FieldName := 'ReferenzService';\r\n dsBeleg2ReferenzService.Size := 10;\r\n dsBeleg2ZusatzDaten.SetParentComponent(dsBeleg2);\r\n dsBeleg2ZusatzDaten.Name := 'dsBeleg2ZusatzDaten';\r\n dsBeleg2ZusatzDaten.FieldName := 'ZusatzDaten';\r\n dsBeleg2ZusatzDaten.Size := 255;\r\n dsBeleg2StandPDF.SetParentComponent(dsBeleg2);\r\n dsBeleg2StandPDF.Name := 'dsBeleg2StandPDF';\r\n dsBeleg2StandPDF.FieldName := 'StandPDF';\r\n dsBeleg2StandPDF.Size := 255;\r\n dsBeleg2Paketdienst.SetParentComponent(dsBeleg2);\r\n dsBeleg2Paketdienst.Name := 'dsBeleg2Paketdienst';\r\n dsBeleg2Paketdienst.FieldName := 'Paketdienst';\r\n dsBeleg2Paketdienst.Size := 30;\r\n dsBeleg2Monteur.SetParentComponent(dsBeleg2);\r\n dsBeleg2Monteur.Name := 'dsBeleg2Monteur';\r\n dsBeleg2Monteur.FieldName := 'Monteur';\r\n dsBeleg2KundennummerKundennummer.SetParentComponent(dsBeleg2);\r\n dsBeleg2KundennummerKundennummer.Name := 'dsBeleg2KundennummerKundennummer';\r\n dsBeleg2KundennummerKundennummer.FieldName := 'Kundennummer.Kundennummer';\r\n dsBeleg2KundennummerKundennummer.Size := 13;\r\n dsBeleg2ServiceBemerkung.SetParentComponent(dsBeleg2);\r\n dsBeleg2ServiceBemerkung.Name := 'dsBeleg2ServiceBemerkung';\r\n dsBeleg2ServiceBemerkung.FieldName := 'ServiceBemerkung';\r\n dsBeleg2ServiceBemerkung.Size := 255;\r\n finally\r\n Container1.AfterLoadDFMValues;\r\n Container2.AfterLoadDFMValues;\r\n WTCPosition.AfterLoadDFMValues;\r\n btnPosAbbrechen.AfterLoadDFMValues;\r\n btnPosSpeichern.AfterLoadDFMValues;\r\n btnPositionLoeschen.AfterLoadDFMValues;\r\n edtPosNr.AfterLoadDFMValues;\r\n edtPosUNr.AfterLoadDFMValues;\r\n edtArtikelueberschrift.AfterLoadDFMValues;\r\n edtMenge.AfterLoadDFMValues;\r\n btnArtikelnummer.AfterLoadDFMValues;\r\n edtArtikelbeschreibung.AfterLoadDFMValues;\r\n edtMengenart.AfterLoadDFMValues;\r\n btnNeuePosition.AfterLoadDFMValues;\r\n xdsPosition.AfterLoadDFMValues;\r\n xdsPositionNummerkomplett.AfterLoadDFMValues;\r\n xdsPositionArtikelnummer.AfterLoadDFMValues;\r\n xdsPositionID.AfterLoadDFMValues;\r\n xdsPositionPosNr.AfterLoadDFMValues;\r\n xdsPositionPosUNr.AfterLoadDFMValues;\r\n xdsPositionSumme.AfterLoadDFMValues;\r\n xdsPositionArtikelueberschrift.AfterLoadDFMValues;\r\n xdsPositionArtikelbeschreibung.AfterLoadDFMValues;\r\n xdsPositionMenge.AfterLoadDFMValues;\r\n xdsPositionArtderMenge.AfterLoadDFMValues;\r\n xdsPositionVerkaufspreis.AfterLoadDFMValues;\r\n xdsPositionEinkaufspreis.AfterLoadDFMValues;\r\n xdsPositionSeriennummer.AfterLoadDFMValues;\r\n xdsPositionWarengruppe.AfterLoadDFMValues;\r\n xdsPositionWarenuntergruppe.AfterLoadDFMValues;\r\n xdsPositionArtikelnummerKunde.AfterLoadDFMValues;\r\n xdsPositionLieferant.AfterLoadDFMValues;\r\n xdsPositionGewicht.AfterLoadDFMValues;\r\n xdsPositionLaenge.AfterLoadDFMValues;\r\n xdsPositionBreite.AfterLoadDFMValues;\r\n xdsPositionHoehe.AfterLoadDFMValues;\r\n xdsPositionMehrwertsteuersatz.AfterLoadDFMValues;\r\n xdsPositionEndpreis.AfterLoadDFMValues;\r\n xdsPositionPosMWST.AfterLoadDFMValues;\r\n xdsPositionBruttoEndpreis.AfterLoadDFMValues;\r\n xdsPositionEndpreis_EK.AfterLoadDFMValues;\r\n xdsPositionRabattsatz.AfterLoadDFMValues;\r\n xdsPositionPreisvorRabatt.AfterLoadDFMValues;\r\n xdsPositionPKZ.AfterLoadDFMValues;\r\n xdsPositionTextfrei10.AfterLoadDFMValues;\r\n xdsPositionTextfrei20.AfterLoadDFMValues;\r\n xdsPositionAlternativ.AfterLoadDFMValues;\r\n xdsPositionEinzelpreisBrutto.AfterLoadDFMValues;\r\n xdsPositionPosMarge.AfterLoadDFMValues;\r\n xdsPositionPosMargeProzent.AfterLoadDFMValues;\r\n xdsPositionWarenbestand.AfterLoadDFMValues;\r\n xdsPositionArtikelbeschreibungRTF.AfterLoadDFMValues;\r\n xdsPositionQuellartikel.AfterLoadDFMValues;\r\n xdsPositionArtikelnummerWB.AfterLoadDFMValues;\r\n xdsPositionPreisanteilNetto.AfterLoadDFMValues;\r\n xdsPositionSetHPos.AfterLoadDFMValues;\r\n xdsPositionSetUPos.AfterLoadDFMValues;\r\n xdsPositionProvisionssatz.AfterLoadDFMValues;\r\n xdsPositionProvisionsbetrag.AfterLoadDFMValues;\r\n xdsPositionReferenzKalkulation.AfterLoadDFMValues;\r\n xdsPositionArtikelsprache.AfterLoadDFMValues;\r\n xdsPositionEKvom.AfterLoadDFMValues;\r\n xdsPositionMengenberechnungID.AfterLoadDFMValues;\r\n xdsPositionTaraID.AfterLoadDFMValues;\r\n xdsPositionTara.AfterLoadDFMValues;\r\n xdsPositionBruttoGewicht.AfterLoadDFMValues;\r\n xdsPositionAussenflaeche.AfterLoadDFMValues;\r\n xdsPositionSeitenumbruch.AfterLoadDFMValues;\r\n xdsPositionMWStKey.AfterLoadDFMValues;\r\n xdsPositionZSnachPos.AfterLoadDFMValues;\r\n xdsPositionPreisVorRabattWHG.AfterLoadDFMValues;\r\n xdsPositionPKey.AfterLoadDFMValues;\r\n xdsPositionLager.AfterLoadDFMValues;\r\n xdsPositionlwbID.AfterLoadDFMValues;\r\n xdsPositionBelegdatum.AfterLoadDFMValues;\r\n xdsPositionVolumen.AfterLoadDFMValues;\r\n xdsPositionPosVolumen.AfterLoadDFMValues;\r\n xdsPositionArtikelAttribute.AfterLoadDFMValues;\r\n sourcePosition.AfterLoadDFMValues;\r\n dsArtikel.AfterLoadDFMValues;\r\n dsArtikelHersteller.AfterLoadDFMValues;\r\n dsArtikelArtderMenge.AfterLoadDFMValues;\r\n dsArtikelPfandArt.AfterLoadDFMValues;\r\n dsArtikelWarengruppe.AfterLoadDFMValues;\r\n dsArtikelWarenuntergruppe.AfterLoadDFMValues;\r\n dsArtikelArtikelnummer.AfterLoadDFMValues;\r\n dsArtikelArtikelueberschrift.AfterLoadDFMValues;\r\n dsArtikelArtikelbeschreibung.AfterLoadDFMValues;\r\n dsArtikelVerkaufspreis.AfterLoadDFMValues;\r\n dsArtikelMindestbestand.AfterLoadDFMValues;\r\n dsArtikelPreisliste.AfterLoadDFMValues;\r\n dsArtikelGewicht.AfterLoadDFMValues;\r\n dsArtikelLaenge.AfterLoadDFMValues;\r\n dsArtikelBreite.AfterLoadDFMValues;\r\n dsArtikelHoehe.AfterLoadDFMValues;\r\n dsArtikelArtikelZusatz.AfterLoadDFMValues;\r\n dsArtikelLagerort.AfterLoadDFMValues;\r\n dsArtikelBuchungskonto.AfterLoadDFMValues;\r\n dsArtikelEingangMenge.AfterLoadDFMValues;\r\n dsArtikelEingangEndpreis.AfterLoadDFMValues;\r\n dsArtikelAusgangMenge.AfterLoadDFMValues;\r\n dsArtikelAusgangEndpreisEK.AfterLoadDFMValues;\r\n dsArtikelAusgangEndpreisVK.AfterLoadDFMValues;\r\n dsArtikelBestand.AfterLoadDFMValues;\r\n dsArtikelBestandswert.AfterLoadDFMValues;\r\n dsArtikelMarge.AfterLoadDFMValues;\r\n dsArtikelMargeProzent.AfterLoadDFMValues;\r\n dsArtikelArtikelnummer2.AfterLoadDFMValues;\r\n dsArtikelArtikelmatchcode.AfterLoadDFMValues;\r\n dsArtikelRabattpreis1.AfterLoadDFMValues;\r\n dsArtikelRabattpreis2.AfterLoadDFMValues;\r\n dsArtikelRabattpreis3.AfterLoadDFMValues;\r\n dsArtikelRabattpreis4.AfterLoadDFMValues;\r\n dsArtikelRabattpreis5.AfterLoadDFMValues;\r\n dsArtikelArtikelnichtmehrgueltig.AfterLoadDFMValues;\r\n dsArtikelEinkaufspreis.AfterLoadDFMValues;\r\n dsArtikelAufschlag.AfterLoadDFMValues;\r\n dsArtikelWarenbestand.AfterLoadDFMValues;\r\n dsArtikelTextfrei10.AfterLoadDFMValues;\r\n dsArtikelTextfrei20.AfterLoadDFMValues;\r\n dsArtikelArtikelbeschreibungRTF.AfterLoadDFMValues;\r\n dsArtikelArtikeldatei1.AfterLoadDFMValues;\r\n dsArtikelArtikeldatei2.AfterLoadDFMValues;\r\n dsArtikelArtikeldatei3.AfterLoadDFMValues;\r\n dsArtikelArtikeldatei4.AfterLoadDFMValues;\r\n dsArtikelArtikeldatei5.AfterLoadDFMValues;\r\n dsArtikelEinkaufspreisVom.AfterLoadDFMValues;\r\n dsArtikelEAN.AfterLoadDFMValues;\r\n dsArtikelVGPFaktor.AfterLoadDFMValues;\r\n dsArtikelVGPMengenart.AfterLoadDFMValues;\r\n dsArtikelVerleihpreis.AfterLoadDFMValues;\r\n dsArtikelZusatzPreis.AfterLoadDFMValues;\r\n dsArtikelVerpackungsart.AfterLoadDFMValues;\r\n dsArtikelVerpackungsMenge.AfterLoadDFMValues;\r\n dsArtikelQuellartikel.AfterLoadDFMValues;\r\n dsArtikelrabattierfaehig.AfterLoadDFMValues;\r\n dsArtikelAngebotAlternativeAN.AfterLoadDFMValues;\r\n dsArtikelPreisanteilNetto.AfterLoadDFMValues;\r\n dsArtikelFarbe.AfterLoadDFMValues;\r\n dsArtikelAEinkauf.AfterLoadDFMValues;\r\n dsArtikelAVerkauf.AfterLoadDFMValues;\r\n dsArtikelArtikelnummerLieferant.AfterLoadDFMValues;\r\n dsArtikelLieferantnummer.AfterLoadDFMValues;\r\n dsArtikelVerkaufspreisBrutto.AfterLoadDFMValues;\r\n dsArtikelArtikelSet.AfterLoadDFMValues;\r\n dsArtikelProvisionssatz.AfterLoadDFMValues;\r\n dsArtikelWarentarifnummer.AfterLoadDFMValues;\r\n dsArtikelHandelsartikel.AfterLoadDFMValues;\r\n dsArtikelUrsprungsland.AfterLoadDFMValues;\r\n dsArtikelKategorie.AfterLoadDFMValues;\r\n dsArtikelStandardRabattsatzEK.AfterLoadDFMValues;\r\n dsArtikelStandardRabattsatzVK.AfterLoadDFMValues;\r\n dsArtikelRabattpreiseManuell.AfterLoadDFMValues;\r\n dsArtikelMengeBestellt.AfterLoadDFMValues;\r\n dsArtikelMengeBeauftragt.AfterLoadDFMValues;\r\n dsArtikelBestandDisponiert.AfterLoadDFMValues;\r\n dsArtikelMengeAngeboten.AfterLoadDFMValues;\r\n dsArtikelBestandDispInclAngebot.AfterLoadDFMValues;\r\n dsArtikelMWStKey.AfterLoadDFMValues;\r\n dsArtikelShopAmazon.AfterLoadDFMValues;\r\n dsArtikelShopQuelle.AfterLoadDFMValues;\r\n dsArtikelGeraet.AfterLoadDFMValues;\r\n dsArtikelArtgewicht.AfterLoadDFMValues;\r\n dsArtikelVolumen.AfterLoadDFMValues;\r\n dsArtikelPacklisteNichtAnzeigen.AfterLoadDFMValues;\r\n dsArtikelKeineAufschlagskalkulation.AfterLoadDFMValues;\r\n dsArtikelKorrekturMenge.AfterLoadDFMValues;\r\n dsArtikelKorrekturWert.AfterLoadDFMValues;\r\n dsArtikelNachfolgeartikel.AfterLoadDFMValues;\r\n dsArtikelMindestbestellmenge.AfterLoadDFMValues;\r\n dsArtikelSchnittEK.AfterLoadDFMValues;\r\n dsArtikelVerkaufspreisVom.AfterLoadDFMValues;\r\n dsArtikelPruefungChargeSNR.AfterLoadDFMValues;\r\n dsArtikelArtikelbeschreibungHTML.AfterLoadDFMValues;\r\n dsArtikelProduktKurzbeschreibungHTML.AfterLoadDFMValues;\r\n dsArtikelStatusFuerShop.AfterLoadDFMValues;\r\n dsArtikelAmpelFuerShop.AfterLoadDFMValues;\r\n dsArtikelEXP_Anzahl.AfterLoadDFMValues;\r\n dsArtikelEXP_Inhalt.AfterLoadDFMValues;\r\n dsArtikelEXP_Faktor.AfterLoadDFMValues;\r\n dsArtikelFach.AfterLoadDFMValues;\r\n dsArtikelExportKasse.AfterLoadDFMValues;\r\n dsArtikelWKNR.AfterLoadDFMValues;\r\n dsArtikelArtikelAttribute.AfterLoadDFMValues;\r\n dsArtikelErstelltAm.AfterLoadDFMValues;\r\n dsArtikelVarianteVonAN.AfterLoadDFMValues;\r\n dsArtikelGurtmassWerte.AfterLoadDFMValues;\r\n dsArtikelGurtmass.AfterLoadDFMValues;\r\n dsArtikelAltersgrenze.AfterLoadDFMValues;\r\n dsArtikelMWStKeyImHaus.AfterLoadDFMValues;\r\n dsArtikelKasseBewegung.AfterLoadDFMValues;\r\n dsArtikelKasseBewegungEK.AfterLoadDFMValues;\r\n dsArtikelKasseBewegungVK.AfterLoadDFMValues;\r\n dsArtikelProduktionBewegung.AfterLoadDFMValues;\r\n dsArtikelProduktionBewegungEK.AfterLoadDFMValues;\r\n dsArtikelProduktionBewegungVK.AfterLoadDFMValues;\r\n dsArtikelWaWiAB.AfterLoadDFMValues;\r\n dsArtikelGeaendertAm.AfterLoadDFMValues;\r\n dsArtikelGefahrgutKennzeichen.AfterLoadDFMValues;\r\n dsArtikelVerpackG.AfterLoadDFMValues;\r\n dsArtikelUPE.AfterLoadDFMValues;\r\n dsArtikelArtikelbeschreibungEinkauf.AfterLoadDFMValues;\r\n dsArtikelHerstellerArtikelnummer.AfterLoadDFMValues;\r\n dsArtikelNatura.AfterLoadDFMValues;\r\n dsArtikelArbeitszeit.AfterLoadDFMValues;\r\n dsArtikelArtderMengeArtderMenge.AfterLoadDFMValues;\r\n xdsKundenpreise.AfterLoadDFMValues;\r\n xdsKundenpreiseArtikelnummer.AfterLoadDFMValues;\r\n xdsKundenpreiseKundennummer.AfterLoadDFMValues;\r\n xdsKundenpreiseVerkaufspreis.AfterLoadDFMValues;\r\n xdsKundenpreiseNachname.AfterLoadDFMValues;\r\n xdsKundenpreiseRabattsatz.AfterLoadDFMValues;\r\n xdsKundenpreiseVerleihpreis.AfterLoadDFMValues;\r\n xdsKundenpreiseZusatzPreis.AfterLoadDFMValues;\r\n xdsKundenpreiseArtikelnummerKunde.AfterLoadDFMValues;\r\n xdsKundenpreiseDatumGeaendert.AfterLoadDFMValues;\r\n xdsKundenpreiseArtikelueberschrift.AfterLoadDFMValues;\r\n xdsKundenpreiseArtikelnummerArtikelnummer.AfterLoadDFMValues;\r\n xdsKundenpreiseArtikelnummerArtikelueberschrift.AfterLoadDFMValues;\r\n xdsKundenpreiseArtikelnummerArtikelbeschreibung.AfterLoadDFMValues;\r\n dsBeleg2.AfterLoadDFMValues;\r\n dsBeleg2Kundennummer.AfterLoadDFMValues;\r\n dsBeleg2Nummerkomplett.AfterLoadDFMValues;\r\n dsBeleg2ReferenzAngebot.AfterLoadDFMValues;\r\n dsBeleg2ReferenzLieferschein.AfterLoadDFMValues;\r\n dsBeleg2ReferenzRechnung.AfterLoadDFMValues;\r\n dsBeleg2Datum.AfterLoadDFMValues;\r\n dsBeleg2Jahr.AfterLoadDFMValues;\r\n dsBeleg2Kalenderwoche.AfterLoadDFMValues;\r\n dsBeleg2Nachname.AfterLoadDFMValues;\r\n dsBeleg2Vorname.AfterLoadDFMValues;\r\n dsBeleg2Postleitzahl.AfterLoadDFMValues;\r\n dsBeleg2Ort.AfterLoadDFMValues;\r\n dsBeleg2Laenderkuerzel.AfterLoadDFMValues;\r\n dsBeleg2Land.AfterLoadDFMValues;\r\n dsBeleg2Briefanrede1.AfterLoadDFMValues;\r\n dsBeleg2Briefanrede2.AfterLoadDFMValues;\r\n dsBeleg2EMail.AfterLoadDFMValues;\r\n dsBeleg2AdresseBild.AfterLoadDFMValues;\r\n dsBeleg2LieferanschriftBild.AfterLoadDFMValues;\r\n dsBeleg2Zahlungsbedingung.AfterLoadDFMValues;\r\n dsBeleg2ZahlungsbedingungText.AfterLoadDFMValues;\r\n dsBeleg2Auftragsbezeichnung.AfterLoadDFMValues;\r\n dsBeleg2AuftragnummerKunde.AfterLoadDFMValues;\r\n dsBeleg2BestelldatumKunde.AfterLoadDFMValues;\r\n dsBeleg2ILN.AfterLoadDFMValues;\r\n dsBeleg2Kopftext.AfterLoadDFMValues;\r\n dsBeleg2Schlussbemerkung.AfterLoadDFMValues;\r\n dsBeleg2Gruss.AfterLoadDFMValues;\r\n dsBeleg2Mehrwertsteuersatz1.AfterLoadDFMValues;\r\n dsBeleg2Mehrwertsteuersatz2.AfterLoadDFMValues;\r\n dsBeleg2Nettosumme01.AfterLoadDFMValues;\r\n dsBeleg2Nettosumme02.AfterLoadDFMValues;\r\n dsBeleg2Nettosumme.AfterLoadDFMValues;\r\n dsBeleg2Mehrwertsteuer01.AfterLoadDFMValues;\r\n dsBeleg2Mehrwertsteuer02.AfterLoadDFMValues;\r\n dsBeleg2Mehrwertsteuer.AfterLoadDFMValues;\r\n dsBeleg2Bruttosumme.AfterLoadDFMValues;\r\n dsBeleg2Versanddatum.AfterLoadDFMValues;\r\n dsBeleg2Skontosatz.AfterLoadDFMValues;\r\n dsBeleg2NettosummeEK.AfterLoadDFMValues;\r\n dsBeleg2NettoMarge.AfterLoadDFMValues;\r\n dsBeleg2Schreibzeichen.AfterLoadDFMValues;\r\n dsBeleg2Unterzeichner.AfterLoadDFMValues;\r\n dsBeleg2TelefonMA.AfterLoadDFMValues;\r\n dsBeleg2EmailMA.AfterLoadDFMValues;\r\n dsBeleg2USTID.AfterLoadDFMValues;\r\n dsBeleg2Umsatzsteuerausweis.AfterLoadDFMValues;\r\n dsBeleg2gebucht.AfterLoadDFMValues;\r\n dsBeleg2Lieferdatum.AfterLoadDFMValues;\r\n dsBeleg2Transportbedingung.AfterLoadDFMValues;\r\n dsBeleg2Mehrwertsteuersatz3.AfterLoadDFMValues;\r\n dsBeleg2Mehrwertsteuer03.AfterLoadDFMValues;\r\n dsBeleg2Nettosumme03.AfterLoadDFMValues;\r\n dsBeleg2RundungsDifferenz.AfterLoadDFMValues;\r\n dsBeleg2EmailText.AfterLoadDFMValues;\r\n dsBeleg2Auftragerledigt.AfterLoadDFMValues;\r\n dsBeleg2Rabattstufe.AfterLoadDFMValues;\r\n dsBeleg2KFZKennzeichen.AfterLoadDFMValues;\r\n dsBeleg2Fahrgestellnummer.AfterLoadDFMValues;\r\n dsBeleg2KFZHersteller.AfterLoadDFMValues;\r\n dsBeleg2Erstzulassungsdatum.AfterLoadDFMValues;\r\n dsBeleg2KMStand.AfterLoadDFMValues;\r\n dsBeleg2KFZType.AfterLoadDFMValues;\r\n dsBeleg2Inspektionsdatum.AfterLoadDFMValues;\r\n dsBeleg2Debitorennummer.AfterLoadDFMValues;\r\n dsBeleg2Kostentraeger.AfterLoadDFMValues;\r\n dsBeleg2Rabattsatz.AfterLoadDFMValues;\r\n dsBeleg2ObjektReferenz.AfterLoadDFMValues;\r\n dsBeleg2Bank.AfterLoadDFMValues;\r\n dsBeleg2Bankleitzahl.AfterLoadDFMValues;\r\n dsBeleg2Kontonummer.AfterLoadDFMValues;\r\n dsBeleg2Kontoinhaber.AfterLoadDFMValues;\r\n dsBeleg2Telefaxnummer.AfterLoadDFMValues;\r\n dsBeleg2DatumNeu.AfterLoadDFMValues;\r\n dsBeleg2Datumgeaendert.AfterLoadDFMValues;\r\n dsBeleg2Objektnummer.AfterLoadDFMValues;\r\n dsBeleg2Liefertermin.AfterLoadDFMValues;\r\n dsBeleg2Emailversand.AfterLoadDFMValues;\r\n dsBeleg2Telefonnummer.AfterLoadDFMValues;\r\n dsBeleg2MobilTelefon.AfterLoadDFMValues;\r\n dsBeleg2AuftragFax.AfterLoadDFMValues;\r\n dsBeleg2REDatum.AfterLoadDFMValues;\r\n dsBeleg2BenutzerNeu.AfterLoadDFMValues;\r\n dsBeleg2BenutzerGeaendert.AfterLoadDFMValues;\r\n dsBeleg2BerechnungBrutto.AfterLoadDFMValues;\r\n dsBeleg2Bruttosumme01.AfterLoadDFMValues;\r\n dsBeleg2Bruttosumme02.AfterLoadDFMValues;\r\n dsBeleg2Bruttosumme03.AfterLoadDFMValues;\r\n dsBeleg2Notiz.AfterLoadDFMValues;\r\n dsBeleg2MargeProzent.AfterLoadDFMValues;\r\n dsBeleg2Warenkreditgesperrt.AfterLoadDFMValues;\r\n dsBeleg2Belegsprache.AfterLoadDFMValues;\r\n dsBeleg2Duplicate.AfterLoadDFMValues;\r\n dsBeleg2perEmail.AfterLoadDFMValues;\r\n dsBeleg2Ansprechpartner.AfterLoadDFMValues;\r\n dsBeleg2KundennummerFremd.AfterLoadDFMValues;\r\n dsBeleg2Protokoll.AfterLoadDFMValues;\r\n dsBeleg2Verleihauftrag.AfterLoadDFMValues;\r\n dsBeleg2VerleihVon.AfterLoadDFMValues;\r\n dsBeleg2VerleihBis.AfterLoadDFMValues;\r\n dsBeleg2AuftragGenehmigt.AfterLoadDFMValues;\r\n dsBeleg2gesperrt.AfterLoadDFMValues;\r\n dsBeleg2VerleihvonText.AfterLoadDFMValues;\r\n dsBeleg2VerleihbisText.AfterLoadDFMValues;\r\n dsBeleg2DruckWHG.AfterLoadDFMValues;\r\n dsBeleg2DruckWHGKurs.AfterLoadDFMValues;\r\n dsBeleg2ProzentsatzZusatzposition.AfterLoadDFMValues;\r\n dsBeleg2TextZusatzposition.AfterLoadDFMValues;\r\n dsBeleg2TextzusatzBeschreibung.AfterLoadDFMValues;\r\n dsBeleg2Layoutname.AfterLoadDFMValues;\r\n dsBeleg2Gesamtgewicht.AfterLoadDFMValues;\r\n dsBeleg2BetragZusatzposition.AfterLoadDFMValues;\r\n dsBeleg2ReferenzBestellung.AfterLoadDFMValues;\r\n dsBeleg2Termin1.AfterLoadDFMValues;\r\n dsBeleg2Termin2.AfterLoadDFMValues;\r\n dsBeleg2Zielkontaktnummer.AfterLoadDFMValues;\r\n dsBeleg2Zielkontaktname.AfterLoadDFMValues;\r\n dsBeleg2Bilddatei1.AfterLoadDFMValues;\r\n dsBeleg2Bilddatei2.AfterLoadDFMValues;\r\n dsBeleg2Zielkontaktnummer2.AfterLoadDFMValues;\r\n dsBeleg2Zielkontaktname2.AfterLoadDFMValues;\r\n dsBeleg2bestaetigt.AfterLoadDFMValues;\r\n dsBeleg2Zielkontaktnummer3.AfterLoadDFMValues;\r\n dsBeleg2Zielkontaktname3.AfterLoadDFMValues;\r\n dsBeleg2Termin3.AfterLoadDFMValues;\r\n dsBeleg2Termin4.AfterLoadDFMValues;\r\n dsBeleg2Muster.AfterLoadDFMValues;\r\n dsBeleg2KW.AfterLoadDFMValues;\r\n dsBeleg2Datenlink.AfterLoadDFMValues;\r\n dsBeleg2Mehrwertsteuersatz4.AfterLoadDFMValues;\r\n dsBeleg2Mehrwertsteuersatz5.AfterLoadDFMValues;\r\n dsBeleg2Mehrwertsteuersatz6.AfterLoadDFMValues;\r\n dsBeleg2BesteuerungKey.AfterLoadDFMValues;\r\n dsBeleg2VertreterMatchcode.AfterLoadDFMValues;\r\n dsBeleg2Verfasser.AfterLoadDFMValues;\r\n dsBeleg2LieferadresseID.AfterLoadDFMValues;\r\n dsBeleg2AuftragStatus.AfterLoadDFMValues;\r\n dsBeleg2MonatJahr.AfterLoadDFMValues;\r\n dsBeleg2Belegvariante.AfterLoadDFMValues;\r\n dsBeleg2Produktionsfreigabe.AfterLoadDFMValues;\r\n dsBeleg2ReferenzRahmenAuftrag.AfterLoadDFMValues;\r\n dsBeleg2DatumRahmenAuftrag.AfterLoadDFMValues;\r\n dsBeleg2FahrzeugID.AfterLoadDFMValues;\r\n dsBeleg2AuslieferungKW.AfterLoadDFMValues;\r\n dsBeleg2BereitstellungDatum.AfterLoadDFMValues;\r\n dsBeleg2VTUID.AfterLoadDFMValues;\r\n dsBeleg2LieferanschriftDaten.AfterLoadDFMValues;\r\n dsBeleg2GesamtVolumen.AfterLoadDFMValues;\r\n dsBeleg2BelegPKey.AfterLoadDFMValues;\r\n dsBeleg2DruckParameter.AfterLoadDFMValues;\r\n dsBeleg2ReferenzService.AfterLoadDFMValues;\r\n dsBeleg2ZusatzDaten.AfterLoadDFMValues;\r\n dsBeleg2StandPDF.AfterLoadDFMValues;\r\n dsBeleg2Paketdienst.AfterLoadDFMValues;\r\n dsBeleg2Monteur.AfterLoadDFMValues;\r\n dsBeleg2KundennummerKundennummer.AfterLoadDFMValues;\r\n dsBeleg2ServiceBemerkung.AfterLoadDFMValues;\r\n end;\r\nend;\r\n\r\nend.","unit unit_EinzelAngebot;\r\n\r\ninterface\r\n\r\nuses\r\n System.SysUtils, System.Classes, JS, Web, WEBLib.Graphics, WEBLib.Controls,\r\n WEBLib.Forms, WEBLib.Dialogs, Data.DB, WEBLib.DB, XData.Web.JsonDataset,\r\n XData.Web.Dataset, XData.Web.Connection, Vcl.Controls, Vcl.StdCtrls,\r\n WEBLib.StdCtrls, WEBLib.ExtCtrls, Vcl.Grids, WEBLib.DBCtrls, VCL.TMSFNCTypes,\r\n VCL.TMSFNCUtils, VCL.TMSFNCGraphics, VCL.TMSFNCGraphicsTypes, strutils,weblib.json,\r\n VCL.TMSFNCCustomControl, VCL.TMSFNCTableView, WEBLib.Buttons, WEBLib.Grids,\r\n VCL.TMSFNCSignatureCapture, WEBLib.Mask, dateutils,\r\n VCL.TMSFNCCustomPicker, VCL.TMSFNCDatePicker, XData.Web.Client, WEBLib.REST,\r\n DB, Vcl.Mask;\r\n\r\ntype\r\n TEinzelAngebot = class(TForm)\r\n dsBeleg: TXDataWebDataSet;\r\n SourceBeleg: TDataSource;\r\n dsPositionen: TXDataWebDataSet;\r\n sourcePositionen: TDataSource;\r\n dsPositionenArtikelnummer: TXDataWebEntityField;\r\n dsPositionenNummerkomplett: TXDataWebEntityField;\r\n dsPositionenID: TIntegerField;\r\n dsPositionenPosNr: TFloatField;\r\n dsPositionenPosUNr: TFloatField;\r\n dsPositionenSumme: TBooleanField;\r\n dsPositionenArtikelueberschrift: TStringField;\r\n dsPositionenArtikelbeschreibung: TStringField;\r\n dsPositionenMenge: TFloatField;\r\n dsPositionenArtderMenge: TStringField;\r\n dsPositionenVerkaufspreis: TFloatField;\r\n dsPositionenEinkaufspreis: TFloatField;\r\n dsPositionenSeriennummer: TStringField;\r\n dsPositionenWarengruppe: TStringField;\r\n dsPositionenWarenuntergruppe: TStringField;\r\n dsPositionenArtikelnummerKunde: TStringField;\r\n dsPositionenLieferant: TStringField;\r\n dsPositionenGewicht: TFloatField;\r\n dsPositionenLaenge: TFloatField;\r\n dsPositionenBreite: TFloatField;\r\n dsPositionenHoehe: TFloatField;\r\n dsPositionenMehrwertsteuersatz: TFloatField;\r\n dsPositionenEndpreis: TFloatField;\r\n dsPositionenPosMWST: TFloatField;\r\n dsPositionenBruttoEndpreis: TFloatField;\r\n dsPositionenEndpreis_EK: TFloatField;\r\n dsPositionenRabattsatz: TFloatField;\r\n dsPositionenPreisvorRabatt: TFloatField;\r\n dsPositionenPKZ: TFloatField;\r\n dsPositionenTextfrei10: TStringField;\r\n dsPositionenTextfrei20: TStringField;\r\n dsPositionenProduktionAbgeschlossen: TDateTimeField;\r\n dsPositionenEinzelpreisBrutto: TFloatField;\r\n dsPositionenPosMarge: TFloatField;\r\n dsPositionenPosMargeProzent: TFloatField;\r\n dsPositionenBereitsGeliefert: TFloatField;\r\n dsPositionenausliefern: TFloatField;\r\n dsPositionenBestellungErledigt: TBooleanField;\r\n dsPositionenLager: TStringField;\r\n dsPositionenbestellen: TBooleanField;\r\n dsPositionenWarenbestand: TBooleanField;\r\n dsPositionenArtikelbeschreibungRTF: TStringField;\r\n dsPositionenQuellartikel: TStringField;\r\n dsPositionenArtikelnummerWB: TStringField;\r\n dsPositionenPreisanteilNetto: TFloatField;\r\n dsPositionenSetHPos: TStringField;\r\n dsPositionenSetUPos: TStringField;\r\n dsPositionenProvisionssatz: TFloatField;\r\n dsPositionenProvisionsbetrag: TFloatField;\r\n dsPositionenArtikelsprache: TStringField;\r\n dsPositionenEKvom: TDateTimeField;\r\n dsPositionenMengenberechnungID: TStringField;\r\n dsPositionenTaraID: TStringField;\r\n dsPositionenTara: TFloatField;\r\n dsPositionenBruttoGewicht: TFloatField;\r\n dsPositionenAussenflaeche: TFloatField;\r\n dsPositionenLadeort: TStringField;\r\n dsPositionenSeitenumbruch: TBooleanField;\r\n dsPositionenPlanerFarbe: TIntegerField;\r\n dsPositionenMWStKey: TIntegerField;\r\n dsPositionenZSnachPos: TBooleanField;\r\n dsPositionenLieferzeit: TStringField;\r\n dsPositionenPreisVorRabattWHG: TFloatField;\r\n dsPositionenReferenzKalkulation: TStringField;\r\n dsPositionenPKey: TIntegerField;\r\n dsPositionenAuftragsnummer: TStringField;\r\n dsPositionenlwbID: TStringField;\r\n dsPositionenBelegdatum: TDateTimeField;\r\n dsPositionenWarenkontrollnummern: TStringField;\r\n dsPositionenVolumen: TFloatField;\r\n dsPositionenPosVolumen: TFloatField;\r\n dsPositionenArtikelAttribute: TStringField;\r\n dsPositionenMonteurP: TIntegerField;\r\n dsPositionenArbeitszeitDatum: TDateTimeField;\r\n dsPositionenArbeitszeitVON: TDateTimeField;\r\n dsPositionenArbeitszeitBIS: TDateTimeField;\r\n TC: TTableControl;\r\n dsPositionenArtikelnummerArtikelnummer: TStringField;\r\n dsPositionenArtikelnummerArbeitszeit: TBooleanField;\r\n dsSumBeleg: TXDataWebDataSet;\r\n dsSumBelegPosVolumen: TFloatField;\r\n dsSumBelegBruttoGewicht: TFloatField;\r\n dsSumBelegMehrwertsteuersatz: TFloatField;\r\n dsSumBelegEndpreis: TFloatField;\r\n dsSumBelegPosMWST: TFloatField;\r\n dsSumBelegBruttoEndpreis: TFloatField;\r\n dsSumBelegEndpreis_EK: TFloatField;\r\n dsSumBelegPKZ: TFloatField;\r\n WClient: TXDataWebClient;\r\n WebHttpRequest1: THttpRequest;\r\n dsObjekt: TXDataWebDataSet;\r\n dsObjektObjektReferenz: TStringField;\r\n dsObjektKurzbezeichnung: TStringField;\r\n dsObjektObjektnummer: TStringField;\r\n Container1: THTMLContainer;\r\n btnzurueck: TButton;\r\n Container3: THTMLContainer;\r\n Container2: THTMLContainer;\r\n PTC: TTableControl;\r\n btnSpeichern: TButton;\r\n pickLieferdatum: TDBDateTimePicker;\r\n edtAuftragsbezeichnung: TDBEdit;\r\n edtLiefertermin: TDBEdit;\r\n btnNeuePosition: TButton;\r\n Container4: THTMLContainer;\r\n dsBelegKundennummer: TXDataWebEntityField;\r\n dsBelegKundennummerKundennummer: TStringField;\r\n dsBelegNummerkomplett: TStringField;\r\n dsBelegReferenzAuftagbest: TStringField;\r\n dsBelegReferenzLieferschein: TStringField;\r\n dsBelegReferenzRechnung: TStringField;\r\n dsBelegDatum: TDateTimeField;\r\n dsBelegJahr: TFloatField;\r\n dsBelegKalenderwoche: TIntegerField;\r\n dsBelegNachname: TStringField;\r\n dsBelegVorname: TStringField;\r\n dsBelegPostleitzahl: TStringField;\r\n dsBelegOrt: TStringField;\r\n dsBelegLaenderkuerzel: TStringField;\r\n dsBelegLand: TStringField;\r\n dsBelegBriefanrede1: TStringField;\r\n dsBelegBriefanrede2: TStringField;\r\n dsBelegEMail: TStringField;\r\n dsBelegAdresseBild: TStringField;\r\n dsBelegLieferanschriftBild: TStringField;\r\n dsBelegZahlungsbedingung: TIntegerField;\r\n dsBelegZahlungsbedingungText: TStringField;\r\n dsBelegAuftragsbezeichnung: TStringField;\r\n dsBelegAuftragnummerKunde: TStringField;\r\n dsBelegBestelldatumKunde: TDateTimeField;\r\n dsBelegILN: TStringField;\r\n dsBelegKopftext: TStringField;\r\n dsBelegSchlussbemerkung: TStringField;\r\n dsBelegGruss: TStringField;\r\n dsBelegMehrwertsteuersatz1: TFloatField;\r\n dsBelegMehrwertsteuersatz2: TFloatField;\r\n dsBelegNettosumme01: TFloatField;\r\n dsBelegNettosumme02: TFloatField;\r\n dsBelegNettosumme: TFloatField;\r\n dsBelegMehrwertsteuer01: TFloatField;\r\n dsBelegMehrwertsteuer02: TFloatField;\r\n dsBelegMehrwertsteuer: TFloatField;\r\n dsBelegBruttosumme: TFloatField;\r\n dsBelegVersanddatum: TDateTimeField;\r\n dsBelegSkontosatz: TFloatField;\r\n dsBelegNettosummeEK: TFloatField;\r\n dsBelegNettoMarge: TFloatField;\r\n dsBelegSchreibzeichen: TStringField;\r\n dsBelegUnterzeichner: TStringField;\r\n dsBelegTelefonMA: TStringField;\r\n dsBelegEmailMA: TStringField;\r\n dsBelegUSTID: TStringField;\r\n dsBelegUmsatzsteuerausweis: TBooleanField;\r\n dsBeleggebucht: TBooleanField;\r\n dsBelegLieferdatum: TDateTimeField;\r\n dsBelegTransportbedingung: TStringField;\r\n dsBelegMehrwertsteuersatz3: TFloatField;\r\n dsBelegMehrwertsteuer03: TFloatField;\r\n dsBelegNettosumme03: TFloatField;\r\n dsBelegRundungsDifferenz: TFloatField;\r\n dsBelegEmailText: TStringField;\r\n dsBelegAuftragerhaltenam: TDateTimeField;\r\n dsBelegAuftragnichterhalten: TBooleanField;\r\n dsBelegRabattstufe: TStringField;\r\n dsBelegKFZKennzeichen: TStringField;\r\n dsBelegFahrgestellnummer: TStringField;\r\n dsBelegKFZHersteller: TStringField;\r\n dsBelegErstzulassungsdatum: TDateTimeField;\r\n dsBelegKMStand: TStringField;\r\n dsBelegKFZType: TStringField;\r\n dsBelegInspektionsdatum: TDateTimeField;\r\n dsBelegDebitorennummer: TStringField;\r\n dsBelegKostentraeger: TStringField;\r\n dsBelegRabattsatz: TFloatField;\r\n dsBelegObjektReferenz: TStringField;\r\n dsBelegBank: TStringField;\r\n dsBelegBankleitzahl: TFloatField;\r\n dsBelegKontonummer: TStringField;\r\n dsBelegKontoinhaber: TStringField;\r\n dsBelegTelefaxnummer: TStringField;\r\n dsBelegDatumNeu: TDateTimeField;\r\n dsBelegDatumgeaendert: TDateTimeField;\r\n dsBelegLiefertermin: TStringField;\r\n dsBelegObjektnummer: TStringField;\r\n dsBelegReferenzKalkulation: TStringField;\r\n dsBelegReferenzDatum: TDateTimeField;\r\n dsBelegEmailversand: TBooleanField;\r\n dsBelegTelefonnummer: TStringField;\r\n dsBelegMobilTelefon: TStringField;\r\n dsBelegAngebotFax: TBooleanField;\r\n dsBelegREDatum: TDateTimeField;\r\n dsBelegBenutzerNeu: TStringField;\r\n dsBelegBenutzerGeaendert: TStringField;\r\n dsBelegBerechnungBrutto: TBooleanField;\r\n dsBelegBruttosumme01: TFloatField;\r\n dsBelegBruttosumme02: TFloatField;\r\n dsBelegBruttosumme03: TFloatField;\r\n dsBelegNotiz: TStringField;\r\n dsBelegMargeProzent: TFloatField;\r\n dsBelegBelegsprache: TStringField;\r\n dsBelegDuplicate: TStringField;\r\n dsBelegperEmail: TBooleanField;\r\n dsBelegAnsprechpartner: TStringField;\r\n dsBelegKundennummerFremd: TStringField;\r\n dsBelegProtokoll: TStringField;\r\n dsBelegVerleihauftrag: TBooleanField;\r\n dsBelegVerleihVon: TDateTimeField;\r\n dsBelegVerleihBis: TDateTimeField;\r\n dsBeleggesperrt: TBooleanField;\r\n dsBelegVerleihvonText: TStringField;\r\n dsBelegVerleihbisText: TStringField;\r\n dsBelegDruckWHG: TStringField;\r\n dsBelegDruckWHGKurs: TFloatField;\r\n dsBeleggueltigbis: TDateTimeField;\r\n dsBelegProzentsatzZusatzposition: TFloatField;\r\n dsBelegTextZusatzposition: TStringField;\r\n dsBelegTextzusatzBeschreibung: TStringField;\r\n dsBelegReferenzTarifberechnung: TStringField;\r\n dsBelegLayoutname: TStringField;\r\n dsBelegGesamtgewicht: TFloatField;\r\n dsBelegBetragZusatzposition: TFloatField;\r\n dsBelegMehrwertsteuersatz4: TFloatField;\r\n dsBelegMehrwertsteuersatz5: TFloatField;\r\n dsBelegMehrwertsteuersatz6: TFloatField;\r\n dsBelegBesteuerungKey: TIntegerField;\r\n dsBelegVertreterMatchcode: TStringField;\r\n dsBelegVerfasser: TStringField;\r\n dsBelegLieferadresseID: TIntegerField;\r\n dsBelegBelegvariante: TStringField;\r\n dsBelegAuftragErwartetBis: TDateTimeField;\r\n dsBelegAuftragWahrscheinlichkeit: TFloatField;\r\n dsBelegFahrzeugID: TIntegerField;\r\n dsBelegMonatJahr: TDateTimeField;\r\n dsBelegLieferanschriftDaten: TStringField;\r\n dsBelegGesamtVolumen: TFloatField;\r\n dsBelegBelegPKey: TIntegerField;\r\n dsBelegDruckParameter: TStringField;\r\n dsBelegReferenzService: TStringField;\r\n dsDateien: TXDataWebDataSet;\r\n dsDateienID: TIntegerField;\r\n dsDateienDatumUhrzeit: TDateTimeField;\r\n dsDateienDateiBetreff: TStringField;\r\n dsDateienNummerkomplett: TStringField;\r\n btnDateien: TButton;\r\n btnDateienObjekt: TButton;\r\n btnDateienKontakt: TButton;\r\n procedure WebFormShow(Sender: TObject);\r\n procedure dsBelegAfterOpen(DataSet: TDataSet);\r\n procedure dsBelegAfterPost(DataSet: TDataSet);\r\n procedure dsBelegAfterApplyUpdates(Sender: TDataSet; Info: TResolveResults);\r\n procedure btnNeuePositionClick(Sender: TObject);\r\n procedure WebFormCloseQuery(Sender: TObject; var CanClose: Boolean);\r\n procedure dsBelegBeforePost(DataSet: TDataSet);\r\n procedure dsSumBelegAfterOpen(DataSet: TDataSet);\r\n procedure dsObjektAfterOpen(DataSet: TDataSet);\r\n procedure btnzurueckClick(Sender: TObject);\r\n procedure dsPositionenAfterOpen(DataSet: TDataSet);\r\n procedure SourceBelegStateChange(Sender: TObject);\r\n procedure btnSpeichernClick(Sender: TObject);\r\n procedure pickLieferdatumClick(Sender: TObject);\r\n procedure dsDateienAfterOpen(DataSet: TDataSet);\r\n procedure btnDateienClick(Sender: TObject);\r\n procedure btnDateienObjektClick(Sender: TObject);\r\n procedure btnDateienKontaktClick(Sender: TObject);\r\n\r\n public\r\n\r\n\r\n MerkerAngebot:string;\r\n NeuePosition:boolean;\r\n LetztePosNr:double;\r\n PositionsID:string;\r\n Belegart:string;\r\n Belegvariante:string;\r\n Belegnummer:string;\r\n Artikelnummer:string;\r\n\r\n Monteurstringlist:TStringList;\r\n btnObjektWahl:TButton;\r\n buttonBearbeiten:TButton;\r\n\r\n\r\n procedure btnObjektWahlClick(Sender:TObject);\r\n procedure buttonBearbeitenclick(Sender:TObject);\r\n protected procedure LoadDFMValues; override; end;\r\n\r\nvar\r\n EinzelAngebot: TEinzelAngebot;\r\n\r\n\r\nimplementation\r\n uses unit1, unit2, unit_ArtikelSuche, unit_Objektsuche, unit_AngebotPosEinzel, unit_Dateien;\r\n{$R *.dfm}\r\n\r\n\r\n\r\nprocedure TEinzelAngebot.buttonBearbeitenclick(sender:TObject);\r\nvar\r\n AngebotPosEinzel:TAngebotPosEinzel;\r\n MyPositionsID:string;\r\n myArtikelnummer:string;\r\nbegin\r\n myPositionsID:=inttostr((sender as TButton).tag);\r\n myArtikelnummer:=(sender as TButton).Hint;\r\n Container4.HTML.text:='';\r\n Container3.HTML.Text:='';\r\n AngebotPosEinzel:=TAngebotPosEinzel.CreateNew(procedure(AForm: TObject)\r\n begin\r\n (AForm as TAngebotPosEinzel).PositionsID:=myPositionsID;\r\n (AForm as TAngebotPosEinzel).tmpArtikelnummer:=myArtikelnummer;\r\n (AForm as TAngebotPosEinzel).tmpKundennummer:=dsBelegKundennummerKundennummer.AsString;\r\n (AForm as TAngebotPosEinzel).tmpMerkerAngebot:=MerkerAngebot;\r\n (AForm as TAngebotPosEinzel).NeuePosition:=False;\r\n end\r\n );\r\n AngebotPosEinzel.ShowModal(procedure(AValue: TModalResult)\r\n begin\r\n dsSumBeleg.Close;\r\n dsSumBeleg.QueryString:='$filter=Nummerkomplett eq '+QuotedStr(MerkerAngebot);\r\n dsSumBeleg.Load;\r\n end\r\n );\r\nend;\r\n\r\n\r\n\r\n\r\nprocedure TEinzelAngebot.btnObjektWahlClick(Sender:TObject);\r\nvar\r\n LFrm:TfrmObjektsuche;\r\n procedure AfterCreate(AForm:TObject);\r\n var\r\n LForm:TfrmObjektsuche;\r\n begin\r\n LForm:=(AForm as TfrmObjektsuche);\r\n lform.Objektreferenz:='';\r\n\r\n end;\r\n\r\n procedure AfterShowmodal(Avalue:TModalResult);\r\n begin\r\n if lfrm.Objektreferenz<>'' then\r\n begin\r\n dsobjekt.Close;\r\n dsobjekt.QueryString:='$filter=Objektreferenz eq '+QuotedStr(lfrm.Objektreferenz);\r\n dsobjekt.Load;\r\n end;\r\n\r\n\r\n end;\r\n\r\n begin\r\n LFrm:=TfrmObjektsuche.CreateNew(@AfterCreate);\r\n // LFrm.Popup:=true;\r\n LFrm.ShowModal(@AfterShowmodal);\r\n\r\nend;\r\n\r\nprocedure TEinzelAngebot.dsBelegAfterApplyUpdates(Sender: TDataSet;\r\n Info: TResolveResults);\r\nbegin\r\n dsPositionen.Close;\r\n dsBeleg.Close;\r\n dsBeleg.QueryString:='$expand=Kundennummer&$filter=Nummerkomplett eq '+QuotedStr(MerkerAngebot);\r\n dsBeleg.Load;\r\nend;\r\n\r\nprocedure TEinzelAngebot.dsBelegAfterOpen(DataSet: TDataSet);\r\nvar\r\n myelement:TJSHTMLElement;\r\nbegin\r\n Container1.html.text:='';\r\n //Container2.HTML.Text:='';\r\n myelement:=container2.ElementHandle;\r\n btnzurueck.ParentElement:=myelement;\r\n btnspeichern.ParentElement:=myelement;\r\n myelement:=container3.elementhandle;\r\n TC.ParentElement:=myelement;\r\n myelement:=container4.elementhandle;\r\n PTC.ParentElement:=myelement;\r\n\r\n\r\n\r\n TC.RowCount:=14;\r\n TC.Cells[0,0]:='Angebotssnummer | Datum';\r\n TC.Cells[0,1]:='Kundennummer';\r\n myelement:=TC.cellelements[0,1];\r\n btnDateienKontakt.ParentElement:=myelement;\r\n TC.Cells[0,2]:='Anschrift';\r\n TC.Cells[0,3]:='Anfrage-Datum | -Nr.';\r\n TC.Cells[0,4]:='Objektnr.';\r\n TC.Cells[0,5]:='Auftragsbezeichnung';\r\n TC.Cells[0,6]:='Lieferdatum';\r\n TC.Cells[0,7]:='Liefertermin';\r\n\r\n TC.Cells[0,8]:='Netto';\r\n TC.Cells[0,9]:='Lieferanschrift';\r\n TC.Cells[0,10]:='Versanddatum';\r\n TC.Cells[0,11]:='Rechnung Nr. | -Datum';\r\n TC.Cells[0,12]:='Unterzeichner';\r\n TC.Cells[0,13]:='Dateien';\r\n\r\n\r\n myelement:=tc.CellElements[1,5];\r\n edtAuftragsbezeichnung.ParentElement:=myelement;\r\n\r\n myelement:=tc.CellElements[1,6];\r\n picklieferdatum.ParentElement:=myelement;\r\n\r\n myelement:=tc.CellElements[1,7];\r\n edtLiefertermin.ParentElement:=myelement;\r\n\r\n myelement:=TC.cellelements[0,13];\r\n btnDateien.ParentElement:=myelement;\r\n\r\n\r\n\r\n\r\n if dsBeleggesperrt.AsBoolean=true then\r\n begin\r\n TC.Cells[1,0]:='
'+dsbelegNummerkomplett.asstring +' | '+formatdatetime('DD.MM.YYYY',dsbelegDatum.asdatetime)+' | GESPERRT';\r\n end\r\n else\r\n begin\r\n TC.Cells[1,0]:='
'+dsbelegNummerkomplett.asstring +' | '+formatdatetime('DD.MM.YYYY',dsbelegDatum.asdatetime)+' | Bearbeitung möglich';\r\n end;\r\n TC.Cells[1,1]:='
'+dsBelegKundennummerKundennummer.asstring;\r\n TC.Cells[1,2]:='
'+ReplaceStr(dsbelegAdresseBild.asstring,#13+#10,'
');\r\n TC.Cells[1,3]:=formatdatetime('DD.MM.YYYY',dsbelegBestelldatumKunde.Asdatetime)+' | '+dsbelegAuftragnummerKunde.Asstring;\r\n TC.Cells[1,4]:=dsbelegObjektnummer.Asstring;\r\n myelement:=TC.cellelements[0,4];\r\n btnDateienObjekt.ParentElement:=myelement;\r\n\r\n if dsbeleggesperrt.asboolean=false then\r\n begin\r\n myelement:=TC.cellelements[1,4];\r\n btnObjektWahl:=TButton.Create(self);\r\n btnObjektWahl.ElementClassName:='btn btn-info btn-sm text-left';\r\n btnObjektWahl.HeightStyle:=ssauto;\r\n btnObjektWahl.WidthStyle:=ssauto;\r\n btnObjektWahl.tag:=0;\r\n btnObjektWahl.Caption:='ändern';\r\n btnObjektWahl.OnClick:=@btnObjektWahlClick;\r\n btnObjektWahl.ElementPosition:=epIgnore;\r\n btnObjektWahl.ParentElement:=myelement;\r\n end;\r\n\r\n\r\n\r\n\r\n if form1.rcw.Verkaufspreise=TRUE then TC.Cells[1,8]:=formatfloat('#,##0.00',dsbelegNettosumme.Asfloat);\r\n if form1.rcw.Verkaufspreise=FALSE then TC.Cells[1,8]:='XXX';\r\n TC.Cells[1,9]:=ReplaceStr(dsBelegLieferanschriftBild.Asstring,#13+#10,'
');\r\n if dsbelegversanddatum.AsString<>'' then TC.Cells[1,10]:=Formatdatetime('DD.MM.YYYY',dsbelegVersanddatum.Asdatetime);\r\n TC.Cells[1,11]:=dsbelegreferenzrechnung.AsString+' | '+dsbelegREDatum.AsString;\r\n TC.Cells[1,12]:=dsbelegUnterzeichner.AsString;\r\n\r\n\r\n dsdateien.close;\r\n dsdateien.querystring:='$select=ID,DatumUhrzeit, DateiBetreff&$filter=Nummerkomplett eq '+ QuotedStr(MerkerAngebot)+'&$orderby=ID';\r\n Dsdateien.load;\r\n\r\nend;\r\n\r\nprocedure TEinzelAngebot.dsBelegAfterPost(DataSet: TDataSet);\r\nbegin\r\n if LizenzOK then\r\n begin\r\n dsBeleg.ApplyUpdates;\r\n end\r\n else\r\n begin\r\n showmessage('Für das Speichern von Daten sind Sie noch nicht freigeschaltet, bitte erwerben Sie eine Lizenz');\r\n end;\r\nend;\r\n\r\nprocedure TEinzelAngebot.dsBelegBeforePost(DataSet: TDataSet);\r\nvar\r\n tempnettosumme:double;\r\n tempnettosumme01:double;\r\n tempnettosumme02:double;\r\n tempnettosumme03:double;\r\n tempnettosummeEK:double;\r\nbegin\r\n\r\n\r\n if dssumBeleg.Active then\r\n begin\r\n if dsSumBeleg.RecordCount>0 then\r\n begin\r\n tempnettosumme:=0;\r\n tempnettosumme01:=0;\r\n tempnettosumme02:=0;\r\n tempnettosumme03:=0;\r\n tempnettosummeEK:=0;\r\n dsSumBeleg.First;\r\n\r\n while not dsSumBeleg.eof do\r\n begin\r\n tempnettosumme:=tempnettosumme+dsSumBelegEndpreis.AsFloat;\r\n if dsSumBelegPKZ.AsFloat=0 then tempnettosummeEK:=tempnettosummeEK+dsSumBelegEndpreis_EK.AsFloat;\r\n if dsBelegMehrwertsteuersatz1.AsFloat=dsSumBelegMehrwertsteuersatz.asfloat then\r\n begin\r\n tempnettosumme01:=tempnettosumme01+dsSumBelegEndpreis.AsFloat;\r\n end;\r\n if dsBelegMehrwertsteuersatz2.AsFloat=dsSumBelegMehrwertsteuersatz.asfloat then\r\n begin\r\n tempnettosumme02:=tempnettosumme02+dsSumBelegEndpreis.AsFloat;\r\n end;\r\n if dsBelegMehrwertsteuersatz3.AsFloat=dsSumBelegMehrwertsteuersatz.asfloat then\r\n begin\r\n tempnettosumme03:=tempnettosumme03+dsSumBelegEndpreis.AsFloat;\r\n end;\r\n dsSumBeleg.Next;\r\n end;\r\n\r\n dsBelegNettosumme.AsFloat:=tempnettosumme;\r\n dsBelegNettosumme01.AsFloat:=tempnettosumme01;\r\n dsBelegNettosumme02.AsFloat:=tempnettosumme02;\r\n dsBelegNettosumme03.AsFloat:=tempnettosumme03;\r\n dsBelegNettosummeEK.AsFloat:=tempnettosummeEK;\r\n\r\n\r\n end;\r\n end;\r\n dsSumBeleg.Close;\r\n dsbelegprotokoll.asstring:=dsbelegprotokoll.asstring+datetimetostr(date+time)+' CadiaWEB '+ BenutzerSchreibzeichen+#13+#10;\r\n\r\nend;\r\n\r\nprocedure TEinzelAngebot.dsDateienAfterOpen(DataSet: TDataSet);\r\nvar\r\n tempstringdateien:string;\r\nbegin\r\n dsdateien.first;\r\n while not dsdateien.eof do\r\n begin\r\n tempstringdateien:=tempstringdateien+formatdatetime('DD.MM.YYYY hh:mm:ss',dsdateiendatumuhrzeit.asdatetime)+' | '+dsdateiendateibetreff.asstring+'
';\r\n dsdateien.next;\r\n end;\r\n TC.cells[1,13]:=tempstringdateien;\r\n\r\n dsPositionen.QueryString:='$expand=Artikelnummer&$filter=Nummerkomplett eq '+QuotedStr(MerkerAngebot)+'&$orderby=PosNr';\r\n dsPositionen.Load;\r\nend;\r\n\r\nprocedure TEinzelAngebot.dsObjektAfterOpen(DataSet: TDataSet);\r\nbegin\r\n dsbeleg.Edit;\r\n dsbelegObjektReferenz.AsString:=dsObjektObjektReferenz.AsString;\r\n dsbelegObjektnummer.AsString:=dsObjektObjektnummer.AsString;\r\n dsobjekt.Close;\r\n dsbeleg.post;\r\nend;\r\n\r\nprocedure TEinzelAngebot.dsPositionenAfterOpen(DataSet: TDataSet);\r\nvar\r\n I: Integer;\r\n myelement:TJSHTMLElement;\r\nbegin\r\n PTC.RowCount:=dsPositionen.RecordCount+1;\r\n PTC.ColCount:=4;\r\n myelement:=PTC.CellElements[0,0];\r\n btnNeuePosition.ParentElement:=myelement;\r\n PTC.Cells[1,0]:='Positionen/Artikel';\r\n PTC.Cells[2,0]:='Menge';\r\n PTC.Cells[3,0]:='Preise';\r\n //PTC.Cells[7,0]:='Endpreis';\r\n\r\n dspositionen.First;\r\n for I := 1 to dspositionen.RecordCount do\r\n begin\r\n PTC.Cells[0,i]:=dspositionen.FieldByName('PosNr').AsString+'.'+dspositionen.FieldByName('PosUNr').AsString+'
';\r\n\r\n myelement:=PTC.cellelements[0,i];\r\n buttonBearbeiten:=TButton.Create(self);\r\n buttonBearbeiten.ElementClassName:='btn btn-info btn-sm text-left';\r\n buttonBearbeiten.HeightStyle:=ssauto;\r\n buttonBearbeiten.WidthStyle:=ssauto;\r\n buttonBearbeiten.TabStop:=false;\r\n buttonBearbeiten.tag:=dsPositionenID.asinteger;\r\n buttonBearbeiten.Hint:=dsPositionenArtikelnummerArtikelnummer.AsString;\r\n buttonBearbeiten.Caption:='bearbeiten';\r\n buttonBearbeiten.ElementPosition:=epIgnore;\r\n buttonBearbeiten.OnClick:=@buttonBearbeitenClick;\r\n buttonBearbeiten.ParentElement:=myelement;\r\n\r\n PTC.Cells[1,i]:=dspositionen.FieldByName('Artikelnummer.Artikelnummer').AsString+'
'+dspositionen.FieldByName('Artikelueberschrift').AsString+'
'+leftstr(dspositionenArtikelbeschreibung.AsString,250)+'
'+dsPositionenMonteurP.AsString;;\r\n PTC.Cells[2,i]:='

'+dspositionen.FieldByName('Menge').AsString + '
'+dsPositionenArtderMenge.asstring;\r\n if form1.rcw.Verkaufspreise=true then PTC.Cells[3,i]:='

'+formatfloat('#,##0.00',dsPositionenVerkaufspreis.Asfloat)+'
'+formatfloat('#,##0.00',dsPositionenEndpreis.Asfloat);\r\n if form1.rcw.Verkaufspreise=false then PTC.Cells[3,i]:='

XXX';\r\n //if not einkauf then PTC.Cells[6,i]:='

'+formatfloat('#,##0.00',xdsPositionen.fieldbyname('Verkaufspreis').asfloat);\r\n //if not einkauf then PTC.Cells[7,i]:='

'+formatfloat('#,##0.00',xdsPositionen.fieldbyname('Endpreis').asfloat);\r\n dspositionen.Next;\r\n end;\r\nend;\r\n\r\nprocedure TEinzelAngebot.dsSumBelegAfterOpen(DataSet: TDataSet);\r\nbegin\r\n dsbeleg.Edit;\r\n dsbeleg.Post;\r\nend;\r\n\r\nprocedure TEinzelAngebot.pickLieferdatumClick(Sender: TObject);\r\nbegin\r\n if dsBelegLieferdatum.AsString='' then\r\n begin\r\n dsbeleg.Edit;\r\n dsbeleglieferdatum.AsDateTime:=date;\r\n end;\r\nend;\r\n\r\nprocedure TEinzelAngebot.SourceBelegStateChange(Sender: TObject);\r\nbegin\r\n if dsBeleg.State in dseditmodes then btnspeichern.Enabled:=true else btnspeichern.Enabled:=false;\r\nend;\r\n\r\nprocedure TEinzelAngebot.btnDateienClick(Sender: TObject);\r\nvar\r\n LFrm:TfrmDateien;\r\n procedure AfterCreate(AForm:TObject);\r\n var\r\n LForm:TfrmDateien;\r\n begin\r\n LForm:=(AForm as TfrmDateien);\r\n lform.MerkerObjektreferenz:=dsBelegObjektReferenz.asstring;\r\n lform.MerkerNummerkomplett:=MerkerAngebot;\r\n lform.MerkerKundennummer:=dsBelegKundennummerKundennummer.AsString;\r\n lform.MerkerFahrzeugID:='';\r\n lform.MerkerName:=trim(dsbelegvorname.asstring+' '+ dsBelegNachname.AsString);\r\n lform.MerkerArt:='Angebot';\r\n lform.HeadlineText:='Dateien zu Angebot '+dsBelegNummerkomplett.AsString+' | '+dsBelegAuftragsbezeichnung.AsString;\r\n end;\r\n\r\n procedure AfterShowmodal(Avalue:TModalResult);\r\n begin\r\n dsdateien.Close;\r\n dsPositionen.Close;\r\n dsBeleg.Close;\r\n dsBeleg.QueryString:='$expand=Kundennummer&$filter=Nummerkomplett eq '+QuotedStr(MerkerAngebot);\r\n dsBeleg.Load;\r\n end;\r\n\r\n begin\r\n Container4.HTML.text:='';\r\n Container3.HTML.Text:='';\r\n LFrm:=TfrmDateien.CreateNew(@AfterCreate);\r\n LFrm.ShowModal(@AfterShowmodal);\r\n\r\nend;\r\n\r\nprocedure TEinzelAngebot.btnDateienKontaktClick(Sender: TObject);\r\nvar\r\n LFrm:TfrmDateien;\r\n procedure AfterCreate(AForm:TObject);\r\n var\r\n LForm:TfrmDateien;\r\n begin\r\n LForm:=(AForm as TfrmDateien);\r\n lform.MerkerObjektreferenz:=dsBelegObjektReferenz.asstring;\r\n lform.MerkerNummerkomplett:=MerkerAngebot;\r\n lform.MerkerKundennummer:=dsBelegKundennummerKundennummer.AsString;\r\n lform.MerkerFahrzeugID:='';\r\n lform.MerkerName:=trim(dsbelegvorname.asstring+' '+ dsBelegNachname.AsString);\r\n lform.MerkerArt:='Kontakt';\r\n lform.HeadlineText:='Dateien zu Kontakt '+dsBelegKundennummerKundennummer.AsString+' | '+dsBelegNachname.AsString;\r\n end;\r\n\r\n procedure AfterShowmodal(Avalue:TModalResult);\r\n begin\r\n dsdateien.Close;\r\n dsPositionen.Close;\r\n dsBeleg.Close;\r\n dsBeleg.QueryString:='$expand=Kundennummer&$filter=Nummerkomplett eq '+QuotedStr(MerkerAngebot);\r\n dsBeleg.Load;\r\n end;\r\n\r\n begin\r\n If dsBelegKundennummerKundennummer.AsString<>'' then\r\n begin\r\n Container4.HTML.text:='';\r\n Container3.HTML.Text:='';\r\n LFrm:=TfrmDateien.CreateNew(@AfterCreate);\r\n LFrm.ShowModal(@AfterShowmodal);\r\n end;\r\n\r\nend;\r\n\r\nprocedure TEinzelAngebot.btnDateienObjektClick(Sender: TObject);\r\nvar\r\n LFrm:TfrmDateien;\r\n procedure AfterCreate(AForm:TObject);\r\n var\r\n LForm:TfrmDateien;\r\n begin\r\n LForm:=(AForm as TfrmDateien);\r\n lform.MerkerObjektreferenz:=dsBelegObjektReferenz.asstring;\r\n lform.MerkerNummerkomplett:=MerkerAngebot;\r\n lform.MerkerKundennummer:=dsBelegKundennummerKundennummer.AsString;\r\n lform.MerkerFahrzeugID:='';\r\n lform.MerkerName:=trim(dsbelegvorname.asstring+' '+ dsBelegNachname.AsString);\r\n lform.MerkerArt:='Objekt';\r\n lform.HeadlineText:='Dateien zu Objekt '+dsBelegObjektnummer.AsString;\r\n end;\r\n\r\n procedure AfterShowmodal(Avalue:TModalResult);\r\n begin\r\n dsdateien.Close;\r\n dsPositionen.Close;\r\n dsBeleg.Close;\r\n dsBeleg.QueryString:='$expand=Kundennummer&$filter=Nummerkomplett eq '+QuotedStr(MerkerAngebot);\r\n dsBeleg.Load;\r\n end;\r\n\r\n begin\r\n if dsBelegObjektReferenz.asstring<>'' then\r\n begin\r\n Container4.HTML.text:='';\r\n Container3.HTML.Text:='';\r\n LFrm:=TfrmDateien.CreateNew(@AfterCreate);\r\n LFrm.ShowModal(@AfterShowmodal);\r\n end;\r\nend;\r\n\r\nprocedure TEinzelAngebot.btnNeuePositionClick(Sender: TObject);\r\nvar\r\n AngebotPosEinzel:TAngebotPosEinzel;\r\nbegin\r\n if dspositionen.RecordCount>0 then\r\n begin\r\n dsPositionen.Last;\r\n positionsid:=dsPositionenID.AsString;\r\n LetztePosNr:=dsPositionenPosNr.AsFloat;\r\n end\r\n else\r\n begin\r\n LetztePosNr:=0;\r\n positionsid:='';\r\n end;\r\n Container4.HTML.text:='';\r\n Container3.HTML.Text:='';\r\n\r\n AngebotPosEinzel:=TAngebotPosEinzel.CreateNew(procedure(BForm: TObject)\r\n begin\r\n (BForm as TAngebotPosEinzel).PositionsID:='';\r\n (BForm as TAngebotPosEinzel).tmpArtikelnummer:='';\r\n (BForm as TAngebotPosEinzel).tmpKundennummer:=dsBelegKundennummerKundennummer.AsString;\r\n (BForm as TAngebotPosEinzel).tmpMerkerAngebot:=MerkerAngebot;\r\n (BForm as TAngebotPosEinzel).NeuePosition:=True;\r\n (BForm as TAngebotPosEinzel).tmpletztePosNr:=LetztePosNr;\r\n end\r\n );\r\n AngebotPosEinzel.ShowModal(procedure(AValue: TModalResult)\r\n begin\r\n dsSumBeleg.Close;\r\n dsSumBeleg.QueryString:='$filter=Nummerkomplett eq '+QuotedStr(MerkerAngebot);\r\n dsSumBeleg.Load;\r\n end\r\n );\r\n\r\nend;\r\n\r\nprocedure TEinzelAngebot.btnSpeichernClick(Sender: TObject);\r\nbegin\r\n dsbeleg.Post;\r\nend;\r\n\r\nprocedure TEinzelAngebot.btnzurueckClick(Sender: TObject);\r\nbegin\r\ndspositionen.Close;\r\ndsbeleg.Close;\r\nself.Close;\r\nend;\r\n\r\nprocedure TEinzelAngebot.WebFormCloseQuery(Sender: TObject;\r\n var CanClose: Boolean);\r\nbegin\r\n monteurstringlist.Free;\r\n\r\nend;\r\n\r\nprocedure TEinzelAngebot.WebFormShow(Sender: TObject);\r\n var\r\n myelement:TJSHTMLElement;\r\nbegin\r\n\r\n\r\n if MerkerAngebot<>'' then\r\n begin\r\n dsPositionen.Close;\r\n dsBeleg.Close;\r\n dsBeleg.QueryString:='$expand=Kundennummer&$filter=Nummerkomplett eq '+QuotedStr(MerkerAngebot);\r\n dsBeleg.Load;\r\n end;\r\nend;\r\n\r\nprocedure TEinzelAngebot.LoadDFMValues;\r\nbegin\r\n inherited LoadDFMValues;\r\n\r\n TC := TTableControl.Create(Self);\r\n Container1 := THTMLContainer.Create(Self);\r\n btnzurueck := TButton.Create(Self);\r\n Container3 := THTMLContainer.Create(Self);\r\n Container2 := THTMLContainer.Create(Self);\r\n PTC := TTableControl.Create(Self);\r\n btnSpeichern := TButton.Create(Self);\r\n pickLieferdatum := TDBDateTimePicker.Create(Self);\r\n edtAuftragsbezeichnung := TDBEdit.Create(Self);\r\n edtLiefertermin := TDBEdit.Create(Self);\r\n btnNeuePosition := TButton.Create(Self);\r\n Container4 := THTMLContainer.Create(Self);\r\n btnDateien := TButton.Create(Self);\r\n btnDateienObjekt := TButton.Create(Self);\r\n btnDateienKontakt := TButton.Create(Self);\r\n dsBeleg := TXDataWebDataSet.Create(Self);\r\n dsBelegKundennummer := TXDataWebEntityField.Create(Self);\r\n dsBelegKundennummerKundennummer := TStringField.Create(Self);\r\n dsBelegNummerkomplett := TStringField.Create(Self);\r\n dsBelegReferenzAuftagbest := TStringField.Create(Self);\r\n dsBelegReferenzLieferschein := TStringField.Create(Self);\r\n dsBelegReferenzRechnung := TStringField.Create(Self);\r\n dsBelegDatum := TDateTimeField.Create(Self);\r\n dsBelegJahr := TFloatField.Create(Self);\r\n dsBelegKalenderwoche := TIntegerField.Create(Self);\r\n dsBelegNachname := TStringField.Create(Self);\r\n dsBelegVorname := TStringField.Create(Self);\r\n dsBelegPostleitzahl := TStringField.Create(Self);\r\n dsBelegOrt := TStringField.Create(Self);\r\n dsBelegLaenderkuerzel := TStringField.Create(Self);\r\n dsBelegLand := TStringField.Create(Self);\r\n dsBelegBriefanrede1 := TStringField.Create(Self);\r\n dsBelegBriefanrede2 := TStringField.Create(Self);\r\n dsBelegEMail := TStringField.Create(Self);\r\n dsBelegAdresseBild := TStringField.Create(Self);\r\n dsBelegLieferanschriftBild := TStringField.Create(Self);\r\n dsBelegZahlungsbedingung := TIntegerField.Create(Self);\r\n dsBelegZahlungsbedingungText := TStringField.Create(Self);\r\n dsBelegAuftragsbezeichnung := TStringField.Create(Self);\r\n dsBelegAuftragnummerKunde := TStringField.Create(Self);\r\n dsBelegBestelldatumKunde := TDateTimeField.Create(Self);\r\n dsBelegILN := TStringField.Create(Self);\r\n dsBelegKopftext := TStringField.Create(Self);\r\n dsBelegSchlussbemerkung := TStringField.Create(Self);\r\n dsBelegGruss := TStringField.Create(Self);\r\n dsBelegMehrwertsteuersatz1 := TFloatField.Create(Self);\r\n dsBelegMehrwertsteuersatz2 := TFloatField.Create(Self);\r\n dsBelegNettosumme01 := TFloatField.Create(Self);\r\n dsBelegNettosumme02 := TFloatField.Create(Self);\r\n dsBelegNettosumme := TFloatField.Create(Self);\r\n dsBelegMehrwertsteuer01 := TFloatField.Create(Self);\r\n dsBelegMehrwertsteuer02 := TFloatField.Create(Self);\r\n dsBelegMehrwertsteuer := TFloatField.Create(Self);\r\n dsBelegBruttosumme := TFloatField.Create(Self);\r\n dsBelegVersanddatum := TDateTimeField.Create(Self);\r\n dsBelegSkontosatz := TFloatField.Create(Self);\r\n dsBelegNettosummeEK := TFloatField.Create(Self);\r\n dsBelegNettoMarge := TFloatField.Create(Self);\r\n dsBelegSchreibzeichen := TStringField.Create(Self);\r\n dsBelegUnterzeichner := TStringField.Create(Self);\r\n dsBelegTelefonMA := TStringField.Create(Self);\r\n dsBelegEmailMA := TStringField.Create(Self);\r\n dsBelegUSTID := TStringField.Create(Self);\r\n dsBelegUmsatzsteuerausweis := TBooleanField.Create(Self);\r\n dsBeleggebucht := TBooleanField.Create(Self);\r\n dsBelegLieferdatum := TDateTimeField.Create(Self);\r\n dsBelegTransportbedingung := TStringField.Create(Self);\r\n dsBelegMehrwertsteuersatz3 := TFloatField.Create(Self);\r\n dsBelegMehrwertsteuer03 := TFloatField.Create(Self);\r\n dsBelegNettosumme03 := TFloatField.Create(Self);\r\n dsBelegRundungsDifferenz := TFloatField.Create(Self);\r\n dsBelegEmailText := TStringField.Create(Self);\r\n dsBelegAuftragerhaltenam := TDateTimeField.Create(Self);\r\n dsBelegAuftragnichterhalten := TBooleanField.Create(Self);\r\n dsBelegRabattstufe := TStringField.Create(Self);\r\n dsBelegKFZKennzeichen := TStringField.Create(Self);\r\n dsBelegFahrgestellnummer := TStringField.Create(Self);\r\n dsBelegKFZHersteller := TStringField.Create(Self);\r\n dsBelegErstzulassungsdatum := TDateTimeField.Create(Self);\r\n dsBelegKMStand := TStringField.Create(Self);\r\n dsBelegKFZType := TStringField.Create(Self);\r\n dsBelegInspektionsdatum := TDateTimeField.Create(Self);\r\n dsBelegDebitorennummer := TStringField.Create(Self);\r\n dsBelegKostentraeger := TStringField.Create(Self);\r\n dsBelegRabattsatz := TFloatField.Create(Self);\r\n dsBelegObjektReferenz := TStringField.Create(Self);\r\n dsBelegBank := TStringField.Create(Self);\r\n dsBelegBankleitzahl := TFloatField.Create(Self);\r\n dsBelegKontonummer := TStringField.Create(Self);\r\n dsBelegKontoinhaber := TStringField.Create(Self);\r\n dsBelegTelefaxnummer := TStringField.Create(Self);\r\n dsBelegDatumNeu := TDateTimeField.Create(Self);\r\n dsBelegDatumgeaendert := TDateTimeField.Create(Self);\r\n dsBelegLiefertermin := TStringField.Create(Self);\r\n dsBelegObjektnummer := TStringField.Create(Self);\r\n dsBelegReferenzKalkulation := TStringField.Create(Self);\r\n dsBelegReferenzDatum := TDateTimeField.Create(Self);\r\n dsBelegEmailversand := TBooleanField.Create(Self);\r\n dsBelegTelefonnummer := TStringField.Create(Self);\r\n dsBelegMobilTelefon := TStringField.Create(Self);\r\n dsBelegAngebotFax := TBooleanField.Create(Self);\r\n dsBelegREDatum := TDateTimeField.Create(Self);\r\n dsBelegBenutzerNeu := TStringField.Create(Self);\r\n dsBelegBenutzerGeaendert := TStringField.Create(Self);\r\n dsBelegBerechnungBrutto := TBooleanField.Create(Self);\r\n dsBelegBruttosumme01 := TFloatField.Create(Self);\r\n dsBelegBruttosumme02 := TFloatField.Create(Self);\r\n dsBelegBruttosumme03 := TFloatField.Create(Self);\r\n dsBelegNotiz := TStringField.Create(Self);\r\n dsBelegMargeProzent := TFloatField.Create(Self);\r\n dsBelegBelegsprache := TStringField.Create(Self);\r\n dsBelegDuplicate := TStringField.Create(Self);\r\n dsBelegperEmail := TBooleanField.Create(Self);\r\n dsBelegAnsprechpartner := TStringField.Create(Self);\r\n dsBelegKundennummerFremd := TStringField.Create(Self);\r\n dsBelegProtokoll := TStringField.Create(Self);\r\n dsBelegVerleihauftrag := TBooleanField.Create(Self);\r\n dsBelegVerleihVon := TDateTimeField.Create(Self);\r\n dsBelegVerleihBis := TDateTimeField.Create(Self);\r\n dsBeleggesperrt := TBooleanField.Create(Self);\r\n dsBelegVerleihvonText := TStringField.Create(Self);\r\n dsBelegVerleihbisText := TStringField.Create(Self);\r\n dsBelegDruckWHG := TStringField.Create(Self);\r\n dsBelegDruckWHGKurs := TFloatField.Create(Self);\r\n dsBeleggueltigbis := TDateTimeField.Create(Self);\r\n dsBelegProzentsatzZusatzposition := TFloatField.Create(Self);\r\n dsBelegTextZusatzposition := TStringField.Create(Self);\r\n dsBelegTextzusatzBeschreibung := TStringField.Create(Self);\r\n dsBelegReferenzTarifberechnung := TStringField.Create(Self);\r\n dsBelegLayoutname := TStringField.Create(Self);\r\n dsBelegGesamtgewicht := TFloatField.Create(Self);\r\n dsBelegBetragZusatzposition := TFloatField.Create(Self);\r\n dsBelegMehrwertsteuersatz4 := TFloatField.Create(Self);\r\n dsBelegMehrwertsteuersatz5 := TFloatField.Create(Self);\r\n dsBelegMehrwertsteuersatz6 := TFloatField.Create(Self);\r\n dsBelegBesteuerungKey := TIntegerField.Create(Self);\r\n dsBelegVertreterMatchcode := TStringField.Create(Self);\r\n dsBelegVerfasser := TStringField.Create(Self);\r\n dsBelegLieferadresseID := TIntegerField.Create(Self);\r\n dsBelegBelegvariante := TStringField.Create(Self);\r\n dsBelegAuftragErwartetBis := TDateTimeField.Create(Self);\r\n dsBelegAuftragWahrscheinlichkeit := TFloatField.Create(Self);\r\n dsBelegFahrzeugID := TIntegerField.Create(Self);\r\n dsBelegMonatJahr := TDateTimeField.Create(Self);\r\n dsBelegLieferanschriftDaten := TStringField.Create(Self);\r\n dsBelegGesamtVolumen := TFloatField.Create(Self);\r\n dsBelegBelegPKey := TIntegerField.Create(Self);\r\n dsBelegDruckParameter := TStringField.Create(Self);\r\n dsBelegReferenzService := TStringField.Create(Self);\r\n SourceBeleg := TDataSource.Create(Self);\r\n dsPositionen := TXDataWebDataSet.Create(Self);\r\n dsPositionenArtikelnummer := TXDataWebEntityField.Create(Self);\r\n dsPositionenNummerkomplett := TXDataWebEntityField.Create(Self);\r\n dsPositionenID := TIntegerField.Create(Self);\r\n dsPositionenPosNr := TFloatField.Create(Self);\r\n dsPositionenPosUNr := TFloatField.Create(Self);\r\n dsPositionenSumme := TBooleanField.Create(Self);\r\n dsPositionenArtikelueberschrift := TStringField.Create(Self);\r\n dsPositionenArtikelbeschreibung := TStringField.Create(Self);\r\n dsPositionenMenge := TFloatField.Create(Self);\r\n dsPositionenArtderMenge := TStringField.Create(Self);\r\n dsPositionenVerkaufspreis := TFloatField.Create(Self);\r\n dsPositionenEinkaufspreis := TFloatField.Create(Self);\r\n dsPositionenSeriennummer := TStringField.Create(Self);\r\n dsPositionenWarengruppe := TStringField.Create(Self);\r\n dsPositionenWarenuntergruppe := TStringField.Create(Self);\r\n dsPositionenArtikelnummerKunde := TStringField.Create(Self);\r\n dsPositionenLieferant := TStringField.Create(Self);\r\n dsPositionenGewicht := TFloatField.Create(Self);\r\n dsPositionenLaenge := TFloatField.Create(Self);\r\n dsPositionenBreite := TFloatField.Create(Self);\r\n dsPositionenHoehe := TFloatField.Create(Self);\r\n dsPositionenMehrwertsteuersatz := TFloatField.Create(Self);\r\n dsPositionenEndpreis := TFloatField.Create(Self);\r\n dsPositionenPosMWST := TFloatField.Create(Self);\r\n dsPositionenBruttoEndpreis := TFloatField.Create(Self);\r\n dsPositionenEndpreis_EK := TFloatField.Create(Self);\r\n dsPositionenRabattsatz := TFloatField.Create(Self);\r\n dsPositionenPreisvorRabatt := TFloatField.Create(Self);\r\n dsPositionenPKZ := TFloatField.Create(Self);\r\n dsPositionenTextfrei10 := TStringField.Create(Self);\r\n dsPositionenTextfrei20 := TStringField.Create(Self);\r\n dsPositionenProduktionAbgeschlossen := TDateTimeField.Create(Self);\r\n dsPositionenEinzelpreisBrutto := TFloatField.Create(Self);\r\n dsPositionenPosMarge := TFloatField.Create(Self);\r\n dsPositionenPosMargeProzent := TFloatField.Create(Self);\r\n dsPositionenBereitsGeliefert := TFloatField.Create(Self);\r\n dsPositionenausliefern := TFloatField.Create(Self);\r\n dsPositionenBestellungErledigt := TBooleanField.Create(Self);\r\n dsPositionenLager := TStringField.Create(Self);\r\n dsPositionenbestellen := TBooleanField.Create(Self);\r\n dsPositionenWarenbestand := TBooleanField.Create(Self);\r\n dsPositionenArtikelbeschreibungRTF := TStringField.Create(Self);\r\n dsPositionenQuellartikel := TStringField.Create(Self);\r\n dsPositionenArtikelnummerWB := TStringField.Create(Self);\r\n dsPositionenPreisanteilNetto := TFloatField.Create(Self);\r\n dsPositionenSetHPos := TStringField.Create(Self);\r\n dsPositionenSetUPos := TStringField.Create(Self);\r\n dsPositionenProvisionssatz := TFloatField.Create(Self);\r\n dsPositionenProvisionsbetrag := TFloatField.Create(Self);\r\n dsPositionenArtikelsprache := TStringField.Create(Self);\r\n dsPositionenEKvom := TDateTimeField.Create(Self);\r\n dsPositionenMengenberechnungID := TStringField.Create(Self);\r\n dsPositionenTaraID := TStringField.Create(Self);\r\n dsPositionenTara := TFloatField.Create(Self);\r\n dsPositionenBruttoGewicht := TFloatField.Create(Self);\r\n dsPositionenAussenflaeche := TFloatField.Create(Self);\r\n dsPositionenLadeort := TStringField.Create(Self);\r\n dsPositionenSeitenumbruch := TBooleanField.Create(Self);\r\n dsPositionenPlanerFarbe := TIntegerField.Create(Self);\r\n dsPositionenMWStKey := TIntegerField.Create(Self);\r\n dsPositionenZSnachPos := TBooleanField.Create(Self);\r\n dsPositionenLieferzeit := TStringField.Create(Self);\r\n dsPositionenPreisVorRabattWHG := TFloatField.Create(Self);\r\n dsPositionenReferenzKalkulation := TStringField.Create(Self);\r\n dsPositionenPKey := TIntegerField.Create(Self);\r\n dsPositionenAuftragsnummer := TStringField.Create(Self);\r\n dsPositionenlwbID := TStringField.Create(Self);\r\n dsPositionenBelegdatum := TDateTimeField.Create(Self);\r\n dsPositionenWarenkontrollnummern := TStringField.Create(Self);\r\n dsPositionenVolumen := TFloatField.Create(Self);\r\n dsPositionenPosVolumen := TFloatField.Create(Self);\r\n dsPositionenArtikelAttribute := TStringField.Create(Self);\r\n dsPositionenMonteurP := TIntegerField.Create(Self);\r\n dsPositionenArbeitszeitDatum := TDateTimeField.Create(Self);\r\n dsPositionenArbeitszeitVON := TDateTimeField.Create(Self);\r\n dsPositionenArbeitszeitBIS := TDateTimeField.Create(Self);\r\n dsPositionenArtikelnummerArtikelnummer := TStringField.Create(Self);\r\n dsPositionenArtikelnummerArbeitszeit := TBooleanField.Create(Self);\r\n sourcePositionen := TDataSource.Create(Self);\r\n dsSumBeleg := TXDataWebDataSet.Create(Self);\r\n dsSumBelegPosVolumen := TFloatField.Create(Self);\r\n dsSumBelegBruttoGewicht := TFloatField.Create(Self);\r\n dsSumBelegMehrwertsteuersatz := TFloatField.Create(Self);\r\n dsSumBelegEndpreis := TFloatField.Create(Self);\r\n dsSumBelegPosMWST := TFloatField.Create(Self);\r\n dsSumBelegBruttoEndpreis := TFloatField.Create(Self);\r\n dsSumBelegEndpreis_EK := TFloatField.Create(Self);\r\n dsSumBelegPKZ := TFloatField.Create(Self);\r\n WClient := TXDataWebClient.Create(Self);\r\n WebHttpRequest1 := THttpRequest.Create(Self);\r\n dsObjekt := TXDataWebDataSet.Create(Self);\r\n dsObjektObjektReferenz := TStringField.Create(Self);\r\n dsObjektKurzbezeichnung := TStringField.Create(Self);\r\n dsObjektObjektnummer := TStringField.Create(Self);\r\n dsDateien := TXDataWebDataSet.Create(Self);\r\n dsDateienID := TIntegerField.Create(Self);\r\n dsDateienDatumUhrzeit := TDateTimeField.Create(Self);\r\n dsDateienDateiBetreff := TStringField.Create(Self);\r\n dsDateienNummerkomplett := TStringField.Create(Self);\r\n\r\n TC.BeforeLoadDFMValues;\r\n Container1.BeforeLoadDFMValues;\r\n btnzurueck.BeforeLoadDFMValues;\r\n Container3.BeforeLoadDFMValues;\r\n Container2.BeforeLoadDFMValues;\r\n PTC.BeforeLoadDFMValues;\r\n btnSpeichern.BeforeLoadDFMValues;\r\n pickLieferdatum.BeforeLoadDFMValues;\r\n edtAuftragsbezeichnung.BeforeLoadDFMValues;\r\n edtLiefertermin.BeforeLoadDFMValues;\r\n btnNeuePosition.BeforeLoadDFMValues;\r\n Container4.BeforeLoadDFMValues;\r\n btnDateien.BeforeLoadDFMValues;\r\n btnDateienObjekt.BeforeLoadDFMValues;\r\n btnDateienKontakt.BeforeLoadDFMValues;\r\n dsBeleg.BeforeLoadDFMValues;\r\n dsBelegKundennummer.BeforeLoadDFMValues;\r\n dsBelegKundennummerKundennummer.BeforeLoadDFMValues;\r\n dsBelegNummerkomplett.BeforeLoadDFMValues;\r\n dsBelegReferenzAuftagbest.BeforeLoadDFMValues;\r\n dsBelegReferenzLieferschein.BeforeLoadDFMValues;\r\n dsBelegReferenzRechnung.BeforeLoadDFMValues;\r\n dsBelegDatum.BeforeLoadDFMValues;\r\n dsBelegJahr.BeforeLoadDFMValues;\r\n dsBelegKalenderwoche.BeforeLoadDFMValues;\r\n dsBelegNachname.BeforeLoadDFMValues;\r\n dsBelegVorname.BeforeLoadDFMValues;\r\n dsBelegPostleitzahl.BeforeLoadDFMValues;\r\n dsBelegOrt.BeforeLoadDFMValues;\r\n dsBelegLaenderkuerzel.BeforeLoadDFMValues;\r\n dsBelegLand.BeforeLoadDFMValues;\r\n dsBelegBriefanrede1.BeforeLoadDFMValues;\r\n dsBelegBriefanrede2.BeforeLoadDFMValues;\r\n dsBelegEMail.BeforeLoadDFMValues;\r\n dsBelegAdresseBild.BeforeLoadDFMValues;\r\n dsBelegLieferanschriftBild.BeforeLoadDFMValues;\r\n dsBelegZahlungsbedingung.BeforeLoadDFMValues;\r\n dsBelegZahlungsbedingungText.BeforeLoadDFMValues;\r\n dsBelegAuftragsbezeichnung.BeforeLoadDFMValues;\r\n dsBelegAuftragnummerKunde.BeforeLoadDFMValues;\r\n dsBelegBestelldatumKunde.BeforeLoadDFMValues;\r\n dsBelegILN.BeforeLoadDFMValues;\r\n dsBelegKopftext.BeforeLoadDFMValues;\r\n dsBelegSchlussbemerkung.BeforeLoadDFMValues;\r\n dsBelegGruss.BeforeLoadDFMValues;\r\n dsBelegMehrwertsteuersatz1.BeforeLoadDFMValues;\r\n dsBelegMehrwertsteuersatz2.BeforeLoadDFMValues;\r\n dsBelegNettosumme01.BeforeLoadDFMValues;\r\n dsBelegNettosumme02.BeforeLoadDFMValues;\r\n dsBelegNettosumme.BeforeLoadDFMValues;\r\n dsBelegMehrwertsteuer01.BeforeLoadDFMValues;\r\n dsBelegMehrwertsteuer02.BeforeLoadDFMValues;\r\n dsBelegMehrwertsteuer.BeforeLoadDFMValues;\r\n dsBelegBruttosumme.BeforeLoadDFMValues;\r\n dsBelegVersanddatum.BeforeLoadDFMValues;\r\n dsBelegSkontosatz.BeforeLoadDFMValues;\r\n dsBelegNettosummeEK.BeforeLoadDFMValues;\r\n dsBelegNettoMarge.BeforeLoadDFMValues;\r\n dsBelegSchreibzeichen.BeforeLoadDFMValues;\r\n dsBelegUnterzeichner.BeforeLoadDFMValues;\r\n dsBelegTelefonMA.BeforeLoadDFMValues;\r\n dsBelegEmailMA.BeforeLoadDFMValues;\r\n dsBelegUSTID.BeforeLoadDFMValues;\r\n dsBelegUmsatzsteuerausweis.BeforeLoadDFMValues;\r\n dsBeleggebucht.BeforeLoadDFMValues;\r\n dsBelegLieferdatum.BeforeLoadDFMValues;\r\n dsBelegTransportbedingung.BeforeLoadDFMValues;\r\n dsBelegMehrwertsteuersatz3.BeforeLoadDFMValues;\r\n dsBelegMehrwertsteuer03.BeforeLoadDFMValues;\r\n dsBelegNettosumme03.BeforeLoadDFMValues;\r\n dsBelegRundungsDifferenz.BeforeLoadDFMValues;\r\n dsBelegEmailText.BeforeLoadDFMValues;\r\n dsBelegAuftragerhaltenam.BeforeLoadDFMValues;\r\n dsBelegAuftragnichterhalten.BeforeLoadDFMValues;\r\n dsBelegRabattstufe.BeforeLoadDFMValues;\r\n dsBelegKFZKennzeichen.BeforeLoadDFMValues;\r\n dsBelegFahrgestellnummer.BeforeLoadDFMValues;\r\n dsBelegKFZHersteller.BeforeLoadDFMValues;\r\n dsBelegErstzulassungsdatum.BeforeLoadDFMValues;\r\n dsBelegKMStand.BeforeLoadDFMValues;\r\n dsBelegKFZType.BeforeLoadDFMValues;\r\n dsBelegInspektionsdatum.BeforeLoadDFMValues;\r\n dsBelegDebitorennummer.BeforeLoadDFMValues;\r\n dsBelegKostentraeger.BeforeLoadDFMValues;\r\n dsBelegRabattsatz.BeforeLoadDFMValues;\r\n dsBelegObjektReferenz.BeforeLoadDFMValues;\r\n dsBelegBank.BeforeLoadDFMValues;\r\n dsBelegBankleitzahl.BeforeLoadDFMValues;\r\n dsBelegKontonummer.BeforeLoadDFMValues;\r\n dsBelegKontoinhaber.BeforeLoadDFMValues;\r\n dsBelegTelefaxnummer.BeforeLoadDFMValues;\r\n dsBelegDatumNeu.BeforeLoadDFMValues;\r\n dsBelegDatumgeaendert.BeforeLoadDFMValues;\r\n dsBelegLiefertermin.BeforeLoadDFMValues;\r\n dsBelegObjektnummer.BeforeLoadDFMValues;\r\n dsBelegReferenzKalkulation.BeforeLoadDFMValues;\r\n dsBelegReferenzDatum.BeforeLoadDFMValues;\r\n dsBelegEmailversand.BeforeLoadDFMValues;\r\n dsBelegTelefonnummer.BeforeLoadDFMValues;\r\n dsBelegMobilTelefon.BeforeLoadDFMValues;\r\n dsBelegAngebotFax.BeforeLoadDFMValues;\r\n dsBelegREDatum.BeforeLoadDFMValues;\r\n dsBelegBenutzerNeu.BeforeLoadDFMValues;\r\n dsBelegBenutzerGeaendert.BeforeLoadDFMValues;\r\n dsBelegBerechnungBrutto.BeforeLoadDFMValues;\r\n dsBelegBruttosumme01.BeforeLoadDFMValues;\r\n dsBelegBruttosumme02.BeforeLoadDFMValues;\r\n dsBelegBruttosumme03.BeforeLoadDFMValues;\r\n dsBelegNotiz.BeforeLoadDFMValues;\r\n dsBelegMargeProzent.BeforeLoadDFMValues;\r\n dsBelegBelegsprache.BeforeLoadDFMValues;\r\n dsBelegDuplicate.BeforeLoadDFMValues;\r\n dsBelegperEmail.BeforeLoadDFMValues;\r\n dsBelegAnsprechpartner.BeforeLoadDFMValues;\r\n dsBelegKundennummerFremd.BeforeLoadDFMValues;\r\n dsBelegProtokoll.BeforeLoadDFMValues;\r\n dsBelegVerleihauftrag.BeforeLoadDFMValues;\r\n dsBelegVerleihVon.BeforeLoadDFMValues;\r\n dsBelegVerleihBis.BeforeLoadDFMValues;\r\n dsBeleggesperrt.BeforeLoadDFMValues;\r\n dsBelegVerleihvonText.BeforeLoadDFMValues;\r\n dsBelegVerleihbisText.BeforeLoadDFMValues;\r\n dsBelegDruckWHG.BeforeLoadDFMValues;\r\n dsBelegDruckWHGKurs.BeforeLoadDFMValues;\r\n dsBeleggueltigbis.BeforeLoadDFMValues;\r\n dsBelegProzentsatzZusatzposition.BeforeLoadDFMValues;\r\n dsBelegTextZusatzposition.BeforeLoadDFMValues;\r\n dsBelegTextzusatzBeschreibung.BeforeLoadDFMValues;\r\n dsBelegReferenzTarifberechnung.BeforeLoadDFMValues;\r\n dsBelegLayoutname.BeforeLoadDFMValues;\r\n dsBelegGesamtgewicht.BeforeLoadDFMValues;\r\n dsBelegBetragZusatzposition.BeforeLoadDFMValues;\r\n dsBelegMehrwertsteuersatz4.BeforeLoadDFMValues;\r\n dsBelegMehrwertsteuersatz5.BeforeLoadDFMValues;\r\n dsBelegMehrwertsteuersatz6.BeforeLoadDFMValues;\r\n dsBelegBesteuerungKey.BeforeLoadDFMValues;\r\n dsBelegVertreterMatchcode.BeforeLoadDFMValues;\r\n dsBelegVerfasser.BeforeLoadDFMValues;\r\n dsBelegLieferadresseID.BeforeLoadDFMValues;\r\n dsBelegBelegvariante.BeforeLoadDFMValues;\r\n dsBelegAuftragErwartetBis.BeforeLoadDFMValues;\r\n dsBelegAuftragWahrscheinlichkeit.BeforeLoadDFMValues;\r\n dsBelegFahrzeugID.BeforeLoadDFMValues;\r\n dsBelegMonatJahr.BeforeLoadDFMValues;\r\n dsBelegLieferanschriftDaten.BeforeLoadDFMValues;\r\n dsBelegGesamtVolumen.BeforeLoadDFMValues;\r\n dsBelegBelegPKey.BeforeLoadDFMValues;\r\n dsBelegDruckParameter.BeforeLoadDFMValues;\r\n dsBelegReferenzService.BeforeLoadDFMValues;\r\n SourceBeleg.BeforeLoadDFMValues;\r\n dsPositionen.BeforeLoadDFMValues;\r\n dsPositionenArtikelnummer.BeforeLoadDFMValues;\r\n dsPositionenNummerkomplett.BeforeLoadDFMValues;\r\n dsPositionenID.BeforeLoadDFMValues;\r\n dsPositionenPosNr.BeforeLoadDFMValues;\r\n dsPositionenPosUNr.BeforeLoadDFMValues;\r\n dsPositionenSumme.BeforeLoadDFMValues;\r\n dsPositionenArtikelueberschrift.BeforeLoadDFMValues;\r\n dsPositionenArtikelbeschreibung.BeforeLoadDFMValues;\r\n dsPositionenMenge.BeforeLoadDFMValues;\r\n dsPositionenArtderMenge.BeforeLoadDFMValues;\r\n dsPositionenVerkaufspreis.BeforeLoadDFMValues;\r\n dsPositionenEinkaufspreis.BeforeLoadDFMValues;\r\n dsPositionenSeriennummer.BeforeLoadDFMValues;\r\n dsPositionenWarengruppe.BeforeLoadDFMValues;\r\n dsPositionenWarenuntergruppe.BeforeLoadDFMValues;\r\n dsPositionenArtikelnummerKunde.BeforeLoadDFMValues;\r\n dsPositionenLieferant.BeforeLoadDFMValues;\r\n dsPositionenGewicht.BeforeLoadDFMValues;\r\n dsPositionenLaenge.BeforeLoadDFMValues;\r\n dsPositionenBreite.BeforeLoadDFMValues;\r\n dsPositionenHoehe.BeforeLoadDFMValues;\r\n dsPositionenMehrwertsteuersatz.BeforeLoadDFMValues;\r\n dsPositionenEndpreis.BeforeLoadDFMValues;\r\n dsPositionenPosMWST.BeforeLoadDFMValues;\r\n dsPositionenBruttoEndpreis.BeforeLoadDFMValues;\r\n dsPositionenEndpreis_EK.BeforeLoadDFMValues;\r\n dsPositionenRabattsatz.BeforeLoadDFMValues;\r\n dsPositionenPreisvorRabatt.BeforeLoadDFMValues;\r\n dsPositionenPKZ.BeforeLoadDFMValues;\r\n dsPositionenTextfrei10.BeforeLoadDFMValues;\r\n dsPositionenTextfrei20.BeforeLoadDFMValues;\r\n dsPositionenProduktionAbgeschlossen.BeforeLoadDFMValues;\r\n dsPositionenEinzelpreisBrutto.BeforeLoadDFMValues;\r\n dsPositionenPosMarge.BeforeLoadDFMValues;\r\n dsPositionenPosMargeProzent.BeforeLoadDFMValues;\r\n dsPositionenBereitsGeliefert.BeforeLoadDFMValues;\r\n dsPositionenausliefern.BeforeLoadDFMValues;\r\n dsPositionenBestellungErledigt.BeforeLoadDFMValues;\r\n dsPositionenLager.BeforeLoadDFMValues;\r\n dsPositionenbestellen.BeforeLoadDFMValues;\r\n dsPositionenWarenbestand.BeforeLoadDFMValues;\r\n dsPositionenArtikelbeschreibungRTF.BeforeLoadDFMValues;\r\n dsPositionenQuellartikel.BeforeLoadDFMValues;\r\n dsPositionenArtikelnummerWB.BeforeLoadDFMValues;\r\n dsPositionenPreisanteilNetto.BeforeLoadDFMValues;\r\n dsPositionenSetHPos.BeforeLoadDFMValues;\r\n dsPositionenSetUPos.BeforeLoadDFMValues;\r\n dsPositionenProvisionssatz.BeforeLoadDFMValues;\r\n dsPositionenProvisionsbetrag.BeforeLoadDFMValues;\r\n dsPositionenArtikelsprache.BeforeLoadDFMValues;\r\n dsPositionenEKvom.BeforeLoadDFMValues;\r\n dsPositionenMengenberechnungID.BeforeLoadDFMValues;\r\n dsPositionenTaraID.BeforeLoadDFMValues;\r\n dsPositionenTara.BeforeLoadDFMValues;\r\n dsPositionenBruttoGewicht.BeforeLoadDFMValues;\r\n dsPositionenAussenflaeche.BeforeLoadDFMValues;\r\n dsPositionenLadeort.BeforeLoadDFMValues;\r\n dsPositionenSeitenumbruch.BeforeLoadDFMValues;\r\n dsPositionenPlanerFarbe.BeforeLoadDFMValues;\r\n dsPositionenMWStKey.BeforeLoadDFMValues;\r\n dsPositionenZSnachPos.BeforeLoadDFMValues;\r\n dsPositionenLieferzeit.BeforeLoadDFMValues;\r\n dsPositionenPreisVorRabattWHG.BeforeLoadDFMValues;\r\n dsPositionenReferenzKalkulation.BeforeLoadDFMValues;\r\n dsPositionenPKey.BeforeLoadDFMValues;\r\n dsPositionenAuftragsnummer.BeforeLoadDFMValues;\r\n dsPositionenlwbID.BeforeLoadDFMValues;\r\n dsPositionenBelegdatum.BeforeLoadDFMValues;\r\n dsPositionenWarenkontrollnummern.BeforeLoadDFMValues;\r\n dsPositionenVolumen.BeforeLoadDFMValues;\r\n dsPositionenPosVolumen.BeforeLoadDFMValues;\r\n dsPositionenArtikelAttribute.BeforeLoadDFMValues;\r\n dsPositionenMonteurP.BeforeLoadDFMValues;\r\n dsPositionenArbeitszeitDatum.BeforeLoadDFMValues;\r\n dsPositionenArbeitszeitVON.BeforeLoadDFMValues;\r\n dsPositionenArbeitszeitBIS.BeforeLoadDFMValues;\r\n dsPositionenArtikelnummerArtikelnummer.BeforeLoadDFMValues;\r\n dsPositionenArtikelnummerArbeitszeit.BeforeLoadDFMValues;\r\n sourcePositionen.BeforeLoadDFMValues;\r\n dsSumBeleg.BeforeLoadDFMValues;\r\n dsSumBelegPosVolumen.BeforeLoadDFMValues;\r\n dsSumBelegBruttoGewicht.BeforeLoadDFMValues;\r\n dsSumBelegMehrwertsteuersatz.BeforeLoadDFMValues;\r\n dsSumBelegEndpreis.BeforeLoadDFMValues;\r\n dsSumBelegPosMWST.BeforeLoadDFMValues;\r\n dsSumBelegBruttoEndpreis.BeforeLoadDFMValues;\r\n dsSumBelegEndpreis_EK.BeforeLoadDFMValues;\r\n dsSumBelegPKZ.BeforeLoadDFMValues;\r\n WClient.BeforeLoadDFMValues;\r\n WebHttpRequest1.BeforeLoadDFMValues;\r\n dsObjekt.BeforeLoadDFMValues;\r\n dsObjektObjektReferenz.BeforeLoadDFMValues;\r\n dsObjektKurzbezeichnung.BeforeLoadDFMValues;\r\n dsObjektObjektnummer.BeforeLoadDFMValues;\r\n dsDateien.BeforeLoadDFMValues;\r\n dsDateienID.BeforeLoadDFMValues;\r\n dsDateienDatumUhrzeit.BeforeLoadDFMValues;\r\n dsDateienDateiBetreff.BeforeLoadDFMValues;\r\n dsDateienNummerkomplett.BeforeLoadDFMValues;\r\n try\r\n Name := 'EinzelAngebot';\r\n Width := 245;\r\n Height := 484;\r\n CSSLibrary := cssBootstrap;\r\n ElementFont := efCSS;\r\n ElementPosition := epIgnore;\r\n SetEvent(Self, 'OnCloseQuery', 'WebFormCloseQuery');\r\n SetEvent(Self, 'OnShow', 'WebFormShow');\r\n TC.SetParentComponent(Self);\r\n TC.Name := 'TC';\r\n TC.Left := 0;\r\n TC.Top := 173;\r\n TC.Width := 236;\r\n TC.Height := 62;\r\n TC.ElementClassName := 'table table-sm table-hover table-bordered table-striped';\r\n TC.HeightStyle := ssAuto;\r\n TC.WidthStyle := ssAuto;\r\n TC.BorderColor := clSilver;\r\n TC.ColHeader := False;\r\n TC.ElementHeaderClassName := 'table-info';\r\n TC.ElementPosition := epIgnore;\r\n TC.ElementTableClassName := 'table table-sm table-hover table-bordered table-striped';\r\n TC.WordWrap := True;\r\n TC.ColCount := 2;\r\n TC.RowCount := 17;\r\n Container1.SetParentComponent(Self);\r\n Container1.Name := 'Container1';\r\n Container1.Left := 0;\r\n Container1.Top := 0;\r\n Container1.Width := 245;\r\n Container1.Height := 41;\r\n Container1.HeightStyle := ssAuto;\r\n Container1.WidthStyle := ssPercent;\r\n Container1.Align := alTop;\r\n Container1.ElementFont := efCSS;\r\n Container1.ElementPosition := epIgnore;\r\n btnzurueck.SetParentComponent(Self);\r\n btnzurueck.Name := 'btnzurueck';\r\n btnzurueck.Left := 0;\r\n btnzurueck.Top := 88;\r\n btnzurueck.Width := 96;\r\n btnzurueck.Height := 25;\r\n btnzurueck.Caption := '<< zur'#252'ck';\r\n btnzurueck.ChildOrder := 4;\r\n btnzurueck.ElementClassName := 'btn btn-info btn-sm m-1 text-left';\r\n btnzurueck.ElementFont := efCSS;\r\n btnzurueck.ElementPosition := epIgnore;\r\n btnzurueck.HeightStyle := ssAuto;\r\n btnzurueck.HeightPercent := 100.000000000000000000;\r\n btnzurueck.WidthStyle := ssAuto;\r\n btnzurueck.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnzurueck, Self, 'OnClick', 'btnzurueckClick');\r\n Container3.SetParentComponent(Self);\r\n Container3.Name := 'Container3';\r\n Container3.Left := 0;\r\n Container3.Top := 82;\r\n Container3.Width := 245;\r\n Container3.Height := 41;\r\n Container3.ElementClassName := 'd-flex flex-column';\r\n Container3.HeightStyle := ssAuto;\r\n Container3.WidthStyle := ssAuto;\r\n Container3.Align := alTop;\r\n Container3.ChildOrder := 2;\r\n Container3.ElementFont := efCSS;\r\n Container3.ElementPosition := epIgnore;\r\n Container2.SetParentComponent(Self);\r\n Container2.Name := 'Container2';\r\n Container2.Left := 0;\r\n Container2.Top := 41;\r\n Container2.Width := 245;\r\n Container2.Height := 41;\r\n Container2.ElementClassName := 'd-flex flex-wrap m-1';\r\n Container2.HeightStyle := ssAuto;\r\n Container2.WidthStyle := ssAuto;\r\n Container2.Align := alTop;\r\n Container2.ChildOrder := 1;\r\n Container2.ElementFont := efCSS;\r\n Container2.ElementPosition := epIgnore;\r\n PTC.SetParentComponent(Self);\r\n PTC.Name := 'PTC';\r\n PTC.Left := 0;\r\n PTC.Top := 241;\r\n PTC.Width := 236;\r\n PTC.Height := 80;\r\n PTC.ElementClassName := 'table table-hover table-bordered table-striped';\r\n PTC.HeightStyle := ssAuto;\r\n PTC.WidthStyle := ssAuto;\r\n PTC.BorderColor := clSilver;\r\n PTC.ChildOrder := 5;\r\n PTC.ElementHeaderClassName := 'table-info';\r\n PTC.ElementPosition := epIgnore;\r\n PTC.ElementTableClassName := 'table table-hover table-bordered table-striped';\r\n PTC.WordWrap := True;\r\n PTC.ColCount := 2;\r\n btnSpeichern.SetParentComponent(Self);\r\n btnSpeichern.Name := 'btnSpeichern';\r\n btnSpeichern.Left := 8;\r\n btnSpeichern.Top := 280;\r\n btnSpeichern.Width := 96;\r\n btnSpeichern.Height := 25;\r\n btnSpeichern.Caption := 'speichern';\r\n btnSpeichern.ChildOrder := 4;\r\n btnSpeichern.ElementClassName := 'btn btn-info btn-sm m-1 text-left';\r\n btnSpeichern.ElementFont := efCSS;\r\n btnSpeichern.ElementPosition := epIgnore;\r\n btnSpeichern.HeightStyle := ssAuto;\r\n btnSpeichern.HeightPercent := 100.000000000000000000;\r\n btnSpeichern.TabStop := False;\r\n btnSpeichern.WidthStyle := ssAuto;\r\n btnSpeichern.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnSpeichern, Self, 'OnClick', 'btnSpeichernClick');\r\n pickLieferdatum.SetParentComponent(Self);\r\n pickLieferdatum.Name := 'pickLieferdatum';\r\n pickLieferdatum.Left := 8;\r\n pickLieferdatum.Top := 342;\r\n pickLieferdatum.Width := 170;\r\n pickLieferdatum.Height := 22;\r\n pickLieferdatum.ElementClassName := 'form-control';\r\n pickLieferdatum.HeightStyle := ssAuto;\r\n pickLieferdatum.WidthStyle := ssPercent;\r\n pickLieferdatum.WidthPercent := 75.000000000000000000;\r\n pickLieferdatum.BorderStyle := bsNone;\r\n pickLieferdatum.ChildOrder := 13;\r\n pickLieferdatum.Color := clWhite;\r\n pickLieferdatum.Date := 44128.305122870370000000;\r\n pickLieferdatum.ElementFont := efCSS;\r\n pickLieferdatum.ElementPosition := epIgnore;\r\n pickLieferdatum.Role := '';\r\n pickLieferdatum.TabOrder := 2;\r\n pickLieferdatum.Text := '';\r\n SetEvent(pickLieferdatum, Self, 'OnClick', 'pickLieferdatumClick');\r\n pickLieferdatum.DataField := 'Lieferdatum';\r\n pickLieferdatum.DataSource := SourceBeleg;\r\n edtAuftragsbezeichnung.SetParentComponent(Self);\r\n edtAuftragsbezeichnung.Name := 'edtAuftragsbezeichnung';\r\n edtAuftragsbezeichnung.Left := 8;\r\n edtAuftragsbezeichnung.Top := 370;\r\n edtAuftragsbezeichnung.Width := 121;\r\n edtAuftragsbezeichnung.Height := 22;\r\n edtAuftragsbezeichnung.AutoSelect := False;\r\n edtAuftragsbezeichnung.ChildOrder := 12;\r\n edtAuftragsbezeichnung.ElementClassName := 'form-control form-control-sm';\r\n edtAuftragsbezeichnung.ElementFont := efCSS;\r\n edtAuftragsbezeichnung.ElementPosition := epIgnore;\r\n edtAuftragsbezeichnung.HeightStyle := ssAuto;\r\n edtAuftragsbezeichnung.HeightPercent := 100.000000000000000000;\r\n edtAuftragsbezeichnung.TabOrder := 1;\r\n edtAuftragsbezeichnung.TextHint := 'Auftragsbezeichnung';\r\n edtAuftragsbezeichnung.WidthStyle := ssPercent;\r\n edtAuftragsbezeichnung.WidthPercent := 75.000000000000000000;\r\n edtAuftragsbezeichnung.DataField := 'Auftragsbezeichnung';\r\n edtAuftragsbezeichnung.DataSource := SourceBeleg;\r\n edtLiefertermin.SetParentComponent(Self);\r\n edtLiefertermin.Name := 'edtLiefertermin';\r\n edtLiefertermin.Left := 8;\r\n edtLiefertermin.Top := 398;\r\n edtLiefertermin.Width := 121;\r\n edtLiefertermin.Height := 22;\r\n edtLiefertermin.ChildOrder := 12;\r\n edtLiefertermin.ElementClassName := 'form-control';\r\n edtLiefertermin.ElementFont := efCSS;\r\n edtLiefertermin.ElementPosition := epIgnore;\r\n edtLiefertermin.HeightStyle := ssAuto;\r\n edtLiefertermin.HeightPercent := 100.000000000000000000;\r\n edtLiefertermin.TabOrder := 3;\r\n edtLiefertermin.TextHint := 'Lieferzeitraum';\r\n edtLiefertermin.WidthStyle := ssPercent;\r\n edtLiefertermin.WidthPercent := 75.000000000000000000;\r\n edtLiefertermin.DataField := 'Liefertermin';\r\n edtLiefertermin.DataSource := SourceBeleg;\r\n btnNeuePosition.SetParentComponent(Self);\r\n btnNeuePosition.Name := 'btnNeuePosition';\r\n btnNeuePosition.Left := 8;\r\n btnNeuePosition.Top := 311;\r\n btnNeuePosition.Width := 96;\r\n btnNeuePosition.Height := 25;\r\n btnNeuePosition.Caption := '+ NEU';\r\n btnNeuePosition.ChildOrder := 4;\r\n btnNeuePosition.ElementClassName := 'btn btn-info btn-sm m-1 text-left';\r\n btnNeuePosition.ElementFont := efCSS;\r\n btnNeuePosition.ElementPosition := epIgnore;\r\n btnNeuePosition.HeightStyle := ssAuto;\r\n btnNeuePosition.HeightPercent := 100.000000000000000000;\r\n btnNeuePosition.TabStop := False;\r\n btnNeuePosition.WidthStyle := ssAuto;\r\n btnNeuePosition.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnNeuePosition, Self, 'OnClick', 'btnNeuePositionClick');\r\n Container4.SetParentComponent(Self);\r\n Container4.Name := 'Container4';\r\n Container4.Left := 0;\r\n Container4.Top := 123;\r\n Container4.Width := 245;\r\n Container4.Height := 41;\r\n Container4.ElementClassName := 'd-flex flex-column';\r\n Container4.HeightStyle := ssAuto;\r\n Container4.WidthStyle := ssAuto;\r\n Container4.Align := alTop;\r\n Container4.ChildOrder := 4;\r\n Container4.ElementFont := efCSS;\r\n Container4.ElementPosition := epIgnore;\r\n btnDateien.SetParentComponent(Self);\r\n btnDateien.Name := 'btnDateien';\r\n btnDateien.Left := 186;\r\n btnDateien.Top := 373;\r\n btnDateien.Width := 50;\r\n btnDateien.Height := 25;\r\n btnDateien.Caption := 'Dateien';\r\n btnDateien.ChildOrder := 4;\r\n btnDateien.ElementClassName := 'btn btn-info btn-sm m-1 text-left';\r\n btnDateien.ElementFont := efCSS;\r\n btnDateien.ElementPosition := epIgnore;\r\n btnDateien.HeightStyle := ssAuto;\r\n btnDateien.HeightPercent := 100.000000000000000000;\r\n btnDateien.WidthStyle := ssAuto;\r\n btnDateien.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnDateien, Self, 'OnClick', 'btnDateienClick');\r\n btnDateienObjekt.SetParentComponent(Self);\r\n btnDateienObjekt.Name := 'btnDateienObjekt';\r\n btnDateienObjekt.Left := 187;\r\n btnDateienObjekt.Top := 404;\r\n btnDateienObjekt.Width := 50;\r\n btnDateienObjekt.Height := 25;\r\n btnDateienObjekt.Caption := 'Dateien zu Objekt';\r\n btnDateienObjekt.ChildOrder := 4;\r\n btnDateienObjekt.ElementClassName := 'btn btn-info btn-sm m-1 text-left';\r\n btnDateienObjekt.ElementFont := efCSS;\r\n btnDateienObjekt.ElementPosition := epIgnore;\r\n btnDateienObjekt.HeightStyle := ssAuto;\r\n btnDateienObjekt.HeightPercent := 100.000000000000000000;\r\n btnDateienObjekt.WidthStyle := ssAuto;\r\n btnDateienObjekt.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnDateienObjekt, Self, 'OnClick', 'btnDateienObjektClick');\r\n btnDateienKontakt.SetParentComponent(Self);\r\n btnDateienKontakt.Name := 'btnDateienKontakt';\r\n btnDateienKontakt.Left := 187;\r\n btnDateienKontakt.Top := 435;\r\n btnDateienKontakt.Width := 50;\r\n btnDateienKontakt.Height := 25;\r\n btnDateienKontakt.Caption := 'Dateien zu Kontakt';\r\n btnDateienKontakt.ChildOrder := 4;\r\n btnDateienKontakt.ElementClassName := 'btn btn-info btn-sm m-1 text-left';\r\n btnDateienKontakt.ElementFont := efCSS;\r\n btnDateienKontakt.ElementPosition := epIgnore;\r\n btnDateienKontakt.HeightStyle := ssAuto;\r\n btnDateienKontakt.HeightPercent := 100.000000000000000000;\r\n btnDateienKontakt.WidthStyle := ssAuto;\r\n btnDateienKontakt.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnDateienKontakt, Self, 'OnClick', 'btnDateienKontaktClick');\r\n dsBeleg.SetParentComponent(Self);\r\n dsBeleg.Name := 'dsBeleg';\r\n dsBeleg.AfterApplyUpdates := dsBelegAfterApplyUpdates;\r\n dsBeleg.AfterOpen := dsBelegAfterOpen;\r\n dsBeleg.BeforePost := dsBelegBeforePost;\r\n dsBeleg.AfterPost := dsBelegAfterPost;\r\n dsBeleg.EntitySetName := 'Angebote';\r\n dsBeleg.Connection := DM2.XDataWebConnection1;\r\n dsBeleg.SubpropsDepth := 1;\r\n dsBeleg.QueryString := '$expand=Kundennummer';\r\n dsBeleg.Left := 80;\r\n dsBeleg.Top := 128;\r\n dsBelegKundennummer.SetParentComponent(dsBeleg);\r\n dsBelegKundennummer.Name := 'dsBelegKundennummer';\r\n dsBelegKundennummer.FieldName := 'Kundennummer';\r\n dsBelegKundennummer.Required := True;\r\n dsBelegKundennummerKundennummer.SetParentComponent(dsBeleg);\r\n dsBelegKundennummerKundennummer.Name := 'dsBelegKundennummerKundennummer';\r\n dsBelegKundennummerKundennummer.FieldName := 'Kundennummer.Kundennummer';\r\n dsBelegKundennummerKundennummer.Size := 13;\r\n dsBelegNummerkomplett.SetParentComponent(dsBeleg);\r\n dsBelegNummerkomplett.Name := 'dsBelegNummerkomplett';\r\n dsBelegNummerkomplett.FieldName := 'Nummerkomplett';\r\n dsBelegNummerkomplett.Required := True;\r\n dsBelegNummerkomplett.Size := 10;\r\n dsBelegReferenzAuftagbest.SetParentComponent(dsBeleg);\r\n dsBelegReferenzAuftagbest.Name := 'dsBelegReferenzAuftagbest';\r\n dsBelegReferenzAuftagbest.FieldName := 'ReferenzAuftagbest';\r\n dsBelegReferenzAuftagbest.Size := 10;\r\n dsBelegReferenzLieferschein.SetParentComponent(dsBeleg);\r\n dsBelegReferenzLieferschein.Name := 'dsBelegReferenzLieferschein';\r\n dsBelegReferenzLieferschein.FieldName := 'ReferenzLieferschein';\r\n dsBelegReferenzLieferschein.Size := 10;\r\n dsBelegReferenzRechnung.SetParentComponent(dsBeleg);\r\n dsBelegReferenzRechnung.Name := 'dsBelegReferenzRechnung';\r\n dsBelegReferenzRechnung.FieldName := 'ReferenzRechnung';\r\n dsBelegReferenzRechnung.Size := 10;\r\n dsBelegDatum.SetParentComponent(dsBeleg);\r\n dsBelegDatum.Name := 'dsBelegDatum';\r\n dsBelegDatum.FieldName := 'Datum';\r\n dsBelegDatum.Required := True;\r\n dsBelegJahr.SetParentComponent(dsBeleg);\r\n dsBelegJahr.Name := 'dsBelegJahr';\r\n dsBelegJahr.FieldName := 'Jahr';\r\n dsBelegKalenderwoche.SetParentComponent(dsBeleg);\r\n dsBelegKalenderwoche.Name := 'dsBelegKalenderwoche';\r\n dsBelegKalenderwoche.FieldName := 'Kalenderwoche';\r\n dsBelegNachname.SetParentComponent(dsBeleg);\r\n dsBelegNachname.Name := 'dsBelegNachname';\r\n dsBelegNachname.FieldName := 'Nachname';\r\n dsBelegNachname.Size := 50;\r\n dsBelegVorname.SetParentComponent(dsBeleg);\r\n dsBelegVorname.Name := 'dsBelegVorname';\r\n dsBelegVorname.FieldName := 'Vorname';\r\n dsBelegVorname.Size := 50;\r\n dsBelegPostleitzahl.SetParentComponent(dsBeleg);\r\n dsBelegPostleitzahl.Name := 'dsBelegPostleitzahl';\r\n dsBelegPostleitzahl.FieldName := 'Postleitzahl';\r\n dsBelegPostleitzahl.Size := 10;\r\n dsBelegOrt.SetParentComponent(dsBeleg);\r\n dsBelegOrt.Name := 'dsBelegOrt';\r\n dsBelegOrt.FieldName := 'Ort';\r\n dsBelegOrt.Size := 50;\r\n dsBelegLaenderkuerzel.SetParentComponent(dsBeleg);\r\n dsBelegLaenderkuerzel.Name := 'dsBelegLaenderkuerzel';\r\n dsBelegLaenderkuerzel.FieldName := 'Laenderkuerzel';\r\n dsBelegLaenderkuerzel.Size := 5;\r\n dsBelegLand.SetParentComponent(dsBeleg);\r\n dsBelegLand.Name := 'dsBelegLand';\r\n dsBelegLand.FieldName := 'Land';\r\n dsBelegLand.Size := 50;\r\n dsBelegBriefanrede1.SetParentComponent(dsBeleg);\r\n dsBelegBriefanrede1.Name := 'dsBelegBriefanrede1';\r\n dsBelegBriefanrede1.FieldName := 'Briefanrede1';\r\n dsBelegBriefanrede1.Size := 255;\r\n dsBelegBriefanrede2.SetParentComponent(dsBeleg);\r\n dsBelegBriefanrede2.Name := 'dsBelegBriefanrede2';\r\n dsBelegBriefanrede2.FieldName := 'Briefanrede2';\r\n dsBelegBriefanrede2.Size := 40;\r\n dsBelegEMail.SetParentComponent(dsBeleg);\r\n dsBelegEMail.Name := 'dsBelegEMail';\r\n dsBelegEMail.FieldName := 'EMail';\r\n dsBelegEMail.Size := 50;\r\n dsBelegAdresseBild.SetParentComponent(dsBeleg);\r\n dsBelegAdresseBild.Name := 'dsBelegAdresseBild';\r\n dsBelegAdresseBild.FieldName := 'AdresseBild';\r\n dsBelegAdresseBild.Size := 255;\r\n dsBelegLieferanschriftBild.SetParentComponent(dsBeleg);\r\n dsBelegLieferanschriftBild.Name := 'dsBelegLieferanschriftBild';\r\n dsBelegLieferanschriftBild.FieldName := 'LieferanschriftBild';\r\n dsBelegLieferanschriftBild.Size := 255;\r\n dsBelegZahlungsbedingung.SetParentComponent(dsBeleg);\r\n dsBelegZahlungsbedingung.Name := 'dsBelegZahlungsbedingung';\r\n dsBelegZahlungsbedingung.FieldName := 'Zahlungsbedingung';\r\n dsBelegZahlungsbedingungText.SetParentComponent(dsBeleg);\r\n dsBelegZahlungsbedingungText.Name := 'dsBelegZahlungsbedingungText';\r\n dsBelegZahlungsbedingungText.FieldName := 'ZahlungsbedingungText';\r\n dsBelegZahlungsbedingungText.Size := 250;\r\n dsBelegAuftragsbezeichnung.SetParentComponent(dsBeleg);\r\n dsBelegAuftragsbezeichnung.Name := 'dsBelegAuftragsbezeichnung';\r\n dsBelegAuftragsbezeichnung.FieldName := 'Auftragsbezeichnung';\r\n dsBelegAuftragsbezeichnung.Size := 255;\r\n dsBelegAuftragnummerKunde.SetParentComponent(dsBeleg);\r\n dsBelegAuftragnummerKunde.Name := 'dsBelegAuftragnummerKunde';\r\n dsBelegAuftragnummerKunde.FieldName := 'AuftragnummerKunde';\r\n dsBelegAuftragnummerKunde.Size := 50;\r\n dsBelegBestelldatumKunde.SetParentComponent(dsBeleg);\r\n dsBelegBestelldatumKunde.Name := 'dsBelegBestelldatumKunde';\r\n dsBelegBestelldatumKunde.FieldName := 'BestelldatumKunde';\r\n dsBelegILN.SetParentComponent(dsBeleg);\r\n dsBelegILN.Name := 'dsBelegILN';\r\n dsBelegILN.FieldName := 'ILN';\r\n dsBelegILN.Size := 50;\r\n dsBelegKopftext.SetParentComponent(dsBeleg);\r\n dsBelegKopftext.Name := 'dsBelegKopftext';\r\n dsBelegKopftext.FieldName := 'Kopftext';\r\n dsBelegKopftext.Size := 255;\r\n dsBelegSchlussbemerkung.SetParentComponent(dsBeleg);\r\n dsBelegSchlussbemerkung.Name := 'dsBelegSchlussbemerkung';\r\n dsBelegSchlussbemerkung.FieldName := 'Schlussbemerkung';\r\n dsBelegSchlussbemerkung.Size := 255;\r\n dsBelegGruss.SetParentComponent(dsBeleg);\r\n dsBelegGruss.Name := 'dsBelegGruss';\r\n dsBelegGruss.FieldName := 'Gruss';\r\n dsBelegGruss.Size := 255;\r\n dsBelegMehrwertsteuersatz1.SetParentComponent(dsBeleg);\r\n dsBelegMehrwertsteuersatz1.Name := 'dsBelegMehrwertsteuersatz1';\r\n dsBelegMehrwertsteuersatz1.FieldName := 'Mehrwertsteuersatz1';\r\n dsBelegMehrwertsteuersatz2.SetParentComponent(dsBeleg);\r\n dsBelegMehrwertsteuersatz2.Name := 'dsBelegMehrwertsteuersatz2';\r\n dsBelegMehrwertsteuersatz2.FieldName := 'Mehrwertsteuersatz2';\r\n dsBelegNettosumme01.SetParentComponent(dsBeleg);\r\n dsBelegNettosumme01.Name := 'dsBelegNettosumme01';\r\n dsBelegNettosumme01.FieldName := 'Nettosumme01';\r\n dsBelegNettosumme02.SetParentComponent(dsBeleg);\r\n dsBelegNettosumme02.Name := 'dsBelegNettosumme02';\r\n dsBelegNettosumme02.FieldName := 'Nettosumme02';\r\n dsBelegNettosumme.SetParentComponent(dsBeleg);\r\n dsBelegNettosumme.Name := 'dsBelegNettosumme';\r\n dsBelegNettosumme.FieldName := 'Nettosumme';\r\n dsBelegMehrwertsteuer01.SetParentComponent(dsBeleg);\r\n dsBelegMehrwertsteuer01.Name := 'dsBelegMehrwertsteuer01';\r\n dsBelegMehrwertsteuer01.FieldName := 'Mehrwertsteuer01';\r\n dsBelegMehrwertsteuer02.SetParentComponent(dsBeleg);\r\n dsBelegMehrwertsteuer02.Name := 'dsBelegMehrwertsteuer02';\r\n dsBelegMehrwertsteuer02.FieldName := 'Mehrwertsteuer02';\r\n dsBelegMehrwertsteuer.SetParentComponent(dsBeleg);\r\n dsBelegMehrwertsteuer.Name := 'dsBelegMehrwertsteuer';\r\n dsBelegMehrwertsteuer.FieldName := 'Mehrwertsteuer';\r\n dsBelegBruttosumme.SetParentComponent(dsBeleg);\r\n dsBelegBruttosumme.Name := 'dsBelegBruttosumme';\r\n dsBelegBruttosumme.FieldName := 'Bruttosumme';\r\n dsBelegVersanddatum.SetParentComponent(dsBeleg);\r\n dsBelegVersanddatum.Name := 'dsBelegVersanddatum';\r\n dsBelegVersanddatum.FieldName := 'Versanddatum';\r\n dsBelegSkontosatz.SetParentComponent(dsBeleg);\r\n dsBelegSkontosatz.Name := 'dsBelegSkontosatz';\r\n dsBelegSkontosatz.FieldName := 'Skontosatz';\r\n dsBelegNettosummeEK.SetParentComponent(dsBeleg);\r\n dsBelegNettosummeEK.Name := 'dsBelegNettosummeEK';\r\n dsBelegNettosummeEK.FieldName := 'NettosummeEK';\r\n dsBelegNettoMarge.SetParentComponent(dsBeleg);\r\n dsBelegNettoMarge.Name := 'dsBelegNettoMarge';\r\n dsBelegNettoMarge.FieldName := 'NettoMarge';\r\n dsBelegSchreibzeichen.SetParentComponent(dsBeleg);\r\n dsBelegSchreibzeichen.Name := 'dsBelegSchreibzeichen';\r\n dsBelegSchreibzeichen.FieldName := 'Schreibzeichen';\r\n dsBelegSchreibzeichen.Size := 10;\r\n dsBelegUnterzeichner.SetParentComponent(dsBeleg);\r\n dsBelegUnterzeichner.Name := 'dsBelegUnterzeichner';\r\n dsBelegUnterzeichner.FieldName := 'Unterzeichner';\r\n dsBelegUnterzeichner.Size := 50;\r\n dsBelegTelefonMA.SetParentComponent(dsBeleg);\r\n dsBelegTelefonMA.Name := 'dsBelegTelefonMA';\r\n dsBelegTelefonMA.FieldName := 'TelefonMA';\r\n dsBelegTelefonMA.Size := 30;\r\n dsBelegEmailMA.SetParentComponent(dsBeleg);\r\n dsBelegEmailMA.Name := 'dsBelegEmailMA';\r\n dsBelegEmailMA.FieldName := 'EmailMA';\r\n dsBelegEmailMA.Size := 50;\r\n dsBelegUSTID.SetParentComponent(dsBeleg);\r\n dsBelegUSTID.Name := 'dsBelegUSTID';\r\n dsBelegUSTID.FieldName := 'USTID';\r\n dsBelegUmsatzsteuerausweis.SetParentComponent(dsBeleg);\r\n dsBelegUmsatzsteuerausweis.Name := 'dsBelegUmsatzsteuerausweis';\r\n dsBelegUmsatzsteuerausweis.FieldName := 'Umsatzsteuerausweis';\r\n dsBeleggebucht.SetParentComponent(dsBeleg);\r\n dsBeleggebucht.Name := 'dsBeleggebucht';\r\n dsBeleggebucht.FieldName := 'gebucht';\r\n dsBelegLieferdatum.SetParentComponent(dsBeleg);\r\n dsBelegLieferdatum.Name := 'dsBelegLieferdatum';\r\n dsBelegLieferdatum.FieldName := 'Lieferdatum';\r\n dsBelegTransportbedingung.SetParentComponent(dsBeleg);\r\n dsBelegTransportbedingung.Name := 'dsBelegTransportbedingung';\r\n dsBelegTransportbedingung.FieldName := 'Transportbedingung';\r\n dsBelegTransportbedingung.Size := 100;\r\n dsBelegMehrwertsteuersatz3.SetParentComponent(dsBeleg);\r\n dsBelegMehrwertsteuersatz3.Name := 'dsBelegMehrwertsteuersatz3';\r\n dsBelegMehrwertsteuersatz3.FieldName := 'Mehrwertsteuersatz3';\r\n dsBelegMehrwertsteuer03.SetParentComponent(dsBeleg);\r\n dsBelegMehrwertsteuer03.Name := 'dsBelegMehrwertsteuer03';\r\n dsBelegMehrwertsteuer03.FieldName := 'Mehrwertsteuer03';\r\n dsBelegNettosumme03.SetParentComponent(dsBeleg);\r\n dsBelegNettosumme03.Name := 'dsBelegNettosumme03';\r\n dsBelegNettosumme03.FieldName := 'Nettosumme03';\r\n dsBelegRundungsDifferenz.SetParentComponent(dsBeleg);\r\n dsBelegRundungsDifferenz.Name := 'dsBelegRundungsDifferenz';\r\n dsBelegRundungsDifferenz.FieldName := 'RundungsDifferenz';\r\n dsBelegEmailText.SetParentComponent(dsBeleg);\r\n dsBelegEmailText.Name := 'dsBelegEmailText';\r\n dsBelegEmailText.FieldName := 'EmailText';\r\n dsBelegEmailText.Size := 255;\r\n dsBelegAuftragerhaltenam.SetParentComponent(dsBeleg);\r\n dsBelegAuftragerhaltenam.Name := 'dsBelegAuftragerhaltenam';\r\n dsBelegAuftragerhaltenam.FieldName := 'Auftragerhaltenam';\r\n dsBelegAuftragnichterhalten.SetParentComponent(dsBeleg);\r\n dsBelegAuftragnichterhalten.Name := 'dsBelegAuftragnichterhalten';\r\n dsBelegAuftragnichterhalten.FieldName := 'Auftragnichterhalten';\r\n dsBelegRabattstufe.SetParentComponent(dsBeleg);\r\n dsBelegRabattstufe.Name := 'dsBelegRabattstufe';\r\n dsBelegRabattstufe.FieldName := 'Rabattstufe';\r\n dsBelegRabattstufe.Size := 15;\r\n dsBelegKFZKennzeichen.SetParentComponent(dsBeleg);\r\n dsBelegKFZKennzeichen.Name := 'dsBelegKFZKennzeichen';\r\n dsBelegKFZKennzeichen.FieldName := 'KFZKennzeichen';\r\n dsBelegKFZKennzeichen.Size := 13;\r\n dsBelegFahrgestellnummer.SetParentComponent(dsBeleg);\r\n dsBelegFahrgestellnummer.Name := 'dsBelegFahrgestellnummer';\r\n dsBelegFahrgestellnummer.FieldName := 'Fahrgestellnummer';\r\n dsBelegKFZHersteller.SetParentComponent(dsBeleg);\r\n dsBelegKFZHersteller.Name := 'dsBelegKFZHersteller';\r\n dsBelegKFZHersteller.FieldName := 'KFZHersteller';\r\n dsBelegErstzulassungsdatum.SetParentComponent(dsBeleg);\r\n dsBelegErstzulassungsdatum.Name := 'dsBelegErstzulassungsdatum';\r\n dsBelegErstzulassungsdatum.FieldName := 'Erstzulassungsdatum';\r\n dsBelegKMStand.SetParentComponent(dsBeleg);\r\n dsBelegKMStand.Name := 'dsBelegKMStand';\r\n dsBelegKMStand.FieldName := 'KMStand';\r\n dsBelegKMStand.Size := 6;\r\n dsBelegKFZType.SetParentComponent(dsBeleg);\r\n dsBelegKFZType.Name := 'dsBelegKFZType';\r\n dsBelegKFZType.FieldName := 'KFZType';\r\n dsBelegKFZType.Size := 25;\r\n dsBelegInspektionsdatum.SetParentComponent(dsBeleg);\r\n dsBelegInspektionsdatum.Name := 'dsBelegInspektionsdatum';\r\n dsBelegInspektionsdatum.FieldName := 'Inspektionsdatum';\r\n dsBelegDebitorennummer.SetParentComponent(dsBeleg);\r\n dsBelegDebitorennummer.Name := 'dsBelegDebitorennummer';\r\n dsBelegDebitorennummer.FieldName := 'Debitorennummer';\r\n dsBelegDebitorennummer.Size := 13;\r\n dsBelegKostentraeger.SetParentComponent(dsBeleg);\r\n dsBelegKostentraeger.Name := 'dsBelegKostentraeger';\r\n dsBelegKostentraeger.FieldName := 'Kostentraeger';\r\n dsBelegKostentraeger.Size := 13;\r\n dsBelegRabattsatz.SetParentComponent(dsBeleg);\r\n dsBelegRabattsatz.Name := 'dsBelegRabattsatz';\r\n dsBelegRabattsatz.FieldName := 'Rabattsatz';\r\n dsBelegObjektReferenz.SetParentComponent(dsBeleg);\r\n dsBelegObjektReferenz.Name := 'dsBelegObjektReferenz';\r\n dsBelegObjektReferenz.FieldName := 'ObjektReferenz';\r\n dsBelegObjektReferenz.Size := 13;\r\n dsBelegBank.SetParentComponent(dsBeleg);\r\n dsBelegBank.Name := 'dsBelegBank';\r\n dsBelegBank.FieldName := 'Bank';\r\n dsBelegBank.Size := 50;\r\n dsBelegBankleitzahl.SetParentComponent(dsBeleg);\r\n dsBelegBankleitzahl.Name := 'dsBelegBankleitzahl';\r\n dsBelegBankleitzahl.FieldName := 'Bankleitzahl';\r\n dsBelegKontonummer.SetParentComponent(dsBeleg);\r\n dsBelegKontonummer.Name := 'dsBelegKontonummer';\r\n dsBelegKontonummer.FieldName := 'Kontonummer';\r\n dsBelegKontonummer.Size := 50;\r\n dsBelegKontoinhaber.SetParentComponent(dsBeleg);\r\n dsBelegKontoinhaber.Name := 'dsBelegKontoinhaber';\r\n dsBelegKontoinhaber.FieldName := 'Kontoinhaber';\r\n dsBelegKontoinhaber.Size := 50;\r\n dsBelegTelefaxnummer.SetParentComponent(dsBeleg);\r\n dsBelegTelefaxnummer.Name := 'dsBelegTelefaxnummer';\r\n dsBelegTelefaxnummer.FieldName := 'Telefaxnummer';\r\n dsBelegTelefaxnummer.Size := 25;\r\n dsBelegDatumNeu.SetParentComponent(dsBeleg);\r\n dsBelegDatumNeu.Name := 'dsBelegDatumNeu';\r\n dsBelegDatumNeu.FieldName := 'DatumNeu';\r\n dsBelegDatumgeaendert.SetParentComponent(dsBeleg);\r\n dsBelegDatumgeaendert.Name := 'dsBelegDatumgeaendert';\r\n dsBelegDatumgeaendert.FieldName := 'Datumgeaendert';\r\n dsBelegLiefertermin.SetParentComponent(dsBeleg);\r\n dsBelegLiefertermin.Name := 'dsBelegLiefertermin';\r\n dsBelegLiefertermin.FieldName := 'Liefertermin';\r\n dsBelegLiefertermin.Size := 50;\r\n dsBelegObjektnummer.SetParentComponent(dsBeleg);\r\n dsBelegObjektnummer.Name := 'dsBelegObjektnummer';\r\n dsBelegObjektnummer.FieldName := 'Objektnummer';\r\n dsBelegObjektnummer.Size := 25;\r\n dsBelegReferenzKalkulation.SetParentComponent(dsBeleg);\r\n dsBelegReferenzKalkulation.Name := 'dsBelegReferenzKalkulation';\r\n dsBelegReferenzKalkulation.FieldName := 'ReferenzKalkulation';\r\n dsBelegReferenzKalkulation.Size := 10;\r\n dsBelegReferenzDatum.SetParentComponent(dsBeleg);\r\n dsBelegReferenzDatum.Name := 'dsBelegReferenzDatum';\r\n dsBelegReferenzDatum.FieldName := 'ReferenzDatum';\r\n dsBelegEmailversand.SetParentComponent(dsBeleg);\r\n dsBelegEmailversand.Name := 'dsBelegEmailversand';\r\n dsBelegEmailversand.FieldName := 'Emailversand';\r\n dsBelegTelefonnummer.SetParentComponent(dsBeleg);\r\n dsBelegTelefonnummer.Name := 'dsBelegTelefonnummer';\r\n dsBelegTelefonnummer.FieldName := 'Telefonnummer';\r\n dsBelegTelefonnummer.Size := 35;\r\n dsBelegMobilTelefon.SetParentComponent(dsBeleg);\r\n dsBelegMobilTelefon.Name := 'dsBelegMobilTelefon';\r\n dsBelegMobilTelefon.FieldName := 'MobilTelefon';\r\n dsBelegMobilTelefon.Size := 25;\r\n dsBelegAngebotFax.SetParentComponent(dsBeleg);\r\n dsBelegAngebotFax.Name := 'dsBelegAngebotFax';\r\n dsBelegAngebotFax.FieldName := 'AngebotFax';\r\n dsBelegREDatum.SetParentComponent(dsBeleg);\r\n dsBelegREDatum.Name := 'dsBelegREDatum';\r\n dsBelegREDatum.FieldName := 'REDatum';\r\n dsBelegBenutzerNeu.SetParentComponent(dsBeleg);\r\n dsBelegBenutzerNeu.Name := 'dsBelegBenutzerNeu';\r\n dsBelegBenutzerNeu.FieldName := 'BenutzerNeu';\r\n dsBelegBenutzerNeu.Size := 50;\r\n dsBelegBenutzerGeaendert.SetParentComponent(dsBeleg);\r\n dsBelegBenutzerGeaendert.Name := 'dsBelegBenutzerGeaendert';\r\n dsBelegBenutzerGeaendert.FieldName := 'BenutzerGeaendert';\r\n dsBelegBenutzerGeaendert.Size := 50;\r\n dsBelegBerechnungBrutto.SetParentComponent(dsBeleg);\r\n dsBelegBerechnungBrutto.Name := 'dsBelegBerechnungBrutto';\r\n dsBelegBerechnungBrutto.FieldName := 'BerechnungBrutto';\r\n dsBelegBruttosumme01.SetParentComponent(dsBeleg);\r\n dsBelegBruttosumme01.Name := 'dsBelegBruttosumme01';\r\n dsBelegBruttosumme01.FieldName := 'Bruttosumme01';\r\n dsBelegBruttosumme02.SetParentComponent(dsBeleg);\r\n dsBelegBruttosumme02.Name := 'dsBelegBruttosumme02';\r\n dsBelegBruttosumme02.FieldName := 'Bruttosumme02';\r\n dsBelegBruttosumme03.SetParentComponent(dsBeleg);\r\n dsBelegBruttosumme03.Name := 'dsBelegBruttosumme03';\r\n dsBelegBruttosumme03.FieldName := 'Bruttosumme03';\r\n dsBelegNotiz.SetParentComponent(dsBeleg);\r\n dsBelegNotiz.Name := 'dsBelegNotiz';\r\n dsBelegNotiz.FieldName := 'Notiz';\r\n dsBelegNotiz.Size := 255;\r\n dsBelegMargeProzent.SetParentComponent(dsBeleg);\r\n dsBelegMargeProzent.Name := 'dsBelegMargeProzent';\r\n dsBelegMargeProzent.FieldName := 'MargeProzent';\r\n dsBelegBelegsprache.SetParentComponent(dsBeleg);\r\n dsBelegBelegsprache.Name := 'dsBelegBelegsprache';\r\n dsBelegBelegsprache.FieldName := 'Belegsprache';\r\n dsBelegBelegsprache.Size := 10;\r\n dsBelegDuplicate.SetParentComponent(dsBeleg);\r\n dsBelegDuplicate.Name := 'dsBelegDuplicate';\r\n dsBelegDuplicate.FieldName := 'Duplicate';\r\n dsBelegperEmail.SetParentComponent(dsBeleg);\r\n dsBelegperEmail.Name := 'dsBelegperEmail';\r\n dsBelegperEmail.FieldName := 'perEmail';\r\n dsBelegAnsprechpartner.SetParentComponent(dsBeleg);\r\n dsBelegAnsprechpartner.Name := 'dsBelegAnsprechpartner';\r\n dsBelegAnsprechpartner.FieldName := 'Ansprechpartner';\r\n dsBelegAnsprechpartner.Size := 105;\r\n dsBelegKundennummerFremd.SetParentComponent(dsBeleg);\r\n dsBelegKundennummerFremd.Name := 'dsBelegKundennummerFremd';\r\n dsBelegKundennummerFremd.FieldName := 'KundennummerFremd';\r\n dsBelegProtokoll.SetParentComponent(dsBeleg);\r\n dsBelegProtokoll.Name := 'dsBelegProtokoll';\r\n dsBelegProtokoll.FieldName := 'Protokoll';\r\n dsBelegProtokoll.Size := 255;\r\n dsBelegVerleihauftrag.SetParentComponent(dsBeleg);\r\n dsBelegVerleihauftrag.Name := 'dsBelegVerleihauftrag';\r\n dsBelegVerleihauftrag.FieldName := 'Verleihauftrag';\r\n dsBelegVerleihVon.SetParentComponent(dsBeleg);\r\n dsBelegVerleihVon.Name := 'dsBelegVerleihVon';\r\n dsBelegVerleihVon.FieldName := 'VerleihVon';\r\n dsBelegVerleihBis.SetParentComponent(dsBeleg);\r\n dsBelegVerleihBis.Name := 'dsBelegVerleihBis';\r\n dsBelegVerleihBis.FieldName := 'VerleihBis';\r\n dsBeleggesperrt.SetParentComponent(dsBeleg);\r\n dsBeleggesperrt.Name := 'dsBeleggesperrt';\r\n dsBeleggesperrt.FieldName := 'gesperrt';\r\n dsBelegVerleihvonText.SetParentComponent(dsBeleg);\r\n dsBelegVerleihvonText.Name := 'dsBelegVerleihvonText';\r\n dsBelegVerleihvonText.FieldName := 'VerleihvonText';\r\n dsBelegVerleihvonText.Size := 50;\r\n dsBelegVerleihbisText.SetParentComponent(dsBeleg);\r\n dsBelegVerleihbisText.Name := 'dsBelegVerleihbisText';\r\n dsBelegVerleihbisText.FieldName := 'VerleihbisText';\r\n dsBelegVerleihbisText.Size := 50;\r\n dsBelegDruckWHG.SetParentComponent(dsBeleg);\r\n dsBelegDruckWHG.Name := 'dsBelegDruckWHG';\r\n dsBelegDruckWHG.FieldName := 'DruckWHG';\r\n dsBelegDruckWHG.Size := 3;\r\n dsBelegDruckWHGKurs.SetParentComponent(dsBeleg);\r\n dsBelegDruckWHGKurs.Name := 'dsBelegDruckWHGKurs';\r\n dsBelegDruckWHGKurs.FieldName := 'DruckWHGKurs';\r\n dsBeleggueltigbis.SetParentComponent(dsBeleg);\r\n dsBeleggueltigbis.Name := 'dsBeleggueltigbis';\r\n dsBeleggueltigbis.FieldName := 'gueltigbis';\r\n dsBelegProzentsatzZusatzposition.SetParentComponent(dsBeleg);\r\n dsBelegProzentsatzZusatzposition.Name := 'dsBelegProzentsatzZusatzposition';\r\n dsBelegProzentsatzZusatzposition.FieldName := 'ProzentsatzZusatzposition';\r\n dsBelegTextZusatzposition.SetParentComponent(dsBeleg);\r\n dsBelegTextZusatzposition.Name := 'dsBelegTextZusatzposition';\r\n dsBelegTextZusatzposition.FieldName := 'TextZusatzposition';\r\n dsBelegTextZusatzposition.Size := 255;\r\n dsBelegTextzusatzBeschreibung.SetParentComponent(dsBeleg);\r\n dsBelegTextzusatzBeschreibung.Name := 'dsBelegTextzusatzBeschreibung';\r\n dsBelegTextzusatzBeschreibung.FieldName := 'TextzusatzBeschreibung';\r\n dsBelegTextzusatzBeschreibung.Size := 50;\r\n dsBelegReferenzTarifberechnung.SetParentComponent(dsBeleg);\r\n dsBelegReferenzTarifberechnung.Name := 'dsBelegReferenzTarifberechnung';\r\n dsBelegReferenzTarifberechnung.FieldName := 'ReferenzTarifberechnung';\r\n dsBelegReferenzTarifberechnung.Size := 10;\r\n dsBelegLayoutname.SetParentComponent(dsBeleg);\r\n dsBelegLayoutname.Name := 'dsBelegLayoutname';\r\n dsBelegLayoutname.FieldName := 'Layoutname';\r\n dsBelegLayoutname.Size := 50;\r\n dsBelegGesamtgewicht.SetParentComponent(dsBeleg);\r\n dsBelegGesamtgewicht.Name := 'dsBelegGesamtgewicht';\r\n dsBelegGesamtgewicht.FieldName := 'Gesamtgewicht';\r\n dsBelegBetragZusatzposition.SetParentComponent(dsBeleg);\r\n dsBelegBetragZusatzposition.Name := 'dsBelegBetragZusatzposition';\r\n dsBelegBetragZusatzposition.FieldName := 'BetragZusatzposition';\r\n dsBelegMehrwertsteuersatz4.SetParentComponent(dsBeleg);\r\n dsBelegMehrwertsteuersatz4.Name := 'dsBelegMehrwertsteuersatz4';\r\n dsBelegMehrwertsteuersatz4.FieldName := 'Mehrwertsteuersatz4';\r\n dsBelegMehrwertsteuersatz5.SetParentComponent(dsBeleg);\r\n dsBelegMehrwertsteuersatz5.Name := 'dsBelegMehrwertsteuersatz5';\r\n dsBelegMehrwertsteuersatz5.FieldName := 'Mehrwertsteuersatz5';\r\n dsBelegMehrwertsteuersatz6.SetParentComponent(dsBeleg);\r\n dsBelegMehrwertsteuersatz6.Name := 'dsBelegMehrwertsteuersatz6';\r\n dsBelegMehrwertsteuersatz6.FieldName := 'Mehrwertsteuersatz6';\r\n dsBelegBesteuerungKey.SetParentComponent(dsBeleg);\r\n dsBelegBesteuerungKey.Name := 'dsBelegBesteuerungKey';\r\n dsBelegBesteuerungKey.FieldName := 'BesteuerungKey';\r\n dsBelegVertreterMatchcode.SetParentComponent(dsBeleg);\r\n dsBelegVertreterMatchcode.Name := 'dsBelegVertreterMatchcode';\r\n dsBelegVertreterMatchcode.FieldName := 'VertreterMatchcode';\r\n dsBelegVertreterMatchcode.Size := 50;\r\n dsBelegVerfasser.SetParentComponent(dsBeleg);\r\n dsBelegVerfasser.Name := 'dsBelegVerfasser';\r\n dsBelegVerfasser.FieldName := 'Verfasser';\r\n dsBelegVerfasser.Size := 10;\r\n dsBelegLieferadresseID.SetParentComponent(dsBeleg);\r\n dsBelegLieferadresseID.Name := 'dsBelegLieferadresseID';\r\n dsBelegLieferadresseID.FieldName := 'LieferadresseID';\r\n dsBelegBelegvariante.SetParentComponent(dsBeleg);\r\n dsBelegBelegvariante.Name := 'dsBelegBelegvariante';\r\n dsBelegBelegvariante.FieldName := 'Belegvariante';\r\n dsBelegBelegvariante.Size := 25;\r\n dsBelegAuftragErwartetBis.SetParentComponent(dsBeleg);\r\n dsBelegAuftragErwartetBis.Name := 'dsBelegAuftragErwartetBis';\r\n dsBelegAuftragErwartetBis.FieldName := 'AuftragErwartetBis';\r\n dsBelegAuftragWahrscheinlichkeit.SetParentComponent(dsBeleg);\r\n dsBelegAuftragWahrscheinlichkeit.Name := 'dsBelegAuftragWahrscheinlichkeit';\r\n dsBelegAuftragWahrscheinlichkeit.FieldName := 'AuftragWahrscheinlichkeit';\r\n dsBelegFahrzeugID.SetParentComponent(dsBeleg);\r\n dsBelegFahrzeugID.Name := 'dsBelegFahrzeugID';\r\n dsBelegFahrzeugID.FieldName := 'FahrzeugID';\r\n dsBelegMonatJahr.SetParentComponent(dsBeleg);\r\n dsBelegMonatJahr.Name := 'dsBelegMonatJahr';\r\n dsBelegMonatJahr.FieldName := 'MonatJahr';\r\n dsBelegLieferanschriftDaten.SetParentComponent(dsBeleg);\r\n dsBelegLieferanschriftDaten.Name := 'dsBelegLieferanschriftDaten';\r\n dsBelegLieferanschriftDaten.FieldName := 'LieferanschriftDaten';\r\n dsBelegLieferanschriftDaten.Size := 255;\r\n dsBelegGesamtVolumen.SetParentComponent(dsBeleg);\r\n dsBelegGesamtVolumen.Name := 'dsBelegGesamtVolumen';\r\n dsBelegGesamtVolumen.FieldName := 'GesamtVolumen';\r\n dsBelegBelegPKey.SetParentComponent(dsBeleg);\r\n dsBelegBelegPKey.Name := 'dsBelegBelegPKey';\r\n dsBelegBelegPKey.FieldName := 'BelegPKey';\r\n dsBelegDruckParameter.SetParentComponent(dsBeleg);\r\n dsBelegDruckParameter.Name := 'dsBelegDruckParameter';\r\n dsBelegDruckParameter.FieldName := 'DruckParameter';\r\n dsBelegDruckParameter.Size := 255;\r\n dsBelegReferenzService.SetParentComponent(dsBeleg);\r\n dsBelegReferenzService.Name := 'dsBelegReferenzService';\r\n dsBelegReferenzService.FieldName := 'ReferenzService';\r\n dsBelegReferenzService.Size := 10;\r\n SourceBeleg.SetParentComponent(Self);\r\n SourceBeleg.Name := 'SourceBeleg';\r\n SourceBeleg.DataSet := dsBeleg;\r\n SetEvent(SourceBeleg, Self, 'OnStateChange', 'SourceBelegStateChange');\r\n SourceBeleg.Left := 16;\r\n SourceBeleg.Top := 128;\r\n dsPositionen.SetParentComponent(Self);\r\n dsPositionen.Name := 'dsPositionen';\r\n dsPositionen.AfterOpen := dsPositionenAfterOpen;\r\n dsPositionen.EntitySetName := 'PositionenAngebote';\r\n dsPositionen.Connection := DM2.XDataWebConnection1;\r\n dsPositionen.SubpropsDepth := 1;\r\n dsPositionen.QueryString := '$expand=Artikelnummer';\r\n dsPositionen.Left := 216;\r\n dsPositionen.Top := 128;\r\n dsPositionenArtikelnummer.SetParentComponent(dsPositionen);\r\n dsPositionenArtikelnummer.Name := 'dsPositionenArtikelnummer';\r\n dsPositionenArtikelnummer.FieldName := 'Artikelnummer';\r\n dsPositionenNummerkomplett.SetParentComponent(dsPositionen);\r\n dsPositionenNummerkomplett.Name := 'dsPositionenNummerkomplett';\r\n dsPositionenNummerkomplett.FieldName := 'Nummerkomplett';\r\n dsPositionenID.SetParentComponent(dsPositionen);\r\n dsPositionenID.Name := 'dsPositionenID';\r\n dsPositionenID.FieldName := 'ID';\r\n dsPositionenID.Required := True;\r\n dsPositionenPosNr.SetParentComponent(dsPositionen);\r\n dsPositionenPosNr.Name := 'dsPositionenPosNr';\r\n dsPositionenPosNr.FieldName := 'PosNr';\r\n dsPositionenPosNr.Required := True;\r\n dsPositionenPosUNr.SetParentComponent(dsPositionen);\r\n dsPositionenPosUNr.Name := 'dsPositionenPosUNr';\r\n dsPositionenPosUNr.FieldName := 'PosUNr';\r\n dsPositionenSumme.SetParentComponent(dsPositionen);\r\n dsPositionenSumme.Name := 'dsPositionenSumme';\r\n dsPositionenSumme.FieldName := 'Summe';\r\n dsPositionenArtikelueberschrift.SetParentComponent(dsPositionen);\r\n dsPositionenArtikelueberschrift.Name := 'dsPositionenArtikelueberschrift';\r\n dsPositionenArtikelueberschrift.FieldName := 'Artikelueberschrift';\r\n dsPositionenArtikelueberschrift.Size := 50;\r\n dsPositionenArtikelbeschreibung.SetParentComponent(dsPositionen);\r\n dsPositionenArtikelbeschreibung.Name := 'dsPositionenArtikelbeschreibung';\r\n dsPositionenArtikelbeschreibung.FieldName := 'Artikelbeschreibung';\r\n dsPositionenArtikelbeschreibung.Size := 255;\r\n dsPositionenMenge.SetParentComponent(dsPositionen);\r\n dsPositionenMenge.Name := 'dsPositionenMenge';\r\n dsPositionenMenge.FieldName := 'Menge';\r\n dsPositionenArtderMenge.SetParentComponent(dsPositionen);\r\n dsPositionenArtderMenge.Name := 'dsPositionenArtderMenge';\r\n dsPositionenArtderMenge.FieldName := 'ArtderMenge';\r\n dsPositionenArtderMenge.Size := 50;\r\n dsPositionenVerkaufspreis.SetParentComponent(dsPositionen);\r\n dsPositionenVerkaufspreis.Name := 'dsPositionenVerkaufspreis';\r\n dsPositionenVerkaufspreis.FieldName := 'Verkaufspreis';\r\n dsPositionenEinkaufspreis.SetParentComponent(dsPositionen);\r\n dsPositionenEinkaufspreis.Name := 'dsPositionenEinkaufspreis';\r\n dsPositionenEinkaufspreis.FieldName := 'Einkaufspreis';\r\n dsPositionenSeriennummer.SetParentComponent(dsPositionen);\r\n dsPositionenSeriennummer.Name := 'dsPositionenSeriennummer';\r\n dsPositionenSeriennummer.FieldName := 'Seriennummer';\r\n dsPositionenSeriennummer.Size := 30;\r\n dsPositionenWarengruppe.SetParentComponent(dsPositionen);\r\n dsPositionenWarengruppe.Name := 'dsPositionenWarengruppe';\r\n dsPositionenWarengruppe.FieldName := 'Warengruppe';\r\n dsPositionenWarengruppe.Size := 50;\r\n dsPositionenWarenuntergruppe.SetParentComponent(dsPositionen);\r\n dsPositionenWarenuntergruppe.Name := 'dsPositionenWarenuntergruppe';\r\n dsPositionenWarenuntergruppe.FieldName := 'Warenuntergruppe';\r\n dsPositionenWarenuntergruppe.Size := 50;\r\n dsPositionenArtikelnummerKunde.SetParentComponent(dsPositionen);\r\n dsPositionenArtikelnummerKunde.Name := 'dsPositionenArtikelnummerKunde';\r\n dsPositionenArtikelnummerKunde.FieldName := 'ArtikelnummerKunde';\r\n dsPositionenLieferant.SetParentComponent(dsPositionen);\r\n dsPositionenLieferant.Name := 'dsPositionenLieferant';\r\n dsPositionenLieferant.FieldName := 'Lieferant';\r\n dsPositionenLieferant.Size := 13;\r\n dsPositionenGewicht.SetParentComponent(dsPositionen);\r\n dsPositionenGewicht.Name := 'dsPositionenGewicht';\r\n dsPositionenGewicht.FieldName := 'Gewicht';\r\n dsPositionenLaenge.SetParentComponent(dsPositionen);\r\n dsPositionenLaenge.Name := 'dsPositionenLaenge';\r\n dsPositionenLaenge.FieldName := 'Laenge';\r\n dsPositionenBreite.SetParentComponent(dsPositionen);\r\n dsPositionenBreite.Name := 'dsPositionenBreite';\r\n dsPositionenBreite.FieldName := 'Breite';\r\n dsPositionenHoehe.SetParentComponent(dsPositionen);\r\n dsPositionenHoehe.Name := 'dsPositionenHoehe';\r\n dsPositionenHoehe.FieldName := 'Hoehe';\r\n dsPositionenMehrwertsteuersatz.SetParentComponent(dsPositionen);\r\n dsPositionenMehrwertsteuersatz.Name := 'dsPositionenMehrwertsteuersatz';\r\n dsPositionenMehrwertsteuersatz.FieldName := 'Mehrwertsteuersatz';\r\n dsPositionenEndpreis.SetParentComponent(dsPositionen);\r\n dsPositionenEndpreis.Name := 'dsPositionenEndpreis';\r\n dsPositionenEndpreis.FieldName := 'Endpreis';\r\n dsPositionenPosMWST.SetParentComponent(dsPositionen);\r\n dsPositionenPosMWST.Name := 'dsPositionenPosMWST';\r\n dsPositionenPosMWST.FieldName := 'PosMWST';\r\n dsPositionenBruttoEndpreis.SetParentComponent(dsPositionen);\r\n dsPositionenBruttoEndpreis.Name := 'dsPositionenBruttoEndpreis';\r\n dsPositionenBruttoEndpreis.FieldName := 'BruttoEndpreis';\r\n dsPositionenEndpreis_EK.SetParentComponent(dsPositionen);\r\n dsPositionenEndpreis_EK.Name := 'dsPositionenEndpreis_EK';\r\n dsPositionenEndpreis_EK.FieldName := 'Endpreis_EK';\r\n dsPositionenRabattsatz.SetParentComponent(dsPositionen);\r\n dsPositionenRabattsatz.Name := 'dsPositionenRabattsatz';\r\n dsPositionenRabattsatz.FieldName := 'Rabattsatz';\r\n dsPositionenPreisvorRabatt.SetParentComponent(dsPositionen);\r\n dsPositionenPreisvorRabatt.Name := 'dsPositionenPreisvorRabatt';\r\n dsPositionenPreisvorRabatt.FieldName := 'PreisvorRabatt';\r\n dsPositionenPKZ.SetParentComponent(dsPositionen);\r\n dsPositionenPKZ.Name := 'dsPositionenPKZ';\r\n dsPositionenPKZ.FieldName := 'PKZ';\r\n dsPositionenTextfrei10.SetParentComponent(dsPositionen);\r\n dsPositionenTextfrei10.Name := 'dsPositionenTextfrei10';\r\n dsPositionenTextfrei10.FieldName := 'Textfrei10';\r\n dsPositionenTextfrei10.Size := 50;\r\n dsPositionenTextfrei20.SetParentComponent(dsPositionen);\r\n dsPositionenTextfrei20.Name := 'dsPositionenTextfrei20';\r\n dsPositionenTextfrei20.FieldName := 'Textfrei20';\r\n dsPositionenTextfrei20.Size := 50;\r\n dsPositionenProduktionAbgeschlossen.SetParentComponent(dsPositionen);\r\n dsPositionenProduktionAbgeschlossen.Name := 'dsPositionenProduktionAbgeschlossen';\r\n dsPositionenProduktionAbgeschlossen.FieldName := 'ProduktionAbgeschlossen';\r\n dsPositionenEinzelpreisBrutto.SetParentComponent(dsPositionen);\r\n dsPositionenEinzelpreisBrutto.Name := 'dsPositionenEinzelpreisBrutto';\r\n dsPositionenEinzelpreisBrutto.FieldName := 'EinzelpreisBrutto';\r\n dsPositionenPosMarge.SetParentComponent(dsPositionen);\r\n dsPositionenPosMarge.Name := 'dsPositionenPosMarge';\r\n dsPositionenPosMarge.FieldName := 'PosMarge';\r\n dsPositionenPosMargeProzent.SetParentComponent(dsPositionen);\r\n dsPositionenPosMargeProzent.Name := 'dsPositionenPosMargeProzent';\r\n dsPositionenPosMargeProzent.FieldName := 'PosMargeProzent';\r\n dsPositionenBereitsGeliefert.SetParentComponent(dsPositionen);\r\n dsPositionenBereitsGeliefert.Name := 'dsPositionenBereitsGeliefert';\r\n dsPositionenBereitsGeliefert.FieldName := 'BereitsGeliefert';\r\n dsPositionenausliefern.SetParentComponent(dsPositionen);\r\n dsPositionenausliefern.Name := 'dsPositionenausliefern';\r\n dsPositionenausliefern.FieldName := 'ausliefern';\r\n dsPositionenBestellungErledigt.SetParentComponent(dsPositionen);\r\n dsPositionenBestellungErledigt.Name := 'dsPositionenBestellungErledigt';\r\n dsPositionenBestellungErledigt.FieldName := 'BestellungErledigt';\r\n dsPositionenLager.SetParentComponent(dsPositionen);\r\n dsPositionenLager.Name := 'dsPositionenLager';\r\n dsPositionenLager.FieldName := 'Lager';\r\n dsPositionenLager.Size := 50;\r\n dsPositionenbestellen.SetParentComponent(dsPositionen);\r\n dsPositionenbestellen.Name := 'dsPositionenbestellen';\r\n dsPositionenbestellen.FieldName := 'bestellen';\r\n dsPositionenWarenbestand.SetParentComponent(dsPositionen);\r\n dsPositionenWarenbestand.Name := 'dsPositionenWarenbestand';\r\n dsPositionenWarenbestand.FieldName := 'Warenbestand';\r\n dsPositionenArtikelbeschreibungRTF.SetParentComponent(dsPositionen);\r\n dsPositionenArtikelbeschreibungRTF.Name := 'dsPositionenArtikelbeschreibungRTF';\r\n dsPositionenArtikelbeschreibungRTF.FieldName := 'ArtikelbeschreibungRTF';\r\n dsPositionenArtikelbeschreibungRTF.Size := 255;\r\n dsPositionenQuellartikel.SetParentComponent(dsPositionen);\r\n dsPositionenQuellartikel.Name := 'dsPositionenQuellartikel';\r\n dsPositionenQuellartikel.FieldName := 'Quellartikel';\r\n dsPositionenQuellartikel.Size := 25;\r\n dsPositionenArtikelnummerWB.SetParentComponent(dsPositionen);\r\n dsPositionenArtikelnummerWB.Name := 'dsPositionenArtikelnummerWB';\r\n dsPositionenArtikelnummerWB.FieldName := 'ArtikelnummerWB';\r\n dsPositionenArtikelnummerWB.Size := 25;\r\n dsPositionenPreisanteilNetto.SetParentComponent(dsPositionen);\r\n dsPositionenPreisanteilNetto.Name := 'dsPositionenPreisanteilNetto';\r\n dsPositionenPreisanteilNetto.FieldName := 'PreisanteilNetto';\r\n dsPositionenSetHPos.SetParentComponent(dsPositionen);\r\n dsPositionenSetHPos.Name := 'dsPositionenSetHPos';\r\n dsPositionenSetHPos.FieldName := 'SetHPos';\r\n dsPositionenSetHPos.Size := 38;\r\n dsPositionenSetUPos.SetParentComponent(dsPositionen);\r\n dsPositionenSetUPos.Name := 'dsPositionenSetUPos';\r\n dsPositionenSetUPos.FieldName := 'SetUPos';\r\n dsPositionenSetUPos.Size := 38;\r\n dsPositionenProvisionssatz.SetParentComponent(dsPositionen);\r\n dsPositionenProvisionssatz.Name := 'dsPositionenProvisionssatz';\r\n dsPositionenProvisionssatz.FieldName := 'Provisionssatz';\r\n dsPositionenProvisionsbetrag.SetParentComponent(dsPositionen);\r\n dsPositionenProvisionsbetrag.Name := 'dsPositionenProvisionsbetrag';\r\n dsPositionenProvisionsbetrag.FieldName := 'Provisionsbetrag';\r\n dsPositionenArtikelsprache.SetParentComponent(dsPositionen);\r\n dsPositionenArtikelsprache.Name := 'dsPositionenArtikelsprache';\r\n dsPositionenArtikelsprache.FieldName := 'Artikelsprache';\r\n dsPositionenArtikelsprache.Size := 255;\r\n dsPositionenEKvom.SetParentComponent(dsPositionen);\r\n dsPositionenEKvom.Name := 'dsPositionenEKvom';\r\n dsPositionenEKvom.FieldName := 'EKvom';\r\n dsPositionenMengenberechnungID.SetParentComponent(dsPositionen);\r\n dsPositionenMengenberechnungID.Name := 'dsPositionenMengenberechnungID';\r\n dsPositionenMengenberechnungID.FieldName := 'MengenberechnungID';\r\n dsPositionenMengenberechnungID.Size := 38;\r\n dsPositionenTaraID.SetParentComponent(dsPositionen);\r\n dsPositionenTaraID.Name := 'dsPositionenTaraID';\r\n dsPositionenTaraID.FieldName := 'TaraID';\r\n dsPositionenTaraID.Size := 38;\r\n dsPositionenTara.SetParentComponent(dsPositionen);\r\n dsPositionenTara.Name := 'dsPositionenTara';\r\n dsPositionenTara.FieldName := 'Tara';\r\n dsPositionenBruttoGewicht.SetParentComponent(dsPositionen);\r\n dsPositionenBruttoGewicht.Name := 'dsPositionenBruttoGewicht';\r\n dsPositionenBruttoGewicht.FieldName := 'BruttoGewicht';\r\n dsPositionenAussenflaeche.SetParentComponent(dsPositionen);\r\n dsPositionenAussenflaeche.Name := 'dsPositionenAussenflaeche';\r\n dsPositionenAussenflaeche.FieldName := 'Aussenflaeche';\r\n dsPositionenLadeort.SetParentComponent(dsPositionen);\r\n dsPositionenLadeort.Name := 'dsPositionenLadeort';\r\n dsPositionenLadeort.FieldName := 'Ladeort';\r\n dsPositionenLadeort.Size := 50;\r\n dsPositionenSeitenumbruch.SetParentComponent(dsPositionen);\r\n dsPositionenSeitenumbruch.Name := 'dsPositionenSeitenumbruch';\r\n dsPositionenSeitenumbruch.FieldName := 'Seitenumbruch';\r\n dsPositionenPlanerFarbe.SetParentComponent(dsPositionen);\r\n dsPositionenPlanerFarbe.Name := 'dsPositionenPlanerFarbe';\r\n dsPositionenPlanerFarbe.FieldName := 'PlanerFarbe';\r\n dsPositionenMWStKey.SetParentComponent(dsPositionen);\r\n dsPositionenMWStKey.Name := 'dsPositionenMWStKey';\r\n dsPositionenMWStKey.FieldName := 'MWStKey';\r\n dsPositionenZSnachPos.SetParentComponent(dsPositionen);\r\n dsPositionenZSnachPos.Name := 'dsPositionenZSnachPos';\r\n dsPositionenZSnachPos.FieldName := 'ZSnachPos';\r\n dsPositionenLieferzeit.SetParentComponent(dsPositionen);\r\n dsPositionenLieferzeit.Name := 'dsPositionenLieferzeit';\r\n dsPositionenLieferzeit.FieldName := 'Lieferzeit';\r\n dsPositionenLieferzeit.Size := 50;\r\n dsPositionenPreisVorRabattWHG.SetParentComponent(dsPositionen);\r\n dsPositionenPreisVorRabattWHG.Name := 'dsPositionenPreisVorRabattWHG';\r\n dsPositionenPreisVorRabattWHG.FieldName := 'PreisVorRabattWHG';\r\n dsPositionenReferenzKalkulation.SetParentComponent(dsPositionen);\r\n dsPositionenReferenzKalkulation.Name := 'dsPositionenReferenzKalkulation';\r\n dsPositionenReferenzKalkulation.FieldName := 'ReferenzKalkulation';\r\n dsPositionenReferenzKalkulation.Size := 10;\r\n dsPositionenPKey.SetParentComponent(dsPositionen);\r\n dsPositionenPKey.Name := 'dsPositionenPKey';\r\n dsPositionenPKey.FieldName := 'PKey';\r\n dsPositionenAuftragsnummer.SetParentComponent(dsPositionen);\r\n dsPositionenAuftragsnummer.Name := 'dsPositionenAuftragsnummer';\r\n dsPositionenAuftragsnummer.FieldName := 'Auftragsnummer';\r\n dsPositionenlwbID.SetParentComponent(dsPositionen);\r\n dsPositionenlwbID.Name := 'dsPositionenlwbID';\r\n dsPositionenlwbID.FieldName := 'lwbID';\r\n dsPositionenlwbID.Size := 38;\r\n dsPositionenBelegdatum.SetParentComponent(dsPositionen);\r\n dsPositionenBelegdatum.Name := 'dsPositionenBelegdatum';\r\n dsPositionenBelegdatum.FieldName := 'Belegdatum';\r\n dsPositionenWarenkontrollnummern.SetParentComponent(dsPositionen);\r\n dsPositionenWarenkontrollnummern.Name := 'dsPositionenWarenkontrollnummern';\r\n dsPositionenWarenkontrollnummern.FieldName := 'Warenkontrollnummern';\r\n dsPositionenWarenkontrollnummern.Size := 255;\r\n dsPositionenVolumen.SetParentComponent(dsPositionen);\r\n dsPositionenVolumen.Name := 'dsPositionenVolumen';\r\n dsPositionenVolumen.FieldName := 'Volumen';\r\n dsPositionenPosVolumen.SetParentComponent(dsPositionen);\r\n dsPositionenPosVolumen.Name := 'dsPositionenPosVolumen';\r\n dsPositionenPosVolumen.FieldName := 'PosVolumen';\r\n dsPositionenArtikelAttribute.SetParentComponent(dsPositionen);\r\n dsPositionenArtikelAttribute.Name := 'dsPositionenArtikelAttribute';\r\n dsPositionenArtikelAttribute.FieldName := 'ArtikelAttribute';\r\n dsPositionenArtikelAttribute.Size := 255;\r\n dsPositionenMonteurP.SetParentComponent(dsPositionen);\r\n dsPositionenMonteurP.Name := 'dsPositionenMonteurP';\r\n dsPositionenMonteurP.FieldName := 'MonteurP';\r\n dsPositionenArbeitszeitDatum.SetParentComponent(dsPositionen);\r\n dsPositionenArbeitszeitDatum.Name := 'dsPositionenArbeitszeitDatum';\r\n dsPositionenArbeitszeitDatum.FieldName := 'ArbeitszeitDatum';\r\n dsPositionenArbeitszeitVON.SetParentComponent(dsPositionen);\r\n dsPositionenArbeitszeitVON.Name := 'dsPositionenArbeitszeitVON';\r\n dsPositionenArbeitszeitVON.FieldName := 'ArbeitszeitVON';\r\n dsPositionenArbeitszeitVON.DisplayFormat := 'hh:mm';\r\n dsPositionenArbeitszeitBIS.SetParentComponent(dsPositionen);\r\n dsPositionenArbeitszeitBIS.Name := 'dsPositionenArbeitszeitBIS';\r\n dsPositionenArbeitszeitBIS.FieldName := 'ArbeitszeitBIS';\r\n dsPositionenArbeitszeitBIS.DisplayFormat := 'hh:mm';\r\n dsPositionenArtikelnummerArtikelnummer.SetParentComponent(dsPositionen);\r\n dsPositionenArtikelnummerArtikelnummer.Name := 'dsPositionenArtikelnummerArtikelnummer';\r\n dsPositionenArtikelnummerArtikelnummer.FieldName := 'Artikelnummer.Artikelnummer';\r\n dsPositionenArtikelnummerArtikelnummer.Size := 25;\r\n dsPositionenArtikelnummerArbeitszeit.SetParentComponent(dsPositionen);\r\n dsPositionenArtikelnummerArbeitszeit.Name := 'dsPositionenArtikelnummerArbeitszeit';\r\n dsPositionenArtikelnummerArbeitszeit.FieldName := 'Artikelnummer.Arbeitszeit';\r\n sourcePositionen.SetParentComponent(Self);\r\n sourcePositionen.Name := 'sourcePositionen';\r\n sourcePositionen.DataSet := dsPositionen;\r\n sourcePositionen.Left := 136;\r\n sourcePositionen.Top := 128;\r\n dsSumBeleg.SetParentComponent(Self);\r\n dsSumBeleg.Name := 'dsSumBeleg';\r\n dsSumBeleg.AfterOpen := dsSumBelegAfterOpen;\r\n dsSumBeleg.EntitySetName := 'PositionenAngebote';\r\n dsSumBeleg.Connection := DM2.XDataWebConnection1;\r\n dsSumBeleg.Left := 136;\r\n dsSumBeleg.Top := 176;\r\n dsSumBelegPosVolumen.SetParentComponent(dsSumBeleg);\r\n dsSumBelegPosVolumen.Name := 'dsSumBelegPosVolumen';\r\n dsSumBelegPosVolumen.FieldName := 'PosVolumen';\r\n dsSumBelegBruttoGewicht.SetParentComponent(dsSumBeleg);\r\n dsSumBelegBruttoGewicht.Name := 'dsSumBelegBruttoGewicht';\r\n dsSumBelegBruttoGewicht.FieldName := 'BruttoGewicht';\r\n dsSumBelegMehrwertsteuersatz.SetParentComponent(dsSumBeleg);\r\n dsSumBelegMehrwertsteuersatz.Name := 'dsSumBelegMehrwertsteuersatz';\r\n dsSumBelegMehrwertsteuersatz.FieldName := 'Mehrwertsteuersatz';\r\n dsSumBelegEndpreis.SetParentComponent(dsSumBeleg);\r\n dsSumBelegEndpreis.Name := 'dsSumBelegEndpreis';\r\n dsSumBelegEndpreis.FieldName := 'Endpreis';\r\n dsSumBelegPosMWST.SetParentComponent(dsSumBeleg);\r\n dsSumBelegPosMWST.Name := 'dsSumBelegPosMWST';\r\n dsSumBelegPosMWST.FieldName := 'PosMWST';\r\n dsSumBelegBruttoEndpreis.SetParentComponent(dsSumBeleg);\r\n dsSumBelegBruttoEndpreis.Name := 'dsSumBelegBruttoEndpreis';\r\n dsSumBelegBruttoEndpreis.FieldName := 'BruttoEndpreis';\r\n dsSumBelegEndpreis_EK.SetParentComponent(dsSumBeleg);\r\n dsSumBelegEndpreis_EK.Name := 'dsSumBelegEndpreis_EK';\r\n dsSumBelegEndpreis_EK.FieldName := 'Endpreis_EK';\r\n dsSumBelegPKZ.SetParentComponent(dsSumBeleg);\r\n dsSumBelegPKZ.Name := 'dsSumBelegPKZ';\r\n dsSumBelegPKZ.FieldName := 'PKZ';\r\n WClient.SetParentComponent(Self);\r\n WClient.Name := 'WClient';\r\n WClient.Connection := DM2.XDataWebConnection1;\r\n WClient.Left := 80;\r\n WClient.Top := 8;\r\n WebHttpRequest1.SetParentComponent(Self);\r\n WebHttpRequest1.Name := 'WebHttpRequest1';\r\n WebHttpRequest1.Headers.BeginUpdate;\r\n try\r\n WebHttpRequest1.Headers.Clear;\r\n WebHttpRequest1.Headers.Add('Cache-Control=no-cache, no-store, must-revalidate');\r\n finally\r\n WebHttpRequest1.Headers.EndUpdate;\r\n end;\r\n WebHttpRequest1.Left := 16;\r\n WebHttpRequest1.Top := 65;\r\n dsObjekt.SetParentComponent(Self);\r\n dsObjekt.Name := 'dsObjekt';\r\n dsObjekt.AfterOpen := dsObjektAfterOpen;\r\n dsObjekt.EntitySetName := 'Objekte';\r\n dsObjekt.Connection := DM2.XDataWebConnection1;\r\n dsObjekt.Left := 16;\r\n dsObjekt.Top := 7;\r\n dsObjektObjektReferenz.SetParentComponent(dsObjekt);\r\n dsObjektObjektReferenz.Name := 'dsObjektObjektReferenz';\r\n dsObjektObjektReferenz.FieldName := 'ObjektReferenz';\r\n dsObjektObjektReferenz.Required := True;\r\n dsObjektObjektReferenz.Size := 13;\r\n dsObjektKurzbezeichnung.SetParentComponent(dsObjekt);\r\n dsObjektKurzbezeichnung.Name := 'dsObjektKurzbezeichnung';\r\n dsObjektKurzbezeichnung.FieldName := 'Kurzbezeichnung';\r\n dsObjektKurzbezeichnung.Size := 25;\r\n dsObjektObjektnummer.SetParentComponent(dsObjekt);\r\n dsObjektObjektnummer.Name := 'dsObjektObjektnummer';\r\n dsObjektObjektnummer.FieldName := 'Objektnummer';\r\n dsObjektObjektnummer.Size := 25;\r\n dsDateien.SetParentComponent(Self);\r\n dsDateien.Name := 'dsDateien';\r\n dsDateien.AfterOpen := dsDateienAfterOpen;\r\n dsDateien.EntitySetName := 'DokumenteDateien';\r\n dsDateien.Connection := DM2.XDataWebConnection1;\r\n dsDateien.Left := 136;\r\n dsDateien.Top := 360;\r\n dsDateienID.SetParentComponent(dsDateien);\r\n dsDateienID.Name := 'dsDateienID';\r\n dsDateienID.FieldName := 'ID';\r\n dsDateienID.Required := True;\r\n dsDateienDatumUhrzeit.SetParentComponent(dsDateien);\r\n dsDateienDatumUhrzeit.Name := 'dsDateienDatumUhrzeit';\r\n dsDateienDatumUhrzeit.FieldName := 'DatumUhrzeit';\r\n dsDateienDatumUhrzeit.Required := True;\r\n dsDateienDateiBetreff.SetParentComponent(dsDateien);\r\n dsDateienDateiBetreff.Name := 'dsDateienDateiBetreff';\r\n dsDateienDateiBetreff.FieldName := 'DateiBetreff';\r\n dsDateienDateiBetreff.Size := 50;\r\n dsDateienNummerkomplett.SetParentComponent(dsDateien);\r\n dsDateienNummerkomplett.Name := 'dsDateienNummerkomplett';\r\n dsDateienNummerkomplett.FieldName := 'Nummerkomplett';\r\n dsDateienNummerkomplett.Size := 10;\r\n finally\r\n TC.AfterLoadDFMValues;\r\n Container1.AfterLoadDFMValues;\r\n btnzurueck.AfterLoadDFMValues;\r\n Container3.AfterLoadDFMValues;\r\n Container2.AfterLoadDFMValues;\r\n PTC.AfterLoadDFMValues;\r\n btnSpeichern.AfterLoadDFMValues;\r\n pickLieferdatum.AfterLoadDFMValues;\r\n edtAuftragsbezeichnung.AfterLoadDFMValues;\r\n edtLiefertermin.AfterLoadDFMValues;\r\n btnNeuePosition.AfterLoadDFMValues;\r\n Container4.AfterLoadDFMValues;\r\n btnDateien.AfterLoadDFMValues;\r\n btnDateienObjekt.AfterLoadDFMValues;\r\n btnDateienKontakt.AfterLoadDFMValues;\r\n dsBeleg.AfterLoadDFMValues;\r\n dsBelegKundennummer.AfterLoadDFMValues;\r\n dsBelegKundennummerKundennummer.AfterLoadDFMValues;\r\n dsBelegNummerkomplett.AfterLoadDFMValues;\r\n dsBelegReferenzAuftagbest.AfterLoadDFMValues;\r\n dsBelegReferenzLieferschein.AfterLoadDFMValues;\r\n dsBelegReferenzRechnung.AfterLoadDFMValues;\r\n dsBelegDatum.AfterLoadDFMValues;\r\n dsBelegJahr.AfterLoadDFMValues;\r\n dsBelegKalenderwoche.AfterLoadDFMValues;\r\n dsBelegNachname.AfterLoadDFMValues;\r\n dsBelegVorname.AfterLoadDFMValues;\r\n dsBelegPostleitzahl.AfterLoadDFMValues;\r\n dsBelegOrt.AfterLoadDFMValues;\r\n dsBelegLaenderkuerzel.AfterLoadDFMValues;\r\n dsBelegLand.AfterLoadDFMValues;\r\n dsBelegBriefanrede1.AfterLoadDFMValues;\r\n dsBelegBriefanrede2.AfterLoadDFMValues;\r\n dsBelegEMail.AfterLoadDFMValues;\r\n dsBelegAdresseBild.AfterLoadDFMValues;\r\n dsBelegLieferanschriftBild.AfterLoadDFMValues;\r\n dsBelegZahlungsbedingung.AfterLoadDFMValues;\r\n dsBelegZahlungsbedingungText.AfterLoadDFMValues;\r\n dsBelegAuftragsbezeichnung.AfterLoadDFMValues;\r\n dsBelegAuftragnummerKunde.AfterLoadDFMValues;\r\n dsBelegBestelldatumKunde.AfterLoadDFMValues;\r\n dsBelegILN.AfterLoadDFMValues;\r\n dsBelegKopftext.AfterLoadDFMValues;\r\n dsBelegSchlussbemerkung.AfterLoadDFMValues;\r\n dsBelegGruss.AfterLoadDFMValues;\r\n dsBelegMehrwertsteuersatz1.AfterLoadDFMValues;\r\n dsBelegMehrwertsteuersatz2.AfterLoadDFMValues;\r\n dsBelegNettosumme01.AfterLoadDFMValues;\r\n dsBelegNettosumme02.AfterLoadDFMValues;\r\n dsBelegNettosumme.AfterLoadDFMValues;\r\n dsBelegMehrwertsteuer01.AfterLoadDFMValues;\r\n dsBelegMehrwertsteuer02.AfterLoadDFMValues;\r\n dsBelegMehrwertsteuer.AfterLoadDFMValues;\r\n dsBelegBruttosumme.AfterLoadDFMValues;\r\n dsBelegVersanddatum.AfterLoadDFMValues;\r\n dsBelegSkontosatz.AfterLoadDFMValues;\r\n dsBelegNettosummeEK.AfterLoadDFMValues;\r\n dsBelegNettoMarge.AfterLoadDFMValues;\r\n dsBelegSchreibzeichen.AfterLoadDFMValues;\r\n dsBelegUnterzeichner.AfterLoadDFMValues;\r\n dsBelegTelefonMA.AfterLoadDFMValues;\r\n dsBelegEmailMA.AfterLoadDFMValues;\r\n dsBelegUSTID.AfterLoadDFMValues;\r\n dsBelegUmsatzsteuerausweis.AfterLoadDFMValues;\r\n dsBeleggebucht.AfterLoadDFMValues;\r\n dsBelegLieferdatum.AfterLoadDFMValues;\r\n dsBelegTransportbedingung.AfterLoadDFMValues;\r\n dsBelegMehrwertsteuersatz3.AfterLoadDFMValues;\r\n dsBelegMehrwertsteuer03.AfterLoadDFMValues;\r\n dsBelegNettosumme03.AfterLoadDFMValues;\r\n dsBelegRundungsDifferenz.AfterLoadDFMValues;\r\n dsBelegEmailText.AfterLoadDFMValues;\r\n dsBelegAuftragerhaltenam.AfterLoadDFMValues;\r\n dsBelegAuftragnichterhalten.AfterLoadDFMValues;\r\n dsBelegRabattstufe.AfterLoadDFMValues;\r\n dsBelegKFZKennzeichen.AfterLoadDFMValues;\r\n dsBelegFahrgestellnummer.AfterLoadDFMValues;\r\n dsBelegKFZHersteller.AfterLoadDFMValues;\r\n dsBelegErstzulassungsdatum.AfterLoadDFMValues;\r\n dsBelegKMStand.AfterLoadDFMValues;\r\n dsBelegKFZType.AfterLoadDFMValues;\r\n dsBelegInspektionsdatum.AfterLoadDFMValues;\r\n dsBelegDebitorennummer.AfterLoadDFMValues;\r\n dsBelegKostentraeger.AfterLoadDFMValues;\r\n dsBelegRabattsatz.AfterLoadDFMValues;\r\n dsBelegObjektReferenz.AfterLoadDFMValues;\r\n dsBelegBank.AfterLoadDFMValues;\r\n dsBelegBankleitzahl.AfterLoadDFMValues;\r\n dsBelegKontonummer.AfterLoadDFMValues;\r\n dsBelegKontoinhaber.AfterLoadDFMValues;\r\n dsBelegTelefaxnummer.AfterLoadDFMValues;\r\n dsBelegDatumNeu.AfterLoadDFMValues;\r\n dsBelegDatumgeaendert.AfterLoadDFMValues;\r\n dsBelegLiefertermin.AfterLoadDFMValues;\r\n dsBelegObjektnummer.AfterLoadDFMValues;\r\n dsBelegReferenzKalkulation.AfterLoadDFMValues;\r\n dsBelegReferenzDatum.AfterLoadDFMValues;\r\n dsBelegEmailversand.AfterLoadDFMValues;\r\n dsBelegTelefonnummer.AfterLoadDFMValues;\r\n dsBelegMobilTelefon.AfterLoadDFMValues;\r\n dsBelegAngebotFax.AfterLoadDFMValues;\r\n dsBelegREDatum.AfterLoadDFMValues;\r\n dsBelegBenutzerNeu.AfterLoadDFMValues;\r\n dsBelegBenutzerGeaendert.AfterLoadDFMValues;\r\n dsBelegBerechnungBrutto.AfterLoadDFMValues;\r\n dsBelegBruttosumme01.AfterLoadDFMValues;\r\n dsBelegBruttosumme02.AfterLoadDFMValues;\r\n dsBelegBruttosumme03.AfterLoadDFMValues;\r\n dsBelegNotiz.AfterLoadDFMValues;\r\n dsBelegMargeProzent.AfterLoadDFMValues;\r\n dsBelegBelegsprache.AfterLoadDFMValues;\r\n dsBelegDuplicate.AfterLoadDFMValues;\r\n dsBelegperEmail.AfterLoadDFMValues;\r\n dsBelegAnsprechpartner.AfterLoadDFMValues;\r\n dsBelegKundennummerFremd.AfterLoadDFMValues;\r\n dsBelegProtokoll.AfterLoadDFMValues;\r\n dsBelegVerleihauftrag.AfterLoadDFMValues;\r\n dsBelegVerleihVon.AfterLoadDFMValues;\r\n dsBelegVerleihBis.AfterLoadDFMValues;\r\n dsBeleggesperrt.AfterLoadDFMValues;\r\n dsBelegVerleihvonText.AfterLoadDFMValues;\r\n dsBelegVerleihbisText.AfterLoadDFMValues;\r\n dsBelegDruckWHG.AfterLoadDFMValues;\r\n dsBelegDruckWHGKurs.AfterLoadDFMValues;\r\n dsBeleggueltigbis.AfterLoadDFMValues;\r\n dsBelegProzentsatzZusatzposition.AfterLoadDFMValues;\r\n dsBelegTextZusatzposition.AfterLoadDFMValues;\r\n dsBelegTextzusatzBeschreibung.AfterLoadDFMValues;\r\n dsBelegReferenzTarifberechnung.AfterLoadDFMValues;\r\n dsBelegLayoutname.AfterLoadDFMValues;\r\n dsBelegGesamtgewicht.AfterLoadDFMValues;\r\n dsBelegBetragZusatzposition.AfterLoadDFMValues;\r\n dsBelegMehrwertsteuersatz4.AfterLoadDFMValues;\r\n dsBelegMehrwertsteuersatz5.AfterLoadDFMValues;\r\n dsBelegMehrwertsteuersatz6.AfterLoadDFMValues;\r\n dsBelegBesteuerungKey.AfterLoadDFMValues;\r\n dsBelegVertreterMatchcode.AfterLoadDFMValues;\r\n dsBelegVerfasser.AfterLoadDFMValues;\r\n dsBelegLieferadresseID.AfterLoadDFMValues;\r\n dsBelegBelegvariante.AfterLoadDFMValues;\r\n dsBelegAuftragErwartetBis.AfterLoadDFMValues;\r\n dsBelegAuftragWahrscheinlichkeit.AfterLoadDFMValues;\r\n dsBelegFahrzeugID.AfterLoadDFMValues;\r\n dsBelegMonatJahr.AfterLoadDFMValues;\r\n dsBelegLieferanschriftDaten.AfterLoadDFMValues;\r\n dsBelegGesamtVolumen.AfterLoadDFMValues;\r\n dsBelegBelegPKey.AfterLoadDFMValues;\r\n dsBelegDruckParameter.AfterLoadDFMValues;\r\n dsBelegReferenzService.AfterLoadDFMValues;\r\n SourceBeleg.AfterLoadDFMValues;\r\n dsPositionen.AfterLoadDFMValues;\r\n dsPositionenArtikelnummer.AfterLoadDFMValues;\r\n dsPositionenNummerkomplett.AfterLoadDFMValues;\r\n dsPositionenID.AfterLoadDFMValues;\r\n dsPositionenPosNr.AfterLoadDFMValues;\r\n dsPositionenPosUNr.AfterLoadDFMValues;\r\n dsPositionenSumme.AfterLoadDFMValues;\r\n dsPositionenArtikelueberschrift.AfterLoadDFMValues;\r\n dsPositionenArtikelbeschreibung.AfterLoadDFMValues;\r\n dsPositionenMenge.AfterLoadDFMValues;\r\n dsPositionenArtderMenge.AfterLoadDFMValues;\r\n dsPositionenVerkaufspreis.AfterLoadDFMValues;\r\n dsPositionenEinkaufspreis.AfterLoadDFMValues;\r\n dsPositionenSeriennummer.AfterLoadDFMValues;\r\n dsPositionenWarengruppe.AfterLoadDFMValues;\r\n dsPositionenWarenuntergruppe.AfterLoadDFMValues;\r\n dsPositionenArtikelnummerKunde.AfterLoadDFMValues;\r\n dsPositionenLieferant.AfterLoadDFMValues;\r\n dsPositionenGewicht.AfterLoadDFMValues;\r\n dsPositionenLaenge.AfterLoadDFMValues;\r\n dsPositionenBreite.AfterLoadDFMValues;\r\n dsPositionenHoehe.AfterLoadDFMValues;\r\n dsPositionenMehrwertsteuersatz.AfterLoadDFMValues;\r\n dsPositionenEndpreis.AfterLoadDFMValues;\r\n dsPositionenPosMWST.AfterLoadDFMValues;\r\n dsPositionenBruttoEndpreis.AfterLoadDFMValues;\r\n dsPositionenEndpreis_EK.AfterLoadDFMValues;\r\n dsPositionenRabattsatz.AfterLoadDFMValues;\r\n dsPositionenPreisvorRabatt.AfterLoadDFMValues;\r\n dsPositionenPKZ.AfterLoadDFMValues;\r\n dsPositionenTextfrei10.AfterLoadDFMValues;\r\n dsPositionenTextfrei20.AfterLoadDFMValues;\r\n dsPositionenProduktionAbgeschlossen.AfterLoadDFMValues;\r\n dsPositionenEinzelpreisBrutto.AfterLoadDFMValues;\r\n dsPositionenPosMarge.AfterLoadDFMValues;\r\n dsPositionenPosMargeProzent.AfterLoadDFMValues;\r\n dsPositionenBereitsGeliefert.AfterLoadDFMValues;\r\n dsPositionenausliefern.AfterLoadDFMValues;\r\n dsPositionenBestellungErledigt.AfterLoadDFMValues;\r\n dsPositionenLager.AfterLoadDFMValues;\r\n dsPositionenbestellen.AfterLoadDFMValues;\r\n dsPositionenWarenbestand.AfterLoadDFMValues;\r\n dsPositionenArtikelbeschreibungRTF.AfterLoadDFMValues;\r\n dsPositionenQuellartikel.AfterLoadDFMValues;\r\n dsPositionenArtikelnummerWB.AfterLoadDFMValues;\r\n dsPositionenPreisanteilNetto.AfterLoadDFMValues;\r\n dsPositionenSetHPos.AfterLoadDFMValues;\r\n dsPositionenSetUPos.AfterLoadDFMValues;\r\n dsPositionenProvisionssatz.AfterLoadDFMValues;\r\n dsPositionenProvisionsbetrag.AfterLoadDFMValues;\r\n dsPositionenArtikelsprache.AfterLoadDFMValues;\r\n dsPositionenEKvom.AfterLoadDFMValues;\r\n dsPositionenMengenberechnungID.AfterLoadDFMValues;\r\n dsPositionenTaraID.AfterLoadDFMValues;\r\n dsPositionenTara.AfterLoadDFMValues;\r\n dsPositionenBruttoGewicht.AfterLoadDFMValues;\r\n dsPositionenAussenflaeche.AfterLoadDFMValues;\r\n dsPositionenLadeort.AfterLoadDFMValues;\r\n dsPositionenSeitenumbruch.AfterLoadDFMValues;\r\n dsPositionenPlanerFarbe.AfterLoadDFMValues;\r\n dsPositionenMWStKey.AfterLoadDFMValues;\r\n dsPositionenZSnachPos.AfterLoadDFMValues;\r\n dsPositionenLieferzeit.AfterLoadDFMValues;\r\n dsPositionenPreisVorRabattWHG.AfterLoadDFMValues;\r\n dsPositionenReferenzKalkulation.AfterLoadDFMValues;\r\n dsPositionenPKey.AfterLoadDFMValues;\r\n dsPositionenAuftragsnummer.AfterLoadDFMValues;\r\n dsPositionenlwbID.AfterLoadDFMValues;\r\n dsPositionenBelegdatum.AfterLoadDFMValues;\r\n dsPositionenWarenkontrollnummern.AfterLoadDFMValues;\r\n dsPositionenVolumen.AfterLoadDFMValues;\r\n dsPositionenPosVolumen.AfterLoadDFMValues;\r\n dsPositionenArtikelAttribute.AfterLoadDFMValues;\r\n dsPositionenMonteurP.AfterLoadDFMValues;\r\n dsPositionenArbeitszeitDatum.AfterLoadDFMValues;\r\n dsPositionenArbeitszeitVON.AfterLoadDFMValues;\r\n dsPositionenArbeitszeitBIS.AfterLoadDFMValues;\r\n dsPositionenArtikelnummerArtikelnummer.AfterLoadDFMValues;\r\n dsPositionenArtikelnummerArbeitszeit.AfterLoadDFMValues;\r\n sourcePositionen.AfterLoadDFMValues;\r\n dsSumBeleg.AfterLoadDFMValues;\r\n dsSumBelegPosVolumen.AfterLoadDFMValues;\r\n dsSumBelegBruttoGewicht.AfterLoadDFMValues;\r\n dsSumBelegMehrwertsteuersatz.AfterLoadDFMValues;\r\n dsSumBelegEndpreis.AfterLoadDFMValues;\r\n dsSumBelegPosMWST.AfterLoadDFMValues;\r\n dsSumBelegBruttoEndpreis.AfterLoadDFMValues;\r\n dsSumBelegEndpreis_EK.AfterLoadDFMValues;\r\n dsSumBelegPKZ.AfterLoadDFMValues;\r\n WClient.AfterLoadDFMValues;\r\n WebHttpRequest1.AfterLoadDFMValues;\r\n dsObjekt.AfterLoadDFMValues;\r\n dsObjektObjektReferenz.AfterLoadDFMValues;\r\n dsObjektKurzbezeichnung.AfterLoadDFMValues;\r\n dsObjektObjektnummer.AfterLoadDFMValues;\r\n dsDateien.AfterLoadDFMValues;\r\n dsDateienID.AfterLoadDFMValues;\r\n dsDateienDatumUhrzeit.AfterLoadDFMValues;\r\n dsDateienDateiBetreff.AfterLoadDFMValues;\r\n dsDateienNummerkomplett.AfterLoadDFMValues;\r\n end;\r\nend;\r\n\r\nend.\r\n","unit unit_ListeAngebot;\r\n\r\ninterface\r\n\r\nuses\r\n System.SysUtils, System.Classes, JS, Web, WEBLib.Graphics, WEBLib.Controls,\r\n WEBLib.Forms, WEBLib.Dialogs, Vcl.Controls, WEBLib.ExtCtrls, WEBLib.Buttons,\r\n WEBLib.Grids, WEBLib.DBCtrls, Data.DB, WEBLib.DB, XData.Web.JsonDataset,\r\n XData.Web.Dataset, Vcl.StdCtrls, WEBLib.StdCtrls, XData.Web.Client,\r\n WEBLib.WebCtrls, strutils;\r\n\r\ntype\r\n TListeAngebot = class(TForm)\r\n xdsAngebot: TXDataWebDataSet;\r\n WClient: TXDataWebClient;\r\n xdsAngebotNummerkomplett: TStringField;\r\n xdsAngebotDatum: TDateTimeField;\r\n xdsAngebotKundennummerKundennummer: TStringField;\r\n xdsAngebotNachname: TStringField;\r\n xdsAngebotAuftragsbezeichnung: TStringField;\r\n xdsAngebotBelegvariante: TStringField;\r\n xdsAngebotNettosumme: TFloatField;\r\n xdsAngebotAuftragerhaltenam: TDateTimeField;\r\n xdsAngebotAuftragnichterhalten: TBooleanField;\r\n Container3: THTMLContainer;\r\n Container2: THTMLContainer;\r\n btnNeuesAngebot: TButton;\r\n btnNeuerKostenvoranschlag: TButton;\r\n xdsAngebotAdresseBild: TStringField;\r\n Container1: THTMLContainer;\r\n ResultLabel: TLabel;\r\n edtSuchbegriff: TEdit;\r\n btnzurueck: TButton;\r\n procedure WebFormShow(Sender: TObject);\r\n procedure btnNeuesAngebotClick(Sender: TObject);\r\n procedure btnNeuerKostenvoranschlagClick(Sender: TObject);\r\n procedure xdsAngebotAfterOpen(DataSet: TDataSet);\r\n procedure ResultLabelClick(Sender: TObject);\r\n procedure btnzurueckClick(Sender: TObject);\r\n procedure edtSuchbegriffChange(Sender: TObject);\r\n private\r\n { Private-Deklarationen }\r\n public\r\n { Public-Deklarationen }\r\n EinzelCard:THTMLDiv;\r\n procedure EinzelCardclick(Sender:TObject);\r\n procedure NeuesAngebot(Kundennummer:string;Belegvariante:string);\r\n procedure Angebotholen(Angebotsnummer:string);\r\n protected procedure LoadDFMValues; override; end;\r\n\r\nvar\r\n ListeAngebot: TListeAngebot;\r\n\r\nimplementation\r\n uses unit1, unit2, unit_EinzelAngebot,unit_Kontaktsuche;\r\n{$R *.dfm}\r\n\r\n\r\nprocedure TListeAngebot.EinzelCardclick(Sender:TObject);\r\nvar\r\n EinzelAngebot:TEinzelAngebot;\r\n MyMerkerAngebot:string;\r\nbegin\r\n myMerkerAngebot:=(sender as THTMLDiv).ElementID;\r\n Container3.HTML.text:='';\r\n EinzelAngebot := TEinzelAngebot.CreateNew(procedure(AForm: TObject)\r\n begin\r\n (AForm as TEinzelAngebot).MerkerAngebot:=myMerkerAngebot;\r\n end\r\n );\r\n\r\n EinzelAngebot.ShowModal(procedure(AValue: TModalResult)\r\n begin\r\n xdsAngebot.close;\r\n xdsAngebot.Load;\r\n end\r\n );\r\nend;\r\n\r\n\r\n\r\n\r\nprocedure TListeAngebot.NeuesAngebot(Kundennummer:string;Belegvariante:string);\r\n procedure OnResponse(Response:TXDataClientResponse);\r\n var\r\n ergebnis:string;\r\n begin\r\n ergebnis:=string(TJSObject(response.Result)['value']);\r\n if ergebnis='WRONG' then\r\n begin\r\n showmessage('Das Angebot konnte leider nicht erstellt werden');\r\n end\r\n else\r\n begin\r\n Angebotholen(ergebnis);\r\n end;\r\n end;\r\nbegin\r\n WClient.RawInvoke('IServerService.NeuesAngebot',[Kundennummer,BenutzerPersonalnummer,Belegvariante],@OnResponse);\r\n\r\nend;\r\n\r\nprocedure TListeAngebot.ResultLabelClick(Sender: TObject);\r\nbegin\r\n if Pos('mehr anzeigen',resultlabel.html,0)>1 then\r\n begin\r\n xdsAngebot.close;\r\n xdsAngebot.QueryTop:=501;\r\n xdsAngebot.Load;\r\n end;\r\nend;\r\n\r\nprocedure TListeAngebot.Angebotholen(Angebotsnummer: string);\r\n var\r\n EinzelAngebot:TEinzelAngebot;\r\n procedure AfterCreate(AForm:TObject);\r\n var\r\n EinzelAngebot:TEinzelAngebot;\r\n begin\r\n EinzelAngebot:=(AForm as TEinzelAngebot);\r\n //lform.Connection.URL:=dm2.XDataWebConnection1.URL;\r\n EinzelAngebot.MerkerAngebot:=Angebotsnummer;\r\n end;\r\n\r\n procedure AfterShowmodal(Avalue:TModalResult);\r\n begin\r\n xdsangebot.Close;\r\n xdsangebot.Load;\r\n end;\r\n\r\n begin\r\n if LizenzOK then\r\n begin\r\n EinzelAngebot:=TEinzelAngebot.CreateNew(@AfterCreate);\r\n //LFrm.Popup:=true;\r\n\r\n EinzelAngebot.ShowModal(@AfterShowmodal);\r\n end\r\n else\r\n begin\r\n showmessage('Für das Speichern von Daten sind Sie noch nicht freigeschaltet, bitte erwerben Sie eine Lizenz');\r\n end;\r\n\r\nend;\r\n\r\nprocedure TListeAngebot.btnNeuerKostenvoranschlagClick(Sender: TObject);\r\nvar\r\n LFrm:TfrmKontaktsuche;\r\n procedure AfterCreate(AForm:TObject);\r\n var\r\n LForm:TfrmKontaktsuche;\r\n begin\r\n LForm:=(AForm as TfrmKontaktsuche);\r\n Container3.HTML.text:='';\r\n end;\r\n\r\n procedure AfterShowmodal(Avalue:TModalResult);\r\n begin\r\n if LFrm.Kontaktnummer<>'' then\r\n begin\r\n NeuesAngebot(Lfrm.Kontaktnummer,'Kostenvoranschlag');\r\n end\r\n else\r\n begin\r\n xdsAngebot.close;\r\n xdsAngebot.Load;\r\n end;\r\n end;\r\n\r\n begin\r\n LFrm:=TfrmKontaktsuche.CreateNew(@AfterCreate);\r\n LFrm.ShowModal(@AfterShowmodal);\r\n\r\nend;\r\n\r\nprocedure TListeAngebot.btnNeuesAngebotClick(Sender: TObject);\r\nvar\r\n LFrm:TfrmKontaktsuche;\r\n procedure AfterCreate(AForm:TObject);\r\n var\r\n LForm:TfrmKontaktsuche;\r\n begin\r\n LForm:=(AForm as TfrmKontaktsuche);\r\n Container3.HTML.text:='';\r\n end;\r\n\r\n procedure AfterShowmodal(Avalue:TModalResult);\r\n begin\r\n if LFrm.Kontaktnummer<>'' then\r\n begin\r\n NeuesAngebot(Lfrm.Kontaktnummer,'Angebot');\r\n end\r\n else\r\n begin\r\n xdsAngebot.close;\r\n xdsAngebot.Load;\r\n end;\r\n end;\r\n\r\n begin\r\n LFrm:=TfrmKontaktsuche.CreateNew(@AfterCreate);\r\n LFrm.ShowModal(@AfterShowmodal);\r\n\r\nend;\r\n\r\nprocedure TListeAngebot.btnzurueckClick(Sender: TObject);\r\nbegin\r\n xdsAngebot.Close;\r\n self.close;\r\nend;\r\n\r\nprocedure TListeAngebot.edtSuchbegriffChange(Sender: TObject);\r\nvar\r\n tempsuchtext:string;\r\nbegin\r\n tempsuchtext:=edtsuchbegriff.Text;\r\n Container3.HTML.text:='';\r\n if length(tempsuchtext)>0 then\r\n begin\r\n xdsAngebot.Close;\r\n xdsAngebot.querystring:='$expand=Kundennummer&$filter=((Auftragnichterhalten eq 0) AND (Auftragerhaltenam eq null)) AND (contains(Nachname,'+quotedstr(tempsuchtext)+') OR contains(Kundennummer,'+quotedstr(tempsuchtext)+') OR contains(Auftragsbezeichnung,'+quotedstr(tempsuchtext)+'))&$orderby=Nummerkomplett DESC';\r\n\r\n end\r\n else\r\n begin\r\n xdsAngebot.Close;\r\n xdsAngebot.querystring:='$expand=Kundennummer&$filter=((Auftragnichterhalten eq 0) AND (Auftragerhaltenam eq null))&$orderby=Nummerkomplett DESC'\r\n end;\r\n xdsAngebot.Load;\r\n\r\nend;\r\n\r\nprocedure TListeAngebot.WebFormShow(Sender: TObject);\r\nbegin\r\n xdsAngebot.Load;\r\nend;\r\n\r\nprocedure TListeAngebot.xdsAngebotAfterOpen(DataSet: TDataSet);\r\nvar\r\n myelement:TJSHTMLElement;\r\n EinzelKarte:string;\r\nbegin\r\n\r\n Container1.html.text:='

';\r\n\r\n Container2.HTML.Text:='';\r\n myelement:=container2.ElementHandle;\r\n\r\n btnzurueck.ParentElement:=myelement;\r\n btnNeuesAngebot.parentelement:=myelement;\r\n btnNeuerKostenvoranschlag.parentelement:=myelement;\r\n edtSuchbegriff.ParentElement:=myelement;\r\n ResultLabel.ParentElement:=myelement;\r\n xdsAngebot.First;\r\n if xdsAngebot.RecordCount=0 then ResultLabel.HTML:='nichts gefunden';\r\n if xdsAngebot.RecordCount>0 then ResultLabel.HTML:='Angebot(e): '+inttostr(xdsAngebot.RecordCount);\r\n if xdsAngebot.RecordCount>99 then ResultLabel.HTML:='mehr als 100 Angebote mehr anzeigen';\r\n if xdsAngebot.RecordCount>100 then ResultLabel.HTML:='Angebote: '+inttostr(xdsAngebot.RecordCount)+' (max. Anzeige: 500)';\r\n\r\n\r\n while not xdsAngebot.eof do\r\n begin\r\n\r\n Einzelkarte:='
'+xdsAngebotNummerkomplett.asstring+' | '+formatdatetime('DD.MM.YYYY',xdsAngebotDatum.AsDateTime)+'
'+xdsAngebotBelegvariante.AsString+'
';\r\n Einzelkarte:=Einzelkarte+'
'+xdsAngebotKundennummerKundennummer.AsString;\r\n Einzelkarte:=Einzelkarte+' | '+xdsAngebotNachname.asstring+'
';\r\n Einzelkarte:=Einzelkarte+''+xdsAngebotAuftragsbezeichnung.AsString+'
';\r\n if form1.rcw.Verkaufspreise=TRUE then Einzelkarte:=Einzelkarte+Formatfloat('#,##0.00 €',xdsAngebotNettosumme.Asfloat)+'
';\r\n Einzelkarte:=Einzelkarte+xdsAngebotAuftragerhaltenam.AsString+'
';\r\n Einzelkarte:=Einzelkarte+'
';\r\n\r\n\r\n myelement:=Container3.ElementHandle;\r\n EinzelCard:=THTMLDiv.Create(self);\r\n EinzelCard.ElementID:=xdsAngebotNummerkomplett.asstring;\r\n EinzelCard.HeightStyle:=ssauto;\r\n EinzelCard.Width:=350;\r\n EinzelCard.HTML.Text:=Einzelkarte;\r\n EinzelCard.ElementClassName:='card m-1 border-info';\r\n EinzelCard.OnClick:=@EinzelCardClick;\r\n EinzelCard.ParentElement:=myelement;\r\n\r\n xdsAngebot.Next;\r\n end;\r\n edtsuchbegriff.SetFocus;\r\nend;\r\n\r\nprocedure TListeAngebot.LoadDFMValues;\r\nbegin\r\n inherited LoadDFMValues;\r\n\r\n ResultLabel := TLabel.Create(Self);\r\n Container3 := THTMLContainer.Create(Self);\r\n Container2 := THTMLContainer.Create(Self);\r\n btnNeuesAngebot := TButton.Create(Self);\r\n btnNeuerKostenvoranschlag := TButton.Create(Self);\r\n Container1 := THTMLContainer.Create(Self);\r\n edtSuchbegriff := TEdit.Create(Self);\r\n btnzurueck := TButton.Create(Self);\r\n xdsAngebot := TXDataWebDataSet.Create(Self);\r\n xdsAngebotNummerkomplett := TStringField.Create(Self);\r\n xdsAngebotDatum := TDateTimeField.Create(Self);\r\n xdsAngebotKundennummerKundennummer := TStringField.Create(Self);\r\n xdsAngebotNachname := TStringField.Create(Self);\r\n xdsAngebotAuftragsbezeichnung := TStringField.Create(Self);\r\n xdsAngebotBelegvariante := TStringField.Create(Self);\r\n xdsAngebotNettosumme := TFloatField.Create(Self);\r\n xdsAngebotAuftragerhaltenam := TDateTimeField.Create(Self);\r\n xdsAngebotAuftragnichterhalten := TBooleanField.Create(Self);\r\n xdsAngebotAdresseBild := TStringField.Create(Self);\r\n WClient := TXDataWebClient.Create(Self);\r\n\r\n ResultLabel.BeforeLoadDFMValues;\r\n Container3.BeforeLoadDFMValues;\r\n Container2.BeforeLoadDFMValues;\r\n btnNeuesAngebot.BeforeLoadDFMValues;\r\n btnNeuerKostenvoranschlag.BeforeLoadDFMValues;\r\n Container1.BeforeLoadDFMValues;\r\n edtSuchbegriff.BeforeLoadDFMValues;\r\n btnzurueck.BeforeLoadDFMValues;\r\n xdsAngebot.BeforeLoadDFMValues;\r\n xdsAngebotNummerkomplett.BeforeLoadDFMValues;\r\n xdsAngebotDatum.BeforeLoadDFMValues;\r\n xdsAngebotKundennummerKundennummer.BeforeLoadDFMValues;\r\n xdsAngebotNachname.BeforeLoadDFMValues;\r\n xdsAngebotAuftragsbezeichnung.BeforeLoadDFMValues;\r\n xdsAngebotBelegvariante.BeforeLoadDFMValues;\r\n xdsAngebotNettosumme.BeforeLoadDFMValues;\r\n xdsAngebotAuftragerhaltenam.BeforeLoadDFMValues;\r\n xdsAngebotAuftragnichterhalten.BeforeLoadDFMValues;\r\n xdsAngebotAdresseBild.BeforeLoadDFMValues;\r\n WClient.BeforeLoadDFMValues;\r\n try\r\n Name := 'ListeAngebot';\r\n Width := 180;\r\n Height := 319;\r\n CSSLibrary := cssBootstrap;\r\n ElementFont := efCSS;\r\n Font.Charset := DEFAULT_CHARSET;\r\n Font.Color := clWindowText;\r\n Font.Height := -11;\r\n Font.Name := 'Tahoma';\r\n Font.Style := [];\r\n ParentFont := False;\r\n SetEvent(Self, 'OnShow', 'WebFormShow');\r\n ResultLabel.SetParentComponent(Self);\r\n ResultLabel.Name := 'ResultLabel';\r\n ResultLabel.Left := 8;\r\n ResultLabel.Top := 204;\r\n ResultLabel.Width := 55;\r\n ResultLabel.Height := 13;\r\n ResultLabel.Caption := 'ResultLabel';\r\n ResultLabel.ElementClassName := 'h6 m-2';\r\n ResultLabel.ElementFont := efCSS;\r\n ResultLabel.ElementPosition := epIgnore;\r\n ResultLabel.HeightStyle := ssAuto;\r\n ResultLabel.HeightPercent := 100.000000000000000000;\r\n ResultLabel.WidthStyle := ssAuto;\r\n ResultLabel.WidthPercent := 100.000000000000000000;\r\n SetEvent(ResultLabel, Self, 'OnClick', 'ResultLabelClick');\r\n Container3.SetParentComponent(Self);\r\n Container3.Name := 'Container3';\r\n Container3.Left := 0;\r\n Container3.Top := 94;\r\n Container3.Width := 169;\r\n Container3.Height := 41;\r\n Container3.ElementClassName := 'd-flex flex-wrap m-1';\r\n Container3.HeightStyle := ssAuto;\r\n Container3.WidthStyle := ssAuto;\r\n Container3.ChildOrder := 5;\r\n Container3.ElementFont := efCSS;\r\n Container3.ElementPosition := epIgnore;\r\n Container2.SetParentComponent(Self);\r\n Container2.Name := 'Container2';\r\n Container2.Left := 0;\r\n Container2.Top := 47;\r\n Container2.Width := 169;\r\n Container2.Height := 41;\r\n Container2.ElementClassName := 'd-flex flex-wrap m-1';\r\n Container2.HeightStyle := ssAuto;\r\n Container2.WidthStyle := ssAuto;\r\n Container2.ChildOrder := 5;\r\n Container2.ElementFont := efCSS;\r\n Container2.ElementPosition := epIgnore;\r\n btnNeuesAngebot.SetParentComponent(Self);\r\n btnNeuesAngebot.Name := 'btnNeuesAngebot';\r\n btnNeuesAngebot.Left := 8;\r\n btnNeuesAngebot.Top := 8;\r\n btnNeuesAngebot.Width := 96;\r\n btnNeuesAngebot.Height := 25;\r\n btnNeuesAngebot.Caption := '+ Angebot';\r\n btnNeuesAngebot.ChildOrder := 5;\r\n btnNeuesAngebot.ElementClassName := 'btn btn-info m-1 text-left';\r\n btnNeuesAngebot.ElementFont := efCSS;\r\n btnNeuesAngebot.ElementPosition := epIgnore;\r\n btnNeuesAngebot.HeightStyle := ssAuto;\r\n btnNeuesAngebot.HeightPercent := 100.000000000000000000;\r\n btnNeuesAngebot.WidthStyle := ssAuto;\r\n btnNeuesAngebot.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnNeuesAngebot, Self, 'OnClick', 'btnNeuesAngebotClick');\r\n btnNeuerKostenvoranschlag.SetParentComponent(Self);\r\n btnNeuerKostenvoranschlag.Name := 'btnNeuerKostenvoranschlag';\r\n btnNeuerKostenvoranschlag.Left := 62;\r\n btnNeuerKostenvoranschlag.Top := 223;\r\n btnNeuerKostenvoranschlag.Width := 96;\r\n btnNeuerKostenvoranschlag.Height := 25;\r\n btnNeuerKostenvoranschlag.Caption := '+ Kostenvoranschlag';\r\n btnNeuerKostenvoranschlag.ChildOrder := 5;\r\n btnNeuerKostenvoranschlag.ElementClassName := 'btn btn-info m-1 text-left';\r\n btnNeuerKostenvoranschlag.ElementFont := efCSS;\r\n btnNeuerKostenvoranschlag.ElementPosition := epIgnore;\r\n btnNeuerKostenvoranschlag.HeightStyle := ssAuto;\r\n btnNeuerKostenvoranschlag.HeightPercent := 100.000000000000000000;\r\n btnNeuerKostenvoranschlag.WidthStyle := ssAuto;\r\n btnNeuerKostenvoranschlag.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnNeuerKostenvoranschlag, Self, 'OnClick', 'btnNeuerKostenvoranschlagClick');\r\n Container1.SetParentComponent(Self);\r\n Container1.Name := 'Container1';\r\n Container1.Left := 0;\r\n Container1.Top := 0;\r\n Container1.Width := 169;\r\n Container1.Height := 41;\r\n Container1.HeightStyle := ssAuto;\r\n Container1.WidthStyle := ssPercent;\r\n Container1.ElementFont := efCSS;\r\n Container1.ElementPosition := epIgnore;\r\n edtSuchbegriff.SetParentComponent(Self);\r\n edtSuchbegriff.Name := 'edtSuchbegriff';\r\n edtSuchbegriff.Left := 8;\r\n edtSuchbegriff.Top := 296;\r\n edtSuchbegriff.Width := 150;\r\n edtSuchbegriff.Height := 22;\r\n edtSuchbegriff.AutoSelect := False;\r\n edtSuchbegriff.ChildOrder := 6;\r\n edtSuchbegriff.ElementClassName := 'form-control input-sm m-1';\r\n edtSuchbegriff.ElementFont := efCSS;\r\n edtSuchbegriff.ElementPosition := epIgnore;\r\n edtSuchbegriff.HeightStyle := ssAuto;\r\n edtSuchbegriff.HeightPercent := 100.000000000000000000;\r\n edtSuchbegriff.ShowHint := True;\r\n edtSuchbegriff.TextHint := 'Suchbegriff eingeben';\r\n edtSuchbegriff.WidthPercent := 60.000000000000000000;\r\n SetEvent(edtSuchbegriff, Self, 'OnChange', 'edtSuchbegriffChange');\r\n btnzurueck.SetParentComponent(Self);\r\n btnzurueck.Name := 'btnzurueck';\r\n btnzurueck.Left := 67;\r\n btnzurueck.Top := 141;\r\n btnzurueck.Width := 96;\r\n btnzurueck.Height := 25;\r\n btnzurueck.Caption := '<< zur'#252'ck';\r\n btnzurueck.ChildOrder := 4;\r\n btnzurueck.ElementClassName := 'btn btn-info m-1 text-left';\r\n btnzurueck.ElementFont := efCSS;\r\n btnzurueck.ElementPosition := epIgnore;\r\n btnzurueck.HeightStyle := ssAuto;\r\n btnzurueck.HeightPercent := 100.000000000000000000;\r\n btnzurueck.WidthStyle := ssAuto;\r\n btnzurueck.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnzurueck, Self, 'OnClick', 'btnzurueckClick');\r\n xdsAngebot.SetParentComponent(Self);\r\n xdsAngebot.Name := 'xdsAngebot';\r\n xdsAngebot.AfterOpen := xdsAngebotAfterOpen;\r\n xdsAngebot.EntitySetName := 'Angebote';\r\n xdsAngebot.Connection := DM2.XDataWebConnection1;\r\n xdsAngebot.SubpropsDepth := 1;\r\n xdsAngebot.QueryString := '$expand=Kundennummer&$filter=((Auftragnichterhalten eq 0) AND (Auftragerhaltenam eq null))&$orderby=Nummerkomplett DESC';\r\n xdsAngebot.QueryTop := 100;\r\n xdsAngebot.Left := 20;\r\n xdsAngebot.Top := 142;\r\n xdsAngebotNummerkomplett.SetParentComponent(xdsAngebot);\r\n xdsAngebotNummerkomplett.Name := 'xdsAngebotNummerkomplett';\r\n xdsAngebotNummerkomplett.FieldName := 'Nummerkomplett';\r\n xdsAngebotNummerkomplett.Required := True;\r\n xdsAngebotNummerkomplett.Size := 10;\r\n xdsAngebotDatum.SetParentComponent(xdsAngebot);\r\n xdsAngebotDatum.Name := 'xdsAngebotDatum';\r\n xdsAngebotDatum.FieldName := 'Datum';\r\n xdsAngebotDatum.Required := True;\r\n xdsAngebotDatum.DisplayFormat := 'DD.MM.YYYY';\r\n xdsAngebotKundennummerKundennummer.SetParentComponent(xdsAngebot);\r\n xdsAngebotKundennummerKundennummer.Name := 'xdsAngebotKundennummerKundennummer';\r\n xdsAngebotKundennummerKundennummer.FieldName := 'Kundennummer.Kundennummer';\r\n xdsAngebotKundennummerKundennummer.Size := 13;\r\n xdsAngebotNachname.SetParentComponent(xdsAngebot);\r\n xdsAngebotNachname.Name := 'xdsAngebotNachname';\r\n xdsAngebotNachname.FieldName := 'Nachname';\r\n xdsAngebotNachname.Size := 50;\r\n xdsAngebotAuftragsbezeichnung.SetParentComponent(xdsAngebot);\r\n xdsAngebotAuftragsbezeichnung.Name := 'xdsAngebotAuftragsbezeichnung';\r\n xdsAngebotAuftragsbezeichnung.FieldName := 'Auftragsbezeichnung';\r\n xdsAngebotAuftragsbezeichnung.Size := 255;\r\n xdsAngebotBelegvariante.SetParentComponent(xdsAngebot);\r\n xdsAngebotBelegvariante.Name := 'xdsAngebotBelegvariante';\r\n xdsAngebotBelegvariante.FieldName := 'Belegvariante';\r\n xdsAngebotBelegvariante.Size := 25;\r\n xdsAngebotNettosumme.SetParentComponent(xdsAngebot);\r\n xdsAngebotNettosumme.Name := 'xdsAngebotNettosumme';\r\n xdsAngebotNettosumme.FieldName := 'Nettosumme';\r\n xdsAngebotAuftragerhaltenam.SetParentComponent(xdsAngebot);\r\n xdsAngebotAuftragerhaltenam.Name := 'xdsAngebotAuftragerhaltenam';\r\n xdsAngebotAuftragerhaltenam.FieldName := 'Auftragerhaltenam';\r\n xdsAngebotAuftragerhaltenam.DisplayFormat := 'DD.MM.YYYY';\r\n xdsAngebotAuftragnichterhalten.SetParentComponent(xdsAngebot);\r\n xdsAngebotAuftragnichterhalten.Name := 'xdsAngebotAuftragnichterhalten';\r\n xdsAngebotAuftragnichterhalten.FieldName := 'Auftragnichterhalten';\r\n xdsAngebotAdresseBild.SetParentComponent(xdsAngebot);\r\n xdsAngebotAdresseBild.Name := 'xdsAngebotAdresseBild';\r\n xdsAngebotAdresseBild.FieldName := 'AdresseBild';\r\n xdsAngebotAdresseBild.Size := 255;\r\n WClient.SetParentComponent(Self);\r\n WClient.Name := 'WClient';\r\n WClient.Connection := DM2.XDataWebConnection1;\r\n WClient.Left := 112;\r\n WClient.Top := 136;\r\n finally\r\n ResultLabel.AfterLoadDFMValues;\r\n Container3.AfterLoadDFMValues;\r\n Container2.AfterLoadDFMValues;\r\n btnNeuesAngebot.AfterLoadDFMValues;\r\n btnNeuerKostenvoranschlag.AfterLoadDFMValues;\r\n Container1.AfterLoadDFMValues;\r\n edtSuchbegriff.AfterLoadDFMValues;\r\n btnzurueck.AfterLoadDFMValues;\r\n xdsAngebot.AfterLoadDFMValues;\r\n xdsAngebotNummerkomplett.AfterLoadDFMValues;\r\n xdsAngebotDatum.AfterLoadDFMValues;\r\n xdsAngebotKundennummerKundennummer.AfterLoadDFMValues;\r\n xdsAngebotNachname.AfterLoadDFMValues;\r\n xdsAngebotAuftragsbezeichnung.AfterLoadDFMValues;\r\n xdsAngebotBelegvariante.AfterLoadDFMValues;\r\n xdsAngebotNettosumme.AfterLoadDFMValues;\r\n xdsAngebotAuftragerhaltenam.AfterLoadDFMValues;\r\n xdsAngebotAuftragnichterhalten.AfterLoadDFMValues;\r\n xdsAngebotAdresseBild.AfterLoadDFMValues;\r\n WClient.AfterLoadDFMValues;\r\n end;\r\nend;\r\n\r\nend.","unit unit_EinzelEmail;\r\n\r\ninterface\r\n\r\nuses\r\n System.SysUtils, System.Classes, JS, Web, WEBLib.Graphics, WEBLib.Controls,\r\n WEBLib.Forms, WEBLib.Dialogs, Vcl.Controls, WEBLib.Grids, Data.DB, WEBLib.DB,\r\n XData.Web.JsonDataset, XData.Web.Dataset, Vcl.StdCtrls, WEBLib.StdCtrls, strutils,\r\n DB, WEBLib.ExtCtrls;\r\n\r\ntype\r\n TEinzelEmail = class(TForm)\r\n TC: TTableControl;\r\n xdsEmails: TXDataWebDataSet;\r\n xdsEmailsEmailEmpfangenUhrzeit: TDateTimeField;\r\n xdsEmailsID: TIntegerField;\r\n xdsEmailsarchiviert: TStringField;\r\n xdsEmailsEmailFrom: TStringField;\r\n xdsEmailsEmailFromName: TStringField;\r\n xdsEmailsEmailTo: TStringField;\r\n xdsEmailsEmailCC: TStringField;\r\n xdsEmailsEmailBetreff: TStringField;\r\n xdsEmailsEmailPriority: TIntegerField;\r\n xdsEmailsEmailOrganization: TStringField;\r\n xdsEmailsEmailbearbeitet: TDateTimeField;\r\n xdsEmailsEmailbearbeitetvon: TStringField;\r\n xdsEmailsKundennummer: TStringField;\r\n xdsEmailsPosteingang: TBooleanField;\r\n xdsEmailsEmailID: TStringField;\r\n xdsEmailsEmailReceipt: TStringField;\r\n xdsEmailsEmailgelesen: TDateTimeField;\r\n xdsEmailsEmailContentType: TStringField;\r\n xdsEmailsEmailgelesenvon: TStringField;\r\n xdsEmailsEmailReplyTo: TStringField;\r\n xdsEmailsEmailReplyToName: TStringField;\r\n xdsEmailsEmailUIDL: TStringField;\r\n xdsEmailsEmailBCC: TStringField;\r\n xdsEmailsEmailBest: TBooleanField;\r\n xdsEmailsSchreibzeichen: TStringField;\r\n xdsEmailsGesendete: TBooleanField;\r\n xdsEmailsGesendetUhrzeit: TDateTimeField;\r\n xdsEmailsPersNo: TIntegerField;\r\n xdsEmailsPersColor: TIntegerField;\r\n xdsEmailsBearbeitungsnotiz: TStringField;\r\n xdsEmailsNurText: TStringField;\r\n xdsEmailsObjektReferenz: TStringField;\r\n xdsEmailsObjektnummer: TStringField;\r\n xdsEmailsEmailKonto: TStringField;\r\n xdsEmailsFreigabe: TStringField;\r\n sourceEmails: TDataSource;\r\n Container1: THTMLContainer;\r\n Container2: THTMLContainer;\r\n Container3: THTMLContainer;\r\n PanelTop: TPanel;\r\n lblSeite: TLabel;\r\n panelfunctions: TPanel;\r\n btnzurueck: TButton;\r\n btnKontaktZuordnen: TButton;\r\n btnTicketErstellen: TButton;\r\n btnEmailLoeschen: TButton;\r\n MSGLOESCHEN: TMessageDlg;\r\n xdsEmailsEmailBody: TStringField;\r\n xdsEmailsMSG: TStringField;\r\n procedure WebFormShow(Sender: TObject);\r\n procedure xdsEmailsAfterOpen(DataSet: TDataSet);\r\n procedure btnzurueckClick(Sender: TObject);\r\n [async] procedure btnKontaktZuordnenClick(Sender: TObject); async;\r\n procedure xdsEmailsAfterApplyUpdates(Sender: TDataSet;\r\n Info: TResolveResults);\r\n procedure btnTicketErstellenClick(Sender: TObject);\r\n [async] procedure btnEmailLoeschenClick(Sender: TObject); async;\r\n procedure xdsEmailsAfterDelete(DataSet: TDataSet);\r\n procedure xdsEmailsAfterPost(DataSet: TDataSet);\r\n private\r\n { Private-Deklarationen }\r\n public\r\n { Public-Deklarationen }\r\n\r\n EmailID:string;\r\n IsLoeschung:boolean;\r\n protected procedure LoadDFMValues; override; end;\r\n\r\nvar\r\n EinzelEmail: TEinzelEmail;\r\n\r\nimplementation\r\n uses unit1, unit2, unit_Kontaktsuche, unit_TicketNeu;\r\n{$R *.dfm}\r\n\r\nprocedure TEinzelEmail.btnEmailLoeschenClick(Sender: TObject);\r\nvar\r\n mr: TModalResult;\r\nbegin\r\n mr := await(TModalResult, Msgloeschen.ShowDialog('Das Löschen einer Email kann nicht rückgängig gemacht werden. Wollen Sie die Email wirklich löschen?', WEBLib.Dialogs.mtConfirmation,[mbYes, mbNo]));\r\n if mr = mrYes then xdsEmails.Delete;\r\nend;\r\n\r\nprocedure TEinzelEmail.btnKontaktZuordnenClick(Sender: TObject);\r\nvar\r\n LFrm:TfrmKontaktsuche;\r\n mr: TModalResult;\r\n procedure AfterCreate(AForm:TObject);\r\n var\r\n LForm:TfrmKontaktsuche;\r\n begin\r\n LForm:=(AForm as TfrmKontaktsuche);\r\n lform.Kontaktnummer:='';\r\n end;\r\n\r\n procedure AfterShowmodal(Avalue:TModalResult);\r\n begin\r\n if lfrm.Kontaktnummer<>'' then\r\n begin\r\n xdsEmails.edit;\r\n xdsEmailsKundennummer.AsString:=lfrm.Kontaktnummer;\r\n xdsEmails.Post;\r\n end;\r\n end;\r\n\r\n begin\r\n\r\n if xdsEmailsKundennummer.AsString<>'' then\r\n begin\r\n mr := await(TModalResult, Msgloeschen.ShowDialog('Diese Email ist bereits einer Kundenakte zugeordnet, wollen Sie wirklich eine Änderung vornehmen?', WEBLib.Dialogs.mtConfirmation,[mbYes, mbNo]));\r\n if mr = mrYes then\r\n begin\r\n LFrm:=TfrmKontaktsuche.CreateNew(@AfterCreate);\r\n LFrm.ShowModal(@AfterShowmodal);\r\n end;\r\n end\r\n else\r\n begin\r\n LFrm:=TfrmKontaktsuche.CreateNew(@AfterCreate);\r\n LFrm.ShowModal(@AfterShowmodal);\r\n end;\r\nend;\r\n\r\nprocedure TEinzelEmail.btnTicketErstellenClick(Sender: TObject);\r\nvar\r\n LFrm:TTicketNeu;\r\n procedure AfterCreate(AForm:TObject);\r\n var\r\n LForm:TTicketNeu;\r\n begin\r\n TC.Visible:=false;\r\n LForm:=(AForm as TTicketNeu);\r\n lform.TicketNeuFuerKundennummer:=xdsEmailsKundennummer.AsString;\r\n lform.TicketNeuBetreff:=xdsEmailsEmailBetreff.AsString;\r\n lform.TicketNeuText:=xdsEmailsNurText.AsString;\r\n end;\r\n\r\n procedure AfterShowmodal(Avalue:TModalResult);\r\n begin\r\n if lfrm.NewTicketNumber<>'' then\r\n begin\r\n xdsEmails.edit;\r\n xdsEmailsBearbeitungsnotiz.AsString:='Ticket erstellt Nr. '+lfrm.NewTicketNumber;\r\n xdsEmails.Post;\r\n end;\r\n end;\r\n begin\r\n LFrm:=TTicketNeu.CreateNew(@AfterCreate);\r\n LFrm.ShowModal(@AfterShowmodal);\r\nend;\r\n\r\nprocedure TEinzelEmail.btnzurueckClick(Sender: TObject);\r\nbegin\r\n xdsEmails.Close;\r\n self.Close;\r\nend;\r\n\r\nprocedure TEinzelEmail.WebFormShow(Sender: TObject);\r\nbegin\r\n xdsEmails.Close;\r\n xdsEmails.QueryString:='$filter=ID eq '+EmailID;\r\n xdsEmails.Load;\r\nend;\r\n\r\nprocedure TEinzelEmail.xdsEmailsAfterApplyUpdates(Sender: TDataSet;\r\n Info: TResolveResults);\r\n var\r\n i:integer;\r\nbegin\r\n for i := 0 to High(info.Records) do\r\n begin\r\n if info.Records[i].Error<>'' then showmessage(info.Records[i].Error);\r\n end;\r\n if info.Records[0].Error='' then\r\n begin\r\n xdsEmails.Close;\r\n if IsLoeschung then\r\n begin\r\n self.Close;\r\n end\r\n else\r\n begin\r\n xdsEmails.Load;\r\n end;\r\n end;\r\nend;\r\n\r\nprocedure TEinzelEmail.xdsEmailsAfterDelete(DataSet: TDataSet);\r\nbegin\r\n IsLoeschung:=true;\r\n xdsEmails.ApplyUpdates;\r\n close;\r\nend;\r\n\r\nprocedure TEinzelEmail.xdsEmailsAfterOpen(DataSet: TDataSet);\r\nvar\r\n i:integer;\r\n myelement:TJSHTMLElement;\r\nbegin\r\n isloeschung:=false;\r\n TC.Colcount:=2;\r\n tc.cells[0,i]:='ID';\r\n TC.Cells[1,i]:=xdsemailsid.asstring;\r\n\r\n myelement:=container1.ElementHandle;\r\n paneltop.parentelement:=myelement;\r\n panelfunctions.ParentElement:=myelement;\r\n container2.ParentElement:=myelement;\r\n Container3.ParentElement:=myelement;\r\n\r\n myelement:=paneltop.ElementHandle;\r\n lblseite.ParentElement:=myelement;\r\n\r\n myelement:=panelfunctions.ElementHandle;\r\n btnZurueck.ParentElement:=myelement;\r\n btnKontaktZuordnen.ParentElement:=myelement;\r\n btnTicketErstellen.ParentElement:=myelement;\r\n btnEmailloeschen.ParentElement:=myelement;\r\n\r\n Container2.HTML.Text:='';\r\n myelement:=container2.ElementHandle;\r\n tc.ParentElement:=myelement;\r\n\r\n\r\n tc.rowcount:=9;\r\n\r\n inc(i);\r\n tc.cells[0,i]:='von';\r\n tc.cells[1,i]:=xdsemailsEmailFromName.asstring+' ('+xdsemailsEmailFrom.asstring+')';\r\n\r\n inc(i);\r\n tc.cells[0,i]:='an';\r\n tc.cells[1,i]:=xdsemailsEmailKonto.asstring;\r\n\r\n inc(i);\r\n tc.cells[0,i]:='cc';\r\n tc.cells[1,i]:=xdsemailsEmailCC.asstring;\r\n\r\n inc(i);\r\n tc.cells[1,i]:=xdsemailsEmailEmpfangenUhrzeit.asstring;\r\n tc.cells[0,i]:='um';\r\n\r\n inc(i);\r\n tc.cells[1,i]:=''+xdsemailsemailbetreff.asstring+'
'+ replacestr(xdsemailsNurText.asstring,#13+#10,'
');\r\n\r\n inc(i);\r\n tc.cells[1,i]:=xdsEmailsKundennummer.asstring;\r\n tc.cells[0,i]:='KDNR';\r\n\r\n inc(i);\r\n tc.cells[1,i]:=xdsEmailsBearbeitungsnotiz.asstring;\r\n tc.cells[0,i]:='Notiz';\r\n\r\n if xdsEmailsarchiviert.AsString<>'' then btnKontaktZuordnen.Enabled:=false else btnKontaktZuordnen.Enabled:=true;\r\n if xdsEmailsarchiviert.AsString<>'' then btnEmailLoeschen.Enabled:=false else btnEmailLoeschen.Enabled:=true;\r\nend;\r\n\r\nprocedure TEinzelEmail.xdsEmailsAfterPost(DataSet: TDataSet);\r\nbegin\r\n xdsEmails.ApplyUpdates;\r\nend;\r\n\r\nprocedure TEinzelEmail.LoadDFMValues;\r\nbegin\r\n inherited LoadDFMValues;\r\n\r\n TC := TTableControl.Create(Self);\r\n Container1 := THTMLContainer.Create(Self);\r\n Container2 := THTMLContainer.Create(Self);\r\n Container3 := THTMLContainer.Create(Self);\r\n PanelTop := TPanel.Create(Self);\r\n lblSeite := TLabel.Create(Self);\r\n panelfunctions := TPanel.Create(Self);\r\n btnzurueck := TButton.Create(Self);\r\n btnKontaktZuordnen := TButton.Create(Self);\r\n btnTicketErstellen := TButton.Create(Self);\r\n btnEmailLoeschen := TButton.Create(Self);\r\n MSGLOESCHEN := TMessageDlg.Create(Self);\r\n xdsEmails := TXDataWebDataSet.Create(Self);\r\n xdsEmailsEmailEmpfangenUhrzeit := TDateTimeField.Create(Self);\r\n xdsEmailsID := TIntegerField.Create(Self);\r\n xdsEmailsarchiviert := TStringField.Create(Self);\r\n xdsEmailsEmailFrom := TStringField.Create(Self);\r\n xdsEmailsEmailFromName := TStringField.Create(Self);\r\n xdsEmailsEmailTo := TStringField.Create(Self);\r\n xdsEmailsEmailCC := TStringField.Create(Self);\r\n xdsEmailsEmailBetreff := TStringField.Create(Self);\r\n xdsEmailsEmailPriority := TIntegerField.Create(Self);\r\n xdsEmailsEmailOrganization := TStringField.Create(Self);\r\n xdsEmailsEmailbearbeitet := TDateTimeField.Create(Self);\r\n xdsEmailsEmailbearbeitetvon := TStringField.Create(Self);\r\n xdsEmailsKundennummer := TStringField.Create(Self);\r\n xdsEmailsPosteingang := TBooleanField.Create(Self);\r\n xdsEmailsEmailID := TStringField.Create(Self);\r\n xdsEmailsEmailReceipt := TStringField.Create(Self);\r\n xdsEmailsEmailgelesen := TDateTimeField.Create(Self);\r\n xdsEmailsEmailContentType := TStringField.Create(Self);\r\n xdsEmailsEmailgelesenvon := TStringField.Create(Self);\r\n xdsEmailsEmailReplyTo := TStringField.Create(Self);\r\n xdsEmailsEmailReplyToName := TStringField.Create(Self);\r\n xdsEmailsEmailUIDL := TStringField.Create(Self);\r\n xdsEmailsEmailBCC := TStringField.Create(Self);\r\n xdsEmailsEmailBest := TBooleanField.Create(Self);\r\n xdsEmailsSchreibzeichen := TStringField.Create(Self);\r\n xdsEmailsGesendete := TBooleanField.Create(Self);\r\n xdsEmailsGesendetUhrzeit := TDateTimeField.Create(Self);\r\n xdsEmailsPersNo := TIntegerField.Create(Self);\r\n xdsEmailsPersColor := TIntegerField.Create(Self);\r\n xdsEmailsBearbeitungsnotiz := TStringField.Create(Self);\r\n xdsEmailsNurText := TStringField.Create(Self);\r\n xdsEmailsObjektReferenz := TStringField.Create(Self);\r\n xdsEmailsObjektnummer := TStringField.Create(Self);\r\n xdsEmailsEmailKonto := TStringField.Create(Self);\r\n xdsEmailsFreigabe := TStringField.Create(Self);\r\n xdsEmailsEmailBody := TStringField.Create(Self);\r\n xdsEmailsMSG := TStringField.Create(Self);\r\n sourceEmails := TDataSource.Create(Self);\r\n\r\n TC.BeforeLoadDFMValues;\r\n Container1.BeforeLoadDFMValues;\r\n Container2.BeforeLoadDFMValues;\r\n Container3.BeforeLoadDFMValues;\r\n PanelTop.BeforeLoadDFMValues;\r\n lblSeite.BeforeLoadDFMValues;\r\n panelfunctions.BeforeLoadDFMValues;\r\n btnzurueck.BeforeLoadDFMValues;\r\n btnKontaktZuordnen.BeforeLoadDFMValues;\r\n btnTicketErstellen.BeforeLoadDFMValues;\r\n btnEmailLoeschen.BeforeLoadDFMValues;\r\n MSGLOESCHEN.BeforeLoadDFMValues;\r\n xdsEmails.BeforeLoadDFMValues;\r\n xdsEmailsEmailEmpfangenUhrzeit.BeforeLoadDFMValues;\r\n xdsEmailsID.BeforeLoadDFMValues;\r\n xdsEmailsarchiviert.BeforeLoadDFMValues;\r\n xdsEmailsEmailFrom.BeforeLoadDFMValues;\r\n xdsEmailsEmailFromName.BeforeLoadDFMValues;\r\n xdsEmailsEmailTo.BeforeLoadDFMValues;\r\n xdsEmailsEmailCC.BeforeLoadDFMValues;\r\n xdsEmailsEmailBetreff.BeforeLoadDFMValues;\r\n xdsEmailsEmailPriority.BeforeLoadDFMValues;\r\n xdsEmailsEmailOrganization.BeforeLoadDFMValues;\r\n xdsEmailsEmailbearbeitet.BeforeLoadDFMValues;\r\n xdsEmailsEmailbearbeitetvon.BeforeLoadDFMValues;\r\n xdsEmailsKundennummer.BeforeLoadDFMValues;\r\n xdsEmailsPosteingang.BeforeLoadDFMValues;\r\n xdsEmailsEmailID.BeforeLoadDFMValues;\r\n xdsEmailsEmailReceipt.BeforeLoadDFMValues;\r\n xdsEmailsEmailgelesen.BeforeLoadDFMValues;\r\n xdsEmailsEmailContentType.BeforeLoadDFMValues;\r\n xdsEmailsEmailgelesenvon.BeforeLoadDFMValues;\r\n xdsEmailsEmailReplyTo.BeforeLoadDFMValues;\r\n xdsEmailsEmailReplyToName.BeforeLoadDFMValues;\r\n xdsEmailsEmailUIDL.BeforeLoadDFMValues;\r\n xdsEmailsEmailBCC.BeforeLoadDFMValues;\r\n xdsEmailsEmailBest.BeforeLoadDFMValues;\r\n xdsEmailsSchreibzeichen.BeforeLoadDFMValues;\r\n xdsEmailsGesendete.BeforeLoadDFMValues;\r\n xdsEmailsGesendetUhrzeit.BeforeLoadDFMValues;\r\n xdsEmailsPersNo.BeforeLoadDFMValues;\r\n xdsEmailsPersColor.BeforeLoadDFMValues;\r\n xdsEmailsBearbeitungsnotiz.BeforeLoadDFMValues;\r\n xdsEmailsNurText.BeforeLoadDFMValues;\r\n xdsEmailsObjektReferenz.BeforeLoadDFMValues;\r\n xdsEmailsObjektnummer.BeforeLoadDFMValues;\r\n xdsEmailsEmailKonto.BeforeLoadDFMValues;\r\n xdsEmailsFreigabe.BeforeLoadDFMValues;\r\n xdsEmailsEmailBody.BeforeLoadDFMValues;\r\n xdsEmailsMSG.BeforeLoadDFMValues;\r\n sourceEmails.BeforeLoadDFMValues;\r\n try\r\n Name := 'EinzelEmail';\r\n Width := 682;\r\n Height := 585;\r\n CSSLibrary := cssBootstrap;\r\n ElementFont := efCSS;\r\n SetEvent(Self, 'OnShow', 'WebFormShow');\r\n TC.SetParentComponent(Self);\r\n TC.Name := 'TC';\r\n TC.Left := 22;\r\n TC.Top := 312;\r\n TC.Width := 193;\r\n TC.Height := 137;\r\n TC.ElementClassName := 'table table-hover table-bordered table-striped';\r\n TC.WidthStyle := ssAuto;\r\n TC.BorderColor := clSilver;\r\n TC.ChildOrder := 3;\r\n TC.ColHeader := False;\r\n TC.ElementFont := efCSS;\r\n TC.ElementHeaderClassName := 'table-info';\r\n TC.ElementPosition := epIgnore;\r\n TC.ElementTableClassName := 'table table-hover table-bordered table-striped';\r\n TC.WordWrap := True;\r\n TC.ColCount := 1;\r\n TC.RowCount := 5;\r\n Container1.SetParentComponent(Self);\r\n Container1.Name := 'Container1';\r\n Container1.Left := 0;\r\n Container1.Top := 0;\r\n Container1.Width := 169;\r\n Container1.Height := 41;\r\n Container1.ElementClassName := 'container-fluid rounded';\r\n Container1.HeightStyle := ssAuto;\r\n Container1.WidthStyle := ssPercent;\r\n Container1.ChildOrder := 2;\r\n Container1.ElementFont := efCSS;\r\n Container1.ElementPosition := epIgnore;\r\n Container2.SetParentComponent(Self);\r\n Container2.Name := 'Container2';\r\n Container2.Left := 0;\r\n Container2.Top := 47;\r\n Container2.Width := 169;\r\n Container2.Height := 41;\r\n Container2.ElementClassName := 'd-flex flex-wrap m-1';\r\n Container2.HeightStyle := ssAuto;\r\n Container2.WidthStyle := ssAuto;\r\n Container2.ChildOrder := 5;\r\n Container2.ElementFont := efCSS;\r\n Container2.ElementPosition := epIgnore;\r\n Container3.SetParentComponent(Self);\r\n Container3.Name := 'Container3';\r\n Container3.Left := 0;\r\n Container3.Top := 94;\r\n Container3.Width := 169;\r\n Container3.Height := 41;\r\n Container3.ElementClassName := 'd-flex flex-wrap m-1';\r\n Container3.HeightStyle := ssAuto;\r\n Container3.WidthStyle := ssAuto;\r\n Container3.ChildOrder := 5;\r\n Container3.ElementFont := efCSS;\r\n Container3.ElementPosition := epIgnore;\r\n PanelTop.SetParentComponent(Self);\r\n PanelTop.Name := 'PanelTop';\r\n PanelTop.Left := 22;\r\n PanelTop.Top := 141;\r\n PanelTop.Width := 463;\r\n PanelTop.Height := 76;\r\n PanelTop.ElementClassName := 'd-flex flex-wrap bg-info rounded';\r\n PanelTop.HeightStyle := ssAuto;\r\n PanelTop.WidthStyle := ssPercent;\r\n PanelTop.BorderStyle := bsNone;\r\n PanelTop.Caption := 'WebPanel1';\r\n PanelTop.ChildOrder := 2;\r\n PanelTop.Color := 8340248;\r\n PanelTop.ElementFont := efCSS;\r\n PanelTop.ElementPosition := epIgnore;\r\n PanelTop.ShowCaption := False;\r\n PanelTop.TabOrder := 4;\r\n lblSeite.SetParentComponent(PanelTop);\r\n lblSeite.Name := 'lblSeite';\r\n lblSeite.Left := 1;\r\n lblSeite.Top := 1;\r\n lblSeite.Width := 163;\r\n lblSeite.Height := 25;\r\n lblSeite.AutoSize := False;\r\n lblSeite.Caption := 'Email-Anzeige';\r\n lblSeite.ElementClassName := 'h2 text-light m-1';\r\n lblSeite.ElementLabelClassName := 'align-self-start';\r\n lblSeite.ElementFont := efCSS;\r\n lblSeite.ElementPosition := epIgnore;\r\n lblSeite.Font.Charset := DEFAULT_CHARSET;\r\n lblSeite.Font.Color := clWindowText;\r\n lblSeite.Font.Height := -19;\r\n lblSeite.Font.Name := 'Segoe UI';\r\n lblSeite.Font.Style := [];\r\n lblSeite.HeightStyle := ssAuto;\r\n lblSeite.HeightPercent := 100.000000000000000000;\r\n lblSeite.ParentFont := False;\r\n lblSeite.WidthStyle := ssPercent;\r\n lblSeite.WidthPercent := 100.000000000000000000;\r\n panelfunctions.SetParentComponent(Self);\r\n panelfunctions.Name := 'panelfunctions';\r\n panelfunctions.Left := 32;\r\n panelfunctions.Top := 236;\r\n panelfunctions.Width := 433;\r\n panelfunctions.Height := 37;\r\n panelfunctions.ElementClassName := 'd-flex flex-wrap';\r\n panelfunctions.HeightStyle := ssAuto;\r\n panelfunctions.WidthStyle := ssPercent;\r\n panelfunctions.BorderColor := 13892310;\r\n panelfunctions.BorderStyle := bsNone;\r\n panelfunctions.ChildOrder := 1;\r\n panelfunctions.Color := clWhite;\r\n panelfunctions.ElementFont := efCSS;\r\n panelfunctions.ElementPosition := epIgnore;\r\n panelfunctions.ShowCaption := False;\r\n panelfunctions.TabOrder := 5;\r\n btnzurueck.SetParentComponent(panelfunctions);\r\n btnzurueck.Name := 'btnzurueck';\r\n btnzurueck.Left := 8;\r\n btnzurueck.Top := 12;\r\n btnzurueck.Width := 96;\r\n btnzurueck.Height := 25;\r\n btnzurueck.Caption := '<< zur'#252'ck';\r\n btnzurueck.ChildOrder := 4;\r\n btnzurueck.ElementClassName := 'btn btn-sm bg-info m-1';\r\n btnzurueck.ElementFont := efCSS;\r\n btnzurueck.ElementPosition := epIgnore;\r\n btnzurueck.HeightStyle := ssAuto;\r\n btnzurueck.HeightPercent := 100.000000000000000000;\r\n btnzurueck.WidthStyle := ssAuto;\r\n btnzurueck.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnzurueck, Self, 'OnClick', 'btnzurueckClick');\r\n btnKontaktZuordnen.SetParentComponent(panelfunctions);\r\n btnKontaktZuordnen.Name := 'btnKontaktZuordnen';\r\n btnKontaktZuordnen.Left := 110;\r\n btnKontaktZuordnen.Top := 3;\r\n btnKontaktZuordnen.Width := 96;\r\n btnKontaktZuordnen.Height := 25;\r\n btnKontaktZuordnen.Caption := 'zu Kontakt';\r\n btnKontaktZuordnen.ChildOrder := 12;\r\n btnKontaktZuordnen.ElementClassName := 'btn btn-sm bg-info m-1';\r\n btnKontaktZuordnen.ElementFont := efCSS;\r\n btnKontaktZuordnen.ElementPosition := epIgnore;\r\n btnKontaktZuordnen.HeightStyle := ssAuto;\r\n btnKontaktZuordnen.HeightPercent := 100.000000000000000000;\r\n btnKontaktZuordnen.WidthStyle := ssAuto;\r\n btnKontaktZuordnen.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnKontaktZuordnen, Self, 'OnClick', 'btnKontaktZuordnenClick');\r\n btnTicketErstellen.SetParentComponent(panelfunctions);\r\n btnTicketErstellen.Name := 'btnTicketErstellen';\r\n btnTicketErstellen.Left := 212;\r\n btnTicketErstellen.Top := 3;\r\n btnTicketErstellen.Width := 96;\r\n btnTicketErstellen.Height := 25;\r\n btnTicketErstellen.Caption := 'Ticket';\r\n btnTicketErstellen.ChildOrder := 12;\r\n btnTicketErstellen.ElementClassName := 'btn btn-sm bg-info m-1';\r\n btnTicketErstellen.ElementFont := efCSS;\r\n btnTicketErstellen.ElementPosition := epIgnore;\r\n btnTicketErstellen.HeightStyle := ssAuto;\r\n btnTicketErstellen.HeightPercent := 100.000000000000000000;\r\n btnTicketErstellen.WidthStyle := ssAuto;\r\n btnTicketErstellen.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnTicketErstellen, Self, 'OnClick', 'btnTicketErstellenClick');\r\n btnEmailLoeschen.SetParentComponent(panelfunctions);\r\n btnEmailLoeschen.Name := 'btnEmailLoeschen';\r\n btnEmailLoeschen.Left := 314;\r\n btnEmailLoeschen.Top := 3;\r\n btnEmailLoeschen.Width := 96;\r\n btnEmailLoeschen.Height := 25;\r\n btnEmailLoeschen.Caption := 'L'#246'schen';\r\n btnEmailLoeschen.ChildOrder := 12;\r\n btnEmailLoeschen.ElementClassName := 'btn btn-sm bg-info m-1';\r\n btnEmailLoeschen.ElementFont := efCSS;\r\n btnEmailLoeschen.ElementPosition := epIgnore;\r\n btnEmailLoeschen.HeightStyle := ssAuto;\r\n btnEmailLoeschen.HeightPercent := 100.000000000000000000;\r\n btnEmailLoeschen.WidthStyle := ssAuto;\r\n btnEmailLoeschen.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnEmailLoeschen, Self, 'OnClick', 'btnEmailLoeschenClick');\r\n MSGLOESCHEN.SetParentComponent(Self);\r\n MSGLOESCHEN.Name := 'MSGLOESCHEN';\r\n MSGLOESCHEN.Left := 304;\r\n MSGLOESCHEN.Top := 440;\r\n MSGLOESCHEN.Width := 24;\r\n MSGLOESCHEN.Height := 24;\r\n MSGLOESCHEN.HeightStyle := ssAuto;\r\n MSGLOESCHEN.WidthStyle := ssAuto;\r\n MSGLOESCHEN.Buttons := [mbYes,mbNo];\r\n MSGLOESCHEN.DialogType := mtConfirmation;\r\n MSGLOESCHEN.Message := 'Das L'#246'schen einer Datei kann nicht r'#252'ckg'#228'ngig gemacht werden.Wollen Sie die Datei wirklich l'#246'schen?';\r\n MSGLOESCHEN.Opacity := 0.200000000000000000;\r\n MSGLOESCHEN.ElementButtonClassName := 'btn';\r\n MSGLOESCHEN.ElementDialogClassName := 'shadow-lg p-3 mb-5 bg-white rounded';\r\n MSGLOESCHEN.ElementTitleClassName := 'text-body';\r\n MSGLOESCHEN.ElementContentClassName := 'text-body';\r\n xdsEmails.SetParentComponent(Self);\r\n xdsEmails.Name := 'xdsEmails';\r\n xdsEmails.AfterApplyUpdates := xdsEmailsAfterApplyUpdates;\r\n xdsEmails.AfterOpen := xdsEmailsAfterOpen;\r\n xdsEmails.AfterPost := xdsEmailsAfterPost;\r\n xdsEmails.AfterDelete := xdsEmailsAfterDelete;\r\n xdsEmails.EntitySetName := 'EmailEingang';\r\n xdsEmails.Connection := DM2.XDataWebConnection1;\r\n xdsEmails.QueryTop := 1;\r\n xdsEmails.Left := 144;\r\n xdsEmails.Top := 72;\r\n xdsEmailsEmailEmpfangenUhrzeit.SetParentComponent(xdsEmails);\r\n xdsEmailsEmailEmpfangenUhrzeit.Name := 'xdsEmailsEmailEmpfangenUhrzeit';\r\n xdsEmailsEmailEmpfangenUhrzeit.FieldName := 'EmailEmpfangenUhrzeit';\r\n xdsEmailsID.SetParentComponent(xdsEmails);\r\n xdsEmailsID.Name := 'xdsEmailsID';\r\n xdsEmailsID.FieldName := 'ID';\r\n xdsEmailsID.Required := True;\r\n xdsEmailsarchiviert.SetParentComponent(xdsEmails);\r\n xdsEmailsarchiviert.Name := 'xdsEmailsarchiviert';\r\n xdsEmailsarchiviert.FieldName := 'archiviert';\r\n xdsEmailsarchiviert.Size := 250;\r\n xdsEmailsEmailFrom.SetParentComponent(xdsEmails);\r\n xdsEmailsEmailFrom.Name := 'xdsEmailsEmailFrom';\r\n xdsEmailsEmailFrom.FieldName := 'EmailFrom';\r\n xdsEmailsEmailFrom.Size := 250;\r\n xdsEmailsEmailFromName.SetParentComponent(xdsEmails);\r\n xdsEmailsEmailFromName.Name := 'xdsEmailsEmailFromName';\r\n xdsEmailsEmailFromName.FieldName := 'EmailFromName';\r\n xdsEmailsEmailFromName.Size := 250;\r\n xdsEmailsEmailTo.SetParentComponent(xdsEmails);\r\n xdsEmailsEmailTo.Name := 'xdsEmailsEmailTo';\r\n xdsEmailsEmailTo.FieldName := 'EmailTo';\r\n xdsEmailsEmailTo.Size := 250;\r\n xdsEmailsEmailCC.SetParentComponent(xdsEmails);\r\n xdsEmailsEmailCC.Name := 'xdsEmailsEmailCC';\r\n xdsEmailsEmailCC.FieldName := 'EmailCC';\r\n xdsEmailsEmailCC.Size := 250;\r\n xdsEmailsEmailBetreff.SetParentComponent(xdsEmails);\r\n xdsEmailsEmailBetreff.Name := 'xdsEmailsEmailBetreff';\r\n xdsEmailsEmailBetreff.FieldName := 'EmailBetreff';\r\n xdsEmailsEmailBetreff.Size := 250;\r\n xdsEmailsEmailPriority.SetParentComponent(xdsEmails);\r\n xdsEmailsEmailPriority.Name := 'xdsEmailsEmailPriority';\r\n xdsEmailsEmailPriority.FieldName := 'EmailPriority';\r\n xdsEmailsEmailOrganization.SetParentComponent(xdsEmails);\r\n xdsEmailsEmailOrganization.Name := 'xdsEmailsEmailOrganization';\r\n xdsEmailsEmailOrganization.FieldName := 'EmailOrganization';\r\n xdsEmailsEmailOrganization.Size := 100;\r\n xdsEmailsEmailbearbeitet.SetParentComponent(xdsEmails);\r\n xdsEmailsEmailbearbeitet.Name := 'xdsEmailsEmailbearbeitet';\r\n xdsEmailsEmailbearbeitet.FieldName := 'Emailbearbeitet';\r\n xdsEmailsEmailbearbeitetvon.SetParentComponent(xdsEmails);\r\n xdsEmailsEmailbearbeitetvon.Name := 'xdsEmailsEmailbearbeitetvon';\r\n xdsEmailsEmailbearbeitetvon.FieldName := 'Emailbearbeitetvon';\r\n xdsEmailsEmailbearbeitetvon.Size := 50;\r\n xdsEmailsKundennummer.SetParentComponent(xdsEmails);\r\n xdsEmailsKundennummer.Name := 'xdsEmailsKundennummer';\r\n xdsEmailsKundennummer.FieldName := 'Kundennummer';\r\n xdsEmailsKundennummer.Size := 13;\r\n xdsEmailsPosteingang.SetParentComponent(xdsEmails);\r\n xdsEmailsPosteingang.Name := 'xdsEmailsPosteingang';\r\n xdsEmailsPosteingang.FieldName := 'Posteingang';\r\n xdsEmailsEmailID.SetParentComponent(xdsEmails);\r\n xdsEmailsEmailID.Name := 'xdsEmailsEmailID';\r\n xdsEmailsEmailID.FieldName := 'EmailID';\r\n xdsEmailsEmailID.Size := 100;\r\n xdsEmailsEmailReceipt.SetParentComponent(xdsEmails);\r\n xdsEmailsEmailReceipt.Name := 'xdsEmailsEmailReceipt';\r\n xdsEmailsEmailReceipt.FieldName := 'EmailReceipt';\r\n xdsEmailsEmailReceipt.Size := 100;\r\n xdsEmailsEmailgelesen.SetParentComponent(xdsEmails);\r\n xdsEmailsEmailgelesen.Name := 'xdsEmailsEmailgelesen';\r\n xdsEmailsEmailgelesen.FieldName := 'Emailgelesen';\r\n xdsEmailsEmailContentType.SetParentComponent(xdsEmails);\r\n xdsEmailsEmailContentType.Name := 'xdsEmailsEmailContentType';\r\n xdsEmailsEmailContentType.FieldName := 'EmailContentType';\r\n xdsEmailsEmailContentType.Size := 100;\r\n xdsEmailsEmailgelesenvon.SetParentComponent(xdsEmails);\r\n xdsEmailsEmailgelesenvon.Name := 'xdsEmailsEmailgelesenvon';\r\n xdsEmailsEmailgelesenvon.FieldName := 'Emailgelesenvon';\r\n xdsEmailsEmailgelesenvon.Size := 50;\r\n xdsEmailsEmailReplyTo.SetParentComponent(xdsEmails);\r\n xdsEmailsEmailReplyTo.Name := 'xdsEmailsEmailReplyTo';\r\n xdsEmailsEmailReplyTo.FieldName := 'EmailReplyTo';\r\n xdsEmailsEmailReplyTo.Size := 100;\r\n xdsEmailsEmailReplyToName.SetParentComponent(xdsEmails);\r\n xdsEmailsEmailReplyToName.Name := 'xdsEmailsEmailReplyToName';\r\n xdsEmailsEmailReplyToName.FieldName := 'EmailReplyToName';\r\n xdsEmailsEmailReplyToName.Size := 100;\r\n xdsEmailsEmailUIDL.SetParentComponent(xdsEmails);\r\n xdsEmailsEmailUIDL.Name := 'xdsEmailsEmailUIDL';\r\n xdsEmailsEmailUIDL.FieldName := 'EmailUIDL';\r\n xdsEmailsEmailUIDL.Size := 250;\r\n xdsEmailsEmailBCC.SetParentComponent(xdsEmails);\r\n xdsEmailsEmailBCC.Name := 'xdsEmailsEmailBCC';\r\n xdsEmailsEmailBCC.FieldName := 'EmailBCC';\r\n xdsEmailsEmailBCC.Size := 50;\r\n xdsEmailsEmailBest.SetParentComponent(xdsEmails);\r\n xdsEmailsEmailBest.Name := 'xdsEmailsEmailBest';\r\n xdsEmailsEmailBest.FieldName := 'EmailBest';\r\n xdsEmailsSchreibzeichen.SetParentComponent(xdsEmails);\r\n xdsEmailsSchreibzeichen.Name := 'xdsEmailsSchreibzeichen';\r\n xdsEmailsSchreibzeichen.FieldName := 'Schreibzeichen';\r\n xdsEmailsSchreibzeichen.Size := 10;\r\n xdsEmailsGesendete.SetParentComponent(xdsEmails);\r\n xdsEmailsGesendete.Name := 'xdsEmailsGesendete';\r\n xdsEmailsGesendete.FieldName := 'Gesendete';\r\n xdsEmailsGesendetUhrzeit.SetParentComponent(xdsEmails);\r\n xdsEmailsGesendetUhrzeit.Name := 'xdsEmailsGesendetUhrzeit';\r\n xdsEmailsGesendetUhrzeit.FieldName := 'GesendetUhrzeit';\r\n xdsEmailsPersNo.SetParentComponent(xdsEmails);\r\n xdsEmailsPersNo.Name := 'xdsEmailsPersNo';\r\n xdsEmailsPersNo.FieldName := 'PersNo';\r\n xdsEmailsPersColor.SetParentComponent(xdsEmails);\r\n xdsEmailsPersColor.Name := 'xdsEmailsPersColor';\r\n xdsEmailsPersColor.FieldName := 'PersColor';\r\n xdsEmailsBearbeitungsnotiz.SetParentComponent(xdsEmails);\r\n xdsEmailsBearbeitungsnotiz.Name := 'xdsEmailsBearbeitungsnotiz';\r\n xdsEmailsBearbeitungsnotiz.FieldName := 'Bearbeitungsnotiz';\r\n xdsEmailsBearbeitungsnotiz.Size := 255;\r\n xdsEmailsNurText.SetParentComponent(xdsEmails);\r\n xdsEmailsNurText.Name := 'xdsEmailsNurText';\r\n xdsEmailsNurText.FieldName := 'NurText';\r\n xdsEmailsNurText.Size := 255;\r\n xdsEmailsObjektReferenz.SetParentComponent(xdsEmails);\r\n xdsEmailsObjektReferenz.Name := 'xdsEmailsObjektReferenz';\r\n xdsEmailsObjektReferenz.FieldName := 'ObjektReferenz';\r\n xdsEmailsObjektReferenz.Size := 13;\r\n xdsEmailsObjektnummer.SetParentComponent(xdsEmails);\r\n xdsEmailsObjektnummer.Name := 'xdsEmailsObjektnummer';\r\n xdsEmailsObjektnummer.FieldName := 'Objektnummer';\r\n xdsEmailsObjektnummer.Size := 25;\r\n xdsEmailsEmailKonto.SetParentComponent(xdsEmails);\r\n xdsEmailsEmailKonto.Name := 'xdsEmailsEmailKonto';\r\n xdsEmailsEmailKonto.FieldName := 'EmailKonto';\r\n xdsEmailsEmailKonto.Size := 50;\r\n xdsEmailsFreigabe.SetParentComponent(xdsEmails);\r\n xdsEmailsFreigabe.Name := 'xdsEmailsFreigabe';\r\n xdsEmailsFreigabe.FieldName := 'Freigabe';\r\n xdsEmailsFreigabe.Size := 50;\r\n xdsEmailsEmailBody.SetParentComponent(xdsEmails);\r\n xdsEmailsEmailBody.Name := 'xdsEmailsEmailBody';\r\n xdsEmailsEmailBody.FieldName := 'EmailBody';\r\n xdsEmailsEmailBody.Size := 255;\r\n xdsEmailsMSG.SetParentComponent(xdsEmails);\r\n xdsEmailsMSG.Name := 'xdsEmailsMSG';\r\n xdsEmailsMSG.FieldName := 'MSG';\r\n xdsEmailsMSG.Size := 255;\r\n sourceEmails.SetParentComponent(Self);\r\n sourceEmails.Name := 'sourceEmails';\r\n sourceEmails.DataSet := xdsEmails;\r\n sourceEmails.Left := 72;\r\n sourceEmails.Top := 72;\r\n finally\r\n TC.AfterLoadDFMValues;\r\n Container1.AfterLoadDFMValues;\r\n Container2.AfterLoadDFMValues;\r\n Container3.AfterLoadDFMValues;\r\n PanelTop.AfterLoadDFMValues;\r\n lblSeite.AfterLoadDFMValues;\r\n panelfunctions.AfterLoadDFMValues;\r\n btnzurueck.AfterLoadDFMValues;\r\n btnKontaktZuordnen.AfterLoadDFMValues;\r\n btnTicketErstellen.AfterLoadDFMValues;\r\n btnEmailLoeschen.AfterLoadDFMValues;\r\n MSGLOESCHEN.AfterLoadDFMValues;\r\n xdsEmails.AfterLoadDFMValues;\r\n xdsEmailsEmailEmpfangenUhrzeit.AfterLoadDFMValues;\r\n xdsEmailsID.AfterLoadDFMValues;\r\n xdsEmailsarchiviert.AfterLoadDFMValues;\r\n xdsEmailsEmailFrom.AfterLoadDFMValues;\r\n xdsEmailsEmailFromName.AfterLoadDFMValues;\r\n xdsEmailsEmailTo.AfterLoadDFMValues;\r\n xdsEmailsEmailCC.AfterLoadDFMValues;\r\n xdsEmailsEmailBetreff.AfterLoadDFMValues;\r\n xdsEmailsEmailPriority.AfterLoadDFMValues;\r\n xdsEmailsEmailOrganization.AfterLoadDFMValues;\r\n xdsEmailsEmailbearbeitet.AfterLoadDFMValues;\r\n xdsEmailsEmailbearbeitetvon.AfterLoadDFMValues;\r\n xdsEmailsKundennummer.AfterLoadDFMValues;\r\n xdsEmailsPosteingang.AfterLoadDFMValues;\r\n xdsEmailsEmailID.AfterLoadDFMValues;\r\n xdsEmailsEmailReceipt.AfterLoadDFMValues;\r\n xdsEmailsEmailgelesen.AfterLoadDFMValues;\r\n xdsEmailsEmailContentType.AfterLoadDFMValues;\r\n xdsEmailsEmailgelesenvon.AfterLoadDFMValues;\r\n xdsEmailsEmailReplyTo.AfterLoadDFMValues;\r\n xdsEmailsEmailReplyToName.AfterLoadDFMValues;\r\n xdsEmailsEmailUIDL.AfterLoadDFMValues;\r\n xdsEmailsEmailBCC.AfterLoadDFMValues;\r\n xdsEmailsEmailBest.AfterLoadDFMValues;\r\n xdsEmailsSchreibzeichen.AfterLoadDFMValues;\r\n xdsEmailsGesendete.AfterLoadDFMValues;\r\n xdsEmailsGesendetUhrzeit.AfterLoadDFMValues;\r\n xdsEmailsPersNo.AfterLoadDFMValues;\r\n xdsEmailsPersColor.AfterLoadDFMValues;\r\n xdsEmailsBearbeitungsnotiz.AfterLoadDFMValues;\r\n xdsEmailsNurText.AfterLoadDFMValues;\r\n xdsEmailsObjektReferenz.AfterLoadDFMValues;\r\n xdsEmailsObjektnummer.AfterLoadDFMValues;\r\n xdsEmailsEmailKonto.AfterLoadDFMValues;\r\n xdsEmailsFreigabe.AfterLoadDFMValues;\r\n xdsEmailsEmailBody.AfterLoadDFMValues;\r\n xdsEmailsMSG.AfterLoadDFMValues;\r\n sourceEmails.AfterLoadDFMValues;\r\n end;\r\nend;\r\n\r\nend.\r\n","unit unit_EmailEingang;\r\n\r\ninterface\r\n\r\nuses\r\n System.SysUtils, System.Classes, JS, Web, WEBLib.Graphics, WEBLib.Controls,\r\n WEBLib.Forms, WEBLib.Dialogs, Vcl.Controls, Vcl.StdCtrls, WEBLib.StdCtrls,\r\n WEBLib.ExtCtrls, Vcl.Grids, WEBLib.DBCtrls, Data.DB, WEBLib.DB, strutils,\r\n XData.Web.JsonDataset, XData.Web.Dataset, WEBLib.Buttons, WEBLib.Grids,\r\n WEBLib.WebCtrls;\r\n\r\ntype\r\n TEmailEingang = class(TForm)\r\n xdsEmails: TXDataWebDataSet;\r\n xdsEmailsEmailEmpfangenUhrzeit: TDateTimeField;\r\n xdsEmailsID: TIntegerField;\r\n xdsEmailsEmailFrom: TStringField;\r\n xdsEmailsEmailFromName: TStringField;\r\n xdsEmailsEmailBetreff: TStringField;\r\n Container1: THTMLContainer;\r\n Container2: THTMLContainer;\r\n Container3: THTMLContainer;\r\n ResultLabel: TLabel;\r\n xdsEmailsNurText: TStringField;\r\n xdsEmailsKundennummer: TStringField;\r\n PanelTop: TPanel;\r\n lblSeite: TLabel;\r\n panelfunctions: TPanel;\r\n btnzurueck: TButton;\r\n edtSuchbegriff: TSearchEdit;\r\n procedure WebFormShow(Sender: TObject);\r\n procedure xdsEmailsAfterOpen(DataSet: TDataSet);\r\n procedure ResultLabelClick(Sender: TObject);\r\n procedure btnzurueckClick(Sender: TObject);\r\n procedure edtSuchbegriffSearchClick(Sender: TObject);\r\n procedure edtSuchbegriffClearClick(Sender: TObject);\r\n procedure edtSuchbegriffKeyPress(Sender: TObject; var Key: Char);\r\n private\r\n { Private-Deklarationen }\r\n public\r\n { Public-Deklarationen }\r\n EinzelCard:THTMLDiv;\r\n procedure EinzelCardclick(Sender:TObject);\r\n protected procedure LoadDFMValues; override; end;\r\n\r\nvar\r\n EmailEingang: TEmailEingang;\r\n\r\nimplementation\r\n uses unit1, unit2, unit_EinzelEmail;\r\n{$R *.dfm}\r\n\r\nprocedure TEmailEingang.btnzurueckClick(Sender: TObject);\r\nbegin\r\n xdsEmails.Close;\r\n self.close;\r\nend;\r\n\r\nprocedure TEmailEingang.edtSuchbegriffClearClick(Sender: TObject);\r\nbegin\r\n edtsuchbegriff.Text:='';\r\n Container3.HTML.text:='';\r\n xdsEmails.Close;\r\n xdsEmails.QueryString:='$select=ID, EmailEmpfangenUhrzeit, EmailFromName, EmailFrom, EmailBetreff, NurText, Kundennummer, Bearbeitungsnotiz&$filter=archiviert eq null&$orderby=ID DESC';\r\n xdsEmails.Load;\r\nend;\r\n\r\nprocedure TEmailEingang.edtSuchbegriffKeyPress(Sender: TObject; var Key: Char);\r\nbegin\r\n if key=#13 then edtSuchbegriffSearchClick(sender);\r\n\r\nend;\r\n\r\nprocedure TEmailEingang.edtSuchbegriffSearchClick(Sender: TObject);\r\nvar\r\n tempsuchtext:string;\r\nbegin\r\n tempsuchtext:=edtsuchbegriff.Text;\r\n Container3.HTML.text:='';\r\n if length(tempsuchtext)>0 then\r\n begin\r\n xdsEmails.Close;\r\n xdsEmails.QueryString:='$select=ID, EmailEmpfangenUhrzeit, EmailFromName, EmailFrom, EmailBetreff, NurText, Kundennummer, Bearbeitungsnotiz&$filter=contains(Kundennummer,'+quotedstr(tempsuchtext)+') OR contains(EmailFrom,'+quotedstr(tempsuchtext)+') OR contains(EmailFromName,'+quotedstr(tempsuchtext)+') OR contains(EmailBetreff,'+quotedstr(tempsuchtext)+')&$orderby=ID DESC';\r\n end\r\n else\r\n begin\r\n xdsEmails.Close;\r\n xdsEmails.QueryString:='$select=ID, EmailEmpfangenUhrzeit, EmailFromName, EmailFrom, EmailBetreff, NurText, Kundennummer, Bearbeitungsnotiz&$filter=archiviert eq null&$orderby=ID DESC';\r\n end;\r\n xdsEmails.Load;\r\n\r\nend;\r\n\r\nprocedure TEmailEingang.EinzelCardclick(Sender:TObject);\r\nvar\r\n EinzelEmail:TEinzelEmail;\r\n MyMerkerEmail:string;\r\nbegin\r\n myMerkerEmail:=inttostr((sender as THTMLDiv).Tag);\r\n Container3.HTML.text:='';\r\n EinzelEmail := TEinzelEmail.CreateNew(procedure(AForm: TObject)\r\n begin\r\n (AForm as TEinzelEmail).EmailID:=myMerkerEmail;\r\n end\r\n );\r\n\r\n EinzelEmail.ShowModal(procedure(AValue: TModalResult)\r\n begin\r\n xdsEmails.close;\r\n xdsEmails.Load;\r\n end\r\n );\r\nend;\r\n\r\n\r\n\r\nprocedure TEmailEingang.ResultLabelClick(Sender: TObject);\r\nbegin\r\n if Pos('mehr anzeigen',resultlabel.html,0)>1 then\r\n begin\r\n Container3.HTML.text:='';\r\n xdsEmails.close;\r\n xdsEmails.QueryTop:=101;\r\n xdsEmails.Load;\r\n end;\r\nend;\r\n\r\nprocedure TEmailEingang.WebFormShow(Sender: TObject);\r\nbegin\r\n xdsEmails.QueryTop:=25;\r\n xdsEmails.QueryString:='$select=ID, EmailEmpfangenUhrzeit, EmailFromName, EmailFrom, EmailBetreff, NurText, Kundennummer, Bearbeitungsnotiz&$filter=archiviert eq null&$orderby=ID DESC';\r\n xdsEmails.Load;\r\nend;\r\n\r\nprocedure TEmailEingang.xdsEmailsAfterOpen(DataSet: TDataSet);\r\nvar\r\n myelement:TJSHTMLElement;\r\n EinzelKarte:string;\r\nbegin\r\n myelement:=container1.ElementHandle;\r\n paneltop.parentelement:=myelement;\r\n panelfunctions.ParentElement:=myelement;\r\n container2.ParentElement:=myelement;\r\n Container3.ParentElement:=myelement;\r\n\r\n myelement:=paneltop.ElementHandle;\r\n lblseite.ParentElement:=myelement;\r\n\r\n myelement:=panelfunctions.ElementHandle;\r\n btnZurueck.ParentElement:=myelement;\r\n edtSuchbegriff.ParentElement:=myelement;\r\n\r\n Container2.HTML.Text:='';\r\n myelement:=container2.ElementHandle;\r\n ResultLabel.ParentElement:=myelement;\r\n\r\n xdsEmails.first;\r\n if xdsEmails.RecordCount=0 then ResultLabel.HTML:='nichts gefunden';\r\n if xdsEmails.RecordCount>0 then ResultLabel.HTML:='Emails: '+inttostr(xdsEmails.RecordCount);\r\n if xdsEmails.RecordCount>24 then ResultLabel.HTML:='mehr als 25 Emails mehr anzeigen';\r\n if xdsEmails.RecordCount>25 then ResultLabel.HTML:='Emails: '+inttostr(xdsEmails.RecordCount)+' (max. Anzeige: 100)';\r\n while not xdsEmails.eof do\r\n begin\r\n Einzelkarte:='
'+formatdatetime('DD.MM.YYYY hh:mm:ss',xdsEmailsEmailEmpfangenUhrzeit.asdatetime)+'
' +xdsEmailsEmailFromName.asstring+' | '+xdsEmailsEmailFrom.asstring+'
';\r\n Einzelkarte:=Einzelkarte+'Kundennummer: '+xdsEmailsKundennummer.AsString+'
';\r\n Einzelkarte:=Einzelkarte+'
'+xdsEmailsEmailBetreff.AsString+'
';\r\n if length(xdsEmailsNurText.asstring)>255 then\r\n begin\r\n Einzelkarte:=Einzelkarte+ReplaceStr(leftstr(xdsEmailsNurText.asstring,255),#13+#10,'
')+' ...';\r\n end\r\n else\r\n begin\r\n Einzelkarte:=Einzelkarte+ReplaceStr(leftstr(xdsEmailsNurText.asstring,255),#13+#10,'
');\r\n end;\r\n\r\n Einzelkarte:=Einzelkarte+'
';\r\n\r\n myelement:=Container3.ElementHandle;\r\n EinzelCard:=THTMLDiv.Create(self);\r\n EinzelCard.ElementID:=xdsEmailsID.asstring;\r\n EinzelCard.Tag:=xdsEmailsID.asinteger;\r\n EinzelCard.HeightStyle:=ssauto;\r\n EinzelCard.WidthStyle:=ssPercent;\r\n EinzelCard.HTML.Text:=Einzelkarte;\r\n EinzelCard.ElementClassName:='card m-1 border-info';\r\n EinzelCard.OnClick:=@EinzelCardClick;\r\n EinzelCard.ParentElement:=myelement;\r\n\r\n xdsEmails.Next;\r\n end;\r\n\r\n edtsuchbegriff.SetFocus;\r\nend;\r\n\r\nprocedure TEmailEingang.LoadDFMValues;\r\nbegin\r\n inherited LoadDFMValues;\r\n\r\n ResultLabel := TLabel.Create(Self);\r\n Container1 := THTMLContainer.Create(Self);\r\n Container2 := THTMLContainer.Create(Self);\r\n Container3 := THTMLContainer.Create(Self);\r\n PanelTop := TPanel.Create(Self);\r\n lblSeite := TLabel.Create(Self);\r\n panelfunctions := TPanel.Create(Self);\r\n btnzurueck := TButton.Create(Self);\r\n edtSuchbegriff := TSearchEdit.Create(Self);\r\n xdsEmails := TXDataWebDataSet.Create(Self);\r\n xdsEmailsEmailEmpfangenUhrzeit := TDateTimeField.Create(Self);\r\n xdsEmailsID := TIntegerField.Create(Self);\r\n xdsEmailsEmailFrom := TStringField.Create(Self);\r\n xdsEmailsEmailFromName := TStringField.Create(Self);\r\n xdsEmailsEmailBetreff := TStringField.Create(Self);\r\n xdsEmailsNurText := TStringField.Create(Self);\r\n xdsEmailsKundennummer := TStringField.Create(Self);\r\n\r\n ResultLabel.BeforeLoadDFMValues;\r\n Container1.BeforeLoadDFMValues;\r\n Container2.BeforeLoadDFMValues;\r\n Container3.BeforeLoadDFMValues;\r\n PanelTop.BeforeLoadDFMValues;\r\n lblSeite.BeforeLoadDFMValues;\r\n panelfunctions.BeforeLoadDFMValues;\r\n btnzurueck.BeforeLoadDFMValues;\r\n edtSuchbegriff.BeforeLoadDFMValues;\r\n xdsEmails.BeforeLoadDFMValues;\r\n xdsEmailsEmailEmpfangenUhrzeit.BeforeLoadDFMValues;\r\n xdsEmailsID.BeforeLoadDFMValues;\r\n xdsEmailsEmailFrom.BeforeLoadDFMValues;\r\n xdsEmailsEmailFromName.BeforeLoadDFMValues;\r\n xdsEmailsEmailBetreff.BeforeLoadDFMValues;\r\n xdsEmailsNurText.BeforeLoadDFMValues;\r\n xdsEmailsKundennummer.BeforeLoadDFMValues;\r\n try\r\n Name := 'EmailEingang';\r\n Width := 514;\r\n Height := 438;\r\n Caption := 'Suchbegriff eingeben';\r\n CSSLibrary := cssBootstrap;\r\n ElementFont := efCSS;\r\n SetEvent(Self, 'OnShow', 'WebFormShow');\r\n ResultLabel.SetParentComponent(Self);\r\n ResultLabel.Name := 'ResultLabel';\r\n ResultLabel.Left := 134;\r\n ResultLabel.Top := 384;\r\n ResultLabel.Width := 60;\r\n ResultLabel.Height := 15;\r\n ResultLabel.Caption := 'ResultLabel';\r\n ResultLabel.ElementClassName := 'h6 m-2';\r\n ResultLabel.ElementFont := efCSS;\r\n ResultLabel.ElementPosition := epIgnore;\r\n ResultLabel.HeightStyle := ssAuto;\r\n ResultLabel.HeightPercent := 100.000000000000000000;\r\n ResultLabel.WidthStyle := ssAuto;\r\n ResultLabel.WidthPercent := 100.000000000000000000;\r\n SetEvent(ResultLabel, Self, 'OnClick', 'ResultLabelClick');\r\n Container1.SetParentComponent(Self);\r\n Container1.Name := 'Container1';\r\n Container1.Left := 0;\r\n Container1.Top := 0;\r\n Container1.Width := 169;\r\n Container1.Height := 41;\r\n Container1.ElementClassName := 'container-fluid rounded';\r\n Container1.HeightStyle := ssAuto;\r\n Container1.WidthStyle := ssPercent;\r\n Container1.ChildOrder := 2;\r\n Container1.ElementFont := efCSS;\r\n Container1.ElementPosition := epIgnore;\r\n Container2.SetParentComponent(Self);\r\n Container2.Name := 'Container2';\r\n Container2.Left := 0;\r\n Container2.Top := 47;\r\n Container2.Width := 169;\r\n Container2.Height := 41;\r\n Container2.ElementClassName := 'd-flex flex-wrap m-1';\r\n Container2.HeightStyle := ssAuto;\r\n Container2.WidthStyle := ssAuto;\r\n Container2.ChildOrder := 5;\r\n Container2.ElementFont := efCSS;\r\n Container2.ElementPosition := epIgnore;\r\n Container3.SetParentComponent(Self);\r\n Container3.Name := 'Container3';\r\n Container3.Left := 0;\r\n Container3.Top := 94;\r\n Container3.Width := 169;\r\n Container3.Height := 41;\r\n Container3.ElementClassName := 'd-flex flex-wrap m-1';\r\n Container3.HeightStyle := ssAuto;\r\n Container3.WidthStyle := ssAuto;\r\n Container3.ChildOrder := 5;\r\n Container3.ElementFont := efCSS;\r\n Container3.ElementPosition := epIgnore;\r\n PanelTop.SetParentComponent(Self);\r\n PanelTop.Name := 'PanelTop';\r\n PanelTop.Left := 22;\r\n PanelTop.Top := 141;\r\n PanelTop.Width := 463;\r\n PanelTop.Height := 76;\r\n PanelTop.ElementClassName := 'd-flex flex-wrap bg-info rounded';\r\n PanelTop.HeightStyle := ssAuto;\r\n PanelTop.WidthStyle := ssPercent;\r\n PanelTop.BorderStyle := bsNone;\r\n PanelTop.Caption := 'WebPanel1';\r\n PanelTop.ChildOrder := 2;\r\n PanelTop.Color := 8340248;\r\n PanelTop.ElementFont := efCSS;\r\n PanelTop.ElementPosition := epIgnore;\r\n PanelTop.ShowCaption := False;\r\n lblSeite.SetParentComponent(PanelTop);\r\n lblSeite.Name := 'lblSeite';\r\n lblSeite.Left := 1;\r\n lblSeite.Top := 1;\r\n lblSeite.Width := 163;\r\n lblSeite.Height := 25;\r\n lblSeite.AutoSize := False;\r\n lblSeite.Caption := 'Email-Eingang';\r\n lblSeite.ElementClassName := 'h2 text-light m-1';\r\n lblSeite.ElementLabelClassName := 'align-self-start';\r\n lblSeite.ElementFont := efCSS;\r\n lblSeite.ElementPosition := epIgnore;\r\n lblSeite.Font.Charset := DEFAULT_CHARSET;\r\n lblSeite.Font.Color := clWindowText;\r\n lblSeite.Font.Height := -19;\r\n lblSeite.Font.Name := 'Segoe UI';\r\n lblSeite.Font.Style := [];\r\n lblSeite.HeightStyle := ssAuto;\r\n lblSeite.HeightPercent := 100.000000000000000000;\r\n lblSeite.ParentFont := False;\r\n lblSeite.WidthStyle := ssPercent;\r\n lblSeite.WidthPercent := 100.000000000000000000;\r\n panelfunctions.SetParentComponent(Self);\r\n panelfunctions.Name := 'panelfunctions';\r\n panelfunctions.Left := 32;\r\n panelfunctions.Top := 236;\r\n panelfunctions.Width := 257;\r\n panelfunctions.Height := 37;\r\n panelfunctions.ElementClassName := 'd-flex flex-wrap';\r\n panelfunctions.HeightStyle := ssAuto;\r\n panelfunctions.WidthStyle := ssPercent;\r\n panelfunctions.BorderColor := 13892310;\r\n panelfunctions.BorderStyle := bsNone;\r\n panelfunctions.ChildOrder := 1;\r\n panelfunctions.Color := clWhite;\r\n panelfunctions.ElementFont := efCSS;\r\n panelfunctions.ElementPosition := epIgnore;\r\n panelfunctions.ShowCaption := False;\r\n btnzurueck.SetParentComponent(panelfunctions);\r\n btnzurueck.Name := 'btnzurueck';\r\n btnzurueck.Left := 8;\r\n btnzurueck.Top := 12;\r\n btnzurueck.Width := 96;\r\n btnzurueck.Height := 25;\r\n btnzurueck.Caption := '<< zur'#252'ck';\r\n btnzurueck.ChildOrder := 4;\r\n btnzurueck.ElementClassName := 'btn btn-sm bg-info m-1';\r\n btnzurueck.ElementFont := efCSS;\r\n btnzurueck.ElementPosition := epIgnore;\r\n btnzurueck.HeightStyle := ssAuto;\r\n btnzurueck.HeightPercent := 100.000000000000000000;\r\n btnzurueck.WidthStyle := ssAuto;\r\n btnzurueck.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnzurueck, Self, 'OnClick', 'btnzurueckClick');\r\n edtSuchbegriff.SetParentComponent(Self);\r\n edtSuchbegriff.Name := 'edtSuchbegriff';\r\n edtSuchbegriff.Left := 272;\r\n edtSuchbegriff.Top := 304;\r\n edtSuchbegriff.Width := 250;\r\n edtSuchbegriff.Height := 23;\r\n edtSuchbegriff.AutoSelect := False;\r\n edtSuchbegriff.AutoSize := True;\r\n edtSuchbegriff.ChildOrder := 7;\r\n edtSuchbegriff.ElementClassName := 'form-control input-sm m-1';\r\n edtSuchbegriff.ElementFont := efCSS;\r\n edtSuchbegriff.ElementPosition := epIgnore;\r\n edtSuchbegriff.HeightStyle := ssAuto;\r\n edtSuchbegriff.HeightPercent := 100.000000000000000000;\r\n edtSuchbegriff.TextHint := 'Suchbegriff eingeben';\r\n edtSuchbegriff.WidthPercent := 100.000000000000000000;\r\n SetEvent(edtSuchbegriff, Self, 'OnKeyPress', 'edtSuchbegriffKeyPress');\r\n SetEvent(edtSuchbegriff, Self, 'OnClearClick', 'edtSuchbegriffClearClick');\r\n SetEvent(edtSuchbegriff, Self, 'OnSearchClick', 'edtSuchbegriffSearchClick');\r\n xdsEmails.SetParentComponent(Self);\r\n xdsEmails.Name := 'xdsEmails';\r\n xdsEmails.AfterOpen := xdsEmailsAfterOpen;\r\n xdsEmails.EntitySetName := 'EmailEingang';\r\n xdsEmails.Connection := DM2.XDataWebConnection1;\r\n xdsEmails.QueryString := '$select=ID, EmailEmpfangenUhrzeit, EmailFromName, EmailFrom, EmailBetreff, NurText&$filter=archiviert eq null&$orderby=ID DESC';\r\n xdsEmails.Left := 96;\r\n xdsEmails.Top := 328;\r\n xdsEmailsEmailEmpfangenUhrzeit.SetParentComponent(xdsEmails);\r\n xdsEmailsEmailEmpfangenUhrzeit.Name := 'xdsEmailsEmailEmpfangenUhrzeit';\r\n xdsEmailsEmailEmpfangenUhrzeit.FieldName := 'EmailEmpfangenUhrzeit';\r\n xdsEmailsID.SetParentComponent(xdsEmails);\r\n xdsEmailsID.Name := 'xdsEmailsID';\r\n xdsEmailsID.FieldName := 'ID';\r\n xdsEmailsID.Required := True;\r\n xdsEmailsEmailFrom.SetParentComponent(xdsEmails);\r\n xdsEmailsEmailFrom.Name := 'xdsEmailsEmailFrom';\r\n xdsEmailsEmailFrom.FieldName := 'EmailFrom';\r\n xdsEmailsEmailFrom.Size := 250;\r\n xdsEmailsEmailFromName.SetParentComponent(xdsEmails);\r\n xdsEmailsEmailFromName.Name := 'xdsEmailsEmailFromName';\r\n xdsEmailsEmailFromName.FieldName := 'EmailFromName';\r\n xdsEmailsEmailFromName.Size := 250;\r\n xdsEmailsEmailBetreff.SetParentComponent(xdsEmails);\r\n xdsEmailsEmailBetreff.Name := 'xdsEmailsEmailBetreff';\r\n xdsEmailsEmailBetreff.FieldName := 'EmailBetreff';\r\n xdsEmailsEmailBetreff.Size := 250;\r\n xdsEmailsNurText.SetParentComponent(xdsEmails);\r\n xdsEmailsNurText.Name := 'xdsEmailsNurText';\r\n xdsEmailsNurText.FieldName := 'NurText';\r\n xdsEmailsNurText.Size := 255;\r\n xdsEmailsKundennummer.SetParentComponent(xdsEmails);\r\n xdsEmailsKundennummer.Name := 'xdsEmailsKundennummer';\r\n xdsEmailsKundennummer.FieldName := 'Kundennummer';\r\n xdsEmailsKundennummer.Size := 13;\r\n finally\r\n ResultLabel.AfterLoadDFMValues;\r\n Container1.AfterLoadDFMValues;\r\n Container2.AfterLoadDFMValues;\r\n Container3.AfterLoadDFMValues;\r\n PanelTop.AfterLoadDFMValues;\r\n lblSeite.AfterLoadDFMValues;\r\n panelfunctions.AfterLoadDFMValues;\r\n btnzurueck.AfterLoadDFMValues;\r\n edtSuchbegriff.AfterLoadDFMValues;\r\n xdsEmails.AfterLoadDFMValues;\r\n xdsEmailsEmailEmpfangenUhrzeit.AfterLoadDFMValues;\r\n xdsEmailsID.AfterLoadDFMValues;\r\n xdsEmailsEmailFrom.AfterLoadDFMValues;\r\n xdsEmailsEmailFromName.AfterLoadDFMValues;\r\n xdsEmailsEmailBetreff.AfterLoadDFMValues;\r\n xdsEmailsNurText.AfterLoadDFMValues;\r\n xdsEmailsKundennummer.AfterLoadDFMValues;\r\n end;\r\nend;\r\n\r\nend.\r\n","unit unit_LieferscheinUnterschrift;\r\n\r\ninterface\r\n\r\nuses\r\n System.SysUtils, System.Classes, JS, Web, WEBLib.Graphics, WEBLib.Controls,\r\n WEBLib.Forms, WEBLib.Dialogs, Data.DB, XData.Web.JsonDataset,\r\n XData.Web.Dataset, WEBLib.DB, VCL.TMSFNCTypes, VCL.TMSFNCUtils,\r\n VCL.TMSFNCGraphics, VCL.TMSFNCGraphicsTypes, Vcl.StdCtrls, WEBLib.StdCtrls,\r\n VCL.TMSFNCCustomControl, VCL.TMSFNCSignatureCapture, Vcl.Controls,\r\n WEBLib.ExtCtrls, WEBLib.SignatureCapture;\r\n\r\ntype\r\n TLieferscheinUnterschrift = class(TForm)\r\n sourceUnterschriften: TDataSource;\r\n dsUnterschriften: TXDataWebDataSet;\r\n dsUnterschriftenNummerkomplett: TStringField;\r\n dsUnterschriftenDatum: TDateTimeField;\r\n dsUnterschriftenUnterschriftKunde: TBlobField;\r\n dsUnterschriftenUnterschriftKundeText: TStringField;\r\n panelUnterschreiben: TPanel;\r\n WebEdit1: TEdit;\r\n WebLabel1: TLabel;\r\n dsUnterschriftenNachnameKunde: TStringField;\r\n Container1: THTMLContainer;\r\n Container2: THTMLContainer;\r\n btnUSpeichern: TButton;\r\n btnUAbbrechen: TButton;\r\n SigKunde: TSignatureCapture;\r\n procedure btnUAbbrechenClick(Sender: TObject);\r\n procedure btnUSpeichernClick(Sender: TObject);\r\n procedure dsUnterschriftenAfterApplyUpdates(Sender: TDataSet;\r\n Info: TResolveResults);\r\n procedure dsUnterschriftenAfterPost(DataSet: TDataSet);\r\n procedure WebFormShow(Sender: TObject);\r\n private\r\n { Private-Deklarationen }\r\n public\r\n { Public-Deklarationen }\r\n UMerkerLieferschein:string;\r\n protected procedure LoadDFMValues; override; end;\r\n\r\nvar\r\n LieferscheinUnterschrift: TLieferscheinUnterschrift;\r\n\r\nimplementation\r\n uses unit1, unit2;\r\n{$R *.dfm}\r\n\r\n\r\nprocedure TLieferscheinUnterschrift.btnUAbbrechenClick(Sender: TObject);\r\nbegin\r\n self.Close;\r\nend;\r\n\r\nprocedure TLieferscheinUnterschrift.btnUSpeichernClick(Sender: TObject);\r\nbegin\r\n dsunterschriften.Append;\r\n dsUnterschriftenNummerkomplett.AsString:=UMerkerLieferschein;\r\n dsUnterschriftenDatum.AsDateTime:=date+time;\r\n dsUnterschriftenUnterschriftKundeText.AsString:=sigkunde.GetAsBase64Image;\r\n dsUnterschriftenNachnameKunde.AsString:=WebEdit1.Text;\r\n dsUnterschriften.Post;\r\nend;\r\n\r\nprocedure TLieferscheinUnterschrift.dsUnterschriftenAfterApplyUpdates(\r\n Sender: TDataSet; Info: TResolveResults);\r\nbegin\r\n self.Close;\r\nend;\r\n\r\nprocedure TLieferscheinUnterschrift.dsUnterschriftenAfterPost(\r\n DataSet: TDataSet);\r\nbegin\r\n if LizenzOK then\r\n begin\r\n dsUnterschriften.ApplyUpdates;\r\n end\r\n else\r\n begin\r\n showmessage('Für das Speichern von Daten sind Sie noch nicht freigeschaltet, bitte erwerben Sie eine Lizenz');\r\n end;\r\nend;\r\n\r\nprocedure TLieferscheinUnterschrift.WebFormShow(Sender: TObject);\r\nvar\r\n myelement:TJSHTMLElement;\r\nbegin\r\n Container1.html.text:='';\r\n myelement:=container1.ElementHandle;\r\n btnUAbbrechen.ParentElement:=myelement;\r\n btnUSpeichern.ParentElement:=myelement;\r\n\r\n myelement:=container2.elementhandle;\r\n panelUnterschreiben.parentelement:=myelement;\r\n\r\n myelement:=panelUnterschreiben.elementhandle;\r\n sigkunde.ParentElement:=myelement;\r\n weblabel1.ParentElement:=myelement;\r\n webedit1.ParentElement:=myelement;\r\n dsUnterschriften.Close;\r\n dsUnterschriften.QueryString:='$filter=Nummerkomplett eq '+QuotedStr(UMerkerLieferschein);\r\n dsUnterschriften.Load;\r\nend;\r\n\r\nprocedure TLieferscheinUnterschrift.LoadDFMValues;\r\nbegin\r\n inherited LoadDFMValues;\r\n\r\n panelUnterschreiben := TPanel.Create(Self);\r\n WebLabel1 := TLabel.Create(Self);\r\n WebEdit1 := TEdit.Create(Self);\r\n SigKunde := TSignatureCapture.Create(Self);\r\n Container1 := THTMLContainer.Create(Self);\r\n Container2 := THTMLContainer.Create(Self);\r\n btnUSpeichern := TButton.Create(Self);\r\n btnUAbbrechen := TButton.Create(Self);\r\n sourceUnterschriften := TDataSource.Create(Self);\r\n dsUnterschriften := TXDataWebDataSet.Create(Self);\r\n dsUnterschriftenNummerkomplett := TStringField.Create(Self);\r\n dsUnterschriftenDatum := TDateTimeField.Create(Self);\r\n dsUnterschriftenUnterschriftKunde := TBlobField.Create(Self);\r\n dsUnterschriftenUnterschriftKundeText := TStringField.Create(Self);\r\n dsUnterschriftenNachnameKunde := TStringField.Create(Self);\r\n\r\n panelUnterschreiben.BeforeLoadDFMValues;\r\n WebLabel1.BeforeLoadDFMValues;\r\n WebEdit1.BeforeLoadDFMValues;\r\n SigKunde.BeforeLoadDFMValues;\r\n Container1.BeforeLoadDFMValues;\r\n Container2.BeforeLoadDFMValues;\r\n btnUSpeichern.BeforeLoadDFMValues;\r\n btnUAbbrechen.BeforeLoadDFMValues;\r\n sourceUnterschriften.BeforeLoadDFMValues;\r\n dsUnterschriften.BeforeLoadDFMValues;\r\n dsUnterschriftenNummerkomplett.BeforeLoadDFMValues;\r\n dsUnterschriftenDatum.BeforeLoadDFMValues;\r\n dsUnterschriftenUnterschriftKunde.BeforeLoadDFMValues;\r\n dsUnterschriftenUnterschriftKundeText.BeforeLoadDFMValues;\r\n dsUnterschriftenNachnameKunde.BeforeLoadDFMValues;\r\n try\r\n Name := 'LieferscheinUnterschrift';\r\n Width := 403;\r\n Height := 419;\r\n CSSLibrary := cssBootstrap;\r\n ElementFont := efCSS;\r\n Font.Charset := DEFAULT_CHARSET;\r\n Font.Color := clWindowText;\r\n Font.Height := -11;\r\n Font.Name := 'Tahoma';\r\n Font.Style := [];\r\n ParentFont := False;\r\n SetEvent(Self, 'OnShow', 'WebFormShow');\r\n panelUnterschreiben.SetParentComponent(Self);\r\n panelUnterschreiben.Name := 'panelUnterschreiben';\r\n panelUnterschreiben.Left := 0;\r\n panelUnterschreiben.Top := 133;\r\n panelUnterschreiben.Width := 313;\r\n panelUnterschreiben.Height := 270;\r\n panelUnterschreiben.ElementClassName := 'card m-1 border-info bg-info';\r\n panelUnterschreiben.Caption := 'panelUnterschreiben';\r\n panelUnterschreiben.Color := 12557152;\r\n panelUnterschreiben.ElementFont := efCSS;\r\n panelUnterschreiben.ElementPosition := epIgnore;\r\n panelUnterschreiben.ShowCaption := False;\r\n WebLabel1.SetParentComponent(panelUnterschreiben);\r\n WebLabel1.Name := 'WebLabel1';\r\n WebLabel1.Left := 3;\r\n WebLabel1.Top := 195;\r\n WebLabel1.Width := 105;\r\n WebLabel1.Height := 13;\r\n WebLabel1.Caption := 'Name ausgeschrieben';\r\n WebLabel1.ElementClassName := 'text-sm';\r\n WebLabel1.ElementFont := efCSS;\r\n WebLabel1.ElementPosition := epIgnore;\r\n WebLabel1.HeightPercent := 100.000000000000000000;\r\n WebLabel1.WidthStyle := ssPercent;\r\n WebLabel1.WidthPercent := 98.000000000000000000;\r\n WebEdit1.SetParentComponent(panelUnterschreiben);\r\n WebEdit1.Name := 'WebEdit1';\r\n WebEdit1.Left := 3;\r\n WebEdit1.Top := 216;\r\n WebEdit1.Width := 295;\r\n WebEdit1.Height := 21;\r\n WebEdit1.AutoSize := True;\r\n WebEdit1.ChildOrder := 4;\r\n WebEdit1.ElementClassName := 'form-control';\r\n WebEdit1.ElementFont := efCSS;\r\n WebEdit1.ElementPosition := epIgnore;\r\n WebEdit1.HeightStyle := ssAuto;\r\n WebEdit1.HeightPercent := 100.000000000000000000;\r\n WebEdit1.TextHint := 'Name des Kunden';\r\n WebEdit1.WidthStyle := ssPercent;\r\n WebEdit1.WidthPercent := 98.000000000000000000;\r\n SigKunde.SetParentComponent(panelUnterschreiben);\r\n SigKunde.Name := 'SigKunde';\r\n SigKunde.Left := 6;\r\n SigKunde.Top := 11;\r\n SigKunde.Width := 299;\r\n SigKunde.Height := 186;\r\n SigKunde.ElementClassName := 'form-control';\r\n SigKunde.HeightStyle := ssAuto;\r\n SigKunde.WidthStyle := ssPercent;\r\n SigKunde.WidthPercent := 98.000000000000000000;\r\n SigKunde.ChildOrder := 2;\r\n SigKunde.ElementPosition := epIgnore;\r\n SigKunde.TabOrder := 1;\r\n SigKunde.TextPosition.Line.Color := clGray;\r\n SigKunde.Text := 'Unterschrift Kunde';\r\n Container1.SetParentComponent(Self);\r\n Container1.Name := 'Container1';\r\n Container1.Left := 0;\r\n Container1.Top := 8;\r\n Container1.Width := 225;\r\n Container1.Height := 41;\r\n Container1.HeightStyle := ssAuto;\r\n Container1.WidthStyle := ssPercent;\r\n Container1.ElementFont := efCSS;\r\n Container1.ElementPosition := epIgnore;\r\n Container2.SetParentComponent(Self);\r\n Container2.Name := 'Container2';\r\n Container2.Left := 0;\r\n Container2.Top := 55;\r\n Container2.Width := 225;\r\n Container2.Height := 41;\r\n Container2.ElementClassName := 'd-flex flex-wrap m-1';\r\n Container2.HeightStyle := ssAuto;\r\n Container2.WidthStyle := ssAuto;\r\n Container2.ChildOrder := 1;\r\n Container2.ElementFont := efCSS;\r\n Container2.ElementPosition := epIgnore;\r\n btnUSpeichern.SetParentComponent(Self);\r\n btnUSpeichern.Name := 'btnUSpeichern';\r\n btnUSpeichern.Left := 120;\r\n btnUSpeichern.Top := 102;\r\n btnUSpeichern.Width := 105;\r\n btnUSpeichern.Height := 25;\r\n btnUSpeichern.Caption := 'speichern';\r\n btnUSpeichern.ChildOrder := 4;\r\n btnUSpeichern.ElementClassName := 'btn btn-info btn-sm m-1 text-left';\r\n btnUSpeichern.ElementFont := efCSS;\r\n btnUSpeichern.ElementPosition := epIgnore;\r\n btnUSpeichern.HeightStyle := ssAuto;\r\n btnUSpeichern.HeightPercent := 100.000000000000000000;\r\n btnUSpeichern.WidthStyle := ssAuto;\r\n btnUSpeichern.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnUSpeichern, Self, 'OnClick', 'btnUSpeichernClick');\r\n btnUAbbrechen.SetParentComponent(Self);\r\n btnUAbbrechen.Name := 'btnUAbbrechen';\r\n btnUAbbrechen.Left := 0;\r\n btnUAbbrechen.Top := 102;\r\n btnUAbbrechen.Width := 104;\r\n btnUAbbrechen.Height := 25;\r\n btnUAbbrechen.Caption := 'Abbrechen';\r\n btnUAbbrechen.ChildOrder := 3;\r\n btnUAbbrechen.ElementClassName := 'btn btn-info btn-sm m-1 text-left';\r\n btnUAbbrechen.ElementFont := efCSS;\r\n btnUAbbrechen.ElementPosition := epIgnore;\r\n btnUAbbrechen.HeightStyle := ssAuto;\r\n btnUAbbrechen.HeightPercent := 100.000000000000000000;\r\n btnUAbbrechen.WidthStyle := ssAuto;\r\n btnUAbbrechen.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnUAbbrechen, Self, 'OnClick', 'btnUAbbrechenClick');\r\n sourceUnterschriften.SetParentComponent(Self);\r\n sourceUnterschriften.Name := 'sourceUnterschriften';\r\n sourceUnterschriften.DataSet := dsUnterschriften;\r\n sourceUnterschriften.Left := 32;\r\n sourceUnterschriften.Top := 132;\r\n dsUnterschriften.SetParentComponent(Self);\r\n dsUnterschriften.Name := 'dsUnterschriften';\r\n dsUnterschriften.AfterApplyUpdates := dsUnterschriftenAfterApplyUpdates;\r\n dsUnterschriften.AfterPost := dsUnterschriftenAfterPost;\r\n dsUnterschriften.EntitySetName := 'LieferscheinUnterschriften';\r\n dsUnterschriften.Connection := DM2.XDataWebConnection1;\r\n dsUnterschriften.Left := 36;\r\n dsUnterschriften.Top := 56;\r\n dsUnterschriftenNummerkomplett.SetParentComponent(dsUnterschriften);\r\n dsUnterschriftenNummerkomplett.Name := 'dsUnterschriftenNummerkomplett';\r\n dsUnterschriftenNummerkomplett.FieldName := 'Nummerkomplett';\r\n dsUnterschriftenNummerkomplett.Required := True;\r\n dsUnterschriftenNummerkomplett.Size := 10;\r\n dsUnterschriftenDatum.SetParentComponent(dsUnterschriften);\r\n dsUnterschriftenDatum.Name := 'dsUnterschriftenDatum';\r\n dsUnterschriftenDatum.FieldName := 'Datum';\r\n dsUnterschriftenUnterschriftKunde.SetParentComponent(dsUnterschriften);\r\n dsUnterschriftenUnterschriftKunde.Name := 'dsUnterschriftenUnterschriftKunde';\r\n dsUnterschriftenUnterschriftKunde.FieldName := 'UnterschriftKunde';\r\n dsUnterschriftenUnterschriftKundeText.SetParentComponent(dsUnterschriften);\r\n dsUnterschriftenUnterschriftKundeText.Name := 'dsUnterschriftenUnterschriftKundeText';\r\n dsUnterschriftenUnterschriftKundeText.FieldName := 'UnterschriftKundeText';\r\n dsUnterschriftenUnterschriftKundeText.Size := 255;\r\n dsUnterschriftenNachnameKunde.SetParentComponent(dsUnterschriften);\r\n dsUnterschriftenNachnameKunde.Name := 'dsUnterschriftenNachnameKunde';\r\n dsUnterschriftenNachnameKunde.FieldName := 'NachnameKunde';\r\n dsUnterschriftenNachnameKunde.Size := 50;\r\n finally\r\n panelUnterschreiben.AfterLoadDFMValues;\r\n WebLabel1.AfterLoadDFMValues;\r\n WebEdit1.AfterLoadDFMValues;\r\n SigKunde.AfterLoadDFMValues;\r\n Container1.AfterLoadDFMValues;\r\n Container2.AfterLoadDFMValues;\r\n btnUSpeichern.AfterLoadDFMValues;\r\n btnUAbbrechen.AfterLoadDFMValues;\r\n sourceUnterschriften.AfterLoadDFMValues;\r\n dsUnterschriften.AfterLoadDFMValues;\r\n dsUnterschriftenNummerkomplett.AfterLoadDFMValues;\r\n dsUnterschriftenDatum.AfterLoadDFMValues;\r\n dsUnterschriftenUnterschriftKunde.AfterLoadDFMValues;\r\n dsUnterschriftenUnterschriftKundeText.AfterLoadDFMValues;\r\n dsUnterschriftenNachnameKunde.AfterLoadDFMValues;\r\n end;\r\nend;\r\n\r\nend.\r\n","unit unit_EinzelLieferschein;\r\n\r\ninterface\r\n\r\nuses\r\n System.SysUtils, System.Classes, JS, Web, WEBLib.Graphics, WEBLib.Controls,\r\n WEBLib.Forms, WEBLib.Dialogs, XData.Web.Client, WEBLib.Buttons, Data.DB,\r\n XData.Web.JsonDataset, XData.Web.Dataset, Vcl.Controls, Vcl.StdCtrls,\r\n WEBLib.StdCtrls, WEBLib.ExtCtrls, WEBLib.Grids, strutils, WEBLib.DB, DB;\r\n\r\ntype\r\n TEinzelLieferschein = class(TForm)\r\n xdsBeleg: TXDataWebDataSet;\r\n xdsPositionen: TXDataWebDataSet;\r\n WClient: TXDataWebClient;\r\n TC: TTableControl;\r\n PTC: TTableControl;\r\n dsUnterschriften: TXDataWebDataSet;\r\n dsUnterschriftenNummerkomplett: TStringField;\r\n dsUnterschriftenDatum: TDateTimeField;\r\n dsUnterschriftenUnterschriftKunde: TBlobField;\r\n dsUnterschriftenUnterschriftKundeText: TStringField;\r\n sourceUnterschriften: TDataSource;\r\n Container1: THTMLContainer;\r\n Container2: THTMLContainer;\r\n btnzurueck: TButton;\r\n btnUnterschreiben: TButton;\r\n btnPDF: TButton;\r\n Container3: THTMLContainer;\r\n btnPDFSenden: TButton;\r\n procedure WebFormShow(Sender: TObject);\r\n procedure btnPDFClick(Sender: TObject);\r\n procedure xdsBelegAfterOpen(DataSet: TDataSet);\r\n procedure xdsPositionenAfterOpen(DataSet: TDataSet);\r\n procedure btnUnterschreibenClick(Sender: TObject);\r\n procedure dsUnterschriftenAfterOpen(DataSet: TDataSet);\r\n procedure btnzurueckClick(Sender: TObject);\r\n procedure btnPDFSendenClick(Sender: TObject);\r\n private\r\n { Private-Deklarationen }\r\n public\r\n { Public-Deklarationen }\r\n MerkerLieferschein:string;\r\n imgUnterschriftKunde:TImageControl;\r\n protected procedure LoadDFMValues; override; end;\r\n\r\nvar\r\n EinzelLieferschein: TEinzelLieferschein;\r\n\r\nimplementation\r\n uses unit1, unit2, unit_LieferscheinUnterschrift;\r\n{$R *.dfm}\r\n\r\nprocedure TEinzelLieferschein.btnPDFClick(Sender: TObject);\r\n procedure OnResponse(Response:TXDataClientResponse);\r\n var\r\n mydownload:string;\r\n begin\r\n mydownload:=string(TJSObject(response.Result)['value']);\r\n if mydownload='WRONG' then\r\n begin\r\n showmessage('Download kann nicht bereitgestellt werden');\r\n end\r\n else\r\n begin\r\n application.Navigate(downloadconnection+mydownload,ntBlank);\r\n end;\r\n end;\r\nbegin\r\n if LizenzOK then\r\n begin\r\n WClient.RawInvoke('IServerService.WarenempfangPDF',[MerkerLieferschein],@OnResponse);\r\n end\r\n else\r\n begin\r\n showmessage('Für das Abrufen von Dateien sind Sie noch nicht freigeschaltet, bitte erwerben Sie eine Lizenz');\r\n end;\r\n\r\nend;\r\n\r\nprocedure TEinzelLieferschein.btnPDFSendenClick(Sender: TObject);\r\n procedure OnResponse(Response:TXDataClientResponse);\r\n var\r\n mydownload:string;\r\n begin\r\n mydownload:=string(TJSObject(response.Result)['value']);\r\n if mydownload='WRONG' then\r\n begin\r\n showmessage('Postausgang konnte nicht erstellt werden.');\r\n end\r\n else\r\n begin\r\n showmessage('Emailversand wurde vorgemerkt.');\r\n end;\r\n end;\r\nbegin\r\n if LizenzOK then\r\n begin\r\n if xdsBeleg.FieldByName('Email').AsString<>'' then\r\n begin\r\n WClient.RawInvoke('IServerService.WarenempfangPDFSENDEN',[MerkerLieferschein],@OnResponse);\r\n end\r\n else\r\n begin\r\n showmessage('Emailadresse fehlt');\r\n end;\r\n end\r\n else\r\n begin\r\n showmessage('Für diese Funktion sind Sie noch nicht freigeschaltet, bitte erwerben Sie eine Lizenz');\r\n end;\r\n\r\nend;\r\n\r\nprocedure TEinzelLieferschein.btnUnterschreibenClick(Sender: TObject);\r\nvar\r\n LFrm:TLieferscheinUnterschrift;\r\n procedure AfterCreate(AForm:TObject);\r\n var\r\n LForm:TLieferscheinUnterschrift;\r\n begin\r\n LForm:=(AForm as TLieferscheinUnterschrift);\r\n lform.UMerkerLieferschein:=MerkerLieferschein;\r\n ptc.Visible:=false;\r\n tc.Visible:=false;\r\n end;\r\n\r\n procedure AfterShowmodal(Avalue:TModalResult);\r\n begin\r\n dsUnterschriften.Close;\r\n xdsPositionen.Close;\r\n xdsBeleg.Close;\r\n xdsBeleg.QueryString:='$expand=Kundennummer&$filter=Nummerkomplett eq '+QuotedStr(MerkerLieferschein);\r\n xdsBeleg.Load;\r\n end;\r\n\r\n begin\r\n\r\n LFrm:=TLieferscheinUnterschrift.CreateNew(@AfterCreate);\r\n //LFrm.Popup:=true;\r\n LFrm.ShowModal(@AfterShowmodal);\r\n\r\nend;\r\n\r\nprocedure TEinzelLieferschein.btnzurueckClick(Sender: TObject);\r\nbegin\r\n self.Close;\r\nend;\r\n\r\nprocedure TEinzelLieferschein.dsUnterschriftenAfterOpen(DataSet: TDataSet);\r\n var\r\n myelement:TJSHTMLElement;\r\nbegin\r\n if dsunterschriften.RecordCount=1 then\r\n begin\r\n try\r\n TC.Cells[0,8]:='Unterschrift Kunde';\r\n TC.Cells[0,9]:='Unterschrift vom';\r\n\r\n\r\n myelement:=tc.CellElements[1,8];\r\n imgUnterschriftKunde:=TImageControl.Create(self);\r\n imgUnterschriftKunde.height:=100;\r\n imgUnterschriftKunde.Width:=200;\r\n imgunterschriftKunde.url:=dsUnterschriftenUnterschriftKundeText.asstring;\r\n myelement.innerHTML:='';\r\n imgUnterschriftKunde.ParentElement:=myelement;\r\n TC.Cells[1,9]:=formatdatetime('DD.MM.YYYY hh:mm:ss', dsUnterschriftenDatum.Asdatetime);\r\n\r\n btnUnterschreiben.Visible:=false;\r\n except\r\n end;\r\n end;\r\n xdspositionen.Close;\r\n xdsPositionen.QueryString:='$expand=Artikelnummer&$filter=Nummerkomplett eq '+QuotedStr(MerkerLieferschein)+'&$orderby=PosNr';\r\n xdsPositionen.Load;\r\nend;\r\n\r\nprocedure TEinzelLieferschein.WebFormShow(Sender: TObject);\r\nvar\r\n myelement:TJSHTMLElement;\r\nbegin\r\n Container1.html.text:='';\r\n Container2.HTML.Text:='';\r\n myelement:=container2.ElementHandle;\r\n btnzurueck.ParentElement:=myelement;\r\n btnUnterschreiben.ParentElement:=myelement;\r\n btnPDF.ParentElement:=myelement;\r\n btnPDFSenden.ParentElement:=myelement;\r\n myelement:=container3.elementhandle;\r\n TC.ParentElement:=myelement;\r\n PTC.ParentElement:=myelement;\r\n xdsBeleg.QueryString:='$expand=Kundennummer&$filter=Nummerkomplett eq '+QuotedStr(MerkerLieferschein);\r\n xdsBeleg.Load;\r\nend;\r\n\r\nprocedure TEinzelLieferschein.xdsBelegAfterOpen(DataSet: TDataSet);\r\nbegin\r\n TC.Visible:=true;\r\n TC.RowCount:=10;\r\n TC.Cells[0,0]:='Bezeichnung';\r\n TC.Cells[1,0]:='Wert';\r\n TC.Cells[0,1]:='Lieferschein | Datum';\r\n TC.Cells[1,1]:='
'+xdsbeleg.FieldByName('Nummerkomplett').asstring +' | '+formatdatetime('DD.MM.YYYY', xdsbeleg.FieldByName('Datum').asdatetime);\r\n TC.Cells[0,2]:='Kontaktnummer';\r\n TC.Cells[1,2]:='
'+xdsBeleg.FieldByName('Kundennummer.Kundennummer').asstring;\r\n TC.Cells[0,3]:='Anschrift';\r\n TC.Cells[1,3]:='
'+ReplaceStr(xdsbeleg.FieldByName('Adressebild').asstring,#13+#10,'
');\r\n TC.Cells[0,4]:='Email';\r\n TC.Cells[1,4]:='
'+xdsBeleg.FieldByName('Email').asstring;\r\n TC.Cells[0,5]:='Auftragsbezeichnung';\r\n TC.Cells[1,5]:='
'+xdsBeleg.FieldByName('Auftragsbezeichnung').asstring;\r\n TC.Cells[0,6]:='Objektnummer';\r\n TC.Cells[1,6]:='
'+xdsBeleg.FieldByName('Objektnummer').asstring;\r\n TC.Cells[0,7]:='Lieferanschrift';\r\n try\r\n TC.Cells[1,7]:='
'+ReplaceStr(xdsbeleg.FieldByName('Lieferanschriftbild').asstring,#13+#10,'
');\r\n except\r\n end;\r\n //TC.Cells[0,7]:='Nettosumme';\r\n //TC.Cells[1,7]:=formatfloat('#,##0.00',xdsbeleg.fieldbyname('Nettosumme').asfloat);\r\n dsUnterschriften.QueryString:='$filter=Nummerkomplett eq '+QuotedStr(MerkerLieferschein);\r\n dsUnterschriften.Load;\r\n\r\nend;\r\n\r\nprocedure TEinzelLieferschein.xdsPositionenAfterOpen(DataSet: TDataSet);\r\nvar\r\n I: Integer;\r\nbegin\r\n PTC.Visible:=true;\r\n PTC.RowCount:=xdsPositionen.RecordCount+1;\r\n PTC.ColCount:=3;\r\n PTC.Cells[0,0]:='Pos';\r\n PTC.Cells[1,0]:='Artikel';\r\n PTC.Cells[2,0]:='Menge';\r\n //PTC.Cells[6,0]:='Einzel-VKP';\r\n //PTC.Cells[7,0]:='Endpreis';\r\n\r\n xdspositionen.First;\r\n for I := 1 to xdspositionen.RecordCount do\r\n begin\r\n PTC.Cells[0,i]:=xdspositionen.FieldByName('PosNr').AsString+'.'+xdspositionen.FieldByName('PosUNr').AsString;\r\n PTC.Cells[1,i]:=xdspositionen.FieldByName('Artikelnummer.Artikelnummer').AsString+'
'+xdspositionen.FieldByName('Artikelueberschrift').AsString+'
'+xdspositionen.FieldByName('Artikelbeschreibung').AsString;\r\n PTC.Cells[2,i]:='

'+xdspositionen.FieldByName('Menge').AsString;\r\n //if not einkauf then PTC.Cells[6,i]:='

'+formatfloat('#,##0.00',xdsPositionen.fieldbyname('Verkaufspreis').asfloat);\r\n //if not einkauf then PTC.Cells[7,i]:='

'+formatfloat('#,##0.00',xdsPositionen.fieldbyname('Endpreis').asfloat);\r\n xdspositionen.Next;\r\n end;\r\n\r\nend;\r\n\r\nprocedure TEinzelLieferschein.LoadDFMValues;\r\nbegin\r\n inherited LoadDFMValues;\r\n\r\n TC := TTableControl.Create(Self);\r\n PTC := TTableControl.Create(Self);\r\n Container1 := THTMLContainer.Create(Self);\r\n Container2 := THTMLContainer.Create(Self);\r\n btnzurueck := TButton.Create(Self);\r\n btnUnterschreiben := TButton.Create(Self);\r\n btnPDF := TButton.Create(Self);\r\n Container3 := THTMLContainer.Create(Self);\r\n btnPDFSenden := TButton.Create(Self);\r\n xdsBeleg := TXDataWebDataSet.Create(Self);\r\n xdsPositionen := TXDataWebDataSet.Create(Self);\r\n WClient := TXDataWebClient.Create(Self);\r\n dsUnterschriften := TXDataWebDataSet.Create(Self);\r\n dsUnterschriftenNummerkomplett := TStringField.Create(Self);\r\n dsUnterschriftenDatum := TDateTimeField.Create(Self);\r\n dsUnterschriftenUnterschriftKunde := TBlobField.Create(Self);\r\n dsUnterschriftenUnterschriftKundeText := TStringField.Create(Self);\r\n sourceUnterschriften := TDataSource.Create(Self);\r\n\r\n TC.BeforeLoadDFMValues;\r\n PTC.BeforeLoadDFMValues;\r\n Container1.BeforeLoadDFMValues;\r\n Container2.BeforeLoadDFMValues;\r\n btnzurueck.BeforeLoadDFMValues;\r\n btnUnterschreiben.BeforeLoadDFMValues;\r\n btnPDF.BeforeLoadDFMValues;\r\n Container3.BeforeLoadDFMValues;\r\n btnPDFSenden.BeforeLoadDFMValues;\r\n xdsBeleg.BeforeLoadDFMValues;\r\n xdsPositionen.BeforeLoadDFMValues;\r\n WClient.BeforeLoadDFMValues;\r\n dsUnterschriften.BeforeLoadDFMValues;\r\n dsUnterschriftenNummerkomplett.BeforeLoadDFMValues;\r\n dsUnterschriftenDatum.BeforeLoadDFMValues;\r\n dsUnterschriftenUnterschriftKunde.BeforeLoadDFMValues;\r\n dsUnterschriftenUnterschriftKundeText.BeforeLoadDFMValues;\r\n sourceUnterschriften.BeforeLoadDFMValues;\r\n try\r\n Name := 'EinzelLieferschein';\r\n Width := 223;\r\n Height := 429;\r\n CSSLibrary := cssBootstrap;\r\n ElementFont := efCSS;\r\n SetEvent(Self, 'OnShow', 'WebFormShow');\r\n TC.SetParentComponent(Self);\r\n TC.Name := 'TC';\r\n TC.Left := 8;\r\n TC.Top := 177;\r\n TC.Width := 200;\r\n TC.Height := 143;\r\n TC.ElementClassName := 'table table-hover table-bordered table-striped';\r\n TC.HeightStyle := ssAuto;\r\n TC.WidthStyle := ssAuto;\r\n TC.BorderColor := clSilver;\r\n TC.ChildOrder := 2;\r\n TC.ColHeader := False;\r\n TC.ElementHeaderClassName := 'table-info';\r\n TC.ElementPosition := epIgnore;\r\n TC.ElementTableClassName := 'table table-hover table-bordered table-striped';\r\n TC.WordWrap := True;\r\n TC.ColCount := 2;\r\n PTC.SetParentComponent(Self);\r\n PTC.Name := 'PTC';\r\n PTC.Left := 8;\r\n PTC.Top := 344;\r\n PTC.Width := 200;\r\n PTC.Height := 80;\r\n PTC.ElementClassName := 'table table-hover table-bordered table-striped';\r\n PTC.HeightStyle := ssAuto;\r\n PTC.WidthStyle := ssAuto;\r\n PTC.BorderColor := clSilver;\r\n PTC.ChildOrder := 2;\r\n PTC.ColHeader := False;\r\n PTC.ElementHeaderClassName := 'table-info';\r\n PTC.ElementPosition := epIgnore;\r\n PTC.ElementTableClassName := 'table table-hover table-bordered table-striped';\r\n PTC.WordWrap := True;\r\n PTC.ColCount := 2;\r\n Container1.SetParentComponent(Self);\r\n Container1.Name := 'Container1';\r\n Container1.Left := 0;\r\n Container1.Top := 0;\r\n Container1.Width := 223;\r\n Container1.Height := 41;\r\n Container1.HeightStyle := ssAuto;\r\n Container1.WidthStyle := ssPercent;\r\n Container1.Align := alTop;\r\n Container1.ElementFont := efCSS;\r\n Container1.ElementPosition := epIgnore;\r\n Container2.SetParentComponent(Self);\r\n Container2.Name := 'Container2';\r\n Container2.Left := 0;\r\n Container2.Top := 41;\r\n Container2.Width := 223;\r\n Container2.Height := 41;\r\n Container2.ElementClassName := 'd-flex flex-wrap m-1';\r\n Container2.HeightStyle := ssAuto;\r\n Container2.WidthStyle := ssAuto;\r\n Container2.Align := alTop;\r\n Container2.ChildOrder := 1;\r\n Container2.ElementFont := efCSS;\r\n Container2.ElementPosition := epIgnore;\r\n btnzurueck.SetParentComponent(Self);\r\n btnzurueck.Name := 'btnzurueck';\r\n btnzurueck.Left := 0;\r\n btnzurueck.Top := 115;\r\n btnzurueck.Width := 96;\r\n btnzurueck.Height := 25;\r\n btnzurueck.Caption := '<< zur'#252'ck';\r\n btnzurueck.ChildOrder := 4;\r\n btnzurueck.ElementClassName := 'btn btn-info btn-sm m-1 text-left';\r\n btnzurueck.ElementFont := efCSS;\r\n btnzurueck.ElementPosition := epIgnore;\r\n btnzurueck.HeightStyle := ssAuto;\r\n btnzurueck.HeightPercent := 100.000000000000000000;\r\n btnzurueck.WidthStyle := ssAuto;\r\n btnzurueck.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnzurueck, Self, 'OnClick', 'btnzurueckClick');\r\n btnUnterschreiben.SetParentComponent(Self);\r\n btnUnterschreiben.Name := 'btnUnterschreiben';\r\n btnUnterschreiben.Left := 0;\r\n btnUnterschreiben.Top := 146;\r\n btnUnterschreiben.Width := 96;\r\n btnUnterschreiben.Height := 25;\r\n btnUnterschreiben.Caption := 'unterschreiben';\r\n btnUnterschreiben.ChildOrder := 4;\r\n btnUnterschreiben.ElementClassName := 'btn btn-info btn-sm m-1 text-left';\r\n btnUnterschreiben.ElementFont := efCSS;\r\n btnUnterschreiben.ElementPosition := epIgnore;\r\n btnUnterschreiben.HeightStyle := ssAuto;\r\n btnUnterschreiben.HeightPercent := 100.000000000000000000;\r\n btnUnterschreiben.WidthStyle := ssAuto;\r\n btnUnterschreiben.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnUnterschreiben, Self, 'OnClick', 'btnUnterschreibenClick');\r\n btnPDF.SetParentComponent(Self);\r\n btnPDF.Name := 'btnPDF';\r\n btnPDF.Left := 102;\r\n btnPDF.Top := 127;\r\n btnPDF.Width := 96;\r\n btnPDF.Height := 25;\r\n btnPDF.Caption := 'PDF';\r\n btnPDF.ChildOrder := 4;\r\n btnPDF.ElementClassName := 'btn btn-info btn-sm m-1 text-left';\r\n btnPDF.ElementFont := efCSS;\r\n btnPDF.ElementPosition := epIgnore;\r\n btnPDF.HeightStyle := ssAuto;\r\n btnPDF.HeightPercent := 100.000000000000000000;\r\n btnPDF.WidthStyle := ssAuto;\r\n btnPDF.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnPDF, Self, 'OnClick', 'btnPDFClick');\r\n Container3.SetParentComponent(Self);\r\n Container3.Name := 'Container3';\r\n Container3.Left := 0;\r\n Container3.Top := 82;\r\n Container3.Width := 223;\r\n Container3.Height := 41;\r\n Container3.ElementClassName := 'd-flex flex-wrap m-1 border border-info';\r\n Container3.HeightStyle := ssAuto;\r\n Container3.WidthStyle := ssAuto;\r\n Container3.Align := alTop;\r\n Container3.ChildOrder := 2;\r\n Container3.ElementFont := efCSS;\r\n Container3.ElementPosition := epIgnore;\r\n btnPDFSenden.SetParentComponent(Self);\r\n btnPDFSenden.Name := 'btnPDFSenden';\r\n btnPDFSenden.Left := 112;\r\n btnPDFSenden.Top := 326;\r\n btnPDFSenden.Width := 57;\r\n btnPDFSenden.Height := 25;\r\n btnPDFSenden.Caption := '@';\r\n btnPDFSenden.ChildOrder := 4;\r\n btnPDFSenden.ElementClassName := 'btn btn-info btn-sm m-1 text-left';\r\n btnPDFSenden.ElementFont := efCSS;\r\n btnPDFSenden.ElementPosition := epIgnore;\r\n btnPDFSenden.HeightStyle := ssAuto;\r\n btnPDFSenden.HeightPercent := 100.000000000000000000;\r\n btnPDFSenden.WidthStyle := ssAuto;\r\n btnPDFSenden.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnPDFSenden, Self, 'OnClick', 'btnPDFSendenClick');\r\n xdsBeleg.SetParentComponent(Self);\r\n xdsBeleg.Name := 'xdsBeleg';\r\n xdsBeleg.AfterOpen := xdsBelegAfterOpen;\r\n xdsBeleg.EntitySetName := 'Lieferschein';\r\n xdsBeleg.Connection := DM2.XDataWebConnection1;\r\n xdsBeleg.SubpropsDepth := 1;\r\n xdsBeleg.QueryString := '$expand=Kundennummer';\r\n xdsBeleg.Left := 20;\r\n xdsBeleg.Top := 8;\r\n xdsPositionen.SetParentComponent(Self);\r\n xdsPositionen.Name := 'xdsPositionen';\r\n xdsPositionen.AfterOpen := xdsPositionenAfterOpen;\r\n xdsPositionen.EntitySetName := 'PositionenLieferschein';\r\n xdsPositionen.Connection := DM2.XDataWebConnection1;\r\n xdsPositionen.SubpropsDepth := 1;\r\n xdsPositionen.QueryString := '$expand=Artikelnummer';\r\n xdsPositionen.Left := 52;\r\n xdsPositionen.Top := 64;\r\n WClient.SetParentComponent(Self);\r\n WClient.Name := 'WClient';\r\n WClient.Connection := DM2.XDataWebConnection1;\r\n WClient.Left := 88;\r\n WClient.Top := 8;\r\n dsUnterschriften.SetParentComponent(Self);\r\n dsUnterschriften.Name := 'dsUnterschriften';\r\n dsUnterschriften.AfterOpen := dsUnterschriftenAfterOpen;\r\n dsUnterschriften.EntitySetName := 'LieferscheinUnterschriften';\r\n dsUnterschriften.Connection := DM2.XDataWebConnection1;\r\n dsUnterschriften.Left := 124;\r\n dsUnterschriften.Top := 176;\r\n dsUnterschriftenNummerkomplett.SetParentComponent(dsUnterschriften);\r\n dsUnterschriftenNummerkomplett.Name := 'dsUnterschriftenNummerkomplett';\r\n dsUnterschriftenNummerkomplett.FieldName := 'Nummerkomplett';\r\n dsUnterschriftenNummerkomplett.Required := True;\r\n dsUnterschriftenNummerkomplett.Size := 10;\r\n dsUnterschriftenDatum.SetParentComponent(dsUnterschriften);\r\n dsUnterschriftenDatum.Name := 'dsUnterschriftenDatum';\r\n dsUnterschriftenDatum.FieldName := 'Datum';\r\n dsUnterschriftenUnterschriftKunde.SetParentComponent(dsUnterschriften);\r\n dsUnterschriftenUnterschriftKunde.Name := 'dsUnterschriftenUnterschriftKunde';\r\n dsUnterschriftenUnterschriftKunde.FieldName := 'UnterschriftKunde';\r\n dsUnterschriftenUnterschriftKundeText.SetParentComponent(dsUnterschriften);\r\n dsUnterschriftenUnterschriftKundeText.Name := 'dsUnterschriftenUnterschriftKundeText';\r\n dsUnterschriftenUnterschriftKundeText.FieldName := 'UnterschriftKundeText';\r\n dsUnterschriftenUnterschriftKundeText.Size := 255;\r\n sourceUnterschriften.SetParentComponent(Self);\r\n sourceUnterschriften.Name := 'sourceUnterschriften';\r\n sourceUnterschriften.DataSet := dsUnterschriften;\r\n sourceUnterschriften.Left := 24;\r\n sourceUnterschriften.Top := 180;\r\n finally\r\n TC.AfterLoadDFMValues;\r\n PTC.AfterLoadDFMValues;\r\n Container1.AfterLoadDFMValues;\r\n Container2.AfterLoadDFMValues;\r\n btnzurueck.AfterLoadDFMValues;\r\n btnUnterschreiben.AfterLoadDFMValues;\r\n btnPDF.AfterLoadDFMValues;\r\n Container3.AfterLoadDFMValues;\r\n btnPDFSenden.AfterLoadDFMValues;\r\n xdsBeleg.AfterLoadDFMValues;\r\n xdsPositionen.AfterLoadDFMValues;\r\n WClient.AfterLoadDFMValues;\r\n dsUnterschriften.AfterLoadDFMValues;\r\n dsUnterschriftenNummerkomplett.AfterLoadDFMValues;\r\n dsUnterschriftenDatum.AfterLoadDFMValues;\r\n dsUnterschriftenUnterschriftKunde.AfterLoadDFMValues;\r\n dsUnterschriftenUnterschriftKundeText.AfterLoadDFMValues;\r\n sourceUnterschriften.AfterLoadDFMValues;\r\n end;\r\nend;\r\n\r\nend.","unit unit_ListeLieferschein;\r\n\r\ninterface\r\n\r\nuses\r\n System.SysUtils, System.Classes, JS, Web, WEBLib.Graphics, WEBLib.Controls,\r\n WEBLib.Forms, WEBLib.Dialogs, WEBLib.Grids, WEBLib.DBCtrls, WEBLib.Buttons,\r\n Vcl.Controls, Vcl.StdCtrls, WEBLib.StdCtrls, WEBLib.ExtCtrls, Data.DB,\r\n WEBLib.DB, XData.Web.JsonDataset, XData.Web.Dataset, WEBLib.WebCtrls;\r\n\r\ntype\r\n TListeLieferschein = class(TForm)\r\n xdsLieferschein: TXDataWebDataSet;\r\n xdsLieferscheinNummerkomplett: TStringField;\r\n xdsLieferscheinReferenzAngebot: TStringField;\r\n xdsLieferscheinReferenzAuftragbest: TStringField;\r\n xdsLieferscheinReferenzRechnung: TStringField;\r\n xdsLieferscheinDatum: TDateTimeField;\r\n xdsLieferscheinJahr: TFloatField;\r\n xdsLieferscheinKalenderwoche: TIntegerField;\r\n xdsLieferscheinNachname: TStringField;\r\n xdsLieferscheinVorname: TStringField;\r\n xdsLieferscheinPostleitzahl: TStringField;\r\n xdsLieferscheinOrt: TStringField;\r\n xdsLieferscheinLaenderkuerzel: TStringField;\r\n xdsLieferscheinLand: TStringField;\r\n xdsLieferscheinBriefanrede1: TStringField;\r\n xdsLieferscheinBriefanrede2: TStringField;\r\n xdsLieferscheinEMail: TStringField;\r\n xdsLieferscheinAdresseBild: TStringField;\r\n xdsLieferscheinLieferanschriftBild: TStringField;\r\n xdsLieferscheinZahlungsbedingung: TIntegerField;\r\n xdsLieferscheinZahlungsbedingungText: TStringField;\r\n xdsLieferscheinAuftragsbezeichnung: TStringField;\r\n xdsLieferscheinAuftragnummerKunde: TStringField;\r\n xdsLieferscheinBestelldatumKunde: TDateTimeField;\r\n xdsLieferscheinILN: TStringField;\r\n xdsLieferscheinKopftext: TStringField;\r\n xdsLieferscheinSchlussbemerkung: TStringField;\r\n xdsLieferscheinGruss: TStringField;\r\n xdsLieferscheinMehrwertsteuersatz1: TFloatField;\r\n xdsLieferscheinMehrwertsteuersatz2: TFloatField;\r\n xdsLieferscheinNettosumme01: TFloatField;\r\n xdsLieferscheinNettosumme02: TFloatField;\r\n xdsLieferscheinNettosumme: TFloatField;\r\n xdsLieferscheinMehrwertsteuer01: TFloatField;\r\n xdsLieferscheinMehrwertsteuer02: TFloatField;\r\n xdsLieferscheinMehrwertsteuer: TFloatField;\r\n xdsLieferscheinBruttosumme: TFloatField;\r\n xdsLieferscheinVersanddatum: TDateTimeField;\r\n xdsLieferscheinSkontosatz: TFloatField;\r\n xdsLieferscheinNettosummeEK: TFloatField;\r\n xdsLieferscheinNettoMarge: TFloatField;\r\n xdsLieferscheinSchreibzeichen: TStringField;\r\n xdsLieferscheinUnterzeichner: TStringField;\r\n xdsLieferscheinTelefonMA: TStringField;\r\n xdsLieferscheinEmailMA: TStringField;\r\n xdsLieferscheinUSTID: TStringField;\r\n xdsLieferscheinUmsatzsteuerausweis: TBooleanField;\r\n xdsLieferscheingebucht: TBooleanField;\r\n xdsLieferscheinLieferdatum: TDateTimeField;\r\n xdsLieferscheinTransportbedingung: TStringField;\r\n xdsLieferscheinMehrwertsteuersatz3: TFloatField;\r\n xdsLieferscheinMehrwertsteuer03: TFloatField;\r\n xdsLieferscheinNettosumme03: TFloatField;\r\n xdsLieferscheinRundungsDifferenz: TFloatField;\r\n xdsLieferscheinEmailText: TStringField;\r\n xdsLieferscheinRabattstufe: TStringField;\r\n xdsLieferscheinDebitorennummer: TStringField;\r\n xdsLieferscheinKostentraeger: TStringField;\r\n xdsLieferscheinRabattsatz: TFloatField;\r\n xdsLieferscheinObjektReferenz: TStringField;\r\n xdsLieferscheinBank: TStringField;\r\n xdsLieferscheinBankleitzahl: TFloatField;\r\n xdsLieferscheinKontonummer: TStringField;\r\n xdsLieferscheinKontoinhaber: TStringField;\r\n xdsLieferscheinTelefaxnummer: TStringField;\r\n xdsLieferscheinDatumNeu: TDateTimeField;\r\n xdsLieferscheinDatumgeaendert: TDateTimeField;\r\n xdsLieferscheinObjektnummer: TStringField;\r\n xdsLieferscheinLiefertermin: TStringField;\r\n xdsLieferscheinEmailversand: TBooleanField;\r\n xdsLieferscheinTelefonnummer: TStringField;\r\n xdsLieferscheinMobilTelefon: TStringField;\r\n xdsLieferscheinBenutzerNeu: TStringField;\r\n xdsLieferscheinBenutzerGeaendert: TStringField;\r\n xdsLieferscheinBerechnungBrutto: TBooleanField;\r\n xdsLieferscheinBruttosumme01: TFloatField;\r\n xdsLieferscheinBruttosumme02: TFloatField;\r\n xdsLieferscheinBruttosumme03: TFloatField;\r\n xdsLieferscheinNotiz: TStringField;\r\n xdsLieferscheinMargeProzent: TFloatField;\r\n xdsLieferscheinBelegsprache: TStringField;\r\n xdsLieferscheinDuplicate: TStringField;\r\n xdsLieferscheinAnsprechpartner: TStringField;\r\n xdsLieferscheinKundennummerFremd: TStringField;\r\n xdsLieferscheinProtokoll: TStringField;\r\n xdsLieferscheinVollstaendigFakturiert: TBooleanField;\r\n xdsLieferscheinVerleihauftrag: TBooleanField;\r\n xdsLieferscheinVerleihVon: TDateTimeField;\r\n xdsLieferscheinVerleihBis: TDateTimeField;\r\n xdsLieferscheinRueckgabeschein: TBooleanField;\r\n xdsLieferscheinRueckgabeReferenz: TStringField;\r\n xdsLieferscheingesperrt: TBooleanField;\r\n xdsLieferscheinVerleihvonText: TStringField;\r\n xdsLieferscheinVerleihbisText: TStringField;\r\n xdsLieferscheinNotizExtern: TStringField;\r\n xdsLieferscheinDruckWHG: TStringField;\r\n xdsLieferscheinDruckWHGKurs: TFloatField;\r\n xdsLieferscheinProzentsatzZusatzposition: TFloatField;\r\n xdsLieferscheinTextZusatzposition: TStringField;\r\n xdsLieferscheinTextzusatzBeschreibung: TStringField;\r\n xdsLieferscheinExport: TBooleanField;\r\n xdsLieferscheinExportbescheinigung: TBooleanField;\r\n xdsLieferscheinBestimmungsland: TStringField;\r\n xdsLieferscheinLayoutname: TStringField;\r\n xdsLieferscheinGesamtgewicht: TFloatField;\r\n xdsLieferscheinBetragZusatzposition: TFloatField;\r\n xdsLieferscheinPaketdienst: TStringField;\r\n xdsLieferscheinPaketnummer: TStringField;\r\n xdsLieferscheinMehrwertsteuersatz4: TFloatField;\r\n xdsLieferscheinMehrwertsteuersatz5: TFloatField;\r\n xdsLieferscheinMehrwertsteuersatz6: TFloatField;\r\n xdsLieferscheinBesteuerungKey: TIntegerField;\r\n xdsLieferscheinVertreterMatchcode: TStringField;\r\n xdsLieferscheinVerfasser: TStringField;\r\n xdsLieferscheinLieferadresseID: TIntegerField;\r\n xdsLieferscheinBelegvariante: TStringField;\r\n xdsLieferscheinBereitstellungDatum: TDateTimeField;\r\n xdsLieferscheinBereitstellungErledigt: TBooleanField;\r\n xdsLieferscheinFahrzeugID: TIntegerField;\r\n xdsLieferscheinMonatJahr: TDateTimeField;\r\n xdsLieferscheinLieferanschriftDaten: TStringField;\r\n xdsLieferscheinGesamtVolumen: TFloatField;\r\n xdsLieferscheinBelegPKey: TIntegerField;\r\n xdsLieferscheinDruckParameter: TStringField;\r\n xdsLieferscheinFakturierungNichtVor: TDateTimeField;\r\n xdsLieferscheinQuittungSIG: TBlobField;\r\n xdsLieferscheinKundennummerKundennummer: TStringField;\r\n Container1: THTMLContainer;\r\n Container2: THTMLContainer;\r\n Container3: THTMLContainer;\r\n ResultLabel: TLabel;\r\n procedure WebFormShow(Sender: TObject);\r\n procedure xdsLieferscheinAfterOpen(DataSet: TDataSet);\r\n procedure ResultLabelClick(Sender: TObject);\r\n private\r\n { Private-Deklarationen }\r\n public\r\n { Public-Deklarationen }\r\n\r\n buttonzurueck:TButton;\r\n EinzelCard:THTMLDiv;\r\n procedure buttonzurueckclick(Sender:TObject);\r\n procedure EinzelCardclick(Sender:TObject);\r\n protected procedure LoadDFMValues; override; end;\r\n\r\nvar\r\n ListeLieferschein: TListeLieferschein;\r\n\r\nimplementation\r\n uses unit1, unit2, unit_EinzelLieferschein;\r\n{$R *.dfm}\r\n\r\nprocedure TListeLieferschein.buttonzurueckclick(Sender:TObject);\r\nbegin\r\n xdsLieferschein.Close;\r\n self.close;\r\nend;\r\n\r\nprocedure TListeLieferschein.EinzelCardclick(Sender:TObject);\r\nvar\r\n EinzelLieferschein:TEinzelLieferschein;\r\n MyMerkerLieferschein:string;\r\nbegin\r\n myMerkerLieferschein:=(sender as THTMLDiv).ElementID;\r\n Container3.HTML.text:='';\r\n EinzelLieferschein := TEinzelLieferschein.CreateNew(procedure(AForm: TObject)\r\n begin\r\n (AForm as TEinzelLieferschein).MerkerLieferschein:=myMerkerLieferschein;\r\n end\r\n );\r\n\r\n EinzelLieferschein.ShowModal(procedure(AValue: TModalResult)\r\n begin\r\n xdsLieferschein.close;\r\n xdsLieferschein.Load;\r\n end\r\n );\r\nend;\r\n\r\n\r\n\r\nprocedure TListeLieferschein.ResultLabelClick(Sender: TObject);\r\nbegin\r\n if Pos('mehr anzeigen',resultlabel.html,0)>1 then\r\n begin\r\n xdsLieferschein.close;\r\n xdsLieferschein.QueryTop:=501;\r\n xdsLieferschein.Load;\r\n end;\r\nend;\r\n\r\nprocedure TListeLieferschein.WebFormShow(Sender: TObject);\r\nbegin\r\n xdsLieferschein.Load;\r\nend;\r\n\r\nprocedure TListeLieferschein.xdsLieferscheinAfterOpen(DataSet: TDataSet);\r\nvar\r\n myelement:TJSHTMLElement;\r\n EinzelKarte:string;\r\nbegin\r\n\r\n Container1.html.text:='

';\r\n\r\n Container2.HTML.Text:='';\r\n myelement:=container2.ElementHandle;\r\n buttonzurueck:=TButton.Create(self);\r\n buttonzurueck.ElementClassName:='btn btn-info m-1 text-left';\r\n buttonzurueck.HeightStyle:=ssauto;\r\n buttonzurueck.WidthStyle:=ssauto;\r\n buttonzurueck.tag:=0;\r\n buttonzurueck.Caption:='<< zurück';\r\n buttonzurueck.OnClick:=@buttonzurueckClick;\r\n buttonzurueck.ParentElement:=myelement;\r\n ResultLabel.ParentElement:=myelement;\r\n xdsLieferschein.First;\r\n if xdsLieferschein.RecordCount=0 then ResultLabel.HTML:='nichts gefunden';\r\n if xdsLieferschein.RecordCount>0 then ResultLabel.HTML:='Lieferschein(e): '+inttostr(xdsLieferschein.RecordCount);\r\n if xdsLieferschein.RecordCount>99 then ResultLabel.HTML:='mehr als 100 Lieferscheine mehr anzeigen';\r\n if xdsLieferschein.RecordCount>100 then ResultLabel.HTML:='Lieferscheine: '+inttostr(xdsLieferschein.RecordCount)+' (max. Anzeige: 500)';\r\n while not xdsLieferschein.eof do\r\n begin\r\n\r\n Einzelkarte:='
'+xdsLieferscheinNummerkomplett.asstring+' | '+formatdatetime('DD.MM.YYYY',xdsLieferscheinDatum.AsDateTime)+'
'+xdsLieferscheinBelegvariante.AsString+'
';\r\n Einzelkarte:=Einzelkarte+'
'+xdsLieferscheinKundennummerKundennummer.AsString;\r\n Einzelkarte:=Einzelkarte+' | '+xdsLieferscheinNachname.asstring+'
';\r\n Einzelkarte:=Einzelkarte+''+xdsLieferscheinAuftragsbezeichnung.AsString+'
';\r\n Einzelkarte:=Einzelkarte+''+xdsLieferscheinLieferanschriftbild.AsString+'
';\r\n Einzelkarte:=Einzelkarte+'
';\r\n\r\n\r\n myelement:=Container3.ElementHandle;\r\n EinzelCard:=THTMLDiv.Create(self);\r\n EinzelCard.ElementID:=xdsLieferscheinNummerkomplett.asstring;\r\n EinzelCard.HeightStyle:=ssauto;\r\n EinzelCard.Width:=350;\r\n EinzelCard.HTML.Text:=Einzelkarte;\r\n EinzelCard.ElementClassName:='card m-1 border-info';\r\n EinzelCard.OnClick:=@EinzelCardClick;\r\n EinzelCard.ParentElement:=myelement;\r\n\r\n xdsLieferschein.Next;\r\n end;\r\n\r\nend;\r\n\r\nprocedure TListeLieferschein.LoadDFMValues;\r\nbegin\r\n inherited LoadDFMValues;\r\n\r\n ResultLabel := TLabel.Create(Self);\r\n Container1 := THTMLContainer.Create(Self);\r\n Container2 := THTMLContainer.Create(Self);\r\n Container3 := THTMLContainer.Create(Self);\r\n xdsLieferschein := TXDataWebDataSet.Create(Self);\r\n xdsLieferscheinNummerkomplett := TStringField.Create(Self);\r\n xdsLieferscheinReferenzAngebot := TStringField.Create(Self);\r\n xdsLieferscheinReferenzAuftragbest := TStringField.Create(Self);\r\n xdsLieferscheinReferenzRechnung := TStringField.Create(Self);\r\n xdsLieferscheinDatum := TDateTimeField.Create(Self);\r\n xdsLieferscheinJahr := TFloatField.Create(Self);\r\n xdsLieferscheinKalenderwoche := TIntegerField.Create(Self);\r\n xdsLieferscheinNachname := TStringField.Create(Self);\r\n xdsLieferscheinVorname := TStringField.Create(Self);\r\n xdsLieferscheinPostleitzahl := TStringField.Create(Self);\r\n xdsLieferscheinOrt := TStringField.Create(Self);\r\n xdsLieferscheinLaenderkuerzel := TStringField.Create(Self);\r\n xdsLieferscheinLand := TStringField.Create(Self);\r\n xdsLieferscheinBriefanrede1 := TStringField.Create(Self);\r\n xdsLieferscheinBriefanrede2 := TStringField.Create(Self);\r\n xdsLieferscheinEMail := TStringField.Create(Self);\r\n xdsLieferscheinAdresseBild := TStringField.Create(Self);\r\n xdsLieferscheinLieferanschriftBild := TStringField.Create(Self);\r\n xdsLieferscheinZahlungsbedingung := TIntegerField.Create(Self);\r\n xdsLieferscheinZahlungsbedingungText := TStringField.Create(Self);\r\n xdsLieferscheinAuftragsbezeichnung := TStringField.Create(Self);\r\n xdsLieferscheinAuftragnummerKunde := TStringField.Create(Self);\r\n xdsLieferscheinBestelldatumKunde := TDateTimeField.Create(Self);\r\n xdsLieferscheinILN := TStringField.Create(Self);\r\n xdsLieferscheinKopftext := TStringField.Create(Self);\r\n xdsLieferscheinSchlussbemerkung := TStringField.Create(Self);\r\n xdsLieferscheinGruss := TStringField.Create(Self);\r\n xdsLieferscheinMehrwertsteuersatz1 := TFloatField.Create(Self);\r\n xdsLieferscheinMehrwertsteuersatz2 := TFloatField.Create(Self);\r\n xdsLieferscheinNettosumme01 := TFloatField.Create(Self);\r\n xdsLieferscheinNettosumme02 := TFloatField.Create(Self);\r\n xdsLieferscheinNettosumme := TFloatField.Create(Self);\r\n xdsLieferscheinMehrwertsteuer01 := TFloatField.Create(Self);\r\n xdsLieferscheinMehrwertsteuer02 := TFloatField.Create(Self);\r\n xdsLieferscheinMehrwertsteuer := TFloatField.Create(Self);\r\n xdsLieferscheinBruttosumme := TFloatField.Create(Self);\r\n xdsLieferscheinVersanddatum := TDateTimeField.Create(Self);\r\n xdsLieferscheinSkontosatz := TFloatField.Create(Self);\r\n xdsLieferscheinNettosummeEK := TFloatField.Create(Self);\r\n xdsLieferscheinNettoMarge := TFloatField.Create(Self);\r\n xdsLieferscheinSchreibzeichen := TStringField.Create(Self);\r\n xdsLieferscheinUnterzeichner := TStringField.Create(Self);\r\n xdsLieferscheinTelefonMA := TStringField.Create(Self);\r\n xdsLieferscheinEmailMA := TStringField.Create(Self);\r\n xdsLieferscheinUSTID := TStringField.Create(Self);\r\n xdsLieferscheinUmsatzsteuerausweis := TBooleanField.Create(Self);\r\n xdsLieferscheingebucht := TBooleanField.Create(Self);\r\n xdsLieferscheinLieferdatum := TDateTimeField.Create(Self);\r\n xdsLieferscheinTransportbedingung := TStringField.Create(Self);\r\n xdsLieferscheinMehrwertsteuersatz3 := TFloatField.Create(Self);\r\n xdsLieferscheinMehrwertsteuer03 := TFloatField.Create(Self);\r\n xdsLieferscheinNettosumme03 := TFloatField.Create(Self);\r\n xdsLieferscheinRundungsDifferenz := TFloatField.Create(Self);\r\n xdsLieferscheinEmailText := TStringField.Create(Self);\r\n xdsLieferscheinRabattstufe := TStringField.Create(Self);\r\n xdsLieferscheinDebitorennummer := TStringField.Create(Self);\r\n xdsLieferscheinKostentraeger := TStringField.Create(Self);\r\n xdsLieferscheinRabattsatz := TFloatField.Create(Self);\r\n xdsLieferscheinObjektReferenz := TStringField.Create(Self);\r\n xdsLieferscheinBank := TStringField.Create(Self);\r\n xdsLieferscheinBankleitzahl := TFloatField.Create(Self);\r\n xdsLieferscheinKontonummer := TStringField.Create(Self);\r\n xdsLieferscheinKontoinhaber := TStringField.Create(Self);\r\n xdsLieferscheinTelefaxnummer := TStringField.Create(Self);\r\n xdsLieferscheinDatumNeu := TDateTimeField.Create(Self);\r\n xdsLieferscheinDatumgeaendert := TDateTimeField.Create(Self);\r\n xdsLieferscheinObjektnummer := TStringField.Create(Self);\r\n xdsLieferscheinLiefertermin := TStringField.Create(Self);\r\n xdsLieferscheinEmailversand := TBooleanField.Create(Self);\r\n xdsLieferscheinTelefonnummer := TStringField.Create(Self);\r\n xdsLieferscheinMobilTelefon := TStringField.Create(Self);\r\n xdsLieferscheinBenutzerNeu := TStringField.Create(Self);\r\n xdsLieferscheinBenutzerGeaendert := TStringField.Create(Self);\r\n xdsLieferscheinBerechnungBrutto := TBooleanField.Create(Self);\r\n xdsLieferscheinBruttosumme01 := TFloatField.Create(Self);\r\n xdsLieferscheinBruttosumme02 := TFloatField.Create(Self);\r\n xdsLieferscheinBruttosumme03 := TFloatField.Create(Self);\r\n xdsLieferscheinNotiz := TStringField.Create(Self);\r\n xdsLieferscheinMargeProzent := TFloatField.Create(Self);\r\n xdsLieferscheinBelegsprache := TStringField.Create(Self);\r\n xdsLieferscheinDuplicate := TStringField.Create(Self);\r\n xdsLieferscheinAnsprechpartner := TStringField.Create(Self);\r\n xdsLieferscheinKundennummerFremd := TStringField.Create(Self);\r\n xdsLieferscheinProtokoll := TStringField.Create(Self);\r\n xdsLieferscheinVollstaendigFakturiert := TBooleanField.Create(Self);\r\n xdsLieferscheinVerleihauftrag := TBooleanField.Create(Self);\r\n xdsLieferscheinVerleihVon := TDateTimeField.Create(Self);\r\n xdsLieferscheinVerleihBis := TDateTimeField.Create(Self);\r\n xdsLieferscheinRueckgabeschein := TBooleanField.Create(Self);\r\n xdsLieferscheinRueckgabeReferenz := TStringField.Create(Self);\r\n xdsLieferscheingesperrt := TBooleanField.Create(Self);\r\n xdsLieferscheinVerleihvonText := TStringField.Create(Self);\r\n xdsLieferscheinVerleihbisText := TStringField.Create(Self);\r\n xdsLieferscheinNotizExtern := TStringField.Create(Self);\r\n xdsLieferscheinDruckWHG := TStringField.Create(Self);\r\n xdsLieferscheinDruckWHGKurs := TFloatField.Create(Self);\r\n xdsLieferscheinProzentsatzZusatzposition := TFloatField.Create(Self);\r\n xdsLieferscheinTextZusatzposition := TStringField.Create(Self);\r\n xdsLieferscheinTextzusatzBeschreibung := TStringField.Create(Self);\r\n xdsLieferscheinExport := TBooleanField.Create(Self);\r\n xdsLieferscheinExportbescheinigung := TBooleanField.Create(Self);\r\n xdsLieferscheinBestimmungsland := TStringField.Create(Self);\r\n xdsLieferscheinLayoutname := TStringField.Create(Self);\r\n xdsLieferscheinGesamtgewicht := TFloatField.Create(Self);\r\n xdsLieferscheinBetragZusatzposition := TFloatField.Create(Self);\r\n xdsLieferscheinPaketdienst := TStringField.Create(Self);\r\n xdsLieferscheinPaketnummer := TStringField.Create(Self);\r\n xdsLieferscheinMehrwertsteuersatz4 := TFloatField.Create(Self);\r\n xdsLieferscheinMehrwertsteuersatz5 := TFloatField.Create(Self);\r\n xdsLieferscheinMehrwertsteuersatz6 := TFloatField.Create(Self);\r\n xdsLieferscheinBesteuerungKey := TIntegerField.Create(Self);\r\n xdsLieferscheinVertreterMatchcode := TStringField.Create(Self);\r\n xdsLieferscheinVerfasser := TStringField.Create(Self);\r\n xdsLieferscheinLieferadresseID := TIntegerField.Create(Self);\r\n xdsLieferscheinBelegvariante := TStringField.Create(Self);\r\n xdsLieferscheinBereitstellungDatum := TDateTimeField.Create(Self);\r\n xdsLieferscheinBereitstellungErledigt := TBooleanField.Create(Self);\r\n xdsLieferscheinFahrzeugID := TIntegerField.Create(Self);\r\n xdsLieferscheinMonatJahr := TDateTimeField.Create(Self);\r\n xdsLieferscheinLieferanschriftDaten := TStringField.Create(Self);\r\n xdsLieferscheinGesamtVolumen := TFloatField.Create(Self);\r\n xdsLieferscheinBelegPKey := TIntegerField.Create(Self);\r\n xdsLieferscheinDruckParameter := TStringField.Create(Self);\r\n xdsLieferscheinFakturierungNichtVor := TDateTimeField.Create(Self);\r\n xdsLieferscheinQuittungSIG := TBlobField.Create(Self);\r\n xdsLieferscheinKundennummerKundennummer := TStringField.Create(Self);\r\n\r\n ResultLabel.BeforeLoadDFMValues;\r\n Container1.BeforeLoadDFMValues;\r\n Container2.BeforeLoadDFMValues;\r\n Container3.BeforeLoadDFMValues;\r\n xdsLieferschein.BeforeLoadDFMValues;\r\n xdsLieferscheinNummerkomplett.BeforeLoadDFMValues;\r\n xdsLieferscheinReferenzAngebot.BeforeLoadDFMValues;\r\n xdsLieferscheinReferenzAuftragbest.BeforeLoadDFMValues;\r\n xdsLieferscheinReferenzRechnung.BeforeLoadDFMValues;\r\n xdsLieferscheinDatum.BeforeLoadDFMValues;\r\n xdsLieferscheinJahr.BeforeLoadDFMValues;\r\n xdsLieferscheinKalenderwoche.BeforeLoadDFMValues;\r\n xdsLieferscheinNachname.BeforeLoadDFMValues;\r\n xdsLieferscheinVorname.BeforeLoadDFMValues;\r\n xdsLieferscheinPostleitzahl.BeforeLoadDFMValues;\r\n xdsLieferscheinOrt.BeforeLoadDFMValues;\r\n xdsLieferscheinLaenderkuerzel.BeforeLoadDFMValues;\r\n xdsLieferscheinLand.BeforeLoadDFMValues;\r\n xdsLieferscheinBriefanrede1.BeforeLoadDFMValues;\r\n xdsLieferscheinBriefanrede2.BeforeLoadDFMValues;\r\n xdsLieferscheinEMail.BeforeLoadDFMValues;\r\n xdsLieferscheinAdresseBild.BeforeLoadDFMValues;\r\n xdsLieferscheinLieferanschriftBild.BeforeLoadDFMValues;\r\n xdsLieferscheinZahlungsbedingung.BeforeLoadDFMValues;\r\n xdsLieferscheinZahlungsbedingungText.BeforeLoadDFMValues;\r\n xdsLieferscheinAuftragsbezeichnung.BeforeLoadDFMValues;\r\n xdsLieferscheinAuftragnummerKunde.BeforeLoadDFMValues;\r\n xdsLieferscheinBestelldatumKunde.BeforeLoadDFMValues;\r\n xdsLieferscheinILN.BeforeLoadDFMValues;\r\n xdsLieferscheinKopftext.BeforeLoadDFMValues;\r\n xdsLieferscheinSchlussbemerkung.BeforeLoadDFMValues;\r\n xdsLieferscheinGruss.BeforeLoadDFMValues;\r\n xdsLieferscheinMehrwertsteuersatz1.BeforeLoadDFMValues;\r\n xdsLieferscheinMehrwertsteuersatz2.BeforeLoadDFMValues;\r\n xdsLieferscheinNettosumme01.BeforeLoadDFMValues;\r\n xdsLieferscheinNettosumme02.BeforeLoadDFMValues;\r\n xdsLieferscheinNettosumme.BeforeLoadDFMValues;\r\n xdsLieferscheinMehrwertsteuer01.BeforeLoadDFMValues;\r\n xdsLieferscheinMehrwertsteuer02.BeforeLoadDFMValues;\r\n xdsLieferscheinMehrwertsteuer.BeforeLoadDFMValues;\r\n xdsLieferscheinBruttosumme.BeforeLoadDFMValues;\r\n xdsLieferscheinVersanddatum.BeforeLoadDFMValues;\r\n xdsLieferscheinSkontosatz.BeforeLoadDFMValues;\r\n xdsLieferscheinNettosummeEK.BeforeLoadDFMValues;\r\n xdsLieferscheinNettoMarge.BeforeLoadDFMValues;\r\n xdsLieferscheinSchreibzeichen.BeforeLoadDFMValues;\r\n xdsLieferscheinUnterzeichner.BeforeLoadDFMValues;\r\n xdsLieferscheinTelefonMA.BeforeLoadDFMValues;\r\n xdsLieferscheinEmailMA.BeforeLoadDFMValues;\r\n xdsLieferscheinUSTID.BeforeLoadDFMValues;\r\n xdsLieferscheinUmsatzsteuerausweis.BeforeLoadDFMValues;\r\n xdsLieferscheingebucht.BeforeLoadDFMValues;\r\n xdsLieferscheinLieferdatum.BeforeLoadDFMValues;\r\n xdsLieferscheinTransportbedingung.BeforeLoadDFMValues;\r\n xdsLieferscheinMehrwertsteuersatz3.BeforeLoadDFMValues;\r\n xdsLieferscheinMehrwertsteuer03.BeforeLoadDFMValues;\r\n xdsLieferscheinNettosumme03.BeforeLoadDFMValues;\r\n xdsLieferscheinRundungsDifferenz.BeforeLoadDFMValues;\r\n xdsLieferscheinEmailText.BeforeLoadDFMValues;\r\n xdsLieferscheinRabattstufe.BeforeLoadDFMValues;\r\n xdsLieferscheinDebitorennummer.BeforeLoadDFMValues;\r\n xdsLieferscheinKostentraeger.BeforeLoadDFMValues;\r\n xdsLieferscheinRabattsatz.BeforeLoadDFMValues;\r\n xdsLieferscheinObjektReferenz.BeforeLoadDFMValues;\r\n xdsLieferscheinBank.BeforeLoadDFMValues;\r\n xdsLieferscheinBankleitzahl.BeforeLoadDFMValues;\r\n xdsLieferscheinKontonummer.BeforeLoadDFMValues;\r\n xdsLieferscheinKontoinhaber.BeforeLoadDFMValues;\r\n xdsLieferscheinTelefaxnummer.BeforeLoadDFMValues;\r\n xdsLieferscheinDatumNeu.BeforeLoadDFMValues;\r\n xdsLieferscheinDatumgeaendert.BeforeLoadDFMValues;\r\n xdsLieferscheinObjektnummer.BeforeLoadDFMValues;\r\n xdsLieferscheinLiefertermin.BeforeLoadDFMValues;\r\n xdsLieferscheinEmailversand.BeforeLoadDFMValues;\r\n xdsLieferscheinTelefonnummer.BeforeLoadDFMValues;\r\n xdsLieferscheinMobilTelefon.BeforeLoadDFMValues;\r\n xdsLieferscheinBenutzerNeu.BeforeLoadDFMValues;\r\n xdsLieferscheinBenutzerGeaendert.BeforeLoadDFMValues;\r\n xdsLieferscheinBerechnungBrutto.BeforeLoadDFMValues;\r\n xdsLieferscheinBruttosumme01.BeforeLoadDFMValues;\r\n xdsLieferscheinBruttosumme02.BeforeLoadDFMValues;\r\n xdsLieferscheinBruttosumme03.BeforeLoadDFMValues;\r\n xdsLieferscheinNotiz.BeforeLoadDFMValues;\r\n xdsLieferscheinMargeProzent.BeforeLoadDFMValues;\r\n xdsLieferscheinBelegsprache.BeforeLoadDFMValues;\r\n xdsLieferscheinDuplicate.BeforeLoadDFMValues;\r\n xdsLieferscheinAnsprechpartner.BeforeLoadDFMValues;\r\n xdsLieferscheinKundennummerFremd.BeforeLoadDFMValues;\r\n xdsLieferscheinProtokoll.BeforeLoadDFMValues;\r\n xdsLieferscheinVollstaendigFakturiert.BeforeLoadDFMValues;\r\n xdsLieferscheinVerleihauftrag.BeforeLoadDFMValues;\r\n xdsLieferscheinVerleihVon.BeforeLoadDFMValues;\r\n xdsLieferscheinVerleihBis.BeforeLoadDFMValues;\r\n xdsLieferscheinRueckgabeschein.BeforeLoadDFMValues;\r\n xdsLieferscheinRueckgabeReferenz.BeforeLoadDFMValues;\r\n xdsLieferscheingesperrt.BeforeLoadDFMValues;\r\n xdsLieferscheinVerleihvonText.BeforeLoadDFMValues;\r\n xdsLieferscheinVerleihbisText.BeforeLoadDFMValues;\r\n xdsLieferscheinNotizExtern.BeforeLoadDFMValues;\r\n xdsLieferscheinDruckWHG.BeforeLoadDFMValues;\r\n xdsLieferscheinDruckWHGKurs.BeforeLoadDFMValues;\r\n xdsLieferscheinProzentsatzZusatzposition.BeforeLoadDFMValues;\r\n xdsLieferscheinTextZusatzposition.BeforeLoadDFMValues;\r\n xdsLieferscheinTextzusatzBeschreibung.BeforeLoadDFMValues;\r\n xdsLieferscheinExport.BeforeLoadDFMValues;\r\n xdsLieferscheinExportbescheinigung.BeforeLoadDFMValues;\r\n xdsLieferscheinBestimmungsland.BeforeLoadDFMValues;\r\n xdsLieferscheinLayoutname.BeforeLoadDFMValues;\r\n xdsLieferscheinGesamtgewicht.BeforeLoadDFMValues;\r\n xdsLieferscheinBetragZusatzposition.BeforeLoadDFMValues;\r\n xdsLieferscheinPaketdienst.BeforeLoadDFMValues;\r\n xdsLieferscheinPaketnummer.BeforeLoadDFMValues;\r\n xdsLieferscheinMehrwertsteuersatz4.BeforeLoadDFMValues;\r\n xdsLieferscheinMehrwertsteuersatz5.BeforeLoadDFMValues;\r\n xdsLieferscheinMehrwertsteuersatz6.BeforeLoadDFMValues;\r\n xdsLieferscheinBesteuerungKey.BeforeLoadDFMValues;\r\n xdsLieferscheinVertreterMatchcode.BeforeLoadDFMValues;\r\n xdsLieferscheinVerfasser.BeforeLoadDFMValues;\r\n xdsLieferscheinLieferadresseID.BeforeLoadDFMValues;\r\n xdsLieferscheinBelegvariante.BeforeLoadDFMValues;\r\n xdsLieferscheinBereitstellungDatum.BeforeLoadDFMValues;\r\n xdsLieferscheinBereitstellungErledigt.BeforeLoadDFMValues;\r\n xdsLieferscheinFahrzeugID.BeforeLoadDFMValues;\r\n xdsLieferscheinMonatJahr.BeforeLoadDFMValues;\r\n xdsLieferscheinLieferanschriftDaten.BeforeLoadDFMValues;\r\n xdsLieferscheinGesamtVolumen.BeforeLoadDFMValues;\r\n xdsLieferscheinBelegPKey.BeforeLoadDFMValues;\r\n xdsLieferscheinDruckParameter.BeforeLoadDFMValues;\r\n xdsLieferscheinFakturierungNichtVor.BeforeLoadDFMValues;\r\n xdsLieferscheinQuittungSIG.BeforeLoadDFMValues;\r\n xdsLieferscheinKundennummerKundennummer.BeforeLoadDFMValues;\r\n try\r\n Name := 'ListeLieferschein';\r\n Width := 174;\r\n Height := 202;\r\n CSSLibrary := cssBootstrap;\r\n ElementFont := efCSS;\r\n Font.Charset := DEFAULT_CHARSET;\r\n Font.Color := clWindowText;\r\n Font.Height := -11;\r\n Font.Name := 'Tahoma';\r\n Font.Style := [];\r\n ParentFont := False;\r\n SetEvent(Self, 'OnShow', 'WebFormShow');\r\n ResultLabel.SetParentComponent(Self);\r\n ResultLabel.Name := 'ResultLabel';\r\n ResultLabel.Left := 8;\r\n ResultLabel.Top := 189;\r\n ResultLabel.Width := 55;\r\n ResultLabel.Height := 13;\r\n ResultLabel.Caption := 'ResultLabel';\r\n ResultLabel.ElementClassName := 'h6 m-2';\r\n ResultLabel.ElementFont := efCSS;\r\n ResultLabel.ElementPosition := epIgnore;\r\n ResultLabel.HeightStyle := ssAuto;\r\n ResultLabel.HeightPercent := 100.000000000000000000;\r\n ResultLabel.WidthStyle := ssAuto;\r\n ResultLabel.WidthPercent := 100.000000000000000000;\r\n SetEvent(ResultLabel, Self, 'OnClick', 'ResultLabelClick');\r\n Container1.SetParentComponent(Self);\r\n Container1.Name := 'Container1';\r\n Container1.Left := 0;\r\n Container1.Top := 0;\r\n Container1.Width := 169;\r\n Container1.Height := 41;\r\n Container1.HeightStyle := ssAuto;\r\n Container1.WidthStyle := ssPercent;\r\n Container1.HeightPercent := 100.000000000000000000;\r\n Container1.WidthPercent := 100.000000000000000000;\r\n Container1.ChildOrder := 1;\r\n Container1.ElementFont := efCSS;\r\n Container1.ElementPosition := epIgnore;\r\n Container2.SetParentComponent(Self);\r\n Container2.Name := 'Container2';\r\n Container2.Left := 0;\r\n Container2.Top := 47;\r\n Container2.Width := 169;\r\n Container2.Height := 41;\r\n Container2.ElementClassName := 'd-flex flex-wrap m-1';\r\n Container2.HeightStyle := ssAuto;\r\n Container2.WidthStyle := ssAuto;\r\n Container2.HeightPercent := 100.000000000000000000;\r\n Container2.WidthPercent := 100.000000000000000000;\r\n Container2.ChildOrder := 2;\r\n Container2.ElementFont := efCSS;\r\n Container2.ElementPosition := epIgnore;\r\n Container3.SetParentComponent(Self);\r\n Container3.Name := 'Container3';\r\n Container3.Left := 0;\r\n Container3.Top := 94;\r\n Container3.Width := 169;\r\n Container3.Height := 41;\r\n Container3.ElementClassName := 'd-flex flex-wrap m-1';\r\n Container3.HeightStyle := ssAuto;\r\n Container3.WidthStyle := ssAuto;\r\n Container3.HeightPercent := 100.000000000000000000;\r\n Container3.WidthPercent := 100.000000000000000000;\r\n Container3.ChildOrder := 3;\r\n Container3.ElementFont := efCSS;\r\n Container3.ElementPosition := epIgnore;\r\n xdsLieferschein.SetParentComponent(Self);\r\n xdsLieferschein.Name := 'xdsLieferschein';\r\n xdsLieferschein.AfterOpen := xdsLieferscheinAfterOpen;\r\n xdsLieferschein.EntitySetName := 'Lieferschein';\r\n xdsLieferschein.Connection := DM2.XDataWebConnection1;\r\n xdsLieferschein.SubpropsDepth := 1;\r\n xdsLieferschein.QueryString := '$expand=Kundennummer&$filter=(VollstaendigFakturiert eq 0)&$orderby=Nummerkomplett DESC';\r\n xdsLieferschein.QueryTop := 100;\r\n xdsLieferschein.Left := 36;\r\n xdsLieferschein.Top := 134;\r\n xdsLieferscheinNummerkomplett.SetParentComponent(xdsLieferschein);\r\n xdsLieferscheinNummerkomplett.Name := 'xdsLieferscheinNummerkomplett';\r\n xdsLieferscheinNummerkomplett.FieldName := 'Nummerkomplett';\r\n xdsLieferscheinNummerkomplett.Required := True;\r\n xdsLieferscheinNummerkomplett.Size := 10;\r\n xdsLieferscheinReferenzAngebot.SetParentComponent(xdsLieferschein);\r\n xdsLieferscheinReferenzAngebot.Name := 'xdsLieferscheinReferenzAngebot';\r\n xdsLieferscheinReferenzAngebot.FieldName := 'ReferenzAngebot';\r\n xdsLieferscheinReferenzAngebot.Size := 10;\r\n xdsLieferscheinReferenzAuftragbest.SetParentComponent(xdsLieferschein);\r\n xdsLieferscheinReferenzAuftragbest.Name := 'xdsLieferscheinReferenzAuftragbest';\r\n xdsLieferscheinReferenzAuftragbest.FieldName := 'ReferenzAuftragbest';\r\n xdsLieferscheinReferenzAuftragbest.Size := 10;\r\n xdsLieferscheinReferenzRechnung.SetParentComponent(xdsLieferschein);\r\n xdsLieferscheinReferenzRechnung.Name := 'xdsLieferscheinReferenzRechnung';\r\n xdsLieferscheinReferenzRechnung.FieldName := 'ReferenzRechnung';\r\n xdsLieferscheinReferenzRechnung.Size := 10;\r\n xdsLieferscheinDatum.SetParentComponent(xdsLieferschein);\r\n xdsLieferscheinDatum.Name := 'xdsLieferscheinDatum';\r\n xdsLieferscheinDatum.FieldName := 'Datum';\r\n xdsLieferscheinDatum.Required := True;\r\n xdsLieferscheinJahr.SetParentComponent(xdsLieferschein);\r\n xdsLieferscheinJahr.Name := 'xdsLieferscheinJahr';\r\n xdsLieferscheinJahr.FieldName := 'Jahr';\r\n xdsLieferscheinKalenderwoche.SetParentComponent(xdsLieferschein);\r\n xdsLieferscheinKalenderwoche.Name := 'xdsLieferscheinKalenderwoche';\r\n xdsLieferscheinKalenderwoche.FieldName := 'Kalenderwoche';\r\n xdsLieferscheinNachname.SetParentComponent(xdsLieferschein);\r\n xdsLieferscheinNachname.Name := 'xdsLieferscheinNachname';\r\n xdsLieferscheinNachname.FieldName := 'Nachname';\r\n xdsLieferscheinNachname.Size := 50;\r\n xdsLieferscheinVorname.SetParentComponent(xdsLieferschein);\r\n xdsLieferscheinVorname.Name := 'xdsLieferscheinVorname';\r\n xdsLieferscheinVorname.FieldName := 'Vorname';\r\n xdsLieferscheinVorname.Size := 50;\r\n xdsLieferscheinPostleitzahl.SetParentComponent(xdsLieferschein);\r\n xdsLieferscheinPostleitzahl.Name := 'xdsLieferscheinPostleitzahl';\r\n xdsLieferscheinPostleitzahl.FieldName := 'Postleitzahl';\r\n xdsLieferscheinPostleitzahl.Size := 10;\r\n xdsLieferscheinOrt.SetParentComponent(xdsLieferschein);\r\n xdsLieferscheinOrt.Name := 'xdsLieferscheinOrt';\r\n xdsLieferscheinOrt.FieldName := 'Ort';\r\n xdsLieferscheinOrt.Size := 50;\r\n xdsLieferscheinLaenderkuerzel.SetParentComponent(xdsLieferschein);\r\n xdsLieferscheinLaenderkuerzel.Name := 'xdsLieferscheinLaenderkuerzel';\r\n xdsLieferscheinLaenderkuerzel.FieldName := 'Laenderkuerzel';\r\n xdsLieferscheinLaenderkuerzel.Size := 5;\r\n xdsLieferscheinLand.SetParentComponent(xdsLieferschein);\r\n xdsLieferscheinLand.Name := 'xdsLieferscheinLand';\r\n xdsLieferscheinLand.FieldName := 'Land';\r\n xdsLieferscheinLand.Size := 50;\r\n xdsLieferscheinBriefanrede1.SetParentComponent(xdsLieferschein);\r\n xdsLieferscheinBriefanrede1.Name := 'xdsLieferscheinBriefanrede1';\r\n xdsLieferscheinBriefanrede1.FieldName := 'Briefanrede1';\r\n xdsLieferscheinBriefanrede1.Size := 255;\r\n xdsLieferscheinBriefanrede2.SetParentComponent(xdsLieferschein);\r\n xdsLieferscheinBriefanrede2.Name := 'xdsLieferscheinBriefanrede2';\r\n xdsLieferscheinBriefanrede2.FieldName := 'Briefanrede2';\r\n xdsLieferscheinBriefanrede2.Size := 40;\r\n xdsLieferscheinEMail.SetParentComponent(xdsLieferschein);\r\n xdsLieferscheinEMail.Name := 'xdsLieferscheinEMail';\r\n xdsLieferscheinEMail.FieldName := 'EMail';\r\n xdsLieferscheinEMail.Size := 50;\r\n xdsLieferscheinAdresseBild.SetParentComponent(xdsLieferschein);\r\n xdsLieferscheinAdresseBild.Name := 'xdsLieferscheinAdresseBild';\r\n xdsLieferscheinAdresseBild.FieldName := 'AdresseBild';\r\n xdsLieferscheinAdresseBild.Size := 255;\r\n xdsLieferscheinLieferanschriftBild.SetParentComponent(xdsLieferschein);\r\n xdsLieferscheinLieferanschriftBild.Name := 'xdsLieferscheinLieferanschriftBild';\r\n xdsLieferscheinLieferanschriftBild.FieldName := 'LieferanschriftBild';\r\n xdsLieferscheinLieferanschriftBild.Size := 255;\r\n xdsLieferscheinZahlungsbedingung.SetParentComponent(xdsLieferschein);\r\n xdsLieferscheinZahlungsbedingung.Name := 'xdsLieferscheinZahlungsbedingung';\r\n xdsLieferscheinZahlungsbedingung.FieldName := 'Zahlungsbedingung';\r\n xdsLieferscheinZahlungsbedingungText.SetParentComponent(xdsLieferschein);\r\n xdsLieferscheinZahlungsbedingungText.Name := 'xdsLieferscheinZahlungsbedingungText';\r\n xdsLieferscheinZahlungsbedingungText.FieldName := 'ZahlungsbedingungText';\r\n xdsLieferscheinZahlungsbedingungText.Size := 250;\r\n xdsLieferscheinAuftragsbezeichnung.SetParentComponent(xdsLieferschein);\r\n xdsLieferscheinAuftragsbezeichnung.Name := 'xdsLieferscheinAuftragsbezeichnung';\r\n xdsLieferscheinAuftragsbezeichnung.FieldName := 'Auftragsbezeichnung';\r\n xdsLieferscheinAuftragsbezeichnung.Size := 255;\r\n xdsLieferscheinAuftragnummerKunde.SetParentComponent(xdsLieferschein);\r\n xdsLieferscheinAuftragnummerKunde.Name := 'xdsLieferscheinAuftragnummerKunde';\r\n xdsLieferscheinAuftragnummerKunde.FieldName := 'AuftragnummerKunde';\r\n xdsLieferscheinAuftragnummerKunde.Size := 50;\r\n xdsLieferscheinBestelldatumKunde.SetParentComponent(xdsLieferschein);\r\n xdsLieferscheinBestelldatumKunde.Name := 'xdsLieferscheinBestelldatumKunde';\r\n xdsLieferscheinBestelldatumKunde.FieldName := 'BestelldatumKunde';\r\n xdsLieferscheinILN.SetParentComponent(xdsLieferschein);\r\n xdsLieferscheinILN.Name := 'xdsLieferscheinILN';\r\n xdsLieferscheinILN.FieldName := 'ILN';\r\n xdsLieferscheinILN.Size := 50;\r\n xdsLieferscheinKopftext.SetParentComponent(xdsLieferschein);\r\n xdsLieferscheinKopftext.Name := 'xdsLieferscheinKopftext';\r\n xdsLieferscheinKopftext.FieldName := 'Kopftext';\r\n xdsLieferscheinKopftext.Size := 255;\r\n xdsLieferscheinSchlussbemerkung.SetParentComponent(xdsLieferschein);\r\n xdsLieferscheinSchlussbemerkung.Name := 'xdsLieferscheinSchlussbemerkung';\r\n xdsLieferscheinSchlussbemerkung.FieldName := 'Schlussbemerkung';\r\n xdsLieferscheinSchlussbemerkung.Size := 255;\r\n xdsLieferscheinGruss.SetParentComponent(xdsLieferschein);\r\n xdsLieferscheinGruss.Name := 'xdsLieferscheinGruss';\r\n xdsLieferscheinGruss.FieldName := 'Gruss';\r\n xdsLieferscheinGruss.Size := 255;\r\n xdsLieferscheinMehrwertsteuersatz1.SetParentComponent(xdsLieferschein);\r\n xdsLieferscheinMehrwertsteuersatz1.Name := 'xdsLieferscheinMehrwertsteuersatz1';\r\n xdsLieferscheinMehrwertsteuersatz1.FieldName := 'Mehrwertsteuersatz1';\r\n xdsLieferscheinMehrwertsteuersatz2.SetParentComponent(xdsLieferschein);\r\n xdsLieferscheinMehrwertsteuersatz2.Name := 'xdsLieferscheinMehrwertsteuersatz2';\r\n xdsLieferscheinMehrwertsteuersatz2.FieldName := 'Mehrwertsteuersatz2';\r\n xdsLieferscheinNettosumme01.SetParentComponent(xdsLieferschein);\r\n xdsLieferscheinNettosumme01.Name := 'xdsLieferscheinNettosumme01';\r\n xdsLieferscheinNettosumme01.FieldName := 'Nettosumme01';\r\n xdsLieferscheinNettosumme02.SetParentComponent(xdsLieferschein);\r\n xdsLieferscheinNettosumme02.Name := 'xdsLieferscheinNettosumme02';\r\n xdsLieferscheinNettosumme02.FieldName := 'Nettosumme02';\r\n xdsLieferscheinNettosumme.SetParentComponent(xdsLieferschein);\r\n xdsLieferscheinNettosumme.Name := 'xdsLieferscheinNettosumme';\r\n xdsLieferscheinNettosumme.FieldName := 'Nettosumme';\r\n xdsLieferscheinMehrwertsteuer01.SetParentComponent(xdsLieferschein);\r\n xdsLieferscheinMehrwertsteuer01.Name := 'xdsLieferscheinMehrwertsteuer01';\r\n xdsLieferscheinMehrwertsteuer01.FieldName := 'Mehrwertsteuer01';\r\n xdsLieferscheinMehrwertsteuer02.SetParentComponent(xdsLieferschein);\r\n xdsLieferscheinMehrwertsteuer02.Name := 'xdsLieferscheinMehrwertsteuer02';\r\n xdsLieferscheinMehrwertsteuer02.FieldName := 'Mehrwertsteuer02';\r\n xdsLieferscheinMehrwertsteuer.SetParentComponent(xdsLieferschein);\r\n xdsLieferscheinMehrwertsteuer.Name := 'xdsLieferscheinMehrwertsteuer';\r\n xdsLieferscheinMehrwertsteuer.FieldName := 'Mehrwertsteuer';\r\n xdsLieferscheinBruttosumme.SetParentComponent(xdsLieferschein);\r\n xdsLieferscheinBruttosumme.Name := 'xdsLieferscheinBruttosumme';\r\n xdsLieferscheinBruttosumme.FieldName := 'Bruttosumme';\r\n xdsLieferscheinVersanddatum.SetParentComponent(xdsLieferschein);\r\n xdsLieferscheinVersanddatum.Name := 'xdsLieferscheinVersanddatum';\r\n xdsLieferscheinVersanddatum.FieldName := 'Versanddatum';\r\n xdsLieferscheinSkontosatz.SetParentComponent(xdsLieferschein);\r\n xdsLieferscheinSkontosatz.Name := 'xdsLieferscheinSkontosatz';\r\n xdsLieferscheinSkontosatz.FieldName := 'Skontosatz';\r\n xdsLieferscheinNettosummeEK.SetParentComponent(xdsLieferschein);\r\n xdsLieferscheinNettosummeEK.Name := 'xdsLieferscheinNettosummeEK';\r\n xdsLieferscheinNettosummeEK.FieldName := 'NettosummeEK';\r\n xdsLieferscheinNettoMarge.SetParentComponent(xdsLieferschein);\r\n xdsLieferscheinNettoMarge.Name := 'xdsLieferscheinNettoMarge';\r\n xdsLieferscheinNettoMarge.FieldName := 'NettoMarge';\r\n xdsLieferscheinSchreibzeichen.SetParentComponent(xdsLieferschein);\r\n xdsLieferscheinSchreibzeichen.Name := 'xdsLieferscheinSchreibzeichen';\r\n xdsLieferscheinSchreibzeichen.FieldName := 'Schreibzeichen';\r\n xdsLieferscheinSchreibzeichen.Size := 10;\r\n xdsLieferscheinUnterzeichner.SetParentComponent(xdsLieferschein);\r\n xdsLieferscheinUnterzeichner.Name := 'xdsLieferscheinUnterzeichner';\r\n xdsLieferscheinUnterzeichner.FieldName := 'Unterzeichner';\r\n xdsLieferscheinUnterzeichner.Size := 50;\r\n xdsLieferscheinTelefonMA.SetParentComponent(xdsLieferschein);\r\n xdsLieferscheinTelefonMA.Name := 'xdsLieferscheinTelefonMA';\r\n xdsLieferscheinTelefonMA.FieldName := 'TelefonMA';\r\n xdsLieferscheinTelefonMA.Size := 30;\r\n xdsLieferscheinEmailMA.SetParentComponent(xdsLieferschein);\r\n xdsLieferscheinEmailMA.Name := 'xdsLieferscheinEmailMA';\r\n xdsLieferscheinEmailMA.FieldName := 'EmailMA';\r\n xdsLieferscheinEmailMA.Size := 50;\r\n xdsLieferscheinUSTID.SetParentComponent(xdsLieferschein);\r\n xdsLieferscheinUSTID.Name := 'xdsLieferscheinUSTID';\r\n xdsLieferscheinUSTID.FieldName := 'USTID';\r\n xdsLieferscheinUmsatzsteuerausweis.SetParentComponent(xdsLieferschein);\r\n xdsLieferscheinUmsatzsteuerausweis.Name := 'xdsLieferscheinUmsatzsteuerausweis';\r\n xdsLieferscheinUmsatzsteuerausweis.FieldName := 'Umsatzsteuerausweis';\r\n xdsLieferscheingebucht.SetParentComponent(xdsLieferschein);\r\n xdsLieferscheingebucht.Name := 'xdsLieferscheingebucht';\r\n xdsLieferscheingebucht.FieldName := 'gebucht';\r\n xdsLieferscheinLieferdatum.SetParentComponent(xdsLieferschein);\r\n xdsLieferscheinLieferdatum.Name := 'xdsLieferscheinLieferdatum';\r\n xdsLieferscheinLieferdatum.FieldName := 'Lieferdatum';\r\n xdsLieferscheinTransportbedingung.SetParentComponent(xdsLieferschein);\r\n xdsLieferscheinTransportbedingung.Name := 'xdsLieferscheinTransportbedingung';\r\n xdsLieferscheinTransportbedingung.FieldName := 'Transportbedingung';\r\n xdsLieferscheinTransportbedingung.Size := 100;\r\n xdsLieferscheinMehrwertsteuersatz3.SetParentComponent(xdsLieferschein);\r\n xdsLieferscheinMehrwertsteuersatz3.Name := 'xdsLieferscheinMehrwertsteuersatz3';\r\n xdsLieferscheinMehrwertsteuersatz3.FieldName := 'Mehrwertsteuersatz3';\r\n xdsLieferscheinMehrwertsteuer03.SetParentComponent(xdsLieferschein);\r\n xdsLieferscheinMehrwertsteuer03.Name := 'xdsLieferscheinMehrwertsteuer03';\r\n xdsLieferscheinMehrwertsteuer03.FieldName := 'Mehrwertsteuer03';\r\n xdsLieferscheinNettosumme03.SetParentComponent(xdsLieferschein);\r\n xdsLieferscheinNettosumme03.Name := 'xdsLieferscheinNettosumme03';\r\n xdsLieferscheinNettosumme03.FieldName := 'Nettosumme03';\r\n xdsLieferscheinRundungsDifferenz.SetParentComponent(xdsLieferschein);\r\n xdsLieferscheinRundungsDifferenz.Name := 'xdsLieferscheinRundungsDifferenz';\r\n xdsLieferscheinRundungsDifferenz.FieldName := 'RundungsDifferenz';\r\n xdsLieferscheinEmailText.SetParentComponent(xdsLieferschein);\r\n xdsLieferscheinEmailText.Name := 'xdsLieferscheinEmailText';\r\n xdsLieferscheinEmailText.FieldName := 'EmailText';\r\n xdsLieferscheinEmailText.Size := 255;\r\n xdsLieferscheinRabattstufe.SetParentComponent(xdsLieferschein);\r\n xdsLieferscheinRabattstufe.Name := 'xdsLieferscheinRabattstufe';\r\n xdsLieferscheinRabattstufe.FieldName := 'Rabattstufe';\r\n xdsLieferscheinRabattstufe.Size := 15;\r\n xdsLieferscheinDebitorennummer.SetParentComponent(xdsLieferschein);\r\n xdsLieferscheinDebitorennummer.Name := 'xdsLieferscheinDebitorennummer';\r\n xdsLieferscheinDebitorennummer.FieldName := 'Debitorennummer';\r\n xdsLieferscheinDebitorennummer.Size := 13;\r\n xdsLieferscheinKostentraeger.SetParentComponent(xdsLieferschein);\r\n xdsLieferscheinKostentraeger.Name := 'xdsLieferscheinKostentraeger';\r\n xdsLieferscheinKostentraeger.FieldName := 'Kostentraeger';\r\n xdsLieferscheinKostentraeger.Size := 13;\r\n xdsLieferscheinRabattsatz.SetParentComponent(xdsLieferschein);\r\n xdsLieferscheinRabattsatz.Name := 'xdsLieferscheinRabattsatz';\r\n xdsLieferscheinRabattsatz.FieldName := 'Rabattsatz';\r\n xdsLieferscheinObjektReferenz.SetParentComponent(xdsLieferschein);\r\n xdsLieferscheinObjektReferenz.Name := 'xdsLieferscheinObjektReferenz';\r\n xdsLieferscheinObjektReferenz.FieldName := 'ObjektReferenz';\r\n xdsLieferscheinObjektReferenz.Size := 13;\r\n xdsLieferscheinBank.SetParentComponent(xdsLieferschein);\r\n xdsLieferscheinBank.Name := 'xdsLieferscheinBank';\r\n xdsLieferscheinBank.FieldName := 'Bank';\r\n xdsLieferscheinBank.Size := 50;\r\n xdsLieferscheinBankleitzahl.SetParentComponent(xdsLieferschein);\r\n xdsLieferscheinBankleitzahl.Name := 'xdsLieferscheinBankleitzahl';\r\n xdsLieferscheinBankleitzahl.FieldName := 'Bankleitzahl';\r\n xdsLieferscheinKontonummer.SetParentComponent(xdsLieferschein);\r\n xdsLieferscheinKontonummer.Name := 'xdsLieferscheinKontonummer';\r\n xdsLieferscheinKontonummer.FieldName := 'Kontonummer';\r\n xdsLieferscheinKontonummer.Size := 50;\r\n xdsLieferscheinKontoinhaber.SetParentComponent(xdsLieferschein);\r\n xdsLieferscheinKontoinhaber.Name := 'xdsLieferscheinKontoinhaber';\r\n xdsLieferscheinKontoinhaber.FieldName := 'Kontoinhaber';\r\n xdsLieferscheinKontoinhaber.Size := 50;\r\n xdsLieferscheinTelefaxnummer.SetParentComponent(xdsLieferschein);\r\n xdsLieferscheinTelefaxnummer.Name := 'xdsLieferscheinTelefaxnummer';\r\n xdsLieferscheinTelefaxnummer.FieldName := 'Telefaxnummer';\r\n xdsLieferscheinTelefaxnummer.Size := 25;\r\n xdsLieferscheinDatumNeu.SetParentComponent(xdsLieferschein);\r\n xdsLieferscheinDatumNeu.Name := 'xdsLieferscheinDatumNeu';\r\n xdsLieferscheinDatumNeu.FieldName := 'DatumNeu';\r\n xdsLieferscheinDatumgeaendert.SetParentComponent(xdsLieferschein);\r\n xdsLieferscheinDatumgeaendert.Name := 'xdsLieferscheinDatumgeaendert';\r\n xdsLieferscheinDatumgeaendert.FieldName := 'Datumgeaendert';\r\n xdsLieferscheinObjektnummer.SetParentComponent(xdsLieferschein);\r\n xdsLieferscheinObjektnummer.Name := 'xdsLieferscheinObjektnummer';\r\n xdsLieferscheinObjektnummer.FieldName := 'Objektnummer';\r\n xdsLieferscheinObjektnummer.Size := 25;\r\n xdsLieferscheinLiefertermin.SetParentComponent(xdsLieferschein);\r\n xdsLieferscheinLiefertermin.Name := 'xdsLieferscheinLiefertermin';\r\n xdsLieferscheinLiefertermin.FieldName := 'Liefertermin';\r\n xdsLieferscheinLiefertermin.Size := 50;\r\n xdsLieferscheinEmailversand.SetParentComponent(xdsLieferschein);\r\n xdsLieferscheinEmailversand.Name := 'xdsLieferscheinEmailversand';\r\n xdsLieferscheinEmailversand.FieldName := 'Emailversand';\r\n xdsLieferscheinTelefonnummer.SetParentComponent(xdsLieferschein);\r\n xdsLieferscheinTelefonnummer.Name := 'xdsLieferscheinTelefonnummer';\r\n xdsLieferscheinTelefonnummer.FieldName := 'Telefonnummer';\r\n xdsLieferscheinTelefonnummer.Size := 35;\r\n xdsLieferscheinMobilTelefon.SetParentComponent(xdsLieferschein);\r\n xdsLieferscheinMobilTelefon.Name := 'xdsLieferscheinMobilTelefon';\r\n xdsLieferscheinMobilTelefon.FieldName := 'MobilTelefon';\r\n xdsLieferscheinMobilTelefon.Size := 25;\r\n xdsLieferscheinBenutzerNeu.SetParentComponent(xdsLieferschein);\r\n xdsLieferscheinBenutzerNeu.Name := 'xdsLieferscheinBenutzerNeu';\r\n xdsLieferscheinBenutzerNeu.FieldName := 'BenutzerNeu';\r\n xdsLieferscheinBenutzerNeu.Size := 50;\r\n xdsLieferscheinBenutzerGeaendert.SetParentComponent(xdsLieferschein);\r\n xdsLieferscheinBenutzerGeaendert.Name := 'xdsLieferscheinBenutzerGeaendert';\r\n xdsLieferscheinBenutzerGeaendert.FieldName := 'BenutzerGeaendert';\r\n xdsLieferscheinBenutzerGeaendert.Size := 50;\r\n xdsLieferscheinBerechnungBrutto.SetParentComponent(xdsLieferschein);\r\n xdsLieferscheinBerechnungBrutto.Name := 'xdsLieferscheinBerechnungBrutto';\r\n xdsLieferscheinBerechnungBrutto.FieldName := 'BerechnungBrutto';\r\n xdsLieferscheinBruttosumme01.SetParentComponent(xdsLieferschein);\r\n xdsLieferscheinBruttosumme01.Name := 'xdsLieferscheinBruttosumme01';\r\n xdsLieferscheinBruttosumme01.FieldName := 'Bruttosumme01';\r\n xdsLieferscheinBruttosumme02.SetParentComponent(xdsLieferschein);\r\n xdsLieferscheinBruttosumme02.Name := 'xdsLieferscheinBruttosumme02';\r\n xdsLieferscheinBruttosumme02.FieldName := 'Bruttosumme02';\r\n xdsLieferscheinBruttosumme03.SetParentComponent(xdsLieferschein);\r\n xdsLieferscheinBruttosumme03.Name := 'xdsLieferscheinBruttosumme03';\r\n xdsLieferscheinBruttosumme03.FieldName := 'Bruttosumme03';\r\n xdsLieferscheinNotiz.SetParentComponent(xdsLieferschein);\r\n xdsLieferscheinNotiz.Name := 'xdsLieferscheinNotiz';\r\n xdsLieferscheinNotiz.FieldName := 'Notiz';\r\n xdsLieferscheinNotiz.Size := 255;\r\n xdsLieferscheinMargeProzent.SetParentComponent(xdsLieferschein);\r\n xdsLieferscheinMargeProzent.Name := 'xdsLieferscheinMargeProzent';\r\n xdsLieferscheinMargeProzent.FieldName := 'MargeProzent';\r\n xdsLieferscheinBelegsprache.SetParentComponent(xdsLieferschein);\r\n xdsLieferscheinBelegsprache.Name := 'xdsLieferscheinBelegsprache';\r\n xdsLieferscheinBelegsprache.FieldName := 'Belegsprache';\r\n xdsLieferscheinBelegsprache.Size := 10;\r\n xdsLieferscheinDuplicate.SetParentComponent(xdsLieferschein);\r\n xdsLieferscheinDuplicate.Name := 'xdsLieferscheinDuplicate';\r\n xdsLieferscheinDuplicate.FieldName := 'Duplicate';\r\n xdsLieferscheinAnsprechpartner.SetParentComponent(xdsLieferschein);\r\n xdsLieferscheinAnsprechpartner.Name := 'xdsLieferscheinAnsprechpartner';\r\n xdsLieferscheinAnsprechpartner.FieldName := 'Ansprechpartner';\r\n xdsLieferscheinAnsprechpartner.Size := 105;\r\n xdsLieferscheinKundennummerFremd.SetParentComponent(xdsLieferschein);\r\n xdsLieferscheinKundennummerFremd.Name := 'xdsLieferscheinKundennummerFremd';\r\n xdsLieferscheinKundennummerFremd.FieldName := 'KundennummerFremd';\r\n xdsLieferscheinProtokoll.SetParentComponent(xdsLieferschein);\r\n xdsLieferscheinProtokoll.Name := 'xdsLieferscheinProtokoll';\r\n xdsLieferscheinProtokoll.FieldName := 'Protokoll';\r\n xdsLieferscheinProtokoll.Size := 255;\r\n xdsLieferscheinVollstaendigFakturiert.SetParentComponent(xdsLieferschein);\r\n xdsLieferscheinVollstaendigFakturiert.Name := 'xdsLieferscheinVollstaendigFakturiert';\r\n xdsLieferscheinVollstaendigFakturiert.FieldName := 'VollstaendigFakturiert';\r\n xdsLieferscheinVerleihauftrag.SetParentComponent(xdsLieferschein);\r\n xdsLieferscheinVerleihauftrag.Name := 'xdsLieferscheinVerleihauftrag';\r\n xdsLieferscheinVerleihauftrag.FieldName := 'Verleihauftrag';\r\n xdsLieferscheinVerleihVon.SetParentComponent(xdsLieferschein);\r\n xdsLieferscheinVerleihVon.Name := 'xdsLieferscheinVerleihVon';\r\n xdsLieferscheinVerleihVon.FieldName := 'VerleihVon';\r\n xdsLieferscheinVerleihBis.SetParentComponent(xdsLieferschein);\r\n xdsLieferscheinVerleihBis.Name := 'xdsLieferscheinVerleihBis';\r\n xdsLieferscheinVerleihBis.FieldName := 'VerleihBis';\r\n xdsLieferscheinRueckgabeschein.SetParentComponent(xdsLieferschein);\r\n xdsLieferscheinRueckgabeschein.Name := 'xdsLieferscheinRueckgabeschein';\r\n xdsLieferscheinRueckgabeschein.FieldName := 'Rueckgabeschein';\r\n xdsLieferscheinRueckgabeReferenz.SetParentComponent(xdsLieferschein);\r\n xdsLieferscheinRueckgabeReferenz.Name := 'xdsLieferscheinRueckgabeReferenz';\r\n xdsLieferscheinRueckgabeReferenz.FieldName := 'RueckgabeReferenz';\r\n xdsLieferscheinRueckgabeReferenz.Size := 10;\r\n xdsLieferscheingesperrt.SetParentComponent(xdsLieferschein);\r\n xdsLieferscheingesperrt.Name := 'xdsLieferscheingesperrt';\r\n xdsLieferscheingesperrt.FieldName := 'gesperrt';\r\n xdsLieferscheinVerleihvonText.SetParentComponent(xdsLieferschein);\r\n xdsLieferscheinVerleihvonText.Name := 'xdsLieferscheinVerleihvonText';\r\n xdsLieferscheinVerleihvonText.FieldName := 'VerleihvonText';\r\n xdsLieferscheinVerleihvonText.Size := 50;\r\n xdsLieferscheinVerleihbisText.SetParentComponent(xdsLieferschein);\r\n xdsLieferscheinVerleihbisText.Name := 'xdsLieferscheinVerleihbisText';\r\n xdsLieferscheinVerleihbisText.FieldName := 'VerleihbisText';\r\n xdsLieferscheinVerleihbisText.Size := 50;\r\n xdsLieferscheinNotizExtern.SetParentComponent(xdsLieferschein);\r\n xdsLieferscheinNotizExtern.Name := 'xdsLieferscheinNotizExtern';\r\n xdsLieferscheinNotizExtern.FieldName := 'NotizExtern';\r\n xdsLieferscheinNotizExtern.Size := 255;\r\n xdsLieferscheinDruckWHG.SetParentComponent(xdsLieferschein);\r\n xdsLieferscheinDruckWHG.Name := 'xdsLieferscheinDruckWHG';\r\n xdsLieferscheinDruckWHG.FieldName := 'DruckWHG';\r\n xdsLieferscheinDruckWHG.Size := 3;\r\n xdsLieferscheinDruckWHGKurs.SetParentComponent(xdsLieferschein);\r\n xdsLieferscheinDruckWHGKurs.Name := 'xdsLieferscheinDruckWHGKurs';\r\n xdsLieferscheinDruckWHGKurs.FieldName := 'DruckWHGKurs';\r\n xdsLieferscheinProzentsatzZusatzposition.SetParentComponent(xdsLieferschein);\r\n xdsLieferscheinProzentsatzZusatzposition.Name := 'xdsLieferscheinProzentsatzZusatzposition';\r\n xdsLieferscheinProzentsatzZusatzposition.FieldName := 'ProzentsatzZusatzposition';\r\n xdsLieferscheinTextZusatzposition.SetParentComponent(xdsLieferschein);\r\n xdsLieferscheinTextZusatzposition.Name := 'xdsLieferscheinTextZusatzposition';\r\n xdsLieferscheinTextZusatzposition.FieldName := 'TextZusatzposition';\r\n xdsLieferscheinTextZusatzposition.Size := 255;\r\n xdsLieferscheinTextzusatzBeschreibung.SetParentComponent(xdsLieferschein);\r\n xdsLieferscheinTextzusatzBeschreibung.Name := 'xdsLieferscheinTextzusatzBeschreibung';\r\n xdsLieferscheinTextzusatzBeschreibung.FieldName := 'TextzusatzBeschreibung';\r\n xdsLieferscheinTextzusatzBeschreibung.Size := 50;\r\n xdsLieferscheinExport.SetParentComponent(xdsLieferschein);\r\n xdsLieferscheinExport.Name := 'xdsLieferscheinExport';\r\n xdsLieferscheinExport.FieldName := 'Export';\r\n xdsLieferscheinExportbescheinigung.SetParentComponent(xdsLieferschein);\r\n xdsLieferscheinExportbescheinigung.Name := 'xdsLieferscheinExportbescheinigung';\r\n xdsLieferscheinExportbescheinigung.FieldName := 'Exportbescheinigung';\r\n xdsLieferscheinBestimmungsland.SetParentComponent(xdsLieferschein);\r\n xdsLieferscheinBestimmungsland.Name := 'xdsLieferscheinBestimmungsland';\r\n xdsLieferscheinBestimmungsland.FieldName := 'Bestimmungsland';\r\n xdsLieferscheinBestimmungsland.Size := 5;\r\n xdsLieferscheinLayoutname.SetParentComponent(xdsLieferschein);\r\n xdsLieferscheinLayoutname.Name := 'xdsLieferscheinLayoutname';\r\n xdsLieferscheinLayoutname.FieldName := 'Layoutname';\r\n xdsLieferscheinLayoutname.Size := 50;\r\n xdsLieferscheinGesamtgewicht.SetParentComponent(xdsLieferschein);\r\n xdsLieferscheinGesamtgewicht.Name := 'xdsLieferscheinGesamtgewicht';\r\n xdsLieferscheinGesamtgewicht.FieldName := 'Gesamtgewicht';\r\n xdsLieferscheinBetragZusatzposition.SetParentComponent(xdsLieferschein);\r\n xdsLieferscheinBetragZusatzposition.Name := 'xdsLieferscheinBetragZusatzposition';\r\n xdsLieferscheinBetragZusatzposition.FieldName := 'BetragZusatzposition';\r\n xdsLieferscheinPaketdienst.SetParentComponent(xdsLieferschein);\r\n xdsLieferscheinPaketdienst.Name := 'xdsLieferscheinPaketdienst';\r\n xdsLieferscheinPaketdienst.FieldName := 'Paketdienst';\r\n xdsLieferscheinPaketdienst.Size := 30;\r\n xdsLieferscheinPaketnummer.SetParentComponent(xdsLieferschein);\r\n xdsLieferscheinPaketnummer.Name := 'xdsLieferscheinPaketnummer';\r\n xdsLieferscheinPaketnummer.FieldName := 'Paketnummer';\r\n xdsLieferscheinPaketnummer.Size := 200;\r\n xdsLieferscheinMehrwertsteuersatz4.SetParentComponent(xdsLieferschein);\r\n xdsLieferscheinMehrwertsteuersatz4.Name := 'xdsLieferscheinMehrwertsteuersatz4';\r\n xdsLieferscheinMehrwertsteuersatz4.FieldName := 'Mehrwertsteuersatz4';\r\n xdsLieferscheinMehrwertsteuersatz5.SetParentComponent(xdsLieferschein);\r\n xdsLieferscheinMehrwertsteuersatz5.Name := 'xdsLieferscheinMehrwertsteuersatz5';\r\n xdsLieferscheinMehrwertsteuersatz5.FieldName := 'Mehrwertsteuersatz5';\r\n xdsLieferscheinMehrwertsteuersatz6.SetParentComponent(xdsLieferschein);\r\n xdsLieferscheinMehrwertsteuersatz6.Name := 'xdsLieferscheinMehrwertsteuersatz6';\r\n xdsLieferscheinMehrwertsteuersatz6.FieldName := 'Mehrwertsteuersatz6';\r\n xdsLieferscheinBesteuerungKey.SetParentComponent(xdsLieferschein);\r\n xdsLieferscheinBesteuerungKey.Name := 'xdsLieferscheinBesteuerungKey';\r\n xdsLieferscheinBesteuerungKey.FieldName := 'BesteuerungKey';\r\n xdsLieferscheinVertreterMatchcode.SetParentComponent(xdsLieferschein);\r\n xdsLieferscheinVertreterMatchcode.Name := 'xdsLieferscheinVertreterMatchcode';\r\n xdsLieferscheinVertreterMatchcode.FieldName := 'VertreterMatchcode';\r\n xdsLieferscheinVertreterMatchcode.Size := 50;\r\n xdsLieferscheinVerfasser.SetParentComponent(xdsLieferschein);\r\n xdsLieferscheinVerfasser.Name := 'xdsLieferscheinVerfasser';\r\n xdsLieferscheinVerfasser.FieldName := 'Verfasser';\r\n xdsLieferscheinVerfasser.Size := 10;\r\n xdsLieferscheinLieferadresseID.SetParentComponent(xdsLieferschein);\r\n xdsLieferscheinLieferadresseID.Name := 'xdsLieferscheinLieferadresseID';\r\n xdsLieferscheinLieferadresseID.FieldName := 'LieferadresseID';\r\n xdsLieferscheinBelegvariante.SetParentComponent(xdsLieferschein);\r\n xdsLieferscheinBelegvariante.Name := 'xdsLieferscheinBelegvariante';\r\n xdsLieferscheinBelegvariante.FieldName := 'Belegvariante';\r\n xdsLieferscheinBelegvariante.Size := 25;\r\n xdsLieferscheinBereitstellungDatum.SetParentComponent(xdsLieferschein);\r\n xdsLieferscheinBereitstellungDatum.Name := 'xdsLieferscheinBereitstellungDatum';\r\n xdsLieferscheinBereitstellungDatum.FieldName := 'BereitstellungDatum';\r\n xdsLieferscheinBereitstellungErledigt.SetParentComponent(xdsLieferschein);\r\n xdsLieferscheinBereitstellungErledigt.Name := 'xdsLieferscheinBereitstellungErledigt';\r\n xdsLieferscheinBereitstellungErledigt.FieldName := 'BereitstellungErledigt';\r\n xdsLieferscheinFahrzeugID.SetParentComponent(xdsLieferschein);\r\n xdsLieferscheinFahrzeugID.Name := 'xdsLieferscheinFahrzeugID';\r\n xdsLieferscheinFahrzeugID.FieldName := 'FahrzeugID';\r\n xdsLieferscheinMonatJahr.SetParentComponent(xdsLieferschein);\r\n xdsLieferscheinMonatJahr.Name := 'xdsLieferscheinMonatJahr';\r\n xdsLieferscheinMonatJahr.FieldName := 'MonatJahr';\r\n xdsLieferscheinLieferanschriftDaten.SetParentComponent(xdsLieferschein);\r\n xdsLieferscheinLieferanschriftDaten.Name := 'xdsLieferscheinLieferanschriftDaten';\r\n xdsLieferscheinLieferanschriftDaten.FieldName := 'LieferanschriftDaten';\r\n xdsLieferscheinLieferanschriftDaten.Size := 255;\r\n xdsLieferscheinGesamtVolumen.SetParentComponent(xdsLieferschein);\r\n xdsLieferscheinGesamtVolumen.Name := 'xdsLieferscheinGesamtVolumen';\r\n xdsLieferscheinGesamtVolumen.FieldName := 'GesamtVolumen';\r\n xdsLieferscheinBelegPKey.SetParentComponent(xdsLieferschein);\r\n xdsLieferscheinBelegPKey.Name := 'xdsLieferscheinBelegPKey';\r\n xdsLieferscheinBelegPKey.FieldName := 'BelegPKey';\r\n xdsLieferscheinDruckParameter.SetParentComponent(xdsLieferschein);\r\n xdsLieferscheinDruckParameter.Name := 'xdsLieferscheinDruckParameter';\r\n xdsLieferscheinDruckParameter.FieldName := 'DruckParameter';\r\n xdsLieferscheinDruckParameter.Size := 255;\r\n xdsLieferscheinFakturierungNichtVor.SetParentComponent(xdsLieferschein);\r\n xdsLieferscheinFakturierungNichtVor.Name := 'xdsLieferscheinFakturierungNichtVor';\r\n xdsLieferscheinFakturierungNichtVor.FieldName := 'FakturierungNichtVor';\r\n xdsLieferscheinQuittungSIG.SetParentComponent(xdsLieferschein);\r\n xdsLieferscheinQuittungSIG.Name := 'xdsLieferscheinQuittungSIG';\r\n xdsLieferscheinQuittungSIG.FieldName := 'QuittungSIG';\r\n xdsLieferscheinKundennummerKundennummer.SetParentComponent(xdsLieferschein);\r\n xdsLieferscheinKundennummerKundennummer.Name := 'xdsLieferscheinKundennummerKundennummer';\r\n xdsLieferscheinKundennummerKundennummer.FieldName := 'Kundennummer.Kundennummer';\r\n xdsLieferscheinKundennummerKundennummer.Size := 13;\r\n finally\r\n ResultLabel.AfterLoadDFMValues;\r\n Container1.AfterLoadDFMValues;\r\n Container2.AfterLoadDFMValues;\r\n Container3.AfterLoadDFMValues;\r\n xdsLieferschein.AfterLoadDFMValues;\r\n xdsLieferscheinNummerkomplett.AfterLoadDFMValues;\r\n xdsLieferscheinReferenzAngebot.AfterLoadDFMValues;\r\n xdsLieferscheinReferenzAuftragbest.AfterLoadDFMValues;\r\n xdsLieferscheinReferenzRechnung.AfterLoadDFMValues;\r\n xdsLieferscheinDatum.AfterLoadDFMValues;\r\n xdsLieferscheinJahr.AfterLoadDFMValues;\r\n xdsLieferscheinKalenderwoche.AfterLoadDFMValues;\r\n xdsLieferscheinNachname.AfterLoadDFMValues;\r\n xdsLieferscheinVorname.AfterLoadDFMValues;\r\n xdsLieferscheinPostleitzahl.AfterLoadDFMValues;\r\n xdsLieferscheinOrt.AfterLoadDFMValues;\r\n xdsLieferscheinLaenderkuerzel.AfterLoadDFMValues;\r\n xdsLieferscheinLand.AfterLoadDFMValues;\r\n xdsLieferscheinBriefanrede1.AfterLoadDFMValues;\r\n xdsLieferscheinBriefanrede2.AfterLoadDFMValues;\r\n xdsLieferscheinEMail.AfterLoadDFMValues;\r\n xdsLieferscheinAdresseBild.AfterLoadDFMValues;\r\n xdsLieferscheinLieferanschriftBild.AfterLoadDFMValues;\r\n xdsLieferscheinZahlungsbedingung.AfterLoadDFMValues;\r\n xdsLieferscheinZahlungsbedingungText.AfterLoadDFMValues;\r\n xdsLieferscheinAuftragsbezeichnung.AfterLoadDFMValues;\r\n xdsLieferscheinAuftragnummerKunde.AfterLoadDFMValues;\r\n xdsLieferscheinBestelldatumKunde.AfterLoadDFMValues;\r\n xdsLieferscheinILN.AfterLoadDFMValues;\r\n xdsLieferscheinKopftext.AfterLoadDFMValues;\r\n xdsLieferscheinSchlussbemerkung.AfterLoadDFMValues;\r\n xdsLieferscheinGruss.AfterLoadDFMValues;\r\n xdsLieferscheinMehrwertsteuersatz1.AfterLoadDFMValues;\r\n xdsLieferscheinMehrwertsteuersatz2.AfterLoadDFMValues;\r\n xdsLieferscheinNettosumme01.AfterLoadDFMValues;\r\n xdsLieferscheinNettosumme02.AfterLoadDFMValues;\r\n xdsLieferscheinNettosumme.AfterLoadDFMValues;\r\n xdsLieferscheinMehrwertsteuer01.AfterLoadDFMValues;\r\n xdsLieferscheinMehrwertsteuer02.AfterLoadDFMValues;\r\n xdsLieferscheinMehrwertsteuer.AfterLoadDFMValues;\r\n xdsLieferscheinBruttosumme.AfterLoadDFMValues;\r\n xdsLieferscheinVersanddatum.AfterLoadDFMValues;\r\n xdsLieferscheinSkontosatz.AfterLoadDFMValues;\r\n xdsLieferscheinNettosummeEK.AfterLoadDFMValues;\r\n xdsLieferscheinNettoMarge.AfterLoadDFMValues;\r\n xdsLieferscheinSchreibzeichen.AfterLoadDFMValues;\r\n xdsLieferscheinUnterzeichner.AfterLoadDFMValues;\r\n xdsLieferscheinTelefonMA.AfterLoadDFMValues;\r\n xdsLieferscheinEmailMA.AfterLoadDFMValues;\r\n xdsLieferscheinUSTID.AfterLoadDFMValues;\r\n xdsLieferscheinUmsatzsteuerausweis.AfterLoadDFMValues;\r\n xdsLieferscheingebucht.AfterLoadDFMValues;\r\n xdsLieferscheinLieferdatum.AfterLoadDFMValues;\r\n xdsLieferscheinTransportbedingung.AfterLoadDFMValues;\r\n xdsLieferscheinMehrwertsteuersatz3.AfterLoadDFMValues;\r\n xdsLieferscheinMehrwertsteuer03.AfterLoadDFMValues;\r\n xdsLieferscheinNettosumme03.AfterLoadDFMValues;\r\n xdsLieferscheinRundungsDifferenz.AfterLoadDFMValues;\r\n xdsLieferscheinEmailText.AfterLoadDFMValues;\r\n xdsLieferscheinRabattstufe.AfterLoadDFMValues;\r\n xdsLieferscheinDebitorennummer.AfterLoadDFMValues;\r\n xdsLieferscheinKostentraeger.AfterLoadDFMValues;\r\n xdsLieferscheinRabattsatz.AfterLoadDFMValues;\r\n xdsLieferscheinObjektReferenz.AfterLoadDFMValues;\r\n xdsLieferscheinBank.AfterLoadDFMValues;\r\n xdsLieferscheinBankleitzahl.AfterLoadDFMValues;\r\n xdsLieferscheinKontonummer.AfterLoadDFMValues;\r\n xdsLieferscheinKontoinhaber.AfterLoadDFMValues;\r\n xdsLieferscheinTelefaxnummer.AfterLoadDFMValues;\r\n xdsLieferscheinDatumNeu.AfterLoadDFMValues;\r\n xdsLieferscheinDatumgeaendert.AfterLoadDFMValues;\r\n xdsLieferscheinObjektnummer.AfterLoadDFMValues;\r\n xdsLieferscheinLiefertermin.AfterLoadDFMValues;\r\n xdsLieferscheinEmailversand.AfterLoadDFMValues;\r\n xdsLieferscheinTelefonnummer.AfterLoadDFMValues;\r\n xdsLieferscheinMobilTelefon.AfterLoadDFMValues;\r\n xdsLieferscheinBenutzerNeu.AfterLoadDFMValues;\r\n xdsLieferscheinBenutzerGeaendert.AfterLoadDFMValues;\r\n xdsLieferscheinBerechnungBrutto.AfterLoadDFMValues;\r\n xdsLieferscheinBruttosumme01.AfterLoadDFMValues;\r\n xdsLieferscheinBruttosumme02.AfterLoadDFMValues;\r\n xdsLieferscheinBruttosumme03.AfterLoadDFMValues;\r\n xdsLieferscheinNotiz.AfterLoadDFMValues;\r\n xdsLieferscheinMargeProzent.AfterLoadDFMValues;\r\n xdsLieferscheinBelegsprache.AfterLoadDFMValues;\r\n xdsLieferscheinDuplicate.AfterLoadDFMValues;\r\n xdsLieferscheinAnsprechpartner.AfterLoadDFMValues;\r\n xdsLieferscheinKundennummerFremd.AfterLoadDFMValues;\r\n xdsLieferscheinProtokoll.AfterLoadDFMValues;\r\n xdsLieferscheinVollstaendigFakturiert.AfterLoadDFMValues;\r\n xdsLieferscheinVerleihauftrag.AfterLoadDFMValues;\r\n xdsLieferscheinVerleihVon.AfterLoadDFMValues;\r\n xdsLieferscheinVerleihBis.AfterLoadDFMValues;\r\n xdsLieferscheinRueckgabeschein.AfterLoadDFMValues;\r\n xdsLieferscheinRueckgabeReferenz.AfterLoadDFMValues;\r\n xdsLieferscheingesperrt.AfterLoadDFMValues;\r\n xdsLieferscheinVerleihvonText.AfterLoadDFMValues;\r\n xdsLieferscheinVerleihbisText.AfterLoadDFMValues;\r\n xdsLieferscheinNotizExtern.AfterLoadDFMValues;\r\n xdsLieferscheinDruckWHG.AfterLoadDFMValues;\r\n xdsLieferscheinDruckWHGKurs.AfterLoadDFMValues;\r\n xdsLieferscheinProzentsatzZusatzposition.AfterLoadDFMValues;\r\n xdsLieferscheinTextZusatzposition.AfterLoadDFMValues;\r\n xdsLieferscheinTextzusatzBeschreibung.AfterLoadDFMValues;\r\n xdsLieferscheinExport.AfterLoadDFMValues;\r\n xdsLieferscheinExportbescheinigung.AfterLoadDFMValues;\r\n xdsLieferscheinBestimmungsland.AfterLoadDFMValues;\r\n xdsLieferscheinLayoutname.AfterLoadDFMValues;\r\n xdsLieferscheinGesamtgewicht.AfterLoadDFMValues;\r\n xdsLieferscheinBetragZusatzposition.AfterLoadDFMValues;\r\n xdsLieferscheinPaketdienst.AfterLoadDFMValues;\r\n xdsLieferscheinPaketnummer.AfterLoadDFMValues;\r\n xdsLieferscheinMehrwertsteuersatz4.AfterLoadDFMValues;\r\n xdsLieferscheinMehrwertsteuersatz5.AfterLoadDFMValues;\r\n xdsLieferscheinMehrwertsteuersatz6.AfterLoadDFMValues;\r\n xdsLieferscheinBesteuerungKey.AfterLoadDFMValues;\r\n xdsLieferscheinVertreterMatchcode.AfterLoadDFMValues;\r\n xdsLieferscheinVerfasser.AfterLoadDFMValues;\r\n xdsLieferscheinLieferadresseID.AfterLoadDFMValues;\r\n xdsLieferscheinBelegvariante.AfterLoadDFMValues;\r\n xdsLieferscheinBereitstellungDatum.AfterLoadDFMValues;\r\n xdsLieferscheinBereitstellungErledigt.AfterLoadDFMValues;\r\n xdsLieferscheinFahrzeugID.AfterLoadDFMValues;\r\n xdsLieferscheinMonatJahr.AfterLoadDFMValues;\r\n xdsLieferscheinLieferanschriftDaten.AfterLoadDFMValues;\r\n xdsLieferscheinGesamtVolumen.AfterLoadDFMValues;\r\n xdsLieferscheinBelegPKey.AfterLoadDFMValues;\r\n xdsLieferscheinDruckParameter.AfterLoadDFMValues;\r\n xdsLieferscheinFakturierungNichtVor.AfterLoadDFMValues;\r\n xdsLieferscheinQuittungSIG.AfterLoadDFMValues;\r\n xdsLieferscheinKundennummerKundennummer.AfterLoadDFMValues;\r\n end;\r\nend;\r\n\r\nend.","unit unit_Bestellvormerkung;\r\n\r\ninterface\r\n\r\nuses\r\n System.SysUtils, System.Classes, JS, Web, WEBLib.Graphics, WEBLib.Controls,\r\n WEBLib.Forms, WEBLib.Dialogs, Vcl.Controls, WEBLib.ExtCtrls, Vcl.StdCtrls,\r\n WEBLib.StdCtrls, Data.DB, XData.Web.JsonDataset, XData.Web.Dataset, DB,\r\n WEBLib.Grids, XData.Web.Client, strutils;\r\n\r\ntype\r\n TBestellvormerkung = class(TForm)\r\n Container1: THTMLContainer;\r\n Container2: THTMLContainer;\r\n Container3: THTMLContainer;\r\n btnzurueck: TButton;\r\n ResultLabel: TLabel;\r\n xdsBestellvormerkung: TXDataWebDataSet;\r\n xdsBestellvormerkungID: TStringField;\r\n xdsBestellvormerkungArtikelnummer: TStringField;\r\n xdsBestellvormerkungArtikelueberschrift: TStringField;\r\n xdsBestellvormerkungMenge: TFloatField;\r\n xdsBestellvormerkungLieferantennummer: TStringField;\r\n xdsBestellvormerkungerstellt: TDateTimeField;\r\n xdsBestellvormerkungBelegnummer: TStringField;\r\n xdsBestellvormerkungLieferantenname: TStringField;\r\n TC: TTableControl;\r\n container4: THTMLContainer;\r\n Container5: THTMLContainer;\r\n edtsuchbegriff: TEdit;\r\n btnSuche: TButton;\r\n btnScan: TButton;\r\n xdsArtikel: TXDataWebDataSet;\r\n TCArtikel: TTableControl;\r\n xdsArtikelHersteller: TXDataWebEntityField;\r\n xdsArtikelHerstellerHersteller: TStringField;\r\n xdsArtikelHerstellerHerstellerID: TStringField;\r\n xdsArtikelHerstellerHerstellerURL: TStringField;\r\n xdsArtikelArtderMenge: TXDataWebEntityField;\r\n xdsArtikelArtderMengeArtderMenge: TStringField;\r\n xdsArtikelArtderMengeISO3: TStringField;\r\n xdsArtikelArtderMengeMengenauswahl: TBooleanField;\r\n xdsArtikelArtderMengeVGPauswahl: TBooleanField;\r\n xdsArtikelArtderMengeUVPauswahl: TBooleanField;\r\n xdsArtikelArtderMengeVKPDivisor: TFloatField;\r\n xdsArtikelPfandArt: TXDataWebEntityField;\r\n xdsArtikelPfandArtPfandArt: TStringField;\r\n xdsArtikelPfandArtPfandWert: TFloatField;\r\n xdsArtikelPfandArtPfandwertEK: TFloatField;\r\n xdsArtikelWarengruppe: TXDataWebEntityField;\r\n xdsArtikelWarengruppeWarengruppe: TStringField;\r\n xdsArtikelWarengruppeWGNR: TIntegerField;\r\n xdsArtikelWarenuntergruppe: TXDataWebEntityField;\r\n xdsArtikelWarenuntergruppeWarenuntergruppe: TStringField;\r\n xdsArtikelWarenuntergruppeWarengruppe: TStringField;\r\n xdsArtikelWarenuntergruppeWUGNR: TIntegerField;\r\n xdsArtikelWarenuntergruppeWGNR: TIntegerField;\r\n xdsArtikelArtikelnummer: TStringField;\r\n xdsArtikelArtikelueberschrift: TStringField;\r\n xdsArtikelArtikelbeschreibung: TStringField;\r\n xdsArtikelVerkaufspreis: TFloatField;\r\n xdsArtikelMindestbestand: TFloatField;\r\n xdsArtikelPreisliste: TStringField;\r\n xdsArtikelGewicht: TFloatField;\r\n xdsArtikelLaenge: TFloatField;\r\n xdsArtikelBreite: TFloatField;\r\n xdsArtikelHoehe: TFloatField;\r\n xdsArtikelArtikelZusatz: TStringField;\r\n xdsArtikelLagerort: TStringField;\r\n xdsArtikelBuchungskonto: TIntegerField;\r\n xdsArtikelEingangMenge: TFloatField;\r\n xdsArtikelEingangEndpreis: TFloatField;\r\n xdsArtikelAusgangMenge: TFloatField;\r\n xdsArtikelAusgangEndpreisEK: TFloatField;\r\n xdsArtikelAusgangEndpreisVK: TFloatField;\r\n xdsArtikelBestand: TFloatField;\r\n xdsArtikelBestandswert: TFloatField;\r\n xdsArtikelMarge: TFloatField;\r\n xdsArtikelMargeProzent: TFloatField;\r\n xdsArtikelArtikelnummer2: TStringField;\r\n xdsArtikelArtikelmatchcode: TStringField;\r\n xdsArtikelRabattpreis1: TFloatField;\r\n xdsArtikelRabattpreis2: TFloatField;\r\n xdsArtikelRabattpreis3: TFloatField;\r\n xdsArtikelRabattpreis4: TFloatField;\r\n xdsArtikelRabattpreis5: TFloatField;\r\n xdsArtikelArtikelnichtmehrgueltig: TBooleanField;\r\n xdsArtikelEinkaufspreis: TFloatField;\r\n xdsArtikelAufschlag: TFloatField;\r\n xdsArtikelWarenbestand: TBooleanField;\r\n xdsArtikelTextfrei10: TStringField;\r\n xdsArtikelTextfrei20: TStringField;\r\n xdsArtikelArtikelbeschreibungRTF: TStringField;\r\n xdsArtikelArtikeldatei1: TStringField;\r\n xdsArtikelArtikeldatei2: TStringField;\r\n xdsArtikelArtikeldatei3: TStringField;\r\n xdsArtikelArtikeldatei4: TStringField;\r\n xdsArtikelArtikeldatei5: TStringField;\r\n xdsArtikelEinkaufspreisVom: TDateTimeField;\r\n xdsArtikelEAN: TStringField;\r\n xdsArtikelVGPFaktor: TFloatField;\r\n xdsArtikelVGPMengenart: TStringField;\r\n xdsArtikelVerleihpreis: TFloatField;\r\n xdsArtikelZusatzPreis: TFloatField;\r\n xdsArtikelVerpackungsart: TStringField;\r\n xdsArtikelVerpackungsMenge: TFloatField;\r\n xdsArtikelQuellartikel: TStringField;\r\n xdsArtikelrabattierfaehig: TBooleanField;\r\n xdsArtikelAngebotAlternativeAN: TStringField;\r\n xdsArtikelPreisanteilNetto: TFloatField;\r\n xdsArtikelFarbe: TIntegerField;\r\n xdsArtikelAEinkauf: TBooleanField;\r\n xdsArtikelAVerkauf: TBooleanField;\r\n xdsArtikelArtikelnummerLieferant: TStringField;\r\n xdsArtikelLieferantnummer: TStringField;\r\n xdsArtikelVerkaufspreisBrutto: TFloatField;\r\n xdsArtikelArtikelSet: TBooleanField;\r\n xdsArtikelProvisionssatz: TFloatField;\r\n xdsArtikelWarentarifnummer: TStringField;\r\n xdsArtikelHandelsartikel: TBooleanField;\r\n xdsArtikelUrsprungsland: TStringField;\r\n xdsArtikelKategorie: TStringField;\r\n xdsArtikelStandardRabattsatzEK: TFloatField;\r\n xdsArtikelStandardRabattsatzVK: TFloatField;\r\n xdsArtikelRabattpreiseManuell: TBooleanField;\r\n xdsArtikelMengeBestellt: TFloatField;\r\n xdsArtikelMengeBeauftragt: TFloatField;\r\n xdsArtikelBestandDisponiert: TFloatField;\r\n xdsArtikelMengeAngeboten: TFloatField;\r\n xdsArtikelBestandDispInclAngebot: TFloatField;\r\n xdsArtikelMWStKey: TIntegerField;\r\n xdsArtikelShopAmazon: TBooleanField;\r\n xdsArtikelShopQuelle: TBooleanField;\r\n xdsArtikelGeraet: TBooleanField;\r\n xdsArtikelArtgewicht: TFloatField;\r\n xdsArtikelVolumen: TFloatField;\r\n xdsArtikelPacklisteNichtAnzeigen: TBooleanField;\r\n xdsArtikelKeineAufschlagskalkulation: TBooleanField;\r\n xdsArtikelKorrekturMenge: TFloatField;\r\n xdsArtikelKorrekturWert: TFloatField;\r\n xdsArtikelNachfolgeartikel: TStringField;\r\n xdsArtikelMindestbestellmenge: TFloatField;\r\n xdsArtikelSchnittEK: TFloatField;\r\n xdsArtikelVerkaufspreisVom: TDateTimeField;\r\n xdsArtikelPruefungChargeSNR: TIntegerField;\r\n xdsArtikelArtikelbeschreibungHTML: TStringField;\r\n xdsArtikelProduktKurzbeschreibungHTML: TStringField;\r\n xdsArtikelStatusFuerShop: TStringField;\r\n xdsArtikelAmpelFuerShop: TStringField;\r\n xdsArtikelEXP_Anzahl: TFloatField;\r\n xdsArtikelEXP_Inhalt: TFloatField;\r\n xdsArtikelEXP_Faktor: TFloatField;\r\n xdsArtikelFach: TStringField;\r\n xdsArtikelExportKasse: TIntegerField;\r\n xdsArtikelWKNR: TIntegerField;\r\n xdsArtikelArtikelAttribute: TStringField;\r\n xdsArtikelErstelltAm: TDateTimeField;\r\n xdsArtikelVarianteVonAN: TStringField;\r\n xdsArtikelGurtmassWerte: TStringField;\r\n xdsArtikelGurtmass: TFloatField;\r\n xdsArtikelAltersgrenze: TIntegerField;\r\n xdsArtikelMWStKeyImHaus: TIntegerField;\r\n xdsArtikelKasseBewegung: TFloatField;\r\n xdsArtikelKasseBewegungEK: TFloatField;\r\n xdsArtikelKasseBewegungVK: TFloatField;\r\n xdsArtikelProduktionBewegung: TFloatField;\r\n xdsArtikelProduktionBewegungEK: TFloatField;\r\n xdsArtikelProduktionBewegungVK: TFloatField;\r\n xdsArtikelWaWiAB: TIntegerField;\r\n xdsArtikelGeaendertAm: TDateTimeField;\r\n xdsArtikelGefahrgutKennzeichen: TStringField;\r\n xdsArtikelVerpackG: TBooleanField;\r\n xdsArtikelUPE: TFloatField;\r\n xdsArtikelArtikelbeschreibungEinkauf: TStringField;\r\n xdsArtikelHerstellerArtikelnummer: TStringField;\r\n xdsArtikelNatura: TStringField;\r\n xdsArtikelArbeitszeit: TBooleanField;\r\n xdsArtikelPKey: TIntegerField;\r\n xdsArtikelVersandklasse: TStringField;\r\n edtBMenge: TEdit;\r\n btnSpeichern: TButton;\r\n WClient: TXDataWebClient;\r\n btnEtikettendruck: TButton;\r\n procedure WebFormShow(Sender: TObject);\r\n procedure xdsBestellvormerkungAfterOpen(DataSet: TDataSet);\r\n procedure btnzurueckClick(Sender: TObject);\r\n procedure btnSucheClick(Sender: TObject);\r\n procedure xdsArtikelAfterOpen(DataSet: TDataSet);\r\n procedure edtsuchbegriffKeyPress(Sender: TObject; var Key: Char);\r\n procedure btnScanClick(Sender: TObject);\r\n procedure edtBMengeKeyPress(Sender: TObject; var Key: Char);\r\n procedure btnSpeichernClick(Sender: TObject);\r\n procedure btnEtikettendruckClick(Sender: TObject);\r\n private\r\n { Private-Deklarationen }\r\n public\r\n { Public-Deklarationen }\r\n protected procedure LoadDFMValues; override; end;\r\n\r\nvar\r\n Bestellvormerkung: TBestellvormerkung;\r\n\r\nimplementation\r\n uses unit1, unit2, unit_BarcodeScan;\r\n{$R *.dfm}\r\n\r\nprocedure TBestellvormerkung.btnEtikettendruckClick(Sender: TObject);\r\n procedure OnResponse(Response:TXDataClientResponse);\r\n var\r\n ergebnis:string;\r\n begin\r\n ergebnis:=string(TJSObject(response.Result)['value']);\r\n if ergebnis='WRONG' then\r\n begin\r\n showmessage('Druckvormerkung für Etiketten konnte leider nicht durchgeführt werden');\r\n end\r\n else\r\n begin\r\n if ergebnis='OK' then\r\n begin\r\n showmessage('Etikettendruck wurde vorgemerkt');\r\n end\r\n else\r\n begin\r\n if ergebnis='Bereits vorhanden' then showmessage('Dieser Eintrag war bereits vorhanden');\r\n\r\n end;\r\n end;\r\n end;\r\nbegin\r\n if LizenzOK then\r\n begin\r\n WClient.RawInvoke('IServerService.ArtikelEtikettenDruck',[xdsartikelartikelnummer.asstring],@OnResponse);\r\n end\r\n else\r\n begin\r\n showmessage('Für das Speichern von Daten sind Sie noch nicht freigeschaltet, bitte erwerben Sie eine Lizenz');\r\n end;\r\n\r\n\r\nend;\r\n\r\nprocedure TBestellvormerkung.btnScanClick(Sender: TObject);\r\nvar\r\n LFrm:TBarcodeScan;\r\n procedure AfterCreate(AForm:TObject);\r\n var\r\n LForm:TBarcodeScan;\r\n begin\r\n LForm:=(AForm as TBarcodeScan);\r\n //lform.mykundehint:=xdsEinzelkontaktKundennummer.AsString+' '+xdsEinzelkontaktNachname.AsString+', '+xdsEinzelkontaktVorname.asstring;\r\n //lForm.edttoaddress.Text:= xdsEinzelkontaktPostleitzahl.AsString+' '+xdsEinzelkontaktort.AsString+', '+xdsEinzelkontaktStrasse.AsString;\r\n\r\n end;\r\n\r\n procedure AfterShowmodal(Avalue:TModalResult);\r\n begin\r\n edtsuchbegriff.text:=trim(lfrm.ScanErgebnis);\r\n btnsucheclick(sender);\r\n end;\r\n begin\r\n if LizenzOK then\r\n begin\r\n LFrm:=TBarcodeScan.CreateNew(@AfterCreate);\r\n LFrm.ShowModal(@AfterShowmodal);\r\n end\r\n else\r\n begin\r\n showmessage('Für diese Funktion sind Sie noch nicht freigeschaltet, bitte erwerben Sie eine Lizenz');\r\n end;\r\n\r\nend;\r\n\r\nprocedure TBestellvormerkung.btnSpeichernClick(Sender: TObject);\r\n procedure OnResponse(Response:TXDataClientResponse);\r\n var\r\n ergebnis:string;\r\n begin\r\n ergebnis:=string(TJSObject(response.Result)['value']);\r\n if ergebnis='WRONG' then\r\n begin\r\n showmessage('Bestellvormerkung konnte leider nicht durchgeführt werden');\r\n end\r\n else\r\n begin\r\n ResultLabel.HTML:='Bestellvormerkung erfolgreich '+xdsArtikelArtikelnummer.AsString+' | '+edtBMenge.text;\r\n edtBMenge.Text:='';\r\n edtsuchbegriff.Text:='';\r\n edtsuchbegriff.SetFocus;\r\n xdsartikel.Close;\r\n tcartikel.Visible:=false;\r\n xdsBestellvormerkung.Close;\r\n xdsbestellvormerkung.Load;\r\n end;\r\n end;\r\n var\r\n rawArtikelnummer:string;\r\n rawArtikelueberschrift:string;\r\nbegin\r\n if edtBMenge.Text='' then\r\n begin\r\n showmessage('Bestellmenge muß angegeben werden');\r\n end\r\n else\r\n begin\r\n if LizenzOK then\r\n begin\r\n rawArtikelnummer:= xdsartikelartikelnummer.asstring;\r\n rawArtikelueberschrift:= xdsartikelartikelueberschrift.asstring;\r\n WClient.RawInvoke('IServerService.ArtikelBestellvormerkung',[rawArtikelnummer,edtBMenge.text,rawArtikelueberschrift,BenutzerLoginName],@OnResponse);\r\n end\r\n else\r\n begin\r\n showmessage('Für das Speichern von Daten sind Sie noch nicht freigeschaltet, bitte erwerben Sie eine Lizenz');\r\n end;\r\n\r\n end;\r\n\r\nend;\r\n\r\nprocedure TBestellvormerkung.btnSucheClick(Sender: TObject);\r\nvar\r\n mysuchbegriff:string;\r\nbegin\r\n mysuchbegriff:=trim(edtsuchbegriff.Text);\r\n\r\n xdsartikel.Close;\r\n if length(mysuchbegriff)>0 then\r\n begin\r\n xdsartikel.QueryString:='$expand=ArtderMenge&$filter=(Artikelnummer eq '+quotedstr(mysuchbegriff)+') OR (EAN eq '+quotedstr(mysuchbegriff)+')';\r\n xdsartikel.Load;\r\n end;\r\nend;\r\n\r\nprocedure TBestellvormerkung.btnzurueckClick(Sender: TObject);\r\nbegin\r\n xdsBestellvormerkung.Close;\r\n self.Close;\r\nend;\r\n\r\nprocedure TBestellvormerkung.edtBMengeKeyPress(Sender: TObject; var Key: Char);\r\nbegin\r\n if key=#13 then btnSpeichernClick(sender);\r\nend;\r\n\r\nprocedure TBestellvormerkung.edtsuchbegriffKeyPress(Sender: TObject;\r\n var Key: Char);\r\nbegin\r\n if key=#13 then btnSucheClick(sender);\r\nend;\r\n\r\nprocedure TBestellvormerkung.WebFormShow(Sender: TObject);\r\nvar\r\n myelement:TJSHTMLElement;\r\nbegin\r\n Container1.html.text:='';\r\n myelement:=container1.ElementHandle;\r\n btnzurueck.ParentElement:=myelement;\r\n btnscan.ParentElement:=myelement;\r\n resultlabel.ParentElement:=myelement;\r\n resultlabel.HTML:='..';\r\n edtBMenge.Visible:=false;\r\n btnSpeichern.Visible:=false;\r\n btnEtikettendruck.Visible:=false;\r\n container2.ParentElement:=myelement;\r\n\r\n container3.parentelement:=myelement;\r\n container4.parentelement:=myelement;\r\n container5.parentelement:=myelement;\r\n\r\n\r\n myelement:=container3.ElementHandle;\r\n edtsuchbegriff.ParentElement:=myelement;\r\n btnsuche.ParentElement:=myelement;\r\n\r\n myelement:=container4.ElementHandle;\r\n tcartikel.ParentElement:=myelement;\r\n tcartikel.Visible:=false;\r\n myelement:=container5.ElementHandle;\r\n tc.ParentElement:=myelement;\r\n edtsuchbegriff.SetFocus;\r\n xdsBestellvormerkung.Load;\r\nend;\r\n\r\nprocedure TBestellvormerkung.xdsArtikelAfterOpen(DataSet: TDataSet);\r\nvar\r\n myelement:TJSHTMLElement;\r\nbegin\r\n if xdsartikel.RecordCount=1 then\r\n begin\r\n tcartikel.Visible:=true;\r\n tcartikel.ColCount:=2;\r\n tcartikel.RowCount:=15;\r\n tcartikel.Cells[0,0]:='Bestellvormerkung';\r\n tcartikel.Cells[0,1]:='Artikelnummer';\r\n tcartikel.Cells[0,2]:='EAN/ISIN';\r\n tcartikel.Cells[0,3]:='Artikelüberschrift';\r\n tcartikel.Cells[0,4]:='Artikelbeschreibung';\r\n tcartikel.Cells[0,5]:='Art der Menge';\r\n tcartikel.Cells[0,6]:='Verkaufspreis';\r\n tcartikel.Cells[0,7]:='Verkaufspreis Brutto';\r\n tcartikel.Cells[0,8]:='Verpackungsart';\r\n tcartikel.Cells[0,9]:='Verpackungsmenge';\r\n tcartikel.Cells[0,10]:='Bestand';\r\n tcartikel.Cells[0,11]:='Bestand disponiert';\r\n tcartikel.Cells[0,12]:='Bestellmenge vormerken';\r\n myelement:=tcartikel.CellElements[0,13];\r\n btnEtikettendruck.ParentElement:=myelement;\r\n btnEtikettendruck.Visible:=true;\r\n tcartikel.Cells[1,1]:=xdsartikel.fieldbyname('Artikelnummer').asstring;\r\n tcartikel.Cells[1,2]:=xdsartikel.fieldbyname('EAN').asstring;\r\n tcartikel.Cells[1,3]:=xdsartikel.fieldbyname('Artikelueberschrift').asstring;\r\n tcartikel.Cells[1,4]:=ReplaceStr(xdsartikel.FieldByName('Artikelbeschreibung').asstring,#13+#10,'
');\r\n tcartikel.Cells[1,5]:=xdsArtikelArtderMengeArtderMenge.asstring;\r\n tcartikel.Cells[1,6]:='
'+formatfloat('#,##0.00',xdsArtikelVerkaufspreis.asfloat);\r\n tcartikel.Cells[1,7]:='
'+formatfloat('#,##0.00',xdsArtikelVerkaufspreisBrutto.asfloat);\r\n tcartikel.Cells[1,8]:=xdsArtikelVerpackungsart.asstring;\r\n tcartikel.Cells[1,9]:=xdsArtikelVerpackungsMenge.asstring;\r\n tcartikel.Cells[1,10]:=xdsArtikelBestand.asstring;\r\n tcartikel.Cells[1,11]:=xdsArtikelBestandDisponiert.asstring;\r\n myelement:=tcartikel.CellElements[1,12];\r\n edtBMenge.ParentElement:=myelement;\r\n edtBMenge.Visible:=true;\r\n myelement:=tcartikel.CellElements[1,13];\r\n btnSpeichern.ParentElement:=myelement;\r\n btnSpeichern.Visible:=true;\r\n edtBMenge.SetFocus;\r\n end\r\n else\r\n begin\r\n ResultLabel.HTML:='Artikel nicht gefunden oder mehrfach vorhanden';\r\n edtsuchbegriff.Text:='';\r\n edtsuchbegriff.SetFocus;\r\n end;\r\n\r\nend;\r\n\r\nprocedure TBestellvormerkung.xdsBestellvormerkungAfterOpen(DataSet: TDataSet);\r\nvar\r\n i:integer;\r\nbegin\r\n tc.Visible:=true;\r\n tc.RowCount:=xdsBestellvormerkung.RecordCount+1;\r\n tc.ColCount:=3;\r\n tc.Cells[0,0]:='Erstellt';\r\n tc.Cells[1,0]:='Artikel';\r\n tc.Cells[2,0]:='Menge';\r\n xdsBestellvormerkung.First;\r\n while not xdsbestellvormerkung.eof do\r\n begin\r\n i:=xdsBestellvormerkung.RecNo;\r\n TC.Cells[0,i]:=formatdatetime('DD.MM.YYYY',xdsBestellvormerkung.fieldbyname('erstellt').asdatetime);\r\n TC.Cells[1,i]:=xdsBestellvormerkung.fieldbyname('Artikelnummer').asstring+'
'+xdsBestellvormerkung.fieldbyname('Artikelueberschrift').asstring;\r\n TC.Cells[2,i]:=xdsBestellvormerkung.fieldbyname('Menge').asstring;\r\n\r\n xdsbestellvormerkung.Next;\r\n end;\r\n\r\nend;\r\n\r\nprocedure TBestellvormerkung.LoadDFMValues;\r\nbegin\r\n inherited LoadDFMValues;\r\n\r\n ResultLabel := TLabel.Create(Self);\r\n Container1 := THTMLContainer.Create(Self);\r\n Container2 := THTMLContainer.Create(Self);\r\n Container3 := THTMLContainer.Create(Self);\r\n btnzurueck := TButton.Create(Self);\r\n TC := TTableControl.Create(Self);\r\n container4 := THTMLContainer.Create(Self);\r\n Container5 := THTMLContainer.Create(Self);\r\n edtsuchbegriff := TEdit.Create(Self);\r\n btnSuche := TButton.Create(Self);\r\n btnScan := TButton.Create(Self);\r\n TCArtikel := TTableControl.Create(Self);\r\n edtBMenge := TEdit.Create(Self);\r\n btnSpeichern := TButton.Create(Self);\r\n btnEtikettendruck := TButton.Create(Self);\r\n xdsBestellvormerkung := TXDataWebDataSet.Create(Self);\r\n xdsBestellvormerkungID := TStringField.Create(Self);\r\n xdsBestellvormerkungArtikelnummer := TStringField.Create(Self);\r\n xdsBestellvormerkungArtikelueberschrift := TStringField.Create(Self);\r\n xdsBestellvormerkungMenge := TFloatField.Create(Self);\r\n xdsBestellvormerkungLieferantennummer := TStringField.Create(Self);\r\n xdsBestellvormerkungerstellt := TDateTimeField.Create(Self);\r\n xdsBestellvormerkungBelegnummer := TStringField.Create(Self);\r\n xdsBestellvormerkungLieferantenname := TStringField.Create(Self);\r\n xdsArtikel := TXDataWebDataSet.Create(Self);\r\n xdsArtikelHersteller := TXDataWebEntityField.Create(Self);\r\n xdsArtikelHerstellerHersteller := TStringField.Create(Self);\r\n xdsArtikelHerstellerHerstellerID := TStringField.Create(Self);\r\n xdsArtikelHerstellerHerstellerURL := TStringField.Create(Self);\r\n xdsArtikelArtderMenge := TXDataWebEntityField.Create(Self);\r\n xdsArtikelArtderMengeArtderMenge := TStringField.Create(Self);\r\n xdsArtikelArtderMengeISO3 := TStringField.Create(Self);\r\n xdsArtikelArtderMengeMengenauswahl := TBooleanField.Create(Self);\r\n xdsArtikelArtderMengeVGPauswahl := TBooleanField.Create(Self);\r\n xdsArtikelArtderMengeUVPauswahl := TBooleanField.Create(Self);\r\n xdsArtikelArtderMengeVKPDivisor := TFloatField.Create(Self);\r\n xdsArtikelPfandArt := TXDataWebEntityField.Create(Self);\r\n xdsArtikelPfandArtPfandArt := TStringField.Create(Self);\r\n xdsArtikelPfandArtPfandWert := TFloatField.Create(Self);\r\n xdsArtikelPfandArtPfandwertEK := TFloatField.Create(Self);\r\n xdsArtikelWarengruppe := TXDataWebEntityField.Create(Self);\r\n xdsArtikelWarengruppeWarengruppe := TStringField.Create(Self);\r\n xdsArtikelWarengruppeWGNR := TIntegerField.Create(Self);\r\n xdsArtikelWarenuntergruppe := TXDataWebEntityField.Create(Self);\r\n xdsArtikelWarenuntergruppeWarenuntergruppe := TStringField.Create(Self);\r\n xdsArtikelWarenuntergruppeWarengruppe := TStringField.Create(Self);\r\n xdsArtikelWarenuntergruppeWUGNR := TIntegerField.Create(Self);\r\n xdsArtikelWarenuntergruppeWGNR := TIntegerField.Create(Self);\r\n xdsArtikelArtikelnummer := TStringField.Create(Self);\r\n xdsArtikelArtikelueberschrift := TStringField.Create(Self);\r\n xdsArtikelArtikelbeschreibung := TStringField.Create(Self);\r\n xdsArtikelVerkaufspreis := TFloatField.Create(Self);\r\n xdsArtikelMindestbestand := TFloatField.Create(Self);\r\n xdsArtikelPreisliste := TStringField.Create(Self);\r\n xdsArtikelGewicht := TFloatField.Create(Self);\r\n xdsArtikelLaenge := TFloatField.Create(Self);\r\n xdsArtikelBreite := TFloatField.Create(Self);\r\n xdsArtikelHoehe := TFloatField.Create(Self);\r\n xdsArtikelArtikelZusatz := TStringField.Create(Self);\r\n xdsArtikelLagerort := TStringField.Create(Self);\r\n xdsArtikelBuchungskonto := TIntegerField.Create(Self);\r\n xdsArtikelEingangMenge := TFloatField.Create(Self);\r\n xdsArtikelEingangEndpreis := TFloatField.Create(Self);\r\n xdsArtikelAusgangMenge := TFloatField.Create(Self);\r\n xdsArtikelAusgangEndpreisEK := TFloatField.Create(Self);\r\n xdsArtikelAusgangEndpreisVK := TFloatField.Create(Self);\r\n xdsArtikelBestand := TFloatField.Create(Self);\r\n xdsArtikelBestandswert := TFloatField.Create(Self);\r\n xdsArtikelMarge := TFloatField.Create(Self);\r\n xdsArtikelMargeProzent := TFloatField.Create(Self);\r\n xdsArtikelArtikelnummer2 := TStringField.Create(Self);\r\n xdsArtikelArtikelmatchcode := TStringField.Create(Self);\r\n xdsArtikelRabattpreis1 := TFloatField.Create(Self);\r\n xdsArtikelRabattpreis2 := TFloatField.Create(Self);\r\n xdsArtikelRabattpreis3 := TFloatField.Create(Self);\r\n xdsArtikelRabattpreis4 := TFloatField.Create(Self);\r\n xdsArtikelRabattpreis5 := TFloatField.Create(Self);\r\n xdsArtikelArtikelnichtmehrgueltig := TBooleanField.Create(Self);\r\n xdsArtikelEinkaufspreis := TFloatField.Create(Self);\r\n xdsArtikelAufschlag := TFloatField.Create(Self);\r\n xdsArtikelWarenbestand := TBooleanField.Create(Self);\r\n xdsArtikelTextfrei10 := TStringField.Create(Self);\r\n xdsArtikelTextfrei20 := TStringField.Create(Self);\r\n xdsArtikelArtikelbeschreibungRTF := TStringField.Create(Self);\r\n xdsArtikelArtikeldatei1 := TStringField.Create(Self);\r\n xdsArtikelArtikeldatei2 := TStringField.Create(Self);\r\n xdsArtikelArtikeldatei3 := TStringField.Create(Self);\r\n xdsArtikelArtikeldatei4 := TStringField.Create(Self);\r\n xdsArtikelArtikeldatei5 := TStringField.Create(Self);\r\n xdsArtikelEinkaufspreisVom := TDateTimeField.Create(Self);\r\n xdsArtikelEAN := TStringField.Create(Self);\r\n xdsArtikelVGPFaktor := TFloatField.Create(Self);\r\n xdsArtikelVGPMengenart := TStringField.Create(Self);\r\n xdsArtikelVerleihpreis := TFloatField.Create(Self);\r\n xdsArtikelZusatzPreis := TFloatField.Create(Self);\r\n xdsArtikelVerpackungsart := TStringField.Create(Self);\r\n xdsArtikelVerpackungsMenge := TFloatField.Create(Self);\r\n xdsArtikelQuellartikel := TStringField.Create(Self);\r\n xdsArtikelrabattierfaehig := TBooleanField.Create(Self);\r\n xdsArtikelAngebotAlternativeAN := TStringField.Create(Self);\r\n xdsArtikelPreisanteilNetto := TFloatField.Create(Self);\r\n xdsArtikelFarbe := TIntegerField.Create(Self);\r\n xdsArtikelAEinkauf := TBooleanField.Create(Self);\r\n xdsArtikelAVerkauf := TBooleanField.Create(Self);\r\n xdsArtikelArtikelnummerLieferant := TStringField.Create(Self);\r\n xdsArtikelLieferantnummer := TStringField.Create(Self);\r\n xdsArtikelVerkaufspreisBrutto := TFloatField.Create(Self);\r\n xdsArtikelArtikelSet := TBooleanField.Create(Self);\r\n xdsArtikelProvisionssatz := TFloatField.Create(Self);\r\n xdsArtikelWarentarifnummer := TStringField.Create(Self);\r\n xdsArtikelHandelsartikel := TBooleanField.Create(Self);\r\n xdsArtikelUrsprungsland := TStringField.Create(Self);\r\n xdsArtikelKategorie := TStringField.Create(Self);\r\n xdsArtikelStandardRabattsatzEK := TFloatField.Create(Self);\r\n xdsArtikelStandardRabattsatzVK := TFloatField.Create(Self);\r\n xdsArtikelRabattpreiseManuell := TBooleanField.Create(Self);\r\n xdsArtikelMengeBestellt := TFloatField.Create(Self);\r\n xdsArtikelMengeBeauftragt := TFloatField.Create(Self);\r\n xdsArtikelBestandDisponiert := TFloatField.Create(Self);\r\n xdsArtikelMengeAngeboten := TFloatField.Create(Self);\r\n xdsArtikelBestandDispInclAngebot := TFloatField.Create(Self);\r\n xdsArtikelMWStKey := TIntegerField.Create(Self);\r\n xdsArtikelShopAmazon := TBooleanField.Create(Self);\r\n xdsArtikelShopQuelle := TBooleanField.Create(Self);\r\n xdsArtikelGeraet := TBooleanField.Create(Self);\r\n xdsArtikelArtgewicht := TFloatField.Create(Self);\r\n xdsArtikelVolumen := TFloatField.Create(Self);\r\n xdsArtikelPacklisteNichtAnzeigen := TBooleanField.Create(Self);\r\n xdsArtikelKeineAufschlagskalkulation := TBooleanField.Create(Self);\r\n xdsArtikelKorrekturMenge := TFloatField.Create(Self);\r\n xdsArtikelKorrekturWert := TFloatField.Create(Self);\r\n xdsArtikelNachfolgeartikel := TStringField.Create(Self);\r\n xdsArtikelMindestbestellmenge := TFloatField.Create(Self);\r\n xdsArtikelSchnittEK := TFloatField.Create(Self);\r\n xdsArtikelVerkaufspreisVom := TDateTimeField.Create(Self);\r\n xdsArtikelPruefungChargeSNR := TIntegerField.Create(Self);\r\n xdsArtikelArtikelbeschreibungHTML := TStringField.Create(Self);\r\n xdsArtikelProduktKurzbeschreibungHTML := TStringField.Create(Self);\r\n xdsArtikelStatusFuerShop := TStringField.Create(Self);\r\n xdsArtikelAmpelFuerShop := TStringField.Create(Self);\r\n xdsArtikelEXP_Anzahl := TFloatField.Create(Self);\r\n xdsArtikelEXP_Inhalt := TFloatField.Create(Self);\r\n xdsArtikelEXP_Faktor := TFloatField.Create(Self);\r\n xdsArtikelFach := TStringField.Create(Self);\r\n xdsArtikelExportKasse := TIntegerField.Create(Self);\r\n xdsArtikelWKNR := TIntegerField.Create(Self);\r\n xdsArtikelArtikelAttribute := TStringField.Create(Self);\r\n xdsArtikelErstelltAm := TDateTimeField.Create(Self);\r\n xdsArtikelVarianteVonAN := TStringField.Create(Self);\r\n xdsArtikelGurtmassWerte := TStringField.Create(Self);\r\n xdsArtikelGurtmass := TFloatField.Create(Self);\r\n xdsArtikelAltersgrenze := TIntegerField.Create(Self);\r\n xdsArtikelMWStKeyImHaus := TIntegerField.Create(Self);\r\n xdsArtikelKasseBewegung := TFloatField.Create(Self);\r\n xdsArtikelKasseBewegungEK := TFloatField.Create(Self);\r\n xdsArtikelKasseBewegungVK := TFloatField.Create(Self);\r\n xdsArtikelProduktionBewegung := TFloatField.Create(Self);\r\n xdsArtikelProduktionBewegungEK := TFloatField.Create(Self);\r\n xdsArtikelProduktionBewegungVK := TFloatField.Create(Self);\r\n xdsArtikelWaWiAB := TIntegerField.Create(Self);\r\n xdsArtikelGeaendertAm := TDateTimeField.Create(Self);\r\n xdsArtikelGefahrgutKennzeichen := TStringField.Create(Self);\r\n xdsArtikelVerpackG := TBooleanField.Create(Self);\r\n xdsArtikelUPE := TFloatField.Create(Self);\r\n xdsArtikelArtikelbeschreibungEinkauf := TStringField.Create(Self);\r\n xdsArtikelHerstellerArtikelnummer := TStringField.Create(Self);\r\n xdsArtikelNatura := TStringField.Create(Self);\r\n xdsArtikelArbeitszeit := TBooleanField.Create(Self);\r\n xdsArtikelPKey := TIntegerField.Create(Self);\r\n xdsArtikelVersandklasse := TStringField.Create(Self);\r\n WClient := TXDataWebClient.Create(Self);\r\n\r\n ResultLabel.BeforeLoadDFMValues;\r\n Container1.BeforeLoadDFMValues;\r\n Container2.BeforeLoadDFMValues;\r\n Container3.BeforeLoadDFMValues;\r\n btnzurueck.BeforeLoadDFMValues;\r\n TC.BeforeLoadDFMValues;\r\n container4.BeforeLoadDFMValues;\r\n Container5.BeforeLoadDFMValues;\r\n edtsuchbegriff.BeforeLoadDFMValues;\r\n btnSuche.BeforeLoadDFMValues;\r\n btnScan.BeforeLoadDFMValues;\r\n TCArtikel.BeforeLoadDFMValues;\r\n edtBMenge.BeforeLoadDFMValues;\r\n btnSpeichern.BeforeLoadDFMValues;\r\n btnEtikettendruck.BeforeLoadDFMValues;\r\n xdsBestellvormerkung.BeforeLoadDFMValues;\r\n xdsBestellvormerkungID.BeforeLoadDFMValues;\r\n xdsBestellvormerkungArtikelnummer.BeforeLoadDFMValues;\r\n xdsBestellvormerkungArtikelueberschrift.BeforeLoadDFMValues;\r\n xdsBestellvormerkungMenge.BeforeLoadDFMValues;\r\n xdsBestellvormerkungLieferantennummer.BeforeLoadDFMValues;\r\n xdsBestellvormerkungerstellt.BeforeLoadDFMValues;\r\n xdsBestellvormerkungBelegnummer.BeforeLoadDFMValues;\r\n xdsBestellvormerkungLieferantenname.BeforeLoadDFMValues;\r\n xdsArtikel.BeforeLoadDFMValues;\r\n xdsArtikelHersteller.BeforeLoadDFMValues;\r\n xdsArtikelHerstellerHersteller.BeforeLoadDFMValues;\r\n xdsArtikelHerstellerHerstellerID.BeforeLoadDFMValues;\r\n xdsArtikelHerstellerHerstellerURL.BeforeLoadDFMValues;\r\n xdsArtikelArtderMenge.BeforeLoadDFMValues;\r\n xdsArtikelArtderMengeArtderMenge.BeforeLoadDFMValues;\r\n xdsArtikelArtderMengeISO3.BeforeLoadDFMValues;\r\n xdsArtikelArtderMengeMengenauswahl.BeforeLoadDFMValues;\r\n xdsArtikelArtderMengeVGPauswahl.BeforeLoadDFMValues;\r\n xdsArtikelArtderMengeUVPauswahl.BeforeLoadDFMValues;\r\n xdsArtikelArtderMengeVKPDivisor.BeforeLoadDFMValues;\r\n xdsArtikelPfandArt.BeforeLoadDFMValues;\r\n xdsArtikelPfandArtPfandArt.BeforeLoadDFMValues;\r\n xdsArtikelPfandArtPfandWert.BeforeLoadDFMValues;\r\n xdsArtikelPfandArtPfandwertEK.BeforeLoadDFMValues;\r\n xdsArtikelWarengruppe.BeforeLoadDFMValues;\r\n xdsArtikelWarengruppeWarengruppe.BeforeLoadDFMValues;\r\n xdsArtikelWarengruppeWGNR.BeforeLoadDFMValues;\r\n xdsArtikelWarenuntergruppe.BeforeLoadDFMValues;\r\n xdsArtikelWarenuntergruppeWarenuntergruppe.BeforeLoadDFMValues;\r\n xdsArtikelWarenuntergruppeWarengruppe.BeforeLoadDFMValues;\r\n xdsArtikelWarenuntergruppeWUGNR.BeforeLoadDFMValues;\r\n xdsArtikelWarenuntergruppeWGNR.BeforeLoadDFMValues;\r\n xdsArtikelArtikelnummer.BeforeLoadDFMValues;\r\n xdsArtikelArtikelueberschrift.BeforeLoadDFMValues;\r\n xdsArtikelArtikelbeschreibung.BeforeLoadDFMValues;\r\n xdsArtikelVerkaufspreis.BeforeLoadDFMValues;\r\n xdsArtikelMindestbestand.BeforeLoadDFMValues;\r\n xdsArtikelPreisliste.BeforeLoadDFMValues;\r\n xdsArtikelGewicht.BeforeLoadDFMValues;\r\n xdsArtikelLaenge.BeforeLoadDFMValues;\r\n xdsArtikelBreite.BeforeLoadDFMValues;\r\n xdsArtikelHoehe.BeforeLoadDFMValues;\r\n xdsArtikelArtikelZusatz.BeforeLoadDFMValues;\r\n xdsArtikelLagerort.BeforeLoadDFMValues;\r\n xdsArtikelBuchungskonto.BeforeLoadDFMValues;\r\n xdsArtikelEingangMenge.BeforeLoadDFMValues;\r\n xdsArtikelEingangEndpreis.BeforeLoadDFMValues;\r\n xdsArtikelAusgangMenge.BeforeLoadDFMValues;\r\n xdsArtikelAusgangEndpreisEK.BeforeLoadDFMValues;\r\n xdsArtikelAusgangEndpreisVK.BeforeLoadDFMValues;\r\n xdsArtikelBestand.BeforeLoadDFMValues;\r\n xdsArtikelBestandswert.BeforeLoadDFMValues;\r\n xdsArtikelMarge.BeforeLoadDFMValues;\r\n xdsArtikelMargeProzent.BeforeLoadDFMValues;\r\n xdsArtikelArtikelnummer2.BeforeLoadDFMValues;\r\n xdsArtikelArtikelmatchcode.BeforeLoadDFMValues;\r\n xdsArtikelRabattpreis1.BeforeLoadDFMValues;\r\n xdsArtikelRabattpreis2.BeforeLoadDFMValues;\r\n xdsArtikelRabattpreis3.BeforeLoadDFMValues;\r\n xdsArtikelRabattpreis4.BeforeLoadDFMValues;\r\n xdsArtikelRabattpreis5.BeforeLoadDFMValues;\r\n xdsArtikelArtikelnichtmehrgueltig.BeforeLoadDFMValues;\r\n xdsArtikelEinkaufspreis.BeforeLoadDFMValues;\r\n xdsArtikelAufschlag.BeforeLoadDFMValues;\r\n xdsArtikelWarenbestand.BeforeLoadDFMValues;\r\n xdsArtikelTextfrei10.BeforeLoadDFMValues;\r\n xdsArtikelTextfrei20.BeforeLoadDFMValues;\r\n xdsArtikelArtikelbeschreibungRTF.BeforeLoadDFMValues;\r\n xdsArtikelArtikeldatei1.BeforeLoadDFMValues;\r\n xdsArtikelArtikeldatei2.BeforeLoadDFMValues;\r\n xdsArtikelArtikeldatei3.BeforeLoadDFMValues;\r\n xdsArtikelArtikeldatei4.BeforeLoadDFMValues;\r\n xdsArtikelArtikeldatei5.BeforeLoadDFMValues;\r\n xdsArtikelEinkaufspreisVom.BeforeLoadDFMValues;\r\n xdsArtikelEAN.BeforeLoadDFMValues;\r\n xdsArtikelVGPFaktor.BeforeLoadDFMValues;\r\n xdsArtikelVGPMengenart.BeforeLoadDFMValues;\r\n xdsArtikelVerleihpreis.BeforeLoadDFMValues;\r\n xdsArtikelZusatzPreis.BeforeLoadDFMValues;\r\n xdsArtikelVerpackungsart.BeforeLoadDFMValues;\r\n xdsArtikelVerpackungsMenge.BeforeLoadDFMValues;\r\n xdsArtikelQuellartikel.BeforeLoadDFMValues;\r\n xdsArtikelrabattierfaehig.BeforeLoadDFMValues;\r\n xdsArtikelAngebotAlternativeAN.BeforeLoadDFMValues;\r\n xdsArtikelPreisanteilNetto.BeforeLoadDFMValues;\r\n xdsArtikelFarbe.BeforeLoadDFMValues;\r\n xdsArtikelAEinkauf.BeforeLoadDFMValues;\r\n xdsArtikelAVerkauf.BeforeLoadDFMValues;\r\n xdsArtikelArtikelnummerLieferant.BeforeLoadDFMValues;\r\n xdsArtikelLieferantnummer.BeforeLoadDFMValues;\r\n xdsArtikelVerkaufspreisBrutto.BeforeLoadDFMValues;\r\n xdsArtikelArtikelSet.BeforeLoadDFMValues;\r\n xdsArtikelProvisionssatz.BeforeLoadDFMValues;\r\n xdsArtikelWarentarifnummer.BeforeLoadDFMValues;\r\n xdsArtikelHandelsartikel.BeforeLoadDFMValues;\r\n xdsArtikelUrsprungsland.BeforeLoadDFMValues;\r\n xdsArtikelKategorie.BeforeLoadDFMValues;\r\n xdsArtikelStandardRabattsatzEK.BeforeLoadDFMValues;\r\n xdsArtikelStandardRabattsatzVK.BeforeLoadDFMValues;\r\n xdsArtikelRabattpreiseManuell.BeforeLoadDFMValues;\r\n xdsArtikelMengeBestellt.BeforeLoadDFMValues;\r\n xdsArtikelMengeBeauftragt.BeforeLoadDFMValues;\r\n xdsArtikelBestandDisponiert.BeforeLoadDFMValues;\r\n xdsArtikelMengeAngeboten.BeforeLoadDFMValues;\r\n xdsArtikelBestandDispInclAngebot.BeforeLoadDFMValues;\r\n xdsArtikelMWStKey.BeforeLoadDFMValues;\r\n xdsArtikelShopAmazon.BeforeLoadDFMValues;\r\n xdsArtikelShopQuelle.BeforeLoadDFMValues;\r\n xdsArtikelGeraet.BeforeLoadDFMValues;\r\n xdsArtikelArtgewicht.BeforeLoadDFMValues;\r\n xdsArtikelVolumen.BeforeLoadDFMValues;\r\n xdsArtikelPacklisteNichtAnzeigen.BeforeLoadDFMValues;\r\n xdsArtikelKeineAufschlagskalkulation.BeforeLoadDFMValues;\r\n xdsArtikelKorrekturMenge.BeforeLoadDFMValues;\r\n xdsArtikelKorrekturWert.BeforeLoadDFMValues;\r\n xdsArtikelNachfolgeartikel.BeforeLoadDFMValues;\r\n xdsArtikelMindestbestellmenge.BeforeLoadDFMValues;\r\n xdsArtikelSchnittEK.BeforeLoadDFMValues;\r\n xdsArtikelVerkaufspreisVom.BeforeLoadDFMValues;\r\n xdsArtikelPruefungChargeSNR.BeforeLoadDFMValues;\r\n xdsArtikelArtikelbeschreibungHTML.BeforeLoadDFMValues;\r\n xdsArtikelProduktKurzbeschreibungHTML.BeforeLoadDFMValues;\r\n xdsArtikelStatusFuerShop.BeforeLoadDFMValues;\r\n xdsArtikelAmpelFuerShop.BeforeLoadDFMValues;\r\n xdsArtikelEXP_Anzahl.BeforeLoadDFMValues;\r\n xdsArtikelEXP_Inhalt.BeforeLoadDFMValues;\r\n xdsArtikelEXP_Faktor.BeforeLoadDFMValues;\r\n xdsArtikelFach.BeforeLoadDFMValues;\r\n xdsArtikelExportKasse.BeforeLoadDFMValues;\r\n xdsArtikelWKNR.BeforeLoadDFMValues;\r\n xdsArtikelArtikelAttribute.BeforeLoadDFMValues;\r\n xdsArtikelErstelltAm.BeforeLoadDFMValues;\r\n xdsArtikelVarianteVonAN.BeforeLoadDFMValues;\r\n xdsArtikelGurtmassWerte.BeforeLoadDFMValues;\r\n xdsArtikelGurtmass.BeforeLoadDFMValues;\r\n xdsArtikelAltersgrenze.BeforeLoadDFMValues;\r\n xdsArtikelMWStKeyImHaus.BeforeLoadDFMValues;\r\n xdsArtikelKasseBewegung.BeforeLoadDFMValues;\r\n xdsArtikelKasseBewegungEK.BeforeLoadDFMValues;\r\n xdsArtikelKasseBewegungVK.BeforeLoadDFMValues;\r\n xdsArtikelProduktionBewegung.BeforeLoadDFMValues;\r\n xdsArtikelProduktionBewegungEK.BeforeLoadDFMValues;\r\n xdsArtikelProduktionBewegungVK.BeforeLoadDFMValues;\r\n xdsArtikelWaWiAB.BeforeLoadDFMValues;\r\n xdsArtikelGeaendertAm.BeforeLoadDFMValues;\r\n xdsArtikelGefahrgutKennzeichen.BeforeLoadDFMValues;\r\n xdsArtikelVerpackG.BeforeLoadDFMValues;\r\n xdsArtikelUPE.BeforeLoadDFMValues;\r\n xdsArtikelArtikelbeschreibungEinkauf.BeforeLoadDFMValues;\r\n xdsArtikelHerstellerArtikelnummer.BeforeLoadDFMValues;\r\n xdsArtikelNatura.BeforeLoadDFMValues;\r\n xdsArtikelArbeitszeit.BeforeLoadDFMValues;\r\n xdsArtikelPKey.BeforeLoadDFMValues;\r\n xdsArtikelVersandklasse.BeforeLoadDFMValues;\r\n WClient.BeforeLoadDFMValues;\r\n try\r\n Name := 'Bestellvormerkung';\r\n Width := 246;\r\n Height := 377;\r\n CSSLibrary := cssBootstrap;\r\n ElementFont := efCSS;\r\n SetEvent(Self, 'OnShow', 'WebFormShow');\r\n ResultLabel.SetParentComponent(Self);\r\n ResultLabel.Name := 'ResultLabel';\r\n ResultLabel.Left := 184;\r\n ResultLabel.Top := 72;\r\n ResultLabel.Width := 60;\r\n ResultLabel.Height := 15;\r\n ResultLabel.Caption := 'ResultLabel';\r\n ResultLabel.ElementClassName := 'h6 m-1';\r\n ResultLabel.ElementFont := efCSS;\r\n ResultLabel.ElementPosition := epIgnore;\r\n ResultLabel.HeightStyle := ssAuto;\r\n ResultLabel.HeightPercent := 100.000000000000000000;\r\n ResultLabel.WidthStyle := ssPercent;\r\n ResultLabel.WidthPercent := 100.000000000000000000;\r\n Container1.SetParentComponent(Self);\r\n Container1.Name := 'Container1';\r\n Container1.Left := 0;\r\n Container1.Top := 0;\r\n Container1.Width := 169;\r\n Container1.Height := 41;\r\n Container1.HeightStyle := ssAuto;\r\n Container1.WidthStyle := ssPercent;\r\n Container1.ChildOrder := 2;\r\n Container1.ElementFont := efCSS;\r\n Container1.ElementPosition := epIgnore;\r\n Container2.SetParentComponent(Self);\r\n Container2.Name := 'Container2';\r\n Container2.Left := 0;\r\n Container2.Top := 47;\r\n Container2.Width := 169;\r\n Container2.Height := 41;\r\n Container2.ElementClassName := 'd-flex flex-wrap m-1';\r\n Container2.HeightStyle := ssAuto;\r\n Container2.WidthStyle := ssAuto;\r\n Container2.ChildOrder := 5;\r\n Container2.ElementFont := efCSS;\r\n Container2.ElementPosition := epIgnore;\r\n Container3.SetParentComponent(Self);\r\n Container3.Name := 'Container3';\r\n Container3.Left := 0;\r\n Container3.Top := 94;\r\n Container3.Width := 169;\r\n Container3.Height := 41;\r\n Container3.ElementClassName := 'd-flex flex-wrap m-1';\r\n Container3.HeightStyle := ssAuto;\r\n Container3.WidthStyle := ssAuto;\r\n Container3.ChildOrder := 5;\r\n Container3.ElementFont := efCSS;\r\n Container3.ElementPosition := epIgnore;\r\n btnzurueck.SetParentComponent(Self);\r\n btnzurueck.Name := 'btnzurueck';\r\n btnzurueck.Left := 0;\r\n btnzurueck.Top := 156;\r\n btnzurueck.Width := 96;\r\n btnzurueck.Height := 25;\r\n btnzurueck.Caption := '<< zur'#252'ck';\r\n btnzurueck.ChildOrder := 4;\r\n btnzurueck.ElementClassName := 'btn btn-info btn-sm m-1 text-left';\r\n btnzurueck.ElementFont := efCSS;\r\n btnzurueck.ElementPosition := epIgnore;\r\n btnzurueck.HeightStyle := ssAuto;\r\n btnzurueck.HeightPercent := 100.000000000000000000;\r\n btnzurueck.WidthStyle := ssAuto;\r\n btnzurueck.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnzurueck, Self, 'OnClick', 'btnzurueckClick');\r\n TC.SetParentComponent(Self);\r\n TC.Name := 'TC';\r\n TC.Left := -1;\r\n TC.Top := 191;\r\n TC.Width := 247;\r\n TC.Height := 91;\r\n TC.ElementClassName := 'table table-sm table-hover table-bordered table-striped m-1';\r\n TC.HeightStyle := ssAuto;\r\n TC.WidthStyle := ssPercent;\r\n TC.BorderColor := clSilver;\r\n TC.ChildOrder := 3;\r\n TC.ColHeader := False;\r\n TC.ElementFont := efCSS;\r\n TC.ElementHeaderClassName := 'table-info';\r\n TC.ElementPosition := epIgnore;\r\n TC.ElementTableClassName := 'table table-sm table-hover table-bordered table-striped';\r\n TC.WordWrap := True;\r\n TC.ColCount := 2;\r\n container4.SetParentComponent(Self);\r\n container4.Name := 'container4';\r\n container4.Left := 8;\r\n container4.Top := 102;\r\n container4.Width := 169;\r\n container4.Height := 41;\r\n container4.ElementClassName := 'd-flex flex-wrap m-1 border border-info';\r\n container4.HeightStyle := ssAuto;\r\n container4.WidthStyle := ssAuto;\r\n container4.ChildOrder := 2;\r\n container4.ElementFont := efCSS;\r\n container4.ElementPosition := epIgnore;\r\n Container5.SetParentComponent(Self);\r\n Container5.Name := 'Container5';\r\n Container5.Left := 16;\r\n Container5.Top := 110;\r\n Container5.Width := 169;\r\n Container5.Height := 41;\r\n Container5.ElementClassName := 'd-flex flex-wrap m-1 border border-info';\r\n Container5.HeightStyle := ssAuto;\r\n Container5.WidthStyle := ssAuto;\r\n Container5.ChildOrder := 2;\r\n Container5.ElementFont := efCSS;\r\n Container5.ElementPosition := epIgnore;\r\n edtsuchbegriff.SetParentComponent(Self);\r\n edtsuchbegriff.Name := 'edtsuchbegriff';\r\n edtsuchbegriff.Left := 102;\r\n edtsuchbegriff.Top := 162;\r\n edtsuchbegriff.Width := 121;\r\n edtsuchbegriff.Height := 19;\r\n edtsuchbegriff.ChildOrder := 7;\r\n edtsuchbegriff.ElementClassName := 'form-control input-sm';\r\n edtsuchbegriff.ElementFont := efCSS;\r\n edtsuchbegriff.ElementPosition := epIgnore;\r\n edtsuchbegriff.HeightStyle := ssAuto;\r\n edtsuchbegriff.HeightPercent := 100.000000000000000000;\r\n edtsuchbegriff.TextHint := 'EAN/Art-Nr';\r\n edtsuchbegriff.WidthPercent := 100.000000000000000000;\r\n SetEvent(edtsuchbegriff, Self, 'OnKeyPress', 'edtsuchbegriffKeyPress');\r\n btnSuche.SetParentComponent(Self);\r\n btnSuche.Name := 'btnSuche';\r\n btnSuche.Left := 152;\r\n btnSuche.Top := 214;\r\n btnSuche.Width := 94;\r\n btnSuche.Height := 25;\r\n btnSuche.Caption := 'suchen';\r\n btnSuche.ChildOrder := 8;\r\n btnSuche.ElementClassName := 'btn btn-info btn-sm m-1 text-left';\r\n btnSuche.ElementFont := efCSS;\r\n btnSuche.ElementPosition := epIgnore;\r\n btnSuche.HeightStyle := ssAuto;\r\n btnSuche.HeightPercent := 100.000000000000000000;\r\n btnSuche.WidthStyle := ssAuto;\r\n btnSuche.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnSuche, Self, 'OnClick', 'btnSucheClick');\r\n btnScan.SetParentComponent(Self);\r\n btnScan.Name := 'btnScan';\r\n btnScan.Left := 0;\r\n btnScan.Top := 257;\r\n btnScan.Width := 96;\r\n btnScan.Height := 25;\r\n btnScan.Caption := 'Bar-/QR-Code scannen';\r\n btnScan.ChildOrder := 4;\r\n btnScan.ElementClassName := 'btn btn-info btn-sm m-1 text-left';\r\n btnScan.ElementFont := efCSS;\r\n btnScan.ElementPosition := epIgnore;\r\n btnScan.HeightStyle := ssAuto;\r\n btnScan.HeightPercent := 100.000000000000000000;\r\n btnScan.WidthStyle := ssAuto;\r\n btnScan.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnScan, Self, 'OnClick', 'btnScanClick');\r\n TCArtikel.SetParentComponent(Self);\r\n TCArtikel.Name := 'TCArtikel';\r\n TCArtikel.Left := 0;\r\n TCArtikel.Top := 288;\r\n TCArtikel.Width := 247;\r\n TCArtikel.Height := 91;\r\n TCArtikel.ElementClassName := 'table table-sm table-hover table-bordered table-striped m-1';\r\n TCArtikel.HeightStyle := ssAuto;\r\n TCArtikel.WidthStyle := ssPercent;\r\n TCArtikel.BorderColor := clSilver;\r\n TCArtikel.ChildOrder := 3;\r\n TCArtikel.ColHeader := False;\r\n TCArtikel.ElementFont := efCSS;\r\n TCArtikel.ElementHeaderClassName := 'table-info';\r\n TCArtikel.ElementPosition := epIgnore;\r\n TCArtikel.ElementTableClassName := 'table table-sm table-hover table-bordered table-striped';\r\n TCArtikel.WordWrap := True;\r\n TCArtikel.ColCount := 2;\r\n edtBMenge.SetParentComponent(Self);\r\n edtBMenge.Name := 'edtBMenge';\r\n edtBMenge.Left := 8;\r\n edtBMenge.Top := 185;\r\n edtBMenge.Width := 121;\r\n edtBMenge.Height := 19;\r\n edtBMenge.ChildOrder := 2;\r\n edtBMenge.EditType := weFloat;\r\n edtBMenge.ElementClassName := 'form-control input-sm';\r\n edtBMenge.ElementFont := efCSS;\r\n edtBMenge.ElementPosition := epIgnore;\r\n edtBMenge.HeightStyle := ssAuto;\r\n edtBMenge.HeightPercent := 100.000000000000000000;\r\n edtBMenge.TextHint := 'eintragen';\r\n edtBMenge.WidthPercent := 100.000000000000000000;\r\n SetEvent(edtBMenge, Self, 'OnKeyPress', 'edtBMengeKeyPress');\r\n btnSpeichern.SetParentComponent(Self);\r\n btnSpeichern.Name := 'btnSpeichern';\r\n btnSpeichern.Left := 8;\r\n btnSpeichern.Top := 210;\r\n btnSpeichern.Width := 96;\r\n btnSpeichern.Height := 25;\r\n btnSpeichern.Caption := 'speichern';\r\n btnSpeichern.ChildOrder := 6;\r\n btnSpeichern.ElementClassName := 'btn btn-info btn-sm m-1 text-left';\r\n btnSpeichern.ElementFont := efCSS;\r\n btnSpeichern.ElementPosition := epIgnore;\r\n btnSpeichern.HeightStyle := ssAuto;\r\n btnSpeichern.HeightPercent := 100.000000000000000000;\r\n btnSpeichern.WidthStyle := ssAuto;\r\n btnSpeichern.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnSpeichern, Self, 'OnClick', 'btnSpeichernClick');\r\n btnEtikettendruck.SetParentComponent(Self);\r\n btnEtikettendruck.Name := 'btnEtikettendruck';\r\n btnEtikettendruck.Left := 142;\r\n btnEtikettendruck.Top := 94;\r\n btnEtikettendruck.Width := 96;\r\n btnEtikettendruck.Height := 25;\r\n btnEtikettendruck.Caption := 'Etikettendruck';\r\n btnEtikettendruck.ChildOrder := 4;\r\n btnEtikettendruck.ElementClassName := 'btn btn-info btn-sm m-1 text-left';\r\n btnEtikettendruck.ElementFont := efCSS;\r\n btnEtikettendruck.ElementPosition := epIgnore;\r\n btnEtikettendruck.HeightStyle := ssAuto;\r\n btnEtikettendruck.HeightPercent := 100.000000000000000000;\r\n btnEtikettendruck.WidthStyle := ssAuto;\r\n btnEtikettendruck.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnEtikettendruck, Self, 'OnClick', 'btnEtikettendruckClick');\r\n xdsBestellvormerkung.SetParentComponent(Self);\r\n xdsBestellvormerkung.Name := 'xdsBestellvormerkung';\r\n xdsBestellvormerkung.AfterOpen := xdsBestellvormerkungAfterOpen;\r\n xdsBestellvormerkung.EntitySetName := 'BestellungMDE';\r\n xdsBestellvormerkung.Connection := DM2.XDataWebConnection1;\r\n xdsBestellvormerkung.QueryString := '$filter=Belegnummer eq null&$orderby=erstellt DESC';\r\n xdsBestellvormerkung.QueryTop := 100;\r\n xdsBestellvormerkung.Left := 45;\r\n xdsBestellvormerkung.Top := 229;\r\n xdsBestellvormerkungID.SetParentComponent(xdsBestellvormerkung);\r\n xdsBestellvormerkungID.Name := 'xdsBestellvormerkungID';\r\n xdsBestellvormerkungID.FieldName := 'ID';\r\n xdsBestellvormerkungID.Required := True;\r\n xdsBestellvormerkungID.Size := 38;\r\n xdsBestellvormerkungArtikelnummer.SetParentComponent(xdsBestellvormerkung);\r\n xdsBestellvormerkungArtikelnummer.Name := 'xdsBestellvormerkungArtikelnummer';\r\n xdsBestellvormerkungArtikelnummer.FieldName := 'Artikelnummer';\r\n xdsBestellvormerkungArtikelnummer.Required := True;\r\n xdsBestellvormerkungArtikelnummer.Size := 25;\r\n xdsBestellvormerkungArtikelueberschrift.SetParentComponent(xdsBestellvormerkung);\r\n xdsBestellvormerkungArtikelueberschrift.Name := 'xdsBestellvormerkungArtikelueberschrift';\r\n xdsBestellvormerkungArtikelueberschrift.FieldName := 'Artikelueberschrift';\r\n xdsBestellvormerkungArtikelueberschrift.Size := 50;\r\n xdsBestellvormerkungMenge.SetParentComponent(xdsBestellvormerkung);\r\n xdsBestellvormerkungMenge.Name := 'xdsBestellvormerkungMenge';\r\n xdsBestellvormerkungMenge.FieldName := 'Menge';\r\n xdsBestellvormerkungLieferantennummer.SetParentComponent(xdsBestellvormerkung);\r\n xdsBestellvormerkungLieferantennummer.Name := 'xdsBestellvormerkungLieferantennummer';\r\n xdsBestellvormerkungLieferantennummer.FieldName := 'Lieferantennummer';\r\n xdsBestellvormerkungLieferantennummer.Size := 13;\r\n xdsBestellvormerkungerstellt.SetParentComponent(xdsBestellvormerkung);\r\n xdsBestellvormerkungerstellt.Name := 'xdsBestellvormerkungerstellt';\r\n xdsBestellvormerkungerstellt.FieldName := 'erstellt';\r\n xdsBestellvormerkungBelegnummer.SetParentComponent(xdsBestellvormerkung);\r\n xdsBestellvormerkungBelegnummer.Name := 'xdsBestellvormerkungBelegnummer';\r\n xdsBestellvormerkungBelegnummer.FieldName := 'Belegnummer';\r\n xdsBestellvormerkungBelegnummer.Size := 10;\r\n xdsBestellvormerkungLieferantenname.SetParentComponent(xdsBestellvormerkung);\r\n xdsBestellvormerkungLieferantenname.Name := 'xdsBestellvormerkungLieferantenname';\r\n xdsBestellvormerkungLieferantenname.FieldName := 'Lieferantenname';\r\n xdsBestellvormerkungLieferantenname.Size := 40;\r\n xdsArtikel.SetParentComponent(Self);\r\n xdsArtikel.Name := 'xdsArtikel';\r\n xdsArtikel.AfterOpen := xdsArtikelAfterOpen;\r\n xdsArtikel.EntitySetName := 'Artikel';\r\n xdsArtikel.Connection := DM2.XDataWebConnection1;\r\n xdsArtikel.SubpropsDepth := 1;\r\n xdsArtikel.Left := 24;\r\n xdsArtikel.Top := 64;\r\n xdsArtikelHersteller.SetParentComponent(xdsArtikel);\r\n xdsArtikelHersteller.Name := 'xdsArtikelHersteller';\r\n xdsArtikelHersteller.FieldName := 'Hersteller';\r\n xdsArtikelHersteller.Required := True;\r\n xdsArtikelHerstellerHersteller.SetParentComponent(xdsArtikel);\r\n xdsArtikelHerstellerHersteller.Name := 'xdsArtikelHerstellerHersteller';\r\n xdsArtikelHerstellerHersteller.FieldName := 'Hersteller.Hersteller';\r\n xdsArtikelHerstellerHersteller.Size := 25;\r\n xdsArtikelHerstellerHerstellerID.SetParentComponent(xdsArtikel);\r\n xdsArtikelHerstellerHerstellerID.Name := 'xdsArtikelHerstellerHerstellerID';\r\n xdsArtikelHerstellerHerstellerID.FieldName := 'Hersteller.HerstellerID';\r\n xdsArtikelHerstellerHerstellerID.Size := 50;\r\n xdsArtikelHerstellerHerstellerURL.SetParentComponent(xdsArtikel);\r\n xdsArtikelHerstellerHerstellerURL.Name := 'xdsArtikelHerstellerHerstellerURL';\r\n xdsArtikelHerstellerHerstellerURL.FieldName := 'Hersteller.HerstellerURL';\r\n xdsArtikelHerstellerHerstellerURL.Size := 100;\r\n xdsArtikelArtderMenge.SetParentComponent(xdsArtikel);\r\n xdsArtikelArtderMenge.Name := 'xdsArtikelArtderMenge';\r\n xdsArtikelArtderMenge.FieldName := 'ArtderMenge';\r\n xdsArtikelArtderMenge.Required := True;\r\n xdsArtikelArtderMengeArtderMenge.SetParentComponent(xdsArtikel);\r\n xdsArtikelArtderMengeArtderMenge.Name := 'xdsArtikelArtderMengeArtderMenge';\r\n xdsArtikelArtderMengeArtderMenge.FieldName := 'ArtderMenge.ArtderMenge';\r\n xdsArtikelArtderMengeArtderMenge.Size := 50;\r\n xdsArtikelArtderMengeISO3.SetParentComponent(xdsArtikel);\r\n xdsArtikelArtderMengeISO3.Name := 'xdsArtikelArtderMengeISO3';\r\n xdsArtikelArtderMengeISO3.FieldName := 'ArtderMenge.ISO3';\r\n xdsArtikelArtderMengeISO3.Size := 3;\r\n xdsArtikelArtderMengeMengenauswahl.SetParentComponent(xdsArtikel);\r\n xdsArtikelArtderMengeMengenauswahl.Name := 'xdsArtikelArtderMengeMengenauswahl';\r\n xdsArtikelArtderMengeMengenauswahl.FieldName := 'ArtderMenge.Mengenauswahl';\r\n xdsArtikelArtderMengeVGPauswahl.SetParentComponent(xdsArtikel);\r\n xdsArtikelArtderMengeVGPauswahl.Name := 'xdsArtikelArtderMengeVGPauswahl';\r\n xdsArtikelArtderMengeVGPauswahl.FieldName := 'ArtderMenge.VGPauswahl';\r\n xdsArtikelArtderMengeUVPauswahl.SetParentComponent(xdsArtikel);\r\n xdsArtikelArtderMengeUVPauswahl.Name := 'xdsArtikelArtderMengeUVPauswahl';\r\n xdsArtikelArtderMengeUVPauswahl.FieldName := 'ArtderMenge.UVPauswahl';\r\n xdsArtikelArtderMengeVKPDivisor.SetParentComponent(xdsArtikel);\r\n xdsArtikelArtderMengeVKPDivisor.Name := 'xdsArtikelArtderMengeVKPDivisor';\r\n xdsArtikelArtderMengeVKPDivisor.FieldName := 'ArtderMenge.VKPDivisor';\r\n xdsArtikelPfandArt.SetParentComponent(xdsArtikel);\r\n xdsArtikelPfandArt.Name := 'xdsArtikelPfandArt';\r\n xdsArtikelPfandArt.FieldName := 'PfandArt';\r\n xdsArtikelPfandArtPfandArt.SetParentComponent(xdsArtikel);\r\n xdsArtikelPfandArtPfandArt.Name := 'xdsArtikelPfandArtPfandArt';\r\n xdsArtikelPfandArtPfandArt.FieldName := 'PfandArt.PfandArt';\r\n xdsArtikelPfandArtPfandArt.Size := 50;\r\n xdsArtikelPfandArtPfandWert.SetParentComponent(xdsArtikel);\r\n xdsArtikelPfandArtPfandWert.Name := 'xdsArtikelPfandArtPfandWert';\r\n xdsArtikelPfandArtPfandWert.FieldName := 'PfandArt.PfandWert';\r\n xdsArtikelPfandArtPfandwertEK.SetParentComponent(xdsArtikel);\r\n xdsArtikelPfandArtPfandwertEK.Name := 'xdsArtikelPfandArtPfandwertEK';\r\n xdsArtikelPfandArtPfandwertEK.FieldName := 'PfandArt.PfandwertEK';\r\n xdsArtikelWarengruppe.SetParentComponent(xdsArtikel);\r\n xdsArtikelWarengruppe.Name := 'xdsArtikelWarengruppe';\r\n xdsArtikelWarengruppe.FieldName := 'Warengruppe';\r\n xdsArtikelWarengruppeWarengruppe.SetParentComponent(xdsArtikel);\r\n xdsArtikelWarengruppeWarengruppe.Name := 'xdsArtikelWarengruppeWarengruppe';\r\n xdsArtikelWarengruppeWarengruppe.FieldName := 'Warengruppe.Warengruppe';\r\n xdsArtikelWarengruppeWarengruppe.Size := 70;\r\n xdsArtikelWarengruppeWGNR.SetParentComponent(xdsArtikel);\r\n xdsArtikelWarengruppeWGNR.Name := 'xdsArtikelWarengruppeWGNR';\r\n xdsArtikelWarengruppeWGNR.FieldName := 'Warengruppe.WGNR';\r\n xdsArtikelWarenuntergruppe.SetParentComponent(xdsArtikel);\r\n xdsArtikelWarenuntergruppe.Name := 'xdsArtikelWarenuntergruppe';\r\n xdsArtikelWarenuntergruppe.FieldName := 'Warenuntergruppe';\r\n xdsArtikelWarenuntergruppeWarenuntergruppe.SetParentComponent(xdsArtikel);\r\n xdsArtikelWarenuntergruppeWarenuntergruppe.Name := 'xdsArtikelWarenuntergruppeWarenuntergruppe';\r\n xdsArtikelWarenuntergruppeWarenuntergruppe.FieldName := 'Warenuntergruppe.Warenuntergruppe';\r\n xdsArtikelWarenuntergruppeWarenuntergruppe.Size := 70;\r\n xdsArtikelWarenuntergruppeWarengruppe.SetParentComponent(xdsArtikel);\r\n xdsArtikelWarenuntergruppeWarengruppe.Name := 'xdsArtikelWarenuntergruppeWarengruppe';\r\n xdsArtikelWarenuntergruppeWarengruppe.FieldName := 'Warenuntergruppe.Warengruppe';\r\n xdsArtikelWarenuntergruppeWarengruppe.Size := 70;\r\n xdsArtikelWarenuntergruppeWUGNR.SetParentComponent(xdsArtikel);\r\n xdsArtikelWarenuntergruppeWUGNR.Name := 'xdsArtikelWarenuntergruppeWUGNR';\r\n xdsArtikelWarenuntergruppeWUGNR.FieldName := 'Warenuntergruppe.WUGNR';\r\n xdsArtikelWarenuntergruppeWGNR.SetParentComponent(xdsArtikel);\r\n xdsArtikelWarenuntergruppeWGNR.Name := 'xdsArtikelWarenuntergruppeWGNR';\r\n xdsArtikelWarenuntergruppeWGNR.FieldName := 'Warenuntergruppe.WGNR';\r\n xdsArtikelArtikelnummer.SetParentComponent(xdsArtikel);\r\n xdsArtikelArtikelnummer.Name := 'xdsArtikelArtikelnummer';\r\n xdsArtikelArtikelnummer.FieldName := 'Artikelnummer';\r\n xdsArtikelArtikelnummer.Required := True;\r\n xdsArtikelArtikelnummer.Size := 25;\r\n xdsArtikelArtikelueberschrift.SetParentComponent(xdsArtikel);\r\n xdsArtikelArtikelueberschrift.Name := 'xdsArtikelArtikelueberschrift';\r\n xdsArtikelArtikelueberschrift.FieldName := 'Artikelueberschrift';\r\n xdsArtikelArtikelueberschrift.Size := 50;\r\n xdsArtikelArtikelbeschreibung.SetParentComponent(xdsArtikel);\r\n xdsArtikelArtikelbeschreibung.Name := 'xdsArtikelArtikelbeschreibung';\r\n xdsArtikelArtikelbeschreibung.FieldName := 'Artikelbeschreibung';\r\n xdsArtikelArtikelbeschreibung.Size := 255;\r\n xdsArtikelVerkaufspreis.SetParentComponent(xdsArtikel);\r\n xdsArtikelVerkaufspreis.Name := 'xdsArtikelVerkaufspreis';\r\n xdsArtikelVerkaufspreis.FieldName := 'Verkaufspreis';\r\n xdsArtikelMindestbestand.SetParentComponent(xdsArtikel);\r\n xdsArtikelMindestbestand.Name := 'xdsArtikelMindestbestand';\r\n xdsArtikelMindestbestand.FieldName := 'Mindestbestand';\r\n xdsArtikelPreisliste.SetParentComponent(xdsArtikel);\r\n xdsArtikelPreisliste.Name := 'xdsArtikelPreisliste';\r\n xdsArtikelPreisliste.FieldName := 'Preisliste';\r\n xdsArtikelPreisliste.Size := 150;\r\n xdsArtikelGewicht.SetParentComponent(xdsArtikel);\r\n xdsArtikelGewicht.Name := 'xdsArtikelGewicht';\r\n xdsArtikelGewicht.FieldName := 'Gewicht';\r\n xdsArtikelLaenge.SetParentComponent(xdsArtikel);\r\n xdsArtikelLaenge.Name := 'xdsArtikelLaenge';\r\n xdsArtikelLaenge.FieldName := 'Laenge';\r\n xdsArtikelBreite.SetParentComponent(xdsArtikel);\r\n xdsArtikelBreite.Name := 'xdsArtikelBreite';\r\n xdsArtikelBreite.FieldName := 'Breite';\r\n xdsArtikelHoehe.SetParentComponent(xdsArtikel);\r\n xdsArtikelHoehe.Name := 'xdsArtikelHoehe';\r\n xdsArtikelHoehe.FieldName := 'Hoehe';\r\n xdsArtikelArtikelZusatz.SetParentComponent(xdsArtikel);\r\n xdsArtikelArtikelZusatz.Name := 'xdsArtikelArtikelZusatz';\r\n xdsArtikelArtikelZusatz.FieldName := 'ArtikelZusatz';\r\n xdsArtikelArtikelZusatz.Size := 255;\r\n xdsArtikelLagerort.SetParentComponent(xdsArtikel);\r\n xdsArtikelLagerort.Name := 'xdsArtikelLagerort';\r\n xdsArtikelLagerort.FieldName := 'Lagerort';\r\n xdsArtikelLagerort.Size := 50;\r\n xdsArtikelBuchungskonto.SetParentComponent(xdsArtikel);\r\n xdsArtikelBuchungskonto.Name := 'xdsArtikelBuchungskonto';\r\n xdsArtikelBuchungskonto.FieldName := 'Buchungskonto';\r\n xdsArtikelEingangMenge.SetParentComponent(xdsArtikel);\r\n xdsArtikelEingangMenge.Name := 'xdsArtikelEingangMenge';\r\n xdsArtikelEingangMenge.FieldName := 'EingangMenge';\r\n xdsArtikelEingangEndpreis.SetParentComponent(xdsArtikel);\r\n xdsArtikelEingangEndpreis.Name := 'xdsArtikelEingangEndpreis';\r\n xdsArtikelEingangEndpreis.FieldName := 'EingangEndpreis';\r\n xdsArtikelAusgangMenge.SetParentComponent(xdsArtikel);\r\n xdsArtikelAusgangMenge.Name := 'xdsArtikelAusgangMenge';\r\n xdsArtikelAusgangMenge.FieldName := 'AusgangMenge';\r\n xdsArtikelAusgangEndpreisEK.SetParentComponent(xdsArtikel);\r\n xdsArtikelAusgangEndpreisEK.Name := 'xdsArtikelAusgangEndpreisEK';\r\n xdsArtikelAusgangEndpreisEK.FieldName := 'AusgangEndpreisEK';\r\n xdsArtikelAusgangEndpreisVK.SetParentComponent(xdsArtikel);\r\n xdsArtikelAusgangEndpreisVK.Name := 'xdsArtikelAusgangEndpreisVK';\r\n xdsArtikelAusgangEndpreisVK.FieldName := 'AusgangEndpreisVK';\r\n xdsArtikelBestand.SetParentComponent(xdsArtikel);\r\n xdsArtikelBestand.Name := 'xdsArtikelBestand';\r\n xdsArtikelBestand.FieldName := 'Bestand';\r\n xdsArtikelBestandswert.SetParentComponent(xdsArtikel);\r\n xdsArtikelBestandswert.Name := 'xdsArtikelBestandswert';\r\n xdsArtikelBestandswert.FieldName := 'Bestandswert';\r\n xdsArtikelMarge.SetParentComponent(xdsArtikel);\r\n xdsArtikelMarge.Name := 'xdsArtikelMarge';\r\n xdsArtikelMarge.FieldName := 'Marge';\r\n xdsArtikelMargeProzent.SetParentComponent(xdsArtikel);\r\n xdsArtikelMargeProzent.Name := 'xdsArtikelMargeProzent';\r\n xdsArtikelMargeProzent.FieldName := 'MargeProzent';\r\n xdsArtikelArtikelnummer2.SetParentComponent(xdsArtikel);\r\n xdsArtikelArtikelnummer2.Name := 'xdsArtikelArtikelnummer2';\r\n xdsArtikelArtikelnummer2.FieldName := 'Artikelnummer2';\r\n xdsArtikelArtikelnummer2.Size := 25;\r\n xdsArtikelArtikelmatchcode.SetParentComponent(xdsArtikel);\r\n xdsArtikelArtikelmatchcode.Name := 'xdsArtikelArtikelmatchcode';\r\n xdsArtikelArtikelmatchcode.FieldName := 'Artikelmatchcode';\r\n xdsArtikelArtikelmatchcode.Size := 30;\r\n xdsArtikelRabattpreis1.SetParentComponent(xdsArtikel);\r\n xdsArtikelRabattpreis1.Name := 'xdsArtikelRabattpreis1';\r\n xdsArtikelRabattpreis1.FieldName := 'Rabattpreis1';\r\n xdsArtikelRabattpreis2.SetParentComponent(xdsArtikel);\r\n xdsArtikelRabattpreis2.Name := 'xdsArtikelRabattpreis2';\r\n xdsArtikelRabattpreis2.FieldName := 'Rabattpreis2';\r\n xdsArtikelRabattpreis3.SetParentComponent(xdsArtikel);\r\n xdsArtikelRabattpreis3.Name := 'xdsArtikelRabattpreis3';\r\n xdsArtikelRabattpreis3.FieldName := 'Rabattpreis3';\r\n xdsArtikelRabattpreis4.SetParentComponent(xdsArtikel);\r\n xdsArtikelRabattpreis4.Name := 'xdsArtikelRabattpreis4';\r\n xdsArtikelRabattpreis4.FieldName := 'Rabattpreis4';\r\n xdsArtikelRabattpreis5.SetParentComponent(xdsArtikel);\r\n xdsArtikelRabattpreis5.Name := 'xdsArtikelRabattpreis5';\r\n xdsArtikelRabattpreis5.FieldName := 'Rabattpreis5';\r\n xdsArtikelArtikelnichtmehrgueltig.SetParentComponent(xdsArtikel);\r\n xdsArtikelArtikelnichtmehrgueltig.Name := 'xdsArtikelArtikelnichtmehrgueltig';\r\n xdsArtikelArtikelnichtmehrgueltig.FieldName := 'Artikelnichtmehrgueltig';\r\n xdsArtikelEinkaufspreis.SetParentComponent(xdsArtikel);\r\n xdsArtikelEinkaufspreis.Name := 'xdsArtikelEinkaufspreis';\r\n xdsArtikelEinkaufspreis.FieldName := 'Einkaufspreis';\r\n xdsArtikelAufschlag.SetParentComponent(xdsArtikel);\r\n xdsArtikelAufschlag.Name := 'xdsArtikelAufschlag';\r\n xdsArtikelAufschlag.FieldName := 'Aufschlag';\r\n xdsArtikelWarenbestand.SetParentComponent(xdsArtikel);\r\n xdsArtikelWarenbestand.Name := 'xdsArtikelWarenbestand';\r\n xdsArtikelWarenbestand.FieldName := 'Warenbestand';\r\n xdsArtikelTextfrei10.SetParentComponent(xdsArtikel);\r\n xdsArtikelTextfrei10.Name := 'xdsArtikelTextfrei10';\r\n xdsArtikelTextfrei10.FieldName := 'Textfrei10';\r\n xdsArtikelTextfrei10.Size := 50;\r\n xdsArtikelTextfrei20.SetParentComponent(xdsArtikel);\r\n xdsArtikelTextfrei20.Name := 'xdsArtikelTextfrei20';\r\n xdsArtikelTextfrei20.FieldName := 'Textfrei20';\r\n xdsArtikelTextfrei20.Size := 50;\r\n xdsArtikelArtikelbeschreibungRTF.SetParentComponent(xdsArtikel);\r\n xdsArtikelArtikelbeschreibungRTF.Name := 'xdsArtikelArtikelbeschreibungRTF';\r\n xdsArtikelArtikelbeschreibungRTF.FieldName := 'ArtikelbeschreibungRTF';\r\n xdsArtikelArtikelbeschreibungRTF.Size := 255;\r\n xdsArtikelArtikeldatei1.SetParentComponent(xdsArtikel);\r\n xdsArtikelArtikeldatei1.Name := 'xdsArtikelArtikeldatei1';\r\n xdsArtikelArtikeldatei1.FieldName := 'Artikeldatei1';\r\n xdsArtikelArtikeldatei1.Size := 255;\r\n xdsArtikelArtikeldatei2.SetParentComponent(xdsArtikel);\r\n xdsArtikelArtikeldatei2.Name := 'xdsArtikelArtikeldatei2';\r\n xdsArtikelArtikeldatei2.FieldName := 'Artikeldatei2';\r\n xdsArtikelArtikeldatei2.Size := 255;\r\n xdsArtikelArtikeldatei3.SetParentComponent(xdsArtikel);\r\n xdsArtikelArtikeldatei3.Name := 'xdsArtikelArtikeldatei3';\r\n xdsArtikelArtikeldatei3.FieldName := 'Artikeldatei3';\r\n xdsArtikelArtikeldatei3.Size := 255;\r\n xdsArtikelArtikeldatei4.SetParentComponent(xdsArtikel);\r\n xdsArtikelArtikeldatei4.Name := 'xdsArtikelArtikeldatei4';\r\n xdsArtikelArtikeldatei4.FieldName := 'Artikeldatei4';\r\n xdsArtikelArtikeldatei4.Size := 255;\r\n xdsArtikelArtikeldatei5.SetParentComponent(xdsArtikel);\r\n xdsArtikelArtikeldatei5.Name := 'xdsArtikelArtikeldatei5';\r\n xdsArtikelArtikeldatei5.FieldName := 'Artikeldatei5';\r\n xdsArtikelArtikeldatei5.Size := 255;\r\n xdsArtikelEinkaufspreisVom.SetParentComponent(xdsArtikel);\r\n xdsArtikelEinkaufspreisVom.Name := 'xdsArtikelEinkaufspreisVom';\r\n xdsArtikelEinkaufspreisVom.FieldName := 'EinkaufspreisVom';\r\n xdsArtikelEAN.SetParentComponent(xdsArtikel);\r\n xdsArtikelEAN.Name := 'xdsArtikelEAN';\r\n xdsArtikelEAN.FieldName := 'EAN';\r\n xdsArtikelEAN.Size := 15;\r\n xdsArtikelVGPFaktor.SetParentComponent(xdsArtikel);\r\n xdsArtikelVGPFaktor.Name := 'xdsArtikelVGPFaktor';\r\n xdsArtikelVGPFaktor.FieldName := 'VGPFaktor';\r\n xdsArtikelVGPMengenart.SetParentComponent(xdsArtikel);\r\n xdsArtikelVGPMengenart.Name := 'xdsArtikelVGPMengenart';\r\n xdsArtikelVGPMengenart.FieldName := 'VGPMengenart';\r\n xdsArtikelVGPMengenart.Size := 50;\r\n xdsArtikelVerleihpreis.SetParentComponent(xdsArtikel);\r\n xdsArtikelVerleihpreis.Name := 'xdsArtikelVerleihpreis';\r\n xdsArtikelVerleihpreis.FieldName := 'Verleihpreis';\r\n xdsArtikelZusatzPreis.SetParentComponent(xdsArtikel);\r\n xdsArtikelZusatzPreis.Name := 'xdsArtikelZusatzPreis';\r\n xdsArtikelZusatzPreis.FieldName := 'ZusatzPreis';\r\n xdsArtikelVerpackungsart.SetParentComponent(xdsArtikel);\r\n xdsArtikelVerpackungsart.Name := 'xdsArtikelVerpackungsart';\r\n xdsArtikelVerpackungsart.FieldName := 'Verpackungsart';\r\n xdsArtikelVerpackungsart.Size := 50;\r\n xdsArtikelVerpackungsMenge.SetParentComponent(xdsArtikel);\r\n xdsArtikelVerpackungsMenge.Name := 'xdsArtikelVerpackungsMenge';\r\n xdsArtikelVerpackungsMenge.FieldName := 'VerpackungsMenge';\r\n xdsArtikelQuellartikel.SetParentComponent(xdsArtikel);\r\n xdsArtikelQuellartikel.Name := 'xdsArtikelQuellartikel';\r\n xdsArtikelQuellartikel.FieldName := 'Quellartikel';\r\n xdsArtikelQuellartikel.Size := 25;\r\n xdsArtikelrabattierfaehig.SetParentComponent(xdsArtikel);\r\n xdsArtikelrabattierfaehig.Name := 'xdsArtikelrabattierfaehig';\r\n xdsArtikelrabattierfaehig.FieldName := 'rabattierfaehig';\r\n xdsArtikelAngebotAlternativeAN.SetParentComponent(xdsArtikel);\r\n xdsArtikelAngebotAlternativeAN.Name := 'xdsArtikelAngebotAlternativeAN';\r\n xdsArtikelAngebotAlternativeAN.FieldName := 'AngebotAlternativeAN';\r\n xdsArtikelAngebotAlternativeAN.Size := 25;\r\n xdsArtikelPreisanteilNetto.SetParentComponent(xdsArtikel);\r\n xdsArtikelPreisanteilNetto.Name := 'xdsArtikelPreisanteilNetto';\r\n xdsArtikelPreisanteilNetto.FieldName := 'PreisanteilNetto';\r\n xdsArtikelFarbe.SetParentComponent(xdsArtikel);\r\n xdsArtikelFarbe.Name := 'xdsArtikelFarbe';\r\n xdsArtikelFarbe.FieldName := 'Farbe';\r\n xdsArtikelAEinkauf.SetParentComponent(xdsArtikel);\r\n xdsArtikelAEinkauf.Name := 'xdsArtikelAEinkauf';\r\n xdsArtikelAEinkauf.FieldName := 'AEinkauf';\r\n xdsArtikelAVerkauf.SetParentComponent(xdsArtikel);\r\n xdsArtikelAVerkauf.Name := 'xdsArtikelAVerkauf';\r\n xdsArtikelAVerkauf.FieldName := 'AVerkauf';\r\n xdsArtikelArtikelnummerLieferant.SetParentComponent(xdsArtikel);\r\n xdsArtikelArtikelnummerLieferant.Name := 'xdsArtikelArtikelnummerLieferant';\r\n xdsArtikelArtikelnummerLieferant.FieldName := 'ArtikelnummerLieferant';\r\n xdsArtikelArtikelnummerLieferant.Size := 25;\r\n xdsArtikelLieferantnummer.SetParentComponent(xdsArtikel);\r\n xdsArtikelLieferantnummer.Name := 'xdsArtikelLieferantnummer';\r\n xdsArtikelLieferantnummer.FieldName := 'Lieferantnummer';\r\n xdsArtikelLieferantnummer.Size := 13;\r\n xdsArtikelVerkaufspreisBrutto.SetParentComponent(xdsArtikel);\r\n xdsArtikelVerkaufspreisBrutto.Name := 'xdsArtikelVerkaufspreisBrutto';\r\n xdsArtikelVerkaufspreisBrutto.FieldName := 'VerkaufspreisBrutto';\r\n xdsArtikelArtikelSet.SetParentComponent(xdsArtikel);\r\n xdsArtikelArtikelSet.Name := 'xdsArtikelArtikelSet';\r\n xdsArtikelArtikelSet.FieldName := 'ArtikelSet';\r\n xdsArtikelProvisionssatz.SetParentComponent(xdsArtikel);\r\n xdsArtikelProvisionssatz.Name := 'xdsArtikelProvisionssatz';\r\n xdsArtikelProvisionssatz.FieldName := 'Provisionssatz';\r\n xdsArtikelWarentarifnummer.SetParentComponent(xdsArtikel);\r\n xdsArtikelWarentarifnummer.Name := 'xdsArtikelWarentarifnummer';\r\n xdsArtikelWarentarifnummer.FieldName := 'Warentarifnummer';\r\n xdsArtikelHandelsartikel.SetParentComponent(xdsArtikel);\r\n xdsArtikelHandelsartikel.Name := 'xdsArtikelHandelsartikel';\r\n xdsArtikelHandelsartikel.FieldName := 'Handelsartikel';\r\n xdsArtikelUrsprungsland.SetParentComponent(xdsArtikel);\r\n xdsArtikelUrsprungsland.Name := 'xdsArtikelUrsprungsland';\r\n xdsArtikelUrsprungsland.FieldName := 'Ursprungsland';\r\n xdsArtikelUrsprungsland.Size := 5;\r\n xdsArtikelKategorie.SetParentComponent(xdsArtikel);\r\n xdsArtikelKategorie.Name := 'xdsArtikelKategorie';\r\n xdsArtikelKategorie.FieldName := 'Kategorie';\r\n xdsArtikelKategorie.Size := 25;\r\n xdsArtikelStandardRabattsatzEK.SetParentComponent(xdsArtikel);\r\n xdsArtikelStandardRabattsatzEK.Name := 'xdsArtikelStandardRabattsatzEK';\r\n xdsArtikelStandardRabattsatzEK.FieldName := 'StandardRabattsatzEK';\r\n xdsArtikelStandardRabattsatzVK.SetParentComponent(xdsArtikel);\r\n xdsArtikelStandardRabattsatzVK.Name := 'xdsArtikelStandardRabattsatzVK';\r\n xdsArtikelStandardRabattsatzVK.FieldName := 'StandardRabattsatzVK';\r\n xdsArtikelRabattpreiseManuell.SetParentComponent(xdsArtikel);\r\n xdsArtikelRabattpreiseManuell.Name := 'xdsArtikelRabattpreiseManuell';\r\n xdsArtikelRabattpreiseManuell.FieldName := 'RabattpreiseManuell';\r\n xdsArtikelMengeBestellt.SetParentComponent(xdsArtikel);\r\n xdsArtikelMengeBestellt.Name := 'xdsArtikelMengeBestellt';\r\n xdsArtikelMengeBestellt.FieldName := 'MengeBestellt';\r\n xdsArtikelMengeBeauftragt.SetParentComponent(xdsArtikel);\r\n xdsArtikelMengeBeauftragt.Name := 'xdsArtikelMengeBeauftragt';\r\n xdsArtikelMengeBeauftragt.FieldName := 'MengeBeauftragt';\r\n xdsArtikelBestandDisponiert.SetParentComponent(xdsArtikel);\r\n xdsArtikelBestandDisponiert.Name := 'xdsArtikelBestandDisponiert';\r\n xdsArtikelBestandDisponiert.FieldName := 'BestandDisponiert';\r\n xdsArtikelMengeAngeboten.SetParentComponent(xdsArtikel);\r\n xdsArtikelMengeAngeboten.Name := 'xdsArtikelMengeAngeboten';\r\n xdsArtikelMengeAngeboten.FieldName := 'MengeAngeboten';\r\n xdsArtikelBestandDispInclAngebot.SetParentComponent(xdsArtikel);\r\n xdsArtikelBestandDispInclAngebot.Name := 'xdsArtikelBestandDispInclAngebot';\r\n xdsArtikelBestandDispInclAngebot.FieldName := 'BestandDispInclAngebot';\r\n xdsArtikelMWStKey.SetParentComponent(xdsArtikel);\r\n xdsArtikelMWStKey.Name := 'xdsArtikelMWStKey';\r\n xdsArtikelMWStKey.FieldName := 'MWStKey';\r\n xdsArtikelShopAmazon.SetParentComponent(xdsArtikel);\r\n xdsArtikelShopAmazon.Name := 'xdsArtikelShopAmazon';\r\n xdsArtikelShopAmazon.FieldName := 'ShopAmazon';\r\n xdsArtikelShopQuelle.SetParentComponent(xdsArtikel);\r\n xdsArtikelShopQuelle.Name := 'xdsArtikelShopQuelle';\r\n xdsArtikelShopQuelle.FieldName := 'ShopQuelle';\r\n xdsArtikelGeraet.SetParentComponent(xdsArtikel);\r\n xdsArtikelGeraet.Name := 'xdsArtikelGeraet';\r\n xdsArtikelGeraet.FieldName := 'Geraet';\r\n xdsArtikelArtgewicht.SetParentComponent(xdsArtikel);\r\n xdsArtikelArtgewicht.Name := 'xdsArtikelArtgewicht';\r\n xdsArtikelArtgewicht.FieldName := 'Artgewicht';\r\n xdsArtikelVolumen.SetParentComponent(xdsArtikel);\r\n xdsArtikelVolumen.Name := 'xdsArtikelVolumen';\r\n xdsArtikelVolumen.FieldName := 'Volumen';\r\n xdsArtikelPacklisteNichtAnzeigen.SetParentComponent(xdsArtikel);\r\n xdsArtikelPacklisteNichtAnzeigen.Name := 'xdsArtikelPacklisteNichtAnzeigen';\r\n xdsArtikelPacklisteNichtAnzeigen.FieldName := 'PacklisteNichtAnzeigen';\r\n xdsArtikelKeineAufschlagskalkulation.SetParentComponent(xdsArtikel);\r\n xdsArtikelKeineAufschlagskalkulation.Name := 'xdsArtikelKeineAufschlagskalkulation';\r\n xdsArtikelKeineAufschlagskalkulation.FieldName := 'KeineAufschlagskalkulation';\r\n xdsArtikelKorrekturMenge.SetParentComponent(xdsArtikel);\r\n xdsArtikelKorrekturMenge.Name := 'xdsArtikelKorrekturMenge';\r\n xdsArtikelKorrekturMenge.FieldName := 'KorrekturMenge';\r\n xdsArtikelKorrekturWert.SetParentComponent(xdsArtikel);\r\n xdsArtikelKorrekturWert.Name := 'xdsArtikelKorrekturWert';\r\n xdsArtikelKorrekturWert.FieldName := 'KorrekturWert';\r\n xdsArtikelNachfolgeartikel.SetParentComponent(xdsArtikel);\r\n xdsArtikelNachfolgeartikel.Name := 'xdsArtikelNachfolgeartikel';\r\n xdsArtikelNachfolgeartikel.FieldName := 'Nachfolgeartikel';\r\n xdsArtikelNachfolgeartikel.Size := 25;\r\n xdsArtikelMindestbestellmenge.SetParentComponent(xdsArtikel);\r\n xdsArtikelMindestbestellmenge.Name := 'xdsArtikelMindestbestellmenge';\r\n xdsArtikelMindestbestellmenge.FieldName := 'Mindestbestellmenge';\r\n xdsArtikelSchnittEK.SetParentComponent(xdsArtikel);\r\n xdsArtikelSchnittEK.Name := 'xdsArtikelSchnittEK';\r\n xdsArtikelSchnittEK.FieldName := 'SchnittEK';\r\n xdsArtikelVerkaufspreisVom.SetParentComponent(xdsArtikel);\r\n xdsArtikelVerkaufspreisVom.Name := 'xdsArtikelVerkaufspreisVom';\r\n xdsArtikelVerkaufspreisVom.FieldName := 'VerkaufspreisVom';\r\n xdsArtikelPruefungChargeSNR.SetParentComponent(xdsArtikel);\r\n xdsArtikelPruefungChargeSNR.Name := 'xdsArtikelPruefungChargeSNR';\r\n xdsArtikelPruefungChargeSNR.FieldName := 'PruefungChargeSNR';\r\n xdsArtikelArtikelbeschreibungHTML.SetParentComponent(xdsArtikel);\r\n xdsArtikelArtikelbeschreibungHTML.Name := 'xdsArtikelArtikelbeschreibungHTML';\r\n xdsArtikelArtikelbeschreibungHTML.FieldName := 'ArtikelbeschreibungHTML';\r\n xdsArtikelArtikelbeschreibungHTML.Size := 255;\r\n xdsArtikelProduktKurzbeschreibungHTML.SetParentComponent(xdsArtikel);\r\n xdsArtikelProduktKurzbeschreibungHTML.Name := 'xdsArtikelProduktKurzbeschreibungHTML';\r\n xdsArtikelProduktKurzbeschreibungHTML.FieldName := 'ProduktKurzbeschreibungHTML';\r\n xdsArtikelProduktKurzbeschreibungHTML.Size := 255;\r\n xdsArtikelStatusFuerShop.SetParentComponent(xdsArtikel);\r\n xdsArtikelStatusFuerShop.Name := 'xdsArtikelStatusFuerShop';\r\n xdsArtikelStatusFuerShop.FieldName := 'StatusFuerShop';\r\n xdsArtikelStatusFuerShop.Size := 25;\r\n xdsArtikelAmpelFuerShop.SetParentComponent(xdsArtikel);\r\n xdsArtikelAmpelFuerShop.Name := 'xdsArtikelAmpelFuerShop';\r\n xdsArtikelAmpelFuerShop.FieldName := 'AmpelFuerShop';\r\n xdsArtikelAmpelFuerShop.Size := 25;\r\n xdsArtikelEXP_Anzahl.SetParentComponent(xdsArtikel);\r\n xdsArtikelEXP_Anzahl.Name := 'xdsArtikelEXP_Anzahl';\r\n xdsArtikelEXP_Anzahl.FieldName := 'EXP_Anzahl';\r\n xdsArtikelEXP_Inhalt.SetParentComponent(xdsArtikel);\r\n xdsArtikelEXP_Inhalt.Name := 'xdsArtikelEXP_Inhalt';\r\n xdsArtikelEXP_Inhalt.FieldName := 'EXP_Inhalt';\r\n xdsArtikelEXP_Faktor.SetParentComponent(xdsArtikel);\r\n xdsArtikelEXP_Faktor.Name := 'xdsArtikelEXP_Faktor';\r\n xdsArtikelEXP_Faktor.FieldName := 'EXP_Faktor';\r\n xdsArtikelFach.SetParentComponent(xdsArtikel);\r\n xdsArtikelFach.Name := 'xdsArtikelFach';\r\n xdsArtikelFach.FieldName := 'Fach';\r\n xdsArtikelExportKasse.SetParentComponent(xdsArtikel);\r\n xdsArtikelExportKasse.Name := 'xdsArtikelExportKasse';\r\n xdsArtikelExportKasse.FieldName := 'ExportKasse';\r\n xdsArtikelWKNR.SetParentComponent(xdsArtikel);\r\n xdsArtikelWKNR.Name := 'xdsArtikelWKNR';\r\n xdsArtikelWKNR.FieldName := 'WKNR';\r\n xdsArtikelArtikelAttribute.SetParentComponent(xdsArtikel);\r\n xdsArtikelArtikelAttribute.Name := 'xdsArtikelArtikelAttribute';\r\n xdsArtikelArtikelAttribute.FieldName := 'ArtikelAttribute';\r\n xdsArtikelArtikelAttribute.Size := 255;\r\n xdsArtikelErstelltAm.SetParentComponent(xdsArtikel);\r\n xdsArtikelErstelltAm.Name := 'xdsArtikelErstelltAm';\r\n xdsArtikelErstelltAm.FieldName := 'ErstelltAm';\r\n xdsArtikelVarianteVonAN.SetParentComponent(xdsArtikel);\r\n xdsArtikelVarianteVonAN.Name := 'xdsArtikelVarianteVonAN';\r\n xdsArtikelVarianteVonAN.FieldName := 'VarianteVonAN';\r\n xdsArtikelVarianteVonAN.Size := 25;\r\n xdsArtikelGurtmassWerte.SetParentComponent(xdsArtikel);\r\n xdsArtikelGurtmassWerte.Name := 'xdsArtikelGurtmassWerte';\r\n xdsArtikelGurtmassWerte.FieldName := 'GurtmassWerte';\r\n xdsArtikelGurtmassWerte.Size := 250;\r\n xdsArtikelGurtmass.SetParentComponent(xdsArtikel);\r\n xdsArtikelGurtmass.Name := 'xdsArtikelGurtmass';\r\n xdsArtikelGurtmass.FieldName := 'Gurtmass';\r\n xdsArtikelAltersgrenze.SetParentComponent(xdsArtikel);\r\n xdsArtikelAltersgrenze.Name := 'xdsArtikelAltersgrenze';\r\n xdsArtikelAltersgrenze.FieldName := 'Altersgrenze';\r\n xdsArtikelMWStKeyImHaus.SetParentComponent(xdsArtikel);\r\n xdsArtikelMWStKeyImHaus.Name := 'xdsArtikelMWStKeyImHaus';\r\n xdsArtikelMWStKeyImHaus.FieldName := 'MWStKeyImHaus';\r\n xdsArtikelKasseBewegung.SetParentComponent(xdsArtikel);\r\n xdsArtikelKasseBewegung.Name := 'xdsArtikelKasseBewegung';\r\n xdsArtikelKasseBewegung.FieldName := 'KasseBewegung';\r\n xdsArtikelKasseBewegungEK.SetParentComponent(xdsArtikel);\r\n xdsArtikelKasseBewegungEK.Name := 'xdsArtikelKasseBewegungEK';\r\n xdsArtikelKasseBewegungEK.FieldName := 'KasseBewegungEK';\r\n xdsArtikelKasseBewegungVK.SetParentComponent(xdsArtikel);\r\n xdsArtikelKasseBewegungVK.Name := 'xdsArtikelKasseBewegungVK';\r\n xdsArtikelKasseBewegungVK.FieldName := 'KasseBewegungVK';\r\n xdsArtikelProduktionBewegung.SetParentComponent(xdsArtikel);\r\n xdsArtikelProduktionBewegung.Name := 'xdsArtikelProduktionBewegung';\r\n xdsArtikelProduktionBewegung.FieldName := 'ProduktionBewegung';\r\n xdsArtikelProduktionBewegungEK.SetParentComponent(xdsArtikel);\r\n xdsArtikelProduktionBewegungEK.Name := 'xdsArtikelProduktionBewegungEK';\r\n xdsArtikelProduktionBewegungEK.FieldName := 'ProduktionBewegungEK';\r\n xdsArtikelProduktionBewegungVK.SetParentComponent(xdsArtikel);\r\n xdsArtikelProduktionBewegungVK.Name := 'xdsArtikelProduktionBewegungVK';\r\n xdsArtikelProduktionBewegungVK.FieldName := 'ProduktionBewegungVK';\r\n xdsArtikelWaWiAB.SetParentComponent(xdsArtikel);\r\n xdsArtikelWaWiAB.Name := 'xdsArtikelWaWiAB';\r\n xdsArtikelWaWiAB.FieldName := 'WaWiAB';\r\n xdsArtikelGeaendertAm.SetParentComponent(xdsArtikel);\r\n xdsArtikelGeaendertAm.Name := 'xdsArtikelGeaendertAm';\r\n xdsArtikelGeaendertAm.FieldName := 'GeaendertAm';\r\n xdsArtikelGefahrgutKennzeichen.SetParentComponent(xdsArtikel);\r\n xdsArtikelGefahrgutKennzeichen.Name := 'xdsArtikelGefahrgutKennzeichen';\r\n xdsArtikelGefahrgutKennzeichen.FieldName := 'GefahrgutKennzeichen';\r\n xdsArtikelGefahrgutKennzeichen.Size := 50;\r\n xdsArtikelVerpackG.SetParentComponent(xdsArtikel);\r\n xdsArtikelVerpackG.Name := 'xdsArtikelVerpackG';\r\n xdsArtikelVerpackG.FieldName := 'VerpackG';\r\n xdsArtikelUPE.SetParentComponent(xdsArtikel);\r\n xdsArtikelUPE.Name := 'xdsArtikelUPE';\r\n xdsArtikelUPE.FieldName := 'UPE';\r\n xdsArtikelArtikelbeschreibungEinkauf.SetParentComponent(xdsArtikel);\r\n xdsArtikelArtikelbeschreibungEinkauf.Name := 'xdsArtikelArtikelbeschreibungEinkauf';\r\n xdsArtikelArtikelbeschreibungEinkauf.FieldName := 'ArtikelbeschreibungEinkauf';\r\n xdsArtikelArtikelbeschreibungEinkauf.Size := 255;\r\n xdsArtikelHerstellerArtikelnummer.SetParentComponent(xdsArtikel);\r\n xdsArtikelHerstellerArtikelnummer.Name := 'xdsArtikelHerstellerArtikelnummer';\r\n xdsArtikelHerstellerArtikelnummer.FieldName := 'HerstellerArtikelnummer';\r\n xdsArtikelHerstellerArtikelnummer.Size := 25;\r\n xdsArtikelNatura.SetParentComponent(xdsArtikel);\r\n xdsArtikelNatura.Name := 'xdsArtikelNatura';\r\n xdsArtikelNatura.FieldName := 'Natura';\r\n xdsArtikelNatura.Size := 5;\r\n xdsArtikelArbeitszeit.SetParentComponent(xdsArtikel);\r\n xdsArtikelArbeitszeit.Name := 'xdsArtikelArbeitszeit';\r\n xdsArtikelArbeitszeit.FieldName := 'Arbeitszeit';\r\n xdsArtikelPKey.SetParentComponent(xdsArtikel);\r\n xdsArtikelPKey.Name := 'xdsArtikelPKey';\r\n xdsArtikelPKey.FieldName := 'PKey';\r\n xdsArtikelVersandklasse.SetParentComponent(xdsArtikel);\r\n xdsArtikelVersandklasse.Name := 'xdsArtikelVersandklasse';\r\n xdsArtikelVersandklasse.FieldName := 'Versandklasse';\r\n xdsArtikelVersandklasse.Size := 25;\r\n WClient.SetParentComponent(Self);\r\n WClient.Name := 'WClient';\r\n WClient.Connection := DM2.XDataWebConnection1;\r\n WClient.Left := 144;\r\n WClient.Top := 24;\r\n finally\r\n ResultLabel.AfterLoadDFMValues;\r\n Container1.AfterLoadDFMValues;\r\n Container2.AfterLoadDFMValues;\r\n Container3.AfterLoadDFMValues;\r\n btnzurueck.AfterLoadDFMValues;\r\n TC.AfterLoadDFMValues;\r\n container4.AfterLoadDFMValues;\r\n Container5.AfterLoadDFMValues;\r\n edtsuchbegriff.AfterLoadDFMValues;\r\n btnSuche.AfterLoadDFMValues;\r\n btnScan.AfterLoadDFMValues;\r\n TCArtikel.AfterLoadDFMValues;\r\n edtBMenge.AfterLoadDFMValues;\r\n btnSpeichern.AfterLoadDFMValues;\r\n btnEtikettendruck.AfterLoadDFMValues;\r\n xdsBestellvormerkung.AfterLoadDFMValues;\r\n xdsBestellvormerkungID.AfterLoadDFMValues;\r\n xdsBestellvormerkungArtikelnummer.AfterLoadDFMValues;\r\n xdsBestellvormerkungArtikelueberschrift.AfterLoadDFMValues;\r\n xdsBestellvormerkungMenge.AfterLoadDFMValues;\r\n xdsBestellvormerkungLieferantennummer.AfterLoadDFMValues;\r\n xdsBestellvormerkungerstellt.AfterLoadDFMValues;\r\n xdsBestellvormerkungBelegnummer.AfterLoadDFMValues;\r\n xdsBestellvormerkungLieferantenname.AfterLoadDFMValues;\r\n xdsArtikel.AfterLoadDFMValues;\r\n xdsArtikelHersteller.AfterLoadDFMValues;\r\n xdsArtikelHerstellerHersteller.AfterLoadDFMValues;\r\n xdsArtikelHerstellerHerstellerID.AfterLoadDFMValues;\r\n xdsArtikelHerstellerHerstellerURL.AfterLoadDFMValues;\r\n xdsArtikelArtderMenge.AfterLoadDFMValues;\r\n xdsArtikelArtderMengeArtderMenge.AfterLoadDFMValues;\r\n xdsArtikelArtderMengeISO3.AfterLoadDFMValues;\r\n xdsArtikelArtderMengeMengenauswahl.AfterLoadDFMValues;\r\n xdsArtikelArtderMengeVGPauswahl.AfterLoadDFMValues;\r\n xdsArtikelArtderMengeUVPauswahl.AfterLoadDFMValues;\r\n xdsArtikelArtderMengeVKPDivisor.AfterLoadDFMValues;\r\n xdsArtikelPfandArt.AfterLoadDFMValues;\r\n xdsArtikelPfandArtPfandArt.AfterLoadDFMValues;\r\n xdsArtikelPfandArtPfandWert.AfterLoadDFMValues;\r\n xdsArtikelPfandArtPfandwertEK.AfterLoadDFMValues;\r\n xdsArtikelWarengruppe.AfterLoadDFMValues;\r\n xdsArtikelWarengruppeWarengruppe.AfterLoadDFMValues;\r\n xdsArtikelWarengruppeWGNR.AfterLoadDFMValues;\r\n xdsArtikelWarenuntergruppe.AfterLoadDFMValues;\r\n xdsArtikelWarenuntergruppeWarenuntergruppe.AfterLoadDFMValues;\r\n xdsArtikelWarenuntergruppeWarengruppe.AfterLoadDFMValues;\r\n xdsArtikelWarenuntergruppeWUGNR.AfterLoadDFMValues;\r\n xdsArtikelWarenuntergruppeWGNR.AfterLoadDFMValues;\r\n xdsArtikelArtikelnummer.AfterLoadDFMValues;\r\n xdsArtikelArtikelueberschrift.AfterLoadDFMValues;\r\n xdsArtikelArtikelbeschreibung.AfterLoadDFMValues;\r\n xdsArtikelVerkaufspreis.AfterLoadDFMValues;\r\n xdsArtikelMindestbestand.AfterLoadDFMValues;\r\n xdsArtikelPreisliste.AfterLoadDFMValues;\r\n xdsArtikelGewicht.AfterLoadDFMValues;\r\n xdsArtikelLaenge.AfterLoadDFMValues;\r\n xdsArtikelBreite.AfterLoadDFMValues;\r\n xdsArtikelHoehe.AfterLoadDFMValues;\r\n xdsArtikelArtikelZusatz.AfterLoadDFMValues;\r\n xdsArtikelLagerort.AfterLoadDFMValues;\r\n xdsArtikelBuchungskonto.AfterLoadDFMValues;\r\n xdsArtikelEingangMenge.AfterLoadDFMValues;\r\n xdsArtikelEingangEndpreis.AfterLoadDFMValues;\r\n xdsArtikelAusgangMenge.AfterLoadDFMValues;\r\n xdsArtikelAusgangEndpreisEK.AfterLoadDFMValues;\r\n xdsArtikelAusgangEndpreisVK.AfterLoadDFMValues;\r\n xdsArtikelBestand.AfterLoadDFMValues;\r\n xdsArtikelBestandswert.AfterLoadDFMValues;\r\n xdsArtikelMarge.AfterLoadDFMValues;\r\n xdsArtikelMargeProzent.AfterLoadDFMValues;\r\n xdsArtikelArtikelnummer2.AfterLoadDFMValues;\r\n xdsArtikelArtikelmatchcode.AfterLoadDFMValues;\r\n xdsArtikelRabattpreis1.AfterLoadDFMValues;\r\n xdsArtikelRabattpreis2.AfterLoadDFMValues;\r\n xdsArtikelRabattpreis3.AfterLoadDFMValues;\r\n xdsArtikelRabattpreis4.AfterLoadDFMValues;\r\n xdsArtikelRabattpreis5.AfterLoadDFMValues;\r\n xdsArtikelArtikelnichtmehrgueltig.AfterLoadDFMValues;\r\n xdsArtikelEinkaufspreis.AfterLoadDFMValues;\r\n xdsArtikelAufschlag.AfterLoadDFMValues;\r\n xdsArtikelWarenbestand.AfterLoadDFMValues;\r\n xdsArtikelTextfrei10.AfterLoadDFMValues;\r\n xdsArtikelTextfrei20.AfterLoadDFMValues;\r\n xdsArtikelArtikelbeschreibungRTF.AfterLoadDFMValues;\r\n xdsArtikelArtikeldatei1.AfterLoadDFMValues;\r\n xdsArtikelArtikeldatei2.AfterLoadDFMValues;\r\n xdsArtikelArtikeldatei3.AfterLoadDFMValues;\r\n xdsArtikelArtikeldatei4.AfterLoadDFMValues;\r\n xdsArtikelArtikeldatei5.AfterLoadDFMValues;\r\n xdsArtikelEinkaufspreisVom.AfterLoadDFMValues;\r\n xdsArtikelEAN.AfterLoadDFMValues;\r\n xdsArtikelVGPFaktor.AfterLoadDFMValues;\r\n xdsArtikelVGPMengenart.AfterLoadDFMValues;\r\n xdsArtikelVerleihpreis.AfterLoadDFMValues;\r\n xdsArtikelZusatzPreis.AfterLoadDFMValues;\r\n xdsArtikelVerpackungsart.AfterLoadDFMValues;\r\n xdsArtikelVerpackungsMenge.AfterLoadDFMValues;\r\n xdsArtikelQuellartikel.AfterLoadDFMValues;\r\n xdsArtikelrabattierfaehig.AfterLoadDFMValues;\r\n xdsArtikelAngebotAlternativeAN.AfterLoadDFMValues;\r\n xdsArtikelPreisanteilNetto.AfterLoadDFMValues;\r\n xdsArtikelFarbe.AfterLoadDFMValues;\r\n xdsArtikelAEinkauf.AfterLoadDFMValues;\r\n xdsArtikelAVerkauf.AfterLoadDFMValues;\r\n xdsArtikelArtikelnummerLieferant.AfterLoadDFMValues;\r\n xdsArtikelLieferantnummer.AfterLoadDFMValues;\r\n xdsArtikelVerkaufspreisBrutto.AfterLoadDFMValues;\r\n xdsArtikelArtikelSet.AfterLoadDFMValues;\r\n xdsArtikelProvisionssatz.AfterLoadDFMValues;\r\n xdsArtikelWarentarifnummer.AfterLoadDFMValues;\r\n xdsArtikelHandelsartikel.AfterLoadDFMValues;\r\n xdsArtikelUrsprungsland.AfterLoadDFMValues;\r\n xdsArtikelKategorie.AfterLoadDFMValues;\r\n xdsArtikelStandardRabattsatzEK.AfterLoadDFMValues;\r\n xdsArtikelStandardRabattsatzVK.AfterLoadDFMValues;\r\n xdsArtikelRabattpreiseManuell.AfterLoadDFMValues;\r\n xdsArtikelMengeBestellt.AfterLoadDFMValues;\r\n xdsArtikelMengeBeauftragt.AfterLoadDFMValues;\r\n xdsArtikelBestandDisponiert.AfterLoadDFMValues;\r\n xdsArtikelMengeAngeboten.AfterLoadDFMValues;\r\n xdsArtikelBestandDispInclAngebot.AfterLoadDFMValues;\r\n xdsArtikelMWStKey.AfterLoadDFMValues;\r\n xdsArtikelShopAmazon.AfterLoadDFMValues;\r\n xdsArtikelShopQuelle.AfterLoadDFMValues;\r\n xdsArtikelGeraet.AfterLoadDFMValues;\r\n xdsArtikelArtgewicht.AfterLoadDFMValues;\r\n xdsArtikelVolumen.AfterLoadDFMValues;\r\n xdsArtikelPacklisteNichtAnzeigen.AfterLoadDFMValues;\r\n xdsArtikelKeineAufschlagskalkulation.AfterLoadDFMValues;\r\n xdsArtikelKorrekturMenge.AfterLoadDFMValues;\r\n xdsArtikelKorrekturWert.AfterLoadDFMValues;\r\n xdsArtikelNachfolgeartikel.AfterLoadDFMValues;\r\n xdsArtikelMindestbestellmenge.AfterLoadDFMValues;\r\n xdsArtikelSchnittEK.AfterLoadDFMValues;\r\n xdsArtikelVerkaufspreisVom.AfterLoadDFMValues;\r\n xdsArtikelPruefungChargeSNR.AfterLoadDFMValues;\r\n xdsArtikelArtikelbeschreibungHTML.AfterLoadDFMValues;\r\n xdsArtikelProduktKurzbeschreibungHTML.AfterLoadDFMValues;\r\n xdsArtikelStatusFuerShop.AfterLoadDFMValues;\r\n xdsArtikelAmpelFuerShop.AfterLoadDFMValues;\r\n xdsArtikelEXP_Anzahl.AfterLoadDFMValues;\r\n xdsArtikelEXP_Inhalt.AfterLoadDFMValues;\r\n xdsArtikelEXP_Faktor.AfterLoadDFMValues;\r\n xdsArtikelFach.AfterLoadDFMValues;\r\n xdsArtikelExportKasse.AfterLoadDFMValues;\r\n xdsArtikelWKNR.AfterLoadDFMValues;\r\n xdsArtikelArtikelAttribute.AfterLoadDFMValues;\r\n xdsArtikelErstelltAm.AfterLoadDFMValues;\r\n xdsArtikelVarianteVonAN.AfterLoadDFMValues;\r\n xdsArtikelGurtmassWerte.AfterLoadDFMValues;\r\n xdsArtikelGurtmass.AfterLoadDFMValues;\r\n xdsArtikelAltersgrenze.AfterLoadDFMValues;\r\n xdsArtikelMWStKeyImHaus.AfterLoadDFMValues;\r\n xdsArtikelKasseBewegung.AfterLoadDFMValues;\r\n xdsArtikelKasseBewegungEK.AfterLoadDFMValues;\r\n xdsArtikelKasseBewegungVK.AfterLoadDFMValues;\r\n xdsArtikelProduktionBewegung.AfterLoadDFMValues;\r\n xdsArtikelProduktionBewegungEK.AfterLoadDFMValues;\r\n xdsArtikelProduktionBewegungVK.AfterLoadDFMValues;\r\n xdsArtikelWaWiAB.AfterLoadDFMValues;\r\n xdsArtikelGeaendertAm.AfterLoadDFMValues;\r\n xdsArtikelGefahrgutKennzeichen.AfterLoadDFMValues;\r\n xdsArtikelVerpackG.AfterLoadDFMValues;\r\n xdsArtikelUPE.AfterLoadDFMValues;\r\n xdsArtikelArtikelbeschreibungEinkauf.AfterLoadDFMValues;\r\n xdsArtikelHerstellerArtikelnummer.AfterLoadDFMValues;\r\n xdsArtikelNatura.AfterLoadDFMValues;\r\n xdsArtikelArbeitszeit.AfterLoadDFMValues;\r\n xdsArtikelPKey.AfterLoadDFMValues;\r\n xdsArtikelVersandklasse.AfterLoadDFMValues;\r\n WClient.AfterLoadDFMValues;\r\n end;\r\nend;\r\n\r\nend.","unit unit_TelefonSuche;\r\n\r\ninterface\r\n\r\nuses\r\n System.SysUtils, System.Classes, JS, Web, WEBLib.Graphics, WEBLib.Controls,\r\n WEBLib.Forms, WEBLib.Dialogs, Data.DB, WEBLib.DB, XData.Web.JsonDataset,\r\n XData.Web.Dataset, XData.Web.Connection, Vcl.Controls, Vcl.StdCtrls,\r\n WEBLib.StdCtrls, WEBLib.ExtCtrls, Vcl.Grids, WEBLib.DBCtrls,\r\n strutils, WEBLib.Grids, WEBLib.Buttons, DB;\r\n\r\ntype\r\n TfrmTelefonSuche = class(TForm)\r\n DataSet: TXDataWebDataSet;\r\n Source: TDataSource;\r\n Container1: THTMLContainer;\r\n Container2: THTMLContainer;\r\n Container3: THTMLContainer;\r\n TC: TTableControl;\r\n btnzurueck: TButton;\r\n edtSuchbegriff: TEdit;\r\n ResultLabel: TLabel;\r\n DataSetTelefonnummer: TStringField;\r\n DataSetKundennummer: TStringField;\r\n DataSetAPID: TStringField;\r\n DataSetTeilnehmer: TStringField;\r\n DataSetTelefonTyp: TStringField;\r\n DataSetweitere: TBooleanField;\r\n procedure WebFormShow(Sender: TObject);\r\n procedure DataSetAfterOpen(DataSet: TDataSet);\r\n procedure btnzurueckClick(Sender: TObject);\r\n procedure edtSuchbegriffChange(Sender: TObject);\r\n\r\n public\r\n Kontaktnummer:string;\r\n weiterzuEinzelkontakt:boolean;\r\n buttonkundennummer:TButton;\r\n procedure buttonkundennummerclick(Sender:TObject);\r\n protected procedure LoadDFMValues; override; end;\r\n\r\nvar\r\n frmTelefonSuche: TfrmTelefonSuche;\r\n\r\nimplementation\r\n uses unit1, unit2, unit_EinzelKontakt;\r\n{$R *.dfm}\r\n\r\n\r\nprocedure TfrmTelefonSuche.btnzurueckClick(Sender: TObject);\r\nbegin\r\n self.Close;\r\nend;\r\n\r\nprocedure TfrmTelefonSuche.buttonkundennummerclick(Sender:TObject);\r\nvar\r\n MFrm:TEinzelkontakt;\r\n procedure AfterCreate(AForm:TObject);\r\n var\r\n MForm:TEinzelkontakt;\r\n begin\r\n MForm:=(AForm as TEinzelkontakt);\r\n MForm.KundennummerID:=Kontaktnummer;\r\n end;\r\n\r\n procedure AfterShowmodal(Avalue:TModalResult);\r\n begin\r\n edtsuchbegriffChange(nil);\r\n end;\r\n\r\n begin\r\n\r\n Kontaktnummer:=(sender as TButton).Caption;\r\n if length(Kontaktnummer)<5 then\r\n begin\r\n showmessage('Kontaktdaten sind nicht verfügbar');\r\n end\r\n else\r\n begin\r\n if weiterzueinzelkontakt then\r\n begin\r\n Container3.HTML.Text:='';\r\n MFrm:=TEinzelkontakt.CreateNew(@AfterCreate);\r\n MFrm.ShowModal(@AfterShowmodal);\r\n end\r\n else\r\n begin\r\n self.Close;\r\n end;\r\n end;\r\nend;\r\n\r\n\r\n\r\nprocedure TfrmTelefonSuche.DataSetAfterOpen(DataSet: TDataSet);\r\nvar\r\n i:integer;\r\n myelement:TJSHTMLElement;\r\nbegin\r\n myelement:=container3.ElementHandle;\r\n tc.ParentElement:=myelement;\r\n i:=0;\r\n TC.visible:=true;\r\n TC.ColCount:=3;\r\n tc.RowCount:=dataset.RecordCount+1;\r\n tc.Cells[0,i]:='Kundennummer';\r\n tc.Cells[1,i]:='Telefonnummer';\r\n tc.Cells[2,i]:='Teilnehmer';\r\n dataset.First;\r\n if dataset.RecordCount=0 then resultlabel.Caption:='nichts gefunden';\r\n if dataset.RecordCount>0 then resultlabel.Caption:='Übereinstimmungen: '+inttostr(dataset.RecordCount);\r\n if dataset.RecordCount>20 then resultlabel.Caption:='mehr als 20 Übereinstimmungen';\r\n\r\n while not dataset.eof do\r\n begin\r\n inc(i);\r\n myelement:=TC.cellelements[0,i];\r\n myelement.innerHTML:='';\r\n buttonkundennummer:=TButton.Create(self);\r\n buttonkundennummer.ElementClassName:='btn btn-sm btn-info';\r\n buttonkundennummer.HeightStyle:=ssauto;\r\n buttonkundennummer.Width:=150;\r\n buttonkundennummer.tag:=0;\r\n buttonkundennummer.Caption:=DataSetKundennummer.AsString;\r\n buttonkundennummer.OnClick:=@buttonkundennummerClick;\r\n buttonkundennummer.ParentElement:=myelement;\r\n TC.Cells[1,i]:=DataSetTelefonnummer.AsString;\r\n TC.Cells[2,i]:=DataSetTeilnehmer.AsString;\r\n dataset.Next;\r\n end;\r\n\r\nend;\r\n\r\n\r\n\r\nprocedure TfrmTelefonSuche.edtSuchbegriffChange(Sender: TObject);\r\nvar\r\n suchtextkontakt:string;\r\nbegin\r\n suchtextkontakt:=edtsuchbegriff.Text;\r\n if length(suchtextkontakt)>0 then\r\n begin\r\n dataset.Close;\r\n dataset.QueryString:='$filter=contains(Telefonnummer, '''+edtsuchbegriff.Text+''')';\r\n dataset.Load;\r\n end;\r\n\r\nend;\r\n\r\nprocedure TfrmTelefonSuche.WebFormShow(Sender: TObject);\r\nvar\r\n myelement:TJSHTMLElement;\r\nbegin\r\n Container1.html.text:='';\r\n myelement:=container1.ElementHandle;\r\n btnzurueck.ParentElement:=myelement;\r\n container2.ParentElement:=myelement;\r\n Container3.ParentElement:=myelement;\r\n myelement:=container2.ElementHandle;\r\n resultlabel.Caption:='Suchbegriff';\r\n resultlabel.ParentElement:=myelement;\r\n edtsuchbegriff.ParentElement:=myelement;\r\n TC.Visible:=false;\r\n Kontaktnummer:='';\r\n edtsuchbegriff.SetFocus;\r\nend;\r\n\r\nprocedure TfrmTelefonSuche.LoadDFMValues;\r\nbegin\r\n inherited LoadDFMValues;\r\n\r\n ResultLabel := TLabel.Create(Self);\r\n Container1 := THTMLContainer.Create(Self);\r\n Container2 := THTMLContainer.Create(Self);\r\n Container3 := THTMLContainer.Create(Self);\r\n TC := TTableControl.Create(Self);\r\n btnzurueck := TButton.Create(Self);\r\n edtSuchbegriff := TEdit.Create(Self);\r\n DataSet := TXDataWebDataSet.Create(Self);\r\n DataSetTelefonnummer := TStringField.Create(Self);\r\n DataSetKundennummer := TStringField.Create(Self);\r\n DataSetAPID := TStringField.Create(Self);\r\n DataSetTeilnehmer := TStringField.Create(Self);\r\n DataSetTelefonTyp := TStringField.Create(Self);\r\n DataSetweitere := TBooleanField.Create(Self);\r\n Source := TDataSource.Create(Self);\r\n\r\n ResultLabel.BeforeLoadDFMValues;\r\n Container1.BeforeLoadDFMValues;\r\n Container2.BeforeLoadDFMValues;\r\n Container3.BeforeLoadDFMValues;\r\n TC.BeforeLoadDFMValues;\r\n btnzurueck.BeforeLoadDFMValues;\r\n edtSuchbegriff.BeforeLoadDFMValues;\r\n DataSet.BeforeLoadDFMValues;\r\n DataSetTelefonnummer.BeforeLoadDFMValues;\r\n DataSetKundennummer.BeforeLoadDFMValues;\r\n DataSetAPID.BeforeLoadDFMValues;\r\n DataSetTeilnehmer.BeforeLoadDFMValues;\r\n DataSetTelefonTyp.BeforeLoadDFMValues;\r\n DataSetweitere.BeforeLoadDFMValues;\r\n Source.BeforeLoadDFMValues;\r\n try\r\n Name := 'frmTelefonSuche';\r\n Width := 223;\r\n Height := 376;\r\n CSSLibrary := cssBootstrap;\r\n ElementFont := efCSS;\r\n SetEvent(Self, 'OnShow', 'WebFormShow');\r\n ResultLabel.SetParentComponent(Self);\r\n ResultLabel.Name := 'ResultLabel';\r\n ResultLabel.Left := 114;\r\n ResultLabel.Top := 231;\r\n ResultLabel.Width := 60;\r\n ResultLabel.Height := 15;\r\n ResultLabel.Caption := 'ResultLabel';\r\n ResultLabel.ElementClassName := 'h6 m-2';\r\n ResultLabel.ElementFont := efCSS;\r\n ResultLabel.ElementPosition := epIgnore;\r\n ResultLabel.HeightStyle := ssAuto;\r\n ResultLabel.HeightPercent := 100.000000000000000000;\r\n ResultLabel.WidthStyle := ssPercent;\r\n ResultLabel.WidthPercent := 100.000000000000000000;\r\n Container1.SetParentComponent(Self);\r\n Container1.Name := 'Container1';\r\n Container1.Left := 0;\r\n Container1.Top := 0;\r\n Container1.Width := 169;\r\n Container1.Height := 41;\r\n Container1.HeightStyle := ssAuto;\r\n Container1.WidthStyle := ssPercent;\r\n Container1.ElementFont := efCSS;\r\n Container1.ElementPosition := epIgnore;\r\n Container2.SetParentComponent(Self);\r\n Container2.Name := 'Container2';\r\n Container2.Left := 0;\r\n Container2.Top := 47;\r\n Container2.Width := 169;\r\n Container2.Height := 41;\r\n Container2.ElementClassName := 'd-flex flex-wrap m-1 border border-info';\r\n Container2.HeightStyle := ssAuto;\r\n Container2.WidthStyle := ssAuto;\r\n Container2.ChildOrder := 1;\r\n Container2.ElementFont := efCSS;\r\n Container2.ElementPosition := epIgnore;\r\n Container3.SetParentComponent(Self);\r\n Container3.Name := 'Container3';\r\n Container3.Left := 0;\r\n Container3.Top := 94;\r\n Container3.Width := 169;\r\n Container3.Height := 41;\r\n Container3.ElementClassName := 'd-flex m-1';\r\n Container3.HeightStyle := ssAuto;\r\n Container3.WidthStyle := ssAuto;\r\n Container3.ChildOrder := 2;\r\n Container3.ElementFont := efCSS;\r\n Container3.ElementPosition := epIgnore;\r\n TC.SetParentComponent(Self);\r\n TC.Name := 'TC';\r\n TC.Left := 0;\r\n TC.Top := 141;\r\n TC.Width := 169;\r\n TC.Height := 79;\r\n TC.ElementClassName := 'table table-hover table-bordered table-striped';\r\n TC.HeightStyle := ssAuto;\r\n TC.WidthStyle := ssPercent;\r\n TC.BorderColor := clSilver;\r\n TC.ChildOrder := 3;\r\n TC.ColHeader := False;\r\n TC.ElementFont := efCSS;\r\n TC.ElementHeaderClassName := 'table-info';\r\n TC.ElementPosition := epIgnore;\r\n TC.ElementTableClassName := 'table table-hover table-bordered table-striped';\r\n TC.WordWrap := True;\r\n TC.ColCount := 1;\r\n TC.RowCount := 5;\r\n btnzurueck.SetParentComponent(Self);\r\n btnzurueck.Name := 'btnzurueck';\r\n btnzurueck.Left := 0;\r\n btnzurueck.Top := 226;\r\n btnzurueck.Width := 96;\r\n btnzurueck.Height := 25;\r\n btnzurueck.Caption := '<< zur'#252'ck';\r\n btnzurueck.ChildOrder := 4;\r\n btnzurueck.ElementClassName := 'btn btn-info btn-sm m-1 text-left';\r\n btnzurueck.ElementFont := efCSS;\r\n btnzurueck.ElementPosition := epIgnore;\r\n btnzurueck.HeightStyle := ssAuto;\r\n btnzurueck.HeightPercent := 100.000000000000000000;\r\n btnzurueck.WidthStyle := ssAuto;\r\n btnzurueck.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnzurueck, Self, 'OnClick', 'btnzurueckClick');\r\n edtSuchbegriff.SetParentComponent(Self);\r\n edtSuchbegriff.Name := 'edtSuchbegriff';\r\n edtSuchbegriff.Left := 8;\r\n edtSuchbegriff.Top := 296;\r\n edtSuchbegriff.Width := 150;\r\n edtSuchbegriff.Height := 22;\r\n edtSuchbegriff.ChildOrder := 6;\r\n edtSuchbegriff.ElementClassName := 'form-control input-sm m-1';\r\n edtSuchbegriff.ElementFont := efCSS;\r\n edtSuchbegriff.ElementPosition := epIgnore;\r\n edtSuchbegriff.HeightStyle := ssAuto;\r\n edtSuchbegriff.HeightPercent := 100.000000000000000000;\r\n edtSuchbegriff.ShowHint := True;\r\n edtSuchbegriff.TextHint := 'Suchbegriff eingeben';\r\n edtSuchbegriff.WidthPercent := 60.000000000000000000;\r\n SetEvent(edtSuchbegriff, Self, 'OnChange', 'edtSuchbegriffChange');\r\n DataSet.SetParentComponent(Self);\r\n DataSet.Name := 'DataSet';\r\n DataSet.AfterOpen := DataSetAfterOpen;\r\n DataSet.EntitySetName := 'Telefonnummern';\r\n DataSet.Connection := DM2.XDataWebConnection1;\r\n DataSet.QueryTop := 20;\r\n DataSet.Left := 8;\r\n DataSet.Top := 56;\r\n DataSetTelefonnummer.SetParentComponent(DataSet);\r\n DataSetTelefonnummer.Name := 'DataSetTelefonnummer';\r\n DataSetTelefonnummer.FieldName := 'Telefonnummer';\r\n DataSetTelefonnummer.Required := True;\r\n DataSetTelefonnummer.Size := 25;\r\n DataSetKundennummer.SetParentComponent(DataSet);\r\n DataSetKundennummer.Name := 'DataSetKundennummer';\r\n DataSetKundennummer.FieldName := 'Kundennummer';\r\n DataSetKundennummer.Size := 13;\r\n DataSetAPID.SetParentComponent(DataSet);\r\n DataSetAPID.Name := 'DataSetAPID';\r\n DataSetAPID.FieldName := 'APID';\r\n DataSetAPID.Size := 38;\r\n DataSetTeilnehmer.SetParentComponent(DataSet);\r\n DataSetTeilnehmer.Name := 'DataSetTeilnehmer';\r\n DataSetTeilnehmer.FieldName := 'Teilnehmer';\r\n DataSetTeilnehmer.Size := 150;\r\n DataSetTelefonTyp.SetParentComponent(DataSet);\r\n DataSetTelefonTyp.Name := 'DataSetTelefonTyp';\r\n DataSetTelefonTyp.FieldName := 'TelefonTyp';\r\n DataSetTelefonTyp.Size := 25;\r\n DataSetweitere.SetParentComponent(DataSet);\r\n DataSetweitere.Name := 'DataSetweitere';\r\n DataSetweitere.FieldName := 'weitere';\r\n Source.SetParentComponent(Self);\r\n Source.Name := 'Source';\r\n Source.DataSet := DataSet;\r\n Source.Left := 56;\r\n Source.Top := 56;\r\n finally\r\n ResultLabel.AfterLoadDFMValues;\r\n Container1.AfterLoadDFMValues;\r\n Container2.AfterLoadDFMValues;\r\n Container3.AfterLoadDFMValues;\r\n TC.AfterLoadDFMValues;\r\n btnzurueck.AfterLoadDFMValues;\r\n edtSuchbegriff.AfterLoadDFMValues;\r\n DataSet.AfterLoadDFMValues;\r\n DataSetTelefonnummer.AfterLoadDFMValues;\r\n DataSetKundennummer.AfterLoadDFMValues;\r\n DataSetAPID.AfterLoadDFMValues;\r\n DataSetTeilnehmer.AfterLoadDFMValues;\r\n DataSetTelefonTyp.AfterLoadDFMValues;\r\n DataSetweitere.AfterLoadDFMValues;\r\n Source.AfterLoadDFMValues;\r\n end;\r\nend;\r\n\r\nend.\r\n","unit unit_EinzelMitteilung;\r\n\r\ninterface\r\n\r\nuses\r\n System.SysUtils, System.Classes, JS, Web, WEBLib.Graphics, WEBLib.Controls,\r\n WEBLib.Forms, WEBLib.Dialogs, DB, Vcl.Controls, WEBLib.Grids, strutils,\r\n XData.Web.JsonDataset, XData.Web.Dataset, Vcl.StdCtrls, WEBLib.StdCtrls;\r\n\r\ntype\r\n TEinzelMitteilung = class(TForm)\r\n TC: TTableControl;\r\n xdsMitteilung: TXDataWebDataSet;\r\n sourceMitteilung: TDataSource;\r\n xdsMitteilungMSGBoardID: TXDataWebEntityField;\r\n xdsMitteilungMSGBoardIDFromPersonalnummer: TXDataWebEntityField;\r\n xdsMitteilungMSGBoardIDID: TStringField;\r\n xdsMitteilungMSGBoardIDDatum: TDateTimeField;\r\n xdsMitteilungMSGBoardIDFromNachname: TStringField;\r\n xdsMitteilungMSGBoardIDFromVorname: TStringField;\r\n xdsMitteilungMSGBoardIDBetreff: TStringField;\r\n xdsMitteilungMSGBoardIDNotiz: TStringField;\r\n xdsMitteilungToPersonalnummer: TXDataWebEntityField;\r\n xdsMitteilungToPersonalnummerPersonalnummer: TIntegerField;\r\n xdsMitteilungMSGBoardSubID: TStringField;\r\n xdsMitteilungToNachname: TStringField;\r\n xdsMitteilungToVorname: TStringField;\r\n xdsMitteilungDatumGelesen: TDateTimeField;\r\n xdsMitteilungDatumErledigt: TDateTimeField;\r\n xdsMitteilungMSGBoardIDFromPersonalnummerPersonalnummer: TIntegerField;\r\n btnGelesen: TButton;\r\n btnErledigt: TButton;\r\n btnzurueck: TButton;\r\n procedure WebFormShow(Sender: TObject);\r\n procedure xdsMitteilungAfterOpen(DataSet: TDataSet);\r\n procedure btnGelesenClick(Sender: TObject);\r\n procedure WebFormClose(Sender: TObject; var Action: TCloseAction);\r\n procedure btnErledigtClick(Sender: TObject);\r\n procedure xdsMitteilungAfterPost(DataSet: TDataSet);\r\n procedure xdsMitteilungAfterApplyUpdates(Sender: TDataSet;\r\n Info: TResolveResults);\r\n procedure btnzurueckClick(Sender: TObject);\r\n private\r\n { Private-Deklarationen }\r\n public\r\n { Public-Deklarationen }\r\n MerkerMitteilung:string;\r\n ArtMitteilung:integer;\r\n protected procedure LoadDFMValues; override; end;\r\n\r\nvar\r\n EinzelMitteilung: TEinzelMitteilung;\r\n\r\nimplementation\r\n uses unit1, unit2, unit_Mitteilungen;\r\n{$R *.dfm}\r\n\r\nprocedure TEinzelMitteilung.btnErledigtClick(Sender: TObject);\r\nbegin\r\n xdsmitteilung.Edit;\r\n if xdsMitteilungDatumGelesen.IsNull then xdsMitteilungDatumGelesen.AsDateTime:=date+time;\r\n xdsMitteilungDatumErledigt.AsDateTime:=date+time;\r\n xdsmitteilung.Post;\r\nend;\r\n\r\nprocedure TEinzelMitteilung.btnGelesenClick(Sender: TObject);\r\nbegin\r\n xdsmitteilung.Edit;\r\n xdsMitteilungDatumGelesen.AsDateTime:=date+time;\r\n xdsmitteilung.Post;\r\nend;\r\n\r\nprocedure TEinzelMitteilung.btnzurueckClick(Sender: TObject);\r\nbegin\r\n xdsMitteilung.Close;\r\n self.close;\r\nend;\r\n\r\nprocedure TEinzelMitteilung.WebFormClose(Sender: TObject;\r\n var Action: TCloseAction);\r\nbegin\r\naction:=cafree;\r\nend;\r\n\r\nprocedure TEinzelMitteilung.WebFormShow(Sender: TObject);\r\nbegin\r\n if MerkerMitteilung<>'' then\r\n begin\r\n xdsMitteilung.Close;\r\n xdsMitteilung.QueryString:='$expand=MSGBoardID, ToPersonalnummer, MSGBoardID/FromPersonalnummer&$filter=MSGBoardSubID eq '+QuotedStr(MerkerMitteilung);\r\n xdsMitteilung.Load;\r\n end;\r\nend;\r\n\r\nprocedure TEinzelMitteilung.xdsMitteilungAfterApplyUpdates(Sender: TDataSet;\r\n Info: TResolveResults);\r\nbegin\r\n if info.Records[0].Error<>'' then showmessage(info.Records[0].Error);\r\n xdsMitteilung.Close;\r\n xdsMitteilung.load;\r\nend;\r\n\r\nprocedure TEinzelMitteilung.xdsMitteilungAfterOpen(DataSet: TDataSet);\r\nvar\r\n i:integer;\r\n myelement:TJSHTMLElement;\r\nbegin\r\n i:=0;\r\n TC.ColCount:=2;\r\n tc.rowcount:=10;\r\n TC.Cells[1,i]:='

Einzel-Mitteilung (erhalten)';\r\n if ArtMitteilung=2 then TC.Cells[1,i]:='

Einzel-Mitteilung (gesendet)';\r\n\r\n\r\n inc(i);\r\n myelement:=TC.cellelements[0,i];\r\n btnzurueck.ParentElement:=myelement;\r\n inc(i);\r\n TC.Cells[0,i]:='Datum';\r\n TC.Cells[1,i]:=formatdatetime('DD.MM.YYYY hh:mm:ss',xdsMitteilungMSGBoardIDDatum.asdatetime);\r\n inc(i);\r\n TC.Cells[0,i]:='Betreff';\r\n TC.Cells[1,i]:='

'+xdsMitteilungMSGBoardIDBetreff.asstring+'

';\r\n inc(i);\r\n TC.Cells[0,i]:='Notiz';\r\n TC.Cells[1,i]:='
'+ReplaceStr(xdsMitteilungMSGBoardIDNotiz.asstring,#13+#10,'
')+'
';\r\n inc(i);\r\n TC.Cells[0,i]:='von';\r\n TC.Cells[1,i]:=xdsMitteilungMSGBoardIDFromNachname.asstring+', '+xdsMitteilungMSGBoardIDFromVorname.asstring+' ('+xdsMitteilungMSGBoardIDFromPersonalnummerPersonalnummer.asstring+')';\r\n inc(i);\r\n TC.Cells[0,i]:='an';\r\n TC.Cells[1,i]:=xdsMitteilungToNachname.asstring+', '+xdsMitteilungToVorname.asstring+' ('+xdsMitteilungToPersonalnummerPersonalnummer.asstring+')';\r\n\r\n inc(i);\r\n TC.Cells[0,i]:='gelesen';\r\n if not xdsMitteilungDatumGelesen.IsNull then\r\n begin\r\n TC.Cells[1,i]:=formatdatetime('DD.MM.YYYY hh:mm:ss',xdsMitteilungDatumGelesen.asdatetime);\r\n end\r\n else\r\n begin\r\n if ArtMitteilung=2 then\r\n begin\r\n TC.Cells[1,i]:='noch nicht gelesen';\r\n end\r\n else\r\n begin\r\n myelement:=TC.cellelements[1,i];\r\n btnGelesen.ParentElement:=myelement;\r\n end;\r\n end;\r\n\r\n inc(i);\r\n TC.Cells[0,i]:='erledigt';\r\n if not xdsMitteilungDatumErledigt.IsNull then\r\n begin\r\n TC.Cells[1,i]:=formatdatetime('DD.MM.YYYY hh:mm:ss',xdsMitteilungDatumErledigt.asdatetime);\r\n end\r\n else\r\n begin\r\n if ArtMitteilung=2 then\r\n begin\r\n TC.Cells[1,i]:='noch nicht erledigt';\r\n end\r\n else\r\n begin\r\n myelement:=TC.cellelements[1,i];\r\n btnErledigt.ParentElement:=myelement;\r\n end;\r\n end;\r\n\r\nend;\r\n\r\nprocedure TEinzelMitteilung.xdsMitteilungAfterPost(DataSet: TDataSet);\r\nbegin\r\n if LizenzOK then\r\n begin\r\n xdsMitteilung.ApplyUpdates;\r\n end\r\n else\r\n begin\r\n showmessage('Für das Speichern von Daten sind Sie noch nicht freigeschaltet, bitte erwerben Sie eine Lizenz');\r\n end;\r\nend;\r\n\r\nprocedure TEinzelMitteilung.LoadDFMValues;\r\nbegin\r\n inherited LoadDFMValues;\r\n\r\n TC := TTableControl.Create(Self);\r\n btnGelesen := TButton.Create(Self);\r\n btnErledigt := TButton.Create(Self);\r\n btnzurueck := TButton.Create(Self);\r\n xdsMitteilung := TXDataWebDataSet.Create(Self);\r\n xdsMitteilungMSGBoardID := TXDataWebEntityField.Create(Self);\r\n xdsMitteilungMSGBoardIDFromPersonalnummer := TXDataWebEntityField.Create(Self);\r\n xdsMitteilungMSGBoardIDID := TStringField.Create(Self);\r\n xdsMitteilungMSGBoardIDDatum := TDateTimeField.Create(Self);\r\n xdsMitteilungMSGBoardIDFromNachname := TStringField.Create(Self);\r\n xdsMitteilungMSGBoardIDFromVorname := TStringField.Create(Self);\r\n xdsMitteilungMSGBoardIDBetreff := TStringField.Create(Self);\r\n xdsMitteilungMSGBoardIDNotiz := TStringField.Create(Self);\r\n xdsMitteilungToPersonalnummer := TXDataWebEntityField.Create(Self);\r\n xdsMitteilungToPersonalnummerPersonalnummer := TIntegerField.Create(Self);\r\n xdsMitteilungMSGBoardSubID := TStringField.Create(Self);\r\n xdsMitteilungToNachname := TStringField.Create(Self);\r\n xdsMitteilungToVorname := TStringField.Create(Self);\r\n xdsMitteilungDatumGelesen := TDateTimeField.Create(Self);\r\n xdsMitteilungDatumErledigt := TDateTimeField.Create(Self);\r\n xdsMitteilungMSGBoardIDFromPersonalnummerPersonalnummer := TIntegerField.Create(Self);\r\n sourceMitteilung := TDataSource.Create(Self);\r\n\r\n TC.BeforeLoadDFMValues;\r\n btnGelesen.BeforeLoadDFMValues;\r\n btnErledigt.BeforeLoadDFMValues;\r\n btnzurueck.BeforeLoadDFMValues;\r\n xdsMitteilung.BeforeLoadDFMValues;\r\n xdsMitteilungMSGBoardID.BeforeLoadDFMValues;\r\n xdsMitteilungMSGBoardIDFromPersonalnummer.BeforeLoadDFMValues;\r\n xdsMitteilungMSGBoardIDID.BeforeLoadDFMValues;\r\n xdsMitteilungMSGBoardIDDatum.BeforeLoadDFMValues;\r\n xdsMitteilungMSGBoardIDFromNachname.BeforeLoadDFMValues;\r\n xdsMitteilungMSGBoardIDFromVorname.BeforeLoadDFMValues;\r\n xdsMitteilungMSGBoardIDBetreff.BeforeLoadDFMValues;\r\n xdsMitteilungMSGBoardIDNotiz.BeforeLoadDFMValues;\r\n xdsMitteilungToPersonalnummer.BeforeLoadDFMValues;\r\n xdsMitteilungToPersonalnummerPersonalnummer.BeforeLoadDFMValues;\r\n xdsMitteilungMSGBoardSubID.BeforeLoadDFMValues;\r\n xdsMitteilungToNachname.BeforeLoadDFMValues;\r\n xdsMitteilungToVorname.BeforeLoadDFMValues;\r\n xdsMitteilungDatumGelesen.BeforeLoadDFMValues;\r\n xdsMitteilungDatumErledigt.BeforeLoadDFMValues;\r\n xdsMitteilungMSGBoardIDFromPersonalnummerPersonalnummer.BeforeLoadDFMValues;\r\n sourceMitteilung.BeforeLoadDFMValues;\r\n try\r\n Name := 'EinzelMitteilung';\r\n Width := 218;\r\n Height := 377;\r\n CSSLibrary := cssBootstrap;\r\n ElementFont := efCSS;\r\n SetEvent(Self, 'OnClose', 'WebFormClose');\r\n SetEvent(Self, 'OnShow', 'WebFormShow');\r\n TC.SetParentComponent(Self);\r\n TC.Name := 'TC';\r\n TC.AlignWithMargins := True;\r\n TC.Left := 3;\r\n TC.Top := 3;\r\n TC.Width := 212;\r\n TC.Height := 371;\r\n TC.ElementClassName := 'table table-hover table-bordered table-striped';\r\n TC.Align := alClient;\r\n TC.BorderColor := clSilver;\r\n TC.ChildOrder := 3;\r\n TC.ColHeader := False;\r\n TC.ElementFont := efCSS;\r\n TC.ElementHeaderClassName := 'table-info';\r\n TC.ElementTableClassName := 'table table-hover table-bordered table-striped';\r\n TC.Options.ScrollVertical := True;\r\n TC.WordWrap := True;\r\n TC.ColCount := 1;\r\n TC.RowCount := 5;\r\n btnGelesen.SetParentComponent(Self);\r\n btnGelesen.Name := 'btnGelesen';\r\n btnGelesen.Left := 67;\r\n btnGelesen.Top := 203;\r\n btnGelesen.Width := 96;\r\n btnGelesen.Height := 25;\r\n btnGelesen.Caption := 'gelesen setzen';\r\n btnGelesen.ChildOrder := 4;\r\n btnGelesen.ElementClassName := 'btn btn-info m-1 text-left';\r\n btnGelesen.ElementFont := efCSS;\r\n btnGelesen.ElementPosition := epIgnore;\r\n btnGelesen.HeightStyle := ssAuto;\r\n btnGelesen.HeightPercent := 100.000000000000000000;\r\n btnGelesen.WidthStyle := ssAuto;\r\n btnGelesen.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnGelesen, Self, 'OnClick', 'btnGelesenClick');\r\n btnErledigt.SetParentComponent(Self);\r\n btnErledigt.Name := 'btnErledigt';\r\n btnErledigt.Left := 67;\r\n btnErledigt.Top := 234;\r\n btnErledigt.Width := 96;\r\n btnErledigt.Height := 25;\r\n btnErledigt.Caption := 'erledigt setzen';\r\n btnErledigt.ChildOrder := 4;\r\n btnErledigt.ElementClassName := 'btn btn-info m-1 text-left';\r\n btnErledigt.ElementFont := efCSS;\r\n btnErledigt.ElementPosition := epIgnore;\r\n btnErledigt.HeightStyle := ssAuto;\r\n btnErledigt.HeightPercent := 100.000000000000000000;\r\n btnErledigt.WidthStyle := ssAuto;\r\n btnErledigt.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnErledigt, Self, 'OnClick', 'btnErledigtClick');\r\n btnzurueck.SetParentComponent(Self);\r\n btnzurueck.Name := 'btnzurueck';\r\n btnzurueck.Left := 67;\r\n btnzurueck.Top := 141;\r\n btnzurueck.Width := 110;\r\n btnzurueck.Height := 25;\r\n btnzurueck.Caption := '<< zur'#252'ck';\r\n btnzurueck.ChildOrder := 4;\r\n btnzurueck.ElementClassName := 'btn btn-info m-1 text-left';\r\n btnzurueck.ElementFont := efCSS;\r\n btnzurueck.ElementPosition := epIgnore;\r\n btnzurueck.HeightStyle := ssAuto;\r\n btnzurueck.HeightPercent := 100.000000000000000000;\r\n btnzurueck.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnzurueck, Self, 'OnClick', 'btnzurueckClick');\r\n xdsMitteilung.SetParentComponent(Self);\r\n xdsMitteilung.Name := 'xdsMitteilung';\r\n xdsMitteilung.AfterApplyUpdates := xdsMitteilungAfterApplyUpdates;\r\n xdsMitteilung.AfterOpen := xdsMitteilungAfterOpen;\r\n xdsMitteilung.AfterPost := xdsMitteilungAfterPost;\r\n xdsMitteilung.EntitySetName := 'MSGBoardSub';\r\n xdsMitteilung.Connection := DM2.XDataWebConnection1;\r\n xdsMitteilung.SubpropsDepth := 2;\r\n xdsMitteilung.QueryString := '$expand=MSGBoardID, PersonalnummerTo';\r\n xdsMitteilung.QueryTop := 1;\r\n xdsMitteilung.Left := 93;\r\n xdsMitteilung.Top := 101;\r\n xdsMitteilungMSGBoardID.SetParentComponent(xdsMitteilung);\r\n xdsMitteilungMSGBoardID.Name := 'xdsMitteilungMSGBoardID';\r\n xdsMitteilungMSGBoardID.FieldName := 'MSGBoardID';\r\n xdsMitteilungMSGBoardIDFromPersonalnummer.SetParentComponent(xdsMitteilung);\r\n xdsMitteilungMSGBoardIDFromPersonalnummer.Name := 'xdsMitteilungMSGBoardIDFromPersonalnummer';\r\n xdsMitteilungMSGBoardIDFromPersonalnummer.FieldName := 'MSGBoardID.FromPersonalnummer';\r\n xdsMitteilungMSGBoardIDID.SetParentComponent(xdsMitteilung);\r\n xdsMitteilungMSGBoardIDID.Name := 'xdsMitteilungMSGBoardIDID';\r\n xdsMitteilungMSGBoardIDID.FieldName := 'MSGBoardID.ID';\r\n xdsMitteilungMSGBoardIDID.Size := 38;\r\n xdsMitteilungMSGBoardIDDatum.SetParentComponent(xdsMitteilung);\r\n xdsMitteilungMSGBoardIDDatum.Name := 'xdsMitteilungMSGBoardIDDatum';\r\n xdsMitteilungMSGBoardIDDatum.FieldName := 'MSGBoardID.Datum';\r\n xdsMitteilungMSGBoardIDFromNachname.SetParentComponent(xdsMitteilung);\r\n xdsMitteilungMSGBoardIDFromNachname.Name := 'xdsMitteilungMSGBoardIDFromNachname';\r\n xdsMitteilungMSGBoardIDFromNachname.FieldName := 'MSGBoardID.FromNachname';\r\n xdsMitteilungMSGBoardIDFromNachname.Size := 40;\r\n xdsMitteilungMSGBoardIDFromVorname.SetParentComponent(xdsMitteilung);\r\n xdsMitteilungMSGBoardIDFromVorname.Name := 'xdsMitteilungMSGBoardIDFromVorname';\r\n xdsMitteilungMSGBoardIDFromVorname.FieldName := 'MSGBoardID.FromVorname';\r\n xdsMitteilungMSGBoardIDFromVorname.Size := 40;\r\n xdsMitteilungMSGBoardIDBetreff.SetParentComponent(xdsMitteilung);\r\n xdsMitteilungMSGBoardIDBetreff.Name := 'xdsMitteilungMSGBoardIDBetreff';\r\n xdsMitteilungMSGBoardIDBetreff.FieldName := 'MSGBoardID.Betreff';\r\n xdsMitteilungMSGBoardIDBetreff.Size := 255;\r\n xdsMitteilungMSGBoardIDNotiz.SetParentComponent(xdsMitteilung);\r\n xdsMitteilungMSGBoardIDNotiz.Name := 'xdsMitteilungMSGBoardIDNotiz';\r\n xdsMitteilungMSGBoardIDNotiz.FieldName := 'MSGBoardID.Notiz';\r\n xdsMitteilungMSGBoardIDNotiz.Size := 255;\r\n xdsMitteilungToPersonalnummer.SetParentComponent(xdsMitteilung);\r\n xdsMitteilungToPersonalnummer.Name := 'xdsMitteilungToPersonalnummer';\r\n xdsMitteilungToPersonalnummer.FieldName := 'ToPersonalnummer';\r\n xdsMitteilungToPersonalnummerPersonalnummer.SetParentComponent(xdsMitteilung);\r\n xdsMitteilungToPersonalnummerPersonalnummer.Name := 'xdsMitteilungToPersonalnummerPersonalnummer';\r\n xdsMitteilungToPersonalnummerPersonalnummer.FieldName := 'ToPersonalnummer.Personalnummer';\r\n xdsMitteilungMSGBoardSubID.SetParentComponent(xdsMitteilung);\r\n xdsMitteilungMSGBoardSubID.Name := 'xdsMitteilungMSGBoardSubID';\r\n xdsMitteilungMSGBoardSubID.FieldName := 'MSGBoardSubID';\r\n xdsMitteilungMSGBoardSubID.Required := True;\r\n xdsMitteilungMSGBoardSubID.Size := 38;\r\n xdsMitteilungToNachname.SetParentComponent(xdsMitteilung);\r\n xdsMitteilungToNachname.Name := 'xdsMitteilungToNachname';\r\n xdsMitteilungToNachname.FieldName := 'ToNachname';\r\n xdsMitteilungToNachname.Size := 40;\r\n xdsMitteilungToVorname.SetParentComponent(xdsMitteilung);\r\n xdsMitteilungToVorname.Name := 'xdsMitteilungToVorname';\r\n xdsMitteilungToVorname.FieldName := 'ToVorname';\r\n xdsMitteilungToVorname.Size := 40;\r\n xdsMitteilungDatumGelesen.SetParentComponent(xdsMitteilung);\r\n xdsMitteilungDatumGelesen.Name := 'xdsMitteilungDatumGelesen';\r\n xdsMitteilungDatumGelesen.FieldName := 'DatumGelesen';\r\n xdsMitteilungDatumErledigt.SetParentComponent(xdsMitteilung);\r\n xdsMitteilungDatumErledigt.Name := 'xdsMitteilungDatumErledigt';\r\n xdsMitteilungDatumErledigt.FieldName := 'DatumErledigt';\r\n xdsMitteilungMSGBoardIDFromPersonalnummerPersonalnummer.SetParentComponent(xdsMitteilung);\r\n xdsMitteilungMSGBoardIDFromPersonalnummerPersonalnummer.Name := 'xdsMitteilungMSGBoardIDFromPersonalnummerPersonalnummer';\r\n xdsMitteilungMSGBoardIDFromPersonalnummerPersonalnummer.FieldName := 'MSGBoardID.FromPersonalnummer.Personalnummer';\r\n sourceMitteilung.SetParentComponent(Self);\r\n sourceMitteilung.Name := 'sourceMitteilung';\r\n sourceMitteilung.DataSet := xdsMitteilung;\r\n sourceMitteilung.Left := 29;\r\n sourceMitteilung.Top := 101;\r\n finally\r\n TC.AfterLoadDFMValues;\r\n btnGelesen.AfterLoadDFMValues;\r\n btnErledigt.AfterLoadDFMValues;\r\n btnzurueck.AfterLoadDFMValues;\r\n xdsMitteilung.AfterLoadDFMValues;\r\n xdsMitteilungMSGBoardID.AfterLoadDFMValues;\r\n xdsMitteilungMSGBoardIDFromPersonalnummer.AfterLoadDFMValues;\r\n xdsMitteilungMSGBoardIDID.AfterLoadDFMValues;\r\n xdsMitteilungMSGBoardIDDatum.AfterLoadDFMValues;\r\n xdsMitteilungMSGBoardIDFromNachname.AfterLoadDFMValues;\r\n xdsMitteilungMSGBoardIDFromVorname.AfterLoadDFMValues;\r\n xdsMitteilungMSGBoardIDBetreff.AfterLoadDFMValues;\r\n xdsMitteilungMSGBoardIDNotiz.AfterLoadDFMValues;\r\n xdsMitteilungToPersonalnummer.AfterLoadDFMValues;\r\n xdsMitteilungToPersonalnummerPersonalnummer.AfterLoadDFMValues;\r\n xdsMitteilungMSGBoardSubID.AfterLoadDFMValues;\r\n xdsMitteilungToNachname.AfterLoadDFMValues;\r\n xdsMitteilungToVorname.AfterLoadDFMValues;\r\n xdsMitteilungDatumGelesen.AfterLoadDFMValues;\r\n xdsMitteilungDatumErledigt.AfterLoadDFMValues;\r\n xdsMitteilungMSGBoardIDFromPersonalnummerPersonalnummer.AfterLoadDFMValues;\r\n sourceMitteilung.AfterLoadDFMValues;\r\n end;\r\nend;\r\n\r\nend.","unit unit_NeueMitteilung;\r\n\r\ninterface\r\n\r\nuses\r\n System.SysUtils, System.Classes, JS, Web, WEBLib.Graphics, WEBLib.Controls,\r\n WEBLib.Forms, WEBLib.Dialogs, Data.DB, XData.Web.JsonDataset,\r\n XData.Web.Dataset, DB, Vcl.Controls, WEBLib.Grids, Vcl.StdCtrls,\r\n WEBLib.StdCtrls, strutils, XData.Web.Client;\r\n\r\ntype\r\n TNeueMitteilung = class(TForm)\r\n dspersonal: TXDataWebDataSet;\r\n dspersonalPersonalnummer: TIntegerField;\r\n dspersonalNachname: TStringField;\r\n dspersonalVorname: TStringField;\r\n TC: TTableControl;\r\n btnzurueck: TButton;\r\n lookupEmpfaenger: TComboBox;\r\n edtNotiz: TMemo;\r\n btnsenden: TButton;\r\n edtBetreff: TEdit;\r\n WClient: TXDataWebClient;\r\n procedure WebFormShow(Sender: TObject);\r\n procedure dspersonalAfterOpen(DataSet: TDataSet);\r\n procedure WebFormClose(Sender: TObject; var Action: TCloseAction);\r\n procedure btnzurueckClick(Sender: TObject);\r\n procedure btnsendenClick(Sender: TObject);\r\n private\r\n { Private-Deklarationen }\r\n public\r\n { Public-Deklarationen }\r\n protected procedure LoadDFMValues; override; end;\r\n\r\nvar\r\n NeueMitteilung: TNeueMitteilung;\r\n\r\nimplementation\r\n uses unit1, unit2, unit_Mitteilungen;\r\n{$R *.dfm}\r\n\r\nprocedure TNeueMitteilung.btnsendenClick(Sender: TObject);\r\n procedure OnResponse(Response:TXDataClientResponse);\r\n var\r\n ergebnis:string;\r\n begin\r\n ergebnis:=string(TJSObject(response.Result)['value']);\r\n if ergebnis='WRONG' then\r\n begin\r\n showmessage('Die Mitteilung konnte leider nicht erstellt werden');\r\n end\r\n else\r\n begin\r\n dspersonal.Close;\r\n self.close;\r\n end;\r\n end;\r\nvar\r\n tmpEmpfaenger:string;\r\n tmpstringlist:TStringList;\r\nbegin\r\n if edtBetreff.Text='' then\r\n begin\r\n showmessage('Sie haben keinen Betreff eingetragen.');\r\n exit;\r\n end;\r\n if edtNotiz.Text='' then\r\n begin\r\n showmessage('Sie haben keine Notiz eingetragen.');\r\n exit;\r\n end;\r\n if lookupEmpfaenger.Text='' then\r\n begin\r\n showmessage('Sie haben keinen Empfänger ausgewählt.');\r\n exit;\r\n end;\r\n tmpstringlist:=TStringList.Create;\r\n tmpstringlist.Delimiter:='|';\r\n tmpstringlist.StrictDelimiter:=true;\r\n tmpstringlist.DelimitedText:=lookupEmpfaenger.Text;\r\n tmpEmpfaenger:=trim(tmpstringlist[0]);\r\n WClient.RawInvoke('IServerService.NeueMitteilung',[BenutzerPersonalnummer,tmpEmpfaenger,edtBetreff.Text,edtnotiz.text],@OnResponse);\r\nend;\r\n\r\nprocedure TNeueMitteilung.btnzurueckClick(Sender: TObject);\r\nbegin\r\n dspersonal.Close;\r\n self.close;\r\nend;\r\n\r\nprocedure TNeueMitteilung.dspersonalAfterOpen(DataSet: TDataSet);\r\nvar\r\n i:integer;\r\n myelement:TJSHTMLElement;\r\nbegin\r\n i:=0;\r\n TC.ColCount:=1;\r\n tc.rowcount:=10;\r\n TC.Cells[0,i]:='

Neue Mitteilung';\r\n\r\n\r\n inc(i);\r\n myelement:=TC.cellelements[0,i];\r\n btnzurueck.ParentElement:=myelement;\r\n inc(i);\r\n TC.Cells[0,i]:='Empfänger wählen:';\r\n inc(i);\r\n myelement:=TC.cellelements[0,i];\r\n lookupEmpfaenger.ParentElement:=myelement;\r\n\r\n dspersonal.First;\r\n while not dspersonal.eof do\r\n begin\r\n if dspersonalPersonalnummer.AsString<>BenutzerPersonalnummer then\r\n begin\r\n lookupEmpfaenger.Items.Add(dspersonalPersonalnummer.AsString+' | '+dspersonalnachname.AsString +' | '+dspersonalVorname.asstring);\r\n end;\r\n dspersonal.Next;\r\n end;\r\n inc(i);\r\n TC.Cells[0,i]:='Betreff:';\r\n inc(i);\r\n myelement:=TC.cellelements[0,i];\r\n edtBetreff.ParentElement:=myelement;\r\n inc(i);\r\n TC.Cells[0,i]:='Notiz:';\r\n inc(i);\r\n myelement:=TC.cellelements[0,i];\r\n edtNotiz.ParentElement:=myelement;\r\n inc(i);\r\n myelement:=TC.cellelements[0,i];\r\n btnsenden.ParentElement:=myelement;\r\nend;\r\n\r\nprocedure TNeueMitteilung.WebFormClose(Sender: TObject;\r\n var Action: TCloseAction);\r\nbegin\r\n Action:=cafree;\r\nend;\r\n\r\nprocedure TNeueMitteilung.WebFormShow(Sender: TObject);\r\nbegin\r\n dspersonal.Load;\r\nend;\r\n\r\nprocedure TNeueMitteilung.LoadDFMValues;\r\nbegin\r\n inherited LoadDFMValues;\r\n\r\n TC := TTableControl.Create(Self);\r\n btnzurueck := TButton.Create(Self);\r\n lookupEmpfaenger := TComboBox.Create(Self);\r\n edtNotiz := TMemo.Create(Self);\r\n btnsenden := TButton.Create(Self);\r\n edtBetreff := TEdit.Create(Self);\r\n dspersonal := TXDataWebDataSet.Create(Self);\r\n dspersonalPersonalnummer := TIntegerField.Create(Self);\r\n dspersonalNachname := TStringField.Create(Self);\r\n dspersonalVorname := TStringField.Create(Self);\r\n WClient := TXDataWebClient.Create(Self);\r\n\r\n TC.BeforeLoadDFMValues;\r\n btnzurueck.BeforeLoadDFMValues;\r\n lookupEmpfaenger.BeforeLoadDFMValues;\r\n edtNotiz.BeforeLoadDFMValues;\r\n btnsenden.BeforeLoadDFMValues;\r\n edtBetreff.BeforeLoadDFMValues;\r\n dspersonal.BeforeLoadDFMValues;\r\n dspersonalPersonalnummer.BeforeLoadDFMValues;\r\n dspersonalNachname.BeforeLoadDFMValues;\r\n dspersonalVorname.BeforeLoadDFMValues;\r\n WClient.BeforeLoadDFMValues;\r\n try\r\n Name := 'NeueMitteilung';\r\n Width := 269;\r\n Height := 480;\r\n CSSLibrary := cssBootstrap;\r\n ElementFont := efCSS;\r\n SetEvent(Self, 'OnClose', 'WebFormClose');\r\n SetEvent(Self, 'OnShow', 'WebFormShow');\r\n TC.SetParentComponent(Self);\r\n TC.Name := 'TC';\r\n TC.AlignWithMargins := True;\r\n TC.Left := 3;\r\n TC.Top := 3;\r\n TC.Width := 263;\r\n TC.Height := 474;\r\n TC.ElementClassName := 'table table-bordered';\r\n TC.Align := alClient;\r\n TC.BorderColor := clSilver;\r\n TC.ChildOrder := 3;\r\n TC.ColHeader := False;\r\n TC.ElementFont := efCSS;\r\n TC.ElementHeaderClassName := 'table-info';\r\n TC.ElementTableClassName := 'table table-bordered';\r\n TC.WordWrap := True;\r\n TC.ColCount := 1;\r\n TC.RowCount := 5;\r\n btnzurueck.SetParentComponent(Self);\r\n btnzurueck.Name := 'btnzurueck';\r\n btnzurueck.Left := 67;\r\n btnzurueck.Top := 141;\r\n btnzurueck.Width := 96;\r\n btnzurueck.Height := 25;\r\n btnzurueck.Caption := '<< zur'#252'ck';\r\n btnzurueck.ChildOrder := 4;\r\n btnzurueck.ElementClassName := 'btn btn-info m-1 text-left';\r\n btnzurueck.ElementFont := efCSS;\r\n btnzurueck.ElementPosition := epIgnore;\r\n btnzurueck.HeightStyle := ssAuto;\r\n btnzurueck.HeightPercent := 100.000000000000000000;\r\n btnzurueck.WidthStyle := ssAuto;\r\n btnzurueck.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnzurueck, Self, 'OnClick', 'btnzurueckClick');\r\n lookupEmpfaenger.SetParentComponent(Self);\r\n lookupEmpfaenger.Name := 'lookupEmpfaenger';\r\n lookupEmpfaenger.Left := 40;\r\n lookupEmpfaenger.Top := 56;\r\n lookupEmpfaenger.Width := 177;\r\n lookupEmpfaenger.Height := 23;\r\n lookupEmpfaenger.ChildOrder := 1;\r\n lookupEmpfaenger.ElementClassName := 'form-control w-90 m-1';\r\n lookupEmpfaenger.ElementFont := efCSS;\r\n lookupEmpfaenger.ElementPosition := epIgnore;\r\n lookupEmpfaenger.HeightStyle := ssAuto;\r\n lookupEmpfaenger.HeightPercent := 100.000000000000000000;\r\n lookupEmpfaenger.Text := 'lookupEmpfaenger';\r\n lookupEmpfaenger.TextHint := 'bitte ausw'#228'hlen';\r\n lookupEmpfaenger.WidthStyle := ssPercent;\r\n lookupEmpfaenger.WidthPercent := 95.000000000000000000;\r\n lookupEmpfaenger.ItemIndex := -1;\r\n edtNotiz.SetParentComponent(Self);\r\n edtNotiz.Name := 'edtNotiz';\r\n edtNotiz.Left := -83;\r\n edtNotiz.Top := 266;\r\n edtNotiz.Width := 352;\r\n edtNotiz.Height := 135;\r\n edtNotiz.AutoSize := False;\r\n edtNotiz.ElementClassName := 'form-control w-90 m-1';\r\n edtNotiz.ElementFont := efCSS;\r\n edtNotiz.ElementPosition := epIgnore;\r\n edtNotiz.HeightPercent := 100.000000000000000000;\r\n edtNotiz.SelLength := 0;\r\n edtNotiz.SelStart := 0;\r\n edtNotiz.TextHint := 'Mitteilung eingeben';\r\n edtNotiz.WidthStyle := ssPercent;\r\n edtNotiz.WidthPercent := 95.000000000000000000;\r\n btnsenden.SetParentComponent(Self);\r\n btnsenden.Name := 'btnsenden';\r\n btnsenden.Left := 67;\r\n btnsenden.Top := 203;\r\n btnsenden.Width := 96;\r\n btnsenden.Height := 25;\r\n btnsenden.Caption := 'senden';\r\n btnsenden.ChildOrder := 4;\r\n btnsenden.ElementClassName := 'btn btn-info m-1 text-left';\r\n btnsenden.ElementFont := efCSS;\r\n btnsenden.ElementPosition := epIgnore;\r\n btnsenden.HeightStyle := ssAuto;\r\n btnsenden.HeightPercent := 100.000000000000000000;\r\n btnsenden.WidthStyle := ssAuto;\r\n btnsenden.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnsenden, Self, 'OnClick', 'btnsendenClick');\r\n edtBetreff.SetParentComponent(Self);\r\n edtBetreff.Name := 'edtBetreff';\r\n edtBetreff.Left := 42;\r\n edtBetreff.Top := 175;\r\n edtBetreff.Width := 121;\r\n edtBetreff.Height := 22;\r\n edtBetreff.ChildOrder := 5;\r\n edtBetreff.ElementClassName := 'form-control w-90 m-1';\r\n edtBetreff.ElementFont := efCSS;\r\n edtBetreff.ElementPosition := epIgnore;\r\n edtBetreff.HeightStyle := ssAuto;\r\n edtBetreff.HeightPercent := 100.000000000000000000;\r\n edtBetreff.TextHint := 'Betreff eingeben';\r\n edtBetreff.WidthStyle := ssPercent;\r\n edtBetreff.WidthPercent := 95.000000000000000000;\r\n dspersonal.SetParentComponent(Self);\r\n dspersonal.Name := 'dspersonal';\r\n dspersonal.AfterOpen := dspersonalAfterOpen;\r\n dspersonal.EntitySetName := 'Personal';\r\n dspersonal.Connection := DM2.XDataWebConnection1;\r\n dspersonal.QueryString := '$filter=enabled eq True';\r\n dspersonal.Left := 121;\r\n dspersonal.Top := 183;\r\n dspersonalPersonalnummer.SetParentComponent(dspersonal);\r\n dspersonalPersonalnummer.Name := 'dspersonalPersonalnummer';\r\n dspersonalPersonalnummer.FieldName := 'Personalnummer';\r\n dspersonalPersonalnummer.Required := True;\r\n dspersonalNachname.SetParentComponent(dspersonal);\r\n dspersonalNachname.Name := 'dspersonalNachname';\r\n dspersonalNachname.FieldName := 'Nachname';\r\n dspersonalNachname.Required := True;\r\n dspersonalNachname.Size := 40;\r\n dspersonalVorname.SetParentComponent(dspersonal);\r\n dspersonalVorname.Name := 'dspersonalVorname';\r\n dspersonalVorname.FieldName := 'Vorname';\r\n dspersonalVorname.Size := 40;\r\n WClient.SetParentComponent(Self);\r\n WClient.Name := 'WClient';\r\n WClient.Connection := DM2.XDataWebConnection1;\r\n WClient.Left := 88;\r\n WClient.Top := 8;\r\n finally\r\n TC.AfterLoadDFMValues;\r\n btnzurueck.AfterLoadDFMValues;\r\n lookupEmpfaenger.AfterLoadDFMValues;\r\n edtNotiz.AfterLoadDFMValues;\r\n btnsenden.AfterLoadDFMValues;\r\n edtBetreff.AfterLoadDFMValues;\r\n dspersonal.AfterLoadDFMValues;\r\n dspersonalPersonalnummer.AfterLoadDFMValues;\r\n dspersonalNachname.AfterLoadDFMValues;\r\n dspersonalVorname.AfterLoadDFMValues;\r\n WClient.AfterLoadDFMValues;\r\n end;\r\nend;\r\n\r\nend.\r\n","unit unit_Mitteilungen;\r\n\r\ninterface\r\n\r\nuses\r\n System.SysUtils, System.Classes, JS, Web, WEBLib.Graphics, WEBLib.Controls,\r\n WEBLib.Forms, WEBLib.Dialogs, Vcl.Controls, WEBLib.ExtCtrls, Data.DB,\r\n XData.Web.JsonDataset, XData.Web.Dataset, WEBLib.WebCtrls, Vcl.StdCtrls,\r\n WEBLib.StdCtrls, strutils;\r\n\r\ntype\r\n TMitteilungen = class(TForm)\r\n Container1: THTMLContainer;\r\n Container2: THTMLContainer;\r\n Container3: THTMLContainer;\r\n xdsMitteilungen: TXDataWebDataSet;\r\n xdsMitteilungenMSGBoardID: TXDataWebEntityField;\r\n xdsMitteilungenToPersonalnummer: TXDataWebEntityField;\r\n xdsMitteilungenMSGBoardSubID: TStringField;\r\n xdsMitteilungenToNachname: TStringField;\r\n xdsMitteilungenToVorname: TStringField;\r\n xdsMitteilungenDatumGelesen: TDateTimeField;\r\n xdsMitteilungenDatumErledigt: TDateTimeField;\r\n xdsMitteilungenMSGBoardIDFromPersonalnummer: TXDataWebEntityField;\r\n xdsMitteilungenMSGBoardIDID: TStringField;\r\n xdsMitteilungenMSGBoardIDDatum: TDateTimeField;\r\n xdsMitteilungenMSGBoardIDFromNachname: TStringField;\r\n xdsMitteilungenMSGBoardIDFromVorname: TStringField;\r\n xdsMitteilungenMSGBoardIDBetreff: TStringField;\r\n xdsMitteilungenMSGBoardIDNotiz: TStringField;\r\n btnzurueck: TButton;\r\n btnGesendete: TButton;\r\n btnErhaltene: TButton;\r\n btnNeueMitteilung: TButton;\r\n btnErhalteneUngefiltert: TButton;\r\n xdsMitteilungenToPersonalnummerPersonalnummer: TIntegerField;\r\n xdsMitteilungenMSGBoardIDFromPersonalnummerPersonalnummer: TIntegerField;\r\n procedure WebFormShow(Sender: TObject);\r\n procedure xdsMitteilungenAfterOpen(DataSet: TDataSet);\r\n procedure btnzurueckClick(Sender: TObject);\r\n procedure btnGesendeteClick(Sender: TObject);\r\n procedure WebFormClose(Sender: TObject; var Action: TCloseAction);\r\n procedure btnErhalteneClick(Sender: TObject);\r\n procedure btnNeueMitteilungClick(Sender: TObject);\r\n procedure btnErhalteneUngefiltertClick(Sender: TObject);\r\n private\r\n { Private-Deklarationen }\r\n public\r\n { Public-Deklarationen }\r\n EinzelCard:THTMLDiv;\r\n procedure EinzelCardclick(Sender:TObject);\r\n procedure MitteilungenLaden;\r\n protected procedure LoadDFMValues; override; end;\r\n\r\nvar\r\n Mitteilungen: TMitteilungen;\r\n MSGModus:integer;\r\n //0 Eingang ungelesen/unbearbeitet ausgeschlossen\r\n //1 Eingang alle 100\r\n //2 Ausgang alle 100\r\nimplementation\r\n uses unit1, unit2, unit_EinzelMitteilung, unit_NeueMitteilung;\r\n{$R *.dfm}\r\n\r\nprocedure TMitteilungen.MitteilungenLaden;\r\nbegin\r\n xdsMitteilungen.Close;\r\n if msgmodus=0 then xdsMitteilungen.QueryString:='$expand=MSGBoardID, ToPersonalnummer, MSGBoardID/FromPersonalnummer&$filter=(ToPersonalnummer eq '+Benutzerpersonalnummer+') AND (DatumErledigt eq null OR DatumGelesen eq null)&$orderby=MSGBoardID/Datum DESC';\r\n if msgmodus=1 then xdsMitteilungen.QueryString:='$expand=MSGBoardID, ToPersonalnummer, MSGBoardID/FromPersonalnummer&$filter=(ToPersonalnummer eq '+Benutzerpersonalnummer+') &$orderby=MSGBoardID/Datum DESC';\r\n if msgmodus=2 then xdsMitteilungen.QueryString:='$expand=MSGBoardID, ToPersonalnummer, MSGBoardID/FromPersonalnummer&$filter=(MSGBoardID/FromPersonalnummer eq '+Benutzerpersonalnummer+') &$orderby=MSGBoardID/Datum DESC';\r\n xdsMitteilungen.Load;\r\nend;\r\n\r\nprocedure TMitteilungen.btnErhalteneClick(Sender: TObject);\r\nbegin\r\n msgmodus:=0;\r\n MitteilungenLaden;\r\nend;\r\n\r\nprocedure TMitteilungen.btnErhalteneUngefiltertClick(Sender: TObject);\r\nbegin\r\n msgmodus:=1;\r\n MitteilungenLaden;\r\nend;\r\n\r\nprocedure TMitteilungen.btnGesendeteClick(Sender: TObject);\r\nbegin\r\n msgmodus:=2;\r\n MitteilungenLaden;\r\nend;\r\n\r\nprocedure TMitteilungen.btnNeueMitteilungClick(Sender: TObject);\r\nvar\r\n LFrm:TNeueMitteilung;\r\n procedure AfterCreate(AForm:TObject);\r\n var\r\n LForm:TNeueMitteilung;\r\n begin\r\n LForm:=(AForm as TNeueMitteilung);\r\n\r\n end;\r\n\r\n procedure AfterShowmodal(Avalue:TModalResult);\r\n begin\r\n xdsMitteilungen.load;\r\n end;\r\n\r\n begin\r\n Container3.HTML.text:='';\r\n msgmodus:=2;\r\n xdsMitteilungen.Close;\r\n xdsMitteilungen.QueryString:='$expand=MSGBoardID, ToPersonalnummer, MSGBoardID/FromPersonalnummer&$filter=(MSGBoardID/FromPersonalnummer eq '+Benutzerpersonalnummer+') &$orderby=MSGBoardID/Datum DESC';\r\n\r\n LFrm:=TNeueMitteilung.CreateNew(@AfterCreate);\r\n LFrm.ShowModal(@AfterShowmodal);\r\n\r\nend;\r\n\r\n\r\n\r\n\r\nprocedure TMitteilungen.btnzurueckClick(Sender: TObject);\r\nbegin\r\n xdsMitteilungen.Close;\r\n self.close;\r\nend;\r\n\r\n\r\nprocedure TMitteilungen.EinzelCardclick(Sender:TObject);\r\nvar\r\n EinzelMitteilung:TEinzelMitteilung;\r\n MyMerkerMitteilung:string;\r\nbegin\r\n myMerkerMitteilung:=(sender as THTMLDiv).hint;\r\n Container3.HTML.text:='';\r\n EinzelMitteilung := TEinzelMitteilung.CreateNew(procedure(AForm: TObject)\r\n begin\r\n (AForm as TEinzelMitteilung).MerkerMitteilung:=myMerkerMitteilung;\r\n (AForm as TEinzelMitteilung).ArtMitteilung:=MSGModus;\r\n end\r\n );\r\n\r\n EinzelMitteilung.ShowModal(procedure(AValue: TModalResult)\r\n begin\r\n xdsMitteilungen.Close;\r\n xdsMitteilungen.load;\r\n end\r\n );\r\nend;\r\n\r\nprocedure TMitteilungen.WebFormClose(Sender: TObject; var Action: TCloseAction);\r\nbegin\r\n action:=cafree;\r\nend;\r\n\r\nprocedure TMitteilungen.WebFormShow(Sender: TObject);\r\nvar\r\n myelement:TJSHTMLElement;\r\nbegin\r\n MSGModus:=0;\r\n Container1.html.text:='';\r\n Container2.HTML.Text:='';\r\n myelement:=container2.ElementHandle;\r\n btnzurueck.ParentElement:=myelement;\r\n MitteilungenLaden;\r\nend;\r\n\r\nprocedure TMitteilungen.xdsMitteilungenAfterOpen(DataSet: TDataSet);\r\nvar\r\n myelement:TJSHTMLElement;\r\n EinzelKarte:string;\r\nbegin\r\n Container1.html.text:='';\r\n if MSGModus=2 then Container1.html.text:='';\r\n myelement:=container1.ElementHandle;\r\n container2.ParentElement:=myelement;\r\n Container3.ParentElement:=myelement;\r\n Container2.HTML.Text:='';\r\n myelement:=container2.ElementHandle;\r\n\r\n btnzurueck.ParentElement:=myelement;\r\n btnErhaltene.ParentElement:=myelement;\r\n btnErhalteneUngefiltert.ParentElement:=myelement;\r\n btnGesendete.ParentElement:=myelement;\r\n btnNeueMitteilung.ParentElement:=myelement;\r\n container3.HTML.Text:='';\r\n btnErhaltene.Visible:=true;\r\n btnErhalteneUngefiltert.Visible:=true;\r\n btnGesendete.Visible:=true;\r\n if MSGModus=0 then btnErhaltene.Visible:=false;\r\n if MSGModus=1 then btnErhalteneUngefiltert.Visible:=false;\r\n if MSGModus=2 then btnGesendete.Visible:=false;\r\n xdsMitteilungen.First;\r\n while not xdsmitteilungen.eof do\r\n begin\r\n if (xdsMitteilungenDatumGelesen.IsNull) OR (xdsMitteilungenDatumErledigt.IsNull) then\r\n begin\r\n Einzelkarte:='
'+formatdatetime('DD.MM.YYYY hh:mm:ss',xdsMitteilungenMSGBoardIDDatum.asdatetime)+' - ' +xdsMitteilungenMSGBoardIDBetreff.asstring+'
';\r\n end\r\n else\r\n begin\r\n Einzelkarte:='
'+formatdatetime('DD.MM.YYYY hh:mm:ss',xdsMitteilungenMSGBoardIDDatum.asdatetime)+' - ' +xdsMitteilungenMSGBoardIDBetreff.asstring+'
';\r\n end;\r\n if length(xdsMitteilungenMSGBoardIDNotiz.asstring)>60 then\r\n begin\r\n Einzelkarte:=Einzelkarte+'
'+leftstr(xdsMitteilungenMSGBoardIDNotiz.asstring, 60)+' ...
';\r\n end\r\n else\r\n begin\r\n Einzelkarte:=Einzelkarte+'
'+xdsMitteilungenMSGBoardIDNotiz.asstring+'
';\r\n end;\r\n if MSGModus<2 then Einzelkarte:=Einzelkarte+' von: '+xdsMitteilungenMSGBoardIDFromNachname.asstring+', '+xdsMitteilungenMSGBoardIDFromVorname.asstring+' ('+xdsMitteilungenMSGBoardIDFromPersonalnummerPersonalnummer.asstring+')
';\r\n if MSGModus=2 then Einzelkarte:=Einzelkarte+' an: '+xdsMitteilungenToNachname.asstring+', '+xdsMitteilungenToVorname.asstring+' ('+xdsMitteilungenToPersonalnummerPersonalnummer.asstring+')
';\r\n if not xdsMitteilungenDatumGelesen.IsNull then\r\n begin\r\n Einzelkarte:=Einzelkarte+' gelesen: '+formatdatetime('DD.MM.YYYY hh:mm:ss',xdsMitteilungenDatumGelesen.asdatetime)+'
';\r\n end\r\n else\r\n begin\r\n Einzelkarte:=Einzelkarte+' noch nicht gelesen
';\r\n end;\r\n if not xdsMitteilungenDatumErledigt.IsNull then\r\n begin\r\n Einzelkarte:=Einzelkarte+' erledigt: '+formatdatetime('DD.MM.YYYY hh:mm:ss',xdsMitteilungenDatumErledigt.asdatetime)+'
';\r\n end\r\n else\r\n begin\r\n Einzelkarte:=Einzelkarte+' noch nicht erledigt
';\r\n end;\r\n\r\n Einzelkarte:=Einzelkarte+'
';\r\n myelement:=Container3.ElementHandle;\r\n EinzelCard:=THTMLDiv.Create(self);\r\n EinzelCard.HeightStyle:=ssauto;\r\n EinzelCard.WidthStyle:=ssPercent;\r\n EinzelCard.hint:=xdsMitteilungenMSGBoardSubID.asstring;\r\n EinzelCard.HTML.Text:=Einzelkarte;\r\n EinzelCard.ElementClassName:='card m-1 border-info';\r\n EinzelCard.OnClick:=@EinzelCardClick;\r\n EinzelCard.ParentElement:=myelement;\r\n xdsmitteilungen.Next;\r\n\r\n end;\r\nend;\r\n\r\nprocedure TMitteilungen.LoadDFMValues;\r\nbegin\r\n inherited LoadDFMValues;\r\n\r\n Container1 := THTMLContainer.Create(Self);\r\n Container2 := THTMLContainer.Create(Self);\r\n Container3 := THTMLContainer.Create(Self);\r\n btnzurueck := TButton.Create(Self);\r\n btnGesendete := TButton.Create(Self);\r\n btnErhaltene := TButton.Create(Self);\r\n btnNeueMitteilung := TButton.Create(Self);\r\n btnErhalteneUngefiltert := TButton.Create(Self);\r\n xdsMitteilungen := TXDataWebDataSet.Create(Self);\r\n xdsMitteilungenMSGBoardID := TXDataWebEntityField.Create(Self);\r\n xdsMitteilungenToPersonalnummer := TXDataWebEntityField.Create(Self);\r\n xdsMitteilungenMSGBoardSubID := TStringField.Create(Self);\r\n xdsMitteilungenToNachname := TStringField.Create(Self);\r\n xdsMitteilungenToVorname := TStringField.Create(Self);\r\n xdsMitteilungenDatumGelesen := TDateTimeField.Create(Self);\r\n xdsMitteilungenDatumErledigt := TDateTimeField.Create(Self);\r\n xdsMitteilungenMSGBoardIDFromPersonalnummer := TXDataWebEntityField.Create(Self);\r\n xdsMitteilungenMSGBoardIDID := TStringField.Create(Self);\r\n xdsMitteilungenMSGBoardIDDatum := TDateTimeField.Create(Self);\r\n xdsMitteilungenMSGBoardIDFromNachname := TStringField.Create(Self);\r\n xdsMitteilungenMSGBoardIDFromVorname := TStringField.Create(Self);\r\n xdsMitteilungenMSGBoardIDBetreff := TStringField.Create(Self);\r\n xdsMitteilungenMSGBoardIDNotiz := TStringField.Create(Self);\r\n xdsMitteilungenToPersonalnummerPersonalnummer := TIntegerField.Create(Self);\r\n xdsMitteilungenMSGBoardIDFromPersonalnummerPersonalnummer := TIntegerField.Create(Self);\r\n\r\n Container1.BeforeLoadDFMValues;\r\n Container2.BeforeLoadDFMValues;\r\n Container3.BeforeLoadDFMValues;\r\n btnzurueck.BeforeLoadDFMValues;\r\n btnGesendete.BeforeLoadDFMValues;\r\n btnErhaltene.BeforeLoadDFMValues;\r\n btnNeueMitteilung.BeforeLoadDFMValues;\r\n btnErhalteneUngefiltert.BeforeLoadDFMValues;\r\n xdsMitteilungen.BeforeLoadDFMValues;\r\n xdsMitteilungenMSGBoardID.BeforeLoadDFMValues;\r\n xdsMitteilungenToPersonalnummer.BeforeLoadDFMValues;\r\n xdsMitteilungenMSGBoardSubID.BeforeLoadDFMValues;\r\n xdsMitteilungenToNachname.BeforeLoadDFMValues;\r\n xdsMitteilungenToVorname.BeforeLoadDFMValues;\r\n xdsMitteilungenDatumGelesen.BeforeLoadDFMValues;\r\n xdsMitteilungenDatumErledigt.BeforeLoadDFMValues;\r\n xdsMitteilungenMSGBoardIDFromPersonalnummer.BeforeLoadDFMValues;\r\n xdsMitteilungenMSGBoardIDID.BeforeLoadDFMValues;\r\n xdsMitteilungenMSGBoardIDDatum.BeforeLoadDFMValues;\r\n xdsMitteilungenMSGBoardIDFromNachname.BeforeLoadDFMValues;\r\n xdsMitteilungenMSGBoardIDFromVorname.BeforeLoadDFMValues;\r\n xdsMitteilungenMSGBoardIDBetreff.BeforeLoadDFMValues;\r\n xdsMitteilungenMSGBoardIDNotiz.BeforeLoadDFMValues;\r\n xdsMitteilungenToPersonalnummerPersonalnummer.BeforeLoadDFMValues;\r\n xdsMitteilungenMSGBoardIDFromPersonalnummerPersonalnummer.BeforeLoadDFMValues;\r\n try\r\n Name := 'Mitteilungen';\r\n Width := 219;\r\n Height := 304;\r\n CSSLibrary := cssBootstrap;\r\n ElementFont := efCSS;\r\n SetEvent(Self, 'OnClose', 'WebFormClose');\r\n SetEvent(Self, 'OnShow', 'WebFormShow');\r\n Container1.SetParentComponent(Self);\r\n Container1.Name := 'Container1';\r\n Container1.Left := 0;\r\n Container1.Top := 0;\r\n Container1.Width := 169;\r\n Container1.Height := 41;\r\n Container1.HeightStyle := ssAuto;\r\n Container1.WidthStyle := ssPercent;\r\n Container1.ChildOrder := 2;\r\n Container1.ElementFont := efCSS;\r\n Container2.SetParentComponent(Self);\r\n Container2.Name := 'Container2';\r\n Container2.Left := 0;\r\n Container2.Top := 47;\r\n Container2.Width := 169;\r\n Container2.Height := 41;\r\n Container2.ElementClassName := 'd-flex flex-wrap m-1';\r\n Container2.HeightStyle := ssAuto;\r\n Container2.WidthStyle := ssAuto;\r\n Container2.ChildOrder := 5;\r\n Container2.ElementFont := efCSS;\r\n Container2.ElementPosition := epIgnore;\r\n Container3.SetParentComponent(Self);\r\n Container3.Name := 'Container3';\r\n Container3.Left := 0;\r\n Container3.Top := 94;\r\n Container3.Width := 169;\r\n Container3.Height := 41;\r\n Container3.ElementClassName := 'd-flex flex-wrap m-1';\r\n Container3.HeightStyle := ssAuto;\r\n Container3.WidthStyle := ssAuto;\r\n Container3.ChildOrder := 5;\r\n Container3.ElementFont := efCSS;\r\n Container3.ElementPosition := epIgnore;\r\n btnzurueck.SetParentComponent(Self);\r\n btnzurueck.Name := 'btnzurueck';\r\n btnzurueck.Left := 67;\r\n btnzurueck.Top := 141;\r\n btnzurueck.Width := 96;\r\n btnzurueck.Height := 25;\r\n btnzurueck.Caption := '<< zur'#252'ck';\r\n btnzurueck.ChildOrder := 4;\r\n btnzurueck.ElementClassName := 'btn btn-info m-1 text-left';\r\n btnzurueck.ElementFont := efCSS;\r\n btnzurueck.ElementPosition := epIgnore;\r\n btnzurueck.HeightStyle := ssAuto;\r\n btnzurueck.HeightPercent := 100.000000000000000000;\r\n btnzurueck.WidthStyle := ssAuto;\r\n btnzurueck.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnzurueck, Self, 'OnClick', 'btnzurueckClick');\r\n btnGesendete.SetParentComponent(Self);\r\n btnGesendete.Name := 'btnGesendete';\r\n btnGesendete.Left := 67;\r\n btnGesendete.Top := 172;\r\n btnGesendete.Width := 96;\r\n btnGesendete.Height := 25;\r\n btnGesendete.Caption := 'Gesendete (max 100)';\r\n btnGesendete.ChildOrder := 4;\r\n btnGesendete.ElementClassName := 'btn btn-info m-1 text-left';\r\n btnGesendete.ElementFont := efCSS;\r\n btnGesendete.ElementPosition := epIgnore;\r\n btnGesendete.HeightStyle := ssAuto;\r\n btnGesendete.HeightPercent := 100.000000000000000000;\r\n btnGesendete.WidthStyle := ssAuto;\r\n btnGesendete.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnGesendete, Self, 'OnClick', 'btnGesendeteClick');\r\n btnErhaltene.SetParentComponent(Self);\r\n btnErhaltene.Name := 'btnErhaltene';\r\n btnErhaltene.Left := 67;\r\n btnErhaltene.Top := 203;\r\n btnErhaltene.Width := 96;\r\n btnErhaltene.Height := 25;\r\n btnErhaltene.Caption := 'Unbearbeitete';\r\n btnErhaltene.ChildOrder := 4;\r\n btnErhaltene.ElementClassName := 'btn btn-info m-1 text-left';\r\n btnErhaltene.ElementFont := efCSS;\r\n btnErhaltene.ElementPosition := epIgnore;\r\n btnErhaltene.HeightStyle := ssAuto;\r\n btnErhaltene.HeightPercent := 100.000000000000000000;\r\n btnErhaltene.WidthStyle := ssAuto;\r\n btnErhaltene.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnErhaltene, Self, 'OnClick', 'btnErhalteneClick');\r\n btnNeueMitteilung.SetParentComponent(Self);\r\n btnNeueMitteilung.Name := 'btnNeueMitteilung';\r\n btnNeueMitteilung.Left := 67;\r\n btnNeueMitteilung.Top := 231;\r\n btnNeueMitteilung.Width := 96;\r\n btnNeueMitteilung.Height := 25;\r\n btnNeueMitteilung.Caption := '+ Neue Mitteilung';\r\n btnNeueMitteilung.ChildOrder := 4;\r\n btnNeueMitteilung.ElementClassName := 'btn btn-info m-1 text-left';\r\n btnNeueMitteilung.ElementFont := efCSS;\r\n btnNeueMitteilung.ElementPosition := epIgnore;\r\n btnNeueMitteilung.HeightStyle := ssAuto;\r\n btnNeueMitteilung.HeightPercent := 100.000000000000000000;\r\n btnNeueMitteilung.WidthStyle := ssAuto;\r\n btnNeueMitteilung.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnNeueMitteilung, Self, 'OnClick', 'btnNeueMitteilungClick');\r\n btnErhalteneUngefiltert.SetParentComponent(Self);\r\n btnErhalteneUngefiltert.Name := 'btnErhalteneUngefiltert';\r\n btnErhalteneUngefiltert.Left := 67;\r\n btnErhalteneUngefiltert.Top := 262;\r\n btnErhalteneUngefiltert.Width := 96;\r\n btnErhalteneUngefiltert.Height := 25;\r\n btnErhalteneUngefiltert.Caption := 'Erhaltene (max 100)';\r\n btnErhalteneUngefiltert.ChildOrder := 4;\r\n btnErhalteneUngefiltert.ElementClassName := 'btn btn-info m-1 text-left';\r\n btnErhalteneUngefiltert.ElementFont := efCSS;\r\n btnErhalteneUngefiltert.ElementPosition := epIgnore;\r\n btnErhalteneUngefiltert.HeightStyle := ssAuto;\r\n btnErhalteneUngefiltert.HeightPercent := 100.000000000000000000;\r\n btnErhalteneUngefiltert.WidthStyle := ssAuto;\r\n btnErhalteneUngefiltert.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnErhalteneUngefiltert, Self, 'OnClick', 'btnErhalteneUngefiltertClick');\r\n xdsMitteilungen.SetParentComponent(Self);\r\n xdsMitteilungen.Name := 'xdsMitteilungen';\r\n xdsMitteilungen.AfterOpen := xdsMitteilungenAfterOpen;\r\n xdsMitteilungen.EntitySetName := 'MSGBoardSub';\r\n xdsMitteilungen.Connection := DM2.XDataWebConnection1;\r\n xdsMitteilungen.SubpropsDepth := 2;\r\n xdsMitteilungen.QueryString := '$expand=MSGBoardID, PersonalnummerTo';\r\n xdsMitteilungen.QueryTop := 100;\r\n xdsMitteilungen.Left := 21;\r\n xdsMitteilungen.Top := 157;\r\n xdsMitteilungenMSGBoardID.SetParentComponent(xdsMitteilungen);\r\n xdsMitteilungenMSGBoardID.Name := 'xdsMitteilungenMSGBoardID';\r\n xdsMitteilungenMSGBoardID.FieldName := 'MSGBoardID';\r\n xdsMitteilungenToPersonalnummer.SetParentComponent(xdsMitteilungen);\r\n xdsMitteilungenToPersonalnummer.Name := 'xdsMitteilungenToPersonalnummer';\r\n xdsMitteilungenToPersonalnummer.FieldName := 'ToPersonalnummer';\r\n xdsMitteilungenMSGBoardSubID.SetParentComponent(xdsMitteilungen);\r\n xdsMitteilungenMSGBoardSubID.Name := 'xdsMitteilungenMSGBoardSubID';\r\n xdsMitteilungenMSGBoardSubID.FieldName := 'MSGBoardSubID';\r\n xdsMitteilungenMSGBoardSubID.Required := True;\r\n xdsMitteilungenMSGBoardSubID.Size := 38;\r\n xdsMitteilungenToNachname.SetParentComponent(xdsMitteilungen);\r\n xdsMitteilungenToNachname.Name := 'xdsMitteilungenToNachname';\r\n xdsMitteilungenToNachname.FieldName := 'ToNachname';\r\n xdsMitteilungenToNachname.Size := 40;\r\n xdsMitteilungenToVorname.SetParentComponent(xdsMitteilungen);\r\n xdsMitteilungenToVorname.Name := 'xdsMitteilungenToVorname';\r\n xdsMitteilungenToVorname.FieldName := 'ToVorname';\r\n xdsMitteilungenToVorname.Size := 40;\r\n xdsMitteilungenDatumGelesen.SetParentComponent(xdsMitteilungen);\r\n xdsMitteilungenDatumGelesen.Name := 'xdsMitteilungenDatumGelesen';\r\n xdsMitteilungenDatumGelesen.FieldName := 'DatumGelesen';\r\n xdsMitteilungenDatumErledigt.SetParentComponent(xdsMitteilungen);\r\n xdsMitteilungenDatumErledigt.Name := 'xdsMitteilungenDatumErledigt';\r\n xdsMitteilungenDatumErledigt.FieldName := 'DatumErledigt';\r\n xdsMitteilungenMSGBoardIDFromPersonalnummer.SetParentComponent(xdsMitteilungen);\r\n xdsMitteilungenMSGBoardIDFromPersonalnummer.Name := 'xdsMitteilungenMSGBoardIDFromPersonalnummer';\r\n xdsMitteilungenMSGBoardIDFromPersonalnummer.FieldName := 'MSGBoardID.FromPersonalnummer';\r\n xdsMitteilungenMSGBoardIDID.SetParentComponent(xdsMitteilungen);\r\n xdsMitteilungenMSGBoardIDID.Name := 'xdsMitteilungenMSGBoardIDID';\r\n xdsMitteilungenMSGBoardIDID.FieldName := 'MSGBoardID.ID';\r\n xdsMitteilungenMSGBoardIDID.Size := 38;\r\n xdsMitteilungenMSGBoardIDDatum.SetParentComponent(xdsMitteilungen);\r\n xdsMitteilungenMSGBoardIDDatum.Name := 'xdsMitteilungenMSGBoardIDDatum';\r\n xdsMitteilungenMSGBoardIDDatum.FieldName := 'MSGBoardID.Datum';\r\n xdsMitteilungenMSGBoardIDFromNachname.SetParentComponent(xdsMitteilungen);\r\n xdsMitteilungenMSGBoardIDFromNachname.Name := 'xdsMitteilungenMSGBoardIDFromNachname';\r\n xdsMitteilungenMSGBoardIDFromNachname.FieldName := 'MSGBoardID.FromNachname';\r\n xdsMitteilungenMSGBoardIDFromNachname.Size := 40;\r\n xdsMitteilungenMSGBoardIDFromVorname.SetParentComponent(xdsMitteilungen);\r\n xdsMitteilungenMSGBoardIDFromVorname.Name := 'xdsMitteilungenMSGBoardIDFromVorname';\r\n xdsMitteilungenMSGBoardIDFromVorname.FieldName := 'MSGBoardID.FromVorname';\r\n xdsMitteilungenMSGBoardIDFromVorname.Size := 40;\r\n xdsMitteilungenMSGBoardIDBetreff.SetParentComponent(xdsMitteilungen);\r\n xdsMitteilungenMSGBoardIDBetreff.Name := 'xdsMitteilungenMSGBoardIDBetreff';\r\n xdsMitteilungenMSGBoardIDBetreff.FieldName := 'MSGBoardID.Betreff';\r\n xdsMitteilungenMSGBoardIDBetreff.Size := 255;\r\n xdsMitteilungenMSGBoardIDNotiz.SetParentComponent(xdsMitteilungen);\r\n xdsMitteilungenMSGBoardIDNotiz.Name := 'xdsMitteilungenMSGBoardIDNotiz';\r\n xdsMitteilungenMSGBoardIDNotiz.FieldName := 'MSGBoardID.Notiz';\r\n xdsMitteilungenMSGBoardIDNotiz.Size := 255;\r\n xdsMitteilungenToPersonalnummerPersonalnummer.SetParentComponent(xdsMitteilungen);\r\n xdsMitteilungenToPersonalnummerPersonalnummer.Name := 'xdsMitteilungenToPersonalnummerPersonalnummer';\r\n xdsMitteilungenToPersonalnummerPersonalnummer.FieldName := 'ToPersonalnummer.Personalnummer';\r\n xdsMitteilungenMSGBoardIDFromPersonalnummerPersonalnummer.SetParentComponent(xdsMitteilungen);\r\n xdsMitteilungenMSGBoardIDFromPersonalnummerPersonalnummer.Name := 'xdsMitteilungenMSGBoardIDFromPersonalnummerPersonalnummer';\r\n xdsMitteilungenMSGBoardIDFromPersonalnummerPersonalnummer.FieldName := 'MSGBoardID.FromPersonalnummer.Personalnummer';\r\n finally\r\n Container1.AfterLoadDFMValues;\r\n Container2.AfterLoadDFMValues;\r\n Container3.AfterLoadDFMValues;\r\n btnzurueck.AfterLoadDFMValues;\r\n btnGesendete.AfterLoadDFMValues;\r\n btnErhaltene.AfterLoadDFMValues;\r\n btnNeueMitteilung.AfterLoadDFMValues;\r\n btnErhalteneUngefiltert.AfterLoadDFMValues;\r\n xdsMitteilungen.AfterLoadDFMValues;\r\n xdsMitteilungenMSGBoardID.AfterLoadDFMValues;\r\n xdsMitteilungenToPersonalnummer.AfterLoadDFMValues;\r\n xdsMitteilungenMSGBoardSubID.AfterLoadDFMValues;\r\n xdsMitteilungenToNachname.AfterLoadDFMValues;\r\n xdsMitteilungenToVorname.AfterLoadDFMValues;\r\n xdsMitteilungenDatumGelesen.AfterLoadDFMValues;\r\n xdsMitteilungenDatumErledigt.AfterLoadDFMValues;\r\n xdsMitteilungenMSGBoardIDFromPersonalnummer.AfterLoadDFMValues;\r\n xdsMitteilungenMSGBoardIDID.AfterLoadDFMValues;\r\n xdsMitteilungenMSGBoardIDDatum.AfterLoadDFMValues;\r\n xdsMitteilungenMSGBoardIDFromNachname.AfterLoadDFMValues;\r\n xdsMitteilungenMSGBoardIDFromVorname.AfterLoadDFMValues;\r\n xdsMitteilungenMSGBoardIDBetreff.AfterLoadDFMValues;\r\n xdsMitteilungenMSGBoardIDNotiz.AfterLoadDFMValues;\r\n xdsMitteilungenToPersonalnummerPersonalnummer.AfterLoadDFMValues;\r\n xdsMitteilungenMSGBoardIDFromPersonalnummerPersonalnummer.AfterLoadDFMValues;\r\n end;\r\nend;\r\n\r\nend.","unit unit_EinzelTicket;\r\n\r\ninterface\r\n\r\nuses\r\n System.SysUtils, System.Classes, JS, Web, WEBLib.Graphics, WEBLib.Controls,\r\n WEBLib.Forms, WEBLib.Dialogs, Vcl.Controls, WEBLib.ExtCtrls, Vcl.StdCtrls,\r\n WEBLib.StdCtrls, Data.DB, XData.Web.JsonDataset, XData.Web.Dataset, DB,\r\n WEBLib.Grids, XData.Web.Client, strutils, WEBLib.DBCtrls;\r\n\r\ntype\r\n TEinzelTicket = class(TForm)\r\n Container1: THTMLContainer;\r\n Container2: THTMLContainer;\r\n Container3: THTMLContainer;\r\n btnzurueck: TButton;\r\n xdsTicket: TXDataWebDataSet;\r\n TC: TTableControl;\r\n btnSpeichern: TButton;\r\n xdsTicketKundennummer: TXDataWebEntityField;\r\n xdsTicketKundennummerZahlungsbedingung: TXDataWebEntityField;\r\n xdsTicketKundennummerKundennummer: TStringField;\r\n xdsTicketKundennummerGruppeKunden: TBooleanField;\r\n xdsTicketKundennummerGruppeLieferanten: TBooleanField;\r\n xdsTicketKundennummerGruppeSonstige: TBooleanField;\r\n xdsTicketKundennummerGruppeNichtkunden: TBooleanField;\r\n xdsTicketKundennummerKontaktgruppe: TStringField;\r\n xdsTicketKundennummerNachname: TStringField;\r\n xdsTicketKundennummerVorname: TStringField;\r\n xdsTicketKundennummerAdresszeile2: TStringField;\r\n xdsTicketKundennummerAdresszeile3: TStringField;\r\n xdsTicketKundennummerStrasse: TStringField;\r\n xdsTicketKundennummerPostleitzahl: TStringField;\r\n xdsTicketKundennummerOrt: TStringField;\r\n xdsTicketKundennummerLaenderkuerzel: TStringField;\r\n xdsTicketKundennummerLand: TStringField;\r\n xdsTicketKundennummerLaenderkennzeichen: TBooleanField;\r\n xdsTicketKundennummerAdressanrede: TStringField;\r\n xdsTicketKundennummerBriefanrede1: TStringField;\r\n xdsTicketKundennummerBriefanrede2: TStringField;\r\n xdsTicketKundennummerAdresseBild: TStringField;\r\n xdsTicketKundennummerLieferanschrift: TStringField;\r\n xdsTicketKundennummerGeburtsdatum: TDateTimeField;\r\n xdsTicketKundennummerTelefonNummer: TStringField;\r\n xdsTicketKundennummerTelefaxNummer: TStringField;\r\n xdsTicketKundennummerMobilTelefon: TStringField;\r\n xdsTicketKundennummerEMail: TStringField;\r\n xdsTicketKundennummerInternet: TStringField;\r\n xdsTicketKundennummerUmsatzsteuerID: TStringField;\r\n xdsTicketKundennummerUmsatzsteuerausweis: TBooleanField;\r\n xdsTicketKundennummerBemerkungen: TStringField;\r\n xdsTicketKundennummerBranche: TStringField;\r\n xdsTicketKundennummerSelektiert1: TBooleanField;\r\n xdsTicketKundennummerSelektiert2: TBooleanField;\r\n xdsTicketKundennummerSelektiert3: TBooleanField;\r\n xdsTicketKundennummerTransportbedingung: TStringField;\r\n xdsTicketKundennummerKilometer: TIntegerField;\r\n xdsTicketKundennummerRabattsatz: TFloatField;\r\n xdsTicketKundennummerStundensatz: TFloatField;\r\n xdsTicketKundennummerKontonummer: TStringField;\r\n xdsTicketKundennummerBank: TStringField;\r\n xdsTicketKundennummerBankleitzahl: TFloatField;\r\n xdsTicketKundennummerKontoinhaber: TStringField;\r\n xdsTicketKundennummerBetreuer: TStringField;\r\n xdsTicketKundennummerQuelle: TStringField;\r\n xdsTicketKundennummerSuchmerkmal: TStringField;\r\n xdsTicketKundennummerWarenkreditlimit: TFloatField;\r\n xdsTicketKundennummerWarenkreditgesperrt: TBooleanField;\r\n xdsTicketKundennummerKundennummerFremd: TStringField;\r\n xdsTicketKundennummerKeinNewsletter: TBooleanField;\r\n xdsTicketKundennummerDebitorennummer: TStringField;\r\n xdsTicketKundennummerKreditorennummer: TStringField;\r\n xdsTicketKundennummerRabattstufe: TStringField;\r\n xdsTicketKundennummerTelefonAlternativ: TStringField;\r\n xdsTicketKundennummerKostentraeger: TStringField;\r\n xdsTicketKundennummerIBAN: TStringField;\r\n xdsTicketKundennummerBIC: TStringField;\r\n xdsTicketKundennummerEmailkonto: TStringField;\r\n xdsTicketKundennummerBenutzername: TStringField;\r\n xdsTicketKundennummerPasswort: TStringField;\r\n xdsTicketKundennummerExportOutlook: TBooleanField;\r\n xdsTicketKundennummerNichtInListeAnzeigen: TBooleanField;\r\n xdsTicketKundennummerKreditkarteArt: TStringField;\r\n xdsTicketKundennummerKreditkarteInhaber: TStringField;\r\n xdsTicketKundennummerKreditkarteNummer: TStringField;\r\n xdsTicketKundennummerKreditkarteGueltigMonat: TStringField;\r\n xdsTicketKundennummerKreditkarteGueltigJahr: TIntegerField;\r\n xdsTicketKundennummerKreditkartePruefziffer: TStringField;\r\n xdsTicketKundennummerDatumNeu: TDateTimeField;\r\n xdsTicketKundennummerDatumgeaendert: TDateTimeField;\r\n xdsTicketKundennummerTitel: TStringField;\r\n xdsTicketKundennummerStundensatzMontage: TFloatField;\r\n xdsTicketKundennummerStdMontageU25: TFloatField;\r\n xdsTicketKundennummerStdMontageU50: TFloatField;\r\n xdsTicketKundennummerStdMontageU70: TFloatField;\r\n xdsTicketKundennummerStdMontageU100: TFloatField;\r\n xdsTicketKundennummerStdMontageU150: TFloatField;\r\n xdsTicketKundennummerStundensatzWerkstatt: TFloatField;\r\n xdsTicketKundennummerStdWerkstattU25: TFloatField;\r\n xdsTicketKundennummerStdWerkstattU50: TFloatField;\r\n xdsTicketKundennummerStdWerkstattU70: TFloatField;\r\n xdsTicketKundennummerStdWerkstattU100: TFloatField;\r\n xdsTicketKundennummerStdWerkstattU150: TFloatField;\r\n xdsTicketKundennummerArchivReferenz: TStringField;\r\n xdsTicketKundennummerErloesKontoUST1: TStringField;\r\n xdsTicketKundennummerErloesKontoUST2: TStringField;\r\n xdsTicketKundennummerErloesKontoUST3: TStringField;\r\n xdsTicketKundennummerGebKal: TBooleanField;\r\n xdsTicketKundennummerEmailversand: TBooleanField;\r\n xdsTicketKundennummerMahnspesen: TBooleanField;\r\n xdsTicketKundennummerRechnungSchluss: TStringField;\r\n xdsTicketKundennummerBenutzerNeu: TStringField;\r\n xdsTicketKundennummerBenutzerGeaendert: TStringField;\r\n xdsTicketKundennummerBelegsprache: TStringField;\r\n xdsTicketKundennummerkmSatz: TFloatField;\r\n xdsTicketKundennummerKundenklassetext: TStringField;\r\n xdsTicketKundennummerKundenklasseFarbe: TIntegerField;\r\n xdsTicketKundennummerAbweichenderRechnungsEmpfaenger: TStringField;\r\n xdsTicketKundennummerProtokoll: TStringField;\r\n xdsTicketKundennummerILNTyp1: TStringField;\r\n xdsTicketKundennummerILNTyp2: TStringField;\r\n xdsTicketKundennummerKontaktGUID: TStringField;\r\n xdsTicketKundennummerPLZGUID: TStringField;\r\n xdsTicketKundennummerPreislistenVariantePakete: TStringField;\r\n xdsTicketKundennummerSchluesselRechnungslauf: TStringField;\r\n xdsTicketKundennummerRechnungEmail: TStringField;\r\n xdsTicketKundennummerZahlungsbedingungEK: TIntegerField;\r\n xdsTicketKundennummerTransportbedingungEK: TStringField;\r\n xdsTicketKundennummerRabattsatzEK: TFloatField;\r\n xdsTicketKundennummerVertreterMatchcode: TStringField;\r\n xdsTicketKundennummerVertreterProvisionssatz: TFloatField;\r\n xdsTicketKundennummerUmsatzVKJahr: TFloatField;\r\n xdsTicketKundennummerUmsatzVKVorjahr: TFloatField;\r\n xdsTicketKundennummerUmsatzEKJahr: TFloatField;\r\n xdsTicketKundennummerUmsatzEKVorjahr: TFloatField;\r\n xdsTicketKundennummerSteuernummer: TStringField;\r\n xdsTicketKundennummerLoginPW: TStringField;\r\n xdsTicketKundennummerREperFax: TBooleanField;\r\n xdsTicketKundennummerErreichbarkeit: TStringField;\r\n xdsTicketKundennummerErloesKontoUST4: TStringField;\r\n xdsTicketKundennummerErloesKontoUST5: TStringField;\r\n xdsTicketKundennummerErloesKontoUST6: TStringField;\r\n xdsTicketKundennummerBesteuerungKey: TIntegerField;\r\n xdsTicketKundennummerAuftraegeJahr: TFloatField;\r\n xdsTicketKundennummerAuftraegeVorjahr: TFloatField;\r\n xdsTicketKundennummerLieferadresseID: TIntegerField;\r\n xdsTicketKundennummerUSTIDgeprueft: TDateTimeField;\r\n xdsTicketKundennummerKontaktverbund: TStringField;\r\n xdsTicketKundennummerHinweis: TStringField;\r\n xdsTicketKundennummerLatitude: TFloatField;\r\n xdsTicketKundennummerLongitude: TFloatField;\r\n xdsTicketKundennummerkmLuftlinie: TFloatField;\r\n xdsTicketKundennummerGoogleID: TStringField;\r\n xdsTicketKundennummerGoogleUpdatedUTC: TDateTimeField;\r\n xdsTicketKundennummerBundesland: TStringField;\r\n xdsTicketKundennummerRegion: TStringField;\r\n xdsTicketKundennummerMandatsreferenz: TStringField;\r\n xdsTicketKundennummerMandatsreferenzVom: TDateTimeField;\r\n xdsTicketKundennummerLastschriftArt: TStringField;\r\n xdsTicketKundennummerMahnsperre: TBooleanField;\r\n xdsTicketKundennummerSuchbegriff: TStringField;\r\n xdsTicketKundennummerLieferanschriftDaten: TStringField;\r\n xdsTicketKundennummerExportKasse: TBooleanField;\r\n xdsTicketKundennummerLoeschvormerkungDatum: TDateTimeField;\r\n xdsTicketKundennummerLoeschvormerkungGrund: TStringField;\r\n xdsTicketKundennummerPseudonymisiert: TStringField;\r\n xdsTicketKundennummerLoginAktiv: TIntegerField;\r\n xdsTicketKundennummerSonstigeDaten: TStringField;\r\n xdsTicketKundennummerB2C: TBooleanField;\r\n xdsTicketKundennummerTIN: TStringField;\r\n xdsTicketKundennummerMindestbestellwert: TFloatField;\r\n xdsTicketKundennummerBruttoberechnung: TIntegerField;\r\n xdsTicketKundennummerDruckWHG: TStringField;\r\n xdsTicketKundennummerBerechtigungen: TStringField;\r\n xdsTicketKundennummerRechnungCC: TStringField;\r\n xdsTicketProdukt: TXDataWebEntityField;\r\n xdsTicketProduktProdukt: TStringField;\r\n xdsTicketKategorie: TXDataWebEntityField;\r\n xdsTicketKategorieKategorie: TStringField;\r\n xdsTicketPrioritaet: TXDataWebEntityField;\r\n xdsTicketPrioritaetPrioritaet: TIntegerField;\r\n xdsTicketPrioritaetPrioText: TStringField;\r\n xdsTicketPrioritaetPrioFarbe: TIntegerField;\r\n xdsTicketStatus: TXDataWebEntityField;\r\n xdsTicketID: TIntegerField;\r\n xdsTicketErstelltAm: TDateTimeField;\r\n xdsTicketBetreff: TStringField;\r\n xdsTicketBeschreibung: TStringField;\r\n xdsTicketAbrechnungsbetrag: TFloatField;\r\n xdsTicketAbrechnungRechnungsnummer: TStringField;\r\n xdsTicketAberechnetAm: TDateTimeField;\r\n xdsTicketErledigtAm: TDateTimeField;\r\n xdsTicketNachname: TStringField;\r\n xdsTicketVorname: TStringField;\r\n xdsTicketEmail: TStringField;\r\n xdsTicketSystemInfo: TStringField;\r\n xdsTicketLoesung: TStringField;\r\n xdsTicketProtokoll: TStringField;\r\n xdsTicketZeitaufwandMinuten: TIntegerField;\r\n xdsTicketAbzurechnendeMinuten: TIntegerField;\r\n xdsTicketAbgerechneteMinuten: TIntegerField;\r\n xdsTicketBenachrichtigungNEU: TDateTimeField;\r\n xdsTicketBenachrichtigungLoesung: TDateTimeField;\r\n xdsTicketInterneBemerkung: TStringField;\r\n xdsTicketLoesungInfoSenden: TIntegerField;\r\n xdsTicketKontaktperson: TStringField;\r\n xdsTicketErreichbarkeitTelefon: TStringField;\r\n xdsTicketErreichbarkeitWann: TStringField;\r\n xdsTStatus: TXDataWebDataSet;\r\n xdsTStatusStatus: TStringField;\r\n webDBCStatus: TDBComboBox;\r\n sourceTicket: TDataSource;\r\n sourceTStatus: TDataSource;\r\n xdsTicketStatusStatus: TStringField;\r\n xdsTicketKonversation: TXDataWebDataSet;\r\n sourceTicketKonversation: TDataSource;\r\n xdsTicketKonversationTicketID: TXDataWebEntityField;\r\n xdsTicketKonversationID: TIntegerField;\r\n xdsTicketKonversationDatumUhrzeit: TDateTimeField;\r\n xdsTicketKonversationAntwortText: TStringField;\r\n xdsTicketKonversationNachrichtSenden: TIntegerField;\r\n xdsTicketKonversationNachrichtGesendet: TDateTimeField;\r\n btnAntwortNeu: TButton;\r\n edtNotiz: TMemo;\r\n btnAntwortSpeichern: TButton;\r\n xdsTicketKonversationVerfasser: TStringField;\r\n checkBenachrichtigung: TCheckBox;\r\n lblinfo: TLabel;\r\n lblKonversation: TLabel;\r\n xdsTicketKonversationQuellProgramm: TStringField;\r\n xdsTicketDateien: TXDataWebDataSet;\r\n xdsTicketDateienTicketID: TXDataWebEntityField;\r\n xdsTicketDateienID: TIntegerField;\r\n xdsTicketDateienDatumUhrzeit: TDateTimeField;\r\n xdsTicketDateienFuerLoesung: TIntegerField;\r\n xdsTicketDateienDateiMime: TStringField;\r\n xdsTicketDateienDateiName: TStringField;\r\n xdsTicketDateienDateiGroesse: TIntegerField;\r\n xdsTicketDateienDateiInhaltText: TStringField;\r\n xdsTicketKontaktpersonEmail: TStringField;\r\n xdskontosaldo: TXDataWebDataSet;\r\n xdskontosaldoKundennummer: TStringField;\r\n xdskontosaldoZeitaufwand: TIntegerField;\r\n xdskontosaldoAbzurechnen: TIntegerField;\r\n xdskontosaldoGutschrift: TIntegerField;\r\n xdskontosaldoAbzug: TIntegerField;\r\n xdskontosaldoSaldo: TIntegerField;\r\n xdskontosaldoBetrag: TFloatField;\r\n xdskontosaldoMinutenpreis: TFloatField;\r\n xdskontosaldoSRestguthaben: TIntegerField;\r\n procedure WebFormShow(Sender: TObject);\r\n procedure xdsTicketAfterOpen(DataSet: TDataSet);\r\n procedure btnzurueckClick(Sender: TObject);\r\n procedure btnSpeichernClick(Sender: TObject);\r\n procedure xdsTStatusAfterOpen(DataSet: TDataSet);\r\n procedure WebFormClose(Sender: TObject; var Action: TCloseAction);\r\n procedure sourceTicketStateChange(Sender: TObject);\r\n procedure xdsTicketAfterPost(DataSet: TDataSet);\r\n procedure xdsTicketAfterApplyUpdates(Sender: TDataSet;\r\n Info: TResolveResults);\r\n procedure xdsTicketBeforePost(DataSet: TDataSet);\r\n procedure xdsTicketKonversationAfterOpen(DataSet: TDataSet);\r\n procedure btnAntwortNeuClick(Sender: TObject);\r\n procedure btnAntwortSpeichernClick(Sender: TObject);\r\n procedure xdsTicketKonversationAfterPost(DataSet: TDataSet);\r\n procedure xdsTicketKonversationAfterApplyUpdates(Sender: TDataSet;\r\n Info: TResolveResults);\r\n procedure xdsTicketDateienAfterOpen(DataSet: TDataSet);\r\n procedure xdskontosaldoAfterOpen(DataSet: TDataSet);\r\n private\r\n { Private-Deklarationen }\r\n public\r\n { Public-Deklarationen }\r\n MerkerTicket:string;\r\n protected procedure LoadDFMValues; override; end;\r\n\r\nvar\r\n EinzelTicket: TEinzelTicket;\r\n\r\nimplementation\r\n uses unit1, unit2, unit_BarcodeScan;\r\n{$R *.dfm}\r\n\r\n\r\n\r\nprocedure TEinzelTicket.btnAntwortNeuClick(Sender: TObject);\r\nbegin\r\n btnAntwortNeu.visible:=false;\r\n lblinfo.Visible:=true;\r\n checkBenachrichtigung.Visible:=true;\r\n edtNotiz.visible:=true;\r\n btnantwortspeichern.Visible:=true;\r\n edtNotiz.SetFocus;\r\nend;\r\n\r\nprocedure TEinzelTicket.btnAntwortSpeichernClick(Sender: TObject);\r\nbegin\r\n xdsticketkonversation.Append;\r\n xdsTicketKonversationTicketID.Value:=xdsTicket.CurrentData;\r\n xdsTicketKonversationDatumUhrzeit.AsDateTime:=date+time;\r\n xdsTicketKonversationAntwortText.AsString:=edtnotiz.Text;\r\n xdsTicketKonversationVerfasser.AsString:=leftstr(trim(BenutzerVorname+' '+BenutzerNachname),50);\r\n xdsTicketKonversationQuellProgramm.AsString:='CadiaWEB';\r\n if checkBenachrichtigung.checked then\r\n begin\r\n xdsTicketKonversationNachrichtSenden.AsInteger:=1;\r\n end\r\n else\r\n begin\r\n xdsTicketKonversationNachrichtSenden.AsInteger:=0;\r\n end;\r\n xdsTicketkonversation.Post;\r\n\r\nend;\r\n\r\nprocedure TEinzelTicket.btnSpeichernClick(Sender: TObject);\r\nbegin\r\n xdsTicket.Post;\r\nend;\r\n\r\nprocedure TEinzelTicket.btnzurueckClick(Sender: TObject);\r\nbegin\r\n xdsTicket.Close;\r\n self.Close;\r\nend;\r\n\r\nprocedure TEinzelTicket.sourceTicketStateChange(Sender: TObject);\r\nbegin\r\n if xdsTicket.State in dseditmodes then btnspeichern.Enabled:=true else btnspeichern.Enabled:=false;\r\nend;\r\n\r\nprocedure TEinzelTicket.WebFormClose(Sender: TObject; var Action: TCloseAction);\r\nbegin\r\n action:=cafree;\r\nend;\r\n\r\nprocedure TEinzelTicket.WebFormShow(Sender: TObject);\r\nvar\r\n myelement:TJSHTMLElement;\r\nbegin\r\n Container1.html.text:='';\r\n myelement:=container1.ElementHandle;\r\n btnzurueck.ParentElement:=myelement;\r\n btnSpeichern.parentelement:=myelement;\r\n webDBCStatus.ParentElement:=myelement;\r\n //btnSpeichern.Visible:=false;\r\n container2.ParentElement:=myelement;\r\n myelement:=container2.ElementHandle;\r\n tc.ParentElement:=myelement;\r\n myelement:=container3.ElementHandle;\r\n lblkonversation.parentelement:=myelement;\r\n btnAntwortNeu.ParentElement:=myelement;\r\n lblinfo.ParentElement:=myelement;\r\n checkBenachrichtigung.ParentElement:=myelement;\r\n checkbenachrichtigung.Caption:='';\r\n edtnotiz.ParentElement:=myelement;\r\n edtnotiz.text:='';\r\n edtnotiz.visible:=false;\r\n btnantwortspeichern.parentelement:=myelement;\r\n lblinfo.Visible:=false;\r\n checkBenachrichtigung.Visible:=false;\r\n xdsTstatus.load;\r\n\r\nend;\r\n\r\nprocedure TEinzelTicket.xdskontosaldoAfterOpen(DataSet: TDataSet);\r\nbegin\r\n tc.Cells[0,2]:='Support-Konto-Saldo: '+xdskontosaldosaldo.asstring+'';\r\nend;\r\n\r\nprocedure TEinzelTicket.xdsTicketAfterApplyUpdates(Sender: TDataSet;\r\n Info: TResolveResults);\r\nbegin\r\n if info.Records[0].Error<>'' then showmessage(info.Records[0].Error);\r\n xdsticket.Close;\r\n xdsTicketkonversation.load;\r\nend;\r\n\r\nprocedure TEinzelTicket.xdsTicketAfterOpen(DataSet: TDataSet);\r\nvar\r\n i:integer;\r\n myelement:TJSHTMLElement;\r\n mytemptext:string;\r\nbegin\r\n btnantwortspeichern.visible:=false;\r\n i:=0;\r\n tc.Visible:=true;\r\n tc.RowCount:=xdsticketkonversation.recordcount+11;\r\n tc.ColCount:=1;\r\n tc.Cells[0,i]:='Ticket-ID: '+ xdsticketID.asstring+' | '+formatdatetime('DD.MM.YYYY hh:mm',xdsTicketErstelltAm.AsDateTime)+'
'+xdsticketbetreff.asstring;\r\n inc(i);\r\n\r\n tc.Cells[0,i]:=xdsTicketKundennummerKundennummer.asstring+ ' | '+xdsTicketNachname.asstring;\r\n inc(i);\r\n tc.Cells[0,i]:='Support-Konto-Saldo: ';\r\n inc(i);\r\n mytemptext:='';\r\n if xdsticketkontaktperson.asstring<>'' then mytemptext:=mytemptext+xdsticketKontaktperson.asstring+'
';\r\n if xdsticketkontaktpersonEmail.asstring<>'' then mytemptext:=mytemptext+xdsticketKontaktpersonEmail.asstring+'
';\r\n if xdsticketErreichbarkeitWann.asstring<>'' then mytemptext:=mytemptext+xdsticketErreichbarkeitWann.asstring+'
';\r\n if xdsticketErreichbarkeitTelefon.asstring<>'' then mytemptext:=mytemptext+xdsticketErreichbarkeitTelefon.asstring;\r\n tc.Cells[0,i]:=mytemptext;\r\n\r\n webdbCStatus.text:=xdsticketstatusstatus.asstring;\r\n inc(i);\r\n tc.Cells[0,i]:='Aufwand (Min.): '+xdsticketzeitaufwandminuten.asstring+' | Abrechnen: '+xdsticketAbzurechnendeMinuten.asstring;\r\n\r\n inc(i);\r\n tc.Cells[0,i]:=xdsticketbeschreibung.asstring;\r\n if xdsticketloesung.AsString<>'' then\r\n begin\r\n inc(i);\r\n tc.Cells[0,i]:='Lösung
'+xdsticketloesung.asstring;\r\n end;\r\n if xdsticketInterneBemerkung.asstring<>'' then\r\n begin\r\n inc(i);\r\n tc.Cells[0,i]:='Interne Bemerkung
'+xdsticketInterneBemerkung.asstring;\r\n end;\r\n\r\n if xdsTicketDateien.recordcount>0 then\r\n begin\r\n inc(i);\r\n mytemptext:='Dateien
';\r\n\r\n xdsTicketDateien.First;\r\n while not xdsTicketDateien.EOF do\r\n begin\r\n mytemptext:=mytemptext + xdsTicketDateienDateiName.AsString + '
';\r\n xdsTicketDateien.Next;\r\n end;\r\n tc.Cells[0,i]:=mytemptext;\r\n end;\r\n\r\n\r\n\r\n inc(i);\r\n myelement:=tc.CellElements[0,i];\r\n container3.ParentElement:=myelement;\r\n\r\n tc.RowCount:=xdsticketkonversation.recordcount+i+1;\r\n\r\n xdsticketkonversation.first;\r\n while not xdsticketkonversation.eof do\r\n begin\r\n inc(i);\r\n tc.cells[0,i]:=''+xdsTicketKonversationVerfasser.AsString+' | '+xdsticketkonversationdatumuhrzeit.asstring+'
'+ xdsticketkonversationantworttext.asstring;\r\n xdsticketkonversation.next;\r\n end;\r\n xdskontosaldo.close;\r\n xdskontosaldo.querystring:='$filter=Kundennummer eq '+xdsticketkundennummerkundennummer.asstring;\r\n xdskontosaldo.load;\r\nend;\r\n\r\nprocedure TEinzelTicket.xdsTicketAfterPost(DataSet: TDataSet);\r\nbegin\r\n xdsticket.ApplyUpdates;\r\nend;\r\n\r\nprocedure TEinzelTicket.xdsTicketBeforePost(DataSet: TDataSet);\r\nbegin\r\n xdsTStatus.locate('Status',webDBCStatus.text,[]);\r\n xdsTicketStatus.value:=xdsTStatus.CurrentData;\r\nend;\r\n\r\nprocedure TEinzelTicket.xdsTicketDateienAfterOpen(DataSet: TDataSet);\r\nbegin\r\n xdsticket.close;\r\n xdsticket.QueryString:='$expand=Kundennummer,Status&$filter=ID eq '+merkerticket;\r\n xdsticket.Load;\r\nend;\r\n\r\nprocedure TEinzelTicket.xdsTicketKonversationAfterApplyUpdates(Sender: TDataSet;\r\n Info: TResolveResults);\r\nbegin\r\n if info.Records[0].Error<>'' then showmessage(info.Records[0].Error);\r\n xdsTicketKonversation.close;\r\n edtNotiz.Text:='';\r\n xdsticket.edit;\r\n //webdbCStatus.text:='neue Antwort vom Kunden';\r\n xdsticket.Post;\r\n\r\nend;\r\n\r\nprocedure TEinzelTicket.xdsTicketKonversationAfterOpen(DataSet: TDataSet);\r\nbegin\r\n xdsTicketDateien.close;\r\n xdsTicketDateien.QueryString:='$filter=TicketID eq '+merkerticket+'&$orderby=DatumUhrzeit DESC';\r\n xdsTicketDateien.load;\r\nend;\r\n\r\nprocedure TEinzelTicket.xdsTicketKonversationAfterPost(DataSet: TDataSet);\r\nbegin\r\n btnAntwortNeu.visible:=true;\r\n lblinfo.Visible:=false;\r\n checkBenachrichtigung.Visible:=false;\r\n edtNotiz.visible:=false;\r\n btnantwortspeichern.Visible:=false;\r\n xdsTicketKonversation.ApplyUpdates;\r\nend;\r\n\r\nprocedure TEinzelTicket.xdsTStatusAfterOpen(DataSet: TDataSet);\r\nbegin\r\n xdsTicketKonversation.close;\r\n xdsTicketKonversation.QueryString:='$filter=TicketID eq '+merkerticket+'&$orderby=DatumUhrzeit DESC';\r\n xdsTicketkonversation.load;\r\nend;\r\n\r\nprocedure TEinzelTicket.LoadDFMValues;\r\nbegin\r\n inherited LoadDFMValues;\r\n\r\n lblinfo := TLabel.Create(Self);\r\n lblKonversation := TLabel.Create(Self);\r\n Container1 := THTMLContainer.Create(Self);\r\n Container2 := THTMLContainer.Create(Self);\r\n Container3 := THTMLContainer.Create(Self);\r\n btnzurueck := TButton.Create(Self);\r\n TC := TTableControl.Create(Self);\r\n btnSpeichern := TButton.Create(Self);\r\n webDBCStatus := TDBComboBox.Create(Self);\r\n btnAntwortNeu := TButton.Create(Self);\r\n edtNotiz := TMemo.Create(Self);\r\n btnAntwortSpeichern := TButton.Create(Self);\r\n checkBenachrichtigung := TCheckBox.Create(Self);\r\n xdsTicket := TXDataWebDataSet.Create(Self);\r\n xdsTicketKundennummer := TXDataWebEntityField.Create(Self);\r\n xdsTicketKundennummerZahlungsbedingung := TXDataWebEntityField.Create(Self);\r\n xdsTicketKundennummerKundennummer := TStringField.Create(Self);\r\n xdsTicketKundennummerGruppeKunden := TBooleanField.Create(Self);\r\n xdsTicketKundennummerGruppeLieferanten := TBooleanField.Create(Self);\r\n xdsTicketKundennummerGruppeSonstige := TBooleanField.Create(Self);\r\n xdsTicketKundennummerGruppeNichtkunden := TBooleanField.Create(Self);\r\n xdsTicketKundennummerKontaktgruppe := TStringField.Create(Self);\r\n xdsTicketKundennummerNachname := TStringField.Create(Self);\r\n xdsTicketKundennummerVorname := TStringField.Create(Self);\r\n xdsTicketKundennummerAdresszeile2 := TStringField.Create(Self);\r\n xdsTicketKundennummerAdresszeile3 := TStringField.Create(Self);\r\n xdsTicketKundennummerStrasse := TStringField.Create(Self);\r\n xdsTicketKundennummerPostleitzahl := TStringField.Create(Self);\r\n xdsTicketKundennummerOrt := TStringField.Create(Self);\r\n xdsTicketKundennummerLaenderkuerzel := TStringField.Create(Self);\r\n xdsTicketKundennummerLand := TStringField.Create(Self);\r\n xdsTicketKundennummerLaenderkennzeichen := TBooleanField.Create(Self);\r\n xdsTicketKundennummerAdressanrede := TStringField.Create(Self);\r\n xdsTicketKundennummerBriefanrede1 := TStringField.Create(Self);\r\n xdsTicketKundennummerBriefanrede2 := TStringField.Create(Self);\r\n xdsTicketKundennummerAdresseBild := TStringField.Create(Self);\r\n xdsTicketKundennummerLieferanschrift := TStringField.Create(Self);\r\n xdsTicketKundennummerGeburtsdatum := TDateTimeField.Create(Self);\r\n xdsTicketKundennummerTelefonNummer := TStringField.Create(Self);\r\n xdsTicketKundennummerTelefaxNummer := TStringField.Create(Self);\r\n xdsTicketKundennummerMobilTelefon := TStringField.Create(Self);\r\n xdsTicketKundennummerEMail := TStringField.Create(Self);\r\n xdsTicketKundennummerInternet := TStringField.Create(Self);\r\n xdsTicketKundennummerUmsatzsteuerID := TStringField.Create(Self);\r\n xdsTicketKundennummerUmsatzsteuerausweis := TBooleanField.Create(Self);\r\n xdsTicketKundennummerBemerkungen := TStringField.Create(Self);\r\n xdsTicketKundennummerBranche := TStringField.Create(Self);\r\n xdsTicketKundennummerSelektiert1 := TBooleanField.Create(Self);\r\n xdsTicketKundennummerSelektiert2 := TBooleanField.Create(Self);\r\n xdsTicketKundennummerSelektiert3 := TBooleanField.Create(Self);\r\n xdsTicketKundennummerTransportbedingung := TStringField.Create(Self);\r\n xdsTicketKundennummerKilometer := TIntegerField.Create(Self);\r\n xdsTicketKundennummerRabattsatz := TFloatField.Create(Self);\r\n xdsTicketKundennummerStundensatz := TFloatField.Create(Self);\r\n xdsTicketKundennummerKontonummer := TStringField.Create(Self);\r\n xdsTicketKundennummerBank := TStringField.Create(Self);\r\n xdsTicketKundennummerBankleitzahl := TFloatField.Create(Self);\r\n xdsTicketKundennummerKontoinhaber := TStringField.Create(Self);\r\n xdsTicketKundennummerBetreuer := TStringField.Create(Self);\r\n xdsTicketKundennummerQuelle := TStringField.Create(Self);\r\n xdsTicketKundennummerSuchmerkmal := TStringField.Create(Self);\r\n xdsTicketKundennummerWarenkreditlimit := TFloatField.Create(Self);\r\n xdsTicketKundennummerWarenkreditgesperrt := TBooleanField.Create(Self);\r\n xdsTicketKundennummerKundennummerFremd := TStringField.Create(Self);\r\n xdsTicketKundennummerKeinNewsletter := TBooleanField.Create(Self);\r\n xdsTicketKundennummerDebitorennummer := TStringField.Create(Self);\r\n xdsTicketKundennummerKreditorennummer := TStringField.Create(Self);\r\n xdsTicketKundennummerRabattstufe := TStringField.Create(Self);\r\n xdsTicketKundennummerTelefonAlternativ := TStringField.Create(Self);\r\n xdsTicketKundennummerKostentraeger := TStringField.Create(Self);\r\n xdsTicketKundennummerIBAN := TStringField.Create(Self);\r\n xdsTicketKundennummerBIC := TStringField.Create(Self);\r\n xdsTicketKundennummerEmailkonto := TStringField.Create(Self);\r\n xdsTicketKundennummerBenutzername := TStringField.Create(Self);\r\n xdsTicketKundennummerPasswort := TStringField.Create(Self);\r\n xdsTicketKundennummerExportOutlook := TBooleanField.Create(Self);\r\n xdsTicketKundennummerNichtInListeAnzeigen := TBooleanField.Create(Self);\r\n xdsTicketKundennummerKreditkarteArt := TStringField.Create(Self);\r\n xdsTicketKundennummerKreditkarteInhaber := TStringField.Create(Self);\r\n xdsTicketKundennummerKreditkarteNummer := TStringField.Create(Self);\r\n xdsTicketKundennummerKreditkarteGueltigMonat := TStringField.Create(Self);\r\n xdsTicketKundennummerKreditkarteGueltigJahr := TIntegerField.Create(Self);\r\n xdsTicketKundennummerKreditkartePruefziffer := TStringField.Create(Self);\r\n xdsTicketKundennummerDatumNeu := TDateTimeField.Create(Self);\r\n xdsTicketKundennummerDatumgeaendert := TDateTimeField.Create(Self);\r\n xdsTicketKundennummerTitel := TStringField.Create(Self);\r\n xdsTicketKundennummerStundensatzMontage := TFloatField.Create(Self);\r\n xdsTicketKundennummerStdMontageU25 := TFloatField.Create(Self);\r\n xdsTicketKundennummerStdMontageU50 := TFloatField.Create(Self);\r\n xdsTicketKundennummerStdMontageU70 := TFloatField.Create(Self);\r\n xdsTicketKundennummerStdMontageU100 := TFloatField.Create(Self);\r\n xdsTicketKundennummerStdMontageU150 := TFloatField.Create(Self);\r\n xdsTicketKundennummerStundensatzWerkstatt := TFloatField.Create(Self);\r\n xdsTicketKundennummerStdWerkstattU25 := TFloatField.Create(Self);\r\n xdsTicketKundennummerStdWerkstattU50 := TFloatField.Create(Self);\r\n xdsTicketKundennummerStdWerkstattU70 := TFloatField.Create(Self);\r\n xdsTicketKundennummerStdWerkstattU100 := TFloatField.Create(Self);\r\n xdsTicketKundennummerStdWerkstattU150 := TFloatField.Create(Self);\r\n xdsTicketKundennummerArchivReferenz := TStringField.Create(Self);\r\n xdsTicketKundennummerErloesKontoUST1 := TStringField.Create(Self);\r\n xdsTicketKundennummerErloesKontoUST2 := TStringField.Create(Self);\r\n xdsTicketKundennummerErloesKontoUST3 := TStringField.Create(Self);\r\n xdsTicketKundennummerGebKal := TBooleanField.Create(Self);\r\n xdsTicketKundennummerEmailversand := TBooleanField.Create(Self);\r\n xdsTicketKundennummerMahnspesen := TBooleanField.Create(Self);\r\n xdsTicketKundennummerRechnungSchluss := TStringField.Create(Self);\r\n xdsTicketKundennummerBenutzerNeu := TStringField.Create(Self);\r\n xdsTicketKundennummerBenutzerGeaendert := TStringField.Create(Self);\r\n xdsTicketKundennummerBelegsprache := TStringField.Create(Self);\r\n xdsTicketKundennummerkmSatz := TFloatField.Create(Self);\r\n xdsTicketKundennummerKundenklassetext := TStringField.Create(Self);\r\n xdsTicketKundennummerKundenklasseFarbe := TIntegerField.Create(Self);\r\n xdsTicketKundennummerAbweichenderRechnungsEmpfaenger := TStringField.Create(Self);\r\n xdsTicketKundennummerProtokoll := TStringField.Create(Self);\r\n xdsTicketKundennummerILNTyp1 := TStringField.Create(Self);\r\n xdsTicketKundennummerILNTyp2 := TStringField.Create(Self);\r\n xdsTicketKundennummerKontaktGUID := TStringField.Create(Self);\r\n xdsTicketKundennummerPLZGUID := TStringField.Create(Self);\r\n xdsTicketKundennummerPreislistenVariantePakete := TStringField.Create(Self);\r\n xdsTicketKundennummerSchluesselRechnungslauf := TStringField.Create(Self);\r\n xdsTicketKundennummerRechnungEmail := TStringField.Create(Self);\r\n xdsTicketKundennummerZahlungsbedingungEK := TIntegerField.Create(Self);\r\n xdsTicketKundennummerTransportbedingungEK := TStringField.Create(Self);\r\n xdsTicketKundennummerRabattsatzEK := TFloatField.Create(Self);\r\n xdsTicketKundennummerVertreterMatchcode := TStringField.Create(Self);\r\n xdsTicketKundennummerVertreterProvisionssatz := TFloatField.Create(Self);\r\n xdsTicketKundennummerUmsatzVKJahr := TFloatField.Create(Self);\r\n xdsTicketKundennummerUmsatzVKVorjahr := TFloatField.Create(Self);\r\n xdsTicketKundennummerUmsatzEKJahr := TFloatField.Create(Self);\r\n xdsTicketKundennummerUmsatzEKVorjahr := TFloatField.Create(Self);\r\n xdsTicketKundennummerSteuernummer := TStringField.Create(Self);\r\n xdsTicketKundennummerLoginPW := TStringField.Create(Self);\r\n xdsTicketKundennummerREperFax := TBooleanField.Create(Self);\r\n xdsTicketKundennummerErreichbarkeit := TStringField.Create(Self);\r\n xdsTicketKundennummerErloesKontoUST4 := TStringField.Create(Self);\r\n xdsTicketKundennummerErloesKontoUST5 := TStringField.Create(Self);\r\n xdsTicketKundennummerErloesKontoUST6 := TStringField.Create(Self);\r\n xdsTicketKundennummerBesteuerungKey := TIntegerField.Create(Self);\r\n xdsTicketKundennummerAuftraegeJahr := TFloatField.Create(Self);\r\n xdsTicketKundennummerAuftraegeVorjahr := TFloatField.Create(Self);\r\n xdsTicketKundennummerLieferadresseID := TIntegerField.Create(Self);\r\n xdsTicketKundennummerUSTIDgeprueft := TDateTimeField.Create(Self);\r\n xdsTicketKundennummerKontaktverbund := TStringField.Create(Self);\r\n xdsTicketKundennummerHinweis := TStringField.Create(Self);\r\n xdsTicketKundennummerLatitude := TFloatField.Create(Self);\r\n xdsTicketKundennummerLongitude := TFloatField.Create(Self);\r\n xdsTicketKundennummerkmLuftlinie := TFloatField.Create(Self);\r\n xdsTicketKundennummerGoogleID := TStringField.Create(Self);\r\n xdsTicketKundennummerGoogleUpdatedUTC := TDateTimeField.Create(Self);\r\n xdsTicketKundennummerBundesland := TStringField.Create(Self);\r\n xdsTicketKundennummerRegion := TStringField.Create(Self);\r\n xdsTicketKundennummerMandatsreferenz := TStringField.Create(Self);\r\n xdsTicketKundennummerMandatsreferenzVom := TDateTimeField.Create(Self);\r\n xdsTicketKundennummerLastschriftArt := TStringField.Create(Self);\r\n xdsTicketKundennummerMahnsperre := TBooleanField.Create(Self);\r\n xdsTicketKundennummerSuchbegriff := TStringField.Create(Self);\r\n xdsTicketKundennummerLieferanschriftDaten := TStringField.Create(Self);\r\n xdsTicketKundennummerExportKasse := TBooleanField.Create(Self);\r\n xdsTicketKundennummerLoeschvormerkungDatum := TDateTimeField.Create(Self);\r\n xdsTicketKundennummerLoeschvormerkungGrund := TStringField.Create(Self);\r\n xdsTicketKundennummerPseudonymisiert := TStringField.Create(Self);\r\n xdsTicketKundennummerLoginAktiv := TIntegerField.Create(Self);\r\n xdsTicketKundennummerSonstigeDaten := TStringField.Create(Self);\r\n xdsTicketKundennummerB2C := TBooleanField.Create(Self);\r\n xdsTicketKundennummerTIN := TStringField.Create(Self);\r\n xdsTicketKundennummerMindestbestellwert := TFloatField.Create(Self);\r\n xdsTicketKundennummerBruttoberechnung := TIntegerField.Create(Self);\r\n xdsTicketKundennummerDruckWHG := TStringField.Create(Self);\r\n xdsTicketKundennummerBerechtigungen := TStringField.Create(Self);\r\n xdsTicketKundennummerRechnungCC := TStringField.Create(Self);\r\n xdsTicketProdukt := TXDataWebEntityField.Create(Self);\r\n xdsTicketProduktProdukt := TStringField.Create(Self);\r\n xdsTicketKategorie := TXDataWebEntityField.Create(Self);\r\n xdsTicketKategorieKategorie := TStringField.Create(Self);\r\n xdsTicketPrioritaet := TXDataWebEntityField.Create(Self);\r\n xdsTicketPrioritaetPrioritaet := TIntegerField.Create(Self);\r\n xdsTicketPrioritaetPrioText := TStringField.Create(Self);\r\n xdsTicketPrioritaetPrioFarbe := TIntegerField.Create(Self);\r\n xdsTicketStatus := TXDataWebEntityField.Create(Self);\r\n xdsTicketID := TIntegerField.Create(Self);\r\n xdsTicketErstelltAm := TDateTimeField.Create(Self);\r\n xdsTicketBetreff := TStringField.Create(Self);\r\n xdsTicketBeschreibung := TStringField.Create(Self);\r\n xdsTicketAbrechnungsbetrag := TFloatField.Create(Self);\r\n xdsTicketAbrechnungRechnungsnummer := TStringField.Create(Self);\r\n xdsTicketAberechnetAm := TDateTimeField.Create(Self);\r\n xdsTicketErledigtAm := TDateTimeField.Create(Self);\r\n xdsTicketNachname := TStringField.Create(Self);\r\n xdsTicketVorname := TStringField.Create(Self);\r\n xdsTicketEmail := TStringField.Create(Self);\r\n xdsTicketSystemInfo := TStringField.Create(Self);\r\n xdsTicketLoesung := TStringField.Create(Self);\r\n xdsTicketProtokoll := TStringField.Create(Self);\r\n xdsTicketZeitaufwandMinuten := TIntegerField.Create(Self);\r\n xdsTicketAbzurechnendeMinuten := TIntegerField.Create(Self);\r\n xdsTicketAbgerechneteMinuten := TIntegerField.Create(Self);\r\n xdsTicketBenachrichtigungNEU := TDateTimeField.Create(Self);\r\n xdsTicketBenachrichtigungLoesung := TDateTimeField.Create(Self);\r\n xdsTicketInterneBemerkung := TStringField.Create(Self);\r\n xdsTicketLoesungInfoSenden := TIntegerField.Create(Self);\r\n xdsTicketKontaktperson := TStringField.Create(Self);\r\n xdsTicketErreichbarkeitTelefon := TStringField.Create(Self);\r\n xdsTicketErreichbarkeitWann := TStringField.Create(Self);\r\n xdsTicketStatusStatus := TStringField.Create(Self);\r\n xdsTicketKontaktpersonEmail := TStringField.Create(Self);\r\n xdsTStatus := TXDataWebDataSet.Create(Self);\r\n xdsTStatusStatus := TStringField.Create(Self);\r\n sourceTicket := TDataSource.Create(Self);\r\n sourceTStatus := TDataSource.Create(Self);\r\n xdsTicketKonversation := TXDataWebDataSet.Create(Self);\r\n xdsTicketKonversationTicketID := TXDataWebEntityField.Create(Self);\r\n xdsTicketKonversationID := TIntegerField.Create(Self);\r\n xdsTicketKonversationDatumUhrzeit := TDateTimeField.Create(Self);\r\n xdsTicketKonversationAntwortText := TStringField.Create(Self);\r\n xdsTicketKonversationNachrichtSenden := TIntegerField.Create(Self);\r\n xdsTicketKonversationNachrichtGesendet := TDateTimeField.Create(Self);\r\n xdsTicketKonversationVerfasser := TStringField.Create(Self);\r\n xdsTicketKonversationQuellProgramm := TStringField.Create(Self);\r\n sourceTicketKonversation := TDataSource.Create(Self);\r\n xdsTicketDateien := TXDataWebDataSet.Create(Self);\r\n xdsTicketDateienTicketID := TXDataWebEntityField.Create(Self);\r\n xdsTicketDateienID := TIntegerField.Create(Self);\r\n xdsTicketDateienDatumUhrzeit := TDateTimeField.Create(Self);\r\n xdsTicketDateienFuerLoesung := TIntegerField.Create(Self);\r\n xdsTicketDateienDateiMime := TStringField.Create(Self);\r\n xdsTicketDateienDateiName := TStringField.Create(Self);\r\n xdsTicketDateienDateiGroesse := TIntegerField.Create(Self);\r\n xdsTicketDateienDateiInhaltText := TStringField.Create(Self);\r\n xdskontosaldo := TXDataWebDataSet.Create(Self);\r\n xdskontosaldoKundennummer := TStringField.Create(Self);\r\n xdskontosaldoZeitaufwand := TIntegerField.Create(Self);\r\n xdskontosaldoAbzurechnen := TIntegerField.Create(Self);\r\n xdskontosaldoGutschrift := TIntegerField.Create(Self);\r\n xdskontosaldoAbzug := TIntegerField.Create(Self);\r\n xdskontosaldoSaldo := TIntegerField.Create(Self);\r\n xdskontosaldoBetrag := TFloatField.Create(Self);\r\n xdskontosaldoMinutenpreis := TFloatField.Create(Self);\r\n xdskontosaldoSRestguthaben := TIntegerField.Create(Self);\r\n\r\n lblinfo.BeforeLoadDFMValues;\r\n lblKonversation.BeforeLoadDFMValues;\r\n Container1.BeforeLoadDFMValues;\r\n Container2.BeforeLoadDFMValues;\r\n Container3.BeforeLoadDFMValues;\r\n btnzurueck.BeforeLoadDFMValues;\r\n TC.BeforeLoadDFMValues;\r\n btnSpeichern.BeforeLoadDFMValues;\r\n webDBCStatus.BeforeLoadDFMValues;\r\n btnAntwortNeu.BeforeLoadDFMValues;\r\n edtNotiz.BeforeLoadDFMValues;\r\n btnAntwortSpeichern.BeforeLoadDFMValues;\r\n checkBenachrichtigung.BeforeLoadDFMValues;\r\n xdsTicket.BeforeLoadDFMValues;\r\n xdsTicketKundennummer.BeforeLoadDFMValues;\r\n xdsTicketKundennummerZahlungsbedingung.BeforeLoadDFMValues;\r\n xdsTicketKundennummerKundennummer.BeforeLoadDFMValues;\r\n xdsTicketKundennummerGruppeKunden.BeforeLoadDFMValues;\r\n xdsTicketKundennummerGruppeLieferanten.BeforeLoadDFMValues;\r\n xdsTicketKundennummerGruppeSonstige.BeforeLoadDFMValues;\r\n xdsTicketKundennummerGruppeNichtkunden.BeforeLoadDFMValues;\r\n xdsTicketKundennummerKontaktgruppe.BeforeLoadDFMValues;\r\n xdsTicketKundennummerNachname.BeforeLoadDFMValues;\r\n xdsTicketKundennummerVorname.BeforeLoadDFMValues;\r\n xdsTicketKundennummerAdresszeile2.BeforeLoadDFMValues;\r\n xdsTicketKundennummerAdresszeile3.BeforeLoadDFMValues;\r\n xdsTicketKundennummerStrasse.BeforeLoadDFMValues;\r\n xdsTicketKundennummerPostleitzahl.BeforeLoadDFMValues;\r\n xdsTicketKundennummerOrt.BeforeLoadDFMValues;\r\n xdsTicketKundennummerLaenderkuerzel.BeforeLoadDFMValues;\r\n xdsTicketKundennummerLand.BeforeLoadDFMValues;\r\n xdsTicketKundennummerLaenderkennzeichen.BeforeLoadDFMValues;\r\n xdsTicketKundennummerAdressanrede.BeforeLoadDFMValues;\r\n xdsTicketKundennummerBriefanrede1.BeforeLoadDFMValues;\r\n xdsTicketKundennummerBriefanrede2.BeforeLoadDFMValues;\r\n xdsTicketKundennummerAdresseBild.BeforeLoadDFMValues;\r\n xdsTicketKundennummerLieferanschrift.BeforeLoadDFMValues;\r\n xdsTicketKundennummerGeburtsdatum.BeforeLoadDFMValues;\r\n xdsTicketKundennummerTelefonNummer.BeforeLoadDFMValues;\r\n xdsTicketKundennummerTelefaxNummer.BeforeLoadDFMValues;\r\n xdsTicketKundennummerMobilTelefon.BeforeLoadDFMValues;\r\n xdsTicketKundennummerEMail.BeforeLoadDFMValues;\r\n xdsTicketKundennummerInternet.BeforeLoadDFMValues;\r\n xdsTicketKundennummerUmsatzsteuerID.BeforeLoadDFMValues;\r\n xdsTicketKundennummerUmsatzsteuerausweis.BeforeLoadDFMValues;\r\n xdsTicketKundennummerBemerkungen.BeforeLoadDFMValues;\r\n xdsTicketKundennummerBranche.BeforeLoadDFMValues;\r\n xdsTicketKundennummerSelektiert1.BeforeLoadDFMValues;\r\n xdsTicketKundennummerSelektiert2.BeforeLoadDFMValues;\r\n xdsTicketKundennummerSelektiert3.BeforeLoadDFMValues;\r\n xdsTicketKundennummerTransportbedingung.BeforeLoadDFMValues;\r\n xdsTicketKundennummerKilometer.BeforeLoadDFMValues;\r\n xdsTicketKundennummerRabattsatz.BeforeLoadDFMValues;\r\n xdsTicketKundennummerStundensatz.BeforeLoadDFMValues;\r\n xdsTicketKundennummerKontonummer.BeforeLoadDFMValues;\r\n xdsTicketKundennummerBank.BeforeLoadDFMValues;\r\n xdsTicketKundennummerBankleitzahl.BeforeLoadDFMValues;\r\n xdsTicketKundennummerKontoinhaber.BeforeLoadDFMValues;\r\n xdsTicketKundennummerBetreuer.BeforeLoadDFMValues;\r\n xdsTicketKundennummerQuelle.BeforeLoadDFMValues;\r\n xdsTicketKundennummerSuchmerkmal.BeforeLoadDFMValues;\r\n xdsTicketKundennummerWarenkreditlimit.BeforeLoadDFMValues;\r\n xdsTicketKundennummerWarenkreditgesperrt.BeforeLoadDFMValues;\r\n xdsTicketKundennummerKundennummerFremd.BeforeLoadDFMValues;\r\n xdsTicketKundennummerKeinNewsletter.BeforeLoadDFMValues;\r\n xdsTicketKundennummerDebitorennummer.BeforeLoadDFMValues;\r\n xdsTicketKundennummerKreditorennummer.BeforeLoadDFMValues;\r\n xdsTicketKundennummerRabattstufe.BeforeLoadDFMValues;\r\n xdsTicketKundennummerTelefonAlternativ.BeforeLoadDFMValues;\r\n xdsTicketKundennummerKostentraeger.BeforeLoadDFMValues;\r\n xdsTicketKundennummerIBAN.BeforeLoadDFMValues;\r\n xdsTicketKundennummerBIC.BeforeLoadDFMValues;\r\n xdsTicketKundennummerEmailkonto.BeforeLoadDFMValues;\r\n xdsTicketKundennummerBenutzername.BeforeLoadDFMValues;\r\n xdsTicketKundennummerPasswort.BeforeLoadDFMValues;\r\n xdsTicketKundennummerExportOutlook.BeforeLoadDFMValues;\r\n xdsTicketKundennummerNichtInListeAnzeigen.BeforeLoadDFMValues;\r\n xdsTicketKundennummerKreditkarteArt.BeforeLoadDFMValues;\r\n xdsTicketKundennummerKreditkarteInhaber.BeforeLoadDFMValues;\r\n xdsTicketKundennummerKreditkarteNummer.BeforeLoadDFMValues;\r\n xdsTicketKundennummerKreditkarteGueltigMonat.BeforeLoadDFMValues;\r\n xdsTicketKundennummerKreditkarteGueltigJahr.BeforeLoadDFMValues;\r\n xdsTicketKundennummerKreditkartePruefziffer.BeforeLoadDFMValues;\r\n xdsTicketKundennummerDatumNeu.BeforeLoadDFMValues;\r\n xdsTicketKundennummerDatumgeaendert.BeforeLoadDFMValues;\r\n xdsTicketKundennummerTitel.BeforeLoadDFMValues;\r\n xdsTicketKundennummerStundensatzMontage.BeforeLoadDFMValues;\r\n xdsTicketKundennummerStdMontageU25.BeforeLoadDFMValues;\r\n xdsTicketKundennummerStdMontageU50.BeforeLoadDFMValues;\r\n xdsTicketKundennummerStdMontageU70.BeforeLoadDFMValues;\r\n xdsTicketKundennummerStdMontageU100.BeforeLoadDFMValues;\r\n xdsTicketKundennummerStdMontageU150.BeforeLoadDFMValues;\r\n xdsTicketKundennummerStundensatzWerkstatt.BeforeLoadDFMValues;\r\n xdsTicketKundennummerStdWerkstattU25.BeforeLoadDFMValues;\r\n xdsTicketKundennummerStdWerkstattU50.BeforeLoadDFMValues;\r\n xdsTicketKundennummerStdWerkstattU70.BeforeLoadDFMValues;\r\n xdsTicketKundennummerStdWerkstattU100.BeforeLoadDFMValues;\r\n xdsTicketKundennummerStdWerkstattU150.BeforeLoadDFMValues;\r\n xdsTicketKundennummerArchivReferenz.BeforeLoadDFMValues;\r\n xdsTicketKundennummerErloesKontoUST1.BeforeLoadDFMValues;\r\n xdsTicketKundennummerErloesKontoUST2.BeforeLoadDFMValues;\r\n xdsTicketKundennummerErloesKontoUST3.BeforeLoadDFMValues;\r\n xdsTicketKundennummerGebKal.BeforeLoadDFMValues;\r\n xdsTicketKundennummerEmailversand.BeforeLoadDFMValues;\r\n xdsTicketKundennummerMahnspesen.BeforeLoadDFMValues;\r\n xdsTicketKundennummerRechnungSchluss.BeforeLoadDFMValues;\r\n xdsTicketKundennummerBenutzerNeu.BeforeLoadDFMValues;\r\n xdsTicketKundennummerBenutzerGeaendert.BeforeLoadDFMValues;\r\n xdsTicketKundennummerBelegsprache.BeforeLoadDFMValues;\r\n xdsTicketKundennummerkmSatz.BeforeLoadDFMValues;\r\n xdsTicketKundennummerKundenklassetext.BeforeLoadDFMValues;\r\n xdsTicketKundennummerKundenklasseFarbe.BeforeLoadDFMValues;\r\n xdsTicketKundennummerAbweichenderRechnungsEmpfaenger.BeforeLoadDFMValues;\r\n xdsTicketKundennummerProtokoll.BeforeLoadDFMValues;\r\n xdsTicketKundennummerILNTyp1.BeforeLoadDFMValues;\r\n xdsTicketKundennummerILNTyp2.BeforeLoadDFMValues;\r\n xdsTicketKundennummerKontaktGUID.BeforeLoadDFMValues;\r\n xdsTicketKundennummerPLZGUID.BeforeLoadDFMValues;\r\n xdsTicketKundennummerPreislistenVariantePakete.BeforeLoadDFMValues;\r\n xdsTicketKundennummerSchluesselRechnungslauf.BeforeLoadDFMValues;\r\n xdsTicketKundennummerRechnungEmail.BeforeLoadDFMValues;\r\n xdsTicketKundennummerZahlungsbedingungEK.BeforeLoadDFMValues;\r\n xdsTicketKundennummerTransportbedingungEK.BeforeLoadDFMValues;\r\n xdsTicketKundennummerRabattsatzEK.BeforeLoadDFMValues;\r\n xdsTicketKundennummerVertreterMatchcode.BeforeLoadDFMValues;\r\n xdsTicketKundennummerVertreterProvisionssatz.BeforeLoadDFMValues;\r\n xdsTicketKundennummerUmsatzVKJahr.BeforeLoadDFMValues;\r\n xdsTicketKundennummerUmsatzVKVorjahr.BeforeLoadDFMValues;\r\n xdsTicketKundennummerUmsatzEKJahr.BeforeLoadDFMValues;\r\n xdsTicketKundennummerUmsatzEKVorjahr.BeforeLoadDFMValues;\r\n xdsTicketKundennummerSteuernummer.BeforeLoadDFMValues;\r\n xdsTicketKundennummerLoginPW.BeforeLoadDFMValues;\r\n xdsTicketKundennummerREperFax.BeforeLoadDFMValues;\r\n xdsTicketKundennummerErreichbarkeit.BeforeLoadDFMValues;\r\n xdsTicketKundennummerErloesKontoUST4.BeforeLoadDFMValues;\r\n xdsTicketKundennummerErloesKontoUST5.BeforeLoadDFMValues;\r\n xdsTicketKundennummerErloesKontoUST6.BeforeLoadDFMValues;\r\n xdsTicketKundennummerBesteuerungKey.BeforeLoadDFMValues;\r\n xdsTicketKundennummerAuftraegeJahr.BeforeLoadDFMValues;\r\n xdsTicketKundennummerAuftraegeVorjahr.BeforeLoadDFMValues;\r\n xdsTicketKundennummerLieferadresseID.BeforeLoadDFMValues;\r\n xdsTicketKundennummerUSTIDgeprueft.BeforeLoadDFMValues;\r\n xdsTicketKundennummerKontaktverbund.BeforeLoadDFMValues;\r\n xdsTicketKundennummerHinweis.BeforeLoadDFMValues;\r\n xdsTicketKundennummerLatitude.BeforeLoadDFMValues;\r\n xdsTicketKundennummerLongitude.BeforeLoadDFMValues;\r\n xdsTicketKundennummerkmLuftlinie.BeforeLoadDFMValues;\r\n xdsTicketKundennummerGoogleID.BeforeLoadDFMValues;\r\n xdsTicketKundennummerGoogleUpdatedUTC.BeforeLoadDFMValues;\r\n xdsTicketKundennummerBundesland.BeforeLoadDFMValues;\r\n xdsTicketKundennummerRegion.BeforeLoadDFMValues;\r\n xdsTicketKundennummerMandatsreferenz.BeforeLoadDFMValues;\r\n xdsTicketKundennummerMandatsreferenzVom.BeforeLoadDFMValues;\r\n xdsTicketKundennummerLastschriftArt.BeforeLoadDFMValues;\r\n xdsTicketKundennummerMahnsperre.BeforeLoadDFMValues;\r\n xdsTicketKundennummerSuchbegriff.BeforeLoadDFMValues;\r\n xdsTicketKundennummerLieferanschriftDaten.BeforeLoadDFMValues;\r\n xdsTicketKundennummerExportKasse.BeforeLoadDFMValues;\r\n xdsTicketKundennummerLoeschvormerkungDatum.BeforeLoadDFMValues;\r\n xdsTicketKundennummerLoeschvormerkungGrund.BeforeLoadDFMValues;\r\n xdsTicketKundennummerPseudonymisiert.BeforeLoadDFMValues;\r\n xdsTicketKundennummerLoginAktiv.BeforeLoadDFMValues;\r\n xdsTicketKundennummerSonstigeDaten.BeforeLoadDFMValues;\r\n xdsTicketKundennummerB2C.BeforeLoadDFMValues;\r\n xdsTicketKundennummerTIN.BeforeLoadDFMValues;\r\n xdsTicketKundennummerMindestbestellwert.BeforeLoadDFMValues;\r\n xdsTicketKundennummerBruttoberechnung.BeforeLoadDFMValues;\r\n xdsTicketKundennummerDruckWHG.BeforeLoadDFMValues;\r\n xdsTicketKundennummerBerechtigungen.BeforeLoadDFMValues;\r\n xdsTicketKundennummerRechnungCC.BeforeLoadDFMValues;\r\n xdsTicketProdukt.BeforeLoadDFMValues;\r\n xdsTicketProduktProdukt.BeforeLoadDFMValues;\r\n xdsTicketKategorie.BeforeLoadDFMValues;\r\n xdsTicketKategorieKategorie.BeforeLoadDFMValues;\r\n xdsTicketPrioritaet.BeforeLoadDFMValues;\r\n xdsTicketPrioritaetPrioritaet.BeforeLoadDFMValues;\r\n xdsTicketPrioritaetPrioText.BeforeLoadDFMValues;\r\n xdsTicketPrioritaetPrioFarbe.BeforeLoadDFMValues;\r\n xdsTicketStatus.BeforeLoadDFMValues;\r\n xdsTicketID.BeforeLoadDFMValues;\r\n xdsTicketErstelltAm.BeforeLoadDFMValues;\r\n xdsTicketBetreff.BeforeLoadDFMValues;\r\n xdsTicketBeschreibung.BeforeLoadDFMValues;\r\n xdsTicketAbrechnungsbetrag.BeforeLoadDFMValues;\r\n xdsTicketAbrechnungRechnungsnummer.BeforeLoadDFMValues;\r\n xdsTicketAberechnetAm.BeforeLoadDFMValues;\r\n xdsTicketErledigtAm.BeforeLoadDFMValues;\r\n xdsTicketNachname.BeforeLoadDFMValues;\r\n xdsTicketVorname.BeforeLoadDFMValues;\r\n xdsTicketEmail.BeforeLoadDFMValues;\r\n xdsTicketSystemInfo.BeforeLoadDFMValues;\r\n xdsTicketLoesung.BeforeLoadDFMValues;\r\n xdsTicketProtokoll.BeforeLoadDFMValues;\r\n xdsTicketZeitaufwandMinuten.BeforeLoadDFMValues;\r\n xdsTicketAbzurechnendeMinuten.BeforeLoadDFMValues;\r\n xdsTicketAbgerechneteMinuten.BeforeLoadDFMValues;\r\n xdsTicketBenachrichtigungNEU.BeforeLoadDFMValues;\r\n xdsTicketBenachrichtigungLoesung.BeforeLoadDFMValues;\r\n xdsTicketInterneBemerkung.BeforeLoadDFMValues;\r\n xdsTicketLoesungInfoSenden.BeforeLoadDFMValues;\r\n xdsTicketKontaktperson.BeforeLoadDFMValues;\r\n xdsTicketErreichbarkeitTelefon.BeforeLoadDFMValues;\r\n xdsTicketErreichbarkeitWann.BeforeLoadDFMValues;\r\n xdsTicketStatusStatus.BeforeLoadDFMValues;\r\n xdsTicketKontaktpersonEmail.BeforeLoadDFMValues;\r\n xdsTStatus.BeforeLoadDFMValues;\r\n xdsTStatusStatus.BeforeLoadDFMValues;\r\n sourceTicket.BeforeLoadDFMValues;\r\n sourceTStatus.BeforeLoadDFMValues;\r\n xdsTicketKonversation.BeforeLoadDFMValues;\r\n xdsTicketKonversationTicketID.BeforeLoadDFMValues;\r\n xdsTicketKonversationID.BeforeLoadDFMValues;\r\n xdsTicketKonversationDatumUhrzeit.BeforeLoadDFMValues;\r\n xdsTicketKonversationAntwortText.BeforeLoadDFMValues;\r\n xdsTicketKonversationNachrichtSenden.BeforeLoadDFMValues;\r\n xdsTicketKonversationNachrichtGesendet.BeforeLoadDFMValues;\r\n xdsTicketKonversationVerfasser.BeforeLoadDFMValues;\r\n xdsTicketKonversationQuellProgramm.BeforeLoadDFMValues;\r\n sourceTicketKonversation.BeforeLoadDFMValues;\r\n xdsTicketDateien.BeforeLoadDFMValues;\r\n xdsTicketDateienTicketID.BeforeLoadDFMValues;\r\n xdsTicketDateienID.BeforeLoadDFMValues;\r\n xdsTicketDateienDatumUhrzeit.BeforeLoadDFMValues;\r\n xdsTicketDateienFuerLoesung.BeforeLoadDFMValues;\r\n xdsTicketDateienDateiMime.BeforeLoadDFMValues;\r\n xdsTicketDateienDateiName.BeforeLoadDFMValues;\r\n xdsTicketDateienDateiGroesse.BeforeLoadDFMValues;\r\n xdsTicketDateienDateiInhaltText.BeforeLoadDFMValues;\r\n xdskontosaldo.BeforeLoadDFMValues;\r\n xdskontosaldoKundennummer.BeforeLoadDFMValues;\r\n xdskontosaldoZeitaufwand.BeforeLoadDFMValues;\r\n xdskontosaldoAbzurechnen.BeforeLoadDFMValues;\r\n xdskontosaldoGutschrift.BeforeLoadDFMValues;\r\n xdskontosaldoAbzug.BeforeLoadDFMValues;\r\n xdskontosaldoSaldo.BeforeLoadDFMValues;\r\n xdskontosaldoBetrag.BeforeLoadDFMValues;\r\n xdskontosaldoMinutenpreis.BeforeLoadDFMValues;\r\n xdskontosaldoSRestguthaben.BeforeLoadDFMValues;\r\n try\r\n Name := 'EinzelTicket';\r\n Width := 246;\r\n Height := 643;\r\n CSSLibrary := cssBootstrap;\r\n ElementFont := efCSS;\r\n SetEvent(Self, 'OnClose', 'WebFormClose');\r\n SetEvent(Self, 'OnShow', 'WebFormShow');\r\n lblinfo.SetParentComponent(Self);\r\n lblinfo.Name := 'lblinfo';\r\n lblinfo.Left := 40;\r\n lblinfo.Top := 488;\r\n lblinfo.Width := 177;\r\n lblinfo.Height := 15;\r\n lblinfo.Caption := 'Antwort auch per Email zusenden';\r\n lblinfo.ElementClassName := 'text-small m-2';\r\n lblinfo.ElementFont := efCSS;\r\n lblinfo.ElementPosition := epIgnore;\r\n lblinfo.HeightStyle := ssAuto;\r\n lblinfo.HeightPercent := 100.000000000000000000;\r\n lblinfo.WidthStyle := ssAuto;\r\n lblinfo.WidthPercent := 100.000000000000000000;\r\n lblKonversation.SetParentComponent(Self);\r\n lblKonversation.Name := 'lblKonversation';\r\n lblKonversation.Left := 24;\r\n lblKonversation.Top := 528;\r\n lblKonversation.Width := 69;\r\n lblKonversation.Height := 15;\r\n lblKonversation.Caption := 'Konversation';\r\n lblKonversation.ElementClassName := 'h5 m-2';\r\n lblKonversation.ElementFont := efCSS;\r\n lblKonversation.ElementPosition := epIgnore;\r\n lblKonversation.HeightStyle := ssAuto;\r\n lblKonversation.HeightPercent := 100.000000000000000000;\r\n lblKonversation.WidthStyle := ssAuto;\r\n lblKonversation.WidthPercent := 100.000000000000000000;\r\n Container1.SetParentComponent(Self);\r\n Container1.Name := 'Container1';\r\n Container1.Left := 0;\r\n Container1.Top := 0;\r\n Container1.Width := 169;\r\n Container1.Height := 41;\r\n Container1.HeightStyle := ssAuto;\r\n Container1.WidthStyle := ssPercent;\r\n Container1.ChildOrder := 2;\r\n Container1.ElementFont := efCSS;\r\n Container1.ElementPosition := epIgnore;\r\n Container2.SetParentComponent(Self);\r\n Container2.Name := 'Container2';\r\n Container2.Left := 0;\r\n Container2.Top := 47;\r\n Container2.Width := 169;\r\n Container2.Height := 41;\r\n Container2.ElementClassName := 'd-flex flex-wrap m-1';\r\n Container2.HeightStyle := ssAuto;\r\n Container2.WidthStyle := ssAuto;\r\n Container2.ChildOrder := 5;\r\n Container2.ElementFont := efCSS;\r\n Container2.ElementPosition := epIgnore;\r\n Container3.SetParentComponent(Self);\r\n Container3.Name := 'Container3';\r\n Container3.Left := 0;\r\n Container3.Top := 94;\r\n Container3.Width := 169;\r\n Container3.Height := 41;\r\n Container3.ElementClassName := 'd-flex flex-wrap m-1';\r\n Container3.HeightStyle := ssAuto;\r\n Container3.WidthStyle := ssAuto;\r\n Container3.ChildOrder := 5;\r\n Container3.ElementFont := efCSS;\r\n Container3.ElementPosition := epIgnore;\r\n btnzurueck.SetParentComponent(Self);\r\n btnzurueck.Name := 'btnzurueck';\r\n btnzurueck.Left := 0;\r\n btnzurueck.Top := 156;\r\n btnzurueck.Width := 96;\r\n btnzurueck.Height := 25;\r\n btnzurueck.Caption := '<< zur'#252'ck';\r\n btnzurueck.ChildOrder := 4;\r\n btnzurueck.ElementClassName := 'btn btn-info btn-sm m-1 text-left';\r\n btnzurueck.ElementFont := efCSS;\r\n btnzurueck.ElementPosition := epIgnore;\r\n btnzurueck.HeightStyle := ssAuto;\r\n btnzurueck.HeightPercent := 100.000000000000000000;\r\n btnzurueck.WidthStyle := ssAuto;\r\n btnzurueck.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnzurueck, Self, 'OnClick', 'btnzurueckClick');\r\n TC.SetParentComponent(Self);\r\n TC.Name := 'TC';\r\n TC.Left := -1;\r\n TC.Top := 191;\r\n TC.Width := 247;\r\n TC.Height := 91;\r\n TC.ElementClassName := 'table table-bordered border-primary';\r\n TC.HeightStyle := ssAuto;\r\n TC.WidthStyle := ssPercent;\r\n TC.BorderColor := clSilver;\r\n TC.ChildOrder := 3;\r\n TC.ColHeader := False;\r\n TC.ElementFont := efCSS;\r\n TC.ElementHeaderClassName := 'thead-light';\r\n TC.ElementPosition := epIgnore;\r\n TC.ElementTableClassName := 'table table-striped table-bordered table-hover';\r\n TC.WordWrap := True;\r\n TC.ColCount := 1;\r\n btnSpeichern.SetParentComponent(Self);\r\n btnSpeichern.Name := 'btnSpeichern';\r\n btnSpeichern.Left := 8;\r\n btnSpeichern.Top := 210;\r\n btnSpeichern.Width := 96;\r\n btnSpeichern.Height := 25;\r\n btnSpeichern.Caption := 'speichern';\r\n btnSpeichern.ChildOrder := 6;\r\n btnSpeichern.ElementClassName := 'btn btn-info btn-sm m-1 text-left';\r\n btnSpeichern.ElementFont := efCSS;\r\n btnSpeichern.ElementPosition := epIgnore;\r\n btnSpeichern.HeightStyle := ssAuto;\r\n btnSpeichern.HeightPercent := 100.000000000000000000;\r\n btnSpeichern.WidthStyle := ssAuto;\r\n btnSpeichern.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnSpeichern, Self, 'OnClick', 'btnSpeichernClick');\r\n webDBCStatus.SetParentComponent(Self);\r\n webDBCStatus.Name := 'webDBCStatus';\r\n webDBCStatus.Left := 24;\r\n webDBCStatus.Top := 298;\r\n webDBCStatus.Width := 185;\r\n webDBCStatus.Height := 23;\r\n webDBCStatus.ChildOrder := 9;\r\n webDBCStatus.ElementClassName := 'form-control w-55 m-1';\r\n webDBCStatus.ElementFont := efCSS;\r\n webDBCStatus.ElementPosition := epIgnore;\r\n webDBCStatus.HeightStyle := ssAuto;\r\n webDBCStatus.HeightPercent := 100.000000000000000000;\r\n webDBCStatus.Text := 'webDBCStatus';\r\n webDBCStatus.WidthStyle := ssPercent;\r\n webDBCStatus.WidthPercent := 55.000000000000000000;\r\n webDBCStatus.ItemIndex := -1;\r\n webDBCStatus.DataField := 'Status';\r\n webDBCStatus.DataSource := sourceTicket;\r\n webDBCStatus.ListField := 'Status';\r\n webDBCStatus.ListSource := sourceTStatus;\r\n btnAntwortNeu.SetParentComponent(Self);\r\n btnAntwortNeu.Name := 'btnAntwortNeu';\r\n btnAntwortNeu.Left := 8;\r\n btnAntwortNeu.Top := 418;\r\n btnAntwortNeu.Width := 96;\r\n btnAntwortNeu.Height := 25;\r\n btnAntwortNeu.Caption := 'neue Antwort';\r\n btnAntwortNeu.ChildOrder := 6;\r\n btnAntwortNeu.ElementClassName := 'btn btn-info btn-sm m-1 text-left';\r\n btnAntwortNeu.ElementFont := efCSS;\r\n btnAntwortNeu.ElementPosition := epIgnore;\r\n btnAntwortNeu.HeightStyle := ssAuto;\r\n btnAntwortNeu.HeightPercent := 100.000000000000000000;\r\n btnAntwortNeu.WidthStyle := ssAuto;\r\n btnAntwortNeu.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnAntwortNeu, Self, 'OnClick', 'btnAntwortNeuClick');\r\n edtNotiz.SetParentComponent(Self);\r\n edtNotiz.Name := 'edtNotiz';\r\n edtNotiz.Left := 8;\r\n edtNotiz.Top := 327;\r\n edtNotiz.Width := 352;\r\n edtNotiz.Height := 91;\r\n edtNotiz.ChildOrder := 29;\r\n edtNotiz.ElementClassName := 'form-control form-control-sm m-1';\r\n edtNotiz.ElementFont := efCSS;\r\n edtNotiz.ElementPosition := epIgnore;\r\n edtNotiz.HeightPercent := 100.000000000000000000;\r\n edtNotiz.Lines.BeginUpdate;\r\n try\r\n edtNotiz.Lines.Clear;\r\n edtNotiz.Lines.Add('WebMemo1');\r\n finally\r\n edtNotiz.Lines.EndUpdate;\r\n end;\r\n edtNotiz.SelLength := 0;\r\n edtNotiz.SelStart := 0;\r\n edtNotiz.TabOrder := 5;\r\n edtNotiz.WidthStyle := ssPercent;\r\n edtNotiz.WidthPercent := 80.000000000000000000;\r\n btnAntwortSpeichern.SetParentComponent(Self);\r\n btnAntwortSpeichern.Name := 'btnAntwortSpeichern';\r\n btnAntwortSpeichern.Left := 8;\r\n btnAntwortSpeichern.Top := 449;\r\n btnAntwortSpeichern.Width := 96;\r\n btnAntwortSpeichern.Height := 25;\r\n btnAntwortSpeichern.Caption := 'Antwort speichern';\r\n btnAntwortSpeichern.ChildOrder := 6;\r\n btnAntwortSpeichern.ElementClassName := 'btn btn-info btn-sm m-1 text-left';\r\n btnAntwortSpeichern.ElementFont := efCSS;\r\n btnAntwortSpeichern.ElementPosition := epIgnore;\r\n btnAntwortSpeichern.HeightStyle := ssAuto;\r\n btnAntwortSpeichern.HeightPercent := 100.000000000000000000;\r\n btnAntwortSpeichern.WidthStyle := ssAuto;\r\n btnAntwortSpeichern.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnAntwortSpeichern, Self, 'OnClick', 'btnAntwortSpeichernClick');\r\n checkBenachrichtigung.SetParentComponent(Self);\r\n checkBenachrichtigung.Name := 'checkBenachrichtigung';\r\n checkBenachrichtigung.Left := 24;\r\n checkBenachrichtigung.Top := 141;\r\n checkBenachrichtigung.Width := 50;\r\n checkBenachrichtigung.Height := 22;\r\n checkBenachrichtigung.Checked := True;\r\n checkBenachrichtigung.ChildOrder := 10;\r\n checkBenachrichtigung.ElementClassName := 'custom-control custom-checkbox m-1';\r\n checkBenachrichtigung.ElementButtonClassName := 'custom-control-input';\r\n checkBenachrichtigung.ElementLabelClassName := 'custom-control-label';\r\n checkBenachrichtigung.ElementFont := efCSS;\r\n checkBenachrichtigung.ElementPosition := epIgnore;\r\n checkBenachrichtigung.HeightStyle := ssAuto;\r\n checkBenachrichtigung.HeightPercent := 100.000000000000000000;\r\n checkBenachrichtigung.State := cbChecked;\r\n checkBenachrichtigung.WidthPercent := 100.000000000000000000;\r\n xdsTicket.SetParentComponent(Self);\r\n xdsTicket.Name := 'xdsTicket';\r\n xdsTicket.AfterApplyUpdates := xdsTicketAfterApplyUpdates;\r\n xdsTicket.AfterOpen := xdsTicketAfterOpen;\r\n xdsTicket.BeforePost := xdsTicketBeforePost;\r\n xdsTicket.AfterPost := xdsTicketAfterPost;\r\n xdsTicket.EntitySetName := 'ITS_TicketMain';\r\n xdsTicket.Connection := DM2.XDataWebConnection1;\r\n xdsTicket.SubpropsDepth := 1;\r\n xdsTicket.QueryString := '$expand=Kundennummer,Status';\r\n xdsTicket.QueryTop := 1;\r\n xdsTicket.Left := 45;\r\n xdsTicket.Top := 229;\r\n xdsTicketKundennummer.SetParentComponent(xdsTicket);\r\n xdsTicketKundennummer.Name := 'xdsTicketKundennummer';\r\n xdsTicketKundennummer.FieldName := 'Kundennummer';\r\n xdsTicketKundennummerZahlungsbedingung.SetParentComponent(xdsTicket);\r\n xdsTicketKundennummerZahlungsbedingung.Name := 'xdsTicketKundennummerZahlungsbedingung';\r\n xdsTicketKundennummerZahlungsbedingung.FieldName := 'Kundennummer.Zahlungsbedingung';\r\n xdsTicketKundennummerKundennummer.SetParentComponent(xdsTicket);\r\n xdsTicketKundennummerKundennummer.Name := 'xdsTicketKundennummerKundennummer';\r\n xdsTicketKundennummerKundennummer.FieldName := 'Kundennummer.Kundennummer';\r\n xdsTicketKundennummerKundennummer.Size := 13;\r\n xdsTicketKundennummerGruppeKunden.SetParentComponent(xdsTicket);\r\n xdsTicketKundennummerGruppeKunden.Name := 'xdsTicketKundennummerGruppeKunden';\r\n xdsTicketKundennummerGruppeKunden.FieldName := 'Kundennummer.GruppeKunden';\r\n xdsTicketKundennummerGruppeLieferanten.SetParentComponent(xdsTicket);\r\n xdsTicketKundennummerGruppeLieferanten.Name := 'xdsTicketKundennummerGruppeLieferanten';\r\n xdsTicketKundennummerGruppeLieferanten.FieldName := 'Kundennummer.GruppeLieferanten';\r\n xdsTicketKundennummerGruppeSonstige.SetParentComponent(xdsTicket);\r\n xdsTicketKundennummerGruppeSonstige.Name := 'xdsTicketKundennummerGruppeSonstige';\r\n xdsTicketKundennummerGruppeSonstige.FieldName := 'Kundennummer.GruppeSonstige';\r\n xdsTicketKundennummerGruppeNichtkunden.SetParentComponent(xdsTicket);\r\n xdsTicketKundennummerGruppeNichtkunden.Name := 'xdsTicketKundennummerGruppeNichtkunden';\r\n xdsTicketKundennummerGruppeNichtkunden.FieldName := 'Kundennummer.GruppeNichtkunden';\r\n xdsTicketKundennummerKontaktgruppe.SetParentComponent(xdsTicket);\r\n xdsTicketKundennummerKontaktgruppe.Name := 'xdsTicketKundennummerKontaktgruppe';\r\n xdsTicketKundennummerKontaktgruppe.FieldName := 'Kundennummer.Kontaktgruppe';\r\n xdsTicketKundennummerKontaktgruppe.Size := 50;\r\n xdsTicketKundennummerNachname.SetParentComponent(xdsTicket);\r\n xdsTicketKundennummerNachname.Name := 'xdsTicketKundennummerNachname';\r\n xdsTicketKundennummerNachname.FieldName := 'Kundennummer.Nachname';\r\n xdsTicketKundennummerNachname.Size := 40;\r\n xdsTicketKundennummerVorname.SetParentComponent(xdsTicket);\r\n xdsTicketKundennummerVorname.Name := 'xdsTicketKundennummerVorname';\r\n xdsTicketKundennummerVorname.FieldName := 'Kundennummer.Vorname';\r\n xdsTicketKundennummerVorname.Size := 40;\r\n xdsTicketKundennummerAdresszeile2.SetParentComponent(xdsTicket);\r\n xdsTicketKundennummerAdresszeile2.Name := 'xdsTicketKundennummerAdresszeile2';\r\n xdsTicketKundennummerAdresszeile2.FieldName := 'Kundennummer.Adresszeile2';\r\n xdsTicketKundennummerAdresszeile2.Size := 40;\r\n xdsTicketKundennummerAdresszeile3.SetParentComponent(xdsTicket);\r\n xdsTicketKundennummerAdresszeile3.Name := 'xdsTicketKundennummerAdresszeile3';\r\n xdsTicketKundennummerAdresszeile3.FieldName := 'Kundennummer.Adresszeile3';\r\n xdsTicketKundennummerAdresszeile3.Size := 40;\r\n xdsTicketKundennummerStrasse.SetParentComponent(xdsTicket);\r\n xdsTicketKundennummerStrasse.Name := 'xdsTicketKundennummerStrasse';\r\n xdsTicketKundennummerStrasse.FieldName := 'Kundennummer.Strasse';\r\n xdsTicketKundennummerStrasse.Size := 40;\r\n xdsTicketKundennummerPostleitzahl.SetParentComponent(xdsTicket);\r\n xdsTicketKundennummerPostleitzahl.Name := 'xdsTicketKundennummerPostleitzahl';\r\n xdsTicketKundennummerPostleitzahl.FieldName := 'Kundennummer.Postleitzahl';\r\n xdsTicketKundennummerPostleitzahl.Size := 10;\r\n xdsTicketKundennummerOrt.SetParentComponent(xdsTicket);\r\n xdsTicketKundennummerOrt.Name := 'xdsTicketKundennummerOrt';\r\n xdsTicketKundennummerOrt.FieldName := 'Kundennummer.Ort';\r\n xdsTicketKundennummerOrt.Size := 40;\r\n xdsTicketKundennummerLaenderkuerzel.SetParentComponent(xdsTicket);\r\n xdsTicketKundennummerLaenderkuerzel.Name := 'xdsTicketKundennummerLaenderkuerzel';\r\n xdsTicketKundennummerLaenderkuerzel.FieldName := 'Kundennummer.Laenderkuerzel';\r\n xdsTicketKundennummerLaenderkuerzel.Size := 5;\r\n xdsTicketKundennummerLand.SetParentComponent(xdsTicket);\r\n xdsTicketKundennummerLand.Name := 'xdsTicketKundennummerLand';\r\n xdsTicketKundennummerLand.FieldName := 'Kundennummer.Land';\r\n xdsTicketKundennummerLand.Size := 40;\r\n xdsTicketKundennummerLaenderkennzeichen.SetParentComponent(xdsTicket);\r\n xdsTicketKundennummerLaenderkennzeichen.Name := 'xdsTicketKundennummerLaenderkennzeichen';\r\n xdsTicketKundennummerLaenderkennzeichen.FieldName := 'Kundennummer.Laenderkennzeichen';\r\n xdsTicketKundennummerAdressanrede.SetParentComponent(xdsTicket);\r\n xdsTicketKundennummerAdressanrede.Name := 'xdsTicketKundennummerAdressanrede';\r\n xdsTicketKundennummerAdressanrede.FieldName := 'Kundennummer.Adressanrede';\r\n xdsTicketKundennummerAdressanrede.Size := 15;\r\n xdsTicketKundennummerBriefanrede1.SetParentComponent(xdsTicket);\r\n xdsTicketKundennummerBriefanrede1.Name := 'xdsTicketKundennummerBriefanrede1';\r\n xdsTicketKundennummerBriefanrede1.FieldName := 'Kundennummer.Briefanrede1';\r\n xdsTicketKundennummerBriefanrede1.Size := 255;\r\n xdsTicketKundennummerBriefanrede2.SetParentComponent(xdsTicket);\r\n xdsTicketKundennummerBriefanrede2.Name := 'xdsTicketKundennummerBriefanrede2';\r\n xdsTicketKundennummerBriefanrede2.FieldName := 'Kundennummer.Briefanrede2';\r\n xdsTicketKundennummerBriefanrede2.Size := 40;\r\n xdsTicketKundennummerAdresseBild.SetParentComponent(xdsTicket);\r\n xdsTicketKundennummerAdresseBild.Name := 'xdsTicketKundennummerAdresseBild';\r\n xdsTicketKundennummerAdresseBild.FieldName := 'Kundennummer.AdresseBild';\r\n xdsTicketKundennummerAdresseBild.Size := 255;\r\n xdsTicketKundennummerLieferanschrift.SetParentComponent(xdsTicket);\r\n xdsTicketKundennummerLieferanschrift.Name := 'xdsTicketKundennummerLieferanschrift';\r\n xdsTicketKundennummerLieferanschrift.FieldName := 'Kundennummer.Lieferanschrift';\r\n xdsTicketKundennummerLieferanschrift.Size := 255;\r\n xdsTicketKundennummerGeburtsdatum.SetParentComponent(xdsTicket);\r\n xdsTicketKundennummerGeburtsdatum.Name := 'xdsTicketKundennummerGeburtsdatum';\r\n xdsTicketKundennummerGeburtsdatum.FieldName := 'Kundennummer.Geburtsdatum';\r\n xdsTicketKundennummerTelefonNummer.SetParentComponent(xdsTicket);\r\n xdsTicketKundennummerTelefonNummer.Name := 'xdsTicketKundennummerTelefonNummer';\r\n xdsTicketKundennummerTelefonNummer.FieldName := 'Kundennummer.TelefonNummer';\r\n xdsTicketKundennummerTelefonNummer.Size := 25;\r\n xdsTicketKundennummerTelefaxNummer.SetParentComponent(xdsTicket);\r\n xdsTicketKundennummerTelefaxNummer.Name := 'xdsTicketKundennummerTelefaxNummer';\r\n xdsTicketKundennummerTelefaxNummer.FieldName := 'Kundennummer.TelefaxNummer';\r\n xdsTicketKundennummerTelefaxNummer.Size := 25;\r\n xdsTicketKundennummerMobilTelefon.SetParentComponent(xdsTicket);\r\n xdsTicketKundennummerMobilTelefon.Name := 'xdsTicketKundennummerMobilTelefon';\r\n xdsTicketKundennummerMobilTelefon.FieldName := 'Kundennummer.MobilTelefon';\r\n xdsTicketKundennummerMobilTelefon.Size := 25;\r\n xdsTicketKundennummerEMail.SetParentComponent(xdsTicket);\r\n xdsTicketKundennummerEMail.Name := 'xdsTicketKundennummerEMail';\r\n xdsTicketKundennummerEMail.FieldName := 'Kundennummer.EMail';\r\n xdsTicketKundennummerEMail.Size := 50;\r\n xdsTicketKundennummerInternet.SetParentComponent(xdsTicket);\r\n xdsTicketKundennummerInternet.Name := 'xdsTicketKundennummerInternet';\r\n xdsTicketKundennummerInternet.FieldName := 'Kundennummer.Internet';\r\n xdsTicketKundennummerInternet.Size := 50;\r\n xdsTicketKundennummerUmsatzsteuerID.SetParentComponent(xdsTicket);\r\n xdsTicketKundennummerUmsatzsteuerID.Name := 'xdsTicketKundennummerUmsatzsteuerID';\r\n xdsTicketKundennummerUmsatzsteuerID.FieldName := 'Kundennummer.UmsatzsteuerID';\r\n xdsTicketKundennummerUmsatzsteuerausweis.SetParentComponent(xdsTicket);\r\n xdsTicketKundennummerUmsatzsteuerausweis.Name := 'xdsTicketKundennummerUmsatzsteuerausweis';\r\n xdsTicketKundennummerUmsatzsteuerausweis.FieldName := 'Kundennummer.Umsatzsteuerausweis';\r\n xdsTicketKundennummerBemerkungen.SetParentComponent(xdsTicket);\r\n xdsTicketKundennummerBemerkungen.Name := 'xdsTicketKundennummerBemerkungen';\r\n xdsTicketKundennummerBemerkungen.FieldName := 'Kundennummer.Bemerkungen';\r\n xdsTicketKundennummerBemerkungen.Size := 255;\r\n xdsTicketKundennummerBranche.SetParentComponent(xdsTicket);\r\n xdsTicketKundennummerBranche.Name := 'xdsTicketKundennummerBranche';\r\n xdsTicketKundennummerBranche.FieldName := 'Kundennummer.Branche';\r\n xdsTicketKundennummerBranche.Size := 50;\r\n xdsTicketKundennummerSelektiert1.SetParentComponent(xdsTicket);\r\n xdsTicketKundennummerSelektiert1.Name := 'xdsTicketKundennummerSelektiert1';\r\n xdsTicketKundennummerSelektiert1.FieldName := 'Kundennummer.Selektiert1';\r\n xdsTicketKundennummerSelektiert2.SetParentComponent(xdsTicket);\r\n xdsTicketKundennummerSelektiert2.Name := 'xdsTicketKundennummerSelektiert2';\r\n xdsTicketKundennummerSelektiert2.FieldName := 'Kundennummer.Selektiert2';\r\n xdsTicketKundennummerSelektiert3.SetParentComponent(xdsTicket);\r\n xdsTicketKundennummerSelektiert3.Name := 'xdsTicketKundennummerSelektiert3';\r\n xdsTicketKundennummerSelektiert3.FieldName := 'Kundennummer.Selektiert3';\r\n xdsTicketKundennummerTransportbedingung.SetParentComponent(xdsTicket);\r\n xdsTicketKundennummerTransportbedingung.Name := 'xdsTicketKundennummerTransportbedingung';\r\n xdsTicketKundennummerTransportbedingung.FieldName := 'Kundennummer.Transportbedingung';\r\n xdsTicketKundennummerTransportbedingung.Size := 100;\r\n xdsTicketKundennummerKilometer.SetParentComponent(xdsTicket);\r\n xdsTicketKundennummerKilometer.Name := 'xdsTicketKundennummerKilometer';\r\n xdsTicketKundennummerKilometer.FieldName := 'Kundennummer.Kilometer';\r\n xdsTicketKundennummerRabattsatz.SetParentComponent(xdsTicket);\r\n xdsTicketKundennummerRabattsatz.Name := 'xdsTicketKundennummerRabattsatz';\r\n xdsTicketKundennummerRabattsatz.FieldName := 'Kundennummer.Rabattsatz';\r\n xdsTicketKundennummerStundensatz.SetParentComponent(xdsTicket);\r\n xdsTicketKundennummerStundensatz.Name := 'xdsTicketKundennummerStundensatz';\r\n xdsTicketKundennummerStundensatz.FieldName := 'Kundennummer.Stundensatz';\r\n xdsTicketKundennummerKontonummer.SetParentComponent(xdsTicket);\r\n xdsTicketKundennummerKontonummer.Name := 'xdsTicketKundennummerKontonummer';\r\n xdsTicketKundennummerKontonummer.FieldName := 'Kundennummer.Kontonummer';\r\n xdsTicketKundennummerKontonummer.Size := 50;\r\n xdsTicketKundennummerBank.SetParentComponent(xdsTicket);\r\n xdsTicketKundennummerBank.Name := 'xdsTicketKundennummerBank';\r\n xdsTicketKundennummerBank.FieldName := 'Kundennummer.Bank';\r\n xdsTicketKundennummerBank.Size := 50;\r\n xdsTicketKundennummerBankleitzahl.SetParentComponent(xdsTicket);\r\n xdsTicketKundennummerBankleitzahl.Name := 'xdsTicketKundennummerBankleitzahl';\r\n xdsTicketKundennummerBankleitzahl.FieldName := 'Kundennummer.Bankleitzahl';\r\n xdsTicketKundennummerKontoinhaber.SetParentComponent(xdsTicket);\r\n xdsTicketKundennummerKontoinhaber.Name := 'xdsTicketKundennummerKontoinhaber';\r\n xdsTicketKundennummerKontoinhaber.FieldName := 'Kundennummer.Kontoinhaber';\r\n xdsTicketKundennummerKontoinhaber.Size := 50;\r\n xdsTicketKundennummerBetreuer.SetParentComponent(xdsTicket);\r\n xdsTicketKundennummerBetreuer.Name := 'xdsTicketKundennummerBetreuer';\r\n xdsTicketKundennummerBetreuer.FieldName := 'Kundennummer.Betreuer';\r\n xdsTicketKundennummerBetreuer.Size := 50;\r\n xdsTicketKundennummerQuelle.SetParentComponent(xdsTicket);\r\n xdsTicketKundennummerQuelle.Name := 'xdsTicketKundennummerQuelle';\r\n xdsTicketKundennummerQuelle.FieldName := 'Kundennummer.Quelle';\r\n xdsTicketKundennummerQuelle.Size := 100;\r\n xdsTicketKundennummerSuchmerkmal.SetParentComponent(xdsTicket);\r\n xdsTicketKundennummerSuchmerkmal.Name := 'xdsTicketKundennummerSuchmerkmal';\r\n xdsTicketKundennummerSuchmerkmal.FieldName := 'Kundennummer.Suchmerkmal';\r\n xdsTicketKundennummerSuchmerkmal.Size := 250;\r\n xdsTicketKundennummerWarenkreditlimit.SetParentComponent(xdsTicket);\r\n xdsTicketKundennummerWarenkreditlimit.Name := 'xdsTicketKundennummerWarenkreditlimit';\r\n xdsTicketKundennummerWarenkreditlimit.FieldName := 'Kundennummer.Warenkreditlimit';\r\n xdsTicketKundennummerWarenkreditgesperrt.SetParentComponent(xdsTicket);\r\n xdsTicketKundennummerWarenkreditgesperrt.Name := 'xdsTicketKundennummerWarenkreditgesperrt';\r\n xdsTicketKundennummerWarenkreditgesperrt.FieldName := 'Kundennummer.Warenkreditgesperrt';\r\n xdsTicketKundennummerKundennummerFremd.SetParentComponent(xdsTicket);\r\n xdsTicketKundennummerKundennummerFremd.Name := 'xdsTicketKundennummerKundennummerFremd';\r\n xdsTicketKundennummerKundennummerFremd.FieldName := 'Kundennummer.KundennummerFremd';\r\n xdsTicketKundennummerKeinNewsletter.SetParentComponent(xdsTicket);\r\n xdsTicketKundennummerKeinNewsletter.Name := 'xdsTicketKundennummerKeinNewsletter';\r\n xdsTicketKundennummerKeinNewsletter.FieldName := 'Kundennummer.KeinNewsletter';\r\n xdsTicketKundennummerDebitorennummer.SetParentComponent(xdsTicket);\r\n xdsTicketKundennummerDebitorennummer.Name := 'xdsTicketKundennummerDebitorennummer';\r\n xdsTicketKundennummerDebitorennummer.FieldName := 'Kundennummer.Debitorennummer';\r\n xdsTicketKundennummerDebitorennummer.Size := 13;\r\n xdsTicketKundennummerKreditorennummer.SetParentComponent(xdsTicket);\r\n xdsTicketKundennummerKreditorennummer.Name := 'xdsTicketKundennummerKreditorennummer';\r\n xdsTicketKundennummerKreditorennummer.FieldName := 'Kundennummer.Kreditorennummer';\r\n xdsTicketKundennummerKreditorennummer.Size := 13;\r\n xdsTicketKundennummerRabattstufe.SetParentComponent(xdsTicket);\r\n xdsTicketKundennummerRabattstufe.Name := 'xdsTicketKundennummerRabattstufe';\r\n xdsTicketKundennummerRabattstufe.FieldName := 'Kundennummer.Rabattstufe';\r\n xdsTicketKundennummerRabattstufe.Size := 15;\r\n xdsTicketKundennummerTelefonAlternativ.SetParentComponent(xdsTicket);\r\n xdsTicketKundennummerTelefonAlternativ.Name := 'xdsTicketKundennummerTelefonAlternativ';\r\n xdsTicketKundennummerTelefonAlternativ.FieldName := 'Kundennummer.TelefonAlternativ';\r\n xdsTicketKundennummerTelefonAlternativ.Size := 50;\r\n xdsTicketKundennummerKostentraeger.SetParentComponent(xdsTicket);\r\n xdsTicketKundennummerKostentraeger.Name := 'xdsTicketKundennummerKostentraeger';\r\n xdsTicketKundennummerKostentraeger.FieldName := 'Kundennummer.Kostentraeger';\r\n xdsTicketKundennummerKostentraeger.Size := 13;\r\n xdsTicketKundennummerIBAN.SetParentComponent(xdsTicket);\r\n xdsTicketKundennummerIBAN.Name := 'xdsTicketKundennummerIBAN';\r\n xdsTicketKundennummerIBAN.FieldName := 'Kundennummer.IBAN';\r\n xdsTicketKundennummerIBAN.Size := 50;\r\n xdsTicketKundennummerBIC.SetParentComponent(xdsTicket);\r\n xdsTicketKundennummerBIC.Name := 'xdsTicketKundennummerBIC';\r\n xdsTicketKundennummerBIC.FieldName := 'Kundennummer.BIC';\r\n xdsTicketKundennummerEmailkonto.SetParentComponent(xdsTicket);\r\n xdsTicketKundennummerEmailkonto.Name := 'xdsTicketKundennummerEmailkonto';\r\n xdsTicketKundennummerEmailkonto.FieldName := 'Kundennummer.Emailkonto';\r\n xdsTicketKundennummerEmailkonto.Size := 50;\r\n xdsTicketKundennummerBenutzername.SetParentComponent(xdsTicket);\r\n xdsTicketKundennummerBenutzername.Name := 'xdsTicketKundennummerBenutzername';\r\n xdsTicketKundennummerBenutzername.FieldName := 'Kundennummer.Benutzername';\r\n xdsTicketKundennummerBenutzername.Size := 50;\r\n xdsTicketKundennummerPasswort.SetParentComponent(xdsTicket);\r\n xdsTicketKundennummerPasswort.Name := 'xdsTicketKundennummerPasswort';\r\n xdsTicketKundennummerPasswort.FieldName := 'Kundennummer.Passwort';\r\n xdsTicketKundennummerPasswort.Size := 25;\r\n xdsTicketKundennummerExportOutlook.SetParentComponent(xdsTicket);\r\n xdsTicketKundennummerExportOutlook.Name := 'xdsTicketKundennummerExportOutlook';\r\n xdsTicketKundennummerExportOutlook.FieldName := 'Kundennummer.ExportOutlook';\r\n xdsTicketKundennummerNichtInListeAnzeigen.SetParentComponent(xdsTicket);\r\n xdsTicketKundennummerNichtInListeAnzeigen.Name := 'xdsTicketKundennummerNichtInListeAnzeigen';\r\n xdsTicketKundennummerNichtInListeAnzeigen.FieldName := 'Kundennummer.NichtInListeAnzeigen';\r\n xdsTicketKundennummerKreditkarteArt.SetParentComponent(xdsTicket);\r\n xdsTicketKundennummerKreditkarteArt.Name := 'xdsTicketKundennummerKreditkarteArt';\r\n xdsTicketKundennummerKreditkarteArt.FieldName := 'Kundennummer.KreditkarteArt';\r\n xdsTicketKundennummerKreditkarteArt.Size := 30;\r\n xdsTicketKundennummerKreditkarteInhaber.SetParentComponent(xdsTicket);\r\n xdsTicketKundennummerKreditkarteInhaber.Name := 'xdsTicketKundennummerKreditkarteInhaber';\r\n xdsTicketKundennummerKreditkarteInhaber.FieldName := 'Kundennummer.KreditkarteInhaber';\r\n xdsTicketKundennummerKreditkarteInhaber.Size := 50;\r\n xdsTicketKundennummerKreditkarteNummer.SetParentComponent(xdsTicket);\r\n xdsTicketKundennummerKreditkarteNummer.Name := 'xdsTicketKundennummerKreditkarteNummer';\r\n xdsTicketKundennummerKreditkarteNummer.FieldName := 'Kundennummer.KreditkarteNummer';\r\n xdsTicketKundennummerKreditkarteGueltigMonat.SetParentComponent(xdsTicket);\r\n xdsTicketKundennummerKreditkarteGueltigMonat.Name := 'xdsTicketKundennummerKreditkarteGueltigMonat';\r\n xdsTicketKundennummerKreditkarteGueltigMonat.FieldName := 'Kundennummer.KreditkarteGueltigMonat';\r\n xdsTicketKundennummerKreditkarteGueltigMonat.Size := 2;\r\n xdsTicketKundennummerKreditkarteGueltigJahr.SetParentComponent(xdsTicket);\r\n xdsTicketKundennummerKreditkarteGueltigJahr.Name := 'xdsTicketKundennummerKreditkarteGueltigJahr';\r\n xdsTicketKundennummerKreditkarteGueltigJahr.FieldName := 'Kundennummer.KreditkarteGueltigJahr';\r\n xdsTicketKundennummerKreditkartePruefziffer.SetParentComponent(xdsTicket);\r\n xdsTicketKundennummerKreditkartePruefziffer.Name := 'xdsTicketKundennummerKreditkartePruefziffer';\r\n xdsTicketKundennummerKreditkartePruefziffer.FieldName := 'Kundennummer.KreditkartePruefziffer';\r\n xdsTicketKundennummerKreditkartePruefziffer.Size := 10;\r\n xdsTicketKundennummerDatumNeu.SetParentComponent(xdsTicket);\r\n xdsTicketKundennummerDatumNeu.Name := 'xdsTicketKundennummerDatumNeu';\r\n xdsTicketKundennummerDatumNeu.FieldName := 'Kundennummer.DatumNeu';\r\n xdsTicketKundennummerDatumgeaendert.SetParentComponent(xdsTicket);\r\n xdsTicketKundennummerDatumgeaendert.Name := 'xdsTicketKundennummerDatumgeaendert';\r\n xdsTicketKundennummerDatumgeaendert.FieldName := 'Kundennummer.Datumgeaendert';\r\n xdsTicketKundennummerTitel.SetParentComponent(xdsTicket);\r\n xdsTicketKundennummerTitel.Name := 'xdsTicketKundennummerTitel';\r\n xdsTicketKundennummerTitel.FieldName := 'Kundennummer.Titel';\r\n xdsTicketKundennummerStundensatzMontage.SetParentComponent(xdsTicket);\r\n xdsTicketKundennummerStundensatzMontage.Name := 'xdsTicketKundennummerStundensatzMontage';\r\n xdsTicketKundennummerStundensatzMontage.FieldName := 'Kundennummer.StundensatzMontage';\r\n xdsTicketKundennummerStdMontageU25.SetParentComponent(xdsTicket);\r\n xdsTicketKundennummerStdMontageU25.Name := 'xdsTicketKundennummerStdMontageU25';\r\n xdsTicketKundennummerStdMontageU25.FieldName := 'Kundennummer.StdMontageU25';\r\n xdsTicketKundennummerStdMontageU50.SetParentComponent(xdsTicket);\r\n xdsTicketKundennummerStdMontageU50.Name := 'xdsTicketKundennummerStdMontageU50';\r\n xdsTicketKundennummerStdMontageU50.FieldName := 'Kundennummer.StdMontageU50';\r\n xdsTicketKundennummerStdMontageU70.SetParentComponent(xdsTicket);\r\n xdsTicketKundennummerStdMontageU70.Name := 'xdsTicketKundennummerStdMontageU70';\r\n xdsTicketKundennummerStdMontageU70.FieldName := 'Kundennummer.StdMontageU70';\r\n xdsTicketKundennummerStdMontageU100.SetParentComponent(xdsTicket);\r\n xdsTicketKundennummerStdMontageU100.Name := 'xdsTicketKundennummerStdMontageU100';\r\n xdsTicketKundennummerStdMontageU100.FieldName := 'Kundennummer.StdMontageU100';\r\n xdsTicketKundennummerStdMontageU150.SetParentComponent(xdsTicket);\r\n xdsTicketKundennummerStdMontageU150.Name := 'xdsTicketKundennummerStdMontageU150';\r\n xdsTicketKundennummerStdMontageU150.FieldName := 'Kundennummer.StdMontageU150';\r\n xdsTicketKundennummerStundensatzWerkstatt.SetParentComponent(xdsTicket);\r\n xdsTicketKundennummerStundensatzWerkstatt.Name := 'xdsTicketKundennummerStundensatzWerkstatt';\r\n xdsTicketKundennummerStundensatzWerkstatt.FieldName := 'Kundennummer.StundensatzWerkstatt';\r\n xdsTicketKundennummerStdWerkstattU25.SetParentComponent(xdsTicket);\r\n xdsTicketKundennummerStdWerkstattU25.Name := 'xdsTicketKundennummerStdWerkstattU25';\r\n xdsTicketKundennummerStdWerkstattU25.FieldName := 'Kundennummer.StdWerkstattU25';\r\n xdsTicketKundennummerStdWerkstattU50.SetParentComponent(xdsTicket);\r\n xdsTicketKundennummerStdWerkstattU50.Name := 'xdsTicketKundennummerStdWerkstattU50';\r\n xdsTicketKundennummerStdWerkstattU50.FieldName := 'Kundennummer.StdWerkstattU50';\r\n xdsTicketKundennummerStdWerkstattU70.SetParentComponent(xdsTicket);\r\n xdsTicketKundennummerStdWerkstattU70.Name := 'xdsTicketKundennummerStdWerkstattU70';\r\n xdsTicketKundennummerStdWerkstattU70.FieldName := 'Kundennummer.StdWerkstattU70';\r\n xdsTicketKundennummerStdWerkstattU100.SetParentComponent(xdsTicket);\r\n xdsTicketKundennummerStdWerkstattU100.Name := 'xdsTicketKundennummerStdWerkstattU100';\r\n xdsTicketKundennummerStdWerkstattU100.FieldName := 'Kundennummer.StdWerkstattU100';\r\n xdsTicketKundennummerStdWerkstattU150.SetParentComponent(xdsTicket);\r\n xdsTicketKundennummerStdWerkstattU150.Name := 'xdsTicketKundennummerStdWerkstattU150';\r\n xdsTicketKundennummerStdWerkstattU150.FieldName := 'Kundennummer.StdWerkstattU150';\r\n xdsTicketKundennummerArchivReferenz.SetParentComponent(xdsTicket);\r\n xdsTicketKundennummerArchivReferenz.Name := 'xdsTicketKundennummerArchivReferenz';\r\n xdsTicketKundennummerArchivReferenz.FieldName := 'Kundennummer.ArchivReferenz';\r\n xdsTicketKundennummerArchivReferenz.Size := 55;\r\n xdsTicketKundennummerErloesKontoUST1.SetParentComponent(xdsTicket);\r\n xdsTicketKundennummerErloesKontoUST1.Name := 'xdsTicketKundennummerErloesKontoUST1';\r\n xdsTicketKundennummerErloesKontoUST1.FieldName := 'Kundennummer.ErloesKontoUST1';\r\n xdsTicketKundennummerErloesKontoUST1.Size := 10;\r\n xdsTicketKundennummerErloesKontoUST2.SetParentComponent(xdsTicket);\r\n xdsTicketKundennummerErloesKontoUST2.Name := 'xdsTicketKundennummerErloesKontoUST2';\r\n xdsTicketKundennummerErloesKontoUST2.FieldName := 'Kundennummer.ErloesKontoUST2';\r\n xdsTicketKundennummerErloesKontoUST2.Size := 10;\r\n xdsTicketKundennummerErloesKontoUST3.SetParentComponent(xdsTicket);\r\n xdsTicketKundennummerErloesKontoUST3.Name := 'xdsTicketKundennummerErloesKontoUST3';\r\n xdsTicketKundennummerErloesKontoUST3.FieldName := 'Kundennummer.ErloesKontoUST3';\r\n xdsTicketKundennummerErloesKontoUST3.Size := 10;\r\n xdsTicketKundennummerGebKal.SetParentComponent(xdsTicket);\r\n xdsTicketKundennummerGebKal.Name := 'xdsTicketKundennummerGebKal';\r\n xdsTicketKundennummerGebKal.FieldName := 'Kundennummer.GebKal';\r\n xdsTicketKundennummerEmailversand.SetParentComponent(xdsTicket);\r\n xdsTicketKundennummerEmailversand.Name := 'xdsTicketKundennummerEmailversand';\r\n xdsTicketKundennummerEmailversand.FieldName := 'Kundennummer.Emailversand';\r\n xdsTicketKundennummerMahnspesen.SetParentComponent(xdsTicket);\r\n xdsTicketKundennummerMahnspesen.Name := 'xdsTicketKundennummerMahnspesen';\r\n xdsTicketKundennummerMahnspesen.FieldName := 'Kundennummer.Mahnspesen';\r\n xdsTicketKundennummerRechnungSchluss.SetParentComponent(xdsTicket);\r\n xdsTicketKundennummerRechnungSchluss.Name := 'xdsTicketKundennummerRechnungSchluss';\r\n xdsTicketKundennummerRechnungSchluss.FieldName := 'Kundennummer.RechnungSchluss';\r\n xdsTicketKundennummerRechnungSchluss.Size := 255;\r\n xdsTicketKundennummerBenutzerNeu.SetParentComponent(xdsTicket);\r\n xdsTicketKundennummerBenutzerNeu.Name := 'xdsTicketKundennummerBenutzerNeu';\r\n xdsTicketKundennummerBenutzerNeu.FieldName := 'Kundennummer.BenutzerNeu';\r\n xdsTicketKundennummerBenutzerNeu.Size := 50;\r\n xdsTicketKundennummerBenutzerGeaendert.SetParentComponent(xdsTicket);\r\n xdsTicketKundennummerBenutzerGeaendert.Name := 'xdsTicketKundennummerBenutzerGeaendert';\r\n xdsTicketKundennummerBenutzerGeaendert.FieldName := 'Kundennummer.BenutzerGeaendert';\r\n xdsTicketKundennummerBenutzerGeaendert.Size := 50;\r\n xdsTicketKundennummerBelegsprache.SetParentComponent(xdsTicket);\r\n xdsTicketKundennummerBelegsprache.Name := 'xdsTicketKundennummerBelegsprache';\r\n xdsTicketKundennummerBelegsprache.FieldName := 'Kundennummer.Belegsprache';\r\n xdsTicketKundennummerBelegsprache.Size := 10;\r\n xdsTicketKundennummerkmSatz.SetParentComponent(xdsTicket);\r\n xdsTicketKundennummerkmSatz.Name := 'xdsTicketKundennummerkmSatz';\r\n xdsTicketKundennummerkmSatz.FieldName := 'Kundennummer.kmSatz';\r\n xdsTicketKundennummerKundenklassetext.SetParentComponent(xdsTicket);\r\n xdsTicketKundennummerKundenklassetext.Name := 'xdsTicketKundennummerKundenklassetext';\r\n xdsTicketKundennummerKundenklassetext.FieldName := 'Kundennummer.Kundenklassetext';\r\n xdsTicketKundennummerKundenklassetext.Size := 50;\r\n xdsTicketKundennummerKundenklasseFarbe.SetParentComponent(xdsTicket);\r\n xdsTicketKundennummerKundenklasseFarbe.Name := 'xdsTicketKundennummerKundenklasseFarbe';\r\n xdsTicketKundennummerKundenklasseFarbe.FieldName := 'Kundennummer.KundenklasseFarbe';\r\n xdsTicketKundennummerAbweichenderRechnungsEmpfaenger.SetParentComponent(xdsTicket);\r\n xdsTicketKundennummerAbweichenderRechnungsEmpfaenger.Name := 'xdsTicketKundennummerAbweichenderRechnungsEmpfaenger';\r\n xdsTicketKundennummerAbweichenderRechnungsEmpfaenger.FieldName := 'Kundennummer.AbweichenderRechnungsEmpfaenger';\r\n xdsTicketKundennummerAbweichenderRechnungsEmpfaenger.Size := 13;\r\n xdsTicketKundennummerProtokoll.SetParentComponent(xdsTicket);\r\n xdsTicketKundennummerProtokoll.Name := 'xdsTicketKundennummerProtokoll';\r\n xdsTicketKundennummerProtokoll.FieldName := 'Kundennummer.Protokoll';\r\n xdsTicketKundennummerProtokoll.Size := 255;\r\n xdsTicketKundennummerILNTyp1.SetParentComponent(xdsTicket);\r\n xdsTicketKundennummerILNTyp1.Name := 'xdsTicketKundennummerILNTyp1';\r\n xdsTicketKundennummerILNTyp1.FieldName := 'Kundennummer.ILNTyp1';\r\n xdsTicketKundennummerILNTyp1.Size := 13;\r\n xdsTicketKundennummerILNTyp2.SetParentComponent(xdsTicket);\r\n xdsTicketKundennummerILNTyp2.Name := 'xdsTicketKundennummerILNTyp2';\r\n xdsTicketKundennummerILNTyp2.FieldName := 'Kundennummer.ILNTyp2';\r\n xdsTicketKundennummerILNTyp2.Size := 13;\r\n xdsTicketKundennummerKontaktGUID.SetParentComponent(xdsTicket);\r\n xdsTicketKundennummerKontaktGUID.Name := 'xdsTicketKundennummerKontaktGUID';\r\n xdsTicketKundennummerKontaktGUID.FieldName := 'Kundennummer.KontaktGUID';\r\n xdsTicketKundennummerKontaktGUID.Size := 38;\r\n xdsTicketKundennummerPLZGUID.SetParentComponent(xdsTicket);\r\n xdsTicketKundennummerPLZGUID.Name := 'xdsTicketKundennummerPLZGUID';\r\n xdsTicketKundennummerPLZGUID.FieldName := 'Kundennummer.PLZGUID';\r\n xdsTicketKundennummerPLZGUID.Size := 38;\r\n xdsTicketKundennummerPreislistenVariantePakete.SetParentComponent(xdsTicket);\r\n xdsTicketKundennummerPreislistenVariantePakete.Name := 'xdsTicketKundennummerPreislistenVariantePakete';\r\n xdsTicketKundennummerPreislistenVariantePakete.FieldName := 'Kundennummer.PreislistenVariantePakete';\r\n xdsTicketKundennummerPreislistenVariantePakete.Size := 50;\r\n xdsTicketKundennummerSchluesselRechnungslauf.SetParentComponent(xdsTicket);\r\n xdsTicketKundennummerSchluesselRechnungslauf.Name := 'xdsTicketKundennummerSchluesselRechnungslauf';\r\n xdsTicketKundennummerSchluesselRechnungslauf.FieldName := 'Kundennummer.SchluesselRechnungslauf';\r\n xdsTicketKundennummerSchluesselRechnungslauf.Size := 50;\r\n xdsTicketKundennummerRechnungEmail.SetParentComponent(xdsTicket);\r\n xdsTicketKundennummerRechnungEmail.Name := 'xdsTicketKundennummerRechnungEmail';\r\n xdsTicketKundennummerRechnungEmail.FieldName := 'Kundennummer.RechnungEmail';\r\n xdsTicketKundennummerRechnungEmail.Size := 50;\r\n xdsTicketKundennummerZahlungsbedingungEK.SetParentComponent(xdsTicket);\r\n xdsTicketKundennummerZahlungsbedingungEK.Name := 'xdsTicketKundennummerZahlungsbedingungEK';\r\n xdsTicketKundennummerZahlungsbedingungEK.FieldName := 'Kundennummer.ZahlungsbedingungEK';\r\n xdsTicketKundennummerTransportbedingungEK.SetParentComponent(xdsTicket);\r\n xdsTicketKundennummerTransportbedingungEK.Name := 'xdsTicketKundennummerTransportbedingungEK';\r\n xdsTicketKundennummerTransportbedingungEK.FieldName := 'Kundennummer.TransportbedingungEK';\r\n xdsTicketKundennummerTransportbedingungEK.Size := 100;\r\n xdsTicketKundennummerRabattsatzEK.SetParentComponent(xdsTicket);\r\n xdsTicketKundennummerRabattsatzEK.Name := 'xdsTicketKundennummerRabattsatzEK';\r\n xdsTicketKundennummerRabattsatzEK.FieldName := 'Kundennummer.RabattsatzEK';\r\n xdsTicketKundennummerVertreterMatchcode.SetParentComponent(xdsTicket);\r\n xdsTicketKundennummerVertreterMatchcode.Name := 'xdsTicketKundennummerVertreterMatchcode';\r\n xdsTicketKundennummerVertreterMatchcode.FieldName := 'Kundennummer.VertreterMatchcode';\r\n xdsTicketKundennummerVertreterMatchcode.Size := 50;\r\n xdsTicketKundennummerVertreterProvisionssatz.SetParentComponent(xdsTicket);\r\n xdsTicketKundennummerVertreterProvisionssatz.Name := 'xdsTicketKundennummerVertreterProvisionssatz';\r\n xdsTicketKundennummerVertreterProvisionssatz.FieldName := 'Kundennummer.VertreterProvisionssatz';\r\n xdsTicketKundennummerUmsatzVKJahr.SetParentComponent(xdsTicket);\r\n xdsTicketKundennummerUmsatzVKJahr.Name := 'xdsTicketKundennummerUmsatzVKJahr';\r\n xdsTicketKundennummerUmsatzVKJahr.FieldName := 'Kundennummer.UmsatzVKJahr';\r\n xdsTicketKundennummerUmsatzVKVorjahr.SetParentComponent(xdsTicket);\r\n xdsTicketKundennummerUmsatzVKVorjahr.Name := 'xdsTicketKundennummerUmsatzVKVorjahr';\r\n xdsTicketKundennummerUmsatzVKVorjahr.FieldName := 'Kundennummer.UmsatzVKVorjahr';\r\n xdsTicketKundennummerUmsatzEKJahr.SetParentComponent(xdsTicket);\r\n xdsTicketKundennummerUmsatzEKJahr.Name := 'xdsTicketKundennummerUmsatzEKJahr';\r\n xdsTicketKundennummerUmsatzEKJahr.FieldName := 'Kundennummer.UmsatzEKJahr';\r\n xdsTicketKundennummerUmsatzEKVorjahr.SetParentComponent(xdsTicket);\r\n xdsTicketKundennummerUmsatzEKVorjahr.Name := 'xdsTicketKundennummerUmsatzEKVorjahr';\r\n xdsTicketKundennummerUmsatzEKVorjahr.FieldName := 'Kundennummer.UmsatzEKVorjahr';\r\n xdsTicketKundennummerSteuernummer.SetParentComponent(xdsTicket);\r\n xdsTicketKundennummerSteuernummer.Name := 'xdsTicketKundennummerSteuernummer';\r\n xdsTicketKundennummerSteuernummer.FieldName := 'Kundennummer.Steuernummer';\r\n xdsTicketKundennummerSteuernummer.Size := 25;\r\n xdsTicketKundennummerLoginPW.SetParentComponent(xdsTicket);\r\n xdsTicketKundennummerLoginPW.Name := 'xdsTicketKundennummerLoginPW';\r\n xdsTicketKundennummerLoginPW.FieldName := 'Kundennummer.LoginPW';\r\n xdsTicketKundennummerREperFax.SetParentComponent(xdsTicket);\r\n xdsTicketKundennummerREperFax.Name := 'xdsTicketKundennummerREperFax';\r\n xdsTicketKundennummerREperFax.FieldName := 'Kundennummer.REperFax';\r\n xdsTicketKundennummerErreichbarkeit.SetParentComponent(xdsTicket);\r\n xdsTicketKundennummerErreichbarkeit.Name := 'xdsTicketKundennummerErreichbarkeit';\r\n xdsTicketKundennummerErreichbarkeit.FieldName := 'Kundennummer.Erreichbarkeit';\r\n xdsTicketKundennummerErreichbarkeit.Size := 250;\r\n xdsTicketKundennummerErloesKontoUST4.SetParentComponent(xdsTicket);\r\n xdsTicketKundennummerErloesKontoUST4.Name := 'xdsTicketKundennummerErloesKontoUST4';\r\n xdsTicketKundennummerErloesKontoUST4.FieldName := 'Kundennummer.ErloesKontoUST4';\r\n xdsTicketKundennummerErloesKontoUST4.Size := 10;\r\n xdsTicketKundennummerErloesKontoUST5.SetParentComponent(xdsTicket);\r\n xdsTicketKundennummerErloesKontoUST5.Name := 'xdsTicketKundennummerErloesKontoUST5';\r\n xdsTicketKundennummerErloesKontoUST5.FieldName := 'Kundennummer.ErloesKontoUST5';\r\n xdsTicketKundennummerErloesKontoUST5.Size := 10;\r\n xdsTicketKundennummerErloesKontoUST6.SetParentComponent(xdsTicket);\r\n xdsTicketKundennummerErloesKontoUST6.Name := 'xdsTicketKundennummerErloesKontoUST6';\r\n xdsTicketKundennummerErloesKontoUST6.FieldName := 'Kundennummer.ErloesKontoUST6';\r\n xdsTicketKundennummerErloesKontoUST6.Size := 10;\r\n xdsTicketKundennummerBesteuerungKey.SetParentComponent(xdsTicket);\r\n xdsTicketKundennummerBesteuerungKey.Name := 'xdsTicketKundennummerBesteuerungKey';\r\n xdsTicketKundennummerBesteuerungKey.FieldName := 'Kundennummer.BesteuerungKey';\r\n xdsTicketKundennummerAuftraegeJahr.SetParentComponent(xdsTicket);\r\n xdsTicketKundennummerAuftraegeJahr.Name := 'xdsTicketKundennummerAuftraegeJahr';\r\n xdsTicketKundennummerAuftraegeJahr.FieldName := 'Kundennummer.AuftraegeJahr';\r\n xdsTicketKundennummerAuftraegeVorjahr.SetParentComponent(xdsTicket);\r\n xdsTicketKundennummerAuftraegeVorjahr.Name := 'xdsTicketKundennummerAuftraegeVorjahr';\r\n xdsTicketKundennummerAuftraegeVorjahr.FieldName := 'Kundennummer.AuftraegeVorjahr';\r\n xdsTicketKundennummerLieferadresseID.SetParentComponent(xdsTicket);\r\n xdsTicketKundennummerLieferadresseID.Name := 'xdsTicketKundennummerLieferadresseID';\r\n xdsTicketKundennummerLieferadresseID.FieldName := 'Kundennummer.LieferadresseID';\r\n xdsTicketKundennummerUSTIDgeprueft.SetParentComponent(xdsTicket);\r\n xdsTicketKundennummerUSTIDgeprueft.Name := 'xdsTicketKundennummerUSTIDgeprueft';\r\n xdsTicketKundennummerUSTIDgeprueft.FieldName := 'Kundennummer.USTIDgeprueft';\r\n xdsTicketKundennummerKontaktverbund.SetParentComponent(xdsTicket);\r\n xdsTicketKundennummerKontaktverbund.Name := 'xdsTicketKundennummerKontaktverbund';\r\n xdsTicketKundennummerKontaktverbund.FieldName := 'Kundennummer.Kontaktverbund';\r\n xdsTicketKundennummerKontaktverbund.Size := 25;\r\n xdsTicketKundennummerHinweis.SetParentComponent(xdsTicket);\r\n xdsTicketKundennummerHinweis.Name := 'xdsTicketKundennummerHinweis';\r\n xdsTicketKundennummerHinweis.FieldName := 'Kundennummer.Hinweis';\r\n xdsTicketKundennummerHinweis.Size := 255;\r\n xdsTicketKundennummerLatitude.SetParentComponent(xdsTicket);\r\n xdsTicketKundennummerLatitude.Name := 'xdsTicketKundennummerLatitude';\r\n xdsTicketKundennummerLatitude.FieldName := 'Kundennummer.Latitude';\r\n xdsTicketKundennummerLongitude.SetParentComponent(xdsTicket);\r\n xdsTicketKundennummerLongitude.Name := 'xdsTicketKundennummerLongitude';\r\n xdsTicketKundennummerLongitude.FieldName := 'Kundennummer.Longitude';\r\n xdsTicketKundennummerkmLuftlinie.SetParentComponent(xdsTicket);\r\n xdsTicketKundennummerkmLuftlinie.Name := 'xdsTicketKundennummerkmLuftlinie';\r\n xdsTicketKundennummerkmLuftlinie.FieldName := 'Kundennummer.kmLuftlinie';\r\n xdsTicketKundennummerGoogleID.SetParentComponent(xdsTicket);\r\n xdsTicketKundennummerGoogleID.Name := 'xdsTicketKundennummerGoogleID';\r\n xdsTicketKundennummerGoogleID.FieldName := 'Kundennummer.GoogleID';\r\n xdsTicketKundennummerGoogleID.Size := 250;\r\n xdsTicketKundennummerGoogleUpdatedUTC.SetParentComponent(xdsTicket);\r\n xdsTicketKundennummerGoogleUpdatedUTC.Name := 'xdsTicketKundennummerGoogleUpdatedUTC';\r\n xdsTicketKundennummerGoogleUpdatedUTC.FieldName := 'Kundennummer.GoogleUpdatedUTC';\r\n xdsTicketKundennummerBundesland.SetParentComponent(xdsTicket);\r\n xdsTicketKundennummerBundesland.Name := 'xdsTicketKundennummerBundesland';\r\n xdsTicketKundennummerBundesland.FieldName := 'Kundennummer.Bundesland';\r\n xdsTicketKundennummerBundesland.Size := 50;\r\n xdsTicketKundennummerRegion.SetParentComponent(xdsTicket);\r\n xdsTicketKundennummerRegion.Name := 'xdsTicketKundennummerRegion';\r\n xdsTicketKundennummerRegion.FieldName := 'Kundennummer.Region';\r\n xdsTicketKundennummerRegion.Size := 50;\r\n xdsTicketKundennummerMandatsreferenz.SetParentComponent(xdsTicket);\r\n xdsTicketKundennummerMandatsreferenz.Name := 'xdsTicketKundennummerMandatsreferenz';\r\n xdsTicketKundennummerMandatsreferenz.FieldName := 'Kundennummer.Mandatsreferenz';\r\n xdsTicketKundennummerMandatsreferenz.Size := 34;\r\n xdsTicketKundennummerMandatsreferenzVom.SetParentComponent(xdsTicket);\r\n xdsTicketKundennummerMandatsreferenzVom.Name := 'xdsTicketKundennummerMandatsreferenzVom';\r\n xdsTicketKundennummerMandatsreferenzVom.FieldName := 'Kundennummer.MandatsreferenzVom';\r\n xdsTicketKundennummerLastschriftArt.SetParentComponent(xdsTicket);\r\n xdsTicketKundennummerLastschriftArt.Name := 'xdsTicketKundennummerLastschriftArt';\r\n xdsTicketKundennummerLastschriftArt.FieldName := 'Kundennummer.LastschriftArt';\r\n xdsTicketKundennummerLastschriftArt.Size := 2;\r\n xdsTicketKundennummerMahnsperre.SetParentComponent(xdsTicket);\r\n xdsTicketKundennummerMahnsperre.Name := 'xdsTicketKundennummerMahnsperre';\r\n xdsTicketKundennummerMahnsperre.FieldName := 'Kundennummer.Mahnsperre';\r\n xdsTicketKundennummerSuchbegriff.SetParentComponent(xdsTicket);\r\n xdsTicketKundennummerSuchbegriff.Name := 'xdsTicketKundennummerSuchbegriff';\r\n xdsTicketKundennummerSuchbegriff.FieldName := 'Kundennummer.Suchbegriff';\r\n xdsTicketKundennummerSuchbegriff.Size := 25;\r\n xdsTicketKundennummerLieferanschriftDaten.SetParentComponent(xdsTicket);\r\n xdsTicketKundennummerLieferanschriftDaten.Name := 'xdsTicketKundennummerLieferanschriftDaten';\r\n xdsTicketKundennummerLieferanschriftDaten.FieldName := 'Kundennummer.LieferanschriftDaten';\r\n xdsTicketKundennummerLieferanschriftDaten.Size := 255;\r\n xdsTicketKundennummerExportKasse.SetParentComponent(xdsTicket);\r\n xdsTicketKundennummerExportKasse.Name := 'xdsTicketKundennummerExportKasse';\r\n xdsTicketKundennummerExportKasse.FieldName := 'Kundennummer.ExportKasse';\r\n xdsTicketKundennummerLoeschvormerkungDatum.SetParentComponent(xdsTicket);\r\n xdsTicketKundennummerLoeschvormerkungDatum.Name := 'xdsTicketKundennummerLoeschvormerkungDatum';\r\n xdsTicketKundennummerLoeschvormerkungDatum.FieldName := 'Kundennummer.LoeschvormerkungDatum';\r\n xdsTicketKundennummerLoeschvormerkungGrund.SetParentComponent(xdsTicket);\r\n xdsTicketKundennummerLoeschvormerkungGrund.Name := 'xdsTicketKundennummerLoeschvormerkungGrund';\r\n xdsTicketKundennummerLoeschvormerkungGrund.FieldName := 'Kundennummer.LoeschvormerkungGrund';\r\n xdsTicketKundennummerLoeschvormerkungGrund.Size := 250;\r\n xdsTicketKundennummerPseudonymisiert.SetParentComponent(xdsTicket);\r\n xdsTicketKundennummerPseudonymisiert.Name := 'xdsTicketKundennummerPseudonymisiert';\r\n xdsTicketKundennummerPseudonymisiert.FieldName := 'Kundennummer.Pseudonymisiert';\r\n xdsTicketKundennummerPseudonymisiert.Size := 255;\r\n xdsTicketKundennummerLoginAktiv.SetParentComponent(xdsTicket);\r\n xdsTicketKundennummerLoginAktiv.Name := 'xdsTicketKundennummerLoginAktiv';\r\n xdsTicketKundennummerLoginAktiv.FieldName := 'Kundennummer.LoginAktiv';\r\n xdsTicketKundennummerSonstigeDaten.SetParentComponent(xdsTicket);\r\n xdsTicketKundennummerSonstigeDaten.Name := 'xdsTicketKundennummerSonstigeDaten';\r\n xdsTicketKundennummerSonstigeDaten.FieldName := 'Kundennummer.SonstigeDaten';\r\n xdsTicketKundennummerSonstigeDaten.Size := 255;\r\n xdsTicketKundennummerB2C.SetParentComponent(xdsTicket);\r\n xdsTicketKundennummerB2C.Name := 'xdsTicketKundennummerB2C';\r\n xdsTicketKundennummerB2C.FieldName := 'Kundennummer.B2C';\r\n xdsTicketKundennummerTIN.SetParentComponent(xdsTicket);\r\n xdsTicketKundennummerTIN.Name := 'xdsTicketKundennummerTIN';\r\n xdsTicketKundennummerTIN.FieldName := 'Kundennummer.TIN';\r\n xdsTicketKundennummerTIN.Size := 25;\r\n xdsTicketKundennummerMindestbestellwert.SetParentComponent(xdsTicket);\r\n xdsTicketKundennummerMindestbestellwert.Name := 'xdsTicketKundennummerMindestbestellwert';\r\n xdsTicketKundennummerMindestbestellwert.FieldName := 'Kundennummer.Mindestbestellwert';\r\n xdsTicketKundennummerBruttoberechnung.SetParentComponent(xdsTicket);\r\n xdsTicketKundennummerBruttoberechnung.Name := 'xdsTicketKundennummerBruttoberechnung';\r\n xdsTicketKundennummerBruttoberechnung.FieldName := 'Kundennummer.Bruttoberechnung';\r\n xdsTicketKundennummerDruckWHG.SetParentComponent(xdsTicket);\r\n xdsTicketKundennummerDruckWHG.Name := 'xdsTicketKundennummerDruckWHG';\r\n xdsTicketKundennummerDruckWHG.FieldName := 'Kundennummer.DruckWHG';\r\n xdsTicketKundennummerDruckWHG.Size := 3;\r\n xdsTicketKundennummerBerechtigungen.SetParentComponent(xdsTicket);\r\n xdsTicketKundennummerBerechtigungen.Name := 'xdsTicketKundennummerBerechtigungen';\r\n xdsTicketKundennummerBerechtigungen.FieldName := 'Kundennummer.Berechtigungen';\r\n xdsTicketKundennummerBerechtigungen.Size := 255;\r\n xdsTicketKundennummerRechnungCC.SetParentComponent(xdsTicket);\r\n xdsTicketKundennummerRechnungCC.Name := 'xdsTicketKundennummerRechnungCC';\r\n xdsTicketKundennummerRechnungCC.FieldName := 'Kundennummer.RechnungCC';\r\n xdsTicketKundennummerRechnungCC.Size := 50;\r\n xdsTicketProdukt.SetParentComponent(xdsTicket);\r\n xdsTicketProdukt.Name := 'xdsTicketProdukt';\r\n xdsTicketProdukt.FieldName := 'Produkt';\r\n xdsTicketProduktProdukt.SetParentComponent(xdsTicket);\r\n xdsTicketProduktProdukt.Name := 'xdsTicketProduktProdukt';\r\n xdsTicketProduktProdukt.FieldName := 'Produkt.Produkt';\r\n xdsTicketProduktProdukt.Size := 50;\r\n xdsTicketKategorie.SetParentComponent(xdsTicket);\r\n xdsTicketKategorie.Name := 'xdsTicketKategorie';\r\n xdsTicketKategorie.FieldName := 'Kategorie';\r\n xdsTicketKategorieKategorie.SetParentComponent(xdsTicket);\r\n xdsTicketKategorieKategorie.Name := 'xdsTicketKategorieKategorie';\r\n xdsTicketKategorieKategorie.FieldName := 'Kategorie.Kategorie';\r\n xdsTicketKategorieKategorie.Size := 25;\r\n xdsTicketPrioritaet.SetParentComponent(xdsTicket);\r\n xdsTicketPrioritaet.Name := 'xdsTicketPrioritaet';\r\n xdsTicketPrioritaet.FieldName := 'Prioritaet';\r\n xdsTicketPrioritaetPrioritaet.SetParentComponent(xdsTicket);\r\n xdsTicketPrioritaetPrioritaet.Name := 'xdsTicketPrioritaetPrioritaet';\r\n xdsTicketPrioritaetPrioritaet.FieldName := 'Prioritaet.Prioritaet';\r\n xdsTicketPrioritaetPrioText.SetParentComponent(xdsTicket);\r\n xdsTicketPrioritaetPrioText.Name := 'xdsTicketPrioritaetPrioText';\r\n xdsTicketPrioritaetPrioText.FieldName := 'Prioritaet.PrioText';\r\n xdsTicketPrioritaetPrioFarbe.SetParentComponent(xdsTicket);\r\n xdsTicketPrioritaetPrioFarbe.Name := 'xdsTicketPrioritaetPrioFarbe';\r\n xdsTicketPrioritaetPrioFarbe.FieldName := 'Prioritaet.PrioFarbe';\r\n xdsTicketStatus.SetParentComponent(xdsTicket);\r\n xdsTicketStatus.Name := 'xdsTicketStatus';\r\n xdsTicketStatus.FieldName := 'Status';\r\n xdsTicketID.SetParentComponent(xdsTicket);\r\n xdsTicketID.Name := 'xdsTicketID';\r\n xdsTicketID.FieldName := 'ID';\r\n xdsTicketID.Required := True;\r\n xdsTicketErstelltAm.SetParentComponent(xdsTicket);\r\n xdsTicketErstelltAm.Name := 'xdsTicketErstelltAm';\r\n xdsTicketErstelltAm.FieldName := 'ErstelltAm';\r\n xdsTicketBetreff.SetParentComponent(xdsTicket);\r\n xdsTicketBetreff.Name := 'xdsTicketBetreff';\r\n xdsTicketBetreff.FieldName := 'Betreff';\r\n xdsTicketBetreff.Size := 100;\r\n xdsTicketBeschreibung.SetParentComponent(xdsTicket);\r\n xdsTicketBeschreibung.Name := 'xdsTicketBeschreibung';\r\n xdsTicketBeschreibung.FieldName := 'Beschreibung';\r\n xdsTicketBeschreibung.Size := 255;\r\n xdsTicketAbrechnungsbetrag.SetParentComponent(xdsTicket);\r\n xdsTicketAbrechnungsbetrag.Name := 'xdsTicketAbrechnungsbetrag';\r\n xdsTicketAbrechnungsbetrag.FieldName := 'Abrechnungsbetrag';\r\n xdsTicketAbrechnungRechnungsnummer.SetParentComponent(xdsTicket);\r\n xdsTicketAbrechnungRechnungsnummer.Name := 'xdsTicketAbrechnungRechnungsnummer';\r\n xdsTicketAbrechnungRechnungsnummer.FieldName := 'AbrechnungRechnungsnummer';\r\n xdsTicketAbrechnungRechnungsnummer.Size := 10;\r\n xdsTicketAberechnetAm.SetParentComponent(xdsTicket);\r\n xdsTicketAberechnetAm.Name := 'xdsTicketAberechnetAm';\r\n xdsTicketAberechnetAm.FieldName := 'AberechnetAm';\r\n xdsTicketErledigtAm.SetParentComponent(xdsTicket);\r\n xdsTicketErledigtAm.Name := 'xdsTicketErledigtAm';\r\n xdsTicketErledigtAm.FieldName := 'ErledigtAm';\r\n xdsTicketNachname.SetParentComponent(xdsTicket);\r\n xdsTicketNachname.Name := 'xdsTicketNachname';\r\n xdsTicketNachname.FieldName := 'Nachname';\r\n xdsTicketNachname.Size := 40;\r\n xdsTicketVorname.SetParentComponent(xdsTicket);\r\n xdsTicketVorname.Name := 'xdsTicketVorname';\r\n xdsTicketVorname.FieldName := 'Vorname';\r\n xdsTicketVorname.Size := 40;\r\n xdsTicketEmail.SetParentComponent(xdsTicket);\r\n xdsTicketEmail.Name := 'xdsTicketEmail';\r\n xdsTicketEmail.FieldName := 'Email';\r\n xdsTicketEmail.Size := 50;\r\n xdsTicketSystemInfo.SetParentComponent(xdsTicket);\r\n xdsTicketSystemInfo.Name := 'xdsTicketSystemInfo';\r\n xdsTicketSystemInfo.FieldName := 'SystemInfo';\r\n xdsTicketSystemInfo.Size := 255;\r\n xdsTicketLoesung.SetParentComponent(xdsTicket);\r\n xdsTicketLoesung.Name := 'xdsTicketLoesung';\r\n xdsTicketLoesung.FieldName := 'Loesung';\r\n xdsTicketLoesung.Size := 255;\r\n xdsTicketProtokoll.SetParentComponent(xdsTicket);\r\n xdsTicketProtokoll.Name := 'xdsTicketProtokoll';\r\n xdsTicketProtokoll.FieldName := 'Protokoll';\r\n xdsTicketProtokoll.Size := 255;\r\n xdsTicketZeitaufwandMinuten.SetParentComponent(xdsTicket);\r\n xdsTicketZeitaufwandMinuten.Name := 'xdsTicketZeitaufwandMinuten';\r\n xdsTicketZeitaufwandMinuten.FieldName := 'ZeitaufwandMinuten';\r\n xdsTicketAbzurechnendeMinuten.SetParentComponent(xdsTicket);\r\n xdsTicketAbzurechnendeMinuten.Name := 'xdsTicketAbzurechnendeMinuten';\r\n xdsTicketAbzurechnendeMinuten.FieldName := 'AbzurechnendeMinuten';\r\n xdsTicketAbgerechneteMinuten.SetParentComponent(xdsTicket);\r\n xdsTicketAbgerechneteMinuten.Name := 'xdsTicketAbgerechneteMinuten';\r\n xdsTicketAbgerechneteMinuten.FieldName := 'AbgerechneteMinuten';\r\n xdsTicketBenachrichtigungNEU.SetParentComponent(xdsTicket);\r\n xdsTicketBenachrichtigungNEU.Name := 'xdsTicketBenachrichtigungNEU';\r\n xdsTicketBenachrichtigungNEU.FieldName := 'BenachrichtigungNEU';\r\n xdsTicketBenachrichtigungLoesung.SetParentComponent(xdsTicket);\r\n xdsTicketBenachrichtigungLoesung.Name := 'xdsTicketBenachrichtigungLoesung';\r\n xdsTicketBenachrichtigungLoesung.FieldName := 'BenachrichtigungLoesung';\r\n xdsTicketInterneBemerkung.SetParentComponent(xdsTicket);\r\n xdsTicketInterneBemerkung.Name := 'xdsTicketInterneBemerkung';\r\n xdsTicketInterneBemerkung.FieldName := 'InterneBemerkung';\r\n xdsTicketInterneBemerkung.Size := 255;\r\n xdsTicketLoesungInfoSenden.SetParentComponent(xdsTicket);\r\n xdsTicketLoesungInfoSenden.Name := 'xdsTicketLoesungInfoSenden';\r\n xdsTicketLoesungInfoSenden.FieldName := 'LoesungInfoSenden';\r\n xdsTicketKontaktperson.SetParentComponent(xdsTicket);\r\n xdsTicketKontaktperson.Name := 'xdsTicketKontaktperson';\r\n xdsTicketKontaktperson.FieldName := 'Kontaktperson';\r\n xdsTicketKontaktperson.Size := 100;\r\n xdsTicketErreichbarkeitTelefon.SetParentComponent(xdsTicket);\r\n xdsTicketErreichbarkeitTelefon.Name := 'xdsTicketErreichbarkeitTelefon';\r\n xdsTicketErreichbarkeitTelefon.FieldName := 'ErreichbarkeitTelefon';\r\n xdsTicketErreichbarkeitTelefon.Size := 100;\r\n xdsTicketErreichbarkeitWann.SetParentComponent(xdsTicket);\r\n xdsTicketErreichbarkeitWann.Name := 'xdsTicketErreichbarkeitWann';\r\n xdsTicketErreichbarkeitWann.FieldName := 'ErreichbarkeitWann';\r\n xdsTicketErreichbarkeitWann.Size := 100;\r\n xdsTicketStatusStatus.SetParentComponent(xdsTicket);\r\n xdsTicketStatusStatus.Name := 'xdsTicketStatusStatus';\r\n xdsTicketStatusStatus.FieldName := 'Status.Status';\r\n xdsTicketStatusStatus.Size := 25;\r\n xdsTicketKontaktpersonEmail.SetParentComponent(xdsTicket);\r\n xdsTicketKontaktpersonEmail.Name := 'xdsTicketKontaktpersonEmail';\r\n xdsTicketKontaktpersonEmail.FieldName := 'KontaktpersonEmail';\r\n xdsTicketKontaktpersonEmail.Size := 100;\r\n xdsTStatus.SetParentComponent(Self);\r\n xdsTStatus.Name := 'xdsTStatus';\r\n xdsTStatus.AfterOpen := xdsTStatusAfterOpen;\r\n xdsTStatus.EntitySetName := 'ITS_TicketStatus';\r\n xdsTStatus.Connection := DM2.XDataWebConnection1;\r\n xdsTStatus.Left := 176;\r\n xdsTStatus.Top := 24;\r\n xdsTStatusStatus.SetParentComponent(xdsTStatus);\r\n xdsTStatusStatus.Name := 'xdsTStatusStatus';\r\n xdsTStatusStatus.FieldName := 'Status';\r\n xdsTStatusStatus.Required := True;\r\n xdsTStatusStatus.Size := 25;\r\n sourceTicket.SetParentComponent(Self);\r\n sourceTicket.Name := 'sourceTicket';\r\n sourceTicket.DataSet := xdsTicket;\r\n SetEvent(sourceTicket, Self, 'OnStateChange', 'sourceTicketStateChange');\r\n sourceTicket.Left := 160;\r\n sourceTicket.Top := 228;\r\n sourceTStatus.SetParentComponent(Self);\r\n sourceTStatus.Name := 'sourceTStatus';\r\n sourceTStatus.DataSet := xdsTStatus;\r\n sourceTStatus.Left := 176;\r\n sourceTStatus.Top := 76;\r\n xdsTicketKonversation.SetParentComponent(Self);\r\n xdsTicketKonversation.Name := 'xdsTicketKonversation';\r\n xdsTicketKonversation.AfterApplyUpdates := xdsTicketKonversationAfterApplyUpdates;\r\n xdsTicketKonversation.AfterOpen := xdsTicketKonversationAfterOpen;\r\n xdsTicketKonversation.AfterPost := xdsTicketKonversationAfterPost;\r\n xdsTicketKonversation.EntitySetName := 'ITS_TicketKonversation';\r\n xdsTicketKonversation.Connection := DM2.XDataWebConnection1;\r\n xdsTicketKonversation.Left := 176;\r\n xdsTicketKonversation.Top := 136;\r\n xdsTicketKonversationTicketID.SetParentComponent(xdsTicketKonversation);\r\n xdsTicketKonversationTicketID.Name := 'xdsTicketKonversationTicketID';\r\n xdsTicketKonversationTicketID.FieldName := 'TicketID';\r\n xdsTicketKonversationTicketID.Required := True;\r\n xdsTicketKonversationID.SetParentComponent(xdsTicketKonversation);\r\n xdsTicketKonversationID.Name := 'xdsTicketKonversationID';\r\n xdsTicketKonversationID.FieldName := 'ID';\r\n xdsTicketKonversationID.Required := True;\r\n xdsTicketKonversationDatumUhrzeit.SetParentComponent(xdsTicketKonversation);\r\n xdsTicketKonversationDatumUhrzeit.Name := 'xdsTicketKonversationDatumUhrzeit';\r\n xdsTicketKonversationDatumUhrzeit.FieldName := 'DatumUhrzeit';\r\n xdsTicketKonversationDatumUhrzeit.Required := True;\r\n xdsTicketKonversationAntwortText.SetParentComponent(xdsTicketKonversation);\r\n xdsTicketKonversationAntwortText.Name := 'xdsTicketKonversationAntwortText';\r\n xdsTicketKonversationAntwortText.FieldName := 'AntwortText';\r\n xdsTicketKonversationAntwortText.Size := 255;\r\n xdsTicketKonversationNachrichtSenden.SetParentComponent(xdsTicketKonversation);\r\n xdsTicketKonversationNachrichtSenden.Name := 'xdsTicketKonversationNachrichtSenden';\r\n xdsTicketKonversationNachrichtSenden.FieldName := 'NachrichtSenden';\r\n xdsTicketKonversationNachrichtGesendet.SetParentComponent(xdsTicketKonversation);\r\n xdsTicketKonversationNachrichtGesendet.Name := 'xdsTicketKonversationNachrichtGesendet';\r\n xdsTicketKonversationNachrichtGesendet.FieldName := 'NachrichtGesendet';\r\n xdsTicketKonversationVerfasser.SetParentComponent(xdsTicketKonversation);\r\n xdsTicketKonversationVerfasser.Name := 'xdsTicketKonversationVerfasser';\r\n xdsTicketKonversationVerfasser.FieldName := 'Verfasser';\r\n xdsTicketKonversationVerfasser.Size := 50;\r\n xdsTicketKonversationQuellProgramm.SetParentComponent(xdsTicketKonversation);\r\n xdsTicketKonversationQuellProgramm.Name := 'xdsTicketKonversationQuellProgramm';\r\n xdsTicketKonversationQuellProgramm.FieldName := 'QuellProgramm';\r\n xdsTicketKonversationQuellProgramm.Size := 50;\r\n sourceTicketKonversation.SetParentComponent(Self);\r\n sourceTicketKonversation.Name := 'sourceTicketKonversation';\r\n sourceTicketKonversation.DataSet := xdsTicketKonversation;\r\n sourceTicketKonversation.Left := 176;\r\n sourceTicketKonversation.Top := 188;\r\n xdsTicketDateien.SetParentComponent(Self);\r\n xdsTicketDateien.Name := 'xdsTicketDateien';\r\n xdsTicketDateien.AfterOpen := xdsTicketDateienAfterOpen;\r\n xdsTicketDateien.EntitySetName := 'ITS_TicketDateien';\r\n xdsTicketDateien.Connection := DM2.XDataWebConnection1;\r\n xdsTicketDateien.Left := 176;\r\n xdsTicketDateien.Top := 432;\r\n xdsTicketDateienTicketID.SetParentComponent(xdsTicketDateien);\r\n xdsTicketDateienTicketID.Name := 'xdsTicketDateienTicketID';\r\n xdsTicketDateienTicketID.FieldName := 'TicketID';\r\n xdsTicketDateienTicketID.Required := True;\r\n xdsTicketDateienID.SetParentComponent(xdsTicketDateien);\r\n xdsTicketDateienID.Name := 'xdsTicketDateienID';\r\n xdsTicketDateienID.FieldName := 'ID';\r\n xdsTicketDateienID.Required := True;\r\n xdsTicketDateienDatumUhrzeit.SetParentComponent(xdsTicketDateien);\r\n xdsTicketDateienDatumUhrzeit.Name := 'xdsTicketDateienDatumUhrzeit';\r\n xdsTicketDateienDatumUhrzeit.FieldName := 'DatumUhrzeit';\r\n xdsTicketDateienDatumUhrzeit.Required := True;\r\n xdsTicketDateienFuerLoesung.SetParentComponent(xdsTicketDateien);\r\n xdsTicketDateienFuerLoesung.Name := 'xdsTicketDateienFuerLoesung';\r\n xdsTicketDateienFuerLoesung.FieldName := 'FuerLoesung';\r\n xdsTicketDateienDateiMime.SetParentComponent(xdsTicketDateien);\r\n xdsTicketDateienDateiMime.Name := 'xdsTicketDateienDateiMime';\r\n xdsTicketDateienDateiMime.FieldName := 'DateiMime';\r\n xdsTicketDateienDateiMime.Size := 50;\r\n xdsTicketDateienDateiName.SetParentComponent(xdsTicketDateien);\r\n xdsTicketDateienDateiName.Name := 'xdsTicketDateienDateiName';\r\n xdsTicketDateienDateiName.FieldName := 'DateiName';\r\n xdsTicketDateienDateiName.Size := 255;\r\n xdsTicketDateienDateiGroesse.SetParentComponent(xdsTicketDateien);\r\n xdsTicketDateienDateiGroesse.Name := 'xdsTicketDateienDateiGroesse';\r\n xdsTicketDateienDateiGroesse.FieldName := 'DateiGroesse';\r\n xdsTicketDateienDateiInhaltText.SetParentComponent(xdsTicketDateien);\r\n xdsTicketDateienDateiInhaltText.Name := 'xdsTicketDateienDateiInhaltText';\r\n xdsTicketDateienDateiInhaltText.FieldName := 'DateiInhaltText';\r\n xdsTicketDateienDateiInhaltText.Size := 255;\r\n xdskontosaldo.SetParentComponent(Self);\r\n xdskontosaldo.Name := 'xdskontosaldo';\r\n xdskontosaldo.AfterOpen := xdskontosaldoAfterOpen;\r\n xdskontosaldo.EntitySetName := 'ITS_Kontosalden';\r\n xdskontosaldo.Connection := DM2.XDataWebConnection1;\r\n xdskontosaldo.Left := 128;\r\n xdskontosaldo.Top := 544;\r\n xdskontosaldoKundennummer.SetParentComponent(xdskontosaldo);\r\n xdskontosaldoKundennummer.Name := 'xdskontosaldoKundennummer';\r\n xdskontosaldoKundennummer.FieldName := 'Kundennummer';\r\n xdskontosaldoKundennummer.Required := True;\r\n xdskontosaldoKundennummer.Size := 13;\r\n xdskontosaldoZeitaufwand.SetParentComponent(xdskontosaldo);\r\n xdskontosaldoZeitaufwand.Name := 'xdskontosaldoZeitaufwand';\r\n xdskontosaldoZeitaufwand.FieldName := 'Zeitaufwand';\r\n xdskontosaldoAbzurechnen.SetParentComponent(xdskontosaldo);\r\n xdskontosaldoAbzurechnen.Name := 'xdskontosaldoAbzurechnen';\r\n xdskontosaldoAbzurechnen.FieldName := 'Abzurechnen';\r\n xdskontosaldoGutschrift.SetParentComponent(xdskontosaldo);\r\n xdskontosaldoGutschrift.Name := 'xdskontosaldoGutschrift';\r\n xdskontosaldoGutschrift.FieldName := 'Gutschrift';\r\n xdskontosaldoAbzug.SetParentComponent(xdskontosaldo);\r\n xdskontosaldoAbzug.Name := 'xdskontosaldoAbzug';\r\n xdskontosaldoAbzug.FieldName := 'Abzug';\r\n xdskontosaldoSaldo.SetParentComponent(xdskontosaldo);\r\n xdskontosaldoSaldo.Name := 'xdskontosaldoSaldo';\r\n xdskontosaldoSaldo.FieldName := 'Saldo';\r\n xdskontosaldoBetrag.SetParentComponent(xdskontosaldo);\r\n xdskontosaldoBetrag.Name := 'xdskontosaldoBetrag';\r\n xdskontosaldoBetrag.FieldName := 'Betrag';\r\n xdskontosaldoMinutenpreis.SetParentComponent(xdskontosaldo);\r\n xdskontosaldoMinutenpreis.Name := 'xdskontosaldoMinutenpreis';\r\n xdskontosaldoMinutenpreis.FieldName := 'Minutenpreis';\r\n xdskontosaldoSRestguthaben.SetParentComponent(xdskontosaldo);\r\n xdskontosaldoSRestguthaben.Name := 'xdskontosaldoSRestguthaben';\r\n xdskontosaldoSRestguthaben.FieldName := 'SRestguthaben';\r\n finally\r\n lblinfo.AfterLoadDFMValues;\r\n lblKonversation.AfterLoadDFMValues;\r\n Container1.AfterLoadDFMValues;\r\n Container2.AfterLoadDFMValues;\r\n Container3.AfterLoadDFMValues;\r\n btnzurueck.AfterLoadDFMValues;\r\n TC.AfterLoadDFMValues;\r\n btnSpeichern.AfterLoadDFMValues;\r\n webDBCStatus.AfterLoadDFMValues;\r\n btnAntwortNeu.AfterLoadDFMValues;\r\n edtNotiz.AfterLoadDFMValues;\r\n btnAntwortSpeichern.AfterLoadDFMValues;\r\n checkBenachrichtigung.AfterLoadDFMValues;\r\n xdsTicket.AfterLoadDFMValues;\r\n xdsTicketKundennummer.AfterLoadDFMValues;\r\n xdsTicketKundennummerZahlungsbedingung.AfterLoadDFMValues;\r\n xdsTicketKundennummerKundennummer.AfterLoadDFMValues;\r\n xdsTicketKundennummerGruppeKunden.AfterLoadDFMValues;\r\n xdsTicketKundennummerGruppeLieferanten.AfterLoadDFMValues;\r\n xdsTicketKundennummerGruppeSonstige.AfterLoadDFMValues;\r\n xdsTicketKundennummerGruppeNichtkunden.AfterLoadDFMValues;\r\n xdsTicketKundennummerKontaktgruppe.AfterLoadDFMValues;\r\n xdsTicketKundennummerNachname.AfterLoadDFMValues;\r\n xdsTicketKundennummerVorname.AfterLoadDFMValues;\r\n xdsTicketKundennummerAdresszeile2.AfterLoadDFMValues;\r\n xdsTicketKundennummerAdresszeile3.AfterLoadDFMValues;\r\n xdsTicketKundennummerStrasse.AfterLoadDFMValues;\r\n xdsTicketKundennummerPostleitzahl.AfterLoadDFMValues;\r\n xdsTicketKundennummerOrt.AfterLoadDFMValues;\r\n xdsTicketKundennummerLaenderkuerzel.AfterLoadDFMValues;\r\n xdsTicketKundennummerLand.AfterLoadDFMValues;\r\n xdsTicketKundennummerLaenderkennzeichen.AfterLoadDFMValues;\r\n xdsTicketKundennummerAdressanrede.AfterLoadDFMValues;\r\n xdsTicketKundennummerBriefanrede1.AfterLoadDFMValues;\r\n xdsTicketKundennummerBriefanrede2.AfterLoadDFMValues;\r\n xdsTicketKundennummerAdresseBild.AfterLoadDFMValues;\r\n xdsTicketKundennummerLieferanschrift.AfterLoadDFMValues;\r\n xdsTicketKundennummerGeburtsdatum.AfterLoadDFMValues;\r\n xdsTicketKundennummerTelefonNummer.AfterLoadDFMValues;\r\n xdsTicketKundennummerTelefaxNummer.AfterLoadDFMValues;\r\n xdsTicketKundennummerMobilTelefon.AfterLoadDFMValues;\r\n xdsTicketKundennummerEMail.AfterLoadDFMValues;\r\n xdsTicketKundennummerInternet.AfterLoadDFMValues;\r\n xdsTicketKundennummerUmsatzsteuerID.AfterLoadDFMValues;\r\n xdsTicketKundennummerUmsatzsteuerausweis.AfterLoadDFMValues;\r\n xdsTicketKundennummerBemerkungen.AfterLoadDFMValues;\r\n xdsTicketKundennummerBranche.AfterLoadDFMValues;\r\n xdsTicketKundennummerSelektiert1.AfterLoadDFMValues;\r\n xdsTicketKundennummerSelektiert2.AfterLoadDFMValues;\r\n xdsTicketKundennummerSelektiert3.AfterLoadDFMValues;\r\n xdsTicketKundennummerTransportbedingung.AfterLoadDFMValues;\r\n xdsTicketKundennummerKilometer.AfterLoadDFMValues;\r\n xdsTicketKundennummerRabattsatz.AfterLoadDFMValues;\r\n xdsTicketKundennummerStundensatz.AfterLoadDFMValues;\r\n xdsTicketKundennummerKontonummer.AfterLoadDFMValues;\r\n xdsTicketKundennummerBank.AfterLoadDFMValues;\r\n xdsTicketKundennummerBankleitzahl.AfterLoadDFMValues;\r\n xdsTicketKundennummerKontoinhaber.AfterLoadDFMValues;\r\n xdsTicketKundennummerBetreuer.AfterLoadDFMValues;\r\n xdsTicketKundennummerQuelle.AfterLoadDFMValues;\r\n xdsTicketKundennummerSuchmerkmal.AfterLoadDFMValues;\r\n xdsTicketKundennummerWarenkreditlimit.AfterLoadDFMValues;\r\n xdsTicketKundennummerWarenkreditgesperrt.AfterLoadDFMValues;\r\n xdsTicketKundennummerKundennummerFremd.AfterLoadDFMValues;\r\n xdsTicketKundennummerKeinNewsletter.AfterLoadDFMValues;\r\n xdsTicketKundennummerDebitorennummer.AfterLoadDFMValues;\r\n xdsTicketKundennummerKreditorennummer.AfterLoadDFMValues;\r\n xdsTicketKundennummerRabattstufe.AfterLoadDFMValues;\r\n xdsTicketKundennummerTelefonAlternativ.AfterLoadDFMValues;\r\n xdsTicketKundennummerKostentraeger.AfterLoadDFMValues;\r\n xdsTicketKundennummerIBAN.AfterLoadDFMValues;\r\n xdsTicketKundennummerBIC.AfterLoadDFMValues;\r\n xdsTicketKundennummerEmailkonto.AfterLoadDFMValues;\r\n xdsTicketKundennummerBenutzername.AfterLoadDFMValues;\r\n xdsTicketKundennummerPasswort.AfterLoadDFMValues;\r\n xdsTicketKundennummerExportOutlook.AfterLoadDFMValues;\r\n xdsTicketKundennummerNichtInListeAnzeigen.AfterLoadDFMValues;\r\n xdsTicketKundennummerKreditkarteArt.AfterLoadDFMValues;\r\n xdsTicketKundennummerKreditkarteInhaber.AfterLoadDFMValues;\r\n xdsTicketKundennummerKreditkarteNummer.AfterLoadDFMValues;\r\n xdsTicketKundennummerKreditkarteGueltigMonat.AfterLoadDFMValues;\r\n xdsTicketKundennummerKreditkarteGueltigJahr.AfterLoadDFMValues;\r\n xdsTicketKundennummerKreditkartePruefziffer.AfterLoadDFMValues;\r\n xdsTicketKundennummerDatumNeu.AfterLoadDFMValues;\r\n xdsTicketKundennummerDatumgeaendert.AfterLoadDFMValues;\r\n xdsTicketKundennummerTitel.AfterLoadDFMValues;\r\n xdsTicketKundennummerStundensatzMontage.AfterLoadDFMValues;\r\n xdsTicketKundennummerStdMontageU25.AfterLoadDFMValues;\r\n xdsTicketKundennummerStdMontageU50.AfterLoadDFMValues;\r\n xdsTicketKundennummerStdMontageU70.AfterLoadDFMValues;\r\n xdsTicketKundennummerStdMontageU100.AfterLoadDFMValues;\r\n xdsTicketKundennummerStdMontageU150.AfterLoadDFMValues;\r\n xdsTicketKundennummerStundensatzWerkstatt.AfterLoadDFMValues;\r\n xdsTicketKundennummerStdWerkstattU25.AfterLoadDFMValues;\r\n xdsTicketKundennummerStdWerkstattU50.AfterLoadDFMValues;\r\n xdsTicketKundennummerStdWerkstattU70.AfterLoadDFMValues;\r\n xdsTicketKundennummerStdWerkstattU100.AfterLoadDFMValues;\r\n xdsTicketKundennummerStdWerkstattU150.AfterLoadDFMValues;\r\n xdsTicketKundennummerArchivReferenz.AfterLoadDFMValues;\r\n xdsTicketKundennummerErloesKontoUST1.AfterLoadDFMValues;\r\n xdsTicketKundennummerErloesKontoUST2.AfterLoadDFMValues;\r\n xdsTicketKundennummerErloesKontoUST3.AfterLoadDFMValues;\r\n xdsTicketKundennummerGebKal.AfterLoadDFMValues;\r\n xdsTicketKundennummerEmailversand.AfterLoadDFMValues;\r\n xdsTicketKundennummerMahnspesen.AfterLoadDFMValues;\r\n xdsTicketKundennummerRechnungSchluss.AfterLoadDFMValues;\r\n xdsTicketKundennummerBenutzerNeu.AfterLoadDFMValues;\r\n xdsTicketKundennummerBenutzerGeaendert.AfterLoadDFMValues;\r\n xdsTicketKundennummerBelegsprache.AfterLoadDFMValues;\r\n xdsTicketKundennummerkmSatz.AfterLoadDFMValues;\r\n xdsTicketKundennummerKundenklassetext.AfterLoadDFMValues;\r\n xdsTicketKundennummerKundenklasseFarbe.AfterLoadDFMValues;\r\n xdsTicketKundennummerAbweichenderRechnungsEmpfaenger.AfterLoadDFMValues;\r\n xdsTicketKundennummerProtokoll.AfterLoadDFMValues;\r\n xdsTicketKundennummerILNTyp1.AfterLoadDFMValues;\r\n xdsTicketKundennummerILNTyp2.AfterLoadDFMValues;\r\n xdsTicketKundennummerKontaktGUID.AfterLoadDFMValues;\r\n xdsTicketKundennummerPLZGUID.AfterLoadDFMValues;\r\n xdsTicketKundennummerPreislistenVariantePakete.AfterLoadDFMValues;\r\n xdsTicketKundennummerSchluesselRechnungslauf.AfterLoadDFMValues;\r\n xdsTicketKundennummerRechnungEmail.AfterLoadDFMValues;\r\n xdsTicketKundennummerZahlungsbedingungEK.AfterLoadDFMValues;\r\n xdsTicketKundennummerTransportbedingungEK.AfterLoadDFMValues;\r\n xdsTicketKundennummerRabattsatzEK.AfterLoadDFMValues;\r\n xdsTicketKundennummerVertreterMatchcode.AfterLoadDFMValues;\r\n xdsTicketKundennummerVertreterProvisionssatz.AfterLoadDFMValues;\r\n xdsTicketKundennummerUmsatzVKJahr.AfterLoadDFMValues;\r\n xdsTicketKundennummerUmsatzVKVorjahr.AfterLoadDFMValues;\r\n xdsTicketKundennummerUmsatzEKJahr.AfterLoadDFMValues;\r\n xdsTicketKundennummerUmsatzEKVorjahr.AfterLoadDFMValues;\r\n xdsTicketKundennummerSteuernummer.AfterLoadDFMValues;\r\n xdsTicketKundennummerLoginPW.AfterLoadDFMValues;\r\n xdsTicketKundennummerREperFax.AfterLoadDFMValues;\r\n xdsTicketKundennummerErreichbarkeit.AfterLoadDFMValues;\r\n xdsTicketKundennummerErloesKontoUST4.AfterLoadDFMValues;\r\n xdsTicketKundennummerErloesKontoUST5.AfterLoadDFMValues;\r\n xdsTicketKundennummerErloesKontoUST6.AfterLoadDFMValues;\r\n xdsTicketKundennummerBesteuerungKey.AfterLoadDFMValues;\r\n xdsTicketKundennummerAuftraegeJahr.AfterLoadDFMValues;\r\n xdsTicketKundennummerAuftraegeVorjahr.AfterLoadDFMValues;\r\n xdsTicketKundennummerLieferadresseID.AfterLoadDFMValues;\r\n xdsTicketKundennummerUSTIDgeprueft.AfterLoadDFMValues;\r\n xdsTicketKundennummerKontaktverbund.AfterLoadDFMValues;\r\n xdsTicketKundennummerHinweis.AfterLoadDFMValues;\r\n xdsTicketKundennummerLatitude.AfterLoadDFMValues;\r\n xdsTicketKundennummerLongitude.AfterLoadDFMValues;\r\n xdsTicketKundennummerkmLuftlinie.AfterLoadDFMValues;\r\n xdsTicketKundennummerGoogleID.AfterLoadDFMValues;\r\n xdsTicketKundennummerGoogleUpdatedUTC.AfterLoadDFMValues;\r\n xdsTicketKundennummerBundesland.AfterLoadDFMValues;\r\n xdsTicketKundennummerRegion.AfterLoadDFMValues;\r\n xdsTicketKundennummerMandatsreferenz.AfterLoadDFMValues;\r\n xdsTicketKundennummerMandatsreferenzVom.AfterLoadDFMValues;\r\n xdsTicketKundennummerLastschriftArt.AfterLoadDFMValues;\r\n xdsTicketKundennummerMahnsperre.AfterLoadDFMValues;\r\n xdsTicketKundennummerSuchbegriff.AfterLoadDFMValues;\r\n xdsTicketKundennummerLieferanschriftDaten.AfterLoadDFMValues;\r\n xdsTicketKundennummerExportKasse.AfterLoadDFMValues;\r\n xdsTicketKundennummerLoeschvormerkungDatum.AfterLoadDFMValues;\r\n xdsTicketKundennummerLoeschvormerkungGrund.AfterLoadDFMValues;\r\n xdsTicketKundennummerPseudonymisiert.AfterLoadDFMValues;\r\n xdsTicketKundennummerLoginAktiv.AfterLoadDFMValues;\r\n xdsTicketKundennummerSonstigeDaten.AfterLoadDFMValues;\r\n xdsTicketKundennummerB2C.AfterLoadDFMValues;\r\n xdsTicketKundennummerTIN.AfterLoadDFMValues;\r\n xdsTicketKundennummerMindestbestellwert.AfterLoadDFMValues;\r\n xdsTicketKundennummerBruttoberechnung.AfterLoadDFMValues;\r\n xdsTicketKundennummerDruckWHG.AfterLoadDFMValues;\r\n xdsTicketKundennummerBerechtigungen.AfterLoadDFMValues;\r\n xdsTicketKundennummerRechnungCC.AfterLoadDFMValues;\r\n xdsTicketProdukt.AfterLoadDFMValues;\r\n xdsTicketProduktProdukt.AfterLoadDFMValues;\r\n xdsTicketKategorie.AfterLoadDFMValues;\r\n xdsTicketKategorieKategorie.AfterLoadDFMValues;\r\n xdsTicketPrioritaet.AfterLoadDFMValues;\r\n xdsTicketPrioritaetPrioritaet.AfterLoadDFMValues;\r\n xdsTicketPrioritaetPrioText.AfterLoadDFMValues;\r\n xdsTicketPrioritaetPrioFarbe.AfterLoadDFMValues;\r\n xdsTicketStatus.AfterLoadDFMValues;\r\n xdsTicketID.AfterLoadDFMValues;\r\n xdsTicketErstelltAm.AfterLoadDFMValues;\r\n xdsTicketBetreff.AfterLoadDFMValues;\r\n xdsTicketBeschreibung.AfterLoadDFMValues;\r\n xdsTicketAbrechnungsbetrag.AfterLoadDFMValues;\r\n xdsTicketAbrechnungRechnungsnummer.AfterLoadDFMValues;\r\n xdsTicketAberechnetAm.AfterLoadDFMValues;\r\n xdsTicketErledigtAm.AfterLoadDFMValues;\r\n xdsTicketNachname.AfterLoadDFMValues;\r\n xdsTicketVorname.AfterLoadDFMValues;\r\n xdsTicketEmail.AfterLoadDFMValues;\r\n xdsTicketSystemInfo.AfterLoadDFMValues;\r\n xdsTicketLoesung.AfterLoadDFMValues;\r\n xdsTicketProtokoll.AfterLoadDFMValues;\r\n xdsTicketZeitaufwandMinuten.AfterLoadDFMValues;\r\n xdsTicketAbzurechnendeMinuten.AfterLoadDFMValues;\r\n xdsTicketAbgerechneteMinuten.AfterLoadDFMValues;\r\n xdsTicketBenachrichtigungNEU.AfterLoadDFMValues;\r\n xdsTicketBenachrichtigungLoesung.AfterLoadDFMValues;\r\n xdsTicketInterneBemerkung.AfterLoadDFMValues;\r\n xdsTicketLoesungInfoSenden.AfterLoadDFMValues;\r\n xdsTicketKontaktperson.AfterLoadDFMValues;\r\n xdsTicketErreichbarkeitTelefon.AfterLoadDFMValues;\r\n xdsTicketErreichbarkeitWann.AfterLoadDFMValues;\r\n xdsTicketStatusStatus.AfterLoadDFMValues;\r\n xdsTicketKontaktpersonEmail.AfterLoadDFMValues;\r\n xdsTStatus.AfterLoadDFMValues;\r\n xdsTStatusStatus.AfterLoadDFMValues;\r\n sourceTicket.AfterLoadDFMValues;\r\n sourceTStatus.AfterLoadDFMValues;\r\n xdsTicketKonversation.AfterLoadDFMValues;\r\n xdsTicketKonversationTicketID.AfterLoadDFMValues;\r\n xdsTicketKonversationID.AfterLoadDFMValues;\r\n xdsTicketKonversationDatumUhrzeit.AfterLoadDFMValues;\r\n xdsTicketKonversationAntwortText.AfterLoadDFMValues;\r\n xdsTicketKonversationNachrichtSenden.AfterLoadDFMValues;\r\n xdsTicketKonversationNachrichtGesendet.AfterLoadDFMValues;\r\n xdsTicketKonversationVerfasser.AfterLoadDFMValues;\r\n xdsTicketKonversationQuellProgramm.AfterLoadDFMValues;\r\n sourceTicketKonversation.AfterLoadDFMValues;\r\n xdsTicketDateien.AfterLoadDFMValues;\r\n xdsTicketDateienTicketID.AfterLoadDFMValues;\r\n xdsTicketDateienID.AfterLoadDFMValues;\r\n xdsTicketDateienDatumUhrzeit.AfterLoadDFMValues;\r\n xdsTicketDateienFuerLoesung.AfterLoadDFMValues;\r\n xdsTicketDateienDateiMime.AfterLoadDFMValues;\r\n xdsTicketDateienDateiName.AfterLoadDFMValues;\r\n xdsTicketDateienDateiGroesse.AfterLoadDFMValues;\r\n xdsTicketDateienDateiInhaltText.AfterLoadDFMValues;\r\n xdskontosaldo.AfterLoadDFMValues;\r\n xdskontosaldoKundennummer.AfterLoadDFMValues;\r\n xdskontosaldoZeitaufwand.AfterLoadDFMValues;\r\n xdskontosaldoAbzurechnen.AfterLoadDFMValues;\r\n xdskontosaldoGutschrift.AfterLoadDFMValues;\r\n xdskontosaldoAbzug.AfterLoadDFMValues;\r\n xdskontosaldoSaldo.AfterLoadDFMValues;\r\n xdskontosaldoBetrag.AfterLoadDFMValues;\r\n xdskontosaldoMinutenpreis.AfterLoadDFMValues;\r\n xdskontosaldoSRestguthaben.AfterLoadDFMValues;\r\n end;\r\nend;\r\n\r\nend.","unit unit_ListeTickets;\r\n\r\ninterface\r\n\r\nuses\r\n System.SysUtils, System.Classes, JS, Web, WEBLib.Graphics, WEBLib.Controls,\r\n WEBLib.Forms, WEBLib.Dialogs, Vcl.Controls, WEBLib.ExtCtrls, WEBLib.Buttons,\r\n WEBLib.Grids, WEBLib.DBCtrls, Data.DB, WEBLib.DB, XData.Web.JsonDataset,\r\n XData.Web.Dataset, Vcl.StdCtrls, WEBLib.StdCtrls, XData.Web.Client,\r\n WEBLib.WebCtrls, strutils;\r\n\r\ntype\r\n TListeTickets = class(TForm)\r\n xdsTickets: TXDataWebDataSet;\r\n Container3: THTMLContainer;\r\n Container2: THTMLContainer;\r\n Container1: THTMLContainer;\r\n ResultLabel: TLabel;\r\n btnzurueck: TButton;\r\n xdsTicketsID: TIntegerField;\r\n xdsTicketsErstelltAm: TDateTimeField;\r\n xdsTicketsBetreff: TStringField;\r\n xdsTicketsBeschreibung: TStringField;\r\n xdsTicketsKundennummerKundennummer: TStringField;\r\n xdsTicketsKundennummerNachname: TStringField;\r\n xdsTicketsNachname: TStringField;\r\n xdsTicketsVorname: TStringField;\r\n xdsTicketsStatus: TXDataWebEntityField;\r\n xdsTicketsStatusStatus: TStringField;\r\n xdsTicketsPrioritaet: TXDataWebEntityField;\r\n xdsTicketsPrioritaetPrioritaet: TIntegerField;\r\n xdsTicketsPrioritaetPrioText: TStringField;\r\n xdsTicketsPrioritaetPrioFarbe: TIntegerField;\r\n xdsTicketsAbrechnungsbetrag: TFloatField;\r\n xdsTicketsAbrechnungRechnungsnummer: TStringField;\r\n xdsTicketsAberechnetAm: TDateTimeField;\r\n xdsTicketsErledigtAm: TDateTimeField;\r\n xdsTicketsEmail: TStringField;\r\n xdsTicketsSystemInfo: TStringField;\r\n xdsTicketsLoesung: TStringField;\r\n xdsTicketsProtokoll: TStringField;\r\n xdsTicketsZeitaufwandMinuten: TIntegerField;\r\n xdsTicketsAbzurechnendeMinuten: TIntegerField;\r\n xdsTicketsAbgerechneteMinuten: TIntegerField;\r\n xdsTicketsBenachrichtigungNEU: TDateTimeField;\r\n xdsTicketsBenachrichtigungLoesung: TDateTimeField;\r\n xdsTicketsInterneBemerkung: TStringField;\r\n xdsTicketsLoesungInfoSenden: TIntegerField;\r\n xdsTicketsKontaktperson: TStringField;\r\n xdsTicketsErreichbarkeitTelefon: TStringField;\r\n xdsTicketsErreichbarkeitWann: TStringField;\r\n procedure WebFormShow(Sender: TObject);\r\n procedure xdsTicketsAfterOpen(DataSet: TDataSet);\r\n procedure ResultLabelClick(Sender: TObject);\r\n procedure btnzurueckClick(Sender: TObject);\r\n private\r\n { Private-Deklarationen }\r\n public\r\n { Public-Deklarationen }\r\n EinzelCard:THTMLDiv;\r\n procedure EinzelCardclick(Sender:TObject);\r\n protected procedure LoadDFMValues; override; end;\r\n\r\nvar\r\n ListeTickets: TListeTickets;\r\n\r\nimplementation\r\n uses unit1, unit2, unit_EinzelTicket;\r\n{$R *.dfm}\r\n\r\n\r\nprocedure TListeTickets.EinzelCardclick(Sender:TObject);\r\nvar\r\n EinzelTicket:TEinzelTicket;\r\n MyMerkerTicket:string;\r\nbegin\r\n myMerkerTicket:=(sender as THTMLDiv).ElementID;\r\n Container3.HTML.text:='';\r\n EinzelTicket := TEinzelTicket.CreateNew(procedure(AForm: TObject)\r\n begin\r\n (AForm as TEinzelTicket).MerkerTicket:=myMerkerTicket;\r\n end\r\n );\r\n\r\n EinzelTicket.ShowModal(procedure(AValue: TModalResult)\r\n begin\r\n xdsTickets.close;\r\n xdsTickets.Load;\r\n end\r\n );\r\nend;\r\n\r\n\r\n\r\n\r\n\r\n\r\nprocedure TListeTickets.ResultLabelClick(Sender: TObject);\r\nbegin\r\n if Pos('mehr anzeigen',resultlabel.html,0)>1 then\r\n begin\r\n xdstickets.Close;\r\n xdstickets.querystring:='$expand=Kundennummer,Status&$filter=(Status ne '+quotedstr('abgeschlossen')+') &$orderby=ID DESC';\r\n xdstickets.Load;\r\n end;\r\nend;\r\n\r\nprocedure TListeTickets.btnzurueckClick(Sender: TObject);\r\nbegin\r\n xdsTickets.Close;\r\n self.close;\r\nend;\r\n\r\nprocedure TListeTickets.WebFormShow(Sender: TObject);\r\nbegin\r\n xdstickets.Close;\r\n xdstickets.querystring:='$expand=Kundennummer,Status&$filter=(Status ne '+quotedstr('abgeschlossen')+') &$orderby=ID DESC';\r\n xdstickets.Load;\r\nend;\r\n\r\nprocedure TListeTickets.xdsTicketsAfterOpen(DataSet: TDataSet);\r\nvar\r\n myelement:TJSHTMLElement;\r\n EinzelKarte:string;\r\nbegin\r\n Container1.html.text:='';\r\n Container2.HTML.Text:='';\r\n myelement:=container2.ElementHandle;\r\n btnzurueck.ParentElement:=myelement;\r\n ResultLabel.ParentElement:=myelement;\r\n xdsTickets.First;\r\n if xdsTickets.RecordCount=0 then ResultLabel.HTML:='nichts gefunden';\r\n if xdsTickets.RecordCount>0 then ResultLabel.HTML:='Ticket(s): '+inttostr(xdsTickets.RecordCount);\r\n if xdsTickets.RecordCount>99 then ResultLabel.HTML:='mehr als 100 Tickets mehr anzeigen';\r\n if xdsTickets.RecordCount>100 then ResultLabel.HTML:='Tickets: '+inttostr(xdsTickets.RecordCount)+' (max. Anzeige: 500)';\r\n\r\n\r\n while not xdsTickets.eof do\r\n begin\r\n\r\n Einzelkarte:='
'+xdsTicketsID.asstring+' | '+formatdatetime('DD.MM.YYYY hh:mm',xdsTicketsErstelltAm.AsDateTime)+'
'+xdsTicketsKundennummerKundennummer.AsString+' | '+xdsTicketsNachname.asstring+'
';\r\n Einzelkarte:=Einzelkarte+'
'+xdsTicketsBetreff.AsString+'
';\r\n Einzelkarte:=Einzelkarte+leftstr(xdsTicketsBeschreibung.AsString,80)+'...
';\r\n Einzelkarte:=Einzelkarte+''+xdsTicketsStatusStatus.AsString+'
';\r\n Einzelkarte:=Einzelkarte+'
';\r\n\r\n myelement:=Container3.ElementHandle;\r\n EinzelCard:=THTMLDiv.Create(self);\r\n EinzelCard.ElementID:=xdsTicketsID.asstring;\r\n EinzelCard.HeightStyle:=ssauto;\r\n EinzelCard.Width:=350;\r\n EinzelCard.HTML.Text:=Einzelkarte;\r\n EinzelCard.ElementClassName:='card m-1 border-info';\r\n EinzelCard.OnClick:=@EinzelCardClick;\r\n EinzelCard.ParentElement:=myelement;\r\n\r\n xdsTickets.Next;\r\n end;\r\n\r\nend;\r\n\r\nprocedure TListeTickets.LoadDFMValues;\r\nbegin\r\n inherited LoadDFMValues;\r\n\r\n ResultLabel := TLabel.Create(Self);\r\n Container3 := THTMLContainer.Create(Self);\r\n Container2 := THTMLContainer.Create(Self);\r\n Container1 := THTMLContainer.Create(Self);\r\n btnzurueck := TButton.Create(Self);\r\n xdsTickets := TXDataWebDataSet.Create(Self);\r\n xdsTicketsID := TIntegerField.Create(Self);\r\n xdsTicketsErstelltAm := TDateTimeField.Create(Self);\r\n xdsTicketsBetreff := TStringField.Create(Self);\r\n xdsTicketsBeschreibung := TStringField.Create(Self);\r\n xdsTicketsKundennummerKundennummer := TStringField.Create(Self);\r\n xdsTicketsKundennummerNachname := TStringField.Create(Self);\r\n xdsTicketsNachname := TStringField.Create(Self);\r\n xdsTicketsVorname := TStringField.Create(Self);\r\n xdsTicketsStatus := TXDataWebEntityField.Create(Self);\r\n xdsTicketsStatusStatus := TStringField.Create(Self);\r\n xdsTicketsPrioritaet := TXDataWebEntityField.Create(Self);\r\n xdsTicketsPrioritaetPrioritaet := TIntegerField.Create(Self);\r\n xdsTicketsPrioritaetPrioText := TStringField.Create(Self);\r\n xdsTicketsPrioritaetPrioFarbe := TIntegerField.Create(Self);\r\n xdsTicketsAbrechnungsbetrag := TFloatField.Create(Self);\r\n xdsTicketsAbrechnungRechnungsnummer := TStringField.Create(Self);\r\n xdsTicketsAberechnetAm := TDateTimeField.Create(Self);\r\n xdsTicketsErledigtAm := TDateTimeField.Create(Self);\r\n xdsTicketsEmail := TStringField.Create(Self);\r\n xdsTicketsSystemInfo := TStringField.Create(Self);\r\n xdsTicketsLoesung := TStringField.Create(Self);\r\n xdsTicketsProtokoll := TStringField.Create(Self);\r\n xdsTicketsZeitaufwandMinuten := TIntegerField.Create(Self);\r\n xdsTicketsAbzurechnendeMinuten := TIntegerField.Create(Self);\r\n xdsTicketsAbgerechneteMinuten := TIntegerField.Create(Self);\r\n xdsTicketsBenachrichtigungNEU := TDateTimeField.Create(Self);\r\n xdsTicketsBenachrichtigungLoesung := TDateTimeField.Create(Self);\r\n xdsTicketsInterneBemerkung := TStringField.Create(Self);\r\n xdsTicketsLoesungInfoSenden := TIntegerField.Create(Self);\r\n xdsTicketsKontaktperson := TStringField.Create(Self);\r\n xdsTicketsErreichbarkeitTelefon := TStringField.Create(Self);\r\n xdsTicketsErreichbarkeitWann := TStringField.Create(Self);\r\n\r\n ResultLabel.BeforeLoadDFMValues;\r\n Container3.BeforeLoadDFMValues;\r\n Container2.BeforeLoadDFMValues;\r\n Container1.BeforeLoadDFMValues;\r\n btnzurueck.BeforeLoadDFMValues;\r\n xdsTickets.BeforeLoadDFMValues;\r\n xdsTicketsID.BeforeLoadDFMValues;\r\n xdsTicketsErstelltAm.BeforeLoadDFMValues;\r\n xdsTicketsBetreff.BeforeLoadDFMValues;\r\n xdsTicketsBeschreibung.BeforeLoadDFMValues;\r\n xdsTicketsKundennummerKundennummer.BeforeLoadDFMValues;\r\n xdsTicketsKundennummerNachname.BeforeLoadDFMValues;\r\n xdsTicketsNachname.BeforeLoadDFMValues;\r\n xdsTicketsVorname.BeforeLoadDFMValues;\r\n xdsTicketsStatus.BeforeLoadDFMValues;\r\n xdsTicketsStatusStatus.BeforeLoadDFMValues;\r\n xdsTicketsPrioritaet.BeforeLoadDFMValues;\r\n xdsTicketsPrioritaetPrioritaet.BeforeLoadDFMValues;\r\n xdsTicketsPrioritaetPrioText.BeforeLoadDFMValues;\r\n xdsTicketsPrioritaetPrioFarbe.BeforeLoadDFMValues;\r\n xdsTicketsAbrechnungsbetrag.BeforeLoadDFMValues;\r\n xdsTicketsAbrechnungRechnungsnummer.BeforeLoadDFMValues;\r\n xdsTicketsAberechnetAm.BeforeLoadDFMValues;\r\n xdsTicketsErledigtAm.BeforeLoadDFMValues;\r\n xdsTicketsEmail.BeforeLoadDFMValues;\r\n xdsTicketsSystemInfo.BeforeLoadDFMValues;\r\n xdsTicketsLoesung.BeforeLoadDFMValues;\r\n xdsTicketsProtokoll.BeforeLoadDFMValues;\r\n xdsTicketsZeitaufwandMinuten.BeforeLoadDFMValues;\r\n xdsTicketsAbzurechnendeMinuten.BeforeLoadDFMValues;\r\n xdsTicketsAbgerechneteMinuten.BeforeLoadDFMValues;\r\n xdsTicketsBenachrichtigungNEU.BeforeLoadDFMValues;\r\n xdsTicketsBenachrichtigungLoesung.BeforeLoadDFMValues;\r\n xdsTicketsInterneBemerkung.BeforeLoadDFMValues;\r\n xdsTicketsLoesungInfoSenden.BeforeLoadDFMValues;\r\n xdsTicketsKontaktperson.BeforeLoadDFMValues;\r\n xdsTicketsErreichbarkeitTelefon.BeforeLoadDFMValues;\r\n xdsTicketsErreichbarkeitWann.BeforeLoadDFMValues;\r\n try\r\n Name := 'ListeTickets';\r\n Width := 224;\r\n Height := 319;\r\n CSSLibrary := cssBootstrap;\r\n ElementFont := efCSS;\r\n Font.Charset := DEFAULT_CHARSET;\r\n Font.Color := clWindowText;\r\n Font.Height := -11;\r\n Font.Name := 'Tahoma';\r\n Font.Style := [];\r\n ParentFont := False;\r\n SetEvent(Self, 'OnShow', 'WebFormShow');\r\n ResultLabel.SetParentComponent(Self);\r\n ResultLabel.Name := 'ResultLabel';\r\n ResultLabel.Left := 8;\r\n ResultLabel.Top := 204;\r\n ResultLabel.Width := 55;\r\n ResultLabel.Height := 13;\r\n ResultLabel.Caption := 'ResultLabel';\r\n ResultLabel.ElementClassName := 'h6 m-2';\r\n ResultLabel.ElementFont := efCSS;\r\n ResultLabel.ElementPosition := epIgnore;\r\n ResultLabel.HeightStyle := ssAuto;\r\n ResultLabel.HeightPercent := 100.000000000000000000;\r\n ResultLabel.WidthStyle := ssAuto;\r\n ResultLabel.WidthPercent := 100.000000000000000000;\r\n SetEvent(ResultLabel, Self, 'OnClick', 'ResultLabelClick');\r\n Container3.SetParentComponent(Self);\r\n Container3.Name := 'Container3';\r\n Container3.Left := 0;\r\n Container3.Top := 94;\r\n Container3.Width := 169;\r\n Container3.Height := 41;\r\n Container3.ElementClassName := 'd-flex flex-wrap m-1';\r\n Container3.HeightStyle := ssAuto;\r\n Container3.WidthStyle := ssAuto;\r\n Container3.ChildOrder := 2;\r\n Container3.ElementFont := efCSS;\r\n Container3.ElementPosition := epIgnore;\r\n Container2.SetParentComponent(Self);\r\n Container2.Name := 'Container2';\r\n Container2.Left := 0;\r\n Container2.Top := 47;\r\n Container2.Width := 169;\r\n Container2.Height := 41;\r\n Container2.ElementClassName := 'd-flex flex-wrap m-1';\r\n Container2.HeightStyle := ssAuto;\r\n Container2.WidthStyle := ssAuto;\r\n Container2.ChildOrder := 1;\r\n Container2.ElementFont := efCSS;\r\n Container2.ElementPosition := epIgnore;\r\n Container1.SetParentComponent(Self);\r\n Container1.Name := 'Container1';\r\n Container1.Left := 3;\r\n Container1.Top := 0;\r\n Container1.Width := 169;\r\n Container1.Height := 41;\r\n Container1.HeightStyle := ssAuto;\r\n Container1.WidthStyle := ssPercent;\r\n Container1.ElementFont := efCSS;\r\n Container1.ElementPosition := epIgnore;\r\n btnzurueck.SetParentComponent(Self);\r\n btnzurueck.Name := 'btnzurueck';\r\n btnzurueck.Left := 67;\r\n btnzurueck.Top := 141;\r\n btnzurueck.Width := 96;\r\n btnzurueck.Height := 25;\r\n btnzurueck.Caption := '<< zur'#252'ck';\r\n btnzurueck.ChildOrder := 4;\r\n btnzurueck.ElementClassName := 'btn btn-info m-1 text-left';\r\n btnzurueck.ElementFont := efCSS;\r\n btnzurueck.ElementPosition := epIgnore;\r\n btnzurueck.HeightStyle := ssAuto;\r\n btnzurueck.HeightPercent := 100.000000000000000000;\r\n btnzurueck.WidthStyle := ssAuto;\r\n btnzurueck.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnzurueck, Self, 'OnClick', 'btnzurueckClick');\r\n xdsTickets.SetParentComponent(Self);\r\n xdsTickets.Name := 'xdsTickets';\r\n xdsTickets.AfterOpen := xdsTicketsAfterOpen;\r\n xdsTickets.EntitySetName := 'ITS_TicketMain';\r\n xdsTickets.Connection := DM2.XDataWebConnection1;\r\n xdsTickets.SubpropsDepth := 1;\r\n xdsTickets.QueryString := '$expand=Kundennummer,Status&$filter=(Status ne '#39'abgeschlossen'#39')';\r\n xdsTickets.QueryTop := 100;\r\n xdsTickets.Left := 20;\r\n xdsTickets.Top := 142;\r\n xdsTicketsID.SetParentComponent(xdsTickets);\r\n xdsTicketsID.Name := 'xdsTicketsID';\r\n xdsTicketsID.FieldName := 'ID';\r\n xdsTicketsID.Required := True;\r\n xdsTicketsErstelltAm.SetParentComponent(xdsTickets);\r\n xdsTicketsErstelltAm.Name := 'xdsTicketsErstelltAm';\r\n xdsTicketsErstelltAm.FieldName := 'ErstelltAm';\r\n xdsTicketsBetreff.SetParentComponent(xdsTickets);\r\n xdsTicketsBetreff.Name := 'xdsTicketsBetreff';\r\n xdsTicketsBetreff.FieldName := 'Betreff';\r\n xdsTicketsBetreff.Size := 100;\r\n xdsTicketsBeschreibung.SetParentComponent(xdsTickets);\r\n xdsTicketsBeschreibung.Name := 'xdsTicketsBeschreibung';\r\n xdsTicketsBeschreibung.FieldName := 'Beschreibung';\r\n xdsTicketsBeschreibung.Size := 255;\r\n xdsTicketsKundennummerKundennummer.SetParentComponent(xdsTickets);\r\n xdsTicketsKundennummerKundennummer.Name := 'xdsTicketsKundennummerKundennummer';\r\n xdsTicketsKundennummerKundennummer.FieldName := 'Kundennummer.Kundennummer';\r\n xdsTicketsKundennummerKundennummer.Size := 13;\r\n xdsTicketsKundennummerNachname.SetParentComponent(xdsTickets);\r\n xdsTicketsKundennummerNachname.Name := 'xdsTicketsKundennummerNachname';\r\n xdsTicketsKundennummerNachname.FieldName := 'Kundennummer.Nachname';\r\n xdsTicketsKundennummerNachname.Size := 40;\r\n xdsTicketsNachname.SetParentComponent(xdsTickets);\r\n xdsTicketsNachname.Name := 'xdsTicketsNachname';\r\n xdsTicketsNachname.FieldName := 'Nachname';\r\n xdsTicketsNachname.Size := 40;\r\n xdsTicketsVorname.SetParentComponent(xdsTickets);\r\n xdsTicketsVorname.Name := 'xdsTicketsVorname';\r\n xdsTicketsVorname.FieldName := 'Vorname';\r\n xdsTicketsVorname.Size := 40;\r\n xdsTicketsStatus.SetParentComponent(xdsTickets);\r\n xdsTicketsStatus.Name := 'xdsTicketsStatus';\r\n xdsTicketsStatus.FieldName := 'Status';\r\n xdsTicketsStatusStatus.SetParentComponent(xdsTickets);\r\n xdsTicketsStatusStatus.Name := 'xdsTicketsStatusStatus';\r\n xdsTicketsStatusStatus.FieldName := 'Status.Status';\r\n xdsTicketsStatusStatus.Size := 25;\r\n xdsTicketsPrioritaet.SetParentComponent(xdsTickets);\r\n xdsTicketsPrioritaet.Name := 'xdsTicketsPrioritaet';\r\n xdsTicketsPrioritaet.FieldName := 'Prioritaet';\r\n xdsTicketsPrioritaetPrioritaet.SetParentComponent(xdsTickets);\r\n xdsTicketsPrioritaetPrioritaet.Name := 'xdsTicketsPrioritaetPrioritaet';\r\n xdsTicketsPrioritaetPrioritaet.FieldName := 'Prioritaet.Prioritaet';\r\n xdsTicketsPrioritaetPrioText.SetParentComponent(xdsTickets);\r\n xdsTicketsPrioritaetPrioText.Name := 'xdsTicketsPrioritaetPrioText';\r\n xdsTicketsPrioritaetPrioText.FieldName := 'Prioritaet.PrioText';\r\n xdsTicketsPrioritaetPrioFarbe.SetParentComponent(xdsTickets);\r\n xdsTicketsPrioritaetPrioFarbe.Name := 'xdsTicketsPrioritaetPrioFarbe';\r\n xdsTicketsPrioritaetPrioFarbe.FieldName := 'Prioritaet.PrioFarbe';\r\n xdsTicketsAbrechnungsbetrag.SetParentComponent(xdsTickets);\r\n xdsTicketsAbrechnungsbetrag.Name := 'xdsTicketsAbrechnungsbetrag';\r\n xdsTicketsAbrechnungsbetrag.FieldName := 'Abrechnungsbetrag';\r\n xdsTicketsAbrechnungRechnungsnummer.SetParentComponent(xdsTickets);\r\n xdsTicketsAbrechnungRechnungsnummer.Name := 'xdsTicketsAbrechnungRechnungsnummer';\r\n xdsTicketsAbrechnungRechnungsnummer.FieldName := 'AbrechnungRechnungsnummer';\r\n xdsTicketsAbrechnungRechnungsnummer.Size := 10;\r\n xdsTicketsAberechnetAm.SetParentComponent(xdsTickets);\r\n xdsTicketsAberechnetAm.Name := 'xdsTicketsAberechnetAm';\r\n xdsTicketsAberechnetAm.FieldName := 'AberechnetAm';\r\n xdsTicketsErledigtAm.SetParentComponent(xdsTickets);\r\n xdsTicketsErledigtAm.Name := 'xdsTicketsErledigtAm';\r\n xdsTicketsErledigtAm.FieldName := 'ErledigtAm';\r\n xdsTicketsEmail.SetParentComponent(xdsTickets);\r\n xdsTicketsEmail.Name := 'xdsTicketsEmail';\r\n xdsTicketsEmail.FieldName := 'Email';\r\n xdsTicketsEmail.Size := 50;\r\n xdsTicketsSystemInfo.SetParentComponent(xdsTickets);\r\n xdsTicketsSystemInfo.Name := 'xdsTicketsSystemInfo';\r\n xdsTicketsSystemInfo.FieldName := 'SystemInfo';\r\n xdsTicketsSystemInfo.Size := 255;\r\n xdsTicketsLoesung.SetParentComponent(xdsTickets);\r\n xdsTicketsLoesung.Name := 'xdsTicketsLoesung';\r\n xdsTicketsLoesung.FieldName := 'Loesung';\r\n xdsTicketsLoesung.Size := 255;\r\n xdsTicketsProtokoll.SetParentComponent(xdsTickets);\r\n xdsTicketsProtokoll.Name := 'xdsTicketsProtokoll';\r\n xdsTicketsProtokoll.FieldName := 'Protokoll';\r\n xdsTicketsProtokoll.Size := 255;\r\n xdsTicketsZeitaufwandMinuten.SetParentComponent(xdsTickets);\r\n xdsTicketsZeitaufwandMinuten.Name := 'xdsTicketsZeitaufwandMinuten';\r\n xdsTicketsZeitaufwandMinuten.FieldName := 'ZeitaufwandMinuten';\r\n xdsTicketsAbzurechnendeMinuten.SetParentComponent(xdsTickets);\r\n xdsTicketsAbzurechnendeMinuten.Name := 'xdsTicketsAbzurechnendeMinuten';\r\n xdsTicketsAbzurechnendeMinuten.FieldName := 'AbzurechnendeMinuten';\r\n xdsTicketsAbgerechneteMinuten.SetParentComponent(xdsTickets);\r\n xdsTicketsAbgerechneteMinuten.Name := 'xdsTicketsAbgerechneteMinuten';\r\n xdsTicketsAbgerechneteMinuten.FieldName := 'AbgerechneteMinuten';\r\n xdsTicketsBenachrichtigungNEU.SetParentComponent(xdsTickets);\r\n xdsTicketsBenachrichtigungNEU.Name := 'xdsTicketsBenachrichtigungNEU';\r\n xdsTicketsBenachrichtigungNEU.FieldName := 'BenachrichtigungNEU';\r\n xdsTicketsBenachrichtigungLoesung.SetParentComponent(xdsTickets);\r\n xdsTicketsBenachrichtigungLoesung.Name := 'xdsTicketsBenachrichtigungLoesung';\r\n xdsTicketsBenachrichtigungLoesung.FieldName := 'BenachrichtigungLoesung';\r\n xdsTicketsInterneBemerkung.SetParentComponent(xdsTickets);\r\n xdsTicketsInterneBemerkung.Name := 'xdsTicketsInterneBemerkung';\r\n xdsTicketsInterneBemerkung.FieldName := 'InterneBemerkung';\r\n xdsTicketsInterneBemerkung.Size := 255;\r\n xdsTicketsLoesungInfoSenden.SetParentComponent(xdsTickets);\r\n xdsTicketsLoesungInfoSenden.Name := 'xdsTicketsLoesungInfoSenden';\r\n xdsTicketsLoesungInfoSenden.FieldName := 'LoesungInfoSenden';\r\n xdsTicketsKontaktperson.SetParentComponent(xdsTickets);\r\n xdsTicketsKontaktperson.Name := 'xdsTicketsKontaktperson';\r\n xdsTicketsKontaktperson.FieldName := 'Kontaktperson';\r\n xdsTicketsKontaktperson.Size := 100;\r\n xdsTicketsErreichbarkeitTelefon.SetParentComponent(xdsTickets);\r\n xdsTicketsErreichbarkeitTelefon.Name := 'xdsTicketsErreichbarkeitTelefon';\r\n xdsTicketsErreichbarkeitTelefon.FieldName := 'ErreichbarkeitTelefon';\r\n xdsTicketsErreichbarkeitTelefon.Size := 100;\r\n xdsTicketsErreichbarkeitWann.SetParentComponent(xdsTickets);\r\n xdsTicketsErreichbarkeitWann.Name := 'xdsTicketsErreichbarkeitWann';\r\n xdsTicketsErreichbarkeitWann.FieldName := 'ErreichbarkeitWann';\r\n xdsTicketsErreichbarkeitWann.Size := 100;\r\n finally\r\n ResultLabel.AfterLoadDFMValues;\r\n Container3.AfterLoadDFMValues;\r\n Container2.AfterLoadDFMValues;\r\n Container1.AfterLoadDFMValues;\r\n btnzurueck.AfterLoadDFMValues;\r\n xdsTickets.AfterLoadDFMValues;\r\n xdsTicketsID.AfterLoadDFMValues;\r\n xdsTicketsErstelltAm.AfterLoadDFMValues;\r\n xdsTicketsBetreff.AfterLoadDFMValues;\r\n xdsTicketsBeschreibung.AfterLoadDFMValues;\r\n xdsTicketsKundennummerKundennummer.AfterLoadDFMValues;\r\n xdsTicketsKundennummerNachname.AfterLoadDFMValues;\r\n xdsTicketsNachname.AfterLoadDFMValues;\r\n xdsTicketsVorname.AfterLoadDFMValues;\r\n xdsTicketsStatus.AfterLoadDFMValues;\r\n xdsTicketsStatusStatus.AfterLoadDFMValues;\r\n xdsTicketsPrioritaet.AfterLoadDFMValues;\r\n xdsTicketsPrioritaetPrioritaet.AfterLoadDFMValues;\r\n xdsTicketsPrioritaetPrioText.AfterLoadDFMValues;\r\n xdsTicketsPrioritaetPrioFarbe.AfterLoadDFMValues;\r\n xdsTicketsAbrechnungsbetrag.AfterLoadDFMValues;\r\n xdsTicketsAbrechnungRechnungsnummer.AfterLoadDFMValues;\r\n xdsTicketsAberechnetAm.AfterLoadDFMValues;\r\n xdsTicketsErledigtAm.AfterLoadDFMValues;\r\n xdsTicketsEmail.AfterLoadDFMValues;\r\n xdsTicketsSystemInfo.AfterLoadDFMValues;\r\n xdsTicketsLoesung.AfterLoadDFMValues;\r\n xdsTicketsProtokoll.AfterLoadDFMValues;\r\n xdsTicketsZeitaufwandMinuten.AfterLoadDFMValues;\r\n xdsTicketsAbzurechnendeMinuten.AfterLoadDFMValues;\r\n xdsTicketsAbgerechneteMinuten.AfterLoadDFMValues;\r\n xdsTicketsBenachrichtigungNEU.AfterLoadDFMValues;\r\n xdsTicketsBenachrichtigungLoesung.AfterLoadDFMValues;\r\n xdsTicketsInterneBemerkung.AfterLoadDFMValues;\r\n xdsTicketsLoesungInfoSenden.AfterLoadDFMValues;\r\n xdsTicketsKontaktperson.AfterLoadDFMValues;\r\n xdsTicketsErreichbarkeitTelefon.AfterLoadDFMValues;\r\n xdsTicketsErreichbarkeitWann.AfterLoadDFMValues;\r\n end;\r\nend;\r\n\r\nend.","unit unit_Logbuch;\r\n\r\ninterface\r\n\r\nuses\r\n System.SysUtils, System.Classes, JS, Web, WEBLib.Graphics, WEBLib.Controls,\r\n WEBLib.Forms, WEBLib.Dialogs, Data.DB, WEBLib.DB, XData.Web.JsonDataset,\r\n XData.Web.Dataset, XData.Web.Connection, Vcl.Controls, Vcl.StdCtrls,\r\n WEBLib.StdCtrls, WEBLib.ExtCtrls, Vcl.Grids, WEBLib.DBCtrls, VCL.TMSFNCTypes,\r\n VCL.TMSFNCUtils, VCL.TMSFNCGraphics, VCL.TMSFNCGraphicsTypes, strutils,\r\n VCL.TMSFNCCustomControl, VCL.TMSFNCTableView, WEBLib.Grids, WEBLib.Buttons, DB;\r\n\r\ntype\r\n TfrmLogbuch = class(TForm)\r\n DataSet: TXDataWebDataSet;\r\n Source: TDataSource;\r\n Container1: THTMLContainer;\r\n Container2: THTMLContainer;\r\n Container3: THTMLContainer;\r\n TC: TTableControl;\r\n btnzurueck: TButton;\r\n edtSuchbegriff: TEdit;\r\n DataSetID: TIntegerField;\r\n DataSetDatumUhrzeit: TDateTimeField;\r\n DataSetApplicationCode: TStringField;\r\n DataSetApplicationName: TStringField;\r\n DataSetVersionsdatum: TDateTimeField;\r\n DataSetInstalCode: TStringField;\r\n DataSetFreischaltungVON: TDateTimeField;\r\n DataSetFreischaltungBIS: TDateTimeField;\r\n DataSetAbsenderzeile: TStringField;\r\n DataSetPCCode: TStringField;\r\n DataSetVertriebspartner: TIntegerField;\r\n DataSetLetzterStart: TDateTimeField;\r\n DataSetAnzahlStart: TIntegerField;\r\n DataSetDatumUhrzeitUser: TDateTimeField;\r\n DataSetWindowsUserName: TStringField;\r\n DataSetCadiaKundennummer: TStringField;\r\n DataSetPCName: TStringField;\r\n DataSetAvIsTrial: TBooleanField;\r\n DataSetAvAuthorized: TBooleanField;\r\n DataSetAvRegistered: TBooleanField;\r\n DataSetAvExpired: TBooleanField;\r\n DataSetSysNachname: TStringField;\r\n DataSetSysVorname: TStringField;\r\n DataSetNetzwerk: TBooleanField;\r\n DataSetDBKEY: TStringField;\r\n DataSetVerarbeitung: TStringField;\r\n DataSetCadiaModSumme: TFloatField;\r\n DataSetASPVersion: TStringField;\r\n DataSetCSPName: TStringField;\r\n DataSetCSPVendor: TStringField;\r\n DataSetCPUName: TStringField;\r\n DataSetCPUID: TStringField;\r\n DataSetBaseBoardSerial: TStringField;\r\n DataSetHDDVolLetter: TStringField;\r\n DataSetHDDVolSerial: TStringField;\r\n DataSetSQLDB: TStringField;\r\n DataSetIPAdresse: TStringField;\r\n DataSetInstanzID: TStringField;\r\n DataSetProgrammpfad: TStringField;\r\n DataSetLocalIP: TStringField;\r\n DataSetMACAddress: TStringField;\r\n DataSetVersionsnummer: TStringField;\r\n DataSetDatenpfad: TStringField;\r\n procedure WebFormShow(Sender: TObject);\r\n procedure DataSetAfterOpen(DataSet: TDataSet);\r\n procedure btnzurueckClick(Sender: TObject);\r\n\r\n public\r\n\r\n protected procedure LoadDFMValues; override; end;\r\n\r\nvar\r\n frmLogbuch: TfrmLogbuch;\r\n\r\nimplementation\r\n uses unit1, unit2;\r\n{$R *.dfm}\r\n\r\n\r\nprocedure TfrmLogbuch.btnzurueckClick(Sender: TObject);\r\nbegin\r\n dataset.close;\r\n self.Close;\r\nend;\r\n\r\n\r\nprocedure TfrmLogbuch.DataSetAfterOpen(DataSet: TDataSet);\r\nvar\r\n i:integer;\r\n myelement:TJSHTMLElement;\r\nbegin\r\n myelement:=container3.ElementHandle;\r\n tc.ParentElement:=myelement;\r\n i:=0;\r\n TC.visible:=true;\r\n TC.ColCount:=3;\r\n tc.RowCount:=dataset.RecordCount+1;\r\n tc.Cells[0,i]:='Datum';\r\n tc.Cells[1,i]:='Programm';\r\n tc.Cells[2,i]:='Infos';\r\n dataset.First;\r\n\r\n while not dataset.eof do\r\n begin\r\n inc(i);\r\n TC.Cells[0,i]:=DataSetDatumUhrzeit.AsString;\r\n TC.Cells[1,i]:=DataSetApplicationName.AsString;\r\n TC.Cells[2,i]:=DataSetCadiaKundennummer.AsString+' | '+DataSetPCName.asstring+' | '+DataSetWindowsUserName.asstring+'
'+DataSetAbsenderzeile.AsString+'
'+DataSetVersionsdatum.AsString+' | '+DataSetVersionsnummer.asstring;\r\n dataset.Next;\r\n end;\r\n\r\nend;\r\n\r\nprocedure TfrmLogbuch.WebFormShow(Sender: TObject);\r\nvar\r\n myelement:TJSHTMLElement;\r\nbegin\r\n Container1.html.text:='';\r\n myelement:=container1.ElementHandle;\r\n btnzurueck.ParentElement:=myelement;\r\n container2.ParentElement:=myelement;\r\n Container3.ParentElement:=myelement;\r\n myelement:=container2.ElementHandle;\r\n dataset.Load;\r\nend;\r\n\r\nprocedure TfrmLogbuch.LoadDFMValues;\r\nbegin\r\n inherited LoadDFMValues;\r\n\r\n Container1 := THTMLContainer.Create(Self);\r\n Container2 := THTMLContainer.Create(Self);\r\n Container3 := THTMLContainer.Create(Self);\r\n TC := TTableControl.Create(Self);\r\n btnzurueck := TButton.Create(Self);\r\n edtSuchbegriff := TEdit.Create(Self);\r\n DataSet := TXDataWebDataSet.Create(Self);\r\n DataSetID := TIntegerField.Create(Self);\r\n DataSetDatumUhrzeit := TDateTimeField.Create(Self);\r\n DataSetApplicationCode := TStringField.Create(Self);\r\n DataSetApplicationName := TStringField.Create(Self);\r\n DataSetVersionsdatum := TDateTimeField.Create(Self);\r\n DataSetInstalCode := TStringField.Create(Self);\r\n DataSetFreischaltungVON := TDateTimeField.Create(Self);\r\n DataSetFreischaltungBIS := TDateTimeField.Create(Self);\r\n DataSetAbsenderzeile := TStringField.Create(Self);\r\n DataSetPCCode := TStringField.Create(Self);\r\n DataSetVertriebspartner := TIntegerField.Create(Self);\r\n DataSetLetzterStart := TDateTimeField.Create(Self);\r\n DataSetAnzahlStart := TIntegerField.Create(Self);\r\n DataSetDatumUhrzeitUser := TDateTimeField.Create(Self);\r\n DataSetWindowsUserName := TStringField.Create(Self);\r\n DataSetCadiaKundennummer := TStringField.Create(Self);\r\n DataSetPCName := TStringField.Create(Self);\r\n DataSetAvIsTrial := TBooleanField.Create(Self);\r\n DataSetAvAuthorized := TBooleanField.Create(Self);\r\n DataSetAvRegistered := TBooleanField.Create(Self);\r\n DataSetAvExpired := TBooleanField.Create(Self);\r\n DataSetSysNachname := TStringField.Create(Self);\r\n DataSetSysVorname := TStringField.Create(Self);\r\n DataSetNetzwerk := TBooleanField.Create(Self);\r\n DataSetDBKEY := TStringField.Create(Self);\r\n DataSetVerarbeitung := TStringField.Create(Self);\r\n DataSetCadiaModSumme := TFloatField.Create(Self);\r\n DataSetASPVersion := TStringField.Create(Self);\r\n DataSetCSPName := TStringField.Create(Self);\r\n DataSetCSPVendor := TStringField.Create(Self);\r\n DataSetCPUName := TStringField.Create(Self);\r\n DataSetCPUID := TStringField.Create(Self);\r\n DataSetBaseBoardSerial := TStringField.Create(Self);\r\n DataSetHDDVolLetter := TStringField.Create(Self);\r\n DataSetHDDVolSerial := TStringField.Create(Self);\r\n DataSetSQLDB := TStringField.Create(Self);\r\n DataSetIPAdresse := TStringField.Create(Self);\r\n DataSetInstanzID := TStringField.Create(Self);\r\n DataSetProgrammpfad := TStringField.Create(Self);\r\n DataSetLocalIP := TStringField.Create(Self);\r\n DataSetMACAddress := TStringField.Create(Self);\r\n DataSetVersionsnummer := TStringField.Create(Self);\r\n DataSetDatenpfad := TStringField.Create(Self);\r\n Source := TDataSource.Create(Self);\r\n\r\n Container1.BeforeLoadDFMValues;\r\n Container2.BeforeLoadDFMValues;\r\n Container3.BeforeLoadDFMValues;\r\n TC.BeforeLoadDFMValues;\r\n btnzurueck.BeforeLoadDFMValues;\r\n edtSuchbegriff.BeforeLoadDFMValues;\r\n DataSet.BeforeLoadDFMValues;\r\n DataSetID.BeforeLoadDFMValues;\r\n DataSetDatumUhrzeit.BeforeLoadDFMValues;\r\n DataSetApplicationCode.BeforeLoadDFMValues;\r\n DataSetApplicationName.BeforeLoadDFMValues;\r\n DataSetVersionsdatum.BeforeLoadDFMValues;\r\n DataSetInstalCode.BeforeLoadDFMValues;\r\n DataSetFreischaltungVON.BeforeLoadDFMValues;\r\n DataSetFreischaltungBIS.BeforeLoadDFMValues;\r\n DataSetAbsenderzeile.BeforeLoadDFMValues;\r\n DataSetPCCode.BeforeLoadDFMValues;\r\n DataSetVertriebspartner.BeforeLoadDFMValues;\r\n DataSetLetzterStart.BeforeLoadDFMValues;\r\n DataSetAnzahlStart.BeforeLoadDFMValues;\r\n DataSetDatumUhrzeitUser.BeforeLoadDFMValues;\r\n DataSetWindowsUserName.BeforeLoadDFMValues;\r\n DataSetCadiaKundennummer.BeforeLoadDFMValues;\r\n DataSetPCName.BeforeLoadDFMValues;\r\n DataSetAvIsTrial.BeforeLoadDFMValues;\r\n DataSetAvAuthorized.BeforeLoadDFMValues;\r\n DataSetAvRegistered.BeforeLoadDFMValues;\r\n DataSetAvExpired.BeforeLoadDFMValues;\r\n DataSetSysNachname.BeforeLoadDFMValues;\r\n DataSetSysVorname.BeforeLoadDFMValues;\r\n DataSetNetzwerk.BeforeLoadDFMValues;\r\n DataSetDBKEY.BeforeLoadDFMValues;\r\n DataSetVerarbeitung.BeforeLoadDFMValues;\r\n DataSetCadiaModSumme.BeforeLoadDFMValues;\r\n DataSetASPVersion.BeforeLoadDFMValues;\r\n DataSetCSPName.BeforeLoadDFMValues;\r\n DataSetCSPVendor.BeforeLoadDFMValues;\r\n DataSetCPUName.BeforeLoadDFMValues;\r\n DataSetCPUID.BeforeLoadDFMValues;\r\n DataSetBaseBoardSerial.BeforeLoadDFMValues;\r\n DataSetHDDVolLetter.BeforeLoadDFMValues;\r\n DataSetHDDVolSerial.BeforeLoadDFMValues;\r\n DataSetSQLDB.BeforeLoadDFMValues;\r\n DataSetIPAdresse.BeforeLoadDFMValues;\r\n DataSetInstanzID.BeforeLoadDFMValues;\r\n DataSetProgrammpfad.BeforeLoadDFMValues;\r\n DataSetLocalIP.BeforeLoadDFMValues;\r\n DataSetMACAddress.BeforeLoadDFMValues;\r\n DataSetVersionsnummer.BeforeLoadDFMValues;\r\n DataSetDatenpfad.BeforeLoadDFMValues;\r\n Source.BeforeLoadDFMValues;\r\n try\r\n Name := 'frmLogbuch';\r\n Width := 223;\r\n Height := 376;\r\n CSSLibrary := cssBootstrap;\r\n ElementFont := efCSS;\r\n SetEvent(Self, 'OnShow', 'WebFormShow');\r\n Container1.SetParentComponent(Self);\r\n Container1.Name := 'Container1';\r\n Container1.Left := 0;\r\n Container1.Top := 0;\r\n Container1.Width := 169;\r\n Container1.Height := 41;\r\n Container1.HeightStyle := ssAuto;\r\n Container1.WidthStyle := ssPercent;\r\n Container1.ElementFont := efCSS;\r\n Container1.ElementPosition := epIgnore;\r\n Container2.SetParentComponent(Self);\r\n Container2.Name := 'Container2';\r\n Container2.Left := 0;\r\n Container2.Top := 47;\r\n Container2.Width := 169;\r\n Container2.Height := 41;\r\n Container2.ElementClassName := 'd-flex flex-wrap m-1 border border-info';\r\n Container2.HeightStyle := ssAuto;\r\n Container2.WidthStyle := ssAuto;\r\n Container2.ChildOrder := 1;\r\n Container2.ElementFont := efCSS;\r\n Container2.ElementPosition := epIgnore;\r\n Container3.SetParentComponent(Self);\r\n Container3.Name := 'Container3';\r\n Container3.Left := 0;\r\n Container3.Top := 94;\r\n Container3.Width := 169;\r\n Container3.Height := 41;\r\n Container3.ElementClassName := 'd-flex m-1';\r\n Container3.HeightStyle := ssAuto;\r\n Container3.WidthStyle := ssAuto;\r\n Container3.ChildOrder := 2;\r\n Container3.ElementFont := efCSS;\r\n Container3.ElementPosition := epIgnore;\r\n TC.SetParentComponent(Self);\r\n TC.Name := 'TC';\r\n TC.Left := 0;\r\n TC.Top := 141;\r\n TC.Width := 169;\r\n TC.Height := 79;\r\n TC.ElementClassName := 'table table-hover table-bordered table-striped';\r\n TC.HeightStyle := ssAuto;\r\n TC.WidthStyle := ssPercent;\r\n TC.BorderColor := clSilver;\r\n TC.ChildOrder := 3;\r\n TC.ColHeader := False;\r\n TC.ElementFont := efCSS;\r\n TC.ElementHeaderClassName := 'table-info';\r\n TC.ElementPosition := epIgnore;\r\n TC.ElementTableClassName := 'table table-hover table-bordered table-striped';\r\n TC.WordWrap := True;\r\n TC.ColCount := 1;\r\n TC.RowCount := 5;\r\n btnzurueck.SetParentComponent(Self);\r\n btnzurueck.Name := 'btnzurueck';\r\n btnzurueck.Left := 0;\r\n btnzurueck.Top := 226;\r\n btnzurueck.Width := 96;\r\n btnzurueck.Height := 25;\r\n btnzurueck.Caption := '<< zur'#252'ck';\r\n btnzurueck.ChildOrder := 4;\r\n btnzurueck.ElementClassName := 'btn btn-info btn-sm m-1 text-left';\r\n btnzurueck.ElementFont := efCSS;\r\n btnzurueck.ElementPosition := epIgnore;\r\n btnzurueck.HeightStyle := ssAuto;\r\n btnzurueck.HeightPercent := 100.000000000000000000;\r\n btnzurueck.WidthStyle := ssAuto;\r\n btnzurueck.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnzurueck, Self, 'OnClick', 'btnzurueckClick');\r\n edtSuchbegriff.SetParentComponent(Self);\r\n edtSuchbegriff.Name := 'edtSuchbegriff';\r\n edtSuchbegriff.Left := 8;\r\n edtSuchbegriff.Top := 296;\r\n edtSuchbegriff.Width := 150;\r\n edtSuchbegriff.Height := 22;\r\n edtSuchbegriff.ChildOrder := 6;\r\n edtSuchbegriff.ElementClassName := 'form-control input-sm m-1';\r\n edtSuchbegriff.ElementFont := efCSS;\r\n edtSuchbegriff.ElementPosition := epIgnore;\r\n edtSuchbegriff.HeightStyle := ssAuto;\r\n edtSuchbegriff.HeightPercent := 100.000000000000000000;\r\n edtSuchbegriff.ShowHint := True;\r\n edtSuchbegriff.TextHint := 'Suchbegriff eingeben';\r\n edtSuchbegriff.WidthPercent := 60.000000000000000000;\r\n DataSet.SetParentComponent(Self);\r\n DataSet.Name := 'DataSet';\r\n DataSet.AfterOpen := DataSetAfterOpen;\r\n DataSet.EntitySetName := 'Logbuch';\r\n DataSet.Connection := DM2.XDataWebConnection1;\r\n DataSet.QueryString := '$orderby=ID DESC';\r\n DataSet.QueryTop := 100;\r\n DataSet.Left := 8;\r\n DataSet.Top := 56;\r\n DataSetID.SetParentComponent(DataSet);\r\n DataSetID.Name := 'DataSetID';\r\n DataSetID.FieldName := 'ID';\r\n DataSetID.Required := True;\r\n DataSetDatumUhrzeit.SetParentComponent(DataSet);\r\n DataSetDatumUhrzeit.Name := 'DataSetDatumUhrzeit';\r\n DataSetDatumUhrzeit.FieldName := 'DatumUhrzeit';\r\n DataSetApplicationCode.SetParentComponent(DataSet);\r\n DataSetApplicationCode.Name := 'DataSetApplicationCode';\r\n DataSetApplicationCode.FieldName := 'ApplicationCode';\r\n DataSetApplicationCode.Size := 25;\r\n DataSetApplicationName.SetParentComponent(DataSet);\r\n DataSetApplicationName.Name := 'DataSetApplicationName';\r\n DataSetApplicationName.FieldName := 'ApplicationName';\r\n DataSetApplicationName.Size := 50;\r\n DataSetVersionsdatum.SetParentComponent(DataSet);\r\n DataSetVersionsdatum.Name := 'DataSetVersionsdatum';\r\n DataSetVersionsdatum.FieldName := 'Versionsdatum';\r\n DataSetInstalCode.SetParentComponent(DataSet);\r\n DataSetInstalCode.Name := 'DataSetInstalCode';\r\n DataSetInstalCode.FieldName := 'InstalCode';\r\n DataSetInstalCode.Size := 25;\r\n DataSetFreischaltungVON.SetParentComponent(DataSet);\r\n DataSetFreischaltungVON.Name := 'DataSetFreischaltungVON';\r\n DataSetFreischaltungVON.FieldName := 'FreischaltungVON';\r\n DataSetFreischaltungBIS.SetParentComponent(DataSet);\r\n DataSetFreischaltungBIS.Name := 'DataSetFreischaltungBIS';\r\n DataSetFreischaltungBIS.FieldName := 'FreischaltungBIS';\r\n DataSetAbsenderzeile.SetParentComponent(DataSet);\r\n DataSetAbsenderzeile.Name := 'DataSetAbsenderzeile';\r\n DataSetAbsenderzeile.FieldName := 'Absenderzeile';\r\n DataSetAbsenderzeile.Size := 100;\r\n DataSetPCCode.SetParentComponent(DataSet);\r\n DataSetPCCode.Name := 'DataSetPCCode';\r\n DataSetPCCode.FieldName := 'PCCode';\r\n DataSetPCCode.Size := 25;\r\n DataSetVertriebspartner.SetParentComponent(DataSet);\r\n DataSetVertriebspartner.Name := 'DataSetVertriebspartner';\r\n DataSetVertriebspartner.FieldName := 'Vertriebspartner';\r\n DataSetLetzterStart.SetParentComponent(DataSet);\r\n DataSetLetzterStart.Name := 'DataSetLetzterStart';\r\n DataSetLetzterStart.FieldName := 'LetzterStart';\r\n DataSetAnzahlStart.SetParentComponent(DataSet);\r\n DataSetAnzahlStart.Name := 'DataSetAnzahlStart';\r\n DataSetAnzahlStart.FieldName := 'AnzahlStart';\r\n DataSetDatumUhrzeitUser.SetParentComponent(DataSet);\r\n DataSetDatumUhrzeitUser.Name := 'DataSetDatumUhrzeitUser';\r\n DataSetDatumUhrzeitUser.FieldName := 'DatumUhrzeitUser';\r\n DataSetWindowsUserName.SetParentComponent(DataSet);\r\n DataSetWindowsUserName.Name := 'DataSetWindowsUserName';\r\n DataSetWindowsUserName.FieldName := 'WindowsUserName';\r\n DataSetWindowsUserName.Size := 100;\r\n DataSetCadiaKundennummer.SetParentComponent(DataSet);\r\n DataSetCadiaKundennummer.Name := 'DataSetCadiaKundennummer';\r\n DataSetCadiaKundennummer.FieldName := 'CadiaKundennummer';\r\n DataSetCadiaKundennummer.Size := 13;\r\n DataSetPCName.SetParentComponent(DataSet);\r\n DataSetPCName.Name := 'DataSetPCName';\r\n DataSetPCName.FieldName := 'PCName';\r\n DataSetPCName.Size := 50;\r\n DataSetAvIsTrial.SetParentComponent(DataSet);\r\n DataSetAvIsTrial.Name := 'DataSetAvIsTrial';\r\n DataSetAvIsTrial.FieldName := 'AvIsTrial';\r\n DataSetAvAuthorized.SetParentComponent(DataSet);\r\n DataSetAvAuthorized.Name := 'DataSetAvAuthorized';\r\n DataSetAvAuthorized.FieldName := 'AvAuthorized';\r\n DataSetAvRegistered.SetParentComponent(DataSet);\r\n DataSetAvRegistered.Name := 'DataSetAvRegistered';\r\n DataSetAvRegistered.FieldName := 'AvRegistered';\r\n DataSetAvExpired.SetParentComponent(DataSet);\r\n DataSetAvExpired.Name := 'DataSetAvExpired';\r\n DataSetAvExpired.FieldName := 'AvExpired';\r\n DataSetSysNachname.SetParentComponent(DataSet);\r\n DataSetSysNachname.Name := 'DataSetSysNachname';\r\n DataSetSysNachname.FieldName := 'SysNachname';\r\n DataSetSysNachname.Size := 40;\r\n DataSetSysVorname.SetParentComponent(DataSet);\r\n DataSetSysVorname.Name := 'DataSetSysVorname';\r\n DataSetSysVorname.FieldName := 'SysVorname';\r\n DataSetSysVorname.Size := 40;\r\n DataSetNetzwerk.SetParentComponent(DataSet);\r\n DataSetNetzwerk.Name := 'DataSetNetzwerk';\r\n DataSetNetzwerk.FieldName := 'Netzwerk';\r\n DataSetDBKEY.SetParentComponent(DataSet);\r\n DataSetDBKEY.Name := 'DataSetDBKEY';\r\n DataSetDBKEY.FieldName := 'DBKEY';\r\n DataSetDBKEY.Size := 50;\r\n DataSetVerarbeitung.SetParentComponent(DataSet);\r\n DataSetVerarbeitung.Name := 'DataSetVerarbeitung';\r\n DataSetVerarbeitung.FieldName := 'Verarbeitung';\r\n DataSetVerarbeitung.Size := 1;\r\n DataSetCadiaModSumme.SetParentComponent(DataSet);\r\n DataSetCadiaModSumme.Name := 'DataSetCadiaModSumme';\r\n DataSetCadiaModSumme.FieldName := 'CadiaModSumme';\r\n DataSetASPVersion.SetParentComponent(DataSet);\r\n DataSetASPVersion.Name := 'DataSetASPVersion';\r\n DataSetASPVersion.FieldName := 'ASPVersion';\r\n DataSetASPVersion.Size := 10;\r\n DataSetCSPName.SetParentComponent(DataSet);\r\n DataSetCSPName.Name := 'DataSetCSPName';\r\n DataSetCSPName.FieldName := 'CSPName';\r\n DataSetCSPName.Size := 50;\r\n DataSetCSPVendor.SetParentComponent(DataSet);\r\n DataSetCSPVendor.Name := 'DataSetCSPVendor';\r\n DataSetCSPVendor.FieldName := 'CSPVendor';\r\n DataSetCSPVendor.Size := 50;\r\n DataSetCPUName.SetParentComponent(DataSet);\r\n DataSetCPUName.Name := 'DataSetCPUName';\r\n DataSetCPUName.FieldName := 'CPUName';\r\n DataSetCPUName.Size := 50;\r\n DataSetCPUID.SetParentComponent(DataSet);\r\n DataSetCPUID.Name := 'DataSetCPUID';\r\n DataSetCPUID.FieldName := 'CPUID';\r\n DataSetCPUID.Size := 50;\r\n DataSetBaseBoardSerial.SetParentComponent(DataSet);\r\n DataSetBaseBoardSerial.Name := 'DataSetBaseBoardSerial';\r\n DataSetBaseBoardSerial.FieldName := 'BaseBoardSerial';\r\n DataSetBaseBoardSerial.Size := 50;\r\n DataSetHDDVolLetter.SetParentComponent(DataSet);\r\n DataSetHDDVolLetter.Name := 'DataSetHDDVolLetter';\r\n DataSetHDDVolLetter.FieldName := 'HDDVolLetter';\r\n DataSetHDDVolLetter.Size := 50;\r\n DataSetHDDVolSerial.SetParentComponent(DataSet);\r\n DataSetHDDVolSerial.Name := 'DataSetHDDVolSerial';\r\n DataSetHDDVolSerial.FieldName := 'HDDVolSerial';\r\n DataSetHDDVolSerial.Size := 50;\r\n DataSetSQLDB.SetParentComponent(DataSet);\r\n DataSetSQLDB.Name := 'DataSetSQLDB';\r\n DataSetSQLDB.FieldName := 'SQLDB';\r\n DataSetSQLDB.Size := 1;\r\n DataSetIPAdresse.SetParentComponent(DataSet);\r\n DataSetIPAdresse.Name := 'DataSetIPAdresse';\r\n DataSetIPAdresse.FieldName := 'IPAdresse';\r\n DataSetIPAdresse.Size := 50;\r\n DataSetInstanzID.SetParentComponent(DataSet);\r\n DataSetInstanzID.Name := 'DataSetInstanzID';\r\n DataSetInstanzID.FieldName := 'InstanzID';\r\n DataSetInstanzID.Size := 50;\r\n DataSetProgrammpfad.SetParentComponent(DataSet);\r\n DataSetProgrammpfad.Name := 'DataSetProgrammpfad';\r\n DataSetProgrammpfad.FieldName := 'Programmpfad';\r\n DataSetProgrammpfad.Size := 255;\r\n DataSetLocalIP.SetParentComponent(DataSet);\r\n DataSetLocalIP.Name := 'DataSetLocalIP';\r\n DataSetLocalIP.FieldName := 'LocalIP';\r\n DataSetLocalIP.Size := 50;\r\n DataSetMACAddress.SetParentComponent(DataSet);\r\n DataSetMACAddress.Name := 'DataSetMACAddress';\r\n DataSetMACAddress.FieldName := 'MACAddress';\r\n DataSetMACAddress.Size := 50;\r\n DataSetVersionsnummer.SetParentComponent(DataSet);\r\n DataSetVersionsnummer.Name := 'DataSetVersionsnummer';\r\n DataSetVersionsnummer.FieldName := 'Versionsnummer';\r\n DataSetDatenpfad.SetParentComponent(DataSet);\r\n DataSetDatenpfad.Name := 'DataSetDatenpfad';\r\n DataSetDatenpfad.FieldName := 'Datenpfad';\r\n DataSetDatenpfad.Size := 255;\r\n Source.SetParentComponent(Self);\r\n Source.Name := 'Source';\r\n Source.DataSet := DataSet;\r\n Source.Left := 56;\r\n Source.Top := 56;\r\n finally\r\n Container1.AfterLoadDFMValues;\r\n Container2.AfterLoadDFMValues;\r\n Container3.AfterLoadDFMValues;\r\n TC.AfterLoadDFMValues;\r\n btnzurueck.AfterLoadDFMValues;\r\n edtSuchbegriff.AfterLoadDFMValues;\r\n DataSet.AfterLoadDFMValues;\r\n DataSetID.AfterLoadDFMValues;\r\n DataSetDatumUhrzeit.AfterLoadDFMValues;\r\n DataSetApplicationCode.AfterLoadDFMValues;\r\n DataSetApplicationName.AfterLoadDFMValues;\r\n DataSetVersionsdatum.AfterLoadDFMValues;\r\n DataSetInstalCode.AfterLoadDFMValues;\r\n DataSetFreischaltungVON.AfterLoadDFMValues;\r\n DataSetFreischaltungBIS.AfterLoadDFMValues;\r\n DataSetAbsenderzeile.AfterLoadDFMValues;\r\n DataSetPCCode.AfterLoadDFMValues;\r\n DataSetVertriebspartner.AfterLoadDFMValues;\r\n DataSetLetzterStart.AfterLoadDFMValues;\r\n DataSetAnzahlStart.AfterLoadDFMValues;\r\n DataSetDatumUhrzeitUser.AfterLoadDFMValues;\r\n DataSetWindowsUserName.AfterLoadDFMValues;\r\n DataSetCadiaKundennummer.AfterLoadDFMValues;\r\n DataSetPCName.AfterLoadDFMValues;\r\n DataSetAvIsTrial.AfterLoadDFMValues;\r\n DataSetAvAuthorized.AfterLoadDFMValues;\r\n DataSetAvRegistered.AfterLoadDFMValues;\r\n DataSetAvExpired.AfterLoadDFMValues;\r\n DataSetSysNachname.AfterLoadDFMValues;\r\n DataSetSysVorname.AfterLoadDFMValues;\r\n DataSetNetzwerk.AfterLoadDFMValues;\r\n DataSetDBKEY.AfterLoadDFMValues;\r\n DataSetVerarbeitung.AfterLoadDFMValues;\r\n DataSetCadiaModSumme.AfterLoadDFMValues;\r\n DataSetASPVersion.AfterLoadDFMValues;\r\n DataSetCSPName.AfterLoadDFMValues;\r\n DataSetCSPVendor.AfterLoadDFMValues;\r\n DataSetCPUName.AfterLoadDFMValues;\r\n DataSetCPUID.AfterLoadDFMValues;\r\n DataSetBaseBoardSerial.AfterLoadDFMValues;\r\n DataSetHDDVolLetter.AfterLoadDFMValues;\r\n DataSetHDDVolSerial.AfterLoadDFMValues;\r\n DataSetSQLDB.AfterLoadDFMValues;\r\n DataSetIPAdresse.AfterLoadDFMValues;\r\n DataSetInstanzID.AfterLoadDFMValues;\r\n DataSetProgrammpfad.AfterLoadDFMValues;\r\n DataSetLocalIP.AfterLoadDFMValues;\r\n DataSetMACAddress.AfterLoadDFMValues;\r\n DataSetVersionsnummer.AfterLoadDFMValues;\r\n DataSetDatenpfad.AfterLoadDFMValues;\r\n Source.AfterLoadDFMValues;\r\n end;\r\nend;\r\n\r\nend.\r\n","unit unit_Inventur;\r\n\r\ninterface\r\n\r\nuses\r\n System.SysUtils, System.Classes, JS, Web, WEBLib.Graphics, WEBLib.Controls,\r\n WEBLib.Forms, WEBLib.Dialogs, Data.DB, WEBLib.DB, XData.Web.JsonDataset,\r\n XData.Web.Dataset, XData.Web.Connection, Vcl.Controls, Vcl.StdCtrls,\r\n WEBLib.StdCtrls, WEBLib.ExtCtrls, Vcl.Grids, WEBLib.DBCtrls, VCL.TMSFNCTypes,\r\n VCL.TMSFNCUtils, VCL.TMSFNCGraphics, VCL.TMSFNCGraphicsTypes,\r\n VCL.TMSFNCCustomControl, VCL.TMSFNCTableView, WEBLib.Buttons, WEBLib.Grids,\r\n WEBLib.FlexControls, WEBLib.WebCtrls, DB;\r\n\r\ntype\r\n TfrmInventur = class(TForm)\r\n xdsInventurERF: TXDataWebDataSet;\r\n Container1: THTMLContainer;\r\n Container2: THTMLContainer;\r\n Container3: THTMLContainer;\r\n xdsInventuren: TXDataWebDataSet;\r\n xdsInventurenInventurDatum: TDateTimeField;\r\n xdsInventurenBearbeitung: TStringField;\r\n labelinventuren: TLabel;\r\n btnzurueck: TButton;\r\n xdsInventurERFArtikelnummer: TXDataWebEntityField;\r\n xdsInventurERFLager: TXDataWebEntityField;\r\n xdsInventurERFInventurdatum: TDateTimeField;\r\n xdsInventurERFArtikelueberschrift: TStringField;\r\n xdsInventurERFArtikelbeschreibung: TStringField;\r\n xdsInventurERFBestand: TFloatField;\r\n xdsInventurERFBemerkung: TStringField;\r\n xdsInventurERFLetzterEK: TFloatField;\r\n xdsInventurERFDurchschnittEK: TFloatField;\r\n xdsInventurERFBenutzergeaendert: TStringField;\r\n xdsInventurERFDatumgeaendert: TDateTimeField;\r\n xdsInventurERFArtikelEK: TFloatField;\r\n xdsInventurERFBuchbestand: TFloatField;\r\n xdsInventurERFBuchbestandswert: TFloatField;\r\n xdsInventurERFDifferenzBestand: TFloatField;\r\n xdsInventurERFNeuerBestandswert: TFloatField;\r\n xdsInventurERFKorrekturDatum: TDateTimeField;\r\n xdsInventurERFDifferenzBestandswert: TFloatField;\r\n xdsLager: TXDataWebDataSet;\r\n xdsLagerLager: TStringField;\r\n ComboLager: TComboBox;\r\n Container4: THTMLContainer;\r\n btnScan: TButton;\r\n edtSuchbegriff: TEdit;\r\n DataSet: TXDataWebDataSet;\r\n DataSetArtikelnummer: TStringField;\r\n DataSetArtikelueberschrift: TStringField;\r\n DataSetArtikelbeschreibung: TStringField;\r\n DataSetVerkaufspreis: TFloatField;\r\n DataSetBestand: TFloatField;\r\n DataSetArtikelmatchcode: TStringField;\r\n DataSetEAN: TStringField;\r\n edtMenge: TEdit;\r\n btnSpeichern: TButton;\r\n TCErfassung: TTableControl;\r\n TCLetzte10: TTableControl;\r\n LabelLetzteErfassungen: TLabel;\r\n xdsInventurERFArtikelnummerArtikelnummer: TStringField;\r\n xdsInventurERFLagerLager: TStringField;\r\n labelsuchergebnis: TLabel;\r\n DataSetEinkaufspreis: TFloatField;\r\n XDSNEU: TXDataWebDataSet;\r\n XDSNEUArtikelnummer: TXDataWebEntityField;\r\n XDSNEULager: TXDataWebEntityField;\r\n XDSNEUInventurdatum: TDateTimeField;\r\n XDSNEUArtikelueberschrift: TStringField;\r\n XDSNEUArtikelbeschreibung: TStringField;\r\n XDSNEUBestand: TFloatField;\r\n XDSNEUBemerkung: TStringField;\r\n XDSNEULetzterEK: TFloatField;\r\n XDSNEUDurchschnittEK: TFloatField;\r\n XDSNEUBenutzergeaendert: TStringField;\r\n XDSNEUDatumgeaendert: TDateTimeField;\r\n XDSNEUArtikelEK: TFloatField;\r\n XDSNEUBuchbestand: TFloatField;\r\n XDSNEUBuchbestandswert: TFloatField;\r\n XDSNEUDifferenzBestand: TFloatField;\r\n XDSNEUNeuerBestandswert: TFloatField;\r\n XDSNEUKorrekturDatum: TDateTimeField;\r\n XDSNEUDifferenzBestandswert: TFloatField;\r\n procedure WebFormShow(Sender: TObject);\r\n procedure xdsInventurERFAfterOpen(DataSet: TDataSet);\r\n procedure xdsInventurenAfterOpen(DataSet: TDataSet);\r\n procedure btnzurueckClick(Sender: TObject);\r\n procedure xdsLagerAfterOpen(DataSet: TDataSet);\r\n procedure edtSuchbegriffChange(Sender: TObject);\r\n procedure btnScanClick(Sender: TObject);\r\n procedure DataSetAfterOpen(DataSet: TDataSet);\r\n procedure btnSpeichernClick(Sender: TObject);\r\n procedure XDSNEUAfterPost(DataSet: TDataSet);\r\n procedure XDSNEUAfterApplyUpdates(Sender: TDataSet; Info: TResolveResults);\r\n procedure XDSNEUAfterOpen(DataSet: TDataSet);\r\n\r\n public\r\n myInventurDatum:TDateTime;\r\n protected procedure LoadDFMValues; override; end;\r\n\r\nvar\r\n frmInventur: TfrmInventur;\r\n\r\nimplementation\r\n uses unit1, unit2, unit_BarcodeScan;\r\n{$R *.dfm}\r\n\r\n\r\nprocedure TfrmInventur.btnScanClick(Sender: TObject);\r\nvar\r\n LFrm:TBarcodeScan;\r\n procedure AfterCreate(AForm:TObject);\r\n var\r\n LForm:TBarcodeScan;\r\n begin\r\n LForm:=(AForm as TBarcodeScan);\r\n //lform.mykundehint:=xdsEinzelkontaktKundennummer.AsString+' '+xdsEinzelkontaktNachname.AsString+', '+xdsEinzelkontaktVorname.asstring;\r\n //lForm.edttoaddress.Text:= xdsEinzelkontaktPostleitzahl.AsString+' '+xdsEinzelkontaktort.AsString+', '+xdsEinzelkontaktStrasse.AsString;\r\n\r\n end;\r\n\r\n procedure AfterShowmodal(Avalue:TModalResult);\r\n begin\r\n edtsuchbegriff.text:=trim(lfrm.ScanErgebnis);\r\n edtsuchbegriffChange(self);\r\n end;\r\n begin\r\n if LizenzOK then\r\n begin\r\n LFrm:=TBarcodeScan.CreateNew(@AfterCreate);\r\n LFrm.ShowModal(@AfterShowmodal);\r\n end\r\n else\r\n begin\r\n showmessage('Für diese Funktion sind Sie noch nicht freigeschaltet, bitte erwerben Sie eine Lizenz');\r\n end;\r\n\r\nend;\r\n\r\nprocedure TfrmInventur.btnSpeichernClick(Sender: TObject);\r\nvar\r\n mymenge:double;\r\nbegin\r\n if edtMenge.Text='' then\r\n begin\r\n showmessage('Menge muß angegeben werden');\r\n exit;\r\n end;\r\n if TryStrToFloat(edtMenge.Text,mymenge)=false then\r\n begin\r\n showmessage('Keine korrekte Mengenangabe');\r\n exit;\r\n end;\r\n if edtSuchbegriff.Text='' then\r\n begin\r\n showmessage('Kein Artikel angegeben');\r\n exit;\r\n end;\r\n if ComboLager.Text='' then\r\n begin\r\n showmessage('Kein Lager angegeben');\r\n exit;\r\n end;\r\n if xdsLager.Locate('Lager', combolager.Text,[])=false then\r\n begin\r\n showmessage('Ungültiges Lager ausgewählt');\r\n exit;\r\n end;\r\n if DataSetArtikelnummer.AsString<>edtSuchbegriff.text then\r\n begin\r\n showmessage('Der Artikel ist nicht angegeben');\r\n exit;\r\n end;\r\n xdsNEU.Append;\r\n xdsNEUArtikelnummer.Value:=DataSet.CurrentData;\r\n xdsNEULager.Value:=xdsLager.CurrentData;\r\n //xdsInventurERFArtikelnummerArtikelnummer.AsString:=DataSetArtikelnummer.AsString;\r\n xdsNEUInventurdatum.AsDateTime:=myInventurDatum;\r\n xdsNEUArtikelueberschrift.AsString:=DataSetArtikelueberschrift.AsString;\r\n xdsNEUArtikelbeschreibung.AsString:=DataSetArtikelbeschreibung.AsString;\r\n xdsNEUBestand.AsFloat:=mymenge;\r\n xdsNEULetzterEK.AsFloat:=DataSetEinkaufspreis.AsFloat;\r\n xdsNEUDurchschnittEK.AsFloat:=0;\r\n xdsNEUBuchbestand.AsFloat:=0;\r\n xdsNEUBuchbestandswert.AsFloat:=0;\r\n xdsNEUDatumgeaendert.AsDateTime:=date+time;\r\n xdsNEUBenutzergeaendert.AsString:=BenutzerLoginName;\r\n xdsNEU.Post;\r\n\r\nend;\r\n\r\nprocedure TfrmInventur.btnzurueckClick(Sender: TObject);\r\nbegin\r\n xdsInventuren.Close;\r\n self.close;\r\nend;\r\n\r\nprocedure TfrmInventur.DataSetAfterOpen(DataSet: TDataSet);\r\nbegin\r\n btnspeichern.Enabled:=false;\r\n if DataSet.RecordCount<1 then\r\n begin\r\n labelsuchergebnis.Caption:='Artikel nicht gefunden';\r\n end;\r\n if DataSet.RecordCount=1 then\r\n begin\r\n labelsuchergebnis.Caption:='Artikel gefunden: '+DataSetArtikelueberschrift.asstring;\r\n btnspeichern.Enabled:=true;\r\n edtMenge.SetFocus;\r\n end;\r\n if DataSet.RecordCount>1 then\r\n begin\r\n labelsuchergebnis.Caption:='mehrere Übereinstimmungen';\r\n end;\r\nend;\r\n\r\nprocedure TfrmInventur.edtSuchbegriffChange(Sender: TObject);\r\nvar\r\n suchtext:string;\r\nbegin\r\n suchtext:=trim(edtsuchbegriff.Text);\r\n if length(suchtext)>0 then\r\n begin\r\n dataset.Close;\r\n dataset.QueryTop:=21;\r\n dataset.QueryString:='$filter=(Artikelnummer eq '+quotedstr(suchtext)+') OR (EAN eq '+quotedstr(suchtext)+')';\r\n dataset.Load;\r\n end;\r\nend;\r\n\r\nprocedure TfrmInventur.WebFormShow(Sender: TObject);\r\nbegin\r\n myInventurDatum:=encodedate(2000,1,1);\r\n xdsLager.Load;\r\n\r\nend;\r\n\r\nprocedure TfrmInventur.xdsInventurERFAfterOpen(DataSet: TDataSet);\r\nvar\r\n i:integer;\r\nbegin\r\n i:=0;\r\n TCLetzte10.RowCount:=xdsInventurERF.RecordCount+2;\r\n TCLetzte10.ColCount:=4;\r\n TCLetzte10.Cells[0,i]:='Lager';\r\n TCLetzte10.Cells[1,i]:='Artikelnummer';\r\n TCLetzte10.Cells[2,i]:='Artikelbezeichnung';\r\n TCLetzte10.Cells[3,i]:='Menge';\r\n\r\n xdsInventurERF.First;\r\n while not xdsinventurerf.eof do\r\n begin\r\n inc(i);\r\n TCLetzte10.Cells[0,i]:=xdsInventurERFLagerLager.AsString;\r\n TCLetzte10.Cells[1,i]:=xdsInventurERFArtikelnummerArtikelnummer.AsString;\r\n TCLetzte10.Cells[2,i]:=xdsInventurERFArtikelueberschrift.AsString;\r\n TCLetzte10.Cells[3,i]:=xdsInventurERFBestand.AsString;\r\n xdsinventurerf.Next;\r\n end;\r\nend;\r\n\r\nprocedure TfrmInventur.xdsLagerAfterOpen(DataSet: TDataSet);\r\nbegin\r\n comboLager.Items.Clear;\r\n xdslager.First;\r\n while not xdslager.eof do\r\n begin\r\n combolager.Items.add(xdsLagerLager.asstring);\r\n xdslager.Next;\r\n end;\r\n comboLager.Visible:=false;\r\n comboLager.Text:='[-]';\r\n xdsNeu.Load;\r\n\r\nend;\r\n\r\nprocedure TfrmInventur.XDSNEUAfterApplyUpdates(Sender: TDataSet;\r\n Info: TResolveResults);\r\n var\r\n i:integer;\r\nbegin\r\n for i := 0 to High(info.Records) do\r\n begin\r\n if info.Records[i].Error<>'' then showmessage(info.Records[i].Error);\r\n end;\r\n if info.Records[0].Error='' then\r\n begin\r\n xdsInventurERF.Close;\r\n edtMenge.Text:='';\r\n edtSuchbegriff.Text:='';\r\n edtsuchbegriff.SetFocus;\r\n xdsinventurerf.Load;\r\n end;\r\nend;\r\n\r\nprocedure TfrmInventur.XDSNEUAfterOpen(DataSet: TDataSet);\r\nbegin\r\n xdsInventuren.Load;\r\nend;\r\n\r\nprocedure TfrmInventur.XDSNEUAfterPost(DataSet: TDataSet);\r\nbegin\r\n xdsNEU.ApplyUpdates;\r\nend;\r\n\r\nprocedure TfrmInventur.xdsInventurenAfterOpen(DataSet: TDataSet);\r\nvar\r\n myelement:TJSHTMLElement;\r\nbegin\r\n\r\n if xdsInventuren.RecordCount>0 then\r\n begin\r\n if xdsInventurenBearbeitung.AsString='aktiv' then\r\n begin\r\n myInventurDatum:=xdsInventurenInventurDatum.AsDateTime;\r\n labelinventuren.Caption:='Inventurdatum: '+formatdatetime('DD.MM.YYYY',myInventurdatum);\r\n combolager.Visible:=true;\r\n end\r\n else\r\n begin\r\n labelinventuren.Caption:='Es gibt keine Inventur, die zur Bearbeitung freigegeben ist';\r\n end;\r\n end\r\n else\r\n begin\r\n labelinventuren.Caption:='Es gibt keine Inventur, die zur Bearbeitung freigegeben ist';\r\n end;\r\n Container1.html.text:='';\r\n myelement:=container1.ElementHandle;\r\n btnzurueck.ParentElement:=myelement;\r\n container2.ParentElement:=myelement;\r\n Container3.ParentElement:=myelement;\r\n Container4.ParentElement:=myelement;\r\n myelement:=container2.ElementHandle;\r\n labelinventuren.ParentElement:=myelement;\r\n myelement:=container3.ElementHandle;\r\n TCErfassung.ParentElement:=myelement;\r\n tcerfassung.RowCount:=4;\r\n tcerfassung.Cells[0,1]:='Für welches Lager?';\r\n tcerfassung.Cells[0,2]:='Artikelnr.';\r\n tcerfassung.Cells[0,3]:='Menge';\r\n myelement:=TCErfassung.CellElements[1,1];\r\n ComboLager.ParentElement:=myelement;\r\n myelement:=TCErfassung.CellElements[1,2];\r\n edtsuchbegriff.ParentElement:=myelement;\r\n labelsuchergebnis.ParentElement:=myelement;\r\n myelement:=TCErfassung.CellElements[2,2];\r\n btnscan.ParentElement:=myelement;\r\n myelement:=TCErfassung.CellElements[1,3];\r\n edtMenge.ParentElement:=myelement;\r\n myelement:=TCErfassung.CellElements[2,3];\r\n btnSpeichern.ParentElement:=myelement;\r\n myelement:=container4.ElementHandle;\r\n LabelLetzteErfassungen.ParentElement:=myelement;\r\n TCLetzte10.ParentElement:=myelement;\r\n if myInventurDatum<>encodedate(2000,1,1) then\r\n begin\r\n xdsInventurERF.QueryString:='$filter=Inventurdatum eq '+formatdatetime('yyyy-mm-dd',myinventurdatum)+'&$expand=Artikelnummer,Lager&$orderby=Datumgeaendert DESC';\r\n xdsInventurERF.Load;\r\n end;\r\n\r\nend;\r\n\r\nprocedure TfrmInventur.LoadDFMValues;\r\nbegin\r\n inherited LoadDFMValues;\r\n\r\n labelinventuren := TLabel.Create(Self);\r\n LabelLetzteErfassungen := TLabel.Create(Self);\r\n labelsuchergebnis := TLabel.Create(Self);\r\n Container1 := THTMLContainer.Create(Self);\r\n Container2 := THTMLContainer.Create(Self);\r\n Container3 := THTMLContainer.Create(Self);\r\n btnzurueck := TButton.Create(Self);\r\n ComboLager := TComboBox.Create(Self);\r\n Container4 := THTMLContainer.Create(Self);\r\n btnScan := TButton.Create(Self);\r\n edtSuchbegriff := TEdit.Create(Self);\r\n edtMenge := TEdit.Create(Self);\r\n btnSpeichern := TButton.Create(Self);\r\n TCErfassung := TTableControl.Create(Self);\r\n TCLetzte10 := TTableControl.Create(Self);\r\n xdsInventurERF := TXDataWebDataSet.Create(Self);\r\n xdsInventurERFArtikelnummer := TXDataWebEntityField.Create(Self);\r\n xdsInventurERFLager := TXDataWebEntityField.Create(Self);\r\n xdsInventurERFInventurdatum := TDateTimeField.Create(Self);\r\n xdsInventurERFArtikelueberschrift := TStringField.Create(Self);\r\n xdsInventurERFArtikelbeschreibung := TStringField.Create(Self);\r\n xdsInventurERFBestand := TFloatField.Create(Self);\r\n xdsInventurERFBemerkung := TStringField.Create(Self);\r\n xdsInventurERFLetzterEK := TFloatField.Create(Self);\r\n xdsInventurERFDurchschnittEK := TFloatField.Create(Self);\r\n xdsInventurERFBenutzergeaendert := TStringField.Create(Self);\r\n xdsInventurERFDatumgeaendert := TDateTimeField.Create(Self);\r\n xdsInventurERFArtikelEK := TFloatField.Create(Self);\r\n xdsInventurERFBuchbestand := TFloatField.Create(Self);\r\n xdsInventurERFBuchbestandswert := TFloatField.Create(Self);\r\n xdsInventurERFDifferenzBestand := TFloatField.Create(Self);\r\n xdsInventurERFNeuerBestandswert := TFloatField.Create(Self);\r\n xdsInventurERFKorrekturDatum := TDateTimeField.Create(Self);\r\n xdsInventurERFDifferenzBestandswert := TFloatField.Create(Self);\r\n xdsInventurERFArtikelnummerArtikelnummer := TStringField.Create(Self);\r\n xdsInventurERFLagerLager := TStringField.Create(Self);\r\n xdsInventuren := TXDataWebDataSet.Create(Self);\r\n xdsInventurenInventurDatum := TDateTimeField.Create(Self);\r\n xdsInventurenBearbeitung := TStringField.Create(Self);\r\n xdsLager := TXDataWebDataSet.Create(Self);\r\n xdsLagerLager := TStringField.Create(Self);\r\n DataSet := TXDataWebDataSet.Create(Self);\r\n DataSetArtikelnummer := TStringField.Create(Self);\r\n DataSetArtikelueberschrift := TStringField.Create(Self);\r\n DataSetArtikelbeschreibung := TStringField.Create(Self);\r\n DataSetVerkaufspreis := TFloatField.Create(Self);\r\n DataSetBestand := TFloatField.Create(Self);\r\n DataSetArtikelmatchcode := TStringField.Create(Self);\r\n DataSetEAN := TStringField.Create(Self);\r\n DataSetEinkaufspreis := TFloatField.Create(Self);\r\n XDSNEU := TXDataWebDataSet.Create(Self);\r\n XDSNEUArtikelnummer := TXDataWebEntityField.Create(Self);\r\n XDSNEULager := TXDataWebEntityField.Create(Self);\r\n XDSNEUInventurdatum := TDateTimeField.Create(Self);\r\n XDSNEUArtikelueberschrift := TStringField.Create(Self);\r\n XDSNEUArtikelbeschreibung := TStringField.Create(Self);\r\n XDSNEUBestand := TFloatField.Create(Self);\r\n XDSNEUBemerkung := TStringField.Create(Self);\r\n XDSNEULetzterEK := TFloatField.Create(Self);\r\n XDSNEUDurchschnittEK := TFloatField.Create(Self);\r\n XDSNEUBenutzergeaendert := TStringField.Create(Self);\r\n XDSNEUDatumgeaendert := TDateTimeField.Create(Self);\r\n XDSNEUArtikelEK := TFloatField.Create(Self);\r\n XDSNEUBuchbestand := TFloatField.Create(Self);\r\n XDSNEUBuchbestandswert := TFloatField.Create(Self);\r\n XDSNEUDifferenzBestand := TFloatField.Create(Self);\r\n XDSNEUNeuerBestandswert := TFloatField.Create(Self);\r\n XDSNEUKorrekturDatum := TDateTimeField.Create(Self);\r\n XDSNEUDifferenzBestandswert := TFloatField.Create(Self);\r\n\r\n labelinventuren.BeforeLoadDFMValues;\r\n LabelLetzteErfassungen.BeforeLoadDFMValues;\r\n labelsuchergebnis.BeforeLoadDFMValues;\r\n Container1.BeforeLoadDFMValues;\r\n Container2.BeforeLoadDFMValues;\r\n Container3.BeforeLoadDFMValues;\r\n btnzurueck.BeforeLoadDFMValues;\r\n ComboLager.BeforeLoadDFMValues;\r\n Container4.BeforeLoadDFMValues;\r\n btnScan.BeforeLoadDFMValues;\r\n edtSuchbegriff.BeforeLoadDFMValues;\r\n edtMenge.BeforeLoadDFMValues;\r\n btnSpeichern.BeforeLoadDFMValues;\r\n TCErfassung.BeforeLoadDFMValues;\r\n TCLetzte10.BeforeLoadDFMValues;\r\n xdsInventurERF.BeforeLoadDFMValues;\r\n xdsInventurERFArtikelnummer.BeforeLoadDFMValues;\r\n xdsInventurERFLager.BeforeLoadDFMValues;\r\n xdsInventurERFInventurdatum.BeforeLoadDFMValues;\r\n xdsInventurERFArtikelueberschrift.BeforeLoadDFMValues;\r\n xdsInventurERFArtikelbeschreibung.BeforeLoadDFMValues;\r\n xdsInventurERFBestand.BeforeLoadDFMValues;\r\n xdsInventurERFBemerkung.BeforeLoadDFMValues;\r\n xdsInventurERFLetzterEK.BeforeLoadDFMValues;\r\n xdsInventurERFDurchschnittEK.BeforeLoadDFMValues;\r\n xdsInventurERFBenutzergeaendert.BeforeLoadDFMValues;\r\n xdsInventurERFDatumgeaendert.BeforeLoadDFMValues;\r\n xdsInventurERFArtikelEK.BeforeLoadDFMValues;\r\n xdsInventurERFBuchbestand.BeforeLoadDFMValues;\r\n xdsInventurERFBuchbestandswert.BeforeLoadDFMValues;\r\n xdsInventurERFDifferenzBestand.BeforeLoadDFMValues;\r\n xdsInventurERFNeuerBestandswert.BeforeLoadDFMValues;\r\n xdsInventurERFKorrekturDatum.BeforeLoadDFMValues;\r\n xdsInventurERFDifferenzBestandswert.BeforeLoadDFMValues;\r\n xdsInventurERFArtikelnummerArtikelnummer.BeforeLoadDFMValues;\r\n xdsInventurERFLagerLager.BeforeLoadDFMValues;\r\n xdsInventuren.BeforeLoadDFMValues;\r\n xdsInventurenInventurDatum.BeforeLoadDFMValues;\r\n xdsInventurenBearbeitung.BeforeLoadDFMValues;\r\n xdsLager.BeforeLoadDFMValues;\r\n xdsLagerLager.BeforeLoadDFMValues;\r\n DataSet.BeforeLoadDFMValues;\r\n DataSetArtikelnummer.BeforeLoadDFMValues;\r\n DataSetArtikelueberschrift.BeforeLoadDFMValues;\r\n DataSetArtikelbeschreibung.BeforeLoadDFMValues;\r\n DataSetVerkaufspreis.BeforeLoadDFMValues;\r\n DataSetBestand.BeforeLoadDFMValues;\r\n DataSetArtikelmatchcode.BeforeLoadDFMValues;\r\n DataSetEAN.BeforeLoadDFMValues;\r\n DataSetEinkaufspreis.BeforeLoadDFMValues;\r\n XDSNEU.BeforeLoadDFMValues;\r\n XDSNEUArtikelnummer.BeforeLoadDFMValues;\r\n XDSNEULager.BeforeLoadDFMValues;\r\n XDSNEUInventurdatum.BeforeLoadDFMValues;\r\n XDSNEUArtikelueberschrift.BeforeLoadDFMValues;\r\n XDSNEUArtikelbeschreibung.BeforeLoadDFMValues;\r\n XDSNEUBestand.BeforeLoadDFMValues;\r\n XDSNEUBemerkung.BeforeLoadDFMValues;\r\n XDSNEULetzterEK.BeforeLoadDFMValues;\r\n XDSNEUDurchschnittEK.BeforeLoadDFMValues;\r\n XDSNEUBenutzergeaendert.BeforeLoadDFMValues;\r\n XDSNEUDatumgeaendert.BeforeLoadDFMValues;\r\n XDSNEUArtikelEK.BeforeLoadDFMValues;\r\n XDSNEUBuchbestand.BeforeLoadDFMValues;\r\n XDSNEUBuchbestandswert.BeforeLoadDFMValues;\r\n XDSNEUDifferenzBestand.BeforeLoadDFMValues;\r\n XDSNEUNeuerBestandswert.BeforeLoadDFMValues;\r\n XDSNEUKorrekturDatum.BeforeLoadDFMValues;\r\n XDSNEUDifferenzBestandswert.BeforeLoadDFMValues;\r\n try\r\n Name := 'frmInventur';\r\n Width := 202;\r\n Height := 557;\r\n CSSLibrary := cssBootstrap;\r\n ElementFont := efCSS;\r\n FormStyle := fsStayOnTop;\r\n SetEvent(Self, 'OnShow', 'WebFormShow');\r\n labelinventuren.SetParentComponent(Self);\r\n labelinventuren.Name := 'labelinventuren';\r\n labelinventuren.Left := 8;\r\n labelinventuren.Top := 176;\r\n labelinventuren.Width := 85;\r\n labelinventuren.Height := 15;\r\n labelinventuren.Caption := 'LabelInventuren';\r\n labelinventuren.ElementClassName := 'h6 m-2';\r\n labelinventuren.ElementFont := efCSS;\r\n labelinventuren.ElementPosition := epIgnore;\r\n labelinventuren.HeightStyle := ssAuto;\r\n labelinventuren.HeightPercent := 100.000000000000000000;\r\n labelinventuren.WidthStyle := ssAuto;\r\n labelinventuren.WidthPercent := 100.000000000000000000;\r\n LabelLetzteErfassungen.SetParentComponent(Self);\r\n LabelLetzteErfassungen.Name := 'LabelLetzteErfassungen';\r\n LabelLetzteErfassungen.Left := 8;\r\n LabelLetzteErfassungen.Top := 195;\r\n LabelLetzteErfassungen.Width := 113;\r\n LabelLetzteErfassungen.Height := 15;\r\n LabelLetzteErfassungen.Caption := 'Letzte 10 Erfassungen';\r\n LabelLetzteErfassungen.ElementClassName := 'h6 m-2';\r\n LabelLetzteErfassungen.ElementFont := efCSS;\r\n LabelLetzteErfassungen.ElementPosition := epIgnore;\r\n LabelLetzteErfassungen.HeightStyle := ssAuto;\r\n LabelLetzteErfassungen.HeightPercent := 100.000000000000000000;\r\n LabelLetzteErfassungen.WidthStyle := ssAuto;\r\n LabelLetzteErfassungen.WidthPercent := 100.000000000000000000;\r\n labelsuchergebnis.SetParentComponent(Self);\r\n labelsuchergebnis.Name := 'labelsuchergebnis';\r\n labelsuchergebnis.Left := 8;\r\n labelsuchergebnis.Top := 207;\r\n labelsuchergebnis.Width := 71;\r\n labelsuchergebnis.Height := 15;\r\n labelsuchergebnis.Caption := 'Suchergebnis';\r\n labelsuchergebnis.ElementClassName := 'h6 m-2';\r\n labelsuchergebnis.ElementFont := efCSS;\r\n labelsuchergebnis.ElementPosition := epIgnore;\r\n labelsuchergebnis.HeightStyle := ssAuto;\r\n labelsuchergebnis.HeightPercent := 100.000000000000000000;\r\n labelsuchergebnis.WidthStyle := ssAuto;\r\n labelsuchergebnis.WidthPercent := 100.000000000000000000;\r\n Container1.SetParentComponent(Self);\r\n Container1.Name := 'Container1';\r\n Container1.Left := 0;\r\n Container1.Top := 0;\r\n Container1.Width := 169;\r\n Container1.Height := 41;\r\n Container1.HeightStyle := ssAuto;\r\n Container1.WidthStyle := ssPercent;\r\n Container1.ChildOrder := 2;\r\n Container1.ElementFont := efCSS;\r\n Container2.SetParentComponent(Self);\r\n Container2.Name := 'Container2';\r\n Container2.Left := 0;\r\n Container2.Top := 47;\r\n Container2.Width := 169;\r\n Container2.Height := 41;\r\n Container2.ElementClassName := 'd-flex flex-wrap m-1';\r\n Container2.HeightStyle := ssAuto;\r\n Container2.WidthStyle := ssAuto;\r\n Container2.ChildOrder := 5;\r\n Container2.ElementFont := efCSS;\r\n Container2.ElementPosition := epIgnore;\r\n Container3.SetParentComponent(Self);\r\n Container3.Name := 'Container3';\r\n Container3.Left := 0;\r\n Container3.Top := 94;\r\n Container3.Width := 169;\r\n Container3.Height := 41;\r\n Container3.ElementClassName := 'd-flex flex-wrap m-1';\r\n Container3.HeightStyle := ssAuto;\r\n Container3.WidthStyle := ssAuto;\r\n Container3.ChildOrder := 5;\r\n Container3.ElementFont := efCSS;\r\n Container3.ElementPosition := epIgnore;\r\n btnzurueck.SetParentComponent(Self);\r\n btnzurueck.Name := 'btnzurueck';\r\n btnzurueck.Left := 0;\r\n btnzurueck.Top := 226;\r\n btnzurueck.Width := 96;\r\n btnzurueck.Height := 25;\r\n btnzurueck.Caption := '<< zur'#252'ck';\r\n btnzurueck.ChildOrder := 4;\r\n btnzurueck.ElementClassName := 'btn btn-info btn-sm m-1 text-left';\r\n btnzurueck.ElementFont := efCSS;\r\n btnzurueck.ElementPosition := epIgnore;\r\n btnzurueck.HeightStyle := ssAuto;\r\n btnzurueck.HeightPercent := 100.000000000000000000;\r\n btnzurueck.WidthStyle := ssAuto;\r\n btnzurueck.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnzurueck, Self, 'OnClick', 'btnzurueckClick');\r\n ComboLager.SetParentComponent(Self);\r\n ComboLager.Name := 'ComboLager';\r\n ComboLager.Left := 8;\r\n ComboLager.Top := 293;\r\n ComboLager.Width := 150;\r\n ComboLager.Height := 23;\r\n ComboLager.ChildOrder := 8;\r\n ComboLager.ElementClassName := 'form-control m-1';\r\n ComboLager.ElementFont := efCSS;\r\n ComboLager.ElementPosition := epIgnore;\r\n ComboLager.HeightStyle := ssAuto;\r\n ComboLager.HeightPercent := 100.000000000000000000;\r\n ComboLager.Text := 'ComboLager';\r\n ComboLager.WidthPercent := 75.000000000000000000;\r\n ComboLager.ItemIndex := -1;\r\n Container4.SetParentComponent(Self);\r\n Container4.Name := 'Container4';\r\n Container4.Left := 0;\r\n Container4.Top := 141;\r\n Container4.Width := 169;\r\n Container4.Height := 41;\r\n Container4.ElementClassName := 'd-flex flex-wrap m-1';\r\n Container4.HeightStyle := ssAuto;\r\n Container4.WidthStyle := ssAuto;\r\n Container4.ChildOrder := 5;\r\n Container4.ElementFont := efCSS;\r\n Container4.ElementPosition := epIgnore;\r\n btnScan.SetParentComponent(Self);\r\n btnScan.Name := 'btnScan';\r\n btnScan.Left := 8;\r\n btnScan.Top := 410;\r\n btnScan.Width := 96;\r\n btnScan.Height := 25;\r\n btnScan.Caption := 'scannen';\r\n btnScan.ChildOrder := 4;\r\n btnScan.ElementClassName := 'btn btn-info btn-sm m-1 text-left';\r\n btnScan.ElementFont := efCSS;\r\n btnScan.ElementPosition := epIgnore;\r\n btnScan.HeightStyle := ssAuto;\r\n btnScan.HeightPercent := 100.000000000000000000;\r\n btnScan.WidthStyle := ssAuto;\r\n btnScan.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnScan, Self, 'OnClick', 'btnScanClick');\r\n edtSuchbegriff.SetParentComponent(Self);\r\n edtSuchbegriff.Name := 'edtSuchbegriff';\r\n edtSuchbegriff.Left := 8;\r\n edtSuchbegriff.Top := 382;\r\n edtSuchbegriff.Width := 150;\r\n edtSuchbegriff.Height := 22;\r\n edtSuchbegriff.ChildOrder := 6;\r\n edtSuchbegriff.ElementClassName := 'form-control input-sm m-1';\r\n edtSuchbegriff.ElementFont := efCSS;\r\n edtSuchbegriff.ElementPosition := epIgnore;\r\n edtSuchbegriff.HeightStyle := ssAuto;\r\n edtSuchbegriff.HeightPercent := 100.000000000000000000;\r\n edtSuchbegriff.ShowHint := True;\r\n edtSuchbegriff.TextHint := 'Artikelnr/GTIN';\r\n edtSuchbegriff.WidthPercent := 60.000000000000000000;\r\n SetEvent(edtSuchbegriff, Self, 'OnChange', 'edtSuchbegriffChange');\r\n edtMenge.SetParentComponent(Self);\r\n edtMenge.Name := 'edtMenge';\r\n edtMenge.Left := 8;\r\n edtMenge.Top := 441;\r\n edtMenge.Width := 150;\r\n edtMenge.Height := 19;\r\n edtMenge.ChildOrder := 2;\r\n edtMenge.EditType := weFloat;\r\n edtMenge.ElementClassName := 'form-control input-sm m-1';\r\n edtMenge.ElementFont := efCSS;\r\n edtMenge.ElementPosition := epIgnore;\r\n edtMenge.HeightStyle := ssAuto;\r\n edtMenge.HeightPercent := 100.000000000000000000;\r\n edtMenge.TextHint := 'eintragen';\r\n edtMenge.WidthPercent := 100.000000000000000000;\r\n btnSpeichern.SetParentComponent(Self);\r\n btnSpeichern.Name := 'btnSpeichern';\r\n btnSpeichern.Left := 73;\r\n btnSpeichern.Top := 466;\r\n btnSpeichern.Width := 96;\r\n btnSpeichern.Height := 25;\r\n btnSpeichern.Caption := 'speichern';\r\n btnSpeichern.ChildOrder := 6;\r\n btnSpeichern.ElementClassName := 'btn btn-info btn-sm m-1 text-left';\r\n btnSpeichern.ElementFont := efCSS;\r\n btnSpeichern.ElementPosition := epIgnore;\r\n btnSpeichern.HeightStyle := ssAuto;\r\n btnSpeichern.HeightPercent := 100.000000000000000000;\r\n btnSpeichern.WidthStyle := ssAuto;\r\n btnSpeichern.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnSpeichern, Self, 'OnClick', 'btnSpeichernClick');\r\n TCErfassung.SetParentComponent(Self);\r\n TCErfassung.Name := 'TCErfassung';\r\n TCErfassung.Left := -45;\r\n TCErfassung.Top := 288;\r\n TCErfassung.Width := 247;\r\n TCErfassung.Height := 91;\r\n TCErfassung.ElementClassName := 'table table-sm table-hover table-bordered table-striped m-1';\r\n TCErfassung.HeightStyle := ssAuto;\r\n TCErfassung.WidthStyle := ssPercent;\r\n TCErfassung.BorderColor := clSilver;\r\n TCErfassung.ChildOrder := 3;\r\n TCErfassung.ColHeader := False;\r\n TCErfassung.ElementFont := efCSS;\r\n TCErfassung.ElementHeaderClassName := 'table-info';\r\n TCErfassung.ElementPosition := epIgnore;\r\n TCErfassung.ElementTableClassName := 'table table-sm table-hover table-bordered table-striped';\r\n TCErfassung.WordWrap := True;\r\n TCErfassung.ColCount := 3;\r\n TCLetzte10.SetParentComponent(Self);\r\n TCLetzte10.Name := 'TCLetzte10';\r\n TCLetzte10.Left := 8;\r\n TCLetzte10.Top := 497;\r\n TCLetzte10.Width := 247;\r\n TCLetzte10.Height := 91;\r\n TCLetzte10.ElementClassName := 'table table-sm table-hover table-bordered table-striped m-1';\r\n TCLetzte10.HeightStyle := ssAuto;\r\n TCLetzte10.WidthStyle := ssPercent;\r\n TCLetzte10.BorderColor := clSilver;\r\n TCLetzte10.ChildOrder := 3;\r\n TCLetzte10.ColHeader := False;\r\n TCLetzte10.ElementFont := efCSS;\r\n TCLetzte10.ElementHeaderClassName := 'table-info';\r\n TCLetzte10.ElementPosition := epIgnore;\r\n TCLetzte10.ElementTableClassName := 'table table-sm table-hover table-bordered table-striped';\r\n TCLetzte10.WordWrap := True;\r\n TCLetzte10.ColCount := 3;\r\n xdsInventurERF.SetParentComponent(Self);\r\n xdsInventurERF.Name := 'xdsInventurERF';\r\n xdsInventurERF.AfterOpen := xdsInventurERFAfterOpen;\r\n xdsInventurERF.EntitySetName := 'InventurERF';\r\n xdsInventurERF.Connection := DM2.XDataWebConnection1;\r\n xdsInventurERF.SubpropsDepth := 1;\r\n xdsInventurERF.QueryString := '$expand=Artikelnummer,Lager&$orderby=Datumgeaendert DESC';\r\n xdsInventurERF.QueryTop := 10;\r\n xdsInventurERF.Left := 109;\r\n xdsInventurERF.Top := 173;\r\n xdsInventurERFArtikelnummer.SetParentComponent(xdsInventurERF);\r\n xdsInventurERFArtikelnummer.Name := 'xdsInventurERFArtikelnummer';\r\n xdsInventurERFArtikelnummer.FieldName := 'Artikelnummer';\r\n xdsInventurERFArtikelnummer.Required := True;\r\n xdsInventurERFLager.SetParentComponent(xdsInventurERF);\r\n xdsInventurERFLager.Name := 'xdsInventurERFLager';\r\n xdsInventurERFLager.FieldName := 'Lager';\r\n xdsInventurERFLager.Required := True;\r\n xdsInventurERFInventurdatum.SetParentComponent(xdsInventurERF);\r\n xdsInventurERFInventurdatum.Name := 'xdsInventurERFInventurdatum';\r\n xdsInventurERFInventurdatum.FieldName := 'Inventurdatum';\r\n xdsInventurERFInventurdatum.Required := True;\r\n xdsInventurERFArtikelueberschrift.SetParentComponent(xdsInventurERF);\r\n xdsInventurERFArtikelueberschrift.Name := 'xdsInventurERFArtikelueberschrift';\r\n xdsInventurERFArtikelueberschrift.FieldName := 'Artikelueberschrift';\r\n xdsInventurERFArtikelueberschrift.Size := 50;\r\n xdsInventurERFArtikelbeschreibung.SetParentComponent(xdsInventurERF);\r\n xdsInventurERFArtikelbeschreibung.Name := 'xdsInventurERFArtikelbeschreibung';\r\n xdsInventurERFArtikelbeschreibung.FieldName := 'Artikelbeschreibung';\r\n xdsInventurERFArtikelbeschreibung.Size := 255;\r\n xdsInventurERFBestand.SetParentComponent(xdsInventurERF);\r\n xdsInventurERFBestand.Name := 'xdsInventurERFBestand';\r\n xdsInventurERFBestand.FieldName := 'Bestand';\r\n xdsInventurERFBemerkung.SetParentComponent(xdsInventurERF);\r\n xdsInventurERFBemerkung.Name := 'xdsInventurERFBemerkung';\r\n xdsInventurERFBemerkung.FieldName := 'Bemerkung';\r\n xdsInventurERFBemerkung.Size := 255;\r\n xdsInventurERFLetzterEK.SetParentComponent(xdsInventurERF);\r\n xdsInventurERFLetzterEK.Name := 'xdsInventurERFLetzterEK';\r\n xdsInventurERFLetzterEK.FieldName := 'LetzterEK';\r\n xdsInventurERFDurchschnittEK.SetParentComponent(xdsInventurERF);\r\n xdsInventurERFDurchschnittEK.Name := 'xdsInventurERFDurchschnittEK';\r\n xdsInventurERFDurchschnittEK.FieldName := 'DurchschnittEK';\r\n xdsInventurERFBenutzergeaendert.SetParentComponent(xdsInventurERF);\r\n xdsInventurERFBenutzergeaendert.Name := 'xdsInventurERFBenutzergeaendert';\r\n xdsInventurERFBenutzergeaendert.FieldName := 'Benutzergeaendert';\r\n xdsInventurERFBenutzergeaendert.Size := 50;\r\n xdsInventurERFDatumgeaendert.SetParentComponent(xdsInventurERF);\r\n xdsInventurERFDatumgeaendert.Name := 'xdsInventurERFDatumgeaendert';\r\n xdsInventurERFDatumgeaendert.FieldName := 'Datumgeaendert';\r\n xdsInventurERFArtikelEK.SetParentComponent(xdsInventurERF);\r\n xdsInventurERFArtikelEK.Name := 'xdsInventurERFArtikelEK';\r\n xdsInventurERFArtikelEK.FieldName := 'ArtikelEK';\r\n xdsInventurERFBuchbestand.SetParentComponent(xdsInventurERF);\r\n xdsInventurERFBuchbestand.Name := 'xdsInventurERFBuchbestand';\r\n xdsInventurERFBuchbestand.FieldName := 'Buchbestand';\r\n xdsInventurERFBuchbestandswert.SetParentComponent(xdsInventurERF);\r\n xdsInventurERFBuchbestandswert.Name := 'xdsInventurERFBuchbestandswert';\r\n xdsInventurERFBuchbestandswert.FieldName := 'Buchbestandswert';\r\n xdsInventurERFDifferenzBestand.SetParentComponent(xdsInventurERF);\r\n xdsInventurERFDifferenzBestand.Name := 'xdsInventurERFDifferenzBestand';\r\n xdsInventurERFDifferenzBestand.FieldName := 'DifferenzBestand';\r\n xdsInventurERFNeuerBestandswert.SetParentComponent(xdsInventurERF);\r\n xdsInventurERFNeuerBestandswert.Name := 'xdsInventurERFNeuerBestandswert';\r\n xdsInventurERFNeuerBestandswert.FieldName := 'NeuerBestandswert';\r\n xdsInventurERFKorrekturDatum.SetParentComponent(xdsInventurERF);\r\n xdsInventurERFKorrekturDatum.Name := 'xdsInventurERFKorrekturDatum';\r\n xdsInventurERFKorrekturDatum.FieldName := 'KorrekturDatum';\r\n xdsInventurERFDifferenzBestandswert.SetParentComponent(xdsInventurERF);\r\n xdsInventurERFDifferenzBestandswert.Name := 'xdsInventurERFDifferenzBestandswert';\r\n xdsInventurERFDifferenzBestandswert.FieldName := 'DifferenzBestandswert';\r\n xdsInventurERFArtikelnummerArtikelnummer.SetParentComponent(xdsInventurERF);\r\n xdsInventurERFArtikelnummerArtikelnummer.Name := 'xdsInventurERFArtikelnummerArtikelnummer';\r\n xdsInventurERFArtikelnummerArtikelnummer.FieldName := 'Artikelnummer.Artikelnummer';\r\n xdsInventurERFArtikelnummerArtikelnummer.Size := 25;\r\n xdsInventurERFLagerLager.SetParentComponent(xdsInventurERF);\r\n xdsInventurERFLagerLager.Name := 'xdsInventurERFLagerLager';\r\n xdsInventurERFLagerLager.FieldName := 'Lager.Lager';\r\n xdsInventurERFLagerLager.Size := 50;\r\n xdsInventuren.SetParentComponent(Self);\r\n xdsInventuren.Name := 'xdsInventuren';\r\n xdsInventuren.AfterOpen := xdsInventurenAfterOpen;\r\n xdsInventuren.EntitySetName := 'Inventuren';\r\n xdsInventuren.Connection := DM2.XDataWebConnection1;\r\n xdsInventuren.QueryString := '$filter=Bearbeitung eq '#39'aktiv'#39'&$orderby=InventurDatum DESC';\r\n xdsInventuren.QueryTop := 10;\r\n xdsInventuren.Left := 101;\r\n xdsInventuren.Top := 117;\r\n xdsInventurenInventurDatum.SetParentComponent(xdsInventuren);\r\n xdsInventurenInventurDatum.Name := 'xdsInventurenInventurDatum';\r\n xdsInventurenInventurDatum.FieldName := 'InventurDatum';\r\n xdsInventurenInventurDatum.Required := True;\r\n xdsInventurenBearbeitung.SetParentComponent(xdsInventuren);\r\n xdsInventurenBearbeitung.Name := 'xdsInventurenBearbeitung';\r\n xdsInventurenBearbeitung.FieldName := 'Bearbeitung';\r\n xdsInventurenBearbeitung.Required := True;\r\n xdsInventurenBearbeitung.Size := 25;\r\n xdsLager.SetParentComponent(Self);\r\n xdsLager.Name := 'xdsLager';\r\n xdsLager.AfterOpen := xdsLagerAfterOpen;\r\n xdsLager.EntitySetName := 'Lager';\r\n xdsLager.Connection := DM2.XDataWebConnection1;\r\n xdsLager.QueryTop := 100;\r\n xdsLager.Left := 109;\r\n xdsLager.Top := 237;\r\n xdsLagerLager.SetParentComponent(xdsLager);\r\n xdsLagerLager.Name := 'xdsLagerLager';\r\n xdsLagerLager.FieldName := 'Lager';\r\n xdsLagerLager.Required := True;\r\n xdsLagerLager.Size := 50;\r\n DataSet.SetParentComponent(Self);\r\n DataSet.Name := 'DataSet';\r\n DataSet.AfterOpen := DataSetAfterOpen;\r\n DataSet.EntitySetName := 'Artikel';\r\n DataSet.Connection := DM2.XDataWebConnection1;\r\n DataSet.QueryTop := 21;\r\n DataSet.Left := 56;\r\n DataSet.Top := 72;\r\n DataSetArtikelnummer.SetParentComponent(DataSet);\r\n DataSetArtikelnummer.Name := 'DataSetArtikelnummer';\r\n DataSetArtikelnummer.FieldName := 'Artikelnummer';\r\n DataSetArtikelnummer.Required := True;\r\n DataSetArtikelnummer.Size := 25;\r\n DataSetArtikelueberschrift.SetParentComponent(DataSet);\r\n DataSetArtikelueberschrift.Name := 'DataSetArtikelueberschrift';\r\n DataSetArtikelueberschrift.FieldName := 'Artikelueberschrift';\r\n DataSetArtikelueberschrift.Size := 50;\r\n DataSetArtikelbeschreibung.SetParentComponent(DataSet);\r\n DataSetArtikelbeschreibung.Name := 'DataSetArtikelbeschreibung';\r\n DataSetArtikelbeschreibung.FieldName := 'Artikelbeschreibung';\r\n DataSetArtikelbeschreibung.Size := 255;\r\n DataSetVerkaufspreis.SetParentComponent(DataSet);\r\n DataSetVerkaufspreis.Name := 'DataSetVerkaufspreis';\r\n DataSetVerkaufspreis.FieldName := 'Verkaufspreis';\r\n DataSetBestand.SetParentComponent(DataSet);\r\n DataSetBestand.Name := 'DataSetBestand';\r\n DataSetBestand.FieldName := 'Bestand';\r\n DataSetArtikelmatchcode.SetParentComponent(DataSet);\r\n DataSetArtikelmatchcode.Name := 'DataSetArtikelmatchcode';\r\n DataSetArtikelmatchcode.FieldName := 'Artikelmatchcode';\r\n DataSetArtikelmatchcode.Size := 30;\r\n DataSetEAN.SetParentComponent(DataSet);\r\n DataSetEAN.Name := 'DataSetEAN';\r\n DataSetEAN.FieldName := 'EAN';\r\n DataSetEAN.Size := 15;\r\n DataSetEinkaufspreis.SetParentComponent(DataSet);\r\n DataSetEinkaufspreis.Name := 'DataSetEinkaufspreis';\r\n DataSetEinkaufspreis.FieldName := 'Einkaufspreis';\r\n XDSNEU.SetParentComponent(Self);\r\n XDSNEU.Name := 'XDSNEU';\r\n XDSNEU.AfterApplyUpdates := XDSNEUAfterApplyUpdates;\r\n XDSNEU.AfterOpen := XDSNEUAfterOpen;\r\n XDSNEU.AfterPost := XDSNEUAfterPost;\r\n XDSNEU.EntitySetName := 'InventurERF';\r\n XDSNEU.Connection := DM2.XDataWebConnection1;\r\n XDSNEU.QueryTop := 1;\r\n XDSNEU.Left := 21;\r\n XDSNEU.Top := 261;\r\n XDSNEUArtikelnummer.SetParentComponent(XDSNEU);\r\n XDSNEUArtikelnummer.Name := 'XDSNEUArtikelnummer';\r\n XDSNEUArtikelnummer.FieldName := 'Artikelnummer';\r\n XDSNEUArtikelnummer.Required := True;\r\n XDSNEULager.SetParentComponent(XDSNEU);\r\n XDSNEULager.Name := 'XDSNEULager';\r\n XDSNEULager.FieldName := 'Lager';\r\n XDSNEULager.Required := True;\r\n XDSNEUInventurdatum.SetParentComponent(XDSNEU);\r\n XDSNEUInventurdatum.Name := 'XDSNEUInventurdatum';\r\n XDSNEUInventurdatum.FieldName := 'Inventurdatum';\r\n XDSNEUInventurdatum.Required := True;\r\n XDSNEUArtikelueberschrift.SetParentComponent(XDSNEU);\r\n XDSNEUArtikelueberschrift.Name := 'XDSNEUArtikelueberschrift';\r\n XDSNEUArtikelueberschrift.FieldName := 'Artikelueberschrift';\r\n XDSNEUArtikelueberschrift.Size := 50;\r\n XDSNEUArtikelbeschreibung.SetParentComponent(XDSNEU);\r\n XDSNEUArtikelbeschreibung.Name := 'XDSNEUArtikelbeschreibung';\r\n XDSNEUArtikelbeschreibung.FieldName := 'Artikelbeschreibung';\r\n XDSNEUArtikelbeschreibung.Size := 255;\r\n XDSNEUBestand.SetParentComponent(XDSNEU);\r\n XDSNEUBestand.Name := 'XDSNEUBestand';\r\n XDSNEUBestand.FieldName := 'Bestand';\r\n XDSNEUBemerkung.SetParentComponent(XDSNEU);\r\n XDSNEUBemerkung.Name := 'XDSNEUBemerkung';\r\n XDSNEUBemerkung.FieldName := 'Bemerkung';\r\n XDSNEUBemerkung.Size := 255;\r\n XDSNEULetzterEK.SetParentComponent(XDSNEU);\r\n XDSNEULetzterEK.Name := 'XDSNEULetzterEK';\r\n XDSNEULetzterEK.FieldName := 'LetzterEK';\r\n XDSNEUDurchschnittEK.SetParentComponent(XDSNEU);\r\n XDSNEUDurchschnittEK.Name := 'XDSNEUDurchschnittEK';\r\n XDSNEUDurchschnittEK.FieldName := 'DurchschnittEK';\r\n XDSNEUBenutzergeaendert.SetParentComponent(XDSNEU);\r\n XDSNEUBenutzergeaendert.Name := 'XDSNEUBenutzergeaendert';\r\n XDSNEUBenutzergeaendert.FieldName := 'Benutzergeaendert';\r\n XDSNEUBenutzergeaendert.Size := 50;\r\n XDSNEUDatumgeaendert.SetParentComponent(XDSNEU);\r\n XDSNEUDatumgeaendert.Name := 'XDSNEUDatumgeaendert';\r\n XDSNEUDatumgeaendert.FieldName := 'Datumgeaendert';\r\n XDSNEUArtikelEK.SetParentComponent(XDSNEU);\r\n XDSNEUArtikelEK.Name := 'XDSNEUArtikelEK';\r\n XDSNEUArtikelEK.FieldName := 'ArtikelEK';\r\n XDSNEUBuchbestand.SetParentComponent(XDSNEU);\r\n XDSNEUBuchbestand.Name := 'XDSNEUBuchbestand';\r\n XDSNEUBuchbestand.FieldName := 'Buchbestand';\r\n XDSNEUBuchbestandswert.SetParentComponent(XDSNEU);\r\n XDSNEUBuchbestandswert.Name := 'XDSNEUBuchbestandswert';\r\n XDSNEUBuchbestandswert.FieldName := 'Buchbestandswert';\r\n XDSNEUDifferenzBestand.SetParentComponent(XDSNEU);\r\n XDSNEUDifferenzBestand.Name := 'XDSNEUDifferenzBestand';\r\n XDSNEUDifferenzBestand.FieldName := 'DifferenzBestand';\r\n XDSNEUNeuerBestandswert.SetParentComponent(XDSNEU);\r\n XDSNEUNeuerBestandswert.Name := 'XDSNEUNeuerBestandswert';\r\n XDSNEUNeuerBestandswert.FieldName := 'NeuerBestandswert';\r\n XDSNEUKorrekturDatum.SetParentComponent(XDSNEU);\r\n XDSNEUKorrekturDatum.Name := 'XDSNEUKorrekturDatum';\r\n XDSNEUKorrekturDatum.FieldName := 'KorrekturDatum';\r\n XDSNEUDifferenzBestandswert.SetParentComponent(XDSNEU);\r\n XDSNEUDifferenzBestandswert.Name := 'XDSNEUDifferenzBestandswert';\r\n XDSNEUDifferenzBestandswert.FieldName := 'DifferenzBestandswert';\r\n finally\r\n labelinventuren.AfterLoadDFMValues;\r\n LabelLetzteErfassungen.AfterLoadDFMValues;\r\n labelsuchergebnis.AfterLoadDFMValues;\r\n Container1.AfterLoadDFMValues;\r\n Container2.AfterLoadDFMValues;\r\n Container3.AfterLoadDFMValues;\r\n btnzurueck.AfterLoadDFMValues;\r\n ComboLager.AfterLoadDFMValues;\r\n Container4.AfterLoadDFMValues;\r\n btnScan.AfterLoadDFMValues;\r\n edtSuchbegriff.AfterLoadDFMValues;\r\n edtMenge.AfterLoadDFMValues;\r\n btnSpeichern.AfterLoadDFMValues;\r\n TCErfassung.AfterLoadDFMValues;\r\n TCLetzte10.AfterLoadDFMValues;\r\n xdsInventurERF.AfterLoadDFMValues;\r\n xdsInventurERFArtikelnummer.AfterLoadDFMValues;\r\n xdsInventurERFLager.AfterLoadDFMValues;\r\n xdsInventurERFInventurdatum.AfterLoadDFMValues;\r\n xdsInventurERFArtikelueberschrift.AfterLoadDFMValues;\r\n xdsInventurERFArtikelbeschreibung.AfterLoadDFMValues;\r\n xdsInventurERFBestand.AfterLoadDFMValues;\r\n xdsInventurERFBemerkung.AfterLoadDFMValues;\r\n xdsInventurERFLetzterEK.AfterLoadDFMValues;\r\n xdsInventurERFDurchschnittEK.AfterLoadDFMValues;\r\n xdsInventurERFBenutzergeaendert.AfterLoadDFMValues;\r\n xdsInventurERFDatumgeaendert.AfterLoadDFMValues;\r\n xdsInventurERFArtikelEK.AfterLoadDFMValues;\r\n xdsInventurERFBuchbestand.AfterLoadDFMValues;\r\n xdsInventurERFBuchbestandswert.AfterLoadDFMValues;\r\n xdsInventurERFDifferenzBestand.AfterLoadDFMValues;\r\n xdsInventurERFNeuerBestandswert.AfterLoadDFMValues;\r\n xdsInventurERFKorrekturDatum.AfterLoadDFMValues;\r\n xdsInventurERFDifferenzBestandswert.AfterLoadDFMValues;\r\n xdsInventurERFArtikelnummerArtikelnummer.AfterLoadDFMValues;\r\n xdsInventurERFLagerLager.AfterLoadDFMValues;\r\n xdsInventuren.AfterLoadDFMValues;\r\n xdsInventurenInventurDatum.AfterLoadDFMValues;\r\n xdsInventurenBearbeitung.AfterLoadDFMValues;\r\n xdsLager.AfterLoadDFMValues;\r\n xdsLagerLager.AfterLoadDFMValues;\r\n DataSet.AfterLoadDFMValues;\r\n DataSetArtikelnummer.AfterLoadDFMValues;\r\n DataSetArtikelueberschrift.AfterLoadDFMValues;\r\n DataSetArtikelbeschreibung.AfterLoadDFMValues;\r\n DataSetVerkaufspreis.AfterLoadDFMValues;\r\n DataSetBestand.AfterLoadDFMValues;\r\n DataSetArtikelmatchcode.AfterLoadDFMValues;\r\n DataSetEAN.AfterLoadDFMValues;\r\n DataSetEinkaufspreis.AfterLoadDFMValues;\r\n XDSNEU.AfterLoadDFMValues;\r\n XDSNEUArtikelnummer.AfterLoadDFMValues;\r\n XDSNEULager.AfterLoadDFMValues;\r\n XDSNEUInventurdatum.AfterLoadDFMValues;\r\n XDSNEUArtikelueberschrift.AfterLoadDFMValues;\r\n XDSNEUArtikelbeschreibung.AfterLoadDFMValues;\r\n XDSNEUBestand.AfterLoadDFMValues;\r\n XDSNEUBemerkung.AfterLoadDFMValues;\r\n XDSNEULetzterEK.AfterLoadDFMValues;\r\n XDSNEUDurchschnittEK.AfterLoadDFMValues;\r\n XDSNEUBenutzergeaendert.AfterLoadDFMValues;\r\n XDSNEUDatumgeaendert.AfterLoadDFMValues;\r\n XDSNEUArtikelEK.AfterLoadDFMValues;\r\n XDSNEUBuchbestand.AfterLoadDFMValues;\r\n XDSNEUBuchbestandswert.AfterLoadDFMValues;\r\n XDSNEUDifferenzBestand.AfterLoadDFMValues;\r\n XDSNEUNeuerBestandswert.AfterLoadDFMValues;\r\n XDSNEUKorrekturDatum.AfterLoadDFMValues;\r\n XDSNEUDifferenzBestandswert.AfterLoadDFMValues;\r\n end;\r\nend;\r\n\r\nend.\r\n","unit Unit1;\r\n\r\ninterface\r\n\r\nuses\r\n System.SysUtils, System.Classes, JS, Web, WEBLib.Graphics, WEBLib.Controls,\r\n WEBLib.Forms, WEBLib.Dialogs, Vcl.Controls, WEBLib.ExtCtrls, WEBLib.ComCtrls,\r\n strutils, Vcl.StdCtrls, WEBLib.StdCtrls, dateutils,\r\n WEBLib.Login, Data.DB, weblib.json, WEBLib.Storage,\r\n XData.Web.JsonDataset, XData.Web.Dataset, WEBLib.Buttons,\r\n WEBLib.DB, WEBLib.WebCtrls, WEBLib.DBCtrls, WEBLib.REST, XData.Web.Client,\r\n XData.Web.Connection, Vcl.Menus, WEBLib.Menus, weblib.RegularExpressions;\r\n\r\n\r\ntype\r\n TForm1 = class(TForm)\r\n XDPersonal: TXDataWebDataSet;\r\n XDPersonalPersonalnummer: TIntegerField;\r\n XDPersonalNachname: TStringField;\r\n XDPersonalVorname: TStringField;\r\n XDPersonalSchreibzeichen: TStringField;\r\n XDPersonalLoginName: TStringField;\r\n XDPersonalPassword: TStringField;\r\n XDPersonalEnabled: TBooleanField;\r\n XDPersonalEmail: TStringField;\r\n XDPersonalFarbe: TIntegerField;\r\n lblAnmeldung: TLabel;\r\n WebPanelMenue: TPanel;\r\n panelAnmeldung: TPanel;\r\n WebLabel3: TLabel;\r\n edtBenutzer: TEdit;\r\n edtPassword: TEdit;\r\n btnAnmelden: TButton;\r\n labelonlinestatus: TLabel;\r\n WebDBLabel1: TDBLabel;\r\n XDPersonalPersonalGUID: TStringField;\r\n WebHttpRequest1: THttpRequest;\r\n WClient: TXDataWebClient;\r\n AuthConnection: TXDataWebConnection;\r\n XDPersonalRechteCadiaWEB: TStringField;\r\n Container1: THTMLContainer;\r\n Container2: THTMLContainer;\r\n lblchecklogin: TLabel;\r\n btnLogout: TButton;\r\n btnTermine: TButton;\r\n btnEmails: TButton;\r\n btnAnrufe: TButton;\r\n btnPZE: TButton;\r\n btnTelefonnummern: TButton;\r\n XDPersonalStundensatzIntern: TFloatField;\r\n btnMitteilungen: TButton;\r\n xdsMitteilungen: TXDataWebDataSet;\r\n xdsMitteilungenMSGBoardID: TXDataWebEntityField;\r\n xdsMitteilungenToPersonalnummer: TXDataWebEntityField;\r\n xdsMitteilungenMSGBoardSubID: TStringField;\r\n xdsMitteilungenToNachname: TStringField;\r\n xdsMitteilungenToVorname: TStringField;\r\n xdsMitteilungenDatumGelesen: TDateTimeField;\r\n xdsMitteilungenDatumErledigt: TDateTimeField;\r\n xdsMitteilungenMSGBoardIDFromPersonalnummer: TXDataWebEntityField;\r\n xdsMitteilungenMSGBoardIDID: TStringField;\r\n xdsMitteilungenMSGBoardIDDatum: TDateTimeField;\r\n xdsMitteilungenMSGBoardIDFromNachname: TStringField;\r\n xdsMitteilungenMSGBoardIDFromVorname: TStringField;\r\n xdsMitteilungenMSGBoardIDBetreff: TStringField;\r\n xdsMitteilungenMSGBoardIDNotiz: TStringField;\r\n xdsMitteilungenToPersonalnummerPersonalnummer: TIntegerField;\r\n xdsMitteilungenMSGBoardIDFromPersonalnummerPersonalnummer: TIntegerField;\r\n btnTickets: TButton;\r\n btnBeenden: TButton;\r\n Menue10055: TPanel;\r\n btnLogbuch: TButton;\r\n btnZurueck: TButton;\r\n btnKontakte: TButton;\r\n btnArtikel: TButton;\r\n btnBestellvormerkung: TButton;\r\n btnAngebote: TButton;\r\n btnAuftrag: TButton;\r\n btnLieferscheine: TButton;\r\n btnBelegePositionen: TButton;\r\n btnInventur: TButton;\r\n btn14584: TButton;\r\n procedure setcontrols;\r\n procedure XDPersonalAfterOpen(DataSet: TDataSet);\r\n procedure btnLogoutClick(Sender: TObject);\r\n procedure btnTermineClick(Sender: TObject);\r\n procedure btnArtikelClick(Sender: TObject);\r\n procedure btnAnrufeClick(Sender: TObject);\r\n procedure btnKontakteClick(Sender: TObject);\r\n procedure btnAuftragClick(Sender: TObject);\r\n procedure btnAnmeldenClick(Sender: TObject);\r\n procedure edtBenutzerKeyPress(Sender: TObject; var Key: Char);\r\n procedure edtPasswordKeyPress(Sender: TObject; var Key: Char);\r\n procedure WebHttpRequest1Response(Sender: TObject; AResponse: string);\r\n procedure AuthConnectionConnect(Sender: TObject);\r\n procedure WebFormShow(Sender: TObject);\r\n procedure btnAngeboteClick(Sender: TObject);\r\n procedure btnPZEClick(Sender: TObject);\r\n procedure btnEmailsClick(Sender: TObject);\r\n procedure btnBelegePositionenClick(Sender: TObject);\r\n procedure btnLieferscheineClick(Sender: TObject);\r\n procedure WebFormCreate(Sender: TObject);\r\n procedure WebFormBeforeUnload(Sender: TObject; var AMessage: string);\r\n procedure btnBestellvormerkungClick(Sender: TObject);\r\n procedure btnTelefonnummernClick(Sender: TObject);\r\n procedure btnMitteilungenClick(Sender: TObject);\r\n procedure xdsMitteilungenAfterOpen(DataSet: TDataSet);\r\n procedure btnTicketsClick(Sender: TObject);\r\n procedure btnBeendenClick(Sender: TObject);\r\n procedure btn14584Click(Sender: TObject);\r\n procedure btnZurueckClick(Sender: TObject);\r\n procedure btnLogbuchClick(Sender: TObject);\r\n procedure btnInventurClick(Sender: TObject);\r\n\r\n\r\n\r\n public\r\n type\r\n TRechteCadiaWebR = Record\r\n Zugelassen:boolean;\r\n Kontakte:boolean;\r\n Artikel:boolean;\r\n OffeneAngebote:boolean;\r\n OffeneAuftraege:boolean;\r\n OffeneLieferscheine:boolean;\r\n Termine:boolean;\r\n NurPersTermine:boolean;\r\n Emails:boolean;\r\n BelegePositionen:boolean;\r\n Anrufe:boolean;\r\n Zeiterfassung:boolean;\r\n Einkaufspreise:boolean;\r\n Verkaufspreise:boolean;\r\n Mitteilungen:boolean;\r\n Inventur:boolean;\r\n End;\r\n var RCW:TRechteCadiaWebR;\r\n var RCWLIST:TStringList;\r\n webverlassen:string;\r\n webverlassennichtfragen:boolean;\r\n procedure RCWLISTtoRECORD;\r\n procedure RCWleeren;\r\n procedure AppOnlineChange(Sender:TObject; AStatus: TOnlineStatus);\r\n procedure Tokenholen(Username, Password: string);\r\n function XorStr(const Text: string; Key: Integer): string;\r\n procedure KalkuliereMitteilungen;\r\n function ValidateEmail(const emailAddress: string): Boolean;\r\n function StripSonderzeichen(alterstring:string):string;\r\n protected procedure LoadDFMValues; override; end;\r\n\r\nconst\r\n Versionslabel1='©2025 Cadia Software GmbH Version ';\r\n Versionslabel2='3.2.6';\r\n Versionslabel3='27.03.2025';\r\n Versionslabel4=' (cadia-Webseite)';\r\n CadiaAppKey='991783241';\r\n CadiaAppKeyServerLizenz='123458420';\r\nvar\r\n Form1: TForm1;\r\n Versionslabel:string;\r\n CadiaKundennummer:string;\r\n BenutzerAngemeldet:Boolean;\r\n BenutzerLoginName:string;\r\n BenutzerPasswort:string;\r\n BenutzerPersonalnummer:string;\r\n BenutzerNachname:string;\r\n BenutzerVorname:string;\r\n BenutzerSchreibzeichen:string;\r\n BenutzerEmail:string;\r\n BenutzerFarbe:integer;\r\n BenutzerID:string;\r\n BenutzerStundensatzIntern:double;\r\n TextAbsenderzeile:string;\r\n xdataDATASERVER:string;\r\n xdataconnectionstring:string;\r\n xdataauthconnection:string;\r\n downloadconnection:string;\r\n xdatausername:string;\r\n xdatapassword:string;\r\n Merkerkontaktnummer:string;\r\n MerkerArtikelnummer:string;\r\n LizenzOK:boolean;\r\n vtoken:string;\r\n ajahr, amonat, atag,astunde,aminute,asekunde,ams:word;\r\n scannereinstellung:string;\r\n PZE_AutoObjektnummer:string;\r\n PZE_AutoAuftragnummer:string;\r\n PZE_Objekt_erlaubt:integer;\r\n PZE_Auftrag_erlaubt:integer;\r\n\r\nimplementation\r\n uses unit2, unit_Kontaktsuche, unit_Artikelsuche, unit_Objektsuche, unit_Einzeltermin, unit_EinzelAuftrag, unit_Anrufe, unit_Artikel,\r\n unit_Terminkalender, unit_ListeAuftrag, unit_EinzelKontakt, unit_ListeAngebot, unit_PZE, unit_EmailEingang, unit_BelegeUndPositionen,\r\n unit_ListeLieferschein, unit_Bestellvormerkung, unit_TelefonSuche, unit_Mitteilungen, unit_ListeTickets, unit_GetPhoto, unit_Logbuch,\r\n unit_Inventur;\r\n{$R *.dfm}\r\n\r\nfunction TForm1.XorStr(const Text: string; Key: Integer): string;\r\nvar\r\n i: Integer;\r\nbegin\r\n SetLength(Result, Length(Text));\r\n for i:=1 to Length(Text) do\r\n begin\r\n if Text[i] > #31 then\r\n Result[i] := Chr(Ord(Text[i]) xor Key)\r\n else\r\n Result[i] := Text[i];\r\n end;\r\nend;\r\n\r\nfunction TForm1.ValidateEmail(const emailAddress: string): Boolean;\r\nvar\r\n RegEx: TRegEx;\r\nbegin\r\n RegEx := TRegex.Create('^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\\.[a-zA-Z0-9-.]*[a-zA-Z0-9]+$');\r\n Result := RegEx.Match(emailAddress).Success;\r\nend;\r\n\r\nfunction TForm1.StripSonderzeichen(alterstring:string):string;\r\nvar\r\n neustring:string;\r\nbegin\r\n result:='';\r\n neustring:=trim(alterstring);\r\n neustring:=stringreplace(neustring,'.','_',[rfreplaceall]);\r\n neustring:=stringreplace(neustring,'\\','_',[rfreplaceall]);\r\n neustring:=stringreplace(neustring,'/','_',[rfreplaceall]);\r\n neustring:=stringreplace(neustring,':','_',[rfreplaceall]);\r\n neustring:=stringreplace(neustring,'*','_',[rfreplaceall]);\r\n neustring:=stringreplace(neustring,'*','_',[rfreplaceall]);\r\n neustring:=stringreplace(neustring,'\"','_',[rfreplaceall]);\r\n neustring:=stringreplace(neustring,'~','_',[rfreplaceall]);\r\n neustring:=stringreplace(neustring,'<','_',[rfreplaceall]);\r\n neustring:=stringreplace(neustring,'>','_',[rfreplaceall]);\r\n neustring:=stringreplace(neustring,'|','_',[rfreplaceall]);\r\n neustring:=stringreplace(neustring,'{','_',[rfreplaceall]);\r\n neustring:=stringreplace(neustring,'}','_',[rfreplaceall]);\r\n neustring:=stringreplace(neustring,'[','_',[rfreplaceall]);\r\n neustring:=stringreplace(neustring,']','_',[rfreplaceall]);\r\n neustring:=stringreplace(neustring,' ','_',[rfreplaceall]);\r\n neustring:=stringreplace(neustring,'&','_',[rfreplaceall]);\r\n result:=neustring;\r\nend;\r\n\r\nprocedure TForm1.KalkuliereMitteilungen;\r\nbegin\r\n btnMitteilungen.Caption:='Mitteilungen (-)';\r\n btnMitteilungen.ElementClassName:='btn btn-info btn-sm text-center';\r\n xdsMitteilungen.Close;\r\n xdsMitteilungen.QueryString:='$expand=MSGBoardID, ToPersonalnummer, MSGBoardID/FromPersonalnummer&$filter=(ToPersonalnummer eq '+Benutzerpersonalnummer+') AND (DatumErledigt eq null OR DatumGelesen eq null)&$orderby=MSGBoardID/Datum DESC';\r\n xdsMitteilungen.Load;\r\nend;\r\n\r\nprocedure TForm1.AppOnlineChange(Sender:TObject; AStatus: TOnlineStatus);\r\nbegin\r\n if (Application.IsOnline) then labelonlinestatus.Caption:='online' else labelonlinestatus.Caption:='offline';\r\nend;\r\n\r\nprocedure TForm1.Tokenholen(Username, Password: string);\r\n procedure OnResponse(Response:TXDataClientResponse);\r\n begin\r\n vtoken:=string(TJSObject(response.Result)['value']);\r\n if xdataconnectionstring<>'' then\r\n begin\r\n dm2.XDataWebConnection1.url:=xdataconnectionstring;\r\n dm2.xdatawebconnection1.Connected:=true;\r\n end;\r\n end;\r\nbegin\r\n labelonlinestatus.Caption:='hole token';\r\n WClient.RawInvoke('ILoginService.Login',[Username,Password],@OnResponse);\r\nend;\r\n\r\n\r\n\r\n\r\nprocedure TForm1.AuthConnectionConnect(Sender: TObject);\r\nbegin\r\n Tokenholen(xdatausername,xdatapassword);\r\nend;\r\n\r\nprocedure TForm1.btn14584Click(Sender: TObject);\r\nbegin\r\n //nur für 14584\r\n Menue10055.Visible:=true;\r\n Webpanelmenue.visible:=false;\r\nend;\r\n\r\nprocedure TForm1.btnAngeboteClick(Sender: TObject);\r\nvar\r\n ListeAngebot:TListeAngebot;\r\nbegin\r\n webpanelmenue.Visible:=false;\r\n\r\n\r\n ListeAngebot := TListeAngebot.CreateNew(procedure(AForm: TObject)\r\n begin\r\n\r\n end\r\n );\r\n\r\n ListeAngebot.ShowModal(procedure(AValue: TModalResult)\r\n begin\r\n webpanelmenue.Visible:=true;\r\n end\r\n );\r\nend;\r\n\r\nprocedure TForm1.btnAnmeldenClick(Sender: TObject);\r\nbegin\r\n lblchecklogin.Caption:='';\r\n if edtbenutzer.text='' then\r\n begin\r\n lblchecklogin.Caption:='Sie müssen Ihren Benutzernamen eingeben';\r\n edtbenutzer.SetFocus;\r\n exit;\r\n end;\r\n if edtPassword.text='' then\r\n begin\r\n lblchecklogin.Caption:='Sie müssen Ihr Passwort eingeben';\r\n edtpassword.SetFocus;\r\n exit;\r\n end;\r\n if edtbenutzer.text='superuser' then\r\n begin\r\n lblchecklogin.Caption:='Diesen Benutzer dürfen Sie im WebPortal nicht verwenden';\r\n edtbenutzer.SetFocus;\r\n exit;\r\n\r\n end;\r\n BenutzerLoginName:=edtbenutzer.text;\r\n BenutzerPasswort:=edtpassword.text;\r\n xdpersonal.Close;\r\n xdpersonal.QueryString:='$filter=LoginName eq '''+BenutzerLoginName+'''';\r\n XDPersonal.Load;\r\nend;\r\n\r\nprocedure TForm1.btnAnrufeClick(Sender: TObject);\r\nvar\r\n newform:TfrmAnrufe;\r\nbegin\r\n newform := TfrmAnrufe.CreateNew;\r\nend;\r\n\r\nprocedure TForm1.btnArtikelClick(Sender: TObject);\r\nvar\r\n LFrm:TfrmArtikelsuche;\r\n procedure AfterCreate(AForm:TObject);\r\n var\r\n LForm:TfrmArtikelsuche;\r\n begin\r\n LForm:=(AForm as TfrmArtikelsuche);\r\n lform.weiterzueinzelartikel:=true;\r\n end;\r\n\r\n procedure AfterShowmodal(Avalue:TModalResult);\r\n begin\r\n webpanelmenue.Visible:=true;\r\n end;\r\n\r\n begin\r\n webpanelmenue.Visible:=false;\r\n LFrm:=TfrmArtikelsuche.CreateNew(@AfterCreate);\r\n LFrm.ShowModal(@AfterShowmodal);\r\n\r\nend;\r\n\r\nprocedure TForm1.btnAuftragClick(Sender: TObject);\r\nvar\r\n ListeAuftrag:TListeAuftrag;\r\nbegin\r\n webpanelmenue.Visible:=false;\r\n\r\n\r\nListeAuftrag := TListeAuftrag.CreateNew(procedure(AForm: TObject)\r\n begin\r\n\r\n end\r\n );\r\n\r\n ListeAuftrag.ShowModal(procedure(AValue: TModalResult)\r\n begin\r\n webpanelmenue.Visible:=true;\r\n end\r\n );\r\n\r\n\r\nend;\r\n\r\nprocedure TForm1.btnBeendenClick(Sender: TObject);\r\nbegin\r\n webverlassennichtfragen:=true;\r\n window.close;\r\n try\r\n application.Navigate('https://cadia.de',ntPage);\r\n except\r\n\r\n end;\r\n\r\nend;\r\n\r\nprocedure TForm1.btnBelegePositionenClick(Sender: TObject);\r\nvar\r\n LFrm:TBelegePositionen;\r\n procedure AfterCreate(AForm:TObject);\r\n var\r\n LForm:TBelegePositionen;\r\n begin\r\n LForm:=(AForm as TBelegePositionen);\r\n LForm.BPKundennummer:='';\r\n LForm.BPName:='';\r\n end;\r\n\r\n procedure AfterShowmodal(Avalue:TModalResult);\r\n begin\r\n //MerkerKontaktnummer:=lfrm.Kontaktnummer;\r\n //edtkontaktnummer.Text:=lfrm.Kontaktnummer;\r\n //edtkontaktnummerChange(nil);\r\n //noch implementieren\r\n end;\r\n begin\r\n LFrm:=TBelegePositionen.CreateNew(@AfterCreate);\r\n LFrm.ShowModal(@AfterShowmodal);\r\nend;\r\n\r\nprocedure TForm1.btnBestellvormerkungClick(Sender: TObject);\r\nvar\r\n LFrm:TBestellvormerkung;\r\n procedure AfterCreate(AForm:TObject);\r\n var\r\n LForm:TBestellvormerkung;\r\n begin\r\n LForm:=(AForm as TBestellvormerkung);\r\n end;\r\n\r\n procedure AfterShowmodal(Avalue:TModalResult);\r\n begin\r\n webpanelmenue.Visible:=true;\r\n end;\r\n\r\n begin\r\n webpanelmenue.Visible:=false;\r\n LFrm:=TBestellvormerkung.CreateNew(@AfterCreate);\r\n LFrm.ShowModal(@AfterShowmodal);\r\n\r\nend;\r\n\r\nprocedure TForm1.btnEmailsClick(Sender: TObject);\r\nvar\r\n newform:TEmailEingang;\r\nbegin\r\n newform := TEmailEingang.CreateNew;\r\nend;\r\n\r\nprocedure TForm1.btnInventurClick(Sender: TObject);\r\nvar\r\n LFrm:TfrmInventur;\r\n procedure AfterCreate(AForm:TObject);\r\n var\r\n LForm:TfrmInventur;\r\n begin\r\n LForm:=(AForm as TfrmInventur);\r\n end;\r\n\r\n procedure AfterShowmodal(Avalue:TModalResult);\r\n begin\r\n //MerkerKontaktnummer:=lfrm.Kontaktnummer;\r\n //edtkontaktnummer.Text:=lfrm.Kontaktnummer;\r\n //edtkontaktnummerChange(nil);\r\n //noch implementieren\r\n end;\r\n begin\r\n LFrm:=TfrmInventur.CreateNew(@AfterCreate);\r\n LFrm.ShowModal(@AfterShowmodal);\r\nend;\r\n\r\nprocedure TForm1.btnKontakteClick(Sender: TObject);\r\nvar\r\n LFrm:TfrmKontaktsuche;\r\n procedure AfterCreate(AForm:TObject);\r\n var\r\n LForm:TfrmKontaktsuche;\r\n begin\r\n LForm:=(AForm as TfrmKontaktsuche);\r\n lform.weiterzuEinzelkontakt:=true;\r\n end;\r\n\r\n procedure AfterShowmodal(Avalue:TModalResult);\r\n begin\r\n webpanelmenue.Visible:=true;\r\n end;\r\n\r\n begin\r\n webpanelmenue.Visible:=false;\r\n LFrm:=TfrmKontaktsuche.CreateNew(@AfterCreate);\r\n LFrm.ShowModal(@AfterShowmodal);\r\nend;\r\n\r\nprocedure TForm1.btnLieferscheineClick(Sender: TObject);\r\nvar\r\n newform:TListeLieferschein;\r\nbegin\r\n newform := TListeLieferschein.CreateNew;\r\nend;\r\n\r\nprocedure TForm1.btnLogbuchClick(Sender: TObject);\r\nvar\r\n newform:TfrmLogbuch;\r\nbegin\r\n newform := TfrmLogbuch.CreateNew;\r\n\r\nend;\r\n\r\nprocedure TForm1.btnLogoutClick(Sender: TObject);\r\nbegin\r\n btnlogout.Visible:=false;\r\n dm2.XDataWebConnection1.Connected:=false;\r\n lblchecklogin.Caption:='';\r\n BenutzerAngemeldet:=false;\r\n BenutzerLoginName:='';\r\n BenutzerPasswort:='';\r\n BenutzerPersonalnummer:='';\r\n BenutzerNachname:='';\r\n BenutzerVorname:='';\r\n BenutzerSchreibzeichen:='';\r\n BenutzerEmail:='';\r\n BenutzerStundensatzIntern:=0;\r\n SetControls;\r\nend;\r\n\r\nprocedure TForm1.btnMitteilungenClick(Sender: TObject);\r\nvar\r\n LFrm:TMitteilungen;\r\n procedure AfterCreate(AForm:TObject);\r\n var\r\n LForm:TMitteilungen;\r\n begin\r\n LForm:=(AForm as TMitteilungen);\r\n end;\r\n\r\n procedure AfterShowmodal(Avalue:TModalResult);\r\n begin\r\n webpanelmenue.Visible:=true;\r\n KalkuliereMitteilungen;\r\n end;\r\n\r\n begin\r\n webpanelmenue.Visible:=false;\r\n LFrm:=TMitteilungen.CreateNew(@AfterCreate);\r\n LFrm.ShowModal(@AfterShowmodal);\r\nend;\r\n\r\nprocedure TForm1.btnPZEClick(Sender: TObject);\r\nvar\r\n newform:TPZE;\r\nbegin\r\n PZE_AutoObjektnummer:='';\r\n PZE_AutoAuftragnummer:='';\r\n newform := TPZE.CreateNew;\r\nend;\r\n\r\nprocedure TForm1.btnTelefonnummernClick(Sender: TObject);\r\nvar\r\n LFrm:TfrmTelefonSuche;\r\n procedure AfterCreate(AForm:TObject);\r\n var\r\n LForm:TfrmTelefonSuche;\r\n begin\r\n LForm:=(AForm as TfrmTelefonSuche);\r\n lform.weiterzuEinzelkontakt:=true;\r\n end;\r\n\r\n procedure AfterShowmodal(Avalue:TModalResult);\r\n begin\r\n webpanelmenue.Visible:=true;\r\n\r\n end;\r\n\r\n begin\r\n webpanelmenue.Visible:=false;\r\n LFrm:=TfrmTelefonSuche.CreateNew(@AfterCreate);\r\n LFrm.ShowModal(@AfterShowmodal);\r\n\r\nend;\r\n\r\nprocedure TForm1.btnTermineClick(Sender: TObject);\r\nvar\r\n Terminkalender:TTerminkalender;\r\nbegin\r\n webpanelmenue.Visible:=false;\r\n Terminkalender := TTerminkalender.CreateNew(procedure(AForm: TObject)\r\n begin\r\n\r\n end\r\n );\r\n\r\n Terminkalender.ShowModal(procedure(AValue: TModalResult)\r\n begin\r\n webpanelmenue.Visible:=true;\r\n end\r\n );\r\nend;\r\n\r\nprocedure TForm1.btnTicketsClick(Sender: TObject);\r\nvar\r\n LFrm:TListeTickets;\r\n procedure AfterCreate(AForm:TObject);\r\n var\r\n LForm:TListeTickets;\r\n begin\r\n LForm:=(AForm as TListeTickets);\r\n\r\n end;\r\n\r\n procedure AfterShowmodal(Avalue:TModalResult);\r\n begin\r\n //MerkerKontaktnummer:=lfrm.Kontaktnummer;\r\n //edtkontaktnummer.Text:=lfrm.Kontaktnummer;\r\n //edtkontaktnummerChange(nil);\r\n //noch implementieren\r\n end;\r\n begin\r\n LFrm:=TListeTickets.CreateNew(@AfterCreate);\r\n LFrm.ShowModal(@AfterShowmodal);\r\n\r\nend;\r\n\r\nprocedure TForm1.btnZurueckClick(Sender: TObject);\r\nbegin\r\n Menue10055.Visible:=false;\r\n Webpanelmenue.visible:=true;\r\nend;\r\n\r\nprocedure TForm1.edtBenutzerKeyPress(Sender: TObject; var Key: Char);\r\nbegin\r\nif key=#13 then edtPassword.SetFocus;\r\n\r\nend;\r\n\r\nprocedure TForm1.edtPasswordKeyPress(Sender: TObject; var Key: Char);\r\nbegin\r\nif key=#13 then btnAnmeldenClick(sender);\r\n\r\nend;\r\n\r\nprocedure TForm1.setcontrols;\r\nvar\r\n mylocalstorage:TLocalStorage;\r\n myelement:TJSHTMLElement;\r\nbegin\r\n Container1.html.text:='';\r\n\r\n myelement:=Container1.ElementHandle;\r\n lblAnmeldung.ParentElement:=myelement;\r\n labelonlinestatus.ParentElement:=myelement;\r\n WebDBLabel1.ParentElement:=myelement;\r\n container2.ParentElement:=myelement;\r\n myelement:=container2.ElementHandle;\r\n panelanmeldung.ParentElement:=myelement;\r\n WebPanelMenue.ParentElement:=myelement;\r\n Menue10055.ParentElement:=myelement;\r\n\r\n\r\n if BenutzerAngemeldet then\r\n begin\r\n btnLogout.Visible:=true;\r\n lblAnmeldung.Caption:='User: '+BenutzerPersonalnummer+' | '+BenutzerLoginName+' | '+BenutzerNachname+', '+BenutzerVorname;\r\n WebPanelMenue.Visible:=true;\r\n panelAnmeldung.Visible:=false;\r\n btnkontakte.enabled:=rcw.Kontakte;\r\n btnartikel.enabled:=rcw.Artikel;\r\n btnangebote.enabled:=rcw.OffeneAngebote;\r\n btnauftrag.enabled:=rcw.offeneAuftraege;\r\n btnlieferscheine.enabled:=rcw.offeneLieferscheine;\r\n btntermine.enabled:=rcw.termine;\r\n btnemails.enabled:=rcw.emails;\r\n btnbelegepositionen.enabled:=rcw.belegepositionen;\r\n btnAnrufe.enabled:=rcw.Anrufe;\r\n btnPZE.enabled:=rcw.Zeiterfassung;\r\n btnMitteilungen.Enabled:=RCW.Mitteilungen;\r\n btnInventur.Enabled:=RCW.Inventur;\r\n if CadiaKundennummer='14584' then\r\n begin\r\n btn14584.Visible:=true;\r\n btn14584.Enabled:=true;\r\n end;\r\n end\r\n else\r\n begin\r\n btn14584.Visible:=false;\r\n btn14584.Enabled:=false;\r\n btnLogout.Visible:=false;\r\n lblanmeldung.Caption:='Sie sind nicht angemeldet';\r\n WebPanelMenue.Visible:=false;\r\n panelanmeldung.Visible:=true;\r\n mylocalstorage:=TLocalStorage.Create;\r\n edtBenutzer.text:=mylocalstorage.GetValue('CadiaWEBBenutzer');\r\n scannereinstellung:=mylocalstorage.GetValue('CadiaWEBScanner');\r\n if scannereinstellung='' then scannereinstellung:='11111111111';\r\n mylocalstorage.Free;\r\n edtbenutzer.SetFocus;\r\n if edtbenutzer.Text<>'' then edtPassword.SetFocus;\r\n end;\r\n\r\nend;\r\n\r\nprocedure TForm1.WebFormBeforeUnload(Sender: TObject; var AMessage: string);\r\nbegin\r\n if webverlassennichtfragen=false then AMessage:=webverlassen;\r\nend;\r\n\r\nprocedure TForm1.WebFormCreate(Sender: TObject);\r\nbegin\r\n RCWLIST:=TStringList.Create;\r\n RCWLIST.NameValueSeparator:='|';\r\n PZE_Objekt_erlaubt:=0;\r\n PZE_Auftrag_erlaubt:=0;\r\nend;\r\n\r\nprocedure TForm1.WebFormShow(Sender: TObject);\r\nbegin\r\n CadiaKundennummer:='';\r\n btn14584.visible:=false;\r\n btn14584.Enabled:=false;\r\n btnAnmelden.Enabled:=false;\r\n application.OnOnlineChange:=AppOnlineChange;\r\n Versionslabel:=Versionslabel1+Versionslabel2+' vom '+Versionslabel3+Versionslabel4;\r\n webverlassennichtfragen:=false;\r\n webverlassen:='CadiaWEB verlassen?';\r\n lblchecklogin.Caption:='';\r\n BenutzerStundensatzIntern:=0;\r\n setcontrols;\r\n LizenzOK:=false;\r\n WebHttpRequest1.Execute;\r\nend;\r\n\r\nprocedure TForm1.WebHttpRequest1Response(Sender: TObject; AResponse: string);\r\nvar\r\n RStringList:TStringList;\r\n s:string;\r\nbegin\r\n if aresponse='' then\r\n begin\r\n showmessage('Die Konfigurationsdatei ist nicht vorhanden oder fehlerhaft');\r\n exit;\r\n end;\r\n if aresponse<>'' then\r\n begin\r\n RStringList:=TStringList.Create;\r\n RStringList.Text:=aresponse;\r\n s:= XorStr(RStringList.Strings[0],25);\r\n xdataDATASERVER:=trim(ReplaceStr(s,'DATASERVER=',''));\r\n if RightStr(xdataDATASERVER,1)<>'/' then xdataDATASERVER:=xdataDATASERVER+'/';\r\n xdataconnectionstring:=xdataDATASERVER+'cadiaserver/xdata';\r\n downloadconnection:=xdataDATASERVER+'cadiaserver/filedownload?FileName=';\r\n xdataauthconnection:=xdataDATASERVER+'cadiaserverauth';\r\n s:= XorStr(RStringList.Strings[1],25);\r\n xdatausername:=trim(ReplaceStr(s,'USERNAME=',''));\r\n s:= XorStr(RStringList.Strings[2],25);\r\n xdatapassword:=trim(ReplaceStr(s,'PASSWORD=',''));\r\n AuthConnection.Connected:=false;\r\n AuthConnection.URL:=xdataauthconnection;\r\n authconnection.Connected:=true;\r\n end;\r\nend;\r\n\r\nprocedure TForm1.XDPersonalAfterOpen(DataSet: TDataSet);\r\nvar\r\n mylocalstorage:TLocalStorage;\r\n logbuchurl:string;\r\nbegin\r\n if xdpersonal.RecordCount<1 then\r\n begin\r\n lblchecklogin.Caption:='Anmeldung ist fehlgeschlagen, bitte versuchen Sie es erneut mit den richtigen Eingaben';\r\n xdpersonal.Close;\r\n exit;\r\n end;\r\n xdpersonal.First;\r\n\r\n if (XDPersonalPassword.AsString=BenutzerPasswort) AND (XDPersonalLoginName.AsString=BenutzerLoginName) then\r\n begin\r\n if XDPersonalEnabled.AsBoolean=true then\r\n begin\r\n BenutzerAngemeldet:=true;\r\n BenutzerPersonalnummer:=XDPersonalPersonalnummer.AsString;\r\n BenutzerLoginName:=XDPersonalLoginName.AsString;\r\n BenutzerNachname:=XDPersonalNachname.AsString;\r\n BenutzerVorname:=XDPersonalVorname.AsString;\r\n BenutzerSchreibzeichen:=XDPersonalSchreibzeichen.AsString;\r\n BenutzerEmail:=XDPersonalEmail.AsString;\r\n BenutzerFarbe:=XDPersonalFarbe.AsInteger;\r\n BenutzerID:=XDPersonalPersonalGUID.AsString;\r\n BenutzerStundensatzIntern:=XDPersonalStundensatzIntern.AsFloat;\r\n RCWlist.text:=xdpersonalrechtecadiaweb.asstring;\r\n RCWleeren;\r\n RCWLISTtoRECORD;\r\n mylocalstorage:=Tlocalstorage.Create;\r\n mylocalstorage.SetValue('CadiaWEBBenutzer',BenutzerLoginName);\r\n if scannereinstellung='' then scannereinstellung:='11111111111';\r\n mylocalstorage.SetValue('CadiaWEBScanner',scannereinstellung);\r\n mylocalstorage.Free;\r\n lblchecklogin.Caption:='Anmeldung erfolgreich'+booltostr(rcw.kontakte);\r\n\r\n\r\n //(Kundennummer:string;AppKey:string;UserName:string;UserID:string;Absenderzeile:string;Versiondate:string):string;\r\n logbuchurl:='https://cadia-software.net/cadiaautoserver/xdata/InformationService/cwlogbuch?Kundennummer='+dm2.tableSYSDATCadiaKundennummer.AsString+'&AppKey='+CadiaAppKey+'&UserName='+BenutzerNachname;\r\n logbuchurl:=logbuchurl+'&UserID='+BenutzerID;\r\n //logbuchurl:=logbuchurl+'&Absenderzeile='+Leftstr(dm2.tableSYSDATAbsenderzeile.asstring,70);\r\n if textabsenderzeile='' then TextAbsenderzeile:='unbekannt';\r\n\r\n logbuchurl:=logbuchurl+'&Absenderzeile='+TextAbsenderzeile;\r\n logbuchurl:=logbuchurl+'&Versiondate='+Versionslabel3;\r\n logbuchurl:=logbuchurl+'&Versionnumber='+Versionslabel2;\r\n dm2.WebHttpRequestLogbuch.URL:=logbuchurl;\r\n\r\n dm2.WebHttpRequestLogbuch.Execute;\r\n KalkuliereMitteilungen;\r\n end\r\n else\r\n begin\r\n lblchecklogin.Caption:='Dieser Benutzer ist nicht zugelassen';\r\n end;\r\n end\r\n else\r\n begin\r\n lblchecklogin.Caption:='Anmeldung ist fehlgeschlagen, bitte versuchen Sie es erneut mit den richtigen Eingaben';\r\n end;\r\n\r\n xdpersonal.Close;\r\n form1.SetControls;\r\nend;\r\n\r\n\r\nprocedure TForm1.xdsMitteilungenAfterOpen(DataSet: TDataSet);\r\nbegin\r\n btnMitteilungen.Caption:='Mitteilungen ('+inttostr(xdsMitteilungen.RecordCount)+')';\r\n if xdsMitteilungen.RecordCount>0 then\r\n begin\r\n btnMitteilungen.ElementClassName:='btn btn-danger btn-sm text-center m-1';\r\n end\r\n else\r\n begin\r\n btnMitteilungen.ElementClassName:='btn btn-info btn-sm text-center m-1';\r\n end;\r\n xdsMitteilungen.Close;\r\nend;\r\n\r\nprocedure TForm1.RCWLISTtoRECORD;\r\nbegin\r\n\r\n if RCWLIST.Values['Zugelassen']<>'' then RCW.Zugelassen:=strtobool(RCWLIST.Values['Zugelassen']) else RCW.Zugelassen:=TRUE;\r\n if RCWLIST.Values['Kontakte']<>'' then RCW.Kontakte:=strtobool(RCWLIST.Values['Kontakte']) else RCW.Kontakte:=TRUE;\r\n if RCWLIST.Values['Artikel']<>'' then RCW.Artikel:=strtobool(RCWLIST.Values['Artikel']) else RCW.Artikel:=TRUE;\r\n if RCWLIST.Values['OffeneAngebote']<>'' then RCW.OffeneAngebote:=strtobool(RCWLIST.Values['OffeneAngebote']) else RCW.OffeneAngebote:=TRUE;\r\n if RCWLIST.Values['OffeneAuftraege']<>'' then RCW.OffeneAuftraege:=strtobool(RCWLIST.Values['OffeneAuftraege']) else RCW.OffeneAuftraege:=TRUE;\r\n if RCWLIST.Values['OffeneLieferscheine']<>'' then RCW.OffeneLieferscheine:=strtobool(RCWLIST.Values['OffeneLieferscheine']) else RCW.OffeneLieferscheine:=TRUE;\r\n if RCWLIST.Values['Termine']<>'' then RCW.Termine:=strtobool(RCWLIST.Values['Termine']) else RCW.Termine:=TRUE;\r\n if RCWLIST.Values['NurPersTermine']<>'' then RCW.NurPersTermine:=strtobool(RCWLIST.Values['NurPersTermine']) else RCW.NurPersTermine:=FALSE;\r\n if RCWLIST.Values['Emails']<>'' then RCW.Emails:=strtobool(RCWLIST.Values['Emails']) else RCW.Emails:=TRUE;\r\n if RCWLIST.Values['BelegePositionen']<>'' then RCW.BelegePositionen:=strtobool(RCWLIST.Values['BelegePositionen']) else RCW.BelegePositionen:=TRUE;\r\n if RCWLIST.Values['Anrufe']<>'' then RCW.Anrufe:=strtobool(RCWLIST.Values['Anrufe']) else RCW.Anrufe:=TRUE;\r\n if RCWLIST.Values['Zeiterfassung']<>'' then RCW.Zeiterfassung:=strtobool(RCWLIST.Values['Zeiterfassung']) else RCW.Zeiterfassung:=TRUE;\r\n if RCWLIST.Values['Einkaufspreise']<>'' then RCW.Einkaufspreise:=strtobool(RCWLIST.Values['Einkaufspreise']) else RCW.Einkaufspreise:=TRUE;\r\n if RCWLIST.Values['Verkaufspreise']<>'' then RCW.Verkaufspreise:=strtobool(RCWLIST.Values['Verkaufspreise']) else RCW.Verkaufspreise:=TRUE;\r\n if RCWLIST.Values['Mitteilungen']<>'' then RCW.Mitteilungen:=strtobool(RCWLIST.Values['Mitteilungen']) else RCW.Mitteilungen:=TRUE;\r\n if RCWLIST.Values['Inventur']<>'' then RCW.Inventur:=strtobool(RCWLIST.Values['Inventur']) else RCW.Inventur:=TRUE;\r\nend;\r\n\r\nprocedure TForm1.RCWleeren;\r\nbegin\r\n RCW.Zugelassen:=True;\r\n RCW.Kontakte:=True;\r\n RCW.Artikel:=True;\r\n RCW.OffeneAngebote:=True;\r\n RCW.OffeneAuftraege:=True;\r\n RCW.OffeneLieferscheine:=True;\r\n RCW.Termine:=True;\r\n RCW.NurPersTermine:=false;\r\n RCW.Emails:=True;\r\n RCW.BelegePositionen:=True;\r\n RCW.Anrufe:=True;\r\n RCW.Zeiterfassung:=True;\r\n RCW.Einkaufspreise:=True;\r\n RCW.Verkaufspreise:=True;\r\n RCW.Mitteilungen:=True;\r\n RCW.Inventur:=True;\r\nend;\r\n\r\nprocedure TForm1.LoadDFMValues;\r\nbegin\r\n inherited LoadDFMValues;\r\n\r\n lblAnmeldung := TLabel.Create(Self);\r\n labelonlinestatus := TLabel.Create(Self);\r\n WebDBLabel1 := TDBLabel.Create(Self);\r\n panelAnmeldung := TPanel.Create(Self);\r\n WebLabel3 := TLabel.Create(Self);\r\n lblchecklogin := TLabel.Create(Self);\r\n edtBenutzer := TEdit.Create(Self);\r\n edtPassword := TEdit.Create(Self);\r\n btnAnmelden := TButton.Create(Self);\r\n Container1 := THTMLContainer.Create(Self);\r\n Container2 := THTMLContainer.Create(Self);\r\n WebPanelMenue := TPanel.Create(Self);\r\n btnLogout := TButton.Create(Self);\r\n btnTermine := TButton.Create(Self);\r\n btnEmails := TButton.Create(Self);\r\n btnAnrufe := TButton.Create(Self);\r\n btnPZE := TButton.Create(Self);\r\n btnTelefonnummern := TButton.Create(Self);\r\n btnMitteilungen := TButton.Create(Self);\r\n btnTickets := TButton.Create(Self);\r\n btnBeenden := TButton.Create(Self);\r\n btnKontakte := TButton.Create(Self);\r\n btnArtikel := TButton.Create(Self);\r\n btnBestellvormerkung := TButton.Create(Self);\r\n btnAngebote := TButton.Create(Self);\r\n btnAuftrag := TButton.Create(Self);\r\n btnLieferscheine := TButton.Create(Self);\r\n btnBelegePositionen := TButton.Create(Self);\r\n btnInventur := TButton.Create(Self);\r\n btn14584 := TButton.Create(Self);\r\n Menue10055 := TPanel.Create(Self);\r\n btnLogbuch := TButton.Create(Self);\r\n btnZurueck := TButton.Create(Self);\r\n XDPersonal := TXDataWebDataSet.Create(Self);\r\n XDPersonalPersonalnummer := TIntegerField.Create(Self);\r\n XDPersonalNachname := TStringField.Create(Self);\r\n XDPersonalVorname := TStringField.Create(Self);\r\n XDPersonalSchreibzeichen := TStringField.Create(Self);\r\n XDPersonalLoginName := TStringField.Create(Self);\r\n XDPersonalPassword := TStringField.Create(Self);\r\n XDPersonalEnabled := TBooleanField.Create(Self);\r\n XDPersonalEmail := TStringField.Create(Self);\r\n XDPersonalFarbe := TIntegerField.Create(Self);\r\n XDPersonalPersonalGUID := TStringField.Create(Self);\r\n XDPersonalRechteCadiaWEB := TStringField.Create(Self);\r\n XDPersonalStundensatzIntern := TFloatField.Create(Self);\r\n WebHttpRequest1 := THttpRequest.Create(Self);\r\n WClient := TXDataWebClient.Create(Self);\r\n AuthConnection := TXDataWebConnection.Create(Self);\r\n xdsMitteilungen := TXDataWebDataSet.Create(Self);\r\n xdsMitteilungenMSGBoardID := TXDataWebEntityField.Create(Self);\r\n xdsMitteilungenToPersonalnummer := TXDataWebEntityField.Create(Self);\r\n xdsMitteilungenMSGBoardSubID := TStringField.Create(Self);\r\n xdsMitteilungenToNachname := TStringField.Create(Self);\r\n xdsMitteilungenToVorname := TStringField.Create(Self);\r\n xdsMitteilungenDatumGelesen := TDateTimeField.Create(Self);\r\n xdsMitteilungenDatumErledigt := TDateTimeField.Create(Self);\r\n xdsMitteilungenMSGBoardIDFromPersonalnummer := TXDataWebEntityField.Create(Self);\r\n xdsMitteilungenMSGBoardIDID := TStringField.Create(Self);\r\n xdsMitteilungenMSGBoardIDDatum := TDateTimeField.Create(Self);\r\n xdsMitteilungenMSGBoardIDFromNachname := TStringField.Create(Self);\r\n xdsMitteilungenMSGBoardIDFromVorname := TStringField.Create(Self);\r\n xdsMitteilungenMSGBoardIDBetreff := TStringField.Create(Self);\r\n xdsMitteilungenMSGBoardIDNotiz := TStringField.Create(Self);\r\n xdsMitteilungenToPersonalnummerPersonalnummer := TIntegerField.Create(Self);\r\n xdsMitteilungenMSGBoardIDFromPersonalnummerPersonalnummer := TIntegerField.Create(Self);\r\n\r\n lblAnmeldung.BeforeLoadDFMValues;\r\n labelonlinestatus.BeforeLoadDFMValues;\r\n WebDBLabel1.BeforeLoadDFMValues;\r\n panelAnmeldung.BeforeLoadDFMValues;\r\n WebLabel3.BeforeLoadDFMValues;\r\n lblchecklogin.BeforeLoadDFMValues;\r\n edtBenutzer.BeforeLoadDFMValues;\r\n edtPassword.BeforeLoadDFMValues;\r\n btnAnmelden.BeforeLoadDFMValues;\r\n Container1.BeforeLoadDFMValues;\r\n Container2.BeforeLoadDFMValues;\r\n WebPanelMenue.BeforeLoadDFMValues;\r\n btnLogout.BeforeLoadDFMValues;\r\n btnTermine.BeforeLoadDFMValues;\r\n btnEmails.BeforeLoadDFMValues;\r\n btnAnrufe.BeforeLoadDFMValues;\r\n btnPZE.BeforeLoadDFMValues;\r\n btnTelefonnummern.BeforeLoadDFMValues;\r\n btnMitteilungen.BeforeLoadDFMValues;\r\n btnTickets.BeforeLoadDFMValues;\r\n btnBeenden.BeforeLoadDFMValues;\r\n btnKontakte.BeforeLoadDFMValues;\r\n btnArtikel.BeforeLoadDFMValues;\r\n btnBestellvormerkung.BeforeLoadDFMValues;\r\n btnAngebote.BeforeLoadDFMValues;\r\n btnAuftrag.BeforeLoadDFMValues;\r\n btnLieferscheine.BeforeLoadDFMValues;\r\n btnBelegePositionen.BeforeLoadDFMValues;\r\n btnInventur.BeforeLoadDFMValues;\r\n btn14584.BeforeLoadDFMValues;\r\n Menue10055.BeforeLoadDFMValues;\r\n btnLogbuch.BeforeLoadDFMValues;\r\n btnZurueck.BeforeLoadDFMValues;\r\n XDPersonal.BeforeLoadDFMValues;\r\n XDPersonalPersonalnummer.BeforeLoadDFMValues;\r\n XDPersonalNachname.BeforeLoadDFMValues;\r\n XDPersonalVorname.BeforeLoadDFMValues;\r\n XDPersonalSchreibzeichen.BeforeLoadDFMValues;\r\n XDPersonalLoginName.BeforeLoadDFMValues;\r\n XDPersonalPassword.BeforeLoadDFMValues;\r\n XDPersonalEnabled.BeforeLoadDFMValues;\r\n XDPersonalEmail.BeforeLoadDFMValues;\r\n XDPersonalFarbe.BeforeLoadDFMValues;\r\n XDPersonalPersonalGUID.BeforeLoadDFMValues;\r\n XDPersonalRechteCadiaWEB.BeforeLoadDFMValues;\r\n XDPersonalStundensatzIntern.BeforeLoadDFMValues;\r\n WebHttpRequest1.BeforeLoadDFMValues;\r\n WClient.BeforeLoadDFMValues;\r\n AuthConnection.BeforeLoadDFMValues;\r\n xdsMitteilungen.BeforeLoadDFMValues;\r\n xdsMitteilungenMSGBoardID.BeforeLoadDFMValues;\r\n xdsMitteilungenToPersonalnummer.BeforeLoadDFMValues;\r\n xdsMitteilungenMSGBoardSubID.BeforeLoadDFMValues;\r\n xdsMitteilungenToNachname.BeforeLoadDFMValues;\r\n xdsMitteilungenToVorname.BeforeLoadDFMValues;\r\n xdsMitteilungenDatumGelesen.BeforeLoadDFMValues;\r\n xdsMitteilungenDatumErledigt.BeforeLoadDFMValues;\r\n xdsMitteilungenMSGBoardIDFromPersonalnummer.BeforeLoadDFMValues;\r\n xdsMitteilungenMSGBoardIDID.BeforeLoadDFMValues;\r\n xdsMitteilungenMSGBoardIDDatum.BeforeLoadDFMValues;\r\n xdsMitteilungenMSGBoardIDFromNachname.BeforeLoadDFMValues;\r\n xdsMitteilungenMSGBoardIDFromVorname.BeforeLoadDFMValues;\r\n xdsMitteilungenMSGBoardIDBetreff.BeforeLoadDFMValues;\r\n xdsMitteilungenMSGBoardIDNotiz.BeforeLoadDFMValues;\r\n xdsMitteilungenToPersonalnummerPersonalnummer.BeforeLoadDFMValues;\r\n xdsMitteilungenMSGBoardIDFromPersonalnummerPersonalnummer.BeforeLoadDFMValues;\r\n try\r\n Name := 'Form1';\r\n Width := 637;\r\n Height := 585;\r\n CSSLibrary := cssBootstrap;\r\n ElementFont := efCSS;\r\n SetEvent(Self, 'OnBeforeUnload', 'WebFormBeforeUnload');\r\n SetEvent(Self, 'OnCreate', 'WebFormCreate');\r\n SetEvent(Self, 'OnShow', 'WebFormShow');\r\n lblAnmeldung.SetParentComponent(Self);\r\n lblAnmeldung.Name := 'lblAnmeldung';\r\n lblAnmeldung.Left := -1;\r\n lblAnmeldung.Top := 458;\r\n lblAnmeldung.Width := 76;\r\n lblAnmeldung.Height := 15;\r\n lblAnmeldung.Margins.Top := 0;\r\n lblAnmeldung.Margins.Bottom := 0;\r\n lblAnmeldung.Caption := 'lblAnmeldung';\r\n lblAnmeldung.ElementClassName := 'h6 m-2';\r\n lblAnmeldung.ElementFont := efCSS;\r\n lblAnmeldung.ElementPosition := epIgnore;\r\n lblAnmeldung.HeightPercent := 100.000000000000000000;\r\n lblAnmeldung.WidthPercent := 100.000000000000000000;\r\n labelonlinestatus.SetParentComponent(Self);\r\n labelonlinestatus.Name := 'labelonlinestatus';\r\n labelonlinestatus.Left := 0;\r\n labelonlinestatus.Top := 493;\r\n labelonlinestatus.Width := 89;\r\n labelonlinestatus.Height := 15;\r\n labelonlinestatus.Caption := 'labelonlinestatus';\r\n labelonlinestatus.ElementClassName := 'h6 small m-2';\r\n labelonlinestatus.ElementFont := efCSS;\r\n labelonlinestatus.HeightPercent := 100.000000000000000000;\r\n labelonlinestatus.WidthPercent := 100.000000000000000000;\r\n WebDBLabel1.SetParentComponent(Self);\r\n WebDBLabel1.Name := 'WebDBLabel1';\r\n WebDBLabel1.Left := 1;\r\n WebDBLabel1.Top := 512;\r\n WebDBLabel1.Width := 73;\r\n WebDBLabel1.Height := 15;\r\n WebDBLabel1.Caption := 'WebDBLabel1';\r\n WebDBLabel1.ElementClassName := 'h6 small m-2';\r\n WebDBLabel1.ElementFont := efCSS;\r\n WebDBLabel1.HeightPercent := 100.000000000000000000;\r\n WebDBLabel1.WidthPercent := 100.000000000000000000;\r\n WebDBLabel1.DataField := 'CadiaKundennummer';\r\n WebDBLabel1.DataSource := DM2.sourceSysdat;\r\n panelAnmeldung.SetParentComponent(Self);\r\n panelAnmeldung.Name := 'panelAnmeldung';\r\n panelAnmeldung.Left := 8;\r\n panelAnmeldung.Top := 35;\r\n panelAnmeldung.Width := 300;\r\n panelAnmeldung.Height := 238;\r\n panelAnmeldung.ElementClassName := 'card m-1 border-info';\r\n panelAnmeldung.Caption := 'panelAnmeldung';\r\n panelAnmeldung.Color := 8340248;\r\n panelAnmeldung.ElementFont := efCSS;\r\n panelAnmeldung.ElementPosition := epIgnore;\r\n panelAnmeldung.ShowCaption := False;\r\n panelAnmeldung.TabOrder := 0;\r\n WebLabel3.SetParentComponent(panelAnmeldung);\r\n WebLabel3.Name := 'WebLabel3';\r\n WebLabel3.Left := 24;\r\n WebLabel3.Top := 13;\r\n WebLabel3.Width := 63;\r\n WebLabel3.Height := 15;\r\n WebLabel3.Caption := 'Anmeldung';\r\n WebLabel3.ElementClassName := 'h3 text-info m-1';\r\n WebLabel3.ElementFont := efCSS;\r\n WebLabel3.ElementPosition := epIgnore;\r\n WebLabel3.HeightPercent := 100.000000000000000000;\r\n WebLabel3.WidthPercent := 100.000000000000000000;\r\n lblchecklogin.SetParentComponent(panelAnmeldung);\r\n lblchecklogin.Name := 'lblchecklogin';\r\n lblchecklogin.Left := 0;\r\n lblchecklogin.Top := 198;\r\n lblchecklogin.Width := 71;\r\n lblchecklogin.Height := 15;\r\n lblchecklogin.Caption := 'lblchecklogin';\r\n lblchecklogin.ChildOrder := 5;\r\n lblchecklogin.ElementClassName := 'h6 text-danger';\r\n lblchecklogin.ElementFont := efCSS;\r\n lblchecklogin.HeightStyle := ssAuto;\r\n lblchecklogin.HeightPercent := 100.000000000000000000;\r\n lblchecklogin.WordWrap := True;\r\n lblchecklogin.WidthStyle := ssAuto;\r\n lblchecklogin.WidthPercent := 100.000000000000000000;\r\n edtBenutzer.SetParentComponent(panelAnmeldung);\r\n edtBenutzer.Name := 'edtBenutzer';\r\n edtBenutzer.Left := 24;\r\n edtBenutzer.Top := 54;\r\n edtBenutzer.Width := 153;\r\n edtBenutzer.Height := 25;\r\n edtBenutzer.ChildOrder := 1;\r\n edtBenutzer.ElementClassName := 'form-control m-1';\r\n edtBenutzer.ElementFont := efCSS;\r\n edtBenutzer.ElementPosition := epIgnore;\r\n edtBenutzer.HeightStyle := ssAuto;\r\n edtBenutzer.HeightPercent := 100.000000000000000000;\r\n edtBenutzer.TextHint := 'Benutzername';\r\n edtBenutzer.WidthPercent := 100.000000000000000000;\r\n SetEvent(edtBenutzer, Self, 'OnKeyPress', 'edtBenutzerKeyPress');\r\n edtPassword.SetParentComponent(panelAnmeldung);\r\n edtPassword.Name := 'edtPassword';\r\n edtPassword.Left := 24;\r\n edtPassword.Top := 105;\r\n edtPassword.Width := 153;\r\n edtPassword.Height := 25;\r\n edtPassword.ChildOrder := 2;\r\n edtPassword.ElementClassName := 'form-control m-1';\r\n edtPassword.ElementFont := efCSS;\r\n edtPassword.ElementPosition := epIgnore;\r\n edtPassword.HeightStyle := ssAuto;\r\n edtPassword.HeightPercent := 100.000000000000000000;\r\n edtPassword.PasswordChar := '*';\r\n edtPassword.TabOrder := 1;\r\n edtPassword.TextHint := 'Passwort';\r\n edtPassword.WidthPercent := 100.000000000000000000;\r\n SetEvent(edtPassword, Self, 'OnKeyPress', 'edtPasswordKeyPress');\r\n btnAnmelden.SetParentComponent(panelAnmeldung);\r\n btnAnmelden.Name := 'btnAnmelden';\r\n btnAnmelden.Left := 80;\r\n btnAnmelden.Top := 152;\r\n btnAnmelden.Width := 96;\r\n btnAnmelden.Height := 41;\r\n btnAnmelden.Caption := 'Anmelden';\r\n btnAnmelden.ChildOrder := 4;\r\n btnAnmelden.ElementClassName := 'btn btn-info m-1 text-left';\r\n btnAnmelden.ElementFont := efCSS;\r\n btnAnmelden.ElementPosition := epIgnore;\r\n btnAnmelden.HeightStyle := ssAuto;\r\n btnAnmelden.HeightPercent := 100.000000000000000000;\r\n btnAnmelden.TabOrder := 2;\r\n btnAnmelden.WidthStyle := ssAuto;\r\n btnAnmelden.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnAnmelden, Self, 'OnClick', 'btnAnmeldenClick');\r\n Container1.SetParentComponent(Self);\r\n Container1.Name := 'Container1';\r\n Container1.Left := 0;\r\n Container1.Top := 0;\r\n Container1.Width := 169;\r\n Container1.Height := 41;\r\n Container1.HeightStyle := ssAuto;\r\n Container1.WidthStyle := ssPercent;\r\n Container1.ChildOrder := 1;\r\n Container1.ElementFont := efCSS;\r\n Container1.ElementPosition := epIgnore;\r\n Container2.SetParentComponent(Self);\r\n Container2.Name := 'Container2';\r\n Container2.Left := 0;\r\n Container2.Top := 47;\r\n Container2.Width := 169;\r\n Container2.Height := 41;\r\n Container2.ElementClassName := 'col d-flex justify-content-center';\r\n Container2.HeightStyle := ssAuto;\r\n Container2.WidthStyle := ssAuto;\r\n Container2.ChildOrder := 5;\r\n Container2.ElementFont := efCSS;\r\n Container2.ElementPosition := epIgnore;\r\n WebPanelMenue.SetParentComponent(Self);\r\n WebPanelMenue.Name := 'WebPanelMenue';\r\n WebPanelMenue.Left := 32;\r\n WebPanelMenue.Top := 131;\r\n WebPanelMenue.Width := 400;\r\n WebPanelMenue.Height := 375;\r\n WebPanelMenue.ElementClassName := 'card m-1 border-info';\r\n WebPanelMenue.Caption := 'WebPanelMenue';\r\n WebPanelMenue.Color := 8340248;\r\n WebPanelMenue.ElementFont := efCSS;\r\n WebPanelMenue.ShowCaption := False;\r\n WebPanelMenue.TabOrder := 3;\r\n btnLogout.SetParentComponent(WebPanelMenue);\r\n btnLogout.Name := 'btnLogout';\r\n btnLogout.Left := 203;\r\n btnLogout.Top := 287;\r\n btnLogout.Width := 180;\r\n btnLogout.Height := 30;\r\n btnLogout.Caption := 'Abmelden';\r\n btnLogout.ChildOrder := 7;\r\n btnLogout.ElementClassName := 'btn btn-info btn-sm text-center m-1';\r\n btnLogout.ElementFont := efCSS;\r\n btnLogout.HeightStyle := ssAuto;\r\n btnLogout.HeightPercent := 100.000000000000000000;\r\n btnLogout.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnLogout, Self, 'OnClick', 'btnLogoutClick');\r\n btnTermine.SetParentComponent(WebPanelMenue);\r\n btnTermine.Name := 'btnTermine';\r\n btnTermine.Left := 203;\r\n btnTermine.Top := 8;\r\n btnTermine.Width := 180;\r\n btnTermine.Height := 30;\r\n btnTermine.Caption := 'Termine';\r\n btnTermine.ChildOrder := 11;\r\n btnTermine.ElementClassName := 'btn btn-info btn-sm text-sm text-center m-1';\r\n btnTermine.ElementFont := efCSS;\r\n btnTermine.HeightStyle := ssAuto;\r\n btnTermine.HeightPercent := 100.000000000000000000;\r\n btnTermine.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnTermine, Self, 'OnClick', 'btnTermineClick');\r\n btnEmails.SetParentComponent(WebPanelMenue);\r\n btnEmails.Name := 'btnEmails';\r\n btnEmails.Left := 203;\r\n btnEmails.Top := 48;\r\n btnEmails.Width := 180;\r\n btnEmails.Height := 30;\r\n btnEmails.Caption := 'Emails';\r\n btnEmails.ChildOrder := 11;\r\n btnEmails.ElementClassName := 'btn btn-info btn-sm text-center m-1';\r\n btnEmails.ElementFont := efCSS;\r\n btnEmails.HeightStyle := ssAuto;\r\n btnEmails.HeightPercent := 100.000000000000000000;\r\n btnEmails.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnEmails, Self, 'OnClick', 'btnEmailsClick');\r\n btnAnrufe.SetParentComponent(WebPanelMenue);\r\n btnAnrufe.Name := 'btnAnrufe';\r\n btnAnrufe.Left := 203;\r\n btnAnrufe.Top := 88;\r\n btnAnrufe.Width := 180;\r\n btnAnrufe.Height := 30;\r\n btnAnrufe.Caption := 'Anrufe';\r\n btnAnrufe.ChildOrder := 11;\r\n btnAnrufe.ElementClassName := 'btn btn-info btn-sm text-center m-1';\r\n btnAnrufe.ElementFont := efCSS;\r\n btnAnrufe.HeightStyle := ssAuto;\r\n btnAnrufe.HeightPercent := 100.000000000000000000;\r\n btnAnrufe.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnAnrufe, Self, 'OnClick', 'btnAnrufeClick');\r\n btnPZE.SetParentComponent(WebPanelMenue);\r\n btnPZE.Name := 'btnPZE';\r\n btnPZE.Left := 203;\r\n btnPZE.Top := 127;\r\n btnPZE.Width := 180;\r\n btnPZE.Height := 30;\r\n btnPZE.Caption := 'Zeiterfassung (PZE)';\r\n btnPZE.ChildOrder := 11;\r\n btnPZE.ElementClassName := 'btn btn-info btn-sm text-center m-1';\r\n btnPZE.ElementFont := efCSS;\r\n btnPZE.HeightStyle := ssAuto;\r\n btnPZE.HeightPercent := 100.000000000000000000;\r\n btnPZE.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnPZE, Self, 'OnClick', 'btnPZEClick');\r\n btnTelefonnummern.SetParentComponent(WebPanelMenue);\r\n btnTelefonnummern.Name := 'btnTelefonnummern';\r\n btnTelefonnummern.Left := 203;\r\n btnTelefonnummern.Top := 167;\r\n btnTelefonnummern.Width := 180;\r\n btnTelefonnummern.Height := 30;\r\n btnTelefonnummern.Caption := 'Telefonnummern';\r\n btnTelefonnummern.ChildOrder := 11;\r\n btnTelefonnummern.ElementClassName := 'btn btn-info btn-sm text-center m-1';\r\n btnTelefonnummern.ElementFont := efCSS;\r\n btnTelefonnummern.HeightStyle := ssAuto;\r\n btnTelefonnummern.HeightPercent := 100.000000000000000000;\r\n btnTelefonnummern.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnTelefonnummern, Self, 'OnClick', 'btnTelefonnummernClick');\r\n btnMitteilungen.SetParentComponent(WebPanelMenue);\r\n btnMitteilungen.Name := 'btnMitteilungen';\r\n btnMitteilungen.Left := 203;\r\n btnMitteilungen.Top := 207;\r\n btnMitteilungen.Width := 180;\r\n btnMitteilungen.Height := 30;\r\n btnMitteilungen.Caption := 'Mitteilungen';\r\n btnMitteilungen.ChildOrder := 11;\r\n btnMitteilungen.ElementClassName := 'btn btn-info btn-sm text-center m-1';\r\n btnMitteilungen.ElementFont := efCSS;\r\n btnMitteilungen.HeightStyle := ssAuto;\r\n btnMitteilungen.HeightPercent := 100.000000000000000000;\r\n btnMitteilungen.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnMitteilungen, Self, 'OnClick', 'btnMitteilungenClick');\r\n btnTickets.SetParentComponent(WebPanelMenue);\r\n btnTickets.Name := 'btnTickets';\r\n btnTickets.Left := 203;\r\n btnTickets.Top := 247;\r\n btnTickets.Width := 180;\r\n btnTickets.Height := 30;\r\n btnTickets.Caption := 'Tickets';\r\n btnTickets.ChildOrder := 11;\r\n btnTickets.ElementClassName := 'btn btn-info btn-sm text-center m-1';\r\n btnTickets.ElementFont := efCSS;\r\n btnTickets.HeightStyle := ssAuto;\r\n btnTickets.HeightPercent := 100.000000000000000000;\r\n btnTickets.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnTickets, Self, 'OnClick', 'btnTicketsClick');\r\n btnBeenden.SetParentComponent(WebPanelMenue);\r\n btnBeenden.Name := 'btnBeenden';\r\n btnBeenden.Left := 203;\r\n btnBeenden.Top := 327;\r\n btnBeenden.Width := 180;\r\n btnBeenden.Height := 30;\r\n btnBeenden.Caption := 'Schliessen';\r\n btnBeenden.ChildOrder := 7;\r\n btnBeenden.ElementClassName := 'btn btn-info btn-sm text-center m-1';\r\n btnBeenden.ElementFont := efCSS;\r\n btnBeenden.HeightStyle := ssAuto;\r\n btnBeenden.HeightPercent := 100.000000000000000000;\r\n btnBeenden.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnBeenden, Self, 'OnClick', 'btnBeendenClick');\r\n btnKontakte.SetParentComponent(WebPanelMenue);\r\n btnKontakte.Name := 'btnKontakte';\r\n btnKontakte.Left := 3;\r\n btnKontakte.Top := 8;\r\n btnKontakte.Width := 180;\r\n btnKontakte.Height := 30;\r\n btnKontakte.Caption := 'Kontakte';\r\n btnKontakte.ChildOrder := 11;\r\n btnKontakte.ElementClassName := 'btn btn-info btn-sm text-center m-1';\r\n btnKontakte.ElementFont := efCSS;\r\n btnKontakte.HeightStyle := ssAuto;\r\n btnKontakte.HeightPercent := 100.000000000000000000;\r\n btnKontakte.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnKontakte, Self, 'OnClick', 'btnKontakteClick');\r\n btnArtikel.SetParentComponent(WebPanelMenue);\r\n btnArtikel.Name := 'btnArtikel';\r\n btnArtikel.Left := 3;\r\n btnArtikel.Top := 48;\r\n btnArtikel.Width := 180;\r\n btnArtikel.Height := 30;\r\n btnArtikel.Caption := 'Artikel';\r\n btnArtikel.ChildOrder := 11;\r\n btnArtikel.ElementClassName := 'btn btn-info btn-sm text-center m-1';\r\n btnArtikel.ElementFont := efCSS;\r\n btnArtikel.HeightStyle := ssAuto;\r\n btnArtikel.HeightPercent := 100.000000000000000000;\r\n btnArtikel.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnArtikel, Self, 'OnClick', 'btnArtikelClick');\r\n btnBestellvormerkung.SetParentComponent(WebPanelMenue);\r\n btnBestellvormerkung.Name := 'btnBestellvormerkung';\r\n btnBestellvormerkung.Left := 3;\r\n btnBestellvormerkung.Top := 88;\r\n btnBestellvormerkung.Width := 180;\r\n btnBestellvormerkung.Height := 30;\r\n btnBestellvormerkung.Caption := 'Bestellvormerkung';\r\n btnBestellvormerkung.ChildOrder := 11;\r\n btnBestellvormerkung.ElementClassName := 'btn btn-info btn-sm text-center m-1';\r\n btnBestellvormerkung.ElementFont := efCSS;\r\n btnBestellvormerkung.HeightStyle := ssAuto;\r\n btnBestellvormerkung.HeightPercent := 100.000000000000000000;\r\n btnBestellvormerkung.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnBestellvormerkung, Self, 'OnClick', 'btnBestellvormerkungClick');\r\n btnAngebote.SetParentComponent(WebPanelMenue);\r\n btnAngebote.Name := 'btnAngebote';\r\n btnAngebote.Left := 3;\r\n btnAngebote.Top := 127;\r\n btnAngebote.Width := 180;\r\n btnAngebote.Height := 30;\r\n btnAngebote.Caption := 'Angebote (offen)';\r\n btnAngebote.ChildOrder := 11;\r\n btnAngebote.ElementClassName := 'btn btn-info btn-sm text-center m-1';\r\n btnAngebote.ElementFont := efCSS;\r\n btnAngebote.HeightStyle := ssAuto;\r\n btnAngebote.HeightPercent := 100.000000000000000000;\r\n btnAngebote.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnAngebote, Self, 'OnClick', 'btnAngeboteClick');\r\n btnAuftrag.SetParentComponent(WebPanelMenue);\r\n btnAuftrag.Name := 'btnAuftrag';\r\n btnAuftrag.Left := 3;\r\n btnAuftrag.Top := 167;\r\n btnAuftrag.Width := 180;\r\n btnAuftrag.Height := 30;\r\n btnAuftrag.Caption := 'Auftr'#228'ge (offen)';\r\n btnAuftrag.ChildOrder := 11;\r\n btnAuftrag.ElementClassName := 'btn btn-info btn-sm text-center m-1';\r\n btnAuftrag.ElementFont := efCSS;\r\n btnAuftrag.HeightStyle := ssAuto;\r\n btnAuftrag.HeightPercent := 100.000000000000000000;\r\n btnAuftrag.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnAuftrag, Self, 'OnClick', 'btnAuftragClick');\r\n btnLieferscheine.SetParentComponent(WebPanelMenue);\r\n btnLieferscheine.Name := 'btnLieferscheine';\r\n btnLieferscheine.Left := 3;\r\n btnLieferscheine.Top := 207;\r\n btnLieferscheine.Width := 180;\r\n btnLieferscheine.Height := 30;\r\n btnLieferscheine.Caption := 'Lieferscheine (offen)';\r\n btnLieferscheine.ChildOrder := 11;\r\n btnLieferscheine.ElementClassName := 'btn btn-info btn-sm text-center m-1';\r\n btnLieferscheine.ElementFont := efCSS;\r\n btnLieferscheine.HeightStyle := ssAuto;\r\n btnLieferscheine.HeightPercent := 100.000000000000000000;\r\n btnLieferscheine.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnLieferscheine, Self, 'OnClick', 'btnLieferscheineClick');\r\n btnBelegePositionen.SetParentComponent(WebPanelMenue);\r\n btnBelegePositionen.Name := 'btnBelegePositionen';\r\n btnBelegePositionen.Left := 3;\r\n btnBelegePositionen.Top := 247;\r\n btnBelegePositionen.Width := 180;\r\n btnBelegePositionen.Height := 30;\r\n btnBelegePositionen.Caption := 'Belege / Positionen';\r\n btnBelegePositionen.ChildOrder := 11;\r\n btnBelegePositionen.ElementClassName := 'btn btn-info btn-sm text-center m-1';\r\n btnBelegePositionen.ElementFont := efCSS;\r\n btnBelegePositionen.HeightStyle := ssAuto;\r\n btnBelegePositionen.HeightPercent := 100.000000000000000000;\r\n btnBelegePositionen.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnBelegePositionen, Self, 'OnClick', 'btnBelegePositionenClick');\r\n btnInventur.SetParentComponent(WebPanelMenue);\r\n btnInventur.Name := 'btnInventur';\r\n btnInventur.Left := 3;\r\n btnInventur.Top := 287;\r\n btnInventur.Width := 180;\r\n btnInventur.Height := 30;\r\n btnInventur.Caption := 'Inventur';\r\n btnInventur.ChildOrder := 11;\r\n btnInventur.ElementClassName := 'btn btn-info btn-sm text-center m-1';\r\n btnInventur.ElementFont := efCSS;\r\n btnInventur.HeightStyle := ssAuto;\r\n btnInventur.HeightPercent := 100.000000000000000000;\r\n btnInventur.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnInventur, Self, 'OnClick', 'btnInventurClick');\r\n btn14584.SetParentComponent(WebPanelMenue);\r\n btn14584.Name := 'btn14584';\r\n btn14584.Left := 3;\r\n btn14584.Top := 327;\r\n btn14584.Width := 180;\r\n btn14584.Height := 30;\r\n btn14584.Caption := '14584';\r\n btn14584.ChildOrder := 7;\r\n btn14584.ElementClassName := 'btn btn-info btn-sm text-center m-1';\r\n btn14584.ElementFont := efCSS;\r\n btn14584.HeightStyle := ssAuto;\r\n btn14584.HeightPercent := 100.000000000000000000;\r\n btn14584.WidthPercent := 100.000000000000000000;\r\n SetEvent(btn14584, Self, 'OnClick', 'btn14584Click');\r\n Menue10055.SetParentComponent(Self);\r\n Menue10055.Name := 'Menue10055';\r\n Menue10055.Left := 376;\r\n Menue10055.Top := 35;\r\n Menue10055.Width := 304;\r\n Menue10055.Height := 329;\r\n Menue10055.ElementClassName := 'card m-1 border-info';\r\n Menue10055.Caption := 'WebPanelMenue';\r\n Menue10055.ChildOrder := 7;\r\n Menue10055.Color := 8340248;\r\n Menue10055.ElementBodyClassName := 'card-body';\r\n Menue10055.ElementFont := efCSS;\r\n Menue10055.ShowCaption := False;\r\n Menue10055.TabOrder := 4;\r\n Menue10055.Visible := False;\r\n btnLogbuch.SetParentComponent(Menue10055);\r\n btnLogbuch.Name := 'btnLogbuch';\r\n btnLogbuch.Left := 3;\r\n btnLogbuch.Top := 8;\r\n btnLogbuch.Width := 145;\r\n btnLogbuch.Height := 25;\r\n btnLogbuch.Caption := 'Logbuch';\r\n btnLogbuch.ChildOrder := 11;\r\n btnLogbuch.ElementClassName := 'btn btn-info btn-sm text-center m-1';\r\n btnLogbuch.ElementFont := efCSS;\r\n btnLogbuch.HeightStyle := ssAuto;\r\n btnLogbuch.HeightPercent := 100.000000000000000000;\r\n btnLogbuch.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnLogbuch, Self, 'OnClick', 'btnLogbuchClick');\r\n btnZurueck.SetParentComponent(Menue10055);\r\n btnZurueck.Name := 'btnZurueck';\r\n btnZurueck.Left := 154;\r\n btnZurueck.Top := 290;\r\n btnZurueck.Width := 145;\r\n btnZurueck.Height := 25;\r\n btnZurueck.Caption := 'Hauptmenue';\r\n btnZurueck.ChildOrder := 7;\r\n btnZurueck.ElementClassName := 'btn btn-info btn-sm text-center m-1';\r\n btnZurueck.ElementFont := efCSS;\r\n btnZurueck.HeightStyle := ssAuto;\r\n btnZurueck.HeightPercent := 100.000000000000000000;\r\n btnZurueck.WidthPercent := 100.000000000000000000;\r\n SetEvent(btnZurueck, Self, 'OnClick', 'btnZurueckClick');\r\n XDPersonal.SetParentComponent(Self);\r\n XDPersonal.Name := 'XDPersonal';\r\n XDPersonal.AfterOpen := XDPersonalAfterOpen;\r\n XDPersonal.EntitySetName := 'Personal';\r\n XDPersonal.Connection := DM2.XDataWebConnection1;\r\n XDPersonal.Left := 11;\r\n XDPersonal.Top := 91;\r\n XDPersonalPersonalnummer.SetParentComponent(XDPersonal);\r\n XDPersonalPersonalnummer.Name := 'XDPersonalPersonalnummer';\r\n XDPersonalPersonalnummer.FieldName := 'Personalnummer';\r\n XDPersonalPersonalnummer.Required := True;\r\n XDPersonalNachname.SetParentComponent(XDPersonal);\r\n XDPersonalNachname.Name := 'XDPersonalNachname';\r\n XDPersonalNachname.FieldName := 'Nachname';\r\n XDPersonalNachname.Size := 40;\r\n XDPersonalVorname.SetParentComponent(XDPersonal);\r\n XDPersonalVorname.Name := 'XDPersonalVorname';\r\n XDPersonalVorname.FieldName := 'Vorname';\r\n XDPersonalVorname.Size := 40;\r\n XDPersonalSchreibzeichen.SetParentComponent(XDPersonal);\r\n XDPersonalSchreibzeichen.Name := 'XDPersonalSchreibzeichen';\r\n XDPersonalSchreibzeichen.FieldName := 'Schreibzeichen';\r\n XDPersonalSchreibzeichen.Size := 10;\r\n XDPersonalLoginName.SetParentComponent(XDPersonal);\r\n XDPersonalLoginName.Name := 'XDPersonalLoginName';\r\n XDPersonalLoginName.FieldName := 'LoginName';\r\n XDPersonalLoginName.Size := 50;\r\n XDPersonalPassword.SetParentComponent(XDPersonal);\r\n XDPersonalPassword.Name := 'XDPersonalPassword';\r\n XDPersonalPassword.FieldName := 'Password';\r\n XDPersonalPassword.Size := 50;\r\n XDPersonalEnabled.SetParentComponent(XDPersonal);\r\n XDPersonalEnabled.Name := 'XDPersonalEnabled';\r\n XDPersonalEnabled.FieldName := 'Enabled';\r\n XDPersonalEmail.SetParentComponent(XDPersonal);\r\n XDPersonalEmail.Name := 'XDPersonalEmail';\r\n XDPersonalEmail.FieldName := 'Email';\r\n XDPersonalEmail.Size := 50;\r\n XDPersonalFarbe.SetParentComponent(XDPersonal);\r\n XDPersonalFarbe.Name := 'XDPersonalFarbe';\r\n XDPersonalFarbe.FieldName := 'Farbe';\r\n XDPersonalPersonalGUID.SetParentComponent(XDPersonal);\r\n XDPersonalPersonalGUID.Name := 'XDPersonalPersonalGUID';\r\n XDPersonalPersonalGUID.FieldName := 'PersonalGUID';\r\n XDPersonalPersonalGUID.Size := 38;\r\n XDPersonalRechteCadiaWEB.SetParentComponent(XDPersonal);\r\n XDPersonalRechteCadiaWEB.Name := 'XDPersonalRechteCadiaWEB';\r\n XDPersonalRechteCadiaWEB.FieldName := 'RechteCadiaWEB';\r\n XDPersonalRechteCadiaWEB.Size := 255;\r\n XDPersonalStundensatzIntern.SetParentComponent(XDPersonal);\r\n XDPersonalStundensatzIntern.Name := 'XDPersonalStundensatzIntern';\r\n XDPersonalStundensatzIntern.FieldName := 'StundensatzIntern';\r\n WebHttpRequest1.SetParentComponent(Self);\r\n WebHttpRequest1.Name := 'WebHttpRequest1';\r\n WebHttpRequest1.Headers.BeginUpdate;\r\n try\r\n WebHttpRequest1.Headers.Clear;\r\n WebHttpRequest1.Headers.Add('Cache-Control=no-cache, no-store, must-revalidate');\r\n finally\r\n WebHttpRequest1.Headers.EndUpdate;\r\n end;\r\n WebHttpRequest1.URL := './config/CadiaWebConfig.cnf';\r\n SetEvent(WebHttpRequest1, Self, 'OnResponse', 'WebHttpRequest1Response');\r\n WebHttpRequest1.Left := 8;\r\n WebHttpRequest1.Top := 144;\r\n WClient.SetParentComponent(Self);\r\n WClient.Name := 'WClient';\r\n WClient.Connection := AuthConnection;\r\n WClient.Left := 8;\r\n WClient.Top := 240;\r\n AuthConnection.SetParentComponent(Self);\r\n AuthConnection.Name := 'AuthConnection';\r\n AuthConnection.URL := 'https://langwald-edv.net/cadiaserverauth';\r\n SetEvent(AuthConnection, Self, 'OnConnect', 'AuthConnectionConnect');\r\n AuthConnection.Left := 8;\r\n AuthConnection.Top := 192;\r\n xdsMitteilungen.SetParentComponent(Self);\r\n xdsMitteilungen.Name := 'xdsMitteilungen';\r\n xdsMitteilungen.AfterOpen := xdsMitteilungenAfterOpen;\r\n xdsMitteilungen.EntitySetName := 'MSGBoardSub';\r\n xdsMitteilungen.Connection := DM2.XDataWebConnection1;\r\n xdsMitteilungen.SubpropsDepth := 2;\r\n xdsMitteilungen.QueryString := '$expand=MSGBoardID, PersonalnummerTo';\r\n xdsMitteilungen.QueryTop := 100;\r\n xdsMitteilungen.Left := 242;\r\n xdsMitteilungen.Top := 13;\r\n xdsMitteilungenMSGBoardID.SetParentComponent(xdsMitteilungen);\r\n xdsMitteilungenMSGBoardID.Name := 'xdsMitteilungenMSGBoardID';\r\n xdsMitteilungenMSGBoardID.FieldName := 'MSGBoardID';\r\n xdsMitteilungenToPersonalnummer.SetParentComponent(xdsMitteilungen);\r\n xdsMitteilungenToPersonalnummer.Name := 'xdsMitteilungenToPersonalnummer';\r\n xdsMitteilungenToPersonalnummer.FieldName := 'ToPersonalnummer';\r\n xdsMitteilungenMSGBoardSubID.SetParentComponent(xdsMitteilungen);\r\n xdsMitteilungenMSGBoardSubID.Name := 'xdsMitteilungenMSGBoardSubID';\r\n xdsMitteilungenMSGBoardSubID.FieldName := 'MSGBoardSubID';\r\n xdsMitteilungenMSGBoardSubID.Required := True;\r\n xdsMitteilungenMSGBoardSubID.Size := 38;\r\n xdsMitteilungenToNachname.SetParentComponent(xdsMitteilungen);\r\n xdsMitteilungenToNachname.Name := 'xdsMitteilungenToNachname';\r\n xdsMitteilungenToNachname.FieldName := 'ToNachname';\r\n xdsMitteilungenToNachname.Size := 40;\r\n xdsMitteilungenToVorname.SetParentComponent(xdsMitteilungen);\r\n xdsMitteilungenToVorname.Name := 'xdsMitteilungenToVorname';\r\n xdsMitteilungenToVorname.FieldName := 'ToVorname';\r\n xdsMitteilungenToVorname.Size := 40;\r\n xdsMitteilungenDatumGelesen.SetParentComponent(xdsMitteilungen);\r\n xdsMitteilungenDatumGelesen.Name := 'xdsMitteilungenDatumGelesen';\r\n xdsMitteilungenDatumGelesen.FieldName := 'DatumGelesen';\r\n xdsMitteilungenDatumErledigt.SetParentComponent(xdsMitteilungen);\r\n xdsMitteilungenDatumErledigt.Name := 'xdsMitteilungenDatumErledigt';\r\n xdsMitteilungenDatumErledigt.FieldName := 'DatumErledigt';\r\n xdsMitteilungenMSGBoardIDFromPersonalnummer.SetParentComponent(xdsMitteilungen);\r\n xdsMitteilungenMSGBoardIDFromPersonalnummer.Name := 'xdsMitteilungenMSGBoardIDFromPersonalnummer';\r\n xdsMitteilungenMSGBoardIDFromPersonalnummer.FieldName := 'MSGBoardID.FromPersonalnummer';\r\n xdsMitteilungenMSGBoardIDID.SetParentComponent(xdsMitteilungen);\r\n xdsMitteilungenMSGBoardIDID.Name := 'xdsMitteilungenMSGBoardIDID';\r\n xdsMitteilungenMSGBoardIDID.FieldName := 'MSGBoardID.ID';\r\n xdsMitteilungenMSGBoardIDID.Size := 38;\r\n xdsMitteilungenMSGBoardIDDatum.SetParentComponent(xdsMitteilungen);\r\n xdsMitteilungenMSGBoardIDDatum.Name := 'xdsMitteilungenMSGBoardIDDatum';\r\n xdsMitteilungenMSGBoardIDDatum.FieldName := 'MSGBoardID.Datum';\r\n xdsMitteilungenMSGBoardIDFromNachname.SetParentComponent(xdsMitteilungen);\r\n xdsMitteilungenMSGBoardIDFromNachname.Name := 'xdsMitteilungenMSGBoardIDFromNachname';\r\n xdsMitteilungenMSGBoardIDFromNachname.FieldName := 'MSGBoardID.FromNachname';\r\n xdsMitteilungenMSGBoardIDFromNachname.Size := 40;\r\n xdsMitteilungenMSGBoardIDFromVorname.SetParentComponent(xdsMitteilungen);\r\n xdsMitteilungenMSGBoardIDFromVorname.Name := 'xdsMitteilungenMSGBoardIDFromVorname';\r\n xdsMitteilungenMSGBoardIDFromVorname.FieldName := 'MSGBoardID.FromVorname';\r\n xdsMitteilungenMSGBoardIDFromVorname.Size := 40;\r\n xdsMitteilungenMSGBoardIDBetreff.SetParentComponent(xdsMitteilungen);\r\n xdsMitteilungenMSGBoardIDBetreff.Name := 'xdsMitteilungenMSGBoardIDBetreff';\r\n xdsMitteilungenMSGBoardIDBetreff.FieldName := 'MSGBoardID.Betreff';\r\n xdsMitteilungenMSGBoardIDBetreff.Size := 255;\r\n xdsMitteilungenMSGBoardIDNotiz.SetParentComponent(xdsMitteilungen);\r\n xdsMitteilungenMSGBoardIDNotiz.Name := 'xdsMitteilungenMSGBoardIDNotiz';\r\n xdsMitteilungenMSGBoardIDNotiz.FieldName := 'MSGBoardID.Notiz';\r\n xdsMitteilungenMSGBoardIDNotiz.Size := 255;\r\n xdsMitteilungenToPersonalnummerPersonalnummer.SetParentComponent(xdsMitteilungen);\r\n xdsMitteilungenToPersonalnummerPersonalnummer.Name := 'xdsMitteilungenToPersonalnummerPersonalnummer';\r\n xdsMitteilungenToPersonalnummerPersonalnummer.FieldName := 'ToPersonalnummer.Personalnummer';\r\n xdsMitteilungenMSGBoardIDFromPersonalnummerPersonalnummer.SetParentComponent(xdsMitteilungen);\r\n xdsMitteilungenMSGBoardIDFromPersonalnummerPersonalnummer.Name := 'xdsMitteilungenMSGBoardIDFromPersonalnummerPersonalnummer';\r\n xdsMitteilungenMSGBoardIDFromPersonalnummerPersonalnummer.FieldName := 'MSGBoardID.FromPersonalnummer.Personalnummer';\r\n finally\r\n lblAnmeldung.AfterLoadDFMValues;\r\n labelonlinestatus.AfterLoadDFMValues;\r\n WebDBLabel1.AfterLoadDFMValues;\r\n panelAnmeldung.AfterLoadDFMValues;\r\n WebLabel3.AfterLoadDFMValues;\r\n lblchecklogin.AfterLoadDFMValues;\r\n edtBenutzer.AfterLoadDFMValues;\r\n edtPassword.AfterLoadDFMValues;\r\n btnAnmelden.AfterLoadDFMValues;\r\n Container1.AfterLoadDFMValues;\r\n Container2.AfterLoadDFMValues;\r\n WebPanelMenue.AfterLoadDFMValues;\r\n btnLogout.AfterLoadDFMValues;\r\n btnTermine.AfterLoadDFMValues;\r\n btnEmails.AfterLoadDFMValues;\r\n btnAnrufe.AfterLoadDFMValues;\r\n btnPZE.AfterLoadDFMValues;\r\n btnTelefonnummern.AfterLoadDFMValues;\r\n btnMitteilungen.AfterLoadDFMValues;\r\n btnTickets.AfterLoadDFMValues;\r\n btnBeenden.AfterLoadDFMValues;\r\n btnKontakte.AfterLoadDFMValues;\r\n btnArtikel.AfterLoadDFMValues;\r\n btnBestellvormerkung.AfterLoadDFMValues;\r\n btnAngebote.AfterLoadDFMValues;\r\n btnAuftrag.AfterLoadDFMValues;\r\n btnLieferscheine.AfterLoadDFMValues;\r\n btnBelegePositionen.AfterLoadDFMValues;\r\n btnInventur.AfterLoadDFMValues;\r\n btn14584.AfterLoadDFMValues;\r\n Menue10055.AfterLoadDFMValues;\r\n btnLogbuch.AfterLoadDFMValues;\r\n btnZurueck.AfterLoadDFMValues;\r\n XDPersonal.AfterLoadDFMValues;\r\n XDPersonalPersonalnummer.AfterLoadDFMValues;\r\n XDPersonalNachname.AfterLoadDFMValues;\r\n XDPersonalVorname.AfterLoadDFMValues;\r\n XDPersonalSchreibzeichen.AfterLoadDFMValues;\r\n XDPersonalLoginName.AfterLoadDFMValues;\r\n XDPersonalPassword.AfterLoadDFMValues;\r\n XDPersonalEnabled.AfterLoadDFMValues;\r\n XDPersonalEmail.AfterLoadDFMValues;\r\n XDPersonalFarbe.AfterLoadDFMValues;\r\n XDPersonalPersonalGUID.AfterLoadDFMValues;\r\n XDPersonalRechteCadiaWEB.AfterLoadDFMValues;\r\n XDPersonalStundensatzIntern.AfterLoadDFMValues;\r\n WebHttpRequest1.AfterLoadDFMValues;\r\n WClient.AfterLoadDFMValues;\r\n AuthConnection.AfterLoadDFMValues;\r\n xdsMitteilungen.AfterLoadDFMValues;\r\n xdsMitteilungenMSGBoardID.AfterLoadDFMValues;\r\n xdsMitteilungenToPersonalnummer.AfterLoadDFMValues;\r\n xdsMitteilungenMSGBoardSubID.AfterLoadDFMValues;\r\n xdsMitteilungenToNachname.AfterLoadDFMValues;\r\n xdsMitteilungenToVorname.AfterLoadDFMValues;\r\n xdsMitteilungenDatumGelesen.AfterLoadDFMValues;\r\n xdsMitteilungenDatumErledigt.AfterLoadDFMValues;\r\n xdsMitteilungenMSGBoardIDFromPersonalnummer.AfterLoadDFMValues;\r\n xdsMitteilungenMSGBoardIDID.AfterLoadDFMValues;\r\n xdsMitteilungenMSGBoardIDDatum.AfterLoadDFMValues;\r\n xdsMitteilungenMSGBoardIDFromNachname.AfterLoadDFMValues;\r\n xdsMitteilungenMSGBoardIDFromVorname.AfterLoadDFMValues;\r\n xdsMitteilungenMSGBoardIDBetreff.AfterLoadDFMValues;\r\n xdsMitteilungenMSGBoardIDNotiz.AfterLoadDFMValues;\r\n xdsMitteilungenToPersonalnummerPersonalnummer.AfterLoadDFMValues;\r\n xdsMitteilungenMSGBoardIDFromPersonalnummerPersonalnummer.AfterLoadDFMValues;\r\n end;\r\nend;\r\n\r\nend.\r\n","program CadiaWEB;\r\n\r\n{$R *.dres}\r\n\r\nuses\r\n Vcl.Forms,\r\n WEBLib.Forms,\r\n WEBLib.WebTools,\r\n Unit1 in 'Unit1.pas'{*.html},\r\n Unit2 in 'Unit2.pas',\r\n unit_Kontaktsuche in 'unit_Kontaktsuche.pas'{*.html},\r\n unit_Artikelsuche in 'unit_Artikelsuche.pas'{*.html},\r\n unit_Einzeltermin in 'unit_Einzeltermin.pas'{*.html},\r\n unit_Objektsuche in 'unit_Objektsuche.pas'{*.html},\r\n unit_EinzelAuftrag in 'unit_EinzelAuftrag.pas'{*.html},\r\n unit_Anrufe in 'unit_Anrufe.pas'{*.html},\r\n Unit_Artikel in 'Unit_Artikel.pas'{*.html},\r\n unit_Terminkalender in 'unit_Terminkalender.pas'{*.html},\r\n unit_ListeAuftrag in 'unit_ListeAuftrag.pas'{*.html},\r\n unit_EinzelKontakt in 'unit_EinzelKontakt.pas'{*.html},\r\n unit_EinzelAnruf in 'unit_EinzelAnruf.pas'{*.html},\r\n unit_ListeAngebot in 'unit_ListeAngebot.pas'{*.html},\r\n unit_PZE in 'unit_PZE.pas'{*.html},\r\n unit_Karte in 'unit_Karte.pas'{*.html},\r\n unit_BelegeUndPositionen in 'unit_BelegeUndPositionen.pas'{*.html},\r\n unit_EmailEingang in 'unit_EmailEingang.pas'{*.html},\r\n unit_EinzelBeleg in 'unit_EinzelBeleg.pas'{*.html},\r\n unit_AuftragUnterschriften in 'unit_AuftragUnterschriften.pas'{*.html},\r\n unit_ListeLieferschein in 'unit_ListeLieferschein.pas'{*.html},\r\n unit_EinzelLieferschein in 'unit_EinzelLieferschein.pas'{*.html},\r\n unit_LieferscheinUnterschrift in 'unit_LieferscheinUnterschrift.pas'{*.html},\r\n unit_AuftragTermine in 'unit_AuftragTermine.pas'{*.html},\r\n unit_EinzelEmail in 'unit_EinzelEmail.pas'{*.html},\r\n unit_Preise in 'unit_Preise.pas'{*.html},\r\n unit_BarcodeScan in 'unit_BarcodeScan.pas'{*.html},\r\n unit_AuftragPosEinzel in 'unit_AuftragPosEinzel.pas'{*.html},\r\n Unit_AngebotPosEinzel in 'Unit_AngebotPosEinzel.pas'{*.html},\r\n unit_EinzelAngebot in 'unit_EinzelAngebot.pas'{*.html},\r\n unit_Bestellvormerkung in 'unit_Bestellvormerkung.pas'{*.html},\r\n unit_TelefonSuche in 'unit_TelefonSuche.pas'{*.html},\r\n unit_ListeAnsprechpartner in 'unit_ListeAnsprechpartner.pas'{*.html},\r\n unit_EinzelAnsprechpartner in 'unit_EinzelAnsprechpartner.pas'{*.html},\r\n unit_AuftragSuche in 'unit_AuftragSuche.pas'{*.html},\r\n unit_ProduktionSuche in 'unit_ProduktionSuche.pas'{*.html},\r\n unit_Kontaktnummersuche in 'unit_Kontaktnummersuche.pas'{*.html},\r\n unit_Mitteilungen in 'unit_Mitteilungen.pas'{*.html},\r\n unit_EinzelMitteilung in 'unit_EinzelMitteilung.pas'{*.html},\r\n unit_NeueMitteilung in 'unit_NeueMitteilung.pas'{*.html},\r\n unit_ListeTickets in 'unit_ListeTickets.pas'{*.html},\r\n unit_EinzelTicket in 'unit_EinzelTicket.pas'{*.html},\r\n unit_GetPhoto in 'unit_GetPhoto.pas'{*.html},\r\n unit_Dateien in 'unit_Dateien.pas'{*.html},\r\n unit_EinzelDatei in 'unit_EinzelDatei.pas'{*.html},\r\n unit_Logbuch in 'unit_Logbuch.pas'{*.html},\r\n unit_Inventur in 'unit_Inventur.pas'{*.html},\r\n unit_TicketNeu in 'unit_TicketNeu.pas'{*.html},\r\n unit_KontaktAenderung in 'unit_KontaktAenderung.pas'{*.html};\r\n\r\n{$R *.res}\r\n var\r\n s:string;\r\nbegin\r\n Application.Initialize;\r\n Application.AutoFormRoute:=true;\r\n Application.MainFormOnTaskbar := True;\r\n Application.CreateForm(TForm1, Form1);\r\n Application.CreateFormDirect(TDM2, DM2);\r\n Application.Run;\r\nend.\r\n"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;ACJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACxiDA;;;;AAaY,oBAAG;AACH,oBAAG;AAIb,mBAAmB;AACW;AAA9B,kCAAyC,cAAC,GAAI,EAAL;AACf;AAA1B,8BAAqC,cAAC,EAAD;AACrC,4BAA4B;AAGjB,qBAAG;AACH,qBAAG,CAAC;AACJ,qBAAG;AACH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ACA,IAAA,+CACA,IAAA,mDACA,IAAA,4CACA,IAAA,gDACA,IAAA,sCACA,IAAA,sCACA,IAAA,wCACA,oEAlBA;AAda;;AAab;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAhCa;;AA8yK8B;AAE/C;AAF+C;AAuVL;AAE1C;AAF0C;AAlVc;AAExD;AACA;AACA;AAJwD;AAOL;AAEnD;AACA;AACA;AAJmD;AAOE;AAErD;AACA;AAHqD;AAMC;AAAvB;AAE7B,eAAU;AAEV,UAAG,cAAS,CAAC,OAAD,CAAU,KAAE,OAAxB,EACE,SAAU,eADZ;AAJ6B;AAAuB;AAU/C,gBAAG;AACI,uBAAG;AAHsC;AAAxB;AAK7B;AACA;AAEA,YAAc;AAEd,gBAAkB,gCAAP;;;;UAAO;AAElB,eAAiB,gCAAP;;;;WAAgB,KAAT;AAEjB,UAAG,MAAO,IAAG,CAAb;AAEE,kBAAkB,oCAAP;;;;aAAkB,EAAG,MAAd,CAAsB,GAA2B,gCAAR,CAAV,qCAAP;;;;eAAkB,MAAX,GAAU;;;;YAAQ,CAA3B;;AAIxC,YAAU,kCAAP;;;;YAAO,CAAQ,KAAE,CAApB,EACE,UAAW,OAAgB,GAAN,KAAF,GAAiB,gCAAP;;;;YAAO,CADtC;;AAKJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGE,eAAU;AA/OmB;AAAwB;AAkPH;AAEpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAXoD;AAcE;AAEtD;AACA;AACA;AACA;AACA;AACA;AACA;AARsD;AAWC;AAAxB;AAG7B,eAAU;AAEV,UAAG,cAAS,CAAC,OAAD,CAAU,KAAE,OAAxB,EACE,SAAU,WADZ;AAL6B;AAAwB;AAriBlB;AAAN;AAE7B,qBAAU,6BAAM,CAAC,kCAAD,CAAhB;AAF6B;AAAM;AAO1B,qBAAmB,IAAK,IAAK,GAA7B;AACA,qBAAmB,IAAK,IAAK,GAA7B;AACD,oBAAmB,IAAK,GAAxB;AACK,yBAAmB,IAAK,GAAxB;AALsB;AAAN;AAO7B;AACA;AACA;AAEA,aAAQ,cAAS,CAAC,OAAD;AACjB,UAAG,cAAG,CAAC,KAAM,IAAP,CAAa,KAAE,CAArB;AAEE,cAAM,aAAa,CAAC,CAAD,CAAnB,GAA0B;AA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;aACP;AADO;;AACP;AADO;;;AACP;AADO;AAQG;AACV;AADU;aACV;AADU;;AACV;AADU;;;AACV,qBHvoBa,+BGuoBb;AADU;AAQA;AACV;AADU;aACV,4BACA;AAFU;;AACV;AACA;AAFU;;;AACV,0BH/oBa,+BG+oBb;AACA;AAFU;AASA;AACV;AACA;AACA;AAHU;aACV,kBACA,IAAA,0CACA,oCADA;AAFU;;AACV;AACA;AACA;AAHU;;;AACV,qBHxpBa,+BGwpBb;AACA,iCHzpBa,+BGypBb;AACA;AAHU;AAUI;AACd;AADc;aACd;AADc;;AACd;AADc;;;AACd;AADc;AAQJ;AACV;AACA;AACA;AAHU;aACV,sBACA,IAAA,kCACA,0BADA;AAFU;;AACV;AACA;AACA;AAHU;;;AACV,uBH1qBa,+BG0qBb;AACA;AACA;AAHU;AAUS;AACnB;AADmB;aACnB;AADmB;;AACnB;AADmB;;;AACnB;AADmB;AAQN;;aACb;AADa;;AACb;AADa;;;AACb;AADa;AAQC;AACd;AADc;aACd,sBACA;AAFc;;AACd;AACA;AAFc;;;AACd;AACA;AAFc;AASK;AACnB;AACA;AACA;AAHmB;aACnB,wCACA,IAAA,0CACA,0BADA;AAFmB;;AACnB;AACA;AACA;AAHmB;;;AACnB;AACA,iCH7lBW,6BG6lBX;AACA;AAHmB;AAUR;;aACX;AADW;;AACX;AADW;;;AACX,wBHvtBa,+BGutBb;AADW;AAQD;AACV;AADU;aACV;AADU;;AACV;AADU;;;AACV;AADU;AAQE;AACZ;AACA;AAFY;aACZ,wBACA;AAFY;;AACZ;AACA;AAFY;;;AACZ,wBHtnBW,6BGsnBX;AACA,4BHvnBW,6BGunBX;AAFY;AASA;;aACZ;AADY;;AACZ;AADY;;;AACZ;AADY;AAQK;;aACjB;AADiB;;AACjB;AADiB;;;AACjB;AADiB;AAQC;;aAClB;AADkB;;AAClB;AADkB;;;AAClB;AADkB;AAQD;;aACjB;AADiB;;AACjB;AADiB;;;AACjB,yBAgGU,0BAhGV;AADiB;AAQF;;aACf;AADe;;AACf;AADe;;;AACf,yBAwFU,0BAxFV;AADe;AAQA;AACf;AACA;AAFe;aACf,wBACA;AAFe;;AACf;AACA;AAFe;;;AACf,wBHvqBW,6BGuqBX;AACA,4BHxqBW,6BGwqBX;AAFe;AASN;AACT;AADS;aACT;AADS;;AACT;AADS;;;AACT;AADS;AAQM;;aACf;AADe;;AACf;AADe;;;AACf;AADe;AAQP;AACR;AACA;AACA;AAHQ;aACR,sBACA,IAAA,sBACA,0BADA;AAFQ;;AACR;AACA;AACA;AAHQ;;;AACR;AACA,uBHlzBa,+BGkzBb;AACA,uBHnzBa,+BGmzBb;AAHQ;AAUQ;AAChB;AACA;AACA;AAHgB;aAChB,gBACA,IAAA,gBACA,oBADA;AAFgB;;AAChB;AACA;AACA;AAHgB;;;AAChB;AACA;AACA;AAHgB;AAUS,sDAVT,wCAUS;AACjB;AACR;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAlBQ;;kBAGR;AAHQ,cAiBR;AAjBQ;;;aACR,oBACA,IAAA,oBACA,IAAA,4BACA,IAAA,oBACA,IAAA,oBACA,IAAA,oBACA,IAAA,gBACA,IAAA,gBACA,IAAA,gBACA,IAAA,gBACA,IAAA,gBACA,IAAA,gBACA,IAAA,gBACA,IAAA,kBACA,IAAA,kBACA,IAAA,kBACA,IAAA,oBACA,oBAhBA;AAFQ;;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAlBQ;;;AACR;AACA;AACA,0BJ/vCa,kCI+vCb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAlByB,yCAkBzB;AACA;AAlBQ;AAyBG;AACX;AACA;AAFW;aACX,gCACA;AAFW;;AACX;AACA;AAFW;;;AACX,4BASU,0BATV;AACA,6BAQU,0BARV;AAFW;AASI;AACL;AAkBG;AAk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G;AACI,yBAAG;AACJ,wBAAI;AACP,qBAAG;AACL,mBAAG;AACH,mBAAG;AACN,gBAAG;AACE,qBAAG;AACF,sBAAG;AACJ,qBAAG;AACH,qBAAG;AACC,yBAAG;AACL,uBAAG;AACD,yBAAG;AACN,sBAAG;AACI,6BAAG;AACb,mBAAG;AACK,2BAAG;AACR,sBAAG;AACJ,qBAAG;AACH,qBAAG;AACR,gBAAG;AACA,mBAAG;AACH,mBAAG;AACK,2BAAG;AACV,oBAAG;AACH,oBAAG;AACL,kBAAG;AACF,mBAAG;AACG,yBAAG;AACd,cAAG;AACH,cAAG;AACH,cAAG;AACH,cAAG;AACH,cAAG;AACH,cAAG;AACH,cAAG;AACH,cAAG;AACH,cAAG;AACF,eAAG;AACH,eAAG;AACH,eAAG;AACH,eAAG;AACH,eAAG;AACH,eAAG;AACH,eAAG;AACH,eAAG;AACH,eAAG;AACH,eAAG;AACH,eAAG;AACD,iBAAG;AACH,iBAAG;AACH,iBAAG;AACH,iBAAG;AACD,mBAAG;AACL,iBAAG;AACH,iBAAG;AACA,oBAAG;AACR,eAAG;AACE,oBAAG;AACL,kBAAG;AACD,oBAAG;AACF,qBAAG;AACH,qBAAG;AACR,gBAAG;AACD,kBAAG;AACE,uBAAG;AACP,mBAAG;AACJ,kBAAG;AACH,kBAAG;AACE,uBAAG;AACE,4BAAG;AACP,wBAAG;AACL,sBAAG;AACJ,qBAAG;AA1IH;AAwJK,2CA9PN,oCA8PM;AAuDG;AAzBF;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AATe;aACf,wBACA,IAAA,0BACA,IAAA,kCACA,IAAA,sCACA,IAAA,4CACA,IAAA,oCACA,IAAA,wCACA,IAAA,kDACA,kCAPA;AAFe;;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AATe;;;AACf;AACA,yBA3oHK,qBA2oHL;AACA,6BA5kHS,yBA4kHT;AACA,+BA7kHS,yBA6kHT;AACA,kCA9oHK,qBA8oHL;AACA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AAlB,EACE,MADF;AAME,4BAAgB,CAAC,8BAAwB,QAAC,UAA1B;AATW;AAgrDhB;;;AAEX;AACA;AAHW;;;;;AAQiB;AAG9B,oBAAM;AACN,0BAAY;AAJ4D;AAA1C;AARjB;AAKO,iCAAK,qBAAsB,cA1pRrC,wBA0pRqC,CAA3B;AALP;AAuvBD;;;AACV;AACA;AAFU;;;;;;;AACV,6BA59QmB,mCA49QnB;AACA,2BAhzSa,6BAgzSb;AAFU;AAMZ;AACA;AACA;AA4hBY,yBAAO;AAGT,iDAAO,EAAP;AAAF,sBACN,IACA,MACA,SACA,SACA,UACA,QACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,GApBM;AAn6RI,6BAwmIM,mEACF,2EACA,2EACN,sDACC,sDACO,wDACG,mDA9mIT;;AAg+Td;AAniXA,KA8wWyC;AAEvC,uCAA4B,CAAC,yCAAD;AAFW,KA9wWzC;AAoiXE,sBAAqB,IAAV,MAAU;AADvB;AAniXA,GAmkDc,yBAnkDd;ACZA,sBAES,UAFT;;;AAKW;AALX;ACAA,4BAES,UAFT;;;AAES,2BAGC,4BACF,wBACM,oCACJ,4BACL,kBACI,0BACH,oBACD,kBACG,wBACA,wBACC,0BACF,sBACC,wBACF,oBACK,gCACD,8BAEE,wCACC,0CACG,uFAEI,qFACE,yEAIV,oCACF,2BACM,sCACJ,gCACL,oBACI,6BACH,sBACD,qBACG,gCACA,+BACC,6BACF,wBACC,2BACF,uBACK,mCACD,kCAGA,8BACF,2BACM,sCACJ,kCACL,oBACI,+BACH,qBACD,sBACG,8BACA,gCACC,gCACF,yBACC,+BACF,wBACK,oCACD,qCAGA,kCACF,0BACM,uCACJ,iCACL,oBACI,8BACH,sBACD,oBACG,4BACA,0BACC,6BACF,0BACC,2BACF,wBACK,kCACD,gCAGA,mCACF,yBACM,qCACJ,kCACL,oBACI,8BACH,qBACD,qBACG,6BACA,4BACC,6BACF,wBACC,4BACF,wBACK,mCACD,i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AAd,GAA4B;AAE5B,wBAAc,aAAW,CAAC,IAAK,QAAS,iCAAf;AAzBF;AA4BI;AAApB;AAGP,QAAG,CAAY,CAAC,oBAAD,SAAf;AAEE,6BAAkB,qBAAgB,QAAC,YAAM,CAAC,IAAD,CAAN;AAEnC,UAAG,+BAAW,UAAS,YAAY,KAAE,+CAArC;AAEmB,4BAAe;OAFlC;KAJF;AAUA,wBAAc,YAAd,GAA6B;AAC7B,wBAAc,WAAd,GAA4B;AAE5B,aAAe,MAAU,oBAAc,aAAW,CAAC,IAAK,QAAS,mBAAf;AAClD,gBAAW,oBAAc,uBAAzB;AAjBO;AAAoB;AAvrB7B,mBAifc;AAMH,sBAAG;AAED,wBACT,qLAiDqL,GAhDrL,qLADqL,GAErL,qLADqL,GAErL,qLADqL,GAErL,qLADqL,GAErL,qLADqL,GAErL,qLADqL,GAErL,qLADqL,GAErL,qLADqL,GAErL,qLADqL,GAErL,qLADqL,GAErL,qLADqL,GAErL,qLADqL,GAErL,qLADqL,GAErL,qLADqL,GAErL,qLADqL,GAErL,qLADqL,GAErL,qLADqL,GAErL,qLADqL,GAErL,qLADqL,GAErL,qLADqL,GAErL,qLADqL,GAErL,qLADqL,GAErL,qLADqL,GAErL,qLADqL,GAErL,qLADqL,GAErL,qLADqL,GAErL,qLADqL,GAErL,qLADqL,GAErL,qLADqL,GAErL,qLADqL,GAErL,qLADqL,GAErL,qLADqL,GAErL,qLADqL,GAErL,qLADqL,GAErL,qLADqL,GAErL,qLADqL,GAErL,qLADqL,GAErL,qLADqL,GAErL,qLADqL,GAErL,qLADqL,GAErL,qLADqL,GAErL,qLADqL,GAErL,qLADqL,GAErL,qLADqL,GAErL,qLADqL,GAErL,qLADqL,GAErL,qLADqL,GAErL,qLADqL,GAErL,qLADqL,GAErL,8EADqL;AAIvL;AACA;AAIkB;AAAX;AAGT;AAHS;AAAW;AAQC;AAAZ;AAEP,eAAU,0BAAa,CAAC,OAAO,KAAI,OAAO,cAAC,4CAAD,CAAnB;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AT,iBAAI,CAAC,CAAD,CAAL,OAAU,GAAE,CAAF,CAAK,IAAgB,CAAX,iBAAI,CAAC,CAAD,CAAG,QAAC,CAAD,CAAI,KAAE,GAAF,CAAzC,EACM,OAAC,KADP;AAGA,QAAG,CAAU,CAAL,CAAC,YAAC,KAAD,CAAI,IAAG,cAAI,KAAH,GAAK,GAAI,EAAV,CAAH,CAAb,EACM,OAAC,KADP;AAGA,aAAS,QAAW,OAAC,CAAD,yBAApB;AAAI;AAEF,UAAG,CAAU,CAAL,CAAC,YAAC,KAAD,CAAI,IAAG,cAAI,KAAH,GAAK,EAAN,CAAH,CAAb;AAEE,iBAAU;AACV;OAHF;;AAhBK;AAAe;AAwBR;AAAP;AAEP;AAGF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEE,aAAU;AAjDH;AAAO;AAoDG;AAAV;AAGT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC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gBACD,cAFf;;AACgB,oCAAQ,WADxB,EACwB,CAAR;AACD,mCAAQ,WAFvB,EAEuB,CAAR;AAFf;AAKA;;;AAEN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAe;AACf;AACA;AACA;AAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA4CA;AAjLM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA20KwB;AAAhB;AAEhB,eAAgB,WAAC,cAAD;AAFA;AAAgB;AAmDL;AAAX;AAEhB,eAAU,cAAS,CAAC,KAAD;AAFH;AAAW;AAttGA;AAE3B,UAAI,aAAS,KAAG,MAAhB;AAEE;AACA,wBAAY;AACZ;AACA;AACA,yBAAY,CAAC,IAAD;AACZ;OAPF;AAF2B;AAyOH;AAExB,UAAG,UAAM,KAAG,MAAZ;AAEE,qBAAS;AACT;OAHF;AAFwB;AATI;AAE5B,UAAG,cAAU,KAAG,MAAhB;AAEE,yBAAa;AACb;OAHF;AAF4B;AAyKA;AAE5B,UAAG,cAAU,KAAG,MAAhB;AAEE,yBAAa;AACb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;;;;SAhc6D,IAgcpE;AACb,aAAU;AALH;AAAa;AApCA;AAAb;AAEP;AACA;AAEA,QAAK;AACL,QAAG,CAAI,aAAP,EACE,QAAS,sBAAS,CAAC,KAAD,CADpB;AAIF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGE,eAAU,CAAV;AACA,aAAU;AAjCH;AAAa;AA2QH;AAAV;AAEP;AAEA,QAAK;AAEP;AACA;AACA;AACA;AAEE,aAAU;AAXH;AAAU;AA9Nc;AAAxB;AAEP,aAA0B,qCAAM,CAAC,OAAD,CAAS;AAFlC;AAAwB;AAKJ;AAApB;AAEP;AAGF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEE,aAAU;AAdH;AAAoB;AAiBC;AAArB;AAEP;AAGF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEE,aAAU;AAdH;AAAqB;AAiBC;AAAtB;AAEP;AAGF;AACA;AACA;AACA;AACA;AACA;AACA;AAGE,aAAU;AAdH;AAAsB;AAiBC;AAAvB;AAEP;AAGF;AACA;AACA;AACA;AACA;AACA;AACA;AAGE,aAAU;AAdH;AAAuB;AAiBE;AAAzB;AAEP;AAGF;AACA;AACA;AACA;AACA;AACA;AACA;AAEE,aAAU;AAbH;AAAyB;AAgBC;AAA1B;AAEP;AAGF;AACA;AACA;AACA;AACA;AACA;AAEE,aAAU;AAZH;AAA0B;AAeN;AAApB;AAEP;AAIF;AACA;AACA;AACA;AACA;AAEE,aAAU;AAZH;AAAoB;AAeH;AAAjB;AAEP;AAGF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEE,aAAU;AAlDH;AAAi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GACC,EAAD,GACzB,sBAD4B,GACL,EAAD,GACtB,sBADyB,GACF,EAAD,GACtB,uBADyB,GACD,EAAD,GACvB,eAD0B,GACV,EAAD,GACf,gBADkB,GACD,EAAD,GAChB,uCADmB,GACqB,EAAD,GACvC,KAD0C,GACpC,EAAD,GACL,eADQ,GACQ,EAAD,GACf,KADkB,GACZ,EAAD,GACL,4BADQ,GACqB,EAAD,GAC5B,mBAD+B,GACX,EAAD,GACnB,mBADsB,GACF,EAAD,GACnB,kBADsB,GACH,EAAD,GAClB,KADqB,GACf,EAAD,GACL,iBADQ,GACU,EAAD,GACjB,KADoB,GACd,EAAD,GACL,mBADQ,GACY,EAAD,GACnB,KADsB,GAChB,EAAD,GACL,YADQ,GACK,EAAD,GACZ,KADe,GACT,EAAD,GACL,wBADQ,GACiB,EAAD,GACxB,KAD2B,GACrB,EAAD,GACL,aADQ,GACM,EAAD,GACb,KADgB,GACV,EAAD,GACL,sBADQ,GACe,EAAD,GACtB,gCADyB,GACQ,EAAD,GAChC,KADmC,GAC7B,EAAD,GACL,cADQ,GACO,EAAD,GACd,KADiB,GACX,EAAD,GACL,sBADQ,GACe,EAAD,GACtB,KADyB,GACnB,EAAD,GACL,UADQ,GACG,EAAD,GACV,2BADa,GACe,EAAD,GAC3B,+BAD8B,GACE,EAAD,GAC/B,oCADkC,GACG,EAAD,GACpC,UADuC,GAC5B,EAAD,GACV,8BADa,GACkB,EAAD,GAC9B,qBADiC,GACX,EAAD,GACrB,UADwB,GACb,EAAD,GACV,UADa,GACF,EAAD,GACV,UADa,GACF,EAAD,GACV,SADa;AA3F+B;;AAAxB;AA8FQ;AAAnB;AAEP;AACA;AAEA,YAAK;AACL,iBAAS,QAA2B,OAAhB,WAAC,aAAD,CAAgB,GAAE,CAAF,kBAApC;AAAI;AACF,cAAK,0BAAa,CAAC,EAAG,aAAa,CAAC,CAAD,EAAK,kBAAkB,CAAC,CAAD,EAAK,cAAC,4CAAD,CAA7C;;AAEpB,iBAAU;AATH;A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AAFwB;AAnCE;AAE/B,iBAAM,UAAU,CAAC,KAAM,OAAP;AAFe;AA72HhB;;;AA+GN;;;;AAEO,6BhBh7BV,uCgBg7BU;AACW;AACT,+BhB16BV,yCgB06BU,yBhB3TkD,uBAAC,0CAAQ,wCAAT,CgB2TlD;AACC,gChBr2BV,0CgBq2BU;AACG,mChBl7BV,6CgBk7BU;AACD;AACL,6BfprBV,uCeorBU;AACG,gChB37BV,0CgB27BU;AACQ,wChB56BV,kDgB46BU;AACP,iChB56BV,2CgB46BU;AACE,mChB56BV,6CgB46BU;AACI,uChB56BV,iDgB46BU;AACR;AACH,4Bf1lBV,sCe0lBU;AACE;AACO;AACF,mChB77BZ,2CgB67BY;AACP;AACK;AACJ,6BpBn1BR,8BoBm1BQ;AACD;AACK,iChBh4BR,6CgBg4BQ;AACC,kChBj4BT,6CgBi4BS;AACA;AACF;AACI;AACR;AACK;AACD;AACH,6BAhJF,6BAgJE;AACG;AACD;AACH;AACS,qChB77BV,+CgB67BU;AACL;AACL;AACI;AACF;AACO;AACF,kChBp9BX,2CgBo9BW;AACF,gChBn5BP,6CgBm5BO;AACD,+BhBp5BN,6CgBo5BM;AACG,kChBr5BT,6CgBq5BS;AACD,iChBh5BX,0CgBg5BW;AACC,kChBh5BP,+CgBg5BO;AACH,+BhBl5BT,0CgBk5BS;AACI,mChBx5BX,4CgBw5BW;AACF,iChBz5BT,4CgBy5BS;AACE,mChBt5BP,gDgBs5BO;AACC,oChB55BX,6CgB45BW;AACA,oChB75BX,6CgB65BW;AACL,+BhB95BN,6CgB85BM;AACD,8BhB/5BL,6CgB+5BK;AACI,kChBp5BP,+CgBo5BO;AACA,kChBt5BP,+CgBs5BO;AACD,iChBp5BP,8CgBo5BO;AACE,mChBt5BP,gDgBs5BO;AA1Db;AA6DG;;;;AAED;AA0qIyB;;AAEpC;AAEa;AAGf;AAEI,YAAG,GAAH,EACE,KAAI,OAAM,IAAI,CAAC,CAAD,CADhB;AALW;AAUb;AAGF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGE,SAAG,CAAC,OAAD;AACH,SAAG,CAAC,aAAD;AACH,SAAG,CAAC,cAAD;AACH,SAAG,CAAC,SAAD;AACH,SAAG,CAAC,aAAD;AACH,SAAG,CAAC,SAAD;AACH,SAAG,CAAC,gBAAD;AACH,SAAG,CAAC,QAAD;AACH,SAAG,CAAC,kBAAD;AACH,SAAG,CAAC,SAAD;AACH,SAAG,CAAC,QAAD;AACH,SAAG,CAAC,OAAD;AACH,SAAG,CAAC,iBAAD;AACH,SAAG,CAAC,cAAD;AACH,SAAG,CAAC,SAAD;AACH,SAAG,CAAC,QAAD;AAhFiC;AA1qIzB;;;AAKK,6BhBl/BV,uCgBk/BU;AACW;AACX,6BflvBV,uCekvBU;AACW,wChBz+BV,kDgBy+BU;AACP,iChBz+BV,2CgBy+BU;AACE,mChBz+BV,6CgBy+BU;AACI,uChBz+BV,iDgBy+BU;AACR;AACH,4BfvpBV,sCeupBU;AACE;AACF;AACK;AACL;AACI;AACA;AACD;AACH;AACD;AACI;AACF;AACO;AACJ,gChBl8BP,6CgBk8BO;AACD,+BhBn8BN,6CgBm8BM;AACG,kChBp8BT,6CgBo8BS;AACD,iChB/7BX,0CgB+7BW;AACC,kChB/7BP,+CgB+7BO;AACH,+BhBj8BT,0CgBi8BS;AACI,mChBv8BX,4CgBu8BW;AACF,iChBx8BT,4CgBw8BS;AACE,mChBr8BP,gDgBq8BO;AACC,oChB38BX,6CgB28BW;AACA,oChB58BX,6CgB48BW;AACL,+BhB78BN,6CgB68BM;AACD,8BhB98BL,6CgB88BK;AAtCN;AAyCG;;;;AAEK;;AAEJ;;;AAEb;AAFa;AA6vIsB;AAErC,yBA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,iChBr/BX,0CgBq/BW;AACC,kChBr/BP,+CgBq/BO;AACH,+BhBv/BT,0CgBu/BS;AACI,mChB7/BX,4CgB6/BW;AACF,iChB9/BT,4CgB8/BS;AACE,mChB3/BP,gDgB2/BO;AACC,oChBjgCX,6CgBigCW;AACA,oChBlgCX,6CgBkgCW;AACL,+BhBngCN,6CgBmgCM;AACD,8BhBpgCL,6CgBogCK;AA/CF;AAkDG;AAyrLyB;AAE3C;AACA,iBAAK;AACL,iBAAK,IAAI,CAAC,GAAD;AACT,iBAAK,IAAI,CAAC,KAAD;AACT,iBAAK,IAAI,CAAC,GAAD;AANkC;AAzrLzB;;;AAOF,6BhBnlCV,uCgBmlCU;AACW;AACX,6Bfn1BV,uCem1BU;AACW,wChB1kCV,kDgB0kCU;AACP,iChB1kCV,2CgB0kCU;AACE,mChB1kCV,6CgB0kCU;AACI,uChB1kCV,iDgB0kCU;AACR;AACH,4BfxvBV,sCewvBU;AACE;AACO;AACF,mChB3lCZ,2CgB2lCY;AACP;AACK;AACL;AACI;AACA;AACD;AACH;AACD;AACI;AACF;AACO;AACF,kChBvmCX,2CgBumCW;AACF,gChBtiCP,6CgBsiCO;AACD,+BhBviCN,6CgBuiCM;AACG,kChBxiCT,6CgBwiCS;AACD,iChBniCX,0CgBmiCW;AACC,kChBniCP,+CgBmiCO;AACH,+BhBriCT,0CgBqiCS;AACI,mChB3iCX,4CgB2iCW;AACF,iChB5iCT,4CgB4iCS;AACE,mChBziCP,gDgByiCO;AACC,oChB/iCX,6CgB+iCW;AACA,oChBhjCX,6CgBgjCW;AACL,+BhBjjCN,6CgBijCM;AACD,8BhBljCL,6CgBkjCK;AA3CC;AA+CA;;;;AAIP;;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAvBS;;;;;;;AAkoJe;AAAP;AAEnB,UAAY,4BAAD,QAAX;AAEE,4BAAgB;AAChB,m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;;;;AAEW,6BhB5uCV,uCgB4uCU;AACW;AACT,+BhBtuCV,yCgBsuCU,yBhBvnBkD,uBAAC,0CAAQ,wCAAT,CgBunBlD;AACC;AACA,gChBlqCV,0CgBkqCU;AACG,mChB/uCV,6CgB+uCU;AACD;AACL,6Bfj/BV,uCei/BU;AACG,gChBxvCV,0CgBwvCU;AACQ,wChBzuCV,kDgByuCU;AACP,iChBzuCV,2CgByuCU;AACE,mChBzuCV,6CgByuCU;AACI,uChBzuCV,iDgByuCU;AACR;AACH,4Bfv5BV,sCeu5BU;AACE;AACO;AACF,mChB1vCZ,2CgB0vCY;AACP;AACA;AACC,6BpBhpCR,8BoBgpCQ;AACE,+BhBxqCV,yCgBwqCU;AACI;AACD;AACD,iCJhqCV,wCIgqCU;AACD;AACA;AACI;AACR;AACI;AACC;AACA;AACD;AACE;AACF;AACD;AACM,qChB5vCV,+CgB4vCU;AACV;AACI;AACF;AACO;AACF,kChBlxCX,2CgBkxCW;AACF,gChBjtCP,6CgBitCO;AACD,+BhBltCN,6CgBktCM;AACG,kChBntCT,6CgBmtCS;AACD,iChB9sCX,0CgB8sCW;AACC,kChB9sCP,+CgB8sCO;AACH,+BhBhtCT,0CgBgtCS;AACI,mChBttCX,4CgBstCW;AACF,iChBvtCT,4CgButCS;AACE,mChBptCP,gDgBotCO;AACC,oChB1tCX,6CgB0tCW;AACA,oChB3tCX,6CgB2tCW;AACA,oChB1tCP,iDgB0tCO;AACL,+BhB7tCN,6CgB6tCM;AACD,8BhB9tCL,6CgB8tCK;AACI,kChBntCP,+CgBmtCO;AACA,kChBrtCP,+CgBqtCO;AACD,iChBntCP,8CgBmtCO;AACE,mChBrtCP,gDgBqtCO;AA7DjB;AAgEG;;;;AAEK;;;AAEX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAXW;;;;;;;AAssJ2B;AAExC,UAAI,qBAAiB,KAAG,KAAxB;AAEE,gCAAoB;AACpB;OAHF;AAFwC;AAtEN;AAAb;AAErB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KAAC,CAAD,CAAN;;AANsB;AAnOnB;AAWC;;AAIA,mCACA,gCADA;AACA;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAdO;aACP,wCACA,IAAA,kCACA,IAAA,sCACA,IAAA,sBACA,IAAA,wBACA,IAAA,sBACA,IAAA,8BACA,IAAA,4BACA,IAAA,8BACA,IAAA,gDACA,IAAA,oBACA,IAAA,oBACA,IAAA,sBACA,sCAZA;AAFO;;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAdO;;;AACP;AACA;AACA;AACA;AACA;AACA;AACA,2BAZO,uBAYP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAdO;AAiBI;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAdW;aACX,wCACA,IAAA,kCACA,IAAA,sCACA,IAAA,sBACA,IAAA,wBACA,IAAA,8BACA,IAAA,4BACA,IAAA,oBACA,IAAA,kCACA,IAAA,4BACA,IAAA,4BACA,IAAA,0BACA,IAAA,oCACA,0DAZA;AAFW;;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAdW;;;AACX;AACA;AACA;AACA;AACA;AACA,2BA5BO,uBA4BP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAdW;AAkBC,yCAEL,qCAFK;AAEL;;;AAEP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAnBO;;;;;;;;;;AA4qBgB;AAAR;AAEjB;AAEA,eAAU;AACV,aAAQ;AACR,aAAM,IAAK,KAAG,IAAd;AAEM,cAAJ,IAAG;AACH,eAAQ,IAAI,UAAC;;AATE;AAAQ;AA9OC;AAAT;AAEjB,eAAU;AAFO;AAAS;AA+GD;AAAR;AAEjB;AAEA,eAAU,CAAC;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AAe,CAAC,CAAD;AACpD,YAAK,YAAM,GAAE,MAAF;AACX,8BAAiC,QAAQ,eAAe,CAAC,CAAD;AACxD,2BAAc,iBAAiB,CAAC,WAAa,iDAAd;;AAtBH;AAmOE;AAEhC;AACA,kBAAO,oBAAoB,CAAC,QAAS,2CAAV;AAHK;AAhKI;AAEpC;AACA,oBAAS,QAAT;AACA,2BAAiB;AACjB,4BAAgB;AAChB,wBAAc;AACd,4BAAkB;AAClB,yBAAe;AACf,sBAAY;AACZ,qBAAW;AACX,qBAAU,GAAV;AACA,oBAAS,GAAT;AAZoC;AAxJzB;;;AAoDK,6BhCwDV,uCgCxDU;AACW;AACT,+BhC8DV,yCgC9DU,yBhC6qBkD,uBAAC,0CAAQ,wCAAT,CgC7qBlD;AACI,mC/BuThB,uC+BvTgB;AACC;AACN,8BhCiKV,wCgCjKU;AACU;AACL,mChC+DV,6CgC/DU;AACF,iChC6DV,2CgC7DU;AACM,uChC8DV,iDgC9DU;AACQ;AACF;AACC;AACD;AACjB,4B/B6YV,sC+B7YU;AACM;AACJ;AACC;AACC;AACK;AACT;AACK;AACF,+BhCuGN,6CgCvGM;AACA,+BhCsGN,6CgCtGM;AA3EP;AA+EG;;;;AA1FhB;ACCA,sBAES,UAFT;;;AAES,2BAGO,6EACI,gEACG,8DACX,4EACM,kDACE,gEACC,0DACD,sFACA,qDACG,wDACE,+EACL,oFACG,oEACN,iDACO,6DACH,mDACG,wFACE,gGACA,uEACD,qEACF,8DACL,0DACD,oFACH,+EACE,iDACE,iFACK,0EACJ,wDACD,6CACC,qDACK,4EACZ,8DACI,6CACJ,4DACU,kEACT,gEACE,8DACW,0EACT,wEACH,oDACF,gDACG,qDACA,mFACF,8FACO,uDACP,0DACG,wEACQ,wEACP,sFACF,uEACI,qDACK,wEACF,yFACN,iDACA,+CACU,2EACH,sFACL,yDACA,8EACF,oDACH,+DACK,4EACK,+DACC,wEACU,+FACT,mFACV,8CACD,0CACE,uFACO,+FACP,+HACC,qIACF,6EAC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A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;OAGO,UAAc,CAAV,cAAU,KAAE,8BAAF,CAAa,IAAsB,CAAjB,iBAAW,WAAC,EAAK,KAAG,EAAH,CAAjD;AAEH,iBAAU,iBAAW,WAAC;AACtB;AACE,mBAAoB,IAAO,MAAM,CAAC,MAAD;AAEvC;AAHI;;;AAYJ;;AApMwC;AAhCO;AAE7C,UAAG,qBAAiB,KAAG,KAAvB;AAEE,gCAAoB;AACpB,mBAAM;AACN,mBAAM,MAAM,CAAC,sBAAiB,sBAAlB;OAJd;AAF6C;AAUC;AAE9C,UAAG,sBAAkB,KAAG,KAAxB;AAEE,iCAAqB;AACrB,mBAAM;AACN,mBAAM,MAAM,CAAC,sBAAiB,sBAAlB;OAJd;AAF8C;AAUA;AAE9C,UAAsB,CAAlB,sBAAkB,KAAG,KAAH,CAA2B,IAAN,CAAN,KAAM,IAAG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,wEAAmB,U3Ea7B,2B2Eb6B,EAAe,qBAAK,qBAAsB,yBAA7D;AAED,uEAAmB,U3EW5B,2B2EX4B,EAAe,qBAAM,qBAAwB,2BAAhE;AACC,wEAAmB,U3EU7B,2B2EV6B,EAAe,oBAAlC;AAEP;;;AAER;AACA;AACA;AAJQ;AA88ViB;AAE3B;AACA,kBAAQ;AACR,kBAAQ;AACR,mBAAS;AALmB;AAAD;AAVF;AAEzB,UAAc,eAAH,eAAP,MAAO,CAAX;AAEE,oBAAgB,OAAP,OAAU,eAAH,CAAc;AAC9B,oBAAgB,OAAP,OAAU,eAAH,CAAc;AAC9B,qBAAiB,OAAP,OAAU,eAAH,CAAc;OAJjC;AAFyB;AAp8Vf;AAMU;AAGN;AACA;AACC;AAXL;AAgBO;;;AAEf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAhGe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkxEgB;AAAR;AAEzB;AAEA,WAAM,oBAAe,CAAC,KAAK,IAAN;AAErB,UAAG,CAAY,CAAC,EAAD,SAAf;AAEE,iBAAU;AACV;OAHF;AAMD,UAAG,cAAH;AAEG,YAAY,EAAE,WAAH,QAAX,EACE,KAAqB,EAAE,WADzB;OAFH;AAMC,eAAU,EAAE;AAlB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;AAAM;AACN;AAAU;AAAU;AAAQ;AAAQ;AAAS;AAAS;AACtD;AAAY;AACZ;AAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAGA;AA1NmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAq6N2B;AAEhD,UAAG,qBAAiB,KAAG,KAAvB,EACE,qBAAgB,OAAO,CAAC,KAAD,CADzB;AAFgD;AA8CC;AAGjD,UAAG,sBAAk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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA5JS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuN+B;AAE1C,2BAAgB;AAChB,2BAAgB,aAAhB,GAA8B,2BAA4D,GAAhC,sBAAS,CAAC,qBAAgB,QAAC,GlHmDjC,GkHnDe,CAAV,GAAkC,iCAAD;AAC1F,2BAAgB;AAJ0B;AAiEG;AAE7C,aAAE,YAAC,CAAU,EAAV;AACH,aAAE,SAAM,CAAC,EAAE,EAAI,aAAP;AACR,aAAE,SAAM,CAAC,EAAE,EAAI,MAAP;AACR,aAAE,SAAM,CAAC,EAAE,EAAI,eAAP;AACR,aAAE,SAAM,CAAC,EAAE,EAAI,MAAM,GAAC,kCAA6B,YAAC,EAA5C;AACR,aAA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ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAKM,gBAAG,QAAQ,kBAAX;AAEoC,sBAAS,MAA3C,GAAqD;AACrD,kBAAY,QAAQ,YAAT,QAAX,EACE,QAAQ,YAAW,CAAC,QAAD,CADrB;aAHF;;AAjNJ;;AApB0C;AAxFI;AAK9C;AAAG;AACH;AAEA,aAAM;AACN,YAAK;AACL,aAAM;AAER;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAlEgD;AAuEN;;AAnGrB;;;AAYnB;AA/BY;AATd,GASc,iFATd;ACAA,qCAyCS,+HAzCT;;;;AAsES,iBAAG;AACH,iBAAG;AACH,iBAAG;AACH,iBAAG;AACO,2BAAG;AACJ,0BAAG;AACC,8BAAG,IAAK,GAAE,qBAAF;AACR,8BAAG,IAAwB,GAAjB,qBAAF,GAAqB,IAAF;AACjC,wBAAG,cAAC,IAAK,IAAK,IAAK,GAAhB;AASQ;;AAKH;;AAuUA;AApJC;AA0EM;AApPD,mFAA2B,YAoP1B,4CApP0B,EAA3B;AAEQ,2FAAmB,UvIQhD,2BuIRgD,EAAyB,YAkPnD,4CAlPmD,EAA5C;AAEL,sFAA2B,YAgP7B,4CAhP6B,EAA3B;AAES,kGAA+D,wBAA/D;AAEA,kGAA+D,W9HwuB1F,mC8HxuB0F,EAA/D;AAEN,4FAAsE,kBA0O3E,4CA1O2E,EAAtE;AAEO;;;AAEvC;AAC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,4BqI3YV;AACA,gDrIilBY,8BqIjlBZ;AACA,mDrIyYU,4BqIzYV;AACA,mDrIwYU,4BqIxYV;AACA,sDrIuYU,4BqIvYV;AACA,oDrIsYU,4BqItYV;AACqB,kCAAO,UpLoFvB,2BoLpFuB,CAAP;AACO,yCAAQ,WrI8iC9B,wBqI9iC8B,CAAR;AACH,sCAAO,UpLkF3B,2BoLlF2B,CAAP;AACJ,kCAAO,UpLiFvB,2BoLjFuB,CAAP;AACC,mCAAO,UpLgFxB,2BoLhFwB,CAAP;AACQ,2CAAQ,WrI0iChC,wBqI1iCgC,CAAR;AACM,iDAAO,UrIyiCrC,wBqIziCqC,EACrC,QrI6hCO,+BqI7hCP,CAD8B;AAEL,4CAAQ,WrIuiCjC,wBqIviCiC,CAAR;AACY,wDAAQ,WrIsiC7C,wBqItiC6C,CAAR;AAvClC;AA2DX;AAvEF,GAyEc,mDAzEd;ACAA,6BAES,6QAFT;;;AAWY;;;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A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rLjEhC,2BqLiEgC,CAAP;AACA,2CAAO,UrLlEhC,2BqLkEgC,CAAP;AACS,oDAAO,UrLnEzC,2BqLmEyC,EAClC,2BAAkB,sBADS;AAEA,oDAAO,UrLrEzC,2BqLqEyC,EAClC,2BAAkB,sBADS;AAEI,wDAAO,UtIo5B5C,wBsIp5B4C,EAC5C,QtIw4BO,+BsIx4BP,CADqC;AAER,gDAAQ,WtIk5BrC,wBsIl5BqC,CAAR;AACV,sCAAO,UrL1E3B,2BqL0E2B,CAAP;AA7LjB;AA6MV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAnOF,GAqOc,gBArOd;ACAA,oCAES,wRAFT;;;AAWmB;;;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAgBA;AA/LY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkakC;AAEhD,wBAAa;AACb,wBAAa,aAAb,GAA2B,0BAA0B,GAAC,iCAA4B,YAAC,EAA9B;AACrD,wBAAa;AAJmC;AA1Bd;AAElC;AAEA,qBAAU,MAAK,WAAC,CAAM,6DAA4E,GAAd,mBAAD,GAAgB,aAAnF;AAChB,kBAAW,eAAU,iBAAC;AACtB,qBAAU,iBAAC,CAAe,SAAf;AACX,qBAAU,iBAAC,CAAe,SAAf;AACX,kBAAW,eAAU,iBAAC;AACtB,qBAAU,iBAAC,CAAe,SAAf;AACX,4BAAiB,iBA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ByLvGyB,CAAP;AACG,uCAAQ,W1IikC5B,wB0IjkC4B,CAAR;AACL,kCAAO,UzLqGvB,2ByLrGuB,CAAP;AAZR;AA8Bf;AA3CF,GA6Cc,mCA7Cd;ACAA,gCAES,0hBAFT;;;AAckB;;;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA8BA;AACA;AACA;AApKc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2MsB;AAEtC,UAAI;AAFkC;AA8VF;AAEpC;AAEA,qBAAU,MAAK,WAAC,CAAM,sEAAN;AAChB,kBAAW,eAAU,iBAAC;AACtB,oBAAS,iBAAC,CAAe,SAAf;AACV,uBAAY,iBAAC,CAAe,SAAf;AACb,qBAAU,iBAAC,CAAe,SAAf;AACX,qBAAU,iBAAC,CAAe,SAAf;AACX,qBAAU,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V;AACA,qC5IqXU,4B4IrXV;AACA,oC5IoXU,4B4IpXV;AACA,+C5ImXU,4B4InXV;AACA,kC5I0aW,6B4I1aX;AACA,sC5IiXU,4B4IjXV;AACA,mC5IgXU,4B4IhXV;AACA,gC5IggDS,2B4IhgDT;AACA,6B7Jk4BY,8C6Jl4BZ;AACA,6B7Ji4BY,8C6Jj4BZ;AACA,6B7Jg4BY,8C6Jh4BZ;AACqB,kCAAO,U3L0DvB,2B2L1DuB,CAAP;AACO,yCAAQ,W5IohC9B,wB4IphC8B,CAAR;AA1Df;AAuEf;AAlFF,GAoFc,oCApFd;ACAA,oCAES,8RAFT;;;AAWmB;;;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA2BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA9ae;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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,uBAES,+UAFT;;;AAYM;;;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA/FE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAogBoB;AAExB;AAEA,qBAAU,MAAK,WAAC,CAAM,0EAAN;AAChB,kBAAW,eAAU,iBAAC;AACtB,qBAAU,iBAAC,CAAe,SAAf;AACX,mBAAQ,iBAAC,CAAe,SAAf;AACT,sBAAW,iBAAC,CAAe,SAAf;AACZ,oBAAS,iBAAC,CAAe,SAAf;AACV,wBAAa,iBAAC,CAAe,SAAf;AACd,yBAAc,iBAAC,CAAe,SAAf;AACf,kBAAW,eAAU,iBAAC;AACtB,0BAAe,iBAAC,CAAe,SAAf;AAChB,0BAAe,iBAAC,CAAe,SAAf;AAChB,0BAAe,iBAAC,CAAe,SAAf;AAChB,mBAAQ,WAAC,CAAS,gCAA8C,GAAvB,GAAD,GAAK,yBAAD,GAAiB,GAAD,GAAK,0BAAxD;AACT,0BAAe,WAAC,CAAS,KAAT;AAChB,0BAAe,WAAC,CAAS,KAAT;AAChB,uBAAW;AACX;AApBwB;AAmYkB;AAE1C,UAAG,yBAAoB,eAAC,EAAW,GAAC,CAApC;A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P;AACM,6CAAQ,WjJo9BlC,wBiJp9BkC,CAAR;AACF,2CAAO,UhMRhC,2BgMQgC,CAAP;AACQ,mDAAO,UjJk9BvC,wBiJl9BuC,EACvC,QjJs8BO,+BiJt8BP,CADgC;AAER,2CAAQ,WjJg9BhC,wBiJh9BgC,CAAR;AACA,2CAAQ,WjJ+8BhC,wBiJ/8BgC,CAAR;AA9H5B;AAyIJ;AACA;AAAO;AAAQ;AAAM;AAAS;AAAS;AAAU;AACjD;AAAO;AAAQ;AAAM;AAAS;AAAS;AAAU;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AApKF,GAoLc,4HApLd;ACAA,iCAES,4pBAFT;;;AAgBgB;;;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAoCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AArVY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6mCoB;AAGlC,UAAG,kBAAa,KAAE,EAAlB;AAEE,6BAAgB;AAChB,yBAAY;AACZ,oBAAO;AACP,oBAAO,aAAP,GAAqB,iDAAiD,GAAC,sBAAS,CAAC,mB7L52B/B,G6L42B8B,CAAV;AACtE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A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAaA;AAnLW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwXoB;AAEjC,qBAAU,UAAV,GAAqB;AACrB,qBAAU;AAHuB;AAlEgB;;AAEjD;AACuB;AAEnB;AAEA,gBAAc,OAAN,MAAS,sCAAH;AACd,wBAAU,MAAK,WAAC,CAAM,EAAN;AALG;AAQG;AAEtB,YAAG,IAAI,cAAc,KAAE,EAAvB;AAEE,4BAAY,CAAC,IAAI,eAAe,gBAApB;;AAIZ,0BAAU;AACV,0BAAU;;AATU;AAc1B,aAAM,sCAAgB,QAAC,eAAS,aAAT;AACvB,UAAI,YAAU;AA1BmC;AA9BP;;AAE1C;AACuB;AAEnB;AAEA,gBAAc,OAAN,MAAS,sCAAH;AACd,wBAAU,MAA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A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAuBA;AACA;AACA;AACA;AACA;AACA;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zjC6B,CAAR;AACK,6CAAQ,W/JwjClC,wB+JxjCkC,CAAR;AACA,6CAAO,U9M4FlC,2B8M5FkC,CAAP;AACG,gDAAQ,W/JsjCrC,wB+JtjCqC,CAAR;AACV,sCAAO,U9M0F3B,2B8M1F2B,CAAP;AACE,wCAAO,U9MyF7B,2B8MzF6B,CAAP;AA1BV;AAoCnB;AA/CF,GAiDc,gDAjDd;ACAA,qCAES,sTAFT;;;AAWoB;;;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AASA;AACA;AA7IgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgMoB;AAEtC,0BAAe;AAFuB;AAKa;AAEnD;AACA;AAGA,qBAAU,MAAK,WAAC,CAAM,4EAAN;AAEhB,qBAAU,MAAK,WAAC,CAAM,EAAN;AAChB,kBAAW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ACA,4ChKqWW,6BgKrWX;AACA,2ChKmfY,8BgKnfZ;AACA,sDhK2SU,4BgK3SV;AACA,+ChKqbS,2BgKrbT;AACA,2ChKiWW,6BgKjWX;AACA,gDhKwSU,4BgKxSV;AACA,sDhK8eY,8BgK9eZ;AACA,6ChKijBQ,0BgKjjBR;AACA,0DhKqSU,4BgKrSV;AACA,6BjLwzBY,8CiLxzBZ;AACA,6BjLuzBY,8CiLvzBZ;AACA,6BjLszBY,8CiLtzBZ;AACA,8BlL3BI,sCkL2BJ;AACqB,kCAAO,U/MjBvB,2B+MiBuB,CAAP;AACa,+CAAQ,WhKy8BpC,wBgKz8BoC,CAAR;AACR,uCAAO,U/MnB5B,2B+MmB4B,CAAP;AAtIV;AAmJlB;AA9JF,GAgKc,0CAhKd;ACAA,qCAES,yRAFT;;;AAWoB;;;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A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,uCuLtjBL;AACA,+BvLqjBK,uCuLrjBL;AACA,oCvLojBK,uCuLpjBL;AACA,0CvLmjBK,uCuLnjBL;AACA,gErKocW,6BqKpcX;AACA,4ErKmcW,6BqKncX;AACqB,kCAAO,UpNyFvB,2BoNzFuB,CAAP;AACa,+CAAQ,WrKmjCpC,wBqKnjCoC,CAAR;AACT,sCAAO,UpNuF3B,2BoNvF2B,CAAP;AACE,wCAAO,UpNsF7B,2BoNtF6B,CAAP;AACL,mCAAO,UpNqFxB,2BoNrFwB,EAAqB,UxL+BxC,0CwL/BwC,EAA5B;AACK,wCAAO,UpNoF7B,2BoNpF6B,CAAP;AACK,6CAAO,UpNmFlC,2BoNnFkC,CAAP;AACM,mDAAO,UpNkFxC,2BoNlFwC,CAAP;AAjC3B;AA4Cb;AACA;AAxDF,GA4Dc,8DA5Dd;ACAA,gCAES,0SAFT;;;AAWe;;;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAwBA;AAtQW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqUoB;AAEjC;AAEA,qBAAU,MAAK,WAAC,CAAM,qEAAN;AAChB,kBAAW,eAAU,iBAAC;AACtB,qBAAU,iBAAC,CAAe,SAAf;AACX,uBAAY,iBAAC,CAAe,SAAf;AACb,uBAAY,iBAAC,CAAe,SAAf;AAEb,qBAAU,iBAAC,CAAe,SAAf;AACX,kBAAW,eAAU,iBAAC;AACtB,aAAE,iBAAC,CAAe,SAAf;AACH,kBAAW,eAAU,iBAAC;AACtB,0BAAe,iBAAC,CAAe,SAAf;AAChB,wBAAa,iBAAC,CAAe,SAAf;AACd,kBAAO,iBAAC,CAAe,SAAf;AACR,gCAAqB,iBAAC,CAAe,SAAf;AACtB,gCAAqB,WAAC,CAAS,EAAT;AACtB,mBA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wByK1/B2B,CAAR;AAjFf;AAwFZ;AAtGF,GAwGc,mCAxGd;ACAA,oBAES,gfAFT;;;AAeQ;AAuGc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAhBc;eACd,kCACA,IAAA,8BACA,IAAA,4BACA,IAAA,0CACA,IAAA,4CACA,IAAA,oDACA,IAAA,4BACA,IAAA,0CACA,IAAA,0BACA,IAAA,8CACA,IAAA,0BACA,IAAA,wCACA,IAAA,0CACA,IAAA,0CACA,IAAA,sCACA,kCAdA;AAFc;;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAhBc;;;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAhBc;AAvGd;;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAuDI;AACA;AACJ;AACA;AA5HI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAunBoB;AAE1B;AACA;AAEA,qBAAU,MAAK,WAAC,CAAM,kEAAgF,GAAb,kBAAD,GAAe,gBAAvF;AAEhB,kBAAW,eAAU,iBAAC;AACtB,uBAAY,iBAAC,CAAe,SAAf;AACb,4BAAiB,iBAAC,CAAe,SAAf;AAClB,sBAAW,iBAAC,CAAe,SAAf;AACZ,qBAAU,iBAAC,CAAe,SAAf;AACX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